-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit bf4f587 Author: Katie George <[email protected]> Date: Fri Nov 1 13:59:33 2024 -0700 chore: Adds comments and removes unused yellow token commit 2f652e3 Author: Katie George <[email protected]> Date: Thu Oct 31 14:25:13 2024 -0700 fix: Removes public tokens and updates neutral to grey 550 commit 0be3c07 Author: Katie George <[email protected]> Date: Wed Oct 30 11:54:05 2024 -0700 fix: Updates snapshots commit e90d96c Author: Katie George <[email protected]> Date: Wed Oct 30 11:50:15 2024 -0700 fix: Updates text colors to also be in severity color palette commit 4262ffa Author: Katie George <[email protected]> Date: Wed Oct 30 11:23:57 2024 -0700 fix: Updates color names and uncomments code commit 07fa96b Author: Katie George <[email protected]> Date: Tue Oct 29 14:09:47 2024 -0700 wip: Moves to severity palette commit 0f95580 Author: Katie George <[email protected]> Date: Tue Oct 29 11:25:18 2024 -0700 wip: adds severity palette colors commit 37f88f6 Author: Katie George <[email protected]> Date: Fri Oct 25 13:56:11 2024 -0700 feat: Removes 400 and makes 500 commit 1258631 Author: Katie George <[email protected]> Date: Fri Oct 25 13:42:41 2024 -0700 feat: Updates severity low and medium colors
- Loading branch information
Katie George
committed
Nov 13, 2024
1 parent
a89976c
commit 187ae8f
Showing
13 changed files
with
1,292 additions
and
114 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
1,050 changes: 1,050 additions & 0 deletions
1,050
src/__tests__/snapshot-tests/__snapshots__/design-tokens.test.ts.snap
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
import merge from 'lodash/merge'; | ||
|
||
import { expandColorDictionary } from '../utils'; | ||
import { StyleDictionary } from '../utils/interfaces'; | ||
import { tokens as parentTokens } from '../visual-refresh/color-severity'; | ||
|
||
const tokens: StyleDictionary.ColorSeverityDictionary = { | ||
colorTextNotificationSeverityMedium: { light: '{colorBlack}', dark: '{colorGrey900}' }, | ||
}; | ||
|
||
const expandedTokens: StyleDictionary.ExpandedColorScopeDictionary = merge( | ||
{}, | ||
parentTokens, | ||
expandColorDictionary(tokens) | ||
); | ||
export { expandedTokens as tokens }; | ||
export const mode: StyleDictionary.ModeIdentifier = 'color'; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
import { expandColorDictionary } from '../utils'; | ||
import { StyleDictionary } from '../utils/interfaces'; | ||
|
||
const tokens: StyleDictionary.ColorSeverityDictionary = { | ||
// note: these should not be used directly. Instead, use the semantic tokens defined below. | ||
colorSeverityDarkRed: { light: '#870303', dark: '#d63f38' }, | ||
colorSeverityRed: { light: '#ce3311', dark: '#fe6e73' }, | ||
colorSeverityOrange: { light: '#f89256', dark: '#f89256' }, | ||
colorSeverityYellow: { light: '#f2cd54', dark: '#f2cd54' }, | ||
colorSeverityGrey: '{colorGrey550}', | ||
|
||
colorBackgroundNotificationSeverityCritical: '{colorSeverityDarkRed}', | ||
colorBackgroundNotificationSeverityHigh: '{colorSeverityRed}', | ||
colorBackgroundNotificationSeverityMedium: '{colorSeverityOrange}', | ||
colorBackgroundNotificationSeverityLow: '{colorSeverityYellow}', | ||
colorBackgroundNotificationSeverityNeutral: '{colorSeverityGrey}', | ||
|
||
colorTextNotificationSeverityCritical: { light: '{colorGrey100}', dark: '{colorBlack}' }, | ||
colorTextNotificationSeverityHigh: { light: '{colorGrey100}', dark: '{colorGrey900}' }, | ||
colorTextNotificationSeverityMedium: '{colorGrey900}', | ||
colorTextNotificationSeverityLow: '{colorGrey900}', | ||
colorTextNotificationSeverityNeutral: '{colorGrey100}', | ||
}; | ||
|
||
const expandedTokens: StyleDictionary.ExpandedColorScopeDictionary = expandColorDictionary(tokens); | ||
|
||
export { expandedTokens as tokens }; | ||
export const mode: StyleDictionary.ModeIdentifier = 'color'; |
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
66 changes: 66 additions & 0 deletions
66
style-dictionary/visual-refresh/metadata/color-severity.ts
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,66 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
import { StyleDictionary } from '../../utils/interfaces'; | ||
|
||
const metadata: StyleDictionary.MetadataIndex = { | ||
colorBackgroundNotificationSeverityCritical: { | ||
description: | ||
'Background color in a notification to represent a critical error or a critically high-level of severity. For example: "Sev-1"', | ||
public: true, | ||
themeable: true, | ||
}, | ||
colorBackgroundNotificationSeverityHigh: { | ||
description: | ||
'Background color in a notification to represent an error status or a high-level of severity. For example: "Failed" or "Sev-2"', | ||
public: true, | ||
themeable: true, | ||
}, | ||
colorBackgroundNotificationSeverityMedium: { | ||
description: 'Background color in a notification to represent a medium-level of severity. For example: "Sev-3"', | ||
public: true, | ||
themeable: true, | ||
}, | ||
colorBackgroundNotificationSeverityLow: { | ||
description: | ||
'Background color in a notification to represent a warning or a low-level of severity. For example: "Warning" or "Sev-4"', | ||
public: true, | ||
themeable: true, | ||
}, | ||
colorBackgroundNotificationSeverityNeutral: { | ||
description: | ||
'Background color in a notification to represent a neutral status, a severity level of no impact, or the lowest-level of severity. For example: "Pending" or "Sev-5"', | ||
public: true, | ||
themeable: true, | ||
}, | ||
colorTextNotificationSeverityCritical: { | ||
description: | ||
'Text color in a notification to represent a critical error or a critically high-level of severity. For example: "Sev-1"', | ||
public: true, | ||
themeable: true, | ||
}, | ||
colorTextNotificationSeverityHigh: { | ||
description: | ||
'Text color in a notification to represent an error status or a high-level of severity. For example: "Failed" or "Sev-2"', | ||
public: true, | ||
themeable: true, | ||
}, | ||
colorTextNotificationSeverityMedium: { | ||
description: 'Text color in a notification to represent a medium-level of severity. For example: "Sev-3"', | ||
public: true, | ||
themeable: true, | ||
}, | ||
colorTextNotificationSeverityLow: { | ||
description: | ||
'Text color in a notification to represent a warning or a low-level of severity. For example: "Warning" or "Sev-4"', | ||
public: true, | ||
themeable: true, | ||
}, | ||
colorTextNotificationSeverityNeutral: { | ||
description: | ||
'Text color in a notification to represent a neutral status, a severity level of no impact, or the lowest-level of severity. For example: "Pending" or "Sev-5"', | ||
public: true, | ||
themeable: true, | ||
}, | ||
}; | ||
|
||
export default metadata; |
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