@lightsparkdev/ui 0.0.7 → 0.0.9
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/CHANGELOG.md +24 -0
- package/dist/chunk-3EVAP5JT.js +67 -0
- package/dist/{chunk-IQFU7CM5.js → chunk-3GS5EFXV.js} +1 -1
- package/dist/{chunk-CLU2FRJZ.js → chunk-55OQPFLF.js} +1 -1
- package/dist/{chunk-N2RDQJQ5.js → chunk-5POPBNPS.js} +1 -1
- package/dist/{chunk-WWFDI534.js → chunk-7C4MHI6Q.js} +13 -6
- package/dist/{chunk-3CZOYF3X.js → chunk-7T36JGTC.js} +2 -2
- package/dist/chunk-A4FQBEYU.js +163 -0
- package/dist/chunk-ATUH6SXK.js +233 -0
- package/dist/chunk-DQRN4E5G.js +25 -0
- package/dist/{chunk-RTUZVKPK.js → chunk-E3AOYBY5.js} +1 -1
- package/dist/{chunk-I74XQIVV.js → chunk-EEFNW7NS.js} +3 -3
- package/dist/{chunk-UO6U7AYM.js → chunk-FCZJILMW.js} +1 -1
- package/dist/{chunk-2WYVO6B2.js → chunk-H3RW6JSU.js} +1 -1
- package/dist/chunk-IPAXAP6K.js +119 -0
- package/dist/{chunk-NGS4OSWT.js → chunk-J4FJQ3FN.js} +1 -1
- package/dist/{chunk-RFGKH3R6.js → chunk-JK4BP73A.js} +39 -38
- package/dist/{chunk-T33SBHYI.js → chunk-KMR5C25B.js} +3 -1
- package/dist/{chunk-JYWYEOM6.js → chunk-NFSAJ5GJ.js} +23 -10
- package/dist/{chunk-G2PZZFJL.js → chunk-NM7UW54G.js} +21 -24
- package/dist/{chunk-M56R3RJ7.js → chunk-OGSDZTHM.js} +7 -3
- package/dist/chunk-P3EUPXFA.js +150 -0
- package/dist/chunk-PBRN7MJY.js +315 -0
- package/dist/{chunk-NH25O7PC.js → chunk-PVQCLQNA.js} +1 -1
- package/dist/{chunk-NZJCJJH5.js → chunk-RWIZ7Q74.js} +1 -1
- package/dist/{chunk-TAI352I3.js → chunk-VE7J2N47.js} +1 -1
- package/dist/{chunk-K7D7A34K.js → chunk-XP2MX2AA.js} +1 -1
- package/dist/{chunk-23SR7TFO.js → chunk-XZR237JJ.js} +1 -1
- package/dist/{chunk-VBWTKANQ.js → chunk-Y37DCY7Y.js} +3 -3
- package/dist/{chunk-SVQELXFK.js → chunk-Z5TPS2BO.js} +1 -1
- package/dist/{chunk-FKETYVPP.js → chunk-ZANLDY2W.js} +87 -43
- package/dist/components/Badge.cjs +1346 -0
- package/dist/components/Badge.d.cts +10 -0
- package/dist/components/Badge.d.ts +10 -0
- package/dist/components/Badge.js +13 -0
- package/dist/components/Button.cjs +235 -107
- package/dist/components/Button.d.cts +3 -1
- package/dist/components/Button.d.ts +3 -1
- package/dist/components/Button.js +8 -7
- package/dist/components/ButtonRow.cjs +254 -110
- package/dist/components/ButtonRow.d.cts +6 -2
- package/dist/components/ButtonRow.d.ts +6 -2
- package/dist/components/ButtonRow.js +14 -11
- package/dist/components/CardPage.cjs +1921 -0
- package/dist/components/CardPage.d.cts +54 -0
- package/dist/components/CardPage.d.ts +54 -0
- package/dist/components/CardPage.js +33 -0
- package/dist/components/Collapsible.cjs +38 -54
- package/dist/components/Collapsible.js +4 -5
- package/dist/components/ContentTable.cjs +38 -54
- package/dist/components/ContentTable.js +3 -4
- package/dist/components/CopyToClipboardButton.cjs +161 -65
- package/dist/components/CopyToClipboardButton.js +6 -5
- package/dist/components/CurrencyAmount.cjs +38 -54
- package/dist/components/CurrencyAmount.js +3 -4
- package/dist/components/FileInput.cjs +1959 -0
- package/dist/components/FileInput.d.cts +21 -0
- package/dist/components/FileInput.d.ts +21 -0
- package/dist/components/FileInput.js +113 -0
- package/dist/components/GradientCardHeader.cjs +177 -0
- package/dist/components/GradientCardHeader.d.cts +10 -0
- package/dist/components/GradientCardHeader.d.ts +10 -0
- package/dist/components/GradientCardHeader.js +8 -0
- package/dist/components/Icon.cjs +38 -54
- package/dist/components/Icon.js +2 -3
- package/dist/components/LightTooltip.cjs +1428 -0
- package/dist/components/LightTooltip.d.cts +9 -0
- package/dist/components/LightTooltip.d.ts +9 -0
- package/dist/components/LightTooltip.js +12 -0
- package/dist/components/LightboxImage.cjs +1 -1
- package/dist/components/LightboxImage.js +2 -2
- package/dist/components/LightsparkProvider.cjs +41 -57
- package/dist/components/LightsparkProvider.js +3 -4
- package/dist/components/Loading.cjs +38 -54
- package/dist/components/Loading.js +3 -4
- package/dist/components/Modal.cjs +251 -145
- package/dist/components/Modal.js +12 -11
- package/dist/components/Pill.cjs +1717 -0
- package/dist/components/Pill.d.cts +19 -0
- package/dist/components/Pill.d.ts +19 -0
- package/dist/components/Pill.js +16 -0
- package/dist/components/ProgressBar.cjs +38 -56
- package/dist/components/ProgressBar.js +2 -3
- package/dist/components/SecretContainer.cjs +162 -66
- package/dist/components/SecretContainer.js +7 -6
- package/dist/components/TextIconAligner.cjs +38 -54
- package/dist/components/TextIconAligner.js +3 -4
- package/dist/components/UnstyledButton.cjs +38 -54
- package/dist/components/UnstyledButton.js +2 -3
- package/dist/components/documentation/AnchorLinkHeader.cjs +38 -56
- package/dist/components/documentation/AnchorLinkHeader.js +3 -4
- package/dist/components/documentation/index.cjs +38 -56
- package/dist/components/documentation/index.js +3 -4
- package/dist/components/index.cjs +1191 -358
- package/dist/components/index.d.cts +7 -1
- package/dist/components/index.d.ts +7 -1
- package/dist/components/index.js +63 -32
- package/dist/icons/ArrowCornerDownRight.cjs +49 -0
- package/dist/icons/ArrowCornerDownRight.d.cts +5 -0
- package/dist/icons/ArrowCornerDownRight.d.ts +5 -0
- package/dist/icons/ArrowCornerDownRight.js +30 -0
- package/dist/icons/Copy.cjs +4 -3
- package/dist/icons/Copy.js +4 -3
- package/dist/icons/Download.cjs +22 -11
- package/dist/icons/Download.js +23 -12
- package/dist/icons/Sort.cjs +48 -0
- package/dist/icons/Sort.d.cts +5 -0
- package/dist/icons/Sort.d.ts +5 -0
- package/dist/icons/Sort.js +29 -0
- package/dist/icons/Upload.cjs +22 -11
- package/dist/icons/Upload.js +23 -12
- package/dist/icons/index.cjs +38 -54
- package/dist/icons/index.js +2 -3
- package/dist/router.cjs +7 -3
- package/dist/router.js +1 -1
- package/dist/styles/common.cjs +38 -66
- package/dist/styles/common.d.cts +10 -11
- package/dist/styles/common.d.ts +10 -11
- package/dist/styles/common.js +1 -14
- package/dist/styles/fields.cjs +117 -61
- package/dist/styles/fields.d.cts +12 -5
- package/dist/styles/fields.d.ts +12 -5
- package/dist/styles/fields.js +28 -164
- package/dist/styles/fonts/typography/Article.cjs +38 -54
- package/dist/styles/fonts/typography/Article.js +5 -6
- package/dist/styles/fonts/typography/index.cjs +38 -54
- package/dist/styles/fonts/typography/index.js +5 -6
- package/dist/styles/global.cjs +41 -57
- package/dist/styles/global.js +2 -3
- package/dist/styles/type.cjs +38 -54
- package/dist/styles/type.js +8 -145
- package/dist/styles/utils.cjs +38 -54
- package/dist/styles/utils.js +2 -3
- package/dist/styles/z-index.cjs +1 -1
- package/dist/styles/z-index.d.cts +1 -1
- package/dist/styles/z-index.d.ts +1 -1
- package/dist/styles/z-index.js +1 -1
- package/dist/types/index.d.cts +2 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/utils/toReactNodes.cjs +7 -3
- package/dist/utils/toReactNodes.js +2 -2
- package/package.json +10 -6
|
@@ -67,22 +67,32 @@ var __async = (__this, __arguments, generator) => {
|
|
|
67
67
|
// src/components/index.tsx
|
|
68
68
|
var components_exports = {};
|
|
69
69
|
__export(components_exports, {
|
|
70
|
+
Badge: () => Badge,
|
|
70
71
|
Button: () => Button,
|
|
71
72
|
ButtonRow: () => ButtonRow,
|
|
72
73
|
ButtonRowContainer: () => ButtonRowContainer,
|
|
73
74
|
ButtonSelector: () => ButtonSelector,
|
|
75
|
+
CardPage: () => CardPage,
|
|
76
|
+
CardPageContent: () => CardPageContent,
|
|
77
|
+
CardPageFullContent: () => CardPageFullContent,
|
|
78
|
+
CardPageFullWidth: () => CardPageFullWidth,
|
|
79
|
+
CardPageRightContentInner: () => CardPageRightContentInner,
|
|
80
|
+
CardPageSubtitle: () => CardPageSubtitle,
|
|
74
81
|
Collapsible: () => Collapsible,
|
|
75
82
|
CommandKey: () => CommandKey,
|
|
76
83
|
CopyToClipboardButton: () => CopyToClipboardButton,
|
|
77
84
|
CurrencyAmount: () => CurrencyAmount,
|
|
78
85
|
CurrencyIcon: () => CurrencyIcon,
|
|
86
|
+
GradientCardHeader: () => GradientCardHeader,
|
|
79
87
|
Icon: () => Icon,
|
|
80
88
|
IconContainer: () => IconContainer,
|
|
89
|
+
LightTooltip: () => LightTooltip,
|
|
81
90
|
LightboxImage: () => LightboxImage,
|
|
82
91
|
LightsparkProvider: () => LightsparkProvider,
|
|
83
92
|
Loading: () => Loading,
|
|
84
93
|
LoadingWrapper: () => LoadingWrapper,
|
|
85
94
|
Modal: () => Modal,
|
|
95
|
+
Pill: () => Pill,
|
|
86
96
|
ProgressBar: () => ProgressBar,
|
|
87
97
|
SecretContainer: () => SecretContainer,
|
|
88
98
|
StyledButton: () => StyledButton,
|
|
@@ -91,14 +101,8 @@ __export(components_exports, {
|
|
|
91
101
|
});
|
|
92
102
|
module.exports = __toCommonJS(components_exports);
|
|
93
103
|
|
|
94
|
-
// src/components/
|
|
95
|
-
var
|
|
96
|
-
var import_styled5 = __toESM(require("@emotion/styled"), 1);
|
|
97
|
-
|
|
98
|
-
// src/router.tsx
|
|
99
|
-
var import_lodash_es2 = require("lodash-es");
|
|
100
|
-
var import_react4 = require("react");
|
|
101
|
-
var import_react_router_dom = require("react-router-dom");
|
|
104
|
+
// src/components/Badge.tsx
|
|
105
|
+
var import_styled2 = __toESM(require("@emotion/styled"), 1);
|
|
102
106
|
|
|
103
107
|
// src/styles/colors.tsx
|
|
104
108
|
var import_react3 = require("@emotion/react");
|
|
@@ -1344,13 +1348,144 @@ function useThemeBg() {
|
|
|
1344
1348
|
return isSm ? theme.smBg : theme.bg;
|
|
1345
1349
|
}
|
|
1346
1350
|
|
|
1351
|
+
// src/styles/common.tsx
|
|
1352
|
+
var import_react4 = require("@emotion/react");
|
|
1353
|
+
var import_styled = __toESM(require("@emotion/styled"), 1);
|
|
1354
|
+
var rootFontSizePx = 12;
|
|
1355
|
+
var rootFontSizeRems = rootFontSizePx / 16;
|
|
1356
|
+
var standardLineHeightEms = 1.21;
|
|
1357
|
+
var headingContentMarginPx = 30;
|
|
1358
|
+
function buildStandardContentInset(smPx, minSmMaxLgPx, lgPx) {
|
|
1359
|
+
const smCSS = import_react4.css`
|
|
1360
|
+
${bp.sm(`
|
|
1361
|
+
margin-left: auto;
|
|
1362
|
+
margin-right: auto;
|
|
1363
|
+
width: calc(100% - ${smPx * 2}px);
|
|
1364
|
+
`)}
|
|
1365
|
+
`;
|
|
1366
|
+
const minSmMaxLgCSS = import_react4.css`
|
|
1367
|
+
${bp.minSmMaxLg(`
|
|
1368
|
+
margin-left: auto;
|
|
1369
|
+
margin-right: auto;
|
|
1370
|
+
width: calc(100% - ${minSmMaxLgPx * 2}px);
|
|
1371
|
+
`)}
|
|
1372
|
+
`;
|
|
1373
|
+
const lgCSS = import_react4.css`
|
|
1374
|
+
${bp.lg(`
|
|
1375
|
+
margin-left: auto;
|
|
1376
|
+
margin-right: auto;
|
|
1377
|
+
width: calc(100% - ${lgPx * 2}px);
|
|
1378
|
+
max-width: 1280px;
|
|
1379
|
+
`)}
|
|
1380
|
+
`;
|
|
1381
|
+
return {
|
|
1382
|
+
smPx,
|
|
1383
|
+
minSmMaxLgPx,
|
|
1384
|
+
lgPx,
|
|
1385
|
+
smCSS,
|
|
1386
|
+
minSmMaxLgCSS,
|
|
1387
|
+
lgCSS,
|
|
1388
|
+
css: import_react4.css`
|
|
1389
|
+
${lgCSS}
|
|
1390
|
+
${smCSS}
|
|
1391
|
+
${minSmMaxLgCSS}
|
|
1392
|
+
`
|
|
1393
|
+
};
|
|
1394
|
+
}
|
|
1395
|
+
var standardContentInset = buildStandardContentInset(16, 24, 32);
|
|
1396
|
+
var cardBorderRadiusPx = 16;
|
|
1397
|
+
var standardBorderRadius = (radius) => {
|
|
1398
|
+
const borderRadiusPx = Array.isArray(radius) ? radius.map((r) => `${r}px`).join(" ") : `${radius}px`;
|
|
1399
|
+
return `
|
|
1400
|
+
border-radius: ${borderRadiusPx};
|
|
1401
|
+
`;
|
|
1402
|
+
};
|
|
1403
|
+
var standardCardShadow = import_react4.css`
|
|
1404
|
+
box-shadow:
|
|
1405
|
+
0px 4px 10px 0px rgba(0, 0, 0, 0.08),
|
|
1406
|
+
0px 8px 24px 0px rgba(0, 0, 0, 0.04);
|
|
1407
|
+
`;
|
|
1408
|
+
var pageBorderRadiusPx = 16;
|
|
1409
|
+
var pageBorderRadius = `
|
|
1410
|
+
border-radius: ${pageBorderRadiusPx}px;
|
|
1411
|
+
`;
|
|
1412
|
+
var getFocusOutline = ({
|
|
1413
|
+
theme,
|
|
1414
|
+
onBgHex
|
|
1415
|
+
}) => `${onBgHex ? theme.hcNeutralFromBg(onBgHex) : theme.hcNeutral} dashed 1px`;
|
|
1416
|
+
var outlineOffset = "-2px";
|
|
1417
|
+
var standardFocusOutline = ({ theme }) => import_react4.css`
|
|
1418
|
+
&,
|
|
1419
|
+
& a,
|
|
1420
|
+
& button {
|
|
1421
|
+
&:focus-visible {
|
|
1422
|
+
outline: ${getFocusOutline({ theme })};
|
|
1423
|
+
outline-offset: ${outlineOffset};
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
`;
|
|
1427
|
+
var subtext = ({ theme }) => import_react4.css`
|
|
1428
|
+
color: ${theme.c6Neutral};
|
|
1429
|
+
font-weight: 600;
|
|
1430
|
+
`;
|
|
1431
|
+
var Subtext = import_styled.default.div`
|
|
1432
|
+
${subtext}
|
|
1433
|
+
`;
|
|
1434
|
+
var darkGradientBg = import_react4.css`
|
|
1435
|
+
background: ${darkGradient};
|
|
1436
|
+
`;
|
|
1437
|
+
var overlaySurfaceBorderColor = ({
|
|
1438
|
+
theme,
|
|
1439
|
+
important = false
|
|
1440
|
+
}) => import_react4.css`
|
|
1441
|
+
border-color: ${themeOr(theme.c1Neutral, theme.c3Neutral)({ theme })}
|
|
1442
|
+
${important ? "!important" : ""};
|
|
1443
|
+
`;
|
|
1444
|
+
var overlaySurface = ({
|
|
1445
|
+
theme,
|
|
1446
|
+
important = false
|
|
1447
|
+
}) => import_react4.css`
|
|
1448
|
+
background-color: ${themeOr(colors.white, theme.c1Neutral)({ theme })}
|
|
1449
|
+
${important ? "!important" : ""};
|
|
1450
|
+
border: 0.5px solid ${important ? "!important" : ""};
|
|
1451
|
+
${overlaySurfaceBorderColor({ theme, important })};
|
|
1452
|
+
${themeOr(
|
|
1453
|
+
`box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.08), 0px 1px 4px rgba(0, 0, 0, 0.1) ${important ? "!important" : ""};`,
|
|
1454
|
+
""
|
|
1455
|
+
)({ theme })}
|
|
1456
|
+
`;
|
|
1457
|
+
|
|
1458
|
+
// src/components/Badge.tsx
|
|
1459
|
+
var import_jsx_runtime2 = require("@emotion/react/jsx-runtime");
|
|
1460
|
+
function Badge({ text, ml = 0 }) {
|
|
1461
|
+
return text ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(StyledBadge, { ml, children: text }) : null;
|
|
1462
|
+
}
|
|
1463
|
+
var badgeVPadding = 2;
|
|
1464
|
+
var StyledBadge = import_styled2.default.span`
|
|
1465
|
+
${standardBorderRadius(4)}
|
|
1466
|
+
${({ ml }) => ml === 0 ? "" : `margin-left: ${ml}px;`}
|
|
1467
|
+
padding: ${badgeVPadding}px 6px;
|
|
1468
|
+
background-color: ${({ theme }) => isLight(theme) ? theme.c05Neutral : theme.c15Neutral};
|
|
1469
|
+
`;
|
|
1470
|
+
|
|
1471
|
+
// src/components/Button.tsx
|
|
1472
|
+
var import_react9 = require("@emotion/react");
|
|
1473
|
+
var import_styled6 = __toESM(require("@emotion/styled"), 1);
|
|
1474
|
+
var import_lodash_es3 = require("lodash-es");
|
|
1475
|
+
var import_react10 = require("react");
|
|
1476
|
+
|
|
1477
|
+
// src/router.tsx
|
|
1478
|
+
var import_lodash_es2 = require("lodash-es");
|
|
1479
|
+
var import_react5 = require("react");
|
|
1480
|
+
var import_react_router_dom = require("react-router-dom");
|
|
1481
|
+
|
|
1347
1482
|
// src/utils/strings.tsx
|
|
1348
1483
|
function isString(str) {
|
|
1349
1484
|
return typeof str === "string";
|
|
1350
1485
|
}
|
|
1351
1486
|
|
|
1352
1487
|
// src/router.tsx
|
|
1353
|
-
var
|
|
1488
|
+
var import_jsx_runtime3 = require("@emotion/react/jsx-runtime");
|
|
1354
1489
|
function replaceParams(to, params) {
|
|
1355
1490
|
if (params) {
|
|
1356
1491
|
let toWithParams = to;
|
|
@@ -1378,32 +1513,36 @@ function Link({
|
|
|
1378
1513
|
externalLink,
|
|
1379
1514
|
params,
|
|
1380
1515
|
children,
|
|
1381
|
-
css:
|
|
1516
|
+
css: css9,
|
|
1382
1517
|
onClick,
|
|
1383
1518
|
className,
|
|
1384
1519
|
hash = null,
|
|
1385
1520
|
blue = false,
|
|
1386
1521
|
newTab = false
|
|
1387
1522
|
}) {
|
|
1388
|
-
if (!isString(to) && !externalLink) {
|
|
1389
|
-
throw new Error(
|
|
1523
|
+
if (!isString(to) && !externalLink && !onClick) {
|
|
1524
|
+
throw new Error(
|
|
1525
|
+
"Link must have either `to` or `externalLink` or `onClick` defined"
|
|
1526
|
+
);
|
|
1390
1527
|
}
|
|
1391
1528
|
let toStr;
|
|
1392
1529
|
if (isString(to)) {
|
|
1393
1530
|
toStr = replaceParams(to, params);
|
|
1394
1531
|
toStr += hash ? `#${hash}` : "";
|
|
1395
|
-
} else {
|
|
1532
|
+
} else if (externalLink) {
|
|
1396
1533
|
const definedExternalLink = externalLink;
|
|
1397
1534
|
if (!definedExternalLink.startsWith("http")) {
|
|
1398
1535
|
throw new Error("Link's externalLink must start with http");
|
|
1399
1536
|
}
|
|
1400
1537
|
toStr = definedExternalLink;
|
|
1538
|
+
} else {
|
|
1539
|
+
toStr = "#";
|
|
1401
1540
|
}
|
|
1402
|
-
return /* @__PURE__ */ (0,
|
|
1541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1403
1542
|
import_react_router_dom.Link,
|
|
1404
1543
|
{
|
|
1405
1544
|
to: toStr,
|
|
1406
|
-
css:
|
|
1545
|
+
css: css9,
|
|
1407
1546
|
onClick,
|
|
1408
1547
|
className,
|
|
1409
1548
|
style: { color: blue ? colors.blue43 : "inherit" },
|
|
@@ -1414,138 +1553,15 @@ function Link({
|
|
|
1414
1553
|
);
|
|
1415
1554
|
}
|
|
1416
1555
|
|
|
1417
|
-
// src/styles/common.tsx
|
|
1418
|
-
var import_react5 = require("@emotion/react");
|
|
1419
|
-
var import_styled = __toESM(require("@emotion/styled"), 1);
|
|
1420
|
-
var import_react_tooltip = require("react-tooltip");
|
|
1421
|
-
|
|
1422
|
-
// src/styles/z-index.tsx
|
|
1423
|
-
var z = {
|
|
1424
|
-
card: 1,
|
|
1425
|
-
fieldError: 1,
|
|
1426
|
-
textInput: 2,
|
|
1427
|
-
select: 3,
|
|
1428
|
-
selectFocused: 4,
|
|
1429
|
-
walletActionPreviewTopGradient: 1,
|
|
1430
|
-
headerContainer: 99,
|
|
1431
|
-
smBanner: 99,
|
|
1432
|
-
headerTop: 100,
|
|
1433
|
-
navMenu: 100,
|
|
1434
|
-
smNavMenu: 100,
|
|
1435
|
-
navAction: 101,
|
|
1436
|
-
smNavAction: 100,
|
|
1437
|
-
// keep under navDropdown
|
|
1438
|
-
tooltip: 160,
|
|
1439
|
-
notificationBanner: 170,
|
|
1440
|
-
qrReaderVideo: 180,
|
|
1441
|
-
qrReaderOverlay: 181,
|
|
1442
|
-
modalOverlay: 190,
|
|
1443
|
-
modalContainer: 191,
|
|
1444
|
-
dropdown: 192,
|
|
1445
|
-
toast: 200
|
|
1446
|
-
};
|
|
1447
|
-
|
|
1448
|
-
// src/styles/common.tsx
|
|
1449
|
-
var rootFontSizePx = 12;
|
|
1450
|
-
var rootFontSizeRems = rootFontSizePx / 16;
|
|
1451
|
-
var standardLineHeightEms = 1.21;
|
|
1452
|
-
var standardContentInsetPx = 32;
|
|
1453
|
-
var standardContentInsetMdPx = 24;
|
|
1454
|
-
var standardContentInsetSmPx = 16;
|
|
1455
|
-
var standardBorderRadius = (radius) => {
|
|
1456
|
-
const borderRadiusPx = Array.isArray(radius) ? radius.map((r) => `${r}px`).join(" ") : `${radius}px`;
|
|
1457
|
-
return `
|
|
1458
|
-
border-radius: ${borderRadiusPx};
|
|
1459
|
-
`;
|
|
1460
|
-
};
|
|
1461
|
-
var smContentInset = import_react5.css`
|
|
1462
|
-
${bp.sm(`
|
|
1463
|
-
margin-left: auto;
|
|
1464
|
-
margin-right: auto;
|
|
1465
|
-
width: calc(100% - ${standardContentInsetSmPx * 2}px);
|
|
1466
|
-
`)}
|
|
1467
|
-
`;
|
|
1468
|
-
var minSmMaxLgContentInset = import_react5.css`
|
|
1469
|
-
${bp.minSmMaxLg(`
|
|
1470
|
-
width: calc(100% - ${standardContentInsetMdPx * 2}px);
|
|
1471
|
-
`)}
|
|
1472
|
-
`;
|
|
1473
|
-
var standardContentInset = import_react5.css`
|
|
1474
|
-
margin-left: auto;
|
|
1475
|
-
margin-right: auto;
|
|
1476
|
-
width: calc(100% - ${standardContentInsetPx * 2}px);
|
|
1477
|
-
max-width: 1280px;
|
|
1478
|
-
|
|
1479
|
-
${smContentInset}
|
|
1480
|
-
${minSmMaxLgContentInset}
|
|
1481
|
-
`;
|
|
1482
|
-
var standardCardShadow = import_react5.css`
|
|
1483
|
-
box-shadow:
|
|
1484
|
-
0px 4px 10px 0px rgba(0, 0, 0, 0.08),
|
|
1485
|
-
0px 8px 24px 0px rgba(0, 0, 0, 0.04);
|
|
1486
|
-
`;
|
|
1487
|
-
var pageBorderRadiusPx = 16;
|
|
1488
|
-
var pageBorderRadius = `
|
|
1489
|
-
border-radius: ${pageBorderRadiusPx}px;
|
|
1490
|
-
`;
|
|
1491
|
-
var getFocusOutline = ({
|
|
1492
|
-
theme,
|
|
1493
|
-
onBgHex
|
|
1494
|
-
}) => `${onBgHex ? theme.hcNeutralFromBg(onBgHex) : theme.hcNeutral} dashed 1px`;
|
|
1495
|
-
var outlineOffset = "-2px";
|
|
1496
|
-
var standardFocusOutline = ({ theme }) => import_react5.css`
|
|
1497
|
-
&,
|
|
1498
|
-
& a,
|
|
1499
|
-
& button {
|
|
1500
|
-
&:focus-visible {
|
|
1501
|
-
outline: ${getFocusOutline({ theme })};
|
|
1502
|
-
outline-offset: ${outlineOffset};
|
|
1503
|
-
}
|
|
1504
|
-
}
|
|
1505
|
-
`;
|
|
1506
|
-
var subtext = ({ theme }) => import_react5.css`
|
|
1507
|
-
color: ${theme.c6Neutral};
|
|
1508
|
-
font-weight: 600;
|
|
1509
|
-
`;
|
|
1510
|
-
var Subtext = import_styled.default.div`
|
|
1511
|
-
${subtext}
|
|
1512
|
-
`;
|
|
1513
|
-
var darkGradientBg = import_react5.css`
|
|
1514
|
-
background: ${darkGradient};
|
|
1515
|
-
`;
|
|
1516
|
-
var StyledTooltip = (0, import_styled.default)(import_react_tooltip.Tooltip)`
|
|
1517
|
-
z-index: ${z.modalOverlay};
|
|
1518
|
-
`;
|
|
1519
|
-
var overlaySurfaceBorderColor = ({
|
|
1520
|
-
theme,
|
|
1521
|
-
important = false
|
|
1522
|
-
}) => import_react5.css`
|
|
1523
|
-
border-color: ${themeOr(theme.c1Neutral, theme.c3Neutral)({ theme })}
|
|
1524
|
-
${important ? "!important" : ""};
|
|
1525
|
-
`;
|
|
1526
|
-
var overlaySurface = ({
|
|
1527
|
-
theme,
|
|
1528
|
-
important = false
|
|
1529
|
-
}) => import_react5.css`
|
|
1530
|
-
background-color: ${themeOr(colors.white, theme.c1Neutral)({ theme })}
|
|
1531
|
-
${important ? "!important" : ""};
|
|
1532
|
-
border: 0.5px solid ${important ? "!important" : ""};
|
|
1533
|
-
${overlaySurfaceBorderColor({ theme, important })};
|
|
1534
|
-
${themeOr(
|
|
1535
|
-
`box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.08), 0px 1px 4px rgba(0, 0, 0, 0.1) ${important ? "!important" : ""};`,
|
|
1536
|
-
""
|
|
1537
|
-
)({ theme })}
|
|
1538
|
-
`;
|
|
1539
|
-
|
|
1540
1556
|
// src/utils/emotion.tsx
|
|
1541
1557
|
function select(component) {
|
|
1542
1558
|
return component.toString();
|
|
1543
1559
|
}
|
|
1544
1560
|
|
|
1545
1561
|
// src/components/Icon.tsx
|
|
1546
|
-
var
|
|
1562
|
+
var import_styled3 = __toESM(require("@emotion/styled"), 1);
|
|
1547
1563
|
var import_react6 = require("react");
|
|
1548
|
-
var
|
|
1564
|
+
var import_jsx_runtime4 = require("@emotion/react/jsx-runtime");
|
|
1549
1565
|
var iconMap = {};
|
|
1550
1566
|
function loadIcon(iconName) {
|
|
1551
1567
|
return __async(this, null, function* () {
|
|
@@ -1587,7 +1603,7 @@ function Icon({
|
|
|
1587
1603
|
const mrRems = parseFloat((mr / rootFontSizePx).toFixed(2));
|
|
1588
1604
|
const mlRems = parseFloat((ml / rootFontSizePx).toFixed(2));
|
|
1589
1605
|
const va = typeof verticalAlign === "string" ? verticalAlign : parseFloat((verticalAlign / rootFontSizePx).toFixed(2));
|
|
1590
|
-
return /* @__PURE__ */ (0,
|
|
1606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1591
1607
|
IconContainer,
|
|
1592
1608
|
{
|
|
1593
1609
|
className,
|
|
@@ -1597,11 +1613,11 @@ function Icon({
|
|
|
1597
1613
|
verticalAlign: va,
|
|
1598
1614
|
fontColor: color,
|
|
1599
1615
|
"data-tutorial-tip": tutorialStep == null ? void 0 : tutorialStep.toString(),
|
|
1600
|
-
children: IconComponent ? /* @__PURE__ */ (0,
|
|
1616
|
+
children: IconComponent ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconComponent, {}) : null
|
|
1601
1617
|
}
|
|
1602
1618
|
);
|
|
1603
1619
|
}
|
|
1604
|
-
var IconContainer =
|
|
1620
|
+
var IconContainer = import_styled3.default.span`
|
|
1605
1621
|
pointer-events: none;
|
|
1606
1622
|
display: inline-flex;
|
|
1607
1623
|
${({ mr, ml, w }) => `
|
|
@@ -1621,9 +1637,90 @@ var IconContainer = import_styled2.default.span`
|
|
|
1621
1637
|
`}
|
|
1622
1638
|
`;
|
|
1623
1639
|
|
|
1640
|
+
// src/components/LightTooltip.tsx
|
|
1641
|
+
var import_css = require("@emotion/css");
|
|
1642
|
+
var import_react7 = require("@emotion/react");
|
|
1643
|
+
var import_react8 = __toESM(require("react"), 1);
|
|
1644
|
+
var import_react_dom = __toESM(require("react-dom"), 1);
|
|
1645
|
+
var import_react_tooltip = require("react-tooltip");
|
|
1646
|
+
|
|
1647
|
+
// src/styles/z-index.tsx
|
|
1648
|
+
var z = {
|
|
1649
|
+
card: 1,
|
|
1650
|
+
fieldError: 1,
|
|
1651
|
+
textInput: 2,
|
|
1652
|
+
select: 3,
|
|
1653
|
+
selectFocused: 4,
|
|
1654
|
+
walletActionPreviewTopGradient: 1,
|
|
1655
|
+
headerContainer: 99,
|
|
1656
|
+
smBanner: 99,
|
|
1657
|
+
headerTop: 100,
|
|
1658
|
+
navMenu: 100,
|
|
1659
|
+
smNavMenu: 100,
|
|
1660
|
+
navAction: 101,
|
|
1661
|
+
smNavAction: 100,
|
|
1662
|
+
// keep under navDropdown
|
|
1663
|
+
notificationBanner: 170,
|
|
1664
|
+
qrReaderVideo: 180,
|
|
1665
|
+
qrReaderOverlay: 181,
|
|
1666
|
+
modalOverlay: 190,
|
|
1667
|
+
modalContainer: 191,
|
|
1668
|
+
dropdown: 192,
|
|
1669
|
+
tooltip: 193,
|
|
1670
|
+
toast: 200
|
|
1671
|
+
};
|
|
1672
|
+
|
|
1673
|
+
// src/components/LightTooltip.tsx
|
|
1674
|
+
var import_jsx_runtime5 = require("@emotion/react/jsx-runtime");
|
|
1675
|
+
function LightTooltip(props) {
|
|
1676
|
+
const nodeRef = (0, import_react8.useRef)(null);
|
|
1677
|
+
const [nodeReady, setNodeReady] = import_react8.default.useState(false);
|
|
1678
|
+
(0, import_react8.useEffect)(() => {
|
|
1679
|
+
if (!nodeRef.current) {
|
|
1680
|
+
nodeRef.current = document.createElement("div");
|
|
1681
|
+
document.body.appendChild(nodeRef.current);
|
|
1682
|
+
}
|
|
1683
|
+
setNodeReady(true);
|
|
1684
|
+
return () => {
|
|
1685
|
+
if (nodeRef.current) {
|
|
1686
|
+
document.body.removeChild(nodeRef.current);
|
|
1687
|
+
nodeRef.current = null;
|
|
1688
|
+
}
|
|
1689
|
+
};
|
|
1690
|
+
}, []);
|
|
1691
|
+
const theme = (0, import_react7.useTheme)();
|
|
1692
|
+
console.log("LightTooltip.tsx: tooltipProps:", props);
|
|
1693
|
+
return nodeReady && nodeRef.current ? import_react_dom.default.createPortal(
|
|
1694
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1695
|
+
import_react_tooltip.Tooltip,
|
|
1696
|
+
__spreadProps(__spreadValues({}, props), {
|
|
1697
|
+
id: props.id || "",
|
|
1698
|
+
content: props.content || "",
|
|
1699
|
+
noArrow: true,
|
|
1700
|
+
border: "0.05rem solid rgba(0, 0, 0, 0.1)",
|
|
1701
|
+
className: styles({ theme }),
|
|
1702
|
+
variant: "light",
|
|
1703
|
+
delayShow: 180
|
|
1704
|
+
})
|
|
1705
|
+
),
|
|
1706
|
+
nodeRef.current
|
|
1707
|
+
) : null;
|
|
1708
|
+
}
|
|
1709
|
+
var styles = ({ theme }) => import_css.css`
|
|
1710
|
+
font-size: "10px",
|
|
1711
|
+
color: ${theme.c2Neutral};
|
|
1712
|
+
border-radius: 8px !important;
|
|
1713
|
+
padding: 16px !important;
|
|
1714
|
+
z-index: ${z.tooltip};
|
|
1715
|
+
${overlaySurface({ theme, important: true })};
|
|
1716
|
+
|
|
1717
|
+
max-width: 260px;
|
|
1718
|
+
box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.10), 0px 4px 8px 0px rgba(0, 0, 0, 0.08) !important;
|
|
1719
|
+
`;
|
|
1720
|
+
|
|
1624
1721
|
// src/components/Loading.tsx
|
|
1625
|
-
var
|
|
1626
|
-
var
|
|
1722
|
+
var import_styled4 = __toESM(require("@emotion/styled"), 1);
|
|
1723
|
+
var import_jsx_runtime6 = require("@emotion/react/jsx-runtime");
|
|
1627
1724
|
var defaultProps = {
|
|
1628
1725
|
size: 60,
|
|
1629
1726
|
center: true,
|
|
@@ -1634,10 +1731,10 @@ function Loading({
|
|
|
1634
1731
|
size: size2 = defaultProps.size,
|
|
1635
1732
|
ml = defaultProps.ml
|
|
1636
1733
|
}) {
|
|
1637
|
-
return /* @__PURE__ */ (0,
|
|
1734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(LoadingWrapper, { center, ml, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Rotate, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { name: "LoadingSpinner", width: size2 }) }) });
|
|
1638
1735
|
}
|
|
1639
1736
|
Loading.defaultProps = defaultProps;
|
|
1640
|
-
var LoadingWrapper =
|
|
1737
|
+
var LoadingWrapper = import_styled4.default.div`
|
|
1641
1738
|
flex-grow: 1;
|
|
1642
1739
|
display: flex;
|
|
1643
1740
|
align-items: center;
|
|
@@ -1657,7 +1754,7 @@ var LoadingWrapper = import_styled3.default.div`
|
|
|
1657
1754
|
margin: 0 !important;
|
|
1658
1755
|
`}
|
|
1659
1756
|
`;
|
|
1660
|
-
var Rotate =
|
|
1757
|
+
var Rotate = import_styled4.default.div`
|
|
1661
1758
|
display: inline-flex;
|
|
1662
1759
|
animation: rotate 0.5s linear infinite;
|
|
1663
1760
|
|
|
@@ -1672,8 +1769,8 @@ var Rotate = import_styled3.default.div`
|
|
|
1672
1769
|
`;
|
|
1673
1770
|
|
|
1674
1771
|
// src/components/UnstyledButton.tsx
|
|
1675
|
-
var
|
|
1676
|
-
var UnstyledButton =
|
|
1772
|
+
var import_styled5 = __toESM(require("@emotion/styled"), 1);
|
|
1773
|
+
var UnstyledButton = import_styled5.default.button`
|
|
1677
1774
|
${standardFocusOutline}
|
|
1678
1775
|
font-family: ${({ theme }) => theme.typography.fontFamilies.main};
|
|
1679
1776
|
appearance: none;
|
|
@@ -1688,7 +1785,7 @@ var UnstyledButton = import_styled4.default.button`
|
|
|
1688
1785
|
`;
|
|
1689
1786
|
|
|
1690
1787
|
// src/components/Button.tsx
|
|
1691
|
-
var
|
|
1788
|
+
var import_jsx_runtime7 = require("@emotion/react/jsx-runtime");
|
|
1692
1789
|
function getTextColor({ color, theme, primary: primary2, blue }) {
|
|
1693
1790
|
if (color) {
|
|
1694
1791
|
return color;
|
|
@@ -1723,13 +1820,38 @@ function getBackgroundColor({
|
|
|
1723
1820
|
}
|
|
1724
1821
|
return themeOr(colors.white, theme.c1Neutral)({ theme });
|
|
1725
1822
|
}
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1823
|
+
var paddingsY = {
|
|
1824
|
+
lg: 14,
|
|
1825
|
+
md: 9,
|
|
1826
|
+
sm: 6
|
|
1827
|
+
};
|
|
1828
|
+
var roundPaddingsX = {
|
|
1829
|
+
lg: 19,
|
|
1830
|
+
md: 14,
|
|
1831
|
+
sm: 10
|
|
1832
|
+
};
|
|
1833
|
+
var paddingsX = {
|
|
1834
|
+
lg: 24,
|
|
1835
|
+
md: 18,
|
|
1836
|
+
sm: 16
|
|
1837
|
+
};
|
|
1838
|
+
function getPaddingX({
|
|
1839
|
+
size: size2,
|
|
1840
|
+
ghost,
|
|
1841
|
+
isRound
|
|
1842
|
+
}) {
|
|
1843
|
+
return ghost ? 0 : isRound ? roundPaddingsX[size2] : paddingsX[size2];
|
|
1844
|
+
}
|
|
1845
|
+
function getPadding({
|
|
1846
|
+
iconWidth,
|
|
1847
|
+
size: size2,
|
|
1848
|
+
ghost,
|
|
1849
|
+
iconSide,
|
|
1850
|
+
isRound
|
|
1851
|
+
}) {
|
|
1852
|
+
const paddingY = ghost ? 0 : paddingsY[size2];
|
|
1853
|
+
const paddingX = getPaddingX({ size: size2, ghost, isRound });
|
|
1854
|
+
const paddingForIcon = iconWidth && !ghost ? iconWidth : 0;
|
|
1733
1855
|
return `${paddingY}px ${paddingX + (iconSide === "right" ? paddingForIcon : 0)}px ${paddingY}px ${paddingX + (iconSide === "left" ? paddingForIcon : 0)}px`;
|
|
1734
1856
|
}
|
|
1735
1857
|
function getBorder({ ghost }) {
|
|
@@ -1777,40 +1899,46 @@ function Button({
|
|
|
1777
1899
|
type = "button",
|
|
1778
1900
|
blue = false,
|
|
1779
1901
|
newTab = false,
|
|
1780
|
-
zIndex = void 0
|
|
1902
|
+
zIndex = void 0,
|
|
1903
|
+
tooltipText
|
|
1781
1904
|
}) {
|
|
1905
|
+
const tooltipId = (0, import_react10.useRef)((0, import_lodash_es3.uniqueId)());
|
|
1782
1906
|
const iconMarginRight = 6;
|
|
1783
1907
|
const iconSize = size2 === "lg" ? 16 : 12;
|
|
1784
1908
|
let currentIcon = null;
|
|
1785
1909
|
if (loading) {
|
|
1786
|
-
currentIcon = /* @__PURE__ */ (0,
|
|
1910
|
+
currentIcon = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ButtonIcon, { ghost, iconSide, text, size: size2, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Loading, { size: iconSize, center: false }) });
|
|
1787
1911
|
} else if (icon) {
|
|
1788
|
-
currentIcon = /* @__PURE__ */ (0,
|
|
1912
|
+
currentIcon = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ButtonIcon, { ghost, iconSide, text, size: size2, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { name: icon, width: iconSize }) });
|
|
1789
1913
|
}
|
|
1790
|
-
const content = /* @__PURE__ */ (0,
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1914
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react10.Fragment, { children: [
|
|
1915
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1916
|
+
"div",
|
|
1917
|
+
__spreadProps(__spreadValues({}, tooltipText ? { "data-tooltip-id": tooltipId.current } : {}), {
|
|
1918
|
+
css: {
|
|
1919
|
+
display: "flex",
|
|
1920
|
+
alignItems: "center",
|
|
1921
|
+
justifyContent: "center"
|
|
1922
|
+
},
|
|
1923
|
+
children: [
|
|
1924
|
+
iconSide === "left" && currentIcon,
|
|
1925
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1926
|
+
"div",
|
|
1927
|
+
{
|
|
1928
|
+
css: {
|
|
1929
|
+
textOverflow: "ellipsis",
|
|
1930
|
+
overflow: "hidden"
|
|
1931
|
+
},
|
|
1932
|
+
children: text
|
|
1933
|
+
}
|
|
1934
|
+
),
|
|
1935
|
+
iconSide === "right" && currentIcon
|
|
1936
|
+
]
|
|
1937
|
+
})
|
|
1938
|
+
),
|
|
1939
|
+
tooltipText ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(LightTooltip, { id: tooltipId.current, content: tooltipText }) : null
|
|
1940
|
+
] });
|
|
1941
|
+
const isSingleCharRoundButton = Boolean(text && text.length === 1 && !icon);
|
|
1814
1942
|
const commonProps = {
|
|
1815
1943
|
backgroundColor,
|
|
1816
1944
|
color,
|
|
@@ -1823,6 +1951,7 @@ function Button({
|
|
|
1823
1951
|
fullWidth,
|
|
1824
1952
|
blue,
|
|
1825
1953
|
iconSide,
|
|
1954
|
+
isRound: isSingleCharRoundButton,
|
|
1826
1955
|
iconWidth: currentIcon ? iconSize + iconMarginRight : 0,
|
|
1827
1956
|
isLoading: loading,
|
|
1828
1957
|
disabled: disabled || loading,
|
|
@@ -1835,11 +1964,10 @@ function Button({
|
|
|
1835
1964
|
zIndex
|
|
1836
1965
|
};
|
|
1837
1966
|
if (to) {
|
|
1838
|
-
return /* @__PURE__ */ (0,
|
|
1967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ButtonLink, __spreadProps(__spreadValues({}, commonProps), { to, params: toParams, hash, children: content }));
|
|
1839
1968
|
}
|
|
1840
|
-
return href ? /* @__PURE__ */ (0,
|
|
1969
|
+
return href ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ButtonHrefLink, __spreadProps(__spreadValues({}, commonProps), { href, target: "_blank", children: content })) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(StyledButton, __spreadProps(__spreadValues({}, commonProps), { children: content }));
|
|
1841
1970
|
}
|
|
1842
|
-
var hPaddingPx = 24;
|
|
1843
1971
|
var buttonStyle = ({
|
|
1844
1972
|
color,
|
|
1845
1973
|
backgroundColor,
|
|
@@ -1855,8 +1983,9 @@ var buttonStyle = ({
|
|
|
1855
1983
|
blue,
|
|
1856
1984
|
text,
|
|
1857
1985
|
zIndex,
|
|
1858
|
-
iconSide
|
|
1859
|
-
|
|
1986
|
+
iconSide,
|
|
1987
|
+
isRound
|
|
1988
|
+
}) => import_react9.css`
|
|
1860
1989
|
display: inline-flex;
|
|
1861
1990
|
opacity: ${disabled && !isLoading ? 0.2 : 1};
|
|
1862
1991
|
transition: opacity 0.2s;
|
|
@@ -1892,8 +2021,15 @@ var buttonStyle = ({
|
|
|
1892
2021
|
primary: primary2,
|
|
1893
2022
|
blue
|
|
1894
2023
|
})};
|
|
1895
|
-
border-radius: 32px;
|
|
1896
|
-
padding: ${getPadding({
|
|
2024
|
+
border-radius: ${isRound ? "100%" : "32px"};
|
|
2025
|
+
padding: ${getPadding({
|
|
2026
|
+
size: size2,
|
|
2027
|
+
iconWidth,
|
|
2028
|
+
text,
|
|
2029
|
+
ghost,
|
|
2030
|
+
iconSide,
|
|
2031
|
+
isRound
|
|
2032
|
+
})};
|
|
1897
2033
|
color: ${getTextColor({ color, theme, primary: primary2, blue })};
|
|
1898
2034
|
transition:
|
|
1899
2035
|
background-color 0.2s ease-out,
|
|
@@ -1904,28 +2040,28 @@ var buttonStyle = ({
|
|
|
1904
2040
|
}
|
|
1905
2041
|
}
|
|
1906
2042
|
`;
|
|
1907
|
-
var ButtonIcon =
|
|
2043
|
+
var ButtonIcon = import_styled6.default.div`
|
|
1908
2044
|
${(props) => props.ghost ? "" : "position: absolute;"}
|
|
1909
|
-
${({ iconSide, ghost, text, size: size2 }) => `${iconSide}: ${ghost && text ? 0 : getPaddingX({ size: size2, ghost })}px;`}
|
|
2045
|
+
${({ iconSide, ghost, text, size: size2 }) => `${iconSide}: ${ghost && text ? 0 : getPaddingX({ size: size2, ghost, isRound: false })}px;`}
|
|
1910
2046
|
`;
|
|
1911
|
-
var StyledButton = (0,
|
|
2047
|
+
var StyledButton = (0, import_styled6.default)(UnstyledButton)`
|
|
1912
2048
|
${(props) => buttonStyle(props)}
|
|
1913
2049
|
`;
|
|
1914
|
-
var ButtonLink = (0,
|
|
2050
|
+
var ButtonLink = (0, import_styled6.default)(Link)`
|
|
1915
2051
|
${(props) => buttonStyle(props)}
|
|
1916
2052
|
`;
|
|
1917
|
-
var ButtonHrefLink =
|
|
2053
|
+
var ButtonHrefLink = import_styled6.default.a`
|
|
1918
2054
|
${(props) => buttonStyle(props)}
|
|
1919
2055
|
`;
|
|
1920
|
-
var ButtonSelector = (prepend = "", append = "") => `${prepend}${select(StyledButton)}${
|
|
1921
|
-
|
|
1922
|
-
)}
|
|
2056
|
+
var ButtonSelector = (prepend = "", append = "") => `${prepend}*:is(${select(StyledButton)}, ${select(ButtonLink)}, ${select(
|
|
2057
|
+
ButtonHrefLink
|
|
2058
|
+
)})${append}`;
|
|
1923
2059
|
|
|
1924
2060
|
// src/components/ButtonRow.tsx
|
|
1925
|
-
var
|
|
2061
|
+
var import_styled7 = __toESM(require("@emotion/styled"), 1);
|
|
1926
2062
|
|
|
1927
2063
|
// src/styles/utils.tsx
|
|
1928
|
-
var
|
|
2064
|
+
var import_react11 = require("@emotion/react");
|
|
1929
2065
|
function pxToRems(rems, asNum = false) {
|
|
1930
2066
|
const value = (rems / rootFontSizePx).toFixed(6);
|
|
1931
2067
|
return asNum ? Number(value) : `${value}rem`;
|
|
@@ -1941,26 +2077,26 @@ var size = {
|
|
|
1941
2077
|
px21: pxToRems(21),
|
|
1942
2078
|
px24: pxToRems(24)
|
|
1943
2079
|
};
|
|
1944
|
-
var flexCenterAxis =
|
|
2080
|
+
var flexCenterAxis = import_react11.css`
|
|
1945
2081
|
display: flex;
|
|
1946
2082
|
align-items: center;
|
|
1947
2083
|
`;
|
|
1948
|
-
var flexCenter =
|
|
2084
|
+
var flexCenter = import_react11.css`
|
|
1949
2085
|
display: flex;
|
|
1950
2086
|
justify-content: center;
|
|
1951
2087
|
align-items: center;
|
|
1952
2088
|
`;
|
|
1953
|
-
var inlineFlexCenter =
|
|
2089
|
+
var inlineFlexCenter = import_react11.css`
|
|
1954
2090
|
display: flex;
|
|
1955
2091
|
justify-content: center;
|
|
1956
2092
|
align-items: center;
|
|
1957
2093
|
`;
|
|
1958
|
-
var flexBetween =
|
|
2094
|
+
var flexBetween = import_react11.css`
|
|
1959
2095
|
display: flex;
|
|
1960
2096
|
justify-content: space-between;
|
|
1961
2097
|
align-items: center;
|
|
1962
2098
|
`;
|
|
1963
|
-
var absoluteCenter =
|
|
2099
|
+
var absoluteCenter = import_react11.css`
|
|
1964
2100
|
position: absolute;
|
|
1965
2101
|
top: 0;
|
|
1966
2102
|
bottom: 0;
|
|
@@ -1968,10 +2104,10 @@ var absoluteCenter = import_react8.css`
|
|
|
1968
2104
|
right: 0;
|
|
1969
2105
|
margin: auto;
|
|
1970
2106
|
`;
|
|
1971
|
-
var textCenter =
|
|
2107
|
+
var textCenter = import_react11.css`
|
|
1972
2108
|
text-align: center;
|
|
1973
2109
|
`;
|
|
1974
|
-
var overflowAutoWithoutScrollbars =
|
|
2110
|
+
var overflowAutoWithoutScrollbars = import_react11.css`
|
|
1975
2111
|
overflow: auto;
|
|
1976
2112
|
scrollbar-width: none;
|
|
1977
2113
|
-ms-overflow-style: none;
|
|
@@ -1984,18 +2120,22 @@ var overflowAutoWithoutScrollbars = import_react8.css`
|
|
|
1984
2120
|
display: none;
|
|
1985
2121
|
}
|
|
1986
2122
|
`;
|
|
2123
|
+
var ignoreSSRWarning = "/* @emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */";
|
|
2124
|
+
var firstChild = (style) => `&:first-child:not(style), style:first-child + & ${ignoreSSRWarning} { ${style} }`;
|
|
1987
2125
|
|
|
1988
2126
|
// src/components/ButtonRow.tsx
|
|
1989
|
-
var
|
|
2127
|
+
var import_jsx_runtime8 = require("@emotion/react/jsx-runtime");
|
|
1990
2128
|
function ButtonRow({
|
|
1991
2129
|
buttons,
|
|
1992
2130
|
className,
|
|
1993
2131
|
smSticky = true,
|
|
1994
2132
|
headerHeight = 0
|
|
1995
2133
|
}) {
|
|
1996
|
-
return /* @__PURE__ */ (0,
|
|
2134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ButtonRowContainer, { smSticky, headerHeight, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(StyledButtonRow, { className, children: buttons.map(
|
|
2135
|
+
(button, idx) => button === "divider" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ButtonRowDivider, {}, idx) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Button, __spreadValues({}, button), idx)
|
|
2136
|
+
) }) });
|
|
1997
2137
|
}
|
|
1998
|
-
var ButtonRowContainer =
|
|
2138
|
+
var ButtonRowContainer = import_styled7.default.div`
|
|
1999
2139
|
max-width: 100%;
|
|
2000
2140
|
${({ theme }) => bp.sm(`background: ${theme.bg}`)}
|
|
2001
2141
|
${({ headerHeight, smSticky }) => bp.sm(
|
|
@@ -2005,9 +2145,9 @@ var ButtonRowContainer = import_styled6.default.div`
|
|
|
2005
2145
|
position: sticky;
|
|
2006
2146
|
top: ${headerHeight}px;
|
|
2007
2147
|
margin-top: 24px;
|
|
2008
|
-
margin-left: -${
|
|
2009
|
-
width: calc(100% + ${
|
|
2010
|
-
max-width: calc(100% + ${
|
|
2148
|
+
margin-left: -${standardContentInset.smPx}px;
|
|
2149
|
+
width: calc(100% + ${standardContentInset.smPx * 2}px);
|
|
2150
|
+
max-width: calc(100% + ${standardContentInset.smPx * 2}px);
|
|
2011
2151
|
z-index: 2;` : `position: relative;`}
|
|
2012
2152
|
z-index: 2;
|
|
2013
2153
|
&:before {
|
|
@@ -2023,7 +2163,12 @@ var ButtonRowContainer = import_styled6.default.div`
|
|
|
2023
2163
|
`
|
|
2024
2164
|
)}
|
|
2025
2165
|
`;
|
|
2026
|
-
var
|
|
2166
|
+
var ButtonRowDivider = import_styled7.default.div`
|
|
2167
|
+
border-left: 1px #d9d9d9 solid;
|
|
2168
|
+
margin-left: 16px;
|
|
2169
|
+
padding-left: 16px;
|
|
2170
|
+
`;
|
|
2171
|
+
var StyledButtonRow = import_styled7.default.div`
|
|
2027
2172
|
${overflowAutoWithoutScrollbars}
|
|
2028
2173
|
background: ${({ theme }) => theme.bg};
|
|
2029
2174
|
display: flex;
|
|
@@ -2035,15 +2180,430 @@ var StyledButtonRow = import_styled6.default.div`
|
|
|
2035
2180
|
margin-left: 8px;
|
|
2036
2181
|
}
|
|
2037
2182
|
|
|
2183
|
+
& ${ButtonRowDivider} + button,
|
|
2184
|
+
& ${ButtonRowDivider} + a {
|
|
2185
|
+
margin-left: 0;
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2188
|
+
${bp.sm(`
|
|
2189
|
+
padding: ${standardContentInset.smPx}px;
|
|
2190
|
+
`)}
|
|
2191
|
+
`;
|
|
2192
|
+
|
|
2193
|
+
// src/components/CardPage.tsx
|
|
2194
|
+
var import_styled9 = __toESM(require("@emotion/styled"), 1);
|
|
2195
|
+
var import_react13 = require("react");
|
|
2196
|
+
|
|
2197
|
+
// src/styles/type.tsx
|
|
2198
|
+
var import_react12 = require("@emotion/react");
|
|
2199
|
+
var import_styled8 = __toESM(require("@emotion/styled"), 1);
|
|
2200
|
+
var import_jsx_runtime9 = require("@emotion/react/jsx-runtime");
|
|
2201
|
+
var defaultHeadingSizes = {
|
|
2202
|
+
h1: {
|
|
2203
|
+
size: 32,
|
|
2204
|
+
sizeSm: 21
|
|
2205
|
+
},
|
|
2206
|
+
h2: {
|
|
2207
|
+
size: 24,
|
|
2208
|
+
sizeSm: 18
|
|
2209
|
+
},
|
|
2210
|
+
h3: {
|
|
2211
|
+
size: 21,
|
|
2212
|
+
sizeSm: 18
|
|
2213
|
+
},
|
|
2214
|
+
h4: {
|
|
2215
|
+
size: 14,
|
|
2216
|
+
sizeSm: 14
|
|
2217
|
+
}
|
|
2218
|
+
};
|
|
2219
|
+
var defaultHeadingMargins = {
|
|
2220
|
+
h1: {
|
|
2221
|
+
mt: 24,
|
|
2222
|
+
mb: 24,
|
|
2223
|
+
mtSm: 24,
|
|
2224
|
+
mbSm: 24
|
|
2225
|
+
},
|
|
2226
|
+
h2: {
|
|
2227
|
+
mt: 24,
|
|
2228
|
+
mb: 24,
|
|
2229
|
+
mtSm: 24,
|
|
2230
|
+
mbSm: 24
|
|
2231
|
+
},
|
|
2232
|
+
h3: {
|
|
2233
|
+
mt: 24,
|
|
2234
|
+
mb: 24,
|
|
2235
|
+
mtSm: 24,
|
|
2236
|
+
mbSm: 24
|
|
2237
|
+
},
|
|
2238
|
+
h4: {
|
|
2239
|
+
mt: 16,
|
|
2240
|
+
mb: 16,
|
|
2241
|
+
mtSm: 16,
|
|
2242
|
+
mbSm: 16
|
|
2243
|
+
}
|
|
2244
|
+
};
|
|
2245
|
+
var baseHeading = ({ mt, mb, mtSm, mbSm, theme }) => import_react12.css`
|
|
2246
|
+
line-height: 1.214em;
|
|
2247
|
+
|
|
2248
|
+
margin-bottom: ${mb}px;
|
|
2249
|
+
margin-top: ${mt}px;
|
|
2250
|
+
|
|
2038
2251
|
${bp.sm(`
|
|
2039
|
-
|
|
2252
|
+
margin-top: ${mtSm}px;
|
|
2253
|
+
margin-bottom: ${mbSm}px;
|
|
2040
2254
|
`)}
|
|
2041
2255
|
`;
|
|
2256
|
+
var firstChildStyles = firstChild(`margin-top: 0;`);
|
|
2257
|
+
var headings = {
|
|
2258
|
+
h1: import_styled8.default.h1`
|
|
2259
|
+
${(props) => baseHeading(props)}
|
|
2260
|
+
${firstChildStyles}
|
|
2261
|
+
|
|
2262
|
+
font-size: ${pxToRems(defaultHeadingSizes.h1.size)};
|
|
2263
|
+
font-weight: ${({ light }) => light ? 400 : 800}};
|
|
2264
|
+
${bp.sm(`
|
|
2265
|
+
font-size: ${pxToRems(defaultHeadingSizes.h1.sizeSm)};
|
|
2266
|
+
`)}
|
|
2267
|
+
`,
|
|
2268
|
+
h2: import_styled8.default.h2`
|
|
2269
|
+
${(props) => baseHeading(props)}
|
|
2270
|
+
${firstChildStyles}
|
|
2271
|
+
|
|
2272
|
+
font-size: ${pxToRems(defaultHeadingSizes.h2.size)};
|
|
2273
|
+
font-weight: ${({ light }) => light ? 400 : 700}};
|
|
2274
|
+
${bp.sm(`
|
|
2275
|
+
font-size: ${pxToRems(defaultHeadingSizes.h2.sizeSm)};
|
|
2276
|
+
`)}
|
|
2277
|
+
`,
|
|
2278
|
+
h3: import_styled8.default.h3`
|
|
2279
|
+
${(props) => baseHeading(props)}
|
|
2280
|
+
${firstChildStyles}
|
|
2281
|
+
|
|
2282
|
+
font-size: ${pxToRems(defaultHeadingSizes.h3.size)};
|
|
2283
|
+
font-weight: ${({ light }) => light ? 400 : 700}};
|
|
2284
|
+
${bp.sm(`
|
|
2285
|
+
font-size: ${pxToRems(defaultHeadingSizes.h3.sizeSm)};
|
|
2286
|
+
`)}
|
|
2287
|
+
`,
|
|
2288
|
+
h4: import_styled8.default.h4`
|
|
2289
|
+
${(props) => baseHeading(props)}
|
|
2290
|
+
${firstChildStyles}
|
|
2291
|
+
|
|
2292
|
+
font-size: ${pxToRems(defaultHeadingSizes.h4.size)};
|
|
2293
|
+
font-weight: ${({ light }) => light ? 400 : 600}};
|
|
2294
|
+
${bp.sm(`
|
|
2295
|
+
font-size: ${pxToRems(defaultHeadingSizes.h4.sizeSm)};
|
|
2296
|
+
`)}
|
|
2297
|
+
`
|
|
2298
|
+
};
|
|
2299
|
+
function Heading({
|
|
2300
|
+
children,
|
|
2301
|
+
type = "h2",
|
|
2302
|
+
id,
|
|
2303
|
+
mt = defaultHeadingMargins[type].mt,
|
|
2304
|
+
mb = defaultHeadingMargins[type].mb,
|
|
2305
|
+
mtSm = defaultHeadingMargins[type].mtSm,
|
|
2306
|
+
mbSm = defaultHeadingMargins[type].mbSm,
|
|
2307
|
+
m0 = false,
|
|
2308
|
+
light = false
|
|
2309
|
+
}) {
|
|
2310
|
+
const StyledHeading = headings[type];
|
|
2311
|
+
const theme = (0, import_react12.useTheme)();
|
|
2312
|
+
const heading = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2313
|
+
StyledHeading,
|
|
2314
|
+
{
|
|
2315
|
+
id,
|
|
2316
|
+
mt: m0 ? 0 : mt,
|
|
2317
|
+
mb: m0 ? 0 : mb,
|
|
2318
|
+
mtSm: m0 ? 0 : mtSm,
|
|
2319
|
+
mbSm: m0 ? 0 : mbSm,
|
|
2320
|
+
light,
|
|
2321
|
+
theme,
|
|
2322
|
+
children: id ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("a", { href: `#${id}`, css: { color: "inherit" }, children }) : children
|
|
2323
|
+
}
|
|
2324
|
+
);
|
|
2325
|
+
return heading;
|
|
2326
|
+
}
|
|
2327
|
+
|
|
2328
|
+
// src/components/CardPage.tsx
|
|
2329
|
+
var import_jsx_runtime10 = require("@emotion/react/jsx-runtime");
|
|
2330
|
+
function CardPage(props) {
|
|
2331
|
+
const initiallyExpanded = (0, import_react13.useRef)(Boolean(props.expandRight));
|
|
2332
|
+
const [wasExpanded, setWasExpanded] = (0, import_react13.useState)(Boolean(props.expandRight));
|
|
2333
|
+
const bp2 = useBreakpoints();
|
|
2334
|
+
const header = props.title ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CardPageHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Heading, { type: "h1", m0: true, children: props.title }) }) : null;
|
|
2335
|
+
(0, import_react13.useEffect)(() => {
|
|
2336
|
+
if (props.expandRight) {
|
|
2337
|
+
setWasExpanded(true);
|
|
2338
|
+
}
|
|
2339
|
+
}, [props.expandRight]);
|
|
2340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react13.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
2341
|
+
CardPageContainer,
|
|
2342
|
+
{
|
|
2343
|
+
id: props.id,
|
|
2344
|
+
bp: bp2,
|
|
2345
|
+
hasRightContent: Boolean(props.rightContent),
|
|
2346
|
+
wasExpanded,
|
|
2347
|
+
expandRight: Boolean(props.expandRight),
|
|
2348
|
+
minContentHeight: props.minContentHeight,
|
|
2349
|
+
initiallyExpanded: initiallyExpanded.current,
|
|
2350
|
+
children: [
|
|
2351
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { css: props.minContentWidth ? overflowAutoWithoutScrollbars : null, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
2352
|
+
CardPageContent,
|
|
2353
|
+
{
|
|
2354
|
+
hasPreHeaderContent: Boolean(props.preHeaderContent),
|
|
2355
|
+
minContentHeight: props.minContentHeight,
|
|
2356
|
+
maxContentWidth: props.maxContentWidth,
|
|
2357
|
+
children: [
|
|
2358
|
+
props.preHeaderContent,
|
|
2359
|
+
header,
|
|
2360
|
+
props.children
|
|
2361
|
+
]
|
|
2362
|
+
}
|
|
2363
|
+
) }),
|
|
2364
|
+
props.rightContent && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CardPageRightContent, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2365
|
+
CardPageRightContentInner,
|
|
2366
|
+
{
|
|
2367
|
+
hasRightContent: Boolean(props.rightContent),
|
|
2368
|
+
children: props.rightContent
|
|
2369
|
+
}
|
|
2370
|
+
) })
|
|
2371
|
+
]
|
|
2372
|
+
}
|
|
2373
|
+
) });
|
|
2374
|
+
}
|
|
2375
|
+
CardPage.defaultProps = {
|
|
2376
|
+
minContentHeight: void 0,
|
|
2377
|
+
minContentWidth: void 0,
|
|
2378
|
+
maxContentWidth: void 0
|
|
2379
|
+
};
|
|
2380
|
+
var CardPageFullContent = import_styled9.default.div``;
|
|
2381
|
+
var CardPageFullWidth = import_styled9.default.div``;
|
|
2382
|
+
var CardPageRightContentInner = import_styled9.default.div`
|
|
2383
|
+
${flexCenter}
|
|
2384
|
+
height: 100%;
|
|
2385
|
+
padding: 150px 25px;
|
|
2386
|
+
${({ hasRightContent }) => hasRightContent && `justify-content: space-evenly;`}
|
|
2387
|
+
`;
|
|
2388
|
+
var CardPageRightContent = import_styled9.default.div`
|
|
2389
|
+
display: flex;
|
|
2390
|
+
position: relative;
|
|
2391
|
+
${CardPageRightContentInner} {
|
|
2392
|
+
${darkGradientBg};
|
|
2393
|
+
position: relative;
|
|
2394
|
+
height: calc(100% + 80px);
|
|
2395
|
+
margin-top: -40px;
|
|
2396
|
+
margin-bottom: -40px;
|
|
2397
|
+
margin-right: -40px;
|
|
2398
|
+
overflow: hidden;
|
|
2399
|
+
width: 100%;
|
|
2400
|
+
|
|
2401
|
+
${bp.minSm(`
|
|
2402
|
+
${standardBorderRadius([0, cardBorderRadiusPx, cardBorderRadiusPx, 0])};
|
|
2403
|
+
`)}
|
|
2404
|
+
}
|
|
2405
|
+
`;
|
|
2406
|
+
var vCardPaddingPx = 40;
|
|
2407
|
+
var expandTiming = `0.65s ease-in-out`;
|
|
2408
|
+
var CardPageContainer = import_styled9.default.div`
|
|
2409
|
+
${standardContentInset.css}
|
|
2410
|
+
${({ theme }) => themeOr(`background-color: ${theme.bg}`, "transparent")({ theme })};
|
|
2411
|
+
position: relative;
|
|
2412
|
+
z-index: ${z.card};
|
|
2413
|
+
|
|
2414
|
+
${({ minContentHeight }) => `
|
|
2415
|
+
min-height: ${minContentHeight !== void 0 && minContentHeight !== null ? `${minContentHeight}px` : "250px"};
|
|
2416
|
+
`}
|
|
2417
|
+
|
|
2418
|
+
${bp.sm(`
|
|
2419
|
+
width: 100% !important;
|
|
2420
|
+
`)}
|
|
2421
|
+
|
|
2422
|
+
& > * {
|
|
2423
|
+
${standardContentInset.css}
|
|
2424
|
+
}
|
|
2425
|
+
|
|
2426
|
+
& ${CardPageFullContent}, & ${CardPageFullWidth} {
|
|
2427
|
+
${bp.sm(`
|
|
2428
|
+
width: calc(100% + ${standardContentInset.smPx * 2}px);
|
|
2429
|
+
margin-left: -${standardContentInset.smPx}px;
|
|
2430
|
+
`)}
|
|
2431
|
+
|
|
2432
|
+
${bp.minSmMaxLg(`
|
|
2433
|
+
width: calc(100% + ${standardContentInset.minSmMaxLgPx * 2}px);
|
|
2434
|
+
margin-left: -${standardContentInset.minSmMaxLgPx}px;
|
|
2435
|
+
`)}
|
|
2436
|
+
|
|
2437
|
+
${bp.lg(`
|
|
2438
|
+
width: calc(100% + ${standardContentInset.lgPx * 2}px);
|
|
2439
|
+
margin-left: -${standardContentInset.lgPx}px;
|
|
2440
|
+
`)}
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2443
|
+
& ${CardPageFullContent} {
|
|
2444
|
+
& > * {
|
|
2445
|
+
padding-top: ${vCardPaddingPx}px;
|
|
2446
|
+
padding-bottom: ${vCardPaddingPx}px;
|
|
2447
|
+
${bp.sm(`
|
|
2448
|
+
padding-top: 0;
|
|
2449
|
+
padding-bottom: 0;
|
|
2450
|
+
`)}
|
|
2451
|
+
}
|
|
2452
|
+
|
|
2453
|
+
margin-top: -${vCardPaddingPx}px;
|
|
2454
|
+
${bp.sm(`margin-top: 0;`)}
|
|
2455
|
+
}
|
|
2456
|
+
|
|
2457
|
+
${bp.minSm(`
|
|
2458
|
+
${standardCardShadow.styles};
|
|
2459
|
+
padding: ${vCardPaddingPx}px 0;
|
|
2460
|
+
${standardBorderRadius(cardBorderRadiusPx)}
|
|
2461
|
+
`)}
|
|
2462
|
+
|
|
2463
|
+
&:not(:last-child) {
|
|
2464
|
+
margin-bottom: 30px;
|
|
2465
|
+
}
|
|
2466
|
+
|
|
2467
|
+
@keyframes rightSideExpand {
|
|
2468
|
+
0% {
|
|
2469
|
+
width: 50%;
|
|
2470
|
+
}
|
|
2471
|
+
100% {
|
|
2472
|
+
width: 100%;
|
|
2473
|
+
}
|
|
2474
|
+
}
|
|
2475
|
+
|
|
2476
|
+
@keyframes rightSideCollapse {
|
|
2477
|
+
0% {
|
|
2478
|
+
width: 100%;
|
|
2479
|
+
}
|
|
2480
|
+
100% {
|
|
2481
|
+
width: 50%;
|
|
2482
|
+
}
|
|
2483
|
+
}
|
|
2484
|
+
|
|
2485
|
+
@keyframes leftSideCollapse {
|
|
2486
|
+
0% {
|
|
2487
|
+
width: 50%;
|
|
2488
|
+
height: auto;
|
|
2489
|
+
opacity: 1;
|
|
2490
|
+
}
|
|
2491
|
+
30% {
|
|
2492
|
+
opacity: 0;
|
|
2493
|
+
}
|
|
2494
|
+
100% {
|
|
2495
|
+
height: 0px;
|
|
2496
|
+
width: 0%;
|
|
2497
|
+
}
|
|
2498
|
+
}
|
|
2499
|
+
|
|
2500
|
+
@keyframes leftSideExpand {
|
|
2501
|
+
0% {
|
|
2502
|
+
width: 0%;
|
|
2503
|
+
opacity: 0;
|
|
2504
|
+
}
|
|
2505
|
+
50% {
|
|
2506
|
+
opacity: 0;
|
|
2507
|
+
}
|
|
2508
|
+
100% {
|
|
2509
|
+
width: 50%;
|
|
2510
|
+
opacity: 1;
|
|
2511
|
+
}
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2514
|
+
${({ hasRightContent }) => hasRightContent && `
|
|
2515
|
+
display: flex;
|
|
2516
|
+
& > * {
|
|
2517
|
+
width: 50%;
|
|
2518
|
+
${bp.sm(`width: 100%;`)}
|
|
2519
|
+
|
|
2520
|
+
&:first-of-type > * {
|
|
2521
|
+
${bp.minSmMaxLg(`
|
|
2522
|
+
width: calc(100% - ${standardContentInset.minSmMaxLgPx * 2}px);
|
|
2523
|
+
margin-left: ${standardContentInset.minSmMaxLgPx}px;
|
|
2524
|
+
`)}
|
|
2525
|
+
${bp.lg(`
|
|
2526
|
+
width: calc(100% - ${standardContentInset.lgPx * 3}px);
|
|
2527
|
+
margin-left: ${standardContentInset.lgPx}px;
|
|
2528
|
+
`)}
|
|
2529
|
+
}
|
|
2530
|
+
}
|
|
2531
|
+
`}
|
|
2532
|
+
|
|
2533
|
+
& > :not(${CardPageRightContent}) {
|
|
2534
|
+
${({ expandRight, wasExpanded, initiallyExpanded }) => expandRight && wasExpanded ? bp.minSm(`
|
|
2535
|
+
width: 0%;
|
|
2536
|
+
height: 0px;
|
|
2537
|
+
${initiallyExpanded ? "" : `animation: leftSideCollapse ${expandTiming};`}
|
|
2538
|
+
overflow: hidden;
|
|
2539
|
+
margin: 0%;
|
|
2540
|
+
opacity: 0;
|
|
2541
|
+
`) : wasExpanded ? bp.minSm(`
|
|
2542
|
+
width: 50%;
|
|
2543
|
+
animation: leftSideExpand ${expandTiming};
|
|
2544
|
+
`) : ""}
|
|
2545
|
+
}
|
|
2546
|
+
|
|
2547
|
+
& > ${CardPageRightContent} {
|
|
2548
|
+
${({ expandRight, wasExpanded, initiallyExpanded }) => expandRight && wasExpanded ? bp.minSm(`
|
|
2549
|
+
width: 100%;
|
|
2550
|
+
${initiallyExpanded ? "" : `animation: rightSideExpand ${expandTiming};`}
|
|
2551
|
+
margin: 0%;
|
|
2552
|
+
& > ${CardPageRightContentInner.toString()} {
|
|
2553
|
+
border-radius: ${cardBorderRadiusPx}px !important;
|
|
2554
|
+
}
|
|
2555
|
+
`) : wasExpanded ? bp.minSm(`
|
|
2556
|
+
width: 50%;
|
|
2557
|
+
animation: rightSideCollapse ${expandTiming};
|
|
2558
|
+
`) : ""}
|
|
2559
|
+
}
|
|
2560
|
+
`;
|
|
2561
|
+
var CardPageSubtitle = import_styled9.default.p`
|
|
2562
|
+
color: ${({ theme }) => theme.mcNeutral};
|
|
2563
|
+
font-size: ${size.px14};
|
|
2564
|
+
line-height: ${size.px18};
|
|
2565
|
+
font-weight: 600;
|
|
2566
|
+
margin: 0;
|
|
2567
|
+
`;
|
|
2568
|
+
var CardPageHeader = import_styled9.default.div`
|
|
2569
|
+
align-items: center;
|
|
2570
|
+
display: flex;
|
|
2571
|
+
flex-direction: row;
|
|
2572
|
+
justify-content: space-between;
|
|
2573
|
+
position: relative;
|
|
2574
|
+
|
|
2575
|
+
& + *:not(${CardPageSubtitle}):not(${ButtonRowContainer}) {
|
|
2576
|
+
margin-top: ${headingContentMarginPx}px !important;
|
|
2577
|
+
}
|
|
2578
|
+
|
|
2579
|
+
& + ${CardPageSubtitle} {
|
|
2580
|
+
margin-top: 5px;
|
|
2581
|
+
}
|
|
2582
|
+
|
|
2583
|
+
& + ${ButtonRowContainer} {
|
|
2584
|
+
margin-top: 16px;
|
|
2585
|
+
}
|
|
2586
|
+
`;
|
|
2587
|
+
var CardPageContent = import_styled9.default.div`
|
|
2588
|
+
${({
|
|
2589
|
+
maxContentWidth,
|
|
2590
|
+
minContentHeight,
|
|
2591
|
+
minContentWidth,
|
|
2592
|
+
hasPreHeaderContent
|
|
2593
|
+
}) => `
|
|
2594
|
+
max-width: ${maxContentWidth ? `${maxContentWidth}px` : "initial"};
|
|
2595
|
+
min-width: ${minContentWidth ? `${minContentWidth}px` : "initial"};
|
|
2596
|
+
${CardPageHeader.toString()} {
|
|
2597
|
+
margin-top: ${hasPreHeaderContent ? "25px" : "0"};
|
|
2598
|
+
}
|
|
2599
|
+
min-height: ${minContentHeight !== void 0 && minContentHeight !== null ? `${minContentHeight}px` : "400px"};
|
|
2600
|
+
`}
|
|
2601
|
+
`;
|
|
2042
2602
|
|
|
2043
2603
|
// src/components/Collapsible.tsx
|
|
2044
|
-
var
|
|
2045
|
-
var
|
|
2046
|
-
var
|
|
2604
|
+
var import_styled10 = __toESM(require("@emotion/styled"), 1);
|
|
2605
|
+
var import_react14 = require("react");
|
|
2606
|
+
var import_jsx_runtime11 = require("@emotion/react/jsx-runtime");
|
|
2047
2607
|
function Collapsible({
|
|
2048
2608
|
children,
|
|
2049
2609
|
className,
|
|
@@ -2056,37 +2616,37 @@ function Collapsible({
|
|
|
2056
2616
|
buttonTextElement,
|
|
2057
2617
|
contentIndent = true
|
|
2058
2618
|
}) {
|
|
2059
|
-
const [isOpen, setIsOpen] = (0,
|
|
2619
|
+
const [isOpen, setIsOpen] = (0, import_react14.useState)(open);
|
|
2060
2620
|
const handleClick = () => {
|
|
2061
2621
|
if (handleToggle) {
|
|
2062
2622
|
handleToggle(!isOpen);
|
|
2063
2623
|
}
|
|
2064
2624
|
setIsOpen(!isOpen);
|
|
2065
2625
|
};
|
|
2066
|
-
(0,
|
|
2626
|
+
(0, import_react14.useEffect)(() => {
|
|
2067
2627
|
setIsOpen(open);
|
|
2068
2628
|
}, [open]);
|
|
2069
2629
|
const iconName = hamburger ? isOpen ? "Close" : "StackedLines" : "Down";
|
|
2070
2630
|
const iconWidth = iconName === "Close" ? 12 : 14;
|
|
2071
|
-
let textElement = /* @__PURE__ */ (0,
|
|
2631
|
+
let textElement = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", {});
|
|
2072
2632
|
if (buttonTextElement) {
|
|
2073
2633
|
textElement = buttonTextElement;
|
|
2074
2634
|
} else if (text) {
|
|
2075
|
-
textElement = /* @__PURE__ */ (0,
|
|
2635
|
+
textElement = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { color, children: text });
|
|
2076
2636
|
}
|
|
2077
|
-
return /* @__PURE__ */ (0,
|
|
2078
|
-
/* @__PURE__ */ (0,
|
|
2637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(StyledCollapsible, { className, children: [
|
|
2638
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(StyledCollapsibleButton, { onClick: handleClick, children: [
|
|
2079
2639
|
textElement,
|
|
2080
|
-
/* @__PURE__ */ (0,
|
|
2640
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(IconContainer2, { isOpen, hamburger, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { width: iconWidth, name: iconName }) })
|
|
2081
2641
|
] }),
|
|
2082
|
-
/* @__PURE__ */ (0,
|
|
2642
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CollapsingContainer, { isOpen, full, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(InnerPadding, { contentIndent, children }) })
|
|
2083
2643
|
] });
|
|
2084
2644
|
}
|
|
2085
|
-
var StyledCollapsible =
|
|
2645
|
+
var StyledCollapsible = import_styled10.default.div`
|
|
2086
2646
|
display: flex;
|
|
2087
2647
|
flex-direction: column;
|
|
2088
2648
|
`;
|
|
2089
|
-
var StyledCollapsibleButton =
|
|
2649
|
+
var StyledCollapsibleButton = import_styled10.default.button`
|
|
2090
2650
|
display: flex;
|
|
2091
2651
|
flex-direction: row;
|
|
2092
2652
|
align-items: center;
|
|
@@ -2097,7 +2657,7 @@ var StyledCollapsibleButton = import_styled7.default.button`
|
|
|
2097
2657
|
${standardBorderRadius(8)}
|
|
2098
2658
|
padding: 0;
|
|
2099
2659
|
`;
|
|
2100
|
-
var IconContainer2 =
|
|
2660
|
+
var IconContainer2 = import_styled10.default.div`
|
|
2101
2661
|
${(props) => {
|
|
2102
2662
|
if (props.hamburger) {
|
|
2103
2663
|
return;
|
|
@@ -2107,7 +2667,7 @@ var IconContainer2 = import_styled7.default.div`
|
|
|
2107
2667
|
transition: transform 0.25s ease-out;
|
|
2108
2668
|
width: 20px;
|
|
2109
2669
|
`;
|
|
2110
|
-
var CollapsingContainer =
|
|
2670
|
+
var CollapsingContainer = import_styled10.default.div`
|
|
2111
2671
|
overflow: scroll;
|
|
2112
2672
|
opacity: 0;
|
|
2113
2673
|
animation-duration: 0.4s;
|
|
@@ -2141,28 +2701,28 @@ var CollapsingContainer = import_styled7.default.div`
|
|
|
2141
2701
|
}
|
|
2142
2702
|
}
|
|
2143
2703
|
`;
|
|
2144
|
-
var InnerPadding =
|
|
2704
|
+
var InnerPadding = import_styled10.default.div`
|
|
2145
2705
|
padding: ${"4px" /* 3xs */} 0 ${"4px" /* 3xs */}
|
|
2146
2706
|
${(props) => props.contentIndent ? "16px" /* md */ : "0"};
|
|
2147
2707
|
gap: ${"2px" /* 4xs */};
|
|
2148
2708
|
display: flex;
|
|
2149
2709
|
flex-direction: column;
|
|
2150
2710
|
`;
|
|
2151
|
-
var Text =
|
|
2711
|
+
var Text = import_styled10.default.span`
|
|
2152
2712
|
${(props) => props.color ? `color: ${props.color};` : ""}
|
|
2153
2713
|
line-height: inherit;
|
|
2154
2714
|
`;
|
|
2155
2715
|
|
|
2156
2716
|
// src/components/CommandKey.tsx
|
|
2157
|
-
var
|
|
2158
|
-
var
|
|
2717
|
+
var import_styled11 = __toESM(require("@emotion/styled"), 1);
|
|
2718
|
+
var import_jsx_runtime12 = require("@emotion/react/jsx-runtime");
|
|
2159
2719
|
var CommandKey = ({
|
|
2160
2720
|
keyboardKey,
|
|
2161
2721
|
size: size2,
|
|
2162
2722
|
color,
|
|
2163
2723
|
backgroundColor
|
|
2164
2724
|
}) => {
|
|
2165
|
-
return /* @__PURE__ */ (0,
|
|
2725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2166
2726
|
StyledCommandKey,
|
|
2167
2727
|
{
|
|
2168
2728
|
color,
|
|
@@ -2172,7 +2732,7 @@ var CommandKey = ({
|
|
|
2172
2732
|
}
|
|
2173
2733
|
);
|
|
2174
2734
|
};
|
|
2175
|
-
var StyledCommandKey =
|
|
2735
|
+
var StyledCommandKey = import_styled11.default.div`
|
|
2176
2736
|
height: 24px;
|
|
2177
2737
|
display: flex;
|
|
2178
2738
|
align-items: center;
|
|
@@ -2188,18 +2748,18 @@ var StyledCommandKey = import_styled8.default.div`
|
|
|
2188
2748
|
`;
|
|
2189
2749
|
|
|
2190
2750
|
// src/components/CopyToClipboardButton.tsx
|
|
2191
|
-
var
|
|
2751
|
+
var import_styled12 = __toESM(require("@emotion/styled"), 1);
|
|
2192
2752
|
var import_nanoid = require("nanoid");
|
|
2193
|
-
var
|
|
2194
|
-
var
|
|
2753
|
+
var import_react15 = require("react");
|
|
2754
|
+
var import_jsx_runtime13 = require("@emotion/react/jsx-runtime");
|
|
2195
2755
|
var CopyToClipboardButton = (props) => {
|
|
2196
2756
|
var _a;
|
|
2197
2757
|
const originalTooltipContent = props.tooltipContent || "Click to copy";
|
|
2198
2758
|
const icon = props.icon || "Copy";
|
|
2199
2759
|
const id = `copy-node-name-${(_a = props.id) != null ? _a : (0, import_nanoid.nanoid)()}`;
|
|
2200
|
-
const [tooltipContent, setTooltipContent] = (0,
|
|
2201
|
-
return /* @__PURE__ */ (0,
|
|
2202
|
-
/* @__PURE__ */ (0,
|
|
2760
|
+
const [tooltipContent, setTooltipContent] = (0, import_react15.useState)(originalTooltipContent);
|
|
2761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
2762
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2203
2763
|
Button2,
|
|
2204
2764
|
{
|
|
2205
2765
|
type: "button",
|
|
@@ -2220,18 +2780,25 @@ var CopyToClipboardButton = (props) => {
|
|
|
2220
2780
|
ml: props.ml,
|
|
2221
2781
|
"data-tooltip-id": id,
|
|
2222
2782
|
children: [
|
|
2223
|
-
props.children ? /* @__PURE__ */ (0,
|
|
2224
|
-
/* @__PURE__ */ (0,
|
|
2783
|
+
props.children ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Children, { children: props.children }) : null,
|
|
2784
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { name: icon, width: props.isSm ? 12 : 16 })
|
|
2225
2785
|
]
|
|
2226
2786
|
}
|
|
2227
2787
|
),
|
|
2228
|
-
/* @__PURE__ */ (0,
|
|
2788
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2789
|
+
LightTooltip,
|
|
2790
|
+
{
|
|
2791
|
+
id,
|
|
2792
|
+
place: props.place || "right",
|
|
2793
|
+
content: tooltipContent
|
|
2794
|
+
}
|
|
2795
|
+
)
|
|
2229
2796
|
] });
|
|
2230
2797
|
};
|
|
2231
|
-
var Children =
|
|
2798
|
+
var Children = import_styled12.default.span`
|
|
2232
2799
|
margin-right: 4px;
|
|
2233
2800
|
`;
|
|
2234
|
-
var Button2 = (0,
|
|
2801
|
+
var Button2 = (0, import_styled12.default)(UnstyledButton)`
|
|
2235
2802
|
background: rgba(0, 0, 0, 0);
|
|
2236
2803
|
vertical-align: middle;
|
|
2237
2804
|
${({ ml }) => ml ? `margin-left: ${ml}px` : ""};
|
|
@@ -2239,9 +2806,9 @@ var Button2 = (0, import_styled9.default)(UnstyledButton)`
|
|
|
2239
2806
|
|
|
2240
2807
|
// src/components/CurrencyAmount.tsx
|
|
2241
2808
|
var import_client = require("@apollo/client");
|
|
2242
|
-
var
|
|
2809
|
+
var import_styled13 = __toESM(require("@emotion/styled"), 1);
|
|
2243
2810
|
var import_core = require("@lightsparkdev/core");
|
|
2244
|
-
var
|
|
2811
|
+
var import_jsx_runtime14 = require("@emotion/react/jsx-runtime");
|
|
2245
2812
|
function CurrencyAmount({
|
|
2246
2813
|
amount,
|
|
2247
2814
|
displayUnit = import_core.CurrencyUnit.SATOSHI,
|
|
@@ -2273,18 +2840,18 @@ function CurrencyAmount({
|
|
|
2273
2840
|
if (showUnits) {
|
|
2274
2841
|
formattedNumber += ` ${shorttext(unit, value)}`;
|
|
2275
2842
|
}
|
|
2276
|
-
return /* @__PURE__ */ (0,
|
|
2843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(StyledCurrencyAmount, { ml, children: [
|
|
2277
2844
|
includeEstimatedIndicator && "Est. ",
|
|
2278
|
-
/* @__PURE__ */ (0,
|
|
2845
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CurrencyIcon, { unit }),
|
|
2279
2846
|
formattedNumber
|
|
2280
2847
|
] });
|
|
2281
2848
|
}
|
|
2282
2849
|
var CurrencyIcon = ({ unit }) => {
|
|
2283
2850
|
switch (unit) {
|
|
2284
2851
|
case import_core.CurrencyUnit.BITCOIN:
|
|
2285
|
-
return /* @__PURE__ */ (0,
|
|
2852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { name: "BitcoinB", width: 8, verticalAlign: -2, mr: 2 });
|
|
2286
2853
|
case import_core.CurrencyUnit.SATOSHI:
|
|
2287
|
-
return /* @__PURE__ */ (0,
|
|
2854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { name: "Satoshi", width: 8, verticalAlign: -2, mr: 2 });
|
|
2288
2855
|
default:
|
|
2289
2856
|
return null;
|
|
2290
2857
|
}
|
|
@@ -2305,7 +2872,7 @@ var shorttext = (unit, value) => {
|
|
|
2305
2872
|
}
|
|
2306
2873
|
return unit;
|
|
2307
2874
|
};
|
|
2308
|
-
var StyledCurrencyAmount =
|
|
2875
|
+
var StyledCurrencyAmount = import_styled13.default.span`
|
|
2309
2876
|
color: inherit !important;
|
|
2310
2877
|
white-space: nowrap;
|
|
2311
2878
|
font-feature-settings:
|
|
@@ -2325,19 +2892,131 @@ CurrencyAmount.fragments = {
|
|
|
2325
2892
|
`
|
|
2326
2893
|
};
|
|
2327
2894
|
|
|
2895
|
+
// src/components/GradientCardHeader.tsx
|
|
2896
|
+
var import_styled14 = __toESM(require("@emotion/styled"), 1);
|
|
2897
|
+
var import_jsx_runtime15 = require("@emotion/react/jsx-runtime");
|
|
2898
|
+
function GradientCardHeader(props) {
|
|
2899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(CardHeaderWrapper, { children: [
|
|
2900
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Gradients, {}),
|
|
2901
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { children: [
|
|
2902
|
+
props.status,
|
|
2903
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CardHeaderTitle, { children: props.title })
|
|
2904
|
+
] }),
|
|
2905
|
+
props.children
|
|
2906
|
+
] });
|
|
2907
|
+
}
|
|
2908
|
+
var CardHeaderWrapper = import_styled14.default.div`
|
|
2909
|
+
position: relative;
|
|
2910
|
+
display: flex;
|
|
2911
|
+
flex-direction: column;
|
|
2912
|
+
justify-content: space-between;
|
|
2913
|
+
padding: 40px 32px 24px 32px;
|
|
2914
|
+
background-color: black;
|
|
2915
|
+
color: white;
|
|
2916
|
+
height: 264px;
|
|
2917
|
+
`;
|
|
2918
|
+
var CardHeaderTitle = import_styled14.default.h3`
|
|
2919
|
+
font-size: 21px;
|
|
2920
|
+
font-weight: 800;
|
|
2921
|
+
color: white;
|
|
2922
|
+
margin: 0;
|
|
2923
|
+
z-index: ${z.headerContainer} - 1;
|
|
2924
|
+
position: relative;
|
|
2925
|
+
`;
|
|
2926
|
+
var Gradients = () => {
|
|
2927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0 }, children: [
|
|
2928
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(BackgroundGradients, {}),
|
|
2929
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(AccentGradients, {})
|
|
2930
|
+
] });
|
|
2931
|
+
};
|
|
2932
|
+
var BackgroundGradients = import_styled14.default.div`
|
|
2933
|
+
&:before,
|
|
2934
|
+
&:after {
|
|
2935
|
+
content: "";
|
|
2936
|
+
position: absolute;
|
|
2937
|
+
margin: auto;
|
|
2938
|
+
filter: blur(38.5px);
|
|
2939
|
+
}
|
|
2940
|
+
&:before {
|
|
2941
|
+
z-index: ${z.walletActionPreviewTopGradient};
|
|
2942
|
+
right: -280px;
|
|
2943
|
+
top: -340px;
|
|
2944
|
+
width: 704px;
|
|
2945
|
+
height: 619px;
|
|
2946
|
+
background: radial-gradient(
|
|
2947
|
+
31.57% 32.06% at 50.1% 49.9%,
|
|
2948
|
+
#0032ff 0%,
|
|
2949
|
+
rgb(0 121 255 / 31%) 97%,
|
|
2950
|
+
rgba(0, 102, 255, 0.05) 100%
|
|
2951
|
+
);
|
|
2952
|
+
}
|
|
2953
|
+
&:after {
|
|
2954
|
+
z-index: ${z.walletActionPreviewTopGradient - 1};
|
|
2955
|
+
width: 636px;
|
|
2956
|
+
height: 552px;
|
|
2957
|
+
top: -400px;
|
|
2958
|
+
right: -280px;
|
|
2959
|
+
background: radial-gradient(
|
|
2960
|
+
31.57% 32.06% at 50.1% 49.9%,
|
|
2961
|
+
rgb(255 114 104) 0%,
|
|
2962
|
+
rgb(191 9 255 / 14%) 90%,
|
|
2963
|
+
rgb(191 9 255 / 5%) 100%
|
|
2964
|
+
);
|
|
2965
|
+
}
|
|
2966
|
+
`;
|
|
2967
|
+
var AccentGradients = import_styled14.default.div`
|
|
2968
|
+
position: absolute;
|
|
2969
|
+
top: 0;
|
|
2970
|
+
left: 0;
|
|
2971
|
+
width: 100%;
|
|
2972
|
+
height: 100%;
|
|
2973
|
+
right: 0;
|
|
2974
|
+
bottom: 0;
|
|
2975
|
+
z-index: ${z.walletActionPreviewTopGradient - 1};
|
|
2976
|
+
&:before,
|
|
2977
|
+
&:after {
|
|
2978
|
+
content: "";
|
|
2979
|
+
position: absolute;
|
|
2980
|
+
margin: auto;
|
|
2981
|
+
filter: blur(38.5px);
|
|
2982
|
+
}
|
|
2983
|
+
&:before {
|
|
2984
|
+
right: -70px;
|
|
2985
|
+
top: -100px;
|
|
2986
|
+
width: 169px;
|
|
2987
|
+
height: 323px;
|
|
2988
|
+
background: radial-gradient(
|
|
2989
|
+
31.57% 32.06% at 50.1% 49.9%,
|
|
2990
|
+
#ff8c28,
|
|
2991
|
+
rgba(191, 9, 255, 0.1) 100%
|
|
2992
|
+
);
|
|
2993
|
+
}
|
|
2994
|
+
&:after {
|
|
2995
|
+
right: -22px;
|
|
2996
|
+
top: -140px;
|
|
2997
|
+
width: 225px;
|
|
2998
|
+
height: 190px;
|
|
2999
|
+
background: radial-gradient(
|
|
3000
|
+
41.57% 62.06% at 53.1% 49.9%,
|
|
3001
|
+
rgb(255 119 0),
|
|
3002
|
+
rgb(255 106 9 / 55%) 100%
|
|
3003
|
+
);
|
|
3004
|
+
}
|
|
3005
|
+
`;
|
|
3006
|
+
|
|
2328
3007
|
// src/components/LightboxImage.tsx
|
|
2329
|
-
var
|
|
2330
|
-
var
|
|
2331
|
-
var
|
|
3008
|
+
var import_styled15 = __toESM(require("@emotion/styled"), 1);
|
|
3009
|
+
var import_react16 = require("react");
|
|
3010
|
+
var import_jsx_runtime16 = require("@emotion/react/jsx-runtime");
|
|
2332
3011
|
var LightboxImage = ({ children }) => {
|
|
2333
|
-
const [isOpen, setIsOpen] = (0,
|
|
2334
|
-
const [boundingRect, setBoundingRect] = (0,
|
|
3012
|
+
const [isOpen, setIsOpen] = (0, import_react16.useState)(false);
|
|
3013
|
+
const [boundingRect, setBoundingRect] = (0, import_react16.useState)({
|
|
2335
3014
|
x: 0,
|
|
2336
3015
|
y: 0,
|
|
2337
3016
|
width: 0,
|
|
2338
3017
|
height: 0
|
|
2339
3018
|
});
|
|
2340
|
-
const imageRef = (0,
|
|
3019
|
+
const imageRef = (0, import_react16.useRef)(null);
|
|
2341
3020
|
const handleMouseUp = () => {
|
|
2342
3021
|
setIsOpen(!isOpen);
|
|
2343
3022
|
};
|
|
@@ -2353,12 +3032,12 @@ var LightboxImage = ({ children }) => {
|
|
|
2353
3032
|
});
|
|
2354
3033
|
}
|
|
2355
3034
|
};
|
|
2356
|
-
(0,
|
|
3035
|
+
(0, import_react16.useEffect)(() => {
|
|
2357
3036
|
handleSetBoundingRect(imageRef);
|
|
2358
3037
|
}, [imageRef]);
|
|
2359
|
-
return /* @__PURE__ */ (0,
|
|
2360
|
-
/* @__PURE__ */ (0,
|
|
2361
|
-
/* @__PURE__ */ (0,
|
|
3038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
3039
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DummyImage, { isOpen, boundingRect }),
|
|
3040
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2362
3041
|
StyledImage,
|
|
2363
3042
|
{
|
|
2364
3043
|
isOpen,
|
|
@@ -2369,13 +3048,13 @@ var LightboxImage = ({ children }) => {
|
|
|
2369
3048
|
children
|
|
2370
3049
|
}
|
|
2371
3050
|
),
|
|
2372
|
-
/* @__PURE__ */ (0,
|
|
3051
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Lightbox, { isOpen, onClick: handleMouseUp })
|
|
2373
3052
|
] });
|
|
2374
3053
|
};
|
|
2375
|
-
var DummyImage =
|
|
3054
|
+
var DummyImage = import_styled15.default.div`
|
|
2376
3055
|
${(props) => props.isOpen ? `height: ${props.boundingRect.height}px; width: ${props.boundingRect.width}px;` : ``}
|
|
2377
3056
|
`;
|
|
2378
|
-
var StyledImage =
|
|
3057
|
+
var StyledImage = import_styled15.default.div`
|
|
2379
3058
|
display: flex;
|
|
2380
3059
|
justify-content: start;
|
|
2381
3060
|
align-items: center;
|
|
@@ -2423,7 +3102,7 @@ var StyledImage = import_styled11.default.div`
|
|
|
2423
3102
|
}
|
|
2424
3103
|
}
|
|
2425
3104
|
`;
|
|
2426
|
-
var Lightbox =
|
|
3105
|
+
var Lightbox = import_styled15.default.div`
|
|
2427
3106
|
transition: opacity 0.2s ease-out;
|
|
2428
3107
|
position: fixed;
|
|
2429
3108
|
opacity: 0;
|
|
@@ -2446,11 +3125,11 @@ var Lightbox = import_styled11.default.div`
|
|
|
2446
3125
|
`;
|
|
2447
3126
|
|
|
2448
3127
|
// src/components/LightsparkProvider.tsx
|
|
2449
|
-
var
|
|
3128
|
+
var import_react19 = require("@emotion/react");
|
|
2450
3129
|
|
|
2451
3130
|
// src/styles/global.tsx
|
|
2452
|
-
var
|
|
2453
|
-
var
|
|
3131
|
+
var import_react17 = require("@emotion/react");
|
|
3132
|
+
var import_react18 = require("react");
|
|
2454
3133
|
var import_react_tooltip2 = require("react-tooltip/dist/react-tooltip.css");
|
|
2455
3134
|
var import_fonts = require("../static/fonts.css");
|
|
2456
3135
|
|
|
@@ -2460,8 +3139,8 @@ var cssVars = {
|
|
|
2460
3139
|
};
|
|
2461
3140
|
|
|
2462
3141
|
// src/styles/global.tsx
|
|
2463
|
-
var
|
|
2464
|
-
var globalComponentStyles = ({ theme }) =>
|
|
3142
|
+
var import_jsx_runtime17 = require("@emotion/react/jsx-runtime");
|
|
3143
|
+
var globalComponentStyles = ({ theme }) => import_react17.css`
|
|
2465
3144
|
@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
|
|
2466
3145
|
|
|
2467
3146
|
html {
|
|
@@ -2536,9 +3215,9 @@ var globalComponentStyles = ({ theme }) => import_react12.css`
|
|
|
2536
3215
|
}
|
|
2537
3216
|
`;
|
|
2538
3217
|
function GlobalStyles() {
|
|
2539
|
-
const theme = (0,
|
|
3218
|
+
const theme = (0, import_react17.useTheme)();
|
|
2540
3219
|
const bg = useThemeBg();
|
|
2541
|
-
(0,
|
|
3220
|
+
(0, import_react18.useEffect)(() => {
|
|
2542
3221
|
const documentHeight = () => {
|
|
2543
3222
|
const doc = document.documentElement;
|
|
2544
3223
|
doc.style.setProperty(cssVars.docHeight, `${window.innerHeight}px`);
|
|
@@ -2547,12 +3226,14 @@ function GlobalStyles() {
|
|
|
2547
3226
|
documentHeight();
|
|
2548
3227
|
return () => window.removeEventListener("resize", documentHeight);
|
|
2549
3228
|
}, []);
|
|
2550
|
-
const globalStyles =
|
|
3229
|
+
const globalStyles = import_react17.css`
|
|
2551
3230
|
${globalComponentStyles({ theme })}
|
|
2552
3231
|
|
|
2553
3232
|
:root {
|
|
2554
3233
|
${cssVars.docHeight}: 100vh;
|
|
2555
3234
|
--rt-opacity: 1 !important;
|
|
3235
|
+
--rt-transition-show-delay: 0.15s !important;
|
|
3236
|
+
--rt-transition-closing-delay: 0.2s !important;
|
|
2556
3237
|
}
|
|
2557
3238
|
|
|
2558
3239
|
html {
|
|
@@ -2572,29 +3253,29 @@ function GlobalStyles() {
|
|
|
2572
3253
|
height: 100%;
|
|
2573
3254
|
}
|
|
2574
3255
|
`;
|
|
2575
|
-
return /* @__PURE__ */ (0,
|
|
3256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react17.Global, { styles: globalStyles });
|
|
2576
3257
|
}
|
|
2577
3258
|
|
|
2578
3259
|
// src/components/LightsparkProvider.tsx
|
|
2579
|
-
var
|
|
3260
|
+
var import_jsx_runtime18 = require("@emotion/react/jsx-runtime");
|
|
2580
3261
|
function LightsparkProvider({ children }) {
|
|
2581
|
-
return /* @__PURE__ */ (0,
|
|
2582
|
-
/* @__PURE__ */ (0,
|
|
3262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react19.ThemeProvider, { theme: themes.light, children: [
|
|
3263
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(GlobalStyles, {}),
|
|
2583
3264
|
children
|
|
2584
3265
|
] });
|
|
2585
3266
|
}
|
|
2586
3267
|
|
|
2587
3268
|
// src/components/Modal.tsx
|
|
2588
|
-
var
|
|
2589
|
-
var
|
|
2590
|
-
var
|
|
3269
|
+
var import_styled17 = __toESM(require("@emotion/styled"), 1);
|
|
3270
|
+
var import_react23 = __toESM(require("react"), 1);
|
|
3271
|
+
var import_react_dom2 = __toESM(require("react-dom"), 1);
|
|
2591
3272
|
|
|
2592
3273
|
// src/hooks/useLiveRef.tsx
|
|
2593
|
-
var
|
|
3274
|
+
var import_react20 = require("react");
|
|
2594
3275
|
function useLiveRef() {
|
|
2595
|
-
const [ready, setReady] = (0,
|
|
2596
|
-
const ref = (0,
|
|
2597
|
-
const refCb = (0,
|
|
3276
|
+
const [ready, setReady] = (0, import_react20.useState)(false);
|
|
3277
|
+
const ref = (0, import_react20.useRef)(null);
|
|
3278
|
+
const refCb = (0, import_react20.useCallback)((node) => {
|
|
2598
3279
|
if (node !== null) {
|
|
2599
3280
|
ref.current = node;
|
|
2600
3281
|
setReady(true);
|
|
@@ -2604,8 +3285,8 @@ function useLiveRef() {
|
|
|
2604
3285
|
}
|
|
2605
3286
|
|
|
2606
3287
|
// src/utils/toReactNodes.tsx
|
|
2607
|
-
var
|
|
2608
|
-
var
|
|
3288
|
+
var import_react21 = require("react");
|
|
3289
|
+
var import_jsx_runtime19 = require("@emotion/react/jsx-runtime");
|
|
2609
3290
|
var ToReactNodesTypes = {
|
|
2610
3291
|
Link: "link"
|
|
2611
3292
|
};
|
|
@@ -2613,22 +3294,22 @@ function toReactNodes(toReactNodesArg) {
|
|
|
2613
3294
|
const toReactNodesArray = Array.isArray(toReactNodesArg) ? toReactNodesArg : [toReactNodesArg];
|
|
2614
3295
|
const reactNodes = toReactNodesArray.map((node, i) => {
|
|
2615
3296
|
if (typeof node === "string") {
|
|
2616
|
-
return /* @__PURE__ */ (0,
|
|
3297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react21.Fragment, { children: node.split("\n").map((str, j, strArr) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react21.Fragment, { children: [
|
|
2617
3298
|
str,
|
|
2618
|
-
j < strArr.length - 1 && /* @__PURE__ */ (0,
|
|
3299
|
+
j < strArr.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("br", {})
|
|
2619
3300
|
] }, `str-${i}-break-${j}`)) }, `str-${i}`);
|
|
2620
3301
|
} else if (node.type === ToReactNodesTypes.Link) {
|
|
2621
|
-
return /* @__PURE__ */ (0,
|
|
3302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Link, { to: node.to, children: node.text }, `link-${i}`);
|
|
2622
3303
|
}
|
|
2623
3304
|
return null;
|
|
2624
3305
|
});
|
|
2625
|
-
return /* @__PURE__ */ (0,
|
|
3306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react21.Fragment, { children: reactNodes });
|
|
2626
3307
|
}
|
|
2627
3308
|
|
|
2628
3309
|
// src/components/ProgressBar.tsx
|
|
2629
|
-
var
|
|
2630
|
-
var
|
|
2631
|
-
var
|
|
3310
|
+
var import_styled16 = __toESM(require("@emotion/styled"), 1);
|
|
3311
|
+
var import_react22 = require("react");
|
|
3312
|
+
var import_jsx_runtime20 = require("@emotion/react/jsx-runtime");
|
|
2632
3313
|
var defaultProps2 = {
|
|
2633
3314
|
isSm: false,
|
|
2634
3315
|
stepDuration: 0.5
|
|
@@ -2639,8 +3320,8 @@ function ProgressBar({
|
|
|
2639
3320
|
isSm = defaultProps2.isSm,
|
|
2640
3321
|
stepDuration = defaultProps2.stepDuration
|
|
2641
3322
|
}) {
|
|
2642
|
-
const [percentage, setPercentage] = (0,
|
|
2643
|
-
(0,
|
|
3323
|
+
const [percentage, setPercentage] = (0, import_react22.useState)(5);
|
|
3324
|
+
(0, import_react22.useEffect)(() => {
|
|
2644
3325
|
if (progressPercentage !== void 0) {
|
|
2645
3326
|
setPercentage(progressPercentage);
|
|
2646
3327
|
} else {
|
|
@@ -2649,7 +3330,7 @@ function ProgressBar({
|
|
|
2649
3330
|
}, 0);
|
|
2650
3331
|
}
|
|
2651
3332
|
}, [progressPercentage]);
|
|
2652
|
-
return /* @__PURE__ */ (0,
|
|
3333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ProgressBarContainer, { isSm, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Bar, { isSm, percentage, stepDuration, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2653
3334
|
BarBg,
|
|
2654
3335
|
{
|
|
2655
3336
|
background,
|
|
@@ -2660,7 +3341,7 @@ function ProgressBar({
|
|
|
2660
3341
|
) }) });
|
|
2661
3342
|
}
|
|
2662
3343
|
ProgressBar.defaultProps = defaultProps2;
|
|
2663
|
-
var ProgressBarContainer =
|
|
3344
|
+
var ProgressBarContainer = import_styled16.default.div`
|
|
2664
3345
|
${standardBorderRadius(16)}
|
|
2665
3346
|
background-color: ${({ theme }) => themeOr(theme.c05Neutral, theme.c1Neutral)({ theme })};
|
|
2666
3347
|
box-sizing: border-box;
|
|
@@ -2670,7 +3351,7 @@ var ProgressBarContainer = import_styled12.default.div`
|
|
|
2670
3351
|
width: 100%;
|
|
2671
3352
|
position: relative;
|
|
2672
3353
|
`;
|
|
2673
|
-
var BarBg =
|
|
3354
|
+
var BarBg = import_styled16.default.div`
|
|
2674
3355
|
${standardBorderRadius(16)}
|
|
2675
3356
|
width: ${({ percentage }) => 100 / percentage * 100}%;
|
|
2676
3357
|
height: 100%;
|
|
@@ -2684,7 +3365,7 @@ var BarBg = import_styled12.default.div`
|
|
|
2684
3365
|
#3f2e7e 115.32%
|
|
2685
3366
|
)`};
|
|
2686
3367
|
`;
|
|
2687
|
-
var Bar =
|
|
3368
|
+
var Bar = import_styled16.default.div`
|
|
2688
3369
|
${standardBorderRadius(16)}
|
|
2689
3370
|
overflow: hidden;
|
|
2690
3371
|
box-sizing: border-box;
|
|
@@ -2696,7 +3377,7 @@ var Bar = import_styled12.default.div`
|
|
|
2696
3377
|
`;
|
|
2697
3378
|
|
|
2698
3379
|
// src/components/Modal.tsx
|
|
2699
|
-
var
|
|
3380
|
+
var import_jsx_runtime21 = require("@emotion/react/jsx-runtime");
|
|
2700
3381
|
function Modal({
|
|
2701
3382
|
visible,
|
|
2702
3383
|
title,
|
|
@@ -2711,31 +3392,31 @@ function Modal({
|
|
|
2711
3392
|
submitDisabled,
|
|
2712
3393
|
submitLoading,
|
|
2713
3394
|
submitText,
|
|
2714
|
-
cancelText,
|
|
3395
|
+
cancelText = "Cancel",
|
|
2715
3396
|
firstFocusRef,
|
|
2716
3397
|
nonDismissable = false,
|
|
2717
3398
|
autoFocus = true,
|
|
2718
3399
|
width = 460,
|
|
2719
3400
|
progressBar
|
|
2720
3401
|
}) {
|
|
2721
|
-
const visibleChangedRef = (0,
|
|
2722
|
-
const nodeRef = (0,
|
|
3402
|
+
const visibleChangedRef = (0, import_react23.useRef)(false);
|
|
3403
|
+
const nodeRef = (0, import_react23.useRef)(null);
|
|
2723
3404
|
const [defaultFirstFocusRef, defaultFirstFocusRefCb] = useLiveRef();
|
|
2724
3405
|
const ref = firstFocusRef || defaultFirstFocusRef;
|
|
2725
|
-
const [nodeReady, setNodeReady] =
|
|
2726
|
-
const overlayRef = (0,
|
|
2727
|
-
const prevFocusedElement = (0,
|
|
2728
|
-
const modalContainerRef = (0,
|
|
3406
|
+
const [nodeReady, setNodeReady] = import_react23.default.useState(false);
|
|
3407
|
+
const overlayRef = (0, import_react23.useRef)(null);
|
|
3408
|
+
const prevFocusedElement = (0, import_react23.useRef)();
|
|
3409
|
+
const modalContainerRef = (0, import_react23.useRef)(null);
|
|
2729
3410
|
const bp2 = useBreakpoints();
|
|
2730
3411
|
const isSm = bp2.current("sm" /* sm */);
|
|
2731
3412
|
const formattedDescription = description ? toReactNodes(description) : null;
|
|
2732
|
-
(0,
|
|
3413
|
+
(0, import_react23.useEffect)(() => {
|
|
2733
3414
|
if (visible !== visibleChangedRef.current) {
|
|
2734
3415
|
visibleChangedRef.current = visible;
|
|
2735
3416
|
}
|
|
2736
3417
|
}, [visible]);
|
|
2737
3418
|
const visibleChanged = visible !== visibleChangedRef.current;
|
|
2738
|
-
(0,
|
|
3419
|
+
(0, import_react23.useEffect)(() => {
|
|
2739
3420
|
prevFocusedElement.current = document.activeElement;
|
|
2740
3421
|
if (!nodeRef.current) {
|
|
2741
3422
|
nodeRef.current = document.createElement("div");
|
|
@@ -2749,7 +3430,7 @@ function Modal({
|
|
|
2749
3430
|
}
|
|
2750
3431
|
};
|
|
2751
3432
|
}, []);
|
|
2752
|
-
(0,
|
|
3433
|
+
(0, import_react23.useEffect)(() => {
|
|
2753
3434
|
const handleOutsideClick = (event) => {
|
|
2754
3435
|
if (visible && overlayRef.current && event.target && overlayRef.current.contains(event.target) && !nonDismissable) {
|
|
2755
3436
|
onClose();
|
|
@@ -2786,7 +3467,7 @@ function Modal({
|
|
|
2786
3467
|
}
|
|
2787
3468
|
};
|
|
2788
3469
|
}, [onClose, visible, nonDismissable]);
|
|
2789
|
-
(0,
|
|
3470
|
+
(0, import_react23.useLayoutEffect)(() => {
|
|
2790
3471
|
if (visible) {
|
|
2791
3472
|
if (visibleChanged) {
|
|
2792
3473
|
prevFocusedElement.current = document.activeElement;
|
|
@@ -2815,9 +3496,9 @@ function Modal({
|
|
|
2815
3496
|
onClose();
|
|
2816
3497
|
}
|
|
2817
3498
|
}
|
|
2818
|
-
const modalContent = /* @__PURE__ */ (0,
|
|
2819
|
-
/* @__PURE__ */ (0,
|
|
2820
|
-
/* @__PURE__ */ (0,
|
|
3499
|
+
const modalContent = /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react23.Fragment, { children: [
|
|
3500
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ModalOverlay, { ref: overlayRef }),
|
|
3501
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2821
3502
|
ModalContainer,
|
|
2822
3503
|
{
|
|
2823
3504
|
"aria-modal": true,
|
|
@@ -2825,30 +3506,30 @@ function Modal({
|
|
|
2825
3506
|
tabIndex: -1,
|
|
2826
3507
|
role: "dialog",
|
|
2827
3508
|
ref: modalContainerRef,
|
|
2828
|
-
children: /* @__PURE__ */ (0,
|
|
2829
|
-
!firstFocusRef && /* @__PURE__ */ (0,
|
|
2830
|
-
!(nonDismissable || ghost) && /* @__PURE__ */ (0,
|
|
2831
|
-
/* @__PURE__ */ (0,
|
|
2832
|
-
progressBar ? /* @__PURE__ */ (0,
|
|
3509
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(ModalContent, { width, ghost, children: [
|
|
3510
|
+
!firstFocusRef && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DefaultFocusTarget, { ref: defaultFirstFocusRefCb }),
|
|
3511
|
+
!(nonDismissable || ghost) && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CloseButton, { onClick: onClickCloseButton, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon, { name: "Close", width: 9 }) }),
|
|
3512
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(ModalContentInner, { ghost, children: [
|
|
3513
|
+
progressBar ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { css: { marginBottom: "20px" }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2833
3514
|
ProgressBar,
|
|
2834
3515
|
{
|
|
2835
3516
|
progressPercentage: progressBar.progressPercentage,
|
|
2836
3517
|
isSm: progressBar.isSm
|
|
2837
3518
|
}
|
|
2838
3519
|
) }) : null,
|
|
2839
|
-
title ? /* @__PURE__ */ (0,
|
|
2840
|
-
formattedDescription ? /* @__PURE__ */ (0,
|
|
2841
|
-
/* @__PURE__ */ (0,
|
|
2842
|
-
onSubmit ? /* @__PURE__ */ (0,
|
|
2843
|
-
!isSm && !cancelHidden && /* @__PURE__ */ (0,
|
|
3520
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h4", { children: title }) : null,
|
|
3521
|
+
formattedDescription ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Description, { children: formattedDescription }) : null,
|
|
3522
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { children }),
|
|
3523
|
+
onSubmit || onCancel ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(ModalButtonRow, { children: [
|
|
3524
|
+
!isSm && !cancelHidden && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2844
3525
|
Button,
|
|
2845
3526
|
{
|
|
2846
3527
|
disabled: cancelDisabled,
|
|
2847
3528
|
onClick: onClickCancel,
|
|
2848
|
-
text: cancelText
|
|
3529
|
+
text: cancelText
|
|
2849
3530
|
}
|
|
2850
3531
|
),
|
|
2851
|
-
/* @__PURE__ */ (0,
|
|
3532
|
+
onSubmit && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2852
3533
|
Button,
|
|
2853
3534
|
{
|
|
2854
3535
|
disabled: submitDisabled,
|
|
@@ -2858,25 +3539,25 @@ function Modal({
|
|
|
2858
3539
|
type: "submit"
|
|
2859
3540
|
}
|
|
2860
3541
|
),
|
|
2861
|
-
isSm && !cancelHidden && /* @__PURE__ */ (0,
|
|
3542
|
+
isSm && !cancelHidden && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Button, { onClick: onClose, text: cancelText })
|
|
2862
3543
|
] }) : null
|
|
2863
3544
|
] })
|
|
2864
3545
|
] })
|
|
2865
3546
|
}
|
|
2866
3547
|
)
|
|
2867
3548
|
] });
|
|
2868
|
-
return visible && nodeReady && nodeRef.current ?
|
|
2869
|
-
onSubmit ? /* @__PURE__ */ (0,
|
|
3549
|
+
return visible && nodeReady && nodeRef.current ? import_react_dom2.default.createPortal(
|
|
3550
|
+
onSubmit ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("form", { onSubmit: onSubmitForm, children: modalContent }) : modalContent,
|
|
2870
3551
|
nodeRef.current
|
|
2871
3552
|
) : null;
|
|
2872
3553
|
}
|
|
2873
|
-
var DefaultFocusTarget = (0,
|
|
3554
|
+
var DefaultFocusTarget = (0, import_styled17.default)(UnstyledButton)`
|
|
2874
3555
|
position: absolute;
|
|
2875
3556
|
top: -30px;
|
|
2876
3557
|
width: 0;
|
|
2877
3558
|
height: 0;
|
|
2878
3559
|
`;
|
|
2879
|
-
var ModalOverlay =
|
|
3560
|
+
var ModalOverlay = import_styled17.default.div`
|
|
2880
3561
|
position: fixed;
|
|
2881
3562
|
bottom: 0;
|
|
2882
3563
|
left: 0;
|
|
@@ -2886,7 +3567,7 @@ var ModalOverlay = import_styled13.default.div`
|
|
|
2886
3567
|
background: rgba(0, 0, 0, 0.5);
|
|
2887
3568
|
backdrop-filter: blur(2px);
|
|
2888
3569
|
`;
|
|
2889
|
-
var ModalContainer =
|
|
3570
|
+
var ModalContainer = import_styled17.default.div`
|
|
2890
3571
|
pointer-events: none;
|
|
2891
3572
|
position: fixed;
|
|
2892
3573
|
top: 0;
|
|
@@ -2901,19 +3582,20 @@ var ModalContainer = import_styled13.default.div`
|
|
|
2901
3582
|
justify-content: center;
|
|
2902
3583
|
align-items: center;
|
|
2903
3584
|
color: ${({ theme }) => theme.text};
|
|
2904
|
-
padding-top: ${
|
|
3585
|
+
padding-top: ${standardContentInset.smPx}px;
|
|
2905
3586
|
`;
|
|
2906
3587
|
var contentTopMarginPx = 24;
|
|
2907
|
-
var Description =
|
|
3588
|
+
var Description = import_styled17.default.div`
|
|
2908
3589
|
color: ${({ theme }) => theme.mcNeutral};
|
|
2909
3590
|
margin-top: 4px;
|
|
2910
3591
|
& + * {
|
|
2911
3592
|
margin-top: ${contentTopMarginPx}px;
|
|
2912
3593
|
}
|
|
2913
3594
|
`;
|
|
2914
|
-
var ModalButtonRow =
|
|
3595
|
+
var ModalButtonRow = import_styled17.default.div`
|
|
2915
3596
|
margin-top: 32px;
|
|
2916
3597
|
${bp.minSm(`display: flex;`)}
|
|
3598
|
+
gap: 10px;
|
|
2917
3599
|
|
|
2918
3600
|
button {
|
|
2919
3601
|
width: 50%;
|
|
@@ -2926,14 +3608,11 @@ var ModalButtonRow = import_styled13.default.div`
|
|
|
2926
3608
|
${bp.sm(`
|
|
2927
3609
|
margin-top: 16px;
|
|
2928
3610
|
`)}
|
|
2929
|
-
${bp.minSm(`
|
|
2930
|
-
margin-left: 10px;
|
|
2931
|
-
`)}
|
|
2932
3611
|
}
|
|
2933
3612
|
`;
|
|
2934
|
-
var ModalContent =
|
|
3613
|
+
var ModalContent = import_styled17.default.div`
|
|
2935
3614
|
${overflowAutoWithoutScrollbars}
|
|
2936
|
-
${
|
|
3615
|
+
${standardContentInset.smCSS}
|
|
2937
3616
|
${standardBorderRadius(16)}
|
|
2938
3617
|
${(props) => props.ghost ? "" : overlaySurface}
|
|
2939
3618
|
pointer-events: auto;
|
|
@@ -2953,12 +3632,12 @@ var ModalContent = import_styled13.default.div`
|
|
|
2953
3632
|
}
|
|
2954
3633
|
}
|
|
2955
3634
|
`;
|
|
2956
|
-
var CloseButton = (0,
|
|
3635
|
+
var CloseButton = (0, import_styled17.default)(UnstyledButton)`
|
|
2957
3636
|
${standardFocusOutline}
|
|
2958
3637
|
width: 24px;
|
|
2959
3638
|
height: 24px;
|
|
2960
3639
|
`;
|
|
2961
|
-
var ModalContentInner =
|
|
3640
|
+
var ModalContentInner = import_styled17.default.div`
|
|
2962
3641
|
${(props) => props.ghost ? "" : "padding: 32px 24px 0;"}
|
|
2963
3642
|
${(props) => props.ghost ? "" : `${bp.sm(`
|
|
2964
3643
|
padding-left: 10px;
|
|
@@ -2966,12 +3645,156 @@ var ModalContentInner = import_styled13.default.div`
|
|
|
2966
3645
|
`)}`}
|
|
2967
3646
|
`;
|
|
2968
3647
|
|
|
3648
|
+
// src/components/Pill.tsx
|
|
3649
|
+
var import_styled18 = __toESM(require("@emotion/styled"), 1);
|
|
3650
|
+
var import_react24 = require("react");
|
|
3651
|
+
var import_jsx_runtime22 = require("@emotion/react/jsx-runtime");
|
|
3652
|
+
function Pill({
|
|
3653
|
+
text,
|
|
3654
|
+
onDeleteMouseDown,
|
|
3655
|
+
onDeleteMouseUp,
|
|
3656
|
+
onDeleteFromKeyboard,
|
|
3657
|
+
icon,
|
|
3658
|
+
loading = false,
|
|
3659
|
+
cursor = "text",
|
|
3660
|
+
isEditing = false,
|
|
3661
|
+
onChangeTextInput = () => {
|
|
3662
|
+
},
|
|
3663
|
+
onFocusTextInput = () => {
|
|
3664
|
+
},
|
|
3665
|
+
onClickPillBody = () => {
|
|
3666
|
+
},
|
|
3667
|
+
onBlurTextInput = () => {
|
|
3668
|
+
}
|
|
3669
|
+
}) {
|
|
3670
|
+
const textInputRef = (0, import_react24.useRef)(null);
|
|
3671
|
+
(0, import_react24.useEffect)(() => {
|
|
3672
|
+
if (isEditing && textInputRef.current) {
|
|
3673
|
+
textInputRef.current.focus();
|
|
3674
|
+
}
|
|
3675
|
+
}, [isEditing]);
|
|
3676
|
+
function handleOnDeleteMouseDown(event) {
|
|
3677
|
+
if (onDeleteMouseDown) {
|
|
3678
|
+
event.stopPropagation();
|
|
3679
|
+
onDeleteMouseDown(event);
|
|
3680
|
+
}
|
|
3681
|
+
}
|
|
3682
|
+
function handleOnDeleteKeyDown(event) {
|
|
3683
|
+
if (onDeleteFromKeyboard) {
|
|
3684
|
+
event.stopPropagation();
|
|
3685
|
+
if (event.key === "Enter") {
|
|
3686
|
+
onDeleteFromKeyboard();
|
|
3687
|
+
}
|
|
3688
|
+
}
|
|
3689
|
+
}
|
|
3690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
3691
|
+
StyledPill,
|
|
3692
|
+
{
|
|
3693
|
+
hasIcon: Boolean(icon || loading || onDeleteMouseDown),
|
|
3694
|
+
cursor,
|
|
3695
|
+
onClick: (event) => {
|
|
3696
|
+
if (onClickPillBody) {
|
|
3697
|
+
event.stopPropagation();
|
|
3698
|
+
onClickPillBody();
|
|
3699
|
+
}
|
|
3700
|
+
},
|
|
3701
|
+
children: [
|
|
3702
|
+
isEditing ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3703
|
+
PillInput,
|
|
3704
|
+
{
|
|
3705
|
+
value: text,
|
|
3706
|
+
onChange: (event) => onChangeTextInput(event.target.value),
|
|
3707
|
+
onFocus: onFocusTextInput,
|
|
3708
|
+
onBlur: onBlurTextInput,
|
|
3709
|
+
ref: textInputRef
|
|
3710
|
+
}
|
|
3711
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PillText, { children: text }),
|
|
3712
|
+
(icon || loading || onDeleteMouseDown) && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
3713
|
+
PillIconContainer,
|
|
3714
|
+
{
|
|
3715
|
+
hasIconInset: Boolean(icon && !loading && !onDeleteMouseDown),
|
|
3716
|
+
children: [
|
|
3717
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Loading, { size: 16.1, center: false, ml: 5 }),
|
|
3718
|
+
!loading && onDeleteMouseDown && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3719
|
+
UnstyledButton,
|
|
3720
|
+
{
|
|
3721
|
+
onMouseDown: handleOnDeleteMouseDown,
|
|
3722
|
+
onKeyDown: handleOnDeleteKeyDown,
|
|
3723
|
+
type: "button",
|
|
3724
|
+
css: {
|
|
3725
|
+
display: "flex",
|
|
3726
|
+
padding: "10px",
|
|
3727
|
+
marginRight: "-10px"
|
|
3728
|
+
},
|
|
3729
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { name: "DeleteIcon", width: 16.1 })
|
|
3730
|
+
}
|
|
3731
|
+
),
|
|
3732
|
+
!loading && icon && !onDeleteMouseDown && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { name: icon, width: 16.1, color: colors.white })
|
|
3733
|
+
]
|
|
3734
|
+
}
|
|
3735
|
+
)
|
|
3736
|
+
]
|
|
3737
|
+
}
|
|
3738
|
+
);
|
|
3739
|
+
}
|
|
3740
|
+
var PillText = import_styled18.default.div`
|
|
3741
|
+
/* For mobile ensure empty values don't prevent div from having height: */
|
|
3742
|
+
height: 1.2rem;
|
|
3743
|
+
min-width: 100px;
|
|
3744
|
+
max-width: 210px;
|
|
3745
|
+
white-space: nowrap;
|
|
3746
|
+
text-overflow: ellipsis;
|
|
3747
|
+
overflow: hidden;
|
|
3748
|
+
font-weight: 600;
|
|
3749
|
+
`;
|
|
3750
|
+
var StyledPill = import_styled18.default.div`
|
|
3751
|
+
* + & {
|
|
3752
|
+
margin-top: 16px;
|
|
3753
|
+
}
|
|
3754
|
+
background-color: ${({ theme }) => theme.c05Neutral};
|
|
3755
|
+
color: ${({ theme }) => theme.text};
|
|
3756
|
+
padding: 12px 18px;
|
|
3757
|
+
${({ hasIcon }) => hasIcon && `padding-right: 48px;`}
|
|
3758
|
+
border-radius: 2em;
|
|
3759
|
+
display: flex;
|
|
3760
|
+
align-items: center;
|
|
3761
|
+
cursor: ${({ cursor }) => cursor};
|
|
3762
|
+
position: relative;
|
|
3763
|
+
`;
|
|
3764
|
+
var PillIconContainer = import_styled18.default.div`
|
|
3765
|
+
${flexCenter}
|
|
3766
|
+
${({ hasIconInset }) => hasIconInset ? `
|
|
3767
|
+
background-color: ${colors.blue43};
|
|
3768
|
+
padding: 8px;
|
|
3769
|
+
right: 4px;
|
|
3770
|
+
top: 3.5px;` : `right: 18px;`}
|
|
3771
|
+
border-radius: 50%;
|
|
3772
|
+
margin-left: 12px;
|
|
3773
|
+
position: absolute;
|
|
3774
|
+
`;
|
|
3775
|
+
var PillInput = import_styled18.default.input`
|
|
3776
|
+
background-color: transparent;
|
|
3777
|
+
border: none;
|
|
3778
|
+
outline: none;
|
|
3779
|
+
color: ${({ theme }) => theme.text};
|
|
3780
|
+
font-weight: 600;
|
|
3781
|
+
font-size: 1rem;
|
|
3782
|
+
padding: 0;
|
|
3783
|
+
margin: 0;
|
|
3784
|
+
width: 100%;
|
|
3785
|
+
max-width: 210px;
|
|
3786
|
+
white-space: nowrap;
|
|
3787
|
+
text-overflow: ellipsis;
|
|
3788
|
+
overflow: hidden;
|
|
3789
|
+
font-family: ${({ theme }) => theme.typography.fontFamilies.main};
|
|
3790
|
+
`;
|
|
3791
|
+
|
|
2969
3792
|
// src/components/SecretContainer.tsx
|
|
2970
|
-
var
|
|
2971
|
-
var
|
|
3793
|
+
var import_styled19 = __toESM(require("@emotion/styled"), 1);
|
|
3794
|
+
var import_jsx_runtime23 = require("@emotion/react/jsx-runtime");
|
|
2972
3795
|
function SecretContainer(props) {
|
|
2973
|
-
return props.secret ? /* @__PURE__ */ (0,
|
|
2974
|
-
/* @__PURE__ */ (0,
|
|
3796
|
+
return props.secret ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(StyledSecretContainer, { hasSecret: true, success: props.success, children: [
|
|
3797
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2975
3798
|
"span",
|
|
2976
3799
|
{
|
|
2977
3800
|
style: {
|
|
@@ -2983,10 +3806,10 @@ function SecretContainer(props) {
|
|
|
2983
3806
|
children: props.secret
|
|
2984
3807
|
}
|
|
2985
3808
|
),
|
|
2986
|
-
/* @__PURE__ */ (0,
|
|
2987
|
-
] }) : /* @__PURE__ */ (0,
|
|
3809
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CopyToClipboardButton, { value: props.secret, isSm: true, ml: 4 })
|
|
3810
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StyledSecretContainer, { hasSecret: false, children: "There are no tokens associated with this account" });
|
|
2988
3811
|
}
|
|
2989
|
-
var StyledSecretContainer =
|
|
3812
|
+
var StyledSecretContainer = import_styled19.default.div`
|
|
2990
3813
|
background-color: ${({ theme, hasSecret, success }) => hasSecret ? success ? theme.success : theme.c05Neutral : theme.bg};
|
|
2991
3814
|
${standardBorderRadius(8)}
|
|
2992
3815
|
padding: 18px 20px;
|
|
@@ -2998,14 +3821,14 @@ var StyledSecretContainer = import_styled14.default.div`
|
|
|
2998
3821
|
`;
|
|
2999
3822
|
|
|
3000
3823
|
// src/components/TextIconAligner.tsx
|
|
3001
|
-
var
|
|
3824
|
+
var import_jsx_runtime24 = require("@emotion/react/jsx-runtime");
|
|
3002
3825
|
function TextIconAligner({
|
|
3003
3826
|
text,
|
|
3004
3827
|
rightIcon,
|
|
3005
3828
|
leftIcon,
|
|
3006
3829
|
onClick
|
|
3007
3830
|
}) {
|
|
3008
|
-
const leftIconNode = leftIcon ? /* @__PURE__ */ (0,
|
|
3831
|
+
const leftIconNode = leftIcon ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3009
3832
|
Icon,
|
|
3010
3833
|
{
|
|
3011
3834
|
name: leftIcon.name,
|
|
@@ -3014,7 +3837,7 @@ function TextIconAligner({
|
|
|
3014
3837
|
color: leftIcon.color
|
|
3015
3838
|
}
|
|
3016
3839
|
) : null;
|
|
3017
|
-
const rightIconNode = rightIcon ? /* @__PURE__ */ (0,
|
|
3840
|
+
const rightIconNode = rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3018
3841
|
Icon,
|
|
3019
3842
|
{
|
|
3020
3843
|
name: rightIcon.name,
|
|
@@ -3023,7 +3846,7 @@ function TextIconAligner({
|
|
|
3023
3846
|
color: rightIcon.color
|
|
3024
3847
|
}
|
|
3025
3848
|
) : null;
|
|
3026
|
-
return /* @__PURE__ */ (0,
|
|
3849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
3027
3850
|
"span",
|
|
3028
3851
|
{
|
|
3029
3852
|
css: {
|
|
@@ -3042,22 +3865,32 @@ function TextIconAligner({
|
|
|
3042
3865
|
}
|
|
3043
3866
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3044
3867
|
0 && (module.exports = {
|
|
3868
|
+
Badge,
|
|
3045
3869
|
Button,
|
|
3046
3870
|
ButtonRow,
|
|
3047
3871
|
ButtonRowContainer,
|
|
3048
3872
|
ButtonSelector,
|
|
3873
|
+
CardPage,
|
|
3874
|
+
CardPageContent,
|
|
3875
|
+
CardPageFullContent,
|
|
3876
|
+
CardPageFullWidth,
|
|
3877
|
+
CardPageRightContentInner,
|
|
3878
|
+
CardPageSubtitle,
|
|
3049
3879
|
Collapsible,
|
|
3050
3880
|
CommandKey,
|
|
3051
3881
|
CopyToClipboardButton,
|
|
3052
3882
|
CurrencyAmount,
|
|
3053
3883
|
CurrencyIcon,
|
|
3884
|
+
GradientCardHeader,
|
|
3054
3885
|
Icon,
|
|
3055
3886
|
IconContainer,
|
|
3887
|
+
LightTooltip,
|
|
3056
3888
|
LightboxImage,
|
|
3057
3889
|
LightsparkProvider,
|
|
3058
3890
|
Loading,
|
|
3059
3891
|
LoadingWrapper,
|
|
3060
3892
|
Modal,
|
|
3893
|
+
Pill,
|
|
3061
3894
|
ProgressBar,
|
|
3062
3895
|
SecretContainer,
|
|
3063
3896
|
StyledButton,
|