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.

fix(design): fix border color for dark mode styling (#5205)

白熱7ff0fd975548
diff --git a/packages/design/src/components/date-picker/index.css b/packages/design/src/components/date-picker/index.css
index 6951a8afe2..a8dc117e30 100644
--- a/packages/design/src/components/date-picker/index.css
+++ b/packages/design/src/components/date-picker/index.css
@@ -9,7 +9,7 @@
@apply univer-text-gray-900;
}
.univer-dark .univer-date-picker {
- @apply univer-text-white univer-bg-gray-900;
+ @apply univer-text-white univer-bg-gray-900 univer-border-gray-600;
}
.univer-date-picker-rtl {
@@ -312,6 +312,9 @@
overflow: hidden;
@apply univer-bg-white univer-border univer-border-solid univer-border-gray-200 univer-rounded univer-shadow univer-p-4;
}
+.univer-dark .univer-date-picker-panel-layout {
+ @apply univer-bg-gray-900 univer-border-gray-600;
+}
/* Input */
.univer-date-picker-input {
diff --git a/packages/design/src/components/date-range-picker/index.css b/packages/design/src/components/date-range-picker/index.css
index b352e49eb7..65858a554d 100644
--- a/packages/design/src/components/date-range-picker/index.css
+++ b/packages/design/src/components/date-range-picker/index.css
@@ -9,7 +9,7 @@
@apply univer-text-gray-900;
}
.univer-dark .univer-date-range-picker {
- @apply univer-text-white univer-bg-gray-900;
+ @apply univer-text-white univer-bg-gray-900 univer-border-gray-600;
}
.univer-date-range-picker-rtl {
@@ -270,6 +270,9 @@
overflow: hidden;
@apply univer-bg-white univer-border univer-border-solid univer-border-gray-200 univer-rounded univer-shadow univer-p-4;
}
+.univer-dark .univer-date-range-picker-panel-layout {
+ @apply univer-bg-gray-900 univer-border-gray-600;
+}
/* Input */
.univer-date-range-picker-input {
diff --git a/packages/design/src/components/select/MultipleSelect.tsx b/packages/design/src/components/select/MultipleSelect.tsx
index a7608425db..5bdf78066c 100644
--- a/packages/design/src/components/select/MultipleSelect.tsx
+++ b/packages/design/src/components/select/MultipleSelect.tsx
@@ -131,7 +131,7 @@ export function MultipleSelect(props: IMultipleSelectProps) {
univer-duration-200
dark:univer-bg-gray-700 dark:univer-text-white
`, borderClassName, {
- 'univer-border-primary-600 univer-outline-none univer-ring-2 univer-ring-primary-50': open && !borderless,
+ 'univer-border-primary-600 univer-outline-none univer-ring-2 univer-ring-primary-50 dark:univer-ring-primary-900': open && !borderless,
'univer-border-transparent univer-bg-transparent hover:univer-border-transparent': borderless,
'univer-cursor-not-allowed': disabled,
'hover:univer-border-primary-600': !disabled && !borderless,
diff --git a/packages/design/src/components/select/Select.tsx b/packages/design/src/components/select/Select.tsx
index b42510acdf..b8246255fd 100644
--- a/packages/design/src/components/select/Select.tsx
+++ b/packages/design/src/components/select/Select.tsx
@@ -140,7 +140,7 @@ export function Select(props: ISelectProps) {
return (
<DropdownMenu
- className="univer-w-[var(--radix-popper-anchor-width)] univer-min-w-36"
+ className="univer-w-[var(--radix-popper-anchor-width)] univer-min-w-36 max-h"
align="start"
open={open}
items={items}
@@ -155,7 +155,7 @@ export function Select(props: ISelectProps) {
univer-transition-colors univer-duration-200
dark:univer-bg-gray-700 dark:univer-text-white
`, borderClassName, {
- 'univer-border-primary-600 univer-outline-none univer-ring-2 univer-ring-primary-50': open && !borderless,
+ 'univer-border-primary-600 univer-outline-none univer-ring-2 univer-ring-primary-50 dark:univer-ring-primary-900': open && !borderless,
'univer-border-transparent univer-bg-transparent hover:univer-border-transparent': borderless,
'univer-cursor-not-allowed': disabled,
'hover:univer-border-primary-600': !disabled && !borderless,
diff --git a/packages/sheets-table-ui/src/views/components/SheetTableConditionPanel.tsx b/packages/sheets-table-ui/src/views/components/SheetTableConditionPanel.tsx
index 02a5baaad5..a2113cc0b8 100644
--- a/packages/sheets-table-ui/src/views/components/SheetTableConditionPanel.tsx
+++ b/packages/sheets-table-ui/src/views/components/SheetTableConditionPanel.tsx
@@ -150,7 +150,7 @@ export const SheetTableConditionPanel = (props: IConditionFilterProps) => {
</>
)}
{!!(subComponentType === ConditionSubComponentEnum.DatePicker) && (
- <div id="univer-table-date-picker-wrapper" style={{ background: '#fff', position: 'relative' }}>
+ <div id="univer-table-date-picker-wrapper">
<DatePicker
value={dayjs(conditionInfo.info.date)}
defaultPickerValue={dayjs()}
@@ -165,7 +165,7 @@ export const SheetTableConditionPanel = (props: IConditionFilterProps) => {
</div>
)}
{!!(subComponentType === ConditionSubComponentEnum.DateRange) && (
- <div id="univer-table-date-range-wrapper" style={{ background: '#fff', position: 'relative' }}>
+ <div id="univer-table-date-range-wrapper">
<DateRangePicker
value={[dayjs(conditionInfo.info.dateRange?.[0]) ?? dayjs(), dayjs(conditionInfo.info.dateRange?.[1]) ?? dayjs()]}
defaultPickerValue={[dayjs(), dayjs()]}