@artemdev04/design-system 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +94 -0
- package/dist/design-system.css +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +2891 -0
- package/dist/index.umd.js +1 -0
- package/package.json +65 -0
- package/tailwind.preset.js +74 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(z,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],A):(z=typeof globalThis<"u"?globalThis:z||self,A(z.MyDesignSystem={},z.jsxRuntime,z.React))})(this,(function(z,A,Ve){"use strict";function Le({title:e,children:r,className:t=""}){return A.jsxs("div",{className:`bg-surface rounded-xl shadow-md border border-border overflow-hidden p-4 ${t}`,children:[A.jsx("div",{className:"py-2",children:A.jsx("h3",{className:"font-bold text-lg ",children:e})}),A.jsx("div",{children:r})]})}function ie(e){var r,t,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(r=0;r<a;r++)e[r]&&(t=ie(e[r]))&&(o&&(o+=" "),o+=t)}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function le(){for(var e,r,t=0,o="",a=arguments.length;t<a;t++)(e=arguments[t])&&(r=ie(e))&&(o&&(o+=" "),o+=r);return o}const ce=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,de=le,Ee=(e,r)=>t=>{var o;if((r==null?void 0:r.variants)==null)return de(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:a,defaultVariants:l}=r,i=Object.keys(a).map(f=>{const b=t==null?void 0:t[f],h=l==null?void 0:l[f];if(b===null)return null;const y=ce(b)||ce(h);return a[f][y]}),p=t&&Object.entries(t).reduce((f,b)=>{let[h,y]=b;return y===void 0||(f[h]=y),f},{}),c=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((f,b)=>{let{class:h,className:y,...R}=b;return Object.entries(R).every(M=>{let[v,w]=M;return Array.isArray(w)?w.includes({...l,...p}[v]):{...l,...p}[v]===w})?[...f,h,y]:f},[]);return de(e,i,c,t==null?void 0:t.class,t==null?void 0:t.className)},_e=(e,r)=>{const t=new Array(e.length+r.length);for(let o=0;o<e.length;o++)t[o]=e[o];for(let o=0;o<r.length;o++)t[e.length+o]=r[o];return t},Fe=(e,r)=>({classGroupId:e,validator:r}),me=(e=new Map,r=null,t)=>({nextPart:e,validators:r,classGroupId:t}),U="-",ue=[],We="arbitrary..",Be=e=>{const r=De(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return $e(i);const p=i.split(U),c=p[0]===""&&p.length>1?1:0;return fe(p,c,r)},getConflictingClassGroupIds:(i,p)=>{if(p){const c=o[i],f=t[i];return c?f?_e(f,c):c:f||ue}return t[i]||ue}}},fe=(e,r,t)=>{if(e.length-r===0)return t.classGroupId;const a=e[r],l=t.nextPart.get(a);if(l){const f=fe(e,r+1,l);if(f)return f}const i=t.validators;if(i===null)return;const p=r===0?e.join(U):e.slice(r).join(U),c=i.length;for(let f=0;f<c;f++){const b=i[f];if(b.validator(p))return b.classGroupId}},$e=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=e.slice(1,-1),t=r.indexOf(":"),o=r.slice(0,t);return o?We+o:void 0})(),De=e=>{const{theme:r,classGroups:t}=e;return Ue(t,r)},Ue=(e,r)=>{const t=me();for(const o in e){const a=e[o];ee(a,t,o,r)}return t},ee=(e,r,t,o)=>{const a=e.length;for(let l=0;l<a;l++){const i=e[l];qe(i,r,t,o)}},qe=(e,r,t,o)=>{if(typeof e=="string"){Ye(e,r,t);return}if(typeof e=="function"){Xe(e,r,t,o);return}Je(e,r,t,o)},Ye=(e,r,t)=>{const o=e===""?r:pe(r,e);o.classGroupId=t},Xe=(e,r,t,o)=>{if(Ke(e)){ee(e(o),r,t,o);return}r.validators===null&&(r.validators=[]),r.validators.push(Fe(t,e))},Je=(e,r,t,o)=>{const a=Object.entries(e),l=a.length;for(let i=0;i<l;i++){const[p,c]=a[i];ee(c,pe(r,p),t,o)}},pe=(e,r)=>{let t=e;const o=r.split(U),a=o.length;for(let l=0;l<a;l++){const i=o[l];let p=t.nextPart.get(i);p||(p=me(),t.nextPart.set(i,p)),t=p}return t},Ke=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,He=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=Object.create(null),o=Object.create(null);const a=(l,i)=>{t[l]=i,r++,r>e&&(r=0,o=t,t=Object.create(null))};return{get(l){let i=t[l];if(i!==void 0)return i;if((i=o[l])!==void 0)return a(l,i),i},set(l,i){l in t?t[l]=i:a(l,i)}}},te="!",be=":",Qe=[],ge=(e,r,t,o,a)=>({modifiers:e,hasImportantModifier:r,baseClassName:t,maybePostfixModifierPosition:o,isExternal:a}),Ze=e=>{const{prefix:r,experimentalParseClassName:t}=e;let o=a=>{const l=[];let i=0,p=0,c=0,f;const b=a.length;for(let v=0;v<b;v++){const w=a[v];if(i===0&&p===0){if(w===be){l.push(a.slice(c,v)),c=v+1;continue}if(w==="/"){f=v;continue}}w==="["?i++:w==="]"?i--:w==="("?p++:w===")"&&p--}const h=l.length===0?a:a.slice(c);let y=h,R=!1;h.endsWith(te)?(y=h.slice(0,-1),R=!0):h.startsWith(te)&&(y=h.slice(1),R=!0);const M=f&&f>c?f-c:void 0;return ge(l,R,y,M)};if(r){const a=r+be,l=o;o=i=>i.startsWith(a)?l(i.slice(a.length)):ge(Qe,!1,i,void 0,!0)}if(t){const a=o;o=l=>t({className:l,parseClassName:a})}return o},et=e=>{const r=new Map;return e.orderSensitiveModifiers.forEach((t,o)=>{r.set(t,1e6+o)}),t=>{const o=[];let a=[];for(let l=0;l<t.length;l++){const i=t[l],p=i[0]==="[",c=r.has(i);p||c?(a.length>0&&(a.sort(),o.push(...a),a=[]),o.push(i)):a.push(i)}return a.length>0&&(a.sort(),o.push(...a)),o}},tt=e=>({cache:He(e.cacheSize),parseClassName:Ze(e),sortModifiers:et(e),...Be(e)}),ot=/\s+/,rt=(e,r)=>{const{parseClassName:t,getClassGroupId:o,getConflictingClassGroupIds:a,sortModifiers:l}=r,i=[],p=e.trim().split(ot);let c="";for(let f=p.length-1;f>=0;f-=1){const b=p[f],{isExternal:h,modifiers:y,hasImportantModifier:R,baseClassName:M,maybePostfixModifierPosition:v}=t(b);if(h){c=b+(c.length>0?" "+c:c);continue}let w=!!v,G=o(w?M.substring(0,v):M);if(!G){if(!w){c=b+(c.length>0?" "+c:c);continue}if(G=o(M),!G){c=b+(c.length>0?" "+c:c);continue}w=!1}const X=y.length===0?"":y.length===1?y[0]:l(y).join(":"),$=R?X+te:X,_=$+G;if(i.indexOf(_)>-1)continue;i.push(_);const F=a(G,w);for(let N=0;N<F.length;++N){const D=F[N];i.push($+D)}c=b+(c.length>0?" "+c:c)}return c},nt=(...e)=>{let r=0,t,o,a="";for(;r<e.length;)(t=e[r++])&&(o=he(t))&&(a&&(a+=" "),a+=o);return a},he=e=>{if(typeof e=="string")return e;let r,t="";for(let o=0;o<e.length;o++)e[o]&&(r=he(e[o]))&&(t&&(t+=" "),t+=r);return t},st=(e,...r)=>{let t,o,a,l;const i=c=>{const f=r.reduce((b,h)=>h(b),e());return t=tt(f),o=t.cache.get,a=t.cache.set,l=p,p(c)},p=c=>{const f=o(c);if(f)return f;const b=rt(c,t);return a(c,b),b};return l=i,(...c)=>l(nt(...c))},at=[],g=e=>{const r=t=>t[e]||at;return r.isThemeGetter=!0,r},xe=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ye=/^\((?:(\w[\w-]*):)?(.+)\)$/i,it=/^\d+\/\d+$/,lt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ct=/\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$/,dt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,mt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ut=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,V=e=>it.test(e),u=e=>!!e&&!Number.isNaN(Number(e)),P=e=>!!e&&Number.isInteger(Number(e)),oe=e=>e.endsWith("%")&&u(e.slice(0,-1)),S=e=>lt.test(e),ft=()=>!0,pt=e=>ct.test(e)&&!dt.test(e),we=()=>!1,bt=e=>mt.test(e),gt=e=>ut.test(e),ht=e=>!n(e)&&!s(e),xt=e=>L(e,Ae,we),n=e=>xe.test(e),j=e=>L(e,Se,pt),re=e=>L(e,Ct,u),ke=e=>L(e,Ce,we),yt=e=>L(e,ze,gt),q=e=>L(e,Re,bt),s=e=>ye.test(e),B=e=>E(e,Se),wt=e=>E(e,zt),ve=e=>E(e,Ce),kt=e=>E(e,Ae),vt=e=>E(e,ze),Y=e=>E(e,Re,!0),L=(e,r,t)=>{const o=xe.exec(e);return o?o[1]?r(o[1]):t(o[2]):!1},E=(e,r,t=!1)=>{const o=ye.exec(e);return o?o[1]?r(o[1]):t:!1},Ce=e=>e==="position"||e==="percentage",ze=e=>e==="image"||e==="url",Ae=e=>e==="length"||e==="size"||e==="bg-size",Se=e=>e==="length",Ct=e=>e==="number",zt=e=>e==="family-name",Re=e=>e==="shadow",At=st(()=>{const e=g("color"),r=g("font"),t=g("text"),o=g("font-weight"),a=g("tracking"),l=g("leading"),i=g("breakpoint"),p=g("container"),c=g("spacing"),f=g("radius"),b=g("shadow"),h=g("inset-shadow"),y=g("text-shadow"),R=g("drop-shadow"),M=g("blur"),v=g("perspective"),w=g("aspect"),G=g("ease"),X=g("animate"),$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[..._(),s,n],N=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],m=()=>[s,n,c],T=()=>[V,"full","auto",...m()],Me=()=>[P,"none","subgrid",s,n],Te=()=>["auto",{span:["full",P,s,n]},P,s,n],J=()=>[P,"auto",s,n],Ie=()=>["auto","min","max","fr",s,n],ne=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...m()],O=()=>[V,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...m()],d=()=>[e,s,n],Pe=()=>[..._(),ve,ke,{position:[s,n]}],je=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ge=()=>["auto","cover","contain",kt,xt,{size:[s,n]}],se=()=>[oe,B,j],k=()=>["","none","full",f,s,n],C=()=>["",u,B,j],K=()=>["solid","dashed","dotted","double"],Ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],x=()=>[u,oe,ve,ke],Oe=()=>["","none",M,s,n],H=()=>["none",u,s,n],Q=()=>["none",u,s,n],ae=()=>[u,s,n],Z=()=>[V,"full",...m()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[S],breakpoint:[S],color:[ft],container:[S],"drop-shadow":[S],ease:["in","out","in-out"],font:[ht],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[S],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[S],shadow:[S],spacing:["px",u],text:[S],"text-shadow":[S],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",V,n,s,w]}],container:["container"],columns:[{columns:[u,n,s,p]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"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:F()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[P,"auto",s,n]}],basis:[{basis:[V,"full","auto",p,...m()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[u,V,"auto","initial","none",n]}],grow:[{grow:["",u,s,n]}],shrink:[{shrink:["",u,s,n]}],order:[{order:[P,"first","last","none",s,n]}],"grid-cols":[{"grid-cols":Me()}],"col-start-end":[{col:Te()}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":Me()}],"row-start-end":[{row:Te()}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ie()}],"auto-rows":[{"auto-rows":Ie()}],gap:[{gap:m()}],"gap-x":[{"gap-x":m()}],"gap-y":[{"gap-y":m()}],"justify-content":[{justify:[...ne(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...ne()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:m()}],px:[{px:m()}],py:[{py:m()}],ps:[{ps:m()}],pe:[{pe:m()}],pt:[{pt:m()}],pr:[{pr:m()}],pb:[{pb:m()}],pl:[{pl:m()}],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":m()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":m()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],w:[{w:[p,"screen",...O()]}],"min-w":[{"min-w":[p,"screen","none",...O()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[i]},...O()]}],h:[{h:["screen","lh",...O()]}],"min-h":[{"min-h":["screen","lh","none",...O()]}],"max-h":[{"max-h":["screen","lh",...O()]}],"font-size":[{text:["base",t,B,j]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,s,re]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",oe,n]}],"font-family":[{font:[wt,n,r]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,s,n]}],"line-clamp":[{"line-clamp":[u,"none",s,re]}],leading:[{leading:[l,...m()]}],"list-image":[{"list-image":["none",s,n]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",s,n]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:d()}],"text-color":[{text:d()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:[u,"from-font","auto",s,j]}],"text-decoration-color":[{decoration:d()}],"underline-offset":[{"underline-offset":[u,"auto",s,n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:m()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",s,n]}],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",s,n]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Pe()}],"bg-repeat":[{bg:je()}],"bg-size":[{bg:Ge()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},P,s,n],radial:["",s,n],conic:[P,s,n]},vt,yt]}],"bg-color":[{bg:d()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:d()}],"gradient-via":[{via:d()}],"gradient-to":[{to:d()}],rounded:[{rounded:k()}],"rounded-s":[{"rounded-s":k()}],"rounded-e":[{"rounded-e":k()}],"rounded-t":[{"rounded-t":k()}],"rounded-r":[{"rounded-r":k()}],"rounded-b":[{"rounded-b":k()}],"rounded-l":[{"rounded-l":k()}],"rounded-ss":[{"rounded-ss":k()}],"rounded-se":[{"rounded-se":k()}],"rounded-ee":[{"rounded-ee":k()}],"rounded-es":[{"rounded-es":k()}],"rounded-tl":[{"rounded-tl":k()}],"rounded-tr":[{"rounded-tr":k()}],"rounded-br":[{"rounded-br":k()}],"rounded-bl":[{"rounded-bl":k()}],"border-w":[{border:C()}],"border-w-x":[{"border-x":C()}],"border-w-y":[{"border-y":C()}],"border-w-s":[{"border-s":C()}],"border-w-e":[{"border-e":C()}],"border-w-t":[{"border-t":C()}],"border-w-r":[{"border-r":C()}],"border-w-b":[{"border-b":C()}],"border-w-l":[{"border-l":C()}],"divide-x":[{"divide-x":C()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":C()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...K(),"hidden","none"]}],"divide-style":[{divide:[...K(),"hidden","none"]}],"border-color":[{border:d()}],"border-color-x":[{"border-x":d()}],"border-color-y":[{"border-y":d()}],"border-color-s":[{"border-s":d()}],"border-color-e":[{"border-e":d()}],"border-color-t":[{"border-t":d()}],"border-color-r":[{"border-r":d()}],"border-color-b":[{"border-b":d()}],"border-color-l":[{"border-l":d()}],"divide-color":[{divide:d()}],"outline-style":[{outline:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[u,s,n]}],"outline-w":[{outline:["",u,B,j]}],"outline-color":[{outline:d()}],shadow:[{shadow:["","none",b,Y,q]}],"shadow-color":[{shadow:d()}],"inset-shadow":[{"inset-shadow":["none",h,Y,q]}],"inset-shadow-color":[{"inset-shadow":d()}],"ring-w":[{ring:C()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:d()}],"ring-offset-w":[{"ring-offset":[u,j]}],"ring-offset-color":[{"ring-offset":d()}],"inset-ring-w":[{"inset-ring":C()}],"inset-ring-color":[{"inset-ring":d()}],"text-shadow":[{"text-shadow":["none",y,Y,q]}],"text-shadow-color":[{"text-shadow":d()}],opacity:[{opacity:[u,s,n]}],"mix-blend":[{"mix-blend":[...Ne(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ne()}],"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":[u]}],"mask-image-linear-from-pos":[{"mask-linear-from":x()}],"mask-image-linear-to-pos":[{"mask-linear-to":x()}],"mask-image-linear-from-color":[{"mask-linear-from":d()}],"mask-image-linear-to-color":[{"mask-linear-to":d()}],"mask-image-t-from-pos":[{"mask-t-from":x()}],"mask-image-t-to-pos":[{"mask-t-to":x()}],"mask-image-t-from-color":[{"mask-t-from":d()}],"mask-image-t-to-color":[{"mask-t-to":d()}],"mask-image-r-from-pos":[{"mask-r-from":x()}],"mask-image-r-to-pos":[{"mask-r-to":x()}],"mask-image-r-from-color":[{"mask-r-from":d()}],"mask-image-r-to-color":[{"mask-r-to":d()}],"mask-image-b-from-pos":[{"mask-b-from":x()}],"mask-image-b-to-pos":[{"mask-b-to":x()}],"mask-image-b-from-color":[{"mask-b-from":d()}],"mask-image-b-to-color":[{"mask-b-to":d()}],"mask-image-l-from-pos":[{"mask-l-from":x()}],"mask-image-l-to-pos":[{"mask-l-to":x()}],"mask-image-l-from-color":[{"mask-l-from":d()}],"mask-image-l-to-color":[{"mask-l-to":d()}],"mask-image-x-from-pos":[{"mask-x-from":x()}],"mask-image-x-to-pos":[{"mask-x-to":x()}],"mask-image-x-from-color":[{"mask-x-from":d()}],"mask-image-x-to-color":[{"mask-x-to":d()}],"mask-image-y-from-pos":[{"mask-y-from":x()}],"mask-image-y-to-pos":[{"mask-y-to":x()}],"mask-image-y-from-color":[{"mask-y-from":d()}],"mask-image-y-to-color":[{"mask-y-to":d()}],"mask-image-radial":[{"mask-radial":[s,n]}],"mask-image-radial-from-pos":[{"mask-radial-from":x()}],"mask-image-radial-to-pos":[{"mask-radial-to":x()}],"mask-image-radial-from-color":[{"mask-radial-from":d()}],"mask-image-radial-to-color":[{"mask-radial-to":d()}],"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":_()}],"mask-image-conic-pos":[{"mask-conic":[u]}],"mask-image-conic-from-pos":[{"mask-conic-from":x()}],"mask-image-conic-to-pos":[{"mask-conic-to":x()}],"mask-image-conic-from-color":[{"mask-conic-from":d()}],"mask-image-conic-to-color":[{"mask-conic-to":d()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Pe()}],"mask-repeat":[{mask:je()}],"mask-size":[{mask:Ge()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",s,n]}],filter:[{filter:["","none",s,n]}],blur:[{blur:Oe()}],brightness:[{brightness:[u,s,n]}],contrast:[{contrast:[u,s,n]}],"drop-shadow":[{"drop-shadow":["","none",R,Y,q]}],"drop-shadow-color":[{"drop-shadow":d()}],grayscale:[{grayscale:["",u,s,n]}],"hue-rotate":[{"hue-rotate":[u,s,n]}],invert:[{invert:["",u,s,n]}],saturate:[{saturate:[u,s,n]}],sepia:[{sepia:["",u,s,n]}],"backdrop-filter":[{"backdrop-filter":["","none",s,n]}],"backdrop-blur":[{"backdrop-blur":Oe()}],"backdrop-brightness":[{"backdrop-brightness":[u,s,n]}],"backdrop-contrast":[{"backdrop-contrast":[u,s,n]}],"backdrop-grayscale":[{"backdrop-grayscale":["",u,s,n]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u,s,n]}],"backdrop-invert":[{"backdrop-invert":["",u,s,n]}],"backdrop-opacity":[{"backdrop-opacity":[u,s,n]}],"backdrop-saturate":[{"backdrop-saturate":[u,s,n]}],"backdrop-sepia":[{"backdrop-sepia":["",u,s,n]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":m()}],"border-spacing-x":[{"border-spacing-x":m()}],"border-spacing-y":[{"border-spacing-y":m()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",s,n]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[u,"initial",s,n]}],ease:[{ease:["linear","initial",G,s,n]}],delay:[{delay:[u,s,n]}],animate:[{animate:["none",X,s,n]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,s,n]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:H()}],"rotate-x":[{"rotate-x":H()}],"rotate-y":[{"rotate-y":H()}],"rotate-z":[{"rotate-z":H()}],scale:[{scale:Q()}],"scale-x":[{"scale-x":Q()}],"scale-y":[{"scale-y":Q()}],"scale-z":[{"scale-z":Q()}],"scale-3d":["scale-3d"],skew:[{skew:ae()}],"skew-x":[{"skew-x":ae()}],"skew-y":[{"skew-y":ae()}],transform:[{transform:[s,n,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Z()}],"translate-x":[{"translate-x":Z()}],"translate-y":[{"translate-y":Z()}],"translate-z":[{"translate-z":Z()}],"translate-none":["translate-none"],accent:[{accent:d()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:d()}],"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",s,n]}],"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":m()}],"scroll-mx":[{"scroll-mx":m()}],"scroll-my":[{"scroll-my":m()}],"scroll-ms":[{"scroll-ms":m()}],"scroll-me":[{"scroll-me":m()}],"scroll-mt":[{"scroll-mt":m()}],"scroll-mr":[{"scroll-mr":m()}],"scroll-mb":[{"scroll-mb":m()}],"scroll-ml":[{"scroll-ml":m()}],"scroll-p":[{"scroll-p":m()}],"scroll-px":[{"scroll-px":m()}],"scroll-py":[{"scroll-py":m()}],"scroll-ps":[{"scroll-ps":m()}],"scroll-pe":[{"scroll-pe":m()}],"scroll-pt":[{"scroll-pt":m()}],"scroll-pr":[{"scroll-pr":m()}],"scroll-pb":[{"scroll-pb":m()}],"scroll-pl":[{"scroll-pl":m()}],"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",s,n]}],fill:[{fill:["none",...d()]}],"stroke-w":[{stroke:[u,B,j,re]}],stroke:[{stroke:["none",...d()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function St(...e){return At(le(e))}const Rt=Ee("m-0 leading-normal transition-colors",{variants:{size:{xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl md:text-3xl","3xl":"text-3xl md:text-4xl","4xl":"text-4xl md:text-5xl"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},color:{default:"text-text",muted:"text-text-secondary dark:text-slate-400",success:"text-success-text",error:"text-error-text",warning:"text-warning-text",info:"text-info-text"},align:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"},italic:{true:"italic",false:""},unfrtline:{ture:"underline",false:""}},defaultVariants:{size:"base",weight:"normal",color:"default",align:"left",italic:!1}}),Mt=Ve.forwardRef(function({as:r,className:t,size:o,weight:a,color:l,align:i,italic:p,children:c,...f},b){const h=r||"p";return A.jsx(h,{ref:b,className:St(Rt({size:o,weight:a,color:l,align:i,italic:p}),t),...f,children:c})});z.Card=Le,z.Text=Mt,Object.defineProperty(z,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@artemdev04/design-system",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.umd.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.umd.js"
|
|
13
|
+
},
|
|
14
|
+
"./style.css": "./dist/design-system.css"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"tailwind.preset.js"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"dev": "storybook dev -p 6006",
|
|
22
|
+
"build": "tsc -b && vite build",
|
|
23
|
+
"lint": "eslint .",
|
|
24
|
+
"type-check": "tsc --noEmit",
|
|
25
|
+
"storybook": "storybook dev -p 6006",
|
|
26
|
+
"build-storybook": "storybook build"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"framer-motion": "^10.0.0 || ^11.0.0 || ^12.0.0",
|
|
30
|
+
"react": "^18.3.0",
|
|
31
|
+
"react-dom": "^18.3.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@chromatic-com/storybook": "^4.1.3",
|
|
35
|
+
"@storybook/react-vite": "^10.1.10",
|
|
36
|
+
"@types/node": "^22.10.0",
|
|
37
|
+
"@types/react": "^18.3.0",
|
|
38
|
+
"@types/react-dom": "^18.3.0",
|
|
39
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
40
|
+
"autoprefixer": "^10.4.23",
|
|
41
|
+
"eslint": "^9.17.0",
|
|
42
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
43
|
+
"eslint-plugin-react-refresh": "^0.4.26",
|
|
44
|
+
"eslint-plugin-storybook": "10.1.10",
|
|
45
|
+
"framer-motion": "^12.23.26",
|
|
46
|
+
"globals": "^15.13.0",
|
|
47
|
+
"postcss": "^8.5.6",
|
|
48
|
+
"react": "^18.3.1",
|
|
49
|
+
"react-dom": "^18.3.1",
|
|
50
|
+
"storybook": "^10.1.10",
|
|
51
|
+
"tailwindcss": "^3.4.19",
|
|
52
|
+
"typescript": "^5.7.2",
|
|
53
|
+
"typescript-eslint": "^8.50.0",
|
|
54
|
+
"vite": "^6.0.3",
|
|
55
|
+
"vite-plugin-dts": "^4.3.0"
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@storybook/addon-themes": "^10.1.11",
|
|
59
|
+
"class-variance-authority": "^0.7.1",
|
|
60
|
+
"clsx": "^2.1.1",
|
|
61
|
+
"date-fns": "^4.1.0",
|
|
62
|
+
"lucide-react": "^0.562.0",
|
|
63
|
+
"tailwind-merge": "^3.4.0"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import defaultTheme from "tailwindcss/defaultTheme";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
theme: {
|
|
5
|
+
extend: {
|
|
6
|
+
colors: {
|
|
7
|
+
background: "var(--app-background)",
|
|
8
|
+
surface: {
|
|
9
|
+
DEFAULT: "var(--surface)",
|
|
10
|
+
secondary: "var(--surface-secondary)",
|
|
11
|
+
},
|
|
12
|
+
primary: {
|
|
13
|
+
DEFAULT: "var(--primary)",
|
|
14
|
+
focus: "var(--primary-focus)",
|
|
15
|
+
},
|
|
16
|
+
secondary: {
|
|
17
|
+
DEFAULT: "var(--secondary)",
|
|
18
|
+
focus: "var(--secondary-focus)",
|
|
19
|
+
},
|
|
20
|
+
text: {
|
|
21
|
+
DEFAULT: "var(--text-main)",
|
|
22
|
+
secondary: "var(--text-secondary)",
|
|
23
|
+
},
|
|
24
|
+
border: {
|
|
25
|
+
DEFAULT: "var(--border-main)",
|
|
26
|
+
subtle: "var(--border-subtle)",
|
|
27
|
+
strong: "var(--border-strong)",
|
|
28
|
+
},
|
|
29
|
+
"input-background": "var(--input-background)",
|
|
30
|
+
accent: "var(--accent)",
|
|
31
|
+
overlay: "var(--overlay)",
|
|
32
|
+
on: {
|
|
33
|
+
primary: "var(--on-primary)",
|
|
34
|
+
secondary: "var(--on-secondary)",
|
|
35
|
+
surface: "var(--on-surface)",
|
|
36
|
+
},
|
|
37
|
+
disabled: {
|
|
38
|
+
surface: "var(--disabled-surface)",
|
|
39
|
+
text: "var(--disabled-text)",
|
|
40
|
+
border: "var(--disabled-border)",
|
|
41
|
+
},
|
|
42
|
+
info: {
|
|
43
|
+
DEFAULT: "var(--info-main)",
|
|
44
|
+
surface: "var(--info-surface)",
|
|
45
|
+
border: "var(--info-border)",
|
|
46
|
+
text: "var(--info-text)",
|
|
47
|
+
},
|
|
48
|
+
success: {
|
|
49
|
+
DEFAULT: "var(--success-main)",
|
|
50
|
+
surface: "var(--success-surface)",
|
|
51
|
+
border: "var(--success-border)",
|
|
52
|
+
text: "var(--success-text)",
|
|
53
|
+
},
|
|
54
|
+
warning: {
|
|
55
|
+
DEFAULT: "var(--warning-main)",
|
|
56
|
+
surface: "var(--warning-surface)",
|
|
57
|
+
border: "var(--warning-border)",
|
|
58
|
+
text: "var(--warning-text)",
|
|
59
|
+
},
|
|
60
|
+
error: {
|
|
61
|
+
DEFAULT: "var(--error-main)",
|
|
62
|
+
surface: "var(--error-surface)",
|
|
63
|
+
border: "var(--error-border)",
|
|
64
|
+
text: "var(--error-text)",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
fontFamily: {
|
|
68
|
+
sans: ["Inter", ...defaultTheme.fontFamily.sans],
|
|
69
|
+
mono: ["JetBrains Mono", ...defaultTheme.fontFamily.mono],
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
plugins: [],
|
|
74
|
+
};
|