@ebay/ui-core-react 8.9.0 → 8.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/{button-DhwBC3vw.js → button-BeNUU3lZ.js} +1 -1
  2. package/calendar-Dw_PWT2C.js +1 -0
  3. package/checkbox-CFfWkQ2y.js +1 -0
  4. package/{chip-CfMEg9CT.js → chip-CuR-Dm9y.js} +1 -1
  5. package/combobox-BTNktYex.js +1 -0
  6. package/{dialog-previous-button-C3ZdijBt.js → dialog-previous-button-DvWLfiq0.js} +1 -1
  7. package/dropdown-DIUzEfhV.js +1 -0
  8. package/ebay-accordion/index.js +2 -2
  9. package/ebay-alert-dialog/index.js +1 -1
  10. package/ebay-avatar/index.js +1 -1
  11. package/ebay-breadcrumbs/index.js +1 -1
  12. package/ebay-button/index.js +1 -1
  13. package/ebay-calendar/index.js +1 -1
  14. package/ebay-carousel/index.js +1 -1
  15. package/ebay-ccd/index.js +1 -1
  16. package/ebay-checkbox/index.js +1 -1
  17. package/ebay-chip/index.js +1 -1
  18. package/ebay-chips-combobox/index.js +1 -1
  19. package/ebay-combobox/index.js +1 -1
  20. package/ebay-confirm-dialog/index.js +1 -1
  21. package/ebay-cta-button/index.js +1 -1
  22. package/ebay-date-textbox/date-textbox.d.ts.map +1 -1
  23. package/ebay-date-textbox/index.js +1 -1
  24. package/ebay-details/index.js +1 -1
  25. package/{ebay-details-BuPepKYE.js → ebay-details-rAR5ofJT.js} +1 -1
  26. package/ebay-dialog-base/index.js +1 -1
  27. package/ebay-drawer-dialog-deprecated/index.js +1 -1
  28. package/ebay-education-notice/index.js +1 -1
  29. package/ebay-eek/index.js +1 -1
  30. package/ebay-fake-link/index.js +1 -1
  31. package/ebay-fake-menu/index.js +1 -1
  32. package/ebay-fake-menu-button/index.js +1 -1
  33. package/ebay-file-input/index.js +1 -1
  34. package/ebay-file-preview-card/index.js +1 -1
  35. package/ebay-file-preview-card-group/index.js +1 -1
  36. package/ebay-filter-menu/filter-menu.d.ts.map +1 -1
  37. package/ebay-filter-menu/index.js +1 -1
  38. package/ebay-filter-menu-button/index.js +1 -1
  39. package/ebay-flag/README.md +28 -0
  40. package/ebay-flag/flag-icon.d.ts +9 -0
  41. package/ebay-flag/flag-icon.d.ts.map +1 -0
  42. package/ebay-flag/flag.d.ts +8 -0
  43. package/ebay-flag/flag.d.ts.map +1 -0
  44. package/ebay-flag/index.d.ts +4 -0
  45. package/ebay-flag/index.d.ts.map +1 -0
  46. package/ebay-flag/index.js +1 -0
  47. package/ebay-flag/types.d.ts +2 -0
  48. package/ebay-flag/types.d.ts.map +1 -0
  49. package/ebay-fullscreen-dialog-deprecated/index.js +1 -1
  50. package/ebay-icon/icon.d.ts +4 -3
  51. package/ebay-icon/icon.d.ts.map +1 -1
  52. package/ebay-icon/index.js +1 -1
  53. package/ebay-icon-button/index.js +1 -1
  54. package/ebay-image-placeholder/index.js +1 -1
  55. package/ebay-infotip/index.js +1 -1
  56. package/ebay-inline-notice/index.js +1 -1
  57. package/ebay-item-tile/index.js +1 -1
  58. package/ebay-item-tile-group/index.js +1 -1
  59. package/ebay-lightbox-dialog/index.js +1 -1
  60. package/ebay-listbox/index.js +1 -1
  61. package/ebay-listbox-button/index.js +2 -2
  62. package/ebay-menu/index.js +1 -1
  63. package/ebay-menu-button/index.js +1 -1
  64. package/ebay-number-input/index.js +1 -1
  65. package/ebay-page-notice/index.js +1 -1
  66. package/ebay-pagination/index.js +1 -1
  67. package/ebay-panel-dialog/index.js +1 -1
  68. package/ebay-progress-bar-expressive/index.js +1 -1
  69. package/ebay-progress-spinner/index.js +1 -1
  70. package/ebay-progress-stepper/index.js +1 -1
  71. package/ebay-radio/index.js +1 -1
  72. package/ebay-section-notice/index.js +1 -1
  73. package/ebay-segmented-buttons/index.js +1 -1
  74. package/ebay-select/index.js +1 -1
  75. package/ebay-snackbar-dialog/index.js +1 -1
  76. package/ebay-split-button/index.js +1 -1
  77. package/ebay-star-rating/index.js +1 -1
  78. package/ebay-star-rating-select/index.js +1 -1
  79. package/ebay-svg/README.md +2 -1
  80. package/ebay-svg/flag-symbols.d.ts +3 -0
  81. package/ebay-svg/flag-symbols.d.ts.map +1 -0
  82. package/ebay-svg/flags-svg.d.ts +4 -0
  83. package/ebay-svg/flags-svg.d.ts.map +1 -0
  84. package/ebay-svg/index.d.ts +1 -0
  85. package/ebay-svg/index.d.ts.map +1 -1
  86. package/ebay-svg/index.js +1 -1
  87. package/ebay-table/index.js +1 -1
  88. package/ebay-textbox/index.js +1 -1
  89. package/ebay-toast-dialog/index.js +1 -1
  90. package/ebay-toggle-button/index.js +1 -1
  91. package/ebay-toggle-button-group/index.js +1 -1
  92. package/ebay-tooltip/index.js +1 -1
  93. package/ebay-tourtip/index.js +1 -1
  94. package/ebay-tri-state-checkbox/index.js +1 -1
  95. package/ebay-video/index.js +1 -1
  96. package/file-preview-card-BlJJ6upx.js +1 -0
  97. package/filter-menu-Di_eSs8N.js +1 -0
  98. package/hooks-DTTigNDz.js +1 -0
  99. package/icon-CR8ApQBy.js +1 -0
  100. package/{icon-button-CHW6Lezn.js → icon-button-B1aE4GTn.js} +1 -1
  101. package/item-tile-wd_KGcZ2.js +1 -0
  102. package/{lightbox-dialog-U775uoDp.js → lightbox-dialog-q62AUlIh.js} +1 -1
  103. package/{menu-button-label-CN_zoO9F.js → menu-button-label-BheEVTUO.js} +1 -1
  104. package/{menu-button-label-BsTtpKB2.js → menu-button-label-DemOjKA8.js} +1 -1
  105. package/{menu-mTGSTnD8.js → menu-fWohPckl.js} +1 -1
  106. package/{menu-item-D_m4VPNi.js → menu-item-B6NlMsNL.js} +1 -1
  107. package/package.json +3 -4
  108. package/{progress-spinner-BQ5Ms2Nu.js → progress-spinner-BqahPJmn.js} +1 -1
  109. package/radio-C1imt8Q-.js +1 -0
  110. package/textbox-bggbXBGB.js +1 -0
  111. package/{toggle-button-BLFYrRDI.js → toggle-button-llE9yuer.js} +1 -1
  112. package/tri-state-checkbox-BdVzo8pO.js +1 -0
  113. package/use-tooltip-CNTlgBVF.js +1 -0
  114. package/calendar-Bnx_QLoQ.js +0 -1
  115. package/checkbox-ebkMhvbJ.js +0 -1
  116. package/combobox-BzM04rYV.js +0 -1
  117. package/dropdown-BGdrijmi.js +0 -1
  118. package/file-preview-card-BD6TIsY7.js +0 -1
  119. package/filter-menu-DVoaD81G.js +0 -1
  120. package/hooks-B4eFIQlH.js +0 -1
  121. package/icon-C-bWGO-9.js +0 -1
  122. package/item-tile-lBRIeVHa.js +0 -1
  123. package/radio-DLgEB-qH.js +0 -1
  124. package/textbox-voEWwh3v.js +0 -1
  125. package/tri-state-checkbox-BLbLOJc1.js +0 -1
  126. package/use-tooltip-mcJqLqOg.js +0 -1
@@ -1 +1 @@
1
- "use strict";const B=require("./tslib.es6-C4EgNkz1.js"),n=require("react"),S=require("classnames"),H=require("./forwardRef-DBQKIlPy.js");require("./array.polyfill.flat-5BAolFdk.js");const u=require("./icon-C-bWGO-9.js"),L=require("./progress-spinner-BQ5Ms2Nu.js"),A={cta:"cta-",fake:"fake-",expand:"expand-",default:""},y=t=>{var{type:r="default",children:a}=t,s=B.__rest(t,["type","children"]);return n.createElement("span",Object.assign({className:`${A[r]}btn__cell`},s),n.createElement(n.Fragment,null,a))},P=()=>n.createElement(y,null,n.createElement(L.EbayProgressSpinner,null)),T=({className:t,children:r})=>n.createElement("span",{className:S(t,"btn__text")},r),G=({children:t})=>t?n.createElement(y,null,n.createElement(T,null,t),n.createElement(u.EbayIcon,{name:"chevronDown12"})):n.createElement(u.EbayIcon,{name:"chevronDown12"}),J=t=>{var{priority:r="secondary",variant:a="standard",size:s,bodyState:f,split:q,transparent:N=!1,fluid:_=!1,disabled:b,partiallyDisabled:k,children:o,onKeyDown:C=()=>{},onEscape:R=()=>{},truncate:I=!1,href:c,className:K,forwardedRef:m,borderless:p,fixedHeight:E}=t,$=B.__rest(t,["priority","variant","size","bodyState","split","transparent","fluid","disabled","partiallyDisabled","children","onKeyDown","onEscape","truncate","href","className","forwardedRef","borderless","fixedHeight"]);const e=c?"fake-btn":"btn",O={primary:`${e}--primary`,secondary:`${e}--secondary`,tertiary:`${e}--tertiary`,none:""},i={large:`${e}--large`,small:`${e}--small`},j={start:`${e}--split-start`,end:`${e}--split-end`},z=a==="destructive",d=a==="form",g=f==="loading",h=f==="expand",F=d&&(Q(o)||h&&!o),v=S(e,K,O[d||p?"none":r],i[s],j[q],z&&`${e}--destructive`,d&&`${e}--form`,F&&`${e}--slim`,N&&`${e}--transparent`,_&&`${e}--fluid`,I&&`${e}--truncated`,p&&`${e}--borderless`,E&&(i[s]?`${i[s]}-${E}`:`${e}--fixed-height`)),w=l=>{C(l),(l.key==="Escape"||l.key==="Esc")&&R(l)},x=M(o,{isLoading:g,isExpand:h}),D=g?"polite":null;return c?n.createElement("a",Object.assign({className:v,href:b?void 0:c,ref:m,onKeyDown:w,"aria-live":D},$),x):n.createElement("button",Object.assign({disabled:b,"aria-disabled":k,"aria-live":D,className:v,ref:m,onKeyDown:w},$),x)};function M(t,{isLoading:r,isExpand:a}){switch(!0){case r:return n.createElement(P,null);case a:return n.createElement(G,null,t);default:return t}}function Q(t){const r=n.Children.toArray(t);return r.length===1&&r[0].type===u.EbayIcon}const U=H.withForwardRef(J);exports.EbayButton=U;exports.EbayButtonCell=y;
1
+ "use strict";const B=require("./tslib.es6-C4EgNkz1.js"),n=require("react"),S=require("classnames"),H=require("./forwardRef-DBQKIlPy.js");require("./array.polyfill.flat-5BAolFdk.js");const u=require("./icon-CR8ApQBy.js"),L=require("./progress-spinner-BqahPJmn.js"),A={cta:"cta-",fake:"fake-",expand:"expand-",default:""},y=t=>{var{type:r="default",children:a}=t,s=B.__rest(t,["type","children"]);return n.createElement("span",Object.assign({className:`${A[r]}btn__cell`},s),n.createElement(n.Fragment,null,a))},P=()=>n.createElement(y,null,n.createElement(L.EbayProgressSpinner,null)),T=({className:t,children:r})=>n.createElement("span",{className:S(t,"btn__text")},r),G=({children:t})=>t?n.createElement(y,null,n.createElement(T,null,t),n.createElement(u.EbayIcon,{name:"chevronDown12"})):n.createElement(u.EbayIcon,{name:"chevronDown12"}),J=t=>{var{priority:r="secondary",variant:a="standard",size:s,bodyState:f,split:q,transparent:N=!1,fluid:_=!1,disabled:b,partiallyDisabled:k,children:o,onKeyDown:C=()=>{},onEscape:R=()=>{},truncate:I=!1,href:c,className:K,forwardedRef:m,borderless:p,fixedHeight:E}=t,$=B.__rest(t,["priority","variant","size","bodyState","split","transparent","fluid","disabled","partiallyDisabled","children","onKeyDown","onEscape","truncate","href","className","forwardedRef","borderless","fixedHeight"]);const e=c?"fake-btn":"btn",O={primary:`${e}--primary`,secondary:`${e}--secondary`,tertiary:`${e}--tertiary`,none:""},i={large:`${e}--large`,small:`${e}--small`},j={start:`${e}--split-start`,end:`${e}--split-end`},z=a==="destructive",d=a==="form",g=f==="loading",h=f==="expand",F=d&&(Q(o)||h&&!o),v=S(e,K,O[d||p?"none":r],i[s],j[q],z&&`${e}--destructive`,d&&`${e}--form`,F&&`${e}--slim`,N&&`${e}--transparent`,_&&`${e}--fluid`,I&&`${e}--truncated`,p&&`${e}--borderless`,E&&(i[s]?`${i[s]}-${E}`:`${e}--fixed-height`)),w=l=>{C(l),(l.key==="Escape"||l.key==="Esc")&&R(l)},x=M(o,{isLoading:g,isExpand:h}),D=g?"polite":null;return c?n.createElement("a",Object.assign({className:v,href:b?void 0:c,ref:m,onKeyDown:w,"aria-live":D},$),x):n.createElement("button",Object.assign({disabled:b,"aria-disabled":k,"aria-live":D,className:v,ref:m,onKeyDown:w},$),x)};function M(t,{isLoading:r,isExpand:a}){switch(!0){case r:return n.createElement(P,null);case a:return n.createElement(G,null,t);default:return t}}function Q(t){const r=n.Children.toArray(t);return r.length===1&&r[0].type===u.EbayIcon}const U=H.withForwardRef(J);exports.EbayButton=U;exports.EbayButtonCell=y;
@@ -0,0 +1 @@
1
+ "use strict";const r=require("react"),ue=require("./icon-button-B1aE4GTn.js"),de=require("classnames");function Ce(n){const c=new Intl.Locale(n);return c.weekInfo?c.weekInfo.firstDay:0}function Ue(n){const c=Ce(n),i=new Intl.DateTimeFormat(n,{weekday:"short"}),d=new Date(2022,9,2+c),A=[...Array(7)].map(()=>{const k=i.format(d);return d.setDate(d.getDate()+1),k});return{firstDayOfWeek:c,weekdayLabels:A}}function Ae(n){if(n)return/^\d\d\d\d-\d\d-\d\d$/g.test(n)?n:u(new Date(n))}function u(n){if(!isNaN(n.getTime()))return n.toISOString().slice(0,10)}function U(n){return new Date(n)}function H(n,c){const i=U(n);return i.setUTCDate(i.getUTCDate()+c),u(i)}function fe(n){return n||navigator.language}const Fe={ArrowRight:1,ArrowLeft:-1,ArrowDown:7,ArrowUp:-7},Re=({selected:n,numMonths:c=1,navigable:i,interactive:d,range:A,locale:k,disableBefore:g,disableAfter:I,disableWeekdays:B,disableList:G,a11ySelectedText:me="selected",a11yRangeStartText:ye="start of range",a11yInRangeText:ge="in range",a11yRangeEndText:Ie="end of range",a11ySeparator:J="-",a11yTodayText:De="today",a11yDisabledText:Se="inactive",getA11yShowMonthText:Q=T=>`Show ${T}`,linkBuilder:X,onMonthChange:Z=()=>{},onFocus:we=()=>{},onSelect:Ee=()=>{}})=>{const T=u(new Date),{firstDayOfWeek:Oe,weekdayLabels:Te}=Ue(fe(k)),ee=r.useRef(null),[m,F]=r.useState(0),[te,ne]=r.useState(null),[D,_]=r.useState(T),R=r.useRef(T),S=e=>{const t=U(R.current);return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth()+e))},w=()=>u(S(m)),E=()=>{const e=U(R.current);return u(new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+m+(c||1),0)))};r.useEffect(()=>{if(n){const e=Array.isArray(n)?n:[n],t=w(),a=E();e.find(f=>f>=t&&f<=a)===void 0&&(R.current=e[0],F(0))}},[n]);const be=()=>{if(n&&A){let e,t;if(Array.isArray(n)?[e,t]=n:te&&(e=n,t=te),e&&t){const[a,s]=[e,t].sort();return{rangeStart:a,rangeEnd:s}}}return{rangeStart:null,rangeEnd:null}},h=e=>new Intl.DateTimeFormat(fe(k),{month:"long",year:"numeric"}).format(new Date(e.getUTCFullYear(),e.getUTCMonth())),p=e=>g&&e<g||I&&e>I||B&&B.includes(U(e).getUTCDay())||G&&G.includes(e),ae=()=>{let e=w();const t=E();for(;e<=t&&p(e);)e=H(e,1);return e>t?null:e},re=()=>{let e=E();const t=w();for(;e>=t&&p(e);)e=H(e,-1);return e<t?null:e},b=e=>{_(e),setTimeout(()=>{var t;const a=(t=ee.current)===null||t===void 0?void 0:t.querySelector(`[data-iso="${e}"]`);a?.focus()})},N=e=>{if(g&&w()<=g)return!1;F(s=>s-1);let t=D;const a=re();return a&&a<D&&(t=a,_(a)),e&&b(t),Z({iso:u(S(m))}),!0},L=e=>{if(I&&E()>=I)return!1;F(s=>s+1);let t=D;const a=ae();a&&a>D&&(t=a,_(a)),e&&b(t),Z({iso:u(S(m+(c||1)))})},ke=e=>{const t=Fe[e.key];if(t){e.preventDefault();let a=7,s=D;do s=H(s,t);while(a-- >0&&p(s));if(a>0){const f=w(),O=E();s<f?i?N():s=f:s>O&&(i?L():s=O),b(s)}}else switch(e.key){case"PageUp":N(!0);break;case"PageDown":L(!0);break;case"Home":b(ae());break;case"End":b(re());break}},_e=(e,t)=>{Ee(e,{iso:t})},se=(e,t)=>{ne(t),_(t),we(e,{iso:t})},oe=()=>{ne(null)},{rangeStart:V,rangeEnd:x}=be(),he=e=>!(!V||!x||e<V||e>x),ce=[...Array(c)].map((e,t)=>S(m+t));return r.createElement("div",{className:"calendar",ref:ee},i&&r.createElement("div",{className:"calendar__header"},r.createElement("div",{className:"calendar__header--inner"},r.createElement(ue.EbayIconButton,{transparent:!0,size:"small",icon:"chevronLeft24",disabled:g&&w()<=g,"aria-label":Q(h(S(m-1))),onClick:()=>N()}),ce.map((e,t)=>r.createElement("h3",{key:t},h(e))),r.createElement(ue.EbayIconButton,{transparent:!0,size:"small",icon:"chevronRight24",disabled:I&&E()>=I,"aria-label":Q(h(S(m+c))),onClick:()=>L()}))),r.createElement("div",{className:"calendar__body"},ce.map((e,t)=>{const a=(e.getUTCDay()-Oe+7)%7,s=e.getUTCFullYear(),f=e.getUTCMonth(),O=new Date(s,f+1,0).getDate(),pe=[...Array(Math.ceil((a+O)/7))];return r.createElement("div",{key:t,className:"calendar__month"},r.createElement("table",{onKeyDown:ke},r.createElement("caption",null,h(e)),r.createElement("thead",null,r.createElement("tr",null,Te.map(M=>r.createElement("th",{key:M,scope:"col"},M)))),r.createElement("tbody",null,pe.map((M,Y)=>{let $=Y*7-a+1,q=$+6;const P=[];Y===0&&a!==0?($=1,P.push(r.createElement("td",{key:"pre-column",colSpan:a}))):q>O&&(q=O);for(let y=$;y<=q;y++){const o=u(new Date(Date.UTC(s,f,y))),W=o===T,j=Array.isArray(n)?n.some(l=>l===o):n===o,z=o===V,le=he(o),K=o===x,v=p(o),C=["",j&&me,z&&ye,!z&&!K&&le&&ge,K&&Ie,!d&&W&&De,!d&&v&&Se].filter(l=>typeof l!="boolean"||l!==!1),ie=!d&&!v&&X&&X(o),ve=ie?"a":"span";P.push(r.createElement("td",{key:y,className:de({"calendar__cell--selected":j,"calendar__range--start":z,calendar__range:le,"calendar__range--end":K})},d?r.createElement("button",{disabled:v,"aria-label":C.length>1?`${y}${C.join(J)}`:void 0,tabIndex:D!==o?-1:void 0,"aria-current":W?"date":void 0,"aria-pressed":j?"true":void 0,onClick:l=>_e(l,o),onFocus:l=>se(l,o),onMouseOver:l=>se(l,o),onMouseOut:()=>oe(),onBlur:()=>oe(),"data-iso":o},y):r.createElement(ve,{className:de({"calendar__cell--disabled":v,"calendar__cell--current":W}),href:ie},y,C.length>1&&r.createElement("span",{className:"clipped"},C.join(J)))))}return r.createElement("tr",{key:Y},P)}))))})))};exports.EbayCalendar=Re;exports.dateArgToISO=Ae;exports.toISO=u;
@@ -0,0 +1 @@
1
+ "use strict";const F=require("./tslib.es6-C4EgNkz1.js"),c=require("react"),j=require("classnames"),a=require("./icon-CR8ApQBy.js"),I=require("./label-BRztS0pw.js"),O=require("./utils-C9NL3q0j.js"),w=o=>typeof o<"u",D=o=>{var{id:d,size:t="default",className:r,style:k,checked:h,defaultChecked:u=!1,onChange:b=()=>{},onFocus:m=()=>{},onKeyDown:g=()=>{},children:i,inputRef:v}=o,C=F.__rest(o,["id","size","className","style","checked","defaultChecked","onChange","onFocus","onKeyDown","children","inputRef"]);const[y,_]=c.useState(u),x=n=>{const e=n.target;b(n,{value:e?.value,checked:!!e?.checked}),_(e?.checked)},E=n=>{var e,l;return m(n,{value:(e=n.target)===null||e===void 0?void 0:e.value,checked:!!(!((l=n.target)===null||l===void 0)&&l.checked)})},p=n=>{const e=n.target;g(n,{value:e.value,checked:!!e.checked})},f=j("checkbox",r,{"checkbox--large":t==="large"}),N=t==="large"?c.createElement(a.EbayIcon,{name:"checkboxChecked24",className:"checkbox__checked"}):c.createElement(a.EbayIcon,{name:"checkboxChecked18",className:"checkbox__checked"}),q=t==="large"?c.createElement(a.EbayIcon,{name:"checkboxUnchecked24",className:"checkbox__unchecked"}):c.createElement(a.EbayIcon,{name:"checkboxUnchecked18",className:"checkbox__unchecked"}),s=O.findComponent(i,I.Label);return c.createElement(c.Fragment,null,c.createElement("span",{className:f,style:Object.assign(Object.assign({},k),{alignItems:"center"})},c.createElement("input",Object.assign({},C,{id:d,className:"checkbox__control",type:"checkbox",checked:w(h)?h:y,onChange:x,onFocus:E,onKeyDown:p,ref:v})),c.createElement("span",{className:"checkbox__icon",hidden:!0},N,q)),s?c.cloneElement(s,Object.assign(Object.assign({},s.props),{position:"end",htmlFor:d})):i)};exports.EbayCheckbox=D;
@@ -1 +1 @@
1
- "use strict";const l=require("./tslib.es6-C4EgNkz1.js"),e=require("react"),o=require("./random-id-DlJj_RWH.js");require("./array.polyfill.flat-5BAolFdk.js");const b=require("./icon-C-bWGO-9.js"),u=t=>{var{a11yDeleteButtonText:a,onDelete:s,disabled:c,children:r}=t,i=l.__rest(t,["a11yDeleteButtonText","onDelete","disabled","children"]);const n=o.useRandomId();return e.createElement("span",Object.assign({},i,{className:"chip"}),e.createElement("span",{id:n,className:"ebay-chip__text"},r),a?e.createElement("button",{type:"button",className:"chip__button","aria-label":a,"aria-describedby":n,disabled:c,onClick:s},e.createElement(b.EbayIcon,{name:"close12"})):null)};exports.EbayChip=u;
1
+ "use strict";const l=require("./tslib.es6-C4EgNkz1.js"),e=require("react"),o=require("./random-id-DlJj_RWH.js");require("./array.polyfill.flat-5BAolFdk.js");const b=require("./icon-CR8ApQBy.js"),u=t=>{var{a11yDeleteButtonText:a,onDelete:s,disabled:c,children:r}=t,i=l.__rest(t,["a11yDeleteButtonText","onDelete","disabled","children"]);const n=o.useRandomId();return e.createElement("span",Object.assign({},i,{className:"chip"}),e.createElement("span",{id:n,className:"ebay-chip__text"},r),a?e.createElement("button",{type:"button",className:"chip__button","aria-label":a,"aria-describedby":n,disabled:c,onClick:s},e.createElement(b.EbayIcon,{name:"close12"})):null)};exports.EbayChip=u;
@@ -0,0 +1 @@
1
+ "use strict";const V=require("./tslib.es6-C4EgNkz1.js"),t=require("react"),x=require("classnames"),be=require("./hooks-DTTigNDz.js"),M=require("./utils-C9NL3q0j.js"),I=require("./dropdown-DIUzEfhV.js"),K=a=>{var{className:p}=a,d=V.__rest(a,["className"]);return t.createElement("button",Object.assign({className:x("icon-btn","icon-btn--transparent",p)},d))},T=a=>{var{text:p,className:d,selected:C}=a,r=V.__rest(a,["text","className","selected"]);return t.createElement("div",Object.assign({},r,{role:"option",className:x("combobox__option",d),tabIndex:-1,"aria-selected":C}),p)},fe=a=>{var{className:p,floatingLabel:d,fluid:C,expanded:r,borderless:j,autocomplete:v="none",listSelection:k="automatic",defaultValue:A="",value:h,placeholder:H,opaqueLabel:U,children:D,dropdownRef:Y,onFocus:z=()=>{},onClick:G=()=>{},onExpand:J=()=>{},onCollapse:P=()=>{},onInputChange:L=()=>{},onFloatingLabelInit:Q=()=>{},onChange:W=()=>{},onSelect:X=()=>{},onKeyDown:Z=()=>{}}=a,g=V.__rest(a,["className","floatingLabel","fluid","expanded","borderless","autocomplete","listSelection","defaultValue","value","placeholder","opaqueLabel","children","dropdownRef","onFocus","onClick","onExpand","onCollapse","onInputChange","onFloatingLabelInit","onChange","onSelect","onKeyDown"]);const l=M.findComponent(D,K),y=M.filterByType(D,T),E=t.useRef(null),s=t.useRef(null),N=t.useRef(null),f=I.useExpander({ref:Y||E,expanded:r,options:{autoCollapse:r,expandOnFocus:!0,collapseOnFocusOut:!r&&!!l,contentSelector:'[role="listbox"]',hostSelector:'[role="combobox"]',expandedClass:"combobox--expanded",simulateSpacebarClick:!0},onExpand:J,onCollapse:P},[r]),{overlayStyles:$,refs:O}=I.useFloatingDropdown({open:f.isExpanded}),[ee,R]=t.useState(A||""),c=typeof h<"u"?h:ee;typeof h>"u"&&!L&&console.warn("EbayCombobox: You provided a value prop without an onInputChange handler.This will render a read-only input field. If you want the input to be editable, provide an onInputChange handler.");const _=(e,o)=>{c!==o&&(R(o),s.current&&(s.current.selectionStart=s.current.selectionEnd=o.length,s.current.focus()),X(e,b({currentInputValue:o})))};function oe(){return v==="none"?y||[]:y.filter(e=>{var o,n;return(o=e.props.text)===null||o===void 0?void 0:o.toLowerCase().includes((n=c?.trim())===null||n===void 0?void 0:n.toLowerCase())})}const u=t.useMemo(()=>oe(),[v,c,y]),ne=t.useCallback((e,{toIndex:o})=>{if(k==="automatic"){const n=u[o];n&&s.current&&(s.current.value=n.props.text)}},[k,u]),te=I.useActiveDescendant({ref:E,focusElementRef:s,itemContainerRef:N,disabled:!u.length,onChange:ne,options:{activeDescendantClassName:"combobox__option--active",autoInit:-1,autoReset:-1,autoScroll:!0,axis:"y"}}),S=C?"div":"span",F=be.useFloatingLabel({text:d,disabled:g.disabled,containerTagName:S,opaqueLabel:U,onMount:Q}),le=d?F.Container:S,m=t.useRef(!1),ae=e=>{var o,n;m.current=!0,(n=l==null?void 0:(o=l.props).onClick)===null||n===void 0||n.call(o,e)},se=e=>{var o,n;m.current=!0,(n=l==null?void 0:(o=l.props).onMouseDown)===null||n===void 0||n.call(o,e)};function w(){f.collapse()}function q(){f.expand()}function re(e){const o=u.find(n=>n.props.text===e);return o?{text:o.props.text,value:o.props.value}:{}}function b(e){return{currentInputValue:e.currentInputValue,selectedOption:re(e.currentInputValue)}}const ce=e=>{const o=e.target.value;R(e.target.value),L(e,b({currentInputValue:o}))},B=t.useRef(""),ue=e=>{m.current||w(),m.current=!1;const o=e.target.value;o!==B.current&&(B.current=o,W(e,b({currentInputValue:o})))},ie=e=>{const o=e.target;o===document.activeElement&&q(),G(e,b({currentInputValue:o.value}))},de=e=>{z(e,b({currentInputValue:e.target.value}))},pe=e=>{if(e.key==="ArrowDown")q();else if(e.key==="Escape")w();else if(e.key==="Enter"&&f.isExpanded){const o=te.getIndex();o!==-1&&_(e,u[o].props.text),r||w()}Z(e)};return t.createElement(le,{ref:E,className:x("combobox",p)},t.createElement(F.Label,{htmlFor:g.id}),t.createElement("span",{className:x("combobox__control",{"combobox__control--actionable":l,"combobox__control--borderless":j})},t.createElement("input",Object.assign({},g,{ref:e=>{O.setHost(e),s.current=e},type:"text",role:"combobox",value:c,"aria-autocomplete":v,"aria-haspopup":"listbox",autoComplete:"off","aria-expanded":"false",onChange:ce,onBlur:ue,onClick:ie,onFocus:de,onKeyDown:pe,placeholder:H})),l?t.cloneElement(l,{onClick:ae,onMouseDown:se}):null),u.length>0&&t.createElement("div",{role:"listbox",className:"combobox__listbox",ref:e=>{O.setOverlay(e),N.current=e},style:$},u.map(e=>t.cloneElement(e,{selected:(e.props.value||e.props.text)===c,onClick:o=>{var n,i;_(o,e.props.text),(i=(n=e.props).onClick)===null||i===void 0||i.call(n,o)},onMouseDown:o=>{var n,i;_(o,e.props.text),(i=(n=e.props).onMouseDown)===null||i===void 0||i.call(n,o)}}))))};exports.EbayCombobox=fe;exports.EbayComboboxButton=K;exports.EbayComboboxOption=T;
@@ -1 +1 @@
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-C-bWGO-9.js"),ce=require("./random-id-DlJj_RWH.js"),de=require("./icon-button-CHW6Lezn.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==null?void 0: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
+ "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;
@@ -0,0 +1 @@
1
+ "use strict";const i=require("react"),s=require("@floating-ui/react"),v=require("makeup-expander"),g=require("makeup-active-descendant"),{default:h=v}=v?.default?.__esModule?v.default:v;function y({open:t,options:r}){var a;const{floatingStyles:c,refs:u}=s.useFloating({placement:r?.reverse?"bottom-end":"bottom-start",open:t,middleware:[s.offset((a=r?.offset)!==null&&a!==void 0?a:4),s.flip(),s.shift()],whileElementsMounted:s.autoUpdate});return{overlayStyles:c,refs:{host:u.reference,overlay:u.floating,setHost:u.setReference,setOverlay:u.setFloating}}}function D({ref:t,expanded:r,options:a,onExpand:c,onCollapse:u},f){const n=i.useRef(null),l=i.useSyncExternalStore(e=>{var d,o;function _(){e(),c?.()}function E(){e(),u?.()}return(d=t.current)===null||d===void 0||d.addEventListener("expander-expand",_),(o=t.current)===null||o===void 0||o.addEventListener("expander-collapse",E),()=>{var x,p;(x=t.current)===null||x===void 0||x.removeEventListener("expander-expand",_),(p=t.current)===null||p===void 0||p.removeEventListener("expander-collapse",E)}},()=>{var e;return(e=n.current)===null||e===void 0?void 0:e.expanded},()=>!1);return i.useEffect(()=>(t.current&&(n.current=new h(t.current,a)),()=>{var e;(e=n.current)===null||e===void 0||e.destroy()}),f||[]),i.useEffect(()=>{n.current&&r!==void 0&&(n.current.expanded=r)},[r]),{isExpanded:l,expand:()=>{n.current&&(n.current.expanded=!0)},collapse:()=>{n.current&&(n.current.expanded=!1)}}}function m({ref:t,focusElementRef:r,itemContainerRef:a,onChange:c=()=>null,disabled:u,options:f}){const n=i.useRef(null);return i.useEffect(()=>{const l=e=>{const d={toIndex:e.detail.toIndex};c(e,d)};return u||(n.current=g.createLinear(t.current,r?r.current:t.current,a?a.current:t.current,"[role=option]",f),t.current.addEventListener("activeDescendantChange",l)),()=>{var e,d,o;(e=n.current)===null||e===void 0||e.reset(),(d=n.current)===null||d===void 0||d.destroy(),(o=t.current)===null||o===void 0||o.removeEventListener("activeDescendantChange",l)}},[u,c]),{setIndex(l){n.current.index=l},getIndex(){return n.current.index}}}exports.useActiveDescendant=m;exports.useExpander=D;exports.useFloatingDropdown=y;
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../tslib.es6-C4EgNkz1.js"),D=require("classnames"),o=require("react"),g=require("../ebay-details-BuPepKYE.js"),_=require("../utils-C9NL3q0j.js"),N=t=>{var{size:b,autoCollapse:E,className:f,children:p,onToggle:i,"aria-roledescription":m="accordion"}=t,v=A.__rest(t,["size","autoCollapse","className","children","onToggle","aria-roledescription"]);const c=o.useRef(null),n=_.filterByType(p,g.EbayDetails);if(!n.length)throw new Error(`EbayAccordion: Please use a
2
- EbayDetails that defines the sections of the accordion`);const h=n.map((e,d)=>o.cloneElement(e,{onToggle:(u,{open:l})=>{var r,y,a;if(E&&l){const s=(r=c.current)===null||r===void 0?void 0:r.querySelectorAll("details");s==null||s.forEach((q,T)=>{T!==d&&(q.open=!1)})}(a=(y=e.props).onToggle)===null||a===void 0||a.call(y,u,{open:l}),i==null||i(u,{open:l,index:d})}}));return o.createElement("ul",Object.assign({},v,{ref:c,className:D("accordion",f,{"accordion--large":b==="large"}),"aria-roledescription":m}),h.map(e=>o.createElement("li",{key:e.key},e)))};exports.EbayDetails=g.EbayDetails;exports.EbayAccordion=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../tslib.es6-C4EgNkz1.js"),D=require("classnames"),o=require("react"),g=require("../ebay-details-rAR5ofJT.js"),_=require("../utils-C9NL3q0j.js"),N=t=>{var{size:b,autoCollapse:E,className:f,children:p,onToggle:i,"aria-roledescription":m="accordion"}=t,v=A.__rest(t,["size","autoCollapse","className","children","onToggle","aria-roledescription"]);const c=o.useRef(null),n=_.filterByType(p,g.EbayDetails);if(!n.length)throw new Error(`EbayAccordion: Please use a
2
+ EbayDetails that defines the sections of the accordion`);const h=n.map((e,d)=>o.cloneElement(e,{onToggle:(u,{open:l})=>{var r,y,a;if(E&&l){const s=(r=c.current)===null||r===void 0?void 0:r.querySelectorAll("details");s?.forEach((q,T)=>{T!==d&&(q.open=!1)})}(a=(y=e.props).onToggle)===null||a===void 0||a.call(y,u,{open:l}),i?.(u,{open:l,index:d})}}));return o.createElement("ul",Object.assign({},v,{ref:c,className:D("accordion",f,{"accordion--large":b==="large"}),"aria-roledescription":m}),h.map(e=>o.createElement("li",{key:e.key},e)))};exports.EbayDetails=g.EbayDetails;exports.EbayAccordion=N;
@@ -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-C3ZdijBt.js");require("../icon-button-CHW6Lezn.js");const g=require("../button-DhwBC3vw.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
+ "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-DvWLfiq0.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 A=require("../tslib.es6-C4EgNkz1.js"),r=require("react"),E=require("classnames"),y=require("../icon-C-bWGO-9.js"),C=require("../utils-C9NL3q0j.js"),u=["teal","light-teal","green","lime","yellow","orange","magenta","pink"];function q(e,o){if(o)return o;let n=0,t,a;if(e&&e.length>0)for(a=0;a<e.length;a++)t=e.charCodeAt(a),n=(n<<5)-n+t,n|=0;const g=u.length,m=Math.abs(n)%g;return u[m]}const v=e=>r.createElement("img",Object.assign({},e));function d(e){return e&&(e<3/4||e<4/3)}const I=e=>{var{size:o,color:n,username:t,children:a,className:g,knownAspectRatio:m}=e,h=A.__rest(e,["size","color","username","children","className","knownAspectRatio"]);const[b,f]=r.useState(d(m)?"fit":"cover"),s=C.findComponent(a,v),p=l=>{const c=l.target,i=c.naturalWidth/c.naturalHeight;f(d(i)?"fit":"cover")};return r.createElement("div",Object.assign({},h,{role:"img",className:E("avatar",g,o&&`avatar--${o}`,b==="fit"&&"avatar--fit",t&&!s&&`avatar--${q(t,n)}`)}),r.Children.count(a)>0?s&&r.cloneElement(s,{onLoad(l){var c,i;(i=(c=s.props).onLoad)===null||i===void 0||i.call(c,l),p(l)}})||a:(t==null?void 0:t.charAt(0).toUpperCase())||r.createElement(y.EbayIcon,{name:"avatarSignedOut"}))};exports.EbayAvatar=I;exports.EbayAvatarImage=v;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../tslib.es6-C4EgNkz1.js"),r=require("react"),E=require("classnames"),y=require("../icon-CR8ApQBy.js"),C=require("../utils-C9NL3q0j.js"),u=["teal","light-teal","green","lime","yellow","orange","magenta","pink"];function q(e,o){if(o)return o;let n=0,t,a;if(e&&e.length>0)for(a=0;a<e.length;a++)t=e.charCodeAt(a),n=(n<<5)-n+t,n|=0;const g=u.length,m=Math.abs(n)%g;return u[m]}const v=e=>r.createElement("img",Object.assign({},e));function d(e){return e&&(e<3/4||e<4/3)}const I=e=>{var{size:o,color:n,username:t,children:a,className:g,knownAspectRatio:m}=e,h=A.__rest(e,["size","color","username","children","className","knownAspectRatio"]);const[b,f]=r.useState(d(m)?"fit":"cover"),s=C.findComponent(a,v),p=l=>{const c=l.target,i=c.naturalWidth/c.naturalHeight;f(d(i)?"fit":"cover")};return r.createElement("div",Object.assign({},h,{role:"img",className:E("avatar",g,o&&`avatar--${o}`,b==="fit"&&"avatar--fit",t&&!s&&`avatar--${q(t,n)}`)}),r.Children.count(a)>0?s&&r.cloneElement(s,{onLoad(l){var c,i;(i=(c=s.props).onLoad)===null||i===void 0||i.call(c,l),p(l)}})||a:t?.charAt(0).toUpperCase()||r.createElement(y.EbayIcon,{name:"avatarSignedOut"}))};exports.EbayAvatar=I;exports.EbayAvatarImage=v;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),f=require("classnames"),k=require("../icon-C-bWGO-9.js"),C=t=>{var{a11yHeadingText:n="Page navigation",a11yHeadingTag:r="h2",id:l="ebay-breadcrumb",children:a=[],className:o,onSelect:d=()=>{}}=t,s=m.__rest(t,["a11yHeadingText","a11yHeadingTag","id","children","className","onSelect"]);const c=`${l}-breadcrumbs-heading`,b=e.Children.count(a)-1,u=r,g=e.Children.toArray(a).some(i=>i.props.href)?"a":"button";return e.createElement("nav",Object.assign({},s,{"aria-labelledby":c,className:f("breadcrumbs",o),role:"navigation"}),e.createElement(u,{id:c,className:"clipped"},n),e.createElement("ul",null,e.Children.map(a,(i,h)=>{const y=h===b,{href:I,children:E}=i.props,p={tag:g,isLastItem:y,href:I,children:E,onClick:v=>d(v)};return e.cloneElement(i,p)})))},j=t=>{var{tag:n="button",isLastItem:r=!1,href:l,children:a,onClick:o}=t,d=m.__rest(t,["tag","isLastItem","href","children","onClick"]);const s=n==="a",c=Object.assign(Object.assign(Object.assign({},d),r?{"aria-current":"location"}:{}),{href:s?l:void 0,onClick:s?void 0:o});return e.createElement("li",null,e.createElement(n,Object.assign({},c),a),!r&&e.createElement(k.EbayIcon,{name:"chevronRight12"}))};exports.EbayBreadcrumbItem=j;exports.EbayBreadcrumbs=C;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),f=require("classnames"),k=require("../icon-CR8ApQBy.js"),C=t=>{var{a11yHeadingText:n="Page navigation",a11yHeadingTag:r="h2",id:l="ebay-breadcrumb",children:a=[],className:o,onSelect:d=()=>{}}=t,s=m.__rest(t,["a11yHeadingText","a11yHeadingTag","id","children","className","onSelect"]);const c=`${l}-breadcrumbs-heading`,b=e.Children.count(a)-1,u=r,g=e.Children.toArray(a).some(i=>i.props.href)?"a":"button";return e.createElement("nav",Object.assign({},s,{"aria-labelledby":c,className:f("breadcrumbs",o),role:"navigation"}),e.createElement(u,{id:c,className:"clipped"},n),e.createElement("ul",null,e.Children.map(a,(i,h)=>{const y=h===b,{href:I,children:E}=i.props,p={tag:g,isLastItem:y,href:I,children:E,onClick:v=>d(v)};return e.cloneElement(i,p)})))},j=t=>{var{tag:n="button",isLastItem:r=!1,href:l,children:a,onClick:o}=t,d=m.__rest(t,["tag","isLastItem","href","children","onClick"]);const s=n==="a",c=Object.assign(Object.assign(Object.assign({},d),r?{"aria-current":"location"}:{}),{href:s?l:void 0,onClick:s?void 0:o});return e.createElement("li",null,e.createElement(n,Object.assign({},c),a),!r&&e.createElement(k.EbayIcon,{name:"chevronRight12"}))};exports.EbayBreadcrumbItem=j;exports.EbayBreadcrumbs=C;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../button-DhwBC3vw.js");exports.EbayButton=t.EbayButton;exports.EbayButtonCell=t.EbayButtonCell;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../button-BeNUU3lZ.js");exports.EbayButton=t.EbayButton;exports.EbayButtonCell=t.EbayButtonCell;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../calendar-Bnx_QLoQ.js");exports.EbayCalendar=e.EbayCalendar;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../calendar-Dw_PWT2C.js");exports.EbayCalendar=e.EbayCalendar;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("../tslib.es6-C4EgNkz1.js"),s=require("react"),q=require("classnames"),ee=require("../icon-C-bWGO-9.js"),W=require("../debounce-BQsYxxOL.js"),le=require("react-dom");require("../array.polyfill.flat-5BAolFdk.js");const ae=require("../reduced-motion-CMIhlQVx.js"),ce=require("../forwardRef-DBQKIlPy.js"),ie={prev:"chevronLeft16",next:"chevronRight16"},ue={prev:"LEFT",next:"RIGHT"},Y=({type:e,label:n,hidden:t,disabled:r,onClick:a})=>{const c=l=>{a(l,{direction:ue[e]})};return s.createElement("button",{className:q("carousel__control",`carousel__control--${e}`),"aria-label":n,"aria-disabled":r,disabled:r,onClick:c},s.createElement(ee.EbayIcon,{className:q("icon",`icon--carousel-${e}`),focusable:!1,name:ie[e],"aria-hidden":t}))};function fe(e){const n=e.parentElement,t=n?n.firstElementChild.getBoundingClientRect().left:0,{left:r,right:a}=e.getBoundingClientRect();return{left:r-t,right:a-t}}const de=e=>getComputedStyle(e).overflowX!=="visible",I=(e,n)=>{if(!e.length)return 0;const t=e[e.length-1];return Math.max(t.right-n,0)||0},he=(e,n,t)=>e.length&&Math.min(e[n].left,I(e,t))||0,me=(e,n,t,r,a,c)=>s.Children.map(e,(l,u)=>{const{style:f={}}=l.props;let i;if(t){const o=t+t%1;i=`calc(${100/o}% - ${(o-1)*c/o}px)`}const d=t?u%t===0:!0;return s.cloneElement(l,{slideWidth:r,offset:a,ref:o=>{n.current[u]=o},className:d?"carousel__snap-point":l.props.className,style:Object.assign(Object.assign({},f),{width:i||f.width,marginRight:c&&u!==s.Children.count(e)-1?`${c}px`:f.marginRight})})}),te=(e,n,t)=>{if(e>0){let r=e;return r%=n.length||1,r-=r%(t||1),r=Math.abs(r),r}return 0},ye=(e,n,t=e)=>{if(n)return Math.ceil(t/n)},Ee=e=>e==="LEFT"?-1:1,ge=(e,n,t,r,a)=>{let c=n,l;if(e==="LEFT"&&c===0)c=t.length-1;else{do{const u=Ee(e);l=t[c+=u]}while(l&&l.fullyVisible);if(e==="LEFT"&&!a){const u=l.right-r;do l=t[--c];while(l&&l.left>=u);c+=1}}return te(c,t,a)},pe=(e,n,t,r=1,a)=>{let c;if(e>=I(n,t)-a)c=n.length-1;else{const l=n.length;let u=0,f=Math.ceil(l/r)-1;for(;f-u>1;){const o=Math.floor((u+f)/2);e>n[o*r].left?u=o:f=o}const i=Math.abs(e-n[u*r].left),d=Math.abs(e-n[f*r].left);c=te((i>d?f:u)*r,n,r)}return c};function be({direction:e,nextIndex:n,currentIndex:t,itemsRef:r,slideWidth:a,gap:c,onAnimationStart:l,onAnimationEnd:u}){if(e==="RIGHT"&&n<t){let i=r.current[t].element.closest("ul");i.style.transition="none";const d=I(r.current,a)+a+c;for(let o=t;o>n;o--)r.current[o].element.style.transform=`translateX(${-d}px)`;i.style.transform=`translate3d(${a+c}px, 0, 0)`,l(),requestAnimationFrame(()=>{i.style.transition="",i.style.transform="translate3d(0, 0, 0)",i=null}),i.addEventListener("transitionend",()=>{requestAnimationFrame(()=>{for(let o=t;o>n;o--)r.current[o].element.style.transform="";u()})},{once:!0})}else if(e==="LEFT"&&n>t){let i=r.current[t].element.closest("ul");i.style.transition="none";const d=I(r.current,a)+a+c;for(let o=t;o<n;o++)r.current[o].element.style.transform=`translateX(${d}px)`;i.style.transform=`translate3d(${-d}px, 0, 0)`,l(),requestAnimationFrame(()=>{i.style.transition="",i.style.transform=`translate3d(${-d+a+c}px, 0, 0)`,i=null}),i.addEventListener("transitionend",()=>{requestAnimationFrame(()=>{for(let o=t;o<n;o++)r.current[o].element.style.transform="";u()})},{once:!0})}}const ve=(e,n)=>{let t,r,a;return function c(){const{scrollLeft:l}=e;if(a!==l){a=l,t=setTimeout(()=>{r=requestAnimationFrame(c)},90);return}n(a)}(),()=>{clearTimeout(t),cancelAnimationFrame(r)}},Se=typeof window<"u"&&"scrollBehavior"in document.body.style;function ne(e,n,t){if(Se)return e.scrollTo({left:n}),ve(e,t);let r,a,c=requestAnimationFrame(o=>{const{scrollLeft:L}=e,x=n-L,R=450;(function w(p){const b=p-o;if(b>R)return e.scrollLeft=n,l(),t();e.scrollLeft=Te(b/R)*x+L,c=requestAnimationFrame(w)})(o)});return e.addEventListener("touchstart",u),l;function l(){cancelAnimationFrame(c),r===void 0?i():(a&&a(),d())}function u(){l(),r=e.scrollLeft,e.addEventListener("touchend",f)}function f(){d(),r===e.scrollLeft&&(a=ne(e,n,t))}function i(){e.removeEventListener("touchstart",u)}function d(){e.removeEventListener("touchend",f)}}function Te(e){return e<.5?2*e*e:-1+(4-2*e)*e}const Ce=({gap:e=16,itemsPerSlide:n,slideWidth:t,offset:r,activeIndex:a,nextControlDisabled:c,isAutoplayEnabled:l,className:u,itemsRef:f,children:i,onSetActiveIndex:d,onScroll:o})=>{const[L,x]=s.useState(0),[R,w]=s.useState(!1),[p,b]=s.useState(!1),m=s.useRef(null),v=s.useRef(null);s.useEffect(()=>{if(!s.Children.count(i)||!m.current)return;if(R){w(!1);return}const E=m.current;if(de(E))return b(!0),ne(E,r,()=>b(!1));x(r)},[r]);const y=s.useCallback(()=>{const _=m.current.scrollLeft,E=pe(_,f.current,t,n,e);E!==a&&(w(!0),d(E),o({index:E}))},[m.current,t,a,d]),M=()=>{v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{p||y()},640)};return s.createElement("div",{className:q("carousel__viewport",{"carousel__viewport--mask":!c&&!l},u)},s.createElement("ul",{className:"carousel__list",ref:m,onScroll:M,style:{transform:`translate3d(${-L}px, 0, 0)`}},me(i,f,n,t,r,e)))},Le=le.flushSync||(e=>e()),Re=e=>{var{gap:n=16,index:t=0,itemsPerSlide:r,a11yPreviousText:a,a11yNextText:c,a11yPauseText:l,a11yPlayText:u,autoplay:f,onScroll:i=()=>{},onNext:d=()=>{},onPrevious:o=()=>{},onSlide:L=()=>{},onPlay:x=()=>{},onPause:R=()=>{},className:w,children:p}=e,b=Z.__rest(e,["gap","index","itemsPerSlide","a11yPreviousText","a11yNextText","a11yPauseText","a11yPlayText","autoplay","onScroll","onNext","onPrevious","onSlide","onPlay","onPause","className","children"]);const[m,v]=s.useState(t),[y,M]=s.useState(0),[_,E]=s.useState(0),[k,D]=s.useState(!1),F=s.useRef(null),S=s.useRef([]),O=s.Children.count(p),T=Math.floor(r)||void 0,j=O<=T,g=!!f,re=j||_===0&&!g,H=j||_===I(S.current,y)&&!g,V=()=>{if(!F.current)return;const{width:h}=F.current.getBoundingClientRect();M(h)};s.useEffect(()=>(window.addEventListener("resize",W.debounce(V,16)),()=>{window.removeEventListener("resize",W.debounce(V,16))}),[]);const[G,X]=s.useState(!1);s.useEffect(()=>{G||E(he(S.current,m,y))},[m,y,G]),s.useEffect(()=>{t>=0&&t<=O-1&&v(t)},[t]),s.useEffect(()=>{S.current=S.current.splice(0,O)},[p]),s.useEffect(()=>{const{width:h}=F.current.getBoundingClientRect();M(h)},[F.current]);const A=ae.useReducedMotion(),[N,U]=s.useState(A);s.useEffect(()=>{U(A)},[A]);const se=h=>{U(!N),N?x(h):R(h)},J=s.useRef(m);J.current=m;const K=(h,C)=>{const P=J.current,z=ge(h,P,S.current,y,C),oe=ye(P,C,z);L({slide:oe}),g&&be({direction:h,nextIndex:z,currentIndex:P,itemsRef:S,slideWidth:y,gap:n,onAnimationStart:()=>X(!0),onAnimationEnd:()=>X(!1)}),Le(()=>v(z))};s.useEffect(()=>{if(!g||N||k)return;const C=setInterval(()=>{K("RIGHT",T)},typeof f=="number"?f:4e3);return()=>clearInterval(C)},[g,N,T,k]);const Q=(h,{direction:C})=>{K(C,T),C==="LEFT"?o(h):d(h)},$=()=>D(!0),B=()=>D(!1);return s.createElement("div",Object.assign({className:q("carousel",w,{"carousel--slides":T,"carousel--peek":T%1===0,carousel__autoplay:g})},b),s.createElement("div",{ref:F,className:"carousel__container",onFocusCapture:$,onMouseEnter:$,onTouchStartCapture:$,onBlurCapture:B,onMouseLeave:B,onTouchEndCapture:B},s.createElement(Y,{label:a,type:"prev",disabled:re,onClick:Q}),s.createElement(Ce,{itemsRef:S,offset:_,gap:n,itemsPerSlide:T,nextControlDisabled:H,isAutoplayEnabled:g,activeIndex:m,onScroll:i,onSetActiveIndex:v,slideWidth:y},p),s.createElement(Y,{type:"next",label:c,disabled:H,onClick:Q}),g?s.createElement("button",{className:"carousel__playback",type:"button",onClick:se,"aria-label":N?u:l},s.createElement(ee.EbayIcon,{name:N?"play24":"pause24"})):null))},we=e=>{var{slideWidth:n,offset:t,forwardedRef:r,children:a}=e,c=Z.__rest(e,["slideWidth","offset","forwardedRef","children"]);const l=s.useRef(null),[u,f]=s.useState(!1);return s.useImperativeHandle(r,()=>{if(!l.current)return;const{left:i,right:d}=fe(l.current),o=i===void 0||i-t>=-.01&&d-t<=n+.01;return f(o),{element:l.current,left:i,right:d,fullyVisible:o}},[n,t]),s.createElement("li",Object.assign({},c,{ref:l,"aria-hidden":!u}),a)},_e=ce.withForwardRef(we);exports.EbayCarousel=Re;exports.EbayCarouselItem=_e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("../tslib.es6-C4EgNkz1.js"),s=require("react"),q=require("classnames"),ee=require("../icon-CR8ApQBy.js"),W=require("../debounce-BQsYxxOL.js"),le=require("react-dom");require("../array.polyfill.flat-5BAolFdk.js");const ae=require("../reduced-motion-CMIhlQVx.js"),ce=require("../forwardRef-DBQKIlPy.js"),ie={prev:"chevronLeft16",next:"chevronRight16"},ue={prev:"LEFT",next:"RIGHT"},Y=({type:e,label:n,hidden:t,disabled:r,onClick:a})=>{const c=l=>{a(l,{direction:ue[e]})};return s.createElement("button",{className:q("carousel__control",`carousel__control--${e}`),"aria-label":n,"aria-disabled":r,disabled:r,onClick:c},s.createElement(ee.EbayIcon,{className:q("icon",`icon--carousel-${e}`),focusable:!1,name:ie[e],"aria-hidden":t}))};function fe(e){const n=e.parentElement,t=n?n.firstElementChild.getBoundingClientRect().left:0,{left:r,right:a}=e.getBoundingClientRect();return{left:r-t,right:a-t}}const de=e=>getComputedStyle(e).overflowX!=="visible",I=(e,n)=>{if(!e.length)return 0;const t=e[e.length-1];return Math.max(t.right-n,0)||0},he=(e,n,t)=>e.length&&Math.min(e[n].left,I(e,t))||0,me=(e,n,t,r,a,c)=>s.Children.map(e,(l,u)=>{const{style:f={}}=l.props;let i;if(t){const o=t+t%1;i=`calc(${100/o}% - ${(o-1)*c/o}px)`}const d=t?u%t===0:!0;return s.cloneElement(l,{slideWidth:r,offset:a,ref:o=>{n.current[u]=o},className:d?"carousel__snap-point":l.props.className,style:Object.assign(Object.assign({},f),{width:i||f.width,marginRight:c&&u!==s.Children.count(e)-1?`${c}px`:f.marginRight})})}),te=(e,n,t)=>{if(e>0){let r=e;return r%=n.length||1,r-=r%(t||1),r=Math.abs(r),r}return 0},ye=(e,n,t=e)=>{if(n)return Math.ceil(t/n)},Ee=e=>e==="LEFT"?-1:1,ge=(e,n,t,r,a)=>{let c=n,l;if(e==="LEFT"&&c===0)c=t.length-1;else{do{const u=Ee(e);l=t[c+=u]}while(l&&l.fullyVisible);if(e==="LEFT"&&!a){const u=l.right-r;do l=t[--c];while(l&&l.left>=u);c+=1}}return te(c,t,a)},pe=(e,n,t,r=1,a)=>{let c;if(e>=I(n,t)-a)c=n.length-1;else{const l=n.length;let u=0,f=Math.ceil(l/r)-1;for(;f-u>1;){const o=Math.floor((u+f)/2);e>n[o*r].left?u=o:f=o}const i=Math.abs(e-n[u*r].left),d=Math.abs(e-n[f*r].left);c=te((i>d?f:u)*r,n,r)}return c};function be({direction:e,nextIndex:n,currentIndex:t,itemsRef:r,slideWidth:a,gap:c,onAnimationStart:l,onAnimationEnd:u}){if(e==="RIGHT"&&n<t){let i=r.current[t].element.closest("ul");i.style.transition="none";const d=I(r.current,a)+a+c;for(let o=t;o>n;o--)r.current[o].element.style.transform=`translateX(${-d}px)`;i.style.transform=`translate3d(${a+c}px, 0, 0)`,l(),requestAnimationFrame(()=>{i.style.transition="",i.style.transform="translate3d(0, 0, 0)",i=null}),i.addEventListener("transitionend",()=>{requestAnimationFrame(()=>{for(let o=t;o>n;o--)r.current[o].element.style.transform="";u()})},{once:!0})}else if(e==="LEFT"&&n>t){let i=r.current[t].element.closest("ul");i.style.transition="none";const d=I(r.current,a)+a+c;for(let o=t;o<n;o++)r.current[o].element.style.transform=`translateX(${d}px)`;i.style.transform=`translate3d(${-d}px, 0, 0)`,l(),requestAnimationFrame(()=>{i.style.transition="",i.style.transform=`translate3d(${-d+a+c}px, 0, 0)`,i=null}),i.addEventListener("transitionend",()=>{requestAnimationFrame(()=>{for(let o=t;o<n;o++)r.current[o].element.style.transform="";u()})},{once:!0})}}const ve=(e,n)=>{let t,r,a;return function c(){const{scrollLeft:l}=e;if(a!==l){a=l,t=setTimeout(()=>{r=requestAnimationFrame(c)},90);return}n(a)}(),()=>{clearTimeout(t),cancelAnimationFrame(r)}},Se=typeof window<"u"&&"scrollBehavior"in document.body.style;function ne(e,n,t){if(Se)return e.scrollTo({left:n}),ve(e,t);let r,a,c=requestAnimationFrame(o=>{const{scrollLeft:L}=e,x=n-L,R=450;(function w(p){const b=p-o;if(b>R)return e.scrollLeft=n,l(),t();e.scrollLeft=Te(b/R)*x+L,c=requestAnimationFrame(w)})(o)});return e.addEventListener("touchstart",u),l;function l(){cancelAnimationFrame(c),r===void 0?i():(a&&a(),d())}function u(){l(),r=e.scrollLeft,e.addEventListener("touchend",f)}function f(){d(),r===e.scrollLeft&&(a=ne(e,n,t))}function i(){e.removeEventListener("touchstart",u)}function d(){e.removeEventListener("touchend",f)}}function Te(e){return e<.5?2*e*e:-1+(4-2*e)*e}const Ce=({gap:e=16,itemsPerSlide:n,slideWidth:t,offset:r,activeIndex:a,nextControlDisabled:c,isAutoplayEnabled:l,className:u,itemsRef:f,children:i,onSetActiveIndex:d,onScroll:o})=>{const[L,x]=s.useState(0),[R,w]=s.useState(!1),[p,b]=s.useState(!1),m=s.useRef(null),v=s.useRef(null);s.useEffect(()=>{if(!s.Children.count(i)||!m.current)return;if(R){w(!1);return}const E=m.current;if(de(E))return b(!0),ne(E,r,()=>b(!1));x(r)},[r]);const y=s.useCallback(()=>{const _=m.current.scrollLeft,E=pe(_,f.current,t,n,e);E!==a&&(w(!0),d(E),o({index:E}))},[m.current,t,a,d]),M=()=>{v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{p||y()},640)};return s.createElement("div",{className:q("carousel__viewport",{"carousel__viewport--mask":!c&&!l},u)},s.createElement("ul",{className:"carousel__list",ref:m,onScroll:M,style:{transform:`translate3d(${-L}px, 0, 0)`}},me(i,f,n,t,r,e)))},Le=le.flushSync||(e=>e()),Re=e=>{var{gap:n=16,index:t=0,itemsPerSlide:r,a11yPreviousText:a,a11yNextText:c,a11yPauseText:l,a11yPlayText:u,autoplay:f,onScroll:i=()=>{},onNext:d=()=>{},onPrevious:o=()=>{},onSlide:L=()=>{},onPlay:x=()=>{},onPause:R=()=>{},className:w,children:p}=e,b=Z.__rest(e,["gap","index","itemsPerSlide","a11yPreviousText","a11yNextText","a11yPauseText","a11yPlayText","autoplay","onScroll","onNext","onPrevious","onSlide","onPlay","onPause","className","children"]);const[m,v]=s.useState(t),[y,M]=s.useState(0),[_,E]=s.useState(0),[k,D]=s.useState(!1),F=s.useRef(null),S=s.useRef([]),O=s.Children.count(p),T=Math.floor(r)||void 0,j=O<=T,g=!!f,re=j||_===0&&!g,H=j||_===I(S.current,y)&&!g,V=()=>{if(!F.current)return;const{width:h}=F.current.getBoundingClientRect();M(h)};s.useEffect(()=>(window.addEventListener("resize",W.debounce(V,16)),()=>{window.removeEventListener("resize",W.debounce(V,16))}),[]);const[G,X]=s.useState(!1);s.useEffect(()=>{G||E(he(S.current,m,y))},[m,y,G]),s.useEffect(()=>{t>=0&&t<=O-1&&v(t)},[t]),s.useEffect(()=>{S.current=S.current.splice(0,O)},[p]),s.useEffect(()=>{const{width:h}=F.current.getBoundingClientRect();M(h)},[F.current]);const A=ae.useReducedMotion(),[N,U]=s.useState(A);s.useEffect(()=>{U(A)},[A]);const se=h=>{U(!N),N?x(h):R(h)},J=s.useRef(m);J.current=m;const K=(h,C)=>{const P=J.current,z=ge(h,P,S.current,y,C),oe=ye(P,C,z);L({slide:oe}),g&&be({direction:h,nextIndex:z,currentIndex:P,itemsRef:S,slideWidth:y,gap:n,onAnimationStart:()=>X(!0),onAnimationEnd:()=>X(!1)}),Le(()=>v(z))};s.useEffect(()=>{if(!g||N||k)return;const C=setInterval(()=>{K("RIGHT",T)},typeof f=="number"?f:4e3);return()=>clearInterval(C)},[g,N,T,k]);const Q=(h,{direction:C})=>{K(C,T),C==="LEFT"?o(h):d(h)},$=()=>D(!0),B=()=>D(!1);return s.createElement("div",Object.assign({className:q("carousel",w,{"carousel--slides":T,"carousel--peek":T%1===0,carousel__autoplay:g})},b),s.createElement("div",{ref:F,className:"carousel__container",onFocusCapture:$,onMouseEnter:$,onTouchStartCapture:$,onBlurCapture:B,onMouseLeave:B,onTouchEndCapture:B},s.createElement(Y,{label:a,type:"prev",disabled:re,onClick:Q}),s.createElement(Ce,{itemsRef:S,offset:_,gap:n,itemsPerSlide:T,nextControlDisabled:H,isAutoplayEnabled:g,activeIndex:m,onScroll:i,onSetActiveIndex:v,slideWidth:y},p),s.createElement(Y,{type:"next",label:c,disabled:H,onClick:Q}),g?s.createElement("button",{className:"carousel__playback",type:"button",onClick:se,"aria-label":N?u:l},s.createElement(ee.EbayIcon,{name:N?"play24":"pause24"})):null))},we=e=>{var{slideWidth:n,offset:t,forwardedRef:r,children:a}=e,c=Z.__rest(e,["slideWidth","offset","forwardedRef","children"]);const l=s.useRef(null),[u,f]=s.useState(!1);return s.useImperativeHandle(r,()=>{if(!l.current)return;const{left:i,right:d}=fe(l.current),o=i===void 0||i-t>=-.01&&d-t<=n+.01;return f(o),{element:l.current,left:i,right:d,fullyVisible:o}},[n,t]),s.createElement("li",Object.assign({},c,{ref:l,"aria-hidden":!u}),a)},_e=ce.withForwardRef(we);exports.EbayCarousel=Re;exports.EbayCarouselItem=_e;
package/ebay-ccd/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),r=require("../icon-C-bWGO-9.js"),h=require("classnames"),C=t=>{var{max:a,min:c,chargerIcon:n,units:i="W",secondaryType:d="none",secondaryText:s="USB PD",a11yUnits:o="watts","aria-label":m,className:u}=t,y=_.__rest(t,["max","min","chargerIcon","units","secondaryType","secondaryText","a11yUnits","aria-label","className"]);const l=d==="usbpd",b=n?`Charger ${n==="included"?"":"not "}included.`:"",g=c||a?`${c} - ${a} ${o}. ${l?s:""}`:"",E=`${b} ${g}`.trim();return e.createElement("div",Object.assign({},y,{role:"figure","aria-label":m||E,className:h("ccd",u)}),n==="included"&&e.createElement(r.EbayIcon,{name:"ccdChargerIncluded",className:"ccd__charger-icon"}),n==="not-included"&&e.createElement(r.EbayIcon,{name:"ccdChargerNotIncluded",className:"ccd__charger-icon"}),(c||a)&&e.createElement("div",{className:"ccd__description-figure"},e.createElement(r.EbayIcon,{name:"ccdTop",className:"ccd__top-icon"}),e.createElement("div",{className:"ccd__body"},e.createElement("div",null,c," - ",a),e.createElement("div",null,i),l&&e.createElement("div",null,s))))};exports.EbayCCD=C;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),r=require("../icon-CR8ApQBy.js"),h=require("classnames"),C=t=>{var{max:a,min:c,chargerIcon:n,units:i="W",secondaryType:d="none",secondaryText:s="USB PD",a11yUnits:o="watts","aria-label":m,className:u}=t,y=_.__rest(t,["max","min","chargerIcon","units","secondaryType","secondaryText","a11yUnits","aria-label","className"]);const l=d==="usbpd",b=n?`Charger ${n==="included"?"":"not "}included.`:"",g=c||a?`${c} - ${a} ${o}. ${l?s:""}`:"",E=`${b} ${g}`.trim();return e.createElement("div",Object.assign({},y,{role:"figure","aria-label":m||E,className:h("ccd",u)}),n==="included"&&e.createElement(r.EbayIcon,{name:"ccdChargerIncluded",className:"ccd__charger-icon"}),n==="not-included"&&e.createElement(r.EbayIcon,{name:"ccdChargerNotIncluded",className:"ccd__charger-icon"}),(c||a)&&e.createElement("div",{className:"ccd__description-figure"},e.createElement(r.EbayIcon,{name:"ccdTop",className:"ccd__top-icon"}),e.createElement("div",{className:"ccd__body"},e.createElement("div",null,c," - ",a),e.createElement("div",null,i),l&&e.createElement("div",null,s))))};exports.EbayCCD=C;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../checkbox-ebkMhvbJ.js");exports.EbayCheckbox=e.EbayCheckbox;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../checkbox-CFfWkQ2y.js");exports.EbayCheckbox=e.EbayCheckbox;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chip-CfMEg9CT.js");exports.EbayChip=e.EbayChip;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chip-CuR-Dm9y.js");exports.EbayChip=e.EbayChip;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../tslib.es6-C4EgNkz1.js"),o=require("react"),N=require("classnames"),a=require("../combobox-BzM04rYV.js"),R=require("../utils-C9NL3q0j.js"),T=require("../chip-CfMEg9CT.js");require("../hooks-B4eFIQlH.js");require("../array.polyfill.flat-5BAolFdk.js");require("../dropdown-BGdrijmi.js");const B=i=>{var{className:h,fluid:x,error:y,disabled:c,selected:r,defaultSelected:u,a11yDeleteButtonText:f="Remove",onChange:n,children:C}=i,E=_.__rest(i,["className","fluid","error","disabled","selected","defaultSelected","a11yDeleteButtonText","onChange","children"]);const S=R.filterByType(C,a.EbayComboboxOption),[g,b]=o.useState(u||[]),s=r||g,[v,d]=o.useState(""),p=o.useRef(null),m=(e,t)=>{const l=[...s,t];b(l),n==null||n(e,{selected:[...l]}),d("")},w=(e,t)=>{const l=s.filter((I,D)=>D!==t);b(l),n==null||n(e,{selected:[...l]})},O=e=>{if(e.key==="Enter"){const t=e.target.value;e.preventDefault(),t&&!s.includes(t)&&m(e,t)}},q=(e,t)=>{d(t.currentInputValue)};if(r&&u)throw new Error('EbayChipsCombobox: You cannot use "selected" and "defaultSelected" at the same time.');if(r&&!n)throw new Error('EbayChipsCombobox: You must provide an "onChange" prop when using the "selected" prop.');return o.createElement("span",{ref:p,className:N(h,"chips-combobox",{"chips-combobox--fluid":x,"chips-combobox--error":y}),"aria-disabled":c?"true":void 0},s.length?o.createElement("ul",{className:"chips-combobox__items"},s.map((e,t)=>o.createElement("li",{key:t},o.createElement(T.EbayChip,{a11yDeleteButtonText:`${f} ${e}`,onDelete:l=>w(l,t),disabled:c},e)))):null,o.createElement(a.EbayCombobox,Object.assign({},E,{className:"chips-combobox__combobox",disabled:c,dropdownRef:p,value:v,autocomplete:"list",onSelect:(e,t)=>m(e,t.selectedOption.text),onInputChange:q,onKeyDown:O}),S.filter(e=>!s.includes(e.props.text))))};exports.EbayComboboxOption=a.EbayComboboxOption;exports.EbayChipsCombobox=B;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../tslib.es6-C4EgNkz1.js"),o=require("react"),N=require("classnames"),a=require("../combobox-BTNktYex.js"),R=require("../utils-C9NL3q0j.js"),T=require("../chip-CuR-Dm9y.js");require("../hooks-DTTigNDz.js");require("../array.polyfill.flat-5BAolFdk.js");require("../dropdown-DIUzEfhV.js");const B=i=>{var{className:h,fluid:x,error:y,disabled:c,selected:r,defaultSelected:u,a11yDeleteButtonText:f="Remove",onChange:n,children:C}=i,E=_.__rest(i,["className","fluid","error","disabled","selected","defaultSelected","a11yDeleteButtonText","onChange","children"]);const S=R.filterByType(C,a.EbayComboboxOption),[g,b]=o.useState(u||[]),s=r||g,[v,d]=o.useState(""),p=o.useRef(null),m=(e,t)=>{const l=[...s,t];b(l),n?.(e,{selected:[...l]}),d("")},w=(e,t)=>{const l=s.filter((I,D)=>D!==t);b(l),n?.(e,{selected:[...l]})},O=e=>{if(e.key==="Enter"){const t=e.target.value;e.preventDefault(),t&&!s.includes(t)&&m(e,t)}},q=(e,t)=>{d(t.currentInputValue)};if(r&&u)throw new Error('EbayChipsCombobox: You cannot use "selected" and "defaultSelected" at the same time.');if(r&&!n)throw new Error('EbayChipsCombobox: You must provide an "onChange" prop when using the "selected" prop.');return o.createElement("span",{ref:p,className:N(h,"chips-combobox",{"chips-combobox--fluid":x,"chips-combobox--error":y}),"aria-disabled":c?"true":void 0},s.length?o.createElement("ul",{className:"chips-combobox__items"},s.map((e,t)=>o.createElement("li",{key:t},o.createElement(T.EbayChip,{a11yDeleteButtonText:`${f} ${e}`,onDelete:l=>w(l,t),disabled:c},e)))):null,o.createElement(a.EbayCombobox,Object.assign({},E,{className:"chips-combobox__combobox",disabled:c,dropdownRef:p,value:v,autocomplete:"list",onSelect:(e,t)=>m(e,t.selectedOption.text),onInputChange:q,onKeyDown:O}),S.filter(e=>!s.includes(e.props.text))))};exports.EbayComboboxOption=a.EbayComboboxOption;exports.EbayChipsCombobox=B;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../combobox-BzM04rYV.js");exports.EbayCombobox=o.EbayCombobox;exports.EbayComboboxButton=o.EbayComboboxButton;exports.EbayComboboxOption=o.EbayComboboxOption;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../combobox-BTNktYex.js");exports.EbayCombobox=o.EbayCombobox;exports.EbayComboboxButton=o.EbayComboboxButton;exports.EbayComboboxOption=o.EbayComboboxOption;
@@ -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-C3ZdijBt.js");require("../icon-button-CHW6Lezn.js");const s=require("../button-DhwBC3vw.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
+ "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-DvWLfiq0.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 i=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),d=require("classnames"),b=require("../forwardRef-DBQKIlPy.js"),f=require("../icon-C-bWGO-9.js"),m=require("../button-DhwBC3vw.js"),E=t=>{var{size:r,children:a,fluid:n,truncate:c,forwardedRef:s,className:o}=t,l=i.__rest(t,["size","children","fluid","truncate","forwardedRef","className"]);const u=d(o,"cta-btn",{"cta-btn--large":r==="large"},{"cta-btn--fluid":n},{"cta-btn--truncated":c});return e.createElement("a",Object.assign({},l,{className:u,ref:s}),e.createElement(m.EbayButtonCell,{type:"cta"},e.createElement("span",null,a),e.createElement(f.EbayIcon,{name:"arrowRight24"})))},y=b.withForwardRef(E);exports.EbayCtaButton=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),d=require("classnames"),b=require("../forwardRef-DBQKIlPy.js"),f=require("../icon-CR8ApQBy.js"),m=require("../button-BeNUU3lZ.js"),E=t=>{var{size:r,children:a,fluid:n,truncate:c,forwardedRef:s,className:o}=t,l=i.__rest(t,["size","children","fluid","truncate","forwardedRef","className"]);const u=d(o,"cta-btn",{"cta-btn--large":r==="large"},{"cta-btn--fluid":n},{"cta-btn--truncated":c});return e.createElement("a",Object.assign({},l,{className:u,ref:s}),e.createElement(m.EbayButtonCell,{type:"cta"},e.createElement("span",null,a),e.createElement(f.EbayIcon,{name:"arrowRight24"})))},y=b.withForwardRef(E);exports.EbayCtaButton=y;
@@ -1 +1 @@
1
- {"version":3,"file":"date-textbox.d.ts","sourceRoot":"","sources":["../../src/ebay-date-textbox/date-textbox.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAe,EAAE,EAAuD,MAAM,OAAO,CAAC;AAGpG,OAAqB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG5E,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAInH,KAAK,SAAS,GAAG;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,iBAAiB,EAAE,aAAa,GAAG,WAAW,GAAG,WAAW,GAAG,UAAU,CAAC,GAAG;IACjH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oBAAoB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,sBAAsB,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAC1D,qBAAqB,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAClD,qBAAqB,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;IACvD,aAAa,CAAC,EAAE,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;IACzD,qBAAqB,CAAC,EAAE,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;CACpE,CAAC;AAIF,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAgM7C,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"date-textbox.d.ts","sourceRoot":"","sources":["../../src/ebay-date-textbox/date-textbox.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAe,EAAE,EAAuD,MAAM,OAAO,CAAC;AAGpG,OAAqB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG5E,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAInH,KAAK,SAAS,GAAG;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,iBAAiB,EAAE,aAAa,GAAG,WAAW,GAAG,WAAW,GAAG,UAAU,CAAC,GAAG;IACjH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oBAAoB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,sBAAsB,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAC1D,qBAAqB,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAClD,qBAAqB,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;IACvD,aAAa,CAAC,EAAE,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;IACzD,qBAAqB,CAAC,EAAE,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;CACpE,CAAC;AAIF,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAsL7C,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const J=require("../tslib.es6-C4EgNkz1.js"),a=require("react"),c=require("makeup-expander"),K=require("classnames"),v=require("../calendar-Bnx_QLoQ.js"),i=require("../textbox-voEWwh3v.js");require("../icon-C-bWGO-9.js");const Q=require("../dropdown-BGdrijmi.js");var N;const{default:X=c}=(N=c==null?void 0:c.default)!=null&&N.__esModule?c.default:c,Z=600,$=m=>{var{className:D,inputPlaceholderText:g="YYYY-MM-DD",a11yOpenPopoverText:_="open calendar",range:o,value:y,rangeEnd:I,defaultValue:q,defaultRangeEnd:w,collapseOnSelect:M,onChange:p=()=>{},onInputChange:A=()=>{},onInputRangeEndChange:L=()=>{}}=m,V=J.__rest(m,["className","inputPlaceholderText","a11yOpenPopoverText","range","value","rangeEnd","defaultValue","defaultRangeEnd","collapseOnSelect","onChange","onInputChange","onInputRangeEndChange"]);const S=a.useRef(null),[Y,d]=a.useState(q||""),[B,u]=a.useState(w||""),b=i.isControlled(y)?y:Y,T=i.isControlled(I)?I:B,[l,E]=a.useState(()=>v.dateArgToISO(b)),[s,x]=a.useState(()=>v.dateArgToISO(T)),[C,O]=a.useState(!1),[F,z]=a.useState(1),{overlayStyles:H,refs:h}=Q.useFloatingDropdown({open:C}),f=h.host,W=()=>{O(!0)},j=()=>{O(!1)};a.useEffect(()=>{if(!f.current)return;S.current=new X(f.current,{hostSelector:".ebay-date-textbox--main > .icon-btn",contentSelector:".date-textbox__popover",expandOnClick:!0,autoCollapse:!0}),f.current.addEventListener("expander-expand",W),f.current.addEventListener("expander-collapse",j);const e=()=>{z(document.documentElement.clientWidth<Z?1:2)};return e(),window.addEventListener("resize",e),()=>{var t;(t=S.current)===null||t===void 0||t.destroy(),window.removeEventListener("resize",e)}},[]);const P=(e,t)=>{const r=new Date(e.target.value),n=isNaN(r.getTime())?null:v.toISO(r);t===0?(E(n),d(n||"")):(x(n),u(n||"")),o?p(e,{rangeStart:t===0?n:l,rangeEnd:t===1?n:s}):p(e,{selected:n})},k=(e,{iso:t})=>{if(E(t),d(t),o){const r=l||s,n={rangeStart:t,rangeEnd:r};l&&s?(u(""),x(null),n.rangeEnd=null):r&&(r<t?(E(r),d(r),u(t),x(t),n.rangeStart=r,n.rangeEnd=t):(E(t),d(t),u(r),x(r),n.rangeStart=t,n.rangeEnd=r)),p(e,n)}else p(e,{selected:t});M&&(S.current.expanded=!1)},R=(e,t)=>{t===0?(d(e.target.value),A(e)):(u(e.target.value),L(e))},[U,G]=Array.isArray(g)?g:[g,g];return a.createElement("span",{className:K("date-textbox",D),ref:h.setHost},o&&a.createElement(i.EbayTextbox,{value:b,placeholder:U,onInputChange:e=>R(e,0),onBlur:e=>P(e,0)}),a.createElement(i.EbayTextbox,{className:"ebay-date-textbox--main",placeholder:G,value:o?T:b,onInputChange:e=>R(e,o?1:0),onBlur:e=>P(e,o?1:0)},a.createElement(i.EbayTextboxPostfixIcon,{name:"calendar24",buttonAriaLabel:_})),a.createElement("div",{hidden:!C,ref:h.setOverlay,style:H,className:"date-textbox__popover"},a.createElement(v.EbayCalendar,Object.assign({},V,{range:o,interactive:!0,navigable:!0,numMonths:F,selected:l&&s?[l,s]:l||s||void 0,onSelect:k}))))};exports.EbayDateTextbox=$;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("../tslib.es6-C4EgNkz1.js"),a=require("react"),E=require("makeup-expander"),U=require("classnames"),x=require("../calendar-Dw_PWT2C.js"),u=require("../textbox-bggbXBGB.js");require("../icon-CR8ApQBy.js");const G=require("../dropdown-DIUzEfhV.js"),{default:J=E}=E?.default?.__esModule?E.default:E,K=600,Q=h=>{var{className:O,inputPlaceholderText:i="YYYY-MM-DD",a11yOpenPopoverText:P="open calendar",range:o,value:m,rangeEnd:S,defaultValue:R,defaultRangeEnd:N,collapseOnSelect:D,onChange:p=()=>{},onInputChange:q=()=>{},onInputRangeEndChange:w=()=>{}}=h,M=k.__rest(h,["className","inputPlaceholderText","a11yOpenPopoverText","range","value","rangeEnd","defaultValue","defaultRangeEnd","collapseOnSelect","onChange","onInputChange","onInputRangeEndChange"]);const f=a.useRef(null),[A,c]=a.useState(R||""),[L,d]=a.useState(N||""),v=u.isControlled(m)?m:A,y=u.isControlled(S)?S:L,l=x.dateArgToISO(v),s=x.dateArgToISO(y),[I,_]=a.useState(!1),[V,Y]=a.useState(1),{overlayStyles:j,refs:b}=G.useFloatingDropdown({open:I}),g=b.host,B=()=>{_(!0)},z=()=>{_(!1)};a.useEffect(()=>{if(!g.current)return;f.current=new J(g.current,{hostSelector:".ebay-date-textbox--main > .icon-btn",contentSelector:".date-textbox__popover",expandOnClick:!0,autoCollapse:!0}),g.current.addEventListener("expander-expand",B),g.current.addEventListener("expander-collapse",z);const e=()=>{Y(document.documentElement.clientWidth<K?1:2)};return e(),window.addEventListener("resize",e),()=>{var t;(t=f.current)===null||t===void 0||t.destroy(),window.removeEventListener("resize",e)}},[]);const T=(e,t)=>{const r=new Date(e.target.value),n=isNaN(r.getTime())?null:x.toISO(r);t===0?c(n||""):d(n||""),o?p(e,{rangeStart:t===0?n:l,rangeEnd:t===1?n:s}):p(e,{selected:n})},F=(e,{iso:t})=>{if(c(t),o){const r=l||s,n={rangeStart:t,rangeEnd:r};l&&s?(d(""),n.rangeEnd=null):r&&(r<t?(c(r),d(t),n.rangeStart=r,n.rangeEnd=t):(c(t),d(r),n.rangeStart=t,n.rangeEnd=r)),p(e,n)}else p(e,{selected:t});D&&(f.current.expanded=!1)},C=(e,t)=>{t===0?(c(e.target.value),q(e)):(d(e.target.value),w(e))},[H,W]=Array.isArray(i)?i:[i,i];return a.createElement("span",{className:U("date-textbox",O),ref:b.setHost},o&&a.createElement(u.EbayTextbox,{value:v,placeholder:H,onInputChange:e=>C(e,0),onBlur:e=>T(e,0)}),a.createElement(u.EbayTextbox,{className:"ebay-date-textbox--main",placeholder:W,value:o?y:v,onInputChange:e=>C(e,o?1:0),onBlur:e=>T(e,o?1:0)},a.createElement(u.EbayTextboxPostfixIcon,{name:"calendar24",buttonAriaLabel:P})),a.createElement("div",{hidden:!I,ref:b.setOverlay,style:j,className:"date-textbox__popover"},a.createElement(x.EbayCalendar,Object.assign({},M,{range:o,interactive:!0,navigable:!0,numMonths:V,selected:l&&s?[l,s]:l||s||void 0,onSelect:F}))))};exports.EbayDateTextbox=Q;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../ebay-details-BuPepKYE.js");exports.EbayDetails=e.EbayDetails;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../ebay-details-rAR5ofJT.js");exports.EbayDetails=e.EbayDetails;
@@ -1 +1 @@
1
- "use strict";const u=require("./tslib.es6-C4EgNkz1.js"),e=require("react"),n=require("classnames"),E=require("./icon-C-bWGO-9.js"),N=a=>{var{size:l,alignment:c,text:r,as:m="div",className:i,open:o,onToggle:s,children:d}=a,_=u.__rest(a,["size","alignment","text","as","className","open","onToggle","children"]);const g=s&&(t=>{s(t,{open:t.currentTarget.open})});return e.createElement("details",Object.assign({open:o,onToggle:g,className:n("details",i)},_),e.createElement("summary",{className:n("details__summary",{"details__summary--small":l==="small","details__summary--center":c==="center"})},e.createElement("span",{className:"details__label"},r),e.createElement("span",{className:"details__icon",hidden:!0},e.createElement(E.EbayIcon,{name:"chevronDown16"}))),e.createElement(m,{className:"details__content"},d))};exports.EbayDetails=N;
1
+ "use strict";const u=require("./tslib.es6-C4EgNkz1.js"),e=require("react"),n=require("classnames"),E=require("./icon-CR8ApQBy.js"),N=a=>{var{size:l,alignment:c,text:r,as:m="div",className:i,open:o,onToggle:s,children:d}=a,_=u.__rest(a,["size","alignment","text","as","className","open","onToggle","children"]);const g=s&&(t=>{s(t,{open:t.currentTarget.open})});return e.createElement("details",Object.assign({open:o,onToggle:g,className:n("details",i)},_),e.createElement("summary",{className:n("details__summary",{"details__summary--small":l==="small","details__summary--center":c==="center"})},e.createElement("span",{className:"details__label"},r),e.createElement("span",{className:"details__icon",hidden:!0},e.createElement(E.EbayIcon,{name:"chevronDown16"}))),e.createElement(m,{className:"details__content"},d))};exports.EbayDetails=N;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../dialog-previous-button-C3ZdijBt.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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../dialog-previous-button-DvWLfiq0.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-C3ZdijBt.js");require("../icon-button-CHW6Lezn.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
+ "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-DvWLfiq0.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 u=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),m=require("classnames"),E=require("../notice-content-C0ZStfuX.js"),j=require("../notice-content-9iF4T8uB.js"),a=require("../utils-C9NL3q0j.js"),F=require("../icon-C-bWGO-9.js"),O=require("../icon-button-CHW6Lezn.js"),y=require("../notice-footer-G6VPjVZu.js"),P=t=>{var{children:n,className:o,a11yIconText:i,variant:c="none",iconVariant:p="none",a11yDismissText:r,educationIcon:C="lightbulb24",iconClass:h,dismissed:l=!1,onDismiss:T=()=>{}}=t,f=u.__rest(t,["children","className","a11yIconText","variant","iconVariant","a11yDismissText","educationIcon","iconClass","dismissed","onDismiss"]);const[q,v]=e.useState(l),s=a.findComponent(n,E.EbayNoticeContent),d=a.findComponent(n,N),I=a.findComponent(n,b),D=c==="prominent",_=p==="prominent",g=x=>{v(!0),T(x)};if(!d)throw new Error("<EbayEducationNoticeTitle>: Please use a <EbayEducationNoticeTitle> that defines the content of the notice");return q||l?null:e.createElement("section",Object.assign({"aria-roledescription":"Notice"},f,{className:m(o,"education-notice",{"education-notice--prominent":D})}),e.createElement("div",{className:"education-notice__header"},e.createElement(F.EbayIcon,{name:C,className:m(h,{"icon--prominent":_}),a11yText:i,a11yVariant:"label"}),d,r&&e.createElement(O.EbayIconButton,{"aria-label":r,size:"small",className:"education-notice__dismiss",onClick:g,icon:"close16"})),e.createElement(j.NoticeContent,Object.assign({},s==null?void 0:s.props,{type:"education"})),I)},N=t=>{var{className:n,as:o,children:i}=t,c=u.__rest(t,["className","as","children"]);return e.createElement(y.NoticeTitle,Object.assign({},c,{className:n,as:o,type:"education"}),i)},b=({className:t,children:n})=>e.createElement(y.NoticeFooter,{className:t,type:"education"},n);exports.EbayNoticeContent=E.EbayNoticeContent;exports.EbayEducationNotice=P;exports.EbayEducationNoticeFooter=b;exports.EbayEducationNoticeTitle=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),m=require("classnames"),E=require("../notice-content-C0ZStfuX.js"),j=require("../notice-content-9iF4T8uB.js"),a=require("../utils-C9NL3q0j.js"),F=require("../icon-CR8ApQBy.js"),O=require("../icon-button-B1aE4GTn.js"),y=require("../notice-footer-G6VPjVZu.js"),P=t=>{var{children:n,className:o,a11yIconText:i,variant:c="none",iconVariant:p="none",a11yDismissText:r,educationIcon:C="lightbulb24",iconClass:h,dismissed:l=!1,onDismiss:T=()=>{}}=t,f=u.__rest(t,["children","className","a11yIconText","variant","iconVariant","a11yDismissText","educationIcon","iconClass","dismissed","onDismiss"]);const[q,v]=e.useState(l),s=a.findComponent(n,E.EbayNoticeContent),d=a.findComponent(n,N),I=a.findComponent(n,b),D=c==="prominent",_=p==="prominent",g=x=>{v(!0),T(x)};if(!d)throw new Error("<EbayEducationNoticeTitle>: Please use a <EbayEducationNoticeTitle> that defines the content of the notice");return q||l?null:e.createElement("section",Object.assign({"aria-roledescription":"Notice"},f,{className:m(o,"education-notice",{"education-notice--prominent":D})}),e.createElement("div",{className:"education-notice__header"},e.createElement(F.EbayIcon,{name:C,className:m(h,{"icon--prominent":_}),a11yText:i,a11yVariant:"label"}),d,r&&e.createElement(O.EbayIconButton,{"aria-label":r,size:"small",className:"education-notice__dismiss",onClick:g,icon:"close16"})),e.createElement(j.NoticeContent,Object.assign({},s?.props,{type:"education"})),I)},N=t=>{var{className:n,as:o,children:i}=t,c=u.__rest(t,["className","as","children"]);return e.createElement(y.NoticeTitle,Object.assign({},c,{className:n,as:o,type:"education"}),i)},b=({className:t,children:n})=>e.createElement(y.NoticeFooter,{className:t,type:"education"},n);exports.EbayNoticeContent=E.EbayNoticeContent;exports.EbayEducationNotice=P;exports.EbayEducationNoticeFooter=b;exports.EbayEducationNoticeTitle=N;
package/ebay-eek/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),u=require("classnames"),i=require("../icon-C-bWGO-9.js"),d={"A+++":["D","E","G"],"A++":["E","G"],"A+":["F","G"],A:["G"]},E=r=>{const{max:t,min:n,rating:s}=r,l=d[t];if(!(l&&l.indexOf(n)>-1))return null;let e=t,c=1;for(;e!==s;){if(c++,n===e)return null;e.length>1?e=e.slice(0,e.length-1):e=String.fromCharCode(e.charCodeAt(0)+1)}return c>7?7:c},m=({min:r="",max:t="",rating:n,a11yText:s,className:l})=>{const e=E({rating:n,min:r,max:t}),c=u(l,"eek",{[`eek--rating-${e}`]:!!e}),o=`Energy Rating: ${n}. Range: ${t} - ${r}.`;return a.createElement("div",{className:c,role:"figure","aria-label":s||o},a.createElement("div",{className:"eek__container","aria-hidden":!0},a.createElement("span",{className:"eek__rating-range"},a.createElement("span",{"aria-hidden":"true"},t),a.createElement(i.EbayIcon,{name:"eekRangeArrow"}),a.createElement("span",{"aria-hidden":"true"},r)),a.createElement("span",{className:"eek__rating","aria-hidden":"true"},n)),a.createElement(i.EbayIcon,{name:"eekArrow"}))};exports.EbayEek=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),u=require("classnames"),i=require("../icon-CR8ApQBy.js"),d={"A+++":["D","E","G"],"A++":["E","G"],"A+":["F","G"],A:["G"]},E=r=>{const{max:t,min:n,rating:s}=r,l=d[t];if(!(l&&l.indexOf(n)>-1))return null;let e=t,c=1;for(;e!==s;){if(c++,n===e)return null;e.length>1?e=e.slice(0,e.length-1):e=String.fromCharCode(e.charCodeAt(0)+1)}return c>7?7:c},m=({min:r="",max:t="",rating:n,a11yText:s,className:l})=>{const e=E({rating:n,min:r,max:t}),c=u(l,"eek",{[`eek--rating-${e}`]:!!e}),o=`Energy Rating: ${n}. Range: ${t} - ${r}.`;return a.createElement("div",{className:c,role:"figure","aria-label":s||o},a.createElement("div",{className:"eek__container","aria-hidden":!0},a.createElement("span",{className:"eek__rating-range"},a.createElement("span",{"aria-hidden":"true"},t),a.createElement(i.EbayIcon,{name:"eekRangeArrow"}),a.createElement("span",{"aria-hidden":"true"},r)),a.createElement("span",{className:"eek__rating","aria-hidden":"true"},n)),a.createElement(i.EbayIcon,{name:"eekArrow"}))};exports.EbayEek=m;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../tslib.es6-C4EgNkz1.js"),y=require("react"),u=require("classnames"),d=s=>{var{variant:t,type:o,className:i,onKeyDown:n,onEscape:a}=s,c=r.__rest(s,["variant","type","className","onKeyDown","onEscape"]);const l=e=>{n==null||n(e),(e.key==="Escape"||e.key==="Esc")&&(a==null||a(e))};return y.createElement("button",Object.assign({},c,{className:u("fake-link",t==="standalone"&&"standalone-link",i),onKeyDown:l,type:o||"button"}))};exports.EbayFakeLink=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../tslib.es6-C4EgNkz1.js"),y=require("react"),u=require("classnames"),d=s=>{var{variant:t,type:o,className:i,onKeyDown:n,onEscape:a}=s,c=r.__rest(s,["variant","type","className","onKeyDown","onEscape"]);const l=e=>{n?.(e),(e.key==="Escape"||e.key==="Esc")&&a?.(e)};return y.createElement("button",Object.assign({},c,{className:u("fake-link",t==="standalone"&&"standalone-link",i),onKeyDown:l,type:o||"button"}))};exports.EbayFakeLink=d;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../menu-item-D_m4VPNi.js"),s=require("../tslib.es6-C4EgNkz1.js"),n=require("react"),u=require("classnames"),c=e=>{var{className:t}=e,r=s.__rest(e,["className"]);return n.createElement("hr",Object.assign({},r,{className:u(t,"fake-menu__separator")}))};exports.EbayFakeMenu=a.EbayFakeMenu;exports.EbayFakeMenuItem=a.EbayMenuItem;exports.EbayFakeMenuSeparator=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../menu-item-B6NlMsNL.js"),s=require("../tslib.es6-C4EgNkz1.js"),n=require("react"),u=require("classnames"),c=e=>{var{className:t}=e,r=s.__rest(e,["className"]);return n.createElement("hr",Object.assign({},r,{className:u(t,"fake-menu__separator")}))};exports.EbayFakeMenu=a.EbayFakeMenu;exports.EbayFakeMenuItem=a.EbayMenuItem;exports.EbayFakeMenuSeparator=c;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../menu-button-label-CN_zoO9F.js");exports.EbayFakeMenuButton=e.EbayMenuButton;exports.EbayFakeMenuButtonItem=e.EbayFakeMenuButtonItem;exports.EbayFakeMenuButtonLabel=e.EbayFakeMenuButtonLabel;exports.EbayFakeMenuButtonSeparator=e.EbayMenuButtonSeparator;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../menu-button-label-BheEVTUO.js");exports.EbayFakeMenuButton=e.EbayMenuButton;exports.EbayFakeMenuButtonItem=e.EbayFakeMenuButtonItem;exports.EbayFakeMenuButtonLabel=e.EbayFakeMenuButtonLabel;exports.EbayFakeMenuButtonSeparator=e.EbayMenuButtonSeparator;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),v=require("../icon-C-bWGO-9.js"),l=require("../utils-C9NL3q0j.js"),p=require("classnames"),I=require("../random-id-DlJj_RWH.js"),c=n=>{var{className:t,as:a="span"}=n,s=u.__rest(n,["className","as"]);return e.createElement(a,Object.assign({className:p("file-input__content-header",t)},s))},o=n=>{var{className:t,as:a="span"}=n,s=u.__rest(n,["className","as"]);return e.createElement(a,Object.assign({className:p("file-input__content-subheader",t)},s))},y=n=>{var{children:t,onInput:a,className:s}=n,i=u.__rest(n,["children","onInput","className"]);const d=I.useRandomId(),[b,m]=e.useState(!1),E=r=>{a&&a(r,{files:r.target.files})},g=()=>m(!0),_=()=>m(!1),h=l.findComponent(t,c),N=l.findComponent(t,o),f=l.excludeComponent(t,c).filter(({type:r})=>r!==o);return e.createElement("div",{className:p("file-input",b&&"file-input___container--dragged-over",s)},e.createElement("div",{className:"file-input__container"},e.createElement("div",{className:"file-input__upload-icon"},e.createElement(v.EbayIcon,{name:"upload24"})),e.createElement("div",{className:"file-input__content"},h,N,f&&e.createElement("label",{htmlFor:i.id||d},e.createElement("span",{className:"file-input__content-cta"},f)))),e.createElement("input",Object.assign({},i,{id:i.id||d,type:"file",className:"file-input__input",onChange:E,onDragEnter:g,onDragOver:g,onDragLeave:_,onDrop:_})))};exports.EbayFileInput=y;exports.EbayFileInputHeader=c;exports.EbayFileInputSubheader=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),v=require("../icon-CR8ApQBy.js"),l=require("../utils-C9NL3q0j.js"),p=require("classnames"),I=require("../random-id-DlJj_RWH.js"),c=n=>{var{className:t,as:a="span"}=n,s=u.__rest(n,["className","as"]);return e.createElement(a,Object.assign({className:p("file-input__content-header",t)},s))},o=n=>{var{className:t,as:a="span"}=n,s=u.__rest(n,["className","as"]);return e.createElement(a,Object.assign({className:p("file-input__content-subheader",t)},s))},y=n=>{var{children:t,onInput:a,className:s}=n,i=u.__rest(n,["children","onInput","className"]);const d=I.useRandomId(),[b,m]=e.useState(!1),E=r=>{a&&a(r,{files:r.target.files})},g=()=>m(!0),_=()=>m(!1),h=l.findComponent(t,c),N=l.findComponent(t,o),f=l.excludeComponent(t,c).filter(({type:r})=>r!==o);return e.createElement("div",{className:p("file-input",b&&"file-input___container--dragged-over",s)},e.createElement("div",{className:"file-input__container"},e.createElement("div",{className:"file-input__upload-icon"},e.createElement(v.EbayIcon,{name:"upload24"})),e.createElement("div",{className:"file-input__content"},h,N,f&&e.createElement("label",{htmlFor:i.id||d},e.createElement("span",{className:"file-input__content-cta"},f)))),e.createElement("input",Object.assign({},i,{id:i.id||d,type:"file",className:"file-input__input",onChange:E,onDragEnter:g,onDragOver:g,onDragLeave:_,onDrop:_})))};exports.EbayFileInput=y;exports.EbayFileInputHeader=c;exports.EbayFileInputSubheader=o;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../file-preview-card-BD6TIsY7.js");exports.EbayFilePreviewCard=e.EbayFilePreviewCard;exports.EbayFilePreviewCardAction=e.EbayFilePreviewCardAction;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../file-preview-card-BlJJ6upx.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-BD6TIsY7.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
+ "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-BlJJ6upx.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
- {"version":3,"file":"filter-menu.d.ts","sourceRoot":"","sources":["../../src/ebay-filter-menu/filter-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACV,cAAc,EAKd,SAAS,EAIZ,MAAM,OAAO,CAAC;AAMf,OAAO,EACH,gBAAgB,EAEhB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,IAAI,EACJ,OAAO,EACV,MAAM,SAAS,CAAC;AAKjB,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,YAAY,CAAC,EAAE,SAAS,CAAC,eAAe,CAAC,CAAC;IAC1C,cAAc,CAAC,EAAE,sBAAsB,CAAC;IACxC,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,aAAa,CAAC,EAAE,qBAAqB,CAAC;IACtC,QAAQ,CAAC,EAAE,gBAAgB,CAAC;CAC/B,CAAC;;AA0NF,wBAA8C"}
1
+ {"version":3,"file":"filter-menu.d.ts","sourceRoot":"","sources":["../../src/ebay-filter-menu/filter-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACV,cAAc,EAKd,SAAS,EAIZ,MAAM,OAAO,CAAC;AAMf,OAAO,EACH,gBAAgB,EAEhB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,IAAI,EACJ,OAAO,EACV,MAAM,SAAS,CAAC;AAKjB,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,YAAY,CAAC,EAAE,SAAS,CAAC,eAAe,CAAC,CAAC;IAC1C,cAAc,CAAC,EAAE,sBAAsB,CAAC;IACxC,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,aAAa,CAAC,EAAE,qBAAqB,CAAC;IACtC,QAAQ,CAAC,EAAE,gBAAgB,CAAC;CAC/B,CAAC;;AAmOF,wBAA8C"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../filter-menu-DVoaD81G.js");exports.EbayFilterMenu=e.EbayFilterMenu;exports.EbayFilterMenuFooterButton=e.EbayFilterMenuFooterButton;exports.EbayFilterMenuItem=e.EbayFilterMenuItem;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../filter-menu-Di_eSs8N.js");exports.EbayFilterMenu=e.EbayFilterMenu;exports.EbayFilterMenuFooterButton=e.EbayFilterMenuFooterButton;exports.EbayFilterMenuItem=e.EbayFilterMenuItem;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../tslib.es6-C4EgNkz1.js"),n=require("react"),q=require("classnames"),b=require("../dropdown-BGdrijmi.js"),w=require("../icon-C-bWGO-9.js"),a=require("../filter-menu-DVoaD81G.js"),N=require("../utils-C9NL3q0j.js"),B=u=>{var{className:d,text:p,"aria-label":y,onExpand:f,onCollapse:E,onChange:l,children:i}=u,o=S.__rest(u,["className","text","aria-label","onExpand","onCollapse","onChange","children"]);const c=n.useRef(null),h=N.filterByType(i,a.EbayFilterMenuItem),[v,F]=n.useState(()=>h.some(t=>t.props.checked)),{isExpanded:_,collapse:r}=b.useExpander({ref:c,options:{hostSelector:".filter-menu-button__button",contentSelector:".filter-menu-button__menu",focusManagement:"interactive",expandOnClick:!0,autoCollapse:!0,alwaysDoFocusManagement:!0},onExpand:f,onCollapse:E}),{overlayStyles:M,refs:m}=b.useFloatingDropdown({open:_}),C=t=>{var e;(e=o.onKeyDown)===null||e===void 0||e.call(o,t),t.key==="Escape"&&r()},g=(...t)=>{var e;(e=o.onFormSubmit)===null||e===void 0||e.call(o,...t),r()},x=(...t)=>{var e;(e=o.onFooterClick)===null||e===void 0||e.call(o,...t),r()},k=(t,e)=>{var s;l==null||l(t,e),F(((s=e.checked)===null||s===void 0?void 0:s.length)>0)};return n.createElement("span",{ref:c,className:q("filter-menu-button",d)},n.createElement("button",{type:"button",className:"filter-menu-button__button",ref:m.setHost,"aria-expanded":"false","aria-haspopup":"true","aria-label":y,"aria-pressed":v},n.createElement("span",{className:"filter-menu-button__button-cell"},n.createElement("span",{className:"filter-menu-button__button-text"},p),n.createElement(w.EbayIcon,{name:"chevronDown12"}))),n.createElement(a.EbayFilterMenu,Object.assign({},o,{onChange:k,classPrefix:"filter-menu-button",onKeyDown:C,onFooterClick:x,onFormSubmit:g,ref:m.setOverlay,style:M}),i))};exports.EbayFilterMenuFooterButton=a.EbayFilterMenuFooterButton;exports.EbayFilterMenuItem=a.EbayFilterMenuItem;exports.EbayFilterMenuButton=B;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../tslib.es6-C4EgNkz1.js"),n=require("react"),q=require("classnames"),b=require("../dropdown-DIUzEfhV.js"),w=require("../icon-CR8ApQBy.js"),a=require("../filter-menu-Di_eSs8N.js"),N=require("../utils-C9NL3q0j.js"),B=u=>{var{className:d,text:p,"aria-label":y,onExpand:f,onCollapse:E,onChange:l,children:i}=u,o=S.__rest(u,["className","text","aria-label","onExpand","onCollapse","onChange","children"]);const c=n.useRef(null),h=N.filterByType(i,a.EbayFilterMenuItem),[v,F]=n.useState(()=>h.some(t=>t.props.checked)),{isExpanded:_,collapse:r}=b.useExpander({ref:c,options:{hostSelector:".filter-menu-button__button",contentSelector:".filter-menu-button__menu",focusManagement:"interactive",expandOnClick:!0,autoCollapse:!0,alwaysDoFocusManagement:!0},onExpand:f,onCollapse:E}),{overlayStyles:M,refs:m}=b.useFloatingDropdown({open:_}),C=t=>{var e;(e=o.onKeyDown)===null||e===void 0||e.call(o,t),t.key==="Escape"&&r()},g=(...t)=>{var e;(e=o.onFormSubmit)===null||e===void 0||e.call(o,...t),r()},x=(...t)=>{var e;(e=o.onFooterClick)===null||e===void 0||e.call(o,...t),r()},k=(t,e)=>{var s;l?.(t,e),F(((s=e.checked)===null||s===void 0?void 0:s.length)>0)};return n.createElement("span",{ref:c,className:q("filter-menu-button",d)},n.createElement("button",{type:"button",className:"filter-menu-button__button",ref:m.setHost,"aria-expanded":"false","aria-haspopup":"true","aria-label":y,"aria-pressed":v},n.createElement("span",{className:"filter-menu-button__button-cell"},n.createElement("span",{className:"filter-menu-button__button-text"},p),n.createElement(w.EbayIcon,{name:"chevronDown12"}))),n.createElement(a.EbayFilterMenu,Object.assign({},o,{onChange:k,classPrefix:"filter-menu-button",onKeyDown:C,onFooterClick:x,onFormSubmit:g,ref:m.setOverlay,style:M}),i))};exports.EbayFilterMenuFooterButton=a.EbayFilterMenuFooterButton;exports.EbayFilterMenuItem=a.EbayFilterMenuItem;exports.EbayFilterMenuButton=B;
@@ -0,0 +1,28 @@
1
+ # EbayFlag
2
+
3
+ The component will include the actual SVG markup in the HTML and then reference the chosen flag.
4
+
5
+ ## Demo
6
+
7
+ [Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/docs/graphics-icons-ebay-flag--docs)
8
+
9
+ ## Usage
10
+
11
+ ```jsx
12
+ import { EbayFlag } from "@ebay/ui-core-react/ebay-flag";
13
+ import "@ebay/skin/icon";
14
+ import "@ebay/skin/flag";
15
+
16
+ <EbayFlag name="us" />;
17
+ ```
18
+
19
+ ### Notes
20
+
21
+ Make sure you use `<EbaySvg flags />` in your code (ideally on server side only), so that actual SVG icons exist inside HTML.
22
+
23
+ ## Attributes
24
+
25
+ | Name | Type | Stateful | Required | Description |
26
+ | ---------- | ------ | -------- | -------- | ------------------------------------------------------------------------------------------- |
27
+ | `name` | String | No | Yes | name of the flags from [Skin](./types.ts) |
28
+ | `a11yText` | String | No | Yes | text for non-decorative inline flag; flag is assumed to be decorative if this is not passed |
@@ -0,0 +1,9 @@
1
+ import { ComponentProps, FC } from "react";
2
+ import { EbayIcon } from "../ebay-icon";
3
+ import { Icon } from "./types";
4
+ export type EbayFlagIconProps = Omit<ComponentProps<typeof EbayIcon>, "name"> & {
5
+ name: Icon;
6
+ };
7
+ declare const EbayFlagIcon: FC<EbayFlagIconProps>;
8
+ export default EbayFlagIcon;
9
+ //# sourceMappingURL=flag-icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flag-icon.d.ts","sourceRoot":"","sources":["../../src/ebay-flag/flag-icon.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,EAAE,MAAM,CAAC,GAAG;IAC5E,IAAI,EAAE,IAAI,CAAC;CACd,CAAC;AAEF,QAAA,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAAoD,CAAC;AAE7F,eAAe,YAAY,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { ComponentProps, FC } from "react";
2
+ import { Icon } from "./types";
3
+ export type EbayFlagProps = ComponentProps<"span"> & {
4
+ flag: Icon;
5
+ };
6
+ declare const EbayFlagIcon: FC<EbayFlagProps>;
7
+ export default EbayFlagIcon;
8
+ //# sourceMappingURL=flag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flag.d.ts","sourceRoot":"","sources":["../../src/ebay-flag/flag.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG/B,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG;IACjD,IAAI,EAAE,IAAI,CAAC;CACd,CAAC;AAEF,QAAA,MAAM,YAAY,EAAE,EAAE,CAAC,aAAa,CAEnC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { default as EbayFlagIcon, type EbayFlagIconProps } from "./flag-icon";
2
+ export { default as EbayFlag, type EbayFlagProps } from "./flag";
3
+ export * from "./types";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-flag/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,QAAQ,CAAC;AACjE,cAAc,SAAS,CAAC"}
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),r=require("../icon-CR8ApQBy.js"),l=require("../tslib.es6-C4EgNkz1.js"),n=require("classnames"),o=e=>a.createElement(r.EbayIcon,Object.assign({__type:"flag"},e)),g=e=>{var{flag:s,className:t}=e,c=l.__rest(e,["flag","className"]);return a.createElement("span",Object.assign({className:n("fflag",t,`fflag--${s.toLowerCase()}`)},c))};exports.EbayFlag=g;exports.EbayFlagIcon=o;
@@ -0,0 +1,2 @@
1
+ export type Icon = 'ac' | 'ad' | 'ae' | 'af' | 'ag' | 'ai' | 'al' | 'am' | 'ao' | 'aq' | 'ar' | 'as' | 'at' | 'au' | 'aw' | 'ax' | 'az' | 'ba' | 'bb' | 'bd' | 'be' | 'bf' | 'bg' | 'bh' | 'bi' | 'bj' | 'bl' | 'bm' | 'bn' | 'bo' | 'bq' | 'br' | 'bs' | 'bt' | 'bv' | 'bw' | 'by' | 'bz' | 'ca' | 'cc' | 'cd' | 'cefta' | 'cf' | 'cg' | 'ch' | 'ci' | 'ck' | 'cl' | 'cm' | 'cn' | 'co' | 'cp' | 'cr' | 'cu' | 'cv' | 'cw' | 'cx' | 'cy' | 'cz' | 'de' | 'dg' | 'dj' | 'dk' | 'dm' | 'do' | 'dz' | 'ea' | 'ec' | 'ee' | 'eg' | 'eh' | 'er' | 'es' | 'esCt' | 'esGa' | 'esPv' | 'et' | 'eu' | 'fi' | 'fj' | 'fk' | 'fm' | 'fo' | 'fr' | 'ga' | 'gb' | 'gbEng' | 'gbNir' | 'gbSct' | 'gbWls' | 'gd' | 'ge' | 'gf' | 'gg' | 'gh' | 'gi' | 'gl' | 'gm' | 'gn' | 'gp' | 'gq' | 'gr' | 'gs' | 'gt' | 'gu' | 'gw' | 'gy' | 'hk' | 'hm' | 'hn' | 'hr' | 'ht' | 'hu' | 'ic' | 'id' | 'ie' | 'il' | 'im' | 'in' | 'io' | 'iq' | 'ir' | 'is' | 'it' | 'je' | 'jm' | 'jo' | 'jp' | 'ke' | 'kg' | 'kh' | 'ki' | 'km' | 'kn' | 'kp' | 'kr' | 'kw' | 'ky' | 'kz' | 'la' | 'lb' | 'lc' | 'li' | 'lk' | 'lr' | 'ls' | 'lt' | 'lu' | 'lv' | 'ly' | 'ma' | 'mc' | 'md' | 'me' | 'mf' | 'mg' | 'mh' | 'mk' | 'ml' | 'mm' | 'mn' | 'mo' | 'mp' | 'mq' | 'mr' | 'ms' | 'mt' | 'mu' | 'mv' | 'mw' | 'mx' | 'my' | 'mz' | 'na' | 'nc' | 'ne' | 'nf' | 'ng' | 'ni' | 'nl' | 'no' | 'np' | 'nr' | 'nu' | 'nz' | 'om' | 'pa' | 'pe' | 'pf' | 'pg' | 'ph' | 'pk' | 'pl' | 'pm' | 'pn' | 'pr' | 'ps' | 'pt' | 'pw' | 'py' | 'qa' | 're' | 'ro' | 'rs' | 'ru' | 'rw' | 'sa' | 'sb' | 'sc' | 'sd' | 'se' | 'sg' | 'sh' | 'si' | 'sj' | 'sk' | 'sl' | 'sm' | 'sn' | 'so' | 'sr' | 'ss' | 'st' | 'sv' | 'sx' | 'sy' | 'sz' | 'ta' | 'tc' | 'td' | 'tf' | 'tg' | 'th' | 'tj' | 'tk' | 'tl' | 'tm' | 'tn' | 'to' | 'tr' | 'tt' | 'tv' | 'tw' | 'tz' | 'ua' | 'ug' | 'um' | 'un' | 'us' | 'uy' | 'uz' | 'va' | 'vc' | 've' | 'vg' | 'vi' | 'vn' | 'vu' | 'wf' | 'ws' | 'xk' | 'xx' | 'ye' | 'yt' | 'za' | 'zm' | 'zw';
2
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-flag/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,IAAI,GACZ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,OAAO,GACP,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,MAAM,GACN,MAAM,GACN,MAAM,GACN,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,CAAA"}
@@ -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-C3ZdijBt.js");require("../icon-button-CHW6Lezn.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;
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-DvWLfiq0.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;
@@ -1,19 +1,20 @@
1
1
  import React, { Ref, SVGProps } from "react";
2
2
  import { Icon } from "./types";
3
+ import type { Icon as FlagIcon } from "../ebay-flag";
3
4
  export type A11yVariant = "label";
4
5
  export type EbayIconProps = SVGProps<SVGSVGElement> & {
5
6
  className?: string;
6
- name: Icon;
7
+ name: Icon | FlagIcon;
7
8
  noSkinClasses?: boolean;
8
9
  a11yText?: string;
9
10
  a11yVariant?: A11yVariant;
10
11
  forwardedRef?: Ref<SVGSVGElement>;
11
12
  /**
12
- * These properties are used by EbayImagePlaceholder and will be used for flags.
13
+ * These properties are used by EbayImagePlaceholder and for flags.
13
14
  * NOTE: The flag "@deprecated" is only to not show this property in the autocomplete list on the top
14
15
  * @deprecated
15
16
  */
16
- __type?: "icon" | "none";
17
+ __type?: "icon" | "flag" | "none";
17
18
  };
18
19
  export declare function kebabCased(str: string): string;
19
20
  declare const _default: React.ForwardRefExoticComponent<Omit<EbayIconProps, "ref"> & React.RefAttributes<React.FC<EbayIconProps>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/ebay-icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAM,GAAG,EAAE,QAAQ,EAAuB,MAAM,OAAO,CAAC;AAItE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC;AAElC,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,YAAY,CAAC,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC;IAClC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B,CAAC;AAqFF,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9C;;AAED,wBAAwC"}
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/ebay-icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAM,GAAG,EAAE,QAAQ,EAAuB,MAAM,OAAO,CAAC;AAItE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,KAAK,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC;AAElC,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,IAAI,GAAG,QAAQ,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,YAAY,CAAC,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC;IAClC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CACrC,CAAC;AAwFF,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9C;;AAED,wBAAwC"}