stoop 0.0.19 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -15
- package/dist/components/Badge/index.d.ts +13 -0
- package/dist/components/Badge/styles.d.ts +3 -0
- package/dist/components/Badge/types.d.ts +13 -0
- package/dist/components/Button/index.d.ts +14 -0
- package/dist/components/Button/styles.d.ts +6 -0
- package/dist/components/Button/types.d.ts +22 -0
- package/dist/components/Card/index.d.ts +14 -0
- package/dist/components/Card/styles.d.ts +16 -0
- package/dist/components/Card/types.d.ts +18 -0
- package/dist/components/Input/index.d.ts +13 -0
- package/dist/components/Input/styles.d.ts +3 -0
- package/dist/components/Input/types.d.ts +8 -0
- package/dist/components/Menu/index.d.ts +13 -0
- package/dist/components/Menu/styles.d.ts +9 -0
- package/dist/components/Menu/types.d.ts +26 -0
- package/dist/components/Modal/index.d.ts +14 -0
- package/dist/components/Modal/styles.d.ts +14 -0
- package/dist/components/Modal/types.d.ts +18 -0
- package/dist/components/Popover/index.d.ts +13 -0
- package/dist/components/Popover/styles.d.ts +4 -0
- package/dist/components/Popover/types.d.ts +16 -0
- package/dist/components/Provider/GlobalStyles.d.ts +10 -0
- package/dist/components/Provider/StoopProvider.d.ts +41 -0
- package/dist/components/Provider/index.d.ts +2 -0
- package/dist/components/Section/index.d.ts +15 -0
- package/dist/components/Section/styles.d.ts +5 -0
- package/dist/components/Section/types.d.ts +20 -0
- package/dist/components/Select/index.d.ts +13 -0
- package/dist/components/Select/styles.d.ts +7 -0
- package/dist/components/Select/types.d.ts +30 -0
- package/dist/components/Stack/index.d.ts +16 -0
- package/dist/components/Stack/styles.d.ts +10 -0
- package/dist/components/Stack/types.d.ts +42 -0
- package/dist/components/Tabs/index.d.ts +13 -0
- package/dist/components/Tabs/styles.d.ts +8 -0
- package/dist/components/Tabs/types.d.ts +20 -0
- package/dist/components/Text/index.d.ts +14 -0
- package/dist/components/Text/styles.d.ts +4 -0
- package/dist/components/Text/types.d.ts +21 -0
- package/dist/components/Textarea/index.d.ts +15 -0
- package/dist/components/Textarea/styles.d.ts +3 -0
- package/dist/components/Textarea/types.d.ts +10 -0
- package/dist/components/index.d.ts +27 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/useBreakpoints.d.ts +14 -0
- package/dist/hooks/useEventListener.d.ts +6 -0
- package/dist/hooks/useFloating.d.ts +18 -0
- package/dist/hooks/useOutsideClick.d.ts +6 -0
- package/dist/hooks/usePortal.d.ts +9 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +156 -36
- package/dist/styles/compiler.d.ts +25 -0
- package/dist/styles/index.d.ts +2 -0
- package/dist/styles/theme.d.ts +495 -0
- package/dist/styles/types.d.ts +66 -0
- package/package.json +31 -28
- package/dist/index.css +0 -1
package/dist/index.js
CHANGED
|
@@ -1,36 +1,156 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),B}function F(){}function l(B){if(IB===null)try{var M=("require"+Math.random()).slice(0,7);IB=(bB&&bB[M]).call(bB,"timers").setImmediate}catch(X){IB=function(z){eB===!1&&(eB=!0,typeof MessageChannel==="undefined"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var Y=new MessageChannel;Y.port1.onmessage=z,Y.port2.postMessage(void 0)}}return IB(B)}function L(B){return 1<B.length&&typeof AggregateError==="function"?new AggregateError(B):B[0]}function UB(B,M){M!==gB-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),gB=M}function i(B,M,X){var z=U.actQueue;if(z!==null)if(z.length!==0)try{D(z),l(function(){return i(B,M,X)});return}catch(Y){U.thrownErrors.push(Y)}else U.actQueue=null;0<U.thrownErrors.length?(z=L(U.thrownErrors),U.thrownErrors.length=0,X(z)):M(B)}function D(B){if(!uB){uB=!0;var M=0;try{for(;M<B.length;M++){var X=B[M];do{U.didUsePromise=!1;var z=X(!1);if(z!==null){if(U.didUsePromise){B[M]=X,B.splice(0,M);return}X=z}else break}while(1)}B.length=0}catch(Y){B.splice(0,M+1),U.thrownErrors.push(Y)}finally{uB=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!=="undefined"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=Symbol.for("react.transitional.element"),NB=Symbol.for("react.portal"),WB=Symbol.for("react.fragment"),YB=Symbol.for("react.strict_mode"),ZB=Symbol.for("react.profiler");Symbol.for("react.provider");var a=Symbol.for("react.consumer"),QB=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),t=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),n=Symbol.for("react.lazy"),CB=Symbol.for("react.offscreen"),VB=Symbol.iterator,wB={},TB={isMounted:function(){return!1},enqueueForceUpdate:function(B){I(B,"forceUpdate")},enqueueReplaceState:function(B){I(B,"replaceState")},enqueueSetState:function(B){I(B,"setState")}},H=Object.assign,Z={};Object.freeze(Z),w.prototype.isReactComponent={},w.prototype.setState=function(B,M){if(typeof B!=="object"&&typeof B!=="function"&&B!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,M,"setState")},w.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};var W={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},E;for(E in W)W.hasOwnProperty(E)&&A(E,W[E]);f.prototype=w.prototype,W=GB.prototype=new f,W.constructor=GB,H(W,w.prototype),W.isPureReactComponent=!0;var N=Array.isArray,O=Symbol.for("react.client.reference"),U={H:null,A:null,T:null,S:null,actQueue:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null},T=Object.prototype.hasOwnProperty,d=Symbol.for("react.client.reference"),x=0,S,m,C,r,$,yB,cB;vB.__reactDisabledLog=!0;var kB,lB,fB=!1,hB=new(typeof WeakMap==="function"?WeakMap:Map),WH=Symbol.for("react.client.reference"),iB,oB,aB={},pB={},tB=!1,nB=/\/+/g,rB=typeof reportError==="function"?reportError:function(B){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var M=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof B==="object"&&B!==null&&typeof B.message==="string"?String(B.message):String(B),error:B});if(!window.dispatchEvent(M))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",B);return}console.error(B)},eB=!1,IB=null,gB=0,_B=!1,uB=!1,BH=typeof queueMicrotask==="function"?function(B){queueMicrotask(function(){return queueMicrotask(B)})}:l;JH.Children={map:zB,forEach:function(B,M,X){zB(B,function(){M.apply(this,arguments)},X)},count:function(B){var M=0;return zB(B,function(){M++}),M},toArray:function(B){return zB(B,function(M){return M})||[]},only:function(B){if(!g(B))throw Error("React.Children.only expected to receive a single React element child.");return B}},JH.Component=w,JH.Fragment=WB,JH.Profiler=ZB,JH.PureComponent=GB,JH.StrictMode=YB,JH.Suspense=p,JH.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,JH.act=function(B){var M=U.actQueue,X=gB;gB++;var z=U.actQueue=M!==null?M:[],Y=!1;try{var G=B()}catch(J){U.thrownErrors.push(J)}if(0<U.thrownErrors.length)throw UB(M,X),B=L(U.thrownErrors),U.thrownErrors.length=0,B;if(G!==null&&typeof G==="object"&&typeof G.then==="function"){var Q=G;return BH(function(){Y||_B||(_B=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(J,j){Y=!0,Q.then(function(v){if(UB(M,X),X===0){try{D(z),l(function(){return i(v,J,j)})}catch(b){U.thrownErrors.push(b)}if(0<U.thrownErrors.length){var e=L(U.thrownErrors);U.thrownErrors.length=0,j(e)}}else J(v)},function(v){UB(M,X),0<U.thrownErrors.length?(v=L(U.thrownErrors),U.thrownErrors.length=0,j(v)):j(v)})}}}var q=G;if(UB(M,X),X===0&&(D(z),z.length!==0&&BH(function(){Y||_B||(_B=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),U.actQueue=null),0<U.thrownErrors.length)throw B=L(U.thrownErrors),U.thrownErrors.length=0,B;return{then:function(J,j){Y=!0,X===0?(U.actQueue=z,l(function(){return i(q,J,j)})):J(q)}}},JH.cache=function(B){return function(){return B.apply(null,arguments)}},JH.cloneElement=function(B,M,X){if(B===null||B===void 0)throw Error("The argument must be a React element, but you passed "+B+".");var z=H({},B.props),Y=B.key,G=B._owner;if(M!=null){var Q;B:{if(T.call(M,"ref")&&(Q=Object.getOwnPropertyDescriptor(M,"ref").get)&&Q.isReactWarning){Q=!1;break B}Q=M.ref!==void 0}Q&&(G=h()),EB(M)&&(y(M.key),Y=""+M.key);for(q in M)!T.call(M,q)||q==="key"||q==="__self"||q==="__source"||q==="ref"&&M.ref===void 0||(z[q]=M[q])}var q=arguments.length-2;if(q===1)z.children=X;else if(1<q){Q=Array(q);for(var J=0;J<q;J++)Q[J]=arguments[J+2];z.children=Q}z=qB(B.type,Y,void 0,void 0,G,z);for(Y=2;Y<arguments.length;Y++)jB(arguments[Y],z.type);return z},JH.createContext=function(B){return B={$$typeof:QB,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null},B.Provider=B,B.Consumer={$$typeof:a,_context:B},B._currentRenderer=null,B._currentRenderer2=null,B},JH.createElement=function(B,M,X){if(BB(B))for(var z=2;z<arguments.length;z++)jB(arguments[z],B);else{if(z="",B===void 0||typeof B==="object"&&B!==null&&Object.keys(B).length===0)z+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";if(B===null)var Y="null";else N(B)?Y="array":B!==void 0&&B.$$typeof===o?(Y="<"+(P(B.type)||"Unknown")+" />",z=" Did you accidentally export a JSX literal instead of a component?"):Y=typeof B;console.error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Y,z)}var G;if(z={},Y=null,M!=null)for(G in oB||!("__self"in M)||"key"in M||(oB=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),EB(M)&&(y(M.key),Y=""+M.key),M)T.call(M,G)&&G!=="key"&&G!=="__self"&&G!=="__source"&&(z[G]=M[G]);var Q=arguments.length-2;if(Q===1)z.children=X;else if(1<Q){for(var q=Array(Q),J=0;J<Q;J++)q[J]=arguments[J+2];Object.freeze&&Object.freeze(q),z.children=q}if(B&&B.defaultProps)for(G in Q=B.defaultProps,Q)z[G]===void 0&&(z[G]=Q[G]);return Y&&RB(z,typeof B==="function"?B.displayName||B.name||"Unknown":B),qB(B,Y,void 0,void 0,h(),z)},JH.createRef=function(){var B={current:null};return Object.seal(B),B},JH.forwardRef=function(B){B!=null&&B.$$typeof===R?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof B!=="function"?console.error("forwardRef requires a render function but was given %s.",B===null?"null":typeof B):B.length!==0&&B.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",B.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),B!=null&&B.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var M={$$typeof:u,render:B},X;return Object.defineProperty(M,"displayName",{enumerable:!1,configurable:!0,get:function(){return X},set:function(z){X=z,B.name||B.displayName||(Object.defineProperty(B,"name",{value:z}),B.displayName=z)}}),M},JH.isValidElement=g,JH.lazy=function(B){return{$$typeof:n,_payload:{_status:-1,_result:B},_init:PB}},JH.memo=function(B,M){BB(B)||console.error("memo: The first argument must be a component. Instead received: %s",B===null?"null":typeof B),M={$$typeof:R,type:B,compare:M===void 0?null:M};var X;return Object.defineProperty(M,"displayName",{enumerable:!1,configurable:!0,get:function(){return X},set:function(z){X=z,B.name||B.displayName||(Object.defineProperty(B,"name",{value:z}),B.displayName=z)}}),M},JH.startTransition=function(B){var M=U.T,X={};U.T=X,X._updatedFibers=new Set;try{var z=B(),Y=U.S;Y!==null&&Y(X,z),typeof z==="object"&&z!==null&&typeof z.then==="function"&&z.then(F,rB)}catch(G){rB(G)}finally{M===null&&X._updatedFibers&&(B=X._updatedFibers.size,X._updatedFibers.clear(),10<B&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),U.T=M}},JH.unstable_useCacheRefresh=function(){return K().useCacheRefresh()},JH.use=function(B){return K().use(B)},JH.useActionState=function(B,M,X){return K().useActionState(B,M,X)},JH.useCallback=function(B,M){return K().useCallback(B,M)},JH.useContext=function(B){var M=K();return B.$$typeof===a&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),M.useContext(B)},JH.useDebugValue=function(B,M){return K().useDebugValue(B,M)},JH.useDeferredValue=function(B,M){return K().useDeferredValue(B,M)},JH.useEffect=function(B,M){return K().useEffect(B,M)},JH.useId=function(){return K().useId()},JH.useImperativeHandle=function(B,M,X){return K().useImperativeHandle(B,M,X)},JH.useInsertionEffect=function(B,M){return K().useInsertionEffect(B,M)},JH.useLayoutEffect=function(B,M){return K().useLayoutEffect(B,M)},JH.useMemo=function(B,M){return K().useMemo(B,M)},JH.useOptimistic=function(B,M){return K().useOptimistic(B,M)},JH.useReducer=function(B,M,X){return K().useReducer(B,M,X)},JH.useRef=function(B){return K().useRef(B)},JH.useState=function(B){return K().useState(B)},JH.useSyncExternalStore=function(B,M,X){return K().useSyncExternalStore(B,M,X)},JH.useTransition=function(){return K().useTransition()},JH.version="19.0.0",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!=="undefined"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var sB=MH((qH)=>{var mB=dB(zH(),1);(function(){function A(H){if(H==null)return null;if(typeof H==="function")return H.$$typeof===K?null:H.displayName||H.name||null;if(typeof H==="string")return H;switch(H){case OB:return"Fragment";case qB:return"Portal";case g:return"Profiler";case jB:return"StrictMode";case c:return"Suspense";case XB:return"SuspenseList"}if(typeof H==="object")switch(typeof H.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),H.$$typeof){case $B:return(H.displayName||"Context")+".Provider";case AB:return(H._context.displayName||"Context")+".Consumer";case KB:var Z=H.render;return H=H.displayName,H||(H=Z.displayName||Z.name||"",H=H!==""?"ForwardRef("+H+")":"ForwardRef"),H;case xB:return Z=H.displayName||null,Z!==null?Z:A(H.type)||"Memo";case _:Z=H._payload,H=H._init;try{return A(H(Z))}catch(W){}}return null}function V(H){return""+H}function I(H){try{V(H);var Z=!1}catch(N){Z=!0}if(Z){Z=console;var W=Z.error,E=typeof Symbol==="function"&&Symbol.toStringTag&&H[Symbol.toStringTag]||H.constructor.name||"Object";return W.call(Z,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",E),V(H)}}function w(){}function f(){if(D===0){o=console.log,NB=console.info,WB=console.warn,YB=console.error,ZB=console.group,a=console.groupCollapsed,QB=console.groupEnd;var H={configurable:!0,enumerable:!0,value:w,writable:!0};Object.defineProperties(console,{info:H,log:H,warn:H,error:H,group:H,groupCollapsed:H,groupEnd:H})}D++}function GB(){if(D--,D===0){var H={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L({},H,{value:o}),info:L({},H,{value:NB}),warn:L({},H,{value:WB}),error:L({},H,{value:YB}),group:L({},H,{value:ZB}),groupCollapsed:L({},H,{value:a}),groupEnd:L({},H,{value:QB})})}0>D&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function s(H){if(u===void 0)try{throw Error()}catch(W){var Z=W.stack.trim().match(/\n( *(at )?)/);u=Z&&Z[1]||"",p=-1<W.stack.indexOf(`
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
1
|
+
var{defineProperty:g0,getOwnPropertyNames:$2,getOwnPropertyDescriptor:q2}=Object,J2=Object.prototype.hasOwnProperty;var Y$=new WeakMap,Z2=($)=>{var q=Y$.get($),J;if(q)return q;if(q=g0({},"__esModule",{value:!0}),$&&typeof $==="object"||typeof $==="function")$2($).map((Z)=>!J2.call(q,Z)&&g0(q,Z,{get:()=>$[Z],enumerable:!(J=q2($,Z))||J.enumerable}));return Y$.set($,q),q};var G2=($,q)=>{for(var J in q)g0($,J,{get:q[J],enumerable:!0,configurable:!0,set:(Z)=>q[J]=()=>Z})};var f0=($,q)=>()=>($&&(q=$($=0)),q);function W$($,q){let J={};for(let Z in q)J[Z]=`theme.${$}.${Z}`;return J}var p0,Q2,m0,S,b,d0,c0,r0,l0,o0,i0,L0,s,U2,H$,j6;var C=f0(()=>{p0={background:"#F5F5F5",border:"rgba(214, 209, 204, 0.5)",brand:"rgb(255, 140, 0)",fill:"#fff",hover:"rgba(214, 209, 204, 0.25)",overlay:"rgba(0, 0, 0, 0.5)",text:"#000"},Q2={background:"#1a1a1a",border:"rgba(255, 255, 255, 0.1)",brand:"rgb(255, 140, 0)",fill:"#2a2a2a",hover:"rgba(255, 255, 255, 0.05)",overlay:"rgba(0, 0, 0, 0.8)",text:"#fff"},m0=p0,S={large:"1200px",medium:"1024px",small:"768px"},b={huge:"48px",large:"24px",larger:"32px",massive:"64px",medium:"16px",small:"8px",smaller:"4px"},d0={default:"'Standard Book', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif",heading:"'Standard Bold', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif"},c0={bold:"700",div:"inherit",h1:"clamp(2rem, 1.75rem + 1vw, 3rem)",h2:"clamp(1.75rem, 1.5rem + 0.75vw, 2.5rem)",h3:"clamp(1.5rem, 1.25rem + 0.75vw, 2rem)",h4:"clamp(1.25rem, 1.125rem + 0.5vw, 1.5rem)",h5:"clamp(1.125rem, 1rem + 0.5vw, 1.25rem)",h6:"clamp(1rem, 0.9375rem + 0.25vw, 1.125rem)",label:"clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem)",medium:"500",micro:"clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem)",normalHeight:"1.4",normalWeight:"400",p:"clamp(0.9375rem, 0.875rem + 0.25vw, 1rem)",relaxed:"1.6",semibold:"600",small:"clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem)",span:"inherit",strong:"inherit",tight:"1.2"},r0={default:"all 0.2s ease",fast:"all 0.15s ease",slow:"all 0.3s ease",spring:"all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275)"},l0={disabled:"0.5",light:"0.55",muted:"0.7",overlay:"0.8"},o0={base:1,dropdown:10,modal:40,popover:30,toast:50,tooltip:20},i0={medium:"6px",none:"0px",small:"3px"},L0={large:`@media (min-width: ${S.medium})`,medium:`@media (min-width: ${S.small}) and (max-width: ${S.medium})`,small:`@media (max-width: ${S.small})`},s={borderRadius:i0,breakpoints:S,colors:p0,fonts:d0,media:L0,opacities:l0,spacing:b,transitions:r0,typography:c0,zIndices:o0},U2={borderRadius:i0,breakpoints:S,colors:Q2,fonts:d0,media:L0,opacities:l0,spacing:b,transitions:r0,typography:c0,zIndices:o0},H$={dark:U2,light:s};j6={borderRadius:i0,breakpoints:S,colors:W$("colors",p0),fonts:d0,media:L0,opacities:l0,spacing:W$("spacing",b),transitions:r0,typography:c0,zIndices:o0}});function L$($=s){let{colors:q,fonts:J,transitions:Z,typography:G}=$;return`
|
|
2
|
+
/* Custom font loading */
|
|
3
|
+
@font-face {
|
|
4
|
+
font-family: 'Standard Book';
|
|
5
|
+
src: url('./fonts/standard-book.woff2') format('woff2');
|
|
6
|
+
font-weight: 400;
|
|
7
|
+
font-style: normal;
|
|
8
|
+
font-display: swap;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@font-face {
|
|
12
|
+
font-family: 'Standard Bold';
|
|
13
|
+
src: url('./fonts/standard-bold.woff2') format('woff2');
|
|
14
|
+
font-weight: 700;
|
|
15
|
+
font-style: normal;
|
|
16
|
+
font-display: swap;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* CSS Reset */
|
|
20
|
+
*, *::before, *::after {
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
margin: 0;
|
|
23
|
+
padding: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* Base HTML styles with design tokens */
|
|
27
|
+
html {
|
|
28
|
+
font-family: ${J.default};
|
|
29
|
+
font-size: ${G.p};
|
|
30
|
+
line-height: ${G.normalHeight};
|
|
31
|
+
-webkit-text-size-adjust: 100%;
|
|
32
|
+
-webkit-font-smoothing: antialiased;
|
|
33
|
+
-moz-osx-font-smoothing: grayscale;
|
|
34
|
+
scroll-behavior: smooth;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
body {
|
|
38
|
+
color: ${q.text};
|
|
39
|
+
background-color: ${q.background};
|
|
40
|
+
font-family: ${J.default};
|
|
41
|
+
line-height: ${G.normalHeight};
|
|
42
|
+
text-rendering: optimizeLegibility;
|
|
43
|
+
overflow-x: hidden;
|
|
44
|
+
transition: background-color 0.2s ease, color 0.2s ease;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Remove default button styles - inherit font from design system */
|
|
48
|
+
button {
|
|
49
|
+
background: none;
|
|
50
|
+
border: none;
|
|
51
|
+
font-family: inherit;
|
|
52
|
+
font-size: inherit;
|
|
53
|
+
line-height: inherit;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
transition: ${Z.default};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Remove default input styles - inherit font from design system */
|
|
59
|
+
input, textarea, select {
|
|
60
|
+
font-family: inherit;
|
|
61
|
+
font-size: inherit;
|
|
62
|
+
line-height: inherit;
|
|
63
|
+
border: none;
|
|
64
|
+
outline: none;
|
|
65
|
+
background: none;
|
|
66
|
+
transition: ${Z.default};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Remove default list styles */
|
|
70
|
+
ul, ol {
|
|
71
|
+
list-style: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Remove default link styles */
|
|
75
|
+
a {
|
|
76
|
+
color: inherit;
|
|
77
|
+
text-decoration: none;
|
|
78
|
+
transition: ${Z.default};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Consistent focus styles across all interactive elements */
|
|
82
|
+
*:focus-visible {
|
|
83
|
+
outline: 2px solid ${q.brand};
|
|
84
|
+
outline-offset: 2px;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Brand selection styles */
|
|
88
|
+
::selection {
|
|
89
|
+
background-color: ${q.brand};
|
|
90
|
+
color: ${q.fill};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* Scrollbar styles (webkit) */
|
|
94
|
+
::-webkit-scrollbar {
|
|
95
|
+
width: 8px;
|
|
96
|
+
height: 8px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
::-webkit-scrollbar-track {
|
|
100
|
+
background: ${q.border};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
::-webkit-scrollbar-thumb {
|
|
104
|
+
background: ${q.text};
|
|
105
|
+
border-radius: 4px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
::-webkit-scrollbar-thumb:hover {
|
|
109
|
+
background: ${q.brand};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Base typography scale using design tokens - all sizes inherit from design system */
|
|
113
|
+
h1, h2, h3, h4, h5, h6 {
|
|
114
|
+
font-family: ${J.heading};
|
|
115
|
+
font-weight: ${G.bold};
|
|
116
|
+
line-height: ${G.tight};
|
|
117
|
+
margin: 0; /* Reset margins - components handle their own spacing */
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
h1 { font-size: ${G.h1}; }
|
|
121
|
+
h2 { font-size: ${G.h2}; }
|
|
122
|
+
h3 { font-size: ${G.h3}; }
|
|
123
|
+
h4 { font-size: ${G.h4}; }
|
|
124
|
+
h5 { font-size: ${G.h5}; }
|
|
125
|
+
h6 { font-size: ${G.h6}; }
|
|
126
|
+
|
|
127
|
+
p {
|
|
128
|
+
font-family: ${J.default};
|
|
129
|
+
font-size: ${G.p};
|
|
130
|
+
line-height: ${G.relaxed};
|
|
131
|
+
margin: 0; /* Reset margins - components handle their own spacing */
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
small {
|
|
135
|
+
font-size: ${G.small};
|
|
136
|
+
line-height: ${G.normalHeight};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
strong {
|
|
140
|
+
font-family: ${J.heading};
|
|
141
|
+
font-weight: ${G.bold};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* Utility classes */
|
|
145
|
+
.sr-only {
|
|
146
|
+
position: absolute;
|
|
147
|
+
width: 1px;
|
|
148
|
+
height: 1px;
|
|
149
|
+
padding: 0;
|
|
150
|
+
margin: -1px;
|
|
151
|
+
overflow: hidden;
|
|
152
|
+
clip: rect(0, 0, 0, 0);
|
|
153
|
+
white-space: nowrap;
|
|
154
|
+
border: 0;
|
|
155
|
+
}
|
|
156
|
+
`}function a0($=s){if(typeof document==="undefined")return;let q=document.getElementById("stoop-global-styles");if(q)q.remove();let J=document.createElement("style");J.id="stoop-global-styles",J.textContent=L$($),document.head.appendChild(J)}var s0=f0(()=>{C()});var M$={};G2(M$,{useTheme:()=>n0,useStoopConfig:()=>I$,StoopProvider:()=>j0,StoopContext:()=>B0});import{createContext as X2,useContext as F$,useEffect as B$,useState as K2}from"react";import{jsxDEV as W2}from"react/jsx-dev-runtime";function Y2(){if(typeof window==="undefined")return null;try{return localStorage.getItem("stoop-theme")}catch{return null}}function z$($){if(typeof window==="undefined")return;try{localStorage.setItem("stoop-theme",$)}catch{}}function j0({children:$,config:q={injectGlobalStyles:!0,theme:"light"}}){let[J,Z]=K2(()=>{return Y2()||q.theme||"light"}),G=H$[J],X={...q,currentTheme:G,setTheme:(K)=>{Z(K),z$(K)},themeName:J,toggleTheme:()=>{Z((K)=>{let Y=K==="light"?"dark":"light";return z$(Y),Y})}};return B$(()=>{if(q.injectGlobalStyles!==!1)a0(G);if(q.customCSS){let K=document.createElement("style");return K.id="stoop-custom-styles",K.textContent=q.customCSS,document.head.appendChild(K),()=>{let Y=document.getElementById("stoop-custom-styles");if(Y)Y.remove()}}},[q.injectGlobalStyles,q.customCSS,G]),B$(()=>{return document.body.setAttribute("data-theme",J),()=>{document.body.removeAttribute("data-theme")}},[J]),W2(B0.Provider,{value:X,children:$},void 0,!1,void 0,this)}function I$(){let $=F$(B0);if(!$)throw new Error("useStoopConfig must be used within a StoopProvider");return $}function n0(){let $=F$(B0);if(!$)throw new Error("useTheme must be used within a StoopProvider");return{setTheme:$.setTheme,theme:$.currentTheme,themeName:$.themeName,toggleTheme:$.toggleTheme}}var B0;var t0=f0(()=>{C();s0();B0=X2({currentTheme:s,injectGlobalStyles:!0,setTheme:()=>{},theme:"light",themeName:"light",toggleTheme:()=>{}})});t0();s0();C();import{useMemo as _$,forwardRef as H2,createElement as L2,useContext as B2,createContext as z2}from"react";var N$=new Set,D0=Object.freeze({}),T0=null;function F2(){if(!T0)try{return T0=(t0(),Z2(M$)).StoopContext,T0}catch{return null}return T0}function I2($){let q=0;for(let J=0;J<$.length;J++){let Z=$.charCodeAt(J);q=(q<<5)-q+Z,q=q&q}return Math.abs(q).toString(36)}function M2($){return $.replace(/([A-Z])/g,"-$1").toLowerCase()}function V$($,q){if($.startsWith("theme.")){if($.startsWith("theme.colors.")){let J=$.replace("theme.colors.","");return q.colors[J]||$}if($.startsWith("theme.spacing.")){let J=$.replace("theme.spacing.","");return q.spacing[J]||$}return $}if($.startsWith("$")){let J=$.slice(1);if(J.startsWith("colors.")){let Z=J.replace("colors.","");return q.colors[Z]||$}if(J.startsWith("spacing.")){let Z=J.replace("spacing.","");return q.spacing[Z]||$}if(J.startsWith("zIndices.")){let Z=J.replace("zIndices.","");return q.zIndices[Z]?.toString()||$}if(J in q.colors)return q.colors[J];if(J in q.spacing)return q.spacing[J];if(J in q.zIndices)return q.zIndices[J].toString()}return $}function _2($,q){if(!$.includes(" ")&&($.startsWith("theme.")||$.startsWith("$")))return V$($,q);return $.replace(/(\$[a-zA-Z][a-zA-Z0-9]*(?:\.[a-zA-Z][a-zA-Z0-9]*)?|theme\.[a-zA-Z][a-zA-Z0-9]*\.[a-zA-Z][a-zA-Z0-9]*)/g,(J)=>{return V$(J,q)})}function b0($,q){if(!$||typeof $!=="object")return $;let J={};return Object.entries($).forEach(([Z,G])=>{if(typeof G==="object"&&G!==null)J[Z]=b0(G,q);else if(typeof G==="string"&&(G.includes("theme.")||G.includes("$")))J[Z]=_2(G,q);else J[Z]=G}),J}function $0($,q="",J=0){if(J>10)return console.warn("CSS nesting depth exceeded 10 levels - possible circular reference"),"";let Z="",G="";return Object.entries($).forEach(([U,X])=>{if(typeof X==="object"&&X!==null){if(U==="small"||U==="medium"||U==="large"){let K=L0[U],Y=$0(X,q,J+1);G+=`${K} { ${Y} }`}else if(U.startsWith("@")){let K=$0(X,q,J+1);G+=`${U} { ${K} }`}else if(U.includes("&")){let K=U.replace(/&/g,q),Y=$0(X,K,J+1);G+=Y}else if(U.startsWith(":")){let K=`${q}${U}`,Y=$0(X,K,J+1);G+=Y}else if(U.includes(" ")||U.includes(">")||U.includes("+")||U.includes("~")){let K=`${q} ${U}`,Y=$0(X,K,J+1);G+=Y}}else if(X!==void 0){let K=M2(U);Z+=`${K}: ${X}; `}}),(Z?`${q} { ${Z}}`:"")+G}function N2($){if(typeof document==="undefined"||N$.has($))return;N$.add($);let q=document.createElement("style");q.textContent=$,document.head.appendChild(q)}function P0($){let q=$0($),J=`css-${I2(q)}`,Z=$0($,`.${J}`,0);return N2(Z),J}function V2($,q,J=D0){let Z={...J};return Object.entries($).forEach(([G,Q])=>{let U=q[G];if(U&&typeof U==="string"&&Q[U])Z={...Z,...Q[U]};else if(U===!0&&Q.true)Z={...Z,...Q.true};else if(U===!1&&Q.false)Z={...Z,...Q.false}}),P0(Z)}function M($,q=D0,J){return H2(function Z({as:G,className:Q,css:U,...X},K){let Y=G||$,H=U&&typeof U==="object"?U:D0,W={},L={};if(J)Object.entries(X).forEach(([V,F])=>{if(V in J)W[V]=F;else L[V]=F});else Object.assign(L,X);let B=F2(),z=B2(B||z2(null))?.currentTheme||s,N=_$(()=>{let V=b0(q,z),F=J?Object.fromEntries(Object.entries(J).map(([T,A])=>[T,Object.fromEntries(Object.entries(A).map(([v,P])=>[v,b0(P,z)]))])):void 0;return F?V2(F,W,V):P0(V)},[J,W,q,z]),_=_$(()=>{if(H!==D0){let V=b0(H,z);return P0(V)}return""},[H,z]),j=[N,_,Q].filter(Boolean).join(" ")||void 0;return L2(Y,{...L,className:j,ref:K})})}C();C();import{useState as j2,useEffect as T2}from"react";var U0={large:parseInt(S.large),medium:parseInt(S.medium),small:parseInt(S.small)};function D2($){if($<U0.small)return"small";else if($<U0.medium)return"medium";else return"large"}function b2(){let[$,q]=j2("large");return T2(()=>{let Q=()=>{if(typeof window!=="undefined"){let U=D2(window.innerWidth);q(U)}};return Q(),window.addEventListener("resize",Q),()=>{window.removeEventListener("resize",Q)}},[]),{current:$,down:(Q)=>{let U=U0[$],X=U0[Q];return U<X},is:(Q)=>$===Q,isLarge:$==="large",isMedium:$==="medium",isSmall:$==="small",up:(Q)=>{let U=U0[$],X=U0[Q];return U>=X}}}import{useEffect as P2,useRef as E2}from"react";import{createPortal as A2}from"react-dom";function d($){let q=E2(null);P2(()=>{let Z=document.createElement("div");Z.style.position="relative",Z.style.zIndex="9999";let G;if(typeof $==="string")G=document.querySelector($)||document.body;else if($ instanceof HTMLElement)G=$;else{let Q=document.querySelectorAll("main");G=Q.length===1?Q[0]:document.body}return G.appendChild(Z),q.current=Z,()=>{if(Z.parentNode)Z.parentNode.removeChild(Z);q.current=null}},[$]);let J=(Z)=>{if(!q.current)return null;return A2(Z,q.current)};return{portalElement:q.current,renderPortal:J}}import{useEffect as j$,useRef as C2}from"react";function x($,q,J,Z){let G=C2(q);j$(()=>{G.current=q},[q]),j$(()=>{let Q=null;if(!J)Q=window;else if("current"in J)Q=J.current;else Q=J;if(!Q)return;let U=(X)=>{G.current(X)};return Q.addEventListener($,U,Z),()=>{Q?.removeEventListener($,U,Z)}},[$,J,Z])}function c($,q,J="mousedown"){x(J,(Z)=>{let G=$.current,Q=Z.target;if(!G)return;if(G.contains(Q))return;q(Z)})}var{min:X0,max:r,round:F0,floor:I0}=Math,w=($)=>({x:$,y:$}),R2={left:"right",right:"left",bottom:"top",top:"bottom"},O2={start:"end",end:"start"};function e0($,q,J){return r($,X0(q,J))}function q0($,q){return typeof $==="function"?$(q):$}function l($){return $.split("-")[0]}function M0($){return $.split("-")[1]}function A0($){return $==="x"?"y":"x"}function $$($){return $==="y"?"height":"width"}var k2=new Set(["top","bottom"]);function h($){return k2.has(l($))?"y":"x"}function q$($){return A0(h($))}function b$($,q,J){if(J===void 0)J=!1;let Z=M0($),G=q$($),Q=$$(G),U=G==="x"?Z===(J?"end":"start")?"right":"left":Z==="start"?"bottom":"top";if(q.reference[Q]>q.floating[Q])U=z0(U);return[U,z0(U)]}function P$($){let q=z0($);return[E0($),q,E0(q)]}function E0($){return $.replace(/start|end/g,(q)=>O2[q])}var T$=["left","right"],D$=["right","left"],S2=["top","bottom"],x2=["bottom","top"];function w2($,q,J){switch($){case"top":case"bottom":if(J)return q?D$:T$;return q?T$:D$;case"left":case"right":return q?S2:x2;default:return[]}}function E$($,q,J,Z){let G=M0($),Q=w2(l($),J==="start",Z);if(G){if(Q=Q.map((U)=>U+"-"+G),q)Q=Q.concat(Q.map(E0))}return Q}function z0($){return $.replace(/left|right|bottom|top/g,(q)=>R2[q])}function y2($){return{top:0,right:0,bottom:0,left:0,...$}}function A$($){return typeof $!=="number"?y2($):{top:$,right:$,bottom:$,left:$}}function J0($){let{x:q,y:J,width:Z,height:G}=$;return{width:Z,height:G,top:J,left:q,right:q+Z,bottom:J+G,x:q,y:J}}function C$($,q,J){let{reference:Z,floating:G}=$,Q=h(q),U=q$(q),X=$$(U),K=l(q),Y=Q==="y",H=Z.x+Z.width/2-G.width/2,W=Z.y+Z.height/2-G.height/2,L=Z[X]/2-G[X]/2,B;switch(K){case"top":B={x:H,y:Z.y-G.height};break;case"bottom":B={x:H,y:Z.y+Z.height};break;case"right":B={x:Z.x+Z.width,y:W};break;case"left":B={x:Z.x-G.width,y:W};break;default:B={x:Z.x,y:Z.y}}switch(M0(q)){case"start":B[U]-=L*(J&&Y?-1:1);break;case"end":B[U]+=L*(J&&Y?-1:1);break}return B}var R$=async($,q,J)=>{let{placement:Z="bottom",strategy:G="absolute",middleware:Q=[],platform:U}=J,X=Q.filter(Boolean),K=await(U.isRTL==null?void 0:U.isRTL(q)),Y=await U.getElementRects({reference:$,floating:q,strategy:G}),{x:H,y:W}=C$(Y,Z,K),L=Z,B={},I=0;for(let z=0;z<X.length;z++){let{name:N,fn:_}=X[z],{x:j,y:V,data:F,reset:T}=await _({x:H,y:W,initialPlacement:Z,placement:L,strategy:G,middlewareData:B,rects:Y,platform:U,elements:{reference:$,floating:q}});if(H=j!=null?j:H,W=V!=null?V:W,B={...B,[N]:{...B[N],...F}},T&&I<=50){if(I++,typeof T==="object"){if(T.placement)L=T.placement;if(T.rects)Y=T.rects===!0?await U.getElementRects({reference:$,floating:q,strategy:G}):T.rects;({x:H,y:W}=C$(Y,L,K))}z=-1}}return{x:H,y:W,placement:L,strategy:G,middlewareData:B}};async function J$($,q){var J;if(q===void 0)q={};let{x:Z,y:G,platform:Q,rects:U,elements:X,strategy:K}=$,{boundary:Y="clippingAncestors",rootBoundary:H="viewport",elementContext:W="floating",altBoundary:L=!1,padding:B=0}=q0(q,$),I=A$(B),N=X[L?W==="floating"?"reference":"floating":W],_=J0(await Q.getClippingRect({element:((J=await(Q.isElement==null?void 0:Q.isElement(N)))!=null?J:!0)?N:N.contextElement||await(Q.getDocumentElement==null?void 0:Q.getDocumentElement(X.floating)),boundary:Y,rootBoundary:H,strategy:K})),j=W==="floating"?{x:Z,y:G,width:U.floating.width,height:U.floating.height}:U.reference,V=await(Q.getOffsetParent==null?void 0:Q.getOffsetParent(X.floating)),F=await(Q.isElement==null?void 0:Q.isElement(V))?await(Q.getScale==null?void 0:Q.getScale(V))||{x:1,y:1}:{x:1,y:1},T=J0(Q.convertOffsetParentRelativeRectToViewportRelativeRect?await Q.convertOffsetParentRelativeRectToViewportRelativeRect({elements:X,rect:j,offsetParent:V,strategy:K}):j);return{top:(_.top-T.top+I.top)/F.y,bottom:(T.bottom-_.bottom+I.bottom)/F.y,left:(_.left-T.left+I.left)/F.x,right:(T.right-_.right+I.right)/F.x}}var O$=function($){if($===void 0)$={};return{name:"flip",options:$,async fn(q){var J,Z;let{placement:G,middlewareData:Q,rects:U,initialPlacement:X,platform:K,elements:Y}=q,{mainAxis:H=!0,crossAxis:W=!0,fallbackPlacements:L,fallbackStrategy:B="bestFit",fallbackAxisSideDirection:I="none",flipAlignment:z=!0,...N}=q0($,q);if((J=Q.arrow)!=null&&J.alignmentOffset)return{};let _=l(G),j=h(X),V=l(X)===X,F=await(K.isRTL==null?void 0:K.isRTL(Y.floating)),T=L||(V||!z?[z0(X)]:P$(X)),A=I!=="none";if(!L&&A)T.push(...E$(X,z,I,F));let v=[X,...T],P=await J$(q,N),i=[],p=((Z=Q.flip)==null?void 0:Z.overflows)||[];if(H)i.push(P[_]);if(W){let t=b$(G,U,F);i.push(P[t[0]],P[t[1]])}if(p=[...p,{placement:G,overflows:i}],!i.every((t)=>t<=0)){var v0,D;let t=(((v0=Q.flip)==null?void 0:v0.index)||0)+1,h0=v[t];if(h0){if(!(W==="alignment"?j!==h(h0):!1)||p.every((k)=>h(k.placement)===j?k.overflows[0]>0:!0))return{data:{index:t,overflows:p},reset:{placement:h0}}}let H0=(D=p.filter((e)=>e.overflows[0]<=0).sort((e,k)=>e.overflows[1]-k.overflows[1])[0])==null?void 0:D.placement;if(!H0)switch(B){case"bestFit":{var m;let e=(m=p.filter((k)=>{if(A){let a=h(k.placement);return a===j||a==="y"}return!0}).map((k)=>[k.placement,k.overflows.filter((a)=>a>0).reduce((a,e1)=>a+e1,0)]).sort((k,a)=>k[1]-a[1])[0])==null?void 0:m[0];if(e)H0=e;break}case"initialPlacement":H0=X;break}if(G!==H0)return{reset:{placement:H0}}}return{}}}};var k$=new Set(["left","top"]);async function u2($,q){let{placement:J,platform:Z,elements:G}=$,Q=await(Z.isRTL==null?void 0:Z.isRTL(G.floating)),U=l(J),X=M0(J),K=h(J)==="y",Y=k$.has(U)?-1:1,H=Q&&K?-1:1,W=q0(q,$),{mainAxis:L,crossAxis:B,alignmentAxis:I}=typeof W==="number"?{mainAxis:W,crossAxis:0,alignmentAxis:null}:{mainAxis:W.mainAxis||0,crossAxis:W.crossAxis||0,alignmentAxis:W.alignmentAxis};if(X&&typeof I==="number")B=X==="end"?I*-1:I;return K?{x:B*H,y:L*Y}:{x:L*Y,y:B*H}}var S$=function($){if($===void 0)$=0;return{name:"offset",options:$,async fn(q){var J,Z;let{x:G,y:Q,placement:U,middlewareData:X}=q,K=await u2(q,$);if(U===((J=X.offset)==null?void 0:J.placement)&&(Z=X.arrow)!=null&&Z.alignmentOffset)return{};return{x:G+K.x,y:Q+K.y,data:{...K,placement:U}}}}},x$=function($){if($===void 0)$={};return{name:"shift",options:$,async fn(q){let{x:J,y:Z,placement:G}=q,{mainAxis:Q=!0,crossAxis:U=!1,limiter:X={fn:(N)=>{let{x:_,y:j}=N;return{x:_,y:j}}},...K}=q0($,q),Y={x:J,y:Z},H=await J$(q,K),W=h(l(G)),L=A0(W),B=Y[L],I=Y[W];if(Q){let N=L==="y"?"top":"left",_=L==="y"?"bottom":"right",j=B+H[N],V=B-H[_];B=e0(j,B,V)}if(U){let N=W==="y"?"top":"left",_=W==="y"?"bottom":"right",j=I+H[N],V=I-H[_];I=e0(j,I,V)}let z=X.fn({...q,[L]:B,[W]:I});return{...z,data:{x:z.x-J,y:z.y-Z,enabled:{[L]:Q,[W]:U}}}}}},w$=function($){if($===void 0)$={};return{options:$,fn(q){let{x:J,y:Z,placement:G,rects:Q,middlewareData:U}=q,{offset:X=0,mainAxis:K=!0,crossAxis:Y=!0}=q0($,q),H={x:J,y:Z},W=h(G),L=A0(W),B=H[L],I=H[W],z=q0(X,q),N=typeof z==="number"?{mainAxis:z,crossAxis:0}:{mainAxis:0,crossAxis:0,...z};if(K){let V=L==="y"?"height":"width",F=Q.reference[L]-Q.floating[V]+N.mainAxis,T=Q.reference[L]+Q.reference[V]-N.mainAxis;if(B<F)B=F;else if(B>T)B=T}if(Y){var _,j;let V=L==="y"?"width":"height",F=k$.has(l(G)),T=Q.reference[W]-Q.floating[V]+(F?((_=U.offset)==null?void 0:_[W])||0:0)+(F?0:N.crossAxis),A=Q.reference[W]+Q.reference[V]+(F?0:((j=U.offset)==null?void 0:j[W])||0)-(F?N.crossAxis:0);if(I<T)I=T;else if(I>A)I=A}return{[L]:B,[W]:I}}}};function C0(){return typeof window!=="undefined"}function Z0($){if(u$($))return($.nodeName||"").toLowerCase();return"#document"}function E($){var q;return($==null||(q=$.ownerDocument)==null?void 0:q.defaultView)||window}function y($){var q;return(q=(u$($)?$.ownerDocument:$.document)||window.document)==null?void 0:q.documentElement}function u$($){if(!C0())return!1;return $ instanceof Node||$ instanceof E($).Node}function R($){if(!C0())return!1;return $ instanceof Element||$ instanceof E($).Element}function u($){if(!C0())return!1;return $ instanceof HTMLElement||$ instanceof E($).HTMLElement}function y$($){if(!C0()||typeof ShadowRoot==="undefined")return!1;return $ instanceof ShadowRoot||$ instanceof E($).ShadowRoot}var v2=new Set(["inline","contents"]);function Y0($){let{overflow:q,overflowX:J,overflowY:Z,display:G}=O($);return/auto|scroll|overlay|hidden|clip/.test(q+Z+J)&&!v2.has(G)}var h2=new Set(["table","td","th"]);function v$($){return h2.has(Z0($))}var g2=[":popover-open",":modal"];function _0($){return g2.some((q)=>{try{return $.matches(q)}catch(J){return!1}})}var f2=["transform","translate","scale","rotate","perspective"],p2=["transform","translate","scale","rotate","perspective","filter"],m2=["paint","layout","strict","content"];function R0($){let q=O0(),J=R($)?O($):$;return f2.some((Z)=>J[Z]?J[Z]!=="none":!1)||(J.containerType?J.containerType!=="normal":!1)||!q&&(J.backdropFilter?J.backdropFilter!=="none":!1)||!q&&(J.filter?J.filter!=="none":!1)||p2.some((Z)=>(J.willChange||"").includes(Z))||m2.some((Z)=>(J.contain||"").includes(Z))}function h$($){let q=o($);while(u(q)&&!G0(q)){if(R0(q))return q;else if(_0(q))return null;q=o(q)}return null}function O0(){if(typeof CSS==="undefined"||!CSS.supports)return!1;return CSS.supports("-webkit-backdrop-filter","none")}var d2=new Set(["html","body","#document"]);function G0($){return d2.has(Z0($))}function O($){return E($).getComputedStyle($)}function N0($){if(R($))return{scrollLeft:$.scrollLeft,scrollTop:$.scrollTop};return{scrollLeft:$.scrollX,scrollTop:$.scrollY}}function o($){if(Z0($)==="html")return $;let q=$.assignedSlot||$.parentNode||y$($)&&$.host||y($);return y$(q)?q.host:q}function g$($){let q=o($);if(G0(q))return $.ownerDocument?$.ownerDocument.body:$.body;if(u(q)&&Y0(q))return q;return g$(q)}function K0($,q,J){var Z;if(q===void 0)q=[];if(J===void 0)J=!0;let G=g$($),Q=G===((Z=$.ownerDocument)==null?void 0:Z.body),U=E(G);if(Q){let X=k0(U);return q.concat(U,U.visualViewport||[],Y0(G)?G:[],X&&J?K0(X):[])}return q.concat(G,K0(G,[],J))}function k0($){return $.parent&&Object.getPrototypeOf($.parent)?$.frameElement:null}function m$($){let q=O($),J=parseFloat(q.width)||0,Z=parseFloat(q.height)||0,G=u($),Q=G?$.offsetWidth:J,U=G?$.offsetHeight:Z,X=F0(J)!==Q||F0(Z)!==U;if(X)J=Q,Z=U;return{width:J,height:Z,$:X}}function G$($){return!R($)?$.contextElement:$}function W0($){let q=G$($);if(!u(q))return w(1);let J=q.getBoundingClientRect(),{width:Z,height:G,$:Q}=m$(q),U=(Q?F0(J.width):J.width)/Z,X=(Q?F0(J.height):J.height)/G;if(!U||!Number.isFinite(U))U=1;if(!X||!Number.isFinite(X))X=1;return{x:U,y:X}}var c2=w(0);function d$($){let q=E($);if(!O0()||!q.visualViewport)return c2;return{x:q.visualViewport.offsetLeft,y:q.visualViewport.offsetTop}}function r2($,q,J){if(q===void 0)q=!1;if(!J||q&&J!==E($))return!1;return q}function Q0($,q,J,Z){if(q===void 0)q=!1;if(J===void 0)J=!1;let G=$.getBoundingClientRect(),Q=G$($),U=w(1);if(q)if(Z){if(R(Z))U=W0(Z)}else U=W0($);let X=r2(Q,J,Z)?d$(Q):w(0),K=(G.left+X.x)/U.x,Y=(G.top+X.y)/U.y,H=G.width/U.x,W=G.height/U.y;if(Q){let L=E(Q),B=Z&&R(Z)?E(Z):Z,I=L,z=k0(I);while(z&&Z&&B!==I){let N=W0(z),_=z.getBoundingClientRect(),j=O(z),V=_.left+(z.clientLeft+parseFloat(j.paddingLeft))*N.x,F=_.top+(z.clientTop+parseFloat(j.paddingTop))*N.y;K*=N.x,Y*=N.y,H*=N.x,W*=N.y,K+=V,Y+=F,I=E(z),z=k0(I)}}return J0({width:H,height:W,x:K,y:Y})}function Q$($,q){let J=N0($).scrollLeft;if(!q)return Q0(y($)).left+J;return q.left+J}function c$($,q,J){if(J===void 0)J=!1;let Z=$.getBoundingClientRect(),G=Z.left+q.scrollLeft-(J?0:Q$($,Z)),Q=Z.top+q.scrollTop;return{x:G,y:Q}}function l2($){let{elements:q,rect:J,offsetParent:Z,strategy:G}=$,Q=G==="fixed",U=y(Z),X=q?_0(q.floating):!1;if(Z===U||X&&Q)return J;let K={scrollLeft:0,scrollTop:0},Y=w(1),H=w(0),W=u(Z);if(W||!W&&!Q){if(Z0(Z)!=="body"||Y0(U))K=N0(Z);if(u(Z)){let B=Q0(Z);Y=W0(Z),H.x=B.x+Z.clientLeft,H.y=B.y+Z.clientTop}}let L=U&&!W&&!Q?c$(U,K,!0):w(0);return{width:J.width*Y.x,height:J.height*Y.y,x:J.x*Y.x-K.scrollLeft*Y.x+H.x+L.x,y:J.y*Y.y-K.scrollTop*Y.y+H.y+L.y}}function o2($){return Array.from($.getClientRects())}function i2($){let q=y($),J=N0($),Z=$.ownerDocument.body,G=r(q.scrollWidth,q.clientWidth,Z.scrollWidth,Z.clientWidth),Q=r(q.scrollHeight,q.clientHeight,Z.scrollHeight,Z.clientHeight),U=-J.scrollLeft+Q$($),X=-J.scrollTop;if(O(Z).direction==="rtl")U+=r(q.clientWidth,Z.clientWidth)-G;return{width:G,height:Q,x:U,y:X}}function a2($,q){let J=E($),Z=y($),G=J.visualViewport,Q=Z.clientWidth,U=Z.clientHeight,X=0,K=0;if(G){Q=G.width,U=G.height;let Y=O0();if(!Y||Y&&q==="fixed")X=G.offsetLeft,K=G.offsetTop}return{width:Q,height:U,x:X,y:K}}var s2=new Set(["absolute","fixed"]);function n2($,q){let J=Q0($,!0,q==="fixed"),Z=J.top+$.clientTop,G=J.left+$.clientLeft,Q=u($)?W0($):w(1),U=$.clientWidth*Q.x,X=$.clientHeight*Q.y,K=G*Q.x,Y=Z*Q.y;return{width:U,height:X,x:K,y:Y}}function f$($,q,J){let Z;if(q==="viewport")Z=a2($,J);else if(q==="document")Z=i2(y($));else if(R(q))Z=n2(q,J);else{let G=d$($);Z={x:q.x-G.x,y:q.y-G.y,width:q.width,height:q.height}}return J0(Z)}function r$($,q){let J=o($);if(J===q||!R(J)||G0(J))return!1;return O(J).position==="fixed"||r$(J,q)}function t2($,q){let J=q.get($);if(J)return J;let Z=K0($,[],!1).filter((X)=>R(X)&&Z0(X)!=="body"),G=null,Q=O($).position==="fixed",U=Q?o($):$;while(R(U)&&!G0(U)){let X=O(U),K=R0(U);if(!K&&X.position==="fixed")G=null;if(Q?!K&&!G:!K&&X.position==="static"&&!!G&&s2.has(G.position)||Y0(U)&&!K&&r$($,U))Z=Z.filter((H)=>H!==U);else G=X;U=o(U)}return q.set($,Z),Z}function e2($){let{element:q,boundary:J,rootBoundary:Z,strategy:G}=$,U=[...J==="clippingAncestors"?_0(q)?[]:t2(q,this._c):[].concat(J),Z],X=U[0],K=U.reduce((Y,H)=>{let W=f$(q,H,G);return Y.top=r(W.top,Y.top),Y.right=X0(W.right,Y.right),Y.bottom=X0(W.bottom,Y.bottom),Y.left=r(W.left,Y.left),Y},f$(q,X,G));return{width:K.right-K.left,height:K.bottom-K.top,x:K.left,y:K.top}}function $6($){let{width:q,height:J}=m$($);return{width:q,height:J}}function q6($,q,J){let Z=u(q),G=y(q),Q=J==="fixed",U=Q0($,!0,Q,q),X={scrollLeft:0,scrollTop:0},K=w(0);function Y(){K.x=Q$(G)}if(Z||!Z&&!Q){if(Z0(q)!=="body"||Y0(G))X=N0(q);if(Z){let B=Q0(q,!0,Q,q);K.x=B.x+q.clientLeft,K.y=B.y+q.clientTop}else if(G)Y()}if(Q&&!Z&&G)Y();let H=G&&!Z&&!Q?c$(G,X):w(0),W=U.left+X.scrollLeft-K.x-H.x,L=U.top+X.scrollTop-K.y-H.y;return{x:W,y:L,width:U.width,height:U.height}}function Z$($){return O($).position==="static"}function p$($,q){if(!u($)||O($).position==="fixed")return null;if(q)return q($);let J=$.offsetParent;if(y($)===J)J=J.ownerDocument.body;return J}function l$($,q){let J=E($);if(_0($))return J;if(!u($)){let G=o($);while(G&&!G0(G)){if(R(G)&&!Z$(G))return G;G=o(G)}return J}let Z=p$($,q);while(Z&&v$(Z)&&Z$(Z))Z=p$(Z,q);if(Z&&G0(Z)&&Z$(Z)&&!R0(Z))return J;return Z||h$($)||J}var J6=async function($){let q=this.getOffsetParent||l$,J=this.getDimensions,Z=await J($.floating);return{reference:q6($.reference,await q($.floating),$.strategy),floating:{x:0,y:0,width:Z.width,height:Z.height}}};function Z6($){return O($).direction==="rtl"}var G6={convertOffsetParentRelativeRectToViewportRelativeRect:l2,getDocumentElement:y,getClippingRect:e2,getOffsetParent:l$,getElementRects:J6,getClientRects:o2,getDimensions:$6,getScale:W0,isElement:R,isRTL:Z6};function o$($,q){return $.x===q.x&&$.y===q.y&&$.width===q.width&&$.height===q.height}function Q6($,q){let J=null,Z,G=y($);function Q(){var X;clearTimeout(Z),(X=J)==null||X.disconnect(),J=null}function U(X,K){if(X===void 0)X=!1;if(K===void 0)K=1;Q();let Y=$.getBoundingClientRect(),{left:H,top:W,width:L,height:B}=Y;if(!X)q();if(!L||!B)return;let I=I0(W),z=I0(G.clientWidth-(H+L)),N=I0(G.clientHeight-(W+B)),_=I0(H),V={rootMargin:-I+"px "+-z+"px "+-N+"px "+-_+"px",threshold:r(0,X0(1,K))||1},F=!0;function T(A){let v=A[0].intersectionRatio;if(v!==K){if(!F)return U();if(!v)Z=setTimeout(()=>{U(!1,0.0000001)},1000);else U(!1,v)}if(v===1&&!o$(Y,$.getBoundingClientRect()))U();F=!1}try{J=new IntersectionObserver(T,{...V,root:G.ownerDocument})}catch(A){J=new IntersectionObserver(T,V)}J.observe($)}return U(!0),Q}function i$($,q,J,Z){if(Z===void 0)Z={};let{ancestorScroll:G=!0,ancestorResize:Q=!0,elementResize:U=typeof ResizeObserver==="function",layoutShift:X=typeof IntersectionObserver==="function",animationFrame:K=!1}=Z,Y=G$($),H=G||Q?[...Y?K0(Y):[],...K0(q)]:[];H.forEach((_)=>{G&&_.addEventListener("scroll",J,{passive:!0}),Q&&_.addEventListener("resize",J)});let W=Y&&X?Q6(Y,J):null,L=-1,B=null;if(U){if(B=new ResizeObserver((_)=>{let[j]=_;if(j&&j.target===Y&&B)B.unobserve(q),cancelAnimationFrame(L),L=requestAnimationFrame(()=>{var V;(V=B)==null||V.observe(q)});J()}),Y&&!K)B.observe(Y);B.observe(q)}let I,z=K?Q0($):null;if(K)N();function N(){let _=Q0($);if(z&&!o$(z,_))J();z=_,I=requestAnimationFrame(N)}return J(),()=>{var _;if(H.forEach((j)=>{G&&j.removeEventListener("scroll",J),Q&&j.removeEventListener("resize",J)}),W==null||W(),(_=B)==null||_.disconnect(),B=null,K)cancelAnimationFrame(I)}}var a$=S$;var s$=x$,n$=O$;var t$=w$,e$=($,q,J)=>{let Z=new Map,G={platform:G6,...J},Q={...G.platform,_c:Z};return R$($,q,{...G,platform:Q})};import{useState as $1,useRef as U$,useEffect as q1}from"react";function V0(){let[$,q]=$1(!1),[J,Z]=$1(!1),G=U$(null),Q=U$(null),U=U$(null),X=()=>{if(!G.current||!Q.current)return;let L="fixed";e$(G.current,Q.current,{middleware:[a$(8),n$({fallbackPlacements:["bottom","top","bottom-start","top-start","bottom-end","top-end"],padding:8}),s$({limiter:t$(),padding:8})],placement:"bottom",strategy:L}).then(({x:B,y:I})=>{if(!Q.current||!G.current)return;Q.current.style.position=L,Q.current.style.left=`${Math.round(B)}px`,Q.current.style.top=`${Math.round(I)}px`,Q.current.style.visibility="visible"})},K=(L)=>{if(!L)return;L.style.position="fixed",L.style.top="0",L.style.left="0",L.style.transform="",L.style.visibility="hidden"};q1(()=>{if(!J||!G.current||!Q.current){if(U.current)U.current(),U.current=null;return}return K(Q.current),X(),U.current=i$(G.current,Q.current,X,{ancestorResize:!0,ancestorScroll:!0,elementResize:!0}),()=>{if(U.current)U.current(),U.current=null}},[J]),q1(()=>{return()=>{if(U.current)U.current(),U.current=null}},[]);function Y(){Z(!0),q(!0)}function H(){q(!1),setTimeout(()=>Z(!1),200)}function W(){if($||J)H();else Y()}return{contentRef:Q,handleClick:W,handleClose:H,handleOpen:Y,isMounted:J,isOpen:$,triggerRef:G}}C();var J1=M("div",{display:"flex"},{align:{baseline:{alignItems:"baseline"},center:{alignItems:"center"},end:{alignItems:"flex-end"},start:{alignItems:"flex-start"},stretch:{alignItems:"stretch"}},alignContent:{around:{alignContent:"space-around"},between:{alignContent:"space-between"},center:{alignContent:"center"},end:{alignContent:"flex-end"},start:{alignContent:"flex-start"},stretch:{alignContent:"stretch"}},direction:{column:{flexDirection:"column"},"column-reverse":{flexDirection:"column-reverse"},row:{flexDirection:"row"},"row-reverse":{flexDirection:"row-reverse"}},inline:{false:{display:"flex"},true:{display:"inline-flex"}},justify:{around:{justifyContent:"space-around"},between:{justifyContent:"space-between"},center:{justifyContent:"center"},end:{justifyContent:"flex-end"},evenly:{justifyContent:"space-evenly"},start:{justifyContent:"flex-start"}},minimal:{false:{},true:{padding:"0 !important"}},textAlign:{center:{textAlign:"center"},justify:{textAlign:"justify"},left:{textAlign:"left"},right:{textAlign:"right"}},wrap:{false:{flexWrap:"nowrap"},reverse:{flexWrap:"wrap-reverse"},true:{flexWrap:"wrap"}}});import{jsxDEV as U6}from"react/jsx-dev-runtime";function Z1({align:$,alignContent:q,as:J="div",basis:Z,bottom:G,children:Q,css:U,direction:X="column",gap:K,grow:Y,inline:H=!1,justify:W,minimal:L=!1,shrink:B,textAlign:I,top:z,wrap:N,..._}){let j={...Y!==void 0&&{flexGrow:Y},...B!==void 0&&{flexShrink:B},...Z&&{flexBasis:Z},...K&&{gap:b[K]}},V={...z&&{paddingTop:b[z]},...G&&{paddingBottom:b[G]}};return U6(J1,{align:$,alignContent:q,as:J,css:{...j,...V,...U},direction:X,inline:H,justify:W,minimal:L,textAlign:I,wrap:N,..._,children:Q},void 0,!1,void 0,this)}C();var G1=M("section",{"@media (max-width: 768px)":{paddingLeft:"$small",paddingRight:"$small"},paddingLeft:"$medium",paddingRight:"$medium",position:"relative",width:"100%"}),Q1=M("div",{margin:"0 auto",position:"relative",width:"100%"},{container:{false:{width:"100%"},true:{maxWidth:"1200px",width:"96%"}},wide:{false:{},true:{maxWidth:"1600px",width:"98%"}}});import{jsxDEV as U1}from"react/jsx-dev-runtime";function X1({as:$="section",bottom:q,children:J,container:Z=!0,css:G,top:Q,wide:U=!1,...X}){let K={...Q&&{paddingTop:b[Q]},...q&&{paddingBottom:b[q]}},Y=Z?U1(Q1,{container:Z,wide:U,children:J},void 0,!1,void 0,this):J;return U1(G1,{as:$,css:{...K,...G},...X,children:Y},void 0,!1,void 0,this)}C();var K1=M("p",{margin:0,padding:0},{muted:{false:{},true:{opacity:"0.7"}},size:{h1:{paddingBottom:"$medium"},h2:{paddingBottom:"$medium"},h3:{paddingBottom:"$medium"},h4:{paddingBottom:"$small"},h5:{paddingBottom:"$small"},h6:{paddingBottom:"$small"},label:{display:"block",fontSize:"clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem)",fontWeight:"600",lineHeight:"1.4",paddingBottom:"$smaller"},p:{paddingBottom:"$small"},small:{paddingBottom:"$smaller"},span:{},strong:{}}});import{jsxDEV as X6}from"react/jsx-dev-runtime";function S0({as:$="p",bottom:q,children:J,css:Z,muted:G=!1,size:Q,top:U,...X}){let K=Q||$,Y={...U&&{marginTop:0,paddingTop:b[U]},...q&&{marginBottom:0,paddingBottom:b[q]}};return X6(K1,{as:$,css:{...Y,...Z},muted:G,size:K,...X,children:J},void 0,!1,void 0,this)}C();var Y1=M("button",{"&:disabled":{cursor:"not-allowed",opacity:"0.5"},alignItems:"center",appearance:"none",border:"1px solid transparent",borderRadius:"$medium",display:"inline-flex",fontWeight:"700",justifyContent:"center",minHeight:"40px",outline:"none",padding:"$small $medium",position:"relative",textDecoration:"none",whiteSpace:"nowrap"},{block:{false:{display:"inline-flex",width:"auto"},true:{display:"flex",width:"100%"}},loading:{false:{},true:{cursor:"wait",opacity:"0.7"}},size:{normal:{minHeight:"40px",padding:"$small $medium"},small:{fontSize:"0.875rem",minHeight:"32px",padding:"$smaller $small"}},variant:{minimal:{"&:active:not(:disabled)":{backgroundColor:"$border"},"&:hover:not(:disabled)":{backgroundColor:"$hover"},backgroundColor:"transparent",border:"1px solid transparent",color:"$text"},primary:{"&:active:not(:disabled)":{opacity:"0.8"},"&:hover:not(:disabled)":{opacity:"0.9"},backgroundColor:"$brand"},secondary:{"&:active:not(:disabled)":{backgroundColor:"$border"},"&:hover:not(:disabled)":{backgroundColor:"$hover"},backgroundColor:"$fill",color:"$text"}}});import{jsxDEV as K6}from"react/jsx-dev-runtime";function x0({block:$=!1,bottom:q,children:J,css:Z,disabled:G,loading:Q=!1,size:U="normal",top:X,variant:K="primary",...Y}){let H={...X&&{marginTop:b[X]},...q&&{marginBottom:b[q]}};return K6(Y1,{block:$,css:{...H,...Z},disabled:G||Q,loading:Q,size:U,variant:K,...Y,children:Q?"Loading...":J},void 0,!1,void 0,this)}C();var W1=M("span",{alignItems:"center",backgroundColor:"$text",border:"1px solid transparent",borderRadius:"$medium",color:"$background",display:"inline-flex",fontSize:"0.75rem",fontWeight:"700",justifyContent:"center",margin:0,outline:"none",padding:"$smaller $smaller",position:"relative",textDecoration:"none",verticalAlign:"middle",whiteSpace:"nowrap"},{clickable:{false:{},true:{"&:active":{opacity:"0.5"},"&:hover":{opacity:"0.7"},cursor:"pointer",transition:"opacity 0.2s ease"}}});import{jsxDEV as Y6}from"react/jsx-dev-runtime";function H1({bottom:$,clickable:q=!1,css:J,top:Z,...G}){let Q={...Z&&{marginTop:b[Z]},...$&&{marginBottom:b[$]}};return Y6(W1,{clickable:q,css:{...Q,...J},...G},void 0,!1,void 0,this)}var L1=M("div",{borderRadius:"$small",color:"$text",display:"flex",flexDirection:"column",margin:0,overflow:"hidden",position:"relative",width:"100%"},{clickable:{false:{},true:{"&:active":{transform:"translateY(0)"},"&:focus-visible":{outline:"1px solid $brand",outlineOffset:"2px"},"&:hover":{transform:"translateY(-2px)"},cursor:"pointer",transition:"all 0.2s ease"}},padding:{default:{padding:"$medium"},minimal:{padding:"0"},small:{padding:"$small"}},variant:{bordered:{backgroundColor:"transparent",border:"1px solid $border"},default:{backgroundColor:"$fill",border:"1px solid $border"}}}),B1=M("div",{borderBottom:"1px solid $border",fontWeight:"600"},{padding:{default:{padding:"$medium $medium $small $medium"},minimal:{padding:"0"},small:{padding:"$small $small $smaller $small"}}}),z1=M("div",{borderTop:"1px solid $border",marginTop:"auto"},{padding:{default:{padding:"$small $medium $medium $medium"},minimal:{padding:"0"},small:{padding:"$smaller $small $small $small"}}}),F1=M("div",{flex:"1"},{hasFooter:{false:{},true:{paddingBottom:"0"}},hasHeader:{false:{},true:{paddingTop:"0"}},padding:{default:{padding:"$medium"},minimal:{padding:"0"},small:{padding:"$small"}}});import{jsxDEV as w0}from"react/jsx-dev-runtime";function I1({as:$="div",children:q,clickable:J=!1,css:Z,footer:G,header:Q,onClick:U,padding:X="default",variant:K="default",...Y}){let H=J||!!U,W=!!Q,L=!!G;return w0(L1,{as:$,clickable:H,css:Z,padding:W||L?"minimal":X,variant:K,onClick:U,...H&&{role:"button",tabIndex:0},...Y,children:[W&&w0(B1,{padding:X,children:Q},void 0,!1,void 0,this),w0(F1,{hasFooter:L,hasHeader:W,padding:W||L?X:"minimal",children:q},void 0,!1,void 0,this),L&&w0(z1,{padding:X,children:G},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var M1=M("input",{"&::placeholder":{color:"$border",opacity:1},"&:disabled":{backgroundColor:"$border",cursor:"not-allowed",opacity:0.6},"&:focus":{borderColor:"$brand"},appearance:"none",backgroundColor:"$fill",border:"1px solid $border",borderRadius:"$small",color:"$text",display:"block",fontSize:"1rem",fontWeight:"400",lineHeight:"1.4",minHeight:"40px",outline:"none",padding:"$small $medium",transition:"border-color 0.2s ease",width:"100%"},{variant:{default:{backgroundColor:"$fill",border:"1px solid $border"},error:{borderColor:"red"}}});import{jsxDEV as W6}from"react/jsx-dev-runtime";function y0({state:$="default",...q}){return W6(M1,{variant:$,...q},void 0,!1,void 0,this)}var _1=M("textarea",{"&:disabled":{backgroundColor:"$fill",color:"$text",cursor:"not-allowed",opacity:0.6},"&:focus":{borderColor:"$brand",outline:"1px solid $brand",outlineOffset:"2px"},appearance:"none",background:"none",backgroundColor:"$fill",border:"1px solid $border",borderRadius:"$small",color:"$text",display:"block",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:"1rem",lineHeight:"1.5",margin:0,minHeight:"100px",outline:"none",padding:"$small $medium",resize:"vertical",width:"100%"},{variant:{default:{backgroundColor:"$fill",border:"1px solid $border"},minimal:{backgroundColor:"transparent",border:"1px solid transparent",borderBottom:"1px solid $border"}}});import{jsxDEV as H6}from"react/jsx-dev-runtime";function N1({css:$,variant:q="default",...J}){return H6(_1,{css:$,variant:q,...J},void 0,!1,void 0,this)}import{useState as L6}from"react";var V1=M("div",{display:"flex",flexDirection:"column",width:"100%"}),j1=M("div",{borderBottom:"1px solid $border",display:"flex",marginBottom:"$medium"},{variant:{default:{borderBottom:"1px solid $border"},minimal:{borderBottom:"1px solid $border"}}}),T1=M("button",{"&:disabled":{cursor:"not-allowed",opacity:0.5},"&:focus":{outline:"1px solid $brand",outlineOffset:"2px"},"&:hover":{backgroundColor:"$hover"},background:"none",border:"none",borderRadius:"$small $small 0 0",color:"$text",cursor:"pointer",fontSize:"1rem",fontWeight:"500",padding:"$small $medium",position:"relative",transition:"all 0.2s ease"},{active:{false:{},true:{"&::after":{backgroundColor:"$brand",bottom:"-2px",content:'""',height:"2px",left:0,position:"absolute",right:0},color:"$text",fontWeight:"600"}}}),D1=M("div",{"&:focus":{outline:"1px solid $brand",outlineOffset:"2px"},outline:"none",padding:"$medium 0"});import{jsxDEV as u0}from"react/jsx-dev-runtime";function b1({css:$,defaultActive:q=0,items:J,onTabChange:Z,variant:G="default",...Q}){let[U,X]=L6(q),K=(H)=>{X(H),Z?.(H)},Y=(H,W)=>{if(H.key==="Enter"||H.key===" ")H.preventDefault(),K(W)};return u0(V1,{css:$,...Q,children:[u0(j1,{role:"tablist",variant:G,children:J.map((H,W)=>u0(T1,{active:U===W,"aria-controls":`panel-${W}`,"aria-selected":U===W,disabled:H.disabled,id:`tab-${W}`,role:"tab",tabIndex:U===W?0:-1,onClick:()=>K(W),onKeyDown:(L)=>Y(L,W),children:H.label},H.id||W,!1,void 0,this))},void 0,!1,void 0,this),J.map((H,W)=>u0(D1,{"aria-labelledby":`tab-${W}`,hidden:U!==W,id:`panel-${W}`,role:"tabpanel",tabIndex:0,children:U===W&&H.content},`panel-${H.id||W}`,!1,void 0,this))]},void 0,!0,void 0,this)}import{useState as O1,useRef as k1,useEffect as B6}from"react";C();var P1=M("div",{cursor:"pointer",display:"inline-block"}),E1=M("div",{alignItems:"center",backgroundColor:"$overlay",bottom:0,display:"flex",justifyContent:"center",left:0,position:"fixed",right:0,top:0,transition:"opacity 0.2s ease",zIndex:"$dropdown"}),A1=M("div",{backgroundColor:"$fill",border:"1px solid $border",borderRadius:"$small",maxHeight:"70vh",maxWidth:"400px",minWidth:"250px",outline:"none",overflowY:"auto",transition:"transform 0.2s ease, opacity 0.2s ease"},{variant:{default:{backgroundColor:"$fill",border:"1px solid $border"},elevated:{backgroundColor:"$fill",border:"none"}}}),C1=M("div",{"&:disabled":{cursor:"not-allowed",opacity:0.5},"&:focus":{backgroundColor:"$hover",outline:"1px solid $brand",outlineOffset:"-2px"},"&:hover":{backgroundColor:"$hover"},alignItems:"center",background:"none",border:"none",cursor:"pointer",display:"flex",gap:"$small",padding:"$small $medium",textAlign:"left",transition:"background-color 0.2s ease",width:"100%"},{variant:{danger:{"&:hover":{backgroundColor:"$hover",color:"$text"},color:"$text"},default:{color:"$text"}}}),R1=M("div",{backgroundColor:"$border",height:"1px",margin:"$smaller 0"});import{jsxDEV as g,Fragment as S1}from"react/jsx-dev-runtime";function x1({children:$,css:q,initial:J,logo:Z,onSelection:G,options:Q,trigger:U,triggerCss:X,...K}){let[Y,H]=O1(!1),[W,L]=O1(J?Q.findIndex((F)=>F.value===J):-1),B=k1(null),I=k1(null),{renderPortal:z}=d(),N=()=>H(!Y),_=()=>H(!1),j=(F)=>{G?.(F.value,F.label),_()};return x("keydown",(F)=>{if(!Y)return;switch(F.key){case"Escape":_();break;case"ArrowDown":F.preventDefault(),L((T)=>(T+1)%Q.length);break;case"ArrowUp":F.preventDefault(),L((T)=>(T-1+Q.length)%Q.length);break;case"Enter":if(F.preventDefault(),W>=0)j(Q[W]);break}}),c(I,_),B6(()=>{if(Y&&I.current)I.current.focus()},[Y]),g(S1,{children:[g(P1,{ref:B,css:X,onClick:N,...K,children:U},void 0,!1,void 0,this),Y&&z(g(E1,{onClick:_,children:g(A1,{ref:I,css:q,tabIndex:-1,variant:"default",onClick:(F)=>F.stopPropagation(),children:[Z&&g("div",{style:{borderBottom:`1px solid ${m0.border}`,padding:"16px"},children:Z},void 0,!1,void 0,this),Q.map((F,T)=>g(C1,{style:{backgroundColor:W===T?m0.hover:void 0},variant:F.value.includes("delete")||F.value.includes("remove")?"danger":"default",onClick:()=>j(F),onMouseEnter:()=>L(T),children:[F.iconPosition!=="right"&&F.icon,g("span",{children:F.label},void 0,!1,void 0,this),F.iconPosition==="right"&&F.icon]},F.value,!0,void 0,this)),$&&g(S1,{children:[g(R1,{},void 0,!1,void 0,this),g("div",{style:{padding:"8px"},children:typeof $==="function"?$(_):$},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this))]},void 0,!0,void 0,this)}import{useState as X$,useEffect as p1}from"react";var w1=M("div",{cursor:"pointer",display:"inline-block",position:"relative",width:"fit-content"}),y1=M("div",{backgroundColor:"$fill",border:"1px solid $border",borderRadius:"$small",maxHeight:"300px",maxWidth:"400px",minWidth:"200px",opacity:1,outline:"none",overflowY:"auto",position:"fixed",transition:"opacity 0.2s ease",visibility:"hidden",zIndex:"$dropdown"}),u1=M("div",{backgroundColor:"$hover",borderBottom:"1px solid $border",color:"$text",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:"0.875rem",fontWeight:"600",padding:"$small $medium"}),v1=M("div",{borderBottom:"1px solid $border",padding:"$small"}),h1=M("button",{"&:hover":{backgroundColor:"$hover"},'&[data-focused="true"]':{backgroundColor:"$hover",outline:"1px solid $brand",outlineOffset:"-2px"},'&[data-selected="true"]':{backgroundColor:"$brand",fontWeight:"600"},alignItems:"center",backgroundColor:"transparent",border:"none",color:"$text",cursor:"pointer",display:"flex",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:"1rem",padding:"$small $medium",textAlign:"left",transition:"background-color 0.2s ease",width:"100%"}),g1=M("div",{color:"$text",fontSize:"0.875rem",fontStyle:"italic",padding:"$medium $medium",textAlign:"center"}),f1=M("div",{color:"$text",fontSize:"0.875rem",padding:"$medium $medium",textAlign:"center"});import{jsxDEV as f,Fragment as z6}from"react/jsx-dev-runtime";function m1({css:$,disabled:q=!1,filter:J=!1,initial:Z,label:G,loading:Q=!1,onSelection:U,options:X,trigger:K,triggerCss:Y,...H}){let{contentRef:W,handleClick:L,handleClose:B,isMounted:I,isOpen:z,triggerRef:N}=V0(),[_,j]=X$(Z),[V,F]=X$(Z?X.findIndex((D)=>D.value===Z):-1),[T,A]=X$(""),{renderPortal:v}=d(),P=J?X.filter((D)=>D.label.toLowerCase().includes(T.toLowerCase())):X,i=()=>{B(),A("")},p=(D)=>{j(D.value),U?.(D.value,D.label),i()};return x("keydown",(D)=>{if(!z)return;switch(D.key){case"Escape":D.preventDefault(),i();break;case"ArrowDown":D.preventDefault(),F((m)=>(m+1)%P.length);break;case"ArrowUp":D.preventDefault(),F((m)=>(m-1+P.length)%P.length);break;case"Enter":if(D.preventDefault(),V>=0&&P[V])p(P[V]);break}}),c(W,i),p1(()=>{if(z&&W.current)W.current.focus()},[z]),p1(()=>{if(z&&P.length>0)F(_?P.findIndex((D)=>D.value===_):0)},[z,P,_]),f(z6,{children:[f(w1,{ref:N,css:Y,onClick:q?void 0:L,...H,children:K},void 0,!1,void 0,this),I&&v(f(y1,{ref:W,css:{opacity:z?1:0,transition:"opacity 0.2s ease",...$},tabIndex:-1,onClick:(D)=>D.stopPropagation(),children:[G&&f(u1,{children:G},void 0,!1,void 0,this),J&&f(v1,{children:f(y0,{placeholder:"Type to search...",value:T,onChange:(D)=>A(D.target.value)},void 0,!1,void 0,this)},void 0,!1,void 0,this),Q?f(f1,{children:"Loading..."},void 0,!1,void 0,this):P.length>0?P.map((D,m)=>f(h1,{"data-focused":V===m?"true":void 0,"data-selected":D.value===_?"true":void 0,onClick:()=>p(D),onMouseEnter:()=>F(m),children:[D.iconPosition!=="right"&&D.icon,f("span",{children:D.label},void 0,!1,void 0,this),D.iconPosition==="right"&&D.icon]},D.value,!0,void 0,this)):f(g1,{children:"No matching options"},void 0,!1,void 0,this)]},void 0,!0,void 0,this))]},void 0,!0,void 0,this)}import{useEffect as F6}from"react";var d1=M("div",{cursor:"pointer",display:"inline-block",position:"relative",width:"fit-content"}),c1=M("div",{backgroundColor:"$fill",border:"1px solid $border",borderRadius:"$small",maxHeight:"70vh",minWidth:"200px",opacity:1,outline:"none",overflowY:"auto",position:"fixed",transition:"opacity 0.2s ease",visibility:"hidden",zIndex:"$popover"},{variant:{default:{backgroundColor:"$fill",border:"1px solid $border",padding:"$small"},minimal:{backgroundColor:"$fill",border:"1px solid $border",padding:"0"}}});import{jsxDEV as K$,Fragment as I6}from"react/jsx-dev-runtime";function r1({children:$,css:q,disabled:J=!1,trigger:Z,triggerCss:G,variant:Q="default",...U}){let{contentRef:X,handleClick:K,handleClose:Y,isMounted:H,isOpen:W,triggerRef:L}=V0();x("keydown",(N)=>{if(!W)return;if(N.key==="Escape")N.preventDefault(),Y()}),c(X,Y),F6(()=>{if(W&&X.current)X.current.focus()},[W]);let{renderPortal:I}=d(),z=typeof $==="function"?$(Y):$;return K$(I6,{children:[K$(d1,{ref:L,css:G,onClick:J?void 0:K,...U,children:Z},void 0,!1,void 0,this),H&&I(K$(c1,{ref:X,css:{opacity:W?1:0,transition:"opacity 0.2s ease",...q},tabIndex:-1,variant:Q,onClick:(N)=>N.stopPropagation(),children:z},void 0,!1,void 0,this))]},void 0,!0,void 0,this)}import{useState as n1,useRef as M6,useEffect as _6}from"react";var l1=M("div",{cursor:"pointer",display:"inline-block"},{disabled:{true:{cursor:"not-allowed",opacity:0.6}}}),o1=M("div",{backdropFilter:"blur(2px)",backgroundColor:"$overlay",bottom:0,left:0,position:"fixed",right:0,top:0,zIndex:1000}),i1=M("div",{"&:focus":{outline:"1px solid $brand",outlineOffset:"2px"},"@media (max-width: 768px)":{maxHeight:"90vh",width:"95%"},backgroundColor:"$fill",borderRadius:"$small",color:"$text",display:"flex",flexDirection:"column",left:"50%",maxHeight:"80vh",maxWidth:"600px",opacity:0,outline:"none",overflow:"hidden",position:"fixed",top:"50%",transform:"translate(-50%, -50%) translateY(20px) scale(0.95)",transition:"$default",width:"90%"},{isOpen:{true:{opacity:1,transform:"translate(-50%, -50%) translateY(0) scale(1)"}},small:{true:{maxWidth:"280px"}},variant:{bordered:{backgroundColor:"$fill",border:"1px solid $border"},default:{backgroundColor:"$fill",border:"none"}}}),a1=M("div",{alignItems:"center",borderBottom:"1px solid $border",display:"flex",flexShrink:0,justifyContent:"space-between",padding:"$large",paddingBottom:"$medium"}),r7=M("h2",{color:"$text",fontSize:"1.25rem",fontWeight:"600",margin:0}),l7=M("button",{"&:focus":{outline:"1px solid $brand",outlineOffset:"2px"},"&:hover":{backgroundColor:"$hover"},background:"none",border:"none",borderRadius:"$small",color:"$text",cursor:"pointer",fontSize:"1.5rem",padding:"$smaller"}),s1=M("div",{flex:1,overflow:"auto",padding:"$large",paddingTop:"$medium"}),o7=M("div",{borderTop:"1px solid $border",display:"flex",gap:"$small",justifyContent:"flex-end",marginTop:"$medium",paddingTop:"$small"});import{jsxDEV as n,Fragment as N6}from"react/jsx-dev-runtime";function t1({children:$,css:q,disabled:J=!1,small:Z=!1,title:G,trigger:Q,triggerCss:U,...X}){let[K,Y]=n1(!1),[H,W]=n1(!1),L=M6(null),{renderPortal:B}=d(),I=K||H,z=()=>{Y(!1),setTimeout(()=>{W(!1)},200)},N=()=>{if(J)return;Y(!0),W(!0)},_=()=>{if(J)return;if(I)z();else N()};return x("keydown",(V)=>{if(V.key==="Escape"&&I)V.preventDefault(),z()}),c(L,()=>{if(I)z()}),_6(()=>{if(H)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[H]),n(N6,{children:[n(l1,{css:U,disabled:J,onClick:_,...X,children:Q},void 0,!1,void 0,this),H&&B(n(o1,{children:n(i1,{ref:L,css:q,isOpen:K,small:Z,tabIndex:-1,variant:"default",children:[n(a1,{children:[n(S0,{as:"h3",css:{flex:1,margin:0},children:G},void 0,!1,void 0,this),n(x0,{css:{flexShrink:0,fontSize:"18px",height:"32px",padding:"0",width:"32px"},size:"small",variant:"minimal",onClick:z,children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),n(s1,{children:typeof $==="function"?$(z):$},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this))]},void 0,!0,void 0,this)}export{o0 as zIndices,n0 as useTheme,I$ as useStoopConfig,d as usePortal,c as useOutsideClick,V0 as useFloating,x as useEventListener,b2 as useBreakpoints,c0 as typography,r0 as transitions,H$ as themes,j6 as theme,M as styled,b as spacing,l0 as opacities,L0 as media,s as lightTheme,a0 as injectGlobalStyles,d0 as fonts,U2 as darkTheme,P0 as css,L$ as createGlobalStyles,m0 as colors,S as breakpoints,i0 as borderRadius,N1 as Textarea,S0 as Text,b1 as Tabs,j0 as StoopProvider,B0 as StoopContext,Z1 as Stack,m1 as Select,X1 as Section,r1 as Popover,t1 as Modal,x1 as Menu,y0 as Input,I1 as Card,x0 as Button,H1 as Badge};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ElementRef, JSX, forwardRef } from "react";
|
|
2
|
+
import type { CSSObject, VariantConfig, StyledBaseProps } from "./types";
|
|
3
|
+
type HTMLElements = keyof JSX.IntrinsicElements;
|
|
4
|
+
/**
|
|
5
|
+
* Compile CSS object to class name with caching and injection
|
|
6
|
+
* Usage: const className = css({ color: 'red', fontSize: '14px' })
|
|
7
|
+
*/
|
|
8
|
+
export declare function css(styles: CSSObject): string;
|
|
9
|
+
type VariantKeys<T extends VariantConfig> = keyof T;
|
|
10
|
+
type VariantPropsFromConfig<T extends VariantConfig> = {
|
|
11
|
+
[K in VariantKeys<T>]?: keyof T[K] | boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Creates a styled component with polymorphic "as" prop support and variants
|
|
15
|
+
*
|
|
16
|
+
* Usage:
|
|
17
|
+
* const MyButton = styled('button', { padding: '12px' }, {
|
|
18
|
+
* variant: { primary: { color: 'blue' }, secondary: { color: 'gray' } }
|
|
19
|
+
* })
|
|
20
|
+
* <MyButton variant="primary" as="a" href="/link">Renders as anchor</MyButton>
|
|
21
|
+
*/
|
|
22
|
+
export declare function styled<DefaultElement extends HTMLElements, Variants extends VariantConfig = {}>(defaultElement: DefaultElement, baseStyles?: CSSObject, variants?: Variants): ReturnType<typeof forwardRef<ElementRef<DefaultElement>, ComponentPropsWithoutRef<DefaultElement> & StyledBaseProps & (Variants extends {} ? VariantPropsFromConfig<Variants> : {})>>;
|
|
23
|
+
export type StyledComponent<T extends HTMLElements> = ReturnType<typeof styled<T>>;
|
|
24
|
+
export type PolymorphicComponentProps<T extends HTMLElements> = ComponentPropsWithoutRef<T> & StyledBaseProps;
|
|
25
|
+
export {};
|