Skip to content

Commit 5d175c5

Browse files
authored
Merge pull request #2115 from chanzuckerberg/release-v15.8.0
## [15.8.0](v15.7.0...v15.8.0) (2024-12-11) [Storybook](https://61313967cde49b003ae2a860-ryfsqaioup.chromatic.com/) ### Features * **SelectionChip:** introduce 1.0 component ([#2112](#2112)) ([6d4a3f4](6d4a3f4))
2 parents 84da5d7 + eb43b2c commit 5d175c5

File tree

70 files changed

+826
-340
lines changed

Some content is hidden

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

70 files changed

+826
-340
lines changed

.husky/pre-commit

-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
41
npx lint-staged

.storybook/components/Docs/Guidelines/CodeGuidelines.mdx

+7-6
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,8 @@ Examples:
207207

208208
```css
209209
.dropdown-button__icon {
210-
transition: transform calc(var(--eds-anim-move-medium) * 1s) var(--eds-anim-ease);
210+
transition: transform calc(var(--eds-anim-move-medium) * 1s)
211+
var(--eds-anim-ease);
211212

212213
@media (prefers-reduced-motion) {
213214
transition: none;
@@ -368,7 +369,7 @@ import { Icon } from '../Icon/Icon';
368369
### Prop Type definitions
369370

370371
```tsx
371-
export interface ComponentNameProps {
372+
export type ComponentNameProps = {
372373
/**
373374
* Toggles the ability to dismiss the banner via an close button in the top right of the banner
374375
*/
@@ -388,7 +389,7 @@ The comment should begin with an import example, include a general description o
388389
389390
Example:
390391
391-
```tsx
392+
````tsx
392393
/**
393394
* `import {ButtonGroup} from "@chanzuckerberg/eds";`
394395
*
@@ -408,13 +409,13 @@ Example:
408409
* ```
409410
*/
410411
export const ButtonGroup = ({ ... })
411-
```
412+
````
412413
413414
Do not use [jsdoc tags](https://devhints.io/jsdoc) (e.g. `@example`) if possible because these will break the documentation in storybook and cause all following text to not be shown on the page. For important jsdoc tags that we really want to include, place them at the end of the comment to avoid hiding comment content. For example, we use the `@deprecated` tag so Visual Studio Code will indicate a component is deprecated for developers, but we place that at the end of a component's docstring to avoid disrupting any of the other text.
414415
415416
Example:
416417
417-
```tsx
418+
````tsx
418419
/**
419420
* The Banner component is deprecated and will be removed in an upcoming release.
420421
*
@@ -437,7 +438,7 @@ Example:
437438
*
438439
* @deprecated
439440
*/
440-
```
441+
````
441442
442443
### Export module
443444

.storybook/components/Grid/Grid.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { ReactNode } from 'react';
33
import React from 'react';
44
import styles from './Grid.module.css';
55

6-
export interface Props {
6+
export type GridProps = {
77
/**
88
* Child node(s) that can be nested inside component
99
*/
@@ -35,9 +35,9 @@ export interface Props {
3535
| '4up'
3636
| '1-2-4up'
3737
| '1-2-1up';
38-
}
38+
};
3939

40-
export interface GridItemProps {
40+
export type GridItemProps = {
4141
/**
4242
* Child node(s) that can be nested inside component
4343
*/
@@ -46,7 +46,7 @@ export interface GridItemProps {
4646
* CSS class names that can be appended to the component.
4747
*/
4848
className?: string;
49-
}
49+
};
5050

5151
/**
5252
* The Grid component is deprecated and will be removed in an upcoming release.
@@ -64,7 +64,7 @@ export const Grid = ({
6464
children,
6565
gap,
6666
...other
67-
}: Props) => {
67+
}: GridProps) => {
6868
const componentClassName = clsx(
6969
styles['grid'],
7070
variant && styles[`grid--${variant}`],

.storybook/components/Section/Section.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import React from 'react';
44
import { Heading } from '../../../src/';
55
import type { HeadingElement } from '../../../src/components/Heading';
66
import styles from './Section.module.css';
7-
export interface Props {
7+
8+
export type SectionProps = {
89
/**
910
* Align variations:
1011
* - **center** yields a center-aligned section header
@@ -48,7 +49,7 @@ export interface Props {
4849
* Slot for node to appear to the left of the section title. Typically used for images or avatars
4950
*/
5051
titleBefore?: ReactNode;
51-
}
52+
};
5253

5354
/**
5455
* `import {Section} from "@chanzuckerberg/eds";`
@@ -67,7 +68,7 @@ export const Section = ({
6768
titleAfter,
6869
titleBefore,
6970
...other
70-
}: Props) => {
71+
}: SectionProps) => {
7172
const componentClassName = clsx(
7273
styles['section'],
7374
align === 'center' && styles['section--center'],

.storybook/preview.tsx

+17-19
Original file line numberDiff line numberDiff line change
@@ -25,35 +25,35 @@ export const decorators = [
2525
),
2626
];
2727

28-
function createInitialReleaseConfig(usingLabel: string) {
28+
function createComponentVersion(usingLabel: string) {
2929
return {
30-
[`intro-${usingLabel}`]: {
30+
[`api-${usingLabel}`]: {
3131
styles: {
3232
backgroundColor: '#ffffff',
3333
borderColor: '#000000',
3434
color: '#000000',
3535
},
36-
title: `Introduced: ${usingLabel}`,
36+
title: `Component API Version: ${usingLabel}`,
3737
tooltip: {
38-
title: `Introduced in v${usingLabel}`,
39-
desc: `This component was introduced in EDS Design version ${usingLabel}`,
38+
title: `Code / API v${usingLabel}`,
39+
desc: `This component's API version is at ${usingLabel}`,
4040
},
4141
},
4242
};
4343
}
4444

45-
function createCurrentReleaseConfig(usingLabel: string) {
45+
function createThemeVersion(usingLabel: string) {
4646
return {
47-
[`current-${usingLabel}`]: {
47+
[`theme-${usingLabel}`]: {
4848
styles: {
4949
backgroundColor: '#ffffff',
5050
borderColor: '#000000',
5151
color: '#000000',
5252
},
53-
title: `Current: ${usingLabel}`,
53+
title: `Theme Version: ${usingLabel}`,
5454
tooltip: {
55-
title: `Current version v${usingLabel}`,
56-
desc: `This component corresponds to EDS Design version ${usingLabel}`,
55+
title: `Current Theme version v${usingLabel}`,
56+
desc: `This component's theme corresponds to Edu Design System Version is at ${usingLabel}`,
5757
},
5858
},
5959
};
@@ -79,15 +79,13 @@ export const parameters: Preview['parameters'] = {
7979
],
8080
},
8181
badgesConfig: {
82-
...createInitialReleaseConfig('2.0'),
83-
...createInitialReleaseConfig('1.3'),
84-
...createInitialReleaseConfig('1.2'),
85-
...createInitialReleaseConfig('1.1'),
86-
...createInitialReleaseConfig('1.0'),
87-
...createCurrentReleaseConfig('1.0'),
88-
...createCurrentReleaseConfig('1.3'),
89-
...createCurrentReleaseConfig('2.0'),
90-
...createCurrentReleaseConfig('2.1'),
82+
...createComponentVersion('2.0'),
83+
...createComponentVersion('1.3'),
84+
...createComponentVersion('1.2'),
85+
...createComponentVersion('1.1'),
86+
...createComponentVersion('1.0'),
87+
...createThemeVersion('1.0'),
88+
...createThemeVersion('2.0'),
9189
implementationExample: {
9290
styles: {
9391
backgroundColor: '#ffffff',

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
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.8.0](https://github.com/chanzuckerberg/edu-design-system/compare/v15.7.0...v15.8.0) (2024-12-11)
6+
7+
8+
### Features
9+
10+
* **SelectionChip:** introduce 1.0 component ([#2112](https://github.com/chanzuckerberg/edu-design-system/issues/2112)) ([6d4a3f4](https://github.com/chanzuckerberg/edu-design-system/commit/6d4a3f42b0473306dd69a27a160df47c6a57baf1))
11+
512
## [15.7.0](https://github.com/chanzuckerberg/edu-design-system/compare/v15.6.0...v15.7.0) (2024-11-18)
613

714

package.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@chanzuckerberg/eds",
3-
"version": "15.7.0",
3+
"version": "15.8.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",
@@ -122,9 +122,9 @@
122122
"@chanzuckerberg/eslint-plugin-edu-react": "^1.1.9",
123123
"@chanzuckerberg/eslint-plugin-stories": "^3.2.14",
124124
"@chanzuckerberg/story-utils": "^4.0.8",
125-
"@chromatic-com/storybook": "^1",
126-
"@commitlint/cli": "^18.6.1",
127-
"@commitlint/config-conventional": "^18.6.3",
125+
"@chromatic-com/storybook": "^3",
126+
"@commitlint/cli": "^19.6.0",
127+
"@commitlint/config-conventional": "^19.6.0",
128128
"@geometricpanda/storybook-addon-badges": "^2.0.5",
129129
"@omlet/cli": "^1.12.0",
130130
"@rollup/plugin-node-resolve": "^15.3.0",
@@ -164,12 +164,12 @@
164164
"eslint-plugin-jest": "^28.9.0",
165165
"eslint-plugin-prettier": "^5.2.1",
166166
"eslint-plugin-storybook": "^0.11.0",
167-
"eslint-plugin-testing-library": "^6.4.0",
168-
"husky": "^8.0.3",
167+
"eslint-plugin-testing-library": "^7.0.0",
168+
"husky": "^9.1.7",
169169
"identity-obj-proxy": "^3.0.0",
170170
"jest": "^29.7.0",
171171
"jest-environment-jsdom": "^29.7.0",
172-
"jest-preset-stylelint": "^6.3.2",
172+
"jest-preset-stylelint": "^7.1.0",
173173
"lint-staged": "^15.2.10",
174174
"plop": "^4.0.1",
175175
"postcss": "^8.4.47",
@@ -178,7 +178,7 @@
178178
"postcss-mixins": "^11.0.3",
179179
"postcss-nested": "^7.0.2",
180180
"postcss-simple-vars": "^7.0.1",
181-
"prettier": "^3.3.3",
181+
"prettier": "^3.4.1",
182182
"prettier-plugin-tailwindcss": "^0.6.0",
183183
"react": "^18.2.0",
184184
"react-dom": "^18.2.0",
@@ -192,7 +192,7 @@
192192
"stylelint-config-recommended": "^14.0.1",
193193
"tailwindcss": "^3.4.14",
194194
"ts-jest": "^29.2.5",
195-
"typescript": "^5.6.3"
195+
"typescript": "^5.7.2"
196196
},
197197
"lint-staged": {
198198
"*.{js,jsx,ts,tsx}": [

plop-templates/Component/Component.tsx.hbs

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import clsx from 'clsx';
22
import React from 'react';
33
import styles from './{{pascalCase name}}.module.css';
44

5-
export interface Props {
5+
export type {{pascalCase name}}Props = {
66
// Component API
77
/**
88
* CSS class names that can be appended to the component.
99
*/
1010
className?: string;
1111
// Design API
1212
// Insert props/values as defined in figma for {{pascalCase name}}
13-
}
13+
};
1414

1515
/**
1616
* BETA: This component is still a work in progress and is subject to change.
@@ -21,9 +21,9 @@ export interface Props {
2121
*/
2222
export const {{pascalCase name}} = ({
2323
className,
24-
// Add other deferenced props to use
24+
// Add other destructured props to reference
2525
...other
26-
}: Props) => {
26+
}: {{pascalCase name}}Props) => {
2727
const componentClassName = clsx(styles['{{dashCase name}}'], className);
2828

2929
return (

src/components/Accordion/Accordion.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default {
1212
// TODO: add subcomponents like Badge has
1313
parameters: {
1414
layout: 'centered',
15-
badges: ['intro-1.2', 'current-2.0'],
15+
badges: ['api-2.0', 'theme-2.0'],
1616
controls: { sort: 'requiredFirst' },
1717
},
1818
args: {

src/components/AppNotification/AppNotification.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default {
1414
component: AppNotification,
1515
parameters: {
1616
layout: 'centered',
17-
badges: ['intro-2.0', 'current-2.0'],
17+
badges: ['api-2.0', 'theme-2.0'],
1818
},
1919
args: {
2020
title: 'This is an AppNotification title',

src/components/AppNotification/AppNotification.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Button from '../Button';
44
import Text from '../Text';
55
import styles from './AppNotification.module.css';
66

7+
// TODO(next-major): change export to type for consistency
78
export interface AppNotificationProps {
89
// Design API
910
/**

src/components/Avatar/Avatar.stories.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
title: 'Components/Avatar',
66
component: Avatar,
77
parameters: {
8-
badges: ['intro-1.3', 'current-1.3'],
8+
badges: ['api-1.3', 'theme-1.0'],
99
layout: 'centered',
1010
},
1111
} as Meta<typeof Avatar>;

src/components/Badge/Badge.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default {
1313
},
1414
parameters: {
1515
layout: 'centered',
16-
badges: ['intro-1.2', 'current-1.3'],
16+
badges: ['api-1.3', 'theme-1.0'],
1717
},
1818
argTypes: {
1919
children: {

src/components/Breadcrumbs/Breadcrumbs.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default {
2121
},
2222
parameters: {
2323
layout: 'centered',
24-
badges: ['intro-1.0', 'current-1.3'],
24+
badges: ['api-1.3', 'theme-1.0'],
2525
},
2626
argTypes: {
2727
children: {

src/components/Button/Button.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default {
2121
},
2222
parameters: {
2323
layout: 'centered',
24-
badges: ['intro-1.0', 'current-2.0'],
24+
badges: ['api-2.0', 'theme-2.0'],
2525
},
2626
} as Meta<ButtonProps>;
2727

src/components/ButtonGroup/ButtonGroup.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default {
2424
},
2525
},
2626
parameters: {
27-
badges: ['intro-1.0', 'current-2.0'],
27+
badges: ['api-2.0', 'theme-2.0'],
2828
},
2929
decorators: [(Story) => <div className="p-8">{Story()}</div>],
3030
} as Meta<typeof ButtonGroup>;

src/components/Card/Card.stories.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default {
1414
component: Card,
1515
parameters: {
1616
layout: 'centered',
17-
badges: ['intro-1.0', 'current-2.0'],
17+
badges: ['api-2.0', 'theme-2.0'],
1818
},
1919
decorators: [(Story) => <div className="p-8">{Story()}</div>],
2020
args: {
@@ -378,7 +378,7 @@ export const WhileDragging: Story = {
378378
*/
379379
export const CancelMembership: Story = {
380380
parameters: {
381-
badges: ['intro-1.0', 'current-2.0', 'implementationExample'],
381+
badges: ['api-1.0', 'theme-2.0', 'implementationExample'],
382382
},
383383
args: {
384384
children: (

0 commit comments

Comments
 (0)