@workokay/atom 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/README.md +69 -0
- package/dist/atom.css +1 -0
- package/dist/index.cjs +23 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3308 -0
- package/dist/index.js.map +1 -0
- package/dist/src/components/button/Button.d.ts +17 -0
- package/dist/src/components/button/index.d.ts +1 -0
- package/dist/src/components/form/Input.d.ts +18 -0
- package/dist/src/components/form/index.d.ts +1 -0
- package/dist/src/hooks/index.d.ts +1 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/lib/cn.d.ts +2 -0
- package/dist/vite.svg +1 -0
- package/package.json +93 -0
package/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# React + TypeScript + Vite
|
|
2
|
+
|
|
3
|
+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
+
|
|
5
|
+
Currently, two official plugins are available:
|
|
6
|
+
|
|
7
|
+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
|
|
8
|
+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
9
|
+
|
|
10
|
+
## Expanding the ESLint configuration
|
|
11
|
+
|
|
12
|
+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
export default tseslint.config([
|
|
16
|
+
globalIgnores(['dist']),
|
|
17
|
+
{
|
|
18
|
+
files: ['**/*.{ts,tsx}'],
|
|
19
|
+
extends: [
|
|
20
|
+
// Other configs...
|
|
21
|
+
|
|
22
|
+
// Remove tseslint.configs.recommended and replace with this
|
|
23
|
+
...tseslint.configs.recommendedTypeChecked,
|
|
24
|
+
// Alternatively, use this for stricter rules
|
|
25
|
+
...tseslint.configs.strictTypeChecked,
|
|
26
|
+
// Optionally, add this for stylistic rules
|
|
27
|
+
...tseslint.configs.stylisticTypeChecked,
|
|
28
|
+
|
|
29
|
+
// Other configs...
|
|
30
|
+
],
|
|
31
|
+
languageOptions: {
|
|
32
|
+
parserOptions: {
|
|
33
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
34
|
+
tsconfigRootDir: import.meta.dirname,
|
|
35
|
+
},
|
|
36
|
+
// other options...
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
])
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
|
43
|
+
|
|
44
|
+
```js
|
|
45
|
+
// eslint.config.js
|
|
46
|
+
import reactX from 'eslint-plugin-react-x'
|
|
47
|
+
import reactDom from 'eslint-plugin-react-dom'
|
|
48
|
+
|
|
49
|
+
export default tseslint.config([
|
|
50
|
+
globalIgnores(['dist']),
|
|
51
|
+
{
|
|
52
|
+
files: ['**/*.{ts,tsx}'],
|
|
53
|
+
extends: [
|
|
54
|
+
// Other configs...
|
|
55
|
+
// Enable lint rules for React
|
|
56
|
+
reactX.configs['recommended-typescript'],
|
|
57
|
+
// Enable lint rules for React DOM
|
|
58
|
+
reactDom.configs.recommended,
|
|
59
|
+
],
|
|
60
|
+
languageOptions: {
|
|
61
|
+
parserOptions: {
|
|
62
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
63
|
+
tsconfigRootDir: import.meta.dirname,
|
|
64
|
+
},
|
|
65
|
+
// other options...
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
])
|
|
69
|
+
```
|
package/dist/atom.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.atom-theme{--atom-button-bg: var(--atom-primary);--atom-button-bg-hover: #1c86ee;--atom-button-fg: #ffffff;--atom-button-ghost-bg: transparent;--atom-button-ghost-hover-bg: #f1f5f9;--atom-button-ghost-fg: #1e293b;--atom-radius-2: 6px;--atom-focus-ring: 0 0 0 2px rgba(30, 144, 255, .5)}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Te=require("react");function Be(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const T=Be(Te);var de={exports:{}},ae={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var ye;function Ue(){if(ye)return ae;ye=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(o,s,a){var i=null;if(a!==void 0&&(i=""+a),s.key!==void 0&&(i=""+s.key),"key"in s){a={};for(var d in s)d!=="key"&&(a[d]=s[d])}else a=s;return s=a.ref,{$$typeof:e,type:o,key:i,ref:s!==void 0?s:null,props:a}}return ae.Fragment=t,ae.jsx=r,ae.jsxs=r,ae}var ie={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var we;function Je(){return we||(we=1,process.env.NODE_ENV!=="production"&&(function(){function e(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===X?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case C:return"Fragment";case N:return"Profiler";case _:return"StrictMode";case j:return"Suspense";case L:return"SuspenseList";case J:return"Activity"}if(typeof n=="object")switch(typeof n.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),n.$$typeof){case R:return"Portal";case V:return n.displayName||"Context";case O:return(n._context.displayName||"Context")+".Consumer";case $:var f=n.render;return n=n.displayName,n||(n=f.displayName||f.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case p:return f=n.displayName||null,f!==null?f:e(n.type)||"Memo";case S:f=n._payload,n=n._init;try{return e(n(f))}catch{}}return null}function t(n){return""+n}function r(n){try{t(n);var f=!1}catch{f=!0}if(f){f=console;var h=f.error,y=typeof Symbol=="function"&&Symbol.toStringTag&&n[Symbol.toStringTag]||n.constructor.name||"Object";return h.call(f,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",y),t(n)}}function o(n){if(n===C)return"<>";if(typeof n=="object"&&n!==null&&n.$$typeof===S)return"<...>";try{var f=e(n);return f?"<"+f+">":"<...>"}catch{return"<...>"}}function s(){var n=D.A;return n===null?null:n.getOwner()}function a(){return Error("react-stack-top-frame")}function i(n){if(te.call(n,"key")){var f=Object.getOwnPropertyDescriptor(n,"key").get;if(f&&f.isReactWarning)return!1}return n.key!==void 0}function d(n,f){function h(){I||(I=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",f))}h.isReactWarning=!0,Object.defineProperty(n,"key",{get:h,configurable:!0})}function m(){var n=e(this.type);return G[n]||(G[n]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),n=this.props.ref,n!==void 0?n:null}function b(n,f,h,y,q,H){var v=h.ref;return n={$$typeof:E,type:n,key:f,props:h,_owner:y},(v!==void 0?v:null)!==null?Object.defineProperty(n,"ref",{enumerable:!1,get:m}):Object.defineProperty(n,"ref",{enumerable:!1,value:null}),n._store={},Object.defineProperty(n._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(n,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(n,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:q}),Object.defineProperty(n,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:H}),Object.freeze&&(Object.freeze(n.props),Object.freeze(n)),n}function x(n,f,h,y,q,H){var v=f.children;if(v!==void 0)if(y)if(oe(v)){for(y=0;y<v.length;y++)w(v[y]);Object.freeze&&Object.freeze(v)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else w(v);if(te.call(f,"key")){v=e(n);var W=Object.keys(f).filter(function(Z){return Z!=="key"});y=0<W.length?"{key: someKey, "+W.join(": ..., ")+": ...}":"{key: someKey}",se[v+y]||(W=0<W.length?"{"+W.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
+
let props = %s;
|
|
19
|
+
<%s {...props} />
|
|
20
|
+
React keys must be passed directly to JSX without using spread:
|
|
21
|
+
let props = %s;
|
|
22
|
+
<%s key={someKey} {...props} />`,y,v,W,v),se[v+y]=!0)}if(v=null,h!==void 0&&(r(h),v=""+h),i(f)&&(r(f.key),v=""+f.key),"key"in f){h={};for(var Y in f)Y!=="key"&&(h[Y]=f[Y])}else h=f;return v&&d(h,typeof n=="function"?n.displayName||n.name||"Unknown":n),b(n,v,h,s(),q,H)}function w(n){k(n)?n._store&&(n._store.validated=1):typeof n=="object"&&n!==null&&n.$$typeof===S&&(n._payload.status==="fulfilled"?k(n._payload.value)&&n._payload.value._store&&(n._payload.value._store.validated=1):n._store&&(n._store.validated=1))}function k(n){return typeof n=="object"&&n!==null&&n.$$typeof===E}var P=Te,E=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),V=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),X=Symbol.for("react.client.reference"),D=P.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=Object.prototype.hasOwnProperty,oe=Array.isArray,M=console.createTask?console.createTask:function(){return null};P={react_stack_bottom_frame:function(n){return n()}};var I,G={},u=P.react_stack_bottom_frame.bind(P,a)(),ne=M(o(a)),se={};ie.Fragment=C,ie.jsx=function(n,f,h){var y=1e4>D.recentlyCreatedOwnerStacks++;return x(n,f,h,!1,y?Error("react-stack-top-frame"):u,y?M(o(n)):ne)},ie.jsxs=function(n,f,h){var y=1e4>D.recentlyCreatedOwnerStacks++;return x(n,f,h,!0,y?Error("react-stack-top-frame"):u,y?M(o(n)):ne)}})()),ie}var ke;function Xe(){return ke||(ke=1,process.env.NODE_ENV==="production"?de.exports=Ue():de.exports=Je()),de.exports}var z=Xe();function ze(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=ze(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function je(){for(var e,t,r=0,o="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=ze(e))&&(o&&(o+=" "),o+=t);return o}const Re=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Se=je,Ne=(e,t)=>r=>{var o;if(t?.variants==null)return Se(e,r?.class,r?.className);const{variants:s,defaultVariants:a}=t,i=Object.keys(s).map(b=>{const x=r?.[b],w=a?.[b];if(x===null)return null;const k=Re(x)||Re(w);return s[b][k]}),d=r&&Object.entries(r).reduce((b,x)=>{let[w,k]=x;return k===void 0||(b[w]=k),b},{}),m=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((b,x)=>{let{class:w,className:k,...P}=x;return Object.entries(P).every(E=>{let[R,C]=E;return Array.isArray(C)?C.includes({...a,...d}[R]):{...a,...d}[R]===C})?[...b,w,k]:b},[]);return Se(e,i,m,r?.class,r?.className)};function Ee(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function He(...e){return t=>{let r=!1;const o=e.map(s=>{const a=Ee(s,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let s=0;s<o.length;s++){const a=o[s];typeof a=="function"?a():Ee(e[s],null)}}}}function Ze(e){const t=Ke(e),r=T.forwardRef((o,s)=>{const{children:a,...i}=o,d=T.Children.toArray(a),m=d.find(rr);if(m){const b=m.props.children,x=d.map(w=>w===m?T.Children.count(b)>1?T.Children.only(null):T.isValidElement(b)?b.props.children:null:w);return z.jsx(t,{...i,ref:s,children:T.isValidElement(b)?T.cloneElement(b,void 0,x):null})}return z.jsx(t,{...i,ref:s,children:a})});return r.displayName=`${e}.Slot`,r}var Qe=Ze("Slot");function Ke(e){const t=T.forwardRef((r,o)=>{const{children:s,...a}=r;if(T.isValidElement(s)){const i=or(s),d=tr(a,s.props);return s.type!==T.Fragment&&(d.ref=o?He(o,i):i),T.cloneElement(s,d)}return T.Children.count(s)>1?T.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var er=Symbol("radix.slottable");function rr(e){return T.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===er}function tr(e,t){const r={...t};for(const o in t){const s=e[o],a=t[o];/^on[A-Z]/.test(o)?s&&a?r[o]=(...d)=>{const m=a(...d);return s(...d),m}:s&&(r[o]=s):o==="style"?r[o]={...s,...a}:o==="className"&&(r[o]=[s,a].filter(Boolean).join(" "))}return{...e,...r}}function or(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const xe="-",nr=e=>{const t=ar(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{const d=i.split(xe);return d[0]===""&&d.length!==1&&d.shift(),Oe(d,t)||sr(i)},getConflictingClassGroupIds:(i,d)=>{const m=r[i]||[];return d&&o[i]?[...m,...o[i]]:m}}},Oe=(e,t)=>{if(e.length===0)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),s=o?Oe(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;const a=e.join(xe);return t.validators.find(({validator:i})=>i(a))?.classGroupId},_e=/^\[(.+)\]$/,sr=e=>{if(_e.test(e)){const t=_e.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},ar=e=>{const{theme:t,classGroups:r}=e,o={nextPart:new Map,validators:[]};for(const s in r)ge(r[s],o,s,t);return o},ge=(e,t,r,o)=>{e.forEach(s=>{if(typeof s=="string"){const a=s===""?t:Ce(t,s);a.classGroupId=r;return}if(typeof s=="function"){if(ir(s)){ge(s(o),t,r,o);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([a,i])=>{ge(i,Ce(t,a),r,o)})})},Ce=(e,t)=>{let r=e;return t.split(xe).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},ir=e=>e.isThemeGetter,lr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map;const s=(a,i)=>{r.set(a,i),t++,t>e&&(t=0,o=r,r=new Map)};return{get(a){let i=r.get(a);if(i!==void 0)return i;if((i=o.get(a))!==void 0)return s(a,i),i},set(a,i){r.has(a)?r.set(a,i):s(a,i)}}},he="!",ve=":",cr=ve.length,dr=e=>{const{prefix:t,experimentalParseClassName:r}=e;let o=s=>{const a=[];let i=0,d=0,m=0,b;for(let E=0;E<s.length;E++){let R=s[E];if(i===0&&d===0){if(R===ve){a.push(s.slice(m,E)),m=E+cr;continue}if(R==="/"){b=E;continue}}R==="["?i++:R==="]"?i--:R==="("?d++:R===")"&&d--}const x=a.length===0?s:s.substring(m),w=ur(x),k=w!==x,P=b&&b>m?b-m:void 0;return{modifiers:a,hasImportantModifier:k,baseClassName:w,maybePostfixModifierPosition:P}};if(t){const s=t+ve,a=o;o=i=>i.startsWith(s)?a(i.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(r){const s=o;o=a=>r({className:a,parseClassName:s})}return o},ur=e=>e.endsWith(he)?e.substring(0,e.length-1):e.startsWith(he)?e.substring(1):e,mr=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;const s=[];let a=[];return o.forEach(i=>{i[0]==="["||t[i]?(s.push(...a.sort(),i),a=[]):a.push(i)}),s.push(...a.sort()),s}},pr=e=>({cache:lr(e.cacheSize),parseClassName:dr(e),sortModifiers:mr(e),...nr(e)}),fr=/\s+/,br=(e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:s,sortModifiers:a}=t,i=[],d=e.trim().split(fr);let m="";for(let b=d.length-1;b>=0;b-=1){const x=d[b],{isExternal:w,modifiers:k,hasImportantModifier:P,baseClassName:E,maybePostfixModifierPosition:R}=r(x);if(w){m=x+(m.length>0?" "+m:m);continue}let C=!!R,_=o(C?E.substring(0,R):E);if(!_){if(!C){m=x+(m.length>0?" "+m:m);continue}if(_=o(E),!_){m=x+(m.length>0?" "+m:m);continue}C=!1}const N=a(k).join(":"),O=P?N+he:N,V=O+_;if(i.includes(V))continue;i.push(V);const $=s(_,C);for(let j=0;j<$.length;++j){const L=$[j];i.push(O+L)}m=x+(m.length>0?" "+m:m)}return m};function gr(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Ie(t))&&(o&&(o+=" "),o+=r);return o}const Ie=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Ie(e[o]))&&(r&&(r+=" "),r+=t);return r};function hr(e,...t){let r,o,s,a=i;function i(m){const b=t.reduce((x,w)=>w(x),e());return r=pr(b),o=r.cache.get,s=r.cache.set,a=d,d(m)}function d(m){const b=o(m);if(b)return b;const x=br(m,r);return s(m,x),x}return function(){return a(gr.apply(null,arguments))}}const A=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Me=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ge=/^\((?:(\w[\w-]*):)?(.+)\)$/i,vr=/^\d+\/\d+$/,xr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,yr=/\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$/,wr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,kr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Rr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Q=e=>vr.test(e),g=e=>!!e&&!Number.isNaN(Number(e)),B=e=>!!e&&Number.isInteger(Number(e)),fe=e=>e.endsWith("%")&&g(e.slice(0,-1)),F=e=>xr.test(e),Sr=()=>!0,Er=e=>yr.test(e)&&!wr.test(e),Ve=()=>!1,_r=e=>kr.test(e),Cr=e=>Rr.test(e),Ar=e=>!l(e)&&!c(e),Pr=e=>ee(e,qe,Ve),l=e=>Me.test(e),U=e=>ee(e,We,Er),be=e=>ee(e,Or,g),Ae=e=>ee(e,$e,Ve),Tr=e=>ee(e,Le,Cr),ue=e=>ee(e,Fe,_r),c=e=>Ge.test(e),le=e=>re(e,We),zr=e=>re(e,Ir),Pe=e=>re(e,$e),jr=e=>re(e,qe),Nr=e=>re(e,Le),me=e=>re(e,Fe,!0),ee=(e,t,r)=>{const o=Me.exec(e);return o?o[1]?t(o[1]):r(o[2]):!1},re=(e,t,r=!1)=>{const o=Ge.exec(e);return o?o[1]?t(o[1]):r:!1},$e=e=>e==="position"||e==="percentage",Le=e=>e==="image"||e==="url",qe=e=>e==="length"||e==="size"||e==="bg-size",We=e=>e==="length",Or=e=>e==="number",Ir=e=>e==="family-name",Fe=e=>e==="shadow",Mr=()=>{const e=A("color"),t=A("font"),r=A("text"),o=A("font-weight"),s=A("tracking"),a=A("leading"),i=A("breakpoint"),d=A("container"),m=A("spacing"),b=A("radius"),x=A("shadow"),w=A("inset-shadow"),k=A("text-shadow"),P=A("drop-shadow"),E=A("blur"),R=A("perspective"),C=A("aspect"),_=A("ease"),N=A("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],$=()=>[...V(),c,l],j=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],p=()=>[c,l,m],S=()=>[Q,"full","auto",...p()],J=()=>[B,"none","subgrid",c,l],X=()=>["auto",{span:["full",B,c,l]},B,c,l],D=()=>[B,"auto",c,l],te=()=>["auto","min","max","fr",c,l],oe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],M=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...p()],G=()=>[Q,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...p()],u=()=>[e,c,l],ne=()=>[...V(),Pe,Ae,{position:[c,l]}],se=()=>["no-repeat",{repeat:["","x","y","space","round"]}],n=()=>["auto","cover","contain",jr,Pr,{size:[c,l]}],f=()=>[fe,le,U],h=()=>["","none","full",b,c,l],y=()=>["",g,le,U],q=()=>["solid","dashed","dotted","double"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],v=()=>[g,fe,Pe,Ae],W=()=>["","none",E,c,l],Y=()=>["none",g,c,l],Z=()=>["none",g,c,l],pe=()=>[g,c,l],ce=()=>[Q,"full",...p()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[F],breakpoint:[F],color:[Sr],container:[F],"drop-shadow":[F],ease:["in","out","in-out"],font:[Ar],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[F],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[F],shadow:[F],spacing:["px",g],text:[F],"text-shadow":[F],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Q,l,c,C]}],container:["container"],columns:[{columns:[g,l,c,d]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"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:$()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:S()}],"inset-x":[{"inset-x":S()}],"inset-y":[{"inset-y":S()}],start:[{start:S()}],end:[{end:S()}],top:[{top:S()}],right:[{right:S()}],bottom:[{bottom:S()}],left:[{left:S()}],visibility:["visible","invisible","collapse"],z:[{z:[B,"auto",c,l]}],basis:[{basis:[Q,"full","auto",d,...p()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[g,Q,"auto","initial","none",l]}],grow:[{grow:["",g,c,l]}],shrink:[{shrink:["",g,c,l]}],order:[{order:[B,"first","last","none",c,l]}],"grid-cols":[{"grid-cols":J()}],"col-start-end":[{col:X()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":J()}],"row-start-end":[{row:X()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:p()}],"gap-x":[{"gap-x":p()}],"gap-y":[{"gap-y":p()}],"justify-content":[{justify:[...oe(),"normal"]}],"justify-items":[{"justify-items":[...M(),"normal"]}],"justify-self":[{"justify-self":["auto",...M()]}],"align-content":[{content:["normal",...oe()]}],"align-items":[{items:[...M(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...M(),{baseline:["","last"]}]}],"place-content":[{"place-content":oe()}],"place-items":[{"place-items":[...M(),"baseline"]}],"place-self":[{"place-self":["auto",...M()]}],p:[{p:p()}],px:[{px:p()}],py:[{py:p()}],ps:[{ps:p()}],pe:[{pe:p()}],pt:[{pt:p()}],pr:[{pr:p()}],pb:[{pb:p()}],pl:[{pl:p()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":p()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":p()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],w:[{w:[d,"screen",...G()]}],"min-w":[{"min-w":[d,"screen","none",...G()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[i]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",r,le,U]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,c,be]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",fe,l]}],"font-family":[{font:[zr,l,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,c,l]}],"line-clamp":[{"line-clamp":[g,"none",c,be]}],leading:[{leading:[a,...p()]}],"list-image":[{"list-image":["none",c,l]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",c,l]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:u()}],"text-color":[{text:u()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:[g,"from-font","auto",c,U]}],"text-decoration-color":[{decoration:u()}],"underline-offset":[{"underline-offset":[g,"auto",c,l]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:p()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",c,l]}],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",c,l]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ne()}],"bg-repeat":[{bg:se()}],"bg-size":[{bg:n()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},B,c,l],radial:["",c,l],conic:[B,c,l]},Nr,Tr]}],"bg-color":[{bg:u()}],"gradient-from-pos":[{from:f()}],"gradient-via-pos":[{via:f()}],"gradient-to-pos":[{to:f()}],"gradient-from":[{from:u()}],"gradient-via":[{via:u()}],"gradient-to":[{to:u()}],rounded:[{rounded:h()}],"rounded-s":[{"rounded-s":h()}],"rounded-e":[{"rounded-e":h()}],"rounded-t":[{"rounded-t":h()}],"rounded-r":[{"rounded-r":h()}],"rounded-b":[{"rounded-b":h()}],"rounded-l":[{"rounded-l":h()}],"rounded-ss":[{"rounded-ss":h()}],"rounded-se":[{"rounded-se":h()}],"rounded-ee":[{"rounded-ee":h()}],"rounded-es":[{"rounded-es":h()}],"rounded-tl":[{"rounded-tl":h()}],"rounded-tr":[{"rounded-tr":h()}],"rounded-br":[{"rounded-br":h()}],"rounded-bl":[{"rounded-bl":h()}],"border-w":[{border:y()}],"border-w-x":[{"border-x":y()}],"border-w-y":[{"border-y":y()}],"border-w-s":[{"border-s":y()}],"border-w-e":[{"border-e":y()}],"border-w-t":[{"border-t":y()}],"border-w-r":[{"border-r":y()}],"border-w-b":[{"border-b":y()}],"border-w-l":[{"border-l":y()}],"divide-x":[{"divide-x":y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...q(),"hidden","none"]}],"divide-style":[{divide:[...q(),"hidden","none"]}],"border-color":[{border:u()}],"border-color-x":[{"border-x":u()}],"border-color-y":[{"border-y":u()}],"border-color-s":[{"border-s":u()}],"border-color-e":[{"border-e":u()}],"border-color-t":[{"border-t":u()}],"border-color-r":[{"border-r":u()}],"border-color-b":[{"border-b":u()}],"border-color-l":[{"border-l":u()}],"divide-color":[{divide:u()}],"outline-style":[{outline:[...q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[g,c,l]}],"outline-w":[{outline:["",g,le,U]}],"outline-color":[{outline:u()}],shadow:[{shadow:["","none",x,me,ue]}],"shadow-color":[{shadow:u()}],"inset-shadow":[{"inset-shadow":["none",w,me,ue]}],"inset-shadow-color":[{"inset-shadow":u()}],"ring-w":[{ring:y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:u()}],"ring-offset-w":[{"ring-offset":[g,U]}],"ring-offset-color":[{"ring-offset":u()}],"inset-ring-w":[{"inset-ring":y()}],"inset-ring-color":[{"inset-ring":u()}],"text-shadow":[{"text-shadow":["none",k,me,ue]}],"text-shadow-color":[{"text-shadow":u()}],opacity:[{opacity:[g,c,l]}],"mix-blend":[{"mix-blend":[...H(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":H()}],"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":v()}],"mask-image-linear-to-pos":[{"mask-linear-to":v()}],"mask-image-linear-from-color":[{"mask-linear-from":u()}],"mask-image-linear-to-color":[{"mask-linear-to":u()}],"mask-image-t-from-pos":[{"mask-t-from":v()}],"mask-image-t-to-pos":[{"mask-t-to":v()}],"mask-image-t-from-color":[{"mask-t-from":u()}],"mask-image-t-to-color":[{"mask-t-to":u()}],"mask-image-r-from-pos":[{"mask-r-from":v()}],"mask-image-r-to-pos":[{"mask-r-to":v()}],"mask-image-r-from-color":[{"mask-r-from":u()}],"mask-image-r-to-color":[{"mask-r-to":u()}],"mask-image-b-from-pos":[{"mask-b-from":v()}],"mask-image-b-to-pos":[{"mask-b-to":v()}],"mask-image-b-from-color":[{"mask-b-from":u()}],"mask-image-b-to-color":[{"mask-b-to":u()}],"mask-image-l-from-pos":[{"mask-l-from":v()}],"mask-image-l-to-pos":[{"mask-l-to":v()}],"mask-image-l-from-color":[{"mask-l-from":u()}],"mask-image-l-to-color":[{"mask-l-to":u()}],"mask-image-x-from-pos":[{"mask-x-from":v()}],"mask-image-x-to-pos":[{"mask-x-to":v()}],"mask-image-x-from-color":[{"mask-x-from":u()}],"mask-image-x-to-color":[{"mask-x-to":u()}],"mask-image-y-from-pos":[{"mask-y-from":v()}],"mask-image-y-to-pos":[{"mask-y-to":v()}],"mask-image-y-from-color":[{"mask-y-from":u()}],"mask-image-y-to-color":[{"mask-y-to":u()}],"mask-image-radial":[{"mask-radial":[c,l]}],"mask-image-radial-from-pos":[{"mask-radial-from":v()}],"mask-image-radial-to-pos":[{"mask-radial-to":v()}],"mask-image-radial-from-color":[{"mask-radial-from":u()}],"mask-image-radial-to-color":[{"mask-radial-to":u()}],"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":V()}],"mask-image-conic-pos":[{"mask-conic":[g]}],"mask-image-conic-from-pos":[{"mask-conic-from":v()}],"mask-image-conic-to-pos":[{"mask-conic-to":v()}],"mask-image-conic-from-color":[{"mask-conic-from":u()}],"mask-image-conic-to-color":[{"mask-conic-to":u()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ne()}],"mask-repeat":[{mask:se()}],"mask-size":[{mask:n()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",c,l]}],filter:[{filter:["","none",c,l]}],blur:[{blur:W()}],brightness:[{brightness:[g,c,l]}],contrast:[{contrast:[g,c,l]}],"drop-shadow":[{"drop-shadow":["","none",P,me,ue]}],"drop-shadow-color":[{"drop-shadow":u()}],grayscale:[{grayscale:["",g,c,l]}],"hue-rotate":[{"hue-rotate":[g,c,l]}],invert:[{invert:["",g,c,l]}],saturate:[{saturate:[g,c,l]}],sepia:[{sepia:["",g,c,l]}],"backdrop-filter":[{"backdrop-filter":["","none",c,l]}],"backdrop-blur":[{"backdrop-blur":W()}],"backdrop-brightness":[{"backdrop-brightness":[g,c,l]}],"backdrop-contrast":[{"backdrop-contrast":[g,c,l]}],"backdrop-grayscale":[{"backdrop-grayscale":["",g,c,l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[g,c,l]}],"backdrop-invert":[{"backdrop-invert":["",g,c,l]}],"backdrop-opacity":[{"backdrop-opacity":[g,c,l]}],"backdrop-saturate":[{"backdrop-saturate":[g,c,l]}],"backdrop-sepia":[{"backdrop-sepia":["",g,c,l]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":p()}],"border-spacing-x":[{"border-spacing-x":p()}],"border-spacing-y":[{"border-spacing-y":p()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",c,l]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[g,"initial",c,l]}],ease:[{ease:["linear","initial",_,c,l]}],delay:[{delay:[g,c,l]}],animate:[{animate:["none",N,c,l]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[R,c,l]}],"perspective-origin":[{"perspective-origin":$()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[c,l,"","none","gpu","cpu"]}],"transform-origin":[{origin:$()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":["translate-none"],accent:[{accent:u()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:u()}],"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",c,l]}],"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":p()}],"scroll-mx":[{"scroll-mx":p()}],"scroll-my":[{"scroll-my":p()}],"scroll-ms":[{"scroll-ms":p()}],"scroll-me":[{"scroll-me":p()}],"scroll-mt":[{"scroll-mt":p()}],"scroll-mr":[{"scroll-mr":p()}],"scroll-mb":[{"scroll-mb":p()}],"scroll-ml":[{"scroll-ml":p()}],"scroll-p":[{"scroll-p":p()}],"scroll-px":[{"scroll-px":p()}],"scroll-py":[{"scroll-py":p()}],"scroll-ps":[{"scroll-ps":p()}],"scroll-pe":[{"scroll-pe":p()}],"scroll-pt":[{"scroll-pt":p()}],"scroll-pr":[{"scroll-pr":p()}],"scroll-pb":[{"scroll-pb":p()}],"scroll-pl":[{"scroll-pl":p()}],"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",c,l]}],fill:[{fill:["none",...u()]}],"stroke-w":[{stroke:[g,le,U,be]}],stroke:[{stroke:["none",...u()]}],"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"]}},Gr=hr(Mr);function K(...e){return Gr(je(e))}const Vr=Ne("inline-flex items-center justify-center whitespace-nowrap select-none disabled:opacity-50 disabled:pointer-events-none rounded-md font-medium leading-none focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[var(--atom-ring-color)] focus-visible:ring-offset-[var(--atom-ring-offset)] transition-colors transition-transform duration-150 ease-in-out relative overflow-hidden isolate [&>svg]:fill-current [&>svg]:stroke-current motion-reduce:transform-none motion-reduce:transition-none",{variants:{variant:{primary:"text-[var(--atom-button-fg)] bg-[var(--atom-button-bg)] hover:bg-[var(--atom-button-bg-hover)]",ghost:"text-[var(--atom-button-ghost-fg)] bg-[var(--atom-button-ghost-bg)] hover:bg-[var(--atom-button-ghost-hover-bg)]",success:"text-[var(--atom-button-success-fg)] bg-[var(--atom-button-success-bg)] hover:bg-[var(--atom-button-success-bg-hover)]",danger:"text-[var(--atom-button-danger-fg)] bg-[var(--atom-button-danger-bg)] hover:bg-[var(--atom-button-danger-bg-hover)]",warning:"text-[var(--atom-button-warning-fg)] bg-[var(--atom-button-warning-bg)] hover:bg-[var(--atom-button-warning-bg-hover)]",info:"text-[var(--atom-button-info-fg)] bg-[var(--atom-button-info-bg)] hover:bg-[var(--atom-button-info-bg-hover)]",icon:"rounded-full p-0 text-[var(--atom-button-ghost-fg)] bg-transparent hover:bg-[var(--atom-button-ghost-hover-bg)]",iconGhost:"rounded-full p-0 text-[var(--atom-button-ghost-fg)] bg-transparent hover:bg-[var(--atom-button-ghost-hover-bg)]",iconSquare:"rounded-md p-0 text-[var(--atom-button-ghost-fg)] bg-transparent hover:bg-[var(--atom-button-ghost-hover-bg)]",iconSquareGhost:"rounded-md p-0 text-[var(--atom-button-ghost-fg)] bg-transparent hover:bg-[var(--atom-button-ghost-hover-bg)]",secondary:"border border-[var(--atom-border)] text-[var(--atom-primary)] bg-transparent hover:border-[color-mix(in srgb, var(--atom-primary) 80%, black)] hover:text-[color-mix(in srgb, var(--atom-primary) 90%, black)] hover:bg-[var(--atom-button-ghost-hover-bg)] hover:text-[var(--atom-primary)]"},size:{sm:"h-8 px-3 text-sm [&>svg]:size-4",md:"h-10 px-4 text-sm [&>svg]:size-5",lg:"h-12 px-5 text-base [&>svg]:size-6"},fullWidth:{true:"w-full"}},compoundVariants:[{variant:"icon",size:"sm",class:"w-8 h-8 !px-0 aspect-square"},{variant:"icon",size:"md",class:"w-10 h-10 !px-0 aspect-square"},{variant:"icon",size:"lg",class:"w-12 h-12 !px-0 aspect-square"},{variant:"iconGhost",size:"sm",class:"w-8 h-8 !px-0 aspect-square"},{variant:"iconGhost",size:"md",class:"w-10 h-10 !px-0 aspect-square"},{variant:"iconGhost",size:"lg",class:"w-12 h-12 !px-0 aspect-square"},{variant:"iconSquare",size:"sm",class:"w-8 h-8 !px-0 aspect-square"},{variant:"iconSquare",size:"md",class:"w-10 h-10 !px-0 aspect-square"},{variant:"iconSquare",size:"lg",class:"w-12 h-12 !px-0 aspect-square"},{variant:"iconSquareGhost",size:"sm",class:"w-8 h-8 !px-0 aspect-square"},{variant:"iconSquareGhost",size:"md",class:"w-10 h-10 !px-0 aspect-square"},{variant:"iconSquareGhost",size:"lg",class:"w-12 h-12 !px-0 aspect-square"},{variant:"icon",class:"hover:scale-105 active:scale-95 hover:opacity-90"},{variant:"iconGhost",class:"hover:scale-105 active:scale-95 hover:opacity-90"},{variant:"iconSquare",class:"hover:scale-105 active:scale-95 hover:opacity-90"},{variant:"iconSquareGhost",class:"hover:scale-105 active:scale-95 hover:opacity-90"}],defaultVariants:{variant:"primary",size:"md"}}),De=T.forwardRef(({className:e,variant:t,size:r,fullWidth:o,asChild:s,ripple:a=!0,onPointerDown:i,disabled:d,type:m,...b},x)=>{const w=!!s,k=w?Qe:"button",P=T.useRef(null),E=d?"":void 0,R=w?void 0:m??"button",C=_=>{if(i?.(_),!a||d||_.button!==0)return;const N=P.current;if(!N)return;const O=N.getBoundingClientRect(),j=Math.max(O.width,O.height)*(r==="sm"?.5:r==="lg"?.7:.6),L=_.clientX-O.left-j,p=_.clientY-O.top-j,S=document.createElement("span");S.className="atom-ripple",S.style.width=`${j*2}px`,S.style.height=`${j*2}px`,S.style.left=`${L}px`,S.style.top=`${p}px`;const J=(t??"primary")==="ghost"||t==="icon"||t==="iconGhost"||t==="iconSquare"||t==="iconSquareGhost"||t==="secondary",X=getComputedStyle(N).getPropertyValue(J?"--atom-ripple-color-ghost":"--atom-ripple-color-solid").trim();S.style.background=X||"currentColor",N.appendChild(S),S.addEventListener("animationend",()=>S.remove(),{once:!0})};return z.jsx(k,{...b,"data-disabled":E,"aria-disabled":w&&d?!0:void 0,type:R,ref:_=>{P.current=_,typeof x=="function"?x(_):x&&(x.current=_)},onPointerDown:C,className:K(Vr({variant:t,size:r,fullWidth:o}),e),disabled:w?void 0:d})});De.displayName="Button";const $r=Ne("block w-full rounded-md outline-none leading-none bg-[var(--atom-input-bg)] text-[var(--atom-input-fg)] placeholder:text-[color-mix(in srgb, var(--atom-input-fg) 55%, transparent)] border border-[var(--atom-input-border)] transition-colors duration-150 ease-in-out hover:bg-[color-mix(in srgb, var(--atom-primary) 6%, transparent)] hover:border-[color-mix(in srgb, var(--atom-input-border) 70%, var(--atom-primary) 30%)] focus:outline-none focus:border-[var(--atom-input-focus,var(--atom-primary))] caret-[var(--atom-primary)] selection:bg-[color-mix(in srgb, var(--atom-primary) 30%, transparent)] disabled:opacity-60 disabled:cursor-not-allowed disabled:hover:bg-[var(--atom-input-bg)] disabled:hover:border-[var(--atom-input-border)] read-only:bg-[color-mix(in srgb, var(--atom-input-bg) 90%, var(--atom-border) 10%)] read-only:cursor-default read-only:hover:bg-[color-mix(in srgb, var(--atom-input-bg) 90%, var(--atom-border) 10%)]",{variants:{size:{sm:"h-9 px-3 text-sm",md:"h-10 px-3.5 text-sm",lg:"h-11 px-4 text-base"},tone:{default:"",invalid:"border-[var(--atom-error)]",success:"border-[var(--atom-success)]"},hasLeft:{true:"pl-9"},hasRight:{true:"pr-9"}},defaultVariants:{size:"md",tone:"default"}}),Ye=T.forwardRef(({className:e,size:t,tone:r="default",leftIcon:o,rightIcon:s,hint:a,errorText:i,loading:d=!1,id:m,...b},x)=>{const w=T.useId(),k=m??`inp_${w}`,P=!!o,E=!!s||d,R=[];a&&R.push(`${k}__hint`),i&&R.push(`${k}__err`);const C=t==="lg"?"w-10":t==="sm"?"w-8":"w-9",_=t==="lg"?"[&>svg]:w-5 [&>svg]:h-5":t==="sm"?"[&>svg]:w-4 [&>svg]:h-4":"[&>svg]:w-5 [&>svg]:h-5",N=r==="invalid"?"hover:bg-[color-mix(in srgb, var(--atom-error) 6%, transparent)] hover:border-[color-mix(in srgb, var(--atom-input-border) 70%, var(--atom-error) 30%)] focus:border-[var(--atom-error)]":r==="success"?"hover:bg-[color-mix(in srgb, var(--atom-success) 6%, transparent)] hover:border-[color-mix(in srgb, var(--atom-input-border) 70%, var(--atom-success) 30%)] focus:border-[var(--atom-success)]":"";return z.jsxs("div",{children:[z.jsxs("div",{className:"relative",children:[P&&z.jsx("span",{className:K("pointer-events-none absolute left-0 top-1/2 -translate-y-1/2 flex items-center justify-center",C),"aria-hidden":"true",children:z.jsx("span",{className:K(_,"text-[var(--atom-muted)] [&>svg]:fill-current [&>svg]:stroke-current"),children:o})}),E&&z.jsx("span",{className:K("absolute right-0 top-1/2 -translate-y-1/2 flex items-center justify-center",C),children:z.jsx("span",{className:K(_,"text-[var(--atom-muted)] [&>svg]:fill-current [&>svg]:stroke-current"),children:d?z.jsxs("svg",{viewBox:"0 0 24 24",className:"animate-spin",fill:"none",stroke:"currentColor",children:[z.jsx("circle",{cx:"12",cy:"12",r:"9",strokeOpacity:".2",strokeWidth:"3"}),z.jsx("path",{d:"M21 12a9 9 0 0 1-9 9",strokeWidth:"3",strokeLinecap:"round"})]}):s})}),z.jsx("input",{id:k,ref:x,className:K($r({size:t,tone:r,hasLeft:P,hasRight:E}),N,e),"aria-invalid":r==="invalid"||!!i||void 0,"aria-readonly":b.readOnly||void 0,"aria-busy":d||void 0,"aria-describedby":R.length?R.join(" "):void 0,...b})]}),(a||i)&&z.jsxs("div",{className:"mt-1 text-xs leading-snug",children:[i&&z.jsx("p",{id:`${k}__err`,className:"text-(--atom-error)",children:i}),a&&z.jsx("p",{id:`${k}__hint`,className:"text-(--atom-error)",children:a})]})]})});Ye.displayName="Input";exports.Button=De;exports.Input=Ye;
|
|
23
|
+
//# sourceMappingURL=index.cjs.map
|