euv-example 0.1.0

An example application demonstrating the euv UI framework with reactive signals, custom components, and WebAssembly.
Documentation
1
2
3
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
use crate::*;

class! {
    pub c_app_root {
        display: "flex";
        min_height: "100vh";
        font_family: "system-ui, -apple-system, sans-serif";
        background: "#f8f9fb";
        color: "#1a1a2e";
        line_height: "1.6";
    }

    pub c_app_nav {
        width: "240px";
        background: "#ffffff";
        border_right: "1px solid #e5e7eb";
        display: "flex";
        flex_direction: "column";
        height: "100vh";
        position: "sticky";
        top: "0";
        overflow_y: "auto";
    }

    pub c_nav_header {
        padding: "24px 20px 20px 20px";
        margin: "0";
        border_bottom: "1px solid #f0f0f0";
        font_size: "18px";
        font_weight: "700";
        color: "#1a1a2e";
        letter_spacing: "-0.02em";
        display: "flex";
        align_items: "center";
        gap: "10px";
    }

    pub c_nav_logo {
        display: "flex";
        width: "32px";
        height: "32px";
        background: "linear-gradient(135deg, #4f46e5, #7c3aed)";
        border_radius: "8px";
        align_items: "center";
        justify_content: "center";
        color: "white";
        font_weight: "700";
        font_size: "16px";
        flex_shrink: "0";
    }

    pub c_nav_section_label {
        padding: "10px 20px 4px 20px";
        margin: "0";
        font_size: "11px";
        font_weight: "600";
        color: "#9ca3af";
        text_transform: "uppercase";
        letter_spacing: "0.08em";
    }

    pub c_nav_footer {
        margin_top: "auto";
        padding: "16px 20px";
        border_top: "1px solid #f0f0f0";
        font_size: "12px";
        color: "#9ca3af";
    }

    pub c_app_main {
        flex: "1";
        padding: "32px 40px";
        background: "#f8f9fb";
        min_height: "100vh";
        max_width: "960px";
    }

    pub c_page_container {
        max_width: "800px";
        margin: "0 auto";
    }

    pub c_page_header {
        margin_bottom: "32px";
    }

    pub c_page_title {
        font_size: "28px";
        font_weight: "700";
        color: "#1a1a2e";
        margin_bottom: "8px";
        letter_spacing: "-0.02em";
    }

    pub c_page_subtitle {
        font_size: "16px";
        color: "#6b7280";
        line_height: "1.6";
    }

    pub c_card {
        background: "white";
        border_radius: "12px";
        padding: "24px";
        margin: "16px 0";
        box_shadow: "0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04)";
        border: "1px solid #f0f0f0";
        transition: "box-shadow 0.2s ease";
    }

    pub c_card_title {
        margin_top: "0";
        margin_bottom: "16px";
        color: "#1a1a2e";
        font_size: "18px";
        font_weight: "600";
        padding_bottom: "12px";
        border_bottom: "2px solid #f0f0f0";
        letter_spacing: "0.01em";
    }

    pub c_primary_button {
        background: "#4f46e5";
        color: "white";
        border: "none";
        padding: "10px 22px";
        border_radius: "8px";
        cursor: "pointer";
        font_size: "14px";
        font_weight: "500";
        letter_spacing: "0.01em";
        transition: "all 0.15s ease";
        outline: "none";
    }

    pub c_badge {
        display: "inline-block";
        color: "white";
        padding: "5px 14px";
        border_radius: "20px";
        font_size: "12px";
        font_weight: "600";
        cursor: "pointer";
        letter_spacing: "0.03em";
        text_transform: "uppercase";
    }

    pub c_form_input_wrapper {
        margin: "12px 0";
    }

    pub c_form_label {
        display: "block";
        margin_bottom: "6px";
        color: "#374151";
        font_weight: "500";
        font_size: "14px";
    }

    pub c_form_input {
        width: "100%";
        padding: "10px 14px";
        border: "1px solid #e5e7eb";
        border_radius: "8px";
        font_size: "14px";
        box_sizing: "border-box";
        transition: "border-color 0.15s ease, box-shadow 0.15s ease";
        outline: "none";
        background: "#fafbfc";
    }

    pub c_form_input_no_transition {
        width: "100%";
        padding: "10px 14px";
        border: "1px solid #e5e7eb";
        border_radius: "8px";
        font_size: "14px";
        box_sizing: "border-box";
        background: "#fafbfc";
        outline: "none";
    }

    pub c_form_checkbox {
        cursor: "pointer";
        width: "16px";
        height: "16px";
    }

    pub c_form_checkbox_label {
        font_size: "14px";
        color: "#374151";
        cursor: "pointer";
    }

    pub c_form_checkbox_row {
        margin: "16px 0";
        display: "flex";
        align_items: "center";
        gap: "10px";
    }

    pub c_error_box {
        margin: "16px 0";
        padding: "14px 16px";
        background: "#fef2f2";
        color: "#991b1b";
        border_radius: "8px";
        font_size: "14px";
        border: "1px solid #fecaca";
    }

    pub c_success_box {
        margin_top: "16px";
        padding: "14px 16px";
        background: "#f0fdf4";
        color: "#166534";
        border_radius: "8px";
        border: "1px solid #bbf7d0";
        font_size: "14px";
    }

    pub c_counter_row {
        display: "flex";
        align_items: "center";
        gap: "20px";
        flex_wrap: "wrap";
    }

    pub c_counter_text {
        font_size: "16px";
        color: "#374151";
    }

    pub c_counter_value {
        font_weight: "700";
        color: "#4f46e5";
        font_size: "24px";
    }

    pub c_badge_row {
        display: "flex";
        gap: "10px";
        flex_wrap: "wrap";
        align_items: "center";
    }

    pub c_badge_hint {
        margin_bottom: "12px";
        color: "#6b7280";
        font_size: "14px";
    }

    pub c_form_grid {
        display: "grid";
        grid_template_columns: "1fr 1fr";
        gap: "0 20px";
    }

    pub c_custom_attrs_demo {
        padding: "16px";
        background: "linear-gradient(135deg, #f0f4ff, #faf5ff)";
        border_radius: "8px";
        border: "1px solid #e5e7eb";
    }

    pub c_demo_text {
        color: "#374151";
        margin_bottom: "8px";
    }

    pub c_demo_text_muted {
        color: "#6b7280";
        font_size: "13px";
    }

    pub c_loading_container {
        display: "flex";
        align_items: "center";
        gap: "16px";
        padding: "20px";
        background: "#eef2ff";
        border_radius: "10px";
        border: "1px solid #c7d2fe";
        margin_top: "16px";
    }

    pub c_spinner {
        width: "28px";
        height: "28px";
        border: "3px solid #c7d2fe";
        border_top: "3px solid #4f46e5";
        border_radius: "50%";
        flex_shrink: "0";
        animation: "euv-spin 0.8s linear infinite";
    }

    pub c_loading_text_col {
        display: "flex";
        flex_direction: "column";
        gap: "4px";
    }

    pub c_loading_title {
        color: "#3730a3";
        font_size: "15px";
        font_weight: "500";
    }

    pub c_loading_subtitle {
        color: "#6b7280";
        font_size: "13px";
    }

    pub c_error_container {
        display: "flex";
        align_items: "center";
        gap: "12px";
        margin_top: "16px";
        padding: "16px";
        background: "#fef2f2";
        border_radius: "10px";
        border: "1px solid #fecaca";
    }

    pub c_error_icon {
        width: "20px";
        height: "20px";
        border_radius: "50%";
        background: "#fca5a5";
        display: "flex";
        align_items: "center";
        justify_content: "center";
        flex_shrink: "0";
        color: "#991b1b";
        font_size: "12px";
        font_weight: "700";
    }

    pub c_error_text {
        color: "#991b1b";
        font_size: "14px";
    }

    pub c_data_box {
        margin_top: "16px";
        padding: "16px";
        background: "#f0fdf4";
        border_radius: "10px";
        border: "1px solid #bbf7d0";
    }

    pub c_data_pre {
        color: "#166534";
        font_size: "13px";
        margin: "0";
        white_space: "pre-wrap";
        word_break: "break-all";
        font_family: "ui-monospace, monospace";
    }

    pub c_fetch_hint {
        color: "#6b7280";
        font_size: "14px";
        margin_bottom: "16px";
    }

    pub c_toggle_content {
        margin_top: "16px";
        padding: "16px";
        background: "linear-gradient(135deg, #f0f4ff, #faf5ff)";
        border_radius: "8px";
        border: "1px solid #e0e7ff";
    }

    pub c_toggle_title {
        margin_top: "0";
        color: "#4f46e5";
        font_size: "15px";
    }

    pub c_role_button_row {
        display: "flex";
        gap: "10px";
        margin_bottom: "16px";
    }

    pub c_role_guest {
        padding: "16px";
        background: "#fefce8";
        border_radius: "8px";
        border: "1px solid #fde68a";
    }

    pub c_role_guest_text {
        color: "#92400e";
        font_size: "14px";
    }

    pub c_role_user {
        padding: "16px";
        background: "#f0f9ff";
        border_radius: "8px";
        border: "1px solid #bae6fd";
    }

    pub c_role_user_text {
        color: "#075985";
        font_size: "14px";
    }

    pub c_role_admin {
        padding: "16px";
        background: "#f0fdf4";
        border_radius: "8px";
        border: "1px solid #bbf7d0";
    }

    pub c_role_admin_text {
        color: "#166534";
        font_size: "14px";
    }

    pub c_tab_bar {
        display: "flex";
        border_bottom: "1px solid #e5e7eb";
        margin_bottom: "16px";
        gap: "4px";
    }

    pub c_tab_content {
        padding: "4px 0";
    }

    pub c_tab_text {
        color: "#374151";
        font_size: "14px";
        margin_bottom: "8px";
    }

    pub c_tab_text_muted {
        color: "#6b7280";
        font_size: "13px";
    }

    pub c_tab_text_input {
        color: "#374151";
        font_size: "14px";
        margin_bottom: "12px";
    }

    pub c_list_input_row {
        display: "flex";
        gap: "12px";
        margin_bottom: "20px";
    }

    pub c_list_input {
        flex: "1";
        padding: "10px 14px";
        border: "1px solid #e5e7eb";
        border_radius: "8px";
        font_size: "14px";
        background: "#fafbfc";
        outline: "none";
    }

    pub c_list_ul {
        list_style: "none";
        padding: "0";
        margin: "0";
    }

    pub c_list_item {
        display: "flex";
        justify_content: "space-between";
        align_items: "center";
        padding: "14px 16px";
        border_bottom: "1px solid #f0f0f0";
        border_radius: "6px";
        margin_bottom: "4px";
    }

    pub c_list_item_text {
        font_size: "14px";
        color: "#374151";
    }

    pub c_log_container {
        max_height: "320px";
        overflow_y: "auto";
        background: "#1a1a2e";
        padding: "16px";
        border_radius: "8px";
        font_family: "ui-monospace, monospace";
        font_size: "13px";
        line_height: "1.5";
    }

    pub c_log_item {
        padding: "6px 0";
        border_bottom: "1px solid #f0f0f0";
        font_size: "13px";
    }

    pub c_not_found_container {
        text_align: "center";
        padding: "80px 20px";
        max_width: "480px";
        margin: "0 auto";
    }

    pub c_not_found_code {
        font_size: "72px";
        font_weight: "800";
        color: "#e5e7eb";
        line_height: "1";
        margin_bottom: "16px";
        letter_spacing: "-0.04em";
    }

    pub c_not_found_title {
        font_size: "24px";
        font_weight: "600";
        color: "#1a1a2e";
        margin_bottom: "12px";
    }

    pub c_not_found_text {
        color: "#6b7280";
        font_size: "16px";
        margin_bottom: "28px";
        line_height: "1.6";
    }

    pub c_render_count_text {
        font_size: "16px";
        color: "#374151";
        margin_bottom: "16px";
    }

    pub c_inline {
        display: "inline";
    }
}