@enonic/ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Enonic AS
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,119 @@
1
+ # @enonic/ui
2
+
3
+ A modern UI component library built with Preact/React, TypeScript, and Tailwind CSS.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @enonic/ui
9
+ # or
10
+ pnpm add @enonic/ui
11
+ # or
12
+ yarn add @enonic/ui
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ### Import Components
18
+
19
+ ```tsx
20
+ import { Button, IconButton, Input } from '@enonic/ui';
21
+ import '@enonic/ui/style.css';
22
+
23
+ function App() {
24
+ return (
25
+ <div>
26
+ <Button variant='primary' size='md'>
27
+ Click Me
28
+ </Button>
29
+ <Input placeholder='Enter text...' />
30
+ </div>
31
+ );
32
+ }
33
+ ```
34
+
35
+ ### Import Styles Only
36
+
37
+ If you only need the CSS styles:
38
+
39
+ ```css
40
+ @import '@enonic/ui/style.css';
41
+ ```
42
+
43
+ ## Components
44
+
45
+ - **Button** - Versatile button component with multiple variants and sizes
46
+ - **Input** - Form input component with built-in validation states
47
+ - **IconButton** - Button component optimized for icon usage
48
+
49
+ ## Peer Dependencies
50
+
51
+ This library requires one of the following frameworks:
52
+
53
+ ### React
54
+
55
+ ```json
56
+ {
57
+ "react": ">=16.8.0",
58
+ "react-dom": ">=16.8.0"
59
+ }
60
+ ```
61
+
62
+ ### Preact
63
+
64
+ ```json
65
+ {
66
+ "preact": ">=10.0.0",
67
+ "@preact/compat": ">=17.0.0"
68
+ }
69
+ ```
70
+
71
+ ### Icon Libraries (Optional)
72
+
73
+ - `lucide-react` (>=0.300.0) - For React projects
74
+ - `lucide-preact` (>=0.300.0) - For Preact projects
75
+
76
+ ## Features
77
+
78
+ - 🎨 Built with Tailwind CSS for easy customization
79
+ - 📦 Tree-shakeable ES modules
80
+ - 🔧 TypeScript support out of the box
81
+ - âš¡ Optimized bundle size
82
+ - 🎯 Framework agnostic (React/Preact)
83
+ - ♿ Accessibility-first components
84
+
85
+ ## Development
86
+
87
+ ```bash
88
+ # Install dependencies
89
+ pnpm install
90
+
91
+ # Start development server with Storybook
92
+ pnpm dev
93
+
94
+ # Build the library
95
+ pnpm build
96
+
97
+ # Run type checking
98
+ pnpm typecheck
99
+
100
+ # Run linting
101
+ pnpm lint
102
+
103
+ # Check bundle size
104
+ pnpm size
105
+ ```
106
+
107
+ ## License
108
+
109
+ Apache-2.0
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)
@@ -0,0 +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"}});
2
+ /**
3
+ * @license lucide-react v0.525.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ const xe=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)},ke=(...e)=>e.filter((e,r,o)=>Boolean(e)&&""!==e.trim()&&o.indexOf(e)===r).join(" ").trim(),ye=e=>{for(const r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0};
9
+ /**
10
+ * @license lucide-react v0.525.0 - ISC
11
+ *
12
+ * This source code is licensed under the ISC license.
13
+ * See the LICENSE file in the root directory of this source tree.
14
+ */
15
+ var we={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
+ /**
17
+ * @license lucide-react v0.525.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const ze=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,...we,width:o,height:o,stroke:e,strokeWidth:a?24*Number(t)/Number(o):t,className:ke("lucide",n),...!s&&!ye(l)&&{"aria-hidden":"true"},...l},[...i.map(([e,o])=>r.createElement(e,o)),...Array.isArray(s)?s:[s]])),Ne=(e,o)=>{const t=r.forwardRef(({className:t,...a},n)=>{return r.createElement(ze,{ref:n,iconNode:o,className:ke(`lucide-${s=xe(e),s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,t),...a});var s});return t.displayName=xe(e),t},Ce=Ne("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"}]]),je=Ne("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"}]]),Me=fe(["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}}),_e=fe(["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"]),Ie=fe(["block text-base font-semibold text-main"],{variants:{disabled:{true:"opacity-30",false:""}},defaultVariants:{disabled:!1}}),Ge=fe(["text-sm text-subtle"],{variants:{disabled:{true:"opacity-30",false:""}},defaultVariants:{disabled:!1}}),Pe=fe(["flex items-center gap-1 text-danger mt-1"]),Ae=fe(["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"]),$e=e=>ue("div",{className:ce(Ae()),children:e});
22
+ /**
23
+ * @license lucide-react v0.525.0 - ISC
24
+ *
25
+ * This source code is licensed under the ISC license.
26
+ * See the LICENSE file in the root directory of this source tree.
27
+ */exports.Button=he,exports.IconButton=function({className:e,variant:r="text",size:o="md",shape:t="square",icon:a,title:n,disabled:s=!1,onClick:i}){return ue(he,{variant:r,size:o,startIcon:a,label:"",title:n,disabled:s,onClick:i,className:ce(ve({size:o,shape:t}),e)})},exports.Input=function({className:e,label:r,description:o,placeholder:t,error:a,startAddon:n,endAddon:s,value:i,defaultValue:l,disabled:d=!1,readOnly:c=!1,onChange:m,onInput:u,onFocus:p,onBlur:b,type:f="text",name:g,id:h,required:v=!1,minLength:x,maxLength:k,min:y,max:w,step:z,pattern:N,autoComplete:C,tabIndex:j}){const M=Boolean(a),_=h??`input-${Math.random().toString(36).slice(2,11)}`;return ue("div",{className:ce("w-full",d&&"opacity-30",e),children:[ue("div",{className:"mb-2",children:[r&&ue("label",{htmlFor:_,className:ce(Ie({disabled:d})),children:ue("div",{className:"flex items-center gap-1",children:[c&&ue(Ce,{size:16}),r]})}),o&&ue("div",{className:ce(Ge({disabled:d})),children:o})]}),ue("div",{className:ce(Me({state:M?"error":"default",disabled:d})),children:[n&&$e(n),ue("input",{id:_,type:f,name:g,value:i,defaultValue:l,placeholder:t,disabled:d,readOnly:c,required:v,minLength:x,maxLength:k,min:y,max:w,step:z,pattern:N,autoComplete:C,tabIndex:j,onChange:m,onInput:u,onFocus:p,onBlur:b,className:ce(_e(),n&&"rounded-l-none",s&&"rounded-r-none","flex-1")}),s&&$e(s)]}),a&&ue("div",{className:ce(Pe()),children:[ue(je,{size:16}),a]})]})},exports.cn=ce;