@xsolla/xui-core 0.216.1 → 0.218.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -67,6 +67,7 @@ __export(index_exports, {
67
67
  shadow: () => shadow,
68
68
  shape: () => shape,
69
69
  spacing: () => spacing,
70
+ spacingScale: () => spacingScale,
70
71
  stroke: () => stroke,
71
72
  themeConfig: () => themeConfig,
72
73
  typography: () => typography,
@@ -79,7 +80,6 @@ __export(index_exports, {
79
80
  useResolvedTheme: () => useResolvedTheme
80
81
  });
81
82
  module.exports = __toCommonJS(index_exports);
82
- var import_react3 = __toESM(require("react"));
83
83
 
84
84
  // src/tokens/dark.json
85
85
  var dark_default = {
@@ -1386,6 +1386,441 @@ var ltg_dark_default = {
1386
1386
  }
1387
1387
  };
1388
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
+
1389
1824
  // src/tokens/blueprints.json
1390
1825
  var blueprints_default = {
1391
1826
  background: {
@@ -2698,24 +3133,43 @@ var colors = {
2698
3133
  "pentagram-dark": dark_default,
2699
3134
  "pentagram-light": light_default,
2700
3135
  "ltg-dark": ltg_dark_default,
3136
+ "ltg-light": ltg_light_default,
2701
3137
  blueprints: blueprints_default,
2702
3138
  "corpsite-dark": corpsite_dark_default,
2703
3139
  "corpsite-light": corpsite_light_default
2704
3140
  };
2705
3141
 
2706
3142
  // src/tokens/spacing.ts
3143
+ var spacingScale = {
3144
+ "25": 2,
3145
+ "50": 4,
3146
+ "75": 6,
3147
+ "100": 8,
3148
+ "150": 12,
3149
+ "200": 16,
3150
+ "250": 20,
3151
+ "300": 24,
3152
+ "350": 28,
3153
+ "400": 32,
3154
+ "450": 36,
3155
+ "500": 40,
3156
+ "600": 48,
3157
+ "700": 56,
3158
+ "800": 64,
3159
+ "900": 72
3160
+ };
2707
3161
  var spacing = {
2708
- xs: 4,
2709
- sm: 8,
2710
- md: 16,
2711
- lg: 24,
2712
- xl: 32,
3162
+ xs: spacingScale["50"],
3163
+ sm: spacingScale["100"],
3164
+ md: spacingScale["200"],
3165
+ lg: spacingScale["300"],
3166
+ xl: spacingScale["400"],
2713
3167
  /** @deprecated Use `sm` instead (same 8px). Kept for backwards compatibility. */
2714
- s: 8,
3168
+ s: spacingScale["100"],
2715
3169
  /** @deprecated Use `md` instead (same 16px). Kept for backwards compatibility. */
2716
- m: 16,
3170
+ m: spacingScale["200"],
2717
3171
  /** @deprecated Use `lg` instead (same 24px). Kept for backwards compatibility. */
2718
- l: 24
3172
+ l: spacingScale["300"]
2719
3173
  };
2720
3174
  var radius = {
2721
3175
  button: 4,
@@ -2780,7 +3234,8 @@ var shape = {
2780
3234
  xl: { borderRadius: radiusScale["50"], borderWidth: stroke["1"] },
2781
3235
  lg: { borderRadius: radiusScale["50"], borderWidth: stroke["1"] },
2782
3236
  md: { borderRadius: radiusScale["50"], borderWidth: stroke["1"] },
2783
- sm: { borderRadius: radiusScale["25"], borderWidth: stroke["1"] }
3237
+ sm: { borderRadius: radiusScale["25"], borderWidth: stroke["1"] },
3238
+ xs: { borderRadius: radiusScale["25"], borderWidth: stroke["1"] }
2784
3239
  },
2785
3240
  switch: {
2786
3241
  xl: { borderRadius: radiusScale["50"], borderWidth: stroke["1"] },
@@ -2843,7 +3298,9 @@ var shape = {
2843
3298
  borderRadius: radiusScale["100"]
2844
3299
  },
2845
3300
  toast: {
2846
- borderRadius: radiusScale["50"]
3301
+ borderRadius: radiusScale["50"],
3302
+ /** Figma "toast/frame/border-width" is 0 — toast is borderless by design. */
3303
+ borderWidth: 0
2847
3304
  },
2848
3305
  toggleButtonGroup: {
2849
3306
  xl: { borderRadius: radiusScale["100"], borderWidth: stroke["1"] },
@@ -3002,6 +3459,92 @@ var responsiveTypographyScale = {
3002
3459
  };
3003
3460
 
3004
3461
  // src/tokens/typography.ts
3462
+ var displayVariants = {
3463
+ b2c: {
3464
+ "display-lg": {
3465
+ fontSize: fontSize["900"].common,
3466
+ lineHeight: `${lineHeightDisplay["900"].common}px`,
3467
+ fontWeight: 700,
3468
+ scaleStep: "900",
3469
+ lineHeightCategory: "display",
3470
+ letterSpacing: -4,
3471
+ fontRole: "display"
3472
+ },
3473
+ "display-md": {
3474
+ fontSize: fontSize["850"].common,
3475
+ lineHeight: `${lineHeightDisplay["850"].common}px`,
3476
+ fontWeight: 700,
3477
+ scaleStep: "850",
3478
+ lineHeightCategory: "display",
3479
+ letterSpacing: -3,
3480
+ fontRole: "display"
3481
+ },
3482
+ "display-sm": {
3483
+ fontSize: fontSize["300"].common,
3484
+ lineHeight: `${lineHeightCompact["300"].common}px`,
3485
+ fontWeight: 500,
3486
+ scaleStep: "300",
3487
+ lineHeightCategory: "compact",
3488
+ fontRole: "compact"
3489
+ }
3490
+ },
3491
+ b2b: {
3492
+ "display-lg": {
3493
+ fontSize: fontSize["900"].common,
3494
+ lineHeight: `${lineHeightDisplay["900"].common}px`,
3495
+ fontWeight: 300,
3496
+ scaleStep: "900",
3497
+ lineHeightCategory: "display",
3498
+ letterSpacing: -4,
3499
+ fontRole: "display"
3500
+ },
3501
+ "display-md": {
3502
+ fontSize: fontSize["850"].common,
3503
+ lineHeight: `${lineHeightDisplay["850"].common}px`,
3504
+ fontWeight: 300,
3505
+ scaleStep: "850",
3506
+ lineHeightCategory: "display",
3507
+ letterSpacing: -3,
3508
+ fontRole: "display"
3509
+ },
3510
+ "display-sm": {
3511
+ fontSize: fontSize["750"].common,
3512
+ lineHeight: `${lineHeightDisplay["750"].common}px`,
3513
+ fontWeight: 400,
3514
+ scaleStep: "750",
3515
+ lineHeightCategory: "display",
3516
+ fontRole: "display"
3517
+ }
3518
+ },
3519
+ corpsite: {
3520
+ "display-lg": {
3521
+ fontSize: fontSize["900"].common,
3522
+ lineHeight: `${lineHeightDisplay["900"].common}px`,
3523
+ fontWeight: 300,
3524
+ scaleStep: "900",
3525
+ lineHeightCategory: "display",
3526
+ letterSpacing: -4,
3527
+ fontRole: "display"
3528
+ },
3529
+ "display-md": {
3530
+ fontSize: fontSize["850"].common,
3531
+ lineHeight: `${lineHeightDisplay["850"].common}px`,
3532
+ fontWeight: 300,
3533
+ scaleStep: "850",
3534
+ lineHeightCategory: "display",
3535
+ letterSpacing: -3,
3536
+ fontRole: "display"
3537
+ },
3538
+ "display-sm": {
3539
+ fontSize: fontSize["750"].common,
3540
+ lineHeight: `${lineHeightDisplay["750"].common}px`,
3541
+ fontWeight: 400,
3542
+ scaleStep: "750",
3543
+ lineHeightCategory: "display",
3544
+ fontRole: "display"
3545
+ }
3546
+ }
3547
+ };
3005
3548
  var typographyTokens = {
3006
3549
  b2c: {
3007
3550
  heading: {
@@ -3042,13 +3585,8 @@ var typographyTokens = {
3042
3585
  }
3043
3586
  },
3044
3587
  basic: {
3045
- display: {
3046
- fontSize: fontSize["550"].common,
3047
- lineHeight: `${lineHeightDisplay["550"].common}px`,
3048
- fontWeight: 800,
3049
- scaleStep: "550",
3050
- lineHeightCategory: "display"
3051
- },
3588
+ ...displayVariants.b2c,
3589
+ display: displayVariants.b2c["display-lg"],
3052
3590
  "body-lg": {
3053
3591
  fontSize: fontSize["175"].common,
3054
3592
  lineHeight: `${lineHeightCompact["175"].common}px`,
@@ -3155,13 +3693,8 @@ var typographyTokens = {
3155
3693
  }
3156
3694
  },
3157
3695
  basic: {
3158
- display: {
3159
- fontSize: fontSize["750"].common,
3160
- lineHeight: `${lineHeightDisplay["750"].common}px`,
3161
- fontWeight: 400,
3162
- scaleStep: "750",
3163
- lineHeightCategory: "display"
3164
- },
3696
+ ...displayVariants.b2b,
3697
+ display: displayVariants.b2b["display-lg"],
3165
3698
  "body-lg": {
3166
3699
  fontSize: fontSize["175"].common,
3167
3700
  lineHeight: `${lineHeightCompact["175"].common}px`,
@@ -3268,16 +3801,8 @@ var typographyTokens = {
3268
3801
  }
3269
3802
  },
3270
3803
  basic: {
3271
- // Figma splits corpsite display into display-lg (96px) / display-md (80px)
3272
- // / display-sm (64px). The app models a single `display`; mapped to
3273
- // display-lg (step 900) — the largest, matching Figma's primary display.
3274
- display: {
3275
- fontSize: fontSize["900"].common,
3276
- lineHeight: `${lineHeightDisplay["900"].common}px`,
3277
- fontWeight: 300,
3278
- scaleStep: "900",
3279
- lineHeightCategory: "display"
3280
- },
3804
+ ...displayVariants.corpsite,
3805
+ display: displayVariants.corpsite["display-lg"],
3281
3806
  "body-lg": {
3282
3807
  fontSize: fontSize["175"].common,
3283
3808
  lineHeight: `${lineHeightCompact["175"].common}px`,
@@ -3355,8 +3880,18 @@ var getTypographyVariant = (productContext, variant) => {
3355
3880
  if (variant in tokens.heading) {
3356
3881
  return tokens.heading[variant];
3357
3882
  }
3358
- if (variant === "display") {
3359
- return tokens.basic.display;
3883
+ const displayVariantMap = {
3884
+ display: "display-lg",
3885
+ displayLg: "display-lg",
3886
+ displayMd: "display-md",
3887
+ displaySm: "display-sm",
3888
+ "display-lg": "display-lg",
3889
+ "display-md": "display-md",
3890
+ "display-sm": "display-sm"
3891
+ };
3892
+ const displayKey = displayVariantMap[variant];
3893
+ if (displayKey) {
3894
+ return tokens.basic[displayKey];
3360
3895
  }
3361
3896
  const bodyVariantMap = {
3362
3897
  bodyLg: "body-lg",
@@ -3385,6 +3920,1576 @@ var getTypographyVariant = (productContext, variant) => {
3385
3920
  return void 0;
3386
3921
  };
3387
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
+
3388
5493
  // src/fonts/FontLoader.tsx
3389
5494
  var import_react = require("react");
3390
5495
 
@@ -3667,1486 +5772,8 @@ var TypographyStyleLoader = () => {
3667
5772
  };
3668
5773
  TypographyStyleLoader.displayName = "TypographyStyleLoader";
3669
5774
 
3670
- // src/index.tsx
5775
+ // src/provider.tsx
3671
5776
  var import_jsx_runtime = require("react/jsx-runtime");
3672
- var DEPRECATED_MODES = /* @__PURE__ */ new Set([
3673
- "xsolla-dark",
3674
- "xsolla-light",
3675
- "xsollaDark",
3676
- "xsollaLight"
3677
- ]);
3678
- var themeConfig = (mode = "dark", productContext = defaultProductContext) => {
3679
- if (DEPRECATED_MODES.has(mode)) {
3680
- console.warn(
3681
- `Theme mode "${mode}" is deprecated and will be removed in the next major update. Please migrate to "dark" or "light".`
3682
- );
3683
- }
3684
- const contextFonts = getFonts(productContext);
3685
- const contextTypography = getTypographyTokens(productContext);
3686
- return {
3687
- colors: colors[mode],
3688
- spacing,
3689
- shape,
3690
- shadow,
3691
- fonts: contextFonts,
3692
- typography: {
3693
- primary: contextFonts.body,
3694
- heading: contextFonts.heading,
3695
- body: contextFonts.body
3696
- },
3697
- typographyTokens: contextTypography,
3698
- productContext,
3699
- sizing: {
3700
- button: (size) => {
3701
- const configs = {
3702
- xl: {
3703
- height: 64,
3704
- padding: 20,
3705
- fontSize: 20,
3706
- lineHeight: 22,
3707
- sublabelFontSize: 18,
3708
- spinnerSize: 24,
3709
- iconSize: 32,
3710
- iconContainerSize: 64,
3711
- borderRadius: shape.button.xl.borderRadius,
3712
- labelIconSize: 22,
3713
- labelIconGap: 6
3714
- },
3715
- lg: {
3716
- height: 56,
3717
- padding: 18,
3718
- fontSize: 18,
3719
- lineHeight: 20,
3720
- sublabelFontSize: 16,
3721
- spinnerSize: 24,
3722
- iconSize: 28,
3723
- iconContainerSize: 56,
3724
- borderRadius: shape.button.lg.borderRadius,
3725
- labelIconSize: 20,
3726
- labelIconGap: 4
3727
- },
3728
- md: {
3729
- height: 48,
3730
- padding: 16,
3731
- fontSize: 16,
3732
- lineHeight: 18,
3733
- sublabelFontSize: 14,
3734
- spinnerSize: 24,
3735
- iconSize: 24,
3736
- iconContainerSize: 48,
3737
- borderRadius: shape.button.md.borderRadius,
3738
- labelIconSize: 18,
3739
- labelIconGap: 4
3740
- },
3741
- sm: {
3742
- height: 40,
3743
- padding: 14,
3744
- fontSize: 14,
3745
- lineHeight: 16,
3746
- sublabelFontSize: 12,
3747
- spinnerSize: 24,
3748
- iconSize: 20,
3749
- iconContainerSize: 40,
3750
- borderRadius: shape.button.sm.borderRadius,
3751
- labelIconSize: 16,
3752
- labelIconGap: 4
3753
- },
3754
- xs: {
3755
- height: 32,
3756
- padding: 12,
3757
- fontSize: 12,
3758
- lineHeight: 14,
3759
- sublabelFontSize: 10,
3760
- spinnerSize: 16,
3761
- iconSize: 16,
3762
- iconContainerSize: 32,
3763
- borderRadius: shape.button.xs.borderRadius,
3764
- labelIconSize: 14,
3765
- labelIconGap: 4
3766
- }
3767
- };
3768
- return configs[size];
3769
- },
3770
- flexButton: (size) => {
3771
- const configs = {
3772
- xl: {
3773
- height: 36,
3774
- padding: 4,
3775
- fontSize: 16,
3776
- spinnerSize: 28,
3777
- iconSize: 20,
3778
- borderRadius: radiusScale["50"]
3779
- },
3780
- lg: {
3781
- height: 32,
3782
- padding: 4,
3783
- fontSize: 14,
3784
- spinnerSize: 24,
3785
- iconSize: 18,
3786
- borderRadius: radiusScale["50"]
3787
- },
3788
- md: {
3789
- height: 28,
3790
- padding: 2,
3791
- fontSize: 14,
3792
- spinnerSize: 24,
3793
- iconSize: 16,
3794
- borderRadius: radiusScale["25"]
3795
- },
3796
- sm: {
3797
- height: 22,
3798
- padding: 2,
3799
- fontSize: 12,
3800
- spinnerSize: 16,
3801
- iconSize: 14,
3802
- borderRadius: radiusScale["25"]
3803
- },
3804
- xs: {
3805
- height: 20,
3806
- padding: 2,
3807
- fontSize: 12,
3808
- spinnerSize: 16,
3809
- iconSize: 12,
3810
- borderRadius: radiusScale["25"]
3811
- }
3812
- };
3813
- return configs[size];
3814
- },
3815
- checkbox: (size) => {
3816
- const configs = {
3817
- xl: {
3818
- size: 22,
3819
- fontSize: 18,
3820
- descriptionFontSize: 16,
3821
- labelGap: 12,
3822
- textGap: 4,
3823
- borderRadius: shape.checkbox.xl.borderRadius
3824
- },
3825
- lg: {
3826
- size: 20,
3827
- fontSize: 16,
3828
- descriptionFontSize: 14,
3829
- labelGap: 10,
3830
- textGap: 2,
3831
- borderRadius: shape.checkbox.lg.borderRadius
3832
- },
3833
- md: {
3834
- size: 18,
3835
- fontSize: 16,
3836
- descriptionFontSize: 14,
3837
- labelGap: 8,
3838
- textGap: 2,
3839
- borderRadius: shape.checkbox.md.borderRadius
3840
- },
3841
- sm: {
3842
- size: 16,
3843
- fontSize: 14,
3844
- descriptionFontSize: 12,
3845
- labelGap: 8,
3846
- textGap: 0,
3847
- borderRadius: shape.checkbox.sm.borderRadius
3848
- }
3849
- };
3850
- return configs[size];
3851
- },
3852
- radio: (size) => {
3853
- const configs = {
3854
- xl: {
3855
- size: 24,
3856
- iconSize: 10,
3857
- fontSize: 20,
3858
- lineHeight: 22,
3859
- descriptionFontSize: 18,
3860
- descriptionLineHeight: 20,
3861
- labelGap: 12,
3862
- textGap: 4,
3863
- borderWidth: 1
3864
- },
3865
- lg: {
3866
- size: 20,
3867
- iconSize: 8,
3868
- fontSize: 18,
3869
- lineHeight: 20,
3870
- descriptionFontSize: 16,
3871
- descriptionLineHeight: 18,
3872
- labelGap: 10,
3873
- textGap: 2,
3874
- borderWidth: 1
3875
- },
3876
- md: {
3877
- size: 18,
3878
- iconSize: 8,
3879
- fontSize: 16,
3880
- lineHeight: 18,
3881
- descriptionFontSize: 14,
3882
- descriptionLineHeight: 16,
3883
- labelGap: 8,
3884
- textGap: 2,
3885
- borderWidth: 1
3886
- },
3887
- sm: {
3888
- size: 16,
3889
- iconSize: 6,
3890
- fontSize: 14,
3891
- lineHeight: 16,
3892
- descriptionFontSize: 12,
3893
- descriptionLineHeight: 14,
3894
- labelGap: 6,
3895
- textGap: 0,
3896
- borderWidth: 1
3897
- }
3898
- };
3899
- return configs[size];
3900
- },
3901
- input: (size) => {
3902
- const configs = {
3903
- xl: {
3904
- height: 64,
3905
- paddingVertical: 12,
3906
- paddingHorizontal: 12,
3907
- fontSize: 20,
3908
- iconSize: 22,
3909
- radius: shape.input.xl.borderRadius,
3910
- borderWidth: 2,
3911
- fieldGap: 8,
3912
- lineHeight: 20,
3913
- contentGap: 10,
3914
- trailingGap: 10
3915
- },
3916
- lg: {
3917
- height: 56,
3918
- paddingVertical: 14,
3919
- paddingHorizontal: 12,
3920
- fontSize: 18,
3921
- iconSize: 20,
3922
- radius: shape.input.lg.borderRadius,
3923
- borderWidth: 2,
3924
- fieldGap: 6,
3925
- lineHeight: 18,
3926
- contentGap: 8,
3927
- trailingGap: 10
3928
- },
3929
- md: {
3930
- height: 48,
3931
- paddingVertical: 11,
3932
- paddingHorizontal: 12,
3933
- fontSize: 16,
3934
- iconSize: 18,
3935
- radius: shape.input.md.borderRadius,
3936
- borderWidth: 1,
3937
- fieldGap: 4,
3938
- lineHeight: 16,
3939
- contentGap: 6,
3940
- trailingGap: 8
3941
- },
3942
- sm: {
3943
- height: 40,
3944
- paddingVertical: 7,
3945
- paddingHorizontal: 10,
3946
- fontSize: 14,
3947
- iconSize: 16,
3948
- radius: shape.input.sm.borderRadius,
3949
- borderWidth: 1,
3950
- fieldGap: 4,
3951
- lineHeight: 14,
3952
- contentGap: 4,
3953
- trailingGap: 8
3954
- },
3955
- xs: {
3956
- height: 32,
3957
- paddingVertical: 7,
3958
- paddingHorizontal: 10,
3959
- fontSize: 12,
3960
- iconSize: 14,
3961
- radius: shape.input.xs.borderRadius,
3962
- borderWidth: 1,
3963
- fieldGap: 4,
3964
- lineHeight: 10,
3965
- contentGap: 4,
3966
- trailingGap: 4
3967
- }
3968
- };
3969
- return configs[size];
3970
- },
3971
- imageUploader: (size) => {
3972
- const configs = {
3973
- xl: {
3974
- box: 200,
3975
- padding: 14,
3976
- gap: 10,
3977
- iconSize: 32,
3978
- spinnerSize: "lg",
3979
- labelFontSize: 20,
3980
- labelLineHeight: 22,
3981
- descriptionFontSize: 20,
3982
- descriptionLineHeight: 22,
3983
- errorFontSize: 16,
3984
- errorLineHeight: 18,
3985
- errorGap: 8,
3986
- radius: shape.input.xl.borderRadius,
3987
- borderWidth: 1
3988
- },
3989
- lg: {
3990
- box: 168,
3991
- padding: 14,
3992
- gap: 10,
3993
- iconSize: 24,
3994
- spinnerSize: "lg",
3995
- labelFontSize: 18,
3996
- labelLineHeight: 24,
3997
- descriptionFontSize: 18,
3998
- descriptionLineHeight: 20,
3999
- errorFontSize: 16,
4000
- errorLineHeight: 18,
4001
- errorGap: 8,
4002
- radius: shape.input.lg.borderRadius,
4003
- borderWidth: 1
4004
- },
4005
- md: {
4006
- box: 136,
4007
- padding: 12,
4008
- gap: 8,
4009
- iconSize: 24,
4010
- spinnerSize: "md",
4011
- labelFontSize: 16,
4012
- labelLineHeight: 20,
4013
- descriptionFontSize: 16,
4014
- descriptionLineHeight: 20,
4015
- errorFontSize: 14,
4016
- errorLineHeight: 16,
4017
- errorGap: 6,
4018
- radius: shape.input.md.borderRadius,
4019
- borderWidth: 1
4020
- },
4021
- sm: {
4022
- box: 104,
4023
- padding: 10,
4024
- gap: 6,
4025
- iconSize: 18,
4026
- spinnerSize: "sm",
4027
- labelFontSize: 14,
4028
- labelLineHeight: 18,
4029
- descriptionFontSize: 14,
4030
- descriptionLineHeight: 18,
4031
- errorFontSize: 12,
4032
- errorLineHeight: 14,
4033
- errorGap: 6,
4034
- radius: shape.input.sm.borderRadius,
4035
- borderWidth: 1
4036
- },
4037
- xs: {
4038
- box: 72,
4039
- padding: 8,
4040
- gap: 4,
4041
- iconSize: 18,
4042
- spinnerSize: "sm",
4043
- labelFontSize: 12,
4044
- labelLineHeight: 16,
4045
- descriptionFontSize: 12,
4046
- descriptionLineHeight: 16,
4047
- errorFontSize: 11,
4048
- errorLineHeight: 13,
4049
- errorGap: 4,
4050
- radius: shape.input.xs.borderRadius,
4051
- borderWidth: 1
4052
- }
4053
- };
4054
- return configs[size];
4055
- },
4056
- dragDropUploader: (size) => {
4057
- const base = {
4058
- width: 360,
4059
- rootGap: 12,
4060
- radius: 4,
4061
- borderWidth: 1,
4062
- textGap: 6,
4063
- titleFontSize: 14,
4064
- titleLineHeight: 18,
4065
- descriptionFontSize: 14,
4066
- descriptionLineHeight: 18,
4067
- errorFontSize: 12,
4068
- errorLineHeight: 16,
4069
- listGap: 6,
4070
- itemGap: 8,
4071
- itemPaddingVertical: 8,
4072
- itemPaddingLeft: 8,
4073
- itemPaddingRight: 12,
4074
- itemIconWrapperSize: 32,
4075
- itemIconSize: 20,
4076
- itemTitleFontSize: 14,
4077
- itemTitleLineHeight: 16,
4078
- itemDescriptionFontSize: 14,
4079
- itemDescriptionLineHeight: 18,
4080
- removeIconSize: 18
4081
- };
4082
- const configs = {
4083
- xl: {
4084
- ...base,
4085
- areaHeight: 240,
4086
- areaPadding: 20,
4087
- areaGap: 16,
4088
- iconSize: 32
4089
- },
4090
- lg: {
4091
- ...base,
4092
- areaHeight: 200,
4093
- areaPadding: 20,
4094
- areaGap: 16,
4095
- iconSize: 24
4096
- },
4097
- md: {
4098
- ...base,
4099
- areaHeight: 160,
4100
- areaPadding: 20,
4101
- areaGap: 16,
4102
- iconSize: 24
4103
- },
4104
- sm: {
4105
- ...base,
4106
- areaHeight: 128,
4107
- areaPadding: 20,
4108
- areaGap: 16,
4109
- iconSize: 24
4110
- },
4111
- xs: {
4112
- ...base,
4113
- width: 320,
4114
- rootGap: 8,
4115
- areaHeight: 104,
4116
- areaPadding: 16,
4117
- areaGap: 8,
4118
- textGap: 4,
4119
- iconSize: 16,
4120
- titleFontSize: 12,
4121
- titleLineHeight: 16,
4122
- descriptionFontSize: 12,
4123
- descriptionLineHeight: 16,
4124
- listGap: 4,
4125
- itemGap: 4,
4126
- itemPaddingVertical: 4,
4127
- itemPaddingLeft: 4,
4128
- itemIconWrapperSize: 24,
4129
- itemIconSize: 16,
4130
- itemTitleFontSize: 12,
4131
- itemTitleLineHeight: 14,
4132
- itemDescriptionFontSize: 12,
4133
- itemDescriptionLineHeight: 16,
4134
- removeIconSize: 14
4135
- }
4136
- };
4137
- return configs[size];
4138
- },
4139
- inputPin: (size) => {
4140
- const configs = {
4141
- xl: {
4142
- size: 64,
4143
- gap: 10,
4144
- fontSize: 20,
4145
- radius: shape.input.xl.borderRadius,
4146
- borderWidth: 1,
4147
- fieldGap: 8
4148
- },
4149
- lg: {
4150
- size: 56,
4151
- gap: 8,
4152
- fontSize: 18,
4153
- radius: shape.input.lg.borderRadius,
4154
- borderWidth: 1,
4155
- fieldGap: 6
4156
- },
4157
- md: {
4158
- size: 48,
4159
- gap: 6,
4160
- fontSize: 16,
4161
- radius: shape.input.md.borderRadius,
4162
- borderWidth: 1,
4163
- fieldGap: 4
4164
- },
4165
- sm: {
4166
- size: 40,
4167
- gap: 4,
4168
- fontSize: 14,
4169
- radius: shape.input.sm.borderRadius,
4170
- borderWidth: 1,
4171
- fieldGap: 4
4172
- },
4173
- xs: {
4174
- size: 32,
4175
- gap: 4,
4176
- fontSize: 12,
4177
- radius: shape.input.xs.borderRadius,
4178
- borderWidth: 1,
4179
- fieldGap: 4
4180
- }
4181
- };
4182
- return configs[size];
4183
- },
4184
- textarea: (size) => {
4185
- const configs = {
4186
- xl: {
4187
- height: 144,
4188
- padding: spacing.xl,
4189
- fontSize: 20,
4190
- iconSize: 32,
4191
- radius: shape.input.xl.borderRadius
4192
- },
4193
- lg: {
4194
- height: 128,
4195
- padding: spacing.lg,
4196
- fontSize: 18,
4197
- iconSize: 28,
4198
- radius: shape.input.lg.borderRadius
4199
- },
4200
- md: {
4201
- height: 112,
4202
- padding: spacing.md,
4203
- fontSize: 16,
4204
- iconSize: 24,
4205
- radius: shape.input.md.borderRadius
4206
- },
4207
- sm: {
4208
- height: 96,
4209
- padding: spacing.sm,
4210
- fontSize: 14,
4211
- iconSize: 20,
4212
- radius: shape.input.sm.borderRadius
4213
- },
4214
- xs: {
4215
- height: 80,
4216
- padding: spacing.xs,
4217
- fontSize: 12,
4218
- iconSize: 16,
4219
- radius: shape.input.xs.borderRadius
4220
- }
4221
- };
4222
- return configs[size];
4223
- },
4224
- switch: (size) => {
4225
- const configs = {
4226
- xl: {
4227
- width: 40,
4228
- height: 22,
4229
- knobSize: 18,
4230
- fontSize: 20,
4231
- lineHeight: 22,
4232
- descriptionFontSize: 18,
4233
- descriptionLineHeight: 20,
4234
- labelGap: 12,
4235
- textGap: 4,
4236
- frameBorderRadius: shape.switch.xl.borderRadius,
4237
- knobBorderRadius: shape.knob.xl.borderRadius
4238
- },
4239
- lg: {
4240
- width: 36,
4241
- height: 20,
4242
- knobSize: 16,
4243
- fontSize: 18,
4244
- lineHeight: 20,
4245
- descriptionFontSize: 16,
4246
- descriptionLineHeight: 18,
4247
- labelGap: 10,
4248
- textGap: 2,
4249
- frameBorderRadius: shape.switch.lg.borderRadius,
4250
- knobBorderRadius: shape.knob.lg.borderRadius
4251
- },
4252
- md: {
4253
- width: 32,
4254
- height: 18,
4255
- knobSize: 14,
4256
- fontSize: 16,
4257
- lineHeight: 18,
4258
- descriptionFontSize: 14,
4259
- descriptionLineHeight: 16,
4260
- labelGap: 8,
4261
- textGap: 2,
4262
- frameBorderRadius: shape.switch.md.borderRadius,
4263
- knobBorderRadius: shape.knob.md.borderRadius
4264
- },
4265
- sm: {
4266
- width: 28,
4267
- height: 16,
4268
- knobSize: 12,
4269
- fontSize: 14,
4270
- lineHeight: 16,
4271
- descriptionFontSize: 12,
4272
- descriptionLineHeight: 14,
4273
- labelGap: 8,
4274
- textGap: 0,
4275
- frameBorderRadius: shape.switch.sm.borderRadius,
4276
- knobBorderRadius: shape.knob.sm.borderRadius
4277
- }
4278
- };
4279
- return configs[size];
4280
- },
4281
- avatar: (size) => {
4282
- const configs = {
4283
- xl: {
4284
- size: 64,
4285
- fontSize: 20,
4286
- iconSize: 32,
4287
- badgeSize: 20,
4288
- badgeOffsetCircle: { right: -4, top: -4 },
4289
- badgeOffsetSquare: { right: -8, top: -8 },
4290
- borderRadiusSquare: shape.avatar.xl.borderRadius,
4291
- borderRadiusCircle: radiusScale["999"]
4292
- },
4293
- lg: {
4294
- size: 56,
4295
- fontSize: 20,
4296
- iconSize: 28,
4297
- badgeSize: 20,
4298
- badgeOffsetCircle: { right: -4, top: -4 },
4299
- badgeOffsetSquare: { right: -8, top: -8 },
4300
- borderRadiusSquare: shape.avatar.lg.borderRadius,
4301
- borderRadiusCircle: radiusScale["999"]
4302
- },
4303
- md: {
4304
- size: 48,
4305
- fontSize: 18,
4306
- iconSize: 24,
4307
- badgeSize: 20,
4308
- badgeOffsetCircle: { right: -5, top: -5 },
4309
- badgeOffsetSquare: { right: -8, top: -8 },
4310
- borderRadiusSquare: shape.avatar.md.borderRadius,
4311
- borderRadiusCircle: radiusScale["999"]
4312
- },
4313
- sm: {
4314
- size: 40,
4315
- fontSize: 16,
4316
- iconSize: 20,
4317
- badgeSize: 20,
4318
- badgeOffsetCircle: { right: -6, top: -6 },
4319
- badgeOffsetSquare: { right: -8, top: -8 },
4320
- borderRadiusSquare: shape.avatar.sm.borderRadius,
4321
- borderRadiusCircle: radiusScale["999"]
4322
- },
4323
- xs: {
4324
- size: 32,
4325
- fontSize: 12,
4326
- iconSize: 16,
4327
- badgeSize: 8,
4328
- badgeOffsetCircle: { right: -1, top: -1 },
4329
- badgeOffsetSquare: { right: -3, top: -3 },
4330
- borderRadiusSquare: shape.avatar.xs.borderRadius,
4331
- borderRadiusCircle: radiusScale["999"]
4332
- },
4333
- xxs: {
4334
- size: 24,
4335
- fontSize: 10,
4336
- iconSize: 12,
4337
- badgeSize: 6,
4338
- badgeOffsetCircle: { right: -1, top: -1 },
4339
- badgeOffsetSquare: { right: -2, top: -2 },
4340
- borderRadiusSquare: shape.avatar.xxs.borderRadius,
4341
- borderRadiusCircle: radiusScale["999"]
4342
- }
4343
- };
4344
- return configs[size];
4345
- },
4346
- tag: (size) => {
4347
- const configs = {
4348
- xl: {
4349
- height: 48,
4350
- padding: 13,
4351
- fontSize: 20,
4352
- lineHeight: 22,
4353
- gap: 6,
4354
- iconSize: 22,
4355
- radius: shape.tag.xl.borderRadius,
4356
- borderWidth: 1
4357
- },
4358
- lg: {
4359
- height: 40,
4360
- padding: 10,
4361
- fontSize: 18,
4362
- lineHeight: 20,
4363
- gap: 6,
4364
- iconSize: 20,
4365
- radius: shape.tag.lg.borderRadius,
4366
- borderWidth: 1
4367
- },
4368
- md: {
4369
- height: 32,
4370
- padding: 7,
4371
- fontSize: 16,
4372
- lineHeight: 18,
4373
- gap: 4,
4374
- iconSize: 18,
4375
- radius: shape.tag.md.borderRadius,
4376
- borderWidth: 1
4377
- },
4378
- sm: {
4379
- height: 24,
4380
- padding: 4,
4381
- fontSize: 14,
4382
- lineHeight: 16,
4383
- gap: 4,
4384
- iconSize: 16,
4385
- radius: shape.tag.sm.borderRadius,
4386
- borderWidth: 1
4387
- },
4388
- xs: {
4389
- height: 20,
4390
- padding: 3,
4391
- fontSize: 12,
4392
- lineHeight: 14,
4393
- gap: 4,
4394
- iconSize: 14,
4395
- radius: shape.tag.xs.borderRadius,
4396
- borderWidth: 1
4397
- }
4398
- };
4399
- return configs[size];
4400
- },
4401
- divider: (size) => {
4402
- const configs = {
4403
- lg: { height: 18, fontSize: 16, lineWeight: 1 },
4404
- md: { height: 16, fontSize: 14, lineWeight: 1 },
4405
- sm: { height: 14, fontSize: 12, lineWeight: 1 }
4406
- };
4407
- return configs[size];
4408
- },
4409
- spinner: (size) => {
4410
- const configs = {
4411
- xl: { size: 96, strokeWidth: 10 },
4412
- lg: { size: 48, strokeWidth: 5 },
4413
- md: { size: 24, strokeWidth: 2 },
4414
- sm: { size: 16, strokeWidth: 2 },
4415
- xs: { size: 8, strokeWidth: 1 }
4416
- };
4417
- return configs[size];
4418
- },
4419
- tabs: (size) => {
4420
- const configs = {
4421
- xl: {
4422
- height: 64,
4423
- fontSize: 20,
4424
- lineHeight: 22,
4425
- iconSize: 24,
4426
- gap: 10,
4427
- paddingHorizontal: 20
4428
- },
4429
- lg: {
4430
- height: 56,
4431
- fontSize: 18,
4432
- lineHeight: 20,
4433
- iconSize: 20,
4434
- gap: 8,
4435
- paddingHorizontal: 20
4436
- },
4437
- md: {
4438
- height: 48,
4439
- fontSize: 16,
4440
- lineHeight: 18,
4441
- iconSize: 18,
4442
- gap: 6,
4443
- paddingHorizontal: 20
4444
- },
4445
- sm: {
4446
- height: 40,
4447
- fontSize: 14,
4448
- lineHeight: 16,
4449
- iconSize: 16,
4450
- gap: 4,
4451
- paddingHorizontal: 20
4452
- }
4453
- };
4454
- return configs[size];
4455
- },
4456
- segmented: (size) => {
4457
- const configs = {
4458
- xl: {
4459
- height: 64,
4460
- containerPadding: 3,
4461
- containerRadius: shape.segmented.xl.borderRadius,
4462
- itemHeight: 56,
4463
- itemPaddingHorizontal: 20,
4464
- itemPaddingVertical: 10,
4465
- itemRadius: shape.segmentedItem.xl.borderRadius,
4466
- fontSize: 20,
4467
- lineHeight: 22,
4468
- iconSize: 24,
4469
- gap: 8
4470
- },
4471
- lg: {
4472
- height: 56,
4473
- containerPadding: 3,
4474
- containerRadius: shape.segmented.lg.borderRadius,
4475
- itemHeight: 48,
4476
- itemPaddingHorizontal: 20,
4477
- itemPaddingVertical: 10,
4478
- itemRadius: shape.segmentedItem.lg.borderRadius,
4479
- fontSize: 18,
4480
- lineHeight: 20,
4481
- iconSize: 24,
4482
- gap: 8
4483
- },
4484
- md: {
4485
- height: 48,
4486
- containerPadding: 3,
4487
- containerRadius: shape.segmented.md.borderRadius,
4488
- itemHeight: 40,
4489
- itemPaddingHorizontal: 16,
4490
- itemPaddingVertical: 8,
4491
- itemRadius: shape.segmentedItem.md.borderRadius,
4492
- fontSize: 16,
4493
- lineHeight: 18,
4494
- iconSize: 24,
4495
- gap: 6
4496
- },
4497
- sm: {
4498
- height: 40,
4499
- containerPadding: 3,
4500
- containerRadius: shape.segmented.sm.borderRadius,
4501
- itemHeight: 32,
4502
- itemPaddingHorizontal: 12,
4503
- itemPaddingVertical: 6,
4504
- itemRadius: shape.segmentedItem.sm.borderRadius,
4505
- fontSize: 14,
4506
- lineHeight: 16,
4507
- iconSize: 20,
4508
- gap: 4
4509
- }
4510
- };
4511
- return configs[size];
4512
- },
4513
- tabsSegmented: (size) => {
4514
- const configs = {
4515
- xl: {
4516
- height: 64,
4517
- containerPadding: 4,
4518
- itemPaddingHorizontal: 16,
4519
- itemPaddingVertical: 18,
4520
- fontSize: 20,
4521
- lineHeight: 22,
4522
- iconSize: 24,
4523
- gap: 8
4524
- },
4525
- lg: {
4526
- height: 56,
4527
- containerPadding: 4,
4528
- itemPaddingHorizontal: 16,
4529
- itemPaddingVertical: 14,
4530
- fontSize: 18,
4531
- lineHeight: 20,
4532
- iconSize: 24,
4533
- gap: 8
4534
- },
4535
- md: {
4536
- height: 48,
4537
- containerPadding: 4,
4538
- itemPaddingHorizontal: 12,
4539
- itemPaddingVertical: 11,
4540
- fontSize: 16,
4541
- lineHeight: 18,
4542
- iconSize: 24,
4543
- gap: 6
4544
- },
4545
- sm: {
4546
- height: 40,
4547
- containerPadding: 3,
4548
- itemPaddingHorizontal: 12,
4549
- itemPaddingVertical: 8,
4550
- fontSize: 14,
4551
- lineHeight: 16,
4552
- iconSize: 20,
4553
- gap: 6
4554
- }
4555
- };
4556
- return configs[size];
4557
- },
4558
- checkboxTagGroup: (size) => {
4559
- const configs = {
4560
- xl: {
4561
- height: 64,
4562
- paddingHorizontal: 16,
4563
- paddingVertical: 21,
4564
- fontSize: 20,
4565
- lineHeight: 22,
4566
- gap: 8,
4567
- borderRadius: radiusScale["50"]
4568
- },
4569
- lg: {
4570
- height: 56,
4571
- paddingHorizontal: 16,
4572
- paddingVertical: 18,
4573
- fontSize: 18,
4574
- lineHeight: 20,
4575
- gap: 8,
4576
- borderRadius: radiusScale["50"]
4577
- },
4578
- md: {
4579
- height: 48,
4580
- paddingHorizontal: 12,
4581
- paddingVertical: 15,
4582
- fontSize: 16,
4583
- lineHeight: 18,
4584
- gap: 8,
4585
- borderRadius: radiusScale["25"]
4586
- },
4587
- sm: {
4588
- height: 40,
4589
- paddingHorizontal: 12,
4590
- paddingVertical: 11,
4591
- fontSize: 14,
4592
- lineHeight: 16,
4593
- gap: 4,
4594
- borderRadius: radiusScale["25"]
4595
- }
4596
- };
4597
- return configs[size];
4598
- },
4599
- badge: (size) => {
4600
- const configs = {
4601
- xl: {
4602
- size: 20,
4603
- fontSize: 12,
4604
- lineHeight: 14,
4605
- iconSize: 12,
4606
- padding: 6
4607
- },
4608
- lg: {
4609
- size: 16,
4610
- fontSize: 10,
4611
- lineHeight: 10,
4612
- iconSize: 10,
4613
- padding: 4
4614
- },
4615
- md: {
4616
- size: 12,
4617
- fontSize: 10,
4618
- lineHeight: 10,
4619
- iconSize: 8,
4620
- padding: 3
4621
- },
4622
- sm: { size: 8, fontSize: 8, lineHeight: 8, iconSize: 6, padding: 0 },
4623
- xs: { size: 4, fontSize: 4, lineHeight: 4, iconSize: 4, padding: 0 }
4624
- };
4625
- return configs[size];
4626
- },
4627
- notification: (type) => {
4628
- const configs = {
4629
- toast: {
4630
- width: 400,
4631
- paddingHorizontal: 20,
4632
- paddingVertical: 16,
4633
- gap: 16,
4634
- titleSize: 18,
4635
- messageSize: 14,
4636
- iconSize: 20,
4637
- iconWrapperSize: 32,
4638
- radius: shape.toast.borderRadius
4639
- },
4640
- inline: {
4641
- width: "100%",
4642
- paddingHorizontal: 20,
4643
- paddingVertical: 16,
4644
- gap: 28,
4645
- titleSize: 18,
4646
- messageSize: 14,
4647
- iconSize: 20,
4648
- iconWrapperSize: 32,
4649
- radius: shape.modal.borderRadius
4650
- }
4651
- };
4652
- return configs[type];
4653
- },
4654
- notificationPanel: (device = "desktop") => {
4655
- const desktop = {
4656
- minHeight: 66,
4657
- iconFrameWidth: 54,
4658
- iconSize: 24,
4659
- borderRadius: radiusScale["100"],
4660
- bodyPaddingHorizontal: 16,
4661
- bodyPaddingVertical: 12,
4662
- textGap: 2,
4663
- contentGap: 24,
4664
- buttonsGap: 8,
4665
- closeButtonSize: 32,
4666
- notificationCloseIconSize: 18,
4667
- titleFontSize: 16,
4668
- titleLineHeight: 20,
4669
- descriptionFontSize: 14,
4670
- descriptionLineHeight: 20,
4671
- // Announcement variant: slim, single-line banner
4672
- announcementPadding: 8,
4673
- announcementGap: 16,
4674
- announcementContentGap: 8,
4675
- announcementIconSize: 16,
4676
- announcementButtonsGap: 20,
4677
- announcementCloseIconSize: 16,
4678
- announcementBlurRadius: 4,
4679
- // Mobile notification: icon | content column | close column
4680
- mobileIconColumnPaddingVertical: 12,
4681
- mobileIconColumnPaddingLeft: 8,
4682
- mobileIconSize: 24,
4683
- mobileBodyPaddingHorizontal: 16,
4684
- mobileBodyPaddingVertical: 12,
4685
- mobileBodyContentGap: 24,
4686
- mobileNotificationActionButtonOffsetLeft: -4,
4687
- mobileCloseColumnPaddingVertical: 12,
4688
- mobileCloseColumnPaddingRight: 12
4689
- };
4690
- return desktop;
4691
- },
4692
- progress: (size) => {
4693
- const configs = {
4694
- xl: { height: 10, labelSize: 16, helperSize: 14, gap: 10 },
4695
- lg: { height: 8, labelSize: 14, helperSize: 12, gap: 8 },
4696
- md: { height: 6, labelSize: 12, helperSize: 12, gap: 6 },
4697
- sm: { height: 4, labelSize: 12, helperSize: 12, gap: 4 },
4698
- xs: { height: 2, labelSize: 10, helperSize: 10, gap: 2 },
4699
- xxs: { height: 2, labelSize: 10, helperSize: 10, gap: 2 },
4700
- l: { height: 8, labelSize: 16, helperSize: 14, gap: 10 },
4701
- m: { height: 6, labelSize: 14, helperSize: 12, gap: 8 },
4702
- s: { height: 4, labelSize: 12, helperSize: 12, gap: 6 }
4703
- };
4704
- return configs[size];
4705
- },
4706
- /**
4707
- * SupportingText sizing.
4708
- *
4709
- * Typography is bound to the `Theme / Typography` body tokens rather than
4710
- * hardcoded px values, so a change to the Figma-synced scale propagates
4711
- * automatically. Each size maps to the body token whose font-size and
4712
- * compact line-height match the corresponding Figma size variant:
4713
- *
4714
- * | size | typography token | font-size / line-height | icon | gap |
4715
- * | ---- | ---------------- | ----------------------- | ---- | --- |
4716
- * | xl | `body-lg` | 18 / 24 | 18 | 6 |
4717
- * | lg | `body-md` | 16 / 20 | 18 | 6 |
4718
- * | md | `body-sm` | 14 / 18 | 18 | 6 |
4719
- * | sm | `body-xs` | 12 / 16 | 14 | 4 |
4720
- * | xs | `body-xxs` | 10 / 14 | 14 | 4 |
4721
- *
4722
- * `requiredIndicator` is the required-field asterisk that sits beside a
4723
- * label. Figma renders it one step down the same scale, so it aliases the
4724
- * next-smaller size's token instead of carrying its own table.
4725
- *
4726
- * `gap` is the spacing between the text and its trailing icon (Figma
4727
- * `Label & icon` frame item-spacing).
4728
- *
4729
- * @see https://www.figma.com/design/m0qqLlCvR29fvqj0EzlLAU/Xsolla-UI-Toolkit?node-id=5680-33147
4730
- */
4731
- supportingText: (size) => {
4732
- const typographyBySize = {
4733
- xl: contextTypography.basic["body-lg"],
4734
- lg: contextTypography.basic["body-md"],
4735
- md: contextTypography.basic["body-sm"],
4736
- sm: contextTypography.basic["body-xs"],
4737
- xs: contextTypography.basic["body-xxs"]
4738
- };
4739
- const dimensions = {
4740
- xl: { gap: 6, iconSize: 18 },
4741
- lg: { gap: 6, iconSize: 18 },
4742
- md: { gap: 6, iconSize: 18 },
4743
- sm: { gap: 4, iconSize: 14 },
4744
- xs: { gap: 4, iconSize: 14 }
4745
- };
4746
- const requiredIndicatorSizeMap = {
4747
- xl: "lg",
4748
- lg: "md",
4749
- md: "sm",
4750
- sm: "xs",
4751
- xs: "xs"
4752
- };
4753
- const typography2 = typographyBySize[size];
4754
- const requiredTypography = typographyBySize[requiredIndicatorSizeMap[size]];
4755
- return {
4756
- fontSize: typography2.fontSize,
4757
- lineHeight: typography2.lineHeight,
4758
- fontWeight: typography2.fontWeight,
4759
- fontFamily: contextFonts.body,
4760
- requiredIndicator: {
4761
- fontSize: requiredTypography.fontSize,
4762
- lineHeight: requiredTypography.lineHeight
4763
- },
4764
- ...dimensions[size]
4765
- };
4766
- },
4767
- iconWrapper: (size) => {
4768
- const configs = {
4769
- xl: { size: 56, iconSize: 32, fontSize: 24 },
4770
- lg: { size: 48, iconSize: 28, fontSize: 20 },
4771
- md: { size: 40, iconSize: 24, fontSize: 18 },
4772
- sm: { size: 32, iconSize: 20, fontSize: 16 },
4773
- xs: { size: 24, iconSize: 16, fontSize: 14 },
4774
- xxs: { size: 18, iconSize: 12, fontSize: 12 }
4775
- };
4776
- return configs[size];
4777
- },
4778
- stepper: (size) => {
4779
- const configs = {
4780
- md: {
4781
- iconSize: 32,
4782
- titleSize: 16,
4783
- descSize: 14,
4784
- gap: 12,
4785
- currentTitleSize: 20,
4786
- currentDescSize: 14,
4787
- currentPadding: 24,
4788
- tailSize: 5
4789
- },
4790
- sm: {
4791
- iconSize: 24,
4792
- titleSize: 14,
4793
- descSize: 12,
4794
- gap: 8,
4795
- currentTitleSize: 16,
4796
- currentDescSize: 12,
4797
- currentPadding: 20,
4798
- tailSize: 3
4799
- }
4800
- };
4801
- return configs[size];
4802
- },
4803
- contextMenu: (size) => {
4804
- const configs = {
4805
- xl: {
4806
- paddingVertical: 8,
4807
- paddingHorizontal: 8,
4808
- itemPaddingHorizontal: 16,
4809
- itemPaddingVertical: 18,
4810
- fontSize: 20,
4811
- lineHeight: 26,
4812
- descriptionFontSize: 18,
4813
- iconSize: 18,
4814
- gap: 12,
4815
- minWidth: 276,
4816
- panelWidth: 320,
4817
- statusDotSize: 12,
4818
- iconWrapperSize: 40,
4819
- triggerOffset: 4,
4820
- borderRadius: 8,
4821
- // Search sizing from Figma
4822
- searchPaddingHorizontal: 16,
4823
- searchPaddingVertical: 18,
4824
- searchGap: 18,
4825
- searchFontSize: 20,
4826
- searchLineHeight: 26,
4827
- searchIconSize: 18
4828
- },
4829
- lg: {
4830
- paddingVertical: 8,
4831
- paddingHorizontal: 8,
4832
- itemPaddingHorizontal: 14,
4833
- itemPaddingVertical: 14,
4834
- fontSize: 18,
4835
- lineHeight: 24,
4836
- descriptionFontSize: 16,
4837
- iconSize: 18,
4838
- gap: 10,
4839
- minWidth: 220,
4840
- panelWidth: 296,
4841
- statusDotSize: 10,
4842
- iconWrapperSize: 36,
4843
- triggerOffset: 4,
4844
- borderRadius: 8,
4845
- // Search sizing from Figma
4846
- searchPaddingHorizontal: 14,
4847
- searchPaddingVertical: 14,
4848
- searchGap: 14,
4849
- searchFontSize: 18,
4850
- searchLineHeight: 24,
4851
- searchIconSize: 18
4852
- },
4853
- md: {
4854
- paddingVertical: 8,
4855
- paddingHorizontal: 8,
4856
- itemPaddingHorizontal: 12,
4857
- itemPaddingVertical: 11,
4858
- fontSize: 16,
4859
- lineHeight: 20,
4860
- descriptionFontSize: 14,
4861
- iconSize: 18,
4862
- gap: 8,
4863
- minWidth: 172,
4864
- panelWidth: 272,
4865
- statusDotSize: 8,
4866
- iconWrapperSize: 32,
4867
- triggerOffset: 4,
4868
- borderRadius: 8,
4869
- // Search sizing from Figma
4870
- searchPaddingHorizontal: 12,
4871
- searchPaddingVertical: 11,
4872
- searchGap: 10,
4873
- searchFontSize: 16,
4874
- searchLineHeight: 20,
4875
- searchIconSize: 18
4876
- },
4877
- sm: {
4878
- paddingVertical: 8,
4879
- paddingHorizontal: 8,
4880
- itemPaddingHorizontal: 10,
4881
- itemPaddingVertical: 8,
4882
- fontSize: 14,
4883
- lineHeight: 18,
4884
- descriptionFontSize: 12,
4885
- iconSize: 18,
4886
- gap: 8,
4887
- minWidth: 132,
4888
- panelWidth: 248,
4889
- statusDotSize: 6,
4890
- iconWrapperSize: 24,
4891
- triggerOffset: 4,
4892
- borderRadius: 4,
4893
- // Search sizing from Figma
4894
- searchPaddingHorizontal: 10,
4895
- searchPaddingVertical: 7,
4896
- searchGap: 6,
4897
- searchFontSize: 14,
4898
- searchLineHeight: 18,
4899
- searchIconSize: 18
4900
- }
4901
- };
4902
- return configs[size];
4903
- },
4904
- modal: () => {
4905
- return {
4906
- borderRadius: shape.modal.borderRadius,
4907
- headerPadding: "24px 24px 0",
4908
- contentPadding: 24,
4909
- /** @deprecated Header buttons no longer use IconButton sizes. */
4910
- headerButtonSize: "xs",
4911
- /** @deprecated Header buttons are FlexButtons; size comes from `Modal`'s `closeButtonSize`. */
4912
- headerIconSize: 28,
4913
- /** @deprecated Header buttons are FlexButtons; padding is owned by FlexButton. */
4914
- headerButtonPadding: 4,
4915
- /** @deprecated Header buttons are FlexButtons; radius comes from FlexButton's size scale. */
4916
- headerButtonRadius: 4,
4917
- headerMinHeight: 44,
4918
- headerGap: 16,
4919
- footerGap: 16,
4920
- /** @deprecated Modal elevation comes from the scrim, not a drop shadow. */
4921
- shadow: "0px 8px 12px 6px rgba(7, 7, 8, 0.1), 0px 4px 4px rgba(7, 7, 8, 0.2)",
4922
- maxWidth: 680,
4923
- overlayColor: "rgba(0, 0, 0, 0.75)",
4924
- portalPadding: 20,
4925
- /** @deprecated Layering is contextual now; see OVERLAY_LAYER_BASE / useOverlayLayer. */
4926
- zIndex: 1e3
4927
- };
4928
- },
4929
- drawer: () => ({
4930
- // Sizing values from Figma design: B2B Components Library node-id=8291-103845
4931
- widthSm: 480,
4932
- widthMd: 620,
4933
- widthLg: 1056,
4934
- headerHeight: 80,
4935
- headerPaddingX: 32,
4936
- headerPaddingY: 24,
4937
- headerGap: 24,
4938
- titleFontSize: 18,
4939
- titleLineHeight: 24,
4940
- contentPaddingX: 32,
4941
- footerPadding: 32,
4942
- outerPadding: 8,
4943
- containerRadius: 4,
4944
- contentRadius: 8,
4945
- stepperPadding: 16,
4946
- stepperRadius: 8,
4947
- stepperContentGap: 8,
4948
- scrimColor: "rgba(0, 0, 0, 0.75)",
4949
- animationDuration: 300,
4950
- /** @deprecated Layering is contextual now; see MODAL_LAYER_STEP / useOverlayLayer. */
4951
- zIndex: 1e3
4952
- }),
4953
- sidebar: () => ({
4954
- // Sizing values from Figma design: B2B Components Library
4955
- widthExpanded: 280,
4956
- widthCollapsed: 48,
4957
- radius: 4,
4958
- itemHeight: 32,
4959
- iconSize: 18,
4960
- padding: 8,
4961
- sectionLabelHeight: 20,
4962
- // Aligns nested item text with parent label (padding 8 + icon 18 + gap 8 = 34)
4963
- // and centers the rail under the parent icon (padding 8 + iconSize/2 = 17).
4964
- nestedItemPaddingLeft: 34,
4965
- nestedItemRailLeft: 17,
4966
- chevronSize: 14,
4967
- externalIconSize: 18,
4968
- chatBadgeSize: 6,
4969
- itemBadgeSize: 4,
4970
- focusOutlineWidth: 2,
4971
- scrollbarWidth: 4,
4972
- popoverGap: 12,
4973
- popoverViewportPadding: 8,
4974
- popoverMinWidth: 180,
4975
- popoverMaxWidth: 240,
4976
- popoverShadow: "0 2px 25px rgba(7, 7, 8, 0.15)",
4977
- /** @deprecated Layering is contextual now; see useOverlayLayer / LAYER_OFFSET. */
4978
- popoverZIndex: 1e3,
4979
- transitionWidth: "0.25s ease-in-out",
4980
- transitionFadeIn: "opacity 0.15s ease-in-out 0.1s",
4981
- transitionFadeOut: "opacity 0.1s ease-in-out",
4982
- transitionItem: "background-color 0.15s ease-in-out, color 0.15s ease-in-out",
4983
- transitionRows: "grid-template-rows 0.25s ease-in-out"
4984
- }),
4985
- stepperB2b: () => ({
4986
- // Sizing values from Figma design: B2B Components Library
4987
- // variant grid node-id=10999-17988, state grid node-id=10259-5501
4988
- chipSize: 32,
4989
- chipRadius: 2,
4990
- chipPaddingTop: 5,
4991
- chipPaddingBottom: 4,
4992
- chipPaddingX: 4,
4993
- chipIconSize: 16,
4994
- numberFontSize: 18,
4995
- numberLineHeight: 24,
4996
- titleFontSize: 16,
4997
- titleLineHeight: 20,
4998
- descriptionFontSize: 14,
4999
- descriptionLineHeight: 20,
5000
- captionFontSize: 12,
5001
- captionLineHeight: 16,
5002
- itemGap: 12,
5003
- contentGap: 4,
5004
- contentMinHeight: 32,
5005
- contentWidth: 128,
5006
- activeCardRadiusVertical: 4,
5007
- activeCardRadiusHorizontal: 6,
5008
- activeCardPaddingTop: 24,
5009
- activeCardPaddingX: 24,
5010
- activeCardPaddingYHorizontal: 12,
5011
- activeCardPaddingLeftHorizontal: 12,
5012
- activeCardGapHorizontal: 8,
5013
- innerConnectorLength: 48,
5014
- connectorSegment: 24,
5015
- connectorCellHeight: 24,
5016
- connectorCellWidth: 80,
5017
- surfaceRadius: 8,
5018
- surfacePaddingVertical: 16,
5019
- surfacePaddingHorizontal: 8,
5020
- horizontalItemGap: 16,
5021
- horizontalFirstItemWidth: 220,
5022
- horizontalItemWidth: 236,
5023
- horizontalConnectorSegment: 32,
5024
- horizontalConnectorGap: 12,
5025
- simpleCardPadding: 12,
5026
- simpleCardRadius: 4,
5027
- simpleCardGap: 4,
5028
- simpleItemGap: 4,
5029
- simpleHorizontalCellWidth: 56,
5030
- simpleHorizontalStubLength: 8
5031
- }),
5032
- collapsibleB2b: () => ({
5033
- // Sizing values from Figma design: B2B Components Library node-id=10469-6509
5034
- triggerPadding: 16,
5035
- triggerGap: 12,
5036
- triggerMinHeight: 56,
5037
- surfaceRadius: radiusScale["50"],
5038
- cellRadius: radiusScale["100"],
5039
- iconSlotSize: 32,
5040
- iconSlotRadius: radiusScale["50"],
5041
- chevronSize: 24,
5042
- trailingGap: 8,
5043
- textGap: 2,
5044
- titleFontSize: 16,
5045
- titleLineHeight: 20,
5046
- captionFontSize: 12,
5047
- captionLineHeight: 18,
5048
- panelPadding: 16,
5049
- accordionItemGap: 8
5050
- }),
5051
- toast: () => {
5052
- return {
5053
- minHeight: 64,
5054
- paddingHorizontal: 12,
5055
- paddingVertical: 8,
5056
- borderRadius: shape.toast.borderRadius,
5057
- gap: 12,
5058
- iconSize: 24,
5059
- closeButtonSize: 24,
5060
- closeIconSize: 20,
5061
- fontSize: 16,
5062
- lineHeight: 20,
5063
- maxWidth: 400,
5064
- containerPadding: 12,
5065
- groupGap: 4
5066
- };
5067
- },
5068
- toggleButtonGroup: (size) => {
5069
- const configs = {
5070
- xl: {
5071
- height: 64,
5072
- paddingHorizontal: 21,
5073
- fontSize: 20,
5074
- lineHeight: 22,
5075
- iconSize: 22,
5076
- gap: 6,
5077
- borderRadius: shape.toggleButtonGroup.xl.borderRadius,
5078
- itemGap: 8,
5079
- tooltipSize: "lg"
5080
- },
5081
- lg: {
5082
- height: 56,
5083
- paddingHorizontal: 18,
5084
- fontSize: 18,
5085
- lineHeight: 20,
5086
- iconSize: 20,
5087
- gap: 4,
5088
- borderRadius: shape.toggleButtonGroup.lg.borderRadius,
5089
- itemGap: 8,
5090
- tooltipSize: "md"
5091
- },
5092
- md: {
5093
- height: 48,
5094
- paddingHorizontal: 15,
5095
- fontSize: 16,
5096
- lineHeight: 18,
5097
- iconSize: 18,
5098
- gap: 4,
5099
- borderRadius: shape.toggleButtonGroup.md.borderRadius,
5100
- itemGap: 6,
5101
- tooltipSize: "md"
5102
- },
5103
- sm: {
5104
- height: 40,
5105
- paddingHorizontal: 12,
5106
- fontSize: 14,
5107
- lineHeight: 16,
5108
- iconSize: 16,
5109
- gap: 4,
5110
- borderRadius: shape.toggleButtonGroup.sm.borderRadius,
5111
- itemGap: 4,
5112
- tooltipSize: "sm"
5113
- },
5114
- xs: {
5115
- height: 32,
5116
- paddingHorizontal: 9,
5117
- fontSize: 12,
5118
- lineHeight: 14,
5119
- iconSize: 14,
5120
- gap: 4,
5121
- borderRadius: shape.toggleButtonGroup.xs.borderRadius,
5122
- itemGap: 4,
5123
- tooltipSize: "sm"
5124
- }
5125
- };
5126
- return configs[size];
5127
- },
5128
- table: {
5129
- containerRadius: 8,
5130
- containerPaddingVertical: 0,
5131
- containerGap: 0,
5132
- captionFontSize: 14,
5133
- captionLineHeight: 20,
5134
- headerRowHeight: 56,
5135
- headerRowPaddingHorizontal: 24,
5136
- headerCellGap: 4,
5137
- headerCellFontSize: 14,
5138
- headerCellLineHeight: 18,
5139
- rowHeight: 56,
5140
- rowPaddingHorizontal: 24,
5141
- cellGap: 16,
5142
- cellFontSize: 14,
5143
- cellLineHeight: 18,
5144
- paginationGap: 16,
5145
- paginationPaddingHorizontal: 24
5146
- }
5147
- }
5148
- };
5149
- };
5150
5777
  var DesignSystemContext = (0, import_react3.createContext)(
5151
5778
  void 0
5152
5779
  );
@@ -5226,6 +5853,9 @@ var useIdFallback = () => {
5226
5853
  var useId = hasReactUseId ? import_react3.default.useId : useIdFallback;
5227
5854
  var ModalIdContext = (0, import_react3.createContext)(null);
5228
5855
  var useModalId = () => (0, import_react3.useContext)(ModalIdContext);
5856
+
5857
+ // src/overlay.ts
5858
+ var import_react4 = require("react");
5229
5859
  var OVERLAY_LAYER_BASE = 1e3;
5230
5860
  var LAYER_OFFSET = {
5231
5861
  /** Trigger-anchored value lists: dropdown, select, multi-select, autocomplete. */
@@ -5237,12 +5867,12 @@ var LAYER_OFFSET = {
5237
5867
  };
5238
5868
  var MODAL_LAYER_STEP = 1e3;
5239
5869
  var TOAST_LAYER = 9999;
5240
- var OverlayLayerContext = (0, import_react3.createContext)(OVERLAY_LAYER_BASE);
5870
+ var OverlayLayerContext = (0, import_react4.createContext)(OVERLAY_LAYER_BASE);
5241
5871
  var OverlayLayerProvider = OverlayLayerContext.Provider;
5242
- var useOverlayLayer = () => (0, import_react3.useContext)(OverlayLayerContext);
5243
- var ModalStackContext = (0, import_react3.createContext)(0);
5872
+ var useOverlayLayer = () => (0, import_react4.useContext)(OverlayLayerContext);
5873
+ var ModalStackContext = (0, import_react4.createContext)(0);
5244
5874
  var ModalStackProvider = ModalStackContext.Provider;
5245
- var useModalStackDepth = () => (0, import_react3.useContext)(ModalStackContext);
5875
+ var useModalStackDepth = () => (0, import_react4.useContext)(ModalStackContext);
5246
5876
  // Annotate the CommonJS export names for ESM import in node:
5247
5877
  0 && (module.exports = {
5248
5878
  DISPLAY_SCALE_STEPS,
@@ -5282,6 +5912,7 @@ var useModalStackDepth = () => (0, import_react3.useContext)(ModalStackContext);
5282
5912
  shadow,
5283
5913
  shape,
5284
5914
  spacing,
5915
+ spacingScale,
5285
5916
  stroke,
5286
5917
  themeConfig,
5287
5918
  typography,