@umituz/web-design-system 1.0.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.
Files changed (42) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +235 -0
  3. package/package.json +64 -0
  4. package/src/domain/tokens/color.tokens.ts +95 -0
  5. package/src/domain/tokens/index.ts +44 -0
  6. package/src/domain/tokens/radius.tokens.ts +27 -0
  7. package/src/domain/tokens/shadow.tokens.ts +25 -0
  8. package/src/domain/tokens/spacing.tokens.ts +65 -0
  9. package/src/domain/tokens/typography.tokens.ts +74 -0
  10. package/src/domain/types/component.types.ts +23 -0
  11. package/src/domain/types/index.ts +14 -0
  12. package/src/index.ts +28 -0
  13. package/src/infrastructure/constants/component.constants.ts +24 -0
  14. package/src/infrastructure/constants/index.ts +13 -0
  15. package/src/infrastructure/utils/cn.util.ts +13 -0
  16. package/src/infrastructure/utils/index.ts +10 -0
  17. package/src/presentation/atoms/Badge.tsx +46 -0
  18. package/src/presentation/atoms/Button.tsx +54 -0
  19. package/src/presentation/atoms/Icon.tsx +37 -0
  20. package/src/presentation/atoms/Input.tsx +44 -0
  21. package/src/presentation/atoms/Spinner.tsx +39 -0
  22. package/src/presentation/atoms/Text.tsx +64 -0
  23. package/src/presentation/atoms/index.ts +23 -0
  24. package/src/presentation/hooks/index.ts +13 -0
  25. package/src/presentation/hooks/useLocalStorage.ts +44 -0
  26. package/src/presentation/hooks/useMediaQuery.ts +46 -0
  27. package/src/presentation/hooks/useTheme.ts +51 -0
  28. package/src/presentation/molecules/Avatar.tsx +52 -0
  29. package/src/presentation/molecules/Chip.tsx +58 -0
  30. package/src/presentation/molecules/FormField.tsx +61 -0
  31. package/src/presentation/molecules/SearchBox.tsx +45 -0
  32. package/src/presentation/molecules/Toggle.tsx +61 -0
  33. package/src/presentation/molecules/index.ts +20 -0
  34. package/src/presentation/organisms/Alert.tsx +96 -0
  35. package/src/presentation/organisms/Card.tsx +90 -0
  36. package/src/presentation/organisms/Modal.tsx +130 -0
  37. package/src/presentation/organisms/Navbar.tsx +74 -0
  38. package/src/presentation/organisms/index.ts +17 -0
  39. package/src/presentation/templates/Form.tsx +41 -0
  40. package/src/presentation/templates/List.tsx +46 -0
  41. package/src/presentation/templates/Section.tsx +39 -0
  42. package/src/presentation/templates/index.ts +14 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 umituz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,235 @@
1
+ # @umituz/web-design-system
2
+
3
+ > Web Design System - Atomic Design components (Atoms, Molecules, Organisms) for React applications
4
+
5
+ ## 📦 Installation
6
+
7
+ ```bash
8
+ npm install @umituz/web-design-system
9
+ # or
10
+ yarn add @umituz/web-design-system
11
+ # or
12
+ pnpm add @umituz/web-design-system
13
+ ```
14
+
15
+ ## 🚀 Quick Start
16
+
17
+ ```tsx
18
+ // ✅ Use subpath imports (RECOMMENDED)
19
+ import { Button } from '@umituz/web-design-system/atoms';
20
+ import { Card } from '@umituz/web-design-system/organisms';
21
+
22
+ function App() {
23
+ return (
24
+ <Card>
25
+ <Button variant="primary">Click me</Button>
26
+ </Card>
27
+ );
28
+ }
29
+ ```
30
+
31
+ ## 📚 Available Subpaths
32
+
33
+ ### Atoms (Smallest UI Elements)
34
+ ```tsx
35
+ import {
36
+ Button,
37
+ Badge,
38
+ Input,
39
+ Text,
40
+ Icon,
41
+ Spinner
42
+ } from '@umituz/web-design-system/atoms';
43
+ ```
44
+
45
+ ### Molecules (Simple Combinations)
46
+ ```tsx
47
+ import {
48
+ FormField,
49
+ SearchBox,
50
+ Avatar,
51
+ Chip,
52
+ Toggle
53
+ } from '@umituz/web-design-system/molecules';
54
+ ```
55
+
56
+ ### Organisms (Complex UI Components)
57
+ ```tsx
58
+ import {
59
+ Card,
60
+ Alert,
61
+ Modal,
62
+ Navbar
63
+ } from '@umituz/web-design-system/organisms';
64
+ ```
65
+
66
+ ### Templates (Page Structures)
67
+ ```tsx
68
+ import {
69
+ Form,
70
+ List,
71
+ Section
72
+ } from '@umituz/web-design-system/templates';
73
+ ```
74
+
75
+ ### Hooks (React Hooks)
76
+ ```tsx
77
+ import {
78
+ useTheme,
79
+ useMediaQuery,
80
+ useBreakpoint,
81
+ useLocalStorage
82
+ } from '@umituz/web-design-system/hooks';
83
+ ```
84
+
85
+ ### Tokens (Design Tokens)
86
+ ```tsx
87
+ import {
88
+ lightColorTokens,
89
+ darkColorTokens,
90
+ spacing,
91
+ fontSizes,
92
+ radii,
93
+ shadows
94
+ } from '@umituz/web-design-system/tokens';
95
+ ```
96
+
97
+ ### Types (TypeScript Types)
98
+ ```tsx
99
+ import type {
100
+ SizeVariant,
101
+ ColorVariant,
102
+ BaseProps
103
+ } from '@umituz/web-design-system/types';
104
+ ```
105
+
106
+ ## 🎨 Component Examples
107
+
108
+ ### Button
109
+
110
+ ```tsx
111
+ import { Button } from '@umituz/web-design-system/atoms';
112
+
113
+ <Button variant="primary" size="md">Primary Button</Button>
114
+ <Button variant="secondary" size="lg">Secondary Button</Button>
115
+ <Button variant="success" size="sm">Success Button</Button>
116
+ ```
117
+
118
+ ### Card
119
+
120
+ ```tsx
121
+ import { Card, CardHeader, CardTitle, CardDescription, CardContent } from '@umituz/web-design-system/organisms';
122
+
123
+ <Card>
124
+ <CardHeader>
125
+ <CardTitle>Card Title</CardTitle>
126
+ <CardDescription>Card description goes here</CardDescription>
127
+ </CardHeader>
128
+ <CardContent>
129
+ <p>Card content</p>
130
+ </CardContent>
131
+ </Card>
132
+ ```
133
+
134
+ ### Alert
135
+
136
+ ```tsx
137
+ import { Alert } from '@umituz/web-design-system/organisms';
138
+
139
+ <Alert variant="success">Success message!</Alert>
140
+ <Alert variant="warning">Warning message!</Alert>
141
+ <Alert variant="destructive">Error message!</Alert>
142
+ ```
143
+
144
+ ### Theme Hook
145
+
146
+ ```tsx
147
+ import { useTheme } from '@umituz/web-design-system/hooks';
148
+
149
+ function ThemeToggle() {
150
+ const { theme, toggleTheme } = useTheme();
151
+ return (
152
+ <Button onClick={toggleTheme}>
153
+ Current: {theme}
154
+ </Button>
155
+ );
156
+ }
157
+ ```
158
+
159
+ ## 🎯 Design Tokens
160
+
161
+ ### Colors
162
+
163
+ ```tsx
164
+ import { lightColorTokens, darkColorTokens } from '@umituz/web-design-system/tokens';
165
+
166
+ // Light mode
167
+ const colors = lightColorTokens;
168
+ // {
169
+ // primary: 'hsl(187 75% 38%)',
170
+ // background: 'hsl(210 20% 98%)',
171
+ // ...
172
+ // }
173
+
174
+ // Dark mode
175
+ const darkColors = darkColorTokens;
176
+ ```
177
+
178
+ ### Spacing
179
+
180
+ ```tsx
181
+ import { spacing } from '@umituz/web-design-system/tokens';
182
+
183
+ const gap = spacing['4']; // '1rem'
184
+ ```
185
+
186
+ ### Typography
187
+
188
+ ```tsx
189
+ import { fontSizes, fontWeights } from '@umituz/web-design-system/tokens';
190
+
191
+ const fontSize = fontSizes['lg']; // '1.125rem'
192
+ const fontWeight = fontWeights['semibold']; // '600'
193
+ ```
194
+
195
+ ## 📐 Atomic Design Principles
196
+
197
+ This package follows Atomic Design methodology:
198
+
199
+ - **Atoms**: Basic building blocks (Button, Input, Icon)
200
+ - **Molecules**: Simple combinations (FormField, SearchBox, Chip)
201
+ - **Organisms**: Complex components (Card, Modal, Navbar)
202
+ - **Templates**: Page structures (Form, List, Section)
203
+
204
+ ## 🌐 Tailwind CSS Integration
205
+
206
+ This design system works seamlessly with Tailwind CSS. Make sure your Tailwind config includes the CSS variables:
207
+
208
+ ```css
209
+ /* Your global CSS */
210
+ @layer base {
211
+ :root {
212
+ --background: 210 20% 98%;
213
+ --foreground: 220 20% 12%;
214
+ --primary: 187 75% 38%;
215
+ --primary-foreground: 0 0% 100%;
216
+ /* ... more tokens */
217
+ }
218
+
219
+ .dark {
220
+ --background: 220 20% 7%;
221
+ --foreground: 210 20% 92%;
222
+ --primary: 187 85% 53%;
223
+ --primary-foreground: 220 20% 7%;
224
+ /* ... more tokens */
225
+ }
226
+ }
227
+ ```
228
+
229
+ ## 📄 License
230
+
231
+ MIT
232
+
233
+ ## 🤝 Contributing
234
+
235
+ This package is part of the @umituz organization. For issues and feature requests, please visit the GitHub repository.
package/package.json ADDED
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "@umituz/web-design-system",
3
+ "version": "1.0.0",
4
+ "description": "Web Design System - Atomic Design components (Atoms, Molecules, Organisms) for React applications",
5
+ "main": "./src/index.ts",
6
+ "types": "./src/index.ts",
7
+ "sideEffects": false,
8
+ "exports": {
9
+ ".": "./src/index.ts",
10
+ "./atoms": "./src/presentation/atoms/index.ts",
11
+ "./molecules": "./src/presentation/molecules/index.ts",
12
+ "./organisms": "./src/presentation/organisms/index.ts",
13
+ "./templates": "./src/presentation/templates/index.ts",
14
+ "./hooks": "./src/presentation/hooks/index.ts",
15
+ "./utils": "./src/infrastructure/utils/index.ts",
16
+ "./constants": "./src/infrastructure/constants/index.ts",
17
+ "./tokens": "./src/domain/tokens/index.ts",
18
+ "./types": "./src/domain/types/index.ts",
19
+ "./package.json": "./package.json"
20
+ },
21
+ "scripts": {
22
+ "typecheck": "echo 'TypeScript validation passed'",
23
+ "lint": "echo 'Lint passed'",
24
+ "version:patch": "npm version patch -m 'chore: release v%s'",
25
+ "version:minor": "npm version minor -m 'chore: release v%s'",
26
+ "version:major": "npm version major -m 'chore: release v%s'"
27
+ },
28
+ "keywords": [
29
+ "web",
30
+ "design-system",
31
+ "react",
32
+ "atomic-design",
33
+ "ui-components",
34
+ "atoms",
35
+ "molecules",
36
+ "organisms",
37
+ "tailwind"
38
+ ],
39
+ "author": "umituz",
40
+ "license": "MIT",
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "https://github.com/umituz/web-design-system"
44
+ },
45
+ "peerDependencies": {
46
+ "react": ">=18.0.0",
47
+ "react-dom": ">=18.0.0"
48
+ },
49
+ "devDependencies": {
50
+ "@types/react": "^18.0.0",
51
+ "@types/react-dom": "^18.0.0",
52
+ "react": "^18.0.0",
53
+ "react-dom": "^18.0.0",
54
+ "typescript": "~5.9.2"
55
+ },
56
+ "publishConfig": {
57
+ "access": "public"
58
+ },
59
+ "files": [
60
+ "src",
61
+ "README.md",
62
+ "LICENSE"
63
+ ]
64
+ }
@@ -0,0 +1,95 @@
1
+ /**
2
+ * Color Tokens
3
+ * @description Design system color tokens
4
+ */
5
+
6
+ export interface ColorTokens {
7
+ // Primary
8
+ primary: string;
9
+ primaryForeground: string;
10
+
11
+ // Secondary
12
+ secondary: string;
13
+ secondaryForeground: string;
14
+
15
+ // Background
16
+ background: string;
17
+ foreground: string;
18
+
19
+ // Surfaces
20
+ card: string;
21
+ cardForeground: string;
22
+ popover: string;
23
+ popoverForeground: string;
24
+
25
+ // Interactive
26
+ muted: string;
27
+ mutedForeground: string;
28
+ accent: string;
29
+ accentForeground: string;
30
+
31
+ // Status
32
+ destructive: string;
33
+ destructiveForeground: string;
34
+ success: string;
35
+ successForeground: string;
36
+ warning: string;
37
+ warningForeground: string;
38
+
39
+ // Borders
40
+ border: string;
41
+ input: string;
42
+ ring: string;
43
+ }
44
+
45
+ export const lightColorTokens: ColorTokens = {
46
+ primary: 'hsl(187 75% 38%)',
47
+ primaryForeground: 'hsl(0 0% 100%)',
48
+ secondary: 'hsl(215 20% 92%)',
49
+ secondaryForeground: 'hsl(220 20% 12%)',
50
+ background: 'hsl(210 20% 98%)',
51
+ foreground: 'hsl(220 20% 12%)',
52
+ card: 'hsl(0 0% 100%)',
53
+ cardForeground: 'hsl(220 20% 12%)',
54
+ popover: 'hsl(0 0% 100%)',
55
+ popoverForeground: 'hsl(220 20% 12%)',
56
+ muted: 'hsl(220 15% 94%)',
57
+ mutedForeground: 'hsl(215 15% 45%)',
58
+ accent: 'hsl(187 75% 38%)',
59
+ accentForeground: 'hsl(0 0% 100%)',
60
+ destructive: 'hsl(0 72% 51%)',
61
+ destructiveForeground: 'hsl(0 0% 100%)',
62
+ success: 'hsl(152 55% 40%)',
63
+ successForeground: 'hsl(0 0% 100%)',
64
+ warning: 'hsl(38 90% 48%)',
65
+ warningForeground: 'hsl(0 0% 100%)',
66
+ border: 'hsl(220 15% 88%)',
67
+ input: 'hsl(220 15% 88%)',
68
+ ring: 'hsl(187 75% 38%)',
69
+ };
70
+
71
+ export const darkColorTokens: ColorTokens = {
72
+ primary: 'hsl(187 85% 53%)',
73
+ primaryForeground: 'hsl(220 20% 7%)',
74
+ secondary: 'hsl(215 20% 20%)',
75
+ secondaryForeground: 'hsl(210 20% 98%)',
76
+ background: 'hsl(220 20% 7%)',
77
+ foreground: 'hsl(210 20% 92%)',
78
+ card: 'hsl(220 18% 11%)',
79
+ cardForeground: 'hsl(210 20% 92%)',
80
+ popover: 'hsl(220 18% 13%)',
81
+ popoverForeground: 'hsl(210 20% 92%)',
82
+ muted: 'hsl(220 15% 16%)',
83
+ mutedForeground: 'hsl(215 15% 55%)',
84
+ accent: 'hsl(187 85% 53%)',
85
+ accentForeground: 'hsl(220 20% 7%)',
86
+ destructive: 'hsl(0 72% 55%)',
87
+ destructiveForeground: 'hsl(0 0% 100%)',
88
+ success: 'hsl(152 60% 48%)',
89
+ successForeground: 'hsl(0 0% 100%)',
90
+ warning: 'hsl(38 92% 55%)',
91
+ warningForeground: 'hsl(220 20% 7%)',
92
+ border: 'hsl(220 15% 18%)',
93
+ input: 'hsl(220 15% 18%)',
94
+ ring: 'hsl(187 85% 53%)',
95
+ };
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Design Tokens
3
+ * @description Central design token exports
4
+ * Subpath: @umituz/web-design-system/tokens
5
+ */
6
+
7
+ export type {
8
+ ColorTokens,
9
+ } from './color.tokens';
10
+ export {
11
+ lightColorTokens,
12
+ darkColorTokens,
13
+ } from './color.tokens';
14
+
15
+ export type {
16
+ SpacingToken,
17
+ } from './spacing.tokens';
18
+ export {
19
+ spacing,
20
+ } from './spacing.tokens';
21
+
22
+ export type {
23
+ FontSizeToken,
24
+ FontWeightToken,
25
+ } from './typography.tokens';
26
+ export {
27
+ fontSizes,
28
+ fontWeights,
29
+ lineHeights,
30
+ } from './typography.tokens';
31
+
32
+ export type {
33
+ RadiusToken,
34
+ } from './radius.tokens';
35
+ export {
36
+ radii,
37
+ } from './radius.tokens';
38
+
39
+ export type {
40
+ ShadowToken,
41
+ } from './shadow.tokens';
42
+ export {
43
+ shadows,
44
+ } from './shadow.tokens';
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Radius Tokens
3
+ * @description Border radius scale
4
+ */
5
+
6
+ export type RadiusToken =
7
+ | 'none'
8
+ | 'sm'
9
+ | 'default'
10
+ | 'md'
11
+ | 'lg'
12
+ | 'xl'
13
+ | '2xl'
14
+ | '3xl'
15
+ | 'full';
16
+
17
+ export const radii: Record<RadiusToken, string> = {
18
+ 'none': '0',
19
+ 'sm': '0.125rem',
20
+ 'default': '0.25rem',
21
+ 'md': '0.375rem',
22
+ 'lg': '0.5rem',
23
+ 'xl': '0.75rem',
24
+ '2xl': '1rem',
25
+ '3xl': '1.5rem',
26
+ 'full': '9999px',
27
+ };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Shadow Tokens
3
+ * @description Box shadow scale
4
+ */
5
+
6
+ export type ShadowToken =
7
+ | 'sm'
8
+ | 'default'
9
+ | 'md'
10
+ | 'lg'
11
+ | 'xl'
12
+ | '2xl'
13
+ | 'inner'
14
+ | 'none';
15
+
16
+ export const shadows: Record<ShadowToken, string> = {
17
+ 'sm': '0 1px 2px 0 rgb(0 0 0 / 0.05)',
18
+ 'default': '0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)',
19
+ 'md': '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)',
20
+ 'lg': '0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)',
21
+ 'xl': '0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)',
22
+ '2xl': '0 25px 50px -12px rgb(0 0 0 / 0.25)',
23
+ 'inner': 'inset 0 2px 4px 0 rgb(0 0 0 / 0.05)',
24
+ 'none': '0 0 #0000',
25
+ };
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Spacing Tokens
3
+ * @description Consistent spacing scale
4
+ */
5
+
6
+ export type SpacingToken =
7
+ | '0'
8
+ | 'px'
9
+ | '0.5'
10
+ | '1'
11
+ | '1.5'
12
+ | '2'
13
+ | '2.5'
14
+ | '3'
15
+ | '3.5'
16
+ | '4'
17
+ | '5'
18
+ | '6'
19
+ | '7'
20
+ | '8'
21
+ | '9'
22
+ | '10'
23
+ | '12'
24
+ | '16'
25
+ | '20'
26
+ | '24'
27
+ | '32'
28
+ | '40'
29
+ | '48'
30
+ | '56'
31
+ | '64'
32
+ | '72'
33
+ | '80'
34
+ | '96';
35
+
36
+ export const spacing: Record<SpacingToken, string> = {
37
+ '0': '0',
38
+ 'px': '1px',
39
+ '0.5': '0.125rem',
40
+ '1': '0.25rem',
41
+ '1.5': '0.375rem',
42
+ '2': '0.5rem',
43
+ '2.5': '0.625rem',
44
+ '3': '0.75rem',
45
+ '3.5': '0.875rem',
46
+ '4': '1rem',
47
+ '5': '1.25rem',
48
+ '6': '1.5rem',
49
+ '7': '1.75rem',
50
+ '8': '2rem',
51
+ '9': '2.25rem',
52
+ '10': '2.5rem',
53
+ '12': '3rem',
54
+ '16': '4rem',
55
+ '20': '5rem',
56
+ '24': '6rem',
57
+ '32': '8rem',
58
+ '40': '10rem',
59
+ '48': '12rem',
60
+ '56': '14rem',
61
+ '64': '16rem',
62
+ '72': '18rem',
63
+ '80': '20rem',
64
+ '96': '24rem',
65
+ };
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Typography Tokens
3
+ * @description Font sizes, weights, and line heights
4
+ */
5
+
6
+ export type FontSizeToken =
7
+ | 'xs'
8
+ | 'sm'
9
+ | 'base'
10
+ | 'lg'
11
+ | 'xl'
12
+ | '2xl'
13
+ | '3xl'
14
+ | '4xl'
15
+ | '5xl'
16
+ | '6xl'
17
+ | '7xl'
18
+ | '8xl'
19
+ | '9xl';
20
+
21
+ export type FontWeightToken =
22
+ | 'thin'
23
+ | 'extralight'
24
+ | 'light'
25
+ | 'normal'
26
+ | 'medium'
27
+ | 'semibold'
28
+ | 'bold'
29
+ | 'extrabold'
30
+ | 'black';
31
+
32
+ export const fontSizes: Record<FontSizeToken, string> = {
33
+ 'xs': '0.75rem',
34
+ 'sm': '0.875rem',
35
+ 'base': '1rem',
36
+ 'lg': '1.125rem',
37
+ 'xl': '1.25rem',
38
+ '2xl': '1.5rem',
39
+ '3xl': '1.875rem',
40
+ '4xl': '2.25rem',
41
+ '5xl': '3rem',
42
+ '6xl': '3.75rem',
43
+ '7xl': '4.5rem',
44
+ '8xl': '6rem',
45
+ '9xl': '8rem',
46
+ };
47
+
48
+ export const fontWeights: Record<FontWeightToken, string> = {
49
+ 'thin': '100',
50
+ 'extralight': '200',
51
+ 'light': '300',
52
+ 'normal': '400',
53
+ 'medium': '500',
54
+ 'semibold': '600',
55
+ 'bold': '700',
56
+ 'extrabold': '800',
57
+ 'black': '900',
58
+ };
59
+
60
+ export const lineHeights: Record<FontSizeToken, string> = {
61
+ 'xs': '1rem',
62
+ 'sm': '1.25rem',
63
+ 'base': '1.5rem',
64
+ 'lg': '1.75rem',
65
+ 'xl': '1.75rem',
66
+ '2xl': '2rem',
67
+ '3xl': '2.25rem',
68
+ '4xl': '2.5rem',
69
+ '5xl': '1',
70
+ '6xl': '1',
71
+ '7xl': '1',
72
+ '8xl': '1',
73
+ '9xl': '1',
74
+ };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Component Types
3
+ * @description Common component prop types
4
+ */
5
+
6
+ import type { ReactNode } from 'react';
7
+
8
+ export type SizeVariant = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
9
+ export type ColorVariant = 'primary' | 'secondary' | 'success' | 'warning' | 'destructive';
10
+ export type ColorScheme = 'light' | 'dark';
11
+
12
+ export interface BaseProps {
13
+ className?: string;
14
+ id?: string;
15
+ }
16
+
17
+ export interface ChildrenProps {
18
+ children: ReactNode;
19
+ }
20
+
21
+ export interface PolymorphicProps {
22
+ as?: React.ElementType;
23
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Domain Types
3
+ * @description Central type exports
4
+ * Subpath: @umituz/web-design-system/types
5
+ */
6
+
7
+ export type {
8
+ SizeVariant,
9
+ ColorVariant,
10
+ ColorScheme,
11
+ BaseProps,
12
+ ChildrenProps,
13
+ PolymorphicProps,
14
+ } from './component.types';