@common-origin/design-system 1.1.0
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 +143 -0
- package/dist/components/atoms/Avatar/Avatar.d.ts +8 -0
- package/dist/components/atoms/Avatar/index.d.ts +1 -0
- package/dist/components/atoms/Box/Box.d.ts +52 -0
- package/dist/components/atoms/Box/index.d.ts +1 -0
- package/dist/components/atoms/Button/Button.d.ts +22 -0
- package/dist/components/atoms/Button/index.d.ts +1 -0
- package/dist/components/atoms/Chip/Chip.d.ts +19 -0
- package/dist/components/atoms/Chip/index.d.ts +1 -0
- package/dist/components/atoms/Container/Container.d.ts +6 -0
- package/dist/components/atoms/Container/index.d.ts +1 -0
- package/dist/components/atoms/CoverImage/CoverImage.d.ts +11 -0
- package/dist/components/atoms/CoverImage/index.d.ts +1 -0
- package/dist/components/atoms/Icon/Icon.d.ts +10 -0
- package/dist/components/atoms/Icon/index.d.ts +1 -0
- package/dist/components/atoms/IconButton/IconButton.d.ts +15 -0
- package/dist/components/atoms/IconButton/index.d.ts +1 -0
- package/dist/components/atoms/SectionSeparator/SectionSeparator.d.ts +26 -0
- package/dist/components/atoms/SectionSeparator/index.d.ts +1 -0
- package/dist/components/atoms/Stack/Stack.d.ts +16 -0
- package/dist/components/atoms/Stack/index.d.ts +1 -0
- package/dist/components/atoms/Typography/Typography.d.ts +34 -0
- package/dist/components/atoms/Typography/index.d.ts +1 -0
- package/dist/components/atoms/index.d.ts +11 -0
- package/dist/components/dateFormatter.d.ts +7 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/layout/GridSystem/GridSystem.d.ts +52 -0
- package/dist/components/layout/GridSystem/index.d.ts +1 -0
- package/dist/components/layout/index.d.ts +1 -0
- package/dist/components/molecules/ArtCard/ArtCard.d.ts +10 -0
- package/dist/components/molecules/ArtCard/index.d.ts +1 -0
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.d.ts +11 -0
- package/dist/components/molecules/Breadcrumbs/index.d.ts +1 -0
- package/dist/components/molecules/ChipGroup/ChipGroup.d.ts +7 -0
- package/dist/components/molecules/ChipGroup/index.d.ts +1 -0
- package/dist/components/molecules/CodeBlock/CodeBlock.d.ts +17 -0
- package/dist/components/molecules/CodeBlock/index.d.ts +1 -0
- package/dist/components/molecules/DesignCard/DesignCard.d.ts +11 -0
- package/dist/components/molecules/DesignCard/index.d.ts +1 -0
- package/dist/components/molecules/Dropdown/Dropdown.d.ts +21 -0
- package/dist/components/molecules/Dropdown/index.d.ts +1 -0
- package/dist/components/molecules/PageTitle/PageTitle.d.ts +8 -0
- package/dist/components/molecules/PageTitle/index.d.ts +1 -0
- package/dist/components/molecules/ReleaseCard/ReleaseCard.d.ts +9 -0
- package/dist/components/molecules/ReleaseCard/index.d.ts +1 -0
- package/dist/components/molecules/index.d.ts +8 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +2027 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +2045 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/styleUtils.d.ts +19 -0
- package/package.json +101 -0
package/README.md
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# Common Origin Design System
|
|
2
|
+
|
|
3
|
+
A production-ready design system built with atomic design principles, design tokens, and WCAG 2.2 AA accessibility compliance. This package provides reusable React components and design tokens for building consistent user interfaces.
|
|
4
|
+
|
|
5
|
+
## 🚀 Getting Started
|
|
6
|
+
|
|
7
|
+
### Development
|
|
8
|
+
```bash
|
|
9
|
+
# Install dependencies
|
|
10
|
+
npm install
|
|
11
|
+
|
|
12
|
+
# Build design tokens
|
|
13
|
+
npm run build:tokens
|
|
14
|
+
|
|
15
|
+
# Start development server
|
|
16
|
+
npm run dev
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Visit `http://localhost:3000` to view the interactive component documentation.
|
|
20
|
+
|
|
21
|
+
## 📁 Project Structure
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
src/
|
|
25
|
+
├── components/ # Complete atomic design system
|
|
26
|
+
│ ├── atoms/ # 12 foundational components (Button, Typography, etc.)
|
|
27
|
+
│ ├── molecules/ # 8 composed components (Dropdown, CodeBlock, etc.)
|
|
28
|
+
│ ├── organisms/ # 3 complex components (Navigation, Footer, etc.)
|
|
29
|
+
│ └── layout/ # 1 layout system (GridSystem)
|
|
30
|
+
├── tokens/ # Design token source definitions
|
|
31
|
+
├── styles/ # Generated tokens, CSS, and icon definitions
|
|
32
|
+
└── index.ts # Main package exports
|
|
33
|
+
|
|
34
|
+
pages/ # Interactive documentation
|
|
35
|
+
├── design/
|
|
36
|
+
│ ├── components.tsx # Live component gallery
|
|
37
|
+
│ └── tokens.tsx # Design token reference
|
|
38
|
+
└── index.tsx # Landing page
|
|
39
|
+
|
|
40
|
+
lib/ # Documentation tooling
|
|
41
|
+
└── docgen/ # Automated component documentation system
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## 🎨 Features
|
|
45
|
+
|
|
46
|
+
- **Production Ready**: Complete design system with 24+ components
|
|
47
|
+
- **Atomic Design**: Components organized by complexity (atoms → molecules → organisms)
|
|
48
|
+
- **Design Tokens**: Comprehensive token system built with Style Dictionary
|
|
49
|
+
- **Accessibility**: WCAG 2.2 AA compliance with automated jest-axe testing
|
|
50
|
+
- **TypeScript**: Full type safety and IntelliSense support
|
|
51
|
+
- **Interactive Docs**: Live component gallery with code examples
|
|
52
|
+
- **Comprehensive Testing**: 500+ tests with React Testing Library
|
|
53
|
+
- **Token-Driven**: All styling uses semantic design tokens (no hardcoded values)
|
|
54
|
+
|
|
55
|
+
## 📖 Documentation
|
|
56
|
+
|
|
57
|
+
- **Components**: `/design/components` - Interactive component gallery with live examples
|
|
58
|
+
- **Tokens**: `/design/tokens` - Complete design token reference
|
|
59
|
+
- **Home**: `/` - Design system overview and navigation
|
|
60
|
+
|
|
61
|
+
## 🔧 Development Commands
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm run dev # Start development server
|
|
65
|
+
npm run build # Build Next.js app
|
|
66
|
+
npm run build:package # Build npm package
|
|
67
|
+
npm run build:tokens # Generate design tokens
|
|
68
|
+
npm run test # Run tests
|
|
69
|
+
npm run test:watch # Run tests in watch mode
|
|
70
|
+
npm run test:coverage # Run tests with coverage
|
|
71
|
+
npm run typecheck # Type checking
|
|
72
|
+
npm run docs:generate # Generate component docs
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## 📦 Package Usage
|
|
76
|
+
|
|
77
|
+
Install the design system in your project:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npm install @common-origin/design-system
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Import and use components:
|
|
84
|
+
|
|
85
|
+
```tsx
|
|
86
|
+
import { Button, Typography, Stack, Alert } from '@common-origin/design-system'
|
|
87
|
+
import tokens from '@common-origin/design-system/tokens'
|
|
88
|
+
|
|
89
|
+
function MyApp() {
|
|
90
|
+
return (
|
|
91
|
+
<Stack direction="column" gap="md">
|
|
92
|
+
<Typography variant="heading1">Welcome</Typography>
|
|
93
|
+
<Alert variant="info">Design system is ready!</Alert>
|
|
94
|
+
<Button variant="primary" size="lg">
|
|
95
|
+
Get Started
|
|
96
|
+
</Button>
|
|
97
|
+
</Stack>
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## 🎯 Component Library
|
|
103
|
+
|
|
104
|
+
**✅ Atoms (12 components)**:
|
|
105
|
+
- Alert, Avatar, Box, Button, Chip, Container
|
|
106
|
+
- CoverImage, Icon, IconButton, SectionSeparator
|
|
107
|
+
- Stack, Typography
|
|
108
|
+
|
|
109
|
+
**✅ Molecules (8 components)**:
|
|
110
|
+
- ArtCard, Breadcrumbs, ChipGroup, CodeBlock
|
|
111
|
+
- DesignCard, Dropdown, PageTitle, ReleaseCard
|
|
112
|
+
|
|
113
|
+
**✅ Organisms (3 components)**:
|
|
114
|
+
- Footer, HeroBanner, Navigation
|
|
115
|
+
|
|
116
|
+
**✅ Layout (1 system)**:
|
|
117
|
+
- GridSystem
|
|
118
|
+
|
|
119
|
+
## � Production Ready
|
|
120
|
+
|
|
121
|
+
This design system is production-ready with:
|
|
122
|
+
- **24+ tested components** with comprehensive test coverage
|
|
123
|
+
- **Semantic design tokens** for consistent theming
|
|
124
|
+
- **Accessibility compliance** (WCAG 2.2 AA)
|
|
125
|
+
- **TypeScript support** with full type definitions
|
|
126
|
+
- **Interactive documentation** for easy adoption
|
|
127
|
+
- **Optimized bundle** with tree-shaking support
|
|
128
|
+
|
|
129
|
+
## 🤝 Contributing
|
|
130
|
+
|
|
131
|
+
This design system follows established patterns:
|
|
132
|
+
- **Comprehensive testing** with jest-axe for accessibility compliance
|
|
133
|
+
- **Token-driven styling** - all components use semantic design tokens
|
|
134
|
+
- **TypeScript interfaces** with complete props documentation
|
|
135
|
+
- **Atomic design principles** for scalable component organization
|
|
136
|
+
- **Component documentation** with interactive examples and usage patterns
|
|
137
|
+
|
|
138
|
+
### Development Workflow
|
|
139
|
+
1. Components follow the atomic design hierarchy
|
|
140
|
+
2. All styling uses design tokens from `src/styles/tokens.json`
|
|
141
|
+
3. Each component includes `.test.tsx`, `.docs.tsx`, and implementation files
|
|
142
|
+
4. Tests must include accessibility validation with jest-axe
|
|
143
|
+
5. Documentation includes live examples and prop descriptions
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Avatar';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import tokens from '../../../styles/tokens.json';
|
|
3
|
+
export interface BoxProps {
|
|
4
|
+
display?: 'block' | 'inline' | 'inline-block' | 'flex' | 'inline-flex' | 'none';
|
|
5
|
+
flexDirection?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
6
|
+
justifyContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
|
|
7
|
+
alignItems?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
|
|
8
|
+
flexWrap?: 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
9
|
+
gap?: keyof typeof tokens.semantic.spacing.layout;
|
|
10
|
+
m?: keyof typeof tokens.semantic.spacing.layout;
|
|
11
|
+
mt?: keyof typeof tokens.semantic.spacing.layout;
|
|
12
|
+
mr?: keyof typeof tokens.semantic.spacing.layout;
|
|
13
|
+
mb?: keyof typeof tokens.semantic.spacing.layout;
|
|
14
|
+
ml?: keyof typeof tokens.semantic.spacing.layout;
|
|
15
|
+
mx?: keyof typeof tokens.semantic.spacing.layout;
|
|
16
|
+
my?: keyof typeof tokens.semantic.spacing.layout;
|
|
17
|
+
p?: keyof typeof tokens.semantic.spacing.layout;
|
|
18
|
+
pt?: keyof typeof tokens.semantic.spacing.layout;
|
|
19
|
+
pr?: keyof typeof tokens.semantic.spacing.layout;
|
|
20
|
+
pb?: keyof typeof tokens.semantic.spacing.layout;
|
|
21
|
+
pl?: keyof typeof tokens.semantic.spacing.layout;
|
|
22
|
+
px?: keyof typeof tokens.semantic.spacing.layout;
|
|
23
|
+
py?: keyof typeof tokens.semantic.spacing.layout;
|
|
24
|
+
width?: string;
|
|
25
|
+
height?: string;
|
|
26
|
+
maxWidth?: string;
|
|
27
|
+
maxHeight?: string;
|
|
28
|
+
minWidth?: string;
|
|
29
|
+
minHeight?: string;
|
|
30
|
+
position?: 'static' | 'relative' | 'absolute' | 'fixed' | 'sticky';
|
|
31
|
+
top?: string;
|
|
32
|
+
right?: string;
|
|
33
|
+
bottom?: string;
|
|
34
|
+
left?: string;
|
|
35
|
+
borderRadius?: keyof typeof tokens.base.border.radius;
|
|
36
|
+
border?: keyof typeof tokens.semantic.color.border;
|
|
37
|
+
borderTop?: keyof typeof tokens.semantic.color.border;
|
|
38
|
+
borderRight?: keyof typeof tokens.semantic.color.border;
|
|
39
|
+
borderBottom?: keyof typeof tokens.semantic.color.border;
|
|
40
|
+
borderLeft?: keyof typeof tokens.semantic.color.border;
|
|
41
|
+
bg?: keyof typeof tokens.semantic.color.background;
|
|
42
|
+
color?: keyof typeof tokens.semantic.color.text;
|
|
43
|
+
overflow?: 'visible' | 'hidden' | 'scroll' | 'auto';
|
|
44
|
+
overflowX?: 'visible' | 'hidden' | 'scroll' | 'auto';
|
|
45
|
+
overflowY?: 'visible' | 'hidden' | 'scroll' | 'auto';
|
|
46
|
+
as?: React.ElementType;
|
|
47
|
+
children?: React.ReactNode;
|
|
48
|
+
id?: string;
|
|
49
|
+
style?: React.CSSProperties;
|
|
50
|
+
'data-testid'?: string;
|
|
51
|
+
}
|
|
52
|
+
export declare const Box: React.FC<BoxProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Box';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import iconsData from '@/styles/icons.json';
|
|
3
|
+
export interface BaseButtonProps {
|
|
4
|
+
variant?: 'primary' | 'secondary' | 'naked';
|
|
5
|
+
size?: 'small' | 'medium' | 'large';
|
|
6
|
+
url?: string;
|
|
7
|
+
purpose?: 'button' | 'link';
|
|
8
|
+
target?: string;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
iconName?: keyof typeof iconsData;
|
|
11
|
+
id?: string;
|
|
12
|
+
'data-testid'?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ButtonProps extends BaseButtonProps, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, keyof BaseButtonProps> {
|
|
15
|
+
purpose?: 'button';
|
|
16
|
+
}
|
|
17
|
+
export interface LinkProps extends BaseButtonProps, Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, keyof BaseButtonProps> {
|
|
18
|
+
purpose: 'link';
|
|
19
|
+
}
|
|
20
|
+
type CustomButtonProps = ButtonProps | LinkProps;
|
|
21
|
+
export declare const Button: React.FC<CustomButtonProps>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Button';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ChipProps {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
variant?: 'default' | 'emphasis' | 'subtle' | 'interactive' | 'light' | 'dark';
|
|
5
|
+
size?: 'small' | 'medium' | 'large';
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
'data-testid'?: string;
|
|
9
|
+
'aria-label'?: string;
|
|
10
|
+
'aria-describedby'?: string;
|
|
11
|
+
role?: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const Chip: React.FC<ChipProps>;
|
|
15
|
+
export interface LegacyChipProps {
|
|
16
|
+
title: string;
|
|
17
|
+
variant?: 'light' | 'dark';
|
|
18
|
+
}
|
|
19
|
+
export declare const LegacyChip: React.FC<LegacyChipProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Chip';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Container';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CoverImage';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import iconsData from '@/styles/icons.json';
|
|
3
|
+
export interface IconProps {
|
|
4
|
+
name: keyof typeof iconsData;
|
|
5
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
6
|
+
iconColor?: 'default' | 'emphasis' | 'subdued' | 'disabled' | 'inverse' | 'interactive' | 'error' | 'success' | 'warning' | 'inherit';
|
|
7
|
+
'data-testid'?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const Icon: FC<IconProps>;
|
|
10
|
+
export default Icon;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Icon';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import iconsData from '@/styles/icons.json';
|
|
3
|
+
export interface IconButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'> {
|
|
4
|
+
variant: 'primary' | 'secondary' | 'naked';
|
|
5
|
+
size?: 'small' | 'medium' | 'large';
|
|
6
|
+
iconName: keyof typeof iconsData;
|
|
7
|
+
url?: string;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
'aria-label': string;
|
|
10
|
+
'aria-describedby'?: string;
|
|
11
|
+
'aria-expanded'?: boolean;
|
|
12
|
+
'aria-pressed'?: boolean;
|
|
13
|
+
'data-testid'?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const IconButton: React.FC<IconButtonProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './IconButton';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface SectionSeparatorProps {
|
|
3
|
+
/** Variant style of the separator */
|
|
4
|
+
variant?: 'default' | 'strong' | 'minimal';
|
|
5
|
+
/** Size variation affecting spacing */
|
|
6
|
+
size?: 'small' | 'medium' | 'large' | 'xlarge';
|
|
7
|
+
/** Data test id for testing */
|
|
8
|
+
'data-testid'?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* SectionSeparator is an atomic component that provides visual separation between content sections.
|
|
12
|
+
*
|
|
13
|
+
* Features:
|
|
14
|
+
* - Multiple variants (default, strong, minimal)
|
|
15
|
+
* - Size variations for different spacing needs
|
|
16
|
+
* - Semantic token usage for consistent styling
|
|
17
|
+
* - Full accessibility support
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <SectionSeparator />
|
|
22
|
+
* <SectionSeparator variant="strong" size="xlarge" />
|
|
23
|
+
* <SectionSeparator variant="minimal" />
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare const SectionSeparator: React.FC<SectionSeparatorProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SectionSeparator';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type StackDirection = 'column' | 'row';
|
|
3
|
+
export type StackAlign = 'center' | 'flex-start' | 'flex-end' | 'stretch' | 'baseline';
|
|
4
|
+
export type StackJustify = 'center' | 'flex-start' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
|
|
5
|
+
export type StackGap = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl';
|
|
6
|
+
export interface StackProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
direction?: StackDirection;
|
|
9
|
+
alignItems?: StackAlign;
|
|
10
|
+
justifyContent?: StackJustify;
|
|
11
|
+
gap?: StackGap;
|
|
12
|
+
wrap?: boolean;
|
|
13
|
+
'data-testid'?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const Stack: React.FC<StackProps>;
|
|
16
|
+
export default Stack;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Stack';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type TypographyVariant = 'display' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle' | 'body' | 'small' | 'overline' | 'caption' | 'button1' | 'button2' | 'button3' | 'label';
|
|
3
|
+
export type TypographyColor = "default" | "emphasis" | "subdued" | "inverse" | "disabled" | "interactive" | "error" | "success" | "warning";
|
|
4
|
+
export interface TypographyProps {
|
|
5
|
+
/** Typography variant defining the semantic meaning and style */
|
|
6
|
+
variant?: TypographyVariant;
|
|
7
|
+
/** Color variant for the text */
|
|
8
|
+
color?: TypographyColor;
|
|
9
|
+
/** Content to render */
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
/** HTML element to render as (overrides default semantic element) */
|
|
12
|
+
as?: React.ElementType;
|
|
13
|
+
/** Data test id for testing */
|
|
14
|
+
'data-testid'?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Typography is an atomic component for rendering text with semantic meaning and consistent styling.
|
|
18
|
+
*
|
|
19
|
+
* Features:
|
|
20
|
+
* - Semantic variants (h1-h6, body, subtitle, etc.)
|
|
21
|
+
* - Color variants for different contexts
|
|
22
|
+
* - Automatic semantic HTML element selection
|
|
23
|
+
* - Manual element override support
|
|
24
|
+
* - Direct semantic token usage (no component tokens needed)
|
|
25
|
+
* - Full accessibility support
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* <Typography variant="h1">Main Heading</Typography>
|
|
30
|
+
* <Typography variant="body" color="subdued">Body text</Typography>
|
|
31
|
+
* <Typography variant="caption" as="figcaption">Image caption</Typography>
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare const Typography: React.FC<TypographyProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Typography';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './Avatar';
|
|
2
|
+
export * from './Box';
|
|
3
|
+
export * from './Button';
|
|
4
|
+
export * from './Chip';
|
|
5
|
+
export * from './Container';
|
|
6
|
+
export * from './CoverImage';
|
|
7
|
+
export * from './Icon';
|
|
8
|
+
export * from './IconButton';
|
|
9
|
+
export * from './SectionSeparator';
|
|
10
|
+
export * from './Stack';
|
|
11
|
+
export * from './Typography';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import tokens from '@/styles/tokens.json';
|
|
3
|
+
interface GridProps {
|
|
4
|
+
cols?: number;
|
|
5
|
+
gap?: keyof typeof tokens.base.spacing;
|
|
6
|
+
gapX?: keyof typeof tokens.base.spacing;
|
|
7
|
+
gapY?: keyof typeof tokens.base.spacing;
|
|
8
|
+
className?: string;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare const Grid: React.FC<GridProps>;
|
|
12
|
+
interface GridColProps {
|
|
13
|
+
span?: number;
|
|
14
|
+
spanSm?: number;
|
|
15
|
+
spanMd?: number;
|
|
16
|
+
spanLg?: number;
|
|
17
|
+
spanXl?: number;
|
|
18
|
+
order?: number;
|
|
19
|
+
orderSm?: number;
|
|
20
|
+
orderMd?: number;
|
|
21
|
+
orderLg?: number;
|
|
22
|
+
orderXl?: number;
|
|
23
|
+
className?: string;
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
}
|
|
26
|
+
export declare const GridCol: React.FC<GridColProps>;
|
|
27
|
+
interface ResponsiveGridProps {
|
|
28
|
+
cols: number;
|
|
29
|
+
colsSm?: number;
|
|
30
|
+
colsMd?: number;
|
|
31
|
+
colsLg?: number;
|
|
32
|
+
colsXl?: number;
|
|
33
|
+
gap?: keyof typeof tokens.base.spacing;
|
|
34
|
+
gapSm?: keyof typeof tokens.base.spacing;
|
|
35
|
+
gapMd?: keyof typeof tokens.base.spacing;
|
|
36
|
+
gapLg?: keyof typeof tokens.base.spacing;
|
|
37
|
+
gapXl?: keyof typeof tokens.base.spacing;
|
|
38
|
+
gapX?: keyof typeof tokens.base.spacing;
|
|
39
|
+
gapXSm?: keyof typeof tokens.base.spacing;
|
|
40
|
+
gapXMd?: keyof typeof tokens.base.spacing;
|
|
41
|
+
gapXLg?: keyof typeof tokens.base.spacing;
|
|
42
|
+
gapXXl?: keyof typeof tokens.base.spacing;
|
|
43
|
+
gapY?: keyof typeof tokens.base.spacing;
|
|
44
|
+
gapYSm?: keyof typeof tokens.base.spacing;
|
|
45
|
+
gapYMd?: keyof typeof tokens.base.spacing;
|
|
46
|
+
gapYLg?: keyof typeof tokens.base.spacing;
|
|
47
|
+
gapYXl?: keyof typeof tokens.base.spacing;
|
|
48
|
+
className?: string;
|
|
49
|
+
children: React.ReactNode;
|
|
50
|
+
}
|
|
51
|
+
export declare const ResponsiveGrid: React.FC<ResponsiveGridProps>;
|
|
52
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ResponsiveGrid, GridCol, Grid } from './GridSystem';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './GridSystem';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type ArtCardProps = {
|
|
2
|
+
title: string;
|
|
3
|
+
excerpt: string;
|
|
4
|
+
tag: string;
|
|
5
|
+
artist: string;
|
|
6
|
+
labels: string[];
|
|
7
|
+
coverImage: string;
|
|
8
|
+
slug?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const ArtCard: ({ title, excerpt, tag, artist, labels, coverImage, slug, }: ArtCardProps) => import("react").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ArtCard';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Breadcrumbs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ChipGroup';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface CodeBlockProps {
|
|
3
|
+
children: string;
|
|
4
|
+
showCopyButton?: boolean;
|
|
5
|
+
onCopy?: () => void;
|
|
6
|
+
'data-testid'?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* CodeBlock component for displaying formatted code with optional copy functionality
|
|
10
|
+
*
|
|
11
|
+
* @param children - The code content to display
|
|
12
|
+
* @param showCopyButton - Whether to show the copy button (default: true)
|
|
13
|
+
* @param onCopy - Optional callback when code is copied
|
|
14
|
+
* @param data-testid - Test identifier for the code block
|
|
15
|
+
*/
|
|
16
|
+
export declare const CodeBlock: React.FC<CodeBlockProps>;
|
|
17
|
+
export default CodeBlock;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CodeBlock';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DesignCard';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface DropdownOption {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
value?: any;
|
|
6
|
+
}
|
|
7
|
+
export interface DropdownProps {
|
|
8
|
+
options: DropdownOption[];
|
|
9
|
+
value: string;
|
|
10
|
+
onChange: (value: string) => void;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
label?: string;
|
|
15
|
+
}
|
|
16
|
+
declare const DropdownOption: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
17
|
+
$isSelected: boolean;
|
|
18
|
+
$isFocused: boolean;
|
|
19
|
+
}>> & string;
|
|
20
|
+
export declare const Dropdown: React.FC<DropdownProps>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Dropdown';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PageTitle';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ReleaseCard';
|
package/dist/index.d.ts
ADDED