@yuhuanowo/yunui 0.2.12 → 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/dist/ai.d.ts +109 -1
- package/dist/ai.js +451 -64
- package/dist/ai.js.map +1 -1
- package/dist/{chunk-TFZKMJGF.js → chunk-GHO4RCDR.js} +5 -5
- package/dist/{chunk-TFZKMJGF.js.map → chunk-GHO4RCDR.js.map} +1 -1
- package/dist/{chunk-BO6CDGJS.js → chunk-N53PNMPJ.js} +3 -3
- package/dist/chunk-N53PNMPJ.js.map +1 -0
- package/dist/{chunk-65XAR7FY.js → chunk-VXFEANVX.js} +128 -84
- package/dist/chunk-VXFEANVX.js.map +1 -0
- package/dist/index.d.ts +24 -5
- package/dist/index.js +2 -2
- package/dist/patterns.d.ts +220 -3
- package/dist/patterns.js +468 -57
- package/dist/patterns.js.map +1 -1
- package/package.json +1 -1
- package/styles/yunui.css +161 -31
- package/dist/chunk-65XAR7FY.js.map +0 -1
- package/dist/chunk-BO6CDGJS.js.map +0 -1
package/package.json
CHANGED
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: #
|
|
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: #
|
|
173
|
+
--bg-card: #0a0a0a;
|
|
163
174
|
|
|
164
175
|
/* High Contrast Borders */
|
|
165
176
|
--border-hairline: #1a1a1a;
|
|
@@ -424,6 +435,20 @@ body {
|
|
|
424
435
|
-moz-osx-font-smoothing: grayscale;
|
|
425
436
|
}
|
|
426
437
|
|
|
438
|
+
/* Kill the grey tap-highlight box iOS Safari draws over buttons/links on tap —
|
|
439
|
+
it read as an ugly box "popping up" when tapping e.g. pagination. We provide
|
|
440
|
+
our own hover/active feedback, so suppress the native overlay everywhere. */
|
|
441
|
+
a,
|
|
442
|
+
button,
|
|
443
|
+
[role="button"],
|
|
444
|
+
[role="checkbox"],
|
|
445
|
+
[role="tab"],
|
|
446
|
+
.btn,
|
|
447
|
+
label,
|
|
448
|
+
summary {
|
|
449
|
+
-webkit-tap-highlight-color: transparent;
|
|
450
|
+
}
|
|
451
|
+
|
|
427
452
|
/* Scrollbar */
|
|
428
453
|
::-webkit-scrollbar {
|
|
429
454
|
width: 6px;
|
|
@@ -477,7 +502,7 @@ body {
|
|
|
477
502
|
backdrop-filter: blur(16px);
|
|
478
503
|
-webkit-backdrop-filter: blur(16px);
|
|
479
504
|
border: 1px solid var(--border-subtle);
|
|
480
|
-
border-radius:
|
|
505
|
+
border-radius: 20px;
|
|
481
506
|
transition: all 0.2s ease;
|
|
482
507
|
}
|
|
483
508
|
|
|
@@ -509,7 +534,7 @@ body {
|
|
|
509
534
|
.card {
|
|
510
535
|
background: var(--bg-card);
|
|
511
536
|
border: 1px solid var(--border-hairline);
|
|
512
|
-
border-radius:
|
|
537
|
+
border-radius: 20px;
|
|
513
538
|
box-shadow: var(--shadow-xs);
|
|
514
539
|
transition: all 0.15s ease;
|
|
515
540
|
}
|
|
@@ -523,6 +548,11 @@ body {
|
|
|
523
548
|
cursor: pointer;
|
|
524
549
|
}
|
|
525
550
|
|
|
551
|
+
.card-interactive:focus-visible {
|
|
552
|
+
outline: 2px solid var(--border-strong);
|
|
553
|
+
outline-offset: 2px;
|
|
554
|
+
}
|
|
555
|
+
|
|
526
556
|
.card-interactive:hover {
|
|
527
557
|
transform: translateY(-1px);
|
|
528
558
|
box-shadow: var(--shadow-md);
|
|
@@ -553,7 +583,7 @@ body {
|
|
|
553
583
|
backdrop-filter: blur(12px);
|
|
554
584
|
-webkit-backdrop-filter: blur(12px);
|
|
555
585
|
border: 1px solid var(--border-hairline);
|
|
556
|
-
border-radius:
|
|
586
|
+
border-radius: 24px;
|
|
557
587
|
}
|
|
558
588
|
|
|
559
589
|
/* =====================================================
|
|
@@ -616,7 +646,7 @@ body {
|
|
|
616
646
|
gap: 0.5rem;
|
|
617
647
|
font-weight: 500;
|
|
618
648
|
font-size: 0.875rem;
|
|
619
|
-
border-radius:
|
|
649
|
+
border-radius: 14px;
|
|
620
650
|
padding: 0.625rem 1.125rem;
|
|
621
651
|
transition: all 0.15s ease;
|
|
622
652
|
cursor: pointer;
|
|
@@ -624,6 +654,13 @@ body {
|
|
|
624
654
|
border: 1px solid;
|
|
625
655
|
}
|
|
626
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
|
+
|
|
627
664
|
/* Primary - dark outline with subtle bg */
|
|
628
665
|
.btn-primary {
|
|
629
666
|
color: #09090b;
|
|
@@ -724,14 +761,14 @@ body {
|
|
|
724
761
|
.btn-sm {
|
|
725
762
|
padding: 0.375rem 0.75rem;
|
|
726
763
|
font-size: 0.8125rem;
|
|
727
|
-
border-radius:
|
|
764
|
+
border-radius: 11px;
|
|
728
765
|
gap: 0.375rem;
|
|
729
766
|
}
|
|
730
767
|
|
|
731
768
|
.btn-lg {
|
|
732
769
|
padding: 0.875rem 1.5rem;
|
|
733
770
|
font-size: 1rem;
|
|
734
|
-
border-radius:
|
|
771
|
+
border-radius: 16px;
|
|
735
772
|
}
|
|
736
773
|
|
|
737
774
|
.btn:disabled {
|
|
@@ -895,29 +932,42 @@ select.input:focus,
|
|
|
895
932
|
margin-bottom: 0.75rem;
|
|
896
933
|
padding: 0.25rem 0.875rem;
|
|
897
934
|
}
|
|
935
|
+
/* Stack each cell as label-above-value (not label-left/value-right): a
|
|
936
|
+
space-between row pushed wide values (icons, badges, long names, buttons)
|
|
937
|
+
off the card and clipped them. Block flow keeps any cell content full-width
|
|
938
|
+
and on-screen; long unbreakable strings (ids) wrap instead of overflowing. */
|
|
898
939
|
.yunui-table-responsive td {
|
|
899
|
-
display:
|
|
900
|
-
|
|
901
|
-
justify-content: space-between;
|
|
902
|
-
gap: 1rem;
|
|
903
|
-
padding: 0.55rem 0;
|
|
940
|
+
display: block;
|
|
941
|
+
padding: 0.5rem 0;
|
|
904
942
|
border: 0 !important;
|
|
905
|
-
text-align:
|
|
943
|
+
text-align: left;
|
|
944
|
+
overflow-wrap: anywhere;
|
|
906
945
|
}
|
|
907
946
|
.yunui-table-responsive td::before {
|
|
908
947
|
content: attr(data-label);
|
|
948
|
+
display: block;
|
|
949
|
+
font-size: 0.6875rem;
|
|
909
950
|
font-weight: 500;
|
|
910
|
-
color: var(--text-
|
|
911
|
-
text-
|
|
912
|
-
|
|
951
|
+
color: var(--text-tertiary);
|
|
952
|
+
text-transform: uppercase;
|
|
953
|
+
letter-spacing: 0.03em;
|
|
954
|
+
margin-bottom: 0.2rem;
|
|
913
955
|
}
|
|
914
|
-
/* unlabelled cells (
|
|
956
|
+
/* unlabelled cells (row-select checkbox, actions) just render their content */
|
|
915
957
|
.yunui-table-responsive td:not([data-label])::before,
|
|
916
958
|
.yunui-table-responsive td[data-label=""]::before {
|
|
917
959
|
content: none;
|
|
918
960
|
}
|
|
919
|
-
|
|
920
|
-
|
|
961
|
+
/* Desktop-table alignment (text-right / justify-end the cell content carries
|
|
962
|
+
for the wide table) reads wrong in a stacked card — left-align it on mobile.
|
|
963
|
+
The compound selector outranks the Tailwind utility, so no !important and no
|
|
964
|
+
per-cell `md:` rewrite is needed. */
|
|
965
|
+
.yunui-table-responsive td [class~="text-right"],
|
|
966
|
+
.yunui-table-responsive td.text-right {
|
|
967
|
+
text-align: left;
|
|
968
|
+
}
|
|
969
|
+
.yunui-table-responsive td [class~="justify-end"] {
|
|
970
|
+
justify-content: flex-start;
|
|
921
971
|
}
|
|
922
972
|
}
|
|
923
973
|
|
|
@@ -951,7 +1001,7 @@ select.input option,
|
|
|
951
1001
|
padding: 0.5rem 0.75rem;
|
|
952
1002
|
background: var(--bg-glass);
|
|
953
1003
|
border: 1px solid var(--border-default);
|
|
954
|
-
border-radius:
|
|
1004
|
+
border-radius: 14px;
|
|
955
1005
|
font-size: 0.875rem;
|
|
956
1006
|
color: var(--text-primary);
|
|
957
1007
|
outline: none;
|
|
@@ -984,9 +1034,14 @@ select.input option,
|
|
|
984
1034
|
padding: 0.25rem 0.625rem;
|
|
985
1035
|
font-size: 0.6875rem;
|
|
986
1036
|
font-weight: 500;
|
|
987
|
-
border-radius:
|
|
1037
|
+
border-radius: 8px;
|
|
988
1038
|
background: var(--bg-glass-hover);
|
|
989
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;
|
|
990
1045
|
}
|
|
991
1046
|
|
|
992
1047
|
.badge-accent {
|
|
@@ -1029,7 +1084,48 @@ select.input option,
|
|
|
1029
1084
|
}
|
|
1030
1085
|
|
|
1031
1086
|
.text-info {
|
|
1032
|
-
color:
|
|
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);
|
|
1033
1129
|
}
|
|
1034
1130
|
|
|
1035
1131
|
.badge-neutral {
|
|
@@ -1051,7 +1147,7 @@ select.input option,
|
|
|
1051
1147
|
font-size: 0.875rem;
|
|
1052
1148
|
font-weight: 500;
|
|
1053
1149
|
color: var(--text-tertiary);
|
|
1054
|
-
border-radius:
|
|
1150
|
+
border-radius: 12px;
|
|
1055
1151
|
transition: all 0.12s ease;
|
|
1056
1152
|
white-space: nowrap;
|
|
1057
1153
|
}
|
|
@@ -1081,6 +1177,12 @@ select.input option,
|
|
|
1081
1177
|
background: rgba(0, 0, 0, 0.03);
|
|
1082
1178
|
}
|
|
1083
1179
|
|
|
1180
|
+
.nav-item:focus-visible {
|
|
1181
|
+
outline: 2px solid var(--border-strong);
|
|
1182
|
+
outline-offset: -2px;
|
|
1183
|
+
color: var(--text-primary);
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1084
1186
|
.nav-item:hover::before {
|
|
1085
1187
|
transform: translateY(-50%) translateX(0);
|
|
1086
1188
|
opacity: 0.3;
|
|
@@ -1119,7 +1221,7 @@ select.input option,
|
|
|
1119
1221
|
font-weight: 500;
|
|
1120
1222
|
color: var(--text-tertiary);
|
|
1121
1223
|
background: transparent;
|
|
1122
|
-
border-radius:
|
|
1224
|
+
border-radius: 12px;
|
|
1123
1225
|
transition: color 0.15s ease, background 0.15s ease;
|
|
1124
1226
|
white-space: nowrap;
|
|
1125
1227
|
cursor: pointer;
|
|
@@ -1150,6 +1252,12 @@ select.input option,
|
|
|
1150
1252
|
background: var(--accent-subtle);
|
|
1151
1253
|
}
|
|
1152
1254
|
|
|
1255
|
+
.nav-tab:focus-visible {
|
|
1256
|
+
outline: 2px solid var(--border-strong);
|
|
1257
|
+
outline-offset: -2px;
|
|
1258
|
+
color: var(--text-primary);
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1153
1261
|
.nav-tab:hover::after {
|
|
1154
1262
|
width: 24%;
|
|
1155
1263
|
opacity: 0.4;
|
|
@@ -1179,7 +1287,7 @@ select.input option,
|
|
|
1179
1287
|
.code-block {
|
|
1180
1288
|
background: var(--code-bg);
|
|
1181
1289
|
border: 1px solid var(--code-border);
|
|
1182
|
-
border-radius:
|
|
1290
|
+
border-radius: 14px;
|
|
1183
1291
|
font-family: 'JetBrains Mono', monospace;
|
|
1184
1292
|
font-size: 0.8125rem;
|
|
1185
1293
|
overflow: hidden;
|
|
@@ -1474,7 +1582,7 @@ select.input option,
|
|
|
1474
1582
|
font-size: 0.875rem;
|
|
1475
1583
|
font-weight: 500;
|
|
1476
1584
|
color: var(--text-tertiary);
|
|
1477
|
-
border-radius:
|
|
1585
|
+
border-radius: 12px;
|
|
1478
1586
|
transition: all 0.12s ease;
|
|
1479
1587
|
white-space: nowrap;
|
|
1480
1588
|
}
|
|
@@ -1498,6 +1606,12 @@ select.input option,
|
|
|
1498
1606
|
background: rgba(0, 0, 0, 0.03);
|
|
1499
1607
|
}
|
|
1500
1608
|
|
|
1609
|
+
.dropdown-item:focus-visible {
|
|
1610
|
+
outline: 2px solid var(--border-strong);
|
|
1611
|
+
outline-offset: -2px;
|
|
1612
|
+
color: var(--text-primary);
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1501
1615
|
.dropdown-item:hover::before {
|
|
1502
1616
|
transform: translateY(-50%) translateX(0);
|
|
1503
1617
|
opacity: 0.3;
|
|
@@ -1814,14 +1928,14 @@ select.input option,
|
|
|
1814
1928
|
.gradient-card {
|
|
1815
1929
|
position: relative;
|
|
1816
1930
|
background: var(--bg-card);
|
|
1817
|
-
border-radius:
|
|
1931
|
+
border-radius: 24px;
|
|
1818
1932
|
padding: 1px;
|
|
1819
1933
|
background: linear-gradient(135deg, var(--border-subtle) 0%, var(--border-default) 100%);
|
|
1820
1934
|
}
|
|
1821
1935
|
|
|
1822
1936
|
.gradient-card-inner {
|
|
1823
1937
|
background: var(--bg-card);
|
|
1824
|
-
border-radius:
|
|
1938
|
+
border-radius: 23px;
|
|
1825
1939
|
padding: 1.5rem;
|
|
1826
1940
|
}
|
|
1827
1941
|
|
|
@@ -2257,7 +2371,7 @@ html {
|
|
|
2257
2371
|
backdrop-filter: blur(20px);
|
|
2258
2372
|
-webkit-backdrop-filter: blur(20px);
|
|
2259
2373
|
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
2260
|
-
border-radius:
|
|
2374
|
+
border-radius: 24px;
|
|
2261
2375
|
box-shadow:
|
|
2262
2376
|
0 8px 32px rgba(0, 0, 0, 0.08),
|
|
2263
2377
|
inset 0 1px 0 rgba(255, 255, 255, 0.5);
|
|
@@ -2445,3 +2559,19 @@ html {
|
|
|
2445
2559
|
animation: fadeInScale 0.2s ease-out;
|
|
2446
2560
|
}
|
|
2447
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
|
+
}
|