@ebay/ui-core-react 8.3.0 → 8.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{calendar-D91b1JOr.js → calendar-C0wOay3d.js} +1 -1
- package/combobox-BzM04rYV.js +1 -0
- package/common/component-utils/forwardRef.d.ts +2 -2
- package/common/component-utils/forwardRef.d.ts.map +1 -1
- package/common/component-utils/utils.d.ts +4 -4
- package/common/component-utils/utils.d.ts.map +1 -1
- package/common/event-utils/index.d.ts.map +1 -1
- package/common/event-utils/types.d.ts.map +1 -1
- package/common/event-utils/use-roving-index.d.ts.map +1 -1
- package/common/floating-label-utils/hooks.d.ts.map +1 -1
- package/common/notice-utils/notice-content.d.ts +1 -1
- package/common/notice-utils/notice-content.d.ts.map +1 -1
- package/common/range.d.ts.map +1 -1
- package/common/tooltip-utils/constants.d.ts +2 -1
- package/common/tooltip-utils/constants.d.ts.map +1 -1
- package/common/tooltip-utils/tooltip-host.d.ts +3 -3
- package/common/tooltip-utils/tooltip-host.d.ts.map +1 -1
- package/common/tooltip-utils/use-tooltip.d.ts.map +1 -1
- package/dropdown-BGdrijmi.js +1 -0
- package/ebay-accordion/accordion.d.ts.map +1 -1
- package/ebay-accordion/index.js +2 -2
- package/ebay-alert-dialog/alert-dialog.d.ts.map +1 -1
- package/ebay-avatar/avatar-image.d.ts.map +1 -1
- package/ebay-breadcrumbs/breadcrumb-item.d.ts +1 -1
- package/ebay-breadcrumbs/breadcrumb-item.d.ts.map +1 -1
- package/ebay-breadcrumbs/breadcrumbs.d.ts +1 -1
- package/ebay-breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/ebay-calendar/calendar.d.ts.map +1 -1
- package/ebay-calendar/index.js +1 -1
- package/ebay-carousel/carousel-item.d.ts +3 -3
- package/ebay-carousel/carousel-item.d.ts.map +1 -1
- package/ebay-carousel/helpers.d.ts.map +1 -1
- package/ebay-carousel/index.js +1 -1
- package/ebay-chips-combobox/index.js +1 -1
- package/ebay-combobox/combobox.d.ts +1 -2
- package/ebay-combobox/combobox.d.ts.map +1 -1
- package/ebay-combobox/index.js +1 -1
- package/ebay-confirm-dialog/confirm-dialog.d.ts.map +1 -1
- package/ebay-date-textbox/index.js +1 -1
- package/ebay-dialog-base/components/dialog-header.d.ts +2 -2
- package/ebay-dialog-base/components/dialog-header.d.ts.map +1 -1
- package/ebay-dialog-base/components/dialogBase.d.ts +2 -1
- package/ebay-dialog-base/components/dialogBase.d.ts.map +1 -1
- package/ebay-dialog-base/dialog-base-with-state.d.ts.map +1 -1
- package/ebay-drawer-dialog-deprecated/components/drawer.d.ts.map +1 -1
- package/ebay-drawer-dialog-deprecated/index.js +1 -1
- package/ebay-education-notice/education-notice.d.ts +0 -1
- package/ebay-education-notice/education-notice.d.ts.map +1 -1
- package/ebay-education-notice/index.js +1 -1
- package/ebay-eek/eek-util.d.ts.map +1 -1
- package/ebay-fake-menu/index.js +1 -1
- package/ebay-fake-menu/menu-item-separator.d.ts.map +1 -1
- package/ebay-fake-menu/menu-item.d.ts +1 -1
- package/ebay-fake-menu/menu-item.d.ts.map +1 -1
- package/ebay-fake-menu/menu.d.ts +2 -2
- package/ebay-fake-menu/menu.d.ts.map +1 -1
- package/ebay-fake-menu-button/index.js +1 -1
- package/ebay-fake-menu-button/menu-button-separator.d.ts +2 -2
- package/ebay-fake-menu-button/menu-button-separator.d.ts.map +1 -1
- package/ebay-fake-menu-button/menu-button.d.ts.map +1 -1
- package/ebay-file-preview-card/file-preview-content.d.ts.map +1 -1
- package/ebay-file-preview-card/index.js +1 -1
- package/ebay-filter-menu/index.js +1 -1
- package/ebay-filter-menu-button/filter-menu-button.d.ts.map +1 -1
- package/ebay-filter-menu-button/index.js +1 -1
- package/ebay-fullscreen-dialog-deprecated/fullscreen-dialog.d.ts.map +1 -1
- package/ebay-icon/types.d.ts +1 -1
- package/ebay-icon/types.d.ts.map +1 -1
- package/ebay-icon-button/icon-button.d.ts +2 -5
- package/ebay-icon-button/icon-button.d.ts.map +1 -1
- package/ebay-infotip/ebay-infotip-host.d.ts +1 -1
- package/ebay-infotip/ebay-infotip-host.d.ts.map +1 -1
- package/ebay-infotip/ebay-infotip.d.ts +1 -1
- package/ebay-infotip/ebay-infotip.d.ts.map +1 -1
- package/ebay-infotip/index.js +1 -1
- package/ebay-lightbox-dialog/lightbox-dialog.d.ts.map +1 -1
- package/ebay-listbox/index.js +1 -1
- package/ebay-listbox/listbox.d.ts.map +1 -1
- package/ebay-listbox-button/index.js +2 -2
- package/ebay-listbox-button/listbox-button-option.d.ts +4 -4
- package/ebay-listbox-button/listbox-button-option.d.ts.map +1 -1
- package/ebay-listbox-button/listbox-button.d.ts.map +1 -1
- package/ebay-menu/index.js +1 -1
- package/ebay-menu/menu-item-separator.d.ts.map +1 -1
- package/ebay-menu/menu.d.ts.map +1 -1
- package/ebay-menu/types.d.ts +1 -1
- package/ebay-menu-button/index.js +1 -1
- package/ebay-menu-button/menu-button-separator.d.ts.map +1 -1
- package/ebay-menu-button/menu-button.d.ts.map +1 -1
- package/ebay-menu-button/types.d.ts +1 -1
- package/ebay-menu-button/types.d.ts.map +1 -1
- package/ebay-notice-base/components/ebay-notice-title/notice-title.d.ts.map +1 -1
- package/ebay-page-notice/index.js +1 -1
- package/ebay-page-notice/page-notice.d.ts.map +1 -1
- package/ebay-pagination/index.js +1 -1
- package/ebay-pagination/pagination-item.d.ts +1 -1
- package/ebay-pagination/pagination-item.d.ts.map +1 -1
- package/ebay-panel-dialog/panel-dialog.d.ts.map +1 -1
- package/ebay-radio/index.js +1 -1
- package/ebay-radio/radio.d.ts.map +1 -1
- package/ebay-section-notice/index.js +1 -1
- package/ebay-section-notice/section-notice.d.ts.map +1 -1
- package/ebay-select/index.js +1 -1
- package/ebay-skeleton/ebay-skeleton-avatar.d.ts.map +1 -1
- package/ebay-skeleton/ebay-skeleton-button.d.ts.map +1 -1
- package/ebay-skeleton/ebay-skeleton-image.d.ts.map +1 -1
- package/ebay-skeleton/ebay-skeleton-text.d.ts.map +1 -1
- package/ebay-skeleton/ebay-skeleton-textbox.d.ts.map +1 -1
- package/ebay-skeleton/types.d.ts +1 -0
- package/ebay-skeleton/types.d.ts.map +1 -1
- package/ebay-snackbar-dialog/components/ebay-snackbar-dialog-action.d.ts +1 -1
- package/ebay-snackbar-dialog/components/ebay-snackbar-dialog-action.d.ts.map +1 -1
- package/ebay-snackbar-dialog/components/ebay-snackbar-dialog.d.ts.map +1 -1
- package/ebay-snackbar-dialog/index.js +1 -1
- package/ebay-split-button/index.js +1 -1
- package/ebay-svg/index.js +1 -1
- package/ebay-svg/symbols.d.ts.map +1 -1
- package/ebay-table/index.js +1 -1
- package/ebay-table/table-header.d.ts.map +1 -1
- package/ebay-table/table-row.d.ts +2 -2
- package/ebay-table/table-row.d.ts.map +1 -1
- package/ebay-table/table.d.ts.map +1 -1
- package/ebay-textbox/index.js +1 -1
- package/ebay-textbox/postfix-icon.d.ts.map +1 -1
- package/ebay-textbox/prefix-icon.d.ts.map +1 -1
- package/ebay-textbox/textbox.d.ts.map +1 -1
- package/ebay-tooltip/index.js +1 -1
- package/ebay-tourtip/ebay-tourtip.d.ts +1 -1
- package/ebay-tourtip/ebay-tourtip.d.ts.map +1 -1
- package/ebay-tourtip/index.js +1 -1
- package/ebay-tri-state-checkbox/index.js +1 -1
- package/ebay-tri-state-checkbox/tri-state-checkbox.d.ts.map +1 -1
- package/ebay-video/controls.d.ts.map +1 -1
- package/ebay-video/index.js +1 -1
- package/ebay-video/reportButton.d.ts.map +1 -1
- package/ebay-video/types.d.ts +1 -1
- package/ebay-video/types.d.ts.map +1 -1
- package/ebay-video/video.d.ts.map +1 -1
- package/filter-menu-CzHlWYrY.js +1 -0
- package/hooks-B4eFIQlH.js +1 -0
- package/menu-DmmYhPJU.js +1 -0
- package/{menu-button-label-DYmCCAX3.js → menu-button-label-BCs24-MK.js} +1 -1
- package/{menu-button-label-gQ_TH2Br.js → menu-button-label-DFjHo8Lr.js} +1 -1
- package/menu-item-C24G4so-.js +1 -0
- package/package.json +12 -73
- package/radio-D-YF8WXv.js +1 -0
- package/{textbox-XeJt9mMq.js → textbox-B6zeeYue.js} +1 -1
- package/tri-state-checkbox-Lrf47q9t.js +1 -0
- package/combobox-BcAuEyib.js +0 -1
- package/dropdown-BLiIyhWy.js +0 -1
- package/filter-menu-Drtczmts.js +0 -1
- package/hooks-DqYMvHrS.js +0 -1
- package/menu-Bn7XgUPD.js +0 -1
- package/menu-item-Bh7_6CFn.js +0 -1
- package/radio-D1pzF7Mn.js +0 -1
- package/tri-state-checkbox-f-0yBnVG.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("react"),ue=require("./icon-button-DPIjQGta.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==null||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:
|
|
1
|
+
"use strict";const r=require("react"),ue=require("./icon-button-DPIjQGta.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==null||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 V=require("./tslib.es6-C4EgNkz1.js"),t=require("react"),x=require("classnames"),be=require("./hooks-B4eFIQlH.js"),M=require("./utils-C9NL3q0j.js"),I=require("./dropdown-BGdrijmi.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==null?void 0: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,3 +1,3 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
export declare const withForwardRef: <
|
|
1
|
+
import React, { ComponentPropsWithoutRef, FC } from 'react';
|
|
2
|
+
export declare const withForwardRef: <T extends ComponentPropsWithoutRef<any>>(Component: FC<T>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<T> & React.RefAttributes<React.FC<T>>>;
|
|
3
3
|
//# sourceMappingURL=forwardRef.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forwardRef.d.ts","sourceRoot":"","sources":["../../../src/common/component-utils/forwardRef.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,EAAc,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"forwardRef.d.ts","sourceRoot":"","sources":["../../../src/common/component-utils/forwardRef.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,wBAAwB,EAAE,EAAE,EAAc,MAAM,OAAO,CAAA;AAOvE,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,wBAAwB,CAAC,GAAG,CAAC,EAAI,WAAW,EAAE,CAAC,CAAC,CAAC,iGAOzF,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FC, ReactElement, ReactNode } from 'react';
|
|
1
|
+
import { ComponentProps, FC, ReactElement, ReactNode } from 'react';
|
|
2
2
|
import './array.polyfill.flat';
|
|
3
|
-
export declare function findComponent(nodes: ReactNode, componentType:
|
|
4
|
-
export declare function excludeComponent(nodes: ReactNode, componentType:
|
|
5
|
-
export declare function filterByType(nodes: ReactNode, componentType:
|
|
3
|
+
export declare function findComponent<T extends FC>(nodes: ReactNode, componentType: T): ReactElement<ComponentProps<T>> | null;
|
|
4
|
+
export declare function excludeComponent<T extends FC>(nodes: ReactNode, componentType: T): ReactElement<ComponentProps<T>>[];
|
|
5
|
+
export declare function filterByType<T extends FC>(nodes: ReactNode, componentType: T | T[]): ReactElement<ComponentProps<T>>[];
|
|
6
6
|
export declare function filterBy(nodes: ReactNode, predicate: (el: ReactElement) => boolean): ReactElement[];
|
|
7
7
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/common/component-utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/common/component-utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,cAAc,EAAE,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,MAA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QAAQ,EAAE,QAAQ,GAAG,IAAI,CAIpF;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAE7C;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAEpF;AAED,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAE1F;AAED,wBAAgB,4BAA4B,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAE7F;AAGD,wBAAgB,eAAe,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAwBhF;AAED,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAIlF;AAED,KAAK,OAAO,GAAG,CAAC,CAAC,EAAE,aAAa,GAAG,KAAK,KAAK,IAAI,CAAA;AAIjD,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAKnE;AACD,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAKtE;AACD,wBAAgB,YAAY,CAAC,CAAC,EAAE,aAAa,GAAG,KAAK,GAAG,IAAI,CAa3D;AAED,wBAAgB,SAAS,CAAC,kBAAkB,EAAE,OAAkB,EAAE,iBAAiB,EAAE,OAAO,IAChF,GAAG,aAAa,KAAG,IAAI,CAMlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/common/event-utils/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/common/event-utils/types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AM,sBAAsB,CAAC,WAAW,GAAG,OAAO,EAAE,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IACvF,gBAAgB,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;AAC5D,MAAM,MAAM,qBAAqB,CAAC,WAAW,GAAG,OAAO,EAAE,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IACtF,gBAAgB,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-roving-index.d.ts","sourceRoot":"","sources":["../../../src/common/event-utils/use-roving-index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,QAAQ,EAAE,EAAE,EAAgB,SAAS,EAAE,cAAc,EAAuB,MAAM,OAAO,CAAA;AAG5G,QAAA,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"use-roving-index.d.ts","sourceRoot":"","sources":["../../../src/common/event-utils/use-roving-index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,QAAQ,EAAE,EAAE,EAAgB,SAAS,EAAE,cAAc,EAAuB,MAAM,OAAO,CAAA;AAG5G,QAAA,MAAM,cAAc,GAChB,UAAU,SAAS,EACnB,eAAe,EAAE,EACjB,eAAe,MAAM,KACtB,CAAC,MAAM,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CA+B3C,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/common/floating-label-utils/hooks.tsx"],"names":[],"mappings":"AAAA,OAAc,EAEV,EAAE,EAEF,cAAc,EAGjB,MAAM,OAAO,CAAA;AAId,KAAK,4BAA4B,GAAG;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE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AAc,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC,CAAC,GAAG,EAAE,CAAC;IAC1D,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,GAAG,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC;CACtD,CAAA;AAED,wBAAgB,gBAAgB,CAAC,EAC7B,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,gBAAgB,EAAE,SAAkB,EACpC,OAAkB,EACrB,EAAE,4BAA4B,GAAG,6BAA6B,CA6E9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notice-content.d.ts","sourceRoot":"","sources":["../../../src/common/notice-utils/notice-content.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAG5C,MAAM,MAAM,kBAAkB,GAAG;IAC7B,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"notice-content.d.ts","sourceRoot":"","sources":["../../../src/common/notice-utils/notice-content.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAG5C,MAAM,MAAM,kBAAkB,GAAG;IAC7B,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,CAAC;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,CAAA;AAED,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAOzC,CAAA;AAED,eAAe,aAAa,CAAA"}
|
package/common/range.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../src/common/range.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../src/common/range.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAI,OAAM,MAAM,EAAE,MAAK,MAAM,EAAE,aAAQ,KAAE,MAAM,EACwB,CAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
1
2
|
import { PointerDirection, TooltipType } from './types';
|
|
2
3
|
export declare const DEFAULT_POINTER_DIRECTION: PointerDirection;
|
|
3
4
|
export declare const TYPE_ROLES: Record<TooltipType, string>;
|
|
4
5
|
export declare const POINTER_STYLES: {
|
|
5
|
-
[key in PointerDirection]:
|
|
6
|
+
[key in PointerDirection]: CSSProperties;
|
|
6
7
|
};
|
|
7
8
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/common/tooltip-utils/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAEvD,eAAO,MAAM,yBAAyB,EAAE,gBAA2B,CAAA;AAEnE,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAIlD,CAAA;AAED,eAAO,MAAM,cAAc,EAAE;KAAG,GAAG,IAAI,gBAAgB,GAAG,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/common/tooltip-utils/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AACrC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAEvD,eAAO,MAAM,yBAAyB,EAAE,gBAA2B,CAAA;AAEnE,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAIlD,CAAA;AAED,eAAO,MAAM,cAAc,EAAE;KAAG,GAAG,IAAI,gBAAgB,GAAG,aAAa;CAqFtE,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FC, ReactElement, RefObject } from 'react';
|
|
2
|
-
export type TooltipHostProps = {
|
|
1
|
+
import { ComponentProps, ComponentType, FC, ReactElement, RefObject } from 'react';
|
|
2
|
+
export type TooltipHostProps = ComponentProps<ComponentType<any>> & {
|
|
3
3
|
className?: string;
|
|
4
|
-
children?: ReactElement
|
|
4
|
+
children?: ReactElement<any>;
|
|
5
5
|
forwardedRef?: RefObject<any>;
|
|
6
6
|
};
|
|
7
7
|
declare const TooltipHost: FC<TooltipHostProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-host.d.ts","sourceRoot":"","sources":["../../../src/common/tooltip-utils/tooltip-host.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tooltip-host.d.ts","sourceRoot":"","sources":["../../../src/common/tooltip-utils/tooltip-host.tsx"],"names":[],"mappings":"AACA,OAAO,EAA0B,cAAc,EAAE,aAAa,EAAE,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAG1G,MAAM,MAAM,gBAAgB,GAAI,cAAc,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;IAC7B,YAAY,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;CACjC,CAAA;AAED,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAYrC,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-tooltip.d.ts","sourceRoot":"","sources":["../../../src/common/tooltip-utils/use-tooltip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,SAAS,EAAE,MAAM,OAAO,CAAA;AAE3C,KAAK,cAAc,GAAG;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;CACpC,CAAC;AAEF,KAAK,UAAU,GAAG;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,eAAe,EAAE,MAAM,IAAI,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"use-tooltip.d.ts","sourceRoot":"","sources":["../../../src/common/tooltip-utils/use-tooltip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,SAAS,EAAE,MAAM,OAAO,CAAA;AAE3C,KAAK,cAAc,GAAG;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;CACpC,CAAC;AAEF,KAAK,UAAU,GAAG;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,eAAe,EAAE,MAAM,IAAI,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,oDAA4D,cAAc,KAAG,UAuBvG,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("react"),v=require("@floating-ui/react"),o=require("makeup-expander"),y=require("makeup-active-descendant");var h;const{default:D=o}=(h=o==null?void 0:o.default)!=null&&h.__esModule?o.default:o;function _({open:t,options:r}){var a;const{floatingStyles:c,refs:u}=v.useFloating({placement:r!=null&&r.reverse?"bottom-end":"bottom-start",open:t,middleware:[v.offset((a=r==null?void 0:r.offset)!==null&&a!==void 0?a:4),v.flip(),v.shift()],whileElementsMounted:v.autoUpdate});return{overlayStyles:c,refs:{host:u.reference,overlay:u.floating,setHost:u.setReference,setOverlay:u.setFloating}}}function m({ref:t,expanded:r,options:a,onExpand:c,onCollapse:u},f){const n=s.useRef(null),i=s.useSyncExternalStore(e=>{var d,l;function E(){e(),c==null||c()}function g(){e(),u==null||u()}return(d=t.current)===null||d===void 0||d.addEventListener("expander-expand",E),(l=t.current)===null||l===void 0||l.addEventListener("expander-collapse",g),()=>{var x,p;(x=t.current)===null||x===void 0||x.removeEventListener("expander-expand",E),(p=t.current)===null||p===void 0||p.removeEventListener("expander-collapse",g)}},()=>{var e;return(e=n.current)===null||e===void 0?void 0:e.expanded},()=>!1);return s.useEffect(()=>(t.current&&(n.current=new D(t.current,a)),()=>{var e;(e=n.current)===null||e===void 0||e.destroy()}),f||[]),s.useEffect(()=>{n.current&&r!==void 0&&(n.current.expanded=r)},[r]),{isExpanded:i,expand:()=>{n.current&&(n.current.expanded=!0)},collapse:()=>{n.current&&(n.current.expanded=!1)}}}function L({ref:t,focusElementRef:r,itemContainerRef:a,onChange:c=()=>null,disabled:u,options:f}){const n=s.useRef(null);return s.useEffect(()=>{const i=e=>{const d={toIndex:e.detail.toIndex};c(e,d)};return u||(n.current=y.createLinear(t.current,r?r.current:t.current,a?a.current:t.current,"[role=option]",f),t.current.addEventListener("activeDescendantChange",i)),()=>{var e,d,l;(e=n.current)===null||e===void 0||e.reset(),(d=n.current)===null||d===void 0||d.destroy(),(l=t.current)===null||l===void 0||l.removeEventListener("activeDescendantChange",i)}},[u,c]),{setIndex(i){n.current.index=i},getIndex(){return n.current.index}}}exports.useActiveDescendant=L;exports.useExpander=m;exports.useFloatingDropdown=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../src/ebay-accordion/accordion.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,YAAY,EAAU,MAAM,OAAO,CAAA;AACvE,OAAO,EAAe,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAE/D,OAAO,EAAE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kB,CAuDzC,CAAA;AAED,eAAe,aAAa,CAAA"}
|
package/ebay-accordion/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
EbayDetails that defines the sections of the accordion`);const h=n.map((e,d)=>
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("../tslib.es6-C4EgNkz1.js"),D=require("classnames"),l=require("react"),g=require("../ebay-details-Co3xp8NP.js"),_=require("../utils-C9NL3q0j.js"),N=c=>{var{size:b,autoCollapse:E,className:f,children:m,onToggle:i,"aria-roledescription":p="accordion"}=c,v=T.__rest(c,["size","autoCollapse","className","children","onToggle","aria-roledescription"]);const t=l.useRef(null),n=_.filterByType(m,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)=>l.cloneElement(e,{onToggle:(u,{open:o})=>{var r,y,a;if(console.log("YAYA",{open:o}),E&&o){const s=(r=t.current)===null||r===void 0?void 0:r.querySelectorAll("details");s==null||s.forEach((A,q)=>{q!==d&&(A.open=!1)})}(a=(y=e.props).onToggle)===null||a===void 0||a.call(y,u,{open:o}),i==null||i(u,{open:o,index:d})},layout:"accordion"}));return l.createElement("ul",Object.assign({},v,{ref:t,className:D("accordion",f,{"accordion--large":b==="large"}),"aria-roledescription":p}),h.map(e=>l.createElement("li",{key:e.key},e)))};exports.EbayDetails=g.EbayDetails;exports.EbayAccordion=N;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../src/ebay-alert-dialog/alert-dialog.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAU,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,eAAe,EAAyC,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../src/ebay-alert-dialog/alert-dialog.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAU,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,eAAe,EAAyC,MAAM,qBAAqB,CAAA;AAM5F,MAAM,WAAW,KAAK,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,eAAe,CAAC,CAAC,CAAC;IACxD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,QAAA,MAAM,eAAe,EAAE,EAAE,CAAC,KAAK,CAqC9B,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar-image.d.ts","sourceRoot":"","sources":["../../src/ebay-avatar/avatar-image.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"avatar-image.d.ts","sourceRoot":"","sources":["../../src/ebay-avatar/avatar-image.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAEjD,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAA;AAExD,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,oBAAoB,CACpB,CAAA;AAEtB,eAAe,WAAW,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentProps, FC, MouseEventHandler, ReactNode } from 'react';
|
|
2
2
|
type ItemAttributes = ComponentProps<'a'> & ComponentProps<'button'>;
|
|
3
|
-
type BreadcrumbItemProps = ItemAttributes & {
|
|
3
|
+
export type BreadcrumbItemProps = ItemAttributes & {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
tag?: 'a' | 'button';
|
|
6
6
|
href?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb-item.d.ts","sourceRoot":"","sources":["../../src/ebay-breadcrumbs/breadcrumb-item.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAG/E,KAAK,cAAc,GAAG,cAAc,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;AAErE,
|
|
1
|
+
{"version":3,"file":"breadcrumb-item.d.ts","sourceRoot":"","sources":["../../src/ebay-breadcrumbs/breadcrumb-item.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAG/E,KAAK,cAAc,GAAG,cAAc,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;AAErE,MAAM,MAAM,mBAAmB,GAAG,cAAc,GAAG;IAC/C,QAAQ,EAAE,SAAS,CAAC;IACpB,GAAG,CAAC,EAAE,GAAG,GAAG,QAAQ,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAA;AAED,QAAA,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAqB3C,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/ebay-breadcrumbs/breadcrumbs.tsx"],"names":[],"mappings":"AAAA,OAAc,EAA0B,cAAc,EAAE,EAAE,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/ebay-breadcrumbs/breadcrumbs.tsx"],"names":[],"mappings":"AAAA,OAAc,EAA0B,cAAc,EAAE,EAAE,EAAgB,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAEvG,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAG9D,KAAK,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IAC7D;;;;;OAKG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,cAAc,CAAC,EAAE,MAAM,GAAG,CAAC,iBAAiB,CAAC;IAC7C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;CAC5C,CAAA;AAED,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,eAAe,CAwCpC,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../src/ebay-calendar/calendar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../src/ebay-calendar/calendar.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAA+B,MAAM,OAAO,CAAA;AAErG,OAAO,EAAE,MAAM,EAA6D,MAAM,cAAc,CAAA;AAGhG,MAAM,MAAM,iBAAiB,GAAG;IAC5B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,oBAAoB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC;IACtD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IACtC,aAAa,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACnD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,aAAa,GAAG,UAAU,EAAE,EAAE,GAAG,EAAE,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC7F,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE,GAAG,EAAE,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CACpE,CAAA;AASD,QAAA,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAqavC,CAAA;AAED,eAAe,YAAY,CAAA"}
|
package/ebay-calendar/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../calendar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../calendar-C0wOay3d.js");exports.EbayCalendar=e.EbayCalendar;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { ComponentPropsWithoutRef, RefCallback, RefObject } from 'react';
|
|
2
2
|
import { ListItemRef } from './types';
|
|
3
|
-
type
|
|
4
|
-
type CarouselItemProps = ListProps & {
|
|
3
|
+
export type CarouselItemProps = ComponentPropsWithoutRef<'li'> & {
|
|
5
4
|
slideWidth?: number;
|
|
6
5
|
offset?: number;
|
|
7
6
|
className?: string;
|
|
7
|
+
ref?: RefCallback<ListItemRef>;
|
|
8
8
|
forwardedRef?: RefObject<ListItemRef>;
|
|
9
9
|
};
|
|
10
10
|
declare const _default: React.ForwardRefExoticComponent<Omit<CarouselItemProps, "ref"> & React.RefAttributes<React.FC<CarouselItemProps>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel-item.d.ts","sourceRoot":"","sources":["../../src/ebay-carousel/carousel-item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACV,
|
|
1
|
+
{"version":3,"file":"carousel-item.d.ts","sourceRoot":"","sources":["../../src/ebay-carousel/carousel-item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACV,wBAAwB,EAExB,WAAW,EACX,SAAS,EAIZ,MAAM,OAAO,CAAA;AAGd,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAErC,MAAM,MAAM,iBAAiB,GAAG,wBAAwB,CAAC,IAAI,CAAC,GAAG;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAC/B,YAAY,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;CACzC,CAAC;;AAkCF,wBAA+C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/ebay-carousel/helpers.ts"],"names":[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AgB,MAAM,KAAG,MAyB5B,CAAA;AAED,eAAO,MAAM,eAAe,GACxB,YAAY,MAAM,EAClB,OAAO,WAAW,EAAE,EACpB,YAAY,MAAM,EAClB,sBAAiB,EACjB,MAAM,MAAM,KAAG,MA0BlB,CAAA;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAChC,SAAS,EACT,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,GAAG,EACH,gBAAgB,EAChB,cAAc,EACjB,EAAE;IACC,SAAS,EAAE,OAAO,GAAG,MAAM,CAAA;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAA;IAC/C,UAAU,EAAE,MAAM,CAAA;IAClB,GAAG,EAAE,MAAM,CAAA;IACX,gBAAgB,EAAE,MAAM,IAAI,CAAA;IAC5B,cAAc,EAAE,MAAM,IAAI,CAAA;CAC7B,GAAG,IAAI,CA4EP"}
|
package/ebay-carousel/index.js
CHANGED
|
@@ -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-hO_8pLp7.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,
|
|
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-hO_8pLp7.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;de(E)?(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 +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-
|
|
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-CFq5Sx2d.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,4 +1,4 @@
|
|
|
1
|
-
import { ComponentProps, FC, MutableRefObject
|
|
1
|
+
import { ComponentProps, FC, MutableRefObject } from 'react';
|
|
2
2
|
import { Autocomplete, ListSelection, ComboboxSelectHandler, ComboboxFocusHandler, ComboboxClickHandler, ComboboxInputChangeHandler, ComboboxChangeHandler } from './types';
|
|
3
3
|
export type EbayComboboxProps = Omit<ComponentProps<'input'>, 'defaultValue' | 'value' | 'onFocus' | 'onInputChange' | 'onChange' | 'onSelect' | 'autoComplete'> & {
|
|
4
4
|
floatingLabel?: string;
|
|
@@ -9,7 +9,6 @@ export type EbayComboboxProps = Omit<ComponentProps<'input'>, 'defaultValue' | '
|
|
|
9
9
|
defaultValue?: string;
|
|
10
10
|
autocomplete?: Autocomplete;
|
|
11
11
|
listSelection?: ListSelection;
|
|
12
|
-
forwardedRef?: Ref<HTMLInputElement>;
|
|
13
12
|
opaqueLabel?: boolean;
|
|
14
13
|
dropdownRef?: MutableRefObject<HTMLElement>;
|
|
15
14
|
onFocus?: ComboboxFocusHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../src/ebay-combobox/combobox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../src/ebay-combobox/combobox.tsx"],"names":[],"mappings":"AACA,OAAc,EACV,cAAc,EACd,EAAE,EACF,gBAAgB,EAKnB,MAAM,OAAO,CAAA;AAYd,OAAO,EACH,YAAY,EAEZ,aAAa,EACb,qBAAqB,EAErB,oBAAoB,EACpB,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,EACxB,MAAM,SAAS,CAAA;AAEhB,MAAM,MAAM,iBAAiB,GACzB,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAC1B,cAAc,GAAG,OAAO,GAAG,SAAS,GAAG,eAAe,GAAG,UAAU,GAAG,UAAU,GAAG,cAAc,CAAC,GAClG;IACE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAC5C,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,aAAa,CAAC,EAAE,0BAA0B,CAAC;IAC3C,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IACjC,QAAQ,CAAC,EAAE,qBAAqB,CAAC;CACpC,CAAA;AAEL,QAAA,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAoRvC,CAAA;AAED,eAAe,YAAY,CAAA"}
|
package/ebay-combobox/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../combobox-
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirm-dialog.d.ts","sourceRoot":"","sources":["../../src/ebay-confirm-dialog/confirm-dialog.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAU,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,eAAe,EAAyC,MAAM,qBAAqB,CAAA;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"confirm-dialog.d.ts","sourceRoot":"","sources":["../../src/ebay-confirm-dialog/confirm-dialog.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAU,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,eAAe,EAAyC,MAAM,qBAAqB,CAAA;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AAMnE,MAAM,WAAW,KAAK,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,eAAe,CAAC,CAAC,CAAC;IACtD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,uBAAuB,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,QAAA,MAAM,iBAAiB,EAAE,EAAE,CAAC,KAAK,CA6ChC,CAAA;AAED,eAAe,iBAAiB,CAAA"}
|
|
@@ -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-
|
|
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-C0wOay3d.js"),i=require("../textbox-B6zeeYue.js");require("../icon-hO_8pLp7.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,5 +1,5 @@
|
|
|
1
1
|
import { FC, ComponentProps } from 'react';
|
|
2
|
-
type
|
|
3
|
-
declare const EbayDialogHeader: FC<
|
|
2
|
+
export type EbayDialogHeaderProps = ComponentProps<'h2'>;
|
|
3
|
+
declare const EbayDialogHeader: FC<EbayDialogHeaderProps>;
|
|
4
4
|
export default EbayDialogHeader;
|
|
5
5
|
//# sourceMappingURL=dialog-header.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-header.d.ts","sourceRoot":"","sources":["../../../src/ebay-dialog-base/components/dialog-header.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAEjD,
|
|
1
|
+
{"version":3,"file":"dialog-header.d.ts","sourceRoot":"","sources":["../../../src/ebay-dialog-base/components/dialog-header.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAEjD,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,IAAI,CAAC,CAAA;AAExD,QAAA,MAAM,gBAAgB,EAAC,EAAE,CAAC,qBAAqB,CAGZ,CAAA;AAEnC,eAAe,gBAAgB,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FC, HTMLProps, RefObject, ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { TransitionElement } from './animation';
|
|
3
3
|
import { DialogCloseEventHandler } from '../types';
|
|
4
|
+
import { EbayDialogHeaderProps } from './dialog-header';
|
|
4
5
|
export type WindowType = 'compact';
|
|
5
6
|
type ClassPrefix = 'fullscreen-dialog' | 'lightbox-dialog' | 'panel-dialog' | 'drawer-dialog' | 'toast-dialog' | 'alert-dialog' | 'confirm-dialog' | 'snackbar-dialog';
|
|
6
7
|
type ButtonPosition = 'top' | 'right' | 'bottom' | 'left' | 'hidden';
|
|
@@ -10,7 +11,7 @@ export interface DialogBaseProps<T> extends HTMLProps<T> {
|
|
|
10
11
|
classPrefix?: ClassPrefix;
|
|
11
12
|
windowClass?: string;
|
|
12
13
|
windowType?: WindowType;
|
|
13
|
-
header?: ReactElement
|
|
14
|
+
header?: ReactElement<EbayDialogHeaderProps>;
|
|
14
15
|
footer?: ReactElement;
|
|
15
16
|
actions?: ReactElement;
|
|
16
17
|
isModal?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialogBase.d.ts","sourceRoot":"","sources":["../../../src/ebay-dialog-base/components/dialogBase.tsx"],"names":[],"mappings":"AAAA,OAAc,EACV,EAAE,EACF,SAAS,EACT,SAAS,EAIT,YAAY,EAEZ,SAAS,EAEZ,MAAM,OAAO,CAAA;AAMd,OAAO,EAAsB,iBAAiB,EAAE,MAAM,aA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AM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,eAAe,CAAC,EAAE,uBAAuB,CAAC;IAC1C,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,KAAK,CAAC,EAAE,SAAS,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,CAAC;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAAC,WAAW,CAAC,CA8KvD,CAAA;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-base-with-state.d.ts","sourceRoot":"","sources":["../../src/ebay-dialog-base/dialog-base-with-state.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAY,YAAY,EAAE,MAAM,OAAO,CAAA;AAErD,OAAO,EAAc,eAAe,EAAE,MAAM,yBAAyB,CAAA;AASrE,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"dialog-base-with-state.d.ts","sourceRoot":"","sources":["../../src/ebay-dialog-base/dialog-base-with-state.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAY,YAAY,EAAE,MAAM,OAAO,CAAA;AAErD,OAAO,EAAc,eAAe,EAAE,MAAM,yBAAyB,CAAA;AASrE,eAAO,MAAM,mBAAmB,GAAI,gDAMjC,eAAe,CAAC,WAAW,CAAC,KAAG,YAyCjC,CAAA;AAED,eAAe,mBAAmB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../src/ebay-drawer-dialog-deprecated/components/drawer.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAY,EAAE,EAAgB,SAAS,EAA0C,MAAM,OAAO,CAAA;AAE5G,OAAO,EAAE,eAAe,EAAyC,MAAM,wBAAwB,CAAA;AAK/F,MAAM,WAAW,eAAe,CAAC,CAAC,CAAE,SAAQ,eAAe,CAAC,CAAC,CAAC;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,CAAC;IACzD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B;
|
|
1
|
+
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../src/ebay-drawer-dialog-deprecated/components/drawer.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAY,EAAE,EAAgB,SAAS,EAA0C,MAAM,OAAO,CAAA;AAE5G,OAAO,EAAE,eAAe,EAAyC,MAAM,wBAAwB,CAAA;AAK/F,MAAM,WAAW,eAAe,CAAC,CAAC,CAAE,SAAQ,eAAe,CAAC,CAAC,CAAC;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,CAAC;IACzD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B;AAGD,QAAA,MAAM,0BAA0B,EAAE,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC,CA8FxD,CAAA;AAED,eAAe,0BAA0B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../tslib.es6-C4EgNkz1.js"),o=require("react"),g=require("classnames"),i=require("../dialog-previous-button-ns64Jg1v.js");require("../icon-button-DPIjQGta.js");const A=30,t="drawer-dialog",$=p=>{var{expanded:l=!1,noHandle:y,onClose:c=()=>{},onCollapsed:T=()=>{},onExpanded:w=()=>{},a11yMaximizeText:b,a11yMinimizeText:C,children:D}=p,u=v.__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?w():T()},_=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)})},H=e=>{a.length&&Array.from(e.changedTouches).forEach(({identifier:r,pageY:n})=>{const f=a.findIndex(q=>q.identifier===r),x=n-a[f].pageY;x>A?(s?d(!1):c(),h(e)):x<-30&&(d(!0),h(e))})},S=y?null:o.createElement("button",{"aria-label":s?C:b,className:`${t}__handle`,onClick:()=>d(!s),onScroll:()=>d(!0),onTouchStart:_,onTouchMove:H,onTouchEnd:h,type:"button"}),m=o.Children.toArray(D),M=m.find(({type:e})=>e===i.EbayDialogHeader),k=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:S}),M||o.createElement(i.EbayDialogHeader,null),k)};exports.EbayDrawerDialogDeprecated=$;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"education-notice.d.ts","sourceRoot":"","sources":["../../src/ebay-education-notice/education-notice.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAY,MAAM,OAAO,CAAA;AAM3D,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAEzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAIjD,MAAM,MAAM,KAAK,GAAG,cAAc,CAAC,SAAS,CAAC,GAAG;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,uBAAuB,CAAA;IACnC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,
|
|
1
|
+
{"version":3,"file":"education-notice.d.ts","sourceRoot":"","sources":["../../src/ebay-education-notice/education-notice.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAY,MAAM,OAAO,CAAA;AAM3D,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAEzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAIjD,MAAM,MAAM,KAAK,GAAG,cAAc,CAAC,SAAS,CAAC,GAAG;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,uBAAuB,CAAA;IACnC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,aAAa,CAAC,EAAE,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,WAAW,GAAG,MAAM,CAAA;IAC9B,WAAW,CAAC,EAAE,WAAW,GAAG,MAAM,CAAA;CACrC,CAAA;AAED,QAAA,MAAM,mBAAmB,EAAE,EAAE,CAAC,KAAK,CAkElC,CAAA;AAED,eAAe,mBAAmB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../tslib.es6-C4EgNkz1.js"),e=require("react"),
|
|
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-hO_8pLp7.js"),O=require("../icon-button-DPIjQGta.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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eek-util.d.ts","sourceRoot":"","sources":["../../src/ebay-eek/eek-util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"eek-util.d.ts","sourceRoot":"","sources":["../../src/ebay-eek/eek-util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;yBAU3B,OAAO,YAAY,KAAG,MAAM;AAA5C,wBAuBC"}
|
package/ebay-fake-menu/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../menu-item-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../menu-item-C24G4so-.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
|
-
{"version":3,"file":"menu-item-separator.d.ts","sourceRoot":"","sources":["../../src/ebay-fake-menu/menu-item-separator.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAGjD,KAAK,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,CAAA;AAEjC,QAAA,MAAM,qBAAqB,EAAE,EAAE,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"menu-item-separator.d.ts","sourceRoot":"","sources":["../../src/ebay-fake-menu/menu-item-separator.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAGjD,KAAK,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,CAAA;AAEjC,QAAA,MAAM,qBAAqB,EAAE,EAAE,CAAC,KAAK,CAQpC,CAAA;AAED,eAAe,qBAAqB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentProps, FC } from 'react';
|
|
2
2
|
export type EbayMenuItemType = 'button';
|
|
3
|
-
export type EbayFakeMenuItemProps = Omit<ComponentProps<'a'>, 'onKeyDown'
|
|
3
|
+
export type EbayFakeMenuItemProps = Omit<ComponentProps<'a'>, 'onKeyDown'> & Omit<ComponentProps<'button'>, 'onKeyDown'> & {
|
|
4
4
|
current?: boolean;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
autoFocus?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-item.d.ts","sourceRoot":"","sources":["../../src/ebay-fake-menu/menu-item.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAqB,MAAM,OAAO,CAAA;AAKpE,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAA;AACvC,MAAM,MAAM,qBAAqB,GAC7B,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"menu-item.d.ts","sourceRoot":"","sources":["../../src/ebay-fake-menu/menu-item.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAqB,MAAM,OAAO,CAAA;AAKpE,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAA;AACvC,MAAM,MAAM,qBAAqB,GAC7B,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,GACtC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC,GAC3C;IACI,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAA;AAEL,QAAA,MAAM,YAAY,EAAE,EAAE,CAAC,qBAAqB,CA8D3C,CAAA;AAED,eAAe,YAAY,CAAA"}
|