@lightsparkdev/ui 0.0.6 → 0.0.8
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 +18 -0
- package/dist/{chunk-JYWYEOM6.js → chunk-2JM7UTAZ.js} +18 -5
- package/dist/{chunk-UO6U7AYM.js → chunk-2YB7653N.js} +1 -1
- package/dist/{chunk-RTUZVKPK.js → chunk-36C653MV.js} +1 -1
- package/dist/{chunk-IQFU7CM5.js → chunk-4KWTXZRY.js} +1 -1
- package/dist/{chunk-CLU2FRJZ.js → chunk-55OQPFLF.js} +1 -1
- package/dist/{chunk-3CZOYF3X.js → chunk-6FHLZM6N.js} +2 -2
- package/dist/{chunk-K7D7A34K.js → chunk-744FBGRP.js} +1 -1
- package/dist/{chunk-FKETYVPP.js → chunk-76Q4BK35.js} +87 -43
- package/dist/{chunk-NGS4OSWT.js → chunk-BAO4T4G5.js} +1 -1
- package/dist/{chunk-NH25O7PC.js → chunk-CW3W2VTZ.js} +1 -1
- package/dist/{chunk-G2PZZFJL.js → chunk-DAVVD7YE.js} +10 -10
- package/dist/{chunk-VBWTKANQ.js → chunk-FN5PM3HQ.js} +6 -6
- package/dist/{chunk-RFGKH3R6.js → chunk-HNVQIY5U.js} +0 -8
- package/dist/{chunk-I74XQIVV.js → chunk-MAMSU2XB.js} +3 -3
- package/dist/chunk-NRXJA2PM.js +67 -0
- package/dist/{chunk-M56R3RJ7.js → chunk-OGSDZTHM.js} +7 -3
- package/dist/chunk-SZVMKB4E.js +222 -0
- package/dist/chunk-U6XT5JKC.js +25 -0
- package/dist/{chunk-WWFDI534.js → chunk-UWN53KLJ.js} +13 -6
- package/dist/{chunk-TAI352I3.js → chunk-VE7J2N47.js} +1 -1
- package/dist/{chunk-NZJCJJH5.js → chunk-VHW2KROZ.js} +1 -1
- package/dist/{chunk-N2RDQJQ5.js → chunk-WTO7C7WA.js} +1 -1
- package/dist/{chunk-23SR7TFO.js → chunk-XAZ6NZ6I.js} +1 -1
- package/dist/chunk-YPB5SA65.js +163 -0
- package/dist/{chunk-SVQELXFK.js → chunk-Z5TPS2BO.js} +1 -1
- package/dist/{chunk-T33SBHYI.js → chunk-ZSUX6RLD.js} +3 -1
- package/dist/{chunk-2WYVO6B2.js → chunk-ZYHA6MJC.js} +1 -1
- package/dist/components/Badge.cjs +1332 -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 +197 -83
- 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 +212 -82
- 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/Collapsible.cjs +0 -30
- package/dist/components/Collapsible.js +4 -5
- package/dist/components/ContentTable.cjs +0 -30
- package/dist/components/ContentTable.js +3 -4
- package/dist/components/CopyToClipboardButton.cjs +123 -41
- package/dist/components/CopyToClipboardButton.js +6 -5
- package/dist/components/CurrencyAmount.cjs +0 -30
- package/dist/components/CurrencyAmount.js +3 -4
- package/dist/components/FileInput.cjs +1945 -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/Icon.cjs +0 -30
- package/dist/components/Icon.js +2 -3
- package/dist/components/LightTooltip.cjs +1414 -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 +3 -33
- package/dist/components/LightsparkProvider.js +3 -4
- package/dist/components/Loading.cjs +0 -30
- package/dist/components/Loading.js +3 -4
- package/dist/components/Modal.cjs +208 -114
- package/dist/components/Modal.js +12 -11
- package/dist/components/Pill.cjs +1703 -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 +0 -32
- package/dist/components/ProgressBar.js +2 -3
- package/dist/components/SecretContainer.cjs +124 -42
- package/dist/components/SecretContainer.js +7 -6
- package/dist/components/TextIconAligner.cjs +0 -30
- package/dist/components/TextIconAligner.js +3 -4
- package/dist/components/UnstyledButton.cjs +0 -30
- package/dist/components/UnstyledButton.js +2 -3
- package/dist/components/documentation/AnchorLinkHeader.cjs +0 -32
- package/dist/components/documentation/AnchorLinkHeader.js +3 -4
- package/dist/components/documentation/index.cjs +0 -32
- package/dist/components/documentation/index.js +3 -4
- package/dist/components/index.cjs +608 -327
- package/dist/components/index.d.cts +5 -1
- package/dist/components/index.d.ts +5 -1
- package/dist/components/index.js +37 -25
- 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/Upload.cjs +22 -11
- package/dist/icons/Upload.js +23 -12
- package/dist/icons/index.cjs +0 -30
- package/dist/icons/index.js +2 -3
- package/dist/router.cjs +7 -3
- package/dist/router.js +1 -1
- package/dist/styles/common.cjs +0 -32
- package/dist/styles/common.d.cts +1 -5
- package/dist/styles/common.d.ts +1 -5
- package/dist/styles/common.js +1 -4
- package/dist/styles/fields.cjs +65 -34
- package/dist/styles/fields.d.cts +8 -2
- package/dist/styles/fields.d.ts +8 -2
- package/dist/styles/fields.js +28 -164
- package/dist/styles/fonts/typography/Article.cjs +0 -30
- package/dist/styles/fonts/typography/Article.js +6 -7
- package/dist/styles/fonts/typography/index.cjs +0 -30
- package/dist/styles/fonts/typography/index.js +11 -12
- package/dist/styles/fonts/typographyTokens.d.cts +4 -1
- package/dist/styles/fonts/typographyTokens.d.ts +4 -1
- package/dist/styles/global.cjs +3 -33
- package/dist/styles/global.js +2 -3
- package/dist/styles/type.cjs +0 -30
- package/dist/styles/type.js +2 -3
- package/dist/styles/utils.cjs +0 -30
- 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 +5 -4
|
@@ -68,7 +68,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
68
68
|
var ButtonRow_exports = {};
|
|
69
69
|
__export(ButtonRow_exports, {
|
|
70
70
|
ButtonRow: () => ButtonRow,
|
|
71
|
-
ButtonRowContainer: () => ButtonRowContainer
|
|
71
|
+
ButtonRowContainer: () => ButtonRowContainer,
|
|
72
|
+
StyledButtonRow: () => StyledButtonRow
|
|
72
73
|
});
|
|
73
74
|
module.exports = __toCommonJS(ButtonRow_exports);
|
|
74
75
|
var import_styled6 = __toESM(require("@emotion/styled"), 1);
|
|
@@ -172,7 +173,6 @@ function inRange(currentBp, assertBp) {
|
|
|
172
173
|
// src/styles/common.tsx
|
|
173
174
|
var import_react4 = require("@emotion/react");
|
|
174
175
|
var import_styled = __toESM(require("@emotion/styled"), 1);
|
|
175
|
-
var import_react_tooltip = require("react-tooltip");
|
|
176
176
|
|
|
177
177
|
// src/styles/colors.tsx
|
|
178
178
|
var import_react3 = require("@emotion/react");
|
|
@@ -1286,32 +1286,6 @@ function hexToRGB(hex) {
|
|
|
1286
1286
|
] : [0, 0, 0];
|
|
1287
1287
|
}
|
|
1288
1288
|
|
|
1289
|
-
// src/styles/z-index.tsx
|
|
1290
|
-
var z = {
|
|
1291
|
-
card: 1,
|
|
1292
|
-
fieldError: 1,
|
|
1293
|
-
textInput: 2,
|
|
1294
|
-
select: 3,
|
|
1295
|
-
selectFocused: 4,
|
|
1296
|
-
walletActionPreviewTopGradient: 1,
|
|
1297
|
-
headerContainer: 99,
|
|
1298
|
-
smBanner: 99,
|
|
1299
|
-
headerTop: 100,
|
|
1300
|
-
navMenu: 100,
|
|
1301
|
-
smNavMenu: 100,
|
|
1302
|
-
navAction: 101,
|
|
1303
|
-
smNavAction: 100,
|
|
1304
|
-
// keep under navDropdown
|
|
1305
|
-
tooltip: 160,
|
|
1306
|
-
notificationBanner: 170,
|
|
1307
|
-
qrReaderVideo: 180,
|
|
1308
|
-
qrReaderOverlay: 181,
|
|
1309
|
-
modalOverlay: 190,
|
|
1310
|
-
modalContainer: 191,
|
|
1311
|
-
dropdown: 192,
|
|
1312
|
-
toast: 200
|
|
1313
|
-
};
|
|
1314
|
-
|
|
1315
1289
|
// src/styles/common.tsx
|
|
1316
1290
|
var rootFontSizePx = 12;
|
|
1317
1291
|
var rootFontSizeRems = rootFontSizePx / 16;
|
|
@@ -1373,8 +1347,25 @@ var Subtext = import_styled.default.div`
|
|
|
1373
1347
|
var darkGradientBg = import_react4.css`
|
|
1374
1348
|
background: ${darkGradient};
|
|
1375
1349
|
`;
|
|
1376
|
-
var
|
|
1377
|
-
|
|
1350
|
+
var overlaySurfaceBorderColor = ({
|
|
1351
|
+
theme,
|
|
1352
|
+
important = false
|
|
1353
|
+
}) => import_react4.css`
|
|
1354
|
+
border-color: ${themeOr(theme.c1Neutral, theme.c3Neutral)({ theme })}
|
|
1355
|
+
${important ? "!important" : ""};
|
|
1356
|
+
`;
|
|
1357
|
+
var overlaySurface = ({
|
|
1358
|
+
theme,
|
|
1359
|
+
important = false
|
|
1360
|
+
}) => import_react4.css`
|
|
1361
|
+
background-color: ${themeOr(colors.white, theme.c1Neutral)({ theme })}
|
|
1362
|
+
${important ? "!important" : ""};
|
|
1363
|
+
border: 0.5px solid ${important ? "!important" : ""};
|
|
1364
|
+
${overlaySurfaceBorderColor({ theme, important })};
|
|
1365
|
+
${themeOr(
|
|
1366
|
+
`box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.08), 0px 1px 4px rgba(0, 0, 0, 0.1) ${important ? "!important" : ""};`,
|
|
1367
|
+
""
|
|
1368
|
+
)({ theme })}
|
|
1378
1369
|
`;
|
|
1379
1370
|
|
|
1380
1371
|
// src/styles/utils.tsx
|
|
@@ -1439,8 +1430,10 @@ var overflowAutoWithoutScrollbars = import_react5.css`
|
|
|
1439
1430
|
`;
|
|
1440
1431
|
|
|
1441
1432
|
// src/components/Button.tsx
|
|
1442
|
-
var
|
|
1433
|
+
var import_react10 = require("@emotion/react");
|
|
1443
1434
|
var import_styled5 = __toESM(require("@emotion/styled"), 1);
|
|
1435
|
+
var import_lodash_es3 = require("lodash-es");
|
|
1436
|
+
var import_react11 = require("react");
|
|
1444
1437
|
|
|
1445
1438
|
// src/router.tsx
|
|
1446
1439
|
var import_lodash_es2 = require("lodash-es");
|
|
@@ -1481,32 +1474,36 @@ function Link({
|
|
|
1481
1474
|
externalLink,
|
|
1482
1475
|
params,
|
|
1483
1476
|
children,
|
|
1484
|
-
css:
|
|
1477
|
+
css: css7,
|
|
1485
1478
|
onClick,
|
|
1486
1479
|
className,
|
|
1487
1480
|
hash = null,
|
|
1488
1481
|
blue = false,
|
|
1489
1482
|
newTab = false
|
|
1490
1483
|
}) {
|
|
1491
|
-
if (!isString(to) && !externalLink) {
|
|
1492
|
-
throw new Error(
|
|
1484
|
+
if (!isString(to) && !externalLink && !onClick) {
|
|
1485
|
+
throw new Error(
|
|
1486
|
+
"Link must have either `to` or `externalLink` or `onClick` defined"
|
|
1487
|
+
);
|
|
1493
1488
|
}
|
|
1494
1489
|
let toStr;
|
|
1495
1490
|
if (isString(to)) {
|
|
1496
1491
|
toStr = replaceParams(to, params);
|
|
1497
1492
|
toStr += hash ? `#${hash}` : "";
|
|
1498
|
-
} else {
|
|
1493
|
+
} else if (externalLink) {
|
|
1499
1494
|
const definedExternalLink = externalLink;
|
|
1500
1495
|
if (!definedExternalLink.startsWith("http")) {
|
|
1501
1496
|
throw new Error("Link's externalLink must start with http");
|
|
1502
1497
|
}
|
|
1503
1498
|
toStr = definedExternalLink;
|
|
1499
|
+
} else {
|
|
1500
|
+
toStr = "#";
|
|
1504
1501
|
}
|
|
1505
1502
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1506
1503
|
import_react_router_dom.Link,
|
|
1507
1504
|
{
|
|
1508
1505
|
to: toStr,
|
|
1509
|
-
css:
|
|
1506
|
+
css: css7,
|
|
1510
1507
|
onClick,
|
|
1511
1508
|
className,
|
|
1512
1509
|
style: { color: blue ? colors.blue43 : "inherit" },
|
|
@@ -1596,9 +1593,90 @@ var IconContainer = import_styled2.default.span`
|
|
|
1596
1593
|
`}
|
|
1597
1594
|
`;
|
|
1598
1595
|
|
|
1596
|
+
// src/components/LightTooltip.tsx
|
|
1597
|
+
var import_css = require("@emotion/css");
|
|
1598
|
+
var import_react8 = require("@emotion/react");
|
|
1599
|
+
var import_react9 = __toESM(require("react"), 1);
|
|
1600
|
+
var import_react_dom = __toESM(require("react-dom"), 1);
|
|
1601
|
+
var import_react_tooltip = require("react-tooltip");
|
|
1602
|
+
|
|
1603
|
+
// src/styles/z-index.tsx
|
|
1604
|
+
var z = {
|
|
1605
|
+
card: 1,
|
|
1606
|
+
fieldError: 1,
|
|
1607
|
+
textInput: 2,
|
|
1608
|
+
select: 3,
|
|
1609
|
+
selectFocused: 4,
|
|
1610
|
+
walletActionPreviewTopGradient: 1,
|
|
1611
|
+
headerContainer: 99,
|
|
1612
|
+
smBanner: 99,
|
|
1613
|
+
headerTop: 100,
|
|
1614
|
+
navMenu: 100,
|
|
1615
|
+
smNavMenu: 100,
|
|
1616
|
+
navAction: 101,
|
|
1617
|
+
smNavAction: 100,
|
|
1618
|
+
// keep under navDropdown
|
|
1619
|
+
notificationBanner: 170,
|
|
1620
|
+
qrReaderVideo: 180,
|
|
1621
|
+
qrReaderOverlay: 181,
|
|
1622
|
+
modalOverlay: 190,
|
|
1623
|
+
modalContainer: 191,
|
|
1624
|
+
dropdown: 192,
|
|
1625
|
+
tooltip: 193,
|
|
1626
|
+
toast: 200
|
|
1627
|
+
};
|
|
1628
|
+
|
|
1629
|
+
// src/components/LightTooltip.tsx
|
|
1630
|
+
var import_jsx_runtime4 = require("@emotion/react/jsx-runtime");
|
|
1631
|
+
function LightTooltip(props) {
|
|
1632
|
+
const nodeRef = (0, import_react9.useRef)(null);
|
|
1633
|
+
const [nodeReady, setNodeReady] = import_react9.default.useState(false);
|
|
1634
|
+
(0, import_react9.useEffect)(() => {
|
|
1635
|
+
if (!nodeRef.current) {
|
|
1636
|
+
nodeRef.current = document.createElement("div");
|
|
1637
|
+
document.body.appendChild(nodeRef.current);
|
|
1638
|
+
}
|
|
1639
|
+
setNodeReady(true);
|
|
1640
|
+
return () => {
|
|
1641
|
+
if (nodeRef.current) {
|
|
1642
|
+
document.body.removeChild(nodeRef.current);
|
|
1643
|
+
nodeRef.current = null;
|
|
1644
|
+
}
|
|
1645
|
+
};
|
|
1646
|
+
}, []);
|
|
1647
|
+
const theme = (0, import_react8.useTheme)();
|
|
1648
|
+
console.log("LightTooltip.tsx: tooltipProps:", props);
|
|
1649
|
+
return nodeReady && nodeRef.current ? import_react_dom.default.createPortal(
|
|
1650
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1651
|
+
import_react_tooltip.Tooltip,
|
|
1652
|
+
__spreadProps(__spreadValues({}, props), {
|
|
1653
|
+
id: props.id || "",
|
|
1654
|
+
content: props.content || "",
|
|
1655
|
+
noArrow: true,
|
|
1656
|
+
border: "0.05rem solid rgba(0, 0, 0, 0.1)",
|
|
1657
|
+
className: styles({ theme }),
|
|
1658
|
+
variant: "light",
|
|
1659
|
+
delayShow: 180
|
|
1660
|
+
})
|
|
1661
|
+
),
|
|
1662
|
+
nodeRef.current
|
|
1663
|
+
) : null;
|
|
1664
|
+
}
|
|
1665
|
+
var styles = ({ theme }) => import_css.css`
|
|
1666
|
+
font-size: "10px",
|
|
1667
|
+
color: ${theme.c2Neutral};
|
|
1668
|
+
border-radius: 8px !important;
|
|
1669
|
+
padding: 16px !important;
|
|
1670
|
+
z-index: ${z.tooltip};
|
|
1671
|
+
${overlaySurface({ theme, important: true })};
|
|
1672
|
+
|
|
1673
|
+
max-width: 260px;
|
|
1674
|
+
box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.10), 0px 4px 8px 0px rgba(0, 0, 0, 0.08) !important;
|
|
1675
|
+
`;
|
|
1676
|
+
|
|
1599
1677
|
// src/components/Loading.tsx
|
|
1600
1678
|
var import_styled3 = __toESM(require("@emotion/styled"), 1);
|
|
1601
|
-
var
|
|
1679
|
+
var import_jsx_runtime5 = require("@emotion/react/jsx-runtime");
|
|
1602
1680
|
var defaultProps = {
|
|
1603
1681
|
size: 60,
|
|
1604
1682
|
center: true,
|
|
@@ -1609,7 +1687,7 @@ function Loading({
|
|
|
1609
1687
|
size: size2 = defaultProps.size,
|
|
1610
1688
|
ml = defaultProps.ml
|
|
1611
1689
|
}) {
|
|
1612
|
-
return /* @__PURE__ */ (0,
|
|
1690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(LoadingWrapper, { center, ml, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Rotate, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { name: "LoadingSpinner", width: size2 }) }) });
|
|
1613
1691
|
}
|
|
1614
1692
|
Loading.defaultProps = defaultProps;
|
|
1615
1693
|
var LoadingWrapper = import_styled3.default.div`
|
|
@@ -1663,7 +1741,7 @@ var UnstyledButton = import_styled4.default.button`
|
|
|
1663
1741
|
`;
|
|
1664
1742
|
|
|
1665
1743
|
// src/components/Button.tsx
|
|
1666
|
-
var
|
|
1744
|
+
var import_jsx_runtime6 = require("@emotion/react/jsx-runtime");
|
|
1667
1745
|
function getTextColor({ color, theme, primary: primary2, blue }) {
|
|
1668
1746
|
if (color) {
|
|
1669
1747
|
return color;
|
|
@@ -1698,12 +1776,37 @@ function getBackgroundColor({
|
|
|
1698
1776
|
}
|
|
1699
1777
|
return themeOr(colors.white, theme.c1Neutral)({ theme });
|
|
1700
1778
|
}
|
|
1701
|
-
|
|
1702
|
-
|
|
1779
|
+
var paddingsY = {
|
|
1780
|
+
lg: 14,
|
|
1781
|
+
md: 9,
|
|
1782
|
+
sm: 6
|
|
1783
|
+
};
|
|
1784
|
+
var roundPaddingsX = {
|
|
1785
|
+
lg: 19,
|
|
1786
|
+
md: 14,
|
|
1787
|
+
sm: 10
|
|
1788
|
+
};
|
|
1789
|
+
var paddingsX = {
|
|
1790
|
+
lg: 24,
|
|
1791
|
+
md: 18,
|
|
1792
|
+
sm: 16
|
|
1793
|
+
};
|
|
1794
|
+
function getPaddingX({
|
|
1795
|
+
size: size2,
|
|
1796
|
+
ghost,
|
|
1797
|
+
isRound
|
|
1798
|
+
}) {
|
|
1799
|
+
return ghost ? 0 : isRound ? roundPaddingsX[size2] : paddingsX[size2];
|
|
1703
1800
|
}
|
|
1704
|
-
function getPadding({
|
|
1705
|
-
|
|
1706
|
-
|
|
1801
|
+
function getPadding({
|
|
1802
|
+
iconWidth,
|
|
1803
|
+
size: size2,
|
|
1804
|
+
ghost,
|
|
1805
|
+
iconSide,
|
|
1806
|
+
isRound
|
|
1807
|
+
}) {
|
|
1808
|
+
const paddingY = ghost ? 0 : paddingsY[size2];
|
|
1809
|
+
const paddingX = getPaddingX({ size: size2, ghost, isRound });
|
|
1707
1810
|
const paddingForIcon = iconWidth && !ghost ? iconWidth : 0;
|
|
1708
1811
|
return `${paddingY}px ${paddingX + (iconSide === "right" ? paddingForIcon : 0)}px ${paddingY}px ${paddingX + (iconSide === "left" ? paddingForIcon : 0)}px`;
|
|
1709
1812
|
}
|
|
@@ -1752,40 +1855,46 @@ function Button({
|
|
|
1752
1855
|
type = "button",
|
|
1753
1856
|
blue = false,
|
|
1754
1857
|
newTab = false,
|
|
1755
|
-
zIndex = void 0
|
|
1858
|
+
zIndex = void 0,
|
|
1859
|
+
tooltipText
|
|
1756
1860
|
}) {
|
|
1861
|
+
const tooltipId = (0, import_react11.useRef)((0, import_lodash_es3.uniqueId)());
|
|
1757
1862
|
const iconMarginRight = 6;
|
|
1758
1863
|
const iconSize = size2 === "lg" ? 16 : 12;
|
|
1759
1864
|
let currentIcon = null;
|
|
1760
1865
|
if (loading) {
|
|
1761
|
-
currentIcon = /* @__PURE__ */ (0,
|
|
1866
|
+
currentIcon = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ButtonIcon, { ghost, iconSide, text, size: size2, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Loading, { size: iconSize, center: false }) });
|
|
1762
1867
|
} else if (icon) {
|
|
1763
|
-
currentIcon = /* @__PURE__ */ (0,
|
|
1868
|
+
currentIcon = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ButtonIcon, { ghost, iconSide, text, size: size2, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { name: icon, width: iconSize }) });
|
|
1764
1869
|
}
|
|
1765
|
-
const content = /* @__PURE__ */ (0,
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1870
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react11.Fragment, { children: [
|
|
1871
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1872
|
+
"div",
|
|
1873
|
+
__spreadProps(__spreadValues({}, tooltipText ? { "data-tooltip-id": tooltipId.current } : {}), {
|
|
1874
|
+
css: {
|
|
1875
|
+
display: "flex",
|
|
1876
|
+
alignItems: "center",
|
|
1877
|
+
justifyContent: "center"
|
|
1878
|
+
},
|
|
1879
|
+
children: [
|
|
1880
|
+
iconSide === "left" && currentIcon,
|
|
1881
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1882
|
+
"div",
|
|
1883
|
+
{
|
|
1884
|
+
css: {
|
|
1885
|
+
textOverflow: "ellipsis",
|
|
1886
|
+
overflow: "hidden"
|
|
1887
|
+
},
|
|
1888
|
+
children: text
|
|
1889
|
+
}
|
|
1890
|
+
),
|
|
1891
|
+
iconSide === "right" && currentIcon
|
|
1892
|
+
]
|
|
1893
|
+
})
|
|
1894
|
+
),
|
|
1895
|
+
tooltipText ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(LightTooltip, { id: tooltipId.current, content: tooltipText }) : null
|
|
1896
|
+
] });
|
|
1897
|
+
const isSingleCharRoundButton = Boolean(text && text.length === 1 && !icon);
|
|
1789
1898
|
const commonProps = {
|
|
1790
1899
|
backgroundColor,
|
|
1791
1900
|
color,
|
|
@@ -1798,6 +1907,7 @@ function Button({
|
|
|
1798
1907
|
fullWidth,
|
|
1799
1908
|
blue,
|
|
1800
1909
|
iconSide,
|
|
1910
|
+
isRound: isSingleCharRoundButton,
|
|
1801
1911
|
iconWidth: currentIcon ? iconSize + iconMarginRight : 0,
|
|
1802
1912
|
isLoading: loading,
|
|
1803
1913
|
disabled: disabled || loading,
|
|
@@ -1810,11 +1920,10 @@ function Button({
|
|
|
1810
1920
|
zIndex
|
|
1811
1921
|
};
|
|
1812
1922
|
if (to) {
|
|
1813
|
-
return /* @__PURE__ */ (0,
|
|
1923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ButtonLink, __spreadProps(__spreadValues({}, commonProps), { to, params: toParams, hash, children: content }));
|
|
1814
1924
|
}
|
|
1815
|
-
return href ? /* @__PURE__ */ (0,
|
|
1925
|
+
return href ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ButtonHrefLink, __spreadProps(__spreadValues({}, commonProps), { href, target: "_blank", children: content })) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StyledButton, __spreadProps(__spreadValues({}, commonProps), { children: content }));
|
|
1816
1926
|
}
|
|
1817
|
-
var hPaddingPx = 24;
|
|
1818
1927
|
var buttonStyle = ({
|
|
1819
1928
|
color,
|
|
1820
1929
|
backgroundColor,
|
|
@@ -1830,8 +1939,9 @@ var buttonStyle = ({
|
|
|
1830
1939
|
blue,
|
|
1831
1940
|
text,
|
|
1832
1941
|
zIndex,
|
|
1833
|
-
iconSide
|
|
1834
|
-
|
|
1942
|
+
iconSide,
|
|
1943
|
+
isRound
|
|
1944
|
+
}) => import_react10.css`
|
|
1835
1945
|
display: inline-flex;
|
|
1836
1946
|
opacity: ${disabled && !isLoading ? 0.2 : 1};
|
|
1837
1947
|
transition: opacity 0.2s;
|
|
@@ -1867,8 +1977,15 @@ var buttonStyle = ({
|
|
|
1867
1977
|
primary: primary2,
|
|
1868
1978
|
blue
|
|
1869
1979
|
})};
|
|
1870
|
-
border-radius: 32px;
|
|
1871
|
-
padding: ${getPadding({
|
|
1980
|
+
border-radius: ${isRound ? "100%" : "32px"};
|
|
1981
|
+
padding: ${getPadding({
|
|
1982
|
+
size: size2,
|
|
1983
|
+
iconWidth,
|
|
1984
|
+
text,
|
|
1985
|
+
ghost,
|
|
1986
|
+
iconSide,
|
|
1987
|
+
isRound
|
|
1988
|
+
})};
|
|
1872
1989
|
color: ${getTextColor({ color, theme, primary: primary2, blue })};
|
|
1873
1990
|
transition:
|
|
1874
1991
|
background-color 0.2s ease-out,
|
|
@@ -1881,7 +1998,7 @@ var buttonStyle = ({
|
|
|
1881
1998
|
`;
|
|
1882
1999
|
var ButtonIcon = import_styled5.default.div`
|
|
1883
2000
|
${(props) => props.ghost ? "" : "position: absolute;"}
|
|
1884
|
-
${({ iconSide, ghost, text, size: size2 }) => `${iconSide}: ${ghost && text ? 0 : getPaddingX({ size: size2, ghost })}px;`}
|
|
2001
|
+
${({ iconSide, ghost, text, size: size2 }) => `${iconSide}: ${ghost && text ? 0 : getPaddingX({ size: size2, ghost, isRound: false })}px;`}
|
|
1885
2002
|
`;
|
|
1886
2003
|
var StyledButton = (0, import_styled5.default)(UnstyledButton)`
|
|
1887
2004
|
${(props) => buttonStyle(props)}
|
|
@@ -1894,14 +2011,16 @@ var ButtonHrefLink = import_styled5.default.a`
|
|
|
1894
2011
|
`;
|
|
1895
2012
|
|
|
1896
2013
|
// src/components/ButtonRow.tsx
|
|
1897
|
-
var
|
|
2014
|
+
var import_jsx_runtime7 = require("@emotion/react/jsx-runtime");
|
|
1898
2015
|
function ButtonRow({
|
|
1899
2016
|
buttons,
|
|
1900
2017
|
className,
|
|
1901
2018
|
smSticky = true,
|
|
1902
2019
|
headerHeight = 0
|
|
1903
2020
|
}) {
|
|
1904
|
-
return /* @__PURE__ */ (0,
|
|
2021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ButtonRowContainer, { smSticky, headerHeight, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(StyledButtonRow, { className, children: buttons.map(
|
|
2022
|
+
(button, idx) => button === "divider" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ButtonRowDivider, {}, idx) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Button, __spreadValues({}, button), idx)
|
|
2023
|
+
) }) });
|
|
1905
2024
|
}
|
|
1906
2025
|
var ButtonRowContainer = import_styled6.default.div`
|
|
1907
2026
|
max-width: 100%;
|
|
@@ -1931,6 +2050,11 @@ var ButtonRowContainer = import_styled6.default.div`
|
|
|
1931
2050
|
`
|
|
1932
2051
|
)}
|
|
1933
2052
|
`;
|
|
2053
|
+
var ButtonRowDivider = import_styled6.default.div`
|
|
2054
|
+
border-left: 1px #d9d9d9 solid;
|
|
2055
|
+
margin-left: 16px;
|
|
2056
|
+
padding-left: 16px;
|
|
2057
|
+
`;
|
|
1934
2058
|
var StyledButtonRow = import_styled6.default.div`
|
|
1935
2059
|
${overflowAutoWithoutScrollbars}
|
|
1936
2060
|
background: ${({ theme }) => theme.bg};
|
|
@@ -1943,6 +2067,11 @@ var StyledButtonRow = import_styled6.default.div`
|
|
|
1943
2067
|
margin-left: 8px;
|
|
1944
2068
|
}
|
|
1945
2069
|
|
|
2070
|
+
& ${ButtonRowDivider} + button,
|
|
2071
|
+
& ${ButtonRowDivider} + a {
|
|
2072
|
+
margin-left: 0;
|
|
2073
|
+
}
|
|
2074
|
+
|
|
1946
2075
|
${bp.sm(`
|
|
1947
2076
|
padding: 12px;
|
|
1948
2077
|
`)}
|
|
@@ -1950,5 +2079,6 @@ var StyledButtonRow = import_styled6.default.div`
|
|
|
1950
2079
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1951
2080
|
0 && (module.exports = {
|
|
1952
2081
|
ButtonRow,
|
|
1953
|
-
ButtonRowContainer
|
|
2082
|
+
ButtonRowContainer,
|
|
2083
|
+
StyledButtonRow
|
|
1954
2084
|
});
|
|
@@ -7,7 +7,7 @@ import '../router.cjs';
|
|
|
7
7
|
import 'react-router-dom';
|
|
8
8
|
|
|
9
9
|
type ButtonRowProps<RoutesType extends string> = {
|
|
10
|
-
buttons: ButtonProps<RoutesType>[];
|
|
10
|
+
buttons: (ButtonProps<RoutesType> | "divider")[];
|
|
11
11
|
smSticky?: boolean;
|
|
12
12
|
className?: string;
|
|
13
13
|
headerHeight?: number;
|
|
@@ -20,5 +20,9 @@ declare const ButtonRowContainer: _emotion_styled.StyledComponent<{
|
|
|
20
20
|
smSticky: boolean;
|
|
21
21
|
headerHeight: number;
|
|
22
22
|
}, react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
23
|
+
declare const StyledButtonRow: _emotion_styled.StyledComponent<{
|
|
24
|
+
theme?: _emotion_react.Theme;
|
|
25
|
+
as?: react.ElementType<any>;
|
|
26
|
+
}, react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
23
27
|
|
|
24
|
-
export { ButtonRow, ButtonRowContainer, ButtonRowProps };
|
|
28
|
+
export { ButtonRow, ButtonRowContainer, ButtonRowProps, StyledButtonRow };
|
|
@@ -7,7 +7,7 @@ import '../router.js';
|
|
|
7
7
|
import 'react-router-dom';
|
|
8
8
|
|
|
9
9
|
type ButtonRowProps<RoutesType extends string> = {
|
|
10
|
-
buttons: ButtonProps<RoutesType>[];
|
|
10
|
+
buttons: (ButtonProps<RoutesType> | "divider")[];
|
|
11
11
|
smSticky?: boolean;
|
|
12
12
|
className?: string;
|
|
13
13
|
headerHeight?: number;
|
|
@@ -20,5 +20,9 @@ declare const ButtonRowContainer: _emotion_styled.StyledComponent<{
|
|
|
20
20
|
smSticky: boolean;
|
|
21
21
|
headerHeight: number;
|
|
22
22
|
}, react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
23
|
+
declare const StyledButtonRow: _emotion_styled.StyledComponent<{
|
|
24
|
+
theme?: _emotion_react.Theme;
|
|
25
|
+
as?: react.ElementType<any>;
|
|
26
|
+
}, react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
23
27
|
|
|
24
|
-
export { ButtonRow, ButtonRowContainer, ButtonRowProps };
|
|
28
|
+
export { ButtonRow, ButtonRowContainer, ButtonRowProps, StyledButtonRow };
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ButtonRow,
|
|
3
|
-
ButtonRowContainer
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import "../chunk-
|
|
3
|
+
ButtonRowContainer,
|
|
4
|
+
StyledButtonRow
|
|
5
|
+
} from "../chunk-2JM7UTAZ.js";
|
|
6
|
+
import "../chunk-76Q4BK35.js";
|
|
7
|
+
import "../chunk-OGSDZTHM.js";
|
|
7
8
|
import "../chunk-YMNSXZ5D.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-BAO4T4G5.js";
|
|
10
|
+
import "../chunk-2YB7653N.js";
|
|
11
|
+
import "../chunk-4KWTXZRY.js";
|
|
12
|
+
import "../chunk-NRXJA2PM.js";
|
|
13
|
+
import "../chunk-55OQPFLF.js";
|
|
14
|
+
import "../chunk-VHW2KROZ.js";
|
|
12
15
|
import "../chunk-LAMQKQU3.js";
|
|
13
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-HNVQIY5U.js";
|
|
14
17
|
import "../chunk-2VBDEO6M.js";
|
|
15
18
|
import "../chunk-E4EXM4SY.js";
|
|
16
19
|
import "../chunk-JSGRNWSB.js";
|
|
17
|
-
import "../chunk-CLU2FRJZ.js";
|
|
18
20
|
import "../chunk-CIGAQ47A.js";
|
|
19
21
|
export {
|
|
20
22
|
ButtonRow,
|
|
21
|
-
ButtonRowContainer
|
|
23
|
+
ButtonRowContainer,
|
|
24
|
+
StyledButtonRow
|
|
22
25
|
};
|
|
@@ -79,7 +79,6 @@ var import_react7 = require("react");
|
|
|
79
79
|
// src/styles/common.tsx
|
|
80
80
|
var import_react4 = require("@emotion/react");
|
|
81
81
|
var import_styled = __toESM(require("@emotion/styled"), 1);
|
|
82
|
-
var import_react_tooltip = require("react-tooltip");
|
|
83
82
|
|
|
84
83
|
// src/styles/breakpoints.tsx
|
|
85
84
|
var import_react = require("@emotion/react");
|
|
@@ -1285,32 +1284,6 @@ function hexToRGB(hex) {
|
|
|
1285
1284
|
] : [0, 0, 0];
|
|
1286
1285
|
}
|
|
1287
1286
|
|
|
1288
|
-
// src/styles/z-index.tsx
|
|
1289
|
-
var z = {
|
|
1290
|
-
card: 1,
|
|
1291
|
-
fieldError: 1,
|
|
1292
|
-
textInput: 2,
|
|
1293
|
-
select: 3,
|
|
1294
|
-
selectFocused: 4,
|
|
1295
|
-
walletActionPreviewTopGradient: 1,
|
|
1296
|
-
headerContainer: 99,
|
|
1297
|
-
smBanner: 99,
|
|
1298
|
-
headerTop: 100,
|
|
1299
|
-
navMenu: 100,
|
|
1300
|
-
smNavMenu: 100,
|
|
1301
|
-
navAction: 101,
|
|
1302
|
-
smNavAction: 100,
|
|
1303
|
-
// keep under navDropdown
|
|
1304
|
-
tooltip: 160,
|
|
1305
|
-
notificationBanner: 170,
|
|
1306
|
-
qrReaderVideo: 180,
|
|
1307
|
-
qrReaderOverlay: 181,
|
|
1308
|
-
modalOverlay: 190,
|
|
1309
|
-
modalContainer: 191,
|
|
1310
|
-
dropdown: 192,
|
|
1311
|
-
toast: 200
|
|
1312
|
-
};
|
|
1313
|
-
|
|
1314
1287
|
// src/styles/common.tsx
|
|
1315
1288
|
var rootFontSizePx = 12;
|
|
1316
1289
|
var rootFontSizeRems = rootFontSizePx / 16;
|
|
@@ -1363,9 +1336,6 @@ var Subtext = import_styled.default.div`
|
|
|
1363
1336
|
var darkGradientBg = import_react4.css`
|
|
1364
1337
|
background: ${darkGradient};
|
|
1365
1338
|
`;
|
|
1366
|
-
var StyledTooltip = (0, import_styled.default)(import_react_tooltip.Tooltip)`
|
|
1367
|
-
z-index: ${z.modalOverlay};
|
|
1368
|
-
`;
|
|
1369
1339
|
|
|
1370
1340
|
// src/styles/utils.tsx
|
|
1371
1341
|
var import_react5 = require("@emotion/react");
|
|
@@ -3,16 +3,15 @@ import {
|
|
|
3
3
|
CollapsingContainer,
|
|
4
4
|
StyledCollapsible,
|
|
5
5
|
StyledCollapsibleButton
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-MAMSU2XB.js";
|
|
7
7
|
import "../chunk-3XSQV5U4.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-2YB7653N.js";
|
|
9
|
+
import "../chunk-VHW2KROZ.js";
|
|
10
10
|
import "../chunk-LAMQKQU3.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-HNVQIY5U.js";
|
|
12
12
|
import "../chunk-2VBDEO6M.js";
|
|
13
13
|
import "../chunk-E4EXM4SY.js";
|
|
14
14
|
import "../chunk-JSGRNWSB.js";
|
|
15
|
-
import "../chunk-CLU2FRJZ.js";
|
|
16
15
|
import "../chunk-CIGAQ47A.js";
|
|
17
16
|
export {
|
|
18
17
|
Collapsible,
|
|
@@ -80,7 +80,6 @@ var import_react5 = require("react");
|
|
|
80
80
|
// src/styles/common.tsx
|
|
81
81
|
var import_react4 = require("@emotion/react");
|
|
82
82
|
var import_styled = __toESM(require("@emotion/styled"), 1);
|
|
83
|
-
var import_react_tooltip = require("react-tooltip");
|
|
84
83
|
|
|
85
84
|
// src/styles/breakpoints.tsx
|
|
86
85
|
var import_react = require("@emotion/react");
|
|
@@ -1286,32 +1285,6 @@ function hexToRGB(hex) {
|
|
|
1286
1285
|
] : [0, 0, 0];
|
|
1287
1286
|
}
|
|
1288
1287
|
|
|
1289
|
-
// src/styles/z-index.tsx
|
|
1290
|
-
var z = {
|
|
1291
|
-
card: 1,
|
|
1292
|
-
fieldError: 1,
|
|
1293
|
-
textInput: 2,
|
|
1294
|
-
select: 3,
|
|
1295
|
-
selectFocused: 4,
|
|
1296
|
-
walletActionPreviewTopGradient: 1,
|
|
1297
|
-
headerContainer: 99,
|
|
1298
|
-
smBanner: 99,
|
|
1299
|
-
headerTop: 100,
|
|
1300
|
-
navMenu: 100,
|
|
1301
|
-
smNavMenu: 100,
|
|
1302
|
-
navAction: 101,
|
|
1303
|
-
smNavAction: 100,
|
|
1304
|
-
// keep under navDropdown
|
|
1305
|
-
tooltip: 160,
|
|
1306
|
-
notificationBanner: 170,
|
|
1307
|
-
qrReaderVideo: 180,
|
|
1308
|
-
qrReaderOverlay: 181,
|
|
1309
|
-
modalOverlay: 190,
|
|
1310
|
-
modalContainer: 191,
|
|
1311
|
-
dropdown: 192,
|
|
1312
|
-
toast: 200
|
|
1313
|
-
};
|
|
1314
|
-
|
|
1315
1288
|
// src/styles/common.tsx
|
|
1316
1289
|
var rootFontSizePx = 12;
|
|
1317
1290
|
var rootFontSizeRems = rootFontSizePx / 16;
|
|
@@ -1358,9 +1331,6 @@ var Subtext = import_styled.default.div`
|
|
|
1358
1331
|
var darkGradientBg = import_react4.css`
|
|
1359
1332
|
background: ${darkGradient};
|
|
1360
1333
|
`;
|
|
1361
|
-
var StyledTooltip = (0, import_styled.default)(import_react_tooltip.Tooltip)`
|
|
1362
|
-
z-index: ${z.modalOverlay};
|
|
1363
|
-
`;
|
|
1364
1334
|
|
|
1365
1335
|
// src/utils/strings.tsx
|
|
1366
1336
|
function isString(str) {
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ContentTable,
|
|
3
3
|
StyledContentTable
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-744FBGRP.js";
|
|
5
|
+
import "../chunk-VHW2KROZ.js";
|
|
6
6
|
import "../chunk-LAMQKQU3.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-HNVQIY5U.js";
|
|
8
8
|
import "../chunk-2VBDEO6M.js";
|
|
9
9
|
import "../chunk-E4EXM4SY.js";
|
|
10
10
|
import "../chunk-JSGRNWSB.js";
|
|
11
|
-
import "../chunk-CLU2FRJZ.js";
|
|
12
11
|
import "../chunk-CIGAQ47A.js";
|
|
13
12
|
export {
|
|
14
13
|
ContentTable,
|