@ebay/ui-core-react 8.4.0 → 8.5.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/README.md +5 -2
- package/dropdown-DyNGEyy6.js +22 -0
- package/ebay-accordion/index.js +2 -2
- package/ebay-alert-dialog/index.js +1 -1
- package/ebay-avatar/index.js +1 -1
- package/ebay-badge/index.js +1 -1
- package/ebay-breadcrumbs/index.js +1 -1
- package/ebay-button/index.js +1 -1
- package/ebay-calendar/index.js +1 -1
- package/ebay-carousel/index.js +1 -1
- package/ebay-ccd/README.md +64 -0
- package/ebay-ccd/ccd.d.ts +14 -0
- package/ebay-ccd/ccd.d.ts.map +1 -0
- package/ebay-ccd/index.d.ts +2 -0
- package/ebay-ccd/index.d.ts.map +1 -0
- package/ebay-ccd/index.js +1 -0
- package/ebay-character-count/README.md +44 -0
- package/ebay-character-count/character-count.d.ts +14 -0
- package/ebay-character-count/character-count.d.ts.map +1 -0
- package/ebay-character-count/index.d.ts +3 -0
- package/ebay-character-count/index.d.ts.map +1 -0
- package/ebay-character-count/index.js +1 -0
- package/ebay-checkbox/index.js +1 -1
- package/ebay-chip/index.js +1 -1
- package/ebay-chips-combobox/index.js +1 -1
- package/ebay-combobox/index.js +1 -1
- package/ebay-confirm-dialog/index.js +1 -1
- package/ebay-cta-button/index.js +1 -1
- package/ebay-date-textbox/index.js +1 -1
- package/ebay-details/index.js +1 -1
- package/ebay-dialog-base/index.js +41 -1
- package/ebay-drawer-dialog-deprecated/index.js +1 -1
- package/ebay-education-notice/index.js +1 -1
- package/ebay-eek/index.js +1 -1
- package/ebay-fake-link/index.js +1 -1
- package/ebay-fake-menu/index.js +1 -1
- package/ebay-fake-menu-button/index.js +1 -1
- package/ebay-fake-tabs/index.js +1 -1
- package/ebay-field/index.js +1 -1
- package/ebay-field/types.d.ts +1 -1
- package/ebay-field/types.d.ts.map +1 -1
- package/ebay-file-input/README.md +59 -0
- package/ebay-file-input/file-input.d.ts +13 -0
- package/ebay-file-input/file-input.d.ts.map +1 -0
- package/ebay-file-input/index.d.ts +2 -0
- package/ebay-file-input/index.d.ts.map +1 -0
- package/ebay-file-input/index.js +1 -0
- package/ebay-file-input/types.d.ts +6 -0
- package/ebay-file-input/types.d.ts.map +1 -0
- package/ebay-file-preview-card/file-preview-action.d.ts +2 -2
- package/ebay-file-preview-card/file-preview-action.d.ts.map +1 -1
- package/ebay-file-preview-card/file-preview-card.d.ts +3 -3
- package/ebay-file-preview-card/file-preview-card.d.ts.map +1 -1
- package/ebay-file-preview-card/index.js +1 -1
- package/ebay-file-preview-card/types.d.ts +1 -2
- package/ebay-file-preview-card/types.d.ts.map +1 -1
- package/ebay-file-preview-card-group/README.md +65 -0
- package/ebay-file-preview-card-group/file-preview-card-group.d.ts +12 -0
- package/ebay-file-preview-card-group/file-preview-card-group.d.ts.map +1 -0
- package/ebay-file-preview-card-group/index.d.ts +2 -0
- package/ebay-file-preview-card-group/index.d.ts.map +1 -0
- package/ebay-file-preview-card-group/index.js +1 -0
- package/ebay-file-preview-card-group/types.d.ts +13 -0
- package/ebay-file-preview-card-group/types.d.ts.map +1 -0
- package/ebay-filter/index.js +1 -1
- package/ebay-filter-menu/index.js +1 -1
- package/ebay-filter-menu-button/index.js +1 -1
- package/ebay-fullscreen-dialog-deprecated/index.js +1 -1
- package/ebay-icon/icon.d.ts +6 -0
- package/ebay-icon/icon.d.ts.map +1 -1
- package/ebay-icon/index.js +1 -1
- package/ebay-icon/types.d.ts +1 -1
- package/ebay-icon/types.d.ts.map +1 -1
- package/ebay-icon-button/index.js +1 -1
- package/ebay-image-placeholder/README.md +46 -0
- package/ebay-image-placeholder/image-placeholder.d.ts +6 -0
- package/ebay-image-placeholder/image-placeholder.d.ts.map +1 -0
- package/ebay-image-placeholder/index.d.ts +2 -0
- package/ebay-image-placeholder/index.d.ts.map +1 -0
- package/ebay-image-placeholder/index.js +1 -0
- package/ebay-infotip/index.js +5 -1
- package/ebay-inline-notice/index.js +1 -1
- package/ebay-lightbox-dialog/index.js +1 -1
- package/ebay-listbox/index.js +1 -1
- package/ebay-listbox-button/index.js +2 -2
- package/ebay-menu/index.js +1 -1
- package/ebay-menu-button/index.js +1 -1
- package/ebay-notice-base/index.js +1 -1
- package/ebay-page-notice/index.js +1 -1
- package/ebay-pagination/index.js +1 -1
- package/ebay-panel-dialog/index.js +1 -1
- package/ebay-progress-bar/index.js +1 -1
- package/ebay-progress-bar-expressive/index.js +1 -1
- package/ebay-progress-spinner/index.js +1 -1
- package/ebay-progress-stepper/index.js +1 -1
- package/ebay-radio/index.js +1 -1
- package/ebay-section-notice/index.js +1 -1
- package/ebay-section-title/index.js +1 -1
- package/ebay-segmented-buttons/index.js +1 -1
- package/ebay-select/index.js +1 -1
- package/ebay-signal/index.js +1 -1
- package/ebay-skeleton/index.js +1 -1
- package/ebay-snackbar-dialog/index.js +1 -1
- package/ebay-split-button/index.js +1 -1
- package/ebay-star-rating/index.js +1 -1
- package/ebay-star-rating-select/index.js +1 -1
- package/ebay-svg/index.js +1 -1
- package/ebay-switch/index.js +1 -1
- package/ebay-table/README.md +1 -0
- package/ebay-table/index.js +1 -1
- package/ebay-table/table.d.ts +1 -0
- package/ebay-table/table.d.ts.map +1 -1
- package/ebay-tabs/index.js +1 -1
- package/ebay-textbox/index.js +1 -1
- package/ebay-toast-dialog/index.js +1 -1
- package/ebay-toggle-button/index.js +1 -1
- package/ebay-toggle-button-group/index.js +1 -1
- package/ebay-tooltip/index.js +1 -1
- package/ebay-tourtip/index.js +1 -1
- package/ebay-tri-state-checkbox/index.js +1 -1
- package/ebay-video/index.js +385 -1
- package/events/index.js +1 -1
- package/forwardRef-BGhnwltg.js +1 -0
- package/hooks-BsnjMXtj.js +1 -0
- package/index-B9dsnEky.js +1 -0
- package/index-BL7hPwtY.js +21 -0
- package/index-Banoekuf.js +29 -0
- package/index-BeJlcxe3.js +1 -0
- package/index-BgDjcBrE.js +1 -0
- package/index-BsU6iXoe.js +1 -0
- package/index-D5FUVa4d.js +1 -0
- package/index-DmNrJCd8.js +5 -0
- package/index-Q8sL9uBq.js +1 -0
- package/index-plT9bPAi.js +1 -0
- package/label-ACiBnv5P.js +1 -0
- package/menu-item-BjtmFgwz.js +1 -0
- package/menu-nih_gX8y.js +1 -0
- package/notice-content-x5HJ49Mm.js +1 -0
- package/notice-cta-CFuZePI4.js +1 -0
- package/notice-footer-DAKaAyB_.js +1 -0
- package/package.json +11 -11
- package/random-id-5bEmzZsS.js +1 -0
- package/reduced-motion-CBVd9_aJ.js +1 -0
- package/tslib.es6-UTo0M824.js +1 -0
- package/use-tooltip-B1NgwD6z.js +1 -0
- package/utils/index.js +1 -1
- package/utils-D1rplbEN.js +1 -0
- package/badge-BWhBKWCu.js +0 -1
- package/button-C3RhAySI.js +0 -1
- package/calendar-C0wOay3d.js +0 -1
- package/checkbox-BziMKlXl.js +0 -1
- package/chip-CFq5Sx2d.js +0 -1
- package/combobox-BzM04rYV.js +0 -1
- package/dialog-previous-button-ns64Jg1v.js +0 -1
- package/dropdown-BGdrijmi.js +0 -1
- package/ebay-details-Co3xp8NP.js +0 -1
- package/filter-menu-CzHlWYrY.js +0 -1
- package/forwardRef-DBQKIlPy.js +0 -1
- package/hooks-B4eFIQlH.js +0 -1
- package/icon-button-DPIjQGta.js +0 -1
- package/icon-hO_8pLp7.js +0 -1
- package/label-BRztS0pw.js +0 -1
- package/lightbox-dialog-2MA5lJCC.js +0 -1
- package/menu-DmmYhPJU.js +0 -1
- package/menu-button-label-BCs24-MK.js +0 -1
- package/menu-button-label-DFjHo8Lr.js +0 -1
- package/menu-item-C24G4so-.js +0 -1
- package/notice-content-9iF4T8uB.js +0 -1
- package/notice-cta-CKl_qBge.js +0 -1
- package/notice-footer-G6VPjVZu.js +0 -1
- package/progress-spinner-CTs1iaUV.js +0 -1
- package/radio-D-YF8WXv.js +0 -1
- package/random-id-DlJj_RWH.js +0 -1
- package/reduced-motion-CMIhlQVx.js +0 -1
- package/textbox-B6zeeYue.js +0 -1
- package/toggle-button-CugK7Hwz.js +0 -1
- package/tri-state-checkbox-Lrf47q9t.js +0 -1
- package/tslib.es6-C4EgNkz1.js +0 -1
- package/use-roving-index-DoAVBgsp.js +0 -1
- package/use-tooltip-BTMlwcb6.js +0 -1
- package/utils-C9NL3q0j.js +0 -1
package/README.md
CHANGED
|
@@ -21,8 +21,9 @@ eBayUI React components
|
|
|
21
21
|
* [x] [ebay-breadcrumbs](src/ebay-breadcrumbs)
|
|
22
22
|
* [x] [ebay-button](src/ebay-button)
|
|
23
23
|
* [x] [ebay-calendar](src/ebay-calendar)
|
|
24
|
-
* [ ] `ebay-character-count`
|
|
25
24
|
* [x] [ebay-carousel](src/ebay-carousel)
|
|
25
|
+
* [x] [ebay-ccd](src/ebay-ccd)
|
|
26
|
+
* [ ] `ebay-character-count`
|
|
26
27
|
* [ ] `ebay-chart-legend`
|
|
27
28
|
* [x] [ebay-checkbox](src/ebay-checkbox)
|
|
28
29
|
* [x] [ebay-chip](src/ebay-chip)
|
|
@@ -40,14 +41,16 @@ eBayUI React components
|
|
|
40
41
|
* [x] [ebay-fake-menu-button](src/ebay-fake-menu-button)
|
|
41
42
|
* [x] [ebay-fake-tabs](src/ebay-fake-tabs)
|
|
42
43
|
* [x] [ebay-field](src/ebay-field)
|
|
44
|
+
* [x] [ebay-file-input](src/ebay-file-input)
|
|
43
45
|
* [x] [ebay-file-preview-card](src/ebay-file-preview-card)
|
|
46
|
+
* [x] [ebay-file-preview-card-group](src/ebay-file-preview-card-group)
|
|
44
47
|
* [x] [ebay-filter](src/ebay-filter)
|
|
45
48
|
* [x] [ebay-filter-menu](src/ebay-filter-menu)
|
|
46
49
|
* [x] [ebay-filter-menu-button](src/ebay-filter-menu-button)
|
|
47
50
|
* [ ] `ebay-flag`
|
|
48
51
|
* [x] [ebay-icon-button](src/ebay-icon-button)
|
|
49
52
|
* [x] [ebay-icon](src/ebay-icon)
|
|
50
|
-
* [
|
|
53
|
+
* [x] [ebay-image-placeholder](src/ebay-image-placeholder)
|
|
51
54
|
* [x] [ebay-infotip](src/ebay-infotip)
|
|
52
55
|
* [x] [ebay-inline-notice](src/ebay-inline-notice)
|
|
53
56
|
* [x] [ebay-lightbox-dialog](src/ebay-lightbox-dialog)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";const m=require("./index-Banoekuf.js"),ut=require("./index-B9dsnEky.js"),Ne=require("./index-D5FUVa4d.js"),He=require("./index-BeJlcxe3.js"),ft=require("./index-BsU6iXoe.js");function ge(){return typeof window<"u"}function re(e){return Xe(e)?(e.nodeName||"").toLowerCase():"#document"}function M(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function z(e){var t;return(t=(Xe(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Xe(e){return ge()?e instanceof Node||e instanceof M(e).Node:!1}function T(e){return ge()?e instanceof Element||e instanceof M(e).Element:!1}function q(e){return ge()?e instanceof HTMLElement||e instanceof M(e).HTMLElement:!1}function je(e){return!ge()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof M(e).ShadowRoot}function ae(e){const{overflow:t,overflowX:o,overflowY:n,display:s}=$(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&!["inline","contents"].includes(s)}function dt(e){return["table","td","th"].includes(re(e))}function Ee(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Fe(e){const t=Pe(),o=T(e)?$(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>o[n]?o[n]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!t&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!t&&(o.filter?o.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(o.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(o.contain||"").includes(n))}function ht(e){let t=X(e);for(;q(t)&&!se(t);){if(Fe(t))return t;if(Ee(t))return null;t=X(t)}return null}function Pe(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function se(e){return["html","body","#document"].includes(re(e))}function $(e){return M(e).getComputedStyle(e)}function we(e){return T(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function X(e){if(re(e)==="html")return e;const t=e.assignedSlot||e.parentNode||je(e)&&e.host||z(e);return je(t)?t.host:t}function Ge(e){const t=X(e);return se(t)?e.ownerDocument?e.ownerDocument.body:e.body:q(t)&&ae(t)?t:Ge(t)}function le(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);const s=Ge(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),r=M(s);if(i){const l=ke(r);return t.concat(r,r.visualViewport||[],ae(s)?s:[],l&&o?le(l):[])}return t.concat(s,le(s,[],o))}function ke(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const he=Math.min,Z=Math.max,pe=Math.round,ue=Math.floor,Y=e=>({x:e,y:e}),pt={left:"right",right:"left",bottom:"top",top:"bottom"},mt={start:"end",end:"start"};function $e(e,t,o){return Z(e,he(t,o))}function ye(e,t){return typeof e=="function"?e(t):e}function ee(e){return e.split("-")[0]}function be(e){return e.split("-")[1]}function Ze(e){return e==="x"?"y":"x"}function Qe(e){return e==="y"?"height":"width"}function Q(e){return["top","bottom"].includes(ee(e))?"y":"x"}function et(e){return Ze(Q(e))}function xt(e,t,o){o===void 0&&(o=!1);const n=be(e),s=et(e),i=Qe(s);let r=s==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(r=me(r)),[r,me(r)]}function vt(e){const t=me(e);return[Ae(e),t,Ae(t)]}function Ae(e){return e.replace(/start|end/g,t=>mt[t])}function gt(e,t,o){const n=["left","right"],s=["right","left"],i=["top","bottom"],r=["bottom","top"];switch(e){case"top":case"bottom":return o?t?s:n:t?n:s;case"left":case"right":return t?i:r;default:return[]}}function Et(e,t,o,n){const s=be(e);let i=gt(ee(e),o==="start",n);return s&&(i=i.map(r=>r+"-"+s),t&&(i=i.concat(i.map(Ae)))),i}function me(e){return e.replace(/left|right|bottom|top/g,t=>pt[t])}function wt(e){return{top:0,right:0,bottom:0,left:0,...e}}function yt(e){return typeof e!="number"?wt(e):{top:e,right:e,bottom:e,left:e}}function xe(e){const{x:t,y:o,width:n,height:s}=e;return{width:n,height:s,top:o,left:t,right:t+n,bottom:o+s,x:t,y:o}}var Te=typeof document<"u"?m.reactExports.useLayoutEffect:m.reactExports.useEffect;const bt={...m.React$1},Rt=bt.useInsertionEffect,_t=Rt||(e=>e());function Ot(e){const t=m.reactExports.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return _t(()=>{t.current=e}),m.reactExports.useCallback(function(){for(var o=arguments.length,n=new Array(o),s=0;s<o;s++)n[s]=arguments[s];return t.current==null?void 0:t.current(...n)},[])}var fe={exports:{}},ie={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Ie;function Ct(){if(Ie)return ie;Ie=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function o(n,s,i){var r=null;if(i!==void 0&&(r=""+i),s.key!==void 0&&(r=""+s.key),"key"in s){i={};for(var l in s)l!=="key"&&(i[l]=s[l])}else i=s;return s=i.ref,{$$typeof:e,type:n,key:r,ref:s!==void 0?s:null,props:i}}return ie.Fragment=t,ie.jsx=o,ie.jsxs=o,ie}var ce={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var We;function Lt(){return We||(We=1,process.env.NODE_ENV!=="production"&&function(){function e(c){if(c==null)return null;if(typeof c=="function")return c.$$typeof===N?null:c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case E:return"Fragment";case w:return"Profiler";case y:return"StrictMode";case _:return"Suspense";case F:return"SuspenseList";case U:return"Activity"}if(typeof c=="object")switch(typeof c.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),c.$$typeof){case x:return"Portal";case v:return(c.displayName||"Context")+".Provider";case b:return(c._context.displayName||"Context")+".Consumer";case R:var g=c.render;return c=c.displayName,c||(c=g.displayName||g.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case S:return g=c.displayName||null,g!==null?g:e(c.type)||"Memo";case H:g=c._payload,c=c._init;try{return e(c(g))}catch{}}return null}function t(c){return""+c}function o(c){try{t(c);var g=!1}catch{g=!0}if(g){g=console;var C=g.error,k=typeof Symbol=="function"&&Symbol.toStringTag&&c[Symbol.toStringTag]||c.constructor.name||"Object";return C.call(g,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",k),t(c)}}function n(c){if(c===E)return"<>";if(typeof c=="object"&&c!==null&&c.$$typeof===H)return"<...>";try{var g=e(c);return g?"<"+g+">":"<...>"}catch{return"<...>"}}function s(){var c=I.A;return c===null?null:c.getOwner()}function i(){return Error("react-stack-top-frame")}function r(c){if(K.call(c,"key")){var g=Object.getOwnPropertyDescriptor(c,"key").get;if(g&&g.isReactWarning)return!1}return c.key!==void 0}function l(c,g){function C(){D||(D=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",g))}C.isReactWarning=!0,Object.defineProperty(c,"key",{get:C,configurable:!0})}function a(){var c=e(this.type);return P[c]||(P[c]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),c=this.props.ref,c!==void 0?c:null}function f(c,g,C,k,J,B,Re,_e){return C=B.ref,c={$$typeof:u,type:c,key:g,props:B,_owner:J},(C!==void 0?C:null)!==null?Object.defineProperty(c,"ref",{enumerable:!1,get:a}):Object.defineProperty(c,"ref",{enumerable:!1,value:null}),c._store={},Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(c,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(c,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Re}),Object.defineProperty(c,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:_e}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c}function d(c,g,C,k,J,B,Re,_e){var A=g.children;if(A!==void 0)if(k)if(W(A)){for(k=0;k<A.length;k++)h(A[k]);Object.freeze&&Object.freeze(A)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else h(A);if(K.call(g,"key")){A=e(c);var ne=Object.keys(g).filter(function(at){return at!=="key"});k=0<ne.length?"{key: someKey, "+ne.join(": ..., ")+": ...}":"{key: someKey}",L[A+k]||(ne=0<ne.length?"{"+ne.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
+
let props = %s;
|
|
19
|
+
<%s {...props} />
|
|
20
|
+
React keys must be passed directly to JSX without using spread:
|
|
21
|
+
let props = %s;
|
|
22
|
+
<%s key={someKey} {...props} />`,k,A,ne,A),L[A+k]=!0)}if(A=null,C!==void 0&&(o(C),A=""+C),r(g)&&(o(g.key),A=""+g.key),"key"in g){C={};for(var Oe in g)Oe!=="key"&&(C[Oe]=g[Oe])}else C=g;return A&&l(C,typeof c=="function"?c.displayName||c.name||"Unknown":c),f(c,A,B,J,s(),C,Re,_e)}function h(c){typeof c=="object"&&c!==null&&c.$$typeof===u&&c._store&&(c._store.validated=1)}var p=m.requireReact(),u=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),v=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),N=Symbol.for("react.client.reference"),I=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=Object.prototype.hasOwnProperty,W=Array.isArray,V=console.createTask?console.createTask:function(){return null};p={"react-stack-bottom-frame":function(c){return c()}};var D,P={},j=p["react-stack-bottom-frame"].bind(p,i)(),O=V(n(i)),L={};ce.Fragment=E,ce.jsx=function(c,g,C,k,J){var B=1e4>I.recentlyCreatedOwnerStacks++;return d(c,g,C,!1,k,J,B?Error("react-stack-top-frame"):j,B?V(n(c)):O)},ce.jsxs=function(c,g,C,k,J){var B=1e4>I.recentlyCreatedOwnerStacks++;return d(c,g,C,!0,k,J,B?Error("react-stack-top-frame"):j,B?V(n(c)):O)}}()),ce}var Ve;function kt(){return Ve||(Ve=1,process.env.NODE_ENV==="production"?fe.exports=Ct():fe.exports=Lt()),fe.exports}kt();function Be(e,t,o){let{reference:n,floating:s}=e;const i=Q(t),r=et(t),l=Qe(r),a=ee(t),f=i==="y",d=n.x+n.width/2-s.width/2,h=n.y+n.height/2-s.height/2,p=n[l]/2-s[l]/2;let u;switch(a){case"top":u={x:d,y:n.y-s.height};break;case"bottom":u={x:d,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:h};break;case"left":u={x:n.x-s.width,y:h};break;default:u={x:n.x,y:n.y}}switch(be(t)){case"start":u[r]-=p*(o&&f?-1:1);break;case"end":u[r]+=p*(o&&f?-1:1);break}return u}const At=async(e,t,o)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:r}=o,l=i.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(t));let f=await r.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:h}=Be(f,n,a),p=n,u={},x=0;for(let E=0;E<l.length;E++){const{name:y,fn:w}=l[E],{x:b,y:v,data:R,reset:_}=await w({x:d,y:h,initialPlacement:n,placement:p,strategy:s,middlewareData:u,rects:f,platform:r,elements:{reference:e,floating:t}});d=b??d,h=v??h,u={...u,[y]:{...u[y],...R}},_&&x<=50&&(x++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(f=_.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:s}):_.rects),{x:d,y:h}=Be(f,p,a)),E=-1)}return{x:d,y:h,placement:p,strategy:s,middlewareData:u}};async function tt(e,t){var o;t===void 0&&(t={});const{x:n,y:s,platform:i,rects:r,elements:l,strategy:a}=e,{boundary:f="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:p=!1,padding:u=0}=ye(t,e),x=yt(u),y=l[p?h==="floating"?"reference":"floating":h],w=xe(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(y)))==null||o?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:f,rootBoundary:d,strategy:a})),b=h==="floating"?{x:n,y:s,width:r.floating.width,height:r.floating.height}:r.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),R=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},_=xe(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:v,strategy:a}):b);return{top:(w.top-_.top+x.top)/R.y,bottom:(_.bottom-w.bottom+x.bottom)/R.y,left:(w.left-_.left+x.left)/R.x,right:(_.right-w.right+x.right)/R.x}}const Tt=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,n;const{placement:s,middlewareData:i,rects:r,initialPlacement:l,platform:a,elements:f}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:E=!0,...y}=ye(e,t);if((o=i.arrow)!=null&&o.alignmentOffset)return{};const w=ee(s),b=Q(l),v=ee(l)===l,R=await(a.isRTL==null?void 0:a.isRTL(f.floating)),_=p||(v||!E?[me(l)]:vt(l)),F=x!=="none";!p&&F&&_.push(...Et(l,E,x,R));const S=[l,..._],H=await tt(t,y),U=[];let N=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&U.push(H[w]),h){const D=xt(s,r,R);U.push(H[D[0]],H[D[1]])}if(N=[...N,{placement:s,overflows:U}],!U.every(D=>D<=0)){var I,K;const D=(((I=i.flip)==null?void 0:I.index)||0)+1,P=S[D];if(P){var W;const O=h==="alignment"?b!==Q(P):!1,L=((W=N[0])==null?void 0:W.overflows[0])>0;if(!O||L)return{data:{index:D,overflows:N},reset:{placement:P}}}let j=(K=N.filter(O=>O.overflows[0]<=0).sort((O,L)=>O.overflows[1]-L.overflows[1])[0])==null?void 0:K.placement;if(!j)switch(u){case"bestFit":{var V;const O=(V=N.filter(L=>{if(F){const c=Q(L.placement);return c===b||c==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(c=>c>0).reduce((c,g)=>c+g,0)]).sort((L,c)=>L[1]-c[1])[0])==null?void 0:V[0];O&&(j=O);break}case"initialPlacement":j=l;break}if(s!==j)return{reset:{placement:j}}}return{}}}};async function St(e,t){const{placement:o,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),r=ee(o),l=be(o),a=Q(o)==="y",f=["left","top"].includes(r)?-1:1,d=i&&a?-1:1,h=ye(t,e);let{mainAxis:p,crossAxis:u,alignmentAxis:x}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof x=="number"&&(u=l==="end"?x*-1:x),a?{x:u*d,y:p*f}:{x:p*f,y:u*d}}const Ft=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,n;const{x:s,y:i,placement:r,middlewareData:l}=t,a=await St(t,e);return r===((o=l.offset)==null?void 0:o.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:s+a.x,y:i+a.y,data:{...a,placement:r}}}}},Pt=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:n,placement:s}=t,{mainAxis:i=!0,crossAxis:r=!1,limiter:l={fn:y=>{let{x:w,y:b}=y;return{x:w,y:b}}},...a}=ye(e,t),f={x:o,y:n},d=await tt(t,a),h=Q(ee(s)),p=Ze(h);let u=f[p],x=f[h];if(i){const y=p==="y"?"top":"left",w=p==="y"?"bottom":"right",b=u+d[y],v=u-d[w];u=$e(b,u,v)}if(r){const y=h==="y"?"top":"left",w=h==="y"?"bottom":"right",b=x+d[y],v=x-d[w];x=$e(b,x,v)}const E=l.fn({...t,[p]:u,[h]:x});return{...E,data:{x:E.x-o,y:E.y-n,enabled:{[p]:i,[h]:r}}}}}};function nt(e){const t=$(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=q(e),i=s?e.offsetWidth:o,r=s?e.offsetHeight:n,l=pe(o)!==i||pe(n)!==r;return l&&(o=i,n=r),{width:o,height:n,$:l}}function De(e){return T(e)?e:e.contextElement}function oe(e){const t=De(e);if(!q(t))return Y(1);const o=t.getBoundingClientRect(),{width:n,height:s,$:i}=nt(t);let r=(i?pe(o.width):o.width)/n,l=(i?pe(o.height):o.height)/s;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}const Dt=Y(0);function ot(e){const t=M(e);return!Pe()||!t.visualViewport?Dt:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Mt(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==M(e)?!1:t}function te(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);const s=e.getBoundingClientRect(),i=De(e);let r=Y(1);t&&(n?T(n)&&(r=oe(n)):r=oe(e));const l=Mt(i,o,n)?ot(i):Y(0);let a=(s.left+l.x)/r.x,f=(s.top+l.y)/r.y,d=s.width/r.x,h=s.height/r.y;if(i){const p=M(i),u=n&&T(n)?M(n):n;let x=p,E=ke(x);for(;E&&n&&u!==x;){const y=oe(E),w=E.getBoundingClientRect(),b=$(E),v=w.left+(E.clientLeft+parseFloat(b.paddingLeft))*y.x,R=w.top+(E.clientTop+parseFloat(b.paddingTop))*y.y;a*=y.x,f*=y.y,d*=y.x,h*=y.y,a+=v,f+=R,x=M(E),E=ke(x)}}return xe({width:d,height:h,x:a,y:f})}function Me(e,t){const o=we(e).scrollLeft;return t?t.left+o:te(z(e)).left+o}function st(e,t,o){o===void 0&&(o=!1);const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-(o?0:Me(e,n)),i=n.top+t.scrollTop;return{x:s,y:i}}function Nt(e){let{elements:t,rect:o,offsetParent:n,strategy:s}=e;const i=s==="fixed",r=z(n),l=t?Ee(t.floating):!1;if(n===r||l&&i)return o;let a={scrollLeft:0,scrollTop:0},f=Y(1);const d=Y(0),h=q(n);if((h||!h&&!i)&&((re(n)!=="body"||ae(r))&&(a=we(n)),q(n))){const u=te(n);f=oe(n),d.x=u.x+n.clientLeft,d.y=u.y+n.clientTop}const p=r&&!h&&!i?st(r,a,!0):Y(0);return{width:o.width*f.x,height:o.height*f.y,x:o.x*f.x-a.scrollLeft*f.x+d.x+p.x,y:o.y*f.y-a.scrollTop*f.y+d.y+p.y}}function Ht(e){return Array.from(e.getClientRects())}function jt(e){const t=z(e),o=we(e),n=e.ownerDocument.body,s=Z(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Z(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let r=-o.scrollLeft+Me(e);const l=-o.scrollTop;return $(n).direction==="rtl"&&(r+=Z(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:r,y:l}}function $t(e,t){const o=M(e),n=z(e),s=o.visualViewport;let i=n.clientWidth,r=n.clientHeight,l=0,a=0;if(s){i=s.width,r=s.height;const f=Pe();(!f||f&&t==="fixed")&&(l=s.offsetLeft,a=s.offsetTop)}return{width:i,height:r,x:l,y:a}}function It(e,t){const o=te(e,!0,t==="fixed"),n=o.top+e.clientTop,s=o.left+e.clientLeft,i=q(e)?oe(e):Y(1),r=e.clientWidth*i.x,l=e.clientHeight*i.y,a=s*i.x,f=n*i.y;return{width:r,height:l,x:a,y:f}}function Ye(e,t,o){let n;if(t==="viewport")n=$t(e,o);else if(t==="document")n=jt(z(e));else if(T(t))n=It(t,o);else{const s=ot(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return xe(n)}function rt(e,t){const o=X(e);return o===t||!T(o)||se(o)?!1:$(o).position==="fixed"||rt(o,t)}function Wt(e,t){const o=t.get(e);if(o)return o;let n=le(e,[],!1).filter(l=>T(l)&&re(l)!=="body"),s=null;const i=$(e).position==="fixed";let r=i?X(e):e;for(;T(r)&&!se(r);){const l=$(r),a=Fe(r);!a&&l.position==="fixed"&&(s=null),(i?!a&&!s:!a&&l.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||ae(r)&&!a&&rt(e,r))?n=n.filter(d=>d!==r):s=l,r=X(r)}return t.set(e,n),n}function Vt(e){let{element:t,boundary:o,rootBoundary:n,strategy:s}=e;const r=[...o==="clippingAncestors"?Ee(t)?[]:Wt(t,this._c):[].concat(o),n],l=r[0],a=r.reduce((f,d)=>{const h=Ye(t,d,s);return f.top=Z(h.top,f.top),f.right=he(h.right,f.right),f.bottom=he(h.bottom,f.bottom),f.left=Z(h.left,f.left),f},Ye(t,l,s));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Bt(e){const{width:t,height:o}=nt(e);return{width:t,height:o}}function Yt(e,t,o){const n=q(t),s=z(t),i=o==="fixed",r=te(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const a=Y(0);function f(){a.x=Me(s)}if(n||!n&&!i)if((re(t)!=="body"||ae(s))&&(l=we(t)),n){const u=te(t,!0,i,t);a.x=u.x+t.clientLeft,a.y=u.y+t.clientTop}else s&&f();i&&!n&&s&&f();const d=s&&!n&&!i?st(s,l):Y(0),h=r.left+l.scrollLeft-a.x-d.x,p=r.top+l.scrollTop-a.y-d.y;return{x:h,y:p,width:r.width,height:r.height}}function Ce(e){return $(e).position==="static"}function qe(e,t){if(!q(e)||$(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return z(e)===o&&(o=o.ownerDocument.body),o}function it(e,t){const o=M(e);if(Ee(e))return o;if(!q(e)){let s=X(e);for(;s&&!se(s);){if(T(s)&&!Ce(s))return s;s=X(s)}return o}let n=qe(e,t);for(;n&&dt(n)&&Ce(n);)n=qe(n,t);return n&&se(n)&&Ce(n)&&!Fe(n)?o:n||ht(e)||o}const qt=async function(e){const t=this.getOffsetParent||it,o=this.getDimensions,n=await o(e.floating);return{reference:Yt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function zt(e){return $(e).direction==="rtl"}const Ut={convertOffsetParentRelativeRectToViewportRelativeRect:Nt,getDocumentElement:z,getClippingRect:Vt,getOffsetParent:it,getElementRects:qt,getClientRects:Ht,getDimensions:Bt,getScale:oe,isElement:T,isRTL:zt};function ct(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Kt(e,t){let o=null,n;const s=z(e);function i(){var l;clearTimeout(n),(l=o)==null||l.disconnect(),o=null}function r(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),i();const f=e.getBoundingClientRect(),{left:d,top:h,width:p,height:u}=f;if(l||t(),!p||!u)return;const x=ue(h),E=ue(s.clientWidth-(d+p)),y=ue(s.clientHeight-(h+u)),w=ue(d),v={rootMargin:-x+"px "+-E+"px "+-y+"px "+-w+"px",threshold:Z(0,he(1,a))||1};let R=!0;function _(F){const S=F[0].intersectionRatio;if(S!==a){if(!R)return r();S?r(!1,S):n=setTimeout(()=>{r(!1,1e-7)},1e3)}S===1&&!ct(f,e.getBoundingClientRect())&&r(),R=!1}try{o=new IntersectionObserver(_,{...v,root:s.ownerDocument})}catch{o=new IntersectionObserver(_,v)}o.observe(e)}return r(!0),i}function Jt(e,t,o,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=n,f=De(e),d=s||i?[...f?le(f):[],...le(t)]:[];d.forEach(w=>{s&&w.addEventListener("scroll",o,{passive:!0}),i&&w.addEventListener("resize",o)});const h=f&&l?Kt(f,o):null;let p=-1,u=null;r&&(u=new ResizeObserver(w=>{let[b]=w;b&&b.target===f&&u&&(u.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var v;(v=u)==null||v.observe(t)})),o()}),f&&!a&&u.observe(f),u.observe(t));let x,E=a?te(e):null;a&&y();function y(){const w=te(e);E&&!ct(E,w)&&o(),E=w,x=requestAnimationFrame(y)}return o(),()=>{var w;d.forEach(b=>{s&&b.removeEventListener("scroll",o),i&&b.removeEventListener("resize",o)}),h==null||h(),(w=u)==null||w.disconnect(),u=null,a&&cancelAnimationFrame(x)}}const Xt=Ft,Gt=Pt,Zt=Tt,Qt=(e,t,o)=>{const n=new Map,s={platform:Ut,...o},i={...s.platform,_c:n};return At(e,t,{...s,platform:i})};var de=typeof document<"u"?m.reactExports.useLayoutEffect:m.reactExports.useEffect;function ve(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let o,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(n=o;n--!==0;)if(!ve(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),o=s.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=o;n--!==0;){const i=s[n];if(!(i==="_owner"&&e.$$typeof)&&!ve(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function lt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ze(e,t){const o=lt(e);return Math.round(t*o)/o}function Le(e){const t=m.reactExports.useRef(e);return de(()=>{t.current=e}),t}function en(e){e===void 0&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:r}={},transform:l=!0,whileElementsMounted:a,open:f}=e,[d,h]=m.reactExports.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[p,u]=m.reactExports.useState(n);ve(p,n)||u(n);const[x,E]=m.reactExports.useState(null),[y,w]=m.reactExports.useState(null),b=m.reactExports.useCallback(O=>{O!==F.current&&(F.current=O,E(O))},[]),v=m.reactExports.useCallback(O=>{O!==S.current&&(S.current=O,w(O))},[]),R=i||x,_=r||y,F=m.reactExports.useRef(null),S=m.reactExports.useRef(null),H=m.reactExports.useRef(d),U=a!=null,N=Le(a),I=Le(s),K=Le(f),W=m.reactExports.useCallback(()=>{if(!F.current||!S.current)return;const O={placement:t,strategy:o,middleware:p};I.current&&(O.platform=I.current),Qt(F.current,S.current,O).then(L=>{const c={...L,isPositioned:K.current!==!1};V.current&&!ve(H.current,c)&&(H.current=c,ut.reactDomExports.flushSync(()=>{h(c)}))})},[p,t,o,I,K]);de(()=>{f===!1&&H.current.isPositioned&&(H.current.isPositioned=!1,h(O=>({...O,isPositioned:!1})))},[f]);const V=m.reactExports.useRef(!1);de(()=>(V.current=!0,()=>{V.current=!1}),[]),de(()=>{if(R&&(F.current=R),_&&(S.current=_),R&&_){if(N.current)return N.current(R,_,W);W()}},[R,_,W,N,U]);const D=m.reactExports.useMemo(()=>({reference:F,floating:S,setReference:b,setFloating:v}),[b,v]),P=m.reactExports.useMemo(()=>({reference:R,floating:_}),[R,_]),j=m.reactExports.useMemo(()=>{const O={position:o,left:0,top:0};if(!P.floating)return O;const L=ze(P.floating,d.x),c=ze(P.floating,d.y);return l?{...O,transform:"translate("+L+"px, "+c+"px)",...lt(P.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:L,top:c}},[o,l,P.floating,d.x,d.y]);return m.reactExports.useMemo(()=>({...d,update:W,refs:D,elements:P,floatingStyles:j}),[d,W,D,P,j])}const tn=(e,t)=>({...Xt(e),options:[e,t]}),nn=(e,t)=>({...Gt(e),options:[e,t]}),on=(e,t)=>({...Zt(e),options:[e,t]}),sn={...m.React$1};let Ue=!1,rn=0;const Ke=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+rn++;function cn(){const[e,t]=m.reactExports.useState(()=>Ue?Ke():void 0);return Te(()=>{e==null&&t(Ke())},[]),m.reactExports.useEffect(()=>{Ue=!0},[]),e}const ln=sn.useId,an=ln||cn;let Se;process.env.NODE_ENV!=="production"&&(Se=new Set);function un(){for(var e,t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];const s="Floating UI: "+o.join(" ");if(!((e=Se)!=null&&e.has(s))){var i;(i=Se)==null||i.add(s),console.error(s)}}function fn(){const e=new Map;return{emit(t,o){var n;(n=e.get(t))==null||n.forEach(s=>s(o))},on(t,o){e.has(t)||e.set(t,new Set),e.get(t).add(o)},off(t,o){var n;(n=e.get(t))==null||n.delete(o)}}}const dn=m.reactExports.createContext(null),hn=m.reactExports.createContext(null),pn=()=>{var e;return((e=m.reactExports.useContext(dn))==null?void 0:e.id)||null},mn=()=>m.reactExports.useContext(hn);function xn(e){const{open:t=!1,onOpenChange:o,elements:n}=e,s=an(),i=m.reactExports.useRef({}),[r]=m.reactExports.useState(()=>fn()),l=pn()!=null;if(process.env.NODE_ENV!=="production"){const u=n.reference;u&&!T(u)&&un("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[a,f]=m.reactExports.useState(n.reference),d=Ot((u,x,E)=>{i.current.openEvent=u?x:void 0,r.emit("openchange",{open:u,event:x,reason:E,nested:l}),o==null||o(u,x,E)}),h=m.reactExports.useMemo(()=>({setPositionReference:f}),[]),p=m.reactExports.useMemo(()=>({reference:a||n.reference||null,floating:n.floating||null,domReference:n.reference}),[a,n.reference,n.floating]);return m.reactExports.useMemo(()=>({dataRef:i,open:t,onOpenChange:d,elements:p,events:r,floatingId:s,refs:h}),[t,d,p,r,s,h])}function vn(e){e===void 0&&(e={});const{nodeId:t}=e,o=xn({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||o,s=n.elements,[i,r]=m.reactExports.useState(null),[l,a]=m.reactExports.useState(null),d=(s==null?void 0:s.domReference)||i,h=m.reactExports.useRef(null),p=mn();Te(()=>{d&&(h.current=d)},[d]);const u=en({...e,elements:{...s,...l&&{reference:l}}}),x=m.reactExports.useCallback(v=>{const R=T(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),getClientRects:()=>v.getClientRects(),contextElement:v}:v;a(R),u.refs.setReference(R)},[u.refs]),E=m.reactExports.useCallback(v=>{(T(v)||v===null)&&(h.current=v,r(v)),(T(u.refs.reference.current)||u.refs.reference.current===null||v!==null&&!T(v))&&u.refs.setReference(v)},[u.refs]),y=m.reactExports.useMemo(()=>({...u.refs,setReference:E,setPositionReference:x,domReference:h}),[u.refs,E,x]),w=m.reactExports.useMemo(()=>({...u.elements,domReference:d}),[u.elements,d]),b=m.reactExports.useMemo(()=>({...u,...n,refs:y,elements:w,nodeId:t}),[u,y,w,t,n]);return Te(()=>{n.dataRef.current.floatingContext=b;const v=p==null?void 0:p.nodesRef.current.find(R=>R.id===t);v&&(v.context=b)}),m.reactExports.useMemo(()=>({...u,context:b,refs:y,elements:w}),[u,y,w,b])}const gn={alwaysDoFocusManagement:!1,ariaControls:!0,autoCollapse:!1,collapseOnFocusOut:!1,collapseOnMouseOut:!1,collapseOnClickOut:!1,collapseOnHostReFocus:!1,contentSelector:".expander__content",expandedClass:null,expandOnClick:!1,expandOnFocus:!1,expandOnHover:!1,focusManagement:null,hostSelector:".expander__host",simulateSpacebarClick:!1};function En(e){(e.keyCode===13||e.keyCode===32)&&(this._keyboardClickFlag=!0),e.keyCode===32&&this.options.simulateSpacebarClick===!0&&this.hostEl.click()}function wn(){this._mouseClickFlag=!0}function yn(){this._expandWasKeyboardClickActivated=this._keyboardClickFlag,this._expandWasMouseClickActivated=this._mouseClickFlag,this._widgetHasKeyboardFocus=this._keyboardClickFlag,this.expanded=!this.expanded}function bn(){this._expandWasFocusActivated=!0,this.expanded=!0}function Rn(){this.expanded&&this._widgetHasKeyboardFocus&&(this.expanded=!1)}function _n(){clearTimeout(this._mouseLeft),this._expandWasHoverActivated=!0,this.expanded=!0}function On(){this._widgetHasKeyboardFocus=!1,this.expanded=!1}function Cn(){clearTimeout(this._mouseLeft),this._mouseLeft=setTimeout(()=>{this.expanded=!1},300)}function Ln(e){this.el.contains(e.target)===!1&&(this.expanded=!1)}function kn(){this.documentClick=!0}function An(){this.documentClick=!1}function Tn(e){this.documentClick===!0&&(this.documentClick=!1,this.el.contains(e.target)===!1&&(this.expanded=!1))}function Sn(e,t){var o,n;if(e==="content")t.setAttribute("tabindex","-1"),t.focus();else if(e==="focusable")(o=He.index_default(t)[0])==null||o.focus();else if(e==="interactive")(n=He.index_default(t,!0)[0])==null||n.focus();else if(e!==null){const s=t.querySelector(`#${e}`);s&&s.focus()}}class G{constructor(t,o){this.options=Object.assign({},gn,o),this.el=t,this.hostEl=t.querySelector(this.options.hostSelector),this.contentEl=t.querySelector(this.options.contentSelector),Ne.addFocusExit(this.el),this._hostKeyDownListener=En.bind(this),this._hostMouseDownListener=wn.bind(this),this._documentClickListener=Ln.bind(this),this._documentTouchStartListener=kn.bind(this),this._documentTouchMoveListener=An.bind(this),this._documentTouchEndListener=Tn.bind(this),this._hostClickListener=yn.bind(this),this._hostFocusListener=bn.bind(this),this._hostReFocusListener=Rn.bind(this),this._hostHoverListener=_n.bind(this),this._focusExitListener=On.bind(this),this._mouseLeaveListener=Cn.bind(this),this.hostEl.getAttribute("aria-expanded")===null&&this.hostEl.setAttribute("aria-expanded","false"),this.options.ariaControls===!0&&(Ne.index_default(this.el,"expander"),this.contentEl.id=this.contentEl.id||`${this.el.id}-content`,this.hostEl.setAttribute("aria-controls",this.contentEl.id)),this.expandOnClick=this.options.expandOnClick,this.expandOnFocus=this.options.expandOnFocus,this.expandOnHover=this.options.expandOnHover,this.collapseOnHostReFocus=this.options.collapseOnHostReFocus,this.options.autoCollapse===!1&&(this.collapseOnClickOut=this.options.collapseOnClickOut,this.collapseOnFocusOut=this.options.collapseOnFocusOut,this.collapseOnMouseOut=this.options.collapseOnMouseOut)}set expandOnClick(t){t===!0?(this.hostEl.addEventListener("keydown",this._hostKeyDownListener),this.hostEl.addEventListener("mousedown",this._hostMouseDownListener),this.hostEl.addEventListener("click",this._hostClickListener),this.options.autoCollapse===!0&&(this.collapseOnClickOut=!0,this.collapseOnFocusOut=!0)):(this.hostEl.removeEventListener("click",this._hostClickListener),this.hostEl.removeEventListener("mousedown",this._hostMouseDownListener),this.hostEl.removeEventListener("keydown",this._hostKeyDownListener))}set expandOnFocus(t){t===!0?(this.hostEl.addEventListener("focus",this._hostFocusListener),this.options.autoCollapse===!0&&(this.collapseOnClickOut=!0,this.collapseOnFocusOut=!0)):this.hostEl.removeEventListener("focus",this._hostFocusListener)}set collapseOnHostReFocus(t){t===!0?this.hostEl.addEventListener("focus",this._hostReFocusListener):this.hostEl.removeEventListener("focus",this._hostReFocusListener)}set expandOnHover(t){t===!0?(this.hostEl.addEventListener("mouseenter",this._hostHoverListener),this.contentEl.addEventListener("mouseenter",this._hostHoverListener),this.options.autoCollapse===!0&&(this.collapseOnMouseOut=!0)):(this.hostEl.removeEventListener("mouseenter",this._hostHoverListener),this.contentEl.removeEventListener("mouseenter",this._hostHoverListener))}set collapseOnClickOut(t){t===!0?(document.addEventListener("click",this._documentClickListener),document.addEventListener("touchstart",this._documentTouchStartListener),document.addEventListener("touchmove",this._documentTouchMoveListener),document.addEventListener("touchend",this._documentTouchEndListener)):(document.removeEventListener("click",this._documentClickListener),document.removeEventListener("touchstart",this._documentTouchStartListener),document.removeEventListener("touchmove",this._documentTouchMoveListener),document.removeEventListener("touchend",this._documentTouchEndListener))}set collapseOnFocusOut(t){t===!0?this.el.addEventListener("focusExit",this._focusExitListener):this.el.removeEventListener("focusExit",this._focusExitListener)}set collapseOnMouseOut(t){t===!0?(this.el.addEventListener("mouseleave",this._mouseLeaveListener),this.contentEl.addEventListener("mouseleave",this._mouseLeaveListener)):(this.el.removeEventListener("mouseleave",this._mouseLeaveListener),this.contentEl.removeEventListener("mouseleave",this._mouseLeaveListener))}get expanded(){return this.hostEl.getAttribute("aria-expanded")==="true"}set expanded(t){t===!0&&this.expanded===!1&&(this.hostEl.setAttribute("aria-expanded","true"),this.options.expandedClass&&this.el.classList.add(this.options.expandedClass),(this._expandWasKeyboardClickActivated||this._expandWasMouseClickActivated&&this.options.alwaysDoFocusManagement)&&Sn(this.options.focusManagement,this.contentEl),this.el.dispatchEvent(new CustomEvent("expander-expand",{bubbles:!0,detail:this.contentEl}))),t===!1&&this.expanded===!0&&(this.hostEl.setAttribute("aria-expanded","false"),this.options.expandedClass&&this.el.classList.remove(this.options.expandedClass),this.el.dispatchEvent(new CustomEvent("expander-collapse",{bubbles:!0,detail:this.contentEl}))),this._expandWasKeyboardClickActivated=!1,this._expandWasMouseClickActivated=!1,this._expandWasFocusActivated=!1,this._expandWasHoverActivated=!1,this._keyboardClickFlag=!1,this._mouseClickFlag=!1}sleep(){this._destroyed!==!0&&(this.expandOnClick=!1,this.expandOnFocus=!1,this.expandOnHover=!1,this.collapseOnClickOut=!1,this.collapseOnFocusOut=!1,this.collapseOnMouseOut=!1,this.collapseOnHostReFocus=!1)}destroy(){this.sleep(),this._destroyed=!0,this._hostKeyDownListener=null,this._hostMouseDownListener=null,this._documentClickListener=null,this._documentTouchStartListener=null,this._documentTouchMoveListener=null,this._documentTouchEndListener=null,this._hostClickListener=null,this._hostFocusListener=null,this._hostReFocusListener=null,this._hostHoverListener=null,this._focusExitListener=null,this._mouseLeaveListener=null,this._widgetHasKeyboardFocus=null}}var Je;const{default:Fn=G}=(Je=G==null?void 0:G.default)!=null&&Je.__esModule?G.default:G;function Pn({open:e,options:t}){var o;const{floatingStyles:n,refs:s}=vn({placement:t!=null&&t.reverse?"bottom-end":"bottom-start",open:e,middleware:[tn((o=t==null?void 0:t.offset)!==null&&o!==void 0?o:4),on(),nn()],whileElementsMounted:Jt});return{overlayStyles:n,refs:{host:s.reference,overlay:s.floating,setHost:s.setReference,setOverlay:s.setFloating}}}function Dn({ref:e,expanded:t,options:o,onExpand:n,onCollapse:s},i){const r=m.reactExports.useRef(null),l=m.reactExports.useSyncExternalStore(a=>{var f,d;function h(){a(),n==null||n()}function p(){a(),s==null||s()}return(f=e.current)===null||f===void 0||f.addEventListener("expander-expand",h),(d=e.current)===null||d===void 0||d.addEventListener("expander-collapse",p),()=>{var u,x;(u=e.current)===null||u===void 0||u.removeEventListener("expander-expand",h),(x=e.current)===null||x===void 0||x.removeEventListener("expander-collapse",p)}},()=>{var a;return(a=r.current)===null||a===void 0?void 0:a.expanded},()=>!1);return m.reactExports.useEffect(()=>(e.current&&(r.current=new Fn(e.current,o)),()=>{var a;(a=r.current)===null||a===void 0||a.destroy()}),i||[]),m.reactExports.useEffect(()=>{r.current&&t!==void 0&&(r.current.expanded=t)},[t]),{isExpanded:l,expand:()=>{r.current&&(r.current.expanded=!0)},collapse:()=>{r.current&&(r.current.expanded=!1)}}}function Mn({ref:e,focusElementRef:t,itemContainerRef:o,onChange:n=()=>null,disabled:s,options:i}){const r=m.reactExports.useRef(null);return m.reactExports.useEffect(()=>{const l=a=>{const f={toIndex:a.detail.toIndex};n(a,f)};return s||(r.current=ft.createLinear(e.current,t?t.current:e.current,o?o.current:e.current,"[role=option]",i),e.current.addEventListener("activeDescendantChange",l)),()=>{var a,f,d;(a=r.current)===null||a===void 0||a.reset(),(f=r.current)===null||f===void 0||f.destroy(),(d=e.current)===null||d===void 0||d.removeEventListener("activeDescendantChange",l)}},[s,n]),{setIndex(l){r.current.index=l},getIndex(){return r.current.index}}}exports.index_default=G;exports.useActiveDescendant=Mn;exports.useExpander=Dn;exports.useFloatingDropdown=Pn;
|
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 R=require("../tslib.es6-UTo0M824.js"),T=require("../index-DmNrJCd8.js"),i=require("../index-Banoekuf.js"),g=require("../ebay-details/index.js"),D=require("../utils-D1rplbEN.js"),_=t=>{var{size:E,autoCollapse:b,className:f,children:p,onToggle:a,"aria-roledescription":m="accordion"}=t,v=R.__rest(t,["size","autoCollapse","className","children","onToggle","aria-roledescription"]);const c=i.reactExports.useRef(null),n=D.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)=>i.React.cloneElement(e,{onToggle:(u,{open:o})=>{var l,y,r;if(console.log("YAYA",{open:o}),b&&o){const s=(l=c.current)===null||l===void 0?void 0:l.querySelectorAll("details");s==null||s.forEach((A,q)=>{q!==d&&(A.open=!1)})}(r=(y=e.props).onToggle)===null||r===void 0||r.call(y,u,{open:o}),a==null||a(u,{open:o,index:d})},layout:"accordion"}));return i.React.createElement("ul",Object.assign({},v,{ref:c,className:T.classNames("accordion",f,{"accordion--large":E==="large"}),"aria-roledescription":m}),h.map(e=>i.React.createElement("li",{key:e.key},e)))};exports.EbayDetails=g.EbayDetails;exports.EbayAccordion=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../tslib.es6-UTo0M824.js"),e=require("../index-Banoekuf.js"),u=require("../index-DmNrJCd8.js"),n=require("../ebay-dialog-base/index.js");require("../ebay-icon-button/index.js");const g=require("../ebay-button/index.js"),a="alert-dialog",f=o=>{var{a11yCloseText:s="Close Dialog",confirmText:l,onConfirm:c=()=>{}}=o,t=m.__rest(o,["a11yCloseText","confirmText","onConfirm"]);const r=e.reactExports.useRef(null),d="alert-dialog-confirm",i="alert-dialog-main";return e.React.createElement(n.DialogBaseWithState,Object.assign({focus:r},t,{a11yCloseText:s,role:"alertdialog",classPrefix:a,ignoreEscape:!0,mainId:i,buttonPosition:"hidden",className:u.classNames(t.className,`${a}--mask-fade`),windowClass:`${a}__window ${a}__window--animate`}),t.children,e.React.createElement(n.EbayDialogFooter,null,e.React.createElement(g.EbayButton,{priority:"primary","aria-describedby":i,onClick:c,ref:r,id:d,className:"alert-dialog__acknowledge"},l)))};exports.EbayAlertDialog=f;
|
package/ebay-avatar/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../tslib.es6-UTo0M824.js"),r=require("../index-Banoekuf.js"),y=require("../index-DmNrJCd8.js"),A=require("../index-plT9bPAi.js"),C=require("../utils-D1rplbEN.js"),u=["teal","light-teal","green","lime","yellow","orange","magenta","pink"];function I(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.React.createElement("img",Object.assign({},e));function d(e){return e&&(e<3/4||e<4/3)}const R=e=>{var{size:o,color:n,username:t,children:a,className:g,knownAspectRatio:m}=e,h=E.__rest(e,["size","color","username","children","className","knownAspectRatio"]);const[b,f]=r.reactExports.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.React.createElement("div",Object.assign({},h,{role:"img",className:y.classNames("avatar",g,o&&`avatar--${o}`,b==="fit"&&"avatar--fit",t&&!s&&`avatar--${I(t,n)}`)}),r.React.Children.count(a)>0?s&&r.React.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.React.createElement(A.EbayIcon,{name:"avatarSignedOut"}))};exports.EbayAvatar=R;exports.EbayAvatarImage=v;
|
package/ebay-badge/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../tslib.es6-UTo0M824.js"),c=require("../index-Banoekuf.js"),d=require("../index-DmNrJCd8.js"),l=s=>{var{number:r,type:a="img",className:t}=s,n=i.__rest(s,["number","type","className"]);const e=Math.round(parseInt(String(r),10));return e<=0?null:c.React.createElement("span",Object.assign({},n,{className:d.classNames("badge",t),role:a==="img"?"img":void 0,"aria-hidden":a!=="img"}),e>99?"99+":e)};exports.EbayBadge=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../tslib.es6-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../tslib.es6-UTo0M824.js"),e=require("../index-Banoekuf.js"),x=require("../index-DmNrJCd8.js"),f=require("../index-plT9bPAi.js"),k=t=>{var{a11yHeadingText:n="Page navigation",a11yHeadingTag:r="h2",id:o="ebay-breadcrumb",children:a=[],className:l,onSelect:d=()=>{}}=t,c=m.__rest(t,["a11yHeadingText","a11yHeadingTag","id","children","className","onSelect"]);const s=`${o}-breadcrumbs-heading`,b=e.reactExports.Children.count(a)-1,u=r,g=e.reactExports.Children.toArray(a).some(i=>i.props.href)?"a":"button";return e.React.createElement("nav",Object.assign({},c,{"aria-labelledby":s,className:x.classNames("breadcrumbs",l),role:"navigation"}),e.React.createElement(u,{id:s,className:"clipped"},n),e.React.createElement("ul",null,e.reactExports.Children.map(a,(i,h)=>{const y=h===b,{href:E,children:p}=i.props,I={tag:g,isLastItem:y,href:E,children:p,onClick:v=>d(v)};return e.reactExports.cloneElement(i,I)})))},C=t=>{var{tag:n="button",isLastItem:r=!1,href:o,children:a,onClick:l}=t,d=m.__rest(t,["tag","isLastItem","href","children","onClick"]);const c=n==="a",s=Object.assign(Object.assign(Object.assign({},d),r?{"aria-current":"location"}:{}),{href:c?o:void 0,onClick:c?void 0:l});return e.React.createElement("li",null,e.React.createElement(n,Object.assign({},s),a),!r&&e.React.createElement(f.EbayIcon,{name:"chevronRight12"}))};exports.EbayBreadcrumbItem=C;exports.EbayBreadcrumbs=k;
|
package/ebay-button/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("../tslib.es6-UTo0M824.js"),a=require("../index-Banoekuf.js"),S=require("../index-DmNrJCd8.js"),F=require("../forwardRef-BGhnwltg.js");require("../array.polyfill.flat-5BAolFdk.js");const u=require("../index-plT9bPAi.js"),H=require("../ebay-progress-spinner/index.js"),L={cta:"cta-",fake:"fake-",expand:"expand-",default:""},y=t=>{var{type:n="default",children:r}=t,s=D.__rest(t,["type","children"]);return a.React.createElement("span",Object.assign({className:`${L[n]}btn__cell`},s),a.React.createElement(a.React.Fragment,null,r))},A=()=>a.React.createElement(y,null,a.React.createElement(H.EbayProgressSpinner,null)),T=({className:t,children:n})=>a.React.createElement("span",{className:S.classNames(t,"btn__text")},n),M=({children:t})=>t?a.React.createElement(y,null,a.React.createElement(T,null,t),a.React.createElement(u.EbayIcon,{name:"chevronDown12"})):a.React.createElement(u.EbayIcon,{name:"chevronDown12"}),G=t=>{var{priority:n="secondary",variant:r="standard",size:s,bodyState:b,split:B,transparent:N=!1,fluid:q=!1,disabled:f,partiallyDisabled:_,children:l,onKeyDown:k=()=>{},onEscape:C=()=>{},truncate:I=!1,href:o,className:O,forwardedRef:m,borderless:p,fixedHeight:E}=t,$=D.__rest(t,["priority","variant","size","bodyState","split","transparent","fluid","disabled","partiallyDisabled","children","onKeyDown","onEscape","truncate","href","className","forwardedRef","borderless","fixedHeight"]);const e=o?"fake-btn":"btn",j={primary:`${e}--primary`,secondary:`${e}--secondary`,tertiary:`${e}--tertiary`,none:""},i={large:`${e}--large`,small:`${e}--small`},K={start:`${e}--split-start`,end:`${e}--split-end`},P=r==="destructive",d=r==="form",g=b==="loading",R=b==="expand",z=d&&(Q(l)||R&&!l),h=S.classNames(e,O,j[d||p?"none":n],i[s],K[B],P&&`${e}--destructive`,d&&`${e}--form`,z&&`${e}--slim`,N&&`${e}--transparent`,q&&`${e}--fluid`,I&&`${e}--truncated`,p&&`${e}--borderless`,E&&(i[s]?`${i[s]}-${E}`:`${e}--fixed-height`)),x=c=>{k(c),(c.key==="Escape"||c.key==="Esc")&&C(c)},v=J(l,{isLoading:g,isExpand:R}),w=g?"polite":null;return o?a.React.createElement("a",Object.assign({className:h,href:f?void 0:o,ref:m,onKeyDown:x,"aria-live":w},$),v):a.React.createElement("button",Object.assign({disabled:f,"aria-disabled":_,"aria-live":w,className:h,ref:m,onKeyDown:x},$),v)};function J(t,{isLoading:n,isExpand:r}){switch(!0){case n:return a.React.createElement(A,null);case r:return a.React.createElement(M,null,t);default:return t}}function Q(t){const n=a.reactExports.Children.toArray(t);return n.length===1&&n[0].type===u.EbayIcon}const U=F.withForwardRef(G);exports.EbayButton=U;exports.EbayButtonCell=y;
|
package/ebay-calendar/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-Q8sL9uBq.js");exports.EbayCalendar=e.EbayCalendar;
|
package/ebay-carousel/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("../tslib.es6-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("../tslib.es6-UTo0M824.js"),s=require("../index-Banoekuf.js"),q=require("../index-DmNrJCd8.js"),ee=require("../index-plT9bPAi.js"),W=require("../debounce-BQsYxxOL.js"),ae=require("../index-B9dsnEky.js");require("../array.polyfill.flat-5BAolFdk.js");const ce=require("../reduced-motion-CBVd9_aJ.js"),le=require("../forwardRef-BGhnwltg.js"),ie={prev:"chevronLeft16",next:"chevronRight16"},ue={prev:"LEFT",next:"RIGHT"},Y=({type:e,label:n,hidden:t,disabled:r,onClick:c})=>{const l=a=>{c(a,{direction:ue[e]})};return s.React.createElement("button",{className:q.classNames("carousel__control",`carousel__control--${e}`),"aria-label":n,"aria-disabled":r,disabled:r,onClick:l},s.React.createElement(ee.EbayIcon,{className:q.classNames("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:c}=e.getBoundingClientRect();return{left:r-t,right:c-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},Ee=(e,n,t)=>e.length&&Math.min(e[n].left,I(e,t))||0,pe=(e,n,t,r,c,l)=>s.reactExports.Children.map(e,(a,u)=>{const{style:f={}}=a.props;let i;if(t){const o=t+t%1;i=`calc(${100/o}% - ${(o-1)*l/o}px)`}const d=t?u%t===0:!0;return s.reactExports.cloneElement(a,{slideWidth:r,offset:c,ref:o=>{n.current[u]=o},className:d?"carousel__snap-point":a.props.className,style:Object.assign(Object.assign({},f),{width:i||f.width,marginRight:l&&u!==s.reactExports.Children.count(e)-1?`${l}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},me=(e,n,t=e)=>{if(n)return Math.ceil(t/n)},he=e=>e==="LEFT"?-1:1,ye=(e,n,t,r,c)=>{let l=n,a;if(e==="LEFT"&&l===0)l=t.length-1;else{do{const u=he(e);a=t[l+=u]}while(a&&a.fullyVisible);if(e==="LEFT"&&!c){const u=a.right-r;do a=t[--l];while(a&&a.left>=u);l+=1}}return te(l,t,c)},xe=(e,n,t,r=1,c)=>{let l;if(e>=I(n,t)-c)l=n.length-1;else{const a=n.length;let u=0,f=Math.ceil(a/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);l=te((i>d?f:u)*r,n,r)}return l};function ge({direction:e,nextIndex:n,currentIndex:t,itemsRef:r,slideWidth:c,gap:l,onAnimationStart:a,onAnimationEnd:u}){if(e==="RIGHT"&&n<t){let i=r.current[t].element.closest("ul");i.style.transition="none";const d=I(r.current,c)+c+l;for(let o=t;o>n;o--)r.current[o].element.style.transform=`translateX(${-d}px)`;i.style.transform=`translate3d(${c+l}px, 0, 0)`,a(),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,c)+c+l;for(let o=t;o<n;o++)r.current[o].element.style.transform=`translateX(${d}px)`;i.style.transform=`translate3d(${-d}px, 0, 0)`,a(),requestAnimationFrame(()=>{i.style.transition="",i.style.transform=`translate3d(${-d+c+l}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 be=(e,n)=>{let t,r,c;return function l(){const{scrollLeft:a}=e;if(c!==a){c=a,t=setTimeout(()=>{r=requestAnimationFrame(l)},90);return}n(c)}(),()=>{clearTimeout(t),cancelAnimationFrame(r)}},ve=typeof window<"u"&&"scrollBehavior"in document.body.style;function ne(e,n,t){if(ve)return e.scrollTo({left:n}),be(e,t);let r,c,l=requestAnimationFrame(o=>{const{scrollLeft:C}=e,_=n-C,R=450;(function L(x){const g=x-o;if(g>R)return e.scrollLeft=n,a(),t();e.scrollLeft=Se(g/R)*_+C,l=requestAnimationFrame(L)})(o)});return e.addEventListener("touchstart",u),a;function a(){cancelAnimationFrame(l),r===void 0?i():(c&&c(),d())}function u(){a(),r=e.scrollLeft,e.addEventListener("touchend",f)}function f(){d(),r===e.scrollLeft&&(c=ne(e,n,t))}function i(){e.removeEventListener("touchstart",u)}function d(){e.removeEventListener("touchend",f)}}function Se(e){return e<.5?2*e*e:-1+(4-2*e)*e}const Te=({gap:e=16,itemsPerSlide:n,slideWidth:t,offset:r,activeIndex:c,nextControlDisabled:l,isAutoplayEnabled:a,className:u,itemsRef:f,children:i,onSetActiveIndex:d,onScroll:o})=>{const[C,_]=s.reactExports.useState(0),[R,L]=s.reactExports.useState(!1),[x,g]=s.reactExports.useState(!1),p=s.reactExports.useRef(null),b=s.reactExports.useRef(null);s.reactExports.useEffect(()=>{if(!s.reactExports.Children.count(i)||!p.current)return;if(R){L(!1);return}const h=p.current;de(h)?(g(!0),ne(h,r,()=>g(!1))):_(r)},[r]);const m=s.reactExports.useCallback(()=>{const N=p.current.scrollLeft,h=xe(N,f.current,t,n,e);h!==c&&(L(!0),d(h),o({index:h}))},[p.current,t,c,d]),M=()=>{b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{x||m()},640)};return s.React.createElement("div",{className:q.classNames("carousel__viewport",{"carousel__viewport--mask":!l&&!a},u)},s.React.createElement("ul",{className:"carousel__list",ref:p,onScroll:M,style:{transform:`translate3d(${-C}px, 0, 0)`}},pe(i,f,n,t,r,e)))},Ce=ae.reactDom.flushSync||(e=>e()),Re=e=>{var{gap:n=16,index:t=0,itemsPerSlide:r,a11yPreviousText:c,a11yNextText:l,a11yPauseText:a,a11yPlayText:u,autoplay:f,onScroll:i=()=>{},onNext:d=()=>{},onPrevious:o=()=>{},onSlide:C=()=>{},onPlay:_=()=>{},onPause:R=()=>{},className:L,children:x}=e,g=Z.__rest(e,["gap","index","itemsPerSlide","a11yPreviousText","a11yNextText","a11yPauseText","a11yPlayText","autoplay","onScroll","onNext","onPrevious","onSlide","onPlay","onPause","className","children"]);const[p,b]=s.reactExports.useState(t),[m,M]=s.reactExports.useState(0),[N,h]=s.reactExports.useState(0),[k,D]=s.reactExports.useState(!1),F=s.reactExports.useRef(null),v=s.reactExports.useRef([]),O=s.reactExports.Children.count(x),S=Math.floor(r)||void 0,j=O<=S,y=!!f,re=j||N===0&&!y,H=j||N===I(v.current,m)&&!y,V=()=>{if(!F.current)return;const{width:E}=F.current.getBoundingClientRect();M(E)};s.reactExports.useEffect(()=>(window.addEventListener("resize",W.debounce(V,16)),()=>{window.removeEventListener("resize",W.debounce(V,16))}),[]);const[G,X]=s.reactExports.useState(!1);s.reactExports.useEffect(()=>{G||h(Ee(v.current,p,m))},[p,m,G]),s.reactExports.useEffect(()=>{t>=0&&t<=O-1&&b(t)},[t]),s.reactExports.useEffect(()=>{v.current=v.current.splice(0,O)},[x]),s.reactExports.useEffect(()=>{const{width:E}=F.current.getBoundingClientRect();M(E)},[F.current]);const A=ce.useReducedMotion(),[w,U]=s.reactExports.useState(A);s.reactExports.useEffect(()=>{U(A)},[A]);const se=E=>{U(!w),w?_(E):R(E)},J=s.reactExports.useRef(p);J.current=p;const K=(E,T)=>{const P=J.current,z=ye(E,P,v.current,m,T),oe=me(P,T,z);C({slide:oe}),y&&ge({direction:E,nextIndex:z,currentIndex:P,itemsRef:v,slideWidth:m,gap:n,onAnimationStart:()=>X(!0),onAnimationEnd:()=>X(!1)}),Ce(()=>b(z))};s.reactExports.useEffect(()=>{if(!y||w||k)return;const T=setInterval(()=>{K("RIGHT",S)},typeof f=="number"?f:4e3);return()=>clearInterval(T)},[y,w,S,k]);const Q=(E,{direction:T})=>{K(T,S),T==="LEFT"?o(E):d(E)},$=()=>D(!0),B=()=>D(!1);return s.React.createElement("div",Object.assign({className:q.classNames("carousel",L,{"carousel--slides":S,"carousel--peek":S%1===0,carousel__autoplay:y})},g),s.React.createElement("div",{ref:F,className:"carousel__container",onFocusCapture:$,onMouseEnter:$,onTouchStartCapture:$,onBlurCapture:B,onMouseLeave:B,onTouchEndCapture:B},s.React.createElement(Y,{label:c,type:"prev",disabled:re,onClick:Q}),s.React.createElement(Te,{itemsRef:v,offset:N,gap:n,itemsPerSlide:S,nextControlDisabled:H,isAutoplayEnabled:y,activeIndex:p,onScroll:i,onSetActiveIndex:b,slideWidth:m},x),s.React.createElement(Y,{type:"next",label:l,disabled:H,onClick:Q}),y?s.React.createElement("button",{className:"carousel__playback",type:"button",onClick:se,"aria-label":w?u:a},s.React.createElement(ee.EbayIcon,{name:w?"play24":"pause24"})):null))},Le=e=>{var{slideWidth:n,offset:t,forwardedRef:r,children:c}=e,l=Z.__rest(e,["slideWidth","offset","forwardedRef","children"]);const a=s.reactExports.useRef(null),[u,f]=s.reactExports.useState(!1);return s.reactExports.useImperativeHandle(r,()=>{if(!a.current)return;const{left:i,right:d}=fe(a.current),o=i===void 0||i-t>=-.01&&d-t<=n+.01;return f(o),{element:a.current,left:i,right:d,fullyVisible:o}},[n,t]),s.React.createElement("li",Object.assign({},l,{ref:a,"aria-hidden":!u}),c)},Ne=le.withForwardRef(Le);exports.EbayCarousel=Re;exports.EbayCarouselItem=Ne;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# EbayCCD
|
|
2
|
+
|
|
3
|
+
## Demo
|
|
4
|
+
|
|
5
|
+
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/graphics-icons-ebayccd--default)
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
### Import JS
|
|
10
|
+
|
|
11
|
+
```jsx harmony
|
|
12
|
+
import { EbayCCD } from "@ebay/ui-core-react/ebay-ccd";
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Import following styles from SKIN
|
|
16
|
+
|
|
17
|
+
```jsx harmony
|
|
18
|
+
import "@ebay/skin/ccd";
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### If tokens haven't been added to the project at a higher level, make sure to import
|
|
22
|
+
|
|
23
|
+
```jsx harmony
|
|
24
|
+
import "@ebay/skin/tokens";
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Or import styles using SCSS/CSS
|
|
28
|
+
|
|
29
|
+
```jsx harmony
|
|
30
|
+
import "@ebay/skin/ccd.css";
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Import icons
|
|
34
|
+
|
|
35
|
+
Add the below icons to the `EbaySvg` component.
|
|
36
|
+
|
|
37
|
+
Note: Make sure that `EbaySvg` is only rendered on the server so it does not affect the client bundle size.
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
<EbaySvg
|
|
41
|
+
icons={[
|
|
42
|
+
"ccdChargerIncluded",
|
|
43
|
+
"ccdChargerNotIncluded",
|
|
44
|
+
"ccdTop",
|
|
45
|
+
]}
|
|
46
|
+
/>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
```jsx harmony
|
|
50
|
+
<EbayCCD chargerIcon="included" max="2000" min="1000" units="W" secondaryType="usbpd" secondaryText="USB PD" />
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Attributes
|
|
54
|
+
|
|
55
|
+
| Name | Type | Required | Description | Data |
|
|
56
|
+
| -------------- | -------- | -------- | ----------------------------------------------------------------------- | --------------------------------- |
|
|
57
|
+
| `max` | String | No | The maximum range | |
|
|
58
|
+
| `min` | String | No | The minimum range | |
|
|
59
|
+
| `chargerIcon` | String | No | Toggles the charger icon visible or if its included or not | `included`, `not-included` |
|
|
60
|
+
| `units` | String | No | The units of the rating | |
|
|
61
|
+
| `secondaryType`| String | No | Toggles the usbpd secondary text | `none`, `usbpd` |
|
|
62
|
+
| `secondaryText`| String | No | The text used for secondary text | |
|
|
63
|
+
| `a11yUnits` | String | No | The units for the rating used for a11y | |
|
|
64
|
+
| `a11yText` | String | No | Overrides the default aria-label text | |
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComponentProps, FC } from 'react';
|
|
2
|
+
type CCDProps = ComponentProps<'div'> & {
|
|
3
|
+
max?: string;
|
|
4
|
+
min?: string;
|
|
5
|
+
chargerIcon?: 'included' | 'not-included';
|
|
6
|
+
units?: string;
|
|
7
|
+
secondaryType?: 'usbpd' | 'none';
|
|
8
|
+
secondaryText?: string;
|
|
9
|
+
a11yUnits?: string;
|
|
10
|
+
a11yText?: string;
|
|
11
|
+
};
|
|
12
|
+
declare const EbayCCD: FC<CCDProps>;
|
|
13
|
+
export default EbayCCD;
|
|
14
|
+
//# sourceMappingURL=ccd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ccd.d.ts","sourceRoot":"","sources":["../../src/ebay-ccd/ccd.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIlD,KAAK,QAAQ,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACpC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,UAAU,GAAG,cAAc,CAAC;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,QAAA,MAAM,OAAO,EAAE,EAAE,CAAC,QAAQ,CAsCzB,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-ccd/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../tslib.es6-UTo0M824.js"),e=require("../index-Banoekuf.js"),t=require("../index-plT9bPAi.js"),h=require("../index-DmNrJCd8.js"),C=r=>{var{max:a,min:c,chargerIcon:n,units:l="W",secondaryType:d="none",secondaryText:s="USB PD",a11yUnits:o="watts","aria-label":m,className:u}=r,y=_.__rest(r,["max","min","chargerIcon","units","secondaryType","secondaryText","a11yUnits","aria-label","className"]);const i=d==="usbpd",b=n?`Charger ${n==="included"?"":"not "}included.`:"",g=c||a?`${c} - ${a} ${o}. ${i?s:""}`:"",E=`${b} ${g}`.trim();return e.React.createElement("div",Object.assign({},y,{role:"figure","aria-label":m||E,className:h.classNames("ccd",u)}),n==="included"&&e.React.createElement(t.EbayIcon,{name:"ccdChargerIncluded",className:"ccd__charger-icon"}),n==="not-included"&&e.React.createElement(t.EbayIcon,{name:"ccdChargerNotIncluded",className:"ccd__charger-icon"}),(c||a)&&e.React.createElement("div",{className:"ccd__description-figure"},e.React.createElement(t.EbayIcon,{name:"ccdTop",className:"ccd__top-icon"}),e.React.createElement("div",{className:"ccd__body"},e.React.createElement("div",null,c," - ",a),e.React.createElement("div",null,l),i&&e.React.createElement("div",null,s))))};exports.EbayCCD=C;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# EbayCharacterCount
|
|
2
|
+
|
|
3
|
+
## Demo
|
|
4
|
+
|
|
5
|
+
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/building-blocks-ebay-character-count--default)
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
### Import JS
|
|
10
|
+
|
|
11
|
+
```jsx harmony
|
|
12
|
+
import { EbayCharacterCount } from "@ebay/ui-core-react/ebay-character-count";
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Import following styles from SKIN
|
|
16
|
+
|
|
17
|
+
```jsx harmony
|
|
18
|
+
import "@ebay/skin/character-count";
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### If tokens haven't been added to the project at a higher level, make sure to import
|
|
22
|
+
|
|
23
|
+
```jsx harmony
|
|
24
|
+
import "@ebay/skin/tokens";
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Or import styles using SCSS/CSS
|
|
28
|
+
|
|
29
|
+
```jsx harmony
|
|
30
|
+
import "@ebay/skin/character-count.css";
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```jsx harmony
|
|
34
|
+
<EbayCharacterCount value="Hello world" max={120} clippedText="characters remaining" />
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Attributes
|
|
38
|
+
|
|
39
|
+
| Name | Type | Required | Description | Data |
|
|
40
|
+
| ------------ | -------- | -------- | --------------------------------------------------------------------------- | ---------------------------- |
|
|
41
|
+
| `value` | String | Yes | String to count characters from, or a number representing the current count | |
|
|
42
|
+
| `max` | Number | Yes | Maximum number of characters allowed | |
|
|
43
|
+
| `clippedText`| String | No | Text to be displayed after the character count | |
|
|
44
|
+
| `onChange` | Function | No | Triggered when the character count changes | `({ count, inputAriaLive })` |
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FC, ComponentProps } from 'react';
|
|
2
|
+
export type CharacterCountEvent = {
|
|
3
|
+
count: number;
|
|
4
|
+
inputAriaLive: 'polite' | 'off';
|
|
5
|
+
};
|
|
6
|
+
export type EbayCharacterCountProps = ComponentProps<'span'> & {
|
|
7
|
+
max: number;
|
|
8
|
+
clippedText?: string;
|
|
9
|
+
value?: string | number;
|
|
10
|
+
onChange?: (event: CharacterCountEvent) => void;
|
|
11
|
+
};
|
|
12
|
+
declare const EbayCharacterCount: FC<EbayCharacterCountProps>;
|
|
13
|
+
export default EbayCharacterCount;
|
|
14
|
+
//# sourceMappingURL=character-count.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"character-count.d.ts","sourceRoot":"","sources":["../../src/ebay-character-count/character-count.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAuB,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvE,MAAM,MAAM,mBAAmB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,QAAQ,GAAG,KAAK,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG;IAC3D,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACnD,CAAC;AAYF,QAAA,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAyCnD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-character-count/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAClE,YAAY,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../tslib.es6-UTo0M824.js"),t=require("../index-Banoekuf.js"),s=e=>typeof e=="string"?[...e].length:typeof e=="number"?e:0,d=e=>{var{children:o,max:n,clippedText:u,value:r,onChange:c}=e,i=f.__rest(e,["children","max","clippedText","value","onChange"]);const[l,p]=t.reactExports.useState(s(r));return t.reactExports.useEffect(()=>{const m=setTimeout(()=>{const a=s(r);p(a),c&&c({count:a,inputAriaLive:a>=n?"polite":"off"})},500);return()=>clearTimeout(m)},[r,n,c]),t.React.createElement("span",Object.assign({},i),o||t.React.createElement(t.React.Fragment,null,l,"/",n,u&&t.React.createElement("span",{className:"clipped"},u)))};exports.EbayCharacterCount=d;
|
package/ebay-checkbox/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("../tslib.es6-UTo0M824.js"),c=require("../index-Banoekuf.js"),q=require("../index-DmNrJCd8.js"),a=require("../index-plT9bPAi.js"),F=require("../label-ACiBnv5P.js"),I=require("../utils-D1rplbEN.js"),O=t=>typeof t<"u",w=t=>{var{id:d,size:o="default",className:h,style:u,checked:r,defaultChecked:k=!1,onChange:b=()=>{},onFocus:m=()=>{},onKeyDown:g=()=>{},children:i,inputRef:v}=t,x=j.__rest(t,["id","size","className","style","checked","defaultChecked","onChange","onFocus","onKeyDown","children","inputRef"]);const[y,C]=c.reactExports.useState(k),E=n=>{const e=n.target;b(n,{value:e==null?void 0:e.value,checked:!!(e!=null&&e.checked)}),C(e==null?void 0:e.checked)},p=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)})},_=n=>{const e=n.target;g(n,{value:e.value,checked:!!e.checked})},f=q.classNames("checkbox",h,{"checkbox--large":o==="large"}),R=o==="large"?c.React.createElement(a.EbayIcon,{name:"checkboxChecked24",className:"checkbox__checked"}):c.React.createElement(a.EbayIcon,{name:"checkboxChecked18",className:"checkbox__checked"}),N=o==="large"?c.React.createElement(a.EbayIcon,{name:"checkboxUnchecked24",className:"checkbox__unchecked"}):c.React.createElement(a.EbayIcon,{name:"checkboxUnchecked18",className:"checkbox__unchecked"}),s=I.findComponent(i,F.Label);return c.React.createElement(c.React.Fragment,null,c.React.createElement("span",{className:f,style:Object.assign(Object.assign({},u),{alignItems:"center"})},c.React.createElement("input",Object.assign({},x,{id:d,className:"checkbox__control",type:"checkbox",checked:O(r)?r:y,onChange:E,onFocus:p,onKeyDown:_,ref:v})),c.React.createElement("span",{className:"checkbox__icon",hidden:!0},R,N)),s?c.reactExports.cloneElement(s,Object.assign(Object.assign({},s.props),{position:"end",htmlFor:d})):i)};exports.EbayCheckbox=w;
|
package/ebay-chip/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../tslib.es6-UTo0M824.js"),e=require("../index-Banoekuf.js"),o=require("../random-id-5bEmzZsS.js");require("../array.polyfill.flat-5BAolFdk.js");const b=require("../index-plT9bPAi.js"),d=t=>{var{a11yDeleteButtonText:a,onDelete:c,disabled:r,children:s}=t,i=l.__rest(t,["a11yDeleteButtonText","onDelete","disabled","children"]);const n=o.useRandomId();return e.React.createElement("span",Object.assign({},i,{className:"chip"}),e.React.createElement("span",{id:n,className:"ebay-chip__text"},s),a?e.React.createElement("button",{type:"button",className:"chip__button","aria-label":a,"aria-describedby":n,disabled:r,onClick:c},e.React.createElement(b.EbayIcon,{name:"close12"})):null)};exports.EbayChip=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("../tslib.es6-UTo0M824.js"),o=require("../index-Banoekuf.js"),_=require("../index-DmNrJCd8.js"),r=require("../ebay-combobox/index.js"),N=require("../utils-D1rplbEN.js"),T=require("../ebay-chip/index.js");require("../hooks-BsnjMXtj.js");require("../array.polyfill.flat-5BAolFdk.js");require("../dropdown-DyNGEyy6.js");const B=i=>{var{className:h,fluid:x,error:y,disabled:c,selected:a,defaultSelected:u,a11yDeleteButtonText:C="Remove",onChange:n,children:f}=i,E=D.__rest(i,["className","fluid","error","disabled","selected","defaultSelected","a11yDeleteButtonText","onChange","children"]);const S=N.filterByType(f,r.EbayComboboxOption),[g,b]=o.reactExports.useState(u||[]),l=a||g,[v,d]=o.reactExports.useState(""),p=o.React.useRef(null),m=(e,t)=>{const s=[...l,t];b(s),n==null||n(e,{selected:[...s]}),d("")},w=(e,t)=>{const s=l.filter((I,q)=>q!==t);b(s),n==null||n(e,{selected:[...s]})},O=e=>{if(e.key==="Enter"){const t=e.target.value;e.preventDefault(),t&&!l.includes(t)&&m(e,t)}},R=(e,t)=>{d(t.currentInputValue)};if(a&&u)throw new Error('EbayChipsCombobox: You cannot use "selected" and "defaultSelected" at the same time.');if(a&&!n)throw new Error('EbayChipsCombobox: You must provide an "onChange" prop when using the "selected" prop.');return o.React.createElement("span",{ref:p,className:_.classNames(h,"chips-combobox",{"chips-combobox--fluid":x,"chips-combobox--error":y}),"aria-disabled":c?"true":void 0},l.length?o.React.createElement("ul",{className:"chips-combobox__items"},l.map((e,t)=>o.React.createElement("li",{key:t},o.React.createElement(T.EbayChip,{a11yDeleteButtonText:`${C} ${e}`,onDelete:s=>w(s,t),disabled:c},e)))):null,o.React.createElement(r.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:R,onKeyDown:O}),S.filter(e=>!l.includes(e.props.text))))};exports.EbayComboboxOption=r.EbayComboboxOption;exports.EbayChipsCombobox=B;
|
package/ebay-combobox/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("../tslib.es6-UTo0M824.js"),n=require("../index-Banoekuf.js"),f=require("../index-DmNrJCd8.js"),be=require("../hooks-BsnjMXtj.js"),M=require("../utils-D1rplbEN.js"),w=require("../dropdown-DyNGEyy6.js"),T=l=>{var{className:p}=l,d=I.__rest(l,["className"]);return n.React.createElement("button",Object.assign({className:f.classNames("icon-btn","icon-btn--transparent",p)},d))},j=l=>{var{text:p,className:d,selected:C}=l,r=I.__rest(l,["text","className","selected"]);return n.React.createElement("div",Object.assign({},r,{role:"option",className:f.classNames("combobox__option",d),tabIndex:-1,"aria-selected":C}),p)},xe=l=>{var{className:p,floatingLabel:d,fluid:C,expanded:r,borderless:K,autocomplete:v="none",listSelection:V="automatic",defaultValue:A="",value:g,placeholder:H,opaqueLabel:P,children:N,dropdownRef:U,onFocus:Y=()=>{},onClick:$=()=>{},onExpand:z=()=>{},onCollapse:G=()=>{},onInputChange:k=()=>{},onFloatingLabelInit:J=()=>{},onChange:Q=()=>{},onSelect:W=()=>{},onKeyDown:X=()=>{}}=l,h=I.__rest(l,["className","floatingLabel","fluid","expanded","borderless","autocomplete","listSelection","defaultValue","value","placeholder","opaqueLabel","children","dropdownRef","onFocus","onClick","onExpand","onCollapse","onInputChange","onFloatingLabelInit","onChange","onSelect","onKeyDown"]);const a=M.findComponent(N,T),E=M.filterByType(N,j),y=n.reactExports.useRef(null),s=n.reactExports.useRef(null),D=n.reactExports.useRef(null),x=w.useExpander({ref:U||y,expanded:r,options:{autoCollapse:r,expandOnFocus:!0,collapseOnFocusOut:!r&&!!a,contentSelector:'[role="listbox"]',hostSelector:'[role="combobox"]',expandedClass:"combobox--expanded",simulateSpacebarClick:!0},onExpand:z,onCollapse:G},[r]),{overlayStyles:Z,refs:O}=w.useFloatingDropdown({open:x.isExpanded}),[ee,S]=n.reactExports.useState(A||""),c=typeof g<"u"?g:ee;typeof g>"u"&&!k&&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&&(S(o),s.current&&(s.current.selectionStart=s.current.selectionEnd=o.length,s.current.focus()),W(e,b({currentInputValue:o})))};function oe(){return v==="none"?E||[]:E.filter(e=>{var o,t;return(o=e.props.text)===null||o===void 0?void 0:o.toLowerCase().includes((t=c==null?void 0:c.trim())===null||t===void 0?void 0:t.toLowerCase())})}const u=n.reactExports.useMemo(()=>oe(),[v,c,E]),te=n.reactExports.useCallback((e,{toIndex:o})=>{if(V==="automatic"){const t=u[o];t&&s.current&&(s.current.value=t.props.text)}},[V,u]),ne=w.useActiveDescendant({ref:y,focusElementRef:s,itemContainerRef:D,disabled:!u.length,onChange:te,options:{activeDescendantClassName:"combobox__option--active",autoInit:-1,autoReset:-1,autoScroll:!0,axis:"y"}}),L=C?"div":"span",F=be.useFloatingLabel({text:d,disabled:h.disabled,containerTagName:L,opaqueLabel:P,onMount:J}),ae=d?F.Container:L,m=n.reactExports.useRef(!1),le=e=>{var o,t;m.current=!0,(t=a==null?void 0:(o=a.props).onClick)===null||t===void 0||t.call(o,e)},se=e=>{var o,t;m.current=!0,(t=a==null?void 0:(o=a.props).onMouseDown)===null||t===void 0||t.call(o,e)};function R(){x.collapse()}function q(){x.expand()}function re(e){const o=u.find(t=>t.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;S(e.target.value),k(e,b({currentInputValue:o}))},B=n.reactExports.useRef(""),ue=e=>{m.current||R(),m.current=!1;const o=e.target.value;o!==B.current&&(B.current=o,Q(e,b({currentInputValue:o})))},ie=e=>{const o=e.target;o===document.activeElement&&q(),$(e,b({currentInputValue:o.value}))},de=e=>{Y(e,b({currentInputValue:e.target.value}))},pe=e=>{if(e.key==="ArrowDown")q();else if(e.key==="Escape")R();else if(e.key==="Enter"&&x.isExpanded){const o=ne.getIndex();o!==-1&&_(e,u[o].props.text),r||R()}X(e)};return n.React.createElement(ae,{ref:y,className:f.classNames("combobox",p)},n.React.createElement(F.Label,{htmlFor:h.id}),n.React.createElement("span",{className:f.classNames("combobox__control",{"combobox__control--actionable":a,"combobox__control--borderless":K})},n.React.createElement("input",Object.assign({},h,{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})),a?n.React.cloneElement(a,{onClick:le,onMouseDown:se}):null),u.length>0&&n.React.createElement("div",{role:"listbox",className:"combobox__listbox",ref:e=>{O.setOverlay(e),D.current=e},style:Z},u.map(e=>n.React.cloneElement(e,{selected:(e.props.value||e.props.text)===c,onClick:o=>{var t,i;_(o,e.props.text),(i=(t=e.props).onClick)===null||i===void 0||i.call(t,o)},onMouseDown:o=>{var t,i;_(o,e.props.text),(i=(t=e.props).onMouseDown)===null||i===void 0||i.call(t,o)}}))))};exports.EbayCombobox=xe;exports.EbayComboboxButton=T;exports.EbayComboboxOption=j;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../tslib.es6-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../tslib.es6-UTo0M824.js"),e=require("../index-Banoekuf.js"),b=require("../index-DmNrJCd8.js"),c=require("../ebay-dialog-base/index.js");require("../ebay-icon-button/index.js");const s=require("../ebay-button/index.js"),o="confirm-dialog",y=i=>{var{a11yCloseText:l="Close Dialog",confirmText:m,rejectText:d,onReject:n=()=>{},onConfirm:f=()=>{}}=i,t=g.__rest(i,["a11yCloseText","confirmText","rejectText","onReject","onConfirm"]);const a=e.reactExports.useRef(null),u="confirm-dialog-confirm",r="confirm-dialog-main";return e.React.createElement(c.DialogBaseWithState,Object.assign({focus:a},t,{a11yCloseText:l,role:"dialog",mainId:r,classPrefix:o,className:b.classNames(t.className,`${o}--mask-fade`),windowClass:`${o}__window ${o}__window--animate`,buttonPosition:"hidden",onCloseBtnClick:n}),t.children,e.React.createElement(c.EbayDialogFooter,null,e.React.createElement(s.EbayButton,{onClick:n,className:"confirm-dialog__reject"},d),e.React.createElement(s.EbayButton,{ref:a,priority:"primary",onClick:f,id:u,"aria-describedby":r,className:"confirm-dialog__confirm"},m)))};exports.EbayConfirmDialog=y;
|
package/ebay-cta-button/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../tslib.es6-UTo0M824.js"),e=require("../index-Banoekuf.js"),d=require("../index-DmNrJCd8.js"),b=require("../forwardRef-BGhnwltg.js"),f=require("../index-plT9bPAi.js"),m=require("../ebay-button/index.js"),y=t=>{var{size:a,children:r,fluid:n,truncate:c,forwardedRef:s,className:o}=t,l=u.__rest(t,["size","children","fluid","truncate","forwardedRef","className"]);const i=d.classNames(o,"cta-btn",{"cta-btn--large":a==="large"},{"cta-btn--fluid":n},{"cta-btn--truncated":c});return e.React.createElement("a",Object.assign({},l,{className:i,ref:s}),e.React.createElement(m.EbayButtonCell,{type:"cta"},e.React.createElement("span",null,r),e.React.createElement(f.EbayIcon,{name:"arrowRight24"})))},R=b.withForwardRef(y);exports.EbayCtaButton=R;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const J=require("../tslib.es6-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const J=require("../tslib.es6-UTo0M824.js"),a=require("../index-Banoekuf.js"),i=require("../dropdown-DyNGEyy6.js"),K=require("../index-DmNrJCd8.js"),b=require("../index-Q8sL9uBq.js"),u=require("../index-BgDjcBrE.js");require("../index-plT9bPAi.js");var P,N;const{default:Q=i.index_default}=(N=(P=i.index_default)==null?void 0:P.default)!=null&&N.__esModule?i.index_default.default:i.index_default,X=600,Z=m=>{var{className:D,inputPlaceholderText:p="YYYY-MM-DD",a11yOpenPopoverText:w="open calendar",range:o,value:y,rangeEnd:R,defaultValue:M,defaultRangeEnd:q,collapseOnSelect:A,onChange:x=()=>{},onInputChange:L=()=>{},onInputRangeEndChange:V=()=>{}}=m,Y=J.__rest(m,["className","inputPlaceholderText","a11yOpenPopoverText","range","value","rangeEnd","defaultValue","defaultRangeEnd","collapseOnSelect","onChange","onInputChange","onInputRangeEndChange"]);const v=a.reactExports.useRef(null),[B,c]=a.reactExports.useState(M||""),[F,d]=a.reactExports.useState(q||""),S=u.isControlled(y)?y:B,I=u.isControlled(R)?R:F,[l,E]=a.reactExports.useState(()=>b.dateArgToISO(S)),[s,g]=a.reactExports.useState(()=>b.dateArgToISO(I)),[T,_]=a.reactExports.useState(!1),[j,z]=a.reactExports.useState(1),{overlayStyles:H,refs:h}=i.useFloatingDropdown({open:T}),f=h.host,W=()=>{_(!0)},k=()=>{_(!1)};a.reactExports.useEffect(()=>{if(!f.current)return;v.current=new Q(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",k);const e=()=>{z(document.documentElement.clientWidth<X?1:2)};return e(),window.addEventListener("resize",e),()=>{var t;(t=v.current)===null||t===void 0||t.destroy(),window.removeEventListener("resize",e)}},[]);const C=(e,t)=>{const r=new Date(e.target.value),n=isNaN(r.getTime())?null:b.toISO(r);t===0?(E(n),c(n||"")):(g(n),d(n||"")),o?x(e,{rangeStart:t===0?n:l,rangeEnd:t===1?n:s}):x(e,{selected:n})},U=(e,{iso:t})=>{if(E(t),c(t),o){const r=l||s,n={rangeStart:t,rangeEnd:r};l&&s?(d(""),g(null),n.rangeEnd=null):r&&(r<t?(E(r),c(r),d(t),g(t),n.rangeStart=r,n.rangeEnd=t):(E(t),c(t),d(r),g(r),n.rangeStart=t,n.rangeEnd=r)),x(e,n)}else x(e,{selected:t});A&&(v.current.expanded=!1)},O=(e,t)=>{t===0?(c(e.target.value),L(e)):(d(e.target.value),V(e))},[$,G]=Array.isArray(p)?p:[p,p];return a.React.createElement("span",{className:K.classNames("date-textbox",D),ref:h.setHost},o&&a.React.createElement(u.EbayTextbox,{value:S,placeholder:$,onInputChange:e=>O(e,0),onBlur:e=>C(e,0)}),a.React.createElement(u.EbayTextbox,{className:"ebay-date-textbox--main",placeholder:G,value:o?I:S,onInputChange:e=>O(e,o?1:0),onBlur:e=>C(e,o?1:0)},a.React.createElement(u.EbayTextboxPostfixIcon,{name:"calendar24",buttonAriaLabel:w})),a.React.createElement("div",{hidden:!T,ref:h.setOverlay,style:H,className:"date-textbox__popover"},a.React.createElement(b.EbayCalendar,Object.assign({},Y,{range:o,interactive:!0,navigable:!0,numMonths:j,selected:l&&s?[l,s]:l||s||void 0,onSelect:U}))))};exports.EbayDateTextbox=Z;
|
package/ebay-details/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../tslib.es6-UTo0M824.js"),e=require("../index-Banoekuf.js"),a=require("../index-DmNrJCd8.js"),t=require("../index-plT9bPAi.js"),N=s=>{var{size:r,alignment:m,layout:n,text:o,as:i="div",className:d,open:_,onToggle:l,children:u}=s,g=E.__rest(s,["size","alignment","layout","text","as","className","open","onToggle","children"]);const y=l&&(c=>{l(c,{open:c.currentTarget.open})});return e.React.createElement("details",Object.assign({open:_,onToggle:y,className:a.classNames("details",d)},g),e.React.createElement("summary",{className:a.classNames("details__summary",{"details__summary--small":r==="small","details__summary--center":m==="center"})},e.React.createElement("span",{className:"details__label"},o),e.React.createElement("span",{className:"details__icon",hidden:!0},n==="accordion"?e.React.createElement(e.React.Fragment,null,e.React.createElement(t.EbayIcon,{className:"details__expand",name:"add16"}),e.React.createElement(t.EbayIcon,{className:"details__collapse",name:"remove16"})):e.React.createElement(t.EbayIcon,{name:"chevronDown16"}))),e.React.createElement(i,{className:a.classNames({details__content:n==="accordion"})},u))};exports.EbayDetails=N;
|