|
1 | 1 | # @primer/components |
2 | 2 |
|
| 3 | +## 28.3.0 |
| 4 | + |
| 5 | +### Minor Changes |
| 6 | + |
| 7 | +- [#1315](https://github.com/primer/components/pull/1315) [`85d0202b`](https://github.com/primer/components/commit/85d0202b0edd553bcbb50f9b280caf13ce79dae3) Thanks [@VanAnderson](https://github.com/VanAnderson)! - `Box` now accepts all [styled system props](https://styled-system.com/table/). |
| 8 | + |
| 9 | +* [#1316](https://github.com/primer/components/pull/1316) [`4c063317`](https://github.com/primer/components/commit/4c0633171170205c53ef7dc29e5d4104a8486059) Thanks [@VanAnderson](https://github.com/VanAnderson)! - The following components have been deprecated in favor of the `Box` component: |
| 10 | + |
| 11 | + | Component | Replacement | |
| 12 | + | ----------- | ------------------------------------------------------------------------------------------- | |
| 13 | + | `Flex` | `<Box display="flex">` | |
| 14 | + | `Grid` | `<Box display="grid">` | |
| 15 | + | `Position` | `<Box>` | |
| 16 | + | `Absolute` | `<Box position="absolute">` | |
| 17 | + | `Fixed` | `<Box position="fixed">` | |
| 18 | + | `Relative` | `<Box position="relative">` | |
| 19 | + | `Sticky` | `<Box position="sticky">` | |
| 20 | + | `BorderBox` | `<Box borderWidth="1px" borderStyle="solid" borderColor="border.primary" borderRadius={2}>` | |
| 21 | + |
| 22 | + There is a codemod available to upgrade these components: |
| 23 | + |
| 24 | + - TypeScript example: |
| 25 | + |
| 26 | + ```shell |
| 27 | + npx jscodeshift -t node_modules/@primer/components/codemods/deprecateUtilityComponents.js |
| 28 | + --parser=tsx path/to/workspace/src/*.tsx |
| 29 | + ``` |
| 30 | + |
| 31 | + - Babel example: |
| 32 | + |
| 33 | + ```shell |
| 34 | + npx jscodeshift -t node_modules/@primer/components/codemods/deprecateUtilityComponents.js |
| 35 | + --parser=babel path/to/workspace/src/*.tsx |
| 36 | + ``` |
| 37 | + |
| 38 | +- [#1336](https://github.com/primer/components/pull/1336) [`489a718b`](https://github.com/primer/components/commit/489a718b6b6d2892906bc2709e243195bf5fd91e) Thanks [@VanAnderson](https://github.com/VanAnderson)! - System props are deprecated in all components except `Box`. Move all system props into the [`sx` prop](https://primer.style/components/overriding-styles) instead. Example: |
| 39 | + |
| 40 | + ```diff |
| 41 | + - <Button mr={2}>...</Button> |
| 42 | + + <Button sx={{mr: 2}}>...</Button> |
| 43 | + ``` |
| 44 | + |
| 45 | + There is a codemod available to migrate from system props to the `sx` prop: |
| 46 | + |
| 47 | + - TypeScript example: |
| 48 | + |
| 49 | + ```shell |
| 50 | + npx jscodeshift -t node_modules/@primer/components/codemods/removeSystemProps.js |
| 51 | + --parser=tsx path/to/workspace/src/*.tsx |
| 52 | + ``` |
| 53 | + |
| 54 | + - Babel example: |
| 55 | + |
| 56 | + ```shell |
| 57 | + npx jscodeshift -t node_modules/@primer/components/codemods/removeSystemProps.js |
| 58 | + --parser=babel path/to/workspace/src/*.tsx |
| 59 | + ``` |
| 60 | + |
| 61 | +### Patch Changes |
| 62 | + |
| 63 | +- [#1332](https://github.com/primer/components/pull/1332) [`ec11d7b8`](https://github.com/primer/components/commit/ec11d7b8a589742a41134d31f419b6b5d34ad026) Thanks [@mattcosta7](https://github.com/mattcosta7)! - Side effects are properly declared in package.json |
| 64 | + |
| 65 | +* [#1308](https://github.com/primer/components/pull/1308) [`a8f3ca6d`](https://github.com/primer/components/commit/a8f3ca6dbff5c2619e067ad5118fcb784f8525bc) Thanks [@dgreif](https://github.com/dgreif)! - Focus zones will now update active-descendant on `mousemove` over focusable elements. ActionList has been updated to handle direct (key press) vs indirect (`mousemove`, DOM change, etc.) changes to active-descendant, and will use a distinct background color for the directly activated items. |
| 66 | + |
3 | 67 | ## 28.2.5 |
4 | 68 |
|
5 | 69 | ### Patch Changes |
|
0 commit comments