@enonic/ui 0.12.0 → 0.12.1
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/dist/enonic-ui.cjs +5 -4
- package/dist/enonic-ui.es.js +912 -349
- package/dist/styles/preset.css +1 -1
- package/dist/styles/style.css +1 -1
- package/dist/styles/tokens.css +1 -1
- package/dist/types/components/avatar/avatar.d.ts +36 -0
- package/dist/types/components/avatar/index.d.ts +1 -0
- package/dist/types/components/dialog/index.d.ts +1 -3
- package/dist/types/components/icon-button/icon-button.d.ts +1 -1
- package/dist/types/components/index.d.ts +5 -2
- package/dist/types/components/listbox/index.d.ts +1 -1
- package/dist/types/components/listbox/listbox.d.ts +34 -29
- package/dist/types/components/separator/index.d.ts +1 -2
- package/dist/types/providers/avatar-provider.d.ts +15 -0
- package/dist/types/providers/index.d.ts +2 -0
- package/dist/types/providers/listbox-provider.d.ts +22 -0
- package/package.json +1 -1
package/dist/enonic-ui.cjs
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("preact"),r=require("react"),t=require("@radix-ui/react-slot"),o=require("preact/hooks");var n=0;function a(r,t,o,a,i,s){t||(t={});var l,d,c=t;if("ref"in c)for(d in c={},t)"ref"==d?l=t[d]:c[d]=t[d];var u={type:r,props:c,key:o,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--n,__i:-1,__u:0,__source:i,__self:s};if("function"==typeof r&&(l=r.defaultProps))for(d in l)void 0===c[d]&&(c[d]=l[d]);return e.options.vnode&&e.options.vnode(u),u}function i(e){var r,t,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(r=0;r<n;r++)e[r]&&(t=i(e[r]))&&(o&&(o+=" "),o+=t)}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function s(){for(var e,r,t=0,o="",n=arguments.length;t<n;t++)(e=arguments[t])&&(r=i(e))&&(o&&(o+=" "),o+=r);return o}const l=e=>{const r=m(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:e=>{const t=e.split("-");return""===t[0]&&1!==t.length&&t.shift(),d(t,r)||u(e)},getConflictingClassGroupIds:(e,r)=>{const n=t[e]||[];return r&&o[e]?[...n,...o[e]]:n}}},d=(e,r)=>{if(0===e.length)return r.classGroupId;const t=e[0],o=r.nextPart.get(t),n=o?d(e.slice(1),o):void 0;if(n)return n;if(0===r.validators.length)return;const a=e.join("-");return r.validators.find(({validator:e})=>e(a))?.classGroupId},c=/^\[(.+)\]$/,u=e=>{if(c.test(e)){const r=c.exec(e)[1],t=r?.substring(0,r.indexOf(":"));if(t)return"arbitrary.."+t}},m=e=>{const{theme:r,classGroups:t}=e,o={nextPart:new Map,validators:[]};for(const n in t)p(t[n],o,n,r);return o},p=(e,r,t,o)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?r:f(r,e)).classGroupId=t)}if("function"==typeof e)return b(e)?void p(e(o),r,t,o):void r.validators.push({validator:e,classGroupId:t});Object.entries(e).forEach(([e,n])=>{p(n,f(r,e),t,o)})})},f=(e,r)=>{let t=e;return r.split("-").forEach(e=>{t.nextPart.has(e)||t.nextPart.set(e,{nextPart:new Map,validators:[]}),t=t.nextPart.get(e)}),t},b=e=>e.isThemeGetter,h=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=new Map,o=new Map;const n=(n,a)=>{t.set(n,a),r++,r>e&&(r=0,o=t,t=new Map)};return{get(e){let r=t.get(e);return void 0!==r?r:void 0!==(r=o.get(e))?(n(e,r),r):void 0},set(e,r){t.has(e)?t.set(e,r):n(e,r)}}},g=e=>{const{prefix:r,experimentalParseClassName:t}=e;let o=e=>{const r=[];let t,o=0,n=0,a=0;for(let l=0;l<e.length;l++){let i=e[l];if(0===o&&0===n){if(":"===i){r.push(e.slice(a,l)),a=l+1;continue}if("/"===i){t=l;continue}}"["===i?o++:"]"===i?o--:"("===i?n++:")"===i&&n--}const i=0===r.length?e:e.substring(a),s=v(i);return{modifiers:r,hasImportantModifier:s!==i,baseClassName:s,maybePostfixModifierPosition:t&&t>a?t-a:void 0}};if(r){const e=r+":",t=o;o=r=>r.startsWith(e)?t(r.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:r,maybePostfixModifierPosition:void 0}}if(t){const e=o;o=r=>t({className:r,parseClassName:e})}return o},v=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,x=e=>{const r=Object.fromEntries(e.orderSensitiveModifiers.map(e=>[e,!0]));return e=>{if(e.length<=1)return e;const t=[];let o=[];return e.forEach(e=>{"["===e[0]||r[e]?(t.push(...o.sort(),e),o=[]):o.push(e)}),t.push(...o.sort()),t}},w=/\s+/;function k(){let e,r,t=0,o="";for(;t<arguments.length;)(e=arguments[t++])&&(r=y(e))&&(o&&(o+=" "),o+=r);return o}const y=e=>{if("string"==typeof e)return e;let r,t="";for(let o=0;o<e.length;o++)e[o]&&(r=y(e[o]))&&(t&&(t+=" "),t+=r);return t};function N(e,...r){let t,o,n,a=function(s){const d=r.reduce((e,r)=>r(e),e());return t=(e=>({cache:h(e.cacheSize),parseClassName:g(e),sortModifiers:x(e),...l(e)}))(d),o=t.cache.get,n=t.cache.set,a=i,i(s)};function i(e){const r=o(e);if(r)return r;const a=((e,r)=>{const{parseClassName:t,getClassGroupId:o,getConflictingClassGroupIds:n,sortModifiers:a}=r,i=[],s=e.trim().split(w);let l="";for(let d=s.length-1;d>=0;d-=1){const e=s[d],{isExternal:r,modifiers:c,hasImportantModifier:u,baseClassName:m,maybePostfixModifierPosition:p}=t(e);if(r){l=e+(l.length>0?" "+l:l);continue}let f=!!p,b=o(f?m.substring(0,p):m);if(!b){if(!f){l=e+(l.length>0?" "+l:l);continue}if(b=o(m),!b){l=e+(l.length>0?" "+l:l);continue}f=!1}const h=a(c).join(":"),g=u?h+"!":h,v=g+b;if(i.includes(v))continue;i.push(v);const x=n(b,f);for(let t=0;t<x.length;++t){const e=x[t];i.push(g+e)}l=e+(l.length>0?" "+l:l)}return l})(e,t);return n(e,a),a}return function(){return a(k.apply(null,arguments))}}const z=e=>{const r=r=>r[e]||[];return r.isThemeGetter=!0,r},C=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,M=/^\((?:(\w[\w-]*):)?(.+)\)$/i,I=/^\d+\/\d+$/,j=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,S=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,R=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,E=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,P=e=>I.test(e),O=e=>!!e&&!Number.isNaN(Number(e)),W=e=>!!e&&Number.isInteger(Number(e)),$=e=>e.endsWith("%")&&O(e.slice(0,-1)),L=e=>j.test(e),A=()=>!0,q=e=>S.test(e)&&!R.test(e),G=()=>!1,D=e=>_.test(e),V=e=>E.test(e),B=e=>!F(e)&&!K(e),T=e=>ne(e,le,G),F=e=>C.test(e),X=e=>ne(e,de,q),Y=e=>ne(e,ce,O),H=e=>ne(e,ie,G),U=e=>ne(e,se,V),Z=e=>ne(e,me,D),K=e=>M.test(e),J=e=>ae(e,de),Q=e=>ae(e,ue),ee=e=>ae(e,ie),re=e=>ae(e,le),te=e=>ae(e,se),oe=e=>ae(e,me,!0),ne=(e,r,t)=>{const o=C.exec(e);return!!o&&(o[1]?r(o[1]):t(o[2]))},ae=(e,r,t=!1)=>{const o=M.exec(e);return!!o&&(o[1]?r(o[1]):t)},ie=e=>"position"===e||"percentage"===e,se=e=>"image"===e||"url"===e,le=e=>"length"===e||"size"===e||"bg-size"===e,de=e=>"length"===e,ce=e=>"number"===e,ue=e=>"family-name"===e,me=e=>"shadow"===e,pe=N(()=>{const e=z("color"),r=z("font"),t=z("text"),o=z("font-weight"),n=z("tracking"),a=z("leading"),i=z("breakpoint"),s=z("container"),l=z("spacing"),d=z("radius"),c=z("shadow"),u=z("inset-shadow"),m=z("text-shadow"),p=z("drop-shadow"),f=z("blur"),b=z("perspective"),h=z("aspect"),g=z("ease"),v=z("animate"),x=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",K,F],w=()=>[K,F,l],k=()=>[P,"full","auto",...w()],y=()=>[W,"none","subgrid",K,F],N=()=>["auto",{span:["full",W,K,F]},W,K,F],C=()=>[W,"auto",K,F],M=()=>["auto","min","max","fr",K,F],I=()=>["auto",...w()],j=()=>[P,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],S=()=>[e,K,F],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",ee,H,{position:[K,F]}],_=()=>["auto","cover","contain",re,T,{size:[K,F]}],E=()=>[$,J,X],q=()=>["","none","full",d,K,F],G=()=>["",O,J,X],D=()=>[O,$,ee,H],V=()=>["","none",f,K,F],ne=()=>["none",O,K,F],ae=()=>["none",O,K,F],ie=()=>[O,K,F],se=()=>[P,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[L],breakpoint:[L],color:[A],container:[L],"drop-shadow":[L],ease:["in","out","in-out"],font:[B],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[L],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[L],shadow:[L],spacing:["px",O],text:[L],"text-shadow":[L],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",P,F,K,h]}],container:["container"],columns:[{columns:[O,F,K,s]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:x()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{start:k()}],end:[{end:k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[W,"auto",K,F]}],basis:[{basis:[P,"full","auto",s,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[O,P,"auto","initial","none",F]}],grow:[{grow:["",O,K,F]}],shrink:[{shrink:["",O,K,F]}],order:[{order:[W,"first","last","none",K,F]}],"grid-cols":[{"grid-cols":y()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":y()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:j()}],w:[{w:[s,"screen",...j()]}],"min-w":[{"min-w":[s,"screen","none",...j()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...j()]}],h:[{h:["screen","lh",...j()]}],"min-h":[{"min-h":["screen","lh","none",...j()]}],"max-h":[{"max-h":["screen","lh",...j()]}],"font-size":[{text:["base",t,J,X]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,K,Y]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",$,F]}],"font-family":[{font:[Q,F,r]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,K,F]}],"line-clamp":[{"line-clamp":[O,"none",K,Y]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":["none",K,F]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",K,F]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:S()}],"text-color":[{text:S()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[O,"from-font","auto",K,X]}],"text-decoration-color":[{decoration:S()}],"underline-offset":[{"underline-offset":[O,"auto",K,F]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K,F]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",K,F]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:R()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},W,K,F],radial:["",K,F],conic:[W,K,F]},te,U]}],"bg-color":[{bg:S()}],"gradient-from-pos":[{from:E()}],"gradient-via-pos":[{via:E()}],"gradient-to-pos":[{to:E()}],"gradient-from":[{from:S()}],"gradient-via":[{via:S()}],"gradient-to":[{to:S()}],rounded:[{rounded:q()}],"rounded-s":[{"rounded-s":q()}],"rounded-e":[{"rounded-e":q()}],"rounded-t":[{"rounded-t":q()}],"rounded-r":[{"rounded-r":q()}],"rounded-b":[{"rounded-b":q()}],"rounded-l":[{"rounded-l":q()}],"rounded-ss":[{"rounded-ss":q()}],"rounded-se":[{"rounded-se":q()}],"rounded-ee":[{"rounded-ee":q()}],"rounded-es":[{"rounded-es":q()}],"rounded-tl":[{"rounded-tl":q()}],"rounded-tr":[{"rounded-tr":q()}],"rounded-br":[{"rounded-br":q()}],"rounded-bl":[{"rounded-bl":q()}],"border-w":[{border:G()}],"border-w-x":[{"border-x":G()}],"border-w-y":[{"border-y":G()}],"border-w-s":[{"border-s":G()}],"border-w-e":[{"border-e":G()}],"border-w-t":[{"border-t":G()}],"border-w-r":[{"border-r":G()}],"border-w-b":[{"border-b":G()}],"border-w-l":[{"border-l":G()}],"divide-x":[{"divide-x":G()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":G()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:S()}],"border-color-x":[{"border-x":S()}],"border-color-y":[{"border-y":S()}],"border-color-s":[{"border-s":S()}],"border-color-e":[{"border-e":S()}],"border-color-t":[{"border-t":S()}],"border-color-r":[{"border-r":S()}],"border-color-b":[{"border-b":S()}],"border-color-l":[{"border-l":S()}],"divide-color":[{divide:S()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[O,K,F]}],"outline-w":[{outline:["",O,J,X]}],"outline-color":[{outline:S()}],shadow:[{shadow:["","none",c,oe,Z]}],"shadow-color":[{shadow:S()}],"inset-shadow":[{"inset-shadow":["none",u,oe,Z]}],"inset-shadow-color":[{"inset-shadow":S()}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:S()}],"ring-offset-w":[{"ring-offset":[O,X]}],"ring-offset-color":[{"ring-offset":S()}],"inset-ring-w":[{"inset-ring":G()}],"inset-ring-color":[{"inset-ring":S()}],"text-shadow":[{"text-shadow":["none",m,oe,Z]}],"text-shadow-color":[{"text-shadow":S()}],opacity:[{opacity:[O,K,F]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[O]}],"mask-image-linear-from-pos":[{"mask-linear-from":D()}],"mask-image-linear-to-pos":[{"mask-linear-to":D()}],"mask-image-linear-from-color":[{"mask-linear-from":S()}],"mask-image-linear-to-color":[{"mask-linear-to":S()}],"mask-image-t-from-pos":[{"mask-t-from":D()}],"mask-image-t-to-pos":[{"mask-t-to":D()}],"mask-image-t-from-color":[{"mask-t-from":S()}],"mask-image-t-to-color":[{"mask-t-to":S()}],"mask-image-r-from-pos":[{"mask-r-from":D()}],"mask-image-r-to-pos":[{"mask-r-to":D()}],"mask-image-r-from-color":[{"mask-r-from":S()}],"mask-image-r-to-color":[{"mask-r-to":S()}],"mask-image-b-from-pos":[{"mask-b-from":D()}],"mask-image-b-to-pos":[{"mask-b-to":D()}],"mask-image-b-from-color":[{"mask-b-from":S()}],"mask-image-b-to-color":[{"mask-b-to":S()}],"mask-image-l-from-pos":[{"mask-l-from":D()}],"mask-image-l-to-pos":[{"mask-l-to":D()}],"mask-image-l-from-color":[{"mask-l-from":S()}],"mask-image-l-to-color":[{"mask-l-to":S()}],"mask-image-x-from-pos":[{"mask-x-from":D()}],"mask-image-x-to-pos":[{"mask-x-to":D()}],"mask-image-x-from-color":[{"mask-x-from":S()}],"mask-image-x-to-color":[{"mask-x-to":S()}],"mask-image-y-from-pos":[{"mask-y-from":D()}],"mask-image-y-to-pos":[{"mask-y-to":D()}],"mask-image-y-from-color":[{"mask-y-from":S()}],"mask-image-y-to-color":[{"mask-y-to":S()}],"mask-image-radial":[{"mask-radial":[K,F]}],"mask-image-radial-from-pos":[{"mask-radial-from":D()}],"mask-image-radial-to-pos":[{"mask-radial-to":D()}],"mask-image-radial-from-color":[{"mask-radial-from":S()}],"mask-image-radial-to-color":[{"mask-radial-to":S()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[O]}],"mask-image-conic-from-pos":[{"mask-conic-from":D()}],"mask-image-conic-to-pos":[{"mask-conic-to":D()}],"mask-image-conic-from-color":[{"mask-conic-from":S()}],"mask-image-conic-to-color":[{"mask-conic-to":S()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:R()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",K,F]}],filter:[{filter:["","none",K,F]}],blur:[{blur:V()}],brightness:[{brightness:[O,K,F]}],contrast:[{contrast:[O,K,F]}],"drop-shadow":[{"drop-shadow":["","none",p,oe,Z]}],"drop-shadow-color":[{"drop-shadow":S()}],grayscale:[{grayscale:["",O,K,F]}],"hue-rotate":[{"hue-rotate":[O,K,F]}],invert:[{invert:["",O,K,F]}],saturate:[{saturate:[O,K,F]}],sepia:[{sepia:["",O,K,F]}],"backdrop-filter":[{"backdrop-filter":["","none",K,F]}],"backdrop-blur":[{"backdrop-blur":V()}],"backdrop-brightness":[{"backdrop-brightness":[O,K,F]}],"backdrop-contrast":[{"backdrop-contrast":[O,K,F]}],"backdrop-grayscale":[{"backdrop-grayscale":["",O,K,F]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[O,K,F]}],"backdrop-invert":[{"backdrop-invert":["",O,K,F]}],"backdrop-opacity":[{"backdrop-opacity":[O,K,F]}],"backdrop-saturate":[{"backdrop-saturate":[O,K,F]}],"backdrop-sepia":[{"backdrop-sepia":["",O,K,F]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",K,F]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[O,"initial",K,F]}],ease:[{ease:["linear","initial",g,K,F]}],delay:[{delay:[O,K,F]}],animate:[{animate:["none",v,K,F]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,K,F]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:ae()}],"scale-x":[{"scale-x":ae()}],"scale-y":[{"scale-y":ae()}],"scale-z":[{"scale-z":ae()}],"scale-3d":["scale-3d"],skew:[{skew:ie()}],"skew-x":[{"skew-x":ie()}],"skew-y":[{"skew-y":ie()}],transform:[{transform:[K,F,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":["translate-none"],accent:[{accent:S()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:S()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",K,F]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",K,F]}],fill:[{fill:["none",...S()]}],"stroke-w":[{stroke:[O,J,X,Y]}],stroke:[{stroke:["none",...S()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function fe(...e){return pe(s(e))}function be(e){return function(e){return!!(e&&"object"==typeof e&&"value"in e&&"peek"in e&&"function"==typeof e.peek&&"subscribe"in e&&"function"==typeof e.subscribe)}(e)?e.value:e}const he=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,ge=s,ve=(e,r)=>t=>{var o;if(null==(null==r?void 0:r.variants))return ge(e,null==t?void 0:t.class,null==t?void 0:t.className);const{variants:n,defaultVariants:a}=r,i=Object.keys(n).map(e=>{const r=null==t?void 0:t[e],o=null==a?void 0:a[e];if(null===r)return null;const i=he(r)||he(o);return n[e][i]}),s=t&&Object.entries(t).reduce((e,r)=>{let[t,o]=r;return void 0===o||(e[t]=o),e},{}),l=null==r||null===(o=r.compoundVariants)||void 0===o?void 0:o.reduce((e,r)=>{let{class:t,className:o,...n}=r;return Object.entries(n).every(e=>{let[r,t]=e;return Array.isArray(t)?t.includes({...a,...s}[r]):{...a,...s}[r]===t})?[...e,t,o]:e},[]);return ge(e,i,l,null==t?void 0:t.class,null==t?void 0:t.className)},xe=ve(["inline-flex items-center justify-center","text-main font-medium","box-border rounded-sm transition-highlight","focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-0","disabled:select-none disabled:pointer-events-none disabled:opacity-30","overflow-hidden text-ellipsis whitespace-nowrap cursor-pointer"],{variants:{variant:{text:"bg-btn-primary hover:bg-btn-primary-hover active:bg-btn-active active:text-rev dark:active:text-main",filled:"bg-btn-secondary hover:bg-btn-secondary-hover active:bg-btn-active active:text-rev dark:active:text-main",solid:"bg-btn-tertiary text-alt hover:bg-btn-tertiary-hover active:bg-btn-active dark:active:text-main",outline:"bg-btn-primary hover:bg-btn-primary-hover active:bg-btn-active active:text-rev dark:active:text-main border border-bdr-strong"},size:{sm:"h-9 px-3.5 gap-2 text-sm",md:"h-10 px-3.5 gap-2.5 text-base",lg:"h-11.5 px-4 gap-3 text-lg"}},defaultVariants:{variant:"text",size:"md"}}),we=r.forwardRef(({className:e,variant:r="text",size:t="md",iconSize:o,iconStrokeWidth:n=1.5,startIcon:i,label:s,endIcon:l,title:d,children:c,...u},m)=>{const p=i,f=l,b=o??(e=>{switch(e){case"sm":return 16;case"md":return 18;case"lg":return 20}})(t??"md");return a("button",{ref:m,type:"button",className:fe(xe({variant:r,size:t}),e),title:d,"aria-label":d??s,"aria-disabled":u.disabled,...u,children:[p&&a(p,{size:b,strokeWidth:n}),c,s,f&&a(f,{size:b,strokeWidth:n})]})});we.displayName="Button";const ke=r.createContext(void 0),ye=({children:e,prefix:r})=>a(ke.Provider,{value:{prefix:r},children:e});ye.displayName="IdProvider";const Ne=e=>{const t=r.useId(),o=r.useContext(ke);if(e)return e;return o?.prefix?`${o.prefix}-${t}`:t},ze=e=>{const r=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,t)=>t?t.toUpperCase():r.toLowerCase()))(e);return r.charAt(0).toUpperCase()+r.slice(1)},Ce=(...e)=>e.filter((e,r,t)=>Boolean(e)&&""!==e.trim()&&t.indexOf(e)===r).join(" ").trim(),Me=e=>{for(const r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0};
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("preact"),t=require("react"),r=require("@radix-ui/react-slot"),o=require("focus-trap-react"),a=require("react-dom"),n=require("preact/hooks");var s=0;function i(t,r,o,a,n,i){r||(r={});var l,d,c=r;if("ref"in c)for(d in c={},r)"ref"==d?l=r[d]:c[d]=r[d];var u={type:t,props:c,key:o,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--s,__i:-1,__u:0,__source:n,__self:i};if("function"==typeof t&&(l=t.defaultProps))for(d in l)void 0===c[d]&&(c[d]=l[d]);return e.options.vnode&&e.options.vnode(u),u}const l=t.createContext(null),d=({value:e,children:t})=>i(l.Provider,{value:e,children:t});d.displayName="AvatarProvider";const c=()=>{const e=t.useContext(l);if(!e)throw new Error("useAvatar must be used within an Avatar");return e},u=t.createContext(void 0),m=({value:e,children:t})=>i(u.Provider,{value:e,children:t});m.displayName="DialogProvider";const f=()=>{const e=t.useContext(u);if(!e)throw new Error("useDialog must be used within a DialogProvider");return e},p=t.createContext(void 0),b=({children:e,prefix:t})=>i(p.Provider,{value:{prefix:t},children:e});b.displayName="IdProvider";const h=e=>{const r=t.useId(),o=t.useContext(p);if(e)return e;return o?.prefix?`${o.prefix}-${r}`:r},g=t.createContext(null),v=({value:e,children:t})=>i(g.Provider,{value:e,children:t});v.displayName="ListboxProvider";const x=()=>{const e=t.useContext(g);if(!e)throw new Error("useListbox must be used within a Listbox");return e};function w(e){var t,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=w(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function y(){for(var e,t,r=0,o="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=w(e))&&(o&&(o+=" "),o+=t);return o}const k=e=>{const t=I(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:e=>{const r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),N(r,t)||z(e)},getConflictingClassGroupIds:(e,t)=>{const a=r[e]||[];return t&&o[e]?[...a,...o[e]]:a}}},N=(e,t)=>{if(0===e.length)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),a=o?N(e.slice(1),o):void 0;if(a)return a;if(0===t.validators.length)return;const n=e.join("-");return t.validators.find(({validator:e})=>e(n))?.classGroupId},C=/^\[(.+)\]$/,z=e=>{if(C.test(e)){const t=C.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},I=e=>{const{theme:t,classGroups:r}=e,o={nextPart:new Map,validators:[]};for(const a in r)S(r[a],o,a,t);return o},S=(e,t,r,o)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:M(t,e)).classGroupId=r)}if("function"==typeof e)return R(e)?void S(e(o),t,r,o):void t.validators.push({validator:e,classGroupId:r});Object.entries(e).forEach(([e,a])=>{S(a,M(t,e),r,o)})})},M=(e,t)=>{let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r},R=e=>e.isThemeGetter,j=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map;const a=(a,n)=>{r.set(a,n),t++,t>e&&(t=0,o=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=o.get(e))?(a(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):a(e,t)}}},E=e=>{const{prefix:t,experimentalParseClassName:r}=e;let o=e=>{const t=[];let r,o=0,a=0,n=0;for(let l=0;l<e.length;l++){let s=e[l];if(0===o&&0===a){if(":"===s){t.push(e.slice(n,l)),n=l+1;continue}if("/"===s){r=l;continue}}"["===s?o++:"]"===s?o--:"("===s?a++:")"===s&&a--}const s=0===t.length?e:e.substring(n),i=L(s);return{modifiers:t,hasImportantModifier:i!==s,baseClassName:i,maybePostfixModifierPosition:r&&r>n?r-n:void 0}};if(t){const e=t+":",r=o;o=t=>t.startsWith(e)?r(t.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:t,maybePostfixModifierPosition:void 0}}if(r){const e=o;o=t=>r({className:t,parseClassName:e})}return o},L=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,O=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(e=>[e,!0]));return e=>{if(e.length<=1)return e;const r=[];let o=[];return e.forEach(e=>{"["===e[0]||t[e]?(r.push(...o.sort(),e),o=[]):o.push(e)}),r.push(...o.sort()),r}},D=/\s+/;function P(){let e,t,r=0,o="";for(;r<arguments.length;)(e=arguments[r++])&&(t=A(e))&&(o&&(o+=" "),o+=t);return o}const A=e=>{if("string"==typeof e)return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=A(e[o]))&&(r&&(r+=" "),r+=t);return r};function _(e,...t){let r,o,a,n=function(i){const l=t.reduce((e,t)=>t(e),e());return r=(e=>({cache:j(e.cacheSize),parseClassName:E(e),sortModifiers:O(e),...k(e)}))(l),o=r.cache.get,a=r.cache.set,n=s,s(i)};function s(e){const t=o(e);if(t)return t;const n=((e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:a,sortModifiers:n}=t,s=[],i=e.trim().split(D);let l="";for(let d=i.length-1;d>=0;d-=1){const e=i[d],{isExternal:t,modifiers:c,hasImportantModifier:u,baseClassName:m,maybePostfixModifierPosition:f}=r(e);if(t){l=e+(l.length>0?" "+l:l);continue}let p=!!f,b=o(p?m.substring(0,f):m);if(!b){if(!p){l=e+(l.length>0?" "+l:l);continue}if(b=o(m),!b){l=e+(l.length>0?" "+l:l);continue}p=!1}const h=n(c).join(":"),g=u?h+"!":h,v=g+b;if(s.includes(v))continue;s.push(v);const x=a(b,p);for(let r=0;r<x.length;++r){const e=x[r];s.push(g+e)}l=e+(l.length>0?" "+l:l)}return l})(e,r);return a(e,n),n}return function(){return n(P.apply(null,arguments))}}const W=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},q=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,T=/^\d+\/\d+$/,F=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,V=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,G=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,B=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,H=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,X=e=>T.test(e),Y=e=>!!e&&!Number.isNaN(Number(e)),U=e=>!!e&&Number.isInteger(Number(e)),K=e=>e.endsWith("%")&&Y(e.slice(0,-1)),Z=e=>F.test(e),J=()=>!0,Q=e=>V.test(e)&&!G.test(e),ee=()=>!1,te=e=>B.test(e),re=e=>H.test(e),oe=e=>!ne(e)&&!ue(e),ae=e=>ve(e,ke,ee),ne=e=>q.test(e),se=e=>ve(e,Ne,Q),ie=e=>ve(e,Ce,Y),le=e=>ve(e,we,ee),de=e=>ve(e,ye,re),ce=e=>ve(e,Ie,te),ue=e=>$.test(e),me=e=>xe(e,Ne),fe=e=>xe(e,ze),pe=e=>xe(e,we),be=e=>xe(e,ke),he=e=>xe(e,ye),ge=e=>xe(e,Ie,!0),ve=(e,t,r)=>{const o=q.exec(e);return!!o&&(o[1]?t(o[1]):r(o[2]))},xe=(e,t,r=!1)=>{const o=$.exec(e);return!!o&&(o[1]?t(o[1]):r)},we=e=>"position"===e||"percentage"===e,ye=e=>"image"===e||"url"===e,ke=e=>"length"===e||"size"===e||"bg-size"===e,Ne=e=>"length"===e,Ce=e=>"number"===e,ze=e=>"family-name"===e,Ie=e=>"shadow"===e,Se=_(()=>{const e=W("color"),t=W("font"),r=W("text"),o=W("font-weight"),a=W("tracking"),n=W("leading"),s=W("breakpoint"),i=W("container"),l=W("spacing"),d=W("radius"),c=W("shadow"),u=W("inset-shadow"),m=W("text-shadow"),f=W("drop-shadow"),p=W("blur"),b=W("perspective"),h=W("aspect"),g=W("ease"),v=W("animate"),x=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",ue,ne],w=()=>[ue,ne,l],y=()=>[X,"full","auto",...w()],k=()=>[U,"none","subgrid",ue,ne],N=()=>["auto",{span:["full",U,ue,ne]},U,ue,ne],C=()=>[U,"auto",ue,ne],z=()=>["auto","min","max","fr",ue,ne],I=()=>["auto",...w()],S=()=>[X,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],M=()=>[e,ue,ne],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",pe,le,{position:[ue,ne]}],j=()=>["auto","cover","contain",be,ae,{size:[ue,ne]}],E=()=>[K,me,se],L=()=>["","none","full",d,ue,ne],O=()=>["",Y,me,se],D=()=>[Y,K,pe,le],P=()=>["","none",p,ue,ne],A=()=>["none",Y,ue,ne],_=()=>["none",Y,ue,ne],q=()=>[Y,ue,ne],$=()=>[X,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Z],breakpoint:[Z],color:[J],container:[Z],"drop-shadow":[Z],ease:["in","out","in-out"],font:[oe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Z],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Z],shadow:[Z],spacing:["px",Y],text:[Z],"text-shadow":[Z],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",X,ne,ue,h]}],container:["container"],columns:[{columns:[Y,ne,ue,i]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:x()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:y()}],"inset-x":[{"inset-x":y()}],"inset-y":[{"inset-y":y()}],start:[{start:y()}],end:[{end:y()}],top:[{top:y()}],right:[{right:y()}],bottom:[{bottom:y()}],left:[{left:y()}],visibility:["visible","invisible","collapse"],z:[{z:[U,"auto",ue,ne]}],basis:[{basis:[X,"full","auto",i,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Y,X,"auto","initial","none",ne]}],grow:[{grow:["",Y,ue,ne]}],shrink:[{shrink:["",Y,ue,ne]}],order:[{order:[U,"first","last","none",ue,ne]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:S()}],w:[{w:[i,"screen",...S()]}],"min-w":[{"min-w":[i,"screen","none",...S()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...S()]}],h:[{h:["screen","lh",...S()]}],"min-h":[{"min-h":["screen","lh","none",...S()]}],"max-h":[{"max-h":["screen","lh",...S()]}],"font-size":[{text:["base",r,me,se]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,ue,ie]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",K,ne]}],"font-family":[{font:[fe,ne,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,ue,ne]}],"line-clamp":[{"line-clamp":[Y,"none",ue,ie]}],leading:[{leading:[n,...w()]}],"list-image":[{"list-image":["none",ue,ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ue,ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[Y,"from-font","auto",ue,se]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[Y,"auto",ue,ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ue,ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ue,ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:R()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:j()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},U,ue,ne],radial:["",ue,ne],conic:[U,ue,ne]},he,de]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:E()}],"gradient-via-pos":[{via:E()}],"gradient-to-pos":[{to:E()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:O()}],"border-w-x":[{"border-x":O()}],"border-w-y":[{"border-y":O()}],"border-w-s":[{"border-s":O()}],"border-w-e":[{"border-e":O()}],"border-w-t":[{"border-t":O()}],"border-w-r":[{"border-r":O()}],"border-w-b":[{"border-b":O()}],"border-w-l":[{"border-l":O()}],"divide-x":[{"divide-x":O()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":O()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[Y,ue,ne]}],"outline-w":[{outline:["",Y,me,se]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",c,ge,ce]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",u,ge,ce]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[Y,se]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":O()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",m,ge,ce]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[Y,ue,ne]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Y]}],"mask-image-linear-from-pos":[{"mask-linear-from":D()}],"mask-image-linear-to-pos":[{"mask-linear-to":D()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":D()}],"mask-image-t-to-pos":[{"mask-t-to":D()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":D()}],"mask-image-r-to-pos":[{"mask-r-to":D()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":D()}],"mask-image-b-to-pos":[{"mask-b-to":D()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":D()}],"mask-image-l-to-pos":[{"mask-l-to":D()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":D()}],"mask-image-x-to-pos":[{"mask-x-to":D()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":D()}],"mask-image-y-to-pos":[{"mask-y-to":D()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[ue,ne]}],"mask-image-radial-from-pos":[{"mask-radial-from":D()}],"mask-image-radial-to-pos":[{"mask-radial-to":D()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[Y]}],"mask-image-conic-from-pos":[{"mask-conic-from":D()}],"mask-image-conic-to-pos":[{"mask-conic-to":D()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:R()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:j()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ue,ne]}],filter:[{filter:["","none",ue,ne]}],blur:[{blur:P()}],brightness:[{brightness:[Y,ue,ne]}],contrast:[{contrast:[Y,ue,ne]}],"drop-shadow":[{"drop-shadow":["","none",f,ge,ce]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",Y,ue,ne]}],"hue-rotate":[{"hue-rotate":[Y,ue,ne]}],invert:[{invert:["",Y,ue,ne]}],saturate:[{saturate:[Y,ue,ne]}],sepia:[{sepia:["",Y,ue,ne]}],"backdrop-filter":[{"backdrop-filter":["","none",ue,ne]}],"backdrop-blur":[{"backdrop-blur":P()}],"backdrop-brightness":[{"backdrop-brightness":[Y,ue,ne]}],"backdrop-contrast":[{"backdrop-contrast":[Y,ue,ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Y,ue,ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Y,ue,ne]}],"backdrop-invert":[{"backdrop-invert":["",Y,ue,ne]}],"backdrop-opacity":[{"backdrop-opacity":[Y,ue,ne]}],"backdrop-saturate":[{"backdrop-saturate":[Y,ue,ne]}],"backdrop-sepia":[{"backdrop-sepia":["",Y,ue,ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ue,ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Y,"initial",ue,ne]}],ease:[{ease:["linear","initial",g,ue,ne]}],delay:[{delay:[Y,ue,ne]}],animate:[{animate:["none",v,ue,ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,ue,ne]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:A()}],"rotate-x":[{"rotate-x":A()}],"rotate-y":[{"rotate-y":A()}],"rotate-z":[{"rotate-z":A()}],scale:[{scale:_()}],"scale-x":[{"scale-x":_()}],"scale-y":[{"scale-y":_()}],"scale-z":[{"scale-z":_()}],"scale-3d":["scale-3d"],skew:[{skew:q()}],"skew-x":[{"skew-x":q()}],"skew-y":[{"skew-y":q()}],transform:[{transform:[ue,ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:$()}],"translate-x":[{"translate-x":$()}],"translate-y":[{"translate-y":$()}],"translate-z":[{"translate-z":$()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ue,ne]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ue,ne]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[Y,me,se,ie]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Me(...e){return Se(y(e))}function Re(e){return function(e){return!!(e&&"object"==typeof e&&"value"in e&&"peek"in e&&"function"==typeof e.peek&&"subscribe"in e&&"function"==typeof e.subscribe)}(e)?e.value:e}const je=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Ee=y,Le=(e,t)=>r=>{var o;if(null==(null==t?void 0:t.variants))return Ee(e,null==r?void 0:r.class,null==r?void 0:r.className);const{variants:a,defaultVariants:n}=t,s=Object.keys(a).map(e=>{const t=null==r?void 0:r[e],o=null==n?void 0:n[e];if(null===t)return null;const s=je(t)||je(o);return a[e][s]}),i=r&&Object.entries(r).reduce((e,t)=>{let[r,o]=t;return void 0===o||(e[r]=o),e},{}),l=null==t||null===(o=t.compoundVariants)||void 0===o?void 0:o.reduce((e,t)=>{let{class:r,className:o,...a}=t;return Object.entries(a).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...n,...i}[t]):{...n,...i}[t]===r})?[...e,r,o]:e},[]);return Ee(e,s,l,null==r?void 0:r.class,null==r?void 0:r.className)},Oe=Le("relative flex shrink-0 overflow-hidden",{variants:{size:{sm:"w-6 h-6 text-xs",md:"w-8 h-8 text-sm",lg:"w-12 h-12 text-base"},shape:{circle:"rounded-full",square:"rounded-md"}},defaultVariants:{size:"md",shape:"circle"}}),De=t.forwardRef(({children:e,className:r,size:o,shape:a,...n},s)=>{const[l,c]=t.useState("idle"),u=t.useCallback(e=>{c(e)},[]),m=t.useMemo(()=>({imageLoadingStatus:l,onImageLoadingStatusChange:u}),[l,u]);return i(d,{value:m,children:i("span",{ref:s,className:Me(Oe({size:o,shape:a}),r),...n,children:e})})});De.displayName="AvatarRoot";const Pe=t.forwardRef(({src:e,alt:r,className:o,onLoadingStatusChange:a,...n},s)=>{const{imageLoadingStatus:l,onImageLoadingStatusChange:d}=c(),[u,m]=t.useState(!1);return t.useEffect(()=>{if(m(!1),!e)return;d("loading"),a?.("loading");const t=new Image,r=()=>{d("loaded"),a?.("loaded")},o=()=>{m(!0),d("error"),a?.("error")};return t.addEventListener("load",r),t.addEventListener("error",o),t.src=e,()=>{t.removeEventListener("load",r),t.removeEventListener("error",o)}},[e,d,a]),!e||u||"error"===l?null:i("img",{ref:s,src:e,alt:r,className:Me("aspect-square h-full w-full object-cover",o),...n})});Pe.displayName="AvatarImage";const Ae=t.forwardRef(({children:e,className:r,delayMs:o=0,...a},n)=>{const{imageLoadingStatus:s}=c(),[l,d]=t.useState(0===o);t.useEffect(()=>{if(0===o)return;const e=setTimeout(()=>{d(!0)},o);return()=>{clearTimeout(e)}},[o]);return l&&("idle"===s||"error"===s)?i("span",{ref:n,className:Me("flex h-full w-full items-center justify-center","bg-surface-secondary text-alt font-medium uppercase cursor-default",r),...a,children:e}):null});Ae.displayName="AvatarFallback";const _e=Object.assign(De,{Root:De,Image:Pe,Fallback:Ae}),We=Le(["inline-flex items-center justify-center","text-main font-medium","box-border rounded-sm transition-highlight","focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-0","disabled:select-none disabled:pointer-events-none disabled:opacity-30","overflow-hidden text-ellipsis whitespace-nowrap cursor-pointer"],{variants:{variant:{text:"bg-btn-primary hover:bg-btn-primary-hover active:bg-btn-active active:text-rev dark:active:text-main",filled:"bg-btn-secondary hover:bg-btn-secondary-hover active:bg-btn-active active:text-rev dark:active:text-main",solid:"bg-btn-tertiary text-alt hover:bg-btn-tertiary-hover active:bg-btn-active dark:active:text-main",outline:"bg-btn-primary hover:bg-btn-primary-hover active:bg-btn-active active:text-rev dark:active:text-main border border-bdr-strong"},size:{sm:"h-9 px-3.5 gap-2 text-sm",md:"h-10 px-3.5 gap-2.5 text-base",lg:"h-11.5 px-4 gap-3 text-lg"}},defaultVariants:{variant:"text",size:"md"}}),qe=t.forwardRef(({className:e,variant:t="text",size:r="md",iconSize:o,iconStrokeWidth:a=1.5,startIcon:n,label:s,endIcon:l,title:d,children:c,...u},m)=>{const f=n,p=l,b=o??(e=>{switch(e){case"sm":return 16;case"md":return 18;case"lg":return 20}})(r??"md");return i("button",{ref:m,type:"button",className:Me(We({variant:t,size:r}),e),title:d,"aria-label":d??s,"aria-disabled":u.disabled,...u,children:[f&&i(f,{size:b,strokeWidth:a}),c,s,p&&i(p,{size:b,strokeWidth:a})]})});qe.displayName="Button";
|
|
2
2
|
/**
|
|
3
3
|
* @license lucide-react v0.545.0 - ISC
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the ISC license.
|
|
6
6
|
* See the LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
|
+
const $e=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},Te=(...e)=>e.filter((e,t,r)=>Boolean(e)&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),Fe=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};
|
|
8
9
|
/**
|
|
9
10
|
* @license lucide-react v0.545.0 - ISC
|
|
10
11
|
*
|
|
11
12
|
* This source code is licensed under the ISC license.
|
|
12
13
|
* See the LICENSE file in the root directory of this source tree.
|
|
13
14
|
*/
|
|
14
|
-
var
|
|
15
|
+
var Ve={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
|
|
15
16
|
/**
|
|
16
17
|
* @license lucide-react v0.545.0 - ISC
|
|
17
18
|
*
|
|
18
19
|
* This source code is licensed under the ISC license.
|
|
19
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/const
|
|
21
|
+
*/const Ge=t.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:n="",children:s,iconNode:i,...l},d)=>t.createElement("svg",{ref:d,...Ve,width:r,height:r,stroke:e,strokeWidth:a?24*Number(o)/Number(r):o,className:Te("lucide",n),...!s&&!Fe(l)&&{"aria-hidden":"true"},...l},[...i.map(([e,r])=>t.createElement(e,r)),...Array.isArray(s)?s:[s]])),Be=(e,r)=>{const o=t.forwardRef(({className:o,...a},n)=>{return t.createElement(Ge,{ref:n,iconNode:r,className:Te(`lucide-${s=$e(e),s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,o),...a});var s});return o.displayName=$e(e),o},He=Be("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),Xe=Be("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Ye=Be("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),Ue=Be("lock-keyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]),Ke=Be("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),Ze=Be("octagon-alert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]),Je=Be("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),Qe=Be("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),et=Le(["inline-block","flex-shrink-0 flex items-center justify-center","h-3.5 w-3.5","border-[1.5px] rounded-xs","bg-transparent","transition-highlight"],{variants:{editable:{true:["peer-focus-visible:outline-none peer-focus-visible:ring-3 peer-focus-visible:ring-ring/50 peer-focus-visible:ring-offset-0","peer-hover:outline-none peer-hover:ring-3 peer-hover:ring-ring/50 peer-hover:ring-offset-0"],false:"opacity-30"},state:{default:["border-main","peer-checked:bg-main peer-checked:border-main","peer-indeterminate:bg-main peer-indeterminate:border-main","group-data-[tone=inverse]:border-alt","group-data-[tone=inverse]:peer-checked:bg-alt","group-data-[tone=inverse]:peer-checked:border-alt","group-data-[tone=inverse]:peer-indeterminate:bg-alt","group-data-[tone=inverse]:peer-indeterminate:border-alt"],error:["border-error","peer-checked:bg-error peer-checked:border-error","peer-indeterminate:bg-error peer-indeterminate:border-error","peer-focus-visible:border-error peer-focus-visible:ring-error/50","peer-hover:border-error peer-hover:ring-error/50"]}},defaultVariants:{state:"default",editable:!0}}),tt=t.forwardRef(({id:e,className:r,name:o,label:a,defaultChecked:n=!1,checked:s,align:l="left",error:d,disabled:c,readOnly:u,required:m,value:f="on",onCheckedChange:p,errorMessage:b,...g},v)=>{const x=h(Re(e)),w=d?"error":"default",y=!c&&!u,[k,N]=t.useState(n),C=void 0!==s,z=C?s:k,I="indeterminate"===z,S=!0===z;return i("div",{children:[i("label",{htmlFor:x,className:Me("relative flex items-center select-none gap-2","right"===l&&"flex-row-reverse justify-end",y?"cursor-pointer":"cursor-default",r),children:[i("input",{ref:e=>{"function"==typeof v?v(e):v&&(v.current=e),e&&(e.indeterminate=I)},...g,id:x,type:"checkbox",className:"peer sr-only",checked:S,disabled:u??c,required:m,name:o,value:f,"aria-checked":I?"mixed":S,"aria-disabled":c,"aria-invalid":d,"aria-readonly":u,"data-state":I?"indeterminate":S?"checked":"unchecked","data-disabled":c?"":void 0,onChange:e=>{if(!y)return;let t;t=!I&&e.currentTarget.checked,C||N(t),p?.(t)}}),i("span",{className:Me(et({state:w,editable:y})),"aria-hidden":"true",children:I?i(Ke,{size:10,className:Me("text-rev",!d&&"group-data-[tone=inverse]:text-alt-rev"),strokeWidth:4}):S?i(Xe,{size:10,className:Me("text-rev",!d&&"group-data-[tone=inverse]:text-alt-rev"),strokeWidth:4}):null}),a&&i("span",{className:Me("text-main group-data-[tone=inverse]:text-alt",c&&"opacity-30"),children:a})]}),"error"===w&&b&&i("div",{className:Me("flex items-center gap-2 mt-1 text-error leading-5",c&&"opacity-30"),children:[i(Ze,{size:14,strokeWidth:2.5}),b]})]})});
|
|
21
22
|
/**
|
|
22
23
|
* @license lucide-react v0.545.0 - ISC
|
|
23
24
|
*
|
|
24
25
|
* This source code is licensed under the ISC license.
|
|
25
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/qe.displayName="Checkbox";const Ge=ve(["p-0"],{variants:{size:{sm:"h-9 w-9",md:"h-10 w-10",lg:"h-11.5 w-11.5"},shape:{square:"rounded-sm",round:"rounded-full"}},defaultVariants:{size:"md",shape:"square"}}),De=r.forwardRef(({className:e,variant:r="text",size:t="md",shape:o="square",icon:n,...i},s)=>a(we,{ref:s,className:fe(Ge({size:t,shape:o}),e),variant:r,size:t,startIcon:n,label:"",...i}));De.displayName="IconButton";const Ve=ve(["relative flex rounded-sm overflow-hidden","h-12 border focus-within:border-bdr-solid","focus-within:outline-none focus-within:ring-3 focus-within:ring-ring/50 focus-within:ring-offset-0","transition-highlight"],{variants:{state:{default:"border-bdr-subtle focus-within:border-bdr-strong",error:"border-error focus-within:border-error focus-within:ring-error/50"},disabled:{true:"select-none"}},defaultVariants:{state:"default",disabled:!1}}),Be=({children:e,error:r})=>a("div",{className:fe("flex items-center justify-center shrink-0 min-w-12 px-4","text-sm text-subtle bg-surface-primary","first:rounded-l-sm first:border-r first:border-bdr-subtle","last:rounded-r-sm last:border-l last:border-bdr-subtle",r&&"first:border-error last:border-error"),children:e}),Te=r.forwardRef(({className:e,label:r,description:t,error:o,startAddon:n,endAddon:i,id:s,disabled:l,readOnly:d,...c},u)=>{const m=Ne(be(s)),p=o?"error":"default",f="error"===p;return a("div",{className:fe("w-full",l&&"opacity-30",e),children:[a("div",{className:"mb-2",children:[r&&a("label",{htmlFor:m,className:fe("block text-base font-semibold text-main",l&&"opacity-30"),children:a("div",{className:"flex items-center gap-2",children:[d&&a(Pe,{size:16,strokeWidth:2.5}),r]})}),t&&a("div",{className:fe("text-sm text-subtle",l&&"opacity-30"),children:t})]}),a("div",{className:fe(Ve({state:p,disabled:l})),children:[n&&a(Be,{error:f,children:n}),a("input",{ref:u,id:m,className:fe("flex-1 w-full px-4.5 text-base","text-main bg-surface-neutral placeholder:text-subtle","border-0 focus:outline-none","disabled:select-none read-only:bg-surface-primary",n&&"rounded-l-none",i&&"rounded-r-none"),disabled:l,readOnly:d,...c}),i&&a(Be,{error:f,children:i})]}),o&&a("div",{className:"flex items-center gap-2 mt-2 leading-5 text-error",children:[a(We,{size:16,strokeWidth:2.5}),o]})]})});function Fe(e,r,t=!1){return"function"==typeof e?e:!0===e||void 0===e&&t?r:void 0}Te.displayName="Input";const Xe=r.forwardRef(({className:e,href:r,external:t="auto",newTab:o,leftIcon:n,rightIcon:i,children:s,rel:l,...d},c)=>{const u="auto"===t?function(e){try{if(e.startsWith("mailto:")||e.startsWith("tel:"))return!0;const r="undefined"!=typeof window?window.location:void 0;return!r||new URL(e,r.origin).origin!==r.origin}catch{return!0}}(r):t,m=o??u?"_blank":void 0,p=Fe(n,Re),f=Fe(i,Ee,u);return a("a",{ref:c,href:r,className:fe("inline-flex items-center align-baseline gap-1","text-sm font-normal underline underline-offset-3 decoration-1","visited:text-link-visited hover:text-main-hover",e),target:m,rel:o||u?"noopener noreferrer":"noreferrer",...d,children:[p&&a(p,{className:"inline-block flex-none w-3.5 h-3.5",strokeWidth:1.5,"aria-hidden":"true"}),s,f&&a(f,{className:"inline-block flex-none w-3.5 h-3.5",strokeWidth:1.5,"aria-hidden":"true"})]})});function Ye(e,t){return r.Children.toArray(e).find(e=>function(e,t){return r.isValidElement(e)&&e.type===t}(e,t))}Xe.displayName="Link";const He=({children:e,className:r,...t})=>a("div",{className:fe("flex items-center gap-2.5 flex-shrink-0",r),...t,children:e}),Ue=({className:e,children:r,...t})=>a("div",{className:fe("flex-1 min-w-0",e),...t,children:r});Ue.displayName="ListItem.Content";const Ze=({className:e,label:r,description:t,metadata:o,icon:n})=>a(Ue,{className:fe(n&&"grid grid-cols-[auto_1fr] gap-2.5 items-center",e),children:[n&&a("div",{className:"flex items-center justify-center flex-shrink-0 group-data-[tone=inverse]:text-alt",children:n}),a("div",{className:"min-w-0 text-left",children:[r&&a("h1",{className:"truncate font-semibold group-data-[tone=inverse]:text-alt",children:r}),t&&a("p",{className:"truncate text-sm text-subtle group-data-[tone=inverse]:text-alt",children:t}),o&&a("p",{className:"text-xs text-subtle group-data-[tone=inverse]:text-alt",children:o})]})]}),Ke=({children:e,className:r,...t})=>a("div",{className:fe("flex items-center gap-5 flex-shrink-0",r),...t,children:e});Ke.displayName="ListItem.Right";const Je=({children:e,className:r,selected:t,...o})=>{const n=Ye(e,He),i=Ye(e,Ue)??Ye(e,Ze),s=Ye(e,Ke);return a("div",{className:fe("group flex items-center px-2.5 py-1 gap-2.5",t&&"bg-surface-primary-selected text-alt",r),"data-tone":t&&"inverse",role:"listitem",...o,children:[n,i,s]})};Je.displayName="ListItem";const Qe=Object.assign(Je,{Left:He,Content:Ue,DefaultContent:Ze,Right:Ke}),er=({className:e,selected:r,children:t,label:o,description:n,metadata:i,icon:s,readOnly:l,checked:d,defaultChecked:c,onCheckedChange:u,...m})=>a(Qe,{className:fe(!r&&"hover:bg-surface-primary-hover",e),selected:r,role:"row","aria-selected":r,...m,children:[a(Qe.Left,{children:a(qe,{checked:d,defaultChecked:c,onCheckedChange:u,readOnly:l})}),a(Qe.DefaultContent,{label:o,description:n,metadata:i,icon:s}),a(Qe.Right,{children:t})]});er.displayName="SelectableListItem";const rr={top:"bottom",bottom:"top",left:"right",right:"left"};function tr({children:e,asChild:r,triggerRef:o,isOpen:n,onMouseEnter:i,onMouseLeave:s,onFocus:l,onBlur:d}){return a(r?t.Root:"div",{ref:o,className:r?void 0:"inline-flex",onMouseEnter:i,onMouseLeave:s,onFocus:l,onBlur:d,"aria-describedby":n?"tooltip":void 0,role:r?void 0:"button",tabIndex:r?void 0:0,children:e})}function or({children:e,actualSide:r,className:t,position:o,tooltipRef:n}){return a("div",{ref:n,role:"tooltip",className:fe("fixed z-50 pointer-events-none select-none",!o.transformOrigin&&"opacity-0"),style:{top:`${o.top}px`,left:`${o.left}px`,transformOrigin:o.transformOrigin},children:a("div",{className:fe("relative w-fit rounded-xs px-2 py-1 text-xs","bg-tooltip text-tooltip-foreground shadow-md","animate-in fade-in-0 zoom-in-95","top"===r&&"slide-in-from-top-2","bottom"===r&&"slide-in-from-bottom-2","left"===r&&"slide-in-from-left-2","right"===r&&"slide-in-from-right-2",t),children:[e,a("div",{className:fe("absolute size-2 rotate-45","top"===r&&"bottom-0 left-1/2 -translate-x-1/2 translate-y-1/2","bottom"===r&&"top-0 left-1/2 -translate-x-1/2 -translate-y-1/2","left"===r&&"right-0 top-1/2 -translate-y-1/2 translate-x-1/2","right"===r&&"left-0 top-1/2 -translate-y-1/2 -translate-x-1/2"),style:{backgroundColor:"inherit"}})]})})}const nr=r.createContext(void 0),ar=({value:e,children:r})=>a(nr.Provider,{value:e,children:r});ar.displayName="DialogProvider";function ir(...e){return r.useCallback(r=>{e.forEach(e=>function(e,r){if(e)if("function"==typeof e)e(r);else try{e.current=r}catch{}}(e,r))},e)}const sr=r.forwardRef(({className:e,id:t,value:n,defaultValue:i="",placeholder:s="Search",clearLabel:l="Clear",onChange:d,disabled:c,readOnly:u,...m},p)=>{const f=Ne(be(t)),[b,h]=o.useState(i),g=void 0!==n,v=g?n:b,x=v.length>0&&!c&&!u,w=r.useRef(null);return a("div",{className:fe("relative flex rounded-sm overflow-hidden","h-12 border border-bdr-subtle focus-within:border-bdr-strong","focus-within:outline-none focus-within:ring-3 focus-within:ring-ring/50 focus-within:ring-offset-0","transition-highlight",c&&"pointer-events-none select-none opacity-30",e),children:[a($e,{className:"absolute left-4.5 top-1/2 -translate-y-1/2 mt-0.25 text-subtle pointer-events-none",size:20,strokeWidth:1.5}),a("input",{ref:ir(p,w),id:f,className:fe("w-full text-base pr-1 px-12 border-0","text-main bg-surface-neutral","placeholder:text-subtle","focus:outline-none","read-only:bg-surface-primary"),value:v,onChange:e=>{const r=e.currentTarget.value;g||h(r),d?.(r)},readOnly:u,disabled:c,placeholder:s,"aria-label":"Search","aria-disabled":c,...m}),x&&a(De,{className:"absolute right-3 top-1/2 -translate-y-1/2 w-8 h-8 text-subtle",size:"lg",icon:Le,title:l,onClick:()=>{g||h(""),d?.(""),w.current?.focus()},disabled:c})]})});sr.displayName="SearchInput";const lr=r.forwardRef(function({className:e,selection:t,selectionMode:o="single",disabled:n=!1,defaultSelection:i=new Set,setSelection:s,active:l,defaultActive:d,onActiveChange:c,items:u,renderItem:m,getValue:p,...f},b){const h=Ne(),g=r.useRef(null),[v,x]=r.useState(i),w=void 0!==t,k=w?t:v,[y,N]=r.useState(d??(u[0]?p(u[0]):void 0)),z=void 0!==l,C=z?l:y,M=r.useMemo(()=>new Map(u.map((e,r)=>[p(e),r])),[u,p]),I=r.useCallback(e=>{z||N(e),c?.(e)},[z,c]);r.useEffect(()=>{C&&u.some(e=>p(e)===C)||I(u[0]?p(u[0]):void 0)},[u,p,C,I]),r.useEffect(()=>{if(!C||!g.current)return;const e=g.current.querySelector(`#${h}-option-${C}`);e?.scrollIntoView({block:"nearest",behavior:"auto"})},[C,h]);const j=e=>{const r=k.has(e);let t;"single"===o?t=r?new Set:new Set([e]):(t=new Set(k),r?t.delete(e):t.add(e)),w||x(t),s?.(t),I(e)},S=e=>{const r=C?M.get(C)??0:0,t=Math.max(0,Math.min(u.length-1,r+e));I(p(u[t]))};return a("ul",{id:h,ref:ir(b,g),tabIndex:n?-1:0,className:fe("flex flex-col items-start grow-1 shrink-0 basis-0","max-h-100 px-0 overflow-y-auto","focus-within:border-bdr-solid focus-within:outline-none focus-within:ring-3 focus-within:ring-ring/50 focus-within:ring-offset-0","focus-within:[&>li[data-active=true]]:bg-surface-primary-hover","focus-within:[&>li[data-active=true][aria-selected=true]]:bg-surface-primary-selected-hover","transition-highlight",n&&"pointer-events-none select-none opacity-30",e),role:"listbox","aria-activedescendant":C?`${h}-option-${C}`:void 0,"aria-disabled":n,"aria-multiselectable":"multiple"===o,"aria-label":f.label??void 0,"aria-orientation":"vertical",onKeyDown:e=>{if(!n)if("ArrowDown"===e.key)e.preventDefault(),S(1);else if("ArrowUp"===e.key)e.preventDefault(),S(-1);else if("Home"===e.key){e.preventDefault();const r=u[0];I(r&&p(r))}else if("End"===e.key){e.preventDefault();const r=u.at(-1);I(r&&p(r))}else" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),C&&j(C))},onClick:({target:e})=>{const r=e instanceof Element?e.closest("li"):null,t=r?.getAttribute("data-value");t&&j(t)},children:u.map(e=>{const r=p(e),t=k.has(r),o=r===C;return a("li",{id:`${h}-option-${r}`,"data-value":r,"data-active":o?"true":"false",tabIndex:-1,className:fe("flex items-center w-full px-4.5 py-1 gap-x-2.5",!n&&"cursor-pointer",t?"bg-surface-primary-selected text-alt hover:bg-surface-primary-selected-hover":"hover:bg-surface-primary-hover"),role:"option","aria-selected":t,children:m(e,t,o)},r)})})});lr.displayName="Listbox";exports.Button=we,exports.Checkbox=qe,exports.DialogProvider=ar,exports.IconButton=De,exports.IdProvider=ye,exports.Input=Te,exports.Link=Xe,exports.ListItem=Qe,exports.Listbox=lr,exports.SearchInput=sr,exports.SelectableListItem=er,exports.Tooltip=function({className:t,children:o,value:n,side:i="bottom",asChild:s=!0,delay:l=0}){const[d,c]=r.useState(!1),u=r.useRef(null),m=r.useRef(null),p=r.useRef(),f=null!=n&&""!==n,b=function(e,t,o,n){const[a,i]=r.useState({top:0,left:0,transformOrigin:"",actualSide:t});return r.useEffect(()=>{if(!e||!o.current||!n.current)return;const r=o.current.getBoundingClientRect(),a=n.current.getBoundingClientRect(),s=e=>{let t=0,o=0,n="";switch(e){case"top":t=r.top+window.scrollY-a.height-8,o=r.left+window.scrollX+(r.width-a.width)/2,n="bottom center";break;case"bottom":t=r.bottom+window.scrollY+8,o=r.left+window.scrollX+(r.width-a.width)/2,n="top center";break;case"left":t=r.top+window.scrollY+(r.height-a.height)/2,o=r.left+window.scrollX-a.width-8,n="center right";break;case"right":t=r.top+window.scrollY+(r.height-a.height)/2,o=r.right+window.scrollX+8,n="center left"}return{top:t,left:o,transformOrigin:n,actualSide:e}},l=({top:e,left:r})=>{const t=window.scrollY+8,o=window.scrollY+window.innerHeight-a.height-8,n=window.scrollX+8,i=window.scrollX+window.innerWidth-a.width-8;return e>=t&&e<=o&&r>=n&&r<=i};let d=s(t);if(!l(d)){const e=s(rr[t]);l(e)&&(d=e)}i(d)},[e,t]),a}(d&&f,i,u,m);r.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const h=r.useCallback(()=>{f&&(p.current&&clearTimeout(p.current),l>0?p.current=window.setTimeout(()=>c(!0),l):c(!0))},[l,f]),g=r.useCallback(()=>{p.current&&clearTimeout(p.current),c(!1)},[]),v=r.useCallback(()=>{f&&c(!0)},[f]),x=r.useCallback(()=>c(!1),[]);return a(e.Fragment,{children:[a(tr,{asChild:s,triggerRef:u,isOpen:d,onMouseEnter:h,onMouseLeave:g,onFocus:v,onBlur:x,children:o}),d&&f&&r.createPortal(a(or,{actualSide:b.actualSide,className:t,position:b,tooltipRef:m,children:n}),document.body)]})},exports.cn=fe,exports.unwrap=be,exports.useDialog=()=>{const e=r.useContext(nr);if(!e)throw new Error("useDialog must be used within a DialogProvider");return e},exports.usePrefixedId=Ne,exports.useScrollLock=(e,t)=>{r.useEffect(()=>{if(!e)return;const r=t??document.body,o=r.style.overflow;return r.style.overflow="hidden",()=>{r.style.overflow=o}},[e,t])};
|
|
27
|
+
*/tt.displayName="Checkbox";const rt=Le(["p-0"],{variants:{size:{sm:"h-9 w-9",md:"h-10 w-10",lg:"h-11.5 w-11.5"},shape:{square:"rounded-sm",round:"rounded-full"}},defaultVariants:{size:"md",shape:"square"}}),ot=t.forwardRef(({className:e,variant:t="text",size:r="md",shape:o="square",icon:a,...n},s)=>i(qe,{ref:s,className:Me(rt({size:r,shape:o}),e),variant:t,size:r,startIcon:a,label:"",...n}));ot.displayName="IconButton";const at=(e,r)=>{t.useEffect(()=>{if(!e)return;const t=r??document.body,o=t.style.overflow;return t.style.overflow="hidden",()=>{t.style.overflow=o}},[e,r])},nt=({open:e,defaultOpen:r=!1,onOpenChange:o,children:a})=>{const n=void 0!==e,[s,l]=t.useState(r),d=n?e:s,c=t.useCallback(e=>{n||l(e),o?.(e)},[n,o]),u=t.useMemo(()=>({open:d,setOpen:c}),[d,c]);return i(m,{value:u,children:a})};nt.displayName="Dialog.Root";const st=t.forwardRef(({children:e,onClick:t,...r},o)=>{const{setOpen:a}=f();return i("button",{ref:o,type:"button",onClick:e=>{t?.(e),a(!0)},...r,children:e})});st.displayName="Dialog.Trigger";const it=({children:e,container:r,forceMount:o})=>{const{open:n}=f(),[s,i]=t.useState(!1);return t.useEffect(()=>{i(!0)},[]),s&&(o||n)?a.createPortal(e,r??document.body):null};it.displayName="Dialog.Portal";const lt=t.forwardRef(({className:e,forceMount:t,...r},o)=>{const{open:a}=f();return t||a?i("div",{ref:o,"data-state":a?"open":"closed",className:Me("fixed inset-0 z-30 bg-overlay backdrop-blur-xs","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...r}):null});lt.displayName="Dialog.Overlay";const dt=t.forwardRef(({children:e,className:r,forceMount:a,onEscapeKeyDown:n,onPointerDownOutside:s,onInteractOutside:l,onOpenAutoFocus:d,onCloseAutoFocus:c,...u},m)=>{const{open:p,setOpen:b}=f(),h=t.useRef(null),g=t.useId(),v=t.useId();t.useEffect(()=>{"function"==typeof m?m(h.current):m&&(m.current=h.current)},[m]),at(p);const x=t.useCallback(e=>{"Escape"===e.key&&(n?.(e),e.defaultPrevented||b(!1))},[n,b]);t.useEffect(()=>{if(p)return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[p,x]);const w=t.useCallback(e=>{const t=e.target;h.current&&!h.current.contains(t)&&(s?.(e),l?.(e),e.defaultPrevented||b(!1))},[s,l,b]);return t.useEffect(()=>{if(p)return document.addEventListener("pointerdown",w),()=>document.removeEventListener("pointerdown",w)},[p,w]),a||p?i(o.FocusTrap,{active:p,focusTrapOptions:{initialFocus:!1,fallbackFocus:()=>h.current??document.body,escapeDeactivates:!1,clickOutsideDeactivates:!1,returnFocusOnDeactivate:!0,allowOutsideClick:!0,preventScroll:!1,onActivate:()=>{requestAnimationFrame(()=>{const e=new Event("openautofocus");d?.(e),!e.defaultPrevented&&h.current&&h.current.focus()})},onDeactivate:()=>{requestAnimationFrame(()=>{const e=new Event("closeautofocus");c?.(e)})}},children:i("div",{className:"fixed inset-0 z-40 flex items-center justify-center p-4",children:i("div",{ref:h,role:"dialog","aria-modal":"true","aria-labelledby":g,"aria-describedby":v,"data-state":p?"open":"closed",tabIndex:-1,className:Me("relative rounded-lg shadow-xl bg-surface-neutral","flex flex-col max-w-lg w-full max-h-[90vh] gap-10 p-10","border border-bdr-subtle outline-none overflow-hidden","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",r),...u,children:e})})}):null});dt.displayName="Dialog.Content";const ct=t.forwardRef(({className:e,children:t,...r},o)=>i("header",{ref:o,className:Me("relative grid gap-2.5 self-stretch",e),...r,children:t}));ct.displayName="Dialog.Header";const ut=t.forwardRef(({children:e,asChild:o,onClick:a,...n},s)=>{const{setOpen:l}=f(),d=t.useCallback(e=>{a?.(e),e.defaultPrevented||l(!1)},[a,l]);return i(o?r.Slot:"button",{ref:s,type:o?void 0:"button",onClick:d,...n,children:e})});ut.displayName="Dialog.Close";const mt=t.forwardRef(({children:e,className:t,asChild:o,...a},n)=>i(o?r.Slot:"h2",{ref:n,className:Me("text-2xl font-semibold",t),...a,children:e}));mt.displayName="Dialog.Title";const ft=t.forwardRef(({children:e,className:t,asChild:o,...a},n)=>i(o?r.Slot:"p",{ref:n,className:Me("",t),...a,children:e}));ft.displayName="Dialog.Description";const pt=t.forwardRef(({className:e,children:t,...r},o)=>i("div",{ref:o,className:Me("min-h-0 flex-1 overflow-y-auto",e),...r,children:t}));pt.displayName="Dialog.Body";const bt=t.forwardRef(({className:e,children:t,...r},o)=>i("footer",{ref:o,className:Me("flex justify-end gap-2.5",e),...r,children:t}));bt.displayName="Dialog.Footer";const ht=t.forwardRef((e,t)=>i(ut,{asChild:!0,ref:t,...e,children:i(ot,{"aria-label":"Close","data-area":"close",icon:Qe,size:"lg",iconSize:36,iconStrokeWidth:1,shape:"round",variant:"filled"})}));ht.displayName="Dialog.DefaultClose";const gt=t.forwardRef(({title:e,description:t,withClose:r,className:o,children:a,...n},s)=>i(ct,{ref:s,className:Me(r&&"grid-cols-[minmax(0,1fr)_auto]",o),...n,children:[i(mt,{className:Me(r&&"col-start-1 row-start-1 min-w-0"),children:e}),r&&i(ht,{className:"col-start-2 row-start-1 row-span-2 self-start justify-self-end"}),t&&i(ft,{className:Me(r&&"row-start-2"),children:t}),a]}));gt.displayName="Dialog.DefaultHeader";const vt=Object.assign(nt,{Root:nt,Trigger:st,Portal:it,Overlay:lt,Content:dt,Header:ct,Close:ut,Title:mt,Description:ft,Body:pt,Footer:bt,DefaultClose:ht,DefaultHeader:gt}),xt=Le(["relative flex rounded-sm overflow-hidden","h-12 border focus-within:border-bdr-solid","focus-within:outline-none focus-within:ring-3 focus-within:ring-ring/50 focus-within:ring-offset-0","transition-highlight"],{variants:{state:{default:"border-bdr-subtle focus-within:border-bdr-strong",error:"border-error focus-within:border-error focus-within:ring-error/50"},disabled:{true:"select-none"}},defaultVariants:{state:"default",disabled:!1}}),wt=({children:e,error:t})=>i("div",{className:Me("flex items-center justify-center shrink-0 min-w-12 px-4","text-sm text-subtle bg-surface-primary","first:rounded-l-sm first:border-r first:border-bdr-subtle","last:rounded-r-sm last:border-l last:border-bdr-subtle",t&&"first:border-error last:border-error"),children:e}),yt=t.forwardRef(({className:e,label:t,description:r,error:o,startAddon:a,endAddon:n,id:s,disabled:l,readOnly:d,...c},u)=>{const m=h(Re(s)),f=o?"error":"default",p="error"===f;return i("div",{className:Me("w-full",l&&"opacity-30",e),children:[i("div",{className:"mb-2",children:[t&&i("label",{htmlFor:m,className:Me("block text-base font-semibold text-main",l&&"opacity-30"),children:i("div",{className:"flex items-center gap-2",children:[d&&i(Ue,{size:16,strokeWidth:2.5}),t]})}),r&&i("div",{className:Me("text-sm text-subtle",l&&"opacity-30"),children:r})]}),i("div",{className:Me(xt({state:f,disabled:l})),children:[a&&i(wt,{error:p,children:a}),i("input",{ref:u,id:m,className:Me("flex-1 w-full px-4.5 text-base","text-main bg-surface-neutral placeholder:text-subtle","border-0 focus:outline-none","disabled:select-none read-only:bg-surface-primary",a&&"rounded-l-none",n&&"rounded-r-none"),disabled:l,readOnly:d,...c}),n&&i(wt,{error:p,children:n})]}),o&&i("div",{className:"flex items-center gap-2 mt-2 leading-5 text-error",children:[i(Ze,{size:16,strokeWidth:2.5}),o]})]})});function kt(e,t,r=!1){return"function"==typeof e?e:!0===e||void 0===e&&r?t:void 0}yt.displayName="Input";const Nt=t.forwardRef(({className:e,href:t,external:r="auto",newTab:o,leftIcon:a,rightIcon:n,children:s,rel:l,...d},c)=>{const u="auto"===r?function(e){try{if(e.startsWith("mailto:")||e.startsWith("tel:"))return!0;const t="undefined"!=typeof window?window.location:void 0;return!t||new URL(e,t.origin).origin!==t.origin}catch{return!0}}(t):r,m=o??u?"_blank":void 0,f=kt(a,He),p=kt(n,Ye,u);return i("a",{ref:c,href:t,className:Me("inline-flex items-center align-baseline gap-1","text-sm font-normal underline underline-offset-3 decoration-1","visited:text-link-visited hover:text-main-hover",e),target:m,rel:o||u?"noopener noreferrer":"noreferrer",...d,children:[f&&i(f,{className:"inline-block flex-none w-3.5 h-3.5",strokeWidth:1.5,"aria-hidden":"true"}),s,p&&i(p,{className:"inline-block flex-none w-3.5 h-3.5",strokeWidth:1.5,"aria-hidden":"true"})]})});function Ct(e,r){return t.Children.toArray(e).find(e=>function(e,r){return t.isValidElement(e)&&e.type===r}(e,r))}Nt.displayName="Link";const zt=({children:e,className:t,...r})=>i("div",{className:Me("flex items-center gap-2.5 flex-shrink-0",t),...r,children:e}),It=({className:e,children:t,...r})=>i("div",{className:Me("flex-1 min-w-0",e),...r,children:t});It.displayName="ListItem.Content";const St=({className:e,label:t,description:r,metadata:o,icon:a})=>i(It,{className:Me(a&&"grid grid-cols-[auto_1fr] gap-2.5 items-center",e),children:[a&&i("div",{className:"flex items-center justify-center flex-shrink-0 group-data-[tone=inverse]:text-alt",children:a}),i("div",{className:"min-w-0 text-left",children:[t&&i("h1",{className:"truncate font-semibold group-data-[tone=inverse]:text-alt",children:t}),r&&i("p",{className:"truncate text-sm text-subtle group-data-[tone=inverse]:text-alt",children:r}),o&&i("p",{className:"text-xs text-subtle group-data-[tone=inverse]:text-alt",children:o})]})]}),Mt=({children:e,className:t,...r})=>i("div",{className:Me("flex items-center gap-5 flex-shrink-0",t),...r,children:e});Mt.displayName="ListItem.Right";const Rt=({children:e,className:t,selected:r,...o})=>{const a=Ct(e,zt),n=Ct(e,It)??Ct(e,St),s=Ct(e,Mt);return i("div",{className:Me("group flex items-center px-2.5 py-1 gap-2.5",r&&"bg-surface-primary-selected text-alt",t),"data-tone":r&&"inverse",role:"listitem",...o,children:[a,n,s]})};Rt.displayName="ListItem";const jt=Object.assign(Rt,{Left:zt,Content:It,DefaultContent:St,Right:Mt});function Et(...e){return t.useCallback(t=>{e.forEach(e=>function(e,t){if(e)if("function"==typeof e)e(t);else try{e.current=t}catch{}}(e,t))},e)}const Lt=[],Ot=Le("flex w-full items-center px-4.5 py-1 gap-x-2.5 cursor-pointer",{variants:{selected:{true:"bg-surface-primary-selected text-alt hover:bg-surface-primary-selected-hover",false:"hover:bg-surface-primary-hover"},active:{true:"bg-surface-primary-hover",false:""}},compoundVariants:[{selected:!0,active:!0,class:"bg-surface-primary-selected-hover"}],defaultVariants:{selected:!1,active:!1}}),Dt=({selection:e,defaultSelection:r=Lt,onSelectionChange:o,active:a,defaultActive:n,setActive:s,selectionMode:l="single",disabled:d,children:c})=>{const u=h(),[m,f]=t.useState(()=>new Set(r)),p=void 0!==e,b=t.useMemo(()=>p?new Set(e):m,[p,e,m]),[g,x]=t.useState(n),w=void 0!==a,y=w?a:g,k=t.useCallback(e=>{w||x(e),s?.(e)},[w,s]),N=t.useRef(new Set),C=t.useCallback(e=>{N.current.add(e)},[]),z=t.useCallback(e=>{N.current.delete(e)},[]),I=t.useCallback(()=>Array.from(N.current),[]),S=t.useCallback(e=>{const t=b.has(e),r=new Set(b);"single"===l?(r.clear(),t||r.add(e)):t?r.delete(e):r.add(e),p||f(r),o?.(Array.from(r)),k(e)},[b,l,p,o,k]),M=t.useMemo(()=>({active:y,selection:b,selectionMode:l,disabled:d,setActive:k,toggleValue:S,registerItem:C,unregisterItem:z,getItems:I,listboxId:u}),[y,b,l,d,k,S,C,z,I,u]);return i(v,{value:M,children:c})};Dt.displayName="ListboxRoot";const Pt=t.forwardRef(({className:e,label:r,children:o,...a},n)=>{const{active:s,disabled:l,getItems:d,setActive:c,toggleValue:u,listboxId:m}=x(),f=t.useRef(null),p=t.useCallback(e=>{const t=d();if(!t.length)return;const r=s?t.indexOf(s):-1,o=Math.max(0,Math.min(t.length-1,r+e));c(t[o])},[d,s,c]),b=t.useCallback(e=>{if(l)return;const t=d();t.length&&("ArrowDown"===e.key?(e.preventDefault(),p(1)):"ArrowUp"===e.key?(e.preventDefault(),p(-1)):"Home"===e.key?(e.preventDefault(),c(t[0])):"End"===e.key?(e.preventDefault(),c(t[t.length-1])):" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),s&&u(s)))},[l,d,s,p,u,c]);return t.useEffect(()=>{if(!s||!f.current)return;const e=f.current.querySelector(`#${m}-option-${s}`);e&&e.scrollIntoView({block:"nearest",behavior:"auto"})},[s,m]),i("div",{ref:Et(n,f),id:m,className:Me("flex flex-col items-start grow shrink-0 basis-0","max-h-100 overflow-y-auto","focus-within:outline-none focus-within:ring-3 focus-within:ring-ring/50",l&&"pointer-events-none select-none opacity-30",e),role:"listbox","aria-disabled":l,"aria-label":r,"aria-activedescendant":s?`${m}-option-${s}`:void 0,tabIndex:l?-1:0,onKeyDown:b,...a,children:o})});Pt.displayName="ListboxContent";const At=({value:e,children:r,className:o,...a})=>{const n=x(),{disabled:s,toggleValue:l,registerItem:d,unregisterItem:c,listboxId:u}=n,m=n.selection.has(e),f=n.active===e;t.useEffect(()=>(d(e),()=>{c(e)}),[e,d,c]);const p=t.useCallback(()=>{s||l(e)},[s,l,e]);return i("div",{id:`${u}-option-${e}`,className:Me(Ot({selected:m,active:f}),o),role:"option","aria-selected":m,"data-value":e,"data-active":f||void 0,onClick:p,...a,children:r})};At.displayName="ListboxItem";const _t=Object.assign(Dt,{Root:Dt,Content:Pt,Item:At}),Wt=t.forwardRef(({className:e,id:r,value:o,defaultValue:a="",placeholder:s="Search",clearLabel:l="Clear",onChange:d,disabled:c,readOnly:u,...m},f)=>{const p=h(Re(r)),[b,g]=n.useState(a),v=void 0!==o,x=v?o:b,w=x.length>0&&!c&&!u,y=t.useRef(null);return i("div",{className:Me("relative flex rounded-sm overflow-hidden","h-12 border border-bdr-subtle focus-within:border-bdr-strong","focus-within:outline-none focus-within:ring-3 focus-within:ring-ring/50 focus-within:ring-offset-0","transition-highlight",c&&"pointer-events-none select-none opacity-30",e),children:[i(Je,{className:"absolute left-4.5 top-1/2 -translate-y-1/2 mt-0.25 text-subtle pointer-events-none",size:20,strokeWidth:1.5}),i("input",{ref:Et(f,y),id:p,className:Me("w-full text-base pr-1 px-12 border-0","text-main bg-surface-neutral","placeholder:text-subtle","focus:outline-none","read-only:bg-surface-primary"),value:x,onChange:e=>{const t=e.currentTarget.value;v||g(t),d?.(t)},readOnly:u,disabled:c,placeholder:s,"aria-label":"Search","aria-disabled":c,...m}),w&&i(ot,{className:"absolute right-3 top-1/2 -translate-y-1/2 w-8 h-8 text-subtle",size:"lg",icon:Qe,title:l,onClick:()=>{v||g(""),d?.(""),y.current?.focus()},disabled:c})]})});Wt.displayName="SearchInput";const qt=({className:e,selected:t,children:r,label:o,description:a,metadata:n,icon:s,readOnly:l,checked:d,defaultChecked:c,onCheckedChange:u,...m})=>i(jt,{className:Me(!t&&"hover:bg-surface-primary-hover",e),selected:t,role:"row","aria-selected":t,...m,children:[i(jt.Left,{children:i(tt,{checked:d,defaultChecked:c,onCheckedChange:u,readOnly:l})}),i(jt.DefaultContent,{label:o,description:a,metadata:n,icon:s}),i(jt.Right,{children:r})]});qt.displayName="SelectableListItem";const $t=({className:e,label:t,decorative:r=!1,...o})=>{const a=r?"true":void 0;return t?i("div",{role:"separator","aria-orientation":"horizontal","aria-hidden":a,className:Me("inline-flex w-full gap-2.5",e),...o,children:[i("span",{className:"min-w-0 truncate text-subtle uppercase",children:t}),i("span",{className:"min-w-6 flex-1 border-b-1 border-bdr-subtle"})]}):i("hr",{"aria-hidden":a,className:Me("w-full border-bdr-subtle",e)})};$t.displayName="Separator";const Tt={top:"bottom",bottom:"top",left:"right",right:"left"};function Ft({children:e,asChild:t,triggerRef:o,isOpen:a,onMouseEnter:n,onMouseLeave:s,onFocus:l,onBlur:d}){return i(t?r.Root:"div",{ref:o,className:t?void 0:"inline-flex",onMouseEnter:n,onMouseLeave:s,onFocus:l,onBlur:d,"aria-describedby":a?"tooltip":void 0,role:t?void 0:"button",tabIndex:t?void 0:0,children:e})}function Vt({children:e,actualSide:t,className:r,position:o,tooltipRef:a}){return i("div",{ref:a,role:"tooltip",className:Me("fixed z-50 pointer-events-none select-none",!o.transformOrigin&&"opacity-0"),style:{top:`${o.top}px`,left:`${o.left}px`,transformOrigin:o.transformOrigin},children:i("div",{className:Me("relative w-fit rounded-xs px-2 py-1 text-xs","bg-tooltip text-tooltip-foreground shadow-md","animate-in fade-in-0 zoom-in-95","top"===t&&"slide-in-from-top-2","bottom"===t&&"slide-in-from-bottom-2","left"===t&&"slide-in-from-left-2","right"===t&&"slide-in-from-right-2",r),children:[e,i("div",{className:Me("absolute size-2 rotate-45","top"===t&&"bottom-0 left-1/2 -translate-x-1/2 translate-y-1/2","bottom"===t&&"top-0 left-1/2 -translate-x-1/2 -translate-y-1/2","left"===t&&"right-0 top-1/2 -translate-y-1/2 translate-x-1/2","right"===t&&"left-0 top-1/2 -translate-y-1/2 -translate-x-1/2"),style:{backgroundColor:"inherit"}})]})})}exports.Avatar=_e,exports.AvatarProvider=d,exports.Button=qe,exports.Checkbox=tt,exports.Dialog=vt,exports.DialogProvider=m,exports.IconButton=ot,exports.IdProvider=b,exports.Input=yt,exports.Link=Nt,exports.ListItem=jt,exports.Listbox=_t,exports.ListboxProvider=v,exports.SearchInput=Wt,exports.SelectableListItem=qt,exports.Separator=$t,exports.Tooltip=function({className:r,children:o,value:a,side:n="bottom",asChild:s=!0,delay:l=0}){const[d,c]=t.useState(!1),u=t.useRef(null),m=t.useRef(null),f=t.useRef(),p=null!=a&&""!==a,b=function(e,r,o,a){const[n,s]=t.useState({top:0,left:0,transformOrigin:"",actualSide:r});return t.useEffect(()=>{if(!e||!o.current||!a.current)return;const t=o.current.getBoundingClientRect(),n=a.current.getBoundingClientRect(),i=e=>{let r=0,o=0,a="";switch(e){case"top":r=t.top+window.scrollY-n.height-8,o=t.left+window.scrollX+(t.width-n.width)/2,a="bottom center";break;case"bottom":r=t.bottom+window.scrollY+8,o=t.left+window.scrollX+(t.width-n.width)/2,a="top center";break;case"left":r=t.top+window.scrollY+(t.height-n.height)/2,o=t.left+window.scrollX-n.width-8,a="center right";break;case"right":r=t.top+window.scrollY+(t.height-n.height)/2,o=t.right+window.scrollX+8,a="center left"}return{top:r,left:o,transformOrigin:a,actualSide:e}},l=({top:e,left:t})=>{const r=window.scrollY+8,o=window.scrollY+window.innerHeight-n.height-8,a=window.scrollX+8,s=window.scrollX+window.innerWidth-n.width-8;return e>=r&&e<=o&&t>=a&&t<=s};let d=i(r);if(!l(d)){const e=i(Tt[r]);l(e)&&(d=e)}s(d)},[e,r]),n}(d&&p,n,u,m);t.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]);const h=t.useCallback(()=>{p&&(f.current&&clearTimeout(f.current),l>0?f.current=window.setTimeout(()=>c(!0),l):c(!0))},[l,p]),g=t.useCallback(()=>{f.current&&clearTimeout(f.current),c(!1)},[]),v=t.useCallback(()=>{p&&c(!0)},[p]),x=t.useCallback(()=>c(!1),[]);return i(e.Fragment,{children:[i(Ft,{asChild:s,triggerRef:u,isOpen:d,onMouseEnter:h,onMouseLeave:g,onFocus:v,onBlur:x,children:o}),d&&p&&t.createPortal(i(Vt,{actualSide:b.actualSide,className:r,position:b,tooltipRef:m,children:a}),document.body)]})},exports.cn=Me,exports.unwrap=Re,exports.useAvatar=c,exports.useDialog=f,exports.useListbox=x,exports.usePrefixedId=h,exports.useScrollLock=at;
|