@yuhuanowo/yunui 0.2.13 → 0.2.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuhuanowo/yunui",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
4
4
  "description": "A versioned React 19 + Tailwind v4 design system — tokens, primitives, patterns, and AI components, in one package.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
package/styles/yunui.css CHANGED
@@ -84,10 +84,18 @@
84
84
  --accent-subtle: #f4f4f5;
85
85
  --accent-muted: #e4e4e7;
86
86
 
87
+ /* Interaction surfaces — aliases consumed by hover / selected / muted states
88
+ across components (accordion, combobox, custom-select, pagination, table).
89
+ Defined once: nested var() resolves at use-site, so these track the active
90
+ theme's --accent-subtle / --bg-elevated automatically. */
91
+ --bg-hover: var(--accent-subtle);
92
+ --bg-muted: var(--bg-elevated);
93
+
87
94
  /* Semantic */
88
95
  --success: #10b981;
89
96
  --warning: #f59e0b;
90
97
  --error: #ef4444;
98
+ --info: #3b82f6;
91
99
 
92
100
  /* Code Block */
93
101
  --code-bg: #f4f4f5;
@@ -154,12 +162,15 @@
154
162
  [data-theme="true-black"] {
155
163
  color-scheme: dark;
156
164
 
157
- /* Core Colors - True Black */
165
+ /* Core Colors - True Black. The PAGE stays pure #000 (OLED), but elevated
166
+ surfaces lift a hair so fills that rely on a background — bg-muted (hover
167
+ states, tiles, switch tracks, sticky headers), bg-card — are actually
168
+ visible instead of vanishing into the black. Borders/rings still delineate. */
158
169
  --bg-base: #000000;
159
- --bg-elevated: #000000;
170
+ --bg-elevated: #141414;
160
171
  --bg-glass: rgba(0, 0, 0, 0.8);
161
172
  --bg-glass-hover: rgba(20, 20, 20, 0.9);
162
- --bg-card: #000000;
173
+ --bg-card: #0a0a0a;
163
174
 
164
175
  /* High Contrast Borders */
165
176
  --border-hairline: #1a1a1a;
@@ -491,7 +502,7 @@ summary {
491
502
  backdrop-filter: blur(16px);
492
503
  -webkit-backdrop-filter: blur(16px);
493
504
  border: 1px solid var(--border-subtle);
494
- border-radius: 16px;
505
+ border-radius: 20px;
495
506
  transition: all 0.2s ease;
496
507
  }
497
508
 
@@ -523,7 +534,7 @@ summary {
523
534
  .card {
524
535
  background: var(--bg-card);
525
536
  border: 1px solid var(--border-hairline);
526
- border-radius: 16px;
537
+ border-radius: 20px;
527
538
  box-shadow: var(--shadow-xs);
528
539
  transition: all 0.15s ease;
529
540
  }
@@ -537,6 +548,11 @@ summary {
537
548
  cursor: pointer;
538
549
  }
539
550
 
551
+ .card-interactive:focus-visible {
552
+ outline: 2px solid var(--border-strong);
553
+ outline-offset: 2px;
554
+ }
555
+
540
556
  .card-interactive:hover {
541
557
  transform: translateY(-1px);
542
558
  box-shadow: var(--shadow-md);
@@ -567,7 +583,7 @@ summary {
567
583
  backdrop-filter: blur(12px);
568
584
  -webkit-backdrop-filter: blur(12px);
569
585
  border: 1px solid var(--border-hairline);
570
- border-radius: 20px;
586
+ border-radius: 24px;
571
587
  }
572
588
 
573
589
  /* =====================================================
@@ -630,7 +646,7 @@ summary {
630
646
  gap: 0.5rem;
631
647
  font-weight: 500;
632
648
  font-size: 0.875rem;
633
- border-radius: 12px;
649
+ border-radius: 14px;
634
650
  padding: 0.625rem 1.125rem;
635
651
  transition: all 0.15s ease;
636
652
  cursor: pointer;
@@ -638,6 +654,13 @@ summary {
638
654
  border: 1px solid;
639
655
  }
640
656
 
657
+ /* Keyboard focus ring — applies to every .btn variant. Uses :focus-visible so
658
+ it only shows for keyboard users, not on mouse click. */
659
+ .btn:focus-visible {
660
+ outline: 2px solid var(--border-strong);
661
+ outline-offset: 2px;
662
+ }
663
+
641
664
  /* Primary - dark outline with subtle bg */
642
665
  .btn-primary {
643
666
  color: #09090b;
@@ -738,14 +761,14 @@ summary {
738
761
  .btn-sm {
739
762
  padding: 0.375rem 0.75rem;
740
763
  font-size: 0.8125rem;
741
- border-radius: 9px;
764
+ border-radius: 11px;
742
765
  gap: 0.375rem;
743
766
  }
744
767
 
745
768
  .btn-lg {
746
769
  padding: 0.875rem 1.5rem;
747
770
  font-size: 1rem;
748
- border-radius: 14px;
771
+ border-radius: 16px;
749
772
  }
750
773
 
751
774
  .btn:disabled {
@@ -978,7 +1001,7 @@ select.input option,
978
1001
  padding: 0.5rem 0.75rem;
979
1002
  background: var(--bg-glass);
980
1003
  border: 1px solid var(--border-default);
981
- border-radius: 12px;
1004
+ border-radius: 14px;
982
1005
  font-size: 0.875rem;
983
1006
  color: var(--text-primary);
984
1007
  outline: none;
@@ -1011,9 +1034,14 @@ select.input option,
1011
1034
  padding: 0.25rem 0.625rem;
1012
1035
  font-size: 0.6875rem;
1013
1036
  font-weight: 500;
1014
- border-radius: 6px;
1037
+ border-radius: 8px;
1015
1038
  background: var(--bg-glass-hover);
1016
1039
  color: var(--text-secondary);
1040
+ /* A badge is an atomic unit: icon + label stay on one line, and the badge
1041
+ keeps its natural width inside a flex row (wraps as a whole, never gets
1042
+ squeezed so its CJK label breaks per-character in a narrow column). */
1043
+ white-space: nowrap;
1044
+ flex-shrink: 0;
1017
1045
  }
1018
1046
 
1019
1047
  .badge-accent {
@@ -1056,7 +1084,48 @@ select.input option,
1056
1084
  }
1057
1085
 
1058
1086
  .text-info {
1059
- color: #3b82f6;
1087
+ color: var(--info);
1088
+ }
1089
+
1090
+ /* White ink that STAYS white on a colored/dark fill — badges, icon overlays,
1091
+ solid-button text. Distinct from `.text-white`, which true-black deliberately
1092
+ dims to #d4d4d8 for body-text eye comfort (that dim wrecks contrast when the
1093
+ white sits on red/primary). Defined as a real class so it always generates
1094
+ (an arbitrary `text-[#fff]` can be dropped by a consumer's JIT). */
1095
+ .text-pure-white {
1096
+ color: #ffffff;
1097
+ }
1098
+
1099
+ /* Soft semantic-color backgrounds — the proven, themeable counterpart to the
1100
+ .text-* helpers above. Use for medallions / icon tiles / soft banners that
1101
+ need a ~10% tint of a status color (the `bg-error/10` Tailwind utility does
1102
+ NOT resolve — there is no --color-error). color-mix tracks the token across
1103
+ light / dark / true-black. */
1104
+ .bg-error-soft {
1105
+ background-color: color-mix(in srgb, var(--error) 10%, transparent);
1106
+ }
1107
+ .bg-success-soft {
1108
+ background-color: color-mix(in srgb, var(--success) 10%, transparent);
1109
+ }
1110
+ .bg-warning-soft {
1111
+ background-color: color-mix(in srgb, var(--warning) 10%, transparent);
1112
+ }
1113
+ .bg-info-soft {
1114
+ background-color: color-mix(in srgb, var(--info) 10%, transparent);
1115
+ }
1116
+
1117
+ /* Matching tinted borders for soft semantic callouts (Alert, banners). */
1118
+ .border-error-soft {
1119
+ border-color: color-mix(in srgb, var(--error) 30%, transparent);
1120
+ }
1121
+ .border-success-soft {
1122
+ border-color: color-mix(in srgb, var(--success) 30%, transparent);
1123
+ }
1124
+ .border-warning-soft {
1125
+ border-color: color-mix(in srgb, var(--warning) 30%, transparent);
1126
+ }
1127
+ .border-info-soft {
1128
+ border-color: color-mix(in srgb, var(--info) 30%, transparent);
1060
1129
  }
1061
1130
 
1062
1131
  .badge-neutral {
@@ -1078,7 +1147,7 @@ select.input option,
1078
1147
  font-size: 0.875rem;
1079
1148
  font-weight: 500;
1080
1149
  color: var(--text-tertiary);
1081
- border-radius: 10px;
1150
+ border-radius: 12px;
1082
1151
  transition: all 0.12s ease;
1083
1152
  white-space: nowrap;
1084
1153
  }
@@ -1108,6 +1177,12 @@ select.input option,
1108
1177
  background: rgba(0, 0, 0, 0.03);
1109
1178
  }
1110
1179
 
1180
+ .nav-item:focus-visible {
1181
+ outline: 2px solid var(--border-strong);
1182
+ outline-offset: -2px;
1183
+ color: var(--text-primary);
1184
+ }
1185
+
1111
1186
  .nav-item:hover::before {
1112
1187
  transform: translateY(-50%) translateX(0);
1113
1188
  opacity: 0.3;
@@ -1146,7 +1221,7 @@ select.input option,
1146
1221
  font-weight: 500;
1147
1222
  color: var(--text-tertiary);
1148
1223
  background: transparent;
1149
- border-radius: 10px;
1224
+ border-radius: 12px;
1150
1225
  transition: color 0.15s ease, background 0.15s ease;
1151
1226
  white-space: nowrap;
1152
1227
  cursor: pointer;
@@ -1177,6 +1252,12 @@ select.input option,
1177
1252
  background: var(--accent-subtle);
1178
1253
  }
1179
1254
 
1255
+ .nav-tab:focus-visible {
1256
+ outline: 2px solid var(--border-strong);
1257
+ outline-offset: -2px;
1258
+ color: var(--text-primary);
1259
+ }
1260
+
1180
1261
  .nav-tab:hover::after {
1181
1262
  width: 24%;
1182
1263
  opacity: 0.4;
@@ -1206,7 +1287,7 @@ select.input option,
1206
1287
  .code-block {
1207
1288
  background: var(--code-bg);
1208
1289
  border: 1px solid var(--code-border);
1209
- border-radius: 12px;
1290
+ border-radius: 14px;
1210
1291
  font-family: 'JetBrains Mono', monospace;
1211
1292
  font-size: 0.8125rem;
1212
1293
  overflow: hidden;
@@ -1501,7 +1582,7 @@ select.input option,
1501
1582
  font-size: 0.875rem;
1502
1583
  font-weight: 500;
1503
1584
  color: var(--text-tertiary);
1504
- border-radius: 10px;
1585
+ border-radius: 12px;
1505
1586
  transition: all 0.12s ease;
1506
1587
  white-space: nowrap;
1507
1588
  }
@@ -1525,6 +1606,12 @@ select.input option,
1525
1606
  background: rgba(0, 0, 0, 0.03);
1526
1607
  }
1527
1608
 
1609
+ .dropdown-item:focus-visible {
1610
+ outline: 2px solid var(--border-strong);
1611
+ outline-offset: -2px;
1612
+ color: var(--text-primary);
1613
+ }
1614
+
1528
1615
  .dropdown-item:hover::before {
1529
1616
  transform: translateY(-50%) translateX(0);
1530
1617
  opacity: 0.3;
@@ -1841,14 +1928,14 @@ select.input option,
1841
1928
  .gradient-card {
1842
1929
  position: relative;
1843
1930
  background: var(--bg-card);
1844
- border-radius: 20px;
1931
+ border-radius: 24px;
1845
1932
  padding: 1px;
1846
1933
  background: linear-gradient(135deg, var(--border-subtle) 0%, var(--border-default) 100%);
1847
1934
  }
1848
1935
 
1849
1936
  .gradient-card-inner {
1850
1937
  background: var(--bg-card);
1851
- border-radius: 19px;
1938
+ border-radius: 23px;
1852
1939
  padding: 1.5rem;
1853
1940
  }
1854
1941
 
@@ -2284,7 +2371,7 @@ html {
2284
2371
  backdrop-filter: blur(20px);
2285
2372
  -webkit-backdrop-filter: blur(20px);
2286
2373
  border: 1px solid rgba(255, 255, 255, 0.3);
2287
- border-radius: 20px;
2374
+ border-radius: 24px;
2288
2375
  box-shadow:
2289
2376
  0 8px 32px rgba(0, 0, 0, 0.08),
2290
2377
  inset 0 1px 0 rgba(255, 255, 255, 0.5);
@@ -2472,3 +2559,19 @@ html {
2472
2559
  animation: fadeInScale 0.2s ease-out;
2473
2560
  }
2474
2561
  }
2562
+
2563
+ /* Reduced-motion reset — when the user asks for less motion, neutralize all
2564
+ animations/transitions (skeleton shimmer, marquee, shimmer buttons, pulses,
2565
+ typing cursors, particles, framer-motion, Radix data-state animations…).
2566
+ Kept last so it wins the cascade. Animations collapse to a single, instant
2567
+ frame rather than vanishing, so end-states still render. */
2568
+ @media (prefers-reduced-motion: reduce) {
2569
+ *,
2570
+ ::before,
2571
+ ::after {
2572
+ animation-duration: 0.01ms !important;
2573
+ animation-iteration-count: 1 !important;
2574
+ transition-duration: 0.01ms !important;
2575
+ scroll-behavior: auto !important;
2576
+ }
2577
+ }