Skip to content

Commit

Permalink
fix(ARCH-720): Design Token - add shadow info tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
Geoffroy Baccarini committed Aug 1, 2023
1 parent fc50964 commit 5256cfd
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/loud-eagles-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@talend/design-tokens': patch
---

Design Tokens : Add shadow info tokens similar to accent shadow
1 change: 1 addition & 0 deletions packages/design-tokens/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"build:umd:dev": "talend-scripts build --umd --dev",
"build:umd:prod": "talend-scripts build --umd",
"build:lib": "talend-scripts build && yarn build:umd:dev && yarn build:umd:prod && yarn test:umd",
"watch": "talend-scripts build --watch",
"test": "echo no test for @talend/design-tokens",
"test:cov": "echo no test for @talend/design-tokens",
"test:umd": "jest scripts/umd.test.js",
Expand Down
1 change: 1 addition & 0 deletions packages/design-tokens/src/_tokens.scss
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ $coral-sizing-xxxl: #{var(--coral-sizing-xxxl, 22rem)};
$coral-sizing-maximal: #{var(--coral-sizing-maximal, 32rem)};
$coral-elevation-shadow-neutral-m: #{var(--coral-elevation-shadow-neutral-m, 0 0.2rem 0.6rem 0 hsla(0, 0%, 0%, 0.3))};
$coral-elevation-shadow-accent: #{var(--coral-elevation-shadow-accent, 0 0.1rem 0.1rem 0 hsla(204, 95%, 31%, 0.3))};
$coral-elevation-shadow-info: #{var(--coral-elevation-shadow-info, 0 0.1rem 0.1rem 0 hsla(204, 95%, 31%, 0.3))};
$coral-elevation-shadow-success: #{var(--coral-elevation-shadow-success, 0 0.1rem 0.1rem 0 hsla(111, 49%, 34%, 0.3))};
$coral-elevation-shadow-danger: #{var(--coral-elevation-shadow-danger, 0 0.1rem 0.1rem 0 hsla(359, 51%, 53%, 0.3))};
$coral-elevation-shadow-warning: #{var(--coral-elevation-shadow-warning, 0 0.1rem 0.1rem 0 hsla(22, 93%, 41%, 0.3))};
Expand Down
1 change: 1 addition & 0 deletions packages/design-tokens/src/dark/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@
--coral-elevation-shadow-neutral-m: 0 0.2rem 0.6rem 0 hsla(0, 0%, 0%, 0.5);
--coral-elevation-shadow-neutral-l: 0 0.4rem 0.8rem 0 hsla(0, 0%, 0%, 0.5);
--coral-elevation-shadow-accent: 0 0.1rem 0.1rem 0 hsla(198, 72%, 75%, 0.3);
--coral-elevation-shadow-info: 0 0.1rem 0.1rem 0 hsla(198, 72%, 75%, 0.3);
--coral-elevation-shadow-success: 0 0.1rem 0.1rem 0 hsla(110, 50%, 70%, 0.3);
--coral-elevation-shadow-danger: 0 0.1rem 0.1rem 0 hsla(359, 100%, 78%, 0.3);
--coral-elevation-shadow-warning: 0 0.1rem 0.1rem 0 hsla(27, 98%, 67%, 0.3);
Expand Down
1 change: 1 addition & 0 deletions packages/design-tokens/src/dark/_tokens.scss
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ $coral-sizing-maximal: #{var(--coral-sizing-maximal, 32rem)};
$coral-elevation-shadow-neutral-m: #{var(--coral-elevation-shadow-neutral-m, 0 0.2rem 0.6rem 0 hsla(0, 0%, 0%, 0.5))};
$coral-elevation-shadow-neutral-l: #{var(--coral-elevation-shadow-neutral-l, 0 0.4rem 0.8rem 0 hsla(0, 0%, 0%, 0.5))};
$coral-elevation-shadow-accent: #{var(--coral-elevation-shadow-accent, 0 0.1rem 0.1rem 0 hsla(198, 72%, 75%, 0.3))};
$coral-elevation-shadow-info: #{var(--coral-elevation-shadow-info, 0 0.1rem 0.1rem 0 hsla(198, 72%, 75%, 0.3))};
$coral-elevation-shadow-success: #{var(--coral-elevation-shadow-success, 0 0.1rem 0.1rem 0 hsla(110, 50%, 70%, 0.3))};
$coral-elevation-shadow-danger: #{var(--coral-elevation-shadow-danger, 0 0.1rem 0.1rem 0 hsla(359, 100%, 78%, 0.3))};
$coral-elevation-shadow-warning: #{var(--coral-elevation-shadow-warning, 0 0.1rem 0.1rem 0 hsla(27, 98%, 67%, 0.3))};
Expand Down
7 changes: 7 additions & 0 deletions packages/design-tokens/src/dark/dictionary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2587,6 +2587,13 @@ const dictionary = [
value: '0rem 0.4rem 0.8rem 0rem hsla(0, 0%, 0%, 0.5)',
id: 'S:8bf21eea402fda80510e8657d5d8db538640bd02,:shadow:0',
},
{
name: 'coralElevationShadowInfo',
type: 'shadow',
description: '',
value: '0rem 0.1rem 0.1rem 0rem hsla(198, 72%, 75%, 0.3)',
id: 'S:fe0699876a0912d91d178c69d81969b011a5eb59,:shadow:0',
},
{
name: 'coralElevationShadowAccent',
type: 'shadow',
Expand Down
1 change: 1 addition & 0 deletions packages/design-tokens/src/dark/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ const tokens = {
coralElevationShadowNeutralM: `var(--coral-elevation-shadow-neutral-m, 0rem 0.2rem 0.6rem 0rem hsla(0, 0%, 0%, 0.5))`,
coralElevationShadowNeutralL: `var(--coral-elevation-shadow-neutral-l, 0rem 0.4rem 0.8rem 0rem hsla(0, 0%, 0%, 0.5))`,
coralElevationShadowAccent: `var(--coral-elevation-shadow-accent, 0rem 0.1rem 0.1rem 0rem hsla(198, 72%, 75%, 0.3))`,
coralElevationShadowInfo: `var(--coral-elevation-shadow-info, 0rem 0.1rem 0.1rem 0rem hsla(198, 72%, 75%, 0.3))`,
coralElevationShadowSuccess: `var(--coral-elevation-shadow-success, 0rem 0.1rem 0.1rem 0rem hsla(110, 50%, 70%, 0.3))`,
coralElevationShadowDanger: `var(--coral-elevation-shadow-danger, 0rem 0.1rem 0.1rem 0rem hsla(359, 100%, 78%, 0.3))`,
coralElevationShadowWarning: `var(--coral-elevation-shadow-warning, 0rem 0.1rem 0.1rem 0rem hsla(27, 98%, 67%, 0.3))`,
Expand Down
1 change: 1 addition & 0 deletions packages/design-tokens/src/light/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@
--coral-sizing-maximal: 32rem;
--coral-elevation-shadow-neutral-m: 0 0.2rem 0.6rem 0 hsla(0, 0%, 0%, 0.3);
--coral-elevation-shadow-accent: 0 0.1rem 0.1rem 0 hsla(204, 95%, 31%, 0.3);
--coral-elevation-shadow-info: 0 0.1rem 0.1rem 0 hsla(204, 95%, 31%, 0.3);
--coral-elevation-shadow-success: 0 0.1rem 0.1rem 0 hsla(111, 49%, 34%, 0.3);
--coral-elevation-shadow-danger: 0 0.1rem 0.1rem 0 hsla(359, 51%, 53%, 0.3);
--coral-elevation-shadow-warning: 0 0.1rem 0.1rem 0 hsla(22, 93%, 41%, 0.3);
Expand Down
7 changes: 7 additions & 0 deletions packages/design-tokens/src/light/dictionary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2621,6 +2621,13 @@ const dictionary = [
value: '0rem 0.2rem 0.6rem 0rem hsla(0, 0%, 0%, 0.3)',
id: 'S:34a756f910ffc665554a228b44d5eec1e9c463cb,:shadow:0',
},
{
name: 'coralElevationShadowInfo',
type: 'shadow',
description: 'Shadow with an info tint. Use for subtle highlights. Ex: InlineMessage',
value: '0rem 0.1rem 0.1rem 0rem hsla(204, 95%, 31%, 0.3)',
id: 'S:6361d40b509d112c733483b262d9b4929ad0e1a8,:shadow:0',
},
{
name: 'coralElevationShadowAccent',
type: 'shadow',
Expand Down
1 change: 1 addition & 0 deletions packages/design-tokens/src/light/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ const tokens = {
coralSizingMaximal: `var(--coral-sizing-maximal, 32rem)`,
coralElevationShadowNeutralM: `var(--coral-elevation-shadow-neutral-m, 0rem 0.2rem 0.6rem 0rem hsla(0, 0%, 0%, 0.3))`,
coralElevationShadowAccent: `var(--coral-elevation-shadow-accent, 0rem 0.1rem 0.1rem 0rem hsla(204, 95%, 31%, 0.3))`,
coralElevationShadowInfo: `var(--coral-elevation-shadow-info, 0rem 0.1rem 0.1rem 0rem hsla(204, 95%, 31%, 0.3))`,
coralElevationShadowSuccess: `var(--coral-elevation-shadow-success, 0rem 0.1rem 0.1rem 0rem hsla(111, 49%, 34%, 0.3))`,
coralElevationShadowDanger: `var(--coral-elevation-shadow-danger, 0rem 0.1rem 0.1rem 0rem hsla(359, 51%, 53%, 0.3))`,
coralElevationShadowWarning: `var(--coral-elevation-shadow-warning, 0rem 0.1rem 0.1rem 0rem hsla(22, 93%, 41%, 0.3))`,
Expand Down

0 comments on commit 5256cfd

Please sign in to comment.