Skip to content

Commit 4c6fe11

Browse files
authored
Merge pull request #2044 from chanzuckerberg/release-v15.3.0
## [15.3.0](v15.2.1...v15.3.0) (2024-08-23) [Storybook](https://61313967cde49b003ae2a860-vuzmfnjuoj.chromatic.com/) Figma Components Library: 🟢 No breaking changes - EDS-toastNotification: - deleted the dissmissType property - Added Toast Pattern documentation to handle multiple toasts - EDS-popover: added EDS-popover 2.0 component ### Features * **config:** add transition durations for tailwind ([#2036](#2036)) ([aed0f09](aed0f09)) * **Popover:** update theming to 2.0 ([#2031](#2031)) ([c5ab351](c5ab351)) * **tokens:** add in additional table tokens ([#2035](#2035)) ([a698a5b](a698a5b)) * **tokens:** update visited tokens ([#2034](#2034)) ([df84c87](df84c87)) ### Bug Fixes * **Card:** add spacing between eyebrow and title ([#2040](#2040)) ([d6ee15d](d6ee15d)) * **Link:** handle inverse variant for standalone links ([#2042](#2042)) ([351d7fd](351d7fd)) * **Popover:** update component version number ([#2038](#2038)) ([9940d76](9940d76))
2 parents cbe3b68 + ba6fc3b commit 4c6fe11

31 files changed

+1653
-1567
lines changed

.storybook/components/DesignTokens/Tier2/Colors.stories.tsx

-16
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,6 @@ export const TextUtility: StoryObj = {
5454
),
5555
};
5656

57-
export const IconUtility: StoryObj = {
58-
render: () => (
59-
<div>
60-
<Section title="Icon Colors (utility)">
61-
<ColorList
62-
listItems={getListItems({
63-
filterTerm: 'eds-theme-color-icon-utility',
64-
figmaTokenHeader: 'icon',
65-
tailwindClassHeader: 'text-icon-utility',
66-
})}
67-
/>
68-
</Section>
69-
</div>
70-
),
71-
};
72-
7357
export const BackgroundUtility: StoryObj = {
7458
render: () => (
7559
<div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
import type { StoryObj } from '@storybook/react';
2+
import React from 'react';
3+
import filterTokens from '../../../util/filterTokens';
4+
import { ColorList } from '../../ColorList/ColorList';
5+
import Section from '../../Section';
6+
7+
export default {
8+
title: 'Design Tokens/Tier 3: Component/Colors',
9+
parameters: {
10+
axe: {
11+
// For documentation purposes only
12+
skip: true,
13+
},
14+
},
15+
};
16+
17+
const camelCaseWarning =
18+
'NOTE: table tokens have a camelCase suffix for the emphasis (e.g., tableRow)';
19+
20+
const getListItems = ({
21+
filterTerm,
22+
figmaTokenHeader,
23+
tailwindClassHeader,
24+
}: {
25+
filterTerm: string;
26+
figmaTokenHeader: string;
27+
tailwindClassHeader: string;
28+
}) =>
29+
filterTokens(filterTerm).map(({ name, value }) => {
30+
const specifier = name.slice(
31+
name.indexOf(filterTerm) + filterTerm.length + 1,
32+
);
33+
return {
34+
name,
35+
value,
36+
figmaToken: figmaTokenHeader + '/' + specifier,
37+
tailwindClass: tailwindClassHeader + '-' + specifier,
38+
};
39+
});
40+
41+
export const IconUtility: StoryObj = {
42+
render: () => (
43+
<div>
44+
<Section title="Icon Colors (utility)">
45+
<ColorList
46+
listItems={getListItems({
47+
filterTerm: 'eds-theme-color-icon-utility',
48+
figmaTokenHeader: 'icon',
49+
tailwindClassHeader: 'text-icon-utility',
50+
})}
51+
/>
52+
</Section>
53+
</div>
54+
),
55+
};
56+
57+
// TODO: handle name formatting for tableRow tokens in figma and tailwind
58+
export const BackgroundTable: StoryObj = {
59+
render: () => (
60+
<div>
61+
<Section description={camelCaseWarning} title="Background Colors (Table)">
62+
<ColorList
63+
listItems={getListItems({
64+
filterTerm: 'eds-theme-color-background-table',
65+
figmaTokenHeader: 'background',
66+
tailwindClassHeader: 'bg-table',
67+
})}
68+
/>
69+
</Section>
70+
</div>
71+
),
72+
};

.storybook/components/Docs/Guidelines/Theming.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ for which utility classes to use when you need color tokens (in order of prefere
4040
These map to the higher-tier token names, and are semantic- (or component-) based.
4141

4242
```tsx
43-
<div className="text-utility-interactive-visited">Option 1</div>
43+
<div className="text-utility-interactive-primary-visited">Option 1</div>
4444
```
4545

4646
#### ✅ Token name referecnes as custom utility classes
4747

4848
If there is no existing utility class for the use case, you can reference the token directly in a class. While less preferable to the above, this still plugs into EDS.
4949

5050
```tsx
51-
<div className="bg-[var(--eds-theme-color-text-utility-interactive-visited)]">Option 2</div>
51+
<div className="bg-[var(--eds-theme-color-text-utility-interactive-primary-visited)]">Option 2</div>
5252
```
5353

5454
Cons:

.storybook/data/tokens.json

+9-1
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,9 @@
191191
"eds-theme-color-background-brand-purple": "#C580E7",
192192
"eds-theme-color-background-brand-purple-low-emphasis": "#FBF5FD",
193193
"eds-theme-color-background-brand-pink": "#DB458D",
194+
"eds-theme-color-background-table-row-stripe-1": "#F5FAFF",
195+
"eds-theme-color-background-table-row-stripe-2": "rgb(var(--eds-color-white) / 1)",
196+
"eds-theme-color-background-table-row-selected": "#CEE6FF",
194197
"eds-theme-color-background-utility-base-1": "rgb(var(--eds-color-white) / 1)",
195198
"eds-theme-color-background-utility-base-2": "#FDF9F8",
196199
"eds-theme-color-background-utility-container": "rgb(var(--eds-color-white) / 1)",
@@ -492,9 +495,11 @@
492495
"eds-theme-color-icon-utility-interactive-primary": "#0F2163",
493496
"eds-theme-color-icon-utility-interactive-primary-hover": "#0A164C",
494497
"eds-theme-color-icon-utility-interactive-primary-active": "#060E30",
498+
"eds-theme-color-icon-utility-interactive-primary-visited": "#0F2163",
495499
"eds-theme-color-icon-utility-interactive-secondary": "#3165D2",
496500
"eds-theme-color-icon-utility-interactive-secondary-hover": "#254EAC",
497501
"eds-theme-color-icon-utility-interactive-secondary-active": "#1B3889",
502+
"eds-theme-color-icon-utility-interactive-secondary-visited": "#3165D2",
498503
"eds-theme-color-icon-utility-interactive-visited": "#8A50A7",
499504
"eds-theme-color-icon-utility-critical": "#A51115",
500505
"eds-theme-color-icon-utility-critical-hover": "#7D0A16",
@@ -555,9 +560,11 @@
555560
"eds-theme-color-text-utility-interactive-primary": "#0F2163",
556561
"eds-theme-color-text-utility-interactive-primary-hover": "#0A164C",
557562
"eds-theme-color-text-utility-interactive-primary-active": "#060E30",
563+
"eds-theme-color-text-utility-interactive-primary-visited": "#0F2163",
558564
"eds-theme-color-text-utility-interactive-secondary": "#3165D2",
559565
"eds-theme-color-text-utility-interactive-secondary-hover": "#254EAC",
560566
"eds-theme-color-text-utility-interactive-secondary-active": "#1B3889",
567+
"eds-theme-color-text-utility-interactive-secondary-visited": "#3165D2",
561568
"eds-theme-color-text-utility-interactive-visited": "#8A50A7",
562569
"eds-theme-color-text-utility-critical": "#A51115",
563570
"eds-theme-color-text-utility-critical-hover": "#7D0A16",
@@ -575,7 +582,7 @@
575582
"eds-theme-color-text-utility-disabled-secondary": "#CFC9C7",
576583
"eds-theme-color-text-utility-inverse": "rgb(var(--eds-color-white) / 1)",
577584
"eds-theme-color-text-utility-inverse-disabled": "rgb(var(--eds-color-white) / 0.5)",
578-
"eds-theme-color-text-utility-inverse-interactive-visited": "#C580E7",
585+
"eds-theme-color-text-utility-inverse-interactive-visited": "rgb(var(--eds-color-white) / 1)",
579586
"eds-theme-color-text-utility-placeholder": "#6C6967",
580587
"eds-theme-color-text-utility-success": "#007249",
581588
"eds-theme-color-text-utility-error": "#BD0044",
@@ -718,6 +725,7 @@
718725
"eds-color-blue-850": "#0F2163",
719726
"eds-color-blue-900": "#0A164C",
720727
"eds-color-blue-950": "#060E30",
728+
"eds-color-blue-025": "#F5FAFF",
721729
"eds-color-blue-050": "#EAF4FF",
722730
"eds-color-pink-350": "#E67EB0",
723731
"eds-color-pink-450": "#DB458D",

.yarn/releases/yarn-4.3.1.cjs

-894
This file was deleted.

.yarn/releases/yarn-4.4.0.cjs

+925
Large diffs are not rendered by default.

.yarnrc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ enableGlobalCache: false
44

55
nodeLinker: node-modules
66

7-
yarnPath: .yarn/releases/yarn-4.3.1.cjs
7+
yarnPath: .yarn/releases/yarn-4.4.0.cjs

CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
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+
## [15.3.0](https://github.com/chanzuckerberg/edu-design-system/compare/v15.2.1...v15.3.0) (2024-08-23)
6+
7+
8+
### Features
9+
10+
* **config:** add transition durations for tailwind ([#2036](https://github.com/chanzuckerberg/edu-design-system/issues/2036)) ([aed0f09](https://github.com/chanzuckerberg/edu-design-system/commit/aed0f0941d9d09f8a7b96f2219f6801eefa4ee50))
11+
* **Popover:** update theming to 2.0 ([#2031](https://github.com/chanzuckerberg/edu-design-system/issues/2031)) ([c5ab351](https://github.com/chanzuckerberg/edu-design-system/commit/c5ab3515e1bfe8eafde89ec308547b6d34e0b44d))
12+
* **tokens:** add in additional table tokens ([#2035](https://github.com/chanzuckerberg/edu-design-system/issues/2035)) ([a698a5b](https://github.com/chanzuckerberg/edu-design-system/commit/a698a5b4a65af8a7dffa7da908be9d7e05ffc570))
13+
* **tokens:** update visited tokens ([#2034](https://github.com/chanzuckerberg/edu-design-system/issues/2034)) ([df84c87](https://github.com/chanzuckerberg/edu-design-system/commit/df84c87ecd2ad34b37b90d6774bea284da50d045))
14+
15+
16+
### Bug Fixes
17+
18+
* **Card:** add spacing between eyebrow and title ([#2040](https://github.com/chanzuckerberg/edu-design-system/issues/2040)) ([d6ee15d](https://github.com/chanzuckerberg/edu-design-system/commit/d6ee15d71d9f3df76fe68f1639ac1e442e6cd686))
19+
* **Link:** handle inverse variant for standalone links ([#2042](https://github.com/chanzuckerberg/edu-design-system/issues/2042)) ([351d7fd](https://github.com/chanzuckerberg/edu-design-system/commit/351d7fd850196c44da17985b82d8f150fd37a62b))
20+
* **Popover:** update component version number ([#2038](https://github.com/chanzuckerberg/edu-design-system/issues/2038)) ([9940d76](https://github.com/chanzuckerberg/edu-design-system/commit/9940d76d6ac60e112dee2e39d227bbb695057564))
21+
522
### [15.2.1](https://github.com/chanzuckerberg/edu-design-system/compare/v15.2.0...v15.2.1) (2024-08-09)
623

724

docs/PUBLISHING.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -85,22 +85,22 @@ Once merged, wait until the [builds complete on `main`](https://github.com/chanz
8585

8686
8. Pull down the most up-to-date version of main: `git checkout main && git pull && yarn install && yarn build`
8787
9. Publish the package: `npm publish`
88-
10. Create a [new release](https://github.com/chanzuckerberg/edu-design-system/releases) based on the new tag. Use the same text used for the pull request description above (from CHANGELOG.md). Also include the link for the built storybook in the description. This will automatically post to [relevant slack channels](https://slack.github.com/). **When doing a major version release, don't forget to include notes on each breaking change**. Also, enable the discussion feature to handle any question-answering should questions arise.
88+
10. Create a [new release](https://github.com/chanzuckerberg/edu-design-system/releases) based on the newly-created tag.
8989

90-
When naming the release, include the package name before the version number in the release name field (e.g., "@chanzuckerberg/eds vX.X.X")
90+
To prepare the message:
91+
92+
* Include the package name before the version number in the release name field (e.g., "@chanzuckerberg/eds@X.Y.Z")
93+
* Use the same text used for the pull request description above (from CHANGELOG.md).
94+
* Include any additional notes from the [System Designers](https://github.com/orgs/chanzuckerberg/teams/edu-systems-designers).
95+
* Include the link for the built storybook in the description.
96+
97+
The latter will automatically post to [relevant slack channels](https://slack.github.com/). **When doing a major version release, don't forget to include notes on each breaking change**.
9198

9299
#### Finishing the release
93100

94101
11. Lastly, run the following to "back merge" release changes to `next`:
95102
- `git checkout main && git pull origin main && git checkout next && git merge main && git push`
96103

97-
Once complete, you can update the package in the main apps that use it (for major versions):
98-
99-
- [edu-stack](https://github.com/chanzuckerberg/edu-stack) - in the package.json
100-
- [edu-stack-service](https://github.com/chanzuckerberg/edu-stack-service) - in the package.json
101-
102-
Take note of the details here, which will also be mentioned in that month's newsletter, and updates to ZeroHeight (What's New).
103-
104104
#### Alpha release
105105

106106
For testing a release to build confidence.

package.json

+21-21
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@chanzuckerberg/eds",
3-
"version": "15.2.1",
3+
"version": "15.3.0",
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",
@@ -125,53 +125,53 @@
125125
"@commitlint/cli": "^18.6.1",
126126
"@commitlint/config-conventional": "^18.6.3",
127127
"@geometricpanda/storybook-addon-badges": "^2.0.2",
128-
"@omlet/cli": "^1.10.1",
128+
"@omlet/cli": "^1.10.2",
129129
"@rollup/plugin-node-resolve": "^15.2.3",
130130
"@rollup/plugin-typescript": "^11.1.6",
131131
"@size-limit/file": "^8.2.6",
132-
"@storybook/addon-a11y": "^8.2.7",
133-
"@storybook/addon-essentials": "^8.2.7",
134-
"@storybook/addon-interactions": "^8.2.7",
135-
"@storybook/addon-links": "^8.2.7",
136-
"@storybook/addon-mdx-gfm": "^8.2.7",
132+
"@storybook/addon-a11y": "^8.2.9",
133+
"@storybook/addon-essentials": "^8.2.9",
134+
"@storybook/addon-interactions": "^8.2.9",
135+
"@storybook/addon-links": "^8.2.9",
136+
"@storybook/addon-mdx-gfm": "^8.2.9",
137137
"@storybook/addon-styling": "^1.3.7",
138138
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
139-
"@storybook/manager-api": "^8.2.7",
140-
"@storybook/react": "^8.2.7",
141-
"@storybook/react-webpack5": "^8.2.7",
142-
"@storybook/test": "^8.2.7",
139+
"@storybook/manager-api": "^8.2.9",
140+
"@storybook/react": "^8.2.9",
141+
"@storybook/react-webpack5": "^8.2.9",
142+
"@storybook/test": "^8.2.9",
143143
"@storybook/testing-library": "^0.2.2",
144-
"@storybook/theming": "^8.2.7",
144+
"@storybook/theming": "^8.2.9",
145145
"@testing-library/jest-dom": "^6.4.8",
146146
"@testing-library/react": "^16.0.0",
147147
"@testing-library/user-event": "^14.5.2",
148148
"@types/jest": "^29.5.12",
149149
"@types/jsonfile": "^6",
150150
"@types/lodash": "^4.17.7",
151-
"@types/node": "^20.14.14",
151+
"@types/node": "^20.14.15",
152152
"@types/react": "^18.3.3",
153153
"@types/react-beautiful-dnd": "^13.1.8",
154154
"@types/react-dom": "^18.3.0",
155155
"@types/react-portal": "^4.0.7",
156-
"@types/yargs": "^17.0.32",
156+
"@types/yargs": "^17.0.33",
157157
"axe-core": "4.10.0",
158-
"chromatic": "^11.7.0",
158+
"chromatic": "^11.7.1",
159159
"codecov": "^3.8.3",
160160
"copyfiles": "^2.4.1",
161161
"eslint": "^8.57.0",
162162
"eslint-config-prettier": "^9.0.0",
163163
"eslint-plugin-jest": "^27.9.0",
164164
"eslint-plugin-prettier": "^5.0.1",
165165
"eslint-plugin-storybook": "^0.8.0",
166-
"eslint-plugin-testing-library": "^6.2.2",
166+
"eslint-plugin-testing-library": "^6.3.0",
167167
"husky": "^8.0.3",
168168
"identity-obj-proxy": "^3.0.0",
169169
"jest": "^29.7.0",
170170
"jest-environment-jsdom": "^29.7.0",
171171
"jest-preset-stylelint": "^6.3.2",
172172
"lint-staged": "^13.3.0",
173173
"plop": "^4.0.1",
174-
"postcss": "^8.4.40",
174+
"postcss": "^8.4.41",
175175
"postcss-cli": "^10.1.0",
176176
"postcss-import": "^15.1.0",
177177
"postcss-mixins": "^9.0.4",
@@ -181,15 +181,15 @@
181181
"prettier-plugin-tailwindcss": "^0.5.7",
182182
"react": "^18.2.0",
183183
"react-dom": "^18.2.0",
184-
"rollup": "^4.19.2",
184+
"rollup": "^4.20.0",
185185
"rollup-plugin-postcss": "^4.0.2",
186186
"size-limit": "^8.2.6",
187187
"standard-version": "^9.5.0",
188-
"storybook": "^8.2.7",
188+
"storybook": "^8.2.9",
189189
"style-dictionary": "^3.9.2",
190190
"stylelint": "^15.11.0",
191191
"stylelint-config-recommended": "^13.0.0",
192-
"tailwindcss": "^3.4.7",
192+
"tailwindcss": "^3.4.10",
193193
"ts-jest": "^29.2.4",
194194
"typescript": "^5.5.4"
195195
},
@@ -202,5 +202,5 @@
202202
"stylelint --fix --allow-empty-input"
203203
]
204204
},
205-
"packageManager": "yarn@4.3.1"
205+
"packageManager": "yarn@4.4.0"
206206
}

src/components/Button/Button.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ export type ButtonProps<ExtendedElement = unknown> = ButtonHTMLElementProps & {
9292
* or other in-page activity.
9393
*
9494
* - If you need to style a navigation anchor, please use the `Link` component.
95-
* - If you need to style a different element or component to
96-
* look like a button or link, you can use the `ClickableStyle` component.
95+
* - If you need the button to use some other tag or component, use the `as` prop.
9796
*/
9897
export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
9998
(

src/components/Card/Card.module.css

+4
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@
8383

8484
.card__header {
8585
display: flex;
86+
87+
& .header__eyebrow {
88+
margin-bottom: calc(var(--eds-size-1) / 16 * 1rem);
89+
}
8690

8791
&.header--size-sm {
8892
gap: calc(var(--eds-size-1) / 16 * 1rem)

src/components/Link/Link.module.css

+5-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050
text-decoration: none;
5151
}
5252

53+
&.link--variant-inverse {
54+
color: var(--eds-theme-color-text-utility-inverse);
55+
}
56+
5357
/**
5458
* Sizes - using the presets for type ramp matching body-*
5559
*/
@@ -114,7 +118,7 @@
114118
}
115119

116120
.link:visited {
117-
color: var(--eds-theme-color-text-utility-interactive-visited);
121+
color: var(--eds-theme-color-text-utility-interactive-primary-visited);
118122
}
119123

120124
.link:focus-visible {

0 commit comments

Comments
 (0)