@temboplus/frontend-react-core 0.1.3-beta.11 → 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.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/providers.d.ts +0 -21
- package/dist/providers.js +0 -21
- package/dist/{tembo-notify-Bh92g5d-.js → tembo-notify-CW2KXwZW.js} +2 -2
- package/dist/{tembo-notify-Bh92g5d-.js.map → tembo-notify-CW2KXwZW.js.map} +1 -1
- package/dist/{tembo-notify-D_LOB3jW.js → tembo-notify-EJeawMJ_.js} +2 -2
- package/dist/{tembo-notify-D_LOB3jW.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 +177 -159
- package/dist/theme/theme-provider.d.ts +10 -60
- package/dist/theme/theme-provider.js +14 -63
- 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-C31WJ-NK.js +0 -11
- package/dist/theme-provider-C31WJ-NK.js.map +0 -1
- package/dist/theme-provider-DH1PzDC8.js +0 -11
- package/dist/theme-provider-DH1PzDC8.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
|
|
@@ -217,6 +216,8 @@ export const buildAntDTheme = (colors) => {
|
|
|
217
216
|
colorBorder: colors.border.default,
|
|
218
217
|
colorText: colors.text.primary,
|
|
219
218
|
colorTextPlaceholder: colors.text.tertiary,
|
|
219
|
+
colorIcon: colors.text.tertiary,
|
|
220
|
+
colorIconHover: colors.text.secondary,
|
|
220
221
|
hoverBorderColor: colors.border.strong,
|
|
221
222
|
activeBorderColor: colors.link.default,
|
|
222
223
|
activeShadow: `0 0 0 2px ${colors.semantic.info.subtle}`,
|
|
@@ -225,20 +226,23 @@ export const buildAntDTheme = (colors) => {
|
|
|
225
226
|
controlHeight: 40,
|
|
226
227
|
controlHeightLG: 48,
|
|
227
228
|
controlHeightSM: 32,
|
|
228
|
-
paddingBlock: spacing[2],
|
|
229
|
-
paddingInline: spacing[3],
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
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,
|
|
233
235
|
},
|
|
234
236
|
InputNumber: {
|
|
235
237
|
colorBgContainer: colors.surface.card,
|
|
236
238
|
colorBorder: colors.border.default,
|
|
237
239
|
hoverBorderColor: colors.border.strong,
|
|
238
240
|
activeBorderColor: colors.link.default,
|
|
241
|
+
colorIcon: colors.text.tertiary,
|
|
242
|
+
colorIconHover: colors.text.secondary,
|
|
239
243
|
activeShadow: `0 0 0 2px ${colors.semantic.info.subtle}`,
|
|
240
244
|
controlHeight: 40,
|
|
241
|
-
borderRadius: componentRadius.input,
|
|
245
|
+
borderRadius: constants.componentRadius.input,
|
|
242
246
|
handleVisible: true,
|
|
243
247
|
},
|
|
244
248
|
Select: {
|
|
@@ -247,6 +251,8 @@ export const buildAntDTheme = (colors) => {
|
|
|
247
251
|
colorBorder: colors.border.default,
|
|
248
252
|
colorText: colors.text.primary,
|
|
249
253
|
colorTextPlaceholder: colors.text.tertiary,
|
|
254
|
+
colorIcon: colors.text.tertiary,
|
|
255
|
+
colorIconHover: colors.text.secondary,
|
|
250
256
|
hoverBorderColor: colors.border.strong,
|
|
251
257
|
controlItemBgHover: colors.surface.interactive,
|
|
252
258
|
activeBorderColor: colors.link.default,
|
|
@@ -256,9 +262,9 @@ export const buildAntDTheme = (colors) => {
|
|
|
256
262
|
controlHeight: 40,
|
|
257
263
|
controlHeightLG: 48,
|
|
258
264
|
controlHeightSM: 32,
|
|
259
|
-
borderRadius: componentRadius.input,
|
|
260
|
-
borderRadiusLG: componentRadius.input,
|
|
261
|
-
borderRadiusSM: componentRadius.input,
|
|
265
|
+
borderRadius: constants.componentRadius.input,
|
|
266
|
+
borderRadiusLG: constants.componentRadius.input,
|
|
267
|
+
borderRadiusSM: constants.componentRadius.input,
|
|
262
268
|
boxShadowSecondary: componentShadow.dropdown,
|
|
263
269
|
},
|
|
264
270
|
DatePicker: {
|
|
@@ -266,25 +272,31 @@ export const buildAntDTheme = (colors) => {
|
|
|
266
272
|
colorBorder: colors.border.default,
|
|
267
273
|
hoverBorderColor: colors.border.strong,
|
|
268
274
|
activeBorderColor: colors.link.default,
|
|
275
|
+
colorIcon: colors.text.tertiary,
|
|
276
|
+
colorIconHover: colors.text.secondary,
|
|
269
277
|
activeShadow: `0 0 0 2px ${colors.semantic.info.subtle}`,
|
|
270
278
|
cellHoverBg: colors.surface.interactive,
|
|
271
279
|
cellActiveWithRangeBg: colors.semantic.info.subtle,
|
|
272
280
|
colorPrimary: colors.link.default,
|
|
273
281
|
controlHeight: 40,
|
|
274
|
-
borderRadius: componentRadius.input,
|
|
282
|
+
borderRadius: constants.componentRadius.input,
|
|
275
283
|
},
|
|
276
284
|
Checkbox: {
|
|
277
285
|
colorPrimary: colors.link.default,
|
|
278
286
|
colorPrimaryHover: colors.link.hover,
|
|
279
287
|
colorBorder: colors.border.default,
|
|
280
288
|
colorBgContainer: colors.surface.card,
|
|
281
|
-
|
|
289
|
+
colorIcon: colors.text.tertiary,
|
|
290
|
+
colorIconHover: colors.text.secondary,
|
|
291
|
+
borderRadiusSM: constants.radius.sm,
|
|
282
292
|
},
|
|
283
293
|
Radio: {
|
|
284
294
|
colorPrimary: colors.link.default,
|
|
285
295
|
colorPrimaryHover: colors.link.hover,
|
|
286
296
|
colorBorder: colors.border.default,
|
|
287
297
|
colorBgContainer: colors.surface.card,
|
|
298
|
+
colorIcon: colors.text.tertiary,
|
|
299
|
+
colorIconHover: colors.text.secondary,
|
|
288
300
|
dotSize: 8,
|
|
289
301
|
},
|
|
290
302
|
Switch: {
|
|
@@ -292,12 +304,16 @@ export const buildAntDTheme = (colors) => {
|
|
|
292
304
|
colorPrimaryHover: colors.link.hover,
|
|
293
305
|
colorTextQuaternary: colors.text.disabled,
|
|
294
306
|
colorTextTertiary: colors.text.tertiary,
|
|
307
|
+
colorIcon: colors.text.tertiary,
|
|
308
|
+
colorIconHover: colors.text.secondary,
|
|
295
309
|
handleSize: 18,
|
|
296
310
|
},
|
|
297
311
|
Slider: {
|
|
298
312
|
colorPrimary: colors.link.default,
|
|
299
313
|
colorPrimaryBorder: colors.link.default,
|
|
300
314
|
colorPrimaryBorderHover: colors.link.hover,
|
|
315
|
+
colorIcon: colors.text.tertiary,
|
|
316
|
+
colorIconHover: colors.text.secondary,
|
|
301
317
|
handleColor: colors.surface.card,
|
|
302
318
|
handleActiveColor: colors.surface.card,
|
|
303
319
|
railBg: colors.neutral[2],
|
|
@@ -309,13 +325,15 @@ export const buildAntDTheme = (colors) => {
|
|
|
309
325
|
},
|
|
310
326
|
Form: {
|
|
311
327
|
labelColor: colors.text.primary,
|
|
312
|
-
labelFontSize: typography.fontSize.base,
|
|
328
|
+
labelFontSize: constants.typography.fontSize.base,
|
|
313
329
|
labelHeight: 32,
|
|
314
|
-
labelColonMarginInlineEnd: spacing[2],
|
|
315
|
-
labelColonMarginInlineStart: spacing[1],
|
|
316
|
-
itemMarginBottom:
|
|
317
|
-
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`,
|
|
318
334
|
labelRequiredMarkColor: colors.semantic.error.main,
|
|
335
|
+
colorIcon: colors.text.tertiary,
|
|
336
|
+
colorIconHover: colors.text.secondary,
|
|
319
337
|
},
|
|
320
338
|
// ========================================
|
|
321
339
|
// DATA DISPLAY
|
|
@@ -334,13 +352,13 @@ export const buildAntDTheme = (colors) => {
|
|
|
334
352
|
rowSelectedBg: colors.surface.selected,
|
|
335
353
|
rowSelectedHoverBg: colors.surface.selected,
|
|
336
354
|
rowExpandedBg: colors.surface.nested,
|
|
337
|
-
cellPaddingBlock: spacing[4],
|
|
338
|
-
cellPaddingInline: spacing[4],
|
|
339
|
-
cellPaddingBlockSM: spacing[2],
|
|
340
|
-
cellPaddingInlineSM: spacing[3],
|
|
341
|
-
borderRadius: componentRadius.card,
|
|
342
|
-
borderRadiusLG: componentRadius.card,
|
|
343
|
-
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,
|
|
344
362
|
footerBg: colors.surface.page,
|
|
345
363
|
},
|
|
346
364
|
Descriptions: {
|
|
@@ -348,9 +366,9 @@ export const buildAntDTheme = (colors) => {
|
|
|
348
366
|
titleColor: colors.text.primary,
|
|
349
367
|
contentColor: colors.text.primary,
|
|
350
368
|
extraColor: colors.text.secondary,
|
|
351
|
-
itemPaddingBottom: spacing[4],
|
|
352
|
-
colonMarginLeft: spacing[1],
|
|
353
|
-
colonMarginRight: spacing[2],
|
|
369
|
+
itemPaddingBottom: constants.spacing[4],
|
|
370
|
+
colonMarginLeft: constants.spacing[1],
|
|
371
|
+
colonMarginRight: constants.spacing[2],
|
|
354
372
|
},
|
|
355
373
|
Card: {
|
|
356
374
|
colorBgContainer: colors.surface.card,
|
|
@@ -358,14 +376,14 @@ export const buildAntDTheme = (colors) => {
|
|
|
358
376
|
colorTextHeading: colors.text.primary,
|
|
359
377
|
colorTextDescription: colors.text.secondary,
|
|
360
378
|
boxShadowTertiary: componentShadow.card,
|
|
361
|
-
borderRadius: componentRadius.card,
|
|
362
|
-
borderRadiusLG: componentRadius.card,
|
|
363
|
-
|
|
364
|
-
|
|
379
|
+
borderRadius: constants.componentRadius.card,
|
|
380
|
+
borderRadiusLG: constants.componentRadius.card,
|
|
381
|
+
padding: constants.spacing[4],
|
|
382
|
+
paddingLG: constants.spacing[6],
|
|
365
383
|
},
|
|
366
384
|
Statistic: {
|
|
367
|
-
titleFontSize: typography.fontSize.base,
|
|
368
|
-
contentFontSize: typography.fontSize['4xl'],
|
|
385
|
+
titleFontSize: constants.typography.fontSize.base,
|
|
386
|
+
contentFontSize: constants.typography.fontSize['4xl'],
|
|
369
387
|
colorTextHeading: colors.text.primary,
|
|
370
388
|
colorTextDescription: colors.text.secondary,
|
|
371
389
|
},
|
|
@@ -374,16 +392,16 @@ export const buildAntDTheme = (colors) => {
|
|
|
374
392
|
tailWidth: 2,
|
|
375
393
|
dotBg: colors.surface.card,
|
|
376
394
|
dotBorderWidth: 2,
|
|
377
|
-
itemPaddingBottom: spacing[5],
|
|
395
|
+
itemPaddingBottom: constants.spacing[5],
|
|
378
396
|
},
|
|
379
397
|
Tag: {
|
|
380
398
|
defaultBg: colors.neutral[2],
|
|
381
399
|
defaultColor: colors.text.primary,
|
|
382
400
|
colorBorder: colors.border.default,
|
|
383
401
|
colorText: colors.text.primary,
|
|
384
|
-
borderRadiusSM: componentRadius.badge,
|
|
385
|
-
fontSize: typography.fontSize.sm,
|
|
386
|
-
fontSizeSM: typography.fontSize.xs,
|
|
402
|
+
borderRadiusSM: constants.componentRadius.badge,
|
|
403
|
+
fontSize: constants.typography.fontSize.sm,
|
|
404
|
+
fontSizeSM: constants.typography.fontSize.xs,
|
|
387
405
|
},
|
|
388
406
|
Badge: {
|
|
389
407
|
colorBorderBg: colors.surface.card,
|
|
@@ -391,7 +409,7 @@ export const buildAntDTheme = (colors) => {
|
|
|
391
409
|
colorSuccess: colors.semantic.success.main,
|
|
392
410
|
colorInfo: colors.semantic.info.main,
|
|
393
411
|
colorWarning: colors.semantic.warning.main,
|
|
394
|
-
textFontSize: typography.fontSize.xs,
|
|
412
|
+
textFontSize: constants.typography.fontSize.xs,
|
|
395
413
|
textFontSizeSM: 10,
|
|
396
414
|
indicatorHeight: 6,
|
|
397
415
|
indicatorHeightSM: 6,
|
|
@@ -403,9 +421,9 @@ export const buildAntDTheme = (colors) => {
|
|
|
403
421
|
containerSize: 32,
|
|
404
422
|
containerSizeLG: 40,
|
|
405
423
|
containerSizeSM: 24,
|
|
406
|
-
borderRadius: componentRadius.avatar,
|
|
424
|
+
borderRadius: constants.componentRadius.avatar,
|
|
407
425
|
groupOverlapping: -8,
|
|
408
|
-
groupSpace: spacing[1],
|
|
426
|
+
groupSpace: constants.spacing[1],
|
|
409
427
|
},
|
|
410
428
|
Calendar: {
|
|
411
429
|
colorBgContainer: colors.surface.card,
|
|
@@ -413,15 +431,15 @@ export const buildAntDTheme = (colors) => {
|
|
|
413
431
|
fullBg: colors.surface.card,
|
|
414
432
|
fullPanelBg: colors.surface.card,
|
|
415
433
|
itemActiveBg: colors.semantic.info.subtle,
|
|
416
|
-
borderRadius: componentRadius.card,
|
|
434
|
+
borderRadius: constants.componentRadius.card,
|
|
417
435
|
},
|
|
418
436
|
Collapse: {
|
|
419
437
|
colorBgContainer: colors.surface.card,
|
|
420
438
|
colorBorder: colors.border.default,
|
|
421
439
|
headerBg: colors.surface.page,
|
|
422
|
-
headerPadding: `${spacing[3]}px ${spacing[4]}px`,
|
|
423
|
-
contentPadding: `${spacing[4]}px ${spacing[4]}px`,
|
|
424
|
-
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,
|
|
425
443
|
},
|
|
426
444
|
Carousel: {
|
|
427
445
|
colorBgContainer: colors.surface.card,
|
|
@@ -434,7 +452,7 @@ export const buildAntDTheme = (colors) => {
|
|
|
434
452
|
nodeHoverBg: colors.surface.interactive,
|
|
435
453
|
nodeSelectedBg: colors.surface.selected,
|
|
436
454
|
titleHeight: 32,
|
|
437
|
-
borderRadius: radius.sm,
|
|
455
|
+
borderRadius: constants.radius.sm,
|
|
438
456
|
},
|
|
439
457
|
// ========================================
|
|
440
458
|
// FEEDBACK
|
|
@@ -452,9 +470,9 @@ export const buildAntDTheme = (colors) => {
|
|
|
452
470
|
colorInfoBg: colors.semantic.info.subtle,
|
|
453
471
|
colorInfoBorder: colors.semantic.info.main,
|
|
454
472
|
colorInfoText: colors.semantic.info.main,
|
|
455
|
-
defaultPadding: `${spacing[3]}px ${spacing[4]}px`,
|
|
456
|
-
withDescriptionPadding: `${spacing[4]}px ${spacing[5]}px`,
|
|
457
|
-
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,
|
|
458
476
|
},
|
|
459
477
|
Modal: {
|
|
460
478
|
contentBg: colors.surface.overlay,
|
|
@@ -462,35 +480,35 @@ export const buildAntDTheme = (colors) => {
|
|
|
462
480
|
footerBg: colors.surface.overlay,
|
|
463
481
|
titleColor: colors.text.primary,
|
|
464
482
|
colorBgMask: isDark ? 'rgba(0, 0, 0, 0.65)' : 'rgba(0, 0, 0, 0.45)',
|
|
465
|
-
borderRadiusLG: componentRadius.modal,
|
|
483
|
+
borderRadiusLG: constants.componentRadius.modal,
|
|
466
484
|
boxShadow: componentShadow.modal,
|
|
467
485
|
},
|
|
468
486
|
Drawer: {
|
|
469
487
|
colorBgElevated: colors.surface.overlay,
|
|
470
488
|
colorBgMask: isDark ? 'rgba(0, 0, 0, 0.65)' : 'rgba(0, 0, 0, 0.45)',
|
|
471
|
-
borderRadiusLG: componentRadius.modal,
|
|
472
|
-
footerPaddingBlock: spacing[4],
|
|
473
|
-
footerPaddingInline: spacing[6],
|
|
489
|
+
borderRadiusLG: constants.componentRadius.modal,
|
|
490
|
+
footerPaddingBlock: constants.spacing[4],
|
|
491
|
+
footerPaddingInline: constants.spacing[6],
|
|
474
492
|
},
|
|
475
493
|
Notification: {
|
|
476
494
|
colorBgElevated: colors.surface.overlay,
|
|
477
495
|
colorText: colors.text.primary,
|
|
478
496
|
colorTextHeading: colors.text.primary,
|
|
479
|
-
borderRadiusLG: componentRadius.card,
|
|
497
|
+
borderRadiusLG: constants.componentRadius.card,
|
|
480
498
|
boxShadow: componentShadow.dropdown,
|
|
481
|
-
padding: spacing[4],
|
|
482
|
-
paddingContentHorizontal: spacing[4],
|
|
499
|
+
padding: constants.spacing[4],
|
|
500
|
+
paddingContentHorizontal: constants.spacing[4],
|
|
483
501
|
},
|
|
484
502
|
Message: {
|
|
485
503
|
contentBg: colors.surface.overlay,
|
|
486
|
-
contentPadding: `${spacing[2]}px ${spacing[4]}px`,
|
|
487
|
-
borderRadiusLG: componentRadius.card,
|
|
504
|
+
contentPadding: `${constants.spacing[2]}px ${constants.spacing[4]}px`,
|
|
505
|
+
borderRadiusLG: constants.componentRadius.card,
|
|
488
506
|
boxShadow: componentShadow.dropdown,
|
|
489
507
|
},
|
|
490
508
|
Popconfirm: {
|
|
491
509
|
colorBgElevated: colors.surface.overlay,
|
|
492
510
|
colorWarning: colors.semantic.warning.main,
|
|
493
|
-
borderRadiusLG: componentRadius.card,
|
|
511
|
+
borderRadiusLG: constants.componentRadius.card,
|
|
494
512
|
boxShadowSecondary: componentShadow.dropdown,
|
|
495
513
|
},
|
|
496
514
|
Progress: {
|
|
@@ -503,15 +521,15 @@ export const buildAntDTheme = (colors) => {
|
|
|
503
521
|
lineBorderRadius: 100,
|
|
504
522
|
},
|
|
505
523
|
Result: {
|
|
506
|
-
titleFontSize: typography.fontSize['3xl'],
|
|
507
|
-
subtitleFontSize: typography.fontSize.base,
|
|
508
|
-
iconFontSize: typography.fontSize['5xl'],
|
|
509
|
-
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`,
|
|
510
528
|
},
|
|
511
529
|
Skeleton: {
|
|
512
530
|
colorFill: colors.neutral[2],
|
|
513
531
|
colorFillContent: colors.neutral[1],
|
|
514
|
-
borderRadiusSM: radius.sm,
|
|
532
|
+
borderRadiusSM: constants.radius.sm,
|
|
515
533
|
},
|
|
516
534
|
Spin: {
|
|
517
535
|
colorPrimary: colors.link.default,
|
|
@@ -539,9 +557,9 @@ export const buildAntDTheme = (colors) => {
|
|
|
539
557
|
darkItemHoverColor: colors.absolute.white,
|
|
540
558
|
darkItemSelectedBg: colors.link.default,
|
|
541
559
|
darkItemSelectedColor: colors.absolute.white,
|
|
542
|
-
itemBorderRadius: componentRadius.input,
|
|
560
|
+
itemBorderRadius: constants.componentRadius.input,
|
|
543
561
|
itemHeight: 40,
|
|
544
|
-
itemPaddingInline: spacing[4],
|
|
562
|
+
itemPaddingInline: constants.spacing[4],
|
|
545
563
|
iconSize: 16,
|
|
546
564
|
collapsedIconSize: 16,
|
|
547
565
|
collapsedWidth: 64,
|
|
@@ -552,9 +570,9 @@ export const buildAntDTheme = (colors) => {
|
|
|
552
570
|
linkColor: colors.link.default,
|
|
553
571
|
linkHoverColor: colors.link.hover,
|
|
554
572
|
separatorColor: colors.text.tertiary,
|
|
555
|
-
separatorMargin: spacing[2],
|
|
556
|
-
iconFontSize: typography.fontSize.base,
|
|
557
|
-
fontSize: typography.fontSize.base,
|
|
573
|
+
separatorMargin: constants.spacing[2],
|
|
574
|
+
iconFontSize: constants.typography.fontSize.base,
|
|
575
|
+
fontSize: constants.typography.fontSize.base,
|
|
558
576
|
},
|
|
559
577
|
Pagination: {
|
|
560
578
|
colorPrimary: colors.link.default,
|
|
@@ -566,7 +584,7 @@ export const buildAntDTheme = (colors) => {
|
|
|
566
584
|
itemInputBg: colors.surface.card,
|
|
567
585
|
itemSize: 32,
|
|
568
586
|
itemSizeSM: 24,
|
|
569
|
-
borderRadius: radius.sm,
|
|
587
|
+
borderRadius: constants.radius.sm,
|
|
570
588
|
},
|
|
571
589
|
Steps: {
|
|
572
590
|
colorPrimary: colors.link.default,
|
|
@@ -585,26 +603,26 @@ export const buildAntDTheme = (colors) => {
|
|
|
585
603
|
itemActiveColor: colors.link.default,
|
|
586
604
|
inkBarColor: colors.link.default,
|
|
587
605
|
colorBorderSecondary: colors.border.default,
|
|
588
|
-
titleFontSize: typography.fontSize.base,
|
|
589
|
-
titleFontSizeLG: typography.fontSize.lg,
|
|
590
|
-
titleFontSizeSM: typography.fontSize.sm,
|
|
606
|
+
titleFontSize: constants.typography.fontSize.base,
|
|
607
|
+
titleFontSizeLG: constants.typography.fontSize.lg,
|
|
608
|
+
titleFontSizeSM: constants.typography.fontSize.sm,
|
|
591
609
|
cardBg: colors.surface.card,
|
|
592
|
-
cardPadding: `${spacing[2]}px ${spacing[4]}px`,
|
|
593
|
-
horizontalItemPadding: `${spacing[3]}px 0`,
|
|
594
|
-
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`,
|
|
595
613
|
},
|
|
596
614
|
Anchor: {
|
|
597
615
|
colorPrimary: colors.link.default,
|
|
598
|
-
linkPaddingBlock: spacing[1],
|
|
599
|
-
linkPaddingInlineStart: spacing[4],
|
|
616
|
+
linkPaddingBlock: constants.spacing[1],
|
|
617
|
+
linkPaddingInlineStart: constants.spacing[4],
|
|
600
618
|
},
|
|
601
619
|
Dropdown: {
|
|
602
620
|
colorBgElevated: colors.surface.overlay,
|
|
603
621
|
controlItemBgHover: colors.surface.interactive,
|
|
604
622
|
controlItemBgActive: colors.surface.selected,
|
|
605
623
|
boxShadowSecondary: componentShadow.dropdown,
|
|
606
|
-
paddingBlock: spacing[1],
|
|
607
|
-
borderRadiusLG: componentRadius.card,
|
|
624
|
+
paddingBlock: constants.spacing[1],
|
|
625
|
+
borderRadiusLG: constants.componentRadius.card,
|
|
608
626
|
},
|
|
609
627
|
// ========================================
|
|
610
628
|
// LAYOUT
|
|
@@ -616,9 +634,9 @@ export const buildAntDTheme = (colors) => {
|
|
|
616
634
|
siderBg: colors.absolute.black,
|
|
617
635
|
headerBg: colors.surface.card,
|
|
618
636
|
headerHeight: 64,
|
|
619
|
-
headerPadding: `0 ${spacing[6]}px`,
|
|
637
|
+
headerPadding: `0 ${constants.spacing[6]}px`,
|
|
620
638
|
footerBg: colors.surface.card,
|
|
621
|
-
footerPadding: `${spacing[6]}px ${spacing[12]}px`,
|
|
639
|
+
footerPadding: `${constants.spacing[6]}px ${constants.spacing[12]}px`,
|
|
622
640
|
bodyBg: colors.surface.page,
|
|
623
641
|
triggerHeight: 48,
|
|
624
642
|
triggerBg: colors.absolute.black,
|
|
@@ -633,7 +651,7 @@ export const buildAntDTheme = (colors) => {
|
|
|
633
651
|
colorSplit: colors.border.subtle,
|
|
634
652
|
colorText: colors.text.tertiary,
|
|
635
653
|
orientationMargin: 0.05,
|
|
636
|
-
verticalMarginInline: spacing[2],
|
|
654
|
+
verticalMarginInline: constants.spacing[2],
|
|
637
655
|
},
|
|
638
656
|
// ========================================
|
|
639
657
|
// OTHER
|
|
@@ -645,31 +663,31 @@ export const buildAntDTheme = (colors) => {
|
|
|
645
663
|
colorLink: colors.link.default,
|
|
646
664
|
colorLinkHover: colors.link.hover,
|
|
647
665
|
colorLinkActive: colors.link.active,
|
|
648
|
-
titleMarginBottom: spacing[2],
|
|
649
|
-
titleMarginTop: spacing[4],
|
|
650
|
-
fontSizeHeading1: typography.fontSize['5xl'],
|
|
651
|
-
fontSizeHeading2: typography.fontSize['4xl'],
|
|
652
|
-
fontSizeHeading3: typography.fontSize['3xl'],
|
|
653
|
-
fontSizeHeading4: typography.fontSize['2xl'],
|
|
654
|
-
fontSizeHeading5: typography.fontSize.xl,
|
|
655
|
-
lineHeightHeading1: typography.lineHeight.tight,
|
|
656
|
-
lineHeightHeading2: typography.lineHeight.tight,
|
|
657
|
-
lineHeightHeading3: typography.lineHeight.tight,
|
|
658
|
-
lineHeightHeading4: typography.lineHeight.tight,
|
|
659
|
-
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,
|
|
660
678
|
},
|
|
661
679
|
Tooltip: {
|
|
662
680
|
colorBgSpotlight: colors.neutral[4],
|
|
663
681
|
colorTextLightSolid: colors.text.inverse,
|
|
664
|
-
borderRadius: radius.sm,
|
|
682
|
+
borderRadius: constants.radius.sm,
|
|
665
683
|
boxShadowSecondary: componentShadow.tooltip,
|
|
666
684
|
},
|
|
667
685
|
Popover: {
|
|
668
686
|
colorBgElevated: colors.surface.overlay,
|
|
669
687
|
colorText: colors.text.primary,
|
|
670
|
-
borderRadiusLG: componentRadius.card,
|
|
688
|
+
borderRadiusLG: constants.componentRadius.card,
|
|
671
689
|
boxShadowSecondary: componentShadow.dropdown,
|
|
672
|
-
padding: spacing[3],
|
|
690
|
+
padding: constants.spacing[3],
|
|
673
691
|
},
|
|
674
692
|
Image: {
|
|
675
693
|
previewOperationColor: colors.absolute.white,
|
|
@@ -689,13 +707,13 @@ export const buildAntDTheme = (colors) => {
|
|
|
689
707
|
Tour: {
|
|
690
708
|
colorBgElevated: colors.surface.overlay,
|
|
691
709
|
colorPrimary: colors.link.default,
|
|
692
|
-
borderRadius: componentRadius.card,
|
|
710
|
+
borderRadius: constants.componentRadius.card,
|
|
693
711
|
boxShadowSecondary: componentShadow.dropdown,
|
|
694
712
|
},
|
|
695
713
|
FloatButton: {
|
|
696
714
|
colorBgElevated: colors.surface.overlay,
|
|
697
715
|
colorPrimary: colors.link.default,
|
|
698
|
-
borderRadiusLG: componentRadius.avatar,
|
|
716
|
+
borderRadiusLG: constants.componentRadius.avatar,
|
|
699
717
|
boxShadow: componentShadow.dropdown,
|
|
700
718
|
},
|
|
701
719
|
Segmented: {
|
|
@@ -705,8 +723,8 @@ export const buildAntDTheme = (colors) => {
|
|
|
705
723
|
itemHoverBg: colors.surface.interactive,
|
|
706
724
|
itemSelectedBg: colors.surface.card,
|
|
707
725
|
itemSelectedColor: colors.text.primary,
|
|
708
|
-
borderRadius: radius.base,
|
|
709
|
-
borderRadiusSM: radius.sm,
|
|
726
|
+
borderRadius: constants.radius.base,
|
|
727
|
+
borderRadiusSM: constants.radius.sm,
|
|
710
728
|
},
|
|
711
729
|
Mentions: {
|
|
712
730
|
colorBgContainer: colors.surface.card,
|
|
@@ -719,7 +737,7 @@ export const buildAntDTheme = (colors) => {
|
|
|
719
737
|
Transfer: {
|
|
720
738
|
colorBgContainer: colors.surface.card,
|
|
721
739
|
colorBorder: colors.border.default,
|
|
722
|
-
itemPaddingBlock: spacing[1],
|
|
740
|
+
itemPaddingBlock: constants.spacing[1],
|
|
723
741
|
},
|
|
724
742
|
Cascader: {
|
|
725
743
|
colorBgContainer: colors.surface.card,
|
|
@@ -742,20 +760,20 @@ export const buildAntDTheme = (colors) => {
|
|
|
742
760
|
Empty: {
|
|
743
761
|
colorText: colors.text.secondary,
|
|
744
762
|
colorTextDescription: colors.text.tertiary,
|
|
745
|
-
fontSize: typography.fontSize.base,
|
|
763
|
+
fontSize: constants.typography.fontSize.base,
|
|
746
764
|
},
|
|
747
765
|
List: {
|
|
748
766
|
colorBorder: colors.border.subtle,
|
|
749
767
|
colorSplit: colors.border.subtle,
|
|
750
|
-
itemPadding: `${spacing[3]}px ${spacing[6]}px`,
|
|
751
|
-
itemPaddingSM: `${spacing[2]}px ${spacing[4]}px`,
|
|
752
|
-
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`,
|
|
753
771
|
headerBg: 'transparent',
|
|
754
772
|
footerBg: 'transparent',
|
|
755
|
-
emptyTextPadding: spacing[4],
|
|
756
|
-
metaMarginBottom: spacing[2],
|
|
757
|
-
avatarMarginRight: spacing[4],
|
|
758
|
-
titleMarginBottom: spacing[1],
|
|
773
|
+
emptyTextPadding: constants.spacing[4],
|
|
774
|
+
metaMarginBottom: constants.spacing[2],
|
|
775
|
+
avatarMarginRight: constants.spacing[4],
|
|
776
|
+
titleMarginBottom: constants.spacing[1],
|
|
759
777
|
},
|
|
760
778
|
},
|
|
761
779
|
};
|