@donkit-ai/design-system 0.3.4 → 0.4.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 (45) hide show
  1. package/dist/index.cjs.js +22 -0
  2. package/dist/index.es.js +1105 -0
  3. package/dist/tokens.css +1 -0
  4. package/package.json +15 -9
  5. package/src/components/Accordion.css +0 -70
  6. package/src/components/Accordion.jsx +0 -42
  7. package/src/components/Alert.css +0 -93
  8. package/src/components/Alert.jsx +0 -47
  9. package/src/components/Badge.css +0 -52
  10. package/src/components/Badge.jsx +0 -25
  11. package/src/components/Button.css +0 -103
  12. package/src/components/Button.jsx +0 -80
  13. package/src/components/Card.css +0 -46
  14. package/src/components/Card.jsx +0 -70
  15. package/src/components/Checkbox.css +0 -88
  16. package/src/components/Checkbox.jsx +0 -47
  17. package/src/components/Code.css +0 -30
  18. package/src/components/Code.jsx +0 -27
  19. package/src/components/CodeAccordion.css +0 -80
  20. package/src/components/CodeAccordion.jsx +0 -42
  21. package/src/components/Input.css +0 -163
  22. package/src/components/Input.jsx +0 -55
  23. package/src/components/Link.css +0 -18
  24. package/src/components/Link.jsx +0 -21
  25. package/src/components/Modal.css +0 -70
  26. package/src/components/Modal.jsx +0 -72
  27. package/src/components/Radio.css +0 -115
  28. package/src/components/Radio.jsx +0 -42
  29. package/src/components/Select.css +0 -167
  30. package/src/components/Select.jsx +0 -118
  31. package/src/components/Stepper.css +0 -183
  32. package/src/components/Stepper.jsx +0 -104
  33. package/src/components/Tabs.css +0 -87
  34. package/src/components/Tabs.jsx +0 -81
  35. package/src/components/Textarea.css +0 -116
  36. package/src/components/Textarea.jsx +0 -41
  37. package/src/components/Toggle.css +0 -133
  38. package/src/components/Toggle.jsx +0 -38
  39. package/src/components/Tooltip.css +0 -134
  40. package/src/components/Tooltip.jsx +0 -148
  41. package/src/components/Typography.css +0 -74
  42. package/src/components/Typography.jsx +0 -42
  43. package/src/index.js +0 -24
  44. package/src/styles/iconSizes.js +0 -15
  45. package/src/styles/tokens.css +0 -298
@@ -1,298 +0,0 @@
1
- /* =====================================
2
- * Donkit Design System - Design Tokens
3
- * ===================================*/
4
-
5
- /* CSS Variables - must be in base layer to be available everywhere */
6
- @layer base {
7
- :root {
8
- /* =====================================
9
- * 1) Colors: primitives + dark semantic
10
- * ===================================*/
11
- /* Color primitives - white */
12
- --color-white: #FFFAFA;
13
- --color-white-95: rgba(255, 250, 250, 0.95);
14
- --color-white-92: rgba(255, 250, 250, 0.92);
15
- --color-white-65: rgba(255, 250, 250, 0.65);
16
- --color-white-50: rgba(255, 250, 250, 0.5);
17
- --color-white-40: rgba(255, 250, 250, 0.4);
18
- --color-white-20: rgba(255, 250, 250, 0.2);
19
- --color-white-15: rgba(255, 250, 250, 0.15);
20
- --color-white-13: rgba(255, 250, 250, 0.13);
21
- --color-white-06: rgba(255, 250, 250, 0.06);
22
-
23
- /* Color primitives - black */
24
- --color-black: #0E0F11;
25
- --color-black-95: rgba(14, 15, 17, 0.95);
26
- --color-black-65: rgba(14, 15, 17, 0.65);
27
- --color-black-60: rgba(14, 15, 17, 0.6);
28
- --color-black-50: rgba(14, 15, 17, 0.5);
29
- --color-black-40: rgba(14, 15, 17, 0.4);
30
- --color-black-20: rgba(14, 15, 17, 0.2);
31
- --color-black-10: rgba(14, 15, 17, 0.1);
32
- --color-black-08: rgba(14, 15, 17, 0.08);
33
- --color-black-04: rgba(14, 15, 17, 0.04);
34
-
35
- /* Color primitives - brand/accent */
36
- --color-red: #EA6464;
37
- --color-red-90: rgba(234, 100, 100, 0.9);
38
- --color-red-10: rgba(234, 100, 100, 0.1);
39
-
40
- /* Color semantics - status/feedback (bright for dark theme) */
41
- --color-info: #60A5FA;
42
- --color-info-15: rgba(96, 165, 250, 0.15);
43
- --color-success: #00C86E;
44
- --color-success-15: rgba(0, 200, 110, 0.15);
45
- --color-warning: #FFBB00;
46
- --color-warning-15: rgba(255, 187, 0, 0.15);
47
- --color-error: #FF1200;
48
- --color-error-15: rgba(255, 18, 0, 0.15);
49
-
50
- /* Status colors - dark versions for light theme */
51
- --color-info-dark: #2563EB;
52
- --color-info-dark-15: rgba(37, 99, 235, 0.15);
53
- --color-success-dark: #00A055;
54
- --color-success-dark-15: rgba(0, 160, 85, 0.15);
55
- --color-warning-dark: #D97706;
56
- --color-warning-dark-15: rgba(217, 119, 6, 0.15);
57
- --color-error-dark: #DC2626;
58
- --color-error-dark-15: rgba(220, 38, 38, 0.15);
59
-
60
- /* Legacy naming - deprecated but kept for backwards compatibility */
61
- --color-neutral: var(--color-warning);
62
- --color-neutral-10: var(--color-warning-15);
63
- --color-error-10: var(--color-error-15);
64
- --color-success-10: var(--color-success-15);
65
-
66
- /* Color semantics - theme (dark default) */
67
- --color-bg: var(--color-black);
68
- --color-border: var(--color-white-20);
69
- --color-border-hover: var(--color-white-40);
70
- --color-border-selected: var(--color-white-50);
71
- --color-txt-icon-1: var(--color-white-92);
72
- --color-txt-icon-2: var(--color-white-65);
73
- --color-accent: var(--color-red);
74
- --color-accent-hover: var(--color-red-90);
75
- --color-item-bg: var(--color-white-06);
76
- --color-item-bg-selected: var(--color-white-06);
77
- --color-item-bg-hover: var(--color-white-13);
78
- --color-code-bg: var(--color-white-15);
79
- --color-overlay: var(--color-black-65);
80
-
81
- /* Status colors - adaptive (bright for dark theme) */
82
- --color-status-info: var(--color-info);
83
- --color-status-info-bg: var(--color-info-dark-15); /* темный фон для темной темы */
84
- --color-status-success: var(--color-success);
85
- --color-status-success-bg: var(--color-success-dark-15);
86
- --color-status-warning: var(--color-warning);
87
- --color-status-warning-bg: var(--color-warning-dark-15);
88
- --color-status-error: var(--color-error);
89
- --color-status-error-bg: var(--color-error-dark-15);
90
- }
91
-
92
- [data-theme="light"] {
93
- /* Color semantics - theme (light) */
94
- --color-bg: var(--color-white);
95
- --color-border: var(--color-black-20);
96
- --color-border-hover: var(--color-black-40);
97
- --color-border-selected: var(--color-black-50);
98
- --color-txt-icon-1: var(--color-black-95);
99
- --color-txt-icon-2: var(--color-black-65);
100
- --color-accent: var(--color-red);
101
- --color-accent-hover: var(--color-red-90);
102
- --color-item-bg: var(--color-black-04);
103
- --color-item-bg-selected: var(--color-black-04);
104
- --color-item-bg-hover: var(--color-black-08);
105
- --color-code-bg: var(--color-black-10);
106
- --color-overlay: var(--color-black-60);
107
-
108
- /* Status colors - adaptive (dark for light theme) */
109
- --color-status-info: var(--color-info-dark);
110
- --color-status-info-bg: var(--color-info-15); /* светлый фон для светлой темы */
111
- --color-status-success: var(--color-success-dark);
112
- --color-status-success-bg: var(--color-success-15);
113
- --color-status-warning: var(--color-warning-dark);
114
- --color-status-warning-bg: var(--color-warning-15);
115
- --color-status-error: var(--color-error-dark);
116
- --color-status-error-bg: var(--color-error-15);
117
- }
118
-
119
- :root {
120
- /* =====================================
121
- * 2) Breakpoints
122
- * ===================================*/
123
- --breakpoint-mobile: 375px;
124
- --breakpoint-tablet: 768px;
125
- --breakpoint-desktop: 1280px;
126
- }
127
-
128
- :root {
129
- /* =====================================
130
- * 3) Spacing scale (mobile/tablet/desktop)
131
- * ===================================*/
132
- /* Mobile (default) */
133
- --space-xs: 8px;
134
- --space-s: 12px;
135
- --space-m: 16px;
136
- --space-l: 24px;
137
- --space-xl: 32px;
138
- }
139
-
140
- @media (min-width: 768px) {
141
- :root {
142
- /* Tablet */
143
- --space-xs: 8px;
144
- --space-s: 16px;
145
- --space-m: 20px;
146
- --space-l: 28px;
147
- --space-xl: 40px;
148
- }
149
- }
150
-
151
- @media (min-width: 1280px) {
152
- :root {
153
- /* Desktop */
154
- --space-xs: 8px;
155
- --space-s: 16px;
156
- --space-m: 24px;
157
- --space-l: 32px;
158
- --space-xl: 48px;
159
- }
160
- }
161
-
162
- :root {
163
- /* =====================================
164
- * 4) Border radius
165
- * ===================================*/
166
- --radius-xs: 4px;
167
- --radius-s: 6px;
168
- }
169
-
170
- :root {
171
- /* =====================================
172
- * 5) Component heights
173
- * ===================================*/
174
- --height-xs: 24px;
175
- --height-s: 32px;
176
- --height-m: 44px;
177
- --height-l: 56px;
178
-
179
- /* Icon sizes */
180
- --icon-xs: 16px;
181
- --icon-s: 20px;
182
- --icon-m: 24px;
183
- --icon-l: 28px;
184
- --icon-xl: 48px;
185
- }
186
-
187
- :root {
188
- /* =====================================
189
- * 6) Typography scale (mobile/tablet/desktop)
190
- * ===================================*/
191
- /* Base typography settings */
192
- font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
193
- line-height: 1.5;
194
- font-weight: 400;
195
-
196
- /* Mobile (default) */
197
- --font-size-h1: 32px;
198
- --font-size-h2: 28px;
199
- --font-size-h3: 24px;
200
- --font-size-h4: 20px;
201
- --font-size-p1: 16px;
202
- --font-size-p2: 14px;
203
- --font-size-p3: 12px;
204
-
205
- /* Letter spacing (tracking) for small font sizes */
206
- --letter-spacing-h1: 0;
207
- --letter-spacing-h2: 0;
208
- --letter-spacing-h3: 0;
209
- --letter-spacing-h4: 0; /* 20px → no tracking */
210
- --letter-spacing-p1: 0.02em; /* 16px → +2% */
211
- --letter-spacing-p2: 0.04em; /* 14px → +4% */
212
- --letter-spacing-p3: 0.06em; /* 12px → +6% */
213
- }
214
-
215
- @media (min-width: 768px) {
216
- :root {
217
- /* Tablet */
218
- --font-size-h1: 40px;
219
- --font-size-h2: 36px;
220
- --font-size-h3: 28px;
221
- --font-size-h4: 24px;
222
- --font-size-p1: 18px;
223
- --font-size-p2: 16px;
224
- --font-size-p3: 14px;
225
-
226
- --letter-spacing-h4: 0; /* 24px → no tracking */
227
- --letter-spacing-p1: 0.02em; /* 18px → +2% */
228
- --letter-spacing-p2: 0.02em; /* 16px → +2% */
229
- --letter-spacing-p3: 0.04em; /* 14px → +4% */
230
- }
231
- }
232
-
233
- @media (min-width: 1280px) {
234
- :root {
235
- /* Desktop */
236
- --font-size-h1: 40px;
237
- --font-size-h2: 36px;
238
- --font-size-h3: 28px;
239
- --font-size-h4: 24px;
240
- --font-size-p1: 18px;
241
- --font-size-p2: 16px;
242
- --font-size-p3: 14px;
243
-
244
- --letter-spacing-h4: 0; /* 24px → no tracking */
245
- --letter-spacing-p1: 0.02em; /* 18px → +2% */
246
- --letter-spacing-p2: 0.02em; /* 16px → +2% */
247
- --letter-spacing-p3: 0.04em; /* 14px → +4% */
248
- }
249
- }
250
-
251
- :root {
252
- /* =====================================
253
- * 7) Additional layout tokens
254
- * ===================================*/
255
- /* Mobile (default) */
256
- --page-padding-hor: 16px;
257
- --page-padding-vert: 32px;
258
- --page-header-height: 64px;
259
-
260
- /* Transitions */
261
- --transition-fast: 0.15s ease;
262
- --transition-normal: 0.2s ease;
263
- --transition-slow: 0.3s ease;
264
- }
265
-
266
- @media (min-width: 768px) {
267
- :root {
268
- /* Tablet */
269
- --page-padding-hor: 20px;
270
- --page-padding-vert: 48px;
271
- --page-header-height: 72px;
272
- }
273
- }
274
-
275
- @media (min-width: 1280px) {
276
- :root {
277
- /* Desktop */
278
- --page-padding-hor: 24px;
279
- --page-padding-vert: 64px;
280
- --page-header-height: 72px;
281
- }
282
- }
283
-
284
- body {
285
- margin: 0;
286
- min-width: 320px;
287
- min-height: 100vh;
288
- -webkit-font-smoothing: antialiased;
289
- -moz-osx-font-smoothing: grayscale;
290
- background-color: var(--color-bg);
291
- color: var(--color-txt-icon-1);
292
- transition: background-color var(--transition-slow), color var(--transition-slow);
293
- }
294
-
295
- * {
296
- box-sizing: border-box;
297
- }
298
- }