Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

refactor: migrate white and black tokens to gray endpoints (#7516)

白熱88445954ddd9
diff --git a/common/debugger/src/components/RangeLoading.tsx b/common/debugger/src/components/RangeLoading.tsx
index e52c52daf0..3237b671d0 100644
--- a/common/debugger/src/components/RangeLoading.tsx
+++ b/common/debugger/src/components/RangeLoading.tsx
@@ -5,7 +5,7 @@ export const RangeLoading = () => {
<div
className={clsx(`
univer-flex univer-size-full univer-origin-top-left univer-items-center univer-justify-center
- univer-bg-white
+ univer-bg-gray-0
dark:!univer-bg-gray-900
`, borderClassName)}
>
diff --git a/common/debugger/src/views/Fab.tsx b/common/debugger/src/views/Fab.tsx
index 10d4f7944b..5aaa225c4e 100644
--- a/common/debugger/src/views/Fab.tsx
+++ b/common/debugger/src/views/Fab.tsx
@@ -97,7 +97,7 @@ export function Fab() {
<button
className={clsx(`
univer-flex univer-size-9 univer-cursor-pointer univer-items-center univer-justify-center
- univer-rounded-full univer-bg-white univer-text-base univer-text-gray-900 univer-shadow
+ univer-rounded-full univer-bg-gray-0 univer-text-base univer-text-gray-900 univer-shadow
univer-outline-none univer-transition-shadow
hover:univer-ring-1 hover:univer-ring-primary-400
dark:!univer-bg-gray-900 dark:!univer-text-gray-200
diff --git a/common/shared/tailwind/tailwind.config.ts b/common/shared/tailwind/tailwind.config.ts
index 34531047fd..4007792203 100644
--- a/common/shared/tailwind/tailwind.config.ts
+++ b/common/shared/tailwind/tailwind.config.ts
@@ -82,8 +82,6 @@ const config: Omit<Config, 'content'> = {
theme: {
extend: {
colors: {
- white: 'var(--univer-white)',
- black: 'var(--univer-black)',
primary: {
50: 'var(--univer-primary-50)',
100: 'var(--univer-primary-100)',
@@ -97,6 +95,7 @@ const config: Omit<Config, 'content'> = {
900: 'var(--univer-primary-900)',
},
gray: {
+ 0: 'var(--univer-gray-0)',
50: 'var(--univer-gray-50)',
100: 'var(--univer-gray-100)',
200: 'var(--univer-gray-200)',
@@ -107,6 +106,7 @@ const config: Omit<Config, 'content'> = {
700: 'var(--univer-gray-700)',
800: 'var(--univer-gray-800)',
900: 'var(--univer-gray-900)',
+ 1000: 'var(--univer-gray-1000)',
},
blue: {
50: 'var(--univer-blue-50)',
diff --git a/common/shared/tsdown/plugins/class-name-whitespace-cleanup.spec.ts b/common/shared/tsdown/plugins/class-name-whitespace-cleanup.spec.ts
index d9cee8fdc0..51641485f4 100644
--- a/common/shared/tsdown/plugins/class-name-whitespace-cleanup.spec.ts
+++ b/common/shared/tsdown/plugins/class-name-whitespace-cleanup.spec.ts
@@ -97,7 +97,7 @@ describe('cleanupClassNameTemplateWhitespace', () => {
variants: {
variant: {
primary: \`
- univer-border-primary-600 univer-bg-primary-600 univer-text-white
+ univer-border-primary-600 univer-bg-primary-600 univer-text-gray-0
hover:univer-bg-primary-500
\`,
},
@@ -118,7 +118,7 @@ describe('cleanupClassNameTemplateWhitespace', () => {
'cva(\n "univer-box-border univer-inline-flex univer-cursor-pointer disabled:univer-pointer-events-none",'
);
expect(cleanedCode).toContain(
- 'primary: "univer-border-primary-600 univer-bg-primary-600 univer-text-white hover:univer-bg-primary-500"'
+ 'primary: "univer-border-primary-600 univer-bg-primary-600 univer-text-gray-0 hover:univer-bg-primary-500"'
);
expect(cleanedCode).toContain(
'className: "univer-gap-1 univer-rounded dark:!univer-bg-gray-700"'
diff --git a/examples/src/main.tsx b/examples/src/main.tsx
index b08c3938df..d74bc040a6 100644
--- a/examples/src/main.tsx
+++ b/examples/src/main.tsx
@@ -47,22 +47,6 @@ const primaryGroups = PRIMARY_CATEGORY_ORDER.map((category) => groupedDemos.find
const defaultCategory = primaryGroups[0]?.category ?? groupedDemos[0]?.category ?? 'sheets';
-// package info
-// eslint-disable-next-line node/prefer-global/process
-if (process.env.NODE_ENV === 'production') {
- // eslint-disable-next-line no-console
- console.table({
- // eslint-disable-next-line node/prefer-global/process
- NODE_ENV: process.env.NODE_ENV,
- // eslint-disable-next-line node/prefer-global/process
- GIT_COMMIT_HASH: process.env.GIT_COMMIT_HASH,
- // eslint-disable-next-line node/prefer-global/process
- GIT_REF_NAME: process.env.GIT_REF_NAME,
- // eslint-disable-next-line node/prefer-global/process
- BUILD_TIME: process.env.BUILD_TIME,
- });
-}
-
function DemoList({ items }: { items: (typeof demos)[number][] }) {
return (
<ul>
@@ -109,7 +93,7 @@ function Examples() {
return (
<main
className="
- univer-h-screen univer-overflow-y-auto univer-bg-white univer-px-6 univer-py-10 univer-text-slate-800
+ univer-h-screen univer-overflow-y-auto univer-bg-gray-0 univer-px-6 univer-py-10 univer-text-slate-800
"
>
<section className="univer-mx-auto univer-max-w-3xl">
@@ -138,9 +122,9 @@ function Examples() {
univer-cursor-pointer univer-rounded-full univer-border-none univer-px-4
univer-py-2 univer-text-sm univer-font-medium
`, isActive
- ? 'univer-bg-slate-900 univer-text-white'
+ ? 'univer-bg-slate-900 univer-text-gray-0'
: `
- univer-bg-white univer-font-medium univer-text-slate-700
+ univer-bg-gray-0 univer-font-medium univer-text-slate-700
hover:univer-bg-slate-50
`)}
type="button"
diff --git a/examples/src/sheets-multi-units/switch-units.tsx b/examples/src/sheets-multi-units/switch-units.tsx
index 0e8241ffd1..72dbb3fab9 100644
--- a/examples/src/sheets-multi-units/switch-units.tsx
+++ b/examples/src/sheets-multi-units/switch-units.tsx
@@ -19,7 +19,7 @@ export const SwitchUnits = () => {
const activeSheetId = activeSheet?.getUnitId();
return (
- <div className="univer-w-full univer-border-b univer-border-gray-200 univer-bg-white univer-shadow-sm">
+ <div className="univer-w-full univer-border-b univer-border-gray-200 univer-bg-gray-0 univer-shadow-sm">
<div className="univer-px-4 univer-py-2">
<div
className={`
diff --git a/examples/src/theme-customizer/components/sidebar-header.tsx b/examples/src/theme-customizer/components/sidebar-header.tsx
index 3542d6047a..d105eb10f7 100644
--- a/examples/src/theme-customizer/components/sidebar-header.tsx
+++ b/examples/src/theme-customizer/components/sidebar-header.tsx
@@ -27,7 +27,7 @@ export function SidebarHeader(props: {
<h2
className="
univer-m-0 univer-text-lg univer-font-semibold univer-text-slate-950
- dark:!univer-text-white
+ dark:!univer-text-gray-0
"
>
Theme Customizer
diff --git a/examples/src/theme-customizer/components/theme-sections.tsx b/examples/src/theme-customizer/components/theme-sections.tsx
index b0cd2ad9f9..24d9627497 100644
--- a/examples/src/theme-customizer/components/theme-sections.tsx
+++ b/examples/src/theme-customizer/components/theme-sections.tsx
@@ -1,6 +1,6 @@
import type { Theme } from '@univerjs/themes';
import type { ReactNode } from 'react';
-import type { LoopColorKey, ThemeScaleKey, ThemeShadeKey } from '../types';
+import type { LoopColorKey, ThemeGrayEndpointKey, ThemeScaleKey, ThemeShadeKey } from '../types';
import { Button, clsx, ColorPicker, Dropdown, FormLayout, Input, Select, Textarea } from '@univerjs/design';
import { useEffect, useState } from 'react';
import { COLOR_SHADE_KEYS, LOOP_COLOR_KEYS, LOOP_COLOR_OPTIONS } from '../constants';
@@ -105,7 +105,7 @@ export function ThemeScaleSection(props: {
return (
<section
className={clsx(`
- univer-rounded-2xl univer-bg-white
+ univer-rounded-2xl univer-bg-gray-0
dark:!univer-bg-gray-800
`)}
>
@@ -121,7 +121,7 @@ export function ThemeScaleSection(props: {
<div
className="
univer-text-sm univer-font-semibold univer-text-slate-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
"
>
{title}
@@ -178,26 +178,26 @@ export function ThemeScaleSection(props: {
);
}
-export function ThemeRootColorsSection(props: {
+export function ThemeGrayEndpointsSection(props: {
theme: Theme;
- onChange: (key: 'white' | 'black', value: string) => void;
+ onChange: (key: ThemeGrayEndpointKey, value: string) => void;
}) {
const { theme, onChange } = props;
return (
<section
className={clsx(`
- univer-rounded-2xl univer-bg-white univer-p-4
+ univer-rounded-2xl univer-bg-gray-0 univer-p-4
dark:!univer-bg-gray-800
`)}
>
<div
className="
univer-mb-3 univer-text-sm univer-font-semibold univer-text-slate-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
"
>
- Base Tokens
+ Gray Endpoints
</div>
<div
className="
@@ -205,8 +205,8 @@ export function ThemeRootColorsSection(props: {
sm:univer-grid-cols-2
"
>
- <ThemeColorField label="white" value={theme.white} onChange={(value) => onChange('white', value)} />
- <ThemeColorField label="black" value={theme.black} onChange={(value) => onChange('black', value)} />
+ <ThemeColorField label="gray.0" value={theme.gray[0]} onChange={(value) => onChange('0', value)} />
+ <ThemeColorField label="gray.1000" value={theme.gray[1000]} onChange={(value) => onChange('1000', value)} />
</div>
</section>
);
@@ -221,14 +221,14 @@ export function ThemeLoopColorSection(props: {
return (
<section
className={clsx(`
- univer-rounded-2xl univer-bg-white univer-p-4
+ univer-rounded-2xl univer-bg-gray-0 univer-p-4
dark:!univer-bg-gray-800
`)}
>
<div
className="
univer-mb-3 univer-text-sm univer-font-semibold univer-text-slate-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
"
>
loop-color
@@ -270,7 +270,7 @@ export function IntegrationExampleSection(props: {
<div
className="
univer-text-sm univer-font-semibold univer-text-slate-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
"
>
Integration Example
@@ -317,7 +317,7 @@ export function JsonEditorPanel(props: {
<div
className="
univer-text-sm univer-font-semibold univer-text-slate-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
"
>
Theme JSON
diff --git a/examples/src/theme-customizer/components/token-editor-panel.tsx b/examples/src/theme-customizer/components/token-editor-panel.tsx
index 17616d5784..251dba2afd 100644
--- a/examples/src/theme-customizer/components/token-editor-panel.tsx
+++ b/examples/src/theme-customizer/components/token-editor-panel.tsx
@@ -1,6 +1,6 @@
import type { Theme } from '@univerjs/themes';
-import type { LoopColorKey, ThemeScaleKey, ThemeShadeKey } from '../types';
-import { IntegrationExampleSection, ThemeLoopColorSection, ThemeRootColorsSection, ThemeScaleSection } from './theme-sections';
+import type { LoopColorKey, ThemeGrayEndpointKey, ThemeScaleKey, ThemeShadeKey } from '../types';
+import { IntegrationExampleSection, ThemeGrayEndpointsSection, ThemeLoopColorSection, ThemeScaleSection } from './theme-sections';
export function TokenEditorPanel(props: {
copyLabel: string;
@@ -8,14 +8,14 @@ export function TokenEditorPanel(props: {
visibleScaleKeys: ThemeScaleKey[];
onCopy: () => void;
onLoopColorChange: (key: LoopColorKey, value: string) => void;
- onRootColorChange: (key: 'white' | 'black', value: string) => void;
+ onGrayEndpointChange: (key: ThemeGrayEndpointKey, value: string) => void;
onScaleColorChange: (scale: ThemeScaleKey, shade: ThemeShadeKey, value: string) => void;
}) {
- const { copyLabel, theme, visibleScaleKeys, onCopy, onLoopColorChange, onRootColorChange, onScaleColorChange } = props;
+ const { copyLabel, theme, visibleScaleKeys, onCopy, onGrayEndpointChange, onLoopColorChange, onScaleColorChange } = props;
return (
<div className="univer-flex univer-flex-col univer-gap-4">
- <ThemeRootColorsSection theme={theme} onChange={onRootColorChange} />
+ <ThemeGrayEndpointsSection theme={theme} onChange={onGrayEndpointChange} />
{visibleScaleKeys.map((scale, index) => (
<ThemeScaleSection
diff --git a/examples/src/theme-customizer/components/toolbar-controls.tsx b/examples/src/theme-customizer/components/toolbar-controls.tsx
index 6dbb8e2c36..706d55557d 100644
--- a/examples/src/theme-customizer/components/toolbar-controls.tsx
+++ b/examples/src/theme-customizer/components/toolbar-controls.tsx
@@ -45,7 +45,7 @@ export function ToolbarToggleGroup(props: {
univer-text-slate-600
hover:univer-bg-slate-100 hover:univer-text-slate-900
dark:!univer-text-gray-300
- dark:hover:!univer-bg-gray-800 dark:hover:!univer-text-white
+ dark:hover:!univer-bg-gray-800 dark:hover:!univer-text-gray-0
`)}
style={active
? {
diff --git a/examples/src/theme-customizer/components/univer-preview.tsx b/examples/src/theme-customizer/components/univer-preview.tsx
index af9d1ba30c..f8b9c0d1f4 100644
--- a/examples/src/theme-customizer/components/univer-preview.tsx
+++ b/examples/src/theme-customizer/components/univer-preview.tsx
@@ -105,7 +105,7 @@ export function UniverPreview(props: { theme: Theme; darkMode: boolean }) {
id={PREVIEW_CONTAINER_ID}
className={clsx(`
univer-h-full univer-min-h-[520px] univer-w-full univer-overflow-hidden univer-rounded-[20px]
- univer-bg-white
+ univer-bg-gray-0
`)}
/>
);
diff --git a/examples/src/theme-customizer/constants.ts b/examples/src/theme-customizer/constants.ts
index a9f0385a67..73cab9be6a 100644
--- a/examples/src/theme-customizer/constants.ts
+++ b/examples/src/theme-customizer/constants.ts
@@ -1,10 +1,11 @@
-import type { IThemePreset, ThemeScaleKey, ThemeShadeKey, TokenDensity } from './types';
+import type { IThemePreset, ThemeGrayEndpointKey, ThemeScaleKey, ThemeShadeKey, TokenDensity } from './types';
import { defaultTheme, greenTheme, orangeTheme, purpleTheme, redTheme, yellowTheme } from '@univerjs/themes';
export const PREVIEW_CONTAINER_ID = 'theme-customizer-preview';
export const COLOR_SHADE_KEYS: ThemeShadeKey[] = ['50', '100', '200', '300', '400', '500', '600', '700', '800', '900'];
+export const GRAY_ENDPOINT_KEYS: ThemeGrayEndpointKey[] = ['0', '1000'];
export const COLOR_SCALE_KEYS: ThemeScaleKey[] = ['primary', 'gray', 'blue', 'red', 'orange', 'yellow', 'green', 'jiqing', 'indigo', 'purple', 'pink'];
export const CORE_SCALE_KEYS: ThemeScaleKey[] = ['primary', 'gray', 'blue', 'green', 'red'];
export const LOOP_COLOR_KEYS = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;
diff --git a/examples/src/theme-customizer/hooks/use-theme-customizer-state.ts b/examples/src/theme-customizer/hooks/use-theme-customizer-state.ts
index 7ba18ce74f..49f0a12f36 100644
--- a/examples/src/theme-customizer/hooks/use-theme-customizer-state.ts
+++ b/examples/src/theme-customizer/hooks/use-theme-customizer-state.ts
@@ -1,11 +1,10 @@
import type { Theme } from '@univerjs/themes';
-import type { EditorMode, LoopColorKey, ThemeScaleKey, ThemeShadeKey, TokenDensity } from '../types';
+import type { EditorMode, LoopColorKey, ThemeGrayEndpointKey, ThemeScaleKey, ThemeShadeKey, TokenDensity } from '../types';
import { defaultTheme } from '@univerjs/themes';
import { useEffect, useMemo, useState } from 'react';
import { COLOR_SCALE_KEYS, CORE_SCALE_KEYS, THEME_PRESETS } from '../constants';
-import { cloneTheme, formatTheme, mergeThemePatch, updateLoopColor, updateScaleColor, updateThemeRootColor } from '../theme-utils';
+import { cloneTheme, formatTheme, mergeThemePatch, updateLoopColor, updateScaleColor, updateThemeGrayEndpoint } from '../theme-utils';
-// eslint-disable-next-line max-lines-per-function
export function useThemeCustomizerState() {
const [theme, setTheme] = useState<Theme>(() => cloneTheme(defaultTheme));
const [editorMode, setEditorMode] = useState<EditorMode>('tokens');
@@ -39,8 +38,8 @@ export function useThemeCustomizerState() {
applyTheme(updateScaleColor(theme, scale, shade, value));
}
- function handleRootColorChange(key: 'white' | 'black', value: string) {
- applyTheme(updateThemeRootColor(theme, key, value));
+ function handleGrayEndpointChange(key: ThemeGrayEndpointKey, value: string) {
+ applyTheme(updateThemeGrayEndpoint(theme, key, value));
}
function handleLoopColorChange(key: LoopColorKey, value: string) {
@@ -106,7 +105,7 @@ export function useThemeCustomizerState() {
handleJsonChange,
handleLoopColorChange,
handlePresetApply,
- handleRootColorChange,
+ handleGrayEndpointChange,
handleScaleColorChange,
};
}
diff --git a/examples/src/theme-customizer/theme-customizer-app.tsx b/examples/src/theme-customizer/theme-customizer-app.tsx
index 10109663eb..cc03b48325 100644
--- a/examples/src/theme-customizer/theme-customizer-app.tsx
+++ b/examples/src/theme-customizer/theme-customizer-app.tsx
@@ -25,7 +25,7 @@ export function ThemeCustomizerApp() {
handleJsonChange,
handleLoopColorChange,
handlePresetApply,
- handleRootColorChange,
+ handleGrayEndpointChange,
handleScaleColorChange,
} = useThemeCustomizerState();
@@ -48,7 +48,7 @@ export function ThemeCustomizerApp() {
<aside
className={clsx(`
univer-flex univer-h-full univer-min-h-0 univer-flex-col univer-overflow-hidden
- univer-rounded-[28px] univer-bg-white univer-shadow-[0_16px_48px_rgba(15,23,42,0.08)]
+ univer-rounded-[28px] univer-bg-gray-0 univer-shadow-[0_16px_48px_rgba(15,23,42,0.08)]
dark:!univer-bg-gray-900
`)}
>
@@ -71,7 +71,7 @@ export function ThemeCustomizerApp() {
visibleScaleKeys={visibleScaleKeys}
onCopy={handleCopyTheme}
onLoopColorChange={handleLoopColorChange}
- onRootColorChange={handleRootColorChange}
+ onGrayEndpointChange={handleGrayEndpointChange}
onScaleColorChange={handleScaleColorChange}
/>
)
@@ -95,20 +95,20 @@ export function ThemeCustomizerApp() {
<section
className={clsx(`
univer-flex univer-h-full univer-min-h-0 univer-flex-col univer-overflow-hidden
- univer-rounded-[28px] univer-bg-white univer-shadow-[0_18px_56px_rgba(15,23,42,0.16)]
+ univer-rounded-[28px] univer-bg-gray-0 univer-shadow-[0_18px_56px_rgba(15,23,42,0.16)]
dark:!univer-bg-gray-900
`)}
>
<div
className="
- univer-bg-white univer-p-4
+ univer-bg-gray-0 univer-p-4
dark:!univer-bg-gray-900
"
>
<h2
className="
univer-m-0 univer-text-base univer-font-semibold univer-text-slate-950
- dark:!univer-text-white
+ dark:!univer-text-gray-0
"
>
Live Preview
diff --git a/examples/src/theme-customizer/theme-utils.ts b/examples/src/theme-customizer/theme-utils.ts
index 8545588c54..810a43d3b2 100644
--- a/examples/src/theme-customizer/theme-utils.ts
+++ b/examples/src/theme-customizer/theme-utils.ts
@@ -1,6 +1,6 @@
import type { Theme } from '@univerjs/themes';
-import type { LoopColorKey, ThemeScaleKey, ThemeShadeKey } from './types';
-import { COLOR_SCALE_KEYS, COLOR_SHADE_KEYS, LOOP_COLOR_KEYS } from './constants';
+import type { LoopColorKey, ThemeGrayEndpointKey, ThemeScaleKey, ThemeShadeKey } from './types';
+import { COLOR_SCALE_KEYS, COLOR_SHADE_KEYS, GRAY_ENDPOINT_KEYS, LOOP_COLOR_KEYS } from './constants';
export function cloneTheme(theme: Theme): Theme {
return JSON.parse(JSON.stringify(theme)) as Theme;
@@ -39,14 +39,6 @@ export function mergeThemePatch(baseTheme: Theme, patch: unknown): Theme | null
const nextTheme = cloneTheme(baseTheme);
const record = patch as Record<string, unknown>;
- if (typeof record.white === 'string') {
- nextTheme.white = record.white;
- }
-
- if (typeof record.black === 'string') {
- nextTheme.black = record.black;
- }
-
for (const scale of COLOR_SCALE_KEYS) {
const scalePatch = record[scale];
@@ -57,13 +49,14 @@ export function mergeThemePatch(baseTheme: Theme, patch: unknown): Theme | null
const scaleRecord = scalePatch as Record<string, unknown>;
const mergedScale = { ...nextTheme[scale] } as Record<string, string>;
- for (const shade of COLOR_SHADE_KEYS) {
+ const shadeKeys = scale === 'gray' ? [...GRAY_ENDPOINT_KEYS, ...COLOR_SHADE_KEYS] : COLOR_SHADE_KEYS;
+ for (const shade of shadeKeys) {
if (typeof scaleRecord[shade] === 'string') {
mergedScale[shade] = scaleRecord[shade] as string;
}
}
- nextTheme[scale] = mergedScale as Theme[ThemeScaleKey];
+ Object.assign(nextTheme[scale], mergedScale);
}
const loopColorPatch = record['loop-color'];
@@ -94,11 +87,14 @@ export function updateScaleColor(theme: Theme, scale: ThemeScaleKey, shade: Them
} as Theme;
}
-export function updateThemeRootColor(theme: Theme, key: 'white' | 'black', value: string): Theme {
+export function updateThemeGrayEndpoint(theme: Theme, key: ThemeGrayEndpointKey, value: string): Theme {
return {
...theme,
- [key]: value,
- };
+ gray: {
+ ...theme.gray,
+ [key]: value,
+ },
+ } as Theme;
}
export function updateLoopColor(theme: Theme, key: LoopColorKey, value: string): Theme {
diff --git a/examples/src/theme-customizer/types.ts b/examples/src/theme-customizer/types.ts
index dd4e9f1b47..3ec8ef08ba 100644
--- a/examples/src/theme-customizer/types.ts
+++ b/examples/src/theme-customizer/types.ts
@@ -1,6 +1,7 @@
import type { Theme } from '@univerjs/themes';
export type ThemeShadeKey = '50' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
+export type ThemeGrayEndpointKey = '0' | '1000';
export type ThemeScaleKey = 'primary' | 'gray' | 'blue' | 'red' | 'orange' | 'yellow' | 'green' | 'jiqing' | 'indigo' | 'purple' | 'pink';
export type LoopColorKey = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12';
export type EditorMode = 'tokens' | 'json';
diff --git a/packages/action-recorder/src/views/components/RecorderPanel.tsx b/packages/action-recorder/src/views/components/RecorderPanel.tsx
index cb8bd9c51a..1d5e20576b 100644
--- a/packages/action-recorder/src/views/components/RecorderPanel.tsx
+++ b/packages/action-recorder/src/views/components/RecorderPanel.tsx
@@ -65,7 +65,8 @@ function RecordPanelImpl() {
<div
className={`
univer-fixed univer-bottom-20 univer-left-1/2 univer-z-[1000] univer-flex univer-h-16 univer-w-[512px]
- -univer-translate-x-1/2 univer-items-center univer-rounded-lg univer-bg-white univer-px-5 univer-shadow-lg
+ -univer-translate-x-1/2 univer-items-center univer-rounded-lg univer-bg-gray-0 univer-px-5
+ univer-shadow-lg
`}
>
<div className="univer-mr-2 univer-size-5 univer-shrink-0 univer-grow-0 univer-text-xl">
diff --git a/packages/core/src/services/theme/__tests__/theme.service.spec.ts b/packages/core/src/services/theme/__tests__/theme.service.spec.ts
index b220b03e06..dd5f420f2e 100644
--- a/packages/core/src/services/theme/__tests__/theme.service.spec.ts
+++ b/packages/core/src/services/theme/__tests__/theme.service.spec.ts
@@ -57,7 +57,11 @@ describe('ThemeService', () => {
it('should validate theme color', () => {
const themeService = univer.__getInjector().get(ThemeService);
+ expect(themeService.isValidThemeColor('gray.0')).toBe(true);
+ expect(themeService.isValidThemeColor('gray.1000')).toBe(true);
expect(themeService.isValidThemeColor('primary.600')).toBe(true);
+ expect(themeService.isValidThemeColor('white')).toBe(false);
+ expect(themeService.isValidThemeColor('black')).toBe(false);
expect(themeService.isValidThemeColor('notexist')).toBe(false);
});
diff --git a/packages/design/src/components/accordion/Accordion.tsx b/packages/design/src/components/accordion/Accordion.tsx
index d4c0e9945d..94c349db62 100644
--- a/packages/design/src/components/accordion/Accordion.tsx
+++ b/packages/design/src/components/accordion/Accordion.tsx
@@ -64,7 +64,7 @@ export function Accordion(props: IAccordionProps) {
hover:univer-text-gray-900
focus:univer-outline-none
dark:!univer-text-gray-200
- dark:hover:!univer-text-white
+ dark:hover:!univer-text-gray-0
`}
type="button"
onClick={() => toggleItem(index)}
diff --git a/packages/design/src/components/avatar/Avatar.tsx b/packages/design/src/components/avatar/Avatar.tsx
index f9ab718f9c..e2cc68b5f4 100644
--- a/packages/design/src/components/avatar/Avatar.tsx
+++ b/packages/design/src/components/avatar/Avatar.tsx
@@ -24,7 +24,7 @@ type ImageFit = 'fill' | 'contain' | 'cover' | 'none' | 'scale-down';
const avatarVariants = cva(
`
univer-relative univer-inline-block univer-overflow-hidden univer-whitespace-nowrap univer-bg-gray-200
- univer-text-center univer-align-middle univer-text-white
+ univer-text-center univer-align-middle univer-text-gray-0
`,
{
variants: {
diff --git a/packages/design/src/components/button/Button.tsx b/packages/design/src/components/button/Button.tsx
index cf10bc9d62..acdb09c3a8 100644
--- a/packages/design/src/components/button/Button.tsx
+++ b/packages/design/src/components/button/Button.tsx
@@ -33,20 +33,20 @@ export const buttonVariants = cva(
variants: {
variant: {
default: `
- univer-border-gray-200 univer-bg-white univer-text-gray-700
+ univer-border-gray-200 univer-bg-gray-0 univer-text-gray-700
hover:univer-bg-gray-100
active:univer-bg-gray-200
- dark:!univer-border-gray-600 dark:!univer-bg-gray-700 dark:!univer-text-white
+ dark:!univer-border-gray-600 dark:!univer-bg-gray-700 dark:!univer-text-gray-0
dark:hover:!univer-bg-gray-600
dark:active:!univer-bg-gray-700
`,
primary: `
- univer-border-primary-600 univer-bg-primary-600 univer-text-white
+ univer-border-primary-600 univer-bg-primary-600 univer-text-gray-0
hover:univer-bg-primary-500
active:univer-bg-primary-700
`,
danger: `
- univer-border-red-500 univer-bg-red-500 univer-text-white
+ univer-border-red-500 univer-bg-red-500 univer-text-gray-0
hover:univer-border-red-400 hover:univer-bg-red-400
active:univer-border-red-600 active:univer-bg-red-600
`,
@@ -54,7 +54,7 @@ export const buttonVariants = cva(
univer-border-transparent univer-bg-transparent univer-text-gray-900
hover:univer-bg-gray-100
active:univer-bg-gray-200
- dark:!univer-text-white
+ dark:!univer-text-gray-0
dark:hover:!univer-bg-gray-700
dark:active:!univer-bg-gray-600
`,
@@ -68,7 +68,7 @@ export const buttonVariants = cva(
univer-border-transparent univer-bg-transparent univer-text-gray-900
hover:univer-bg-gray-100
active:univer-bg-gray-200
- dark:!univer-text-white
+ dark:!univer-text-gray-0
dark:hover:!univer-bg-gray-700
dark:active:!univer-bg-gray-600
`,
diff --git a/packages/design/src/components/calendar/Calendar.tsx b/packages/design/src/components/calendar/Calendar.tsx
index 9031ce75b4..20b125ee1f 100644
--- a/packages/design/src/components/calendar/Calendar.tsx
+++ b/packages/design/src/components/calendar/Calendar.tsx
@@ -195,8 +195,8 @@ export function Calendar(props: ICalendarProps) {
data-u-comp="calendar"
dir={direction}
className={clsx(`
- univer-mx-auto univer-max-w-xs univer-select-none univer-rounded univer-bg-white univer-text-gray-900
- dark:!univer-bg-gray-900 dark:!univer-text-white
+ univer-mx-auto univer-max-w-xs univer-select-none univer-rounded univer-bg-gray-0 univer-text-gray-900
+ dark:!univer-bg-gray-900 dark:!univer-text-gray-0
`, className)}
>
<nav
@@ -238,7 +238,7 @@ export function Calendar(props: ICalendarProps) {
univer-rounded univer-border-none univer-bg-transparent univer-px-2
univer-text-sm univer-text-gray-900 univer-transition-colors
hover:univer-bg-gray-100
- dark:!univer-text-white
+ dark:!univer-text-gray-0
dark:hover:!univer-bg-gray-600
`, {
'univer-bg-gray-200 dark:!univer-bg-gray-500': item.year === currentYear,
@@ -307,9 +307,9 @@ export function Calendar(props: ICalendarProps) {
<DayButton
key={idx}
className={clsx({
- '!univer-bg-primary-600 univer-font-bold univer-text-white': !isToday(day) && isSelected(day),
- 'dark:!univer-text-white': !isToday(day) && !isSelected(day),
- '!univer-bg-primary-600 univer-text-white': isToday(day) && isSelected(day),
+ '!univer-bg-primary-600 univer-font-bold univer-text-gray-0': !isToday(day) && isSelected(day),
+ 'dark:!univer-text-gray-0': !isToday(day) && !isSelected(day),
+ '!univer-bg-primary-600 univer-text-gray-0': isToday(day) && isSelected(day),
'univer-font-semibold univer-text-primary-600 dark:!univer-text-primary-500': isToday(day) && !isSelected(day),
'univer-cursor-not-allowed univer-opacity-40': isDisabled(day),
'univer-hover:bg-primary-100 univer-cursor-pointer univer-text-gray-800': !isSelected(day) && !isDisabled(day),
diff --git a/packages/design/src/components/cascader-list/CascaderList.tsx b/packages/design/src/components/cascader-list/CascaderList.tsx
index 0a7db549eb..d00f83f6e3 100644
--- a/packages/design/src/components/cascader-list/CascaderList.tsx
+++ b/packages/design/src/components/cascader-list/CascaderList.tsx
@@ -111,7 +111,7 @@ export function CascaderList(props: ICascaderListProps) {
className={clsx(`
univer-overflow-auto-y univer-grid univer-h-full univer-max-h-80 univer-grid-flow-col univer-rounded
univer-py-2 univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
[&>ul:not(:last-child)]:univer-border-0 [&>ul:not(:last-child)]:univer-border-r
[&>ul:not(:last-child)]:univer-border-solid [&>ul:not(:last-child)]:univer-border-r-gray-200
`, borderClassName, scrollbarClassName, wrapperClassName)}
diff --git a/packages/design/src/components/checkbox/Checkbox.tsx b/packages/design/src/components/checkbox/Checkbox.tsx
index a33a56f86e..6da9ce3da1 100644
--- a/packages/design/src/components/checkbox/Checkbox.tsx
+++ b/packages/design/src/components/checkbox/Checkbox.tsx
@@ -89,7 +89,7 @@ export function Checkbox(props: ICheckboxProps) {
<label
data-u-comp="checkbox"
className={clsx('univer-box-border univer-inline-flex univer-items-center univer-gap-2 univer-text-sm', {
- 'univer-cursor-pointer univer-text-gray-900 dark:!univer-text-white': !disabled,
+ 'univer-cursor-pointer univer-text-gray-900 dark:!univer-text-gray-0': !disabled,
'univer-text-gray-400': disabled,
}, className)}
style={style}
@@ -118,7 +118,7 @@ export function Checkbox(props: ICheckboxProps) {
<CheckMarkIcon
className={`
univer-absolute univer-left-1/2 univer-top-1/2 univer-block univer-size-3
- -univer-translate-x-1/2 -univer-translate-y-1/2 univer-text-white
+ -univer-translate-x-1/2 -univer-translate-y-1/2 univer-text-gray-0
`}
/>
)}
@@ -126,7 +126,7 @@ export function Checkbox(props: ICheckboxProps) {
<span
className={`
univer-absolute univer-left-1/2 univer-top-1/2 univer-block univer-h-0.5 univer-w-2.5
- -univer-translate-x-1/2 -univer-translate-y-1/2 univer-rounded univer-bg-white
+ -univer-translate-x-1/2 -univer-translate-y-1/2 univer-rounded univer-bg-gray-0
`}
/>
)}
diff --git a/packages/design/src/components/color-picker/AlphaSlider.tsx b/packages/design/src/components/color-picker/AlphaSlider.tsx
index c928e2c32b..6b462f3691 100644
--- a/packages/design/src/components/color-picker/AlphaSlider.tsx
+++ b/packages/design/src/components/color-picker/AlphaSlider.tsx
@@ -118,8 +118,8 @@ export function AlphaSlider({ hsv, alpha, onChange, onChanged }: IAlphaSliderPro
data-u-comp="color-picker-alpha-slider-thumb"
className={`
univer-absolute univer-top-1/2 univer-box-border univer-size-2 univer-rounded-full
- univer-bg-transparent univer-shadow-md univer-ring-2 univer-ring-white univer-transition-transform
- univer-duration-75 univer-will-change-transform
+ univer-bg-transparent univer-shadow-md univer-ring-2 univer-ring-gray-0
+ univer-transition-transform univer-duration-75 univer-will-change-transform
`}
style={{
left: getThumbPosition(),
diff --git a/packages/design/src/components/color-picker/ColorInput.tsx b/packages/design/src/components/color-picker/ColorInput.tsx
index 798e142b20..65e48e46ae 100644
--- a/packages/design/src/components/color-picker/ColorInput.tsx
+++ b/packages/design/src/components/color-picker/ColorInput.tsx
@@ -76,7 +76,7 @@ function HexInput({ hsv, onChange }: IInputProps) {
univer-w-full univer-px-2 !univer-pl-4 univer-uppercase
focus:univer-border-primary-500 focus:univer-outline-none
rtl:!univer-pl-2 rtl:!univer-pr-4
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`, borderClassName)}
value={inputValue}
onChange={handleChange}
@@ -154,7 +154,7 @@ function RgbInput({ hsv, alpha, format, onChange }: IInputProps) {
univer-flex univer-items-center univer-gap-2
[&>input]:univer-w-11 [&>input]:univer-border-gray-200
[&>input]:focus:univer-border-primary-500
- dark:[&>input]:!univer-border-gray-600 dark:[&>input]:!univer-text-white
+ dark:[&>input]:!univer-border-gray-600 dark:[&>input]:!univer-text-gray-0
`}
>
<input
@@ -191,7 +191,7 @@ export function ColorInput({ hsv, alpha, format, onChange }: IColorInputProps) {
return (
<div
className={`
- dark:![&_input]:univer-border-gray-600 dark:![&_input]:univer-text-white
+ dark:![&_input]:univer-border-gray-600 dark:![&_input]:univer-text-gray-0
univer-flex univer-gap-2
[&_input]:univer-box-border [&_input]:univer-flex [&_input]:univer-h-7 [&_input]:univer-items-center
[&_input]:univer-rounded [&_input]:univer-border [&_input]:univer-border-solid
diff --git a/packages/design/src/components/color-picker/ColorPicker.tsx b/packages/design/src/components/color-picker/ColorPicker.tsx
index 0c863b829b..1666eda49a 100644
--- a/packages/design/src/components/color-picker/ColorPicker.tsx
+++ b/packages/design/src/components/color-picker/ColorPicker.tsx
@@ -121,7 +121,7 @@ export function ColorPicker({ format = 'hex', value, onChange }: IColorPickerPro
className={`
univer-cursor-pointer univer-gap-2 univer-text-sm univer-text-gray-900 univer-transition-opacity
hover:univer-opacity-80
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
onClick={() => setVisible(true)}
>
diff --git a/packages/design/src/components/color-picker/ColorPresets.tsx b/packages/design/src/components/color-picker/ColorPresets.tsx
index c6e1b1caa6..b41184b127 100644
--- a/packages/design/src/components/color-picker/ColorPresets.tsx
+++ b/packages/design/src/components/color-picker/ColorPresets.tsx
@@ -50,7 +50,7 @@ export function ColorPresets({ hsv, onChange }: IColorPresetsProps) {
univer-box-border univer-size-5 univer-cursor-pointer univer-rounded-full univer-border
univer-border-solid univer-border-transparent univer-bg-gray-300 univer-transition-shadow
`, {
- 'univer-ring-2 univer-ring-offset-2 univer-ring-offset-white dark:!univer-ring-primary-600 dark:!univer-ring-offset-gray-600': color.toUpperCase() === currentColor.toUpperCase(),
+ 'univer-ring-2 univer-ring-offset-2 univer-ring-offset-gray-0 dark:!univer-ring-primary-600 dark:!univer-ring-offset-gray-600': color.toUpperCase() === currentColor.toUpperCase(),
'!univer-border-gray-200': i === 0 && j === 0,
})}
style={{ backgroundColor: color }}
diff --git a/packages/design/src/components/color-picker/ColorSpectrum.tsx b/packages/design/src/components/color-picker/ColorSpectrum.tsx
index 26db168fc5..7f54716a91 100644
--- a/packages/design/src/components/color-picker/ColorSpectrum.tsx
+++ b/packages/design/src/components/color-picker/ColorSpectrum.tsx
@@ -136,8 +136,8 @@ export function ColorSpectrum({ hsv, onChange, onChanged }: IColorSpectrumProps)
<div
className={`
univer-pointer-events-none univer-absolute univer-left-0 univer-top-0 univer-size-4
- univer-rounded-full univer-border-2 univer-border-white univer-shadow-md univer-ring-2
- univer-ring-white univer-will-change-transform
+ univer-rounded-full univer-border-2 univer-border-gray-0 univer-shadow-md univer-ring-2
+ univer-ring-gray-0 univer-will-change-transform
`}
style={getIndicatorStyles()}
/>
diff --git a/packages/design/src/components/color-picker/HueSlider.tsx b/packages/design/src/components/color-picker/HueSlider.tsx
index b26b798e29..3c1e23f1bc 100644
--- a/packages/design/src/components/color-picker/HueSlider.tsx
+++ b/packages/design/src/components/color-picker/HueSlider.tsx
@@ -116,8 +116,8 @@ export function HueSlider({ hsv, onChange, onChanged }: IHueSliderProps) {
data-u-comp="color-picker-hue-slider-thumb"
className={`
univer-absolute univer-top-1/2 univer-box-border univer-size-2 univer-rounded-full
- univer-bg-transparent univer-shadow-md univer-ring-2 univer-ring-white univer-transition-transform
- univer-duration-75 univer-will-change-transform
+ univer-bg-transparent univer-shadow-md univer-ring-2 univer-ring-gray-0
+ univer-transition-transform univer-duration-75 univer-will-change-transform
`}
style={{
left: getThumbPosition(),
diff --git a/packages/design/src/components/command/Command.tsx b/packages/design/src/components/command/Command.tsx
index 9411cc3ff2..e9f89714aa 100644
--- a/packages/design/src/components/command/Command.tsx
+++ b/packages/design/src/components/command/Command.tsx
@@ -25,8 +25,8 @@ export function Command({ className, ...props }: ComponentProps<typeof CommandPr
data-slot="command"
className={clsx(`
univer-flex univer-h-full univer-w-full univer-flex-col univer-overflow-hidden univer-rounded-md
- univer-bg-white univer-text-gray-900
- dark:!univer-bg-gray-700 dark:!univer-text-white
+ univer-bg-gray-0 univer-text-gray-900
+ dark:!univer-bg-gray-700 dark:!univer-text-gray-0
`, className)}
{...props}
/>
diff --git a/packages/design/src/components/date-picker/DatePicker.tsx b/packages/design/src/components/date-picker/DatePicker.tsx
index 939b3eba20..9c759b6246 100644
--- a/packages/design/src/components/date-picker/DatePicker.tsx
+++ b/packages/design/src/components/date-picker/DatePicker.tsx
@@ -65,7 +65,7 @@ export function DatePicker(props: IDatePickerProps) {
univer-flex univer-h-8 univer-items-center univer-justify-between univer-gap-2 univer-rounded-md
univer-bg-transparent univer-px-2 univer-text-sm univer-text-gray-800 univer-transition-all
hover:univer-border-primary-600
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`, borderClassName, className)}
type="button"
>
diff --git a/packages/design/src/components/date-range-picker/DateRangePicker.tsx b/packages/design/src/components/date-range-picker/DateRangePicker.tsx
index e995c8b919..81886e44cd 100644
--- a/packages/design/src/components/date-range-picker/DateRangePicker.tsx
+++ b/packages/design/src/components/date-range-picker/DateRangePicker.tsx
@@ -85,7 +85,7 @@ export function DateRangePicker(props: IDateRangePickerProps) {
univer-flex univer-h-8 univer-items-center univer-justify-between univer-gap-2 univer-rounded-md
univer-bg-transparent univer-px-2 univer-text-sm univer-text-gray-800 univer-transition-all
hover:univer-border-primary-600
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`, borderClassName, className)}
type="button"
>
diff --git a/packages/design/src/components/dialog/DialogPrimitive.tsx b/packages/design/src/components/dialog/DialogPrimitive.tsx
index 7642d5669c..ebe3f0fd37 100644
--- a/packages/design/src/components/dialog/DialogPrimitive.tsx
+++ b/packages/design/src/components/dialog/DialogPrimitive.tsx
@@ -72,7 +72,7 @@ const DialogContent = forwardRef<
data-[state=closed]:univer-slide-out-to-top-[48%]
univer-fixed univer-left-1/2 univer-top-1/2 univer-z-[1080] univer-box-border univer-grid
univer-w-full univer-max-w-lg -univer-translate-x-1/2 -univer-translate-y-1/2 univer-gap-4
- univer-bg-white univer-p-4 univer-text-gray-500 univer-shadow-md univer-duration-200
+ univer-bg-gray-0 univer-p-4 univer-text-gray-500 univer-shadow-md univer-duration-200
sm:!univer-rounded-lg
dark:!univer-bg-gray-700 dark:!univer-text-gray-400
`,
@@ -149,7 +149,7 @@ const DialogTitle = forwardRef<
`
univer-my-0 univer-text-lg univer-font-semibold univer-leading-none univer-tracking-tight
univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`,
className
)}
diff --git a/packages/design/src/components/draggable-list/DraggableList.tsx b/packages/design/src/components/draggable-list/DraggableList.tsx
index 2fe49d1a92..9ee6cd864b 100644
--- a/packages/design/src/components/draggable-list/DraggableList.tsx
+++ b/packages/design/src/components/draggable-list/DraggableList.tsx
@@ -275,7 +275,7 @@ export function DraggableList<T = any>(props: IDraggableListProps<T>) {
dir={direction}
className={clsx(`
univer-pointer-events-none univer-fixed univer-rounded-md univer-border univer-border-gray-200
- univer-bg-white univer-shadow-lg
+ univer-bg-gray-0 univer-shadow-lg
dark:!univer-border-gray-700 dark:!univer-bg-gray-800
`)}
style={{
diff --git a/packages/design/src/components/dropdown-menu/DropdownMenuPrimitive.tsx b/packages/design/src/components/dropdown-menu/DropdownMenuPrimitive.tsx
index 5d5eb4361c..01b69f51c5 100644
--- a/packages/design/src/components/dropdown-menu/DropdownMenuPrimitive.tsx
+++ b/packages/design/src/components/dropdown-menu/DropdownMenuPrimitive.tsx
@@ -136,9 +136,9 @@ function DropdownMenuSubContent({
data-[side=right]:univer-slide-in-from-left-2
data-[side=top]:univer-slide-in-from-bottom-2
univer-z-[1080] univer-box-border univer-max-h-[--radix-popper-available-height]
- univer-overflow-y-auto univer-rounded-md univer-bg-white univer-p-1.5 univer-text-gray-900
+ univer-overflow-y-auto univer-rounded-md univer-bg-gray-0 univer-p-1.5 univer-text-gray-900
univer-shadow-md
- dark:!univer-bg-gray-700 dark:!univer-text-white
+ dark:!univer-bg-gray-700 dark:!univer-text-gray-0
`,
borderClassName,
scrollbarClassName,
@@ -170,9 +170,9 @@ function DropdownMenuContent({
data-[side=right]:univer-slide-in-from-left-2
data-[side=top]:univer-slide-in-from-bottom-2
univer-z-[1080] univer-box-border univer-max-h-[--radix-popper-available-height]
- univer-overflow-y-auto univer-rounded-md univer-bg-white univer-p-1.5 univer-text-gray-900
+ univer-overflow-y-auto univer-rounded-md univer-bg-gray-0 univer-p-1.5 univer-text-gray-900
univer-shadow-md
- dark:!univer-bg-gray-700 dark:!univer-text-white
+ dark:!univer-bg-gray-700 dark:!univer-text-gray-0
`,
borderClassName,
scrollbarClassName,
diff --git a/packages/design/src/components/dropdown/PopoverPrimitive.tsx b/packages/design/src/components/dropdown/PopoverPrimitive.tsx
index 88f84ba1dd..0763b4ba8c 100644
--- a/packages/design/src/components/dropdown/PopoverPrimitive.tsx
+++ b/packages/design/src/components/dropdown/PopoverPrimitive.tsx
@@ -55,8 +55,8 @@ function PopoverContent({
data-[side=right]:univer-slide-in-from-left-2
data-[side=top]:univer-slide-in-from-bottom-2
univer-z-[1080] univer-max-h-[--radix-popper-available-height] univer-overflow-y-auto
- univer-rounded-md univer-bg-white univer-text-gray-900 univer-shadow-md
- dark:!univer-bg-gray-900 dark:!univer-text-white
+ univer-rounded-md univer-bg-gray-0 univer-text-gray-900 univer-shadow-md
+ dark:!univer-bg-gray-900 dark:!univer-text-gray-0
dark:focus-visible:!univer-border-gray-600
`,
borderClassName,
diff --git a/packages/design/src/components/form-layout/FormLayout.tsx b/packages/design/src/components/form-layout/FormLayout.tsx
index 00b92e0cec..722f88b86e 100644
--- a/packages/design/src/components/form-layout/FormLayout.tsx
+++ b/packages/design/src/components/form-layout/FormLayout.tsx
@@ -46,7 +46,7 @@ export const FormLayout = (props: IFormLayoutProps) => {
className={clsx(`
univer-mb-2 univer-flex univer-min-h-3.5 univer-items-center univer-text-sm
univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`, {
'univer-cursor-pointer': collapsable,
})}
diff --git a/packages/design/src/components/gallery/Gallery.tsx b/packages/design/src/components/gallery/Gallery.tsx
index 7fbd2c28e4..bd3864d2cf 100644
--- a/packages/design/src/components/gallery/Gallery.tsx
+++ b/packages/design/src/components/gallery/Gallery.tsx
@@ -31,7 +31,7 @@ export interface IGalleryProps {
const buttonClassName = `
univer-flex univer-cursor-pointer univer-items-center univer-justify-center univer-border-none
univer-bg-transparent univer-p-0 univer-text-current
- hover:univer-text-white
+ hover:univer-text-gray-0
`;
export function Gallery(props: IGalleryProps) {
diff --git a/packages/design/src/components/gradient-color-picker/GradientColorPicker.tsx b/packages/design/src/components/gradient-color-picker/GradientColorPicker.tsx
index 35de78cae9..c398b7f5dd 100644
--- a/packages/design/src/components/gradient-color-picker/GradientColorPicker.tsx
+++ b/packages/design/src/components/gradient-color-picker/GradientColorPicker.tsx
@@ -238,7 +238,7 @@ export function GradientColorPicker(props: IGradientColorPickerProps) {
`
: `
univer-flex univer-w-full univer-min-w-0 univer-max-w-80 univer-flex-col univer-gap-4
- univer-rounded-lg univer-bg-white univer-p-4 univer-shadow-lg
+ univer-rounded-lg univer-bg-gray-0 univer-p-4 univer-shadow-lg
dark:!univer-bg-gray-800
`,
className
@@ -281,7 +281,7 @@ export function GradientColorPicker(props: IGradientColorPickerProps) {
: `
univer-text-gray-500
hover:univer-text-gray-900
- dark:hover:!univer-text-white
+ dark:hover:!univer-text-gray-0
`
)}
onClick={() => handleTypeChange(item.value as GradientType)}
@@ -363,7 +363,7 @@ export function GradientColorPicker(props: IGradientColorPickerProps) {
`
univer-absolute univer-top-1/2 univer-size-4 -univer-translate-x-1/2
-univer-translate-y-1/2 univer-cursor-pointer univer-rounded-full univer-border-2
- univer-border-white univer-shadow-md
+ univer-border-gray-0 univer-shadow-md
`,
selectedIndex === index ? 'univer-z-10 univer-ring-2 univer-ring-primary-500' : 'univer-z-0'
)}
diff --git a/packages/design/src/components/hover-card/HoverCardPrimitive.tsx b/packages/design/src/components/hover-card/HoverCardPrimitive.tsx
index 43874b5177..f7c75942a6 100644
--- a/packages/design/src/components/hover-card/HoverCardPrimitive.tsx
+++ b/packages/design/src/components/hover-card/HoverCardPrimitive.tsx
@@ -44,8 +44,8 @@ const HoverCardContent = forwardRef<
data-[side=right]:univer-slide-in-from-left-2
data-[side=top]:univer-slide-in-from-bottom-2
univer-z-[1080] univer-w-64 univer-origin-[--radix-hover-card-content-transform-origin] univer-rounded-md
- univer-bg-white univer-text-gray-900 univer-shadow-md univer-outline-none
- dark:!univer-bg-gray-900 dark:!univer-text-white
+ univer-bg-gray-0 univer-text-gray-900 univer-shadow-md univer-outline-none
+ dark:!univer-bg-gray-900 dark:!univer-text-gray-0
`,
borderClassName,
className
diff --git a/packages/design/src/components/input-number/InputNumber.tsx b/packages/design/src/components/input-number/InputNumber.tsx
index 23d647b86a..82b51ad9be 100644
--- a/packages/design/src/components/input-number/InputNumber.tsx
+++ b/packages/design/src/components/input-number/InputNumber.tsx
@@ -373,7 +373,7 @@ export const InputNumber = forwardRef<HTMLInputElement, IInputNumberProps>(
univer-items-center univer-justify-center univer-border-none univer-bg-transparent
univer-p-0 univer-transition-colors
hover:univer-bg-gray-100
- dark:!univer-text-white
+ dark:!univer-text-gray-0
dark:hover:!univer-bg-gray-600
`,
incrementDisabled && 'univer-cursor-not-allowed univer-opacity-60'
@@ -400,7 +400,7 @@ export const InputNumber = forwardRef<HTMLInputElement, IInputNumberProps>(
univer-items-center univer-justify-center univer-border-none univer-bg-transparent
univer-p-0 univer-transition-colors
hover:univer-bg-gray-100
- dark:!univer-text-white
+ dark:!univer-text-gray-0
dark:hover:!univer-bg-gray-600
`,
decrementDisabled && 'univer-cursor-not-allowed univer-opacity-60'
diff --git a/packages/design/src/components/input/Input.tsx b/packages/design/src/components/input/Input.tsx
index 994e4a24a0..f08998a528 100644
--- a/packages/design/src/components/input/Input.tsx
+++ b/packages/design/src/components/input/Input.tsx
@@ -27,11 +27,11 @@ type InputProps = InputHTMLAttributes<HTMLInputElement>;
export const inputVariants = cva(
`
- univer-box-border univer-w-full univer-rounded-md univer-bg-white univer-text-gray-900 univer-transition-colors
+ univer-box-border univer-w-full univer-rounded-md univer-bg-gray-0 univer-text-gray-900 univer-transition-colors
univer-duration-200
placeholder:univer-text-gray-400
focus:univer-border-primary-600 focus:univer-outline-none focus:univer-ring-2 focus:univer-ring-primary-50
- dark:!univer-bg-gray-700 dark:!univer-text-white
+ dark:!univer-bg-gray-700 dark:!univer-text-gray-0
dark:focus:!univer-ring-primary-900
`,
{
diff --git a/packages/design/src/components/kbd/Kbd.tsx b/packages/design/src/components/kbd/Kbd.tsx
index 82071567a9..da29d9c832 100644
--- a/packages/design/src/components/kbd/Kbd.tsx
+++ b/packages/design/src/components/kbd/Kbd.tsx
@@ -33,7 +33,7 @@ export function KBD(props: IKBDProps) {
className={clsx(`
univer-inline-block univer-h-6 univer-select-none univer-whitespace-nowrap univer-rounded-md
univer-bg-gray-50 univer-px-2 univer-font-mono univer-text-xs/6 univer-font-medium univer-text-gray-700
- dark:!univer-bg-gray-700 dark:!univer-text-white
+ dark:!univer-bg-gray-700 dark:!univer-text-gray-0
`, borderClassName, className)}
>
{keys.map((text, index) => (
diff --git a/packages/design/src/components/message/Message.stories.tsx b/packages/design/src/components/message/Message.stories.tsx
index cecfcedc76..b1eca95324 100644
--- a/packages/design/src/components/message/Message.stories.tsx
+++ b/packages/design/src/components/message/Message.stories.tsx
@@ -111,7 +111,7 @@ function MessageStoryShell({ title, description, children }: { title: string; de
>
<div
className={`
- univer-border-white/70 univer-bg-white/80 univer-mx-auto univer-max-w-5xl univer-rounded-3xl
+ univer-border-gray-0/70 univer-bg-gray-0/80 univer-mx-auto univer-max-w-5xl univer-rounded-3xl
univer-border univer-border-solid univer-p-8 univer-shadow-[0_30px_60px_-35px_rgba(15,23,42,0.55)]
univer-backdrop-blur-xl
`}
diff --git a/packages/design/src/components/message/Message.tsx b/packages/design/src/components/message/Message.tsx
index 558656d60b..5074bdf67e 100644
--- a/packages/design/src/components/message/Message.tsx
+++ b/packages/design/src/components/message/Message.tsx
@@ -100,7 +100,7 @@ export const Messager = ({ className, ...props }: IMessagerProps) => (
offset={{ top: 16 }}
className={clsx(
`
- [&_[data-sonner-toast]]:univer-bg-white/95
+ [&_[data-sonner-toast]]:univer-bg-gray-0/95
dark:[&_[data-sonner-toast]]:!univer-bg-gray-800/95
[&_[data-sonner-toast]]:univer-rounded-2xl [&_[data-sonner-toast]]:univer-border
[&_[data-sonner-toast]]:univer-border-solid [&_[data-sonner-toast]]:univer-border-gray-200
diff --git a/packages/design/src/components/radio/Radio.tsx b/packages/design/src/components/radio/Radio.tsx
index 31c3009b7e..5a409aea30 100644
--- a/packages/design/src/components/radio/Radio.tsx
+++ b/packages/design/src/components/radio/Radio.tsx
@@ -69,7 +69,7 @@ export function Radio(props: IRadioProps) {
<label
data-u-comp="radio"
className={clsx('univer-box-border univer-inline-flex univer-items-center univer-gap-2 univer-text-sm', {
- 'univer-cursor-pointer univer-text-gray-900 dark:!univer-text-white': !disabled,
+ 'univer-cursor-pointer univer-text-gray-900 dark:!univer-text-gray-0': !disabled,
'univer-text-gray-400': disabled,
})}
>
@@ -97,7 +97,7 @@ export function Radio(props: IRadioProps) {
<span
className={`
univer-absolute univer-left-1/2 univer-top-1/2 univer-block univer-size-2
- -univer-translate-x-1/2 -univer-translate-y-1/2 univer-rounded-full univer-bg-white
+ -univer-translate-x-1/2 -univer-translate-y-1/2 univer-rounded-full univer-bg-gray-0
`}
/>
)}
diff --git a/packages/design/src/components/segmented/Segmented.tsx b/packages/design/src/components/segmented/Segmented.tsx
index 63d2e2328a..64bbaf2fee 100644
--- a/packages/design/src/components/segmented/Segmented.tsx
+++ b/packages/design/src/components/segmented/Segmented.tsx
@@ -113,7 +113,7 @@ export function Segmented<T extends ItemValue = ItemValue>({
>
<div
className={`
- univer-animate-univer-slide univer-absolute univer-h-6 univer-rounded-md univer-bg-white
+ univer-animate-univer-slide univer-absolute univer-h-6 univer-rounded-md univer-bg-gray-0
univer-shadow-sm univer-transition-all univer-duration-200
dark:!univer-bg-gray-700 dark:!univer-text-gray-400
`}
@@ -131,8 +131,8 @@ export function Segmented<T extends ItemValue = ItemValue>({
univer-truncate univer-border-none univer-bg-transparent univer-px-3 univer-py-1 univer-text-xs
univer-font-medium univer-transition-colors
`, {
- 'univer-text-gray-900 dark:!univer-text-white': selectedItem === item.value,
- 'univer-text-gray-500 hover:univer-text-gray-900 dark:hover:!univer-text-white': selectedItem !== item.value,
+ 'univer-text-gray-900 dark:!univer-text-gray-0': selectedItem === item.value,
+ 'univer-text-gray-500 hover:univer-text-gray-900 dark:hover:!univer-text-gray-0': selectedItem !== item.value,
})}
type="button"
onClick={() => handleClick(item.value)}
diff --git a/packages/design/src/components/select-list/SelectList.tsx b/packages/design/src/components/select-list/SelectList.tsx
index e321903237..27bcedfad2 100644
--- a/packages/design/src/components/select-list/SelectList.tsx
+++ b/packages/design/src/components/select-list/SelectList.tsx
@@ -98,7 +98,7 @@ export function SelectList(props: ISelectListProps) {
univer-py-1.5 univer-pl-8 univer-pr-2 univer-text-sm univer-text-gray-900
univer-transition-colors
hover:univer-bg-gray-100
- dark:!univer-text-white
+ dark:!univer-text-gray-0
dark:hover:!univer-bg-gray-600
`, optionClassName, {
'univer-bg-gray-200 dark:!univer-bg-gray-500': checked,
diff --git a/packages/design/src/components/select/MultipleSelect.tsx b/packages/design/src/components/select/MultipleSelect.tsx
index 4dd08f91ed..992a06e8c8 100644
--- a/packages/design/src/components/select/MultipleSelect.tsx
+++ b/packages/design/src/components/select/MultipleSelect.tsx
@@ -141,7 +141,7 @@ export function MultipleSelect(props: IMultipleSelectProps) {
<MoreDownIcon
className={`
univer-flex-shrink-0
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
/>
</div>
diff --git a/packages/design/src/components/select/Select.tsx b/packages/design/src/components/select/Select.tsx
index 5388d06f43..4c0d794eb6 100644
--- a/packages/design/src/components/select/Select.tsx
+++ b/packages/design/src/components/select/Select.tsx
@@ -73,8 +73,8 @@ export interface ISelectProps {
export const selectClassName = clsx(`
univer-box-border univer-inline-flex univer-h-8 univer-min-w-36 univer-items-center univer-justify-between
- univer-gap-2 univer-rounded-lg univer-bg-white univer-px-2.5 univer-transition-colors univer-duration-200
- dark:!univer-bg-gray-700 dark:!univer-text-white
+ univer-gap-2 univer-rounded-lg univer-bg-gray-0 univer-px-2.5 univer-transition-colors univer-duration-200
+ dark:!univer-bg-gray-700 dark:!univer-text-gray-0
`, borderClassName);
export function Select(props: ISelectProps) {
@@ -176,7 +176,7 @@ export function Select(props: ISelectProps) {
<div
className={`
univer-flex-1 univer-truncate univer-text-sm univer-text-gray-500
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
>
{displayValue}
@@ -184,7 +184,7 @@ export function Select(props: ISelectProps) {
<MoreDownIcon
className={`
univer-flex-shrink-0
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
/>
</div>
diff --git a/packages/design/src/components/switch/Switch.tsx b/packages/design/src/components/switch/Switch.tsx
index ca6c0f8231..feb295c885 100644
--- a/packages/design/src/components/switch/Switch.tsx
+++ b/packages/design/src/components/switch/Switch.tsx
@@ -56,7 +56,7 @@ const Switch = (props: ISwitchProps) => {
<span
className={clsx(`
univer-absolute univer-bottom-0.5 univer-left-0.5 univer-size-3 univer-rounded-full
- univer-bg-white univer-transition-transform univer-duration-200
+ univer-bg-gray-0 univer-transition-transform univer-duration-200
`, {
'univer-translate-x-3': checked,
})}
diff --git a/packages/design/src/components/textarea/Textarea.tsx b/packages/design/src/components/textarea/Textarea.tsx
index 1b5a0be78a..99fd88e011 100644
--- a/packages/design/src/components/textarea/Textarea.tsx
+++ b/packages/design/src/components/textarea/Textarea.tsx
@@ -76,7 +76,7 @@ export const Textarea = forwardRef<HTMLTextAreaElement, ITextareaProps>((props,
univer-transition-[color,box-shadow]
placeholder:univer-text-gray-200
disabled:univer-cursor-not-allowed disabled:univer-opacity-50
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`,
borderClassName,
scrollbarClassName,
diff --git a/packages/design/src/components/time-input/TimeInput.tsx b/packages/design/src/components/time-input/TimeInput.tsx
index e427752ccc..2fe8dc3d7c 100644
--- a/packages/design/src/components/time-input/TimeInput.tsx
+++ b/packages/design/src/components/time-input/TimeInput.tsx
@@ -52,7 +52,7 @@ export function TimeInput(props: ITimeInputProps) {
univer-pl-6 univer-pr-2 univer-text-center univer-text-gray-800 univer-shadow univer-outline-none
univer-transition-all univer-duration-200
focus:univer-border-primary-600
- dark:!univer-text-white
+ dark:!univer-text-gray-0
dark:focus:!univer-border-primary-500
[&::-webkit-calendar-picker-indicator]:univer-hidden
[&::-webkit-calendar-picker-indicator]:univer-appearance-none
diff --git a/packages/design/src/components/tooltip/Tooltip.stories.tsx b/packages/design/src/components/tooltip/Tooltip.stories.tsx
index 0fa58b178c..e68e9ac841 100644
--- a/packages/design/src/components/tooltip/Tooltip.stories.tsx
+++ b/packages/design/src/components/tooltip/Tooltip.stories.tsx
@@ -63,7 +63,7 @@ export const Playground = {
<div>
<Tooltip title="Just a tooltip">
- <a className="univer-rounded univer-bg-primary-500 univer-px-4 univer-py-2 univer-text-white">
+ <a className="univer-rounded univer-bg-primary-500 univer-px-4 univer-py-2 univer-text-gray-0">
Hover me
</a>
</Tooltip>
diff --git a/packages/design/src/components/tooltip/Tooltip.tsx b/packages/design/src/components/tooltip/Tooltip.tsx
index 725b38e23b..0116fcd4ac 100644
--- a/packages/design/src/components/tooltip/Tooltip.tsx
+++ b/packages/design/src/components/tooltip/Tooltip.tsx
@@ -247,7 +247,7 @@ export function Tooltip(props: ITooltipProps) {
className={clsx(`
univer-animate-in univer-fade-in-0 univer-zoom-in-95 univer-pointer-events-auto univer-absolute
univer-z-[1081] univer-box-border univer-w-fit univer-max-w-sm univer-text-balance univer-rounded-lg
- univer-bg-gray-700 univer-px-2.5 univer-py-2 univer-text-xs univer-font-medium univer-text-white
+ univer-bg-gray-700 univer-px-2.5 univer-py-2 univer-text-xs univer-font-medium univer-text-gray-0
univer-shadow-lg univer-drop-shadow-sm
dark:!univer-bg-gray-100 dark:!univer-text-gray-900
`, className)}
diff --git a/packages/design/src/components/tree/Tree.tsx b/packages/design/src/components/tree/Tree.tsx
index 578b9c65e6..12dc51de17 100644
--- a/packages/design/src/components/tree/Tree.tsx
+++ b/packages/design/src/components/tree/Tree.tsx
@@ -198,7 +198,7 @@ export function Tree(props: ITreeProps) {
<section
className="
univer-relative univer-select-none univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
"
>
<div className="univer-m-0 univer-h-full univer-list-none univer-p-0" style={style}>
diff --git a/packages/docs-hyper-link-ui/src/views/DocHyperLinkEdit.tsx b/packages/docs-hyper-link-ui/src/views/DocHyperLinkEdit.tsx
index 3e37578d09..f3b759c01a 100644
--- a/packages/docs-hyper-link-ui/src/views/DocHyperLinkEdit.tsx
+++ b/packages/docs-hyper-link-ui/src/views/DocHyperLinkEdit.tsx
@@ -126,7 +126,8 @@ export const DocHyperLinkEdit = () => {
return (
<div
className={clsx(`
- univer-box-border univer-w-[328px] univer-rounded-xl univer-bg-white univer-px-6 univer-py-5 univer-shadow
+ univer-box-border univer-w-[328px] univer-rounded-xl univer-bg-gray-0 univer-px-6 univer-py-5
+ univer-shadow
dark:!univer-bg-gray-900
`, borderClassName)}
>
diff --git a/packages/docs-hyper-link-ui/src/views/DocLinkPopup.tsx b/packages/docs-hyper-link-ui/src/views/DocLinkPopup.tsx
index 23d0b51115..f00d28d7b3 100644
--- a/packages/docs-hyper-link-ui/src/views/DocLinkPopup.tsx
+++ b/packages/docs-hyper-link-ui/src/views/DocLinkPopup.tsx
@@ -56,7 +56,7 @@ export const DocLinkPopup = () => {
<div
className={clsx(`
univer-box-border univer-flex univer-max-w-80 univer-items-center univer-justify-between
- univer-overflow-hidden univer-rounded-lg univer-bg-white univer-p-3 univer-shadow
+ univer-overflow-hidden univer-rounded-lg univer-bg-gray-0 univer-p-3 univer-shadow
dark:!univer-bg-gray-900
`, borderClassName)}
onClick={() => {
@@ -74,7 +74,7 @@ export const DocLinkPopup = () => {
className={`
univer-mr-2 univer-flex univer-size-5 univer-flex-[0_0_auto] univer-items-center
univer-justify-center univer-text-base univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
>
<LinkIcon />
diff --git a/packages/docs-quick-insert-ui/src/views/QuickInsertButton.tsx b/packages/docs-quick-insert-ui/src/views/QuickInsertButton.tsx
index a35f1d52ec..ddc4bac83c 100644
--- a/packages/docs-quick-insert-ui/src/views/QuickInsertButton.tsx
+++ b/packages/docs-quick-insert-ui/src/views/QuickInsertButton.tsx
@@ -85,7 +85,7 @@ export const QuickInsertButton = ({ className = '' }: {
dark:hover:!univer-bg-gray-700
`, borderClassName, {
'univer-bg-gray-100 dark:!univer-bg-gray-700': editPopup,
- 'univer-bg-white dark:!univer-bg-gray-900': !editPopup,
+ 'univer-bg-gray-0 dark:!univer-bg-gray-900': !editPopup,
}, className)}
role="button"
tabIndex={0}
diff --git a/packages/docs-quick-insert-ui/src/views/QuickInsertMenu.tsx b/packages/docs-quick-insert-ui/src/views/QuickInsertMenu.tsx
index 1f4d008b34..fb4e68642f 100644
--- a/packages/docs-quick-insert-ui/src/views/QuickInsertMenu.tsx
+++ b/packages/docs-quick-insert-ui/src/views/QuickInsertMenu.tsx
@@ -136,7 +136,7 @@ export function QuickInsertMenu(props: IQuickInsertMenuProps) {
univer-bg-transparent univer-px-2 univer-text-left univer-text-sm univer-text-gray-900
univer-outline-none
hover:univer-bg-gray-50
- dark:!univer-text-white
+ dark:!univer-text-gray-0
dark:hover:!univer-bg-gray-600
`, {
'hover:univer-bg-transparent': !isFocused,
@@ -161,9 +161,9 @@ export function QuickInsertMenu(props: IQuickInsertMenuProps) {
<div
className={clsx(`
univer-box-border univer-grid univer-max-h-[360px] univer-gap-1 univer-overflow-y-auto
- univer-overflow-x-hidden univer-overscroll-contain univer-rounded-md univer-bg-white univer-px-2
+ univer-overflow-x-hidden univer-overscroll-contain univer-rounded-md univer-bg-gray-0 univer-px-2
univer-py-1 univer-text-sm univer-text-gray-900 univer-shadow-md
- dark:!univer-bg-gray-700 dark:!univer-text-white
+ dark:!univer-bg-gray-700 dark:!univer-text-gray-0
`, borderClassName, scrollbarClassName)}
onWheel={(event) => event.stopPropagation()}
>
diff --git a/packages/docs-quick-insert-ui/src/views/QuickInsertPlaceholder.tsx b/packages/docs-quick-insert-ui/src/views/QuickInsertPlaceholder.tsx
index b46a926f51..24248fef6a 100644
--- a/packages/docs-quick-insert-ui/src/views/QuickInsertPlaceholder.tsx
+++ b/packages/docs-quick-insert-ui/src/views/QuickInsertPlaceholder.tsx
@@ -25,7 +25,7 @@ export const QuickInsertPlaceholder = () => {
return (
<div
className={`
- univer-flex univer-h-full univer-items-center univer-justify-center univer-rounded-lg univer-bg-white
+ univer-flex univer-h-full univer-items-center univer-justify-center univer-rounded-lg univer-bg-gray-0
univer-px-12 univer-py-6 univer-text-gray-400 univer-shadow-lg
`}
>
diff --git a/packages/docs-ui/src/controllers/__tests__/doc-render-controller.spec.ts b/packages/docs-ui/src/controllers/__tests__/doc-render-controller.spec.ts
index 1009ad8656..15be785201 100644
--- a/packages/docs-ui/src/controllers/__tests__/doc-render-controller.spec.ts
+++ b/packages/docs-ui/src/controllers/__tests__/doc-render-controller.spec.ts
@@ -235,7 +235,7 @@ function createControllerFixture(options?: {
describe('doc render controller', () => {
it.each([
[DocumentFlavor.TRADITIONAL, 'gray.100'],
- [DocumentFlavor.MODERN, 'white'],
+ [DocumentFlavor.MODERN, 'gray.0'],
])('resolves the %s workspace background again when dark mode changes', (documentFlavor, backgroundToken) => {
const { canvasColorService, canvasElement, darkMode$ } = createControllerFixture({ documentFlavor });
canvasColorService.getRenderColor.mockImplementation((color: string) => `dark:${color}`);
diff --git a/packages/docs-ui/src/services/__tests__/docs-render.service.spec.ts b/packages/docs-ui/src/services/__tests__/docs-render.service.spec.ts
index 8aa08046e8..b941defb2f 100644
--- a/packages/docs-ui/src/services/__tests__/docs-render.service.spec.ts
+++ b/packages/docs-ui/src/services/__tests__/docs-render.service.spec.ts
@@ -162,7 +162,7 @@ describe('DocsRenderService', () => {
expect(renderManagerService.createdUnitIds).toEqual(['doc-existing']);
expect(renderManagerService.canvases.get('doc-existing')?.id).toBe('univer-doc-main-canvas');
expect(renderManagerService.canvases.get('doc-existing')?.contextId).toBe('univer-doc-main-canvas');
- expect(renderManagerService.canvases.get('doc-existing')?.style.backgroundColor).toBe('var(--univer-white)');
+ expect(renderManagerService.canvases.get('doc-existing')?.style.backgroundColor).toBe('var(--univer-gray-0)');
const editorDoc = new DocumentDataModel({
id: DOCS_NORMAL_EDITOR_UNIT_ID_KEY,
documentStyle: { documentFlavor: DocumentFlavor.TRADITIONAL },
diff --git a/packages/docs-ui/src/services/doc-render-background.ts b/packages/docs-ui/src/services/doc-render-background.ts
index 9663ee14a2..daf4df8715 100644
--- a/packages/docs-ui/src/services/doc-render-background.ts
+++ b/packages/docs-ui/src/services/doc-render-background.ts
@@ -18,11 +18,11 @@ import type { ICanvasColorService } from '@univerjs/engine-render';
import { DocumentFlavor } from '@univerjs/core';
const DOC_TRADITIONAL_WORKSPACE_BACKGROUND_COLOR = 'var(--univer-gray-100)';
-const DOC_MODERN_WORKSPACE_BACKGROUND_COLOR = 'var(--univer-white)';
+const DOC_MODERN_WORKSPACE_BACKGROUND_COLOR = 'var(--univer-gray-0)';
const DOC_UNSPECIFIED_WORKSPACE_BACKGROUND_COLOR = 'var(--univer-gray-100)';
const DOC_EDITOR_INTERNAL_BACKGROUND_COLOR = 'transparent';
const DOC_TRADITIONAL_WORKSPACE_BACKGROUND_TOKEN = 'gray.100';
-const DOC_MODERN_WORKSPACE_BACKGROUND_TOKEN = 'white';
+const DOC_MODERN_WORKSPACE_BACKGROUND_TOKEN = 'gray.0';
export interface IResolveDocRenderBackgroundOptions {
documentFlavor?: DocumentFlavor;
diff --git a/packages/docs-ui/src/views/PageSettings.tsx b/packages/docs-ui/src/views/PageSettings.tsx
index 9101033d73..181b7d09e9 100644
--- a/packages/docs-ui/src/views/PageSettings.tsx
+++ b/packages/docs-ui/src/views/PageSettings.tsx
@@ -96,7 +96,7 @@ function SettingsLabel(props: { children: ReactNode; muted?: boolean }) {
? 'univer-text-gray-500'
: `
univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`)}
>
{children}
@@ -128,7 +128,6 @@ export function PageSettings(props: IConfirmChildrenProps) {
}));
useEffect(() => {
- // eslint-disable-next-line react-hooks/immutability
hooks.beforeClose = () => {
return settings;
};
@@ -175,11 +174,11 @@ export function PageSettings(props: IConfirmChildrenProps) {
className={clsx(`
univer-h-8 univer-cursor-pointer univer-rounded-md univer-border-none univer-bg-transparent
univer-text-sm univer-font-medium univer-text-gray-600 univer-transition-colors
- hover:univer-bg-white hover:univer-text-gray-900
+ hover:univer-bg-gray-0 hover:univer-text-gray-900
dark:!univer-text-gray-200
dark:hover:!univer-bg-gray-700
`, {
- 'univer-bg-white univer-text-gray-900 univer-shadow-sm dark:!univer-bg-gray-700 dark:!univer-text-white': settings.mode === mode,
+ 'univer-bg-gray-0 univer-text-gray-900 univer-shadow-sm dark:!univer-bg-gray-700 dark:!univer-text-gray-0': settings.mode === mode,
})}
onClick={() => handleModeChange(mode)}
>
@@ -198,7 +197,7 @@ export function PageSettings(props: IConfirmChildrenProps) {
key={option}
type="button"
className={clsx(resetButtonClassName, borderClassName, `
- univer-h-16 univer-flex-col univer-gap-1 univer-rounded-lg univer-bg-white
+ univer-h-16 univer-flex-col univer-gap-1 univer-rounded-lg univer-bg-gray-0
univer-text-sm univer-font-medium univer-text-gray-700 univer-transition-colors
hover:univer-border-primary-500 hover:univer-text-primary-600
dark:!univer-bg-gray-900 dark:!univer-text-gray-100
diff --git a/packages/docs-ui/src/views/ParagraphMenu.tsx b/packages/docs-ui/src/views/ParagraphMenu.tsx
index d6487adcd0..0839786cb5 100644
--- a/packages/docs-ui/src/views/ParagraphMenu.tsx
+++ b/packages/docs-ui/src/views/ParagraphMenu.tsx
@@ -1278,7 +1278,7 @@ function ParagraphMenuBase({ popup, tableBlockOnly = false }: { popup: IPopup; t
ref={anchorRef}
className={clsx(`
univer-mr-1 univer-inline-flex univer-h-7 univer-cursor-pointer univer-items-center univer-gap-1
- univer-rounded-md univer-border univer-border-gray-200 univer-bg-white univer-px-2 univer-py-0
+ univer-rounded-md univer-border univer-border-gray-200 univer-bg-gray-0 univer-px-2 univer-py-0
univer-shadow-sm univer-transition-colors
hover:univer-bg-gray-50 hover:univer-shadow-md
dark:!univer-border-gray-700 dark:!univer-bg-gray-900
@@ -1310,7 +1310,7 @@ function ParagraphMenuBase({ popup, tableBlockOnly = false }: { popup: IPopup; t
getParagraphMenuIconSizeClass(targetIconKey),
`
univer-shrink-0 univer-text-gray-700
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`
)}
/>
@@ -1578,6 +1578,8 @@ export function shouldUseInsertBelowRange(commandId: string, params: IValueOptio
|| normalized === DOC_PARAGRAPH_T_INSERT_BELOW_COMMAND_ID;
}
+const DRAG_HANDLE_DOTS = ['top-left', 'top-right', 'middle-left', 'middle-right', 'bottom-left', 'bottom-right'] as const;
+
function DragHandleDotsIcon() {
return (
<span
@@ -1587,10 +1589,9 @@ function DragHandleDotsIcon() {
`}
aria-hidden="true"
>
- {Array.from({ length: 6 }).map((_, index) => (
+ {DRAG_HANDLE_DOTS.map((key) => (
<span
- // eslint-disable-next-line react/no-array-index-key
- key={index}
+ key={key}
className={`
univer-size-0.5 univer-rounded-full univer-bg-gray-400 univer-transition-colors
group-hover:univer-bg-gray-500
diff --git a/packages/docs-ui/src/views/SideMenu.tsx b/packages/docs-ui/src/views/SideMenu.tsx
index e68d8d06d4..833ab4bed4 100644
--- a/packages/docs-ui/src/views/SideMenu.tsx
+++ b/packages/docs-ui/src/views/SideMenu.tsx
@@ -94,7 +94,7 @@ export const SideMenu = forwardRef<ISideMenuInstance, ISideMenuProps>((props, re
onClick={() => onOpenChange?.(!open)}
className={clsx(`
univer-absolute univer-left-5 univer-top-4 univer-z-[100] univer-flex univer-size-8
- univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-full univer-bg-white
+ univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-full univer-bg-gray-0
univer-text-gray-800 univer-shadow-sm
dark:!univer-bg-gray-600 dark:!univer-text-gray-200
`, iconClass)}
@@ -110,7 +110,7 @@ export const SideMenu = forwardRef<ISideMenuInstance, ISideMenuProps>((props, re
univer-flex-col univer-px-4 univer-pb-4 univer-pt-14 univer-transition-all univer-duration-300
`,
{
- 'univer-rounded-r-2xl univer-bg-white univer-shadow univer-backdrop-blur-[10px] dark:!univer-bg-gray-900': isSideBar,
+ 'univer-rounded-r-2xl univer-bg-gray-0 univer-shadow univer-backdrop-blur-[10px] dark:!univer-bg-gray-900': isSideBar,
}
)}
style={{
diff --git a/packages/docs-ui/src/views/doc-statistics/DocStatistics.tsx b/packages/docs-ui/src/views/doc-statistics/DocStatistics.tsx
index b37a6b797e..0e175030a1 100644
--- a/packages/docs-ui/src/views/doc-statistics/DocStatistics.tsx
+++ b/packages/docs-ui/src/views/doc-statistics/DocStatistics.tsx
@@ -50,7 +50,7 @@ function StatisticsPanel({ statistics, selection, showPages }: { statistics: Dis
role="dialog"
aria-label={localeService.t<LocaleKey>('docs-ui.statistics.title')}
className={`
- univer-w-80 univer-rounded-lg univer-border univer-border-gray-200 univer-bg-white univer-p-4
+ univer-w-80 univer-rounded-lg univer-border univer-border-gray-200 univer-bg-gray-0 univer-p-4
univer-shadow-lg
dark:!univer-border-gray-600 dark:!univer-bg-gray-800
`}
diff --git a/packages/docs-ui/src/views/float-toolbar/FloatToolbar.tsx b/packages/docs-ui/src/views/float-toolbar/FloatToolbar.tsx
index b7e571432b..03ddb50a3a 100644
--- a/packages/docs-ui/src/views/float-toolbar/FloatToolbar.tsx
+++ b/packages/docs-ui/src/views/float-toolbar/FloatToolbar.tsx
@@ -126,7 +126,7 @@ export function FloatToolbar(props: IFloatToolbarProps) {
<div
ref={toolbarRef}
className={clsx(`
- univer-box-border univer-flex univer-rounded univer-bg-white univer-py-1.5 univer-shadow-sm
+ univer-box-border univer-flex univer-rounded univer-bg-gray-0 univer-py-1.5 univer-shadow-sm
dark:!univer-border-gray-700 dark:!univer-bg-gray-900
`, borderClassName)}
>
diff --git a/packages/docs-ui/src/views/paragraph-setting/Setting.tsx b/packages/docs-ui/src/views/paragraph-setting/Setting.tsx
index 6708c83e7c..39503c336c 100644
--- a/packages/docs-ui/src/views/paragraph-setting/Setting.tsx
+++ b/packages/docs-ui/src/views/paragraph-setting/Setting.tsx
@@ -142,7 +142,7 @@ export function ParagraphSetting() {
<div
className={clsx(`
univer-flex univer-grid-cols-4 univer-items-center univer-justify-around univer-gap-2
- univer-rounded-lg univer-bg-white univer-p-1
+ univer-rounded-lg univer-bg-gray-0 univer-p-1
dark:!univer-bg-gray-900
`, borderClassName)}
>
diff --git a/packages/drawing-ui/src/views/image-popup-menu/ImagePopupMenu.tsx b/packages/drawing-ui/src/views/image-popup-menu/ImagePopupMenu.tsx
index 89bd9f89b7..ce7120203c 100644
--- a/packages/drawing-ui/src/views/image-popup-menu/ImagePopupMenu.tsx
+++ b/packages/drawing-ui/src/views/image-popup-menu/ImagePopupMenu.tsx
@@ -136,16 +136,16 @@ export function ImagePopupMenu(props: IImagePopupMenuProps) {
dark:hover:!univer-bg-gray-800
`, borderClassName, {
'univer-bg-gray-100 dark:!univer-bg-gray-800': visible,
- 'univer-bg-white dark:!univer-bg-gray-900': !visible,
+ 'univer-bg-gray-0 dark:!univer-bg-gray-900': !visible,
})}
>
<AutofillDoubleIcon
className={`
univer-fill-primary-600 univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
/>
- {showMore && <MoreDownIcon className="dark:!univer-text-white" />}
+ {showMore && <MoreDownIcon className="dark:!univer-text-gray-0" />}
</div>
</DropdownMenu>
</div>
@@ -252,7 +252,7 @@ function ToolbarDropdownButton<T extends string | number>(props: {
<div
className={`
univer-min-w-32 univer-rounded-lg univer-border univer-border-solid univer-border-gray-200
- univer-bg-white univer-p-1 univer-shadow-lg
+ univer-bg-gray-0 univer-p-1 univer-shadow-lg
dark:!univer-border-gray-700 dark:!univer-bg-gray-900
`}
>
@@ -377,7 +377,7 @@ function DocImageFloatingToolbar(props: IDocImageFloatingToolbarProps) {
event.preventDefault();
}}
className={clsx(`
- univer-box-border univer-flex univer-items-center univer-rounded univer-bg-white univer-px-1 univer-py-1
+ univer-box-border univer-flex univer-items-center univer-rounded univer-bg-gray-0 univer-px-1 univer-py-1
univer-shadow-sm
dark:!univer-border-gray-700 dark:!univer-bg-gray-900
`, borderClassName)}
@@ -451,7 +451,7 @@ function DocChartFloatingToolbar(props: Pick<IDocImageFloatingToolbarProps, 'men
event.preventDefault();
}}
className={clsx(`
- univer-box-border univer-flex univer-items-center univer-rounded univer-bg-white univer-px-1 univer-py-1
+ univer-box-border univer-flex univer-items-center univer-rounded univer-bg-gray-0 univer-px-1 univer-py-1
univer-shadow-sm
dark:!univer-border-gray-700 dark:!univer-bg-gray-900
`, borderClassName)}
diff --git a/packages/drawing-ui/src/views/object-list-panel/ObjectListPanelBase.tsx b/packages/drawing-ui/src/views/object-list-panel/ObjectListPanelBase.tsx
index 548daf21c5..8824df78db 100644
--- a/packages/drawing-ui/src/views/object-list-panel/ObjectListPanelBase.tsx
+++ b/packages/drawing-ui/src/views/object-list-panel/ObjectListPanelBase.tsx
@@ -420,7 +420,7 @@ export function ObjectListPanelBase(props: IObjectListPanelBaseProps) {
dark:!univer-text-primary-200
`
: `
- univer-border-gray-200 univer-bg-white univer-text-gray-600
+ univer-border-gray-200 univer-bg-gray-0 univer-text-gray-600
hover:univer-bg-gray-50
dark:!univer-bg-gray-900 dark:!univer-text-gray-300
dark:hover:!univer-bg-gray-800
@@ -681,7 +681,7 @@ function ObjectListRow(props: {
!univer-h-7 univer-min-w-0 univer-overflow-hidden univer-text-ellipsis
univer-whitespace-nowrap !univer-rounded !univer-border-transparent !univer-bg-transparent
!univer-px-1 univer-text-sm univer-text-gray-900 !univer-shadow-none
- focus:!univer-border-primary-500 focus:!univer-bg-white focus:!univer-ring-1
+ focus:!univer-border-primary-500 focus:!univer-bg-gray-0 focus:!univer-ring-1
focus:!univer-ring-primary-100
disabled:!univer-bg-transparent disabled:univer-opacity-100
dark:!univer-text-gray-100
@@ -831,7 +831,7 @@ function ObjectDetailsEditor(props: {
<textarea
className="
univer-box-border univer-min-h-16 univer-w-full univer-resize-none univer-rounded-md
- univer-border univer-border-solid univer-border-gray-200 univer-bg-white univer-p-2
+ univer-border univer-border-solid univer-border-gray-200 univer-bg-gray-0 univer-p-2
univer-text-sm univer-text-gray-900 univer-outline-none
focus:univer-border-primary-500 focus:univer-ring-1 focus:univer-ring-primary-100
disabled:univer-cursor-not-allowed disabled:univer-opacity-70
diff --git a/packages/drawing-ui/src/views/panel/DrawingAlign.tsx b/packages/drawing-ui/src/views/panel/DrawingAlign.tsx
index b85f68ba87..ae784b9de8 100644
--- a/packages/drawing-ui/src/views/panel/DrawingAlign.tsx
+++ b/packages/drawing-ui/src/views/panel/DrawingAlign.tsx
@@ -112,7 +112,7 @@ export const DrawingAlign = (props: IDrawingAlignProps) => {
<div
className={`
univer-w-full univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
>
<Select value={alignValue} options={alignOptions} onChange={handleAlignChange} />
diff --git a/packages/engine-render/src/components/docs/__tests__/doc-background.spec.ts b/packages/engine-render/src/components/docs/__tests__/doc-background.spec.ts
index 96ba81cd54..c63459c02e 100644
--- a/packages/engine-render/src/components/docs/__tests__/doc-background.spec.ts
+++ b/packages/engine-render/src/components/docs/__tests__/doc-background.spec.ts
@@ -66,7 +66,7 @@ describe('DocBackground', () => {
vi.restoreAllMocks();
});
- it('draws traditional workspaces with gray 100 and pages with white', () => {
+ it('draws traditional workspaces with gray 100 and pages with the gray 0 theme token', () => {
const background = DocBackground.create('traditional-background', createSkeleton([createPage()]));
background.resize(320, 180);
const rectDraw = vi.spyOn(Rect, 'drawWith').mockImplementation(() => {});
@@ -75,12 +75,12 @@ describe('DocBackground', () => {
background.draw(createCtx());
expect(rectDraw.mock.calls[0][1]).toMatchObject({ fill: 'gray.100' });
- expect(rectDraw.mock.calls[1][1]).toMatchObject({ fill: 'white' });
+ expect(rectDraw.mock.calls[1][1]).toMatchObject({ fill: 'gray.0' });
background.dispose();
});
- it('draws modern workspaces with white', () => {
+ it('draws modern workspaces with the gray 0 theme token', () => {
const background = DocBackground.create(
'modern-background',
createSkeleton([createPage()], DocumentFlavor.MODERN)
@@ -91,7 +91,7 @@ describe('DocBackground', () => {
background.draw(createCtx());
expect(rectDraw).toHaveBeenCalledTimes(1);
- expect(rectDraw.mock.calls[0][1]).toMatchObject({ fill: 'white' });
+ expect(rectDraw.mock.calls[0][1]).toMatchObject({ fill: 'gray.0' });
background.dispose();
});
diff --git a/packages/engine-render/src/components/docs/doc-background.ts b/packages/engine-render/src/components/docs/doc-background.ts
index d0232f74bc..1ca8132c9c 100644
--- a/packages/engine-render/src/components/docs/doc-background.ts
+++ b/packages/engine-render/src/components/docs/doc-background.ts
@@ -25,7 +25,7 @@ import { DocComponent } from './doc-component';
import { Liquid } from './liquid';
const PAGE_STROKE_COLOR = 'gray.200';
-const PAGE_FILL_COLOR = 'white';
+const PAGE_FILL_COLOR = 'gray.0';
const UNSPECIFIED_PAGE_FILL_COLOR = 'gray.50';
const DOCS_WORKSPACE_FILL_COLOR = 'gray.100';
const MARGIN_STROKE_COLOR = 'gray.300';
diff --git a/packages/engine-render/src/services/__tests__/canvas-color.service.spec.ts b/packages/engine-render/src/services/__tests__/canvas-color.service.spec.ts
index 27812a5077..44dc31162b 100644
--- a/packages/engine-render/src/services/__tests__/canvas-color.service.spec.ts
+++ b/packages/engine-render/src/services/__tests__/canvas-color.service.spec.ts
@@ -44,24 +44,28 @@ describe('CanvasColorService', () => {
themeService.setTheme({
...theme,
- white: '#07111f',
gray: {
...theme.gray,
+ 0: '#07111f',
50: '#0d1422',
},
});
+ expect(service.getRenderColor('gray.0')).toBe('#07111f');
expect(service.getRenderColor('gray.50')).toBe('#0d1422');
expect(service.getRenderColor('white')).toBe('white');
+ expect(service.getRenderColor('black')).toBe('black');
themeService.setTheme({
...theme,
gray: {
...theme.gray,
+ 0: '#050914',
50: '#101827',
},
});
+ expect(service.getRenderColor('gray.0')).toBe('#050914');
expect(service.getRenderColor('gray.50')).toBe('#101827');
});
diff --git a/packages/sheets-conditional-formatting-ui/src/views/panel/RuleList.tsx b/packages/sheets-conditional-formatting-ui/src/views/panel/RuleList.tsx
index 8693f1cfb5..009b66e659 100644
--- a/packages/sheets-conditional-formatting-ui/src/views/panel/RuleList.tsx
+++ b/packages/sheets-conditional-formatting-ui/src/views/panel/RuleList.tsx
@@ -381,7 +381,7 @@ export function RuleList(props: IRuleListProps) {
<div
className={`
univer-text-sm univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
>
{getRuleDescribe(rule, localeService)}
diff --git a/packages/sheets-conditional-formatting-ui/src/views/panel/rule-edit/ColorScale.tsx b/packages/sheets-conditional-formatting-ui/src/views/panel/rule-edit/ColorScale.tsx
index efe15e1db6..01a8381524 100644
--- a/packages/sheets-conditional-formatting-ui/src/views/panel/rule-edit/ColorScale.tsx
+++ b/packages/sheets-conditional-formatting-ui/src/views/panel/rule-edit/ColorScale.tsx
@@ -74,9 +74,9 @@ const TextInput = (props: { id: string; type: CFValueType | 'none'; value: numbe
ref={formulaEditorRef}
className={clsx(`
univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center
- univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors
+ univer-rounded-lg univer-bg-gray-0 univer-pt-2 univer-transition-colors
hover:univer-border-primary-600
- dark:!univer-bg-gray-700 dark:!univer-text-white
+ dark:!univer-bg-gray-700 dark:!univer-text-gray-0
[&>div:first-child]:univer-px-2.5
[&>div]:univer-h-5 [&>div]:univer-ring-transparent
`, borderClassName)}
diff --git a/packages/sheets-conditional-formatting-ui/src/views/panel/rule-edit/DataBar.tsx b/packages/sheets-conditional-formatting-ui/src/views/panel/rule-edit/DataBar.tsx
index ca05a75f22..90ea2f7f30 100644
--- a/packages/sheets-conditional-formatting-ui/src/views/panel/rule-edit/DataBar.tsx
+++ b/packages/sheets-conditional-formatting-ui/src/views/panel/rule-edit/DataBar.tsx
@@ -76,9 +76,9 @@ const InputText = (props: { disabled?: boolean; id: string; className?: string;
ref={formulaEditorRef}
className={clsx(`
univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center
- univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors
+ univer-rounded-lg univer-bg-gray-0 univer-pt-2 univer-transition-colors
hover:univer-border-primary-600
- dark:!univer-bg-gray-700 dark:!univer-text-white
+ dark:!univer-bg-gray-700 dark:!univer-text-gray-0
[&>div:first-child]:univer-px-2.5
[&>div]:univer-h-5 [&>div]:univer-ring-transparent
`, borderClassName)}
diff --git a/packages/sheets-conditional-formatting-ui/src/views/panel/rule-edit/Formula.tsx b/packages/sheets-conditional-formatting-ui/src/views/panel/rule-edit/Formula.tsx
index b1365ed4f1..ef9f661260 100644
--- a/packages/sheets-conditional-formatting-ui/src/views/panel/rule-edit/Formula.tsx
+++ b/packages/sheets-conditional-formatting-ui/src/views/panel/rule-edit/Formula.tsx
@@ -126,9 +126,9 @@ export const FormulaStyleEditor = (props: IStyleEditorProps) => {
ref={formulaEditorRef}
className={clsx(`
univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center
- univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors
+ univer-rounded-lg univer-bg-gray-0 univer-pt-2 univer-transition-colors
hover:univer-border-primary-600
- dark:!univer-bg-gray-700 dark:!univer-text-white
+ dark:!univer-bg-gray-700 dark:!univer-text-gray-0
[&>div:first-child]:univer-px-2.5
[&>div]:univer-h-5 [&>div]:univer-ring-transparent
`, borderClassName)}
diff --git a/packages/sheets-conditional-formatting-ui/src/views/panel/rule-edit/IconSet.tsx b/packages/sheets-conditional-formatting-ui/src/views/panel/rule-edit/IconSet.tsx
index 93a3c6d334..fb53bd9df8 100644
--- a/packages/sheets-conditional-formatting-ui/src/views/panel/rule-edit/IconSet.tsx
+++ b/packages/sheets-conditional-formatting-ui/src/views/panel/rule-edit/IconSet.tsx
@@ -82,9 +82,9 @@ const TextInput = (props: { id: number; type: CFValueType; value: number | strin
ref={formulaEditorRef}
className={clsx(`
univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center
- univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors
+ univer-rounded-lg univer-bg-gray-0 univer-pt-2 univer-transition-colors
hover:univer-border-primary-600
- dark:!univer-bg-gray-700 dark:!univer-text-white
+ dark:!univer-bg-gray-700 dark:!univer-text-gray-0
[&>div:first-child]:univer-px-2.5
[&>div]:univer-h-5 [&>div]:univer-ring-transparent
`, borderClassName)}
@@ -374,7 +374,7 @@ const IconSetRuleEdit = (props: {
<div
className={clsx(`
univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center
- univer-justify-between univer-rounded-md univer-bg-white univer-px-4 univer-py-2
+ univer-justify-between univer-rounded-md univer-bg-gray-0 univer-px-4 univer-py-2
univer-text-xs univer-text-gray-600 univer-transition-all
hover:univer-border-primary-600
dark:!univer-text-gray-200
@@ -635,7 +635,7 @@ export const IconSet = (props: IStyleEditorProps<unknown, IIconSet>) => {
<div
className={clsx(`
univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center
- univer-justify-between univer-rounded-md univer-bg-white univer-px-4 univer-py-2
+ univer-justify-between univer-rounded-md univer-bg-gray-0 univer-px-4 univer-py-2
univer-text-xs univer-text-gray-600 univer-transition-all
hover:univer-border-primary-600
`, borderClassName)}
diff --git a/packages/sheets-conditional-formatting/src/facade/__tests__/create-test-bed.ts b/packages/sheets-conditional-formatting/src/facade/__tests__/create-test-bed.ts
index 78c5e4682f..4d6901c6a0 100644
--- a/packages/sheets-conditional-formatting/src/facade/__tests__/create-test-bed.ts
+++ b/packages/sheets-conditional-formatting/src/facade/__tests__/create-test-bed.ts
@@ -14,8 +14,6 @@
* limitations under the License.
*/
-/* eslint-disable max-lines-per-function */
-
import type { Dependency, IWorkbookData, UnitModel } from '@univerjs/core';
import type { IRender } from '@univerjs/engine-render';
import {
@@ -211,7 +209,7 @@ export function createFacadeTestBed(workbookData?: IWorkbookData, dependencies?:
// load theme service
const themeService = injector.get(ThemeService);
const theme = themeService.getCurrentTheme();
- const newTheme = set(theme, 'black', '#35322b');
+ const newTheme = set(theme, 'gray.1000', '#35322b');
themeService.setTheme(newTheme);
// register builtin plugins
diff --git a/packages/sheets-data-validation-ui/src/views/components/DataValidationItem.tsx b/packages/sheets-data-validation-ui/src/views/components/DataValidationItem.tsx
index 9d74032f09..5a6562275a 100644
--- a/packages/sheets-data-validation-ui/src/views/components/DataValidationItem.tsx
+++ b/packages/sheets-data-validation-ui/src/views/components/DataValidationItem.tsx
@@ -109,7 +109,7 @@ export const DataValidationItem = (props: IDataValidationDetailProps) => {
<div
className={`
univer-truncate univer-text-sm univer-font-medium univer-leading-[22px] univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
>
{validator?.generateRuleName(rule)}
diff --git a/packages/sheets-data-validation-ui/src/views/components/DataValidationOptions.tsx b/packages/sheets-data-validation-ui/src/views/components/DataValidationOptions.tsx
index b6e65d5e96..ae884255be 100644
--- a/packages/sheets-data-validation-ui/src/views/components/DataValidationOptions.tsx
+++ b/packages/sheets-data-validation-ui/src/views/components/DataValidationOptions.tsx
@@ -41,7 +41,7 @@ export function DataValidationOptions(props: IDataValidationOptionsParams) {
<div
className={`
univer-mb-3 univer-flex univer-cursor-pointer univer-items-center univer-text-sm univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
onClick={() => setShow(!show)}
>
diff --git a/packages/sheets-data-validation-ui/src/views/components/DropdownPresets.tsx b/packages/sheets-data-validation-ui/src/views/components/DropdownPresets.tsx
index 7442a91509..b1b062c691 100644
--- a/packages/sheets-data-validation-ui/src/views/components/DropdownPresets.tsx
+++ b/packages/sheets-data-validation-ui/src/views/components/DropdownPresets.tsx
@@ -57,7 +57,7 @@ export function DropdownPresets({ onChange }: ICustomComponentProps<string | und
hover:univer-bg-gray-100
focus-visible:univer-outline-none focus-visible:univer-ring-2
focus-visible:univer-ring-primary-600 focus-visible:univer-ring-offset-0
- dark:!univer-bg-gray-800 dark:!univer-text-white
+ dark:!univer-bg-gray-800 dark:!univer-text-gray-0
dark:hover:!univer-bg-gray-700
`}
onClick={() => onChange(serializeListOptions(values))}
diff --git a/packages/sheets-data-validation-ui/src/views/components/__tests__/DataValidationDetail.spec.tsx b/packages/sheets-data-validation-ui/src/views/components/__tests__/DataValidationDetail.spec.tsx
index 652c5b4818..bb1f59bda6 100644
--- a/packages/sheets-data-validation-ui/src/views/components/__tests__/DataValidationDetail.spec.tsx
+++ b/packages/sheets-data-validation-ui/src/views/components/__tests__/DataValidationDetail.spec.tsx
@@ -500,7 +500,7 @@ function createDetailTestBed(rule: ISheetDataValidationRule) {
});
const themeService = injector.get(ThemeService);
- themeService.setTheme(set(themeService.getCurrentTheme(), 'black', '#35322b'));
+ themeService.setTheme(set(themeService.getCurrentTheme(), 'gray.1000', '#35322b'));
univer.registerPlugin(UniverDataValidationPlugin);
univer.registerPlugin(TestPlugin);
diff --git a/packages/sheets-data-validation-ui/src/views/components/__tests__/DataValidationItem.spec.tsx b/packages/sheets-data-validation-ui/src/views/components/__tests__/DataValidationItem.spec.tsx
index ca3f86c41c..f0ceac466e 100644
--- a/packages/sheets-data-validation-ui/src/views/components/__tests__/DataValidationItem.spec.tsx
+++ b/packages/sheets-data-validation-ui/src/views/components/__tests__/DataValidationItem.spec.tsx
@@ -444,7 +444,7 @@ function createItemTestBed(rule: ISheetDataValidationRule = createCheckboxRule()
});
const themeService = injector.get(ThemeService);
- themeService.setTheme(set(themeService.getCurrentTheme(), 'black', '#35322b'));
+ themeService.setTheme(set(themeService.getCurrentTheme(), 'gray.1000', '#35322b'));
univer.registerPlugin(UniverDataValidationPlugin);
univer.registerPlugin(TestPlugin);
diff --git a/packages/sheets-data-validation-ui/src/views/components/formula-input/CustomFormulaInput.tsx b/packages/sheets-data-validation-ui/src/views/components/formula-input/CustomFormulaInput.tsx
index 426f6299c9..338586f168 100644
--- a/packages/sheets-data-validation-ui/src/views/components/formula-input/CustomFormulaInput.tsx
+++ b/packages/sheets-data-validation-ui/src/views/components/formula-input/CustomFormulaInput.tsx
@@ -38,9 +38,9 @@ export function CustomFormulaInput(props: IFormulaInputProps) {
ref={formulaEditorRef}
className={clsx(`
univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center univer-rounded-lg
- univer-bg-white univer-pt-2 univer-transition-colors
+ univer-bg-gray-0 univer-pt-2 univer-transition-colors
hover:univer-border-primary-600
- dark:!univer-bg-gray-700 dark:!univer-text-white
+ dark:!univer-bg-gray-700 dark:!univer-text-gray-0
[&>div:first-child]:univer-px-2.5
[&>div]:univer-h-5 [&>div]:univer-ring-transparent
`, borderClassName)}
diff --git a/packages/sheets-data-validation-ui/src/views/components/formula-input/ListFormulaInput.tsx b/packages/sheets-data-validation-ui/src/views/components/formula-input/ListFormulaInput.tsx
index b1f2ec2b43..5993095c5d 100644
--- a/packages/sheets-data-validation-ui/src/views/components/formula-input/ListFormulaInput.tsx
+++ b/packages/sheets-data-validation-ui/src/views/components/formula-input/ListFormulaInput.tsx
@@ -113,10 +113,10 @@ const ColorSelect = (props: IColorSelectProps) => {
<div
className={clsx(`
univer-box-border univer-inline-flex univer-h-8 univer-w-16 univer-cursor-pointer univer-items-center
- univer-justify-between univer-gap-2 univer-rounded-lg univer-bg-white univer-px-2.5
+ univer-justify-between univer-gap-2 univer-rounded-lg univer-bg-gray-0 univer-px-2.5
univer-transition-colors univer-duration-200
hover:univer-border-primary-600
- dark:!univer-bg-gray-700 dark:!univer-text-white
+ dark:!univer-bg-gray-700 dark:!univer-text-gray-0
`, borderClassName)}
>
<div
@@ -355,9 +355,9 @@ export function ListFormulaInput(props: IFormulaInputProps) {
ref={formulaEditorRef}
className={clsx(`
univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center
- univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors
+ univer-rounded-lg univer-bg-gray-0 univer-pt-2 univer-transition-colors
hover:univer-border-primary-600
- dark:!univer-bg-gray-700 dark:!univer-text-white
+ dark:!univer-bg-gray-700 dark:!univer-text-gray-0
[&>div:first-child]:univer-px-2.5
[&>div]:univer-h-5 [&>div]:univer-ring-transparent
`, borderClassName)}
diff --git a/packages/sheets-data-validation/src/facade/__tests__/create-test-bed.ts b/packages/sheets-data-validation/src/facade/__tests__/create-test-bed.ts
index c5c50110cd..047f61aff0 100644
--- a/packages/sheets-data-validation/src/facade/__tests__/create-test-bed.ts
+++ b/packages/sheets-data-validation/src/facade/__tests__/create-test-bed.ts
@@ -193,7 +193,7 @@ export function createFacadeTestBed(workbookData?: IWorkbookData, dependencies?:
// load theme service
const themeService = injector.get(ThemeService);
const theme = themeService.getCurrentTheme();
- const newTheme = set(theme, 'black', '#35322b');
+ const newTheme = set(theme, 'gray.1000', '#35322b');
themeService.setTheme(newTheme);
// register builtin plugins
diff --git a/packages/sheets-data-validation/src/facade/__tests__/create-worksheet-test-bed.ts b/packages/sheets-data-validation/src/facade/__tests__/create-worksheet-test-bed.ts
index 4dc27d4bb9..decf9d2518 100644
--- a/packages/sheets-data-validation/src/facade/__tests__/create-worksheet-test-bed.ts
+++ b/packages/sheets-data-validation/src/facade/__tests__/create-worksheet-test-bed.ts
@@ -110,7 +110,6 @@ export interface ITestBed {
injector: Injector;
}
-// eslint-disable-next-line max-lines-per-function
export function createWorksheetTestBed(workbookData?: IWorkbookData, dependencies?: Dependency[]): ITestBed {
const univer = new Univer();
const injector = univer.__getInjector();
@@ -166,7 +165,7 @@ export function createWorksheetTestBed(workbookData?: IWorkbookData, dependencie
// load theme service
const themeService = injector.get(ThemeService);
const theme = themeService.getCurrentTheme();
- const newTheme = set(theme, 'black', '#35322b');
+ const newTheme = set(theme, 'gray.1000', '#35322b');
themeService.setTheme(newTheme);
// register builtin plugins
diff --git a/packages/sheets-filter-ui/src/views/components/SheetsFilterByColorsPanel.tsx b/packages/sheets-filter-ui/src/views/components/SheetsFilterByColorsPanel.tsx
index b1edeb5753..77975d298a 100644
--- a/packages/sheets-filter-ui/src/views/components/SheetsFilterByColorsPanel.tsx
+++ b/packages/sheets-filter-ui/src/views/components/SheetsFilterByColorsPanel.tsx
@@ -56,7 +56,7 @@ export function FilterByColor(props: { model: ByColorsModel }) {
<div
className={`
univer-mb-2 univer-text-sm univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
>
{localeService.t<LocaleKey>('sheets-filter-ui.panel.filter-by-cell-fill-color')}
@@ -78,7 +78,7 @@ export function FilterByColor(props: { model: ByColorsModel }) {
className={`
univer-size-6 univer-cursor-pointer univer-rounded-full
hover:univer-ring-2 hover:univer-ring-offset-2
- hover:univer-ring-offset-white
+ hover:univer-ring-offset-gray-0
`}
/>
)
@@ -90,7 +90,7 @@ export function FilterByColor(props: { model: ByColorsModel }) {
univer-rounded-full univer-border univer-border-solid
univer-border-transparent univer-bg-gray-300 univer-transition-shadow
hover:univer-ring-2 hover:univer-ring-offset-2
- hover:univer-ring-offset-white
+ hover:univer-ring-offset-gray-0
`)}
style={{ backgroundColor: color.color }}
/>
@@ -108,7 +108,7 @@ export function FilterByColor(props: { model: ByColorsModel }) {
<div
className={`
univer-mb-2 univer-text-sm univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
>
{localeService.t<LocaleKey>('sheets-filter-ui.panel.filter-by-cell-text-color')}
@@ -129,7 +129,7 @@ export function FilterByColor(props: { model: ByColorsModel }) {
univer-box-border univer-flex univer-size-full univer-cursor-pointer
univer-items-center univer-justify-center univer-rounded-full univer-border
univer-border-solid univer-border-[rgba(13,13,13,0.06)] univer-p-0.5
- hover:univer-ring-2 hover:univer-ring-offset-2 hover:univer-ring-offset-white
+ hover:univer-ring-2 hover:univer-ring-offset-2 hover:univer-ring-offset-gray-0
dark:!univer-border-[rgba(255,255,255,0.06)]
`}
>
@@ -164,7 +164,7 @@ function CheckedIcon() {
<div
className={`
univer-absolute -univer-bottom-0.5 -univer-right-0.5 univer-flex univer-size-3 univer-cursor-pointer
- univer-items-center univer-justify-center univer-rounded-full univer-bg-white
+ univer-items-center univer-justify-center univer-rounded-full univer-bg-gray-0
`}
>
<SuccessIcon
diff --git a/packages/sheets-filter-ui/src/views/components/SheetsFilterByValuesPanel.tsx b/packages/sheets-filter-ui/src/views/components/SheetsFilterByValuesPanel.tsx
index a435e00865..78b24ab154 100644
--- a/packages/sheets-filter-ui/src/views/components/SheetsFilterByValuesPanel.tsx
+++ b/packages/sheets-filter-ui/src/views/components/SheetsFilterByValuesPanel.tsx
@@ -101,7 +101,7 @@ export function FilterByValue(props: { model: ByValuesModel }) {
data-u-comp="sheets-filter-panel-values-item-text"
className={`
univer-mx-1 univer-inline-block univer-flex-shrink univer-truncate univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
>
{`${localeService.t<LocaleKey>('sheets-filter-ui.panel.select-all')}`}
@@ -133,7 +133,7 @@ export function FilterByValue(props: { model: ByValuesModel }) {
[&:hover_a]:univer-inline-block
hover:univer-bg-gray-50 univer-h-full
univer-text-gray-900 dark:hover:!univer-bg-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
attachRender={(item) => (
<div
diff --git a/packages/sheets-filter-ui/src/views/components/SheetsFilterPanel.tsx b/packages/sheets-filter-ui/src/views/components/SheetsFilterPanel.tsx
index 8f5f7b2dbf..03433d0d76 100644
--- a/packages/sheets-filter-ui/src/views/components/SheetsFilterPanel.tsx
+++ b/packages/sheets-filter-ui/src/views/components/SheetsFilterPanel.tsx
@@ -82,7 +82,7 @@ export function FilterPanel() {
data-u-comp="sheets-filter-panel"
className={`
univer-box-border univer-flex univer-max-h-[500px] univer-w-[400px] univer-flex-col univer-rounded-lg
- univer-bg-white univer-p-4 univer-shadow-lg
+ univer-bg-gray-0 univer-p-4 univer-shadow-lg
dark:!univer-border-gray-600 dark:!univer-bg-gray-700
`}
>
diff --git a/packages/sheets-filter/src/facade/__tests__/create-test-bed.ts b/packages/sheets-filter/src/facade/__tests__/create-test-bed.ts
index 6368fefe25..cd53be2dcf 100644
--- a/packages/sheets-filter/src/facade/__tests__/create-test-bed.ts
+++ b/packages/sheets-filter/src/facade/__tests__/create-test-bed.ts
@@ -98,7 +98,7 @@ export function createFacadeTestBed(workbookData?: IWorkbookData): ITestBed {
// load theme service
const themeService = injector.get(ThemeService);
const theme = themeService.getCurrentTheme();
- const newTheme = set(theme, 'black', '#35322b');
+ const newTheme = set(theme, 'gray.1000', '#35322b');
themeService.setTheme(newTheme);
// register builtin plugins
diff --git a/packages/sheets-filter/src/facade/__tests__/create-worksheet-test-bed.ts b/packages/sheets-filter/src/facade/__tests__/create-worksheet-test-bed.ts
index 8512569b1d..b976947fff 100644
--- a/packages/sheets-filter/src/facade/__tests__/create-worksheet-test-bed.ts
+++ b/packages/sheets-filter/src/facade/__tests__/create-worksheet-test-bed.ts
@@ -92,7 +92,7 @@ export function createWorksheetTestBed(workbookData?: IWorkbookData): ITestBed {
// load theme service
const themeService = injector.get(ThemeService);
const theme = themeService.getCurrentTheme();
- const newTheme = set(theme, 'black', '#35322b');
+ const newTheme = set(theme, 'gray.1000', '#35322b');
themeService.setTheme(newTheme);
// register builtin plugins
diff --git a/packages/sheets-formula-ui/src/common/selection.ts b/packages/sheets-formula-ui/src/common/selection.ts
index 02e556d23f..383bb6d7fd 100644
--- a/packages/sheets-formula-ui/src/common/selection.ts
+++ b/packages/sheets-formula-ui/src/common/selection.ts
@@ -31,6 +31,6 @@ export function genFormulaRefSelectionStyle(themeService: ThemeService, refColor
widgets: { tl: true, tc: true, tr: true, ml: true, mr: true, bl: true, bc: true, br: true },
widgetSize: 6,
widgetStrokeWidth: 1,
- widgetStroke: themeService.getColorFromTheme('white'),
+ widgetStroke: themeService.getColorFromTheme('gray.0'),
};
}
diff --git a/packages/sheets-formula-ui/src/controllers/__tests__/formula-auto-fill.controller.spec.ts b/packages/sheets-formula-ui/src/controllers/__tests__/formula-auto-fill.controller.spec.ts
index f88d7ee1b9..b3751b5afc 100644
--- a/packages/sheets-formula-ui/src/controllers/__tests__/formula-auto-fill.controller.spec.ts
+++ b/packages/sheets-formula-ui/src/controllers/__tests__/formula-auto-fill.controller.spec.ts
@@ -86,7 +86,7 @@ describe('Test auto fill with formula', () => {
commandService = get(ICommandService);
themeService = get(ThemeService);
const theme = themeService.getCurrentTheme();
- const newTheme = set(theme, 'black', '#35322b');
+ const newTheme = set(theme, 'gray.1000', '#35322b');
themeService.setTheme(newTheme);
get(AutoFillController);
diff --git a/packages/sheets-formula-ui/src/controllers/formula-editor-show.controller.ts b/packages/sheets-formula-ui/src/controllers/formula-editor-show.controller.ts
index e25d07c2fb..d214219483 100644
--- a/packages/sheets-formula-ui/src/controllers/formula-editor-show.controller.ts
+++ b/packages/sheets-formula-ui/src/controllers/formula-editor-show.controller.ts
@@ -220,7 +220,7 @@ export class FormulaEditorShowController extends Disposable implements IRenderMo
style: {
strokeWidth: 1,
stroke: this._themeService.getColorFromTheme('primary.600'),
- fill: new ColorKit(this._themeService.getColorFromTheme('white')).setAlpha(0).toString(),
+ fill: new ColorKit(this._themeService.getColorFromTheme('gray.0')).setAlpha(0).toString(),
widgets: {},
},
};
diff --git a/packages/sheets-formula-ui/src/views/formula-editor/help-function/HelpFunction.tsx b/packages/sheets-formula-ui/src/views/formula-editor/help-function/HelpFunction.tsx
index 6af0329449..a8bcab17c2 100644
--- a/packages/sheets-formula-ui/src/views/formula-editor/help-function/HelpFunction.tsx
+++ b/packages/sheets-formula-ui/src/views/formula-editor/help-function/HelpFunction.tsx
@@ -38,7 +38,7 @@ function Params({ className, title, value }: {
<div
className={clsx(`
univer-mb-2 univer-text-sm univer-font-medium univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`, className)}
>
{title}
@@ -125,7 +125,7 @@ export function HelpFunction(props: {
<div
className={clsx(`
univer-m-0 univer-box-border univer-w-[250px] univer-select-none univer-list-none
- univer-rounded-lg univer-bg-white univer-leading-5 univer-shadow-md univer-outline-none
+ univer-rounded-lg univer-bg-gray-0 univer-leading-5 univer-shadow-md univer-outline-none
dark:!univer-bg-gray-900
`, borderClassName)}
>
@@ -133,7 +133,7 @@ export function HelpFunction(props: {
className={clsx(`
univer-box-border univer-flex univer-items-center univer-justify-between univer-px-4
univer-py-3 univer-text-xs univer-font-medium univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`, borderTopClassName)}
style={{
overflowWrap: 'anywhere',
diff --git a/packages/sheets-formula-ui/src/views/formula-editor/help-function/HelpHiddenTip.tsx b/packages/sheets-formula-ui/src/views/formula-editor/help-function/HelpHiddenTip.tsx
index c9ed9ed3f0..035af7bf8c 100644
--- a/packages/sheets-formula-ui/src/views/formula-editor/help-function/HelpHiddenTip.tsx
+++ b/packages/sheets-formula-ui/src/views/formula-editor/help-function/HelpHiddenTip.tsx
@@ -20,7 +20,8 @@ export const HelpHiddenTip = ({ onClick }: { onClick: () => void }) => {
className={`
univer-z-[15] univer-box-border univer-h-[18px] univer-cursor-pointer univer-overflow-visible
univer-whitespace-nowrap univer-rounded-l univer-border univer-border-r-0 univer-border-gray-600
- univer-bg-primary-600 univer-p-0.5 univer-text-xs univer-font-bold univer-leading-[13px] univer-text-white
+ univer-bg-primary-600 univer-p-0.5 univer-text-xs univer-font-bold univer-leading-[13px]
+ univer-text-gray-0
`}
onClick={onClick}
>
diff --git a/packages/sheets-formula-ui/src/views/formula-editor/hooks/__tests__/formula-selection-business.spec.ts b/packages/sheets-formula-ui/src/views/formula-editor/hooks/__tests__/formula-selection-business.spec.ts
index bda94f7dc7..747243cea9 100644
--- a/packages/sheets-formula-ui/src/views/formula-editor/hooks/__tests__/formula-selection-business.spec.ts
+++ b/packages/sheets-formula-ui/src/views/formula-editor/hooks/__tests__/formula-selection-business.spec.ts
@@ -712,7 +712,7 @@ describe('formula highlight helpers', () => {
sheetSkeletonManagerService: {
getSkeleton: vi.fn(() => ({})),
} as any,
- themeService: { getColorFromTheme: vi.fn((key: string) => key === 'white' ? '#fff' : key) } as any,
+ themeService: { getColorFromTheme: vi.fn((key: string) => key === 'gray.0' ? '#fff' : key) } as any,
univerInstanceService: univerInstanceService as any,
});
@@ -756,7 +756,7 @@ describe('formula highlight helpers', () => {
sheetSkeletonManagerService: {
getSkeleton: vi.fn(() => ({})),
} as any,
- themeService: { getColorFromTheme: vi.fn((key: string) => key === 'white' ? '#fff' : key) } as any,
+ themeService: { getColorFromTheme: vi.fn((key: string) => key === 'gray.0' ? '#fff' : key) } as any,
univerInstanceService: { getUnit: vi.fn(() => workbook) } as any,
});
@@ -794,7 +794,7 @@ describe('formula highlight helpers', () => {
sheetSkeletonManagerService: {
getSkeleton: vi.fn(() => ({})),
} as any,
- themeService: { getColorFromTheme: vi.fn((key: string) => key === 'white' ? '#fff' : key) } as any,
+ themeService: { getColorFromTheme: vi.fn((key: string) => key === 'gray.0' ? '#fff' : key) } as any,
univerInstanceService: { getUnit: vi.fn(() => workbook) } as any,
});
diff --git a/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-highlight.ts b/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-highlight.ts
index 2bcfa5c79a..f2f7bed129 100644
--- a/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-highlight.ts
+++ b/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-highlight.ts
@@ -54,7 +54,6 @@ function isSameSelectionRange(left: IRange | undefined, right: IRange): boolean
(!left.unitId || !right.unitId || left.unitId === right.unitId);
}
-// eslint-disable-next-line complexity, max-lines-per-function
export function calcHighlightRanges(opts: {
unitId: string;
subUnitId: string;
@@ -330,7 +329,7 @@ export function useColor(): IColorMap {
].map((color) => themeService.isValidThemeColor(color) ? themeService.getColorFromTheme(color) : color);
const numberColor = themeService.getColorFromTheme('blue.700');
const stringColor = themeService.getColorFromTheme('jiqing.800');
- const plainTextColor = themeService.getColorFromTheme('black');
+ const plainTextColor = themeService.getColorFromTheme('gray.1000');
return { formulaRefColors, numberColor, stringColor, plainTextColor };
}, [theme]);
return result;
diff --git a/packages/sheets-formula-ui/src/views/formula-editor/search-function/SearchFunction.tsx b/packages/sheets-formula-ui/src/views/formula-editor/search-function/SearchFunction.tsx
index a4e7af343c..94fb7ef040 100644
--- a/packages/sheets-formula-ui/src/views/formula-editor/search-function/SearchFunction.tsx
+++ b/packages/sheets-formula-ui/src/views/formula-editor/search-function/SearchFunction.tsx
@@ -198,7 +198,7 @@ function SearchFunctionFactory(props: ISearchFunctionProps, ref: any) {
data-u-comp="sheets-formula-editor"
className={clsx(`
univer-m-0 univer-box-border univer-max-h-[400px] univer-w-[250px] univer-list-none
- univer-overflow-y-auto univer-rounded-lg univer-bg-white univer-p-2 univer-leading-5 univer-shadow-md
+ univer-overflow-y-auto univer-rounded-lg univer-bg-gray-0 univer-p-2 univer-leading-5 univer-shadow-md
univer-outline-none
dark:!univer-bg-gray-900
`, borderClassName, scrollbarClassName)}
@@ -209,7 +209,7 @@ function SearchFunctionFactory(props: ISearchFunctionProps, ref: any) {
className={clsx(`
univer-box-border univer-cursor-pointer univer-rounded univer-px-2 univer-py-1
univer-text-gray-900 univer-transition-colors
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`, {
'univer-bg-gray-200 dark:!univer-bg-gray-600': active === index,
})}
diff --git a/packages/sheets-formula-ui/src/views/more-functions/function-params/FunctionParams.tsx b/packages/sheets-formula-ui/src/views/more-functions/function-params/FunctionParams.tsx
index 2cf887471c..971ce9802f 100644
--- a/packages/sheets-formula-ui/src/views/more-functions/function-params/FunctionParams.tsx
+++ b/packages/sheets-formula-ui/src/views/more-functions/function-params/FunctionParams.tsx
@@ -39,7 +39,7 @@ export function FunctionParams(props: IParamsProps) {
<div
className={`
univer-break-all univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
>
{value}
diff --git a/packages/sheets-formula-ui/src/views/more-functions/select-function/SelectFunction.tsx b/packages/sheets-formula-ui/src/views/more-functions/select-function/SelectFunction.tsx
index a3badf334a..95d9312a77 100644
--- a/packages/sheets-formula-ui/src/views/more-functions/select-function/SelectFunction.tsx
+++ b/packages/sheets-formula-ui/src/views/more-functions/select-function/SelectFunction.tsx
@@ -186,7 +186,7 @@ export function SelectFunction(props: ISelectFunctionProps) {
className={clsx(`
univer-relative univer-box-border univer-cursor-pointer univer-rounded univer-px-7
univer-py-1 univer-text-sm univer-text-gray-900 univer-transition-colors
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`, {
'univer-bg-gray-200 dark:!univer-bg-gray-600': active === index,
})}
@@ -222,7 +222,7 @@ export function SelectFunction(props: ISelectFunctionProps) {
<div
className="
univer-text-sm univer-font-semibold univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
"
>
{functionInfo.functionName}
@@ -252,7 +252,7 @@ export function SelectFunction(props: ISelectFunctionProps) {
className={clsx(`
univer-mt-1.5 univer-break-words univer-rounded-md univer-bg-gray-50 univer-px-3
univer-py-2 univer-font-mono univer-text-xs univer-leading-5 univer-text-gray-900
- dark:!univer-bg-gray-800 dark:!univer-text-white
+ dark:!univer-bg-gray-800 dark:!univer-text-gray-0
`, borderClassName)}
>
<FunctionHelp
@@ -276,7 +276,7 @@ export function SelectFunction(props: ISelectFunctionProps) {
className={clsx(`
univer-mt-1.5 univer-break-words univer-rounded-md univer-bg-gray-50 univer-px-3
univer-py-2 univer-font-mono univer-text-xs univer-leading-5 univer-text-gray-900
- dark:!univer-bg-gray-800 dark:!univer-text-white
+ dark:!univer-bg-gray-800 dark:!univer-text-gray-0
`, borderClassName)}
>
{`${functionInfo.functionName}(${functionInfo.functionParameter
@@ -300,7 +300,7 @@ export function SelectFunction(props: ISelectFunctionProps) {
<span
className={`
univer-text-xs univer-font-medium univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
>
{item.name}
diff --git a/packages/sheets-formula/src/facade/__tests__/create-test-bed.ts b/packages/sheets-formula/src/facade/__tests__/create-test-bed.ts
index 6c2cac135d..e2499a2dea 100644
--- a/packages/sheets-formula/src/facade/__tests__/create-test-bed.ts
+++ b/packages/sheets-formula/src/facade/__tests__/create-test-bed.ts
@@ -170,7 +170,7 @@ export function createFacadeTestBed(workbookData?: IWorkbookData, dependencies?:
// load theme service
const themeService = injector.get(ThemeService);
const theme = themeService.getCurrentTheme();
- const newTheme = set(theme, 'black', '#35322b');
+ const newTheme = set(theme, 'gray.1000', '#35322b');
themeService.setTheme(newTheme);
// register builtin plugins
diff --git a/packages/sheets-hyper-link-ui/src/views/CellLinkEdit.tsx b/packages/sheets-hyper-link-ui/src/views/CellLinkEdit.tsx
index b071e9eaa7..e67944ce2f 100644
--- a/packages/sheets-hyper-link-ui/src/views/CellLinkEdit.tsx
+++ b/packages/sheets-hyper-link-ui/src/views/CellLinkEdit.tsx
@@ -427,7 +427,7 @@ export const CellLinkEdit = () => {
return (
<div
className={clsx(`
- univer-box-border univer-w-[296px] univer-rounded-xl univer-bg-white univer-p-4 univer-shadow-md
+ univer-box-border univer-w-[296px] univer-rounded-xl univer-bg-gray-0 univer-p-4 univer-shadow-md
dark:!univer-bg-gray-900
`, borderClassName)}
>
diff --git a/packages/sheets-hyper-link-ui/src/views/CellLinkPopup.tsx b/packages/sheets-hyper-link-ui/src/views/CellLinkPopup.tsx
index 6dc5c42b67..9e2c3d15b5 100644
--- a/packages/sheets-hyper-link-ui/src/views/CellLinkPopup.tsx
+++ b/packages/sheets-hyper-link-ui/src/views/CellLinkPopup.tsx
@@ -71,7 +71,7 @@ export const CellLinkPopupPure = (props: ICellLinkPopupPureProps) => {
<div
className={clsx(`
univer-mb-1 univer-flex univer-max-w-80 univer-flex-row univer-items-center univer-justify-between
- univer-gap-2 univer-overflow-hidden univer-rounded-lg univer-bg-white univer-p-2 univer-shadow-md
+ univer-gap-2 univer-overflow-hidden univer-rounded-lg univer-bg-gray-0 univer-p-2 univer-shadow-md
dark:!univer-bg-gray-900
`, borderClassName)}
onClick={() => popupService.hideCurrentPopup()}
@@ -93,7 +93,7 @@ export const CellLinkPopupPure = (props: ICellLinkPopupPureProps) => {
className={`
univer-flex univer-size-5 univer-flex-none univer-items-center univer-justify-center
univer-text-base univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
>
{iconsMap[linkObj.type]}
@@ -134,7 +134,7 @@ export const CellLinkPopupPure = (props: ICellLinkPopupPureProps) => {
}}
>
<Tooltip placement="bottom" title={localeService.t<LocaleKey>('sheets-hyper-link-ui.popup.copy')}>
- <CopyIcon className="dark:!univer-text-white" />
+ <CopyIcon className="dark:!univer-text-gray-0" />
</Tooltip>
</div>
)}
@@ -160,7 +160,7 @@ export const CellLinkPopupPure = (props: ICellLinkPopupPureProps) => {
}}
>
<Tooltip placement="bottom" title={localeService.t<LocaleKey>('sheets-hyper-link-ui.popup.edit')}>
- <WriteIcon className="dark:!univer-text-white" />
+ <WriteIcon className="dark:!univer-text-gray-0" />
</Tooltip>
</div>
<div
@@ -186,7 +186,7 @@ export const CellLinkPopupPure = (props: ICellLinkPopupPureProps) => {
}}
>
<Tooltip placement="bottom" title={localeService.t<LocaleKey>('sheets-hyper-link-ui.popup.cancel')}>
- <UnlinkIcon className="dark:!univer-text-white" />
+ <UnlinkIcon className="dark:!univer-text-gray-0" />
</Tooltip>
</div>
</>
diff --git a/packages/sheets-note-ui/src/views/Note.tsx b/packages/sheets-note-ui/src/views/Note.tsx
index 9ec6bf4823..7f0ddc7a01 100644
--- a/packages/sheets-note-ui/src/views/Note.tsx
+++ b/packages/sheets-note-ui/src/views/Note.tsx
@@ -157,7 +157,7 @@ function SheetsNoteContent({ activePopup }: { activePopup: INotePopupLocation })
ref={textareaRef}
data-u-comp="note-textarea"
className={clsx(`
- univer-ml-px univer-min-h-1 univer-min-w-1 univer-bg-white !univer-text-sm univer-shadow
+ univer-ml-px univer-min-h-1 univer-min-w-1 univer-bg-gray-0 !univer-text-sm univer-shadow
dark:!univer-bg-gray-800
`)}
value={note?.note}
diff --git a/packages/sheets-numfmt/src/facade/__tests__/create-test-bed.ts b/packages/sheets-numfmt/src/facade/__tests__/create-test-bed.ts
index 9e7fb06cb1..138154be89 100644
--- a/packages/sheets-numfmt/src/facade/__tests__/create-test-bed.ts
+++ b/packages/sheets-numfmt/src/facade/__tests__/create-test-bed.ts
@@ -131,7 +131,7 @@ export function createFacadeTestBed(workbookData?: IWorkbookData, dependencies?:
// load theme service
const themeService = injector.get(ThemeService);
const theme = themeService.getCurrentTheme();
- const newTheme = set(theme, 'black', '#35322b');
+ const newTheme = set(theme, 'gray.1000', '#35322b');
themeService.setTheme(newTheme);
// register builtin plugins
diff --git a/packages/sheets-sort-ui/src/views/CustomSortPanel.tsx b/packages/sheets-sort-ui/src/views/CustomSortPanel.tsx
index ce23520295..602d2f70a0 100644
--- a/packages/sheets-sort-ui/src/views/CustomSortPanel.tsx
+++ b/packages/sheets-sort-ui/src/views/CustomSortPanel.tsx
@@ -253,7 +253,7 @@ export function SortOptionItem(props: ISortOptionItemProps) {
univer-my-0 univer-box-border univer-grid univer-max-h-[310px]
univer-w-[--radix-popper-anchor-width] univer-items-center univer-gap-1
univer-overflow-y-auto univer-overflow-x-hidden univer-rounded-lg univer-border
- univer-bg-white univer-p-1 univer-text-base univer-shadow-lg
+ univer-bg-gray-0 univer-p-1 univer-text-base univer-shadow-lg
`, scrollbarClassName)}
>
{availableMenu.map((menuItem) => (
@@ -287,7 +287,7 @@ export function SortOptionItem(props: ISortOptionItemProps) {
className={clsx(`
univer-ml-2 univer-flex univer-w-full univer-items-center univer-justify-between
univer-overflow-hidden univer-rounded-md univer-py-1.5 univer-text-sm univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`)}
>
<span
diff --git a/packages/sheets-table-ui/src/views/components/SheetTableConditionPanel.tsx b/packages/sheets-table-ui/src/views/components/SheetTableConditionPanel.tsx
index 703536eed8..e833ddf14c 100644
--- a/packages/sheets-table-ui/src/views/components/SheetTableConditionPanel.tsx
+++ b/packages/sheets-table-ui/src/views/components/SheetTableConditionPanel.tsx
@@ -109,11 +109,11 @@ export const SheetTableConditionPanel = (props: IConditionFilterProps) => {
<div
className={clsx(`
univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-between
- univer-rounded-md univer-bg-white univer-px-2 univer-text-sm univer-transition-colors
+ univer-rounded-md univer-bg-gray-0 univer-px-2 univer-text-sm univer-transition-colors
univer-duration-200
hover:univer-border-primary-600
focus:univer-border-primary-600 focus:univer-outline-none focus:univer-ring-2
- dark:!univer-bg-gray-700 dark:!univer-text-white
+ dark:!univer-bg-gray-700 dark:!univer-text-gray-0
`, borderClassName)}
>
<span>
diff --git a/packages/sheets-table-ui/src/views/components/SheetTableFilterPanel.tsx b/packages/sheets-table-ui/src/views/components/SheetTableFilterPanel.tsx
index 15f69a572d..39d92bd177 100644
--- a/packages/sheets-table-ui/src/views/components/SheetTableFilterPanel.tsx
+++ b/packages/sheets-table-ui/src/views/components/SheetTableFilterPanel.tsx
@@ -201,7 +201,7 @@ export function SheetTableFilterPanel() {
return (
<div
className={`
- univer-box-border univer-flex univer-w-[400px] univer-flex-col univer-rounded-[10px] univer-bg-white
+ univer-box-border univer-flex univer-w-[400px] univer-flex-col univer-rounded-[10px] univer-bg-gray-0
univer-p-4 univer-shadow-lg
dark:!univer-border-gray-600 dark:!univer-bg-gray-700
`}
@@ -222,7 +222,7 @@ export function SheetTableFilterPanel() {
univer-text-left univer-text-sm univer-text-gray-900
hover:univer-bg-gray-100
disabled:univer-cursor-not-allowed disabled:univer-text-gray-400
- dark:!univer-text-white
+ dark:!univer-text-gray-0
dark:hover:!univer-bg-gray-600
`}
onClick={() => insertColumn('left')}
@@ -238,7 +238,7 @@ export function SheetTableFilterPanel() {
univer-text-left univer-text-sm univer-text-gray-900
hover:univer-bg-gray-100
disabled:univer-cursor-not-allowed disabled:univer-text-gray-400
- dark:!univer-text-white
+ dark:!univer-text-gray-0
dark:hover:!univer-bg-gray-600
`}
onClick={() => insertColumn('right')}
@@ -254,7 +254,7 @@ export function SheetTableFilterPanel() {
univer-text-left univer-text-sm univer-text-gray-900
hover:univer-bg-gray-100
disabled:univer-cursor-not-allowed disabled:univer-text-gray-400
- dark:!univer-text-white
+ dark:!univer-text-gray-0
dark:hover:!univer-bg-gray-600
`}
disabled={!canDeleteColumn}
diff --git a/packages/sheets-table-ui/src/views/components/SheetTableThemePanel.tsx b/packages/sheets-table-ui/src/views/components/SheetTableThemePanel.tsx
index 6cb7689049..ac7bfb4a12 100644
--- a/packages/sheets-table-ui/src/views/components/SheetTableThemePanel.tsx
+++ b/packages/sheets-table-ui/src/views/components/SheetTableThemePanel.tsx
@@ -233,7 +233,7 @@ export const SheetTableThemePanel = (props: ISheetTableThemePanelProps) => {
aria-pressed={selected}
className={clsx(`
univer-flex univer-h-12 univer-w-full univer-cursor-pointer univer-flex-col
- univer-overflow-hidden univer-rounded-lg univer-bg-white univer-p-1 univer-shadow-sm
+ univer-overflow-hidden univer-rounded-lg univer-bg-gray-0 univer-p-1 univer-shadow-sm
univer-transition-all
hover:univer-border-gray-400 hover:univer-shadow-md
focus:univer-outline-none focus:univer-ring-2 focus:univer-ring-primary-200
@@ -281,7 +281,7 @@ export const SheetTableThemePanel = (props: ISheetTableThemePanelProps) => {
className="
univer-flex univer-h-12 univer-w-full univer-cursor-pointer univer-items-center
univer-justify-center univer-rounded-lg univer-border univer-border-dashed
- univer-border-gray-300 univer-bg-white univer-p-0 univer-text-gray-500
+ univer-border-gray-300 univer-bg-gray-0 univer-p-0 univer-text-gray-500
univer-transition-colors
hover:univer-border-primary-500 hover:univer-text-primary-600
focus:univer-outline-none focus:univer-ring-2 focus:univer-ring-primary-200
@@ -310,7 +310,7 @@ export const SheetTableThemePanel = (props: ISheetTableThemePanelProps) => {
aria-pressed={selected}
className={clsx(`
univer-flex univer-size-full univer-cursor-pointer univer-flex-col
- univer-overflow-hidden univer-rounded-lg univer-bg-white univer-p-1
+ univer-overflow-hidden univer-rounded-lg univer-bg-gray-0 univer-p-1
univer-shadow-sm univer-transition-all
hover:univer-border-gray-400 hover:univer-shadow-md
focus:univer-outline-none focus:univer-ring-2 focus:univer-ring-primary-200
@@ -339,7 +339,7 @@ export const SheetTableThemePanel = (props: ISheetTableThemePanelProps) => {
univer-absolute univer-right-[-6px] univer-top-[-6px] univer-z-10 univer-flex
univer-size-5 univer-cursor-pointer univer-items-center univer-justify-center
univer-rounded-full univer-border univer-border-solid univer-border-gray-200
- univer-bg-white univer-p-0 univer-text-gray-500 univer-shadow-sm
+ univer-bg-gray-0 univer-p-0 univer-text-gray-500 univer-shadow-sm
univer-transition-all
hover:univer-border-red-200 hover:univer-bg-red-50 hover:univer-text-red-600
focus:univer-opacity-100 focus:univer-outline-none focus:univer-ring-2
@@ -377,7 +377,7 @@ export const SheetTableThemePanel = (props: ISheetTableThemePanelProps) => {
univer-px-3 univer-text-sm univer-font-medium
rtl:univer-text-right
`, borderClassName, {
- 'univer-text-white': row.isDark,
+ 'univer-text-gray-0': row.isDark,
'univer-text-gray-900': !row.isDark,
})}
style={{ background: row.background }}
@@ -399,7 +399,7 @@ export const SheetTableThemePanel = (props: ISheetTableThemePanelProps) => {
aria-label={`${row.label} ${localeService.t<LocaleKey>('sheets-table-ui.setTheme')}`}
className={clsx(`
univer-flex univer-h-10 univer-cursor-pointer univer-items-center univer-gap-2
- univer-rounded-md univer-bg-white univer-px-2 univer-text-gray-600
+ univer-rounded-md univer-bg-gray-0 univer-px-2 univer-text-gray-600
univer-transition-colors
hover:univer-bg-gray-100
focus:univer-outline-none focus:univer-ring-2 focus:univer-ring-primary-200
diff --git a/packages/sheets-table/src/controllers/__tests__/sheet-table-formula.integration.spec.ts b/packages/sheets-table/src/controllers/__tests__/sheet-table-formula.integration.spec.ts
index 7d273ee134..d51f205878 100644
--- a/packages/sheets-table/src/controllers/__tests__/sheet-table-formula.integration.spec.ts
+++ b/packages/sheets-table/src/controllers/__tests__/sheet-table-formula.integration.spec.ts
@@ -160,7 +160,7 @@ function createFacadeTestBed(workbookData: IWorkbookData, dependencies: Dependen
const themeService = injector.get(ThemeService);
const theme = themeService.getCurrentTheme();
- const newTheme = set(theme, 'black', '#35322b');
+ const newTheme = set(theme, 'gray.1000', '#35322b');
themeService.setTheme(newTheme);
univer.registerPlugin(TestPlugin);
diff --git a/packages/sheets-ui/src/commands/commands/__tests__/auto-fill.controller.spec.ts b/packages/sheets-ui/src/commands/commands/__tests__/auto-fill.controller.spec.ts
index 28ba7bd863..8dfb003d08 100644
--- a/packages/sheets-ui/src/commands/commands/__tests__/auto-fill.controller.spec.ts
+++ b/packages/sheets-ui/src/commands/commands/__tests__/auto-fill.controller.spec.ts
@@ -365,7 +365,7 @@ describe('Test auto fill rules in controller', () => {
commandService = get(ICommandService);
themeService = get(ThemeService);
const theme = themeService.getCurrentTheme();
- const newTheme = set(theme, 'black', '#35322b');
+ const newTheme = set(theme, 'gray.1000', '#35322b');
themeService.setTheme(newTheme);
get(AutoFillUIController);
diff --git a/packages/sheets-ui/src/commands/commands/__tests__/set-format-painter.command.spec.ts b/packages/sheets-ui/src/commands/commands/__tests__/set-format-painter.command.spec.ts
index b65e045642..8484068f46 100644
--- a/packages/sheets-ui/src/commands/commands/__tests__/set-format-painter.command.spec.ts
+++ b/packages/sheets-ui/src/commands/commands/__tests__/set-format-painter.command.spec.ts
@@ -223,7 +223,7 @@ describe('Test format painter rules in controller', () => {
commandService = get(ICommandService);
themeService = get(ThemeService);
const theme = themeService.getCurrentTheme();
- const newTheme = set(theme, 'black', '#35322b');
+ const newTheme = set(theme, 'gray.1000', '#35322b');
themeService.setTheme(newTheme);
get(FormatPainterController);
diff --git a/packages/sheets-ui/src/facade/__tests__/create-test-bed.ts b/packages/sheets-ui/src/facade/__tests__/create-test-bed.ts
index 14b1256fb1..bb26b7ed07 100644
--- a/packages/sheets-ui/src/facade/__tests__/create-test-bed.ts
+++ b/packages/sheets-ui/src/facade/__tests__/create-test-bed.ts
@@ -140,7 +140,7 @@ export function createFacadeTestBed(workbookData?: IWorkbookData, dependencies?:
// load theme service
const themeService = injector.get(ThemeService);
const theme = themeService.getCurrentTheme();
- const newTheme = set(theme, 'black', '#35322b');
+ const newTheme = set(theme, 'gray.1000', '#35322b');
themeService.setTheme(newTheme);
// register builtin plugins
diff --git a/packages/sheets-ui/src/services/clipboard/__tests__/clipboard-copy-filter.spec.ts b/packages/sheets-ui/src/services/clipboard/__tests__/clipboard-copy-filter.spec.ts
index 27fc36a7ed..c1210413c0 100644
--- a/packages/sheets-ui/src/services/clipboard/__tests__/clipboard-copy-filter.spec.ts
+++ b/packages/sheets-ui/src/services/clipboard/__tests__/clipboard-copy-filter.spec.ts
@@ -97,7 +97,7 @@ describe('Test clipboard', () => {
themeService = get(ThemeService);
const theme = themeService.getCurrentTheme();
- const newTheme = set(theme, 'black', '#35322b');
+ const newTheme = set(theme, 'gray.1000', '#35322b');
themeService.setTheme(newTheme);
getValues = (
startRow: number,
diff --git a/packages/sheets-ui/src/services/clipboard/__tests__/clipboard-copy-with-default-style.spec.ts b/packages/sheets-ui/src/services/clipboard/__tests__/clipboard-copy-with-default-style.spec.ts
index bfa1054e5c..5b276eca5c 100644
--- a/packages/sheets-ui/src/services/clipboard/__tests__/clipboard-copy-with-default-style.spec.ts
+++ b/packages/sheets-ui/src/services/clipboard/__tests__/clipboard-copy-with-default-style.spec.ts
@@ -123,7 +123,7 @@ describe('Test clipboard', () => {
themeService = get(ThemeService);
const theme = themeService.getCurrentTheme();
- const newTheme = set(theme, 'black', '#35322b');
+ const newTheme = set(theme, 'gray.1000', '#35322b');
themeService.setTheme(newTheme);
});
diff --git a/packages/sheets-ui/src/services/selection/__tests__/mobile-selection-render.service.spec.ts b/packages/sheets-ui/src/services/selection/__tests__/mobile-selection-render.service.spec.ts
index a82f9dc450..7fb9cb4022 100644
--- a/packages/sheets-ui/src/services/selection/__tests__/mobile-selection-render.service.spec.ts
+++ b/packages/sheets-ui/src/services/selection/__tests__/mobile-selection-render.service.spec.ts
@@ -34,7 +34,7 @@ import { MobileSelectionControl } from '../mobile-selection-shape';
class TestThemeService {
getColorFromTheme(key: string) {
- return key === 'white' ? '#ffffff' : '#3b82f6';
+ return key === 'gray.0' ? '#ffffff' : '#3b82f6';
}
}
diff --git a/packages/sheets-ui/src/services/selection/__tests__/selection-control.spec.ts b/packages/sheets-ui/src/services/selection/__tests__/selection-control.spec.ts
index faf0e92c14..9add546e3c 100644
--- a/packages/sheets-ui/src/services/selection/__tests__/selection-control.spec.ts
+++ b/packages/sheets-ui/src/services/selection/__tests__/selection-control.spec.ts
@@ -109,7 +109,7 @@ function createFakeScene() {
function createFakeThemeService() {
return {
- getColorFromTheme: (key: string) => (key === 'white' ? '#ffffff' : '#3b82f6'),
+ getColorFromTheme: (key: string) => (key === 'gray.0' ? '#ffffff' : '#3b82f6'),
} as unknown as ThemeService;
}
diff --git a/packages/sheets-ui/src/services/selection/const.ts b/packages/sheets-ui/src/services/selection/const.ts
index c88e084f61..4db23ad403 100644
--- a/packages/sheets-ui/src/services/selection/const.ts
+++ b/packages/sheets-ui/src/services/selection/const.ts
@@ -29,7 +29,7 @@ export enum SELECTION_SHAPE_DEPTH {
export function genNormalSelectionStyle(themeService: ThemeService): ISelectionStyle {
const primaryColor = themeService.getColorFromTheme('primary.600');
- const whiteColor = themeService.getColorFromTheme('white');
+ const gray0Color = themeService.getColorFromTheme('gray.0');
const fill = new ColorKit(primaryColor).setAlpha(0.07).toRgbString();
return {
strokeWidth: 1,
@@ -39,11 +39,11 @@ export function genNormalSelectionStyle(themeService: ThemeService): ISelectionS
widgets: {},
widgetSize: 6,
widgetStrokeWidth: 1,
- widgetStroke: whiteColor,
+ widgetStroke: gray0Color,
autofillSize: 6,
autofillStrokeWidth: 1,
- autofillStroke: whiteColor,
+ autofillStroke: gray0Color,
rowHeaderFill: fill,
rowHeaderStroke: primaryColor,
diff --git a/packages/sheets-ui/src/views/auto-fill-popup-menu/AutoFillPopupMenu.tsx b/packages/sheets-ui/src/views/auto-fill-popup-menu/AutoFillPopupMenu.tsx
index 144c0d136c..17ee48cf08 100644
--- a/packages/sheets-ui/src/views/auto-fill-popup-menu/AutoFillPopupMenu.tsx
+++ b/packages/sheets-ui/src/views/auto-fill-popup-menu/AutoFillPopupMenu.tsx
@@ -191,16 +191,16 @@ export function AutoFillPopupMenu() {
dark:hover:!univer-bg-gray-800
`, borderClassName, {
'univer-bg-gray-100 dark:!univer-bg-gray-800': visible,
- 'univer-bg-white dark:!univer-bg-gray-900': !visible,
+ 'univer-bg-gray-0 dark:!univer-bg-gray-900': !visible,
})}
>
<AutofillDoubleIcon
className={`
univer-fill-primary-600 univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
/>
- {showMore && <MoreDownIcon className="dark:!univer-text-white" />}
+ {showMore && <MoreDownIcon className="dark:!univer-text-gray-0" />}
</div>
</DropdownMenu>
</div>
diff --git a/packages/sheets-ui/src/views/border-panel/BorderPanel.tsx b/packages/sheets-ui/src/views/border-panel/BorderPanel.tsx
index 0bf9227153..47956f7d5d 100644
--- a/packages/sheets-ui/src/views/border-panel/BorderPanel.tsx
+++ b/packages/sheets-ui/src/views/border-panel/BorderPanel.tsx
@@ -119,11 +119,11 @@ export function BorderPanel(props: IBorderPanelProps) {
<PaintBucketDoubleIcon
className={`
univer-fill-primary-600
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
extend={{ colorChannel1: value?.color ?? '' }}
/>
- <MoreDownIcon className="dark:!univer-text-white" />
+ <MoreDownIcon className="dark:!univer-text-gray-0" />
</button>
</Dropdown>
</div>
@@ -152,7 +152,7 @@ export function BorderPanel(props: IBorderPanelProps) {
<BorderLine
className={`
univer-ml-6 univer-fill-gray-900
- dark:!univer-fill-white
+ dark:!univer-fill-gray-0
`}
type={item.value}
/>
@@ -174,11 +174,11 @@ export function BorderPanel(props: IBorderPanelProps) {
<BorderLine
className={`
univer-fill-gray-900
- dark:!univer-fill-white
+ dark:!univer-fill-gray-0
`}
type={type ?? BorderStyleTypes.THIN}
/>
- <MoreDownIcon className="dark:!univer-text-white" />
+ <MoreDownIcon className="dark:!univer-text-gray-0" />
</button>
</Dropdown>
</div>
diff --git a/packages/sheets-ui/src/views/cell-alert/CellAlertPopup.tsx b/packages/sheets-ui/src/views/cell-alert/CellAlertPopup.tsx
index e01bed03ec..86664b2185 100644
--- a/packages/sheets-ui/src/views/cell-alert/CellAlertPopup.tsx
+++ b/packages/sheets-ui/src/views/cell-alert/CellAlertPopup.tsx
@@ -56,7 +56,7 @@ export function CellAlert({ popup }: { popup: ICanvasPopup }) {
type: 'custom',
className: `
univer-px-2 univer-py-1.5 univer-font-medium univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`,
children: message,
},
@@ -76,7 +76,7 @@ export function CellAlert({ popup }: { popup: ICanvasPopup }) {
aria-label={accessibleLabel || undefined}
className={`
univer-flex univer-items-center univer-gap-1 univer-rounded univer-border univer-border-solid
- univer-border-gray-200 univer-bg-white univer-p-1 univer-shadow
+ univer-border-gray-200 univer-bg-gray-0 univer-p-1 univer-shadow
hover:univer-bg-gray-100
dark:!univer-border-gray-600 dark:!univer-bg-gray-900
dark:hover:!univer-bg-gray-800
@@ -106,9 +106,9 @@ export function CellAlert({ popup }: { popup: ICanvasPopup }) {
return (
<div
className={`
- univer-z-[100] univer-box-border univer-w-[156px] univer-rounded-lg univer-bg-white univer-px-2
+ univer-z-[100] univer-box-border univer-w-[156px] univer-rounded-lg univer-bg-gray-0 univer-px-2
univer-py-1 univer-text-gray-900 univer-shadow
- dark:!univer-bg-black dark:!univer-text-white
+ dark:!univer-bg-gray-1000 dark:!univer-text-gray-0
`}
>
<div
diff --git a/packages/sheets-ui/src/views/clipboard/ClipboardPopupMenu.tsx b/packages/sheets-ui/src/views/clipboard/ClipboardPopupMenu.tsx
index 8761c520ff..ac1a9b712d 100644
--- a/packages/sheets-ui/src/views/clipboard/ClipboardPopupMenu.tsx
+++ b/packages/sheets-ui/src/views/clipboard/ClipboardPopupMenu.tsx
@@ -164,16 +164,16 @@ export const ClipboardPopupMenu = () => {
dark:hover:!univer-bg-gray-800
`, borderClassName, {
'univer-bg-gray-100 dark:!univer-bg-gray-800': visible,
- 'univer-bg-white dark:!univer-bg-gray-900': !visible,
+ 'univer-bg-gray-0 dark:!univer-bg-gray-900': !visible,
})}
>
<PasteSpecialDoubleIcon
className={`
univer-fill-primary-600 univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
/>
- {showMore && <MoreDownIcon className="dark:!univer-text-white" />}
+ {showMore && <MoreDownIcon className="dark:!univer-text-gray-0" />}
</div>
</DropdownMenu>
</div>
diff --git a/packages/sheets-ui/src/views/defined-name/DefinedName.tsx b/packages/sheets-ui/src/views/defined-name/DefinedName.tsx
index c1b37da945..67f76cdd6e 100644
--- a/packages/sheets-ui/src/views/defined-name/DefinedName.tsx
+++ b/packages/sheets-ui/src/views/defined-name/DefinedName.tsx
@@ -296,7 +296,7 @@ export function DefinedName({ disable }: { disable: boolean }) {
univer-pr-5 univer-text-gray-900
focus:univer-outline-none
rtl:univer-pl-5 rtl:univer-pr-1.5
- dark:!univer-border-r-gray-700 dark:!univer-text-white
+ dark:!univer-border-r-gray-700 dark:!univer-text-gray-0
`, borderRightClassName, {
'univer-cursor-not-allowed': disable,
})}
@@ -324,7 +324,7 @@ export function DefinedName({ disable }: { disable: boolean }) {
univer-items-center univer-justify-center univer-px-1 univer-transition-colors univer-duration-200
hover:univer-bg-gray-100
rtl:univer-left-0 rtl:univer-right-auto
- dark:!univer-text-white
+ dark:!univer-text-gray-0
dark:hover:!univer-bg-gray-800
`, {
'univer-cursor-not-allowed univer-text-gray-300 hover:univer-bg-transparent dark:!univer-text-gray-700': disable,
diff --git a/packages/sheets-ui/src/views/defined-name/DefinedNameContainer.tsx b/packages/sheets-ui/src/views/defined-name/DefinedNameContainer.tsx
index 6f6db3f679..e15f1fb646 100644
--- a/packages/sheets-ui/src/views/defined-name/DefinedNameContainer.tsx
+++ b/packages/sheets-ui/src/views/defined-name/DefinedNameContainer.tsx
@@ -298,7 +298,7 @@ export const DefinedNameContainer = () => {
className={`
univer-my-1 univer-max-h-[100px] univer-max-w-[190px] univer-truncate
univer-text-sm univer-font-medium univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
>
{definedName.name}
diff --git a/packages/sheets-ui/src/views/defined-name/DefinedNameInput.tsx b/packages/sheets-ui/src/views/defined-name/DefinedNameInput.tsx
index f5e1c3b1dc..f0c6d5ce10 100644
--- a/packages/sheets-ui/src/views/defined-name/DefinedNameInput.tsx
+++ b/packages/sheets-ui/src/views/defined-name/DefinedNameInput.tsx
@@ -228,9 +228,9 @@ function DefinedNameInputContent(props: IDefinedNameInputProps) {
ref={formulaEditorRef}
className={clsx(`
univer-box-border univer-h-8 univer-w-full univer-cursor-pointer univer-items-center
- univer-rounded-lg univer-bg-white univer-pt-2 univer-transition-colors
+ univer-rounded-lg univer-bg-gray-0 univer-pt-2 univer-transition-colors
hover:univer-border-primary-600
- dark:!univer-bg-gray-700 dark:!univer-text-white
+ dark:!univer-bg-gray-700 dark:!univer-text-gray-0
[&>div:first-child]:univer-px-2.5
[&>div]:univer-h-5 [&>div]:univer-ring-transparent
`, borderClassName)}
diff --git a/packages/sheets-ui/src/views/dropdown/DateDropdown.tsx b/packages/sheets-ui/src/views/dropdown/DateDropdown.tsx
index d81f52dde4..e24fefe20b 100644
--- a/packages/sheets-ui/src/views/dropdown/DateDropdown.tsx
+++ b/packages/sheets-ui/src/views/dropdown/DateDropdown.tsx
@@ -52,8 +52,8 @@ export function DateDropdown(props: {
return (
<div
className={`
- univer-rounded univer-bg-white univer-p-2 univer-shadow-lg
- dark:!univer-bg-black
+ univer-rounded univer-bg-gray-0 univer-p-2 univer-shadow-lg
+ dark:!univer-bg-gray-1000
`}
>
{patternType === 'time'
diff --git a/packages/sheets-ui/src/views/dropdown/ListDropDown.tsx b/packages/sheets-ui/src/views/dropdown/ListDropDown.tsx
index c5a3a90b21..7495446fb7 100644
--- a/packages/sheets-ui/src/views/dropdown/ListDropDown.tsx
+++ b/packages/sheets-ui/src/views/dropdown/ListDropDown.tsx
@@ -104,8 +104,8 @@ function SelectList(props: ISelectListProps) {
<div
data-u-comp="sheets-dropdown-list"
className={clsx(`
- univer-box-border univer-rounded-lg univer-bg-white univer-py-1 univer-text-gray-900 univer-shadow
- dark:!univer-bg-black dark:!univer-text-white
+ univer-box-border univer-rounded-lg univer-bg-gray-0 univer-py-1 univer-text-gray-900 univer-shadow
+ dark:!univer-bg-gray-1000 dark:!univer-text-gray-0
`, borderClassName)}
style={style}
>
@@ -114,10 +114,10 @@ function SelectList(props: ISelectListProps) {
<input
ref={searchRef}
className={clsx(`
- univer-w-full univer-rounded-md univer-bg-white univer-px-2 univer-py-1 univer-text-sm
+ univer-w-full univer-rounded-md univer-bg-gray-0 univer-px-2 univer-py-1 univer-text-sm
univer-text-gray-900
focus:univer-border-primary-500 focus:univer-outline-none
- dark:!univer-bg-black dark:!univer-text-white
+ dark:!univer-bg-gray-1000 dark:!univer-text-gray-0
`, borderClassName)}
type="text"
value={lowerFilter}
@@ -182,7 +182,7 @@ function SelectList(props: ISelectListProps) {
univer-rounded-full univer-px-1.5 univer-text-xs
`, {
'univer-text-gray-900': isThemeColor || !isDark,
- 'univer-text-white': !isThemeColor && isDark,
+ 'univer-text-gray-0': !isThemeColor && isDark,
})}
style={{ background: backgroundColor }}
>
diff --git a/packages/sheets-ui/src/views/editor-container/EditorContainer.tsx b/packages/sheets-ui/src/views/editor-container/EditorContainer.tsx
index b1c8a5c318..ab2e43198b 100644
--- a/packages/sheets-ui/src/views/editor-container/EditorContainer.tsx
+++ b/packages/sheets-ui/src/views/editor-container/EditorContainer.tsx
@@ -77,7 +77,7 @@ const EDITOR_DEFAULT_POSITION = {
};
const CELL_EDITOR_DARK_SURFACE_THEME_COLOR = 'gray.800';
-const CELL_EDITOR_LIGHT_SURFACE_THEME_COLOR = 'white';
+const CELL_EDITOR_LIGHT_SURFACE_THEME_COLOR = 'gray.0';
interface ICellEditorHostBackgroundOptions {
darkMode?: boolean;
@@ -707,7 +707,7 @@ export function EditorContainer() {
"
style={{
backgroundColor: editorBorderColor,
- color: themeService.getColorFromTheme('white'),
+ color: themeService.getColorFromTheme('gray.0'),
transform: 'translateY(-100%)',
}}
>
diff --git a/packages/sheets-ui/src/views/formula-bar/FormulaBar.tsx b/packages/sheets-ui/src/views/formula-bar/FormulaBar.tsx
index 3eb7300f4b..24bae1d268 100644
--- a/packages/sheets-ui/src/views/formula-bar/FormulaBar.tsx
+++ b/packages/sheets-ui/src/views/formula-bar/FormulaBar.tsx
@@ -300,7 +300,7 @@ export function FormulaBar(props: IProps) {
dir="ltr"
data-u-comp="formula-bar"
className={clsx(`
- univer-box-border univer-flex univer-bg-white univer-text-gray-900 univer-transition-[height]
+ univer-box-border univer-flex univer-bg-gray-0 univer-text-gray-900 univer-transition-[height]
univer-ease-linear
dark:!univer-bg-gray-800
`, borderBottomClassName, className, {
@@ -326,7 +326,7 @@ export function FormulaBar(props: IProps) {
className={clsx(`
univer-flex univer-items-center univer-justify-center univer-rounded univer-p-1
univer-text-base
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`, {
'univer-cursor-pointer univer-text-red-600 hover:univer-bg-gray-100 dark:!univer-text-green-400 dark:hover:!univer-bg-gray-700': iconActivated,
})}
@@ -338,7 +338,7 @@ export function FormulaBar(props: IProps) {
className={clsx(`
univer-flex univer-items-center univer-justify-center univer-rounded univer-p-1
univer-text-base
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`, {
'univer-cursor-pointer univer-text-green-600 hover:univer-bg-gray-100 dark:!univer-text-red-400 dark:hover:!univer-bg-gray-700': iconActivated,
})}
@@ -351,7 +351,7 @@ export function FormulaBar(props: IProps) {
univer-flex univer-cursor-pointer univer-items-center univer-justify-center univer-rounded
univer-p-1 univer-text-base
hover:univer-bg-gray-100
- dark:!univer-text-white
+ dark:!univer-text-gray-0
dark:hover:!univer-bg-gray-700
`}
onClick={handlerFxBtnClick}
@@ -365,7 +365,7 @@ export function FormulaBar(props: IProps) {
<div
ref={ref}
className="
- univer-relative univer-flex-1 univer-bg-white
+ univer-relative univer-flex-1 univer-bg-gray-0
dark:!univer-bg-gray-800
"
onPointerDown={handlePointerDown}
@@ -404,7 +404,7 @@ export function FormulaBar(props: IProps) {
<div
className={`
univer-pointer-events-none univer-relative univer-left-0 univer-top-0 univer-z-[100]
- univer-size-full univer-cursor-not-allowed univer-bg-white
+ univer-size-full univer-cursor-not-allowed univer-bg-gray-0
dark:!univer-bg-gray-800
`}
/>
diff --git a/packages/sheets-ui/src/views/mobile/sheet-bar/MobileSheetBar.tsx b/packages/sheets-ui/src/views/mobile/sheet-bar/MobileSheetBar.tsx
index 4247403cb8..e3d253878a 100644
--- a/packages/sheets-ui/src/views/mobile/sheet-bar/MobileSheetBar.tsx
+++ b/packages/sheets-ui/src/views/mobile/sheet-bar/MobileSheetBar.tsx
@@ -139,7 +139,7 @@ function MobileSheetBarImpl(props: { workbook: Workbook }) {
univer-truncate univer-px-1 univer-py-0.5 univer-text-sm univer-font-medium univer-leading-6
univer-transition-all
`, borderRightClassName, {
- 'univer-bg-white univer-text-blue-600 dark:!univer-bg-gray-700 dark:!univer-text-blue-400': sheet.sheetId === activeKey,
+ 'univer-bg-gray-0 univer-text-blue-600 dark:!univer-bg-gray-700 dark:!univer-text-blue-400': sheet.sheetId === activeKey,
'univer-text-gray-600 hover:univer-bg-gray-50 active:univer-bg-gray-100 dark:!univer-text-gray-300 dark:hover:!univer-bg-gray-700': sheet.sheetId !== activeKey,
})}
key={sheet.sheetId}
diff --git a/packages/sheets-ui/src/views/permission/SheetPermissionPanelList.tsx b/packages/sheets-ui/src/views/permission/SheetPermissionPanelList.tsx
index 5ba9873f8f..0a7c982ba7 100644
--- a/packages/sheets-ui/src/views/permission/SheetPermissionPanelList.tsx
+++ b/packages/sheets-ui/src/views/permission/SheetPermissionPanelList.tsx
@@ -344,7 +344,7 @@ function SheetPermissionPanelListContent() {
<span
className={`
univer-h-4 univer-flex-grow univer-text-xs univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
>
{localeService.t<LocaleKey>('sheets-ui.permission.panel.created')}
@@ -352,7 +352,7 @@ function SheetPermissionPanelListContent() {
<span
className={`
univer-h-4 univer-text-xs univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
>
{editPermission ? `${localeService.t<LocaleKey>('sheets-ui.permission.panel.iCanEdit')}` : `${localeService.t<LocaleKey>('sheets-ui.permission.panel.iCanNotEdit')}`}
@@ -363,7 +363,7 @@ function SheetPermissionPanelListContent() {
<span
className={`
univer-h-4 univer-flex-grow univer-text-xs univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
>
{localeService.t<LocaleKey>('sheets-ui.permission.panel.viewPermission')}
@@ -371,7 +371,7 @@ function SheetPermissionPanelListContent() {
<span
className={`
univer-h-4 univer-text-xs univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
>
{viewPermission ? `${localeService.t<LocaleKey>('sheets-ui.permission.panel.iCanView')}` : `${localeService.t<LocaleKey>('sheets-ui.permission.panel.iCanNotView')}`}
diff --git a/packages/sheets-ui/src/views/permission/Spin.tsx b/packages/sheets-ui/src/views/permission/Spin.tsx
index ee74ea8e8d..69cc0ea4ce 100644
--- a/packages/sheets-ui/src/views/permission/Spin.tsx
+++ b/packages/sheets-ui/src/views/permission/Spin.tsx
@@ -31,8 +31,8 @@ const Spin = ({ loading, children }: ISpinProps) => {
<div
className={`
univer-absolute -univer-bottom-0.5 -univer-left-0.5 -univer-right-0.5 -univer-top-0.5 univer-z-10
- univer-flex univer-items-center univer-justify-center univer-bg-white univer-backdrop-blur
- dark:!univer-bg-black
+ univer-flex univer-items-center univer-justify-center univer-bg-gray-0 univer-backdrop-blur
+ dark:!univer-bg-gray-1000
`}
>
<div
diff --git a/packages/sheets-ui/src/views/permission/panel-detail/PermissionDetailUserPart.tsx b/packages/sheets-ui/src/views/permission/panel-detail/PermissionDetailUserPart.tsx
index 47d0d4f29f..281a67fc01 100644
--- a/packages/sheets-ui/src/views/permission/panel-detail/PermissionDetailUserPart.tsx
+++ b/packages/sheets-ui/src/views/permission/panel-detail/PermissionDetailUserPart.tsx
@@ -166,7 +166,7 @@ export const PermissionDetailUserPart = (props: IPermissionDetailUserPartProps)
<span
className={`
univer-ml-1.5 univer-w-[130px] univer-truncate univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
>
{item.subject?.name}
diff --git a/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/SheetBarItem.tsx b/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/SheetBarItem.tsx
index 5723e99e04..0c844cab7d 100644
--- a/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/SheetBarItem.tsx
+++ b/packages/sheets-ui/src/views/sheet-bar/sheet-bar-tabs/SheetBarItem.tsx
@@ -43,7 +43,7 @@ export function SheetBarItem(props: IBaseSheetBarProps) {
const getTextColor = (color: string) => {
const darkTextColor = themeService.getColorFromTheme('gray.900');
- const lightTextColor = themeService.getColorFromTheme('white');
+ const lightTextColor = themeService.getColorFromTheme('gray.0');
return new ColorKit(color).isDark() ? lightTextColor : darkTextColor;
};
@@ -65,8 +65,8 @@ export function SheetBarItem(props: IBaseSheetBarProps) {
univer-flex-row univer-items-center univer-rounded univer-text-xs univer-transition-[colors,box-shadow]
focus-visible:univer-ring-2 focus-visible:univer-ring-primary-500
`, {
- 'dark:!univer-text-white': !color || (color && !textColor),
- 'univer-justify-center univer-bg-white univer-font-bold univer-text-primary-700 univer-shadow': currentSelected,
+ 'dark:!univer-text-gray-0': !color || (color && !textColor),
+ 'univer-justify-center univer-bg-gray-0 univer-font-bold univer-text-primary-700 univer-shadow': currentSelected,
'dark:!univer-bg-gray-700': currentSelected && !color,
'univer-font-medium univer-text-gray-900 hover:univer-bg-gray-100': !currentSelected,
'dark:hover:!univer-bg-gray-700': !currentSelected && !color,
diff --git a/packages/sheets-ui/src/views/sheet-container/SheetContainer.tsx b/packages/sheets-ui/src/views/sheet-container/SheetContainer.tsx
index b8eee7b345..836d5a675e 100644
--- a/packages/sheets-ui/src/views/sheet-container/SheetContainer.tsx
+++ b/packages/sheets-ui/src/views/sheet-container/SheetContainer.tsx
@@ -85,7 +85,7 @@ export function RenderSheetFooter() {
<section
className={clsx(`
univer-box-border univer-grid univer-w-full univer-grid-flow-col univer-grid-cols-[1fr,auto,auto,auto]
- univer-items-center univer-justify-between univer-bg-white univer-px-5 univer-text-gray-900
+ univer-items-center univer-justify-between univer-bg-gray-0 univer-px-5 univer-text-gray-900
dark:!univer-bg-gray-900 dark:!univer-text-gray-200
`, { 'univer-pointer-events-none': isLoading })}
data-range-selector
@@ -132,7 +132,7 @@ export function RenderSheetHeader() {
<div
aria-hidden
className="
- univer-h-7 univer-border-b univer-border-gray-200 univer-bg-white
+ univer-h-7 univer-border-b univer-border-gray-200 univer-bg-gray-0
dark:!univer-border-gray-700 dark:!univer-bg-gray-900
"
data-u-comp="formula-bar-placeholder"
@@ -207,7 +207,7 @@ function SheetLoadingSkeleton() {
data-u-comp="sheet-loading-skeleton"
aria-busy
className="
- univer-absolute univer-inset-0 univer-z-10 univer-overflow-hidden univer-bg-white
+ univer-absolute univer-inset-0 univer-z-10 univer-overflow-hidden univer-bg-gray-0
dark:!univer-bg-gray-900
"
>
@@ -287,7 +287,7 @@ function RenderSheetEmbedTabHost(props: { workbook: Workbook; worksheet: Workshe
<div
data-embed-sheets-sheet-tab-host={hostAnchorId}
className="
- univer-absolute univer-inset-0 univer-z-40 univer-bg-white
+ univer-absolute univer-inset-0 univer-z-40 univer-bg-gray-0
dark:!univer-bg-gray-900
"
/>
diff --git a/packages/sheets/src/facade/__tests__/create-test-bed.ts b/packages/sheets/src/facade/__tests__/create-test-bed.ts
index 995aac4d66..c843218f48 100644
--- a/packages/sheets/src/facade/__tests__/create-test-bed.ts
+++ b/packages/sheets/src/facade/__tests__/create-test-bed.ts
@@ -114,7 +114,6 @@ class RenderManagerServiceTestBed extends RenderManagerService {
}
}
-// eslint-disable-next-line max-lines-per-function
export function createFacadeTestBed(workbookData?: IWorkbookData, dependencies?: Dependency[]): ITestBed {
const univer = new Univer();
const injector = univer.__getInjector();
@@ -170,7 +169,7 @@ export function createFacadeTestBed(workbookData?: IWorkbookData, dependencies?:
// load theme service
const themeService = injector.get(ThemeService);
const theme = themeService.getCurrentTheme();
- const newTheme = set(theme, 'black', '#35322b');
+ const newTheme = set(theme, 'gray.1000', '#35322b');
themeService.setTheme(newTheme);
// register builtin plugins
diff --git a/packages/sheets/src/facade/__tests__/create-worksheet-test-bed.ts b/packages/sheets/src/facade/__tests__/create-worksheet-test-bed.ts
index 08ddfadc17..94dbb45f91 100644
--- a/packages/sheets/src/facade/__tests__/create-worksheet-test-bed.ts
+++ b/packages/sheets/src/facade/__tests__/create-worksheet-test-bed.ts
@@ -162,7 +162,7 @@ export function createWorksheetTestBed(workbookData?: IWorkbookData, dependencie
// load theme service
const themeService = injector.get(ThemeService);
const theme = themeService.getCurrentTheme();
- const newTheme = set(theme, 'black', '#35322b');
+ const newTheme = set(theme, 'gray.1000', '#35322b');
themeService.setTheme(newTheme);
// register builtin plugins
diff --git a/packages/slides-ui/src/views/image-popup-menu/ImagePopupMenu.tsx b/packages/slides-ui/src/views/image-popup-menu/ImagePopupMenu.tsx
index cfe7593b6a..a59f621a55 100644
--- a/packages/slides-ui/src/views/image-popup-menu/ImagePopupMenu.tsx
+++ b/packages/slides-ui/src/views/image-popup-menu/ImagePopupMenu.tsx
@@ -82,7 +82,7 @@ export function SlideImagePopupMenu(props: IImagePopupMenuProps) {
<ul
className={clsx(`
univer-m-0 univer-box-border univer-grid univer-list-none univer-items-center univer-gap-1
- univer-rounded-lg univer-bg-white univer-p-1.5 univer-text-sm univer-shadow-lg
+ univer-rounded-lg univer-bg-gray-0 univer-p-1.5 univer-text-sm univer-shadow-lg
`, borderClassName)}
>
{availableMenu.map((item) => (
@@ -112,16 +112,16 @@ export function SlideImagePopupMenu(props: IImagePopupMenuProps) {
dark:hover:!univer-bg-gray-800
`, borderClassName, {
'univer-bg-gray-100 dark:!univer-bg-gray-800': visible,
- 'univer-bg-white dark:!univer-bg-gray-900': !visible,
+ 'univer-bg-gray-0 dark:!univer-bg-gray-900': !visible,
})}
>
<AutofillDoubleIcon
className={`
univer-fill-primary-600 univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
/>
- {showMore && <MoreDownIcon className="dark:!univer-text-white" />}
+ {showMore && <MoreDownIcon className="dark:!univer-text-gray-0" />}
</div>
</Dropdown>
</div>
diff --git a/packages/slides-ui/src/views/slide-bar/SlideBar.tsx b/packages/slides-ui/src/views/slide-bar/SlideBar.tsx
index e8f539e95c..ce9421f8a9 100644
--- a/packages/slides-ui/src/views/slide-bar/SlideBar.tsx
+++ b/packages/slides-ui/src/views/slide-bar/SlideBar.tsx
@@ -98,7 +98,7 @@ export function SlideSideBar() {
<a
className={clsx(`
univer-box-border univer-block univer-h-8 univer-w-full univer-cursor-pointer
- univer-rounded-md univer-bg-white univer-text-center univer-text-sm univer-transition-colors
+ univer-rounded-md univer-bg-gray-0 univer-text-center univer-text-sm univer-transition-colors
`, borderClassName)}
onClick={handleAppendSlide}
>
@@ -118,7 +118,7 @@ export function SlideSideBar() {
<div
ref={divRefs[index]}
className={clsx(`
- univer-relative univer-box-border univer-h-32 univer-w-52 univer-bg-white
+ univer-relative univer-box-border univer-h-32 univer-w-52 univer-bg-gray-0
hover:univer-border-primary-600
`, borderClassName)}
/>
diff --git a/packages/themes/src/dark-blue.ts b/packages/themes/src/dark-blue.ts
index 9fb66022a0..7eeb164feb 100644
--- a/packages/themes/src/dark-blue.ts
+++ b/packages/themes/src/dark-blue.ts
@@ -17,8 +17,6 @@
import type { Theme } from './default';
const darkBlueTheme: Theme = {
- white: '#07111F',
- black: '#F8FAFC',
primary: {
50: '#1E3A8A',
100: '#1E40AF',
@@ -32,6 +30,7 @@ const darkBlueTheme: Theme = {
900: '#EFF6FF',
},
gray: {
+ 0: '#07111F',
50: '#111318',
100: '#202329',
200: '#343840',
@@ -42,6 +41,7 @@ const darkBlueTheme: Theme = {
700: '#CFD3D9',
800: '#E4E7EB',
900: '#F5F6F7',
+ 1000: '#F8FAFC',
},
blue: {
50: '#0C4A6E',
diff --git a/packages/themes/src/default.ts b/packages/themes/src/default.ts
index 2e4905ffa7..3aa51faa10 100644
--- a/packages/themes/src/default.ts
+++ b/packages/themes/src/default.ts
@@ -15,8 +15,6 @@
*/
const defaultTheme = {
- white: '#FFFFFF',
- black: '#000000',
primary: {
50: '#F3F5FF',
100: '#E9EDFF',
@@ -30,6 +28,7 @@ const defaultTheme = {
900: '#1033BF',
},
gray: {
+ 0: '#FFFFFF',
50: '#F9FAFB',
100: '#EEEFF1',
200: '#E3E5EA',
@@ -40,6 +39,7 @@ const defaultTheme = {
700: '#272A2F',
800: '#1F2124',
900: '#1B1C1F',
+ 1000: '#000000',
},
blue: {
50: '#EBF5FF',
diff --git a/packages/themes/src/green.ts b/packages/themes/src/green.ts
index 5cc8282ac2..69e419c9bc 100644
--- a/packages/themes/src/green.ts
+++ b/packages/themes/src/green.ts
@@ -17,8 +17,6 @@
import type { Theme } from './default';
const greenTheme: Theme = {
- white: '#FFFFFF',
- black: '#000000',
primary: {
50: '#ECFDF5',
100: '#D1FAE5',
@@ -32,6 +30,7 @@ const greenTheme: Theme = {
900: '#022C22',
},
gray: {
+ 0: '#FFFFFF',
50: '#F8FAF9',
100: '#EEF4F1',
200: '#DDE8E2',
@@ -42,6 +41,7 @@ const greenTheme: Theme = {
700: '#33443B',
800: '#25332D',
900: '#1A2621',
+ 1000: '#000000',
},
blue: {
50: '#F0F9FF',
diff --git a/packages/themes/src/orange.ts b/packages/themes/src/orange.ts
index 6fe66f2bac..07fd37011c 100644
--- a/packages/themes/src/orange.ts
+++ b/packages/themes/src/orange.ts
@@ -17,8 +17,6 @@
import type { Theme } from './default';
const orangeTheme: Theme = {
- white: '#FFFFFF',
- black: '#000000',
primary: {
50: '#FFF7ED',
100: '#FFEDD5',
@@ -32,6 +30,7 @@ const orangeTheme: Theme = {
900: '#7C2D12',
},
gray: {
+ 0: '#FFFFFF',
50: '#FAFAF9',
100: '#F5F5F4',
200: '#E7E5E4',
@@ -42,6 +41,7 @@ const orangeTheme: Theme = {
700: '#44403C',
800: '#292524',
900: '#1C1917',
+ 1000: '#000000',
},
blue: {
50: '#EFF6FF',
diff --git a/packages/themes/src/purple.ts b/packages/themes/src/purple.ts
index 3635d3f84b..7ec53215cf 100644
--- a/packages/themes/src/purple.ts
+++ b/packages/themes/src/purple.ts
@@ -17,8 +17,6 @@
import type { Theme } from './default';
const purpleTheme: Theme = {
- white: '#FFFFFF',
- black: '#000000',
primary: {
50: '#F5F3FF',
100: '#EDE9FE',
@@ -32,6 +30,7 @@ const purpleTheme: Theme = {
900: '#4C1D95',
},
gray: {
+ 0: '#FFFFFF',
50: '#FAFAFC',
100: '#F1F0F5',
200: '#E5E2EC',
@@ -42,6 +41,7 @@ const purpleTheme: Theme = {
700: '#403748',
800: '#302838',
900: '#241D2A',
+ 1000: '#000000',
},
blue: {
50: '#EFF6FF',
diff --git a/packages/themes/src/red.ts b/packages/themes/src/red.ts
index 526ae050f6..feb09a5128 100644
--- a/packages/themes/src/red.ts
+++ b/packages/themes/src/red.ts
@@ -17,8 +17,6 @@
import type { Theme } from './default';
const redTheme: Theme = {
- white: '#FFFFFF',
- black: '#000000',
primary: {
50: '#FFF1F2',
100: '#FFE4E6',
@@ -32,6 +30,7 @@ const redTheme: Theme = {
900: '#881337',
},
gray: {
+ 0: '#FFFFFF',
50: '#FAF8F8',
100: '#F4EEEE',
200: '#E8DEDE',
@@ -42,6 +41,7 @@ const redTheme: Theme = {
700: '#493737',
800: '#352727',
900: '#271D1D',
+ 1000: '#000000',
},
blue: {
50: '#EFF6FF',
diff --git a/packages/themes/src/yellow.ts b/packages/themes/src/yellow.ts
index bfd4046320..3ec1f29faa 100644
--- a/packages/themes/src/yellow.ts
+++ b/packages/themes/src/yellow.ts
@@ -17,8 +17,6 @@
import type { Theme } from './default';
const yellowTheme: Theme = {
- white: '#FFFFFF',
- black: '#000000',
primary: {
50: '#FEFCE8',
100: '#FEF9C3',
@@ -32,6 +30,7 @@ const yellowTheme: Theme = {
900: '#422006',
},
gray: {
+ 0: '#FFFFFF',
50: '#FAFAF9',
100: '#F5F5F4',
200: '#E7E5E4',
@@ -42,6 +41,7 @@ const yellowTheme: Theme = {
700: '#44403C',
800: '#292524',
900: '#1C1917',
+ 1000: '#000000',
},
blue: {
50: '#EFF6FF',
diff --git a/packages/thread-comment-ui/src/views/ThreadCommentEditor.tsx b/packages/thread-comment-ui/src/views/ThreadCommentEditor.tsx
index e21068cc1e..309cbf5150 100644
--- a/packages/thread-comment-ui/src/views/ThreadCommentEditor.tsx
+++ b/packages/thread-comment-ui/src/views/ThreadCommentEditor.tsx
@@ -193,7 +193,7 @@ export const ThreadCommentSuggestion = ({ active, user }: { active: boolean; use
<div
className={clsx(`
univer-flex univer-items-center univer-text-sm univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`, {
'univer-bg-gray-50 dark:!univer-bg-gray-900': active,
})}
diff --git a/packages/thread-comment-ui/src/views/ThreadCommentTree.tsx b/packages/thread-comment-ui/src/views/ThreadCommentTree.tsx
index 709528fe23..e1842b8654 100644
--- a/packages/thread-comment-ui/src/views/ThreadCommentTree.tsx
+++ b/packages/thread-comment-ui/src/views/ThreadCommentTree.tsx
@@ -301,7 +301,7 @@ const ThreadCommentItem = (props: IThreadCommentItemProps) => {
<div
className={`
univer-text-sm univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
>
{transformDocument2TextNodes(item.text).map((paragraph, i) => (
@@ -448,8 +448,8 @@ export const ThreadCommentTree = (props: IThreadCommentTreeProps) => {
<div
id={`${location}-${unitId}-${subUnitId}-${id}`}
className={clsx(`
- univer-relative univer-box-border univer-rounded-md univer-bg-white univer-p-4 univer-text-gray-900
- dark:!univer-bg-gray-900 dark:!univer-text-white
+ univer-relative univer-box-border univer-rounded-md univer-bg-gray-0 univer-p-4 univer-text-gray-900
+ dark:!univer-bg-gray-900 dark:!univer-text-gray-0
`, borderClassName, {
'univer-w-[278px]': !full,
'univer-w-full': full,
diff --git a/packages/ui/src/views/components/context-menu/ContextMenuPanel.tsx b/packages/ui/src/views/components/context-menu/ContextMenuPanel.tsx
index 86e571c54e..8684a3ceb9 100644
--- a/packages/ui/src/views/components/context-menu/ContextMenuPanel.tsx
+++ b/packages/ui/src/views/components/context-menu/ContextMenuPanel.tsx
@@ -133,8 +133,8 @@ const contextMenuContentVariants = cva('univer-inline-flex univer-items-center',
const contextMenuPanelVariants = cva(
`
univer-box-border univer-grid univer-max-w-full univer-overflow-y-auto univer-overscroll-contain univer-rounded-md
- univer-bg-white univer-text-gray-900 univer-shadow-md
- dark:!univer-bg-gray-700 dark:!univer-text-white
+ univer-bg-gray-0 univer-text-gray-900 univer-shadow-md
+ dark:!univer-bg-gray-700 dark:!univer-text-gray-0
`,
{
variants: {
@@ -239,7 +239,7 @@ const contextMenuHeaderRowVariants = cva('univer-flex univer-items-center univer
const contextMenuSubmenuPanelVariants = cva(
`
univer-overflow-y-auto univer-overscroll-contain univer-rounded-md univer-border univer-border-solid
- univer-border-gray-200 univer-bg-white univer-shadow-md
+ univer-border-gray-200 univer-bg-gray-0 univer-shadow-md
dark:!univer-border-gray-600 dark:!univer-bg-gray-700
`,
{
@@ -258,7 +258,7 @@ const contextMenuSubmenuPanelVariants = cva(
const contextMenuItemVariants = cva(
`
univer-relative univer-flex univer-border-none univer-bg-transparent univer-text-left univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`,
{
variants: {
@@ -1477,7 +1477,7 @@ function ContextMenuMenuItem(props: IContextMenuMenuItemProps) {
const optionClassName = clsx(
`
univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`,
optionSelectable
? sizeVariant === 'paragraph-t'
diff --git a/packages/ui/src/views/components/context-menu/MobileContextMenu.tsx b/packages/ui/src/views/components/context-menu/MobileContextMenu.tsx
index a10d523f0e..f428e7717c 100644
--- a/packages/ui/src/views/components/context-menu/MobileContextMenu.tsx
+++ b/packages/ui/src/views/components/context-menu/MobileContextMenu.tsx
@@ -167,7 +167,7 @@ export function MobileContextMenu() {
aria-label={localeService.t<LocaleKey>('ui.rangeSelector.cancel')}
className="
univer-flex univer-size-8 univer-shrink-0 univer-appearance-none univer-items-center
- univer-justify-center univer-rounded-full univer-border-0 univer-bg-white univer-p-0
+ univer-justify-center univer-rounded-full univer-border-0 univer-bg-gray-0 univer-p-0
univer-leading-none univer-text-gray-600 univer-shadow-sm univer-outline-none
univer-ring-0 univer-transition-colors
hover:univer-bg-gray-100
diff --git a/packages/ui/src/views/components/ribbon/MobileRibbon.tsx b/packages/ui/src/views/components/ribbon/MobileRibbon.tsx
index e194fa1a12..27ee9f9ec0 100644
--- a/packages/ui/src/views/components/ribbon/MobileRibbon.tsx
+++ b/packages/ui/src/views/components/ribbon/MobileRibbon.tsx
@@ -234,7 +234,7 @@ export function MobileRibbon(props: IMobileRibbonProps) {
<div
className={clsx(`
univer-grid univer-grid-cols-[22px_minmax(0,1fr)_22px] univer-items-center univer-gap-1.5
- univer-rounded-xl univer-bg-white univer-px-2 univer-py-1
+ univer-rounded-xl univer-bg-gray-0 univer-px-2 univer-py-1
dark:!univer-bg-gray-800
`, borderClassName)}
>
diff --git a/packages/ui/src/views/components/ribbon/ToolbarButton.tsx b/packages/ui/src/views/components/ribbon/ToolbarButton.tsx
index b78d1b85e9..dc337c1579 100644
--- a/packages/ui/src/views/components/ribbon/ToolbarButton.tsx
+++ b/packages/ui/src/views/components/ribbon/ToolbarButton.tsx
@@ -55,7 +55,7 @@ export const toolbarButtonClassName = `
univer-box-border univer-flex univer-h-6 univer-min-w-6 univer-cursor-pointer univer-items-center
univer-justify-center univer-rounded univer-border-none univer-bg-transparent univer-p-0
univer-text-gray-900 univer-outline-none univer-transition-colors univer-animate-in univer-fade-in
-dark:!univer-text-white dark:hover:!univer-bg-gray-700 dark:disabled:!univer-text-gray-600
+dark:!univer-text-gray-0 dark:hover:!univer-bg-gray-700 dark:disabled:!univer-text-gray-600
disabled:univer-cursor-not-allowed disabled:univer-text-gray-300 disabled:hover:univer-bg-transparent
hover:univer-bg-gray-100 whitespace-nowrap univer-w-max
`;
diff --git a/packages/ui/src/views/components/ribbon/ToolbarItem.tsx b/packages/ui/src/views/components/ribbon/ToolbarItem.tsx
index 1748caa228..cad6fd5370 100644
--- a/packages/ui/src/views/components/ribbon/ToolbarItem.tsx
+++ b/packages/ui/src/views/components/ribbon/ToolbarItem.tsx
@@ -56,7 +56,7 @@ const toolbarButtonSelectorRootVariants = cva(
true: toolbarDisabledClassName,
false: `
univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`,
},
},
@@ -152,7 +152,7 @@ const toolbarSelectorRootVariants = cva(
true: toolbarDisabledClassName,
false: `
univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`,
},
active: {
@@ -330,7 +330,7 @@ export const ToolbarItem = forwardRef<ITooltipWrapperRef, IToolbarItemProps>((pr
className={clsx(toolbarSelectorRootVariants({ disabled, active: activated }), {
'univer-box-border univer-h-full univer-min-w-14 univer-flex-col univer-justify-center univer-gap-1 univer-px-1.5 univer-py-1 univer-text-xs [&>svg]:univer-size-8': grid && large,
'univer-box-border univer-h-full': grid && !large,
- 'univer-bg-white dark:!univer-bg-gray-800': grid && !large && !icon,
+ 'univer-bg-gray-0 dark:!univer-bg-gray-800': grid && !large && !icon,
'[&>svg]:univer-size-4': grid && !large,
}, grid && !large && !icon && borderClassName)}
>
diff --git a/packages/ui/src/views/components/ribbon/TooltipButtonWrapper.tsx b/packages/ui/src/views/components/ribbon/TooltipButtonWrapper.tsx
index cf4c42729f..36c5339b24 100644
--- a/packages/ui/src/views/components/ribbon/TooltipButtonWrapper.tsx
+++ b/packages/ui/src/views/components/ribbon/TooltipButtonWrapper.tsx
@@ -341,7 +341,7 @@ export function DropdownMenuWrapper({
const items: IDropdownMenuProps['items'] = options.map((option) => ({
type: 'item',
className: clsx({
- 'focus:univer-bg-white': typeof option.label !== 'string' && option.label?.hoverable === false,
+ 'focus:univer-bg-gray-0': typeof option.label !== 'string' && option.label?.hoverable === false,
'!univer-p-0': isSingleEmbeddedCustomPanel,
}),
children: (
diff --git a/packages/ui/src/views/components/ribbon/ribbon-menu/DefaultMenu.tsx b/packages/ui/src/views/components/ribbon/ribbon-menu/DefaultMenu.tsx
index 804bfbc2ab..83ee67ce58 100644
--- a/packages/ui/src/views/components/ribbon/ribbon-menu/DefaultMenu.tsx
+++ b/packages/ui/src/views/components/ribbon/ribbon-menu/DefaultMenu.tsx
@@ -118,7 +118,7 @@ export function DefaultMenu({
className={`
univer-mr-2 univer-flex univer-h-7 univer-cursor-pointer univer-items-center univer-gap-1.5
univer-whitespace-nowrap !univer-rounded-full univer-bg-gray-700 univer-pl-3 univer-pr-2
- univer-text-sm univer-text-white
+ univer-text-sm univer-text-gray-0
dark:!univer-bg-gray-200 dark:!univer-text-gray-800
`}
onClick={() => setGroupSelectorVisible(true)}
diff --git a/packages/ui/src/views/components/ribbon/ribbon-menu/RibbonGridMenu.tsx b/packages/ui/src/views/components/ribbon/ribbon-menu/RibbonGridMenu.tsx
index cf610460d5..4e8ba35254 100644
--- a/packages/ui/src/views/components/ribbon/ribbon-menu/RibbonGridMenu.tsx
+++ b/packages/ui/src/views/components/ribbon/ribbon-menu/RibbonGridMenu.tsx
@@ -61,7 +61,7 @@ export function RibbonGridMenu({
focus-visible:univer-outline-none focus-visible:univer-ring-2 focus-visible:univer-ring-inset
focus-visible:univer-ring-primary-500
dark:!univer-text-gray-200
- dark:hover:!univer-text-white
+ dark:hover:!univer-text-gray-0
`, isActive
? `
univer-border-primary-600 univer-text-primary-700
diff --git a/packages/ui/src/views/components/shortcut-panel/ShortcutPanel.tsx b/packages/ui/src/views/components/shortcut-panel/ShortcutPanel.tsx
index b7a5fa9be8..1a41bc303e 100644
--- a/packages/ui/src/views/components/shortcut-panel/ShortcutPanel.tsx
+++ b/packages/ui/src/views/components/shortcut-panel/ShortcutPanel.tsx
@@ -86,7 +86,6 @@ export function ShortcutPanel() {
})
.sort((a, b) => a.sequence - b.sequence);
- // eslint-disable-next-line react/set-state-in-effect
setShortcutItems(toRender);
}, [shortcutService, localeService, currentLocale]);
@@ -101,7 +100,7 @@ export function ShortcutPanel() {
<ul
className={`
univer-m-0 univer-list-none univer-p-0 univer-text-gray-900
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
>
{shortcutItems.map((group) => (
diff --git a/packages/ui/src/views/components/sidebar/Sidebar.tsx b/packages/ui/src/views/components/sidebar/Sidebar.tsx
index 376db0b7f2..d104cc7d83 100644
--- a/packages/ui/src/views/components/sidebar/Sidebar.tsx
+++ b/packages/ui/src/views/components/sidebar/Sidebar.tsx
@@ -191,8 +191,8 @@ export function Sidebar() {
aria-expanded={!!options?.visible}
aria-label={localeService.t<LocaleKey>('ui.sidebar.panel')}
className={clsx(`
- univer-relative univer-h-full univer-flex-shrink-0 univer-bg-white univer-text-gray-900
- dark:!univer-bg-gray-900 dark:!univer-text-white
+ univer-relative univer-h-full univer-flex-shrink-0 univer-bg-gray-0 univer-text-gray-900
+ dark:!univer-bg-gray-900 dark:!univer-text-gray-0
`, {
'univer-w-96 univer-translate-x-0': options?.visible,
'univer-w-0 univer-translate-x-full': !options?.visible,
@@ -242,9 +242,9 @@ export function Sidebar() {
<header
className={`
univer-sticky univer-top-0 univer-z-10 univer-box-border univer-flex univer-cursor-default
- univer-items-center univer-justify-between univer-bg-white univer-p-4 univer-pb-2 univer-text-base
- univer-font-medium univer-text-gray-800
- dark:!univer-bg-gray-900 dark:!univer-text-white
+ univer-items-center univer-justify-between univer-bg-gray-0 univer-p-4 univer-pb-2
+ univer-text-base univer-font-medium univer-text-gray-800
+ dark:!univer-bg-gray-900 dark:!univer-text-gray-0
`}
>
{options?.header}
@@ -274,7 +274,7 @@ export function Sidebar() {
{options?.footer && (
<footer
className={`
- univer-sticky univer-bottom-0 univer-box-border univer-bg-white univer-p-4
+ univer-sticky univer-bottom-0 univer-box-border univer-bg-gray-0 univer-p-4
dark:!univer-bg-gray-900
`}
>
diff --git a/packages/ui/src/views/components/workbench-skeleton/WorkbenchSkeleton.tsx b/packages/ui/src/views/components/workbench-skeleton/WorkbenchSkeleton.tsx
index 3acbf4c21a..d6d8189374 100644
--- a/packages/ui/src/views/components/workbench-skeleton/WorkbenchSkeleton.tsx
+++ b/packages/ui/src/views/components/workbench-skeleton/WorkbenchSkeleton.tsx
@@ -46,7 +46,7 @@ export function WorkbenchSkeleton({ darkMode, direction, overlay = false }: IWor
data-u-comp="workbench-skeleton-toolbar"
className="
univer-flex univer-h-11 univer-shrink-0 univer-items-center univer-gap-2 univer-border-0
- univer-border-b univer-border-solid univer-border-gray-200 univer-bg-white univer-px-4
+ univer-border-b univer-border-solid univer-border-gray-200 univer-bg-gray-0 univer-px-4
dark:!univer-border-gray-700 dark:!univer-bg-gray-800
"
>
@@ -89,7 +89,7 @@ export function WorkbenchSkeleton({ darkMode, direction, overlay = false }: IWor
data-u-comp="workbench-skeleton-footer"
className="
univer-flex univer-h-10 univer-shrink-0 univer-items-center univer-justify-between univer-border-0
- univer-border-t univer-border-solid univer-border-gray-200 univer-bg-white univer-px-4
+ univer-border-t univer-border-solid univer-border-gray-200 univer-bg-gray-0 univer-px-4
dark:!univer-border-gray-700 dark:!univer-bg-gray-800
"
>
diff --git a/packages/ui/src/views/emoji-picker/EmojiPicker.tsx b/packages/ui/src/views/emoji-picker/EmojiPicker.tsx
index 6d1a4ae4aa..444b0861a2 100644
--- a/packages/ui/src/views/emoji-picker/EmojiPicker.tsx
+++ b/packages/ui/src/views/emoji-picker/EmojiPicker.tsx
@@ -230,7 +230,7 @@ export function EmojiPicker(props: IEmojiPickerProps) {
className={clsx(
'univer-flex univer-h-[340px] univer-w-[420px] univer-flex-col univer-overflow-hidden',
!props.embedded && `
- univer-rounded-[10px] univer-border univer-border-solid univer-border-gray-200 univer-bg-white
+ univer-rounded-[10px] univer-border univer-border-solid univer-border-gray-200 univer-bg-gray-0
univer-shadow-lg
dark:!univer-border-gray-600 dark:!univer-bg-gray-900
`
@@ -457,7 +457,7 @@ function EmojiButton(props: {
aria-label={`${title}, ${props.moreTitle}`}
title={`${title}, ${props.moreTitle}`}
className="
- univer-bg-white/90
+ univer-bg-gray-0/90
dark:!univer-bg-gray-800/90
univer-absolute univer-bottom-0 univer-right-0 univer-flex univer-size-3 univer-cursor-pointer
univer-items-center univer-justify-center univer-rounded-sm univer-border-0 univer-p-0
diff --git a/packages/ui/src/views/font-family/FontFamily.tsx b/packages/ui/src/views/font-family/FontFamily.tsx
index c60f1f941c..3b06767f4e 100644
--- a/packages/ui/src/views/font-family/FontFamily.tsx
+++ b/packages/ui/src/views/font-family/FontFamily.tsx
@@ -113,7 +113,7 @@ export const FontFamily = ({ className, disabled: disabledProp, value, disabled$
className={`
univer-block univer-h-6 univer-border-none univer-bg-transparent univer-leading-6 univer-text-gray-900
focus:univer-outline-none
- dark:!univer-text-white
+ dark:!univer-text-gray-0
[&_input:focus]:!univer-ring-0
[&_input]:univer-h-6 [&_input]:univer-w-7 [&_input]:univer-border-none
[&_input]:!univer-bg-transparent [&_input]:univer-p-0 [&_input]:univer-text-sm
diff --git a/packages/ui/src/views/font-family/FontFamilyDropdown.tsx b/packages/ui/src/views/font-family/FontFamilyDropdown.tsx
index d6f23e6263..017e98a81d 100644
--- a/packages/ui/src/views/font-family/FontFamilyDropdown.tsx
+++ b/packages/ui/src/views/font-family/FontFamilyDropdown.tsx
@@ -76,7 +76,7 @@ export function FontFamilyDropdown(props: IFontFamilyDropdownProps) {
dir={direction}
className={clsx(`
univer-max-h-72 univer-min-w-44 univer-overflow-y-auto univer-rounded-lg univer-border
- univer-border-solid univer-border-gray-200 univer-bg-white univer-p-1 univer-shadow-lg
+ univer-border-solid univer-border-gray-200 univer-bg-gray-0 univer-p-1 univer-shadow-lg
dark:!univer-border-gray-700 dark:!univer-bg-gray-900
`, popupClassName)}
{...popupDataAttributes}
diff --git a/packages/ui/src/views/font-family/FontFamilyItem.tsx b/packages/ui/src/views/font-family/FontFamilyItem.tsx
index bf0ab54427..6700ca979b 100644
--- a/packages/ui/src/views/font-family/FontFamilyItem.tsx
+++ b/packages/ui/src/views/font-family/FontFamilyItem.tsx
@@ -51,7 +51,7 @@ export const FontFamilyItem = ({ value, onChange }: IFontFamilyItemProps) => {
univer-justify-between univer-gap-6 univer-rounded univer-border-none univer-bg-transparent
univer-px-2 univer-text-gray-900
hover:univer-bg-gray-100
- dark:!univer-text-white
+ dark:!univer-text-gray-0
dark:hover:!univer-bg-gray-700
`}
style={{
diff --git a/packages/ui/src/views/menu/desktop/TinyMenuGroup.tsx b/packages/ui/src/views/menu/desktop/TinyMenuGroup.tsx
index 21cfdd5237..990637465c 100644
--- a/packages/ui/src/views/menu/desktop/TinyMenuGroup.tsx
+++ b/packages/ui/src/views/menu/desktop/TinyMenuGroup.tsx
@@ -52,7 +52,7 @@ type TinyMenuDisplayItem = IDisplayMenuItem<IMenuItem> & {
const quickTileMenuButtonVariants = cva(
`
univer-relative univer-box-border univer-flex univer-size-12 univer-w-full univer-appearance-none univer-flex-col
- univer-items-center univer-justify-center univer-gap-0.5 univer-rounded-lg univer-border-none univer-bg-white
+ univer-items-center univer-justify-center univer-gap-0.5 univer-rounded-lg univer-border-none univer-bg-gray-0
univer-p-0 univer-font-medium univer-text-gray-700 univer-outline-none univer-transition-all
focus-visible:univer-ring-2 focus-visible:univer-ring-primary-600 focus-visible:univer-ring-offset-0
dark:!univer-bg-gray-700 dark:!univer-text-gray-100
diff --git a/packages/ui/src/views/menu/mobile/MobileMenu.tsx b/packages/ui/src/views/menu/mobile/MobileMenu.tsx
index 7f28ffeb46..94b755ebca 100644
--- a/packages/ui/src/views/menu/mobile/MobileMenu.tsx
+++ b/packages/ui/src/views/menu/mobile/MobileMenu.tsx
@@ -105,7 +105,7 @@ export function MobileMenu(props: IMobileMenuProps) {
<header
className="
univer-grid univer-grid-cols-[32px_minmax(0,1fr)_32px] univer-items-center univer-gap-3
- univer-border-0 univer-border-b univer-border-solid univer-border-gray-200 univer-bg-white
+ univer-border-0 univer-border-b univer-border-solid univer-border-gray-200 univer-bg-gray-0
univer-px-4 univer-py-3
"
>
@@ -136,7 +136,7 @@ export function MobileMenu(props: IMobileMenuProps) {
<div className="univer-flex-1 univer-overflow-y-auto univer-px-4 univer-pb-2 univer-pt-1">
{currentView?.kind !== 'options' && (
- <div className="univer-overflow-hidden univer-rounded-2xl univer-bg-white">
+ <div className="univer-overflow-hidden univer-rounded-2xl univer-bg-gray-0">
<MobileSchemaList
schemas={currentView?.kind === 'schema' ? currentView.schemas : menuSchemas}
menuManagerService={menuManagerService}
@@ -149,7 +149,7 @@ export function MobileMenu(props: IMobileMenuProps) {
)}
{currentView?.kind === 'options' && (
- <div className="univer-overflow-hidden univer-rounded-2xl univer-bg-white">
+ <div className="univer-overflow-hidden univer-rounded-2xl univer-bg-gray-0">
<MobileSelectionOptionsView
menuKey={currentView.menuKey}
menuItem={currentView.menuItem}
@@ -270,7 +270,7 @@ function MobileSchemaRow(props: {
className={clsx(
`
univer-flex univer-min-h-[56px] univer-w-full univer-appearance-none univer-items-center univer-gap-3
- univer-border-0 univer-bg-white univer-px-4 univer-py-3 univer-text-left univer-transition-colors
+ univer-border-0 univer-bg-gray-0 univer-px-4 univer-py-3 univer-text-left univer-transition-colors
enabled:hover:univer-bg-gray-50
enabled:active:univer-bg-gray-100
disabled:univer-cursor-not-allowed disabled:univer-opacity-40
@@ -353,7 +353,7 @@ function MobileSelectionOptionRow(props: {
className={clsx(
`
univer-relative univer-flex univer-min-h-[56px] univer-w-full univer-appearance-none
- univer-items-center univer-gap-3 univer-border-0 univer-bg-white univer-px-4 univer-py-3
+ univer-items-center univer-gap-3 univer-border-0 univer-bg-gray-0 univer-px-4 univer-py-3
univer-text-left univer-transition-colors
enabled:hover:univer-bg-gray-50
enabled:active:univer-bg-gray-100
diff --git a/packages/ui/src/views/mobile-workbench/MobileWorkbench.tsx b/packages/ui/src/views/mobile-workbench/MobileWorkbench.tsx
index 1c1338d897..18444dae84 100644
--- a/packages/ui/src/views/mobile-workbench/MobileWorkbench.tsx
+++ b/packages/ui/src/views/mobile-workbench/MobileWorkbench.tsx
@@ -137,7 +137,7 @@ export function MobileWorkbench(props: IUniverAppProps) {
<div
data-u-comp="app-layout"
className={clsx(`
- univer-relative univer-flex univer-h-full univer-min-h-0 univer-flex-col univer-bg-white
+ univer-relative univer-flex univer-h-full univer-min-h-0 univer-flex-col univer-bg-gray-0
dark:!univer-bg-gray-800
`, {
'univer-dark': darkMode,
@@ -180,7 +180,7 @@ export function MobileWorkbench(props: IUniverAppProps) {
<section
className={clsx(`
univer-relative univer-grid univer-flex-1 univer-grid-rows-[auto_1fr]
- univer-overflow-hidden univer-bg-white
+ univer-overflow-hidden univer-bg-gray-0
dark:!univer-bg-gray-800
`, borderBottomClassName)}
>
diff --git a/packages/ui/src/views/notification/Notification.stories.tsx b/packages/ui/src/views/notification/Notification.stories.tsx
index 32d70b0d54..20a36e64ed 100644
--- a/packages/ui/src/views/notification/Notification.stories.tsx
+++ b/packages/ui/src/views/notification/Notification.stories.tsx
@@ -41,14 +41,14 @@ function NotificationStoryShell({ title, description, children }: { title: strin
>
<div
className={`
- univer-border-white/20 univer-bg-white/10 univer-mx-auto univer-max-w-5xl univer-rounded-3xl
+ univer-border-gray-0/20 univer-bg-gray-0/10 univer-mx-auto univer-max-w-5xl univer-rounded-3xl
univer-border univer-border-solid univer-p-8 univer-backdrop-blur-xl
`}
>
<h2
className="
univer-m-0 univer-font-sans univer-text-2xl univer-font-semibold univer-tracking-tight
- univer-text-white
+ univer-text-gray-0
"
>
{title}
diff --git a/packages/ui/src/views/progress-bar/ProgressBar.tsx b/packages/ui/src/views/progress-bar/ProgressBar.tsx
index b0695db439..4f17c5669f 100644
--- a/packages/ui/src/views/progress-bar/ProgressBar.tsx
+++ b/packages/ui/src/views/progress-bar/ProgressBar.tsx
@@ -112,7 +112,7 @@ export function ProgressBar(props: IProgressBarProps) {
<CloseIcon
className={`
univer-size-3.5
- dark:!univer-text-white
+ dark:!univer-text-gray-0
`}
/>
</button>
diff --git a/packages/ui/src/views/slider/Slider.tsx b/packages/ui/src/views/slider/Slider.tsx
index 63c28412ff..a5d62f8b76 100644
--- a/packages/ui/src/views/slider/Slider.tsx
+++ b/packages/ui/src/views/slider/Slider.tsx
@@ -297,7 +297,7 @@ export function Slider(props: ISliderProps) {
className={`
univer-absolute univer-left-1/2 univer-top-1/2 univer-box-border univer-block
univer-size-1.5 -univer-translate-x-1/2 -univer-translate-y-1/2 univer-cursor-pointer
- univer-rounded-full univer-border univer-border-white univer-bg-gray-400
+ univer-rounded-full univer-border univer-border-gray-0 univer-bg-gray-400
dark:!univer-border-gray-700 dark:!univer-bg-gray-300
`}
role="button"
@@ -307,7 +307,7 @@ export function Slider(props: ISliderProps) {
<button
className={clsx(`
univer-absolute univer-top-1/2 univer-size-3.5 -univer-translate-x-1/2
- -univer-translate-y-1/2 univer-rounded-full univer-bg-white univer-shadow-sm
+ -univer-translate-y-1/2 univer-rounded-full univer-bg-gray-0 univer-shadow-sm
univer-transition-all
focus-visible:univer-outline-none focus-visible:univer-ring-2
focus-visible:univer-ring-primary-100
diff --git a/packages/ui/src/views/slider/ZoomInput.tsx b/packages/ui/src/views/slider/ZoomInput.tsx
index 66d4266abf..f9d706ad03 100644
--- a/packages/ui/src/views/slider/ZoomInput.tsx
+++ b/packages/ui/src/views/slider/ZoomInput.tsx
@@ -118,7 +118,7 @@ export function ZoomInput(props: IZoomInputProps) {
<div
className={clsx(`
univer-flex univer-h-6 univer-w-[68px] univer-flex-shrink-0 univer-items-center univer-overflow-hidden
- univer-rounded-md univer-border univer-border-gray-200 univer-bg-white
+ univer-rounded-md univer-border univer-border-gray-200 univer-bg-gray-0
dark:!univer-border-gray-600 dark:!univer-bg-gray-800
`, className, {
'univer-opacity-60': disabled,
diff --git a/packages/ui/src/views/symbol-picker/SymbolPicker.tsx b/packages/ui/src/views/symbol-picker/SymbolPicker.tsx
index 58c3e0cfa3..732eaadd41 100644
--- a/packages/ui/src/views/symbol-picker/SymbolPicker.tsx
+++ b/packages/ui/src/views/symbol-picker/SymbolPicker.tsx
@@ -55,7 +55,7 @@ export function SymbolPicker(props: ISymbolPickerProps) {
className={clsx(
'univer-flex univer-h-[340px] univer-w-[420px] univer-flex-col univer-overflow-hidden',
!props.embedded && `
- univer-rounded-[10px] univer-border univer-border-solid univer-border-gray-200 univer-bg-white
+ univer-rounded-[10px] univer-border univer-border-solid univer-border-gray-200 univer-bg-gray-0
univer-shadow-lg
dark:!univer-border-gray-600 dark:!univer-bg-gray-900
`,
diff --git a/packages/ui/src/views/workbench/Workbench.tsx b/packages/ui/src/views/workbench/Workbench.tsx
index dcfea6a213..b780af2192 100644
--- a/packages/ui/src/views/workbench/Workbench.tsx
+++ b/packages/ui/src/views/workbench/Workbench.tsx
@@ -156,7 +156,7 @@ export function DesktopWorkbenchContent(props: IUniverWorkbenchProps) {
<div
data-u-comp="workbench-layout"
className={clsx(`
- univer-flex univer-h-full univer-min-h-0 univer-flex-col univer-bg-white
+ univer-flex univer-h-full univer-min-h-0 univer-flex-col univer-bg-gray-0
dark:!univer-bg-gray-800
`, {
'univer-dark': darkMode,
@@ -169,7 +169,7 @@ export function DesktopWorkbenchContent(props: IUniverWorkbenchProps) {
{/* user header */}
<div
className={`
- univer-relative univer-flex univer-min-h-0 univer-flex-col univer-bg-white
+ univer-relative univer-flex univer-min-h-0 univer-flex-col univer-bg-gray-0
dark:!univer-bg-gray-800
`}
>
@@ -209,7 +209,7 @@ export function DesktopWorkbenchContent(props: IUniverWorkbenchProps) {
<section
className={clsx(`
univer-relative univer-grid univer-flex-1 univer-grid-rows-[auto_1fr]
- univer-overflow-hidden univer-bg-white
+ univer-overflow-hidden univer-bg-gray-0
dark:!univer-bg-gray-800
`, borderBottomClassName)}
>