@temboplus/frontend-react-core 0.1.3-beta.13 → 0.1.3-beta.15

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.
Files changed (51) hide show
  1. package/dist/alerts/index.cjs.js +1 -1
  2. package/dist/alerts/index.cjs.js.map +1 -1
  3. package/dist/alerts/index.js +1 -1
  4. package/dist/alerts/index.js.map +1 -1
  5. package/dist/dialogs/index.cjs.js +3 -3
  6. package/dist/dialogs/index.cjs.js.map +1 -1
  7. package/dist/dialogs/index.js +3 -3
  8. package/dist/dialogs/index.js.map +1 -1
  9. package/dist/features/alerts/alert.js +18 -18
  10. package/dist/features/dialogs/tembo-confirm.js +11 -11
  11. package/dist/features/notifications/tembo-notify.d.ts +3 -2
  12. package/dist/features/notifications/toast-config.d.ts +4 -3
  13. package/dist/features/notifications/toast-config.js +7 -7
  14. package/dist/features/notifications/toast-container.js +2 -2
  15. package/dist/index.cjs.js +1 -1
  16. package/dist/index.cjs.js.map +1 -1
  17. package/dist/index.esm.js +1 -1
  18. package/dist/index.esm.js.map +1 -1
  19. package/dist/notifications/index.cjs.js +1 -1
  20. package/dist/notifications/index.js +1 -1
  21. package/dist/tembo-notify-60Hk7l5W.js +3 -0
  22. package/dist/tembo-notify-60Hk7l5W.js.map +1 -0
  23. package/dist/tembo-notify-BEEB2wEp.js +3 -0
  24. package/dist/tembo-notify-BEEB2wEp.js.map +1 -0
  25. package/dist/theme/index.cjs.js +1 -1
  26. package/dist/theme/index.js +1 -1
  27. package/dist/theme/theme-config.d.ts +10 -3
  28. package/dist/theme/theme-config.js +138 -286
  29. package/dist/theme/theme-provider.d.ts +3 -3
  30. package/dist/theme/theme-provider.js +5 -7
  31. package/dist/theme/tokens/{color.d.ts → colors.d.ts} +32 -17
  32. package/dist/theme/tokens/{color.js → colors.js} +65 -46
  33. package/dist/theme/tokens/constants.d.ts +15 -42
  34. package/dist/theme/tokens/constants.js +43 -40
  35. package/dist/theme-provider-BJjIEVwv.js +2 -0
  36. package/dist/theme-provider-BJjIEVwv.js.map +1 -0
  37. package/dist/theme-provider-CpPw8sUs.js +11 -0
  38. package/dist/theme-provider-CpPw8sUs.js.map +1 -0
  39. package/dist/theme-provider-D3-cveEd.js +2 -0
  40. package/dist/theme-provider-D3-cveEd.js.map +1 -0
  41. package/dist/theme-provider-xDEswLd1.js +11 -0
  42. package/dist/theme-provider-xDEswLd1.js.map +1 -0
  43. package/package.json +1 -1
  44. package/dist/tembo-notify-CW2KXwZW.js +0 -3
  45. package/dist/tembo-notify-CW2KXwZW.js.map +0 -1
  46. package/dist/tembo-notify-EJeawMJ_.js +0 -3
  47. package/dist/tembo-notify-EJeawMJ_.js.map +0 -1
  48. package/dist/theme-provider-BVd_oFrl.js +0 -11
  49. package/dist/theme-provider-BVd_oFrl.js.map +0 -1
  50. package/dist/theme-provider-dbf4ZeQO.js +0 -11
  51. package/dist/theme-provider-dbf4ZeQO.js.map +0 -1
@@ -1,33 +1,36 @@
1
- import { buildDarkModeConstants } from './tokens/constants.js';
2
1
  /**
3
2
  * Build comprehensive Ant Design theme from Tembo tokens
3
+ *
4
+ * Design principles:
5
+ * - Set sizing/spacing once at token level, not per component
6
+ * - Components inherit global tokens unless they need specific overrides
7
+ * - Bold rounded corners (24px buttons/inputs, 28px cards, 32px modals)
8
+ * - Zero shadows on flat elements (buttons, inputs)
9
+ * - Gentle shadows on elevated elements (cards, modals, popovers)
4
10
  */
5
11
  export const buildAntDTheme = (colors, constants) => {
6
12
  const isDark = colors.mode === 'dark';
7
- const componentShadow = isDark
8
- ? buildDarkModeConstants().componentShadow
9
- : constants.componentShadow;
10
13
  return {
11
14
  token: {
12
15
  // ============================================
13
16
  // COLOR TOKENS
14
17
  // ============================================
15
- // Primary (monochrome - using darkest neutral)
16
- colorPrimary: colors.neutral[4],
17
- colorPrimaryHover: colors.text.secondary,
18
- colorPrimaryActive: colors.neutral[4],
18
+ // Primary (monochrome - using action tokens implicitly)
19
+ colorPrimary: colors.action.default,
20
+ colorPrimaryHover: colors.action.hover,
21
+ colorPrimaryActive: colors.action.default,
19
22
  colorPrimaryBg: colors.neutral[2],
20
23
  colorPrimaryBgHover: colors.surface.interactive,
21
- colorPrimaryBorder: colors.neutral[4],
22
- colorPrimaryBorderHover: colors.neutral[4],
23
- colorPrimaryText: colors.neutral[4],
24
+ colorPrimaryBorder: colors.action.default,
25
+ colorPrimaryBorderHover: colors.action.default,
26
+ colorPrimaryText: colors.action.default,
24
27
  colorPrimaryTextHover: colors.text.secondary,
25
- colorPrimaryTextActive: colors.neutral[4],
26
- // Links (standard web colors)
28
+ colorPrimaryTextActive: colors.action.default,
29
+ // Links (standard web blue + focus rings)
27
30
  colorLink: colors.link.default,
28
31
  colorLinkHover: colors.link.hover,
29
32
  colorLinkActive: colors.link.active,
30
- // Text
33
+ // Text hierarchy
31
34
  colorText: colors.text.primary,
32
35
  colorTextSecondary: colors.text.secondary,
33
36
  colorTextTertiary: colors.text.tertiary,
@@ -47,12 +50,14 @@ export const buildAntDTheme = (colors, constants) => {
47
50
  colorBgMask: isDark ? 'rgba(0, 0, 0, 0.65)' : 'rgba(0, 0, 0, 0.45)',
48
51
  colorBgTextHover: colors.surface.interactive,
49
52
  colorBgTextActive: colors.surface.interactive,
53
+ // Disabled backgrounds
54
+ colorBgContainerDisabled: colors.action.disabled,
50
55
  // Borders
51
56
  colorBorder: colors.border.default,
52
57
  colorBorderBg: colors.surface.card,
53
58
  colorBorderSecondary: colors.border.subtle,
54
59
  colorSplit: colors.border.subtle,
55
- // Fill (backgrounds of components)
60
+ // Fill colors
56
61
  colorFill: colors.neutral[2],
57
62
  colorFillSecondary: colors.neutral[2],
58
63
  colorFillTertiary: colors.neutral[2],
@@ -96,25 +101,25 @@ export const buildAntDTheme = (colors, constants) => {
96
101
  fontFamily: constants.typography.fontFamily.base,
97
102
  fontFamilyCode: constants.typography.fontFamily.mono,
98
103
  fontSize: constants.typography.fontSize.base,
104
+ fontSizeSM: constants.typography.fontSize.sm,
105
+ fontSizeLG: constants.typography.fontSize.lg,
106
+ fontSizeXL: constants.typography.fontSize.xl,
99
107
  fontSizeHeading1: constants.typography.fontSize['5xl'],
100
108
  fontSizeHeading2: constants.typography.fontSize['4xl'],
101
109
  fontSizeHeading3: constants.typography.fontSize['3xl'],
102
110
  fontSizeHeading4: constants.typography.fontSize['2xl'],
103
111
  fontSizeHeading5: constants.typography.fontSize.xl,
104
- fontSizeSM: constants.typography.fontSize.sm,
105
- fontSizeLG: constants.typography.fontSize.lg,
106
- fontSizeXL: constants.typography.fontSize.xl,
107
112
  fontWeightStrong: constants.typography.fontWeight.semibold,
108
113
  lineHeight: constants.typography.lineHeight.base,
114
+ lineHeightSM: constants.typography.lineHeight.base,
115
+ lineHeightLG: constants.typography.lineHeight.relaxed,
109
116
  lineHeightHeading1: constants.typography.lineHeight.tight,
110
117
  lineHeightHeading2: constants.typography.lineHeight.tight,
111
118
  lineHeightHeading3: constants.typography.lineHeight.tight,
112
119
  lineHeightHeading4: constants.typography.lineHeight.tight,
113
120
  lineHeightHeading5: constants.typography.lineHeight.tight,
114
- lineHeightLG: constants.typography.lineHeight.relaxed,
115
- lineHeightSM: constants.typography.lineHeight.base,
116
121
  // ============================================
117
- // SPACING & SIZING
122
+ // SPACING & SIZING - SET ONCE HERE
118
123
  // ============================================
119
124
  padding: constants.spacing[4],
120
125
  paddingXS: constants.spacing[2],
@@ -127,193 +132,161 @@ export const buildAntDTheme = (colors, constants) => {
127
132
  marginLG: constants.spacing[5],
128
133
  marginXL: constants.spacing[6],
129
134
  marginXXL: constants.spacing[8],
130
- controlHeight: 40,
131
- controlHeightLG: 48,
132
- controlHeightSM: 32,
133
- controlHeightXS: 24,
135
+ // Control heights - SET ONCE, components inherit
136
+ controlHeight: 40, // Default height for all controls
137
+ controlHeightLG: 48, // Large variant
138
+ controlHeightSM: 32, // Small variant
139
+ controlHeightXS: 24, // Extra small variant
134
140
  // ============================================
135
- // BORDER RADIUS
141
+ // BORDER RADIUS - Bold rounded corners
136
142
  // ============================================
137
- borderRadius: constants.radius.base,
138
- borderRadiusLG: constants.radius.md,
139
- borderRadiusSM: constants.radius.sm,
140
- borderRadiusXS: constants.radius.sm,
143
+ borderRadius: constants.radius.base, // 24px - default bold
144
+ borderRadiusLG: constants.radius.md, // 28px
145
+ borderRadiusSM: constants.radius.sm, // 12px
146
+ borderRadiusXS: constants.radius.sm, // 12px
141
147
  // ============================================
142
- // SHADOWS
148
+ // SHADOWS - Zero on flat, gentle on elevated
143
149
  // ============================================
144
- boxShadow: constants.shadow.none,
145
- boxShadowSecondary: constants.shadow.none,
146
- boxShadowTertiary: componentShadow.card,
150
+ boxShadow: constants.shadow.none, // Default: no shadow
151
+ boxShadowSecondary: constants.shadow.none, // No shadow
152
+ boxShadowTertiary: constants.shadow.card, // Gentle card shadow
147
153
  // ============================================
148
154
  // MOTION
149
155
  // ============================================
150
156
  motionUnit: 0.1,
151
157
  motionBase: 0,
152
- motionEaseInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',
153
- motionEaseOut: 'cubic-bezier(0.0, 0, 0.2, 1)',
154
- motionEaseInBack: 'cubic-bezier(0.4, 0, 1, 1)',
158
+ motionEaseInOut: constants.transition.base,
159
+ motionEaseOut: constants.transition.base,
160
+ motionEaseInBack: constants.transition.base,
155
161
  // ============================================
156
162
  // Z-INDEX
157
163
  // ============================================
158
164
  zIndexBase: 0,
159
- zIndexPopupBase: 1000,
165
+ zIndexPopupBase: constants.zIndex.dropdown,
160
166
  },
161
167
  components: {
162
168
  // ========================================
163
- // BUTTON - Monochrome with clear states
169
+ // BUTTON - Monochrome actions, zero shadow
164
170
  // ========================================
165
171
  Button: {
166
- // Primary button (inverted monochrome)
167
- colorPrimary: colors.neutral[4],
168
- colorPrimaryHover: colors.text.secondary,
169
- colorPrimaryActive: colors.neutral[4],
170
- colorPrimaryBorder: colors.neutral[4],
171
- primaryColor: colors.neutral[1],
172
- primaryShadow: 'none',
173
- // Default button (outlined)
172
+ // Action colors
173
+ colorPrimary: colors.action.default,
174
+ colorPrimaryHover: colors.action.hover,
175
+ colorPrimaryActive: colors.action.default,
176
+ colorPrimaryBorder: colors.action.default,
177
+ primaryColor: colors.action.contrast,
178
+ // Disabled
179
+ colorBgContainerDisabled: colors.action.disabled,
180
+ colorTextDisabled: colors.text.secondary,
181
+ borderColorDisabled: colors.action.disabled,
182
+ // Default button
174
183
  defaultBg: colors.surface.card,
175
184
  defaultBorderColor: colors.border.default,
176
185
  defaultColor: colors.text.primary,
177
186
  defaultHoverBg: colors.surface.interactive,
178
187
  defaultHoverBorderColor: colors.border.strong,
179
- defaultHoverColor: colors.text.primary,
180
- defaultActiveBg: colors.surface.interactive,
181
- defaultActiveBorderColor: colors.neutral[4],
182
- defaultActiveColor: colors.text.primary,
183
- defaultShadow: 'none',
184
- // Text button
185
- textHoverBg: colors.surface.interactive,
186
- textTextColor: colors.text.primary,
187
- textTextHoverColor: colors.text.primary,
188
+ defaultActiveBorderColor: colors.action.default,
188
189
  // Link button
189
- linkHoverBg: 'transparent',
190
190
  colorLink: colors.link.default,
191
191
  colorLinkHover: colors.link.hover,
192
192
  colorLinkActive: colors.link.active,
193
193
  // Danger button
194
194
  dangerColor: colors.semantic.error.main,
195
- colorErrorHover: colors.semantic.error.main,
196
- colorErrorActive: colors.semantic.error.main,
195
+ // Zero shadows on all buttons
196
+ primaryShadow: 'none',
197
+ defaultShadow: 'none',
197
198
  dangerShadow: 'none',
198
- // Sizing
199
- controlHeight: 40,
200
- controlHeightLG: 48,
201
- controlHeightSM: 32,
199
+ // Bold rounded corners
200
+ borderRadius: constants.radius.button,
201
+ borderRadiusLG: constants.radius.button,
202
+ borderRadiusSM: constants.radius.button,
203
+ // Padding
202
204
  paddingContentHorizontal: constants.spacing[4],
203
205
  paddingContentVertical: constants.spacing[2],
204
- // Styling
205
- borderRadius: constants.componentRadius.button,
206
- borderRadiusLG: constants.componentRadius.button,
207
- borderRadiusSM: constants.componentRadius.button,
206
+ // Typography
208
207
  fontWeight: constants.typography.fontWeight.medium,
209
- fontSize: constants.typography.fontSize.base,
208
+ // Heights inherited from token.controlHeight automatically ✅
210
209
  },
211
210
  // ========================================
212
- // INPUT & FORM CONTROLS
211
+ // INPUTS - Bold rounded, zero shadow, blue focus ring
213
212
  // ========================================
214
213
  Input: {
214
+ // Colors
215
215
  colorBgContainer: colors.surface.card,
216
216
  colorBorder: colors.border.default,
217
217
  colorText: colors.text.primary,
218
218
  colorTextPlaceholder: colors.text.tertiary,
219
+ // Icons - subtle
219
220
  colorIcon: colors.text.tertiary,
220
221
  colorIconHover: colors.text.secondary,
222
+ // States
221
223
  hoverBorderColor: colors.border.strong,
222
224
  activeBorderColor: colors.link.default,
223
- activeShadow: `0 0 0 2px ${colors.semantic.info.subtle}`,
225
+ activeShadow: `0 0 0 2px ${colors.semantic.info.subtle}`, // Blue focus ring
226
+ // Error/warning rings
224
227
  errorActiveShadow: `0 0 0 2px ${colors.semantic.error.subtle}`,
225
228
  warningActiveShadow: `0 0 0 2px ${colors.semantic.warning.subtle}`,
226
- controlHeight: 40,
227
- controlHeightLG: 48,
228
- controlHeightSM: 32,
229
+ // Bold rounded
230
+ borderRadius: constants.radius.input,
231
+ borderRadiusLG: constants.radius.input,
232
+ borderRadiusSM: constants.radius.input,
233
+ // Padding
229
234
  paddingBlock: constants.spacing[2],
230
235
  paddingInline: constants.spacing[3],
231
236
  paddingInlineLG: constants.spacing[4],
232
- borderRadius: constants.componentRadius.input,
233
- borderRadiusLG: constants.componentRadius.input,
234
- borderRadiusSM: constants.componentRadius.input,
237
+ // Heights inherited from token.controlHeight automatically ✅
235
238
  },
236
239
  InputNumber: {
237
- colorBgContainer: colors.surface.card,
238
- colorBorder: colors.border.default,
239
- hoverBorderColor: colors.border.strong,
240
- activeBorderColor: colors.link.default,
241
240
  colorIcon: colors.text.tertiary,
242
241
  colorIconHover: colors.text.secondary,
242
+ activeBorderColor: colors.link.default,
243
243
  activeShadow: `0 0 0 2px ${colors.semantic.info.subtle}`,
244
- controlHeight: 40,
245
- borderRadius: constants.componentRadius.input,
244
+ borderRadius: constants.radius.input,
246
245
  handleVisible: true,
247
246
  },
248
247
  Select: {
249
- colorBgContainer: colors.surface.card,
250
248
  colorBgElevated: colors.surface.overlay,
251
- colorBorder: colors.border.default,
252
- colorText: colors.text.primary,
253
- colorTextPlaceholder: colors.text.tertiary,
254
249
  colorIcon: colors.text.tertiary,
255
250
  colorIconHover: colors.text.secondary,
256
- hoverBorderColor: colors.border.strong,
257
- controlItemBgHover: colors.surface.interactive,
258
251
  activeBorderColor: colors.link.default,
252
+ boxShadow: `0 0 0 2px ${colors.semantic.info.subtle}`,
259
253
  optionSelectedBg: colors.surface.selected,
260
- optionSelectedColor: colors.text.primary,
261
254
  optionActiveBg: colors.surface.interactive,
262
- controlHeight: 40,
263
- controlHeightLG: 48,
264
- controlHeightSM: 32,
265
- borderRadius: constants.componentRadius.input,
266
- borderRadiusLG: constants.componentRadius.input,
267
- borderRadiusSM: constants.componentRadius.input,
268
- boxShadowSecondary: componentShadow.dropdown,
255
+ controlItemBgHover: colors.surface.interactive,
256
+ borderRadius: constants.radius.input,
257
+ borderRadiusLG: constants.radius.input,
258
+ borderRadiusSM: constants.radius.input,
259
+ // Dropdown has shadow
260
+ boxShadowSecondary: constants.shadow.popover,
269
261
  },
270
262
  DatePicker: {
271
- colorBgContainer: colors.surface.card,
272
- colorBorder: colors.border.default,
273
- hoverBorderColor: colors.border.strong,
274
- activeBorderColor: colors.link.default,
275
263
  colorIcon: colors.text.tertiary,
276
264
  colorIconHover: colors.text.secondary,
265
+ activeBorderColor: colors.link.default,
277
266
  activeShadow: `0 0 0 2px ${colors.semantic.info.subtle}`,
278
267
  cellHoverBg: colors.surface.interactive,
279
268
  cellActiveWithRangeBg: colors.semantic.info.subtle,
280
269
  colorPrimary: colors.link.default,
281
- controlHeight: 40,
282
- borderRadius: constants.componentRadius.input,
270
+ borderRadius: constants.radius.input,
283
271
  },
284
272
  Checkbox: {
285
273
  colorPrimary: colors.link.default,
286
274
  colorPrimaryHover: colors.link.hover,
287
- colorBorder: colors.border.default,
288
- colorBgContainer: colors.surface.card,
289
- colorIcon: colors.text.tertiary,
290
- colorIconHover: colors.text.secondary,
291
275
  borderRadiusSM: constants.radius.sm,
292
276
  },
293
277
  Radio: {
294
278
  colorPrimary: colors.link.default,
295
279
  colorPrimaryHover: colors.link.hover,
296
- colorBorder: colors.border.default,
297
- colorBgContainer: colors.surface.card,
298
- colorIcon: colors.text.tertiary,
299
- colorIconHover: colors.text.secondary,
300
- dotSize: 8,
301
280
  },
302
281
  Switch: {
303
282
  colorPrimary: colors.link.default,
304
283
  colorPrimaryHover: colors.link.hover,
305
- colorTextQuaternary: colors.text.disabled,
306
- colorTextTertiary: colors.text.tertiary,
307
- colorIcon: colors.text.tertiary,
308
- colorIconHover: colors.text.secondary,
309
284
  handleSize: 18,
310
285
  },
311
286
  Slider: {
312
287
  colorPrimary: colors.link.default,
313
288
  colorPrimaryBorder: colors.link.default,
314
289
  colorPrimaryBorderHover: colors.link.hover,
315
- colorIcon: colors.text.tertiary,
316
- colorIconHover: colors.text.secondary,
317
290
  handleColor: colors.surface.card,
318
291
  handleActiveColor: colors.surface.card,
319
292
  railBg: colors.neutral[2],
@@ -326,40 +299,32 @@ export const buildAntDTheme = (colors, constants) => {
326
299
  Form: {
327
300
  labelColor: colors.text.primary,
328
301
  labelFontSize: constants.typography.fontSize.base,
329
- labelHeight: 32,
330
- labelColonMarginInlineEnd: constants.spacing[2],
331
- labelColonMarginInlineStart: constants.spacing[1],
332
302
  itemMarginBottom: constants.spacing[4],
333
303
  verticalLabelPadding: `0 0 ${constants.spacing[2]}px`,
334
304
  labelRequiredMarkColor: colors.semantic.error.main,
335
- colorIcon: colors.text.tertiary,
336
- colorIconHover: colors.text.secondary,
337
305
  },
338
306
  // ========================================
339
307
  // DATA DISPLAY
340
308
  // ========================================
341
309
  Table: {
310
+ // Colors
342
311
  colorBgContainer: colors.surface.card,
343
- colorText: colors.text.primary,
344
- colorTextHeading: colors.text.primary,
345
312
  headerBg: colors.surface.page,
346
313
  headerColor: colors.text.secondary,
347
- headerSortActiveBg: colors.surface.interactive,
348
- headerSortHoverBg: colors.surface.interactive,
349
- headerSplitColor: colors.border.subtle,
350
314
  borderColor: colors.border.subtle,
315
+ // States
351
316
  rowHoverBg: colors.surface.interactive,
352
317
  rowSelectedBg: colors.surface.selected,
353
- rowSelectedHoverBg: colors.surface.selected,
354
318
  rowExpandedBg: colors.surface.nested,
319
+ // Smooth rounded
320
+ borderRadius: constants.radius.card,
321
+ borderRadiusLG: constants.radius.card,
322
+ headerBorderRadius: constants.radius.card,
323
+ // Padding
355
324
  cellPaddingBlock: constants.spacing[4],
356
325
  cellPaddingInline: constants.spacing[4],
357
326
  cellPaddingBlockSM: constants.spacing[2],
358
327
  cellPaddingInlineSM: constants.spacing[3],
359
- borderRadius: constants.componentRadius.card,
360
- borderRadiusLG: constants.componentRadius.card,
361
- headerBorderRadius: constants.componentRadius.card,
362
- footerBg: colors.surface.page,
363
328
  },
364
329
  Descriptions: {
365
330
  labelBg: colors.surface.page,
@@ -367,39 +332,31 @@ export const buildAntDTheme = (colors, constants) => {
367
332
  contentColor: colors.text.primary,
368
333
  extraColor: colors.text.secondary,
369
334
  itemPaddingBottom: constants.spacing[4],
370
- colonMarginLeft: constants.spacing[1],
371
- colonMarginRight: constants.spacing[2],
372
335
  },
373
336
  Card: {
374
337
  colorBgContainer: colors.surface.card,
375
338
  colorBorderSecondary: colors.border.default,
376
- colorTextHeading: colors.text.primary,
377
- colorTextDescription: colors.text.secondary,
378
- boxShadowTertiary: componentShadow.card,
379
- borderRadius: constants.componentRadius.card,
380
- borderRadiusLG: constants.componentRadius.card,
339
+ // Gentle shadow on cards
340
+ boxShadowTertiary: constants.shadow.card,
341
+ // Smooth rounded
342
+ borderRadius: constants.radius.card,
343
+ borderRadiusLG: constants.radius.card,
381
344
  padding: constants.spacing[4],
382
345
  paddingLG: constants.spacing[6],
383
346
  },
384
347
  Statistic: {
385
348
  titleFontSize: constants.typography.fontSize.base,
386
349
  contentFontSize: constants.typography.fontSize['4xl'],
387
- colorTextHeading: colors.text.primary,
388
- colorTextDescription: colors.text.secondary,
389
350
  },
390
351
  Timeline: {
391
352
  tailColor: colors.border.default,
392
353
  tailWidth: 2,
393
354
  dotBg: colors.surface.card,
394
- dotBorderWidth: 2,
395
355
  itemPaddingBottom: constants.spacing[5],
396
356
  },
397
357
  Tag: {
398
358
  defaultBg: colors.neutral[2],
399
- defaultColor: colors.text.primary,
400
- colorBorder: colors.border.default,
401
- colorText: colors.text.primary,
402
- borderRadiusSM: constants.componentRadius.badge,
359
+ borderRadiusSM: constants.radius.sm,
403
360
  fontSize: constants.typography.fontSize.sm,
404
361
  fontSizeSM: constants.typography.fontSize.xs,
405
362
  },
@@ -410,54 +367,36 @@ export const buildAntDTheme = (colors, constants) => {
410
367
  colorInfo: colors.semantic.info.main,
411
368
  colorWarning: colors.semantic.warning.main,
412
369
  textFontSize: constants.typography.fontSize.xs,
413
- textFontSizeSM: 10,
414
- indicatorHeight: 6,
415
- indicatorHeightSM: 6,
416
370
  },
417
371
  Avatar: {
418
372
  colorBgContainer: colors.neutral[2],
419
- colorText: colors.text.secondary,
420
- colorTextLightSolid: colors.text.inverse,
421
- containerSize: 32,
422
- containerSizeLG: 40,
423
- containerSizeSM: 24,
424
- borderRadius: constants.componentRadius.avatar,
373
+ borderRadius: constants.radius.avatar,
425
374
  groupOverlapping: -8,
426
375
  groupSpace: constants.spacing[1],
427
376
  },
428
377
  Calendar: {
429
378
  colorBgContainer: colors.surface.card,
430
379
  colorPrimary: colors.link.default,
431
- fullBg: colors.surface.card,
432
- fullPanelBg: colors.surface.card,
433
380
  itemActiveBg: colors.semantic.info.subtle,
434
- borderRadius: constants.componentRadius.card,
381
+ borderRadius: constants.radius.card,
435
382
  },
436
383
  Collapse: {
437
384
  colorBgContainer: colors.surface.card,
438
- colorBorder: colors.border.default,
439
385
  headerBg: colors.surface.page,
440
386
  headerPadding: `${constants.spacing[3]}px ${constants.spacing[4]}px`,
441
387
  contentPadding: `${constants.spacing[4]}px ${constants.spacing[4]}px`,
442
- borderRadiusLG: constants.componentRadius.card,
443
- },
444
- Carousel: {
445
- colorBgContainer: colors.surface.card,
446
- dotWidth: 8,
447
- dotHeight: 8,
448
- dotActiveWidth: 24,
388
+ borderRadiusLG: constants.radius.card,
449
389
  },
450
390
  Tree: {
451
- colorBgContainer: colors.surface.card,
452
391
  nodeHoverBg: colors.surface.interactive,
453
392
  nodeSelectedBg: colors.surface.selected,
454
- titleHeight: 32,
455
393
  borderRadius: constants.radius.sm,
456
394
  },
457
395
  // ========================================
458
- // FEEDBACK
396
+ // FEEDBACK - Elevated with shadows
459
397
  // ========================================
460
398
  Alert: {
399
+ // Semantic colors
461
400
  colorSuccessBg: colors.semantic.success.subtle,
462
401
  colorSuccessBorder: colors.semantic.success.main,
463
402
  colorSuccessText: colors.semantic.success.main,
@@ -471,52 +410,49 @@ export const buildAntDTheme = (colors, constants) => {
471
410
  colorInfoBorder: colors.semantic.info.main,
472
411
  colorInfoText: colors.semantic.info.main,
473
412
  defaultPadding: `${constants.spacing[3]}px ${constants.spacing[4]}px`,
474
- withDescriptionPadding: `${constants.spacing[4]}px ${constants.spacing[5]}px`,
475
- borderRadiusLG: constants.componentRadius.card,
413
+ borderRadiusLG: constants.radius.card,
476
414
  },
477
415
  Modal: {
478
416
  contentBg: colors.surface.overlay,
479
417
  headerBg: colors.surface.overlay,
480
418
  footerBg: colors.surface.overlay,
481
- titleColor: colors.text.primary,
482
419
  colorBgMask: isDark ? 'rgba(0, 0, 0, 0.65)' : 'rgba(0, 0, 0, 0.45)',
483
- borderRadiusLG: constants.componentRadius.modal,
484
- boxShadow: componentShadow.modal,
420
+ // Prominent shadow
421
+ boxShadow: constants.shadow.modal,
422
+ // Generous rounding
423
+ borderRadiusLG: constants.radius.modal,
485
424
  },
486
425
  Drawer: {
487
426
  colorBgElevated: colors.surface.overlay,
488
427
  colorBgMask: isDark ? 'rgba(0, 0, 0, 0.65)' : 'rgba(0, 0, 0, 0.45)',
489
- borderRadiusLG: constants.componentRadius.modal,
428
+ borderRadiusLG: constants.radius.modal,
490
429
  footerPaddingBlock: constants.spacing[4],
491
430
  footerPaddingInline: constants.spacing[6],
492
431
  },
493
432
  Notification: {
494
433
  colorBgElevated: colors.surface.overlay,
495
- colorText: colors.text.primary,
496
- colorTextHeading: colors.text.primary,
497
- borderRadiusLG: constants.componentRadius.card,
498
- boxShadow: componentShadow.dropdown,
434
+ // Shadow on notification
435
+ boxShadow: constants.shadow.popover,
436
+ borderRadiusLG: constants.radius.card,
499
437
  padding: constants.spacing[4],
500
- paddingContentHorizontal: constants.spacing[4],
501
438
  },
502
439
  Message: {
503
440
  contentBg: colors.surface.overlay,
504
441
  contentPadding: `${constants.spacing[2]}px ${constants.spacing[4]}px`,
505
- borderRadiusLG: constants.componentRadius.card,
506
- boxShadow: componentShadow.dropdown,
442
+ // Shadow on message
443
+ boxShadow: constants.shadow.popover,
444
+ borderRadiusLG: constants.radius.card,
507
445
  },
508
446
  Popconfirm: {
509
447
  colorBgElevated: colors.surface.overlay,
510
- colorWarning: colors.semantic.warning.main,
511
- borderRadiusLG: constants.componentRadius.card,
512
- boxShadowSecondary: componentShadow.dropdown,
448
+ boxShadowSecondary: constants.shadow.popover,
449
+ borderRadiusLG: constants.radius.card,
513
450
  },
514
451
  Progress: {
515
452
  defaultColor: colors.link.default,
516
453
  colorSuccess: colors.semantic.success.main,
517
454
  colorError: colors.semantic.error.main,
518
455
  remainingColor: colors.neutral[2],
519
- circleTextColor: colors.text.primary,
520
456
  borderRadius: 100,
521
457
  lineBorderRadius: 100,
522
458
  },
@@ -524,7 +460,6 @@ export const buildAntDTheme = (colors, constants) => {
524
460
  titleFontSize: constants.typography.fontSize['3xl'],
525
461
  subtitleFontSize: constants.typography.fontSize.base,
526
462
  iconFontSize: constants.typography.fontSize['5xl'],
527
- extraMargin: `${constants.spacing[8]}px 0 0`,
528
463
  },
529
464
  Skeleton: {
530
465
  colorFill: colors.neutral[2],
@@ -533,9 +468,6 @@ export const buildAntDTheme = (colors, constants) => {
533
468
  },
534
469
  Spin: {
535
470
  colorPrimary: colors.link.default,
536
- dotSize: 20,
537
- dotSizeLG: 32,
538
- dotSizeSM: 14,
539
471
  },
540
472
  // ========================================
541
473
  // NAVIGATION
@@ -544,25 +476,16 @@ export const buildAntDTheme = (colors, constants) => {
544
476
  itemBg: 'transparent',
545
477
  itemColor: colors.text.primary,
546
478
  itemHoverBg: colors.surface.interactive,
547
- itemHoverColor: colors.text.primary,
548
479
  itemSelectedBg: colors.surface.selected,
549
- itemSelectedColor: colors.text.primary,
550
- itemActiveBg: colors.surface.selected,
551
- subMenuItemBg: 'transparent',
552
- // Dark menu (for sidebars)
480
+ // Dark sidebar
553
481
  darkItemBg: colors.absolute.black,
554
482
  darkSubMenuItemBg: colors.absolute.black,
555
483
  darkItemColor: colors.absolute.white,
556
484
  darkItemHoverBg: 'rgba(255, 255, 255, 0.08)',
557
- darkItemHoverColor: colors.absolute.white,
558
485
  darkItemSelectedBg: colors.link.default,
559
486
  darkItemSelectedColor: colors.absolute.white,
560
- itemBorderRadius: constants.componentRadius.input,
561
- itemHeight: 40,
487
+ itemBorderRadius: constants.radius.input,
562
488
  itemPaddingInline: constants.spacing[4],
563
- iconSize: 16,
564
- collapsedIconSize: 16,
565
- collapsedWidth: 64,
566
489
  },
567
490
  Breadcrumb: {
568
491
  itemColor: colors.text.secondary,
@@ -571,45 +494,26 @@ export const buildAntDTheme = (colors, constants) => {
571
494
  linkHoverColor: colors.link.hover,
572
495
  separatorColor: colors.text.tertiary,
573
496
  separatorMargin: constants.spacing[2],
574
- iconFontSize: constants.typography.fontSize.base,
575
- fontSize: constants.typography.fontSize.base,
576
497
  },
577
498
  Pagination: {
578
499
  colorPrimary: colors.link.default,
579
500
  colorPrimaryHover: colors.link.hover,
580
501
  itemActiveBg: colors.link.default,
581
- itemActiveBgDisabled: colors.neutral[2],
582
- itemBg: colors.surface.card,
583
- itemLinkBg: colors.surface.card,
584
- itemInputBg: colors.surface.card,
585
- itemSize: 32,
586
- itemSizeSM: 24,
587
502
  borderRadius: constants.radius.sm,
588
503
  },
589
504
  Steps: {
590
505
  colorPrimary: colors.link.default,
591
506
  colorText: colors.text.secondary,
592
507
  colorTextDescription: colors.text.tertiary,
593
- colorBorderSecondary: colors.border.default,
594
- dotSize: 8,
595
- iconSize: 32,
596
- iconSizeSM: 24,
597
508
  },
598
509
  Tabs: {
599
510
  colorPrimary: colors.link.default,
600
511
  itemColor: colors.text.secondary,
601
512
  itemHoverColor: colors.link.hover,
602
513
  itemSelectedColor: colors.link.default,
603
- itemActiveColor: colors.link.default,
604
514
  inkBarColor: colors.link.default,
605
- colorBorderSecondary: colors.border.default,
606
- titleFontSize: constants.typography.fontSize.base,
607
- titleFontSizeLG: constants.typography.fontSize.lg,
608
- titleFontSizeSM: constants.typography.fontSize.sm,
609
- cardBg: colors.surface.card,
610
515
  cardPadding: `${constants.spacing[2]}px ${constants.spacing[4]}px`,
611
516
  horizontalItemPadding: `${constants.spacing[3]}px 0`,
612
- horizontalItemMargin: `0 ${constants.spacing[8]}px 0 0`,
613
517
  },
614
518
  Anchor: {
615
519
  colorPrimary: colors.link.default,
@@ -620,9 +524,10 @@ export const buildAntDTheme = (colors, constants) => {
620
524
  colorBgElevated: colors.surface.overlay,
621
525
  controlItemBgHover: colors.surface.interactive,
622
526
  controlItemBgActive: colors.surface.selected,
623
- boxShadowSecondary: componentShadow.dropdown,
527
+ // Shadow on dropdown
528
+ boxShadowSecondary: constants.shadow.popover,
529
+ borderRadiusLG: constants.radius.card,
624
530
  paddingBlock: constants.spacing[1],
625
- borderRadiusLG: constants.componentRadius.card,
626
531
  },
627
532
  // ========================================
628
533
  // LAYOUT
@@ -630,27 +535,14 @@ export const buildAntDTheme = (colors, constants) => {
630
535
  Layout: {
631
536
  colorBgBody: colors.surface.page,
632
537
  colorBgHeader: colors.surface.card,
633
- colorBgTrigger: colors.absolute.black,
634
- siderBg: colors.absolute.black,
635
538
  headerBg: colors.surface.card,
636
- headerHeight: 64,
539
+ siderBg: colors.absolute.black,
637
540
  headerPadding: `0 ${constants.spacing[6]}px`,
638
- footerBg: colors.surface.card,
639
541
  footerPadding: `${constants.spacing[6]}px ${constants.spacing[12]}px`,
640
- bodyBg: colors.surface.page,
641
- triggerHeight: 48,
642
- triggerBg: colors.absolute.black,
643
- triggerColor: colors.absolute.white,
644
- zeroTriggerWidth: 36,
645
- zeroTriggerHeight: 42,
646
- lightSiderBg: colors.surface.card,
647
- lightTriggerBg: colors.surface.card,
648
- lightTriggerColor: colors.text.primary,
649
542
  },
650
543
  Divider: {
651
544
  colorSplit: colors.border.subtle,
652
545
  colorText: colors.text.tertiary,
653
- orientationMargin: 0.05,
654
546
  verticalMarginInline: constants.spacing[2],
655
547
  },
656
548
  // ========================================
@@ -659,97 +551,62 @@ export const buildAntDTheme = (colors, constants) => {
659
551
  Typography: {
660
552
  colorText: colors.text.primary,
661
553
  colorTextSecondary: colors.text.secondary,
662
- colorTextDescription: colors.text.tertiary,
663
554
  colorLink: colors.link.default,
664
555
  colorLinkHover: colors.link.hover,
665
556
  colorLinkActive: colors.link.active,
666
557
  titleMarginBottom: constants.spacing[2],
667
558
  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,
678
559
  },
679
560
  Tooltip: {
680
561
  colorBgSpotlight: colors.neutral[4],
681
562
  colorTextLightSolid: colors.text.inverse,
563
+ // Subtle shadow
564
+ boxShadowSecondary: constants.shadow.tooltip,
682
565
  borderRadius: constants.radius.sm,
683
- boxShadowSecondary: componentShadow.tooltip,
684
566
  },
685
567
  Popover: {
686
568
  colorBgElevated: colors.surface.overlay,
687
- colorText: colors.text.primary,
688
- borderRadiusLG: constants.componentRadius.card,
689
- boxShadowSecondary: componentShadow.dropdown,
569
+ // Shadow on popover
570
+ boxShadowSecondary: constants.shadow.popover,
571
+ borderRadiusLG: constants.radius.card,
690
572
  padding: constants.spacing[3],
691
573
  },
692
- Image: {
693
- previewOperationColor: colors.absolute.white,
694
- previewOperationColorDisabled: 'rgba(255, 255, 255, 0.25)',
695
- },
696
574
  Upload: {
697
- colorBorder: colors.border.default,
698
575
  colorFillAlter: colors.surface.interactive,
699
- colorText: colors.text.primary,
700
- colorTextDescription: colors.text.secondary,
701
- colorTextHeading: colors.text.primary,
702
576
  actionsColor: colors.link.default,
703
577
  },
704
- QRCode: {
705
- colorBgContainer: colors.surface.card,
706
- },
707
578
  Tour: {
708
579
  colorBgElevated: colors.surface.overlay,
709
580
  colorPrimary: colors.link.default,
710
- borderRadius: constants.componentRadius.card,
711
- boxShadowSecondary: componentShadow.dropdown,
581
+ boxShadowSecondary: constants.shadow.popover,
582
+ borderRadius: constants.radius.card,
712
583
  },
713
584
  FloatButton: {
714
585
  colorBgElevated: colors.surface.overlay,
715
586
  colorPrimary: colors.link.default,
716
- borderRadiusLG: constants.componentRadius.avatar,
717
- boxShadow: componentShadow.dropdown,
587
+ boxShadow: constants.shadow.popover,
588
+ borderRadiusLG: constants.radius.avatar,
718
589
  },
719
590
  Segmented: {
720
591
  colorBgLayout: colors.neutral[2],
721
- itemColor: colors.text.primary,
722
- itemHoverColor: colors.text.primary,
723
592
  itemHoverBg: colors.surface.interactive,
724
593
  itemSelectedBg: colors.surface.card,
725
- itemSelectedColor: colors.text.primary,
726
594
  borderRadius: constants.radius.base,
727
595
  borderRadiusSM: constants.radius.sm,
728
596
  },
729
597
  Mentions: {
730
- colorBgContainer: colors.surface.card,
731
598
  colorBgElevated: colors.surface.overlay,
732
- colorBorder: colors.border.default,
733
599
  controlItemBgHover: colors.surface.interactive,
734
600
  controlItemBgActive: colors.surface.selected,
735
- boxShadowSecondary: componentShadow.dropdown,
736
- },
737
- Transfer: {
738
- colorBgContainer: colors.surface.card,
739
- colorBorder: colors.border.default,
740
- itemPaddingBlock: constants.spacing[1],
601
+ boxShadowSecondary: constants.shadow.popover,
741
602
  },
742
603
  Cascader: {
743
- colorBgContainer: colors.surface.card,
744
604
  colorBgElevated: colors.surface.overlay,
745
- colorBorder: colors.border.default,
746
605
  controlItemBgHover: colors.surface.interactive,
747
606
  optionSelectedBg: colors.surface.selected,
748
607
  },
749
608
  TreeSelect: {
750
- colorBgContainer: colors.surface.card,
751
609
  colorBgElevated: colors.surface.overlay,
752
- colorBorder: colors.border.default,
753
610
  nodeHoverBg: colors.surface.interactive,
754
611
  nodeSelectedBg: colors.surface.selected,
755
612
  },
@@ -760,17 +617,12 @@ export const buildAntDTheme = (colors, constants) => {
760
617
  Empty: {
761
618
  colorText: colors.text.secondary,
762
619
  colorTextDescription: colors.text.tertiary,
763
- fontSize: constants.typography.fontSize.base,
764
620
  },
765
621
  List: {
766
622
  colorBorder: colors.border.subtle,
767
- colorSplit: colors.border.subtle,
768
623
  itemPadding: `${constants.spacing[3]}px ${constants.spacing[6]}px`,
769
624
  itemPaddingSM: `${constants.spacing[2]}px ${constants.spacing[4]}px`,
770
625
  itemPaddingLG: `${constants.spacing[4]}px ${constants.spacing[6]}px`,
771
- headerBg: 'transparent',
772
- footerBg: 'transparent',
773
- emptyTextPadding: constants.spacing[4],
774
626
  metaMarginBottom: constants.spacing[2],
775
627
  avatarMarginRight: constants.spacing[4],
776
628
  titleMarginBottom: constants.spacing[1],