@o2project/design-system 1.1.0 → 1.2.1
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/CHANGELOG.md +20 -0
- package/README.md +4 -4
- package/main.css +84 -46
- package/package.json +1 -1
- package/docs/COLOR_SCHEME.md +0 -121
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## [1.2.1](https://github.com/o2project/design-system/compare/v1.2.0...v1.2.1) (2026-01-06)
|
|
2
|
+
|
|
3
|
+
### 🐛 Bug Fixes
|
|
4
|
+
|
|
5
|
+
* apply color scheme to main.css ([2174d15](https://github.com/o2project/design-system/commit/2174d157cb5635efdf45f951ba2152a8a9b799bb))
|
|
6
|
+
|
|
7
|
+
### 📚 Some changes
|
|
8
|
+
|
|
9
|
+
* remove old color scheme document ([73b6872](https://github.com/o2project/design-system/commit/73b68728b807d42a12f3165316390b3609cd41a8))
|
|
10
|
+
|
|
11
|
+
## [1.2.0](https://github.com/o2project/design-system/compare/v1.1.0...v1.2.0) (2026-01-06)
|
|
12
|
+
|
|
13
|
+
### ✨ Features
|
|
14
|
+
|
|
15
|
+
* introduce color tokens ([9ac632a](https://github.com/o2project/design-system/commit/9ac632a2822009ab8d4f51d415d93839fb75fc6b))
|
|
16
|
+
|
|
17
|
+
### 📚 Some changes
|
|
18
|
+
|
|
19
|
+
* update README ([f89fde9](https://github.com/o2project/design-system/commit/f89fde9c720b75eba2234a3531e544f1df945763))
|
|
20
|
+
|
|
1
21
|
## [1.1.0](https://github.com/o2project/design-system/compare/v1.0.2...v1.1.0) (2025-11-09)
|
|
2
22
|
|
|
3
23
|
### ✨ Features
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# design-system
|
|
2
2
|
|
|
3
|
-
Design system for O2 Project
|
|
3
|
+
Design system for O2 Project.
|
|
4
4
|
|
|
5
5
|
## 🚀 Getting Started
|
|
6
6
|
|
|
@@ -41,7 +41,7 @@ The static files will be generated in the `storybook-static/` directory.
|
|
|
41
41
|
|
|
42
42
|
Components are organized in the `src/components/` directory with their stories collocated in the same directory:
|
|
43
43
|
|
|
44
|
-
```
|
|
44
|
+
```text
|
|
45
45
|
src/
|
|
46
46
|
└── components/
|
|
47
47
|
├── Card/
|
|
@@ -106,11 +106,11 @@ Storybook automatically generates documentation for your components. Add JSDoc c
|
|
|
106
106
|
/**
|
|
107
107
|
* Primary UI component for user interaction
|
|
108
108
|
*/
|
|
109
|
-
export const Button = ({
|
|
109
|
+
export const Button = ({
|
|
110
110
|
/** Button text */
|
|
111
111
|
label,
|
|
112
112
|
/** Visual style variant */
|
|
113
|
-
variant = 'primary'
|
|
113
|
+
variant = 'primary',
|
|
114
114
|
}) => {
|
|
115
115
|
// ...
|
|
116
116
|
};
|
package/main.css
CHANGED
|
@@ -1,49 +1,87 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import 'tailwindcss';
|
|
2
2
|
|
|
3
3
|
@theme {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
4
|
+
/* Primary colors */
|
|
5
|
+
--color-primary-tks-yellow: #ffe65e;
|
|
6
|
+
--color-primary-tks-green: #396039;
|
|
7
|
+
--color-primary-tks-blue: #005895;
|
|
8
|
+
|
|
9
|
+
/* Blue scale */
|
|
10
|
+
--color-blue-50: #e7f0f8;
|
|
11
|
+
--color-blue-100: #d2e0ee;
|
|
12
|
+
--color-blue-200: #a8c1da;
|
|
13
|
+
--color-blue-300: #7fa2c6;
|
|
14
|
+
--color-blue-400: #5385b4;
|
|
15
|
+
--color-blue-500: #005895;
|
|
16
|
+
--color-blue-600: #004a82;
|
|
17
|
+
--color-blue-700: #003c6b;
|
|
18
|
+
--color-blue-800: #002a4e;
|
|
19
|
+
--color-blue-900: #001c35;
|
|
20
|
+
--color-blue-950: #000c1b;
|
|
21
|
+
|
|
22
|
+
/* Green scale */
|
|
23
|
+
--color-green-50: #ebf0ea;
|
|
24
|
+
--color-green-100: #d6e2d6;
|
|
25
|
+
--color-green-200: #b1c4b0;
|
|
26
|
+
--color-green-300: #8ca78b;
|
|
27
|
+
--color-green-400: #698b68;
|
|
28
|
+
--color-green-500: #396039;
|
|
29
|
+
--color-green-600: #2d522d;
|
|
30
|
+
--color-green-700: #234423;
|
|
31
|
+
--color-green-800: #163017;
|
|
32
|
+
--color-green-900: #0d200d;
|
|
33
|
+
--color-green-950: #040e04;
|
|
34
|
+
|
|
35
|
+
/* Yellow scale */
|
|
36
|
+
--color-yellow-50: #fdf6d8;
|
|
37
|
+
--color-yellow-100: #ffefb2;
|
|
38
|
+
--color-yellow-200: #ffe671;
|
|
39
|
+
--color-yellow-300: #edcc48;
|
|
40
|
+
--color-yellow-400: #caac2f;
|
|
41
|
+
--color-yellow-500: #a78d1e;
|
|
42
|
+
--color-yellow-600: #86700a;
|
|
43
|
+
--color-yellow-700: #665400;
|
|
44
|
+
--color-yellow-800: #473900;
|
|
45
|
+
--color-yellow-900: #312802;
|
|
46
|
+
--color-yellow-950: #201a03;
|
|
47
|
+
|
|
48
|
+
/* Red scale */
|
|
49
|
+
--color-red-50: #fceae8;
|
|
50
|
+
--color-red-100: #f8d4d1;
|
|
51
|
+
--color-red-200: #febab4;
|
|
52
|
+
--color-red-300: #fa8880;
|
|
53
|
+
--color-red-400: #ff645f;
|
|
54
|
+
--color-red-500: #fa3d42;
|
|
55
|
+
--color-red-600: #d01c29;
|
|
56
|
+
--color-red-700: #a20519;
|
|
57
|
+
--color-red-800: #72020e;
|
|
58
|
+
--color-red-900: #4f0a0d;
|
|
59
|
+
--color-red-950: #340909;
|
|
60
|
+
|
|
61
|
+
/* Monotone scale */
|
|
62
|
+
--color-monotone-brightest: #fcfcfc;
|
|
63
|
+
--color-monotone-darkest: #1b1b1b;
|
|
64
|
+
--color-monotone-100: #d7d7d7;
|
|
65
|
+
--color-monotone-200: #b4b4b4;
|
|
66
|
+
--color-monotone-300: #929292;
|
|
67
|
+
--color-monotone-400: #717171;
|
|
68
|
+
--color-monotone-500: #525252;
|
|
69
|
+
--color-monotone-600: #353535;
|
|
70
|
+
|
|
71
|
+
/* Action colors */
|
|
72
|
+
--color-action-like: #fa3d42;
|
|
73
|
+
|
|
74
|
+
/* Light mode semantic colors */
|
|
75
|
+
--color-neutral-background: #fcfcfc;
|
|
76
|
+
--color-neutral-text: #1b1b1b;
|
|
77
|
+
--color-neutral-text-sub: #717171;
|
|
78
|
+
--color-neutral-border: #525252;
|
|
79
|
+
|
|
80
|
+
@media (prefers-color-scheme: dark) {
|
|
81
|
+
/* Dark mode semantic colors */
|
|
82
|
+
--color-neutral-background: #1b1b1b;
|
|
83
|
+
--color-neutral-text: #fcfcfc;
|
|
84
|
+
--color-neutral-text-sub: #b4b4b4;
|
|
85
|
+
--color-neutral-border: #525252;
|
|
86
|
+
}
|
|
49
87
|
}
|
package/package.json
CHANGED
package/docs/COLOR_SCHEME.md
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
# O2 Project Design System - Color Scheme
|
|
2
|
-
|
|
3
|
-
This document defines the color schemes used in the O2 Project design system.
|
|
4
|
-
|
|
5
|
-
## Base Color Palette
|
|
6
|
-
|
|
7
|
-
The design system includes four base color palettes, each with 8 shades (100-800):
|
|
8
|
-
|
|
9
|
-
### Blue
|
|
10
|
-
Primary brand color with 8 shades from light to dark.
|
|
11
|
-
|
|
12
|
-
- `blue-100`: #0086ed
|
|
13
|
-
- `blue-200`: #0076d1
|
|
14
|
-
- `blue-300`: #0067b5
|
|
15
|
-
- `blue-400`: #005799
|
|
16
|
-
- `blue-500`: #00477d
|
|
17
|
-
- `blue-600`: #003760
|
|
18
|
-
- `blue-700`: #002745
|
|
19
|
-
- `blue-800`: #001729
|
|
20
|
-
|
|
21
|
-
### Beige
|
|
22
|
-
Neutral warm tone with 8 shades.
|
|
23
|
-
|
|
24
|
-
- `beige-100`: #ebe8ce
|
|
25
|
-
- `beige-200`: #d1cfb8
|
|
26
|
-
- `beige-300`: #b8b5a2
|
|
27
|
-
- `beige-400`: #9e9c8b
|
|
28
|
-
- `beige-500`: #858475
|
|
29
|
-
- `beige-600`: #69675c
|
|
30
|
-
- `beige-700`: #4a4940
|
|
31
|
-
- `beige-800`: #2b2b27
|
|
32
|
-
|
|
33
|
-
### Yellow
|
|
34
|
-
Accent color with 8 shades.
|
|
35
|
-
|
|
36
|
-
- `yellow-100`: #f0e800
|
|
37
|
-
- `yellow-200`: #d4cd00
|
|
38
|
-
- `yellow-300`: #b8b100
|
|
39
|
-
- `yellow-400`: #9c9600
|
|
40
|
-
- `yellow-500`: #807b00
|
|
41
|
-
- `yellow-600`: #636000
|
|
42
|
-
- `yellow-700`: #474500
|
|
43
|
-
- `yellow-800`: #2b2a00
|
|
44
|
-
|
|
45
|
-
### Monotone
|
|
46
|
-
Grayscale palette with 8 shades.
|
|
47
|
-
|
|
48
|
-
- `monotone-100`: #fafafa
|
|
49
|
-
- `monotone-200`: #d6d6d6
|
|
50
|
-
- `monotone-300`: #bababa
|
|
51
|
-
- `monotone-400`: #9e9e9e
|
|
52
|
-
- `monotone-500`: #828282
|
|
53
|
-
- `monotone-600`: #636363
|
|
54
|
-
- `monotone-700`: #474747
|
|
55
|
-
- `monotone-800`: #1a1a1a
|
|
56
|
-
|
|
57
|
-
## Semantic Color Tokens
|
|
58
|
-
|
|
59
|
-
Semantic tokens provide meaning and intent to colors, making it easier to maintain consistency across the design system.
|
|
60
|
-
|
|
61
|
-
### Primary Colors
|
|
62
|
-
|
|
63
|
-
Colors used for primary brand elements and key UI components.
|
|
64
|
-
|
|
65
|
-
- **main**: `blue-600` (#003760) - Primary brand color for main CTAs and important elements
|
|
66
|
-
- **sub**: `beige-500` (#858475) - Secondary color for supporting elements
|
|
67
|
-
- **accent**: `yellow-200` (#d4cd00) - Accent color for highlights and emphasis
|
|
68
|
-
|
|
69
|
-
### Neutral Colors
|
|
70
|
-
|
|
71
|
-
Colors used for backgrounds, text, and borders.
|
|
72
|
-
|
|
73
|
-
- **background**: `monotone-100` (#fafafa) - Default background color
|
|
74
|
-
- **text-main**: `monotone-800` (#1a1a1a) - Primary text color for headings and body text
|
|
75
|
-
- **text-sub**: `monotone-600` (#636363) - Secondary text color for less prominent text
|
|
76
|
-
- **link**: `blue-200` (#0076d1) - Color for links and interactive text
|
|
77
|
-
- **border**: `monotone-400` (#9e9e9e) - Default border color for components
|
|
78
|
-
|
|
79
|
-
## Usage in Tailwind CSS
|
|
80
|
-
|
|
81
|
-
You can use these colors in your components with Tailwind's utility classes:
|
|
82
|
-
|
|
83
|
-
### Base Colors
|
|
84
|
-
```jsx
|
|
85
|
-
<div className="bg-blue-600 text-white">Primary Button</div>
|
|
86
|
-
<p className="text-monotone-800">Main text content</p>
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### Semantic Tokens
|
|
90
|
-
```jsx
|
|
91
|
-
<div className="bg-primary-main text-white">Primary Button</div>
|
|
92
|
-
<p className="text-neutral-text-main">Main text content</p>
|
|
93
|
-
<a className="text-neutral-link">Link text</a>
|
|
94
|
-
<div className="border border-neutral-border">Card component</div>
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
## TypeScript Usage
|
|
98
|
-
|
|
99
|
-
When using TypeScript with Tailwind, these colors are available in your components:
|
|
100
|
-
|
|
101
|
-
```tsx
|
|
102
|
-
interface ButtonProps {
|
|
103
|
-
variant?: 'primary' | 'secondary';
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export const Button: React.FC<ButtonProps> = ({ variant = 'primary' }) => {
|
|
107
|
-
const baseClasses = variant === 'primary'
|
|
108
|
-
? 'bg-primary-main text-white'
|
|
109
|
-
: 'bg-neutral-background text-neutral-text-main border border-neutral-border';
|
|
110
|
-
|
|
111
|
-
return <button className={baseClasses}>Click me</button>;
|
|
112
|
-
};
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
## Best Practices
|
|
116
|
-
|
|
117
|
-
1. **Use semantic tokens** whenever possible instead of base colors for better maintainability
|
|
118
|
-
2. **Primary colors** should be used for CTAs and important interactive elements
|
|
119
|
-
3. **Neutral colors** should be used for text, backgrounds, and borders
|
|
120
|
-
4. **Maintain contrast ratios** for accessibility (WCAG AA minimum 4.5:1 for normal text)
|
|
121
|
-
5. **Test colors** in both light and dark contexts to ensure readability
|