Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replaced deprecated colors #310

Merged
merged 2 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/docs/components/core/navbars/Tabs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Background color for tab

| Type | DEFAULT |
|:-------|:-------------------|
| string | colors.ElementBase |
| string | colors.ElementAccent |

Background color for active tab

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Predefined name for AlertContent

| TYPE | DEFAULT |
|:-------|:----------------|
| string | colors.IconBase |
| string | colors.IconAccent |

Predefined color for AlertContent

Expand Down
2 changes: 1 addition & 1 deletion packages/calendar/src/Calendar/Calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const Calendar: FC<ICalendar> = props => {
const [yearRange, setYearRange] = useState<number[]>(
calculateYearRange(currentYear),
);
const dateDots = getDottedDates(dottedDates, colors.ElementBase);
const dateDots = getDottedDates(dottedDates, colors.ElementAccent);
const dateToday = getMarkedToday(colorsArg);

const themeStyles = useMemo(
Expand Down
8 changes: 6 additions & 2 deletions packages/calendar/src/Calendar/components/Months.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@ const Months: FC<IMonths> = props => {
const getStyle = useCallback(
({pressed}: {pressed: boolean}) => [
styles.month,
{backgroundColor: pressed ? colors.BgAccentSoft : colors.BgPrimary},
{
backgroundColor: pressed
? colors.AdditionalSixthSoft
: colors.BgPrimary,
},
],
[colors.BgAccentSoft, colors.BgPrimary],
[colors.AdditionalSixthSoft, colors.BgPrimary],
);

const renderItem = useCallback(
Expand Down
6 changes: 5 additions & 1 deletion packages/calendar/src/Calendar/components/Years.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ const Years: FC<IYears> = props => {
const getStyle = useCallback(
({pressed}: {pressed: boolean}) => [
styles.year,
{backgroundColor: pressed ? colors.BgAccentSoft : colors.BgPrimary},
{
backgroundColor: pressed
? colors.AdditionalSixthSoft
: colors.BgPrimary,
},
],
[],
);
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/controls/CheckBox/CheckSquare.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const CheckSquare: FC<ICommonControlProps & IPressableProps> = ({
<Check
width={width}
height={height}
fill={rest.fill || colors.ElementBase}
fill={rest.fill || colors.ElementAccent}
/>
) : null}
</Pressable>
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/controls/Swipe/Swipe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const Swipe: FC<ISwipe> = ({
inputRange: [leftPos, rightPos],
outputRange: [
passiveColor || colors.ElementMuted,
activeColor || colors.ElementBase,
activeColor || colors.ElementAccent,
],
extrapolate: 'clamp',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ exports[`@lad-tech/mobydick-core/DropDown multiselect snapshot 1`] = `
{
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
"borderRadius": 8,
"flexDirection": "row",
"padding": 4,
Expand Down Expand Up @@ -582,7 +582,7 @@ exports[`@lad-tech/mobydick-core/DropDown renders correctly 10 elements type val
[
{
"alignItems": "center",
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
"borderColor": "transparent",
"borderRadius": 8,
"borderWidth": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const styleSource = createStyles(({colors, spaces}) => ({
borderRadius: spaces.Space8,
padding: spaces.Space4,
paddingLeft: spaces.Space8,
backgroundColor: colors.BgAccentSoft,
backgroundColor: colors.AdditionalSixthSoft,
},
text: {
marginRight: spaces.Space4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function renderItem<T extends IListItem>(props: IRenderItemProps<T>) {

const backgroundColorItem = selectedItemColor
? {backgroundColor: selectedItemColor}
: {backgroundColor: theme.colors.BgAccentSoft};
: {backgroundColor: theme.colors.AdditionalSixthSoft};

return (
<TouchableHighlight
Expand All @@ -109,7 +109,9 @@ function renderItem<T extends IListItem>(props: IRenderItemProps<T>) {
]}
onPress={() => renderItemOnPress(item)}
underlayColor={
selectedItemColor ? selectedItemColor : theme.colors.BgAccentSoft
selectedItemColor
? selectedItemColor
: theme.colors.AdditionalSixthSoft
}>
<TypographyLegacy
style={isSelected() ? flatListTextStylePressed : flatListTextStyle}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports[`@lad-tech/mobydick-core/Chip renders correctly and onPress fired 1`] =
{
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
"borderRadius": 8,
"flexDirection": "row",
"padding": 4,
Expand Down Expand Up @@ -90,7 +90,7 @@ exports[`@lad-tech/mobydick-core/Chip renders correctly with maxTextLength 1`] =
{
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
"borderRadius": 8,
"flexDirection": "row",
"padding": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exports[`@lad-tech/mobydick-core/ChipList renders correctly and onChange fired 1
{
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
"borderRadius": 8,
"flexDirection": "row",
"padding": 4,
Expand Down Expand Up @@ -97,7 +97,7 @@ exports[`@lad-tech/mobydick-core/ChipList renders correctly and onChange fired 1
{
"alignItems": "center",
"alignSelf": "flex-start",
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
"borderRadius": 8,
"flexDirection": "row",
"padding": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ exports[`@lad-tech/mobydick-core/Selector Selector custom flatList styles 1`] =
},
undefined,
{
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
},
]
}
Expand Down Expand Up @@ -300,7 +300,7 @@ exports[`@lad-tech/mobydick-core/Selector Selector custom with array in selected
},
undefined,
{
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
},
]
}
Expand Down Expand Up @@ -900,7 +900,7 @@ exports[`@lad-tech/mobydick-core/Selector render correct renderItem Typography
},
undefined,
{
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
},
]
}
Expand Down Expand Up @@ -1062,7 +1062,7 @@ exports[`@lad-tech/mobydick-core/Selector render correct renderItem Typography w
},
undefined,
{
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
},
]
}
Expand Down Expand Up @@ -1410,7 +1410,7 @@ exports[`@lad-tech/mobydick-core/Selector renders correctly with bottom padding
},
undefined,
{
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
},
]
}
Expand Down Expand Up @@ -1467,7 +1467,7 @@ exports[`@lad-tech/mobydick-core/Selector renders correctly with bottom padding
},
undefined,
{
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
},
]
}
Expand Down Expand Up @@ -1524,7 +1524,7 @@ exports[`@lad-tech/mobydick-core/Selector renders correctly with bottom padding
},
undefined,
{
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
},
]
}
Expand Down Expand Up @@ -1581,7 +1581,7 @@ exports[`@lad-tech/mobydick-core/Selector renders correctly with bottom padding
},
undefined,
{
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
},
]
}
Expand Down Expand Up @@ -1638,7 +1638,7 @@ exports[`@lad-tech/mobydick-core/Selector renders correctly with bottom padding
},
undefined,
{
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
},
]
}
Expand Down Expand Up @@ -1695,7 +1695,7 @@ exports[`@lad-tech/mobydick-core/Selector renders correctly with bottom padding
},
undefined,
{
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
},
]
}
Expand Down Expand Up @@ -1752,7 +1752,7 @@ exports[`@lad-tech/mobydick-core/Selector renders correctly with bottom padding
},
undefined,
{
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
},
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly valid 1`] = `
[
{
"alignItems": "center",
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
"borderColor": "transparent",
"borderRadius": 8,
"borderWidth": 1,
Expand Down Expand Up @@ -836,7 +836,7 @@ exports[`@lad-tech/mobydick-core/InputField renders correctly valid 2`] = `
[
{
"alignItems": "center",
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
"borderColor": "#29A35C",
"borderRadius": 8,
"borderWidth": 1,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/inputs/style/validStyle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const validStyle = <
const {inputContainer} = defaultStyles;

inputContainer.borderColor = active ? colors.BorderSuccess : 'transparent';
inputContainer.backgroundColor = colors.BgAccentSoft;
inputContainer.backgroundColor = colors.AdditionalSixthSoft;

return defaultStyles;
};
2 changes: 1 addition & 1 deletion packages/core/src/other/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Пропсы:
type — primary, secondary, tertiary, tertiary, destructive;
count — число;
без count — будет нарисован indicator c цветом ElementAttention;
без count — будет нарисован indicator c цветом ElementError;
style — можно передать свой backgroundColor, и через top, right, bottom, left — расположить в нужном месте, по дефолту position: absolute;
size — medium(24), small(18), по default — medium;
maxLength —— по default 2, отображает максимальное заданное количество чисел;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ exports[`Status render type tag blue 1`] = `
"paddingVertical": 2,
},
{
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
},
{
"flex": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const StatusTag = ({state, text, style}: IProps) => {
const getBackgroundColorText = useCallback(() => {
switch (state) {
case IStatusState.blue:
return colors.BgAccentSoft;
return colors.AdditionalSixthSoft;
case IStatusState.red:
return colors.BgError;
case IStatusState.green:
Expand All @@ -49,7 +49,7 @@ const StatusTag = ({state, text, style}: IProps) => {
}
}, [
state,
colors.BgAccentSoft,
colors.AdditionalSixthSoft,
colors.BgError,
colors.BgSuccess,
colors.BgWarning,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`@lad-tech/mobydick-core/modalBase should renders correctly AlertContent
style={
[
{
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
"borderRadius": 100,
"padding": 12,
},
Expand Down Expand Up @@ -33,7 +33,7 @@ exports[`@lad-tech/mobydick-core/modalBase should renders correctly AlertContent
style={
[
{
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
"borderRadius": 100,
"padding": 12,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const stylesCreate = createStyles(({spaces, colors}) => {
alertView: {
borderRadius: 100,
padding: spaces.Space12,
backgroundColor: colors.BgAccentSoft,
backgroundColor: colors.AdditionalSixthSoft,
},
text: {
marginTop: spaces.Space24,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ exports[`@lad-tech/mobydick-core/modalAsk should renders correctly 1`] = `
style={
[
{
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
"borderRadius": 100,
"padding": 12,
},
Expand Down Expand Up @@ -378,7 +378,7 @@ exports[`@lad-tech/mobydick-core/modalAsk should renders correctly with optional
style={
[
{
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
"borderRadius": 100,
"padding": 12,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ exports[`@lad-tech/mobydick-core/modalError should renders correctly 1`] = `
style={
[
{
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
"borderRadius": 100,
"padding": 12,
},
Expand Down Expand Up @@ -310,7 +310,7 @@ exports[`@lad-tech/mobydick-core/modalError should renders correctly with option
style={
[
{
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
"borderRadius": 100,
"padding": 12,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ exports[`@lad-tech/mobydick-core/modalSuccess should renders correctly 1`] = `
style={
[
{
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
"borderRadius": 100,
"padding": 12,
},
Expand Down Expand Up @@ -308,7 +308,7 @@ exports[`@lad-tech/mobydick-core/modalSuccess should renders correctly with opti
style={
[
{
"backgroundColor": "rgba(43, 120, 238, 0.15)",
"backgroundColor": "rgba(91, 153, 249, 0.1)",
"borderRadius": 100,
"padding": 12,
},
Expand Down
Loading
Loading