-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs: fix broken colors page * feat(button): add dark mode for the button * feat: add ColorMode wrapper components to force a certain color mode * docs: add documentation for ColorMode component * test: ColorMode wrapper test * docs: add documentation of the InvertedColorMode component * feat(button): add dark mode for the text button * feat(input): add dark mode * feat(password): add dark mode * feat(select): add dark mode * feat(select-list): add dark mode * feat(textarea): add dark mode * feat(datepicker): add dark mode * feat(tooltip): add dark mode * feat(tag): add dark mode * feat(search): add dark mode * feat(checkbox): add dark mode * feat(radiobutton): add dark mode * feat(toggle): add dark mode * feat(filepicker): add dark mode * feat(card): add dark mode * feat(modal): add dark mode * feat(headline): add dark mode * feat(tooltip): add dark mode * feat(accordion): add dark mode * feat(popover): add dark mode * feat(pagination): add dark mode * feat(table): add dark mode * feat(table): fix dark mode * feat(label): add dark mode * feat(Text): add dark mode * feat(HelperText): add dark mode * feat(Link): add dark mode * refactor: remove inverted props from docs * feat(text): change default color to "inherit" BREAKING CHANGE Text component will inherit the color from the surrounding context by default. In most of the cases it will be the primary color. New `primary` prop is added to enforce the primary text color * feat(banner): add dark mode * feat(infobanner): add dark mode * docs(infobanner): revert docs * fix(infobanner): fix links color * refactor: cleanup * feat(logo): support dark theme * feat(breadcrumb): add dark-mode * feat(color-scheme): rename and update related components Signed-off-by: Nikolai Lopin <nikolai.lopin@mytaxi.com> * refactor(infobanner): use building blocks for the default infobanner Signed-off-by: Nikolai Lopin <nikolai.lopin@mytaxi.com> * refactor(icon): inherit color from parent by default Signed-off-by: Nikolai Lopin <nikolai.lopin@mytaxi.com> * test: fix codemode outputs Signed-off-by: Nikolai Lopin <nikolai.lopin@mytaxi.com> * docs: fix the spelling Co-authored-by: martimalek <46452321+martimalek@users.noreply.github.com> * docs: fix the error in InvertedColorScheme description Co-authored-by: martimalek <46452321+martimalek@users.noreply.github.com> * fix(color): delete unused colors Signed-off-by: Nikolai Lopin <nikolai.lopin@mytaxi.com> * refactor(color): extract global style generation Signed-off-by: Nikolai Lopin <nikolai.lopin@mytaxi.com> * fix(infobanner): fix imports Signed-off-by: Nikolai Lopin <nikolai.lopin@mytaxi.com> * fix(input): create internal size prop for input The current solution relied on `size` property used on all levels. It caused TS errors because `input` HTML element already have `size` prop. Those two definitions were merged by TS causing type mismatch. I decided to create a separate `waveSize` property for HTML components to separate. I preserved the public API, while using the `waveSize` over the `size` internally Signed-off-by: Nikolai Lopin <nikolai.lopin@mytaxi.com> --------- Signed-off-by: Nikolai Lopin <nikolai.lopin@mytaxi.com> Co-authored-by: Phillip Barkmann <p.barkmann@mytaxi.com> Co-authored-by: Nelson Dornelas <nelson.dornelas@free-now.com> Co-authored-by: martimalek <46452321+martimalek@users.noreply.github.com>
- Loading branch information
1 parent
5b95032
commit 60ae4ed
Showing
358 changed files
with
1,928 additions
and
1,862 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React, { useState } from 'react'; | ||
import { Box } from '../../src/components/Box/Box'; | ||
import { Toggle } from '../../src/components/Toggle/Toggle'; | ||
import { getSemanticValue } from '../../src/utils/cssVariables'; | ||
import { ItemWrapper } from './ItemWrapper'; | ||
import { Text } from '../../src/components/Text/Text'; | ||
|
||
export const BoxWithSchemeToggle = ({ children }: { children: React.ReactNode }) => { | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
const [isLight, setIsLight] = useState(window.matchMedia('(prefers-color-scheme: light)').matches); | ||
return ( | ||
<Box className='wave'> | ||
<Box | ||
p={2} | ||
display="flex" | ||
alignItems="center" | ||
style={{ | ||
backgroundColor: getSemanticValue('background-surface-neutral-faded') | ||
}} | ||
> | ||
<Text>Light</Text> | ||
<Box px={1}> | ||
<Toggle | ||
value={isLight} | ||
onChange={() => { | ||
setIsLight(prev => !prev); | ||
}} | ||
/> | ||
</Box> | ||
<Text>Dark</Text> | ||
</Box> | ||
<ItemWrapper className={`${isLight ? 'light-scheme' : 'dark-scheme'} wave`} p={2}> | ||
{children} | ||
</ItemWrapper> | ||
</Box> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.