@lightsparkdev/ui 1.0.2 → 1.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 +6 -0
- package/dist/{buttons-e4eb84a2.d.ts → buttons-35280bfe.d.ts} +7 -0
- package/dist/{buttons-b7f56076.d.ts → buttons-36cdd0fe.d.ts} +7 -0
- package/dist/{chunk-GNVEN6UE.js → chunk-2AGBCGOW.js} +2 -2
- package/dist/{chunk-HZ63YB4Y.js → chunk-2XUHQWCJ.js} +3 -3
- package/dist/{chunk-CMQELZES.js → chunk-35PJW7RT.js} +2 -2
- package/dist/{chunk-37RRWSDE.js → chunk-435FPPZK.js} +2 -2
- package/dist/{chunk-55M7XHBZ.js → chunk-4BFBANKF.js} +8 -8
- package/dist/{chunk-VUXU77SU.js → chunk-4C2TISN7.js} +1 -1
- package/dist/{chunk-ZNZAY47J.js → chunk-4JHXRPRB.js} +3 -3
- package/dist/{chunk-XUVCOSIE.js → chunk-54EOEIEN.js} +2 -2
- package/dist/{chunk-BMSSV6NX.js → chunk-5TTLUOJ5.js} +1 -1
- package/dist/{chunk-S6AOKANU.js → chunk-6CNJ5ZCC.js} +4 -4
- package/dist/{chunk-2H7TBKII.js → chunk-7FHOKVKJ.js} +6 -6
- package/dist/{chunk-VYTN6ASZ.js → chunk-7IHNYMFQ.js} +2 -2
- package/dist/{chunk-F6EVBEMN.js → chunk-7N2PFDYE.js} +2 -2
- package/dist/{chunk-KFX7US6Y.js → chunk-7WDAN3OC.js} +1 -1
- package/dist/{chunk-XP3BAAUO.js → chunk-7YY6BH5O.js} +2 -2
- package/dist/{chunk-56QJRFP2.js → chunk-B6S7Y4K7.js} +2 -2
- package/dist/{chunk-SKXCT2FQ.js → chunk-BDZ46Z2I.js} +2 -2
- package/dist/{chunk-EMXTALIX.js → chunk-BENSR2YW.js} +1 -1
- package/dist/{chunk-5H32AOXL.js → chunk-BHP5YL2N.js} +1 -1
- package/dist/{chunk-2XRCGW74.js → chunk-BSH6WRUZ.js} +3 -3
- package/dist/{chunk-WV5AB4ZB.js → chunk-C4KZC45Y.js} +67 -33
- package/dist/{chunk-PNSZAJL7.js → chunk-CRTTTIAD.js} +2 -2
- package/dist/{chunk-CHK5DOMV.js → chunk-DXA3WUSX.js} +2 -2
- package/dist/{chunk-CZQER3QD.js → chunk-E4DUADXU.js} +1 -1
- package/dist/{chunk-CZCPVHVB.js → chunk-GSKTHUQJ.js} +2 -2
- package/dist/{chunk-TM3C4LEG.js → chunk-GWHKALYQ.js} +2 -2
- package/dist/{chunk-5XZJEYHG.js → chunk-HGOGF6I7.js} +1 -1
- package/dist/{chunk-KBYU4ZQ3.js → chunk-I3FI3FNP.js} +3 -3
- package/dist/{chunk-A4JZESAS.js → chunk-IBZBPQMZ.js} +7 -3
- package/dist/{chunk-DNVKN2FG.js → chunk-ILEZ6AWT.js} +3 -3
- package/dist/{chunk-TVLELY54.js → chunk-J3YVJWRG.js} +4 -4
- package/dist/{chunk-467PLJO3.js → chunk-JNNJVBHF.js} +51 -6
- package/dist/{chunk-J7SV67XL.js → chunk-K7FYXGOI.js} +1 -1
- package/dist/{chunk-2JYYREVX.js → chunk-KX5QZXCD.js} +1 -1
- package/dist/{chunk-NYQLPSG3.js → chunk-LGKXPUSI.js} +2 -2
- package/dist/{chunk-AI6DCUWK.js → chunk-LH7GLNMY.js} +1 -1
- package/dist/{chunk-UVGBD7XM.js → chunk-LIQSJ5R7.js} +2 -2
- package/dist/{chunk-W3BAJ3HT.js → chunk-LOL5TJ3H.js} +10 -10
- package/dist/{chunk-6JFJDBV2.js → chunk-LTCJ6LNO.js} +1 -1
- package/dist/{chunk-HRZNVE2K.js → chunk-MRGHRTKA.js} +2 -2
- package/dist/{chunk-HA4AQO3T.js → chunk-MWDDIXIP.js} +1 -1
- package/dist/{chunk-JOQCJPOA.js → chunk-N2NPIZCV.js} +9 -9
- package/dist/{chunk-TM2NGRD2.js → chunk-OKXC33OU.js} +1 -1
- package/dist/{chunk-7NPHOJXD.js → chunk-PG2W2HVB.js} +5 -5
- package/dist/{chunk-SRHSJOES.js → chunk-PQKVR2BR.js} +1 -1
- package/dist/{chunk-YRYVSAWS.js → chunk-QQSV7XJX.js} +1 -1
- package/dist/{chunk-27SFWLPS.js → chunk-RPNTFEXE.js} +1 -1
- package/dist/{chunk-RSAYBOK5.js → chunk-SEZEDINC.js} +3 -3
- package/dist/{chunk-EV6PGQPM.js → chunk-SLKPLSJU.js} +9 -9
- package/dist/{chunk-L6S22JUU.js → chunk-SNFRMD6Z.js} +3 -3
- package/dist/{chunk-OA3BZAST.js → chunk-UH5F35II.js} +3 -3
- package/dist/{chunk-DCFB5MJ7.js → chunk-VXKNN4SF.js} +10 -10
- package/dist/{chunk-UBYBILLK.js → chunk-WGKUDRZ7.js} +2 -2
- package/dist/{chunk-HP4VPMN7.js → chunk-WTMJTGW4.js} +2 -2
- package/dist/{chunk-SGSLTG65.js → chunk-X4TGLNCH.js} +3 -3
- package/dist/{chunk-35WJ3PKH.js → chunk-XB4KQFK2.js} +2 -2
- package/dist/{chunk-6H7PZJ2A.js → chunk-XDP7GCYE.js} +2 -1
- package/dist/{chunk-GGEAODIA.js → chunk-XM2HQVUK.js} +4 -4
- package/dist/{chunk-LL5YLPNM.js → chunk-Y7RQUJUS.js} +5 -5
- package/dist/{chunk-D73OOC3E.js → chunk-YIHC25WB.js} +3 -3
- package/dist/{chunk-UNULJ3P6.js → chunk-YRNEIRHM.js} +4 -4
- package/dist/components/Badge.cjs +9 -4
- package/dist/components/Badge.js +19 -19
- package/dist/components/Banner/Banner.cjs +9 -4
- package/dist/components/Banner/Banner.d.cts +1 -1
- package/dist/components/Banner/Banner.d.ts +1 -1
- package/dist/components/Banner/Banner.js +18 -18
- package/dist/components/Button.cjs +14 -8
- package/dist/components/Button.d.cts +1 -1
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/Button.js +20 -20
- package/dist/components/ButtonRow.cjs +14 -8
- package/dist/components/ButtonRow.d.cts +1 -1
- package/dist/components/ButtonRow.d.ts +1 -1
- package/dist/components/ButtonRow.js +22 -22
- package/dist/components/CardPage.cjs +7 -3
- package/dist/components/CardPage.js +24 -24
- package/dist/components/Checkbox.js +3 -3
- package/dist/components/CodeBlock.cjs +12 -7
- package/dist/components/CodeBlock.js +8 -8
- package/dist/components/CodeInput/CodeInput.cjs +8 -4
- package/dist/components/CodeInput/CodeInput.js +6 -6
- package/dist/components/CodeInput/SingleCodeInput.cjs +8 -4
- package/dist/components/CodeInput/SingleCodeInput.js +5 -5
- package/dist/components/Collapsible.cjs +8 -4
- package/dist/components/Collapsible.js +5 -5
- package/dist/components/CommaNumberInput.cjs +13 -8
- package/dist/components/CommaNumberInput.d.cts +1 -1
- package/dist/components/CommaNumberInput.d.ts +1 -1
- package/dist/components/CommaNumberInput.js +11 -11
- package/dist/components/ContentTable.cjs +8 -4
- package/dist/components/ContentTable.js +4 -4
- package/dist/components/CopyToClipboardButton.cjs +12 -7
- package/dist/components/CopyToClipboardButton.js +6 -6
- package/dist/components/CurrencyAmount.cjs +8 -4
- package/dist/components/CurrencyAmount.js +4 -4
- package/dist/components/Drawer.cjs +185 -143
- package/dist/components/Drawer.d.cts +2 -0
- package/dist/components/Drawer.d.ts +2 -0
- package/dist/components/Drawer.js +21 -21
- package/dist/components/Dropdown.cjs +12 -7
- package/dist/components/Dropdown.d.cts +1 -1
- package/dist/components/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown.js +5 -5
- package/dist/components/FileInput.cjs +8 -4
- package/dist/components/FileInput.js +10 -10
- package/dist/components/GradientCardHeader.js +5 -5
- package/dist/components/Icon/Icon.cjs +8 -4
- package/dist/components/Icon/Icon.d.cts +1 -1
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.js +3 -3
- package/dist/components/IconWithCircleBackground.cjs +8 -4
- package/dist/components/IconWithCircleBackground.js +59 -59
- package/dist/components/InfoIconTooltip.cjs +13 -7
- package/dist/components/InfoIconTooltip.d.cts +1 -1
- package/dist/components/InfoIconTooltip.d.ts +1 -1
- package/dist/components/InfoIconTooltip.js +19 -19
- package/dist/components/LightsparkProvider.cjs +7 -3
- package/dist/components/LightsparkProvider.js +4 -4
- package/dist/components/Loading.cjs +8 -4
- package/dist/components/Loading.js +4 -4
- package/dist/components/Modal.cjs +111 -36
- package/dist/components/Modal.d.cts +14 -8
- package/dist/components/Modal.d.ts +14 -8
- package/dist/components/Modal.js +59 -59
- package/dist/components/PageSection/PageSection.cjs +13 -7
- package/dist/components/PageSection/PageSection.d.cts +1 -1
- package/dist/components/PageSection/PageSection.d.ts +1 -1
- package/dist/components/PageSection/PageSection.js +29 -29
- package/dist/components/PageSection/PageSectionNav.cjs +9 -4
- package/dist/components/PageSection/PageSectionNav.js +20 -20
- package/dist/components/PhoneInput.cjs +13 -8
- package/dist/components/PhoneInput.d.cts +1 -1
- package/dist/components/PhoneInput.d.ts +1 -1
- package/dist/components/PhoneInput.js +11 -11
- package/dist/components/Pill.cjs +8 -4
- package/dist/components/Pill.js +7 -7
- package/dist/components/ProgressBar.cjs +7 -3
- package/dist/components/ProgressBar.js +3 -3
- package/dist/components/Radio.cjs +9 -4
- package/dist/components/Radio.js +19 -19
- package/dist/components/SecretContainer.cjs +12 -7
- package/dist/components/SecretContainer.js +7 -7
- package/dist/components/StatusIndicator.js +4 -4
- package/dist/components/TextButton.cjs +9 -4
- package/dist/components/TextButton.d.cts +1 -1
- package/dist/components/TextButton.d.ts +1 -1
- package/dist/components/TextButton.js +19 -19
- package/dist/components/TextIconAligner.cjs +9 -4
- package/dist/components/TextIconAligner.d.cts +1 -1
- package/dist/components/TextIconAligner.d.ts +1 -1
- package/dist/components/TextIconAligner.js +17 -17
- package/dist/components/TextInput.cjs +13 -8
- package/dist/components/TextInput.d.cts +1 -1
- package/dist/components/TextInput.d.ts +1 -1
- package/dist/components/TextInput.js +10 -10
- package/dist/components/Toasts.cjs +9 -4
- package/dist/components/Toasts.d.cts +1 -1
- package/dist/components/Toasts.d.ts +1 -1
- package/dist/components/Toasts.js +20 -20
- package/dist/components/Toggle.cjs +7 -3
- package/dist/components/Toggle.js +4 -4
- package/dist/components/Tooltip.cjs +11 -6
- package/dist/components/Tooltip.js +3 -3
- package/dist/components/UnstyledButton.js +3 -3
- package/dist/components/documentation/AnchorLinkHeader.cjs +8 -4
- package/dist/components/documentation/AnchorLinkHeader.d.cts +1 -1
- package/dist/components/documentation/AnchorLinkHeader.d.ts +1 -1
- package/dist/components/documentation/AnchorLinkHeader.js +8 -8
- package/dist/components/documentation/DocsBodyParagraph.cjs +7 -3
- package/dist/components/documentation/DocsBodyParagraph.d.cts +1 -1
- package/dist/components/documentation/DocsBodyParagraph.d.ts +1 -1
- package/dist/components/documentation/DocsBodyParagraph.js +6 -6
- package/dist/components/documentation/DocsBodyStrongParagraph.cjs +7 -3
- package/dist/components/documentation/DocsBodyStrongParagraph.d.cts +1 -1
- package/dist/components/documentation/DocsBodyStrongParagraph.d.ts +1 -1
- package/dist/components/documentation/DocsBodyStrongParagraph.js +6 -6
- package/dist/components/documentation/DocsHeadline.cjs +7 -3
- package/dist/components/documentation/DocsHeadline.d.cts +1 -1
- package/dist/components/documentation/DocsHeadline.d.ts +1 -1
- package/dist/components/documentation/DocsHeadline.js +7 -7
- package/dist/components/documentation/Video.cjs +16 -0
- package/dist/components/documentation/Video.d.cts +7 -1
- package/dist/components/documentation/Video.d.ts +7 -1
- package/dist/components/documentation/Video.js +18 -2
- package/dist/components/documentation/index.cjs +8 -4
- package/dist/components/documentation/index.d.cts +1 -1
- package/dist/components/documentation/index.d.ts +1 -1
- package/dist/components/documentation/index.js +8 -8
- package/dist/components/index.cjs +112 -37
- package/dist/components/index.d.cts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +59 -59
- package/dist/components/typography/Article.cjs +7 -3
- package/dist/components/typography/Article.js +13 -13
- package/dist/components/typography/Body.cjs +9 -4
- package/dist/components/typography/Body.d.cts +1 -1
- package/dist/components/typography/Body.d.ts +1 -1
- package/dist/components/typography/Body.js +6 -6
- package/dist/components/typography/BodyStrong.cjs +9 -4
- package/dist/components/typography/BodyStrong.d.cts +1 -1
- package/dist/components/typography/BodyStrong.d.ts +1 -1
- package/dist/components/typography/BodyStrong.js +6 -6
- package/dist/components/typography/Code.cjs +9 -4
- package/dist/components/typography/Code.d.cts +1 -1
- package/dist/components/typography/Code.d.ts +1 -1
- package/dist/components/typography/Code.js +6 -6
- package/dist/components/typography/Display.cjs +9 -4
- package/dist/components/typography/Display.d.cts +1 -1
- package/dist/components/typography/Display.d.ts +1 -1
- package/dist/components/typography/Display.js +6 -6
- package/dist/components/typography/Headline.cjs +9 -4
- package/dist/components/typography/Headline.d.cts +1 -1
- package/dist/components/typography/Headline.d.ts +1 -1
- package/dist/components/typography/Headline.js +6 -6
- package/dist/components/typography/Label.cjs +9 -4
- package/dist/components/typography/Label.d.cts +1 -1
- package/dist/components/typography/Label.d.ts +1 -1
- package/dist/components/typography/Label.js +6 -6
- package/dist/components/typography/LabelModerate.cjs +9 -4
- package/dist/components/typography/LabelModerate.d.cts +1 -1
- package/dist/components/typography/LabelModerate.d.ts +1 -1
- package/dist/components/typography/LabelModerate.js +6 -6
- package/dist/components/typography/LabelStrong.cjs +9 -4
- package/dist/components/typography/LabelStrong.d.cts +1 -1
- package/dist/components/typography/LabelStrong.d.ts +1 -1
- package/dist/components/typography/LabelStrong.js +6 -6
- package/dist/components/typography/Overline.cjs +9 -4
- package/dist/components/typography/Overline.d.cts +1 -1
- package/dist/components/typography/Overline.d.ts +1 -1
- package/dist/components/typography/Overline.js +6 -6
- package/dist/components/typography/Title.cjs +9 -4
- package/dist/components/typography/Title.d.cts +1 -1
- package/dist/components/typography/Title.d.ts +1 -1
- package/dist/components/typography/Title.js +6 -6
- package/dist/components/typography/index.cjs +9 -4
- package/dist/components/typography/index.d.cts +1 -1
- package/dist/components/typography/index.d.ts +1 -1
- package/dist/components/typography/index.js +18 -18
- package/dist/components/typography/renderTypography.cjs +9 -4
- package/dist/components/typography/renderTypography.d.cts +1 -1
- package/dist/components/typography/renderTypography.d.ts +1 -1
- package/dist/components/typography/renderTypography.js +16 -16
- package/dist/styles/buttons.d.cts +1 -1
- package/dist/styles/buttons.d.ts +1 -1
- package/dist/styles/common.cjs +11 -6
- package/dist/styles/common.d.cts +3 -2
- package/dist/styles/common.d.ts +3 -2
- package/dist/styles/common.js +2 -2
- package/dist/styles/fields.cjs +8 -4
- package/dist/styles/fields.d.cts +1 -1
- package/dist/styles/fields.d.ts +1 -1
- package/dist/styles/fields.js +4 -4
- package/dist/styles/global.cjs +7 -3
- package/dist/styles/global.d.cts +1 -1
- package/dist/styles/global.d.ts +1 -1
- package/dist/styles/global.js +3 -3
- package/dist/styles/themes.cjs +7 -3
- package/dist/styles/themes.d.cts +1 -1
- package/dist/styles/themes.d.ts +1 -1
- package/dist/styles/themes.js +1 -1
- package/dist/styles/type.d.cts +1 -1
- package/dist/styles/type.d.ts +1 -1
- package/dist/styles/type.js +4 -4
- package/dist/styles/typography.cjs +7 -3
- package/dist/styles/typography.d.cts +1 -1
- package/dist/styles/typography.d.ts +1 -1
- package/dist/styles/typography.js +2 -2
- package/dist/styles/utils.js +3 -3
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/toNonTypographicReactNodes.cjs +9 -4
- package/dist/utils/toNonTypographicReactNodes.d.cts +2 -1
- package/dist/utils/toNonTypographicReactNodes.d.ts +2 -1
- package/dist/utils/toNonTypographicReactNodes.js +4 -4
- package/dist/utils/toReactNodes.cjs +9 -4
- package/dist/utils/toReactNodes.d.cts +1 -1
- package/dist/utils/toReactNodes.d.ts +1 -1
- package/dist/utils/toReactNodes.js +17 -17
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Loading,
|
|
3
3
|
LoadingWrapper
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-5TTLUOJ5.js";
|
|
5
|
+
import "../chunk-I3FI3FNP.js";
|
|
6
6
|
import "../chunk-EDN2QDCB.js";
|
|
7
7
|
import "../chunk-FT62PIPN.js";
|
|
8
8
|
import "../chunk-5ZDDVLS6.js";
|
|
@@ -117,8 +117,8 @@ import "../chunk-VI6WTKMV.js";
|
|
|
117
117
|
import "../chunk-QW2INB5A.js";
|
|
118
118
|
import "../chunk-JLD7MGLC.js";
|
|
119
119
|
import "../chunk-DW6LFUI2.js";
|
|
120
|
-
import "../chunk-
|
|
121
|
-
import "../chunk-
|
|
120
|
+
import "../chunk-PG2W2HVB.js";
|
|
121
|
+
import "../chunk-IBZBPQMZ.js";
|
|
122
122
|
import "../chunk-ENBUKLVT.js";
|
|
123
123
|
import "../chunk-JSGRNWSB.js";
|
|
124
124
|
import "../chunk-FO7I4E45.js";
|
|
@@ -3631,7 +3631,8 @@ var baseThemeColors = {
|
|
|
3631
3631
|
success: colors.success,
|
|
3632
3632
|
text: colors.black,
|
|
3633
3633
|
vlcNeutral: colors.gray95,
|
|
3634
|
-
warning: colors.warning
|
|
3634
|
+
warning: colors.warning,
|
|
3635
|
+
inputBackground: colors.white
|
|
3635
3636
|
};
|
|
3636
3637
|
var themeOrColorKeyValues = [
|
|
3637
3638
|
...Object.keys(baseThemeColors),
|
|
@@ -3679,7 +3680,8 @@ var darkBaseTheme = {
|
|
|
3679
3680
|
vlcNeutral: colors.gray20,
|
|
3680
3681
|
warning: colors.warning,
|
|
3681
3682
|
buttons: defaultButtonsTheme,
|
|
3682
|
-
loading: "LoadingSpinner"
|
|
3683
|
+
loading: "LoadingSpinner",
|
|
3684
|
+
inputBackground: colors.black
|
|
3683
3685
|
};
|
|
3684
3686
|
var lightTheme = extend(lightBaseTheme, {
|
|
3685
3687
|
header: extendBase(lightBaseTheme, {
|
|
@@ -3718,6 +3720,7 @@ var umameDocsLightTheme = extend(lightTheme, {
|
|
|
3718
3720
|
secondary: colors.grayBlue43,
|
|
3719
3721
|
text: colors.grayBlue9,
|
|
3720
3722
|
link: colors.blue39,
|
|
3723
|
+
inputBackground: colors.white,
|
|
3721
3724
|
typography: getTypography("UmameDocs" /* UmameDocs */, {
|
|
3722
3725
|
main: "Manrope",
|
|
3723
3726
|
code: "Monaco"
|
|
@@ -3802,7 +3805,8 @@ var bridgeLightTheme = extend(lightTheme, __spreadProps(__spreadValues({}, bridg
|
|
|
3802
3805
|
bg: colors.gray98,
|
|
3803
3806
|
smBg: colors.gray98,
|
|
3804
3807
|
text: colors.grayBlue9,
|
|
3805
|
-
secondary: colors.grayBlue43
|
|
3808
|
+
secondary: colors.grayBlue43,
|
|
3809
|
+
inputBackground: colors.white
|
|
3806
3810
|
}));
|
|
3807
3811
|
var bridgeDarkTheme = extend(darkTheme, __spreadProps(__spreadValues({}, bridgeBaseSettings), {
|
|
3808
3812
|
type: "bridgeDark" /* BridgeDark */
|
|
@@ -3972,11 +3976,12 @@ var overlaySurfaceBorderColor = ({
|
|
|
3972
3976
|
`;
|
|
3973
3977
|
var overlaySurface = ({
|
|
3974
3978
|
theme,
|
|
3975
|
-
important = false
|
|
3979
|
+
important = false,
|
|
3980
|
+
border = true
|
|
3976
3981
|
}) => import_react5.css`
|
|
3977
|
-
background-color: ${themeOr(
|
|
3982
|
+
background-color: ${themeOr(theme.bg, theme.c1Neutral)({ theme })}
|
|
3978
3983
|
${important ? "!important" : ""};
|
|
3979
|
-
border: 0.5px solid ${important ? "!important" : ""}
|
|
3984
|
+
${border ? `border: 0.5px solid ${important ? "!important" : ""};` : ""}
|
|
3980
3985
|
${overlaySurfaceBorderColor({ theme, important })};
|
|
3981
3986
|
${themeOr(
|
|
3982
3987
|
`box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.08), 0px 1px 4px rgba(0, 0, 0, 0.1) ${important ? "!important" : ""};`,
|
|
@@ -7988,7 +7993,7 @@ var IconContainer = import_styled2.default.span`
|
|
|
7988
7993
|
${({ theme, fontColor }) => {
|
|
7989
7994
|
const color = getFontColor(theme, fontColor, "inherit");
|
|
7990
7995
|
return `
|
|
7991
|
-
|
|
7996
|
+
svg, path {
|
|
7992
7997
|
color: ${getFontColor(theme, fontColor, "inherit")};
|
|
7993
7998
|
|
|
7994
7999
|
/*
|
|
@@ -8143,6 +8148,7 @@ function toNonTypographicReactNodes(toNonTypographicReactNodesArg) {
|
|
|
8143
8148
|
Link,
|
|
8144
8149
|
{
|
|
8145
8150
|
to: node.to,
|
|
8151
|
+
newTab: !!node.newTab,
|
|
8146
8152
|
children: node.text
|
|
8147
8153
|
},
|
|
8148
8154
|
`link-${i}-${node.text.substr(0, 10)}`
|
|
@@ -8612,7 +8618,7 @@ function getPaddingX(size2, kind, isRound) {
|
|
|
8612
8618
|
function getPadding({ paddingY, kind, size: size2, iconSide, isRound }) {
|
|
8613
8619
|
const paddingX = getPaddingX(size2, kind, isRound);
|
|
8614
8620
|
const paddingForIcon = 0;
|
|
8615
|
-
return `${paddingY}px ${paddingX + (iconSide === "right" ? paddingForIcon : 0)}px ${paddingY}px ${paddingX + (iconSide === "left" ? paddingForIcon : 0)}px`;
|
|
8621
|
+
return kind === "ghost" ? 0 : `${paddingY}px ${paddingX + (iconSide === "right" ? paddingForIcon : 0)}px ${paddingY}px ${paddingX + (iconSide === "left" ? paddingForIcon : 0)}px`;
|
|
8616
8622
|
}
|
|
8617
8623
|
function resolveBackgroundColorKey(theme, kind, defaultKey) {
|
|
8618
8624
|
var _a;
|
|
@@ -8920,6 +8926,9 @@ var Drawer = (props) => {
|
|
|
8920
8926
|
const [grabbing, setGrabbing] = (0, import_react29.useState)(false);
|
|
8921
8927
|
const drawerContainerRef = (0, import_react29.useRef)(null);
|
|
8922
8928
|
const handleClose = () => {
|
|
8929
|
+
if (props.nonDismissable) {
|
|
8930
|
+
return;
|
|
8931
|
+
}
|
|
8923
8932
|
setIsOpen(false);
|
|
8924
8933
|
setTimeout(() => {
|
|
8925
8934
|
props.onClose && props.onClose();
|
|
@@ -8929,6 +8938,9 @@ var Drawer = (props) => {
|
|
|
8929
8938
|
};
|
|
8930
8939
|
const handleTouchMove = (event) => {
|
|
8931
8940
|
var _a, _b;
|
|
8941
|
+
if (props.nonDismissable) {
|
|
8942
|
+
return;
|
|
8943
|
+
}
|
|
8932
8944
|
if (lastY === null) {
|
|
8933
8945
|
setLastY(event.touches[0].clientY);
|
|
8934
8946
|
} else {
|
|
@@ -8945,9 +8957,15 @@ var Drawer = (props) => {
|
|
|
8945
8957
|
}
|
|
8946
8958
|
};
|
|
8947
8959
|
const handleTouchStart = () => {
|
|
8960
|
+
if (props.nonDismissable) {
|
|
8961
|
+
return;
|
|
8962
|
+
}
|
|
8948
8963
|
setGrabbing(true);
|
|
8949
8964
|
};
|
|
8950
8965
|
const handleTouchEnd = () => {
|
|
8966
|
+
if (props.nonDismissable) {
|
|
8967
|
+
return;
|
|
8968
|
+
}
|
|
8951
8969
|
setGrabbing(false);
|
|
8952
8970
|
if (fractionVisible < 0.8) {
|
|
8953
8971
|
handleClose();
|
|
@@ -8975,16 +8993,17 @@ var Drawer = (props) => {
|
|
|
8975
8993
|
grabbing,
|
|
8976
8994
|
ref: drawerContainerRef,
|
|
8977
8995
|
children: [
|
|
8978
|
-
props.grabber && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Grabber, { onClick: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(GrabberBar, {}) }),
|
|
8979
|
-
props.
|
|
8996
|
+
props.grabber && !props.nonDismissable && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Grabber, { onClick: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(GrabberBar, {}) }),
|
|
8997
|
+
props.handleBack && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(BackButtonContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
8980
8998
|
Button,
|
|
8981
8999
|
{
|
|
8982
|
-
onClick:
|
|
8983
|
-
icon: "
|
|
9000
|
+
onClick: props.handleBack,
|
|
9001
|
+
icon: "ChevronLeft",
|
|
8984
9002
|
kind: "ghost",
|
|
8985
|
-
size: "
|
|
9003
|
+
size: "Small"
|
|
8986
9004
|
}
|
|
8987
9005
|
) }),
|
|
9006
|
+
props.closeButton && !props.nonDismissable && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(CloseButtonContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(CloseButton, { onClick: handleClose, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Icon, { name: "Close", width: 12 }) }) }),
|
|
8988
9007
|
props.children
|
|
8989
9008
|
]
|
|
8990
9009
|
}
|
|
@@ -9017,6 +9036,7 @@ var Background = import_styled16.default.div`
|
|
|
9017
9036
|
`;
|
|
9018
9037
|
var DrawerContainer = import_styled16.default.div`
|
|
9019
9038
|
position: fixed;
|
|
9039
|
+
max-height: 100dvh;
|
|
9020
9040
|
width: 100%;
|
|
9021
9041
|
background-color: ${({ theme }) => theme.bg};
|
|
9022
9042
|
right: 0;
|
|
@@ -9027,6 +9047,7 @@ var DrawerContainer = import_styled16.default.div`
|
|
|
9027
9047
|
display: flex;
|
|
9028
9048
|
flex-direction: column;
|
|
9029
9049
|
padding: ${"72px" /* 6xl */} ${"32px" /* xl */} ${"40px" /* 2xl */} ${"32px" /* xl */};
|
|
9050
|
+
overflow-y: scroll;
|
|
9030
9051
|
|
|
9031
9052
|
// Only smooth transition when not grabbing, otherwise dragging will feel very laggy
|
|
9032
9053
|
${(props) => props.grabbing && props.isOpen ? "" : "transition: transform 0.3s ease-in-out;"};
|
|
@@ -9073,11 +9094,32 @@ var CloseButtonContainer = import_styled16.default.div`
|
|
|
9073
9094
|
border-radius: 50%;
|
|
9074
9095
|
background-color: ${colors.grayBlue94};
|
|
9075
9096
|
padding: ${"8px" /* xs */};
|
|
9097
|
+
height: 30px;
|
|
9098
|
+
width: 30px;
|
|
9099
|
+
display: flex;
|
|
9100
|
+
align-items: center;
|
|
9076
9101
|
|
|
9077
9102
|
* > * {
|
|
9078
9103
|
line-height: 14px;
|
|
9079
9104
|
}
|
|
9080
9105
|
`;
|
|
9106
|
+
var CloseButton = (0, import_styled16.default)(UnstyledButton)`
|
|
9107
|
+
${standardFocusOutline}
|
|
9108
|
+
width: 24px;
|
|
9109
|
+
height: 24px;
|
|
9110
|
+
justify-self: flex-end;
|
|
9111
|
+
`;
|
|
9112
|
+
var BackButtonContainer = import_styled16.default.div`
|
|
9113
|
+
position: absolute;
|
|
9114
|
+
top: 20px;
|
|
9115
|
+
left: 20px;
|
|
9116
|
+
border-radius: 50%;
|
|
9117
|
+
padding: ${"8px" /* xs */};
|
|
9118
|
+
height: 30px;
|
|
9119
|
+
width: 30px;
|
|
9120
|
+
display: flex;
|
|
9121
|
+
align-items: center;
|
|
9122
|
+
`;
|
|
9081
9123
|
var GrabberBar = import_styled16.default.div`
|
|
9082
9124
|
width: 36px;
|
|
9083
9125
|
height: 5px;
|
|
@@ -9208,13 +9250,15 @@ function Modal({
|
|
|
9208
9250
|
submitLink,
|
|
9209
9251
|
cancelText = "Cancel",
|
|
9210
9252
|
firstFocusRef,
|
|
9211
|
-
|
|
9253
|
+
smKind = "default",
|
|
9254
|
+
top,
|
|
9212
9255
|
nonDismissable = false,
|
|
9213
9256
|
autoFocus = true,
|
|
9214
9257
|
width = 460,
|
|
9215
9258
|
progressBar,
|
|
9216
9259
|
buttonLayout = "horizontal",
|
|
9217
|
-
extraActions
|
|
9260
|
+
extraActions,
|
|
9261
|
+
handleBack
|
|
9218
9262
|
}) {
|
|
9219
9263
|
const visibleChangedRef = (0, import_react31.useRef)(false);
|
|
9220
9264
|
const nodeRef = (0, import_react31.useRef)(null);
|
|
@@ -9315,7 +9359,10 @@ function Modal({
|
|
|
9315
9359
|
const linkIsHref = isSubmitLinkWithHref(submitLink);
|
|
9316
9360
|
const linkIsRoute = !linkIsHref && submitLink;
|
|
9317
9361
|
const buttonContent = /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_jsx_runtime137.Fragment, { children: [
|
|
9318
|
-
extraActions == null ? void 0 : extraActions.filter((action) => action.placement === "above").map((
|
|
9362
|
+
extraActions == null ? void 0 : extraActions.filter((action) => action.placement === "above").map((_a, i) => {
|
|
9363
|
+
var _b = _a, { placement, text } = _b, rest = __objRest(_b, ["placement", "text"]);
|
|
9364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Button, __spreadValues({ text }, rest), text || `no-text-${i}`);
|
|
9365
|
+
}),
|
|
9319
9366
|
!isSm && !cancelHidden && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
9320
9367
|
Button,
|
|
9321
9368
|
{
|
|
@@ -9339,7 +9386,10 @@ function Modal({
|
|
|
9339
9386
|
}
|
|
9340
9387
|
),
|
|
9341
9388
|
isSm && !cancelHidden && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Button, { onClick: onClose, text: cancelText }),
|
|
9342
|
-
extraActions == null ? void 0 : extraActions.filter((action) => action.placement === "below").map((
|
|
9389
|
+
extraActions == null ? void 0 : extraActions.filter((action) => action.placement === "below").map((_c, i) => {
|
|
9390
|
+
var _d = _c, { placement, text } = _d, rest = __objRest(_d, ["placement", "text"]);
|
|
9391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Button, __spreadValues({ text }, rest), text || `no-text-${i}`);
|
|
9392
|
+
})
|
|
9343
9393
|
] });
|
|
9344
9394
|
let titleContent = null;
|
|
9345
9395
|
if (title) {
|
|
@@ -9376,11 +9426,20 @@ function Modal({
|
|
|
9376
9426
|
onSubmit || onCancel || submitLink ? buttonLayout === "horizontal" ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ModalButtonRow, { children: buttonContent }) : /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ModalButtonColumn, { children: buttonContent }) : null
|
|
9377
9427
|
] });
|
|
9378
9428
|
let content;
|
|
9379
|
-
if (
|
|
9380
|
-
content = /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
9429
|
+
if (smKind === "drawer" && isSm) {
|
|
9430
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
9431
|
+
Drawer,
|
|
9432
|
+
{
|
|
9433
|
+
onClose: () => onClickCloseButton(),
|
|
9434
|
+
closeButton: true,
|
|
9435
|
+
nonDismissable,
|
|
9436
|
+
handleBack,
|
|
9437
|
+
children: modalContent
|
|
9438
|
+
}
|
|
9439
|
+
);
|
|
9381
9440
|
} else {
|
|
9382
9441
|
content = /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(import_react31.Fragment, { children: [
|
|
9383
|
-
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ModalOverlay, { ref: overlayRef }),
|
|
9442
|
+
!(smKind === "fullscreen" && bp2.isSm()) ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ModalOverlay, { ref: overlayRef }) : null,
|
|
9384
9443
|
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
9385
9444
|
ModalContainer,
|
|
9386
9445
|
{
|
|
@@ -9389,9 +9448,13 @@ function Modal({
|
|
|
9389
9448
|
tabIndex: -1,
|
|
9390
9449
|
role: "dialog",
|
|
9391
9450
|
ref: modalContainerRef,
|
|
9392
|
-
|
|
9451
|
+
top: top || (smKind === "default" ? standardContentInset.smPx : 0),
|
|
9452
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(ModalContent, { width, ghost, smKind, children: [
|
|
9393
9453
|
!firstFocusRef && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(DefaultFocusTarget, { ref: defaultFirstFocusRefCb }),
|
|
9394
|
-
!
|
|
9454
|
+
!ghost && /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(ModalNavigation, { children: [
|
|
9455
|
+
handleBack && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(BackButton, { onClick: handleBack, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Icon, { name: "ChevronLeft", width: 16 }) }),
|
|
9456
|
+
!nonDismissable && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(CloseButton2, { onClick: onClickCloseButton, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Icon, { name: "Close", width: 9 }) })
|
|
9457
|
+
] }),
|
|
9395
9458
|
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ModalContentInner, { ghost, children: modalContent })
|
|
9396
9459
|
] })
|
|
9397
9460
|
}
|
|
@@ -9433,7 +9496,7 @@ var ModalContainer = import_styled20.default.div`
|
|
|
9433
9496
|
justify-content: center;
|
|
9434
9497
|
align-items: center;
|
|
9435
9498
|
color: ${({ theme }) => theme.text};
|
|
9436
|
-
|
|
9499
|
+
${(props) => `top: ${props.top}px;`}
|
|
9437
9500
|
`;
|
|
9438
9501
|
var contentTopMarginPx = 24;
|
|
9439
9502
|
var Description = import_styled20.default.div`
|
|
@@ -9467,16 +9530,22 @@ var ModalButtonColumn = import_styled20.default.div`
|
|
|
9467
9530
|
margin-top: ${"24px" /* lg */};
|
|
9468
9531
|
`;
|
|
9469
9532
|
var ModalContent = import_styled20.default.div`
|
|
9470
|
-
${overflowAutoWithoutScrollbars}
|
|
9471
|
-
${standardContentInset.smCSS}
|
|
9472
|
-
${(props) => props.ghost ? "" : standardBorderRadius(16)}
|
|
9473
|
-
${(props) => props.ghost ? "" : overlaySurface}
|
|
9474
9533
|
pointer-events: auto;
|
|
9475
9534
|
transition: width 0.25s ease-in;
|
|
9476
|
-
|
|
9477
|
-
|
|
9478
|
-
|
|
9479
|
-
|
|
9535
|
+
|
|
9536
|
+
${({ theme, smKind, ghost }) => ghost ? "" : overlaySurface({ theme, border: smKind !== "fullscreen" })}
|
|
9537
|
+
${overflowAutoWithoutScrollbars}
|
|
9538
|
+
${(props) => props.smKind === "fullscreen" && bp.isSm() ? `
|
|
9539
|
+
width: 100%;
|
|
9540
|
+
height: 100%;
|
|
9541
|
+
` : `
|
|
9542
|
+
${props.ghost ? "" : standardBorderRadius(16)}
|
|
9543
|
+
${standardContentInset.smCSS.styles}
|
|
9544
|
+
width: ${props.width}px;
|
|
9545
|
+
max-width: 100%;
|
|
9546
|
+
max-height: 100%;
|
|
9547
|
+
position: absolute;
|
|
9548
|
+
`}
|
|
9480
9549
|
${(props) => props.ghost ? "" : "padding: 16px 16px 40px;"}
|
|
9481
9550
|
|
|
9482
9551
|
${headlineSelector("h4")} { {
|
|
@@ -9486,16 +9555,22 @@ var ModalContent = import_styled20.default.div`
|
|
|
9486
9555
|
}
|
|
9487
9556
|
}
|
|
9488
9557
|
`;
|
|
9489
|
-
var
|
|
9490
|
-
display:
|
|
9491
|
-
|
|
9558
|
+
var ModalNavigation = import_styled20.default.div`
|
|
9559
|
+
display: grid;
|
|
9560
|
+
grid-auto-flow: column;
|
|
9492
9561
|
width: 100%;
|
|
9493
|
-
justify-content: flex-end;
|
|
9494
9562
|
`;
|
|
9495
|
-
var
|
|
9563
|
+
var BackButton = (0, import_styled20.default)(UnstyledButton)`
|
|
9564
|
+
${standardFocusOutline}
|
|
9565
|
+
width: 24px;
|
|
9566
|
+
height: 24px;
|
|
9567
|
+
justify-self: flex-start;
|
|
9568
|
+
`;
|
|
9569
|
+
var CloseButton2 = (0, import_styled20.default)(UnstyledButton)`
|
|
9496
9570
|
${standardFocusOutline}
|
|
9497
9571
|
width: 24px;
|
|
9498
9572
|
height: 24px;
|
|
9573
|
+
justify-self: flex-end;
|
|
9499
9574
|
`;
|
|
9500
9575
|
var ModalContentInner = import_styled20.default.div`
|
|
9501
9576
|
${(props) => props.ghost ? "" : "padding: 32px 24px 0;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import react__default, { MutableRefObject, ComponentProps } from 'react';
|
|
2
2
|
import { ToReactNodesArgs } from '../utils/toReactNodes.cjs';
|
|
3
|
+
import { Button } from './Button.cjs';
|
|
3
4
|
import { IconWithCircleBackground } from './IconWithCircleBackground.cjs';
|
|
4
5
|
import { ProgressBarProps } from './ProgressBar.cjs';
|
|
5
6
|
import '@emotion/react/jsx-runtime';
|
|
@@ -7,7 +8,7 @@ import './typography/renderTypography.cjs';
|
|
|
7
8
|
import './typography/Code.cjs';
|
|
8
9
|
import '@emotion/styled';
|
|
9
10
|
import '@emotion/react';
|
|
10
|
-
import '../buttons-
|
|
11
|
+
import '../buttons-36cdd0fe.js';
|
|
11
12
|
import '../styles/tokens/typography.cjs';
|
|
12
13
|
import '@emotion/css';
|
|
13
14
|
import '../styles/colors.cjs';
|
|
@@ -131,16 +132,18 @@ import './typography/LabelStrong.cjs';
|
|
|
131
132
|
import './typography/LabelModerate.cjs';
|
|
132
133
|
import './typography/Title.cjs';
|
|
133
134
|
import './typography/Display.cjs';
|
|
135
|
+
import '../router.cjs';
|
|
136
|
+
import 'react-router-dom';
|
|
134
137
|
|
|
135
|
-
|
|
138
|
+
type ExtraAction = ComponentProps<typeof Button> & {
|
|
136
139
|
/** Determines the placement relative to the submission/cancel buttons. */
|
|
137
140
|
placement: "above" | "below";
|
|
138
|
-
|
|
139
|
-
}
|
|
141
|
+
};
|
|
140
142
|
type SubmitLinkWithHref = {
|
|
141
143
|
href: string;
|
|
142
144
|
filename?: string;
|
|
143
145
|
};
|
|
146
|
+
type SmKind = "drawer" | "fullscreen" | "default";
|
|
144
147
|
type TopContent = ComponentProps<typeof IconWithCircleBackground>;
|
|
145
148
|
type ModalProps<RoutesType extends string> = {
|
|
146
149
|
visible: boolean;
|
|
@@ -165,15 +168,18 @@ type ModalProps<RoutesType extends string> = {
|
|
|
165
168
|
focus: () => void;
|
|
166
169
|
} | null>;
|
|
167
170
|
autoFocus?: boolean;
|
|
168
|
-
|
|
171
|
+
smKind?: SmKind;
|
|
172
|
+
top?: number;
|
|
169
173
|
nonDismissable?: boolean;
|
|
170
174
|
width?: 460 | 600;
|
|
171
175
|
progressBar?: ProgressBarProps;
|
|
172
176
|
/** Determines if buttons are laid out horizontally or vertically */
|
|
173
177
|
buttonLayout?: "horizontal" | "vertical";
|
|
174
178
|
/** Allows placing extra buttons in the same button layout */
|
|
175
|
-
extraActions?: ExtraAction[];
|
|
179
|
+
extraActions?: ExtraAction[] | undefined;
|
|
180
|
+
/** Displays a back button at the top of the modal which calls this function */
|
|
181
|
+
handleBack?: () => void;
|
|
176
182
|
};
|
|
177
|
-
declare function Modal<RoutesType extends string>({ visible, topContent, title, description, children, onClose, onCancel, cancelDisabled, cancelHidden, ghost, onSubmit, submitDisabled, submitLoading, submitText, submitLink, cancelText, firstFocusRef,
|
|
183
|
+
declare function Modal<RoutesType extends string>({ visible, topContent, title, description, children, onClose, onCancel, cancelDisabled, cancelHidden, ghost, onSubmit, submitDisabled, submitLoading, submitText, submitLink, cancelText, firstFocusRef, smKind, top, nonDismissable, autoFocus, width, progressBar, buttonLayout, extraActions, handleBack, }: ModalProps<RoutesType>): react__default.ReactPortal | null;
|
|
178
184
|
|
|
179
|
-
export {
|
|
185
|
+
export { Modal };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import react__default, { MutableRefObject, ComponentProps } from 'react';
|
|
2
2
|
import { ToReactNodesArgs } from '../utils/toReactNodes.js';
|
|
3
|
+
import { Button } from './Button.js';
|
|
3
4
|
import { IconWithCircleBackground } from './IconWithCircleBackground.js';
|
|
4
5
|
import { ProgressBarProps } from './ProgressBar.js';
|
|
5
6
|
import '@emotion/react/jsx-runtime';
|
|
@@ -7,7 +8,7 @@ import './typography/renderTypography.js';
|
|
|
7
8
|
import './typography/Code.js';
|
|
8
9
|
import '@emotion/styled';
|
|
9
10
|
import '@emotion/react';
|
|
10
|
-
import '../buttons-
|
|
11
|
+
import '../buttons-35280bfe.js';
|
|
11
12
|
import '../styles/tokens/typography.js';
|
|
12
13
|
import '@emotion/css';
|
|
13
14
|
import '../styles/colors.js';
|
|
@@ -131,16 +132,18 @@ import './typography/LabelStrong.js';
|
|
|
131
132
|
import './typography/LabelModerate.js';
|
|
132
133
|
import './typography/Title.js';
|
|
133
134
|
import './typography/Display.js';
|
|
135
|
+
import '../router.js';
|
|
136
|
+
import 'react-router-dom';
|
|
134
137
|
|
|
135
|
-
|
|
138
|
+
type ExtraAction = ComponentProps<typeof Button> & {
|
|
136
139
|
/** Determines the placement relative to the submission/cancel buttons. */
|
|
137
140
|
placement: "above" | "below";
|
|
138
|
-
|
|
139
|
-
}
|
|
141
|
+
};
|
|
140
142
|
type SubmitLinkWithHref = {
|
|
141
143
|
href: string;
|
|
142
144
|
filename?: string;
|
|
143
145
|
};
|
|
146
|
+
type SmKind = "drawer" | "fullscreen" | "default";
|
|
144
147
|
type TopContent = ComponentProps<typeof IconWithCircleBackground>;
|
|
145
148
|
type ModalProps<RoutesType extends string> = {
|
|
146
149
|
visible: boolean;
|
|
@@ -165,15 +168,18 @@ type ModalProps<RoutesType extends string> = {
|
|
|
165
168
|
focus: () => void;
|
|
166
169
|
} | null>;
|
|
167
170
|
autoFocus?: boolean;
|
|
168
|
-
|
|
171
|
+
smKind?: SmKind;
|
|
172
|
+
top?: number;
|
|
169
173
|
nonDismissable?: boolean;
|
|
170
174
|
width?: 460 | 600;
|
|
171
175
|
progressBar?: ProgressBarProps;
|
|
172
176
|
/** Determines if buttons are laid out horizontally or vertically */
|
|
173
177
|
buttonLayout?: "horizontal" | "vertical";
|
|
174
178
|
/** Allows placing extra buttons in the same button layout */
|
|
175
|
-
extraActions?: ExtraAction[];
|
|
179
|
+
extraActions?: ExtraAction[] | undefined;
|
|
180
|
+
/** Displays a back button at the top of the modal which calls this function */
|
|
181
|
+
handleBack?: () => void;
|
|
176
182
|
};
|
|
177
|
-
declare function Modal<RoutesType extends string>({ visible, topContent, title, description, children, onClose, onCancel, cancelDisabled, cancelHidden, ghost, onSubmit, submitDisabled, submitLoading, submitText, submitLink, cancelText, firstFocusRef,
|
|
183
|
+
declare function Modal<RoutesType extends string>({ visible, topContent, title, description, children, onClose, onCancel, cancelDisabled, cancelHidden, ghost, onSubmit, submitDisabled, submitLoading, submitText, submitLink, cancelText, firstFocusRef, smKind, top, nonDismissable, autoFocus, width, progressBar, buttonLayout, extraActions, handleBack, }: ModalProps<RoutesType>): react__default.ReactPortal | null;
|
|
178
184
|
|
|
179
|
-
export {
|
|
185
|
+
export { Modal };
|
package/dist/components/Modal.js
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Modal
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-C4KZC45Y.js";
|
|
5
5
|
import "../chunk-NBCCPGA4.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-7N2PFDYE.js";
|
|
7
|
+
import "../chunk-PQKVR2BR.js";
|
|
8
|
+
import "../chunk-LOL5TJ3H.js";
|
|
9
|
+
import "../chunk-LGKXPUSI.js";
|
|
10
10
|
import "../chunk-JJC2AUQ3.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-7FHOKVKJ.js";
|
|
12
|
+
import "../chunk-ILEZ6AWT.js";
|
|
13
13
|
import "../chunk-ZSWFGISK.js";
|
|
14
14
|
import "../chunk-E3FGOYEJ.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-KX5QZXCD.js";
|
|
16
16
|
import "../chunk-5KSG5D3I.js";
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-54EOEIEN.js";
|
|
18
|
+
import "../chunk-OKXC33OU.js";
|
|
19
|
+
import "../chunk-DXA3WUSX.js";
|
|
20
|
+
import "../chunk-2XUHQWCJ.js";
|
|
21
|
+
import "../chunk-7YY6BH5O.js";
|
|
22
22
|
import "../chunk-IL6J7EBZ.js";
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-QQSV7XJX.js";
|
|
24
|
+
import "../chunk-MWDDIXIP.js";
|
|
25
|
+
import "../chunk-UH5F35II.js";
|
|
26
|
+
import "../chunk-LIQSJ5R7.js";
|
|
27
27
|
import "../chunk-Z5TPS2BO.js";
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
28
|
+
import "../chunk-XB4KQFK2.js";
|
|
29
|
+
import "../chunk-7IHNYMFQ.js";
|
|
30
|
+
import "../chunk-HGOGF6I7.js";
|
|
31
|
+
import "../chunk-N2NPIZCV.js";
|
|
32
|
+
import "../chunk-SNFRMD6Z.js";
|
|
33
33
|
import "../chunk-WOR7J4KZ.js";
|
|
34
|
-
import "../chunk-
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
34
|
+
import "../chunk-LH7GLNMY.js";
|
|
35
|
+
import "../chunk-JNNJVBHF.js";
|
|
36
|
+
import "../chunk-XM2HQVUK.js";
|
|
37
37
|
import "../chunk-VQVEZVAG.js";
|
|
38
|
-
import "../chunk-
|
|
39
|
-
import "../chunk-
|
|
40
|
-
import "../chunk-
|
|
41
|
-
import "../chunk-
|
|
38
|
+
import "../chunk-BSH6WRUZ.js";
|
|
39
|
+
import "../chunk-J3YVJWRG.js";
|
|
40
|
+
import "../chunk-6CNJ5ZCC.js";
|
|
41
|
+
import "../chunk-SEZEDINC.js";
|
|
42
42
|
import "../chunk-B2VYAIYR.js";
|
|
43
|
-
import "../chunk-
|
|
44
|
-
import "../chunk-
|
|
45
|
-
import "../chunk-
|
|
46
|
-
import "../chunk-
|
|
47
|
-
import "../chunk-
|
|
48
|
-
import "../chunk-
|
|
49
|
-
import "../chunk-
|
|
50
|
-
import "../chunk-
|
|
51
|
-
import "../chunk-
|
|
52
|
-
import "../chunk-
|
|
53
|
-
import "../chunk-
|
|
54
|
-
import "../chunk-
|
|
55
|
-
import "../chunk-
|
|
56
|
-
import "../chunk-
|
|
57
|
-
import "../chunk-
|
|
58
|
-
import "../chunk-
|
|
59
|
-
import "../chunk-
|
|
60
|
-
import "../chunk-
|
|
43
|
+
import "../chunk-4BFBANKF.js";
|
|
44
|
+
import "../chunk-K7FYXGOI.js";
|
|
45
|
+
import "../chunk-Y7RQUJUS.js";
|
|
46
|
+
import "../chunk-BHP5YL2N.js";
|
|
47
|
+
import "../chunk-YIHC25WB.js";
|
|
48
|
+
import "../chunk-SLKPLSJU.js";
|
|
49
|
+
import "../chunk-VXKNN4SF.js";
|
|
50
|
+
import "../chunk-5TTLUOJ5.js";
|
|
51
|
+
import "../chunk-BDZ46Z2I.js";
|
|
52
|
+
import "../chunk-B6S7Y4K7.js";
|
|
53
|
+
import "../chunk-GSKTHUQJ.js";
|
|
54
|
+
import "../chunk-WGKUDRZ7.js";
|
|
55
|
+
import "../chunk-2AGBCGOW.js";
|
|
56
|
+
import "../chunk-MRGHRTKA.js";
|
|
57
|
+
import "../chunk-35PJW7RT.js";
|
|
58
|
+
import "../chunk-GWHKALYQ.js";
|
|
59
|
+
import "../chunk-WTMJTGW4.js";
|
|
60
|
+
import "../chunk-CRTTTIAD.js";
|
|
61
61
|
import "../chunk-YMNSXZ5D.js";
|
|
62
|
-
import "../chunk-
|
|
62
|
+
import "../chunk-XDP7GCYE.js";
|
|
63
63
|
import "../chunk-OPV246QW.js";
|
|
64
64
|
import "../chunk-AAFUVYVP.js";
|
|
65
|
-
import "../chunk-
|
|
66
|
-
import "../chunk-
|
|
67
|
-
import "../chunk-
|
|
68
|
-
import "../chunk-
|
|
69
|
-
import "../chunk-
|
|
70
|
-
import "../chunk-
|
|
65
|
+
import "../chunk-4C2TISN7.js";
|
|
66
|
+
import "../chunk-E4DUADXU.js";
|
|
67
|
+
import "../chunk-YRNEIRHM.js";
|
|
68
|
+
import "../chunk-X4TGLNCH.js";
|
|
69
|
+
import "../chunk-RPNTFEXE.js";
|
|
70
|
+
import "../chunk-LTCJ6LNO.js";
|
|
71
71
|
import "../chunk-55OQPFLF.js";
|
|
72
|
-
import "../chunk-
|
|
72
|
+
import "../chunk-4JHXRPRB.js";
|
|
73
73
|
import "../chunk-3XSQV5U4.js";
|
|
74
|
-
import "../chunk-
|
|
75
|
-
import "../chunk-
|
|
74
|
+
import "../chunk-7WDAN3OC.js";
|
|
75
|
+
import "../chunk-I3FI3FNP.js";
|
|
76
76
|
import "../chunk-EDN2QDCB.js";
|
|
77
77
|
import "../chunk-FT62PIPN.js";
|
|
78
78
|
import "../chunk-5ZDDVLS6.js";
|
|
@@ -187,8 +187,8 @@ import "../chunk-VI6WTKMV.js";
|
|
|
187
187
|
import "../chunk-QW2INB5A.js";
|
|
188
188
|
import "../chunk-JLD7MGLC.js";
|
|
189
189
|
import "../chunk-DW6LFUI2.js";
|
|
190
|
-
import "../chunk-
|
|
191
|
-
import "../chunk-
|
|
190
|
+
import "../chunk-PG2W2HVB.js";
|
|
191
|
+
import "../chunk-IBZBPQMZ.js";
|
|
192
192
|
import "../chunk-ENBUKLVT.js";
|
|
193
193
|
import "../chunk-JSGRNWSB.js";
|
|
194
194
|
import "../chunk-FO7I4E45.js";
|