@lightsparkdev/ui 0.0.12 → 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 +9 -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/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/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/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 +116 -90
- package/dist/components/index.d.cts +2 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +13 -9
- 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 +3 -3
- package/dist/styles/fonts/typography/index.js +7 -7
- 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/toReactNodes.cjs +2 -0
- package/dist/utils/toReactNodes.js +2 -2
- package/package.json +2 -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-VZX5ETRB.js → chunk-A3ZJ2C7J.js} +6 -6
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
type StatusIndicatorColors = "success" | "warning" | "danger" | "text" | "c4Neutral";
|
|
4
|
+
type StatusIndicatorProps = {
|
|
5
|
+
color?: StatusIndicatorColors;
|
|
6
|
+
text: string;
|
|
7
|
+
size?: 12 | 14;
|
|
8
|
+
fontWeight?: 500 | 700;
|
|
9
|
+
};
|
|
10
|
+
declare function StatusIndicator({ color, text, size, fontWeight, }: StatusIndicatorProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { StatusIndicator, StatusIndicatorColors, StatusIndicatorProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
type StatusIndicatorColors = "success" | "warning" | "danger" | "text" | "c4Neutral";
|
|
4
|
+
type StatusIndicatorProps = {
|
|
5
|
+
color?: StatusIndicatorColors;
|
|
6
|
+
text: string;
|
|
7
|
+
size?: 12 | 14;
|
|
8
|
+
fontWeight?: 500 | 700;
|
|
9
|
+
};
|
|
10
|
+
declare function StatusIndicator({ color, text, size, fontWeight, }: StatusIndicatorProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { StatusIndicator, StatusIndicatorColors, StatusIndicatorProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
StatusIndicator
|
|
3
|
+
} from "../chunk-34CIJVQQ.js";
|
|
4
|
+
import "../chunk-FCZJILMW.js";
|
|
5
|
+
import "../chunk-JK4BP73A.js";
|
|
6
|
+
import "../chunk-2VBDEO6M.js";
|
|
7
|
+
import "../chunk-E4EXM4SY.js";
|
|
8
|
+
import "../chunk-JSGRNWSB.js";
|
|
9
|
+
import "../chunk-CIGAQ47A.js";
|
|
10
|
+
export {
|
|
11
|
+
StatusIndicator
|
|
12
|
+
};
|
|
@@ -97,6 +97,7 @@ __export(components_exports, {
|
|
|
97
97
|
Pill: () => Pill,
|
|
98
98
|
ProgressBar: () => ProgressBar,
|
|
99
99
|
SecretContainer: () => SecretContainer,
|
|
100
|
+
StatusIndicator: () => StatusIndicator,
|
|
100
101
|
StyledButton: () => StyledButton,
|
|
101
102
|
StyledCodeBlock: () => StyledCodeBlock,
|
|
102
103
|
TextIconAligner: () => TextIconAligner,
|
|
@@ -1460,7 +1461,7 @@ var overlaySurface = ({
|
|
|
1460
1461
|
|
|
1461
1462
|
// src/components/Badge.tsx
|
|
1462
1463
|
var import_jsx_runtime2 = require("@emotion/react/jsx-runtime");
|
|
1463
|
-
function Badge({ text, ml = 0 }) {
|
|
1464
|
+
function Badge({ text, ml = 0, mr = 0 }) {
|
|
1464
1465
|
return text ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(StyledBadge, { ml, children: text }) : null;
|
|
1465
1466
|
}
|
|
1466
1467
|
var badgeVPadding = 2;
|
|
@@ -1513,6 +1514,7 @@ function replaceParams(to, params) {
|
|
|
1513
1514
|
}
|
|
1514
1515
|
function Link({
|
|
1515
1516
|
to,
|
|
1517
|
+
id,
|
|
1516
1518
|
externalLink,
|
|
1517
1519
|
params,
|
|
1518
1520
|
children,
|
|
@@ -1545,6 +1547,7 @@ function Link({
|
|
|
1545
1547
|
import_react_router_dom.Link,
|
|
1546
1548
|
{
|
|
1547
1549
|
to: toStr,
|
|
1550
|
+
id,
|
|
1548
1551
|
css: css9,
|
|
1549
1552
|
onClick,
|
|
1550
1553
|
className,
|
|
@@ -1887,6 +1890,7 @@ function Button({
|
|
|
1887
1890
|
ghost = false,
|
|
1888
1891
|
text,
|
|
1889
1892
|
to,
|
|
1893
|
+
id,
|
|
1890
1894
|
hash,
|
|
1891
1895
|
href,
|
|
1892
1896
|
toParams,
|
|
@@ -1943,6 +1947,7 @@ function Button({
|
|
|
1943
1947
|
] });
|
|
1944
1948
|
const isSingleCharRoundButton = Boolean(text && text.length === 1 && !icon);
|
|
1945
1949
|
const commonProps = {
|
|
1950
|
+
id,
|
|
1946
1951
|
backgroundColor: backgroundColor2,
|
|
1947
1952
|
color,
|
|
1948
1953
|
hoverColor,
|
|
@@ -3048,8 +3053,9 @@ var shorttext = (unit, value) => {
|
|
|
3048
3053
|
return `sat${pl ? "s" : ""}`;
|
|
3049
3054
|
case import_core.CurrencyUnit.MILLISATOSHI:
|
|
3050
3055
|
return `msat${pl ? "s" : ""}`;
|
|
3056
|
+
default:
|
|
3057
|
+
return unit;
|
|
3051
3058
|
}
|
|
3052
|
-
return unit;
|
|
3053
3059
|
};
|
|
3054
3060
|
var StyledCurrencyAmount = import_styled14.default.span`
|
|
3055
3061
|
color: inherit !important;
|
|
@@ -3072,19 +3078,38 @@ CurrencyAmount.fragments = {
|
|
|
3072
3078
|
};
|
|
3073
3079
|
|
|
3074
3080
|
// src/components/GradientCardHeader.tsx
|
|
3081
|
+
var import_styled16 = __toESM(require("@emotion/styled"), 1);
|
|
3082
|
+
|
|
3083
|
+
// src/components/StatusIndicator.tsx
|
|
3075
3084
|
var import_styled15 = __toESM(require("@emotion/styled"), 1);
|
|
3076
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");
|
|
3077
3102
|
function GradientCardHeader(props) {
|
|
3078
|
-
return /* @__PURE__ */ (0,
|
|
3079
|
-
/* @__PURE__ */ (0,
|
|
3080
|
-
/* @__PURE__ */ (0,
|
|
3081
|
-
props.status,
|
|
3082
|
-
/* @__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 })
|
|
3083
3108
|
] }),
|
|
3084
3109
|
props.children
|
|
3085
3110
|
] });
|
|
3086
3111
|
}
|
|
3087
|
-
var CardHeaderWrapper =
|
|
3112
|
+
var CardHeaderWrapper = import_styled16.default.div`
|
|
3088
3113
|
position: relative;
|
|
3089
3114
|
display: flex;
|
|
3090
3115
|
flex-direction: column;
|
|
@@ -3094,7 +3119,7 @@ var CardHeaderWrapper = import_styled15.default.div`
|
|
|
3094
3119
|
color: white;
|
|
3095
3120
|
height: 264px;
|
|
3096
3121
|
`;
|
|
3097
|
-
var CardHeaderTitle =
|
|
3122
|
+
var CardHeaderTitle = import_styled16.default.h3`
|
|
3098
3123
|
font-size: 21px;
|
|
3099
3124
|
font-weight: 800;
|
|
3100
3125
|
color: white;
|
|
@@ -3103,12 +3128,12 @@ var CardHeaderTitle = import_styled15.default.h3`
|
|
|
3103
3128
|
position: relative;
|
|
3104
3129
|
`;
|
|
3105
3130
|
var Gradients = () => {
|
|
3106
|
-
return /* @__PURE__ */ (0,
|
|
3107
|
-
/* @__PURE__ */ (0,
|
|
3108
|
-
/* @__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, {})
|
|
3109
3134
|
] });
|
|
3110
3135
|
};
|
|
3111
|
-
var BackgroundGradients =
|
|
3136
|
+
var BackgroundGradients = import_styled16.default.div`
|
|
3112
3137
|
&:before,
|
|
3113
3138
|
&:after {
|
|
3114
3139
|
content: "";
|
|
@@ -3143,7 +3168,7 @@ var BackgroundGradients = import_styled15.default.div`
|
|
|
3143
3168
|
);
|
|
3144
3169
|
}
|
|
3145
3170
|
`;
|
|
3146
|
-
var AccentGradients =
|
|
3171
|
+
var AccentGradients = import_styled16.default.div`
|
|
3147
3172
|
position: absolute;
|
|
3148
3173
|
top: 0;
|
|
3149
3174
|
left: 0;
|
|
@@ -3184,9 +3209,9 @@ var AccentGradients = import_styled15.default.div`
|
|
|
3184
3209
|
`;
|
|
3185
3210
|
|
|
3186
3211
|
// src/components/LightboxImage.tsx
|
|
3187
|
-
var
|
|
3212
|
+
var import_styled17 = __toESM(require("@emotion/styled"), 1);
|
|
3188
3213
|
var import_react17 = require("react");
|
|
3189
|
-
var
|
|
3214
|
+
var import_jsx_runtime18 = require("@emotion/react/jsx-runtime");
|
|
3190
3215
|
var LightboxImage = ({ children }) => {
|
|
3191
3216
|
const [isOpen, setIsOpen] = (0, import_react17.useState)(false);
|
|
3192
3217
|
const [boundingRect, setBoundingRect] = (0, import_react17.useState)({
|
|
@@ -3214,9 +3239,9 @@ var LightboxImage = ({ children }) => {
|
|
|
3214
3239
|
(0, import_react17.useEffect)(() => {
|
|
3215
3240
|
handleSetBoundingRect(imageRef);
|
|
3216
3241
|
}, [imageRef]);
|
|
3217
|
-
return /* @__PURE__ */ (0,
|
|
3218
|
-
/* @__PURE__ */ (0,
|
|
3219
|
-
/* @__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)(
|
|
3220
3245
|
StyledImage,
|
|
3221
3246
|
{
|
|
3222
3247
|
isOpen,
|
|
@@ -3227,13 +3252,13 @@ var LightboxImage = ({ children }) => {
|
|
|
3227
3252
|
children
|
|
3228
3253
|
}
|
|
3229
3254
|
),
|
|
3230
|
-
/* @__PURE__ */ (0,
|
|
3255
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Lightbox, { isOpen, onClick: handleMouseUp })
|
|
3231
3256
|
] });
|
|
3232
3257
|
};
|
|
3233
|
-
var DummyImage =
|
|
3258
|
+
var DummyImage = import_styled17.default.div`
|
|
3234
3259
|
${(props) => props.isOpen ? `height: ${props.boundingRect.height}px; width: ${props.boundingRect.width}px;` : ``}
|
|
3235
3260
|
`;
|
|
3236
|
-
var StyledImage =
|
|
3261
|
+
var StyledImage = import_styled17.default.div`
|
|
3237
3262
|
display: flex;
|
|
3238
3263
|
justify-content: start;
|
|
3239
3264
|
align-items: center;
|
|
@@ -3281,7 +3306,7 @@ var StyledImage = import_styled16.default.div`
|
|
|
3281
3306
|
}
|
|
3282
3307
|
}
|
|
3283
3308
|
`;
|
|
3284
|
-
var Lightbox =
|
|
3309
|
+
var Lightbox = import_styled17.default.div`
|
|
3285
3310
|
transition: opacity 0.2s ease-out;
|
|
3286
3311
|
position: fixed;
|
|
3287
3312
|
opacity: 0;
|
|
@@ -3318,7 +3343,7 @@ var cssVars = {
|
|
|
3318
3343
|
};
|
|
3319
3344
|
|
|
3320
3345
|
// src/styles/global.tsx
|
|
3321
|
-
var
|
|
3346
|
+
var import_jsx_runtime19 = require("@emotion/react/jsx-runtime");
|
|
3322
3347
|
var globalComponentStyles = ({ theme }) => import_react18.css`
|
|
3323
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");
|
|
3324
3349
|
|
|
@@ -3432,20 +3457,20 @@ function GlobalStyles() {
|
|
|
3432
3457
|
height: 100%;
|
|
3433
3458
|
}
|
|
3434
3459
|
`;
|
|
3435
|
-
return /* @__PURE__ */ (0,
|
|
3460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react18.Global, { styles: globalStyles });
|
|
3436
3461
|
}
|
|
3437
3462
|
|
|
3438
3463
|
// src/components/LightsparkProvider.tsx
|
|
3439
|
-
var
|
|
3464
|
+
var import_jsx_runtime20 = require("@emotion/react/jsx-runtime");
|
|
3440
3465
|
function LightsparkProvider({ children }) {
|
|
3441
|
-
return /* @__PURE__ */ (0,
|
|
3442
|
-
/* @__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, {}),
|
|
3443
3468
|
children
|
|
3444
3469
|
] });
|
|
3445
3470
|
}
|
|
3446
3471
|
|
|
3447
3472
|
// src/components/Modal.tsx
|
|
3448
|
-
var
|
|
3473
|
+
var import_styled19 = __toESM(require("@emotion/styled"), 1);
|
|
3449
3474
|
var import_react24 = __toESM(require("react"), 1);
|
|
3450
3475
|
var import_react_dom2 = __toESM(require("react-dom"), 1);
|
|
3451
3476
|
|
|
@@ -3465,7 +3490,7 @@ function useLiveRef() {
|
|
|
3465
3490
|
|
|
3466
3491
|
// src/utils/toReactNodes.tsx
|
|
3467
3492
|
var import_react22 = require("react");
|
|
3468
|
-
var
|
|
3493
|
+
var import_jsx_runtime21 = require("@emotion/react/jsx-runtime");
|
|
3469
3494
|
var ToReactNodesTypes = {
|
|
3470
3495
|
Link: "link"
|
|
3471
3496
|
};
|
|
@@ -3473,22 +3498,22 @@ function toReactNodes(toReactNodesArg) {
|
|
|
3473
3498
|
const toReactNodesArray = Array.isArray(toReactNodesArg) ? toReactNodesArg : [toReactNodesArg];
|
|
3474
3499
|
const reactNodes = toReactNodesArray.map((node, i) => {
|
|
3475
3500
|
if (typeof node === "string") {
|
|
3476
|
-
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: [
|
|
3477
3502
|
str,
|
|
3478
|
-
j < strArr.length - 1 && /* @__PURE__ */ (0,
|
|
3503
|
+
j < strArr.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("br", {})
|
|
3479
3504
|
] }, `str-${i}-break-${j}`)) }, `str-${i}`);
|
|
3480
3505
|
} else if (node.type === ToReactNodesTypes.Link) {
|
|
3481
|
-
return /* @__PURE__ */ (0,
|
|
3506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Link, { to: node.to, children: node.text }, `link-${i}`);
|
|
3482
3507
|
}
|
|
3483
3508
|
return null;
|
|
3484
3509
|
});
|
|
3485
|
-
return /* @__PURE__ */ (0,
|
|
3510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react22.Fragment, { children: reactNodes });
|
|
3486
3511
|
}
|
|
3487
3512
|
|
|
3488
3513
|
// src/components/ProgressBar.tsx
|
|
3489
|
-
var
|
|
3514
|
+
var import_styled18 = __toESM(require("@emotion/styled"), 1);
|
|
3490
3515
|
var import_react23 = require("react");
|
|
3491
|
-
var
|
|
3516
|
+
var import_jsx_runtime22 = require("@emotion/react/jsx-runtime");
|
|
3492
3517
|
var defaultProps2 = {
|
|
3493
3518
|
isSm: false,
|
|
3494
3519
|
stepDuration: 0.5
|
|
@@ -3509,7 +3534,7 @@ function ProgressBar({
|
|
|
3509
3534
|
}, 0);
|
|
3510
3535
|
}
|
|
3511
3536
|
}, [progressPercentage]);
|
|
3512
|
-
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)(
|
|
3513
3538
|
BarBg,
|
|
3514
3539
|
{
|
|
3515
3540
|
background,
|
|
@@ -3520,7 +3545,7 @@ function ProgressBar({
|
|
|
3520
3545
|
) }) });
|
|
3521
3546
|
}
|
|
3522
3547
|
ProgressBar.defaultProps = defaultProps2;
|
|
3523
|
-
var ProgressBarContainer =
|
|
3548
|
+
var ProgressBarContainer = import_styled18.default.div`
|
|
3524
3549
|
${standardBorderRadius(16)}
|
|
3525
3550
|
background-color: ${({ theme }) => themeOr(theme.c05Neutral, theme.c1Neutral)({ theme })};
|
|
3526
3551
|
box-sizing: border-box;
|
|
@@ -3530,7 +3555,7 @@ var ProgressBarContainer = import_styled17.default.div`
|
|
|
3530
3555
|
width: 100%;
|
|
3531
3556
|
position: relative;
|
|
3532
3557
|
`;
|
|
3533
|
-
var BarBg =
|
|
3558
|
+
var BarBg = import_styled18.default.div`
|
|
3534
3559
|
${standardBorderRadius(16)}
|
|
3535
3560
|
width: ${({ percentage }) => 100 / percentage * 100}%;
|
|
3536
3561
|
height: 100%;
|
|
@@ -3544,7 +3569,7 @@ var BarBg = import_styled17.default.div`
|
|
|
3544
3569
|
#3f2e7e 115.32%
|
|
3545
3570
|
)`};
|
|
3546
3571
|
`;
|
|
3547
|
-
var Bar =
|
|
3572
|
+
var Bar = import_styled18.default.div`
|
|
3548
3573
|
${standardBorderRadius(16)}
|
|
3549
3574
|
overflow: hidden;
|
|
3550
3575
|
box-sizing: border-box;
|
|
@@ -3556,7 +3581,7 @@ var Bar = import_styled17.default.div`
|
|
|
3556
3581
|
`;
|
|
3557
3582
|
|
|
3558
3583
|
// src/components/Modal.tsx
|
|
3559
|
-
var
|
|
3584
|
+
var import_jsx_runtime23 = require("@emotion/react/jsx-runtime");
|
|
3560
3585
|
function Modal({
|
|
3561
3586
|
visible,
|
|
3562
3587
|
title,
|
|
@@ -3675,9 +3700,9 @@ function Modal({
|
|
|
3675
3700
|
onClose();
|
|
3676
3701
|
}
|
|
3677
3702
|
}
|
|
3678
|
-
const modalContent = /* @__PURE__ */ (0,
|
|
3679
|
-
/* @__PURE__ */ (0,
|
|
3680
|
-
/* @__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)(
|
|
3681
3706
|
ModalContainer,
|
|
3682
3707
|
{
|
|
3683
3708
|
"aria-modal": true,
|
|
@@ -3685,22 +3710,22 @@ function Modal({
|
|
|
3685
3710
|
tabIndex: -1,
|
|
3686
3711
|
role: "dialog",
|
|
3687
3712
|
ref: modalContainerRef,
|
|
3688
|
-
children: /* @__PURE__ */ (0,
|
|
3689
|
-
!firstFocusRef && /* @__PURE__ */ (0,
|
|
3690
|
-
!(nonDismissable || ghost) && /* @__PURE__ */ (0,
|
|
3691
|
-
/* @__PURE__ */ (0,
|
|
3692
|
-
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)(
|
|
3693
3718
|
ProgressBar,
|
|
3694
3719
|
{
|
|
3695
3720
|
progressPercentage: progressBar.progressPercentage,
|
|
3696
3721
|
isSm: progressBar.isSm
|
|
3697
3722
|
}
|
|
3698
3723
|
) }) : null,
|
|
3699
|
-
title ? /* @__PURE__ */ (0,
|
|
3700
|
-
formattedDescription ? /* @__PURE__ */ (0,
|
|
3701
|
-
/* @__PURE__ */ (0,
|
|
3702
|
-
onSubmit || onCancel ? /* @__PURE__ */ (0,
|
|
3703
|
-
!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)(
|
|
3704
3729
|
Button,
|
|
3705
3730
|
{
|
|
3706
3731
|
disabled: cancelDisabled,
|
|
@@ -3708,7 +3733,7 @@ function Modal({
|
|
|
3708
3733
|
text: cancelText
|
|
3709
3734
|
}
|
|
3710
3735
|
),
|
|
3711
|
-
onSubmit && /* @__PURE__ */ (0,
|
|
3736
|
+
onSubmit && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3712
3737
|
Button,
|
|
3713
3738
|
{
|
|
3714
3739
|
disabled: submitDisabled,
|
|
@@ -3718,7 +3743,7 @@ function Modal({
|
|
|
3718
3743
|
type: "submit"
|
|
3719
3744
|
}
|
|
3720
3745
|
),
|
|
3721
|
-
isSm && !cancelHidden && /* @__PURE__ */ (0,
|
|
3746
|
+
isSm && !cancelHidden && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { onClick: onClose, text: cancelText })
|
|
3722
3747
|
] }) : null
|
|
3723
3748
|
] })
|
|
3724
3749
|
] })
|
|
@@ -3726,17 +3751,17 @@ function Modal({
|
|
|
3726
3751
|
)
|
|
3727
3752
|
] });
|
|
3728
3753
|
return visible && nodeReady && nodeRef.current ? import_react_dom2.default.createPortal(
|
|
3729
|
-
onSubmit ? /* @__PURE__ */ (0,
|
|
3754
|
+
onSubmit ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("form", { onSubmit: onSubmitForm, children: modalContent }) : modalContent,
|
|
3730
3755
|
nodeRef.current
|
|
3731
3756
|
) : null;
|
|
3732
3757
|
}
|
|
3733
|
-
var DefaultFocusTarget = (0,
|
|
3758
|
+
var DefaultFocusTarget = (0, import_styled19.default)(UnstyledButton)`
|
|
3734
3759
|
position: absolute;
|
|
3735
3760
|
top: -30px;
|
|
3736
3761
|
width: 0;
|
|
3737
3762
|
height: 0;
|
|
3738
3763
|
`;
|
|
3739
|
-
var ModalOverlay =
|
|
3764
|
+
var ModalOverlay = import_styled19.default.div`
|
|
3740
3765
|
position: fixed;
|
|
3741
3766
|
bottom: 0;
|
|
3742
3767
|
left: 0;
|
|
@@ -3746,7 +3771,7 @@ var ModalOverlay = import_styled18.default.div`
|
|
|
3746
3771
|
background: rgba(0, 0, 0, 0.5);
|
|
3747
3772
|
backdrop-filter: blur(2px);
|
|
3748
3773
|
`;
|
|
3749
|
-
var ModalContainer =
|
|
3774
|
+
var ModalContainer = import_styled19.default.div`
|
|
3750
3775
|
pointer-events: none;
|
|
3751
3776
|
position: fixed;
|
|
3752
3777
|
top: 0;
|
|
@@ -3764,14 +3789,14 @@ var ModalContainer = import_styled18.default.div`
|
|
|
3764
3789
|
padding-top: ${standardContentInset.smPx}px;
|
|
3765
3790
|
`;
|
|
3766
3791
|
var contentTopMarginPx = 24;
|
|
3767
|
-
var Description =
|
|
3792
|
+
var Description = import_styled19.default.div`
|
|
3768
3793
|
color: ${({ theme }) => theme.mcNeutral};
|
|
3769
3794
|
margin-top: 4px;
|
|
3770
3795
|
& + * {
|
|
3771
3796
|
margin-top: ${contentTopMarginPx}px;
|
|
3772
3797
|
}
|
|
3773
3798
|
`;
|
|
3774
|
-
var ModalButtonRow =
|
|
3799
|
+
var ModalButtonRow = import_styled19.default.div`
|
|
3775
3800
|
margin-top: 32px;
|
|
3776
3801
|
${bp.minSm(`display: flex;`)}
|
|
3777
3802
|
gap: 10px;
|
|
@@ -3789,7 +3814,7 @@ var ModalButtonRow = import_styled18.default.div`
|
|
|
3789
3814
|
`)}
|
|
3790
3815
|
}
|
|
3791
3816
|
`;
|
|
3792
|
-
var ModalContent =
|
|
3817
|
+
var ModalContent = import_styled19.default.div`
|
|
3793
3818
|
${overflowAutoWithoutScrollbars}
|
|
3794
3819
|
${standardContentInset.smCSS}
|
|
3795
3820
|
${standardBorderRadius(16)}
|
|
@@ -3811,12 +3836,12 @@ var ModalContent = import_styled18.default.div`
|
|
|
3811
3836
|
}
|
|
3812
3837
|
}
|
|
3813
3838
|
`;
|
|
3814
|
-
var CloseButton = (0,
|
|
3839
|
+
var CloseButton = (0, import_styled19.default)(UnstyledButton)`
|
|
3815
3840
|
${standardFocusOutline}
|
|
3816
3841
|
width: 24px;
|
|
3817
3842
|
height: 24px;
|
|
3818
3843
|
`;
|
|
3819
|
-
var ModalContentInner =
|
|
3844
|
+
var ModalContentInner = import_styled19.default.div`
|
|
3820
3845
|
${(props) => props.ghost ? "" : "padding: 32px 24px 0;"}
|
|
3821
3846
|
${(props) => props.ghost ? "" : `${bp.sm(`
|
|
3822
3847
|
padding-left: 10px;
|
|
@@ -3825,9 +3850,9 @@ var ModalContentInner = import_styled18.default.div`
|
|
|
3825
3850
|
`;
|
|
3826
3851
|
|
|
3827
3852
|
// src/components/Pill.tsx
|
|
3828
|
-
var
|
|
3853
|
+
var import_styled20 = __toESM(require("@emotion/styled"), 1);
|
|
3829
3854
|
var import_react25 = require("react");
|
|
3830
|
-
var
|
|
3855
|
+
var import_jsx_runtime24 = require("@emotion/react/jsx-runtime");
|
|
3831
3856
|
function Pill({
|
|
3832
3857
|
text,
|
|
3833
3858
|
onDeleteMouseDown,
|
|
@@ -3866,7 +3891,7 @@ function Pill({
|
|
|
3866
3891
|
}
|
|
3867
3892
|
}
|
|
3868
3893
|
}
|
|
3869
|
-
return /* @__PURE__ */ (0,
|
|
3894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
3870
3895
|
StyledPill,
|
|
3871
3896
|
{
|
|
3872
3897
|
hasIcon: Boolean(icon || loading || onDeleteMouseDown),
|
|
@@ -3878,7 +3903,7 @@ function Pill({
|
|
|
3878
3903
|
}
|
|
3879
3904
|
},
|
|
3880
3905
|
children: [
|
|
3881
|
-
isEditing ? /* @__PURE__ */ (0,
|
|
3906
|
+
isEditing ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3882
3907
|
PillInput,
|
|
3883
3908
|
{
|
|
3884
3909
|
value: text,
|
|
@@ -3887,14 +3912,14 @@ function Pill({
|
|
|
3887
3912
|
onBlur: onBlurTextInput,
|
|
3888
3913
|
ref: textInputRef
|
|
3889
3914
|
}
|
|
3890
|
-
) : /* @__PURE__ */ (0,
|
|
3891
|
-
(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)(
|
|
3892
3917
|
PillIconContainer,
|
|
3893
3918
|
{
|
|
3894
3919
|
hasIconInset: Boolean(icon && !loading && !onDeleteMouseDown),
|
|
3895
3920
|
children: [
|
|
3896
|
-
loading && /* @__PURE__ */ (0,
|
|
3897
|
-
!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)(
|
|
3898
3923
|
UnstyledButton,
|
|
3899
3924
|
{
|
|
3900
3925
|
onMouseDown: handleOnDeleteMouseDown,
|
|
@@ -3905,10 +3930,10 @@ function Pill({
|
|
|
3905
3930
|
padding: "10px",
|
|
3906
3931
|
marginRight: "-10px"
|
|
3907
3932
|
},
|
|
3908
|
-
children: /* @__PURE__ */ (0,
|
|
3933
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { name: "DeleteIcon", width: 16.1 })
|
|
3909
3934
|
}
|
|
3910
3935
|
),
|
|
3911
|
-
!loading && icon && !onDeleteMouseDown && /* @__PURE__ */ (0,
|
|
3936
|
+
!loading && icon && !onDeleteMouseDown && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { name: icon, width: 16.1, color: colors.white })
|
|
3912
3937
|
]
|
|
3913
3938
|
}
|
|
3914
3939
|
)
|
|
@@ -3916,7 +3941,7 @@ function Pill({
|
|
|
3916
3941
|
}
|
|
3917
3942
|
);
|
|
3918
3943
|
}
|
|
3919
|
-
var PillText =
|
|
3944
|
+
var PillText = import_styled20.default.div`
|
|
3920
3945
|
/* For mobile ensure empty values don't prevent div from having height: */
|
|
3921
3946
|
height: 1.2rem;
|
|
3922
3947
|
min-width: 100px;
|
|
@@ -3926,7 +3951,7 @@ var PillText = import_styled19.default.div`
|
|
|
3926
3951
|
overflow: hidden;
|
|
3927
3952
|
font-weight: 600;
|
|
3928
3953
|
`;
|
|
3929
|
-
var StyledPill =
|
|
3954
|
+
var StyledPill = import_styled20.default.div`
|
|
3930
3955
|
* + & {
|
|
3931
3956
|
margin-top: 16px;
|
|
3932
3957
|
}
|
|
@@ -3940,7 +3965,7 @@ var StyledPill = import_styled19.default.div`
|
|
|
3940
3965
|
cursor: ${({ cursor }) => cursor};
|
|
3941
3966
|
position: relative;
|
|
3942
3967
|
`;
|
|
3943
|
-
var PillIconContainer =
|
|
3968
|
+
var PillIconContainer = import_styled20.default.div`
|
|
3944
3969
|
${flexCenter}
|
|
3945
3970
|
${({ hasIconInset }) => hasIconInset ? `
|
|
3946
3971
|
background-color: ${colors.blue43};
|
|
@@ -3951,7 +3976,7 @@ var PillIconContainer = import_styled19.default.div`
|
|
|
3951
3976
|
margin-left: 12px;
|
|
3952
3977
|
position: absolute;
|
|
3953
3978
|
`;
|
|
3954
|
-
var PillInput =
|
|
3979
|
+
var PillInput = import_styled20.default.input`
|
|
3955
3980
|
background-color: transparent;
|
|
3956
3981
|
border: none;
|
|
3957
3982
|
outline: none;
|
|
@@ -3969,11 +3994,11 @@ var PillInput = import_styled19.default.input`
|
|
|
3969
3994
|
`;
|
|
3970
3995
|
|
|
3971
3996
|
// src/components/SecretContainer.tsx
|
|
3972
|
-
var
|
|
3973
|
-
var
|
|
3997
|
+
var import_styled21 = __toESM(require("@emotion/styled"), 1);
|
|
3998
|
+
var import_jsx_runtime25 = require("@emotion/react/jsx-runtime");
|
|
3974
3999
|
function SecretContainer(props) {
|
|
3975
|
-
return props.secret ? /* @__PURE__ */ (0,
|
|
3976
|
-
/* @__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)(
|
|
3977
4002
|
"span",
|
|
3978
4003
|
{
|
|
3979
4004
|
style: {
|
|
@@ -3985,10 +4010,10 @@ function SecretContainer(props) {
|
|
|
3985
4010
|
children: props.secret
|
|
3986
4011
|
}
|
|
3987
4012
|
),
|
|
3988
|
-
/* @__PURE__ */ (0,
|
|
3989
|
-
] }) : /* @__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" });
|
|
3990
4015
|
}
|
|
3991
|
-
var StyledSecretContainer =
|
|
4016
|
+
var StyledSecretContainer = import_styled21.default.div`
|
|
3992
4017
|
background-color: ${({ theme, hasSecret, success }) => hasSecret ? success ? theme.success : theme.c05Neutral : theme.bg};
|
|
3993
4018
|
${standardBorderRadius(8)}
|
|
3994
4019
|
padding: 18px 20px;
|
|
@@ -4000,14 +4025,14 @@ var StyledSecretContainer = import_styled20.default.div`
|
|
|
4000
4025
|
`;
|
|
4001
4026
|
|
|
4002
4027
|
// src/components/TextIconAligner.tsx
|
|
4003
|
-
var
|
|
4028
|
+
var import_jsx_runtime26 = require("@emotion/react/jsx-runtime");
|
|
4004
4029
|
function TextIconAligner({
|
|
4005
4030
|
text,
|
|
4006
4031
|
rightIcon,
|
|
4007
4032
|
leftIcon,
|
|
4008
4033
|
onClick
|
|
4009
4034
|
}) {
|
|
4010
|
-
const leftIconNode = leftIcon ? /* @__PURE__ */ (0,
|
|
4035
|
+
const leftIconNode = leftIcon ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4011
4036
|
Icon,
|
|
4012
4037
|
{
|
|
4013
4038
|
name: leftIcon.name,
|
|
@@ -4016,7 +4041,7 @@ function TextIconAligner({
|
|
|
4016
4041
|
color: leftIcon.color
|
|
4017
4042
|
}
|
|
4018
4043
|
) : null;
|
|
4019
|
-
const rightIconNode = rightIcon ? /* @__PURE__ */ (0,
|
|
4044
|
+
const rightIconNode = rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4020
4045
|
Icon,
|
|
4021
4046
|
{
|
|
4022
4047
|
name: rightIcon.name,
|
|
@@ -4025,7 +4050,7 @@ function TextIconAligner({
|
|
|
4025
4050
|
color: rightIcon.color
|
|
4026
4051
|
}
|
|
4027
4052
|
) : null;
|
|
4028
|
-
return /* @__PURE__ */ (0,
|
|
4053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4029
4054
|
"span",
|
|
4030
4055
|
{
|
|
4031
4056
|
css: {
|
|
@@ -4074,6 +4099,7 @@ function TextIconAligner({
|
|
|
4074
4099
|
Pill,
|
|
4075
4100
|
ProgressBar,
|
|
4076
4101
|
SecretContainer,
|
|
4102
|
+
StatusIndicator,
|
|
4077
4103
|
StyledButton,
|
|
4078
4104
|
StyledCodeBlock,
|
|
4079
4105
|
TextIconAligner,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Badge } from './Badge.cjs';
|
|
1
|
+
export { Badge, BadgeProps } from './Badge.cjs';
|
|
2
2
|
export { Button, ButtonProps, ButtonSelector, StyledButton } from './Button.cjs';
|
|
3
3
|
export { ButtonRow, ButtonRowContainer, ButtonRowProps } from './ButtonRow.cjs';
|
|
4
4
|
export { CardPage, CardPageContent, CardPageFullContent, CardPageFullWidth, CardPageRightContentInner, CardPageSubtitle } from './CardPage.cjs';
|
|
@@ -17,6 +17,7 @@ export { Modal } from './Modal.cjs';
|
|
|
17
17
|
export { Pill } from './Pill.cjs';
|
|
18
18
|
export { ProgressBar, ProgressBarProps } from './ProgressBar.cjs';
|
|
19
19
|
export { SecretContainer } from './SecretContainer.cjs';
|
|
20
|
+
export { StatusIndicator, StatusIndicatorColors, StatusIndicatorProps } from './StatusIndicator.cjs';
|
|
20
21
|
export { TextIconAligner, TextIconAlignerProps } from './TextIconAligner.cjs';
|
|
21
22
|
export { UnstyledButton } from './UnstyledButton.cjs';
|
|
22
23
|
import '@emotion/react/jsx-runtime';
|