@lightsparkdev/ui 0.0.2 → 0.0.3
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 +7 -0
- package/dist/{chunk-Z4M2ODOW.js → chunk-2VBDEO6M.js} +1 -1
- package/dist/{chunk-6CJNPRC3.js → chunk-3PB5DNAL.js} +1 -1
- package/dist/chunk-3XSQV5U4.js +26 -0
- package/dist/{chunk-ABA75YLN.js → chunk-4I2ABBID.js} +2 -2
- package/dist/{chunk-7ZTWDJAE.js → chunk-4K2KAYVH.js} +2 -2
- package/dist/{chunk-AFAP6ZGM.js → chunk-4ZZHBSW4.js} +41 -37
- package/dist/{chunk-JD7JHP46.js → chunk-6R6A5H4I.js} +18 -9
- package/dist/{chunk-I5KUI7TK.js → chunk-6RXFA73Z.js} +1 -1
- package/dist/{chunk-WLHM7GX2.js → chunk-ANJDI74G.js} +2 -2
- package/dist/{chunk-EXB35D5E.js → chunk-BCFRW7CV.js} +1 -1
- package/dist/{chunk-RIU33XNS.js → chunk-DHNWT2E5.js} +1 -1
- package/dist/{chunk-F4FIOIYM.js → chunk-E4EXM4SY.js} +0 -2
- package/dist/{chunk-5XTI555J.js → chunk-EZ4RHFY7.js} +1 -1
- package/dist/{chunk-345XTQ55.js → chunk-FHNYQLMF.js} +2 -2
- package/dist/{chunk-N2J673NM.js → chunk-FRIQXHPR.js} +3 -3
- package/dist/{chunk-4Y2M2HEF.js → chunk-LD5LZXUP.js} +2 -2
- package/dist/{chunk-XU3F6HH6.js → chunk-LN7MMOXE.js} +2 -2
- package/dist/{chunk-HC4KIHUT.js → chunk-MYG24ZWT.js} +1 -1
- package/dist/{chunk-WK4HZX53.js → chunk-MYKMYG6H.js} +2 -2
- package/dist/{chunk-N7SP3C6R.js → chunk-OLAFBUE5.js} +1 -1
- package/dist/{chunk-BGOEN6S2.js → chunk-OO5UJRAW.js} +2 -2
- package/dist/{chunk-QOUEEA3G.js → chunk-PVUPVJ3F.js} +1 -1
- package/dist/{chunk-7VX4OOSZ.js → chunk-RBYRXBPI.js} +2 -2
- package/dist/{chunk-MQZEMU23.js → chunk-SUD5NOKE.js} +6 -6
- package/dist/{chunk-Z4MZOSEJ.js → chunk-SV5QPU7N.js} +1 -1
- package/dist/{chunk-C4OKXC6T.js → chunk-SW6ZA7W2.js} +2 -2
- package/dist/{chunk-QMHY6EGS.js → chunk-U6LQLAWI.js} +3 -3
- package/dist/{chunk-IZBH5JX6.js → chunk-VV7F7VVL.js} +2 -2
- package/dist/{chunk-SMLXEMZE.js → chunk-WB6FFT7Y.js} +16 -7
- package/dist/{chunk-M46YHH4D.js → chunk-WEPQ7LRL.js} +1 -1
- package/dist/{chunk-HZH77KO7.js → chunk-XUGLVWSH.js} +1 -1
- package/dist/{chunk-XRIZ5OCE.js → chunk-YHSFWCFN.js} +2 -2
- package/dist/{chunk-2GX5Y72Y.js → chunk-ZQTE53SK.js} +1 -1
- package/dist/components/Button.js +8 -8
- package/dist/components/ButtonRow.js +10 -10
- package/dist/components/Collapsible.cjs +14 -5
- package/dist/components/Collapsible.d.cts +9 -1
- package/dist/components/Collapsible.d.ts +9 -1
- package/dist/components/Collapsible.js +7 -6
- package/dist/components/ContentTable.js +5 -5
- package/dist/components/CopyToClipboardButton.js +6 -6
- package/dist/components/CurrencyAmount.js +5 -5
- package/dist/components/Icon.js +4 -4
- package/dist/components/LightsparkProvider.js +5 -5
- package/dist/components/Loading.js +5 -5
- package/dist/components/Modal.cjs +12 -3
- package/dist/components/Modal.js +11 -11
- package/dist/components/ProgressBar.js +3 -3
- package/dist/components/SecretContainer.js +7 -7
- package/dist/components/TextIconAligner.js +5 -5
- package/dist/components/UnstyledButton.js +4 -4
- package/dist/components/documentation/AnchorLinkHeader.cjs +0 -2
- package/dist/components/documentation/AnchorLinkHeader.js +6 -6
- package/dist/components/documentation/index.cjs +0 -2
- package/dist/components/documentation/index.js +6 -6
- package/dist/components/index.cjs +26 -8
- package/dist/components/index.js +20 -19
- package/dist/hooks/useWhatChanged.cjs +30 -0
- package/dist/hooks/useWhatChanged.d.cts +1 -0
- package/dist/hooks/useWhatChanged.d.ts +1 -0
- package/dist/hooks/useWhatChanged.js +7 -0
- package/dist/icons/ApiConnection.cjs +44 -0
- package/dist/icons/ApiConnection.d.cts +5 -0
- package/dist/icons/ApiConnection.d.ts +5 -0
- package/dist/icons/ApiConnection.js +25 -0
- package/dist/icons/index.js +4 -4
- package/dist/index.d.cts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/router.js +3 -3
- package/dist/styles/colors.js +2 -2
- package/dist/styles/common.js +3 -3
- package/dist/styles/fields.js +3 -3
- package/dist/styles/fonts/typography/Article.cjs +28 -26
- package/dist/styles/fonts/typography/Article.js +13 -12
- package/dist/styles/fonts/typography/Body.cjs +0 -2
- package/dist/styles/fonts/typography/Body.js +3 -3
- package/dist/styles/fonts/typography/BodyStrong.cjs +0 -2
- package/dist/styles/fonts/typography/BodyStrong.js +3 -3
- package/dist/styles/fonts/typography/Code.cjs +0 -2
- package/dist/styles/fonts/typography/Code.js +2 -2
- package/dist/styles/fonts/typography/Display.cjs +0 -2
- package/dist/styles/fonts/typography/Display.js +3 -3
- package/dist/styles/fonts/typography/Headline.cjs +0 -2
- package/dist/styles/fonts/typography/Headline.js +3 -3
- package/dist/styles/fonts/typography/Label.cjs +0 -2
- package/dist/styles/fonts/typography/Label.js +3 -3
- package/dist/styles/fonts/typography/LabelModerate.cjs +0 -2
- package/dist/styles/fonts/typography/LabelModerate.js +3 -3
- package/dist/styles/fonts/typography/LabelStrong.cjs +0 -2
- package/dist/styles/fonts/typography/LabelStrong.js +3 -3
- package/dist/styles/fonts/typography/Overline.cjs +0 -2
- package/dist/styles/fonts/typography/Overline.js +3 -3
- package/dist/styles/fonts/typography/Title.cjs +0 -2
- package/dist/styles/fonts/typography/Title.js +3 -3
- package/dist/styles/fonts/typography/index.cjs +28 -26
- package/dist/styles/fonts/typography/index.js +26 -25
- package/dist/styles/fonts/typographyTokens.cjs +0 -2
- package/dist/styles/fonts/typographyTokens.d.cts +1 -4
- package/dist/styles/fonts/typographyTokens.d.ts +1 -4
- package/dist/styles/fonts/typographyTokens.js +1 -1
- package/dist/styles/global.js +4 -4
- package/dist/styles/tokens/spacing.cjs +50 -0
- package/dist/styles/tokens/spacing.d.cts +22 -0
- package/dist/styles/tokens/spacing.d.ts +22 -0
- package/dist/styles/tokens/spacing.js +7 -0
- package/dist/styles/type.js +4 -4
- package/dist/styles/utils.js +4 -4
- package/package.json +2 -1
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
rootFontSizeRems,
|
|
6
6
|
standardLineHeightEms
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XUGLVWSH.js";
|
|
8
8
|
import {
|
|
9
9
|
useThemeBg
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-2VBDEO6M.js";
|
|
11
11
|
import {
|
|
12
12
|
bp
|
|
13
13
|
} from "./chunk-JSGRNWSB.js";
|
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
Button,
|
|
3
3
|
ButtonSelector,
|
|
4
4
|
StyledButton
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-SUD5NOKE.js";
|
|
6
|
+
import "../chunk-6RXFA73Z.js";
|
|
7
|
+
import "../chunk-OLAFBUE5.js";
|
|
8
|
+
import "../chunk-DHNWT2E5.js";
|
|
9
|
+
import "../chunk-MYG24ZWT.js";
|
|
10
10
|
import "../chunk-LAMQKQU3.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-XUGLVWSH.js";
|
|
12
12
|
import "../chunk-CLU2FRJZ.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-2VBDEO6M.js";
|
|
14
|
+
import "../chunk-E4EXM4SY.js";
|
|
15
15
|
import "../chunk-JSGRNWSB.js";
|
|
16
16
|
import "../chunk-CIGAQ47A.js";
|
|
17
17
|
export {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ButtonRow,
|
|
3
3
|
ButtonRowContainer
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-U6LQLAWI.js";
|
|
5
|
+
import "../chunk-SUD5NOKE.js";
|
|
6
|
+
import "../chunk-6RXFA73Z.js";
|
|
7
|
+
import "../chunk-OLAFBUE5.js";
|
|
8
|
+
import "../chunk-SV5QPU7N.js";
|
|
9
|
+
import "../chunk-DHNWT2E5.js";
|
|
10
|
+
import "../chunk-MYG24ZWT.js";
|
|
11
11
|
import "../chunk-LAMQKQU3.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-XUGLVWSH.js";
|
|
13
13
|
import "../chunk-CLU2FRJZ.js";
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-2VBDEO6M.js";
|
|
15
|
+
import "../chunk-E4EXM4SY.js";
|
|
16
16
|
import "../chunk-JSGRNWSB.js";
|
|
17
17
|
import "../chunk-CIGAQ47A.js";
|
|
18
18
|
export {
|
|
@@ -1520,7 +1520,9 @@ function Collapsible({
|
|
|
1520
1520
|
open,
|
|
1521
1521
|
handleToggle,
|
|
1522
1522
|
hamburger,
|
|
1523
|
-
full
|
|
1523
|
+
full,
|
|
1524
|
+
buttonTextElement,
|
|
1525
|
+
contentIndent = true
|
|
1524
1526
|
}) {
|
|
1525
1527
|
const [isOpen, setIsOpen] = (0, import_react7.useState)(open);
|
|
1526
1528
|
const handleClick = () => {
|
|
@@ -1534,12 +1536,18 @@ function Collapsible({
|
|
|
1534
1536
|
}, [open]);
|
|
1535
1537
|
const iconName = hamburger ? isOpen ? "Close" : "StackedLines" : "Down";
|
|
1536
1538
|
const iconWidth = iconName === "Close" ? 12 : 14;
|
|
1539
|
+
let textElement = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", {});
|
|
1540
|
+
if (buttonTextElement) {
|
|
1541
|
+
textElement = buttonTextElement;
|
|
1542
|
+
} else if (text) {
|
|
1543
|
+
textElement = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color, children: text });
|
|
1544
|
+
}
|
|
1537
1545
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(StyledCollapsible, { className, children: [
|
|
1538
1546
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(StyledCollapsibleButton, { onClick: handleClick, children: [
|
|
1539
|
-
|
|
1547
|
+
textElement,
|
|
1540
1548
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IconContainer2, { isOpen, hamburger, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon, { width: iconWidth, name: iconName }) })
|
|
1541
1549
|
] }),
|
|
1542
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CollapsingContainer, { isOpen, full, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InnerPadding, { children }) })
|
|
1550
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CollapsingContainer, { isOpen, full, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InnerPadding, { contentIndent, children }) })
|
|
1543
1551
|
] });
|
|
1544
1552
|
}
|
|
1545
1553
|
var StyledCollapsible = import_styled3.default.div`
|
|
@@ -1602,8 +1610,9 @@ var CollapsingContainer = import_styled3.default.div`
|
|
|
1602
1610
|
}
|
|
1603
1611
|
`;
|
|
1604
1612
|
var InnerPadding = import_styled3.default.div`
|
|
1605
|
-
padding: 4px 0 4px
|
|
1606
|
-
|
|
1613
|
+
padding: ${"4px" /* 3xs */} 0 ${"4px" /* 3xs */}
|
|
1614
|
+
${(props) => props.contentIndent ? "16px" /* md */ : "0"};
|
|
1615
|
+
gap: ${"2px" /* 4xs */};
|
|
1607
1616
|
display: flex;
|
|
1608
1617
|
flex-direction: column;
|
|
1609
1618
|
`;
|
|
@@ -15,8 +15,16 @@ type CollapsibleProps = {
|
|
|
15
15
|
* Opens the collapsible to full screen height if true.
|
|
16
16
|
*/
|
|
17
17
|
full?: boolean | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Adds padding to the content of the collapsible.
|
|
20
|
+
*/
|
|
21
|
+
contentIndent?: boolean | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Replaces the default button text with the provided element.
|
|
24
|
+
*/
|
|
25
|
+
buttonTextElement?: React.ReactNode;
|
|
18
26
|
};
|
|
19
|
-
declare function Collapsible({ children, className, text, color, open, handleToggle, hamburger, full, }: CollapsibleProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
27
|
+
declare function Collapsible({ children, className, text, color, open, handleToggle, hamburger, full, buttonTextElement, contentIndent, }: CollapsibleProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
20
28
|
declare const StyledCollapsible: _emotion_styled.StyledComponent<{
|
|
21
29
|
theme?: _emotion_react.Theme;
|
|
22
30
|
as?: react.ElementType<any>;
|
|
@@ -15,8 +15,16 @@ type CollapsibleProps = {
|
|
|
15
15
|
* Opens the collapsible to full screen height if true.
|
|
16
16
|
*/
|
|
17
17
|
full?: boolean | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Adds padding to the content of the collapsible.
|
|
20
|
+
*/
|
|
21
|
+
contentIndent?: boolean | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Replaces the default button text with the provided element.
|
|
24
|
+
*/
|
|
25
|
+
buttonTextElement?: React.ReactNode;
|
|
18
26
|
};
|
|
19
|
-
declare function Collapsible({ children, className, text, color, open, handleToggle, hamburger, full, }: CollapsibleProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
27
|
+
declare function Collapsible({ children, className, text, color, open, handleToggle, hamburger, full, buttonTextElement, contentIndent, }: CollapsibleProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
20
28
|
declare const StyledCollapsible: _emotion_styled.StyledComponent<{
|
|
21
29
|
theme?: _emotion_react.Theme;
|
|
22
30
|
as?: react.ElementType<any>;
|
|
@@ -3,14 +3,15 @@ import {
|
|
|
3
3
|
CollapsingContainer,
|
|
4
4
|
StyledCollapsible,
|
|
5
5
|
StyledCollapsibleButton
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
6
|
+
} from "../chunk-WB6FFT7Y.js";
|
|
7
|
+
import "../chunk-3XSQV5U4.js";
|
|
8
|
+
import "../chunk-SV5QPU7N.js";
|
|
9
|
+
import "../chunk-MYG24ZWT.js";
|
|
9
10
|
import "../chunk-LAMQKQU3.js";
|
|
10
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-XUGLVWSH.js";
|
|
11
12
|
import "../chunk-CLU2FRJZ.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-2VBDEO6M.js";
|
|
14
|
+
import "../chunk-E4EXM4SY.js";
|
|
14
15
|
import "../chunk-JSGRNWSB.js";
|
|
15
16
|
import "../chunk-CIGAQ47A.js";
|
|
16
17
|
export {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ContentTable,
|
|
3
3
|
StyledContentTable
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-EZ4RHFY7.js";
|
|
5
|
+
import "../chunk-MYG24ZWT.js";
|
|
6
6
|
import "../chunk-LAMQKQU3.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-XUGLVWSH.js";
|
|
8
8
|
import "../chunk-CLU2FRJZ.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-2VBDEO6M.js";
|
|
10
|
+
import "../chunk-E4EXM4SY.js";
|
|
11
11
|
import "../chunk-JSGRNWSB.js";
|
|
12
12
|
import "../chunk-CIGAQ47A.js";
|
|
13
13
|
export {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopyToClipboardButton
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-FRIQXHPR.js";
|
|
4
|
+
import "../chunk-DHNWT2E5.js";
|
|
5
|
+
import "../chunk-MYG24ZWT.js";
|
|
6
6
|
import "../chunk-LAMQKQU3.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-XUGLVWSH.js";
|
|
8
8
|
import "../chunk-CLU2FRJZ.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-2VBDEO6M.js";
|
|
10
|
+
import "../chunk-E4EXM4SY.js";
|
|
11
11
|
import "../chunk-JSGRNWSB.js";
|
|
12
12
|
import "../chunk-CIGAQ47A.js";
|
|
13
13
|
export {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CurrencyAmount,
|
|
3
3
|
CurrencyIcon
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-3PB5DNAL.js";
|
|
5
|
+
import "../chunk-MYG24ZWT.js";
|
|
6
6
|
import "../chunk-LAMQKQU3.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-XUGLVWSH.js";
|
|
8
8
|
import "../chunk-CLU2FRJZ.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-2VBDEO6M.js";
|
|
10
|
+
import "../chunk-E4EXM4SY.js";
|
|
11
11
|
import "../chunk-JSGRNWSB.js";
|
|
12
12
|
import "../chunk-CIGAQ47A.js";
|
|
13
13
|
export {
|
package/dist/components/Icon.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Icon,
|
|
3
3
|
IconContainer
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-MYG24ZWT.js";
|
|
5
5
|
import "../chunk-LAMQKQU3.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-XUGLVWSH.js";
|
|
7
7
|
import "../chunk-CLU2FRJZ.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-2VBDEO6M.js";
|
|
9
|
+
import "../chunk-E4EXM4SY.js";
|
|
10
10
|
import "../chunk-JSGRNWSB.js";
|
|
11
11
|
import "../chunk-CIGAQ47A.js";
|
|
12
12
|
export {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LightsparkProvider
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-VV7F7VVL.js";
|
|
4
|
+
import "../chunk-YHSFWCFN.js";
|
|
5
5
|
import "../chunk-IJVWYT5G.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-XUGLVWSH.js";
|
|
7
7
|
import "../chunk-CLU2FRJZ.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-2VBDEO6M.js";
|
|
9
|
+
import "../chunk-E4EXM4SY.js";
|
|
10
10
|
import "../chunk-JSGRNWSB.js";
|
|
11
11
|
import "../chunk-CIGAQ47A.js";
|
|
12
12
|
export {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Loading,
|
|
3
3
|
LoadingWrapper
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-OLAFBUE5.js";
|
|
5
|
+
import "../chunk-MYG24ZWT.js";
|
|
6
6
|
import "../chunk-LAMQKQU3.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-XUGLVWSH.js";
|
|
8
8
|
import "../chunk-CLU2FRJZ.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-2VBDEO6M.js";
|
|
10
|
+
import "../chunk-E4EXM4SY.js";
|
|
11
11
|
import "../chunk-JSGRNWSB.js";
|
|
12
12
|
import "../chunk-CIGAQ47A.js";
|
|
13
13
|
export {
|
|
@@ -2030,6 +2030,7 @@ function Modal({
|
|
|
2030
2030
|
width = 460,
|
|
2031
2031
|
progressBar
|
|
2032
2032
|
}) {
|
|
2033
|
+
const visibleChangedRef = (0, import_react11.useRef)(false);
|
|
2033
2034
|
const nodeRef = (0, import_react11.useRef)(null);
|
|
2034
2035
|
const [defaultFirstFocusRef, defaultFirstFocusRefCb] = useLiveRef();
|
|
2035
2036
|
const ref = firstFocusRef || defaultFirstFocusRef;
|
|
@@ -2039,6 +2040,12 @@ function Modal({
|
|
|
2039
2040
|
const modalContainerRef = (0, import_react11.useRef)(null);
|
|
2040
2041
|
const bp2 = useBreakpoints();
|
|
2041
2042
|
const isSm = bp2.current("sm" /* sm */);
|
|
2043
|
+
(0, import_react11.useEffect)(() => {
|
|
2044
|
+
if (visible !== visibleChangedRef.current) {
|
|
2045
|
+
visibleChangedRef.current = visible;
|
|
2046
|
+
}
|
|
2047
|
+
}, [visible]);
|
|
2048
|
+
const visibleChanged = visible !== visibleChangedRef.current;
|
|
2042
2049
|
(0, import_react11.useEffect)(() => {
|
|
2043
2050
|
prevFocusedElement.current = document.activeElement;
|
|
2044
2051
|
if (!nodeRef.current) {
|
|
@@ -2092,14 +2099,16 @@ function Modal({
|
|
|
2092
2099
|
}, [onClose, visible, nonDismissable]);
|
|
2093
2100
|
(0, import_react11.useLayoutEffect)(() => {
|
|
2094
2101
|
if (visible) {
|
|
2095
|
-
|
|
2102
|
+
if (visibleChanged) {
|
|
2103
|
+
prevFocusedElement.current = document.activeElement;
|
|
2104
|
+
}
|
|
2096
2105
|
if (typeof ref === "object" && (ref == null ? void 0 : ref.current) && autoFocus) {
|
|
2097
2106
|
ref.current.focus();
|
|
2098
2107
|
}
|
|
2099
|
-
} else if (prevFocusedElement.current) {
|
|
2108
|
+
} else if (visibleChanged && prevFocusedElement.current) {
|
|
2100
2109
|
prevFocusedElement.current.focus();
|
|
2101
2110
|
}
|
|
2102
|
-
}, [visible, ref, autoFocus]);
|
|
2111
|
+
}, [visible, visibleChanged, ref, autoFocus]);
|
|
2103
2112
|
function onClickCloseButton(event) {
|
|
2104
2113
|
event.stopPropagation();
|
|
2105
2114
|
onClose();
|
package/dist/components/Modal.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Modal
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-6R6A5H4I.js";
|
|
5
5
|
import "../chunk-NBCCPGA4.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-ZQTE53SK.js";
|
|
7
|
+
import "../chunk-SUD5NOKE.js";
|
|
8
|
+
import "../chunk-6RXFA73Z.js";
|
|
9
|
+
import "../chunk-OLAFBUE5.js";
|
|
10
|
+
import "../chunk-SV5QPU7N.js";
|
|
11
|
+
import "../chunk-DHNWT2E5.js";
|
|
12
|
+
import "../chunk-MYG24ZWT.js";
|
|
13
13
|
import "../chunk-LAMQKQU3.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-XUGLVWSH.js";
|
|
15
15
|
import "../chunk-CLU2FRJZ.js";
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-2VBDEO6M.js";
|
|
17
|
+
import "../chunk-E4EXM4SY.js";
|
|
18
18
|
import "../chunk-JSGRNWSB.js";
|
|
19
19
|
import "../chunk-CIGAQ47A.js";
|
|
20
20
|
export {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ProgressBar
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-ZQTE53SK.js";
|
|
4
|
+
import "../chunk-2VBDEO6M.js";
|
|
5
|
+
import "../chunk-E4EXM4SY.js";
|
|
6
6
|
import "../chunk-JSGRNWSB.js";
|
|
7
7
|
import "../chunk-CIGAQ47A.js";
|
|
8
8
|
export {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SecretContainer
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-PVUPVJ3F.js";
|
|
4
|
+
import "../chunk-FRIQXHPR.js";
|
|
5
|
+
import "../chunk-DHNWT2E5.js";
|
|
6
|
+
import "../chunk-MYG24ZWT.js";
|
|
7
7
|
import "../chunk-LAMQKQU3.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-XUGLVWSH.js";
|
|
9
9
|
import "../chunk-CLU2FRJZ.js";
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-2VBDEO6M.js";
|
|
11
|
+
import "../chunk-E4EXM4SY.js";
|
|
12
12
|
import "../chunk-JSGRNWSB.js";
|
|
13
13
|
import "../chunk-CIGAQ47A.js";
|
|
14
14
|
export {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TextIconAligner
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-WEPQ7LRL.js";
|
|
4
|
+
import "../chunk-MYG24ZWT.js";
|
|
5
5
|
import "../chunk-LAMQKQU3.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-XUGLVWSH.js";
|
|
7
7
|
import "../chunk-CLU2FRJZ.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-2VBDEO6M.js";
|
|
9
|
+
import "../chunk-E4EXM4SY.js";
|
|
10
10
|
import "../chunk-JSGRNWSB.js";
|
|
11
11
|
import "../chunk-CIGAQ47A.js";
|
|
12
12
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UnstyledButton
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-DHNWT2E5.js";
|
|
4
|
+
import "../chunk-XUGLVWSH.js";
|
|
5
5
|
import "../chunk-CLU2FRJZ.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-2VBDEO6M.js";
|
|
7
|
+
import "../chunk-E4EXM4SY.js";
|
|
8
8
|
import "../chunk-JSGRNWSB.js";
|
|
9
9
|
import "../chunk-CIGAQ47A.js";
|
|
10
10
|
export {
|
|
@@ -1071,8 +1071,6 @@ var getTypography = (customFontFamilies) => {
|
|
|
1071
1071
|
var getTypographyString = (token) => {
|
|
1072
1072
|
return Object.entries(token).map((entry) => {
|
|
1073
1073
|
switch (entry[0]) {
|
|
1074
|
-
case "paragraph-spacing":
|
|
1075
|
-
return entry[1] === "default" ? "" : `margin-bottom: ${entry[1]};`;
|
|
1076
1074
|
case "paragraph-indent":
|
|
1077
1075
|
return `text-indent: ${entry[1]};`;
|
|
1078
1076
|
case "text-case":
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
AnchorLinkHeader
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-ANJDI74G.js";
|
|
5
|
+
import "../../chunk-4K2KAYVH.js";
|
|
6
|
+
import "../../chunk-MYG24ZWT.js";
|
|
7
7
|
import "../../chunk-LAMQKQU3.js";
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-XUGLVWSH.js";
|
|
9
9
|
import "../../chunk-CLU2FRJZ.js";
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
10
|
+
import "../../chunk-2VBDEO6M.js";
|
|
11
|
+
import "../../chunk-E4EXM4SY.js";
|
|
12
12
|
import "../../chunk-JSGRNWSB.js";
|
|
13
13
|
import "../../chunk-CIGAQ47A.js";
|
|
14
14
|
export {
|
|
@@ -1072,8 +1072,6 @@ var getTypography = (customFontFamilies) => {
|
|
|
1072
1072
|
var getTypographyString = (token) => {
|
|
1073
1073
|
return Object.entries(token).map((entry) => {
|
|
1074
1074
|
switch (entry[0]) {
|
|
1075
|
-
case "paragraph-spacing":
|
|
1076
|
-
return entry[1] === "default" ? "" : `margin-bottom: ${entry[1]};`;
|
|
1077
1075
|
case "paragraph-indent":
|
|
1078
1076
|
return `text-indent: ${entry[1]};`;
|
|
1079
1077
|
case "text-case":
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AnchorLinkHeader
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-ANJDI74G.js";
|
|
4
|
+
import "../../chunk-4K2KAYVH.js";
|
|
5
|
+
import "../../chunk-MYG24ZWT.js";
|
|
6
6
|
import "../../chunk-LAMQKQU3.js";
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-XUGLVWSH.js";
|
|
8
8
|
import "../../chunk-CLU2FRJZ.js";
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-2VBDEO6M.js";
|
|
10
|
+
import "../../chunk-E4EXM4SY.js";
|
|
11
11
|
import "../../chunk-JSGRNWSB.js";
|
|
12
12
|
import "../../chunk-CIGAQ47A.js";
|
|
13
13
|
export {
|
|
@@ -2027,7 +2027,9 @@ function Collapsible({
|
|
|
2027
2027
|
open,
|
|
2028
2028
|
handleToggle,
|
|
2029
2029
|
hamburger,
|
|
2030
|
-
full
|
|
2030
|
+
full,
|
|
2031
|
+
buttonTextElement,
|
|
2032
|
+
contentIndent = true
|
|
2031
2033
|
}) {
|
|
2032
2034
|
const [isOpen, setIsOpen] = (0, import_react9.useState)(open);
|
|
2033
2035
|
const handleClick = () => {
|
|
@@ -2041,12 +2043,18 @@ function Collapsible({
|
|
|
2041
2043
|
}, [open]);
|
|
2042
2044
|
const iconName = hamburger ? isOpen ? "Close" : "StackedLines" : "Down";
|
|
2043
2045
|
const iconWidth = iconName === "Close" ? 12 : 14;
|
|
2046
|
+
let textElement = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", {});
|
|
2047
|
+
if (buttonTextElement) {
|
|
2048
|
+
textElement = buttonTextElement;
|
|
2049
|
+
} else if (text) {
|
|
2050
|
+
textElement = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { color, children: text });
|
|
2051
|
+
}
|
|
2044
2052
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(StyledCollapsible, { className, children: [
|
|
2045
2053
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(StyledCollapsibleButton, { onClick: handleClick, children: [
|
|
2046
|
-
|
|
2054
|
+
textElement,
|
|
2047
2055
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconContainer2, { isOpen, hamburger, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { width: iconWidth, name: iconName }) })
|
|
2048
2056
|
] }),
|
|
2049
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CollapsingContainer, { isOpen, full, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(InnerPadding, { children }) })
|
|
2057
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CollapsingContainer, { isOpen, full, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(InnerPadding, { contentIndent, children }) })
|
|
2050
2058
|
] });
|
|
2051
2059
|
}
|
|
2052
2060
|
var StyledCollapsible = import_styled7.default.div`
|
|
@@ -2109,8 +2117,9 @@ var CollapsingContainer = import_styled7.default.div`
|
|
|
2109
2117
|
}
|
|
2110
2118
|
`;
|
|
2111
2119
|
var InnerPadding = import_styled7.default.div`
|
|
2112
|
-
padding: 4px 0 4px
|
|
2113
|
-
|
|
2120
|
+
padding: ${"4px" /* 3xs */} 0 ${"4px" /* 3xs */}
|
|
2121
|
+
${(props) => props.contentIndent ? "16px" /* md */ : "0"};
|
|
2122
|
+
gap: ${"2px" /* 4xs */};
|
|
2114
2123
|
display: flex;
|
|
2115
2124
|
flex-direction: column;
|
|
2116
2125
|
`;
|
|
@@ -2662,6 +2671,7 @@ function Modal({
|
|
|
2662
2671
|
width = 460,
|
|
2663
2672
|
progressBar
|
|
2664
2673
|
}) {
|
|
2674
|
+
const visibleChangedRef = (0, import_react17.useRef)(false);
|
|
2665
2675
|
const nodeRef = (0, import_react17.useRef)(null);
|
|
2666
2676
|
const [defaultFirstFocusRef, defaultFirstFocusRefCb] = useLiveRef();
|
|
2667
2677
|
const ref = firstFocusRef || defaultFirstFocusRef;
|
|
@@ -2671,6 +2681,12 @@ function Modal({
|
|
|
2671
2681
|
const modalContainerRef = (0, import_react17.useRef)(null);
|
|
2672
2682
|
const bp2 = useBreakpoints();
|
|
2673
2683
|
const isSm = bp2.current("sm" /* sm */);
|
|
2684
|
+
(0, import_react17.useEffect)(() => {
|
|
2685
|
+
if (visible !== visibleChangedRef.current) {
|
|
2686
|
+
visibleChangedRef.current = visible;
|
|
2687
|
+
}
|
|
2688
|
+
}, [visible]);
|
|
2689
|
+
const visibleChanged = visible !== visibleChangedRef.current;
|
|
2674
2690
|
(0, import_react17.useEffect)(() => {
|
|
2675
2691
|
prevFocusedElement.current = document.activeElement;
|
|
2676
2692
|
if (!nodeRef.current) {
|
|
@@ -2724,14 +2740,16 @@ function Modal({
|
|
|
2724
2740
|
}, [onClose, visible, nonDismissable]);
|
|
2725
2741
|
(0, import_react17.useLayoutEffect)(() => {
|
|
2726
2742
|
if (visible) {
|
|
2727
|
-
|
|
2743
|
+
if (visibleChanged) {
|
|
2744
|
+
prevFocusedElement.current = document.activeElement;
|
|
2745
|
+
}
|
|
2728
2746
|
if (typeof ref === "object" && (ref == null ? void 0 : ref.current) && autoFocus) {
|
|
2729
2747
|
ref.current.focus();
|
|
2730
2748
|
}
|
|
2731
|
-
} else if (prevFocusedElement.current) {
|
|
2749
|
+
} else if (visibleChanged && prevFocusedElement.current) {
|
|
2732
2750
|
prevFocusedElement.current.focus();
|
|
2733
2751
|
}
|
|
2734
|
-
}, [visible, ref, autoFocus]);
|
|
2752
|
+
}, [visible, visibleChanged, ref, autoFocus]);
|
|
2735
2753
|
function onClickCloseButton(event) {
|
|
2736
2754
|
event.stopPropagation();
|
|
2737
2755
|
onClose();
|