welcome-ui 1.0.0-beta.1 → 1.0.0-beta.3
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/Accordion.js +89 -0
- package/dist/Accordion.mjs +579 -0
- package/dist/Alert.js +1 -0
- package/dist/Alert.mjs +7 -0
- package/dist/AspectRatio.js +29 -0
- package/dist/AspectRatio.mjs +41 -0
- package/dist/Avatar.js +5 -0
- package/dist/Avatar.mjs +55 -0
- package/dist/Badge.js +17 -0
- package/dist/Badge.mjs +53 -0
- package/dist/Box.js +1 -0
- package/dist/Box.mjs +8 -0
- package/dist/Breadcrumb.js +54 -0
- package/dist/Breadcrumb.mjs +439 -0
- package/dist/Flex.js +1 -0
- package/dist/Flex.mjs +26 -0
- package/dist/System.js +1 -0
- package/dist/System.mjs +51 -0
- package/dist/X5NMLKT6-BC1Q56kB.mjs +1258 -0
- package/dist/X5NMLKT6-vrNG8i_R.js +14 -0
- package/dist/index-0MPAX4B5.mjs +320 -0
- package/dist/index-BNA_A0oa.js +155 -0
- package/dist/index-BXJQXgy9.js +13 -0
- package/dist/index-Bwrtxit1.mjs +84 -0
- package/dist/index-Ct2FOeyM.js +17 -0
- package/dist/index-DRNn5iIc.js +142 -0
- package/dist/index-Du8Nrf16.mjs +128 -0
- package/dist/index-MifIgNHW.mjs +47 -0
- package/dist/index-V28zHt_Z.js +68 -0
- package/dist/index-WmqrMIzg.mjs +19070 -0
- package/dist/index.js +147 -5
- package/dist/index.mjs +767 -217
- package/dist/types/components/Accordion/index.d.ts +16 -0
- package/dist/types/components/Accordion/styles.d.ts +6 -0
- package/dist/types/components/Accordion/theme.d.ts +10 -0
- package/dist/types/components/Alert/Title.d.ts +7 -0
- package/dist/types/components/Alert/index.d.ts +24 -0
- package/dist/types/components/Alert/styles.d.ts +6 -0
- package/dist/types/components/Alert/theme.d.ts +15 -0
- package/dist/types/components/AspectRatio/index.d.ts +6 -0
- package/dist/types/components/AspectRatio/styles.d.ts +2 -0
- package/dist/types/components/Avatar/index.d.ts +16 -0
- package/dist/types/components/Avatar/styles.d.ts +2 -0
- package/dist/types/components/Avatar/theme.d.ts +9 -0
- package/dist/types/components/Avatar/utils.d.ts +3 -0
- package/dist/types/components/Badge/index.d.ts +11 -0
- package/dist/types/components/Badge/styles.d.ts +8 -0
- package/dist/types/components/Badge/theme.d.ts +18 -0
- package/dist/types/components/Box/index.d.ts +3 -0
- package/dist/types/components/Breadcrumb/Item.d.ts +13 -0
- package/dist/types/components/Breadcrumb/Item.styles.d.ts +2 -0
- package/dist/types/components/Breadcrumb/index.d.ts +18 -0
- package/dist/types/components/Breadcrumb/styles.d.ts +6 -0
- package/dist/types/components/Breadcrumb/theme.d.ts +12 -0
- package/dist/types/components/Button/index.d.ts +21 -0
- package/dist/types/components/Button/styles.d.ts +2 -0
- package/dist/types/components/Button/theme.d.ts +13 -0
- package/dist/types/components/ButtonGroup/index.d.ts +15 -0
- package/dist/types/components/ButtonGroup/styles.d.ts +1 -0
- package/dist/types/components/Card/Cover.d.ts +10 -0
- package/dist/types/components/Card/Cover.styles.d.ts +1 -0
- package/dist/types/components/Card/index.d.ts +8 -0
- package/dist/types/components/Card/styles.d.ts +2 -0
- package/dist/types/components/Card/theme.d.ts +6 -0
- package/dist/types/components/ClearButton/index.d.ts +5 -0
- package/dist/types/components/ClearButton/styles.d.ts +1 -0
- package/dist/types/components/CloseButton/index.d.ts +3 -0
- package/dist/types/components/CloseButton/styles.d.ts +1 -0
- package/dist/types/components/Flex/index.d.ts +19 -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 +15 -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 +76 -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 +7 -2
- package/dist/Test.js +0 -3
- package/dist/Test.mjs +0 -9
|
@@ -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,76 @@
|
|
|
1
|
+
import { CSSScalar, ITheme as StyledComponentDefaultTheme, DefaultTheme as XStyledDefaultTheme } from '@xstyled/styled-components';
|
|
2
|
+
import { ThemeAccordions } from '../components/Accordion/theme';
|
|
3
|
+
import { ThemeAlerts } from '../components/Alert/theme';
|
|
4
|
+
import { ThemeAvatars } from '../components/Avatar/theme';
|
|
5
|
+
import { ThemeBadges } from '../components/Badge/theme';
|
|
6
|
+
import { ThemeBreadcrumbs } from '../components/Breadcrumb/theme';
|
|
7
|
+
import { ThemeCards } from '../components/Card/theme';
|
|
8
|
+
import { darkTheme } from './dark';
|
|
9
|
+
import { ThemeColors } from './colors';
|
|
10
|
+
import { ThemeFontFaces } from './fonts';
|
|
11
|
+
import { ThemeFonts, ThemeFontSizes, ThemeFontWeights, ThemeLetterSpacings, ThemeLineHeights, ThemeTexts, ThemeTextsFontFamily, ThemeTextsFontWeights, ThemeTextsTextTransform } from './typography';
|
|
12
|
+
import { ThemeTimingFunction, ThemeTransitions } from './transitions';
|
|
13
|
+
import { ThemeUnderline } from './underline';
|
|
14
|
+
import { ThemeRadii } from './radii';
|
|
15
|
+
import { ThemeBorderWidths } from './borders';
|
|
16
|
+
import { ThemeScreens } from './screens';
|
|
17
|
+
import { ThemeShadows } from './shadows';
|
|
18
|
+
import { ThemeSpace } from './space';
|
|
19
|
+
import { ThemeSelection } from './selection';
|
|
20
|
+
import { ThemeFocus } from './focus';
|
|
21
|
+
type OverrideKeys = 'colors' | 'radii' | 'borderWidths' | 'fontSizes' | 'lineHeights' | 'fontWeights' | 'letterSpacings' | 'fonts' | 'sizes' | 'screens' | 'space' | 'shadows' | 'texts';
|
|
22
|
+
type XStyledTheme = Omit<XStyledDefaultTheme, OverrideKeys>;
|
|
23
|
+
type StyledComponentsTheme = Omit<StyledComponentDefaultTheme, OverrideKeys>;
|
|
24
|
+
export interface ThemeValues extends XStyledTheme, StyledComponentsTheme {
|
|
25
|
+
accordions: ThemeAccordions;
|
|
26
|
+
alert: ThemeAlerts;
|
|
27
|
+
avatars: ThemeAvatars;
|
|
28
|
+
badges: ThemeBadges;
|
|
29
|
+
borderWidths: ThemeBorderWidths;
|
|
30
|
+
breadcrumbs: ThemeBreadcrumbs;
|
|
31
|
+
cards: ThemeCards;
|
|
32
|
+
colors: ThemeColors;
|
|
33
|
+
defaultLetterSpacing: string;
|
|
34
|
+
defaultLineHeight: number;
|
|
35
|
+
focus: ThemeFocus;
|
|
36
|
+
fontFaces: ThemeFontFaces;
|
|
37
|
+
fontSizes: ThemeFontSizes;
|
|
38
|
+
fontWeights: ThemeFontWeights;
|
|
39
|
+
fonts: ThemeFonts;
|
|
40
|
+
fontsUrl: ThemeFontsUrl;
|
|
41
|
+
inset: ThemeSpace;
|
|
42
|
+
letterSpacings: ThemeLetterSpacings;
|
|
43
|
+
lineHeights: ThemeLineHeights;
|
|
44
|
+
radii: ThemeRadii;
|
|
45
|
+
screens: ThemeScreens;
|
|
46
|
+
selection: ThemeSelection;
|
|
47
|
+
shadows: ThemeShadows;
|
|
48
|
+
space: ThemeSpace;
|
|
49
|
+
texts: ThemeTexts;
|
|
50
|
+
textsFontFamily: ThemeTextsFontFamily;
|
|
51
|
+
textsFontWeights: ThemeTextsFontWeights;
|
|
52
|
+
textsTextTransform: ThemeTextsTextTransform;
|
|
53
|
+
timingFunction: ThemeTimingFunction;
|
|
54
|
+
toEm: (int: number) => string;
|
|
55
|
+
toPx: (int: number) => string;
|
|
56
|
+
toRem: (int: number) => string;
|
|
57
|
+
transformers: {
|
|
58
|
+
border: (value: CSSScalar) => CSSScalar;
|
|
59
|
+
px: (value: CSSScalar) => CSSScalar;
|
|
60
|
+
};
|
|
61
|
+
transitions: ThemeTransitions;
|
|
62
|
+
underline: ThemeUnderline;
|
|
63
|
+
}
|
|
64
|
+
export type ThemeFontsUrl = 'https://cdn.welcome-ui.com/fonts' | 'https://cdn.welcometothejungle.com/fonts' | string;
|
|
65
|
+
export type Options = {
|
|
66
|
+
[param: string]: unknown;
|
|
67
|
+
defaultFontFamily?: string;
|
|
68
|
+
defaultFontSize?: number;
|
|
69
|
+
defaultLetterSpacing?: string;
|
|
70
|
+
defaultLineHeight?: number;
|
|
71
|
+
fontsUrl?: ThemeFontsUrl;
|
|
72
|
+
headingFontFamily?: string;
|
|
73
|
+
iconFontFamily?: string;
|
|
74
|
+
};
|
|
75
|
+
export declare const createTheme: (options?: Options) => ThemeValues;
|
|
76
|
+
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;
|