@okjavis/nodebb-theme-javis 1.4.0 → 1.5.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/scss/_forms.scss CHANGED
@@ -17,7 +17,7 @@ textarea,
17
17
  color: $jv-text-main;
18
18
  line-height: $jv-line-height-tight;
19
19
  box-shadow: none;
20
- transition: all 0.15s ease;
20
+ transition: border-color $jv-transition-fast, box-shadow $jv-transition-fast; // Modern transitions
21
21
 
22
22
  &::placeholder {
23
23
  color: $jv-text-muted;
@@ -26,7 +26,7 @@ textarea,
26
26
  &:focus {
27
27
  outline: none;
28
28
  border-color: $jv-primary;
29
- box-shadow: 0 0 0 3px $jv-primary-soft;
29
+ box-shadow: $jv-focus-ring; // Consistent focus ring
30
30
  }
31
31
  }
32
32
 
@@ -68,22 +68,18 @@ textarea {
68
68
  font-weight: 400;
69
69
  text-align: left;
70
70
  color: $jv-text-muted;
71
- box-shadow: $jv-shadow-soft;
72
- transition: all 0.15s ease;
71
+ box-shadow: $jv-shadow-sm; // shadcn subtle shadow
72
+ transition: border-color $jv-transition-fast, color $jv-transition-fast; // Modern transitions
73
73
 
74
74
  &:hover,
75
75
  &:focus {
76
76
  background: $jv-surface;
77
77
  border-color: $jv-primary;
78
78
  color: $jv-primary;
79
- box-shadow: $jv-shadow-soft;
79
+ box-shadow: $jv-shadow-sm; // shadcn subtle shadow
80
80
  outline: none;
81
81
  }
82
82
 
83
- &:active {
84
- transform: scale(0.99);
85
- }
86
-
87
83
  // Override Bootstrap button states
88
84
  &.btn,
89
85
  &.btn:focus,
@@ -91,7 +87,7 @@ textarea {
91
87
  &.btn:active {
92
88
  background: $jv-surface;
93
89
  border-radius: $jv-radius-pill;
94
- box-shadow: $jv-shadow-soft;
90
+ box-shadow: $jv-shadow-sm; // shadcn subtle shadow
95
91
  border-color: $jv-border-subtle;
96
92
  outline: none;
97
93
  }
@@ -109,11 +105,11 @@ textarea {
109
105
  .dropdown-menu {
110
106
  border: 1px solid $jv-border-subtle;
111
107
  border-radius: $jv-radius-md;
112
- box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
108
+ box-shadow: $jv-shadow-lg; // shadcn large shadow for dropdowns
113
109
  padding: $jv-space-2 0;
114
110
  min-width: 180px;
115
111
  background: $jv-surface;
116
- animation: dropdownFade 0.15s ease;
112
+ animation: dropdownFade $jv-transition-fast;
117
113
 
118
114
  @keyframes dropdownFade {
119
115
  from {
@@ -130,7 +126,7 @@ textarea {
130
126
  padding: $jv-space-4 $jv-space-8;
131
127
  font-size: $jv-font-size-sm;
132
128
  color: $jv-text-main;
133
- transition: background-color 0.15s ease;
129
+ transition: background-color $jv-transition-fast, color $jv-transition-fast; // Modern transitions
134
130
  display: flex;
135
131
  align-items: center;
136
132
  gap: $jv-space-4;
@@ -150,7 +146,7 @@ textarea {
150
146
  }
151
147
 
152
148
  &:active {
153
- background: rgba(0, 81, 255, 0.1);
149
+ background: $jv-active-bg; // Consistent active state
154
150
  }
155
151
 
156
152
  &.active {
@@ -158,6 +154,13 @@ textarea {
158
154
  color: $jv-primary;
159
155
  font-weight: 500;
160
156
  }
157
+
158
+ // Focus state for accessibility
159
+ &:focus-visible {
160
+ outline: none;
161
+ background: rgba(0, 81, 255, 0.06);
162
+ color: $jv-primary;
163
+ }
161
164
  }
162
165
 
163
166
  .dropdown-divider {
@@ -291,7 +294,7 @@ textarea {
291
294
  .modal-content {
292
295
  border: none;
293
296
  border-radius: $jv-radius-lg;
294
- box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
297
+ box-shadow: $jv-shadow-xl; // shadcn extra large shadow for modals
295
298
  }
296
299
 
297
300
  .modal-header {
@@ -305,11 +308,17 @@ textarea {
305
308
 
306
309
  .btn-close {
307
310
  opacity: 0.5;
308
- transition: opacity 0.15s ease;
311
+ transition: opacity $jv-transition-fast; // Modern transition
309
312
 
310
313
  &:hover {
311
314
  opacity: 1;
312
315
  }
316
+
317
+ // Focus state for accessibility
318
+ &:focus-visible {
319
+ outline: none;
320
+ box-shadow: $jv-focus-ring;
321
+ }
313
322
  }
314
323
  }
315
324
 
@@ -331,7 +340,7 @@ textarea {
331
340
  height: 18px;
332
341
  margin-top: 0;
333
342
  border: 2px solid $jv-border-strong;
334
- transition: all 0.15s ease;
343
+ transition: background-color $jv-transition-fast, border-color $jv-transition-fast; // Modern transitions
335
344
 
336
345
  &:checked {
337
346
  background-color: $jv-primary;
@@ -339,7 +348,8 @@ textarea {
339
348
  }
340
349
 
341
350
  &:focus {
342
- box-shadow: 0 0 0 3px $jv-primary-soft;
351
+ outline: none;
352
+ box-shadow: $jv-focus-ring; // Consistent focus ring
343
353
  border-color: $jv-primary;
344
354
  }
345
355
  }
@@ -374,14 +384,14 @@ textarea {
374
384
  border: none;
375
385
  border-bottom: 1px solid $jv-border-subtle;
376
386
  padding: $jv-space-6 $jv-space-8;
377
- transition: background-color 0.15s ease;
387
+ transition: background-color $jv-transition-fast; // Modern transition
378
388
 
379
389
  &:last-child {
380
390
  border-bottom: none;
381
391
  }
382
392
 
383
393
  &:hover {
384
- background: rgba(0, 0, 0, 0.02);
394
+ background: $jv-hover-bg; // Consistent hover state
385
395
  }
386
396
 
387
397
  &.active {
@@ -389,6 +399,12 @@ textarea {
389
399
  border-color: transparent;
390
400
  color: $jv-primary;
391
401
  }
402
+
403
+ // Focus state for accessibility
404
+ &:focus-visible {
405
+ outline: none;
406
+ background: $jv-hover-bg;
407
+ }
392
408
  }
393
409
 
394
410
  // ===========================================================
@@ -408,8 +424,12 @@ textarea {
408
424
  vertical-align: middle;
409
425
  }
410
426
 
411
- &.table-hover tbody tr:hover {
412
- background: rgba(0, 0, 0, 0.02);
427
+ &.table-hover tbody tr {
428
+ transition: background-color $jv-transition-fast; // Modern transition
429
+
430
+ &:hover {
431
+ background: $jv-hover-bg; // Consistent hover state
432
+ }
413
433
  }
414
434
  }
415
435
 
@@ -426,12 +446,18 @@ textarea {
426
446
  font-size: $jv-font-size-sm;
427
447
  color: $jv-text-main;
428
448
  background: transparent;
429
- transition: all 0.15s ease;
449
+ transition: background-color $jv-transition-fast, color $jv-transition-fast; // Modern transitions
430
450
 
431
451
  &:hover {
432
- background: rgba(0, 0, 0, 0.05);
452
+ background: $jv-hover-bg; // Consistent hover state
433
453
  color: $jv-primary;
434
454
  }
455
+
456
+ // Focus state for accessibility
457
+ &:focus-visible {
458
+ outline: none;
459
+ box-shadow: $jv-focus-ring;
460
+ }
435
461
  }
436
462
 
437
463
  .page-item.active .page-link {
@@ -460,7 +486,7 @@ textarea {
460
486
  font-size: $jv-font-size-sm;
461
487
  font-weight: 500;
462
488
  color: $jv-text-muted;
463
- transition: all 0.15s ease;
489
+ transition: color $jv-transition-fast, border-bottom-color $jv-transition-fast; // Modern transitions
464
490
 
465
491
  &:hover {
466
492
  color: $jv-text-main;
@@ -472,6 +498,12 @@ textarea {
472
498
  border-bottom-color: $jv-primary;
473
499
  background: transparent;
474
500
  }
501
+
502
+ // Focus state for accessibility
503
+ &:focus-visible {
504
+ outline: none;
505
+ box-shadow: $jv-focus-ring;
506
+ }
475
507
  }
476
508
  }
477
509
 
@@ -487,10 +519,10 @@ textarea {
487
519
  font-size: $jv-font-size-sm;
488
520
  font-weight: 500;
489
521
  color: $jv-text-muted;
490
- transition: all 0.15s ease;
522
+ transition: background-color $jv-transition-fast, color $jv-transition-fast; // Modern transitions
491
523
 
492
524
  &:hover {
493
- background: rgba(0, 0, 0, 0.04);
525
+ background: $jv-hover-bg; // Consistent hover state
494
526
  color: $jv-text-main;
495
527
  }
496
528
 
@@ -498,5 +530,11 @@ textarea {
498
530
  background: $jv-primary;
499
531
  color: #fff;
500
532
  }
533
+
534
+ // Focus state for accessibility
535
+ &:focus-visible {
536
+ outline: none;
537
+ box-shadow: $jv-focus-ring;
538
+ }
501
539
  }
502
540
  }
@@ -75,7 +75,7 @@
75
75
  font-size: $jv-font-size-sm;
76
76
  font-weight: 500;
77
77
  border-radius: $jv-radius-sm;
78
- transition: all 0.15s ease;
78
+ transition: background-color $jv-transition-fast, color $jv-transition-fast; // Modern transitions
79
79
 
80
80
  i {
81
81
  width: 18px;
@@ -93,6 +93,12 @@
93
93
  color: $jv-primary;
94
94
  font-weight: 600;
95
95
  }
96
+
97
+ // Focus state for accessibility
98
+ &:focus-visible {
99
+ outline: none;
100
+ box-shadow: $jv-focus-ring;
101
+ }
96
102
  }
97
103
 
98
104
  // Sidebar section headers
@@ -118,10 +124,16 @@
118
124
  color: $jv-text-main;
119
125
  font-size: $jv-font-size-sm;
120
126
  border-radius: $jv-radius-sm;
121
- transition: background-color 0.15s ease;
127
+ transition: background-color $jv-transition-fast; // Modern transition
122
128
 
123
129
  &:hover {
124
- background: rgba(0, 0, 0, 0.03);
130
+ background: $jv-hover-bg; // Consistent hover state
131
+ }
132
+
133
+ // Focus state for accessibility
134
+ &:focus-within {
135
+ outline: none;
136
+ background: $jv-hover-bg;
125
137
  }
126
138
 
127
139
  .category-icon {
@@ -153,10 +165,16 @@ div[data-widget-area] {
153
165
  border: 1px solid $jv-border-subtle;
154
166
  border-radius: $jv-radius-lg;
155
167
  padding: $jv-space-8;
156
- transition: box-shadow 0.15s ease;
168
+ transition: $jv-transition-shadow; // Modern transition
157
169
 
158
170
  &:hover {
159
- box-shadow: $jv-shadow-soft;
171
+ box-shadow: $jv-shadow-sm; // shadcn subtle shadow
172
+ }
173
+
174
+ // Focus state for accessibility
175
+ &:focus-within {
176
+ outline: none;
177
+ box-shadow: $jv-shadow-md, $jv-focus-ring;
160
178
  }
161
179
  }
162
180
 
@@ -192,11 +210,17 @@ div[data-widget-area="right"] h8 {
192
210
  flex-direction: column;
193
211
  gap: 2px;
194
212
  cursor: pointer;
195
- transition: border-color 0.15s ease, background 0.15s ease;
213
+ transition: border-color $jv-transition-fast, background-color $jv-transition-fast; // Modern transitions
196
214
 
197
215
  &:hover {
198
- border-color: rgba(0,0,0,0.12);
199
- background: rgba(0,0,0,0.03);
216
+ border-color: $jv-border-strong; // Consistent border
217
+ background: $jv-hover-bg; // Consistent hover state
218
+ }
219
+
220
+ // Focus state for accessibility
221
+ &:focus-visible {
222
+ outline: none;
223
+ box-shadow: $jv-focus-ring;
200
224
  }
201
225
 
202
226
  small {
@@ -224,11 +248,17 @@ div[data-widget-area="right"] h8 {
224
248
  display: flex;
225
249
  flex-direction: column;
226
250
  gap: $jv-space-4;
227
- transition: box-shadow 0.15s ease, border 0.15s ease;
251
+ transition: $jv-transition-shadow, border-color $jv-transition-fast; // Modern transitions
228
252
 
229
253
  &:hover {
230
- border-color: rgba(0,0,0,0.08);
231
- box-shadow: $jv-shadow-soft;
254
+ border-color: $jv-border-strong; // Consistent border
255
+ box-shadow: $jv-shadow-sm; // shadcn subtle shadow
256
+ }
257
+
258
+ // Focus state for accessibility
259
+ &:focus-within {
260
+ outline: none;
261
+ box-shadow: $jv-shadow-md, $jv-focus-ring;
232
262
  }
233
263
 
234
264
  // Meta info
@@ -304,12 +334,18 @@ div[data-widget-area="right"] h8 {
304
334
  border-radius: 50%;
305
335
  object-fit: cover;
306
336
  border: 2px solid $jv-surface;
307
- transition: transform 0.15s ease;
337
+ transition: transform $jv-transition-fast; // Modern transition
308
338
 
309
339
  &:hover {
310
340
  transform: scale(1.1);
311
341
  z-index: 10;
312
342
  }
343
+
344
+ // Focus state for accessibility
345
+ &:focus {
346
+ outline: none;
347
+ box-shadow: $jv-focus-ring;
348
+ }
313
349
  }
314
350
 
315
351
  .avatar-stack {
@@ -337,20 +373,26 @@ div[data-widget-area="right"] h8 {
337
373
  gap: $jv-space-4;
338
374
  padding: $jv-space-4 0;
339
375
  border-bottom: 1px solid $jv-border-subtle;
340
- transition: background-color 0.15s ease;
376
+ transition: background-color $jv-transition-fast; // Modern transition
341
377
 
342
378
  &:last-child {
343
379
  border-bottom: none;
344
380
  }
345
381
 
346
382
  &:hover {
347
- background: rgba(0, 0, 0, 0.02);
383
+ background: $jv-hover-bg; // Consistent hover state
348
384
  margin: 0 (-$jv-space-4);
349
385
  padding-left: $jv-space-4;
350
386
  padding-right: $jv-space-4;
351
387
  border-radius: $jv-radius-sm;
352
388
  }
353
389
 
390
+ // Focus state for accessibility
391
+ &:focus-within {
392
+ outline: none;
393
+ background: $jv-hover-bg;
394
+ }
395
+
354
396
  .category-icon {
355
397
  width: 24px;
356
398
  height: 24px;
@@ -565,8 +607,8 @@ div[data-widget-area="right"] h8 {
565
607
  width: 280px;
566
608
  z-index: 1050;
567
609
  transform: translateX(-100%);
568
- transition: transform 0.3s ease;
569
- box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
610
+ transition: transform $jv-transition-slow; // Modern transition
611
+ box-shadow: $jv-shadow-lg; // shadcn drawer shadow
570
612
 
571
613
  &.open {
572
614
  transform: translateX(0);
@@ -583,7 +625,7 @@ div[data-widget-area="right"] h8 {
583
625
  z-index: 1040;
584
626
  opacity: 0;
585
627
  visibility: hidden;
586
- transition: opacity 0.3s ease, visibility 0.3s ease;
628
+ transition: opacity $jv-transition-slow, visibility $jv-transition-slow; // Modern transitions
587
629
 
588
630
  &.show {
589
631
  opacity: 1;
@@ -651,7 +693,7 @@ div[data-widget-area="sidebar"] {
651
693
  font-size: 14px;
652
694
  font-weight: 500;
653
695
  text-decoration: none;
654
- transition: background-color 0.15s ease;
696
+ transition: background-color $jv-transition-fast, color $jv-transition-fast; // Modern transitions
655
697
  cursor: pointer;
656
698
 
657
699
  &:hover {
@@ -659,6 +701,12 @@ div[data-widget-area="sidebar"] {
659
701
  color: $jv-primary;
660
702
  }
661
703
 
704
+ // Focus state for accessibility
705
+ &:focus-visible {
706
+ outline: none;
707
+ box-shadow: $jv-focus-ring;
708
+ }
709
+
662
710
  // Topic count
663
711
  small,
664
712
  .count,
@@ -686,14 +734,20 @@ div[data-widget-area="sidebar"] {
686
734
  li {
687
735
  padding: $jv-space-4 $jv-space-6;
688
736
  border-bottom: 1px solid $jv-border-subtle;
689
- transition: background-color 0.15s ease;
737
+ transition: background-color $jv-transition-fast; // Modern transition
690
738
 
691
739
  &:last-child {
692
740
  border-bottom: none;
693
741
  }
694
742
 
695
743
  &:hover {
696
- background: rgba(0, 0, 0, 0.02);
744
+ background: $jv-hover-bg; // Consistent hover state
745
+ }
746
+
747
+ // Focus state for accessibility
748
+ &:focus-within {
749
+ outline: none;
750
+ background: $jv-hover-bg;
697
751
  }
698
752
 
699
753
  // Post header with avatar
@@ -10,8 +10,8 @@ $jv-primary-soft: rgba(0, 81, 255, 0.12);
10
10
  // Neutrals
11
11
  $jv-bg: #f5f6f8; // app background
12
12
  $jv-surface: #ffffff; // cards, panels
13
- $jv-border-subtle: rgba(0,0,0,0.06);
14
- $jv-border-strong: rgba(0,0,0,0.12);
13
+ $jv-border-subtle: rgba(0,0,0,0.1); // More visible than Material (was 0.06) - shadcn style
14
+ $jv-border-strong: rgba(0,0,0,0.15); // Stronger borders (was 0.12)
15
15
 
16
16
  // Text
17
17
  $jv-text-main: #111111;
@@ -25,19 +25,39 @@ $jv-radius-md: 12px;
25
25
  $jv-radius-lg: 16px;
26
26
  $jv-radius-pill: 999px;
27
27
 
28
- // Shadows
29
- $jv-shadow-soft: 0 2px 8px rgba(0,0,0,0.04);
30
- $jv-shadow-card: 0 4px 10px rgba(0,0,0,0.05);
28
+ // shadcn-Style Shadow System (Compact, Grounded, Notion/Linear-like)
29
+ // Subtle shadows that let borders do the heavy lifting
30
+ $jv-shadow-none: none;
31
+ $jv-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05); // Barely visible
32
+ $jv-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1); // Card resting - SUBTLE
33
+ $jv-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); // Card hover
34
+ $jv-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); // Modals/Dropdowns
35
+ $jv-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); // Popovers
36
+
37
+ // Legacy compatibility - map old names to new system
38
+ $jv-shadow-soft: $jv-shadow-sm;
39
+ $jv-shadow-card: $jv-shadow-sm;
40
+ $jv-elevation-0: $jv-shadow-none;
41
+ $jv-elevation-1: $jv-shadow-sm;
42
+ $jv-elevation-2: $jv-shadow-sm;
43
+ $jv-elevation-4: $jv-shadow-md;
44
+ $jv-elevation-6: $jv-shadow-md;
45
+ $jv-elevation-8: $jv-shadow-md;
46
+
47
+ // Button shadows (keep branded)
31
48
  $jv-shadow-button: 0 4px 12px rgba(0, 81, 255, 0.25);
32
49
  $jv-shadow-button-hover: 0 6px 16px rgba(0, 81, 255, 0.35);
33
50
 
34
- // Spacing (8pt-ish scale)
35
- $jv-space-2: 4px;
36
- $jv-space-4: 8px;
37
- $jv-space-6: 12px;
38
- $jv-space-8: 16px;
39
- $jv-space-10: 20px;
40
- $jv-space-12: 24px;
51
+ // Spacing (8dp baseline grid - shadcn/Tailwind compatible)
52
+ $jv-space-1: 4px; // 4dp
53
+ $jv-space-2: 8px; // 8dp (1 unit)
54
+ $jv-space-3: 12px; // 12dp (1.5 units)
55
+ $jv-space-4: 16px; // 16dp (2 units)
56
+ $jv-space-5: 20px; // 20dp (2.5 units)
57
+ $jv-space-6: 24px; // 24dp (3 units)
58
+ $jv-space-8: 32px; // 32dp (4 units)
59
+ $jv-space-10: 40px; // 40dp (5 units)
60
+ $jv-space-12: 48px; // 48dp (6 units)
41
61
 
42
62
  // Typography
43
63
  $jv-font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Helvetica Neue", Arial, sans-serif;
@@ -52,3 +72,18 @@ $jv-font-size-xxl: 32px;
52
72
  $jv-line-height-base: 1.52;
53
73
  $jv-line-height-tight: 1.4;
54
74
  $jv-line-height-relaxed: 1.6;
75
+
76
+ // Modern Polish - Transitions & Interactions (2025 standard)
77
+ $jv-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
78
+ $jv-transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
79
+ $jv-transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
80
+ $jv-transition-shadow: box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1);
81
+
82
+ // Focus States (Accessibility + Modern Look)
83
+ $jv-focus-ring: 0 0 0 3px rgba(0, 81, 255, 0.12);
84
+ $jv-focus-ring-offset: 0 0 0 2px $jv-surface, 0 0 0 4px $jv-primary;
85
+
86
+ // Interactive States
87
+ $jv-hover-bg: rgba(0, 0, 0, 0.04);
88
+ $jv-active-bg: rgba(0, 0, 0, 0.08);
89
+ $jv-selected-bg: rgba(0, 81, 255, 0.08);