freemium-ui 2.1.0-alpha.14 → 2.1.0-alpha.15
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/lib/Accordion/index-DWZzsz19.js +77 -0
- package/lib/Accordion/index.js +1 -1
- package/lib/Alert/index-oxjOxld6.js +42 -0
- package/lib/Alert/index.js +1 -1
- package/lib/AutoComplete/index-BmlcHm4c.js +1 -0
- package/lib/AutoComplete/index.js +1 -1
- package/lib/BoxedRadio/{index-IgAvsvVX.js → index-BKhNJa4c.js} +10 -10
- package/lib/BoxedRadio/index.js +1 -1
- package/lib/Button/{index-CX4tZVcp.js → index-BpLzsQjT.js} +4 -4
- package/lib/Button/index.js +1 -1
- package/lib/ButtonDropdown/index-DhICMI8D.js +19 -0
- package/lib/ButtonDropdown/index.js +1 -1
- package/lib/Calendar/{index-CFELiRmR.js → index-CKS6Vs4K.js} +3 -3
- package/lib/Calendar/index.js +1 -1
- package/lib/Checkbox/index-Bezq0rI-.js +51 -0
- package/lib/Checkbox/index.js +1 -1
- package/lib/ChevronUp/index-CKehHeuG.js +1 -0
- package/lib/Combination/{index-b5frlUiu.js → index-BzcGtbDx.js} +1 -1
- package/lib/Confirmation/index-onHdPvrU.js +60 -0
- package/lib/Confirmation/index.js +1 -1
- package/lib/Cross/index-C4zPPnG1.js +1 -0
- package/lib/CustomizeColumns/index-BEQks9tG.js +280 -0
- package/lib/Drawer/index-anJVG_Ni.js +43 -0
- package/lib/Drawer/index.js +1 -1
- package/lib/Dropdown/index-BpAK7PI4.js +1 -0
- package/lib/Dropdown/index.js +1 -1
- package/lib/ErrorText/index-ubIQN7S9.js +8 -0
- package/lib/ErrorText/index.d.ts +9 -0
- package/lib/ErrorText/index.js +1 -0
- package/lib/Info/index-Dfu7wL_p.js +1 -0
- package/lib/Input/index.js +1 -1
- package/lib/Loader/index-BBLEVbIM.js +11 -0
- package/lib/Loader/index.js +1 -1
- package/lib/Menu/index-D-WrEwR8.js +1 -0
- package/lib/Menu/index.js +1 -1
- package/lib/Modal/{index-B_p2kH3b.js → index-B-smCZcS.js} +13 -13
- package/lib/Modal/index.js +1 -1
- package/lib/MultiSelectDropdown/index-DAVD2lfY.js +22 -0
- package/lib/MultiSelectDropdown/index.js +1 -1
- package/lib/Pickers/index.js +1 -1
- package/lib/Popover/index-WdigGqmT.js +32 -0
- package/lib/Popover/index.js +1 -1
- package/lib/Radio/index.js +1 -1
- package/lib/RadioGroup/index-BfpIS4rL.js +48 -0
- package/lib/Reorder/index-D1z7Dtco.js +18 -0
- package/lib/Reorder/index.js +1 -1
- package/lib/SortDropdown/index-BWkMo2Ly.js +1 -0
- package/lib/SortDropdown/index.js +1 -1
- package/lib/Table/index-DgHS0gvf.js +1 -0
- package/lib/Table/index.js +1 -1
- package/lib/Tabs/index-DrdtCkn1.js +35 -0
- package/lib/Tabs/index.js +1 -1
- package/lib/Tag/index-C2JlLlFN.js +57 -0
- package/lib/Tag/index.js +1 -1
- package/lib/TextArea/{index-B91jgzER.js → index-CCnB8zVu.js} +8 -8
- package/lib/ThemeProvider/index-CTBBKCT5.js +16 -0
- package/lib/ThemeProvider/index.js +1 -1
- package/lib/TickIcon/index-S4-QXWz7.js +1 -0
- package/lib/TimePicker/index-Bpyc-VRt.js +420 -0
- package/lib/Toast/index.js +1 -1
- package/lib/ToastProvider/index-HGYLdPRM.js +107 -0
- package/lib/Toggle/index-DowXVrfN.js +69 -0
- package/lib/Toggle/index.js +1 -1
- package/lib/Tooltip/index-BJVODVuf.js +37 -0
- package/lib/Tooltip/index.js +1 -1
- package/lib/Typography/{index-CDTZdQLs.js → index-CSIFThAy.js} +2 -2
- package/lib/Typography/index.js +1 -1
- package/lib/WorkspaceTable/index-B_q6qF1l.js +1 -0
- package/lib/WorkspaceTable/index.js +1 -1
- package/lib/allPaths/index-OEaYk6no.js +1 -0
- package/lib/allPathsLoader/index-B2vH22mT.js +1 -0
- package/lib/index-BIDKqyo-.js +1 -0
- package/lib/{index-BrmsftDQ.js → index-BIV37Xa7.js} +1 -1
- package/lib/index-BU_6DIrR.js +1 -0
- package/lib/{index-DE6Djr2P.js → index-BlsNrOCO.js} +1 -1
- package/lib/{index-BBZ7Acl3.js → index-Bx5-p2x9.js} +1 -1
- package/lib/{index-BCBGGtXO.js → index-C4rPovji.js} +1 -1
- package/lib/{index-BJXW8qXz.js → index-CPeDXpiy.js} +1 -1
- package/lib/{index-DSFkVExg.js → index-Clx6_Re_.js} +1 -1
- package/lib/{index-Bj96NGNJ.js → index-DQKztTvn.js} +1 -1
- package/lib/{index-DmrSN1YW.js → index-DeCfyRfZ.js} +1 -1
- package/lib/index-aBVGbwzq.js +1 -0
- package/lib/index.d.ts +37 -127
- package/lib/index.js +1 -1
- package/lib/splitPathsBySizeLoader/index-BGh-s4Nq.js +1 -0
- package/lib/styled-components.browser.esm/index-C0QmrysB.js +1 -0
- package/lib/styles/index-BiCrLDuu.js +244 -0
- package/lib/styles/index-C3oeoCWp.js +61 -0
- package/lib/styles/index.d.ts +56 -0
- package/lib/styles/index.js +322 -0
- package/lib/theme/index.d.ts +156 -0
- package/lib/{index-Bw1WW_qt.js → theme/index.js} +1 -1
- package/lib/use-toasts/index-OUFZlyxu.js +1 -0
- package/package.json +53 -7
- package/lib/Accordion/index-BKhVIoxF.js +0 -77
- package/lib/Alert/index-BLsA-D5R.js +0 -42
- package/lib/AutoComplete/index-B1mSfRyY.js +0 -1
- package/lib/ButtonDropdown/index-CnaJfrKq.js +0 -19
- package/lib/Checkbox/index-Da5dAfcy.js +0 -51
- package/lib/ChevronUp/index-Ce4eVyDz.js +0 -1
- package/lib/Confirmation/index-By3ZGP_F.js +0 -60
- package/lib/Cross/index-COzwlvOZ.js +0 -1
- package/lib/CustomizeColumns/index-BopGGNea.js +0 -280
- package/lib/Drawer/index-BsqaUXLh.js +0 -43
- package/lib/Dropdown/index-DdwM-PHx.js +0 -1
- package/lib/ErrorText/index-Cg0k001T.js +0 -8
- package/lib/Info/index-B4VPdcNm.js +0 -1
- package/lib/Loader/index-ZyKVoj4A.js +0 -11
- package/lib/Menu/index-x94CBOFl.js +0 -1
- package/lib/MultiSelectDropdown/index-Dfhyy_2s.js +0 -22
- package/lib/Popover/index-CJeyJLdk.js +0 -32
- package/lib/RadioGroup/index-Dmdo8Ww5.js +0 -48
- package/lib/Reorder/index-BWdMAvTJ.js +0 -18
- package/lib/SortDropdown/index-pLOLAFmj.js +0 -1
- package/lib/Table/index-CtQC5afR.js +0 -1
- package/lib/Tabs/index-gIeNhq6G.js +0 -35
- package/lib/Tag/index-niIm7trf.js +0 -57
- package/lib/ThemeProvider/index-D_Lpg7Jr.js +0 -16
- package/lib/TickIcon/index-De06qfuL.js +0 -1
- package/lib/TimePicker/index-DPOU16Ta.js +0 -420
- package/lib/ToastProvider/index-OcLhKM25.js +0 -107
- package/lib/Toggle/index-C5YDjm0m.js +0 -69
- package/lib/Tooltip/index-DRDAqp6g.js +0 -37
- package/lib/WorkspaceTable/index-jvUWFiEm.js +0 -1
- package/lib/allPaths/index-CdSu7vZu.js +0 -1
- package/lib/allPathsLoader/index-C-MQyi6w.js +0 -1
- package/lib/index-Ch9hqhMW.js +0 -244
- package/lib/index-CpKjHgOm.js +0 -61
- package/lib/index-CrpsBRUu.js +0 -105
- package/lib/index-D4pfkNFk.js +0 -1
- package/lib/index-D76LBwe9.js +0 -1
- package/lib/index-Lgc6rwoR.js +0 -1
- package/lib/keyframes/index-CVfQXEtZ.js +0 -218
- package/lib/splitPathsBySizeLoader/index-DAJQrOt5.js +0 -1
- package/lib/styled-components.browser.esm/index-8pR-v2ng.js +0 -1
- package/lib/use-toasts/index-CM2WmrpT.js +0 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import{jsx as e,jsxs as o}from"react/jsx-runtime";import t,{forwardRef as r,createElement as n,useCallback as a,useState as i,useRef as l,useEffect as s}from"react";import{a as c,_ as d,$ as p}from"../index-CMYH5FSo.js";import{$ as m,b as u}from"../index-C4rPovji.js";import{$ as f}from"../index-CPeDXpiy.js";import{a as h,$ as b}from"../index-BU_6DIrR.js";import{$ as g}from"../index-BIV37Xa7.js";import{$ as y}from"../index-BlsNrOCO.js";import{$ as v}from"../index-BxvGNAuC.js";import{u as x}from"../styled-components.browser.esm/index-C0QmrysB.js";import{slideDown as A,slideUp as w}from"../styles/index.js";import{C}from"../ChevronUp/index-CKehHeuG.js";const $="Collapsible",[_,E]=m($),[I,k]=_($),R=r(((e,o)=>{const{__scopeCollapsible:t,open:r,defaultOpen:i,disabled:l,onOpenChange:s,...p}=e,[m=!1,u]=h({prop:r,defaultProp:i,onChange:s});return n(I,{scope:t,disabled:l,contentId:y(),open:m,onOpenToggle:a((()=>u((e=>!e))),[u])},n(c.div,d({"data-state":O(m),"data-disabled":l?"":void 0},p,{ref:o})))})),N=r(((e,o)=>{const{__scopeCollapsible:t,...r}=e,a=k("CollapsibleTrigger",t);return n(c.button,d({type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":O(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled},r,{ref:o,onClick:b(e.onClick,a.onOpenToggle)}))})),j="CollapsibleContent",D=r(((e,o)=>{const{forceMount:t,...r}=e,a=k(j,e.__scopeCollapsible);return n(g,{present:t||a.open},(({present:e})=>n(V,d({},r,{ref:o,present:e}))))})),V=r(((e,o)=>{const{__scopeCollapsible:t,present:r,children:a,...m}=e,f=k(j,t),[h,b]=i(r),g=l(null),y=p(o,g),v=l(0),x=v.current,A=l(0),w=A.current,C=f.open||h,$=l(C),_=l();return s((()=>{const e=requestAnimationFrame((()=>$.current=!1));return()=>cancelAnimationFrame(e)}),[]),u((()=>{const e=g.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const o=e.getBoundingClientRect();v.current=o.height,A.current=o.width,$.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),b(r)}}),[f.open,r]),n(c.div,d({"data-state":O(f.open),"data-disabled":f.disabled?"":void 0,id:f.contentId,hidden:!C},m,{ref:y,style:{"--radix-collapsible-content-height":x?x+"px":void 0,"--radix-collapsible-content-width":w?w+"px":void 0,...e.style}}),C&&a)}));function O(e){return e?"open":"closed"}const T=R,z=N,H=D,F="Accordion",P=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[S,U,B]=f(F),[K,L]=m(F,[B,E]),q=E(),G=t.forwardRef(((e,o)=>{const{type:r,...n}=e,a=n;return t.createElement(S.Provider,{scope:e.__scopeAccordion},"multiple"===r?t.createElement(Y,d({},n,{ref:o})):t.createElement(X,d({},a,{ref:o})))}));G.propTypes={type(e){const o=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):"multiple"===e.type&&"string"==typeof o?Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):"single"===e.type&&Array.isArray(o)?Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[M,W]=K(F),[J,Q]=K(F,{collapsible:!1}),X=t.forwardRef(((e,o)=>{const{value:r,defaultValue:n,onValueChange:a=(()=>{}),collapsible:i=!1,...l}=e,[s,c]=h({prop:r,defaultProp:n,onChange:a});return t.createElement(M,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:c,onItemClose:t.useCallback((()=>i&&c("")),[i,c])},t.createElement(J,{scope:e.__scopeAccordion,collapsible:i},t.createElement(oe,d({},l,{ref:o}))))})),Y=t.forwardRef(((e,o)=>{const{value:r,defaultValue:n,onValueChange:a=(()=>{}),...i}=e,[l=[],s]=h({prop:r,defaultProp:n,onChange:a}),c=t.useCallback((e=>s(((o=[])=>[...o,e]))),[s]),p=t.useCallback((e=>s(((o=[])=>o.filter((o=>o!==e))))),[s]);return t.createElement(M,{scope:e.__scopeAccordion,value:l,onItemOpen:c,onItemClose:p},t.createElement(J,{scope:e.__scopeAccordion,collapsible:!0},t.createElement(oe,d({},i,{ref:o}))))})),[Z,ee]=K(F),oe=t.forwardRef(((e,o)=>{const{__scopeAccordion:r,disabled:n,dir:a,orientation:i="vertical",...l}=e,s=t.useRef(null),m=p(s,o),u=U(r),f="ltr"===v(a),h=b(e.onKeyDown,(e=>{var o;if(!P.includes(e.key))return;const t=e.target,r=u().filter((e=>{var o;return!(null!==(o=e.ref.current)&&void 0!==o&&o.disabled)})),n=r.findIndex((e=>e.ref.current===t)),a=r.length;if(-1===n)return;e.preventDefault();let l=n;const s=a-1,c=()=>{l=n+1,l>s&&(l=0)},d=()=>{l=n-1,0>l&&(l=s)};switch(e.key){case"Home":l=0;break;case"End":l=s;break;case"ArrowRight":"horizontal"===i&&(f?c():d());break;case"ArrowDown":"vertical"===i&&c();break;case"ArrowLeft":"horizontal"===i&&(f?d():c());break;case"ArrowUp":"vertical"===i&&d()}null===(o=r[l%a].ref.current)||void 0===o||o.focus()}));return t.createElement(Z,{scope:r,disabled:n,direction:a,orientation:i},t.createElement(S.Slot,{scope:r},t.createElement(c.div,d({},l,{"data-orientation":i,ref:m,onKeyDown:n?void 0:h}))))})),te="AccordionItem",[re,ne]=K(te),ae="AccordionTrigger";function ie(e){return e?"open":"closed"}const le=t.forwardRef(((e,o)=>{const{__scopeAccordion:r,value:n,...a}=e,i=ee(te,r),l=W(te,r),s=q(r),c=y(),p=n&&l.value.includes(n)||!1,m=i.disabled||e.disabled;return t.createElement(re,{scope:r,open:p,disabled:m,triggerId:c},t.createElement(T,d({"data-orientation":i.orientation,"data-state":ie(p)},s,a,{ref:o,disabled:m,open:p,onOpenChange:e=>{e?l.onItemOpen(n):l.onItemClose(n)}})))})),se=t.forwardRef(((e,o)=>{const{__scopeAccordion:r,...n}=e,a=ee(F,r),i=ne("AccordionHeader",r);return t.createElement(c.h3,d({"data-orientation":a.orientation,"data-state":ie(i.open),"data-disabled":i.disabled?"":void 0},n,{ref:o}))})),ce=t.forwardRef(((e,o)=>{const{__scopeAccordion:r,...n}=e,a=ee(F,r),i=ne(ae,r),l=Q(ae,r),s=q(r);return t.createElement(S.ItemSlot,{scope:r},t.createElement(z,d({"aria-disabled":i.open&&!l.collapsible||void 0,"data-orientation":a.orientation,id:i.triggerId},s,n,{ref:o})))})),de=t.forwardRef(((e,o)=>{const{__scopeAccordion:r,...n}=e,a=ee(F,r),i=ne("AccordionContent",r),l=q(r);return t.createElement(H,d({role:"region","aria-labelledby":i.triggerId,"data-orientation":a.orientation},l,n,{ref:o,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}}))})),pe=x(G)`
|
|
2
|
+
border-radius: 6px;
|
|
3
|
+
background-color: ${({theme:e})=>e.colors.fill.surface};
|
|
4
|
+
box-shadow: 0px 2px 9px ${({theme:e})=>e.colors.border.normal};
|
|
5
|
+
`,me=x(le)`
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
margin-top: 1px;
|
|
8
|
+
direction: ${({theme:e})=>e.direction};
|
|
9
|
+
&:first-child {
|
|
10
|
+
margin-top: 0;
|
|
11
|
+
border-top-left-radius: 4px;
|
|
12
|
+
border-top-right-radius: 4px;
|
|
13
|
+
}
|
|
14
|
+
&:last-child {
|
|
15
|
+
border-bottom-left-radius: 4px;
|
|
16
|
+
border-bottom-right-radius: 4px;
|
|
17
|
+
}
|
|
18
|
+
&:focus-within {
|
|
19
|
+
position: relative;
|
|
20
|
+
z-index: 1;
|
|
21
|
+
box-shadow: 0px 2px 9px rgba(0, 0, 0, 0.1);
|
|
22
|
+
}
|
|
23
|
+
`,ue=x(se)`
|
|
24
|
+
display: flex;
|
|
25
|
+
margin: 0;
|
|
26
|
+
`,fe=x(ce)`
|
|
27
|
+
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
28
|
+
color: ${({theme:e})=>e.colors.text.primary};
|
|
29
|
+
line-height: ${({theme:e})=>e.typography.primary.lineHeight};
|
|
30
|
+
font-size: ${({theme:e})=>e.typography.primary.fontSize};
|
|
31
|
+
font-weight: ${({theme:e})=>e.typography.fontWeight.bold};
|
|
32
|
+
padding: 0 20px;
|
|
33
|
+
height: 45px;
|
|
34
|
+
flex: 1;
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: space-between;
|
|
38
|
+
background-color: ${({theme:e})=>e.colors.fill.surface};
|
|
39
|
+
border: unset;
|
|
40
|
+
.AccordionChevron {
|
|
41
|
+
fill: ${({theme:e})=>e.colors.text.primary};
|
|
42
|
+
transform: rotate(0deg);
|
|
43
|
+
transition: transform;
|
|
44
|
+
transition-duration: ${({theme:e})=>e.transitions.duration.standard};
|
|
45
|
+
transition-timing-function: ${({theme:e})=>e.transitions.easing.easeIn};
|
|
46
|
+
}
|
|
47
|
+
&:hover {
|
|
48
|
+
background-color: ${({theme:e})=>e.colors.fill.hover};
|
|
49
|
+
}
|
|
50
|
+
&[data-disabled] {
|
|
51
|
+
color: ${({theme:e})=>e.colors.text.disabled};
|
|
52
|
+
cursor: not-allowed;
|
|
53
|
+
pointer-events: none;
|
|
54
|
+
.AccordionChevron {
|
|
55
|
+
fill: ${({theme:e})=>e.colors.text.disabled};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
&[data-state='open'] > .AccordionChevron {
|
|
59
|
+
transform: rotate(180deg);
|
|
60
|
+
}
|
|
61
|
+
`,he=x(de)`
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
background-color: ${({theme:e})=>e.colors.fill.surface};
|
|
64
|
+
animation-duration: ${({theme:e})=>e.transitions.duration.standard};
|
|
65
|
+
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeIn};
|
|
66
|
+
&[data-state='open'] {
|
|
67
|
+
animation-name: ${A};
|
|
68
|
+
}
|
|
69
|
+
&[data-state='closed'] {
|
|
70
|
+
animation-name: ${w};
|
|
71
|
+
}
|
|
72
|
+
`;x(C)`
|
|
73
|
+
color: var(--violet-10);
|
|
74
|
+
transition-property: transform;
|
|
75
|
+
transition-duration: ${({theme:e})=>e.transitions.duration.standard};
|
|
76
|
+
transition-timing-function: ${({theme:e})=>e.transitions.easing.easeIn};
|
|
77
|
+
`;const be=({idAccessor:t="id",nameAccessor:r="name",renderContent:n,hideIcon:a=!1,renderTitle:i,options:l=[],value:s,onChange:c,defaultValue:d,...p})=>e(pe,{className:"AccordionRoot",type:"single",collapsible:!0,value:s,defaultValue:d,onValueChange:c,...p,children:l.map((l=>o(me,{className:"AccordionItem",value:l?.[t],disabled:l?.disabled,children:[e(ge,{hideIcon:a,children:i?i(l):l?.[r]}),e(ye,{children:n?n(l):null})]},l?.[t])))}),ge=t.forwardRef((({children:t,className:r,hideIcon:n,...a},i)=>e(ue,{className:"AccordionHeader",children:o(fe,{className:("AccordionTrigger "+(r??"")).trim(),...a,ref:i,children:[t,!n&&e(C,{className:"AccordionChevron"})]})}))),ye=t.forwardRef((({children:o,className:t,...r},n)=>e(he,{className:("AccordionContent "+(t??"")).trim(),...r,ref:n,children:o})));export{be as A};
|
package/lib/Accordion/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as default}from"./index-
|
|
1
|
+
export{A as default}from"./index-DWZzsz19.js";import"react/jsx-runtime";import"react";import"../index-CMYH5FSo.js";import"react-dom";import"../index-C4rPovji.js";import"../index-CPeDXpiy.js";import"../index-BU_6DIrR.js";import"../index-BIV37Xa7.js";import"../index-BlsNrOCO.js";import"../index-BxvGNAuC.js";import"../styled-components.browser.esm/index-C0QmrysB.js";import"../styles/index.js";import"../theme/index.js";import"../ChevronUp/index-CKehHeuG.js";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import{jsxs as e,jsx as i,Fragment as t}from"react/jsx-runtime";import n from"react";import{u as r,b as o,e as l}from"../styled-components.browser.esm/index-C0QmrysB.js";import{basicShow as s,IconButton as a,FreshLink as d}from"../styles/index.js";import{C as c}from"../Cross/index-C4zPPnG1.js";import{I as m}from"../Info/index-Dfu7wL_p.js";import{T as C}from"../Typography/index-CSIFThAy.js";const h=r.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
padding: 8px 12px;
|
|
5
|
+
gap: 12px;
|
|
6
|
+
width: 100%;
|
|
7
|
+
min-width: 320px;
|
|
8
|
+
font-size: 14px;
|
|
9
|
+
box-shadow: 0px -1px 0px 0px ${({level:e,theme:i})=>i.colors.semantic[e].border} inset;
|
|
10
|
+
color: ${({theme:e})=>e.colors.text.primary};
|
|
11
|
+
line-height: ${({theme:e})=>e.typography.primary.lineHeight};
|
|
12
|
+
font-weight: ${({theme:e})=>e.typography.primary.fontWeight};
|
|
13
|
+
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
14
|
+
border-bottom: 1px solid
|
|
15
|
+
${({level:e,theme:i})=>i.colors.semantic[e].border};
|
|
16
|
+
background-color: ${({level:e,theme:i})=>i.colors.semantic[e].bg};
|
|
17
|
+
animation-duration: ${({theme:e})=>e.transitions.duration.standard};
|
|
18
|
+
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeIn};
|
|
19
|
+
animation-name: ${s};
|
|
20
|
+
${({iconAlignment:e})=>o`
|
|
21
|
+
.alert-icon {
|
|
22
|
+
align-self: ${e};
|
|
23
|
+
margin-top: 2px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
${a} {
|
|
27
|
+
align-self: ${e};
|
|
28
|
+
}
|
|
29
|
+
`}
|
|
30
|
+
direction: ${({theme:e})=>e.direction};
|
|
31
|
+
`,p=r.div`
|
|
32
|
+
flex: 1;
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
gap: 4px;
|
|
36
|
+
direction: ${({theme:e})=>e.direction};
|
|
37
|
+
justify-content: ${({align:e})=>e};
|
|
38
|
+
& .alert-icon {
|
|
39
|
+
margin: 0 4px;
|
|
40
|
+
min-width: 18px;
|
|
41
|
+
}
|
|
42
|
+
`,f=n.forwardRef(((t,n)=>e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,ref:n,children:[i("rect",{width:"16",height:"16",fill:"white",fillOpacity:"0.01"}),i("path",{fill:t.fill,fillRule:"evenodd",clipRule:"evenodd",d:"M1 8C1 11.86 4.14 15 8 15H8.01C11.87 15 15.01 11.86 15.01 8C15.01 7.69 14.98 7.38 14.93 7C14.88 6.67 14.57 6.45 14.25 6.49C13.92 6.54 13.69 6.84 13.74 7.17C13.79 7.49 13.81 7.75 13.81 8C13.81 11.2 11.21 13.8 8.01 13.8C4.81 13.8 2.21 11.2 2.21 8C2.21 4.8 4.81 2.2 8.01 2.2C8.73 2.2 9.46 2.35 10.17 2.64C10.47 2.77 10.83 2.62 10.95 2.31C11.07 2.01 10.93 1.66 10.62 1.53C9.76 1.18 8.88 1 8 1C4.14 1 1 4.14 1 8ZM6.65003 10.35C6.76003 10.47 6.91003 10.53 7.07003 10.53L7.08003 10.54C7.23003 10.54 7.39003 10.47 7.50003 10.36L13.43 4.42997C13.66 4.18997 13.66 3.80997 13.43 3.57997C13.19 3.34997 12.81 3.34997 12.58 3.57997L7.08003 9.07997L5.49003 7.48997C5.25003 7.25997 4.88003 7.25997 4.64003 7.48997C4.41003 7.72997 4.41003 8.10997 4.64003 8.33997L6.65003 10.35Z"})]}))),g=n.forwardRef(((e,t)=>i("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:i("path",{fill:e.fill,fillRule:"evenodd",clipRule:"evenodd",d:"M2 10C2 5.58172 5.58172 2 10 2C12.1217 2 14.1566 2.84285 15.6569 4.34315C17.1571 5.84344 18 7.87827 18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10ZM3.4 10C3.4 13.6451 6.35492 16.6 10 16.6C13.6428 16.5945 16.5945 13.6428 16.6 10C16.6 6.35492 13.6451 3.4 10 3.4C6.35492 3.4 3.4 6.35492 3.4 10ZM9.34998 10.31V6.7C9.34998 6.44991 9.48339 6.21883 9.69998 6.09378C9.91656 5.96874 10.1834 5.96874 10.4 6.09378C10.6166 6.21883 10.75 6.44991 10.75 6.7V10.31C10.75 10.6966 10.4366 11.01 10.05 11.01C9.66338 11.01 9.34998 10.6966 9.34998 10.31ZM9 13.1099C9 12.53 9.4701 12.0599 10.05 12.0599C10.3327 12.0454 10.6083 12.1513 10.8084 12.3515C11.0086 12.5516 11.1145 12.8272 11.1 13.1099C11.1 13.6898 10.6299 14.1599 10.05 14.1599C9.4701 14.1599 9 13.6898 9 13.1099Z"})}))),x={error:n.forwardRef(((e,t)=>i("svg",{width:"20",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,ref:t,children:i("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.4512 4.21282L18.2812 12.6328C18.8466 13.608 18.8478 14.8111 18.2843 15.7874C17.7208 16.7638 16.6785 17.3646 15.5512 17.3628H5.87116C4.74387 17.3646 3.70157 16.7638 3.13805 15.7874C2.57454 14.8111 2.57572 13.608 3.14116 12.6328L7.97116 4.21282C8.5388 3.23717 9.58241 2.63696 10.7112 2.63696C11.8399 2.63696 12.8835 3.23717 13.4512 4.21282ZM15.5512 15.9628C16.1775 15.9675 16.758 15.6353 17.0712 15.0928V15.0528C17.3796 14.5027 17.3643 13.8283 17.0312 13.2928L12.1912 4.91282C11.8748 4.38629 11.3054 4.06421 10.6912 4.06421C10.0769 4.06421 9.50757 4.38629 9.19116 4.91282L4.35116 13.3328C4.03558 13.8753 4.03462 14.5452 4.34865 15.0885C4.66267 15.6319 5.2436 15.9655 5.87116 15.9628H15.5512ZM10.0112 10.6328V7.02282C10.0112 6.77273 10.1446 6.54164 10.3612 6.4166C10.5777 6.29156 10.8446 6.29156 11.0612 6.4166C11.2777 6.54164 11.4112 6.77273 11.4112 7.02282V10.6328C11.4112 11.0194 11.0978 11.3328 10.7112 11.3328C10.3246 11.3328 10.0112 11.0194 10.0112 10.6328ZM9.66116 13.4328C9.66116 12.8529 10.1313 12.3828 10.7112 12.3828C10.9938 12.3683 11.2694 12.4742 11.4696 12.6744C11.6697 12.8745 11.7757 13.1501 11.7612 13.4328C11.7612 14.0127 11.2911 14.4828 10.7112 14.4828C10.1313 14.4828 9.66116 14.0127 9.66116 13.4328Z",fill:e.fill})}))),success:f,info:m,warning:g},w=({onClose:r,children:o,level:s,onDisappear:m,data:f,icon:g,overideClassName:w,timeout:v=0,canDismiss:y=!0,alignContent:u="center",iconAlignment:b="center",...$})=>{const M=l(),Z=x[s],[L,R]=n.useState(!0);n.useEffect((()=>{v>0&&(L||R(!0),setTimeout((()=>{R(!1),m?.()}),v))}),[v]),n.useEffect((()=>{"string"==typeof o||"string"==typeof f?.message||$["aria-describedby"]||console.warn("The `aria-describedby` prop is required when the children of the Alert are not a string. This is to ensure that assistive technologies can announce the content of the alert. Please provide a valid `aria-describedby` prop to the Alert component.")}),[]);const j=f?.linkText?i(d,{target:"_blank",rel:"noreferrer",href:f?.href??"#",children:f.linkText}):i(t,{});return L?e(h,{level:s,iconAlignment:b,role:"alert","aria-describedby":"string"==typeof f?.message?f.message:void 0,...$,children:[e(p,{align:u,children:[g??i(Z,{className:"alert-icon",fill:M.colors.text.semantic[s]}),f?.message?e(C,{children:[f.message," ",j]}):o,!f?.message&&j]}),y&&i(a,{onClick:()=>{R(!1),r?.()},children:i(c,{fill:M.colors.text.primary})})]}):null};export{w as A};
|
package/lib/Alert/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as default}from"./index-
|
|
1
|
+
export{A as default}from"./index-oxjOxld6.js";import"react/jsx-runtime";import"react";import"../styled-components.browser.esm/index-C0QmrysB.js";import"../styles/index.js";import"../index-CMYH5FSo.js";import"react-dom";import"../theme/index.js";import"../Cross/index-C4zPPnG1.js";import"../Info/index-Dfu7wL_p.js";import"../Typography/index-CSIFThAy.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import r from"react";import{r as o,s,u as i,D as a,A as c,o as u,I as l,j as f,L as d}from"../styles/index-BiCrLDuu.js";import{e as p}from"../styled-components.browser.esm/index-C0QmrysB.js";import{a as h}from"../index-DP7HoUNK.js";import{StyledLabel as m,RequiredIndicator as y,IconButton as b}from"../styles/index.js";import{E as g}from"../ErrorText/index-ubIQN7S9.js";import{T as w}from"../TickIcon/index-S4-QXWz7.js";import{I as E}from"../TextArea/index-CCnB8zVu.js";import{L as O}from"../Loader/index-BBLEVbIM.js";var R=/^\s+|\s+$/g,S=/^[-+]0x[0-9a-f]+$/i,T=/^0b[01]+$/i,v=/^0o[0-7]+$/i,A=parseInt,x="object"==typeof self&&self&&self.Object===Object&&self,j="object"==typeof o&&o&&o.Object===Object&&o||x||Function("return this")(),C=Object.prototype.toString,N=Math.max,P=Math.min,L=function(){return j.Date.now()};function _(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function F(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==C.call(e)}(e))return NaN;if(_(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=_(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(R,"");var n=T.test(e);return n||v.test(e)?A(e.slice(2),n?2:8):S.test(e)?NaN:+e}var U=s((function(e,t,n){var r,o,s,i,a,c,u=0,l=!1,f=!1,d=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,s=o;return r=o=void 0,u=t,i=e.apply(s,n)}function h(e){var n=e-c;return void 0===c||n>=t||0>n||f&&e-u>=s}function m(){var e=L();if(h(e))return y(e);a=setTimeout(m,function(e){var n=t-(e-c);return f?P(n,s-(e-u)):n}(e))}function y(e){return a=void 0,d&&r?p(e):(r=o=void 0,i)}function b(){var e=L(),n=h(e);if(r=arguments,o=this,c=e,n){if(void 0===a)return function(e){return u=e,a=setTimeout(m,t),l?p(e):i}(c);if(f)return a=setTimeout(m,t),p(c)}return void 0===a&&(a=setTimeout(m,t)),i}return t=F(t)||0,_(n)&&(l=!!n.leading,s=(f="maxWait"in n)?N(F(n.maxWait)||0,t):s,d="trailing"in n?!!n.trailing:d),b.cancel=function(){void 0!==a&&clearTimeout(a),u=0,r=c=o=a=void 0},b.flush=function(){return void 0===a?i:y(L())},b}));function B(e,t){return function(){return e.apply(t,arguments)}}const{toString:D}=Object.prototype,{getPrototypeOf:k}=Object,I=(q=Object.create(null),e=>{const t=D.call(e);return q[t]||(q[t]=t.slice(8,-1).toLowerCase())});var q;const M=e=>(e=e.toLowerCase(),t=>I(t)===e),z=e=>t=>typeof t===e,{isArray:H}=Array,V=z("undefined"),J=M("ArrayBuffer"),W=z("string"),$=z("function"),K=z("number"),G=e=>null!==e&&"object"==typeof e,X=e=>{if("object"!==I(e))return!1;const t=k(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Q=M("Date"),Z=M("File"),Y=M("Blob"),ee=M("FileList"),te=M("URLSearchParams"),[ne,re,oe,se]=["ReadableStream","Request","Response","Headers"].map(M);function ie(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),H(e))for(r=0,o=e.length;o>r;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let i;for(r=0;s>r;r++)i=o[r],t.call(null,e[i],i,e)}}function ae(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const ce="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,ue=e=>!V(e)&&e!==ce,le=(fe="undefined"!=typeof Uint8Array&&k(Uint8Array),e=>fe&&e instanceof fe);var fe;const de=M("HTMLFormElement"),pe=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),he=M("RegExp"),me=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ie(n,((n,o)=>{let s;!1!==(s=t(n,o,e))&&(r[o]=s||n)})),Object.defineProperties(e,r)},ye="abcdefghijklmnopqrstuvwxyz",be="0123456789",ge={DIGIT:be,ALPHA:ye,ALPHA_DIGIT:ye+ye.toUpperCase()+be},we=M("AsyncFunction"),Ee=(Oe="function"==typeof setImmediate,Re=$(ce.postMessage),Oe?setImmediate:Re?(Se="axios@"+Math.random(),Te=[],ce.addEventListener("message",(({source:e,data:t})=>{e===ce&&t===Se&&Te.length&&Te.shift()()}),!1),e=>{Te.push(e),ce.postMessage(Se,"*")}):e=>setTimeout(e));var Oe,Re,Se,Te;const ve="undefined"!=typeof queueMicrotask?queueMicrotask.bind(ce):"undefined"!=typeof process&&process.nextTick||Ee;var Ae={isArray:H,isArrayBuffer:J,isBuffer:function(e){return null!==e&&!V(e)&&null!==e.constructor&&!V(e.constructor)&&$(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||$(e.append)&&("formdata"===(t=I(e))||"object"===t&&$(e.toString)&&""+e=="[object FormData]"))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&J(e.buffer),t},isString:W,isNumber:K,isBoolean:e=>!0===e||!1===e,isObject:G,isPlainObject:X,isReadableStream:ne,isRequest:re,isResponse:oe,isHeaders:se,isUndefined:V,isDate:Q,isFile:Z,isBlob:Y,isRegExp:he,isFunction:$,isStream:e=>G(e)&&$(e.pipe),isURLSearchParams:te,isTypedArray:le,isFileList:ee,forEach:ie,merge:function e(){const{caseless:t}=ue(this)&&this||{},n={},r=(r,o)=>{const s=t&&ae(n,o)||o;n[s]=X(n[s])&&X(r)?e(n[s],r):X(r)?e({},r):H(r)?r.slice():r};for(let e=0,t=arguments.length;t>e;e++)arguments[e]&&ie(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(ie(t,((t,r)=>{e[r]=n&&$(t)?B(t,n):t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,s,i;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],r&&!r(i,e,t)||a[i]||(t[i]=e[i],a[i]=!0);e=!1!==n&&k(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:I,kindOfTest:M,endsWith:(e,t,n)=>{e+="",(void 0===n||n>e.length)&&(n=e.length);const r=e.indexOf(t,n-=t.length);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(H(e))return e;let t=e.length;if(!K(t))return null;const n=Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:de,hasOwnProperty:pe,hasOwnProp:pe,reduceDescriptors:me,freezeMethods:e=>{me(e,((t,n)=>{if($(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;$(e[n])&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return H(e)?r(e):r((e+"").split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:ae,global:ce,isContextDefined:ue,ALPHABET:ge,generateString:(e=16,t=ge.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&$(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=[,,,,,,,,,,],n=(e,r)=>{if(G(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=H(e)?[]:{};return ie(e,((e,t)=>{const s=n(e,r+1);!V(s)&&(o[t]=s)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:we,isThenable:e=>e&&(G(e)||$(e))&&$(e.then)&&$(e.catch),setImmediate:Ee,asap:ve};function xe(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}Ae.inherits(xe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ae.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const je=xe.prototype,Ce={};function Ne(e){return Ae.isPlainObject(e)||Ae.isArray(e)}function Pe(e){return Ae.endsWith(e,"[]")?e.slice(0,-2):e}function Le(e,t,n){return e?e.concat(t).map((function(e,t){return e=Pe(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{Ce[e]={value:e}})),Object.defineProperties(xe,Ce),Object.defineProperty(je,"isAxiosError",{value:!0}),xe.from=(e,t,n,r,o,s)=>{const i=Object.create(je);return Ae.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),xe.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const _e=Ae.toFlatObject(Ae,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Fe(e,t,n){if(!Ae.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Ae.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Ae.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,s=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Ae.isSpecCompliantForm(t);if(!Ae.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Ae.isDate(e))return e.toISOString();if(!a&&Ae.isBlob(e))throw new xe("Blob is not supported. Use a Buffer instead.");return Ae.isArrayBuffer(e)||Ae.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(Ae.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Ae.isArray(e)&&function(e){return Ae.isArray(e)&&!e.some(Ne)}(e)||(Ae.isFileList(e)||Ae.endsWith(n,"[]"))&&(a=Ae.toArray(e)))return n=Pe(n),a.forEach((function(e,r){!Ae.isUndefined(e)&&null!==e&&t.append(!0===i?Le([n],r,s):null===i?n:n+"[]",c(e))})),!1;return!!Ne(e)||(t.append(Le(o,n,s),c(e)),!1)}const l=[],f=Object.assign(_e,{defaultVisitor:u,convertValue:c,isVisitable:Ne});if(!Ae.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Ae.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),Ae.forEach(n,(function(n,s){!0===(!(Ae.isUndefined(n)||null===n)&&o.call(t,n,Ae.isString(s)?s.trim():s,r,f))&&e(n,r?r.concat(s):[s])})),l.pop()}}(e),t}function Ue(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Be(e,t){this._pairs=[],e&&Fe(e,this,t)}const De=Be.prototype;function ke(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ie(e,t,n){if(!t)return e;const r=n&&n.encode||ke,o=n&&n.serialize;let s;if(s=o?o(t,n):Ae.isURLSearchParams(t)?""+t:new Be(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}De.append=function(e,t){this._pairs.push([e,t])},De.toString=function(e){const t=e?function(t){return e.call(this,t,Ue)}:Ue;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};class qe{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ae.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}var Me={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ze={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Be,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const He="undefined"!=typeof window&&"undefined"!=typeof document,Ve=(Je="undefined"!=typeof navigator&&navigator.product,He&&0>["ReactNative","NativeScript","NS"].indexOf(Je));var Je;const We="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,$e=He&&window.location.href||"http://localhost";var Ke={...Object.freeze({__proto__:null,hasBrowserEnv:He,hasStandardBrowserEnv:Ve,hasStandardBrowserWebWorkerEnv:We,origin:$e}),...ze};function Ge(e){function t(e,n,r,o){let s=e[o++];if("__proto__"===s)return!0;const i=Number.isFinite(+s),a=o>=e.length;return s=!s&&Ae.isArray(r)?r.length:s,a?(r[s]=Ae.hasOwnProp(r,s)?[r[s],n]:n,!i):(r[s]&&Ae.isObject(r[s])||(r[s]=[]),t(e,n,r[s],o)&&Ae.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;o>r;r++)s=n[r],t[s]=e[s];return t}(r[s])),!i)}if(Ae.isFormData(e)&&Ae.isFunction(e.entries)){const n={};return Ae.forEachEntry(e,((e,r)=>{t(function(e){return Ae.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const Xe={transitional:Me,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=Ae.isObject(e);if(o&&Ae.isHTMLForm(e)&&(e=new FormData(e)),Ae.isFormData(e))return r?JSON.stringify(Ge(e)):e;if(Ae.isArrayBuffer(e)||Ae.isBuffer(e)||Ae.isStream(e)||Ae.isFile(e)||Ae.isBlob(e)||Ae.isReadableStream(e))return e;if(Ae.isArrayBufferView(e))return e.buffer;if(Ae.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),""+e;let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return""+function(e,t){return Fe(e,new Ke.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Ke.isNode&&Ae.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer);if((s=Ae.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Fe(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(Ae.isString(e))try{return(0,JSON.parse)(e),Ae.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Xe.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Ae.isResponse(e)||Ae.isReadableStream(e))return e;if(e&&Ae.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw xe.from(e,xe.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ke.classes.FormData,Blob:Ke.classes.Blob},validateStatus:function(e){return e>=200&&300>e},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ae.forEach(["delete","get","head","post","put","patch"],(e=>{Xe.headers[e]={}}));const Qe=Ae.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ze=Symbol("internals");function Ye(e){return e&&(e+"").trim().toLowerCase()}function et(e){return!1===e||null==e?e:Ae.isArray(e)?e.map(et):e+""}function tt(e,t,n,r,o){return Ae.isFunction(r)?r.call(this,t,n):(o&&(t=n),Ae.isString(t)?Ae.isString(r)?-1!==t.indexOf(r):Ae.isRegExp(r)?r.test(t):void 0:void 0)}class nt{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Ye(t);if(!o)throw Error("header name must be a non-empty string");const s=Ae.findKey(r,o);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=et(e))}const s=(e,t)=>Ae.forEach(e,((e,n)=>o(e,n,t)));if(Ae.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(Ae.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Qe[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(Ae.isHeaders(e))for(const[t,r]of e.entries())o(r,t,n);else null!=e&&o(t,e,n);return this}get(e,t){if(e=Ye(e)){const n=Ae.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Ae.isFunction(t))return t.call(this,e,n);if(Ae.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ye(e)){const n=Ae.findKey(this,e);return!(!n||void 0===this[n]||t&&!tt(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Ye(e)){const o=Ae.findKey(n,e);!o||t&&!tt(0,n[o],o,t)||(delete n[o],r=!0)}}return Ae.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!tt(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return Ae.forEach(this,((r,o)=>{const s=Ae.findKey(n,o);if(s)return t[s]=et(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):(o+"").trim();i!==o&&delete t[o],t[i]=et(r),n[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Ae.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Ae.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Ze]=this[Ze]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Ye(e);t[r]||(function(e,t){const n=Ae.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return Ae.isArray(e)?e.forEach(r):r(e),this}}function rt(e,t){const n=this||Xe,r=t||n,o=nt.from(r.headers);let s=r.data;return Ae.forEach(e,(function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function ot(e){return!(!e||!e.__CANCEL__)}function st(e,t,n){xe.call(this,null==e?"canceled":e,xe.ERR_CANCELED,t,n),this.name="CanceledError"}function it(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new xe("Request failed with status code "+n.status,[xe.ERR_BAD_REQUEST,xe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}nt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ae.reduceDescriptors(nt.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),Ae.freezeMethods(nt),Ae.inherits(st,xe,{__CANCEL__:!0});const at=(e,t,n=3)=>{let r=0;const o=function(e,t){const n=Array(e=e||10),r=Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[i];o||(o=c),n[s]=a,r[s]=c;let l=i,f=0;for(;l!==s;)f+=n[l++],l%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),t>c-o)return;const d=u&&c-u;return d?Math.round(1e3*f/d):void 0}}(50,250);return function(e,t){let n,r,o=0,s=1e3/t;const i=(t,s=Date.now())=>{o=s,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-o;s>a?(n=e,r||(r=setTimeout((()=>{r=null,i(n)}),s-a))):i(e,t)},()=>n&&i(n)]}((n=>{const s=n.loaded,i=n.lengthComputable?n.total:void 0,a=s-r,c=o(a);r=s,e({loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&i>=s?(i-s)/c:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})}),n)},ct=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ut=e=>(...t)=>Ae.asap((()=>e(...t)));var lt=Ke.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=Ae.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0},ft=Ke.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];Ae.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),Ae.isString(r)&&i.push("path="+r),Ae.isString(o)&&i.push("domain="+o),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function dt(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const pt=e=>e instanceof nt?{...e}:e;function ht(e,t){const n={};function r(e,t,n){return Ae.isPlainObject(e)&&Ae.isPlainObject(t)?Ae.merge.call({caseless:n},e,t):Ae.isPlainObject(t)?Ae.merge({},t):Ae.isArray(t)?t.slice():t}function o(e,t,n){return Ae.isUndefined(t)?Ae.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function s(e,t){if(!Ae.isUndefined(t))return r(void 0,t)}function i(e,t){return Ae.isUndefined(t)?Ae.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,s){return s in t?r(n,o):s in e?r(void 0,n):void 0}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t)=>o(pt(e),pt(t),!0)};return Ae.forEach(Object.keys(Object.assign({},e,t=t||{})),(function(r){const s=c[r]||o,i=s(e[r],t[r],r);Ae.isUndefined(i)&&s!==a||(n[r]=i)})),n}var mt=e=>{const t=ht({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:c}=t;if(t.headers=a=nt.from(a),t.url=Ie(dt(t.baseURL,t.url),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Ae.isFormData(r))if(Ke.hasStandardBrowserEnv||Ke.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(Ke.hasStandardBrowserEnv&&(o&&Ae.isFunction(o)&&(o=o(t)),o||!1!==o&<(t.url))){const e=s&&i&&ft.read(i);e&&a.set(s,e)}return t},yt="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=mt(e);let o=r.data;const s=nt.from(r.headers).normalize();let i,a,c,u,l,{responseType:f,onUploadProgress:d,onDownloadProgress:p}=r;function h(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;function y(){if(!m)return;const r=nt.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());it((function(e){t(e),h()}),(function(e){n(e),h()}),{data:f&&"text"!==f&&"json"!==f?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=y:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(y)},m.onabort=function(){m&&(n(new xe("Request aborted",xe.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new xe("Network Error",xe.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new xe(t,(r.transitional||Me).clarifyTimeoutError?xe.ETIMEDOUT:xe.ECONNABORTED,e,m)),m=null},void 0===o&&s.setContentType(null),"setRequestHeader"in m&&Ae.forEach(s.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),Ae.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),f&&"json"!==f&&(m.responseType=r.responseType),p&&([c,l]=at(p,!0),m.addEventListener("progress",c)),d&&m.upload&&([a,u]=at(d),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(i=t=>{m&&(n(!t||t.type?new st(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);b&&-1===Ke.protocols.indexOf(b)?n(new xe("Unsupported protocol "+b+":",xe.ERR_BAD_REQUEST,e)):m.send(o||null)}))};const bt=(e,t)=>{let n,r=new AbortController;const o=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;r.abort(t instanceof xe?t:new st(t instanceof Error?t.message:t))}};let s=t&&setTimeout((()=>{o(new xe(`timeout ${t} of ms exceeded`,xe.ETIMEDOUT))}),t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach((e=>{e&&(e.removeEventListener?e.removeEventListener("abort",o):e.unsubscribe(o))})),e=null)};e.forEach((e=>e&&e.addEventListener&&e.addEventListener("abort",o)));const{signal:a}=r;return a.unsubscribe=i,[a,()=>{s&&clearTimeout(s),s=null}]},gt=function*(e,t){let n=e.byteLength;if(t>n)return void(yield e);let r,o=0;for(;n>o;)r=o+t,yield e.slice(o,r),o=r},wt=(e,t,n,r,o)=>{const s=async function*(e,t,n){for await(const r of e)yield*gt(ArrayBuffer.isView(r)?r:await n(r+""),t)}(e,t,o);let i,a=0,c=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await s.next();if(t)return c(),void e.close();if(n){let e=a+=r.byteLength;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw c(e),e}},cancel:e=>(c(e),s.return())},{highWaterMark:2})},Et="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ot=Et&&"function"==typeof ReadableStream,Rt=Et&&("function"==typeof TextEncoder?(St=new TextEncoder,e=>St.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var St;const Tt=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},vt=Ot&&Tt((()=>{let e=!1;const t=new Request(Ke.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),At=Ot&&Tt((()=>Ae.isReadableStream(new Response("").body))),xt={stream:At&&(e=>e.body)};var jt;Et&&(jt=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!xt[e]&&(xt[e]=Ae.isFunction(jt[e])?t=>t[e]():(t,n)=>{throw new xe(`Response type '${e}' is not supported`,xe.ERR_NOT_SUPPORT,n)})})));const Ct={http:null,xhr:yt,fetch:Et&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:l,withCredentials:f="same-origin",fetchOptions:d}=mt(e);u=u?(u+"").toLowerCase():"text";let p,h,[m,y]=o||s||i?bt([o,s],i):[];const b=()=>{!p&&setTimeout((()=>{m&&m.unsubscribe()})),p=!0};let g;try{if(c&&vt&&"get"!==n&&"head"!==n&&0!==(g=await(async(e,t)=>{const n=Ae.toFiniteNumber(e.getContentLength());return null==n?(async e=>null==e?0:Ae.isBlob(e)?e.size:Ae.isSpecCompliantForm(e)?(await new Request(e).arrayBuffer()).byteLength:Ae.isArrayBufferView(e)||Ae.isArrayBuffer(e)?e.byteLength:(Ae.isURLSearchParams(e)&&(e+=""),Ae.isString(e)?(await Rt(e)).byteLength:void 0))(t):n})(l,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(Ae.isFormData(r)&&(e=n.headers.get("content-type"))&&l.setContentType(e),n.body){const[e,t]=ct(g,at(ut(c)));r=wt(n.body,65536,e,t,Rt)}}Ae.isString(f)||(f=f?"include":"omit"),h=new Request(t,{...d,signal:m,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:f});let o=await fetch(h);const s=At&&("stream"===u||"response"===u);if(At&&(a||s)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=o[t]}));const t=Ae.toFiniteNumber(o.headers.get("content-length")),[n,r]=a&&ct(t,at(ut(a),!0))||[];o=new Response(wt(o.body,65536,n,(()=>{r&&r(),s&&b()}),Rt),e)}u=u||"text";let i=await xt[Ae.findKey(xt,u)||"text"](o,e);return!s&&b(),y&&y(),await new Promise(((t,n)=>{it(t,n,{data:i,headers:nt.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:h})}))}catch(t){if(b(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new xe("Network Error",xe.ERR_NETWORK,e,h),{cause:t.cause||t});throw xe.from(t,t&&t.code,e,h)}})};Ae.forEach(Ct,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Nt=e=>"- "+e,Pt=e=>Ae.isFunction(e)||null===e||!1===e;var Lt=e=>{e=Ae.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;t>s;s++){let t;if(n=e[s],r=n,!Pt(n)&&(r=Ct[(t=n+"").toLowerCase()],void 0===r))throw new xe(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+s]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new xe("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Nt).join("\n"):" "+Nt(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function _t(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new st(null,e)}function Ft(e){return _t(e),e.headers=nt.from(e.headers),e.data=rt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Lt(e.adapter||Xe.adapter)(e).then((function(t){return _t(e),t.data=rt.call(e,e.transformResponse,t),t.headers=nt.from(t.headers),t}),(function(t){return ot(t)||(_t(e),t&&t.response&&(t.response.data=rt.call(e,e.transformResponse,t.response),t.response.headers=nt.from(t.response.headers))),Promise.reject(t)}))}const Ut={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ut[e]=function(n){return typeof n===e||"a"+(1>t?"n ":" ")+e}}));const Bt={};Ut.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.4] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,s)=>{if(!1===e)throw new xe(r(o," has been removed"+(t?" in "+t:"")),xe.ERR_DEPRECATED);return t&&!Bt[o]&&(Bt[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}};var Dt={assertOptions:function(e,t,n){if("object"!=typeof e)throw new xe("options must be an object",xe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=t[s];if(i){const t=e[s],n=void 0===t||i(t,s,e);if(!0!==n)throw new xe("option "+s+" must be "+n,xe.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new xe("Unknown option "+s,xe.ERR_BAD_OPTION)}},validators:Ut};const kt=Dt.validators;class It{constructor(e){this.defaults=e,this.interceptors={request:new qe,response:new qe}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=Error();const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!(e.stack+"").endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ht(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&Dt.assertOptions(n,{silentJSONParsing:kt.transitional(kt.boolean),forcedJSONParsing:kt.transitional(kt.boolean),clarifyTimeoutError:kt.transitional(kt.boolean)},!1),null!=r&&(Ae.isFunction(r)?t.paramsSerializer={serialize:r}:Dt.assertOptions(r,{encode:kt.function,serialize:kt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&Ae.merge(o.common,o[t.method]);o&&Ae.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=nt.concat(s,o);const i=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,f=0;if(!a){const e=[Ft.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);l>f;)u=u.then(e[f++],e[f++]);return u}l=i.length;let d=t;for(f=0;l>f;){const e=i[f++],t=i[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=Ft(d)}catch(e){return Promise.reject(e)}for(f=0,l=c.length;l>f;)u=u.then(c[f++],c[f++]);return u}getUri(e){return Ie(dt((e=ht(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}Ae.forEach(["delete","get","head","options"],(function(e){It.prototype[e]=function(t,n){return this.request(ht(n||{},{method:e,url:t,data:(n||{}).data}))}})),Ae.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(ht(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}It.prototype[e]=t(),It.prototype[e+"Form"]=t(!0)}));class qt{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new st(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new qt((function(t){e=t})),cancel:e}}}const Mt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Mt).forEach((([e,t])=>{Mt[t]=e}));const zt=function e(t){const n=new It(t),r=B(It.prototype.request,n);return Ae.extend(r,It.prototype,n,{allOwnKeys:!0}),Ae.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(ht(t,n))},r}(Xe);zt.Axios=It,zt.CanceledError=st,zt.CancelToken=qt,zt.isCancel=ot,zt.VERSION="1.7.4",zt.toFormData=Fe,zt.AxiosError=xe,zt.Cancel=zt.CanceledError,zt.all=function(e){return Promise.all(e)},zt.spread=function(e){return function(t){return e.apply(null,t)}},zt.isAxiosError=function(e){return Ae.isObject(e)&&!0===e.isAxiosError},zt.mergeConfig=ht,zt.AxiosHeaders=nt,zt.formToJSON=e=>Ge(Ae.isHTMLForm(e)?new FormData(e):e),zt.getAdapter=Lt,zt.HttpStatusCode=Mt,zt.default=zt,zt.defaults.withCredentials=!0;const Ht=(e,t)=>{const n={},r=[];return e.forEach((e=>{e?.[t]&&(n?.[e[t]]||(n[e[t]]=e,r.push(e[t])))})),r.map((e=>n[e]))},Vt=o=>{const{items:s=[],disabled:R,id:S,label:T,errorText:v,name:A,placeholder:x,width:j,onChange:C,itemComponent:N,itemToString:P,searchKey:L="q",defaultSelectedItem:_,readOnly:F,itemIdentifier:B="id",isErrored:D,emptyItemsText:k,processFetchData:I,isRequired:q,style:M,url:z,headers:H}=o,V=p(),[J,W]=r.useState(!1),$=r.useRef(),[K,G]=r.useState(s),X=(e="")=>{if(h("AutoComplete getAndProcessData",{searchParam:e}),!z)return;const t=new URL(z),n=new URLSearchParams(t.search);n.append(L,e);const r=`${t.origin}${t.pathname}?${""+n}`;W(!0),(async(e,t,n,r,o,s)=>{try{const t=await zt({data:void 0,url:e,method:"GET",withCredentials:!1,responseType:void 0,headers:{"Content-Type":"application/json",...r||{}}});return t?.data}catch(e){return}})(r,0,0,H).then((t=>{if(Array.isArray(t)){const n=Ht([...""===e?[_]:[],...""===e?$.current??[]:[],...I?I(t):t,...""===e?s:[]],B);h("AutoComplete setLocalItems",{dataToSet:n,data:t,searchParam:e,cacheItems:$.current,items:s,itemIdentifier:B}),G(n)}W(!1)})).catch((()=>{W(!1)}))},Q=r.useCallback(U((e=>{X(e)}),300),[]),{isOpen:Z,selectedItem:Y,getToggleButtonProps:ee,getLabelProps:te,getMenuProps:ne,highlightedIndex:re,setInputValue:oe,getItemProps:se,getInputProps:ie}=i({id:S,selectedItem:_,items:K,onIsOpenChange:e=>{!e.isOpen&&e?.selectedItem&&oe(P(e.selectedItem))},onInputValueChange:e=>{Y?.[B]&&e.inputValue===P(Y)||_?.[B]&&e.inputValue===P(_)?Q(""):Q(e.inputValue)},itemToString:e=>e?P(e,"downshift"):"",onSelectedItemChange:e=>{h("AutoComplete onSelectedItemChange",{localItems:K}),$.current=Ht([e.selectedItem,...$.current??[]],B),C?.(e.selectedItem)}});r.useEffect((()=>{X("")}),[z]),h("AutoComplete",{localItems:K,isLoading:J,props:o});const ae=!R&&!F&&Z;return e(a,{width:j,children:[e(m,{className:"input-label",...te({disabled:R,readOnly:F}),children:[T,T&&q&&t(y,{children:"*"})]}),t(E,{...ie({name:A,readOnly:F,disabled:R}),placeholder:x,endAdornment:t(c,{children:t(b,{...ee({disabled:R,readOnly:F,"aria-label":"toggle-button"}),children:t(u,{$isOpen:ae,fill:V.colors.text.primary,width:8,height:8})})}),style:M}),!F&&!R&&t(l,{className:"ItemsContainer",$isOpen:Z,...ne({disabled:R,readOnly:F}),children:J?t(f,{children:t(O,{})}):e(n,{children:[Z&&0===K.length&&t(d,{readOnly:!0,children:k||"No items"}),Z&&K.map(((n,o)=>{const s="string"==typeof n?n:n?.[B];return t(r.Fragment,{children:N?N(n,{isHilighted:re===o,isSelected:Y===n,key:s,...se({item:n,index:o})}):e(d,{$isHilighted:re===o,$isSelected:Y?.[B]===n?.[B],...se({item:n,index:o}),children:[P(n),Y?.[B]===n?.[B]&&t(w,{fill:V.colors.common.accent})]},s)},s)}))]})}),D&&v&&t(g,{children:v})]})};export{Vt as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as default}from"./index-
|
|
1
|
+
export{A as default}from"./index-BmlcHm4c.js";import"react/jsx-runtime";import"react";import"../styles/index-BiCrLDuu.js";import"../index-CMYH5FSo.js";import"react-dom";import"../styled-components.browser.esm/index-C0QmrysB.js";import"../index-BU_6DIrR.js";import"../index-C4rPovji.js";import"../index-CPeDXpiy.js";import"../index-BxvGNAuC.js";import"../index-DeCfyRfZ.js";import"../Combination/index-BzcGtbDx.js";import"../index-BlsNrOCO.js";import"../index-Clx6_Re_.js";import"../index-DQKztTvn.js";import"../index-DZzFKxNs.js";import"../index-9P5loDNm.js";import"../styles/index.js";import"../theme/index.js";import"../ChevronUp/index-CKehHeuG.js";import"../index-DP7HoUNK.js";import"../ErrorText/index-ubIQN7S9.js";import"../TickIcon/index-S4-QXWz7.js";import"../TextArea/index-CCnB8zVu.js";import"../Loader/index-BBLEVbIM.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsxs as e,jsx as o,Fragment as r}from"react/jsx-runtime";import{StyledLabel as d,RequiredIndicator as i}from"../styles/index.js";import{$ as a,a as l,b as t}from"../index-BIDKqyo-.js";import{u as n}from"../styled-components.browser.esm/index-C0QmrysB.js";import{E as s}from"../ErrorText/index-ubIQN7S9.js";const c=n.div`
|
|
2
2
|
direction: ${({theme:e})=>e.direction};
|
|
3
|
-
`,n
|
|
3
|
+
`,p=n(a)`
|
|
4
4
|
display: flex;
|
|
5
5
|
gap: 8px;
|
|
6
6
|
width: 100%;
|
|
7
7
|
direction: ${({theme:e})=>e.direction};
|
|
8
|
-
`,
|
|
8
|
+
`,h=n.div`
|
|
9
9
|
width: 14px;
|
|
10
10
|
height: 14px;
|
|
11
11
|
border-radius: 50%;
|
|
@@ -16,13 +16,13 @@ import{u as e,j as o}from"../styled-components.browser.esm/index-8pR-v2ng.js";im
|
|
|
16
16
|
display: grid;
|
|
17
17
|
place-content: center;
|
|
18
18
|
background-color: ${({theme:e})=>e.colors.common.accent};
|
|
19
|
-
`,
|
|
19
|
+
`,m=n(l)`
|
|
20
20
|
display: block;
|
|
21
21
|
width: 6px;
|
|
22
22
|
height: 6px;
|
|
23
23
|
border-radius: 50%;
|
|
24
24
|
background-color: ${({theme:e})=>"dark"===e.mode?e.colors.common.black:e.colors.common.white};
|
|
25
|
-
`,
|
|
25
|
+
`,x=n(t)`
|
|
26
26
|
padding: 0;
|
|
27
27
|
margin: 0;
|
|
28
28
|
outline: none;
|
|
@@ -49,7 +49,7 @@ import{u as e,j as o}from"../styled-components.browser.esm/index-8pR-v2ng.js";im
|
|
|
49
49
|
box-shadow: 0 0 0 3px ${({theme:e})=>e.colors.border.hover}30;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
`,
|
|
52
|
+
`,b=n.div`
|
|
53
53
|
display: flex;
|
|
54
54
|
border-radius: 4px;
|
|
55
55
|
flex: 1;
|
|
@@ -77,21 +77,21 @@ import{u as e,j as o}from"../styled-components.browser.esm/index-8pR-v2ng.js";im
|
|
|
77
77
|
0px 0px 0px 1px;
|
|
78
78
|
border-color: ${({theme:e,$isErrored:o})=>o?e.colors.border.error:e.colors.border.active};
|
|
79
79
|
}
|
|
80
|
-
`,
|
|
80
|
+
`,g=n.span`
|
|
81
81
|
color: ${({theme:e})=>e.colors.text.primary};
|
|
82
82
|
font-weight: ${({theme:e})=>e.typography.fontWeight["semi-bold"]};
|
|
83
83
|
line-height: ${({theme:e})=>e.typography.primary.lineHeight};
|
|
84
84
|
font-size: ${({theme:e})=>e.typography.primary.fontSize};
|
|
85
85
|
white-space: nowrap;
|
|
86
86
|
overflow: hidden;
|
|
87
|
-
|
|
87
|
+
`,$=n.span`
|
|
88
88
|
color: ${({theme:e})=>e.colors.text.secondary};
|
|
89
89
|
font-weight: ${({theme:e})=>e.typography.fontWeight.regular};
|
|
90
90
|
line-height: ${({theme:e})=>e.typography.secondary.lineHeight};
|
|
91
91
|
font-size: ${({theme:e})=>e.typography.secondary.fontSize};
|
|
92
92
|
white-space: normal;
|
|
93
93
|
margin: 4px 0;
|
|
94
|
-
`,
|
|
94
|
+
`,u=n.label`
|
|
95
95
|
padding: ${({theme:e})=>"rtl"===e.direction?"12px 6px 12px 12px":"12px 12px 12px 6px"};
|
|
96
96
|
flex: 1;
|
|
97
97
|
display: flex;
|
|
@@ -103,4 +103,4 @@ import{u as e,j as o}from"../styled-components.browser.esm/index-8pR-v2ng.js";im
|
|
|
103
103
|
color: ${({theme:e})=>e.colors.text.secondary};
|
|
104
104
|
white-space: nowrap;
|
|
105
105
|
overflow: hidden;
|
|
106
|
-
|
|
106
|
+
`,y=({options:a,defaultValue:l,idAccessor:t="id",onChange:n,isErrored:y,errorText:f,disabled:v=!1,getTextContent:w,className:R,id:B,isRequired:k,readOnly:N,itemComponent:E,label:G,value:H,customIndicator:I,...z})=>e(c,{className:"StyledBoxedRadio",children:[G&&e(d,{htmlFor:B,className:"input-label",children:[G,G&&k&&o(i,{children:"*"})]}),o(p,{defaultValue:l,value:H,onValueChange:e=>n?.(e),"aria-readonly":N,id:B,"aria-label":G,"aria-labelledby":B,"aria-invalid":y,className:("BoxedRadioGroupRoot "+(R??"")).trim(),...z,children:a?.map((d=>{const i=w?.(d,"name")??"",a=w?.(d,"description")??"";return e(b,{$isErrored:!1,disabled:d.disabled||v,className:("BoxedRadioContainer "+(H===d?.[t]?"selected":"")).trim(),children:[o(x,{className:"BoxedRadioGroupItem",disabled:d.disabled||v,value:d?.[t],id:d?.[t],"aria-label":i,hasDescription:!!a,children:o(h,{hasDescription:!!a,className:"BoxedRadioGroupIndicatorHolder",children:I??o(m,{className:"BoxedRadioGroupIndicator"})})}),o(u,{className:"BoxedRadioLabel",htmlFor:d?.[t],children:E?E(d):e(r,{children:[a?o(g,{className:"BoxedRadioLabelHeading",children:i}):o(r,{children:i}),a&&o($,{className:"BoxedRadioLabelDescription",children:a})]})})]},d?.[t])}))}),y&&f&&o(s,{children:f})]});export{y as B};
|
package/lib/BoxedRadio/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{B as default}from"./index-
|
|
1
|
+
export{B as default}from"./index-BKhNJa4c.js";import"react/jsx-runtime";import"../styles/index.js";import"../index-CMYH5FSo.js";import"react";import"react-dom";import"../styled-components.browser.esm/index-C0QmrysB.js";import"../theme/index.js";import"../index-BIDKqyo-.js";import"../index-BU_6DIrR.js";import"../index-C4rPovji.js";import"../index-Bx5-p2x9.js";import"../index-CPeDXpiy.js";import"../index-BlsNrOCO.js";import"../index-BxvGNAuC.js";import"../index-DQKztTvn.js";import"../index-DZzFKxNs.js";import"../index-BIV37Xa7.js";import"../ErrorText/index-ubIQN7S9.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as e,Fragment as o}from"react/jsx-runtime";import t from"react";import{u as n}from"../styled-components.browser.esm/index-C0QmrysB.js";const r={large:{height:"45px",size:"16px"},mini:{height:"24px",size:"12px"},normal:{height:"32px",size:"14px"}},i=n.button`
|
|
2
2
|
direction: ${({theme:e})=>e.direction};
|
|
3
3
|
font-weight: ${({theme:e})=>e.typography.fontWeight["semi-bold"]};
|
|
4
4
|
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
@@ -14,9 +14,9 @@ import{u as e,j as o}from"../styled-components.browser.esm/index-8pR-v2ng.js";im
|
|
|
14
14
|
95.75%
|
|
15
15
|
);
|
|
16
16
|
color: ${({theme:e,$variant:o})=>e.components.button[o].color};
|
|
17
|
-
height: ${({$size:e})=>
|
|
17
|
+
height: ${({$size:e})=>r[e].height};
|
|
18
18
|
line-height: 1.3;
|
|
19
|
-
font-size: ${({$size:e})=>
|
|
19
|
+
font-size: ${({$size:e})=>r[e].size};
|
|
20
20
|
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
|
|
21
21
|
white-space: nowrap;
|
|
22
22
|
padding: 0 12px;
|
|
@@ -38,4 +38,4 @@ import{u as e,j as o}from"../styled-components.browser.esm/index-8pR-v2ng.js";im
|
|
|
38
38
|
94.46%
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
|
-
`,
|
|
41
|
+
`,a=t.forwardRef((({size:o="normal",variant:n="primary",children:r="",loading:a=!1,inline:s=!0,...l},c)=>(t.useEffect((()=>{"string"==typeof r||l["aria-label"]||console.warn("The `aria-label` prop is required when the children of the Button are not a string. This is to ensure that assistive technologies can announce the content of the button. Please provide a valid `aria-describedby` prop to the Button component.")}),[]),e(i,{$size:o,$variant:n,$inline:s,disabled:l.disabled||a,"aria-disabled":l.disabled||a,"aria-label":"string"==typeof r?r:void 0,role:"button",...l,ref:c,children:a?e(d,{}):r})))),d=()=>e(o,{children:"..."});export{a as B};
|
package/lib/Button/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{B as default}from"./index-
|
|
1
|
+
export{B as default}from"./index-BpLzsQjT.js";import"react/jsx-runtime";import"react";import"../styled-components.browser.esm/index-C0QmrysB.js";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{jsxs as i,jsx as e}from"react/jsx-runtime";import{u as r,e as o}from"../styled-components.browser.esm/index-C0QmrysB.js";import{a as d,b as t,c as n,d as a,D as s}from"../styles/index-C3oeoCWp.js";import{B as l}from"../Button/index-BpLzsQjT.js";import{C as m}from"../ChevronUp/index-CKehHeuG.js";const c=r.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
direction: ${({theme:i})=>i.direction};
|
|
4
|
+
`,p=r(m)`
|
|
5
|
+
transform: rotate(180deg);
|
|
6
|
+
path {
|
|
7
|
+
fill: ${({theme:i,variant:e})=>i.components.button[e].color};
|
|
8
|
+
}
|
|
9
|
+
`,b=r(l)`
|
|
10
|
+
border-radius: ${({theme:i})=>"ltr"===i.direction?"4px 0 0 4px":"0 4px 4px 0"} !important;
|
|
11
|
+
padding: 0 8px;
|
|
12
|
+
border-right: ${({theme:i,variant:e})=>"ltr"===i.direction?"1px solid "+i.components.button[e].borderColor:void 0};
|
|
13
|
+
border-left: ${({theme:i,variant:e})=>"rtl"===i.direction?"1px solid "+i.components.button[e].borderColor:void 0};
|
|
14
|
+
`,h=r(l)`
|
|
15
|
+
border-radius: ${({theme:i})=>"ltr"===i.direction?"0 4px 4px 0":"4px 0 0 4px"} !important;
|
|
16
|
+
padding: 0 8px;
|
|
17
|
+
border-left: ${({theme:i})=>"ltr"===i.direction?"0":void 0};
|
|
18
|
+
border-right: ${({theme:i})=>"rtl"===i.direction?"0":void 0};
|
|
19
|
+
`,f=({size:r="normal",variant:l="primary",loading:m=!1,inline:f=!0,defaultSelectedItem:x,idAccessor:v="id",nameAccessor:g="name",onClick:u,options:C,side:$="bottom",sideOffset:y=4,align:j,alignOffset:w,arrowPadding:O,avoidCollisions:z,disabled:A,id:B,name:D})=>{const k=o();return i(c,{children:[e(b,{id:B,name:D,size:r,variant:l,inline:f,disabled:A||m,"aria-disabled":A||m,onClick:i=>u?.(x,i),"aria-describedby":"string"===(typeof x?.[g]??C?.[0]?.[g])?x?.[g]??C?.[0]?.[g]:void 0,children:e("span",{children:x?.[g]??C?.[0]?.[g]??""})}),i(d,{children:[e(t,{asChild:!0,children:e(h,{id:B+"-more",name:D+"-more",size:r,variant:l,inline:f,disabled:A||m,"aria-disabled":A||m,"aria-label":"Additional options",children:e(p,{variant:l})})}),e(n,{children:e(a,{side:$,sideOffset:y,align:j??"ltr"===k.direction?"end":"start",alignOffset:w,arrowPadding:O,avoidCollisions:z,className:"DropdownMenuContent",children:(C?.filter((i=>i?.[v]!==x?.[v]))??[]).map((i=>e(s,{id:i?.[v],disabled:i?.disabled,className:"DropdownMenuItem",onSelect:()=>u?.(i),children:i?.[g]},i?.[v])))})})]})]})};export{f as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{B as default}from"./index-
|
|
1
|
+
export{B as default}from"./index-DhICMI8D.js";import"react/jsx-runtime";import"../styled-components.browser.esm/index-C0QmrysB.js";import"react";import"../styles/index-C3oeoCWp.js";import"../index-CMYH5FSo.js";import"react-dom";import"../index-BU_6DIrR.js";import"../index-C4rPovji.js";import"../index-CPeDXpiy.js";import"../index-BxvGNAuC.js";import"../index-DeCfyRfZ.js";import"../Combination/index-BzcGtbDx.js";import"../index-Clx6_Re_.js";import"../index-DQKztTvn.js";import"../index-BIV37Xa7.js";import"../index-Bx5-p2x9.js";import"../index-BlsNrOCO.js";import"../styles/index.js";import"../theme/index.js";import"../Button/index-BpLzsQjT.js";import"../ChevronUp/index-CKehHeuG.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{u as o}from"../styled-components.browser.esm/index-C0QmrysB.js";const r=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-wrap: wrap;
|
|
4
4
|
flex-direction: ${({theme:e})=>"rtl"===e.direction?"row-reverse":"row"};
|
|
5
5
|
gap: 10px;
|
|
6
6
|
margin: 0;
|
|
7
7
|
padding: 0;
|
|
8
|
-
`,t=
|
|
8
|
+
`,t=o.button`
|
|
9
9
|
font-family: ${({theme:e})=>e.typography.fontFamily};
|
|
10
10
|
font-size: ${({theme:e})=>e.typography.primary.fontSize};
|
|
11
11
|
font-weight: ${({theme:e})=>e.typography.primary.fontWeight};
|
|
@@ -37,4 +37,4 @@ import{u as e,j as o}from"../styled-components.browser.esm/index-8pR-v2ng.js";co
|
|
|
37
37
|
box-shadow: none;
|
|
38
38
|
border-color: ${({theme:e})=>e.components.button.secondary.disabledBorderColor};
|
|
39
39
|
}
|
|
40
|
-
`,s=({value:
|
|
40
|
+
`,s=({value:o={},items:s,onChange:n,idAccessor:i="id",nameAccessor:d="name",disabled:l})=>{const a=e=>{if(l)return;const r={...o};r[e]=!r[e],n?.(r)};return e(r,{role:"group",children:s.map(((r,s)=>e(t,{id:r?.[i],"aria-label":r?.[d],value:r?.[i],tabIndex:0,type:"button","aria-disabled":!!r?.disabled||l,disabled:!!r?.disabled||l,"aria-pressed":!!o?.[r?.[i]],$isSelected:!!o?.[r?.[i]],onKeyDown:e=>{console.log("onKeyDown",{event:e,key:e.key})," "!==e.key&&"Enter"!==e.key||(a(r?.[i]),e.preventDefault())},onClick:()=>a(r?.[i]),children:r?.[d]},s)))})};export{s as C};
|
package/lib/Calendar/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{C as default}from"./index-
|
|
1
|
+
export{C as default}from"./index-CKS6Vs4K.js";import"react/jsx-runtime";import"../styled-components.browser.esm/index-C0QmrysB.js";import"react";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{u as o,b as r,e as n}from"../styled-components.browser.esm/index-C0QmrysB.js";import{InputLabel as a,RequiredIndicator as i}from"../styles/index.js";import{$ as d,a as c,_ as s}from"../index-CMYH5FSo.js";import l,{forwardRef as m,useState as h,useRef as p,useEffect as b,createElement as u}from"react";import{$ as x}from"../index-C4rPovji.js";import{a as f,$ as k}from"../index-BU_6DIrR.js";import{$ as g}from"../index-DZzFKxNs.js";import{$ as y}from"../index-DQKztTvn.js";import{$ as v}from"../index-BIV37Xa7.js";import{T as w}from"../TickIcon/index-S4-QXWz7.js";const C="Checkbox",[$,j]=x(C),[E,q]=$(C),N=m(((e,t)=>{const{__scopeCheckbox:o,name:r,checked:n,defaultChecked:a,required:i,disabled:l,value:m="on",onCheckedChange:x,...g}=e,[y,v]=h(null),w=d(t,(e=>v(e))),C=p(!1),$=!y||!!y.closest("form"),[j=!1,q]=f({prop:n,defaultProp:a,onChange:x}),N=p(j);return b((()=>{const e=null==y?void 0:y.form;if(e){const t=()=>q(N.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[y,q]),u(E,{scope:o,state:j,disabled:l},u(c.button,s({type:"button",role:"checkbox","aria-checked":I(j)?"mixed":j,"aria-required":i,"data-state":L(j),"data-disabled":l?"":void 0,disabled:l,value:m},g,{ref:w,onKeyDown:k(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:k(e.onClick,(e=>{q((e=>!!I(e)||!e)),$&&(C.current=e.isPropagationStopped(),C.current||e.stopPropagation())}))})),$&&u(D,{control:y,bubbles:!C.current,name:r,value:m,checked:j,required:i,disabled:l,style:{transform:"translateX(-100%)"}}))})),D=e=>{const{control:t,checked:o,bubbles:r=!0,...n}=e,a=p(null),i=g(o),d=y(t);return b((()=>{const e=a.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==o&&n){const t=new Event("click",{bubbles:r});e.indeterminate=I(o),n.call(e,!I(o)&&o),e.dispatchEvent(t)}}),[i,o,r]),u("input",s({type:"checkbox","aria-hidden":!0,defaultChecked:!I(o)&&o},n,{tabIndex:-1,ref:a,style:{...e.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function I(e){return"indeterminate"===e}function L(e){return I(e)?"indeterminate":e?"checked":"unchecked"}const P=N,_=o(m(((e,t)=>{const{__scopeCheckbox:o,forceMount:r,...n}=e,a=q("CheckboxIndicator",o);return u(v,{present:r||I(a.state)||!0===a.state},u(c.span,s({"data-state":L(a.state),"data-disabled":a.disabled?"":void 0},n,{ref:t,style:{pointerEvents:"none",...e.style}})))})))`
|
|
2
|
+
display: grid;
|
|
3
|
+
place-content: center;
|
|
4
|
+
|
|
5
|
+
&[data-state='unchecked'] {
|
|
6
|
+
svg.toggle-on {
|
|
7
|
+
display: none;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
`,O=o.div`
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
direction: ${({theme:e})=>e.direction};
|
|
14
|
+
`,R=o(P)`
|
|
15
|
+
margin: 0;
|
|
16
|
+
padding: 0;
|
|
17
|
+
width: 14px;
|
|
18
|
+
height: 14px;
|
|
19
|
+
border-radius: 2px;
|
|
20
|
+
display: grid;
|
|
21
|
+
place-content: center;
|
|
22
|
+
border: 1px solid;
|
|
23
|
+
outline-offset: 3px;
|
|
24
|
+
direction: ${({theme:e})=>e.direction};
|
|
25
|
+
box-shadow: 0px 1px 2px 0px ${({theme:e})=>e.colors.border.hover}05
|
|
26
|
+
inset;
|
|
27
|
+
&[data-disabled] {
|
|
28
|
+
opacity: 0.5;
|
|
29
|
+
}
|
|
30
|
+
&[data-state='checked'],
|
|
31
|
+
&[data-state='indeterminate'] {
|
|
32
|
+
background-color: ${({theme:e})=>e.colors.common.accent};
|
|
33
|
+
border-color: ${({theme:e})=>e.colors.common.accent};
|
|
34
|
+
}
|
|
35
|
+
&[data-state='unchecked'] {
|
|
36
|
+
background-color: unset;
|
|
37
|
+
border-color: ${({theme:e})=>e.colors.border.hover};
|
|
38
|
+
}
|
|
39
|
+
&:not([data-disabled]) {
|
|
40
|
+
&:hover {
|
|
41
|
+
box-shadow: 0 0 0 3px ${({theme:e})=>e.colors.border.hover}30;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
${({theme:e})=>"dark"===e.mode&&r`
|
|
46
|
+
&[data-state='indeterminate'] {
|
|
47
|
+
background-color: ${({theme:e})=>e.colors.text.primary};
|
|
48
|
+
border-color: ${({theme:e})=>e.colors.text.primary};
|
|
49
|
+
}
|
|
50
|
+
`}
|
|
51
|
+
`,T=l.forwardRef(((t,o)=>e("svg",{width:"24",height:"7",viewBox:"0 0 24 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,ref:o,children:e("rect",{y:"0.25",width:"24",height:"6",rx:"3",fill:t.fill||"currentcolor"})}))),K=({isRequired:o,isErrored:r,className:d,readOnly:c,label:s,...l})=>{const m=n();return t(O,{children:[e(R,{className:("CheckboxRoot "+(d??"")).trim(),required:o,"aria-invalid":r,"aria-label":s||"Checkbox","aria-required":o,"aria-readonly":c,"aria-disabled":l.disabled,dir:m.direction,...l,children:e(_,{className:"CheckboxIndicator",children:"indeterminate"===l.checked?e(T,{className:"toggle-indeterminate",width:8,height:6,fill:"dark"===m.mode?m.colors.common.black:m.colors.common.white}):e(w,{className:"toggle-on",width:8,height:6,fill:"dark"===m.mode?m.colors.common.black:m.colors.common.white})})}),s&&t(a,{className:"CheckboxLabel",htmlFor:l.id,children:[s,s&&o&&e(i,{children:"*"})]})]})};export{K as C};
|
package/lib/Checkbox/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{C as default}from"./index-
|
|
1
|
+
export{C as default}from"./index-Bezq0rI-.js";import"react/jsx-runtime";import"../styled-components.browser.esm/index-C0QmrysB.js";import"react";import"../styles/index.js";import"../index-CMYH5FSo.js";import"react-dom";import"../theme/index.js";import"../index-C4rPovji.js";import"../index-BU_6DIrR.js";import"../index-DZzFKxNs.js";import"../index-DQKztTvn.js";import"../index-BIV37Xa7.js";import"../TickIcon/index-S4-QXWz7.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import t from"react";const e=t.forwardRef(((t,e)=>r("svg",{width:"8",height:"6",viewBox:"0 0 8 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,ref:e,children:r("path",{d:"M0.696495 5.3465C0.882365 5.34499 1.06086 5.27359 1.19649 5.1465L3.99649 2.3365L6.79649 5.1465C7.07264 5.42264 7.52035 5.42264 7.79649 5.1465C8.07264 4.87035 8.07264 4.42264 7.79649 4.1465L4.49649 0.856495C4.36483 0.722118 4.18462 0.646393 3.99649 0.646393C3.80837 0.646393 3.62816 0.722118 3.49649 0.856495L0.206495 4.1465C0.00332102 4.34556 -0.0591904 4.64778 0.0483378 4.91112C0.155867 5.17445 0.412052 5.34654 0.696495 5.3465Z",fill:t.fill})})));export{e as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{useEffect as n,forwardRef as t,useState as r,useRef as o,useCallback as a,createElement as c}from"react";import{$ as i,a as u,_ as l}from"../index-CMYH5FSo.js";import{b as s}from"../index-BCBGGtXO.js";import{c as d,f,g as v}from"../styled-components.browser.esm/index-8pR-v2ng.js";let m=0;function p(){n((()=>{var e,n;const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=t[0])&&void 0!==e?e:h()),document.body.insertAdjacentElement("beforeend",null!==(n=t[1])&&void 0!==n?n:h()),m++,()=>{1===m&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),m--}}),[])}function h(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const g="focusScope.autoFocusOnMount",y="focusScope.autoFocusOnUnmount",E={bubbles:!1,cancelable:!0},b=t(((e,t)=>{const{loop:d=!1,trapped:f=!1,onMountAutoFocus:v,onUnmountAutoFocus:m,...p}=e,[h,b]=r(null),S=s(v),x=s(m),A=o(null),L=i(t,(e=>b(e))),N=o({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;n((()=>{if(f){function e(e){if(N.paused||!h)return;const n=e.target;h.contains(n)?A.current=n:k(A.current,{select:!0})}function n(e){if(N.paused||!h)return;const n=e.relatedTarget;null!==n&&(h.contains(n)||k(A.current,{select:!0}))}function t(e){if(document.activeElement===document.body)for(const n of e)n.removedNodes.length>0&&k(h)}document.addEventListener("focusin",e),document.addEventListener("focusout",n);const r=new MutationObserver(t);return h&&r.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",n),r.disconnect()}}}),[f,h,N.paused]),n((()=>{if(h){T.add(N);const e=document.activeElement;if(!h.contains(e)){const n=new CustomEvent(g,E);h.addEventListener(g,S),h.dispatchEvent(n),n.defaultPrevented||(function(e,{select:n=!1}={}){const t=document.activeElement;for(const r of e)if(k(r,{select:n}),document.activeElement!==t)return}(w(h).filter((e=>"A"!==e.tagName)),{select:!0}),document.activeElement===e&&k(h))}return()=>{h.removeEventListener(g,S),setTimeout((()=>{const n=new CustomEvent(y,E);h.addEventListener(y,x),h.dispatchEvent(n),n.defaultPrevented||k(null!=e?e:document.body,{select:!0}),h.removeEventListener(y,x),T.remove(N)}),0)}}}),[h,S,x,N]);const M=a((e=>{if(!d&&!f)return;if(N.paused)return;const n=document.activeElement;if("Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&n){const t=e.currentTarget,[r,o]=function(e){const n=w(e);return[C(n,e),C(n.reverse(),e)]}(t);r&&o?e.shiftKey||n!==o?e.shiftKey&&n===r&&(e.preventDefault(),d&&k(o,{select:!0})):(e.preventDefault(),d&&k(r,{select:!0})):n===t&&e.preventDefault()}}),[d,f,N.paused]);return c(u.div,l({tabIndex:-1},p,{ref:L,onKeyDown:M}))}));function w(e){const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.disabled||e.hidden||"INPUT"===e.tagName&&"hidden"===e.type||0>e.tabIndex?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT});for(;t.nextNode();)n.push(t.currentNode);return n}function C(e,n){for(const t of e)if(!S(t,{upTo:n}))return t}function S(e,{upTo:n}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==n&&e===n)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function k(e,{select:n=!1}={}){if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&n&&e.select()}}const T=function(){let e=[];return{add(n){const t=e[0];n!==t&&(null==t||t.pause()),e=x(e,n),e.unshift(n)},remove(n){var t;e=x(e,n),null===(t=e[0])||void 0===t||t.resume()}}}();function x(e,n){const t=[...e],r=t.indexOf(n);return-1!==r&&t.splice(r,1),t}var A=new WeakMap,L=new WeakMap,N={},M=0,R=function(e){return e&&(e.host||R(e.parentNode))},W=function(e,n,t){void 0===t&&(t="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),function(e,n,t,r){var o=function(e,n){return n.map((function(n){if(e.contains(n))return n;var t=R(n);return t&&e.contains(t)?t:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return!!e}))}(n,Array.isArray(e)?e:[e]);N[t]||(N[t]=new WeakMap);var a=N[t],c=[],i=new Set,u=new Set(o),l=function(e){e&&!i.has(e)&&(i.add(e),l(e.parentNode))};o.forEach(l);var s=function(e){e&&!u.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(i.has(e))s(e);else{var n=e.getAttribute(r),o=null!==n&&"false"!==n,u=(A.get(e)||0)+1,l=(a.get(e)||0)+1;A.set(e,u),a.set(e,l),c.push(e),1===u&&o&&L.set(e,!0),1===l&&e.setAttribute(t,"true"),o||e.setAttribute(r,"true")}}))};return s(n),i.clear(),M++,function(){c.forEach((function(e){var n=A.get(e)-1,o=a.get(e)-1;A.set(e,n),a.set(e,o),n||(L.has(e)||e.removeAttribute(r),L.delete(e)),o||e.removeAttribute(t)})),--M||(A=new WeakMap,A=new WeakMap,L=new WeakMap,N={})}}(r,o,t,"aria-hidden")):function(){return null}},I="right-scroll-bar-position",P="width-before-scroll-bar";function _(e){return e}var F=function(n){var t=n.sideCar,r=f(n,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw Error("Sidecar medium not found");return e.createElement(o,d({},r))};F.isSideCarExport=!0;var B=function(e){void 0===e&&(e={});var n=function(e,n){void 0===n&&(n=_);var t=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:null},useMedium:function(e){var o=n(e,r);return t.push(o),function(){t=t.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;t.length;){var n=t;t=[],n.forEach(e)}t={push:function(n){return e(n)},filter:function(){return t}}},assignMedium:function(e){r=!0;var n=[];if(t.length){var o=t;t=[],o.forEach(e),n=t}var a=function(){var t=n;n=[],t.forEach(e)},c=function(){return Promise.resolve().then(a)};c(),t={push:function(e){n.push(e),c()},filter:function(e){return n=n.filter(e),t}}}}}();return n.options=d({async:!0,ssr:!1},e),n}(),D=function(){},j=e.forwardRef((function(n,t){var o=e.useRef(null),a=e.useState({onScrollCapture:D,onWheelCapture:D,onTouchMoveCapture:D}),c=a[0],i=a[1],u=n.forwardProps,l=n.children,s=n.className,v=n.removeScrollBar,m=n.enabled,p=n.shards,h=n.sideCar,g=n.noIsolation,y=n.inert,E=n.allowPinchZoom,b=n.as,w=void 0===b?"div":b,C=f(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),S=h,k=function(e,n){return t=function(n){return e.forEach((function(e){return function(e,n){return"function"==typeof e?e(n):e&&(e.current=n),e}(e,n)}))},(o=r((function(){return{value:null,callback:t,facade:{get current(){return o.value},set current(e){var n=o.value;n!==e&&(o.value=e,o.callback(e,n))}}}}))[0]).callback=t,o.facade;var t,o}([o,t]),T=d(d({},C),c);return e.createElement(e.Fragment,null,m&&e.createElement(S,{sideCar:B,removeScrollBar:v,shards:p,noIsolation:g,inert:y,setCallbacks:i,allowPinchZoom:!!E,lockRef:o}),u?e.cloneElement(e.Children.only(l),d(d({},T),{ref:k})):e.createElement(w,d({},T,{className:s,ref:k}),l))}));j.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},j.classNames={fullWidth:P,zeroRight:I};var K=function(){var e=0,n=null;return{add:function(t){var r,o;0==e&&(n=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return n&&e.setAttribute("nonce",n),e}())&&(o=t,(r=n).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(n)),e++},remove:function(){! --e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},X=function(){var n,t=(n=K(),function(t,r){e.useEffect((function(){return n.add(t),function(){n.remove()}}),[t&&r])});return function(e){return t(e.styles,e.dynamic),null}},Y={left:0,top:0,right:0,gap:0},O=function(e){return parseInt(e||"",10)||0},H=X(),Z=function(e,n,t,r){var o=e.left,a=e.top,c=e.right,i=e.gap;return void 0===t&&(t="margin"),"\n .with-scroll-bars-hidden {\n overflow: hidden ".concat(r,";\n padding-right: ").concat(i,"px ").concat(r,";\n }\n body {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([n&&"position: relative ".concat(r,";"),"margin"===t&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(c,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(i,"px ").concat(r,";\n "),"padding"===t&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(I," {\n right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(P," {\n margin-right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(I," .").concat(I," {\n right: 0 ").concat(r,";\n }\n \n .").concat(P," .").concat(P," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(i,"px;\n }\n")},q=function(n){var t=n.noRelative,r=n.noImportant,o=n.gapMode,a=void 0===o?"margin":o,c=e.useMemo((function(){return function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Y;var n=function(e){var n=window.getComputedStyle(document.body),t=n["padding"===e?"paddingTop":"marginTop"],r=n["padding"===e?"paddingRight":"marginRight"];return[O(n["padding"===e?"paddingLeft":"marginLeft"]),O(t),O(r)]}(e),t=document.documentElement.clientWidth,r=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,r-t+n[2]-n[0])}}(a)}),[a]);return e.createElement(H,{styles:Z(c,!t,a,r?"":"!important")})},U=!1;if("undefined"!=typeof window)try{var z=Object.defineProperty({},"passive",{get:function(){return U=!0,!0}});window.addEventListener("test",z,z),window.removeEventListener("test",z,z)}catch(e){U=!1}var $,G=!!U&&{passive:!1},J=function(e,n){var t=window.getComputedStyle(e);return"hidden"!==t[n]&&!(t.overflowY===t.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===t[n])},Q=function(e,n){var t=n;do{if("undefined"!=typeof ShadowRoot&&t instanceof ShadowRoot&&(t=t.host),V(e,t)){var r=ee(e,t);if(r[1]>r[2])return!0}t=t.parentNode}while(t&&t!==document.body);return!1},V=function(e,n){return"v"===e?function(e){return J(e,"overflowY")}(n):function(e){return J(e,"overflowX")}(n)},ee=function(e,n){return"v"===e?[(t=n).scrollTop,t.scrollHeight,t.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(n);var t},ne=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},te=function(e){return[e.deltaX,e.deltaY]},re=function(e){return e&&"current"in e?e.current:e},oe=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},ae=0,ce=[],ie=($=function(n){var t=e.useRef([]),r=e.useRef([0,0]),o=e.useRef(),a=e.useState(ae++)[0],c=e.useState((function(){return X()}))[0],i=e.useRef(n);e.useEffect((function(){i.current=n}),[n]),e.useEffect((function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(a));var e=v([n.lockRef.current],(n.shards||[]).map(re),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(a))})),function(){document.body.classList.remove("block-interactivity-".concat(a)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(a))}))}}}),[n.inert,n.lockRef.current,n.shards]);var u=e.useCallback((function(e,n){if("touches"in e&&2===e.touches.length)return!i.current.allowPinchZoom;var t,a=ne(e),c=r.current,u="deltaX"in e?e.deltaX:c[0]-a[0],l="deltaY"in e?e.deltaY:c[1]-a[1],s=e.target,d=Math.abs(u)>Math.abs(l)?"h":"v";if("touches"in e&&"h"===d&&"range"===s.type)return!1;var f=Q(d,s);if(!f)return!0;if(f?t=d:(t="v"===d?"h":"v",f=Q(d,s)),!f)return!1;if(!o.current&&"changedTouches"in e&&(u||l)&&(o.current=t),!t)return!0;var v=o.current||t;return function(e,n,t,r,o){var a=function(e,n){return"h"===e&&"rtl"===n?-1:1}(e,window.getComputedStyle(n).direction),c=a*r,i=t.target,u=n.contains(i),l=!1,s=c>0,d=0,f=0;do{var v=ee(e,i),m=v[0],p=v[1]-v[2]-a*m;(m||p)&&V(e,i)&&(d+=p,f+=m),i=i.parentNode}while(!u&&i!==document.body||u&&(n.contains(i)||n===i));return(!s||0!==d&&true)&&(s||0!==f&&true)||(l=!0),l}(v,n,e,"h"===v?u:l)}),[]),l=e.useCallback((function(e){var n=e;if(ce.length&&ce[ce.length-1]===c){var r="deltaY"in n?te(n):ne(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&(t=e.delta)[0]===(o=r)[0]&&t[1]===o[1];var t,o}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var a=(i.current.shards||[]).map(re).filter(Boolean).filter((function(e){return e.contains(n.target)}));(a.length>0?u(n,a[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),s=e.useCallback((function(e,n,r,o){var a={name:e,delta:n,target:r,should:o};t.current.push(a),setTimeout((function(){t.current=t.current.filter((function(e){return e!==a}))}),1)}),[]),d=e.useCallback((function(e){r.current=ne(e),o.current=void 0}),[]),f=e.useCallback((function(e){s(e.type,te(e),e.target,u(e,n.lockRef.current))}),[]),m=e.useCallback((function(e){s(e.type,ne(e),e.target,u(e,n.lockRef.current))}),[]);e.useEffect((function(){return ce.push(c),n.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",l,G),document.addEventListener("touchmove",l,G),document.addEventListener("touchstart",d,G),function(){ce=ce.filter((function(e){return e!==c})),document.removeEventListener("wheel",l,G),document.removeEventListener("touchmove",l,G),document.removeEventListener("touchstart",d,G)}}),[]);var p=n.removeScrollBar;return e.createElement(e.Fragment,null,n.inert?e.createElement(c,{styles:oe(a)}):null,p?e.createElement(q,{gapMode:"margin"}):null)},B.useMedium($),F),ue=e.forwardRef((function(n,t){return e.createElement(j,d({},n,{ref:t,sideCar:ie}))}));ue.classNames=j.classNames;export{p as $,ue as R,b as a,W as h};
|
|
1
|
+
import*as e from"react";import{useEffect as n,forwardRef as t,useState as r,useRef as o,useCallback as a,createElement as c}from"react";import{$ as i,a as u,_ as l}from"../index-CMYH5FSo.js";import{c as s}from"../index-C4rPovji.js";import{c as d,f,g as v}from"../styled-components.browser.esm/index-C0QmrysB.js";let m=0;function p(){n((()=>{var e,n;const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=t[0])&&void 0!==e?e:h()),document.body.insertAdjacentElement("beforeend",null!==(n=t[1])&&void 0!==n?n:h()),m++,()=>{1===m&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),m--}}),[])}function h(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const g="focusScope.autoFocusOnMount",y="focusScope.autoFocusOnUnmount",E={bubbles:!1,cancelable:!0},b=t(((e,t)=>{const{loop:d=!1,trapped:f=!1,onMountAutoFocus:v,onUnmountAutoFocus:m,...p}=e,[h,b]=r(null),S=s(v),x=s(m),A=o(null),L=i(t,(e=>b(e))),N=o({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;n((()=>{if(f){function e(e){if(N.paused||!h)return;const n=e.target;h.contains(n)?A.current=n:k(A.current,{select:!0})}function n(e){if(N.paused||!h)return;const n=e.relatedTarget;null!==n&&(h.contains(n)||k(A.current,{select:!0}))}function t(e){if(document.activeElement===document.body)for(const n of e)n.removedNodes.length>0&&k(h)}document.addEventListener("focusin",e),document.addEventListener("focusout",n);const r=new MutationObserver(t);return h&&r.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",n),r.disconnect()}}}),[f,h,N.paused]),n((()=>{if(h){T.add(N);const e=document.activeElement;if(!h.contains(e)){const n=new CustomEvent(g,E);h.addEventListener(g,S),h.dispatchEvent(n),n.defaultPrevented||(function(e,{select:n=!1}={}){const t=document.activeElement;for(const r of e)if(k(r,{select:n}),document.activeElement!==t)return}(w(h).filter((e=>"A"!==e.tagName)),{select:!0}),document.activeElement===e&&k(h))}return()=>{h.removeEventListener(g,S),setTimeout((()=>{const n=new CustomEvent(y,E);h.addEventListener(y,x),h.dispatchEvent(n),n.defaultPrevented||k(null!=e?e:document.body,{select:!0}),h.removeEventListener(y,x),T.remove(N)}),0)}}}),[h,S,x,N]);const M=a((e=>{if(!d&&!f)return;if(N.paused)return;const n=document.activeElement;if("Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&n){const t=e.currentTarget,[r,o]=function(e){const n=w(e);return[C(n,e),C(n.reverse(),e)]}(t);r&&o?e.shiftKey||n!==o?e.shiftKey&&n===r&&(e.preventDefault(),d&&k(o,{select:!0})):(e.preventDefault(),d&&k(r,{select:!0})):n===t&&e.preventDefault()}}),[d,f,N.paused]);return c(u.div,l({tabIndex:-1},p,{ref:L,onKeyDown:M}))}));function w(e){const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.disabled||e.hidden||"INPUT"===e.tagName&&"hidden"===e.type||0>e.tabIndex?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT});for(;t.nextNode();)n.push(t.currentNode);return n}function C(e,n){for(const t of e)if(!S(t,{upTo:n}))return t}function S(e,{upTo:n}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==n&&e===n)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function k(e,{select:n=!1}={}){if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&n&&e.select()}}const T=function(){let e=[];return{add(n){const t=e[0];n!==t&&(null==t||t.pause()),e=x(e,n),e.unshift(n)},remove(n){var t;e=x(e,n),null===(t=e[0])||void 0===t||t.resume()}}}();function x(e,n){const t=[...e],r=t.indexOf(n);return-1!==r&&t.splice(r,1),t}var A=new WeakMap,L=new WeakMap,N={},M=0,R=function(e){return e&&(e.host||R(e.parentNode))},W=function(e,n,t){void 0===t&&(t="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),function(e,n,t,r){var o=function(e,n){return n.map((function(n){if(e.contains(n))return n;var t=R(n);return t&&e.contains(t)?t:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return!!e}))}(n,Array.isArray(e)?e:[e]);N[t]||(N[t]=new WeakMap);var a=N[t],c=[],i=new Set,u=new Set(o),l=function(e){e&&!i.has(e)&&(i.add(e),l(e.parentNode))};o.forEach(l);var s=function(e){e&&!u.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(i.has(e))s(e);else{var n=e.getAttribute(r),o=null!==n&&"false"!==n,u=(A.get(e)||0)+1,l=(a.get(e)||0)+1;A.set(e,u),a.set(e,l),c.push(e),1===u&&o&&L.set(e,!0),1===l&&e.setAttribute(t,"true"),o||e.setAttribute(r,"true")}}))};return s(n),i.clear(),M++,function(){c.forEach((function(e){var n=A.get(e)-1,o=a.get(e)-1;A.set(e,n),a.set(e,o),n||(L.has(e)||e.removeAttribute(r),L.delete(e)),o||e.removeAttribute(t)})),--M||(A=new WeakMap,A=new WeakMap,L=new WeakMap,N={})}}(r,o,t,"aria-hidden")):function(){return null}},I="right-scroll-bar-position",P="width-before-scroll-bar";function _(e){return e}var F=function(n){var t=n.sideCar,r=f(n,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw Error("Sidecar medium not found");return e.createElement(o,d({},r))};F.isSideCarExport=!0;var B=function(e){void 0===e&&(e={});var n=function(e,n){void 0===n&&(n=_);var t=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:null},useMedium:function(e){var o=n(e,r);return t.push(o),function(){t=t.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;t.length;){var n=t;t=[],n.forEach(e)}t={push:function(n){return e(n)},filter:function(){return t}}},assignMedium:function(e){r=!0;var n=[];if(t.length){var o=t;t=[],o.forEach(e),n=t}var a=function(){var t=n;n=[],t.forEach(e)},c=function(){return Promise.resolve().then(a)};c(),t={push:function(e){n.push(e),c()},filter:function(e){return n=n.filter(e),t}}}}}();return n.options=d({async:!0,ssr:!1},e),n}(),D=function(){},j=e.forwardRef((function(n,t){var o=e.useRef(null),a=e.useState({onScrollCapture:D,onWheelCapture:D,onTouchMoveCapture:D}),c=a[0],i=a[1],u=n.forwardProps,l=n.children,s=n.className,v=n.removeScrollBar,m=n.enabled,p=n.shards,h=n.sideCar,g=n.noIsolation,y=n.inert,E=n.allowPinchZoom,b=n.as,w=void 0===b?"div":b,C=f(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),S=h,k=function(e,n){return t=function(n){return e.forEach((function(e){return function(e,n){return"function"==typeof e?e(n):e&&(e.current=n),e}(e,n)}))},(o=r((function(){return{value:null,callback:t,facade:{get current(){return o.value},set current(e){var n=o.value;n!==e&&(o.value=e,o.callback(e,n))}}}}))[0]).callback=t,o.facade;var t,o}([o,t]),T=d(d({},C),c);return e.createElement(e.Fragment,null,m&&e.createElement(S,{sideCar:B,removeScrollBar:v,shards:p,noIsolation:g,inert:y,setCallbacks:i,allowPinchZoom:!!E,lockRef:o}),u?e.cloneElement(e.Children.only(l),d(d({},T),{ref:k})):e.createElement(w,d({},T,{className:s,ref:k}),l))}));j.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},j.classNames={fullWidth:P,zeroRight:I};var K=function(){var e=0,n=null;return{add:function(t){var r,o;0==e&&(n=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return n&&e.setAttribute("nonce",n),e}())&&(o=t,(r=n).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(n)),e++},remove:function(){! --e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},X=function(){var n,t=(n=K(),function(t,r){e.useEffect((function(){return n.add(t),function(){n.remove()}}),[t&&r])});return function(e){return t(e.styles,e.dynamic),null}},Y={left:0,top:0,right:0,gap:0},O=function(e){return parseInt(e||"",10)||0},H=X(),Z=function(e,n,t,r){var o=e.left,a=e.top,c=e.right,i=e.gap;return void 0===t&&(t="margin"),"\n .with-scroll-bars-hidden {\n overflow: hidden ".concat(r,";\n padding-right: ").concat(i,"px ").concat(r,";\n }\n body {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([n&&"position: relative ".concat(r,";"),"margin"===t&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(c,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(i,"px ").concat(r,";\n "),"padding"===t&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(I," {\n right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(P," {\n margin-right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(I," .").concat(I," {\n right: 0 ").concat(r,";\n }\n \n .").concat(P," .").concat(P," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(i,"px;\n }\n")},q=function(n){var t=n.noRelative,r=n.noImportant,o=n.gapMode,a=void 0===o?"margin":o,c=e.useMemo((function(){return function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Y;var n=function(e){var n=window.getComputedStyle(document.body),t=n["padding"===e?"paddingTop":"marginTop"],r=n["padding"===e?"paddingRight":"marginRight"];return[O(n["padding"===e?"paddingLeft":"marginLeft"]),O(t),O(r)]}(e),t=document.documentElement.clientWidth,r=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,r-t+n[2]-n[0])}}(a)}),[a]);return e.createElement(H,{styles:Z(c,!t,a,r?"":"!important")})},z=!1;if("undefined"!=typeof window)try{var U=Object.defineProperty({},"passive",{get:function(){return z=!0,!0}});window.addEventListener("test",U,U),window.removeEventListener("test",U,U)}catch(e){z=!1}var $,G=!!z&&{passive:!1},J=function(e,n){var t=window.getComputedStyle(e);return"hidden"!==t[n]&&!(t.overflowY===t.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===t[n])},Q=function(e,n){var t=n;do{if("undefined"!=typeof ShadowRoot&&t instanceof ShadowRoot&&(t=t.host),V(e,t)){var r=ee(e,t);if(r[1]>r[2])return!0}t=t.parentNode}while(t&&t!==document.body);return!1},V=function(e,n){return"v"===e?function(e){return J(e,"overflowY")}(n):function(e){return J(e,"overflowX")}(n)},ee=function(e,n){return"v"===e?[(t=n).scrollTop,t.scrollHeight,t.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(n);var t},ne=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},te=function(e){return[e.deltaX,e.deltaY]},re=function(e){return e&&"current"in e?e.current:e},oe=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},ae=0,ce=[],ie=($=function(n){var t=e.useRef([]),r=e.useRef([0,0]),o=e.useRef(),a=e.useState(ae++)[0],c=e.useState((function(){return X()}))[0],i=e.useRef(n);e.useEffect((function(){i.current=n}),[n]),e.useEffect((function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(a));var e=v([n.lockRef.current],(n.shards||[]).map(re),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(a))})),function(){document.body.classList.remove("block-interactivity-".concat(a)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(a))}))}}}),[n.inert,n.lockRef.current,n.shards]);var u=e.useCallback((function(e,n){if("touches"in e&&2===e.touches.length)return!i.current.allowPinchZoom;var t,a=ne(e),c=r.current,u="deltaX"in e?e.deltaX:c[0]-a[0],l="deltaY"in e?e.deltaY:c[1]-a[1],s=e.target,d=Math.abs(u)>Math.abs(l)?"h":"v";if("touches"in e&&"h"===d&&"range"===s.type)return!1;var f=Q(d,s);if(!f)return!0;if(f?t=d:(t="v"===d?"h":"v",f=Q(d,s)),!f)return!1;if(!o.current&&"changedTouches"in e&&(u||l)&&(o.current=t),!t)return!0;var v=o.current||t;return function(e,n,t,r,o){var a=function(e,n){return"h"===e&&"rtl"===n?-1:1}(e,window.getComputedStyle(n).direction),c=a*r,i=t.target,u=n.contains(i),l=!1,s=c>0,d=0,f=0;do{var v=ee(e,i),m=v[0],p=v[1]-v[2]-a*m;(m||p)&&V(e,i)&&(d+=p,f+=m),i=i.parentNode}while(!u&&i!==document.body||u&&(n.contains(i)||n===i));return(!s||0!==d&&true)&&(s||0!==f&&true)||(l=!0),l}(v,n,e,"h"===v?u:l)}),[]),l=e.useCallback((function(e){var n=e;if(ce.length&&ce[ce.length-1]===c){var r="deltaY"in n?te(n):ne(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&(t=e.delta)[0]===(o=r)[0]&&t[1]===o[1];var t,o}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var a=(i.current.shards||[]).map(re).filter(Boolean).filter((function(e){return e.contains(n.target)}));(a.length>0?u(n,a[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),s=e.useCallback((function(e,n,r,o){var a={name:e,delta:n,target:r,should:o};t.current.push(a),setTimeout((function(){t.current=t.current.filter((function(e){return e!==a}))}),1)}),[]),d=e.useCallback((function(e){r.current=ne(e),o.current=void 0}),[]),f=e.useCallback((function(e){s(e.type,te(e),e.target,u(e,n.lockRef.current))}),[]),m=e.useCallback((function(e){s(e.type,ne(e),e.target,u(e,n.lockRef.current))}),[]);e.useEffect((function(){return ce.push(c),n.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",l,G),document.addEventListener("touchmove",l,G),document.addEventListener("touchstart",d,G),function(){ce=ce.filter((function(e){return e!==c})),document.removeEventListener("wheel",l,G),document.removeEventListener("touchmove",l,G),document.removeEventListener("touchstart",d,G)}}),[]);var p=n.removeScrollBar;return e.createElement(e.Fragment,null,n.inert?e.createElement(c,{styles:oe(a)}):null,p?e.createElement(q,{gapMode:"margin"}):null)},B.useMedium($),F),ue=e.forwardRef((function(n,t){return e.createElement(j,d({},n,{ref:t,sideCar:ie}))}));ue.classNames=j.classNames;export{p as $,ue as R,b as a,W as h};
|