Skip to content

Commit cbe3b68

Browse files
authored
Merge pull request #2032 from chanzuckerberg/release-v15.2.1
### [15.2.1](v15.2.0...v15.2.1) (2024-08-09) [Storybook](https://61313967cde49b003ae2a860-wzpwvsymfs.chromatic.com/) ### Bug Fixes * **Button:** update button padding to match design ([#2027](#2027)) ([15644d3](15644d3)) * **Checkbox:** specify a font size for the checked glyph ([#2030](#2030)) ([6777316](6777316)) * **Menu:** remove style overrides to Menu.Button ([#2029](#2029)) ([2ad7b4c](2ad7b4c))
2 parents 186a2ce + 20e0df0 commit cbe3b68

File tree

8 files changed

+903
-579
lines changed

8 files changed

+903
-579
lines changed

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
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.2.1](https://github.com/chanzuckerberg/edu-design-system/compare/v15.2.0...v15.2.1) (2024-08-09)
6+
7+
8+
### Bug Fixes
9+
10+
* **Button:** update button padding to match design ([#2027](https://github.com/chanzuckerberg/edu-design-system/issues/2027)) ([15644d3](https://github.com/chanzuckerberg/edu-design-system/commit/15644d38935d32a8660fb5ed47c404d68c8f36ff))
11+
* **Checkbox:** specify a font size for the checked glyph ([#2030](https://github.com/chanzuckerberg/edu-design-system/issues/2030)) ([6777316](https://github.com/chanzuckerberg/edu-design-system/commit/6777316b10ae772fe70e4821536c6e9d8d61b30a))
12+
* **Menu:** remove style overrides to Menu.Button ([#2029](https://github.com/chanzuckerberg/edu-design-system/issues/2029)) ([2ad7b4c](https://github.com/chanzuckerberg/edu-design-system/commit/2ad7b4c3380da2e3572646c75df455d53a13e504))
13+
514
## [15.2.0](https://github.com/chanzuckerberg/edu-design-system/compare/v15.1.0...v15.2.0) (2024-07-25)
615

716

package.json

+25-25
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@chanzuckerberg/eds",
3-
"version": "15.2.0",
3+
"version": "15.2.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",
@@ -112,10 +112,10 @@
112112
"yargs": "^17.7.2"
113113
},
114114
"devDependencies": {
115-
"@babel/preset-env": "^7.24.8",
115+
"@babel/preset-env": "^7.25.3",
116116
"@babel/preset-react": "^7.24.7",
117117
"@babel/preset-typescript": "^7.24.7",
118-
"@chanzuckerberg/axe-storybook-testing": "^8.0.2",
118+
"@chanzuckerberg/axe-storybook-testing": "^8.2.0",
119119
"@chanzuckerberg/eslint-config-edu-js": "^1.1.0",
120120
"@chanzuckerberg/eslint-config-edu-ts": "^1.0.9",
121121
"@chanzuckerberg/eslint-plugin-edu-react": "^1.1.9",
@@ -125,37 +125,37 @@
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.9.0",
128+
"@omlet/cli": "^1.10.1",
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.4",
133-
"@storybook/addon-essentials": "^8.2.4",
134-
"@storybook/addon-interactions": "^8.2.4",
135-
"@storybook/addon-links": "^8.2.4",
136-
"@storybook/addon-mdx-gfm": "^8.2.4",
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",
137137
"@storybook/addon-styling": "^1.3.7",
138138
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
139-
"@storybook/manager-api": "^8.2.4",
140-
"@storybook/react": "^8.2.4",
141-
"@storybook/react-webpack5": "^8.2.4",
142-
"@storybook/test": "^8.2.4",
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",
143143
"@storybook/testing-library": "^0.2.2",
144-
"@storybook/theming": "^8.2.4",
145-
"@testing-library/jest-dom": "^6.4.6",
144+
"@storybook/theming": "^8.2.7",
145+
"@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.11",
151+
"@types/node": "^20.14.14",
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",
156156
"@types/yargs": "^17.0.32",
157-
"axe-core": "4.9.1",
158-
"chromatic": "^11.5.5",
157+
"axe-core": "4.10.0",
158+
"chromatic": "^11.7.0",
159159
"codecov": "^3.8.3",
160160
"copyfiles": "^2.4.1",
161161
"eslint": "^8.57.0",
@@ -171,27 +171,27 @@
171171
"jest-preset-stylelint": "^6.3.2",
172172
"lint-staged": "^13.3.0",
173173
"plop": "^4.0.1",
174-
"postcss": "^8.4.39",
174+
"postcss": "^8.4.40",
175175
"postcss-cli": "^10.1.0",
176176
"postcss-import": "^15.1.0",
177177
"postcss-mixins": "^9.0.4",
178-
"postcss-nested": "^6.0.1",
178+
"postcss-nested": "^6.2.0",
179179
"postcss-simple-vars": "^7.0.1",
180180
"prettier": "^3.1.0",
181181
"prettier-plugin-tailwindcss": "^0.5.7",
182182
"react": "^18.2.0",
183183
"react-dom": "^18.2.0",
184-
"rollup": "^4.18.1",
184+
"rollup": "^4.19.2",
185185
"rollup-plugin-postcss": "^4.0.2",
186186
"size-limit": "^8.2.6",
187187
"standard-version": "^9.5.0",
188-
"storybook": "^8.2.4",
188+
"storybook": "^8.2.7",
189189
"style-dictionary": "^3.9.2",
190190
"stylelint": "^15.11.0",
191191
"stylelint-config-recommended": "^13.0.0",
192-
"tailwindcss": "^3.4.6",
193-
"ts-jest": "^29.2.3",
194-
"typescript": "^5.5.2"
192+
"tailwindcss": "^3.4.7",
193+
"ts-jest": "^29.2.4",
194+
"typescript": "^5.5.4"
195195
},
196196
"lint-staged": {
197197
"*.{js,jsx,ts,tsx}": [

src/components/Button/Button.module.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
.button--lg {
6767
align-items: center;
6868

69-
padding: calc(var(--eds-size-1) / 16 * 1rem) 1.25rem;
69+
padding: calc(var(--eds-size-1) / 16 * 1rem) calc(var(--eds-size-2-and-half) / 16 * 1rem);
7070
font: var(--eds-theme-typography-button-lg);
7171

7272
min-width:calc(var(--eds-size-9) / 16 * 1rem);
@@ -86,11 +86,11 @@
8686
}
8787

8888
.button--sm {
89-
padding: calc(var(--eds-size-half) / 16 * 1rem) 1.33333333rem;
89+
padding: calc(var(--eds-size-half) / 16 * 1rem) calc(var(--eds-size-1-and-half) / 16 * 1rem);
9090
font: var(--eds-theme-typography-button-sm);
9191

9292
min-width: calc(var(--eds-size-6) / 16 * 1rem);
93-
max-width: calc(var(--eds-size-24) / 16 * 1rem);;
93+
max-width: calc(var(--eds-size-24) / 16 * 1rem);
9494
max-height: calc(var(--eds-size-3) / 16 * 1rem);
9595
}
9696

src/components/Checkbox/Checkbox.module.css

+4-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
place-content: center;
2626

2727
border-radius: calc(var(--eds-theme-border-radius-objects-sm) * 1px);
28-
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
29-
28+
font: var(--eds-theme-typography-body-md);
3029
}
3130

3231
.checkbox__input:checked::before {
@@ -38,6 +37,9 @@
3837
one. In other words, the height/width here need to match the expected viewbox for the path. */
3938
height: calc(var(--eds-size-3) / 16 * 1rem);
4039
width: calc(var(--eds-size-3) / 16 * 1rem);
40+
41+
/* use the platform's font face, which defines the checkbox glyph to use */
42+
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
4143
}
4244

4345
.checkbox__input:checked {

src/components/Checkbox/Checkbox.stories.tsx

+20
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,40 @@ export const WithSublabel: Story = {
2727
args: { subLabel: 'Additional descriptive text' },
2828
};
2929

30+
/**
31+
* Checkboxes can have an error state
32+
*/
3033
export const Error: Story = {
3134
args: {
3235
isError: true,
3336
label: 'In error state',
3437
},
3538
};
3639

40+
/**
41+
* Checkboxes can, of course, can be checked
42+
*/
3743
export const Checked: Story = {
3844
...Default,
3945
args: {
4046
defaultChecked: true,
4147
},
4248
};
4349

50+
/**
51+
* The checkbox glyph is not affected by any wrapping of font resizing
52+
*/
53+
export const GlyphIsConsistent: Story = {
54+
...Default,
55+
args: {
56+
defaultChecked: true,
57+
},
58+
decorators: [(Story) => <div style={{ fontSize: '10px' }}>{Story()}</div>],
59+
};
60+
61+
/**
62+
* Checkboxes can be in an indeterminate state, marking a partially checked state
63+
*/
4464
export const Indeterminate: Story = {
4565
args: {
4666
indeterminate: true,

src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap

+44-13
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ exports[`<Checkbox /> Disabled story renders snapshot 1`] = `
6666
<input
6767
class="checkbox__input"
6868
disabled=""
69-
id=":r5:"
69+
id=":r6:"
7070
type="checkbox"
7171
/>
7272
<div
@@ -75,7 +75,7 @@ exports[`<Checkbox /> Disabled story renders snapshot 1`] = `
7575
<label
7676
aria-disabled="true"
7777
class="label label--lg label--disabled"
78-
for=":r5:"
78+
for=":r6:"
7979
>
8080
Disabled
8181
</label>
@@ -88,7 +88,7 @@ exports[`<Checkbox /> Disabled story renders snapshot 1`] = `
8888
checked=""
8989
class="checkbox__input"
9090
disabled=""
91-
id=":r6:"
91+
id=":r7:"
9292
type="checkbox"
9393
/>
9494
<div
@@ -97,7 +97,7 @@ exports[`<Checkbox /> Disabled story renders snapshot 1`] = `
9797
<label
9898
aria-disabled="true"
9999
class="label label--lg label--disabled"
100-
for=":r6:"
100+
for=":r7:"
101101
>
102102
Disabled
103103
</label>
@@ -109,7 +109,7 @@ exports[`<Checkbox /> Disabled story renders snapshot 1`] = `
109109
<input
110110
class="checkbox__input"
111111
disabled=""
112-
id=":r7:"
112+
id=":r8:"
113113
type="checkbox"
114114
/>
115115
<div
@@ -118,7 +118,7 @@ exports[`<Checkbox /> Disabled story renders snapshot 1`] = `
118118
<label
119119
aria-disabled="true"
120120
class="label label--lg label--disabled"
121-
for=":r7:"
121+
for=":r8:"
122122
>
123123
Disabled
124124
</label>
@@ -135,7 +135,7 @@ exports[`<Checkbox /> Disabled story renders snapshot 2`] = `
135135
<input
136136
class="checkbox__input"
137137
disabled=""
138-
id=":ra:"
138+
id=":rb:"
139139
type="checkbox"
140140
/>
141141
<div
@@ -144,7 +144,7 @@ exports[`<Checkbox /> Disabled story renders snapshot 2`] = `
144144
<label
145145
aria-disabled="true"
146146
class="label label--lg label--disabled"
147-
for=":ra:"
147+
for=":rb:"
148148
>
149149
Disabled
150150
</label>
@@ -178,6 +178,37 @@ exports[`<Checkbox /> Error story renders snapshot 1`] = `
178178
</div>
179179
`;
180180

181+
exports[`<Checkbox /> GlyphIsConsistent story renders snapshot 1`] = `
182+
<div
183+
class="p-8"
184+
>
185+
<div
186+
style="font-size: 10px;"
187+
>
188+
<div
189+
class="checkbox"
190+
>
191+
<input
192+
checked=""
193+
class="checkbox__input"
194+
id=":r4:"
195+
type="checkbox"
196+
/>
197+
<div
198+
class="checkbox__labels"
199+
>
200+
<label
201+
class="label label--lg"
202+
for=":r4:"
203+
>
204+
Checkbox
205+
</label>
206+
</div>
207+
</div>
208+
</div>
209+
</div>
210+
`;
211+
181212
exports[`<Checkbox /> Indeterminate story renders snapshot 1`] = `
182213
<div
183214
class="p-8"
@@ -187,15 +218,15 @@ exports[`<Checkbox /> Indeterminate story renders snapshot 1`] = `
187218
>
188219
<input
189220
class="checkbox__input"
190-
id=":r4:"
221+
id=":r5:"
191222
type="checkbox"
192223
/>
193224
<div
194225
class="checkbox__labels"
195226
>
196227
<label
197228
class="label label--lg"
198-
for=":r4:"
229+
for=":r5:"
199230
>
200231
Checkbox
201232
</label>
@@ -213,15 +244,15 @@ exports[`<Checkbox /> LongLabels story renders snapshot 1`] = `
213244
>
214245
<input
215246
class="checkbox__input"
216-
id=":r9:"
247+
id=":ra:"
217248
type="checkbox"
218249
/>
219250
<div
220251
class="checkbox__labels"
221252
>
222253
<label
223254
class="label label--lg"
224-
for=":r9:"
255+
for=":ra:"
225256
>
226257
Lorem ipsum dolor sit amet, consectetur adipiscing elit
227258
</label>
@@ -271,7 +302,7 @@ exports[`<Checkbox /> WithoutVisibleLabel story renders snapshot 1`] = `
271302
<input
272303
aria-label="a checkbox has no name"
273304
class="checkbox__input"
274-
id=":r8:"
305+
id=":r9:"
275306
type="checkbox"
276307
/>
277308
<div

src/components/Menu/Menu.module.css

-13
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,6 @@
1111
position: relative;
1212
}
1313

14-
.menu__button {
15-
font: var(--eds-theme-typography-body-md);
16-
17-
color: var(--eds-theme-color-text-neutral-subtle);
18-
background-color: var(--eds-theme-color-form-background);
19-
border-color: var(--eds-theme-color-form-border);
20-
font-weight: var(--eds-font-weight-light);
21-
}
22-
23-
.menu__button--with-chevron {
24-
color: var(--eds-theme-color-icon-neutral-default);
25-
}
26-
2714
.menu__item {
2815
display: block;
2916
text-decoration: none;

0 commit comments

Comments
 (0)