Skip to content

Commit 7ae38fe

Browse files
authored
Merge pull request #1823 from chanzuckerberg/release-v13.8.1
### [13.8.1](v13.8.0...v13.8.1) (2024-01-04) [Storybook](https://61313967cde49b003ae2a860-zhfjhciiyv.chromatic.com/) - Dependency updates - Token refactoring
2 parents 3b08e63 + 97c4ddb commit 7ae38fe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+3732
-3351
lines changed

.storybook/components/DesignTokens/Tier1/Colors.tsx

-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ export const Tier1Colors = () => {
2929
listItems={getListItems('eds-color-other-yellow', 'yellow')}
3030
/>
3131
<ColorList listItems={getListItems('eds-color-other-ruby', 'ruby')} />
32-
<ColorList
33-
listItems={getListItems('eds-color-other-lemon', 'supporting')}
34-
/>
3532
</Section>
3633
</div>
3734
);

.storybook/components/DesignTokens/Tier1/Sizes.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class Tier1Sizes extends Component {
1212
{filterTokens('eds-size-base').map((listItem) => (
1313
<Grid.Item key={listItem.name}>
1414
<TokenSpecimen
15-
comment="Calculated from a multiple of the base font size --eds-font-size-base"
15+
comment="Calculated from a multiple of the base font size"
1616
inlineStyles={{
1717
width: `var(${listItem.name})`,
1818
height: `var(${listItem.name})`,

.storybook/components/DesignTokens/Tier3/TypographyComponents.stories.tsx

+7-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ import { at, capitalize, forEach, merge } from 'lodash';
33

44
import React from 'react';
55
import { Grid, Section } from '../../../../src';
6-
import breadcrumb from '../../../../src/design-tokens/tier-3-component/breadcrumb.json';
7-
import button from '../../../../src/design-tokens/tier-3-component/buttons.json';
8-
import form from '../../../../src/design-tokens/tier-3-component/forms.json';
9-
import link from '../../../../src/design-tokens/tier-3-component/link.json';
10-
import tab from '../../../../src/design-tokens/tier-3-component/tab.json';
11-
import tag from '../../../../src/design-tokens/tier-3-component/tag.json';
6+
import breadcrumb from '../../../../src/design-tokens/tier-3-component/breadcrumb-typography.json';
7+
import button from '../../../../src/design-tokens/tier-3-component/buttons-typography.json';
8+
import form from '../../../../src/design-tokens/tier-3-component/forms-typography.json';
9+
import link from '../../../../src/design-tokens/tier-3-component/link-typography.json';
10+
import tab from '../../../../src/design-tokens/tier-3-component/tab-typography.json';
11+
import tag from '../../../../src/design-tokens/tier-3-component/tag-typography.json';
12+
1213
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
1314
// @ts-ignore importing of a legacy utility file results in some 'any's, which is acceptable for this docs page
1415
import flatten from '../../../util/flattenToken';

.storybook/components/Docs/Guidelines/Typography.stories.mdx

+6-7
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,15 @@ import { Canvas, Meta } from '@storybook/blocks';
66

77
Typography in EDS follows [the same structure as design tokens](./?path=/story/documentation-guidelines-tokens--page), with the exception that typography operates as a _cluster_ of typography-specific style properties rather than a single style property.
88

9-
## Tier 1: Typography values
9+
## Basics: Typography values
1010

1111
These token values are _never to be used_ directly by components; these token values are assembled into typography presets.
1212

13-
Values include:
13+
Tokens include those prefixed by:
1414

15-
- `eds-font-family`
16-
- `eds-font-size-XX`
17-
- `eds-font-weight-XX`
18-
- `eds-letter-spacing-XX`
15+
- `eds-font-family-*`
16+
- `eds-font-weight-*`
17+
- `eds-letter-spacing-*`
1918

2019
## Tier 1: Typography presets
2120

@@ -52,7 +51,7 @@ When defining a new usage, you can refer to the variable by name
5251

5352
Tier 2 typography values take the typography presets defined at the Tier 2 level and map them to a semantic usage value like so:
5453

55-
Similar to the example above, you can use the token names in components and other code, or to define higher-tier tokens.
54+
Similar to the example above, you can use the token names in components and other code, make use of the presets using the `Heading` or `Text` components, or to define higher-tier tokens.
5655

5756
These semantic values are then included in each component's style file:
5857

.storybook/data/tokens.json

+285-283
Large diffs are not rendered by default.

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### [13.8.1](https://github.com/chanzuckerberg/edu-design-system/compare/v13.8.0...v13.8.1) (2024-01-04)
6+
57
## [13.8.0](https://github.com/chanzuckerberg/edu-design-system/compare/v13.7.1...v13.8.0) (2023-12-06)
68

79

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ We also surface an `--eds-font-size-base` property to set your base `rem` font s
3030

3131
```css
3232
html {
33-
font-size: var(--eds-font-size-base); /* Resets the default pixel-to-rem ratio */
33+
font-size: var(--eds-font-size-base); /* Sets the default pixel-to-rem ratio */
3434
}
3535
```
3636

docs/CONTRIBUTING.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,19 @@ For example, tokens in figma have a name in the format 'Category/token-name', so
8282
When making changes to existing tokens, we want to be mindful not to cause regressions for consumers. We use the following process for updating existing tokens:
8383

8484
1. Add in the new token to the corresponding JSON file in src/design-tokens
85-
2. For the new token value, use a `var()` reference, pointing to the old token name
85+
2. For the new token value, use a [style dictionary][sd] reference, pointing to the old token name (this will generate a css variable when processing CSS as a target).
8686
3. Also add a comment which notes the old token is deprecated, and which token is the replacement to use.
8787

8888
For example, if we had a token `--eds-theme-color-background-old-name` which we want to change to `---eds-theme-color-background-new-name`, we would set the value of the new token to `var(--eds-theme-color-background-old-name)`. We can also add the following key to the JSON file.
8989

90+
[sd]: https://amzn.github.io/style-dictionary/#/version_3?id=output-references
91+
9092
```json
91-
"comment": "@deprecated This token is deprecated. Please use eds-theme-color-new-name instead."
93+
"comment": "@deprecated This should not be used in code or design. It will be removed in a future version of EDS. Please use eds-theme-color-new-name instead."
9294
```
9395

96+
If there is a plan to simply remove a token due to some refactoring, you can remove the suffix suggesting the token to remove at your discretion.
97+
9498
This has the following benefits:
9599

96100
- Users who have added a theme value to `--eds-theme-color-background-old-name` will not have their theme value break upon update.

package.json

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@chanzuckerberg/eds",
3-
"version": "13.8.0",
3+
"version": "13.8.1",
44
"description": "The React-powered design system library for Chan Zuckerberg Initiative education web applications",
55
"author": "CZI <[email protected]>",
66
"homepage": "https://github.com/chanzuckerberg/edu-design-system",
@@ -102,11 +102,11 @@
102102
"react-popper": "^2.3.0",
103103
"react-portal": "^4.2.2",
104104
"react-uid": "^2.3.3",
105-
"style-dictionary": "^3.9.0",
105+
"style-dictionary": "^3.9.1",
106106
"svg4everybody": "^2.1.9"
107107
},
108108
"devDependencies": {
109-
"@babel/preset-env": "^7.23.5",
109+
"@babel/preset-env": "^7.23.6",
110110
"@babel/preset-react": "^7.23.3",
111111
"@babel/preset-typescript": "^7.23.3",
112112
"@chanzuckerberg/axe-storybook-testing": "^7.1.3",
@@ -118,33 +118,33 @@
118118
"@commitlint/cli": "^18.4.3",
119119
"@commitlint/config-conventional": "^18.4.3",
120120
"@geometricpanda/storybook-addon-badges": "^2.0.0",
121-
"@omlet/cli": "^1.0.1-beta.39",
121+
"@omlet/cli": "^1.1.2",
122122
"@rollup/plugin-node-resolve": "^15.2.3",
123123
"@rollup/plugin-typescript": "^11.1.5",
124124
"@size-limit/file": "^8.2.6",
125-
"@storybook/addon-a11y": "^7.6.3",
126-
"@storybook/addon-essentials": "^7.6.3",
127-
"@storybook/addon-interactions": "^7.6.3",
128-
"@storybook/addon-links": "^7.6.3",
125+
"@storybook/addon-a11y": "^7.6.6",
126+
"@storybook/addon-essentials": "^7.6.6",
127+
"@storybook/addon-interactions": "^7.6.6",
128+
"@storybook/addon-links": "^7.6.6",
129129
"@storybook/addon-styling": "^1.3.7",
130-
"@storybook/react": "^7.6.3",
131-
"@storybook/react-webpack5": "^7.6.3",
130+
"@storybook/react": "^7.6.6",
131+
"@storybook/react-webpack5": "^7.6.6",
132132
"@storybook/testing-library": "^0.2.2",
133133
"@storybook/testing-react": "^2.0.1",
134134
"@testing-library/jest-dom": "^6.1.5",
135135
"@testing-library/react": "^14.1.2",
136136
"@testing-library/user-event": "^14.5.1",
137-
"@types/jest": "^29.5.10",
138-
"@types/node": "^20.10.1",
139-
"@types/react": "^18.2.39",
137+
"@types/jest": "^29.5.11",
138+
"@types/node": "^20.10.5",
139+
"@types/react": "^18.2.45",
140140
"@types/react-beautiful-dnd": "^13.1.7",
141-
"@types/react-dom": "^18.2.17",
142-
"@types/react-portal": "^4.0.6",
143-
"axe-core": "4.8.2",
141+
"@types/react-dom": "^18.2.18",
142+
"@types/react-portal": "^4.0.7",
143+
"axe-core": "4.8.3",
144144
"chromatic": "^9.1.0",
145145
"codecov": "^3.8.3",
146146
"copyfiles": "^2.4.1",
147-
"eslint": "^8.54.0",
147+
"eslint": "^8.56.0",
148148
"eslint-config-prettier": "^9.0.0",
149149
"eslint-plugin-jest": "^27.6.0",
150150
"eslint-plugin-prettier": "^5.0.1",
@@ -157,7 +157,7 @@
157157
"jest-preset-stylelint": "^6.3.2",
158158
"lint-staged": "^13.3.0",
159159
"plop": "^4.0.0",
160-
"postcss": "^8.4.31",
160+
"postcss": "^8.4.32",
161161
"postcss-cli": "^10.1.0",
162162
"postcss-import": "^15.1.0",
163163
"postcss-mixins": "^9.0.4",
@@ -167,15 +167,15 @@
167167
"prettier-plugin-tailwindcss": "^0.5.7",
168168
"react": "^18.2.0",
169169
"react-dom": "^18.2.0",
170-
"rollup": "^4.6.1",
170+
"rollup": "^4.9.1",
171171
"rollup-plugin-postcss": "^4.0.2",
172172
"size-limit": "^8.2.6",
173173
"standard-version": "^9.5.0",
174-
"storybook": "^7.6.3",
175-
"style-dictionary": "^3.9.0",
174+
"storybook": "^7.6.6",
175+
"style-dictionary": "^3.9.1",
176176
"stylelint": "^15.11.0",
177177
"stylelint-config-recommended": "^13.0.0",
178-
"tailwindcss": "^3.3.5",
178+
"tailwindcss": "^3.4.0",
179179
"ts-jest": "^29.1.1",
180180
"typescript": "^5.2.2"
181181
},

src/components/Avatar/Avatar.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
}
8181

8282
.avatar--circle {
83-
border-radius: var(--eds-border-radius-round);
83+
border-radius: var(--eds-border-radius-full);
8484
}
8585

8686
.avatar__image {

src/components/Badge/Badge.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
--badge-height: calc(var(--eds-size-2-and-half) + 2 * var(--eds-border-width-sm));
2424

25-
z-index: var(--eds-z-index-100);
25+
z-index: 100;
2626

2727
display: flex;
2828
align-items: center;

src/components/DragDrop/DragDrop.module.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
top: 0;
2828
left: 0;
2929
width: var(--eds-size-4);
30-
z-index: var(--eds-z-index-100);
30+
z-index: 100;
3131
}
3232
}
3333

@@ -52,7 +52,7 @@
5252
top: 0;
5353
right: 0;
5454
width: var(--eds-size-4);
55-
z-index: var(--eds-z-index-100);
55+
z-index: 100;
5656
}
5757
}
5858
}
@@ -180,7 +180,7 @@
180180
align-items: center;
181181
height: calc(100% - 2px);
182182
padding: var(--eds-size-1);
183-
z-index: var(--eds-z-index-400);
183+
z-index: 400;
184184
border-radius: var(--eds-border-radius-lg);
185185
background: var(--eds-theme-color-background-neutral-default);
186186
transition: opacity var(--eds-anim-fade-quick) var(--eds-anim-ease);

src/components/Drawer/Drawer.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*/
2828
.drawer__container--is-active {
2929
visibility: visible;
30-
z-index: var(--eds-z-index-400);
30+
z-index: 400;
3131
}
3232

3333
/**

src/components/Layout/Layout.module.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@
8484
top: 0;
8585
left: 0;
8686
height: 100vh;
87-
width: var(--eds-l-sidebar-width);
88-
z-index: var(--eds-z-index-500);
87+
width: 13.5rem;
88+
z-index: 500;
8989
}
9090

9191
/**

src/components/LayoutContainer/LayoutContainer.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Uses calc to account for the addition of padding around the layout container
1313
* to ensure content doesn't butt up against viewport edge.
1414
*/
15-
max-width: calc(var(--eds-l-max-width) + var(--eds-size-6));
15+
max-width: calc(71.25rem + var(--eds-size-6));
1616
margin-left: auto;
1717
margin-right: auto;
1818
padding-left: var(--eds-size-2);

src/components/LayoutLinelengthContainer/LayoutLinelengthContainer.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
*/
88
.layout-linelength-container {
99
/* Caps the length of an excerpt of text to be easily readable. */
10-
max-width: var(--eds-l-linelength-width);
10+
max-width: 36rem;
1111
}

src/components/Modal/Modal.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@
204204
border-bottom-left-radius: var(--eds-border-radius-lg);
205205
border-bottom-right-radius: var(--eds-border-radius-lg);
206206

207-
z-index: var(--eds-z-index-100);
207+
z-index: 100;
208208
}
209209

210210
/**

src/components/NumberIcon/NumberIcon.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/* The circle part of the icon, made with borders. */
1919
border: var(--eds-border-width-sm) solid;
2020
border-color: inherit;
21-
border-radius: var(--eds-border-radius-round);
21+
border-radius: var(--eds-border-radius-full);
2222
}
2323

2424
.number-icon--incomplete {

src/components/PopoverContainer/PopoverContainer.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
overflow: auto;
1313
box-shadow: var(--eds-box-shadow-md);
1414
background-color: var(--eds-theme-color-background-neutral-default);
15-
z-index: var(--eds-z-index-100);
15+
z-index: 100;
1616

1717
&:focus-visible {
1818
@mixin focus;

src/components/PopoverListItem/PopoverListItem.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88
.popover-list-item {
99
display: flex;
10-
font-size: var(--eds-font-size-14);
10+
font-size: 0.875rem;
1111
padding: var(--eds-size-1) var(--eds-size-2);
1212
background-color: var(--eds-theme-color-form-background);
1313
cursor: pointer;

src/components/Select/Select.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* The container for the individual select options.
4444
*/
4545
.select__options {
46-
z-index: var(--eds-z-index-100);
46+
z-index: 100;
4747
}
4848

4949
.select__option-text {

src/components/Skeleton/Skeleton.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
}
3131

3232
.skeleton.skeleton-circle {
33-
border-radius: var(--eds-border-radius-round);
33+
border-radius: var(--eds-border-radius-full);
3434
}
3535

3636
@media screen and (prefers-reduced-motion: reduce) {

src/components/TimelineNav/TimelineNav.module.css

+4-4
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
@media all and (min-width: $eds-bp-lg) {
8080
display: block;
8181
position: static;
82-
z-index: var(--eds-z-index-0);
82+
z-index: 0;
8383
flex: 1;
8484
width: 100%;
8585
height: auto;
@@ -93,7 +93,7 @@
9393

9494
.timeline-nav__body.eds-is-active {
9595
position: static;
96-
z-index: var(--eds-z-index-0);
96+
z-index: 0;
9797
width: 100%;
9898
height: 100%;
9999
overflow: visible;
@@ -264,7 +264,7 @@
264264
/* Used on list items using number variant; provides a cosmetic cicular border */
265265
border: 1px solid var(--eds-theme-color-border-neutral-subtle);
266266
margin-right: 9px;
267-
font-size: var(--eds-font-size-12);
267+
font-size: 0.75rem;
268268
margin-left: -4px;
269269
background: var(--eds-theme-color-background-neutral-default);
270270
/* Make the border dark when li is active */
@@ -277,7 +277,7 @@
277277
*/
278278
.timeline-nav__link-left {
279279
position: relative;
280-
z-index: var(--eds-z-index-100);
280+
z-index: 100;
281281
}
282282

283283
/**

src/components/Toggle/Toggle.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595

9696
/* The transparent border is used to support Windows high contrast mode and reduce potential jiggling with adding / removing borders */
9797
border: var(--eds-theme-border-width) solid transparent;
98-
border-radius: var(--eds-border-radius-round);
98+
border-radius: var(--eds-border-radius-full);
9999

100100
background-color: var(--eds-theme-color-toggle-thumb);
101101

0 commit comments

Comments
 (0)