sid-ui 0.1.3 → 0.2.0
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 +1 -1
- package/src/components/BarChart.tsx +3 -3
- package/src/components/CardEffects.tsx +199 -0
- package/src/components/Chip.tsx +250 -0
- package/src/components/CodeInput.tsx +83 -1
- package/src/components/DonutChart.tsx +32 -15
- package/src/components/Glyph.tsx +10 -0
- package/src/components/Notification.tsx +115 -34
- package/src/components/NotificationTrigger.tsx +71 -9
- package/src/components/RadarChart.tsx +220 -0
- package/src/components/RadialBarChart.tsx +147 -0
- package/src/components/Rating.tsx +108 -19
- package/src/components/ScatterChart.tsx +267 -0
- package/src/components/StatusIndicator.tsx +52 -0
- package/src/components/Treemap.tsx +167 -0
- package/src/components/TrendChart.tsx +55 -15
- package/src/components/chartMath.ts +151 -0
- package/src/components/index.ts +41 -3
- package/src/styles/components/card-effects.css +304 -0
- package/src/styles/components/charts.css +407 -7
- package/src/styles/components/chip.css +343 -0
- package/src/styles/components/code-input.css +137 -84
- package/src/styles/components/notification.css +236 -41
- package/src/styles/components/status.css +117 -0
- package/src/styles/components.css +99 -14
|
@@ -183,21 +183,86 @@
|
|
|
183
183
|
.os-chart-line {
|
|
184
184
|
fill: none;
|
|
185
185
|
stroke: var(--os-chart-tone);
|
|
186
|
-
stroke-width: 2;
|
|
186
|
+
stroke-width: 2.25;
|
|
187
187
|
stroke-linecap: round;
|
|
188
188
|
stroke-linejoin: round;
|
|
189
|
+
/* pathLength=1 lets the draw-in run on any length of line. */
|
|
190
|
+
stroke-dasharray: 1;
|
|
191
|
+
stroke-dashoffset: 0;
|
|
192
|
+
animation: os-chart-draw 1.1s cubic-bezier(0.65, 0, 0.35, 1) both;
|
|
189
193
|
}
|
|
190
194
|
|
|
191
195
|
.os-chart-area {
|
|
192
|
-
fill: var(--os-chart-tone);
|
|
193
|
-
fill-opacity: 0.1;
|
|
194
196
|
stroke: none;
|
|
197
|
+
animation: os-chart-fade 0.9s 0.35s ease both;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.os-chart-stop-top {
|
|
201
|
+
stop-color: var(--os-chart-tone);
|
|
202
|
+
stop-opacity: 0.28;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.os-chart-stop-bottom {
|
|
206
|
+
stop-color: var(--os-chart-tone);
|
|
207
|
+
stop-opacity: 0;
|
|
195
208
|
}
|
|
196
209
|
|
|
197
210
|
.os-chart-dot {
|
|
198
211
|
fill: var(--os-chart-tone);
|
|
199
212
|
stroke: var(--color-background-surface);
|
|
200
|
-
stroke-width: 2;
|
|
213
|
+
stroke-width: 2.5;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.os-chart-halo {
|
|
217
|
+
fill: var(--os-chart-tone);
|
|
218
|
+
fill-opacity: 0.16;
|
|
219
|
+
animation: os-chart-halo 0.25s ease-out;
|
|
220
|
+
transform-box: fill-box;
|
|
221
|
+
transform-origin: center;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
@keyframes os-chart-draw {
|
|
225
|
+
from {
|
|
226
|
+
stroke-dashoffset: 1;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
@keyframes os-chart-fade {
|
|
231
|
+
from {
|
|
232
|
+
opacity: 0;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
@keyframes os-chart-halo {
|
|
237
|
+
from {
|
|
238
|
+
transform: scale(0.4);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
@keyframes os-chart-pop {
|
|
243
|
+
from {
|
|
244
|
+
opacity: 0;
|
|
245
|
+
transform: scale(0);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
@keyframes os-chart-grow-y {
|
|
250
|
+
from {
|
|
251
|
+
transform: scaleY(0);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
@keyframes os-chart-grow-x {
|
|
256
|
+
from {
|
|
257
|
+
transform: scaleX(0);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
@media (prefers-reduced-motion: reduce) {
|
|
262
|
+
.os-chart *,
|
|
263
|
+
.os-donut * {
|
|
264
|
+
animation: none !important;
|
|
265
|
+
}
|
|
201
266
|
}
|
|
202
267
|
|
|
203
268
|
.os-chart-crosshair {
|
|
@@ -292,7 +357,15 @@
|
|
|
292
357
|
width: 100%;
|
|
293
358
|
max-width: var(--spacing-6);
|
|
294
359
|
min-height: var(--spacing-0-5);
|
|
295
|
-
border-radius:
|
|
360
|
+
border-radius: 6px 6px 2px 2px;
|
|
361
|
+
background: linear-gradient(
|
|
362
|
+
to top,
|
|
363
|
+
color-mix(in srgb, var(--os-chart-tone) 78%, transparent),
|
|
364
|
+
var(--os-chart-tone)
|
|
365
|
+
);
|
|
366
|
+
transform-origin: bottom;
|
|
367
|
+
animation: os-chart-grow-y 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
|
|
368
|
+
animation-delay: calc(var(--os-bar-i, 0) * 45ms);
|
|
296
369
|
}
|
|
297
370
|
|
|
298
371
|
.os-bars-columns .os-bars-label {
|
|
@@ -312,6 +385,7 @@
|
|
|
312
385
|
display: block;
|
|
313
386
|
background: var(--os-chart-tone);
|
|
314
387
|
transition:
|
|
388
|
+
opacity var(--duration-fast) var(--ease-standard),
|
|
315
389
|
filter var(--duration-fast) var(--ease-standard),
|
|
316
390
|
width var(--duration-slow) var(--ease-standard),
|
|
317
391
|
height var(--duration-slow) var(--ease-standard);
|
|
@@ -367,7 +441,25 @@
|
|
|
367
441
|
.os-bars-rows .os-bars-mark {
|
|
368
442
|
height: 100%;
|
|
369
443
|
min-width: var(--spacing-0-5);
|
|
370
|
-
border-radius:
|
|
444
|
+
border-radius: 2px 6px 6px 2px;
|
|
445
|
+
background: linear-gradient(
|
|
446
|
+
to right,
|
|
447
|
+
color-mix(in srgb, var(--os-chart-tone) 78%, transparent),
|
|
448
|
+
var(--os-chart-tone)
|
|
449
|
+
);
|
|
450
|
+
transform-origin: left;
|
|
451
|
+
animation: os-chart-grow-x 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
|
|
452
|
+
animation-delay: calc(var(--os-bar-i, 0) * 45ms);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
[dir="rtl"] .os-bars-rows .os-bars-mark {
|
|
456
|
+
transform-origin: right;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/* Hovering one bar quiets the rest. */
|
|
460
|
+
.os-bars-columns:has([data-active]) .os-bars-column:not([data-active]) .os-bars-mark,
|
|
461
|
+
.os-bars-rows:has([data-active]) .os-bars-row:not([data-active]) .os-bars-mark {
|
|
462
|
+
opacity: 0.45;
|
|
371
463
|
}
|
|
372
464
|
|
|
373
465
|
.os-bars-rows .os-bars-value {
|
|
@@ -399,13 +491,30 @@
|
|
|
399
491
|
|
|
400
492
|
.os-donut-slice {
|
|
401
493
|
fill: var(--os-chart-tone);
|
|
402
|
-
|
|
494
|
+
transform-box: view-box;
|
|
495
|
+
transform-origin: center;
|
|
496
|
+
transition:
|
|
497
|
+
opacity var(--duration-fast) var(--ease-standard),
|
|
498
|
+
transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
403
499
|
}
|
|
404
500
|
|
|
405
501
|
.os-donut-slice[data-dim] {
|
|
406
502
|
opacity: 0.35;
|
|
407
503
|
}
|
|
408
504
|
|
|
505
|
+
/* The hovered slice steps out of the ring. */
|
|
506
|
+
.os-donut-slice[data-active] {
|
|
507
|
+
transform: scale(1.05);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
/* First paint: a mask sweeps the ring in clockwise. */
|
|
511
|
+
.os-donut-sweep {
|
|
512
|
+
fill: none;
|
|
513
|
+
stroke: #fff;
|
|
514
|
+
stroke-dasharray: 1;
|
|
515
|
+
animation: os-chart-draw 1s cubic-bezier(0.65, 0, 0.35, 1) both;
|
|
516
|
+
}
|
|
517
|
+
|
|
409
518
|
.os-donut-center {
|
|
410
519
|
position: absolute;
|
|
411
520
|
inset: 0;
|
|
@@ -720,3 +829,294 @@
|
|
|
720
829
|
.os-uptime-axis span:last-child {
|
|
721
830
|
text-align: end;
|
|
722
831
|
}
|
|
832
|
+
|
|
833
|
+
/* ── Axis titles and the shared hover lift ────────────────────────── */
|
|
834
|
+
|
|
835
|
+
.os-chart-axis-title {
|
|
836
|
+
fill: var(--color-text-secondary);
|
|
837
|
+
font-size: var(--font-size-sm);
|
|
838
|
+
font-weight: var(--font-weight-medium);
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
.os-chart-tip {
|
|
842
|
+
animation: os-chart-tip 0.16s ease-out;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
@keyframes os-chart-tip {
|
|
846
|
+
from {
|
|
847
|
+
opacity: 0;
|
|
848
|
+
margin-top: 4px;
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
/* ── RadarChart ───────────────────────────────────────────────────── */
|
|
853
|
+
|
|
854
|
+
.os-radar-frame {
|
|
855
|
+
display: flex;
|
|
856
|
+
justify-content: center;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
.os-radar-ring {
|
|
860
|
+
fill: none;
|
|
861
|
+
stroke: var(--color-border);
|
|
862
|
+
stroke-width: 1;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
.os-radar-ring:nth-child(odd) {
|
|
866
|
+
fill: color-mix(in srgb, var(--color-text-primary) 2.5%, transparent);
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
.os-radar-spoke {
|
|
870
|
+
stroke: var(--color-border);
|
|
871
|
+
stroke-width: 1;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
.os-radar-tick {
|
|
875
|
+
font-size: 10px;
|
|
876
|
+
opacity: 0.8;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
.os-radar-label {
|
|
880
|
+
fill: var(--color-text-secondary);
|
|
881
|
+
font-size: var(--font-size-sm);
|
|
882
|
+
font-weight: var(--font-weight-medium);
|
|
883
|
+
transition: fill 0.15s;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
[data-active] > .os-radar-label {
|
|
887
|
+
fill: var(--color-text-primary);
|
|
888
|
+
font-weight: var(--font-weight-semibold);
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
[data-active] > .os-radar-spoke {
|
|
892
|
+
stroke: var(--color-border-emphasized);
|
|
893
|
+
stroke-dasharray: 3 3;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
.os-radar-series {
|
|
897
|
+
animation: os-chart-pop 0.9s cubic-bezier(0.34, 1.4, 0.64, 1) both;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
.os-radar-shape {
|
|
901
|
+
fill: var(--os-chart-tone);
|
|
902
|
+
fill-opacity: 0.16;
|
|
903
|
+
stroke: var(--os-chart-tone);
|
|
904
|
+
stroke-width: 2;
|
|
905
|
+
stroke-linejoin: round;
|
|
906
|
+
transition: fill-opacity 0.2s;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
.os-radar-series:hover .os-radar-shape {
|
|
910
|
+
fill-opacity: 0.28;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
.os-radar-dot {
|
|
914
|
+
fill: var(--os-chart-tone);
|
|
915
|
+
stroke: var(--color-background-surface);
|
|
916
|
+
stroke-width: 2;
|
|
917
|
+
transition: r 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
/* ── ScatterChart ─────────────────────────────────────────────────── */
|
|
921
|
+
|
|
922
|
+
.os-scatter-dot {
|
|
923
|
+
fill: var(--os-chart-tone);
|
|
924
|
+
fill-opacity: 0.85;
|
|
925
|
+
stroke: var(--color-background-surface);
|
|
926
|
+
stroke-width: 1.5;
|
|
927
|
+
transform-box: fill-box;
|
|
928
|
+
transform-origin: center;
|
|
929
|
+
animation: os-chart-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
|
|
930
|
+
transition:
|
|
931
|
+
fill-opacity 0.15s,
|
|
932
|
+
transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
.os-scatter-dot[data-bubble] {
|
|
936
|
+
fill-opacity: 0.55;
|
|
937
|
+
stroke: var(--os-chart-tone);
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
.os-scatter-dot[data-dim] {
|
|
941
|
+
fill-opacity: 0.18;
|
|
942
|
+
stroke-opacity: 0.4;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
.os-scatter-dot[data-active] {
|
|
946
|
+
fill-opacity: 1;
|
|
947
|
+
transform: scale(1.35);
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
.os-scatter-guide line {
|
|
951
|
+
stroke: var(--color-border-emphasized);
|
|
952
|
+
stroke-dasharray: 3 3;
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
.os-scatter-mean line {
|
|
956
|
+
stroke: var(--color-text-secondary);
|
|
957
|
+
stroke-opacity: 0.45;
|
|
958
|
+
stroke-dasharray: 6 4;
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
/* ── RadialBarChart ───────────────────────────────────────────────── */
|
|
962
|
+
|
|
963
|
+
.os-radial {
|
|
964
|
+
display: flex;
|
|
965
|
+
flex-wrap: wrap;
|
|
966
|
+
align-items: center;
|
|
967
|
+
gap: var(--spacing-6);
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
.os-radial-figure {
|
|
971
|
+
position: relative;
|
|
972
|
+
flex-shrink: 0;
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
.os-radial-figure svg {
|
|
976
|
+
display: block;
|
|
977
|
+
overflow: visible;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
.os-radial-ring {
|
|
981
|
+
cursor: default;
|
|
982
|
+
transition: opacity 0.15s;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
.os-radial-ring[data-dim] {
|
|
986
|
+
opacity: 0.35;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
.os-radial-track {
|
|
990
|
+
fill: none;
|
|
991
|
+
stroke: var(--os-chart-tone);
|
|
992
|
+
stroke-opacity: 0.14;
|
|
993
|
+
stroke-linecap: round;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
.os-radial-bar {
|
|
997
|
+
fill: none;
|
|
998
|
+
stroke: var(--os-chart-tone);
|
|
999
|
+
stroke-linecap: round;
|
|
1000
|
+
stroke-dasharray: var(--os-radial-to);
|
|
1001
|
+
filter: drop-shadow(0 2px 4px color-mix(in srgb, var(--os-chart-tone) 35%, transparent));
|
|
1002
|
+
animation: os-radial-sweep 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
|
|
1003
|
+
transition: stroke-dasharray 0.6s cubic-bezier(0.22, 1, 0.36, 1);
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
@keyframes os-radial-sweep {
|
|
1007
|
+
from {
|
|
1008
|
+
stroke-dasharray: 0 1;
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
.os-radial-center {
|
|
1013
|
+
position: absolute;
|
|
1014
|
+
inset: 0;
|
|
1015
|
+
display: flex;
|
|
1016
|
+
flex-direction: column;
|
|
1017
|
+
align-items: center;
|
|
1018
|
+
justify-content: center;
|
|
1019
|
+
padding: 18%;
|
|
1020
|
+
color: var(--color-text-secondary);
|
|
1021
|
+
font-size: var(--font-size-sm);
|
|
1022
|
+
text-align: center;
|
|
1023
|
+
pointer-events: none;
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
.os-radial-center strong {
|
|
1027
|
+
color: var(--color-text-primary);
|
|
1028
|
+
font-size: var(--font-size-2xl);
|
|
1029
|
+
font-weight: var(--font-weight-semibold);
|
|
1030
|
+
font-variant-numeric: tabular-nums;
|
|
1031
|
+
line-height: 1.2;
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
.os-radial-legend {
|
|
1035
|
+
display: grid;
|
|
1036
|
+
min-width: 0;
|
|
1037
|
+
grid-template-columns: auto minmax(0, 1fr) auto auto;
|
|
1038
|
+
gap: var(--spacing-1) var(--spacing-3);
|
|
1039
|
+
align-items: center;
|
|
1040
|
+
margin: 0;
|
|
1041
|
+
padding: 0;
|
|
1042
|
+
list-style: none;
|
|
1043
|
+
font-size: var(--font-size-sm);
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
.os-radial-legend li {
|
|
1047
|
+
display: contents;
|
|
1048
|
+
color: var(--color-text-secondary);
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
.os-radial-legend li > * {
|
|
1052
|
+
padding-block: var(--spacing-1);
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
.os-radial-legend li[data-active] > .os-radial-name {
|
|
1056
|
+
color: var(--color-text-primary);
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
.os-radial-legend strong {
|
|
1060
|
+
color: var(--color-text-primary);
|
|
1061
|
+
font-variant-numeric: tabular-nums;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
.os-radial-of {
|
|
1065
|
+
font-variant-numeric: tabular-nums;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
/* ── Treemap ──────────────────────────────────────────────────────── */
|
|
1069
|
+
|
|
1070
|
+
.os-treemap {
|
|
1071
|
+
overflow: hidden;
|
|
1072
|
+
border-radius: var(--radius-element);
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
.os-treemap-tile {
|
|
1076
|
+
position: absolute;
|
|
1077
|
+
box-sizing: border-box;
|
|
1078
|
+
display: flex;
|
|
1079
|
+
flex-direction: column;
|
|
1080
|
+
justify-content: flex-start;
|
|
1081
|
+
gap: 2px;
|
|
1082
|
+
overflow: hidden;
|
|
1083
|
+
padding: var(--spacing-2) var(--spacing-2-5, var(--spacing-2));
|
|
1084
|
+
border-radius: 6px;
|
|
1085
|
+
background: color-mix(
|
|
1086
|
+
in srgb,
|
|
1087
|
+
var(--os-chart-tone) var(--os-treemap-strength, 100%),
|
|
1088
|
+
var(--color-background-surface)
|
|
1089
|
+
);
|
|
1090
|
+
color: #fff;
|
|
1091
|
+
transform-origin: center;
|
|
1092
|
+
animation: os-chart-pop 0.6s cubic-bezier(0.34, 1.3, 0.64, 1) both;
|
|
1093
|
+
transition:
|
|
1094
|
+
opacity 0.15s,
|
|
1095
|
+
filter 0.15s,
|
|
1096
|
+
box-shadow 0.15s;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
.os-treemap-tile[data-dim] {
|
|
1100
|
+
opacity: 0.55;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
.os-treemap-tile[data-active] {
|
|
1104
|
+
filter: brightness(1.08);
|
|
1105
|
+
box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.65);
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
.os-treemap-name {
|
|
1109
|
+
overflow: hidden;
|
|
1110
|
+
font-size: var(--font-size-sm);
|
|
1111
|
+
font-weight: var(--font-weight-semibold);
|
|
1112
|
+
line-height: 1.25;
|
|
1113
|
+
text-overflow: ellipsis;
|
|
1114
|
+
white-space: nowrap;
|
|
1115
|
+
text-shadow: 0 1px 2px rgb(0 0 0 / 0.18);
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
.os-treemap-value {
|
|
1119
|
+
font-size: var(--font-size-xs);
|
|
1120
|
+
font-variant-numeric: tabular-nums;
|
|
1121
|
+
opacity: 0.9;
|
|
1122
|
+
}
|