@enonic/ui 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -17
- package/dist/enonic-ui.cjs +5 -5
- package/dist/enonic-ui.es.js +84 -143
- package/dist/types/lib/utils.d.ts +2 -0
- package/dist/types/ui/button/button.d.ts +11 -15
- package/dist/types/ui/button/index.d.ts +1 -1
- package/dist/types/ui/icon-button/icon-button.d.ts +15 -14
- package/dist/types/ui/input/input.d.ts +4 -31
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,11 +4,21 @@ A modern UI component library built with Preact/React, TypeScript, and Tailwind
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
+
#### NPM
|
|
8
|
+
|
|
7
9
|
```bash
|
|
8
10
|
npm install @enonic/ui
|
|
9
|
-
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
#### PNPM
|
|
14
|
+
|
|
15
|
+
```bash
|
|
10
16
|
pnpm add @enonic/ui
|
|
11
|
-
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
#### Yarn
|
|
20
|
+
|
|
21
|
+
```bash
|
|
12
22
|
yarn add @enonic/ui
|
|
13
23
|
```
|
|
14
24
|
|
|
@@ -43,8 +53,8 @@ If you only need the CSS styles:
|
|
|
43
53
|
## Components
|
|
44
54
|
|
|
45
55
|
- **Button** - Versatile button component with multiple variants and sizes
|
|
46
|
-
- **Input** - Form input component with built-in validation states
|
|
47
56
|
- **IconButton** - Button component optimized for icon usage
|
|
57
|
+
- **Input** - Form input component with built-in validation states
|
|
48
58
|
|
|
49
59
|
## Peer Dependencies
|
|
50
60
|
|
|
@@ -54,8 +64,8 @@ This library requires one of the following frameworks:
|
|
|
54
64
|
|
|
55
65
|
```json
|
|
56
66
|
{
|
|
57
|
-
"react": ">=
|
|
58
|
-
"react-dom": ">=
|
|
67
|
+
"react": ">=18.0.0 || >=19.0.0",
|
|
68
|
+
"react-dom": ">=18.0.0 || >=19.0.0"
|
|
59
69
|
}
|
|
60
70
|
```
|
|
61
71
|
|
|
@@ -64,7 +74,7 @@ This library requires one of the following frameworks:
|
|
|
64
74
|
```json
|
|
65
75
|
{
|
|
66
76
|
"preact": ">=10.0.0",
|
|
67
|
-
"@preact/compat": ">=17.0.0"
|
|
77
|
+
"@preact/compat": ">=17.0.0 || >=18.0.0"
|
|
68
78
|
}
|
|
69
79
|
```
|
|
70
80
|
|
|
@@ -106,14 +116,4 @@ pnpm size
|
|
|
106
116
|
|
|
107
117
|
## License
|
|
108
118
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
## Contributing
|
|
112
|
-
|
|
113
|
-
See [Contributing Guide](https://github.com/enonic/enonic-ui/blob/main/CONTRIBUTING.md)
|
|
114
|
-
|
|
115
|
-
## Links
|
|
116
|
-
|
|
117
|
-
- [Documentation](https://github.com/enonic/enonic-ui#readme)
|
|
118
|
-
- [Storybook](https://enonic.github.io/enonic-ui)
|
|
119
|
-
- [Issue Tracker](https://github.com/enonic/enonic-ui/issues)
|
|
119
|
+
MIT
|
package/dist/enonic-ui.cjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("preact"),r=require("react");function o(e){var r,t,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(r=0;r<n;r++)e[r]&&(t=o(e[r]))&&(a&&(a+=" "),a+=t)}else for(t in e)e[t]&&(a&&(a+=" "),a+=t);return a}function t(){for(var e,r,t=0,a="",n=arguments.length;t<n;t++)(e=arguments[t])&&(r=o(e))&&(a&&(a+=" "),a+=r);return a}const a=e=>{const r=l(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:t}=e;return{getClassGroupId:e=>{const o=e.split("-");return""===o[0]&&1!==o.length&&o.shift(),n(o,r)||i(e)},getConflictingClassGroupIds:(e,r)=>{const a=o[e]||[];return r&&t[e]?[...a,...t[e]]:a}}},n=(e,r)=>{var o;if(0===e.length)return r.classGroupId;const t=e[0],a=r.nextPart.get(t),s=a?n(e.slice(1),a):void 0;if(s)return s;if(0===r.validators.length)return;const i=e.join("-");return null==(o=r.validators.find(({validator:e})=>e(i)))?void 0:o.classGroupId},s=/^\[(.+)\]$/,i=e=>{if(s.test(e)){const r=s.exec(e)[1],o=null==r?void 0:r.substring(0,r.indexOf(":"));if(o)return"arbitrary.."+o}},l=e=>{const{theme:r,classGroups:o}=e,t={nextPart:new Map,validators:[]};for(const a in o)d(o[a],t,a,r);return t},d=(e,r,o,t)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?r:c(r,e)).classGroupId=o)}if("function"==typeof e)return m(e)?void d(e(t),r,o,t):void r.validators.push({validator:e,classGroupId:o});Object.entries(e).forEach(([e,a])=>{d(a,c(r,e),o,t)})})},c=(e,r)=>{let o=e;return r.split("-").forEach(e=>{o.nextPart.has(e)||o.nextPart.set(e,{nextPart:new Map,validators:[]}),o=o.nextPart.get(e)}),o},m=e=>e.isThemeGetter,u=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,o=new Map,t=new Map;const a=(a,n)=>{o.set(a,n),r++,r>e&&(r=0,t=o,o=new Map)};return{get(e){let r=o.get(e);return void 0!==r?r:void 0!==(r=t.get(e))?(a(e,r),r):void 0},set(e,r){o.has(e)?o.set(e,r):a(e,r)}}},p=e=>{const{prefix:r,experimentalParseClassName:o}=e;let t=e=>{const r=[];let o,t=0,a=0,n=0;for(let l=0;l<e.length;l++){let s=e[l];if(0===t&&0===a){if(":"===s){r.push(e.slice(n,l)),n=l+1;continue}if("/"===s){o=l;continue}}"["===s?t++:"]"===s?t--:"("===s?a++:")"===s&&a--}const s=0===r.length?e:e.substring(n),i=b(s);return{modifiers:r,hasImportantModifier:i!==s,baseClassName:i,maybePostfixModifierPosition:o&&o>n?o-n:void 0}};if(r){const e=r+":",o=t;t=r=>r.startsWith(e)?o(r.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:r,maybePostfixModifierPosition:void 0}}if(o){const e=t;t=r=>o({className:r,parseClassName:e})}return t},b=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,f=e=>{const r=Object.fromEntries(e.orderSensitiveModifiers.map(e=>[e,!0]));return e=>{if(e.length<=1)return e;const o=[];let t=[];return e.forEach(e=>{"["===e[0]||r[e]?(o.push(...t.sort(),e),t=[]):t.push(e)}),o.push(...t.sort()),o}},g=/\s+/;function h(){let e,r,o=0,t="";for(;o<arguments.length;)(e=arguments[o++])&&(r=v(e))&&(t&&(t+=" "),t+=r);return t}const v=e=>{if("string"==typeof e)return e;let r,o="";for(let t=0;t<e.length;t++)e[t]&&(r=v(e[t]))&&(o&&(o+=" "),o+=r);return o};function x(e,...r){let o,t,n,s=function(l){const d=r.reduce((e,r)=>r(e),e());return o=(e=>({cache:u(e.cacheSize),parseClassName:p(e),sortModifiers:f(e),...a(e)}))(d),t=o.cache.get,n=o.cache.set,s=i,i(l)};function i(e){const r=t(e);if(r)return r;const a=((e,r)=>{const{parseClassName:o,getClassGroupId:t,getConflictingClassGroupIds:a,sortModifiers:n}=r,s=[],i=e.trim().split(g);let l="";for(let d=i.length-1;d>=0;d-=1){const e=i[d],{isExternal:r,modifiers:c,hasImportantModifier:m,baseClassName:u,maybePostfixModifierPosition:p}=o(e);if(r){l=e+(l.length>0?" "+l:l);continue}let b=!!p,f=t(b?u.substring(0,p):u);if(!f){if(!b){l=e+(l.length>0?" "+l:l);continue}if(f=t(u),!f){l=e+(l.length>0?" "+l:l);continue}b=!1}const g=n(c).join(":"),h=m?g+"!":g,v=h+f;if(s.includes(v))continue;s.push(v);const x=a(f,b);for(let o=0;o<x.length;++o){const e=x[o];s.push(h+e)}l=e+(l.length>0?" "+l:l)}return l})(e,o);return n(e,a),a}return function(){return s(h.apply(null,arguments))}}const k=e=>{const r=r=>r[e]||[];return r.isThemeGetter=!0,r},y=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,w=/^\((?:(\w[\w-]*):)?(.+)\)$/i,z=/^\d+\/\d+$/,N=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,C=/\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$/,j=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,M=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,I=e=>z.test(e),G=e=>!!e&&!Number.isNaN(Number(e)),P=e=>!!e&&Number.isInteger(Number(e)),A=e=>e.endsWith("%")&&G(e.slice(0,-1)),$=e=>N.test(e),V=()=>!0,q=e=>C.test(e)&&!j.test(e),E=()=>!1,O=e=>M.test(e),W=e=>_.test(e),L=e=>!B(e)&&!H(e),S=e=>ee(e,ae,E),B=e=>y.test(e),F=e=>ee(e,ne,q),T=e=>ee(e,se,G),R=e=>ee(e,oe,E),U=e=>ee(e,te,W),Z=e=>ee(e,le,O),H=e=>w.test(e),D=e=>re(e,ne),J=e=>re(e,ie),K=e=>re(e,oe),Q=e=>re(e,ae),X=e=>re(e,te),Y=e=>re(e,le,!0),ee=(e,r,o)=>{const t=y.exec(e);return!!t&&(t[1]?r(t[1]):o(t[2]))},re=(e,r,o=!1)=>{const t=w.exec(e);return!!t&&(t[1]?r(t[1]):o)},oe=e=>"position"===e||"percentage"===e,te=e=>"image"===e||"url"===e,ae=e=>"length"===e||"size"===e||"bg-size"===e,ne=e=>"length"===e,se=e=>"number"===e,ie=e=>"family-name"===e,le=e=>"shadow"===e,de=x(()=>{const e=k("color"),r=k("font"),o=k("text"),t=k("font-weight"),a=k("tracking"),n=k("leading"),s=k("breakpoint"),i=k("container"),l=k("spacing"),d=k("radius"),c=k("shadow"),m=k("inset-shadow"),u=k("text-shadow"),p=k("drop-shadow"),b=k("blur"),f=k("perspective"),g=k("aspect"),h=k("ease"),v=k("animate"),x=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",H,B],y=()=>[H,B,l],w=()=>[I,"full","auto",...y()],z=()=>[P,"none","subgrid",H,B],N=()=>["auto",{span:["full",P,H,B]},P,H,B],C=()=>[P,"auto",H,B],j=()=>["auto","min","max","fr",H,B],M=()=>["auto",...y()],_=()=>[I,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...y()],q=()=>[e,H,B],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",K,R,{position:[H,B]}],O=()=>["auto","cover","contain",Q,S,{size:[H,B]}],W=()=>[A,D,F],ee=()=>["","none","full",d,H,B],re=()=>["",G,D,F],oe=()=>[G,A,K,R],te=()=>["","none",b,H,B],ae=()=>["none",G,H,B],ne=()=>["none",G,H,B],se=()=>[G,H,B],ie=()=>[I,"full",...y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[$],breakpoint:[$],color:[V],container:[$],"drop-shadow":[$],ease:["in","out","in-out"],font:[L],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[$],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[$],shadow:[$],spacing:["px",G],text:[$],"text-shadow":[$],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",I,B,H,g]}],container:["container"],columns:[{columns:[G,B,H,i]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:x()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset: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:[P,"auto",H,B]}],basis:[{basis:[I,"full","auto",i,...y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[G,I,"auto","initial","none",B]}],grow:[{grow:["",G,H,B]}],shrink:[{shrink:["",G,H,B]}],order:[{order:[P,"first","last","none",H,B]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":z()}],"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":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:_()}],w:[{w:[i,"screen",..._()]}],"min-w":[{"min-w":[i,"screen","none",..._()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},..._()]}],h:[{h:["screen","lh",..._()]}],"min-h":[{"min-h":["screen","lh","none",..._()]}],"max-h":[{"max-h":["screen","lh",..._()]}],"font-size":[{text:["base",o,D,F]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[t,H,T]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",A,B]}],"font-family":[{font:[J,B,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:[a,H,B]}],"line-clamp":[{"line-clamp":[G,"none",H,T]}],leading:[{leading:[n,...y()]}],"list-image":[{"list-image":["none",H,B]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",H,B]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:q()}],"text-color":[{text:q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[G,"from-font","auto",H,F]}],"text-decoration-color":[{decoration:q()}],"underline-offset":[{"underline-offset":[G,"auto",H,B]}],"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",H,B]}],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",H,B]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:E()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:O()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},P,H,B],radial:["",H,B],conic:[P,H,B]},X,U]}],"bg-color":[{bg:q()}],"gradient-from-pos":[{from:W()}],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:q()}],"gradient-via":[{via:q()}],"gradient-to":[{to:q()}],rounded:[{rounded:ee()}],"rounded-s":[{"rounded-s":ee()}],"rounded-e":[{"rounded-e":ee()}],"rounded-t":[{"rounded-t":ee()}],"rounded-r":[{"rounded-r":ee()}],"rounded-b":[{"rounded-b":ee()}],"rounded-l":[{"rounded-l":ee()}],"rounded-ss":[{"rounded-ss":ee()}],"rounded-se":[{"rounded-se":ee()}],"rounded-ee":[{"rounded-ee":ee()}],"rounded-es":[{"rounded-es":ee()}],"rounded-tl":[{"rounded-tl":ee()}],"rounded-tr":[{"rounded-tr":ee()}],"rounded-br":[{"rounded-br":ee()}],"rounded-bl":[{"rounded-bl":ee()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"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:q()}],"border-color-x":[{"border-x":q()}],"border-color-y":[{"border-y":q()}],"border-color-s":[{"border-s":q()}],"border-color-e":[{"border-e":q()}],"border-color-t":[{"border-t":q()}],"border-color-r":[{"border-r":q()}],"border-color-b":[{"border-b":q()}],"border-color-l":[{"border-l":q()}],"divide-color":[{divide:q()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[G,H,B]}],"outline-w":[{outline:["",G,D,F]}],"outline-color":[{outline:q()}],shadow:[{shadow:["","none",c,Y,Z]}],"shadow-color":[{shadow:q()}],"inset-shadow":[{"inset-shadow":["none",m,Y,Z]}],"inset-shadow-color":[{"inset-shadow":q()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:q()}],"ring-offset-w":[{"ring-offset":[G,F]}],"ring-offset-color":[{"ring-offset":q()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":q()}],"text-shadow":[{"text-shadow":["none",u,Y,Z]}],"text-shadow-color":[{"text-shadow":q()}],opacity:[{opacity:[G,H,B]}],"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":[G]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":q()}],"mask-image-linear-to-color":[{"mask-linear-to":q()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":q()}],"mask-image-t-to-color":[{"mask-t-to":q()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":q()}],"mask-image-r-to-color":[{"mask-r-to":q()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":q()}],"mask-image-b-to-color":[{"mask-b-to":q()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":q()}],"mask-image-l-to-color":[{"mask-l-to":q()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":q()}],"mask-image-x-to-color":[{"mask-x-to":q()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":q()}],"mask-image-y-to-color":[{"mask-y-to":q()}],"mask-image-radial":[{"mask-radial":[H,B]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":q()}],"mask-image-radial-to-color":[{"mask-radial-to":q()}],"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":[G]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":q()}],"mask-image-conic-to-color":[{"mask-conic-to":q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:E()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:O()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",H,B]}],filter:[{filter:["","none",H,B]}],blur:[{blur:te()}],brightness:[{brightness:[G,H,B]}],contrast:[{contrast:[G,H,B]}],"drop-shadow":[{"drop-shadow":["","none",p,Y,Z]}],"drop-shadow-color":[{"drop-shadow":q()}],grayscale:[{grayscale:["",G,H,B]}],"hue-rotate":[{"hue-rotate":[G,H,B]}],invert:[{invert:["",G,H,B]}],saturate:[{saturate:[G,H,B]}],sepia:[{sepia:["",G,H,B]}],"backdrop-filter":[{"backdrop-filter":["","none",H,B]}],"backdrop-blur":[{"backdrop-blur":te()}],"backdrop-brightness":[{"backdrop-brightness":[G,H,B]}],"backdrop-contrast":[{"backdrop-contrast":[G,H,B]}],"backdrop-grayscale":[{"backdrop-grayscale":["",G,H,B]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[G,H,B]}],"backdrop-invert":[{"backdrop-invert":["",G,H,B]}],"backdrop-opacity":[{"backdrop-opacity":[G,H,B]}],"backdrop-saturate":[{"backdrop-saturate":[G,H,B]}],"backdrop-sepia":[{"backdrop-sepia":["",G,H,B]}],"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",H,B]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[G,"initial",H,B]}],ease:[{ease:["linear","initial",h,H,B]}],delay:[{delay:[G,H,B]}],animate:[{animate:["none",v,H,B]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,H,B]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[H,B,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ie()}],"translate-x":[{"translate-x":ie()}],"translate-y":[{"translate-y":ie()}],"translate-z":[{"translate-z":ie()}],"translate-none":["translate-none"],accent:[{accent:q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:q()}],"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",H,B]}],"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",H,B]}],fill:[{fill:["none",...q()]}],"stroke-w":[{stroke:[G,D,F,T]}],stroke:[{stroke:["none",...q()]}],"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 ce(...e){return de(t(e))}var me=0;function ue(r,o,t,a,n,s){o||(o={});var i,l,d=o;if("ref"in d)for(l in d={},o)"ref"==l?i=o[l]:d[l]=o[l];var c={type:r,props:d,key:t,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--me,__i:-1,__u:0,__source:n,__self:s};if("function"==typeof r&&(i=r.defaultProps))for(l in i)void 0===d[l]&&(d[l]=i[l]);return e.options.vnode&&e.options.vnode(c),c}const pe=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,be=t,fe=(e,r)=>o=>{var t;if(null==(null==r?void 0:r.variants))return be(e,null==o?void 0:o.class,null==o?void 0:o.className);const{variants:a,defaultVariants:n}=r,s=Object.keys(a).map(e=>{const r=null==o?void 0:o[e],t=null==n?void 0:n[e];if(null===r)return null;const s=pe(r)||pe(t);return a[e][s]}),i=o&&Object.entries(o).reduce((e,r)=>{let[o,t]=r;return void 0===t||(e[o]=t),e},{}),l=null==r||null===(t=r.compoundVariants)||void 0===t?void 0:t.reduce((e,r)=>{let{class:o,className:t,...a}=r;return Object.entries(a).every(e=>{let[r,o]=e;return Array.isArray(o)?o.includes({...n,...i}[r]):{...n,...i}[r]===o})?[...e,o,t]:e},[]);return be(e,s,l,null==o?void 0:o.class,null==o?void 0:o.className)},ge=fe(["inline-flex items-center justify-center","text-main dark:text-main font-medium","box-border rounded-sm transition-highlight duration-100","focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-0","disabled:pointer-events-none disabled:opacity-30","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-rev dark:text-main 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"}});function he({className:e,variant:r="text",size:o="md",startIcon:t,label:a,endIcon:n,title:s,disabled:i=!1,onClick:l}){const d=t,c=n,m=(e=>{switch(e){case"sm":return 16;case"md":return 18;case"lg":return 20}})(o??"md");return ue("button",{type:"button",className:ce(ge({variant:r,size:o}),e??""),title:s,onClick:l,disabled:i,"aria-label":s??a,"aria-disabled":i,children:[d&&ue(d,{size:m}),a,c&&ue(c,{size:m})]})}const ve=fe(["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"}});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("preact"),r=require("react");function o(e){var r,t,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(r=0;r<n;r++)e[r]&&(t=o(e[r]))&&(a&&(a+=" "),a+=t)}else for(t in e)e[t]&&(a&&(a+=" "),a+=t);return a}function t(){for(var e,r,t=0,a="",n=arguments.length;t<n;t++)(e=arguments[t])&&(r=o(e))&&(a&&(a+=" "),a+=r);return a}const a=e=>{const r=l(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:t}=e;return{getClassGroupId:e=>{const o=e.split("-");return""===o[0]&&1!==o.length&&o.shift(),n(o,r)||i(e)},getConflictingClassGroupIds:(e,r)=>{const a=o[e]||[];return r&&t[e]?[...a,...t[e]]:a}}},n=(e,r)=>{var o;if(0===e.length)return r.classGroupId;const t=e[0],a=r.nextPart.get(t),s=a?n(e.slice(1),a):void 0;if(s)return s;if(0===r.validators.length)return;const i=e.join("-");return null==(o=r.validators.find(({validator:e})=>e(i)))?void 0:o.classGroupId},s=/^\[(.+)\]$/,i=e=>{if(s.test(e)){const r=s.exec(e)[1],o=null==r?void 0:r.substring(0,r.indexOf(":"));if(o)return"arbitrary.."+o}},l=e=>{const{theme:r,classGroups:o}=e,t={nextPart:new Map,validators:[]};for(const a in o)d(o[a],t,a,r);return t},d=(e,r,o,t)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?r:c(r,e)).classGroupId=o)}if("function"==typeof e)return m(e)?void d(e(t),r,o,t):void r.validators.push({validator:e,classGroupId:o});Object.entries(e).forEach(([e,a])=>{d(a,c(r,e),o,t)})})},c=(e,r)=>{let o=e;return r.split("-").forEach(e=>{o.nextPart.has(e)||o.nextPart.set(e,{nextPart:new Map,validators:[]}),o=o.nextPart.get(e)}),o},m=e=>e.isThemeGetter,u=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,o=new Map,t=new Map;const a=(a,n)=>{o.set(a,n),r++,r>e&&(r=0,t=o,o=new Map)};return{get(e){let r=o.get(e);return void 0!==r?r:void 0!==(r=t.get(e))?(a(e,r),r):void 0},set(e,r){o.has(e)?o.set(e,r):a(e,r)}}},p=e=>{const{prefix:r,experimentalParseClassName:o}=e;let t=e=>{const r=[];let o,t=0,a=0,n=0;for(let l=0;l<e.length;l++){let s=e[l];if(0===t&&0===a){if(":"===s){r.push(e.slice(n,l)),n=l+1;continue}if("/"===s){o=l;continue}}"["===s?t++:"]"===s?t--:"("===s?a++:")"===s&&a--}const s=0===r.length?e:e.substring(n),i=b(s);return{modifiers:r,hasImportantModifier:i!==s,baseClassName:i,maybePostfixModifierPosition:o&&o>n?o-n:void 0}};if(r){const e=r+":",o=t;t=r=>r.startsWith(e)?o(r.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:r,maybePostfixModifierPosition:void 0}}if(o){const e=t;t=r=>o({className:r,parseClassName:e})}return t},b=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,f=e=>{const r=Object.fromEntries(e.orderSensitiveModifiers.map(e=>[e,!0]));return e=>{if(e.length<=1)return e;const o=[];let t=[];return e.forEach(e=>{"["===e[0]||r[e]?(o.push(...t.sort(),e),t=[]):t.push(e)}),o.push(...t.sort()),o}},g=/\s+/;function h(){let e,r,o=0,t="";for(;o<arguments.length;)(e=arguments[o++])&&(r=v(e))&&(t&&(t+=" "),t+=r);return t}const v=e=>{if("string"==typeof e)return e;let r,o="";for(let t=0;t<e.length;t++)e[t]&&(r=v(e[t]))&&(o&&(o+=" "),o+=r);return o};function x(e,...r){let o,t,n,s=function(l){const d=r.reduce((e,r)=>r(e),e());return o=(e=>({cache:u(e.cacheSize),parseClassName:p(e),sortModifiers:f(e),...a(e)}))(d),t=o.cache.get,n=o.cache.set,s=i,i(l)};function i(e){const r=t(e);if(r)return r;const a=((e,r)=>{const{parseClassName:o,getClassGroupId:t,getConflictingClassGroupIds:a,sortModifiers:n}=r,s=[],i=e.trim().split(g);let l="";for(let d=i.length-1;d>=0;d-=1){const e=i[d],{isExternal:r,modifiers:c,hasImportantModifier:m,baseClassName:u,maybePostfixModifierPosition:p}=o(e);if(r){l=e+(l.length>0?" "+l:l);continue}let b=!!p,f=t(b?u.substring(0,p):u);if(!f){if(!b){l=e+(l.length>0?" "+l:l);continue}if(f=t(u),!f){l=e+(l.length>0?" "+l:l);continue}b=!1}const g=n(c).join(":"),h=m?g+"!":g,v=h+f;if(s.includes(v))continue;s.push(v);const x=a(f,b);for(let o=0;o<x.length;++o){const e=x[o];s.push(h+e)}l=e+(l.length>0?" "+l:l)}return l})(e,o);return n(e,a),a}return function(){return s(h.apply(null,arguments))}}const k=e=>{const r=r=>r[e]||[];return r.isThemeGetter=!0,r},y=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,w=/^\((?:(\w[\w-]*):)?(.+)\)$/i,z=/^\d+\/\d+$/,N=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,j=/\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$/,C=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,M=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,I=e=>z.test(e),G=e=>!!e&&!Number.isNaN(Number(e)),P=e=>!!e&&Number.isInteger(Number(e)),A=e=>e.endsWith("%")&&G(e.slice(0,-1)),$=e=>N.test(e),E=()=>!0,O=e=>j.test(e)&&!C.test(e),V=()=>!1,W=e=>_.test(e),q=e=>M.test(e),S=e=>!R(e)&&!H(e),B=e=>ee(e,ae,V),R=e=>y.test(e),L=e=>ee(e,ne,O),T=e=>ee(e,se,G),U=e=>ee(e,oe,V),Z=e=>ee(e,te,q),F=e=>ee(e,le,W),H=e=>w.test(e),D=e=>re(e,ne),J=e=>re(e,ie),K=e=>re(e,oe),Q=e=>re(e,ae),X=e=>re(e,te),Y=e=>re(e,le,!0),ee=(e,r,o)=>{const t=y.exec(e);return!!t&&(t[1]?r(t[1]):o(t[2]))},re=(e,r,o=!1)=>{const t=w.exec(e);return!!t&&(t[1]?r(t[1]):o)},oe=e=>"position"===e||"percentage"===e,te=e=>"image"===e||"url"===e,ae=e=>"length"===e||"size"===e||"bg-size"===e,ne=e=>"length"===e,se=e=>"number"===e,ie=e=>"family-name"===e,le=e=>"shadow"===e,de=x(()=>{const e=k("color"),r=k("font"),o=k("text"),t=k("font-weight"),a=k("tracking"),n=k("leading"),s=k("breakpoint"),i=k("container"),l=k("spacing"),d=k("radius"),c=k("shadow"),m=k("inset-shadow"),u=k("text-shadow"),p=k("drop-shadow"),b=k("blur"),f=k("perspective"),g=k("aspect"),h=k("ease"),v=k("animate"),x=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",H,R],y=()=>[H,R,l],w=()=>[I,"full","auto",...y()],z=()=>[P,"none","subgrid",H,R],N=()=>["auto",{span:["full",P,H,R]},P,H,R],j=()=>[P,"auto",H,R],C=()=>["auto","min","max","fr",H,R],_=()=>["auto",...y()],M=()=>[I,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...y()],O=()=>[e,H,R],V=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",K,U,{position:[H,R]}],W=()=>["auto","cover","contain",Q,B,{size:[H,R]}],q=()=>[A,D,L],ee=()=>["","none","full",d,H,R],re=()=>["",G,D,L],oe=()=>[G,A,K,U],te=()=>["","none",b,H,R],ae=()=>["none",G,H,R],ne=()=>["none",G,H,R],se=()=>[G,H,R],ie=()=>[I,"full",...y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[$],breakpoint:[$],color:[E],container:[$],"drop-shadow":[$],ease:["in","out","in-out"],font:[S],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[$],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[$],shadow:[$],spacing:["px",G],text:[$],"text-shadow":[$],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",I,R,H,g]}],container:["container"],columns:[{columns:[G,R,H,i]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:x()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset: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:[P,"auto",H,R]}],basis:[{basis:[I,"full","auto",i,...y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[G,I,"auto","initial","none",R]}],grow:[{grow:["",G,H,R]}],shrink:[{shrink:["",G,H,R]}],order:[{order:[P,"first","last","none",H,R]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":C()}],"auto-rows":[{"auto-rows":C()}],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:_()}],mx:[{mx:_()}],my:[{my:_()}],ms:[{ms:_()}],me:[{me:_()}],mt:[{mt:_()}],mr:[{mr:_()}],mb:[{mb:_()}],ml:[{ml:_()}],"space-x":[{"space-x":y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":y()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[i,"screen",...M()]}],"min-w":[{"min-w":[i,"screen","none",...M()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...M()]}],h:[{h:["screen","lh",...M()]}],"min-h":[{"min-h":["screen","lh","none",...M()]}],"max-h":[{"max-h":["screen","lh",...M()]}],"font-size":[{text:["base",o,D,L]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[t,H,T]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",A,R]}],"font-family":[{font:[J,R,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:[a,H,R]}],"line-clamp":[{"line-clamp":[G,"none",H,T]}],leading:[{leading:[n,...y()]}],"list-image":[{"list-image":["none",H,R]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",H,R]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[G,"from-font","auto",H,L]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[G,"auto",H,R]}],"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",H,R]}],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",H,R]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:V()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},P,H,R],radial:["",H,R],conic:[P,H,R]},X,Z]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:ee()}],"rounded-s":[{"rounded-s":ee()}],"rounded-e":[{"rounded-e":ee()}],"rounded-t":[{"rounded-t":ee()}],"rounded-r":[{"rounded-r":ee()}],"rounded-b":[{"rounded-b":ee()}],"rounded-l":[{"rounded-l":ee()}],"rounded-ss":[{"rounded-ss":ee()}],"rounded-se":[{"rounded-se":ee()}],"rounded-ee":[{"rounded-ee":ee()}],"rounded-es":[{"rounded-es":ee()}],"rounded-tl":[{"rounded-tl":ee()}],"rounded-tr":[{"rounded-tr":ee()}],"rounded-br":[{"rounded-br":ee()}],"rounded-bl":[{"rounded-bl":ee()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"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:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[G,H,R]}],"outline-w":[{outline:["",G,D,L]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",c,Y,F]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",m,Y,F]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[G,L]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",u,Y,F]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[G,H,R]}],"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":[G]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[H,R]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"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":[G]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",H,R]}],filter:[{filter:["","none",H,R]}],blur:[{blur:te()}],brightness:[{brightness:[G,H,R]}],contrast:[{contrast:[G,H,R]}],"drop-shadow":[{"drop-shadow":["","none",p,Y,F]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",G,H,R]}],"hue-rotate":[{"hue-rotate":[G,H,R]}],invert:[{invert:["",G,H,R]}],saturate:[{saturate:[G,H,R]}],sepia:[{sepia:["",G,H,R]}],"backdrop-filter":[{"backdrop-filter":["","none",H,R]}],"backdrop-blur":[{"backdrop-blur":te()}],"backdrop-brightness":[{"backdrop-brightness":[G,H,R]}],"backdrop-contrast":[{"backdrop-contrast":[G,H,R]}],"backdrop-grayscale":[{"backdrop-grayscale":["",G,H,R]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[G,H,R]}],"backdrop-invert":[{"backdrop-invert":["",G,H,R]}],"backdrop-opacity":[{"backdrop-opacity":[G,H,R]}],"backdrop-saturate":[{"backdrop-saturate":[G,H,R]}],"backdrop-sepia":[{"backdrop-sepia":["",G,H,R]}],"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",H,R]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[G,"initial",H,R]}],ease:[{ease:["linear","initial",h,H,R]}],delay:[{delay:[G,H,R]}],animate:[{animate:["none",v,H,R]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,H,R]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[H,R,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ie()}],"translate-x":[{"translate-x":ie()}],"translate-y":[{"translate-y":ie()}],"translate-z":[{"translate-z":ie()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"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",H,R]}],"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",H,R]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[G,D,L,T]}],stroke:[{stroke:["none",...O()]}],"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 ce(...e){return de(t(e))}function me(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}var ue=0;function pe(r,o,t,a,n,s){o||(o={});var i,l,d=o;if("ref"in d)for(l in d={},o)"ref"==l?i=o[l]:d[l]=o[l];var c={type:r,props:d,key:t,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ue,__i:-1,__u:0,__source:n,__self:s};if("function"==typeof r&&(i=r.defaultProps))for(l in i)void 0===d[l]&&(d[l]=i[l]);return e.options.vnode&&e.options.vnode(c),c}const be=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,fe=t,ge=(e,r)=>o=>{var t;if(null==(null==r?void 0:r.variants))return fe(e,null==o?void 0:o.class,null==o?void 0:o.className);const{variants:a,defaultVariants:n}=r,s=Object.keys(a).map(e=>{const r=null==o?void 0:o[e],t=null==n?void 0:n[e];if(null===r)return null;const s=be(r)||be(t);return a[e][s]}),i=o&&Object.entries(o).reduce((e,r)=>{let[o,t]=r;return void 0===t||(e[o]=t),e},{}),l=null==r||null===(t=r.compoundVariants)||void 0===t?void 0:t.reduce((e,r)=>{let{class:o,className:t,...a}=r;return Object.entries(a).every(e=>{let[r,o]=e;return Array.isArray(o)?o.includes({...n,...i}[r]):{...n,...i}[r]===o})?[...e,o,t]:e},[]);return fe(e,s,l,null==o?void 0:o.class,null==o?void 0:o.className)},he=ge(["inline-flex items-center justify-center","text-main dark:text-main font-medium","box-border rounded-sm transition-highlight duration-100","focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-0","disabled:pointer-events-none disabled:opacity-30","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-rev dark:text-main 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"}}),ve=r.forwardRef(({className:e,variant:r="text",size:o="md",startIcon:t,label:a,endIcon:n,title:s,children:i,...l},d)=>{const c=t,m=n,u=(e=>{switch(e){case"sm":return 16;case"md":return 18;case"lg":return 20}})(o??"md");return pe("button",{ref:d,type:"button",className:ce(he({variant:r,size:o}),e),title:s,"aria-label":s??a,"aria-disabled":l.disabled,...l,children:[c&&pe(c,{size:u}),i,a,m&&pe(m,{size:u})]})});ve.displayName="Button";const xe=ge(["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"}}),ke=r.forwardRef(({className:e,variant:r="text",size:o="md",shape:t="square",icon:a,...n},s)=>pe(ve,{ref:s,className:ce(xe({size:o,shape:t}),e),variant:r,size:o,startIcon:a,label:"",...n}));ke.displayName="IconButton";
|
|
2
2
|
/**
|
|
3
3
|
* @license lucide-react v0.525.0 - ISC
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the ISC license.
|
|
6
6
|
* See the LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
|
-
const
|
|
8
|
+
const ye=e=>{const r=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,o)=>o?o.toUpperCase():r.toLowerCase()))(e);return r.charAt(0).toUpperCase()+r.slice(1)},we=(...e)=>e.filter((e,r,o)=>Boolean(e)&&""!==e.trim()&&o.indexOf(e)===r).join(" ").trim(),ze=e=>{for(const r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0};
|
|
9
9
|
/**
|
|
10
10
|
* @license lucide-react v0.525.0 - ISC
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the ISC license.
|
|
13
13
|
* See the LICENSE file in the root directory of this source tree.
|
|
14
14
|
*/
|
|
15
|
-
var
|
|
15
|
+
var Ne={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
|
|
16
16
|
/**
|
|
17
17
|
* @license lucide-react v0.525.0 - ISC
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const
|
|
21
|
+
*/const je=r.forwardRef(({color:e="currentColor",size:o=24,strokeWidth:t=2,absoluteStrokeWidth:a,className:n="",children:s,iconNode:i,...l},d)=>r.createElement("svg",{ref:d,...Ne,width:o,height:o,stroke:e,strokeWidth:a?24*Number(t)/Number(o):t,className:we("lucide",n),...!s&&!ze(l)&&{"aria-hidden":"true"},...l},[...i.map(([e,o])=>r.createElement(e,o)),...Array.isArray(s)?s:[s]])),Ce=(e,o)=>{const t=r.forwardRef(({className:t,...a},n)=>{return r.createElement(je,{ref:n,iconNode:o,className:we(`lucide-${s=ye(e),s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,t),...a});var s});return t.displayName=ye(e),t},_e=Ce("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"}]]),Me=Ce("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"}]]),Ie=ge(["relative flex rounded-sm overflow-hidden","h-10 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 duration-100"],{variants:{state:{default:"border-bdr-subtle focus-within:border-bdr-strong",error:"border-bdr-danger focus-within:border-bdr-danger focus-within:ring-danger/50"},disabled:{true:"pointer-events-none",false:""}},defaultVariants:{state:"default",disabled:!1}}),Ge=ge(["w-full px-3 text-base h-10","text-main bg-alt","placeholder:text-subtle","focus:outline-none","disabled:pointer-events-none","read-only:bg-surface-primary","border-0"]),Pe=ge(["block text-base font-semibold text-main"],{variants:{disabled:{true:"opacity-30",false:""}},defaultVariants:{disabled:!1}}),Ae=ge(["text-sm text-subtle"],{variants:{disabled:{true:"opacity-30",false:""}},defaultVariants:{disabled:!1}}),$e=ge(["flex items-center gap-1 text-danger mt-1"]),Ee=ge(["flex items-center justify-center shrink-0","min-h-10 min-w-10","px-4 text-sm text-subtle bg-surface-primary","first:rounded-l-sm last:rounded-r-sm","first:border-r first:border-bdr-soft","last:border-l last:border-bdr-soft"]),Oe=e=>pe("div",{className:ce(Ee()),children:e}),Ve=r.forwardRef(({className:e,label:o,description:t,error:a,startAddon:n,endAddon:s,id:i,...l},d)=>{const c=i??r.useId(),m=me(l.disabled)??!1,u=me(l.readOnly)??!1,p=a?"error":"default";return pe("div",{className:ce("w-full",m&&"opacity-30",e),children:[pe("div",{className:"mb-2",children:[o&&pe("label",{htmlFor:c,className:ce(Pe({disabled:m})),children:pe("div",{className:"flex items-center gap-1",children:[u&&pe(_e,{size:16}),o]})}),t&&pe("div",{className:ce(Ae({disabled:m})),children:t})]}),pe("div",{className:ce(Ie({state:p,disabled:m})),children:[n&&Oe(n),pe("input",{ref:d,id:c,...l,className:ce(Ge(),n&&"rounded-l-none",s&&"rounded-r-none","flex-1")}),s&&Oe(s)]}),a&&pe("div",{className:ce($e()),children:[pe(Me,{size:16}),a]})]})});
|
|
22
22
|
/**
|
|
23
23
|
* @license lucide-react v0.525.0 - ISC
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the ISC license.
|
|
26
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/exports.Button=
|
|
27
|
+
*/Ve.displayName="Input",exports.Button=ve,exports.IconButton=ke,exports.Input=Ve,exports.cn=ce;
|
package/dist/enonic-ui.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { options } from "preact";
|
|
2
|
-
import { forwardRef, createElement } from "react";
|
|
2
|
+
import { forwardRef, createElement, useId } from "react";
|
|
3
3
|
function r(e) {
|
|
4
4
|
var t, f2, n = "";
|
|
5
5
|
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
@@ -2968,6 +2968,12 @@ const twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
|
2968
2968
|
function cn(...inputs) {
|
|
2969
2969
|
return twMerge(clsx(inputs));
|
|
2970
2970
|
}
|
|
2971
|
+
function isSignal(v) {
|
|
2972
|
+
return !!(v && typeof v === "object" && "value" in v && "peek" in v && typeof v.peek === "function" && "subscribe" in v && typeof v.subscribe === "function");
|
|
2973
|
+
}
|
|
2974
|
+
function unwrap(v) {
|
|
2975
|
+
return isSignal(v) ? v.value : v;
|
|
2976
|
+
}
|
|
2971
2977
|
var f = 0;
|
|
2972
2978
|
function u(e, t, n, o, i, u2) {
|
|
2973
2979
|
t || (t = {});
|
|
@@ -3056,38 +3062,32 @@ const getIconSize = (size) => {
|
|
|
3056
3062
|
return 20;
|
|
3057
3063
|
}
|
|
3058
3064
|
};
|
|
3059
|
-
|
|
3060
|
-
className,
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
})
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
label,
|
|
3086
|
-
EndIcon && /* @__PURE__ */ u(EndIcon, { size: iconSize })
|
|
3087
|
-
]
|
|
3088
|
-
}
|
|
3089
|
-
);
|
|
3090
|
-
}
|
|
3065
|
+
const Button = forwardRef(
|
|
3066
|
+
({ className, variant = "text", size = "md", startIcon, label, endIcon, title, children, ...props }, ref) => {
|
|
3067
|
+
const StartIcon = startIcon;
|
|
3068
|
+
const EndIcon = endIcon;
|
|
3069
|
+
const iconSize = getIconSize(size ?? "md");
|
|
3070
|
+
return /* @__PURE__ */ u(
|
|
3071
|
+
"button",
|
|
3072
|
+
{
|
|
3073
|
+
ref,
|
|
3074
|
+
type: "button",
|
|
3075
|
+
className: cn(buttonVariants({ variant, size }), className),
|
|
3076
|
+
title,
|
|
3077
|
+
"aria-label": title ?? label,
|
|
3078
|
+
"aria-disabled": props.disabled,
|
|
3079
|
+
...props,
|
|
3080
|
+
children: [
|
|
3081
|
+
StartIcon && /* @__PURE__ */ u(StartIcon, { size: iconSize }),
|
|
3082
|
+
children,
|
|
3083
|
+
label,
|
|
3084
|
+
EndIcon && /* @__PURE__ */ u(EndIcon, { size: iconSize })
|
|
3085
|
+
]
|
|
3086
|
+
}
|
|
3087
|
+
);
|
|
3088
|
+
}
|
|
3089
|
+
);
|
|
3090
|
+
Button.displayName = "Button";
|
|
3091
3091
|
const iconButtonVariants = cva(["p-0"], {
|
|
3092
3092
|
variants: {
|
|
3093
3093
|
size: {
|
|
@@ -3105,30 +3105,23 @@ const iconButtonVariants = cva(["p-0"], {
|
|
|
3105
3105
|
shape: "square"
|
|
3106
3106
|
}
|
|
3107
3107
|
});
|
|
3108
|
-
|
|
3109
|
-
className,
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
title,
|
|
3126
|
-
disabled,
|
|
3127
|
-
onClick,
|
|
3128
|
-
className: cn(iconButtonVariants({ size, shape }), className)
|
|
3129
|
-
}
|
|
3130
|
-
);
|
|
3131
|
-
}
|
|
3108
|
+
const IconButton = forwardRef(
|
|
3109
|
+
({ className, variant = "text", size = "md", shape = "square", icon, ...props }, ref) => {
|
|
3110
|
+
return /* @__PURE__ */ u(
|
|
3111
|
+
Button,
|
|
3112
|
+
{
|
|
3113
|
+
ref,
|
|
3114
|
+
className: cn(iconButtonVariants({ size, shape }), className),
|
|
3115
|
+
variant,
|
|
3116
|
+
size,
|
|
3117
|
+
startIcon: icon,
|
|
3118
|
+
label: "",
|
|
3119
|
+
...props
|
|
3120
|
+
}
|
|
3121
|
+
);
|
|
3122
|
+
}
|
|
3123
|
+
);
|
|
3124
|
+
IconButton.displayName = "IconButton";
|
|
3132
3125
|
/**
|
|
3133
3126
|
* @license lucide-react v0.525.0 - ISC
|
|
3134
3127
|
*
|
|
@@ -3325,93 +3318,41 @@ const addonVariants = cva([
|
|
|
3325
3318
|
const renderAddon = (addon) => {
|
|
3326
3319
|
return /* @__PURE__ */ u("div", { className: cn(addonVariants()), children: addon });
|
|
3327
3320
|
};
|
|
3328
|
-
|
|
3329
|
-
className,
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
step,
|
|
3353
|
-
pattern,
|
|
3354
|
-
autoComplete,
|
|
3355
|
-
tabIndex
|
|
3356
|
-
}) {
|
|
3357
|
-
const hasError = Boolean(error);
|
|
3358
|
-
const inputId = id ?? `input-${Math.random().toString(36).slice(2, 11)}`;
|
|
3359
|
-
return /* @__PURE__ */ u("div", { className: cn("w-full", disabled && "opacity-30", className), children: [
|
|
3360
|
-
/* @__PURE__ */ u("div", { className: "mb-2", children: [
|
|
3361
|
-
label && /* @__PURE__ */ u("label", { htmlFor: inputId, className: cn(labelVariants({ disabled })), children: /* @__PURE__ */ u("div", { className: "flex items-center gap-1", children: [
|
|
3362
|
-
readOnly && /* @__PURE__ */ u(LockKeyhole, { size: 16 }),
|
|
3363
|
-
label
|
|
3364
|
-
] }) }),
|
|
3365
|
-
description && /* @__PURE__ */ u("div", { className: cn(descriptionVariants({ disabled })), children: description })
|
|
3366
|
-
] }),
|
|
3367
|
-
/* @__PURE__ */ u(
|
|
3368
|
-
"div",
|
|
3369
|
-
{
|
|
3370
|
-
className: cn(
|
|
3371
|
-
inputContainerVariants({
|
|
3372
|
-
state: hasError ? "error" : "default",
|
|
3373
|
-
disabled
|
|
3374
|
-
})
|
|
3321
|
+
const Input = forwardRef(
|
|
3322
|
+
({ className, label, description, error, startAddon, endAddon, id, ...props }, ref) => {
|
|
3323
|
+
const inputId = id ?? useId();
|
|
3324
|
+
const disabled = unwrap(props.disabled) ?? false;
|
|
3325
|
+
const readOnly = unwrap(props.readOnly) ?? false;
|
|
3326
|
+
const state = error ? "error" : "default";
|
|
3327
|
+
return /* @__PURE__ */ u("div", { className: cn("w-full", disabled && "opacity-30", className), children: [
|
|
3328
|
+
/* @__PURE__ */ u("div", { className: "mb-2", children: [
|
|
3329
|
+
label && /* @__PURE__ */ u("label", { htmlFor: inputId, className: cn(labelVariants({ disabled })), children: /* @__PURE__ */ u("div", { className: "flex items-center gap-1", children: [
|
|
3330
|
+
readOnly && /* @__PURE__ */ u(LockKeyhole, { size: 16 }),
|
|
3331
|
+
label
|
|
3332
|
+
] }) }),
|
|
3333
|
+
description && /* @__PURE__ */ u("div", { className: cn(descriptionVariants({ disabled })), children: description })
|
|
3334
|
+
] }),
|
|
3335
|
+
/* @__PURE__ */ u("div", { className: cn(inputContainerVariants({ state, disabled })), children: [
|
|
3336
|
+
startAddon && renderAddon(startAddon),
|
|
3337
|
+
/* @__PURE__ */ u(
|
|
3338
|
+
"input",
|
|
3339
|
+
{
|
|
3340
|
+
ref,
|
|
3341
|
+
id: inputId,
|
|
3342
|
+
...props,
|
|
3343
|
+
className: cn(inputVariants(), startAddon && "rounded-l-none", endAddon && "rounded-r-none", "flex-1")
|
|
3344
|
+
}
|
|
3375
3345
|
),
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
placeholder,
|
|
3387
|
-
disabled,
|
|
3388
|
-
readOnly,
|
|
3389
|
-
required,
|
|
3390
|
-
minLength,
|
|
3391
|
-
maxLength,
|
|
3392
|
-
min,
|
|
3393
|
-
max,
|
|
3394
|
-
step,
|
|
3395
|
-
pattern,
|
|
3396
|
-
autoComplete,
|
|
3397
|
-
tabIndex,
|
|
3398
|
-
onChange,
|
|
3399
|
-
onInput,
|
|
3400
|
-
onFocus,
|
|
3401
|
-
onBlur,
|
|
3402
|
-
className: cn(inputVariants(), startAddon && "rounded-l-none", endAddon && "rounded-r-none", "flex-1")
|
|
3403
|
-
}
|
|
3404
|
-
),
|
|
3405
|
-
endAddon && renderAddon(endAddon)
|
|
3406
|
-
]
|
|
3407
|
-
}
|
|
3408
|
-
),
|
|
3409
|
-
error && /* @__PURE__ */ u("div", { className: cn(errorVariants()), children: [
|
|
3410
|
-
/* @__PURE__ */ u(OctagonAlert, { size: 16 }),
|
|
3411
|
-
error
|
|
3412
|
-
] })
|
|
3413
|
-
] });
|
|
3414
|
-
}
|
|
3346
|
+
endAddon && renderAddon(endAddon)
|
|
3347
|
+
] }),
|
|
3348
|
+
error && /* @__PURE__ */ u("div", { className: cn(errorVariants()), children: [
|
|
3349
|
+
/* @__PURE__ */ u(OctagonAlert, { size: 16 }),
|
|
3350
|
+
error
|
|
3351
|
+
] })
|
|
3352
|
+
] });
|
|
3353
|
+
}
|
|
3354
|
+
);
|
|
3355
|
+
Input.displayName = "Input";
|
|
3415
3356
|
export {
|
|
3416
3357
|
Button,
|
|
3417
3358
|
IconButton,
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
import { LucideIcon } from '../../types';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
7
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
-
export type ButtonVariant = VariantProps<typeof buttonVariants>['variant'];
|
|
9
|
-
export type ButtonSize = VariantProps<typeof buttonVariants>['size'];
|
|
3
|
+
export type ButtonVariantsProps = VariantProps<typeof buttonVariants>;
|
|
4
|
+
export type ButtonVariant = NonNullable<ButtonVariantsProps['variant']>;
|
|
5
|
+
export type ButtonSize = NonNullable<ButtonVariantsProps['size']>;
|
|
10
6
|
export type ButtonProps = {
|
|
11
|
-
className?: string;
|
|
12
|
-
variant?: ButtonVariant;
|
|
13
|
-
size?: ButtonSize;
|
|
14
7
|
startIcon?: LucideIcon;
|
|
15
8
|
label: string;
|
|
16
9
|
endIcon?: LucideIcon;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
} & ButtonVariantsProps & React.ButtonHTMLAttributes;
|
|
11
|
+
declare const buttonVariants: (props?: ({
|
|
12
|
+
variant?: "text" | "filled" | "solid" | "outline" | null | undefined;
|
|
13
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
14
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
15
|
+
export declare const Button: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<ButtonProps> & {
|
|
16
|
+
ref?: import('preact').Ref<HTMLButtonElement> | undefined;
|
|
17
|
+
}>;
|
|
22
18
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Button, type ButtonProps, type ButtonSize, type ButtonVariant } from './button';
|
|
1
|
+
export { Button, type ButtonProps, type ButtonSize, type ButtonVariant, type ButtonVariantsProps } from './button';
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { LucideIcon } from '../../types';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
6
|
-
export type
|
|
2
|
+
import { ButtonVariantsProps } from '../button';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
export type IconButtonVariantsProps = VariantProps<typeof iconButtonVariants> & ButtonVariantsProps;
|
|
5
|
+
export type IconButtonVariant = NonNullable<IconButtonVariantsProps['variant']>;
|
|
6
|
+
export type IconButtonSize = NonNullable<IconButtonVariantsProps['size']>;
|
|
7
|
+
export type IconButtonShape = NonNullable<IconButtonVariantsProps['shape']>;
|
|
8
|
+
declare const iconButtonVariants: (props?: ({
|
|
9
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
10
|
+
shape?: "round" | "square" | null | undefined;
|
|
11
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
12
|
export type IconButtonProps = {
|
|
8
|
-
className?: string;
|
|
9
|
-
variant?: IconButtonVariant;
|
|
10
|
-
size?: IconButtonSize;
|
|
11
|
-
shape?: IconButtonShape;
|
|
12
13
|
icon: LucideIcon;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
export
|
|
14
|
+
} & IconButtonVariantsProps & React.ButtonHTMLAttributes;
|
|
15
|
+
export declare const IconButton: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<IconButtonProps> & {
|
|
16
|
+
ref?: import('preact').Ref<HTMLButtonElement> | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
export {};
|
|
@@ -3,37 +3,10 @@ export type InputProps = {
|
|
|
3
3
|
className?: string;
|
|
4
4
|
label?: string;
|
|
5
5
|
description?: string;
|
|
6
|
-
placeholder?: string;
|
|
7
6
|
error?: string;
|
|
8
7
|
startAddon?: string | JSX.Element;
|
|
9
8
|
endAddon?: string | JSX.Element;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
onChange?: (event: Event & {
|
|
15
|
-
currentTarget: HTMLInputElement;
|
|
16
|
-
}) => void;
|
|
17
|
-
onInput?: (event: Event & {
|
|
18
|
-
currentTarget: HTMLInputElement;
|
|
19
|
-
}) => void;
|
|
20
|
-
onFocus?: (event: FocusEvent & {
|
|
21
|
-
currentTarget: HTMLInputElement;
|
|
22
|
-
}) => void;
|
|
23
|
-
onBlur?: (event: FocusEvent & {
|
|
24
|
-
currentTarget: HTMLInputElement;
|
|
25
|
-
}) => void;
|
|
26
|
-
type?: 'text' | 'password' | 'email' | 'number' | 'tel' | 'url' | 'search';
|
|
27
|
-
name?: string;
|
|
28
|
-
id?: string;
|
|
29
|
-
required?: boolean;
|
|
30
|
-
minLength?: number;
|
|
31
|
-
maxLength?: number;
|
|
32
|
-
min?: number;
|
|
33
|
-
max?: number;
|
|
34
|
-
step?: number;
|
|
35
|
-
pattern?: string;
|
|
36
|
-
autoComplete?: string;
|
|
37
|
-
tabIndex?: number;
|
|
38
|
-
};
|
|
39
|
-
export declare function Input({ className, label, description, placeholder, error, startAddon, endAddon, value, defaultValue, disabled, readOnly, onChange, onInput, onFocus, onBlur, type, name, id, required, minLength, maxLength, min, max, step, pattern, autoComplete, tabIndex, }: InputProps): JSX.Element;
|
|
9
|
+
} & React.InputHTMLAttributes;
|
|
10
|
+
export declare const Input: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<InputProps> & {
|
|
11
|
+
ref?: import('preact').Ref<HTMLInputElement> | undefined;
|
|
12
|
+
}>;
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enonic/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Enonic UI Component Library",
|
|
5
5
|
"author": "Enonic",
|
|
6
|
-
"license": "
|
|
6
|
+
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/enonic/npm-enonic-ui#readme",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|