@mirror-physics/fractal-ui 0.2.0-next.73 → 0.2.0-next.75
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/index.cjs +401 -265
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +221 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +33 -1
- package/dist/index.d.ts +33 -1
- package/dist/index.js +405 -272
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -859,6 +859,146 @@
|
|
|
859
859
|
color: var(--error-default);
|
|
860
860
|
}
|
|
861
861
|
|
|
862
|
+
/* src/components/Toast/Toast.css */
|
|
863
|
+
.fractal-toast-viewport {
|
|
864
|
+
position: fixed;
|
|
865
|
+
z-index: 10000;
|
|
866
|
+
display: flex;
|
|
867
|
+
width: min(400px, calc(100vw - var(--space-8, 32px)));
|
|
868
|
+
max-height: calc(100dvh - var(--space-8, 32px));
|
|
869
|
+
flex-direction: column;
|
|
870
|
+
gap: var(--space-2, 8px);
|
|
871
|
+
overflow: visible;
|
|
872
|
+
pointer-events: none;
|
|
873
|
+
}
|
|
874
|
+
.fractal-toast-viewport--top-center {
|
|
875
|
+
top: var(--space-4, 16px);
|
|
876
|
+
left: 50%;
|
|
877
|
+
align-items: center;
|
|
878
|
+
transform: translateX(-50%);
|
|
879
|
+
}
|
|
880
|
+
.fractal-toast-viewport--top-right {
|
|
881
|
+
top: var(--space-4, 16px);
|
|
882
|
+
right: var(--space-4, 16px);
|
|
883
|
+
align-items: flex-end;
|
|
884
|
+
}
|
|
885
|
+
.fractal-toast-viewport--bottom-center {
|
|
886
|
+
bottom: var(--space-4, 16px);
|
|
887
|
+
left: 50%;
|
|
888
|
+
align-items: center;
|
|
889
|
+
transform: translateX(-50%);
|
|
890
|
+
}
|
|
891
|
+
.fractal-toast {
|
|
892
|
+
display: flex;
|
|
893
|
+
box-sizing: border-box;
|
|
894
|
+
width: max-content;
|
|
895
|
+
max-width: 100%;
|
|
896
|
+
min-height: 40px;
|
|
897
|
+
align-items: center;
|
|
898
|
+
gap: var(--space-2, 8px);
|
|
899
|
+
padding: var(--space-1, 4px) var(--space-1, 4px) var(--space-1, 4px) var(--space-3, 12px);
|
|
900
|
+
border: 1px solid var(--border-default);
|
|
901
|
+
border-radius: var(--radius-full, 9999px);
|
|
902
|
+
background: var(--bg-canvas);
|
|
903
|
+
box-shadow: var(--shadow-md);
|
|
904
|
+
color: var(--fg-primary);
|
|
905
|
+
font-family: var(--font-sans);
|
|
906
|
+
font-size: 0.8125rem;
|
|
907
|
+
font-weight: 500;
|
|
908
|
+
line-height: 1.35;
|
|
909
|
+
pointer-events: auto;
|
|
910
|
+
animation: fractal-toast-in-from-top 180ms var(--ease-out, ease-out) both;
|
|
911
|
+
}
|
|
912
|
+
.fractal-toast-viewport--bottom-center .fractal-toast {
|
|
913
|
+
animation-name: fractal-toast-in-from-bottom;
|
|
914
|
+
}
|
|
915
|
+
.fractal-toast__icon {
|
|
916
|
+
display: grid;
|
|
917
|
+
width: 18px;
|
|
918
|
+
height: 18px;
|
|
919
|
+
flex: 0 0 18px;
|
|
920
|
+
place-items: center;
|
|
921
|
+
}
|
|
922
|
+
.fractal-toast--default .fractal-toast__icon {
|
|
923
|
+
color: var(--fg-secondary);
|
|
924
|
+
}
|
|
925
|
+
.fractal-toast--info .fractal-toast__icon {
|
|
926
|
+
color: var(--accent-default);
|
|
927
|
+
}
|
|
928
|
+
.fractal-toast--success .fractal-toast__icon {
|
|
929
|
+
color: var(--success-default);
|
|
930
|
+
}
|
|
931
|
+
.fractal-toast--warning .fractal-toast__icon {
|
|
932
|
+
color: var(--warning-default);
|
|
933
|
+
}
|
|
934
|
+
.fractal-toast--error .fractal-toast__icon {
|
|
935
|
+
color: var(--error-default);
|
|
936
|
+
}
|
|
937
|
+
.fractal-toast__content {
|
|
938
|
+
min-width: 0;
|
|
939
|
+
overflow-wrap: anywhere;
|
|
940
|
+
}
|
|
941
|
+
.fractal-toast__action {
|
|
942
|
+
display: flex;
|
|
943
|
+
flex: 0 0 auto;
|
|
944
|
+
align-items: center;
|
|
945
|
+
}
|
|
946
|
+
.fractal-toast__dismiss {
|
|
947
|
+
display: grid;
|
|
948
|
+
box-sizing: border-box;
|
|
949
|
+
width: 28px;
|
|
950
|
+
height: 28px;
|
|
951
|
+
flex: 0 0 28px;
|
|
952
|
+
padding: 0;
|
|
953
|
+
border: 0;
|
|
954
|
+
border-radius: var(--radius-full, 9999px);
|
|
955
|
+
background: transparent;
|
|
956
|
+
color: var(--fg-secondary);
|
|
957
|
+
cursor: pointer;
|
|
958
|
+
place-items: center;
|
|
959
|
+
}
|
|
960
|
+
.fractal-toast__dismiss:hover {
|
|
961
|
+
background: var(--hover-surface);
|
|
962
|
+
color: var(--fg-primary);
|
|
963
|
+
}
|
|
964
|
+
.fractal-toast__dismiss:focus-visible {
|
|
965
|
+
outline: 2px solid var(--border-focus);
|
|
966
|
+
outline-offset: -2px;
|
|
967
|
+
}
|
|
968
|
+
@keyframes fractal-toast-in-from-top {
|
|
969
|
+
from {
|
|
970
|
+
opacity: 0;
|
|
971
|
+
transform: translateY(-12px);
|
|
972
|
+
}
|
|
973
|
+
to {
|
|
974
|
+
opacity: 1;
|
|
975
|
+
transform: translateY(0);
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
@keyframes fractal-toast-in-from-bottom {
|
|
979
|
+
from {
|
|
980
|
+
opacity: 0;
|
|
981
|
+
transform: translateY(12px);
|
|
982
|
+
}
|
|
983
|
+
to {
|
|
984
|
+
opacity: 1;
|
|
985
|
+
transform: translateY(0);
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
@media (max-width: 640px) {
|
|
989
|
+
.fractal-toast-viewport {
|
|
990
|
+
width: calc(100vw - var(--space-6, 24px));
|
|
991
|
+
}
|
|
992
|
+
.fractal-toast-viewport--top-right {
|
|
993
|
+
right: var(--space-3, 12px);
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
@media (prefers-reduced-motion: reduce) {
|
|
997
|
+
.fractal-toast {
|
|
998
|
+
animation-duration: 0.01ms;
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
|
|
862
1002
|
/* src/components/Toggle/Toggle.css */
|
|
863
1003
|
.fractal-toggle {
|
|
864
1004
|
display: inline-flex;
|
|
@@ -1460,6 +1600,87 @@
|
|
|
1460
1600
|
color: var(--fg-disabled);
|
|
1461
1601
|
}
|
|
1462
1602
|
|
|
1603
|
+
/* src/components/Radio/Radio.css */
|
|
1604
|
+
.fractal-radio {
|
|
1605
|
+
position: relative;
|
|
1606
|
+
display: grid;
|
|
1607
|
+
grid-template-columns: 18px minmax(0, 1fr);
|
|
1608
|
+
align-items: start;
|
|
1609
|
+
gap: var(--space-2, 8px);
|
|
1610
|
+
color: var(--fg-primary);
|
|
1611
|
+
cursor: pointer;
|
|
1612
|
+
font-family: var(--font-sans);
|
|
1613
|
+
}
|
|
1614
|
+
.fractal-radio__input {
|
|
1615
|
+
position: absolute;
|
|
1616
|
+
width: 18px;
|
|
1617
|
+
height: 18px;
|
|
1618
|
+
margin: 0;
|
|
1619
|
+
opacity: 0;
|
|
1620
|
+
cursor: inherit;
|
|
1621
|
+
}
|
|
1622
|
+
.fractal-radio__control {
|
|
1623
|
+
display: grid;
|
|
1624
|
+
width: 18px;
|
|
1625
|
+
height: 18px;
|
|
1626
|
+
box-sizing: border-box;
|
|
1627
|
+
place-items: center;
|
|
1628
|
+
border: 1px solid var(--border-strong);
|
|
1629
|
+
border-radius: var(--radius-full, 9999px);
|
|
1630
|
+
background: var(--bg-canvas);
|
|
1631
|
+
transition: border-color 120ms ease, box-shadow 120ms ease;
|
|
1632
|
+
}
|
|
1633
|
+
.fractal-radio__dot {
|
|
1634
|
+
width: 8px;
|
|
1635
|
+
height: 8px;
|
|
1636
|
+
border-radius: var(--radius-full, 9999px);
|
|
1637
|
+
background: var(--accent-default);
|
|
1638
|
+
opacity: 0;
|
|
1639
|
+
transform: scale(0.5);
|
|
1640
|
+
transition: opacity 120ms ease, transform 120ms ease;
|
|
1641
|
+
}
|
|
1642
|
+
.fractal-radio__input:checked + .fractal-radio__control {
|
|
1643
|
+
border-color: var(--accent-default);
|
|
1644
|
+
}
|
|
1645
|
+
.fractal-radio__input:checked + .fractal-radio__control .fractal-radio__dot {
|
|
1646
|
+
opacity: 1;
|
|
1647
|
+
transform: scale(1);
|
|
1648
|
+
}
|
|
1649
|
+
.fractal-radio:hover:not(.fractal-radio--disabled) .fractal-radio__control {
|
|
1650
|
+
border-color: var(--fg-secondary);
|
|
1651
|
+
}
|
|
1652
|
+
.fractal-radio__input:focus-visible + .fractal-radio__control {
|
|
1653
|
+
box-shadow: 0 0 0 2px var(--bg-canvas), 0 0 0 4px var(--border-focus);
|
|
1654
|
+
}
|
|
1655
|
+
.fractal-radio__content {
|
|
1656
|
+
display: grid;
|
|
1657
|
+
min-width: 0;
|
|
1658
|
+
gap: 2px;
|
|
1659
|
+
}
|
|
1660
|
+
.fractal-radio__label {
|
|
1661
|
+
font-size: 0.8125rem;
|
|
1662
|
+
line-height: 18px;
|
|
1663
|
+
}
|
|
1664
|
+
.fractal-radio__description {
|
|
1665
|
+
color: var(--fg-secondary);
|
|
1666
|
+
font-size: 0.75rem;
|
|
1667
|
+
line-height: 1.4;
|
|
1668
|
+
}
|
|
1669
|
+
.fractal-radio--disabled {
|
|
1670
|
+
color: var(--fg-disabled);
|
|
1671
|
+
cursor: not-allowed;
|
|
1672
|
+
}
|
|
1673
|
+
.fractal-radio--disabled .fractal-radio__control {
|
|
1674
|
+
border-color: var(--border-subtle);
|
|
1675
|
+
background: var(--bg-surface-1);
|
|
1676
|
+
}
|
|
1677
|
+
.fractal-radio--disabled .fractal-radio__dot {
|
|
1678
|
+
background: var(--fg-disabled);
|
|
1679
|
+
}
|
|
1680
|
+
.fractal-radio--disabled .fractal-radio__description {
|
|
1681
|
+
color: var(--fg-disabled);
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1463
1684
|
/* src/components/SortableTable/SortableTable.css */
|
|
1464
1685
|
.fractal-sortable-table {
|
|
1465
1686
|
font-family: var(--font-sans);
|