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(tokens)!: refresh colors #1438

Merged
merged 21 commits into from
Oct 15, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
refactor(components)!: remove warning variants
  • Loading branch information
Niznikr committed Oct 8, 2024
commit 563343d2b64920bf419f3912f16490c22f8858df
1 change: 0 additions & 1 deletion packages/components/src/Alert.tsx
Original file line number Diff line number Diff line change
@@ -17,7 +17,6 @@ const alert = cva(styles.base, {
error: styles.error,
info: styles.info,
success: styles.success,
warning: styles.warning,
},
variant: {
default: styles.default,
1 change: 0 additions & 1 deletion packages/components/src/TagGroup.tsx
Original file line number Diff line number Diff line change
@@ -26,7 +26,6 @@ const tag = cva(styles.tag, {
variant: {
default: styles.default,
success: styles.success,
warning: styles.warning,
error: styles.error,
beta: styles.beta,
federal: styles.federal,
7 changes: 0 additions & 7 deletions packages/components/src/Toast.tsx
Original file line number Diff line number Diff line change
@@ -34,7 +34,6 @@ const icon = cva(styles.icon, {
error: styles.error,
info: styles.info,
success: styles.success,
warning: styles.warning,
},
},
defaultVariants: {
@@ -192,8 +191,6 @@ const ToastQueue = {
toastQueue.add({ children, status: 'info' }, { ...options, timeout }),
success: (children: ToastContent['children'], options?: ToastOptions) =>
toastQueue.add({ children, status: 'success' }, { ...options, timeout }),
warning: (children: ToastContent['children'], options?: ToastOptions) =>
toastQueue.add({ children, status: 'warning' }, { ...options, timeout }),
};

const SnackbarQueue = {
@@ -209,10 +206,6 @@ const SnackbarQueue = {
const key = snackbarQueue.add({ ...content, status: 'success' }, { ...options });
return () => snackbarQueue.close(key);
},
warning: (content: SnackbarContent, options?: ToastOptions) => {
const key = snackbarQueue.add({ ...content, status: 'warning' }, { ...options });
return () => snackbarQueue.close(key);
},
};

/**
13 changes: 5 additions & 8 deletions packages/components/src/styles/Alert.module.css
Original file line number Diff line number Diff line change
@@ -18,30 +18,27 @@
&.success .icon {
color: var(--lp-color-fill-feedback-success);
}

&.warning .icon {
color: var(--lp-color-fill-feedback-warning);
}
}

.default {
align-items: flex-start;
padding: var(--lp-spacing-400);
border-style: solid;
border-width: 1px;

&.error {
background-color: var(--lp-color-bg-feedback-error);
border-color: var(--lp-color-border-feedback-error);
}

&.info {
background-color: var(--lp-color-bg-feedback-info);
border-color: var(--lp-color-border-feedback-info);
}

&.success {
background-color: var(--lp-color-bg-feedback-success);
}

&.warning {
background-color: var(--lp-color-bg-feedback-warning);
border-color: var(--lp-color-border-feedback-success);
}

&:has(.heading) {
5 changes: 0 additions & 5 deletions packages/components/src/styles/TagGroup.module.css
Original file line number Diff line number Diff line change
@@ -62,11 +62,6 @@
background-color: var(--lp-color-bg-feedback-success);
}

.warning {
color: var(--lp-color-text-feedback-warning);
background-color: var(--lp-color-bg-feedback-warning);
}

.error {
color: var(--lp-color-text-feedback-error);
background-color: var(--lp-color-bg-feedback-error);
10 changes: 3 additions & 7 deletions packages/components/src/styles/Toast.module.css
Original file line number Diff line number Diff line change
@@ -72,19 +72,15 @@
}

& .info {
fill: var(--lp-color-cyan-400);
fill: var(--lp-color-fill-feedback-info);
}

& .error {
fill: var(--lp-color-pink-500);
}

& .warning {
fill: var(--lp-color-yellow-500);
fill: var(--lp-color-fill-feedback-error);
}

& .success {
fill: var(--lp-color-system-green-500);
fill: var(--lp-color-fill-feedback-success);
}

&[data-focus-visible] {
12 changes: 0 additions & 12 deletions packages/components/stories/Alert.stories.tsx
Original file line number Diff line number Diff line change
@@ -52,18 +52,6 @@ export const Success: Story = {
},
};

export const Warning: Story = {
args: {
children: (
<>
<Heading>Heading</Heading>
<Text>Content</Text>
</>
),
status: 'warning',
},
};

export const Subtle: Story = {
args: {
children: <Text>Content</Text>,
1 change: 0 additions & 1 deletion packages/components/stories/TagGroup.stories.tsx
Original file line number Diff line number Diff line change
@@ -101,7 +101,6 @@ export const Variants: Story = {
<TagList>
<Tag>Default</Tag>
<Tag variant="success">Success</Tag>
<Tag variant="warning">Warning</Tag>
<Tag variant="error">Error</Tag>
<Tag variant="beta">Beta</Tag>
<Tag variant="federal">Federal</Tag>