elementdrawing 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.
- package/LICENSE +21 -0
- package/dist/elementdrawing.min.js +3 -0
- package/dist/elementdrawing.min.js.LICENSE.txt +8 -0
- package/dist/elementdrawing.min.js.map +1 -0
- package/dist/index.html +1 -0
- package/package.json +127 -0
- package/src/core/bridge.h +855 -0
- package/src/core/diff.c +900 -0
- package/src/core/element.c +1078 -0
- package/src/core/event.c +813 -0
- package/src/core/fiber.c +1027 -0
- package/src/core/hooks.c +919 -0
- package/src/core/renderer.c +963 -0
- package/src/core/scheduler.c +702 -0
- package/src/core/state.c +803 -0
- package/src/css/animations.css +779 -0
- package/src/css/base.css +615 -0
- package/src/css/components.css +1311 -0
- package/src/css/tailwind.css +370 -0
- package/src/css/themes.css +517 -0
- package/src/css/utilities.css +475 -0
- package/src/index.js +746 -0
- package/src/js/animation.js +655 -0
- package/src/js/dom.js +665 -0
- package/src/js/events.js +585 -0
- package/src/js/http.js +446 -0
- package/src/js/index.js +26 -0
- package/src/js/router.js +483 -0
- package/src/js/store.js +539 -0
- package/src/js/utils.js +593 -0
- package/src/js/validator.js +529 -0
- package/src/jsx/components/Accordion.jsx +210 -0
- package/src/jsx/components/Alert.jsx +169 -0
- package/src/jsx/components/Avatar.jsx +214 -0
- package/src/jsx/components/Badge.jsx +136 -0
- package/src/jsx/components/Breadcrumb.jsx +200 -0
- package/src/jsx/components/Button.jsx +188 -0
- package/src/jsx/components/Card.jsx +192 -0
- package/src/jsx/components/Carousel.jsx +278 -0
- package/src/jsx/components/Checkbox.jsx +215 -0
- package/src/jsx/components/Dialog.jsx +242 -0
- package/src/jsx/components/Drawer.jsx +190 -0
- package/src/jsx/components/Dropdown.jsx +268 -0
- package/src/jsx/components/Form.jsx +274 -0
- package/src/jsx/components/Input.jsx +285 -0
- package/src/jsx/components/Menu.jsx +276 -0
- package/src/jsx/components/Modal.jsx +274 -0
- package/src/jsx/components/Navbar.jsx +292 -0
- package/src/jsx/components/Pagination.jsx +268 -0
- package/src/jsx/components/Progress.jsx +252 -0
- package/src/jsx/components/Radio.jsx +208 -0
- package/src/jsx/components/Select.jsx +397 -0
- package/src/jsx/components/Sidebar.jsx +250 -0
- package/src/jsx/components/Slider.jsx +310 -0
- package/src/jsx/components/Spinner.jsx +198 -0
- package/src/jsx/components/Switch.jsx +201 -0
- package/src/jsx/components/Table.jsx +332 -0
- package/src/jsx/components/Tabs.jsx +227 -0
- package/src/jsx/components/Textarea.jsx +212 -0
- package/src/jsx/components/Toast.jsx +270 -0
- package/src/jsx/components/Tooltip.jsx +178 -0
- package/src/jsx/components/Typography.jsx +299 -0
- package/src/jsx/components/index.jsx +70 -0
- package/src/jsx/core/element.js +3 -0
- package/src/jsx/hooks/index.js +356 -0
- package/src/jsx/hooks/useCallback.js +472 -0
- package/src/jsx/hooks/useContext.js +586 -0
- package/src/jsx/hooks/useEffect.js +704 -0
- package/src/jsx/hooks/useLayoutEffect.js +508 -0
- package/src/jsx/hooks/useMemo.js +689 -0
- package/src/jsx/hooks/useReducer.js +729 -0
- package/src/jsx/hooks/useRef.js +542 -0
- package/src/jsx/hooks/useState.js +854 -0
- package/src/jsx/runtime/commit.js +903 -0
- package/src/jsx/runtime/createElement.js +860 -0
- package/src/jsx/runtime/index.js +356 -0
- package/src/jsx/runtime/reconcile.js +687 -0
- package/src/jsx/runtime/render.js +914 -0
|
@@ -0,0 +1,517 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ElementDrawing Framework - Themes CSS
|
|
3
|
+
* Theme definitions: light theme, dark theme, custom color themes,
|
|
4
|
+
* CSS custom properties for theming, and theme switching support.
|
|
5
|
+
*
|
|
6
|
+
* @version 1.0.0
|
|
7
|
+
* @license MIT
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/* ─── Light Theme (Default) ────────────────────────────────────────────────── */
|
|
11
|
+
|
|
12
|
+
:root,
|
|
13
|
+
[data-theme="light"],
|
|
14
|
+
.ed-theme-light {
|
|
15
|
+
/* ── Primary Colors ── */
|
|
16
|
+
--ed-primary: #3b82f6;
|
|
17
|
+
--ed-primary-hover: #2563eb;
|
|
18
|
+
--ed-primary-active: #1d4ed8;
|
|
19
|
+
--ed-primary-light: #eff6ff;
|
|
20
|
+
--ed-primary-dark: #1e40af;
|
|
21
|
+
|
|
22
|
+
/* ── Secondary Colors ── */
|
|
23
|
+
--ed-secondary: #8b5cf6;
|
|
24
|
+
--ed-secondary-hover: #7c3aed;
|
|
25
|
+
--ed-secondary-active: #6d28d9;
|
|
26
|
+
--ed-secondary-light: #f5f3ff;
|
|
27
|
+
--ed-secondary-dark: #5b21b6;
|
|
28
|
+
|
|
29
|
+
/* ── Accent Colors ── */
|
|
30
|
+
--ed-accent: #06b6d4;
|
|
31
|
+
--ed-accent-hover: #0891b2;
|
|
32
|
+
--ed-accent-light: #ecfeff;
|
|
33
|
+
|
|
34
|
+
/* ── Semantic Colors ── */
|
|
35
|
+
--ed-success: #22c55e;
|
|
36
|
+
--ed-success-hover: #16a34a;
|
|
37
|
+
--ed-success-light: #f0fdf4;
|
|
38
|
+
|
|
39
|
+
--ed-warning: #f59e0b;
|
|
40
|
+
--ed-warning-hover: #d97706;
|
|
41
|
+
--ed-warning-light: #fffbeb;
|
|
42
|
+
|
|
43
|
+
--ed-danger: #ef4444;
|
|
44
|
+
--ed-danger-hover: #dc2626;
|
|
45
|
+
--ed-danger-light: #fef2f2;
|
|
46
|
+
|
|
47
|
+
--ed-info: #0ea5e9;
|
|
48
|
+
--ed-info-hover: #0284c7;
|
|
49
|
+
--ed-info-light: #f0f9ff;
|
|
50
|
+
|
|
51
|
+
/* ── Background Colors ── */
|
|
52
|
+
--ed-bg-primary: #ffffff;
|
|
53
|
+
--ed-bg-secondary: #f9fafb;
|
|
54
|
+
--ed-bg-tertiary: #f3f4f6;
|
|
55
|
+
--ed-bg-inverse: #111827;
|
|
56
|
+
--ed-bg-overlay: rgba(0, 0, 0, 0.5);
|
|
57
|
+
|
|
58
|
+
/* ── Text Colors ── */
|
|
59
|
+
--ed-text-primary: #111827;
|
|
60
|
+
--ed-text-secondary: #4b5563;
|
|
61
|
+
--ed-text-tertiary: #9ca3af;
|
|
62
|
+
--ed-text-inverse: #ffffff;
|
|
63
|
+
--ed-text-link: #2563eb;
|
|
64
|
+
--ed-text-link-hover: #1d4ed8;
|
|
65
|
+
|
|
66
|
+
/* ── Border Colors ── */
|
|
67
|
+
--ed-border-primary: #e5e7eb;
|
|
68
|
+
--ed-border-secondary: #d1d5db;
|
|
69
|
+
--ed-border-focus: #3b82f6;
|
|
70
|
+
|
|
71
|
+
/* ── Component-Specific ── */
|
|
72
|
+
--ed-card-bg: #ffffff;
|
|
73
|
+
--ed-card-border: #e5e7eb;
|
|
74
|
+
--ed-modal-bg: #ffffff;
|
|
75
|
+
--ed-input-bg: #ffffff;
|
|
76
|
+
--ed-input-color: #111827;
|
|
77
|
+
--ed-input-border: #d1d5db;
|
|
78
|
+
--ed-input-focus-border: #3b82f6;
|
|
79
|
+
--ed-input-focus-ring: rgba(59, 130, 246, 0.15);
|
|
80
|
+
--ed-input-placeholder: #9ca3af;
|
|
81
|
+
--ed-input-disabled-bg: #f3f4f6;
|
|
82
|
+
|
|
83
|
+
/* ── Scrollbar Colors ── */
|
|
84
|
+
--ed-scrollbar-track: #f1f1f1;
|
|
85
|
+
--ed-scrollbar-thumb: #c1c1c1;
|
|
86
|
+
--ed-scrollbar-thumb-hover: #a0a0a0;
|
|
87
|
+
|
|
88
|
+
/* ── Focus Ring ── */
|
|
89
|
+
--ed-focus-ring: rgba(59, 130, 246, 0.4);
|
|
90
|
+
--ed-focus-ring-color: #3b82f6;
|
|
91
|
+
|
|
92
|
+
/* ── Selection ── */
|
|
93
|
+
--ed-selection-bg: rgba(59, 130, 246, 0.3);
|
|
94
|
+
--ed-selection-color: inherit;
|
|
95
|
+
|
|
96
|
+
/* ── Shadow Colors ── */
|
|
97
|
+
--ed-shadow-color: rgba(0, 0, 0, 0.1);
|
|
98
|
+
--ed-shadow-color-lg: rgba(0, 0, 0, 0.15);
|
|
99
|
+
|
|
100
|
+
color-scheme: light;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* ─── Dark Theme ───────────────────────────────────────────────────────────── */
|
|
104
|
+
|
|
105
|
+
[data-theme="dark"],
|
|
106
|
+
.ed-theme-dark {
|
|
107
|
+
/* ── Primary Colors ── */
|
|
108
|
+
--ed-primary: #60a5fa;
|
|
109
|
+
--ed-primary-hover: #3b82f6;
|
|
110
|
+
--ed-primary-active: #2563eb;
|
|
111
|
+
--ed-primary-light: #1e3a5f;
|
|
112
|
+
--ed-primary-dark: #93c5fd;
|
|
113
|
+
|
|
114
|
+
/* ── Secondary Colors ── */
|
|
115
|
+
--ed-secondary: #a78bfa;
|
|
116
|
+
--ed-secondary-hover: #8b5cf6;
|
|
117
|
+
--ed-secondary-active: #7c3aed;
|
|
118
|
+
--ed-secondary-light: #2e1065;
|
|
119
|
+
--ed-secondary-dark: #c4b5fd;
|
|
120
|
+
|
|
121
|
+
/* ── Accent Colors ── */
|
|
122
|
+
--ed-accent: #22d3ee;
|
|
123
|
+
--ed-accent-hover: #06b6d4;
|
|
124
|
+
--ed-accent-light: #164e63;
|
|
125
|
+
|
|
126
|
+
/* ── Semantic Colors ── */
|
|
127
|
+
--ed-success: #4ade80;
|
|
128
|
+
--ed-success-hover: #22c55e;
|
|
129
|
+
--ed-success-light: #14532d;
|
|
130
|
+
|
|
131
|
+
--ed-warning: #fbbf24;
|
|
132
|
+
--ed-warning-hover: #f59e0b;
|
|
133
|
+
--ed-warning-light: #78350f;
|
|
134
|
+
|
|
135
|
+
--ed-danger: #f87171;
|
|
136
|
+
--ed-danger-hover: #ef4444;
|
|
137
|
+
--ed-danger-light: #7f1d1d;
|
|
138
|
+
|
|
139
|
+
--ed-info: #38bdf8;
|
|
140
|
+
--ed-info-hover: #0ea5e9;
|
|
141
|
+
--ed-info-light: #0c4a6e;
|
|
142
|
+
|
|
143
|
+
/* ── Background Colors ── */
|
|
144
|
+
--ed-bg-primary: #0f172a;
|
|
145
|
+
--ed-bg-secondary: #1e293b;
|
|
146
|
+
--ed-bg-tertiary: #334155;
|
|
147
|
+
--ed-bg-inverse: #f9fafb;
|
|
148
|
+
--ed-bg-overlay: rgba(0, 0, 0, 0.7);
|
|
149
|
+
|
|
150
|
+
/* ── Text Colors ── */
|
|
151
|
+
--ed-text-primary: #f1f5f9;
|
|
152
|
+
--ed-text-secondary: #94a3b8;
|
|
153
|
+
--ed-text-tertiary: #64748b;
|
|
154
|
+
--ed-text-inverse: #0f172a;
|
|
155
|
+
--ed-text-link: #60a5fa;
|
|
156
|
+
--ed-text-link-hover: #93c5fd;
|
|
157
|
+
|
|
158
|
+
/* ── Border Colors ── */
|
|
159
|
+
--ed-border-primary: #334155;
|
|
160
|
+
--ed-border-secondary: #475569;
|
|
161
|
+
--ed-border-focus: #60a5fa;
|
|
162
|
+
|
|
163
|
+
/* ── Component-Specific ── */
|
|
164
|
+
--ed-card-bg: #1e293b;
|
|
165
|
+
--ed-card-border: #334155;
|
|
166
|
+
--ed-modal-bg: #1e293b;
|
|
167
|
+
--ed-input-bg: #1e293b;
|
|
168
|
+
--ed-input-color: #f1f5f9;
|
|
169
|
+
--ed-input-border: #475569;
|
|
170
|
+
--ed-input-focus-border: #60a5fa;
|
|
171
|
+
--ed-input-focus-ring: rgba(96, 165, 250, 0.2);
|
|
172
|
+
--ed-input-placeholder: #64748b;
|
|
173
|
+
--ed-input-disabled-bg: #0f172a;
|
|
174
|
+
|
|
175
|
+
/* ── Scrollbar Colors ── */
|
|
176
|
+
--ed-scrollbar-track: #1e293b;
|
|
177
|
+
--ed-scrollbar-thumb: #475569;
|
|
178
|
+
--ed-scrollbar-thumb-hover: #64748b;
|
|
179
|
+
|
|
180
|
+
/* ── Focus Ring ── */
|
|
181
|
+
--ed-focus-ring: rgba(96, 165, 250, 0.4);
|
|
182
|
+
--ed-focus-ring-color: #60a5fa;
|
|
183
|
+
|
|
184
|
+
/* ── Selection ── */
|
|
185
|
+
--ed-selection-bg: rgba(96, 165, 250, 0.35);
|
|
186
|
+
--ed-selection-color: inherit;
|
|
187
|
+
|
|
188
|
+
/* ── Shadow Colors ── */
|
|
189
|
+
--ed-shadow-color: rgba(0, 0, 0, 0.3);
|
|
190
|
+
--ed-shadow-color-lg: rgba(0, 0, 0, 0.5);
|
|
191
|
+
|
|
192
|
+
color-scheme: dark;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* ─── Ocean Theme ──────────────────────────────────────────────────────────── */
|
|
196
|
+
|
|
197
|
+
[data-theme="ocean"],
|
|
198
|
+
.ed-theme-ocean {
|
|
199
|
+
--ed-primary: #0ea5e9;
|
|
200
|
+
--ed-primary-hover: #0284c7;
|
|
201
|
+
--ed-primary-light: #e0f2fe;
|
|
202
|
+
--ed-secondary: #06b6d4;
|
|
203
|
+
--ed-secondary-hover: #0891b2;
|
|
204
|
+
--ed-accent: #14b8a6;
|
|
205
|
+
--ed-success: #10b981;
|
|
206
|
+
--ed-warning: #f59e0b;
|
|
207
|
+
--ed-danger: #ef4444;
|
|
208
|
+
--ed-info: #38bdf8;
|
|
209
|
+
--ed-bg-primary: #f0f9ff;
|
|
210
|
+
--ed-bg-secondary: #e0f2fe;
|
|
211
|
+
--ed-bg-tertiary: #bae6fd;
|
|
212
|
+
--ed-text-primary: #0c4a6e;
|
|
213
|
+
--ed-text-secondary: #0369a1;
|
|
214
|
+
--ed-text-tertiary: #7dd3fc;
|
|
215
|
+
--ed-border-primary: #bae6fd;
|
|
216
|
+
--ed-border-secondary: #7dd3fc;
|
|
217
|
+
--ed-card-bg: #ffffff;
|
|
218
|
+
--ed-card-border: #bae6fd;
|
|
219
|
+
--ed-modal-bg: #ffffff;
|
|
220
|
+
--ed-input-bg: #ffffff;
|
|
221
|
+
--ed-input-border: #7dd3fc;
|
|
222
|
+
--ed-input-focus-border: #0ea5e9;
|
|
223
|
+
--ed-input-focus-ring: rgba(14, 165, 233, 0.15);
|
|
224
|
+
--ed-scrollbar-track: #e0f2fe;
|
|
225
|
+
--ed-scrollbar-thumb: #7dd3fc;
|
|
226
|
+
--ed-focus-ring: rgba(14, 165, 233, 0.4);
|
|
227
|
+
--ed-selection-bg: rgba(14, 165, 233, 0.3);
|
|
228
|
+
--ed-shadow-color: rgba(14, 165, 233, 0.1);
|
|
229
|
+
color-scheme: light;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/* ─── Forest Theme ─────────────────────────────────────────────────────────── */
|
|
233
|
+
|
|
234
|
+
[data-theme="forest"],
|
|
235
|
+
.ed-theme-forest {
|
|
236
|
+
--ed-primary: #16a34a;
|
|
237
|
+
--ed-primary-hover: #15803d;
|
|
238
|
+
--ed-primary-light: #f0fdf4;
|
|
239
|
+
--ed-secondary: #65a30d;
|
|
240
|
+
--ed-secondary-hover: #4d7c0f;
|
|
241
|
+
--ed-accent: #84cc16;
|
|
242
|
+
--ed-success: #22c55e;
|
|
243
|
+
--ed-warning: #eab308;
|
|
244
|
+
--ed-danger: #dc2626;
|
|
245
|
+
--ed-info: #0ea5e9;
|
|
246
|
+
--ed-bg-primary: #fefce8;
|
|
247
|
+
--ed-bg-secondary: #fef9c3;
|
|
248
|
+
--ed-bg-tertiary: #fef08a;
|
|
249
|
+
--ed-text-primary: #1a2e05;
|
|
250
|
+
--ed-text-secondary: #365314;
|
|
251
|
+
--ed-text-tertiary: #84cc16;
|
|
252
|
+
--ed-border-primary: #bef264;
|
|
253
|
+
--ed-border-secondary: #a3e635;
|
|
254
|
+
--ed-card-bg: #ffffff;
|
|
255
|
+
--ed-card-border: #bef264;
|
|
256
|
+
--ed-modal-bg: #ffffff;
|
|
257
|
+
--ed-input-bg: #ffffff;
|
|
258
|
+
--ed-input-border: #a3e635;
|
|
259
|
+
--ed-input-focus-border: #16a34a;
|
|
260
|
+
--ed-input-focus-ring: rgba(22, 163, 74, 0.15);
|
|
261
|
+
--ed-scrollbar-track: #fef9c3;
|
|
262
|
+
--ed-scrollbar-thumb: #a3e635;
|
|
263
|
+
--ed-focus-ring: rgba(22, 163, 74, 0.4);
|
|
264
|
+
--ed-selection-bg: rgba(22, 163, 74, 0.3);
|
|
265
|
+
color-scheme: light;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/* ─── Sunset Theme ─────────────────────────────────────────────────────────── */
|
|
269
|
+
|
|
270
|
+
[data-theme="sunset"],
|
|
271
|
+
.ed-theme-sunset {
|
|
272
|
+
--ed-primary: #f97316;
|
|
273
|
+
--ed-primary-hover: #ea580c;
|
|
274
|
+
--ed-primary-light: #fff7ed;
|
|
275
|
+
--ed-secondary: #ec4899;
|
|
276
|
+
--ed-secondary-hover: #db2777;
|
|
277
|
+
--ed-accent: #f43f5e;
|
|
278
|
+
--ed-success: #22c55e;
|
|
279
|
+
--ed-warning: #eab308;
|
|
280
|
+
--ed-danger: #ef4444;
|
|
281
|
+
--ed-info: #0ea5e9;
|
|
282
|
+
--ed-bg-primary: #fffbeb;
|
|
283
|
+
--ed-bg-secondary: #fef3c7;
|
|
284
|
+
--ed-bg-tertiary: #fde68a;
|
|
285
|
+
--ed-text-primary: #431407;
|
|
286
|
+
--ed-text-secondary: #9a3412;
|
|
287
|
+
--ed-text-tertiary: #fb923c;
|
|
288
|
+
--ed-border-primary: #fed7aa;
|
|
289
|
+
--ed-border-secondary: #fdba74;
|
|
290
|
+
--ed-card-bg: #ffffff;
|
|
291
|
+
--ed-card-border: #fed7aa;
|
|
292
|
+
--ed-modal-bg: #ffffff;
|
|
293
|
+
--ed-input-bg: #ffffff;
|
|
294
|
+
--ed-input-border: #fdba74;
|
|
295
|
+
--ed-input-focus-border: #f97316;
|
|
296
|
+
--ed-input-focus-ring: rgba(249, 115, 22, 0.15);
|
|
297
|
+
--ed-scrollbar-track: #fef3c7;
|
|
298
|
+
--ed-scrollbar-thumb: #fdba74;
|
|
299
|
+
--ed-focus-ring: rgba(249, 115, 22, 0.4);
|
|
300
|
+
--ed-selection-bg: rgba(249, 115, 22, 0.3);
|
|
301
|
+
color-scheme: light;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/* ─── Midnight Theme ───────────────────────────────────────────────────────── */
|
|
305
|
+
|
|
306
|
+
[data-theme="midnight"],
|
|
307
|
+
.ed-theme-midnight {
|
|
308
|
+
--ed-primary: #818cf8;
|
|
309
|
+
--ed-primary-hover: #6366f1;
|
|
310
|
+
--ed-primary-light: #1e1b4b;
|
|
311
|
+
--ed-secondary: #c084fc;
|
|
312
|
+
--ed-secondary-hover: #a855f7;
|
|
313
|
+
--ed-accent: #e879f9;
|
|
314
|
+
--ed-success: #4ade80;
|
|
315
|
+
--ed-warning: #fbbf24;
|
|
316
|
+
--ed-danger: #f87171;
|
|
317
|
+
--ed-info: #38bdf8;
|
|
318
|
+
--ed-bg-primary: #0c0a1d;
|
|
319
|
+
--ed-bg-secondary: #1a1735;
|
|
320
|
+
--ed-bg-tertiary: #2d2a4a;
|
|
321
|
+
--ed-text-primary: #e2e8f0;
|
|
322
|
+
--ed-text-secondary: #a5b4c8;
|
|
323
|
+
--ed-text-tertiary: #64748b;
|
|
324
|
+
--ed-border-primary: #2d2a4a;
|
|
325
|
+
--ed-border-secondary: #3d3a5c;
|
|
326
|
+
--ed-card-bg: #1a1735;
|
|
327
|
+
--ed-card-border: #2d2a4a;
|
|
328
|
+
--ed-modal-bg: #1a1735;
|
|
329
|
+
--ed-input-bg: #1a1735;
|
|
330
|
+
--ed-input-color: #e2e8f0;
|
|
331
|
+
--ed-input-border: #3d3a5c;
|
|
332
|
+
--ed-input-focus-border: #818cf8;
|
|
333
|
+
--ed-input-focus-ring: rgba(129, 140, 248, 0.2);
|
|
334
|
+
--ed-input-placeholder: #64748b;
|
|
335
|
+
--ed-scrollbar-track: #1a1735;
|
|
336
|
+
--ed-scrollbar-thumb: #3d3a5c;
|
|
337
|
+
--ed-focus-ring: rgba(129, 140, 248, 0.4);
|
|
338
|
+
--ed-selection-bg: rgba(129, 140, 248, 0.35);
|
|
339
|
+
--ed-shadow-color: rgba(0, 0, 0, 0.4);
|
|
340
|
+
color-scheme: dark;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/* ─── High Contrast Theme ──────────────────────────────────────────────────── */
|
|
344
|
+
|
|
345
|
+
[data-theme="high-contrast"],
|
|
346
|
+
.ed-theme-high-contrast {
|
|
347
|
+
--ed-primary: #0050d8;
|
|
348
|
+
--ed-primary-hover: #003da8;
|
|
349
|
+
--ed-primary-light: #e6f0ff;
|
|
350
|
+
--ed-secondary: #7c3aed;
|
|
351
|
+
--ed-secondary-hover: #5b21b6;
|
|
352
|
+
--ed-success: #008a00;
|
|
353
|
+
--ed-warning: #b85c00;
|
|
354
|
+
--ed-danger: #cc0000;
|
|
355
|
+
--ed-info: #0066cc;
|
|
356
|
+
--ed-bg-primary: #ffffff;
|
|
357
|
+
--ed-bg-secondary: #f5f5f5;
|
|
358
|
+
--ed-text-primary: #000000;
|
|
359
|
+
--ed-text-secondary: #333333;
|
|
360
|
+
--ed-text-tertiary: #666666;
|
|
361
|
+
--ed-border-primary: #000000;
|
|
362
|
+
--ed-border-secondary: #333333;
|
|
363
|
+
--ed-card-bg: #ffffff;
|
|
364
|
+
--ed-card-border: #000000;
|
|
365
|
+
--ed-input-border: #000000;
|
|
366
|
+
--ed-input-focus-border: #0050d8;
|
|
367
|
+
--ed-input-focus-ring: rgba(0, 80, 216, 0.3);
|
|
368
|
+
--ed-focus-ring: rgba(0, 80, 216, 0.5);
|
|
369
|
+
--ed-selection-bg: rgba(0, 80, 216, 0.4);
|
|
370
|
+
color-scheme: light;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/* ─── Theme Transition ─────────────────────────────────────────────────────── */
|
|
374
|
+
|
|
375
|
+
[data-theme-transition] *,
|
|
376
|
+
[data-theme-transition] *::before,
|
|
377
|
+
[data-theme-transition] *::after {
|
|
378
|
+
transition: background-color 400ms ease,
|
|
379
|
+
color 400ms ease,
|
|
380
|
+
border-color 400ms ease,
|
|
381
|
+
box-shadow 400ms ease !important;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/* ─── System Preference Detection ──────────────────────────────────────────── */
|
|
385
|
+
|
|
386
|
+
@media (prefers-color-scheme: dark) {
|
|
387
|
+
:root:not([data-theme]) {
|
|
388
|
+
/* ── Primary Colors ── */
|
|
389
|
+
--ed-primary: #60a5fa;
|
|
390
|
+
--ed-primary-hover: #3b82f6;
|
|
391
|
+
--ed-primary-light: #1e3a5f;
|
|
392
|
+
--ed-primary-dark: #93c5fd;
|
|
393
|
+
|
|
394
|
+
/* ── Background Colors ── */
|
|
395
|
+
--ed-bg-primary: #0f172a;
|
|
396
|
+
--ed-bg-secondary: #1e293b;
|
|
397
|
+
--ed-bg-tertiary: #334155;
|
|
398
|
+
|
|
399
|
+
/* ── Text Colors ── */
|
|
400
|
+
--ed-text-primary: #f1f5f9;
|
|
401
|
+
--ed-text-secondary: #94a3b8;
|
|
402
|
+
--ed-text-tertiary: #64748b;
|
|
403
|
+
|
|
404
|
+
/* ── Border Colors ── */
|
|
405
|
+
--ed-border-primary: #334155;
|
|
406
|
+
--ed-border-secondary: #475569;
|
|
407
|
+
|
|
408
|
+
/* ── Component-Specific ── */
|
|
409
|
+
--ed-card-bg: #1e293b;
|
|
410
|
+
--ed-card-border: #334155;
|
|
411
|
+
--ed-modal-bg: #1e293b;
|
|
412
|
+
--ed-input-bg: #1e293b;
|
|
413
|
+
--ed-input-color: #f1f5f9;
|
|
414
|
+
--ed-input-border: #475569;
|
|
415
|
+
--ed-input-focus-border: #60a5fa;
|
|
416
|
+
--ed-input-placeholder: #64748b;
|
|
417
|
+
--ed-scrollbar-track: #1e293b;
|
|
418
|
+
--ed-scrollbar-thumb: #475569;
|
|
419
|
+
|
|
420
|
+
/* ── Semantic Colors ── */
|
|
421
|
+
--ed-success: #4ade80;
|
|
422
|
+
--ed-warning: #fbbf24;
|
|
423
|
+
--ed-danger: #f87171;
|
|
424
|
+
--ed-info: #38bdf8;
|
|
425
|
+
|
|
426
|
+
color-scheme: dark;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/* ─── Theme Switching Utility Classes ──────────────────────────────────────── */
|
|
431
|
+
|
|
432
|
+
.ed-theme-transition {
|
|
433
|
+
transition: background-color 400ms ease,
|
|
434
|
+
color 400ms ease,
|
|
435
|
+
border-color 400ms ease,
|
|
436
|
+
box-shadow 400ms ease;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.ed-theme-transition * {
|
|
440
|
+
transition: background-color 400ms ease,
|
|
441
|
+
color 400ms ease,
|
|
442
|
+
border-color 400ms ease,
|
|
443
|
+
box-shadow 400ms ease;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/* ─── Theme-Aware Component Overrides ──────────────────────────────────────── */
|
|
447
|
+
|
|
448
|
+
/* Dark theme specific adjustments */
|
|
449
|
+
[data-theme="dark"] .ed-card,
|
|
450
|
+
.ed-theme-dark .ed-card {
|
|
451
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
[data-theme="dark"] .ed-btn-secondary,
|
|
455
|
+
.ed-theme-dark .ed-btn-secondary {
|
|
456
|
+
background-color: var(--ed-bg-tertiary);
|
|
457
|
+
border-color: var(--ed-border-secondary);
|
|
458
|
+
color: var(--ed-text-primary);
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
[data-theme="dark"] .ed-table th,
|
|
462
|
+
.ed-theme-dark .ed-table th {
|
|
463
|
+
background-color: var(--ed-bg-tertiary);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
[data-theme="dark"] .ed-table tbody tr:hover,
|
|
467
|
+
.ed-theme-dark .ed-table tbody tr:hover {
|
|
468
|
+
background-color: var(--ed-bg-tertiary);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
[data-theme="dark"] .ed-code,
|
|
472
|
+
.ed-theme-dark .ed-code {
|
|
473
|
+
background-color: var(--ed-bg-tertiary);
|
|
474
|
+
color: var(--ed-text-secondary);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
[data-theme="dark"] .ed-divider,
|
|
478
|
+
.ed-theme-dark .ed-divider {
|
|
479
|
+
border-color: var(--ed-border-secondary);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/* ─── Color Theme Variants for Components ──────────────────────────────────── */
|
|
483
|
+
|
|
484
|
+
/* Primary variant */
|
|
485
|
+
.ed-theme-primary {
|
|
486
|
+
--ed-primary: #3b82f6;
|
|
487
|
+
--ed-primary-hover: #2563eb;
|
|
488
|
+
--ed-primary-light: #eff6ff;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/* Emerald variant */
|
|
492
|
+
.ed-theme-emerald {
|
|
493
|
+
--ed-primary: #10b981;
|
|
494
|
+
--ed-primary-hover: #059669;
|
|
495
|
+
--ed-primary-light: #ecfdf5;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/* Violet variant */
|
|
499
|
+
.ed-theme-violet {
|
|
500
|
+
--ed-primary: #8b5cf6;
|
|
501
|
+
--ed-primary-hover: #7c3aed;
|
|
502
|
+
--ed-primary-light: #f5f3ff;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/* Rose variant */
|
|
506
|
+
.ed-theme-rose {
|
|
507
|
+
--ed-primary: #f43f5e;
|
|
508
|
+
--ed-primary-hover: #e11d48;
|
|
509
|
+
--ed-primary-light: #fff1f2;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/* Amber variant */
|
|
513
|
+
.ed-theme-amber {
|
|
514
|
+
--ed-primary: #f59e0b;
|
|
515
|
+
--ed-primary-hover: #d97706;
|
|
516
|
+
--ed-primary-light: #fffbeb;
|
|
517
|
+
}
|