Skip to content

Commit

Permalink
docs: update docs with new tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
DSil committed Dec 20, 2024
1 parent ef8236b commit 7ebaa32
Show file tree
Hide file tree
Showing 21 changed files with 38 additions and 36 deletions.
4 changes: 2 additions & 2 deletions docs/src/__examples__/ButtonPrimitive/DEFAULT.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export default {
Example: () => (
<ButtonPrimitive
background="linear-gradient(264.15deg, #FC8D3E 0%, #F16E5B 100%)"
foreground={defaultTheme.orbit.colorTextWhite}
padding={defaultTheme.orbit.paddingButtonNormal}
foreground={defaultTheme.orbit.textWhiteForeground}
padding={`0 ${defaultTheme.orbit.space400}`}
>
Click me
</ButtonPrimitive>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/__examples__/Grid/DEFAULT.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
background: `${defaultTheme.orbit.paletteCloudNormal}`,
border: `1px solid ${defaultTheme.orbit.paletteProductDark}`,
"box-sizing": "border-box",
padding: `${defaultTheme.orbit.paddingButtonSmall}`,
padding: `0 ${defaultTheme.orbit.space300}`,
};

return (
Expand Down
4 changes: 2 additions & 2 deletions docs/src/__examples__/Illustration/SIZES.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default {
<Heading as="h3" type="title3">
Extra small
</Heading>
<Text>Height: {defaultTheme.orbit.heightIllustrationSmall}</Text>
<Text>Height: {defaultTheme.orbit.illustrationExtraSmallHeight}</Text>
<Illustration
size="extraSmall"
alt="Jump to the front of the line when boarding"
Expand All @@ -31,7 +31,7 @@ export default {
<Heading as="h3" type="title3">
Medium
</Heading>
<Text>Height: {defaultTheme.orbit.heightIllustrationMedium}</Text>
<Text>Height: {defaultTheme.orbit.illustrationMediumHeight}</Text>
<Illustration
size="medium"
alt="Jump to the front of the line when boarding"
Expand Down
4 changes: 2 additions & 2 deletions docs/src/__examples__/Layout/BOOKING.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import defaultTheme from "@kiwicom/orbit-components/lib/defaultTheme";
export default {
Example: () => {
const divStyle = {
minHeight: `${defaultTheme.orbit.heightIllustrationMedium}`,
background: `${defaultTheme.orbit.backgroundBody}`,
minHeight: `${defaultTheme.orbit.illustrationMediumHeight}`,
background: `${defaultTheme.orbit.elevationSuppressedBackground}`,
};

return (
Expand Down
4 changes: 2 additions & 2 deletions docs/src/__examples__/Layout/CUSTOM.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import defaultTheme from "@kiwicom/orbit-components/lib/defaultTheme";
export default {
Example: () => {
const divStyle = {
minHeight: defaultTheme.orbit.heightIllustrationMedium,
background: defaultTheme.orbit.backgroundBody,
minHeight: defaultTheme.orbit.illustrationMediumHeight,
background: defaultTheme.orbit.elevationSuppressedBackground,
};

return (
Expand Down
4 changes: 2 additions & 2 deletions docs/src/__examples__/Layout/MMB.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { Layout, LayoutColumn, Text } from "@kiwicom/orbit-components";
export default {
Example: () => {
const style = {
minHeight: defaultTheme.orbit.heightIllustrationMedium,
background: defaultTheme.orbit.backgroundBody,
minHeight: defaultTheme.orbit.illustrationMediumHeight,
background: defaultTheme.orbit.elevationSuppressedBackground,
};
return (
<Layout type="MMB">
Expand Down
4 changes: 2 additions & 2 deletions docs/src/__examples__/Layout/SEARCH.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import defaultTheme from "@kiwicom/orbit-components/lib/defaultTheme";
export default {
Example: () => {
const divStyle = {
minHeight: `${defaultTheme.orbit.heightIllustrationMedium}`,
background: `${defaultTheme.orbit.backgroundBody}`,
minHeight: `${defaultTheme.orbit.illustrationMediumHeight}`,
background: `${defaultTheme.orbit.elevationSuppressedBackground}`,
};
return (
<Layout type="Search">
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/BrandedTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const StyledWrapper = styled.a<{ primary: string; type?: "primary" | "secondary"
padding: 2rem;
border-radius: 1rem;
background: ${primary};
color: ${theme.orbit.colorTextWhite};
color: ${theme.orbit.textWhiteForeground};
transition: box-shadow ${theme.orbit.durationFast};
display: flex;
overflow: hidden;
Expand Down
4 changes: 3 additions & 1 deletion docs/src/components/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ const StyledListItem = styled.li<{ current: boolean }>`
${({ theme, current }) => css`
a,
span {
color: ${current ? theme.orbit.colorTextLinkPrimary : theme.orbit.colorTextSecondary};
color: ${current
? theme.orbit.textLinkPrimaryForeground
: theme.orbit.textLinkSecondaryForeground};
margin-right: ${theme.orbit.space200};
}
`}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/DocLayout/TopBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const TopBar = ({
}}
>
{breadcrumbs && <Breadcrumbs breadcrumbs={breadcrumbs} />}
<Box padding={{ bottom: hasLowerLayer ? "medium" : "none" }}>
<Box padding={{ bottom: hasLowerLayer ? "400" : "none" }}>
<Stack inline align="center" spaceAfter="small">
<AddBookmark title={title} description={description} />
<div
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/ElevationLevel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default ({ level }: ElevationLevelProps) => {
backgroundColor = theme.orbit.paletteCloudLight;
break;
case "flat":
border = `${theme.orbit.borderWidthCard} ${theme.orbit.borderStyleCard} ${theme.orbit.borderColorCard}`;
border = `${theme.orbit.elevationFlatBorderSize} solid ${theme.orbit.elevationFlatBorderColor}`;
break;
case 1:
boxShadow = theme.orbit.elevationLevel1BoxShadow;
Expand Down
4 changes: 2 additions & 2 deletions docs/src/components/Github/TeamMember.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { SiDribbble as Dribbble, SiGithub as Github } from "@icons-pack/react-si
import { Contributor } from ".";

const StyledHeading = styled.h4`
color: ${({ theme }) => theme.orbit.colorHeading};
color: ${({ theme }) => theme.orbit.headingForeground};
font-size: calc(1em + 2px);
font-weight: ${({ theme }) => theme.orbit.fontWeightBold};
width: 100%;
Expand All @@ -26,7 +26,7 @@ const StyledLink = styled.a.attrs(() => ({

const StyledInfo = styled.div`
height: 100%;
color: ${({ theme }) => theme.orbit.colorTextPrimary};
color: ${({ theme }) => theme.orbit.textPrimaryForeground};
`;

interface Props extends Contributor {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/ImageContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const ImageContainer = ({ align = "center", border, size = "large", children }:
margin: ${getContainerMargin()};
width: 100%;
max-width: ${getContainerWidth()};
${border && `border: 1px solid ${defaultTheme.orbit.borderColorTableCell};`}
${border && `border: 1px solid ${defaultTheme.orbit.paletteCloudDark};`}
`}
>
{children}
Expand Down
6 changes: 3 additions & 3 deletions docs/src/components/ImagesDownloadList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ const StyledAnchor = styled.a`
${({ theme }) => css`
background-color: ${theme.orbit.paletteProductLight};
color: ${theme.orbit.paletteProductNormal};
padding: ${theme.orbit.paddingButtonSmallWithLeftIcon};
padding: 0 ${theme.orbit.space300} 0 ${theme.orbit.space200};
padding-top: ${theme.orbit.space100};
height: ${theme.orbit.heightButtonSmall};
height: ${theme.orbit.formBoxSmallHeight};
border-radius: ${theme.orbit.borderRadius100};
transition: all ${theme.orbit.durationFast} ease-in;
Expand All @@ -41,7 +41,7 @@ interface ImageWrapProps {
const ImageWrap = styled.div<ImageWrapProps>`
${({ theme, width }) => css`
padding: ${theme.orbit.space300};
border: 1px solid ${theme.orbit.borderColorCard};
border: 1px solid ${theme.orbit.elevationFlatBorderColor};
border-radius: ${theme.orbit.borderRadius100};
margin-top: ${theme.orbit.space400};
width: ${width};
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/Palette/CopyButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const StyledButton = styled.button<{ colorValue?: string }>`
? theme.orbit.paletteInkDark
: theme.orbit.paletteWhite};
padding: 0 ${theme.orbit.space200};
border-radius: ${theme.orbit.borderRadiusBadge};
border-radius: ${theme.orbit.badgeBorderRadius};
text-transform: uppercase;
transition: transform ${theme.orbit.durationFast} ease-in;
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/Switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const StyledInput = styled.input`
`;

const StyledContent = styled.span`
color: ${({ theme }) => theme.orbit.colorTextSecondary};
color: ${({ theme }) => theme.orbit.textSecondaryForeground};
`;

interface Props {
Expand Down
8 changes: 4 additions & 4 deletions docs/src/components/Tile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ const StyledEndLinkWrapper = styled.span`

const StyledTextLink = styled.span`
${({ theme }) => `
font-weight: ${theme.orbit.fontWeightLinks};
color: ${theme.orbit.colorTextLinkPrimary};
font-weight: ${theme.orbit.fontWeightMedium};
color: ${theme.orbit.textLinkPrimaryForeground};
text-decoration: underline;
${StyledWrapper}:hover & {
color: ${theme.orbit.paletteProductNormalHover};
Expand All @@ -148,9 +148,9 @@ const StyledLinkText = styled(StyledTextLink)`

const StyledLinkNode = styled.span`
${({ theme }) => `
color: ${theme.orbit.colorTextLinkPrimary};
color: ${theme.orbit.textLinkPrimaryForeground};
${StyledWrapper}:hover & {
color: ${theme.orbit.colorTextLinkPrimaryHover};
color: ${theme.orbit.textLinkPrimaryForegroundHover};
}
`};
`;
Expand Down
4 changes: 2 additions & 2 deletions docs/src/components/Usage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ const StyledHeadingIcon = styled.div<{ $color: string }>`
${({ theme, $color }) => css`
display: grid;
place-content: center;
width: ${theme.orbit.widthIconMedium};
height: ${theme.orbit.heightIconMedium};
width: ${theme.orbit.iconMediumSize};
height: ${theme.orbit.iconMediumSize};
background-color: ${$color};
border-radius: ${theme.orbit.borderRadiusFull};
padding: 2px;
Expand Down
6 changes: 3 additions & 3 deletions docs/src/docs-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const TableWrap = styled.div`
}
thead {
box-shadow: 0 0 0 1px ${theme.orbit.borderColorTable};
box-shadow: 0 0 0 1px ${theme.orbit.paletteCloudDark};
border-top-left-radius: 6px;
border-top-right-radius: 6px;
border: none;
Expand All @@ -57,7 +57,7 @@ const TableWrap = styled.div`
}
tbody {
box-shadow: 0 0 0 1px ${theme.orbit.borderColorTable};
box-shadow: 0 0 0 1px ${theme.orbit.paletteCloudDark};
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
border: none;
Expand All @@ -72,7 +72,7 @@ const TableWrap = styled.div`
border-radius: 6px;
transform: scale(1.025);
box-shadow: 0px 4px 8px 0px #252a311f, 0px 1px 4px 0px #252a3129,
0 0 0 1px ${theme.orbit.borderColorTable};
0 0 0 1px ${theme.orbit.paletteCloudDark};
td {
&:first-child {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { defaultTokens } from "@kiwicom/orbit-design-tokens";
export default {
orbit: {
...defaultTokens,
widthBreakpointDesktop: 1024,
breakpointDesktop: 1024,
fontFamily: '"DM Sans", sans-serif',
fontSizeTextLarge: "18px",
fontSizeTextNormal: "16px",
Expand Down
2 changes: 1 addition & 1 deletion docs/src/utils/dark-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function getBgColor({
}: { theme: ThemeShape } & Pick<Params, "type" | "color">): string {
switch (type) {
case "primary":
return theme.orbit.backgroundButtonPrimary;
return theme.orbit.buttonPrimaryBackground;
case "secondary":
return theme.orbit.paletteProductLight;
default:
Expand Down

0 comments on commit 7ebaa32

Please sign in to comment.