@ebay/ui-core-react 8.0.3 → 8.0.4
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/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"),l=require("../use-tooltip-8T32Ki1f.js"),P=require("../dialog-previous-button-vXOjDN7l.js");require("react-remove-scroll");require("makeup-screenreader-trap");require("makeup-keyboard-trap");const F=require("../icon-CeLPlCml.js");require("../icon-button-CZtp0khK.js");const $=require("classnames/dedupe"),D=require("../forwardRef-irqyO_PF.js"),B=require("../lightbox-dialog-
|
|
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"),l=require("../use-tooltip-8T32Ki1f.js"),P=require("../dialog-previous-button-vXOjDN7l.js");require("react-remove-scroll");require("makeup-screenreader-trap");require("makeup-keyboard-trap");const F=require("../icon-CeLPlCml.js");require("../icon-button-CZtp0khK.js");const $=require("classnames/dedupe"),D=require("../forwardRef-irqyO_PF.js"),B=require("../lightbox-dialog-D_Uf6lg5.js"),M=t=>{var{icon:n,className:o,children:i,forwardedRef:p,variant:f}=t,a=g.__rest(t,["icon","className","children","forwardedRef","variant"]);const u=f==="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,`${u}__host`),type:"button",ref:p}),r||s)},E=D.withForwardRef(M),S=({variant:t="default",pointer:n,overlayStyle:o,disabled:i,onExpand:p,onCollapse:f,children:a,initialExpanded:u,icon:s="information16",a11yCloseText:r,"aria-label":H,className:j})=>{const y=e.useRef(),{isExpanded:c,expandTooltip:v,collapseTooltip:m}=l.useTooltip({onCollapse:f,onExpand:p,initialExpanded:u,hostRef:y}),b=t==="modal",O=e.useRef(),h=d.findComponent(a,T),q=d.findComponent(a,w),C=d.findComponent(a,E)||e.createElement(E),x=()=>{c?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(l.Tooltip,{type:"infotip",isExpanded:c,className:R(j,{"dialog--mini":b}),ref:O},e.createElement(l.TooltipHost,null,e.cloneElement(C,Object.assign({ref:y,onClick:x,disabled:i,variant:t,"aria-label":H,"aria-expanded":c,icon:s},C.props))),!b&&e.createElement(l.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:c,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;
|
|
@@ -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-D_Uf6lg5.js");exports.EbayLightboxDialog=o.EbayLightboxDialog;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const b=require("./tslib.es6-C4EgNkz1.js"),a=require("react"),n=require("classnames"),d=require("./dialog-previous-button-vXOjDN7l.js");require("./icon-button-CZtp0khK.js");const m=i=>{var{open:l,mode:r,size:t,bannerImgSrc:o,bannerImgPosition:g,onClose:s=()=>{}}=i,e=b.__rest(i,["open","mode","size","bannerImgSrc","bannerImgPosition","onClose"]);const c=o?a.createElement("div",{className:"lightbox-dialog__image",style:{backgroundImage:`url(${o})`,backgroundPosition:g}}):e.top;return a.createElement(d.DialogBaseWithState,Object.assign({buttonPosition:"right"},e,{classPrefix:"lightbox-dialog",onCloseBtnClick:s,onBackgroundClick:s,className:n(e.className,"lightbox-dialog--mask-fade",{[`lightbox-dialog--${t}`]:t,"lightbox-dialog--expressive":o}),windowClass:n("lightbox-dialog__window--fade",{"lightbox-dialog__window--mini":r==="mini"}),top:c,open:l}))};exports.EbayLightboxDialog=m;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const b=require("./tslib.es6-C4EgNkz1.js"),a=require("react"),n=require("classnames"),d=require("./dialog-previous-button-vXOjDN7l.js");require("./icon-button-CZtp0khK.js");const m=e=>{var{open:l,mode:r,size:i,bannerImgSrc:o,bannerImgPosition:g,onClose:s=()=>{}}=e,t=b.__rest(e,["open","mode","size","bannerImgSrc","bannerImgPosition","onClose"]);const c=o?a.createElement("div",{className:"lightbox-dialog__image",style:{backgroundImage:`url(${o})`,backgroundPosition:g}}):null;return a.createElement(d.DialogBaseWithState,Object.assign({buttonPosition:"right"},t,{classPrefix:"lightbox-dialog",onCloseBtnClick:s,onBackgroundClick:s,className:n(t.className,"lightbox-dialog--mask-fade",{[`lightbox-dialog--${i}`]:i,"lightbox-dialog--expressive":o}),windowClass:n("lightbox-dialog__window--fade",{"lightbox-dialog__window--mini":r==="mini"}),top:c,open:l}))};exports.EbayLightboxDialog=m;
|