@lightsparkdev/ui 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/chunk-3EVAP5JT.js +67 -0
- package/dist/{chunk-IQFU7CM5.js → chunk-3GS5EFXV.js} +1 -1
- package/dist/{chunk-CLU2FRJZ.js → chunk-55OQPFLF.js} +1 -1
- package/dist/{chunk-N2RDQJQ5.js → chunk-5POPBNPS.js} +1 -1
- package/dist/{chunk-WWFDI534.js → chunk-7C4MHI6Q.js} +13 -6
- package/dist/{chunk-3CZOYF3X.js → chunk-7T36JGTC.js} +2 -2
- package/dist/chunk-A4FQBEYU.js +163 -0
- package/dist/chunk-ATUH6SXK.js +233 -0
- package/dist/chunk-DQRN4E5G.js +25 -0
- package/dist/{chunk-RTUZVKPK.js → chunk-E3AOYBY5.js} +1 -1
- package/dist/{chunk-I74XQIVV.js → chunk-EEFNW7NS.js} +3 -3
- package/dist/{chunk-UO6U7AYM.js → chunk-FCZJILMW.js} +1 -1
- package/dist/{chunk-2WYVO6B2.js → chunk-H3RW6JSU.js} +1 -1
- package/dist/chunk-IPAXAP6K.js +119 -0
- package/dist/{chunk-NGS4OSWT.js → chunk-J4FJQ3FN.js} +1 -1
- package/dist/{chunk-RFGKH3R6.js → chunk-JK4BP73A.js} +39 -38
- package/dist/{chunk-T33SBHYI.js → chunk-KMR5C25B.js} +3 -1
- package/dist/{chunk-JYWYEOM6.js → chunk-NFSAJ5GJ.js} +23 -10
- package/dist/{chunk-G2PZZFJL.js → chunk-NM7UW54G.js} +21 -24
- package/dist/{chunk-M56R3RJ7.js → chunk-OGSDZTHM.js} +7 -3
- package/dist/chunk-P3EUPXFA.js +150 -0
- package/dist/chunk-PBRN7MJY.js +315 -0
- package/dist/{chunk-NH25O7PC.js → chunk-PVQCLQNA.js} +1 -1
- package/dist/{chunk-NZJCJJH5.js → chunk-RWIZ7Q74.js} +1 -1
- package/dist/{chunk-TAI352I3.js → chunk-VE7J2N47.js} +1 -1
- package/dist/{chunk-K7D7A34K.js → chunk-XP2MX2AA.js} +1 -1
- package/dist/{chunk-23SR7TFO.js → chunk-XZR237JJ.js} +1 -1
- package/dist/{chunk-VBWTKANQ.js → chunk-Y37DCY7Y.js} +3 -3
- package/dist/{chunk-SVQELXFK.js → chunk-Z5TPS2BO.js} +1 -1
- package/dist/{chunk-FKETYVPP.js → chunk-ZANLDY2W.js} +87 -43
- package/dist/components/Badge.cjs +1346 -0
- package/dist/components/Badge.d.cts +10 -0
- package/dist/components/Badge.d.ts +10 -0
- package/dist/components/Badge.js +13 -0
- package/dist/components/Button.cjs +235 -107
- package/dist/components/Button.d.cts +3 -1
- package/dist/components/Button.d.ts +3 -1
- package/dist/components/Button.js +8 -7
- package/dist/components/ButtonRow.cjs +254 -110
- package/dist/components/ButtonRow.d.cts +6 -2
- package/dist/components/ButtonRow.d.ts +6 -2
- package/dist/components/ButtonRow.js +14 -11
- package/dist/components/CardPage.cjs +1921 -0
- package/dist/components/CardPage.d.cts +54 -0
- package/dist/components/CardPage.d.ts +54 -0
- package/dist/components/CardPage.js +33 -0
- package/dist/components/Collapsible.cjs +38 -54
- package/dist/components/Collapsible.js +4 -5
- package/dist/components/ContentTable.cjs +38 -54
- package/dist/components/ContentTable.js +3 -4
- package/dist/components/CopyToClipboardButton.cjs +161 -65
- package/dist/components/CopyToClipboardButton.js +6 -5
- package/dist/components/CurrencyAmount.cjs +38 -54
- package/dist/components/CurrencyAmount.js +3 -4
- package/dist/components/FileInput.cjs +1959 -0
- package/dist/components/FileInput.d.cts +21 -0
- package/dist/components/FileInput.d.ts +21 -0
- package/dist/components/FileInput.js +113 -0
- package/dist/components/GradientCardHeader.cjs +177 -0
- package/dist/components/GradientCardHeader.d.cts +10 -0
- package/dist/components/GradientCardHeader.d.ts +10 -0
- package/dist/components/GradientCardHeader.js +8 -0
- package/dist/components/Icon.cjs +38 -54
- package/dist/components/Icon.js +2 -3
- package/dist/components/LightTooltip.cjs +1428 -0
- package/dist/components/LightTooltip.d.cts +9 -0
- package/dist/components/LightTooltip.d.ts +9 -0
- package/dist/components/LightTooltip.js +12 -0
- package/dist/components/LightboxImage.cjs +1 -1
- package/dist/components/LightboxImage.js +2 -2
- package/dist/components/LightsparkProvider.cjs +41 -57
- package/dist/components/LightsparkProvider.js +3 -4
- package/dist/components/Loading.cjs +38 -54
- package/dist/components/Loading.js +3 -4
- package/dist/components/Modal.cjs +251 -145
- package/dist/components/Modal.js +12 -11
- package/dist/components/Pill.cjs +1717 -0
- package/dist/components/Pill.d.cts +19 -0
- package/dist/components/Pill.d.ts +19 -0
- package/dist/components/Pill.js +16 -0
- package/dist/components/ProgressBar.cjs +38 -56
- package/dist/components/ProgressBar.js +2 -3
- package/dist/components/SecretContainer.cjs +162 -66
- package/dist/components/SecretContainer.js +7 -6
- package/dist/components/TextIconAligner.cjs +38 -54
- package/dist/components/TextIconAligner.js +3 -4
- package/dist/components/UnstyledButton.cjs +38 -54
- package/dist/components/UnstyledButton.js +2 -3
- package/dist/components/documentation/AnchorLinkHeader.cjs +38 -56
- package/dist/components/documentation/AnchorLinkHeader.js +3 -4
- package/dist/components/documentation/index.cjs +38 -56
- package/dist/components/documentation/index.js +3 -4
- package/dist/components/index.cjs +1191 -358
- package/dist/components/index.d.cts +7 -1
- package/dist/components/index.d.ts +7 -1
- package/dist/components/index.js +63 -32
- package/dist/icons/ArrowCornerDownRight.cjs +49 -0
- package/dist/icons/ArrowCornerDownRight.d.cts +5 -0
- package/dist/icons/ArrowCornerDownRight.d.ts +5 -0
- package/dist/icons/ArrowCornerDownRight.js +30 -0
- package/dist/icons/Copy.cjs +4 -3
- package/dist/icons/Copy.js +4 -3
- package/dist/icons/Download.cjs +22 -11
- package/dist/icons/Download.js +23 -12
- package/dist/icons/Sort.cjs +48 -0
- package/dist/icons/Sort.d.cts +5 -0
- package/dist/icons/Sort.d.ts +5 -0
- package/dist/icons/Sort.js +29 -0
- package/dist/icons/Upload.cjs +22 -11
- package/dist/icons/Upload.js +23 -12
- package/dist/icons/index.cjs +38 -54
- package/dist/icons/index.js +2 -3
- package/dist/router.cjs +7 -3
- package/dist/router.js +1 -1
- package/dist/styles/common.cjs +38 -66
- package/dist/styles/common.d.cts +10 -11
- package/dist/styles/common.d.ts +10 -11
- package/dist/styles/common.js +1 -14
- package/dist/styles/fields.cjs +117 -61
- package/dist/styles/fields.d.cts +12 -5
- package/dist/styles/fields.d.ts +12 -5
- package/dist/styles/fields.js +28 -164
- package/dist/styles/fonts/typography/Article.cjs +38 -54
- package/dist/styles/fonts/typography/Article.js +5 -6
- package/dist/styles/fonts/typography/index.cjs +38 -54
- package/dist/styles/fonts/typography/index.js +5 -6
- package/dist/styles/global.cjs +41 -57
- package/dist/styles/global.js +2 -3
- package/dist/styles/type.cjs +38 -54
- package/dist/styles/type.js +8 -145
- package/dist/styles/utils.cjs +38 -54
- package/dist/styles/utils.js +2 -3
- package/dist/styles/z-index.cjs +1 -1
- package/dist/styles/z-index.d.cts +1 -1
- package/dist/styles/z-index.d.ts +1 -1
- package/dist/styles/z-index.js +1 -1
- package/dist/types/index.d.cts +2 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/utils/toReactNodes.cjs +7 -3
- package/dist/utils/toReactNodes.js +2 -2
- package/package.json +10 -6
package/dist/styles/utils.cjs
CHANGED
|
@@ -68,7 +68,6 @@ var import_react5 = require("@emotion/react");
|
|
|
68
68
|
// src/styles/common.tsx
|
|
69
69
|
var import_react4 = require("@emotion/react");
|
|
70
70
|
var import_styled = __toESM(require("@emotion/styled"), 1);
|
|
71
|
-
var import_react_tooltip = require("react-tooltip");
|
|
72
71
|
|
|
73
72
|
// src/styles/breakpoints.tsx
|
|
74
73
|
var import_react = require("@emotion/react");
|
|
@@ -1274,59 +1273,47 @@ function hexToRGB(hex) {
|
|
|
1274
1273
|
] : [0, 0, 0];
|
|
1275
1274
|
}
|
|
1276
1275
|
|
|
1277
|
-
// src/styles/z-index.tsx
|
|
1278
|
-
var z = {
|
|
1279
|
-
card: 1,
|
|
1280
|
-
fieldError: 1,
|
|
1281
|
-
textInput: 2,
|
|
1282
|
-
select: 3,
|
|
1283
|
-
selectFocused: 4,
|
|
1284
|
-
walletActionPreviewTopGradient: 1,
|
|
1285
|
-
headerContainer: 99,
|
|
1286
|
-
smBanner: 99,
|
|
1287
|
-
headerTop: 100,
|
|
1288
|
-
navMenu: 100,
|
|
1289
|
-
smNavMenu: 100,
|
|
1290
|
-
navAction: 101,
|
|
1291
|
-
smNavAction: 100,
|
|
1292
|
-
// keep under navDropdown
|
|
1293
|
-
tooltip: 160,
|
|
1294
|
-
notificationBanner: 170,
|
|
1295
|
-
qrReaderVideo: 180,
|
|
1296
|
-
qrReaderOverlay: 181,
|
|
1297
|
-
modalOverlay: 190,
|
|
1298
|
-
modalContainer: 191,
|
|
1299
|
-
dropdown: 192,
|
|
1300
|
-
toast: 200
|
|
1301
|
-
};
|
|
1302
|
-
|
|
1303
1276
|
// src/styles/common.tsx
|
|
1304
1277
|
var rootFontSizePx = 12;
|
|
1305
1278
|
var rootFontSizeRems = rootFontSizePx / 16;
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
`
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
`;
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1279
|
+
function buildStandardContentInset(smPx, minSmMaxLgPx, lgPx) {
|
|
1280
|
+
const smCSS = import_react4.css`
|
|
1281
|
+
${bp.sm(`
|
|
1282
|
+
margin-left: auto;
|
|
1283
|
+
margin-right: auto;
|
|
1284
|
+
width: calc(100% - ${smPx * 2}px);
|
|
1285
|
+
`)}
|
|
1286
|
+
`;
|
|
1287
|
+
const minSmMaxLgCSS = import_react4.css`
|
|
1288
|
+
${bp.minSmMaxLg(`
|
|
1289
|
+
margin-left: auto;
|
|
1290
|
+
margin-right: auto;
|
|
1291
|
+
width: calc(100% - ${minSmMaxLgPx * 2}px);
|
|
1292
|
+
`)}
|
|
1293
|
+
`;
|
|
1294
|
+
const lgCSS = import_react4.css`
|
|
1295
|
+
${bp.lg(`
|
|
1296
|
+
margin-left: auto;
|
|
1297
|
+
margin-right: auto;
|
|
1298
|
+
width: calc(100% - ${lgPx * 2}px);
|
|
1299
|
+
max-width: 1280px;
|
|
1300
|
+
`)}
|
|
1301
|
+
`;
|
|
1302
|
+
return {
|
|
1303
|
+
smPx,
|
|
1304
|
+
minSmMaxLgPx,
|
|
1305
|
+
lgPx,
|
|
1306
|
+
smCSS,
|
|
1307
|
+
minSmMaxLgCSS,
|
|
1308
|
+
lgCSS,
|
|
1309
|
+
css: import_react4.css`
|
|
1310
|
+
${lgCSS}
|
|
1311
|
+
${smCSS}
|
|
1312
|
+
${minSmMaxLgCSS}
|
|
1313
|
+
`
|
|
1314
|
+
};
|
|
1315
|
+
}
|
|
1316
|
+
var standardContentInset = buildStandardContentInset(16, 24, 32);
|
|
1330
1317
|
var standardCardShadow = import_react4.css`
|
|
1331
1318
|
box-shadow:
|
|
1332
1319
|
0px 4px 10px 0px rgba(0, 0, 0, 0.08),
|
|
@@ -1346,9 +1333,6 @@ var Subtext = import_styled.default.div`
|
|
|
1346
1333
|
var darkGradientBg = import_react4.css`
|
|
1347
1334
|
background: ${darkGradient};
|
|
1348
1335
|
`;
|
|
1349
|
-
var StyledTooltip = (0, import_styled.default)(import_react_tooltip.Tooltip)`
|
|
1350
|
-
z-index: ${z.modalOverlay};
|
|
1351
|
-
`;
|
|
1352
1336
|
|
|
1353
1337
|
// src/styles/utils.tsx
|
|
1354
1338
|
function pxToRems(rems, asNum = false) {
|
package/dist/styles/utils.js
CHANGED
|
@@ -13,12 +13,11 @@ import {
|
|
|
13
13
|
remsToPx,
|
|
14
14
|
size,
|
|
15
15
|
textCenter
|
|
16
|
-
} from "../chunk-
|
|
17
|
-
import "../chunk-
|
|
16
|
+
} from "../chunk-FCZJILMW.js";
|
|
17
|
+
import "../chunk-JK4BP73A.js";
|
|
18
18
|
import "../chunk-2VBDEO6M.js";
|
|
19
19
|
import "../chunk-E4EXM4SY.js";
|
|
20
20
|
import "../chunk-JSGRNWSB.js";
|
|
21
|
-
import "../chunk-CLU2FRJZ.js";
|
|
22
21
|
import "../chunk-CIGAQ47A.js";
|
|
23
22
|
export {
|
|
24
23
|
absoluteCenter,
|
package/dist/styles/z-index.cjs
CHANGED
|
@@ -38,13 +38,13 @@ var z = {
|
|
|
38
38
|
navAction: 101,
|
|
39
39
|
smNavAction: 100,
|
|
40
40
|
// keep under navDropdown
|
|
41
|
-
tooltip: 160,
|
|
42
41
|
notificationBanner: 170,
|
|
43
42
|
qrReaderVideo: 180,
|
|
44
43
|
qrReaderOverlay: 181,
|
|
45
44
|
modalOverlay: 190,
|
|
46
45
|
modalContainer: 191,
|
|
47
46
|
dropdown: 192,
|
|
47
|
+
tooltip: 193,
|
|
48
48
|
toast: 200
|
|
49
49
|
};
|
|
50
50
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -12,13 +12,13 @@ declare const z: {
|
|
|
12
12
|
smNavMenu: number;
|
|
13
13
|
navAction: number;
|
|
14
14
|
smNavAction: number;
|
|
15
|
-
tooltip: number;
|
|
16
15
|
notificationBanner: number;
|
|
17
16
|
qrReaderVideo: number;
|
|
18
17
|
qrReaderOverlay: number;
|
|
19
18
|
modalOverlay: number;
|
|
20
19
|
modalContainer: number;
|
|
21
20
|
dropdown: number;
|
|
21
|
+
tooltip: number;
|
|
22
22
|
toast: number;
|
|
23
23
|
};
|
|
24
24
|
|
package/dist/styles/z-index.d.ts
CHANGED
|
@@ -12,13 +12,13 @@ declare const z: {
|
|
|
12
12
|
smNavMenu: number;
|
|
13
13
|
navAction: number;
|
|
14
14
|
smNavAction: number;
|
|
15
|
-
tooltip: number;
|
|
16
15
|
notificationBanner: number;
|
|
17
16
|
qrReaderVideo: number;
|
|
18
17
|
qrReaderOverlay: number;
|
|
19
18
|
modalOverlay: number;
|
|
20
19
|
modalContainer: number;
|
|
21
20
|
dropdown: number;
|
|
21
|
+
tooltip: number;
|
|
22
22
|
toast: number;
|
|
23
23
|
};
|
|
24
24
|
|
package/dist/styles/z-index.js
CHANGED
package/dist/types/index.d.cts
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -1196,19 +1196,23 @@ function Link({
|
|
|
1196
1196
|
blue = false,
|
|
1197
1197
|
newTab = false
|
|
1198
1198
|
}) {
|
|
1199
|
-
if (!isString(to) && !externalLink) {
|
|
1200
|
-
throw new Error(
|
|
1199
|
+
if (!isString(to) && !externalLink && !onClick) {
|
|
1200
|
+
throw new Error(
|
|
1201
|
+
"Link must have either `to` or `externalLink` or `onClick` defined"
|
|
1202
|
+
);
|
|
1201
1203
|
}
|
|
1202
1204
|
let toStr;
|
|
1203
1205
|
if (isString(to)) {
|
|
1204
1206
|
toStr = replaceParams(to, params);
|
|
1205
1207
|
toStr += hash ? `#${hash}` : "";
|
|
1206
|
-
} else {
|
|
1208
|
+
} else if (externalLink) {
|
|
1207
1209
|
const definedExternalLink = externalLink;
|
|
1208
1210
|
if (!definedExternalLink.startsWith("http")) {
|
|
1209
1211
|
throw new Error("Link's externalLink must start with http");
|
|
1210
1212
|
}
|
|
1211
1213
|
toStr = definedExternalLink;
|
|
1214
|
+
} else {
|
|
1215
|
+
toStr = "#";
|
|
1212
1216
|
}
|
|
1213
1217
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1214
1218
|
import_react_router_dom.Link,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ToReactNodesTypes,
|
|
3
3
|
toReactNodes
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-VE7J2N47.js";
|
|
5
|
+
import "../chunk-OGSDZTHM.js";
|
|
6
6
|
import "../chunk-LAMQKQU3.js";
|
|
7
7
|
import "../chunk-2VBDEO6M.js";
|
|
8
8
|
import "../chunk-E4EXM4SY.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightsparkdev/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -24,8 +24,9 @@
|
|
|
24
24
|
"./router": "./dist/router.js"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
|
-
"build": "
|
|
28
|
-
"build
|
|
27
|
+
"build-tsup": "tsup --dts",
|
|
28
|
+
"build": "yarn tsc && yarn build-tsup",
|
|
29
|
+
"build:watch": "yarn build-tsup --watch --clean=false",
|
|
29
30
|
"circular-deps": "madge --circular --extensions ts,tsx .",
|
|
30
31
|
"clean": "rm -rf .turbo",
|
|
31
32
|
"format:fix": "prettier . --write",
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
"@emotion/css": "^11.11.0",
|
|
43
44
|
"@emotion/react": "^11.11.0",
|
|
44
45
|
"@emotion/styled": "^11.11.0",
|
|
45
|
-
"@lightsparkdev/core": "1.0.
|
|
46
|
+
"@lightsparkdev/core": "1.0.18",
|
|
46
47
|
"@simbathesailor/use-what-changed": "^2.0.0",
|
|
47
48
|
"gql": "^1.1.2",
|
|
48
49
|
"lodash-es": "^4.17.21",
|
|
@@ -54,7 +55,7 @@
|
|
|
54
55
|
},
|
|
55
56
|
"devDependencies": {
|
|
56
57
|
"@lightsparkdev/eslint-config": "*",
|
|
57
|
-
"@lightsparkdev/tsconfig": "0.0.
|
|
58
|
+
"@lightsparkdev/tsconfig": "0.0.1",
|
|
58
59
|
"@svgr/plugin-jsx": "^8.1.0",
|
|
59
60
|
"@testing-library/dom": "^9.2.0",
|
|
60
61
|
"@testing-library/jest-dom": "^6.1.2",
|
|
@@ -80,5 +81,8 @@
|
|
|
80
81
|
"files": [
|
|
81
82
|
"dist/*",
|
|
82
83
|
"CHANGELOG.md"
|
|
83
|
-
]
|
|
84
|
+
],
|
|
85
|
+
"engines": {
|
|
86
|
+
"node": ">=18"
|
|
87
|
+
}
|
|
84
88
|
}
|