Skip to content
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
2 changes: 1 addition & 1 deletion src/components/Alert/Alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { AlertProps } from './Alert.types';

export const Alert: React.FunctionComponent<AlertProps> = ({
children,
color = 'note',
color = 'info',
icon,
id,
onClose,
Expand Down
18 changes: 3 additions & 15 deletions src/components/Alert/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,27 +87,15 @@ This kind of alert can be used to display helpful information.
</Alert>
```

### Info

Another common, informative alert.

```docoff-react-preview
<Alert color="info">
<strong>Info:</strong> This feature depends on user&apos;s OS preferences.
{' '}
<TextLink href="/" label="Open preferences" />
</Alert>
```

### Note (Default)
### Info (Default)

Neutral informative alert.

```docoff-react-preview
<Alert>
<strong>Note:</strong> This feature may not be available in all regions.
<strong>Info:</strong> This feature depends on user&apos;s OS preferences.
{' '}
<TextLink href="/" label="Show list of regions" />
<TextLink href="/" label="Open preferences" />
</Alert>
```

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion src/components/Badge/Badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import styles from './Badge.module.scss';
import type { BadgeProps } from './Badge.types';

export const Badge: React.FunctionComponent<BadgeProps> = ({
color = 'note',
color = 'info',
label,
priority = 'filled',
...restProps
Expand Down
8 changes: 2 additions & 6 deletions src/components/Badge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ High-emphasis priority to draw user's attention.
<Badge label="4" color="warning" />
<Badge label="5" color="danger" />
<Badge label="10" color="help" />
<Badge label="34" color="info" />
<Badge label="99+" />
<Badge label="365" color="light" />
<Badge label="999+" color="dark" />
Expand All @@ -53,8 +52,7 @@ High-emphasis priority to draw user's attention.
<Badge label="Warning" color="warning" />
<Badge label="Danger" color="danger" />
<Badge label="Help" color="help" />
<Badge label="Info" color="info" />
<Badge label="Note" />
<Badge label="Info" />
<Badge label="Light" color="light" />
<Badge label="Dark" color="dark" />
```
Expand All @@ -68,7 +66,6 @@ Medium-emphasis priority to provide additional context in an unobtrusive way.
<Badge priority="outline" label="4" color="warning" />
<Badge priority="outline" label="5" color="danger" />
<Badge priority="outline" label="10" color="help" />
<Badge priority="outline" label="34" color="info" />
<Badge priority="outline" label="99+" />
<Badge priority="outline" label="365" color="light" />
<Badge priority="outline" label="999+" color="dark" />
Expand All @@ -79,8 +76,7 @@ Medium-emphasis priority to provide additional context in an unobtrusive way.
<Badge priority="outline" label="Warning" color="warning" />
<Badge priority="outline" label="Danger" color="danger" />
<Badge priority="outline" label="Help" color="help" />
<Badge priority="outline" label="Info" color="info" />
<Badge priority="outline" label="Note" />
<Badge priority="outline" label="Info" />
<Badge priority="outline" label="Light" color="light" />
<Badge priority="outline" label="Dark" color="dark" />
```
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
3 changes: 0 additions & 3 deletions src/components/Button/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ app. Use it sparingly but remember there should always be one on a screen.
<Button label="Danger" color="danger" />
<Button label="Help" color="help" />
<Button label="Info" color="info" />
<Button label="Note" color="note" />
<docoff-placeholder dark inline>
<Button label="Light" color="light" />
</docoff-placeholder>
Expand All @@ -82,7 +81,6 @@ important but not primary in your app.
<Button priority="outline" label="Danger" color="danger" />
<Button priority="outline" label="Help" color="help" />
<Button priority="outline" label="Info" color="info" />
<Button priority="outline" label="Note" color="note" />
<docoff-placeholder dark inline>
<Button priority="outline" label="Light" color="light" />
</docoff-placeholder>
Expand All @@ -103,7 +101,6 @@ the content.
<Button priority="flat" label="Danger" color="danger" />
<Button priority="flat" label="Help" color="help" />
<Button priority="flat" label="Info" color="info" />
<Button priority="flat" label="Note" color="note" />
<docoff-placeholder dark inline>
<Button priority="flat" label="Light" color="light" />
</docoff-placeholder>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10 changes: 0 additions & 10 deletions src/components/Card/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,6 @@ To cover all possible needs of your project, Card is available in colors from
<Button label="Read more" priority="outline" color="info" />
</CardFooter>
</Card>
<Card color="note">
<CardBody>
Hello! I&apos;m note variant of card.
{' '}
<TextLink href="/" label="This is a link" />
</CardBody>
<CardFooter>
<Button label="Read more" priority="outline" color="note" />
</CardFooter>
</Card>
```

## States
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
4 changes: 0 additions & 4 deletions src/components/Modal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -749,10 +749,6 @@ React.createElement(() => {
label: 'help',
value: 'help',
},
{
label: 'note',
value: 'note',
},
]}
value={modalColor}
/>
Expand Down
Diff not rendered.
Diff not rendered.
4 changes: 0 additions & 4 deletions src/components/_helpers/getRootColorClassName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ export const getRootColorClassName = (styles: CssModuleClasses, variant?: Color)
return styles.isRootColorInfo;
}

if (variant === 'note') {
return styles.isRootColorNote;
}

if (variant === 'light') {
return styles.isRootColorLight;
}
Expand Down
6 changes: 0 additions & 6 deletions src/docs/css-helpers/colors.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ The text color helpers allow coloring any text with predefined
<docoff-placeholder bordered>
<code className="text-info">.text-info</code>
</docoff-placeholder>
<docoff-placeholder bordered>
<code className="text-note">.text-note</code>
</docoff-placeholder>
<docoff-placeholder bordered dark>
<code className="text-light">.text-light</code>
</docoff-placeholder>
Expand Down Expand Up @@ -95,9 +92,6 @@ used only in CSS).
<docoff-placeholder bordered>
<code className="bg-info">.bg-info</code>
</docoff-placeholder>
<docoff-placeholder bordered>
<code className="bg-note">.bg-note</code>
</docoff-placeholder>
<docoff-placeholder bordered>
<code className="bg-light">.bg-light</code>
</docoff-placeholder>
Expand Down
2 changes: 1 addition & 1 deletion src/docs/foundation/collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The following color names are designed for use in components that support the
| Collection | Available values | Description |
|------------|--------------------------------------------------------|------------------------------------------------------------------------------------|
| Action | `primary`, `secondary`, `selected` | Reserved for actionable elements, such as buttons and navigation links |
| Feedback | `success`, `warning`, `danger`, `info`, `help`, `note` | For components with feedback state, such as alerts and buttons |
| Feedback | `success`, `warning`, `danger`, `info`, `help` | For components with feedback state, such as alerts and buttons |
| Neutral | `light`, `dark` | For components that require a neutral background color, such as badges and buttons |

## States
Expand Down
14 changes: 5 additions & 9 deletions src/docs/foundation/colors.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,11 @@ currently selected.
## Feedback Colors

Feedback colors help communicate a meaning: green means success, orange means
warning, and red means danger or error. On top of that, there are a few more
feedback colors to fit various design situations.
warning, and red means danger or error. Two more colors are informative:

- `info`: neutral information about the current situation or system state,
e.g. an operation in progress or a missing resource.
- `help`: guidance on using the UI, e.g. tips, hints and explanations.

<div>
<rui-swatch color="feedback-success"></rui-swatch>
Expand Down Expand Up @@ -110,12 +113,6 @@ feedback colors to fit various design situations.
<rui-swatch color="feedback-info-active"></rui-swatch>
<rui-swatch color="feedback-on-info"></rui-swatch>
</div>
<div>
<rui-swatch color="feedback-note"></rui-swatch>
<rui-swatch color="feedback-note-hover"></rui-swatch>
<rui-swatch color="feedback-note-active"></rui-swatch>
<rui-swatch color="feedback-on-note"></rui-swatch>
</div>

## State Colors

Expand Down Expand Up @@ -228,7 +225,6 @@ Backgrounds for feedback areas.
<rui-swatch color="background-danger"></rui-swatch>
<rui-swatch color="background-help"></rui-swatch>
<rui-swatch color="background-info"></rui-swatch>
<rui-swatch color="background-note"></rui-swatch>
</div>

### State Backgrounds
Expand Down
2 changes: 1 addition & 1 deletion src/styles/settings/_collections.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$action-colors: primary, secondary, selected;
$feedback-colors: success, warning, danger, info, help, note;
$feedback-colors: success, warning, danger, info, help;
$neutral-colors: light, dark;

$colors: (
Expand Down
2 changes: 0 additions & 2 deletions src/styles/settings/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ $map: (
danger: var(--rui-color-feedback-danger),
help: var(--rui-color-feedback-help),
info: var(--rui-color-feedback-info),
note: var(--rui-color-feedback-note),
// Neutral colors
light: var(--rui-color-neutral-light),
dark: var(--rui-color-neutral-dark),
Expand Down Expand Up @@ -138,7 +137,6 @@ $map: (
danger: var(--rui-color-background-danger),
help: var(--rui-color-background-help),
info: var(--rui-color-background-info),
note: var(--rui-color-background-note),
// Neutral backgrounds
light: var(--rui-color-background-light),
dark: var(--rui-color-background-dark),
Expand Down
12 changes: 5 additions & 7 deletions src/styles/theme-constants/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ $gray-900: colors.darken-color($_gray-base-color, 90%);
$primary: #00778b;
$secondary: $gray-500;
$selected: #007bff;
$link: #007bff;

$focus: color.scale($selected, $alpha: -50%);

Expand All @@ -31,8 +32,7 @@ $success: #28a745;
$warning: #ffc107;
$danger: #dc3545;
$help: #6610f2;
$info: #17a2b8;
$note: #007bff;
$info: #007bff;

$state-valid: #2f9e44;
$state-invalid: #e03131;
Expand All @@ -57,6 +57,9 @@ $selected-dark: colors.darken-color($selected, $_amount-dark);
$selected-darker: colors.darken-color($selected, $_amount-darker);
$on-selected: $white;

$link-dark: colors.darken-color($link, $_amount-dark);
$link-darker: colors.darken-color($link, $_amount-darker);

$success-light: colors.lighten-color($success, $_amount-light);
$success-dark: colors.darken-color($success, $_amount-dark);
$success-darker: colors.darken-color($success, $_amount-darker);
Expand All @@ -82,11 +85,6 @@ $info-dark: colors.darken-color($info, $_amount-dark);
$info-darker: colors.darken-color($info, $_amount-darker);
$on-info: $white;

$note-light: colors.lighten-color($note, $_amount-light);
$note-dark: colors.darken-color($note, $_amount-dark);
$note-darker: colors.darken-color($note, $_amount-darker);
$on-note: $white;

$state-valid-light: colors.lighten-color($state-valid, $_amount-light);
$state-valid-dark: colors.darken-color($state-valid, $_amount-dark);
$state-valid-darker: colors.darken-color($state-valid, $_amount-darker);
Expand Down
Loading
Loading