@stenajs-webui/core
Advanced tools
Comparing version
@@ -33,2 +33,3 @@ import "@stenajs-webui/theme"; | ||
export * from "./hooks/UseEventListener"; | ||
export * from "./hooks/UseEventCallback"; | ||
export * from "./hooks/UseLatest"; | ||
@@ -35,0 +36,0 @@ export * from "./hooks/UseMouseIsOver"; |
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._separatorLine_nzfcz_1{display:flex;border:0;margin:0;flex:none}._visuallyHidden_1gevf_1{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}._text_1iisw_1{--swui-text-color: var(--swui-text-primary-color);--swui-text-color-caption: var(--lhds-color-ui-600);--swui-text-color-overline: var(--lhds-color-ui-600);--swui-text-font-family: var(--swui-font-primary);--swui-text-font-weight: var(--swui-font-weight-text);--current-color: var(--swui-text-color);--current-font-size: var(--swui-font-size-medium);--current-line-height: var(--swui-line-height-medium);--current-font-weight: var(--swui-text-font-weight);--current-letter-spacing: var(--swui-text-letter-spacing);font-size:var(--current-font-size);line-height:var(--current-line-height);color:var(--current-color);letter-spacing:var(--current-letter-spacing);font-family:var(--swui-text-font-family);font-weight:var(--current-font-weight)}._text_1iisw_1._bold_1iisw_27{--current-font-weight: var(--swui-font-weight-text-bold)}._text_1iisw_1._caption_1iisw_31{--current-font-size: var(--swui-font-size-small);--current-line-height: var(--swui-line-height-small);--current-color: var(--swui-text-color-caption);--current-letter-spacing: 0;font-style:italic}._text_1iisw_1._overline_1iisw_39{--current-font-size: var(--swui-font-size-smaller);--current-line-height: var(--swui-line-height-smaller);--current-color: var(--swui-text-color-overline);--current-font-weight: var(--swui-font-weight-text-bold);--current-letter-spacing: .1rem;text-transform:uppercase}._text_1iisw_1._large_1iisw_48{--current-font-size: var(--swui-font-size-large);--current-line-height: var(--swui-line-height-large)}._text_1iisw_1._medium_1iisw_53{--current-font-size: var(--swui-font-size-medium);--current-line-height: var(--swui-line-height-medium)}._text_1iisw_1._small_1iisw_58{--current-font-size: var(--swui-font-size-small);--current-line-height: var(--swui-line-height-small)}._text_1iisw_1._smaller_1iisw_63{--current-font-size: var(--swui-font-size-smaller);--current-line-height: var(--swui-line-height-smaller)}._heading_1cnsg_1{font-size:2rem;color:var(--swui-text-primary-color);letter-spacing:0;margin:0;line-height:var(--swui-line-height);font-family:var(--swui-font-primary);font-weight:var(--swui-font-weight-text-bold)}._heading_1cnsg_1._h1_1cnsg_10{font-size:2.8rem}._heading_1cnsg_1._h2_1cnsg_14{font-size:2.4rem}._heading_1cnsg_1._h3_1cnsg_18{font-size:2rem}._heading_1cnsg_1._h4_1cnsg_22{font-size:1.8rem}._heading_1cnsg_1._h5_1cnsg_26{font-size:1.6rem}._heading_1cnsg_1._h6_1cnsg_30{font-size:1.4rem}")),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})(); | ||
import { cssColor as P } from "@stenajs-webui/theme"; | ||
import { cssColor as D } from "@stenajs-webui/theme"; | ||
import { jsx as a, Fragment as S } from "react/jsx-runtime"; | ||
import D, { forwardRef as h, useState as g, useCallback as m, useLayoutEffect as H, useRef as y, useEffect as d, useMemo as R } from "react"; | ||
import H, { forwardRef as h, useState as y, useCallback as m, useLayoutEffect as R, useRef as f, useEffect as d, useMemo as L } from "react"; | ||
import _ from "@emotion/styled"; | ||
import { system as z, background as F, border as N, borderRight as U, borderLeft as V, borderTop as q, borderBottom as j, borderColor as B, borderRadius as W, borderStyle as X, borderWidth as G, boxShadow as Y, flexbox as K, overflow as Z, position as J, layout as Q, zIndex as ee, left as te, right as re, top as ue, bottom as ne } from "styled-system"; | ||
import { memoize as oe, pickBy as se, debounce as ie } from "lodash-es"; | ||
import L from "classnames"; | ||
import M from "classnames"; | ||
const ae = "_separatorLine_nzfcz_1", ce = { | ||
@@ -13,3 +13,3 @@ separatorLine: ae | ||
({ | ||
color: e = P("--lhds-color-ui-300"), | ||
color: e = D("--lhds-color-ui-300"), | ||
size: t = "100%", | ||
@@ -68,6 +68,6 @@ width: r = "1px", | ||
hoverBackground: p, | ||
focusBackground: f, | ||
type: M = "button", | ||
...O | ||
}, A) => /* @__PURE__ */ a( | ||
focusBackground: g, | ||
type: O = "button", | ||
...A | ||
}, P) => /* @__PURE__ */ a( | ||
le, | ||
@@ -83,8 +83,8 @@ { | ||
pointer: !!(t || r) && !o, | ||
ref: A, | ||
ref: P, | ||
background: l, | ||
hoverBackground: p, | ||
focusBackground: f, | ||
type: M, | ||
...O, | ||
focusBackground: g, | ||
type: O, | ||
...A, | ||
children: i | ||
@@ -699,3 +699,3 @@ } | ||
}, xe = (e, t) => e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height && e.bottom === t.bottom && e.top === t.top && e.left === t.left && e.right === t.right, ke = (e, t) => { | ||
const [r, u] = g(), n = m(() => { | ||
const [r, u] = y(), n = m(() => { | ||
window.requestAnimationFrame(() => { | ||
@@ -708,3 +708,3 @@ if (e.current) { | ||
}, [e, r, u, t]); | ||
return H(() => { | ||
return R(() => { | ||
n(); | ||
@@ -716,3 +716,3 @@ }, [n]), { | ||
function({ onResize: t, ...r }, u) { | ||
const n = y(null); | ||
const n = f(null); | ||
return ke(u ?? n, t), /* @__PURE__ */ a(b, { ...r, ref: u }); | ||
@@ -780,7 +780,7 @@ } | ||
...p | ||
}, f) => /* @__PURE__ */ a( | ||
}, g) => /* @__PURE__ */ a( | ||
"span", | ||
{ | ||
className: L(k.text, k[t], k[r], u), | ||
ref: f, | ||
className: M(k.text, k[t], k[r], u), | ||
ref: g, | ||
style: { | ||
@@ -820,3 +820,3 @@ color: n, | ||
{ | ||
className: L(T.heading, T[e], t), | ||
className: M(T.heading, T[e], t), | ||
style: { color: r, whiteSpace: u, wordBreak: n, ...o }, | ||
@@ -837,3 +837,3 @@ ref: l, | ||
t( | ||
i.reduce((l, p) => l.some((f) => r(f, p)) ? l : [...l, p], e) | ||
i.reduce((l, p) => l.some((g) => r(g, p)) ? l : [...l, p], e) | ||
); | ||
@@ -845,3 +845,3 @@ }, | ||
const l = e.findIndex((p) => r(p, i)); | ||
l >= 0 && t(e.filter((p, f) => f !== l)); | ||
l >= 0 && t(e.filter((p, g) => g !== l)); | ||
}, | ||
@@ -868,3 +868,3 @@ [e, t, r] | ||
}, $ = (e) => { | ||
const [t, r] = g(e), u = m(() => { | ||
const [t, r] = y(e), u = m(() => { | ||
r(!0); | ||
@@ -878,3 +878,3 @@ }, [r]), n = m(() => { | ||
}, bt = (e, t) => { | ||
const [r, u] = g(e); | ||
const [r, u] = y(e); | ||
return d(() => { | ||
@@ -889,3 +889,3 @@ const n = setTimeout(() => { | ||
}, wt = (e, t) => { | ||
const [r, u] = g(e); | ||
const [r, u] = y(e); | ||
return d(() => { | ||
@@ -903,6 +903,6 @@ e && u(!0); | ||
const C = (e) => `webui-${e ? e + "-" : ""}${++Xe}`, xt = (e) => { | ||
const [t, r] = g(() => C(e)); | ||
const [t, r] = y(() => C(e)); | ||
return d(() => r(C(e)), [e]), t; | ||
}, v = (e, t, r) => { | ||
const u = y(null); | ||
const u = f(null); | ||
d(() => { | ||
@@ -935,12 +935,20 @@ u.current = r; | ||
}, _t = (e) => { | ||
const t = D.useRef(e); | ||
const t = f(e); | ||
return R(() => { | ||
t.current = e; | ||
}), m((...r) => { | ||
const { current: u } = t; | ||
return u(...r); | ||
}, []); | ||
}, $t = (e) => { | ||
const t = H.useRef(e); | ||
return t.current = e, t; | ||
}, $t = (e) => { | ||
}, St = (e) => { | ||
const [t, r, u] = $(!1); | ||
return v(e, "mouseover", r), v(e, "mouseout", u), t; | ||
}, St = (e) => { | ||
}, Et = (e) => { | ||
const [t, r, u] = $(!1); | ||
return v(e, "mouseenter", r), v(e, "mouseleave", u), t; | ||
}, Et = (e, t) => { | ||
const r = y(() => { | ||
}, Tt = (e, t) => { | ||
const r = f(() => { | ||
}); | ||
@@ -957,4 +965,4 @@ d(() => { | ||
}, [...e]); | ||
}, Tt = (e, t, r) => { | ||
const u = y(() => { | ||
}, Ct = (e, t, r) => { | ||
const u = f(() => { | ||
}); | ||
@@ -971,4 +979,4 @@ d(() => { | ||
}, [e, r]); | ||
}, I = ["mousemove", "mousedown", "keydown", "touchstart", "scroll"], Ct = (e, t) => { | ||
const r = y(() => { | ||
}, I = ["mousemove", "mousedown", "keydown", "touchstart", "scroll"], It = (e, t) => { | ||
const r = f(() => { | ||
}); | ||
@@ -985,4 +993,4 @@ d(() => { | ||
}, [t]); | ||
}, It = (e, t) => { | ||
const [r, u] = g(!1), { rootMargin: n, root: o, threshold: s } = t || {}, c = R(() => new IntersectionObserver( | ||
}, Rt = (e, t) => { | ||
const [r, u] = y(!1), { rootMargin: n, root: o, threshold: s } = t || {}, c = L(() => new IntersectionObserver( | ||
([i]) => u(i.isIntersecting), | ||
@@ -998,9 +1006,9 @@ { | ||
}), [c, e]), r; | ||
}, Rt = (e) => { | ||
const t = y(null); | ||
}, Lt = (e) => { | ||
const t = f(null); | ||
return d(() => { | ||
e && (typeof e == "function" ? e(t.current) : e.current = t.current); | ||
}), t; | ||
}, Lt = (e, t, r = !0) => { | ||
const [u, n] = g(e), o = y(null), s = m( | ||
}, Mt = (e, t, r = !0) => { | ||
const [u, n] = y(e), o = f(null), s = m( | ||
(c, i = t) => { | ||
@@ -1014,5 +1022,5 @@ n(c), r && clearTimeout(o.current), o.current = setTimeout(() => n(e), i); | ||
}, []), [u, s]; | ||
}, Mt = () => R(() => /* @__PURE__ */ new Date(), []), Ot = (e) => { | ||
}, Ot = () => L(() => /* @__PURE__ */ new Date(), []), At = (e) => { | ||
throw new Error(`Switch unhandled case: ${e}`); | ||
}, At = (e, t) => t, Pt = (e) => Object.keys(e).filter((t) => e[t]), Dt = (e) => { | ||
}, Pt = (e, t) => t, Dt = (e) => Object.keys(e).filter((t) => e[t]), Ht = (e) => { | ||
try { | ||
@@ -1023,3 +1031,3 @@ const t = parseFloat(e); | ||
} | ||
}, Ht = (e) => { | ||
}, zt = (e) => { | ||
try { | ||
@@ -1031,3 +1039,3 @@ const t = parseInt(e, 10); | ||
}; | ||
function zt(e, t) { | ||
function Ft(e, t) { | ||
if (e == null) | ||
@@ -1057,10 +1065,10 @@ throw new Error("Invariant error: " + t); | ||
x as booleanOrNumberToNumber, | ||
At as exhaustSwitchCase, | ||
Ot as exhaustSwitchCaseElseThrow, | ||
Pt as exhaustSwitchCase, | ||
At as exhaustSwitchCaseElseThrow, | ||
Ee as getDataProps, | ||
we as getDimensionObject, | ||
zt as invariant, | ||
Dt as parseFloatElseUndefined, | ||
Ht as parseIntElseUndefined, | ||
Pt as truthyKeysAsList, | ||
Ft as invariant, | ||
Ht as parseFloatElseUndefined, | ||
zt as parseIntElseUndefined, | ||
Dt as truthyKeysAsList, | ||
vt as useArraySet, | ||
@@ -1073,14 +1081,15 @@ $ as useBoolean, | ||
kt as useElementFocus, | ||
_t as useEventCallback, | ||
v as useEventListener, | ||
Rt as useForwardedRef, | ||
_t as useLatest, | ||
St as useMouseIsEntered, | ||
$t as useMouseIsOver, | ||
Et as useMultiOnClickOutside, | ||
Tt as useOnClickOutside, | ||
Ct as useOnNoMouseMovement, | ||
It as useOnScreen, | ||
Lt as useTimeoutState, | ||
Mt as useToday | ||
Lt as useForwardedRef, | ||
$t as useLatest, | ||
Et as useMouseIsEntered, | ||
St as useMouseIsOver, | ||
Tt as useMultiOnClickOutside, | ||
Ct as useOnClickOutside, | ||
It as useOnNoMouseMovement, | ||
Rt as useOnScreen, | ||
Mt as useTimeoutState, | ||
Ot as useToday | ||
}; | ||
//# sourceMappingURL=index.es.js.map |
@@ -25,3 +25,3 @@ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._separatorLine_nzfcz_1{display:flex;border:0;margin:0;flex:none}._visuallyHidden_1gevf_1{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}._text_1iisw_1{--swui-text-color: var(--swui-text-primary-color);--swui-text-color-caption: var(--lhds-color-ui-600);--swui-text-color-overline: var(--lhds-color-ui-600);--swui-text-font-family: var(--swui-font-primary);--swui-text-font-weight: var(--swui-font-weight-text);--current-color: var(--swui-text-color);--current-font-size: var(--swui-font-size-medium);--current-line-height: var(--swui-line-height-medium);--current-font-weight: var(--swui-text-font-weight);--current-letter-spacing: var(--swui-text-letter-spacing);font-size:var(--current-font-size);line-height:var(--current-line-height);color:var(--current-color);letter-spacing:var(--current-letter-spacing);font-family:var(--swui-text-font-family);font-weight:var(--current-font-weight)}._text_1iisw_1._bold_1iisw_27{--current-font-weight: var(--swui-font-weight-text-bold)}._text_1iisw_1._caption_1iisw_31{--current-font-size: var(--swui-font-size-small);--current-line-height: var(--swui-line-height-small);--current-color: var(--swui-text-color-caption);--current-letter-spacing: 0;font-style:italic}._text_1iisw_1._overline_1iisw_39{--current-font-size: var(--swui-font-size-smaller);--current-line-height: var(--swui-line-height-smaller);--current-color: var(--swui-text-color-overline);--current-font-weight: var(--swui-font-weight-text-bold);--current-letter-spacing: .1rem;text-transform:uppercase}._text_1iisw_1._large_1iisw_48{--current-font-size: var(--swui-font-size-large);--current-line-height: var(--swui-line-height-large)}._text_1iisw_1._medium_1iisw_53{--current-font-size: var(--swui-font-size-medium);--current-line-height: var(--swui-line-height-medium)}._text_1iisw_1._small_1iisw_58{--current-font-size: var(--swui-font-size-small);--current-line-height: var(--swui-line-height-small)}._text_1iisw_1._smaller_1iisw_63{--current-font-size: var(--swui-font-size-smaller);--current-line-height: var(--swui-line-height-smaller)}._heading_1cnsg_1{font-size:2rem;color:var(--swui-text-primary-color);letter-spacing:0;margin:0;line-height:var(--swui-line-height);font-family:var(--swui-font-primary);font-weight:var(--swui-font-weight-text-bold)}._heading_1cnsg_1._h1_1cnsg_10{font-size:2.8rem}._heading_1cnsg_1._h2_1cnsg_14{font-size:2.4rem}._heading_1cnsg_1._h3_1cnsg_18{font-size:2rem}._heading_1cnsg_1._h4_1cnsg_22{font-size:1.8rem}._heading_1cnsg_1._h5_1cnsg_26{font-size:1.6rem}._heading_1cnsg_1._h6_1cnsg_30{font-size:1.4rem}")),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})(); | ||
${({borderRadius:e})=>e?`border-radius: ${e};`:""} | ||
`,N=n.forwardRef(({disableFocusHighlight:e,onClick:t,onDblClick:r,tooltip:u,disableOpacityOnClick:s,disablePointer:o,opacityOnHover:i,disabled:d,children:a,background:f="transparent",hoverBackground:p,focusBackground:m,type:L="button",...M},A)=>{const D=!!(t||r);return l.jsx(F,{opacityOnHover:i,title:u,disabled:d,disableOpacityOnClick:s,onClick:t,onDoubleClick:r,disableFocusHighlight:e,pointer:D&&!o,ref:A,background:f,hoverBackground:p,focusBackground:m,type:L,...M,children:a})}),y=e=>e==null?0:typeof e=="boolean"?e?1:0:e,q=e=>{if(e!==0)return`calc(${e} * var(--swui-metrics-space))`},S=e=>q(y(e)),U={children:!0,dangerouslySetInnerHTML:!0,key:!0,ref:!0,autoFocus:!0,defaultValue:!0,defaultChecked:!0,innerHTML:!0,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,valueLink:!0,abbr:!0,accept:!0,acceptCharset:!0,accessKey:!0,action:!0,allow:!0,allowUserMedia:!0,allowPaymentRequest:!0,allowFullScreen:!0,allowTransparency:!0,alt:!0,async:!0,autoComplete:!0,autoPlay:!0,capture:!0,cellPadding:!0,cellSpacing:!0,challenge:!0,charSet:!0,checked:!0,cite:!0,classID:!0,className:!0,cols:!0,colSpan:!0,content:!0,contentEditable:!0,contextMenu:!0,controls:!0,controlsList:!0,coords:!0,crossOrigin:!0,data:!0,dateTime:!0,decoding:!0,default:!0,defer:!0,dir:!0,disabled:!0,disablePictureInPicture:!0,disableRemotePlayback:!0,download:!0,draggable:!0,encType:!0,enterKeyHint:!0,form:!0,formAction:!0,formEncType:!0,formMethod:!0,formNoValidate:!0,formTarget:!0,frameBorder:!0,headers:!0,height:!0,hidden:!0,high:!0,href:!0,hrefLang:!0,htmlFor:!0,httpEquiv:!0,id:!0,inputMode:!0,integrity:!0,is:!0,keyParams:!0,keyType:!0,kind:!0,label:!0,lang:!0,list:!0,loading:!0,loop:!0,low:!0,marginHeight:!0,marginWidth:!0,max:!0,maxLength:!0,media:!0,mediaGroup:!0,method:!0,min:!0,minLength:!0,multiple:!0,muted:!0,name:!0,nonce:!0,noValidate:!0,open:!0,optimum:!0,pattern:!0,placeholder:!0,playsInline:!0,poster:!0,preload:!0,profile:!0,radioGroup:!0,readOnly:!0,referrerPolicy:!0,rel:!0,required:!0,reversed:!0,role:!0,rows:!0,rowSpan:!0,sandbox:!0,scope:!0,scoped:!0,scrolling:!0,seamless:!0,selected:!0,shape:!0,size:!0,sizes:!0,slot:!0,span:!0,spellCheck:!0,src:!0,srcDoc:!0,srcLang:!0,srcSet:!0,start:!0,step:!0,style:!0,summary:!0,tabIndex:!0,target:!0,title:!0,translate:!0,type:!0,useMap:!0,value:!0,width:!0,wmode:!0,wrap:!0,about:!0,datatype:!0,inlist:!0,prefix:!0,property:!0,resource:!0,typeof:!0,vocab:!0,autoCapitalize:!0,autoCorrect:!0,autoSave:!0,color:!0,incremental:!0,fallback:!0,inert:!0,itemProp:!0,itemScope:!0,itemType:!0,itemID:!0,itemRef:!0,on:!0,option:!0,results:!0,security:!0,unselectable:!0,accentHeight:!0,accumulate:!0,additive:!0,alignmentBaseline:!0,allowReorder:!0,alphabetic:!0,amplitude:!0,arabicForm:!0,ascent:!0,attributeName:!0,attributeType:!0,autoReverse:!0,azimuth:!0,baseFrequency:!0,baselineShift:!0,baseProfile:!0,bbox:!0,begin:!0,bias:!0,by:!0,calcMode:!0,capHeight:!0,clip:!0,clipPathUnits:!0,clipPath:!0,clipRule:!0,colorInterpolation:!0,colorInterpolationFilters:!0,colorProfile:!0,colorRendering:!0,contentScriptType:!0,contentStyleType:!0,cursor:!0,cx:!0,cy:!0,d:!0,decelerate:!0,descent:!0,diffuseConstant:!0,direction:!0,display:!0,divisor:!0,dominantBaseline:!0,dur:!0,dx:!0,dy:!0,edgeMode:!0,elevation:!0,enableBackground:!0,end:!0,exponent:!0,externalResourcesRequired:!0,fill:!0,fillOpacity:!0,fillRule:!0,filter:!0,filterRes:!0,filterUnits:!0,floodColor:!0,floodOpacity:!0,focusable:!0,fontFamily:!0,fontSize:!0,fontSizeAdjust:!0,fontStretch:!0,fontStyle:!0,fontVariant:!0,fontWeight:!0,format:!0,from:!0,fr:!0,fx:!0,fy:!0,g1:!0,g2:!0,glyphName:!0,glyphOrientationHorizontal:!0,glyphOrientationVertical:!0,glyphRef:!0,gradientTransform:!0,gradientUnits:!0,hanging:!0,horizAdvX:!0,horizOriginX:!0,ideographic:!0,imageRendering:!0,in:!0,in2:!0,intercept:!0,k:!0,k1:!0,k2:!0,k3:!0,k4:!0,kernelMatrix:!0,kernelUnitLength:!0,kerning:!0,keyPoints:!0,keySplines:!0,keyTimes:!0,lengthAdjust:!0,letterSpacing:!0,lightingColor:!0,limitingConeAngle:!0,local:!0,markerEnd:!0,markerMid:!0,markerStart:!0,markerHeight:!0,markerUnits:!0,markerWidth:!0,mask:!0,maskContentUnits:!0,maskUnits:!0,mathematical:!0,mode:!0,numOctaves:!0,offset:!0,opacity:!0,operator:!0,order:!0,orient:!0,orientation:!0,origin:!0,overflow:!0,overlinePosition:!0,overlineThickness:!0,panose1:!0,paintOrder:!0,pathLength:!0,patternContentUnits:!0,patternTransform:!0,patternUnits:!0,pointerEvents:!0,points:!0,pointsAtX:!0,pointsAtY:!0,pointsAtZ:!0,preserveAlpha:!0,preserveAspectRatio:!0,primitiveUnits:!0,r:!0,radius:!0,refX:!0,refY:!0,renderingIntent:!0,repeatCount:!0,repeatDur:!0,requiredExtensions:!0,requiredFeatures:!0,restart:!0,result:!0,rotate:!0,rx:!0,ry:!0,scale:!0,seed:!0,shapeRendering:!0,slope:!0,spacing:!0,specularConstant:!0,specularExponent:!0,speed:!0,spreadMethod:!0,startOffset:!0,stdDeviation:!0,stemh:!0,stemv:!0,stitchTiles:!0,stopColor:!0,stopOpacity:!0,strikethroughPosition:!0,strikethroughThickness:!0,string:!0,stroke:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeLinecap:!0,strokeLinejoin:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0,surfaceScale:!0,systemLanguage:!0,tableValues:!0,targetX:!0,targetY:!0,textAnchor:!0,textDecoration:!0,textRendering:!0,textLength:!0,to:!0,transform:!0,u1:!0,u2:!0,underlinePosition:!0,underlineThickness:!0,unicode:!0,unicodeBidi:!0,unicodeRange:!0,unitsPerEm:!0,vAlphabetic:!0,vHanging:!0,vIdeographic:!0,vMathematical:!0,values:!0,vectorEffect:!0,version:!0,vertAdvY:!0,vertOriginX:!0,vertOriginY:!0,viewBox:!0,viewTarget:!0,visibility:!0,widths:!0,wordSpacing:!0,writingMode:!0,x:!0,xHeight:!0,x1:!0,x2:!0,xChannelSelector:!0,xlinkActuate:!0,xlinkArcrole:!0,xlinkHref:!0,xlinkRole:!0,xlinkShow:!0,xlinkTitle:!0,xlinkType:!0,xmlBase:!0,xmlns:!0,xmlnsXlink:!0,xmlLang:!0,xmlSpace:!0,y:!0,y1:!0,y2:!0,yChannelSelector:!0,z:!0,zoomAndPan:!0,for:!0,class:!0,autofocus:!0},V=`^((${Object.keys(U).join("|")})|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$`,B=new RegExp(V),W=k.memoize(e=>B.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91),X={box:"var(--swui-shadow-box)",popover:"var(--swui-shadow-popover)",modal:"var(--swui-shadow-modal)",bottom:"var(--swui-shadow-bottom)"},G=["spacing","indent","gap","width","height","overflow","display"],Y=e=>G.includes(e),K=c.system({row:{property:"flexDirection",transform:e=>e?"row":"column"},indent:{property:"--current-indent",transform:y},spacing:{property:"--current-spacing",transform:y},gap:{property:"--current-gap",transform:y},columnGap:{property:"columnGap",transform:S},rowGap:{property:"rowGap",transform:S},shadow:{property:"boxShadow",transform:e=>X[e]??e}}),g=w("div",{shouldForwardProp:e=>typeof e=="string"?Y(e)?!1:W(e):!1})` | ||
`,N=n.forwardRef(({disableFocusHighlight:e,onClick:t,onDblClick:r,tooltip:u,disableOpacityOnClick:s,disablePointer:o,opacityOnHover:a,disabled:d,children:i,background:f="transparent",hoverBackground:p,focusBackground:m,type:L="button",...M},A)=>{const D=!!(t||r);return l.jsx(F,{opacityOnHover:a,title:u,disabled:d,disableOpacityOnClick:s,onClick:t,onDoubleClick:r,disableFocusHighlight:e,pointer:D&&!o,ref:A,background:f,hoverBackground:p,focusBackground:m,type:L,...M,children:i})}),y=e=>e==null?0:typeof e=="boolean"?e?1:0:e,q=e=>{if(e!==0)return`calc(${e} * var(--swui-metrics-space))`},E=e=>q(y(e)),U={children:!0,dangerouslySetInnerHTML:!0,key:!0,ref:!0,autoFocus:!0,defaultValue:!0,defaultChecked:!0,innerHTML:!0,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,valueLink:!0,abbr:!0,accept:!0,acceptCharset:!0,accessKey:!0,action:!0,allow:!0,allowUserMedia:!0,allowPaymentRequest:!0,allowFullScreen:!0,allowTransparency:!0,alt:!0,async:!0,autoComplete:!0,autoPlay:!0,capture:!0,cellPadding:!0,cellSpacing:!0,challenge:!0,charSet:!0,checked:!0,cite:!0,classID:!0,className:!0,cols:!0,colSpan:!0,content:!0,contentEditable:!0,contextMenu:!0,controls:!0,controlsList:!0,coords:!0,crossOrigin:!0,data:!0,dateTime:!0,decoding:!0,default:!0,defer:!0,dir:!0,disabled:!0,disablePictureInPicture:!0,disableRemotePlayback:!0,download:!0,draggable:!0,encType:!0,enterKeyHint:!0,form:!0,formAction:!0,formEncType:!0,formMethod:!0,formNoValidate:!0,formTarget:!0,frameBorder:!0,headers:!0,height:!0,hidden:!0,high:!0,href:!0,hrefLang:!0,htmlFor:!0,httpEquiv:!0,id:!0,inputMode:!0,integrity:!0,is:!0,keyParams:!0,keyType:!0,kind:!0,label:!0,lang:!0,list:!0,loading:!0,loop:!0,low:!0,marginHeight:!0,marginWidth:!0,max:!0,maxLength:!0,media:!0,mediaGroup:!0,method:!0,min:!0,minLength:!0,multiple:!0,muted:!0,name:!0,nonce:!0,noValidate:!0,open:!0,optimum:!0,pattern:!0,placeholder:!0,playsInline:!0,poster:!0,preload:!0,profile:!0,radioGroup:!0,readOnly:!0,referrerPolicy:!0,rel:!0,required:!0,reversed:!0,role:!0,rows:!0,rowSpan:!0,sandbox:!0,scope:!0,scoped:!0,scrolling:!0,seamless:!0,selected:!0,shape:!0,size:!0,sizes:!0,slot:!0,span:!0,spellCheck:!0,src:!0,srcDoc:!0,srcLang:!0,srcSet:!0,start:!0,step:!0,style:!0,summary:!0,tabIndex:!0,target:!0,title:!0,translate:!0,type:!0,useMap:!0,value:!0,width:!0,wmode:!0,wrap:!0,about:!0,datatype:!0,inlist:!0,prefix:!0,property:!0,resource:!0,typeof:!0,vocab:!0,autoCapitalize:!0,autoCorrect:!0,autoSave:!0,color:!0,incremental:!0,fallback:!0,inert:!0,itemProp:!0,itemScope:!0,itemType:!0,itemID:!0,itemRef:!0,on:!0,option:!0,results:!0,security:!0,unselectable:!0,accentHeight:!0,accumulate:!0,additive:!0,alignmentBaseline:!0,allowReorder:!0,alphabetic:!0,amplitude:!0,arabicForm:!0,ascent:!0,attributeName:!0,attributeType:!0,autoReverse:!0,azimuth:!0,baseFrequency:!0,baselineShift:!0,baseProfile:!0,bbox:!0,begin:!0,bias:!0,by:!0,calcMode:!0,capHeight:!0,clip:!0,clipPathUnits:!0,clipPath:!0,clipRule:!0,colorInterpolation:!0,colorInterpolationFilters:!0,colorProfile:!0,colorRendering:!0,contentScriptType:!0,contentStyleType:!0,cursor:!0,cx:!0,cy:!0,d:!0,decelerate:!0,descent:!0,diffuseConstant:!0,direction:!0,display:!0,divisor:!0,dominantBaseline:!0,dur:!0,dx:!0,dy:!0,edgeMode:!0,elevation:!0,enableBackground:!0,end:!0,exponent:!0,externalResourcesRequired:!0,fill:!0,fillOpacity:!0,fillRule:!0,filter:!0,filterRes:!0,filterUnits:!0,floodColor:!0,floodOpacity:!0,focusable:!0,fontFamily:!0,fontSize:!0,fontSizeAdjust:!0,fontStretch:!0,fontStyle:!0,fontVariant:!0,fontWeight:!0,format:!0,from:!0,fr:!0,fx:!0,fy:!0,g1:!0,g2:!0,glyphName:!0,glyphOrientationHorizontal:!0,glyphOrientationVertical:!0,glyphRef:!0,gradientTransform:!0,gradientUnits:!0,hanging:!0,horizAdvX:!0,horizOriginX:!0,ideographic:!0,imageRendering:!0,in:!0,in2:!0,intercept:!0,k:!0,k1:!0,k2:!0,k3:!0,k4:!0,kernelMatrix:!0,kernelUnitLength:!0,kerning:!0,keyPoints:!0,keySplines:!0,keyTimes:!0,lengthAdjust:!0,letterSpacing:!0,lightingColor:!0,limitingConeAngle:!0,local:!0,markerEnd:!0,markerMid:!0,markerStart:!0,markerHeight:!0,markerUnits:!0,markerWidth:!0,mask:!0,maskContentUnits:!0,maskUnits:!0,mathematical:!0,mode:!0,numOctaves:!0,offset:!0,opacity:!0,operator:!0,order:!0,orient:!0,orientation:!0,origin:!0,overflow:!0,overlinePosition:!0,overlineThickness:!0,panose1:!0,paintOrder:!0,pathLength:!0,patternContentUnits:!0,patternTransform:!0,patternUnits:!0,pointerEvents:!0,points:!0,pointsAtX:!0,pointsAtY:!0,pointsAtZ:!0,preserveAlpha:!0,preserveAspectRatio:!0,primitiveUnits:!0,r:!0,radius:!0,refX:!0,refY:!0,renderingIntent:!0,repeatCount:!0,repeatDur:!0,requiredExtensions:!0,requiredFeatures:!0,restart:!0,result:!0,rotate:!0,rx:!0,ry:!0,scale:!0,seed:!0,shapeRendering:!0,slope:!0,spacing:!0,specularConstant:!0,specularExponent:!0,speed:!0,spreadMethod:!0,startOffset:!0,stdDeviation:!0,stemh:!0,stemv:!0,stitchTiles:!0,stopColor:!0,stopOpacity:!0,strikethroughPosition:!0,strikethroughThickness:!0,string:!0,stroke:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeLinecap:!0,strokeLinejoin:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0,surfaceScale:!0,systemLanguage:!0,tableValues:!0,targetX:!0,targetY:!0,textAnchor:!0,textDecoration:!0,textRendering:!0,textLength:!0,to:!0,transform:!0,u1:!0,u2:!0,underlinePosition:!0,underlineThickness:!0,unicode:!0,unicodeBidi:!0,unicodeRange:!0,unitsPerEm:!0,vAlphabetic:!0,vHanging:!0,vIdeographic:!0,vMathematical:!0,values:!0,vectorEffect:!0,version:!0,vertAdvY:!0,vertOriginX:!0,vertOriginY:!0,viewBox:!0,viewTarget:!0,visibility:!0,widths:!0,wordSpacing:!0,writingMode:!0,x:!0,xHeight:!0,x1:!0,x2:!0,xChannelSelector:!0,xlinkActuate:!0,xlinkArcrole:!0,xlinkHref:!0,xlinkRole:!0,xlinkShow:!0,xlinkTitle:!0,xlinkType:!0,xmlBase:!0,xmlns:!0,xmlnsXlink:!0,xmlLang:!0,xmlSpace:!0,y:!0,y1:!0,y2:!0,yChannelSelector:!0,z:!0,zoomAndPan:!0,for:!0,class:!0,autofocus:!0},V=`^((${Object.keys(U).join("|")})|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$`,B=new RegExp(V),W=k.memoize(e=>B.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91),X={box:"var(--swui-shadow-box)",popover:"var(--swui-shadow-popover)",modal:"var(--swui-shadow-modal)",bottom:"var(--swui-shadow-bottom)"},G=["spacing","indent","gap","width","height","overflow","display"],Y=e=>G.includes(e),K=c.system({row:{property:"flexDirection",transform:e=>e?"row":"column"},indent:{property:"--current-indent",transform:y},spacing:{property:"--current-spacing",transform:y},gap:{property:"--current-gap",transform:y},columnGap:{property:"columnGap",transform:E},rowGap:{property:"rowGap",transform:E},shadow:{property:"boxShadow",transform:e=>X[e]??e}}),g=w("div",{shouldForwardProp:e=>typeof e=="string"?Y(e)?!1:W(e):!1})` | ||
--current-spacing: 0; | ||
@@ -74,3 +74,3 @@ --current-indent: 0; | ||
} | ||
`,Z=n.forwardRef(function(t,r){return l.jsx(g,{ref:r,...t})}),$=e=>{const{x:t,y:r,width:u,height:s,bottom:o,top:i,left:d,right:a}=e.getBoundingClientRect();return{width:u,height:s,top:i,left:d,x:t,y:r,right:a,bottom:o}},J=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height&&e.bottom===t.bottom&&e.top===t.top&&e.left===t.left&&e.right===t.right,R=(e,t)=>{const[r,u]=n.useState(),s=n.useCallback(()=>{window.requestAnimationFrame(()=>{if(e.current){const o=$(e.current);(!r||!J(r,o))&&t&&t(o),u(o)}})},[e,r,u,t]);return n.useLayoutEffect(()=>{s()},[s]),{dimensions:r}},Q=n.forwardRef(function({onResize:t,...r},u){const s=n.useRef(null);return R(u??s,t),l.jsx(g,{...r,ref:u})}),ee=n.forwardRef(function(t,r){return l.jsx(g,{row:!0,ref:r,...t})}),te=n.forwardRef(function({num:t=1,...r},u){return l.jsx(g,{indent:t,ref:u,...r})}),re=n.forwardRef(function({num:t=1,...r},u){return l.jsx(g,{spacing:t,ref:u,...r})}),ue=w.div` | ||
`,Z=n.forwardRef(function(t,r){return l.jsx(g,{ref:r,...t})}),$=e=>{const{x:t,y:r,width:u,height:s,bottom:o,top:a,left:d,right:i}=e.getBoundingClientRect();return{width:u,height:s,top:a,left:d,x:t,y:r,right:i,bottom:o}},J=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height&&e.bottom===t.bottom&&e.top===t.top&&e.left===t.left&&e.right===t.right,R=(e,t)=>{const[r,u]=n.useState(),s=n.useCallback(()=>{window.requestAnimationFrame(()=>{if(e.current){const o=$(e.current);(!r||!J(r,o))&&t&&t(o),u(o)}})},[e,r,u,t]);return n.useLayoutEffect(()=>{s()},[s]),{dimensions:r}},Q=n.forwardRef(function({onResize:t,...r},u){const s=n.useRef(null);return R(u??s,t),l.jsx(g,{...r,ref:u})}),ee=n.forwardRef(function(t,r){return l.jsx(g,{row:!0,ref:r,...t})}),te=n.forwardRef(function({num:t=1,...r},u){return l.jsx(g,{indent:t,ref:u,...r})}),re=n.forwardRef(function({num:t=1,...r},u){return l.jsx(g,{spacing:t,ref:u,...r})}),ue=w.div` | ||
--current-size: 1; | ||
@@ -80,3 +80,3 @@ flex: none; | ||
height: calc(var(--current-size) * var(--swui-metrics-space)); | ||
`,ne=({half:e=!1,horizontal:t=!1,num:r=1,vertical:u=!1})=>{const s=r*(e?.5:1);return l.jsx(ue,{style:{"--current-size":s,height:t?1:void 0,width:u?1:void 0}})},se=({children:e,nest:t,render:r})=>t?l.jsx(l.Fragment,{children:r(e)}):l.jsx(l.Fragment,{children:e}),oe="_visuallyHidden_1gevf_1",ie={visuallyHidden:oe},I=e=>k.pickBy(e,ae),ae=(e,t)=>ce(t),ce=e=>e.startsWith("data-")||e.startsWith("aria-"),le=({children:e,...t})=>l.jsx("span",{className:ie.visuallyHidden,...I(t),children:e}),de="_text_1iisw_1",fe="_standard_1iisw_24",pe="_bold_1iisw_27",me="_caption_1iisw_31",he="_overline_1iisw_39",ge="_large_1iisw_48",be="_medium_1iisw_53",ye="_small_1iisw_58",xe="_smaller_1iisw_63",v={text:de,standard:fe,bold:pe,caption:me,overline:he,large:ge,medium:be,small:ye,smaller:xe},b=n.forwardRef(({children:e,variant:t="standard",size:r="medium",className:u,color:s,userSelect:o,whiteSpace:i,wordBreak:d,textAlign:a,style:f,...p},m)=>l.jsx("span",{className:_(v.text,v[t],v[r],u),ref:m,style:{color:s,userSelect:o,whiteSpace:i,wordBreak:d,textAlign:a,...f},...p,children:e})),ve=b,we=e=>l.jsx(b,{size:"small",...e}),ke=e=>l.jsx(b,{size:"smaller",...e}),Se=e=>l.jsx(b,{size:"medium",...e}),Ee=e=>l.jsx(b,{size:"large",...e}),Ce="_heading_1cnsg_1",Te="_h1_1cnsg_10",_e="_h2_1cnsg_14",$e="_h3_1cnsg_18",Re="_h4_1cnsg_22",Ie="_h5_1cnsg_26",Oe="_h6_1cnsg_30",E={heading:Ce,h1:Te,h2:_e,h3:$e,h4:Re,h5:Ie,h6:Oe},O=n.forwardRef(({variant:e="h3",className:t,color:r,whiteSpace:u,wordBreak:s,style:o,children:i,as:d,...a},f)=>{const p=d??e;return l.jsx(p,{className:_(E.heading,E[e],t),style:{color:r,whiteSpace:u,wordBreak:s,...o},ref:f,...a,children:i})}),Le=e=>l.jsx(O,{variant:"h2",...e}),Me=(e,t)=>e===t,Ae=(e,t,r=Me)=>{const u=n.useCallback(a=>{e.some(f=>r(f,a))||t([...e,a])},[e,t,r]),s=n.useCallback(a=>{t(a.reduce((f,p)=>f.some(m=>r(m,p))?f:[...f,p],e))},[e,t,r]),o=n.useCallback(a=>{const f=e.findIndex(p=>r(p,a));f>=0&&t(e.filter((p,m)=>m!==f))},[e,t,r]),i=n.useCallback(a=>{t(e.filter(f=>!a.some(p=>r(p,f))))},[e,t,r]),d=n.useCallback(a=>{e.some(p=>r(p,a))?o(a):u(a)},[e,u,o,r]);return{add:u,addMultiple:s,remove:o,removeMultiple:i,toggle:d}},x=e=>{const[t,r]=n.useState(e),u=n.useCallback(()=>{r(!0)},[r]),s=n.useCallback(()=>{r(!1)},[r]),o=n.useCallback(()=>{r(i=>!i)},[r]);return[t,u,s,o]},De=(e,t)=>{const[r,u]=n.useState(e);return n.useEffect(()=>{const s=setTimeout(()=>{u(e)},t);return()=>{clearTimeout(s)}},[e,t]),r},Pe=(e,t)=>{const[r,u]=n.useState(e);return n.useEffect(()=>{e&&u(!0);const s=setTimeout(()=>{e||u(e)},t);return()=>{clearTimeout(s)}},[e,t]),r};let je=0;const C=e=>`webui-${e?e+"-":""}${++je}`,He=e=>{const[t,r]=n.useState(()=>C(e));return n.useEffect(()=>r(C(e)),[e]),t},h=(e,t,r)=>{const u=n.useRef(null);n.useEffect(()=>{u.current=r},[r]),n.useEffect(()=>{if(!(e.current&&e.current.addEventListener))return;const o=d=>{if(u.current)return u.current(d)};if(!e.current)return;const i=e.current;return i.addEventListener(t,o),()=>{i&&i.removeEventListener(t,o)}},[t,e])},ze=e=>{const[t,r,u]=x(!1);n.useEffect(()=>{document.activeElement===e.current?r():u()},[e,u,r]),h(e,"focus",r),h(e,"blur",u);const s=n.useCallback(()=>{e.current&&e.current.focus()},[e]),o=n.useCallback(()=>{e.current&&e.current.blur()},[e]);return{isInFocus:t,focus:s,blur:o}},Fe=e=>{const t=n.useRef(e);return t.current=e,t},Ne=e=>{const[t,r,u]=x(!1);return h(e,"mouseover",r),h(e,"mouseout",u),t},qe=e=>{const[t,r,u]=x(!1);return h(e,"mouseenter",r),h(e,"mouseleave",u),t},Ue=(e,t)=>{const r=n.useRef(()=>{});n.useEffect(()=>{r.current=t},[t]),n.useEffect(()=>{const u=s=>{e.filter(i=>i.current).every(i=>i.current&&!i.current.contains(s.target))&&r.current(s)};return document.addEventListener("mousedown",u),document.addEventListener("touchstart",u),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("touchstart",u)}},[...e])},Ve=(e,t,r)=>{const u=n.useRef(()=>{});n.useEffect(()=>{u.current=t},[t]),n.useEffect(()=>{const s=o=>{!e.current||e.current.contains(o.target)||u.current(o)};return document.addEventListener("mousedown",s,r),document.addEventListener("touchstart",s,r),()=>{document.removeEventListener("mousedown",s,r),document.removeEventListener("touchstart",s,r)}},[e,r])},T=["mousemove","mousedown","keydown","touchstart","scroll"],Be=(e,t)=>{const r=n.useRef(()=>{});n.useEffect(()=>{r.current=e},[e]),n.useEffect(()=>{const u=k.debounce(r.current,t);return T.forEach(s=>window.addEventListener(s,u)),()=>{T.forEach(s=>window.removeEventListener(s,u))}},[t])},We=(e,t)=>{const[r,u]=n.useState(!1),{rootMargin:s,root:o,threshold:i}=t||{},d=n.useMemo(()=>new IntersectionObserver(([a])=>u(a.isIntersecting),{rootMargin:s,root:o,threshold:i}),[u,s,o,i]);return n.useEffect(()=>(e.current&&d.observe(e.current),()=>{d.disconnect()}),[d,e]),r},Xe=e=>{const t=n.useRef(null);return n.useEffect(()=>{e&&(typeof e=="function"?e(t.current):e.current=t.current)}),t},Ge=(e,t,r=!0)=>{const[u,s]=n.useState(e),o=n.useRef(null),i=n.useCallback((d,a=t)=>{s(d),r&&clearTimeout(o.current),o.current=setTimeout(()=>s(e),a)},[t,r,e]);return n.useEffect(()=>()=>{clearTimeout(o.current)},[]),[u,i]},Ye=()=>n.useMemo(()=>new Date,[]),Ke=e=>{throw new Error(`Switch unhandled case: ${e}`)},Ze=(e,t)=>t,Je=e=>Object.keys(e).filter(t=>e[t]),Qe=e=>{try{const t=parseFloat(e);return isNaN(t)||t==null?void 0:t}catch{}},et=e=>{try{const t=parseInt(e,10);return isNaN(t)||t==null?void 0:t}catch{}};function tt(e,t){if(e==null)throw new Error("Invariant error: "+t)}exports.Box=g;exports.Clickable=N;exports.Column=Z;exports.HeaderText=Le;exports.Heading=O;exports.Indent=te;exports.LargeText=Ee;exports.Nest=se;exports.ResizeAwareBox=Q;exports.Row=ee;exports.ScreenReaderOnlyText=le;exports.SeparatorLine=z;exports.SmallText=we;exports.SmallerText=ke;exports.Space=ne;exports.Spacing=re;exports.StandardText=Se;exports.Text=b;exports.Txt=ve;exports.booleanOrNumberToNumber=y;exports.exhaustSwitchCase=Ze;exports.exhaustSwitchCaseElseThrow=Ke;exports.getDataProps=I;exports.getDimensionObject=$;exports.invariant=tt;exports.parseFloatElseUndefined=Qe;exports.parseIntElseUndefined=et;exports.truthyKeysAsList=Je;exports.useArraySet=Ae;exports.useBoolean=x;exports.useDebounce=De;exports.useDelayedFalse=Pe;exports.useDomId=He;exports.useElementDimensions=R;exports.useElementFocus=ze;exports.useEventListener=h;exports.useForwardedRef=Xe;exports.useLatest=Fe;exports.useMouseIsEntered=qe;exports.useMouseIsOver=Ne;exports.useMultiOnClickOutside=Ue;exports.useOnClickOutside=Ve;exports.useOnNoMouseMovement=Be;exports.useOnScreen=We;exports.useTimeoutState=Ge;exports.useToday=Ye; | ||
`,ne=({half:e=!1,horizontal:t=!1,num:r=1,vertical:u=!1})=>{const s=r*(e?.5:1);return l.jsx(ue,{style:{"--current-size":s,height:t?1:void 0,width:u?1:void 0}})},se=({children:e,nest:t,render:r})=>t?l.jsx(l.Fragment,{children:r(e)}):l.jsx(l.Fragment,{children:e}),oe="_visuallyHidden_1gevf_1",ae={visuallyHidden:oe},I=e=>k.pickBy(e,ie),ie=(e,t)=>ce(t),ce=e=>e.startsWith("data-")||e.startsWith("aria-"),le=({children:e,...t})=>l.jsx("span",{className:ae.visuallyHidden,...I(t),children:e}),de="_text_1iisw_1",fe="_standard_1iisw_24",pe="_bold_1iisw_27",me="_caption_1iisw_31",he="_overline_1iisw_39",ge="_large_1iisw_48",be="_medium_1iisw_53",ye="_small_1iisw_58",xe="_smaller_1iisw_63",v={text:de,standard:fe,bold:pe,caption:me,overline:he,large:ge,medium:be,small:ye,smaller:xe},b=n.forwardRef(({children:e,variant:t="standard",size:r="medium",className:u,color:s,userSelect:o,whiteSpace:a,wordBreak:d,textAlign:i,style:f,...p},m)=>l.jsx("span",{className:_(v.text,v[t],v[r],u),ref:m,style:{color:s,userSelect:o,whiteSpace:a,wordBreak:d,textAlign:i,...f},...p,children:e})),ve=b,we=e=>l.jsx(b,{size:"small",...e}),ke=e=>l.jsx(b,{size:"smaller",...e}),Ee=e=>l.jsx(b,{size:"medium",...e}),Se=e=>l.jsx(b,{size:"large",...e}),Ce="_heading_1cnsg_1",Te="_h1_1cnsg_10",_e="_h2_1cnsg_14",$e="_h3_1cnsg_18",Re="_h4_1cnsg_22",Ie="_h5_1cnsg_26",Oe="_h6_1cnsg_30",S={heading:Ce,h1:Te,h2:_e,h3:$e,h4:Re,h5:Ie,h6:Oe},O=n.forwardRef(({variant:e="h3",className:t,color:r,whiteSpace:u,wordBreak:s,style:o,children:a,as:d,...i},f)=>{const p=d??e;return l.jsx(p,{className:_(S.heading,S[e],t),style:{color:r,whiteSpace:u,wordBreak:s,...o},ref:f,...i,children:a})}),Le=e=>l.jsx(O,{variant:"h2",...e}),Me=(e,t)=>e===t,Ae=(e,t,r=Me)=>{const u=n.useCallback(i=>{e.some(f=>r(f,i))||t([...e,i])},[e,t,r]),s=n.useCallback(i=>{t(i.reduce((f,p)=>f.some(m=>r(m,p))?f:[...f,p],e))},[e,t,r]),o=n.useCallback(i=>{const f=e.findIndex(p=>r(p,i));f>=0&&t(e.filter((p,m)=>m!==f))},[e,t,r]),a=n.useCallback(i=>{t(e.filter(f=>!i.some(p=>r(p,f))))},[e,t,r]),d=n.useCallback(i=>{e.some(p=>r(p,i))?o(i):u(i)},[e,u,o,r]);return{add:u,addMultiple:s,remove:o,removeMultiple:a,toggle:d}},x=e=>{const[t,r]=n.useState(e),u=n.useCallback(()=>{r(!0)},[r]),s=n.useCallback(()=>{r(!1)},[r]),o=n.useCallback(()=>{r(a=>!a)},[r]);return[t,u,s,o]},De=(e,t)=>{const[r,u]=n.useState(e);return n.useEffect(()=>{const s=setTimeout(()=>{u(e)},t);return()=>{clearTimeout(s)}},[e,t]),r},Pe=(e,t)=>{const[r,u]=n.useState(e);return n.useEffect(()=>{e&&u(!0);const s=setTimeout(()=>{e||u(e)},t);return()=>{clearTimeout(s)}},[e,t]),r};let je=0;const C=e=>`webui-${e?e+"-":""}${++je}`,He=e=>{const[t,r]=n.useState(()=>C(e));return n.useEffect(()=>r(C(e)),[e]),t},h=(e,t,r)=>{const u=n.useRef(null);n.useEffect(()=>{u.current=r},[r]),n.useEffect(()=>{if(!(e.current&&e.current.addEventListener))return;const o=d=>{if(u.current)return u.current(d)};if(!e.current)return;const a=e.current;return a.addEventListener(t,o),()=>{a&&a.removeEventListener(t,o)}},[t,e])},ze=e=>{const[t,r,u]=x(!1);n.useEffect(()=>{document.activeElement===e.current?r():u()},[e,u,r]),h(e,"focus",r),h(e,"blur",u);const s=n.useCallback(()=>{e.current&&e.current.focus()},[e]),o=n.useCallback(()=>{e.current&&e.current.blur()},[e]);return{isInFocus:t,focus:s,blur:o}},Fe=e=>{const t=n.useRef(e);return n.useLayoutEffect(()=>{t.current=e}),n.useCallback((...r)=>{const{current:u}=t;return u(...r)},[])},Ne=e=>{const t=n.useRef(e);return t.current=e,t},qe=e=>{const[t,r,u]=x(!1);return h(e,"mouseover",r),h(e,"mouseout",u),t},Ue=e=>{const[t,r,u]=x(!1);return h(e,"mouseenter",r),h(e,"mouseleave",u),t},Ve=(e,t)=>{const r=n.useRef(()=>{});n.useEffect(()=>{r.current=t},[t]),n.useEffect(()=>{const u=s=>{e.filter(a=>a.current).every(a=>a.current&&!a.current.contains(s.target))&&r.current(s)};return document.addEventListener("mousedown",u),document.addEventListener("touchstart",u),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("touchstart",u)}},[...e])},Be=(e,t,r)=>{const u=n.useRef(()=>{});n.useEffect(()=>{u.current=t},[t]),n.useEffect(()=>{const s=o=>{!e.current||e.current.contains(o.target)||u.current(o)};return document.addEventListener("mousedown",s,r),document.addEventListener("touchstart",s,r),()=>{document.removeEventListener("mousedown",s,r),document.removeEventListener("touchstart",s,r)}},[e,r])},T=["mousemove","mousedown","keydown","touchstart","scroll"],We=(e,t)=>{const r=n.useRef(()=>{});n.useEffect(()=>{r.current=e},[e]),n.useEffect(()=>{const u=k.debounce(r.current,t);return T.forEach(s=>window.addEventListener(s,u)),()=>{T.forEach(s=>window.removeEventListener(s,u))}},[t])},Xe=(e,t)=>{const[r,u]=n.useState(!1),{rootMargin:s,root:o,threshold:a}=t||{},d=n.useMemo(()=>new IntersectionObserver(([i])=>u(i.isIntersecting),{rootMargin:s,root:o,threshold:a}),[u,s,o,a]);return n.useEffect(()=>(e.current&&d.observe(e.current),()=>{d.disconnect()}),[d,e]),r},Ge=e=>{const t=n.useRef(null);return n.useEffect(()=>{e&&(typeof e=="function"?e(t.current):e.current=t.current)}),t},Ye=(e,t,r=!0)=>{const[u,s]=n.useState(e),o=n.useRef(null),a=n.useCallback((d,i=t)=>{s(d),r&&clearTimeout(o.current),o.current=setTimeout(()=>s(e),i)},[t,r,e]);return n.useEffect(()=>()=>{clearTimeout(o.current)},[]),[u,a]},Ke=()=>n.useMemo(()=>new Date,[]),Ze=e=>{throw new Error(`Switch unhandled case: ${e}`)},Je=(e,t)=>t,Qe=e=>Object.keys(e).filter(t=>e[t]),et=e=>{try{const t=parseFloat(e);return isNaN(t)||t==null?void 0:t}catch{}},tt=e=>{try{const t=parseInt(e,10);return isNaN(t)||t==null?void 0:t}catch{}};function rt(e,t){if(e==null)throw new Error("Invariant error: "+t)}exports.Box=g;exports.Clickable=N;exports.Column=Z;exports.HeaderText=Le;exports.Heading=O;exports.Indent=te;exports.LargeText=Se;exports.Nest=se;exports.ResizeAwareBox=Q;exports.Row=ee;exports.ScreenReaderOnlyText=le;exports.SeparatorLine=z;exports.SmallText=we;exports.SmallerText=ke;exports.Space=ne;exports.Spacing=re;exports.StandardText=Ee;exports.Text=b;exports.Txt=ve;exports.booleanOrNumberToNumber=y;exports.exhaustSwitchCase=Je;exports.exhaustSwitchCaseElseThrow=Ze;exports.getDataProps=I;exports.getDimensionObject=$;exports.invariant=rt;exports.parseFloatElseUndefined=et;exports.parseIntElseUndefined=tt;exports.truthyKeysAsList=Qe;exports.useArraySet=Ae;exports.useBoolean=x;exports.useDebounce=De;exports.useDelayedFalse=Pe;exports.useDomId=He;exports.useElementDimensions=R;exports.useElementFocus=ze;exports.useEventCallback=Fe;exports.useEventListener=h;exports.useForwardedRef=Ge;exports.useLatest=Ne;exports.useMouseIsEntered=Ue;exports.useMouseIsOver=qe;exports.useMultiOnClickOutside=Ve;exports.useOnClickOutside=Be;exports.useOnNoMouseMovement=We;exports.useOnScreen=Xe;exports.useTimeoutState=Ye;exports.useToday=Ke; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@stenajs-webui/core", | ||
"version": "21.29.13", | ||
"version": "21.29.14", | ||
"type": "module", | ||
@@ -64,5 +64,5 @@ "description": "", | ||
], | ||
"gitHead": "dad757bd20a43fb0d4fa27f1464ca00bb3382ee2", | ||
"gitHead": "35e649ddbdfbe577b0c27604e1969bd9be170d2b", | ||
"dependencies": { | ||
"@stenajs-webui/theme": "21.29.13", | ||
"@stenajs-webui/theme": "21.29.14", | ||
"classnames": "^2.5.1", | ||
@@ -69,0 +69,0 @@ "lodash-es": "^4.17.21" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
214662
0.95%57
1.79%1672
0.84%+ Added
- Removed