@temboplus/frontend-react-core 0.1.3-beta.12 → 0.1.3-beta.14
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/alerts/index.cjs.js +1 -1
- package/dist/alerts/index.cjs.js.map +1 -1
- package/dist/alerts/index.js +1 -1
- package/dist/alerts/index.js.map +1 -1
- package/dist/dialogs/index.cjs.js +3 -3
- package/dist/dialogs/index.cjs.js.map +1 -1
- package/dist/dialogs/index.js +3 -3
- package/dist/dialogs/index.js.map +1 -1
- package/dist/features/alerts/alert.js +18 -18
- package/dist/features/dialogs/tembo-confirm.js +11 -11
- package/dist/features/notifications/tembo-notify.d.ts +3 -2
- package/dist/features/notifications/toast-config.d.ts +4 -3
- package/dist/features/notifications/toast-config.js +7 -7
- package/dist/features/notifications/toast-container.js +2 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/notifications/index.cjs.js +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/tembo-notify-8__PpMV9.js +3 -0
- package/dist/tembo-notify-8__PpMV9.js.map +1 -0
- package/dist/tembo-notify-DrVkWFXZ.js +3 -0
- package/dist/tembo-notify-DrVkWFXZ.js.map +1 -0
- package/dist/theme/index.cjs.js +1 -1
- package/dist/theme/index.js +1 -1
- package/dist/theme/theme-config.d.ts +3 -2
- package/dist/theme/theme-config.js +168 -214
- package/dist/theme/theme-provider.d.ts +23 -11
- package/dist/theme/theme-provider.js +25 -14
- package/dist/theme/tokens/{color.d.ts → colors.d.ts} +32 -17
- package/dist/theme/tokens/{color.js → colors.js} +65 -46
- package/dist/theme/tokens/constants.d.ts +126 -0
- package/dist/theme/tokens/constants.js +126 -0
- package/dist/theme-provider-BP-1aQ22.js +11 -0
- package/dist/theme-provider-BP-1aQ22.js.map +1 -0
- package/dist/theme-provider-Ck6qg6WJ.js +2 -0
- package/dist/theme-provider-Ck6qg6WJ.js.map +1 -0
- package/dist/theme-provider-Cpt7os8V.js +2 -0
- package/dist/theme-provider-Cpt7os8V.js.map +1 -0
- package/dist/theme-provider-CvaUdBY_.js +11 -0
- package/dist/theme-provider-CvaUdBY_.js.map +1 -0
- package/package.json +1 -1
- package/dist/tembo-notify-BUN8_mKb.js +0 -3
- package/dist/tembo-notify-BUN8_mKb.js.map +0 -1
- package/dist/tembo-notify-D0uYvwZP.js +0 -3
- package/dist/tembo-notify-D0uYvwZP.js.map +0 -1
- package/dist/theme/tokens/radius.d.ts +0 -26
- package/dist/theme/tokens/radius.js +0 -17
- package/dist/theme/tokens/shadow.d.ts +0 -27
- package/dist/theme/tokens/shadow.js +0 -23
- package/dist/theme/tokens/spacing.d.ts +0 -47
- package/dist/theme/tokens/spacing.js +0 -32
- package/dist/theme/tokens/typography.d.ts +0 -43
- package/dist/theme/tokens/typography.js +0 -33
- package/dist/theme-provider-BsQRkig_.js +0 -11
- package/dist/theme-provider-BsQRkig_.js.map +0 -1
- package/dist/theme-provider-C44BTeC4.js +0 -11
- package/dist/theme-provider-C44BTeC4.js.map +0 -1
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import { spacing, componentSpacing } from './tokens/spacing.js';
|
|
2
|
-
import { typography } from './tokens/typography.js';
|
|
3
|
-
import { radius, componentRadius } from './tokens/radius.js';
|
|
4
|
-
import { buildDarkModeShadows, componentShadows, shadows } from './tokens/shadow.js';
|
|
5
1
|
/**
|
|
6
2
|
* Build comprehensive Ant Design theme from Tembo tokens
|
|
7
3
|
*/
|
|
8
|
-
export const buildAntDTheme = (colors) => {
|
|
4
|
+
export const buildAntDTheme = (colors, constants) => {
|
|
9
5
|
const isDark = colors.mode === 'dark';
|
|
10
|
-
const componentShadow = isDark ? buildDarkModeShadows() : componentShadows;
|
|
11
6
|
return {
|
|
12
7
|
token: {
|
|
13
8
|
// ============================================
|
|
@@ -94,40 +89,40 @@ export const buildAntDTheme = (colors) => {
|
|
|
94
89
|
// ============================================
|
|
95
90
|
// TYPOGRAPHY
|
|
96
91
|
// ============================================
|
|
97
|
-
fontFamily: typography.fontFamily.base,
|
|
98
|
-
fontFamilyCode: typography.fontFamily.mono,
|
|
99
|
-
fontSize: typography.fontSize.base,
|
|
100
|
-
fontSizeHeading1: typography.fontSize['5xl'],
|
|
101
|
-
fontSizeHeading2: typography.fontSize['4xl'],
|
|
102
|
-
fontSizeHeading3: typography.fontSize['3xl'],
|
|
103
|
-
fontSizeHeading4: typography.fontSize['2xl'],
|
|
104
|
-
fontSizeHeading5: typography.fontSize.xl,
|
|
105
|
-
fontSizeSM: typography.fontSize.sm,
|
|
106
|
-
fontSizeLG: typography.fontSize.lg,
|
|
107
|
-
fontSizeXL: typography.fontSize.xl,
|
|
108
|
-
fontWeightStrong: typography.fontWeight.semibold,
|
|
109
|
-
lineHeight: typography.lineHeight.base,
|
|
110
|
-
lineHeightHeading1: typography.lineHeight.tight,
|
|
111
|
-
lineHeightHeading2: typography.lineHeight.tight,
|
|
112
|
-
lineHeightHeading3: typography.lineHeight.tight,
|
|
113
|
-
lineHeightHeading4: typography.lineHeight.tight,
|
|
114
|
-
lineHeightHeading5: typography.lineHeight.tight,
|
|
115
|
-
lineHeightLG: typography.lineHeight.relaxed,
|
|
116
|
-
lineHeightSM: typography.lineHeight.base,
|
|
92
|
+
fontFamily: constants.typography.fontFamily.base,
|
|
93
|
+
fontFamilyCode: constants.typography.fontFamily.mono,
|
|
94
|
+
fontSize: constants.typography.fontSize.base,
|
|
95
|
+
fontSizeHeading1: constants.typography.fontSize['5xl'],
|
|
96
|
+
fontSizeHeading2: constants.typography.fontSize['4xl'],
|
|
97
|
+
fontSizeHeading3: constants.typography.fontSize['3xl'],
|
|
98
|
+
fontSizeHeading4: constants.typography.fontSize['2xl'],
|
|
99
|
+
fontSizeHeading5: constants.typography.fontSize.xl,
|
|
100
|
+
fontSizeSM: constants.typography.fontSize.sm,
|
|
101
|
+
fontSizeLG: constants.typography.fontSize.lg,
|
|
102
|
+
fontSizeXL: constants.typography.fontSize.xl,
|
|
103
|
+
fontWeightStrong: constants.typography.fontWeight.semibold,
|
|
104
|
+
lineHeight: constants.typography.lineHeight.base,
|
|
105
|
+
lineHeightHeading1: constants.typography.lineHeight.tight,
|
|
106
|
+
lineHeightHeading2: constants.typography.lineHeight.tight,
|
|
107
|
+
lineHeightHeading3: constants.typography.lineHeight.tight,
|
|
108
|
+
lineHeightHeading4: constants.typography.lineHeight.tight,
|
|
109
|
+
lineHeightHeading5: constants.typography.lineHeight.tight,
|
|
110
|
+
lineHeightLG: constants.typography.lineHeight.relaxed,
|
|
111
|
+
lineHeightSM: constants.typography.lineHeight.base,
|
|
117
112
|
// ============================================
|
|
118
113
|
// SPACING & SIZING
|
|
119
114
|
// ============================================
|
|
120
|
-
padding: spacing[4],
|
|
121
|
-
paddingXS: spacing[2],
|
|
122
|
-
paddingSM: spacing[3],
|
|
123
|
-
paddingLG: spacing[5],
|
|
124
|
-
paddingXL: spacing[6],
|
|
125
|
-
margin: spacing[4],
|
|
126
|
-
marginXS: spacing[2],
|
|
127
|
-
marginSM: spacing[3],
|
|
128
|
-
marginLG: spacing[5],
|
|
129
|
-
marginXL: spacing[6],
|
|
130
|
-
marginXXL: spacing[8],
|
|
115
|
+
padding: constants.spacing[4],
|
|
116
|
+
paddingXS: constants.spacing[2],
|
|
117
|
+
paddingSM: constants.spacing[3],
|
|
118
|
+
paddingLG: constants.spacing[5],
|
|
119
|
+
paddingXL: constants.spacing[6],
|
|
120
|
+
margin: constants.spacing[4],
|
|
121
|
+
marginXS: constants.spacing[2],
|
|
122
|
+
marginSM: constants.spacing[3],
|
|
123
|
+
marginLG: constants.spacing[5],
|
|
124
|
+
marginXL: constants.spacing[6],
|
|
125
|
+
marginXXL: constants.spacing[8],
|
|
131
126
|
controlHeight: 40,
|
|
132
127
|
controlHeightLG: 48,
|
|
133
128
|
controlHeightSM: 32,
|
|
@@ -135,16 +130,16 @@ export const buildAntDTheme = (colors) => {
|
|
|
135
130
|
// ============================================
|
|
136
131
|
// BORDER RADIUS
|
|
137
132
|
// ============================================
|
|
138
|
-
borderRadius: radius.base,
|
|
139
|
-
borderRadiusLG: radius.md,
|
|
140
|
-
borderRadiusSM: radius.sm,
|
|
141
|
-
borderRadiusXS: radius.sm,
|
|
133
|
+
borderRadius: constants.radius.base,
|
|
134
|
+
borderRadiusLG: constants.radius.md,
|
|
135
|
+
borderRadiusSM: constants.radius.sm,
|
|
136
|
+
borderRadiusXS: constants.radius.sm,
|
|
142
137
|
// ============================================
|
|
143
138
|
// SHADOWS
|
|
144
139
|
// ============================================
|
|
145
|
-
boxShadow:
|
|
146
|
-
boxShadowSecondary:
|
|
147
|
-
boxShadowTertiary:
|
|
140
|
+
boxShadow: constants.shadow.none,
|
|
141
|
+
boxShadowSecondary: constants.shadow.none,
|
|
142
|
+
boxShadowTertiary: constants.shadow.card,
|
|
148
143
|
// ============================================
|
|
149
144
|
// MOTION
|
|
150
145
|
// ============================================
|
|
@@ -196,18 +191,14 @@ export const buildAntDTheme = (colors) => {
|
|
|
196
191
|
colorErrorHover: colors.semantic.error.main,
|
|
197
192
|
colorErrorActive: colors.semantic.error.main,
|
|
198
193
|
dangerShadow: 'none',
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
controlHeightLG: 48,
|
|
202
|
-
controlHeightSM: 32,
|
|
203
|
-
paddingContentHorizontal: spacing[4],
|
|
204
|
-
paddingContentVertical: spacing[2],
|
|
194
|
+
paddingContentHorizontal: constants.spacing[4],
|
|
195
|
+
paddingContentVertical: constants.spacing[2],
|
|
205
196
|
// Styling
|
|
206
|
-
borderRadius:
|
|
207
|
-
borderRadiusLG:
|
|
208
|
-
borderRadiusSM:
|
|
209
|
-
fontWeight: typography.fontWeight.medium,
|
|
210
|
-
fontSize: typography.fontSize.base,
|
|
197
|
+
borderRadius: constants.radius.button,
|
|
198
|
+
borderRadiusLG: constants.radius.button,
|
|
199
|
+
borderRadiusSM: constants.radius.button,
|
|
200
|
+
fontWeight: constants.typography.fontWeight.medium,
|
|
201
|
+
fontSize: constants.typography.fontSize.base,
|
|
211
202
|
},
|
|
212
203
|
// ========================================
|
|
213
204
|
// INPUT & FORM CONTROLS
|
|
@@ -224,15 +215,12 @@ export const buildAntDTheme = (colors) => {
|
|
|
224
215
|
activeShadow: `0 0 0 2px ${colors.semantic.info.subtle}`,
|
|
225
216
|
errorActiveShadow: `0 0 0 2px ${colors.semantic.error.subtle}`,
|
|
226
217
|
warningActiveShadow: `0 0 0 2px ${colors.semantic.warning.subtle}`,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
borderRadius: componentRadius.input,
|
|
234
|
-
borderRadiusLG: componentRadius.input,
|
|
235
|
-
borderRadiusSM: componentRadius.input,
|
|
218
|
+
paddingBlock: constants.spacing[2],
|
|
219
|
+
paddingInline: constants.spacing[3],
|
|
220
|
+
paddingInlineLG: constants.spacing[4],
|
|
221
|
+
borderRadius: constants.radius.input,
|
|
222
|
+
borderRadiusLG: constants.radius.input,
|
|
223
|
+
borderRadiusSM: constants.radius.input,
|
|
236
224
|
},
|
|
237
225
|
InputNumber: {
|
|
238
226
|
colorBgContainer: colors.surface.card,
|
|
@@ -242,8 +230,7 @@ export const buildAntDTheme = (colors) => {
|
|
|
242
230
|
colorIcon: colors.text.tertiary,
|
|
243
231
|
colorIconHover: colors.text.secondary,
|
|
244
232
|
activeShadow: `0 0 0 2px ${colors.semantic.info.subtle}`,
|
|
245
|
-
|
|
246
|
-
borderRadius: componentRadius.input,
|
|
233
|
+
borderRadius: constants.radius.input,
|
|
247
234
|
handleVisible: true,
|
|
248
235
|
},
|
|
249
236
|
Select: {
|
|
@@ -260,13 +247,10 @@ export const buildAntDTheme = (colors) => {
|
|
|
260
247
|
optionSelectedBg: colors.surface.selected,
|
|
261
248
|
optionSelectedColor: colors.text.primary,
|
|
262
249
|
optionActiveBg: colors.surface.interactive,
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
borderRadiusLG: componentRadius.input,
|
|
268
|
-
borderRadiusSM: componentRadius.input,
|
|
269
|
-
boxShadowSecondary: componentShadow.dropdown,
|
|
250
|
+
borderRadius: constants.radius.input,
|
|
251
|
+
borderRadiusLG: constants.radius.input,
|
|
252
|
+
borderRadiusSM: constants.radius.input,
|
|
253
|
+
boxShadowSecondary: constants.shadow.popover,
|
|
270
254
|
},
|
|
271
255
|
DatePicker: {
|
|
272
256
|
colorBgContainer: colors.surface.card,
|
|
@@ -279,8 +263,7 @@ export const buildAntDTheme = (colors) => {
|
|
|
279
263
|
cellHoverBg: colors.surface.interactive,
|
|
280
264
|
cellActiveWithRangeBg: colors.semantic.info.subtle,
|
|
281
265
|
colorPrimary: colors.link.default,
|
|
282
|
-
|
|
283
|
-
borderRadius: componentRadius.input,
|
|
266
|
+
borderRadius: constants.radius.input,
|
|
284
267
|
},
|
|
285
268
|
Checkbox: {
|
|
286
269
|
colorPrimary: colors.link.default,
|
|
@@ -289,7 +272,7 @@ export const buildAntDTheme = (colors) => {
|
|
|
289
272
|
colorBgContainer: colors.surface.card,
|
|
290
273
|
colorIcon: colors.text.tertiary,
|
|
291
274
|
colorIconHover: colors.text.secondary,
|
|
292
|
-
borderRadiusSM: radius.sm,
|
|
275
|
+
borderRadiusSM: constants.radius.sm,
|
|
293
276
|
},
|
|
294
277
|
Radio: {
|
|
295
278
|
colorPrimary: colors.link.default,
|
|
@@ -298,7 +281,6 @@ export const buildAntDTheme = (colors) => {
|
|
|
298
281
|
colorBgContainer: colors.surface.card,
|
|
299
282
|
colorIcon: colors.text.tertiary,
|
|
300
283
|
colorIconHover: colors.text.secondary,
|
|
301
|
-
dotSize: 8,
|
|
302
284
|
},
|
|
303
285
|
Switch: {
|
|
304
286
|
colorPrimary: colors.link.default,
|
|
@@ -307,7 +289,6 @@ export const buildAntDTheme = (colors) => {
|
|
|
307
289
|
colorTextTertiary: colors.text.tertiary,
|
|
308
290
|
colorIcon: colors.text.tertiary,
|
|
309
291
|
colorIconHover: colors.text.secondary,
|
|
310
|
-
handleSize: 18,
|
|
311
292
|
},
|
|
312
293
|
Slider: {
|
|
313
294
|
colorPrimary: colors.link.default,
|
|
@@ -326,12 +307,11 @@ export const buildAntDTheme = (colors) => {
|
|
|
326
307
|
},
|
|
327
308
|
Form: {
|
|
328
309
|
labelColor: colors.text.primary,
|
|
329
|
-
labelFontSize: typography.fontSize.base,
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
verticalLabelPadding: `0 0 ${componentSpacing.form.labelGap}px`,
|
|
310
|
+
labelFontSize: constants.typography.fontSize.base,
|
|
311
|
+
labelColonMarginInlineEnd: constants.spacing[2],
|
|
312
|
+
labelColonMarginInlineStart: constants.spacing[1],
|
|
313
|
+
itemMarginBottom: constants.spacing[4],
|
|
314
|
+
verticalLabelPadding: `0 0 ${constants.spacing[2]}px`,
|
|
335
315
|
labelRequiredMarkColor: colors.semantic.error.main,
|
|
336
316
|
colorIcon: colors.text.tertiary,
|
|
337
317
|
colorIconHover: colors.text.secondary,
|
|
@@ -353,13 +333,13 @@ export const buildAntDTheme = (colors) => {
|
|
|
353
333
|
rowSelectedBg: colors.surface.selected,
|
|
354
334
|
rowSelectedHoverBg: colors.surface.selected,
|
|
355
335
|
rowExpandedBg: colors.surface.nested,
|
|
356
|
-
cellPaddingBlock: spacing[4],
|
|
357
|
-
cellPaddingInline: spacing[4],
|
|
358
|
-
cellPaddingBlockSM: spacing[2],
|
|
359
|
-
cellPaddingInlineSM: spacing[3],
|
|
360
|
-
borderRadius:
|
|
361
|
-
borderRadiusLG:
|
|
362
|
-
headerBorderRadius:
|
|
336
|
+
cellPaddingBlock: constants.spacing[4],
|
|
337
|
+
cellPaddingInline: constants.spacing[4],
|
|
338
|
+
cellPaddingBlockSM: constants.spacing[2],
|
|
339
|
+
cellPaddingInlineSM: constants.spacing[3],
|
|
340
|
+
borderRadius: constants.radius.card,
|
|
341
|
+
borderRadiusLG: constants.radius.card,
|
|
342
|
+
headerBorderRadius: constants.radius.card,
|
|
363
343
|
footerBg: colors.surface.page,
|
|
364
344
|
},
|
|
365
345
|
Descriptions: {
|
|
@@ -367,42 +347,40 @@ export const buildAntDTheme = (colors) => {
|
|
|
367
347
|
titleColor: colors.text.primary,
|
|
368
348
|
contentColor: colors.text.primary,
|
|
369
349
|
extraColor: colors.text.secondary,
|
|
370
|
-
itemPaddingBottom: spacing[4],
|
|
371
|
-
colonMarginLeft: spacing[1],
|
|
372
|
-
colonMarginRight: spacing[2],
|
|
350
|
+
itemPaddingBottom: constants.spacing[4],
|
|
351
|
+
colonMarginLeft: constants.spacing[1],
|
|
352
|
+
colonMarginRight: constants.spacing[2],
|
|
373
353
|
},
|
|
374
354
|
Card: {
|
|
375
355
|
colorBgContainer: colors.surface.card,
|
|
376
356
|
colorBorderSecondary: colors.border.default,
|
|
377
357
|
colorTextHeading: colors.text.primary,
|
|
378
358
|
colorTextDescription: colors.text.secondary,
|
|
379
|
-
boxShadowTertiary:
|
|
380
|
-
borderRadius:
|
|
381
|
-
borderRadiusLG:
|
|
382
|
-
|
|
383
|
-
|
|
359
|
+
boxShadowTertiary: constants.shadow.card,
|
|
360
|
+
borderRadius: constants.radius.card,
|
|
361
|
+
borderRadiusLG: constants.radius.card,
|
|
362
|
+
padding: constants.spacing[4],
|
|
363
|
+
paddingLG: constants.spacing[6],
|
|
384
364
|
},
|
|
385
365
|
Statistic: {
|
|
386
|
-
titleFontSize: typography.fontSize.base,
|
|
387
|
-
contentFontSize: typography.fontSize['4xl'],
|
|
366
|
+
titleFontSize: constants.typography.fontSize.base,
|
|
367
|
+
contentFontSize: constants.typography.fontSize['4xl'],
|
|
388
368
|
colorTextHeading: colors.text.primary,
|
|
389
369
|
colorTextDescription: colors.text.secondary,
|
|
390
370
|
},
|
|
391
371
|
Timeline: {
|
|
392
372
|
tailColor: colors.border.default,
|
|
393
|
-
tailWidth: 2,
|
|
394
373
|
dotBg: colors.surface.card,
|
|
395
|
-
|
|
396
|
-
itemPaddingBottom: spacing[5],
|
|
374
|
+
itemPaddingBottom: constants.spacing[5],
|
|
397
375
|
},
|
|
398
376
|
Tag: {
|
|
399
377
|
defaultBg: colors.neutral[2],
|
|
400
378
|
defaultColor: colors.text.primary,
|
|
401
379
|
colorBorder: colors.border.default,
|
|
402
380
|
colorText: colors.text.primary,
|
|
403
|
-
borderRadiusSM:
|
|
404
|
-
fontSize: typography.fontSize.sm,
|
|
405
|
-
fontSizeSM: typography.fontSize.xs,
|
|
381
|
+
borderRadiusSM: constants.radius.sm,
|
|
382
|
+
fontSize: constants.typography.fontSize.sm,
|
|
383
|
+
fontSizeSM: constants.typography.fontSize.xs,
|
|
406
384
|
},
|
|
407
385
|
Badge: {
|
|
408
386
|
colorBorderBg: colors.surface.card,
|
|
@@ -410,21 +388,15 @@ export const buildAntDTheme = (colors) => {
|
|
|
410
388
|
colorSuccess: colors.semantic.success.main,
|
|
411
389
|
colorInfo: colors.semantic.info.main,
|
|
412
390
|
colorWarning: colors.semantic.warning.main,
|
|
413
|
-
textFontSize: typography.fontSize.xs,
|
|
414
|
-
textFontSizeSM: 10,
|
|
415
|
-
indicatorHeight: 6,
|
|
416
|
-
indicatorHeightSM: 6,
|
|
391
|
+
textFontSize: constants.typography.fontSize.xs,
|
|
417
392
|
},
|
|
418
393
|
Avatar: {
|
|
419
394
|
colorBgContainer: colors.neutral[2],
|
|
420
395
|
colorText: colors.text.secondary,
|
|
421
396
|
colorTextLightSolid: colors.text.inverse,
|
|
422
|
-
|
|
423
|
-
containerSizeLG: 40,
|
|
424
|
-
containerSizeSM: 24,
|
|
425
|
-
borderRadius: componentRadius.avatar,
|
|
397
|
+
borderRadius: constants.radius.avatar,
|
|
426
398
|
groupOverlapping: -8,
|
|
427
|
-
groupSpace: spacing[1],
|
|
399
|
+
groupSpace: constants.spacing[1],
|
|
428
400
|
},
|
|
429
401
|
Calendar: {
|
|
430
402
|
colorBgContainer: colors.surface.card,
|
|
@@ -432,28 +404,24 @@ export const buildAntDTheme = (colors) => {
|
|
|
432
404
|
fullBg: colors.surface.card,
|
|
433
405
|
fullPanelBg: colors.surface.card,
|
|
434
406
|
itemActiveBg: colors.semantic.info.subtle,
|
|
435
|
-
borderRadius:
|
|
407
|
+
borderRadius: constants.radius.card,
|
|
436
408
|
},
|
|
437
409
|
Collapse: {
|
|
438
410
|
colorBgContainer: colors.surface.card,
|
|
439
411
|
colorBorder: colors.border.default,
|
|
440
412
|
headerBg: colors.surface.page,
|
|
441
|
-
headerPadding: `${spacing[3]}px ${spacing[4]}px`,
|
|
442
|
-
contentPadding: `${spacing[4]}px ${spacing[4]}px`,
|
|
443
|
-
borderRadiusLG:
|
|
413
|
+
headerPadding: `${constants.spacing[3]}px ${constants.spacing[4]}px`,
|
|
414
|
+
contentPadding: `${constants.spacing[4]}px ${constants.spacing[4]}px`,
|
|
415
|
+
borderRadiusLG: constants.radius.card,
|
|
444
416
|
},
|
|
445
417
|
Carousel: {
|
|
446
418
|
colorBgContainer: colors.surface.card,
|
|
447
|
-
dotWidth: 8,
|
|
448
|
-
dotHeight: 8,
|
|
449
|
-
dotActiveWidth: 24,
|
|
450
419
|
},
|
|
451
420
|
Tree: {
|
|
452
421
|
colorBgContainer: colors.surface.card,
|
|
453
422
|
nodeHoverBg: colors.surface.interactive,
|
|
454
423
|
nodeSelectedBg: colors.surface.selected,
|
|
455
|
-
|
|
456
|
-
borderRadius: radius.sm,
|
|
424
|
+
borderRadius: constants.radius.sm,
|
|
457
425
|
},
|
|
458
426
|
// ========================================
|
|
459
427
|
// FEEDBACK
|
|
@@ -471,9 +439,9 @@ export const buildAntDTheme = (colors) => {
|
|
|
471
439
|
colorInfoBg: colors.semantic.info.subtle,
|
|
472
440
|
colorInfoBorder: colors.semantic.info.main,
|
|
473
441
|
colorInfoText: colors.semantic.info.main,
|
|
474
|
-
defaultPadding: `${spacing[3]}px ${spacing[4]}px`,
|
|
475
|
-
withDescriptionPadding: `${spacing[4]}px ${spacing[5]}px`,
|
|
476
|
-
borderRadiusLG:
|
|
442
|
+
defaultPadding: `${constants.spacing[3]}px ${constants.spacing[4]}px`,
|
|
443
|
+
withDescriptionPadding: `${constants.spacing[4]}px ${constants.spacing[5]}px`,
|
|
444
|
+
borderRadiusLG: constants.radius.card,
|
|
477
445
|
},
|
|
478
446
|
Modal: {
|
|
479
447
|
contentBg: colors.surface.overlay,
|
|
@@ -481,36 +449,36 @@ export const buildAntDTheme = (colors) => {
|
|
|
481
449
|
footerBg: colors.surface.overlay,
|
|
482
450
|
titleColor: colors.text.primary,
|
|
483
451
|
colorBgMask: isDark ? 'rgba(0, 0, 0, 0.65)' : 'rgba(0, 0, 0, 0.45)',
|
|
484
|
-
borderRadiusLG:
|
|
485
|
-
boxShadow:
|
|
452
|
+
borderRadiusLG: constants.radius.modal,
|
|
453
|
+
boxShadow: constants.shadow.modal,
|
|
486
454
|
},
|
|
487
455
|
Drawer: {
|
|
488
456
|
colorBgElevated: colors.surface.overlay,
|
|
489
457
|
colorBgMask: isDark ? 'rgba(0, 0, 0, 0.65)' : 'rgba(0, 0, 0, 0.45)',
|
|
490
|
-
borderRadiusLG:
|
|
491
|
-
footerPaddingBlock: spacing[4],
|
|
492
|
-
footerPaddingInline: spacing[6],
|
|
458
|
+
borderRadiusLG: constants.radius.modal,
|
|
459
|
+
footerPaddingBlock: constants.spacing[4],
|
|
460
|
+
footerPaddingInline: constants.spacing[6],
|
|
493
461
|
},
|
|
494
462
|
Notification: {
|
|
495
463
|
colorBgElevated: colors.surface.overlay,
|
|
496
464
|
colorText: colors.text.primary,
|
|
497
465
|
colorTextHeading: colors.text.primary,
|
|
498
|
-
borderRadiusLG:
|
|
499
|
-
boxShadow:
|
|
500
|
-
padding: spacing[4],
|
|
501
|
-
paddingContentHorizontal: spacing[4],
|
|
466
|
+
borderRadiusLG: constants.radius.card,
|
|
467
|
+
boxShadow: constants.shadow.popover,
|
|
468
|
+
padding: constants.spacing[4],
|
|
469
|
+
paddingContentHorizontal: constants.spacing[4],
|
|
502
470
|
},
|
|
503
471
|
Message: {
|
|
504
472
|
contentBg: colors.surface.overlay,
|
|
505
|
-
contentPadding: `${spacing[2]}px ${spacing[4]}px`,
|
|
506
|
-
borderRadiusLG:
|
|
507
|
-
boxShadow:
|
|
473
|
+
contentPadding: `${constants.spacing[2]}px ${constants.spacing[4]}px`,
|
|
474
|
+
borderRadiusLG: constants.radius.card,
|
|
475
|
+
boxShadow: constants.shadow.popover,
|
|
508
476
|
},
|
|
509
477
|
Popconfirm: {
|
|
510
478
|
colorBgElevated: colors.surface.overlay,
|
|
511
479
|
colorWarning: colors.semantic.warning.main,
|
|
512
|
-
borderRadiusLG:
|
|
513
|
-
boxShadowSecondary:
|
|
480
|
+
borderRadiusLG: constants.radius.card,
|
|
481
|
+
boxShadowSecondary: constants.shadow.popover,
|
|
514
482
|
},
|
|
515
483
|
Progress: {
|
|
516
484
|
defaultColor: colors.link.default,
|
|
@@ -522,15 +490,15 @@ export const buildAntDTheme = (colors) => {
|
|
|
522
490
|
lineBorderRadius: 100,
|
|
523
491
|
},
|
|
524
492
|
Result: {
|
|
525
|
-
titleFontSize: typography.fontSize['3xl'],
|
|
526
|
-
subtitleFontSize: typography.fontSize.base,
|
|
527
|
-
iconFontSize: typography.fontSize['5xl'],
|
|
528
|
-
extraMargin: `${spacing[8]}px 0 0`,
|
|
493
|
+
titleFontSize: constants.typography.fontSize['3xl'],
|
|
494
|
+
subtitleFontSize: constants.typography.fontSize.base,
|
|
495
|
+
iconFontSize: constants.typography.fontSize['5xl'],
|
|
496
|
+
extraMargin: `${constants.spacing[8]}px 0 0`,
|
|
529
497
|
},
|
|
530
498
|
Skeleton: {
|
|
531
499
|
colorFill: colors.neutral[2],
|
|
532
500
|
colorFillContent: colors.neutral[1],
|
|
533
|
-
borderRadiusSM: radius.sm,
|
|
501
|
+
borderRadiusSM: constants.radius.sm,
|
|
534
502
|
},
|
|
535
503
|
Spin: {
|
|
536
504
|
colorPrimary: colors.link.default,
|
|
@@ -558,12 +526,8 @@ export const buildAntDTheme = (colors) => {
|
|
|
558
526
|
darkItemHoverColor: colors.absolute.white,
|
|
559
527
|
darkItemSelectedBg: colors.link.default,
|
|
560
528
|
darkItemSelectedColor: colors.absolute.white,
|
|
561
|
-
itemBorderRadius:
|
|
562
|
-
|
|
563
|
-
itemPaddingInline: spacing[4],
|
|
564
|
-
iconSize: 16,
|
|
565
|
-
collapsedIconSize: 16,
|
|
566
|
-
collapsedWidth: 64,
|
|
529
|
+
itemBorderRadius: constants.radius.input,
|
|
530
|
+
itemPaddingInline: constants.spacing[4],
|
|
567
531
|
},
|
|
568
532
|
Breadcrumb: {
|
|
569
533
|
itemColor: colors.text.secondary,
|
|
@@ -571,9 +535,9 @@ export const buildAntDTheme = (colors) => {
|
|
|
571
535
|
linkColor: colors.link.default,
|
|
572
536
|
linkHoverColor: colors.link.hover,
|
|
573
537
|
separatorColor: colors.text.tertiary,
|
|
574
|
-
separatorMargin: spacing[2],
|
|
575
|
-
iconFontSize: typography.fontSize.base,
|
|
576
|
-
fontSize: typography.fontSize.base,
|
|
538
|
+
separatorMargin: constants.spacing[2],
|
|
539
|
+
iconFontSize: constants.typography.fontSize.base,
|
|
540
|
+
fontSize: constants.typography.fontSize.base,
|
|
577
541
|
},
|
|
578
542
|
Pagination: {
|
|
579
543
|
colorPrimary: colors.link.default,
|
|
@@ -583,18 +547,13 @@ export const buildAntDTheme = (colors) => {
|
|
|
583
547
|
itemBg: colors.surface.card,
|
|
584
548
|
itemLinkBg: colors.surface.card,
|
|
585
549
|
itemInputBg: colors.surface.card,
|
|
586
|
-
|
|
587
|
-
itemSizeSM: 24,
|
|
588
|
-
borderRadius: radius.sm,
|
|
550
|
+
borderRadius: constants.radius.sm,
|
|
589
551
|
},
|
|
590
552
|
Steps: {
|
|
591
553
|
colorPrimary: colors.link.default,
|
|
592
554
|
colorText: colors.text.secondary,
|
|
593
555
|
colorTextDescription: colors.text.tertiary,
|
|
594
556
|
colorBorderSecondary: colors.border.default,
|
|
595
|
-
dotSize: 8,
|
|
596
|
-
iconSize: 32,
|
|
597
|
-
iconSizeSM: 24,
|
|
598
557
|
},
|
|
599
558
|
Tabs: {
|
|
600
559
|
colorPrimary: colors.link.default,
|
|
@@ -604,26 +563,26 @@ export const buildAntDTheme = (colors) => {
|
|
|
604
563
|
itemActiveColor: colors.link.default,
|
|
605
564
|
inkBarColor: colors.link.default,
|
|
606
565
|
colorBorderSecondary: colors.border.default,
|
|
607
|
-
titleFontSize: typography.fontSize.base,
|
|
608
|
-
titleFontSizeLG: typography.fontSize.lg,
|
|
609
|
-
titleFontSizeSM: typography.fontSize.sm,
|
|
566
|
+
titleFontSize: constants.typography.fontSize.base,
|
|
567
|
+
titleFontSizeLG: constants.typography.fontSize.lg,
|
|
568
|
+
titleFontSizeSM: constants.typography.fontSize.sm,
|
|
610
569
|
cardBg: colors.surface.card,
|
|
611
|
-
cardPadding: `${spacing[2]}px ${spacing[4]}px`,
|
|
612
|
-
horizontalItemPadding: `${spacing[3]}px 0`,
|
|
613
|
-
horizontalItemMargin: `0 ${spacing[8]}px 0 0`,
|
|
570
|
+
cardPadding: `${constants.spacing[2]}px ${constants.spacing[4]}px`,
|
|
571
|
+
horizontalItemPadding: `${constants.spacing[3]}px 0`,
|
|
572
|
+
horizontalItemMargin: `0 ${constants.spacing[8]}px 0 0`,
|
|
614
573
|
},
|
|
615
574
|
Anchor: {
|
|
616
575
|
colorPrimary: colors.link.default,
|
|
617
|
-
linkPaddingBlock: spacing[1],
|
|
618
|
-
linkPaddingInlineStart: spacing[4],
|
|
576
|
+
linkPaddingBlock: constants.spacing[1],
|
|
577
|
+
linkPaddingInlineStart: constants.spacing[4],
|
|
619
578
|
},
|
|
620
579
|
Dropdown: {
|
|
621
580
|
colorBgElevated: colors.surface.overlay,
|
|
622
581
|
controlItemBgHover: colors.surface.interactive,
|
|
623
582
|
controlItemBgActive: colors.surface.selected,
|
|
624
|
-
boxShadowSecondary:
|
|
625
|
-
paddingBlock: spacing[1],
|
|
626
|
-
borderRadiusLG:
|
|
583
|
+
boxShadowSecondary: constants.shadow.popover,
|
|
584
|
+
paddingBlock: constants.spacing[1],
|
|
585
|
+
borderRadiusLG: constants.radius.card,
|
|
627
586
|
},
|
|
628
587
|
// ========================================
|
|
629
588
|
// LAYOUT
|
|
@@ -634,16 +593,12 @@ export const buildAntDTheme = (colors) => {
|
|
|
634
593
|
colorBgTrigger: colors.absolute.black,
|
|
635
594
|
siderBg: colors.absolute.black,
|
|
636
595
|
headerBg: colors.surface.card,
|
|
637
|
-
|
|
638
|
-
headerPadding: `0 ${spacing[6]}px`,
|
|
596
|
+
headerPadding: `0 ${constants.spacing[6]}px`,
|
|
639
597
|
footerBg: colors.surface.card,
|
|
640
|
-
footerPadding: `${spacing[6]}px ${spacing[12]}px`,
|
|
598
|
+
footerPadding: `${constants.spacing[6]}px ${constants.spacing[12]}px`,
|
|
641
599
|
bodyBg: colors.surface.page,
|
|
642
|
-
triggerHeight: 48,
|
|
643
600
|
triggerBg: colors.absolute.black,
|
|
644
601
|
triggerColor: colors.absolute.white,
|
|
645
|
-
zeroTriggerWidth: 36,
|
|
646
|
-
zeroTriggerHeight: 42,
|
|
647
602
|
lightSiderBg: colors.surface.card,
|
|
648
603
|
lightTriggerBg: colors.surface.card,
|
|
649
604
|
lightTriggerColor: colors.text.primary,
|
|
@@ -651,8 +606,7 @@ export const buildAntDTheme = (colors) => {
|
|
|
651
606
|
Divider: {
|
|
652
607
|
colorSplit: colors.border.subtle,
|
|
653
608
|
colorText: colors.text.tertiary,
|
|
654
|
-
|
|
655
|
-
verticalMarginInline: spacing[2],
|
|
609
|
+
verticalMarginInline: constants.spacing[2],
|
|
656
610
|
},
|
|
657
611
|
// ========================================
|
|
658
612
|
// OTHER
|
|
@@ -664,31 +618,31 @@ export const buildAntDTheme = (colors) => {
|
|
|
664
618
|
colorLink: colors.link.default,
|
|
665
619
|
colorLinkHover: colors.link.hover,
|
|
666
620
|
colorLinkActive: colors.link.active,
|
|
667
|
-
titleMarginBottom: spacing[2],
|
|
668
|
-
titleMarginTop: spacing[4],
|
|
669
|
-
fontSizeHeading1: typography.fontSize['5xl'],
|
|
670
|
-
fontSizeHeading2: typography.fontSize['4xl'],
|
|
671
|
-
fontSizeHeading3: typography.fontSize['3xl'],
|
|
672
|
-
fontSizeHeading4: typography.fontSize['2xl'],
|
|
673
|
-
fontSizeHeading5: typography.fontSize.xl,
|
|
674
|
-
lineHeightHeading1: typography.lineHeight.tight,
|
|
675
|
-
lineHeightHeading2: typography.lineHeight.tight,
|
|
676
|
-
lineHeightHeading3: typography.lineHeight.tight,
|
|
677
|
-
lineHeightHeading4: typography.lineHeight.tight,
|
|
678
|
-
lineHeightHeading5: typography.lineHeight.tight,
|
|
621
|
+
titleMarginBottom: constants.spacing[2],
|
|
622
|
+
titleMarginTop: constants.spacing[4],
|
|
623
|
+
fontSizeHeading1: constants.typography.fontSize['5xl'],
|
|
624
|
+
fontSizeHeading2: constants.typography.fontSize['4xl'],
|
|
625
|
+
fontSizeHeading3: constants.typography.fontSize['3xl'],
|
|
626
|
+
fontSizeHeading4: constants.typography.fontSize['2xl'],
|
|
627
|
+
fontSizeHeading5: constants.typography.fontSize.xl,
|
|
628
|
+
lineHeightHeading1: constants.typography.lineHeight.tight,
|
|
629
|
+
lineHeightHeading2: constants.typography.lineHeight.tight,
|
|
630
|
+
lineHeightHeading3: constants.typography.lineHeight.tight,
|
|
631
|
+
lineHeightHeading4: constants.typography.lineHeight.tight,
|
|
632
|
+
lineHeightHeading5: constants.typography.lineHeight.tight,
|
|
679
633
|
},
|
|
680
634
|
Tooltip: {
|
|
681
635
|
colorBgSpotlight: colors.neutral[4],
|
|
682
636
|
colorTextLightSolid: colors.text.inverse,
|
|
683
|
-
borderRadius: radius.sm,
|
|
684
|
-
boxShadowSecondary:
|
|
637
|
+
borderRadius: constants.radius.sm,
|
|
638
|
+
boxShadowSecondary: constants.shadow.tooltip,
|
|
685
639
|
},
|
|
686
640
|
Popover: {
|
|
687
641
|
colorBgElevated: colors.surface.overlay,
|
|
688
642
|
colorText: colors.text.primary,
|
|
689
|
-
borderRadiusLG:
|
|
690
|
-
boxShadowSecondary:
|
|
691
|
-
padding: spacing[3],
|
|
643
|
+
borderRadiusLG: constants.radius.card,
|
|
644
|
+
boxShadowSecondary: constants.shadow.popover,
|
|
645
|
+
padding: constants.spacing[3],
|
|
692
646
|
},
|
|
693
647
|
Image: {
|
|
694
648
|
previewOperationColor: colors.absolute.white,
|
|
@@ -708,14 +662,14 @@ export const buildAntDTheme = (colors) => {
|
|
|
708
662
|
Tour: {
|
|
709
663
|
colorBgElevated: colors.surface.overlay,
|
|
710
664
|
colorPrimary: colors.link.default,
|
|
711
|
-
borderRadius:
|
|
712
|
-
boxShadowSecondary:
|
|
665
|
+
borderRadius: constants.radius.card,
|
|
666
|
+
boxShadowSecondary: constants.shadow.popover,
|
|
713
667
|
},
|
|
714
668
|
FloatButton: {
|
|
715
669
|
colorBgElevated: colors.surface.overlay,
|
|
716
670
|
colorPrimary: colors.link.default,
|
|
717
|
-
borderRadiusLG:
|
|
718
|
-
boxShadow:
|
|
671
|
+
borderRadiusLG: constants.radius.avatar,
|
|
672
|
+
boxShadow: constants.shadow.popover,
|
|
719
673
|
},
|
|
720
674
|
Segmented: {
|
|
721
675
|
colorBgLayout: colors.neutral[2],
|
|
@@ -724,8 +678,8 @@ export const buildAntDTheme = (colors) => {
|
|
|
724
678
|
itemHoverBg: colors.surface.interactive,
|
|
725
679
|
itemSelectedBg: colors.surface.card,
|
|
726
680
|
itemSelectedColor: colors.text.primary,
|
|
727
|
-
borderRadius: radius.base,
|
|
728
|
-
borderRadiusSM: radius.sm,
|
|
681
|
+
borderRadius: constants.radius.base,
|
|
682
|
+
borderRadiusSM: constants.radius.sm,
|
|
729
683
|
},
|
|
730
684
|
Mentions: {
|
|
731
685
|
colorBgContainer: colors.surface.card,
|
|
@@ -733,12 +687,12 @@ export const buildAntDTheme = (colors) => {
|
|
|
733
687
|
colorBorder: colors.border.default,
|
|
734
688
|
controlItemBgHover: colors.surface.interactive,
|
|
735
689
|
controlItemBgActive: colors.surface.selected,
|
|
736
|
-
boxShadowSecondary:
|
|
690
|
+
boxShadowSecondary: constants.shadow.popover,
|
|
737
691
|
},
|
|
738
692
|
Transfer: {
|
|
739
693
|
colorBgContainer: colors.surface.card,
|
|
740
694
|
colorBorder: colors.border.default,
|
|
741
|
-
itemPaddingBlock: spacing[1],
|
|
695
|
+
itemPaddingBlock: constants.spacing[1],
|
|
742
696
|
},
|
|
743
697
|
Cascader: {
|
|
744
698
|
colorBgContainer: colors.surface.card,
|
|
@@ -761,20 +715,20 @@ export const buildAntDTheme = (colors) => {
|
|
|
761
715
|
Empty: {
|
|
762
716
|
colorText: colors.text.secondary,
|
|
763
717
|
colorTextDescription: colors.text.tertiary,
|
|
764
|
-
fontSize: typography.fontSize.base,
|
|
718
|
+
fontSize: constants.typography.fontSize.base,
|
|
765
719
|
},
|
|
766
720
|
List: {
|
|
767
721
|
colorBorder: colors.border.subtle,
|
|
768
722
|
colorSplit: colors.border.subtle,
|
|
769
|
-
itemPadding: `${spacing[3]}px ${spacing[6]}px`,
|
|
770
|
-
itemPaddingSM: `${spacing[2]}px ${spacing[4]}px`,
|
|
771
|
-
itemPaddingLG: `${spacing[4]}px ${spacing[6]}px`,
|
|
723
|
+
itemPadding: `${constants.spacing[3]}px ${constants.spacing[6]}px`,
|
|
724
|
+
itemPaddingSM: `${constants.spacing[2]}px ${constants.spacing[4]}px`,
|
|
725
|
+
itemPaddingLG: `${constants.spacing[4]}px ${constants.spacing[6]}px`,
|
|
772
726
|
headerBg: 'transparent',
|
|
773
727
|
footerBg: 'transparent',
|
|
774
|
-
emptyTextPadding: spacing[4],
|
|
775
|
-
metaMarginBottom: spacing[2],
|
|
776
|
-
avatarMarginRight: spacing[4],
|
|
777
|
-
titleMarginBottom: spacing[1],
|
|
728
|
+
emptyTextPadding: constants.spacing[4],
|
|
729
|
+
metaMarginBottom: constants.spacing[2],
|
|
730
|
+
avatarMarginRight: constants.spacing[4],
|
|
731
|
+
titleMarginBottom: constants.spacing[1],
|
|
778
732
|
},
|
|
779
733
|
},
|
|
780
734
|
};
|