From df9bf5f49215018866c978d21575b950ba3e4fdc Mon Sep 17 00:00:00 2001 From: Mikhail Shatikhin Date: Mon, 10 Jun 2024 11:20:42 +0500 Subject: [PATCH] fix: after rebase --- .../Autocomplete/Autocomplete.styles.ts | 7 +++-- .../components/Calendar/CalendarDay.tsx | 6 ++-- .../components/Calendar/DayCellView.styles.ts | 22 +++++++------- .../components/Calendar/DayCellView.tsx | 4 +-- .../react-ui/components/Calendar/Month.tsx | 3 +- .../components/Calendar/MonthView.styles.ts | 30 +++++++++---------- .../components/Calendar/MonthView.tsx | 4 +-- .../internal/DateSelect/DateSelect.styles.ts | 6 ++-- .../internal/DateSelect/DateSelect.tsx | 1 + 9 files changed, 44 insertions(+), 39 deletions(-) diff --git a/packages/react-ui/components/Autocomplete/Autocomplete.styles.ts b/packages/react-ui/components/Autocomplete/Autocomplete.styles.ts index 3864229ce47..3554cdddf92 100644 --- a/packages/react-ui/components/Autocomplete/Autocomplete.styles.ts +++ b/packages/react-ui/components/Autocomplete/Autocomplete.styles.ts @@ -11,9 +11,10 @@ export const getStyles = (emotion: Emotion) => width: ${t.inputWidth}; `; }, - noPortal() { - return css` + + noPortal() { + return emotion.css` position: relative; `; - }, + }, }); diff --git a/packages/react-ui/components/Calendar/CalendarDay.tsx b/packages/react-ui/components/Calendar/CalendarDay.tsx index 347c10368c7..65a25e18fdd 100644 --- a/packages/react-ui/components/Calendar/CalendarDay.tsx +++ b/packages/react-ui/components/Calendar/CalendarDay.tsx @@ -2,7 +2,7 @@ import React, { PropsWithChildren, useContext, memo } from 'react'; import { useLocaleForControl } from '../../lib/locale/useLocaleForControl'; import { ThemeContext } from '../../lib/theming/ThemeContext'; -import { cx } from '../../lib/theming/Emotion'; +import { cx, useEmotion } from '../../lib/theming/Emotion'; import { isTheme2022 } from '../../lib/theming/ThemeHelpers'; import { DatePickerLocaleHelper } from '../DatePicker/locale'; import { InternalDate } from '../../lib/date/InternalDate'; @@ -10,7 +10,7 @@ import { LocaleContext } from '../../lib/locale'; import { getVisualStateDataAttributes } from '../../internal/CommonWrapper/utils/getVisualStateDataAttributes'; import { forwardRefAndName } from '../../lib/forwardRefAndName'; -import { styles } from './DayCellView.styles'; +import { getStyles } from './DayCellView.styles'; import { CalendarDataTids } from './Calendar'; export interface CalendarDayProps extends React.HTMLAttributes { @@ -41,6 +41,7 @@ export const CalendarDay = memo( ref: React.Ref, ) { const theme = useContext(ThemeContext); + const emotion = useEmotion(); const _isTheme2022 = isTheme2022(theme); const { langCode } = useContext(LocaleContext); @@ -51,6 +52,7 @@ export const CalendarDay = memo( const { date: day } = internalDate.getComponentsLikeNumber(); const caption = children ?? day; + const styles = getStyles(emotion); return (