@ebay/ui-core-react 7.4.0 → 8.0.0
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 +0 -3
- package/button-6S4U-4HH.js +1 -0
- package/{calendar-lAu6VfAb.js → calendar-hBaLhOjI.js} +1 -1
- package/common/dropdown.d.ts +20 -0
- package/common/dropdown.d.ts.map +1 -0
- package/common/floating-label-utils/hooks.d.ts.map +1 -1
- package/dialog-previous-button-B-fysL3O.js +1 -0
- package/dropdown-pp-aluo7.js +1 -0
- package/ebay-accordion/README.md +61 -0
- package/ebay-accordion/accordion.d.ts +16 -0
- package/ebay-accordion/accordion.d.ts.map +1 -0
- package/ebay-accordion/index.d.ts +3 -0
- package/ebay-accordion/index.d.ts.map +1 -0
- package/ebay-accordion/index.js +2 -0
- package/ebay-alert-dialog/index.js +1 -1
- package/ebay-breadcrumbs/index.js +1 -1
- package/ebay-button/README.md +1 -1
- package/ebay-button/button.d.ts.map +1 -1
- package/ebay-button/index.js +1 -1
- package/ebay-button/types.d.ts +1 -1
- package/ebay-button/types.d.ts.map +1 -1
- package/ebay-calendar/index.js +1 -1
- package/ebay-carousel/index.js +1 -1
- package/ebay-checkbox/index.js +1 -1
- package/ebay-confirm-dialog/index.js +1 -1
- package/ebay-cta-button/index.js +1 -1
- package/ebay-date-textbox/date-textbox.d.ts.map +1 -1
- package/ebay-date-textbox/index.js +1 -1
- package/ebay-details/README.md +51 -0
- package/ebay-details/ebay-details.d.ts +17 -0
- package/ebay-details/ebay-details.d.ts.map +1 -0
- package/ebay-details/index.d.ts +2 -0
- package/ebay-details/index.d.ts.map +1 -0
- package/ebay-details/index.js +1 -0
- package/ebay-details-q_d7qlcN.js +1 -0
- package/ebay-dialog-base/index.js +1 -1
- package/{ebay-drawer-dialog → ebay-drawer-dialog-deprecated}/README.md +9 -8
- package/{ebay-drawer-dialog → ebay-drawer-dialog-deprecated}/components/drawer.d.ts +2 -6
- package/ebay-drawer-dialog-deprecated/components/drawer.d.ts.map +1 -0
- package/ebay-drawer-dialog-deprecated/index.d.ts +2 -0
- package/ebay-drawer-dialog-deprecated/index.d.ts.map +1 -0
- package/ebay-drawer-dialog-deprecated/index.js +1 -0
- package/ebay-eek/index.js +1 -1
- package/ebay-fake-menu/index.js +1 -1
- package/ebay-fake-menu/menu.d.ts +4 -3
- package/ebay-fake-menu/menu.d.ts.map +1 -1
- package/ebay-fake-menu-button/README.md +1 -1
- package/ebay-fake-menu-button/index.js +1 -1
- package/ebay-fake-menu-button/menu-button.d.ts.map +1 -1
- package/ebay-fake-tabs/index.js +1 -1
- package/{ebay-fullscreen-dialog → ebay-fullscreen-dialog-deprecated}/README.md +6 -4
- package/{ebay-fullscreen-dialog → ebay-fullscreen-dialog-deprecated}/fullscreen-dialog.d.ts +2 -2
- package/ebay-fullscreen-dialog-deprecated/fullscreen-dialog.d.ts.map +1 -0
- package/ebay-fullscreen-dialog-deprecated/index.d.ts +2 -0
- package/ebay-fullscreen-dialog-deprecated/index.d.ts.map +1 -0
- package/ebay-fullscreen-dialog-deprecated/index.js +1 -0
- package/ebay-icon/README.md +1 -1
- package/ebay-icon/index.js +1 -1
- package/ebay-icon/types.d.ts +1 -1
- package/ebay-icon/types.d.ts.map +1 -1
- package/ebay-icon-button/index.js +1 -1
- package/ebay-infotip/README.md +0 -2
- package/ebay-infotip/ebay-infotip.d.ts +0 -2
- package/ebay-infotip/ebay-infotip.d.ts.map +1 -1
- package/ebay-infotip/index.js +1 -1
- package/ebay-inline-notice/index.js +1 -1
- package/ebay-lightbox-dialog/README.md +2 -0
- package/ebay-lightbox-dialog/index.js +1 -1
- package/ebay-lightbox-dialog/lightbox-dialog.d.ts +3 -1
- package/ebay-lightbox-dialog/lightbox-dialog.d.ts.map +1 -1
- package/ebay-listbox/README.md +100 -0
- package/ebay-listbox/index.d.ts +4 -0
- package/ebay-listbox/index.d.ts.map +1 -0
- package/ebay-listbox/index.js +1 -0
- package/ebay-listbox/listbox-option-description.d.ts +4 -0
- package/ebay-listbox/listbox-option-description.d.ts.map +1 -0
- package/ebay-listbox/listbox-option.d.ts +10 -0
- package/ebay-listbox/listbox-option.d.ts.map +1 -0
- package/ebay-listbox/listbox.d.ts +21 -0
- package/ebay-listbox/listbox.d.ts.map +1 -0
- package/ebay-listbox-button/index.js +2 -2
- package/ebay-listbox-button/listbox-button.d.ts.map +1 -1
- package/ebay-menu/index.js +1 -1
- package/ebay-menu/menu.d.ts.map +1 -1
- package/ebay-menu/types.d.ts +2 -1
- package/ebay-menu/types.d.ts.map +1 -1
- package/ebay-menu-button/README.md +1 -1
- package/ebay-menu-button/index.js +1 -1
- package/ebay-menu-button/menu-button.d.ts.map +1 -1
- package/ebay-page-notice/index.js +1 -1
- package/ebay-pagination/index.js +1 -1
- package/ebay-panel-dialog/index.js +1 -1
- package/ebay-progress-spinner/index.js +1 -1
- package/ebay-progress-stepper/index.js +1 -1
- package/ebay-radio/index.js +1 -1
- package/ebay-section-notice/index.js +1 -1
- package/ebay-section-title/index.js +1 -1
- package/ebay-segmented-buttons/index.js +1 -1
- package/ebay-select/index.js +1 -1
- package/ebay-snackbar-dialog/index.js +1 -1
- package/ebay-split-button/README.md +1 -1
- package/ebay-split-button/index.js +1 -1
- package/ebay-star-rating/index.js +1 -1
- package/ebay-star-rating-select/index.js +1 -1
- package/ebay-svg/index.js +1 -1
- package/ebay-svg/symbols.d.ts.map +1 -1
- package/ebay-tabs/README.md +1 -3
- package/ebay-tabs/index.js +1 -1
- package/ebay-tabs/tabs.d.ts.map +1 -1
- package/ebay-tabs/types.d.ts +2 -6
- package/ebay-tabs/types.d.ts.map +1 -1
- package/ebay-textbox/index.js +1 -1
- package/ebay-toast-dialog/README.md +3 -3
- package/ebay-toast-dialog/index.js +1 -1
- package/ebay-toggle-button/index.js +1 -1
- package/ebay-toggle-button-group/index.js +1 -1
- package/ebay-tooltip/index.js +1 -1
- package/ebay-tourtip/index.js +1 -1
- package/ebay-video/index.js +1 -1
- package/events/index.js +1 -1
- package/forwardRef-fPwzYd82.js +1 -0
- package/hooks-5qES90Sx.js +1 -0
- package/icon-D4RDqpD4.js +1 -0
- package/icon-button-Bjjvld0a.js +1 -0
- package/index-Bsb1LHpi.js +1 -0
- package/lightbox-dialog-Il3dBNcR.js +1 -0
- package/menu-DAOhKkcI.js +1 -0
- package/menu-button-label-DJq794te.js +1 -0
- package/menu-button-label-D_04ZC3p.js +1 -0
- package/menu-item-Cf-tQ72X.js +1 -0
- package/notice-cta-FAd6zCdx.js +1 -0
- package/package.json +18 -80
- package/{progress-spinner-U2qOANON.js → progress-spinner-CF3qoWE3.js} +1 -1
- package/scroll-OgAngNzq.js +1 -0
- package/textbox-DZRVQetR.js +1 -0
- package/{toggle-button-D8l0YB43.js → toggle-button-CFPnYlex.js} +1 -1
- package/use-tooltip-BEiQpMDa.js +1 -0
- package/utils/index.d.ts +1 -0
- package/utils/index.d.ts.map +1 -1
- package/utils/index.js +1 -1
- package/utils/scroll.d.ts +2 -0
- package/utils/scroll.d.ts.map +1 -0
- package/utils-C9NL3q0j.js +1 -0
- package/button-DGuEBUDJ.js +0 -1
- package/common/component-utils/forwardRef/index.js +0 -1
- package/common/component-utils/index.js +0 -1
- package/common/component-utils/utils/index.js +0 -1
- package/common/event-utils/index.js +0 -1
- package/common/floating-label-utils/hooks/index.js +0 -1
- package/common/notice-utils/notice-cta/index.js +0 -1
- package/common/random-id/index.js +0 -1
- package/common/tooltip-utils/constants/index.js +0 -1
- package/common/tooltip-utils/index.js +0 -1
- package/dialog-previous-button-CpuFLkQp.js +0 -1
- package/drawer-rqXAEeqd.js +0 -1
- package/ebay-dialog-base/components/animation/index.js +0 -1
- package/ebay-dialog-base/components/dialog-footer/index.js +0 -1
- package/ebay-dialog-base/components/dialog-header/index.js +0 -1
- package/ebay-drawer-dialog/components/drawer.d.ts.map +0 -1
- package/ebay-drawer-dialog/index.d.ts +0 -2
- package/ebay-drawer-dialog/index.d.ts.map +0 -1
- package/ebay-drawer-dialog/index.js +0 -1
- package/ebay-fake-menu/menu-item/index.js +0 -1
- package/ebay-fake-menu-button/menu-button/index.js +0 -1
- package/ebay-fullscreen-dialog/fullscreen-dialog.d.ts.map +0 -1
- package/ebay-fullscreen-dialog/index.d.ts +0 -2
- package/ebay-fullscreen-dialog/index.d.ts.map +0 -1
- package/ebay-fullscreen-dialog/index.js +0 -1
- package/ebay-radio/radio/index.js +0 -1
- package/icon-TuxfQndO.js +0 -1
- package/icon-button-Cwaj-eT9.js +0 -1
- package/menu-CV-INYLM.js +0 -1
- package/menu-_LzP6yje.js +0 -1
- package/menu-button-BZ66jxvI.js +0 -1
- package/notice-footer-Cw1DMzoB.js +0 -1
- package/textbox-dUhinDwj.js +0 -1
- package/use-tooltip-CL3_zAeg.js +0 -1
package/ebay-menu/types.d.ts
CHANGED
|
@@ -24,7 +24,8 @@ export type EbayMenuProps = ContainerDivProps & ContainerSpanProps & {
|
|
|
24
24
|
onKeyDown?: EbayMenuKeyDownEventHandler;
|
|
25
25
|
onChange?: EbayMenuChangeEventHandler;
|
|
26
26
|
onSelect?: EbayMenuSelectEventHandler;
|
|
27
|
-
forwardedRef?: Ref<HTMLDivElement>;
|
|
27
|
+
forwardedRef?: Ref<HTMLDivElement | HTMLSpanElement>;
|
|
28
|
+
menuRef?: Ref<HTMLDivElement>;
|
|
28
29
|
};
|
|
29
30
|
export {};
|
|
30
31
|
//# sourceMappingURL=types.d.ts.map
|
package/ebay-menu/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-menu/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAExF,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,UAAU,CAAA;AAC/C,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,WAAW,GAAG,MAAM,CAAA;AAE/D,KAAK,iBAAiB,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,UAAU,GAAG,UAAU,CAAC,CAAA;AAC3F,KAAK,kBAAkB,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,UAAU,GAAG,UAAU,CAAC,CAAA;AAC7F,KAAK,WAAW,GAAG;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;CACrB,CAAA;AACD,KAAK,WAAW,GAAG,WAAW,GAAG;IAC7B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,EAAE,MAAM,EAAE,CAAC;CAC3B,CAAA;AACD,MAAM,MAAM,2BAA2B,GAAG,wBAAwB,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAAC,CAAA;AAC1G,MAAM,MAAM,0BAA0B,GAAG,gBAAgB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;AACnF,MAAM,MAAM,0BAA0B,GAAG,gBAAgB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;AACnF,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,kBAAkB,GAAG;IACjE,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,2BAA2B,CAAC;IACxC,QAAQ,CAAC,EAAE,0BAA0B,CAAC;IACtC,QAAQ,CAAC,EAAE,0BAA0B,CAAC;IACtC,YAAY,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-menu/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAExF,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,UAAU,CAAA;AAC/C,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,WAAW,GAAG,MAAM,CAAA;AAE/D,KAAK,iBAAiB,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,UAAU,GAAG,UAAU,CAAC,CAAA;AAC3F,KAAK,kBAAkB,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,UAAU,GAAG,UAAU,CAAC,CAAA;AAC7F,KAAK,WAAW,GAAG;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;CACrB,CAAA;AACD,KAAK,WAAW,GAAG,WAAW,GAAG;IAC7B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,EAAE,MAAM,EAAE,CAAC;CAC3B,CAAA;AACD,MAAM,MAAM,2BAA2B,GAAG,wBAAwB,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAAC,CAAA;AAC1G,MAAM,MAAM,0BAA0B,GAAG,gBAAgB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;AACnF,MAAM,MAAM,0BAA0B,GAAG,gBAAgB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;AACnF,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,kBAAkB,GAAG;IACjE,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,2BAA2B,CAAC;IACxC,QAAQ,CAAC,EAAE,0BAA0B,CAAC;IACtC,QAAQ,CAAC,EAAE,0BAA0B,CAAC;IACtC,YAAY,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,eAAe,CAAC,CAAC;IACrD,OAAO,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC,CAAA"}
|
|
@@ -44,7 +44,7 @@ Name | Type | Required | Description
|
|
|
44
44
|
`reverse` | Boolean | No | expand menu flyout to the left
|
|
45
45
|
`fixWidth` | Boolean | No | Constrain items container width to button width
|
|
46
46
|
`borderless` | Boolean | No | Whether button has borders
|
|
47
|
-
`size` | String | No | button size: `
|
|
47
|
+
`size` | String | No | button size: `small` or `large`
|
|
48
48
|
`priority` | String | No | button size: `primary`, `secondary` (default), `tertiary`, `none`
|
|
49
49
|
`checked` | Number | No | will set the corresponding index item to checked state and use the `aria-checked` attribute in markup
|
|
50
50
|
`disabled` | Boolean | No | will disable the entire dropdown (disables the ebay-button label) if set to true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../menu-button-label-D_04ZC3p.js"),t=require("../menu-DAOhKkcI.js");require("react");require("classnames");exports.EbayMenuButton=e.EbayMenuButton;exports.EbayMenuButtonLabel=e.EbayMenuButtonLabel;exports.EbayMenuButtonSeparator=e.EbayMenuButtonSeparator;exports.EbayMenuButtonItem=t.EbayMenuItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-button.d.ts","sourceRoot":"","sources":["../../src/ebay-menu-button/menu-button.tsx"],"names":[],"mappings":"AAAA,OAAc,
|
|
1
|
+
{"version":3,"file":"menu-button.d.ts","sourceRoot":"","sources":["../../src/ebay-menu-button/menu-button.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAgC,EAAE,EAAuB,MAAM,OAAO,CAAA;AAQpF,OAAO,EAAgF,eAAe,EAAE,MAAM,SAAS,CAAA;AASvH,QAAA,MAAM,cAAc,EAAE,EAAE,CAAC,eAAe,CAqJvC,CAAA;AAUD,eAAe,cAAc,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),p=require("../notice-content-9iF4T8uB.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),p=require("../notice-content-9iF4T8uB.js"),s=require("../notice-content-C0ZStfuX.js"),l=require("../icon-D4RDqpD4.js");require("classnames");const i=require("../notice-cta-FAd6zCdx.js"),u=({id:a,status:e="general",children:n,a11yDismissText:o,"aria-label":E,onDismiss:b=()=>{},...g})=>{const[N,m]=t.useState(!1),r=t.Children.toArray(n).find(c=>c.type===s.EbayNoticeContent);if(!r)throw new Error("EbayPageNotice: Please use a EbayNoticeContent that defines the content of the notice");const d=c=>{m(!0),b(c)};return N?null:t.createElement("section",{...g,"aria-labelledby":a||`${e}-status`,className:`page-notice ${e!=="general"?`page-notice--${e}`:""}`,role:"region"},e!=="general"?t.createElement("div",{className:"page-notice__header",id:a||`${e}-status`},t.createElement(l.EbayIcon,{name:`${e}Filled16`,a11yText:E,a11yVariant:"label"})):null,t.createElement(p.NoticeContent,{...r.props,type:"page"}),n,o&&t.createElement(y,null,t.createElement("button",{"aria-label":o,className:"fake-link page-notice__dismiss",onClick:d},t.createElement(l.EbayIcon,{name:"close16"}))))},C=({className:a,as:e,children:n,...o})=>t.createElement(i.NoticeTitle,{...o,className:a,as:e,type:"page"},n),y=({className:a,children:e})=>t.createElement(i.NoticeFooter,{className:a,type:"page"},e),P=({className:a,children:e})=>t.createElement(i.NoticeCTA,{className:a,type:"page"},e);exports.EbayNoticeContent=s.EbayNoticeContent;exports.EbayPageNotice=u;exports.EbayPageNoticeCTA=P;exports.EbayPageNoticeFooter=y;exports.EbayPageNoticeTitle=C;
|
package/ebay-pagination/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),J=require("../menu-button-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),J=require("../menu-button-label-DJq794te.js"),H=require("classnames"),ee=require("../debounce-BQsYxxOL.js"),te=require("../utils-C9NL3q0j.js"),$=require("../icon-D4RDqpD4.js"),ne=require("../forwardRef-fPwzYd82.js");require("../array.polyfill.flat-5BAolFdk.js");const re=1,T=9,K=4,j=2,oe=T-j;function ie(e,n,a=e,s=null){const h=s==="show-last"||s==="overflow"&&e>T,l=s==="overflow"&&e>T,c=Math.min(a,e),v=Math.max(0,n-Math.ceil((c-1)/2)),E=c<K?n:Math.max(0,n-Math.floor((c-1)/2)),d=(h?E:v)+c,f=d>=e,M=n<=K,I=(b,i)=>{const r=O(e,b,i);return c>2?(r[i-2]="dots",r[i-1]="hidden",r[e-1]="visible"):c>1&&(r[i-1]="dots"),r},g=(b,i)=>{if(M)return I(0,i);if(f){const w=O(e,e-oe,e);return w[0]="visible",w[1]="dots",w}const r=O(e,n-j,n+j+1);return r[0]="visible",r[1]=M?"visible":"dots",r[e-2]="dots",r[e-1]="visible",r};return f&&e<=T?O(e,e-c):h?l?g(E,d):I(E,d):O(e,v,d)}function ae(e,n,a,s="show-range"){if(e===-1)return[];const h=s==="overflow"?T:se(Math.min(a,n),re,T);return ie(a,e-1,h,s)}function se(e,n,a){return e<=n?n:e>=a?a:e}function O(e,n,a){return Array(e).fill("hidden").fill("visible",n,a)}function ce(e){if(!e)return 0;e.style.width="100vw";const n=e.offsetWidth;return e.style.width=null,n}const ue=({id:e="ebay-pagination",className:n,a11yCurrentText:a="Pagination - Current Page",a11yPreviousText:s="Previous page",a11yNextText:h="Next page",variant:l="show-range",fluid:c=!1,onPrevious:v=()=>{},onNext:E=()=>{},onSelect:d=()=>{},children:f,...M})=>{const I=t.useRef(null),g=t.useRef([]);g.current=t.Children.map(f,t.createRef);const b=te.filterBy(f,({props:o})=>o.type===void 0||o.type==="page").length,i=t.useRef(0),r=t.useRef(0),w=()=>{var y,_,x,p;const o=r.current||((_=(y=g.current[0])==null?void 0:y.current)==null?void 0:_.offsetWidth);r.current=o;const m=i.current||((p=(x=g.current[1])==null?void 0:x.current)==null?void 0:p.offsetWidth);return i.current=m,m?Math.floor((ce(I.current)-o*2)/m):0},[A,B]=t.useState([]),[N,q]=t.useState(0),S=o=>{const m=o||g.current.findIndex(x=>{var p;return((p=x.current)==null?void 0:p.getAttribute("aria-current"))==="page"}),y=w(),_=ae(m,y,b,l);q(m),B(["hidden",..._])};t.useEffect(()=>{const o=ee.debounce(S,16);return S(),window.addEventListener("resize",()=>o()),()=>{window.removeEventListener("resize",()=>o())}},[f]);const W=o=>{let m=0;const y=[],_=[],x=[],p=A.indexOf("dots"),G=A.lastIndexOf("dots");return t.Children.map(f,(V,D)=>{const{type:L="page",current:Q,disabled:Y,href:P,children:U}=V.props,k=A[D]==="dots",z=`${e}-item-${D}`,X=A[D]==="hidden",Z={current:Q,disabled:Y,href:P,type:k&&L==="page"?"separator":L,children:k?t.createElement($.EbayIcon,{name:"overflowHorizontal24",focusable:!1}):U,pageIndex:L==="page"?m++:void 0,key:z,hide:X,onPrevious:v,onNext:E,onSelect:d,a11yPreviousText:s,a11yNextText:h,ref:g.current[D]};if((X||k)&&L==="page"){const C=t.createElement(J.EbayFakeMenuButtonItem,{key:z,href:P,onClick:F=>{P||F.preventDefault();const R=F.currentTarget;d(F,{value:(R==null?void 0:R.innerText)||"",index:m}),S(Number(R==null?void 0:R.innerText))}},U);p===G&&x.push(C),N-2>p&&D<N&&y.push(C),N+2<G&&D>N&&_.push(C)}if(o==="page"&&k&&l==="overflow"){let C=x;return p!==G&&(C=D===2?y:_),t.createElement("li",{key:z},t.createElement("span",{className:"pagination__item",role:"separator"},t.createElement(J.EbayMenuButton,{a11yText:"Menu",borderless:!0,variant:"overflow",noToggleIcon:!0},C)))}return o===L?t.cloneElement(V,Z):null})},u=`${e}-pagination-heading`;return t.createElement("nav",{...M,role:"navigation",className:H(n,"pagination",{"pagination--fluid":c}),"aria-labelledby":u,ref:I},t.createElement("span",{"aria-live":"polite",role:"status"},t.createElement("h2",{className:"clipped",id:u},a)),W("previous"),t.createElement("ol",{className:"pagination__items"},W("page")),W("next"))},le=({pageIndex:e=0,key:n,current:a,disabled:s,type:h="page",href:l,hide:c,children:v,a11yPreviousText:E="Previous page",a11yNextText:d="Next page",onSelect:f,onNext:M,onPrevious:I,className:g,style:b,forwardedRef:i,...r})=>{const w=u=>{var o;f(u,{value:((o=u.currentTarget)==null?void 0:o.innerText)||"",index:e})},A=u=>{u.currentTarget.getAttribute("aria-disabled")||M(u)},B=u=>{u.currentTarget.getAttribute("aria-disabled")||I(u)},N=!!l,q=N?"a":"button",S=N?"icon-link":"icon-btn",W={...b,minWidth:"40px"};switch(h){case"previous":return t.createElement(q,{...r,ref:i,"aria-disabled":s?"true":void 0,"aria-label":E,href:s?void 0:l,className:H(S,"pagination__previous"),style:W,onClick:B},t.createElement($.EbayIcon,{name:"arrowLeft16"}));case"next":return t.createElement(q,{...r,ref:i,"aria-disabled":s?"true":void 0,"aria-label":d,href:s?void 0:l,className:H(S,"pagination__next"),style:W,onClick:A},t.createElement($.EbayIcon,{name:"arrowRight16"}));case"separator":return t.createElement("span",{key:n,style:b,className:"pagination__item",ref:i,role:"separator"},v);default:return t.createElement("li",{...r,hidden:c},t.createElement(q,{ref:i,"aria-current":a?"page":void 0,href:l,className:"pagination__item",style:b,key:n,onClick:w},v))}},de=ne.withForwardRef(le);exports.EbayPagination=ue;exports.EbayPaginationItem=de;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),t=require("classnames"),c=require("../dialog-previous-button-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),t=require("classnames"),c=require("../dialog-previous-button-B-fysL3O.js");require("../icon-button-Bjjvld0a.js");const e="panel-dialog",d=({open:i,animated:a,position:s="start",onClose:o=()=>{},className:l,...n})=>r.createElement(c.DialogBaseWithState,{...n,"aria-label":"Infotip",classPrefix:e,buttonPosition:"right",onCloseBtnClick:o,onBackgroundClick:o,animated:a,className:t(l,{[`${e}--mask-fade-slow`]:a}),windowClass:t(`${e}__window--slide`,{[`${e}__window--end`]:s==="end"}),open:i});exports.EbayPanelDialog=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../progress-spinner-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../progress-spinner-CF3qoWE3.js");exports.EbayProgressSpinner=e.EbayProgressSpinner;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),g=require("classnames"),E=require("../icon-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),g=require("classnames"),E=require("../icon-D4RDqpD4.js"),d=({direction:t="row",defaultState:r="active",children:s,className:o,...i})=>{const a=e.Children.toArray(s),c=f(a,r);return e.createElement("div",{...i,className:g(o,"progress-stepper",{"progress-stepper--vertical":t==="column"})},e.createElement("div",{role:"list",className:"progress-stepper__items"},a.map((p,n)=>e.createElement(e.Fragment,{key:n},n>0&&e.createElement("hr",{className:"progress-stepper__separator",role:"presentation"}),e.cloneElement(p,{state:_(n,c),...p.props,current:c===n})))))};function f(t,r){const s=t.findIndex(o=>o.props.current);if(s===-1)switch(r){case"complete":return t.length-1;case"upcoming":return 0}return s}function _(t,r){if(t<=r)return"complete";if(t>r)return"upcoming"}const b={complete:"stepperConfirmation24",attention:"stepperAttention24",upcoming:"stepperUpcoming24",active:"stepperConfirmation24"},v=({current:t,state:r="complete",children:s,className:o,...i})=>{const a=e.Children.toArray(s),c=a.find(l=>l.type===m),p=a.filter(l=>l.type!==m),n=g(o,"progress-stepper__item",{"progress-stepper__item--attention":r==="attention"}),u=b[r],y=t?"current":r;return e.createElement("div",{...i,className:n,role:"listitem","aria-current":t?"step":void 0},e.createElement("div",{className:"progress-stepper__icon"},u&&e.createElement(E.EbayIcon,{name:u,"aria-label":y})),e.createElement("div",{className:"progress-stepper__text"},c,p))},m=({as:t="h4",children:r})=>e.createElement(t,{},r);exports.EbayProgressStep=v;exports.EbayProgressStepper=d;exports.EbayProgressTitle=m;
|
package/ebay-radio/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),N=require("classnames"),c=require("../icon-D4RDqpD4.js"),v=require("../label-CnrpYJ-g.js"),I=({size:r="default",checked:s,defaultChecked:d,className:i,style:m,id:o,onChange:u=()=>{},onFocus:h=()=>{},onKeyDown:y=()=>{},children:l,...E})=>{const g=a=>{var n;return u(a,{value:(n=a.target)==null?void 0:n.value})},b=a=>{var n;return h(a,{value:(n=a.target)==null?void 0:n.value})},_=a=>{const n=a.target;return y(a,{value:n==null?void 0:n.value})},k=N("radio",i,{"radio--large":r==="large"}),p=r==="large"?e.createElement(c.EbayIcon,{name:"radioChecked24",className:"radio__checked"}):e.createElement(c.EbayIcon,{name:"radioChecked18",className:"radio__checked"}),C=r==="large"?e.createElement(c.EbayIcon,{name:"radioUnchecked24",className:"radio__unchecked"}):e.createElement(c.EbayIcon,{name:"radioUnchecked18",className:"radio__unchecked"}),t=e.Children.toArray(l).find(a=>a.type===v.Label);return e.createElement(e.Fragment,null,e.createElement("span",{className:k,style:{...m,alignItems:"center"}},e.createElement("input",{...E,id:o,className:"radio__control",type:"radio",defaultChecked:d,checked:s,onChange:g,onFocus:b,onKeyDown:_}),e.createElement("span",{className:"radio__icon",hidden:!0},p,C)),t?e.cloneElement(t,{...t.props,position:"end",htmlFor:o}):l)};exports.EbayRadio=I;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),A=require("classnames"),m=require("../notice-content-C0ZStfuX.js"),I=require("../notice-content-9iF4T8uB.js"),b=require("../icon-D4RDqpD4.js"),F=require("../forwardRef-fPwzYd82.js"),s=require("../notice-cta-FAd6zCdx.js"),_=({status:t="general",children:n,className:a,"aria-label":o,"aria-roledescription":u="Notice",a11yDismissText:d,educationIcon:S,iconClass:f,prominent:C,onDismiss:h=()=>{},...p})=>{const[g,q]=e.useState(!1),[E,T]=e.useState("");e.useEffect(()=>{T(F.randomId())},[]);const y=e.Children.toArray(n).find(({type:l})=>l===m.EbayNoticeContent),c=t!=="general"&&t!=="none",r=t==="education";let i=null;if(c&&(r?i=S||"lightbulb24":i=`${t}Filled16`),!y)throw new Error("EbaySectionNotice: Please use a EbayNoticeContent that defines the content of the notice");const $=l=>{q(!0),h(l)};return g?null:e.createElement("section",{...p,className:A(a,"section-notice",{[`section-notice--${t}`]:c,"section-notice--education":r&&C,"section-notice--large-icon":r}),role:"region","aria-label":c?null:o,"aria-labelledby":c?`section-notice-${t}-${E}`:null,"aria-roledescription":u},i&&e.createElement("div",{className:"section-notice__header",id:`section-notice-${t}-${E}`},e.createElement(b.EbayIcon,{className:f,name:i,a11yText:o,a11yVariant:"label"})),e.createElement(I.NoticeContent,{...y.props,type:"section"}),n,d&&e.createElement(N,null,e.createElement("button",{"aria-label":d,className:"fake-link page-notice__dismiss",onClick:$},e.createElement(b.EbayIcon,{name:"close16"}))))},k=({className:t,as:n,children:a,...o})=>e.createElement(s.NoticeTitle,{...o,className:t,as:n,type:"section"},a),N=({className:t,children:n})=>e.createElement(s.NoticeFooter,{className:t,type:"section"},n),w=({className:t,children:n})=>e.createElement(s.NoticeCTA,{className:t,type:"section"},n);exports.EbayNoticeContent=m.EbayNoticeContent;exports.EbaySectionNotice=_;exports.EbaySectionNoticeCTA=w;exports.EbaySectionNoticeFooter=N;exports.EbaySectionNoticeTitle=k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),l=require("classnames"),s=require("../utils-C9NL3q0j.js"),v=({ctaText:e,href:t,className:n,...o})=>e?i.createElement("a",{...o,className:l("section-title__cta",n),href:t},e):null,T=({href:e,ctaText:t,className:n,children:o,...u})=>{const E=l(n,"section-title"),f=s.findComponent(o,c),b=s.findComponent(o,a),_=s.findComponent(o,r),S=s.findComponent(o,m);return i.createElement("div",{...u,className:E},i.createElement("div",{className:"section-title__title-container"},f||i.createElement(c,null,o),b),e&&i.createElement(v,{href:e,ctaText:t})||_||S)},c=({children:e,className:t,...n})=>i.createElement("h2",{...n,className:l(t,"section-title__title")},e),a=({children:e,className:t,...n})=>i.createElement("span",{...n,className:l(t,"section-title__subtitle")},e),r=({className:e,children:t,...n})=>i.createElement("div",{...n,className:l(e,"section-title__info")},t),m=({children:e,className:t,...n})=>i.createElement("div",{...n,className:l(t,"section-title__overflow")},e);exports.EbaySectionTitle=T;exports.EbaySectionTitleInfo=r;exports.EbaySectionTitleOverflow=m;exports.EbaySectionTitleSubtitle=a;exports.EbaySectionTitleTitle=c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),b=require("classnames"),d=require("../
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),b=require("classnames"),d=require("../utils-C9NL3q0j.js"),i=require("../icon-D4RDqpD4.js"),E=({selected:o,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":o||void 0,...a},c?l():n))},x=({size:o,className:n,onChange:u=()=>{},children:a,...c})=>{const l=d.filterByType(a,E),[r,p]=e.useState(l.findIndex(t=>t.props.selected)||0),g=(t,s,m)=>{p(s),u(t,{index:s,value:m})};return e.createElement("div",{className:b("segmented-buttons",o&&`segmented-buttons--${o}`,n),...c},e.createElement("ul",null,l.map((t,s)=>{const{value:m,...y}=t.props;return e.cloneElement(t,{...y,onClick:S=>g(S,s,m),selected:s===r})})))};exports.EbaySegmentedButton=E;exports.EbaySegmentedButtons=x;
|
package/ebay-select/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),R=require("classnames"),j=require("../icon-D4RDqpD4.js"),x=require("../forwardRef-fPwzYd82.js"),P=require("../utils-C9NL3q0j.js"),T=require("../hooks-5qES90Sx.js"),h=({children:e,...t})=>n.createElement("option",{...t},e),v=e=>typeof e<"u",D=({value:e,defaultValue:t,className:s,borderless:o,name:p,disabled:r,onChange:a=()=>{},onBlur:f=()=>{},onFocus:d=()=>{},floatingLabel:m,forwardedRef:y,children:E,inputSize:l,invalid:b,...i})=>{const c=b||i["aria-invalid"]==="true",[F,w]=n.useState(t),{label:C,Container:G,onBlur:S,onFocus:N,ref:O}=T.useFloatingLabel({ref:y,inputId:i.id,className:s,disabled:r,label:m,inputValue:e,inputSize:l,invalid:c}),q=u=>{const{value:g,selectedIndex:L}=u.target;v(e)||w(g),a(u,{index:L,selected:[g]})},B=u=>{f(u),S()},k=u=>{d(u),N()},I=R("select",s,{"select--borderless":o,"select--large":l==="large"});return n.createElement(G,null,C,n.createElement("span",{className:I},n.createElement("select",{...i,name:p,value:v(e)?e:F,disabled:r,onChange:q,onBlur:B,onFocus:k,ref:O},A(E)),n.createElement(j.EbayIcon,{name:"chevronDown12",height:"8",width:"8"})))},M=x.withForwardRef(D);function $(e){const t={};return e.forEach(s=>{const o=s.props;o.optgroup&&(Object.prototype.hasOwnProperty.call(t,o.optgroup)||(t[o.optgroup]=[]),t[o.optgroup].push(o))}),t}function A(e){const t=[],s=[];let o={},p=!1;const r=P.filterByType(e,h).map(a=>n.cloneElement(a,{}));if(r){o=$(r);let a;return r.forEach((f,d)=>{const{value:m,optionClassName:y,children:E,optgroup:l}=f.props;if(p=l&&t.indexOf(l)===-1,p){a=l;const i=o[a].map(c=>n.createElement(h,{key:`opt-${c.value}`,value:c.value,className:c.optionClassName},c.children));s.push(n.createElement("optgroup",{key:d,label:l},i)),t.push(l)}else l||s.push(n.createElement(h,{key:d,value:m,className:y},E))}),s}}exports.EbaySelect=M;exports.EbaySelectOption=h;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("classnames"),e=require("react"),k=require("../dialog-previous-button-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("classnames"),e=require("react"),k=require("../dialog-previous-button-B-fysL3O.js");require("../icon-button-Bjjvld0a.js");const f=({className:r,children:c,...l})=>e.createElement("button",{className:D(r,"fake-link"),...l},c),L=6e3,N=({className:r,onOpen:c=()=>{},onClose:l=()=>{},layout:S,open:i,children:h,onAction:u,...T})=>{const n=e.useRef(new Set),b=e.useRef(),[C,m]=e.useState(i),g=e.Children.toArray(h),o=g.find(t=>t.type===f),p=g.filter(t=>t.type!==f),s=()=>{clearTimeout(b.current)},d=()=>{m(!1),l()},E=()=>{n.current.size===0&&(s(),b.current=setTimeout(()=>{d()},L))},M=()=>{m(!0),c(),E()},q=()=>{s(),n.current.add("focus")},w=()=>{n.current.delete("focus"),E()},R=()=>{s(),n.current.add("mouseEnter")},v=()=>{n.current.delete("mouseEnter"),E()},B=t=>{var a,y;s(),u==null||u(t),(y=(a=o==null?void 0:o.props)==null?void 0:a.onClick)==null||y.call(a,t),d()};return e.useEffect(()=>()=>{s()},[]),e.useEffect(()=>{i?M():d()},[i]),e.createElement(k.DialogBaseWithState,{...T,open:C,isModal:!1,baseEl:"aside",classPrefix:"snackbar-dialog",transitionElement:"root",a11yCloseText:"",buttonPosition:"hidden",className:D(r,"snackbar-dialog--transition"),windowClass:S==="column"&&"snackbar-dialog__window--column",onFocus:q,onBlur:w,onMouseEnter:R,onMouseLeave:v},p,o?e.createElement(k.EbayDialogActions,null,e.cloneElement(o,{onClick:B})):null)};exports.EbaySnackbarDialog=N;exports.EbaySnackbarDialogAction=f;
|
|
@@ -34,7 +34,7 @@ Name | Type | Stateful | Required | Description | Data
|
|
|
34
34
|
--- |---------| -- | --- | --- | ---
|
|
35
35
|
`a11yMenuText` | String | No | Yes | aria label for menu button part
|
|
36
36
|
`href` | String | No | No | url for link behaviour (switches to anchor tag)
|
|
37
|
-
`size` | String | No | No | button size: `
|
|
37
|
+
`size` | String | No | No | button size: `small` or `large`
|
|
38
38
|
`priority` | String | No | No | `primary`, `secondary` (default), `tertiary`, `none`
|
|
39
39
|
`bodyState` | String | No | No | `loading` adds progress spinner, when user interacts with button, `reset` should be called to reset `aria-live` state, default is `none`
|
|
40
40
|
`a11yButtonLoadingText` | String | No | No | `aria-label` for button when `bodyState` is `loading`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),i=require("../utils-C9NL3q0j.js"),B=require("../button-6S4U-4HH.js"),o=require("../menu-button-label-D_04ZC3p.js"),q=require("../menu-DAOhKkcI.js");require("classnames");const f=({a11yMenuText:u,children:r,type:s,bodyState:t,a11yButtonLoadingText:l,onCollapse:c,onExpand:p,onSelect:b=()=>{},onChange:y=()=>{},ref:v,...e})=>{const a=[q.EbayMenuItem,o.EbayMenuButtonSeparator],m=i.filterBy(r,E=>!a.includes(E.type)),d=i.filterByType(r,a);return n.createElement("span",{className:"split-button"},n.createElement(B.EbayButton,{"aria-label":t==="loading"?l:void 0,...e,split:"start",bodyState:t==="expand"?void 0:t},m),n.createElement(o.EbayMenuButton,{priority:e.priority,disabled:e.disabled,transparent:e.transparent,size:e.size,type:s,split:"end",reverse:!0,a11yText:u,onCollapse:c,onExpand:p,onSelect:b,onChange:y},d))};exports.EbaySplitButton=f;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),c=require("classnames"),i=require("../icon-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),c=require("classnames"),i=require("../icon-D4RDqpD4.js"),o=require("../range-DOsPN0h5.js"),l=o.range(1,5),m=({value:e,a11yText:t,className:r,...s})=>a.createElement("div",{role:"img","aria-label":t,className:c("star-rating",r),"data-stars":e,...s},l.map(n=>a.createElement(i.EbayIcon,{key:n,className:"star-rating__icon",name:"starDynamic"})));exports.EbayStarRating=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),u=require("classnames"),v=require("../icon-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),u=require("classnames"),v=require("../icon-D4RDqpD4.js"),y=require("../range-DOsPN0h5.js"),R=require("../forwardRef-fPwzYd82.js"),b=y.range(1,5),c=n=>{let a=parseInt(n,0)||0;return a>5&&(a=0),a},C=({value:n=0,a11yText:a,className:m,a11yStarText:l=[],disabled:s,onChange:g=()=>{},onFocus:d=()=>{},onKeyDown:f=()=>{},name:_,...p})=>{const E=R.useRandomId(),N=_||`star-rating-${E}`,[i,o]=t.useState(c(n));t.useEffect(()=>{o(c(n))},[n]);const h=e=>r=>{s||(o(c(e)),f(r,{value:e}))},k=e=>r=>{s||(o(c(e)),g(r,{value:e}))},q=e=>r=>{s||(o(c(e)),d(r,{value:e}))};return t.createElement("div",{role:a&&"radiogroup","aria-label":a,className:u("star-rating-select",m),...p},b.map(e=>t.createElement("span",{className:"star-rating-select__radio",key:e},t.createElement("input",{"aria-label":l==null?void 0:l[e-1],className:u("star-rating-select__control",{"star-rating-select__control--filled":e<=i}),type:"radio",name:N,value:e,disabled:s,defaultChecked:i===e,onClick:k(e),onFocus:q(e),onKeyDown:h(e)}),t.createElement("span",{className:"star-rating-select__radio-icon"},t.createElement(v.EbayIcon,{className:"star-rating__icon",name:"starDynamic"})))))};exports.EbayStarRatingSelect=C;
|