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

Token updates and small fixes #208

Merged
merged 5 commits into from
Mar 5, 2024
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
3 changes: 1 addition & 2 deletions packages/components/src/components/Badge/Badge.module.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.badge {
color: var(--badge--color);
font-size: var(--badge--font-size);
background-color: var(--badge--info-background-color);
border-radius: var(--badge--corner-radius);
padding-block: var(--badge--padding-y);
padding-inline: var(--badge--padding-x);
Expand Down Expand Up @@ -46,6 +44,7 @@
/* Variants */
@mixin variant($variant) {
.#{$variant} {
color: var(--badge--#{$variant}-content-color);
background-color: var(--badge--#{$variant}-background-color);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { dummyText } from "@/lib/dev/dummyText";

const meta: Meta<typeof Badge> = {
...defaultMeta,
title: "Status/Badge/EdgeCases",
title: "Status/Badge/Edge Cases",
};
export default meta;

Expand Down
4 changes: 4 additions & 0 deletions packages/components/src/components/Button/Button.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,7 @@
@include variant(accent, plain);
@include variant(danger, plain);
@include variant(secondary, plain);
@include variant(primary, soft);
@include variant(accent, soft);
@include variant(danger, soft);
@include variant(secondary, soft);
2 changes: 1 addition & 1 deletion packages/components/src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface ButtonProps
/** @default "primary" */
variant?: "primary" | "accent" | "secondary" | "danger";
/** @default "solid" */
style?: "plain" | "solid";
style?: "plain" | "solid" | "soft";
/** @default "m" */
size?: "m" | "s";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ export const PrimaryPlain: Story = {
},
};

export const PrimarySoft: Story = {
args: {
variant: "primary",
style: "soft",
},
};

export const AccentSolid: Story = {
args: {
variant: "accent",
Expand All @@ -40,6 +47,14 @@ export const AccentPlain: Story = {
render: (props) => <Button {...props}>Create/Save</Button>,
};

export const AccentSoft: Story = {
args: {
variant: "accent",
style: "soft",
},
render: (props) => <Button {...props}>Create/Save</Button>,
};

export const SecondarySolid: Story = {
args: {
variant: "secondary",
Expand All @@ -55,6 +70,14 @@ export const SecondaryPlain: Story = {
render: (props) => <Button {...props}>Abort/Back</Button>,
};

export const SecondarySoft: Story = {
args: {
variant: "secondary",
style: "soft",
},
render: (props) => <Button {...props}>Abort/Back</Button>,
};

export const DangerSolid: Story = {
args: {
variant: "danger",
Expand All @@ -69,3 +92,11 @@ export const DangerPlain: Story = {
},
render: (props) => <Button {...props}>Delete/Terminate</Button>,
};

export const DangerSoft: Story = {
args: {
variant: "danger",
style: "soft",
},
render: (props) => <Button {...props}>Delete/Terminate</Button>,
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import defaultMeta from "./Default.stories";
import { dummyText } from "@/lib/dev/dummyText";

const meta: Meta<typeof Checkbox> = {
title: "Forms/Checkbox/EdgeCases",
title: "Forms/Checkbox/Edge Cases",
...defaultMeta,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
--form-control--background-color--default
);
--form-field-control--border-color: var(
--form-control--background-color--default
--form-control--border-color--default
);
--form-field-control--color: inherit;

Expand Down
12 changes: 7 additions & 5 deletions packages/components/src/components/Initials/Initials.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
background-color: var(--background-color);

*:nth-child(odd) {
color: var(--char-1-color);
color: var(--content-color);
}

*:nth-child(even) {
color: var(--char-2-color);
color: var(--content-accent-color);
}

*:only-child {
color: var(--char-2-color);
color: var(--content-accent-color);
}

@extend .variant-1;
Expand All @@ -22,8 +22,10 @@
@mixin variant($variant) {
.variant-#{$variant} {
--background-color: var(--initials--variant-#{$variant}-background-color);
--char-1-color: var(--initials--variant-#{$variant}-first-initial-color);
--char-2-color: var(--initials--variant-#{$variant}-second-initial-color);
--content-color: var(--initials--variant-#{$variant}-content-color);
--content-accent-color: var(
--initials--variant-#{$variant}-content-accent-color
);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ export const Variant3: Story = {
};

export const Variant4: Story = {
render: (props) => <Initials {...props}>Karla Mustermann</Initials>,
render: (props) => <Initials {...props}>Tom Mustermann</Initials>,
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
grid-template-columns: auto 1fr;
grid-column-gap: var(--inline-alert--icon-to-text-spacing);
grid-row-gap: var(--inline-alert--text-to-text-spacing);
background-color: var(--inline-alert--background-color);
width: 100%;

@extend .info;
Expand Down Expand Up @@ -44,6 +43,7 @@
@mixin variant($variant) {
.#{$variant} {
border-color: var(--inline-alert--#{$variant}-border-color);

.heading,
.statusIcon {
color: var(--inline-alert--#{$variant}-heading-color);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.layoutCard {
background-color: var(--content-box--background-color);
box-shadow: var(--content-box--box-shadow);
border-radius: var(--content-box--corner-radius);
padding: var(--content-box--padding);
background-color: var(--layout-card--background-color);
box-shadow: var(--layout-card--box-shadow);
border-radius: var(--layout-card--corner-radius);
padding: var(--layout-card--padding);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Label } from "@/components/Label";
import { action } from "@storybook/addon-actions";

const meta: Meta<typeof NumberField> = {
title: "Forms/NumberField/EdgeCases",
title: "Forms/NumberField/Edge Cases",
component: NumberField,
render: (props) => (
<NumberField onChange={action("onChange")} {...props}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { dummyText } from "@/lib/dev/dummyText";
import defaultMeta from "./Default.stories";

const meta: Meta<typeof RadioGroup> = {
title: "Forms/RadioGroup/EdgeCases",
title: "Forms/RadioGroup/Edge Cases",
...defaultMeta,
};

Expand Down
5 changes: 5 additions & 0 deletions packages/design-tokens/src/border.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ border-width:
border-style:
default:
value: "solid"
shadow:
content:
value: "rgba(0, 0, 0, 0.1) 0 {size-px.xs} {size-px.s}"
overlay:
value: "rgba(0, 0, 0, 0.14) 0 {size-px.m} {size-px.l}"
Loading
Loading