violit 0.0.1__py3-none-any.whl
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.
- violit/__init__.py +3 -0
- violit/app.py +1984 -0
- violit/broadcast.py +690 -0
- violit/broadcast_primitives.py +197 -0
- violit/component.py +38 -0
- violit/context.py +10 -0
- violit/engine.py +33 -0
- violit/state.py +76 -0
- violit/theme.py +749 -0
- violit/widgets/__init__.py +30 -0
- violit/widgets/card_widgets.py +595 -0
- violit/widgets/chart_widgets.py +253 -0
- violit/widgets/chat_widgets.py +221 -0
- violit/widgets/data_widgets.py +529 -0
- violit/widgets/form_widgets.py +421 -0
- violit/widgets/input_widgets.py +745 -0
- violit/widgets/layout_widgets.py +419 -0
- violit/widgets/list_widgets.py +107 -0
- violit/widgets/media_widgets.py +173 -0
- violit/widgets/status_widgets.py +255 -0
- violit/widgets/text_widgets.py +413 -0
- violit-0.0.1.dist-info/METADATA +504 -0
- violit-0.0.1.dist-info/RECORD +26 -0
- violit-0.0.1.dist-info/WHEEL +5 -0
- violit-0.0.1.dist-info/licenses/LICENSE +21 -0
- violit-0.0.1.dist-info/top_level.txt +1 -0
violit/theme.py
ADDED
|
@@ -0,0 +1,749 @@
|
|
|
1
|
+
class Theme:
|
|
2
|
+
"""Theme management class"""
|
|
3
|
+
PRESETS = {
|
|
4
|
+
'dark': {
|
|
5
|
+
'mode': 'dark',
|
|
6
|
+
'primary': '#a78bfa', # Purple
|
|
7
|
+
'secondary': '#f472b6', # Pink
|
|
8
|
+
'success': '#22c55e',
|
|
9
|
+
'warning': '#f59e0b',
|
|
10
|
+
'danger': '#ef4444',
|
|
11
|
+
'bg': '#09090b',
|
|
12
|
+
'bg_card': '#18181b',
|
|
13
|
+
'border': '#27272a',
|
|
14
|
+
'text': '#fafafa',
|
|
15
|
+
'text_muted': '#a1a1aa',
|
|
16
|
+
'radius': '0.75rem',
|
|
17
|
+
'input_border_radius_small': '0.375rem',
|
|
18
|
+
'input_border_radius_medium': '0.75rem',
|
|
19
|
+
'input_border_radius_large': '1.0rem',
|
|
20
|
+
},
|
|
21
|
+
'light': {
|
|
22
|
+
'mode': 'light',
|
|
23
|
+
'primary': '#7c3aed',
|
|
24
|
+
'secondary': '#ec4899',
|
|
25
|
+
'success': '#16a34a',
|
|
26
|
+
'warning': '#ea580c',
|
|
27
|
+
'danger': '#dc2626',
|
|
28
|
+
'bg': '#ffffff',
|
|
29
|
+
'bg_card': '#f9fafb',
|
|
30
|
+
'border': '#e5e7eb',
|
|
31
|
+
'text': '#0f172a',
|
|
32
|
+
'text_muted': '#64748b',
|
|
33
|
+
'radius': '0.75rem',
|
|
34
|
+
'input_border_radius_small': '0.375rem',
|
|
35
|
+
'input_border_radius_medium': '0.75rem',
|
|
36
|
+
'input_border_radius_large': '1.0rem',
|
|
37
|
+
},
|
|
38
|
+
'ocean': {
|
|
39
|
+
'mode': 'dark',
|
|
40
|
+
'primary': '#06b6d4', # Cyan
|
|
41
|
+
'secondary': '#3b82f6', # Blue
|
|
42
|
+
'success': '#10b981',
|
|
43
|
+
'warning': '#f59e0b',
|
|
44
|
+
'danger': '#ef4444',
|
|
45
|
+
'bg': '#0c1222',
|
|
46
|
+
'bg_card': '#1e293b',
|
|
47
|
+
'border': '#334155',
|
|
48
|
+
'text': '#f1f5f9',
|
|
49
|
+
'text_muted': '#94a3b8',
|
|
50
|
+
'radius': '0.75rem',
|
|
51
|
+
'input_border_radius_small': '0.375rem',
|
|
52
|
+
'input_border_radius_medium': '0.75rem',
|
|
53
|
+
'input_border_radius_large': '1.0rem',
|
|
54
|
+
},
|
|
55
|
+
'sunset': {
|
|
56
|
+
'mode': 'dark',
|
|
57
|
+
'primary': '#f97316', # Orange
|
|
58
|
+
'secondary': '#ec4899', # Pink
|
|
59
|
+
'success': '#22c55e',
|
|
60
|
+
'warning': '#fbbf24',
|
|
61
|
+
'danger': '#ef4444',
|
|
62
|
+
'bg': '#1c1917',
|
|
63
|
+
'bg_card': '#292524',
|
|
64
|
+
'border': '#44403c',
|
|
65
|
+
'text': '#fafaf9',
|
|
66
|
+
'text_muted': '#a8a29e',
|
|
67
|
+
'radius': '0.75rem',
|
|
68
|
+
'input_border_radius_small': '0.375rem',
|
|
69
|
+
'input_border_radius_medium': '0.75rem',
|
|
70
|
+
'input_border_radius_large': '1.0rem',
|
|
71
|
+
},
|
|
72
|
+
'forest': {
|
|
73
|
+
'mode': 'dark',
|
|
74
|
+
'primary': '#22c55e', # Green
|
|
75
|
+
'secondary': '#84cc16', # Lime
|
|
76
|
+
'success': '#10b981',
|
|
77
|
+
'warning': '#f59e0b',
|
|
78
|
+
'danger': '#ef4444',
|
|
79
|
+
'bg': '#0a0f0a',
|
|
80
|
+
'bg_card': '#14532d',
|
|
81
|
+
'border': '#166534',
|
|
82
|
+
'text': '#f0fdf4',
|
|
83
|
+
'text_muted': '#86efac',
|
|
84
|
+
'radius': '0.75rem',
|
|
85
|
+
'input_border_radius_small': '0.375rem',
|
|
86
|
+
'input_border_radius_medium': '0.75rem',
|
|
87
|
+
'input_border_radius_large': '1.0rem',
|
|
88
|
+
},
|
|
89
|
+
'cyberpunk': {
|
|
90
|
+
'mode': 'dark',
|
|
91
|
+
'primary': '#00ffea', # Neon Cyan
|
|
92
|
+
'secondary': '#ff00ff', # Neon Magenta
|
|
93
|
+
'success': '#00ff00',
|
|
94
|
+
'warning': '#ffff00',
|
|
95
|
+
'danger': '#ff0000',
|
|
96
|
+
'bg': '#050510', # Deep Black/Blue
|
|
97
|
+
'bg_card': '#0a0a1f',
|
|
98
|
+
'border': '#00ffea', # Cyan borders
|
|
99
|
+
'text': '#ffffff',
|
|
100
|
+
'text_muted': '#008f82',
|
|
101
|
+
'radius': '0px', # Sharp edges
|
|
102
|
+
'input_border_radius_small': '0px',
|
|
103
|
+
'input_border_radius_medium': '0px',
|
|
104
|
+
'input_border_radius_large': '0px',
|
|
105
|
+
},
|
|
106
|
+
'pastel': {
|
|
107
|
+
'mode': 'light',
|
|
108
|
+
'primary': '#b8c0ff', # Pastel Blue/Purple
|
|
109
|
+
'secondary': '#ffc8dd', # Pastel Pink
|
|
110
|
+
'success': '#99e2b4',
|
|
111
|
+
'warning': '#faedcb',
|
|
112
|
+
'danger': '#ffadad',
|
|
113
|
+
'bg': '#fff0f3', # Very light pinkish
|
|
114
|
+
'bg_card': '#ffffff',
|
|
115
|
+
'border': '#ffe5ec',
|
|
116
|
+
'text': '#4a4e69',
|
|
117
|
+
'text_muted': '#9a8c98',
|
|
118
|
+
'radius': '1.5rem', # Extra rounded
|
|
119
|
+
'input_border_radius_small': '0.75rem',
|
|
120
|
+
'input_border_radius_medium': '1.5rem',
|
|
121
|
+
'input_border_radius_large': '2rem',
|
|
122
|
+
},
|
|
123
|
+
'retro': {
|
|
124
|
+
'mode': 'light',
|
|
125
|
+
'primary': '#d97706', # Amber
|
|
126
|
+
'secondary': '#92400e', # Brown
|
|
127
|
+
'success': '#15803d',
|
|
128
|
+
'warning': '#b45309',
|
|
129
|
+
'danger': '#b91c1c',
|
|
130
|
+
'bg': '#fef3c7', # Warm Beige
|
|
131
|
+
'bg_card': '#fffbeb',
|
|
132
|
+
'border': '#78350f',
|
|
133
|
+
'text': '#451a03',
|
|
134
|
+
'text_muted': '#92400e',
|
|
135
|
+
'radius': '2px', # Blocky
|
|
136
|
+
'input_border_radius_small': '1px',
|
|
137
|
+
'input_border_radius_medium': '2px',
|
|
138
|
+
'input_border_radius_large': '3px',
|
|
139
|
+
},
|
|
140
|
+
'dracula': {
|
|
141
|
+
'mode': 'dark',
|
|
142
|
+
'primary': '#bd93f9',
|
|
143
|
+
'secondary': '#ff79c6',
|
|
144
|
+
'success': '#50fa7b',
|
|
145
|
+
'warning': '#ffb86c',
|
|
146
|
+
'danger': '#ff5555',
|
|
147
|
+
'bg': '#282a36',
|
|
148
|
+
'bg_card': '#44475a',
|
|
149
|
+
'border': '#6272a4',
|
|
150
|
+
'text': '#f8f8f2',
|
|
151
|
+
'text_muted': '#6272a4',
|
|
152
|
+
'radius': '0.5rem',
|
|
153
|
+
'input_border_radius_small': '0.25rem',
|
|
154
|
+
'input_border_radius_medium': '0.5rem',
|
|
155
|
+
'input_border_radius_large': '0.75rem',
|
|
156
|
+
},
|
|
157
|
+
'monokai': {
|
|
158
|
+
'mode': 'dark',
|
|
159
|
+
'primary': '#a6e22e', # Green
|
|
160
|
+
'secondary': '#f92672', # Pink
|
|
161
|
+
'success': '#a6e22e',
|
|
162
|
+
'warning': '#fd971f',
|
|
163
|
+
'danger': '#f92672',
|
|
164
|
+
'bg': '#272822',
|
|
165
|
+
'bg_card': '#3e3d32',
|
|
166
|
+
'border': '#75715e',
|
|
167
|
+
'text': '#f8f8f2',
|
|
168
|
+
'text_muted': '#75715e',
|
|
169
|
+
'radius': '0.25rem',
|
|
170
|
+
'input_border_radius_small': '0.125rem',
|
|
171
|
+
'input_border_radius_medium': '0.25rem',
|
|
172
|
+
'input_border_radius_large': '0.375rem',
|
|
173
|
+
},
|
|
174
|
+
'ant': {
|
|
175
|
+
'mode': 'light',
|
|
176
|
+
'primary': '#1890ff', # Ant Blue
|
|
177
|
+
'secondary': '#722ed1', # Ant Purple
|
|
178
|
+
'success': '#52c41a',
|
|
179
|
+
'warning': '#faad14',
|
|
180
|
+
'danger': '#f5222d',
|
|
181
|
+
'bg': '#f0f2f5', # Ant Light Gray BG
|
|
182
|
+
'bg_card': '#ffffff',
|
|
183
|
+
'border': '#d9d9d9',
|
|
184
|
+
'text': '#000000',
|
|
185
|
+
'text_muted': '#00000073', # 45% alpha
|
|
186
|
+
'radius': '2px', # Slightly rounded
|
|
187
|
+
'input_border_radius_small': '2px',
|
|
188
|
+
'input_border_radius_medium': '2px',
|
|
189
|
+
'input_border_radius_large': '2px',
|
|
190
|
+
},
|
|
191
|
+
'bootstrap': {
|
|
192
|
+
'mode': 'light',
|
|
193
|
+
'primary': '#0d6efd', # BS Blue
|
|
194
|
+
'secondary': '#6c757d', # BS Gray
|
|
195
|
+
'success': '#198754',
|
|
196
|
+
'warning': '#ffc107',
|
|
197
|
+
'danger': '#dc3545',
|
|
198
|
+
'bg': '#ffffff',
|
|
199
|
+
'bg_card': '#f8f9fa', # Light
|
|
200
|
+
'border': '#dee2e6',
|
|
201
|
+
'text': '#212529',
|
|
202
|
+
'text_muted': '#6c757d',
|
|
203
|
+
'radius': '0.375rem', # BS rounded
|
|
204
|
+
'input_border_radius_small': '0.25rem',
|
|
205
|
+
'input_border_radius_medium': '0.375rem',
|
|
206
|
+
'input_border_radius_large': '0.5rem',
|
|
207
|
+
},
|
|
208
|
+
'material': {
|
|
209
|
+
'mode': 'light',
|
|
210
|
+
'primary': '#6750a4', # M3 Purple
|
|
211
|
+
'secondary': '#625b71',
|
|
212
|
+
'success': '#468b58',
|
|
213
|
+
'warning': '#7e5700',
|
|
214
|
+
'danger': '#ba1a1a',
|
|
215
|
+
'bg': '#fffbfe', # M3 Surface
|
|
216
|
+
'bg_card': '#f7f2fa', # M3 Surface Variant
|
|
217
|
+
'border': '#79747e',
|
|
218
|
+
'text': '#1c1b1f',
|
|
219
|
+
'text_muted': '#49454f',
|
|
220
|
+
'radius': '1.5rem', # M3 generally very rounded
|
|
221
|
+
'input_border_radius_small': '0.75rem',
|
|
222
|
+
'input_border_radius_medium': '1.5rem',
|
|
223
|
+
'input_border_radius_large': '1.75rem',
|
|
224
|
+
},
|
|
225
|
+
'glass': {
|
|
226
|
+
'mode': 'light',
|
|
227
|
+
'primary': '#007aff', # Apple Blue
|
|
228
|
+
'secondary': '#5856d6', # Apple Purple
|
|
229
|
+
'success': '#34c759',
|
|
230
|
+
'warning': '#ff9500',
|
|
231
|
+
'danger': '#ff3b30',
|
|
232
|
+
'bg': '#f5f5f7', # Apple Gray BG
|
|
233
|
+
'bg_card': '#ffffffcc', # Translucent White
|
|
234
|
+
'border': '#d1d1d6',
|
|
235
|
+
'text': '#1d1d1f',
|
|
236
|
+
'text_muted': '#86868b',
|
|
237
|
+
'radius': '16px', # Apple-like rounded
|
|
238
|
+
'input_border_radius_small': '8px',
|
|
239
|
+
'input_border_radius_medium': '12px',
|
|
240
|
+
'input_border_radius_large': '16px',
|
|
241
|
+
},
|
|
242
|
+
'nord': {
|
|
243
|
+
'mode': 'dark',
|
|
244
|
+
'primary': '#88c0d0', # Nord Frost
|
|
245
|
+
'secondary': '#81a1c1',
|
|
246
|
+
'success': '#a3be8c',
|
|
247
|
+
'warning': '#ebcb8b',
|
|
248
|
+
'danger': '#bf616a',
|
|
249
|
+
'bg': '#2e3440', # Nord Dark
|
|
250
|
+
'bg_card': '#3b4252',
|
|
251
|
+
'border': '#434c5e',
|
|
252
|
+
'text': '#eceff4',
|
|
253
|
+
'text_muted': '#d8dee9',
|
|
254
|
+
'radius': '0.25rem',
|
|
255
|
+
'input_border_radius_small': '0.125rem',
|
|
256
|
+
'input_border_radius_medium': '0.25rem',
|
|
257
|
+
'input_border_radius_large': '0.375rem',
|
|
258
|
+
},
|
|
259
|
+
# === NEW ADVANCED THEMES ===
|
|
260
|
+
'neo_brutalism': {
|
|
261
|
+
'mode': 'light',
|
|
262
|
+
'primary': '#000000',
|
|
263
|
+
'secondary': '#ff00ff',
|
|
264
|
+
'success': '#00ff00',
|
|
265
|
+
'warning': '#ffff00',
|
|
266
|
+
'danger': '#ff0000',
|
|
267
|
+
'bg': '#f0f0f0',
|
|
268
|
+
'bg_card': '#ffffff',
|
|
269
|
+
'border': '#000000',
|
|
270
|
+
'text': '#000000',
|
|
271
|
+
'text_muted': '#444444',
|
|
272
|
+
'radius': '0px',
|
|
273
|
+
'input_border_radius_small': '0px',
|
|
274
|
+
'input_border_radius_medium': '0px',
|
|
275
|
+
'input_border_radius_large': '0px',
|
|
276
|
+
'extra_css': """
|
|
277
|
+
body { font-family: 'Courier New', monospace; font-weight: bold; }
|
|
278
|
+
.card { border: 3px solid black !important; box-shadow: 5px 5px 0px 0px black !important; }
|
|
279
|
+
sl-button::part(base) { border: 3px solid black !important; box-shadow: 4px 4px 0px 0px black !important; transition: transform 0.1s !important; }
|
|
280
|
+
sl-button::part(base):active { transform: translate(2px, 2px) !important; box-shadow: 2px 2px 0px 0px black !important; }
|
|
281
|
+
h1, h2, h3 { text-transform: uppercase; border-bottom: 3px solid black; display: inline-block; padding-bottom: 5px; }
|
|
282
|
+
"""
|
|
283
|
+
},
|
|
284
|
+
'soft_neu': {
|
|
285
|
+
'mode': 'light',
|
|
286
|
+
'primary': '#e0e5ec', # Monochromatic
|
|
287
|
+
'secondary': '#a3b1c6',
|
|
288
|
+
'success': '#e0e5ec', # Using shape instead of color mostly
|
|
289
|
+
'warning': '#e0e5ec',
|
|
290
|
+
'danger': '#e0e5ec',
|
|
291
|
+
'bg': '#e0e5ec',
|
|
292
|
+
'bg_card': '#e0e5ec',
|
|
293
|
+
'border': '#transparent',
|
|
294
|
+
'text': '#4a5568',
|
|
295
|
+
'text_muted': '#a0aec0',
|
|
296
|
+
'radius': '20px',
|
|
297
|
+
'input_border_radius_small': '10px',
|
|
298
|
+
'input_border_radius_medium': '15px',
|
|
299
|
+
'input_border_radius_large': '20px',
|
|
300
|
+
'extra_css': """
|
|
301
|
+
.card {
|
|
302
|
+
border: none !important;
|
|
303
|
+
background: #e0e5ec !important;
|
|
304
|
+
box-shadow: 9px 9px 16px rgb(163,177,198,0.6), -9px -9px 16px rgba(255,255,255, 0.5) !important;
|
|
305
|
+
}
|
|
306
|
+
sl-button::part(base) {
|
|
307
|
+
border: none !important;
|
|
308
|
+
background: #e0e5ec !important;
|
|
309
|
+
color: #4a5568 !important;
|
|
310
|
+
box-shadow: 6px 6px 10px 0 rgba(163,177,198, 0.7), -6px -6px 10px 0 rgba(255,255,255, 0.8) !important;
|
|
311
|
+
transition: all 0.2s ease;
|
|
312
|
+
}
|
|
313
|
+
sl-button::part(base):active {
|
|
314
|
+
box-shadow: inset 6px 6px 10px 0 rgba(163,177,198, 0.7), inset -6px -6px 10px 0 rgba(255,255,255, 0.8) !important;
|
|
315
|
+
}
|
|
316
|
+
sl-input::part(base) {
|
|
317
|
+
background: #e0e5ec !important;
|
|
318
|
+
box-shadow: inset 6px 6px 10px 0 rgba(163,177,198, 0.7), inset -6px -6px 10px 0 rgba(255,255,255, 0.8) !important;
|
|
319
|
+
border: none !important;
|
|
320
|
+
}
|
|
321
|
+
"""
|
|
322
|
+
},
|
|
323
|
+
'cyber_hud': {
|
|
324
|
+
'mode': 'dark',
|
|
325
|
+
'primary': '#0ff',
|
|
326
|
+
'secondary': '#f0f',
|
|
327
|
+
'success': '#0f0',
|
|
328
|
+
'warning': '#ff0',
|
|
329
|
+
'danger': '#f00',
|
|
330
|
+
'bg': '#000000',
|
|
331
|
+
'bg_card': '#050a10',
|
|
332
|
+
'border': '#0ff',
|
|
333
|
+
'text': '#0ff',
|
|
334
|
+
'text_muted': '#008888',
|
|
335
|
+
'radius': '0px',
|
|
336
|
+
'input_border_radius_small': '0px',
|
|
337
|
+
'input_border_radius_medium': '0px',
|
|
338
|
+
'input_border_radius_large': '0px',
|
|
339
|
+
'extra_css': """
|
|
340
|
+
body {
|
|
341
|
+
background-image: linear-gradient(rgba(0, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 255, 255, 0.05) 1px, transparent 1px);
|
|
342
|
+
background-size: 20px 20px;
|
|
343
|
+
}
|
|
344
|
+
.card {
|
|
345
|
+
border: 1px solid #0ff !important;
|
|
346
|
+
box-shadow: 0 0 10px #0ff, inset 0 0 20px rgba(0,255,255,0.1) !important;
|
|
347
|
+
clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
|
|
348
|
+
}
|
|
349
|
+
sl-button::part(base) {
|
|
350
|
+
border: 1px solid #0ff !important;
|
|
351
|
+
text-transform: uppercase;
|
|
352
|
+
letter-spacing: 2px;
|
|
353
|
+
clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
|
|
354
|
+
}
|
|
355
|
+
sl-button::part(base):hover {
|
|
356
|
+
background: #0ff !important;
|
|
357
|
+
color: #000 !important;
|
|
358
|
+
box-shadow: 0 0 20px #0ff !important;
|
|
359
|
+
}
|
|
360
|
+
"""
|
|
361
|
+
},
|
|
362
|
+
'hand_drawn': {
|
|
363
|
+
'mode': 'light',
|
|
364
|
+
'primary': '#2c3e50',
|
|
365
|
+
'secondary': '#e67e22',
|
|
366
|
+
'success': '#27ae60',
|
|
367
|
+
'warning': '#f39c12',
|
|
368
|
+
'danger': '#c0392b',
|
|
369
|
+
'bg': '#fffefa', # Paper color
|
|
370
|
+
'bg_card': '#ffffff',
|
|
371
|
+
'border': '#2c3e50',
|
|
372
|
+
'text': '#2c3e50',
|
|
373
|
+
'text_muted': '#7f8c8d',
|
|
374
|
+
'radius': '255px 15px 225px 15px / 15px 225px 15px 255px',
|
|
375
|
+
'input_border_radius_small': '255px 15px 225px 15px / 15px 225px 15px 255px',
|
|
376
|
+
'input_border_radius_medium': '255px 15px 225px 15px / 15px 225px 15px 255px',
|
|
377
|
+
'input_border_radius_large': '255px 15px 225px 15px / 15px 225px 15px 255px',
|
|
378
|
+
'extra_css': """
|
|
379
|
+
body { font-family: 'Comic Sans MS', 'Chalkboard SE', sans-serif; }
|
|
380
|
+
.card {
|
|
381
|
+
border: 2px solid #2c3e50 !important;
|
|
382
|
+
border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px !important;
|
|
383
|
+
box-shadow: 2px 3px 15px rgba(0,0,0,0.1) !important;
|
|
384
|
+
}
|
|
385
|
+
sl-button::part(base) {
|
|
386
|
+
border: 2px solid #2c3e50 !important;
|
|
387
|
+
border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px !important;
|
|
388
|
+
}
|
|
389
|
+
sl-input::part(base) {
|
|
390
|
+
border: 2px solid #2c3e50 !important;
|
|
391
|
+
border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px !important;
|
|
392
|
+
}
|
|
393
|
+
"""
|
|
394
|
+
},
|
|
395
|
+
'terminal': {
|
|
396
|
+
'mode': 'dark',
|
|
397
|
+
'primary': '#00ff00',
|
|
398
|
+
'secondary': '#00cc00',
|
|
399
|
+
'success': '#00ff00',
|
|
400
|
+
'warning': '#ffff00',
|
|
401
|
+
'danger': '#ff0000',
|
|
402
|
+
'bg': '#0a0a0a',
|
|
403
|
+
'bg_card': '#000000',
|
|
404
|
+
'border': '#00ff00',
|
|
405
|
+
'text': '#00ff00',
|
|
406
|
+
'text_muted': '#008800',
|
|
407
|
+
'radius': '0px',
|
|
408
|
+
'input_border_radius_small': '0px',
|
|
409
|
+
'input_border_radius_medium': '0px',
|
|
410
|
+
'input_border_radius_large': '0px',
|
|
411
|
+
'extra_css': """
|
|
412
|
+
body { font-family: 'Courier New', monospace; }
|
|
413
|
+
.card { border: 1px dashed #00ff00 !important; }
|
|
414
|
+
sl-button::part(base) {
|
|
415
|
+
border: 1px solid #00ff00 !important;
|
|
416
|
+
background: black !important;
|
|
417
|
+
color: #00ff00 !important;
|
|
418
|
+
}
|
|
419
|
+
sl-button::part(base):hover {
|
|
420
|
+
background: #00ff00 !important;
|
|
421
|
+
color: black !important;
|
|
422
|
+
}
|
|
423
|
+
* { text-shadow: 0 0 2px #00ff00; }
|
|
424
|
+
"""
|
|
425
|
+
},
|
|
426
|
+
'win95': {
|
|
427
|
+
'mode': 'light',
|
|
428
|
+
'primary': '#000080',
|
|
429
|
+
'secondary': '#808080',
|
|
430
|
+
'success': '#008000',
|
|
431
|
+
'warning': '#808000',
|
|
432
|
+
'danger': '#ff0000',
|
|
433
|
+
'bg': '#008080', # Teal desktop
|
|
434
|
+
'bg_card': '#c0c0c0',
|
|
435
|
+
'border': '#dfdfdf',
|
|
436
|
+
'text': '#000000',
|
|
437
|
+
'text_muted': '#808080',
|
|
438
|
+
'radius': '0px',
|
|
439
|
+
'input_border_radius_small': '0px',
|
|
440
|
+
'input_border_radius_medium': '0px',
|
|
441
|
+
'input_border_radius_large': '0px',
|
|
442
|
+
'extra_css': """
|
|
443
|
+
body { font-family: 'Tahoma', 'MS Sans Serif', sans-serif; }
|
|
444
|
+
.card, sl-button::part(base) {
|
|
445
|
+
background: #c0c0c0 !important;
|
|
446
|
+
border-top: 2px solid #ffffff !important;
|
|
447
|
+
border-left: 2px solid #ffffff !important;
|
|
448
|
+
border-right: 2px solid #000000 !important;
|
|
449
|
+
border-bottom: 2px solid #000000 !important;
|
|
450
|
+
box-shadow: 1px 1px 0px 0px #000 inset, -1px -1px 0px 0px #fff inset !important;
|
|
451
|
+
}
|
|
452
|
+
sl-button::part(base):active {
|
|
453
|
+
border-top: 2px solid #000000 !important;
|
|
454
|
+
border-left: 2px solid #000000 !important;
|
|
455
|
+
border-right: 2px solid #ffffff !important;
|
|
456
|
+
border-bottom: 2px solid #ffffff !important;
|
|
457
|
+
}
|
|
458
|
+
"""
|
|
459
|
+
},
|
|
460
|
+
'bauhaus': {
|
|
461
|
+
'mode': 'light',
|
|
462
|
+
'primary': '#d02224', # Red
|
|
463
|
+
'secondary': '#1669b7', # Blue
|
|
464
|
+
'success': '#f9bc2c', # Yellow
|
|
465
|
+
'warning': '#f9bc2c',
|
|
466
|
+
'danger': '#d02224',
|
|
467
|
+
'bg': '#f5f5f5',
|
|
468
|
+
'bg_card': '#ffffff',
|
|
469
|
+
'border': '#000000',
|
|
470
|
+
'text': '#111111',
|
|
471
|
+
'text_muted': '#555555',
|
|
472
|
+
'radius': '0px',
|
|
473
|
+
'input_border_radius_small': '0px',
|
|
474
|
+
'input_border_radius_medium': '0px',
|
|
475
|
+
'input_border_radius_large': '0px',
|
|
476
|
+
'extra_css': """
|
|
477
|
+
.card {
|
|
478
|
+
border: none !important;
|
|
479
|
+
box-shadow: 10px 10px 0 #1669b7, 20px 20px 0 #d02224 !important;
|
|
480
|
+
transition: transform 0.2s;
|
|
481
|
+
}
|
|
482
|
+
.card:hover { transform: translate(-2px, -2px); }
|
|
483
|
+
sl-button::part(base) {
|
|
484
|
+
border-radius: 9999px !important; /* Circle/Pill */
|
|
485
|
+
border: none !important;
|
|
486
|
+
box-shadow: 4px 4px 0 #000000 !important;
|
|
487
|
+
}
|
|
488
|
+
h1 { color: #d02224; }
|
|
489
|
+
h2 { color: #1669b7; }
|
|
490
|
+
h3 { color: #f9bc2c; text-shadow: 1px 1px 0 #000; }
|
|
491
|
+
"""
|
|
492
|
+
},
|
|
493
|
+
'vaporwave': {
|
|
494
|
+
'mode': 'dark',
|
|
495
|
+
'primary': '#ff71ce', # Neon Pink
|
|
496
|
+
'secondary': '#01cdfe', # Neon Cyan
|
|
497
|
+
'success': '#05ffa1',
|
|
498
|
+
'warning': '#b967ff',
|
|
499
|
+
'danger': '#ff71ce',
|
|
500
|
+
'bg': '#2b2144',
|
|
501
|
+
'bg_card': '#1a1429',
|
|
502
|
+
'border': '#b967ff',
|
|
503
|
+
'text': '#fffb96', # Yellowish
|
|
504
|
+
'text_muted': '#b967ff',
|
|
505
|
+
'radius': '0px',
|
|
506
|
+
'input_border_radius_small': '0px',
|
|
507
|
+
'input_border_radius_medium': '0px',
|
|
508
|
+
'input_border_radius_large': '0px',
|
|
509
|
+
'extra_css': """
|
|
510
|
+
body {
|
|
511
|
+
background: linear-gradient(180deg, #2b2144 0%, #000000 100%);
|
|
512
|
+
min-height: 100vh;
|
|
513
|
+
}
|
|
514
|
+
.card {
|
|
515
|
+
background: rgba(26, 20, 41, 0.8) !important;
|
|
516
|
+
border: 2px solid #01cdfe !important;
|
|
517
|
+
box-shadow: 0 0 15px #b967ff, inset 0 0 15px #b967ff !important;
|
|
518
|
+
}
|
|
519
|
+
sl-button::part(base) {
|
|
520
|
+
background: linear-gradient(45deg, #ff71ce, #01cdfe) !important;
|
|
521
|
+
color: white !important;
|
|
522
|
+
border: none !important;
|
|
523
|
+
text-transform: uppercase;
|
|
524
|
+
font-style: italic;
|
|
525
|
+
}
|
|
526
|
+
h1, h2, h3 {
|
|
527
|
+
background: linear-gradient(to right, #ff71ce, #01cdfe);
|
|
528
|
+
-webkit-background-clip: text;
|
|
529
|
+
-webkit-text-fill-color: transparent;
|
|
530
|
+
filter: drop-shadow(2px 2px 0px rgba(0,0,0,0.5));
|
|
531
|
+
}
|
|
532
|
+
"""
|
|
533
|
+
},
|
|
534
|
+
'blueprint': {
|
|
535
|
+
'mode': 'dark',
|
|
536
|
+
'primary': '#ffffff',
|
|
537
|
+
'secondary': '#ffffff',
|
|
538
|
+
'success': '#ffffff',
|
|
539
|
+
'warning': '#ffffff',
|
|
540
|
+
'danger': '#ffffff',
|
|
541
|
+
'bg': '#0044bb', # Blueprint Blue
|
|
542
|
+
'bg_card': 'transparent',
|
|
543
|
+
'border': '#ffffff',
|
|
544
|
+
'text': '#ffffff',
|
|
545
|
+
'text_muted': '#aaccff',
|
|
546
|
+
'radius': '0px',
|
|
547
|
+
'input_border_radius_small': '0px',
|
|
548
|
+
'input_border_radius_medium': '0px',
|
|
549
|
+
'input_border_radius_large': '0px',
|
|
550
|
+
'extra_css': """
|
|
551
|
+
body {
|
|
552
|
+
background-image:
|
|
553
|
+
linear-gradient(rgba(255,255,255,0.3) 1px, transparent 1px),
|
|
554
|
+
linear-gradient(90deg, rgba(255,255,255,0.3) 1px, transparent 1px);
|
|
555
|
+
background-size: 20px 20px;
|
|
556
|
+
}
|
|
557
|
+
.card {
|
|
558
|
+
border: 2px solid white !important;
|
|
559
|
+
background: rgba(0, 60, 180, 0.5) !important;
|
|
560
|
+
}
|
|
561
|
+
sl-button::part(base) {
|
|
562
|
+
background: transparent !important;
|
|
563
|
+
border: 2px solid white !important;
|
|
564
|
+
color: white !important;
|
|
565
|
+
}
|
|
566
|
+
sl-button::part(base):hover {
|
|
567
|
+
background: rgba(255,255,255,0.2) !important;
|
|
568
|
+
}
|
|
569
|
+
* { font-family: 'Courier New', monospace !important; }
|
|
570
|
+
"""
|
|
571
|
+
},
|
|
572
|
+
'rgb_gamer': {
|
|
573
|
+
'mode': 'dark',
|
|
574
|
+
'primary': '#ff0000',
|
|
575
|
+
'secondary': '#00ff00',
|
|
576
|
+
'success': '#0000ff',
|
|
577
|
+
'warning': '#ffff00',
|
|
578
|
+
'danger': '#ff0000',
|
|
579
|
+
'bg': '#000000',
|
|
580
|
+
'bg_card': '#111111',
|
|
581
|
+
'border': '#333333',
|
|
582
|
+
'text': '#ffffff',
|
|
583
|
+
'text_muted': '#888888',
|
|
584
|
+
'radius': '8px',
|
|
585
|
+
'input_border_radius_small': '4px',
|
|
586
|
+
'input_border_radius_medium': '8px',
|
|
587
|
+
'input_border_radius_large': '12px',
|
|
588
|
+
'extra_css': """
|
|
589
|
+
@keyframes hue-rotate {
|
|
590
|
+
from { filter: hue-rotate(0deg); }
|
|
591
|
+
to { filter: hue-rotate(360deg); }
|
|
592
|
+
}
|
|
593
|
+
.card {
|
|
594
|
+
position: relative;
|
|
595
|
+
border: 2px solid red;
|
|
596
|
+
animation: hue-rotate 3s linear infinite;
|
|
597
|
+
box-shadow: 0 0 10px red;
|
|
598
|
+
}
|
|
599
|
+
sl-button::part(base) {
|
|
600
|
+
border: 2px solid red;
|
|
601
|
+
animation: hue-rotate 3s linear infinite reverse;
|
|
602
|
+
}
|
|
603
|
+
"""
|
|
604
|
+
},
|
|
605
|
+
'editorial': {
|
|
606
|
+
'mode': 'light',
|
|
607
|
+
'primary': '#000000',
|
|
608
|
+
'secondary': '#444444',
|
|
609
|
+
'success': '#000000',
|
|
610
|
+
'warning': '#000000',
|
|
611
|
+
'danger': '#ff0000',
|
|
612
|
+
'bg': '#ffffff',
|
|
613
|
+
'bg_card': '#ffffff',
|
|
614
|
+
'border': '#000000',
|
|
615
|
+
'text': '#000000',
|
|
616
|
+
'text_muted': '#666666',
|
|
617
|
+
'radius': '0px',
|
|
618
|
+
'input_border_radius_small': '0px',
|
|
619
|
+
'input_border_radius_medium': '0px',
|
|
620
|
+
'input_border_radius_large': '0px',
|
|
621
|
+
'extra_css': """
|
|
622
|
+
body { font-family: 'Times New Roman', serif; }
|
|
623
|
+
h1, h2, h3 { font-family: 'Georgia', serif; font-style: italic; border-bottom: 4px double black; padding-bottom: 0.5rem; display: block; }
|
|
624
|
+
.card {
|
|
625
|
+
border: none !important;
|
|
626
|
+
border-bottom: 1px solid black !important;
|
|
627
|
+
border-top: 1px solid black !important;
|
|
628
|
+
border-radius: 0 !important;
|
|
629
|
+
box-shadow: none !important;
|
|
630
|
+
}
|
|
631
|
+
sl-button::part(base) {
|
|
632
|
+
font-family: 'Times New Roman', serif;
|
|
633
|
+
text-transform: uppercase;
|
|
634
|
+
background: transparent !important;
|
|
635
|
+
color: black !important;
|
|
636
|
+
border: 1px solid black !important;
|
|
637
|
+
font-weight: bold;
|
|
638
|
+
}
|
|
639
|
+
sl-button::part(base):hover {
|
|
640
|
+
background: black !important;
|
|
641
|
+
color: white !important;
|
|
642
|
+
}
|
|
643
|
+
"""
|
|
644
|
+
},
|
|
645
|
+
'claymorphism': {
|
|
646
|
+
'mode': 'light',
|
|
647
|
+
'primary': '#ff8c69', # Soft coral
|
|
648
|
+
'secondary': '#6ab7ff', # Soft blue
|
|
649
|
+
'success': '#81e698',
|
|
650
|
+
'warning': '#ffd685',
|
|
651
|
+
'danger': '#ff8c69',
|
|
652
|
+
'bg': '#f0f4f8',
|
|
653
|
+
'bg_card': '#ffffff',
|
|
654
|
+
'border': '#ffffff',
|
|
655
|
+
'text': '#5e6c7e',
|
|
656
|
+
'text_muted': '#9aa5b1',
|
|
657
|
+
'radius': '30px',
|
|
658
|
+
'input_border_radius_small': '15px',
|
|
659
|
+
'input_border_radius_medium': '30px',
|
|
660
|
+
'input_border_radius_large': '45px',
|
|
661
|
+
'extra_css': """
|
|
662
|
+
.card {
|
|
663
|
+
border-radius: 30px !important;
|
|
664
|
+
border: none !important;
|
|
665
|
+
box-shadow: inset 10px 10px 20px #dbe4f0, inset -10px -10px 20px #ffffff, 10px 20px 30px rgba(166, 180, 200, 0.4) !important;
|
|
666
|
+
background: #f0f4f8 !important;
|
|
667
|
+
}
|
|
668
|
+
sl-button::part(base) {
|
|
669
|
+
border-radius: 20px !important;
|
|
670
|
+
border: none !important;
|
|
671
|
+
box-shadow: 8px 8px 16px #dbe4f0, -8px -8px 16px #ffffff !important;
|
|
672
|
+
color: white !important;
|
|
673
|
+
background: var(--sl-primary) !important;
|
|
674
|
+
}
|
|
675
|
+
sl-button::part(base):active {
|
|
676
|
+
box-shadow: inset 6px 6px 10px rgba(0,0,0,0.1), inset -6px -6px 10px rgba(255,255,255,0.8) !important;
|
|
677
|
+
}
|
|
678
|
+
"""
|
|
679
|
+
},
|
|
680
|
+
'lg_innotek': {
|
|
681
|
+
'mode': 'light',
|
|
682
|
+
'primary': '#A50034', # LG Red
|
|
683
|
+
'secondary': '#6B6B6B', # LG Gray
|
|
684
|
+
'success': '#4b9b4b',
|
|
685
|
+
'warning': '#ffb042',
|
|
686
|
+
'danger': '#d91d3e',
|
|
687
|
+
'bg': '#ffffff',
|
|
688
|
+
'bg_card': '#f8f8f8',
|
|
689
|
+
'border': '#e5e5e5',
|
|
690
|
+
'text': '#1a1a1a', # Black text
|
|
691
|
+
'text_muted': '#767676',
|
|
692
|
+
'radius': '4px',
|
|
693
|
+
'input_border_radius_small': '2px',
|
|
694
|
+
'input_border_radius_medium': '4px',
|
|
695
|
+
'input_border_radius_large': '6px',
|
|
696
|
+
'extra_css': """
|
|
697
|
+
body { font-family: 'LG Smart', 'Segoe UI', sans-serif; }
|
|
698
|
+
.card {
|
|
699
|
+
border-top: 3px solid #A50034 !important;
|
|
700
|
+
border-radius: 2px !important;
|
|
701
|
+
box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
|
|
702
|
+
}
|
|
703
|
+
sl-button::part(base) {
|
|
704
|
+
border-radius: 2px !important;
|
|
705
|
+
font-weight: 600;
|
|
706
|
+
text-transform: uppercase;
|
|
707
|
+
letter-spacing: 0.5px;
|
|
708
|
+
}
|
|
709
|
+
h1, h2 { color: #1a1a1a; letter-spacing: -0.5px; }
|
|
710
|
+
.gradient-text {
|
|
711
|
+
background: linear-gradient(to right, #A50034, #D40045) !important;
|
|
712
|
+
-webkit-background-clip: text !important;
|
|
713
|
+
-webkit-text-fill-color: transparent !important;
|
|
714
|
+
}
|
|
715
|
+
"""
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
def __init__(self, preset: str = 'dark'):
|
|
720
|
+
self.preset_name = preset
|
|
721
|
+
self.current = self.PRESETS.get(preset, self.PRESETS['dark']).copy()
|
|
722
|
+
|
|
723
|
+
def set_preset(self, preset: str):
|
|
724
|
+
if preset in self.PRESETS:
|
|
725
|
+
self.preset_name = preset
|
|
726
|
+
self.current = self.PRESETS[preset].copy()
|
|
727
|
+
|
|
728
|
+
def set_color(self, key: str, value: str):
|
|
729
|
+
if key in self.current:
|
|
730
|
+
self.current[key] = value
|
|
731
|
+
|
|
732
|
+
def to_css_vars(self) -> str:
|
|
733
|
+
"""Convert to CSS variables"""
|
|
734
|
+
return "\n".join([
|
|
735
|
+
f"--sl-{k.replace('_', '-')}: {v};"
|
|
736
|
+
for k, v in self.current.items() if k not in ['mode', 'extra_css']
|
|
737
|
+
])
|
|
738
|
+
|
|
739
|
+
@property
|
|
740
|
+
def mode(self) -> str:
|
|
741
|
+
return self.current.get('mode', 'light')
|
|
742
|
+
|
|
743
|
+
@property
|
|
744
|
+
def extra_css(self) -> str:
|
|
745
|
+
return self.current.get('extra_css', '')
|
|
746
|
+
|
|
747
|
+
@property
|
|
748
|
+
def theme_class(self) -> str:
|
|
749
|
+
return f"sl-theme-{self.mode}"
|