@mirror-physics/fractal-ui 0.2.0-next.1 → 0.2.0-next.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/index.css CHANGED
@@ -600,7 +600,7 @@
600
600
  .fractal-datatable-surface {
601
601
  overflow: hidden;
602
602
  border: 1px solid var(--border-subtle);
603
- border-radius: var(--radius-xl, 12px);
603
+ border-radius: var(--radius-md, 6px);
604
604
  background: var(--bg-canvas);
605
605
  }
606
606
  .fractal-datatable-header {
@@ -778,7 +778,7 @@
778
778
  }
779
779
  .fractal-dropdown-option:hover,
780
780
  .fractal-dropdown-option:focus-visible {
781
- background: var(--hover-canvas, var(--bg-surface-2));
781
+ background: var(--hover-surface, var(--bg-surface-2));
782
782
  outline: none;
783
783
  }
784
784
  .fractal-dropdown-separator {
@@ -874,6 +874,35 @@
874
874
  color: var(--accent-default);
875
875
  }
876
876
 
877
+ /* src/components/Checkbox/Checkbox.css */
878
+ .fractal-checkbox {
879
+ display: grid;
880
+ width: 28px;
881
+ height: 28px;
882
+ place-items: center;
883
+ padding: 0;
884
+ border: 0;
885
+ border-radius: var(--radius-sm);
886
+ background: transparent;
887
+ color: var(--fg-secondary);
888
+ cursor: pointer;
889
+ }
890
+ .fractal-checkbox:hover:not(:disabled) {
891
+ background: var(--hover-canvas);
892
+ color: var(--fg-primary);
893
+ }
894
+ .fractal-checkbox--checked {
895
+ color: var(--fg-primary);
896
+ }
897
+ .fractal-checkbox:focus-visible {
898
+ outline: 2px solid var(--border-focus);
899
+ outline-offset: 2px;
900
+ }
901
+ .fractal-checkbox:disabled {
902
+ cursor: not-allowed;
903
+ color: var(--fg-disabled);
904
+ }
905
+
877
906
  /* src/components/SortableTable/SortableTable.css */
878
907
  .fractal-sortable-table {
879
908
  font-family: var(--font-sans);
@@ -882,9 +911,14 @@
882
911
  .fractal-sortable-table-surface {
883
912
  overflow: hidden;
884
913
  border: 1px solid var(--border-subtle);
885
- border-radius: var(--radius-xl, 12px);
914
+ border-radius: var(--radius-md, 6px);
886
915
  background: var(--bg-canvas);
887
916
  }
917
+ .fractal-sortable-table--embedded .fractal-sortable-table-surface {
918
+ border: 0;
919
+ border-top: 1px solid var(--border-subtle);
920
+ border-radius: 0;
921
+ }
888
922
  .fractal-sortable-table-header {
889
923
  display: flex;
890
924
  align-items: center;
@@ -977,6 +1011,53 @@
977
1011
  .fractal-sortable-table-row:hover {
978
1012
  background: var(--bg-surface-1);
979
1013
  }
1014
+ .fractal-sortable-table-row--interactive {
1015
+ cursor: pointer;
1016
+ }
1017
+ .fractal-sortable-table-td--row-action {
1018
+ position: relative;
1019
+ }
1020
+ .fractal-sortable-table-row-action {
1021
+ position: absolute;
1022
+ z-index: 1;
1023
+ top: 0;
1024
+ right: -1px;
1025
+ bottom: 0;
1026
+ display: flex;
1027
+ width: min(280px, calc(200% + 32px));
1028
+ align-items: center;
1029
+ justify-content: flex-end;
1030
+ padding-right: var(--space-4);
1031
+ background:
1032
+ linear-gradient(
1033
+ 90deg,
1034
+ transparent 0%,
1035
+ color-mix(in srgb, var(--hover-surface) 72%, transparent) 52%,
1036
+ var(--hover-surface) 100%);
1037
+ opacity: 0;
1038
+ pointer-events: none;
1039
+ transition: opacity 150ms ease-out;
1040
+ }
1041
+ .fractal-sortable-table-row--interactive:hover .fractal-sortable-table-row-action,
1042
+ .fractal-sortable-table-row--interactive:focus-visible .fractal-sortable-table-row-action {
1043
+ opacity: 1;
1044
+ }
1045
+ .fractal-sortable-table-row-action__icon {
1046
+ display: grid;
1047
+ width: 32px;
1048
+ height: 32px;
1049
+ place-items: center;
1050
+ border: 1px solid var(--border-default);
1051
+ border-radius: var(--radius-full);
1052
+ background: var(--bg-canvas);
1053
+ color: var(--fg-primary);
1054
+ }
1055
+ .fractal-sortable-table-row--interactive:focus-visible {
1056
+ position: relative;
1057
+ z-index: 1;
1058
+ outline: 2px solid var(--border-focus);
1059
+ outline-offset: -2px;
1060
+ }
980
1061
  .fractal-sortable-table-row + .fractal-sortable-table-row .fractal-sortable-table-td {
981
1062
  border-top: 1px solid var(--border-subtle);
982
1063
  }
@@ -996,14 +1077,14 @@
996
1077
  .fractal-sortable-table-td + .fractal-sortable-table-td {
997
1078
  border-left: 1px solid var(--border-subtle);
998
1079
  }
999
- .fractal-sortable-table--sm .fractal-sortable-table-th,
1080
+ .fractal-sortable-table--sm .fractal-sortable-table-th:not(.fractal-sortable-table-th--sortable),
1000
1081
  .fractal-sortable-table--sm .fractal-sortable-table-sort-button {
1001
1082
  padding: 8px 12px;
1002
1083
  }
1003
1084
  .fractal-sortable-table--sm .fractal-sortable-table-td {
1004
1085
  padding: 10px 12px;
1005
1086
  }
1006
- .fractal-sortable-table--lg .fractal-sortable-table-th,
1087
+ .fractal-sortable-table--lg .fractal-sortable-table-th:not(.fractal-sortable-table-th--sortable),
1007
1088
  .fractal-sortable-table--lg .fractal-sortable-table-sort-button {
1008
1089
  padding: 18px 24px;
1009
1090
  }
@@ -1020,7 +1101,7 @@
1020
1101
  display: flex;
1021
1102
  gap: 24px;
1022
1103
  border-bottom: 1px solid var(--border-subtle);
1023
- margin-bottom: 16px;
1104
+ margin-bottom: var(--space-6);
1024
1105
  }
1025
1106
  .fractal-tabs-trigger {
1026
1107
  position: relative;
@@ -1065,6 +1146,61 @@
1065
1146
  display: none;
1066
1147
  }
1067
1148
 
1149
+ /* src/components/ContentSwitcher/ContentSwitcher.css */
1150
+ .fractal-content-switcher {
1151
+ display: inline-flex;
1152
+ gap: 2px;
1153
+ padding: 2px;
1154
+ border: 1px solid var(--border-strong);
1155
+ border-radius: var(--radius-md);
1156
+ background: var(--bg-inverse);
1157
+ font-family: var(--font-sans);
1158
+ }
1159
+ .fractal-content-switcher--full-width {
1160
+ display: flex;
1161
+ width: 100%;
1162
+ }
1163
+ .fractal-content-switcher__item {
1164
+ min-width: 128px;
1165
+ min-height: 40px;
1166
+ padding: 0 var(--space-4);
1167
+ border: 0;
1168
+ background: transparent;
1169
+ color: var(--fg-inverse-secondary);
1170
+ cursor: pointer;
1171
+ font: inherit;
1172
+ font-size: 0.875rem;
1173
+ line-height: 1.25;
1174
+ text-align: center;
1175
+ transition:
1176
+ background-color var(--duration-fast) var(--ease-out),
1177
+ color var(--duration-fast) var(--ease-out),
1178
+ border-radius var(--duration-fast) var(--ease-out);
1179
+ }
1180
+ .fractal-content-switcher--full-width .fractal-content-switcher__item {
1181
+ flex: 1;
1182
+ }
1183
+ .fractal-content-switcher__item:hover:not(:disabled):not(.fractal-content-switcher__item--active) {
1184
+ background: var(--bg-inverse-subtle);
1185
+ color: var(--fg-inverse);
1186
+ }
1187
+ .fractal-content-switcher__item--active {
1188
+ border-radius: var(--radius-sm);
1189
+ background: var(--bg-canvas);
1190
+ color: var(--fg-primary);
1191
+ }
1192
+ .fractal-content-switcher__item:focus-visible {
1193
+ position: relative;
1194
+ z-index: 1;
1195
+ outline: 2px solid var(--border-focus);
1196
+ outline-offset: -2px;
1197
+ }
1198
+ .fractal-content-switcher__item:disabled {
1199
+ cursor: not-allowed;
1200
+ color: var(--fg-inverse-secondary);
1201
+ opacity: 0.5;
1202
+ }
1203
+
1068
1204
  /* src/components/Disclosure/Disclosure.css */
1069
1205
  .fractal-disclosure {
1070
1206
  font-family: var(--font-sans);
@@ -1095,6 +1231,17 @@
1095
1231
  .fractal-disclosure-trigger:hover {
1096
1232
  background: var(--bg-surface-1);
1097
1233
  }
1234
+ .fractal-disclosure--disabled .fractal-disclosure-trigger {
1235
+ color: var(--fg-tertiary);
1236
+ cursor: not-allowed;
1237
+ }
1238
+ .fractal-disclosure--disabled .fractal-disclosure-trigger:hover {
1239
+ background: transparent;
1240
+ }
1241
+ .fractal-disclosure--disabled .fractal-disclosure-icon,
1242
+ .fractal-disclosure--disabled .fractal-disclosure-meta {
1243
+ color: var(--fg-tertiary);
1244
+ }
1098
1245
  .fractal-disclosure-trigger:focus-visible {
1099
1246
  outline: 2px solid var(--border-focus);
1100
1247
  outline-offset: -2px;
@@ -1190,17 +1337,17 @@
1190
1337
  flex-direction: column;
1191
1338
  gap: 0;
1192
1339
  overflow-y: auto;
1193
- padding: var(--space-3) var(--space-2);
1340
+ padding: var(--space-2);
1194
1341
  }
1195
1342
  .fractal-sidebar__section {
1196
1343
  display: flex;
1197
1344
  flex-direction: column;
1198
- gap: var(--space-1);
1345
+ gap: 1px;
1199
1346
  }
1200
1347
  .fractal-sidebar__section + .fractal-sidebar__section {
1201
1348
  position: relative;
1202
- margin-top: var(--space-4);
1203
- padding-top: calc(var(--space-4) + 1px);
1349
+ margin-top: var(--space-2);
1350
+ padding-top: var(--space-2);
1204
1351
  }
1205
1352
  .fractal-sidebar__section + .fractal-sidebar__section::before {
1206
1353
  position: absolute;
@@ -1280,4 +1427,371 @@
1280
1427
  transition: none;
1281
1428
  }
1282
1429
  }
1430
+
1431
+ /* src/components/SidePanel/SidePanel.css */
1432
+ .fractal-side-panel-overlay {
1433
+ position: fixed;
1434
+ inset: 0;
1435
+ z-index: 9998;
1436
+ display: flex;
1437
+ justify-content: flex-end;
1438
+ background: color-mix(in srgb, var(--fg-primary) 16%, transparent);
1439
+ animation: fractal-side-panel-overlay-in 180ms ease-out both;
1440
+ }
1441
+ .fractal-side-panel {
1442
+ display: flex;
1443
+ width: min(100vw, 540px);
1444
+ height: 100%;
1445
+ flex-direction: column;
1446
+ border-left: 1px solid var(--border-subtle);
1447
+ background: var(--bg-canvas);
1448
+ box-shadow: var(--shadow-lg);
1449
+ color: var(--fg-primary);
1450
+ font-family: var(--font-sans);
1451
+ animation: fractal-side-panel-in 180ms cubic-bezier(0.16, 1, 0.3, 1) both;
1452
+ }
1453
+ .fractal-side-panel--sm {
1454
+ width: min(100vw, 420px);
1455
+ }
1456
+ .fractal-side-panel--md {
1457
+ width: min(100vw, 540px);
1458
+ }
1459
+ .fractal-side-panel--lg {
1460
+ width: min(100vw, 680px);
1461
+ }
1462
+ .fractal-side-panel--xl {
1463
+ width: min(100vw, 960px);
1464
+ }
1465
+ .fractal-side-panel__header {
1466
+ display: flex;
1467
+ min-height: 72px;
1468
+ align-items: flex-start;
1469
+ justify-content: space-between;
1470
+ gap: var(--space-4);
1471
+ padding: var(--space-5) var(--space-6) var(--space-4);
1472
+ }
1473
+ .fractal-side-panel__heading {
1474
+ min-width: 0;
1475
+ }
1476
+ .fractal-side-panel__title {
1477
+ margin: 0;
1478
+ font-size: 1rem;
1479
+ font-weight: 500;
1480
+ line-height: 1.4;
1481
+ }
1482
+ .fractal-side-panel__description {
1483
+ margin: var(--space-1) 0 0;
1484
+ color: var(--fg-secondary);
1485
+ font-size: 0.875rem;
1486
+ line-height: 1.4;
1487
+ }
1488
+ .fractal-side-panel__close {
1489
+ display: grid;
1490
+ width: 32px;
1491
+ height: 32px;
1492
+ flex: 0 0 auto;
1493
+ place-items: center;
1494
+ border: 0;
1495
+ border-radius: var(--radius-md);
1496
+ background: transparent;
1497
+ color: var(--fg-secondary);
1498
+ cursor: pointer;
1499
+ }
1500
+ .fractal-side-panel__close:hover {
1501
+ background: var(--hover-surface);
1502
+ color: var(--fg-primary);
1503
+ }
1504
+ .fractal-side-panel__close:focus-visible {
1505
+ outline: 2px solid var(--border-focus);
1506
+ outline-offset: 2px;
1507
+ }
1508
+ .fractal-side-panel__body {
1509
+ min-height: 0;
1510
+ flex: 1;
1511
+ overflow: auto;
1512
+ padding: var(--space-2) var(--space-6) var(--space-6);
1513
+ }
1514
+ .fractal-side-panel__footer {
1515
+ display: flex;
1516
+ justify-content: flex-end;
1517
+ gap: var(--space-2);
1518
+ padding: var(--space-4) var(--space-6);
1519
+ border-top: 1px solid var(--border-subtle);
1520
+ }
1521
+ @media (max-width: 640px) {
1522
+ .fractal-side-panel {
1523
+ width: 100%;
1524
+ }
1525
+ .fractal-side-panel__header {
1526
+ padding: var(--space-4) var(--space-5) var(--space-3);
1527
+ }
1528
+ .fractal-side-panel__body {
1529
+ padding: var(--space-2) var(--space-5) var(--space-5);
1530
+ }
1531
+ .fractal-side-panel__footer {
1532
+ padding: var(--space-3) var(--space-5);
1533
+ }
1534
+ }
1535
+ @keyframes fractal-side-panel-overlay-in {
1536
+ from {
1537
+ opacity: 0;
1538
+ }
1539
+ to {
1540
+ opacity: 1;
1541
+ }
1542
+ }
1543
+ @keyframes fractal-side-panel-in {
1544
+ from {
1545
+ transform: translateX(100%);
1546
+ }
1547
+ to {
1548
+ transform: translateX(0);
1549
+ }
1550
+ }
1551
+ @media (prefers-reduced-motion: reduce) {
1552
+ .fractal-side-panel-overlay,
1553
+ .fractal-side-panel {
1554
+ animation-duration: 0.01ms;
1555
+ }
1556
+ }
1557
+
1558
+ /* src/components/Textarea/Textarea.css */
1559
+ .fractal-textarea {
1560
+ display: block;
1561
+ width: 100%;
1562
+ min-height: 120px;
1563
+ resize: vertical;
1564
+ border: 1px solid var(--border-default);
1565
+ border-radius: var(--radius-md);
1566
+ background: var(--bg-canvas);
1567
+ padding: var(--space-3);
1568
+ color: var(--fg-primary);
1569
+ font: 0.8125rem/1.55 var(--font-mono);
1570
+ }
1571
+ .fractal-textarea::placeholder {
1572
+ color: var(--fg-placeholder);
1573
+ }
1574
+ .fractal-textarea:hover {
1575
+ border-color: var(--fg-tertiary);
1576
+ }
1577
+ .fractal-textarea:focus-visible {
1578
+ outline: none;
1579
+ border-color: var(--border-focus);
1580
+ box-shadow: 0 0 0 2px var(--accent-surface);
1581
+ }
1582
+ .fractal-textarea:disabled {
1583
+ cursor: not-allowed;
1584
+ opacity: 0.5;
1585
+ background: var(--bg-surface-1);
1586
+ }
1587
+
1588
+ /* src/components/TextButton/TextButton.css */
1589
+ .fractal-text-button {
1590
+ display: inline-flex;
1591
+ align-items: center;
1592
+ gap: var(--space-1);
1593
+ border: 0;
1594
+ background: transparent;
1595
+ cursor: pointer;
1596
+ font-family: var(--font-sans);
1597
+ font-weight: 500;
1598
+ line-height: 1.4;
1599
+ padding: 0;
1600
+ text-align: left;
1601
+ transition: color 120ms ease;
1602
+ }
1603
+ .fractal-text-button--primary {
1604
+ color: var(--fg-primary);
1605
+ }
1606
+ .fractal-text-button--primary:hover:not(:disabled) {
1607
+ color: var(--fg-secondary);
1608
+ }
1609
+ .fractal-text-button--secondary {
1610
+ color: var(--fg-secondary);
1611
+ }
1612
+ .fractal-text-button--secondary:hover:not(:disabled) {
1613
+ color: var(--fg-primary);
1614
+ }
1615
+ .fractal-text-button:focus-visible {
1616
+ outline: 2px solid var(--border-focus);
1617
+ outline-offset: 3px;
1618
+ border-radius: var(--radius-sm);
1619
+ }
1620
+ .fractal-text-button:disabled {
1621
+ cursor: not-allowed;
1622
+ opacity: 0.5;
1623
+ }
1624
+ .fractal-text-button--sm {
1625
+ font-size: 0.8125rem;
1626
+ }
1627
+ .fractal-text-button--md {
1628
+ font-size: 0.875rem;
1629
+ }
1630
+ .fractal-text-button__icon {
1631
+ display: inline-grid;
1632
+ place-items: center;
1633
+ }
1634
+
1635
+ /* src/components/FileDropzone/FileDropzone.css */
1636
+ .fractal-file-dropzone {
1637
+ display: grid;
1638
+ gap: var(--space-2);
1639
+ color: var(--fg-primary);
1640
+ font-family: var(--font-sans);
1641
+ }
1642
+ .fractal-file-dropzone__input {
1643
+ display: none;
1644
+ }
1645
+ .fractal-file-dropzone__target {
1646
+ display: flex;
1647
+ width: 100%;
1648
+ min-height: 92px;
1649
+ align-items: center;
1650
+ justify-content: center;
1651
+ gap: var(--space-3);
1652
+ border: 1px dashed var(--border-default);
1653
+ border-radius: var(--radius-md);
1654
+ background: var(--bg-canvas);
1655
+ color: var(--fg-secondary);
1656
+ cursor: pointer;
1657
+ padding: var(--space-4);
1658
+ text-align: left;
1659
+ }
1660
+ .fractal-file-dropzone__target:hover,
1661
+ .fractal-file-dropzone__target[data-dragging] {
1662
+ border-color: var(--border-focus);
1663
+ background: var(--hover-surface);
1664
+ color: var(--fg-primary);
1665
+ }
1666
+ .fractal-file-dropzone__target:focus-visible {
1667
+ outline: 2px solid var(--border-focus);
1668
+ outline-offset: 2px;
1669
+ }
1670
+ .fractal-file-dropzone__target:disabled {
1671
+ cursor: not-allowed;
1672
+ opacity: 0.5;
1673
+ }
1674
+ .fractal-file-dropzone__copy {
1675
+ display: grid;
1676
+ gap: var(--space-1);
1677
+ }
1678
+ .fractal-file-dropzone__title {
1679
+ font-size: 0.875rem;
1680
+ font-weight: 500;
1681
+ line-height: 1.4;
1682
+ }
1683
+ .fractal-file-dropzone__description {
1684
+ color: var(--fg-secondary);
1685
+ font-size: 0.8125rem;
1686
+ line-height: 1.4;
1687
+ }
1688
+ .fractal-file-dropzone__files {
1689
+ display: grid;
1690
+ gap: var(--space-1);
1691
+ margin: 0;
1692
+ padding: 0;
1693
+ list-style: none;
1694
+ }
1695
+ .fractal-file-dropzone__file {
1696
+ display: flex;
1697
+ min-width: 0;
1698
+ align-items: center;
1699
+ gap: var(--space-2);
1700
+ padding: var(--space-2) var(--space-3);
1701
+ border: 1px solid var(--border-subtle);
1702
+ border-radius: var(--radius-md);
1703
+ background: var(--bg-canvas);
1704
+ font-size: 0.8125rem;
1705
+ line-height: 1.4;
1706
+ }
1707
+ .fractal-file-dropzone__file-name {
1708
+ min-width: 0;
1709
+ flex: 1;
1710
+ overflow: hidden;
1711
+ text-overflow: ellipsis;
1712
+ white-space: nowrap;
1713
+ }
1714
+ .fractal-file-dropzone__file-meta {
1715
+ color: var(--fg-secondary);
1716
+ white-space: nowrap;
1717
+ }
1718
+ .fractal-file-dropzone__remove {
1719
+ display: grid;
1720
+ width: 24px;
1721
+ height: 24px;
1722
+ flex: 0 0 auto;
1723
+ place-items: center;
1724
+ border: 0;
1725
+ border-radius: var(--radius-sm);
1726
+ background: transparent;
1727
+ color: var(--fg-secondary);
1728
+ cursor: pointer;
1729
+ }
1730
+ .fractal-file-dropzone__remove:hover {
1731
+ background: var(--hover-surface);
1732
+ color: var(--fg-primary);
1733
+ }
1734
+ .fractal-file-dropzone__remove:focus-visible {
1735
+ outline: 2px solid var(--border-focus);
1736
+ outline-offset: 1px;
1737
+ }
1738
+ .fractal-file-dropzone__remove:disabled {
1739
+ cursor: not-allowed;
1740
+ opacity: 0.5;
1741
+ }
1742
+
1743
+ /* src/components/Pagination/Pagination.css */
1744
+ .fractal-pagination {
1745
+ display: flex;
1746
+ align-items: center;
1747
+ justify-content: space-between;
1748
+ gap: var(--space-3);
1749
+ color: var(--fg-secondary);
1750
+ font-family: var(--font-sans);
1751
+ font-size: 0.8125rem;
1752
+ line-height: 1.4;
1753
+ }
1754
+ .fractal-pagination__controls {
1755
+ display: flex;
1756
+ align-items: center;
1757
+ gap: var(--space-2);
1758
+ }
1759
+ .fractal-pagination__page-size .fractal-dropdown-trigger {
1760
+ padding: 4px 0;
1761
+ border: 0;
1762
+ background: transparent;
1763
+ color: var(--fg-secondary);
1764
+ }
1765
+ .fractal-pagination__page-size .fractal-dropdown-trigger:hover {
1766
+ background: transparent;
1767
+ color: var(--fg-primary);
1768
+ }
1769
+ .fractal-pagination__button {
1770
+ display: grid;
1771
+ width: 28px;
1772
+ height: 28px;
1773
+ place-items: center;
1774
+ border: 1px solid var(--border-default);
1775
+ border-radius: var(--radius-sm);
1776
+ background: var(--bg-canvas);
1777
+ color: var(--fg-secondary);
1778
+ cursor: pointer;
1779
+ }
1780
+ .fractal-pagination__button:hover:not(:disabled) {
1781
+ background: var(--hover-surface);
1782
+ color: var(--fg-primary);
1783
+ }
1784
+ .fractal-pagination__button:focus-visible {
1785
+ outline: 2px solid var(--border-focus);
1786
+ outline-offset: 2px;
1787
+ }
1788
+ .fractal-pagination__button:disabled {
1789
+ cursor: not-allowed;
1790
+ opacity: 0.45;
1791
+ }
1792
+ .fractal-pagination__page {
1793
+ min-width: 44px;
1794
+ text-align: center;
1795
+ white-space: nowrap;
1796
+ }
1283
1797
  /*# sourceMappingURL=index.css.map */