@common-origin/design-system 2.12.0 → 2.12.2

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.
Files changed (34) hide show
  1. package/LICENSE +21 -0
  2. package/dist/components/atoms/Box/Box.d.ts +26 -26
  3. package/dist/components/atoms/Chip/shared/ChipBase.d.ts +9 -3
  4. package/dist/components/layout/GridSystem/GridSystem.d.ts +19 -19
  5. package/dist/components/molecules/Checkbox/SelectableInputBase.d.ts +12 -4
  6. package/dist/components/molecules/Dropdown/Dropdown.d.ts +3 -1
  7. package/dist/components/molecules/TextField/InputBase.d.ts +6 -2
  8. package/dist/index.d.ts +1 -858
  9. package/dist/index.esm.js +228 -193
  10. package/dist/index.esm.js.map +1 -1
  11. package/dist/index.js +228 -193
  12. package/dist/index.js.map +1 -1
  13. package/dist/lib/styleUtils.d.ts +0 -3
  14. package/dist/styles/tokens.json +30 -2
  15. package/dist/tokens/index.esm.js +35 -4
  16. package/dist/tokens/index.esm.js.map +1 -1
  17. package/dist/tokens/index.js +35 -4
  18. package/dist/tokens/index.js.map +1 -1
  19. package/dist/tokens/tokens.d.ts +4 -860
  20. package/dist/tokens/types/tokens.d.ts +889 -0
  21. package/dist/types/icons.d.ts +1 -1
  22. package/dist/types/tokens.d.ts +889 -0
  23. package/package.json +33 -16
  24. package/dist/lib/errorReporting.d.ts +0 -24
  25. package/dist/page-components/ErrorBoundaries.d.ts +0 -16
  26. package/dist/page-components/ErrorBoundary.d.ts +0 -20
  27. package/dist/page-components/Footer/Footer.d.ts +0 -8
  28. package/dist/page-components/Footer/index.d.ts +0 -1
  29. package/dist/page-components/HeroBanner/HeroBanner.d.ts +0 -10
  30. package/dist/page-components/HeroBanner/index.d.ts +0 -1
  31. package/dist/page-components/Meta.d.ts +0 -2
  32. package/dist/page-components/Navigation.d.ts +0 -2
  33. package/dist/page-components/PageLayout.d.ts +0 -7
  34. package/dist/page-components/index.d.ts +0 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@common-origin/design-system",
3
- "version": "2.12.0",
3
+ "version": "2.12.2",
4
4
  "description": "Common Origin Design System - Framework-agnostic atomic design components with comprehensive WCAG 2.2 AA testing",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
@@ -8,18 +8,33 @@
8
8
  "types": "dist/index.d.ts",
9
9
  "files": [
10
10
  "dist/",
11
- "README.md"
11
+ "README.md",
12
+ "LICENSE"
12
13
  ],
14
+ "engines": {
15
+ "node": ">=20"
16
+ },
17
+ "publishConfig": {
18
+ "access": "public",
19
+ "registry": "https://registry.npmjs.org/"
20
+ },
13
21
  "exports": {
14
22
  ".": {
23
+ "types": "./dist/index.d.ts",
15
24
  "import": "./dist/index.esm.js",
16
- "require": "./dist/index.js",
17
- "types": "./dist/index.d.ts"
25
+ "require": "./dist/index.js"
18
26
  },
19
27
  "./tokens": {
28
+ "types": "./dist/tokens/tokens.d.ts",
20
29
  "import": "./dist/tokens/index.esm.js",
21
- "require": "./dist/tokens/index.js",
22
- "types": "./dist/tokens/tokens.d.ts"
30
+ "require": "./dist/tokens/index.js"
31
+ }
32
+ },
33
+ "typesVersions": {
34
+ "*": {
35
+ "tokens": [
36
+ "./dist/tokens/tokens.d.ts"
37
+ ]
23
38
  }
24
39
  },
25
40
  "scripts": {
@@ -36,7 +51,9 @@
36
51
  "docs:dev": "npm run build:tokens && npm run dev",
37
52
  "verify:types": "node scripts/verify-types.cjs",
38
53
  "verify:no-nextjs": "node scripts/verify-no-nextjs-deps.cjs",
39
- "prepublishOnly": "npm run build:tokens && npm run build:package && npm run verify:types && npm run verify:no-nextjs",
54
+ "verify:consumer": "node scripts/verify-consumer-types.cjs",
55
+ "verify:package": "npm run verify:types && npm run verify:no-nextjs && npm run verify:consumer && publint && attw --pack . --ignore-rules unexpected-module-syntax",
56
+ "prepublishOnly": "npm run build:tokens && npm run build:package && npm run verify:package",
40
57
  "release": "npm publish --provenance --access public",
41
58
  "release:create": "./scripts/release.sh"
42
59
  },
@@ -46,20 +63,16 @@
46
63
  "styled-components": "^6.0.0"
47
64
  },
48
65
  "dependencies": {
49
- "@hotjar/browser": "^1.0.9",
50
- "date-fns": "^4.1.0",
51
- "gray-matter": "^4.0.3",
52
- "next": "^16.0.10",
53
- "remark": "^15.0.1",
54
- "remark-html": "^16.0.1",
55
- "ts-morph": "^27.0.2",
56
- "typescript": "^5.7.3"
66
+ "@babel/runtime": "^7.0.0",
67
+ "date-fns": "^4.1.0"
57
68
  },
58
69
  "devDependencies": {
70
+ "@arethetypeswrong/cli": "^0.18.5",
59
71
  "@babel/core": "^7.28.4",
60
72
  "@babel/preset-env": "^7.27.2",
61
73
  "@babel/preset-react": "^7.27.1",
62
74
  "@babel/preset-typescript": "^7.27.1",
75
+ "@hotjar/browser": "^1.0.9",
63
76
  "@rollup/plugin-babel": "^6.1.0",
64
77
  "@rollup/plugin-commonjs": "^24.0.0",
65
78
  "@rollup/plugin-json": "^6.1.0",
@@ -81,13 +94,17 @@
81
94
  "jest": "^30.0.2",
82
95
  "jest-axe": "^9.0.0",
83
96
  "jest-environment-jsdom": "^30.0.2",
97
+ "next": "^16.3.6",
98
+ "publint": "^0.3.24",
84
99
  "react": "^19.2.0",
85
100
  "react-dom": "^19.2.0",
86
101
  "rollup": "^3.20.0",
87
102
  "rollup-plugin-copy": "^3.5.0",
88
103
  "rollup-plugin-peer-deps-external": "^2.2.4",
89
104
  "style-dictionary": "^3.8.0",
90
- "styled-components": "^6.1.1"
105
+ "styled-components": "^6.1.1",
106
+ "ts-morph": "^27.0.2",
107
+ "typescript": "^5.7.3"
91
108
  },
92
109
  "keywords": [
93
110
  "design-system",
@@ -1,24 +0,0 @@
1
- import { ErrorInfo } from 'react';
2
- declare class ErrorReportingService {
3
- private static instance;
4
- private queue;
5
- private isReporting;
6
- static getInstance(): ErrorReportingService;
7
- captureException(error: Error, options?: {
8
- errorInfo?: ErrorInfo;
9
- userId?: string;
10
- sessionId?: string;
11
- tags?: Record<string, string>;
12
- context?: Record<string, any>;
13
- }): void;
14
- private sendReports;
15
- private sendToService;
16
- private getSessionId;
17
- reportError(message: string, context?: Record<string, any>): void;
18
- reportPerformanceIssue(metric: string, value: number, context?: Record<string, any>): void;
19
- }
20
- export declare const errorReporting: ErrorReportingService;
21
- export declare const captureException: (error: Error, options?: Parameters<typeof errorReporting.captureException>[1]) => void;
22
- export declare const reportError: (message: string, context?: Record<string, any>) => void;
23
- export declare const reportPerformanceIssue: (metric: string, value: number, context?: Record<string, any>) => void;
24
- export {};
@@ -1,16 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- interface PageErrorBoundaryProps {
3
- children: ReactNode;
4
- pageName?: string;
5
- }
6
- export declare const PageErrorBoundary: React.FC<PageErrorBoundaryProps>;
7
- interface ComponentErrorBoundaryProps {
8
- children: ReactNode;
9
- componentName?: string;
10
- }
11
- export declare const ComponentErrorBoundary: React.FC<ComponentErrorBoundaryProps>;
12
- interface LayoutErrorBoundaryProps {
13
- children: ReactNode;
14
- }
15
- export declare const LayoutErrorBoundary: React.FC<LayoutErrorBoundaryProps>;
16
- export {};
@@ -1,20 +0,0 @@
1
- import React, { Component, ErrorInfo, ReactNode } from 'react';
2
- interface Props {
3
- children?: ReactNode;
4
- fallback?: ReactNode;
5
- onError?: (error: Error, errorInfo: ErrorInfo) => void;
6
- }
7
- interface State {
8
- hasError: boolean;
9
- error: Error | null;
10
- errorInfo: ErrorInfo | null;
11
- }
12
- declare class ErrorBoundary extends Component<Props, State> {
13
- constructor(props: Props);
14
- static getDerivedStateFromError(error: Error): State;
15
- componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
16
- handleRetry: () => void;
17
- handleReload: () => void;
18
- render(): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
19
- }
20
- export { ErrorBoundary };
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- export interface FooterProps {
3
- /** Logo source path - defaults to white logo */
4
- logoSrc?: string;
5
- /** Logo alt text - defaults to "Common Origin Logo" */
6
- logoAlt?: string;
7
- }
8
- export declare const Footer: React.FC<FooterProps>;
@@ -1 +0,0 @@
1
- export * from './Footer';
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- export interface HeroBannerProps {
3
- /** Title text - defaults to "Common Origin" */
4
- title?: string;
5
- /** Subtitle text - defaults to "A creative studio" */
6
- subtitle?: string;
7
- /** Video source path - defaults to homepage loop video */
8
- videoSrc?: string;
9
- }
10
- export declare const HeroBanner: React.FC<HeroBannerProps>;
@@ -1 +0,0 @@
1
- export * from './HeroBanner';
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const Meta: React.FC;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const Navigation: React.FC;
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- type Props = {
3
- preview?: boolean;
4
- children: React.ReactNode;
5
- };
6
- export declare const Layout: React.FC<Props>;
7
- export {};
@@ -1,8 +0,0 @@
1
- export { Meta } from './Meta';
2
- export { Navigation } from './Navigation';
3
- export { Layout } from './PageLayout';
4
- export { Footer } from './Footer';
5
- export { HeroBanner } from './HeroBanner';
6
- export { ErrorBoundary } from './ErrorBoundary';
7
- export { ComponentErrorBoundary, LayoutErrorBoundary, PageErrorBoundary } from './ErrorBoundaries';
8
- export * from '../components';