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

feat(theme)!: add new color and update accentuation colors #795

Merged
merged 1 commit into from
Sep 25, 2023
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 src/components/Dropdown/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const SecondaryDropdownItem = styled(RsuiteDropdown.Item)<{
:hover {
background-color: ${p => p.theme.color.cultured};
border: 1px solid ${p => p.theme.color.lightGray};
color: ${p => p.theme.color.blueYonder['100']};
color: ${p => p.theme.color.blueYonder};
}
&:not(:last-child) {
margin-bottom: 1px;
Expand Down
10 changes: 5 additions & 5 deletions src/components/Dropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ const PrimaryDropdown = styled(RsuiteDropdown)<{
padding: ${p => (p.$hasIcon ? '4px' : '5px')} 12px ${p => (p.$hasIcon ? '5px' : '7px')};

:hover {
background-color: ${p => p.theme.color.blueYonder['100']};
border: 1px solid ${p => p.theme.color.blueYonder['100']};
background-color: ${p => p.theme.color.blueYonder};
border: 1px solid ${p => p.theme.color.blueYonder};
color: ${p => p.theme.color.white};
}

:active {
background-color: ${p => p.theme.color.blueGray['100']};
border: 1px solid ${p => p.theme.color.blueGray['100']};
background-color: ${p => p.theme.color.blueGray};
border: 1px solid ${p => p.theme.color.blueGray};
color: ${p => p.theme.color.white};
}

Expand Down Expand Up @@ -93,7 +93,7 @@ const SecondaryDropdown = styled(RsuiteDropdown)<{
:active {
background-color: transparent;
border: none;
color: ${p => p.theme.color.blueYonder['100']};
color: ${p => p.theme.color.blueYonder};
}

> svg {
Expand Down
4 changes: 2 additions & 2 deletions src/components/SideMenu/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const MenuButton = styled(IconButton)<{
$isActive?: boolean
}>`
animation: none;
background: ${p => (p.$isActive ? p.theme.color.blueGray[100] : 'none')};
background: ${p => (p.$isActive ? p.theme.color.blueGray : 'none')};
border: 0;
border-bottom: solid 0.5px ${p => p.theme.color.slateGray};
color: ${p => (p.$isActive ? p.theme.color.white : p.theme.color.gainsboro)};
Expand All @@ -28,7 +28,7 @@ const MenuButton = styled(IconButton)<{

:hover,
:focus {
background: ${p => (p.$isActive ? p.theme.color.blueGray[100] : 'rgba(255, 255, 255, 0.125)')};
background: ${p => (p.$isActive ? p.theme.color.blueGray : 'rgba(255, 255, 255, 0.125)')};
border: 0;
border: none;
color: ${p => p.theme.color.white};
Expand Down
16 changes: 8 additions & 8 deletions src/components/SingleTag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,29 +80,29 @@ const PrimaryIconButton = styled(IconButton)`
`

const SecondaryText = styled(PrimaryText)`
background-color: ${p => p.theme.color.blueYonder[100]};
background-color: ${p => p.theme.color.blueYonder};
color: ${p => p.theme.color.white};
`

const SecondaryIconButton = styled(PrimaryIconButton)`
background-color: ${p => p.theme.color.blueYonder[100]};
background-color: ${p => p.theme.color.blueYonder};
color: ${p => p.theme.color.white};

:hover,
&._hover {
background-color: ${p => p.theme.color.blueYonder[100]};
color: ${p => p.theme.color.blueYonder[25]};
background-color: ${p => p.theme.color.blueYonder};
color: ${p => p.theme.color.blueYonder25};
}

:active,
&._active {
background-color: ${p => p.theme.color.blueYonder[100]};
color: ${p => p.theme.color.blueYonder[25]};
background-color: ${p => p.theme.color.blueYonder};
color: ${p => p.theme.color.blueYonder25};
}

:disabled,
&._disabled {
background-color: ${p => p.theme.color.blueYonder[100]};
color: ${p => p.theme.color.blueYonder[25]};
background-color: ${p => p.theme.color.blueYonder};
color: ${p => p.theme.color.blueYonder25};
}
`
32 changes: 16 additions & 16 deletions src/elements/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,15 @@ export const PrimaryButton = styled.button`

:hover,
&._hover {
background-color: ${p => p.theme.color.blueYonder['100']};
border: 1px solid ${p => p.theme.color.blueYonder['100']};
background-color: ${p => p.theme.color.blueYonder};
border: 1px solid ${p => p.theme.color.blueYonder};
color: ${p => p.theme.color.white};
}

:active,
&._active {
background-color: ${p => p.theme.color.blueGray['100']};
border: 1px solid ${p => p.theme.color.blueGray['100']};
background-color: ${p => p.theme.color.blueGray};
border: 1px solid ${p => p.theme.color.blueGray};
color: ${p => p.theme.color.white};
}

Expand All @@ -153,16 +153,16 @@ export const SecondaryButton = styled.button`

:hover,
&._hover {
background-color: ${p => p.theme.color.blueYonder['25']};
border: 1px solid ${p => p.theme.color.blueYonder['100']};
color: ${p => p.theme.color.blueYonder['100']};
background-color: ${p => p.theme.color.blueYonder25};
border: 1px solid ${p => p.theme.color.blueYonder};
color: ${p => p.theme.color.blueYonder};
}

:active,
&._active {
background-color: ${p => p.theme.color.blueGray['25']};
border: 1px solid ${p => p.theme.color.blueGray['100']};
color: ${p => p.theme.color.blueGray['100']};
background-color: ${p => p.theme.color.blueGray25};
border: 1px solid ${p => p.theme.color.blueGray};
color: ${p => p.theme.color.blueGray};
}

:disabled,
Expand All @@ -180,16 +180,16 @@ export const TertiaryButton = styled.button`

:hover,
&._hover {
background-color: ${p => p.theme.color.blueYonder['25']};
border: 1px solid ${p => p.theme.color.blueYonder['25']};
color: ${p => p.theme.color.blueYonder['100']};
background-color: ${p => p.theme.color.blueYonder25};
border: 1px solid ${p => p.theme.color.blueYonder25};
color: ${p => p.theme.color.blueYonder};
}

:active,
&._active {
background-color: ${p => p.theme.color.blueGray['25']};
border: 1px solid ${p => p.theme.color.blueGray['100']};
color: ${p => p.theme.color.blueGray['100']};
background-color: ${p => p.theme.color.blueGray25};
border: 1px solid ${p => p.theme.color.blueGray};
color: ${p => p.theme.color.blueGray};
}

:disabled,
Expand Down
4 changes: 2 additions & 2 deletions src/elements/IconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ const TertiaryButton = styled.button<{
&._hover {
background-color: transparent;
border: ${p => (p.isCompact ? 0 : '1px solid transparent')};
color: ${p => p.theme.color.blueYonder['100']};
color: ${p => p.theme.color.blueYonder};
}

:active,
&._active {
background-color: transparent;
border: ${p => (p.isCompact ? 0 : '1px solid transparent')};
color: ${p => p.theme.color.blueGray['100']};
color: ${p => p.theme.color.blueGray};
}

:disabled,
Expand Down
16 changes: 8 additions & 8 deletions src/fields/DatePicker/CalendarPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export const Box = styled.div`
width: 33px;

&.rs-calendar-table-cell-in-range:before {
background-color: ${p => p.theme.color.blueGray[25]};
background-color: ${p => p.theme.color.blueGray25};
height: 33px;
margin-top: 0;
}
Expand All @@ -177,8 +177,8 @@ export const Box = styled.div`
width: 33px;
}
&:hover .rs-calendar-table-cell-content {
background-color: ${p => p.theme.color.blueYonder[25]};
color: ${p => p.theme.color.blueYonder[100]};
background-color: ${p => p.theme.color.blueYonder25};
color: ${p => p.theme.color.blueYonder};
}
&[role='columnheader'] .rs-calendar-table-cell-content,
&[role='columnheader']:hover .rs-calendar-table-cell-content {
Expand All @@ -190,7 +190,7 @@ export const Box = styled.div`
color: ${p => p.theme.color.lightGray};
}
&.rs-calendar-table-cell-selected > .rs-calendar-table-cell-content {
background-color: ${p => p.theme.color.blueGray[100]};
background-color: ${p => p.theme.color.blueGray};
}
}
}
Expand All @@ -203,7 +203,7 @@ export const Box = styled.div`
color: ${p => p.theme.color.slateGray};

&.rs-calendar-month-dropdown-year-active {
color: ${p => p.theme.color.blueYonder[100]};
color: ${p => p.theme.color.blueYonder};
}
}

Expand All @@ -219,11 +219,11 @@ export const Box = styled.div`
width: 33px;
}
&:hover > .rs-calendar-month-dropdown-cell-content {
background-color: ${p => p.theme.color.blueYonder[25]};
color: ${p => p.theme.color.blueYonder[100]};
background-color: ${p => p.theme.color.blueYonder25};
color: ${p => p.theme.color.blueYonder};
}
&.rs-calendar-month-dropdown-cell-active > .rs-calendar-month-dropdown-cell-content {
background-color: ${p => p.theme.color.blueGray[100]};
background-color: ${p => p.theme.color.blueGray};
color: ${p => p.theme.color.white};
}
}
Expand Down
12 changes: 4 additions & 8 deletions src/fields/DateRangePicker/DateInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@ const Box = styled.div<{
background-color: ${p => (p.$isLight ? p.theme.color.white : p.theme.color.gainsboro)};
box-shadow: ${p =>
p.$hasError || p.$isFocused
? `inset 0px 0px 0px 1px ${p.$hasError ? p.theme.color.maximumRed : p.theme.color.blueGray[100]}`
? `inset 0px 0px 0px 1px ${p.$hasError ? p.theme.color.maximumRed : p.theme.color.blueGray}`
: 'none'};
color: ${p => (p.$isFocused ? p.theme.color.blueGray[100] : p.theme.color.slateGray)};
color: ${p => (p.$isFocused ? p.theme.color.blueGray : p.theme.color.slateGray)};
display: inline-flex;
font-size: inherit;
justify-content: space-between;
Expand All @@ -261,13 +261,9 @@ const Box = styled.div<{
box-shadow: ${p =>
`inset 0px 0px 0px 1px ${
// eslint-disable-next-line no-nested-ternary
p.$isDisabled
? p.theme.color.cultured
: p.$isFocused
? p.theme.color.blueGray[100]
: p.theme.color.blueYonder[100]
p.$isDisabled ? p.theme.color.cultured : p.$isFocused ? p.theme.color.blueGray : p.theme.color.blueYonder
}`};
color: ${p => (p.$isFocused ? p.theme.color.blueGray[100] : p.theme.color.blueYonder[100])};
color: ${p => (p.$isFocused ? p.theme.color.blueGray : p.theme.color.blueYonder)};
}

> div:nth-child(2) {
Expand Down
16 changes: 8 additions & 8 deletions src/fields/DateRangePicker/RangeCalendarPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ const Box = styled.div`
width: 33px;

&.rs-calendar-table-cell-in-range:before {
background-color: ${p => p.theme.color.blueGray[25]};
background-color: ${p => p.theme.color.blueGray25};
height: 33px;
margin-top: 0;
}
Expand All @@ -219,8 +219,8 @@ const Box = styled.div`
width: 33px;
}
&:hover .rs-calendar-table-cell-content {
background-color: ${p => p.theme.color.blueYonder[25]};
color: ${p => p.theme.color.blueYonder[100]};
background-color: ${p => p.theme.color.blueYonder25};
color: ${p => p.theme.color.blueYonder};
}
&[role='columnheader'] .rs-calendar-table-cell-content,
&[role='columnheader']:hover .rs-calendar-table-cell-content {
Expand All @@ -232,7 +232,7 @@ const Box = styled.div`
color: ${p => p.theme.color.lightGray};
}
&.rs-calendar-table-cell-selected > .rs-calendar-table-cell-content {
background-color: ${p => p.theme.color.blueGray[100]};
background-color: ${p => p.theme.color.blueGray};
}
}
}
Expand All @@ -245,7 +245,7 @@ const Box = styled.div`
color: ${p => p.theme.color.slateGray};

&.rs-calendar-month-dropdown-year-active {
color: ${p => p.theme.color.blueYonder[100]};
color: ${p => p.theme.color.blueYonder};
}
}

Expand All @@ -261,11 +261,11 @@ const Box = styled.div`
width: 33px;
}
&:hover > .rs-calendar-month-dropdown-cell-content {
background-color: ${p => p.theme.color.blueYonder[25]};
color: ${p => p.theme.color.blueYonder[100]};
background-color: ${p => p.theme.color.blueYonder25};
color: ${p => p.theme.color.blueYonder};
}
&.rs-calendar-month-dropdown-cell-active > .rs-calendar-month-dropdown-cell-content {
background-color: ${p => p.theme.color.blueGray[100]};
background-color: ${p => p.theme.color.blueGray};
color: ${p => p.theme.color.white};
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/fields/DateRangePicker/RangedTimePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,14 @@ const Box = styled.div`
const Option = styled.div<{
isSelected: boolean
}>`
background-color: ${p => (p.isSelected ? p.theme.color.blueGray[100] : 'transparent')};
background-color: ${p => (p.isSelected ? p.theme.color.blueGray : 'transparent')};
color: ${p => (p.isSelected ? p.theme.color.white : p.theme.color.gunMetal)};
cursor: pointer;
line-height: 1;
padding: 5px 0 7px 6.5px;

:hover {
background-color: ${p => (p.isSelected ? p.theme.color.blueGray[100] : p.theme.color.blueYonder[25])};
background-color: ${p => (p.isSelected ? p.theme.color.blueGray : p.theme.color.blueYonder25)};
}

> span {
Expand Down
12 changes: 4 additions & 8 deletions src/fields/DateRangePicker/TimeInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ const Box = styled.div<{
background-color: ${p => (p.$isLight ? p.theme.color.white : p.theme.color.gainsboro)};
box-shadow: ${p =>
p.$hasError || p.$isFocused
? `inset 0px 0px 0px 1px ${p.$hasError ? p.theme.color.maximumRed : p.theme.color.blueGray[100]}`
? `inset 0px 0px 0px 1px ${p.$hasError ? p.theme.color.maximumRed : p.theme.color.blueGray}`
: 'none'};
color: ${p => (p.$isFocused ? p.theme.color.blueGray[100] : p.theme.color.slateGray)};
color: ${p => (p.$isFocused ? p.theme.color.blueGray : p.theme.color.slateGray)};
display: inline-block;
font-size: inherit;
padding: ${p => (p.$isCompact ? '4.5px 8px 7px' : '3px 8px 5px')};
Expand All @@ -265,13 +265,9 @@ const Box = styled.div<{
box-shadow: ${p =>
`inset 0px 0px 0px 1px ${
// eslint-disable-next-line no-nested-ternary
p.$isDisabled
? p.theme.color.cultured
: p.$isFocused
? p.theme.color.blueGray[100]
: p.theme.color.blueYonder[100]
p.$isDisabled ? p.theme.color.cultured : p.$isFocused ? p.theme.color.blueGray : p.theme.color.blueYonder
}`};
color: ${p => (p.$isFocused ? p.theme.color.blueGray[100] : p.theme.color.blueYonder[100])};
color: ${p => (p.$isFocused ? p.theme.color.blueGray : p.theme.color.blueYonder)};
}
`

Expand Down
6 changes: 3 additions & 3 deletions src/fields/MultiSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ const Box = styled.div<{
return p.theme.color.maximumRed
}
if (p.$isActive) {
return p.theme.color.blueGray[100]
return p.theme.color.blueGray
}

return p.theme.color.gainsboro
Expand All @@ -221,12 +221,12 @@ const Box = styled.div<{
width: 100%;

:hover {
border: solid 1px ${p => (p.$hasError ? p.theme.color.maximumRed : p.theme.color.blueYonder[100])} !important;
border: solid 1px ${p => (p.$hasError ? p.theme.color.maximumRed : p.theme.color.blueYonder)} !important;
}

:active,
:focus {
border: solid 1px ${p => (p.$hasError ? p.theme.color.maximumRed : p.theme.color.blueGray[100])} !important;
border: solid 1px ${p => (p.$hasError ? p.theme.color.maximumRed : p.theme.color.blueGray)} !important;
}

> .rs-picker-toggle {
Expand Down
4 changes: 2 additions & 2 deletions src/fields/NumberInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,12 @@ const StyledInput = styled(Input)<{
width: 100%;

:hover {
border: solid 1px ${p => (p.$hasError ? p.theme.color.maximumRed : p.theme.color.blueYonder[100])} !important;
border: solid 1px ${p => (p.$hasError ? p.theme.color.maximumRed : p.theme.color.blueYonder)} !important;
}

:active,
:focus {
border: solid 1px ${p => (p.$hasError ? p.theme.color.maximumRed : p.theme.color.blueGray[100])} !important;
border: solid 1px ${p => (p.$hasError ? p.theme.color.maximumRed : p.theme.color.blueGray)} !important;
outline: 0;
}
`
Loading