@xsolla/xui-core 0.217.0 → 0.218.1

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/index.js CHANGED
@@ -80,7 +80,6 @@ __export(index_exports, {
80
80
  useResolvedTheme: () => useResolvedTheme
81
81
  });
82
82
  module.exports = __toCommonJS(index_exports);
83
- var import_react3 = __toESM(require("react"));
84
83
 
85
84
  // src/tokens/dark.json
86
85
  var dark_default = {
@@ -1387,6 +1386,441 @@ var ltg_dark_default = {
1387
1386
  }
1388
1387
  };
1389
1388
 
1389
+ // src/tokens/ltg-light.json
1390
+ var ltg_light_default = {
1391
+ background: {
1392
+ primary: "#ffffff",
1393
+ secondary: "#f2f2f2",
1394
+ brand: {
1395
+ primary: "#c9eb6a",
1396
+ secondary: "#eff9d2"
1397
+ },
1398
+ brandExtra: {
1399
+ primary: "#535e99",
1400
+ secondary: "#b0baee"
1401
+ },
1402
+ inverse: "#0d143a",
1403
+ static: {
1404
+ dark: "#0d143a",
1405
+ light: "#ffffff"
1406
+ },
1407
+ success: {
1408
+ primary: "#95ff80",
1409
+ secondary: "#bfffb2"
1410
+ },
1411
+ warning: {
1412
+ primary: "#ffc380",
1413
+ secondary: "#ffdbb2"
1414
+ },
1415
+ alert: {
1416
+ primary: "#f67055",
1417
+ secondary: "#ffbfb2"
1418
+ },
1419
+ neutral: {
1420
+ primary: "#888a96",
1421
+ secondary: "#d9dadd"
1422
+ }
1423
+ },
1424
+ content: {
1425
+ primary: "#000000",
1426
+ secondary: "#52535b",
1427
+ tertiary: "#898b97",
1428
+ brand: {
1429
+ primary: "#535e99",
1430
+ secondary: "#31cae8"
1431
+ },
1432
+ brandExtra: {
1433
+ primary: "#0d143a",
1434
+ secondary: "#535e99"
1435
+ },
1436
+ inverse: "#ffffff",
1437
+ static: {
1438
+ light: "#ffffff",
1439
+ dark: "#000000"
1440
+ },
1441
+ success: {
1442
+ primary: "#368f24",
1443
+ secondary: "#3dc322"
1444
+ },
1445
+ warning: {
1446
+ primary: "#c37822",
1447
+ secondary: "#f6ab55"
1448
+ },
1449
+ alert: {
1450
+ primary: "#e84f30",
1451
+ secondary: "#f67055"
1452
+ },
1453
+ neutral: {
1454
+ primary: "#3e4046",
1455
+ secondary: "#6e707c"
1456
+ },
1457
+ on: {
1458
+ brand: "#0d143a",
1459
+ brandExtra: "#ffffff",
1460
+ success: "#000000",
1461
+ warning: "#000000",
1462
+ alert: "#ffffff",
1463
+ neutral: "#000000"
1464
+ }
1465
+ },
1466
+ border: {
1467
+ primary: "rgba(0, 0, 0, 0)",
1468
+ secondary: "rgba(0, 0, 0, 0)",
1469
+ brand: "rgba(0, 0, 0, 0)",
1470
+ brandExtra: "rgba(0, 0, 0, 0)",
1471
+ inverse: "rgba(0, 0, 0, 0)",
1472
+ success: "rgba(0, 0, 0, 0)",
1473
+ warning: "rgba(0, 0, 0, 0)",
1474
+ alert: "rgba(0, 0, 0, 0)",
1475
+ neutral: "rgba(0, 0, 0, 0)"
1476
+ },
1477
+ overlay: {
1478
+ mono: "rgba(0, 0, 0, 0.05)",
1479
+ brand: "rgba(201, 235, 106, 0.3)",
1480
+ brandExtra: "rgba(83, 94, 153, 0.3)",
1481
+ success: "rgba(149, 255, 128, 0.24)",
1482
+ warning: "rgba(255, 195, 128, 0.28)",
1483
+ alert: "rgba(255, 149, 128, 0.24)",
1484
+ neutral: "rgba(136, 138, 150, 0.3)",
1485
+ monoHover: "rgba(0, 0, 0, 0.1)"
1486
+ },
1487
+ layer: {
1488
+ scrim: "rgba(0, 0, 0, 0.5)",
1489
+ float: "rgba(255, 255, 255, 0.75)"
1490
+ },
1491
+ data: {
1492
+ brand: {
1493
+ s12: "#e5fbff",
1494
+ s11: "#ccf6ff",
1495
+ s10: "#b2f2ff",
1496
+ s9: "#80eaff",
1497
+ s8: "#b0baee",
1498
+ s7: "#535e99",
1499
+ s6: "#22a8c3",
1500
+ s5: "#1b8398",
1501
+ s4: "#0d143a",
1502
+ s3: "#0b3841",
1503
+ s2: "#041316"
1504
+ },
1505
+ contrast: {
1506
+ pink: "#ffa5eb",
1507
+ orange: "#d9875e",
1508
+ yellow: "#9c8f6c",
1509
+ green: "#c9eb6a",
1510
+ cyan: "#67cad7",
1511
+ grey: "#898b97",
1512
+ lilac: "#aea0ff",
1513
+ purple: "#5040ad"
1514
+ },
1515
+ neutral: {
1516
+ n11: "rgba(0, 0, 0, 0.05)",
1517
+ n12: "#f2f2f2",
1518
+ n13: "#d7dee0"
1519
+ }
1520
+ },
1521
+ control: {
1522
+ brand: {
1523
+ primary: {
1524
+ bg: "#c9eb6a",
1525
+ bgHover: "#eff9d2",
1526
+ bgPress: "#aac858",
1527
+ bgDisable: "#d0d1d5",
1528
+ border: "rgba(0, 0, 0, 0)",
1529
+ borderHover: "rgba(0, 0, 0, 0)",
1530
+ borderPress: "rgba(0, 0, 0, 0)",
1531
+ borderDisable: "rgba(0, 0, 0, 0)"
1532
+ },
1533
+ secondary: {
1534
+ bg: "#eff9d2",
1535
+ bgHover: "#e4f5b3",
1536
+ bgPress: "#dcf29e",
1537
+ border: "rgba(0, 0, 0, 0)",
1538
+ borderHover: "rgba(0, 0, 0, 0)",
1539
+ borderPress: "rgba(0, 0, 0, 0)"
1540
+ },
1541
+ tertiary: {
1542
+ bg: "rgba(0, 0, 0, 0)",
1543
+ bgHover: "rgba(201, 235, 106, 0.15)",
1544
+ bgPress: "rgba(201, 235, 106, 0.25)",
1545
+ border: "rgba(0, 0, 0, 0)",
1546
+ borderHover: "rgba(0, 0, 0, 0)",
1547
+ borderPress: "rgba(0, 0, 0, 0)"
1548
+ },
1549
+ text: {
1550
+ primary: "#0d143a",
1551
+ secondary: "#0d143a",
1552
+ tertiary: "#63762d",
1553
+ disable: "#898b97",
1554
+ ghost: "#63762d"
1555
+ },
1556
+ ghost: {
1557
+ bg: "rgba(0, 0, 0, 0)",
1558
+ bgHover: "rgba(99, 118, 45, 0.04)",
1559
+ bgPress: "rgba(99, 118, 45, 0.08)",
1560
+ border: "rgba(0, 0, 0, 0)",
1561
+ borderHover: "rgba(0, 0, 0, 0)",
1562
+ borderPress: "rgba(0, 0, 0, 0)"
1563
+ }
1564
+ },
1565
+ mono: {
1566
+ primary: {
1567
+ bg: "#1a1a1a",
1568
+ bgHover: "#333333",
1569
+ bgPress: "#000000",
1570
+ border: "rgba(0, 0, 0, 0)",
1571
+ borderHover: "rgba(0, 0, 0, 0)",
1572
+ borderPress: "rgba(0, 0, 0, 0)"
1573
+ },
1574
+ secondary: {
1575
+ bg: "rgba(26, 26, 26, 0.12)",
1576
+ bgHover: "rgba(51, 51, 51, 0.12)",
1577
+ bgPress: "rgba(0, 0, 0, 0.12)",
1578
+ border: "rgba(0, 0, 0, 0)",
1579
+ borderHover: "rgba(0, 0, 0, 0)",
1580
+ borderPress: "rgba(0, 0, 0, 0)"
1581
+ },
1582
+ tertiary: {
1583
+ bg: "rgba(0, 0, 0, 0)",
1584
+ bgHover: "rgba(0, 0, 0, 0.1)",
1585
+ bgPress: "rgba(0, 0, 0, 0.2)",
1586
+ border: "rgba(0, 0, 0, 0)",
1587
+ borderHover: "rgba(0, 0, 0, 0)",
1588
+ borderPress: "rgba(0, 0, 0, 0)"
1589
+ },
1590
+ text: {
1591
+ primary: "#ffffff",
1592
+ secondary: "#000000",
1593
+ tertiary: "#000000",
1594
+ ghost: "#000000"
1595
+ },
1596
+ ghost: {
1597
+ bg: "rgba(0, 0, 0, 0)",
1598
+ bgHover: "rgba(0, 0, 0, 0.04)",
1599
+ bgPress: "rgba(0, 0, 0, 0.08)",
1600
+ border: "rgba(0, 0, 0, 0)",
1601
+ borderHover: "rgba(0, 0, 0, 0)",
1602
+ borderPress: "rgba(0, 0, 0, 0)"
1603
+ }
1604
+ },
1605
+ brandExtra: {
1606
+ primary: {
1607
+ bg: "#535e99",
1608
+ bgHover: "#0d143a",
1609
+ bgPress: "#30396a",
1610
+ border: "rgba(0, 0, 0, 0)",
1611
+ borderHover: "rgba(0, 0, 0, 0)",
1612
+ borderPress: "rgba(0, 0, 0, 0)"
1613
+ },
1614
+ secondary: {
1615
+ bg: "#b0baee",
1616
+ bgHover: "#949ed5",
1617
+ bgPress: "#828cc4",
1618
+ border: "rgba(0, 0, 0, 0)",
1619
+ borderHover: "rgba(0, 0, 0, 0)",
1620
+ borderPress: "rgba(0, 0, 0, 0)"
1621
+ },
1622
+ tertiary: {
1623
+ bg: "rgba(0, 0, 0, 0)",
1624
+ bgHover: "rgba(83, 94, 153, 0.1)",
1625
+ bgPress: "rgba(83, 94, 153, 0.2)",
1626
+ border: "rgba(0, 0, 0, 0)",
1627
+ borderHover: "rgba(0, 0, 0, 0)",
1628
+ borderPress: "rgba(0, 0, 0, 0)"
1629
+ },
1630
+ text: {
1631
+ primary: "#ffffff",
1632
+ secondary: "#000000",
1633
+ tertiary: "#0d143a",
1634
+ ghost: "#0d143a"
1635
+ },
1636
+ ghost: {
1637
+ bg: "rgba(0, 0, 0, 0)",
1638
+ bgHover: "rgba(13, 20, 58, 0.04)",
1639
+ bgPress: "rgba(13, 20, 58, 0.08)",
1640
+ border: "rgba(0, 0, 0, 0)",
1641
+ borderHover: "rgba(0, 0, 0, 0)",
1642
+ borderPress: "rgba(0, 0, 0, 0)"
1643
+ }
1644
+ },
1645
+ alert: {
1646
+ bg: "#ffbfb2",
1647
+ border: "rgba(0, 0, 0, 0)",
1648
+ primary: {
1649
+ bg: "#e84f30",
1650
+ bgHover: "#f67055",
1651
+ bgPress: "#c33d22",
1652
+ border: "rgba(0, 0, 0, 0)",
1653
+ borderHover: "rgba(0, 0, 0, 0)",
1654
+ borderPress: "rgba(0, 0, 0, 0)"
1655
+ },
1656
+ secondary: {
1657
+ bg: "#ffbfb2",
1658
+ bgHover: "#ffddd6",
1659
+ bgPress: "#ff9580",
1660
+ border: "rgba(0, 0, 0, 0)",
1661
+ borderHover: "rgba(0, 0, 0, 0)",
1662
+ borderPress: "rgba(0, 0, 0, 0)"
1663
+ },
1664
+ tertiary: {
1665
+ bg: "rgba(232, 79, 48, 0)",
1666
+ bgHover: "rgba(232, 79, 48, 0.07)",
1667
+ bgPress: "rgba(232, 79, 48, 0.12)",
1668
+ border: "rgba(0, 0, 0, 0)",
1669
+ borderHover: "rgba(0, 0, 0, 0)",
1670
+ borderPress: "rgba(0, 0, 0, 0)"
1671
+ },
1672
+ text: {
1673
+ primary: "#ffffff",
1674
+ secondary: "#000000",
1675
+ tertiary: "#c33d22",
1676
+ ghost: "#c33d22"
1677
+ },
1678
+ ghost: {
1679
+ bg: "rgba(0, 0, 0, 0)",
1680
+ bgHover: "rgba(195, 61, 34, 0.04)",
1681
+ bgPress: "rgba(195, 61, 34, 0.08)",
1682
+ border: "rgba(0, 0, 0, 0)",
1683
+ borderHover: "rgba(0, 0, 0, 0)",
1684
+ borderPress: "rgba(0, 0, 0, 0)"
1685
+ }
1686
+ },
1687
+ input: {
1688
+ bg: "#ffffff",
1689
+ bgHover: "#f2f2f2",
1690
+ bgDisable: "#d3d3d3",
1691
+ border: "#d0d1d5",
1692
+ borderHover: "#898b97",
1693
+ borderDisable: "rgba(0, 0, 0, 0)",
1694
+ text: "#000000",
1695
+ placeholder: "#6e6e6e",
1696
+ textDisable: "#898b97"
1697
+ },
1698
+ focus: {
1699
+ bg: "#ffffff",
1700
+ border: "#c9eb6b"
1701
+ },
1702
+ check: {
1703
+ bg: "#c9eb6b",
1704
+ bgHover: "#b8e53e",
1705
+ bgDisable: "rgba(0, 0, 0, 0.2)",
1706
+ border: "#c9eb6b",
1707
+ borderHover: "#b8e53e",
1708
+ borderDisable: "rgba(0, 0, 0, 0)",
1709
+ icon: "#0d143a"
1710
+ },
1711
+ faint: {
1712
+ bg: "rgba(0, 0, 0, 0.15)",
1713
+ bgHover: "rgba(0, 0, 0, 0.2)",
1714
+ border: "rgba(0, 0, 0, 0)",
1715
+ borderHover: "rgba(0, 0, 0, 0)"
1716
+ },
1717
+ slider: {
1718
+ bg: "#c9eb6b",
1719
+ bgHover: "#d9f198",
1720
+ bgDisable: "rgba(0, 0, 0, 0.25)"
1721
+ },
1722
+ switch: {
1723
+ bg: "#c9eb6b",
1724
+ bgHover: "#b8e53e",
1725
+ bgDisable: "rgba(0, 0, 0, 0.25)",
1726
+ border: "rgba(0, 0, 0, 0)",
1727
+ borderHover: "rgba(0, 0, 0, 0)",
1728
+ borderDisable: "rgba(0, 0, 0, 0)"
1729
+ },
1730
+ knob: {
1731
+ bg: "#c9eb6b",
1732
+ bgHover: "#eff9d2",
1733
+ bgActive: "#c9eb6b",
1734
+ bgActiveHover: "#eff9d2",
1735
+ bgInactive: "#ffffff",
1736
+ bgInactiveHover: "#f4f5f6",
1737
+ bgDisable: "#8c8c8c"
1738
+ },
1739
+ text: {
1740
+ primary: "#000000",
1741
+ disable: "rgba(0, 0, 0, 0.36)"
1742
+ },
1743
+ link: {
1744
+ primary: "#aea0ff",
1745
+ primaryHover: "#5040ad",
1746
+ secondary: "#aea0ff",
1747
+ secondaryHover: "#5040ad"
1748
+ },
1749
+ segmented: {
1750
+ bg: "rgba(0, 0, 0, 0.08)",
1751
+ bgHover: "rgba(0, 0, 0, 0.08)",
1752
+ bgActive: "#ffffff",
1753
+ border: "rgba(0, 0, 0, 0.1)",
1754
+ borderHover: "rgba(0, 0, 0, 0.1)",
1755
+ borderActive: "rgba(0, 0, 0, 0)",
1756
+ text: "#000000",
1757
+ textDisable: "rgba(0, 0, 0, 0.36)"
1758
+ },
1759
+ tagLabel: {
1760
+ product: {
1761
+ bg: "#d9ff66",
1762
+ text: "#000000",
1763
+ textCompact: "rgba(0, 0, 0, 0.48)"
1764
+ },
1765
+ rarity: {
1766
+ bg: "#141d1f",
1767
+ text: "#22a8c3"
1768
+ },
1769
+ name: {
1770
+ bg: "rgba(155, 165, 145, 0.1)",
1771
+ text: "#000000"
1772
+ },
1773
+ account: {
1774
+ bg: "#9580ff",
1775
+ text: "#000000",
1776
+ textCompact: "rgba(0, 0, 0, 0.48)"
1777
+ },
1778
+ id: {
1779
+ bg: "#dddfd8",
1780
+ bgSeries: "#000000",
1781
+ textSeries: "#d7dee0",
1782
+ textNumber: "#000000",
1783
+ textCompact: "rgba(0, 0, 0, 0.48)"
1784
+ },
1785
+ subentity: {
1786
+ bg: "#a9aca0",
1787
+ text: "#000000"
1788
+ },
1789
+ item: {
1790
+ bg: "#55dcf6",
1791
+ text: "#000000",
1792
+ textCompact: "rgba(0, 0, 0, 0.48)"
1793
+ }
1794
+ },
1795
+ toast: {
1796
+ bg: "#0d143a"
1797
+ },
1798
+ toggleButton: {
1799
+ bg: "rgba(0, 0, 0, 0.08)",
1800
+ bgHover: "rgba(0, 0, 0, 0.12)",
1801
+ bgActive: "rgba(201, 235, 107, 0.4)",
1802
+ bgDisable: "rgba(0, 0, 0, 0.25)",
1803
+ border: "rgba(0, 0, 0, 0)",
1804
+ borderHover: "rgba(0, 0, 0, 0)",
1805
+ borderActive: "rgba(0, 0, 0, 0)",
1806
+ borderDisable: "rgba(0, 0, 0, 0)",
1807
+ text: "#000000",
1808
+ textActive: "#000000",
1809
+ textDisable: "rgba(0, 0, 0, 0.36)"
1810
+ },
1811
+ appButton: {
1812
+ bg: "#dadbd7",
1813
+ bgHover: "#c1c2bc",
1814
+ bgPress: "#a8aaa2",
1815
+ border: "rgba(0, 0, 0, 0)",
1816
+ borderHover: "rgba(0, 0, 0, 0)",
1817
+ borderPress: "rgba(0, 0, 0, 0)",
1818
+ text: "#000000",
1819
+ textDisable: "#999999"
1820
+ }
1821
+ }
1822
+ };
1823
+
1390
1824
  // src/tokens/blueprints.json
1391
1825
  var blueprints_default = {
1392
1826
  background: {
@@ -2699,6 +3133,7 @@ var colors = {
2699
3133
  "pentagram-dark": dark_default,
2700
3134
  "pentagram-light": light_default,
2701
3135
  "ltg-dark": ltg_dark_default,
3136
+ "ltg-light": ltg_light_default,
2702
3137
  blueprints: blueprints_default,
2703
3138
  "corpsite-dark": corpsite_dark_default,
2704
3139
  "corpsite-light": corpsite_light_default
@@ -3485,6 +3920,1576 @@ var getTypographyVariant = (productContext, variant) => {
3485
3920
  return void 0;
3486
3921
  };
3487
3922
 
3923
+ // src/theme/sizing/button.ts
3924
+ var button = (size) => {
3925
+ const configs = {
3926
+ xl: {
3927
+ height: 64,
3928
+ padding: 20,
3929
+ fontSize: 20,
3930
+ lineHeight: 22,
3931
+ sublabelFontSize: 18,
3932
+ spinnerSize: 24,
3933
+ iconSize: 32,
3934
+ iconContainerSize: 64,
3935
+ borderRadius: shape.button.xl.borderRadius,
3936
+ labelIconSize: 22,
3937
+ labelIconGap: 6
3938
+ },
3939
+ lg: {
3940
+ height: 56,
3941
+ padding: 18,
3942
+ fontSize: 18,
3943
+ lineHeight: 20,
3944
+ sublabelFontSize: 16,
3945
+ spinnerSize: 24,
3946
+ iconSize: 28,
3947
+ iconContainerSize: 56,
3948
+ borderRadius: shape.button.lg.borderRadius,
3949
+ labelIconSize: 20,
3950
+ labelIconGap: 4
3951
+ },
3952
+ md: {
3953
+ height: 48,
3954
+ padding: 16,
3955
+ fontSize: 16,
3956
+ lineHeight: 18,
3957
+ sublabelFontSize: 14,
3958
+ spinnerSize: 24,
3959
+ iconSize: 24,
3960
+ iconContainerSize: 48,
3961
+ borderRadius: shape.button.md.borderRadius,
3962
+ labelIconSize: 18,
3963
+ labelIconGap: 4
3964
+ },
3965
+ sm: {
3966
+ height: 40,
3967
+ padding: 14,
3968
+ fontSize: 14,
3969
+ lineHeight: 16,
3970
+ sublabelFontSize: 12,
3971
+ spinnerSize: 24,
3972
+ iconSize: 20,
3973
+ iconContainerSize: 40,
3974
+ borderRadius: shape.button.sm.borderRadius,
3975
+ labelIconSize: 16,
3976
+ labelIconGap: 4
3977
+ },
3978
+ xs: {
3979
+ height: 32,
3980
+ padding: 12,
3981
+ fontSize: 12,
3982
+ lineHeight: 14,
3983
+ sublabelFontSize: 10,
3984
+ spinnerSize: 16,
3985
+ iconSize: 16,
3986
+ iconContainerSize: 32,
3987
+ borderRadius: shape.button.xs.borderRadius,
3988
+ labelIconSize: 14,
3989
+ labelIconGap: 4
3990
+ }
3991
+ };
3992
+ return configs[size];
3993
+ };
3994
+
3995
+ // src/theme/sizing/flexButton.ts
3996
+ var flexButton = (size) => {
3997
+ const configs = {
3998
+ xl: {
3999
+ height: 36,
4000
+ padding: 4,
4001
+ fontSize: 16,
4002
+ spinnerSize: 28,
4003
+ iconSize: 20,
4004
+ borderRadius: radiusScale["50"]
4005
+ },
4006
+ lg: {
4007
+ height: 32,
4008
+ padding: 4,
4009
+ fontSize: 14,
4010
+ spinnerSize: 24,
4011
+ iconSize: 18,
4012
+ borderRadius: radiusScale["50"]
4013
+ },
4014
+ md: {
4015
+ height: 28,
4016
+ padding: 2,
4017
+ fontSize: 14,
4018
+ spinnerSize: 24,
4019
+ iconSize: 16,
4020
+ borderRadius: radiusScale["25"]
4021
+ },
4022
+ sm: {
4023
+ height: 22,
4024
+ padding: 2,
4025
+ fontSize: 12,
4026
+ spinnerSize: 16,
4027
+ iconSize: 14,
4028
+ borderRadius: radiusScale["25"]
4029
+ },
4030
+ xs: {
4031
+ height: 20,
4032
+ padding: 2,
4033
+ fontSize: 12,
4034
+ spinnerSize: 16,
4035
+ iconSize: 12,
4036
+ borderRadius: radiusScale["25"]
4037
+ }
4038
+ };
4039
+ return configs[size];
4040
+ };
4041
+
4042
+ // src/theme/sizing/checkbox.ts
4043
+ var checkbox = (size) => {
4044
+ const configs = {
4045
+ xl: {
4046
+ size: 22,
4047
+ fontSize: 18,
4048
+ descriptionFontSize: 16,
4049
+ labelGap: 12,
4050
+ textGap: 4,
4051
+ borderRadius: shape.checkbox.xl.borderRadius
4052
+ },
4053
+ lg: {
4054
+ size: 20,
4055
+ fontSize: 16,
4056
+ descriptionFontSize: 14,
4057
+ labelGap: 10,
4058
+ textGap: 2,
4059
+ borderRadius: shape.checkbox.lg.borderRadius
4060
+ },
4061
+ md: {
4062
+ size: 18,
4063
+ fontSize: 16,
4064
+ descriptionFontSize: 14,
4065
+ labelGap: 8,
4066
+ textGap: 2,
4067
+ borderRadius: shape.checkbox.md.borderRadius
4068
+ },
4069
+ sm: {
4070
+ size: 16,
4071
+ fontSize: 14,
4072
+ descriptionFontSize: 12,
4073
+ labelGap: 8,
4074
+ textGap: 0,
4075
+ borderRadius: shape.checkbox.sm.borderRadius
4076
+ }
4077
+ };
4078
+ return configs[size];
4079
+ };
4080
+
4081
+ // src/theme/sizing/radio.ts
4082
+ var radio = (size) => {
4083
+ const configs = {
4084
+ xl: {
4085
+ size: 24,
4086
+ iconSize: 10,
4087
+ fontSize: 20,
4088
+ lineHeight: 22,
4089
+ descriptionFontSize: 18,
4090
+ descriptionLineHeight: 20,
4091
+ labelGap: 12,
4092
+ textGap: 4,
4093
+ borderWidth: 1
4094
+ },
4095
+ lg: {
4096
+ size: 20,
4097
+ iconSize: 8,
4098
+ fontSize: 18,
4099
+ lineHeight: 20,
4100
+ descriptionFontSize: 16,
4101
+ descriptionLineHeight: 18,
4102
+ labelGap: 10,
4103
+ textGap: 2,
4104
+ borderWidth: 1
4105
+ },
4106
+ md: {
4107
+ size: 18,
4108
+ iconSize: 8,
4109
+ fontSize: 16,
4110
+ lineHeight: 18,
4111
+ descriptionFontSize: 14,
4112
+ descriptionLineHeight: 16,
4113
+ labelGap: 8,
4114
+ textGap: 2,
4115
+ borderWidth: 1
4116
+ },
4117
+ sm: {
4118
+ size: 16,
4119
+ iconSize: 6,
4120
+ fontSize: 14,
4121
+ lineHeight: 16,
4122
+ descriptionFontSize: 12,
4123
+ descriptionLineHeight: 14,
4124
+ labelGap: 6,
4125
+ textGap: 0,
4126
+ borderWidth: 1
4127
+ }
4128
+ };
4129
+ return configs[size];
4130
+ };
4131
+
4132
+ // src/theme/sizing/input.ts
4133
+ var input = (size) => {
4134
+ const configs = {
4135
+ xl: {
4136
+ height: 64,
4137
+ paddingVertical: 12,
4138
+ paddingHorizontal: 12,
4139
+ fontSize: 20,
4140
+ iconSize: 22,
4141
+ radius: shape.input.xl.borderRadius,
4142
+ borderWidth: 2,
4143
+ fieldGap: 8,
4144
+ lineHeight: 20,
4145
+ contentGap: 10,
4146
+ trailingGap: 10
4147
+ },
4148
+ lg: {
4149
+ height: 56,
4150
+ paddingVertical: 14,
4151
+ paddingHorizontal: 12,
4152
+ fontSize: 18,
4153
+ iconSize: 20,
4154
+ radius: shape.input.lg.borderRadius,
4155
+ borderWidth: 2,
4156
+ fieldGap: 6,
4157
+ lineHeight: 18,
4158
+ contentGap: 8,
4159
+ trailingGap: 10
4160
+ },
4161
+ md: {
4162
+ height: 48,
4163
+ paddingVertical: 11,
4164
+ paddingHorizontal: 12,
4165
+ fontSize: 16,
4166
+ iconSize: 18,
4167
+ radius: shape.input.md.borderRadius,
4168
+ borderWidth: 1,
4169
+ fieldGap: 4,
4170
+ lineHeight: 16,
4171
+ contentGap: 6,
4172
+ trailingGap: 8
4173
+ },
4174
+ sm: {
4175
+ height: 40,
4176
+ paddingVertical: 7,
4177
+ paddingHorizontal: 10,
4178
+ fontSize: 14,
4179
+ iconSize: 16,
4180
+ radius: shape.input.sm.borderRadius,
4181
+ borderWidth: 1,
4182
+ fieldGap: 4,
4183
+ lineHeight: 14,
4184
+ contentGap: 4,
4185
+ trailingGap: 8
4186
+ },
4187
+ xs: {
4188
+ height: 32,
4189
+ paddingVertical: 7,
4190
+ paddingHorizontal: 10,
4191
+ fontSize: 12,
4192
+ iconSize: 14,
4193
+ radius: shape.input.xs.borderRadius,
4194
+ borderWidth: 1,
4195
+ fieldGap: 4,
4196
+ lineHeight: 10,
4197
+ contentGap: 4,
4198
+ trailingGap: 4
4199
+ }
4200
+ };
4201
+ return configs[size];
4202
+ };
4203
+
4204
+ // src/theme/sizing/imageUploader.ts
4205
+ var imageUploader = (size) => {
4206
+ const configs = {
4207
+ xl: {
4208
+ box: 200,
4209
+ padding: 14,
4210
+ gap: 10,
4211
+ iconSize: 32,
4212
+ spinnerSize: "lg",
4213
+ labelFontSize: 20,
4214
+ labelLineHeight: 22,
4215
+ descriptionFontSize: 20,
4216
+ descriptionLineHeight: 22,
4217
+ errorFontSize: 16,
4218
+ errorLineHeight: 18,
4219
+ errorGap: 8,
4220
+ radius: shape.input.xl.borderRadius,
4221
+ borderWidth: 1
4222
+ },
4223
+ lg: {
4224
+ box: 168,
4225
+ padding: 14,
4226
+ gap: 10,
4227
+ iconSize: 24,
4228
+ spinnerSize: "lg",
4229
+ labelFontSize: 18,
4230
+ labelLineHeight: 24,
4231
+ descriptionFontSize: 18,
4232
+ descriptionLineHeight: 20,
4233
+ errorFontSize: 16,
4234
+ errorLineHeight: 18,
4235
+ errorGap: 8,
4236
+ radius: shape.input.lg.borderRadius,
4237
+ borderWidth: 1
4238
+ },
4239
+ md: {
4240
+ box: 136,
4241
+ padding: 12,
4242
+ gap: 8,
4243
+ iconSize: 24,
4244
+ spinnerSize: "md",
4245
+ labelFontSize: 16,
4246
+ labelLineHeight: 20,
4247
+ descriptionFontSize: 16,
4248
+ descriptionLineHeight: 20,
4249
+ errorFontSize: 14,
4250
+ errorLineHeight: 16,
4251
+ errorGap: 6,
4252
+ radius: shape.input.md.borderRadius,
4253
+ borderWidth: 1
4254
+ },
4255
+ sm: {
4256
+ box: 104,
4257
+ padding: 10,
4258
+ gap: 6,
4259
+ iconSize: 18,
4260
+ spinnerSize: "sm",
4261
+ labelFontSize: 14,
4262
+ labelLineHeight: 18,
4263
+ descriptionFontSize: 14,
4264
+ descriptionLineHeight: 18,
4265
+ errorFontSize: 12,
4266
+ errorLineHeight: 14,
4267
+ errorGap: 6,
4268
+ radius: shape.input.sm.borderRadius,
4269
+ borderWidth: 1
4270
+ },
4271
+ xs: {
4272
+ box: 72,
4273
+ padding: 8,
4274
+ gap: 4,
4275
+ iconSize: 18,
4276
+ spinnerSize: "sm",
4277
+ labelFontSize: 12,
4278
+ labelLineHeight: 16,
4279
+ descriptionFontSize: 12,
4280
+ descriptionLineHeight: 16,
4281
+ errorFontSize: 11,
4282
+ errorLineHeight: 13,
4283
+ errorGap: 4,
4284
+ radius: shape.input.xs.borderRadius,
4285
+ borderWidth: 1
4286
+ }
4287
+ };
4288
+ return configs[size];
4289
+ };
4290
+
4291
+ // src/theme/sizing/dragDropUploader.ts
4292
+ var dragDropUploader = (size) => {
4293
+ const base = {
4294
+ width: 360,
4295
+ rootGap: 12,
4296
+ radius: 4,
4297
+ borderWidth: 1,
4298
+ textGap: 6,
4299
+ titleFontSize: 14,
4300
+ titleLineHeight: 18,
4301
+ descriptionFontSize: 14,
4302
+ descriptionLineHeight: 18,
4303
+ errorFontSize: 12,
4304
+ errorLineHeight: 16,
4305
+ listGap: 6,
4306
+ itemGap: 8,
4307
+ itemPaddingVertical: 8,
4308
+ itemPaddingLeft: 8,
4309
+ itemPaddingRight: 12,
4310
+ itemIconWrapperSize: 32,
4311
+ itemIconSize: 20,
4312
+ itemTitleFontSize: 14,
4313
+ itemTitleLineHeight: 16,
4314
+ itemDescriptionFontSize: 14,
4315
+ itemDescriptionLineHeight: 18,
4316
+ removeIconSize: 18
4317
+ };
4318
+ const configs = {
4319
+ xl: {
4320
+ ...base,
4321
+ areaHeight: 240,
4322
+ areaPadding: 20,
4323
+ areaGap: 16,
4324
+ iconSize: 32
4325
+ },
4326
+ lg: {
4327
+ ...base,
4328
+ areaHeight: 200,
4329
+ areaPadding: 20,
4330
+ areaGap: 16,
4331
+ iconSize: 24
4332
+ },
4333
+ md: {
4334
+ ...base,
4335
+ areaHeight: 160,
4336
+ areaPadding: 20,
4337
+ areaGap: 16,
4338
+ iconSize: 24
4339
+ },
4340
+ sm: {
4341
+ ...base,
4342
+ areaHeight: 128,
4343
+ areaPadding: 20,
4344
+ areaGap: 16,
4345
+ iconSize: 24
4346
+ },
4347
+ xs: {
4348
+ ...base,
4349
+ width: 320,
4350
+ rootGap: 8,
4351
+ areaHeight: 104,
4352
+ areaPadding: 16,
4353
+ areaGap: 8,
4354
+ textGap: 4,
4355
+ iconSize: 16,
4356
+ titleFontSize: 12,
4357
+ titleLineHeight: 16,
4358
+ descriptionFontSize: 12,
4359
+ descriptionLineHeight: 16,
4360
+ listGap: 4,
4361
+ itemGap: 4,
4362
+ itemPaddingVertical: 4,
4363
+ itemPaddingLeft: 4,
4364
+ itemIconWrapperSize: 24,
4365
+ itemIconSize: 16,
4366
+ itemTitleFontSize: 12,
4367
+ itemTitleLineHeight: 14,
4368
+ itemDescriptionFontSize: 12,
4369
+ itemDescriptionLineHeight: 16,
4370
+ removeIconSize: 14
4371
+ }
4372
+ };
4373
+ return configs[size];
4374
+ };
4375
+
4376
+ // src/theme/sizing/inputPin.ts
4377
+ var inputPin = (size) => {
4378
+ const configs = {
4379
+ xl: {
4380
+ size: 64,
4381
+ gap: 10,
4382
+ fontSize: 20,
4383
+ radius: shape.input.xl.borderRadius,
4384
+ borderWidth: 1,
4385
+ fieldGap: 8
4386
+ },
4387
+ lg: {
4388
+ size: 56,
4389
+ gap: 8,
4390
+ fontSize: 18,
4391
+ radius: shape.input.lg.borderRadius,
4392
+ borderWidth: 1,
4393
+ fieldGap: 6
4394
+ },
4395
+ md: {
4396
+ size: 48,
4397
+ gap: 6,
4398
+ fontSize: 16,
4399
+ radius: shape.input.md.borderRadius,
4400
+ borderWidth: 1,
4401
+ fieldGap: 4
4402
+ },
4403
+ sm: {
4404
+ size: 40,
4405
+ gap: 4,
4406
+ fontSize: 14,
4407
+ radius: shape.input.sm.borderRadius,
4408
+ borderWidth: 1,
4409
+ fieldGap: 4
4410
+ },
4411
+ xs: {
4412
+ size: 32,
4413
+ gap: 4,
4414
+ fontSize: 12,
4415
+ radius: shape.input.xs.borderRadius,
4416
+ borderWidth: 1,
4417
+ fieldGap: 4
4418
+ }
4419
+ };
4420
+ return configs[size];
4421
+ };
4422
+
4423
+ // src/theme/sizing/textarea.ts
4424
+ var textarea = (size) => {
4425
+ const configs = {
4426
+ xl: {
4427
+ height: 144,
4428
+ padding: spacing.xl,
4429
+ fontSize: 20,
4430
+ iconSize: 32,
4431
+ radius: shape.input.xl.borderRadius
4432
+ },
4433
+ lg: {
4434
+ height: 128,
4435
+ padding: spacing.lg,
4436
+ fontSize: 18,
4437
+ iconSize: 28,
4438
+ radius: shape.input.lg.borderRadius
4439
+ },
4440
+ md: {
4441
+ height: 112,
4442
+ padding: spacing.md,
4443
+ fontSize: 16,
4444
+ iconSize: 24,
4445
+ radius: shape.input.md.borderRadius
4446
+ },
4447
+ sm: {
4448
+ height: 96,
4449
+ padding: spacing.sm,
4450
+ fontSize: 14,
4451
+ iconSize: 20,
4452
+ radius: shape.input.sm.borderRadius
4453
+ },
4454
+ xs: {
4455
+ height: 80,
4456
+ padding: spacing.xs,
4457
+ fontSize: 12,
4458
+ iconSize: 16,
4459
+ radius: shape.input.xs.borderRadius
4460
+ }
4461
+ };
4462
+ return configs[size];
4463
+ };
4464
+
4465
+ // src/theme/sizing/switch.ts
4466
+ var switchSizing = (size) => {
4467
+ const configs = {
4468
+ xl: {
4469
+ width: 40,
4470
+ height: 22,
4471
+ knobSize: 18,
4472
+ fontSize: 20,
4473
+ lineHeight: 22,
4474
+ descriptionFontSize: 18,
4475
+ descriptionLineHeight: 20,
4476
+ labelGap: 12,
4477
+ textGap: 4,
4478
+ frameBorderRadius: shape.switch.xl.borderRadius,
4479
+ knobBorderRadius: shape.knob.xl.borderRadius
4480
+ },
4481
+ lg: {
4482
+ width: 36,
4483
+ height: 20,
4484
+ knobSize: 16,
4485
+ fontSize: 18,
4486
+ lineHeight: 20,
4487
+ descriptionFontSize: 16,
4488
+ descriptionLineHeight: 18,
4489
+ labelGap: 10,
4490
+ textGap: 2,
4491
+ frameBorderRadius: shape.switch.lg.borderRadius,
4492
+ knobBorderRadius: shape.knob.lg.borderRadius
4493
+ },
4494
+ md: {
4495
+ width: 32,
4496
+ height: 18,
4497
+ knobSize: 14,
4498
+ fontSize: 16,
4499
+ lineHeight: 18,
4500
+ descriptionFontSize: 14,
4501
+ descriptionLineHeight: 16,
4502
+ labelGap: 8,
4503
+ textGap: 2,
4504
+ frameBorderRadius: shape.switch.md.borderRadius,
4505
+ knobBorderRadius: shape.knob.md.borderRadius
4506
+ },
4507
+ sm: {
4508
+ width: 28,
4509
+ height: 16,
4510
+ knobSize: 12,
4511
+ fontSize: 14,
4512
+ lineHeight: 16,
4513
+ descriptionFontSize: 12,
4514
+ descriptionLineHeight: 14,
4515
+ labelGap: 8,
4516
+ textGap: 0,
4517
+ frameBorderRadius: shape.switch.sm.borderRadius,
4518
+ knobBorderRadius: shape.knob.sm.borderRadius
4519
+ }
4520
+ };
4521
+ return configs[size];
4522
+ };
4523
+
4524
+ // src/theme/sizing/avatar.ts
4525
+ var avatar = (size) => {
4526
+ const configs = {
4527
+ xl: {
4528
+ size: 64,
4529
+ fontSize: 20,
4530
+ iconSize: 32,
4531
+ badgeSize: 20,
4532
+ badgeOffsetCircle: { right: -4, top: -4 },
4533
+ badgeOffsetSquare: { right: -8, top: -8 },
4534
+ borderRadiusSquare: shape.avatar.xl.borderRadius,
4535
+ borderRadiusCircle: radiusScale["999"]
4536
+ },
4537
+ lg: {
4538
+ size: 56,
4539
+ fontSize: 20,
4540
+ iconSize: 28,
4541
+ badgeSize: 20,
4542
+ badgeOffsetCircle: { right: -4, top: -4 },
4543
+ badgeOffsetSquare: { right: -8, top: -8 },
4544
+ borderRadiusSquare: shape.avatar.lg.borderRadius,
4545
+ borderRadiusCircle: radiusScale["999"]
4546
+ },
4547
+ md: {
4548
+ size: 48,
4549
+ fontSize: 18,
4550
+ iconSize: 24,
4551
+ badgeSize: 20,
4552
+ badgeOffsetCircle: { right: -5, top: -5 },
4553
+ badgeOffsetSquare: { right: -8, top: -8 },
4554
+ borderRadiusSquare: shape.avatar.md.borderRadius,
4555
+ borderRadiusCircle: radiusScale["999"]
4556
+ },
4557
+ sm: {
4558
+ size: 40,
4559
+ fontSize: 16,
4560
+ iconSize: 20,
4561
+ badgeSize: 20,
4562
+ badgeOffsetCircle: { right: -6, top: -6 },
4563
+ badgeOffsetSquare: { right: -8, top: -8 },
4564
+ borderRadiusSquare: shape.avatar.sm.borderRadius,
4565
+ borderRadiusCircle: radiusScale["999"]
4566
+ },
4567
+ xs: {
4568
+ size: 32,
4569
+ fontSize: 12,
4570
+ iconSize: 16,
4571
+ badgeSize: 8,
4572
+ badgeOffsetCircle: { right: -1, top: -1 },
4573
+ badgeOffsetSquare: { right: -3, top: -3 },
4574
+ borderRadiusSquare: shape.avatar.xs.borderRadius,
4575
+ borderRadiusCircle: radiusScale["999"]
4576
+ },
4577
+ xxs: {
4578
+ size: 24,
4579
+ fontSize: 10,
4580
+ iconSize: 12,
4581
+ badgeSize: 6,
4582
+ badgeOffsetCircle: { right: -1, top: -1 },
4583
+ badgeOffsetSquare: { right: -2, top: -2 },
4584
+ borderRadiusSquare: shape.avatar.xxs.borderRadius,
4585
+ borderRadiusCircle: radiusScale["999"]
4586
+ }
4587
+ };
4588
+ return configs[size];
4589
+ };
4590
+
4591
+ // src/theme/sizing/tag.ts
4592
+ var tag = (size) => {
4593
+ const configs = {
4594
+ xl: {
4595
+ height: 48,
4596
+ padding: 13,
4597
+ fontSize: 20,
4598
+ lineHeight: 22,
4599
+ gap: 6,
4600
+ iconSize: 22,
4601
+ radius: shape.tag.xl.borderRadius,
4602
+ borderWidth: 1
4603
+ },
4604
+ lg: {
4605
+ height: 40,
4606
+ padding: 10,
4607
+ fontSize: 18,
4608
+ lineHeight: 20,
4609
+ gap: 6,
4610
+ iconSize: 20,
4611
+ radius: shape.tag.lg.borderRadius,
4612
+ borderWidth: 1
4613
+ },
4614
+ md: {
4615
+ height: 32,
4616
+ padding: 7,
4617
+ fontSize: 16,
4618
+ lineHeight: 18,
4619
+ gap: 4,
4620
+ iconSize: 18,
4621
+ radius: shape.tag.md.borderRadius,
4622
+ borderWidth: 1
4623
+ },
4624
+ sm: {
4625
+ height: 24,
4626
+ padding: 4,
4627
+ fontSize: 14,
4628
+ lineHeight: 16,
4629
+ gap: 4,
4630
+ iconSize: 16,
4631
+ radius: shape.tag.sm.borderRadius,
4632
+ borderWidth: 1
4633
+ },
4634
+ xs: {
4635
+ height: 20,
4636
+ padding: 3,
4637
+ fontSize: 12,
4638
+ lineHeight: 14,
4639
+ gap: 4,
4640
+ iconSize: 14,
4641
+ radius: shape.tag.xs.borderRadius,
4642
+ borderWidth: 1
4643
+ }
4644
+ };
4645
+ return configs[size];
4646
+ };
4647
+
4648
+ // src/theme/sizing/divider.ts
4649
+ var divider = (size) => {
4650
+ const configs = {
4651
+ lg: { height: 18, fontSize: 16, lineWeight: 1 },
4652
+ md: { height: 16, fontSize: 14, lineWeight: 1 },
4653
+ sm: { height: 14, fontSize: 12, lineWeight: 1 }
4654
+ };
4655
+ return configs[size];
4656
+ };
4657
+
4658
+ // src/theme/sizing/spinner.ts
4659
+ var spinner = (size) => {
4660
+ const configs = {
4661
+ xl: { size: 96, strokeWidth: 10 },
4662
+ lg: { size: 48, strokeWidth: 5 },
4663
+ md: { size: 24, strokeWidth: 2 },
4664
+ sm: { size: 16, strokeWidth: 2 },
4665
+ xs: { size: 8, strokeWidth: 1 }
4666
+ };
4667
+ return configs[size];
4668
+ };
4669
+
4670
+ // src/theme/sizing/tabs.ts
4671
+ var tabs = (size) => {
4672
+ const configs = {
4673
+ xl: {
4674
+ height: 64,
4675
+ fontSize: 20,
4676
+ lineHeight: 22,
4677
+ iconSize: 24,
4678
+ gap: 10,
4679
+ paddingHorizontal: 20
4680
+ },
4681
+ lg: {
4682
+ height: 56,
4683
+ fontSize: 18,
4684
+ lineHeight: 20,
4685
+ iconSize: 20,
4686
+ gap: 8,
4687
+ paddingHorizontal: 20
4688
+ },
4689
+ md: {
4690
+ height: 48,
4691
+ fontSize: 16,
4692
+ lineHeight: 18,
4693
+ iconSize: 18,
4694
+ gap: 6,
4695
+ paddingHorizontal: 20
4696
+ },
4697
+ sm: {
4698
+ height: 40,
4699
+ fontSize: 14,
4700
+ lineHeight: 16,
4701
+ iconSize: 16,
4702
+ gap: 4,
4703
+ paddingHorizontal: 20
4704
+ }
4705
+ };
4706
+ return configs[size];
4707
+ };
4708
+
4709
+ // src/theme/sizing/segmented.ts
4710
+ var segmented = (size) => {
4711
+ const configs = {
4712
+ xl: {
4713
+ height: 64,
4714
+ containerPadding: 3,
4715
+ containerRadius: shape.segmented.xl.borderRadius,
4716
+ itemHeight: 56,
4717
+ itemPaddingHorizontal: 20,
4718
+ itemPaddingVertical: 10,
4719
+ itemRadius: shape.segmentedItem.xl.borderRadius,
4720
+ fontSize: 20,
4721
+ lineHeight: 22,
4722
+ iconSize: 24,
4723
+ gap: 8
4724
+ },
4725
+ lg: {
4726
+ height: 56,
4727
+ containerPadding: 3,
4728
+ containerRadius: shape.segmented.lg.borderRadius,
4729
+ itemHeight: 48,
4730
+ itemPaddingHorizontal: 20,
4731
+ itemPaddingVertical: 10,
4732
+ itemRadius: shape.segmentedItem.lg.borderRadius,
4733
+ fontSize: 18,
4734
+ lineHeight: 20,
4735
+ iconSize: 24,
4736
+ gap: 8
4737
+ },
4738
+ md: {
4739
+ height: 48,
4740
+ containerPadding: 3,
4741
+ containerRadius: shape.segmented.md.borderRadius,
4742
+ itemHeight: 40,
4743
+ itemPaddingHorizontal: 16,
4744
+ itemPaddingVertical: 8,
4745
+ itemRadius: shape.segmentedItem.md.borderRadius,
4746
+ fontSize: 16,
4747
+ lineHeight: 18,
4748
+ iconSize: 24,
4749
+ gap: 6
4750
+ },
4751
+ sm: {
4752
+ height: 40,
4753
+ containerPadding: 3,
4754
+ containerRadius: shape.segmented.sm.borderRadius,
4755
+ itemHeight: 32,
4756
+ itemPaddingHorizontal: 12,
4757
+ itemPaddingVertical: 6,
4758
+ itemRadius: shape.segmentedItem.sm.borderRadius,
4759
+ fontSize: 14,
4760
+ lineHeight: 16,
4761
+ iconSize: 20,
4762
+ gap: 4
4763
+ }
4764
+ };
4765
+ return configs[size];
4766
+ };
4767
+
4768
+ // src/theme/sizing/tabsSegmented.ts
4769
+ var tabsSegmented = (size) => {
4770
+ const configs = {
4771
+ xl: {
4772
+ height: 64,
4773
+ containerPadding: 4,
4774
+ itemPaddingHorizontal: 16,
4775
+ itemPaddingVertical: 18,
4776
+ fontSize: 20,
4777
+ lineHeight: 22,
4778
+ iconSize: 24,
4779
+ gap: 8
4780
+ },
4781
+ lg: {
4782
+ height: 56,
4783
+ containerPadding: 4,
4784
+ itemPaddingHorizontal: 16,
4785
+ itemPaddingVertical: 14,
4786
+ fontSize: 18,
4787
+ lineHeight: 20,
4788
+ iconSize: 24,
4789
+ gap: 8
4790
+ },
4791
+ md: {
4792
+ height: 48,
4793
+ containerPadding: 4,
4794
+ itemPaddingHorizontal: 12,
4795
+ itemPaddingVertical: 11,
4796
+ fontSize: 16,
4797
+ lineHeight: 18,
4798
+ iconSize: 24,
4799
+ gap: 6
4800
+ },
4801
+ sm: {
4802
+ height: 40,
4803
+ containerPadding: 3,
4804
+ itemPaddingHorizontal: 12,
4805
+ itemPaddingVertical: 8,
4806
+ fontSize: 14,
4807
+ lineHeight: 16,
4808
+ iconSize: 20,
4809
+ gap: 6
4810
+ }
4811
+ };
4812
+ return configs[size];
4813
+ };
4814
+
4815
+ // src/theme/sizing/checkboxTagGroup.ts
4816
+ var checkboxTagGroup = (size) => {
4817
+ const configs = {
4818
+ xl: {
4819
+ height: 64,
4820
+ paddingHorizontal: 16,
4821
+ paddingVertical: 21,
4822
+ fontSize: 20,
4823
+ lineHeight: 22,
4824
+ gap: 8,
4825
+ borderRadius: radiusScale["50"]
4826
+ },
4827
+ lg: {
4828
+ height: 56,
4829
+ paddingHorizontal: 16,
4830
+ paddingVertical: 18,
4831
+ fontSize: 18,
4832
+ lineHeight: 20,
4833
+ gap: 8,
4834
+ borderRadius: radiusScale["50"]
4835
+ },
4836
+ md: {
4837
+ height: 48,
4838
+ paddingHorizontal: 12,
4839
+ paddingVertical: 15,
4840
+ fontSize: 16,
4841
+ lineHeight: 18,
4842
+ gap: 8,
4843
+ borderRadius: radiusScale["25"]
4844
+ },
4845
+ sm: {
4846
+ height: 40,
4847
+ paddingHorizontal: 12,
4848
+ paddingVertical: 11,
4849
+ fontSize: 14,
4850
+ lineHeight: 16,
4851
+ gap: 4,
4852
+ borderRadius: radiusScale["25"]
4853
+ }
4854
+ };
4855
+ return configs[size];
4856
+ };
4857
+
4858
+ // src/theme/sizing/badge.ts
4859
+ var badge = (size) => {
4860
+ const configs = {
4861
+ xl: {
4862
+ size: 20,
4863
+ fontSize: 12,
4864
+ lineHeight: 14,
4865
+ iconSize: 12,
4866
+ padding: 6
4867
+ },
4868
+ lg: {
4869
+ size: 16,
4870
+ fontSize: 10,
4871
+ lineHeight: 10,
4872
+ iconSize: 10,
4873
+ padding: 4
4874
+ },
4875
+ md: {
4876
+ size: 12,
4877
+ fontSize: 10,
4878
+ lineHeight: 10,
4879
+ iconSize: 8,
4880
+ padding: 3
4881
+ },
4882
+ sm: { size: 8, fontSize: 8, lineHeight: 8, iconSize: 6, padding: 0 },
4883
+ xs: { size: 4, fontSize: 4, lineHeight: 4, iconSize: 4, padding: 0 }
4884
+ };
4885
+ return configs[size];
4886
+ };
4887
+
4888
+ // src/theme/sizing/notification.ts
4889
+ var notification = (type) => {
4890
+ const configs = {
4891
+ toast: {
4892
+ width: 400,
4893
+ paddingHorizontal: 20,
4894
+ paddingVertical: 16,
4895
+ gap: 16,
4896
+ titleSize: 18,
4897
+ messageSize: 14,
4898
+ iconSize: 20,
4899
+ iconWrapperSize: 32,
4900
+ radius: shape.toast.borderRadius
4901
+ },
4902
+ inline: {
4903
+ width: "100%",
4904
+ paddingHorizontal: 20,
4905
+ paddingVertical: 16,
4906
+ gap: 28,
4907
+ titleSize: 18,
4908
+ messageSize: 14,
4909
+ iconSize: 20,
4910
+ iconWrapperSize: 32,
4911
+ radius: shape.modal.borderRadius
4912
+ }
4913
+ };
4914
+ return configs[type];
4915
+ };
4916
+
4917
+ // src/theme/sizing/notificationPanel.ts
4918
+ var notificationPanel = (device = "desktop") => {
4919
+ const desktop = {
4920
+ minHeight: 66,
4921
+ iconFrameWidth: 54,
4922
+ iconSize: 24,
4923
+ borderRadius: radiusScale["100"],
4924
+ bodyPaddingHorizontal: 16,
4925
+ bodyPaddingVertical: 12,
4926
+ textGap: 2,
4927
+ contentGap: 24,
4928
+ buttonsGap: 8,
4929
+ closeButtonSize: 32,
4930
+ notificationCloseIconSize: 18,
4931
+ titleFontSize: 16,
4932
+ titleLineHeight: 20,
4933
+ descriptionFontSize: 14,
4934
+ descriptionLineHeight: 20,
4935
+ // Announcement variant: slim, single-line banner
4936
+ announcementPadding: 8,
4937
+ announcementGap: 16,
4938
+ announcementContentGap: 8,
4939
+ announcementIconSize: 16,
4940
+ announcementButtonsGap: 20,
4941
+ announcementCloseIconSize: 16,
4942
+ announcementBlurRadius: 4,
4943
+ // Mobile notification: icon | content column | close column
4944
+ mobileIconColumnPaddingVertical: 12,
4945
+ mobileIconColumnPaddingLeft: 8,
4946
+ mobileIconSize: 24,
4947
+ mobileBodyPaddingHorizontal: 16,
4948
+ mobileBodyPaddingVertical: 12,
4949
+ mobileBodyContentGap: 24,
4950
+ mobileNotificationActionButtonOffsetLeft: -4,
4951
+ mobileCloseColumnPaddingVertical: 12,
4952
+ mobileCloseColumnPaddingRight: 12
4953
+ };
4954
+ return desktop;
4955
+ };
4956
+
4957
+ // src/theme/sizing/progress.ts
4958
+ var progress = (size) => {
4959
+ const configs = {
4960
+ xl: { height: 10, labelSize: 16, helperSize: 14, gap: 10 },
4961
+ lg: { height: 8, labelSize: 14, helperSize: 12, gap: 8 },
4962
+ md: { height: 6, labelSize: 12, helperSize: 12, gap: 6 },
4963
+ sm: { height: 4, labelSize: 12, helperSize: 12, gap: 4 },
4964
+ xs: { height: 2, labelSize: 10, helperSize: 10, gap: 2 },
4965
+ xxs: { height: 2, labelSize: 10, helperSize: 10, gap: 2 },
4966
+ l: { height: 8, labelSize: 16, helperSize: 14, gap: 10 },
4967
+ m: { height: 6, labelSize: 14, helperSize: 12, gap: 8 },
4968
+ s: { height: 4, labelSize: 12, helperSize: 12, gap: 6 }
4969
+ };
4970
+ return configs[size];
4971
+ };
4972
+
4973
+ // src/theme/sizing/supportingText.ts
4974
+ function createSupportingText(contextFonts, contextTypography) {
4975
+ return (size) => {
4976
+ const typographyBySize = {
4977
+ xl: contextTypography.basic["body-lg"],
4978
+ lg: contextTypography.basic["body-md"],
4979
+ md: contextTypography.basic["body-sm"],
4980
+ sm: contextTypography.basic["body-xs"],
4981
+ xs: contextTypography.basic["body-xxs"]
4982
+ };
4983
+ const dimensions = {
4984
+ xl: { gap: 6, iconSize: 18 },
4985
+ lg: { gap: 6, iconSize: 18 },
4986
+ md: { gap: 6, iconSize: 18 },
4987
+ sm: { gap: 4, iconSize: 14 },
4988
+ xs: { gap: 4, iconSize: 14 }
4989
+ };
4990
+ const requiredIndicatorSizeMap = {
4991
+ xl: "lg",
4992
+ lg: "md",
4993
+ md: "sm",
4994
+ sm: "xs",
4995
+ xs: "xs"
4996
+ };
4997
+ const typography2 = typographyBySize[size];
4998
+ const requiredTypography = typographyBySize[requiredIndicatorSizeMap[size]];
4999
+ return {
5000
+ fontSize: typography2.fontSize,
5001
+ lineHeight: typography2.lineHeight,
5002
+ fontWeight: typography2.fontWeight,
5003
+ fontFamily: contextFonts.body,
5004
+ requiredIndicator: {
5005
+ fontSize: requiredTypography.fontSize,
5006
+ lineHeight: requiredTypography.lineHeight
5007
+ },
5008
+ ...dimensions[size]
5009
+ };
5010
+ };
5011
+ }
5012
+
5013
+ // src/theme/sizing/iconWrapper.ts
5014
+ var iconWrapper = (size) => {
5015
+ const configs = {
5016
+ xl: { size: 56, iconSize: 32, fontSize: 24 },
5017
+ lg: { size: 48, iconSize: 28, fontSize: 20 },
5018
+ md: { size: 40, iconSize: 24, fontSize: 18 },
5019
+ sm: { size: 32, iconSize: 20, fontSize: 16 },
5020
+ xs: { size: 24, iconSize: 16, fontSize: 14 },
5021
+ xxs: { size: 18, iconSize: 12, fontSize: 12 }
5022
+ };
5023
+ return configs[size];
5024
+ };
5025
+
5026
+ // src/theme/sizing/stepper.ts
5027
+ var stepper = (size) => {
5028
+ const configs = {
5029
+ md: {
5030
+ iconSize: 32,
5031
+ titleSize: 16,
5032
+ descSize: 14,
5033
+ gap: 12,
5034
+ currentTitleSize: 20,
5035
+ currentDescSize: 14,
5036
+ currentPadding: 24,
5037
+ tailSize: 5
5038
+ },
5039
+ sm: {
5040
+ iconSize: 24,
5041
+ titleSize: 14,
5042
+ descSize: 12,
5043
+ gap: 8,
5044
+ currentTitleSize: 16,
5045
+ currentDescSize: 12,
5046
+ currentPadding: 20,
5047
+ tailSize: 3
5048
+ }
5049
+ };
5050
+ return configs[size];
5051
+ };
5052
+
5053
+ // src/theme/sizing/contextMenu.ts
5054
+ var contextMenu = (size) => {
5055
+ const configs = {
5056
+ xl: {
5057
+ paddingVertical: 8,
5058
+ paddingHorizontal: 8,
5059
+ itemPaddingHorizontal: 16,
5060
+ itemPaddingVertical: 18,
5061
+ fontSize: 20,
5062
+ lineHeight: 26,
5063
+ descriptionFontSize: 18,
5064
+ iconSize: 18,
5065
+ gap: 12,
5066
+ minWidth: 276,
5067
+ panelWidth: 320,
5068
+ statusDotSize: 12,
5069
+ iconWrapperSize: 40,
5070
+ triggerOffset: 4,
5071
+ borderRadius: 8,
5072
+ // Search sizing from Figma
5073
+ searchPaddingHorizontal: 16,
5074
+ searchPaddingVertical: 18,
5075
+ searchGap: 18,
5076
+ searchFontSize: 20,
5077
+ searchLineHeight: 26,
5078
+ searchIconSize: 18
5079
+ },
5080
+ lg: {
5081
+ paddingVertical: 8,
5082
+ paddingHorizontal: 8,
5083
+ itemPaddingHorizontal: 14,
5084
+ itemPaddingVertical: 14,
5085
+ fontSize: 18,
5086
+ lineHeight: 24,
5087
+ descriptionFontSize: 16,
5088
+ iconSize: 18,
5089
+ gap: 10,
5090
+ minWidth: 220,
5091
+ panelWidth: 296,
5092
+ statusDotSize: 10,
5093
+ iconWrapperSize: 36,
5094
+ triggerOffset: 4,
5095
+ borderRadius: 8,
5096
+ // Search sizing from Figma
5097
+ searchPaddingHorizontal: 14,
5098
+ searchPaddingVertical: 14,
5099
+ searchGap: 14,
5100
+ searchFontSize: 18,
5101
+ searchLineHeight: 24,
5102
+ searchIconSize: 18
5103
+ },
5104
+ md: {
5105
+ paddingVertical: 8,
5106
+ paddingHorizontal: 8,
5107
+ itemPaddingHorizontal: 12,
5108
+ itemPaddingVertical: 11,
5109
+ fontSize: 16,
5110
+ lineHeight: 20,
5111
+ descriptionFontSize: 14,
5112
+ iconSize: 18,
5113
+ gap: 8,
5114
+ minWidth: 172,
5115
+ panelWidth: 272,
5116
+ statusDotSize: 8,
5117
+ iconWrapperSize: 32,
5118
+ triggerOffset: 4,
5119
+ borderRadius: 8,
5120
+ // Search sizing from Figma
5121
+ searchPaddingHorizontal: 12,
5122
+ searchPaddingVertical: 11,
5123
+ searchGap: 10,
5124
+ searchFontSize: 16,
5125
+ searchLineHeight: 20,
5126
+ searchIconSize: 18
5127
+ },
5128
+ sm: {
5129
+ paddingVertical: 8,
5130
+ paddingHorizontal: 8,
5131
+ itemPaddingHorizontal: 10,
5132
+ itemPaddingVertical: 8,
5133
+ fontSize: 14,
5134
+ lineHeight: 18,
5135
+ descriptionFontSize: 12,
5136
+ iconSize: 18,
5137
+ gap: 8,
5138
+ minWidth: 132,
5139
+ panelWidth: 248,
5140
+ statusDotSize: 6,
5141
+ iconWrapperSize: 24,
5142
+ triggerOffset: 4,
5143
+ borderRadius: 4,
5144
+ // Search sizing from Figma
5145
+ searchPaddingHorizontal: 10,
5146
+ searchPaddingVertical: 7,
5147
+ searchGap: 6,
5148
+ searchFontSize: 14,
5149
+ searchLineHeight: 18,
5150
+ searchIconSize: 18
5151
+ }
5152
+ };
5153
+ return configs[size];
5154
+ };
5155
+
5156
+ // src/theme/sizing/modal.ts
5157
+ var modal = () => {
5158
+ return {
5159
+ borderRadius: shape.modal.borderRadius,
5160
+ headerPadding: "24px 24px 0",
5161
+ contentPadding: 24,
5162
+ /** @deprecated Header buttons no longer use IconButton sizes. */
5163
+ headerButtonSize: "xs",
5164
+ /** @deprecated Header buttons are FlexButtons; size comes from `Modal`'s `closeButtonSize`. */
5165
+ headerIconSize: 28,
5166
+ /** @deprecated Header buttons are FlexButtons; padding is owned by FlexButton. */
5167
+ headerButtonPadding: 4,
5168
+ /** @deprecated Header buttons are FlexButtons; radius comes from FlexButton's size scale. */
5169
+ headerButtonRadius: 4,
5170
+ headerMinHeight: 44,
5171
+ headerGap: 16,
5172
+ footerGap: 16,
5173
+ /** @deprecated Modal elevation comes from the scrim, not a drop shadow. */
5174
+ shadow: "0px 8px 12px 6px rgba(7, 7, 8, 0.1), 0px 4px 4px rgba(7, 7, 8, 0.2)",
5175
+ maxWidth: 680,
5176
+ overlayColor: "rgba(0, 0, 0, 0.75)",
5177
+ portalPadding: 20,
5178
+ /** @deprecated Layering is contextual now; see OVERLAY_LAYER_BASE / useOverlayLayer. */
5179
+ zIndex: 1e3
5180
+ };
5181
+ };
5182
+
5183
+ // src/theme/sizing/drawer.ts
5184
+ var drawer = () => ({
5185
+ // Sizing values from Figma design: B2B Components Library node-id=8291-103845
5186
+ widthSm: 480,
5187
+ widthMd: 620,
5188
+ widthLg: 1056,
5189
+ headerHeight: 80,
5190
+ headerPaddingX: 32,
5191
+ headerPaddingY: 24,
5192
+ headerGap: 24,
5193
+ titleFontSize: 18,
5194
+ titleLineHeight: 24,
5195
+ contentPaddingX: 32,
5196
+ footerPadding: 32,
5197
+ outerPadding: 8,
5198
+ containerRadius: 4,
5199
+ contentRadius: 8,
5200
+ stepperPadding: 16,
5201
+ stepperRadius: 8,
5202
+ stepperContentGap: 8,
5203
+ scrimColor: "rgba(0, 0, 0, 0.75)",
5204
+ animationDuration: 300,
5205
+ /** @deprecated Layering is contextual now; see MODAL_LAYER_STEP / useOverlayLayer. */
5206
+ zIndex: 1e3
5207
+ });
5208
+
5209
+ // src/theme/sizing/sidebar.ts
5210
+ var sidebar = () => ({
5211
+ // Sizing values from Figma design: B2B Components Library
5212
+ widthExpanded: 280,
5213
+ widthCollapsed: 48,
5214
+ radius: 4,
5215
+ itemHeight: 32,
5216
+ iconSize: 18,
5217
+ padding: 8,
5218
+ sectionLabelHeight: 20,
5219
+ // Aligns nested item text with parent label (padding 8 + icon 18 + gap 8 = 34)
5220
+ // and centers the rail under the parent icon (padding 8 + iconSize/2 = 17).
5221
+ nestedItemPaddingLeft: 34,
5222
+ nestedItemRailLeft: 17,
5223
+ chevronSize: 14,
5224
+ externalIconSize: 18,
5225
+ chatBadgeSize: 6,
5226
+ itemBadgeSize: 4,
5227
+ focusOutlineWidth: 2,
5228
+ scrollbarWidth: 4,
5229
+ popoverGap: 12,
5230
+ popoverViewportPadding: 8,
5231
+ popoverMinWidth: 180,
5232
+ popoverMaxWidth: 240,
5233
+ popoverShadow: "0 2px 25px rgba(7, 7, 8, 0.15)",
5234
+ /** @deprecated Layering is contextual now; see useOverlayLayer / LAYER_OFFSET. */
5235
+ popoverZIndex: 1e3,
5236
+ transitionWidth: "0.25s ease-in-out",
5237
+ transitionFadeIn: "opacity 0.15s ease-in-out 0.1s",
5238
+ transitionFadeOut: "opacity 0.1s ease-in-out",
5239
+ transitionItem: "background-color 0.15s ease-in-out, color 0.15s ease-in-out",
5240
+ transitionRows: "grid-template-rows 0.25s ease-in-out"
5241
+ });
5242
+
5243
+ // src/theme/sizing/stepperB2b.ts
5244
+ var stepperB2b = () => ({
5245
+ // Sizing values from Figma design: B2B Components Library
5246
+ // variant grid node-id=10999-17988, state grid node-id=10259-5501
5247
+ chipSize: 32,
5248
+ chipRadius: 2,
5249
+ chipPaddingTop: 5,
5250
+ chipPaddingBottom: 4,
5251
+ chipPaddingX: 4,
5252
+ chipIconSize: 16,
5253
+ numberFontSize: 18,
5254
+ numberLineHeight: 24,
5255
+ titleFontSize: 16,
5256
+ titleLineHeight: 20,
5257
+ descriptionFontSize: 14,
5258
+ descriptionLineHeight: 20,
5259
+ captionFontSize: 12,
5260
+ captionLineHeight: 16,
5261
+ itemGap: 12,
5262
+ contentGap: 4,
5263
+ contentMinHeight: 32,
5264
+ contentWidth: 128,
5265
+ activeCardRadiusVertical: 4,
5266
+ activeCardRadiusHorizontal: 6,
5267
+ activeCardPaddingTop: 24,
5268
+ activeCardPaddingX: 24,
5269
+ activeCardPaddingYHorizontal: 12,
5270
+ activeCardPaddingLeftHorizontal: 12,
5271
+ activeCardGapHorizontal: 8,
5272
+ innerConnectorLength: 48,
5273
+ connectorSegment: 24,
5274
+ connectorCellHeight: 24,
5275
+ connectorCellWidth: 80,
5276
+ surfaceRadius: 8,
5277
+ surfacePaddingVertical: 16,
5278
+ surfacePaddingHorizontal: 8,
5279
+ horizontalItemGap: 16,
5280
+ horizontalFirstItemWidth: 220,
5281
+ horizontalItemWidth: 236,
5282
+ horizontalConnectorSegment: 32,
5283
+ horizontalConnectorGap: 12,
5284
+ simpleCardPadding: 12,
5285
+ simpleCardRadius: 4,
5286
+ simpleCardGap: 4,
5287
+ simpleItemGap: 4,
5288
+ simpleHorizontalCellWidth: 56,
5289
+ simpleHorizontalStubLength: 8
5290
+ });
5291
+
5292
+ // src/theme/sizing/collapsibleB2b.ts
5293
+ var collapsibleB2b = () => ({
5294
+ // Sizing values from Figma design: B2B Components Library node-id=10469-6509
5295
+ triggerPadding: 16,
5296
+ triggerGap: 12,
5297
+ triggerMinHeight: 56,
5298
+ surfaceRadius: radiusScale["50"],
5299
+ // Must match surfaceRadius: the root clips with `overflow: hidden`, so a
5300
+ // larger cell radius makes the trigger cell's corners show through the
5301
+ // smaller root arc (XUITSD-55).
5302
+ cellRadius: radiusScale["50"],
5303
+ iconSlotSize: 32,
5304
+ iconSlotRadius: radiusScale["50"],
5305
+ chevronSize: 24,
5306
+ trailingGap: 8,
5307
+ textGap: 2,
5308
+ titleFontSize: 16,
5309
+ titleLineHeight: 20,
5310
+ captionFontSize: 12,
5311
+ captionLineHeight: 18,
5312
+ panelPadding: 16,
5313
+ accordionItemGap: 8
5314
+ });
5315
+
5316
+ // src/theme/sizing/toast.ts
5317
+ var toast = () => {
5318
+ return {
5319
+ minHeight: 64,
5320
+ paddingHorizontal: 12,
5321
+ paddingVertical: 8,
5322
+ borderRadius: shape.toast.borderRadius,
5323
+ gap: 12,
5324
+ iconSize: 24,
5325
+ closeButtonSize: 24,
5326
+ closeIconSize: 20,
5327
+ fontSize: 16,
5328
+ lineHeight: 20,
5329
+ maxWidth: 400,
5330
+ containerPadding: 12,
5331
+ groupGap: 4
5332
+ };
5333
+ };
5334
+
5335
+ // src/theme/sizing/toggleButtonGroup.ts
5336
+ var toggleButtonGroup = (size) => {
5337
+ const configs = {
5338
+ xl: {
5339
+ height: 64,
5340
+ paddingHorizontal: 21,
5341
+ fontSize: 20,
5342
+ lineHeight: 22,
5343
+ iconSize: 22,
5344
+ gap: 6,
5345
+ borderRadius: shape.toggleButtonGroup.xl.borderRadius,
5346
+ itemGap: 8,
5347
+ tooltipSize: "lg"
5348
+ },
5349
+ lg: {
5350
+ height: 56,
5351
+ paddingHorizontal: 18,
5352
+ fontSize: 18,
5353
+ lineHeight: 20,
5354
+ iconSize: 20,
5355
+ gap: 4,
5356
+ borderRadius: shape.toggleButtonGroup.lg.borderRadius,
5357
+ itemGap: 8,
5358
+ tooltipSize: "md"
5359
+ },
5360
+ md: {
5361
+ height: 48,
5362
+ paddingHorizontal: 15,
5363
+ fontSize: 16,
5364
+ lineHeight: 18,
5365
+ iconSize: 18,
5366
+ gap: 4,
5367
+ borderRadius: shape.toggleButtonGroup.md.borderRadius,
5368
+ itemGap: 6,
5369
+ tooltipSize: "md"
5370
+ },
5371
+ sm: {
5372
+ height: 40,
5373
+ paddingHorizontal: 12,
5374
+ fontSize: 14,
5375
+ lineHeight: 16,
5376
+ iconSize: 16,
5377
+ gap: 4,
5378
+ borderRadius: shape.toggleButtonGroup.sm.borderRadius,
5379
+ itemGap: 4,
5380
+ tooltipSize: "sm"
5381
+ },
5382
+ xs: {
5383
+ height: 32,
5384
+ paddingHorizontal: 9,
5385
+ fontSize: 12,
5386
+ lineHeight: 14,
5387
+ iconSize: 14,
5388
+ gap: 4,
5389
+ borderRadius: shape.toggleButtonGroup.xs.borderRadius,
5390
+ itemGap: 4,
5391
+ tooltipSize: "sm"
5392
+ }
5393
+ };
5394
+ return configs[size];
5395
+ };
5396
+
5397
+ // src/theme/sizing/table.ts
5398
+ var table = {
5399
+ containerRadius: 8,
5400
+ containerPaddingVertical: 0,
5401
+ containerGap: 0,
5402
+ captionFontSize: 14,
5403
+ captionLineHeight: 20,
5404
+ headerRowHeight: 56,
5405
+ headerRowPaddingHorizontal: 24,
5406
+ headerCellGap: 4,
5407
+ headerCellFontSize: 14,
5408
+ headerCellLineHeight: 18,
5409
+ rowHeight: 56,
5410
+ rowPaddingHorizontal: 24,
5411
+ cellGap: 16,
5412
+ cellFontSize: 14,
5413
+ cellLineHeight: 18,
5414
+ paginationGap: 16,
5415
+ paginationPaddingHorizontal: 24
5416
+ };
5417
+
5418
+ // src/theme/sizing/index.ts
5419
+ function createSizing(contextFonts, contextTypography) {
5420
+ return {
5421
+ button,
5422
+ flexButton,
5423
+ checkbox,
5424
+ radio,
5425
+ input,
5426
+ imageUploader,
5427
+ dragDropUploader,
5428
+ inputPin,
5429
+ textarea,
5430
+ switch: switchSizing,
5431
+ avatar,
5432
+ tag,
5433
+ divider,
5434
+ spinner,
5435
+ tabs,
5436
+ segmented,
5437
+ tabsSegmented,
5438
+ checkboxTagGroup,
5439
+ badge,
5440
+ notification,
5441
+ notificationPanel,
5442
+ progress,
5443
+ supportingText: createSupportingText(contextFonts, contextTypography),
5444
+ iconWrapper,
5445
+ stepper,
5446
+ contextMenu,
5447
+ modal,
5448
+ drawer,
5449
+ sidebar,
5450
+ stepperB2b,
5451
+ collapsibleB2b,
5452
+ toast,
5453
+ toggleButtonGroup,
5454
+ table
5455
+ };
5456
+ }
5457
+
5458
+ // src/theme/themeConfig.ts
5459
+ var DEPRECATED_MODES = /* @__PURE__ */ new Set([
5460
+ "xsolla-dark",
5461
+ "xsolla-light",
5462
+ "xsollaDark",
5463
+ "xsollaLight"
5464
+ ]);
5465
+ var themeConfig = (mode = "dark", productContext = defaultProductContext) => {
5466
+ if (DEPRECATED_MODES.has(mode)) {
5467
+ console.warn(
5468
+ `Theme mode "${mode}" is deprecated and will be removed in the next major update. Please migrate to "dark" or "light".`
5469
+ );
5470
+ }
5471
+ const contextFonts = getFonts(productContext);
5472
+ const contextTypography = getTypographyTokens(productContext);
5473
+ return {
5474
+ colors: colors[mode],
5475
+ spacing,
5476
+ shape,
5477
+ shadow,
5478
+ fonts: contextFonts,
5479
+ typography: {
5480
+ primary: contextFonts.body,
5481
+ heading: contextFonts.heading,
5482
+ body: contextFonts.body
5483
+ },
5484
+ typographyTokens: contextTypography,
5485
+ productContext,
5486
+ sizing: createSizing(contextFonts, contextTypography)
5487
+ };
5488
+ };
5489
+
5490
+ // src/provider.tsx
5491
+ var import_react3 = __toESM(require("react"));
5492
+
3488
5493
  // src/fonts/FontLoader.tsx
3489
5494
  var import_react = require("react");
3490
5495
 
@@ -3767,1489 +5772,8 @@ var TypographyStyleLoader = () => {
3767
5772
  };
3768
5773
  TypographyStyleLoader.displayName = "TypographyStyleLoader";
3769
5774
 
3770
- // src/index.tsx
5775
+ // src/provider.tsx
3771
5776
  var import_jsx_runtime = require("react/jsx-runtime");
3772
- var DEPRECATED_MODES = /* @__PURE__ */ new Set([
3773
- "xsolla-dark",
3774
- "xsolla-light",
3775
- "xsollaDark",
3776
- "xsollaLight"
3777
- ]);
3778
- var themeConfig = (mode = "dark", productContext = defaultProductContext) => {
3779
- if (DEPRECATED_MODES.has(mode)) {
3780
- console.warn(
3781
- `Theme mode "${mode}" is deprecated and will be removed in the next major update. Please migrate to "dark" or "light".`
3782
- );
3783
- }
3784
- const contextFonts = getFonts(productContext);
3785
- const contextTypography = getTypographyTokens(productContext);
3786
- return {
3787
- colors: colors[mode],
3788
- spacing,
3789
- shape,
3790
- shadow,
3791
- fonts: contextFonts,
3792
- typography: {
3793
- primary: contextFonts.body,
3794
- heading: contextFonts.heading,
3795
- body: contextFonts.body
3796
- },
3797
- typographyTokens: contextTypography,
3798
- productContext,
3799
- sizing: {
3800
- button: (size) => {
3801
- const configs = {
3802
- xl: {
3803
- height: 64,
3804
- padding: 20,
3805
- fontSize: 20,
3806
- lineHeight: 22,
3807
- sublabelFontSize: 18,
3808
- spinnerSize: 24,
3809
- iconSize: 32,
3810
- iconContainerSize: 64,
3811
- borderRadius: shape.button.xl.borderRadius,
3812
- labelIconSize: 22,
3813
- labelIconGap: 6
3814
- },
3815
- lg: {
3816
- height: 56,
3817
- padding: 18,
3818
- fontSize: 18,
3819
- lineHeight: 20,
3820
- sublabelFontSize: 16,
3821
- spinnerSize: 24,
3822
- iconSize: 28,
3823
- iconContainerSize: 56,
3824
- borderRadius: shape.button.lg.borderRadius,
3825
- labelIconSize: 20,
3826
- labelIconGap: 4
3827
- },
3828
- md: {
3829
- height: 48,
3830
- padding: 16,
3831
- fontSize: 16,
3832
- lineHeight: 18,
3833
- sublabelFontSize: 14,
3834
- spinnerSize: 24,
3835
- iconSize: 24,
3836
- iconContainerSize: 48,
3837
- borderRadius: shape.button.md.borderRadius,
3838
- labelIconSize: 18,
3839
- labelIconGap: 4
3840
- },
3841
- sm: {
3842
- height: 40,
3843
- padding: 14,
3844
- fontSize: 14,
3845
- lineHeight: 16,
3846
- sublabelFontSize: 12,
3847
- spinnerSize: 24,
3848
- iconSize: 20,
3849
- iconContainerSize: 40,
3850
- borderRadius: shape.button.sm.borderRadius,
3851
- labelIconSize: 16,
3852
- labelIconGap: 4
3853
- },
3854
- xs: {
3855
- height: 32,
3856
- padding: 12,
3857
- fontSize: 12,
3858
- lineHeight: 14,
3859
- sublabelFontSize: 10,
3860
- spinnerSize: 16,
3861
- iconSize: 16,
3862
- iconContainerSize: 32,
3863
- borderRadius: shape.button.xs.borderRadius,
3864
- labelIconSize: 14,
3865
- labelIconGap: 4
3866
- }
3867
- };
3868
- return configs[size];
3869
- },
3870
- flexButton: (size) => {
3871
- const configs = {
3872
- xl: {
3873
- height: 36,
3874
- padding: 4,
3875
- fontSize: 16,
3876
- spinnerSize: 28,
3877
- iconSize: 20,
3878
- borderRadius: radiusScale["50"]
3879
- },
3880
- lg: {
3881
- height: 32,
3882
- padding: 4,
3883
- fontSize: 14,
3884
- spinnerSize: 24,
3885
- iconSize: 18,
3886
- borderRadius: radiusScale["50"]
3887
- },
3888
- md: {
3889
- height: 28,
3890
- padding: 2,
3891
- fontSize: 14,
3892
- spinnerSize: 24,
3893
- iconSize: 16,
3894
- borderRadius: radiusScale["25"]
3895
- },
3896
- sm: {
3897
- height: 22,
3898
- padding: 2,
3899
- fontSize: 12,
3900
- spinnerSize: 16,
3901
- iconSize: 14,
3902
- borderRadius: radiusScale["25"]
3903
- },
3904
- xs: {
3905
- height: 20,
3906
- padding: 2,
3907
- fontSize: 12,
3908
- spinnerSize: 16,
3909
- iconSize: 12,
3910
- borderRadius: radiusScale["25"]
3911
- }
3912
- };
3913
- return configs[size];
3914
- },
3915
- checkbox: (size) => {
3916
- const configs = {
3917
- xl: {
3918
- size: 22,
3919
- fontSize: 18,
3920
- descriptionFontSize: 16,
3921
- labelGap: 12,
3922
- textGap: 4,
3923
- borderRadius: shape.checkbox.xl.borderRadius
3924
- },
3925
- lg: {
3926
- size: 20,
3927
- fontSize: 16,
3928
- descriptionFontSize: 14,
3929
- labelGap: 10,
3930
- textGap: 2,
3931
- borderRadius: shape.checkbox.lg.borderRadius
3932
- },
3933
- md: {
3934
- size: 18,
3935
- fontSize: 16,
3936
- descriptionFontSize: 14,
3937
- labelGap: 8,
3938
- textGap: 2,
3939
- borderRadius: shape.checkbox.md.borderRadius
3940
- },
3941
- sm: {
3942
- size: 16,
3943
- fontSize: 14,
3944
- descriptionFontSize: 12,
3945
- labelGap: 8,
3946
- textGap: 0,
3947
- borderRadius: shape.checkbox.sm.borderRadius
3948
- }
3949
- };
3950
- return configs[size];
3951
- },
3952
- radio: (size) => {
3953
- const configs = {
3954
- xl: {
3955
- size: 24,
3956
- iconSize: 10,
3957
- fontSize: 20,
3958
- lineHeight: 22,
3959
- descriptionFontSize: 18,
3960
- descriptionLineHeight: 20,
3961
- labelGap: 12,
3962
- textGap: 4,
3963
- borderWidth: 1
3964
- },
3965
- lg: {
3966
- size: 20,
3967
- iconSize: 8,
3968
- fontSize: 18,
3969
- lineHeight: 20,
3970
- descriptionFontSize: 16,
3971
- descriptionLineHeight: 18,
3972
- labelGap: 10,
3973
- textGap: 2,
3974
- borderWidth: 1
3975
- },
3976
- md: {
3977
- size: 18,
3978
- iconSize: 8,
3979
- fontSize: 16,
3980
- lineHeight: 18,
3981
- descriptionFontSize: 14,
3982
- descriptionLineHeight: 16,
3983
- labelGap: 8,
3984
- textGap: 2,
3985
- borderWidth: 1
3986
- },
3987
- sm: {
3988
- size: 16,
3989
- iconSize: 6,
3990
- fontSize: 14,
3991
- lineHeight: 16,
3992
- descriptionFontSize: 12,
3993
- descriptionLineHeight: 14,
3994
- labelGap: 6,
3995
- textGap: 0,
3996
- borderWidth: 1
3997
- }
3998
- };
3999
- return configs[size];
4000
- },
4001
- input: (size) => {
4002
- const configs = {
4003
- xl: {
4004
- height: 64,
4005
- paddingVertical: 12,
4006
- paddingHorizontal: 12,
4007
- fontSize: 20,
4008
- iconSize: 22,
4009
- radius: shape.input.xl.borderRadius,
4010
- borderWidth: 2,
4011
- fieldGap: 8,
4012
- lineHeight: 20,
4013
- contentGap: 10,
4014
- trailingGap: 10
4015
- },
4016
- lg: {
4017
- height: 56,
4018
- paddingVertical: 14,
4019
- paddingHorizontal: 12,
4020
- fontSize: 18,
4021
- iconSize: 20,
4022
- radius: shape.input.lg.borderRadius,
4023
- borderWidth: 2,
4024
- fieldGap: 6,
4025
- lineHeight: 18,
4026
- contentGap: 8,
4027
- trailingGap: 10
4028
- },
4029
- md: {
4030
- height: 48,
4031
- paddingVertical: 11,
4032
- paddingHorizontal: 12,
4033
- fontSize: 16,
4034
- iconSize: 18,
4035
- radius: shape.input.md.borderRadius,
4036
- borderWidth: 1,
4037
- fieldGap: 4,
4038
- lineHeight: 16,
4039
- contentGap: 6,
4040
- trailingGap: 8
4041
- },
4042
- sm: {
4043
- height: 40,
4044
- paddingVertical: 7,
4045
- paddingHorizontal: 10,
4046
- fontSize: 14,
4047
- iconSize: 16,
4048
- radius: shape.input.sm.borderRadius,
4049
- borderWidth: 1,
4050
- fieldGap: 4,
4051
- lineHeight: 14,
4052
- contentGap: 4,
4053
- trailingGap: 8
4054
- },
4055
- xs: {
4056
- height: 32,
4057
- paddingVertical: 7,
4058
- paddingHorizontal: 10,
4059
- fontSize: 12,
4060
- iconSize: 14,
4061
- radius: shape.input.xs.borderRadius,
4062
- borderWidth: 1,
4063
- fieldGap: 4,
4064
- lineHeight: 10,
4065
- contentGap: 4,
4066
- trailingGap: 4
4067
- }
4068
- };
4069
- return configs[size];
4070
- },
4071
- imageUploader: (size) => {
4072
- const configs = {
4073
- xl: {
4074
- box: 200,
4075
- padding: 14,
4076
- gap: 10,
4077
- iconSize: 32,
4078
- spinnerSize: "lg",
4079
- labelFontSize: 20,
4080
- labelLineHeight: 22,
4081
- descriptionFontSize: 20,
4082
- descriptionLineHeight: 22,
4083
- errorFontSize: 16,
4084
- errorLineHeight: 18,
4085
- errorGap: 8,
4086
- radius: shape.input.xl.borderRadius,
4087
- borderWidth: 1
4088
- },
4089
- lg: {
4090
- box: 168,
4091
- padding: 14,
4092
- gap: 10,
4093
- iconSize: 24,
4094
- spinnerSize: "lg",
4095
- labelFontSize: 18,
4096
- labelLineHeight: 24,
4097
- descriptionFontSize: 18,
4098
- descriptionLineHeight: 20,
4099
- errorFontSize: 16,
4100
- errorLineHeight: 18,
4101
- errorGap: 8,
4102
- radius: shape.input.lg.borderRadius,
4103
- borderWidth: 1
4104
- },
4105
- md: {
4106
- box: 136,
4107
- padding: 12,
4108
- gap: 8,
4109
- iconSize: 24,
4110
- spinnerSize: "md",
4111
- labelFontSize: 16,
4112
- labelLineHeight: 20,
4113
- descriptionFontSize: 16,
4114
- descriptionLineHeight: 20,
4115
- errorFontSize: 14,
4116
- errorLineHeight: 16,
4117
- errorGap: 6,
4118
- radius: shape.input.md.borderRadius,
4119
- borderWidth: 1
4120
- },
4121
- sm: {
4122
- box: 104,
4123
- padding: 10,
4124
- gap: 6,
4125
- iconSize: 18,
4126
- spinnerSize: "sm",
4127
- labelFontSize: 14,
4128
- labelLineHeight: 18,
4129
- descriptionFontSize: 14,
4130
- descriptionLineHeight: 18,
4131
- errorFontSize: 12,
4132
- errorLineHeight: 14,
4133
- errorGap: 6,
4134
- radius: shape.input.sm.borderRadius,
4135
- borderWidth: 1
4136
- },
4137
- xs: {
4138
- box: 72,
4139
- padding: 8,
4140
- gap: 4,
4141
- iconSize: 18,
4142
- spinnerSize: "sm",
4143
- labelFontSize: 12,
4144
- labelLineHeight: 16,
4145
- descriptionFontSize: 12,
4146
- descriptionLineHeight: 16,
4147
- errorFontSize: 11,
4148
- errorLineHeight: 13,
4149
- errorGap: 4,
4150
- radius: shape.input.xs.borderRadius,
4151
- borderWidth: 1
4152
- }
4153
- };
4154
- return configs[size];
4155
- },
4156
- dragDropUploader: (size) => {
4157
- const base = {
4158
- width: 360,
4159
- rootGap: 12,
4160
- radius: 4,
4161
- borderWidth: 1,
4162
- textGap: 6,
4163
- titleFontSize: 14,
4164
- titleLineHeight: 18,
4165
- descriptionFontSize: 14,
4166
- descriptionLineHeight: 18,
4167
- errorFontSize: 12,
4168
- errorLineHeight: 16,
4169
- listGap: 6,
4170
- itemGap: 8,
4171
- itemPaddingVertical: 8,
4172
- itemPaddingLeft: 8,
4173
- itemPaddingRight: 12,
4174
- itemIconWrapperSize: 32,
4175
- itemIconSize: 20,
4176
- itemTitleFontSize: 14,
4177
- itemTitleLineHeight: 16,
4178
- itemDescriptionFontSize: 14,
4179
- itemDescriptionLineHeight: 18,
4180
- removeIconSize: 18
4181
- };
4182
- const configs = {
4183
- xl: {
4184
- ...base,
4185
- areaHeight: 240,
4186
- areaPadding: 20,
4187
- areaGap: 16,
4188
- iconSize: 32
4189
- },
4190
- lg: {
4191
- ...base,
4192
- areaHeight: 200,
4193
- areaPadding: 20,
4194
- areaGap: 16,
4195
- iconSize: 24
4196
- },
4197
- md: {
4198
- ...base,
4199
- areaHeight: 160,
4200
- areaPadding: 20,
4201
- areaGap: 16,
4202
- iconSize: 24
4203
- },
4204
- sm: {
4205
- ...base,
4206
- areaHeight: 128,
4207
- areaPadding: 20,
4208
- areaGap: 16,
4209
- iconSize: 24
4210
- },
4211
- xs: {
4212
- ...base,
4213
- width: 320,
4214
- rootGap: 8,
4215
- areaHeight: 104,
4216
- areaPadding: 16,
4217
- areaGap: 8,
4218
- textGap: 4,
4219
- iconSize: 16,
4220
- titleFontSize: 12,
4221
- titleLineHeight: 16,
4222
- descriptionFontSize: 12,
4223
- descriptionLineHeight: 16,
4224
- listGap: 4,
4225
- itemGap: 4,
4226
- itemPaddingVertical: 4,
4227
- itemPaddingLeft: 4,
4228
- itemIconWrapperSize: 24,
4229
- itemIconSize: 16,
4230
- itemTitleFontSize: 12,
4231
- itemTitleLineHeight: 14,
4232
- itemDescriptionFontSize: 12,
4233
- itemDescriptionLineHeight: 16,
4234
- removeIconSize: 14
4235
- }
4236
- };
4237
- return configs[size];
4238
- },
4239
- inputPin: (size) => {
4240
- const configs = {
4241
- xl: {
4242
- size: 64,
4243
- gap: 10,
4244
- fontSize: 20,
4245
- radius: shape.input.xl.borderRadius,
4246
- borderWidth: 1,
4247
- fieldGap: 8
4248
- },
4249
- lg: {
4250
- size: 56,
4251
- gap: 8,
4252
- fontSize: 18,
4253
- radius: shape.input.lg.borderRadius,
4254
- borderWidth: 1,
4255
- fieldGap: 6
4256
- },
4257
- md: {
4258
- size: 48,
4259
- gap: 6,
4260
- fontSize: 16,
4261
- radius: shape.input.md.borderRadius,
4262
- borderWidth: 1,
4263
- fieldGap: 4
4264
- },
4265
- sm: {
4266
- size: 40,
4267
- gap: 4,
4268
- fontSize: 14,
4269
- radius: shape.input.sm.borderRadius,
4270
- borderWidth: 1,
4271
- fieldGap: 4
4272
- },
4273
- xs: {
4274
- size: 32,
4275
- gap: 4,
4276
- fontSize: 12,
4277
- radius: shape.input.xs.borderRadius,
4278
- borderWidth: 1,
4279
- fieldGap: 4
4280
- }
4281
- };
4282
- return configs[size];
4283
- },
4284
- textarea: (size) => {
4285
- const configs = {
4286
- xl: {
4287
- height: 144,
4288
- padding: spacing.xl,
4289
- fontSize: 20,
4290
- iconSize: 32,
4291
- radius: shape.input.xl.borderRadius
4292
- },
4293
- lg: {
4294
- height: 128,
4295
- padding: spacing.lg,
4296
- fontSize: 18,
4297
- iconSize: 28,
4298
- radius: shape.input.lg.borderRadius
4299
- },
4300
- md: {
4301
- height: 112,
4302
- padding: spacing.md,
4303
- fontSize: 16,
4304
- iconSize: 24,
4305
- radius: shape.input.md.borderRadius
4306
- },
4307
- sm: {
4308
- height: 96,
4309
- padding: spacing.sm,
4310
- fontSize: 14,
4311
- iconSize: 20,
4312
- radius: shape.input.sm.borderRadius
4313
- },
4314
- xs: {
4315
- height: 80,
4316
- padding: spacing.xs,
4317
- fontSize: 12,
4318
- iconSize: 16,
4319
- radius: shape.input.xs.borderRadius
4320
- }
4321
- };
4322
- return configs[size];
4323
- },
4324
- switch: (size) => {
4325
- const configs = {
4326
- xl: {
4327
- width: 40,
4328
- height: 22,
4329
- knobSize: 18,
4330
- fontSize: 20,
4331
- lineHeight: 22,
4332
- descriptionFontSize: 18,
4333
- descriptionLineHeight: 20,
4334
- labelGap: 12,
4335
- textGap: 4,
4336
- frameBorderRadius: shape.switch.xl.borderRadius,
4337
- knobBorderRadius: shape.knob.xl.borderRadius
4338
- },
4339
- lg: {
4340
- width: 36,
4341
- height: 20,
4342
- knobSize: 16,
4343
- fontSize: 18,
4344
- lineHeight: 20,
4345
- descriptionFontSize: 16,
4346
- descriptionLineHeight: 18,
4347
- labelGap: 10,
4348
- textGap: 2,
4349
- frameBorderRadius: shape.switch.lg.borderRadius,
4350
- knobBorderRadius: shape.knob.lg.borderRadius
4351
- },
4352
- md: {
4353
- width: 32,
4354
- height: 18,
4355
- knobSize: 14,
4356
- fontSize: 16,
4357
- lineHeight: 18,
4358
- descriptionFontSize: 14,
4359
- descriptionLineHeight: 16,
4360
- labelGap: 8,
4361
- textGap: 2,
4362
- frameBorderRadius: shape.switch.md.borderRadius,
4363
- knobBorderRadius: shape.knob.md.borderRadius
4364
- },
4365
- sm: {
4366
- width: 28,
4367
- height: 16,
4368
- knobSize: 12,
4369
- fontSize: 14,
4370
- lineHeight: 16,
4371
- descriptionFontSize: 12,
4372
- descriptionLineHeight: 14,
4373
- labelGap: 8,
4374
- textGap: 0,
4375
- frameBorderRadius: shape.switch.sm.borderRadius,
4376
- knobBorderRadius: shape.knob.sm.borderRadius
4377
- }
4378
- };
4379
- return configs[size];
4380
- },
4381
- avatar: (size) => {
4382
- const configs = {
4383
- xl: {
4384
- size: 64,
4385
- fontSize: 20,
4386
- iconSize: 32,
4387
- badgeSize: 20,
4388
- badgeOffsetCircle: { right: -4, top: -4 },
4389
- badgeOffsetSquare: { right: -8, top: -8 },
4390
- borderRadiusSquare: shape.avatar.xl.borderRadius,
4391
- borderRadiusCircle: radiusScale["999"]
4392
- },
4393
- lg: {
4394
- size: 56,
4395
- fontSize: 20,
4396
- iconSize: 28,
4397
- badgeSize: 20,
4398
- badgeOffsetCircle: { right: -4, top: -4 },
4399
- badgeOffsetSquare: { right: -8, top: -8 },
4400
- borderRadiusSquare: shape.avatar.lg.borderRadius,
4401
- borderRadiusCircle: radiusScale["999"]
4402
- },
4403
- md: {
4404
- size: 48,
4405
- fontSize: 18,
4406
- iconSize: 24,
4407
- badgeSize: 20,
4408
- badgeOffsetCircle: { right: -5, top: -5 },
4409
- badgeOffsetSquare: { right: -8, top: -8 },
4410
- borderRadiusSquare: shape.avatar.md.borderRadius,
4411
- borderRadiusCircle: radiusScale["999"]
4412
- },
4413
- sm: {
4414
- size: 40,
4415
- fontSize: 16,
4416
- iconSize: 20,
4417
- badgeSize: 20,
4418
- badgeOffsetCircle: { right: -6, top: -6 },
4419
- badgeOffsetSquare: { right: -8, top: -8 },
4420
- borderRadiusSquare: shape.avatar.sm.borderRadius,
4421
- borderRadiusCircle: radiusScale["999"]
4422
- },
4423
- xs: {
4424
- size: 32,
4425
- fontSize: 12,
4426
- iconSize: 16,
4427
- badgeSize: 8,
4428
- badgeOffsetCircle: { right: -1, top: -1 },
4429
- badgeOffsetSquare: { right: -3, top: -3 },
4430
- borderRadiusSquare: shape.avatar.xs.borderRadius,
4431
- borderRadiusCircle: radiusScale["999"]
4432
- },
4433
- xxs: {
4434
- size: 24,
4435
- fontSize: 10,
4436
- iconSize: 12,
4437
- badgeSize: 6,
4438
- badgeOffsetCircle: { right: -1, top: -1 },
4439
- badgeOffsetSquare: { right: -2, top: -2 },
4440
- borderRadiusSquare: shape.avatar.xxs.borderRadius,
4441
- borderRadiusCircle: radiusScale["999"]
4442
- }
4443
- };
4444
- return configs[size];
4445
- },
4446
- tag: (size) => {
4447
- const configs = {
4448
- xl: {
4449
- height: 48,
4450
- padding: 13,
4451
- fontSize: 20,
4452
- lineHeight: 22,
4453
- gap: 6,
4454
- iconSize: 22,
4455
- radius: shape.tag.xl.borderRadius,
4456
- borderWidth: 1
4457
- },
4458
- lg: {
4459
- height: 40,
4460
- padding: 10,
4461
- fontSize: 18,
4462
- lineHeight: 20,
4463
- gap: 6,
4464
- iconSize: 20,
4465
- radius: shape.tag.lg.borderRadius,
4466
- borderWidth: 1
4467
- },
4468
- md: {
4469
- height: 32,
4470
- padding: 7,
4471
- fontSize: 16,
4472
- lineHeight: 18,
4473
- gap: 4,
4474
- iconSize: 18,
4475
- radius: shape.tag.md.borderRadius,
4476
- borderWidth: 1
4477
- },
4478
- sm: {
4479
- height: 24,
4480
- padding: 4,
4481
- fontSize: 14,
4482
- lineHeight: 16,
4483
- gap: 4,
4484
- iconSize: 16,
4485
- radius: shape.tag.sm.borderRadius,
4486
- borderWidth: 1
4487
- },
4488
- xs: {
4489
- height: 20,
4490
- padding: 3,
4491
- fontSize: 12,
4492
- lineHeight: 14,
4493
- gap: 4,
4494
- iconSize: 14,
4495
- radius: shape.tag.xs.borderRadius,
4496
- borderWidth: 1
4497
- }
4498
- };
4499
- return configs[size];
4500
- },
4501
- divider: (size) => {
4502
- const configs = {
4503
- lg: { height: 18, fontSize: 16, lineWeight: 1 },
4504
- md: { height: 16, fontSize: 14, lineWeight: 1 },
4505
- sm: { height: 14, fontSize: 12, lineWeight: 1 }
4506
- };
4507
- return configs[size];
4508
- },
4509
- spinner: (size) => {
4510
- const configs = {
4511
- xl: { size: 96, strokeWidth: 10 },
4512
- lg: { size: 48, strokeWidth: 5 },
4513
- md: { size: 24, strokeWidth: 2 },
4514
- sm: { size: 16, strokeWidth: 2 },
4515
- xs: { size: 8, strokeWidth: 1 }
4516
- };
4517
- return configs[size];
4518
- },
4519
- tabs: (size) => {
4520
- const configs = {
4521
- xl: {
4522
- height: 64,
4523
- fontSize: 20,
4524
- lineHeight: 22,
4525
- iconSize: 24,
4526
- gap: 10,
4527
- paddingHorizontal: 20
4528
- },
4529
- lg: {
4530
- height: 56,
4531
- fontSize: 18,
4532
- lineHeight: 20,
4533
- iconSize: 20,
4534
- gap: 8,
4535
- paddingHorizontal: 20
4536
- },
4537
- md: {
4538
- height: 48,
4539
- fontSize: 16,
4540
- lineHeight: 18,
4541
- iconSize: 18,
4542
- gap: 6,
4543
- paddingHorizontal: 20
4544
- },
4545
- sm: {
4546
- height: 40,
4547
- fontSize: 14,
4548
- lineHeight: 16,
4549
- iconSize: 16,
4550
- gap: 4,
4551
- paddingHorizontal: 20
4552
- }
4553
- };
4554
- return configs[size];
4555
- },
4556
- segmented: (size) => {
4557
- const configs = {
4558
- xl: {
4559
- height: 64,
4560
- containerPadding: 3,
4561
- containerRadius: shape.segmented.xl.borderRadius,
4562
- itemHeight: 56,
4563
- itemPaddingHorizontal: 20,
4564
- itemPaddingVertical: 10,
4565
- itemRadius: shape.segmentedItem.xl.borderRadius,
4566
- fontSize: 20,
4567
- lineHeight: 22,
4568
- iconSize: 24,
4569
- gap: 8
4570
- },
4571
- lg: {
4572
- height: 56,
4573
- containerPadding: 3,
4574
- containerRadius: shape.segmented.lg.borderRadius,
4575
- itemHeight: 48,
4576
- itemPaddingHorizontal: 20,
4577
- itemPaddingVertical: 10,
4578
- itemRadius: shape.segmentedItem.lg.borderRadius,
4579
- fontSize: 18,
4580
- lineHeight: 20,
4581
- iconSize: 24,
4582
- gap: 8
4583
- },
4584
- md: {
4585
- height: 48,
4586
- containerPadding: 3,
4587
- containerRadius: shape.segmented.md.borderRadius,
4588
- itemHeight: 40,
4589
- itemPaddingHorizontal: 16,
4590
- itemPaddingVertical: 8,
4591
- itemRadius: shape.segmentedItem.md.borderRadius,
4592
- fontSize: 16,
4593
- lineHeight: 18,
4594
- iconSize: 24,
4595
- gap: 6
4596
- },
4597
- sm: {
4598
- height: 40,
4599
- containerPadding: 3,
4600
- containerRadius: shape.segmented.sm.borderRadius,
4601
- itemHeight: 32,
4602
- itemPaddingHorizontal: 12,
4603
- itemPaddingVertical: 6,
4604
- itemRadius: shape.segmentedItem.sm.borderRadius,
4605
- fontSize: 14,
4606
- lineHeight: 16,
4607
- iconSize: 20,
4608
- gap: 4
4609
- }
4610
- };
4611
- return configs[size];
4612
- },
4613
- tabsSegmented: (size) => {
4614
- const configs = {
4615
- xl: {
4616
- height: 64,
4617
- containerPadding: 4,
4618
- itemPaddingHorizontal: 16,
4619
- itemPaddingVertical: 18,
4620
- fontSize: 20,
4621
- lineHeight: 22,
4622
- iconSize: 24,
4623
- gap: 8
4624
- },
4625
- lg: {
4626
- height: 56,
4627
- containerPadding: 4,
4628
- itemPaddingHorizontal: 16,
4629
- itemPaddingVertical: 14,
4630
- fontSize: 18,
4631
- lineHeight: 20,
4632
- iconSize: 24,
4633
- gap: 8
4634
- },
4635
- md: {
4636
- height: 48,
4637
- containerPadding: 4,
4638
- itemPaddingHorizontal: 12,
4639
- itemPaddingVertical: 11,
4640
- fontSize: 16,
4641
- lineHeight: 18,
4642
- iconSize: 24,
4643
- gap: 6
4644
- },
4645
- sm: {
4646
- height: 40,
4647
- containerPadding: 3,
4648
- itemPaddingHorizontal: 12,
4649
- itemPaddingVertical: 8,
4650
- fontSize: 14,
4651
- lineHeight: 16,
4652
- iconSize: 20,
4653
- gap: 6
4654
- }
4655
- };
4656
- return configs[size];
4657
- },
4658
- checkboxTagGroup: (size) => {
4659
- const configs = {
4660
- xl: {
4661
- height: 64,
4662
- paddingHorizontal: 16,
4663
- paddingVertical: 21,
4664
- fontSize: 20,
4665
- lineHeight: 22,
4666
- gap: 8,
4667
- borderRadius: radiusScale["50"]
4668
- },
4669
- lg: {
4670
- height: 56,
4671
- paddingHorizontal: 16,
4672
- paddingVertical: 18,
4673
- fontSize: 18,
4674
- lineHeight: 20,
4675
- gap: 8,
4676
- borderRadius: radiusScale["50"]
4677
- },
4678
- md: {
4679
- height: 48,
4680
- paddingHorizontal: 12,
4681
- paddingVertical: 15,
4682
- fontSize: 16,
4683
- lineHeight: 18,
4684
- gap: 8,
4685
- borderRadius: radiusScale["25"]
4686
- },
4687
- sm: {
4688
- height: 40,
4689
- paddingHorizontal: 12,
4690
- paddingVertical: 11,
4691
- fontSize: 14,
4692
- lineHeight: 16,
4693
- gap: 4,
4694
- borderRadius: radiusScale["25"]
4695
- }
4696
- };
4697
- return configs[size];
4698
- },
4699
- badge: (size) => {
4700
- const configs = {
4701
- xl: {
4702
- size: 20,
4703
- fontSize: 12,
4704
- lineHeight: 14,
4705
- iconSize: 12,
4706
- padding: 6
4707
- },
4708
- lg: {
4709
- size: 16,
4710
- fontSize: 10,
4711
- lineHeight: 10,
4712
- iconSize: 10,
4713
- padding: 4
4714
- },
4715
- md: {
4716
- size: 12,
4717
- fontSize: 10,
4718
- lineHeight: 10,
4719
- iconSize: 8,
4720
- padding: 3
4721
- },
4722
- sm: { size: 8, fontSize: 8, lineHeight: 8, iconSize: 6, padding: 0 },
4723
- xs: { size: 4, fontSize: 4, lineHeight: 4, iconSize: 4, padding: 0 }
4724
- };
4725
- return configs[size];
4726
- },
4727
- notification: (type) => {
4728
- const configs = {
4729
- toast: {
4730
- width: 400,
4731
- paddingHorizontal: 20,
4732
- paddingVertical: 16,
4733
- gap: 16,
4734
- titleSize: 18,
4735
- messageSize: 14,
4736
- iconSize: 20,
4737
- iconWrapperSize: 32,
4738
- radius: shape.toast.borderRadius
4739
- },
4740
- inline: {
4741
- width: "100%",
4742
- paddingHorizontal: 20,
4743
- paddingVertical: 16,
4744
- gap: 28,
4745
- titleSize: 18,
4746
- messageSize: 14,
4747
- iconSize: 20,
4748
- iconWrapperSize: 32,
4749
- radius: shape.modal.borderRadius
4750
- }
4751
- };
4752
- return configs[type];
4753
- },
4754
- notificationPanel: (device = "desktop") => {
4755
- const desktop = {
4756
- minHeight: 66,
4757
- iconFrameWidth: 54,
4758
- iconSize: 24,
4759
- borderRadius: radiusScale["100"],
4760
- bodyPaddingHorizontal: 16,
4761
- bodyPaddingVertical: 12,
4762
- textGap: 2,
4763
- contentGap: 24,
4764
- buttonsGap: 8,
4765
- closeButtonSize: 32,
4766
- notificationCloseIconSize: 18,
4767
- titleFontSize: 16,
4768
- titleLineHeight: 20,
4769
- descriptionFontSize: 14,
4770
- descriptionLineHeight: 20,
4771
- // Announcement variant: slim, single-line banner
4772
- announcementPadding: 8,
4773
- announcementGap: 16,
4774
- announcementContentGap: 8,
4775
- announcementIconSize: 16,
4776
- announcementButtonsGap: 20,
4777
- announcementCloseIconSize: 16,
4778
- announcementBlurRadius: 4,
4779
- // Mobile notification: icon | content column | close column
4780
- mobileIconColumnPaddingVertical: 12,
4781
- mobileIconColumnPaddingLeft: 8,
4782
- mobileIconSize: 24,
4783
- mobileBodyPaddingHorizontal: 16,
4784
- mobileBodyPaddingVertical: 12,
4785
- mobileBodyContentGap: 24,
4786
- mobileNotificationActionButtonOffsetLeft: -4,
4787
- mobileCloseColumnPaddingVertical: 12,
4788
- mobileCloseColumnPaddingRight: 12
4789
- };
4790
- return desktop;
4791
- },
4792
- progress: (size) => {
4793
- const configs = {
4794
- xl: { height: 10, labelSize: 16, helperSize: 14, gap: 10 },
4795
- lg: { height: 8, labelSize: 14, helperSize: 12, gap: 8 },
4796
- md: { height: 6, labelSize: 12, helperSize: 12, gap: 6 },
4797
- sm: { height: 4, labelSize: 12, helperSize: 12, gap: 4 },
4798
- xs: { height: 2, labelSize: 10, helperSize: 10, gap: 2 },
4799
- xxs: { height: 2, labelSize: 10, helperSize: 10, gap: 2 },
4800
- l: { height: 8, labelSize: 16, helperSize: 14, gap: 10 },
4801
- m: { height: 6, labelSize: 14, helperSize: 12, gap: 8 },
4802
- s: { height: 4, labelSize: 12, helperSize: 12, gap: 6 }
4803
- };
4804
- return configs[size];
4805
- },
4806
- /**
4807
- * SupportingText sizing.
4808
- *
4809
- * Typography is bound to the `Theme / Typography` body tokens rather than
4810
- * hardcoded px values, so a change to the Figma-synced scale propagates
4811
- * automatically. Each size maps to the body token whose font-size and
4812
- * compact line-height match the corresponding Figma size variant:
4813
- *
4814
- * | size | typography token | font-size / line-height | icon | gap |
4815
- * | ---- | ---------------- | ----------------------- | ---- | --- |
4816
- * | xl | `body-lg` | 18 / 24 | 18 | 6 |
4817
- * | lg | `body-md` | 16 / 20 | 18 | 6 |
4818
- * | md | `body-sm` | 14 / 18 | 18 | 6 |
4819
- * | sm | `body-xs` | 12 / 16 | 14 | 4 |
4820
- * | xs | `body-xxs` | 10 / 14 | 14 | 4 |
4821
- *
4822
- * `requiredIndicator` is the required-field asterisk that sits beside a
4823
- * label. Figma renders it one step down the same scale, so it aliases the
4824
- * next-smaller size's token instead of carrying its own table.
4825
- *
4826
- * `gap` is the spacing between the text and its trailing icon (Figma
4827
- * `Label & icon` frame item-spacing).
4828
- *
4829
- * @see https://www.figma.com/design/m0qqLlCvR29fvqj0EzlLAU/Xsolla-UI-Toolkit?node-id=5680-33147
4830
- */
4831
- supportingText: (size) => {
4832
- const typographyBySize = {
4833
- xl: contextTypography.basic["body-lg"],
4834
- lg: contextTypography.basic["body-md"],
4835
- md: contextTypography.basic["body-sm"],
4836
- sm: contextTypography.basic["body-xs"],
4837
- xs: contextTypography.basic["body-xxs"]
4838
- };
4839
- const dimensions = {
4840
- xl: { gap: 6, iconSize: 18 },
4841
- lg: { gap: 6, iconSize: 18 },
4842
- md: { gap: 6, iconSize: 18 },
4843
- sm: { gap: 4, iconSize: 14 },
4844
- xs: { gap: 4, iconSize: 14 }
4845
- };
4846
- const requiredIndicatorSizeMap = {
4847
- xl: "lg",
4848
- lg: "md",
4849
- md: "sm",
4850
- sm: "xs",
4851
- xs: "xs"
4852
- };
4853
- const typography2 = typographyBySize[size];
4854
- const requiredTypography = typographyBySize[requiredIndicatorSizeMap[size]];
4855
- return {
4856
- fontSize: typography2.fontSize,
4857
- lineHeight: typography2.lineHeight,
4858
- fontWeight: typography2.fontWeight,
4859
- fontFamily: contextFonts.body,
4860
- requiredIndicator: {
4861
- fontSize: requiredTypography.fontSize,
4862
- lineHeight: requiredTypography.lineHeight
4863
- },
4864
- ...dimensions[size]
4865
- };
4866
- },
4867
- iconWrapper: (size) => {
4868
- const configs = {
4869
- xl: { size: 56, iconSize: 32, fontSize: 24 },
4870
- lg: { size: 48, iconSize: 28, fontSize: 20 },
4871
- md: { size: 40, iconSize: 24, fontSize: 18 },
4872
- sm: { size: 32, iconSize: 20, fontSize: 16 },
4873
- xs: { size: 24, iconSize: 16, fontSize: 14 },
4874
- xxs: { size: 18, iconSize: 12, fontSize: 12 }
4875
- };
4876
- return configs[size];
4877
- },
4878
- stepper: (size) => {
4879
- const configs = {
4880
- md: {
4881
- iconSize: 32,
4882
- titleSize: 16,
4883
- descSize: 14,
4884
- gap: 12,
4885
- currentTitleSize: 20,
4886
- currentDescSize: 14,
4887
- currentPadding: 24,
4888
- tailSize: 5
4889
- },
4890
- sm: {
4891
- iconSize: 24,
4892
- titleSize: 14,
4893
- descSize: 12,
4894
- gap: 8,
4895
- currentTitleSize: 16,
4896
- currentDescSize: 12,
4897
- currentPadding: 20,
4898
- tailSize: 3
4899
- }
4900
- };
4901
- return configs[size];
4902
- },
4903
- contextMenu: (size) => {
4904
- const configs = {
4905
- xl: {
4906
- paddingVertical: 8,
4907
- paddingHorizontal: 8,
4908
- itemPaddingHorizontal: 16,
4909
- itemPaddingVertical: 18,
4910
- fontSize: 20,
4911
- lineHeight: 26,
4912
- descriptionFontSize: 18,
4913
- iconSize: 18,
4914
- gap: 12,
4915
- minWidth: 276,
4916
- panelWidth: 320,
4917
- statusDotSize: 12,
4918
- iconWrapperSize: 40,
4919
- triggerOffset: 4,
4920
- borderRadius: 8,
4921
- // Search sizing from Figma
4922
- searchPaddingHorizontal: 16,
4923
- searchPaddingVertical: 18,
4924
- searchGap: 18,
4925
- searchFontSize: 20,
4926
- searchLineHeight: 26,
4927
- searchIconSize: 18
4928
- },
4929
- lg: {
4930
- paddingVertical: 8,
4931
- paddingHorizontal: 8,
4932
- itemPaddingHorizontal: 14,
4933
- itemPaddingVertical: 14,
4934
- fontSize: 18,
4935
- lineHeight: 24,
4936
- descriptionFontSize: 16,
4937
- iconSize: 18,
4938
- gap: 10,
4939
- minWidth: 220,
4940
- panelWidth: 296,
4941
- statusDotSize: 10,
4942
- iconWrapperSize: 36,
4943
- triggerOffset: 4,
4944
- borderRadius: 8,
4945
- // Search sizing from Figma
4946
- searchPaddingHorizontal: 14,
4947
- searchPaddingVertical: 14,
4948
- searchGap: 14,
4949
- searchFontSize: 18,
4950
- searchLineHeight: 24,
4951
- searchIconSize: 18
4952
- },
4953
- md: {
4954
- paddingVertical: 8,
4955
- paddingHorizontal: 8,
4956
- itemPaddingHorizontal: 12,
4957
- itemPaddingVertical: 11,
4958
- fontSize: 16,
4959
- lineHeight: 20,
4960
- descriptionFontSize: 14,
4961
- iconSize: 18,
4962
- gap: 8,
4963
- minWidth: 172,
4964
- panelWidth: 272,
4965
- statusDotSize: 8,
4966
- iconWrapperSize: 32,
4967
- triggerOffset: 4,
4968
- borderRadius: 8,
4969
- // Search sizing from Figma
4970
- searchPaddingHorizontal: 12,
4971
- searchPaddingVertical: 11,
4972
- searchGap: 10,
4973
- searchFontSize: 16,
4974
- searchLineHeight: 20,
4975
- searchIconSize: 18
4976
- },
4977
- sm: {
4978
- paddingVertical: 8,
4979
- paddingHorizontal: 8,
4980
- itemPaddingHorizontal: 10,
4981
- itemPaddingVertical: 8,
4982
- fontSize: 14,
4983
- lineHeight: 18,
4984
- descriptionFontSize: 12,
4985
- iconSize: 18,
4986
- gap: 8,
4987
- minWidth: 132,
4988
- panelWidth: 248,
4989
- statusDotSize: 6,
4990
- iconWrapperSize: 24,
4991
- triggerOffset: 4,
4992
- borderRadius: 4,
4993
- // Search sizing from Figma
4994
- searchPaddingHorizontal: 10,
4995
- searchPaddingVertical: 7,
4996
- searchGap: 6,
4997
- searchFontSize: 14,
4998
- searchLineHeight: 18,
4999
- searchIconSize: 18
5000
- }
5001
- };
5002
- return configs[size];
5003
- },
5004
- modal: () => {
5005
- return {
5006
- borderRadius: shape.modal.borderRadius,
5007
- headerPadding: "24px 24px 0",
5008
- contentPadding: 24,
5009
- /** @deprecated Header buttons no longer use IconButton sizes. */
5010
- headerButtonSize: "xs",
5011
- /** @deprecated Header buttons are FlexButtons; size comes from `Modal`'s `closeButtonSize`. */
5012
- headerIconSize: 28,
5013
- /** @deprecated Header buttons are FlexButtons; padding is owned by FlexButton. */
5014
- headerButtonPadding: 4,
5015
- /** @deprecated Header buttons are FlexButtons; radius comes from FlexButton's size scale. */
5016
- headerButtonRadius: 4,
5017
- headerMinHeight: 44,
5018
- headerGap: 16,
5019
- footerGap: 16,
5020
- /** @deprecated Modal elevation comes from the scrim, not a drop shadow. */
5021
- shadow: "0px 8px 12px 6px rgba(7, 7, 8, 0.1), 0px 4px 4px rgba(7, 7, 8, 0.2)",
5022
- maxWidth: 680,
5023
- overlayColor: "rgba(0, 0, 0, 0.75)",
5024
- portalPadding: 20,
5025
- /** @deprecated Layering is contextual now; see OVERLAY_LAYER_BASE / useOverlayLayer. */
5026
- zIndex: 1e3
5027
- };
5028
- },
5029
- drawer: () => ({
5030
- // Sizing values from Figma design: B2B Components Library node-id=8291-103845
5031
- widthSm: 480,
5032
- widthMd: 620,
5033
- widthLg: 1056,
5034
- headerHeight: 80,
5035
- headerPaddingX: 32,
5036
- headerPaddingY: 24,
5037
- headerGap: 24,
5038
- titleFontSize: 18,
5039
- titleLineHeight: 24,
5040
- contentPaddingX: 32,
5041
- footerPadding: 32,
5042
- outerPadding: 8,
5043
- containerRadius: 4,
5044
- contentRadius: 8,
5045
- stepperPadding: 16,
5046
- stepperRadius: 8,
5047
- stepperContentGap: 8,
5048
- scrimColor: "rgba(0, 0, 0, 0.75)",
5049
- animationDuration: 300,
5050
- /** @deprecated Layering is contextual now; see MODAL_LAYER_STEP / useOverlayLayer. */
5051
- zIndex: 1e3
5052
- }),
5053
- sidebar: () => ({
5054
- // Sizing values from Figma design: B2B Components Library
5055
- widthExpanded: 280,
5056
- widthCollapsed: 48,
5057
- radius: 4,
5058
- itemHeight: 32,
5059
- iconSize: 18,
5060
- padding: 8,
5061
- sectionLabelHeight: 20,
5062
- // Aligns nested item text with parent label (padding 8 + icon 18 + gap 8 = 34)
5063
- // and centers the rail under the parent icon (padding 8 + iconSize/2 = 17).
5064
- nestedItemPaddingLeft: 34,
5065
- nestedItemRailLeft: 17,
5066
- chevronSize: 14,
5067
- externalIconSize: 18,
5068
- chatBadgeSize: 6,
5069
- itemBadgeSize: 4,
5070
- focusOutlineWidth: 2,
5071
- scrollbarWidth: 4,
5072
- popoverGap: 12,
5073
- popoverViewportPadding: 8,
5074
- popoverMinWidth: 180,
5075
- popoverMaxWidth: 240,
5076
- popoverShadow: "0 2px 25px rgba(7, 7, 8, 0.15)",
5077
- /** @deprecated Layering is contextual now; see useOverlayLayer / LAYER_OFFSET. */
5078
- popoverZIndex: 1e3,
5079
- transitionWidth: "0.25s ease-in-out",
5080
- transitionFadeIn: "opacity 0.15s ease-in-out 0.1s",
5081
- transitionFadeOut: "opacity 0.1s ease-in-out",
5082
- transitionItem: "background-color 0.15s ease-in-out, color 0.15s ease-in-out",
5083
- transitionRows: "grid-template-rows 0.25s ease-in-out"
5084
- }),
5085
- stepperB2b: () => ({
5086
- // Sizing values from Figma design: B2B Components Library
5087
- // variant grid node-id=10999-17988, state grid node-id=10259-5501
5088
- chipSize: 32,
5089
- chipRadius: 2,
5090
- chipPaddingTop: 5,
5091
- chipPaddingBottom: 4,
5092
- chipPaddingX: 4,
5093
- chipIconSize: 16,
5094
- numberFontSize: 18,
5095
- numberLineHeight: 24,
5096
- titleFontSize: 16,
5097
- titleLineHeight: 20,
5098
- descriptionFontSize: 14,
5099
- descriptionLineHeight: 20,
5100
- captionFontSize: 12,
5101
- captionLineHeight: 16,
5102
- itemGap: 12,
5103
- contentGap: 4,
5104
- contentMinHeight: 32,
5105
- contentWidth: 128,
5106
- activeCardRadiusVertical: 4,
5107
- activeCardRadiusHorizontal: 6,
5108
- activeCardPaddingTop: 24,
5109
- activeCardPaddingX: 24,
5110
- activeCardPaddingYHorizontal: 12,
5111
- activeCardPaddingLeftHorizontal: 12,
5112
- activeCardGapHorizontal: 8,
5113
- innerConnectorLength: 48,
5114
- connectorSegment: 24,
5115
- connectorCellHeight: 24,
5116
- connectorCellWidth: 80,
5117
- surfaceRadius: 8,
5118
- surfacePaddingVertical: 16,
5119
- surfacePaddingHorizontal: 8,
5120
- horizontalItemGap: 16,
5121
- horizontalFirstItemWidth: 220,
5122
- horizontalItemWidth: 236,
5123
- horizontalConnectorSegment: 32,
5124
- horizontalConnectorGap: 12,
5125
- simpleCardPadding: 12,
5126
- simpleCardRadius: 4,
5127
- simpleCardGap: 4,
5128
- simpleItemGap: 4,
5129
- simpleHorizontalCellWidth: 56,
5130
- simpleHorizontalStubLength: 8
5131
- }),
5132
- collapsibleB2b: () => ({
5133
- // Sizing values from Figma design: B2B Components Library node-id=10469-6509
5134
- triggerPadding: 16,
5135
- triggerGap: 12,
5136
- triggerMinHeight: 56,
5137
- surfaceRadius: radiusScale["50"],
5138
- // Must match surfaceRadius: the root clips with `overflow: hidden`, so a
5139
- // larger cell radius makes the trigger cell's corners show through the
5140
- // smaller root arc (XUITSD-55).
5141
- cellRadius: radiusScale["50"],
5142
- iconSlotSize: 32,
5143
- iconSlotRadius: radiusScale["50"],
5144
- chevronSize: 24,
5145
- trailingGap: 8,
5146
- textGap: 2,
5147
- titleFontSize: 16,
5148
- titleLineHeight: 20,
5149
- captionFontSize: 12,
5150
- captionLineHeight: 18,
5151
- panelPadding: 16,
5152
- accordionItemGap: 8
5153
- }),
5154
- toast: () => {
5155
- return {
5156
- minHeight: 64,
5157
- paddingHorizontal: 12,
5158
- paddingVertical: 8,
5159
- borderRadius: shape.toast.borderRadius,
5160
- gap: 12,
5161
- iconSize: 24,
5162
- closeButtonSize: 24,
5163
- closeIconSize: 20,
5164
- fontSize: 16,
5165
- lineHeight: 20,
5166
- maxWidth: 400,
5167
- containerPadding: 12,
5168
- groupGap: 4
5169
- };
5170
- },
5171
- toggleButtonGroup: (size) => {
5172
- const configs = {
5173
- xl: {
5174
- height: 64,
5175
- paddingHorizontal: 21,
5176
- fontSize: 20,
5177
- lineHeight: 22,
5178
- iconSize: 22,
5179
- gap: 6,
5180
- borderRadius: shape.toggleButtonGroup.xl.borderRadius,
5181
- itemGap: 8,
5182
- tooltipSize: "lg"
5183
- },
5184
- lg: {
5185
- height: 56,
5186
- paddingHorizontal: 18,
5187
- fontSize: 18,
5188
- lineHeight: 20,
5189
- iconSize: 20,
5190
- gap: 4,
5191
- borderRadius: shape.toggleButtonGroup.lg.borderRadius,
5192
- itemGap: 8,
5193
- tooltipSize: "md"
5194
- },
5195
- md: {
5196
- height: 48,
5197
- paddingHorizontal: 15,
5198
- fontSize: 16,
5199
- lineHeight: 18,
5200
- iconSize: 18,
5201
- gap: 4,
5202
- borderRadius: shape.toggleButtonGroup.md.borderRadius,
5203
- itemGap: 6,
5204
- tooltipSize: "md"
5205
- },
5206
- sm: {
5207
- height: 40,
5208
- paddingHorizontal: 12,
5209
- fontSize: 14,
5210
- lineHeight: 16,
5211
- iconSize: 16,
5212
- gap: 4,
5213
- borderRadius: shape.toggleButtonGroup.sm.borderRadius,
5214
- itemGap: 4,
5215
- tooltipSize: "sm"
5216
- },
5217
- xs: {
5218
- height: 32,
5219
- paddingHorizontal: 9,
5220
- fontSize: 12,
5221
- lineHeight: 14,
5222
- iconSize: 14,
5223
- gap: 4,
5224
- borderRadius: shape.toggleButtonGroup.xs.borderRadius,
5225
- itemGap: 4,
5226
- tooltipSize: "sm"
5227
- }
5228
- };
5229
- return configs[size];
5230
- },
5231
- table: {
5232
- containerRadius: 8,
5233
- containerPaddingVertical: 0,
5234
- containerGap: 0,
5235
- captionFontSize: 14,
5236
- captionLineHeight: 20,
5237
- headerRowHeight: 56,
5238
- headerRowPaddingHorizontal: 24,
5239
- headerCellGap: 4,
5240
- headerCellFontSize: 14,
5241
- headerCellLineHeight: 18,
5242
- rowHeight: 56,
5243
- rowPaddingHorizontal: 24,
5244
- cellGap: 16,
5245
- cellFontSize: 14,
5246
- cellLineHeight: 18,
5247
- paginationGap: 16,
5248
- paginationPaddingHorizontal: 24
5249
- }
5250
- }
5251
- };
5252
- };
5253
5777
  var DesignSystemContext = (0, import_react3.createContext)(
5254
5778
  void 0
5255
5779
  );
@@ -5329,6 +5853,9 @@ var useIdFallback = () => {
5329
5853
  var useId = hasReactUseId ? import_react3.default.useId : useIdFallback;
5330
5854
  var ModalIdContext = (0, import_react3.createContext)(null);
5331
5855
  var useModalId = () => (0, import_react3.useContext)(ModalIdContext);
5856
+
5857
+ // src/overlay.ts
5858
+ var import_react4 = require("react");
5332
5859
  var OVERLAY_LAYER_BASE = 1e3;
5333
5860
  var LAYER_OFFSET = {
5334
5861
  /** Trigger-anchored value lists: dropdown, select, multi-select, autocomplete. */
@@ -5340,12 +5867,12 @@ var LAYER_OFFSET = {
5340
5867
  };
5341
5868
  var MODAL_LAYER_STEP = 1e3;
5342
5869
  var TOAST_LAYER = 9999;
5343
- var OverlayLayerContext = (0, import_react3.createContext)(OVERLAY_LAYER_BASE);
5870
+ var OverlayLayerContext = (0, import_react4.createContext)(OVERLAY_LAYER_BASE);
5344
5871
  var OverlayLayerProvider = OverlayLayerContext.Provider;
5345
- var useOverlayLayer = () => (0, import_react3.useContext)(OverlayLayerContext);
5346
- var ModalStackContext = (0, import_react3.createContext)(0);
5872
+ var useOverlayLayer = () => (0, import_react4.useContext)(OverlayLayerContext);
5873
+ var ModalStackContext = (0, import_react4.createContext)(0);
5347
5874
  var ModalStackProvider = ModalStackContext.Provider;
5348
- var useModalStackDepth = () => (0, import_react3.useContext)(ModalStackContext);
5875
+ var useModalStackDepth = () => (0, import_react4.useContext)(ModalStackContext);
5349
5876
  // Annotate the CommonJS export names for ESM import in node:
5350
5877
  0 && (module.exports = {
5351
5878
  DISPLAY_SCALE_STEPS,