@principal-ade/industry-theme 0.1.4 → 0.1.5
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/cjs/ThemeShowcase.d.ts.map +1 -1
- package/dist/cjs/defaultThemes.d.ts.map +1 -1
- package/dist/cjs/glassmorphismTheme.d.ts.map +1 -1
- package/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +32 -15
- package/dist/cjs/landingPageTheme.d.ts.map +1 -1
- package/dist/cjs/themeHelpers.d.ts.map +1 -1
- package/dist/cjs/themes.d.ts +2 -2
- package/dist/cjs/themes.d.ts.map +1 -1
- package/dist/esm/ThemeShowcase.d.ts.map +1 -1
- package/dist/esm/defaultThemes.d.ts.map +1 -1
- package/dist/esm/glassmorphismTheme.d.ts.map +1 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +32 -15
- package/dist/esm/landingPageTheme.d.ts.map +1 -1
- package/dist/esm/themeHelpers.d.ts.map +1 -1
- package/dist/esm/themes.d.ts +2 -2
- package/dist/esm/themes.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ThemeProvider.tsx +5 -5
- package/src/ThemeShowcase.tsx +322 -216
- package/src/defaultThemes.ts +10 -1
- package/src/glassmorphismTheme.ts +5 -2
- package/src/index.ts +7 -14
- package/src/landingPageTheme.ts +8 -1
- package/src/themeHelpers.ts +9 -15
- package/src/themes.ts +18 -10
package/src/ThemeShowcase.tsx
CHANGED
|
@@ -26,7 +26,7 @@ export const ThemeShowcase: React.FC<ThemeShowcaseProps> = ({
|
|
|
26
26
|
theme,
|
|
27
27
|
title,
|
|
28
28
|
showValues = true,
|
|
29
|
-
sections = ['colors', 'typography', 'spacing', 'shadows', 'radii']
|
|
29
|
+
sections = ['colors', 'typography', 'spacing', 'shadows', 'radii'],
|
|
30
30
|
}) => {
|
|
31
31
|
const containerStyle: React.CSSProperties = {
|
|
32
32
|
fontFamily: theme.fonts.body,
|
|
@@ -64,11 +64,13 @@ export const ThemeShowcase: React.FC<ThemeShowcaseProps> = ({
|
|
|
64
64
|
return (
|
|
65
65
|
<div style={containerStyle}>
|
|
66
66
|
{title && (
|
|
67
|
-
<h1
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
<h1
|
|
68
|
+
style={{
|
|
69
|
+
...headingStyle,
|
|
70
|
+
fontSize: theme.fontSizes[6],
|
|
71
|
+
marginBottom: theme.space[4],
|
|
72
|
+
}}
|
|
73
|
+
>
|
|
72
74
|
{title}
|
|
73
75
|
</h1>
|
|
74
76
|
)}
|
|
@@ -79,45 +81,57 @@ export const ThemeShowcase: React.FC<ThemeShowcaseProps> = ({
|
|
|
79
81
|
|
|
80
82
|
{/* Primary Colors */}
|
|
81
83
|
<h3 style={subheadingStyle}>Primary Colors</h3>
|
|
82
|
-
<div
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
<div
|
|
85
|
+
style={{
|
|
86
|
+
display: 'grid',
|
|
87
|
+
gridTemplateColumns: 'repeat(auto-fill, minmax(200px, 1fr))',
|
|
88
|
+
gap: theme.space[3],
|
|
89
|
+
marginBottom: theme.space[3],
|
|
90
|
+
}}
|
|
91
|
+
>
|
|
92
|
+
{['text', 'background', 'primary', 'secondary', 'accent', 'muted'].map((key) => {
|
|
89
93
|
const color = theme.colors[key as keyof typeof theme.colors];
|
|
90
94
|
if (!color) return null;
|
|
91
95
|
return (
|
|
92
|
-
<div
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
width: 40,
|
|
101
|
-
height: 40,
|
|
102
|
-
backgroundColor: color,
|
|
103
|
-
border: `1px solid ${theme.colors.border}`,
|
|
96
|
+
<div
|
|
97
|
+
key={key}
|
|
98
|
+
style={{
|
|
99
|
+
display: 'flex',
|
|
100
|
+
alignItems: 'center',
|
|
101
|
+
padding: theme.space[2],
|
|
102
|
+
backgroundColor:
|
|
103
|
+
theme.colors.backgroundLight || theme.colors.backgroundTertiary,
|
|
104
104
|
borderRadius: theme.radii[1],
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
}}
|
|
106
|
+
>
|
|
107
|
+
<div
|
|
108
|
+
style={{
|
|
109
|
+
width: 40,
|
|
110
|
+
height: 40,
|
|
111
|
+
backgroundColor: color,
|
|
112
|
+
border: `1px solid ${theme.colors.border}`,
|
|
113
|
+
borderRadius: theme.radii[1],
|
|
114
|
+
marginRight: theme.space[2],
|
|
115
|
+
}}
|
|
116
|
+
/>
|
|
107
117
|
<div>
|
|
108
|
-
<div
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
118
|
+
<div
|
|
119
|
+
style={{
|
|
120
|
+
fontFamily: theme.fonts.monospace,
|
|
121
|
+
fontSize: theme.fontSizes[1],
|
|
122
|
+
fontWeight: theme.fontWeights.medium,
|
|
123
|
+
}}
|
|
124
|
+
>
|
|
113
125
|
{key}
|
|
114
126
|
</div>
|
|
115
127
|
{showValues && (
|
|
116
|
-
<div
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
128
|
+
<div
|
|
129
|
+
style={{
|
|
130
|
+
fontFamily: theme.fonts.monospace,
|
|
131
|
+
fontSize: theme.fontSizes[0],
|
|
132
|
+
color: theme.colors.textSecondary,
|
|
133
|
+
}}
|
|
134
|
+
>
|
|
121
135
|
{color}
|
|
122
136
|
</div>
|
|
123
137
|
)}
|
|
@@ -129,45 +143,57 @@ export const ThemeShowcase: React.FC<ThemeShowcaseProps> = ({
|
|
|
129
143
|
|
|
130
144
|
{/* Status Colors */}
|
|
131
145
|
<h3 style={subheadingStyle}>Status Colors</h3>
|
|
132
|
-
<div
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
146
|
+
<div
|
|
147
|
+
style={{
|
|
148
|
+
display: 'grid',
|
|
149
|
+
gridTemplateColumns: 'repeat(auto-fill, minmax(200px, 1fr))',
|
|
150
|
+
gap: theme.space[3],
|
|
151
|
+
marginBottom: theme.space[3],
|
|
152
|
+
}}
|
|
153
|
+
>
|
|
154
|
+
{['success', 'warning', 'error', 'info'].map((key) => {
|
|
139
155
|
const color = theme.colors[key as keyof typeof theme.colors];
|
|
140
156
|
if (!color) return null;
|
|
141
157
|
return (
|
|
142
|
-
<div
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
width: 40,
|
|
151
|
-
height: 40,
|
|
152
|
-
backgroundColor: color,
|
|
153
|
-
border: `1px solid ${theme.colors.border}`,
|
|
158
|
+
<div
|
|
159
|
+
key={key}
|
|
160
|
+
style={{
|
|
161
|
+
display: 'flex',
|
|
162
|
+
alignItems: 'center',
|
|
163
|
+
padding: theme.space[2],
|
|
164
|
+
backgroundColor:
|
|
165
|
+
theme.colors.backgroundLight || theme.colors.backgroundTertiary,
|
|
154
166
|
borderRadius: theme.radii[1],
|
|
155
|
-
|
|
156
|
-
|
|
167
|
+
}}
|
|
168
|
+
>
|
|
169
|
+
<div
|
|
170
|
+
style={{
|
|
171
|
+
width: 40,
|
|
172
|
+
height: 40,
|
|
173
|
+
backgroundColor: color,
|
|
174
|
+
border: `1px solid ${theme.colors.border}`,
|
|
175
|
+
borderRadius: theme.radii[1],
|
|
176
|
+
marginRight: theme.space[2],
|
|
177
|
+
}}
|
|
178
|
+
/>
|
|
157
179
|
<div>
|
|
158
|
-
<div
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
180
|
+
<div
|
|
181
|
+
style={{
|
|
182
|
+
fontFamily: theme.fonts.monospace,
|
|
183
|
+
fontSize: theme.fontSizes[1],
|
|
184
|
+
fontWeight: theme.fontWeights.medium,
|
|
185
|
+
}}
|
|
186
|
+
>
|
|
163
187
|
{key}
|
|
164
188
|
</div>
|
|
165
189
|
{showValues && (
|
|
166
|
-
<div
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
190
|
+
<div
|
|
191
|
+
style={{
|
|
192
|
+
fontFamily: theme.fonts.monospace,
|
|
193
|
+
fontSize: theme.fontSizes[0],
|
|
194
|
+
color: theme.colors.textSecondary,
|
|
195
|
+
}}
|
|
196
|
+
>
|
|
171
197
|
{color}
|
|
172
198
|
</div>
|
|
173
199
|
)}
|
|
@@ -179,35 +205,50 @@ export const ThemeShowcase: React.FC<ThemeShowcaseProps> = ({
|
|
|
179
205
|
|
|
180
206
|
{/* Background Colors */}
|
|
181
207
|
<h3 style={subheadingStyle}>Background Colors</h3>
|
|
182
|
-
<div
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
208
|
+
<div
|
|
209
|
+
style={{
|
|
210
|
+
display: 'grid',
|
|
211
|
+
gridTemplateColumns: 'repeat(auto-fill, minmax(200px, 1fr))',
|
|
212
|
+
gap: theme.space[3],
|
|
213
|
+
}}
|
|
214
|
+
>
|
|
215
|
+
{[
|
|
216
|
+
'backgroundSecondary',
|
|
217
|
+
'backgroundTertiary',
|
|
218
|
+
'backgroundLight',
|
|
219
|
+
'backgroundHover',
|
|
220
|
+
'surface',
|
|
221
|
+
].map((key) => {
|
|
188
222
|
const color = theme.colors[key as keyof typeof theme.colors];
|
|
189
223
|
if (!color) return null;
|
|
190
224
|
return (
|
|
191
|
-
<div
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
225
|
+
<div
|
|
226
|
+
key={key}
|
|
227
|
+
style={{
|
|
228
|
+
padding: theme.space[3],
|
|
229
|
+
backgroundColor: color,
|
|
230
|
+
border: `1px solid ${theme.colors.border}`,
|
|
231
|
+
borderRadius: theme.radii[1],
|
|
232
|
+
}}
|
|
233
|
+
>
|
|
234
|
+
<div
|
|
235
|
+
style={{
|
|
236
|
+
fontFamily: theme.fonts.monospace,
|
|
237
|
+
fontSize: theme.fontSizes[1],
|
|
238
|
+
fontWeight: theme.fontWeights.medium,
|
|
239
|
+
}}
|
|
240
|
+
>
|
|
202
241
|
{key}
|
|
203
242
|
</div>
|
|
204
243
|
{showValues && (
|
|
205
|
-
<div
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
244
|
+
<div
|
|
245
|
+
style={{
|
|
246
|
+
fontFamily: theme.fonts.monospace,
|
|
247
|
+
fontSize: theme.fontSizes[0],
|
|
248
|
+
color: theme.colors.textSecondary,
|
|
249
|
+
marginTop: theme.space[1],
|
|
250
|
+
}}
|
|
251
|
+
>
|
|
211
252
|
{color}
|
|
212
253
|
</div>
|
|
213
254
|
)}
|
|
@@ -225,36 +266,66 @@ export const ThemeShowcase: React.FC<ThemeShowcaseProps> = ({
|
|
|
225
266
|
{/* Font Families */}
|
|
226
267
|
<h3 style={subheadingStyle}>Font Families</h3>
|
|
227
268
|
<div style={{ marginBottom: theme.space[4] }}>
|
|
228
|
-
<div
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
269
|
+
<div
|
|
270
|
+
style={{
|
|
271
|
+
fontFamily: theme.fonts.heading,
|
|
272
|
+
fontSize: theme.fontSizes[4],
|
|
273
|
+
marginBottom: theme.space[2],
|
|
274
|
+
}}
|
|
275
|
+
>
|
|
276
|
+
Heading Font:{' '}
|
|
277
|
+
{showValues && (
|
|
278
|
+
<span
|
|
279
|
+
style={{
|
|
280
|
+
fontFamily: theme.fonts.monospace,
|
|
281
|
+
fontSize: theme.fontSizes[1],
|
|
282
|
+
color: theme.colors.textSecondary,
|
|
283
|
+
}}
|
|
284
|
+
>
|
|
285
|
+
{' '}
|
|
286
|
+
{theme.fonts.heading}
|
|
287
|
+
</span>
|
|
288
|
+
)}
|
|
238
289
|
</div>
|
|
239
|
-
<div
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
290
|
+
<div
|
|
291
|
+
style={{
|
|
292
|
+
fontFamily: theme.fonts.body,
|
|
293
|
+
fontSize: theme.fontSizes[2],
|
|
294
|
+
marginBottom: theme.space[2],
|
|
295
|
+
}}
|
|
296
|
+
>
|
|
297
|
+
Body Font:{' '}
|
|
298
|
+
{showValues && (
|
|
299
|
+
<span
|
|
300
|
+
style={{
|
|
301
|
+
fontFamily: theme.fonts.monospace,
|
|
302
|
+
fontSize: theme.fontSizes[1],
|
|
303
|
+
color: theme.colors.textSecondary,
|
|
304
|
+
}}
|
|
305
|
+
>
|
|
306
|
+
{' '}
|
|
307
|
+
{theme.fonts.body}
|
|
308
|
+
</span>
|
|
309
|
+
)}
|
|
249
310
|
</div>
|
|
250
|
-
<div
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
311
|
+
<div
|
|
312
|
+
style={{
|
|
313
|
+
fontFamily: theme.fonts.monospace,
|
|
314
|
+
fontSize: theme.fontSizes[2],
|
|
315
|
+
}}
|
|
316
|
+
>
|
|
317
|
+
Monospace Font:{' '}
|
|
318
|
+
{showValues && (
|
|
319
|
+
<span
|
|
320
|
+
style={{
|
|
321
|
+
fontSize: theme.fontSizes[1],
|
|
322
|
+
color: theme.colors.textSecondary,
|
|
323
|
+
}}
|
|
324
|
+
>
|
|
325
|
+
{' '}
|
|
326
|
+
{theme.fonts.monospace}
|
|
327
|
+
</span>
|
|
328
|
+
)}
|
|
258
329
|
</div>
|
|
259
330
|
</div>
|
|
260
331
|
|
|
@@ -262,11 +333,14 @@ export const ThemeShowcase: React.FC<ThemeShowcaseProps> = ({
|
|
|
262
333
|
<h3 style={subheadingStyle}>Font Sizes</h3>
|
|
263
334
|
<div style={{ marginBottom: theme.space[4] }}>
|
|
264
335
|
{theme.fontSizes.map((size, index) => (
|
|
265
|
-
<div
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
336
|
+
<div
|
|
337
|
+
key={index}
|
|
338
|
+
style={{
|
|
339
|
+
fontSize: size,
|
|
340
|
+
lineHeight: theme.lineHeights.body,
|
|
341
|
+
marginBottom: theme.space[1],
|
|
342
|
+
}}
|
|
343
|
+
>
|
|
270
344
|
Size {index}: Sample Text {showValues && `(${size}px)`}
|
|
271
345
|
</div>
|
|
272
346
|
))}
|
|
@@ -274,16 +348,21 @@ export const ThemeShowcase: React.FC<ThemeShowcaseProps> = ({
|
|
|
274
348
|
|
|
275
349
|
{/* Font Weights */}
|
|
276
350
|
<h3 style={subheadingStyle}>Font Weights</h3>
|
|
277
|
-
<div
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
351
|
+
<div
|
|
352
|
+
style={{
|
|
353
|
+
display: 'grid',
|
|
354
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(150px, 1fr))',
|
|
355
|
+
gap: theme.space[2],
|
|
356
|
+
}}
|
|
357
|
+
>
|
|
282
358
|
{Object.entries(theme.fontWeights).map(([name, weight]) => (
|
|
283
|
-
<div
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
359
|
+
<div
|
|
360
|
+
key={name}
|
|
361
|
+
style={{
|
|
362
|
+
fontWeight: weight,
|
|
363
|
+
fontSize: theme.fontSizes[2],
|
|
364
|
+
}}
|
|
365
|
+
>
|
|
287
366
|
{name} {showValues && `(${weight})`}
|
|
288
367
|
</div>
|
|
289
368
|
))}
|
|
@@ -297,27 +376,33 @@ export const ThemeShowcase: React.FC<ThemeShowcaseProps> = ({
|
|
|
297
376
|
<div style={{ display: 'flex', flexDirection: 'column', gap: theme.space[2] }}>
|
|
298
377
|
{theme.space.map((space, index) => (
|
|
299
378
|
<div key={index} style={{ display: 'flex', alignItems: 'center' }}>
|
|
300
|
-
<div
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
fontSize: theme.fontSizes[1],
|
|
304
|
-
color: theme.colors.textSecondary,
|
|
305
|
-
}}>
|
|
306
|
-
[{index}]
|
|
307
|
-
</div>
|
|
308
|
-
<div style={{
|
|
309
|
-
height: 24,
|
|
310
|
-
width: space,
|
|
311
|
-
backgroundColor: theme.colors.primary,
|
|
312
|
-
borderRadius: theme.radii[1],
|
|
313
|
-
}} />
|
|
314
|
-
{showValues && (
|
|
315
|
-
<div style={{
|
|
316
|
-
marginLeft: theme.space[2],
|
|
379
|
+
<div
|
|
380
|
+
style={{
|
|
381
|
+
width: 60,
|
|
317
382
|
fontFamily: theme.fonts.monospace,
|
|
318
383
|
fontSize: theme.fontSizes[1],
|
|
319
384
|
color: theme.colors.textSecondary,
|
|
320
|
-
}}
|
|
385
|
+
}}
|
|
386
|
+
>
|
|
387
|
+
[{index}]
|
|
388
|
+
</div>
|
|
389
|
+
<div
|
|
390
|
+
style={{
|
|
391
|
+
height: 24,
|
|
392
|
+
width: space,
|
|
393
|
+
backgroundColor: theme.colors.primary,
|
|
394
|
+
borderRadius: theme.radii[1],
|
|
395
|
+
}}
|
|
396
|
+
/>
|
|
397
|
+
{showValues && (
|
|
398
|
+
<div
|
|
399
|
+
style={{
|
|
400
|
+
marginLeft: theme.space[2],
|
|
401
|
+
fontFamily: theme.fonts.monospace,
|
|
402
|
+
fontSize: theme.fontSizes[1],
|
|
403
|
+
color: theme.colors.textSecondary,
|
|
404
|
+
}}
|
|
405
|
+
>
|
|
321
406
|
{space}px
|
|
322
407
|
</div>
|
|
323
408
|
)}
|
|
@@ -330,26 +415,32 @@ export const ThemeShowcase: React.FC<ThemeShowcaseProps> = ({
|
|
|
330
415
|
{sections.includes('radii') && (
|
|
331
416
|
<div style={sectionStyle}>
|
|
332
417
|
<h2 style={headingStyle}>Border Radii</h2>
|
|
333
|
-
<div
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
418
|
+
<div
|
|
419
|
+
style={{
|
|
420
|
+
display: 'grid',
|
|
421
|
+
gridTemplateColumns: 'repeat(auto-fill, minmax(100px, 1fr))',
|
|
422
|
+
gap: theme.space[3],
|
|
423
|
+
}}
|
|
424
|
+
>
|
|
338
425
|
{theme.radii.map((radius, index) => (
|
|
339
426
|
<div key={index} style={{ textAlign: 'center' }}>
|
|
340
|
-
<div
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
427
|
+
<div
|
|
428
|
+
style={{
|
|
429
|
+
width: 80,
|
|
430
|
+
height: 80,
|
|
431
|
+
backgroundColor: theme.colors.primary,
|
|
432
|
+
borderRadius: radius,
|
|
433
|
+
marginBottom: theme.space[1],
|
|
434
|
+
margin: '0 auto',
|
|
435
|
+
}}
|
|
436
|
+
/>
|
|
437
|
+
<div
|
|
438
|
+
style={{
|
|
439
|
+
fontFamily: theme.fonts.monospace,
|
|
440
|
+
fontSize: theme.fontSizes[0],
|
|
441
|
+
color: theme.colors.textSecondary,
|
|
442
|
+
}}
|
|
443
|
+
>
|
|
353
444
|
[{index}] {showValues && `${radius}px`}
|
|
354
445
|
</div>
|
|
355
446
|
</div>
|
|
@@ -361,37 +452,45 @@ export const ThemeShowcase: React.FC<ThemeShowcaseProps> = ({
|
|
|
361
452
|
{sections.includes('shadows') && (
|
|
362
453
|
<div style={sectionStyle}>
|
|
363
454
|
<h2 style={headingStyle}>Shadows</h2>
|
|
364
|
-
<div
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
455
|
+
<div
|
|
456
|
+
style={{
|
|
457
|
+
display: 'grid',
|
|
458
|
+
gridTemplateColumns: 'repeat(auto-fill, minmax(150px, 1fr))',
|
|
459
|
+
gap: theme.space[4],
|
|
460
|
+
}}
|
|
461
|
+
>
|
|
369
462
|
{theme.shadows.map((shadow, index) => (
|
|
370
463
|
<div key={index} style={{ textAlign: 'center' }}>
|
|
371
|
-
<div
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
464
|
+
<div
|
|
465
|
+
style={{
|
|
466
|
+
width: 100,
|
|
467
|
+
height: 100,
|
|
468
|
+
backgroundColor: theme.colors.background,
|
|
469
|
+
boxShadow: shadow,
|
|
470
|
+
borderRadius: theme.radii[2],
|
|
471
|
+
margin: '0 auto',
|
|
472
|
+
marginBottom: theme.space[2],
|
|
473
|
+
border: `1px solid ${theme.colors.border}`,
|
|
474
|
+
}}
|
|
475
|
+
/>
|
|
476
|
+
<div
|
|
477
|
+
style={{
|
|
478
|
+
fontFamily: theme.fonts.monospace,
|
|
479
|
+
fontSize: theme.fontSizes[0],
|
|
480
|
+
color: theme.colors.textSecondary,
|
|
481
|
+
}}
|
|
482
|
+
>
|
|
386
483
|
Shadow [{index}]
|
|
387
484
|
</div>
|
|
388
485
|
{showValues && (
|
|
389
|
-
<div
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
486
|
+
<div
|
|
487
|
+
style={{
|
|
488
|
+
fontFamily: theme.fonts.monospace,
|
|
489
|
+
fontSize: theme.fontSizes[0],
|
|
490
|
+
color: theme.colors.textMuted,
|
|
491
|
+
marginTop: theme.space[1],
|
|
492
|
+
}}
|
|
493
|
+
>
|
|
395
494
|
{shadow === 'none' ? 'none' : '...'}
|
|
396
495
|
</div>
|
|
397
496
|
)}
|
|
@@ -405,30 +504,37 @@ export const ThemeShowcase: React.FC<ThemeShowcaseProps> = ({
|
|
|
405
504
|
{theme.modes && Object.keys(theme.modes).length > 0 && (
|
|
406
505
|
<div style={sectionStyle}>
|
|
407
506
|
<h2 style={headingStyle}>Available Modes</h2>
|
|
408
|
-
<div
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
borderRadius: theme.radii[2],
|
|
418
|
-
fontFamily: theme.fonts.body,
|
|
419
|
-
fontSize: theme.fontSizes[1],
|
|
420
|
-
}}>
|
|
421
|
-
default
|
|
422
|
-
</div>
|
|
423
|
-
{Object.keys(theme.modes).map(modeName => (
|
|
424
|
-
<div key={modeName} style={{
|
|
507
|
+
<div
|
|
508
|
+
style={{
|
|
509
|
+
display: 'flex',
|
|
510
|
+
gap: theme.space[2],
|
|
511
|
+
flexWrap: 'wrap',
|
|
512
|
+
}}
|
|
513
|
+
>
|
|
514
|
+
<div
|
|
515
|
+
style={{
|
|
425
516
|
padding: `${theme.space[2]}px ${theme.space[3]}px`,
|
|
426
|
-
backgroundColor: theme.colors.
|
|
427
|
-
color:
|
|
517
|
+
backgroundColor: theme.colors.primary,
|
|
518
|
+
color: '#ffffff',
|
|
428
519
|
borderRadius: theme.radii[2],
|
|
429
520
|
fontFamily: theme.fonts.body,
|
|
430
521
|
fontSize: theme.fontSizes[1],
|
|
431
|
-
}}
|
|
522
|
+
}}
|
|
523
|
+
>
|
|
524
|
+
default
|
|
525
|
+
</div>
|
|
526
|
+
{Object.keys(theme.modes).map((modeName) => (
|
|
527
|
+
<div
|
|
528
|
+
key={modeName}
|
|
529
|
+
style={{
|
|
530
|
+
padding: `${theme.space[2]}px ${theme.space[3]}px`,
|
|
531
|
+
backgroundColor: theme.colors.secondary,
|
|
532
|
+
color: theme.colors.text,
|
|
533
|
+
borderRadius: theme.radii[2],
|
|
534
|
+
fontFamily: theme.fonts.body,
|
|
535
|
+
fontSize: theme.fontSizes[1],
|
|
536
|
+
}}
|
|
537
|
+
>
|
|
432
538
|
{modeName}
|
|
433
539
|
</div>
|
|
434
540
|
))}
|
|
@@ -439,4 +545,4 @@ export const ThemeShowcase: React.FC<ThemeShowcaseProps> = ({
|
|
|
439
545
|
);
|
|
440
546
|
};
|
|
441
547
|
|
|
442
|
-
export default ThemeShowcase;
|
|
548
|
+
export default ThemeShowcase;
|