@akinon/ui-theme 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/colors.d.ts +7 -0
- package/dist/cjs/colors.d.ts.map +1 -1
- package/dist/cjs/colors.js +8 -1
- package/dist/cjs/theme.d.ts +11 -2
- package/dist/cjs/theme.d.ts.map +1 -1
- package/dist/cjs/theme.js +173 -107
- package/dist/cjs/types.d.ts +27 -66
- package/dist/esm/colors.d.ts +7 -0
- package/dist/esm/colors.d.ts.map +1 -1
- package/dist/esm/colors.js +8 -1
- package/dist/esm/theme.d.ts +11 -2
- package/dist/esm/theme.d.ts.map +1 -1
- package/dist/esm/theme.js +172 -107
- package/dist/esm/types.d.ts +27 -66
- package/package.json +2 -2
package/dist/cjs/theme.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getCssVariables = exports.useToken = exports.theme = exports.fontSize = void 0;
|
|
4
|
+
exports.getSafeCustomTokens = getSafeCustomTokens;
|
|
4
5
|
const antd_1 = require("antd");
|
|
5
6
|
const colors_1 = require("./colors");
|
|
6
7
|
// antd works with numbers. use this to convert px to rem.
|
|
@@ -51,7 +52,7 @@ exports.theme = {
|
|
|
51
52
|
fontFamily: "'Jost Variable'," + antd_1.theme.getDesignToken().fontFamily,
|
|
52
53
|
fontSize: exports.fontSize * 0.875
|
|
53
54
|
},
|
|
54
|
-
|
|
55
|
+
CustomTokens: {
|
|
55
56
|
layout: {
|
|
56
57
|
displayFlex: 'flex',
|
|
57
58
|
displayGrid: 'grid',
|
|
@@ -59,11 +60,18 @@ exports.theme = {
|
|
|
59
60
|
displayInline: 'inline',
|
|
60
61
|
displayInlineBlock: 'inline-block',
|
|
61
62
|
displayNone: 'none',
|
|
63
|
+
displayContents: 'contents',
|
|
62
64
|
positionAbsolute: 'absolute',
|
|
63
65
|
positionRelative: 'relative',
|
|
64
66
|
positionFixed: 'fixed',
|
|
65
67
|
positionSticky: 'sticky',
|
|
66
|
-
positionStatic: 'static'
|
|
68
|
+
positionStatic: 'static',
|
|
69
|
+
flexStart: 'start',
|
|
70
|
+
flexCenter: 'center',
|
|
71
|
+
flexDirectionRow: 'row',
|
|
72
|
+
flexDirectionRowReverse: 'row-reverse',
|
|
73
|
+
flexDirectionColumn: 'column',
|
|
74
|
+
flexDirectionColumnReverse: 'column-reverse'
|
|
67
75
|
},
|
|
68
76
|
typography: {
|
|
69
77
|
textTransformUppercase: 'uppercase',
|
|
@@ -78,9 +86,13 @@ exports.theme = {
|
|
|
78
86
|
whiteSpacePre: 'pre',
|
|
79
87
|
whiteSpacePreLine: 'pre-line',
|
|
80
88
|
whiteSpacePreWrap: 'pre-wrap',
|
|
89
|
+
whiteSpaceBreakSpaces: 'break-spaces',
|
|
90
|
+
wordBreak: 'break-word',
|
|
81
91
|
textDecorationUnderline: 'underline',
|
|
82
92
|
textDecorationOverline: 'overline',
|
|
83
|
-
textDecorationLineThrough: 'line-through'
|
|
93
|
+
textDecorationLineThrough: 'line-through',
|
|
94
|
+
fontWeightBold: '600',
|
|
95
|
+
fontWeightMedium: '500'
|
|
84
96
|
},
|
|
85
97
|
sizing: {
|
|
86
98
|
sizeMaxContent: 'max-content',
|
|
@@ -91,7 +103,8 @@ exports.theme = {
|
|
|
91
103
|
valueHalf: '50%',
|
|
92
104
|
valueQuarter: '25%',
|
|
93
105
|
valueZero: '0',
|
|
94
|
-
valueAuto: 'auto'
|
|
106
|
+
valueAuto: 'auto',
|
|
107
|
+
valueInherit: 'inherit'
|
|
95
108
|
},
|
|
96
109
|
others: {
|
|
97
110
|
colorTransparent: 'transparent',
|
|
@@ -99,7 +112,12 @@ exports.theme = {
|
|
|
99
112
|
valueUnset: 'unset',
|
|
100
113
|
emptyContent: '""',
|
|
101
114
|
lineHeightShort: '1',
|
|
102
|
-
lineHeightTall: '2'
|
|
115
|
+
lineHeightTall: '2',
|
|
116
|
+
cursorNotAllowed: 'not-allowed',
|
|
117
|
+
cursorPointer: 'pointer',
|
|
118
|
+
verticalAlignMiddle: 'middle',
|
|
119
|
+
opacityFull: '1',
|
|
120
|
+
opacityNone: '0'
|
|
103
121
|
},
|
|
104
122
|
border: {
|
|
105
123
|
borderNone: 'none',
|
|
@@ -107,7 +125,8 @@ exports.theme = {
|
|
|
107
125
|
borderDashed: 'dashed',
|
|
108
126
|
borderDotted: 'dotted',
|
|
109
127
|
borderWidthThin: '1px',
|
|
110
|
-
borderWidthThick: '2px'
|
|
128
|
+
borderWidthThick: '2px',
|
|
129
|
+
borderRadiusSm: '0.125rem'
|
|
111
130
|
},
|
|
112
131
|
overflow: {
|
|
113
132
|
overflowVisible: 'visible',
|
|
@@ -115,6 +134,9 @@ exports.theme = {
|
|
|
115
134
|
overflowScroll: 'scroll'
|
|
116
135
|
}
|
|
117
136
|
},
|
|
137
|
+
NavCardTokens: {
|
|
138
|
+
shadow: '2px 2px 4px 0 rgba(0, 0, 0, 0.2)'
|
|
139
|
+
},
|
|
118
140
|
components: {
|
|
119
141
|
// TODO: Please order these props alphabetically.
|
|
120
142
|
Button: {
|
|
@@ -123,7 +145,6 @@ exports.theme = {
|
|
|
123
145
|
colorPrimaryHover: colors.azure['600'],
|
|
124
146
|
colorPrimaryActive: colors.azure['700'],
|
|
125
147
|
colorPrimaryText: colors.neutral['50'],
|
|
126
|
-
primaryShadow: 'unset',
|
|
127
148
|
// type: default (secondary)
|
|
128
149
|
defaultBg: colors.neutral['50'],
|
|
129
150
|
defaultColor: colors.azure['500'],
|
|
@@ -132,7 +153,6 @@ exports.theme = {
|
|
|
132
153
|
defaultActiveBg: colors.neutral['50'],
|
|
133
154
|
defaultActiveColor: colors.azure['500'],
|
|
134
155
|
defaultBorderColor: colors.azure['500'],
|
|
135
|
-
defaultShadow: 'unset',
|
|
136
156
|
defaultBgSm: colors.gray['750'],
|
|
137
157
|
defaultBgSmHover: colors.gray['800'],
|
|
138
158
|
// prop: danger
|
|
@@ -140,7 +160,6 @@ exports.theme = {
|
|
|
140
160
|
colorErrorHover: colors.red['500'],
|
|
141
161
|
colorErrorActive: colors.red['600'],
|
|
142
162
|
colorErrorBorder: colors.red['500'],
|
|
143
|
-
dangerShadow: 'unset',
|
|
144
163
|
colorErrorBgSM: colors.red['425'],
|
|
145
164
|
colorErrorBgSMHover: colors.red['450'],
|
|
146
165
|
colorErrorSMHover: colors.neutral['50'],
|
|
@@ -160,7 +179,6 @@ exports.theme = {
|
|
|
160
179
|
colorTextDisabled: colors.neutral['350'],
|
|
161
180
|
borderColorDisabled: colors.neutral['350'],
|
|
162
181
|
// prop: ghost
|
|
163
|
-
defaultGhostBorderColor: 'transparent',
|
|
164
182
|
defaultGhostColor: colors.azure['500'],
|
|
165
183
|
// all buttons
|
|
166
184
|
contentFontSizeSM: exports.fontSize * 0.75,
|
|
@@ -169,13 +187,15 @@ exports.theme = {
|
|
|
169
187
|
paddingInlineSM: 20,
|
|
170
188
|
colorText: colors.neutral['50'],
|
|
171
189
|
colorTextHover: colors.neutral['50'],
|
|
172
|
-
contentLineHeightSM: 1,
|
|
173
190
|
controlHeight: 40,
|
|
174
191
|
borderRadius: 5,
|
|
175
192
|
paddingBlock: 10,
|
|
176
193
|
paddingInline: 45,
|
|
177
194
|
contentLineHeight: 'normal',
|
|
178
|
-
fontWeight: 600
|
|
195
|
+
fontWeight: 600,
|
|
196
|
+
defaultShadow: 'none',
|
|
197
|
+
primaryShadow: 'none',
|
|
198
|
+
dangerShadow: 'none'
|
|
179
199
|
},
|
|
180
200
|
Checkbox: {
|
|
181
201
|
colorPrimary: colors.ebonyClay['25'],
|
|
@@ -225,33 +245,22 @@ exports.theme = {
|
|
|
225
245
|
lightSubIconColor: `${colors.ebonyClay['125']} !important`,
|
|
226
246
|
lightchildItemBg: `${colors.neutral['350']} !important`,
|
|
227
247
|
lightChildItemColor: `${colors.ebonyClay['500']} !important`,
|
|
228
|
-
itemBorderRadius: 0,
|
|
229
|
-
itemMarginBlock: 0,
|
|
230
|
-
itemMarginInline: 0,
|
|
231
248
|
itemHeight: exports.fontSize * 3.25,
|
|
232
|
-
none: 'none !important',
|
|
233
|
-
unset: 'unset !important',
|
|
234
|
-
iconPosition: 'absolute !important',
|
|
235
249
|
mainBorder: `1px solid ${colors.gray['900']}`,
|
|
236
250
|
mainMenuIconSize: '12px !important',
|
|
237
251
|
mainMenuExpandIconSize: '16px !important',
|
|
238
|
-
mainMenuColor: colors.neutral['50']
|
|
239
|
-
mainMenuFontWeight: '600 !important',
|
|
252
|
+
mainMenuColor: `${colors.neutral['50']} !important`,
|
|
240
253
|
subMenuTitleColor: `${colors.gray['500']} !important`,
|
|
241
254
|
subMenuTitleIconMargin: '-25px !important',
|
|
242
|
-
subMenufontWeigth: '500 !important',
|
|
243
255
|
subMenuOnlyChildSize: '6px !important',
|
|
244
256
|
subMenuItemSelectedChildColor: `${colors.neutral['50']} !important`,
|
|
245
|
-
subMenuOnlyChildRadius: '50% !important',
|
|
246
257
|
subMenuOnlyChildBgColor: `${colors.ebonyClay['125']} !important`,
|
|
247
258
|
subMenuOnlyChildMargin: '-23px !important',
|
|
248
|
-
subMenuOnlyChildOpacity: '1 !important',
|
|
249
259
|
subMenuIconSize: '10px !important',
|
|
250
260
|
childMenuItemSelectedChildWidth: '10px !important',
|
|
251
261
|
childMenuItemSelectedChildHeight: '2px !important',
|
|
252
262
|
childMenuItemSelectedChildRadius: '1px !important',
|
|
253
263
|
childMenuItemSelectedChildMargin: '-17px !important',
|
|
254
|
-
childMenuItemSelectedChildOpacity: '1 !important',
|
|
255
264
|
childMenuItemSelectedChildBgColor: `${colors.ebonyClay['125']} !important`
|
|
256
265
|
},
|
|
257
266
|
Breadcrumb: {
|
|
@@ -267,9 +276,7 @@ exports.theme = {
|
|
|
267
276
|
fontWeight: 600,
|
|
268
277
|
lineHeight: 1.5,
|
|
269
278
|
separatorColor: colors.azure['500'],
|
|
270
|
-
letterSpacing: exports.fontSize * 0.03
|
|
271
|
-
marginInline: 0,
|
|
272
|
-
height: 'auto'
|
|
279
|
+
letterSpacing: exports.fontSize * 0.03
|
|
273
280
|
},
|
|
274
281
|
Tag: {
|
|
275
282
|
defaultColorSuccess: colors.green['951'],
|
|
@@ -294,8 +301,7 @@ exports.theme = {
|
|
|
294
301
|
fontSize: exports.fontSize * 0.8125,
|
|
295
302
|
paddingLeft: 15,
|
|
296
303
|
paddingRight: 15,
|
|
297
|
-
fontSizeClose: exports.fontSize * 0.6875
|
|
298
|
-
fontWeight: 500
|
|
304
|
+
fontSizeClose: exports.fontSize * 0.6875
|
|
299
305
|
},
|
|
300
306
|
Tooltip: {
|
|
301
307
|
bgColor: colors.ebonyClay['951']
|
|
@@ -354,32 +360,16 @@ exports.theme = {
|
|
|
354
360
|
verticalErrorPadding: '7px 0'
|
|
355
361
|
},
|
|
356
362
|
Pagination: {
|
|
357
|
-
zero: '0 !important',
|
|
358
|
-
none: 'none !important',
|
|
359
|
-
unset: 'unset !important',
|
|
360
|
-
maxContent: 'max-content !important',
|
|
361
363
|
fontSize: '14px !important',
|
|
362
|
-
transparent: 'transparent !important',
|
|
363
|
-
displayFlex: 'flex !important',
|
|
364
|
-
displayFlexRow: 'row !important',
|
|
365
|
-
displayContents: 'contents !important',
|
|
366
|
-
displayGrid: 'grid !important',
|
|
367
|
-
center: 'center !important',
|
|
368
|
-
full: '100% !important',
|
|
369
|
-
lineHeight: '1 !important',
|
|
370
|
-
auto: 'auto !important',
|
|
371
|
-
hidden: 'hidden !important',
|
|
372
364
|
Simple: {
|
|
373
365
|
minWidth: '68.56px !important',
|
|
374
366
|
fontWeight: 'normal !important',
|
|
375
367
|
color: `${colors.gray['500']} !important`,
|
|
376
368
|
input: {
|
|
377
|
-
textColor: `${colors.ebonyClay['960']} !important
|
|
378
|
-
fontWeight: '600 !important'
|
|
369
|
+
textColor: `${colors.ebonyClay['960']} !important`
|
|
379
370
|
},
|
|
380
371
|
prevNextButton: {
|
|
381
372
|
svgWidth: '10px !important',
|
|
382
|
-
svgHeight: '100% !important',
|
|
383
373
|
svgFill: `${colors.gray['500']} !important`
|
|
384
374
|
},
|
|
385
375
|
slashPadding: '8px !important',
|
|
@@ -388,8 +378,6 @@ exports.theme = {
|
|
|
388
378
|
},
|
|
389
379
|
Table: {
|
|
390
380
|
totalText: {
|
|
391
|
-
width: 'fit-content !important',
|
|
392
|
-
fontWeight: '500 !important',
|
|
393
381
|
color: `${colors.gray['500']} !important`,
|
|
394
382
|
margin: 'auto 32px !important'
|
|
395
383
|
},
|
|
@@ -414,7 +402,6 @@ exports.theme = {
|
|
|
414
402
|
sizeChanger: {
|
|
415
403
|
bgColor: `${colors.neutral['50']} !important`,
|
|
416
404
|
textColor: `${colors.ebonyClay['951']} !important`,
|
|
417
|
-
width: 'fit-content !important',
|
|
418
405
|
colGap: '10px !important',
|
|
419
406
|
border: `1px solid ${colors.neutral['350']} !important`,
|
|
420
407
|
borderRadius: '5px !important',
|
|
@@ -424,15 +411,12 @@ exports.theme = {
|
|
|
424
411
|
padding: '10px 16px !important'
|
|
425
412
|
},
|
|
426
413
|
item2: {
|
|
427
|
-
textColor: `${colors.gray['500']} !important
|
|
428
|
-
fontWeight: '600 !important'
|
|
414
|
+
textColor: `${colors.gray['500']} !important`
|
|
429
415
|
},
|
|
430
416
|
icon: {
|
|
431
417
|
bgColor: `${colors.neutral['50']} !important`,
|
|
432
418
|
textColor: `${colors.gray['500']} !important`,
|
|
433
|
-
width: '10px !important'
|
|
434
|
-
position: 'relative !important',
|
|
435
|
-
fontWeight: '600 !important'
|
|
419
|
+
width: '10px !important'
|
|
436
420
|
}
|
|
437
421
|
}
|
|
438
422
|
},
|
|
@@ -440,12 +424,8 @@ exports.theme = {
|
|
|
440
424
|
border: `1px solid ${colors.neutral['350']} !important`,
|
|
441
425
|
bgColor: `${colors.neutral['75']} !important`,
|
|
442
426
|
textColor: `${colors.ebonyClay['960']} !important`,
|
|
443
|
-
fontWeight: '600',
|
|
444
427
|
minWidth: '18px',
|
|
445
|
-
height: 'calc(100% - 3px)'
|
|
446
|
-
spanVisibility: 'hidden',
|
|
447
|
-
spanWhiteSpace: 'pre',
|
|
448
|
-
spanPosition: 'absolute'
|
|
428
|
+
height: 'calc(100% - 3px)'
|
|
449
429
|
}
|
|
450
430
|
},
|
|
451
431
|
Select: {
|
|
@@ -464,9 +444,15 @@ exports.theme = {
|
|
|
464
444
|
selectItemHoverBgColor: 'rgba(68, 130, 255, 0.2)'
|
|
465
445
|
},
|
|
466
446
|
Table: {
|
|
447
|
+
headerBorderRadius: 0,
|
|
448
|
+
headerBg: 'transparent',
|
|
449
|
+
headerColor: '#9b9b9b',
|
|
450
|
+
headerSplitColor: 'transparent',
|
|
467
451
|
colorBgContainer: 'transparent',
|
|
468
452
|
rowHoverBg: 'unset',
|
|
469
|
-
borderColor: colors.neutral['350']
|
|
453
|
+
borderColor: colors.neutral['350'],
|
|
454
|
+
cellPaddingInline: 0,
|
|
455
|
+
fontSize: exports.fontSize
|
|
470
456
|
},
|
|
471
457
|
Input: {
|
|
472
458
|
colorBgContainer: colors.ebonyClay['475'],
|
|
@@ -489,36 +475,23 @@ exports.theme = {
|
|
|
489
475
|
Modal: {
|
|
490
476
|
titleFontSize: exports.fontSize * 1.25,
|
|
491
477
|
padding: '20px 35px',
|
|
492
|
-
fontWeight: 500,
|
|
493
478
|
borderBottom: `1px solid ${colors.blue['954']}`,
|
|
494
479
|
footerPadding: '0 35px 20px 35px',
|
|
495
480
|
closeIconColor: colors.neutral['100'],
|
|
496
|
-
contentPadding: 0,
|
|
497
|
-
footerMarginTop: 0,
|
|
498
481
|
closeTop: 20,
|
|
499
482
|
closeRight: 27,
|
|
500
|
-
headerMarginBottom: 0,
|
|
501
|
-
badgeColorContent: '',
|
|
502
483
|
badgeColorTop: 27,
|
|
503
|
-
badgeColorLeft: 0,
|
|
504
484
|
badgeColorWidth: 4,
|
|
505
485
|
badgeColorHeight: 16,
|
|
506
|
-
badgeColorPosition: 'absolute',
|
|
507
486
|
badgeColorBackgroundColor: colors.red['425']
|
|
508
487
|
},
|
|
509
488
|
Progress: {
|
|
510
489
|
strokeColor: colors.ebonyClay['625'],
|
|
511
490
|
trailColor: colors.neutral['50'],
|
|
512
|
-
borderRadius: '0',
|
|
513
491
|
height: '18px !important',
|
|
514
492
|
successBgColor: 'repeating-linear-gradient(60deg, rgba(36, 180, 19, 1) 0, rgba(36, 180, 19, 1) 5px, rgba(72, 192, 62, 1) 5px, rgba(72, 192, 62, 1) 10px) !important'
|
|
515
493
|
},
|
|
516
494
|
Steps: {
|
|
517
|
-
zero: '0',
|
|
518
|
-
auto: 'auto',
|
|
519
|
-
none: 'none',
|
|
520
|
-
full: '100% !important',
|
|
521
|
-
flex: 'flex',
|
|
522
495
|
rowGap: '10px',
|
|
523
496
|
iconWidthHeight: '38px !important',
|
|
524
497
|
iconSize: '18px !important',
|
|
@@ -526,7 +499,7 @@ exports.theme = {
|
|
|
526
499
|
tailTop: '16px',
|
|
527
500
|
tailHeight: '3px',
|
|
528
501
|
titleFontSize: '14px',
|
|
529
|
-
iconColor: '
|
|
502
|
+
iconColor: colors.neutral['50'],
|
|
530
503
|
tailColor: 'linear-gradient(to right, #343639 50%, transparent 50%)',
|
|
531
504
|
tailLastChildColor: 'linear-gradient(to right, #4482ff 50%, transparent 50%)',
|
|
532
505
|
tailFirstChildColor: 'linear-gradient(to right, transparent 50%, #4482ff 50%)',
|
|
@@ -546,7 +519,6 @@ exports.theme = {
|
|
|
546
519
|
manyItemsTransform: 'rotate(-40deg)',
|
|
547
520
|
manyItemsWidth: '90px',
|
|
548
521
|
manyItemsHeight: '80px',
|
|
549
|
-
manyItemsWhiteSpace: 'break-spaces',
|
|
550
522
|
manyItemsMarginInlineStart: '40px',
|
|
551
523
|
manyItemsIconWidthHeight: '22px',
|
|
552
524
|
manyItemsTailHeight: '4px',
|
|
@@ -563,8 +535,7 @@ exports.theme = {
|
|
|
563
535
|
colorTextTertiary: colors.gray['300'],
|
|
564
536
|
handleBg: colors.neutral['80'],
|
|
565
537
|
handleShadow: '1px 1px 2px 0 rgba(156, 169, 194, 0.5)',
|
|
566
|
-
fontSizeSM: exports.fontSize * 0.5625
|
|
567
|
-
innerMinMargin: 0
|
|
538
|
+
fontSizeSM: exports.fontSize * 0.5625
|
|
568
539
|
},
|
|
569
540
|
Divider: {
|
|
570
541
|
colorSplit: colors.ebonyClay['175'],
|
|
@@ -577,29 +548,16 @@ exports.theme = {
|
|
|
577
548
|
DatePicker: {
|
|
578
549
|
general: {
|
|
579
550
|
fontSize: '14px',
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
wideBorder: '2px solid #262e47',
|
|
584
|
-
itemCenter: 'center',
|
|
551
|
+
fontColor: colors.gray['500'],
|
|
552
|
+
bgDarkBlue: colors.ebonyClay['475'],
|
|
553
|
+
wideBorder: `2px solid ${colors.ebonyClay['550']}`,
|
|
585
554
|
inputMarginBottom: '7px',
|
|
586
|
-
inputPadding: '
|
|
587
|
-
lightThemeBorder:
|
|
555
|
+
inputPadding: '7px 16px !important',
|
|
556
|
+
lightThemeBorder: `1px solid ${colors.neutral['350']}`
|
|
588
557
|
},
|
|
589
558
|
title: {
|
|
590
559
|
lightColor: `${colors.ebonyClay['500']}`
|
|
591
560
|
},
|
|
592
|
-
pickerTriangle: {
|
|
593
|
-
transform: 'translateX(-50%)',
|
|
594
|
-
beforeTop: '-8px',
|
|
595
|
-
beforeBorderX: '12px solid transparent',
|
|
596
|
-
beforeBorderBottom: '9px solid #262e47',
|
|
597
|
-
beforeZIndex: '1',
|
|
598
|
-
afterTop: '-6px',
|
|
599
|
-
afterBorderX: '10px solid transparent',
|
|
600
|
-
afterBorderBottom: '8px solid #2b344c',
|
|
601
|
-
afterZIndex: '2'
|
|
602
|
-
},
|
|
603
561
|
pickerPanel: {
|
|
604
562
|
shadow: '0 3px 6px 0 rgba(0, 0, 0, 0.2)',
|
|
605
563
|
width: '292px',
|
|
@@ -607,7 +565,7 @@ exports.theme = {
|
|
|
607
565
|
marginY: '20px',
|
|
608
566
|
padding: '0 22px',
|
|
609
567
|
textSize: '16px',
|
|
610
|
-
textColor: '
|
|
568
|
+
textColor: colors.neutral['380'],
|
|
611
569
|
arrawWidth: '10.2px',
|
|
612
570
|
arrowPaddingLeft: '12px',
|
|
613
571
|
arrowPaddingRight: '20px',
|
|
@@ -617,9 +575,9 @@ exports.theme = {
|
|
|
617
575
|
padding: '0 20px'
|
|
618
576
|
},
|
|
619
577
|
content: {
|
|
620
|
-
tableHeaderBorder:
|
|
578
|
+
tableHeaderBorder: `1px solid ${colors.blue['250-10']}`,
|
|
621
579
|
tableHeaderFontSize: '12px',
|
|
622
|
-
tableHeaderFontColor: '
|
|
580
|
+
tableHeaderFontColor: colors.neutral['380'],
|
|
623
581
|
tableHeaderWidth: '36px',
|
|
624
582
|
tableHeaderPaddingBottom: '6px'
|
|
625
583
|
},
|
|
@@ -628,15 +586,15 @@ exports.theme = {
|
|
|
628
586
|
previousCellWidth: '36px',
|
|
629
587
|
cellLineHeight: '1.43',
|
|
630
588
|
cellFontWeight: 'normal',
|
|
631
|
-
cellTextColor: '
|
|
632
|
-
cellBg: '
|
|
633
|
-
cellBorder:
|
|
589
|
+
cellTextColor: colors.neutral['380'],
|
|
590
|
+
cellBg: colors.ebonyClay['825'],
|
|
591
|
+
cellBorder: `2px solid ${colors.blue['250-10']}`,
|
|
634
592
|
cellBorderRadius: '3px'
|
|
635
593
|
},
|
|
636
594
|
separator: {
|
|
637
595
|
width: '6px',
|
|
638
596
|
height: '2px',
|
|
639
|
-
backgroundColor: '
|
|
597
|
+
backgroundColor: colors.ebonyClay['550']
|
|
640
598
|
},
|
|
641
599
|
range: {
|
|
642
600
|
iconPosition: '10px',
|
|
@@ -649,13 +607,12 @@ exports.theme = {
|
|
|
649
607
|
lineHeight: 'normal',
|
|
650
608
|
fontSize: '12px',
|
|
651
609
|
padding: '0 27px',
|
|
652
|
-
border:
|
|
610
|
+
border: `1px solid ${colors.azure['500']}`,
|
|
653
611
|
borderRadius: '11px',
|
|
654
|
-
datePickerBorderTop:
|
|
612
|
+
datePickerBorderTop: `1px solid ${colors.blue['250-10']}`,
|
|
655
613
|
datePickerPadding: '28px 0 23px',
|
|
656
|
-
rangeDirection: 'row',
|
|
657
614
|
rangeColGap: '50px',
|
|
658
|
-
rangeBorder:
|
|
615
|
+
rangeBorder: `1px solid ${colors.blue['250-20']}`,
|
|
659
616
|
rangePadding: '13px 20px 16px',
|
|
660
617
|
rangeCol: '12px',
|
|
661
618
|
rangeInputPadding: '10px 12px 10px 16px',
|
|
@@ -669,10 +626,119 @@ exports.theme = {
|
|
|
669
626
|
colorError: colors.red['450'],
|
|
670
627
|
lineWidth: 0,
|
|
671
628
|
controlHeightLG: 30,
|
|
672
|
-
paddingXS: 0
|
|
629
|
+
paddingXS: 0,
|
|
630
|
+
svgColor: colors.neutral['1000']
|
|
673
631
|
}
|
|
674
632
|
}
|
|
675
633
|
};
|
|
634
|
+
/**
|
|
635
|
+
* Default CustomTokens fallback values to prevent undefined access errors.
|
|
636
|
+
* This provides a complete fallback structure matching the CustomTokens interface.
|
|
637
|
+
*/
|
|
638
|
+
const defaultCustomTokens = {
|
|
639
|
+
layout: {
|
|
640
|
+
displayFlex: 'flex',
|
|
641
|
+
displayGrid: 'grid',
|
|
642
|
+
displayBlock: 'block',
|
|
643
|
+
displayInline: 'inline',
|
|
644
|
+
displayInlineBlock: 'inline-block',
|
|
645
|
+
displayNone: 'none',
|
|
646
|
+
displayContents: 'contents',
|
|
647
|
+
positionAbsolute: 'absolute',
|
|
648
|
+
positionRelative: 'relative',
|
|
649
|
+
positionFixed: 'fixed',
|
|
650
|
+
positionSticky: 'sticky',
|
|
651
|
+
positionStatic: 'static',
|
|
652
|
+
flexStart: 'start',
|
|
653
|
+
flexCenter: 'center',
|
|
654
|
+
flexDirectionRow: 'row',
|
|
655
|
+
flexDirectionRowReverse: 'row-reverse',
|
|
656
|
+
flexDirectionColumn: 'column',
|
|
657
|
+
flexDirectionColumnReverse: 'column-reverse'
|
|
658
|
+
},
|
|
659
|
+
typography: {
|
|
660
|
+
textTransformUppercase: 'uppercase',
|
|
661
|
+
textTransformLowercase: 'lowercase',
|
|
662
|
+
textTransformCapitalize: 'capitalize',
|
|
663
|
+
textAlignLeft: 'left',
|
|
664
|
+
textAlignCenter: 'center',
|
|
665
|
+
textAlignRight: 'right',
|
|
666
|
+
textAlignJustify: 'justify',
|
|
667
|
+
whiteSpaceNormal: 'normal',
|
|
668
|
+
whiteSpaceNoWrap: 'nowrap',
|
|
669
|
+
whiteSpacePre: 'pre',
|
|
670
|
+
whiteSpacePreLine: 'pre-line',
|
|
671
|
+
whiteSpacePreWrap: 'pre-wrap',
|
|
672
|
+
whiteSpaceBreakSpaces: 'break-spaces',
|
|
673
|
+
wordBreak: 'break-word',
|
|
674
|
+
textDecorationUnderline: 'underline',
|
|
675
|
+
textDecorationOverline: 'overline',
|
|
676
|
+
textDecorationLineThrough: 'line-through',
|
|
677
|
+
fontWeightBold: '600',
|
|
678
|
+
fontWeightMedium: '500'
|
|
679
|
+
},
|
|
680
|
+
sizing: {
|
|
681
|
+
sizeMaxContent: 'max-content',
|
|
682
|
+
sizeMinContent: 'min-content',
|
|
683
|
+
sizeFitContent: 'fit-content',
|
|
684
|
+
valueFull: '100%',
|
|
685
|
+
valueThreeQuarter: '75%',
|
|
686
|
+
valueHalf: '50%',
|
|
687
|
+
valueQuarter: '25%',
|
|
688
|
+
valueZero: '0',
|
|
689
|
+
valueAuto: 'auto',
|
|
690
|
+
valueInherit: 'inherit'
|
|
691
|
+
},
|
|
692
|
+
others: {
|
|
693
|
+
colorTransparent: 'transparent',
|
|
694
|
+
valueHidden: 'hidden',
|
|
695
|
+
valueUnset: 'unset',
|
|
696
|
+
emptyContent: '""',
|
|
697
|
+
lineHeightShort: '1',
|
|
698
|
+
lineHeightTall: '2',
|
|
699
|
+
cursorNotAllowed: 'not-allowed',
|
|
700
|
+
cursorPointer: 'pointer',
|
|
701
|
+
verticalAlignMiddle: 'middle',
|
|
702
|
+
opacityFull: '1',
|
|
703
|
+
opacityNone: '0'
|
|
704
|
+
},
|
|
705
|
+
border: {
|
|
706
|
+
borderNone: 'none',
|
|
707
|
+
borderSolid: 'solid',
|
|
708
|
+
borderDashed: 'dashed',
|
|
709
|
+
borderDotted: 'dotted',
|
|
710
|
+
borderWidthThin: '1px',
|
|
711
|
+
borderWidthThick: '2px',
|
|
712
|
+
borderRadiusSm: '0.125rem'
|
|
713
|
+
},
|
|
714
|
+
overflow: {
|
|
715
|
+
overflowVisible: 'visible',
|
|
716
|
+
overflowHidden: 'hidden',
|
|
717
|
+
overflowScroll: 'scroll'
|
|
718
|
+
}
|
|
719
|
+
};
|
|
720
|
+
/**
|
|
721
|
+
* Safely retrieves CustomTokens from theme with fallback to default values.
|
|
722
|
+
* This prevents undefined access errors when theme is not properly initialized.
|
|
723
|
+
*
|
|
724
|
+
* @param theme - The theme object from ConfigProvider context
|
|
725
|
+
* @returns CustomTokens with guaranteed defined values
|
|
726
|
+
*/
|
|
727
|
+
function getSafeCustomTokens(theme) {
|
|
728
|
+
const themeCustomTokens = theme === null || theme === void 0 ? void 0 : theme.CustomTokens;
|
|
729
|
+
if (!themeCustomTokens) {
|
|
730
|
+
return defaultCustomTokens;
|
|
731
|
+
}
|
|
732
|
+
// Deep merge to ensure all nested properties are available
|
|
733
|
+
return {
|
|
734
|
+
layout: Object.assign(Object.assign({}, defaultCustomTokens.layout), themeCustomTokens.layout),
|
|
735
|
+
typography: Object.assign(Object.assign({}, defaultCustomTokens.typography), themeCustomTokens.typography),
|
|
736
|
+
sizing: Object.assign(Object.assign({}, defaultCustomTokens.sizing), themeCustomTokens.sizing),
|
|
737
|
+
others: Object.assign(Object.assign({}, defaultCustomTokens.others), themeCustomTokens.others),
|
|
738
|
+
border: Object.assign(Object.assign({}, defaultCustomTokens.border), themeCustomTokens.border),
|
|
739
|
+
overflow: Object.assign(Object.assign({}, defaultCustomTokens.overflow), themeCustomTokens.overflow)
|
|
740
|
+
};
|
|
741
|
+
}
|
|
676
742
|
/**
|
|
677
743
|
* Used to access antd's token values from react components.
|
|
678
744
|
* For detailed usage see,
|