From abd718fd042cb46dfc2431fa710e682e571a1861 Mon Sep 17 00:00:00 2001 From: "gu-changesets-release-pr[bot]" <150677948+gu-changesets-release-pr[bot]@users.noreply.github.com> Date: Wed, 14 Aug 2024 12:31:30 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=8B=20Release=20package=20updates=20(#?= =?UTF-8?q?1637)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: gu-changesets-release-pr[bot] Co-authored-by: Alex Sanders --- .changeset/fluffy-peaches-punch.md | 53 --------- .changeset/friendly-parrots-relax.md | 9 -- .changeset/purple-bags-sell.md | 45 -------- .changeset/silver-games-remember.md | 7 -- .../source-development-kitchen/CHANGELOG.md | 6 + .../source-development-kitchen/package.json | 6 +- libs/@guardian/source/CHANGELOG.md | 108 ++++++++++++++++++ libs/@guardian/source/package.json | 2 +- pnpm-lock.yaml | 2 +- 9 files changed, 119 insertions(+), 119 deletions(-) delete mode 100644 .changeset/fluffy-peaches-punch.md delete mode 100644 .changeset/friendly-parrots-relax.md delete mode 100644 .changeset/purple-bags-sell.md delete mode 100644 .changeset/silver-games-remember.md diff --git a/.changeset/fluffy-peaches-punch.md b/.changeset/fluffy-peaches-punch.md deleted file mode 100644 index fd794cee6..000000000 --- a/.changeset/fluffy-peaches-punch.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -'@guardian/source': major ---- - -Removes deprecated typography API. - -In `@guardian/source-foundations@14.2.0` (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._ diff --git a/.changeset/friendly-parrots-relax.md b/.changeset/friendly-parrots-relax.md deleted file mode 100644 index 5a83f9e30..000000000 --- a/.changeset/friendly-parrots-relax.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@guardian/source': major ---- - -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. diff --git a/.changeset/purple-bags-sell.md b/.changeset/purple-bags-sell.md deleted file mode 100644 index d5c51e7bd..000000000 --- a/.changeset/purple-bags-sell.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -'@guardian/source': major ---- - -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); -`; -``` diff --git a/.changeset/silver-games-remember.md b/.changeset/silver-games-remember.md deleted file mode 100644 index afbe4569c..000000000 --- a/.changeset/silver-games-remember.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@guardian/source': patch ---- - -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. diff --git a/libs/@guardian/source-development-kitchen/CHANGELOG.md b/libs/@guardian/source-development-kitchen/CHANGELOG.md index 8e811aaf5..8e15bbf05 100644 --- a/libs/@guardian/source-development-kitchen/CHANGELOG.md +++ b/libs/@guardian/source-development-kitchen/CHANGELOG.md @@ -1,5 +1,11 @@ # @guardian/source-development-kitchen +## 7.0.0 + +### Major Changes + +Updated peer dependency to `@guardian/source@7.0.0` + ## 6.0.0 ### Major Changes diff --git a/libs/@guardian/source-development-kitchen/package.json b/libs/@guardian/source-development-kitchen/package.json index 328c917bf..d465b9c3b 100644 --- a/libs/@guardian/source-development-kitchen/package.json +++ b/libs/@guardian/source-development-kitchen/package.json @@ -1,6 +1,6 @@ { "name": "@guardian/source-development-kitchen", - "version": "6.0.0", + "version": "7.0.0", "sideEffects": false, "type": "module", "exports": { @@ -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", @@ -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", diff --git a/libs/@guardian/source/CHANGELOG.md b/libs/@guardian/source/CHANGELOG.md index ae4b18db1..45b534e38 100644 --- a/libs/@guardian/source/CHANGELOG.md +++ b/libs/@guardian/source/CHANGELOG.md @@ -1,5 +1,113 @@ # @guardian/source +## 7.0.0 + +### Major Changes + +- 238dfd3: Removes deprecated typography API. + + In `@guardian/source-foundations@14.2.0` (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 diff --git a/libs/@guardian/source/package.json b/libs/@guardian/source/package.json index 908a9126b..eda551c2f 100644 --- a/libs/@guardian/source/package.json +++ b/libs/@guardian/source/package.json @@ -1,6 +1,6 @@ { "name": "@guardian/source", - "version": "6.1.0", + "version": "7.0.0", "license": "Apache-2.0", "sideEffects": false, "type": "module", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index be87543a8..32d11e32c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -672,7 +672,7 @@ importers: specifier: 18.0.0 version: link:../libs '@guardian/source': - specifier: 6.1.0 + specifier: 7.0.0 version: link:../source '@storybook/manager-api': specifier: 8.2.7