@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 +2 -1
- package/dist/components/Icon/types.d.cts +0 -1
- package/dist/components/Icon/types.d.ts +0 -1
- package/dist/components/Menu/types.d.cts +0 -1
- package/dist/components/Menu/types.d.ts +0 -1
- package/dist/components/TopBar/TopBarItem/types.d.cts +0 -1
- package/dist/components/TopBar/TopBarItem/types.d.ts +0 -1
- package/dist/components/Typography/types.d.cts +4 -2
- package/dist/components/Typography/types.d.ts +4 -2
- package/dist/util/types.d.cts +0 -1
- package/dist/util/types.d.ts +0 -1
- package/package.json +8 -6
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
|
|
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 { 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";
|
|
@@ -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?:
|
|
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?:
|
|
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 };
|
package/dist/util/types.d.cts
CHANGED
package/dist/util/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guardian/stand",
|
|
3
|
-
"version": "0.0.
|
|
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": "
|
|
568
|
-
"@guardian/prettier": "
|
|
567
|
+
"@guardian/eslint-config": "16.0.0",
|
|
568
|
+
"@guardian/prettier": "11.0.0",
|
|
569
569
|
"@guardian/prosemirror-invisibles": "3.1.1",
|
|
570
|
-
"@guardian/tsconfig": "
|
|
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
|
|
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
|
}
|