-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Status to Text Component (#3375)
- Loading branch information
1 parent
39bf281
commit fe5c364
Showing
31 changed files
with
338 additions
and
355 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
--- | ||
"@salt-ds/theme": minor | ||
--- | ||
|
||
## Characteristics | ||
|
||
Added decorative and informative status foreground tokens. This ensures contrast requirements are met for both text and non-text elements. | ||
|
||
```diff | ||
+ --salt-status-info-foreground-decorative: var(--salt-palette-info-foreground-decorative); | ||
+ --salt-status-error-foreground-decorative: var(--salt-palette-error-foreground-decorative); | ||
+ --salt-status-warning-foreground-decorative: var(--salt-palette-warning-foreground-decorative); | ||
+ --salt-status-success-foreground-decorative: var(--salt-palette-success-foreground-decorative); | ||
+ | ||
+ --salt-status-info-foreground-informative: var(--salt-palette-info-foreground-informative); | ||
+ --salt-status-error-foreground-informative: var(--salt-palette-error-foreground-informative); | ||
+ --salt-status-warning-foreground-informative: var(--salt-palette-warning-foreground-informative); | ||
+ --salt-status-success-foreground-informative: var(--salt-palette-success-foreground-informative); | ||
``` | ||
|
||
Deprecated status foreground tokens. | ||
|
||
| Name | Replacement | | ||
| -------------------------------- | ------------------------------------------- | | ||
| --salt-status-info-foreground | --salt-status-info-foreground-decorative | | ||
| --salt-status-error-foreground | --salt-status-error-foreground-decorative | | ||
| --salt-status-warning-foreground | --salt-status-warning-foreground-decorative | | ||
| --salt-status-success-foreground | --salt-status-success-foreground-decorative | | ||
|
||
## Palette | ||
|
||
Added decorative and informative info, error, warning and success foreground tokens. | ||
|
||
### Light | ||
|
||
```diff | ||
+ --salt-palette-info-foreground-decorative: var(--salt-color-blue-500); | ||
+ --salt-palette-info-foreground-informative: var(--salt-color-blue-600); | ||
+ --salt-palette-error-foreground-decorative: var(--salt-color-red-500); | ||
+ --salt-palette-error-foreground-informative: var(--salt-color-red-600); | ||
+ --salt-palette-warning-foreground-decorative: var(--salt-color-orange-700); | ||
+ --salt-palette-warning-foreground-informative: var(--salt-color-orange-850); | ||
+ --salt-palette-success-foreground-decorative: var(--salt-color-green-500); | ||
+ --salt-palette-success-foreground-informative: var(--salt-color-green-600); | ||
``` | ||
|
||
### Dark | ||
|
||
```diff | ||
+ --salt-palette-info-foreground-decorative: var(--salt-color-blue-100); | ||
+ --salt-palette-info-foreground-informative: var(--salt-color-blue-200); | ||
+ --salt-palette-error-foreground-decorative: var(--salt-color-red-400); | ||
+ --salt-palette-error-foreground-informative: var(--salt-color-red-200); | ||
+ --salt-palette-warning-foreground-decorative: var(--salt-color-orange-500); | ||
+ --salt-palette-warning-foreground-informative: var(--salt-color-orange-400); | ||
+ --salt-palette-success-foreground-decorative: var(--salt-color-green-400); | ||
+ --salt-palette-success-foreground-informative: var(--salt-color-green-200); | ||
``` | ||
|
||
Updated info and error border tokens. | ||
|
||
```diff | ||
- --salt-palette-info-border: var(--salt-color-blue-500); | ||
+ --salt-palette-info-border: var(--salt-color-blue-400); | ||
- --salt-palette-error-border: var(--salt-color-red-500); | ||
+ --salt-palette-error-border: var(--salt-color-red-400); | ||
``` | ||
|
||
Deprecated status foreground tokens. | ||
|
||
| Name | Replacement | | ||
| --------------------------------- | -------------------------------------------- | | ||
| --salt-palette-info-foreground | --salt-palette-info-foreground-decorative | | ||
| --salt-palette-error-foreground | --salt-palette-error-foreground-decorative | | ||
| --salt-palette-warning-foreground | --salt-palette-warning-foreground-decorative | | ||
| --salt-palette-success-foreground | --salt-palette-success-foreground-decorative | | ||
|
||
## Foundations | ||
|
||
Added `--salt-color-orange-850`: | ||
|
||
```diff | ||
+ --salt-color-orange-850: rgb(194, 52, 7); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
"@salt-ds/core": minor | ||
--- | ||
|
||
Added status color support to Text. | ||
|
||
```tsx | ||
<Text color="info">This is error color of Text</Text> | ||
<Text color="error">This is error color of Text</Text> | ||
<Text color="warning">This is warning color of Text</Text> | ||
<Text color="success">This is success color of Text</Text> | ||
``` | ||
|
||
- Checkbox will now have the correct border color on focus when it is in an error or warning state. | ||
- Checkbox now uses `--salt-status-error-foreground-decorative` and `--salt-status-warning-foreground-decorative` instead of `--salt-status-error-foreground` and `--salt-status-warning-foreground`. | ||
- RadioButton will now have the correct border color on focus when it is in an error or warning state. | ||
- RadioButton now uses `--salt-status-error-foreground-decorative` and `--salt-status-warning-foreground-decorative` instead of `--salt-status-error-foreground` and `--salt-status-warning-foreground`. | ||
- StatusAdornment now uses `--salt-status-error-foreground-decorative`, `--salt-status-warning-foreground-decorative` and `--salt-status-success-foreground-decorative` instead of `--salt-status-error-foreground`, `--salt-status-warning-foreground` and `--salt-status-success-foreground`. | ||
- StatusIndicator now uses `--salt-status-info-foreground-decorative`, `--salt-status-error-foreground-decorative`, `--salt-status-warning-foreground-decorative` and `--salt-status-success-foreground-decorative` instead of `--salt-status-info-foreground`, `--salt-status-error-foreground`, `--salt-status-warning-foreground`, `--salt-status-success-foreground`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@salt-ds/lab": minor | ||
--- | ||
|
||
TrackerStep now uses `--salt-status-success-foreground-decorative` and `--salt-status-info-foreground-decorative` instead of `--salt-status-success-foreground` and `--salt-status-info-foreground`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.