Skip to content

Commit

Permalink
fix(kit): replace all instances of legacy faint, subtle tokens with o…
Browse files Browse the repository at this point in the history
…utline token
  • Loading branch information
alstnc committed Jul 11, 2024
1 parent 7634780 commit 133153d
Show file tree
Hide file tree
Showing 17 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion packages/kit/src/accordion/AccordionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type * as WPDS from "../theme";
import { AccordionItemProps as RadixAccordionItemProps } from "@radix-ui/react-accordion";

const StyledAccordionItem = styled(AccordionPrimitive.Item, {
borderBottom: `1px solid ${theme.colors.subtle}`,
borderBottom: `1px solid ${theme.colors.outline}`,
});

type AccordionItemProps = WPDS.VariantProps<typeof StyledAccordionItem> &
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/action-menu/ActionMenuContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const NAME = "ActionMenuContent";

export const ContentStyles = {
background: theme.colors.secondary,
border: `solid 1px ${theme.colors.subtle}`,
border: `solid 1px ${theme.colors.outline}`,
borderRadius: theme.radii["050"],
boxShadow: theme.shadows["300"],
color: theme.colors.primary,
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/avatar/play.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default {
const defaultArgs = {
size: 200,
css: {
backgroundColor: theme.colors.subtle,
backgroundColor: theme.colors.outline,
},
};

Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const Button = styled("button", {
secondary: {
background: theme.colors.secondary,
color: theme.colors.onSecondary,
border: "1px solid $subtle",
border: "1px solid $outline",
"@hover": {
"&:hover": {
background: theme.colors.gray400,
Expand Down
4 changes: 2 additions & 2 deletions packages/kit/src/card/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from "react";
import type * as WPDS from "../theme";
import { theme, styled } from "../theme";
//

const StyledCard = styled("div", {
padding: theme.space["150"],
border: theme.colors.faint,
border: theme.colors.outline,
borderRadius: theme.radii["012"],
borderWidth: "1px",
borderStyle: "solid",
Expand Down
8 changes: 4 additions & 4 deletions packages/kit/src/checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ const StyledCheckbox = styled(PrimitiveCheckbox.Root, {
$$color: "$colors$onDisabled",

borderColor: "$colors$onDisabled",
color: theme.colors.subtle,
color: theme.colors.outline,
},

"&[aria-checked='false']:not(:disabled)": {
borderColor: "$colors$subtle",
borderColor: "$colors$outline",
},

variants: {
Expand Down Expand Up @@ -84,7 +84,7 @@ const StyledCheckbox = styled(PrimitiveCheckbox.Root, {
css: {
"&:not([aria-checked='false']):not(:disabled)": {
$$backgroundColor: "$colors$secondary",
$$color: "$colors$subtle",
$$color: "$colors$outline",
},
},
},
Expand Down Expand Up @@ -141,7 +141,7 @@ const StyledIndicator = styled(PrimitiveCheckbox.Indicator, {
disabled: {
true: {
$$variantColor: "$colors$disabled",
borderColor: "$colors$subtle",
borderColor: "$colors$outline",
color: "$colors$onDisabled",
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/divider/Divider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const StyledSeparator = Theme.styled(Separator.Root, {
variants: {
variant: {
default: {
backgroundColor: Theme.theme.colors.faint,
backgroundColor: Theme.theme.colors.outline,
},
strong: {
backgroundColor: Theme.theme.colors.primary,
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/input-search/InputSearchListHeading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { Node } from "@react-types/shared";
import type * as WPDS from "../theme";

const StyledListItem = styled("li", {
borderBlockStart: `1px solid ${theme.colors.faint}`,
borderBlockStart: `1px solid ${theme.colors.outline}`,
color: theme.colors.accessible,
fontSize: theme.fontSizes["087"],
marginBlockStart: "$050",
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/input-shared/InputShared.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const FloatingLabelStyles = {

export const sharedInputStyles = {
borderRadius: theme.radii["012"],
borderColor: theme.colors.subtle,
borderColor: theme.colors.outline,
borderStyle: "solid",
borderWidth: "1px",
backgroundColor: theme.colors.secondary,
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/navigation-menu/NavigationMenuContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const NAME = "NavigationMenuContent";

const StyledNavigationMenuContent = styled(NavigationMenuPrimitive.Content, {
background: theme.colors.secondary,
border: `solid 1px ${theme.colors.subtle}`,
border: `solid 1px ${theme.colors.outline}`,
borderRadius: theme.radii["012"],
boxShadow: theme.shadows["200"],
minWidth: "150px",
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/radio-group/RadioButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const ContainerCSS = Theme.css({

const StyledRadioButton = Theme.styled(RadioGroupPrimitive.Item, {
backgroundColor: Theme.theme.colors.onPrimary,
borderColor: Theme.theme.colors.subtle,
borderColor: Theme.theme.colors.outline,
borderStyle: "solid",
borderRadius: "50%",
borderWidth: "1px",
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/select/SelectGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const SelectGroup = React.forwardRef<HTMLDivElement, SelectGroupProps>(
{children}
</StyledSelectGroup>
<DividerContainer>
<Divider css={{ backgroundColor: theme.colors.subtle }} />
<Divider css={{ backgroundColor: theme.colors.outline }} />
</DividerContainer>
</>
)
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/select/SelectItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const StyledItem = styled(SelectPrimitive.Item, {
},

"&[data-highlighted]": {
backgroundColor: theme.colors.faint,
backgroundColor: theme.colors.outline,
cursor: "pointer",
},
});
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/tabs/TabsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { styled, theme } from "../theme";
const StyledTabsList = styled(TabsPrimitive.List, {
flexShrink: 0,
display: "flex",
boxShadow: `inset 0 -1px 0 0 ${theme.colors.faint}, 0 0 0 0 ${theme.colors.faint}`,
boxShadow: `inset 0 -1px 0 0 ${theme.colors.outline}, 0 0 0 0 ${theme.colors.outline}`,
gap: theme.space["075"],
overflow: "auto",
width: "fit-content",
Expand Down
4 changes: 2 additions & 2 deletions packages/kit/src/tabs/TabsTrigger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ const StyledTabsTrigger = styled(TabsPrimitive.Trigger, {

// styling when the element is disabled
"&[disabled]": {
color: theme.colors.subtle,
color: theme.colors.outline,
"&:hover::after": {
...afterConsts,
borderBottom: `1px solid ${theme.colors.faint}`,
borderBottom: `1px solid ${theme.colors.outline}`,
},
},
});
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/theme/play.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const StyledBox = styled("div", {
fontWeight: theme.fontWeights.bold,
},
false: {
backgroundColor: theme.colors.subtle,
backgroundColor: theme.colors.outline,
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions packages/kit/src/tooltip/TooltipContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const StyledContentWrapper = styled(TooltipPrimitive.Content, {
borderRadius: theme.radii["012"],
padding: theme.space["050"],
color: theme.colors.primary,
border: `solid 1px ${theme.colors.subtle}`,
border: `solid 1px ${theme.colors.outline}`,
backgroundColor: theme.colors.secondary,
width: "144px", //set width as per design specs
userSelect: "none",
Expand Down Expand Up @@ -120,7 +120,7 @@ export const TooltipContent = forwardRef<
>
{children}
<StyledArrow
stroke={theme.colors.subtle.value}
stroke={theme.colors.outline.value}
strokeWidth="2"
strokeDasharray="0 30 28.284"
/>
Expand Down

0 comments on commit 133153d

Please sign in to comment.