@purpurds/tooltip 3.7.1 → 4.0.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/.rush/temp/ci_build/@purpurds/tooltip/{256d122d0c4d776d9b2a7d89bb363aa2253deb79.untar.log → 6c26ec6eecdac332b18285def6c7f32d87bcf466.untar.log} +2 -2
- package/.rush/temp/operation/ci_build/all.log +4 -16
- package/.rush/temp/operation/ci_build/state.json +1 -1
- package/.rush/temp/operation/test_unit/all.log +3 -3
- package/.rush/temp/operation/test_unit/state.json +1 -1
- package/dist/LICENSE.txt +4 -4
- package/dist/tooltip.cjs.js +6 -6
- package/dist/tooltip.cjs.js.map +1 -1
- package/dist/tooltip.es.js +168 -168
- package/dist/tooltip.es.js.map +1 -1
- package/package.json +6 -7
- package/vite.config.mts +1 -1
- package/dist/tooltip.system.js +0 -22
- package/dist/tooltip.system.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purpurds/tooltip",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"main": "./dist/tooltip.cjs.js",
|
|
6
6
|
"types": "./dist/tooltip.d.ts",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
9
|
"require": "./dist/tooltip.cjs.js",
|
|
10
|
-
"systemjs": "./dist/tooltip.system.js",
|
|
11
10
|
"types": "./dist/tooltip.d.ts",
|
|
12
11
|
"default": "./dist/tooltip.es.js"
|
|
13
12
|
},
|
|
@@ -17,10 +16,10 @@
|
|
|
17
16
|
"dependencies": {
|
|
18
17
|
"@radix-ui/react-tooltip": "~1.0.7",
|
|
19
18
|
"classnames": "~2.5.0",
|
|
20
|
-
"@purpurds/button": "
|
|
21
|
-
"@purpurds/
|
|
22
|
-
"@purpurds/
|
|
23
|
-
"@purpurds/
|
|
19
|
+
"@purpurds/button": "4.0.0",
|
|
20
|
+
"@purpurds/paragraph": "4.0.0",
|
|
21
|
+
"@purpurds/tokens": "4.0.0",
|
|
22
|
+
"@purpurds/icon": "4.0.0"
|
|
24
23
|
},
|
|
25
24
|
"devDependencies": {
|
|
26
25
|
"@rushstack/eslint-patch": "~1.7.0",
|
|
@@ -50,7 +49,7 @@
|
|
|
50
49
|
"scripts": {
|
|
51
50
|
"build:dev": "vite",
|
|
52
51
|
"build:watch": "vite build --watch",
|
|
53
|
-
"build": "
|
|
52
|
+
"build": "vite build",
|
|
54
53
|
"ci:build": "rushx build",
|
|
55
54
|
"coverage": "vitest run --coverage",
|
|
56
55
|
"lint:fix": "eslint . --fix",
|
package/vite.config.mts
CHANGED
package/dist/tooltip.system.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
System.register(["react","react/jsx-runtime","react-dom"],function(Oe,si){"use strict";var L,F,Te,de,_,Ke,pt,J,$e,Ce,R,M,k,Ze,D,ht,z,gt,Q,Je,mt,vt;return{setters:[E=>{L=E.forwardRef,F=E.useCallback,Te=E.createContext,de=E.useMemo,_=E.createElement,Ke=E.useContext,pt=E.Fragment,J=E.Children,$e=E.isValidElement,Ce=E.cloneElement,R=E.useEffect,M=E.useRef,k=E.useState,Ze=E.useLayoutEffect,D=E,ht=E.useReducer,z=E.default},E=>{gt=E.jsxs,Q=E.jsx},E=>{Je=E.flushSync,mt=E,vt=E.default}],execute:function(){const E={PRIMARY:"primary",PRIMARY_NEGATIVE:"primary-negative",SECONDARY:"secondary",SECONDARY_NEGATIVE:"secondary-negative",EXPRESSIVE:"expressive",EXPRESSIVE_NEGATIVE:"expressive-negative"},yt={SM:"sm",MD:"md",LG:"lg"};function vn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bt={exports:{}};/*!
|
|
2
|
-
Copyright (c) 2018 Jed Watson.
|
|
3
|
-
Licensed under the MIT License (MIT), see
|
|
4
|
-
http://jedwatson.github.io/classnames
|
|
5
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(r=i(r,o(a)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var a in r)t.call(r,a)&&r[a]&&(s=i(s,a));return s}function i(r,s){return s?r?r+" "+s:r+s:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(bt);var yn=bt.exports;const $t=vn(yn),bn="_rotate_7s2g1_1",$n="_dash_7s2g1_1",Re={"purpur-spinner":"_purpur-spinner_7s2g1_1",rotate:bn,"purpur-spinner--xxs":"_purpur-spinner--xxs_7s2g1_4","purpur-spinner--xs":"_purpur-spinner--xs_7s2g1_8","purpur-spinner--sm":"_purpur-spinner--sm_7s2g1_12","purpur-spinner--md":"_purpur-spinner--md_7s2g1_16","purpur-spinner--lg":"_purpur-spinner--lg_7s2g1_20","purpur-spinner__circle":"_purpur-spinner__circle_7s2g1_24",dash:$n,"purpur-spinner__circle--disabled":"_purpur-spinner__circle--disabled_7s2g1_33","purpur-spinner__circle--negative":"_purpur-spinner__circle--negative_7s2g1_36","purpur-spinner__circle--negative-disabled":"_purpur-spinner__circle--negative-disabled_7s2g1_39"},Se="purpur-spinner",xn={PRIMARY:"primary",DISABLED:"disabled",NEGATIVE:"negative",NEGATIVE_DISABLED:"negative-disabled"},wn={XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg"},_n=({["data-testid"]:e,size:t=wn.SM,variant:n=xn.PRIMARY,...o})=>Q("div",{className:$t([Re[Se],Re[`${Se}--${t}`]]),"data-testid":e,...o,children:Q("svg",{viewBox:"0 0 50 50",children:Q("circle",{className:$t(Re[`${Se}__circle`],Re[`${Se}__circle--${n}`]),cx:"25",cy:"25",r:"20"})})});function An(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xt={exports:{}};/*!
|
|
6
|
-
Copyright (c) 2018 Jed Watson.
|
|
7
|
-
Licensed under the MIT License (MIT), see
|
|
8
|
-
http://jedwatson.github.io/classnames
|
|
9
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(r=i(r,o(a)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var a in r)t.call(r,a)&&r[a]&&(s=i(s,a));return s}function i(r,s){return s?r?r+" "+s:r+s:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(xt);var Pn=xt.exports;const En=An(Pn),se={"purpur-button":"_purpur-button_1fna2_1","purpur-button--sm":"_purpur-button--sm_1fna2_33","purpur-button--icon-only":"_purpur-button--icon-only_1fna2_36","purpur-button--md":"_purpur-button--md_1fna2_39","purpur-button--lg":"_purpur-button--lg_1fna2_45","purpur-button--full-width":"_purpur-button--full-width_1fna2_51","purpur-button--primary":"_purpur-button--primary_1fna2_54","purpur-button--disabled":"_purpur-button--disabled_1fna2_58","purpur-button--primary-negative":"_purpur-button--primary-negative_1fna2_64","purpur-button--secondary":"_purpur-button--secondary_1fna2_76","purpur-button--secondary-negative":"_purpur-button--secondary-negative_1fna2_87","purpur-button--expressive":"_purpur-button--expressive_1fna2_98","purpur-button--expressive-negative":"_purpur-button--expressive-negative_1fna2_108","purpur-button--negative":"_purpur-button--negative_1fna2_120","purpur-button--destructive":"_purpur-button--destructive_1fna2_127","purpur-button--destructive-negative":"_purpur-button--destructive-negative_1fna2_137","purpur-button--tertiary-purple":"_purpur-button--tertiary-purple_1fna2_147","purpur-button--tertiary-purple-negative":"_purpur-button--tertiary-purple-negative_1fna2_160","purpur-button--text-negative":"_purpur-button--text-negative_1fna2_175","purpur-button--text":"_purpur-button--text_1fna2_175"},wt={...E,DESTRUCTIVE:"destructive",DESTRUCTIVE_NEGATIVE:"destructive-negative",TERTIARY_PURPLE:"tertiary-purple",TERTIARY_PURPLE_NEGATVIE:"tertiary-purple-negative",TEXT:"text",TEXT_NEGATIVE:"text-negative"},ae="purpur-button",On=({children:e,className:t,["data-testid"]:n,disabled:o=!1,fullWidth:i=!1,iconOnly:r,loading:s=!1,onClick:a,size:c=yt.MD,variant:l,type:d="button",...u},p)=>{if(r&&l==="destructive")return null;const f=En([se[ae],se[`${ae}--${l}`],se[`${ae}--${c}`]],{[se[`${ae}--icon-only`]]:r,[se[`${ae}--negative`]]:l.endsWith("negative"),[se[`${ae}--full-width`]]:i,[se[`${ae}--disabled`]]:o||s},t),h=m=>{o||s?m.preventDefault():a&&a(m)},g=()=>l.endsWith("negative")?"negative-disabled":"disabled";return gt("button",{className:f,"data-testid":n,type:d,ref:p,"aria-disabled":u["aria-disabled"]||o||s,onClick:h,...u,children:[s&&Q(_n,{size:c===yt.LG?"xs":"xxs",variant:g()})," ",e]})},_t=L(On);_t.displayName="Button";function Tn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var At={exports:{}};/*!
|
|
10
|
-
Copyright (c) 2018 Jed Watson.
|
|
11
|
-
Licensed under the MIT License (MIT), see
|
|
12
|
-
http://jedwatson.github.io/classnames
|
|
13
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(r=i(r,o.call(this,a)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var a in r)t.call(r,a)&&r[a]&&(s=i(s,this&&this[a]||a));return s}function i(r,s){return s?r?r+" "+s:r+s:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(At);var Cn=At.exports;const Rn=Tn(Cn),Sn={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},Dn={name:"info",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M11 8.18c0 .537.469.979 1.007.979.524 0 .993-.442.993-.98s-.469-.979-.993-.979c-.538 0-1.007.441-1.007.98Zm.152 1.958v6.897h1.696v-6.897h-1.696Z"/><path fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z" clip-rule="evenodd"/></svg>',keywords:["info"],category:"status"},Pt=e=>Q(kn,{...e,svg:Dn});Pt.displayName="IconInfo";const Nn=Rn.bind(Sn),Et="purpur-icon",Ln="md",Mn=e=>e.filter(t=>Object.keys(t).length>=1).map(t=>`${t.name}="${t.value}"`).join(" "),In=({content:e="",title:t}={})=>{const n=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},t?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],o=t?`<title>${t}</title>`:"";return`<svg ${Mn(n)}>${o}${e}</svg>`},Fn=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),kn=({["data-testid"]:e,svg:t,allyTitle:n,className:o="",size:i=Ln,...r})=>{const s=In({content:Fn(t.svg),title:n}),a=Nn(o,Et,`${Et}--${i}`);return Q("span",{"aria-label":n,className:a,"data-testid":e,dangerouslySetInnerHTML:{__html:s},...r})};function Hn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ot={exports:{}};/*!
|
|
14
|
-
Copyright (c) 2018 Jed Watson.
|
|
15
|
-
Licensed under the MIT License (MIT), see
|
|
16
|
-
http://jedwatson.github.io/classnames
|
|
17
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(r=i(r,o(a)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var a in r)t.call(r,a)&&r[a]&&(s=i(s,a));return s}function i(r,s){return s?r?r+" "+s:r+s:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Ot);var Bn=Ot.exports;const jn=Hn(Bn),De={"purpur-paragraph":"_purpur-paragraph_hwaj6_1","purpur-paragraph--disabled":"_purpur-paragraph--disabled_hwaj6_7","purpur-paragraph--hyphens":"_purpur-paragraph--hyphens_hwaj6_10","purpur-paragraph--paragraph-100":"_purpur-paragraph--paragraph-100_hwaj6_13","purpur-paragraph--paragraph-100-medium":"_purpur-paragraph--paragraph-100-medium_hwaj6_19","purpur-paragraph--paragraph-100-bold":"_purpur-paragraph--paragraph-100-bold_hwaj6_26","purpur-paragraph--paragraph-200":"_purpur-paragraph--paragraph-200_hwaj6_33","purpur-paragraph--preamble-100":"_purpur-paragraph--preamble-100_hwaj6_39","purpur-paragraph--preamble-200":"_purpur-paragraph--preamble-200_hwaj6_45","purpur-paragraph--additional-100":"_purpur-paragraph--additional-100_hwaj6_51","purpur-paragraph--additional-100-medium":"_purpur-paragraph--additional-100-medium_hwaj6_57","purpur-paragraph--overline-100":"_purpur-paragraph--overline-100_hwaj6_64","purpur-paragraph--overline-200":"_purpur-paragraph--overline-200_hwaj6_71"},Tt={PARAGRAPH100:"paragraph-100",PARAGRAPH100MEDIUM:"paragraph-100-medium",PARAGRAPH100BOLD:"paragraph-100-bold",PARAGRAPH200:"paragraph-200",PREAMBLE100:"preamble-100",PREAMBLE200:"preamble-200",ADDITIONAL100:"additional-100",ADDITIONAL100MEDIUM:"additional-100-medium",OVERLINE100:"overline-100",OVERLINE200:"overline-200"},Ne="purpur-paragraph",Vn=({["data-testid"]:e,children:t,className:n="",disabled:o,enableHyphenation:i=!1,variant:r=Tt.PARAGRAPH100,...s})=>{const a=jn([n,De[Ne],De[`${Ne}--${r}`],{[De[`${Ne}--hyphens`]]:i,[De[`${Ne}--disabled`]]:o}]);return Q("p",{...s,className:a,"data-testid":e,children:t})},Wn="400ms";function N(){return N=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},N.apply(this,arguments)}function Y(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Un(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Ct(...e){return t=>e.forEach(n=>Un(n,t))}function fe(...e){return F(Ct(...e),e)}function Rt(e,t=[]){let n=[];function o(r,s){const a=Te(s),c=n.length;n=[...n,s];function l(u){const{scope:p,children:f,...h}=u,g=(p==null?void 0:p[e][c])||a,m=de(()=>h,Object.values(h));return _(g.Provider,{value:m},f)}function d(u,p){const f=(p==null?void 0:p[e][c])||a,h=Ke(f);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${u}\` must be used within \`${r}\``)}return l.displayName=r+"Provider",[l,d]}const i=()=>{const r=n.map(s=>Te(s));return function(a){const c=(a==null?void 0:a[e])||r;return de(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return i.scopeName=e,[o,zn(i,...t)]}function zn(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(r){const s=o.reduce((a,{useScope:c,scopeName:l})=>{const u=c(r)[`__scope${l}`];return{...a,...u}},{});return de(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}const St=L((e,t)=>{const{children:n,...o}=e,i=J.toArray(n),r=i.find(Gn);if(r){const s=r.props.children,a=i.map(c=>c===r?J.count(s)>1?J.only(null):$e(s)?s.props.children:null:c);return _(Qe,N({},o,{ref:t}),$e(s)?Ce(s,void 0,a):null)}return _(Qe,N({},o,{ref:t}),n)});St.displayName="Slot";const Qe=L((e,t)=>{const{children:n,...o}=e;return $e(n)?Ce(n,{...Yn(o,n.props),ref:t?Ct(t,n.ref):n.ref}):J.count(n)>1?J.only(null):null});Qe.displayName="SlotClone";const Dt=({children:e})=>_(pt,null,e);function Gn(e){return $e(e)&&e.type===Dt}function Yn(e,t){const n={...t};for(const o in t){const i=e[o],r=t[o];/^on[A-Z]/.test(o)?i&&r?n[o]=(...a)=>{r(...a),i(...a)}:i&&(n[o]=i):o==="style"?n[o]={...i,...r}:o==="className"&&(n[o]=[i,r].filter(Boolean).join(" "))}return{...e,...n}}const ce=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=L((o,i)=>{const{asChild:r,...s}=o,a=r?St:t;return R(()=>{window[Symbol.for("radix-ui")]=!0},[]),_(a,N({},s,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Xn(e,t){e&&Je(()=>e.dispatchEvent(t))}function pe(e){const t=M(e);return R(()=>{t.current=e}),de(()=>(...n)=>{var o;return(o=t.current)===null||o===void 0?void 0:o.call(t,...n)},[])}function qn(e,t=globalThis==null?void 0:globalThis.document){const n=pe(e);R(()=>{const o=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",o),()=>t.removeEventListener("keydown",o)},[n,t])}const et="dismissableLayer.update",Kn="dismissableLayer.pointerDownOutside",Zn="dismissableLayer.focusOutside";let Nt;const Jn=Te({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qn=L((e,t)=>{var n;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...l}=e,d=Ke(Jn),[u,p]=k(null),f=(n=u==null?void 0:u.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=k({}),g=fe(t,A=>p(A)),m=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(v),$=u?m.indexOf(u):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,b=$>=y,w=er(A=>{const S=A.target,H=[...d.branches].some(C=>C.contains(S));!b||H||(r==null||r(A),a==null||a(A),A.defaultPrevented||c==null||c())},f),O=tr(A=>{const S=A.target;[...d.branches].some(C=>C.contains(S))||(s==null||s(A),a==null||a(A),A.defaultPrevented||c==null||c())},f);return qn(A=>{$===d.layers.size-1&&(i==null||i(A),!A.defaultPrevented&&c&&(A.preventDefault(),c()))},f),R(()=>{if(u)return o&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Nt=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),Lt(),()=>{o&&d.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Nt)}},[u,f,o,d]),R(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),Lt())},[u,d]),R(()=>{const A=()=>h({});return document.addEventListener(et,A),()=>document.removeEventListener(et,A)},[]),_(ce.div,N({},l,{ref:g,style:{pointerEvents:x?b?"auto":"none":void 0,...e.style},onFocusCapture:Y(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Y(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Y(e.onPointerDownCapture,w.onPointerDownCapture)}))});function er(e,t=globalThis==null?void 0:globalThis.document){const n=pe(e),o=M(!1),i=M(()=>{});return R(()=>{const r=a=>{if(a.target&&!o.current){let l=function(){Mt(Kn,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);o.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",r)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",r),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function tr(e,t=globalThis==null?void 0:globalThis.document){const n=pe(e),o=M(!1);return R(()=>{const i=r=>{r.target&&!o.current&&Mt(Zn,n,{originalEvent:r},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Lt(){const e=new CustomEvent(et);document.dispatchEvent(e)}function Mt(e,t,n,{discrete:o}){const i=n.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),o?Xn(i,r):i.dispatchEvent(r)}const he=globalThis!=null&&globalThis.document?Ze:()=>{},nr=D.useId||(()=>{});let rr=0;function or(e){const[t,n]=D.useState(nr());return he(()=>{e||n(o=>o??String(rr++))},[e]),e||(t?`radix-${t}`:"")}const ir=["top","right","bottom","left"],ee=Math.min,B=Math.max,Le=Math.round,Me=Math.floor,te=e=>({x:e,y:e}),sr={left:"right",right:"left",bottom:"top",top:"bottom"},ar={start:"end",end:"start"};function tt(e,t,n){return B(e,ee(t,n))}function X(e,t){return typeof e=="function"?e(t):e}function q(e){return e.split("-")[0]}function ge(e){return e.split("-")[1]}function nt(e){return e==="x"?"y":"x"}function rt(e){return e==="y"?"height":"width"}function me(e){return["top","bottom"].includes(q(e))?"y":"x"}function ot(e){return nt(me(e))}function cr(e,t,n){n===void 0&&(n=!1);const o=ge(e),i=ot(e),r=rt(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=Ie(s)),[s,Ie(s)]}function lr(e){const t=Ie(e);return[it(e),t,it(t)]}function it(e){return e.replace(/start|end/g,t=>ar[t])}function ur(e,t,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:o:t?o:i;case"left":case"right":return t?r:s;default:return[]}}function dr(e,t,n,o){const i=ge(e);let r=ur(q(e),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),t&&(r=r.concat(r.map(it)))),r}function Ie(e){return e.replace(/left|right|bottom|top/g,t=>sr[t])}function fr(e){return{top:0,right:0,bottom:0,left:0,...e}}function It(e){return typeof e!="number"?fr(e):{top:e,right:e,bottom:e,left:e}}function Fe(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Ft(e,t,n){let{reference:o,floating:i}=e;const r=me(t),s=ot(t),a=rt(s),c=q(t),l=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,p=o[a]/2-i[a]/2;let f;switch(c){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(ge(t)){case"start":f[s]-=p*(n&&l?-1:1);break;case"end":f[s]+=p*(n&&l?-1:1);break}return f}const pr=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,a=r.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:u}=Ft(l,o,c),p=o,f={},h=0;for(let g=0;g<a.length;g++){const{name:m,fn:v}=a[g],{x:y,y:$,data:x,reset:b}=await v({x:d,y:u,initialPlacement:o,placement:p,strategy:i,middlewareData:f,rects:l,platform:s,elements:{reference:e,floating:t}});if(d=y??d,u=$??u,f={...f,[m]:{...f[m],...x}},b&&h<=50){h++,typeof b=="object"&&(b.placement&&(p=b.placement),b.rects&&(l=b.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):b.rects),{x:d,y:u}=Ft(l,p,c)),g=-1;continue}}return{x:d,y:u,placement:p,strategy:i,middlewareData:f}};async function xe(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:r,rects:s,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:f=0}=X(t,e),h=It(f),m=a[p?u==="floating"?"reference":"floating":u],v=Fe(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(m)))==null||n?m:m.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:c})),y=u==="floating"?{...s.floating,x:o,y:i}:s.reference,$=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a.floating)),x=await(r.isElement==null?void 0:r.isElement($))?await(r.getScale==null?void 0:r.getScale($))||{x:1,y:1}:{x:1,y:1},b=Fe(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:$,strategy:c}):y);return{top:(v.top-b.top+h.top)/x.y,bottom:(b.bottom-v.bottom+h.bottom)/x.y,left:(v.left-b.left+h.left)/x.x,right:(b.right-v.right+h.right)/x.x}}const kt=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:r,platform:s,elements:a}=t,{element:c,padding:l=0}=X(e,t)||{};if(c==null)return{};const d=It(l),u={x:n,y:o},p=ot(i),f=rt(p),h=await s.getDimensions(c),g=p==="y",m=g?"top":"left",v=g?"bottom":"right",y=g?"clientHeight":"clientWidth",$=r.reference[f]+r.reference[p]-u[p]-r.floating[f],x=u[p]-r.reference[p],b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let w=b?b[y]:0;(!w||!await(s.isElement==null?void 0:s.isElement(b)))&&(w=a.floating[y]||r.floating[f]);const O=$/2-x/2,A=w/2-h[f]/2-1,S=ee(d[m],A),H=ee(d[v],A),C=S,V=w-h[f]-H,I=w/2-h[f]/2+O,T=tt(C,I,V),P=ge(i)!=null&&I!=T&&r.reference[f]/2-(I<C?S:H)-h[f]/2<0?I<C?C-I:V-I:0;return{[p]:u[p]-P,data:{[p]:T,centerOffset:I-T+P}}}}),hr=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:o,middlewareData:i,rects:r,initialPlacement:s,platform:a,elements:c}=t,{mainAxis:l=!0,crossAxis:d=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:h=!0,...g}=X(e,t),m=q(o),v=q(s)===s,y=await(a.isRTL==null?void 0:a.isRTL(c.floating)),$=u||(v||!h?[Ie(s)]:lr(s));!u&&f!=="none"&&$.push(...dr(s,h,f,y));const x=[s,...$],b=await xe(t,g),w=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(l&&w.push(b[m]),d){const C=cr(o,r,y);w.push(b[C[0]],b[C[1]])}if(O=[...O,{placement:o,overflows:w}],!w.every(C=>C<=0)){var A,S;const C=(((A=i.flip)==null?void 0:A.index)||0)+1,V=x[C];if(V)return{data:{index:C,overflows:O},reset:{placement:V}};let I=(S=O.filter(T=>T.overflows[0]<=0).sort((T,U)=>T.overflows[1]-U.overflows[1])[0])==null?void 0:S.placement;if(!I)switch(p){case"bestFit":{var H;const T=(H=O.map(U=>[U.placement,U.overflows.filter(P=>P>0).reduce((P,oe)=>P+oe,0)]).sort((U,P)=>U[1]-P[1])[0])==null?void 0:H[0];T&&(I=T);break}case"initialPlacement":I=s;break}if(o!==I)return{reset:{placement:I}}}return{}}}};function Ht(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Bt(e){return ir.some(t=>e[t]>=0)}const gr=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=X(e,t);switch(o){case"referenceHidden":{const r=await xe(t,{...i,elementContext:"reference"}),s=Ht(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Bt(s)}}}case"escaped":{const r=await xe(t,{...i,altBoundary:!0}),s=Ht(r,n.floating);return{data:{escapedOffsets:s,escaped:Bt(s)}}}default:return{}}}}};async function mr(e,t){const{placement:n,platform:o,elements:i}=e,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=q(n),a=ge(n),c=me(n)==="y",l=["left","top"].includes(s)?-1:1,d=r&&c?-1:1,u=X(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&typeof h=="number"&&(f=a==="end"?h*-1:h),c?{x:f*d,y:p*l}:{x:p*l,y:f*d}}const vr=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:o}=t,i=await mr(t,e);return{x:n+i.x,y:o+i.y,data:i}}}},yr=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:m=>{let{x:v,y}=m;return{x:v,y}}},...c}=X(e,t),l={x:n,y:o},d=await xe(t,c),u=me(q(i)),p=nt(u);let f=l[p],h=l[u];if(r){const m=p==="y"?"top":"left",v=p==="y"?"bottom":"right",y=f+d[m],$=f-d[v];f=tt(y,f,$)}if(s){const m=u==="y"?"top":"left",v=u==="y"?"bottom":"right",y=h+d[m],$=h-d[v];h=tt(y,h,$)}const g=a.fn({...t,[p]:f,[u]:h});return{...g,data:{x:g.x-n,y:g.y-o}}}}},br=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:r,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=X(e,t),d={x:n,y:o},u=me(i),p=nt(u);let f=d[p],h=d[u];const g=X(a,t),m=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const $=p==="y"?"height":"width",x=r.reference[p]-r.floating[$]+m.mainAxis,b=r.reference[p]+r.reference[$]-m.mainAxis;f<x?f=x:f>b&&(f=b)}if(l){var v,y;const $=p==="y"?"width":"height",x=["top","left"].includes(q(i)),b=r.reference[u]-r.floating[$]+(x&&((v=s.offset)==null?void 0:v[u])||0)+(x?0:m.crossAxis),w=r.reference[u]+r.reference[$]+(x?0:((y=s.offset)==null?void 0:y[u])||0)-(x?m.crossAxis:0);h<b?h=b:h>w&&(h=w)}return{[p]:f,[u]:h}}}},$r=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:i,elements:r}=t,{apply:s=()=>{},...a}=X(e,t),c=await xe(t,a),l=q(n),d=ge(n),u=me(n)==="y",{width:p,height:f}=o.floating;let h,g;l==="top"||l==="bottom"?(h=l,g=d===(await(i.isRTL==null?void 0:i.isRTL(r.floating))?"start":"end")?"left":"right"):(g=l,h=d==="end"?"top":"bottom");const m=f-c[h],v=p-c[g],y=!t.middlewareData.shift;let $=m,x=v;if(u){const w=p-c.left-c.right;x=d||y?ee(v,w):w}else{const w=f-c.top-c.bottom;$=d||y?ee(m,w):w}if(y&&!d){const w=B(c.left,0),O=B(c.right,0),A=B(c.top,0),S=B(c.bottom,0);u?x=p-2*(w!==0||O!==0?w+O:B(c.left,c.right)):$=f-2*(A!==0||S!==0?A+S:B(c.top,c.bottom))}await s({...t,availableWidth:x,availableHeight:$});const b=await i.getDimensions(r.floating);return p!==b.width||f!==b.height?{reset:{rects:!0}}:{}}}};function ne(e){return jt(e)?(e.nodeName||"").toLowerCase():"#document"}function j(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function K(e){var t;return(t=(jt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function jt(e){return e instanceof Node||e instanceof j(e).Node}function Z(e){return e instanceof Element||e instanceof j(e).Element}function G(e){return e instanceof HTMLElement||e instanceof j(e).HTMLElement}function Vt(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof j(e).ShadowRoot}function we(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=W(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(i)}function xr(e){return["table","td","th"].includes(ne(e))}function st(e){const t=at(),n=W(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function wr(e){let t=ve(e);for(;G(t)&&!ke(t);){if(st(t))return t;t=ve(t)}return null}function at(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ke(e){return["html","body","#document"].includes(ne(e))}function W(e){return j(e).getComputedStyle(e)}function He(e){return Z(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ve(e){if(ne(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vt(e)&&e.host||K(e);return Vt(t)?t.host:t}function Wt(e){const t=ve(e);return ke(t)?e.ownerDocument?e.ownerDocument.body:e.body:G(t)&&we(t)?t:Wt(t)}function _e(e,t){var n;t===void 0&&(t=[]);const o=Wt(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),r=j(o);return i?t.concat(r,r.visualViewport||[],we(o)?o:[],r.frameElement?_e(r.frameElement):[]):t.concat(o,_e(o))}function Ut(e){const t=W(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=G(e),r=i?e.offsetWidth:n,s=i?e.offsetHeight:o,a=Le(n)!==r||Le(o)!==s;return a&&(n=r,o=s),{width:n,height:o,$:a}}function ct(e){return Z(e)?e:e.contextElement}function ye(e){const t=ct(e);if(!G(t))return te(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:r}=Ut(t);let s=(r?Le(n.width):n.width)/o,a=(r?Le(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const _r=te(0);function zt(e){const t=j(e);return!at()||!t.visualViewport?_r:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ar(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==j(e)?!1:t}function le(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),r=ct(e);let s=te(1);t&&(o?Z(o)&&(s=ye(o)):s=ye(e));const a=Ar(r,n,o)?zt(r):te(0);let c=(i.left+a.x)/s.x,l=(i.top+a.y)/s.y,d=i.width/s.x,u=i.height/s.y;if(r){const p=j(r),f=o&&Z(o)?j(o):o;let h=p.frameElement;for(;h&&o&&f!==p;){const g=ye(h),m=h.getBoundingClientRect(),v=W(h),y=m.left+(h.clientLeft+parseFloat(v.paddingLeft))*g.x,$=m.top+(h.clientTop+parseFloat(v.paddingTop))*g.y;c*=g.x,l*=g.y,d*=g.x,u*=g.y,c+=y,l+=$,h=j(h).frameElement}}return Fe({width:d,height:u,x:c,y:l})}function Pr(e){let{rect:t,offsetParent:n,strategy:o}=e;const i=G(n),r=K(n);if(n===r)return t;let s={scrollLeft:0,scrollTop:0},a=te(1);const c=te(0);if((i||!i&&o!=="fixed")&&((ne(n)!=="body"||we(r))&&(s=He(n)),G(n))){const l=le(n);a=ye(n),c.x=l.x+n.clientLeft,c.y=l.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+c.x,y:t.y*a.y-s.scrollTop*a.y+c.y}}function Er(e){return Array.from(e.getClientRects())}function Gt(e){return le(K(e)).left+He(e).scrollLeft}function Or(e){const t=K(e),n=He(e),o=e.ownerDocument.body,i=B(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=B(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Gt(e);const a=-n.scrollTop;return W(o).direction==="rtl"&&(s+=B(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:a}}function Tr(e,t){const n=j(e),o=K(e),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,a=0,c=0;if(i){r=i.width,s=i.height;const l=at();(!l||l&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:r,height:s,x:a,y:c}}function Cr(e,t){const n=le(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=G(e)?ye(e):te(1),s=e.clientWidth*r.x,a=e.clientHeight*r.y,c=i*r.x,l=o*r.y;return{width:s,height:a,x:c,y:l}}function Yt(e,t,n){let o;if(t==="viewport")o=Tr(e,n);else if(t==="document")o=Or(K(e));else if(Z(t))o=Cr(t,n);else{const i=zt(e);o={...t,x:t.x-i.x,y:t.y-i.y}}return Fe(o)}function Xt(e,t){const n=ve(e);return n===t||!Z(n)||ke(n)?!1:W(n).position==="fixed"||Xt(n,t)}function Rr(e,t){const n=t.get(e);if(n)return n;let o=_e(e).filter(a=>Z(a)&&ne(a)!=="body"),i=null;const r=W(e).position==="fixed";let s=r?ve(e):e;for(;Z(s)&&!ke(s);){const a=W(s),c=st(s);!c&&a.position==="fixed"&&(i=null),(r?!c&&!i:!c&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||we(s)&&!c&&Xt(e,s))?o=o.filter(d=>d!==s):i=a,s=ve(s)}return t.set(e,o),o}function Sr(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const s=[...n==="clippingAncestors"?Rr(t,this._c):[].concat(n),o],a=s[0],c=s.reduce((l,d)=>{const u=Yt(t,d,i);return l.top=B(u.top,l.top),l.right=ee(u.right,l.right),l.bottom=ee(u.bottom,l.bottom),l.left=B(u.left,l.left),l},Yt(t,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Dr(e){return Ut(e)}function Nr(e,t,n){const o=G(t),i=K(t),r=n==="fixed",s=le(e,!0,r,t);let a={scrollLeft:0,scrollTop:0};const c=te(0);if(o||!o&&!r)if((ne(t)!=="body"||we(i))&&(a=He(t)),o){const l=le(t,!0,r,t);c.x=l.x+t.clientLeft,c.y=l.y+t.clientTop}else i&&(c.x=Gt(i));return{x:s.left+a.scrollLeft-c.x,y:s.top+a.scrollTop-c.y,width:s.width,height:s.height}}function qt(e,t){return!G(e)||W(e).position==="fixed"?null:t?t(e):e.offsetParent}function Kt(e,t){const n=j(e);if(!G(e))return n;let o=qt(e,t);for(;o&&xr(o)&&W(o).position==="static";)o=qt(o,t);return o&&(ne(o)==="html"||ne(o)==="body"&&W(o).position==="static"&&!st(o))?n:o||wr(e)||n}const Lr=async function(e){let{reference:t,floating:n,strategy:o}=e;const i=this.getOffsetParent||Kt,r=this.getDimensions;return{reference:Nr(t,await i(n),o),floating:{x:0,y:0,...await r(n)}}};function Mr(e){return W(e).direction==="rtl"}const Ir={convertOffsetParentRelativeRectToViewportRelativeRect:Pr,getDocumentElement:K,getClippingRect:Sr,getOffsetParent:Kt,getElementRects:Lr,getClientRects:Er,getDimensions:Dr,getScale:ye,isElement:Z,isRTL:Mr};function Fr(e,t){let n=null,o;const i=K(e);function r(){clearTimeout(o),n&&n.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),r();const{left:l,top:d,width:u,height:p}=e.getBoundingClientRect();if(a||t(),!u||!p)return;const f=Me(d),h=Me(i.clientWidth-(l+u)),g=Me(i.clientHeight-(d+p)),m=Me(l),y={rootMargin:-f+"px "+-h+"px "+-g+"px "+-m+"px",threshold:B(0,ee(1,c))||1};let $=!0;function x(b){const w=b[0].intersectionRatio;if(w!==c){if(!$)return s();w?s(!1,w):o=setTimeout(()=>{s(!1,1e-7)},100)}$=!1}try{n=new IntersectionObserver(x,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,y)}n.observe(e)}return s(!0),r}function kr(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=ct(e),d=i||r?[...l?_e(l):[],..._e(t)]:[];d.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),r&&v.addEventListener("resize",n)});const u=l&&a?Fr(l,n):null;let p=-1,f=null;s&&(f=new ResizeObserver(v=>{let[y]=v;y&&y.target===l&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{f&&f.observe(t)})),n()}),l&&!c&&f.observe(l),f.observe(t));let h,g=c?le(e):null;c&&m();function m(){const v=le(e);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&n(),g=v,h=requestAnimationFrame(m)}return n(),()=>{d.forEach(v=>{i&&v.removeEventListener("scroll",n),r&&v.removeEventListener("resize",n)}),u&&u(),f&&f.disconnect(),f=null,c&&cancelAnimationFrame(h)}}const Hr=(e,t,n)=>{const o=new Map,i={platform:Ir,...n},r={...i.platform,_c:o};return pr(e,t,{...i,platform:r})},Br=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:i}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?kt({element:o.current,padding:i}).fn(n):{}:o?kt({element:o,padding:i}).fn(n):{}}}};var Be=typeof document<"u"?Ze:R;function je(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 n,o,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(o=n;o--!==0;)if(!je(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){const r=i[o];if(!(r==="_owner"&&e.$$typeof)&&!je(e[r],t[r]))return!1}return!0}return e!==e&&t!==t}function Zt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Jt(e,t){const n=Zt(e);return Math.round(t*n)/n}function Qt(e){const t=D.useRef(e);return Be(()=>{t.current=e}),t}function jr(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:r,floating:s}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[d,u]=D.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=D.useState(o);je(p,o)||f(o);const[h,g]=D.useState(null),[m,v]=D.useState(null),y=D.useCallback(P=>{P!=w.current&&(w.current=P,g(P))},[g]),$=D.useCallback(P=>{P!==O.current&&(O.current=P,v(P))},[v]),x=r||h,b=s||m,w=D.useRef(null),O=D.useRef(null),A=D.useRef(d),S=Qt(c),H=Qt(i),C=D.useCallback(()=>{if(!w.current||!O.current)return;const P={placement:t,strategy:n,middleware:p};H.current&&(P.platform=H.current),Hr(w.current,O.current,P).then(oe=>{const ie={...oe,isPositioned:!0};V.current&&!je(A.current,ie)&&(A.current=ie,mt.flushSync(()=>{u(ie)}))})},[p,t,n,H]);Be(()=>{l===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,u(P=>({...P,isPositioned:!1})))},[l]);const V=D.useRef(!1);Be(()=>(V.current=!0,()=>{V.current=!1}),[]),Be(()=>{if(x&&(w.current=x),b&&(O.current=b),x&&b){if(S.current)return S.current(x,b,C);C()}},[x,b,C,S]);const I=D.useMemo(()=>({reference:w,floating:O,setReference:y,setFloating:$}),[y,$]),T=D.useMemo(()=>({reference:x,floating:b}),[x,b]),U=D.useMemo(()=>{const P={position:n,left:0,top:0};if(!T.floating)return P;const oe=Jt(T.floating,d.x),ie=Jt(T.floating,d.y);return a?{...P,transform:"translate("+oe+"px, "+ie+"px)",...Zt(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:oe,top:ie}},[n,a,T.floating,d.x,d.y]);return D.useMemo(()=>({...d,update:C,refs:I,elements:T,floatingStyles:U}),[d,C,I,T,U])}const Vr=L((e,t)=>{const{children:n,width:o=10,height:i=5,...r}=e;return _(ce.svg,N({},r,{ref:t,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:_("polygon",{points:"0,0 30,0 15,10"}))});function Wr(e){const[t,n]=k(void 0);return he(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const r=i[0];let s,a;if("borderBoxSize"in r){const c=r.borderBoxSize,l=Array.isArray(c)?c[0]:c;s=l.inlineSize,a=l.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}const en="Popper",[tn,nn]=Rt(en),[Ur,rn]=tn(en),zr=e=>{const{__scopePopper:t,children:n}=e,[o,i]=k(null);return _(Ur,{scope:t,anchor:o,onAnchorChange:i},n)},Gr="PopperAnchor",Yr=L((e,t)=>{const{__scopePopper:n,virtualRef:o,...i}=e,r=rn(Gr,n),s=M(null),a=fe(t,s);return R(()=>{r.onAnchorChange((o==null?void 0:o.current)||s.current)}),o?null:_(ce.div,N({},i,{ref:a}))}),on="PopperContent",[Xr,qr]=tn(on),Kr=L((e,t)=>{var n,o,i,r,s,a,c,l;const{__scopePopper:d,side:u="bottom",sideOffset:p=0,align:f="center",alignOffset:h=0,arrowPadding:g=0,avoidCollisions:m=!0,collisionBoundary:v=[],collisionPadding:y=0,sticky:$="partial",hideWhenDetached:x=!1,updatePositionStrategy:b="optimized",onPlaced:w,...O}=e,A=rn(on,d),[S,H]=k(null),C=fe(t,Ee=>H(Ee)),[V,I]=k(null),T=Wr(V),U=(n=T==null?void 0:T.width)!==null&&n!==void 0?n:0,P=(o=T==null?void 0:T.height)!==null&&o!==void 0?o:0,oe=u+(f!=="center"?"-"+f:""),ie=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},pn=Array.isArray(v)?v:[v],Yo=pn.length>0,Ge={padding:ie,boundary:pn.filter(Jr),altBoundary:Yo},{refs:Xo,floatingStyles:hn,placement:qo,isPositioned:Ye,middlewareData:be}=jr({strategy:"fixed",placement:oe,whileElementsMounted:(...Ee)=>kr(...Ee,{animationFrame:b==="always"}),elements:{reference:A.anchor},middleware:[vr({mainAxis:p+P,alignmentAxis:h}),m&&yr({mainAxis:!0,crossAxis:!1,limiter:$==="partial"?br():void 0,...Ge}),m&&hr({...Ge}),$r({...Ge,apply:({elements:Ee,rects:mn,availableWidth:ni,availableHeight:ri})=>{const{width:oi,height:ii}=mn.reference,qe=Ee.floating.style;qe.setProperty("--radix-popper-available-width",`${ni}px`),qe.setProperty("--radix-popper-available-height",`${ri}px`),qe.setProperty("--radix-popper-anchor-width",`${oi}px`),qe.setProperty("--radix-popper-anchor-height",`${ii}px`)}}),V&&Br({element:V,padding:g}),Qr({arrowWidth:U,arrowHeight:P}),x&&gr({strategy:"referenceHidden",...Ge})]}),[gn,Ko]=cn(qo),Xe=pe(w);he(()=>{Ye&&(Xe==null||Xe())},[Ye,Xe]);const Zo=(i=be.arrow)===null||i===void 0?void 0:i.x,Jo=(r=be.arrow)===null||r===void 0?void 0:r.y,Qo=((s=be.arrow)===null||s===void 0?void 0:s.centerOffset)!==0,[ei,ti]=k();return he(()=>{S&&ti(window.getComputedStyle(S).zIndex)},[S]),_("div",{ref:Xo.setFloating,"data-radix-popper-content-wrapper":"",style:{...hn,transform:Ye?hn.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ei,"--radix-popper-transform-origin":[(a=be.transformOrigin)===null||a===void 0?void 0:a.x,(c=be.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},_(Xr,{scope:d,placedSide:gn,onArrowChange:I,arrowX:Zo,arrowY:Jo,shouldHideArrow:Qo},_(ce.div,N({"data-side":gn,"data-align":Ko},O,{ref:C,style:{...O.style,animation:Ye?void 0:"none",opacity:(l=be.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))}),sn="PopperArrow",Zr={top:"bottom",right:"left",bottom:"top",left:"right"},an=L(function(t,n){const{__scopePopper:o,...i}=t,r=qr(sn,o),s=Zr[r.placedSide];return _("span",{ref:r.onArrowChange,style:{position:"absolute",left:r.arrowX,top:r.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[r.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[r.placedSide],visibility:r.shouldHideArrow?"hidden":void 0}},_(Vr,N({},i,{ref:n,style:{...i.style,display:"block"}})))});function Jr(e){return e!==null}const Qr=e=>({name:"transformOrigin",options:e,fn(t){var n,o,i,r,s;const{placement:a,rects:c,middlewareData:l}=t,u=((n=l.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,p=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[h,g]=cn(a),m={start:"0%",center:"50%",end:"100%"}[g],v=((o=(i=l.arrow)===null||i===void 0?void 0:i.x)!==null&&o!==void 0?o:0)+p/2,y=((r=(s=l.arrow)===null||s===void 0?void 0:s.y)!==null&&r!==void 0?r:0)+f/2;let $="",x="";return h==="bottom"?($=u?m:`${v}px`,x=`${-f}px`):h==="top"?($=u?m:`${v}px`,x=`${c.floating.height+f}px`):h==="right"?($=`${-f}px`,x=u?m:`${y}px`):h==="left"&&($=`${c.floating.width+f}px`,x=u?m:`${y}px`),{data:{x:$,y:x}}}});function cn(e){const[t,n="center"]=e.split("-");return[t,n]}const eo=zr,to=Yr,no=Kr,ro=an,oo=L((e,t)=>{var n;const{container:o=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return o?vt.createPortal(_(ce.div,N({},i,{ref:t})),o):null});function io(e,t){return ht((n,o)=>{const i=t[n][o];return i??n},e)}const lt=e=>{const{present:t,children:n}=e,o=so(t),i=typeof n=="function"?n({present:o.isPresent}):J.only(n),r=fe(o.ref,i.ref);return typeof n=="function"||o.isPresent?Ce(i,{ref:r}):null};lt.displayName="Presence";function so(e){const[t,n]=k(),o=M({}),i=M(e),r=M("none"),s=e?"mounted":"unmounted",[a,c]=io(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R(()=>{const l=Ve(o.current);r.current=a==="mounted"?l:"none"},[a]),he(()=>{const l=o.current,d=i.current;if(d!==e){const p=r.current,f=Ve(l);e?c("MOUNT"):f==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(d&&p!==f?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),he(()=>{if(t){const l=u=>{const f=Ve(o.current).includes(u.animationName);u.target===t&&f&&Je(()=>c("ANIMATION_END"))},d=u=>{u.target===t&&(r.current=Ve(o.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:F(l=>{l&&(o.current=getComputedStyle(l)),n(l)},[])}}function Ve(e){return(e==null?void 0:e.animationName)||"none"}function ao({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,i]=co({defaultProp:t,onChange:n}),r=e!==void 0,s=r?e:o,a=pe(n),c=F(l=>{if(r){const u=typeof l=="function"?l(e):l;u!==e&&a(u)}else i(l)},[r,e,i,a]);return[s,c]}function co({defaultProp:e,onChange:t}){const n=k(e),[o]=n,i=M(o),r=pe(t);return R(()=>{i.current!==o&&(r(o),i.current=o)},[o,i,r]),n}const lo=L((e,t)=>_(ce.span,N({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),[We,ui]=Rt("Tooltip",[nn]),Ue=nn(),uo="TooltipProvider",fo=700,ut="tooltip.open",[po,dt]=We(uo),ho=e=>{const{__scopeTooltip:t,delayDuration:n=fo,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:r}=e,[s,a]=k(!0),c=M(!1),l=M(0);return R(()=>{const d=l.current;return()=>window.clearTimeout(d)},[]),_(po,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:F(()=>{window.clearTimeout(l.current),a(!1)},[]),onClose:F(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a(!0),o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:F(d=>{c.current=d},[]),disableHoverableContent:i},r)},ft="Tooltip",[go,Ae]=We(ft),mo=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:i=!1,onOpenChange:r,disableHoverableContent:s,delayDuration:a}=e,c=dt(ft,e.__scopeTooltip),l=Ue(t),[d,u]=k(null),p=or(),f=M(0),h=s??c.disableHoverableContent,g=a??c.delayDuration,m=M(!1),[v=!1,y]=ao({prop:o,defaultProp:i,onChange:O=>{O?(c.onOpen(),document.dispatchEvent(new CustomEvent(ut))):c.onClose(),r==null||r(O)}}),$=de(()=>v?m.current?"delayed-open":"instant-open":"closed",[v]),x=F(()=>{window.clearTimeout(f.current),m.current=!1,y(!0)},[y]),b=F(()=>{window.clearTimeout(f.current),y(!1)},[y]),w=F(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{m.current=!0,y(!0)},g)},[g,y]);return R(()=>()=>window.clearTimeout(f.current),[]),_(eo,l,_(go,{scope:t,contentId:p,open:v,stateAttribute:$,trigger:d,onTriggerChange:u,onTriggerEnter:F(()=>{c.isOpenDelayed?w():x()},[c.isOpenDelayed,w,x]),onTriggerLeave:F(()=>{h?b():window.clearTimeout(f.current)},[b,h]),onOpen:x,onClose:b,disableHoverableContent:h},n))},ln="TooltipTrigger",vo=L((e,t)=>{const{__scopeTooltip:n,...o}=e,i=Ae(ln,n),r=dt(ln,n),s=Ue(n),a=M(null),c=fe(t,a,i.onTriggerChange),l=M(!1),d=M(!1),u=F(()=>l.current=!1,[]);return R(()=>()=>document.removeEventListener("pointerup",u),[u]),_(to,N({asChild:!0},s),_(ce.button,N({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},o,{ref:c,onPointerMove:Y(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!r.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:Y(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:Y(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:Y(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:Y(e.onBlur,i.onClose),onClick:Y(e.onClick,i.onClose)})))}),un="TooltipPortal",[yo,bo]=We(un,{forceMount:void 0}),$o=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:i}=e,r=Ae(un,t);return _(yo,{scope:t,forceMount:n},_(lt,{present:n||r.open},_(oo,{asChild:!0,container:i},o)))},Pe="TooltipContent",xo=L((e,t)=>{const n=bo(Pe,e.__scopeTooltip),{forceMount:o=n.forceMount,side:i="top",...r}=e,s=Ae(Pe,e.__scopeTooltip);return _(lt,{present:o||s.open},s.disableHoverableContent?_(dn,N({side:i},r,{ref:t})):_(wo,N({side:i},r,{ref:t})))}),wo=L((e,t)=>{const n=Ae(Pe,e.__scopeTooltip),o=dt(Pe,e.__scopeTooltip),i=M(null),r=fe(t,i),[s,a]=k(null),{trigger:c,onClose:l}=n,d=i.current,{onPointerInTransitChange:u}=o,p=F(()=>{a(null),u(!1)},[u]),f=F((h,g)=>{const m=h.currentTarget,v={x:h.clientX,y:h.clientY},y=Oo(v,m.getBoundingClientRect()),$=To(v,y),x=Co(g.getBoundingClientRect()),b=So([...$,...x]);a(b),u(!0)},[u]);return R(()=>()=>p(),[p]),R(()=>{if(c&&d){const h=m=>f(m,d),g=m=>f(m,c);return c.addEventListener("pointerleave",h),d.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",h),d.removeEventListener("pointerleave",g)}}},[c,d,f,p]),R(()=>{if(s){const h=g=>{const m=g.target,v={x:g.clientX,y:g.clientY},y=(c==null?void 0:c.contains(m))||(d==null?void 0:d.contains(m)),$=!Ro(v,s);y?p():$&&(p(),l())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[c,d,s,l,p]),_(dn,N({},e,{ref:r}))}),[_o,Ao]=We(ft,{isInside:!1}),dn=L((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":i,onEscapeKeyDown:r,onPointerDownOutside:s,...a}=e,c=Ae(Pe,n),l=Ue(n),{onClose:d}=c;return R(()=>(document.addEventListener(ut,d),()=>document.removeEventListener(ut,d)),[d]),R(()=>{if(c.trigger){const u=p=>{const f=p.target;f!=null&&f.contains(c.trigger)&&d()};return window.addEventListener("scroll",u,{capture:!0}),()=>window.removeEventListener("scroll",u,{capture:!0})}},[c.trigger,d]),_(Qn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:u=>u.preventDefault(),onDismiss:d},_(no,N({"data-state":c.stateAttribute},l,a,{ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),_(Dt,null,o),_(_o,{scope:n,isInside:!0},_(lo,{id:c.contentId,role:"tooltip"},i||o))))}),Po="TooltipArrow",Eo=L((e,t)=>{const{__scopeTooltip:n,...o}=e,i=Ue(n);return Ao(Po,n).isInside?null:_(ro,N({},i,o,{ref:t}))});function Oo(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),r=Math.abs(t.left-e.x);switch(Math.min(n,o,i,r)){case r:return"left";case i:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function To(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function Co(e){const{top:t,right:n,bottom:o,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:o},{x:i,y:o}]}function Ro(e,t){const{x:n,y:o}=e;let i=!1;for(let r=0,s=t.length-1;r<t.length;s=r++){const a=t[r].x,c=t[r].y,l=t[s].x,d=t[s].y;c>o!=d>o&&n<(l-a)*(o-c)/(d-c)+a&&(i=!i)}return i}function So(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),Do(t)}function Do(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const i=e[o];for(;t.length>=2;){const r=t[t.length-1],s=t[t.length-2];if((r.x-s.x)*(i.y-s.y)>=(r.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;n.length>=2;){const r=n[n.length-1],s=n[n.length-2];if((r.x-s.x)*(i.y-s.y)>=(r.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const No=ho,Lo=mo,Mo=vo,Io=$o,Fo=xo,ko=Eo;function Ho(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fn={exports:{}};/*!
|
|
18
|
-
Copyright (c) 2018 Jed Watson.
|
|
19
|
-
Licensed under the MIT License (MIT), see
|
|
20
|
-
http://jedwatson.github.io/classnames
|
|
21
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(r=i(r,o.call(this,a)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var a in r)t.call(r,a)&&r[a]&&(s=i(s,this&&this[a]||a));return s}function i(r,s){return s?r?r+" "+s:r+s:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(fn);var Bo=fn.exports;const jo=Ho(Bo),ue={"purpur-tooltip":"_purpur-tooltip_1dyp8_1","purpur-tooltip__content":"_purpur-tooltip__content_1dyp8_4","purpur-tooltip__content--primary":"_purpur-tooltip__content--primary_1dyp8_14","purpur-tooltip__content--primary-negative":"_purpur-tooltip__content--primary-negative_1dyp8_17",slideDownAndFade:"_slideDownAndFade_1dyp8_1",slideLeftAndFade:"_slideLeftAndFade_1dyp8_1",slideUpAndFade:"_slideUpAndFade_1dyp8_1",slideRightAndFade:"_slideRightAndFade_1dyp8_1","purpur-tooltip__arrow--primary":"_purpur-tooltip__arrow--primary_1dyp8_32","purpur-tooltip__arrow--primary-negative":"_purpur-tooltip__arrow--primary-negative_1dyp8_35","purpur-tooltip__paragraph--primary":"_purpur-tooltip__paragraph--primary_1dyp8_38","purpur-tooltip__paragraph--primary-negative":"_purpur-tooltip__paragraph--primary-negative_1dyp8_41"},ze=jo.bind(ue),Vo=Oe("TOOLTIP_VARIANT",{PRIMARY:"primary",PRIMARY_NEGATIVE:"primary-negative"}),Wo=Oe("TOOLTIP_POSITION",{TOP:"top",BOTTOM:"bottom",LEFT:"left",RIGHT:"right"}),Uo=Oe("TOOLTIP_ALIGN",{START:"start",CENTER:"center",END:"end"}),zo={primary:wt.TERTIARY_PURPLE,"primary-negative":wt.TERTIARY_PURPLE_NEGATVIE},re="purpur-tooltip",Go=Oe("Tooltip",L(({["data-testid"]:e,children:t,className:n,contentClassName:o,variant:i=Vo.PRIMARY,position:r=Wo.TOP,align:s=Uo.CENTER,triggerAriaLabel:a="",triggerElement:c,...l},d)=>{const[u,p]=k(!1),f=ze([n,re,{[`${re}--${i}`]:i}]),h=z.createElement(_t,{ref:d,"aria-label":a,variant:zo[i],iconOnly:!0,"data-testid":`${e}-trigger-button`},z.createElement(Pt,{size:"md"}));return z.createElement("div",{"data-testid":e,className:f},z.createElement(No,{delayDuration:parseInt(Wn)},z.createElement(Lo,{open:u,onOpenChange:p,...l},z.createElement(Mo,{asChild:!0,onClick:g=>{g.preventDefault(),p(!0)}},J.count(c)===0?h:c),z.createElement(Io,null,z.createElement(Fo,{side:r,align:s,className:ze([o,ue[`${re}__content`],ue[`${re}__content--${i}`]]),sideOffset:-5,"data-testid":`${e}-content`},typeof t=="string"?z.createElement(Vn,{className:ze([ue[`${re}__paragraph`],ue[`${re}__paragraph--${i}`]]),variant:Tt.PARAGRAPH100,"data-testid":`${e}-paragraph`},t):t,z.createElement(ko,{className:ze([ue[`${re}__arrow`],ue[`${re}__arrow--${i}`]])}))))))}));Go.displayName="Tooltip"}}});
|
|
22
|
-
//# sourceMappingURL=tooltip.system.js.map
|