@ebay/ui-core-react 8.11.0 → 8.11.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/dialog-previous-button-M5TO2e3G.js +1 -0
- package/ebay-alert-dialog/index.js +1 -1
- package/ebay-confirm-dialog/index.js +1 -1
- package/ebay-dialog-base/index.js +1 -1
- package/ebay-drawer-dialog-deprecated/index.js +1 -1
- package/ebay-file-preview-card/index.js +1 -1
- package/ebay-file-preview-card-group/index.js +1 -1
- package/ebay-fullscreen-dialog-deprecated/index.js +1 -1
- package/ebay-infotip/index.js +1 -1
- package/ebay-item-tile/index.js +1 -1
- package/ebay-item-tile-group/index.js +1 -1
- package/ebay-lightbox-dialog/index.js +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-page-notice/page-notice.d.ts.map +1 -1
- package/ebay-panel-dialog/index.js +1 -1
- package/ebay-snackbar-dialog/index.js +1 -1
- package/ebay-split-button/index.js +1 -1
- package/ebay-toast-dialog/index.js +1 -1
- package/{file-preview-card-DhE3ImRG.js → file-preview-card-BIxueUvj.js} +1 -1
- package/{item-tile-CJ674vES.js → item-tile-B2qgFBNQ.js} +1 -1
- package/{lightbox-dialog-q62AUlIh.js → lightbox-dialog--BV3usxS.js} +1 -1
- package/menu-button-label-BcREqk0b.js +1 -0
- package/package.json +3 -3
- package/dialog-previous-button-DvWLfiq0.js +0 -1
- package/menu-button-label-BOHK__Vy.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const h=require("./tslib.es6-C4EgNkz1.js"),o=require("react"),ae=require("react-remove-scroll"),w=require("classnames"),ie=require("makeup-screenreader-trap"),se=require("makeup-keyboard-trap"),le=require("./icon-CR8ApQBy.js"),ce=require("./random-id-DlJj_RWH.js"),de=require("./icon-button-B1aE4GTn.js");function W(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const A=W(ie),q=W(se),F=e=>{var{children:t}=e,n=h.__rest(e,["children"]);return o.createElement("h2",Object.assign({},n),t)},T=({children:e})=>o.createElement(o.Fragment,null,e),$=({children:e})=>o.createElement(o.Fragment,null,e);function z({open:e,classPrefix:t,transitionElement:n,dialogRef:r,dialogWindowRef:u,enabled:m,onTransitionEnd:c}){const s=o.useRef(e);o.useLayoutEffect(()=>{if(!m)return;let i=[u,r];n==="window"?i=[u]:n==="root"&&(i=[r]);let a;return e?a=ue({dialog:r,waitFor:i,classPrefix:t,onTransitionEnd:c}):s.current!==e&&(a=me({dialog:r,waitFor:i,classPrefix:t,onTransitionEnd:c})),s.current=e,()=>{a&&a()}},[e,m])}function ue({dialog:e,waitFor:t,classPrefix:n,onTransitionEnd:r}){return K(e,t,`${n}--show`,r)}function me({dialog:e,waitFor:t,classPrefix:n,onTransitionEnd:r}){return K(e,t,`${n}--hide`,r)}function K(e,t,n,r){if(!e.current||!n)return;let u=0;const m=t?t.length:0,c=`${n}-init`;return e.current.classList.add(c),fe(()=>{e.current&&(e.current.classList.add(n),e.current.classList.remove(c),t.forEach(s=>{const i=()=>{var a,b;++u===m&&((a=e.current)===null||a===void 0||a.classList.remove(n),r(),(b=s.current)===null||b===void 0||b.removeEventListener("transitionend",i))};s.current.addEventListener("transitionend",i,{once:!0})}))})}function fe(e){let t,n;return window.requestAnimationFrame?(t=window.requestAnimationFrame(()=>{t=window.requestAnimationFrame(e)}),n=window.cancelAnimationFrame):(t=window.setTimeout(e,26),n=window.clearTimeout),()=>{t&&(n(t),t=void 0)}}const be=e=>{var t,{baseEl:n="div",classPrefix:r="drawer-dialog",windowClass:u,windowType:m,mainId:c,top:s,header:i,buttonPosition:a="right",children:b,ariaLabelledby:_,a11yCloseText:B,onCloseBtnClick:y=()=>{},footer:v,actions:C,onScroll:l,open:d=!1,onOpen:V=()=>{},onBackgroundClick:G=()=>{},ignoreEscape:J,closeButton:Q,previousButton:U,isModal:D,role:X="dialog",focus:I,transitionElement:Y,animated:M,closeButtonClass:Z}=e,E=h.__rest(e,["baseEl","classPrefix","windowClass","windowType","mainId","top","header","buttonPosition","children","ariaLabelledby","a11yCloseText","onCloseBtnClick","footer","actions","onScroll","open","onOpen","onBackgroundClick","ignoreEscape","closeButton","previousButton","isModal","role","focus","transitionElement","animated","closeButtonClass"]);const S=o.useRef(null),p=o.useRef(null),P=o.useRef(null),[ee,te]=o.useState("");o.useEffect(()=>{te(ce.randomId())},[]);const ne=f=>{var g;(g=E.onClick)===null||g===void 0||g.call(E,f),p.current&&!p.current.contains(f.target)&&G(f)};o.useEffect(()=>(d&&D?(A.trap(p.current),q.trap(p.current)):(A.untrap(),q.untrap()),()=>{A.untrap(),q.untrap()})),z({open:d,classPrefix:r,transitionElement:Y,dialogRef:S,dialogWindowRef:p,enabled:M,onTransitionEnd:()=>R(d)});const O=f=>{!J&&f.key==="Escape"&&(f.stopPropagation(),y(f))};o.useEffect(()=>{M||R(d),d&&V()},[d]);function R(f){var g,L;if(f)return I?(g=I.current)===null||g===void 0||g.focus():D&&((L=P.current)===null||L===void 0||L.focus()),document.addEventListener("keydown",O,!1),()=>document.removeEventListener("keydown",O,!1)}const x=a!=="hidden"&&o.createElement("button",{ref:P,className:w("icon-btn",Z,`${r}__close`,{"icon-btn--transparent":r==="toast-dialog"}),type:"button","aria-label":B,onClick:y},Q||o.createElement(le.EbayIcon,{name:"close16"})),oe=m?`${r}__${m}-window`:`${r}__window`,H=((t=i?.props)===null||t===void 0?void 0:t.id)||`dialog-title-${ee}`,re=_||H,k=i?o.cloneElement(i,Object.assign(Object.assign({},i.props),{id:H})):null;return o.createElement(n,Object.assign({},E,{"aria-labelledby":re,"aria-modal":"true",role:X,hidden:!d,className:w(r,E.className),"aria-live":D?void 0:"polite",ref:S,onKeyDown:O,onMouseDown:d&&a!=="hidden"?ne:E.onMouseDown}),o.createElement("div",{className:w(oe,u),ref:p},s,k&&o.createElement("div",{className:`${r}__header`},U,a==="right"&&k,a!=="bottom"&&x,(a==="left"||a==="hidden")&&k),o.createElement("div",{id:c,className:`${r}__main`,onScroll:l},b),C?o.createElement("div",{className:`${r}__actions`},C):null,v||a==="bottom"?o.createElement("div",{className:`${r}__footer`},v,a==="bottom"&&x):null))},ge=e=>{var{isModal:t,open:n,children:r,animated:u=!0}=e,m=h.__rest(e,["isModal","open","children","animated"]);const c=t!==!1,s=o.Children.toArray(r),i=s.find(l=>l.type===F),a=s.find(l=>l.type===T),b=s.find(l=>l.type===N),_=s.find(l=>l.type===$),B=s.find(l=>l.type===j),y=s.filter(l=>![F,T,$,N,j].some(d=>d===l.type)),v=o.createElement(be,Object.assign({},m,{open:n,isModal:c,header:i,footer:a,actions:b,closeButton:_,previousButton:B,animated:u}),y);return u||n?c?o.createElement(ae.RemoveScroll,{enabled:n},v):v:null},N=({children:e})=>o.createElement(o.Fragment,null,e),j=e=>{var{className:t,icon:n}=e,r=h.__rest(e,["className","icon"]);return o.createElement(de.EbayIconButton,Object.assign({},r,{icon:n||"chevronLeft16",className:w(t,"lightbox-dialog__prev")}))};exports.DialogBaseWithState=ge;exports.EbayDialogActions=N;exports.EbayDialogCloseButton=$;exports.EbayDialogFooter=T;exports.EbayDialogHeader=F;exports.EbayDialogPreviousButton=j;exports.useDialogAnimation=z;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),u=require("classnames"),n=require("../dialog-previous-button-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),u=require("classnames"),n=require("../dialog-previous-button-M5TO2e3G.js");require("../icon-button-B1aE4GTn.js");const g=require("../button-BeNUU3lZ.js"),t="alert-dialog",f=a=>{var{a11yCloseText:l="Close Dialog",confirmText:s,onConfirm:c=()=>{}}=a,o=m.__rest(a,["a11yCloseText","confirmText","onConfirm"]);const r=e.useRef(null),d="alert-dialog-confirm",i="alert-dialog-main";return e.createElement(n.DialogBaseWithState,Object.assign({focus:r},o,{a11yCloseText:l,role:"alertdialog",classPrefix:t,ignoreEscape:!0,mainId:i,buttonPosition:"hidden",className:u(o.className,`${t}--mask-fade`),windowClass:`${t}__window ${t}__window--animate`}),o.children,e.createElement(n.EbayDialogFooter,null,e.createElement(g.EbayButton,{priority:"primary","aria-describedby":i,onClick:c,ref:r,id:d,className:"alert-dialog__acknowledge"},s)))};exports.EbayAlertDialog=f;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),b=require("classnames"),c=require("../dialog-previous-button-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),b=require("classnames"),c=require("../dialog-previous-button-M5TO2e3G.js");require("../icon-button-B1aE4GTn.js");const s=require("../button-BeNUU3lZ.js"),o="confirm-dialog",y=t=>{var{a11yCloseText:l="Close Dialog",confirmText:m,rejectText:f,onReject:n=()=>{},onConfirm:d=()=>{}}=t,i=g.__rest(t,["a11yCloseText","confirmText","rejectText","onReject","onConfirm"]);const r=e.useRef(null),u="confirm-dialog-confirm",a="confirm-dialog-main";return e.createElement(c.DialogBaseWithState,Object.assign({focus:r},i,{a11yCloseText:l,role:"dialog",mainId:a,classPrefix:o,className:b(i.className,`${o}--mask-fade`),windowClass:`${o}__window ${o}__window--animate`,buttonPosition:"hidden",onCloseBtnClick:n}),i.children,e.createElement(c.EbayDialogFooter,null,e.createElement(s.EbayButton,{onClick:n,className:"confirm-dialog__reject"},f),e.createElement(s.EbayButton,{ref:r,priority:"primary",onClick:d,id:u,"aria-describedby":a,className:"confirm-dialog__confirm"},m)))};exports.EbayConfirmDialog=y;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../dialog-previous-button-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../dialog-previous-button-M5TO2e3G.js");exports.DialogBaseWithState=o.DialogBaseWithState;exports.EbayDialogActions=o.EbayDialogActions;exports.EbayDialogCloseButton=o.EbayDialogCloseButton;exports.EbayDialogFooter=o.EbayDialogFooter;exports.EbayDialogHeader=o.EbayDialogHeader;exports.EbayDialogPreviousButton=o.EbayDialogPreviousButton;exports.useDialogAnimation=o.useDialogAnimation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../tslib.es6-C4EgNkz1.js"),o=require("react"),g=require("classnames"),i=require("../dialog-previous-button-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../tslib.es6-C4EgNkz1.js"),o=require("react"),g=require("classnames"),i=require("../dialog-previous-button-M5TO2e3G.js");require("../icon-button-B1aE4GTn.js");const y=30,t="drawer-dialog",$=p=>{var{expanded:l=!1,noHandle:T,onClose:c=()=>{},onCollapsed:w=()=>{},onExpanded:b=()=>{},a11yMaximizeText:C,a11yMinimizeText:D,children:_}=p,u=A.__rest(p,["expanded","noHandle","onClose","onCollapsed","onExpanded","a11yMaximizeText","a11yMinimizeText","children"]);let a=[];const[s,E]=o.useState(l);o.useEffect(()=>{E(l)},[l]);const d=e=>{E(e),e?b():w()},H=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)})},S=e=>{a.length&&Array.from(e.changedTouches).forEach(({identifier:r,pageY:n})=>{const f=a.findIndex(v=>v.identifier===r),x=n-a[f].pageY;x>y?(s?d(!1):c(),h(e)):x<-y&&(d(!0),h(e))})},M=T?null:o.createElement("button",{"aria-label":s?D:C,className:`${t}__handle`,onClick:()=>d(!s),onScroll:()=>d(!0),onTouchStart:H,onTouchMove:S,onTouchEnd:h,type:"button"}),m=o.Children.toArray(_),k=m.find(({type:e})=>e===i.EbayDialogHeader),q=m.filter(({type:e})=>e!==i.EbayDialogHeader);return o.createElement(i.DialogBaseWithState,Object.assign({},u,{classPrefix:t,onCloseBtnClick:c,className:g(u.className,`${t}--mask-fade-slow`),windowClass:g(u.windowClass,`${t}__window`,`${t}__window--slide`,{[`${t}__window--expanded`]:s}),onBackgroundClick:c,top:M}),k||o.createElement(i.EbayDialogHeader,null),q)};exports.EbayDrawerDialogDeprecated=$;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../file-preview-card-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../file-preview-card-BIxueUvj.js");exports.EbayFilePreviewCard=e.EbayFilePreviewCard;exports.EbayFilePreviewCardAction=e.EbayFilePreviewCardAction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../tslib.es6-C4EgNkz1.js"),o=require("react"),C=require("classnames"),E=require("../utils-C9NL3q0j.js"),b=require("../file-preview-card-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../tslib.es6-C4EgNkz1.js"),o=require("react"),C=require("classnames"),E=require("../utils-C9NL3q0j.js"),b=require("../file-preview-card-BIxueUvj.js"),m=15,f=i=>{var{a11ySeeMoreText:M,onDelete:c,onCancel:l,onAction:a,onMenuAction:u,className:S,children:p}=i,g=A.__rest(i,["a11ySeeMoreText","onDelete","onCancel","onAction","onMenuAction","className","children"]);const[t,h]=o.useState(m),v=()=>{h(r=>r+m)},n=E.filterByType(p,b.EbayFilePreviewCard),d=n.length-t,w=n.slice(0,Math.min(t,n.length));return o.createElement("div",Object.assign({className:C("file-preview-card-group",S)},g),o.createElement("ul",null,w.map((r,s)=>o.cloneElement(r,{as:r.props.as||"li",onDelete:e=>c&&c(e,{index:s}),onCancel:e=>l&&l(e,{index:s}),onAction:e=>a&&a(e,{index:s}),onMenuAction:(e,y)=>u&&u(e,{index:s,menuActionEvent:y})})),d>0&&o.cloneElement(n[t],{seeMore:d,a11ySeeMoreText:M,onSeeMore:v,as:n[t].props.as||"li"})))};exports.EbayFilePreviewCardGroup=f;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../tslib.es6-C4EgNkz1.js"),c=require("react"),t=require("classnames"),u=require("../dialog-previous-button-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../tslib.es6-C4EgNkz1.js"),c=require("react"),t=require("classnames"),u=require("../dialog-previous-button-M5TO2e3G.js");require("../icon-button-B1aE4GTn.js");const e="fullscreen-dialog",d=s=>{var{open:o,onClose:a=()=>{},className:n,animated:i}=s,l=r.__rest(s,["open","onClose","className","animated"]);return c.createElement(u.DialogBaseWithState,Object.assign({},l,{classPrefix:e,buttonPosition:"right",onCloseBtnClick:a,transitionElement:"window",animated:i,className:t(n,`${e}--mask-fade-slow`),windowClass:t(`${e}__window`,`${e}__window--slide`),open:o}))};exports.EbayFullscreenDialogDeprecated=d;
|
package/ebay-infotip/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),R=require("classnames"),d=require("../utils-C9NL3q0j.js"),c=require("../use-tooltip-CNTlgBVF.js"),P=require("../dialog-previous-button-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),R=require("classnames"),d=require("../utils-C9NL3q0j.js"),c=require("../use-tooltip-CNTlgBVF.js"),P=require("../dialog-previous-button-M5TO2e3G.js");require("react-remove-scroll");require("makeup-screenreader-trap");require("makeup-keyboard-trap");const F=require("../icon-CR8ApQBy.js");require("../icon-button-B1aE4GTn.js");const $=require("classnames/dedupe"),D=require("../forwardRef-DBQKIlPy.js"),B=require("../lightbox-dialog--BV3usxS.js"),M=t=>{var{icon:n,className:o,children:i,forwardedRef:p,variant:u}=t,a=g.__rest(t,["icon","className","children","forwardedRef","variant"]);const f=u==="modal"?"dialog--mini":"infotip",s=e.createElement(F.EbayIcon,{name:n}),r=i instanceof Function?i({icon:s}):i;return e.createElement("button",Object.assign({},a,{className:$("icon-btn icon-btn--transparent",o,`${f}__host`),type:"button",ref:p}),r||s)},E=D.withForwardRef(M),S=({variant:t="default",pointer:n,overlayStyle:o,disabled:i,onExpand:p,onCollapse:u,children:a,initialExpanded:f,icon:s="information16",a11yCloseText:r,"aria-label":H,className:j})=>{const y=e.useRef(null),{isExpanded:l,expandTooltip:v,collapseTooltip:m}=c.useTooltip({onCollapse:u,onExpand:p,initialExpanded:f,hostRef:y}),b=t==="modal",O=e.useRef(null),h=d.findComponent(a,T),q=d.findComponent(a,w),C=d.findComponent(a,E)||e.createElement(E),x=()=>{l?m():v()};if(!q)throw new Error("EbayInfotip: Please use a EbayInfotipContent that defines the content of the infotip");const I=q.props,{children:_}=I,N=g.__rest(I,["children"]);return e.createElement(e.Fragment,null,e.createElement(c.Tooltip,{type:"infotip",isExpanded:l,className:R(j,{"dialog--mini":b}),ref:O},e.createElement(c.TooltipHost,null,e.cloneElement(C,Object.assign({ref:y,onClick:x,disabled:i,variant:t,"aria-label":H,"aria-expanded":l,icon:s},C.props))),!b&&e.createElement(c.TooltipContent,Object.assign({},N,{type:"infotip",style:o,pointer:n,showCloseButton:!0,a11yCloseText:r,onClose:m}),h,_)),b&&e.createElement(B.EbayLightboxDialog,Object.assign({},N,{open:l,onClose:m,a11yCloseText:r,className:"dialog--mini__overlay"}),e.createElement(P.EbayDialogHeader,null,h),_))},T=t=>{var{className:n}=t,o=g.__rest(t,["className"]);return e.createElement("span",Object.assign({},o,{className:R("infotip__heading",n)}))},w=({children:t})=>e.createElement(e.Fragment,null,t);exports.EbayInfotip=S;exports.EbayInfotipContent=w;exports.EbayInfotipHeading=T;exports.EbayInfotipHost=E;
|
package/ebay-item-tile/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../item-tile-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../item-tile-B2qgFBNQ.js");exports.EbayItemTile=e.EbayItemTile;exports.EbayItemTileAction=e.EbayItemTileAction;exports.EbayItemTileDescription=e.EbayItemTileDescription;exports.EbayItemTileSubtitle=e.EbayItemTileSubtitle;exports.EbayItemTileSupertitle=e.EbayItemTileSupertitle;exports.EbayItemTileTitle=e.EbayItemTileTitle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),y=require("classnames"),p=require("../utils-C9NL3q0j.js"),b=require("../item-tile-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),y=require("classnames"),p=require("../utils-C9NL3q0j.js"),b=require("../item-tile-B2qgFBNQ.js"),d=t=>{var{layout:i,className:n,onAction:l,children:s}=t,o=m.__rest(t,["layout","className","onAction","children"]);const c=p.filterByType(s,b.EbayItemTile);return e.createElement("div",Object.assign({className:y("layout-grid item-tile-group",n,{"item-tile-group--list-view":i==="list"})},o),e.createElement("ul",null,c.map((a,r)=>e.createElement("li",{key:r},e.cloneElement(a,{layout:i,onAction:u=>l&&l(u,{index:r})})))))};exports.EbayItemTileGroup=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../lightbox-dialog
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../lightbox-dialog--BV3usxS.js");exports.EbayLightboxDialog=o.EbayLightboxDialog;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../menu-button-label-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../menu-button-label-BcREqk0b.js"),t=require("../menu-fWohPckl.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,EAAgC,EAAE,EAAyC,MAAM,OAAO,CAAC;AAQvG,OAAO,EAAgF,eAAe,EAAE,MAAM,SAAS,CAAC;AASxH,QAAA,MAAM,cAAc,EAAE,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"menu-button.d.ts","sourceRoot":"","sources":["../../src/ebay-menu-button/menu-button.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAgC,EAAE,EAAyC,MAAM,OAAO,CAAC;AAQvG,OAAO,EAAgF,eAAe,EAAE,MAAM,SAAS,CAAC;AASxH,QAAA,MAAM,cAAc,EAAE,EAAE,CAAC,eAAe,CAwJvC,CAAC;AAgBF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),P=require("classnames"),h=require("../notice-content-9iF4T8uB.js"),l=require("../notice-content-C0ZStfuX.js"),o=require("../icon-CR8ApQBy.js"),T=require("../utils-C9NL3q0j.js"),m=require("../notice-footer-G6VPjVZu.js"),q=require("../notice-cta-CKl_qBge.js"),f=t=>{var{id:a,status:s="general",children:n,a11yDismissText:i,"aria-label":u,onDismiss:y=()=>{},className:E}=t,g=r.__rest(t,["id","status","children","a11yDismissText","aria-label","onDismiss","className"]);const[N,d]=e.useState(!1),c=T.findComponent(n,l.EbayNoticeContent);if(!c)throw new Error("EbayPageNotice: Please use a EbayNoticeContent that defines the content of the notice");const p=C=>{d(!0),y(C)};return N?null:e.createElement("section",Object.assign({},g,{"aria-labelledby":a||`${s}-status`,className:P("page-notice",E,{[`page-notice--${s}`]:s!=="general"})}),s!=="general"?e.createElement("div",{className:"page-notice__header",id:a||`${s}-status`},e.createElement(o.EbayIcon,{name:`${s}Filled16`,a11yText:u,a11yVariant:"label"})):null,e.createElement(h.NoticeContent,Object.assign({},c.props,{type:"page"})),n,i&&e.createElement(b,null,e.createElement("button",{"aria-label":i,className:"fake-link page-notice__dismiss",onClick:p},e.createElement(o.EbayIcon,{name:"close16"}))))},_=t=>{var{className:a,as:s,children:n}=t,i=r.__rest(t,["className","as","children"]);return e.createElement(m.NoticeTitle,Object.assign({},i,{className:a,as:s,type:"page"}),n)},b=({className:t,children:a})=>e.createElement(m.NoticeFooter,{className:t,type:"page"},a),D=({className:t,children:a})=>e.createElement(q.NoticeCTA,{className:t,type:"page"},a);exports.EbayNoticeContent=l.EbayNoticeContent;exports.EbayPageNotice=f;exports.EbayPageNoticeCTA=D;exports.EbayPageNoticeFooter=b;exports.EbayPageNoticeTitle=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-notice.d.ts","sourceRoot":"","sources":["../../src/ebay-page-notice/page-notice.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,oBAAoB,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"page-notice.d.ts","sourceRoot":"","sources":["../../src/ebay-page-notice/page-notice.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,oBAAoB,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAQrG,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,WAAW,GAAG,cAAc,GAAG,aAAa,CAAC;AACxF,MAAM,MAAM,KAAK,GAAG,cAAc,CAAC,SAAS,CAAC,GAAG;IAC5C,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,iBAAiB,GAAG,oBAAoB,CAAC;CACxD,CAAC;AAEF,QAAA,MAAM,cAAc,EAAE,EAAE,CAAC,KAAK,CAkD7B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../tslib.es6-C4EgNkz1.js"),d=require("react"),t=require("classnames"),u=require("../dialog-previous-button-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../tslib.es6-C4EgNkz1.js"),d=require("react"),t=require("classnames"),u=require("../dialog-previous-button-M5TO2e3G.js");require("../icon-button-B1aE4GTn.js");const e="panel-dialog",g=o=>{var{open:i,animated:s,position:n="start",onClose:a=()=>{},className:l}=o,r=c.__rest(o,["open","animated","position","onClose","className"]);return d.createElement(u.DialogBaseWithState,Object.assign({},r,{"aria-label":"Infotip",classPrefix:e,buttonPosition:"right",onCloseBtnClick:a,onBackgroundClick:a,animated:s,className:t(l,{[`${e}--mask-fade-slow`]:s}),windowClass:t(`${e}__window--slide`,{[`${e}__window--end`]:n==="end"}),open:i}))};exports.EbayPanelDialog=g;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("../tslib.es6-C4EgNkz1.js"),y=require("classnames"),e=require("react"),h=require("../dialog-previous-button-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("../tslib.es6-C4EgNkz1.js"),y=require("classnames"),e=require("react"),h=require("../dialog-previous-button-M5TO2e3G.js");require("../icon-button-B1aE4GTn.js");const k=require("../utils-C9NL3q0j.js"),E=n=>{var{className:l,children:c}=n,r=C.__rest(n,["className","children"]);return e.createElement("button",Object.assign({className:y(l,"fake-link")},r),c)},R=6e3,B=n=>{var{className:l,onOpen:c=()=>{},onClose:r=()=>{},layout:D,open:i,children:f,onAction:u}=n,S=C.__rest(n,["className","onOpen","onClose","layout","open","children","onAction"]);const o=e.useRef(new Set),g=e.useRef(null),[T,v]=e.useState(i),t=k.findComponent(f,E),_=k.excludeComponent(f,E),s=()=>{clearTimeout(g.current)},d=()=>{v(!1),r()},m=()=>{o.current.size===0&&(s(),g.current=setTimeout(()=>{d()},R))},q=()=>{v(!0),c(),m()},N=()=>{s(),o.current.add("focus")},O=()=>{o.current.delete("focus"),m()},A=()=>{s(),o.current.add("mouseEnter")},M=()=>{o.current.delete("mouseEnter"),m()},w=p=>{var a,b;s(),u?.(p),(b=(a=t?.props)===null||a===void 0?void 0:a.onClick)===null||b===void 0||b.call(a,p),d()};return e.useEffect(()=>()=>{s()},[]),e.useEffect(()=>{i?q():d()},[i]),e.createElement(h.DialogBaseWithState,Object.assign({},S,{open:T,isModal:!1,baseEl:"aside",classPrefix:"snackbar-dialog",transitionElement:"root",a11yCloseText:"",buttonPosition:"hidden",className:y(l,"snackbar-dialog--transition"),windowClass:D==="column"&&"snackbar-dialog__window--column",onFocus:N,onBlur:O,onMouseEnter:A,onMouseLeave:M}),_,t?e.createElement(h.EbayDialogActions,null,e.cloneElement(t,{onClick:w})):null)};exports.EbaySnackbarDialog=B;exports.EbaySnackbarDialogAction=E;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../tslib.es6-C4EgNkz1.js"),n=require("react"),i=require("../utils-C9NL3q0j.js"),g=require("../button-BeNUU3lZ.js"),s=require("../menu-button-label-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../tslib.es6-C4EgNkz1.js"),n=require("react"),i=require("../utils-C9NL3q0j.js"),g=require("../button-BeNUU3lZ.js"),s=require("../menu-button-label-BcREqk0b.js"),x=require("../menu-fWohPckl.js");require("classnames");const q=o=>{var{a11yMenuText:u,children:a,type:l,bodyState:t,a11yButtonLoadingText:y,onCollapse:c,onExpand:d,onSelect:p=()=>{},onChange:b=()=>{}}=o,e=S.__rest(o,["a11yMenuText","children","type","bodyState","a11yButtonLoadingText","onCollapse","onExpand","onSelect","onChange"]);const r=[x.EbayMenuItem,s.EbayMenuButtonSeparator],m=i.filterBy(a,B=>!r.includes(B.type)),E=i.filterByType(a,r);return n.createElement("span",{className:"split-button"},n.createElement(g.EbayButton,Object.assign({"aria-label":t==="loading"?y:void 0},e,{ref:void 0,split:"start",bodyState:t==="expand"?void 0:t}),m),n.createElement(s.EbayMenuButton,{priority:e.priority,disabled:e.disabled,transparent:e.transparent,size:e.size,type:l,split:"end",reverse:!0,a11yText:u,onCollapse:c,onExpand:d,onSelect:p,onChange:b},E))};exports.EbaySplitButton=q;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../tslib.es6-C4EgNkz1.js"),i=require("react"),r=require("classnames"),l=require("../dialog-previous-button-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../tslib.es6-C4EgNkz1.js"),i=require("react"),r=require("classnames"),l=require("../dialog-previous-button-M5TO2e3G.js");require("../icon-button-B1aE4GTn.js");const n=e=>{var{className:t,onClose:s=()=>{}}=e,o=a.__rest(e,["className","onClose"]);return i.createElement(l.DialogBaseWithState,Object.assign({},o,{isModal:!1,baseEl:"aside",classPrefix:"toast-dialog",buttonPosition:"right",transitionElement:"root",className:r(t,"toast-dialog--transition"),onCloseBtnClick:s}))};exports.EbayToast=n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const O=require("./tslib.es6-C4EgNkz1.js"),e=require("react"),g=require("classnames"),P=require("./utils-C9NL3q0j.js"),N=require("./icon-button-B1aE4GTn.js"),j=require("./menu-button-label-
|
|
1
|
+
"use strict";const O=require("./tslib.es6-C4EgNkz1.js"),e=require("react"),g=require("classnames"),P=require("./utils-C9NL3q0j.js"),N=require("./icon-button-B1aE4GTn.js"),j=require("./menu-button-label-BcREqk0b.js"),C=require("./menu-fWohPckl.js"),U=require("./progress-spinner-BqahPJmn.js"),M=require("./icon-CR8ApQBy.js"),L=({status:t,menuActions:r,onMenuAction:l,deleteText:s,onCancel:a,onDelete:i,onAction:E,a11yCancelUploadText:u,action:n})=>{const f=(c,d)=>{var o;if(d){const v=(o=d.checked)===null||o===void 0?void 0:o[0],p=r&&v!==void 0&&v in r?r[v].event:null;p&&l?l(c,Object.assign(Object.assign({},d),{eventName:p})):i&&i(c)}};return t==="uploading"?e.createElement(N.EbayIconButton,{"aria-label":u,onClick:a,className:"file-preview-card__action",icon:"close16"}):r?.length?e.createElement(e.Fragment,null,e.createElement(j.EbayMenuButton,{variant:"overflow",className:"file-preview-card__action",onSelect:f},r.map(c=>e.createElement(C.EbayMenuItem,{value:c.event,key:c.label},c.label)),e.createElement(C.EbayMenuItem,{key:"delete",value:"delete"},s))):n?.props&&n.props.icon&&n.props["aria-label"]?e.createElement(N.EbayIconButton,Object.assign({onClick:E,className:g("file-preview-card__action",n.props.className)},n.props)):s?e.createElement(N.EbayIconButton,{"aria-label":s,className:"file-preview-card__action",icon:"delete16",onClick:i}):e.createElement(e.Fragment,null)},F=({file:t,status:r,seeMore:l})=>{if(r==="uploading")return e.createElement(U.EbayProgressSpinner,{className:"file-preview-card__asset"});switch(t?.type){case"video":return e.createElement("video",{className:"file-preview-card__asset",src:t.src});case"image":return e.createElement("img",{className:g("file-preview-card__asset",{"file-preview-card__asset--fade":l&&l>0}),src:t?.src,alt:t?.name});default:return e.createElement(M.EbayIcon,{name:"file24",className:"file-preview-card__asset"})}},R=({file:t,infoText:r})=>t&&t.type!=="image"?e.createElement("div",{className:"file-preview-card__info"},t.type==="video"&&e.createElement(M.EbayIcon,{name:"play16",className:"file-preview-card__video-icon"}),r||t.name.substring(t.name.lastIndexOf(".")+1).toUpperCase()):e.createElement(e.Fragment,null),h=()=>null,A=t=>{var{a11yCancelUploadText:r,status:l,as:s="div",file:a,seeMore:i,deleteText:E,footerTitle:u,footerSubtitle:n,a11ySeeMoreText:f,menuActions:c,infoText:d,href:o,onCancel:v,onDelete:p,onMenuAction:S,onSeeMore:q,onAction:x,className:I,children:T}=t,k=O.__rest(t,["a11yCancelUploadText","status","as","file","seeMore","deleteText","footerTitle","footerSubtitle","a11ySeeMoreText","menuActions","infoText","href","onCancel","onDelete","onMenuAction","onSeeMore","onAction","className","children"]);const B=P.findComponent(T,h),b=e.useMemo(()=>{var _,y;if(!a)return;let w=a,m;return!((_=a?.type)===null||_===void 0)&&_.startsWith("image")?m="image":!((y=a?.type)===null||y===void 0)&&y.startsWith("video")&&(m="video"),a instanceof File&&(w={name:a.name,type:m,src:m?URL.createObjectURL(a):void 0}),w.type=m,w},[a]);return e.createElement(s,Object.assign({className:g("file-preview-card",I)},k),e.createElement("div",{className:"file-preview-card__body"},o?e.createElement("a",{href:o},e.createElement(F,{file:b,status:l,seeMore:i})):e.createElement(F,{file:b,status:l,seeMore:i}),i&&i>0?e.createElement("button",{type:"button",className:"file-preview-card__see-more",onClick:q,"aria-label":f},e.createElement("span",null,"+",i)):e.createElement(L,{a11yCancelUploadText:r,status:l,menuActions:c,onMenuAction:S,deleteText:E,onCancel:v,onDelete:p,onAction:x,action:B}),e.createElement(R,{file:b,infoText:d})),u&&e.createElement("div",{className:"file-preview-card__footer"},e.createElement("span",null,u),n&&e.createElement("span",null,n)))};exports.EbayFilePreviewCard=A;exports.EbayFilePreviewCardAction=h;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("./tslib.es6-C4EgNkz1.js"),i=require("react"),I=require("classnames"),s=require("./utils-C9NL3q0j.js"),m=require("./file-preview-card-
|
|
1
|
+
"use strict";const a=require("./tslib.es6-C4EgNkz1.js"),i=require("react"),I=require("classnames"),s=require("./utils-C9NL3q0j.js"),m=require("./file-preview-card-BIxueUvj.js"),o=()=>null,E=e=>{var{children:l}=e,t=a.__rest(e,["children"]);return i.createElement("div",Object.assign({className:"item-tile__section-primary"},t),l)},d=e=>{var{href:l,children:t}=e,n=a.__rest(e,["href","children"]);return i.createElement("a",Object.assign({href:l,className:"item-tile__title"},n),t)},b=e=>{var{children:l}=e,t=a.__rest(e,["children"]);return i.createElement("div",Object.assign({className:"item-tile__subtitle"},t),l)},u=e=>{var{as:l="p",children:t}=e,n=a.__rest(e,["as","children"]);return i.createElement(l,Object.assign({},n),t)},N=({title:e,subtitle:l,descriptions:t})=>i.createElement(i.Fragment,null,e||l?i.createElement("div",{className:"item-tile__section-secondary"},e,l):null,t?.length?i.createElement("div",{className:"item-tile__section-tertiary"},t):null),g=e=>{var{file:l,href:t,layout:n,className:y,onAction:_,children:r}=e,v=a.__rest(e,["file","href","layout","className","onAction","children"]);const h=s.findComponent(r,E),T=s.findComponent(r,d),p=s.findComponent(r,b),c=s.findComponent(r,o),f=s.filterByType(r,u);return i.createElement("div",Object.assign({className:I(y,"item-tile",{"item-tile--list-view":n==="list"})},v),l&&i.createElement("div",{className:"item-tile__header"},i.createElement(m.EbayFilePreviewCard,{file:l,href:t,onAction:_},c&&i.createElement(m.EbayFilePreviewCardAction,Object.assign({},c.props)))),i.createElement("div",{className:"item-tile__body"},h,i.createElement(N,{title:T,subtitle:p,descriptions:f})))};exports.EbayItemTile=g;exports.EbayItemTileAction=o;exports.EbayItemTileDescription=u;exports.EbayItemTileSubtitle=b;exports.EbayItemTileSupertitle=E;exports.EbayItemTileTitle=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const b=require("./tslib.es6-C4EgNkz1.js"),s=require("react"),n=require("classnames"),d=require("./dialog-previous-button-
|
|
1
|
+
"use strict";const b=require("./tslib.es6-C4EgNkz1.js"),s=require("react"),n=require("classnames"),d=require("./dialog-previous-button-M5TO2e3G.js");require("./icon-button-B1aE4GTn.js");const m=e=>{var{open:l,mode:r,size:t,bannerImgSrc:o,bannerImgPosition:g,onClose:a=()=>{}}=e,i=b.__rest(e,["open","mode","size","bannerImgSrc","bannerImgPosition","onClose"]);const c=o?s.createElement("div",{className:"lightbox-dialog__image",style:{backgroundImage:`url(${o})`,backgroundPosition:g}}):i.top;return s.createElement(d.DialogBaseWithState,Object.assign({buttonPosition:"right"},i,{classPrefix:"lightbox-dialog",onCloseBtnClick:a,onBackgroundClick:a,className:n(i.className,"lightbox-dialog--mask-fade",{[`lightbox-dialog--${t}`]:t,"lightbox-dialog--expressive":o}),windowClass:n("lightbox-dialog__window--animate",{"lightbox-dialog__window--mini":r==="mini"}),top:c,open:l}))};exports.EbayLightboxDialog=m;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const q=require("./tslib.es6-C4EgNkz1.js"),e=require("react"),b=require("classnames"),g=require("./utils-C9NL3q0j.js"),O=require("./menu-fWohPckl.js"),ne=require("./button-BeNUU3lZ.js"),te=require("./icon-button-B1aE4GTn.js"),j=require("./icon-CR8ApQBy.js"),ae=require("./random-id-DlJj_RWH.js"),oe=require("./index-Bsb1LHpi.js"),se=require("./dropdown-B2vObM4k.js"),ce=a=>{var{type:o,variant:s="button",className:p,text:f="",fixWidth:E,reverse:r,expanded:k,noToggleIcon:l,checked:x,collapseOnSelect:S,a11yText:L,prefixId:v,prefixLabel:T,onClick:A=()=>{},onExpand:D=()=>{},onCollapse:F=()=>{},onChange:K=()=>{},onSelect:R=()=>{},children:y}=a,W=q.__rest(a,["type","variant","className","text","fixWidth","reverse","expanded","noToggleIcon","checked","collapseOnSelect","a11yText","prefixId","prefixLabel","onClick","onExpand","onCollapse","onChange","onSelect","children"]);const[c,h]=e.useState(k),[I,H]=e.useState(),{overlayStyles:P,refs:u}=se.useFloatingDropdown({open:c,options:{reverse:r}}),V=u.host,$=u.overlay,C=g.filterByType(y,[O.EbayMenuItem,w]),i=C.map(n=>!!n.props.checked),[d,_]=e.useState(i);e.useEffect(()=>{i.join("|")!==d.join("|")&&_(i)},[i.join("|")]);const z=g.findComponent(y,M),G=g.findComponent(y,j.EbayIcon),J=re({text:f,prefixId:v,prefixLabel:T,menuButtonLabel:z,icon:G}),Q=b("menu-button",p),U=b("menu-button__menu",{"menu-button__menu--fix-width":E,"menu-button__menu--reverse":r});e.useEffect(()=>{const n=t=>{const m=$.current,N=m&&m.contains(t.target);(S||!N)&&h(!1)};return c?(D(),setTimeout(()=>{document.addEventListener("click",n,!1)})):c===!1&&F(),()=>document.removeEventListener("click",n,!1)},[c]),e.useEffect(()=>{H(ae.randomId())},[]);const X=n=>{oe.handleEscapeKeydown(n,()=>{var t;h(!1),(t=V.current)===null||t===void 0||t.focus()})},B=Object.assign({ref:u.setHost,className:"menu-button__button","aria-expanded":!!c,"aria-haspopup":!0,"aria-label":L,"aria-controls":I,"aria-labelledby":v,onClick:n=>{h(!c),A(n)}},W),Y=(n,t)=>{if(o==="radio"||o==="checkbox"){const m=d.map((N,ee)=>t.indexes.includes(ee));_(m)}K(n,t)},Z=()=>{const n=d.findIndex(Boolean);return n>-1?n:x};return e.createElement("span",{className:Q},s==="overflow"?e.createElement(te.EbayIconButton,Object.assign({icon:"overflowVertical16"},B)):e.createElement(ne.EbayButton,Object.assign({variant:s==="form"?"form":void 0},B),J,l?null:e.createElement(j.EbayIcon,{name:"chevronDown12"})),c&&e.createElement(O.EbayMenu,{baseEl:"div",ref:u.setOverlay,type:o,className:U,tabIndex:-1,id:I,autofocus:!0,checked:Z(),onKeyDown:X,onChange:Y,onSelect:R,style:P},C.map((n,t)=>e.cloneElement(n,Object.assign(Object.assign({},n.props),{className:b(n.props.className,"menu-button__item"),key:t,checked:d[t]})))))};function re({text:a,prefixId:o,prefixLabel:s,menuButtonLabel:p,icon:f}){const E=a.length?e.createElement("span",null,a):null,r=!o&&s&&e.createElement(e.Fragment,null,e.createElement("span",{className:"menu-button-prefix-label",key:"prefix-label"},s)," ");return[f,r,p||E].filter(Boolean).map((l,x)=>e.cloneElement(l,Object.assign(Object.assign({},l.props),{key:x})))}const w=a=>{var{className:o}=a,s=q.__rest(a,["className"]);return e.createElement("hr",Object.assign({},s,{className:b(o,"menu-button__separator")}))},M=({children:a})=>e.createElement(e.Fragment,null,a);exports.EbayMenuButton=ce;exports.EbayMenuButtonLabel=M;exports.EbayMenuButtonSeparator=w;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ebay/ui-core-react",
|
|
3
|
-
"version": "8.11.
|
|
3
|
+
"version": "8.11.1",
|
|
4
4
|
"description": "Skin components build off React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"React",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"string-width": "4.2.3"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@floating-ui/react": "^0.27.
|
|
57
|
+
"@floating-ui/react": "^0.27.15",
|
|
58
58
|
"classnames": "^2.5.1",
|
|
59
59
|
"makeup-active-descendant": "^0.7.8",
|
|
60
60
|
"makeup-expander": "^0.11.7",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"react-dom": ">= 16.0.0"
|
|
74
74
|
},
|
|
75
75
|
"optionalDependencies": {
|
|
76
|
-
"shaka-player": "^4.15.
|
|
76
|
+
"shaka-player": "^4.15.9"
|
|
77
77
|
},
|
|
78
78
|
"publishConfig": {
|
|
79
79
|
"directory": "dist",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const _=require("./tslib.es6-C4EgNkz1.js"),o=require("react"),ae=require("react-remove-scroll"),h=require("classnames"),ie=require("makeup-screenreader-trap"),se=require("makeup-keyboard-trap"),le=require("./icon-CR8ApQBy.js"),ce=require("./random-id-DlJj_RWH.js"),de=require("./icon-button-B1aE4GTn.js");function W(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const A=W(ie),q=W(se),F=e=>{var{children:t}=e,n=_.__rest(e,["children"]);return o.createElement("h2",Object.assign({},n),t)},T=({children:e})=>o.createElement(o.Fragment,null,e),$=({children:e})=>o.createElement(o.Fragment,null,e);function z({open:e,classPrefix:t,transitionElement:n,dialogRef:r,dialogWindowRef:u,enabled:m,onTransitionEnd:d}){const s=o.useRef(e);o.useLayoutEffect(()=>{if(!m)return;let i=[u,r];n==="window"?i=[u]:n==="root"&&(i=[r]);let a;return e?a=ue({dialog:r,waitFor:i,classPrefix:t,onTransitionEnd:d}):s.current!==e&&(a=me({dialog:r,waitFor:i,classPrefix:t,onTransitionEnd:d})),s.current=e,()=>{a&&a()}},[e,m])}function ue({dialog:e,waitFor:t,classPrefix:n,onTransitionEnd:r}){return K(e,t,`${n}--show`,r)}function me({dialog:e,waitFor:t,classPrefix:n,onTransitionEnd:r}){return K(e,t,`${n}--hide`,r)}function K(e,t,n,r){if(!e.current||!n)return;let u=0;const m=t?t.length:0,d=`${n}-init`;return e.current.classList.add(d),fe(()=>{e.current&&(e.current.classList.add(n),e.current.classList.remove(d),t.forEach(s=>{const i=()=>{var a,b;++u===m&&((a=e.current)===null||a===void 0||a.classList.remove(n),r(),(b=s.current)===null||b===void 0||b.removeEventListener("transitionend",i))};s.current.addEventListener("transitionend",i,{once:!0})}))})}function fe(e){let t,n;return window.requestAnimationFrame?(t=window.requestAnimationFrame(()=>{t=window.requestAnimationFrame(e)}),n=window.cancelAnimationFrame):(t=window.setTimeout(e,26),n=window.clearTimeout),()=>{t&&(n(t),t=void 0)}}const be=e=>{var t,{baseEl:n="div",classPrefix:r="drawer-dialog",windowClass:u,windowType:m,mainId:d,top:s,header:i,buttonPosition:a="right",children:b,ariaLabelledby:B,a11yCloseText:C,onCloseBtnClick:y=()=>{},footer:v,actions:D,onScroll:l,open:c=!1,onOpen:V=()=>{},onBackgroundClick:G=()=>{},ignoreEscape:J,closeButton:Q,previousButton:U,isModal:w,role:X="dialog",focus:I,transitionElement:Y,animated:M,closeButtonClass:Z}=e,E=_.__rest(e,["baseEl","classPrefix","windowClass","windowType","mainId","top","header","buttonPosition","children","ariaLabelledby","a11yCloseText","onCloseBtnClick","footer","actions","onScroll","open","onOpen","onBackgroundClick","ignoreEscape","closeButton","previousButton","isModal","role","focus","transitionElement","animated","closeButtonClass"]);const S=o.useRef(null),p=o.useRef(null),P=o.useRef(null),[ee,te]=o.useState("");o.useEffect(()=>{te(ce.randomId())},[]);const ne=f=>{var g;(g=E.onClick)===null||g===void 0||g.call(E,f),p.current&&!p.current.contains(f.target)&&G(f)};o.useEffect(()=>(c&&w?(A.trap(p.current),q.trap(p.current)):(A.untrap(),q.untrap()),()=>{A.untrap(),q.untrap()}),[c,w]),z({open:c,classPrefix:r,transitionElement:Y,dialogRef:S,dialogWindowRef:p,enabled:M,onTransitionEnd:()=>R(c)});const O=f=>{!J&&f.key==="Escape"&&(f.stopPropagation(),y(f))};o.useEffect(()=>{M||R(c),c&&V()},[c]);function R(f){var g,L;if(f)return I?(g=I.current)===null||g===void 0||g.focus():w&&((L=P.current)===null||L===void 0||L.focus()),document.addEventListener("keydown",O,!1),()=>document.removeEventListener("keydown",O,!1)}const x=a!=="hidden"&&o.createElement("button",{ref:P,className:h("icon-btn",Z,`${r}__close`,{"icon-btn--transparent":r==="toast-dialog"}),type:"button","aria-label":C,onClick:y},Q||o.createElement(le.EbayIcon,{name:"close16"})),oe=m?`${r}__${m}-window`:`${r}__window`,H=((t=i?.props)===null||t===void 0?void 0:t.id)||`dialog-title-${ee}`,re=B||H,k=i?o.cloneElement(i,Object.assign(Object.assign({},i.props),{id:H})):null;return o.createElement(n,Object.assign({},E,{"aria-labelledby":re,"aria-modal":"true",role:X,hidden:!c,className:h(r,E.className),"aria-live":w?void 0:"polite",ref:S,onKeyDown:O,onMouseDown:c&&a!=="hidden"?ne:E.onMouseDown}),o.createElement("div",{className:h(oe,u),ref:p},s,k&&o.createElement("div",{className:`${r}__header`},U,a==="right"&&k,a!=="bottom"&&x,(a==="left"||a==="hidden")&&k),o.createElement("div",{id:d,className:`${r}__main`,onScroll:l},b),D?o.createElement("div",{className:`${r}__actions`},D):null,v||a==="bottom"?o.createElement("div",{className:`${r}__footer`},v,a==="bottom"&&x):null))},ge=e=>{var{isModal:t,open:n,children:r,animated:u=!0}=e,m=_.__rest(e,["isModal","open","children","animated"]);const d=t!==!1,s=o.Children.toArray(r),i=s.find(l=>l.type===F),a=s.find(l=>l.type===T),b=s.find(l=>l.type===N),B=s.find(l=>l.type===$),C=s.find(l=>l.type===j),y=s.filter(l=>![F,T,$,N,j].some(c=>c===l.type)),v=o.createElement(be,Object.assign({},m,{open:n,isModal:d,header:i,footer:a,actions:b,closeButton:B,previousButton:C,animated:u}),y);return u||n?d?o.createElement(ae.RemoveScroll,{enabled:n},v):v:null},N=({children:e})=>o.createElement(o.Fragment,null,e),j=e=>{var{className:t,icon:n}=e,r=_.__rest(e,["className","icon"]);return o.createElement(de.EbayIconButton,Object.assign({},r,{icon:n||"chevronLeft16",className:h(t,"lightbox-dialog__prev")}))};exports.DialogBaseWithState=ge;exports.EbayDialogActions=N;exports.EbayDialogCloseButton=$;exports.EbayDialogFooter=T;exports.EbayDialogHeader=F;exports.EbayDialogPreviousButton=j;exports.useDialogAnimation=z;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const O=require("./tslib.es6-C4EgNkz1.js"),e=require("react"),d=require("classnames"),h=require("./utils-C9NL3q0j.js"),B=require("./menu-fWohPckl.js"),ne=require("./button-BeNUU3lZ.js"),te=require("./icon-button-B1aE4GTn.js"),N=require("./icon-CR8ApQBy.js"),ae=require("./random-id-DlJj_RWH.js"),oe=require("./index-Bsb1LHpi.js"),se=require("./dropdown-B2vObM4k.js"),ce=a=>{var{type:o,variant:s="button",className:m,text:b="",fixWidth:p,reverse:r,expanded:g,noToggleIcon:l,checked:f,collapseOnSelect:M,a11yText:S,prefixId:k,prefixLabel:j,onClick:L=()=>{},onExpand:T=()=>{},onCollapse:A=()=>{},onChange:D=()=>{},onSelect:F=()=>{},children:E}=a,K=O.__rest(a,["type","variant","className","text","fixWidth","reverse","expanded","noToggleIcon","checked","collapseOnSelect","a11yText","prefixId","prefixLabel","onClick","onExpand","onCollapse","onChange","onSelect","children"]);const[c,x]=e.useState(g),[v,R]=e.useState(),{overlayStyles:W,refs:u}=se.useFloatingDropdown({open:c,options:{reverse:r}}),H=u.host,P=u.overlay,I=h.filterByType(E,[B.EbayMenuItem,q]),V=I.map(n=>!!n.props.checked),[y,$]=e.useState(V),z=h.findComponent(E,w),G=h.findComponent(E,N.EbayIcon),J=re({text:b,prefixId:k,prefixLabel:j,menuButtonLabel:z,icon:G}),Q=d("menu-button",m),U=d("menu-button__menu",{"menu-button__menu--fix-width":p,"menu-button__menu--reverse":r});e.useEffect(()=>{const n=t=>{const i=P.current,_=i&&i.contains(t.target);(M||!_)&&x(!1)};return c?(T(),setTimeout(()=>{document.addEventListener("click",n,!1)})):c===!1&&A(),()=>document.removeEventListener("click",n,!1)},[c]),e.useEffect(()=>{R(ae.randomId())},[]);const X=n=>{oe.handleEscapeKeydown(n,()=>{var t;x(!1),(t=H.current)===null||t===void 0||t.focus()})},C=Object.assign({ref:u.setHost,className:"menu-button__button","aria-expanded":!!c,"aria-haspopup":!0,"aria-label":S,"aria-controls":v,"aria-labelledby":k,onClick:n=>{x(!c),L(n)}},K),Y=(n,t)=>{if(o==="radio"||o==="checkbox"){const i=y.map((_,ee)=>t.indexes.includes(ee));$(i)}D(n,t)},Z=()=>{const n=y.findIndex(Boolean);return n>-1?n:f};return e.createElement("span",{className:Q},s==="overflow"?e.createElement(te.EbayIconButton,Object.assign({icon:"overflowVertical16"},C)):e.createElement(ne.EbayButton,Object.assign({variant:s==="form"?"form":void 0},C),J,l?null:e.createElement(N.EbayIcon,{name:"chevronDown12"})),c&&e.createElement(B.EbayMenu,{baseEl:"div",ref:u.setOverlay,type:o,className:U,tabIndex:-1,id:v,autofocus:!0,checked:Z(),onKeyDown:X,onChange:Y,onSelect:F,style:W},I.map((n,t)=>e.cloneElement(n,Object.assign(Object.assign({},n.props),{className:d(n.props.className,"menu-button__item"),key:t,checked:y[t]})))))};function re({text:a,prefixId:o,prefixLabel:s,menuButtonLabel:m,icon:b}){const p=a.length?e.createElement("span",null,a):null,r=!o&&s&&e.createElement(e.Fragment,null,e.createElement("span",{className:"menu-button-prefix-label",key:"prefix-label"},s)," ");return[b,r,m||p].filter(Boolean).map((l,f)=>e.cloneElement(l,Object.assign(Object.assign({},l.props),{key:f})))}const q=a=>{var{className:o}=a,s=O.__rest(a,["className"]);return e.createElement("hr",Object.assign({},s,{className:d(o,"menu-button__separator")}))},w=({children:a})=>e.createElement(e.Fragment,null,a);exports.EbayMenuButton=ce;exports.EbayMenuButtonLabel=w;exports.EbayMenuButtonSeparator=q;
|