@temboplus/frontend-react-core 0.1.3-beta.12 → 0.1.3-beta.13
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.js +1 -1
- package/dist/dialogs/index.cjs.js +1 -1
- package/dist/dialogs/index.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/notifications/index.cjs.js +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/{tembo-notify-BUN8_mKb.js → tembo-notify-CW2KXwZW.js} +2 -2
- package/dist/{tembo-notify-BUN8_mKb.js.map → tembo-notify-CW2KXwZW.js.map} +1 -1
- package/dist/{tembo-notify-D0uYvwZP.js → tembo-notify-EJeawMJ_.js} +2 -2
- package/dist/{tembo-notify-D0uYvwZP.js.map → tembo-notify-EJeawMJ_.js.map} +1 -1
- package/dist/theme/index.cjs.js +1 -1
- package/dist/theme/index.js +1 -1
- package/dist/theme/theme-config.d.ts +2 -1
- package/dist/theme/theme-config.js +159 -160
- package/dist/theme/theme-provider.d.ts +22 -10
- package/dist/theme/theme-provider.js +26 -13
- package/dist/theme/tokens/constants.d.ts +153 -0
- package/dist/theme/tokens/constants.js +123 -0
- package/dist/theme-provider-BVd_oFrl.js +11 -0
- package/dist/theme-provider-BVd_oFrl.js.map +1 -0
- package/dist/theme-provider-dbf4ZeQO.js +11 -0
- package/dist/theme-provider-dbf4ZeQO.js.map +1 -0
- package/package.json +1 -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,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { typography } from './tokens/typography.js';
|
|
3
|
-
import { radius, componentRadius } from './tokens/radius.js';
|
|
4
|
-
import { buildDarkModeShadows, componentShadows, shadows } from './tokens/shadow.js';
|
|
1
|
+
import { buildDarkModeConstants } from './tokens/constants.js';
|
|
5
2
|
/**
|
|
6
3
|
* Build comprehensive Ant Design theme from Tembo tokens
|
|
7
4
|
*/
|
|
8
|
-
export const buildAntDTheme = (colors) => {
|
|
5
|
+
export const buildAntDTheme = (colors, constants) => {
|
|
9
6
|
const isDark = colors.mode === 'dark';
|
|
10
|
-
const componentShadow = isDark
|
|
7
|
+
const componentShadow = isDark
|
|
8
|
+
? buildDarkModeConstants().componentShadow
|
|
9
|
+
: constants.componentShadow;
|
|
11
10
|
return {
|
|
12
11
|
token: {
|
|
13
12
|
// ============================================
|
|
@@ -94,40 +93,40 @@ export const buildAntDTheme = (colors) => {
|
|
|
94
93
|
// ============================================
|
|
95
94
|
// TYPOGRAPHY
|
|
96
95
|
// ============================================
|
|
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,
|
|
96
|
+
fontFamily: constants.typography.fontFamily.base,
|
|
97
|
+
fontFamilyCode: constants.typography.fontFamily.mono,
|
|
98
|
+
fontSize: constants.typography.fontSize.base,
|
|
99
|
+
fontSizeHeading1: constants.typography.fontSize['5xl'],
|
|
100
|
+
fontSizeHeading2: constants.typography.fontSize['4xl'],
|
|
101
|
+
fontSizeHeading3: constants.typography.fontSize['3xl'],
|
|
102
|
+
fontSizeHeading4: constants.typography.fontSize['2xl'],
|
|
103
|
+
fontSizeHeading5: constants.typography.fontSize.xl,
|
|
104
|
+
fontSizeSM: constants.typography.fontSize.sm,
|
|
105
|
+
fontSizeLG: constants.typography.fontSize.lg,
|
|
106
|
+
fontSizeXL: constants.typography.fontSize.xl,
|
|
107
|
+
fontWeightStrong: constants.typography.fontWeight.semibold,
|
|
108
|
+
lineHeight: constants.typography.lineHeight.base,
|
|
109
|
+
lineHeightHeading1: constants.typography.lineHeight.tight,
|
|
110
|
+
lineHeightHeading2: constants.typography.lineHeight.tight,
|
|
111
|
+
lineHeightHeading3: constants.typography.lineHeight.tight,
|
|
112
|
+
lineHeightHeading4: constants.typography.lineHeight.tight,
|
|
113
|
+
lineHeightHeading5: constants.typography.lineHeight.tight,
|
|
114
|
+
lineHeightLG: constants.typography.lineHeight.relaxed,
|
|
115
|
+
lineHeightSM: constants.typography.lineHeight.base,
|
|
117
116
|
// ============================================
|
|
118
117
|
// SPACING & SIZING
|
|
119
118
|
// ============================================
|
|
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],
|
|
119
|
+
padding: constants.spacing[4],
|
|
120
|
+
paddingXS: constants.spacing[2],
|
|
121
|
+
paddingSM: constants.spacing[3],
|
|
122
|
+
paddingLG: constants.spacing[5],
|
|
123
|
+
paddingXL: constants.spacing[6],
|
|
124
|
+
margin: constants.spacing[4],
|
|
125
|
+
marginXS: constants.spacing[2],
|
|
126
|
+
marginSM: constants.spacing[3],
|
|
127
|
+
marginLG: constants.spacing[5],
|
|
128
|
+
marginXL: constants.spacing[6],
|
|
129
|
+
marginXXL: constants.spacing[8],
|
|
131
130
|
controlHeight: 40,
|
|
132
131
|
controlHeightLG: 48,
|
|
133
132
|
controlHeightSM: 32,
|
|
@@ -135,15 +134,15 @@ export const buildAntDTheme = (colors) => {
|
|
|
135
134
|
// ============================================
|
|
136
135
|
// BORDER RADIUS
|
|
137
136
|
// ============================================
|
|
138
|
-
borderRadius: radius.base,
|
|
139
|
-
borderRadiusLG: radius.md,
|
|
140
|
-
borderRadiusSM: radius.sm,
|
|
141
|
-
borderRadiusXS: radius.sm,
|
|
137
|
+
borderRadius: constants.radius.base,
|
|
138
|
+
borderRadiusLG: constants.radius.md,
|
|
139
|
+
borderRadiusSM: constants.radius.sm,
|
|
140
|
+
borderRadiusXS: constants.radius.sm,
|
|
142
141
|
// ============================================
|
|
143
142
|
// SHADOWS
|
|
144
143
|
// ============================================
|
|
145
|
-
boxShadow:
|
|
146
|
-
boxShadowSecondary:
|
|
144
|
+
boxShadow: constants.shadow.none,
|
|
145
|
+
boxShadowSecondary: constants.shadow.none,
|
|
147
146
|
boxShadowTertiary: componentShadow.card,
|
|
148
147
|
// ============================================
|
|
149
148
|
// MOTION
|
|
@@ -200,14 +199,14 @@ export const buildAntDTheme = (colors) => {
|
|
|
200
199
|
controlHeight: 40,
|
|
201
200
|
controlHeightLG: 48,
|
|
202
201
|
controlHeightSM: 32,
|
|
203
|
-
paddingContentHorizontal: spacing[4],
|
|
204
|
-
paddingContentVertical: spacing[2],
|
|
202
|
+
paddingContentHorizontal: constants.spacing[4],
|
|
203
|
+
paddingContentVertical: constants.spacing[2],
|
|
205
204
|
// Styling
|
|
206
|
-
borderRadius: componentRadius.button,
|
|
207
|
-
borderRadiusLG: componentRadius.button,
|
|
208
|
-
borderRadiusSM: componentRadius.button,
|
|
209
|
-
fontWeight: typography.fontWeight.medium,
|
|
210
|
-
fontSize: typography.fontSize.base,
|
|
205
|
+
borderRadius: constants.componentRadius.button,
|
|
206
|
+
borderRadiusLG: constants.componentRadius.button,
|
|
207
|
+
borderRadiusSM: constants.componentRadius.button,
|
|
208
|
+
fontWeight: constants.typography.fontWeight.medium,
|
|
209
|
+
fontSize: constants.typography.fontSize.base,
|
|
211
210
|
},
|
|
212
211
|
// ========================================
|
|
213
212
|
// INPUT & FORM CONTROLS
|
|
@@ -227,12 +226,12 @@ export const buildAntDTheme = (colors) => {
|
|
|
227
226
|
controlHeight: 40,
|
|
228
227
|
controlHeightLG: 48,
|
|
229
228
|
controlHeightSM: 32,
|
|
230
|
-
paddingBlock: spacing[2],
|
|
231
|
-
paddingInline: spacing[3],
|
|
232
|
-
paddingInlineLG: spacing[4],
|
|
233
|
-
borderRadius: componentRadius.input,
|
|
234
|
-
borderRadiusLG: componentRadius.input,
|
|
235
|
-
borderRadiusSM: componentRadius.input,
|
|
229
|
+
paddingBlock: constants.spacing[2],
|
|
230
|
+
paddingInline: constants.spacing[3],
|
|
231
|
+
paddingInlineLG: constants.spacing[4],
|
|
232
|
+
borderRadius: constants.componentRadius.input,
|
|
233
|
+
borderRadiusLG: constants.componentRadius.input,
|
|
234
|
+
borderRadiusSM: constants.componentRadius.input,
|
|
236
235
|
},
|
|
237
236
|
InputNumber: {
|
|
238
237
|
colorBgContainer: colors.surface.card,
|
|
@@ -243,7 +242,7 @@ export const buildAntDTheme = (colors) => {
|
|
|
243
242
|
colorIconHover: colors.text.secondary,
|
|
244
243
|
activeShadow: `0 0 0 2px ${colors.semantic.info.subtle}`,
|
|
245
244
|
controlHeight: 40,
|
|
246
|
-
borderRadius: componentRadius.input,
|
|
245
|
+
borderRadius: constants.componentRadius.input,
|
|
247
246
|
handleVisible: true,
|
|
248
247
|
},
|
|
249
248
|
Select: {
|
|
@@ -263,9 +262,9 @@ export const buildAntDTheme = (colors) => {
|
|
|
263
262
|
controlHeight: 40,
|
|
264
263
|
controlHeightLG: 48,
|
|
265
264
|
controlHeightSM: 32,
|
|
266
|
-
borderRadius: componentRadius.input,
|
|
267
|
-
borderRadiusLG: componentRadius.input,
|
|
268
|
-
borderRadiusSM: componentRadius.input,
|
|
265
|
+
borderRadius: constants.componentRadius.input,
|
|
266
|
+
borderRadiusLG: constants.componentRadius.input,
|
|
267
|
+
borderRadiusSM: constants.componentRadius.input,
|
|
269
268
|
boxShadowSecondary: componentShadow.dropdown,
|
|
270
269
|
},
|
|
271
270
|
DatePicker: {
|
|
@@ -280,7 +279,7 @@ export const buildAntDTheme = (colors) => {
|
|
|
280
279
|
cellActiveWithRangeBg: colors.semantic.info.subtle,
|
|
281
280
|
colorPrimary: colors.link.default,
|
|
282
281
|
controlHeight: 40,
|
|
283
|
-
borderRadius: componentRadius.input,
|
|
282
|
+
borderRadius: constants.componentRadius.input,
|
|
284
283
|
},
|
|
285
284
|
Checkbox: {
|
|
286
285
|
colorPrimary: colors.link.default,
|
|
@@ -289,7 +288,7 @@ export const buildAntDTheme = (colors) => {
|
|
|
289
288
|
colorBgContainer: colors.surface.card,
|
|
290
289
|
colorIcon: colors.text.tertiary,
|
|
291
290
|
colorIconHover: colors.text.secondary,
|
|
292
|
-
borderRadiusSM: radius.sm,
|
|
291
|
+
borderRadiusSM: constants.radius.sm,
|
|
293
292
|
},
|
|
294
293
|
Radio: {
|
|
295
294
|
colorPrimary: colors.link.default,
|
|
@@ -326,12 +325,12 @@ export const buildAntDTheme = (colors) => {
|
|
|
326
325
|
},
|
|
327
326
|
Form: {
|
|
328
327
|
labelColor: colors.text.primary,
|
|
329
|
-
labelFontSize: typography.fontSize.base,
|
|
328
|
+
labelFontSize: constants.typography.fontSize.base,
|
|
330
329
|
labelHeight: 32,
|
|
331
|
-
labelColonMarginInlineEnd: spacing[2],
|
|
332
|
-
labelColonMarginInlineStart: spacing[1],
|
|
333
|
-
itemMarginBottom:
|
|
334
|
-
verticalLabelPadding: `0 0 ${
|
|
330
|
+
labelColonMarginInlineEnd: constants.spacing[2],
|
|
331
|
+
labelColonMarginInlineStart: constants.spacing[1],
|
|
332
|
+
itemMarginBottom: constants.spacing[4],
|
|
333
|
+
verticalLabelPadding: `0 0 ${constants.spacing[2]}px`,
|
|
335
334
|
labelRequiredMarkColor: colors.semantic.error.main,
|
|
336
335
|
colorIcon: colors.text.tertiary,
|
|
337
336
|
colorIconHover: colors.text.secondary,
|
|
@@ -353,13 +352,13 @@ export const buildAntDTheme = (colors) => {
|
|
|
353
352
|
rowSelectedBg: colors.surface.selected,
|
|
354
353
|
rowSelectedHoverBg: colors.surface.selected,
|
|
355
354
|
rowExpandedBg: colors.surface.nested,
|
|
356
|
-
cellPaddingBlock: spacing[4],
|
|
357
|
-
cellPaddingInline: spacing[4],
|
|
358
|
-
cellPaddingBlockSM: spacing[2],
|
|
359
|
-
cellPaddingInlineSM: spacing[3],
|
|
360
|
-
borderRadius: componentRadius.card,
|
|
361
|
-
borderRadiusLG: componentRadius.card,
|
|
362
|
-
headerBorderRadius: componentRadius.card,
|
|
355
|
+
cellPaddingBlock: constants.spacing[4],
|
|
356
|
+
cellPaddingInline: constants.spacing[4],
|
|
357
|
+
cellPaddingBlockSM: constants.spacing[2],
|
|
358
|
+
cellPaddingInlineSM: constants.spacing[3],
|
|
359
|
+
borderRadius: constants.componentRadius.card,
|
|
360
|
+
borderRadiusLG: constants.componentRadius.card,
|
|
361
|
+
headerBorderRadius: constants.componentRadius.card,
|
|
363
362
|
footerBg: colors.surface.page,
|
|
364
363
|
},
|
|
365
364
|
Descriptions: {
|
|
@@ -367,9 +366,9 @@ export const buildAntDTheme = (colors) => {
|
|
|
367
366
|
titleColor: colors.text.primary,
|
|
368
367
|
contentColor: colors.text.primary,
|
|
369
368
|
extraColor: colors.text.secondary,
|
|
370
|
-
itemPaddingBottom: spacing[4],
|
|
371
|
-
colonMarginLeft: spacing[1],
|
|
372
|
-
colonMarginRight: spacing[2],
|
|
369
|
+
itemPaddingBottom: constants.spacing[4],
|
|
370
|
+
colonMarginLeft: constants.spacing[1],
|
|
371
|
+
colonMarginRight: constants.spacing[2],
|
|
373
372
|
},
|
|
374
373
|
Card: {
|
|
375
374
|
colorBgContainer: colors.surface.card,
|
|
@@ -377,14 +376,14 @@ export const buildAntDTheme = (colors) => {
|
|
|
377
376
|
colorTextHeading: colors.text.primary,
|
|
378
377
|
colorTextDescription: colors.text.secondary,
|
|
379
378
|
boxShadowTertiary: componentShadow.card,
|
|
380
|
-
borderRadius: componentRadius.card,
|
|
381
|
-
borderRadiusLG: componentRadius.card,
|
|
382
|
-
|
|
383
|
-
|
|
379
|
+
borderRadius: constants.componentRadius.card,
|
|
380
|
+
borderRadiusLG: constants.componentRadius.card,
|
|
381
|
+
padding: constants.spacing[4],
|
|
382
|
+
paddingLG: constants.spacing[6],
|
|
384
383
|
},
|
|
385
384
|
Statistic: {
|
|
386
|
-
titleFontSize: typography.fontSize.base,
|
|
387
|
-
contentFontSize: typography.fontSize['4xl'],
|
|
385
|
+
titleFontSize: constants.typography.fontSize.base,
|
|
386
|
+
contentFontSize: constants.typography.fontSize['4xl'],
|
|
388
387
|
colorTextHeading: colors.text.primary,
|
|
389
388
|
colorTextDescription: colors.text.secondary,
|
|
390
389
|
},
|
|
@@ -393,16 +392,16 @@ export const buildAntDTheme = (colors) => {
|
|
|
393
392
|
tailWidth: 2,
|
|
394
393
|
dotBg: colors.surface.card,
|
|
395
394
|
dotBorderWidth: 2,
|
|
396
|
-
itemPaddingBottom: spacing[5],
|
|
395
|
+
itemPaddingBottom: constants.spacing[5],
|
|
397
396
|
},
|
|
398
397
|
Tag: {
|
|
399
398
|
defaultBg: colors.neutral[2],
|
|
400
399
|
defaultColor: colors.text.primary,
|
|
401
400
|
colorBorder: colors.border.default,
|
|
402
401
|
colorText: colors.text.primary,
|
|
403
|
-
borderRadiusSM: componentRadius.badge,
|
|
404
|
-
fontSize: typography.fontSize.sm,
|
|
405
|
-
fontSizeSM: typography.fontSize.xs,
|
|
402
|
+
borderRadiusSM: constants.componentRadius.badge,
|
|
403
|
+
fontSize: constants.typography.fontSize.sm,
|
|
404
|
+
fontSizeSM: constants.typography.fontSize.xs,
|
|
406
405
|
},
|
|
407
406
|
Badge: {
|
|
408
407
|
colorBorderBg: colors.surface.card,
|
|
@@ -410,7 +409,7 @@ export const buildAntDTheme = (colors) => {
|
|
|
410
409
|
colorSuccess: colors.semantic.success.main,
|
|
411
410
|
colorInfo: colors.semantic.info.main,
|
|
412
411
|
colorWarning: colors.semantic.warning.main,
|
|
413
|
-
textFontSize: typography.fontSize.xs,
|
|
412
|
+
textFontSize: constants.typography.fontSize.xs,
|
|
414
413
|
textFontSizeSM: 10,
|
|
415
414
|
indicatorHeight: 6,
|
|
416
415
|
indicatorHeightSM: 6,
|
|
@@ -422,9 +421,9 @@ export const buildAntDTheme = (colors) => {
|
|
|
422
421
|
containerSize: 32,
|
|
423
422
|
containerSizeLG: 40,
|
|
424
423
|
containerSizeSM: 24,
|
|
425
|
-
borderRadius: componentRadius.avatar,
|
|
424
|
+
borderRadius: constants.componentRadius.avatar,
|
|
426
425
|
groupOverlapping: -8,
|
|
427
|
-
groupSpace: spacing[1],
|
|
426
|
+
groupSpace: constants.spacing[1],
|
|
428
427
|
},
|
|
429
428
|
Calendar: {
|
|
430
429
|
colorBgContainer: colors.surface.card,
|
|
@@ -432,15 +431,15 @@ export const buildAntDTheme = (colors) => {
|
|
|
432
431
|
fullBg: colors.surface.card,
|
|
433
432
|
fullPanelBg: colors.surface.card,
|
|
434
433
|
itemActiveBg: colors.semantic.info.subtle,
|
|
435
|
-
borderRadius: componentRadius.card,
|
|
434
|
+
borderRadius: constants.componentRadius.card,
|
|
436
435
|
},
|
|
437
436
|
Collapse: {
|
|
438
437
|
colorBgContainer: colors.surface.card,
|
|
439
438
|
colorBorder: colors.border.default,
|
|
440
439
|
headerBg: colors.surface.page,
|
|
441
|
-
headerPadding: `${spacing[3]}px ${spacing[4]}px`,
|
|
442
|
-
contentPadding: `${spacing[4]}px ${spacing[4]}px`,
|
|
443
|
-
borderRadiusLG: componentRadius.card,
|
|
440
|
+
headerPadding: `${constants.spacing[3]}px ${constants.spacing[4]}px`,
|
|
441
|
+
contentPadding: `${constants.spacing[4]}px ${constants.spacing[4]}px`,
|
|
442
|
+
borderRadiusLG: constants.componentRadius.card,
|
|
444
443
|
},
|
|
445
444
|
Carousel: {
|
|
446
445
|
colorBgContainer: colors.surface.card,
|
|
@@ -453,7 +452,7 @@ export const buildAntDTheme = (colors) => {
|
|
|
453
452
|
nodeHoverBg: colors.surface.interactive,
|
|
454
453
|
nodeSelectedBg: colors.surface.selected,
|
|
455
454
|
titleHeight: 32,
|
|
456
|
-
borderRadius: radius.sm,
|
|
455
|
+
borderRadius: constants.radius.sm,
|
|
457
456
|
},
|
|
458
457
|
// ========================================
|
|
459
458
|
// FEEDBACK
|
|
@@ -471,9 +470,9 @@ export const buildAntDTheme = (colors) => {
|
|
|
471
470
|
colorInfoBg: colors.semantic.info.subtle,
|
|
472
471
|
colorInfoBorder: colors.semantic.info.main,
|
|
473
472
|
colorInfoText: colors.semantic.info.main,
|
|
474
|
-
defaultPadding: `${spacing[3]}px ${spacing[4]}px`,
|
|
475
|
-
withDescriptionPadding: `${spacing[4]}px ${spacing[5]}px`,
|
|
476
|
-
borderRadiusLG: componentRadius.card,
|
|
473
|
+
defaultPadding: `${constants.spacing[3]}px ${constants.spacing[4]}px`,
|
|
474
|
+
withDescriptionPadding: `${constants.spacing[4]}px ${constants.spacing[5]}px`,
|
|
475
|
+
borderRadiusLG: constants.componentRadius.card,
|
|
477
476
|
},
|
|
478
477
|
Modal: {
|
|
479
478
|
contentBg: colors.surface.overlay,
|
|
@@ -481,35 +480,35 @@ export const buildAntDTheme = (colors) => {
|
|
|
481
480
|
footerBg: colors.surface.overlay,
|
|
482
481
|
titleColor: colors.text.primary,
|
|
483
482
|
colorBgMask: isDark ? 'rgba(0, 0, 0, 0.65)' : 'rgba(0, 0, 0, 0.45)',
|
|
484
|
-
borderRadiusLG: componentRadius.modal,
|
|
483
|
+
borderRadiusLG: constants.componentRadius.modal,
|
|
485
484
|
boxShadow: componentShadow.modal,
|
|
486
485
|
},
|
|
487
486
|
Drawer: {
|
|
488
487
|
colorBgElevated: colors.surface.overlay,
|
|
489
488
|
colorBgMask: isDark ? 'rgba(0, 0, 0, 0.65)' : 'rgba(0, 0, 0, 0.45)',
|
|
490
|
-
borderRadiusLG: componentRadius.modal,
|
|
491
|
-
footerPaddingBlock: spacing[4],
|
|
492
|
-
footerPaddingInline: spacing[6],
|
|
489
|
+
borderRadiusLG: constants.componentRadius.modal,
|
|
490
|
+
footerPaddingBlock: constants.spacing[4],
|
|
491
|
+
footerPaddingInline: constants.spacing[6],
|
|
493
492
|
},
|
|
494
493
|
Notification: {
|
|
495
494
|
colorBgElevated: colors.surface.overlay,
|
|
496
495
|
colorText: colors.text.primary,
|
|
497
496
|
colorTextHeading: colors.text.primary,
|
|
498
|
-
borderRadiusLG: componentRadius.card,
|
|
497
|
+
borderRadiusLG: constants.componentRadius.card,
|
|
499
498
|
boxShadow: componentShadow.dropdown,
|
|
500
|
-
padding: spacing[4],
|
|
501
|
-
paddingContentHorizontal: spacing[4],
|
|
499
|
+
padding: constants.spacing[4],
|
|
500
|
+
paddingContentHorizontal: constants.spacing[4],
|
|
502
501
|
},
|
|
503
502
|
Message: {
|
|
504
503
|
contentBg: colors.surface.overlay,
|
|
505
|
-
contentPadding: `${spacing[2]}px ${spacing[4]}px`,
|
|
506
|
-
borderRadiusLG: componentRadius.card,
|
|
504
|
+
contentPadding: `${constants.spacing[2]}px ${constants.spacing[4]}px`,
|
|
505
|
+
borderRadiusLG: constants.componentRadius.card,
|
|
507
506
|
boxShadow: componentShadow.dropdown,
|
|
508
507
|
},
|
|
509
508
|
Popconfirm: {
|
|
510
509
|
colorBgElevated: colors.surface.overlay,
|
|
511
510
|
colorWarning: colors.semantic.warning.main,
|
|
512
|
-
borderRadiusLG: componentRadius.card,
|
|
511
|
+
borderRadiusLG: constants.componentRadius.card,
|
|
513
512
|
boxShadowSecondary: componentShadow.dropdown,
|
|
514
513
|
},
|
|
515
514
|
Progress: {
|
|
@@ -522,15 +521,15 @@ export const buildAntDTheme = (colors) => {
|
|
|
522
521
|
lineBorderRadius: 100,
|
|
523
522
|
},
|
|
524
523
|
Result: {
|
|
525
|
-
titleFontSize: typography.fontSize['3xl'],
|
|
526
|
-
subtitleFontSize: typography.fontSize.base,
|
|
527
|
-
iconFontSize: typography.fontSize['5xl'],
|
|
528
|
-
extraMargin: `${spacing[8]}px 0 0`,
|
|
524
|
+
titleFontSize: constants.typography.fontSize['3xl'],
|
|
525
|
+
subtitleFontSize: constants.typography.fontSize.base,
|
|
526
|
+
iconFontSize: constants.typography.fontSize['5xl'],
|
|
527
|
+
extraMargin: `${constants.spacing[8]}px 0 0`,
|
|
529
528
|
},
|
|
530
529
|
Skeleton: {
|
|
531
530
|
colorFill: colors.neutral[2],
|
|
532
531
|
colorFillContent: colors.neutral[1],
|
|
533
|
-
borderRadiusSM: radius.sm,
|
|
532
|
+
borderRadiusSM: constants.radius.sm,
|
|
534
533
|
},
|
|
535
534
|
Spin: {
|
|
536
535
|
colorPrimary: colors.link.default,
|
|
@@ -558,9 +557,9 @@ export const buildAntDTheme = (colors) => {
|
|
|
558
557
|
darkItemHoverColor: colors.absolute.white,
|
|
559
558
|
darkItemSelectedBg: colors.link.default,
|
|
560
559
|
darkItemSelectedColor: colors.absolute.white,
|
|
561
|
-
itemBorderRadius: componentRadius.input,
|
|
560
|
+
itemBorderRadius: constants.componentRadius.input,
|
|
562
561
|
itemHeight: 40,
|
|
563
|
-
itemPaddingInline: spacing[4],
|
|
562
|
+
itemPaddingInline: constants.spacing[4],
|
|
564
563
|
iconSize: 16,
|
|
565
564
|
collapsedIconSize: 16,
|
|
566
565
|
collapsedWidth: 64,
|
|
@@ -571,9 +570,9 @@ export const buildAntDTheme = (colors) => {
|
|
|
571
570
|
linkColor: colors.link.default,
|
|
572
571
|
linkHoverColor: colors.link.hover,
|
|
573
572
|
separatorColor: colors.text.tertiary,
|
|
574
|
-
separatorMargin: spacing[2],
|
|
575
|
-
iconFontSize: typography.fontSize.base,
|
|
576
|
-
fontSize: typography.fontSize.base,
|
|
573
|
+
separatorMargin: constants.spacing[2],
|
|
574
|
+
iconFontSize: constants.typography.fontSize.base,
|
|
575
|
+
fontSize: constants.typography.fontSize.base,
|
|
577
576
|
},
|
|
578
577
|
Pagination: {
|
|
579
578
|
colorPrimary: colors.link.default,
|
|
@@ -585,7 +584,7 @@ export const buildAntDTheme = (colors) => {
|
|
|
585
584
|
itemInputBg: colors.surface.card,
|
|
586
585
|
itemSize: 32,
|
|
587
586
|
itemSizeSM: 24,
|
|
588
|
-
borderRadius: radius.sm,
|
|
587
|
+
borderRadius: constants.radius.sm,
|
|
589
588
|
},
|
|
590
589
|
Steps: {
|
|
591
590
|
colorPrimary: colors.link.default,
|
|
@@ -604,26 +603,26 @@ export const buildAntDTheme = (colors) => {
|
|
|
604
603
|
itemActiveColor: colors.link.default,
|
|
605
604
|
inkBarColor: colors.link.default,
|
|
606
605
|
colorBorderSecondary: colors.border.default,
|
|
607
|
-
titleFontSize: typography.fontSize.base,
|
|
608
|
-
titleFontSizeLG: typography.fontSize.lg,
|
|
609
|
-
titleFontSizeSM: typography.fontSize.sm,
|
|
606
|
+
titleFontSize: constants.typography.fontSize.base,
|
|
607
|
+
titleFontSizeLG: constants.typography.fontSize.lg,
|
|
608
|
+
titleFontSizeSM: constants.typography.fontSize.sm,
|
|
610
609
|
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`,
|
|
610
|
+
cardPadding: `${constants.spacing[2]}px ${constants.spacing[4]}px`,
|
|
611
|
+
horizontalItemPadding: `${constants.spacing[3]}px 0`,
|
|
612
|
+
horizontalItemMargin: `0 ${constants.spacing[8]}px 0 0`,
|
|
614
613
|
},
|
|
615
614
|
Anchor: {
|
|
616
615
|
colorPrimary: colors.link.default,
|
|
617
|
-
linkPaddingBlock: spacing[1],
|
|
618
|
-
linkPaddingInlineStart: spacing[4],
|
|
616
|
+
linkPaddingBlock: constants.spacing[1],
|
|
617
|
+
linkPaddingInlineStart: constants.spacing[4],
|
|
619
618
|
},
|
|
620
619
|
Dropdown: {
|
|
621
620
|
colorBgElevated: colors.surface.overlay,
|
|
622
621
|
controlItemBgHover: colors.surface.interactive,
|
|
623
622
|
controlItemBgActive: colors.surface.selected,
|
|
624
623
|
boxShadowSecondary: componentShadow.dropdown,
|
|
625
|
-
paddingBlock: spacing[1],
|
|
626
|
-
borderRadiusLG: componentRadius.card,
|
|
624
|
+
paddingBlock: constants.spacing[1],
|
|
625
|
+
borderRadiusLG: constants.componentRadius.card,
|
|
627
626
|
},
|
|
628
627
|
// ========================================
|
|
629
628
|
// LAYOUT
|
|
@@ -635,9 +634,9 @@ export const buildAntDTheme = (colors) => {
|
|
|
635
634
|
siderBg: colors.absolute.black,
|
|
636
635
|
headerBg: colors.surface.card,
|
|
637
636
|
headerHeight: 64,
|
|
638
|
-
headerPadding: `0 ${spacing[6]}px`,
|
|
637
|
+
headerPadding: `0 ${constants.spacing[6]}px`,
|
|
639
638
|
footerBg: colors.surface.card,
|
|
640
|
-
footerPadding: `${spacing[6]}px ${spacing[12]}px`,
|
|
639
|
+
footerPadding: `${constants.spacing[6]}px ${constants.spacing[12]}px`,
|
|
641
640
|
bodyBg: colors.surface.page,
|
|
642
641
|
triggerHeight: 48,
|
|
643
642
|
triggerBg: colors.absolute.black,
|
|
@@ -652,7 +651,7 @@ export const buildAntDTheme = (colors) => {
|
|
|
652
651
|
colorSplit: colors.border.subtle,
|
|
653
652
|
colorText: colors.text.tertiary,
|
|
654
653
|
orientationMargin: 0.05,
|
|
655
|
-
verticalMarginInline: spacing[2],
|
|
654
|
+
verticalMarginInline: constants.spacing[2],
|
|
656
655
|
},
|
|
657
656
|
// ========================================
|
|
658
657
|
// OTHER
|
|
@@ -664,31 +663,31 @@ export const buildAntDTheme = (colors) => {
|
|
|
664
663
|
colorLink: colors.link.default,
|
|
665
664
|
colorLinkHover: colors.link.hover,
|
|
666
665
|
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,
|
|
666
|
+
titleMarginBottom: constants.spacing[2],
|
|
667
|
+
titleMarginTop: constants.spacing[4],
|
|
668
|
+
fontSizeHeading1: constants.typography.fontSize['5xl'],
|
|
669
|
+
fontSizeHeading2: constants.typography.fontSize['4xl'],
|
|
670
|
+
fontSizeHeading3: constants.typography.fontSize['3xl'],
|
|
671
|
+
fontSizeHeading4: constants.typography.fontSize['2xl'],
|
|
672
|
+
fontSizeHeading5: constants.typography.fontSize.xl,
|
|
673
|
+
lineHeightHeading1: constants.typography.lineHeight.tight,
|
|
674
|
+
lineHeightHeading2: constants.typography.lineHeight.tight,
|
|
675
|
+
lineHeightHeading3: constants.typography.lineHeight.tight,
|
|
676
|
+
lineHeightHeading4: constants.typography.lineHeight.tight,
|
|
677
|
+
lineHeightHeading5: constants.typography.lineHeight.tight,
|
|
679
678
|
},
|
|
680
679
|
Tooltip: {
|
|
681
680
|
colorBgSpotlight: colors.neutral[4],
|
|
682
681
|
colorTextLightSolid: colors.text.inverse,
|
|
683
|
-
borderRadius: radius.sm,
|
|
682
|
+
borderRadius: constants.radius.sm,
|
|
684
683
|
boxShadowSecondary: componentShadow.tooltip,
|
|
685
684
|
},
|
|
686
685
|
Popover: {
|
|
687
686
|
colorBgElevated: colors.surface.overlay,
|
|
688
687
|
colorText: colors.text.primary,
|
|
689
|
-
borderRadiusLG: componentRadius.card,
|
|
688
|
+
borderRadiusLG: constants.componentRadius.card,
|
|
690
689
|
boxShadowSecondary: componentShadow.dropdown,
|
|
691
|
-
padding: spacing[3],
|
|
690
|
+
padding: constants.spacing[3],
|
|
692
691
|
},
|
|
693
692
|
Image: {
|
|
694
693
|
previewOperationColor: colors.absolute.white,
|
|
@@ -708,13 +707,13 @@ export const buildAntDTheme = (colors) => {
|
|
|
708
707
|
Tour: {
|
|
709
708
|
colorBgElevated: colors.surface.overlay,
|
|
710
709
|
colorPrimary: colors.link.default,
|
|
711
|
-
borderRadius: componentRadius.card,
|
|
710
|
+
borderRadius: constants.componentRadius.card,
|
|
712
711
|
boxShadowSecondary: componentShadow.dropdown,
|
|
713
712
|
},
|
|
714
713
|
FloatButton: {
|
|
715
714
|
colorBgElevated: colors.surface.overlay,
|
|
716
715
|
colorPrimary: colors.link.default,
|
|
717
|
-
borderRadiusLG: componentRadius.avatar,
|
|
716
|
+
borderRadiusLG: constants.componentRadius.avatar,
|
|
718
717
|
boxShadow: componentShadow.dropdown,
|
|
719
718
|
},
|
|
720
719
|
Segmented: {
|
|
@@ -724,8 +723,8 @@ export const buildAntDTheme = (colors) => {
|
|
|
724
723
|
itemHoverBg: colors.surface.interactive,
|
|
725
724
|
itemSelectedBg: colors.surface.card,
|
|
726
725
|
itemSelectedColor: colors.text.primary,
|
|
727
|
-
borderRadius: radius.base,
|
|
728
|
-
borderRadiusSM: radius.sm,
|
|
726
|
+
borderRadius: constants.radius.base,
|
|
727
|
+
borderRadiusSM: constants.radius.sm,
|
|
729
728
|
},
|
|
730
729
|
Mentions: {
|
|
731
730
|
colorBgContainer: colors.surface.card,
|
|
@@ -738,7 +737,7 @@ export const buildAntDTheme = (colors) => {
|
|
|
738
737
|
Transfer: {
|
|
739
738
|
colorBgContainer: colors.surface.card,
|
|
740
739
|
colorBorder: colors.border.default,
|
|
741
|
-
itemPaddingBlock: spacing[1],
|
|
740
|
+
itemPaddingBlock: constants.spacing[1],
|
|
742
741
|
},
|
|
743
742
|
Cascader: {
|
|
744
743
|
colorBgContainer: colors.surface.card,
|
|
@@ -761,20 +760,20 @@ export const buildAntDTheme = (colors) => {
|
|
|
761
760
|
Empty: {
|
|
762
761
|
colorText: colors.text.secondary,
|
|
763
762
|
colorTextDescription: colors.text.tertiary,
|
|
764
|
-
fontSize: typography.fontSize.base,
|
|
763
|
+
fontSize: constants.typography.fontSize.base,
|
|
765
764
|
},
|
|
766
765
|
List: {
|
|
767
766
|
colorBorder: colors.border.subtle,
|
|
768
767
|
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`,
|
|
768
|
+
itemPadding: `${constants.spacing[3]}px ${constants.spacing[6]}px`,
|
|
769
|
+
itemPaddingSM: `${constants.spacing[2]}px ${constants.spacing[4]}px`,
|
|
770
|
+
itemPaddingLG: `${constants.spacing[4]}px ${constants.spacing[6]}px`,
|
|
772
771
|
headerBg: 'transparent',
|
|
773
772
|
footerBg: 'transparent',
|
|
774
|
-
emptyTextPadding: spacing[4],
|
|
775
|
-
metaMarginBottom: spacing[2],
|
|
776
|
-
avatarMarginRight: spacing[4],
|
|
777
|
-
titleMarginBottom: spacing[1],
|
|
773
|
+
emptyTextPadding: constants.spacing[4],
|
|
774
|
+
metaMarginBottom: constants.spacing[2],
|
|
775
|
+
avatarMarginRight: constants.spacing[4],
|
|
776
|
+
titleMarginBottom: constants.spacing[1],
|
|
778
777
|
},
|
|
779
778
|
},
|
|
780
779
|
};
|