@lightsparkdev/ui 0.0.11 → 0.0.13
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 +19 -0
- package/dist/chunk-34CIJVQQ.js +24 -0
- package/dist/{chunk-IPAXAP6K.js → chunk-5DK6QL77.js} +7 -1
- package/dist/{chunk-VE7J2N47.js → chunk-5GBDVTL6.js} +1 -1
- package/dist/{chunk-ZANLDY2W.js → chunk-75VDSSXM.js} +3 -1
- package/dist/{chunk-NFSAJ5GJ.js → chunk-DFYHIUYN.js} +1 -1
- package/dist/{chunk-DQRN4E5G.js → chunk-EXGJIYUI.js} +1 -1
- package/dist/{chunk-NM7UW54G.js → chunk-KMTXQD46.js} +2 -2
- package/dist/{chunk-OGSDZTHM.js → chunk-QCXXJZDC.js} +2 -0
- package/dist/{chunk-XZR237JJ.js → chunk-QNM3M4MU.js} +2 -1
- package/dist/{chunk-PBRN7MJY.js → chunk-QWAHK2QG.js} +1 -1
- package/dist/chunk-UV6JCAHE.js +198 -0
- package/dist/components/Badge.cjs +1 -1
- package/dist/components/Badge.d.cts +4 -3
- package/dist/components/Badge.d.ts +4 -3
- package/dist/components/Badge.js +1 -1
- package/dist/components/Button.cjs +4 -0
- package/dist/components/Button.d.cts +23 -26
- package/dist/components/Button.d.ts +23 -26
- package/dist/components/Button.js +2 -2
- package/dist/components/ButtonRow.cjs +4 -0
- package/dist/components/ButtonRow.js +3 -3
- package/dist/components/CardPage.js +4 -4
- package/dist/components/CodeBlock.cjs +1871 -0
- package/dist/components/CodeBlock.d.cts +43 -0
- package/dist/components/CodeBlock.d.ts +43 -0
- package/dist/components/CodeBlock.js +24 -0
- package/dist/components/CurrencyAmount.cjs +2 -1
- package/dist/components/CurrencyAmount.d.cts +3 -3
- package/dist/components/CurrencyAmount.d.ts +3 -3
- package/dist/components/CurrencyAmount.js +1 -1
- package/dist/components/GradientCardHeader.cjs +1382 -14
- package/dist/components/GradientCardHeader.d.cts +2 -1
- package/dist/components/GradientCardHeader.d.ts +2 -1
- package/dist/components/GradientCardHeader.js +7 -1
- package/dist/components/Modal.cjs +4 -0
- package/dist/components/Modal.js +4 -4
- package/dist/components/SecretContainer.d.cts +1 -1
- package/dist/components/SecretContainer.d.ts +1 -1
- package/dist/components/StatusIndicator.cjs +1405 -0
- package/dist/components/StatusIndicator.d.cts +12 -0
- package/dist/components/StatusIndicator.d.ts +12 -0
- package/dist/components/StatusIndicator.js +12 -0
- package/dist/components/index.cjs +430 -222
- package/dist/components/index.d.cts +3 -2
- package/dist/components/index.d.ts +3 -2
- package/dist/components/index.js +32 -20
- package/dist/icons/FramedLetterI.cjs +55 -0
- package/dist/icons/FramedLetterI.d.cts +5 -0
- package/dist/icons/FramedLetterI.d.ts +5 -0
- package/dist/icons/FramedLetterI.js +36 -0
- package/dist/router.cjs +2 -0
- package/dist/router.d.cts +2 -1
- package/dist/router.d.ts +2 -1
- package/dist/router.js +1 -1
- package/dist/styles/fonts/typography/Article.js +4 -4
- package/dist/styles/fonts/typography/index.js +8 -8
- package/dist/styles/fonts/typographyTokens.d.cts +4 -1
- package/dist/styles/fonts/typographyTokens.d.ts +4 -1
- package/dist/types/index.d.cts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/{types/utils.cjs → utils/parseURLFragments.cjs} +18 -13
- package/dist/utils/parseURLFragments.d.cts +3 -0
- package/dist/utils/parseURLFragments.d.ts +3 -0
- package/dist/utils/parseURLFragments.js +19 -0
- package/dist/utils/strings.d.cts +1 -1
- package/dist/utils/strings.d.ts +1 -1
- package/dist/utils/toReactNodes.cjs +2 -0
- package/dist/utils/toReactNodes.js +2 -2
- package/package.json +5 -2
- package/dist/types/utils.d.cts +0 -16
- package/dist/types/utils.d.ts +0 -16
- package/dist/types/utils.js +0 -13
- package/dist/{chunk-Y37DCY7Y.js → chunk-A3ZJ2C7J.js} +9 -9
|
@@ -78,6 +78,7 @@ __export(components_exports, {
|
|
|
78
78
|
CardPageFullWidth: () => CardPageFullWidth,
|
|
79
79
|
CardPageRightContentInner: () => CardPageRightContentInner,
|
|
80
80
|
CardPageSubtitle: () => CardPageSubtitle,
|
|
81
|
+
CodeBlock: () => CodeBlock,
|
|
81
82
|
Collapsible: () => Collapsible,
|
|
82
83
|
CommandKey: () => CommandKey,
|
|
83
84
|
CopyToClipboardButton: () => CopyToClipboardButton,
|
|
@@ -86,6 +87,7 @@ __export(components_exports, {
|
|
|
86
87
|
GradientCardHeader: () => GradientCardHeader,
|
|
87
88
|
Icon: () => Icon,
|
|
88
89
|
IconContainer: () => IconContainer,
|
|
90
|
+
InlineCode: () => InlineCode,
|
|
89
91
|
LightTooltip: () => LightTooltip,
|
|
90
92
|
LightboxImage: () => LightboxImage,
|
|
91
93
|
LightsparkProvider: () => LightsparkProvider,
|
|
@@ -95,7 +97,9 @@ __export(components_exports, {
|
|
|
95
97
|
Pill: () => Pill,
|
|
96
98
|
ProgressBar: () => ProgressBar,
|
|
97
99
|
SecretContainer: () => SecretContainer,
|
|
100
|
+
StatusIndicator: () => StatusIndicator,
|
|
98
101
|
StyledButton: () => StyledButton,
|
|
102
|
+
StyledCodeBlock: () => StyledCodeBlock,
|
|
99
103
|
TextIconAligner: () => TextIconAligner,
|
|
100
104
|
UnstyledButton: () => UnstyledButton
|
|
101
105
|
});
|
|
@@ -1457,7 +1461,7 @@ var overlaySurface = ({
|
|
|
1457
1461
|
|
|
1458
1462
|
// src/components/Badge.tsx
|
|
1459
1463
|
var import_jsx_runtime2 = require("@emotion/react/jsx-runtime");
|
|
1460
|
-
function Badge({ text, ml = 0 }) {
|
|
1464
|
+
function Badge({ text, ml = 0, mr = 0 }) {
|
|
1461
1465
|
return text ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(StyledBadge, { ml, children: text }) : null;
|
|
1462
1466
|
}
|
|
1463
1467
|
var badgeVPadding = 2;
|
|
@@ -1510,6 +1514,7 @@ function replaceParams(to, params) {
|
|
|
1510
1514
|
}
|
|
1511
1515
|
function Link({
|
|
1512
1516
|
to,
|
|
1517
|
+
id,
|
|
1513
1518
|
externalLink,
|
|
1514
1519
|
params,
|
|
1515
1520
|
children,
|
|
@@ -1542,6 +1547,7 @@ function Link({
|
|
|
1542
1547
|
import_react_router_dom.Link,
|
|
1543
1548
|
{
|
|
1544
1549
|
to: toStr,
|
|
1550
|
+
id,
|
|
1545
1551
|
css: css9,
|
|
1546
1552
|
onClick,
|
|
1547
1553
|
className,
|
|
@@ -1800,7 +1806,7 @@ function getTextColor({ color, theme, primary: primary2, blue }) {
|
|
|
1800
1806
|
return theme.text;
|
|
1801
1807
|
}
|
|
1802
1808
|
function getBackgroundColor({
|
|
1803
|
-
backgroundColor,
|
|
1809
|
+
backgroundColor: backgroundColor2,
|
|
1804
1810
|
theme,
|
|
1805
1811
|
primary: primary2,
|
|
1806
1812
|
blue,
|
|
@@ -1809,8 +1815,8 @@ function getBackgroundColor({
|
|
|
1809
1815
|
if (ghost) {
|
|
1810
1816
|
return "none";
|
|
1811
1817
|
}
|
|
1812
|
-
if (
|
|
1813
|
-
return
|
|
1818
|
+
if (backgroundColor2) {
|
|
1819
|
+
return backgroundColor2;
|
|
1814
1820
|
}
|
|
1815
1821
|
if (blue) {
|
|
1816
1822
|
return colors.blue43;
|
|
@@ -1861,14 +1867,14 @@ function getBorder({ ghost }) {
|
|
|
1861
1867
|
return "1px solid";
|
|
1862
1868
|
}
|
|
1863
1869
|
function getInnerBorderColor({
|
|
1864
|
-
backgroundColor,
|
|
1870
|
+
backgroundColor: backgroundColor2,
|
|
1865
1871
|
theme,
|
|
1866
1872
|
primary: primary2,
|
|
1867
1873
|
blue
|
|
1868
1874
|
}) {
|
|
1869
|
-
if (primary2 || blue ||
|
|
1875
|
+
if (primary2 || blue || backgroundColor2) {
|
|
1870
1876
|
return getBackgroundColor({
|
|
1871
|
-
backgroundColor,
|
|
1877
|
+
backgroundColor: backgroundColor2,
|
|
1872
1878
|
theme,
|
|
1873
1879
|
primary: primary2,
|
|
1874
1880
|
blue
|
|
@@ -1877,13 +1883,14 @@ function getInnerBorderColor({
|
|
|
1877
1883
|
return themeOr(colors.gray90, colors.gray20)({ theme });
|
|
1878
1884
|
}
|
|
1879
1885
|
function Button({
|
|
1880
|
-
backgroundColor,
|
|
1886
|
+
backgroundColor: backgroundColor2,
|
|
1881
1887
|
color,
|
|
1882
1888
|
hoverColor,
|
|
1883
1889
|
primary: primary2 = false,
|
|
1884
1890
|
ghost = false,
|
|
1885
1891
|
text,
|
|
1886
1892
|
to,
|
|
1893
|
+
id,
|
|
1887
1894
|
hash,
|
|
1888
1895
|
href,
|
|
1889
1896
|
toParams,
|
|
@@ -1940,7 +1947,8 @@ function Button({
|
|
|
1940
1947
|
] });
|
|
1941
1948
|
const isSingleCharRoundButton = Boolean(text && text.length === 1 && !icon);
|
|
1942
1949
|
const commonProps = {
|
|
1943
|
-
|
|
1950
|
+
id,
|
|
1951
|
+
backgroundColor: backgroundColor2,
|
|
1944
1952
|
color,
|
|
1945
1953
|
hoverColor,
|
|
1946
1954
|
type,
|
|
@@ -1970,7 +1978,7 @@ function Button({
|
|
|
1970
1978
|
}
|
|
1971
1979
|
var buttonStyle = ({
|
|
1972
1980
|
color,
|
|
1973
|
-
backgroundColor,
|
|
1981
|
+
backgroundColor: backgroundColor2,
|
|
1974
1982
|
hoverColor,
|
|
1975
1983
|
theme,
|
|
1976
1984
|
primary: primary2,
|
|
@@ -2008,7 +2016,7 @@ var buttonStyle = ({
|
|
|
2008
2016
|
text-align: center;
|
|
2009
2017
|
white-space: nowrap;
|
|
2010
2018
|
background-color: ${getBackgroundColor({
|
|
2011
|
-
backgroundColor,
|
|
2019
|
+
backgroundColor: backgroundColor2,
|
|
2012
2020
|
theme,
|
|
2013
2021
|
primary: primary2,
|
|
2014
2022
|
blue,
|
|
@@ -2016,7 +2024,7 @@ var buttonStyle = ({
|
|
|
2016
2024
|
})};
|
|
2017
2025
|
border: ${getBorder({ ghost })};
|
|
2018
2026
|
border-color: ${getInnerBorderColor({
|
|
2019
|
-
backgroundColor,
|
|
2027
|
+
backgroundColor: backgroundColor2,
|
|
2020
2028
|
theme,
|
|
2021
2029
|
primary: primary2,
|
|
2022
2030
|
blue
|
|
@@ -2600,10 +2608,243 @@ var CardPageContent = import_styled9.default.div`
|
|
|
2600
2608
|
`}
|
|
2601
2609
|
`;
|
|
2602
2610
|
|
|
2603
|
-
// src/components/
|
|
2611
|
+
// src/components/CodeBlock.tsx
|
|
2612
|
+
var import_styled11 = __toESM(require("@emotion/styled"), 1);
|
|
2613
|
+
var import_prismjs = __toESM(require("prismjs"), 1);
|
|
2614
|
+
var import_prism_dart_min = require("prismjs/components/prism-dart.min.js");
|
|
2615
|
+
var import_prism_go_min = require("prismjs/components/prism-go.min.js");
|
|
2616
|
+
var import_prism_graphql_min = require("prismjs/components/prism-graphql.min.js");
|
|
2617
|
+
var import_prism_java_min = require("prismjs/components/prism-java.min.js");
|
|
2618
|
+
var import_prism_json_min = require("prismjs/components/prism-json.min.js");
|
|
2619
|
+
var import_prism_jsx_min = require("prismjs/components/prism-jsx.min.js");
|
|
2620
|
+
var import_prism_kotlin_min = require("prismjs/components/prism-kotlin.min.js");
|
|
2621
|
+
var import_prism_python_min = require("prismjs/components/prism-python.min.js");
|
|
2622
|
+
var import_prism_rust_min = require("prismjs/components/prism-rust.min.js");
|
|
2623
|
+
var import_prism_swift_min = require("prismjs/components/prism-swift.min.js");
|
|
2624
|
+
var import_prism_tomorrow = require("prismjs/themes/prism-tomorrow.css");
|
|
2625
|
+
var import_react15 = require("react");
|
|
2626
|
+
var import_react_select = __toESM(require("react-select"), 1);
|
|
2627
|
+
|
|
2628
|
+
// src/components/CopyToClipboardButton.tsx
|
|
2604
2629
|
var import_styled10 = __toESM(require("@emotion/styled"), 1);
|
|
2630
|
+
var import_nanoid = require("nanoid");
|
|
2605
2631
|
var import_react14 = require("react");
|
|
2606
2632
|
var import_jsx_runtime11 = require("@emotion/react/jsx-runtime");
|
|
2633
|
+
var CopyToClipboardButton = (props) => {
|
|
2634
|
+
var _a;
|
|
2635
|
+
const originalTooltipContent = props.tooltipContent || "Click to copy";
|
|
2636
|
+
const icon = props.icon || "Copy";
|
|
2637
|
+
const id = `copy-node-name-${(_a = props.id) != null ? _a : (0, import_nanoid.nanoid)()}`;
|
|
2638
|
+
const [tooltipContent, setTooltipContent] = (0, import_react14.useState)(originalTooltipContent);
|
|
2639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
2640
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2641
|
+
Button2,
|
|
2642
|
+
{
|
|
2643
|
+
type: "button",
|
|
2644
|
+
onClick: () => {
|
|
2645
|
+
void (() => __async(void 0, null, function* () {
|
|
2646
|
+
try {
|
|
2647
|
+
yield navigator.clipboard.writeText(props.value);
|
|
2648
|
+
setTooltipContent("Copied!");
|
|
2649
|
+
} catch (err) {
|
|
2650
|
+
setTooltipContent("Unable to copy");
|
|
2651
|
+
}
|
|
2652
|
+
setTimeout(() => {
|
|
2653
|
+
setTooltipContent(originalTooltipContent);
|
|
2654
|
+
}, 2e3);
|
|
2655
|
+
}))();
|
|
2656
|
+
},
|
|
2657
|
+
css: props.buttonCSS,
|
|
2658
|
+
ml: props.ml,
|
|
2659
|
+
"data-tooltip-id": id,
|
|
2660
|
+
children: [
|
|
2661
|
+
props.children ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Children, { children: props.children }) : null,
|
|
2662
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { name: icon, width: props.isSm ? 12 : 16 })
|
|
2663
|
+
]
|
|
2664
|
+
}
|
|
2665
|
+
),
|
|
2666
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2667
|
+
LightTooltip,
|
|
2668
|
+
{
|
|
2669
|
+
id,
|
|
2670
|
+
place: props.place || "right",
|
|
2671
|
+
content: tooltipContent
|
|
2672
|
+
}
|
|
2673
|
+
)
|
|
2674
|
+
] });
|
|
2675
|
+
};
|
|
2676
|
+
var Children = import_styled10.default.span`
|
|
2677
|
+
margin-right: 4px;
|
|
2678
|
+
`;
|
|
2679
|
+
var Button2 = (0, import_styled10.default)(UnstyledButton)`
|
|
2680
|
+
background: rgba(0, 0, 0, 0);
|
|
2681
|
+
vertical-align: middle;
|
|
2682
|
+
${({ ml }) => ml ? `margin-left: ${ml}px` : ""};
|
|
2683
|
+
`;
|
|
2684
|
+
|
|
2685
|
+
// src/components/CodeBlock.tsx
|
|
2686
|
+
var import_jsx_runtime12 = require("@emotion/react/jsx-runtime");
|
|
2687
|
+
var ProgrammingLanguageOptions = {
|
|
2688
|
+
Bash: "bash",
|
|
2689
|
+
Flutter: "dart",
|
|
2690
|
+
Go: "go",
|
|
2691
|
+
GraphQL: "graphql",
|
|
2692
|
+
Java: "java",
|
|
2693
|
+
JavaScript: "js",
|
|
2694
|
+
JSON: "json",
|
|
2695
|
+
Kotlin: "kotlin",
|
|
2696
|
+
Python: "python",
|
|
2697
|
+
React: "react",
|
|
2698
|
+
ReactNative: "tsx",
|
|
2699
|
+
Rust: "rust",
|
|
2700
|
+
Swift: "swift",
|
|
2701
|
+
Text: "txt"
|
|
2702
|
+
};
|
|
2703
|
+
var backgroundColor = "#2d2d2d";
|
|
2704
|
+
var InlineCode = import_styled11.default.span`
|
|
2705
|
+
font-family: "Roboto Mono", monospace;
|
|
2706
|
+
background-color: #2d2d2d;
|
|
2707
|
+
border: 1px solid ${themeOr(colors.gray90, colors.gray20)};
|
|
2708
|
+
border-radius: 3px;
|
|
2709
|
+
line-height: 24px;
|
|
2710
|
+
padding: 0 4px;
|
|
2711
|
+
`;
|
|
2712
|
+
var codeSelectStyles = {
|
|
2713
|
+
container: (styles2) => __spreadProps(__spreadValues({}, styles2), {
|
|
2714
|
+
display: "flex"
|
|
2715
|
+
}),
|
|
2716
|
+
control: (styles2) => __spreadProps(__spreadValues({}, styles2), {
|
|
2717
|
+
backgroundColor,
|
|
2718
|
+
border: "none",
|
|
2719
|
+
cursor: "pointer",
|
|
2720
|
+
"&:hover": {
|
|
2721
|
+
border: "#none"
|
|
2722
|
+
},
|
|
2723
|
+
boxShadow: "none",
|
|
2724
|
+
minHeight: 0
|
|
2725
|
+
}),
|
|
2726
|
+
dropdownIndicator: (styles2) => __spreadProps(__spreadValues({}, styles2), {
|
|
2727
|
+
color: "#ffffff",
|
|
2728
|
+
padding: "0 0 0 4px",
|
|
2729
|
+
"&:hover": {
|
|
2730
|
+
color: "#ffffff"
|
|
2731
|
+
}
|
|
2732
|
+
}),
|
|
2733
|
+
indicatorSeparator: (styles2) => ({
|
|
2734
|
+
display: "none"
|
|
2735
|
+
}),
|
|
2736
|
+
input: (styles2) => __spreadProps(__spreadValues({}, styles2), {
|
|
2737
|
+
fontSize: "1rem",
|
|
2738
|
+
margin: 0,
|
|
2739
|
+
color: "transparent"
|
|
2740
|
+
}),
|
|
2741
|
+
menu: (styles2) => __spreadProps(__spreadValues({}, styles2), {
|
|
2742
|
+
backgroundColor,
|
|
2743
|
+
width: "auto"
|
|
2744
|
+
}),
|
|
2745
|
+
menuList: (styles2) => __spreadProps(__spreadValues({}, styles2), {
|
|
2746
|
+
borderRadius: "4px",
|
|
2747
|
+
padding: 0
|
|
2748
|
+
}),
|
|
2749
|
+
option: (styles2, state) => __spreadProps(__spreadValues({}, styles2), {
|
|
2750
|
+
cursor: "pointer",
|
|
2751
|
+
backgroundColor: state.isSelected ? colors.gray25 : backgroundColor,
|
|
2752
|
+
"&:hover": {
|
|
2753
|
+
backgroundColor: colors.gray25
|
|
2754
|
+
}
|
|
2755
|
+
}),
|
|
2756
|
+
singleValue: (styles2) => __spreadProps(__spreadValues({}, styles2), {
|
|
2757
|
+
color: "#ffffff",
|
|
2758
|
+
margin: 0
|
|
2759
|
+
}),
|
|
2760
|
+
valueContainer: (styles2) => __spreadProps(__spreadValues({}, styles2), {
|
|
2761
|
+
padding: 0
|
|
2762
|
+
})
|
|
2763
|
+
};
|
|
2764
|
+
var CodeBlock = ({
|
|
2765
|
+
title,
|
|
2766
|
+
children,
|
|
2767
|
+
className,
|
|
2768
|
+
language = "Text",
|
|
2769
|
+
languageOptions,
|
|
2770
|
+
onSelectLanguage,
|
|
2771
|
+
withCopyButton
|
|
2772
|
+
}) => {
|
|
2773
|
+
(0, import_react15.useLayoutEffect)(() => {
|
|
2774
|
+
import_prismjs.default.highlightAll();
|
|
2775
|
+
}, [children, language]);
|
|
2776
|
+
const header = withCopyButton || languageOptions && onSelectLanguage ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(CodeBlockHeader, { children: [
|
|
2777
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CodeBlockHeaderTitle, { children: title }),
|
|
2778
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
2779
|
+
"div",
|
|
2780
|
+
{
|
|
2781
|
+
css: {
|
|
2782
|
+
display: "flex",
|
|
2783
|
+
alignItems: "center",
|
|
2784
|
+
justifyContent: title ? "flex-end" : "space-between",
|
|
2785
|
+
width: "100%"
|
|
2786
|
+
},
|
|
2787
|
+
children: [
|
|
2788
|
+
languageOptions && onSelectLanguage ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { css: { margin: title ? "0 16px 0 auto" : "0" }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2789
|
+
import_react_select.default,
|
|
2790
|
+
{
|
|
2791
|
+
value: { value: language, label: language },
|
|
2792
|
+
options: languageOptions.map((lang) => ({
|
|
2793
|
+
value: lang,
|
|
2794
|
+
label: lang
|
|
2795
|
+
})),
|
|
2796
|
+
onChange: (selected) => {
|
|
2797
|
+
if (selected == null ? void 0 : selected.value) {
|
|
2798
|
+
onSelectLanguage(selected.value);
|
|
2799
|
+
}
|
|
2800
|
+
},
|
|
2801
|
+
styles: codeSelectStyles
|
|
2802
|
+
}
|
|
2803
|
+
) }) : null,
|
|
2804
|
+
withCopyButton ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CopyToClipboardButton, { value: children }) : null
|
|
2805
|
+
]
|
|
2806
|
+
}
|
|
2807
|
+
)
|
|
2808
|
+
] }) : null;
|
|
2809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(StyledCodeBlock, { className, children: [
|
|
2810
|
+
header,
|
|
2811
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CodeBlockContainer, { hasHeader: header !== null, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("code", { className: `language-${ProgrammingLanguageOptions[language]}`, children }) })
|
|
2812
|
+
] });
|
|
2813
|
+
};
|
|
2814
|
+
var StyledCodeBlock = import_styled11.default.div``;
|
|
2815
|
+
var CodeBlockHeader = import_styled11.default.div`
|
|
2816
|
+
align-items: center;
|
|
2817
|
+
background-color: #2d2d2d;
|
|
2818
|
+
border-bottom: 1px solid ${colors.gray25};
|
|
2819
|
+
border-top-left-radius: 8px;
|
|
2820
|
+
border-top-right-radius: 8px;
|
|
2821
|
+
color: #ffffff;
|
|
2822
|
+
display: flex;
|
|
2823
|
+
flex-direction: row;
|
|
2824
|
+
justify-content: space-between;
|
|
2825
|
+
padding: 16px 20px;
|
|
2826
|
+
`;
|
|
2827
|
+
var CodeBlockContainer = import_styled11.default.pre`
|
|
2828
|
+
${overflowAutoWithoutScrollbars}
|
|
2829
|
+
&[class*="language-"] {
|
|
2830
|
+
padding: 20px;
|
|
2831
|
+
font-weight: 500;
|
|
2832
|
+
${standardBorderRadius(8)}
|
|
2833
|
+
${(props) => props.hasHeader ? `border-top-left-radius: 0;
|
|
2834
|
+
border-top-right-radius: 0;
|
|
2835
|
+
margin-top: 0;` : ""}
|
|
2836
|
+
}
|
|
2837
|
+
`;
|
|
2838
|
+
var CodeBlockHeaderTitle = import_styled11.default.div`
|
|
2839
|
+
width: 100%;
|
|
2840
|
+
font-weight: 500;
|
|
2841
|
+
color: ${({ theme }) => theme.hcNeutralFromBg(backgroundColor)};
|
|
2842
|
+
`;
|
|
2843
|
+
|
|
2844
|
+
// src/components/Collapsible.tsx
|
|
2845
|
+
var import_styled12 = __toESM(require("@emotion/styled"), 1);
|
|
2846
|
+
var import_react16 = require("react");
|
|
2847
|
+
var import_jsx_runtime13 = require("@emotion/react/jsx-runtime");
|
|
2607
2848
|
function Collapsible({
|
|
2608
2849
|
children,
|
|
2609
2850
|
className,
|
|
@@ -2616,37 +2857,37 @@ function Collapsible({
|
|
|
2616
2857
|
buttonTextElement,
|
|
2617
2858
|
contentIndent = true
|
|
2618
2859
|
}) {
|
|
2619
|
-
const [isOpen, setIsOpen] = (0,
|
|
2860
|
+
const [isOpen, setIsOpen] = (0, import_react16.useState)(open);
|
|
2620
2861
|
const handleClick = () => {
|
|
2621
2862
|
if (handleToggle) {
|
|
2622
2863
|
handleToggle(!isOpen);
|
|
2623
2864
|
}
|
|
2624
2865
|
setIsOpen(!isOpen);
|
|
2625
2866
|
};
|
|
2626
|
-
(0,
|
|
2867
|
+
(0, import_react16.useEffect)(() => {
|
|
2627
2868
|
setIsOpen(open);
|
|
2628
2869
|
}, [open]);
|
|
2629
2870
|
const iconName = hamburger ? isOpen ? "Close" : "StackedLines" : "Down";
|
|
2630
2871
|
const iconWidth = iconName === "Close" ? 12 : 14;
|
|
2631
|
-
let textElement = /* @__PURE__ */ (0,
|
|
2872
|
+
let textElement = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", {});
|
|
2632
2873
|
if (buttonTextElement) {
|
|
2633
2874
|
textElement = buttonTextElement;
|
|
2634
2875
|
} else if (text) {
|
|
2635
|
-
textElement = /* @__PURE__ */ (0,
|
|
2876
|
+
textElement = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { color, children: text });
|
|
2636
2877
|
}
|
|
2637
|
-
return /* @__PURE__ */ (0,
|
|
2638
|
-
/* @__PURE__ */ (0,
|
|
2878
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(StyledCollapsible, { className, children: [
|
|
2879
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(StyledCollapsibleButton, { onClick: handleClick, children: [
|
|
2639
2880
|
textElement,
|
|
2640
|
-
/* @__PURE__ */ (0,
|
|
2881
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconContainer2, { isOpen, hamburger, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { width: iconWidth, name: iconName }) })
|
|
2641
2882
|
] }),
|
|
2642
|
-
/* @__PURE__ */ (0,
|
|
2883
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CollapsingContainer, { isOpen, full, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(InnerPadding, { contentIndent, children }) })
|
|
2643
2884
|
] });
|
|
2644
2885
|
}
|
|
2645
|
-
var StyledCollapsible =
|
|
2886
|
+
var StyledCollapsible = import_styled12.default.div`
|
|
2646
2887
|
display: flex;
|
|
2647
2888
|
flex-direction: column;
|
|
2648
2889
|
`;
|
|
2649
|
-
var StyledCollapsibleButton =
|
|
2890
|
+
var StyledCollapsibleButton = import_styled12.default.button`
|
|
2650
2891
|
display: flex;
|
|
2651
2892
|
flex-direction: row;
|
|
2652
2893
|
align-items: center;
|
|
@@ -2657,7 +2898,7 @@ var StyledCollapsibleButton = import_styled10.default.button`
|
|
|
2657
2898
|
${standardBorderRadius(8)}
|
|
2658
2899
|
padding: 0;
|
|
2659
2900
|
`;
|
|
2660
|
-
var IconContainer2 =
|
|
2901
|
+
var IconContainer2 = import_styled12.default.div`
|
|
2661
2902
|
${(props) => {
|
|
2662
2903
|
if (props.hamburger) {
|
|
2663
2904
|
return;
|
|
@@ -2667,7 +2908,7 @@ var IconContainer2 = import_styled10.default.div`
|
|
|
2667
2908
|
transition: transform 0.25s ease-out;
|
|
2668
2909
|
width: 20px;
|
|
2669
2910
|
`;
|
|
2670
|
-
var CollapsingContainer =
|
|
2911
|
+
var CollapsingContainer = import_styled12.default.div`
|
|
2671
2912
|
overflow: scroll;
|
|
2672
2913
|
opacity: 0;
|
|
2673
2914
|
animation-duration: 0.4s;
|
|
@@ -2701,38 +2942,38 @@ var CollapsingContainer = import_styled10.default.div`
|
|
|
2701
2942
|
}
|
|
2702
2943
|
}
|
|
2703
2944
|
`;
|
|
2704
|
-
var InnerPadding =
|
|
2945
|
+
var InnerPadding = import_styled12.default.div`
|
|
2705
2946
|
padding: ${"4px" /* 3xs */} 0 ${"4px" /* 3xs */}
|
|
2706
2947
|
${(props) => props.contentIndent ? "16px" /* md */ : "0"};
|
|
2707
2948
|
gap: ${"2px" /* 4xs */};
|
|
2708
2949
|
display: flex;
|
|
2709
2950
|
flex-direction: column;
|
|
2710
2951
|
`;
|
|
2711
|
-
var Text =
|
|
2952
|
+
var Text = import_styled12.default.span`
|
|
2712
2953
|
${(props) => props.color ? `color: ${props.color};` : ""}
|
|
2713
2954
|
line-height: inherit;
|
|
2714
2955
|
`;
|
|
2715
2956
|
|
|
2716
2957
|
// src/components/CommandKey.tsx
|
|
2717
|
-
var
|
|
2718
|
-
var
|
|
2958
|
+
var import_styled13 = __toESM(require("@emotion/styled"), 1);
|
|
2959
|
+
var import_jsx_runtime14 = require("@emotion/react/jsx-runtime");
|
|
2719
2960
|
var CommandKey = ({
|
|
2720
2961
|
keyboardKey,
|
|
2721
2962
|
size: size2,
|
|
2722
2963
|
color,
|
|
2723
|
-
backgroundColor
|
|
2964
|
+
backgroundColor: backgroundColor2
|
|
2724
2965
|
}) => {
|
|
2725
|
-
return /* @__PURE__ */ (0,
|
|
2966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2726
2967
|
StyledCommandKey,
|
|
2727
2968
|
{
|
|
2728
2969
|
color,
|
|
2729
2970
|
size: size2,
|
|
2730
|
-
backgroundColor,
|
|
2971
|
+
backgroundColor: backgroundColor2,
|
|
2731
2972
|
children: keyboardKey
|
|
2732
2973
|
}
|
|
2733
2974
|
);
|
|
2734
2975
|
};
|
|
2735
|
-
var StyledCommandKey =
|
|
2976
|
+
var StyledCommandKey = import_styled13.default.div`
|
|
2736
2977
|
height: 24px;
|
|
2737
2978
|
display: flex;
|
|
2738
2979
|
align-items: center;
|
|
@@ -2747,68 +2988,11 @@ var StyledCommandKey = import_styled11.default.div`
|
|
|
2747
2988
|
padding: 3px 6px;
|
|
2748
2989
|
`;
|
|
2749
2990
|
|
|
2750
|
-
// src/components/CopyToClipboardButton.tsx
|
|
2751
|
-
var import_styled12 = __toESM(require("@emotion/styled"), 1);
|
|
2752
|
-
var import_nanoid = require("nanoid");
|
|
2753
|
-
var import_react15 = require("react");
|
|
2754
|
-
var import_jsx_runtime13 = require("@emotion/react/jsx-runtime");
|
|
2755
|
-
var CopyToClipboardButton = (props) => {
|
|
2756
|
-
var _a;
|
|
2757
|
-
const originalTooltipContent = props.tooltipContent || "Click to copy";
|
|
2758
|
-
const icon = props.icon || "Copy";
|
|
2759
|
-
const id = `copy-node-name-${(_a = props.id) != null ? _a : (0, import_nanoid.nanoid)()}`;
|
|
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)(
|
|
2763
|
-
Button2,
|
|
2764
|
-
{
|
|
2765
|
-
type: "button",
|
|
2766
|
-
onClick: () => {
|
|
2767
|
-
void (() => __async(void 0, null, function* () {
|
|
2768
|
-
try {
|
|
2769
|
-
yield navigator.clipboard.writeText(props.value);
|
|
2770
|
-
setTooltipContent("Copied!");
|
|
2771
|
-
} catch (err) {
|
|
2772
|
-
setTooltipContent("Unable to copy");
|
|
2773
|
-
}
|
|
2774
|
-
setTimeout(() => {
|
|
2775
|
-
setTooltipContent(originalTooltipContent);
|
|
2776
|
-
}, 2e3);
|
|
2777
|
-
}))();
|
|
2778
|
-
},
|
|
2779
|
-
css: props.buttonCSS,
|
|
2780
|
-
ml: props.ml,
|
|
2781
|
-
"data-tooltip-id": id,
|
|
2782
|
-
children: [
|
|
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 })
|
|
2785
|
-
]
|
|
2786
|
-
}
|
|
2787
|
-
),
|
|
2788
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2789
|
-
LightTooltip,
|
|
2790
|
-
{
|
|
2791
|
-
id,
|
|
2792
|
-
place: props.place || "right",
|
|
2793
|
-
content: tooltipContent
|
|
2794
|
-
}
|
|
2795
|
-
)
|
|
2796
|
-
] });
|
|
2797
|
-
};
|
|
2798
|
-
var Children = import_styled12.default.span`
|
|
2799
|
-
margin-right: 4px;
|
|
2800
|
-
`;
|
|
2801
|
-
var Button2 = (0, import_styled12.default)(UnstyledButton)`
|
|
2802
|
-
background: rgba(0, 0, 0, 0);
|
|
2803
|
-
vertical-align: middle;
|
|
2804
|
-
${({ ml }) => ml ? `margin-left: ${ml}px` : ""};
|
|
2805
|
-
`;
|
|
2806
|
-
|
|
2807
2991
|
// src/components/CurrencyAmount.tsx
|
|
2808
2992
|
var import_client = require("@apollo/client");
|
|
2809
|
-
var
|
|
2993
|
+
var import_styled14 = __toESM(require("@emotion/styled"), 1);
|
|
2810
2994
|
var import_core = require("@lightsparkdev/core");
|
|
2811
|
-
var
|
|
2995
|
+
var import_jsx_runtime15 = require("@emotion/react/jsx-runtime");
|
|
2812
2996
|
function CurrencyAmount({
|
|
2813
2997
|
amount,
|
|
2814
2998
|
displayUnit = import_core.CurrencyUnit.SATOSHI,
|
|
@@ -2840,18 +3024,18 @@ function CurrencyAmount({
|
|
|
2840
3024
|
if (showUnits) {
|
|
2841
3025
|
formattedNumber += ` ${shorttext(unit, value)}`;
|
|
2842
3026
|
}
|
|
2843
|
-
return /* @__PURE__ */ (0,
|
|
3027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(StyledCurrencyAmount, { ml, children: [
|
|
2844
3028
|
includeEstimatedIndicator && "Est. ",
|
|
2845
|
-
/* @__PURE__ */ (0,
|
|
3029
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CurrencyIcon, { unit }),
|
|
2846
3030
|
formattedNumber
|
|
2847
3031
|
] });
|
|
2848
3032
|
}
|
|
2849
3033
|
var CurrencyIcon = ({ unit }) => {
|
|
2850
3034
|
switch (unit) {
|
|
2851
3035
|
case import_core.CurrencyUnit.BITCOIN:
|
|
2852
|
-
return /* @__PURE__ */ (0,
|
|
3036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { name: "BitcoinB", width: 8, verticalAlign: -2, mr: 2 });
|
|
2853
3037
|
case import_core.CurrencyUnit.SATOSHI:
|
|
2854
|
-
return /* @__PURE__ */ (0,
|
|
3038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { name: "Satoshi", width: 8, verticalAlign: -2, mr: 2 });
|
|
2855
3039
|
default:
|
|
2856
3040
|
return null;
|
|
2857
3041
|
}
|
|
@@ -2869,10 +3053,11 @@ var shorttext = (unit, value) => {
|
|
|
2869
3053
|
return `sat${pl ? "s" : ""}`;
|
|
2870
3054
|
case import_core.CurrencyUnit.MILLISATOSHI:
|
|
2871
3055
|
return `msat${pl ? "s" : ""}`;
|
|
3056
|
+
default:
|
|
3057
|
+
return unit;
|
|
2872
3058
|
}
|
|
2873
|
-
return unit;
|
|
2874
3059
|
};
|
|
2875
|
-
var StyledCurrencyAmount =
|
|
3060
|
+
var StyledCurrencyAmount = import_styled14.default.span`
|
|
2876
3061
|
color: inherit !important;
|
|
2877
3062
|
white-space: nowrap;
|
|
2878
3063
|
font-feature-settings:
|
|
@@ -2893,19 +3078,38 @@ CurrencyAmount.fragments = {
|
|
|
2893
3078
|
};
|
|
2894
3079
|
|
|
2895
3080
|
// src/components/GradientCardHeader.tsx
|
|
2896
|
-
var
|
|
2897
|
-
|
|
3081
|
+
var import_styled16 = __toESM(require("@emotion/styled"), 1);
|
|
3082
|
+
|
|
3083
|
+
// src/components/StatusIndicator.tsx
|
|
3084
|
+
var import_styled15 = __toESM(require("@emotion/styled"), 1);
|
|
3085
|
+
var import_jsx_runtime16 = require("@emotion/react/jsx-runtime");
|
|
3086
|
+
function StatusIndicator({
|
|
3087
|
+
color = "success",
|
|
3088
|
+
text,
|
|
3089
|
+
size: size2 = 12,
|
|
3090
|
+
fontWeight = 700
|
|
3091
|
+
}) {
|
|
3092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(StyledStatusIndicator, { color, size: size2, fontWeight, children: text });
|
|
3093
|
+
}
|
|
3094
|
+
var StyledStatusIndicator = import_styled15.default.div`
|
|
3095
|
+
color: ${({ theme, color }) => theme[color]};
|
|
3096
|
+
font-size: ${({ size: size2 }) => pxToRems(size2)};
|
|
3097
|
+
font-weight: ${({ fontWeight }) => fontWeight};
|
|
3098
|
+
`;
|
|
3099
|
+
|
|
3100
|
+
// src/components/GradientCardHeader.tsx
|
|
3101
|
+
var import_jsx_runtime17 = require("@emotion/react/jsx-runtime");
|
|
2898
3102
|
function GradientCardHeader(props) {
|
|
2899
|
-
return /* @__PURE__ */ (0,
|
|
2900
|
-
/* @__PURE__ */ (0,
|
|
2901
|
-
/* @__PURE__ */ (0,
|
|
2902
|
-
props.status,
|
|
2903
|
-
/* @__PURE__ */ (0,
|
|
3103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(CardHeaderWrapper, { children: [
|
|
3104
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Gradients, {}),
|
|
3105
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
|
|
3106
|
+
props.status && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(StatusIndicator, __spreadValues({}, props.status)),
|
|
3107
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CardHeaderTitle, { children: props.title })
|
|
2904
3108
|
] }),
|
|
2905
3109
|
props.children
|
|
2906
3110
|
] });
|
|
2907
3111
|
}
|
|
2908
|
-
var CardHeaderWrapper =
|
|
3112
|
+
var CardHeaderWrapper = import_styled16.default.div`
|
|
2909
3113
|
position: relative;
|
|
2910
3114
|
display: flex;
|
|
2911
3115
|
flex-direction: column;
|
|
@@ -2915,7 +3119,7 @@ var CardHeaderWrapper = import_styled14.default.div`
|
|
|
2915
3119
|
color: white;
|
|
2916
3120
|
height: 264px;
|
|
2917
3121
|
`;
|
|
2918
|
-
var CardHeaderTitle =
|
|
3122
|
+
var CardHeaderTitle = import_styled16.default.h3`
|
|
2919
3123
|
font-size: 21px;
|
|
2920
3124
|
font-weight: 800;
|
|
2921
3125
|
color: white;
|
|
@@ -2924,12 +3128,12 @@ var CardHeaderTitle = import_styled14.default.h3`
|
|
|
2924
3128
|
position: relative;
|
|
2925
3129
|
`;
|
|
2926
3130
|
var Gradients = () => {
|
|
2927
|
-
return /* @__PURE__ */ (0,
|
|
2928
|
-
/* @__PURE__ */ (0,
|
|
2929
|
-
/* @__PURE__ */ (0,
|
|
3131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0 }, children: [
|
|
3132
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(BackgroundGradients, {}),
|
|
3133
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AccentGradients, {})
|
|
2930
3134
|
] });
|
|
2931
3135
|
};
|
|
2932
|
-
var BackgroundGradients =
|
|
3136
|
+
var BackgroundGradients = import_styled16.default.div`
|
|
2933
3137
|
&:before,
|
|
2934
3138
|
&:after {
|
|
2935
3139
|
content: "";
|
|
@@ -2964,7 +3168,7 @@ var BackgroundGradients = import_styled14.default.div`
|
|
|
2964
3168
|
);
|
|
2965
3169
|
}
|
|
2966
3170
|
`;
|
|
2967
|
-
var AccentGradients =
|
|
3171
|
+
var AccentGradients = import_styled16.default.div`
|
|
2968
3172
|
position: absolute;
|
|
2969
3173
|
top: 0;
|
|
2970
3174
|
left: 0;
|
|
@@ -3005,18 +3209,18 @@ var AccentGradients = import_styled14.default.div`
|
|
|
3005
3209
|
`;
|
|
3006
3210
|
|
|
3007
3211
|
// src/components/LightboxImage.tsx
|
|
3008
|
-
var
|
|
3009
|
-
var
|
|
3010
|
-
var
|
|
3212
|
+
var import_styled17 = __toESM(require("@emotion/styled"), 1);
|
|
3213
|
+
var import_react17 = require("react");
|
|
3214
|
+
var import_jsx_runtime18 = require("@emotion/react/jsx-runtime");
|
|
3011
3215
|
var LightboxImage = ({ children }) => {
|
|
3012
|
-
const [isOpen, setIsOpen] = (0,
|
|
3013
|
-
const [boundingRect, setBoundingRect] = (0,
|
|
3216
|
+
const [isOpen, setIsOpen] = (0, import_react17.useState)(false);
|
|
3217
|
+
const [boundingRect, setBoundingRect] = (0, import_react17.useState)({
|
|
3014
3218
|
x: 0,
|
|
3015
3219
|
y: 0,
|
|
3016
3220
|
width: 0,
|
|
3017
3221
|
height: 0
|
|
3018
3222
|
});
|
|
3019
|
-
const imageRef = (0,
|
|
3223
|
+
const imageRef = (0, import_react17.useRef)(null);
|
|
3020
3224
|
const handleMouseUp = () => {
|
|
3021
3225
|
setIsOpen(!isOpen);
|
|
3022
3226
|
};
|
|
@@ -3032,12 +3236,12 @@ var LightboxImage = ({ children }) => {
|
|
|
3032
3236
|
});
|
|
3033
3237
|
}
|
|
3034
3238
|
};
|
|
3035
|
-
(0,
|
|
3239
|
+
(0, import_react17.useEffect)(() => {
|
|
3036
3240
|
handleSetBoundingRect(imageRef);
|
|
3037
3241
|
}, [imageRef]);
|
|
3038
|
-
return /* @__PURE__ */ (0,
|
|
3039
|
-
/* @__PURE__ */ (0,
|
|
3040
|
-
/* @__PURE__ */ (0,
|
|
3242
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
3243
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DummyImage, { isOpen, boundingRect }),
|
|
3244
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
3041
3245
|
StyledImage,
|
|
3042
3246
|
{
|
|
3043
3247
|
isOpen,
|
|
@@ -3048,13 +3252,13 @@ var LightboxImage = ({ children }) => {
|
|
|
3048
3252
|
children
|
|
3049
3253
|
}
|
|
3050
3254
|
),
|
|
3051
|
-
/* @__PURE__ */ (0,
|
|
3255
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Lightbox, { isOpen, onClick: handleMouseUp })
|
|
3052
3256
|
] });
|
|
3053
3257
|
};
|
|
3054
|
-
var DummyImage =
|
|
3258
|
+
var DummyImage = import_styled17.default.div`
|
|
3055
3259
|
${(props) => props.isOpen ? `height: ${props.boundingRect.height}px; width: ${props.boundingRect.width}px;` : ``}
|
|
3056
3260
|
`;
|
|
3057
|
-
var StyledImage =
|
|
3261
|
+
var StyledImage = import_styled17.default.div`
|
|
3058
3262
|
display: flex;
|
|
3059
3263
|
justify-content: start;
|
|
3060
3264
|
align-items: center;
|
|
@@ -3102,7 +3306,7 @@ var StyledImage = import_styled15.default.div`
|
|
|
3102
3306
|
}
|
|
3103
3307
|
}
|
|
3104
3308
|
`;
|
|
3105
|
-
var Lightbox =
|
|
3309
|
+
var Lightbox = import_styled17.default.div`
|
|
3106
3310
|
transition: opacity 0.2s ease-out;
|
|
3107
3311
|
position: fixed;
|
|
3108
3312
|
opacity: 0;
|
|
@@ -3125,11 +3329,11 @@ var Lightbox = import_styled15.default.div`
|
|
|
3125
3329
|
`;
|
|
3126
3330
|
|
|
3127
3331
|
// src/components/LightsparkProvider.tsx
|
|
3128
|
-
var
|
|
3332
|
+
var import_react20 = require("@emotion/react");
|
|
3129
3333
|
|
|
3130
3334
|
// src/styles/global.tsx
|
|
3131
|
-
var
|
|
3132
|
-
var
|
|
3335
|
+
var import_react18 = require("@emotion/react");
|
|
3336
|
+
var import_react19 = require("react");
|
|
3133
3337
|
var import_react_tooltip2 = require("react-tooltip/dist/react-tooltip.css");
|
|
3134
3338
|
var import_fonts = require("../static/fonts.css");
|
|
3135
3339
|
|
|
@@ -3139,8 +3343,8 @@ var cssVars = {
|
|
|
3139
3343
|
};
|
|
3140
3344
|
|
|
3141
3345
|
// src/styles/global.tsx
|
|
3142
|
-
var
|
|
3143
|
-
var globalComponentStyles = ({ theme }) =>
|
|
3346
|
+
var import_jsx_runtime19 = require("@emotion/react/jsx-runtime");
|
|
3347
|
+
var globalComponentStyles = ({ theme }) => import_react18.css`
|
|
3144
3348
|
@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");
|
|
3145
3349
|
|
|
3146
3350
|
html {
|
|
@@ -3215,9 +3419,9 @@ var globalComponentStyles = ({ theme }) => import_react17.css`
|
|
|
3215
3419
|
}
|
|
3216
3420
|
`;
|
|
3217
3421
|
function GlobalStyles() {
|
|
3218
|
-
const theme = (0,
|
|
3422
|
+
const theme = (0, import_react18.useTheme)();
|
|
3219
3423
|
const bg = useThemeBg();
|
|
3220
|
-
(0,
|
|
3424
|
+
(0, import_react19.useEffect)(() => {
|
|
3221
3425
|
const documentHeight = () => {
|
|
3222
3426
|
const doc = document.documentElement;
|
|
3223
3427
|
doc.style.setProperty(cssVars.docHeight, `${window.innerHeight}px`);
|
|
@@ -3226,7 +3430,7 @@ function GlobalStyles() {
|
|
|
3226
3430
|
documentHeight();
|
|
3227
3431
|
return () => window.removeEventListener("resize", documentHeight);
|
|
3228
3432
|
}, []);
|
|
3229
|
-
const globalStyles =
|
|
3433
|
+
const globalStyles = import_react18.css`
|
|
3230
3434
|
${globalComponentStyles({ theme })}
|
|
3231
3435
|
|
|
3232
3436
|
:root {
|
|
@@ -3253,29 +3457,29 @@ function GlobalStyles() {
|
|
|
3253
3457
|
height: 100%;
|
|
3254
3458
|
}
|
|
3255
3459
|
`;
|
|
3256
|
-
return /* @__PURE__ */ (0,
|
|
3460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react18.Global, { styles: globalStyles });
|
|
3257
3461
|
}
|
|
3258
3462
|
|
|
3259
3463
|
// src/components/LightsparkProvider.tsx
|
|
3260
|
-
var
|
|
3464
|
+
var import_jsx_runtime20 = require("@emotion/react/jsx-runtime");
|
|
3261
3465
|
function LightsparkProvider({ children }) {
|
|
3262
|
-
return /* @__PURE__ */ (0,
|
|
3263
|
-
/* @__PURE__ */ (0,
|
|
3466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react20.ThemeProvider, { theme: themes.light, children: [
|
|
3467
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(GlobalStyles, {}),
|
|
3264
3468
|
children
|
|
3265
3469
|
] });
|
|
3266
3470
|
}
|
|
3267
3471
|
|
|
3268
3472
|
// src/components/Modal.tsx
|
|
3269
|
-
var
|
|
3270
|
-
var
|
|
3473
|
+
var import_styled19 = __toESM(require("@emotion/styled"), 1);
|
|
3474
|
+
var import_react24 = __toESM(require("react"), 1);
|
|
3271
3475
|
var import_react_dom2 = __toESM(require("react-dom"), 1);
|
|
3272
3476
|
|
|
3273
3477
|
// src/hooks/useLiveRef.tsx
|
|
3274
|
-
var
|
|
3478
|
+
var import_react21 = require("react");
|
|
3275
3479
|
function useLiveRef() {
|
|
3276
|
-
const [ready, setReady] = (0,
|
|
3277
|
-
const ref = (0,
|
|
3278
|
-
const refCb = (0,
|
|
3480
|
+
const [ready, setReady] = (0, import_react21.useState)(false);
|
|
3481
|
+
const ref = (0, import_react21.useRef)(null);
|
|
3482
|
+
const refCb = (0, import_react21.useCallback)((node) => {
|
|
3279
3483
|
if (node !== null) {
|
|
3280
3484
|
ref.current = node;
|
|
3281
3485
|
setReady(true);
|
|
@@ -3285,8 +3489,8 @@ function useLiveRef() {
|
|
|
3285
3489
|
}
|
|
3286
3490
|
|
|
3287
3491
|
// src/utils/toReactNodes.tsx
|
|
3288
|
-
var
|
|
3289
|
-
var
|
|
3492
|
+
var import_react22 = require("react");
|
|
3493
|
+
var import_jsx_runtime21 = require("@emotion/react/jsx-runtime");
|
|
3290
3494
|
var ToReactNodesTypes = {
|
|
3291
3495
|
Link: "link"
|
|
3292
3496
|
};
|
|
@@ -3294,22 +3498,22 @@ function toReactNodes(toReactNodesArg) {
|
|
|
3294
3498
|
const toReactNodesArray = Array.isArray(toReactNodesArg) ? toReactNodesArg : [toReactNodesArg];
|
|
3295
3499
|
const reactNodes = toReactNodesArray.map((node, i) => {
|
|
3296
3500
|
if (typeof node === "string") {
|
|
3297
|
-
return /* @__PURE__ */ (0,
|
|
3501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react22.Fragment, { children: node.split("\n").map((str, j, strArr) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react22.Fragment, { children: [
|
|
3298
3502
|
str,
|
|
3299
|
-
j < strArr.length - 1 && /* @__PURE__ */ (0,
|
|
3503
|
+
j < strArr.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("br", {})
|
|
3300
3504
|
] }, `str-${i}-break-${j}`)) }, `str-${i}`);
|
|
3301
3505
|
} else if (node.type === ToReactNodesTypes.Link) {
|
|
3302
|
-
return /* @__PURE__ */ (0,
|
|
3506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Link, { to: node.to, children: node.text }, `link-${i}`);
|
|
3303
3507
|
}
|
|
3304
3508
|
return null;
|
|
3305
3509
|
});
|
|
3306
|
-
return /* @__PURE__ */ (0,
|
|
3510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react22.Fragment, { children: reactNodes });
|
|
3307
3511
|
}
|
|
3308
3512
|
|
|
3309
3513
|
// src/components/ProgressBar.tsx
|
|
3310
|
-
var
|
|
3311
|
-
var
|
|
3312
|
-
var
|
|
3514
|
+
var import_styled18 = __toESM(require("@emotion/styled"), 1);
|
|
3515
|
+
var import_react23 = require("react");
|
|
3516
|
+
var import_jsx_runtime22 = require("@emotion/react/jsx-runtime");
|
|
3313
3517
|
var defaultProps2 = {
|
|
3314
3518
|
isSm: false,
|
|
3315
3519
|
stepDuration: 0.5
|
|
@@ -3320,8 +3524,8 @@ function ProgressBar({
|
|
|
3320
3524
|
isSm = defaultProps2.isSm,
|
|
3321
3525
|
stepDuration = defaultProps2.stepDuration
|
|
3322
3526
|
}) {
|
|
3323
|
-
const [percentage, setPercentage] = (0,
|
|
3324
|
-
(0,
|
|
3527
|
+
const [percentage, setPercentage] = (0, import_react23.useState)(5);
|
|
3528
|
+
(0, import_react23.useEffect)(() => {
|
|
3325
3529
|
if (progressPercentage !== void 0) {
|
|
3326
3530
|
setPercentage(progressPercentage);
|
|
3327
3531
|
} else {
|
|
@@ -3330,7 +3534,7 @@ function ProgressBar({
|
|
|
3330
3534
|
}, 0);
|
|
3331
3535
|
}
|
|
3332
3536
|
}, [progressPercentage]);
|
|
3333
|
-
return /* @__PURE__ */ (0,
|
|
3537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ProgressBarContainer, { isSm, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Bar, { isSm, percentage, stepDuration, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3334
3538
|
BarBg,
|
|
3335
3539
|
{
|
|
3336
3540
|
background,
|
|
@@ -3341,7 +3545,7 @@ function ProgressBar({
|
|
|
3341
3545
|
) }) });
|
|
3342
3546
|
}
|
|
3343
3547
|
ProgressBar.defaultProps = defaultProps2;
|
|
3344
|
-
var ProgressBarContainer =
|
|
3548
|
+
var ProgressBarContainer = import_styled18.default.div`
|
|
3345
3549
|
${standardBorderRadius(16)}
|
|
3346
3550
|
background-color: ${({ theme }) => themeOr(theme.c05Neutral, theme.c1Neutral)({ theme })};
|
|
3347
3551
|
box-sizing: border-box;
|
|
@@ -3351,7 +3555,7 @@ var ProgressBarContainer = import_styled16.default.div`
|
|
|
3351
3555
|
width: 100%;
|
|
3352
3556
|
position: relative;
|
|
3353
3557
|
`;
|
|
3354
|
-
var BarBg =
|
|
3558
|
+
var BarBg = import_styled18.default.div`
|
|
3355
3559
|
${standardBorderRadius(16)}
|
|
3356
3560
|
width: ${({ percentage }) => 100 / percentage * 100}%;
|
|
3357
3561
|
height: 100%;
|
|
@@ -3365,7 +3569,7 @@ var BarBg = import_styled16.default.div`
|
|
|
3365
3569
|
#3f2e7e 115.32%
|
|
3366
3570
|
)`};
|
|
3367
3571
|
`;
|
|
3368
|
-
var Bar =
|
|
3572
|
+
var Bar = import_styled18.default.div`
|
|
3369
3573
|
${standardBorderRadius(16)}
|
|
3370
3574
|
overflow: hidden;
|
|
3371
3575
|
box-sizing: border-box;
|
|
@@ -3377,7 +3581,7 @@ var Bar = import_styled16.default.div`
|
|
|
3377
3581
|
`;
|
|
3378
3582
|
|
|
3379
3583
|
// src/components/Modal.tsx
|
|
3380
|
-
var
|
|
3584
|
+
var import_jsx_runtime23 = require("@emotion/react/jsx-runtime");
|
|
3381
3585
|
function Modal({
|
|
3382
3586
|
visible,
|
|
3383
3587
|
title,
|
|
@@ -3399,24 +3603,24 @@ function Modal({
|
|
|
3399
3603
|
width = 460,
|
|
3400
3604
|
progressBar
|
|
3401
3605
|
}) {
|
|
3402
|
-
const visibleChangedRef = (0,
|
|
3403
|
-
const nodeRef = (0,
|
|
3606
|
+
const visibleChangedRef = (0, import_react24.useRef)(false);
|
|
3607
|
+
const nodeRef = (0, import_react24.useRef)(null);
|
|
3404
3608
|
const [defaultFirstFocusRef, defaultFirstFocusRefCb] = useLiveRef();
|
|
3405
3609
|
const ref = firstFocusRef || defaultFirstFocusRef;
|
|
3406
|
-
const [nodeReady, setNodeReady] =
|
|
3407
|
-
const overlayRef = (0,
|
|
3408
|
-
const prevFocusedElement = (0,
|
|
3409
|
-
const modalContainerRef = (0,
|
|
3610
|
+
const [nodeReady, setNodeReady] = import_react24.default.useState(false);
|
|
3611
|
+
const overlayRef = (0, import_react24.useRef)(null);
|
|
3612
|
+
const prevFocusedElement = (0, import_react24.useRef)();
|
|
3613
|
+
const modalContainerRef = (0, import_react24.useRef)(null);
|
|
3410
3614
|
const bp2 = useBreakpoints();
|
|
3411
3615
|
const isSm = bp2.current("sm" /* sm */);
|
|
3412
3616
|
const formattedDescription = description ? toReactNodes(description) : null;
|
|
3413
|
-
(0,
|
|
3617
|
+
(0, import_react24.useEffect)(() => {
|
|
3414
3618
|
if (visible !== visibleChangedRef.current) {
|
|
3415
3619
|
visibleChangedRef.current = visible;
|
|
3416
3620
|
}
|
|
3417
3621
|
}, [visible]);
|
|
3418
3622
|
const visibleChanged = visible !== visibleChangedRef.current;
|
|
3419
|
-
(0,
|
|
3623
|
+
(0, import_react24.useEffect)(() => {
|
|
3420
3624
|
prevFocusedElement.current = document.activeElement;
|
|
3421
3625
|
if (!nodeRef.current) {
|
|
3422
3626
|
nodeRef.current = document.createElement("div");
|
|
@@ -3430,7 +3634,7 @@ function Modal({
|
|
|
3430
3634
|
}
|
|
3431
3635
|
};
|
|
3432
3636
|
}, []);
|
|
3433
|
-
(0,
|
|
3637
|
+
(0, import_react24.useEffect)(() => {
|
|
3434
3638
|
const handleOutsideClick = (event) => {
|
|
3435
3639
|
if (visible && overlayRef.current && event.target && overlayRef.current.contains(event.target) && !nonDismissable) {
|
|
3436
3640
|
onClose();
|
|
@@ -3467,7 +3671,7 @@ function Modal({
|
|
|
3467
3671
|
}
|
|
3468
3672
|
};
|
|
3469
3673
|
}, [onClose, visible, nonDismissable]);
|
|
3470
|
-
(0,
|
|
3674
|
+
(0, import_react24.useLayoutEffect)(() => {
|
|
3471
3675
|
if (visible) {
|
|
3472
3676
|
if (visibleChanged) {
|
|
3473
3677
|
prevFocusedElement.current = document.activeElement;
|
|
@@ -3496,9 +3700,9 @@ function Modal({
|
|
|
3496
3700
|
onClose();
|
|
3497
3701
|
}
|
|
3498
3702
|
}
|
|
3499
|
-
const modalContent = /* @__PURE__ */ (0,
|
|
3500
|
-
/* @__PURE__ */ (0,
|
|
3501
|
-
/* @__PURE__ */ (0,
|
|
3703
|
+
const modalContent = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react24.Fragment, { children: [
|
|
3704
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ModalOverlay, { ref: overlayRef }),
|
|
3705
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3502
3706
|
ModalContainer,
|
|
3503
3707
|
{
|
|
3504
3708
|
"aria-modal": true,
|
|
@@ -3506,22 +3710,22 @@ function Modal({
|
|
|
3506
3710
|
tabIndex: -1,
|
|
3507
3711
|
role: "dialog",
|
|
3508
3712
|
ref: modalContainerRef,
|
|
3509
|
-
children: /* @__PURE__ */ (0,
|
|
3510
|
-
!firstFocusRef && /* @__PURE__ */ (0,
|
|
3511
|
-
!(nonDismissable || ghost) && /* @__PURE__ */ (0,
|
|
3512
|
-
/* @__PURE__ */ (0,
|
|
3513
|
-
progressBar ? /* @__PURE__ */ (0,
|
|
3713
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(ModalContent, { width, ghost, children: [
|
|
3714
|
+
!firstFocusRef && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DefaultFocusTarget, { ref: defaultFirstFocusRefCb }),
|
|
3715
|
+
!(nonDismissable || ghost) && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CloseButton, { onClick: onClickCloseButton, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { name: "Close", width: 9 }) }),
|
|
3716
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(ModalContentInner, { ghost, children: [
|
|
3717
|
+
progressBar ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { css: { marginBottom: "20px" }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3514
3718
|
ProgressBar,
|
|
3515
3719
|
{
|
|
3516
3720
|
progressPercentage: progressBar.progressPercentage,
|
|
3517
3721
|
isSm: progressBar.isSm
|
|
3518
3722
|
}
|
|
3519
3723
|
) }) : null,
|
|
3520
|
-
title ? /* @__PURE__ */ (0,
|
|
3521
|
-
formattedDescription ? /* @__PURE__ */ (0,
|
|
3522
|
-
/* @__PURE__ */ (0,
|
|
3523
|
-
onSubmit || onCancel ? /* @__PURE__ */ (0,
|
|
3524
|
-
!isSm && !cancelHidden && /* @__PURE__ */ (0,
|
|
3724
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h4", { children: title }) : null,
|
|
3725
|
+
formattedDescription ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Description, { children: formattedDescription }) : null,
|
|
3726
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { children }),
|
|
3727
|
+
onSubmit || onCancel ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(ModalButtonRow, { children: [
|
|
3728
|
+
!isSm && !cancelHidden && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3525
3729
|
Button,
|
|
3526
3730
|
{
|
|
3527
3731
|
disabled: cancelDisabled,
|
|
@@ -3529,7 +3733,7 @@ function Modal({
|
|
|
3529
3733
|
text: cancelText
|
|
3530
3734
|
}
|
|
3531
3735
|
),
|
|
3532
|
-
onSubmit && /* @__PURE__ */ (0,
|
|
3736
|
+
onSubmit && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3533
3737
|
Button,
|
|
3534
3738
|
{
|
|
3535
3739
|
disabled: submitDisabled,
|
|
@@ -3539,7 +3743,7 @@ function Modal({
|
|
|
3539
3743
|
type: "submit"
|
|
3540
3744
|
}
|
|
3541
3745
|
),
|
|
3542
|
-
isSm && !cancelHidden && /* @__PURE__ */ (0,
|
|
3746
|
+
isSm && !cancelHidden && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { onClick: onClose, text: cancelText })
|
|
3543
3747
|
] }) : null
|
|
3544
3748
|
] })
|
|
3545
3749
|
] })
|
|
@@ -3547,17 +3751,17 @@ function Modal({
|
|
|
3547
3751
|
)
|
|
3548
3752
|
] });
|
|
3549
3753
|
return visible && nodeReady && nodeRef.current ? import_react_dom2.default.createPortal(
|
|
3550
|
-
onSubmit ? /* @__PURE__ */ (0,
|
|
3754
|
+
onSubmit ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("form", { onSubmit: onSubmitForm, children: modalContent }) : modalContent,
|
|
3551
3755
|
nodeRef.current
|
|
3552
3756
|
) : null;
|
|
3553
3757
|
}
|
|
3554
|
-
var DefaultFocusTarget = (0,
|
|
3758
|
+
var DefaultFocusTarget = (0, import_styled19.default)(UnstyledButton)`
|
|
3555
3759
|
position: absolute;
|
|
3556
3760
|
top: -30px;
|
|
3557
3761
|
width: 0;
|
|
3558
3762
|
height: 0;
|
|
3559
3763
|
`;
|
|
3560
|
-
var ModalOverlay =
|
|
3764
|
+
var ModalOverlay = import_styled19.default.div`
|
|
3561
3765
|
position: fixed;
|
|
3562
3766
|
bottom: 0;
|
|
3563
3767
|
left: 0;
|
|
@@ -3567,7 +3771,7 @@ var ModalOverlay = import_styled17.default.div`
|
|
|
3567
3771
|
background: rgba(0, 0, 0, 0.5);
|
|
3568
3772
|
backdrop-filter: blur(2px);
|
|
3569
3773
|
`;
|
|
3570
|
-
var ModalContainer =
|
|
3774
|
+
var ModalContainer = import_styled19.default.div`
|
|
3571
3775
|
pointer-events: none;
|
|
3572
3776
|
position: fixed;
|
|
3573
3777
|
top: 0;
|
|
@@ -3585,14 +3789,14 @@ var ModalContainer = import_styled17.default.div`
|
|
|
3585
3789
|
padding-top: ${standardContentInset.smPx}px;
|
|
3586
3790
|
`;
|
|
3587
3791
|
var contentTopMarginPx = 24;
|
|
3588
|
-
var Description =
|
|
3792
|
+
var Description = import_styled19.default.div`
|
|
3589
3793
|
color: ${({ theme }) => theme.mcNeutral};
|
|
3590
3794
|
margin-top: 4px;
|
|
3591
3795
|
& + * {
|
|
3592
3796
|
margin-top: ${contentTopMarginPx}px;
|
|
3593
3797
|
}
|
|
3594
3798
|
`;
|
|
3595
|
-
var ModalButtonRow =
|
|
3799
|
+
var ModalButtonRow = import_styled19.default.div`
|
|
3596
3800
|
margin-top: 32px;
|
|
3597
3801
|
${bp.minSm(`display: flex;`)}
|
|
3598
3802
|
gap: 10px;
|
|
@@ -3610,7 +3814,7 @@ var ModalButtonRow = import_styled17.default.div`
|
|
|
3610
3814
|
`)}
|
|
3611
3815
|
}
|
|
3612
3816
|
`;
|
|
3613
|
-
var ModalContent =
|
|
3817
|
+
var ModalContent = import_styled19.default.div`
|
|
3614
3818
|
${overflowAutoWithoutScrollbars}
|
|
3615
3819
|
${standardContentInset.smCSS}
|
|
3616
3820
|
${standardBorderRadius(16)}
|
|
@@ -3632,12 +3836,12 @@ var ModalContent = import_styled17.default.div`
|
|
|
3632
3836
|
}
|
|
3633
3837
|
}
|
|
3634
3838
|
`;
|
|
3635
|
-
var CloseButton = (0,
|
|
3839
|
+
var CloseButton = (0, import_styled19.default)(UnstyledButton)`
|
|
3636
3840
|
${standardFocusOutline}
|
|
3637
3841
|
width: 24px;
|
|
3638
3842
|
height: 24px;
|
|
3639
3843
|
`;
|
|
3640
|
-
var ModalContentInner =
|
|
3844
|
+
var ModalContentInner = import_styled19.default.div`
|
|
3641
3845
|
${(props) => props.ghost ? "" : "padding: 32px 24px 0;"}
|
|
3642
3846
|
${(props) => props.ghost ? "" : `${bp.sm(`
|
|
3643
3847
|
padding-left: 10px;
|
|
@@ -3646,9 +3850,9 @@ var ModalContentInner = import_styled17.default.div`
|
|
|
3646
3850
|
`;
|
|
3647
3851
|
|
|
3648
3852
|
// src/components/Pill.tsx
|
|
3649
|
-
var
|
|
3650
|
-
var
|
|
3651
|
-
var
|
|
3853
|
+
var import_styled20 = __toESM(require("@emotion/styled"), 1);
|
|
3854
|
+
var import_react25 = require("react");
|
|
3855
|
+
var import_jsx_runtime24 = require("@emotion/react/jsx-runtime");
|
|
3652
3856
|
function Pill({
|
|
3653
3857
|
text,
|
|
3654
3858
|
onDeleteMouseDown,
|
|
@@ -3667,8 +3871,8 @@ function Pill({
|
|
|
3667
3871
|
onBlurTextInput = () => {
|
|
3668
3872
|
}
|
|
3669
3873
|
}) {
|
|
3670
|
-
const textInputRef = (0,
|
|
3671
|
-
(0,
|
|
3874
|
+
const textInputRef = (0, import_react25.useRef)(null);
|
|
3875
|
+
(0, import_react25.useEffect)(() => {
|
|
3672
3876
|
if (isEditing && textInputRef.current) {
|
|
3673
3877
|
textInputRef.current.focus();
|
|
3674
3878
|
}
|
|
@@ -3687,7 +3891,7 @@ function Pill({
|
|
|
3687
3891
|
}
|
|
3688
3892
|
}
|
|
3689
3893
|
}
|
|
3690
|
-
return /* @__PURE__ */ (0,
|
|
3894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
3691
3895
|
StyledPill,
|
|
3692
3896
|
{
|
|
3693
3897
|
hasIcon: Boolean(icon || loading || onDeleteMouseDown),
|
|
@@ -3699,7 +3903,7 @@ function Pill({
|
|
|
3699
3903
|
}
|
|
3700
3904
|
},
|
|
3701
3905
|
children: [
|
|
3702
|
-
isEditing ? /* @__PURE__ */ (0,
|
|
3906
|
+
isEditing ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3703
3907
|
PillInput,
|
|
3704
3908
|
{
|
|
3705
3909
|
value: text,
|
|
@@ -3708,14 +3912,14 @@ function Pill({
|
|
|
3708
3912
|
onBlur: onBlurTextInput,
|
|
3709
3913
|
ref: textInputRef
|
|
3710
3914
|
}
|
|
3711
|
-
) : /* @__PURE__ */ (0,
|
|
3712
|
-
(icon || loading || onDeleteMouseDown) && /* @__PURE__ */ (0,
|
|
3915
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(PillText, { children: text }),
|
|
3916
|
+
(icon || loading || onDeleteMouseDown) && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
3713
3917
|
PillIconContainer,
|
|
3714
3918
|
{
|
|
3715
3919
|
hasIconInset: Boolean(icon && !loading && !onDeleteMouseDown),
|
|
3716
3920
|
children: [
|
|
3717
|
-
loading && /* @__PURE__ */ (0,
|
|
3718
|
-
!loading && onDeleteMouseDown && /* @__PURE__ */ (0,
|
|
3921
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Loading, { size: 16.1, center: false, ml: 5 }),
|
|
3922
|
+
!loading && onDeleteMouseDown && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3719
3923
|
UnstyledButton,
|
|
3720
3924
|
{
|
|
3721
3925
|
onMouseDown: handleOnDeleteMouseDown,
|
|
@@ -3726,10 +3930,10 @@ function Pill({
|
|
|
3726
3930
|
padding: "10px",
|
|
3727
3931
|
marginRight: "-10px"
|
|
3728
3932
|
},
|
|
3729
|
-
children: /* @__PURE__ */ (0,
|
|
3933
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { name: "DeleteIcon", width: 16.1 })
|
|
3730
3934
|
}
|
|
3731
3935
|
),
|
|
3732
|
-
!loading && icon && !onDeleteMouseDown && /* @__PURE__ */ (0,
|
|
3936
|
+
!loading && icon && !onDeleteMouseDown && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { name: icon, width: 16.1, color: colors.white })
|
|
3733
3937
|
]
|
|
3734
3938
|
}
|
|
3735
3939
|
)
|
|
@@ -3737,7 +3941,7 @@ function Pill({
|
|
|
3737
3941
|
}
|
|
3738
3942
|
);
|
|
3739
3943
|
}
|
|
3740
|
-
var PillText =
|
|
3944
|
+
var PillText = import_styled20.default.div`
|
|
3741
3945
|
/* For mobile ensure empty values don't prevent div from having height: */
|
|
3742
3946
|
height: 1.2rem;
|
|
3743
3947
|
min-width: 100px;
|
|
@@ -3747,7 +3951,7 @@ var PillText = import_styled18.default.div`
|
|
|
3747
3951
|
overflow: hidden;
|
|
3748
3952
|
font-weight: 600;
|
|
3749
3953
|
`;
|
|
3750
|
-
var StyledPill =
|
|
3954
|
+
var StyledPill = import_styled20.default.div`
|
|
3751
3955
|
* + & {
|
|
3752
3956
|
margin-top: 16px;
|
|
3753
3957
|
}
|
|
@@ -3761,7 +3965,7 @@ var StyledPill = import_styled18.default.div`
|
|
|
3761
3965
|
cursor: ${({ cursor }) => cursor};
|
|
3762
3966
|
position: relative;
|
|
3763
3967
|
`;
|
|
3764
|
-
var PillIconContainer =
|
|
3968
|
+
var PillIconContainer = import_styled20.default.div`
|
|
3765
3969
|
${flexCenter}
|
|
3766
3970
|
${({ hasIconInset }) => hasIconInset ? `
|
|
3767
3971
|
background-color: ${colors.blue43};
|
|
@@ -3772,7 +3976,7 @@ var PillIconContainer = import_styled18.default.div`
|
|
|
3772
3976
|
margin-left: 12px;
|
|
3773
3977
|
position: absolute;
|
|
3774
3978
|
`;
|
|
3775
|
-
var PillInput =
|
|
3979
|
+
var PillInput = import_styled20.default.input`
|
|
3776
3980
|
background-color: transparent;
|
|
3777
3981
|
border: none;
|
|
3778
3982
|
outline: none;
|
|
@@ -3790,11 +3994,11 @@ var PillInput = import_styled18.default.input`
|
|
|
3790
3994
|
`;
|
|
3791
3995
|
|
|
3792
3996
|
// src/components/SecretContainer.tsx
|
|
3793
|
-
var
|
|
3794
|
-
var
|
|
3997
|
+
var import_styled21 = __toESM(require("@emotion/styled"), 1);
|
|
3998
|
+
var import_jsx_runtime25 = require("@emotion/react/jsx-runtime");
|
|
3795
3999
|
function SecretContainer(props) {
|
|
3796
|
-
return props.secret ? /* @__PURE__ */ (0,
|
|
3797
|
-
/* @__PURE__ */ (0,
|
|
4000
|
+
return props.secret ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(StyledSecretContainer, { hasSecret: true, success: props.success, children: [
|
|
4001
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3798
4002
|
"span",
|
|
3799
4003
|
{
|
|
3800
4004
|
style: {
|
|
@@ -3806,10 +4010,10 @@ function SecretContainer(props) {
|
|
|
3806
4010
|
children: props.secret
|
|
3807
4011
|
}
|
|
3808
4012
|
),
|
|
3809
|
-
/* @__PURE__ */ (0,
|
|
3810
|
-
] }) : /* @__PURE__ */ (0,
|
|
4013
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CopyToClipboardButton, { value: props.secret, isSm: true, ml: 4 })
|
|
4014
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(StyledSecretContainer, { hasSecret: false, children: "There are no tokens associated with this account" });
|
|
3811
4015
|
}
|
|
3812
|
-
var StyledSecretContainer =
|
|
4016
|
+
var StyledSecretContainer = import_styled21.default.div`
|
|
3813
4017
|
background-color: ${({ theme, hasSecret, success }) => hasSecret ? success ? theme.success : theme.c05Neutral : theme.bg};
|
|
3814
4018
|
${standardBorderRadius(8)}
|
|
3815
4019
|
padding: 18px 20px;
|
|
@@ -3821,14 +4025,14 @@ var StyledSecretContainer = import_styled19.default.div`
|
|
|
3821
4025
|
`;
|
|
3822
4026
|
|
|
3823
4027
|
// src/components/TextIconAligner.tsx
|
|
3824
|
-
var
|
|
4028
|
+
var import_jsx_runtime26 = require("@emotion/react/jsx-runtime");
|
|
3825
4029
|
function TextIconAligner({
|
|
3826
4030
|
text,
|
|
3827
4031
|
rightIcon,
|
|
3828
4032
|
leftIcon,
|
|
3829
4033
|
onClick
|
|
3830
4034
|
}) {
|
|
3831
|
-
const leftIconNode = leftIcon ? /* @__PURE__ */ (0,
|
|
4035
|
+
const leftIconNode = leftIcon ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3832
4036
|
Icon,
|
|
3833
4037
|
{
|
|
3834
4038
|
name: leftIcon.name,
|
|
@@ -3837,7 +4041,7 @@ function TextIconAligner({
|
|
|
3837
4041
|
color: leftIcon.color
|
|
3838
4042
|
}
|
|
3839
4043
|
) : null;
|
|
3840
|
-
const rightIconNode = rightIcon ? /* @__PURE__ */ (0,
|
|
4044
|
+
const rightIconNode = rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3841
4045
|
Icon,
|
|
3842
4046
|
{
|
|
3843
4047
|
name: rightIcon.name,
|
|
@@ -3846,7 +4050,7 @@ function TextIconAligner({
|
|
|
3846
4050
|
color: rightIcon.color
|
|
3847
4051
|
}
|
|
3848
4052
|
) : null;
|
|
3849
|
-
return /* @__PURE__ */ (0,
|
|
4053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
3850
4054
|
"span",
|
|
3851
4055
|
{
|
|
3852
4056
|
css: {
|
|
@@ -3876,6 +4080,7 @@ function TextIconAligner({
|
|
|
3876
4080
|
CardPageFullWidth,
|
|
3877
4081
|
CardPageRightContentInner,
|
|
3878
4082
|
CardPageSubtitle,
|
|
4083
|
+
CodeBlock,
|
|
3879
4084
|
Collapsible,
|
|
3880
4085
|
CommandKey,
|
|
3881
4086
|
CopyToClipboardButton,
|
|
@@ -3884,6 +4089,7 @@ function TextIconAligner({
|
|
|
3884
4089
|
GradientCardHeader,
|
|
3885
4090
|
Icon,
|
|
3886
4091
|
IconContainer,
|
|
4092
|
+
InlineCode,
|
|
3887
4093
|
LightTooltip,
|
|
3888
4094
|
LightboxImage,
|
|
3889
4095
|
LightsparkProvider,
|
|
@@ -3893,7 +4099,9 @@ function TextIconAligner({
|
|
|
3893
4099
|
Pill,
|
|
3894
4100
|
ProgressBar,
|
|
3895
4101
|
SecretContainer,
|
|
4102
|
+
StatusIndicator,
|
|
3896
4103
|
StyledButton,
|
|
4104
|
+
StyledCodeBlock,
|
|
3897
4105
|
TextIconAligner,
|
|
3898
4106
|
UnstyledButton
|
|
3899
4107
|
});
|