@enonic/ui 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -11
- package/dist/enonic-ui.cjs +3 -3
- package/dist/enonic-ui.es.js +2 -117
- package/dist/types/components/button/button.d.ts +2 -1
- package/dist/types/components/checkbox/checkbox.d.ts +2 -1
- package/dist/types/components/dialog/dialog.d.ts +2 -2
- package/dist/types/components/icon-button/icon-button.d.ts +2 -1
- package/dist/types/components/input/input.d.ts +4 -3
- package/dist/types/components/link/link.d.ts +2 -1
- package/dist/types/components/list-item/list-item.d.ts +5 -5
- package/dist/types/components/listbox/listbox.d.ts +3 -3
- package/dist/types/components/search-input/search-input.d.ts +2 -1
- package/dist/types/components/separator/separator.d.ts +2 -2
- package/dist/types/utils/ref.d.ts +3 -2
- package/dist/types/utils/unwrap.d.ts +8 -2
- package/package.json +6 -12
package/README.md
CHANGED
|
@@ -4,24 +4,54 @@ A modern UI component library built with Preact/React, TypeScript, and Tailwind
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
####
|
|
7
|
+
#### pnpm
|
|
8
|
+
|
|
9
|
+
#### With React
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm add @enonic/ui react react-dom @radix-ui/react-slot focus-trap-react
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
#### With Preact
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pnpm add @enonic/ui preact @radix-ui/react-slot focus-trap-react
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
<details>
|
|
22
|
+
<summary><b>npm</b></summary>
|
|
23
|
+
|
|
24
|
+
#### With React
|
|
8
25
|
|
|
9
26
|
```bash
|
|
10
|
-
npm install @enonic/ui
|
|
27
|
+
npm install @enonic/ui react react-dom @radix-ui/react-slot focus-trap-react
|
|
11
28
|
```
|
|
12
29
|
|
|
13
|
-
####
|
|
30
|
+
#### With Preact
|
|
14
31
|
|
|
15
32
|
```bash
|
|
16
|
-
|
|
33
|
+
npm install @enonic/ui preact @radix-ui/react-slot focus-trap-react
|
|
17
34
|
```
|
|
18
35
|
|
|
19
|
-
|
|
36
|
+
</details>
|
|
37
|
+
|
|
38
|
+
<details>
|
|
39
|
+
<summary><b>Yarn</b></summary>
|
|
40
|
+
|
|
41
|
+
#### With React
|
|
20
42
|
|
|
21
43
|
```bash
|
|
22
|
-
yarn add @enonic/ui
|
|
44
|
+
yarn add @enonic/ui react react-dom @radix-ui/react-slot focus-trap-react
|
|
23
45
|
```
|
|
24
46
|
|
|
47
|
+
#### With Preact
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
yarn add @enonic/ui preact @radix-ui/react-slot focus-trap-react
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
</details>
|
|
54
|
+
|
|
25
55
|
## Usage
|
|
26
56
|
|
|
27
57
|
### Import Components
|
|
@@ -73,8 +103,10 @@ This library requires one of the following frameworks:
|
|
|
73
103
|
|
|
74
104
|
```json
|
|
75
105
|
{
|
|
76
|
-
"react": "
|
|
77
|
-
"react-dom": "
|
|
106
|
+
"react": "^19.0.0",
|
|
107
|
+
"react-dom": "^19.0.0",
|
|
108
|
+
"@radix-ui/react-slot": "^1.2.0",
|
|
109
|
+
"focus-trap-react": "^11.0.0"
|
|
78
110
|
}
|
|
79
111
|
```
|
|
80
112
|
|
|
@@ -83,14 +115,17 @@ This library requires one of the following frameworks:
|
|
|
83
115
|
```json
|
|
84
116
|
{
|
|
85
117
|
"preact": ">=10.0.0",
|
|
86
|
-
"@
|
|
118
|
+
"@radix-ui/react-slot": "^1.2.0",
|
|
119
|
+
"focus-trap-react": "^11.0.0"
|
|
87
120
|
}
|
|
88
121
|
```
|
|
89
122
|
|
|
90
123
|
### Icon Libraries (Optional)
|
|
91
124
|
|
|
92
|
-
|
|
93
|
-
|
|
125
|
+
The library uses and expects one of the following icon libraries to be used to provide icons for the components:
|
|
126
|
+
|
|
127
|
+
- `lucide-react` (>=0.500.0) - For React projects
|
|
128
|
+
- `lucide-preact` (>=0.500.0) - For Preact projects
|
|
94
129
|
|
|
95
130
|
## Development
|
|
96
131
|
|
package/dist/enonic-ui.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("preact"),r=require("react");require("preact/compat");const t=require("preact/hooks");function o(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const t in e)if("default"!==t){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}return r.default=e,Object.freeze(r)}const n=o(r);var a=0;function i(r,t,o,n,i,s){t||(t={});var l,c,d=t;if("ref"in d)for(c in d={},t)"ref"==c?l=t[c]:d[c]=t[c];var u={type:r,props:d,key:o,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--a,__i:-1,__u:0,__source:i,__self:s};if("function"==typeof r&&(l=r.defaultProps))for(c in l)void 0===d[c]&&(d[c]=l[c]);return e.options.vnode&&e.options.vnode(u),u}function s(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=s(e[r]))&&(o&&(o+=" "),o+=t)}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function l(){for(var e,r,t=0,o="",n=arguments.length;t<n;t++)(e=arguments[t])&&(r=s(e))&&(o&&(o+=" "),o+=r);return o}const c=e=>{const r=p(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:e=>{const t=e.split("-");return""===t[0]&&1!==t.length&&t.shift(),d(t,r)||m(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},u=/^\[(.+)\]$/,m=e=>{if(u.test(e)){const r=u.exec(e)[1],t=r?.substring(0,r.indexOf(":"));if(t)return"arbitrary.."+t}},p=e=>{const{theme:r,classGroups:t}=e,o={nextPart:new Map,validators:[]};for(const n in t)f(t[n],o,n,r);return o},f=(e,r,t,o)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?r:b(r,e)).classGroupId=t)}if("function"==typeof e)return h(e)?void f(e(o),r,t,o):void r.validators.push({validator:e,classGroupId:t});Object.entries(e).forEach(([e,n])=>{f(n,b(r,e),t,o)})})},b=(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},h=e=>e.isThemeGetter,g=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)}}},v=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=x(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},x=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,y=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=N(e))&&(o&&(o+=" "),o+=r);return o}const N=e=>{if("string"==typeof e)return e;let r,t="";for(let o=0;o<e.length;o++)e[o]&&(r=N(e[o]))&&(t&&(t+=" "),t+=r);return t};function z(e,...r){let t,o,n,a=function(s){const l=r.reduce((e,r)=>r(e),e());return t=(e=>({cache:g(e.cacheSize),parseClassName:v(e),sortModifiers:y(e),...c(e)}))(l),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 c=s.length-1;c>=0;c-=1){const e=s[c],{isExternal:r,modifiers:d,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(d).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 C=e=>{const r=r=>r[e]||[];return r.isThemeGetter=!0,r},j=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,M=/^\((?:(\w[\w-]*):)?(.+)\)$/i,I=/^\d+\/\d+$/,S=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,O=/\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$/,E=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,R=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,P=e=>I.test(e),W=e=>!!e&&!Number.isNaN(Number(e)),$=e=>!!e&&Number.isInteger(Number(e)),A=e=>e.endsWith("%")&&W(e.slice(0,-1)),L=e=>S.test(e),q=()=>!0,D=e=>O.test(e)&&!E.test(e),V=()=>!1,G=e=>R.test(e),B=e=>_.test(e),T=e=>!X(e)&&!J(e),F=e=>ae(e,ce,V),X=e=>j.test(e),Y=e=>ae(e,de,D),H=e=>ae(e,ue,W),U=e=>ae(e,se,V),Z=e=>ae(e,le,B),K=e=>ae(e,pe,G),J=e=>M.test(e),Q=e=>ie(e,de),ee=e=>ie(e,me),re=e=>ie(e,se),te=e=>ie(e,ce),oe=e=>ie(e,le),ne=e=>ie(e,pe,!0),ae=(e,r,t)=>{const o=j.exec(e);return!!o&&(o[1]?r(o[1]):t(o[2]))},ie=(e,r,t=!1)=>{const o=M.exec(e);return!!o&&(o[1]?r(o[1]):t)},se=e=>"position"===e||"percentage"===e,le=e=>"image"===e||"url"===e,ce=e=>"length"===e||"size"===e||"bg-size"===e,de=e=>"length"===e,ue=e=>"number"===e,me=e=>"family-name"===e,pe=e=>"shadow"===e,fe=z(()=>{const e=C("color"),r=C("font"),t=C("text"),o=C("font-weight"),n=C("tracking"),a=C("leading"),i=C("breakpoint"),s=C("container"),l=C("spacing"),c=C("radius"),d=C("shadow"),u=C("inset-shadow"),m=C("text-shadow"),p=C("drop-shadow"),f=C("blur"),b=C("perspective"),h=C("aspect"),g=C("ease"),v=C("animate"),x=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",J,X],y=()=>[J,X,l],w=()=>[P,"full","auto",...y()],k=()=>[$,"none","subgrid",J,X],N=()=>["auto",{span:["full",$,J,X]},$,J,X],z=()=>[$,"auto",J,X],j=()=>["auto","min","max","fr",J,X],M=()=>["auto",...y()],I=()=>[P,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...y()],S=()=>[e,J,X],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",re,U,{position:[J,X]}],E=()=>["auto","cover","contain",te,F,{size:[J,X]}],R=()=>[A,Q,Y],_=()=>["","none","full",c,J,X],D=()=>["",W,Q,Y],V=()=>[W,A,re,U],G=()=>["","none",f,J,X],B=()=>["none",W,J,X],ae=()=>["none",W,J,X],ie=()=>[W,J,X],se=()=>[P,"full",...y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[L],breakpoint:[L],color:[q],container:[L],"drop-shadow":[L],ease:["in","out","in-out"],font:[T],"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",W],text:[L],"text-shadow":[L],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",P,X,J,h]}],container:["container"],columns:[{columns:[W,X,J,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:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{start:w()}],end:[{end:w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[$,"auto",J,X]}],basis:[{basis:[P,"full","auto",s,...y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[W,P,"auto","initial","none",X]}],grow:[{grow:["",W,J,X]}],shrink:[{shrink:["",W,J,X]}],order:[{order:[$,"first","last","none",J,X]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:y()}],"gap-x":[{"gap-x":y()}],"gap-y":[{"gap-y":y()}],"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:y()}],px:[{px:y()}],py:[{py:y()}],ps:[{ps:y()}],pe:[{pe:y()}],pt:[{pt:y()}],pr:[{pr:y()}],pb:[{pb:y()}],pl:[{pl:y()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":y()}],"space-y-reverse":["space-y-reverse"],size:[{size:I()}],w:[{w:[s,"screen",...I()]}],"min-w":[{"min-w":[s,"screen","none",...I()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...I()]}],h:[{h:["screen","lh",...I()]}],"min-h":[{"min-h":["screen","lh","none",...I()]}],"max-h":[{"max-h":["screen","lh",...I()]}],"font-size":[{text:["base",t,Q,Y]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,J,H]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",A,X]}],"font-family":[{font:[ee,X,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,J,X]}],"line-clamp":[{"line-clamp":[W,"none",J,H]}],leading:[{leading:[a,...y()]}],"list-image":[{"list-image":["none",J,X]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",J,X]}],"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:[W,"from-font","auto",J,Y]}],"text-decoration-color":[{decoration:S()}],"underline-offset":[{"underline-offset":[W,"auto",J,X]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J,X]}],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",J,X]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:E()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},$,J,X],radial:["",J,X],conic:[$,J,X]},oe,Z]}],"bg-color":[{bg:S()}],"gradient-from-pos":[{from:R()}],"gradient-via-pos":[{via:R()}],"gradient-to-pos":[{to:R()}],"gradient-from":[{from:S()}],"gradient-via":[{via:S()}],"gradient-to":[{to:S()}],rounded:[{rounded:_()}],"rounded-s":[{"rounded-s":_()}],"rounded-e":[{"rounded-e":_()}],"rounded-t":[{"rounded-t":_()}],"rounded-r":[{"rounded-r":_()}],"rounded-b":[{"rounded-b":_()}],"rounded-l":[{"rounded-l":_()}],"rounded-ss":[{"rounded-ss":_()}],"rounded-se":[{"rounded-se":_()}],"rounded-ee":[{"rounded-ee":_()}],"rounded-es":[{"rounded-es":_()}],"rounded-tl":[{"rounded-tl":_()}],"rounded-tr":[{"rounded-tr":_()}],"rounded-br":[{"rounded-br":_()}],"rounded-bl":[{"rounded-bl":_()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"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":[W,J,X]}],"outline-w":[{outline:["",W,Q,Y]}],"outline-color":[{outline:S()}],shadow:[{shadow:["","none",d,ne,K]}],"shadow-color":[{shadow:S()}],"inset-shadow":[{"inset-shadow":["none",u,ne,K]}],"inset-shadow-color":[{"inset-shadow":S()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:S()}],"ring-offset-w":[{"ring-offset":[W,Y]}],"ring-offset-color":[{"ring-offset":S()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":S()}],"text-shadow":[{"text-shadow":["none",m,ne,K]}],"text-shadow-color":[{"text-shadow":S()}],opacity:[{opacity:[W,J,X]}],"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":[W]}],"mask-image-linear-from-pos":[{"mask-linear-from":V()}],"mask-image-linear-to-pos":[{"mask-linear-to":V()}],"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":V()}],"mask-image-t-to-pos":[{"mask-t-to":V()}],"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":V()}],"mask-image-r-to-pos":[{"mask-r-to":V()}],"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":V()}],"mask-image-b-to-pos":[{"mask-b-to":V()}],"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":V()}],"mask-image-l-to-pos":[{"mask-l-to":V()}],"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":V()}],"mask-image-x-to-pos":[{"mask-x-to":V()}],"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":V()}],"mask-image-y-to-pos":[{"mask-y-to":V()}],"mask-image-y-from-color":[{"mask-y-from":S()}],"mask-image-y-to-color":[{"mask-y-to":S()}],"mask-image-radial":[{"mask-radial":[J,X]}],"mask-image-radial-from-pos":[{"mask-radial-from":V()}],"mask-image-radial-to-pos":[{"mask-radial-to":V()}],"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":[W]}],"mask-image-conic-from-pos":[{"mask-conic-from":V()}],"mask-image-conic-to-pos":[{"mask-conic-to":V()}],"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:O()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:E()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",J,X]}],filter:[{filter:["","none",J,X]}],blur:[{blur:G()}],brightness:[{brightness:[W,J,X]}],contrast:[{contrast:[W,J,X]}],"drop-shadow":[{"drop-shadow":["","none",p,ne,K]}],"drop-shadow-color":[{"drop-shadow":S()}],grayscale:[{grayscale:["",W,J,X]}],"hue-rotate":[{"hue-rotate":[W,J,X]}],invert:[{invert:["",W,J,X]}],saturate:[{saturate:[W,J,X]}],sepia:[{sepia:["",W,J,X]}],"backdrop-filter":[{"backdrop-filter":["","none",J,X]}],"backdrop-blur":[{"backdrop-blur":G()}],"backdrop-brightness":[{"backdrop-brightness":[W,J,X]}],"backdrop-contrast":[{"backdrop-contrast":[W,J,X]}],"backdrop-grayscale":[{"backdrop-grayscale":["",W,J,X]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[W,J,X]}],"backdrop-invert":[{"backdrop-invert":["",W,J,X]}],"backdrop-opacity":[{"backdrop-opacity":[W,J,X]}],"backdrop-saturate":[{"backdrop-saturate":[W,J,X]}],"backdrop-sepia":[{"backdrop-sepia":["",W,J,X]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":y()}],"border-spacing-x":[{"border-spacing-x":y()}],"border-spacing-y":[{"border-spacing-y":y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",J,X]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[W,"initial",J,X]}],ease:[{ease:["linear","initial",g,J,X]}],delay:[{delay:[W,J,X]}],animate:[{animate:["none",v,J,X]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,J,X]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:B()}],"rotate-x":[{"rotate-x":B()}],"rotate-y":[{"rotate-y":B()}],"rotate-z":[{"rotate-z":B()}],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:[J,X,"","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",J,X]}],"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":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"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",J,X]}],fill:[{fill:["none",...S()]}],"stroke-w":[{stroke:[W,Q,Y,H]}],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 be(...e){return fe(l(e))}function he(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 ge=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,ve=l,xe=(e,r)=>t=>{var o;if(null==(null==r?void 0:r.variants))return ve(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=ge(r)||ge(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 ve(e,i,l,null==t?void 0:t.class,null==t?void 0:t.className)},ye=xe(["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:a,label:s,endIcon:l,title:c,children:d,...u},m)=>{const p=a,f=l,b=o??(e=>{switch(e){case"sm":return 16;case"md":return 18;case"lg":return 20}})(t??"md");return i("button",{ref:m,type:"button",className:be(ye({variant:r,size:t}),e),title:c,"aria-label":c??s,"aria-disabled":u.disabled,...u,children:[p&&i(p,{size:b,strokeWidth:n}),d,s,f&&i(f,{size:b,strokeWidth:n})]})});we.displayName="Button";const ke=r.createContext(void 0),Ne=({children:e,prefix:r})=>i(ke.Provider,{value:{prefix:r},children:e});Ne.displayName="IdProvider";const ze=e=>{const t=r.useId(),o=r.useContext(ke);if(e)return e;return o?.prefix?`${o.prefix}-${t}`:t},Ce=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)},je=(...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"),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};
|
|
2
2
|
/**
|
|
3
3
|
* @license lucide-react v0.545.0 - ISC
|
|
4
4
|
*
|
|
@@ -17,10 +17,10 @@ var Ie={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
17
17
|
*
|
|
18
18
|
* This source code is licensed under the ISC license.
|
|
19
19
|
* See the LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/const
|
|
20
|
+
*/const je=r.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:n,className:a="",children:i,iconNode:s,...l},d)=>r.createElement("svg",{ref:d,...Ie,width:t,height:t,stroke:e,strokeWidth:n?24*Number(o)/Number(t):o,className:Ce("lucide",a),...!i&&!Me(l)&&{"aria-hidden":"true"},...l},[...s.map(([e,t])=>r.createElement(e,t)),...Array.isArray(i)?i:[i]])),Se=(e,t)=>{const o=r.forwardRef(({className:o,...n},a)=>{return r.createElement(je,{ref:a,iconNode:t,className:Ce(`lucide-${i=ze(e),i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,o),...n});var i});return o.displayName=ze(e),o},Re=Se("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),_e=Se("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Ee=Se("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"}]]),Pe=Se("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"}]]),Oe=Se("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),We=Se("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"}]]),$e=Se("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),Le=Se("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ae=ve(["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}}),qe=r.forwardRef(({id:e,className:t,name:o,label:n,defaultChecked:i=!1,checked:s,align:l="left",error:d,disabled:c,readOnly:u,required:m,value:p="on",onCheckedChange:f,errorMessage:b,...h},g)=>{const v=Ne(be(e)),x=d?"error":"default",w=!c&&!u,[k,y]=r.useState(i),N=void 0!==s,z=N?s:k,C="indeterminate"===z,M=!0===z;return a("div",{children:[a("label",{htmlFor:v,className:fe("relative flex items-center select-none gap-2","right"===l&&"flex-row-reverse justify-end",w?"cursor-pointer":"cursor-default",t),children:[a("input",{ref:e=>{"function"==typeof g?g(e):g&&(g.current=e),e&&(e.indeterminate=C)},...h,id:v,type:"checkbox",className:"peer sr-only",checked:M,disabled:u??c,required:m,name:o,value:p,"aria-checked":C?"mixed":M,"aria-disabled":c,"aria-invalid":d,"aria-readonly":u,"data-state":C?"indeterminate":M?"checked":"unchecked","data-disabled":c?"":void 0,onChange:e=>{if(!w)return;let r;r=!C&&e.currentTarget.checked,N||y(r),f?.(r)}}),a("span",{className:fe(Ae({state:x,editable:w})),"aria-hidden":"true",children:C?a(Oe,{size:10,className:fe("text-rev",!d&&"group-data-[tone=inverse]:text-alt-rev"),strokeWidth:4}):M?a(_e,{size:10,className:fe("text-rev",!d&&"group-data-[tone=inverse]:text-alt-rev"),strokeWidth:4}):null}),n&&a("span",{className:fe("text-main group-data-[tone=inverse]:text-alt",c&&"opacity-30"),children:n})]}),"error"===x&&b&&a("div",{className:fe("flex items-center gap-2 mt-1 text-error leading-5",c&&"opacity-30"),children:[a(We,{size:14,strokeWidth:2.5}),b]})]})});
|
|
21
21
|
/**
|
|
22
22
|
* @license lucide-react v0.545.0 - ISC
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the ISC license.
|
|
25
25
|
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/De.displayName="Checkbox";const Ve=xe(["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"}}),Ge=r.forwardRef(({className:e,variant:r="text",size:t="md",shape:o="square",icon:n,...a},s)=>i(we,{ref:s,className:be(Ve({size:t,shape:o}),e),variant:r,size:t,startIcon:n,label:"",...a}));Ge.displayName="IconButton";const Be=xe(["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}}),Te=({children:e,error:r})=>i("div",{className:be("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}),Fe=r.forwardRef(({className:e,label:r,description:t,error:o,startAddon:n,endAddon:a,id:s,disabled:l,readOnly:c,...d},u)=>{const m=ze(he(s)),p=o?"error":"default",f="error"===p;return i("div",{className:be("w-full",l&&"opacity-30",e),children:[i("div",{className:"mb-2",children:[r&&i("label",{htmlFor:m,className:be("block text-base font-semibold text-main",l&&"opacity-30"),children:i("div",{className:"flex items-center gap-2",children:[c&&i(Pe,{size:16,strokeWidth:2.5}),r]})}),t&&i("div",{className:be("text-sm text-subtle",l&&"opacity-30"),children:t})]}),i("div",{className:be(Be({state:p,disabled:l})),children:[n&&i(Te,{error:f,children:n}),i("input",{ref:u,id:m,className:be("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",a&&"rounded-r-none"),disabled:l,readOnly:c,...d}),a&&i(Te,{error:f,children:a})]}),o&&i("div",{className:"flex items-center gap-2 mt-2 leading-5 text-error",children:[i($e,{size:16,strokeWidth:2.5}),o]})]})});function Xe(e,r,t=!1){return"function"==typeof e?e:!0===e||void 0===e&&t?r:void 0}Fe.displayName="Input";const Ye=r.forwardRef(({className:e,href:r,external:t="auto",newTab:o,leftIcon:n,rightIcon:a,children:s,rel:l,...c},d)=>{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=Xe(n,Ee),f=Xe(a,_e,u);return i("a",{ref:d,href:r,className:be("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",...c,children:[p&&i(p,{className:"inline-block flex-none w-3.5 h-3.5",strokeWidth:1.5,"aria-hidden":"true"}),s,f&&i(f,{className:"inline-block flex-none w-3.5 h-3.5",strokeWidth:1.5,"aria-hidden":"true"})]})});function He(e,t){return r.Children.toArray(e).find(e=>function(e,t){return r.isValidElement(e)&&e.type===t}(e,t))}Ye.displayName="Link";const Ue=({children:e,className:r,...t})=>i("div",{className:be("flex items-center gap-2.5 flex-shrink-0",r),...t,children:e}),Ze=({className:e,children:r,...t})=>i("div",{className:be("flex-1 min-w-0",e),...t,children:r});Ze.displayName="ListItem.Content";const Ke=({className:e,label:r,description:t,metadata:o,icon:n})=>i(Ze,{className:be(n&&"grid grid-cols-[auto_1fr] gap-2.5 items-center",e),children:[n&&i("div",{className:"flex items-center justify-center flex-shrink-0 group-data-[tone=inverse]:text-alt",children:n}),i("div",{className:"min-w-0 text-left",children:[r&&i("h1",{className:"truncate font-semibold group-data-[tone=inverse]:text-alt",children:r}),t&&i("p",{className:"truncate text-sm text-subtle group-data-[tone=inverse]:text-alt",children:t}),o&&i("p",{className:"text-xs text-subtle group-data-[tone=inverse]:text-alt",children:o})]})]}),Je=({children:e,className:r,...t})=>i("div",{className:be("flex items-center gap-5 flex-shrink-0",r),...t,children:e});Je.displayName="ListItem.Right";const Qe=({children:e,className:r,selected:t,...o})=>{const n=He(e,Ue),a=He(e,Ze)??He(e,Ke),s=He(e,Je);return i("div",{className:be("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,a,s]})};Qe.displayName="ListItem";const er=Object.assign(Qe,{Left:Ue,Content:Ze,DefaultContent:Ke,Right:Je}),rr=({className:e,selected:r,children:t,label:o,description:n,metadata:a,icon:s,readOnly:l,checked:c,defaultChecked:d,onCheckedChange:u,...m})=>i(er,{className:be(!r&&"hover:bg-surface-primary-hover",e),selected:r,role:"row","aria-selected":r,...m,children:[i(er.Left,{children:i(De,{checked:c,defaultChecked:d,onCheckedChange:u,readOnly:l})}),i(er.DefaultContent,{label:o,description:n,metadata:a,icon:s}),i(er.Right,{children:t})]});function tr(e,r){if("function"==typeof e)return e(r);null!=e&&(e.current=r)}function or(e){const r=ar(e),t=n.forwardRef((e,t)=>{const{children:o,...a}=e,s=n.Children.toArray(o),l=s.find(sr);if(l){const e=l.props.children,o=s.map(r=>r===l?n.Children.count(e)>1?n.Children.only(null):n.isValidElement(e)?e.props.children:null:r);return i(r,{...a,ref:t,children:n.isValidElement(e)?n.cloneElement(e,void 0,o):null})}return i(r,{...a,ref:t,children:o})});return t.displayName=`${e}.Slot`,t}rr.displayName="SelectableListItem";var nr=or("Slot");function ar(e){const r=n.forwardRef((e,r)=>{const{children:t,...o}=e;if(n.isValidElement(t)){const e=function(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,t=r&&"isReactWarning"in r&&r.isReactWarning;if(t)return e.ref;if(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t)return e.props.ref;return e.props.ref||e.ref}(t),a=function(e,r){const t={...r};for(const o in r){const n=e[o],a=r[o];/^on[A-Z]/.test(o)?n&&a?t[o]=(...e)=>{const r=a(...e);return n(...e),r}:n&&(t[o]=n):"style"===o?t[o]={...n,...a}:"className"===o&&(t[o]=[n,a].filter(Boolean).join(" "))}return{...e,...t}}(o,t.props);return t.type!==n.Fragment&&(a.ref=r?function(...e){return r=>{let t=!1;const o=e.map(e=>{const o=tr(e,r);return t||"function"!=typeof o||(t=!0),o});if(t)return()=>{for(let r=0;r<o.length;r++){const t=o[r];"function"==typeof t?t():tr(e[r],null)}}}}(r,e):e),n.cloneElement(t,a)}return n.Children.count(t)>1?n.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var ir=Symbol("radix.slottable");function sr(e){return n.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===ir}const lr={top:"bottom",bottom:"top",left:"right",right:"left"};function cr({children:e,asChild:r,triggerRef:t,isOpen:o,onMouseEnter:n,onMouseLeave:a,onFocus:s,onBlur:l}){return i(r?nr:"div",{ref:t,className:r?void 0:"inline-flex",onMouseEnter:n,onMouseLeave:a,onFocus:s,onBlur:l,"aria-describedby":o?"tooltip":void 0,role:r?void 0:"button",tabIndex:r?void 0:0,children:e})}function dr({children:e,actualSide:r,className:t,position:o,tooltipRef:n}){return i("div",{ref:n,role:"tooltip",className:be("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:be("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,i("div",{className:be("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 ur=r.createContext(void 0),mr=({value:e,children:r})=>i(ur.Provider,{value:e,children:r});mr.displayName="DialogProvider";function pr(...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 fr=r.forwardRef(({className:e,id:o,value:n,defaultValue:a="",placeholder:s="Search",clearLabel:l="Clear",onChange:c,disabled:d,readOnly:u,...m},p)=>{const f=ze(he(o)),[b,h]=t.useState(a),g=void 0!==n,v=g?n:b,x=v.length>0&&!d&&!u,y=r.useRef(null);return i("div",{className:be("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",d&&"pointer-events-none select-none opacity-30",e),children:[i(Ae,{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:pr(p,y),id:f,className:be("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),c?.(r)},readOnly:u,disabled:d,placeholder:s,"aria-label":"Search","aria-disabled":d,...m}),x&&i(Ge,{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(""),c?.(""),y.current?.focus()},disabled:d})]})});fr.displayName="SearchInput";const br=r.forwardRef(function({className:e,selection:t,selectionMode:o="single",disabled:n=!1,defaultSelection:a=new Set,setSelection:s,active:l,defaultActive:c,onActiveChange:d,items:u,renderItem:m,getValue:p,...f},b){const h=ze(),g=r.useRef(null),[v,x]=r.useState(a),y=void 0!==t,w=y?t:v,[k,N]=r.useState(c??(u[0]?p(u[0]):void 0)),z=void 0!==l,C=z?l:k,j=r.useMemo(()=>new Map(u.map((e,r)=>[p(e),r])),[u,p]),M=r.useCallback(e=>{z||N(e),d?.(e)},[z,d]);r.useEffect(()=>{C&&u.some(e=>p(e)===C)||M(u[0]?p(u[0]):void 0)},[u,p,C,M]),r.useEffect(()=>{if(!C||!g.current)return;const e=g.current.querySelector(`#${h}-option-${C}`);e?.scrollIntoView({block:"nearest",behavior:"auto"})},[C,h]);const I=e=>{const r=w.has(e);let t;"single"===o?t=r?new Set:new Set([e]):(t=new Set(w),r?t.delete(e):t.add(e)),y||x(t),s?.(t),M(e)},S=e=>{const r=C?j.get(C)??0:0,t=Math.max(0,Math.min(u.length-1,r+e));M(p(u[t]))};return i("ul",{id:h,ref:pr(b,g),tabIndex:n?-1:0,className:be("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];M(r&&p(r))}else if("End"===e.key){e.preventDefault();const r=u.at(-1);M(r&&p(r))}else" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),C&&I(C))},onClick:({target:e})=>{const r=e instanceof Element?e.closest("li"):null,t=r?.getAttribute("data-value");t&&I(t)},children:u.map(e=>{const r=p(e),t=w.has(r),o=r===C;return i("li",{id:`${h}-option-${r}`,"data-value":r,"data-active":o?"true":"false",tabIndex:-1,className:be("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)})})});br.displayName="Listbox";exports.Button=we,exports.Checkbox=De,exports.DialogProvider=mr,exports.IconButton=Ge,exports.IdProvider=Ne,exports.Input=Fe,exports.Link=Ye,exports.ListItem=er,exports.Listbox=br,exports.SearchInput=fr,exports.SelectableListItem=rr,exports.Tooltip=function({className:t,children:o,value:n,side:a="bottom",asChild:s=!0,delay:l=0}){const[c,d]=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 c=s(t);if(!l(c)){const e=s(lr[t]);l(e)&&(c=e)}i(c)},[e,t]),a}(c&&f,a,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(()=>d(!0),l):d(!0))},[l,f]),g=r.useCallback(()=>{p.current&&clearTimeout(p.current),d(!1)},[]),v=r.useCallback(()=>{f&&d(!0)},[f]),x=r.useCallback(()=>d(!1),[]);return i(e.Fragment,{children:[i(cr,{asChild:s,triggerRef:u,isOpen:c,onMouseEnter:h,onMouseLeave:g,onFocus:v,onBlur:x,children:o}),c&&f&&r.createPortal(i(dr,{actualSide:b.actualSide,className:t,position:b,tooltipRef:m,children:n}),document.body)]})},exports.cn=be,exports.unwrap=he,exports.useDialog=()=>{const e=r.useContext(ur);if(!e)throw new Error("useDialog must be used within a DialogProvider");return e},exports.usePrefixedId=ze,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])};
|
|
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])};
|
package/dist/enonic-ui.es.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { options, Fragment } from "preact";
|
|
2
|
-
import * as React from "react";
|
|
3
2
|
import { forwardRef, createContext, useId, useContext, createElement, useState, isValidElement, Children, useRef, useEffect, useCallback, createPortal, useMemo } from "react";
|
|
4
|
-
import "
|
|
3
|
+
import { Root } from "@radix-ui/react-slot";
|
|
5
4
|
import { useState as useState$1 } from "preact/hooks";
|
|
6
5
|
var f = 0;
|
|
7
6
|
function u(e, t, n, o, i, u2) {
|
|
@@ -3726,120 +3725,6 @@ const SelectableListItem = ({
|
|
|
3726
3725
|
);
|
|
3727
3726
|
};
|
|
3728
3727
|
SelectableListItem.displayName = "SelectableListItem";
|
|
3729
|
-
function setRef$1(ref, value) {
|
|
3730
|
-
if (typeof ref === "function") {
|
|
3731
|
-
return ref(value);
|
|
3732
|
-
} else if (ref !== null && ref !== void 0) {
|
|
3733
|
-
ref.current = value;
|
|
3734
|
-
}
|
|
3735
|
-
}
|
|
3736
|
-
function composeRefs(...refs) {
|
|
3737
|
-
return (node) => {
|
|
3738
|
-
let hasCleanup = false;
|
|
3739
|
-
const cleanups = refs.map((ref) => {
|
|
3740
|
-
const cleanup = setRef$1(ref, node);
|
|
3741
|
-
if (!hasCleanup && typeof cleanup == "function") {
|
|
3742
|
-
hasCleanup = true;
|
|
3743
|
-
}
|
|
3744
|
-
return cleanup;
|
|
3745
|
-
});
|
|
3746
|
-
if (hasCleanup) {
|
|
3747
|
-
return () => {
|
|
3748
|
-
for (let i = 0; i < cleanups.length; i++) {
|
|
3749
|
-
const cleanup = cleanups[i];
|
|
3750
|
-
if (typeof cleanup == "function") {
|
|
3751
|
-
cleanup();
|
|
3752
|
-
} else {
|
|
3753
|
-
setRef$1(refs[i], null);
|
|
3754
|
-
}
|
|
3755
|
-
}
|
|
3756
|
-
};
|
|
3757
|
-
}
|
|
3758
|
-
};
|
|
3759
|
-
}
|
|
3760
|
-
// @__NO_SIDE_EFFECTS__
|
|
3761
|
-
function createSlot(ownerName) {
|
|
3762
|
-
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
3763
|
-
const Slot2 = React.forwardRef((props, forwardedRef) => {
|
|
3764
|
-
const { children, ...slotProps } = props;
|
|
3765
|
-
const childrenArray = React.Children.toArray(children);
|
|
3766
|
-
const slottable = childrenArray.find(isSlottable);
|
|
3767
|
-
if (slottable) {
|
|
3768
|
-
const newElement = slottable.props.children;
|
|
3769
|
-
const newChildren = childrenArray.map((child) => {
|
|
3770
|
-
if (child === slottable) {
|
|
3771
|
-
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
3772
|
-
return React.isValidElement(newElement) ? newElement.props.children : null;
|
|
3773
|
-
} else {
|
|
3774
|
-
return child;
|
|
3775
|
-
}
|
|
3776
|
-
});
|
|
3777
|
-
return /* @__PURE__ */ u(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
|
3778
|
-
}
|
|
3779
|
-
return /* @__PURE__ */ u(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
3780
|
-
});
|
|
3781
|
-
Slot2.displayName = `${ownerName}.Slot`;
|
|
3782
|
-
return Slot2;
|
|
3783
|
-
}
|
|
3784
|
-
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
3785
|
-
// @__NO_SIDE_EFFECTS__
|
|
3786
|
-
function createSlotClone(ownerName) {
|
|
3787
|
-
const SlotClone = React.forwardRef((props, forwardedRef) => {
|
|
3788
|
-
const { children, ...slotProps } = props;
|
|
3789
|
-
if (React.isValidElement(children)) {
|
|
3790
|
-
const childrenRef = getElementRef(children);
|
|
3791
|
-
const props2 = mergeProps(slotProps, children.props);
|
|
3792
|
-
if (children.type !== React.Fragment) {
|
|
3793
|
-
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
3794
|
-
}
|
|
3795
|
-
return React.cloneElement(children, props2);
|
|
3796
|
-
}
|
|
3797
|
-
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
3798
|
-
});
|
|
3799
|
-
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
3800
|
-
return SlotClone;
|
|
3801
|
-
}
|
|
3802
|
-
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
3803
|
-
function isSlottable(child) {
|
|
3804
|
-
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
3805
|
-
}
|
|
3806
|
-
function mergeProps(slotProps, childProps) {
|
|
3807
|
-
const overrideProps = { ...childProps };
|
|
3808
|
-
for (const propName in childProps) {
|
|
3809
|
-
const slotPropValue = slotProps[propName];
|
|
3810
|
-
const childPropValue = childProps[propName];
|
|
3811
|
-
const isHandler = /^on[A-Z]/.test(propName);
|
|
3812
|
-
if (isHandler) {
|
|
3813
|
-
if (slotPropValue && childPropValue) {
|
|
3814
|
-
overrideProps[propName] = (...args) => {
|
|
3815
|
-
const result = childPropValue(...args);
|
|
3816
|
-
slotPropValue(...args);
|
|
3817
|
-
return result;
|
|
3818
|
-
};
|
|
3819
|
-
} else if (slotPropValue) {
|
|
3820
|
-
overrideProps[propName] = slotPropValue;
|
|
3821
|
-
}
|
|
3822
|
-
} else if (propName === "style") {
|
|
3823
|
-
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
3824
|
-
} else if (propName === "className") {
|
|
3825
|
-
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
3826
|
-
}
|
|
3827
|
-
}
|
|
3828
|
-
return { ...slotProps, ...overrideProps };
|
|
3829
|
-
}
|
|
3830
|
-
function getElementRef(element) {
|
|
3831
|
-
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
3832
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3833
|
-
if (mayWarn) {
|
|
3834
|
-
return element.ref;
|
|
3835
|
-
}
|
|
3836
|
-
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
3837
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3838
|
-
if (mayWarn) {
|
|
3839
|
-
return element.props.ref;
|
|
3840
|
-
}
|
|
3841
|
-
return element.props.ref || element.ref;
|
|
3842
|
-
}
|
|
3843
3728
|
const oppositeSide = {
|
|
3844
3729
|
top: "bottom",
|
|
3845
3730
|
bottom: "top",
|
|
@@ -3920,7 +3805,7 @@ function TooltipTrigger({
|
|
|
3920
3805
|
onFocus,
|
|
3921
3806
|
onBlur
|
|
3922
3807
|
}) {
|
|
3923
|
-
const Trigger = asChild ?
|
|
3808
|
+
const Trigger = asChild ? Root : "div";
|
|
3924
3809
|
return /* @__PURE__ */ u(
|
|
3925
3810
|
Trigger,
|
|
3926
3811
|
{
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LucideIcon } from '../../types';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
3
4
|
declare const buttonVariants: (props?: ({
|
|
4
5
|
variant?: "text" | "filled" | "solid" | "outline" | null | undefined;
|
|
5
6
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
@@ -15,7 +16,7 @@ export type ButtonProps = {
|
|
|
15
16
|
startIcon?: LucideIcon;
|
|
16
17
|
endIcon?: LucideIcon;
|
|
17
18
|
label?: string;
|
|
18
|
-
} & ButtonVariantsProps & ButtonIconProps &
|
|
19
|
+
} & ButtonVariantsProps & ButtonIconProps & ComponentPropsWithoutRef<'button'>;
|
|
19
20
|
export declare const Button: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<ButtonProps> & {
|
|
20
21
|
ref?: import('preact').Ref<HTMLButtonElement> | undefined;
|
|
21
22
|
}>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
1
2
|
export type CheckboxAlign = 'left' | 'right';
|
|
2
3
|
export type CheckboxChecked = boolean | 'indeterminate';
|
|
3
4
|
export type CheckboxProps = {
|
|
@@ -14,7 +15,7 @@ export type CheckboxProps = {
|
|
|
14
15
|
name?: string;
|
|
15
16
|
value?: string;
|
|
16
17
|
onCheckedChange?: (checked: CheckboxChecked) => void;
|
|
17
|
-
} & Omit<
|
|
18
|
+
} & Omit<ComponentPropsWithoutRef<'input'>, 'type' | 'readOnly' | 'disabled' | 'onChange' | 'checked' | 'defaultChecked' | 'required' | 'name' | 'value'>;
|
|
18
19
|
export declare const Checkbox: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<CheckboxProps> & {
|
|
19
20
|
ref?: import('preact').Ref<HTMLInputElement> | undefined;
|
|
20
21
|
}>;
|
|
@@ -16,7 +16,7 @@ export type DialogPortalProps = {
|
|
|
16
16
|
export type DialogOverlayProps = {
|
|
17
17
|
className?: string;
|
|
18
18
|
forceMount?: boolean;
|
|
19
|
-
} &
|
|
19
|
+
} & ComponentPropsWithoutRef<'div'>;
|
|
20
20
|
export type DialogContentProps = {
|
|
21
21
|
className?: string;
|
|
22
22
|
children?: ReactNode;
|
|
@@ -26,7 +26,7 @@ export type DialogContentProps = {
|
|
|
26
26
|
onInteractOutside?: (event: Event) => void;
|
|
27
27
|
onOpenAutoFocus?: (event: Event) => void;
|
|
28
28
|
onCloseAutoFocus?: (event: Event) => void;
|
|
29
|
-
} &
|
|
29
|
+
} & ComponentPropsWithoutRef<'div'>;
|
|
30
30
|
export type DialogHeaderProps = {
|
|
31
31
|
className?: string;
|
|
32
32
|
children?: ReactNode;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ButtonIconProps, ButtonVariantsProps } from '../button';
|
|
2
2
|
import { LucideIcon } from '../../types';
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
4
5
|
export type IconButtonVariantsProps = VariantProps<typeof iconButtonVariants> & ButtonVariantsProps & ButtonIconProps;
|
|
5
6
|
export type IconButtonVariant = NonNullable<IconButtonVariantsProps['variant']>;
|
|
6
7
|
export type IconButtonSize = NonNullable<IconButtonVariantsProps['size']>;
|
|
@@ -11,7 +12,7 @@ declare const iconButtonVariants: (props?: ({
|
|
|
11
12
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
12
13
|
export type IconButtonProps = {
|
|
13
14
|
icon: LucideIcon;
|
|
14
|
-
} & IconButtonVariantsProps &
|
|
15
|
+
} & IconButtonVariantsProps & ComponentPropsWithoutRef<'button'>;
|
|
15
16
|
export declare const IconButton: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<IconButtonProps> & {
|
|
16
17
|
ref?: import('preact').Ref<HTMLButtonElement> | undefined;
|
|
17
18
|
}>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactElement } from 'react';
|
|
1
2
|
export type InputProps = {
|
|
2
3
|
className?: string;
|
|
3
4
|
label?: string;
|
|
4
5
|
description?: string;
|
|
5
6
|
error?: string;
|
|
6
|
-
startAddon?: string |
|
|
7
|
-
endAddon?: string |
|
|
7
|
+
startAddon?: string | ReactElement;
|
|
8
|
+
endAddon?: string | ReactElement;
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
readOnly?: boolean;
|
|
10
|
-
} &
|
|
11
|
+
} & ComponentPropsWithoutRef<'input'>;
|
|
11
12
|
export declare const Input: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<InputProps> & {
|
|
12
13
|
ref?: import('preact').Ref<HTMLInputElement> | undefined;
|
|
13
14
|
}>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { LucideIcon } from '../../types';
|
|
2
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
3
|
export type LinkProps = {
|
|
3
4
|
href: string;
|
|
4
5
|
external?: boolean | 'auto';
|
|
5
6
|
newTab?: boolean;
|
|
6
7
|
leftIcon?: LucideIcon | boolean;
|
|
7
8
|
rightIcon?: LucideIcon | boolean;
|
|
8
|
-
} &
|
|
9
|
+
} & ComponentPropsWithoutRef<'a'>;
|
|
9
10
|
export declare const Link: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<LinkProps> & {
|
|
10
11
|
ref?: import('preact').Ref<HTMLAnchorElement> | undefined;
|
|
11
12
|
}>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ReactElement, ReactNode } from 'react';
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactElement, ReactNode } from 'react';
|
|
2
2
|
export type ListItemProps = {
|
|
3
3
|
className?: string;
|
|
4
4
|
selected?: boolean;
|
|
5
5
|
children: ReactNode;
|
|
6
|
-
} &
|
|
6
|
+
} & ComponentPropsWithoutRef<'div'>;
|
|
7
7
|
export type ListItemLeftProps = {
|
|
8
8
|
children?: ReactNode;
|
|
9
9
|
className?: string;
|
|
10
|
-
} &
|
|
10
|
+
} & ComponentPropsWithoutRef<'div'>;
|
|
11
11
|
export type ListItemContentProps = {
|
|
12
12
|
className?: string;
|
|
13
13
|
children: ReactNode;
|
|
14
|
-
} &
|
|
14
|
+
} & ComponentPropsWithoutRef<'div'>;
|
|
15
15
|
export type ListItemDefaultContentProps = {
|
|
16
16
|
className?: string;
|
|
17
17
|
label?: string;
|
|
@@ -22,7 +22,7 @@ export type ListItemDefaultContentProps = {
|
|
|
22
22
|
export type ListItemRightProps = {
|
|
23
23
|
children?: ReactNode;
|
|
24
24
|
className?: string;
|
|
25
|
-
} &
|
|
25
|
+
} & ComponentPropsWithoutRef<'div'>;
|
|
26
26
|
export declare const ListItemLeft: ({ children, className, ...props }: ListItemLeftProps) => ReactElement<ListItemLeftProps>;
|
|
27
27
|
export declare const ListItemContent: {
|
|
28
28
|
({ className, children, ...props }: ListItemContentProps): ReactElement<ListItemContentProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactElement, ReactNode } from 'react';
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactElement, ReactNode, Ref } from 'react';
|
|
2
2
|
export type ListboxProps<Data = unknown> = {
|
|
3
3
|
className?: string;
|
|
4
4
|
label?: string;
|
|
@@ -25,9 +25,9 @@ export type ListboxProps<Data = unknown> = {
|
|
|
25
25
|
* (memoized or defined outside component) to prevent performance issues.
|
|
26
26
|
*/
|
|
27
27
|
getValue: (data: Readonly<Data>) => string;
|
|
28
|
-
} &
|
|
28
|
+
} & ComponentPropsWithoutRef<'ul'>;
|
|
29
29
|
export declare const Listbox: {
|
|
30
30
|
displayName: "Listbox";
|
|
31
31
|
} & (<Data = unknown>(props: ListboxProps<Data> & {
|
|
32
|
-
ref?:
|
|
32
|
+
ref?: Ref<HTMLUListElement>;
|
|
33
33
|
}) => ReactElement);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
1
2
|
export type SearchInputProps = {
|
|
2
3
|
className?: string;
|
|
3
4
|
value?: string;
|
|
@@ -7,7 +8,7 @@ export type SearchInputProps = {
|
|
|
7
8
|
onChange?: (value: string) => void;
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
readOnly?: boolean;
|
|
10
|
-
} & Omit<
|
|
11
|
+
} & Omit<ComponentPropsWithoutRef<'div'>, 'className' | 'value' | 'defaultValue' | 'onChange' | 'disabled' | 'readOnly'>;
|
|
11
12
|
export declare const SearchInput: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<SearchInputProps> & {
|
|
12
13
|
ref?: import('preact').Ref<HTMLInputElement> | undefined;
|
|
13
14
|
}>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactElement } from 'react';
|
|
2
2
|
export type SeparatorProps = {
|
|
3
3
|
className?: string;
|
|
4
4
|
label?: string;
|
|
5
5
|
decorative?: boolean;
|
|
6
|
-
} &
|
|
6
|
+
} & ComponentPropsWithoutRef<'div'>;
|
|
7
7
|
export declare const Separator: {
|
|
8
8
|
({ className, label, decorative, ...props }: SeparatorProps): ReactElement;
|
|
9
9
|
displayName: string;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function
|
|
1
|
+
import { ForwardedRef, Ref } from 'react';
|
|
2
|
+
export declare function setRef<T>(ref: Ref<T> | undefined, value: T | null): void;
|
|
3
|
+
export declare function useComposedRefs<T>(...refs: (Ref<T> | undefined)[]): ForwardedRef<T>;
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
type Signalish<T> = T | SignalLike<T>;
|
|
2
|
+
type SignalLike<T> = {
|
|
3
|
+
value: T;
|
|
4
|
+
peek(): T;
|
|
5
|
+
subscribe(fn: (value: T) => void): () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function unwrap<T>(v: Signalish<T>): T;
|
|
8
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enonic/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Enonic UI Component Library",
|
|
5
5
|
"author": "Enonic",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,25 +44,19 @@
|
|
|
44
44
|
"./utilities.css": "./dist/styles/utilities.css"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@radix-ui/react-slot": "~1.2.3",
|
|
48
47
|
"class-variance-authority": "~0.7.1",
|
|
49
48
|
"clsx": "~2.1.1",
|
|
50
|
-
"focus-trap-react": "~11.0.4",
|
|
51
49
|
"tailwind-merge": "~3.3.1"
|
|
52
50
|
},
|
|
53
51
|
"peerDependencies": {
|
|
54
|
-
"@
|
|
52
|
+
"@radix-ui/react-slot": "^1.2.0",
|
|
53
|
+
"focus-trap-react": "^11.0.0",
|
|
54
|
+
"lucide-react": ">=0.500.0",
|
|
55
55
|
"preact": ">=10.0.0",
|
|
56
|
-
"react": "
|
|
57
|
-
"react-dom": "
|
|
56
|
+
"react": "^19.0.0",
|
|
57
|
+
"react-dom": "^19.0.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependenciesMeta": {
|
|
60
|
-
"@preact/compat": {
|
|
61
|
-
"optional": true
|
|
62
|
-
},
|
|
63
|
-
"lucide-preact": {
|
|
64
|
-
"optional": true
|
|
65
|
-
},
|
|
66
60
|
"preact": {
|
|
67
61
|
"optional": true
|
|
68
62
|
},
|