ui-arreya-components 0.0.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/.storybook/main.ts +18 -0
- package/.storybook/preview.ts +16 -0
- package/.storybook/vitest.setup.ts +9 -0
- package/README.md +54 -0
- package/components.json +21 -0
- package/dist/styles.css +3 -0
- package/dist/ui.cjs.js +31 -0
- package/dist/ui.es.js +3060 -0
- package/dist/ui.umd.js +31 -0
- package/eslint.config.js +28 -0
- package/package.json +120 -0
- package/postcss.config.js +6 -0
- package/scripts/template.sh +57 -0
- package/src/components/feature/login-form.stories.tsx +35 -0
- package/src/components/feature/login-form.tsx +97 -0
- package/src/components/index.ts +1 -0
- package/src/components/ui/accordion.stories.tsx.disabled +36 -0
- package/src/components/ui/accordion.tsx +55 -0
- package/src/components/ui/alert-dialog.stories.tsx +46 -0
- package/src/components/ui/alert-dialog.tsx +139 -0
- package/src/components/ui/alert.stories.tsx +45 -0
- package/src/components/ui/alert.tsx +59 -0
- package/src/components/ui/aspect-ratio.stories.tsx +24 -0
- package/src/components/ui/aspect-ratio.tsx +5 -0
- package/src/components/ui/avatar.stories.tsx +29 -0
- package/src/components/ui/avatar.tsx +48 -0
- package/src/components/ui/badge.stories.tsx +43 -0
- package/src/components/ui/badge.tsx +36 -0
- package/src/components/ui/breadcrumb.stories.tsx +146 -0
- package/src/components/ui/breadcrumb.tsx +115 -0
- package/src/components/ui/button.stories.tsx +87 -0
- package/src/components/ui/button.tsx +57 -0
- package/src/components/ui/card.stories.tsx +99 -0
- package/src/components/ui/card.tsx +76 -0
- package/src/components/ui/carousel.stories.tsx +47 -0
- package/src/components/ui/carousel.tsx +260 -0
- package/src/components/ui/chart.tsx +363 -0
- package/src/components/ui/checkbox.tsx +28 -0
- package/src/components/ui/collapsible.tsx +9 -0
- package/src/components/ui/context-menu.tsx +198 -0
- package/src/components/ui/dialog.tsx +120 -0
- package/src/components/ui/drawer.tsx +116 -0
- package/src/components/ui/dropdown-menu.stories.tsx +92 -0
- package/src/components/ui/dropdown-menu.tsx +199 -0
- package/src/components/ui/form.tsx +176 -0
- package/src/components/ui/hover-card.tsx +27 -0
- package/src/components/ui/index.ts +1 -0
- package/src/components/ui/input-otp.tsx +69 -0
- package/src/components/ui/input.tsx +22 -0
- package/src/components/ui/label.tsx +24 -0
- package/src/components/ui/menubar.tsx +254 -0
- package/src/components/ui/navigation-menu.tsx +128 -0
- package/src/components/ui/pagination.tsx +117 -0
- package/src/components/ui/popover.tsx +31 -0
- package/src/components/ui/progress.tsx +26 -0
- package/src/components/ui/radio-group.tsx +42 -0
- package/src/components/ui/resizable.tsx +43 -0
- package/src/components/ui/scroll-area.tsx +46 -0
- package/src/components/ui/select.tsx +157 -0
- package/src/components/ui/separator.tsx +29 -0
- package/src/components/ui/sheet.tsx +140 -0
- package/src/components/ui/sidebar.tsx +771 -0
- package/src/components/ui/skeleton.tsx +15 -0
- package/src/components/ui/slider.tsx +26 -0
- package/src/components/ui/sonner.tsx +29 -0
- package/src/components/ui/switch.tsx +27 -0
- package/src/components/ui/table.tsx +120 -0
- package/src/components/ui/tabs.tsx +53 -0
- package/src/components/ui/textarea.tsx +22 -0
- package/src/components/ui/toast.tsx +127 -0
- package/src/components/ui/toaster.tsx +33 -0
- package/src/components/ui/toggle-group.tsx +59 -0
- package/src/components/ui/toggle.tsx +43 -0
- package/src/components/ui/tooltip.tsx +30 -0
- package/src/hooks/use-mobile.tsx +19 -0
- package/src/hooks/use-toast.ts +194 -0
- package/src/index.css +3484 -0
- package/src/index.ts +1 -0
- package/src/lib/types.ts +5 -0
- package/src/lib/utils.ts +6 -0
- package/src/styles/tailwind.css +86 -0
- package/tailwind.config.js +96 -0
- package/tsconfig.app.json +30 -0
- package/tsconfig.json +13 -0
- package/tsconfig.node.json +24 -0
- package/vite.config.ts +33 -0
- package/vitest.workspace.ts +32 -0
package/dist/ui.umd.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
(function(J,ne){typeof exports=="object"&&typeof module<"u"?ne(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],ne):(J=typeof globalThis<"u"?globalThis:J||self,ne(J.ui={},J.React))})(this,function(J,ne){"use strict";function cr(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const j=cr(ne);var ye={exports:{}},pe={};/**
|
|
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 Ne;function dr(){if(Ne)return pe;Ne=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(o,s,a){var c=null;if(a!==void 0&&(c=""+a),s.key!==void 0&&(c=""+s.key),"key"in s){a={};for(var b in s)b!=="key"&&(a[b]=s[b])}else a=s;return s=a.ref,{$$typeof:e,type:o,key:c,ref:s!==void 0?s:null,props:a}}return pe.Fragment=n,pe.jsx=t,pe.jsxs=t,pe}var be={};/**
|
|
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 Pe;function ur(){return Pe||(Pe=1,process.env.NODE_ENV!=="production"&&function(){function e(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===R?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case f:return"Fragment";case F:return"Portal";case me:return"Profiler";case N:return"StrictMode";case D:return"Suspense";case I:return"SuspenseList"}if(typeof r=="object")switch(typeof r.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),r.$$typeof){case Q:return(r.displayName||"Context")+".Provider";case he:return(r._context.displayName||"Context")+".Consumer";case le:var d=r.render;return r=r.displayName,r||(r=d.displayName||d.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case P:return d=r.displayName||null,d!==null?d:e(r.type)||"Memo";case M:d=r._payload,r=r._init;try{return e(r(d))}catch{}}return null}function n(r){return""+r}function t(r){try{n(r);var d=!1}catch{d=!0}if(d){d=console;var u=d.error,h=typeof Symbol=="function"&&Symbol.toStringTag&&r[Symbol.toStringTag]||r.constructor.name||"Object";return u.call(d,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",h),n(r)}}function o(){}function s(){if($===0){re=console.log,ue=console.info,te=console.warn,er=console.error,rr=console.group,tr=console.groupCollapsed,or=console.groupEnd;var r={configurable:!0,enumerable:!0,value:o,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}$++}function a(){if($--,$===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:W({},r,{value:re}),info:W({},r,{value:ue}),warn:W({},r,{value:te}),error:W({},r,{value:er}),group:W({},r,{value:rr}),groupCollapsed:W({},r,{value:tr}),groupEnd:W({},r,{value:or})})}0>$&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function c(r){if(_e===void 0)try{throw Error()}catch(u){var d=u.stack.trim().match(/\n( *(at )?)/);_e=d&&d[1]||"",nr=-1<u.stack.indexOf(`
|
|
18
|
+
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
+
`+_e+r+nr}function b(r,d){if(!r||ze)return"";var u=Oe.get(r);if(u!==void 0)return u;ze=!0,u=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var h=null;h=E.H,E.H=null,s();try{var T={DetermineComponentFrameRoot:function(){try{if(d){var q=function(){throw Error()};if(Object.defineProperty(q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(q,[])}catch(U){var Ee=U}Reflect.construct(r,[],q)}else{try{q.call()}catch(U){Ee=U}r.call(q.prototype)}}else{try{throw Error()}catch(U){Ee=U}(q=r())&&typeof q.catch=="function"&&q.catch(function(){})}}catch(U){if(U&&Ee&&typeof U.stack=="string")return[U.stack,Ee.stack]}return[null,null]}};T.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var w=Object.getOwnPropertyDescriptor(T.DetermineComponentFrameRoot,"name");w&&w.configurable&&Object.defineProperty(T.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=T.DetermineComponentFrameRoot(),L=g[0],fe=g[1];if(L&&fe){var _=L.split(`
|
|
20
|
+
`),oe=fe.split(`
|
|
21
|
+
`);for(g=w=0;w<_.length&&!_[w].includes("DetermineComponentFrameRoot");)w++;for(;g<oe.length&&!oe[g].includes("DetermineComponentFrameRoot");)g++;if(w===_.length||g===oe.length)for(w=_.length-1,g=oe.length-1;1<=w&&0<=g&&_[w]!==oe[g];)g--;for(;1<=w&&0<=g;w--,g--)if(_[w]!==oe[g]){if(w!==1||g!==1)do if(w--,g--,0>g||_[w]!==oe[g]){var ve=`
|
|
22
|
+
`+_[w].replace(" at new "," at ");return r.displayName&&ve.includes("<anonymous>")&&(ve=ve.replace("<anonymous>",r.displayName)),typeof r=="function"&&Oe.set(r,ve),ve}while(1<=w&&0<=g);break}}}finally{ze=!1,E.H=h,a(),Error.prepareStackTrace=u}return _=(_=r?r.displayName||r.name:"")?c(_):"",typeof r=="function"&&Oe.set(r,_),_}function p(r){if(r==null)return"";if(typeof r=="function"){var d=r.prototype;return b(r,!(!d||!d.isReactComponent))}if(typeof r=="string")return c(r);switch(r){case D:return c("Suspense");case I:return c("SuspenseList")}if(typeof r=="object")switch(r.$$typeof){case le:return r=b(r.render,!1),r;case P:return p(r.type);case M:d=r._payload,r=r._init;try{return p(r(d))}catch{}}return""}function v(){var r=E.A;return r===null?null:r.getOwner()}function x(r){if(ee.call(r,"key")){var d=Object.getOwnPropertyDescriptor(r,"key").get;if(d&&d.isReactWarning)return!1}return r.key!==void 0}function A(r,d){function u(){sr||(sr=!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)",d))}u.isReactWarning=!0,Object.defineProperty(r,"key",{get:u,configurable:!0})}function z(){var r=e(this.type);return ar[r]||(ar[r]=!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.")),r=this.props.ref,r!==void 0?r:null}function Y(r,d,u,h,T,w){return u=w.ref,r={$$typeof:G,type:r,key:d,props:w,_owner:T},(u!==void 0?u:null)!==null?Object.defineProperty(r,"ref",{enumerable:!1,get:z}):Object.defineProperty(r,"ref",{enumerable:!1,value:null}),r._store={},Object.defineProperty(r._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(r,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(r.props),Object.freeze(r)),r}function C(r,d,u,h,T,w){if(typeof r=="string"||typeof r=="function"||r===f||r===me||r===N||r===D||r===I||r===y||typeof r=="object"&&r!==null&&(r.$$typeof===M||r.$$typeof===P||r.$$typeof===Q||r.$$typeof===he||r.$$typeof===le||r.$$typeof===we||r.getModuleId!==void 0)){var g=d.children;if(g!==void 0)if(h)if(de(g)){for(h=0;h<g.length;h++)S(g[h],r);Object.freeze&&Object.freeze(g)}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 S(g,r)}else g="",(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(g+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),r===null?h="null":de(r)?h="array":r!==void 0&&r.$$typeof===G?(h="<"+(e(r.type)||"Unknown")+" />",g=" Did you accidentally export a JSX literal instead of a component?"):h=typeof r,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",h,g);if(ee.call(d,"key")){g=e(r);var L=Object.keys(d).filter(function(_){return _!=="key"});h=0<L.length?"{key: someKey, "+L.join(": ..., ")+": ...}":"{key: someKey}",ir[g+h]||(L=0<L.length?"{"+L.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
23
|
+
let props = %s;
|
|
24
|
+
<%s {...props} />
|
|
25
|
+
React keys must be passed directly to JSX without using spread:
|
|
26
|
+
let props = %s;
|
|
27
|
+
<%s key={someKey} {...props} />`,h,g,L,g),ir[g+h]=!0)}if(g=null,u!==void 0&&(t(u),g=""+u),x(d)&&(t(d.key),g=""+d.key),"key"in d){u={};for(var fe in d)fe!=="key"&&(u[fe]=d[fe])}else u=d;return g&&A(u,typeof r=="function"?r.displayName||r.name||"Unknown":r),Y(r,g,w,T,v(),u)}function S(r,d){if(typeof r=="object"&&r&&r.$$typeof!==it){if(de(r))for(var u=0;u<r.length;u++){var h=r[u];O(h)&&V(h,d)}else if(O(r))r._store&&(r._store.validated=1);else if(r===null||typeof r!="object"?u=null:(u=ce&&r[ce]||r["@@iterator"],u=typeof u=="function"?u:null),typeof u=="function"&&u!==r.entries&&(u=u.call(r),u!==r))for(;!(r=u.next()).done;)O(r.value)&&V(r.value,d)}}function O(r){return typeof r=="object"&&r!==null&&r.$$typeof===G}function V(r,d){if(r._store&&!r._store.validated&&r.key==null&&(r._store.validated=1,d=Z(d),!lr[d])){lr[d]=!0;var u="";r&&r._owner!=null&&r._owner!==v()&&(u=null,typeof r._owner.tag=="number"?u=e(r._owner.type):typeof r._owner.name=="string"&&(u=r._owner.name),u=" It was passed a child from "+u+".");var h=E.getCurrentStack;E.getCurrentStack=function(){var T=p(r.type);return h&&(T+=h()||""),T},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',d,u),E.getCurrentStack=h}}function Z(r){var d="",u=v();return u&&(u=e(u.type))&&(d=`
|
|
28
|
+
|
|
29
|
+
Check the render method of \``+u+"`."),d||(r=e(r))&&(d=`
|
|
30
|
+
|
|
31
|
+
Check the top-level render call using <`+r+">."),d}var K=ne,G=Symbol.for("react.transitional.element"),F=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),me=Symbol.for("react.profiler"),he=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),ce=Symbol.iterator,R=Symbol.for("react.client.reference"),E=K.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=Object.prototype.hasOwnProperty,W=Object.assign,we=Symbol.for("react.client.reference"),de=Array.isArray,$=0,re,ue,te,er,rr,tr,or;o.__reactDisabledLog=!0;var _e,nr,ze=!1,Oe=new(typeof WeakMap=="function"?WeakMap:Map),it=Symbol.for("react.client.reference"),sr,ar={},ir={},lr={};be.Fragment=f,be.jsx=function(r,d,u,h,T){return C(r,d,u,!1,h,T)},be.jsxs=function(r,d,u,h,T){return C(r,d,u,!0,h,T)}}()),be}var Me;function fr(){return Me||(Me=1,process.env.NODE_ENV==="production"?ye.exports=dr():ye.exports=ur()),ye.exports}var ge=fr();function Ve(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function pr(...e){return n=>{let t=!1;const o=e.map(s=>{const a=Ve(s,n);return!t&&typeof a=="function"&&(t=!0),a});if(t)return()=>{for(let s=0;s<o.length;s++){const a=o[s];typeof a=="function"?a():Ve(e[s],null)}}}}var Ge=j.forwardRef((e,n)=>{const{children:t,...o}=e,s=j.Children.toArray(t),a=s.find(gr);if(a){const c=a.props.children,b=s.map(p=>p===a?j.Children.count(c)>1?j.Children.only(null):j.isValidElement(c)?c.props.children:null:p);return ge.jsx(ke,{...o,ref:n,children:j.isValidElement(c)?j.cloneElement(c,void 0,b):null})}return ge.jsx(ke,{...o,ref:n,children:t})});Ge.displayName="Slot";var ke=j.forwardRef((e,n)=>{const{children:t,...o}=e;if(j.isValidElement(t)){const s=hr(t),a=mr(o,t.props);return t.type!==j.Fragment&&(a.ref=n?pr(n,s):s),j.cloneElement(t,a)}return j.Children.count(t)>1?j.Children.only(null):null});ke.displayName="SlotClone";var br=({children:e})=>ge.jsx(ge.Fragment,{children:e});function gr(e){return j.isValidElement(e)&&e.type===br}function mr(e,n){const t={...n};for(const o in n){const s=e[o],a=n[o];/^on[A-Z]/.test(o)?s&&a?t[o]=(...b)=>{a(...b),s(...b)}:s&&(t[o]=s):o==="style"?t[o]={...s,...a}:o==="className"&&(t[o]=[s,a].filter(Boolean).join(" "))}return{...e,...t}}function hr(e){var o,s;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}function Ie(e){var n,t,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(n=0;n<s;n++)e[n]&&(t=Ie(e[n]))&&(o&&(o+=" "),o+=t)}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function We(){for(var e,n,t=0,o="",s=arguments.length;t<s;t++)(e=arguments[t])&&(n=Ie(e))&&(o&&(o+=" "),o+=n);return o}const $e=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ye=We,vr=(e,n)=>t=>{var o;if((n==null?void 0:n.variants)==null)return Ye(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:s,defaultVariants:a}=n,c=Object.keys(s).map(v=>{const x=t==null?void 0:t[v],A=a==null?void 0:a[v];if(x===null)return null;const z=$e(x)||$e(A);return s[v][z]}),b=t&&Object.entries(t).reduce((v,x)=>{let[A,z]=x;return z===void 0||(v[A]=z),v},{}),p=n==null||(o=n.compoundVariants)===null||o===void 0?void 0:o.reduce((v,x)=>{let{class:A,className:z,...Y}=x;return Object.entries(Y).every(C=>{let[S,O]=C;return Array.isArray(O)?O.includes({...a,...b}[S]):{...a,...b}[S]===O})?[...v,A,z]:v},[]);return Ye(e,c,p,t==null?void 0:t.class,t==null?void 0:t.className)},Ce="-",yr=e=>{const n=wr(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{const b=c.split(Ce);return b[0]===""&&b.length!==1&&b.shift(),Le(b,n)||xr(c)},getConflictingClassGroupIds:(c,b)=>{const p=t[c]||[];return b&&o[c]?[...p,...o[c]]:p}}},Le=(e,n)=>{var c;if(e.length===0)return n.classGroupId;const t=e[0],o=n.nextPart.get(t),s=o?Le(e.slice(1),o):void 0;if(s)return s;if(n.validators.length===0)return;const a=e.join(Ce);return(c=n.validators.find(({validator:b})=>b(a)))==null?void 0:c.classGroupId},Ue=/^\[(.+)\]$/,xr=e=>{if(Ue.test(e)){const n=Ue.exec(e)[1],t=n==null?void 0:n.substring(0,n.indexOf(":"));if(t)return"arbitrary.."+t}},wr=e=>{const{theme:n,classGroups:t}=e,o={nextPart:new Map,validators:[]};for(const s in t)Se(t[s],o,s,n);return o},Se=(e,n,t,o)=>{e.forEach(s=>{if(typeof s=="string"){const a=s===""?n:Be(n,s);a.classGroupId=t;return}if(typeof s=="function"){if(Er(s)){Se(s(o),n,t,o);return}n.validators.push({validator:s,classGroupId:t});return}Object.entries(s).forEach(([a,c])=>{Se(c,Be(n,a),t,o)})})},Be=(e,n)=>{let t=e;return n.split(Ce).forEach(o=>{t.nextPart.has(o)||t.nextPart.set(o,{nextPart:new Map,validators:[]}),t=t.nextPart.get(o)}),t},Er=e=>e.isThemeGetter,kr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=new Map,o=new Map;const s=(a,c)=>{t.set(a,c),n++,n>e&&(n=0,o=t,t=new Map)};return{get(a){let c=t.get(a);if(c!==void 0)return c;if((c=o.get(a))!==void 0)return s(a,c),c},set(a,c){t.has(a)?t.set(a,c):s(a,c)}}},Re="!",Ae=":",Cr=Ae.length,Sr=e=>{const{prefix:n,experimentalParseClassName:t}=e;let o=s=>{const a=[];let c=0,b=0,p=0,v;for(let C=0;C<s.length;C++){let S=s[C];if(c===0&&b===0){if(S===Ae){a.push(s.slice(p,C)),p=C+Cr;continue}if(S==="/"){v=C;continue}}S==="["?c++:S==="]"?c--:S==="("?b++:S===")"&&b--}const x=a.length===0?s:s.substring(p),A=Rr(x),z=A!==x,Y=v&&v>p?v-p:void 0;return{modifiers:a,hasImportantModifier:z,baseClassName:A,maybePostfixModifierPosition:Y}};if(n){const s=n+Ae,a=o;o=c=>c.startsWith(s)?a(c.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:c,maybePostfixModifierPosition:void 0}}if(t){const s=o;o=a=>t({className:a,parseClassName:s})}return o},Rr=e=>e.endsWith(Re)?e.substring(0,e.length-1):e.startsWith(Re)?e.substring(1):e,Ar=e=>{const n=Object.fromEntries(e.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;const s=[];let a=[];return o.forEach(c=>{c[0]==="["||n[c]?(s.push(...a.sort(),c),a=[]):a.push(c)}),s.push(...a.sort()),s}},Tr=e=>({cache:kr(e.cacheSize),parseClassName:Sr(e),sortModifiers:Ar(e),...yr(e)}),jr=/\s+/,_r=(e,n)=>{const{parseClassName:t,getClassGroupId:o,getConflictingClassGroupIds:s,sortModifiers:a}=n,c=[],b=e.trim().split(jr);let p="";for(let v=b.length-1;v>=0;v-=1){const x=b[v],{isExternal:A,modifiers:z,hasImportantModifier:Y,baseClassName:C,maybePostfixModifierPosition:S}=t(x);if(A){p=x+(p.length>0?" "+p:p);continue}let O=!!S,V=o(O?C.substring(0,S):C);if(!V){if(!O){p=x+(p.length>0?" "+p:p);continue}if(V=o(C),!V){p=x+(p.length>0?" "+p:p);continue}O=!1}const Z=a(z).join(":"),K=Y?Z+Re:Z,G=K+V;if(c.includes(G))continue;c.push(G);const F=s(V,O);for(let f=0;f<F.length;++f){const N=F[f];c.push(K+N)}p=x+(p.length>0?" "+p:p)}return p};function zr(){let e=0,n,t,o="";for(;e<arguments.length;)(n=arguments[e++])&&(t=Fe(n))&&(o&&(o+=" "),o+=t);return o}const Fe=e=>{if(typeof e=="string")return e;let n,t="";for(let o=0;o<e.length;o++)e[o]&&(n=Fe(e[o]))&&(t&&(t+=" "),t+=n);return t};function Or(e,...n){let t,o,s,a=c;function c(p){const v=n.reduce((x,A)=>A(x),e());return t=Tr(v),o=t.cache.get,s=t.cache.set,a=b,b(p)}function b(p){const v=o(p);if(v)return v;const x=_r(p,t);return s(p,x),x}return function(){return a(zr.apply(null,arguments))}}const k=e=>{const n=t=>t[e]||[];return n.isThemeGetter=!0,n},qe=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Je=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Nr=/^\d+\/\d+$/,Pr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Mr=/\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$/,Vr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Gr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ir=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,se=e=>Nr.test(e),m=e=>!!e&&!Number.isNaN(Number(e)),H=e=>!!e&&Number.isInteger(Number(e)),He=e=>e.endsWith("%")&&m(e.slice(0,-1)),B=e=>Pr.test(e),Wr=()=>!0,$r=e=>Mr.test(e)&&!Vr.test(e),Te=()=>!1,Yr=e=>Gr.test(e),Lr=e=>Ir.test(e),Ur=e=>!i(e)&&!l(e),Br=e=>ae(e,Ke,Te),i=e=>qe.test(e),X=e=>ae(e,Qe,$r),je=e=>ae(e,rt,m),Fr=e=>ae(e,Xe,Te),qr=e=>ae(e,Ze,Lr),Jr=e=>ae(e,Te,Yr),l=e=>Je.test(e),xe=e=>ie(e,Qe),Hr=e=>ie(e,tt),Xr=e=>ie(e,Xe),Zr=e=>ie(e,Ke),Kr=e=>ie(e,Ze),Qr=e=>ie(e,ot,!0),ae=(e,n,t)=>{const o=qe.exec(e);return o?o[1]?n(o[1]):t(o[2]):!1},ie=(e,n,t=!1)=>{const o=Je.exec(e);return o?o[1]?n(o[1]):t:!1},Xe=e=>e==="position",Dr=new Set(["image","url"]),Ze=e=>Dr.has(e),et=new Set(["length","size","percentage"]),Ke=e=>et.has(e),Qe=e=>e==="length",rt=e=>e==="number",tt=e=>e==="family-name",ot=e=>e==="shadow",nt=Or(()=>{const e=k("color"),n=k("font"),t=k("text"),o=k("font-weight"),s=k("tracking"),a=k("leading"),c=k("breakpoint"),b=k("container"),p=k("spacing"),v=k("radius"),x=k("shadow"),A=k("inset-shadow"),z=k("drop-shadow"),Y=k("blur"),C=k("perspective"),S=k("aspect"),O=k("ease"),V=k("animate"),Z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],K=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],G=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto","contain","none"],f=()=>[l,i,p],N=()=>[se,"full","auto",...f()],me=()=>[H,"none","subgrid",l,i],he=()=>["auto",{span:["full",H,l,i]},l,i],Q=()=>[H,"auto",l,i],le=()=>["auto","min","max","fr",l,i],D=()=>["start","end","center","between","around","evenly","stretch","baseline"],I=()=>["start","end","center","stretch"],P=()=>["auto",...f()],M=()=>[se,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...f()],y=()=>[e,l,i],ce=()=>[He,X],R=()=>["","none","full",v,l,i],E=()=>["",m,xe,X],ee=()=>["solid","dashed","dotted","double"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],we=()=>["","none",Y,l,i],de=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",l,i],$=()=>["none",m,l,i],re=()=>["none",m,l,i],ue=()=>[m,l,i],te=()=>[se,"full",...f()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[B],breakpoint:[B],color:[Wr],container:[B],"drop-shadow":[B],ease:["in","out","in-out"],font:[Ur],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[B],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[B],shadow:[B],spacing:["px",m],text:[B],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",se,i,l,S]}],container:["container"],columns:[{columns:[m,i,l,b]}],"break-after":[{"break-after":Z()}],"break-before":[{"break-before":Z()}],"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:[...K(),i,l]}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[H,"auto",l,i]}],basis:[{basis:[se,"full","auto",b,...f()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[m,se,"auto","initial","none",i]}],grow:[{grow:["",m,l,i]}],shrink:[{shrink:["",m,l,i]}],order:[{order:[H,"first","last","none",l,i]}],"grid-cols":[{"grid-cols":me()}],"col-start-end":[{col:he()}],"col-start":[{"col-start":Q()}],"col-end":[{"col-end":Q()}],"grid-rows":[{"grid-rows":me()}],"row-start-end":[{row:he()}],"row-start":[{"row-start":Q()}],"row-end":[{"row-end":Q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":le()}],"auto-rows":[{"auto-rows":le()}],gap:[{gap:f()}],"gap-x":[{"gap-x":f()}],"gap-y":[{"gap-y":f()}],"justify-content":[{justify:[...D(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...I(),"baseline"]}],"align-self":[{self:["auto",...I(),"baseline"]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],p:[{p:f()}],px:[{px:f()}],py:[{py:f()}],ps:[{ps:f()}],pe:[{pe:f()}],pt:[{pt:f()}],pr:[{pr:f()}],pb:[{pb:f()}],pl:[{pl:f()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":f()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":f()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[b,"screen",...M()]}],"min-w":[{"min-w":[b,"screen","none",...M()]}],"max-w":[{"max-w":[b,"screen","none","prose",{screen:[c]},...M()]}],h:[{h:["screen",...M()]}],"min-h":[{"min-h":["screen","none",...M()]}],"max-h":[{"max-h":["screen",...M()]}],"font-size":[{text:["base",t,xe,X]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,l,je]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",He,i]}],"font-family":[{font:[Hr,i,n]}],"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,l,i]}],"line-clamp":[{"line-clamp":[m,"none",l,je]}],leading:[{leading:[a,...f()]}],"list-image":[{"list-image":["none",l,i]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",l,i]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:y()}],"text-color":[{text:y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[m,"from-font","auto",l,X]}],"text-decoration-color":[{decoration:y()}],"underline-offset":[{"underline-offset":[m,"auto",l,i]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:f()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",l,i]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",l,i]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...K(),Xr,Fr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",Zr,Br]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},H,l,i],radial:["",l,i],conic:[H,l,i]},Kr,qr]}],"bg-color":[{bg:y()}],"gradient-from-pos":[{from:ce()}],"gradient-via-pos":[{via:ce()}],"gradient-to-pos":[{to:ce()}],"gradient-from":[{from:y()}],"gradient-via":[{via:y()}],"gradient-to":[{to:y()}],rounded:[{rounded:R()}],"rounded-s":[{"rounded-s":R()}],"rounded-e":[{"rounded-e":R()}],"rounded-t":[{"rounded-t":R()}],"rounded-r":[{"rounded-r":R()}],"rounded-b":[{"rounded-b":R()}],"rounded-l":[{"rounded-l":R()}],"rounded-ss":[{"rounded-ss":R()}],"rounded-se":[{"rounded-se":R()}],"rounded-ee":[{"rounded-ee":R()}],"rounded-es":[{"rounded-es":R()}],"rounded-tl":[{"rounded-tl":R()}],"rounded-tr":[{"rounded-tr":R()}],"rounded-br":[{"rounded-br":R()}],"rounded-bl":[{"rounded-bl":R()}],"border-w":[{border:E()}],"border-w-x":[{"border-x":E()}],"border-w-y":[{"border-y":E()}],"border-w-s":[{"border-s":E()}],"border-w-e":[{"border-e":E()}],"border-w-t":[{"border-t":E()}],"border-w-r":[{"border-r":E()}],"border-w-b":[{"border-b":E()}],"border-w-l":[{"border-l":E()}],"divide-x":[{"divide-x":E()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":E()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:y()}],"border-color-x":[{"border-x":y()}],"border-color-y":[{"border-y":y()}],"border-color-s":[{"border-s":y()}],"border-color-e":[{"border-e":y()}],"border-color-t":[{"border-t":y()}],"border-color-r":[{"border-r":y()}],"border-color-b":[{"border-b":y()}],"border-color-l":[{"border-l":y()}],"divide-color":[{divide:y()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[m,l,i]}],"outline-w":[{outline:["",m,xe,X]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",x,Qr,Jr]}],"shadow-color":[{shadow:y()}],"inset-shadow":[{"inset-shadow":["none",l,i,A]}],"inset-shadow-color":[{"inset-shadow":y()}],"ring-w":[{ring:E()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:y()}],"ring-offset-w":[{"ring-offset":[m,X]}],"ring-offset-color":[{"ring-offset":y()}],"inset-ring-w":[{"inset-ring":E()}],"inset-ring-color":[{"inset-ring":y()}],opacity:[{opacity:[m,l,i]}],"mix-blend":[{"mix-blend":[...W(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none",l,i]}],blur:[{blur:we()}],brightness:[{brightness:[m,l,i]}],contrast:[{contrast:[m,l,i]}],"drop-shadow":[{"drop-shadow":["","none",z,l,i]}],grayscale:[{grayscale:["",m,l,i]}],"hue-rotate":[{"hue-rotate":[m,l,i]}],invert:[{invert:["",m,l,i]}],saturate:[{saturate:[m,l,i]}],sepia:[{sepia:["",m,l,i]}],"backdrop-filter":[{"backdrop-filter":["","none",l,i]}],"backdrop-blur":[{"backdrop-blur":we()}],"backdrop-brightness":[{"backdrop-brightness":[m,l,i]}],"backdrop-contrast":[{"backdrop-contrast":[m,l,i]}],"backdrop-grayscale":[{"backdrop-grayscale":["",m,l,i]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m,l,i]}],"backdrop-invert":[{"backdrop-invert":["",m,l,i]}],"backdrop-opacity":[{"backdrop-opacity":[m,l,i]}],"backdrop-saturate":[{"backdrop-saturate":[m,l,i]}],"backdrop-sepia":[{"backdrop-sepia":["",m,l,i]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":f()}],"border-spacing-x":[{"border-spacing-x":f()}],"border-spacing-y":[{"border-spacing-y":f()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",l,i]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[m,"initial",l,i]}],ease:[{ease:["linear","initial",O,l,i]}],delay:[{delay:[m,l,i]}],animate:[{animate:["none",V,l,i]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,l,i]}],"perspective-origin":[{"perspective-origin":de()}],rotate:[{rotate:$()}],"rotate-x":[{"rotate-x":$()}],"rotate-y":[{"rotate-y":$()}],"rotate-z":[{"rotate-z":$()}],scale:[{scale:re()}],"scale-x":[{"scale-x":re()}],"scale-y":[{"scale-y":re()}],"scale-z":[{"scale-z":re()}],"scale-3d":["scale-3d"],skew:[{skew:ue()}],"skew-x":[{"skew-x":ue()}],"skew-y":[{"skew-y":ue()}],transform:[{transform:[l,i,"","none","gpu","cpu"]}],"transform-origin":[{origin:de()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:te()}],"translate-x":[{"translate-x":te()}],"translate-y":[{"translate-y":te()}],"translate-z":[{"translate-z":te()}],"translate-none":["translate-none"],accent:[{accent:y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:y()}],"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",l,i]}],"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":f()}],"scroll-mx":[{"scroll-mx":f()}],"scroll-my":[{"scroll-my":f()}],"scroll-ms":[{"scroll-ms":f()}],"scroll-me":[{"scroll-me":f()}],"scroll-mt":[{"scroll-mt":f()}],"scroll-mr":[{"scroll-mr":f()}],"scroll-mb":[{"scroll-mb":f()}],"scroll-ml":[{"scroll-ml":f()}],"scroll-p":[{"scroll-p":f()}],"scroll-px":[{"scroll-px":f()}],"scroll-py":[{"scroll-py":f()}],"scroll-ps":[{"scroll-ps":f()}],"scroll-pe":[{"scroll-pe":f()}],"scroll-pt":[{"scroll-pt":f()}],"scroll-pr":[{"scroll-pr":f()}],"scroll-pb":[{"scroll-pb":f()}],"scroll-pl":[{"scroll-pl":f()}],"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",l,i]}],fill:[{fill:["none",...y()]}],"stroke-w":[{stroke:[m,xe,X,je]}],stroke:[{stroke:["none",...y()]}],"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-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-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:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}});function st(...e){return nt(We(e))}const at=vr("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),De=j.forwardRef(({className:e,variant:n,size:t,asChild:o=!1,...s},a)=>{const c=o?Ge:"button";return ge.jsx(c,{className:st(at({variant:n,size:t,className:e})),ref:a,...s})});De.displayName="Button",J.Button=De,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})});
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import js from '@eslint/js'
|
|
2
|
+
import globals from 'globals'
|
|
3
|
+
import reactHooks from 'eslint-plugin-react-hooks'
|
|
4
|
+
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
5
|
+
import tseslint from 'typescript-eslint'
|
|
6
|
+
|
|
7
|
+
export default tseslint.config(
|
|
8
|
+
{ ignores: ['dist'] },
|
|
9
|
+
{
|
|
10
|
+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
|
11
|
+
files: ['**/*.{ts,tsx}'],
|
|
12
|
+
languageOptions: {
|
|
13
|
+
ecmaVersion: 2020,
|
|
14
|
+
globals: globals.browser,
|
|
15
|
+
},
|
|
16
|
+
plugins: {
|
|
17
|
+
'react-hooks': reactHooks,
|
|
18
|
+
'react-refresh': reactRefresh,
|
|
19
|
+
},
|
|
20
|
+
rules: {
|
|
21
|
+
...reactHooks.configs.recommended.rules,
|
|
22
|
+
'react-refresh/only-export-components': [
|
|
23
|
+
'warn',
|
|
24
|
+
{ allowConstantExport: true },
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
)
|
package/package.json
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ui-arreya-components",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"import": "./dist/ui.es.js",
|
|
9
|
+
"require": "./dist/ui.umd.js"
|
|
10
|
+
},
|
|
11
|
+
"./styles.css": {
|
|
12
|
+
"require": "./dist/styles.css",
|
|
13
|
+
"default": "./dist/styles.css"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"dev": "vite",
|
|
18
|
+
"build": "tsc -b && vite build && npm run build:css",
|
|
19
|
+
"build:css": "tailwindcss -m -i ./src/styles/tailwind.css -o ./dist/styles.css",
|
|
20
|
+
"lint": "eslint .",
|
|
21
|
+
"preview": "vite preview",
|
|
22
|
+
"storybook": "concurrently 'npm run storybook:css' 'storybook dev -p 6006'",
|
|
23
|
+
"storybook:css": "tailwindcss -w -i ./src/styles/tailwind.css -o ./src/index.css",
|
|
24
|
+
"build-storybook": "concurrently 'npm run build-storybook:css' 'storybook build'",
|
|
25
|
+
"build-storybook:css": "tailwindcss -m -i ./src/styles/tailwind.css -o ./src/index.css",
|
|
26
|
+
"prepublish": "npm run build"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"react": "^18.0.0",
|
|
30
|
+
"react-dom": "^18.0.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@chromatic-com/storybook": "^3.2.6",
|
|
34
|
+
"@eslint/js": "^9.21.0",
|
|
35
|
+
"@storybook/addon-essentials": "^8.6.7",
|
|
36
|
+
"@storybook/addon-onboarding": "^8.6.7",
|
|
37
|
+
"@storybook/blocks": "^8.6.7",
|
|
38
|
+
"@storybook/experimental-addon-test": "^8.6.7",
|
|
39
|
+
"@storybook/react": "^8.6.7",
|
|
40
|
+
"@storybook/react-vite": "^8.6.7",
|
|
41
|
+
"@storybook/test": "^8.6.7",
|
|
42
|
+
"@tailwindcss/vite": "^4.0.14",
|
|
43
|
+
"@types/node": "^22.13.10",
|
|
44
|
+
"@types/react": "^18",
|
|
45
|
+
"@types/react-dom": "^18",
|
|
46
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
47
|
+
"@vitest/browser": "^3.0.9",
|
|
48
|
+
"@vitest/coverage-v8": "^3.0.9",
|
|
49
|
+
"autoprefixer": "^10.4.21",
|
|
50
|
+
"class-variance-authority": "^0.7.1",
|
|
51
|
+
"clsx": "^2.1.1",
|
|
52
|
+
"concurrently": "^9.1.2",
|
|
53
|
+
"eslint": "^9.21.0",
|
|
54
|
+
"eslint-plugin-react-hooks": "^5.1.0",
|
|
55
|
+
"eslint-plugin-react-refresh": "^0.4.19",
|
|
56
|
+
"eslint-plugin-storybook": "^0.11.6",
|
|
57
|
+
"globals": "^15.15.0",
|
|
58
|
+
"lucide-react": "^0.482.0",
|
|
59
|
+
"playwright": "^1.51.0",
|
|
60
|
+
"postcss": "^8.5.3",
|
|
61
|
+
"prop-types": "^15.8.1",
|
|
62
|
+
"radix-ui": "^1.1.3",
|
|
63
|
+
"react": "^18.0.0",
|
|
64
|
+
"react-dom": "^18.0.0",
|
|
65
|
+
"storybook": "^8.6.7",
|
|
66
|
+
"tailwind-merge": "^3.0.2",
|
|
67
|
+
"tailwindcss": "^3.4.17",
|
|
68
|
+
"tailwindcss-animate": "^1.0.7",
|
|
69
|
+
"typescript": "~5.7.2",
|
|
70
|
+
"typescript-eslint": "^8.24.1",
|
|
71
|
+
"vite": "^6.2.0",
|
|
72
|
+
"vite-plugin-dts": "^4.5.3",
|
|
73
|
+
"vitest": "^3.0.9"
|
|
74
|
+
},
|
|
75
|
+
"eslintConfig": {
|
|
76
|
+
"extends": [
|
|
77
|
+
"plugin:storybook/recommended"
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
"dependencies": {
|
|
81
|
+
"@hookform/resolvers": "^4.1.3",
|
|
82
|
+
"@radix-ui/react-accordion": "^1.2.3",
|
|
83
|
+
"@radix-ui/react-alert-dialog": "^1.1.6",
|
|
84
|
+
"@radix-ui/react-aspect-ratio": "^1.1.2",
|
|
85
|
+
"@radix-ui/react-avatar": "^1.1.3",
|
|
86
|
+
"@radix-ui/react-checkbox": "^1.1.4",
|
|
87
|
+
"@radix-ui/react-collapsible": "^1.1.3",
|
|
88
|
+
"@radix-ui/react-context-menu": "^2.2.6",
|
|
89
|
+
"@radix-ui/react-dialog": "^1.1.6",
|
|
90
|
+
"@radix-ui/react-dropdown-menu": "^2.1.6",
|
|
91
|
+
"@radix-ui/react-hover-card": "^1.1.6",
|
|
92
|
+
"@radix-ui/react-label": "^2.1.2",
|
|
93
|
+
"@radix-ui/react-menubar": "^1.1.6",
|
|
94
|
+
"@radix-ui/react-navigation-menu": "^1.2.5",
|
|
95
|
+
"@radix-ui/react-popover": "^1.1.6",
|
|
96
|
+
"@radix-ui/react-progress": "^1.1.2",
|
|
97
|
+
"@radix-ui/react-radio-group": "^1.2.3",
|
|
98
|
+
"@radix-ui/react-scroll-area": "^1.2.3",
|
|
99
|
+
"@radix-ui/react-select": "^2.1.6",
|
|
100
|
+
"@radix-ui/react-separator": "^1.1.2",
|
|
101
|
+
"@radix-ui/react-slider": "^1.2.3",
|
|
102
|
+
"@radix-ui/react-slot": "^1.1.2",
|
|
103
|
+
"@radix-ui/react-switch": "^1.1.3",
|
|
104
|
+
"@radix-ui/react-tabs": "^1.1.3",
|
|
105
|
+
"@radix-ui/react-toast": "^1.2.6",
|
|
106
|
+
"@radix-ui/react-toggle": "^1.1.2",
|
|
107
|
+
"@radix-ui/react-toggle-group": "^1.1.2",
|
|
108
|
+
"@radix-ui/react-tooltip": "^1.1.8",
|
|
109
|
+
"embla-carousel-react": "^8.5.2",
|
|
110
|
+
"input-otp": "^1.4.2",
|
|
111
|
+
"next-themes": "^0.4.6",
|
|
112
|
+
"react-hook-form": "^7.54.2",
|
|
113
|
+
"react-resizable-panels": "^2.1.7",
|
|
114
|
+
"recharts": "^2.15.1",
|
|
115
|
+
"sonner": "^2.0.1",
|
|
116
|
+
"tailwind-animate": "^0.2.10",
|
|
117
|
+
"vaul": "^1.1.2",
|
|
118
|
+
"zod": "^3.24.2"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Check if a parameter is passed
|
|
4
|
+
if [ "$#" -ne 2 ]; then
|
|
5
|
+
echo "Usage: $0 <feature|component> <name>"
|
|
6
|
+
exit 1
|
|
7
|
+
fi
|
|
8
|
+
|
|
9
|
+
# Determine which template to output based on the parameter
|
|
10
|
+
TEMPLATE_TYPE=$1
|
|
11
|
+
COMPONENT_OR_FEATURE_NAME=$2
|
|
12
|
+
|
|
13
|
+
case $TEMPLATE_TYPE in
|
|
14
|
+
feature)
|
|
15
|
+
echo "Creating feature template..."
|
|
16
|
+
mkdir -p src/components/features/${COMPONENT_OR_FEATURE_NAME}
|
|
17
|
+
|
|
18
|
+
cat <<EOF > src/components/features/${COMPONENT_OR_FEATURE_NAME}/index.ts
|
|
19
|
+
export * from './${COMPONENT_OR_FEATURE_NAME}'
|
|
20
|
+
EOF
|
|
21
|
+
|
|
22
|
+
cat <<EOF >> src/components/features/index.ts
|
|
23
|
+
export * from './${COMPONENT_OR_FEATURE_NAME}'
|
|
24
|
+
EOF
|
|
25
|
+
|
|
26
|
+
cat <<EOF >> src/components/index.ts
|
|
27
|
+
export * from './features/${COMPONENT_OR_FEATURE_NAME}'
|
|
28
|
+
EOF
|
|
29
|
+
|
|
30
|
+
touch src/components/features/${COMPONENT_OR_FEATURE_NAME}/{${COMPONENT_OR_FEATURE_NAME}.stories.tsx,${COMPONENT_OR_FEATURE_NAME}.tsx}
|
|
31
|
+
;;
|
|
32
|
+
component)
|
|
33
|
+
echo "Creating component template"
|
|
34
|
+
mkdir -p src/components/ui/${COMPONENT_OR_FEATURE_NAME}
|
|
35
|
+
|
|
36
|
+
cat <<EOF > src/components/ui/${COMPONENT_OR_FEATURE_NAME}/index.ts
|
|
37
|
+
export * from './${COMPONENT_OR_FEATURE_NAME}'
|
|
38
|
+
EOF
|
|
39
|
+
|
|
40
|
+
cat <<EOF >> src/components/ui/index.ts
|
|
41
|
+
export * from './${COMPONENT_OR_FEATURE_NAME}'
|
|
42
|
+
EOF
|
|
43
|
+
|
|
44
|
+
cat <<EOF >> src/components/index.ts
|
|
45
|
+
export * from './ui/${COMPONENT_OR_FEATURE_NAME}'
|
|
46
|
+
EOF
|
|
47
|
+
|
|
48
|
+
touch src/components/ui/${COMPONENT_OR_FEATURE_NAME}/{${COMPONENT_OR_FEATURE_NAME}.stories.tsx,${COMPONENT_OR_FEATURE_NAME}.tsx}
|
|
49
|
+
;;
|
|
50
|
+
*)
|
|
51
|
+
echo "Invalid option. Usage: $0 <feature|component> <name>"
|
|
52
|
+
exit 1
|
|
53
|
+
|
|
54
|
+
;;
|
|
55
|
+
esac
|
|
56
|
+
|
|
57
|
+
echo "Template created successfully!"
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
|
|
3
|
+
import { GalleryVerticalEnd } from 'lucide-react'
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
LoginForm
|
|
7
|
+
} from "./login-form"
|
|
8
|
+
|
|
9
|
+
const meta = {
|
|
10
|
+
title: "Feature/LoginForm",
|
|
11
|
+
component: LoginForm,
|
|
12
|
+
parameters: {
|
|
13
|
+
layout: "centered",
|
|
14
|
+
},
|
|
15
|
+
tags: ["autodocs"],
|
|
16
|
+
} satisfies Meta<typeof LoginForm>
|
|
17
|
+
|
|
18
|
+
export default meta
|
|
19
|
+
type Story = StoryObj<typeof meta>
|
|
20
|
+
|
|
21
|
+
export const Default: Story = {
|
|
22
|
+
render: () => (
|
|
23
|
+
<div className="flex min-h-svh flex-col items-center justify-center gap-6 bg-muted p-6 md:p-10">
|
|
24
|
+
<div className="flex w-full max-w-sm flex-col gap-6">
|
|
25
|
+
<a href="#" className="flex items-center gap-2 self-center font-medium">
|
|
26
|
+
<div className="flex h-6 w-6 items-center justify-center rounded-md bg-primary text-primary-foreground">
|
|
27
|
+
<GalleryVerticalEnd className="size-4" />
|
|
28
|
+
</div>
|
|
29
|
+
Acme Inc.
|
|
30
|
+
</a>
|
|
31
|
+
<LoginForm />
|
|
32
|
+
</div>
|
|
33
|
+
</div>)
|
|
34
|
+
}
|
|
35
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { cn } from "@/lib/utils"
|
|
2
|
+
import { Button } from "@/components/ui/button"
|
|
3
|
+
import {
|
|
4
|
+
Card,
|
|
5
|
+
CardContent,
|
|
6
|
+
CardDescription,
|
|
7
|
+
CardHeader,
|
|
8
|
+
CardTitle,
|
|
9
|
+
} from "@/components/ui/card"
|
|
10
|
+
import { Input } from "@/components/ui/input"
|
|
11
|
+
import { Label } from "@/components/ui/label"
|
|
12
|
+
|
|
13
|
+
export function LoginForm({
|
|
14
|
+
className,
|
|
15
|
+
...props
|
|
16
|
+
}: React.ComponentPropsWithoutRef<"div">) {
|
|
17
|
+
return (
|
|
18
|
+
<div className={cn("flex flex-col gap-6", className)} {...props}>
|
|
19
|
+
<Card>
|
|
20
|
+
<CardHeader className="text-center">
|
|
21
|
+
<CardTitle className="text-xl">Welcome back</CardTitle>
|
|
22
|
+
<CardDescription>
|
|
23
|
+
Login with your Apple or Google account
|
|
24
|
+
</CardDescription>
|
|
25
|
+
</CardHeader>
|
|
26
|
+
<CardContent>
|
|
27
|
+
<form>
|
|
28
|
+
<div className="grid gap-6">
|
|
29
|
+
<div className="flex flex-col gap-4">
|
|
30
|
+
<Button variant="outline" className="w-full">
|
|
31
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
32
|
+
<path
|
|
33
|
+
d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"
|
|
34
|
+
fill="currentColor"
|
|
35
|
+
/>
|
|
36
|
+
</svg>
|
|
37
|
+
Login with Apple
|
|
38
|
+
</Button>
|
|
39
|
+
<Button variant="outline" className="w-full">
|
|
40
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
41
|
+
<path
|
|
42
|
+
d="M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z"
|
|
43
|
+
fill="currentColor"
|
|
44
|
+
/>
|
|
45
|
+
</svg>
|
|
46
|
+
Login with Google
|
|
47
|
+
</Button>
|
|
48
|
+
</div>
|
|
49
|
+
<div className="relative text-center text-sm after:absolute after:inset-0 after:top-1/2 after:z-0 after:flex after:items-center after:border-t after:border-border">
|
|
50
|
+
<span className="relative z-10 bg-background px-2 text-muted-foreground">
|
|
51
|
+
Or continue with
|
|
52
|
+
</span>
|
|
53
|
+
</div>
|
|
54
|
+
<div className="grid gap-6">
|
|
55
|
+
<div className="grid gap-2">
|
|
56
|
+
<Label htmlFor="email">Email</Label>
|
|
57
|
+
<Input
|
|
58
|
+
id="email"
|
|
59
|
+
type="email"
|
|
60
|
+
placeholder="m@example.com"
|
|
61
|
+
required
|
|
62
|
+
/>
|
|
63
|
+
</div>
|
|
64
|
+
<div className="grid gap-2">
|
|
65
|
+
<div className="flex items-center">
|
|
66
|
+
<Label htmlFor="password">Password</Label>
|
|
67
|
+
<a
|
|
68
|
+
href="#"
|
|
69
|
+
className="ml-auto text-sm underline-offset-4 hover:underline"
|
|
70
|
+
>
|
|
71
|
+
Forgot your password?
|
|
72
|
+
</a>
|
|
73
|
+
</div>
|
|
74
|
+
<Input id="password" type="password" required />
|
|
75
|
+
</div>
|
|
76
|
+
<Button type="submit" className="w-full">
|
|
77
|
+
Login
|
|
78
|
+
</Button>
|
|
79
|
+
</div>
|
|
80
|
+
<div className="text-center text-sm">
|
|
81
|
+
Don't have an account?{" "}
|
|
82
|
+
<a href="#" className="underline underline-offset-4">
|
|
83
|
+
Sign up
|
|
84
|
+
</a>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
</form>
|
|
88
|
+
</CardContent>
|
|
89
|
+
</Card>
|
|
90
|
+
<div className="text-balance text-center text-xs text-muted-foreground [&_a]:underline [&_a]:underline-offset-4 [&_a]:hover:text-primary ">
|
|
91
|
+
By clicking continue, you agree to our <a href="#">Terms of Service</a>{" "}
|
|
92
|
+
and <a href="#">Privacy Policy</a>.
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
)
|
|
96
|
+
}
|
|
97
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ui/accordion'
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Accordion,
|
|
5
|
+
AccordionTrigger,
|
|
6
|
+
AccordionContent,
|
|
7
|
+
AccordionItem,
|
|
8
|
+
} from "./accordion"
|
|
9
|
+
|
|
10
|
+
const meta = {
|
|
11
|
+
title: "Components/Accordion",
|
|
12
|
+
component: Accordion,
|
|
13
|
+
parameters: {
|
|
14
|
+
layout: "centered",
|
|
15
|
+
},
|
|
16
|
+
tags: ["autodocs"],
|
|
17
|
+
} satisfies Meta<typeof Accordion>
|
|
18
|
+
|
|
19
|
+
export default meta
|
|
20
|
+
type Story = StoryObj<typeof meta>
|
|
21
|
+
|
|
22
|
+
export const Default: Story = {
|
|
23
|
+
args: {
|
|
24
|
+
collapsible: true
|
|
25
|
+
},
|
|
26
|
+
render: () => (
|
|
27
|
+
<Accordion type="single" collapsible>
|
|
28
|
+
<AccordionItem value="item-1">
|
|
29
|
+
<AccordionTrigger>Is it accessible?</AccordionTrigger>
|
|
30
|
+
<AccordionContent>
|
|
31
|
+
Yes. It adheres to the WAI-ARIA design pattern.
|
|
32
|
+
</AccordionContent>
|
|
33
|
+
</AccordionItem>
|
|
34
|
+
</Accordion>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion"
|
|
3
|
+
import { ChevronDown } from "lucide-react"
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/lib/utils"
|
|
6
|
+
|
|
7
|
+
const Accordion = AccordionPrimitive.Root
|
|
8
|
+
|
|
9
|
+
const AccordionItem = React.forwardRef<
|
|
10
|
+
React.ElementRef<typeof AccordionPrimitive.Item>,
|
|
11
|
+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
|
|
12
|
+
>(({ className, ...props }, ref) => (
|
|
13
|
+
<AccordionPrimitive.Item
|
|
14
|
+
ref={ref}
|
|
15
|
+
className={cn("border-b", className)}
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
))
|
|
19
|
+
AccordionItem.displayName = "AccordionItem"
|
|
20
|
+
|
|
21
|
+
const AccordionTrigger = React.forwardRef<
|
|
22
|
+
React.ElementRef<typeof AccordionPrimitive.Trigger>,
|
|
23
|
+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
|
|
24
|
+
>(({ className, children, ...props }, ref) => (
|
|
25
|
+
<AccordionPrimitive.Header className="flex">
|
|
26
|
+
<AccordionPrimitive.Trigger
|
|
27
|
+
ref={ref}
|
|
28
|
+
className={cn(
|
|
29
|
+
"flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",
|
|
30
|
+
className
|
|
31
|
+
)}
|
|
32
|
+
{...props}
|
|
33
|
+
>
|
|
34
|
+
{children}
|
|
35
|
+
<ChevronDown className="h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" />
|
|
36
|
+
</AccordionPrimitive.Trigger>
|
|
37
|
+
</AccordionPrimitive.Header>
|
|
38
|
+
))
|
|
39
|
+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName
|
|
40
|
+
|
|
41
|
+
const AccordionContent = React.forwardRef<
|
|
42
|
+
React.ElementRef<typeof AccordionPrimitive.Content>,
|
|
43
|
+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
|
|
44
|
+
>(({ className, children, ...props }, ref) => (
|
|
45
|
+
<AccordionPrimitive.Content
|
|
46
|
+
ref={ref}
|
|
47
|
+
className="overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
|
48
|
+
{...props}
|
|
49
|
+
>
|
|
50
|
+
<div className={cn("pb-4 pt-0", className)}>{children}</div>
|
|
51
|
+
</AccordionPrimitive.Content>
|
|
52
|
+
))
|
|
53
|
+
AccordionContent.displayName = AccordionPrimitive.Content.displayName
|
|
54
|
+
|
|
55
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
AlertDialog,
|
|
5
|
+
AlertDialogAction,
|
|
6
|
+
AlertDialogCancel,
|
|
7
|
+
AlertDialogContent,
|
|
8
|
+
AlertDialogDescription,
|
|
9
|
+
AlertDialogFooter,
|
|
10
|
+
AlertDialogHeader,
|
|
11
|
+
AlertDialogTitle,
|
|
12
|
+
AlertDialogTrigger
|
|
13
|
+
} from "./alert-dialog"
|
|
14
|
+
|
|
15
|
+
const meta = {
|
|
16
|
+
title: "Components/AlertDialog",
|
|
17
|
+
component: AlertDialog,
|
|
18
|
+
parameters: {
|
|
19
|
+
layout: "centered",
|
|
20
|
+
},
|
|
21
|
+
tags: ["autodocs"],
|
|
22
|
+
} satisfies Meta<typeof AlertDialog>
|
|
23
|
+
|
|
24
|
+
export default meta
|
|
25
|
+
type Story = StoryObj<typeof meta>
|
|
26
|
+
|
|
27
|
+
export const Default: Story = {
|
|
28
|
+
render: () => (
|
|
29
|
+
<AlertDialog>
|
|
30
|
+
<AlertDialogTrigger>Open</AlertDialogTrigger>
|
|
31
|
+
<AlertDialogContent>
|
|
32
|
+
<AlertDialogHeader>
|
|
33
|
+
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
|
|
34
|
+
<AlertDialogDescription>
|
|
35
|
+
This action cannot be undone. This will permanently delete your account
|
|
36
|
+
and remove your data from our servers.
|
|
37
|
+
</AlertDialogDescription>
|
|
38
|
+
</AlertDialogHeader>
|
|
39
|
+
<AlertDialogFooter>
|
|
40
|
+
<AlertDialogCancel>Cancel</AlertDialogCancel>
|
|
41
|
+
<AlertDialogAction>Continue</AlertDialogAction>
|
|
42
|
+
</AlertDialogFooter>
|
|
43
|
+
</AlertDialogContent>
|
|
44
|
+
</AlertDialog>
|
|
45
|
+
)
|
|
46
|
+
}
|