@kb-labs/studio-app 0.6.0 → 2.8.0
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/index.html +1 -0
- package/dist/main.1d68e922.js +522 -0
- package/dist/main.1d68e922.js.map +1 -0
- package/dist/main.80b70197.css +2 -0
- package/dist/main.80b70197.css.map +1 -0
- package/dist/mf-manifest.json +241 -0
- package/dist/mf-stats.json +271 -0
- package/package.json +56 -39
- package/server.js +68 -0
- package/.env.example +0 -10
- package/UI-KIT-COMPONENTS.md +0 -783
- package/UI-KIT-PLAN.md +0 -326
- package/eslint-rules/no-direct-antd-import.js +0 -151
- package/eslint.config.ts +0 -27
- package/index.html +0 -17
- package/postcss.config.js +0 -7
- package/public/favicon.ico +0 -0
- package/rspack.config.mjs +0 -118
- package/src/App.tsx +0 -46
- package/src/components/devtools/devtools-log-feed.module.css +0 -165
- package/src/components/devtools/devtools-log-feed.tsx +0 -300
- package/src/components/devtools/devtools-panel.module.css +0 -121
- package/src/components/devtools/devtools-panel.tsx +0 -115
- package/src/components/empty-state.tsx +0 -28
- package/src/components/error-boundary.tsx +0 -210
- package/src/components/health-banner.module.css +0 -103
- package/src/components/health-banner.tsx +0 -134
- package/src/components/health-indicator.tsx +0 -12
- package/src/components/page-header.tsx +0 -49
- package/src/components/page-transition.tsx +0 -24
- package/src/components/role-switcher.tsx +0 -148
- package/src/components/run-badge.tsx +0 -13
- package/src/components/ui/icons.tsx +0 -509
- package/src/components/ui/index.ts +0 -25
- package/src/components/ui/kb-config-provider.tsx +0 -130
- package/src/components/ui/kb-header.module.css +0 -51
- package/src/components/ui/kb-header.tsx +0 -112
- package/src/components/ui/kb-notification-bell.module.css +0 -103
- package/src/components/ui/kb-notification-bell.tsx +0 -199
- package/src/components/ui/kb-page-layout.tsx +0 -66
- package/src/components/ui/kb-quick-search.module.css +0 -86
- package/src/components/ui/kb-quick-search.tsx +0 -196
- package/src/components/ui/kb-sidebar.module.css +0 -47
- package/src/components/ui/kb-sidebar.tsx +0 -196
- package/src/components/ui/kb-stat-card.module.css +0 -21
- package/src/components/ui/kb-stat-card.tsx +0 -22
- package/src/components/ui/kb-stat-grid.tsx +0 -22
- package/src/components/ui/kb-status-bar.module.css +0 -49
- package/src/components/ui/kb-status-bar.tsx +0 -145
- package/src/components/ui/kb-system-health-indicator.tsx +0 -229
- package/src/components/ui/kb-theme-toggle.tsx +0 -42
- package/src/components/ui/theme-adapter.ts +0 -812
- package/src/components/ui/theme-transition-overlay.tsx +0 -70
- package/src/components/ui/utils.ts +0 -6
- package/src/components/widget-error-boundary.tsx +0 -172
- package/src/config/env.ts +0 -5
- package/src/config/feature-flags.ts +0 -482
- package/src/config/studio.config.schema.ts +0 -88
- package/src/config/studio.config.ts +0 -84
- package/src/env.d.ts +0 -23
- package/src/hooks/use-command-palette.ts +0 -6
- package/src/hooks/use-devtools-store.ts +0 -25
- package/src/hooks/use-feature-flags.ts +0 -101
- package/src/index.css +0 -10
- package/src/layouts/dashboard-grid.tsx +0 -122
- package/src/layouts/index.ts +0 -12
- package/src/layouts/two-pane.tsx +0 -134
- package/src/main.tsx +0 -15
- package/src/modules/analytics/components/analytics-daily-stats-chart.tsx +0 -257
- package/src/modules/analytics/components/analytics-date-range-picker.tsx +0 -121
- package/src/modules/analytics/pages/analytics-cache-page.tsx +0 -285
- package/src/modules/analytics/pages/analytics-embeddings-page.tsx +0 -274
- package/src/modules/analytics/pages/analytics-events-page.tsx +0 -425
- package/src/modules/analytics/pages/analytics-llm-page.tsx +0 -434
- package/src/modules/analytics/pages/analytics-overview-page.tsx +0 -336
- package/src/modules/analytics/pages/analytics-page.tsx +0 -20
- package/src/modules/analytics/pages/analytics-storage-page.tsx +0 -344
- package/src/modules/analytics/pages/analytics-vectorstore-page.tsx +0 -279
- package/src/modules/analytics/routes/index.tsx +0 -133
- package/src/modules/analytics/utils/formatters.test.ts +0 -148
- package/src/modules/analytics/utils/formatters.ts +0 -100
- package/src/modules/auth/pages/login-page.module.css +0 -113
- package/src/modules/auth/pages/login-page.tsx +0 -80
- package/src/modules/auth/routes/index.tsx +0 -24
- package/src/modules/dashboard/components/ActivityTimelineWidget.tsx +0 -199
- package/src/modules/dashboard/components/AiInsightsWidget.tsx +0 -358
- package/src/modules/dashboard/components/AnimatedMetricCard.css +0 -88
- package/src/modules/dashboard/components/AnimatedMetricCard.tsx +0 -125
- package/src/modules/dashboard/components/HeroMetricCard.css +0 -114
- package/src/modules/dashboard/components/HeroMetricCard.tsx +0 -152
- package/src/modules/dashboard/components/HeroMetricsWidget.tsx +0 -146
- package/src/modules/dashboard/components/SystemResourcesWidget.tsx +0 -197
- package/src/modules/dashboard/components/dashboard-empty.tsx +0 -22
- package/src/modules/dashboard/components/dashboard-kpis-widget.tsx +0 -59
- package/src/modules/dashboard/components/dashboard-kpis.tsx +0 -13
- package/src/modules/dashboard/components/dashboard-latency-percentiles-widget.tsx +0 -85
- package/src/modules/dashboard/components/dashboard-metrics-widget.tsx +0 -78
- package/src/modules/dashboard/components/dashboard-plugins-widget.tsx +0 -67
- package/src/modules/dashboard/components/dashboard-requests-widget.tsx +0 -62
- package/src/modules/dashboard/layouts/dashboard-layout.tsx +0 -16
- package/src/modules/dashboard/pages/ai-insights-page.tsx +0 -563
- package/src/modules/dashboard/pages/dashboard-animations.css +0 -317
- package/src/modules/dashboard/pages/dashboard-page.tsx +0 -13
- package/src/modules/dashboard/routes/index.tsx +0 -70
- package/src/modules/observability/pages/devkit-page.tsx +0 -263
- package/src/modules/observability/pages/incident-detail-page.tsx +0 -571
- package/src/modules/observability/pages/incidents-page.tsx +0 -370
- package/src/modules/observability/pages/log-detail-page.tsx +0 -508
- package/src/modules/observability/pages/logs-page.tsx +0 -1129
- package/src/modules/observability/pages/prometheus-metrics-page.tsx +0 -486
- package/src/modules/observability/pages/state-broker-page.tsx +0 -229
- package/src/modules/observability/pages/system-events-page.tsx +0 -255
- package/src/modules/observability/routes/index.tsx +0 -133
- package/src/modules/plugins/components/marketplace-card.tsx +0 -153
- package/src/modules/plugins/components/plugin-ai-assistant-modal.tsx +0 -374
- package/src/modules/plugins/components/plugin-card.tsx +0 -136
- package/src/modules/plugins/components/plugin-detail/capabilities-summary.tsx +0 -101
- package/src/modules/plugins/components/plugin-detail/cli-commands-table.tsx +0 -101
- package/src/modules/plugins/components/plugin-detail/index.ts +0 -7
- package/src/modules/plugins/components/plugin-detail/jobs-table.tsx +0 -64
- package/src/modules/plugins/components/plugin-detail/permissions/env-permissions.tsx +0 -30
- package/src/modules/plugins/components/plugin-detail/permissions/filesystem-permissions.tsx +0 -68
- package/src/modules/plugins/components/plugin-detail/permissions/index.ts +0 -6
- package/src/modules/plugins/components/plugin-detail/permissions/network-permissions.tsx +0 -43
- package/src/modules/plugins/components/plugin-detail/permissions/platform-services.tsx +0 -242
- package/src/modules/plugins/components/plugin-detail/permissions/resource-quotas.tsx +0 -96
- package/src/modules/plugins/components/plugin-detail/permissions/shell-permissions.tsx +0 -55
- package/src/modules/plugins/components/plugin-detail/permissions-view.tsx +0 -47
- package/src/modules/plugins/components/plugin-detail/plugin-header.tsx +0 -169
- package/src/modules/plugins/components/plugin-detail/rest-routes-table.tsx +0 -159
- package/src/modules/plugins/components/plugin-detail/workflows-table.tsx +0 -40
- package/src/modules/plugins/components/plugin-grid.tsx +0 -20
- package/src/modules/plugins/components/plugin-table.tsx +0 -178
- package/src/modules/plugins/pages/marketplace-page.tsx +0 -200
- package/src/modules/plugins/pages/plugin-detail-page.tsx +0 -1145
- package/src/modules/plugins/routes/index.tsx +0 -48
- package/src/modules/plugins/utils/index.ts +0 -1
- package/src/modules/plugins/utils/schema-helpers.ts +0 -21
- package/src/modules/settings/components/api-routes-viewer.tsx +0 -415
- package/src/modules/settings/components/appearance-settings.tsx +0 -200
- package/src/modules/settings/components/configuration-settings.tsx +0 -321
- package/src/modules/settings/components/data-privacy-settings.tsx +0 -111
- package/src/modules/settings/components/experimental-settings.tsx +0 -243
- package/src/modules/settings/components/navigation-settings.tsx +0 -198
- package/src/modules/settings/components/notifications-settings.tsx +0 -40
- package/src/modules/settings/pages/settings-page.tsx +0 -298
- package/src/modules/settings/routes/index.tsx +0 -47
- package/src/pages/README-assistant.md +0 -91
- package/src/pages/login-page.tsx +0 -177
- package/src/pages/not-found-page.tsx +0 -85
- package/src/providers/auth-provider.tsx +0 -40
- package/src/providers/command-palette-provider.tsx +0 -193
- package/src/providers/data-sources-provider.tsx +0 -27
- package/src/providers/devtools-provider.tsx +0 -72
- package/src/providers/navigation-items-provider.tsx +0 -38
- package/src/providers/registry-v2-provider.tsx +0 -93
- package/src/providers/settings-provider.tsx +0 -158
- package/src/router.tsx +0 -302
- package/src/routes/helpers.tsx +0 -25
- package/src/routes/plugin-page-v2.tsx +0 -52
- package/src/routes/types.ts +0 -18
- package/src/styles/antd-overrides.css +0 -211
- package/src/styles/base.css +0 -190
- package/src/styles/settings.css +0 -75
- package/src/styles/variables.css +0 -94
- package/src/utils/analytics.ts +0 -183
- package/src/utils/apply-navigation-categories.ts +0 -83
- package/src/utils/commands.ts +0 -252
- package/src/utils/export.ts +0 -174
- package/src/utils/format-date.ts +0 -166
- package/src/utils/logger.ts +0 -110
- package/tailwind.config.ts +0 -13
- package/tsconfig.json +0 -13
- package/vitest-setup.ts +0 -1
- /package/{public → dist}/favicon.svg +0 -0
|
@@ -1,812 +0,0 @@
|
|
|
1
|
-
import type { ThemeConfig } from 'antd';
|
|
2
|
-
import { theme as antdTheme } from 'antd';
|
|
3
|
-
|
|
4
|
-
type MappingAlgorithm = typeof antdTheme.defaultAlgorithm;
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Maps CSS variables from ui-core to Ant Design tokens
|
|
8
|
-
* Uses CSS variables directly via var() for automatic theme switching
|
|
9
|
-
* This adapter maintains framework-agnostic nature of ui-core
|
|
10
|
-
* All Ant Design tokens are mapped to our CSS variables for consistency
|
|
11
|
-
*/
|
|
12
|
-
export function getAntDesignTokens(): ThemeConfig['token'] {
|
|
13
|
-
// CSS variables automatically change based on .light/.dark classes
|
|
14
|
-
// We use var() references so they update reactively
|
|
15
|
-
// Map all Ant Design tokens to our CSS variables for complete theme consistency
|
|
16
|
-
|
|
17
|
-
return {
|
|
18
|
-
// ============ Primary Colors ============
|
|
19
|
-
colorPrimary: 'var(--link, #0c66ff)',
|
|
20
|
-
colorPrimaryHover: 'var(--link-hover, #0050cc)',
|
|
21
|
-
colorPrimaryActive: 'var(--link-hover, #0050cc)',
|
|
22
|
-
colorPrimaryBg: 'var(--accent-subtle, #dbeafe)', // Light primary background
|
|
23
|
-
colorPrimaryBgHover: 'var(--accent-subtle, #dbeafe)',
|
|
24
|
-
colorPrimaryBorder: 'var(--link, #0c66ff)',
|
|
25
|
-
colorPrimaryBorderHover: 'var(--link-hover, #0050cc)',
|
|
26
|
-
colorPrimaryText: 'var(--link, #0c66ff)',
|
|
27
|
-
colorPrimaryTextHover: 'var(--link-hover, #0050cc)',
|
|
28
|
-
colorPrimaryTextActive: 'var(--link-hover, #0050cc)',
|
|
29
|
-
|
|
30
|
-
// ============ Success Colors ============
|
|
31
|
-
colorSuccess: 'var(--success, #16A34A)',
|
|
32
|
-
colorSuccessHover: 'var(--success, #16A34A)', // Use same color
|
|
33
|
-
colorSuccessActive: 'var(--success, #16A34A)',
|
|
34
|
-
colorSuccessBg: 'var(--bg-tertiary, #F3F4F6)', // Light background, could be success-specific
|
|
35
|
-
colorSuccessBgHover: 'var(--bg-tertiary, #F3F4F6)',
|
|
36
|
-
colorSuccessBorder: 'var(--success, #16A34A)',
|
|
37
|
-
colorSuccessBorderHover: 'var(--success, #16A34A)',
|
|
38
|
-
colorSuccessText: 'var(--success, #16A34A)',
|
|
39
|
-
colorSuccessTextHover: 'var(--success, #16A34A)',
|
|
40
|
-
colorSuccessTextActive: 'var(--success, #16A34A)',
|
|
41
|
-
|
|
42
|
-
// ============ Warning Colors ============
|
|
43
|
-
colorWarning: 'var(--warning, #F59E0B)',
|
|
44
|
-
colorWarningHover: 'var(--warning, #F59E0B)',
|
|
45
|
-
colorWarningActive: 'var(--warning, #F59E0B)',
|
|
46
|
-
colorWarningBg: 'var(--bg-tertiary, #F3F4F6)',
|
|
47
|
-
colorWarningBgHover: 'var(--bg-tertiary, #F3F4F6)',
|
|
48
|
-
colorWarningBorder: 'var(--warning, #F59E0B)',
|
|
49
|
-
colorWarningBorderHover: 'var(--warning, #F59E0B)',
|
|
50
|
-
colorWarningText: 'var(--warning, #F59E0B)',
|
|
51
|
-
colorWarningTextHover: 'var(--warning, #F59E0B)',
|
|
52
|
-
colorWarningTextActive: 'var(--warning, #F59E0B)',
|
|
53
|
-
colorWarningOutline: 'rgba(245, 158, 11, 0.2)', // NEW: Warning outline
|
|
54
|
-
|
|
55
|
-
// ============ Error Colors ============
|
|
56
|
-
colorError: 'var(--error, #DC2626)',
|
|
57
|
-
colorErrorHover: 'var(--error, #DC2626)',
|
|
58
|
-
colorErrorActive: 'var(--error, #DC2626)',
|
|
59
|
-
colorErrorBg: 'var(--bg-tertiary, #F3F4F6)',
|
|
60
|
-
colorErrorBgHover: 'var(--bg-tertiary, #F3F4F6)',
|
|
61
|
-
colorErrorBorder: 'var(--error, #DC2626)',
|
|
62
|
-
colorErrorBorderHover: 'var(--error, #DC2626)',
|
|
63
|
-
colorErrorText: 'var(--error, #DC2626)',
|
|
64
|
-
colorErrorTextHover: 'var(--error, #DC2626)',
|
|
65
|
-
colorErrorTextActive: 'var(--error, #DC2626)',
|
|
66
|
-
colorErrorOutline: 'rgba(220, 38, 38, 0.2)', // NEW: Error outline
|
|
67
|
-
|
|
68
|
-
// ============ Info Colors ============
|
|
69
|
-
colorInfo: 'var(--info, #0EA5E9)',
|
|
70
|
-
colorInfoHover: 'var(--info, #0EA5E9)',
|
|
71
|
-
colorInfoActive: 'var(--info, #0EA5E9)',
|
|
72
|
-
colorInfoBg: 'var(--bg-tertiary, #F3F4F6)',
|
|
73
|
-
colorInfoBgHover: 'var(--bg-tertiary, #F3F4F6)',
|
|
74
|
-
colorInfoBorder: 'var(--info, #0EA5E9)',
|
|
75
|
-
colorInfoBorderHover: 'var(--info, #0EA5E9)',
|
|
76
|
-
colorInfoText: 'var(--info, #0EA5E9)',
|
|
77
|
-
colorInfoTextHover: 'var(--info, #0EA5E9)',
|
|
78
|
-
colorInfoTextActive: 'var(--info, #0EA5E9)',
|
|
79
|
-
|
|
80
|
-
// ============ Background Colors ============
|
|
81
|
-
colorBgContainer: 'var(--bg-secondary, #FFFFFF)',
|
|
82
|
-
colorBgBase: 'var(--bg-primary, #F9FAFB)',
|
|
83
|
-
colorBgElevated: 'var(--bg-secondary, #FFFFFF)',
|
|
84
|
-
colorBgLayout: 'var(--bg-primary, #F9FAFB)',
|
|
85
|
-
colorBgSpotlight: 'var(--bg-tertiary, #F3F4F6)',
|
|
86
|
-
colorBgMask: 'rgba(0, 0, 0, 0.45)', // Overlay/modal backdrop - use standard dark overlay
|
|
87
|
-
colorBgTextHover: 'var(--bg-hover, #F3F4F6)', // NEW: Text hover background
|
|
88
|
-
colorBgTextActive: 'var(--bg-hover, #F3F4F6)', // NEW: Text active background
|
|
89
|
-
colorBgContainerDisabled: 'var(--bg-tertiary, #F3F4F6)', // NEW: Disabled container bg
|
|
90
|
-
|
|
91
|
-
// ============ Text Colors ============
|
|
92
|
-
colorText: 'var(--text-primary, #111827)',
|
|
93
|
-
colorTextBase: 'var(--text-primary, #111827)', // NEW: Base text color
|
|
94
|
-
colorTextSecondary: 'var(--text-secondary, #6B7280)',
|
|
95
|
-
colorTextTertiary: 'var(--text-tertiary, #6B7280)',
|
|
96
|
-
colorTextQuaternary: 'var(--text-tertiary, #6B7280)', // Use tertiary as fallback
|
|
97
|
-
colorTextDisabled: 'var(--disabled, #9CA3AF)',
|
|
98
|
-
colorTextHeading: 'var(--text-primary, #111827)', // Headings use primary text
|
|
99
|
-
colorTextLabel: 'var(--text-secondary, #6B7280)', // Labels use secondary
|
|
100
|
-
colorTextDescription: 'var(--text-secondary, #6B7280)', // Descriptions use secondary
|
|
101
|
-
colorTextPlaceholder: 'var(--text-tertiary, #6B7280)', // Placeholders use tertiary
|
|
102
|
-
colorTextLightSolid: 'var(--text-inverse, #FFFFFF)', // NEW: Text on colored backgrounds
|
|
103
|
-
|
|
104
|
-
// ============ Border Colors ============
|
|
105
|
-
colorBorder: 'var(--border-primary, #E5E7EB)',
|
|
106
|
-
colorBorderSecondary: 'var(--border-secondary, #D4D4D4)',
|
|
107
|
-
colorBorderBg: 'var(--bg-secondary, #FFFFFF)', // NEW: Background border color
|
|
108
|
-
colorSplit: 'var(--border-primary, #E5E7EB)', // Splitter/divider uses primary border
|
|
109
|
-
|
|
110
|
-
// ============ Fill Colors (for input backgrounds, etc.) ============
|
|
111
|
-
colorFill: 'var(--bg-tertiary, #F3F4F6)', // Fill uses tertiary background
|
|
112
|
-
colorFillSecondary: 'var(--bg-tertiary, #F3F4F6)', // Used for table row hover
|
|
113
|
-
colorFillTertiary: 'var(--bg-primary, #F9FAFB)', // Used for table header backgrounds
|
|
114
|
-
colorFillQuaternary: 'var(--bg-primary, #F9FAFB)',
|
|
115
|
-
colorFillContent: 'var(--bg-hover, #F3F4F6)', // NEW: Content area fill
|
|
116
|
-
colorFillContentHover: 'var(--bg-hover, #F3F4F6)', // NEW: Content hover fill
|
|
117
|
-
colorFillAlter: 'var(--bg-tertiary, #F3F4F6)', // NEW: Alternative fill
|
|
118
|
-
|
|
119
|
-
// ============ Neutral Colors ============
|
|
120
|
-
colorWhite: '#FFFFFF', // Always white
|
|
121
|
-
|
|
122
|
-
// ============ Shadow ============
|
|
123
|
-
boxShadow: '0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04)',
|
|
124
|
-
boxShadowSecondary: '0 4px 12px rgba(0,0,0,0.08)',
|
|
125
|
-
boxShadowTertiary: '0 8px 24px rgba(0,0,0,0.08)',
|
|
126
|
-
|
|
127
|
-
// ============ Border Radius ============
|
|
128
|
-
borderRadius: 8,
|
|
129
|
-
borderRadiusLG: 12,
|
|
130
|
-
borderRadiusSM: 6,
|
|
131
|
-
borderRadiusXS: 4,
|
|
132
|
-
borderRadiusOuter: 6,
|
|
133
|
-
|
|
134
|
-
// ============ Control Heights ============
|
|
135
|
-
controlHeight: 36,
|
|
136
|
-
controlHeightLG: 40,
|
|
137
|
-
controlHeightSM: 28,
|
|
138
|
-
controlHeightXS: 22,
|
|
139
|
-
|
|
140
|
-
// ============ Font Family ============
|
|
141
|
-
fontFamily: "var(--font-body, 'Inter', 'Segoe UI', sans-serif)",
|
|
142
|
-
|
|
143
|
-
// ============ Font Sizes ============
|
|
144
|
-
fontSize: 14,
|
|
145
|
-
fontSizeLG: 16,
|
|
146
|
-
fontSizeSM: 12,
|
|
147
|
-
fontSizeXL: 20,
|
|
148
|
-
fontSizeHeading1: 38,
|
|
149
|
-
fontSizeHeading2: 30,
|
|
150
|
-
fontSizeHeading3: 24,
|
|
151
|
-
fontSizeHeading4: 20,
|
|
152
|
-
fontSizeHeading5: 16,
|
|
153
|
-
fontSizeIcon: 12,
|
|
154
|
-
|
|
155
|
-
// ============ Font Weights ============
|
|
156
|
-
fontWeightStrong: 600,
|
|
157
|
-
lineHeight: 1.5714285714285714,
|
|
158
|
-
lineHeightLG: 1.5,
|
|
159
|
-
lineHeightSM: 1.6666666666666667,
|
|
160
|
-
|
|
161
|
-
// ============ Padding ============
|
|
162
|
-
padding: 16,
|
|
163
|
-
paddingLG: 24,
|
|
164
|
-
paddingSM: 12,
|
|
165
|
-
paddingXS: 8,
|
|
166
|
-
paddingXXS: 4,
|
|
167
|
-
|
|
168
|
-
// ============ Margin ============
|
|
169
|
-
margin: 16,
|
|
170
|
-
marginLG: 24,
|
|
171
|
-
marginSM: 12,
|
|
172
|
-
marginXS: 8,
|
|
173
|
-
marginXXS: 4,
|
|
174
|
-
|
|
175
|
-
// ============ Motion ============
|
|
176
|
-
motionDurationFast: '0.1s',
|
|
177
|
-
motionDurationMid: '0.2s',
|
|
178
|
-
motionDurationSlow: '0.3s',
|
|
179
|
-
motionEaseInOut: 'cubic-bezier(0.645, 0.045, 0.355, 1)',
|
|
180
|
-
motionEaseOut: 'cubic-bezier(0.215, 0.61, 0.355, 1)',
|
|
181
|
-
|
|
182
|
-
// ============ Link ============
|
|
183
|
-
colorLink: 'var(--link, #0c66ff)',
|
|
184
|
-
colorLinkHover: 'var(--link-hover, #0050cc)',
|
|
185
|
-
colorLinkActive: 'var(--link-hover, #0050cc)',
|
|
186
|
-
|
|
187
|
-
// ============ Icons & Highlights ============
|
|
188
|
-
colorIcon: 'var(--text-secondary, #6B7280)', // NEW: Icon color
|
|
189
|
-
colorIconHover: 'var(--text-primary, #111827)', // NEW: Icon hover
|
|
190
|
-
colorHighlight: 'var(--link, #0c66ff)', // NEW: Highlight color
|
|
191
|
-
|
|
192
|
-
// ============ Control States (Inputs, Buttons, etc.) ============
|
|
193
|
-
controlOutline: 'rgba(12, 102, 255, 0.15)', // NEW: Input outline on focus
|
|
194
|
-
controlOutlineWidth: 2, // NEW: Outline width
|
|
195
|
-
controlInteractiveSize: 16, // NEW: Interactive hit area size
|
|
196
|
-
controlItemBgHover: 'var(--bg-hover, #F3F4F6)', // NEW: Item hover bg
|
|
197
|
-
controlItemBgActive: 'var(--accent-subtle, #dbeafe)', // NEW: Item active bg
|
|
198
|
-
controlItemBgActiveHover: 'var(--accent-subtle, #dbeafe)', // NEW: Item active hover
|
|
199
|
-
controlItemBgActiveDisabled: 'var(--bg-tertiary, #F3F4F6)', // NEW: Disabled active bg
|
|
200
|
-
controlTmpOutline: 'rgba(12, 102, 255, 0.08)', // NEW: Temporary outline
|
|
201
|
-
|
|
202
|
-
// ============ Screen Sizes (for responsive) ============
|
|
203
|
-
screenXS: 480,
|
|
204
|
-
screenSM: 576,
|
|
205
|
-
screenMD: 768,
|
|
206
|
-
screenLG: 992,
|
|
207
|
-
screenXL: 1200,
|
|
208
|
-
screenXXL: 1600,
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* Gets component-specific theme configurations
|
|
214
|
-
* Uses Ant Design's components API for proper theming without CSS overrides
|
|
215
|
-
*/
|
|
216
|
-
export function getAntDesignComponents(): ThemeConfig['components'] {
|
|
217
|
-
return {
|
|
218
|
-
Table: {
|
|
219
|
-
// Colors
|
|
220
|
-
headerBg: 'var(--bg-tertiary)',
|
|
221
|
-
headerColor: 'var(--text-primary)',
|
|
222
|
-
borderColor: 'var(--border-primary)',
|
|
223
|
-
colorText: 'var(--text-primary)',
|
|
224
|
-
colorTextHeading: 'var(--text-primary)',
|
|
225
|
-
|
|
226
|
-
// Row states (IMPORTANT for UX)
|
|
227
|
-
rowHoverBg: 'var(--bg-hover)',
|
|
228
|
-
rowSelectedBg: 'var(--accent-subtle)', // NEW: Selected row background
|
|
229
|
-
rowSelectedHoverBg: 'var(--accent-subtle)', // NEW: Selected row hover
|
|
230
|
-
rowExpandedBg: 'var(--bg-secondary)', // NEW: Expanded row background
|
|
231
|
-
bodySortBg: 'var(--bg-tertiary)', // NEW: Sorted column background
|
|
232
|
-
|
|
233
|
-
// Header states
|
|
234
|
-
headerSortActiveBg: 'var(--bg-tertiary)',
|
|
235
|
-
headerSortHoverBg: 'var(--bg-tertiary)',
|
|
236
|
-
headerFilterHoverBg: 'var(--bg-tertiary)',
|
|
237
|
-
fixedHeaderSortActiveBg: 'var(--bg-tertiary)',
|
|
238
|
-
|
|
239
|
-
// Icons (IMPORTANT for visibility)
|
|
240
|
-
colorIcon: 'var(--text-secondary)',
|
|
241
|
-
colorIconHover: 'var(--text-primary)',
|
|
242
|
-
expandIconBg: 'var(--bg-secondary)',
|
|
243
|
-
|
|
244
|
-
// Footer
|
|
245
|
-
footerBg: 'var(--bg-tertiary)', // NEW: Table footer background
|
|
246
|
-
footerColor: 'var(--text-primary)', // NEW: Footer text color
|
|
247
|
-
|
|
248
|
-
// Sizing
|
|
249
|
-
selectionColumnWidth: 60,
|
|
250
|
-
stickyScrollBarBg: 'var(--bg-tertiary)',
|
|
251
|
-
stickyScrollBarBorderRadius: 4,
|
|
252
|
-
},
|
|
253
|
-
Tag: {
|
|
254
|
-
defaultBg: 'var(--bg-tertiary)',
|
|
255
|
-
defaultColor: 'var(--text-primary)',
|
|
256
|
-
colorBorder: 'var(--border-primary)',
|
|
257
|
-
colorSuccess: 'var(--success)',
|
|
258
|
-
colorError: 'var(--error)',
|
|
259
|
-
colorWarning: 'var(--warning)',
|
|
260
|
-
colorInfo: 'var(--info)',
|
|
261
|
-
},
|
|
262
|
-
Badge: {
|
|
263
|
-
colorError: 'var(--error)',
|
|
264
|
-
colorSuccess: 'var(--success)',
|
|
265
|
-
colorWarning: 'var(--warning)',
|
|
266
|
-
colorInfo: 'var(--info)',
|
|
267
|
-
colorText: 'var(--text-primary)',
|
|
268
|
-
},
|
|
269
|
-
Alert: {
|
|
270
|
-
// ============ Status colors ============
|
|
271
|
-
colorSuccess: 'var(--success)',
|
|
272
|
-
colorError: 'var(--error)',
|
|
273
|
-
colorWarning: 'var(--warning)',
|
|
274
|
-
colorInfo: 'var(--info)',
|
|
275
|
-
|
|
276
|
-
// ============ Text & background ============
|
|
277
|
-
colorText: 'var(--text-primary)',
|
|
278
|
-
colorTextHeading: 'var(--text-primary)',
|
|
279
|
-
colorBgContainer: 'var(--bg-secondary)',
|
|
280
|
-
colorBorder: 'var(--border-primary)',
|
|
281
|
-
|
|
282
|
-
// ============ Icons (IMPORTANT for close button visibility) ============
|
|
283
|
-
colorIcon: 'var(--text-secondary)', // NEW: Icon color (close button)
|
|
284
|
-
colorIconHover: 'var(--text-primary)', // NEW: Icon hover (close button hover)
|
|
285
|
-
|
|
286
|
-
// ============ Status-specific backgrounds ============
|
|
287
|
-
colorSuccessBg: 'var(--bg-tertiary)', // NEW: Success alert background
|
|
288
|
-
colorErrorBg: 'var(--bg-tertiary)', // NEW: Error alert background
|
|
289
|
-
colorWarningBg: 'var(--bg-tertiary)', // NEW: Warning alert background
|
|
290
|
-
colorInfoBg: 'var(--bg-tertiary)', // NEW: Info alert background
|
|
291
|
-
|
|
292
|
-
// ============ Status-specific borders ============
|
|
293
|
-
colorSuccessBorder: 'var(--success)', // NEW: Success alert border
|
|
294
|
-
colorErrorBorder: 'var(--error)', // NEW: Error alert border
|
|
295
|
-
colorWarningBorder: 'var(--warning)', // NEW: Warning alert border
|
|
296
|
-
colorInfoBorder: 'var(--info)', // NEW: Info alert border
|
|
297
|
-
},
|
|
298
|
-
Card: {
|
|
299
|
-
// Colors
|
|
300
|
-
colorText: 'var(--text-primary)',
|
|
301
|
-
colorTextHeading: 'var(--text-primary)',
|
|
302
|
-
colorBgContainer: 'var(--bg-secondary)',
|
|
303
|
-
colorBorder: 'var(--border-primary)',
|
|
304
|
-
colorBorderSecondary: 'var(--border-primary)',
|
|
305
|
-
|
|
306
|
-
// Header & Actions (IMPORTANT for visual hierarchy)
|
|
307
|
-
headerBg: 'var(--bg-secondary)', // NEW: Card header background
|
|
308
|
-
actionsBg: 'var(--bg-tertiary)', // NEW: Card actions background
|
|
309
|
-
extraColor: 'var(--text-secondary)', // NEW: Extra area text color
|
|
310
|
-
},
|
|
311
|
-
Descriptions: {
|
|
312
|
-
colorText: 'var(--text-primary)',
|
|
313
|
-
colorTextLabel: 'var(--text-secondary)',
|
|
314
|
-
colorBorder: 'var(--border-primary)',
|
|
315
|
-
},
|
|
316
|
-
Button: {
|
|
317
|
-
// ============ Base colors ============
|
|
318
|
-
colorText: 'var(--text-primary)',
|
|
319
|
-
colorBgContainer: 'var(--bg-secondary)',
|
|
320
|
-
colorBorder: 'var(--border-primary)',
|
|
321
|
-
|
|
322
|
-
// ============ Primary button ============
|
|
323
|
-
colorPrimary: 'var(--link)',
|
|
324
|
-
colorPrimaryHover: 'var(--link-hover)',
|
|
325
|
-
colorPrimaryActive: 'var(--link-hover)',
|
|
326
|
-
primaryColor: 'var(--text-inverse)',
|
|
327
|
-
primaryShadow: '0 2px 0 rgba(12, 102, 255, 0.15)',
|
|
328
|
-
|
|
329
|
-
// ============ Default button (filled style) ============
|
|
330
|
-
defaultBg: 'var(--bg-secondary)',
|
|
331
|
-
defaultColor: 'var(--text-primary)',
|
|
332
|
-
defaultBorderColor: 'var(--border-primary)',
|
|
333
|
-
defaultShadow: '0 2px 0 rgba(0, 0, 0, 0.015)',
|
|
334
|
-
|
|
335
|
-
// Default button - hover states (IMPORTANT for dark theme)
|
|
336
|
-
defaultHoverBg: 'var(--bg-hover)',
|
|
337
|
-
defaultHoverColor: 'var(--text-primary)',
|
|
338
|
-
defaultHoverBorderColor: 'var(--border-secondary)',
|
|
339
|
-
|
|
340
|
-
// Default button - active states
|
|
341
|
-
defaultActiveBg: 'var(--bg-hover)',
|
|
342
|
-
defaultActiveColor: 'var(--text-primary)',
|
|
343
|
-
defaultActiveBorderColor: 'var(--border-secondary)',
|
|
344
|
-
|
|
345
|
-
// ============ Ghost button (transparent with border) ============
|
|
346
|
-
ghostBg: 'transparent',
|
|
347
|
-
defaultGhostColor: 'var(--text-primary)', // Text color
|
|
348
|
-
defaultGhostBorderColor: 'var(--border-primary)', // Border color
|
|
349
|
-
|
|
350
|
-
// Ghost button - active states
|
|
351
|
-
|
|
352
|
-
// ============ Dashed button (dashed border) ============
|
|
353
|
-
borderColorDisabled: 'var(--border-primary)', // Dashed border uses this
|
|
354
|
-
colorBgContainerDisabled: 'var(--bg-tertiary)', // Disabled background
|
|
355
|
-
|
|
356
|
-
// ============ Text button (no background, no border) ============
|
|
357
|
-
// CRITICAL: These control icon-only buttons like notification close button!
|
|
358
|
-
textTextColor: 'var(--text-secondary)', // Base text color for text buttons (icons!)
|
|
359
|
-
textTextHoverColor: 'var(--text-primary)', // Text button hover (icon hover!)
|
|
360
|
-
textTextActiveColor: 'var(--text-primary)', // Text button active (icon active!)
|
|
361
|
-
textHoverBg: 'var(--accent-subtle)', // Text button hover background
|
|
362
|
-
|
|
363
|
-
// ============ Link button (looks like a link) ============
|
|
364
|
-
linkHoverBg: 'transparent',
|
|
365
|
-
colorLink: 'var(--link)',
|
|
366
|
-
colorLinkHover: 'var(--link-hover)',
|
|
367
|
-
colorLinkActive: 'var(--link-hover)',
|
|
368
|
-
|
|
369
|
-
// ============ Solid button (filled buttons) ============
|
|
370
|
-
solidTextColor: 'var(--text-primary)', // Text color for solid buttons
|
|
371
|
-
|
|
372
|
-
// ============ Danger button ============
|
|
373
|
-
dangerColor: 'var(--error)', // Danger button text & border color
|
|
374
|
-
dangerShadow: '0 2px 0 rgba(220, 38, 38, 0.1)',
|
|
375
|
-
|
|
376
|
-
// Danger ghost button
|
|
377
|
-
colorErrorBg: 'transparent', // Ghost danger background
|
|
378
|
-
colorErrorBgHover: 'var(--bg-hover)', // Ghost danger hover
|
|
379
|
-
colorErrorBorder: 'var(--error)', // Ghost danger border
|
|
380
|
-
colorErrorBorderHover: 'var(--error)', // Ghost danger border hover
|
|
381
|
-
colorErrorHover: 'var(--error)', // Ghost danger text hover
|
|
382
|
-
colorErrorActive: 'var(--error)', // Ghost danger text active
|
|
383
|
-
},
|
|
384
|
-
Input: {
|
|
385
|
-
// Base colors
|
|
386
|
-
colorText: 'var(--text-primary)',
|
|
387
|
-
colorBgContainer: 'var(--bg-secondary)',
|
|
388
|
-
colorBorder: 'var(--border-primary)',
|
|
389
|
-
colorTextPlaceholder: 'var(--text-tertiary)',
|
|
390
|
-
|
|
391
|
-
// Interactive states (IMPORTANT for focus feedback)
|
|
392
|
-
hoverBorderColor: 'var(--border-secondary)',
|
|
393
|
-
activeBorderColor: 'var(--link)',
|
|
394
|
-
activeShadow: '0 0 0 3px rgba(12, 102, 255, 0.12)', // NEW: Focus shadow
|
|
395
|
-
errorActiveShadow: '0 0 0 2px rgba(220, 38, 38, 0.1)', // NEW: Error focus shadow
|
|
396
|
-
warningActiveShadow: '0 0 0 2px rgba(245, 158, 11, 0.1)', // NEW: Warning focus shadow
|
|
397
|
-
|
|
398
|
-
// Clear icon (IMPORTANT for visibility)
|
|
399
|
-
colorIcon: 'var(--text-secondary)', // NEW: Clear icon color
|
|
400
|
-
colorIconHover: 'var(--text-primary)', // NEW: Clear icon hover
|
|
401
|
-
},
|
|
402
|
-
Select: {
|
|
403
|
-
// ============ Base colors ============
|
|
404
|
-
colorText: 'var(--text-primary)',
|
|
405
|
-
colorBgContainer: 'var(--bg-secondary)', // Input background
|
|
406
|
-
colorBorder: 'var(--border-primary)', // Input border
|
|
407
|
-
colorBgElevated: 'var(--bg-secondary)', // Dropdown panel background
|
|
408
|
-
colorTextPlaceholder: 'var(--text-tertiary)', // Placeholder text
|
|
409
|
-
|
|
410
|
-
// ============ Primary & status colors ============
|
|
411
|
-
colorPrimary: 'var(--link)', // Selected item marker color
|
|
412
|
-
colorPrimaryHover: 'var(--link-hover)', // Selected item hover
|
|
413
|
-
|
|
414
|
-
// ============ Options/items (IMPORTANT for selection feedback) ============
|
|
415
|
-
optionSelectedBg: 'var(--accent-subtle)', // Selected option background
|
|
416
|
-
optionSelectedColor: 'var(--link)', // Selected option text color
|
|
417
|
-
optionActiveBg: 'var(--bg-hover)', // Option hover background
|
|
418
|
-
optionSelectedFontWeight: 600, // Bold for selected items
|
|
419
|
-
|
|
420
|
-
// ============ Multiple select (tags mode) ============
|
|
421
|
-
multipleItemBg: 'var(--bg-tertiary)', // Tag background
|
|
422
|
-
multipleItemBorderColor: 'var(--border-primary)', // Tag border
|
|
423
|
-
multipleItemColorDisabled: 'var(--disabled)', // Disabled tag color
|
|
424
|
-
|
|
425
|
-
// ============ Icons (IMPORTANT for visibility) ============
|
|
426
|
-
colorIcon: 'var(--text-secondary)', // Dropdown arrow, clear icon
|
|
427
|
-
colorIconHover: 'var(--text-primary)', // Icon hover
|
|
428
|
-
|
|
429
|
-
// ============ Selector (input area) ============
|
|
430
|
-
selectorBg: 'var(--bg-secondary)', // Selector background
|
|
431
|
-
},
|
|
432
|
-
Dropdown: {
|
|
433
|
-
// ============ Base colors ============
|
|
434
|
-
colorText: 'var(--text-primary)',
|
|
435
|
-
colorBgElevated: 'var(--bg-secondary)', // Dropdown panel background
|
|
436
|
-
colorBorder: 'var(--border-primary)',
|
|
437
|
-
colorTextDisabled: 'var(--disabled)',
|
|
438
|
-
|
|
439
|
-
// ============ Item states (IMPORTANT for visual feedback) ============
|
|
440
|
-
controlItemBgHover: 'var(--bg-hover)', // Item hover background
|
|
441
|
-
controlItemBgActive: 'var(--accent-subtle)', // Selected item background
|
|
442
|
-
controlItemBgActiveHover: 'var(--accent-subtle)', // Selected item hover
|
|
443
|
-
|
|
444
|
-
// ============ Colors for items ============
|
|
445
|
-
colorPrimary: 'var(--link)', // Primary color for selected items
|
|
446
|
-
colorPrimaryHover: 'var(--link-hover)', // Primary hover
|
|
447
|
-
|
|
448
|
-
// ============ Dropdown.Button specific ============
|
|
449
|
-
colorBgContainer: 'var(--bg-secondary)', // Button background
|
|
450
|
-
colorSplit: 'var(--border-primary)', // Split line between button parts
|
|
451
|
-
|
|
452
|
-
// ============ Padding & sizing ============
|
|
453
|
-
paddingBlock: 8, // Vertical padding for items
|
|
454
|
-
controlPaddingHorizontal: 12, // Horizontal padding for items
|
|
455
|
-
},
|
|
456
|
-
Menu: {
|
|
457
|
-
// ============ Base colors ============
|
|
458
|
-
colorText: 'var(--text-primary)',
|
|
459
|
-
colorTextSecondary: 'var(--text-secondary)', // NEW: Secondary text in menu items
|
|
460
|
-
colorBgContainer: 'var(--bg-sidebar)', // Menu background
|
|
461
|
-
colorBorder: 'var(--border-primary)', // NEW: Border color
|
|
462
|
-
colorSplit: 'var(--border-primary)', // NEW: Divider color
|
|
463
|
-
|
|
464
|
-
// ============ Item colors (IMPORTANT for visibility) ============
|
|
465
|
-
itemColor: 'var(--text-primary)', // NEW: Default item text color
|
|
466
|
-
itemBg: 'var(--bg-secondary)', // NEW: Item background
|
|
467
|
-
|
|
468
|
-
// ============ Hover states (IMPORTANT for feedback) ============
|
|
469
|
-
itemHoverBg: 'var(--bg-hover)', // Item hover background
|
|
470
|
-
itemHoverColor: 'var(--link)', // Item hover text color
|
|
471
|
-
|
|
472
|
-
// ============ Selected states ============
|
|
473
|
-
itemSelectedBg: 'var(--accent-subtle)', // Selected item background
|
|
474
|
-
itemSelectedColor: 'var(--link)', // Selected item text color
|
|
475
|
-
|
|
476
|
-
// ============ Active states ============
|
|
477
|
-
itemActiveBg: 'var(--accent-subtle)', // Active item background
|
|
478
|
-
colorActiveBarBorderSize: 0, // No active bar (using background instead)
|
|
479
|
-
|
|
480
|
-
// ============ Dark theme specific ============
|
|
481
|
-
darkItemBg: 'var(--bg-secondary)', // NEW: Dark mode item background
|
|
482
|
-
darkItemColor: 'var(--text-primary)', // NEW: Dark mode item text
|
|
483
|
-
darkItemHoverBg: 'var(--bg-hover)', // NEW: Dark mode hover
|
|
484
|
-
darkItemSelectedBg: 'var(--accent-subtle)', // Dark mode selected
|
|
485
|
-
darkItemSelectedColor: 'var(--link)', // Dark mode selected text
|
|
486
|
-
darkSubMenuItemBg: 'var(--bg-secondary)', // NEW: Dark mode submenu background
|
|
487
|
-
|
|
488
|
-
// ============ SubMenu (dropdown menus) ============
|
|
489
|
-
subMenuItemBg: 'var(--bg-secondary)', // Submenu background
|
|
490
|
-
popupBg: 'var(--bg-secondary)', // NEW: Popup menu background
|
|
491
|
-
|
|
492
|
-
// ============ Primary color ============
|
|
493
|
-
colorPrimary: 'var(--link)', // Primary color for active elements
|
|
494
|
-
|
|
495
|
-
// ============ Icons (IMPORTANT for visibility) ============
|
|
496
|
-
colorIcon: 'var(--text-secondary)', // NEW: Icon color
|
|
497
|
-
colorIconHover: 'var(--text-primary)', // NEW: Icon hover
|
|
498
|
-
|
|
499
|
-
// ============ Group title ============
|
|
500
|
-
groupTitleColor: 'var(--text-tertiary)',
|
|
501
|
-
groupTitleFontSize: 11,
|
|
502
|
-
|
|
503
|
-
// ============ Item border radius ============
|
|
504
|
-
itemBorderRadius: 8,
|
|
505
|
-
subMenuItemBorderRadius: 6,
|
|
506
|
-
|
|
507
|
-
// ============ Padding ============
|
|
508
|
-
itemPaddingInline: 12,
|
|
509
|
-
},
|
|
510
|
-
Tabs: {
|
|
511
|
-
// Base colors
|
|
512
|
-
colorText: 'var(--text-secondary)',
|
|
513
|
-
colorTextHeading: 'var(--text-primary)',
|
|
514
|
-
colorBorder: 'var(--border-primary)',
|
|
515
|
-
colorBorderSecondary: 'var(--border-primary)',
|
|
516
|
-
|
|
517
|
-
// Interactive states (IMPORTANT for tab navigation feedback)
|
|
518
|
-
colorPrimary: 'var(--link)',
|
|
519
|
-
itemHoverColor: 'var(--link)', // Tab hover color
|
|
520
|
-
itemSelectedColor: 'var(--link)', // Selected tab color
|
|
521
|
-
itemActiveColor: 'var(--link)', // Active tab color
|
|
522
|
-
inkBarColor: 'var(--link)', // Active tab underline
|
|
523
|
-
|
|
524
|
-
},
|
|
525
|
-
Modal: {
|
|
526
|
-
// Content colors
|
|
527
|
-
colorText: 'var(--text-primary)',
|
|
528
|
-
colorTextHeading: 'var(--text-primary)',
|
|
529
|
-
colorBgElevated: 'var(--bg-secondary)',
|
|
530
|
-
colorBorder: 'var(--border-primary)',
|
|
531
|
-
|
|
532
|
-
// Header & Footer
|
|
533
|
-
headerBg: 'var(--bg-secondary)', // NEW: Modal header background
|
|
534
|
-
footerBg: 'var(--bg-tertiary)', // NEW: Modal footer background
|
|
535
|
-
contentBg: 'var(--bg-secondary)', // NEW: Modal content background
|
|
536
|
-
|
|
537
|
-
// Close icon (IMPORTANT for visibility)
|
|
538
|
-
colorIcon: 'var(--text-secondary)', // NEW: Close icon color
|
|
539
|
-
colorIconHover: 'var(--text-primary)', // NEW: Close icon hover
|
|
540
|
-
},
|
|
541
|
-
Drawer: {
|
|
542
|
-
// Content colors
|
|
543
|
-
colorText: 'var(--text-primary)',
|
|
544
|
-
colorBgElevated: 'var(--bg-secondary)',
|
|
545
|
-
colorBorder: 'var(--border-primary)',
|
|
546
|
-
|
|
547
|
-
// Close icon (IMPORTANT for visibility)
|
|
548
|
-
colorIcon: 'var(--text-secondary)', // NEW: Close icon color
|
|
549
|
-
colorIconHover: 'var(--text-primary)', // NEW: Close icon hover
|
|
550
|
-
},
|
|
551
|
-
Popover: {
|
|
552
|
-
colorText: 'var(--text-primary)',
|
|
553
|
-
colorBgElevated: 'var(--bg-secondary)',
|
|
554
|
-
colorBorder: 'var(--border-primary)',
|
|
555
|
-
},
|
|
556
|
-
Tooltip: {
|
|
557
|
-
colorText: 'var(--text-primary)',
|
|
558
|
-
colorBgSpotlight: 'var(--bg-secondary)',
|
|
559
|
-
colorTextLightSolid: 'var(--text-primary)',
|
|
560
|
-
},
|
|
561
|
-
List: {
|
|
562
|
-
// Base colors
|
|
563
|
-
colorText: 'var(--text-primary)',
|
|
564
|
-
colorTextHeading: 'var(--text-primary)',
|
|
565
|
-
colorBorder: 'var(--border-primary)',
|
|
566
|
-
colorSplit: 'var(--border-primary)',
|
|
567
|
-
|
|
568
|
-
metaMarginBottom: 8, // Meta info spacing
|
|
569
|
-
avatarMarginRight: 16, // NEW: Avatar spacing
|
|
570
|
-
},
|
|
571
|
-
Switch: {
|
|
572
|
-
colorPrimary: 'var(--link)',
|
|
573
|
-
colorPrimaryHover: 'var(--link-hover)',
|
|
574
|
-
},
|
|
575
|
-
Radio: {
|
|
576
|
-
colorPrimary: 'var(--link)',
|
|
577
|
-
colorText: 'var(--text-primary)',
|
|
578
|
-
buttonCheckedBg: 'var(--link)',
|
|
579
|
-
buttonCheckedBgDisabled: 'var(--disabled)',
|
|
580
|
-
buttonColor: 'var(--text-primary)',
|
|
581
|
-
buttonSolidCheckedColor: 'var(--text-inverse)',
|
|
582
|
-
buttonSolidCheckedBg: 'var(--link)',
|
|
583
|
-
buttonSolidCheckedHoverBg: 'var(--link-hover)',
|
|
584
|
-
buttonSolidCheckedActiveBg: 'var(--link-hover)',
|
|
585
|
-
},
|
|
586
|
-
Checkbox: {
|
|
587
|
-
colorPrimary: 'var(--link)',
|
|
588
|
-
colorText: 'var(--text-primary)',
|
|
589
|
-
},
|
|
590
|
-
DatePicker: {
|
|
591
|
-
// Base colors
|
|
592
|
-
colorText: 'var(--text-primary)',
|
|
593
|
-
colorBgContainer: 'var(--bg-secondary)',
|
|
594
|
-
colorBorder: 'var(--border-primary)',
|
|
595
|
-
colorBgElevated: 'var(--bg-secondary)',
|
|
596
|
-
colorTextPlaceholder: 'var(--text-tertiary)',
|
|
597
|
-
colorTextDisabled: 'var(--disabled)',
|
|
598
|
-
|
|
599
|
-
// Interactive states (IMPORTANT for date selection feedback)
|
|
600
|
-
colorLink: 'var(--link)', // Selected date color
|
|
601
|
-
colorLinkHover: 'var(--link-hover)', // Date hover color
|
|
602
|
-
cellHoverBg: 'var(--bg-hover)', // NEW: Date cell hover background
|
|
603
|
-
cellActiveWithRangeBg: 'var(--accent-subtle)', // NEW: Range selection background
|
|
604
|
-
cellBgDisabled: 'var(--bg-tertiary)', // NEW: Disabled date background
|
|
605
|
-
|
|
606
|
-
// Icons (IMPORTANT for visibility)
|
|
607
|
-
colorIcon: 'var(--text-secondary)', // NEW: Calendar icon color
|
|
608
|
-
colorIconHover: 'var(--text-primary)', // NEW: Calendar icon hover
|
|
609
|
-
},
|
|
610
|
-
Form: {
|
|
611
|
-
colorText: 'var(--text-primary)',
|
|
612
|
-
colorTextLabel: 'var(--text-secondary)',
|
|
613
|
-
colorError: 'var(--error)',
|
|
614
|
-
colorWarning: 'var(--warning)',
|
|
615
|
-
},
|
|
616
|
-
Pagination: {
|
|
617
|
-
// Base colors
|
|
618
|
-
colorText: 'var(--text-primary)',
|
|
619
|
-
colorTextDisabled: 'var(--disabled)',
|
|
620
|
-
colorBgContainer: 'var(--bg-secondary)',
|
|
621
|
-
|
|
622
|
-
// Interactive states (IMPORTANT for navigation feedback)
|
|
623
|
-
colorPrimary: 'var(--link)', // Active page background
|
|
624
|
-
colorPrimaryHover: 'var(--link-hover)', // Active page hover
|
|
625
|
-
itemBg: 'var(--bg-secondary)', // NEW: Page item background
|
|
626
|
-
itemActiveBg: 'var(--link)', // NEW: Active page background
|
|
627
|
-
itemActiveBgDisabled: 'var(--bg-tertiary)', // NEW: Disabled active page
|
|
628
|
-
itemInputBg: 'var(--bg-secondary)', // NEW: Quick jumper input background
|
|
629
|
-
itemLinkBg: 'var(--bg-secondary)', // NEW: Page link background
|
|
630
|
-
|
|
631
|
-
// Hover states (IMPORTANT for visual feedback)
|
|
632
|
-
colorBgTextHover: 'var(--bg-hover)', // NEW: Page item hover background
|
|
633
|
-
},
|
|
634
|
-
Steps: {
|
|
635
|
-
colorText: 'var(--text-primary)',
|
|
636
|
-
colorTextDescription: 'var(--text-secondary)',
|
|
637
|
-
colorPrimary: 'var(--link)',
|
|
638
|
-
colorBorder: 'var(--border-primary)',
|
|
639
|
-
},
|
|
640
|
-
Breadcrumb: {
|
|
641
|
-
colorText: 'var(--text-secondary)',
|
|
642
|
-
colorTextDescription: 'var(--text-tertiary)',
|
|
643
|
-
linkColor: 'var(--link)',
|
|
644
|
-
linkHoverColor: 'var(--link-hover)',
|
|
645
|
-
separatorColor: 'var(--text-tertiary)',
|
|
646
|
-
},
|
|
647
|
-
Progress: {
|
|
648
|
-
colorText: 'var(--text-primary)',
|
|
649
|
-
colorSuccess: 'var(--success)',
|
|
650
|
-
colorError: 'var(--error)',
|
|
651
|
-
remainingColor: 'var(--bg-tertiary)',
|
|
652
|
-
},
|
|
653
|
-
Skeleton: {
|
|
654
|
-
colorFill: 'var(--bg-tertiary)',
|
|
655
|
-
colorFillContent: 'var(--bg-hover)',
|
|
656
|
-
},
|
|
657
|
-
Spin: {
|
|
658
|
-
colorPrimary: 'var(--link)',
|
|
659
|
-
colorBgContainer: 'var(--bg-secondary)',
|
|
660
|
-
},
|
|
661
|
-
Divider: {
|
|
662
|
-
colorSplit: 'var(--border-primary)',
|
|
663
|
-
colorText: 'var(--text-secondary)',
|
|
664
|
-
},
|
|
665
|
-
Layout: {
|
|
666
|
-
headerBg: 'var(--bg-secondary)',
|
|
667
|
-
bodyBg: 'var(--bg-primary)',
|
|
668
|
-
triggerBg: 'var(--bg-tertiary)',
|
|
669
|
-
colorText: 'var(--text-primary)',
|
|
670
|
-
},
|
|
671
|
-
Collapse: {
|
|
672
|
-
colorText: 'var(--text-primary)',
|
|
673
|
-
colorTextHeading: 'var(--text-primary)',
|
|
674
|
-
colorBorder: 'var(--border-primary)',
|
|
675
|
-
colorBgContainer: 'var(--bg-secondary)',
|
|
676
|
-
headerBg: 'var(--bg-tertiary)',
|
|
677
|
-
},
|
|
678
|
-
Carousel: {
|
|
679
|
-
colorBgContainer: 'var(--bg-secondary)',
|
|
680
|
-
dotActiveWidth: 24,
|
|
681
|
-
},
|
|
682
|
-
Anchor: {
|
|
683
|
-
colorPrimary: 'var(--link)',
|
|
684
|
-
colorText: 'var(--text-secondary)',
|
|
685
|
-
linkPaddingBlock: 4,
|
|
686
|
-
},
|
|
687
|
-
Timeline: {
|
|
688
|
-
colorText: 'var(--text-primary)',
|
|
689
|
-
colorTextDescription: 'var(--text-secondary)',
|
|
690
|
-
tailColor: 'var(--border-primary)',
|
|
691
|
-
dotBg: 'var(--bg-secondary)',
|
|
692
|
-
},
|
|
693
|
-
Transfer: {
|
|
694
|
-
colorText: 'var(--text-primary)',
|
|
695
|
-
colorBgContainer: 'var(--bg-secondary)',
|
|
696
|
-
colorBorder: 'var(--border-primary)',
|
|
697
|
-
controlItemBgActive: 'var(--bg-hover)',
|
|
698
|
-
},
|
|
699
|
-
Tree: {
|
|
700
|
-
colorText: 'var(--text-primary)',
|
|
701
|
-
colorBgContainer: 'var(--bg-secondary)',
|
|
702
|
-
colorPrimary: 'var(--link)',
|
|
703
|
-
nodeHoverBg: 'var(--bg-hover)',
|
|
704
|
-
nodeSelectedBg: 'var(--accent-subtle)',
|
|
705
|
-
},
|
|
706
|
-
TreeSelect: {
|
|
707
|
-
colorText: 'var(--text-primary)',
|
|
708
|
-
colorBgContainer: 'var(--bg-secondary)',
|
|
709
|
-
colorBorder: 'var(--border-primary)',
|
|
710
|
-
colorBgElevated: 'var(--bg-secondary)',
|
|
711
|
-
nodeHoverBg: 'var(--bg-hover)',
|
|
712
|
-
nodeSelectedBg: 'var(--accent-subtle)',
|
|
713
|
-
},
|
|
714
|
-
Cascader: {
|
|
715
|
-
colorText: 'var(--text-primary)',
|
|
716
|
-
colorBgContainer: 'var(--bg-secondary)',
|
|
717
|
-
colorBorder: 'var(--border-primary)',
|
|
718
|
-
colorBgElevated: 'var(--bg-secondary)',
|
|
719
|
-
optionSelectedBg: 'var(--bg-hover)',
|
|
720
|
-
},
|
|
721
|
-
Segmented: {
|
|
722
|
-
colorText: 'var(--text-primary)',
|
|
723
|
-
colorTextLabel: 'var(--text-secondary)',
|
|
724
|
-
colorBgLayout: 'var(--bg-tertiary)',
|
|
725
|
-
itemSelectedBg: 'var(--bg-secondary)',
|
|
726
|
-
itemSelectedColor: 'var(--link)',
|
|
727
|
-
itemHoverBg: 'var(--bg-hover)',
|
|
728
|
-
},
|
|
729
|
-
Rate: {
|
|
730
|
-
colorText: 'var(--warning)',
|
|
731
|
-
},
|
|
732
|
-
Slider: {
|
|
733
|
-
colorPrimary: 'var(--link)',
|
|
734
|
-
colorPrimaryBorder: 'var(--link)',
|
|
735
|
-
trackBg: 'var(--bg-tertiary)',
|
|
736
|
-
trackHoverBg: 'var(--bg-hover)',
|
|
737
|
-
},
|
|
738
|
-
Upload: {
|
|
739
|
-
colorText: 'var(--text-primary)',
|
|
740
|
-
colorTextDescription: 'var(--text-secondary)',
|
|
741
|
-
colorBorder: 'var(--border-primary)',
|
|
742
|
-
colorFillAlter: 'var(--bg-tertiary)',
|
|
743
|
-
colorPrimary: 'var(--link)',
|
|
744
|
-
},
|
|
745
|
-
Calendar: {
|
|
746
|
-
colorText: 'var(--text-primary)',
|
|
747
|
-
colorTextHeading: 'var(--text-primary)',
|
|
748
|
-
colorBgContainer: 'var(--bg-secondary)',
|
|
749
|
-
colorBorder: 'var(--border-primary)',
|
|
750
|
-
itemActiveBg: 'var(--accent-subtle)',
|
|
751
|
-
},
|
|
752
|
-
Image: {
|
|
753
|
-
colorTextLightSolid: 'var(--text-primary)',
|
|
754
|
-
colorBgMask: 'rgba(0, 0, 0, 0.45)',
|
|
755
|
-
},
|
|
756
|
-
Statistic: {
|
|
757
|
-
colorText: 'var(--text-primary)',
|
|
758
|
-
colorTextDescription: 'var(--text-secondary)',
|
|
759
|
-
},
|
|
760
|
-
Result: {
|
|
761
|
-
colorText: 'var(--text-primary)',
|
|
762
|
-
colorTextHeading: 'var(--text-primary)',
|
|
763
|
-
colorTextDescription: 'var(--text-secondary)',
|
|
764
|
-
},
|
|
765
|
-
Empty: {
|
|
766
|
-
colorText: 'var(--text-secondary)',
|
|
767
|
-
colorTextDescription: 'var(--text-tertiary)',
|
|
768
|
-
},
|
|
769
|
-
Message: {
|
|
770
|
-
// ============ Base colors ============
|
|
771
|
-
colorText: 'var(--text-primary)',
|
|
772
|
-
colorBgElevated: 'var(--bg-secondary)', // Message background
|
|
773
|
-
contentBg: 'var(--bg-secondary)', // NEW: Content background
|
|
774
|
-
contentPadding: '10px 16px', // NEW: Message padding
|
|
775
|
-
|
|
776
|
-
// ============ Status colors ============
|
|
777
|
-
colorSuccess: 'var(--success)',
|
|
778
|
-
colorError: 'var(--error)',
|
|
779
|
-
colorWarning: 'var(--warning)',
|
|
780
|
-
colorInfo: 'var(--info)',
|
|
781
|
-
},
|
|
782
|
-
Notification: {
|
|
783
|
-
// ============ Base colors ============
|
|
784
|
-
colorText: 'var(--text-primary)',
|
|
785
|
-
colorTextHeading: 'var(--text-primary)',
|
|
786
|
-
colorBgElevated: 'var(--bg-secondary)', // Notification background
|
|
787
|
-
colorBorder: 'var(--border-primary)',
|
|
788
|
-
|
|
789
|
-
// ============ Close icon (IMPORTANT for visibility in dark theme!) ============
|
|
790
|
-
colorIcon: 'var(--text-secondary)', // NEW: Close button icon color
|
|
791
|
-
colorIconHover: 'var(--text-primary)', // NEW: Close button hover color
|
|
792
|
-
|
|
793
|
-
// ============ Status colors ============
|
|
794
|
-
colorSuccess: 'var(--success)',
|
|
795
|
-
colorError: 'var(--error)',
|
|
796
|
-
colorWarning: 'var(--warning)',
|
|
797
|
-
colorInfo: 'var(--info)',
|
|
798
|
-
},
|
|
799
|
-
};
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
/**
|
|
803
|
-
* Gets algorithm for Ant Design theme (for dark/light mode)
|
|
804
|
-
*/
|
|
805
|
-
export function getThemeAlgorithm(theme: 'light' | 'dark' | 'auto' = 'light'): MappingAlgorithm {
|
|
806
|
-
const actualTheme = theme === 'auto'
|
|
807
|
-
? (typeof window !== 'undefined' && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light')
|
|
808
|
-
: theme;
|
|
809
|
-
|
|
810
|
-
return actualTheme === 'dark' ? antdTheme.darkAlgorithm : antdTheme.defaultAlgorithm;
|
|
811
|
-
}
|
|
812
|
-
|