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