@ebay/ui-core-react 7.2.0 → 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 +19 -10
- package/button-CbntI39l.js +1 -0
- package/{calendar-CPKqwJVQ.js → calendar-CHO7Qep-.js} +1 -1
- package/common/__mocks__/random-id.d.ts +3 -0
- package/common/__mocks__/random-id.d.ts.map +1 -0
- package/common/component-utils/forwardRef.js +1 -0
- package/common/component-utils/utils.js +1 -0
- package/common/component-utils.js +1 -0
- package/common/event-utils/index.d.ts +2 -2
- package/common/event-utils/index.d.ts.map +1 -1
- package/common/event-utils.js +1 -0
- package/common/floating-label-utils/hooks.js +1 -0
- package/common/notice-utils/notice-cta.js +1 -0
- package/common/random-id.d.ts +1 -0
- package/common/random-id.d.ts.map +1 -1
- package/common/random-id.js +1 -0
- package/common/tooltip-utils/constants.js +1 -0
- package/common/tooltip-utils.js +1 -0
- package/dialog-previous-button-BuuaWh0J.js +1 -0
- package/drawer-Bq-TDCjm.js +1 -0
- package/ebay-alert-dialog.js +1 -1
- package/ebay-breadcrumbs.js +1 -1
- package/ebay-button.js +1 -1
- package/ebay-calendar.js +1 -1
- package/ebay-carousel.js +1 -1
- package/ebay-checkbox.js +1 -1
- package/ebay-confirm-dialog.js +1 -1
- package/ebay-cta-button.js +1 -1
- package/ebay-date-textbox.js +1 -1
- package/ebay-dialog-base/components/animation.js +1 -0
- package/ebay-dialog-base/components/dialog-footer.js +1 -0
- package/ebay-dialog-base/components/dialog-header.js +1 -0
- package/ebay-dialog-base/index.d.ts +1 -0
- package/ebay-dialog-base/index.d.ts.map +1 -1
- package/ebay-dialog-base.js +1 -1
- package/ebay-drawer-dialog.js +1 -1
- package/ebay-eek.js +1 -1
- package/ebay-fake-menu/menu-item.js +1 -0
- package/ebay-fake-menu-button/index.d.ts +1 -1
- package/ebay-fake-menu-button/index.d.ts.map +1 -1
- package/ebay-fake-menu-button/menu-button.js +1 -0
- package/ebay-fake-menu-button.js +1 -1
- package/ebay-fake-menu.js +1 -1
- package/ebay-fake-tabs.js +1 -1
- package/ebay-fullscreen-dialog.js +1 -1
- package/ebay-icon-button.js +1 -1
- package/ebay-icon.js +1 -1
- package/ebay-infotip.js +1 -1
- package/ebay-inline-notice.js +1 -1
- package/ebay-lightbox-dialog.js +1 -1
- package/ebay-listbox-button.js +2 -2
- package/ebay-menu-button.js +1 -1
- package/ebay-menu.js +1 -1
- package/ebay-page-notice.js +1 -1
- package/ebay-pagination.js +1 -1
- package/ebay-panel-dialog.js +1 -1
- package/ebay-progress-spinner.js +1 -1
- package/ebay-progress-stepper.js +1 -1
- package/ebay-radio/radio.js +1 -0
- package/ebay-radio.js +1 -1
- package/ebay-section-notice/index.d.ts +1 -0
- package/ebay-section-notice/index.d.ts.map +1 -1
- package/ebay-section-notice/section-notice-cta.d.ts +8 -0
- package/ebay-section-notice/section-notice-cta.d.ts.map +1 -0
- package/ebay-section-notice.js +1 -1
- package/ebay-section-title.js +1 -1
- package/ebay-segmented-buttons.js +1 -1
- package/ebay-select.js +1 -1
- package/ebay-snackbar-dialog.js +1 -1
- package/ebay-split-button.js +1 -1
- package/ebay-star-rating-select/star-rating-select.d.ts.map +1 -1
- package/ebay-star-rating-select.js +1 -1
- package/ebay-star-rating.js +1 -1
- package/ebay-tabs.js +1 -1
- package/ebay-textbox/index.d.ts +1 -0
- package/ebay-textbox/index.d.ts.map +1 -1
- package/ebay-textbox.js +1 -1
- package/ebay-toast-dialog.js +1 -1
- package/ebay-tooltip/index.d.ts +2 -1
- package/ebay-tooltip/index.d.ts.map +1 -1
- package/ebay-tooltip.js +1 -1
- package/ebay-tourtip.js +1 -1
- package/ebay-video.js +1 -1
- package/events/README.md +13 -0
- package/events/index.d.ts +5 -0
- package/events/index.d.ts.map +1 -0
- package/events.js +1 -0
- package/icon-DEn4Lfbd.js +1 -0
- package/icon-button-BDXS3wjO.js +1 -0
- package/menu-DClVntri.js +1 -0
- package/menu-_LzP6yje.js +1 -0
- package/menu-button-0pEi9ehP.js +1 -0
- package/package.json +72 -1
- package/{progress-spinner-CDgxI8R_.js → progress-spinner-DoPMRkS9.js} +1 -1
- package/textbox-PCHsZ_Dx.js +1 -0
- package/use-roving-index-DoAVBgsp.js +1 -0
- package/use-tooltip-DasQr8Xw.js +1 -0
- package/utils/README.md +15 -0
- package/utils/index.d.ts +5 -0
- package/utils/index.d.ts.map +1 -0
- package/utils.js +1 -0
- package/button-o4ao46WM.js +0 -1
- package/common/component-utils/usePrevious.d.ts +0 -2
- package/common/component-utils/usePrevious.d.ts.map +0 -1
- package/dialog-previous-button-7ePoYWyj.js +0 -1
- package/drawer-BxxlJwkZ.js +0 -1
- package/hooks-Ctier7Yv.js +0 -1
- package/icon-DK6eEQD8.js +0 -1
- package/icon-button-BB6GFLm7.js +0 -1
- package/index-DbjwTbDP.js +0 -1
- package/menu-DZU8jEPV.js +0 -1
- package/menu-button-label-BcgasGA4.js +0 -1
- package/menu-item-DBi1NcrM.js +0 -1
- package/textbox-WnB-9F4y.js +0 -1
- package/use-tooltip-BavqG36Z.js +0 -1
- package/utils-C9NL3q0j.js +0 -1
package/ebay-pagination.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-0pEi9ehP.js"),H=require("classnames"),ee=require("./debounce-BQsYxxOL.js"),te=require("./common/component-utils/utils.js"),U=require("./icon-DEn4Lfbd.js"),ne=require("./common/component-utils/forwardRef.js");require("./array.polyfill.flat-5BAolFdk.js");const re=1,T=9,K=4,$=2,oe=T-$;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)),m=(h?E:v)+c,d=m>=e,D=n<=K,I=(b,i)=>{const r=k(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(D)return I(0,i);if(d){const _=k(e,e-oe,e);return _[0]="visible",_[1]="dots",_}const r=k(e,n-$,n+$+1);return r[0]="visible",r[1]=D?"visible":"dots",r[e-2]="dots",r[e-1]="visible",r};return d&&e<=T?k(e,e-c):h?l?g(E,m):I(E,m):k(e,v,m)}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 k(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:m=()=>{},children:d,...D})=>{const I=t.useRef(null),g=t.useRef([]);g.current=t.Children.map(d,t.createRef);const b=te.filterBy(d,({props:o})=>o.type===void 0||o.type==="page").length,i=t.useRef(0),r=t.useRef(0),_=()=>{var y,N,x,p;const o=r.current||((N=(y=g.current[0])==null?void 0:y.current)==null?void 0:N.offsetWidth);r.current=o;const f=i.current||((p=(x=g.current[1])==null?void 0:x.current)==null?void 0:p.offsetWidth);return i.current=f,f?Math.floor((ce(I.current)-o*2)/f):0},[A,L]=t.useState([]),[w,q]=t.useState(0),S=o=>{const f=o||g.current.findIndex(x=>{var p;return((p=x.current)==null?void 0:p.getAttribute("aria-current"))==="page"}),y=_(),N=ae(f,y,b,l);q(f),L(["hidden",...N])};t.useEffect(()=>{const o=ee.debounce(S,16);return S(),window.addEventListener("resize",()=>o()),()=>{window.removeEventListener("resize",()=>o())}},[d]);const W=o=>{let f=0;const y=[],N=[],x=[],p=A.indexOf("dots"),F=A.lastIndexOf("dots");return t.Children.map(d,(j,M)=>{const{type:O="page",current:Q,disabled:Y,href:G,children:V}=j.props,B=A[M]==="dots",P=`${e}-item-${M}`,X=A[M]==="hidden",Z={current:Q,disabled:Y,href:G,type:B&&O==="page"?"separator":O,children:B?t.createElement(U.EbayIcon,{name:"overflowHorizontal24",focusable:!1}):V,pageIndex:O==="page"?f++:void 0,key:P,hide:X,onPrevious:v,onNext:E,onSelect:m,a11yPreviousText:s,a11yNextText:h,ref:g.current[M]};if((X||B)&&O==="page"){const C=t.createElement(J.EbayFakeMenuButtonItem,{key:P,href:G,onClick:z=>{G||z.preventDefault();const R=z.currentTarget;m(z,{value:(R==null?void 0:R.innerText)||"",index:f}),S(Number(R==null?void 0:R.innerText))}},V);p===F&&x.push(C),w-2>p&&M<w&&y.push(C),w+2<F&&M>w&&N.push(C)}if(o==="page"&&B&&l==="overflow"){let C=x;return p!==F&&(C=M===2?y:N),t.createElement("li",{key:P},t.createElement("span",{className:"pagination__item",role:"separator"},t.createElement(J.EbayMenuButton,{a11yText:"Menu",borderless:!0,variant:"overflow",noToggleIcon:!0},C)))}return o===O?t.cloneElement(j,Z):null})},u=`${e}-pagination-heading`;return t.createElement("nav",{...D,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:m="Next page",onSelect:d,onNext:D,onPrevious:I,className:g,style:b,forwardedRef:i,...r})=>{const _=u=>{var o;d(u,{value:((o=u.currentTarget)==null?void 0:o.innerText)||"",index:e})},A=u=>{u.currentTarget.getAttribute("aria-disabled")||D(u)},L=u=>{u.currentTarget.getAttribute("aria-disabled")||I(u)},w=!!l,q=w?"a":"button",S=w?"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:L},t.createElement(U.EbayIcon,{name:"arrowLeft16"}));case"next":return t.createElement(q,{...r,ref:i,"aria-disabled":s?"true":void 0,"aria-label":m,href:s?void 0:l,className:H(S,"pagination__next"),style:W,onClick:A},t.createElement(U.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:_},v))}},me=ne.withForwardRef(le);exports.EbayPagination=ue;exports.EbayPaginationItem=me;
|
package/ebay-panel-dialog.js
CHANGED
|
@@ -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-BuuaWh0J.js");require("./icon-button-BDXS3wjO.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;
|
package/ebay-progress-spinner.js
CHANGED
|
@@ -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-DoPMRkS9.js");exports.EbayProgressSpinner=e.EbayProgressSpinner;
|
package/ebay-progress-stepper.js
CHANGED
|
@@ -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-DEn4Lfbd.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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react"),N=require("classnames"),c=require("../icon-DEn4Lfbd.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 _=a=>{var n;return u(a,{value:(n=a.target)==null?void 0:n.value})},g=a=>{var n;return h(a,{value:(n=a.target)==null?void 0:n.value})},k=a=>{const n=a.target;return y(a,{value:n==null?void 0:n.value})},b=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:b,style:{...m,alignItems:"center"}},e.createElement("input",{...E,id:o,className:"radio__control",type:"radio",defaultChecked:d,checked:s,onChange:_,onFocus:g,onKeyDown:k}),e.createElement("span",{className:"radio__icon",hidden:!0},p,C)),t?e.cloneElement(t,{...t.props,position:"end",htmlFor:o}):l)};module.exports=I;
|
package/ebay-radio.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("./ebay-radio/radio.js");exports.EbayRadio=e;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as EbaySectionNotice, type SectionNoticeStatus, type Props as EbaySectionNoticeProps } from './section-notice';
|
|
2
2
|
export { default as EbaySectionNoticeTitle } from './section-notice-title';
|
|
3
3
|
export { default as EbaySectionNoticeFooter } from './section-notice-footer';
|
|
4
|
+
export { default as EbaySectionNoticeCTA } from './section-notice-cta';
|
|
4
5
|
export { EbayNoticeContent } from '../ebay-notice-base/components/ebay-notice-content';
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-section-notice/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,OAAO,IAAI,iBAAiB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,KAAK,IAAI,sBAAsB,EACvC,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-section-notice/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,OAAO,IAAI,iBAAiB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,KAAK,IAAI,sBAAsB,EACvC,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAC5E,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section-notice-cta.d.ts","sourceRoot":"","sources":["../../src/ebay-section-notice/section-notice-cta.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAG5C,KAAK,KAAK,GAAG;IACT,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,CAAA;AAED,QAAA,MAAM,oBAAoB,EAAE,EAAE,CAAC,KAAK,CAInC,CAAA;AAED,eAAe,oBAAoB,CAAA"}
|
package/ebay-section-notice.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),I=require("classnames"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),I=require("classnames"),y=require("./notice-content-C0ZStfuX.js"),T=require("./notice-content-9iF4T8uB.js"),E=require("./icon-DEn4Lfbd.js"),A=require("./common/random-id.js"),b=require("./notice-footer-Cw1DMzoB.js"),F=require("./common/notice-utils/notice-cta.js"),k=({status:t="general",children:n,className:a,"aria-label":o,"aria-roledescription":u="Notice",a11yDismissText:s,educationIcon:S,iconClass:C,prominent:f,onDismiss:h=()=>{},...p})=>{const[g,q]=e.useState(!1),[d,_]=e.useState("");e.useEffect(()=>{_(A.randomId())},[]);const m=e.Children.toArray(n).find(({type:l})=>l===y.EbayNoticeContent),c=t!=="general"&&t!=="none",r=t==="education";let i=null;if(c&&(r?i=S||"lightbulb24":i=`${t}Filled16`),!m)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:I(a,"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}-${d}`:null,"aria-roledescription":u},i&&e.createElement("div",{className:"section-notice__header",id:`section-notice-${t}-${d}`},e.createElement(E.EbayIcon,{className:C,name:i,a11yText:o,a11yVariant:"label"})),e.createElement(T.NoticeContent,{...m.props,type:"section"}),n,s&&e.createElement(N,null,e.createElement("button",{"aria-label":s,className:"fake-link page-notice__dismiss",onClick:$},e.createElement(E.EbayIcon,{name:"close16"}))))},v=({className:t,as:n,children:a,...o})=>e.createElement(b.NoticeTitle,{...o,className:t,as:n,type:"section"},a),N=({className:t,children:n})=>e.createElement(b.NoticeFooter,{className:t,type:"section"},n),w=({className:t,children:n})=>e.createElement(F,{className:t,type:"section"},n);exports.EbayNoticeContent=y.EbayNoticeContent;exports.EbaySectionNotice=k;exports.EbaySectionNoticeCTA=w;exports.EbaySectionNoticeFooter=N;exports.EbaySectionNoticeTitle=v;
|
package/ebay-section-title.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 o=require("react"),l=require("classnames"),s=require("./common/component-utils/utils.js"),v=({ctaText:e,href:t,className:n,...i})=>e?o.createElement("a",{...i,className:l("section-title__cta",n),href:t},e):null,T=({href:e,ctaText:t,className:n,children:i,...u})=>{const E=l(n,"section-title"),_=s.findComponent(i,c),f=s.findComponent(i,a),b=s.findComponent(i,m),S=s.findComponent(i,r);return o.createElement("div",{...u,className:E},o.createElement("div",{className:"section-title__title-container"},_||o.createElement(c,null,i),f),e&&o.createElement(v,{href:e,ctaText:t})||b||S)},c=({children:e,className:t,...n})=>o.createElement("h2",{...n,className:l(t,"section-title__title")},e),a=({children:e,className:t,...n})=>o.createElement("span",{...n,className:l(t,"section-title__subtitle")},e),m=({className:e,children:t,...n})=>o.createElement("div",{...n,className:l(e,"section-title__info")},t),r=({children:e,className:t,...n})=>o.createElement("div",{...n,className:l(t,"section-title__overflow")},e);exports.EbaySectionTitle=T;exports.EbaySectionTitleInfo=m;exports.EbaySectionTitleOverflow=r;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("./utils
|
|
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/ebay-select.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"),L=require("classnames"),R=require("./icon-DEn4Lfbd.js"),U=require("./common/component-utils/forwardRef.js"),j=require("./common/component-utils/utils.js"),x=require("./common/floating-label-utils/hooks.js"),d=({children:e,...t})=>n.createElement("option",{...t},e),v=e=>typeof e<"u",P=({value:e,defaultValue:t,className:s,borderless:o,name:p,disabled:r,onChange:a=()=>{},onBlur:h=()=>{},onFocus:m=()=>{},floatingLabel:f,forwardedRef:b,children:y,inputSize:l,invalid:E,...u})=>{const c=E||u["aria-invalid"]==="true",[F,w]=n.useState(t),{label:C,Container:G,onBlur:S,onFocus:N,ref:O}=x.useFloatingLabel({ref:b,inputId:u.id,className:s,disabled:r,label:f,inputValue:e,inputSize:l,invalid:c}),q=i=>{const{value:g,selectedIndex:I}=i.target;v(e)||w(g),a(i,{index:I,selected:[g]})},_=i=>{h(i),S()},B=i=>{m(i),N()},k=L("select",s,{"select--borderless":o,"select--large":l==="large"});return n.createElement(G,null,C,n.createElement("span",{className:k},n.createElement("select",{...u,name:p,value:v(e)?e:F,disabled:r,onChange:q,onBlur:_,onFocus:B,ref:O},M(y)),n.createElement(R.EbayIcon,{name:"chevronDown12",height:"8",width:"8"})))},T=U.withForwardRef(P);function D(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 M(e){const t=[],s=[];let o={},p=!1;const r=j.filterByType(e,d).map(a=>n.cloneElement(a,{}));if(r){o=D(r);let a;return r.forEach((h,m)=>{const{value:f,optionClassName:b,children:y,optgroup:l}=h.props;if(p=l&&t.indexOf(l)===-1,p){a=l;const u=o[a].map(c=>n.createElement(d,{key:`opt-${c.value}`,value:c.value,className:c.optionClassName},c.children));s.push(n.createElement("optgroup",{key:m,label:l},u)),t.push(l)}else l||s.push(n.createElement(d,{key:m,value:f,className:b},y))}),s}}exports.EbaySelect=T;exports.EbaySelectOption=d;
|
package/ebay-snackbar-dialog.js
CHANGED
|
@@ -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-BuuaWh0J.js");require("./icon-button-BDXS3wjO.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;
|
package/ebay-split-button.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"),a=require("./common/component-utils/utils.js"),B=require("./button-CbntI39l.js"),i=require("./ebay-menu-button.js"),q=require("./menu-DClVntri.js");require("classnames");const M=({a11yMenuText:u,children:r,type:s,bodyState:t,a11yButtonLoadingText:l,onCollapse:c,onExpand:p,onSelect:b=()=>{},onChange:m=()=>{},ref:f,...e})=>{const o=[q.EbayMenuItem,i.EbayMenuButtonSeparator],y=a.filterBy(r,E=>!o.includes(E.type)),d=a.filterByType(r,o);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},y),n.createElement(i.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:m},d))};exports.EbaySplitButton=M;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"star-rating-select.d.ts","sourceRoot":"","sources":["../../src/ebay-star-rating-select/star-rating-select.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAuB,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"star-rating-select.d.ts","sourceRoot":"","sources":["../../src/ebay-star-rating-select/star-rating-select.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAuB,MAAM,OAAO,CAAA;AAItE,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAGrH,MAAM,MAAM,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAC1C,KAAK,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,wBAAwB,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;IACnE,QAAQ,CAAC,EAAE,sBAAsB,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;IAChE,OAAO,CAAC,EAAE,qBAAqB,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;CACjE,CAAA;AASD,QAAA,MAAM,oBAAoB,EAAE,EAAE,CAAC,KAAK,CAkEnC,CAAA;AAED,eAAe,oBAAoB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),u=require("classnames"),v=require("./icon-DEn4Lfbd.js"),y=require("./range-DOsPN0h5.js"),I=require("./common/random-id.js"),b=y.range(1,5),r=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:_=()=>{},name:f,...p})=>{const E=I.useRandomId(),N=f||`star-rating-${E}`,[i,o]=t.useState(r(n));t.useEffect(()=>{o(r(n))},[n]);const h=e=>c=>{s||(o(r(e)),_(c,{value:e}))},k=e=>c=>{s||(o(r(e)),g(c,{value:e}))},q=e=>c=>{s||(o(r(e)),d(c,{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;
|
package/ebay-star-rating.js
CHANGED
|
@@ -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-DEn4Lfbd.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;
|
package/ebay-tabs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),m=require("classnames"),h=require("./common/event-utils.js"),_=require("./common/component-utils/utils.js"),E=({children:l,index:c,parentId:n,selected:r,focused:o,className:d,refCallback:i,...b})=>a.createElement("div",{...b,ref:i,"aria-controls":`${n||"default"}-tabpanel-${c}`,"aria-selected":r,className:m(d,"tabs__item"),id:`${n||"default"}-tab-${c}`,role:"tab",tabIndex:o?0:-1},a.createElement("span",null,l)),x=({children:l,index:c,parentId:n,selected:r,className:o,...d})=>a.createElement("div",{...d,"aria-labelledby":`default-tab-${c}`,className:m(o,"tabs__panel"),id:`${n||"default"}-tabpanel-${c}`,role:"tabpanel",hidden:!r},a.createElement("div",{className:"tabs__cell"},l)),q=({id:l,className:c,index:n=0,size:r="medium",activation:o="auto",onSelect:d=()=>{},onTabSelect:i=()=>{},children:b})=>{const I=[],[f,N]=a.useState(n),[p,T]=a.useState(n),u=e=>{d({selectedIndex:e}),i(e),N(e)},$=(e,t)=>{h.handleActionKeydown(e,()=>{e.preventDefault(),o==="manual"&&u(t)}),h.handleLeftRightArrowsKeydown(e,()=>{var g;e.preventDefault();const s=_.filterByType(b,E).length,P=["Left","ArrowLeft"].includes(e.key)?-1:1,y=((p===void 0?f:p)+s+P)%s;T(y),(g=I[y])==null||g.focus(),o!=="manual"&&u(y)})};a.useEffect(()=>{u(n)},[n]);const v=r==="large",w=_.filterByType(b,E).map((e,t)=>a.cloneElement(e,{...e.props,refCallback:s=>{I[t]=s},index:t,parentId:l,selected:f===t,focused:p===t,onClick:()=>{u(t),T(t)},onKeyDown:s=>{$(s,t)}})),S=_.filterByType(b,x).map((e,t)=>{const s={index:t,parentId:l,selected:f===t,children:e.props.children};return a.cloneElement(e,s)});return a.createElement("div",{id:l,className:m(c,"tabs")},a.createElement("div",{className:m("tabs__items",{"tabs__items--large":v}),role:"tablist"},w),a.createElement("div",{className:"tabs__content"},S))};exports.EbayTab=E;exports.EbayTabPanel=x;exports.EbayTabs=q;
|
package/ebay-textbox/index.d.ts
CHANGED
|
@@ -3,5 +3,6 @@ export { default as EbayTextboxPrefixIcon } from './prefix-icon';
|
|
|
3
3
|
export { default as EbayTextboxPrefixText } from './prefix-text';
|
|
4
4
|
export { default as EbayTextboxPostfixIcon } from './postfix-icon';
|
|
5
5
|
export { default as EbayTextboxPostfixText } from './postfix-text';
|
|
6
|
+
export { useFloatingLabel } from '../common/floating-label-utils/hooks';
|
|
6
7
|
export type { Size } from './types';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-textbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACzE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAClE,YAAY,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-textbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACzE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAA;AACvE,YAAY,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA"}
|
package/ebay-textbox.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("./textbox-PCHsZ_Dx.js"),x=require("./common/floating-label-utils/hooks.js");exports.EbayTextbox=e.EbayTextbox;exports.EbayTextboxPostfixIcon=e.EbayTextboxPostfixIcon;exports.EbayTextboxPostfixText=e.EbayTextboxPostfixText;exports.EbayTextboxPrefixIcon=e.EbayTextboxPrefixIcon;exports.EbayTextboxPrefixText=e.EbayTextboxPrefixText;exports.useFloatingLabel=x.useFloatingLabel;
|
package/ebay-toast-dialog.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),s=require("classnames"),i=require("./dialog-previous-button-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),s=require("classnames"),i=require("./dialog-previous-button-BuuaWh0J.js");require("./icon-button-BDXS3wjO.js");const r=({className:t,onClose:e=()=>{},...o})=>a.createElement(i.DialogBaseWithState,{...o,isModal:!1,baseEl:"aside",classPrefix:"toast-dialog",buttonPosition:"right",transitionElement:"root",className:s(t,"toast-dialog--transition"),onCloseBtnClick:e});exports.EbayToast=r;
|
package/ebay-tooltip/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as EbayTooltip } from './ebay-tooltip';
|
|
2
2
|
export { default as EbayTooltipContent } from './ebay-tooltip-content';
|
|
3
3
|
export { default as EbayTooltipHost } from './ebay-tooltip-host';
|
|
4
|
-
export { type PointerDirection, Tooltip } from '../common/tooltip-utils';
|
|
4
|
+
export { type PointerDirection, Tooltip, TooltipFooter } from '../common/tooltip-utils';
|
|
5
|
+
export { DEFAULT_POINTER_DIRECTION, POINTER_STYLES } from '../common/tooltip-utils/constants';
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-tooltip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAChE,OAAO,EAAE,KAAK,gBAAgB,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-tooltip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAChE,OAAO,EAAE,KAAK,gBAAgB,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvF,OAAO,EACH,yBAAyB,EACzB,cAAc,EACjB,MAAM,mCAAmC,CAAA"}
|
package/ebay-tooltip.js
CHANGED
|
@@ -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("./common/component-utils/utils.js"),t=require("./use-tooltip-DasQr8Xw.js");require("classnames");require("./icon-DEn4Lfbd.js");require("./array.polyfill.flat-5BAolFdk.js");const c=require("./common/tooltip-utils/constants.js"),u=()=>null,E=()=>null,N=({className:m,pointer:y,overlayStyle:f,noHover:i,onFocus:h=()=>{},onBlur:b=()=>{},onMouseEnter:d=()=>{},onMouseLeave:O=()=>{},onExpand:_,onCollapse:R,children:l,...C})=>{const{isExpanded:I,expandTooltip:s,collapseTooltip:r}=t.useTooltip({onCollapse:R,onExpand:_}),n=e.useRef(),q=o=>{d(o),i||(clearTimeout(n.current),s())},P=o=>{O(o),i||(clearTimeout(n.current),n.current=setTimeout(()=>{r()},300))},F=o=>{h(o),s()},L=o=>{b(o),r()},p=a.findComponent(l,u),T=a.findComponent(l,E);if(!T)throw new Error("EbayTooltip: Please use a EbayTooltipHost that defines the host of the tooltip");if(!p)throw new Error("EbayTooltip: Please use a EbayTooltipContent that defines the content of the tooltip");return e.createElement(t.Tooltip,{...C,className:m,type:"tooltip",isExpanded:I,onFocus:F,onBlur:L,onMouseEnter:q,onMouseLeave:P},e.createElement(t.TooltipHost,{...T.props}),e.createElement(t.TooltipContent,{...p.props,type:"tooltip",style:f,pointer:y}))};exports.Tooltip=t.Tooltip;exports.TooltipFooter=t.TooltipFooter;exports.DEFAULT_POINTER_DIRECTION=c.DEFAULT_POINTER_DIRECTION;exports.POINTER_STYLES=c.POINTER_STYLES;exports.EbayTooltip=N;exports.EbayTooltipContent=u;exports.EbayTooltipHost=E;
|
package/ebay-tourtip.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),i=require("./utils
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),i=require("./common/component-utils/utils.js"),n=require("./use-tooltip-DasQr8Xw.js"),_=require("classnames");require("./icon-DEn4Lfbd.js");require("./array.polyfill.flat-5BAolFdk.js");const T=()=>null,d=()=>null,y=({index:e,children:r})=>t.createElement(t.Fragment,null,e!==void 0&&t.createElement("span",{className:"tourtip__index"},e),r),f=({as:e,children:r,className:a,...o})=>{const s=e||"h2";return t.createElement(s,{...o,className:_("tourtip__heading",a)},r)},F=({a11yCloseText:e,"aria-label":r,className:a,children:o,onCollapse:s,onExpand:m,overlayStyle:b,pointer:h,...C})=>{const p=t.useRef(),{isExpanded:u,collapseTooltip:g}=n.useTooltip({onExpand:m,onCollapse:s,initialExpanded:!0,hostRef:p}),H=t.useRef(),l=i.findComponent(o,T);if(!l)throw new Error("EbayTourtip: Please use a EbayTourtipContent that defines the content of the tourtip");const{children:q,contentProps:w}=l.props,c=i.findComponent(o,d);if(!c)throw new Error("EbayTourtip: Please use a EbayTourtipHost that defines the host of the tourtip");const R=i.findComponent(o,f),E=i.findComponent(o,y);return t.createElement(n.Tooltip,{...C,className:a,type:"tourtip",isExpanded:u,ref:H},t.createElement(n.TooltipHost,{...c.props,forwardedRef:p,"aria-label":r,"aria-expanded":u}),t.createElement(n.TooltipContent,{...w,a11yCloseText:e,onClose:g,pointer:h,showCloseButton:!0,style:b,type:"tourtip"},R,q,E&&t.createElement(n.TooltipFooter,{type:"tourtip"},E)))};exports.Tooltip=n.Tooltip;exports.EbayTourtip=F;exports.EbayTourtipContent=T;exports.EbayTourtipFooter=y;exports.EbayTourtipHeading=f;exports.EbayTourtipHost=d;
|
package/ebay-video.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var Q=Object.defineProperty;var X=(n,r,o)=>r in n?Q(n,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[r]=o;var T=(n,r,o)=>X(n,typeof r!="symbol"?r+"":r,o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),b=require("classnames"),d=require("shaka-player/dist/shaka-player.ui"),Z=require("./common/component-utils/utils.js"),_=require("./icon-DEn4Lfbd.js"),ee=require("./progress-spinner-DoPMRkS9.js"),te=require("react-dom/client"),w=({...n})=>e.createElement("source",{...n}),ne=7e3,re=11,V={addBigPlayButton:!1,addSeekBar:!0,controlPanelElements:["play_pause","time_and_duration","spacer","mute","report","captions","fullscreen"]},oe=({callback:n,children:r})=>e.createElement("button",{className:"video-player__report-button",ref:n},e.createElement(_.EbayIcon,{name:"flag24"}),r);function ae(n=()=>{}){const r=class extends d.ui.Element{constructor(o,u,y){super(o,u);const i=document.createElement("div"),E=()=>{const m=i.firstChild;o.appendChild(m),i.remove(),this.eventManager.listen(m,"click",n)};te.createRoot(i).render(e.createElement(oe,{callback:E},y))}};return r.Factory=class{constructor(o){T(this,"reportText");this.reportText=o}create(o,u){return new r(o,u,this.reportText)}},{Report:r}}const le=({width:n,height:r,thumbnail:o,action:u,muted:y,playView:i="inline",a11yLoadText:E,a11yPlayText:m,reportText:R,volumeSlider:A,volume:x=1,hideReportButton:I,errorText:L,onVolumeChange:F=()=>{},onLoadError:M=()=>{},onPlay:z=()=>{},onReport:$=()=>{},children:j,...D})=>{const[P,v]=e.useState(),[S,H]=e.useState(),[k,U]=e.useState(),[h,C]=e.useState(),N=e.useRef(null),l=e.useRef(null),s=e.useRef(null),p=e.useRef(null),f=Z.filterByType(j,w).map(({props:t})=>t),B=t=>{v(!0),C(!0),M(t)},g=(t=0)=>{var a;!f.length||!s.current||(v(!1),s.current.load((a=f[t])==null?void 0:a.src).then(()=>{C(!1)}).catch(c=>{switch(console.error(c),c.code){case ne:return;case re:setTimeout(()=>g(t),0);break;default:{const q=f.length>t+1&&t+1;q?setTimeout(()=>g(q),0):B(c)}}}).finally(()=>{v(!0)}))};e.useEffect(()=>{const t=l.current,a=N.current;if(!(!t||!a)&&(t.volume=x,d.polyfill.installAll(),s.current=new d.Player(t),!!s.current)){if(s.current.addEventListener("error",B),s.current.addEventListener("buffering",c=>{H(c.buffering)}),p.current=new d.ui.Overlay(s.current,a,t,R),p.current.configure({addBigPlayButton:!0,controlPanelElements:[],addSeekBar:!1}),!I){const{Report:c}=ae($);d.ui.Controls.registerElement("report",new c.Factory(R))}g(),ce(a)}},[]),e.useEffect(()=>{switch(u){case"play":l.current.play();break;case"pause":l.current.pause();break}},[u]);const W=()=>{if(!p.current)return;const t=A?{controlPanelElements:se(V.controlPanelElements)}:{};p.current.configure({...V,...t}),l.current.controls=!1},Y=t=>{t.stopPropagation(),W(),i==="fullscreen"&&l.current.requestFullscreen(),U(!0),z(t,{player:s.current})},G=()=>{l.current.play()},J=t=>{const a=t.currentTarget;F(t,{volume:Math.round((a.volume+Number.EPSILON)*100)/100,muted:a.muted})},K=()=>{l.current.controls=!1},O={width:n?`${n}px`:void 0,height:r?`${r}px`:void 0};return e.createElement("div",{style:O,className:b("video-player",{"video-player--poster":!k})},!k&&P&&!h&&!S&&e.createElement("div",{className:"shaka-play-button-container"},e.createElement("button",{onClick:G,className:"shaka-play-button",style:{opacity:1,zIndex:999},"aria-label":m},e.createElement(_.EbayIcon,{name:"playFilled64Colored"}))),e.createElement("div",{className:"video-player__container",ref:N},e.createElement("video",{ref:l,style:O,poster:o,muted:y||!1,onPlaying:Y,onPause:K,onVolumeChange:J,...D},f.map((t,a)=>e.createElement("source",{key:a,...t})))),e.createElement("div",{className:b("video-player__overlay",{"video-player__overlay--hidden":!h})},e.createElement(_.EbayIcon,{name:"attention64"}),e.createElement("div",{className:"video-player__overlay-text"},L)),e.createElement("div",{className:b("video-player__overlay",{"video-player__overlay--hidden":P&&(h||!S)})},e.createElement(ee.EbayProgressSpinner,{size:"large","aria-label":E})))};function se(n){const r=n.length-2>0?n.length-2:n.length,o=[...n];return o.splice(r,0,"volume"),o}function ce(n){const r=n.querySelectorAll(".shaka-spinner")[0];r&&r.setAttribute("hidden","")}exports.EbayVideo=le;exports.EbayVideoSource=w;
|
package/events/README.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { addEventListener, handleActionKeydown, handleEnterKeydown, handleEscapeKeydown, handleLeftRightArrowsKeydown, handleResize, handleTextInput, handleUpDownArrowsKeydown, isActionKey, preventDefaultIfHijax, removeEventListener, wrapEvent } from '../common/event-utils';
|
|
2
|
+
export type { EbayChangeEventHandler, EbayEventHandler, EbayFocusEventHandler, EbayKeyboardEventHandler, EbayMouseEventHandler } from '../common/event-utils/types';
|
|
3
|
+
export { default as useKeyPress } from '../common/event-utils/use-key-press';
|
|
4
|
+
export { default as useRovingIndex } from '../common/event-utils/use-roving-index';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,4BAA4B,EAC5B,YAAY,EACZ,eAAe,EACf,yBAAyB,EACzB,WAAW,EACX,qBAAqB,EACrB,mBAAmB,EACnB,SAAS,EACZ,MAAM,uBAAuB,CAAA;AAE9B,YAAY,EACR,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,EACxB,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EACH,OAAO,IAAI,WAAW,EACzB,MAAM,qCAAqC,CAAA;AAE5C,OAAO,EACH,OAAO,IAAI,cAAc,EAC5B,MAAM,wCAAwC,CAAA"}
|
package/events.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./common/event-utils.js"),n=require("./use-roving-index-DoAVBgsp.js");exports.addEventListener=e.addEventListener;exports.handleActionKeydown=e.handleActionKeydown;exports.handleEnterKeydown=e.handleEnterKeydown;exports.handleEscapeKeydown=e.handleEscapeKeydown;exports.handleLeftRightArrowsKeydown=e.handleLeftRightArrowsKeydown;exports.handleResize=e.handleResize;exports.handleTextInput=e.handleTextInput;exports.handleUpDownArrowsKeydown=e.handleUpDownArrowsKeydown;exports.isActionKey=e.isActionKey;exports.preventDefaultIfHijax=e.preventDefaultIfHijax;exports.removeEventListener=e.removeEventListener;exports.wrapEvent=e.wrapEvent;exports.useKeyPress=n.useKeyPress;exports.useRovingIndex=n.useRovingIndex;
|
package/icon-DEn4Lfbd.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("react"),N=require("classnames"),g=require("./common/component-utils/forwardRef.js");require("./array.polyfill.flat-5BAolFdk.js");const w=require("./common/random-id.js"),p=({name:o,className:n,noSkinClasses:e=!1,a11yText:t,a11yVariant:a,forwardedRef:l,...d})=>{const[m,u]=r.useState("");r.useEffect(()=>{u(w.randomId())},[]);const c=a==="label",i=t&&`icon-title-${m}`,f=t?{"aria-labelledby":c?void 0:i,"aria-label":c?t:void 0,role:"img"}:{"aria-hidden":!0},s=h(o),b=["icon",`icon--${E(s)||s}`,$(s)].filter(Boolean).join(" "),I=N(n,{[b]:!e});return r.createElement("svg",{...d,className:I,xmlns:"http://www.w3.org/2000/svg",focusable:!1,ref:l,...f},t&&!c&&r.createElement("title",{id:i},t),r.createElement("use",{xlinkHref:`#icon-${s}`}))};function E(o){const n=o.split("-"),e=n[n.length-1];return e==="colored"?n[n.length-2]:isNaN(Number(e))?"":e}function $(o){const n=o.split("-"),e=n.indexOf("filled");return e===-1?"":`icon--${n.slice(0,e+1).join("-")}`}function h(o){return o.replace(/([0-9]+)/g,(n,e)=>`-${e}`).replace(/([A-Z])/g,(n,e)=>`-${e.toLowerCase()}`)}const q=g.withForwardRef(p);exports.EbayIcon=q;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react"),w=require("classnames"),$=require("./icon-DEn4Lfbd.js"),d=require("./badge-CoHKfiPt.js"),k=require("./common/component-utils/forwardRef.js");require("./array.polyfill.flat-5BAolFdk.js");const B=({href:c,icon:m,badgeNumber:o,badgeAriaLabel:y,transparent:E,className:b,forwardedRef:a,size:r,onEscape:q=()=>{},onKeyDown:p=()=>{},...s})=>{const n=c?"icon-link":"icon-btn",i=w(b,n,r&&`${n}--${r}`,{[`${n}--badged`]:o,[`${n}--transparent`]:E}),l=e.createElement(e.Fragment,null,e.createElement($.EbayIcon,{name:m}),o&&e.createElement(d.EbayBadge,{type:"icon",number:o,"aria-label":y})),u=t=>{(t.key==="Escape"||t.key==="Esc")&&q(t),p(t)};return c?e.createElement("a",{ref:a,className:i,href:c,onKeyDown:u,...s},l):e.createElement("button",{ref:a,type:"button",className:i,onKeyDown:u,...s},l)},I=k.withForwardRef(B);exports.EbayIconButton=I;
|
package/menu-DClVntri.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("react"),V=require("classnames"),U=require("./use-roving-index-DoAVBgsp.js"),S=require("./common/event-utils.js"),T=require("./common/component-utils/forwardRef.js");require("./array.polyfill.flat-5BAolFdk.js");const $=require("./badge-CoHKfiPt.js"),j=require("./icon-DEn4Lfbd.js"),A=({className:d,checked:r,type:I,focused:a=!1,tabIndex:p,disabled:y,badgeNumber:f,badgeAriaLabel:h,children:v,...w})=>{const u=t.useRef(null),i=f!==void 0;t.useEffect(()=>{u.current&&a&&u.current.focus()},[u,a]);const x=["radio","checkbox"];return t.createElement("div",{"aria-label":h,...w,ref:u,className:V(d,"menu__item",i&&"menu__item--badged"),role:z(I),"aria-checked":x.includes(I)?r:void 0,"aria-disabled":y,tabIndex:a?0:p},t.createElement("span",{"aria-hidden":i},v,i&&t.createElement($.EbayBadge,{type:"menu",number:f})),t.createElement(j.EbayIcon,{name:"tick16"}))};function z(d){return{radio:"menuitemradio",checkbox:"menuitemcheckbox"}[d]||"menuitem"}const G=({baseEl:d="span",type:r,priority:I="secondary",checked:a,className:p,autofocus:y,onClick:f=()=>{},onKeyDown:h=()=>{},onChange:v=()=>{},onSelect:w=()=>{},forwardedRef:u,children:i,...x})=>{const m=t.Children.toArray(i),[C,q]=U.useRovingIndex(i,A,y===!0?0:void 0),[l,F]=t.useState(m.map(()=>!1)),B=n=>m.reduce((e,c,s)=>n[s]?[...e,c.props.value]:e,[]),g=n=>n.reduce((e,c,s)=>c?[...e,s]:e,[]),_=(n,e)=>({index:n,checked:g(e)}),R=(n,e)=>({..._(n,e),indexes:g(e),checkedValues:B(e)}),M=(n,e,c=!1)=>{let s=!1;const b=l.map((E,o)=>{const P=c?!1:E;return n===o?(E!==e&&(s=!0),e):P});if(s)return F(b),b},k=n=>{switch(r){case"radio":return M(n,!0,!0);case"checkbox":return M(n,!l[n],!1);default:return l.map((e,c)=>c===n)}};t.useEffect(()=>{if(r==="radio")if(a===void 0){const n=m.findIndex(e=>e.props.checked);n>-1&&k(n)}else k(a);else r==="checkbox"&&F(m.map(n=>!!n.props.checked))},[]);const K=(n,e,c)=>{switch(r){case"radio":case"checkbox":return v(n,R(e,c));default:return w(n,_(e,c))}},D=(n,e)=>{let c;switch(S.isActionKey(n.key)&&(c=k(e),c&&K(n,e,c)),r){case"radio":case"checkbox":return h(n,R(e,c||l));default:return h(n,_(e,c||l))}},N=(n,e)=>{q(e);const c=k(e);c&&K(n,e,c)};return t.createElement(d,{...x,className:V(p,"menu")},t.createElement("div",{className:"menu__items",role:"menu",ref:u},m.map((n,e)=>{const{onClick:c=()=>{},onFocus:s=()=>{},onKeyDown:b=()=>{},...E}=n.props;return t.cloneElement(n,{...E,type:r,focused:e===C,tabIndex:C===void 0?0:-1,checked:l[e],onFocus:o=>{q(e),s(o)},onClick:o=>{N(o,e),c(o),f(o)},onKeyDown:o=>{D(o,e),b(o)}})})))},H=T.withForwardRef(G);exports.EbayMenu=H;exports.EbayMenuItem=A;
|
package/menu-_LzP6yje.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react"),E=require("classnames"),f=({className:a,itemMatchesUrl:c=!0,onKeyDown:s=()=>{},onSelect:u=()=>{},children:l,...o})=>{const i=e.Children.toArray(l),m=c===!1?"true":"page";return e.createElement("div",{...o,className:E(a,"fake-menu")},e.createElement("ul",{className:"fake-menu__items",tabIndex:-1},i.map((t,r)=>{const{current:d,onClick:k=()=>{},...y}=t.props;return e.createElement("li",{key:r},e.cloneElement(t,{...y,"aria-current":d?m:void 0,onClick:n=>{u(n,{index:r}),k(n)},onKeyDown:n=>{s(n,{index:r})}}))})))};exports.EbayFakeMenu=f;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react"),s=require("classnames"),l=require("./common/component-utils/utils.js"),K=require("./common/event-utils.js"),T=require("./common/random-id.js"),D=require("./button-CbntI39l.js"),R=require("./icon-DEn4Lfbd.js"),U=require("./icon-button-BDXS3wjO.js"),z=require("./menu-_LzP6yje.js"),H=require("./ebay-fake-menu/menu-item.js"),p=H,y=({className:a,...r})=>e.createElement("hr",{...r,className:s(a,"menu-button__separator"),role:"separator"}),_=({children:a})=>e.createElement(e.Fragment,null,a),P=({a11yText:a,noToggleIcon:r,fixWidth:k,reverse:B,variant:i,expanded:M=!1,className:I,onCollapse:q=()=>{},onExpand:v=()=>{},onMouseDown:F=()=>{},onSelect:w=()=>{},text:d="",children:c,...x})=>{const[o,m]=e.useState(M),[b,N]=e.useState(),u=e.useRef(),f=l.findComponent(c,R.EbayIcon),C=l.findComponent(c,_)||(f?e.createElement("span",null,d):d),S=l.filterByType(c,[p,y]);e.useEffect(()=>{const n=t=>{u.current&&!u.current.contains(t.currentTarget)&&m(!1)};return o?(v(),setTimeout(()=>{document.addEventListener("click",n,!1)})):o===!1&&q(),()=>document.removeEventListener("click",n,!1)},[o]),e.useEffect(()=>{N(T.randomId())},[]);const h=n=>{K.handleEscapeKeydown(n,()=>{var t;m(!1),(t=u.current)==null||t.focus()})},L=s("fake-menu-button__menu",{"menu-button__menu--fix-width":k,"menu-button__menu--reverse":B}),E={ref:u,className:"fake-menu-button__button","aria-expanded":!!o,"aria-haspopup":!0,"aria-label":a,"aria-controls":b,onClick:()=>m(!o),...x};return e.createElement("span",{className:s("fake-menu-button",I)},i==="overflow"?e.createElement(U.EbayIconButton,{icon:"overflowHorizontal24",...E}):e.createElement(D.EbayButton,{variant:i==="form"?"form":void 0,bodyState:r?void 0:"expand",...E},f,C),o&&e.createElement(z.EbayFakeMenu,{className:L,id:b,tabIndex:-1,onKeyDown:h,onSelect:w},S.map((n,t)=>e.cloneElement(n,{...n.props,onMouseDown:g=>{F(g,{index:t})},className:s(n.props.className,"fake-menu-button__item"),key:t,autoFocus:t===0}))))};exports.EbayFakeMenuButtonItem=p;exports.EbayFakeMenuButtonLabel=_;exports.EbayMenuButton=P;exports.EbayMenuButtonSeparator=y;
|
package/package.json
CHANGED
|
@@ -1,11 +1,82 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ebay/ui-core-react",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.1",
|
|
4
4
|
"description": "Skin components build off React",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
7
7
|
},
|
|
8
8
|
"exports": {
|
|
9
|
+
"./ebay-dialog-base/components/animation": {
|
|
10
|
+
"types": "./ebay-dialog-base/components/animation.d.ts",
|
|
11
|
+
"default": "./ebay-dialog-base/components/animation.js"
|
|
12
|
+
},
|
|
13
|
+
"./ebay-dialog-base/components/dialog-header": {
|
|
14
|
+
"types": "./ebay-dialog-base/components/dialog-header.d.ts",
|
|
15
|
+
"default": "./ebay-dialog-base/components/dialog-header.js"
|
|
16
|
+
},
|
|
17
|
+
"./ebay-dialog-base/components/dialog-footer": {
|
|
18
|
+
"types": "./ebay-dialog-base/components/dialog-footer.d.ts",
|
|
19
|
+
"default": "./ebay-dialog-base/components/dialog-footer.js"
|
|
20
|
+
},
|
|
21
|
+
"./ebay-notice-base/components/*": {
|
|
22
|
+
"types": "./ebay-notice-base/index.d.ts",
|
|
23
|
+
"default": "./ebay-notice-base.js"
|
|
24
|
+
},
|
|
25
|
+
"./common/component-utils/forwardRef": {
|
|
26
|
+
"types": "./common/component-utils/forwardRef.d.ts",
|
|
27
|
+
"default": "./common/component-utils/forwardRef.js"
|
|
28
|
+
},
|
|
29
|
+
"./common/component-utils/utils": {
|
|
30
|
+
"types": "./common/component-utils/utils.d.ts",
|
|
31
|
+
"default": "./common/component-utils/utils.js"
|
|
32
|
+
},
|
|
33
|
+
"./common/component-utils": {
|
|
34
|
+
"types": "./common/component-utils/index.d.ts",
|
|
35
|
+
"default": "./common/component-utils.js"
|
|
36
|
+
},
|
|
37
|
+
"./common/event-utils/types": {
|
|
38
|
+
"types": "./common/event-utils/event-utils/types.d.ts"
|
|
39
|
+
},
|
|
40
|
+
"./common/event-utils": {
|
|
41
|
+
"types": "./common/event-utils/event-utils/index.d.ts",
|
|
42
|
+
"default": "./common/event-utils/event-utils.js"
|
|
43
|
+
},
|
|
44
|
+
"./common/floating-label-utils": {
|
|
45
|
+
"types": "./common/floating-label-utils/hooks.d.ts",
|
|
46
|
+
"default": "./common/floating-label-utils/hooks.js"
|
|
47
|
+
},
|
|
48
|
+
"./common/notice-utils/notice-cta": {
|
|
49
|
+
"types": "./common/notice-utils/notice-cta.d.ts",
|
|
50
|
+
"default": "./common/notice-utils/notice-cta.js"
|
|
51
|
+
},
|
|
52
|
+
"./common/random-id": {
|
|
53
|
+
"types": "./common/random-id.d.ts",
|
|
54
|
+
"default": "./common/random-id.js"
|
|
55
|
+
},
|
|
56
|
+
"./common/tooltip-utils/constants": {
|
|
57
|
+
"types": "./common/tooltip-utils/constants.d.ts",
|
|
58
|
+
"default": "./common/tooltip-utils/constants.js"
|
|
59
|
+
},
|
|
60
|
+
"./common/tooltip-utils/types": {
|
|
61
|
+
"types": "./common/tooltip-utils/types.d.ts"
|
|
62
|
+
},
|
|
63
|
+
"./common/tooltip-utils": {
|
|
64
|
+
"types": "./common/tooltip-utils/index.d.ts",
|
|
65
|
+
"default": "./common/tooltip-utils.js"
|
|
66
|
+
},
|
|
67
|
+
"./ebay-radio/radio": {
|
|
68
|
+
"types": "./ebay-radio/radio.d.ts",
|
|
69
|
+
"default": "./ebay-radio/radio.js"
|
|
70
|
+
},
|
|
71
|
+
"./ebay-fake-menu-button/menu-button": {
|
|
72
|
+
"types": "./ebay-fake-menu-button/menu-button.d.ts",
|
|
73
|
+
"default": "./ebay-fake-menu-button/menu-button.js"
|
|
74
|
+
},
|
|
75
|
+
"./ebay-fake-menu/menu-item": {
|
|
76
|
+
"types": "./ebay-fake-menu/menu-item.d.ts",
|
|
77
|
+
"default": "./ebay-fake-menu/menu-item.js"
|
|
78
|
+
},
|
|
79
|
+
|
|
9
80
|
"./package.json": "./package.json",
|
|
10
81
|
"./*": {
|
|
11
82
|
"types": "./*/index.d.ts",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("react"),l=require("classnames"),i=require("./icon-
|
|
1
|
+
"use strict";const s=require("react"),l=require("classnames"),i=require("./icon-DEn4Lfbd.js"),t={default:"",small:"progress-spinner--small",large:"progress-spinner--large"},c={default:"spinner24",small:"spinner20",large:"spinner30"},o=({size:e="default","aria-label":r="Busy",className:a,...n})=>s.createElement("span",{...n,className:l("progress-spinner",t[e],a),"aria-label":r,role:"img"},s.createElement(i.EbayIcon,{name:c[e]}));exports.EbayProgressSpinner=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("react"),ue=require("classnames"),xe=require("./common/component-utils/forwardRef.js"),p=require("./common/component-utils/utils.js"),v=require("./icon-DEn4Lfbd.js"),be=require("./icon-button-BDXS3wjO.js"),de=require("./common/floating-label-utils/hooks.js"),P=({name:n,buttonAriaLabel:a,onClick:c=()=>{},...r})=>a?t.createElement(be.EbayIconButton,{"aria-label":a,icon:n,transparent:!0,onClick:c,...r}):t.createElement(v.EbayIcon,{name:n,...r}),w=n=>t.createElement("span",{...n}),B=({name:n,...a})=>t.createElement(v.EbayIcon,{name:n,...a}),_=n=>t.createElement("span",{...n}),m=n=>typeof n<"u",pe=({type:n="text",invalid:a,fluid:c,multiline:r,onChange:q=()=>{},onInputChange:F=()=>{},onFocus:N=()=>{},onBlur:K=()=>{},onKeyPress:k=()=>{},onKeyUp:U=()=>{},onKeyDown:L=()=>{},onInvalid:R=()=>{},onFloatingLabelInit:D=()=>{},onButtonClick:j=()=>{},autoFocus:E,defaultValue:f="",value:i,forwardedRef:M,inputSize:y="default",floatingLabel:O,children:u,placeholder:S,opaqueLabel:V,...s})=>{var T,h;const[I,W]=t.useState(f),[g,$]=t.useState(f),{label:G,Container:H,onBlur:J,onFocus:Q,ref:X,placeholder:Y}=de.useFloatingLabel({ref:M,inputId:s.id,className:s.className,disabled:s.disabled,label:O,inputSize:y,inputValue:i||g,placeholder:S,invalid:a,type:n,opaqueLabel:V,onMount:D}),C=e=>{var o;N(e,{value:((o=e==null?void 0:e.target)==null?void 0:o.value)||f}),Q()},Z=e=>{var l;const o=(l=e.target)==null?void 0:l.value;K(e,{value:o}),o!==I&&(q(e,{value:o}),W(o)),J()},z=e=>{const o=e.target;k(e,{value:o==null?void 0:o.value})},A=e=>{const o=e.target;U(e,{value:o==null?void 0:o.value})},ee=e=>{const o=e.target;L(e,{value:o==null?void 0:o.value})},oe=e=>{const o=e.target;R(e,{value:o==null?void 0:o.value})},ne=e=>{j(e,{value:I})};t.useEffect(()=>{E&&C()},[]);const te=e=>{var l;const o=(l=e.target)==null?void 0:l.value;m(i)||$(o),F(e,{value:o})},ae=r?"textarea":"input",se=c?"div":"span",le=p.findComponent(u,B),x=p.findComponent(u,_),ce=(T=x==null?void 0:x.props)==null?void 0:T.id,b=p.findComponent(u,P),d=p.findComponent(u,w),re=(h=d==null?void 0:d.props)==null?void 0:h.id,ie=ue("textbox",s.className,{"textbox--fluid":c,"textbox--large":y==="large","textbox--disabled":s.disabled,"textbox--invalid":a,"textbox--readonly":s.readOnly});return t.createElement(H,null,G,t.createElement(se,{className:ie},le,x,t.createElement(ae,{"aria-describedby":[ce,re].filter(Boolean).join(" ")||void 0,...s,className:"textbox__control",type:n,"aria-invalid":a,value:m(i)?i:g,onChange:te,onBlur:Z,onFocus:C,onKeyPress:z,onKeyUp:A,onKeyDown:ee,onInvalid:oe,autoFocus:E,ref:X,placeholder:Y}),d,b&&t.cloneElement(b,{...b.props,onClick:e=>{const{onClick:o=()=>{}}=b.props;o(e),ne(e)}})))},fe=xe.withForwardRef(pe);exports.EbayTextbox=fe;exports.EbayTextboxPostfixIcon=P;exports.EbayTextboxPostfixText=w;exports.EbayTextboxPrefixIcon=B;exports.EbayTextboxPrefixText=_;exports.isControlled=m;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("react"),v=()=>{const[w,i]=o.useState(!1),[c,e]=o.useState(!1),s=({key:t})=>{const r={ArrowUp:i,ArrowDown:e}[t];r&&r(!1)},d=({key:t})=>{const r={ArrowUp:i,ArrowDown:e}[t];r&&r(!0)};return o.useEffect(()=>(window.addEventListener("keydown",d),window.addEventListener("keyup",s),()=>{window.removeEventListener("keydown",d),window.removeEventListener("keyup",s)}),[]),[w,c]},y=(w,i,c)=>{const[e,s]=o.useState(c),[d,t]=v(),r=o.Children.toArray(w).reduce((n,p,x)=>p.type===i?[...n,x]:n,[]),u=r.indexOf(e),a=()=>{if(u===-1)return e;const n=r[u-1];return n===void 0?e:n},f=()=>{if(u===-1)return e;const n=r[u+1];return n===void 0?e:n};return o.useEffect(()=>{d&&s(a()),t&&s(f())},[d,t]),[e,s]};exports.useKeyPress=v;exports.useRovingIndex=y;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("react"),E=require("classnames"),N=require("./common/component-utils/forwardRef.js"),p=require("./common/component-utils/utils.js"),f=require("./icon-DEn4Lfbd.js"),_=require("./common/tooltip-utils/constants.js"),u=({children:e,className:t,forwardedRef:l,...n})=>(o.Children.only(e),o.cloneElement(e,{ref:l,...n,className:E(t,e.props.className)})),C=({className:e,type:t,isExpanded:l,children:n,forwardedRef:s,...r})=>{var m;const i=p.findComponent(n,u),c=p.excludeComponent(n,u)[0];if(!i)throw new Error("Tooltip: Please use a TooltipHost that defines the host of the tooltip");const a=o.cloneElement(i,{className:`${t}__host`,"aria-expanded":l,"aria-describedby":(m=c==null?void 0:c.props)==null?void 0:m.id,...i.props});return o.createElement("span",{...r,ref:s,className:E(e,t,{[`${t}--expanded`]:l})},a,c)},$=N.withForwardRef(C),b=()=>null,T=({children:e,className:t,type:l="tourtip"})=>o.createElement("div",{className:E(`${l}__footer`,t)},e),x=({id:e,style:t,pointer:l=_.DEFAULT_POINTER_DIRECTION,children:n,type:s="tooltip",showCloseButton:r,a11yCloseText:i,onClose:c})=>{const a=p.findComponent(n,b),m=p.findComponent(n,T),d=p.excludeComponent(n,T);return o.createElement("span",{className:`${s}__overlay`,id:e,role:_.TYPE_ROLES[s]||null,style:{..._.POINTER_STYLES[l],...t}},o.createElement("span",{className:`${s}__pointer ${s}__pointer--${l}`}),o.createElement("span",{className:`${s}__mask`},o.createElement("span",{className:`${s}__cell`},o.createElement("span",{className:`${s}__content`},d),r?o.createElement("button",{...a==null?void 0:a.props,className:`icon-btn icon-btn--transparent ${s}__close`,type:"button","aria-label":i,onClick:c},o.createElement(f.EbayIcon,{name:"close16"})):null,m)))},q=({onExpand:e,onCollapse:t,initialExpanded:l=!1,hostRef:n})=>{const[s,r]=o.useState(l);return{isExpanded:s,expandTooltip:()=>{r(!0),e&&e()},collapseTooltip:()=>{var a;r(!1),t&&t(),(a=n==null?void 0:n.current)==null||a.focus()}}};exports.Tooltip=$;exports.TooltipContent=x;exports.TooltipFooter=T;exports.TooltipHost=u;exports.useTooltip=q;
|
package/utils/README.md
ADDED
package/utils/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { useRandomId } from '../common/random-id';
|
|
2
|
+
export { debounce } from '../common/debounce';
|
|
3
|
+
export { withForwardRef } from '../common/component-utils/forwardRef';
|
|
4
|
+
export { excludeComponent, filterBy, filterByType, findComponent } from '../common/component-utils/utils';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAA;AACrE,OAAO,EACH,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,aAAa,EAChB,MAAM,iCAAiC,CAAA"}
|
package/utils.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./common/random-id.js"),n=require("./debounce-BQsYxxOL.js"),t=require("./common/component-utils/forwardRef.js"),e=require("./common/component-utils/utils.js");exports.useRandomId=o.useRandomId;exports.debounce=n.debounce;exports.withForwardRef=t.withForwardRef;exports.excludeComponent=e.excludeComponent;exports.filterBy=e.filterBy;exports.filterByType=e.filterByType;exports.findComponent=e.findComponent;
|
package/button-o4ao46WM.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("react"),k=require("classnames"),l=require("./icon-DK6eEQD8.js");require("./array.polyfill.flat-5BAolFdk.js");const P=require("./progress-spinner-CDgxI8R_.js"),O={cta:"cta-",fake:"fake-",expand:"expand-",default:""},y=({type:n="default",children:a,...r})=>t.createElement("span",{className:`${O[n]}btn__cell`,...r},t.createElement(t.Fragment,null,a)),R=()=>t.createElement(y,null,t.createElement(P.EbayProgressSpinner,null)),T=({className:n,children:a})=>t.createElement("span",{className:k(n,"btn__text")},a),j=({children:n})=>n?t.createElement(y,null,t.createElement(T,null,n),t.createElement(l.EbayIcon,{name:"chevronDown12"})):t.createElement(l.EbayIcon,{name:"chevronDown12"}),G=({priority:n="secondary",variant:a="standard",size:r="regular",bodyState:m,split:D,transparent:N=!1,fluid:q=!1,disabled:E,partiallyDisabled:C,children:o,onKeyDown:S=()=>{},onEscape:I=()=>{},truncate:_=!1,href:c,className:h,forwardedRef:d,borderless:p,fixedHeight:$,...b})=>{const e=c?"fake-btn":"btn",F={primary:`${e}--primary`,secondary:`${e}--secondary`,tertiary:`${e}--tertiary`,none:""},i={large:`${e}--large`,small:`${e}--small`,regular:"",default:""},L={start:`${e}--split-start`,end:`${e}--split-end`},A=a==="destructive",u=a==="form",f=m==="loading",g=m==="expand",K=u&&(J(o)||g&&!o),B=k(e,h,F[u||p?"none":n],i[r],L[D],A&&`${e}--destructive`,u&&`${e}--form`,K&&`${e}--slim`,N&&`${e}--transparent`,q&&`${e}--fluid`,_&&`${e}--truncated`,p&&`${e}--borderless`,$&&(i[r]?`${i[r]}-${$}`:`${e}--fixed-height`)),v=s=>{S(s),(s.key==="Escape"||s.key==="Esc")&&I(s)},x=H(o,{isLoading:f,isExpand:g}),w=f?"polite":null;return c?t.createElement("a",{className:B,href:E?void 0:c,ref:d,onKeyDown:v,"aria-live":w,...b},x):t.createElement("button",{disabled:E,"aria-disabled":C,"aria-live":w,className:B,ref:d,onKeyDown:v,...b},x)};function H(n,{isLoading:a,isExpand:r}){switch(!0){case a:return t.createElement(R,null);case r:return t.createElement(j,null,n);default:return n}}function J(n){const a=t.Children.toArray(n);return a.length===1&&a[0].type===l.EbayIcon}const M=l.withForwardRef(G);exports.EbayButton=M;exports.EbayButtonCell=y;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePrevious.d.ts","sourceRoot":"","sources":["../../../src/common/component-utils/usePrevious.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAQ1C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const n=require("react"),ne=require("react-remove-scroll"),_=require("classnames"),re=require("makeup-screenreader-trap"),ae=require("makeup-keyboard-trap"),G=require("./icon-DK6eEQD8.js"),oe=require("./icon-button-BB6GFLm7.js");function J(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const L=J(re),A=J(ae),F=({children:t,...e})=>n.createElement("h2",{...e},t),$=({children:t})=>n.createElement(n.Fragment,null,t),q=({children:t})=>n.createElement(n.Fragment,null,t);function ie({open:t,classPrefix:e,transitionElement:r,dialogRef:o,dialogWindowRef:d,enabled:u,onTransitionEnd:i}){const c=n.useRef(!0);n.useLayoutEffect(()=>{if(!u)return;let s=[d,o];r==="window"?s=[d]:r==="root"&&(s=[o]);let l;return t?l=ce({dialog:o,waitFor:s,classPrefix:e,onTransitionEnd:i}):c.current||(l=se({dialog:o,waitFor:s,classPrefix:e,onTransitionEnd:i})),c.current=!1,()=>{l&&l()}},[t,u])}function ce({dialog:t,waitFor:e,classPrefix:r,onTransitionEnd:o}){return M(t,e,`${r}--show`,o)}function se({dialog:t,waitFor:e,classPrefix:r,onTransitionEnd:o}){return M(t,e,`${r}--hide`,o)}function M(t,e,r,o){if(!t.current||!r)return;let d=0;const u=e?e.length:0,i=`${r}-init`;return t.current.classList.add(i),le(()=>{t.current&&(t.current.classList.add(r),t.current.classList.remove(i),e.forEach(c=>{const s=()=>{var l,f;++d===u&&((l=t.current)==null||l.classList.remove(r),o(),(f=c.current)==null||f.removeEventListener("transitionend",s))};c.current.addEventListener("transitionend",s,{once:!0})}))})}function le(t){let e,r;return window.requestAnimationFrame?(e=window.requestAnimationFrame(()=>{e=window.requestAnimationFrame(t)}),r=window.cancelAnimationFrame):(e=window.setTimeout(t,26),r=window.clearTimeout),()=>{e&&(r(e),e=void 0)}}const ue=({baseEl:t="div",classPrefix:e="drawer-dialog",windowClass:r,windowType:o,mainId:d,top:u,header:i,buttonPosition:c="right",children:s,ariaLabelledby:l,a11yCloseText:f,onCloseBtnClick:w=()=>{},footer:b,actions:g,onScroll:T,open:a=!1,onOpen:h=()=>{},onBackgroundClick:k=()=>{},ignoreEscape:Q,closeButton:U,previousButton:V,isModal:p,role:X="dialog",focus:O,transitionElement:Y,animated:S,closeButtonClass:Z,...C})=>{var K;const I=n.useRef(null),E=n.useRef(null),j=n.useRef(null),[x,P]=n.useState("");n.useEffect(()=>{P(G.randomId())},[]),n.useEffect(()=>{let m;const y=v=>{E.current&&!E.current.contains(v.target)&&k(v)};return a&&c!=="hidden"&&(m=window.setTimeout(()=>{document.addEventListener("click",y,!1)})),()=>{clearTimeout(m),document.removeEventListener("click",y,!1)}},[k,a]),n.useEffect(()=>(a&&p?(L.trap(E.current),A.trap(E.current)):(L.untrap(),A.untrap()),()=>{L.untrap(),A.untrap()}),[a,p]),ie({open:a,classPrefix:e,transitionElement:Y,dialogRef:I,dialogWindowRef:E,enabled:S,onTransitionEnd:()=>H(a)});const D=m=>{!Q&&m.key==="Escape"&&(m.stopPropagation(),w(m))};n.useEffect(()=>{S||H(a),a&&h()},[a]);function H(m){var y,v;if(m)return O?(y=O.current)==null||y.focus():p&&((v=j.current)==null||v.focus()),document.addEventListener("keydown",D,!1),()=>document.removeEventListener("keydown",D,!1)}const W=c!=="hidden"&&n.createElement("button",{ref:j,className:_("icon-btn",Z,`${e}__close`,{"icon-btn--transparent":e==="toast-dialog"}),type:"button","aria-label":f,onClick:w},U||n.createElement(G.EbayIcon,{name:"close16"})),ee=o?`${e}__${o}-window`:`${e}__window`,z=((K=i==null?void 0:i.props)==null?void 0:K.id)||`dialog-title-${x}`,te=l||z,B=i?n.cloneElement(i,{...i.props,id:z}):null;return n.createElement(t,{...C,"aria-labelledby":te,"aria-modal":"true",role:X,hidden:!a,className:_(e,C.className),"aria-live":p?void 0:"polite",ref:I,onKeyDown:D},n.createElement("div",{className:_(ee,r),ref:E},u,B&&n.createElement("div",{className:`${e}__header`},V,c==="right"&&B,c!=="bottom"&&W,(c==="left"||c==="hidden")&&B),n.createElement("div",{id:d,className:`${e}__main`,onScroll:T},s),g?n.createElement("div",{className:`${e}__actions`},g):null,b||c==="bottom"?n.createElement("div",{className:`${e}__footer`},b,c==="bottom"&&W):null))},de=({isModal:t,open:e,children:r,animated:o=!0,...d})=>{const u=t!==!1,i=n.Children.toArray(r),c=i.find(a=>a.type===F),s=i.find(a=>a.type===$),l=i.find(a=>a.type===N),f=i.find(a=>a.type===q),w=i.find(a=>a.type===R),b=i.filter(a=>![F,$,q,N,R].some(h=>h===a.type)),g=n.createElement(ue,{...d,open:e,isModal:u,header:c,footer:s,actions:l,closeButton:f,previousButton:w,animated:o},b);return o||e?u?n.createElement(ne.RemoveScroll,{enabled:e},g):g:null},N=({children:t})=>n.createElement(n.Fragment,null,t),R=({className:t,icon:e,...r})=>n.createElement(oe.EbayIconButton,{...r,icon:e||"chevronLeft16",className:_(t,"lightbox-dialog__prev")});exports.DialogBaseWithState=de;exports.EbayDialogActions=N;exports.EbayDialogCloseButton=q;exports.EbayDialogFooter=$;exports.EbayDialogHeader=F;exports.EbayDialogPreviousButton=R;
|
package/drawer-BxxlJwkZ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const o=require("react"),m=require("classnames"),i=require("./dialog-previous-button-7ePoYWyj.js");require("./icon-button-BB6GFLm7.js");const y=30,t="drawer-dialog",q=({expanded:l=!1,noHandle:T,onClose:d=()=>{},onCollapsed:D=()=>{},onExpanded:_=()=>{},a11yMaximizeText:b,a11yMinimizeText:p,children:H,...u})=>{let a=[];const[s,w]=o.useState(l);o.useEffect(()=>{w(l)},[l]);const c=e=>{w(e),e?_():D()},S=e=>{a=Array.from(e.changedTouches).map(({identifier:r,pageY:n})=>({identifier:r,pageY:n}))},h=e=>{Array.from(e.changedTouches).forEach(({identifier:r})=>{const n=a.findIndex(f=>f.identifier===r);n>-1&&a.splice(n,1)})},x=e=>{a.length&&Array.from(e.changedTouches).forEach(({identifier:r,pageY:n})=>{const f=a.findIndex($=>$.identifier===r),E=n-a[f].pageY;E>y?(s?c(!1):d(),h(e)):E<-y&&(c(!0),h(e))})},C=T?null:o.createElement("button",{"aria-label":s?p:b,className:`${t}__handle`,onClick:()=>c(!s),onScroll:()=>c(!0),onTouchStart:S,onTouchMove:x,onTouchEnd:h,type:"button"}),g=o.Children.toArray(H),k=g.find(({type:e})=>e===i.EbayDialogHeader),A=g.filter(({type:e})=>e!==i.EbayDialogHeader);return o.createElement(i.DialogBaseWithState,{...u,classPrefix:t,onCloseBtnClick:d,className:m(u.className,`${t}--mask-fade-slow`),windowClass:m(u.windowClass,`${t}__window`,`${t}__window--slide`,{[`${t}__window--expanded`]:s}),onBackgroundClick:d,top:C},k||o.createElement(i.EbayDialogHeader,null),A)};exports.EbayDrawerDialog=q;
|