@lightsparkdev/ui 1.0.2 → 1.0.4
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 +12 -0
- package/dist/{chunk-SGSLTG65.js → chunk-242JGEN4.js} +3 -3
- package/dist/{chunk-F6EVBEMN.js → chunk-2P6TCMZN.js} +2 -2
- package/dist/{chunk-J7SV67XL.js → chunk-3R5KJDSL.js} +1 -1
- package/dist/{chunk-L6S22JUU.js → chunk-4BERRPJN.js} +3 -3
- package/dist/{chunk-AI6DCUWK.js → chunk-4KURUJD2.js} +1 -1
- package/dist/{chunk-6H7PZJ2A.js → chunk-4X67A2CS.js} +2 -1
- package/dist/{chunk-YRYVSAWS.js → chunk-5F7IOIWL.js} +1 -1
- package/dist/{chunk-EMXTALIX.js → chunk-5ON3ICVC.js} +1 -1
- package/dist/{chunk-35WJ3PKH.js → chunk-642OXLAD.js} +2 -2
- package/dist/{chunk-SKXCT2FQ.js → chunk-7BSME2ZU.js} +2 -2
- package/dist/{chunk-GNVEN6UE.js → chunk-7COKMITX.js} +2 -2
- package/dist/{chunk-LL5YLPNM.js → chunk-7OJQZEVL.js} +5 -5
- package/dist/{chunk-GGEAODIA.js → chunk-7RLDCOUT.js} +4 -4
- package/dist/{chunk-S6AOKANU.js → chunk-7RMHMFS2.js} +4 -4
- package/dist/{chunk-CMQELZES.js → chunk-AZOVE32P.js} +2 -2
- package/dist/{chunk-5H32AOXL.js → chunk-BAGRU7JE.js} +1 -1
- package/dist/{chunk-2JYYREVX.js → chunk-BPGBJRZE.js} +1 -1
- package/dist/{chunk-UNULJ3P6.js → chunk-BRRDPQWW.js} +4 -4
- package/dist/{chunk-W3BAJ3HT.js → chunk-C3YODRA3.js} +15 -15
- package/dist/{chunk-HZ63YB4Y.js → chunk-C4HNAZFZ.js} +3 -3
- package/dist/{chunk-7NPHOJXD.js → chunk-CZFFMEAS.js} +5 -5
- package/dist/{chunk-HRZNVE2K.js → chunk-DIKOS5R6.js} +2 -2
- package/dist/{chunk-BMSSV6NX.js → chunk-DNGAINGL.js} +1 -1
- package/dist/{chunk-TVLELY54.js → chunk-DWUP3RDU.js} +4 -4
- package/dist/chunk-E5DUKMCU.js +65 -0
- package/dist/chunk-EIFK352Q.js +27 -0
- package/dist/{chunk-OA3BZAST.js → chunk-GLEAWATH.js} +3 -3
- package/dist/{chunk-KFX7US6Y.js → chunk-GQVNE3NU.js} +1 -1
- package/dist/{chunk-UBYBILLK.js → chunk-HPZVUEDJ.js} +2 -2
- package/dist/{chunk-TM3C4LEG.js → chunk-HVDX4OZJ.js} +2 -2
- package/dist/{chunk-6JFJDBV2.js → chunk-JAPRGAB7.js} +1 -1
- package/dist/{chunk-467PLJO3.js → chunk-JH53NBOD.js} +59 -10
- package/dist/{chunk-2XRCGW74.js → chunk-KBLCFXNL.js} +3 -3
- package/dist/{chunk-NYQLPSG3.js → chunk-KJHREJHT.js} +2 -2
- package/dist/{chunk-CZQER3QD.js → chunk-LFD2KVAB.js} +1 -1
- package/dist/{chunk-DCFB5MJ7.js → chunk-LGXMGWLV.js} +17 -16
- package/dist/{chunk-37RRWSDE.js → chunk-LLGN3OM3.js} +2 -2
- package/dist/{chunk-HA4AQO3T.js → chunk-MK2JFFUG.js} +1 -1
- package/dist/{chunk-EV6PGQPM.js → chunk-MNMVZI7D.js} +11 -11
- package/dist/{chunk-HP4VPMN7.js → chunk-OMY3WTAU.js} +2 -2
- package/dist/{chunk-VUXU77SU.js → chunk-OUHQXQOJ.js} +1 -1
- package/dist/{chunk-PNSZAJL7.js → chunk-OZQ5WPLN.js} +2 -2
- package/dist/{chunk-2H7TBKII.js → chunk-PDQVYUEW.js} +6 -6
- package/dist/{chunk-DNVKN2FG.js → chunk-QCHEDM2I.js} +3 -3
- package/dist/{chunk-CHK5DOMV.js → chunk-RESJONBZ.js} +2 -2
- package/dist/{chunk-XP3BAAUO.js → chunk-SZ4KKLYJ.js} +2 -2
- package/dist/{chunk-VYTN6ASZ.js → chunk-THTKSZSR.js} +2 -2
- package/dist/{chunk-KBYU4ZQ3.js → chunk-TNDSUTUN.js} +3 -3
- package/dist/{chunk-SRHSJOES.js → chunk-TNISOOCF.js} +1 -1
- package/dist/{chunk-55M7XHBZ.js → chunk-UNFCVZ32.js} +36 -33
- package/dist/{chunk-56QJRFP2.js → chunk-V523QTZQ.js} +2 -2
- package/dist/{chunk-A4JZESAS.js → chunk-VNQE6KEX.js} +16 -3
- package/dist/{chunk-5XZJEYHG.js → chunk-VR2GLRXH.js} +1 -1
- package/dist/chunk-VWD7T5MQ.js +74 -0
- package/dist/{chunk-XUVCOSIE.js → chunk-VXH6GWGE.js} +2 -2
- package/dist/{chunk-ZNZAY47J.js → chunk-W2N5QUG6.js} +9 -6
- package/dist/{chunk-D73OOC3E.js → chunk-WDJMAZFO.js} +3 -3
- package/dist/{chunk-WV5AB4ZB.js → chunk-XS4MH3QA.js} +102 -85
- package/dist/{chunk-TM2NGRD2.js → chunk-YRFCWL73.js} +5 -2
- package/dist/{chunk-CZCPVHVB.js → chunk-YRZ3VNBI.js} +2 -2
- package/dist/{chunk-JOQCJPOA.js → chunk-ZCXGHQQF.js} +9 -9
- package/dist/{chunk-UVGBD7XM.js → chunk-ZO35RX7V.js} +21 -13
- package/dist/{chunk-27SFWLPS.js → chunk-ZS7G6WIG.js} +1 -1
- package/dist/components/Badge.cjs +7845 -7476
- package/dist/components/Badge.d.cts +146 -7
- package/dist/components/Badge.d.ts +146 -7
- package/dist/components/Badge.js +20 -23
- package/dist/components/Banner/Banner.cjs +55 -26
- 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 +46 -28
- 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 +49 -31
- 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 +16 -3
- package/dist/components/CardPage.js +24 -24
- package/dist/components/Checkbox.cjs +3 -3
- package/dist/components/Checkbox.js +3 -3
- package/dist/components/CodeBlock.cjs +21 -7
- package/dist/components/CodeBlock.js +8 -8
- package/dist/components/CodeInput/CodeInput.cjs +17 -4
- package/dist/components/CodeInput/CodeInput.js +6 -6
- package/dist/components/CodeInput/SingleCodeInput.cjs +17 -4
- package/dist/components/CodeInput/SingleCodeInput.js +5 -5
- package/dist/components/Collapsible.cjs +82 -7
- package/dist/components/Collapsible.js +6 -6
- package/dist/components/CommaNumberInput.cjs +22 -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 +17 -4
- package/dist/components/ContentTable.js +4 -4
- package/dist/components/CopyToClipboardButton.cjs +21 -7
- package/dist/components/CopyToClipboardButton.js +6 -6
- package/dist/components/CurrencyAmount.cjs +17 -4
- package/dist/components/CurrencyAmount.js +4 -4
- package/dist/components/Drawer.cjs +293 -176
- package/dist/components/Drawer.d.cts +2 -0
- package/dist/components/Drawer.d.ts +2 -0
- package/dist/components/Drawer.js +22 -22
- package/dist/components/Dropdown.cjs +21 -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 +17 -4
- package/dist/components/FileInput.js +10 -10
- package/dist/components/GradientCardHeader.js +5 -5
- package/dist/components/Icon/Icon.cjs +17 -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 +7349 -7338
- package/dist/components/IconWithCircleBackground.js +4 -73
- package/dist/components/InfoIconTooltip.cjs +62 -32
- 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 +16 -3
- package/dist/components/LightsparkProvider.js +4 -4
- package/dist/components/Loading.cjs +17 -4
- package/dist/components/Loading.js +4 -4
- package/dist/components/Modal.cjs +297 -147
- package/dist/components/Modal.d.cts +21 -15
- package/dist/components/Modal.d.ts +21 -15
- package/dist/components/Modal.js +27 -68
- package/dist/components/PageSection/PageSection.cjs +214 -100
- package/dist/components/PageSection/PageSection.d.cts +1 -1
- package/dist/components/PageSection/PageSection.d.ts +1 -1
- package/dist/components/PageSection/PageSection.js +27 -31
- package/dist/components/PageSection/PageSectionNav.cjs +50 -21
- package/dist/components/PageSection/PageSectionNav.js +20 -20
- package/dist/components/PhoneInput.cjs +22 -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 +17 -4
- package/dist/components/Pill.js +7 -7
- package/dist/components/ProgressBar.cjs +16 -3
- package/dist/components/ProgressBar.js +3 -3
- package/dist/components/Radio.cjs +7410 -7334
- package/dist/components/Radio.js +8 -22
- package/dist/components/SecretContainer.cjs +21 -7
- package/dist/components/SecretContainer.js +7 -7
- package/dist/components/StatusIndicator.js +4 -4
- package/dist/components/TextButton.cjs +46 -17
- 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 +40 -11
- 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 +22 -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 +66 -37
- 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 +108 -97
- package/dist/components/Toggle.js +4 -4
- package/dist/components/Tooltip.cjs +20 -6
- package/dist/components/Tooltip.js +3 -3
- package/dist/components/UnstyledButton.js +3 -3
- package/dist/components/documentation/AnchorLinkHeader.cjs +17 -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 +16 -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 +16 -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 +16 -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 +17 -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 +8474 -8234
- package/dist/components/index.d.cts +5 -5
- package/dist/components/index.d.ts +5 -5
- package/dist/components/index.js +69 -70
- package/dist/components/typography/Article.cjs +103 -28
- package/dist/components/typography/Article.js +14 -14
- package/dist/components/typography/Body.cjs +18 -4
- package/dist/components/typography/Body.d.cts +2 -2
- package/dist/components/typography/Body.d.ts +2 -2
- package/dist/components/typography/Body.js +6 -6
- package/dist/components/typography/BodyStrong.cjs +18 -4
- package/dist/components/typography/BodyStrong.d.cts +2 -2
- package/dist/components/typography/BodyStrong.d.ts +2 -2
- package/dist/components/typography/BodyStrong.js +6 -6
- package/dist/components/typography/Code.cjs +18 -4
- package/dist/components/typography/Code.d.cts +2 -2
- package/dist/components/typography/Code.d.ts +2 -2
- package/dist/components/typography/Code.js +6 -6
- package/dist/components/typography/Display.cjs +18 -4
- package/dist/components/typography/Display.d.cts +2 -2
- package/dist/components/typography/Display.d.ts +2 -2
- package/dist/components/typography/Display.js +6 -6
- package/dist/components/typography/Headline.cjs +18 -4
- package/dist/components/typography/Headline.d.cts +2 -2
- package/dist/components/typography/Headline.d.ts +2 -2
- package/dist/components/typography/Headline.js +6 -6
- package/dist/components/typography/Label.cjs +18 -4
- package/dist/components/typography/Label.d.cts +2 -2
- package/dist/components/typography/Label.d.ts +2 -2
- package/dist/components/typography/Label.js +6 -6
- package/dist/components/typography/LabelModerate.cjs +18 -4
- package/dist/components/typography/LabelModerate.d.cts +2 -2
- package/dist/components/typography/LabelModerate.d.ts +2 -2
- package/dist/components/typography/LabelModerate.js +6 -6
- package/dist/components/typography/LabelStrong.cjs +18 -4
- package/dist/components/typography/LabelStrong.d.cts +2 -2
- package/dist/components/typography/LabelStrong.d.ts +2 -2
- package/dist/components/typography/LabelStrong.js +6 -6
- package/dist/components/typography/Overline.cjs +18 -4
- package/dist/components/typography/Overline.d.cts +2 -2
- package/dist/components/typography/Overline.d.ts +2 -2
- package/dist/components/typography/Overline.js +6 -6
- package/dist/components/typography/Title.cjs +18 -4
- package/dist/components/typography/Title.d.cts +3 -3
- package/dist/components/typography/Title.d.ts +3 -3
- package/dist/components/typography/Title.js +6 -6
- package/dist/components/typography/index.cjs +105 -29
- package/dist/components/typography/index.d.cts +1 -1
- package/dist/components/typography/index.d.ts +1 -1
- package/dist/components/typography/index.js +22 -23
- package/dist/components/typography/renderTypography.cjs +34 -7
- package/dist/components/typography/renderTypography.d.cts +20 -20
- package/dist/components/typography/renderTypography.d.ts +20 -20
- 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 +20 -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 +17 -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 +16 -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 +16 -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/tokens/spacing.cjs +60 -21
- package/dist/styles/tokens/spacing.d.cts +40 -20
- package/dist/styles/tokens/spacing.d.ts +40 -20
- package/dist/styles/tokens/spacing.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 +16 -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/{buttons-b7f56076.d.ts → themes-37e92940.d.ts} +91 -67
- package/dist/{buttons-e4eb84a2.d.ts → themes-832e46b2.d.ts} +91 -67
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/toNonTypographicReactNodes.cjs +18 -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 +59 -21
- package/dist/utils/toReactNodes.d.cts +13 -9
- package/dist/utils/toReactNodes.d.ts +13 -9
- package/dist/utils/toReactNodes.js +19 -17
- package/package.json +1 -1
- package/dist/chunk-3XSQV5U4.js +0 -26
- package/dist/chunk-B2VYAIYR.js +0 -0
- package/dist/chunk-RSAYBOK5.js +0 -35
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import react__default, { MutableRefObject, ComponentProps } from 'react';
|
|
2
|
+
import { TypographyTypeKey } from '../styles/tokens/typography.cjs';
|
|
3
|
+
import { NewRoutesType } from '../types/index.cjs';
|
|
2
4
|
import { ToReactNodesArgs } from '../utils/toReactNodes.cjs';
|
|
5
|
+
import { Button } from './Button.cjs';
|
|
3
6
|
import { IconWithCircleBackground } from './IconWithCircleBackground.cjs';
|
|
4
7
|
import { ProgressBarProps } from './ProgressBar.cjs';
|
|
8
|
+
import '@emotion/react';
|
|
5
9
|
import '@emotion/react/jsx-runtime';
|
|
6
10
|
import './typography/renderTypography.cjs';
|
|
7
11
|
import './typography/Code.cjs';
|
|
8
12
|
import '@emotion/styled';
|
|
9
|
-
import '
|
|
10
|
-
import '../buttons-b7f56076.js';
|
|
11
|
-
import '../styles/tokens/typography.cjs';
|
|
13
|
+
import '../themes-37e92940.js';
|
|
12
14
|
import '@emotion/css';
|
|
13
15
|
import '../styles/colors.cjs';
|
|
14
16
|
import '../utils/toNonTypographicReactNodes.cjs';
|
|
@@ -125,29 +127,30 @@ import '../icons/UmaBridgeLoading.cjs';
|
|
|
125
127
|
import '../icons/Upload.cjs';
|
|
126
128
|
import '../icons/WalletSDKIcon.cjs';
|
|
127
129
|
import '../icons/WarningSign.cjs';
|
|
128
|
-
import '../types/index.cjs';
|
|
129
130
|
import './typography/Overline.cjs';
|
|
130
131
|
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
|
-
type ModalProps<
|
|
148
|
+
type ModalProps<T extends TypographyTypeKey> = {
|
|
146
149
|
visible: boolean;
|
|
147
150
|
onClose: () => void;
|
|
148
151
|
topContent?: TopContent | undefined;
|
|
149
|
-
title?: ToReactNodesArgs
|
|
150
|
-
description?: ToReactNodesArgs
|
|
152
|
+
title?: ToReactNodesArgs<T>;
|
|
153
|
+
description?: ToReactNodesArgs<T>;
|
|
151
154
|
cancelText?: string | undefined;
|
|
152
155
|
cancelDisabled?: boolean;
|
|
153
156
|
cancelHidden?: boolean;
|
|
@@ -158,22 +161,25 @@ type ModalProps<RoutesType extends string> = {
|
|
|
158
161
|
submitLoading?: boolean;
|
|
159
162
|
submitText?: string;
|
|
160
163
|
submitLink?: {
|
|
161
|
-
to:
|
|
164
|
+
to: NewRoutesType;
|
|
162
165
|
} | SubmitLinkWithHref;
|
|
163
166
|
children?: react__default.ReactNode;
|
|
164
167
|
firstFocusRef?: MutableRefObject<{
|
|
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<
|
|
183
|
+
declare function Modal<T extends TypographyTypeKey>({ 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<T>): react__default.ReactPortal | null;
|
|
178
184
|
|
|
179
|
-
export {
|
|
185
|
+
export { Modal };
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import react__default, { MutableRefObject, ComponentProps } from 'react';
|
|
2
|
+
import { TypographyTypeKey } from '../styles/tokens/typography.js';
|
|
3
|
+
import { NewRoutesType } from '../types/index.js';
|
|
2
4
|
import { ToReactNodesArgs } from '../utils/toReactNodes.js';
|
|
5
|
+
import { Button } from './Button.js';
|
|
3
6
|
import { IconWithCircleBackground } from './IconWithCircleBackground.js';
|
|
4
7
|
import { ProgressBarProps } from './ProgressBar.js';
|
|
8
|
+
import '@emotion/react';
|
|
5
9
|
import '@emotion/react/jsx-runtime';
|
|
6
10
|
import './typography/renderTypography.js';
|
|
7
11
|
import './typography/Code.js';
|
|
8
12
|
import '@emotion/styled';
|
|
9
|
-
import '
|
|
10
|
-
import '../buttons-e4eb84a2.js';
|
|
11
|
-
import '../styles/tokens/typography.js';
|
|
13
|
+
import '../themes-832e46b2.js';
|
|
12
14
|
import '@emotion/css';
|
|
13
15
|
import '../styles/colors.js';
|
|
14
16
|
import '../utils/toNonTypographicReactNodes.js';
|
|
@@ -125,29 +127,30 @@ import '../icons/UmaBridgeLoading.js';
|
|
|
125
127
|
import '../icons/Upload.js';
|
|
126
128
|
import '../icons/WalletSDKIcon.js';
|
|
127
129
|
import '../icons/WarningSign.js';
|
|
128
|
-
import '../types/index.js';
|
|
129
130
|
import './typography/Overline.js';
|
|
130
131
|
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
|
-
type ModalProps<
|
|
148
|
+
type ModalProps<T extends TypographyTypeKey> = {
|
|
146
149
|
visible: boolean;
|
|
147
150
|
onClose: () => void;
|
|
148
151
|
topContent?: TopContent | undefined;
|
|
149
|
-
title?: ToReactNodesArgs
|
|
150
|
-
description?: ToReactNodesArgs
|
|
152
|
+
title?: ToReactNodesArgs<T>;
|
|
153
|
+
description?: ToReactNodesArgs<T>;
|
|
151
154
|
cancelText?: string | undefined;
|
|
152
155
|
cancelDisabled?: boolean;
|
|
153
156
|
cancelHidden?: boolean;
|
|
@@ -158,22 +161,25 @@ type ModalProps<RoutesType extends string> = {
|
|
|
158
161
|
submitLoading?: boolean;
|
|
159
162
|
submitText?: string;
|
|
160
163
|
submitLink?: {
|
|
161
|
-
to:
|
|
164
|
+
to: NewRoutesType;
|
|
162
165
|
} | SubmitLinkWithHref;
|
|
163
166
|
children?: react__default.ReactNode;
|
|
164
167
|
firstFocusRef?: MutableRefObject<{
|
|
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<
|
|
183
|
+
declare function Modal<T extends TypographyTypeKey>({ 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<T>): react__default.ReactPortal | null;
|
|
178
184
|
|
|
179
|
-
export {
|
|
185
|
+
export { Modal };
|
package/dist/components/Modal.js
CHANGED
|
@@ -1,78 +1,37 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Modal
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-XS4MH3QA.js";
|
|
5
5
|
import "../chunk-NBCCPGA4.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-W3BAJ3HT.js";
|
|
9
|
-
import "../chunk-NYQLPSG3.js";
|
|
10
|
-
import "../chunk-JJC2AUQ3.js";
|
|
11
|
-
import "../chunk-2H7TBKII.js";
|
|
12
|
-
import "../chunk-DNVKN2FG.js";
|
|
13
|
-
import "../chunk-ZSWFGISK.js";
|
|
14
|
-
import "../chunk-E3FGOYEJ.js";
|
|
15
|
-
import "../chunk-2JYYREVX.js";
|
|
16
|
-
import "../chunk-5KSG5D3I.js";
|
|
17
|
-
import "../chunk-XUVCOSIE.js";
|
|
18
|
-
import "../chunk-TM2NGRD2.js";
|
|
19
|
-
import "../chunk-CHK5DOMV.js";
|
|
20
|
-
import "../chunk-HZ63YB4Y.js";
|
|
21
|
-
import "../chunk-XP3BAAUO.js";
|
|
6
|
+
import "../chunk-VXH6GWGE.js";
|
|
7
|
+
import "../chunk-EIFK352Q.js";
|
|
22
8
|
import "../chunk-IL6J7EBZ.js";
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
37
|
-
import "../chunk-VQVEZVAG.js";
|
|
38
|
-
import "../chunk-2XRCGW74.js";
|
|
39
|
-
import "../chunk-TVLELY54.js";
|
|
40
|
-
import "../chunk-S6AOKANU.js";
|
|
41
|
-
import "../chunk-RSAYBOK5.js";
|
|
42
|
-
import "../chunk-B2VYAIYR.js";
|
|
43
|
-
import "../chunk-55M7XHBZ.js";
|
|
44
|
-
import "../chunk-J7SV67XL.js";
|
|
45
|
-
import "../chunk-LL5YLPNM.js";
|
|
46
|
-
import "../chunk-5H32AOXL.js";
|
|
47
|
-
import "../chunk-D73OOC3E.js";
|
|
48
|
-
import "../chunk-EV6PGQPM.js";
|
|
49
|
-
import "../chunk-DCFB5MJ7.js";
|
|
50
|
-
import "../chunk-BMSSV6NX.js";
|
|
51
|
-
import "../chunk-SKXCT2FQ.js";
|
|
52
|
-
import "../chunk-56QJRFP2.js";
|
|
53
|
-
import "../chunk-CZCPVHVB.js";
|
|
54
|
-
import "../chunk-UBYBILLK.js";
|
|
55
|
-
import "../chunk-GNVEN6UE.js";
|
|
56
|
-
import "../chunk-HRZNVE2K.js";
|
|
57
|
-
import "../chunk-CMQELZES.js";
|
|
58
|
-
import "../chunk-TM3C4LEG.js";
|
|
59
|
-
import "../chunk-HP4VPMN7.js";
|
|
60
|
-
import "../chunk-PNSZAJL7.js";
|
|
9
|
+
import "../chunk-JH53NBOD.js";
|
|
10
|
+
import "../chunk-ZO35RX7V.js";
|
|
11
|
+
import "../chunk-MNMVZI7D.js";
|
|
12
|
+
import "../chunk-DNGAINGL.js";
|
|
13
|
+
import "../chunk-LGXMGWLV.js";
|
|
14
|
+
import "../chunk-V523QTZQ.js";
|
|
15
|
+
import "../chunk-YRZ3VNBI.js";
|
|
16
|
+
import "../chunk-HPZVUEDJ.js";
|
|
17
|
+
import "../chunk-7COKMITX.js";
|
|
18
|
+
import "../chunk-DIKOS5R6.js";
|
|
19
|
+
import "../chunk-AZOVE32P.js";
|
|
20
|
+
import "../chunk-HVDX4OZJ.js";
|
|
21
|
+
import "../chunk-OMY3WTAU.js";
|
|
22
|
+
import "../chunk-OZQ5WPLN.js";
|
|
61
23
|
import "../chunk-YMNSXZ5D.js";
|
|
62
|
-
import "../chunk-
|
|
24
|
+
import "../chunk-7BSME2ZU.js";
|
|
25
|
+
import "../chunk-4X67A2CS.js";
|
|
63
26
|
import "../chunk-OPV246QW.js";
|
|
64
27
|
import "../chunk-AAFUVYVP.js";
|
|
65
|
-
import "../chunk-
|
|
66
|
-
import "../chunk-
|
|
67
|
-
import "../chunk-
|
|
68
|
-
import "../chunk-SGSLTG65.js";
|
|
69
|
-
import "../chunk-27SFWLPS.js";
|
|
70
|
-
import "../chunk-6JFJDBV2.js";
|
|
28
|
+
import "../chunk-OUHQXQOJ.js";
|
|
29
|
+
import "../chunk-ZS7G6WIG.js";
|
|
30
|
+
import "../chunk-JAPRGAB7.js";
|
|
71
31
|
import "../chunk-55OQPFLF.js";
|
|
72
|
-
import "../chunk-
|
|
73
|
-
import "../chunk-
|
|
74
|
-
import "../chunk-
|
|
75
|
-
import "../chunk-KBYU4ZQ3.js";
|
|
32
|
+
import "../chunk-E5DUKMCU.js";
|
|
33
|
+
import "../chunk-GQVNE3NU.js";
|
|
34
|
+
import "../chunk-TNDSUTUN.js";
|
|
76
35
|
import "../chunk-EDN2QDCB.js";
|
|
77
36
|
import "../chunk-FT62PIPN.js";
|
|
78
37
|
import "../chunk-5ZDDVLS6.js";
|
|
@@ -187,8 +146,8 @@ import "../chunk-VI6WTKMV.js";
|
|
|
187
146
|
import "../chunk-QW2INB5A.js";
|
|
188
147
|
import "../chunk-JLD7MGLC.js";
|
|
189
148
|
import "../chunk-DW6LFUI2.js";
|
|
190
|
-
import "../chunk-
|
|
191
|
-
import "../chunk-
|
|
149
|
+
import "../chunk-CZFFMEAS.js";
|
|
150
|
+
import "../chunk-VNQE6KEX.js";
|
|
192
151
|
import "../chunk-ENBUKLVT.js";
|
|
193
152
|
import "../chunk-JSGRNWSB.js";
|
|
194
153
|
import "../chunk-FO7I4E45.js";
|