@animus-ui/core 0.0.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +86 -0
  3. package/babel.config.js +5 -0
  4. package/dist/animusBuilder.d.ts +82 -0
  5. package/dist/configBuilder.d.ts +11 -0
  6. package/dist/createAnimus.d.ts +2 -0
  7. package/dist/deprecated/core.d.ts +10 -0
  8. package/dist/index.cjs.js +1 -0
  9. package/dist/index.d.ts +1597 -0
  10. package/dist/index.esm.js +1 -0
  11. package/dist/internal/compose.d.ts +2 -0
  12. package/dist/internal/create.d.ts +2 -0
  13. package/dist/internal/createCss.d.ts +2 -0
  14. package/dist/internal/createStates.d.ts +2 -0
  15. package/dist/internal/createVariant.d.ts +2 -0
  16. package/dist/props/baseConfig.d.ts +586 -0
  17. package/dist/props/baseScales.d.ts +51 -0
  18. package/dist/scales/createScale.d.ts +3 -0
  19. package/dist/scales/createScaleLookup.d.ts +5 -0
  20. package/dist/styles/createParser.d.ts +2 -0
  21. package/dist/styles/createStylist.d.ts +2 -0
  22. package/dist/styles/createTransform.d.ts +2 -0
  23. package/dist/transforms/grid.d.ts +4 -0
  24. package/dist/transforms/index.d.ts +2 -0
  25. package/dist/transforms/size.d.ts +2 -0
  26. package/dist/types/config.d.ts +81 -0
  27. package/dist/types/properties.d.ts +25 -0
  28. package/dist/types/props.d.ts +47 -0
  29. package/dist/types/theme.d.ts +33 -0
  30. package/dist/types/utils.d.ts +3 -0
  31. package/dist/utils/__fixtures__/testConfig.d.ts +153 -0
  32. package/dist/utils/getStaticProperties.d.ts +1 -0
  33. package/dist/utils/propNames.d.ts +6 -0
  34. package/dist/utils/responsive.d.ts +13 -0
  35. package/dist/utils/styledOptions.d.ts +21 -0
  36. package/package.json +38 -0
  37. package/rollup.config.js +3 -0
  38. package/tsconfig.json +8 -0
@@ -0,0 +1 @@
1
+ import{pick as r,isEmpty as e,isObject as o,set as t,mapValues as p,omit as s,intersection as i,get as a,merge as n,isString as d,isArray as c,isUndefined as l,identity as y,isNumber as g}from"lodash";import u from"@emotion/styled";const b=()=>[],m=(r,e)=>{const o=Object.keys(r),t=Object.keys(e);return r=>{const e=[];return o.forEach((o=>{r[o]&&e.push(`${o}-${r[o]}`)})),t.forEach((o=>{r[o]&&e.push(o)})),e}},h=(r,e)=>{const o={},t={};return Object.entries(r).forEach((([r,p])=>{(e.includes(r)?t:o)[r]=p})),[o,t]},f=(o,t,p,s)=>{const{base:i}=t,{parser:a,getMediaSelectors:n,getActiveOverrides:d}=s,{theme:c}=p,l=Object.values(r(t,d(p))),y=n(p),[g,u]=h(a({...i,theme:c},!0),y);for(const r in g)o[r]=g[r];l.forEach((r=>{((r={},o,t,p,s,i)=>{const[a,n]=h(p({...r,theme:s},!0),i);for(const r in a)o[r]=a[r];i.forEach((r=>{const o=n[r];if(!o||e(o))return;t[r]||(t[r]={});const p=t[r];for(const r in o)p[r]=o[r]}))})(r,o,u,a,c,y)})),y.forEach((r=>{const t=u[r];e(t)||(o[r]=t)}))},R=(r,e={},p={},s={},i={})=>{const a=((r={},e={},p={},s)=>{const i={};return Object.entries(r).forEach((([r,e])=>{!s.includes(r)&&o(e)?t(i,[r,"base"],e):t(i,["primary","base",r],e)})),Object.entries(e).forEach((([r,{variants:e}])=>{Object.entries(e).forEach((([e,p])=>{const a=`${r}-${e}`;Object.entries(p).forEach((([r,e])=>{!s.includes(r)&&o(e)?t(i,[r,a],e):t(i,["primary",a,r],e)}))}))})),Object.entries(p).forEach((([r,e])=>{Object.entries(e).forEach((([e,p])=>{!s.includes(e)&&o(p)?t(i,[e,r],p):t(i,["primary",r,e],p)}))})),i})(e,p,s,r.propNames),n={parser:r,getMediaSelectors:({theme:r})=>["xs","sm","md","lg","xl"].map((e=>r?.breakpoints[e])),getActiveOverrides:m(p,s)};return e=>{const{vars:o}=e,t={...o};return Object.entries(a).forEach((([r,o={}])=>{"primary"===r?f(t,o,e,n):(t[r]={},f(t[r],o,e,n))})),f(t,{base:r(e)},e,n),t}},w=["border","borderTop","borderBottom","borderLeft","borderRight","borderWidth","borderStyle","borderColor","background","flex","margin","padding","transition","gap","grid","gridArea","gridColumn","gridRow","gridTemplate","overflow","transition"],x=-1,C=1,S=1,v=(r,e)=>r<e?x:e<r?C:S,T=["_","xs","sm","md","lg","xl"],j=r=>`@media screen and (min-width: ${r}px)`,O={xs:480,sm:768,md:1024,lg:1200,xl:1440},B=(r,e,o,t,p)=>{const s=a(o,e);switch(typeof s){case"string":case"number":case"function":return Object.assign(r,t.styleFn(s,e,o));case"object":if(!p.mediaQueries)return;if(d=s,Array.isArray(d))return n(r,((r,e,o,t)=>{const p={},{styleFn:s,prop:i}=o,[a,...n]=r;return a&&Object.assign(p,s(a,i,e)),n.forEach(((r,o)=>{const a=t[o];a&&void 0!==r&&Object.assign(p,{[a]:s(r,i,e)})})),p})(s,o,t,p.mediaQueries.array));if(s&&(r=>i(Object.keys(r),T).length>0)(s))return n(r,((r,e,o,t)=>{const p={},{styleFn:s,prop:i}=o,{_:a,...n}=r;return a&&Object.assign(p,s(a,i,e)),Object.keys(t).forEach((r=>{const o=n[r];void 0!==o&&Object.assign(p,{[t[r]]:s(o,i,e)})})),p})(s,o,t,p.mediaQueries.map))}var d};function k(r){const e=(r=>Object.keys(r).sort(((e,o)=>{const{[e]:t,[o]:p}=r,{property:s,properties:i=[]}=t,{property:a,properties:n=[]}=p,d=w.includes(s),c=w.includes(a);if(d&&c){const r=i.length,e=n.length;if(s!==a)return v(w.indexOf(s),w.indexOf(a));if(s===a){if(0===r)return x;if(0===e)return C}return v(e,r)}return d?x:c?C:S})))(r),o={mediaQueries:null};return Object.assign(((t,i=!1)=>{const n={},{theme:d}=t;return o.mediaQueries||(o.mediaQueries=(r=>{if(void 0===r)return null;const{xs:e,sm:o,md:t,lg:s,xl:i}=r??{};return{map:p(r,j),array:[e,o,t,s,i].map(j)}})(d?.breakpoints??O)),i?Object.keys(t).forEach((e=>{const p=r[e];p?B(n,e,t,p,o):"theme"!==e&&Object.assign(n,{[e]:a(t,e)})})):e.forEach((e=>{const p=r[e];B(n,e,t,p,o)})),null!==o.mediaQueries?((r,e)=>{const o=s(r,e);return e.forEach((e=>{r[e]&&(o[e]=r[e])})),o})(n,o.mediaQueries.array):n}),{propNames:e,config:r})}function W(r,e){const{transform:t=y,property:p,properties:s=[p],scale:i}=e,n=(r=>d(r)?(e,o)=>a(o,["theme",r,e]):c(r)?r=>r:o(r)?e=>a(r,e):()=>{})(i),g=void 0===i||c(i);return{...e,prop:r,styleFn:(r,e,o)=>{const p={};if(l(r))return p;let i,a,d=!1;switch(typeof r){case"number":case"string":a=n(r,o),d=void 0!==a||g,i=a??r;break;case"function":o.theme&&(i=r(o.theme));break;default:return p}return s.forEach((r=>{let e=i;switch(d&&!l(e)&&(e=t(e,r,o)),typeof e){case"number":case"string":return p[r]=e;case"object":return Object.assign(p,e)}})),p}}}function L(r){const e={};for(const o in r)"string"==typeof o&&(e[o]=W(o,r[o]));return k(e)}class A{props={};parser={};groups=[];base={};statesConfig={};variants={};constructor(r,e,o,t,p,s){this.props=r,this.parser=e,this.groups=s,this.base=o,this.statesConfig=p,this.variants=t}asComponent(r){const e=R(this.parser,this.base,this.variants,this.statesConfig,{});return u(r)(e)}build(){return R(this.parser,this.base,this.variants,this.statesConfig,{})}}class E extends A{constructor(r,e,o,t,p,s){super(r,e,o,t,p,s)}customProps(r){const e={...this.props.props,...r},o=L(e);return new A({...this.props,props:e},o,this.base,this.variants,this.statesConfig,this.groups)}}class G extends E{constructor(r,e,o,t,p){super(r,e,o,t,p,[])}systemProps(r){return new E(this.props,this.parser,this.base,this.variants,this.statesConfig,Object.keys(r))}}class $ extends G{constructor(r,e,o,t){super(r,e,o,t,{})}states(r){return new G(this.props,this.parser,this.base,this.variants,r)}variant(r){const e=r.prop||"variant";return new $(this.props,this.parser,this.base,n(this.variants,{[e]:r}))}}class F extends ${constructor(r,e,o){super(r,e,o,{})}variant(r){const e=r.prop||"variant";return new $(this.props,this.parser,this.base,n(this.variants,{[e]:r}))}}class I extends F{constructor(r){super(r,L(r.props),{})}styles(r){return new F(this.props,this.parser,r)}}class H{#r={};#e={};constructor(r,e){this.#r=r||{},this.#e=e||{}}addGroup(r,e){const o={[r]:Object.keys(e)};return new H({...this.#r,...e},{...this.#e,...o})}build(){return new I({props:this.#r,groups:this.#e})}}const Q=()=>new H,z=r=>0===r?r:r<=1&&r>=-1?100*r+"%":`${r}px`,X=/(-?\d*\.?\d+)(%|\w*)/,Y=r=>{if(g(r))return z(r);if(r.includes("calc"))return r;const[e,o,t]=X.exec(r)||[];if(void 0===e)return r;const p=parseFloat(o);return t?`${p}${t}`:z(p)},D={max:"max-content",min:"min-content"},P=new RegExp(/^[0-9]*$/),M=r=>{var e;return`minmax(0, ${e=r,P.test(e)?`${r}fr`:a(D,r,r)})`},N=(r,e)=>{const o=M(r);return e>1?`repeat(${e}, ${o})`:o},_=r=>{const e=r.split(":");let o=["",0],t="";for(let r=0;r<e.length+1;r+=1){const p=t.length>0?" ":"",s=e[r];o?.[0]!==s?(o[0].length&&(t+=p+N(...o)),s&&(o=[s,1])):o[1]+=1}return t},q=r=>g(r)?N("1",r):_(r),J={justifySelf:{property:"justifySelf"},alignSelf:{property:"alignSelf"},gridArea:{property:"gridArea"},area:{property:"gridArea"}},K={justifyContent:{property:"justifyContent"},justifyItems:{property:"justifyItems"},alignItems:{property:"alignItems"},alignContent:{property:"alignContent"},...J},U={flexBasis:{property:"flexBasis"},flexShrink:{property:"flexShrink"},flexGrow:{property:"flexGrow"},order:{property:"order"}},V={flexDirection:{property:"flexDirection"},flexWrap:{property:"flexWrap"},flex:{property:"flex"},...K,...U},Z={gridColumn:{property:"gridColumn"},gridRow:{property:"gridRow"},gridColumnStart:{property:"gridColumnStart"},gridRowStart:{property:"gridRowStart"},gridColumnEnd:{property:"gridColumnEnd"},gridRowEnd:{property:"gridRowEnd"}},rr={gridAutoColumns:{property:"gridAutoColumns"},gridAutoRows:{property:"gridAutoRows"},gridTemplateColumns:{property:"gridTemplateColumns"},gridTemplateRows:{property:"gridTemplateRows"},gridTemplateAreas:{property:"gridTemplateAreas"},gridAutoFlow:{property:"gridAutoFlow"},gap:{property:"gap",scale:"spacing"},rowGap:{property:"rowGap",scale:"spacing"},columnGap:{property:"columnGap",scale:"spacing"},flow:{property:"gridAutoFlow",scale:{row:"row",column:"column",dense:"dense","column-dense":"column dense","row-dense":"row dense"}},cols:{property:"gridTemplateColumns",transform:q,scale:[]},rows:{property:"gridTemplateRows",transform:q,scale:[]},autoRows:{property:"gridAutoRows",transform:M},autoCols:{property:"gridAutoColumns",transform:M},alignAll:{property:"justifyContent",properties:["justifyContent","alignItems"]},...K,...Z},er={position:{property:"position"},inset:{property:"inset",properties:["top","right","bottom","left"],transform:Y},top:{property:"top",transform:Y},right:{property:"right",transform:Y},bottom:{property:"bottom",transform:Y},left:{property:"left",transform:Y},zIndex:{property:"zIndex"},opacity:{property:"opacity"}},or={display:{property:"display"},overflow:{property:"overflow"},overflowX:{property:"overflowX"},overflowY:{property:"overflowY"},size:{property:"width",properties:["width","height"],transform:Y},width:{property:"width",transform:Y},minWidth:{property:"minWidth",transform:Y},maxWidth:{property:"maxWidth",transform:Y},height:{property:"height",transform:Y},minHeight:{property:"minHeight",transform:Y},maxHeight:{property:"maxHeight",transform:Y},verticalAlign:{property:"verticalAlign"},...J,...Z,...U},tr={m:{property:"margin",scale:"spacing"},mx:{property:"margin",properties:["marginLeft","marginRight"],scale:"spacing"},my:{property:"margin",properties:["marginTop","marginBottom"],scale:"spacing"},mt:{property:"marginTop",scale:"spacing"},mb:{property:"marginBottom",scale:"spacing"},mr:{property:"marginRight",scale:"spacing"},ml:{property:"marginLeft",scale:"spacing"},p:{property:"padding",scale:"spacing"},px:{property:"padding",properties:["paddingLeft","paddingRight"],scale:"spacing"},py:{property:"padding",properties:["paddingTop","paddingBottom"],scale:"spacing"},pt:{property:"paddingTop",scale:"spacing"},pb:{property:"paddingBottom",scale:"spacing"},pr:{property:"paddingRight",scale:"spacing"},pl:{property:"paddingLeft",scale:"spacing"}},pr=Q().addGroup("space",tr).addGroup("background",{background:{property:"background"},backgroundImage:{property:"backgroundImage"},backgroundSize:{property:"backgroundSize"},backgroundRepeat:{property:"backgroundRepeat"},backgroundPosition:{property:"backgroundPosition"}}).addGroup("layout",or).addGroup("color",{color:{property:"color",scale:"colors"},textColor:{property:"color",scale:"colors"},bg:{property:"backgroundColor",scale:"colors"},borderColor:{property:"borderColor",scale:"colors"},borderColorX:{property:"borderColor",properties:["borderLeftColor","borderRightColor"],scale:"colors"},borderColorY:{property:"borderColor",properties:["borderTopColor","borderBottomColor"],scale:"colors"},borderColorLeft:{property:"borderLeftColor",scale:"colors"},borderColorRight:{property:"borderRightColor",scale:"colors"},borderColorTop:{property:"borderTopColor",scale:"colors"},borderColorBottom:{property:"borderBottomColor",scale:"colors"}}).addGroup("typography",{fontFamily:{property:"fontFamily",scale:"fontFamily"},fontWeight:{property:"fontWeight",scale:{400:400,600:600,700:700}},lineHeight:{property:"lineHeight",scale:"lineHeight",lineHeight:[1,1.5]},fontSize:{property:"fontSize",scale:{64:64,44:44,34:34,26:26,22:22,20:20,18:18,16:16,14:14}},letterSpacing:{property:"letterSpacing"},textAlign:{property:"textAlign"},fontStyle:{property:"fontStyle"},textDecoration:{property:"textDecoration"},textTransform:{property:"textTransform"},whiteSpace:{property:"whiteSpace"}}).addGroup("shadows",{boxShadow:{property:"boxShadow"},textShadow:{property:"textShadow"}}).addGroup("borders",{border:{property:"border",scale:"borders"},borderX:{property:"border",properties:["borderLeft","borderRight"],scale:"borders"},borderY:{property:"border",properties:["borderTop","borderBottom"],scale:"borders"},borderTop:{property:"borderTop",scale:"borders"},borderRight:{property:"borderRight",scale:"borders"},borderBottom:{property:"borderBottom",scale:"borders"},borderLeft:{property:"borderLeft",scale:"borders"},borderWidth:{property:"borderWidth"},borderWidthX:{property:"borderWidth",properties:["borderLeftWidth","borderRightWidth"]},borderWidthY:{property:"borderWidth",properties:["borderTopWidth","borderBottomWidth"]},borderWidthLeft:{property:"borderLeftWidth"},borderWidthRight:{property:"borderRightWidth"},borderWidthTop:{property:"borderTopWidth"},borderWidthBottom:{property:"borderBottomWidth"},borderRadius:{property:"borderRadius",scale:"radii"},borderRadiusLeft:{property:"borderRadius",properties:["borderTopLeftRadius","borderBottomLeftRadius"],scale:"radii"},borderRadiusTop:{property:"borderRadius",properties:["borderTopLeftRadius","borderTopRightRadius"],scale:"radii"},borderRadiusBottom:{property:"borderRadius",properties:["borderBottomLeftRadius","borderBottomRightRadius"],scale:"radii"},borderRadiusRight:{property:"borderRadius",properties:["borderTopRightRadius","borderBottomRightRadius"],scale:"radii"},borderRadiusTopLeft:{property:"borderTopLeftRadius",scale:"radii"},borderRadiusTopRight:{property:"borderTopRightRadius",scale:"radii"},borderRadiusBottomRight:{property:"borderBottomRightRadius",scale:"radii"},borderRadiusBottomLeft:{property:"borderBottomLeftRadius",scale:"radii"},borderStyle:{property:"borderStyle"},borderStyleX:{property:"borderStyle",properties:["borderLeftStyle","borderRightStyle"]},borderStyleY:{property:"borderStyle",properties:["borderTopStyle","borderBottomStyle"]},borderStyleLeft:{property:"borderLeftStyle"},borderStyleRight:{property:"borderRightStyle"},borderStyleTop:{property:"borderTopStyle"},borderStyleBottom:{property:"borderBottomStyle"}}).addGroup("positioning",er).addGroup("flex",V).addGroup("grid",rr).addGroup("mode",{mode:{property:"none",scale:"mode"},vars:{property:"variables"}}),sr=pr.build();export{H as AnimusConfig,sr as animus,pr as coreConfig,Q as createAnimus,b as createScale,M as gridItem,q as gridItemRatio,_ as parseGridRatio,z as percentageOrAbsolute,N as repeatGridItem,Y as size};
@@ -0,0 +1,2 @@
1
+ import { AbstractParser, Compose } from '../types/config';
2
+ export declare function compose<Args extends AbstractParser[]>(...parsers: Args): import("../types/config").Parser<Compose<Args>>;
@@ -0,0 +1,2 @@
1
+ import { Prop, TransformerMap } from '../types/config';
2
+ export declare function create<Config extends Record<string, Prop>>(config: Config): import("../types/config").Parser<TransformerMap<Config>>;
@@ -0,0 +1,2 @@
1
+ import { CSS, Parser, Prop, TransformerMap } from '../types/config';
2
+ export declare function createCss<Config extends Record<string, Prop>, P extends Parser<TransformerMap<Config>>>(config: Config): CSS<P>;
@@ -0,0 +1,2 @@
1
+ import { Parser, Prop, States, TransformerMap } from '../types/config';
2
+ export declare function createStates<Config extends Record<string, Prop>, P extends Parser<TransformerMap<Config>>>(config: Config): States<P>;
@@ -0,0 +1,2 @@
1
+ import { Parser, Prop, TransformerMap, Variant } from '../types/config';
2
+ export declare function createVariant<Config extends Record<string, Prop>, P extends Parser<TransformerMap<Config>>>(config: Config): Variant<P>;
@@ -0,0 +1,586 @@
1
+ export declare const color: {
2
+ readonly color: {
3
+ readonly property: "color";
4
+ readonly scale: "colors";
5
+ };
6
+ readonly textColor: {
7
+ readonly property: "color";
8
+ readonly scale: "colors";
9
+ };
10
+ readonly bg: {
11
+ readonly property: "backgroundColor";
12
+ readonly scale: "colors";
13
+ };
14
+ readonly borderColor: {
15
+ readonly property: "borderColor";
16
+ readonly scale: "colors";
17
+ };
18
+ readonly borderColorX: {
19
+ readonly property: "borderColor";
20
+ readonly properties: readonly ["borderLeftColor", "borderRightColor"];
21
+ readonly scale: "colors";
22
+ };
23
+ readonly borderColorY: {
24
+ readonly property: "borderColor";
25
+ readonly properties: readonly ["borderTopColor", "borderBottomColor"];
26
+ readonly scale: "colors";
27
+ };
28
+ readonly borderColorLeft: {
29
+ readonly property: "borderLeftColor";
30
+ readonly scale: "colors";
31
+ };
32
+ readonly borderColorRight: {
33
+ readonly property: "borderRightColor";
34
+ readonly scale: "colors";
35
+ };
36
+ readonly borderColorTop: {
37
+ readonly property: "borderTopColor";
38
+ readonly scale: "colors";
39
+ };
40
+ readonly borderColorBottom: {
41
+ readonly property: "borderBottomColor";
42
+ readonly scale: "colors";
43
+ };
44
+ };
45
+ export declare const border: {
46
+ readonly border: {
47
+ readonly property: "border";
48
+ readonly scale: "borders";
49
+ };
50
+ readonly borderX: {
51
+ readonly property: "border";
52
+ readonly properties: readonly ["borderLeft", "borderRight"];
53
+ readonly scale: "borders";
54
+ };
55
+ readonly borderY: {
56
+ readonly property: "border";
57
+ readonly properties: readonly ["borderTop", "borderBottom"];
58
+ readonly scale: "borders";
59
+ };
60
+ readonly borderTop: {
61
+ readonly property: "borderTop";
62
+ readonly scale: "borders";
63
+ };
64
+ readonly borderRight: {
65
+ readonly property: "borderRight";
66
+ readonly scale: "borders";
67
+ };
68
+ readonly borderBottom: {
69
+ readonly property: "borderBottom";
70
+ readonly scale: "borders";
71
+ };
72
+ readonly borderLeft: {
73
+ readonly property: "borderLeft";
74
+ readonly scale: "borders";
75
+ };
76
+ readonly borderWidth: {
77
+ readonly property: "borderWidth";
78
+ };
79
+ readonly borderWidthX: {
80
+ readonly property: "borderWidth";
81
+ readonly properties: readonly ["borderLeftWidth", "borderRightWidth"];
82
+ };
83
+ readonly borderWidthY: {
84
+ readonly property: "borderWidth";
85
+ readonly properties: readonly ["borderTopWidth", "borderBottomWidth"];
86
+ };
87
+ readonly borderWidthLeft: {
88
+ readonly property: "borderLeftWidth";
89
+ };
90
+ readonly borderWidthRight: {
91
+ readonly property: "borderRightWidth";
92
+ };
93
+ readonly borderWidthTop: {
94
+ readonly property: "borderTopWidth";
95
+ };
96
+ readonly borderWidthBottom: {
97
+ readonly property: "borderBottomWidth";
98
+ };
99
+ readonly borderRadius: {
100
+ readonly property: "borderRadius";
101
+ readonly scale: "radii";
102
+ };
103
+ readonly borderRadiusLeft: {
104
+ readonly property: "borderRadius";
105
+ readonly properties: readonly ["borderTopLeftRadius", "borderBottomLeftRadius"];
106
+ readonly scale: "radii";
107
+ };
108
+ readonly borderRadiusTop: {
109
+ readonly property: "borderRadius";
110
+ readonly properties: readonly ["borderTopLeftRadius", "borderTopRightRadius"];
111
+ readonly scale: "radii";
112
+ };
113
+ readonly borderRadiusBottom: {
114
+ readonly property: "borderRadius";
115
+ readonly properties: readonly ["borderBottomLeftRadius", "borderBottomRightRadius"];
116
+ readonly scale: "radii";
117
+ };
118
+ readonly borderRadiusRight: {
119
+ readonly property: "borderRadius";
120
+ readonly properties: readonly ["borderTopRightRadius", "borderBottomRightRadius"];
121
+ readonly scale: "radii";
122
+ };
123
+ readonly borderRadiusTopLeft: {
124
+ readonly property: "borderTopLeftRadius";
125
+ readonly scale: "radii";
126
+ };
127
+ readonly borderRadiusTopRight: {
128
+ readonly property: "borderTopRightRadius";
129
+ readonly scale: "radii";
130
+ };
131
+ readonly borderRadiusBottomRight: {
132
+ readonly property: "borderBottomRightRadius";
133
+ readonly scale: "radii";
134
+ };
135
+ readonly borderRadiusBottomLeft: {
136
+ readonly property: "borderBottomLeftRadius";
137
+ readonly scale: "radii";
138
+ };
139
+ readonly borderStyle: {
140
+ readonly property: "borderStyle";
141
+ };
142
+ readonly borderStyleX: {
143
+ readonly property: "borderStyle";
144
+ readonly properties: readonly ["borderLeftStyle", "borderRightStyle"];
145
+ };
146
+ readonly borderStyleY: {
147
+ readonly property: "borderStyle";
148
+ readonly properties: readonly ["borderTopStyle", "borderBottomStyle"];
149
+ };
150
+ readonly borderStyleLeft: {
151
+ readonly property: "borderLeftStyle";
152
+ };
153
+ readonly borderStyleRight: {
154
+ readonly property: "borderRightStyle";
155
+ };
156
+ readonly borderStyleTop: {
157
+ readonly property: "borderTopStyle";
158
+ };
159
+ readonly borderStyleBottom: {
160
+ readonly property: "borderBottomStyle";
161
+ };
162
+ };
163
+ export declare const flex: {
164
+ readonly flexBasis: {
165
+ readonly property: "flexBasis";
166
+ };
167
+ readonly flexShrink: {
168
+ readonly property: "flexShrink";
169
+ };
170
+ readonly flexGrow: {
171
+ readonly property: "flexGrow";
172
+ };
173
+ readonly order: {
174
+ readonly property: "order";
175
+ };
176
+ readonly justifySelf: {
177
+ readonly property: "justifySelf";
178
+ };
179
+ readonly alignSelf: {
180
+ readonly property: "alignSelf";
181
+ };
182
+ readonly gridArea: {
183
+ readonly property: "gridArea";
184
+ };
185
+ readonly area: {
186
+ readonly property: "gridArea";
187
+ };
188
+ readonly justifyContent: {
189
+ readonly property: "justifyContent";
190
+ };
191
+ readonly justifyItems: {
192
+ readonly property: "justifyItems";
193
+ };
194
+ readonly alignItems: {
195
+ readonly property: "alignItems";
196
+ };
197
+ readonly alignContent: {
198
+ readonly property: "alignContent";
199
+ };
200
+ readonly flexDirection: {
201
+ readonly property: "flexDirection";
202
+ };
203
+ readonly flexWrap: {
204
+ readonly property: "flexWrap";
205
+ };
206
+ readonly flex: {
207
+ readonly property: "flex";
208
+ };
209
+ };
210
+ export declare const grid: {
211
+ readonly gridColumn: {
212
+ readonly property: "gridColumn";
213
+ };
214
+ readonly gridRow: {
215
+ readonly property: "gridRow";
216
+ };
217
+ readonly gridColumnStart: {
218
+ readonly property: "gridColumnStart";
219
+ };
220
+ readonly gridRowStart: {
221
+ readonly property: "gridRowStart";
222
+ };
223
+ readonly gridColumnEnd: {
224
+ readonly property: "gridColumnEnd";
225
+ };
226
+ readonly gridRowEnd: {
227
+ readonly property: "gridRowEnd";
228
+ };
229
+ readonly justifySelf: {
230
+ readonly property: "justifySelf";
231
+ };
232
+ readonly alignSelf: {
233
+ readonly property: "alignSelf";
234
+ };
235
+ readonly gridArea: {
236
+ readonly property: "gridArea";
237
+ };
238
+ readonly area: {
239
+ readonly property: "gridArea";
240
+ };
241
+ readonly justifyContent: {
242
+ readonly property: "justifyContent";
243
+ };
244
+ readonly justifyItems: {
245
+ readonly property: "justifyItems";
246
+ };
247
+ readonly alignItems: {
248
+ readonly property: "alignItems";
249
+ };
250
+ readonly alignContent: {
251
+ readonly property: "alignContent";
252
+ };
253
+ readonly gridAutoColumns: {
254
+ readonly property: "gridAutoColumns";
255
+ };
256
+ readonly gridAutoRows: {
257
+ readonly property: "gridAutoRows";
258
+ };
259
+ readonly gridTemplateColumns: {
260
+ readonly property: "gridTemplateColumns";
261
+ };
262
+ readonly gridTemplateRows: {
263
+ readonly property: "gridTemplateRows";
264
+ };
265
+ readonly gridTemplateAreas: {
266
+ readonly property: "gridTemplateAreas";
267
+ };
268
+ readonly gridAutoFlow: {
269
+ readonly property: "gridAutoFlow";
270
+ };
271
+ readonly gap: {
272
+ readonly property: "gap";
273
+ readonly scale: "spacing";
274
+ };
275
+ readonly rowGap: {
276
+ readonly property: "rowGap";
277
+ readonly scale: "spacing";
278
+ };
279
+ readonly columnGap: {
280
+ readonly property: "columnGap";
281
+ readonly scale: "spacing";
282
+ };
283
+ readonly flow: {
284
+ readonly property: "gridAutoFlow";
285
+ readonly scale: {
286
+ readonly row: "row";
287
+ readonly column: "column";
288
+ readonly dense: "dense";
289
+ readonly 'column-dense': "column dense";
290
+ readonly 'row-dense': "row dense";
291
+ };
292
+ };
293
+ readonly cols: {
294
+ readonly property: "gridTemplateColumns";
295
+ readonly transform: (val: string | number) => string;
296
+ readonly scale: readonly (string | number)[] & {
297
+ length: 0;
298
+ };
299
+ };
300
+ readonly rows: {
301
+ readonly property: "gridTemplateRows";
302
+ readonly transform: (val: string | number) => string;
303
+ readonly scale: readonly (string | number)[] & {
304
+ length: 0;
305
+ };
306
+ };
307
+ readonly autoRows: {
308
+ readonly property: "gridAutoRows";
309
+ readonly transform: (item: string) => string;
310
+ };
311
+ readonly autoCols: {
312
+ readonly property: "gridAutoColumns";
313
+ readonly transform: (item: string) => string;
314
+ };
315
+ readonly alignAll: {
316
+ readonly property: "justifyContent";
317
+ readonly properties: readonly ["justifyContent", "alignItems"];
318
+ };
319
+ };
320
+ export declare const background: {
321
+ readonly background: {
322
+ readonly property: "background";
323
+ };
324
+ readonly backgroundImage: {
325
+ readonly property: "backgroundImage";
326
+ };
327
+ readonly backgroundSize: {
328
+ readonly property: "backgroundSize";
329
+ };
330
+ readonly backgroundRepeat: {
331
+ readonly property: "backgroundRepeat";
332
+ };
333
+ readonly backgroundPosition: {
334
+ readonly property: "backgroundPosition";
335
+ };
336
+ };
337
+ export declare const positioning: {
338
+ readonly position: {
339
+ readonly property: "position";
340
+ };
341
+ readonly inset: {
342
+ readonly property: "inset";
343
+ readonly properties: readonly ["top", "right", "bottom", "left"];
344
+ readonly transform: (value: string | number) => string | 0;
345
+ };
346
+ readonly top: {
347
+ readonly property: "top";
348
+ readonly transform: (value: string | number) => string | 0;
349
+ };
350
+ readonly right: {
351
+ readonly property: "right";
352
+ readonly transform: (value: string | number) => string | 0;
353
+ };
354
+ readonly bottom: {
355
+ readonly property: "bottom";
356
+ readonly transform: (value: string | number) => string | 0;
357
+ };
358
+ readonly left: {
359
+ readonly property: "left";
360
+ readonly transform: (value: string | number) => string | 0;
361
+ };
362
+ readonly zIndex: {
363
+ readonly property: "zIndex";
364
+ };
365
+ readonly opacity: {
366
+ readonly property: "opacity";
367
+ };
368
+ };
369
+ export declare const shadows: {
370
+ readonly boxShadow: {
371
+ readonly property: "boxShadow";
372
+ };
373
+ readonly textShadow: {
374
+ readonly property: "textShadow";
375
+ };
376
+ };
377
+ export declare const layout: {
378
+ readonly flexBasis: {
379
+ readonly property: "flexBasis";
380
+ };
381
+ readonly flexShrink: {
382
+ readonly property: "flexShrink";
383
+ };
384
+ readonly flexGrow: {
385
+ readonly property: "flexGrow";
386
+ };
387
+ readonly order: {
388
+ readonly property: "order";
389
+ };
390
+ readonly gridColumn: {
391
+ readonly property: "gridColumn";
392
+ };
393
+ readonly gridRow: {
394
+ readonly property: "gridRow";
395
+ };
396
+ readonly gridColumnStart: {
397
+ readonly property: "gridColumnStart";
398
+ };
399
+ readonly gridRowStart: {
400
+ readonly property: "gridRowStart";
401
+ };
402
+ readonly gridColumnEnd: {
403
+ readonly property: "gridColumnEnd";
404
+ };
405
+ readonly gridRowEnd: {
406
+ readonly property: "gridRowEnd";
407
+ };
408
+ readonly justifySelf: {
409
+ readonly property: "justifySelf";
410
+ };
411
+ readonly alignSelf: {
412
+ readonly property: "alignSelf";
413
+ };
414
+ readonly gridArea: {
415
+ readonly property: "gridArea";
416
+ };
417
+ readonly area: {
418
+ readonly property: "gridArea";
419
+ };
420
+ readonly display: {
421
+ readonly property: "display";
422
+ };
423
+ readonly overflow: {
424
+ readonly property: "overflow";
425
+ };
426
+ readonly overflowX: {
427
+ readonly property: "overflowX";
428
+ };
429
+ readonly overflowY: {
430
+ readonly property: "overflowY";
431
+ };
432
+ readonly size: {
433
+ readonly property: "width";
434
+ readonly properties: readonly ["width", "height"];
435
+ readonly transform: (value: string | number) => string | 0;
436
+ };
437
+ readonly width: {
438
+ readonly property: "width";
439
+ readonly transform: (value: string | number) => string | 0;
440
+ };
441
+ readonly minWidth: {
442
+ readonly property: "minWidth";
443
+ readonly transform: (value: string | number) => string | 0;
444
+ };
445
+ readonly maxWidth: {
446
+ readonly property: "maxWidth";
447
+ readonly transform: (value: string | number) => string | 0;
448
+ };
449
+ readonly height: {
450
+ readonly property: "height";
451
+ readonly transform: (value: string | number) => string | 0;
452
+ };
453
+ readonly minHeight: {
454
+ readonly property: "minHeight";
455
+ readonly transform: (value: string | number) => string | 0;
456
+ };
457
+ readonly maxHeight: {
458
+ readonly property: "maxHeight";
459
+ readonly transform: (value: string | number) => string | 0;
460
+ };
461
+ readonly verticalAlign: {
462
+ readonly property: "verticalAlign";
463
+ };
464
+ };
465
+ export declare const typography: {
466
+ readonly fontFamily: {
467
+ readonly property: "fontFamily";
468
+ readonly scale: "fontFamily";
469
+ };
470
+ readonly fontWeight: {
471
+ readonly property: "fontWeight";
472
+ readonly scale: {
473
+ readonly 400: 400;
474
+ readonly 600: 600;
475
+ readonly 700: 700;
476
+ };
477
+ };
478
+ readonly lineHeight: {
479
+ readonly property: "lineHeight";
480
+ readonly scale: "lineHeight";
481
+ readonly lineHeight: readonly [1, 1.5];
482
+ };
483
+ readonly fontSize: {
484
+ readonly property: "fontSize";
485
+ readonly scale: {
486
+ readonly 64: 64;
487
+ readonly 44: 44;
488
+ readonly 34: 34;
489
+ readonly 26: 26;
490
+ readonly 22: 22;
491
+ readonly 20: 20;
492
+ readonly 18: 18;
493
+ readonly 16: 16;
494
+ readonly 14: 14;
495
+ };
496
+ };
497
+ readonly letterSpacing: {
498
+ readonly property: "letterSpacing";
499
+ };
500
+ readonly textAlign: {
501
+ readonly property: "textAlign";
502
+ };
503
+ readonly fontStyle: {
504
+ readonly property: "fontStyle";
505
+ };
506
+ readonly textDecoration: {
507
+ readonly property: "textDecoration";
508
+ };
509
+ readonly textTransform: {
510
+ readonly property: "textTransform";
511
+ };
512
+ readonly whiteSpace: {
513
+ readonly property: "whiteSpace";
514
+ };
515
+ };
516
+ export declare const space: {
517
+ readonly p: {
518
+ readonly property: "padding";
519
+ readonly scale: "spacing";
520
+ };
521
+ readonly px: {
522
+ readonly property: "padding";
523
+ readonly properties: readonly ["paddingLeft", "paddingRight"];
524
+ readonly scale: "spacing";
525
+ };
526
+ readonly py: {
527
+ readonly property: "padding";
528
+ readonly properties: readonly ["paddingTop", "paddingBottom"];
529
+ readonly scale: "spacing";
530
+ };
531
+ readonly pt: {
532
+ readonly property: "paddingTop";
533
+ readonly scale: "spacing";
534
+ };
535
+ readonly pb: {
536
+ readonly property: "paddingBottom";
537
+ readonly scale: "spacing";
538
+ };
539
+ readonly pr: {
540
+ readonly property: "paddingRight";
541
+ readonly scale: "spacing";
542
+ };
543
+ readonly pl: {
544
+ readonly property: "paddingLeft";
545
+ readonly scale: "spacing";
546
+ };
547
+ readonly m: {
548
+ readonly property: "margin";
549
+ readonly scale: "spacing";
550
+ };
551
+ readonly mx: {
552
+ readonly property: "margin";
553
+ readonly properties: readonly ["marginLeft", "marginRight"];
554
+ readonly scale: "spacing";
555
+ };
556
+ readonly my: {
557
+ readonly property: "margin";
558
+ readonly properties: readonly ["marginTop", "marginBottom"];
559
+ readonly scale: "spacing";
560
+ };
561
+ readonly mt: {
562
+ readonly property: "marginTop";
563
+ readonly scale: "spacing";
564
+ };
565
+ readonly mb: {
566
+ readonly property: "marginBottom";
567
+ readonly scale: "spacing";
568
+ };
569
+ readonly mr: {
570
+ readonly property: "marginRight";
571
+ readonly scale: "spacing";
572
+ };
573
+ readonly ml: {
574
+ readonly property: "marginLeft";
575
+ readonly scale: "spacing";
576
+ };
577
+ };
578
+ export declare const mode: {
579
+ readonly mode: {
580
+ readonly property: "none";
581
+ readonly scale: "mode";
582
+ };
583
+ readonly vars: {
584
+ readonly property: "variables";
585
+ };
586
+ };
@@ -0,0 +1,51 @@
1
+ export declare const baseScales: {
2
+ readonly spacing: {
3
+ readonly 0: 0;
4
+ readonly 4: 4;
5
+ readonly 8: 8;
6
+ readonly 12: 12;
7
+ readonly 16: 16;
8
+ readonly 24: 24;
9
+ readonly 32: 32;
10
+ readonly 40: 40;
11
+ readonly 48: 48;
12
+ readonly 64: 64;
13
+ readonly 96: 96;
14
+ };
15
+ readonly fontSize: {
16
+ readonly 64: 64;
17
+ readonly 44: 44;
18
+ readonly 34: 34;
19
+ readonly 26: 26;
20
+ readonly 22: 22;
21
+ readonly 20: 20;
22
+ readonly 18: 18;
23
+ readonly 16: 16;
24
+ readonly 14: 14;
25
+ };
26
+ readonly lineHeight: {
27
+ readonly base: 1.5;
28
+ readonly title: 1;
29
+ };
30
+ readonly fontWeight: {
31
+ readonly 400: 400;
32
+ readonly 600: 600;
33
+ readonly 700: 700;
34
+ };
35
+ readonly fontFamily: {
36
+ readonly base: "sans-serif";
37
+ readonly title: "Lato, sans-serif";
38
+ readonly mono: "monospace";
39
+ };
40
+ readonly radii: {
41
+ readonly 2: 2;
42
+ readonly 4: 4;
43
+ readonly 6: 6;
44
+ readonly 8: 8;
45
+ };
46
+ readonly borders: {
47
+ readonly 1: "1px solid currentColor";
48
+ readonly 2: "2px solid currentColor";
49
+ readonly 4: "4px solid currentColor";
50
+ };
51
+ };
@@ -0,0 +1,3 @@
1
+ export declare const createScale: <T extends string | number>() => readonly T[] & {
2
+ length: 0;
3
+ };