Skip to content

Commit

Permalink
🦋 Release package updates (#1637)
Browse files Browse the repository at this point in the history
Co-authored-by: gu-changesets-release-pr[bot] <gu-changesets-release-pr[bot]@users.noreply.github.com>
Co-authored-by: Alex Sanders <[email protected]>
  • Loading branch information
3 people authored Aug 14, 2024
1 parent a1662f6 commit abd718f
Show file tree
Hide file tree
Showing 9 changed files with 119 additions and 119 deletions.
53 changes: 0 additions & 53 deletions .changeset/fluffy-peaches-punch.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/friendly-parrots-relax.md

This file was deleted.

45 changes: 0 additions & 45 deletions .changeset/purple-bags-sell.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/silver-games-remember.md

This file was deleted.

6 changes: 6 additions & 0 deletions libs/@guardian/source-development-kitchen/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @guardian/source-development-kitchen

## 7.0.0

### Major Changes

Updated peer dependency to `@guardian/[email protected]`

## 6.0.0

### Major Changes
Expand Down
6 changes: 3 additions & 3 deletions libs/@guardian/source-development-kitchen/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@guardian/source-development-kitchen",
"version": "6.0.0",
"version": "7.0.0",
"sideEffects": false,
"type": "module",
"exports": {
Expand Down Expand Up @@ -29,7 +29,7 @@
"@babel/core": "7.25.2",
"@emotion/react": "11.11.3",
"@guardian/libs": "18.0.0",
"@guardian/source": "6.1.0",
"@guardian/source": "7.0.0",
"@storybook/manager-api": "8.2.7",
"@storybook/react": "8.2.7",
"@types/jest": "29.5.8",
Expand All @@ -46,7 +46,7 @@
"peerDependencies": {
"@emotion/react": "^11.11.3",
"@guardian/libs": "^18.0.0",
"@guardian/source": "^6.0.0",
"@guardian/source": "^7.0.0",
"@types/react": "^18.2.11",
"react": "^18.2.0",
"tslib": "^2.6.2",
Expand Down
108 changes: 108 additions & 0 deletions libs/@guardian/source/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,113 @@
# @guardian/source

## 7.0.0

### Major Changes

- 238dfd3: Removes deprecated typography API.

In `@guardian/[email protected]` (2024-04-07), we added new [web typography presets](https://guardian.github.io/storybooks/?path=/story/source_foundations-typography--presets) to standardise on the typographic language used by Design, and deprecated the old typography API.

This release removes that old API, in order to simplify the ongoing maintenance of the library.

The following exports have been removed:

- `titlepiece`
- `headline`
- `body`
- `textSans`
- `titlepieceSizes`
- `headlineSizes`
- `bodySizes`
- `textSansSizes`
- `remTitlepieceSizes`
- `remHeadlineSizes`
- `remBodySizes`
- `remTextSansSizes`
- `fonts`
- `fontWeights`
- `lineHeights`
- `bodyObjectStyles`
- `headlineObjectStyles`
- `textSansObjectStyles`
- `titlepieceObjectStyles`

along with the following `type` exports:

- `ScaleUnit`
- `Category`
- `LineHeight`
- `FontWeight`
- `FontStyle`
- `FontWeightDefinition`
- `Option`
- `TypographySizes`
- `TypographyStyles`
- `TitlepieceSizes`
- `HeadlineSizes`
- `BodySizes`
- `TextSansSizes`
- `Fs`
- `FontScaleFunction`
- `FontScaleFunctionStr`
- `FontScaleArgs`

_If you cannot map existing uses of the old API to the new presets, please check which preset you should use with a designer._

- 447e6b6: Applies consistent spacing around checkboxes and radio buttons by removing conditional styles and using padding to ensure minimum height of 44px.

The external padding is now consistent regardless of the presence of a label and / or supporting text, and removes any inconsistency when these elements are stacked vertically.

Checkboxes and radio buttons are also now aligned with the first line of text when labels wrap on to multiple lines.

- 7805d16: Brings `remSize`, `remIconSize`, `remHeight` and `remWidth` into line with `remSpace`, by changing their values from a `number` (of rems) to a `string` that ends with `rem` units.

`pxToRem` also now returns a string with `rem` units, rather than a `number` of rems.

_The sizes haven't changed, only the way they are exported._

### Before

```js
const style = `
top: ${pxToRem(10)}rem;
bottom: ${remHeight.ctaSmall}rem;
`;
```

### After

```js
const style = `
top: ${pxToRem(10)};
bottom: ${remHeight.ctaSmall};
`;
```

If you have been performing calculations with the old number values in JS, you can use the [CSS `calc` function](https://developer.mozilla.org/en-US/docs/Web/CSS/calc) instead:

### Before

```js
const style = `
bottom: -${remHeight.ctaSmall / 2}rem;
`;
```

### After

```js
const style = `
bottom: calc(-${remHeight.ctaSmall} / 2);
`;
```

### Patch Changes

- 69ecc3f: Moves design tokens into `@guardian/source` itself.

Allows us to calculate `@guardian/source/foundations` values during build, rather than at the point of consumption, which relieves user's devices of this overhead and means the design tokens JSON will no longer be included in consumer's bundles.

## 6.1.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion libs/@guardian/source/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@guardian/source",
"version": "6.1.0",
"version": "7.0.0",
"license": "Apache-2.0",
"sideEffects": false,
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit abd718f

Please sign in to comment.