welcome-ui 1.0.0-beta.1 → 1.0.0-beta.2
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/dist/box.js +1 -0
- package/dist/box.mjs +8 -0
- package/dist/index.js +3 -3
- package/dist/index.mjs +49 -50
- package/dist/system.js +1 -0
- package/dist/system.mjs +51 -0
- package/dist/types/components/Box/index.d.ts +3 -0
- package/dist/types/components/System/index.d.ts +40 -0
- package/dist/types/components/WuiProvider/font.d.ts +16 -0
- package/dist/types/components/WuiProvider/hide-focus-rings-root.d.ts +8 -0
- package/dist/types/components/WuiProvider/index.d.ts +11 -0
- package/dist/types/components/WuiProvider/styles.d.ts +5 -0
- package/dist/types/components/index.d.ts +3 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/theme/borders.d.ts +6 -0
- package/dist/types/theme/colors.d.ts +346 -0
- package/dist/types/theme/dark.d.ts +7 -0
- package/dist/types/theme/focus.d.ts +10 -0
- package/dist/types/theme/fonts.d.ts +18 -0
- package/dist/types/theme/index.d.ts +64 -0
- package/dist/types/theme/radii.d.ts +12 -0
- package/dist/types/theme/screens.d.ts +13 -0
- package/dist/types/theme/selection.d.ts +4 -0
- package/dist/types/theme/shadows.d.ts +5 -0
- package/dist/types/theme/space.d.ts +18 -0
- package/dist/types/theme/transitions.d.ts +13 -0
- package/dist/types/theme/typography.d.ts +133 -0
- package/dist/types/theme/underline.d.ts +9 -0
- package/package.json +3 -3
- package/dist/Test.js +0 -3
- package/dist/Test.mjs +0 -9
- /package/dist/{WuiProvider.js → wui-provider.js} +0 -0
- /package/dist/{WuiProvider.mjs → wui-provider.mjs} +0 -0
package/dist/box.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),o=require("@xstyled/styled-components"),c=require("./system.js"),n=c.forwardRef((e,t)=>r.createElement(o.x.div,{ref:t,...e}));exports.Box=n;
|
package/dist/box.mjs
ADDED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@xstyled/styled-components"),f=require("./box.js"),s=require("./system.js"),b=require("./wui-provider.js");function p(e,t){if(typeof e!="object"||e===null)return t;if(typeof t!="object"||t===null)return e;const o={...e};for(const l in t)t.hasOwnProperty(l)&&(o[l]=p(o[l],t[l]));return o}const x={"beige-10":"#FBF9F7","beige-20":"#F6F3EF","beige-30":"#EAE4DE","beige-40":"#D2CBC3","beige-50":"#A7A096","beige-60":"#605B55","beige-70":"#4D4944","beige-80":"#33302D","beige-90":"#1E1C1A","blue-10":"#E0F5FF","blue-20":"#BBEAFF","blue-30":"#9BDEF7","blue-40":"#55C3E9","blue-50":"#27A5D0","blue-60":"#057AA3","blue-70":"#025A79","blue-80":"#013C50","blue-90":"#00202B","green-10":"#EAFFD4","green-20":"#D6F6B4","green-30":"#BADE94","green-40":"#9FC873","green-50":"#83AD57","green-60":"#5A8034","green-70":"#40611F","green-80":"#2A4210","green-90":"#142603","neutral-10":"#FFFFFF","neutral-20":"#F3F3F3","neutral-30":"#DEDEDE","neutral-40":"#BDBDBD","neutral-50":"#989898","neutral-60":"#585858","neutral-70":"#444444","neutral-80":"#212121","neutral-90":"#000000","orange-10":"#FFEBCE","orange-20":"#FFD495","orange-30":"#FFBB59","orange-40":"#FF9F14","orange-50":"#DB860A","orange-60":"#A6670A","orange-70":"#824F06","orange-80":"#573607","orange-90":"#382303","pink-10":"#FFEAF5","pink-20":"#FFD5EB","pink-30":"#FEB7DC","pink-40":"#F696C8","pink-50":"#E468A8","pink-60":"#C24887","pink-70":"#972962","pink-80":"#6D1142","pink-90":"#3C0725","red-10":"#FBDEDC","red-20":"#FCC7C3","red-30":"#FDB3AE","red-40":"#FF9490","red-50":"#FF6165","red-60":"#E1003A","red-70":"#A80029","red-80":"#75001A","red-90":"#450101","red-orange-10":"#FFDED0","red-orange-20":"#FFC9B2","red-orange-30":"#FFB595","red-orange-40":"#FF9868","red-orange-50":"#E67B49","red-orange-60":"#C45927","red-orange-70":"#9F4217","red-orange-80":"#6D2605","red-orange-90":"#451701","teal-10":"#D5FFFA","teal-20":"#AAF4EB","teal-30":"#6DE1D2","teal-40":"#00C7AE","teal-50":"#01AA95","teal-60":"#008070","teal-70":"#00544A","teal-80":"#003D35","teal-90":"#00211D","violet-10":"#F2F2FF","violet-20":"#E0E0FF","violet-30":"#C9C9FF","violet-40":"#ACACFF","violet-50":"#9080F0","violet-60":"#7958D6","violet-70":"#593CAC","violet-80":"#422A86","violet-90":"#1F0E51","yellow-10":"#FFF8D9","yellow-20":"#FFF1B2","yellow-30":"#FFE166","yellow-40":"#FFCD00","yellow-50":"#E5B800","yellow-60":"#B69200","yellow-70":"#846A01","yellow-80":"#604D00","yellow-90":"#423500"},h=e=>({...e,"primary-10":e["yellow-10"],"primary-20":e["yellow-20"],"primary-30":e["yellow-30"],"primary-40":e["yellow-40"],"primary-50":e["yellow-50"],"primary-60":e["yellow-60"],"primary-70":e["yellow-70"],"primary-80":e["yellow-80"],"primary-90":e["yellow-90"],"secondary-blue":e["blue-40"],"secondary-green":e["green-30"],"secondary-orange":e["red-orange-40"],"secondary-pink":e["pink-40"],"secondary-teal":e["teal-40"],"secondary-violet":e["violet-40"],overlay:"rgba(0, 0, 0, 0.55)"}),g=h(x),w=Object.keys(g).reduce((e,t)=>{if(t.startsWith("secondary-")||t==="overlay")return e;const o=100-Number(t.slice(-2)),l=t.slice(0,t.length-2);return{...e,[t]:g[`${l}${o}`]}},{}),y={...g,...h(w)},A={colors:y},E=e=>({"welcome-font":[{url:`${e.fontsUrl}/welcome-font-regular`,weight:"400"},{url:`${e.fontsUrl}/welcome-font-medium`,weight:"500"},{url:`${e.fontsUrl}/welcome-font-bold`,weight:"600"},{url:`${e.fontsUrl}/welcome-font-regular-italic`,style:"italic",weight:"400"},{url:`${e.fontsUrl}/welcome-font-medium-italic`,style:"italic",weight:"500"},{url:`${e.fontsUrl}/welcome-font-bold-italic`,style:"italic",weight:"600"}],"welcome-icon-font":[{url:`${e.fontsUrl}/icon-font/__ICON_FONT_HASH__/welcome-icon-font`,display:"block"}],"work-sans":[{url:`${e.fontsUrl}/work-sans-variable`,isVariable:!0,stretch:"75% 125%",weight:"100 1000"}]}),D=(e,t)=>{const{toEm:o,toRem:l}=t,n=l;return{h0:n(65),h1:n(45),h2:n(36),h3:n(26),h4:n(20),h5:n(16),h6:n(14),lg:n(18),md:n(16),sm:n(14),"subtitle-md":n(13),"subtitle-sm":n(11),xs:n(12)}},T=({defaultLineHeight:e,toRem:t})=>({html:e,h0:t(72),h1:t(48),h2:t(40),h3:t(32),h4:t(24),h5:t(18),h6:t(16),lg:t(24),md:t(18),sm:t(18),xs:t(14),"subtitle-md":e,"subtitle-sm":e}),B={regular:400,medium:500,bold:600},v=({defaultLetterSpacing:e,toRem:t})=>({html:e,h0:t(-1.7),h1:t(-1.2),h2:t(-1),h3:t(-.9),h4:t(-.6),h5:t(-.5),h6:t(-.5),lg:e,md:e,sm:e,xs:t(-.2),"subtitle-md":t(-.2),"subtitle-sm":t(-.2)}),S=e=>{const{fontWeights:t}=e;return{h0:t.bold,h1:t.bold,h2:t.bold,h3:t.bold,h4:t.bold,h5:t.bold,h6:t.bold,lg:t.regular,md:t.regular,sm:t.regular,"subtitle-md":t.bold,"subtitle-sm":t.medium,xs:t.regular}},k=e=>{const{fonts:t}=e;return{h0:t.headings,h1:t.headings,h2:t.headings,h3:t.headings,h4:t.headings,h5:t.headings,h6:t.headings,"subtitle-md":t.headings,"subtitle-sm":t.headings}},C=()=>({"subtitle-md":"uppercase","subtitle-sm":"uppercase"}),_=e=>{const{colors:t}=e;return{h0:t["neutral-90"],h1:t["neutral-90"],h2:t["neutral-90"],h3:t["neutral-90"],h4:t["neutral-90"],h5:t["neutral-90"],h6:t["neutral-90"]}},$=e=>{const{fontSizes:t,letterSpacings:o,lineHeights:l,textsFontColors:n,textsFontFamily:F,textsFontWeights:d,textsTextTransform:m}=e;return Object.keys(t).reduce((a,r)=>({...a,[r]:{color:n[r],fontFamily:F[r]||void 0,fontWeight:d[r],fontSize:t[r],lineHeight:l[r]||l.lg,letterSpacing:o[r]||void 0,textTransform:m[r]||void 0}}),{})},U=(e,t,o)=>({texts:[e,"sans-serif"].join(", "),headings:[t,"sans-serif"].join(", "),icons:o}),c={primary:"ease",secondary:"linear",tertiary:"cubic-bezier(0.41, 0.094, 0.54, 0.07)"},W={slow:`500ms ${c.tertiary}`,medium:`300ms ${c.primary}`,fast:`100ms ${c.secondary}`},N=({colors:e})=>({default:u.css`
|
|
2
2
|
background-image: linear-gradient(
|
|
3
3
|
0deg,
|
|
4
4
|
${e["primary-40"]},
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
background-position-y 250ms,
|
|
12
12
|
background-size 250ms,
|
|
13
13
|
color 250ms;
|
|
14
|
-
`,hover:
|
|
14
|
+
`,hover:u.css`
|
|
15
15
|
opacity: 1;
|
|
16
16
|
background-position-y: 100%;
|
|
17
17
|
background-size: 100% 100%;
|
|
18
|
-
`}),O=e=>({none:"0",sm:e.toRem(2),md:e.toRem(4),lg:e.toRem(8),xl:e.toRem(16),xxl:e.toRem(24),full:"100%"}),L={sm:"1px",md:"2px",lg:"3px"},
|
|
18
|
+
`}),O=e=>({none:"0",sm:e.toRem(2),md:e.toRem(4),lg:e.toRem(8),xl:e.toRem(16),xxl:e.toRem(24),full:"100%"}),L={sm:"1px",md:"2px",lg:"3px"},P={xs:0,sm:480,md:736,lg:980,xl:1280,xxl:1440,"3xl":1620,"4xl":1920},I={sm:"1px 2px 4px 0 rgba(0,0,0,0.05)",md:"3px 4px 10px 0 rgba(0,0,0,0.07)"},z=e=>({xxs:e.toRem(2),xs:e.toRem(4),sm:e.toRem(8),md:e.toRem(12),lg:e.toRem(16),xl:e.toRem(24),xxl:e.toRem(32),"3xl":e.toRem(48),"4xl":e.toRem(64),"5xl":e.toRem(96),"6xl":e.toRem(128),"7xl":e.toRem(192)}),H=e=>({backgroundColor:e.colors["primary-40"],color:e.colors["neutral-90"]}),R=({colors:e})=>{function t(o=e["primary-40"]){return{boxShadow:`0 0 0 2px ${o}`}}return t},q="work-sans",M=16,G="-0.019rem",Y=1.15,V="https://cdn.welcome-ui.com/fonts",Z="welcome-font",J="welcome-icon-font",K=(e={})=>{const{defaultFontFamily:t=q,defaultFontSize:o=M,defaultLetterSpacing:l=G,defaultLineHeight:n=Y,fontsUrl:F=V,headingFontFamily:d=Z,iconFontFamily:m=J,...a}=e;let r={};return r.transformers={...u.rpxTransformers},r.toEm=i=>`${i/o}em`,r.toRem=i=>`${i/o}rem`,r.toPx=i=>`${i*o}px`,r.colors=g,r.fontsUrl=F,r.fontFaces=E(r),r.fontSizes=D("rem",r),r.defaultLineHeight=n,r.defaultLetterSpacing=l,r.lineHeights=T(r),r.fontWeights=B,r.letterSpacings=v(r),r.fonts=U(t,d,m),r.borderWidths=L,r.screens=P,r.space=z(r),r.inset=r.space,r.radii=O(r),r.transitions=W,r.timingFunction=c,r.shadows=I,r=p(r,a),r.selection=H(r),r.underline=N(r),r.focus=R(r),r.textsFontWeights=S(r),r.textsFontFamily=k(r),r.textsFontColors=_(r),r.textsTextTransform=C(),r.texts=$(r),r.states=u.defaultTheme.states,r=p(r,a),r};exports.Box=f.Box;exports.componentSystem=s.componentSystem;exports.filterSystemProps=s.filterSystemProps;exports.forwardRef=s.forwardRef;exports.shouldForwardProp=s.shouldForwardProp;exports.system=s.system;exports.wrapperSystem=s.wrapperSystem;exports.WuiProvider=b.WuiProvider;exports.createTheme=K;exports.darkTheme=A;
|
package/dist/index.mjs
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { css as m, rpxTransformers as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const { colors: t } = e;
|
|
7
|
-
return {
|
|
8
|
-
default: {
|
|
9
|
-
backgroundColor: t["primary-50"]
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
};
|
|
2
|
+
import { css as m, rpxTransformers as h, defaultTheme as f } from "@xstyled/styled-components";
|
|
3
|
+
import { Box as j } from "./box.mjs";
|
|
4
|
+
import { componentSystem as te, filterSystemProps as re, forwardRef as ne, shouldForwardProp as oe, system as le, wrapperSystem as ie } from "./system.mjs";
|
|
5
|
+
import { WuiProvider as ae } from "./wui-provider.mjs";
|
|
13
6
|
function d(e, t) {
|
|
14
7
|
if (typeof e != "object" || e === null) return t;
|
|
15
8
|
if (typeof t != "object" || t === null) return e;
|
|
@@ -124,7 +117,7 @@ const x = {
|
|
|
124
117
|
"yellow-70": "#846A01",
|
|
125
118
|
"yellow-80": "#604D00",
|
|
126
119
|
"yellow-90": "#423500"
|
|
127
|
-
},
|
|
120
|
+
}, p = (e) => ({
|
|
128
121
|
...e,
|
|
129
122
|
"primary-10": e["yellow-10"],
|
|
130
123
|
"primary-20": e["yellow-20"],
|
|
@@ -142,19 +135,19 @@ const x = {
|
|
|
142
135
|
"secondary-teal": e["teal-40"],
|
|
143
136
|
"secondary-violet": e["violet-40"],
|
|
144
137
|
overlay: "rgba(0, 0, 0, 0.55)"
|
|
145
|
-
}), c =
|
|
138
|
+
}), c = p(x), b = Object.keys(c).reduce((e, t) => {
|
|
146
139
|
if (t.startsWith("secondary-") || t === "overlay") return e;
|
|
147
140
|
const o = 100 - Number(t.slice(-2)), l = t.slice(0, t.length - 2);
|
|
148
141
|
return {
|
|
149
142
|
...e,
|
|
150
143
|
[t]: c[`${l}${o}`]
|
|
151
144
|
};
|
|
152
|
-
}, {}),
|
|
145
|
+
}, {}), w = {
|
|
153
146
|
...c,
|
|
154
|
-
...
|
|
155
|
-
},
|
|
156
|
-
colors:
|
|
157
|
-
},
|
|
147
|
+
...p(b)
|
|
148
|
+
}, J = {
|
|
149
|
+
colors: w
|
|
150
|
+
}, A = (e) => ({
|
|
158
151
|
"welcome-font": [
|
|
159
152
|
{
|
|
160
153
|
url: `${e.fontsUrl}/welcome-font-regular`,
|
|
@@ -198,7 +191,7 @@ const x = {
|
|
|
198
191
|
weight: "100 1000"
|
|
199
192
|
}
|
|
200
193
|
]
|
|
201
|
-
}),
|
|
194
|
+
}), E = (e, t) => {
|
|
202
195
|
const { toEm: o, toRem: l } = t, n = l;
|
|
203
196
|
return {
|
|
204
197
|
h0: n(65),
|
|
@@ -233,11 +226,11 @@ const x = {
|
|
|
233
226
|
xs: t(14),
|
|
234
227
|
"subtitle-md": e,
|
|
235
228
|
"subtitle-sm": e
|
|
236
|
-
}),
|
|
229
|
+
}), D = {
|
|
237
230
|
regular: 400,
|
|
238
231
|
medium: 500,
|
|
239
232
|
bold: 600
|
|
240
|
-
},
|
|
233
|
+
}, T = ({
|
|
241
234
|
defaultLetterSpacing: e,
|
|
242
235
|
toRem: t
|
|
243
236
|
}) => ({
|
|
@@ -255,7 +248,7 @@ const x = {
|
|
|
255
248
|
xs: t(-0.2),
|
|
256
249
|
"subtitle-md": t(-0.2),
|
|
257
250
|
"subtitle-sm": t(-0.2)
|
|
258
|
-
}),
|
|
251
|
+
}), B = (e) => {
|
|
259
252
|
const { fontWeights: t } = e;
|
|
260
253
|
return {
|
|
261
254
|
h0: t.bold,
|
|
@@ -272,7 +265,7 @@ const x = {
|
|
|
272
265
|
"subtitle-sm": t.medium,
|
|
273
266
|
xs: t.regular
|
|
274
267
|
};
|
|
275
|
-
},
|
|
268
|
+
}, v = (e) => {
|
|
276
269
|
const { fonts: t } = e;
|
|
277
270
|
return {
|
|
278
271
|
h0: t.headings,
|
|
@@ -285,7 +278,7 @@ const x = {
|
|
|
285
278
|
"subtitle-md": t.headings,
|
|
286
279
|
"subtitle-sm": t.headings
|
|
287
280
|
};
|
|
288
|
-
},
|
|
281
|
+
}, C = () => ({
|
|
289
282
|
"subtitle-md": "uppercase",
|
|
290
283
|
"subtitle-sm": "uppercase"
|
|
291
284
|
}), _ = (e) => {
|
|
@@ -305,23 +298,23 @@ const x = {
|
|
|
305
298
|
letterSpacings: o,
|
|
306
299
|
lineHeights: l,
|
|
307
300
|
textsFontColors: n,
|
|
308
|
-
textsFontFamily:
|
|
309
|
-
textsFontWeights:
|
|
301
|
+
textsFontFamily: F,
|
|
302
|
+
textsFontWeights: g,
|
|
310
303
|
textsTextTransform: u
|
|
311
304
|
} = e;
|
|
312
305
|
return Object.keys(t).reduce((s, r) => ({
|
|
313
306
|
...s,
|
|
314
307
|
[r]: {
|
|
315
308
|
color: n[r],
|
|
316
|
-
fontFamily:
|
|
317
|
-
fontWeight:
|
|
309
|
+
fontFamily: F[r] || void 0,
|
|
310
|
+
fontWeight: g[r],
|
|
318
311
|
fontSize: t[r],
|
|
319
312
|
lineHeight: l[r] || l.lg,
|
|
320
313
|
letterSpacing: o[r] || void 0,
|
|
321
314
|
textTransform: u[r] || void 0
|
|
322
315
|
}
|
|
323
316
|
}), {});
|
|
324
|
-
},
|
|
317
|
+
}, k = (e, t, o) => ({
|
|
325
318
|
texts: [e, "sans-serif"].join(", "),
|
|
326
319
|
headings: [t, "sans-serif"].join(", "),
|
|
327
320
|
icons: o
|
|
@@ -333,7 +326,7 @@ const x = {
|
|
|
333
326
|
slow: `500ms ${a.tertiary}`,
|
|
334
327
|
medium: `300ms ${a.primary}`,
|
|
335
328
|
fast: `100ms ${a.secondary}`
|
|
336
|
-
},
|
|
329
|
+
}, U = ({ colors: e }) => ({
|
|
337
330
|
default: m`
|
|
338
331
|
background-image: linear-gradient(
|
|
339
332
|
0deg,
|
|
@@ -353,7 +346,7 @@ const x = {
|
|
|
353
346
|
background-position-y: 100%;
|
|
354
347
|
background-size: 100% 100%;
|
|
355
348
|
`
|
|
356
|
-
}),
|
|
349
|
+
}), N = (e) => ({
|
|
357
350
|
none: "0",
|
|
358
351
|
sm: e.toRem(2),
|
|
359
352
|
md: e.toRem(4),
|
|
@@ -361,11 +354,11 @@ const x = {
|
|
|
361
354
|
xl: e.toRem(16),
|
|
362
355
|
xxl: e.toRem(24),
|
|
363
356
|
full: "100%"
|
|
364
|
-
}),
|
|
357
|
+
}), W = {
|
|
365
358
|
sm: "1px",
|
|
366
359
|
md: "2px",
|
|
367
360
|
lg: "3px"
|
|
368
|
-
},
|
|
361
|
+
}, L = {
|
|
369
362
|
xs: 0,
|
|
370
363
|
sm: 480,
|
|
371
364
|
md: 736,
|
|
@@ -374,10 +367,10 @@ const x = {
|
|
|
374
367
|
xxl: 1440,
|
|
375
368
|
"3xl": 1620,
|
|
376
369
|
"4xl": 1920
|
|
377
|
-
},
|
|
370
|
+
}, O = {
|
|
378
371
|
sm: "1px 2px 4px 0 rgba(0,0,0,0.05)",
|
|
379
372
|
md: "3px 4px 10px 0 rgba(0,0,0,0.07)"
|
|
380
|
-
},
|
|
373
|
+
}, I = (e) => ({
|
|
381
374
|
xxs: e.toRem(2),
|
|
382
375
|
xs: e.toRem(4),
|
|
383
376
|
sm: e.toRem(8),
|
|
@@ -390,33 +383,39 @@ const x = {
|
|
|
390
383
|
"5xl": e.toRem(96),
|
|
391
384
|
"6xl": e.toRem(128),
|
|
392
385
|
"7xl": e.toRem(192)
|
|
393
|
-
}),
|
|
386
|
+
}), z = (e) => ({
|
|
394
387
|
backgroundColor: e.colors["primary-40"],
|
|
395
388
|
color: e.colors["neutral-90"]
|
|
396
|
-
}),
|
|
389
|
+
}), H = ({ colors: e }) => {
|
|
397
390
|
function t(o = e["primary-40"]) {
|
|
398
391
|
return {
|
|
399
392
|
boxShadow: `0 0 0 2px ${o}`
|
|
400
393
|
};
|
|
401
394
|
}
|
|
402
395
|
return t;
|
|
403
|
-
},
|
|
396
|
+
}, P = "work-sans", R = 16, G = "-0.019rem", M = 1.15, Y = "https://cdn.welcome-ui.com/fonts", V = "welcome-font", Z = "welcome-icon-font", K = (e = {}) => {
|
|
404
397
|
const {
|
|
405
|
-
defaultFontFamily: t =
|
|
406
|
-
defaultFontSize: o =
|
|
407
|
-
defaultLetterSpacing: l =
|
|
408
|
-
defaultLineHeight: n =
|
|
409
|
-
fontsUrl:
|
|
410
|
-
headingFontFamily:
|
|
411
|
-
iconFontFamily: u =
|
|
398
|
+
defaultFontFamily: t = P,
|
|
399
|
+
defaultFontSize: o = R,
|
|
400
|
+
defaultLetterSpacing: l = G,
|
|
401
|
+
defaultLineHeight: n = M,
|
|
402
|
+
fontsUrl: F = Y,
|
|
403
|
+
headingFontFamily: g = V,
|
|
404
|
+
iconFontFamily: u = Z,
|
|
412
405
|
...s
|
|
413
406
|
} = e;
|
|
414
407
|
let r = {};
|
|
415
|
-
return r.transformers = { ...
|
|
408
|
+
return r.transformers = { ...h }, r.toEm = (i) => `${i / o}em`, r.toRem = (i) => `${i / o}rem`, r.toPx = (i) => `${i * o}px`, r.colors = c, r.fontsUrl = F, r.fontFaces = A(r), r.fontSizes = E("rem", r), r.defaultLineHeight = n, r.defaultLetterSpacing = l, r.lineHeights = y(r), r.fontWeights = D, r.letterSpacings = T(r), r.fonts = k(t, g, u), r.borderWidths = W, r.screens = L, r.space = I(r), r.inset = r.space, r.radii = N(r), r.transitions = S, r.timingFunction = a, r.shadows = O, r = d(r, s), r.selection = z(r), r.underline = U(r), r.focus = H(r), r.textsFontWeights = B(r), r.textsFontFamily = v(r), r.textsFontColors = _(r), r.textsTextTransform = C(), r.texts = $(r), r.states = f.states, r = d(r, s), r;
|
|
416
409
|
};
|
|
417
410
|
export {
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
K as
|
|
411
|
+
j as Box,
|
|
412
|
+
ae as WuiProvider,
|
|
413
|
+
te as componentSystem,
|
|
414
|
+
K as createTheme,
|
|
415
|
+
J as darkTheme,
|
|
416
|
+
re as filterSystemProps,
|
|
417
|
+
ne as forwardRef,
|
|
418
|
+
oe as shouldForwardProp,
|
|
419
|
+
le as system,
|
|
420
|
+
ie as wrapperSystem
|
|
422
421
|
};
|
package/dist/system.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),t=require("@xstyled/styled-components");function a(o){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const s in o)if(s!=="default"){const p=Object.getOwnPropertyDescriptor(o,s);Object.defineProperty(r,s,p.get?p:{enumerable:!0,get:()=>o[s]})}}return r.default=o,Object.freeze(r)}const e=a(t),i=t.compose(t.style({prop:"opacity"}),t.style({prop:"overflow"}),t.style({prop:"transition",themeGet:t.getTransition}),t.style({prop:"position"}),t.style({prop:"zIndex",themeGet:t.getZIndex}),t.style({prop:"top",themeGet:t.getPx}),t.style({prop:"right",themeGet:t.getPx}),t.style({prop:"bottom",themeGet:t.getPx}),t.style({prop:"left",themeGet:t.getPx})),l=Object.freeze([e.backgrounds,e.borders,e.boxShadow,e.color,e.display,e.flexboxes,e.grids,e.height,e.maxHeight,e.maxWidth,e.minHeight,e.minWidth,e.space,e.typography,e.verticalAlign,e.width,i]),d=Object.freeze([e.margin,e.marginBottom,e.marginLeft,e.marginRight,e.marginTop,e.mx,e.my,e.width,i]),n=t.compose(...l),c=t.compose(...d),f=n.meta.props.filter(o=>!c.meta.props.includes(o)).map(o=>o==="w"?e.width:o==="h"?e.height:e[o]).filter(Boolean),g=t.compose(...f),y=o=>!n.meta.props.includes(o),u=(o,r)=>r(o),h=o=>m.forwardRef(o);exports.componentSystem=g;exports.filterSystemProps=y;exports.forwardRef=h;exports.shouldForwardProp=u;exports.system=n;exports.wrapperSystem=c;
|
package/dist/system.mjs
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import m from "react";
|
|
3
|
+
import * as t from "@xstyled/styled-components";
|
|
4
|
+
import { compose as p, style as o, getTransition as a, getZIndex as c, getPx as r } from "@xstyled/styled-components";
|
|
5
|
+
const i = p(
|
|
6
|
+
o({ prop: "opacity" }),
|
|
7
|
+
o({ prop: "overflow" }),
|
|
8
|
+
o({ prop: "transition", themeGet: a }),
|
|
9
|
+
o({ prop: "position" }),
|
|
10
|
+
o({ prop: "zIndex", themeGet: c }),
|
|
11
|
+
o({ prop: "top", themeGet: r }),
|
|
12
|
+
o({ prop: "right", themeGet: r }),
|
|
13
|
+
o({ prop: "bottom", themeGet: r }),
|
|
14
|
+
o({ prop: "left", themeGet: r })
|
|
15
|
+
), h = Object.freeze([
|
|
16
|
+
t.backgrounds,
|
|
17
|
+
t.borders,
|
|
18
|
+
t.boxShadow,
|
|
19
|
+
t.color,
|
|
20
|
+
t.display,
|
|
21
|
+
t.flexboxes,
|
|
22
|
+
t.grids,
|
|
23
|
+
t.height,
|
|
24
|
+
t.maxHeight,
|
|
25
|
+
t.maxWidth,
|
|
26
|
+
t.minHeight,
|
|
27
|
+
t.minWidth,
|
|
28
|
+
t.space,
|
|
29
|
+
t.typography,
|
|
30
|
+
t.verticalAlign,
|
|
31
|
+
t.width,
|
|
32
|
+
i
|
|
33
|
+
]), d = Object.freeze([
|
|
34
|
+
t.margin,
|
|
35
|
+
t.marginBottom,
|
|
36
|
+
t.marginLeft,
|
|
37
|
+
t.marginRight,
|
|
38
|
+
t.marginTop,
|
|
39
|
+
t.mx,
|
|
40
|
+
t.my,
|
|
41
|
+
t.width,
|
|
42
|
+
i
|
|
43
|
+
]), n = p(...h), f = p(...d), g = n.meta.props.filter((e) => !f.meta.props.includes(e)).map((e) => e === "w" ? t.width : e === "h" ? t.height : t[e]).filter(Boolean), w = p(...g), x = (e) => !n.meta.props.includes(e), y = (e, s) => s(e), u = (e) => m.forwardRef(e);
|
|
44
|
+
export {
|
|
45
|
+
w as componentSystem,
|
|
46
|
+
x as filterSystemProps,
|
|
47
|
+
u as forwardRef,
|
|
48
|
+
y as shouldForwardProp,
|
|
49
|
+
n as system,
|
|
50
|
+
f as wrapperSystem
|
|
51
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SystemProps } from '@xstyled/styled-components';
|
|
3
|
+
import { StyledConfig } from 'styled-components';
|
|
4
|
+
import * as S from '@xstyled/styled-components';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated use system from @xstyled/syled-components instead
|
|
7
|
+
*/
|
|
8
|
+
export declare const system: S.StyleGenerator<WuiSystemProps>;
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated use system from @xstyled/syled-components instead
|
|
11
|
+
*/
|
|
12
|
+
export declare const wrapperSystem: S.StyleGenerator<WuiWrapperSystemProps>;
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated use system from @xstyled/syled-components instead
|
|
15
|
+
*/
|
|
16
|
+
export declare const componentSystem: S.StyleGenerator<unknown>;
|
|
17
|
+
export declare const filterSystemProps: (prop: string) => boolean;
|
|
18
|
+
export declare const shouldForwardProp: StyledConfig['shouldForwardProp'];
|
|
19
|
+
export type WuiOldProps = S.OpacityProps & S.OverflowProps & S.TransitionProps & S.ZIndexProps & S.TopProps & S.RightProps & S.BottomProps & S.LeftProps;
|
|
20
|
+
export type WuiSystemProps = S.BackgroundsProps & S.BorderProps & S.BoxShadowProps & S.ColorProps & S.DisplayProps & S.FlexboxesProps & S.GridsProps & S.HeightProps & S.MaxHeightProps & S.MaxWidthProps & S.MinHeightProps & S.MinWidthProps & S.SpaceProps & S.TypographyProps & S.VerticalAlignProps & S.WidthProps & WuiOldProps;
|
|
21
|
+
export type WuiWrapperSystemProps = S.MarginProps & S.MarginBottomProps & S.MarginLeftProps & S.MarginRightProps & S.MarginTopProps & S.MarginXProps & S.MarginYProps & S.WidthProps & WuiOldProps;
|
|
22
|
+
export interface WuiTestProps {
|
|
23
|
+
dataTestId?: string;
|
|
24
|
+
}
|
|
25
|
+
export type WuiProps = SystemProps;
|
|
26
|
+
export type As<Props = any> = React.ElementType<Props>;
|
|
27
|
+
export type RightJoinProps<SourceProps, OverrideProps> = Omit<SourceProps, keyof OverrideProps> & OverrideProps;
|
|
28
|
+
export type MergeProps<ComponentProps, Props, WuiProps> = RightJoinProps<ComponentProps, Props> & RightJoinProps<WuiProps, Props>;
|
|
29
|
+
export type CreateWuiProps<Component extends As, Props = {}> = MergeProps<Omit<React.ComponentProps<Component>, keyof WuiProps>, Props, WuiProps & WuiTestProps & {
|
|
30
|
+
as?: As;
|
|
31
|
+
}>;
|
|
32
|
+
export type CreateWuiComponent<Component extends As, Options = {}> = {
|
|
33
|
+
<AsComponent extends As>(props: CreateWuiProps<AsComponent, Options> & {
|
|
34
|
+
as: AsComponent;
|
|
35
|
+
}): JSX.Element;
|
|
36
|
+
(props: CreateWuiProps<Component, Options>): JSX.Element;
|
|
37
|
+
displayName?: string;
|
|
38
|
+
};
|
|
39
|
+
export declare const forwardRef: <Component extends As, Props = {}>(component: React.ForwardRefRenderFunction<any, Props>) => CreateWuiComponent<Component, Props>;
|
|
40
|
+
export type ExtraSize = number | string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { css } from '@xstyled/styled-components';
|
|
2
|
+
import { ThemeValues } from '../../theme';
|
|
3
|
+
type FontVariation = {
|
|
4
|
+
display?: FontDisplay;
|
|
5
|
+
extensions?: string[];
|
|
6
|
+
isVariable?: boolean;
|
|
7
|
+
style?: string;
|
|
8
|
+
unicodeRange?: string;
|
|
9
|
+
url: string;
|
|
10
|
+
weight?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function getSource(url: FontVariation['url'], extensions: FontVariation['extensions'], isVariable: FontVariation['isVariable']): string;
|
|
13
|
+
export declare const fonts: () => ({ theme }: {
|
|
14
|
+
theme: ThemeValues;
|
|
15
|
+
}) => ReturnType<typeof css>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const hideFocusRingsDataAttribute = "data-wui-hidefocusrings";
|
|
3
|
+
interface HideFocusRingsRootProps {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
reactRootId: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const HideFocusRingsRoot: React.FC<HideFocusRingsRootProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ThemeValues } from '../../theme';
|
|
3
|
+
export interface WuiProviderProps {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
hasGlobalStyle?: boolean;
|
|
6
|
+
reactRootId?: string;
|
|
7
|
+
shouldHideFocusRingOnClick?: boolean;
|
|
8
|
+
theme: ThemeValues;
|
|
9
|
+
useReset?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const WuiProvider: React.FC<WuiProviderProps>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const resetStyles: import('styled-components').FlattenSimpleInterpolation;
|
|
2
|
+
export declare const normalizeStyle: import('styled-components').FlattenSimpleInterpolation;
|
|
3
|
+
export declare const GlobalStyle: import('styled-components').GlobalStyleComponent<{
|
|
4
|
+
useReset?: boolean;
|
|
5
|
+
}, import('styled-components').DefaultTheme>;
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
declare const palette: {
|
|
2
|
+
'beige-10': string;
|
|
3
|
+
'beige-20': string;
|
|
4
|
+
'beige-30': string;
|
|
5
|
+
'beige-40': string;
|
|
6
|
+
'beige-50': string;
|
|
7
|
+
'beige-60': string;
|
|
8
|
+
'beige-70': string;
|
|
9
|
+
'beige-80': string;
|
|
10
|
+
'beige-90': string;
|
|
11
|
+
'blue-10': string;
|
|
12
|
+
'blue-20': string;
|
|
13
|
+
'blue-30': string;
|
|
14
|
+
'blue-40': string;
|
|
15
|
+
'blue-50': string;
|
|
16
|
+
'blue-60': string;
|
|
17
|
+
'blue-70': string;
|
|
18
|
+
'blue-80': string;
|
|
19
|
+
'blue-90': string;
|
|
20
|
+
'green-10': string;
|
|
21
|
+
'green-20': string;
|
|
22
|
+
'green-30': string;
|
|
23
|
+
'green-40': string;
|
|
24
|
+
'green-50': string;
|
|
25
|
+
'green-60': string;
|
|
26
|
+
'green-70': string;
|
|
27
|
+
'green-80': string;
|
|
28
|
+
'green-90': string;
|
|
29
|
+
'neutral-10': string;
|
|
30
|
+
'neutral-20': string;
|
|
31
|
+
'neutral-30': string;
|
|
32
|
+
'neutral-40': string;
|
|
33
|
+
'neutral-50': string;
|
|
34
|
+
'neutral-60': string;
|
|
35
|
+
'neutral-70': string;
|
|
36
|
+
'neutral-80': string;
|
|
37
|
+
'neutral-90': string;
|
|
38
|
+
'orange-10': string;
|
|
39
|
+
'orange-20': string;
|
|
40
|
+
'orange-30': string;
|
|
41
|
+
'orange-40': string;
|
|
42
|
+
'orange-50': string;
|
|
43
|
+
'orange-60': string;
|
|
44
|
+
'orange-70': string;
|
|
45
|
+
'orange-80': string;
|
|
46
|
+
'orange-90': string;
|
|
47
|
+
'pink-10': string;
|
|
48
|
+
'pink-20': string;
|
|
49
|
+
'pink-30': string;
|
|
50
|
+
'pink-40': string;
|
|
51
|
+
'pink-50': string;
|
|
52
|
+
'pink-60': string;
|
|
53
|
+
'pink-70': string;
|
|
54
|
+
'pink-80': string;
|
|
55
|
+
'pink-90': string;
|
|
56
|
+
'red-10': string;
|
|
57
|
+
'red-20': string;
|
|
58
|
+
'red-30': string;
|
|
59
|
+
'red-40': string;
|
|
60
|
+
'red-50': string;
|
|
61
|
+
'red-60': string;
|
|
62
|
+
'red-70': string;
|
|
63
|
+
'red-80': string;
|
|
64
|
+
'red-90': string;
|
|
65
|
+
'red-orange-10': string;
|
|
66
|
+
'red-orange-20': string;
|
|
67
|
+
'red-orange-30': string;
|
|
68
|
+
'red-orange-40': string;
|
|
69
|
+
'red-orange-50': string;
|
|
70
|
+
'red-orange-60': string;
|
|
71
|
+
'red-orange-70': string;
|
|
72
|
+
'red-orange-80': string;
|
|
73
|
+
'red-orange-90': string;
|
|
74
|
+
'teal-10': string;
|
|
75
|
+
'teal-20': string;
|
|
76
|
+
'teal-30': string;
|
|
77
|
+
'teal-40': string;
|
|
78
|
+
'teal-50': string;
|
|
79
|
+
'teal-60': string;
|
|
80
|
+
'teal-70': string;
|
|
81
|
+
'teal-80': string;
|
|
82
|
+
'teal-90': string;
|
|
83
|
+
'violet-10': string;
|
|
84
|
+
'violet-20': string;
|
|
85
|
+
'violet-30': string;
|
|
86
|
+
'violet-40': string;
|
|
87
|
+
'violet-50': string;
|
|
88
|
+
'violet-60': string;
|
|
89
|
+
'violet-70': string;
|
|
90
|
+
'violet-80': string;
|
|
91
|
+
'violet-90': string;
|
|
92
|
+
'yellow-10': string;
|
|
93
|
+
'yellow-20': string;
|
|
94
|
+
'yellow-30': string;
|
|
95
|
+
'yellow-40': string;
|
|
96
|
+
'yellow-50': string;
|
|
97
|
+
'yellow-60': string;
|
|
98
|
+
'yellow-70': string;
|
|
99
|
+
'yellow-80': string;
|
|
100
|
+
'yellow-90': string;
|
|
101
|
+
};
|
|
102
|
+
export declare const getColors: (systemColors: typeof palette) => {
|
|
103
|
+
'primary-10': string;
|
|
104
|
+
'primary-20': string;
|
|
105
|
+
'primary-30': string;
|
|
106
|
+
'primary-40': string;
|
|
107
|
+
'primary-50': string;
|
|
108
|
+
'primary-60': string;
|
|
109
|
+
'primary-70': string;
|
|
110
|
+
'primary-80': string;
|
|
111
|
+
'primary-90': string;
|
|
112
|
+
'secondary-blue': string;
|
|
113
|
+
'secondary-green': string;
|
|
114
|
+
'secondary-orange': string;
|
|
115
|
+
'secondary-pink': string;
|
|
116
|
+
'secondary-teal': string;
|
|
117
|
+
'secondary-violet': string;
|
|
118
|
+
overlay: string;
|
|
119
|
+
'beige-10': string;
|
|
120
|
+
'beige-20': string;
|
|
121
|
+
'beige-30': string;
|
|
122
|
+
'beige-40': string;
|
|
123
|
+
'beige-50': string;
|
|
124
|
+
'beige-60': string;
|
|
125
|
+
'beige-70': string;
|
|
126
|
+
'beige-80': string;
|
|
127
|
+
'beige-90': string;
|
|
128
|
+
'blue-10': string;
|
|
129
|
+
'blue-20': string;
|
|
130
|
+
'blue-30': string;
|
|
131
|
+
'blue-40': string;
|
|
132
|
+
'blue-50': string;
|
|
133
|
+
'blue-60': string;
|
|
134
|
+
'blue-70': string;
|
|
135
|
+
'blue-80': string;
|
|
136
|
+
'blue-90': string;
|
|
137
|
+
'green-10': string;
|
|
138
|
+
'green-20': string;
|
|
139
|
+
'green-30': string;
|
|
140
|
+
'green-40': string;
|
|
141
|
+
'green-50': string;
|
|
142
|
+
'green-60': string;
|
|
143
|
+
'green-70': string;
|
|
144
|
+
'green-80': string;
|
|
145
|
+
'green-90': string;
|
|
146
|
+
'neutral-10': string;
|
|
147
|
+
'neutral-20': string;
|
|
148
|
+
'neutral-30': string;
|
|
149
|
+
'neutral-40': string;
|
|
150
|
+
'neutral-50': string;
|
|
151
|
+
'neutral-60': string;
|
|
152
|
+
'neutral-70': string;
|
|
153
|
+
'neutral-80': string;
|
|
154
|
+
'neutral-90': string;
|
|
155
|
+
'orange-10': string;
|
|
156
|
+
'orange-20': string;
|
|
157
|
+
'orange-30': string;
|
|
158
|
+
'orange-40': string;
|
|
159
|
+
'orange-50': string;
|
|
160
|
+
'orange-60': string;
|
|
161
|
+
'orange-70': string;
|
|
162
|
+
'orange-80': string;
|
|
163
|
+
'orange-90': string;
|
|
164
|
+
'pink-10': string;
|
|
165
|
+
'pink-20': string;
|
|
166
|
+
'pink-30': string;
|
|
167
|
+
'pink-40': string;
|
|
168
|
+
'pink-50': string;
|
|
169
|
+
'pink-60': string;
|
|
170
|
+
'pink-70': string;
|
|
171
|
+
'pink-80': string;
|
|
172
|
+
'pink-90': string;
|
|
173
|
+
'red-10': string;
|
|
174
|
+
'red-20': string;
|
|
175
|
+
'red-30': string;
|
|
176
|
+
'red-40': string;
|
|
177
|
+
'red-50': string;
|
|
178
|
+
'red-60': string;
|
|
179
|
+
'red-70': string;
|
|
180
|
+
'red-80': string;
|
|
181
|
+
'red-90': string;
|
|
182
|
+
'red-orange-10': string;
|
|
183
|
+
'red-orange-20': string;
|
|
184
|
+
'red-orange-30': string;
|
|
185
|
+
'red-orange-40': string;
|
|
186
|
+
'red-orange-50': string;
|
|
187
|
+
'red-orange-60': string;
|
|
188
|
+
'red-orange-70': string;
|
|
189
|
+
'red-orange-80': string;
|
|
190
|
+
'red-orange-90': string;
|
|
191
|
+
'teal-10': string;
|
|
192
|
+
'teal-20': string;
|
|
193
|
+
'teal-30': string;
|
|
194
|
+
'teal-40': string;
|
|
195
|
+
'teal-50': string;
|
|
196
|
+
'teal-60': string;
|
|
197
|
+
'teal-70': string;
|
|
198
|
+
'teal-80': string;
|
|
199
|
+
'teal-90': string;
|
|
200
|
+
'violet-10': string;
|
|
201
|
+
'violet-20': string;
|
|
202
|
+
'violet-30': string;
|
|
203
|
+
'violet-40': string;
|
|
204
|
+
'violet-50': string;
|
|
205
|
+
'violet-60': string;
|
|
206
|
+
'violet-70': string;
|
|
207
|
+
'violet-80': string;
|
|
208
|
+
'violet-90': string;
|
|
209
|
+
'yellow-10': string;
|
|
210
|
+
'yellow-20': string;
|
|
211
|
+
'yellow-30': string;
|
|
212
|
+
'yellow-40': string;
|
|
213
|
+
'yellow-50': string;
|
|
214
|
+
'yellow-60': string;
|
|
215
|
+
'yellow-70': string;
|
|
216
|
+
'yellow-80': string;
|
|
217
|
+
'yellow-90': string;
|
|
218
|
+
};
|
|
219
|
+
export declare const colors: {
|
|
220
|
+
'primary-10': string;
|
|
221
|
+
'primary-20': string;
|
|
222
|
+
'primary-30': string;
|
|
223
|
+
'primary-40': string;
|
|
224
|
+
'primary-50': string;
|
|
225
|
+
'primary-60': string;
|
|
226
|
+
'primary-70': string;
|
|
227
|
+
'primary-80': string;
|
|
228
|
+
'primary-90': string;
|
|
229
|
+
'secondary-blue': string;
|
|
230
|
+
'secondary-green': string;
|
|
231
|
+
'secondary-orange': string;
|
|
232
|
+
'secondary-pink': string;
|
|
233
|
+
'secondary-teal': string;
|
|
234
|
+
'secondary-violet': string;
|
|
235
|
+
overlay: string;
|
|
236
|
+
'beige-10': string;
|
|
237
|
+
'beige-20': string;
|
|
238
|
+
'beige-30': string;
|
|
239
|
+
'beige-40': string;
|
|
240
|
+
'beige-50': string;
|
|
241
|
+
'beige-60': string;
|
|
242
|
+
'beige-70': string;
|
|
243
|
+
'beige-80': string;
|
|
244
|
+
'beige-90': string;
|
|
245
|
+
'blue-10': string;
|
|
246
|
+
'blue-20': string;
|
|
247
|
+
'blue-30': string;
|
|
248
|
+
'blue-40': string;
|
|
249
|
+
'blue-50': string;
|
|
250
|
+
'blue-60': string;
|
|
251
|
+
'blue-70': string;
|
|
252
|
+
'blue-80': string;
|
|
253
|
+
'blue-90': string;
|
|
254
|
+
'green-10': string;
|
|
255
|
+
'green-20': string;
|
|
256
|
+
'green-30': string;
|
|
257
|
+
'green-40': string;
|
|
258
|
+
'green-50': string;
|
|
259
|
+
'green-60': string;
|
|
260
|
+
'green-70': string;
|
|
261
|
+
'green-80': string;
|
|
262
|
+
'green-90': string;
|
|
263
|
+
'neutral-10': string;
|
|
264
|
+
'neutral-20': string;
|
|
265
|
+
'neutral-30': string;
|
|
266
|
+
'neutral-40': string;
|
|
267
|
+
'neutral-50': string;
|
|
268
|
+
'neutral-60': string;
|
|
269
|
+
'neutral-70': string;
|
|
270
|
+
'neutral-80': string;
|
|
271
|
+
'neutral-90': string;
|
|
272
|
+
'orange-10': string;
|
|
273
|
+
'orange-20': string;
|
|
274
|
+
'orange-30': string;
|
|
275
|
+
'orange-40': string;
|
|
276
|
+
'orange-50': string;
|
|
277
|
+
'orange-60': string;
|
|
278
|
+
'orange-70': string;
|
|
279
|
+
'orange-80': string;
|
|
280
|
+
'orange-90': string;
|
|
281
|
+
'pink-10': string;
|
|
282
|
+
'pink-20': string;
|
|
283
|
+
'pink-30': string;
|
|
284
|
+
'pink-40': string;
|
|
285
|
+
'pink-50': string;
|
|
286
|
+
'pink-60': string;
|
|
287
|
+
'pink-70': string;
|
|
288
|
+
'pink-80': string;
|
|
289
|
+
'pink-90': string;
|
|
290
|
+
'red-10': string;
|
|
291
|
+
'red-20': string;
|
|
292
|
+
'red-30': string;
|
|
293
|
+
'red-40': string;
|
|
294
|
+
'red-50': string;
|
|
295
|
+
'red-60': string;
|
|
296
|
+
'red-70': string;
|
|
297
|
+
'red-80': string;
|
|
298
|
+
'red-90': string;
|
|
299
|
+
'red-orange-10': string;
|
|
300
|
+
'red-orange-20': string;
|
|
301
|
+
'red-orange-30': string;
|
|
302
|
+
'red-orange-40': string;
|
|
303
|
+
'red-orange-50': string;
|
|
304
|
+
'red-orange-60': string;
|
|
305
|
+
'red-orange-70': string;
|
|
306
|
+
'red-orange-80': string;
|
|
307
|
+
'red-orange-90': string;
|
|
308
|
+
'teal-10': string;
|
|
309
|
+
'teal-20': string;
|
|
310
|
+
'teal-30': string;
|
|
311
|
+
'teal-40': string;
|
|
312
|
+
'teal-50': string;
|
|
313
|
+
'teal-60': string;
|
|
314
|
+
'teal-70': string;
|
|
315
|
+
'teal-80': string;
|
|
316
|
+
'teal-90': string;
|
|
317
|
+
'violet-10': string;
|
|
318
|
+
'violet-20': string;
|
|
319
|
+
'violet-30': string;
|
|
320
|
+
'violet-40': string;
|
|
321
|
+
'violet-50': string;
|
|
322
|
+
'violet-60': string;
|
|
323
|
+
'violet-70': string;
|
|
324
|
+
'violet-80': string;
|
|
325
|
+
'violet-90': string;
|
|
326
|
+
'yellow-10': string;
|
|
327
|
+
'yellow-20': string;
|
|
328
|
+
'yellow-30': string;
|
|
329
|
+
'yellow-40': string;
|
|
330
|
+
'yellow-50': string;
|
|
331
|
+
'yellow-60': string;
|
|
332
|
+
'yellow-70': string;
|
|
333
|
+
'yellow-80': string;
|
|
334
|
+
'yellow-90': string;
|
|
335
|
+
};
|
|
336
|
+
export type ThemeColors = typeof colors;
|
|
337
|
+
declare const enum SecondaryColors {
|
|
338
|
+
'blue' = 0,
|
|
339
|
+
'green' = 1,
|
|
340
|
+
'orange' = 2,
|
|
341
|
+
'pink' = 3,
|
|
342
|
+
'teal' = 4,
|
|
343
|
+
'violet' = 5
|
|
344
|
+
}
|
|
345
|
+
export type ThemeSecondaryColors = keyof typeof SecondaryColors;
|
|
346
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSObject } from '@xstyled/styled-components';
|
|
2
|
+
import { ThemeColors } from './colors';
|
|
3
|
+
export type ThemeFocus = (color?: string) => {
|
|
4
|
+
boxShadow: CSSObject['boxShadow'];
|
|
5
|
+
};
|
|
6
|
+
export declare const getFocus: ({ colors }: {
|
|
7
|
+
colors: ThemeColors;
|
|
8
|
+
}) => (color?: string) => {
|
|
9
|
+
boxShadow: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ThemeValues } from '.';
|
|
2
|
+
type FontFace = {
|
|
3
|
+
display?: FontDisplay;
|
|
4
|
+
extensions?: string[];
|
|
5
|
+
isVariable?: boolean;
|
|
6
|
+
stretch?: string;
|
|
7
|
+
style?: string;
|
|
8
|
+
uniCodeRange?: string;
|
|
9
|
+
url: string;
|
|
10
|
+
weight?: string;
|
|
11
|
+
};
|
|
12
|
+
export type ThemeFontFaces = {
|
|
13
|
+
'welcome-font': FontFace[];
|
|
14
|
+
'welcome-icon-font': FontFace[];
|
|
15
|
+
'work-sans': FontFace[];
|
|
16
|
+
};
|
|
17
|
+
export declare const fontFaces: (theme: ThemeValues) => ThemeFontFaces;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { CSSScalar, ITheme as StyledComponentDefaultTheme, DefaultTheme as XStyledDefaultTheme } from '@xstyled/styled-components';
|
|
2
|
+
import { darkTheme } from './dark';
|
|
3
|
+
import { ThemeColors } from './colors';
|
|
4
|
+
import { ThemeFontFaces } from './fonts';
|
|
5
|
+
import { ThemeFonts, ThemeFontSizes, ThemeFontWeights, ThemeLetterSpacings, ThemeLineHeights, ThemeTexts, ThemeTextsFontFamily, ThemeTextsFontWeights, ThemeTextsTextTransform } from './typography';
|
|
6
|
+
import { ThemeTimingFunction, ThemeTransitions } from './transitions';
|
|
7
|
+
import { ThemeUnderline } from './underline';
|
|
8
|
+
import { ThemeRadii } from './radii';
|
|
9
|
+
import { ThemeBorderWidths } from './borders';
|
|
10
|
+
import { ThemeScreens } from './screens';
|
|
11
|
+
import { ThemeShadows } from './shadows';
|
|
12
|
+
import { ThemeSpace } from './space';
|
|
13
|
+
import { ThemeSelection } from './selection';
|
|
14
|
+
import { ThemeFocus } from './focus';
|
|
15
|
+
type OverrideKeys = 'colors' | 'radii' | 'borderWidths' | 'fontSizes' | 'lineHeights' | 'fontWeights' | 'letterSpacings' | 'fonts' | 'sizes' | 'screens' | 'space' | 'shadows' | 'texts';
|
|
16
|
+
type XStyledTheme = Omit<XStyledDefaultTheme, OverrideKeys>;
|
|
17
|
+
type StyledComponentsTheme = Omit<StyledComponentDefaultTheme, OverrideKeys>;
|
|
18
|
+
export interface ThemeValues extends XStyledTheme, StyledComponentsTheme {
|
|
19
|
+
borderWidths: ThemeBorderWidths;
|
|
20
|
+
colors: ThemeColors;
|
|
21
|
+
defaultLetterSpacing: string;
|
|
22
|
+
defaultLineHeight: number;
|
|
23
|
+
focus: ThemeFocus;
|
|
24
|
+
fontFaces: ThemeFontFaces;
|
|
25
|
+
fontSizes: ThemeFontSizes;
|
|
26
|
+
fontWeights: ThemeFontWeights;
|
|
27
|
+
fonts: ThemeFonts;
|
|
28
|
+
fontsUrl: ThemeFontsUrl;
|
|
29
|
+
inset: ThemeSpace;
|
|
30
|
+
letterSpacings: ThemeLetterSpacings;
|
|
31
|
+
lineHeights: ThemeLineHeights;
|
|
32
|
+
radii: ThemeRadii;
|
|
33
|
+
screens: ThemeScreens;
|
|
34
|
+
selection: ThemeSelection;
|
|
35
|
+
shadows: ThemeShadows;
|
|
36
|
+
space: ThemeSpace;
|
|
37
|
+
texts: ThemeTexts;
|
|
38
|
+
textsFontFamily: ThemeTextsFontFamily;
|
|
39
|
+
textsFontWeights: ThemeTextsFontWeights;
|
|
40
|
+
textsTextTransform: ThemeTextsTextTransform;
|
|
41
|
+
timingFunction: ThemeTimingFunction;
|
|
42
|
+
toEm: (int: number) => string;
|
|
43
|
+
toPx: (int: number) => string;
|
|
44
|
+
toRem: (int: number) => string;
|
|
45
|
+
transformers: {
|
|
46
|
+
border: (value: CSSScalar) => CSSScalar;
|
|
47
|
+
px: (value: CSSScalar) => CSSScalar;
|
|
48
|
+
};
|
|
49
|
+
transitions: ThemeTransitions;
|
|
50
|
+
underline: ThemeUnderline;
|
|
51
|
+
}
|
|
52
|
+
export type ThemeFontsUrl = 'https://cdn.welcome-ui.com/fonts' | 'https://cdn.welcometothejungle.com/fonts' | string;
|
|
53
|
+
export type Options = {
|
|
54
|
+
[param: string]: unknown;
|
|
55
|
+
defaultFontFamily?: string;
|
|
56
|
+
defaultFontSize?: number;
|
|
57
|
+
defaultLetterSpacing?: string;
|
|
58
|
+
defaultLineHeight?: number;
|
|
59
|
+
fontsUrl?: ThemeFontsUrl;
|
|
60
|
+
headingFontFamily?: string;
|
|
61
|
+
iconFontFamily?: string;
|
|
62
|
+
};
|
|
63
|
+
export declare const createTheme: (options?: Options) => ThemeValues;
|
|
64
|
+
export { darkTheme };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ThemeValues } from '.';
|
|
2
|
+
export type ThemeRadii = {
|
|
3
|
+
[key: number]: string;
|
|
4
|
+
full: string;
|
|
5
|
+
lg: string;
|
|
6
|
+
md: string;
|
|
7
|
+
none: string;
|
|
8
|
+
sm: string;
|
|
9
|
+
xl: string;
|
|
10
|
+
xxl: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const getRadii: (theme: ThemeValues) => ThemeRadii;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ThemeValues } from '.';
|
|
2
|
+
export type ThemeSpace = {
|
|
3
|
+
[key: string]: string;
|
|
4
|
+
[key: number]: string;
|
|
5
|
+
'3xl': string;
|
|
6
|
+
'4xl': string;
|
|
7
|
+
'5xl': string;
|
|
8
|
+
'6xl': string;
|
|
9
|
+
'7xl': string;
|
|
10
|
+
lg: string;
|
|
11
|
+
md: string;
|
|
12
|
+
sm: string;
|
|
13
|
+
xl: string;
|
|
14
|
+
xs: string;
|
|
15
|
+
xxl: string;
|
|
16
|
+
xxs: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const getSpace: (theme: ThemeValues) => ThemeSpace;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CSSObject } from '@xstyled/styled-components';
|
|
2
|
+
export type ThemeTimingFunction = {
|
|
3
|
+
primary: CSSObject['transition-timing-function'];
|
|
4
|
+
secondary: CSSObject['transition-timing-function'];
|
|
5
|
+
tertiary: CSSObject['transition-timing-function'];
|
|
6
|
+
};
|
|
7
|
+
export declare const timingFunction: ThemeTimingFunction;
|
|
8
|
+
export type ThemeTransitions = {
|
|
9
|
+
fast: CSSObject['transition'];
|
|
10
|
+
medium: CSSObject['transition'];
|
|
11
|
+
slow: CSSObject['transition'];
|
|
12
|
+
};
|
|
13
|
+
export declare const transitions: ThemeTransitions;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { CSSObject } from '@xstyled/styled-components';
|
|
2
|
+
import { Options, ThemeValues } from '.';
|
|
3
|
+
export type ThemeFontSizes = {
|
|
4
|
+
[key: number]: string;
|
|
5
|
+
h0: string;
|
|
6
|
+
h1: string;
|
|
7
|
+
h2: string;
|
|
8
|
+
h3: string;
|
|
9
|
+
h4: string;
|
|
10
|
+
h5: string;
|
|
11
|
+
h6: string;
|
|
12
|
+
lg: string;
|
|
13
|
+
md: string;
|
|
14
|
+
sm: string;
|
|
15
|
+
'subtitle-md': string;
|
|
16
|
+
'subtitle-sm': string;
|
|
17
|
+
xs: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const getFontSizes: (unit: string, theme: ThemeValues) => ThemeFontSizes;
|
|
20
|
+
export type ThemeLineHeights = {
|
|
21
|
+
[key: number]: number | string;
|
|
22
|
+
h0: number | string;
|
|
23
|
+
h1: number | string;
|
|
24
|
+
h2: number | string;
|
|
25
|
+
h3: number | string;
|
|
26
|
+
h4: number | string;
|
|
27
|
+
h5: number | string;
|
|
28
|
+
h6: number | string;
|
|
29
|
+
html: number | string;
|
|
30
|
+
lg: number | string;
|
|
31
|
+
md: number | string;
|
|
32
|
+
sm: number | string;
|
|
33
|
+
'subtitle-md': number | string;
|
|
34
|
+
'subtitle-sm': number | string;
|
|
35
|
+
xs: number | string;
|
|
36
|
+
};
|
|
37
|
+
export declare const getLineHeights: ({ defaultLineHeight, toRem, }: {
|
|
38
|
+
defaultLineHeight: number;
|
|
39
|
+
toRem: (value: number) => string;
|
|
40
|
+
}) => ThemeLineHeights;
|
|
41
|
+
export type ThemeFontWeights = {
|
|
42
|
+
[key: string]: number;
|
|
43
|
+
bold: number;
|
|
44
|
+
medium: number;
|
|
45
|
+
regular: number;
|
|
46
|
+
};
|
|
47
|
+
export declare const fontWeights: ThemeFontWeights;
|
|
48
|
+
export type ThemeLetterSpacings = {
|
|
49
|
+
[key: string]: string;
|
|
50
|
+
h0: string;
|
|
51
|
+
h1: string;
|
|
52
|
+
h2: string;
|
|
53
|
+
h3: string;
|
|
54
|
+
h4: string;
|
|
55
|
+
h5: string;
|
|
56
|
+
h6: string;
|
|
57
|
+
html: string;
|
|
58
|
+
lg: string;
|
|
59
|
+
md: string;
|
|
60
|
+
sm: string;
|
|
61
|
+
'subtitle-md': string;
|
|
62
|
+
'subtitle-sm': string;
|
|
63
|
+
xs: string;
|
|
64
|
+
};
|
|
65
|
+
export declare const getLetterSpacings: ({ defaultLetterSpacing, toRem, }: {
|
|
66
|
+
defaultLetterSpacing: string;
|
|
67
|
+
toRem: (value: number) => string;
|
|
68
|
+
}) => ThemeLetterSpacings;
|
|
69
|
+
export type ThemeTextsFontWeights = {
|
|
70
|
+
[key: string]: number;
|
|
71
|
+
h0: number;
|
|
72
|
+
h1: number;
|
|
73
|
+
h2: number;
|
|
74
|
+
h3: number;
|
|
75
|
+
h4: number;
|
|
76
|
+
h5: number;
|
|
77
|
+
h6: number;
|
|
78
|
+
lg: number;
|
|
79
|
+
md: number;
|
|
80
|
+
sm: number;
|
|
81
|
+
'subtitle-md': number;
|
|
82
|
+
'subtitle-sm': number;
|
|
83
|
+
xs: number;
|
|
84
|
+
};
|
|
85
|
+
export declare const getTextsFontWeights: (theme: ThemeValues) => ThemeTextsFontWeights;
|
|
86
|
+
export type ThemeTextsFontFamily = {
|
|
87
|
+
[key: string]: string;
|
|
88
|
+
h0: string;
|
|
89
|
+
h1: string;
|
|
90
|
+
h2: string;
|
|
91
|
+
h3: string;
|
|
92
|
+
h4: string;
|
|
93
|
+
h5: string;
|
|
94
|
+
h6: string;
|
|
95
|
+
'subtitle-md': string;
|
|
96
|
+
'subtitle-sm': string;
|
|
97
|
+
};
|
|
98
|
+
export declare const getTextsFontFamily: (theme: ThemeValues) => ThemeTextsFontFamily;
|
|
99
|
+
export type ThemeTextsTextTransform = {
|
|
100
|
+
[key: string]: string;
|
|
101
|
+
'subtitle-md': string;
|
|
102
|
+
'subtitle-sm': string;
|
|
103
|
+
};
|
|
104
|
+
export declare const getTextsTextTransform: () => ThemeTextsTextTransform;
|
|
105
|
+
export type ThemeTextsFontColors = {
|
|
106
|
+
[key: number]: string;
|
|
107
|
+
h0: string;
|
|
108
|
+
h1: string;
|
|
109
|
+
h2: string;
|
|
110
|
+
h3: string;
|
|
111
|
+
h4: string;
|
|
112
|
+
h5: string;
|
|
113
|
+
h6: string;
|
|
114
|
+
};
|
|
115
|
+
export declare const getTextFontColors: (theme: ThemeValues) => ThemeTextsFontColors;
|
|
116
|
+
export type ThemeTexts = {
|
|
117
|
+
[key: string]: Partial<{
|
|
118
|
+
color: CSSObject['color'];
|
|
119
|
+
fontFamily: CSSObject['fontFamily'];
|
|
120
|
+
fontSize: CSSObject['fontSize'];
|
|
121
|
+
fontWeight: CSSObject['fontWeight'];
|
|
122
|
+
letterSpacing: CSSObject['letterSpacing'];
|
|
123
|
+
lineHeight: CSSObject['lineHeight'];
|
|
124
|
+
textTransform: CSSObject['textTransform'];
|
|
125
|
+
}>;
|
|
126
|
+
};
|
|
127
|
+
export declare const getTexts: (theme: ThemeValues) => ThemeTexts;
|
|
128
|
+
export type ThemeFonts = {
|
|
129
|
+
headings: string;
|
|
130
|
+
icons: string;
|
|
131
|
+
texts: string;
|
|
132
|
+
};
|
|
133
|
+
export declare const getFonts: (defaultFontFamily: Options["defaultFontFamily"], headingFontFamily: Options["headingFontFamily"], iconFontFamily: Options["iconFontFamily"]) => ThemeFonts;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { css } from '@xstyled/styled-components';
|
|
2
|
+
import { ThemeColors } from './colors';
|
|
3
|
+
export type ThemeUnderline = {
|
|
4
|
+
default: ReturnType<typeof css>;
|
|
5
|
+
hover: ReturnType<typeof css>;
|
|
6
|
+
};
|
|
7
|
+
export declare const getUnderline: ({ colors }: {
|
|
8
|
+
colors: ThemeColors;
|
|
9
|
+
}) => ThemeUnderline;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "welcome-ui",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.2",
|
|
4
4
|
"description": "Customizable design system with react • styled-components • styled-system and ariakit.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"require": "./dist/index.js"
|
|
16
16
|
},
|
|
17
17
|
"./*": {
|
|
18
|
-
"import": "./dist/*.mjs",
|
|
19
|
-
"require": "./dist/*.js"
|
|
18
|
+
"import": "./dist/components/*.mjs",
|
|
19
|
+
"require": "./dist/components/*.js"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
package/dist/Test.js
DELETED
package/dist/Test.mjs
DELETED
|
File without changes
|
|
File without changes
|