@lightsparkdev/ui 0.0.8 → 0.0.11
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 +27 -0
- package/dist/{chunk-NRXJA2PM.js → chunk-3EVAP5JT.js} +1 -1
- package/dist/{chunk-4KWTXZRY.js → chunk-3GS5EFXV.js} +1 -1
- package/dist/{chunk-WTO7C7WA.js → chunk-5POPBNPS.js} +1 -1
- package/dist/{chunk-UWN53KLJ.js → chunk-7C4MHI6Q.js} +3 -3
- package/dist/{chunk-6FHLZM6N.js → chunk-7T36JGTC.js} +2 -2
- package/dist/{chunk-YPB5SA65.js → chunk-A4FQBEYU.js} +6 -6
- package/dist/{chunk-SZVMKB4E.js → chunk-ATUH6SXK.js} +19 -8
- package/dist/{chunk-U6XT5JKC.js → chunk-DQRN4E5G.js} +1 -1
- package/dist/{chunk-36C653MV.js → chunk-E3AOYBY5.js} +1 -1
- package/dist/{chunk-MAMSU2XB.js → chunk-EEFNW7NS.js} +3 -3
- package/dist/{chunk-2YB7653N.js → chunk-FCZJILMW.js} +1 -1
- package/dist/{chunk-ZYHA6MJC.js → chunk-H3RW6JSU.js} +1 -1
- package/dist/chunk-IPAXAP6K.js +119 -0
- package/dist/{chunk-BAO4T4G5.js → chunk-J4FJQ3FN.js} +1 -1
- package/dist/{chunk-HNVQIY5U.js → chunk-JK4BP73A.js} +39 -30
- package/dist/{chunk-ZSUX6RLD.js → chunk-KMR5C25B.js} +1 -1
- package/dist/{chunk-2JM7UTAZ.js → chunk-NFSAJ5GJ.js} +8 -8
- package/dist/{chunk-DAVVD7YE.js → chunk-NM7UW54G.js} +18 -21
- package/dist/chunk-P3EUPXFA.js +150 -0
- package/dist/chunk-PBRN7MJY.js +315 -0
- package/dist/{chunk-CW3W2VTZ.js → chunk-PVQCLQNA.js} +1 -1
- package/dist/{chunk-VHW2KROZ.js → chunk-RWIZ7Q74.js} +1 -1
- package/dist/{chunk-744FBGRP.js → chunk-XP2MX2AA.js} +1 -1
- package/dist/{chunk-XAZ6NZ6I.js → chunk-XZR237JJ.js} +1 -1
- package/dist/{chunk-FN5PM3HQ.js → chunk-Y37DCY7Y.js} +6 -6
- package/dist/{chunk-76Q4BK35.js → chunk-ZANLDY2W.js} +5 -5
- package/dist/components/Badge.cjs +38 -24
- package/dist/components/Badge.js +2 -2
- package/dist/components/Button.cjs +38 -24
- package/dist/components/Button.js +6 -6
- package/dist/components/ButtonRow.cjs +42 -28
- package/dist/components/ButtonRow.js +8 -8
- 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 -24
- package/dist/components/Collapsible.js +4 -4
- package/dist/components/ContentTable.cjs +38 -24
- package/dist/components/ContentTable.js +3 -3
- package/dist/components/CopyToClipboardButton.cjs +38 -24
- package/dist/components/CopyToClipboardButton.js +5 -5
- package/dist/components/CurrencyAmount.cjs +38 -24
- package/dist/components/CurrencyAmount.js +3 -3
- package/dist/components/FileInput.cjs +38 -24
- package/dist/components/FileInput.js +7 -7
- 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 -24
- package/dist/components/Icon.js +2 -2
- package/dist/components/LightTooltip.cjs +38 -24
- package/dist/components/LightTooltip.js +2 -2
- package/dist/components/LightsparkProvider.cjs +38 -24
- package/dist/components/LightsparkProvider.js +3 -3
- package/dist/components/Loading.cjs +38 -24
- package/dist/components/Loading.js +3 -3
- package/dist/components/Modal.cjs +46 -34
- package/dist/components/Modal.js +9 -9
- package/dist/components/Pill.cjs +38 -24
- package/dist/components/Pill.js +6 -6
- package/dist/components/ProgressBar.cjs +38 -24
- package/dist/components/ProgressBar.js +2 -2
- package/dist/components/SecretContainer.cjs +38 -24
- package/dist/components/SecretContainer.js +6 -6
- package/dist/components/TextIconAligner.cjs +38 -24
- package/dist/components/TextIconAligner.js +3 -3
- package/dist/components/UnstyledButton.cjs +38 -24
- package/dist/components/UnstyledButton.js +2 -2
- package/dist/components/documentation/AnchorLinkHeader.cjs +38 -24
- package/dist/components/documentation/AnchorLinkHeader.js +3 -3
- package/dist/components/documentation/index.cjs +38 -24
- package/dist/components/documentation/index.js +3 -3
- package/dist/components/index.cjs +737 -185
- package/dist/components/index.d.cts +2 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +51 -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/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/index.cjs +38 -24
- package/dist/icons/index.js +2 -2
- package/dist/styles/common.cjs +38 -34
- package/dist/styles/common.d.cts +10 -7
- package/dist/styles/common.d.ts +10 -7
- package/dist/styles/common.js +1 -11
- package/dist/styles/fields.cjs +56 -31
- package/dist/styles/fields.d.cts +4 -3
- package/dist/styles/fields.d.ts +4 -3
- package/dist/styles/fields.js +2 -2
- package/dist/styles/fonts/typography/Article.cjs +38 -24
- package/dist/styles/fonts/typography/Article.js +6 -6
- package/dist/styles/fonts/typography/index.cjs +38 -24
- package/dist/styles/fonts/typography/index.js +11 -11
- package/dist/styles/fonts/typographyTokens.d.cts +1 -4
- package/dist/styles/fonts/typographyTokens.d.ts +1 -4
- package/dist/styles/global.cjs +38 -24
- package/dist/styles/global.js +2 -2
- package/dist/styles/type.cjs +38 -24
- package/dist/styles/type.js +8 -144
- package/dist/styles/utils.cjs +38 -24
- package/dist/styles/utils.js +2 -2
- package/package.json +7 -4
package/dist/styles/type.js
CHANGED
|
@@ -1,151 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
Heading,
|
|
4
|
+
headingWithDefaults,
|
|
5
|
+
headings
|
|
6
|
+
} from "../chunk-P3EUPXFA.js";
|
|
7
|
+
import "../chunk-FCZJILMW.js";
|
|
8
|
+
import "../chunk-JK4BP73A.js";
|
|
7
9
|
import "../chunk-2VBDEO6M.js";
|
|
8
10
|
import "../chunk-E4EXM4SY.js";
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
} from "../chunk-JSGRNWSB.js";
|
|
12
|
-
import {
|
|
13
|
-
__spreadValues
|
|
14
|
-
} from "../chunk-CIGAQ47A.js";
|
|
15
|
-
|
|
16
|
-
// src/styles/type.tsx
|
|
17
|
-
import { css, useTheme } from "@emotion/react";
|
|
18
|
-
import styled from "@emotion/styled";
|
|
19
|
-
import { jsx } from "@emotion/react/jsx-runtime";
|
|
20
|
-
var defaultHeadingSizes = {
|
|
21
|
-
h1: {
|
|
22
|
-
size: 32,
|
|
23
|
-
sizeSm: 21
|
|
24
|
-
},
|
|
25
|
-
h2: {
|
|
26
|
-
size: 24,
|
|
27
|
-
sizeSm: 18
|
|
28
|
-
},
|
|
29
|
-
h3: {
|
|
30
|
-
size: 21,
|
|
31
|
-
sizeSm: 18
|
|
32
|
-
},
|
|
33
|
-
h4: {
|
|
34
|
-
size: 14,
|
|
35
|
-
sizeSm: 14
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var defaultHeadingMargins = {
|
|
39
|
-
h1: {
|
|
40
|
-
mt: 24,
|
|
41
|
-
mb: 24,
|
|
42
|
-
mtSm: 24,
|
|
43
|
-
mbSm: 24
|
|
44
|
-
},
|
|
45
|
-
h2: {
|
|
46
|
-
mt: 24,
|
|
47
|
-
mb: 24,
|
|
48
|
-
mtSm: 24,
|
|
49
|
-
mbSm: 24
|
|
50
|
-
},
|
|
51
|
-
h3: {
|
|
52
|
-
mt: 24,
|
|
53
|
-
mb: 24,
|
|
54
|
-
mtSm: 24,
|
|
55
|
-
mbSm: 24
|
|
56
|
-
},
|
|
57
|
-
h4: {
|
|
58
|
-
mt: 16,
|
|
59
|
-
mb: 16,
|
|
60
|
-
mtSm: 16,
|
|
61
|
-
mbSm: 16
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
var baseHeading = ({ mt, mb, mtSm, mbSm, theme }) => css`
|
|
65
|
-
line-height: 1.214em;
|
|
66
|
-
|
|
67
|
-
margin-bottom: ${mb}px;
|
|
68
|
-
margin-top: ${mt}px;
|
|
69
|
-
|
|
70
|
-
${bp.sm(`
|
|
71
|
-
margin-top: ${mtSm}px;
|
|
72
|
-
margin-bottom: ${mbSm}px;
|
|
73
|
-
`)}
|
|
74
|
-
`;
|
|
75
|
-
var firstChildStyles = firstChild(`margin-top: 0;`);
|
|
76
|
-
var headings = {
|
|
77
|
-
h1: styled.h1`
|
|
78
|
-
${(props) => baseHeading(props)}
|
|
79
|
-
${firstChildStyles}
|
|
80
|
-
|
|
81
|
-
font-size: ${pxToRems(defaultHeadingSizes.h1.size)};
|
|
82
|
-
font-weight: ${({ light }) => light ? 400 : 800}};
|
|
83
|
-
${bp.sm(`
|
|
84
|
-
font-size: ${pxToRems(defaultHeadingSizes.h1.sizeSm)};
|
|
85
|
-
`)}
|
|
86
|
-
`,
|
|
87
|
-
h2: styled.h2`
|
|
88
|
-
${(props) => baseHeading(props)}
|
|
89
|
-
${firstChildStyles}
|
|
90
|
-
|
|
91
|
-
font-size: ${pxToRems(defaultHeadingSizes.h2.size)};
|
|
92
|
-
font-weight: ${({ light }) => light ? 400 : 700}};
|
|
93
|
-
${bp.sm(`
|
|
94
|
-
font-size: ${pxToRems(defaultHeadingSizes.h2.sizeSm)};
|
|
95
|
-
`)}
|
|
96
|
-
`,
|
|
97
|
-
h3: styled.h3`
|
|
98
|
-
${(props) => baseHeading(props)}
|
|
99
|
-
${firstChildStyles}
|
|
100
|
-
|
|
101
|
-
font-size: ${pxToRems(defaultHeadingSizes.h3.size)};
|
|
102
|
-
font-weight: ${({ light }) => light ? 400 : 700}};
|
|
103
|
-
${bp.sm(`
|
|
104
|
-
font-size: ${pxToRems(defaultHeadingSizes.h3.sizeSm)};
|
|
105
|
-
`)}
|
|
106
|
-
`,
|
|
107
|
-
h4: styled.h4`
|
|
108
|
-
${(props) => baseHeading(props)}
|
|
109
|
-
${firstChildStyles}
|
|
110
|
-
|
|
111
|
-
font-size: ${pxToRems(defaultHeadingSizes.h4.size)};
|
|
112
|
-
font-weight: ${({ light }) => light ? 400 : 600}};
|
|
113
|
-
${bp.sm(`
|
|
114
|
-
font-size: ${pxToRems(defaultHeadingSizes.h4.sizeSm)};
|
|
115
|
-
`)}
|
|
116
|
-
`
|
|
117
|
-
};
|
|
118
|
-
function Heading({
|
|
119
|
-
children,
|
|
120
|
-
type = "h2",
|
|
121
|
-
id,
|
|
122
|
-
mt = defaultHeadingMargins[type].mt,
|
|
123
|
-
mb = defaultHeadingMargins[type].mb,
|
|
124
|
-
mtSm = defaultHeadingMargins[type].mtSm,
|
|
125
|
-
mbSm = defaultHeadingMargins[type].mbSm,
|
|
126
|
-
m0 = false,
|
|
127
|
-
light = false
|
|
128
|
-
}) {
|
|
129
|
-
const StyledHeading = headings[type];
|
|
130
|
-
const theme = useTheme();
|
|
131
|
-
const heading = /* @__PURE__ */ jsx(
|
|
132
|
-
StyledHeading,
|
|
133
|
-
{
|
|
134
|
-
id,
|
|
135
|
-
mt: m0 ? 0 : mt,
|
|
136
|
-
mb: m0 ? 0 : mb,
|
|
137
|
-
mtSm: m0 ? 0 : mtSm,
|
|
138
|
-
mbSm: m0 ? 0 : mbSm,
|
|
139
|
-
light,
|
|
140
|
-
theme,
|
|
141
|
-
children: id ? /* @__PURE__ */ jsx("a", { href: `#${id}`, css: { color: "inherit" }, children }) : children
|
|
142
|
-
}
|
|
143
|
-
);
|
|
144
|
-
return heading;
|
|
145
|
-
}
|
|
146
|
-
function headingWithDefaults(defaultProps) {
|
|
147
|
-
return (props) => /* @__PURE__ */ jsx(Heading, __spreadValues(__spreadValues({}, defaultProps), props));
|
|
148
|
-
}
|
|
11
|
+
import "../chunk-JSGRNWSB.js";
|
|
12
|
+
import "../chunk-CIGAQ47A.js";
|
|
149
13
|
export {
|
|
150
14
|
Heading,
|
|
151
15
|
headingWithDefaults,
|
package/dist/styles/utils.cjs
CHANGED
|
@@ -1276,30 +1276,44 @@ function hexToRGB(hex) {
|
|
|
1276
1276
|
// src/styles/common.tsx
|
|
1277
1277
|
var rootFontSizePx = 12;
|
|
1278
1278
|
var rootFontSizeRems = rootFontSizePx / 16;
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
`
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
`;
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
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);
|
|
1303
1317
|
var standardCardShadow = import_react4.css`
|
|
1304
1318
|
box-shadow:
|
|
1305
1319
|
0px 4px 10px 0px rgba(0, 0, 0, 0.08),
|
package/dist/styles/utils.js
CHANGED
|
@@ -13,8 +13,8 @@ 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";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightsparkdev/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@emotion/css": "^11.11.0",
|
|
44
44
|
"@emotion/react": "^11.11.0",
|
|
45
45
|
"@emotion/styled": "^11.11.0",
|
|
46
|
-
"@lightsparkdev/core": "1.0.
|
|
46
|
+
"@lightsparkdev/core": "1.0.20",
|
|
47
47
|
"@simbathesailor/use-what-changed": "^2.0.0",
|
|
48
48
|
"gql": "^1.1.2",
|
|
49
49
|
"lodash-es": "^4.17.21",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@lightsparkdev/eslint-config": "*",
|
|
58
|
-
"@lightsparkdev/tsconfig": "0.0.
|
|
58
|
+
"@lightsparkdev/tsconfig": "0.0.1",
|
|
59
59
|
"@svgr/plugin-jsx": "^8.1.0",
|
|
60
60
|
"@testing-library/dom": "^9.2.0",
|
|
61
61
|
"@testing-library/jest-dom": "^6.1.2",
|
|
@@ -81,5 +81,8 @@
|
|
|
81
81
|
"files": [
|
|
82
82
|
"dist/*",
|
|
83
83
|
"CHANGELOG.md"
|
|
84
|
-
]
|
|
84
|
+
],
|
|
85
|
+
"engines": {
|
|
86
|
+
"node": ">=18"
|
|
87
|
+
}
|
|
85
88
|
}
|