@guardian/stand 0.0.67 → 0.0.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -115,6 +115,7 @@ The following steps are for **developing the Stand library itself**.
115
115
  pnpm test:e2e # end-to-end tests (Playwright)
116
116
  pnpm test:react-matrix # compatibility matrix tests (see Compatibility)
117
117
  pnpm tsc # TypeScript type checking
118
+ pnpm tsc6 # TypeScript 6 type checking
118
119
  pnpm lint # lint (pnpm lint:fix to auto-fix)
119
120
  pnpm format:check # formatting check (pnpm format:fix to auto-fix)
120
121
  ```
@@ -146,7 +147,7 @@ Version sets for matrix testing live in `./scripts/deps-matrix-versions.json`. T
146
147
  1. Explicit env var (e.g. `REACT_VERSIONS="18.0.0 19.0.0"`)
147
148
  2. Value from `deps-matrix-versions.json`
148
149
 
149
- All three variables (`REACT_VERSIONS`, `EMOTION_VERSIONS`, `TS_VERSIONS`) must be defined after loading; otherwise the script exits with an error.
150
+ All four variables (`REACT_VERSIONS`, `EMOTION_VERSIONS`, `TS_VERSIONS`, `RAC_VERSIONS`) must be defined after loading; otherwise the script exits with an error.
150
151
 
151
152
  Matrix generation in CI uses the same JSON file in the workflow `../.github/workflows/stand-component-library-deps-matrix.yml` to ensure consistency.
152
153
 
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { MaterialSymbol } from "../../fonts/materialSymbolsTypes.cjs";
3
2
  import { DefaultPropsWithChildren } from "../../util/types.cjs";
4
3
  import { IconTheme } from "./Styles.cjs";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { MaterialSymbol } from "../../fonts/materialSymbolsTypes.js";
3
2
  import { DefaultPropsWithChildren } from "../../util/types.js";
4
3
  import { IconTheme } from "./Styles.js";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DefaultProps, DefaultPropsWithChildren } from "../../util/types.cjs";
3
2
  import { IconProps } from "../Icon/types.cjs";
4
3
  import { MenuItemTheme, MenuPopoverTheme, MenuSectionTheme, MenuSeparatorTheme, MenuTheme } from "./styles.cjs";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DefaultProps, DefaultPropsWithChildren } from "../../util/types.js";
3
2
  import { IconProps } from "../Icon/types.js";
4
3
  import { MenuItemTheme, MenuPopoverTheme, MenuSectionTheme, MenuSeparatorTheme, MenuTheme } from "./styles.js";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DefaultProps } from "../../../util/types.cjs";
3
2
  import { TopBarItemTheme } from "./styles.cjs";
4
3
  //#region src/components/TopBar/TopBarItem/types.d.ts
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DefaultProps } from "../../../util/types.js";
3
2
  import { TopBarItemTheme } from "./styles.js";
4
3
  //#region src/components/TopBar/TopBarItem/types.d.ts
@@ -2,17 +2,19 @@ import { DefaultProps } from "../../util/types.cjs";
2
2
  import { SemanticTypography } from "../../styleD/build/typescript/semantic/typography.cjs";
3
3
  import { TypographyTheme } from "./styles.cjs";
4
4
  import { TextProps } from "react-aria-components";
5
+ import { JSX } from "react";
5
6
  //#region src/components/Typography/types.d.ts
6
7
  type TypographyVariant = keyof SemanticTypography;
8
+ type TypographyElement = keyof JSX.IntrinsicElements | (string & {});
7
9
  interface TypographyProps extends DefaultProps<TypographyTheme, TextProps['className']>, Omit<TextProps, 'elementType' | 'className'> {
8
10
  /**
9
11
  * HTML element to render with font applied to
10
12
  */
11
- element?: 'div' | 'span' | 'p' | 'b' | 'i' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
13
+ element?: TypographyElement;
12
14
  /**
13
15
  * Font variant to apply as a CSS style to the element
14
16
  */
15
17
  variant?: TypographyVariant;
16
18
  }
17
19
  //#endregion
18
- export { TypographyProps, TypographyVariant };
20
+ export { TypographyElement, TypographyProps, TypographyVariant };
@@ -1,18 +1,20 @@
1
1
  import { DefaultProps } from "../../util/types.js";
2
2
  import { SemanticTypography } from "../../styleD/build/typescript/semantic/typography.js";
3
3
  import { TypographyTheme } from "./styles.js";
4
+ import { JSX } from "react";
4
5
  import { TextProps } from "react-aria-components";
5
6
  //#region src/components/Typography/types.d.ts
6
7
  type TypographyVariant = keyof SemanticTypography;
8
+ type TypographyElement = keyof JSX.IntrinsicElements | (string & {});
7
9
  interface TypographyProps extends DefaultProps<TypographyTheme, TextProps['className']>, Omit<TextProps, 'elementType' | 'className'> {
8
10
  /**
9
11
  * HTML element to render with font applied to
10
12
  */
11
- element?: 'div' | 'span' | 'p' | 'b' | 'i' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
13
+ element?: TypographyElement;
12
14
  /**
13
15
  * Font variant to apply as a CSS style to the element
14
16
  */
15
17
  variant?: TypographyVariant;
16
18
  }
17
19
  //#endregion
18
- export { TypographyProps, TypographyVariant };
20
+ export { TypographyElement, TypographyProps, TypographyVariant };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SerializedStyles } from "@emotion/react";
3
2
  //#region src/util/types.d.ts
4
3
  interface DefaultProps<ThemeType, ClassNameType = undefined> {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SerializedStyles } from "@emotion/react";
3
2
  //#region src/util/types.d.ts
4
3
  interface DefaultProps<ThemeType, ClassNameType = undefined> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guardian/stand",
3
- "version": "0.0.67",
3
+ "version": "0.0.69",
4
4
  "repository": {
5
5
  "url": "https://github.com/guardian/stand"
6
6
  },
@@ -564,10 +564,10 @@
564
564
  "@codesandbox/sandpack-react": "2.20.0",
565
565
  "@emotion/react": "11.11.4",
566
566
  "@figma/rest-api-spec": "0.41.0",
567
- "@guardian/eslint-config": "15.0.0",
568
- "@guardian/prettier": "10.0.0",
567
+ "@guardian/eslint-config": "16.0.0",
568
+ "@guardian/prettier": "11.0.0",
569
569
  "@guardian/prosemirror-invisibles": "3.1.1",
570
- "@guardian/tsconfig": "1.0.1",
570
+ "@guardian/tsconfig": "2.0.0",
571
571
  "@internationalized/date": "3.12.1",
572
572
  "@material-design-icons/svg": "0.14.15",
573
573
  "@playwright/experimental-ct-react17": "1.62.1",
@@ -582,6 +582,7 @@
582
582
  "@types/node": "24.10.1",
583
583
  "@types/react": "17.0.76",
584
584
  "@types/react-dom": "17.0.25",
585
+ "@typescript/typescript6": "6.0.2",
585
586
  "change-case": "5.4.4",
586
587
  "eslint": "9.39.3",
587
588
  "eslint-plugin-check-file": "3.3.2",
@@ -626,7 +627,7 @@
626
627
  "react": "^17.0.2 || ^18.0.0 || ^19.0.0",
627
628
  "react-aria-components": ">= 1.14.0 <= 1.20.0",
628
629
  "react-dom": "^17.0.2 || ^18.0.0 || ^19.0.0",
629
- "typescript": ">=5.0.0 <=5.9.3"
630
+ "typescript": ">=5.0.0 <7.0.0"
630
631
  },
631
632
  "peerDependenciesMeta": {
632
633
  "@emotion/react": {
@@ -686,6 +687,7 @@
686
687
  "test:e2e": "playwright test -c playwright-ct.config.ts",
687
688
  "test:react-matrix": "./scripts/test-deps-matrix.sh",
688
689
  "test:setup-e2e": "playwright install --with-deps",
689
- "tsc": "tsc"
690
+ "tsc": "tsc",
691
+ "tsc6": "tsc6"
690
692
  }
691
693
  }