@lightsparkdev/ui 1.0.1 → 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 +13 -0
- package/dist/{buttons-38b5823f.d.ts → buttons-35280bfe.d.ts} +40 -15
- package/dist/{buttons-a63671c2.d.ts → buttons-36cdd0fe.d.ts} +40 -15
- package/dist/{chunk-IOWK2GBE.js → chunk-2AGBCGOW.js} +2 -2
- package/dist/{chunk-BAQMHUBZ.js → chunk-2IXAUIKR.js} +2 -2
- package/dist/{chunk-YYPRW5VJ.js → chunk-2XUHQWCJ.js} +4 -4
- package/dist/{chunk-HV6SRK57.js → chunk-35PJW7RT.js} +2 -2
- package/dist/{chunk-NHZO42IA.js → chunk-435FPPZK.js} +2 -2
- package/dist/{chunk-ACYYMZQZ.js → chunk-4BFBANKF.js} +13 -13
- package/dist/{chunk-WIFHFWAN.js → chunk-4C2TISN7.js} +1 -1
- package/dist/{chunk-KBL7GU4S.js → chunk-4JHXRPRB.js} +3 -3
- package/dist/{chunk-RVT4NV6Z.js → chunk-54EOEIEN.js} +2 -2
- package/dist/{chunk-54WKLEUU.js → chunk-5TTLUOJ5.js} +1 -1
- package/dist/{chunk-FEJU2K4L.js → chunk-6CNJ5ZCC.js} +4 -4
- package/dist/{chunk-I5PGTS2V.js → chunk-7FHOKVKJ.js} +9 -9
- package/dist/{chunk-UKAPI3BN.js → chunk-7IHNYMFQ.js} +2 -2
- package/dist/{chunk-4CYGTH2J.js → chunk-7N2PFDYE.js} +2 -2
- package/dist/{chunk-JXXIU52B.js → chunk-7WDAN3OC.js} +1 -1
- package/dist/{chunk-GKH3ZH4N.js → chunk-7Y2G2JDF.js} +2 -2
- package/dist/{chunk-CZH4OCQY.js → chunk-7YY6BH5O.js} +2 -2
- package/dist/{chunk-4QVTXKRX.js → chunk-AAFUVYVP.js} +1 -1
- package/dist/chunk-ABSTTY5Q.js +7 -0
- package/dist/{chunk-NMJGBK5W.js → chunk-B6S7Y4K7.js} +2 -2
- package/dist/{chunk-3TKO2L4T.js → chunk-BDZ46Z2I.js} +2 -2
- package/dist/{chunk-E6XGSPA6.js → chunk-BENSR2YW.js} +1 -1
- package/dist/{chunk-BPZ7AV7W.js → chunk-BHP5YL2N.js} +1 -1
- package/dist/{chunk-NEH2HFAW.js → chunk-BSH6WRUZ.js} +3 -3
- package/dist/{chunk-2I6UL3CQ.js → chunk-C4KZC45Y.js} +125 -59
- package/dist/{chunk-4YN25H5H.js → chunk-CRTTTIAD.js} +2 -2
- package/dist/{chunk-TKERS7F6.js → chunk-DXA3WUSX.js} +2 -2
- package/dist/{chunk-SW6GFFIG.js → chunk-E4DUADXU.js} +1 -1
- package/dist/{chunk-GKBQAEH5.js → chunk-FO7I4E45.js} +17 -2
- package/dist/{chunk-MD7VQ24I.js → chunk-FT62PIPN.js} +119 -119
- package/dist/{chunk-FUC2Z5QZ.js → chunk-GSKTHUQJ.js} +2 -2
- package/dist/{chunk-POTDIFIX.js → chunk-GWHKALYQ.js} +2 -2
- package/dist/{chunk-TW4DU3WY.js → chunk-HGOGF6I7.js} +1 -1
- package/dist/{chunk-UAFWDZRG.js → chunk-I3FI3FNP.js} +4 -4
- package/dist/{chunk-ZFDYANKZ.js → chunk-IBZBPQMZ.js} +21 -15
- package/dist/chunk-IL6J7EBZ.js +17 -0
- package/dist/{chunk-VRZRCDI4.js → chunk-ILEZ6AWT.js} +5 -5
- package/dist/{chunk-LWYMD7X4.js → chunk-J3YVJWRG.js} +5 -5
- package/dist/{chunk-HXKKG2VQ.js → chunk-JNNJVBHF.js} +52 -7
- package/dist/{chunk-ZKJS5M5E.js → chunk-K7FYXGOI.js} +1 -1
- package/dist/{chunk-NPY3QVGG.js → chunk-KX5QZXCD.js} +1 -1
- package/dist/{chunk-TSHXYNRZ.js → chunk-LGKXPUSI.js} +3 -3
- package/dist/{chunk-KOD6R7U5.js → chunk-LH7GLNMY.js} +1 -1
- package/dist/{chunk-VENBTZHV.js → chunk-LIQSJ5R7.js} +2 -2
- package/dist/{chunk-UA3XC7J6.js → chunk-LOL5TJ3H.js} +11 -11
- package/dist/{chunk-HGYVPOA7.js → chunk-LTCJ6LNO.js} +1 -1
- package/dist/{chunk-YQP6EWZY.js → chunk-MRGHRTKA.js} +2 -2
- package/dist/{chunk-7TOLLB23.js → chunk-MWDDIXIP.js} +1 -1
- package/dist/{chunk-HE76YUIL.js → chunk-N2NPIZCV.js} +11 -11
- package/dist/{chunk-MO5PIHUX.js → chunk-OKXC33OU.js} +1 -1
- package/dist/{chunk-52POF2W4.js → chunk-PG2W2HVB.js} +6 -6
- package/dist/{chunk-QSVZXM35.js → chunk-PQKVR2BR.js} +1 -1
- package/dist/{chunk-RHHYOFN6.js → chunk-QQSV7XJX.js} +1 -1
- package/dist/{chunk-3A6TEYT3.js → chunk-RPNTFEXE.js} +1 -1
- package/dist/{chunk-CB2PBQ2G.js → chunk-SEZEDINC.js} +3 -3
- package/dist/{chunk-GHIYWOAC.js → chunk-SLKPLSJU.js} +27 -41
- package/dist/{chunk-AXFZE7WZ.js → chunk-SNFRMD6Z.js} +4 -4
- package/dist/{chunk-SBFDPMTS.js → chunk-UH5F35II.js} +3 -3
- package/dist/{chunk-44UNWWP3.js → chunk-VXKNN4SF.js} +13 -13
- package/dist/{chunk-AHIR5UAO.js → chunk-WGKUDRZ7.js} +2 -2
- package/dist/{chunk-MGXWKJDU.js → chunk-WTMJTGW4.js} +2 -2
- package/dist/{chunk-PK4E5P4Q.js → chunk-X4TGLNCH.js} +3 -3
- package/dist/{chunk-QVKXSZ63.js → chunk-XB4KQFK2.js} +2 -2
- package/dist/{chunk-QBJ57KNQ.js → chunk-XDP7GCYE.js} +3 -2
- package/dist/{chunk-5GVDRJLI.js → chunk-XM2HQVUK.js} +7 -7
- package/dist/{chunk-KYTOF4WO.js → chunk-XUWFUTR4.js} +1 -1
- package/dist/{chunk-C7TNFU3D.js → chunk-Y7RQUJUS.js} +5 -5
- package/dist/{chunk-CY3LZRBR.js → chunk-YIHC25WB.js} +3 -3
- package/dist/{chunk-3BMKXP5E.js → chunk-YRNEIRHM.js} +5 -5
- package/dist/components/Badge.cjs +43 -21
- package/dist/components/Badge.js +80 -80
- package/dist/components/Banner/Banner.cjs +43 -21
- package/dist/components/Banner/Banner.d.cts +1 -1
- package/dist/components/Banner/Banner.d.ts +1 -1
- package/dist/components/Banner/Banner.js +79 -79
- package/dist/components/Button.cjs +65 -56
- package/dist/components/Button.d.cts +2 -5
- package/dist/components/Button.d.ts +2 -5
- package/dist/components/Button.js +81 -81
- package/dist/components/ButtonRow.cjs +65 -56
- package/dist/components/ButtonRow.d.cts +1 -1
- package/dist/components/ButtonRow.d.ts +1 -1
- package/dist/components/ButtonRow.js +83 -83
- package/dist/components/CardPage.cjs +37 -16
- package/dist/components/CardPage.js +85 -85
- package/dist/components/Checkbox.js +5 -5
- package/dist/components/CodeBlock.cjs +46 -24
- package/dist/components/CodeBlock.js +68 -68
- package/dist/components/CodeInput/CodeInput.cjs +38 -17
- package/dist/components/CodeInput/CodeInput.js +8 -8
- package/dist/components/CodeInput/SingleCodeInput.cjs +38 -17
- package/dist/components/CodeInput/SingleCodeInput.js +7 -7
- package/dist/components/Collapsible.cjs +42 -21
- package/dist/components/Collapsible.js +65 -65
- package/dist/components/CommaNumberInput.cjs +47 -25
- package/dist/components/CommaNumberInput.d.cts +1 -1
- package/dist/components/CommaNumberInput.d.ts +1 -1
- package/dist/components/CommaNumberInput.js +71 -71
- package/dist/components/ContentTable.cjs +42 -21
- package/dist/components/ContentTable.js +64 -64
- package/dist/components/CopyToClipboardButton.cjs +46 -24
- package/dist/components/CopyToClipboardButton.js +66 -66
- package/dist/components/CurrencyAmount.cjs +42 -21
- package/dist/components/CurrencyAmount.js +64 -64
- package/dist/components/Drawer.cjs +236 -191
- package/dist/components/Drawer.d.cts +2 -0
- package/dist/components/Drawer.d.ts +2 -0
- package/dist/components/Drawer.js +82 -82
- package/dist/components/Dropdown.cjs +46 -24
- package/dist/components/Dropdown.d.cts +1 -1
- package/dist/components/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown.js +66 -66
- package/dist/components/FileInput.cjs +42 -21
- package/dist/components/FileInput.js +70 -70
- package/dist/components/Flex.cjs +51 -0
- package/dist/components/Flex.d.cts +11 -0
- package/dist/components/Flex.d.ts +11 -0
- package/dist/components/Flex.js +7 -0
- package/dist/components/GradientCardHeader.js +7 -7
- package/dist/components/Icon/Icon.cjs +42 -21
- package/dist/components/Icon/Icon.d.cts +1 -1
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.js +63 -63
- package/dist/components/IconWithCircleBackground.cjs +7737 -0
- package/dist/components/IconWithCircleBackground.d.cts +8 -0
- package/dist/components/IconWithCircleBackground.d.ts +8 -0
- package/dist/components/IconWithCircleBackground.js +198 -0
- package/dist/components/InfoIconTooltip.cjs +47 -24
- package/dist/components/InfoIconTooltip.d.cts +1 -1
- package/dist/components/InfoIconTooltip.d.ts +1 -1
- package/dist/components/InfoIconTooltip.js +80 -80
- package/dist/components/LightsparkProvider.cjs +37 -16
- package/dist/components/LightsparkProvider.js +6 -6
- package/dist/components/Loading.cjs +42 -21
- package/dist/components/Loading.js +64 -64
- package/dist/components/Modal.cjs +229 -115
- package/dist/components/Modal.d.cts +18 -9
- package/dist/components/Modal.d.ts +18 -9
- package/dist/components/Modal.js +129 -86
- package/dist/components/PageSection/PageSection.cjs +47 -24
- package/dist/components/PageSection/PageSection.d.cts +1 -1
- package/dist/components/PageSection/PageSection.d.ts +1 -1
- package/dist/components/PageSection/PageSection.js +90 -90
- package/dist/components/PageSection/PageSectionNav.cjs +43 -21
- package/dist/components/PageSection/PageSectionNav.js +81 -81
- package/dist/components/PhoneInput.cjs +47 -25
- package/dist/components/PhoneInput.d.cts +1 -1
- package/dist/components/PhoneInput.d.ts +1 -1
- package/dist/components/PhoneInput.js +71 -71
- package/dist/components/Pill.cjs +42 -21
- package/dist/components/Pill.js +67 -67
- package/dist/components/ProgressBar.cjs +37 -16
- package/dist/components/ProgressBar.js +5 -5
- package/dist/components/Radio.cjs +43 -21
- package/dist/components/Radio.js +80 -80
- package/dist/components/SecretContainer.cjs +46 -24
- package/dist/components/SecretContainer.js +67 -67
- package/dist/components/StatusIndicator.js +6 -6
- package/dist/components/TextButton.cjs +43 -21
- package/dist/components/TextButton.d.cts +1 -1
- package/dist/components/TextButton.d.ts +1 -1
- package/dist/components/TextButton.js +80 -80
- package/dist/components/TextIconAligner.cjs +43 -21
- package/dist/components/TextIconAligner.d.cts +1 -1
- package/dist/components/TextIconAligner.d.ts +1 -1
- package/dist/components/TextIconAligner.js +78 -78
- package/dist/components/TextInput.cjs +47 -25
- package/dist/components/TextInput.d.cts +1 -1
- package/dist/components/TextInput.d.ts +1 -1
- package/dist/components/TextInput.js +70 -70
- package/dist/components/Toasts.cjs +43 -21
- package/dist/components/Toasts.d.cts +1 -1
- package/dist/components/Toasts.d.ts +1 -1
- package/dist/components/Toasts.js +81 -81
- package/dist/components/Toggle.cjs +37 -16
- package/dist/components/Toggle.js +6 -6
- package/dist/components/Tooltip.cjs +41 -19
- package/dist/components/Tooltip.js +5 -5
- package/dist/components/UnstyledButton.js +5 -5
- package/dist/components/documentation/AnchorLinkHeader.cjs +42 -21
- package/dist/components/documentation/AnchorLinkHeader.d.cts +1 -1
- package/dist/components/documentation/AnchorLinkHeader.d.ts +1 -1
- package/dist/components/documentation/AnchorLinkHeader.js +69 -69
- package/dist/components/documentation/DocsBodyParagraph.cjs +37 -16
- package/dist/components/documentation/DocsBodyParagraph.d.cts +1 -1
- package/dist/components/documentation/DocsBodyParagraph.d.ts +1 -1
- package/dist/components/documentation/DocsBodyParagraph.js +67 -67
- package/dist/components/documentation/DocsBodyStrongParagraph.cjs +37 -16
- package/dist/components/documentation/DocsBodyStrongParagraph.d.cts +1 -1
- package/dist/components/documentation/DocsBodyStrongParagraph.d.ts +1 -1
- package/dist/components/documentation/DocsBodyStrongParagraph.js +67 -67
- package/dist/components/documentation/DocsHeadline.cjs +37 -16
- package/dist/components/documentation/DocsHeadline.d.cts +1 -1
- package/dist/components/documentation/DocsHeadline.d.ts +1 -1
- package/dist/components/documentation/DocsHeadline.js +68 -68
- 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 +20 -4
- package/dist/components/documentation/index.cjs +42 -21
- package/dist/components/documentation/index.d.cts +1 -1
- package/dist/components/documentation/index.d.ts +1 -1
- package/dist/components/documentation/index.js +69 -69
- package/dist/components/index.cjs +347 -231
- package/dist/components/index.d.cts +3 -1
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.js +138 -132
- package/dist/components/typography/Article.cjs +37 -16
- package/dist/components/typography/Article.js +74 -74
- package/dist/components/typography/Body.cjs +43 -21
- package/dist/components/typography/Body.d.cts +1 -1
- package/dist/components/typography/Body.d.ts +1 -1
- package/dist/components/typography/Body.js +67 -67
- package/dist/components/typography/BodyStrong.cjs +43 -21
- package/dist/components/typography/BodyStrong.d.cts +1 -1
- package/dist/components/typography/BodyStrong.d.ts +1 -1
- package/dist/components/typography/BodyStrong.js +67 -67
- package/dist/components/typography/Code.cjs +43 -21
- package/dist/components/typography/Code.d.cts +1 -1
- package/dist/components/typography/Code.d.ts +1 -1
- package/dist/components/typography/Code.js +67 -67
- package/dist/components/typography/Display.cjs +43 -21
- package/dist/components/typography/Display.d.cts +1 -1
- package/dist/components/typography/Display.d.ts +1 -1
- package/dist/components/typography/Display.js +67 -67
- package/dist/components/typography/Headline.cjs +43 -21
- package/dist/components/typography/Headline.d.cts +1 -1
- package/dist/components/typography/Headline.d.ts +1 -1
- package/dist/components/typography/Headline.js +67 -67
- package/dist/components/typography/Label.cjs +43 -21
- package/dist/components/typography/Label.d.cts +1 -1
- package/dist/components/typography/Label.d.ts +1 -1
- package/dist/components/typography/Label.js +67 -67
- package/dist/components/typography/LabelModerate.cjs +43 -21
- package/dist/components/typography/LabelModerate.d.cts +1 -1
- package/dist/components/typography/LabelModerate.d.ts +1 -1
- package/dist/components/typography/LabelModerate.js +67 -67
- package/dist/components/typography/LabelStrong.cjs +43 -21
- package/dist/components/typography/LabelStrong.d.cts +1 -1
- package/dist/components/typography/LabelStrong.d.ts +1 -1
- package/dist/components/typography/LabelStrong.js +67 -67
- package/dist/components/typography/Overline.cjs +43 -21
- package/dist/components/typography/Overline.d.cts +1 -1
- package/dist/components/typography/Overline.d.ts +1 -1
- package/dist/components/typography/Overline.js +67 -67
- package/dist/components/typography/Title.cjs +43 -21
- package/dist/components/typography/Title.d.cts +1 -1
- package/dist/components/typography/Title.d.ts +1 -1
- package/dist/components/typography/Title.js +67 -67
- package/dist/components/typography/index.cjs +43 -21
- package/dist/components/typography/index.d.cts +1 -1
- package/dist/components/typography/index.d.ts +1 -1
- package/dist/components/typography/index.js +86 -86
- package/dist/components/typography/renderTypography.cjs +43 -21
- package/dist/components/typography/renderTypography.d.cts +1 -1
- package/dist/components/typography/renderTypography.d.ts +1 -1
- package/dist/components/typography/renderTypography.js +77 -77
- package/dist/hooks/useDocumentTitle.cjs +56 -0
- package/dist/hooks/useDocumentTitle.d.cts +3 -0
- package/dist/hooks/useDocumentTitle.d.ts +3 -0
- package/dist/hooks/useDocumentTitle.js +20 -0
- package/dist/hooks/useIsomorphicLayoutEffect.cjs +41 -0
- package/dist/hooks/useIsomorphicLayoutEffect.d.cts +5 -0
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts +5 -0
- package/dist/hooks/useIsomorphicLayoutEffect.js +7 -0
- package/dist/icons/ArrowUpRightCircleFill.cjs +2 -2
- package/dist/icons/ArrowUpRightCircleFill.js +1 -1
- package/dist/icons/Figma.cjs +2 -2
- package/dist/icons/Figma.js +1 -1
- package/dist/icons/index.cjs +4 -4
- package/dist/icons/index.js +121 -121
- package/dist/router.js +2 -2
- package/dist/styles/buttons.cjs +17 -2
- package/dist/styles/buttons.d.cts +1 -1
- package/dist/styles/buttons.d.ts +1 -1
- package/dist/styles/buttons.js +1 -1
- package/dist/styles/colors.cjs +1 -1
- package/dist/styles/colors.d.cts +1 -1
- package/dist/styles/colors.d.ts +1 -1
- package/dist/styles/colors.js +1 -1
- package/dist/styles/common.cjs +41 -19
- package/dist/styles/common.d.cts +3 -2
- package/dist/styles/common.d.ts +3 -2
- package/dist/styles/common.js +4 -4
- package/dist/styles/fields.cjs +38 -17
- package/dist/styles/fields.d.cts +1 -1
- package/dist/styles/fields.d.ts +1 -1
- package/dist/styles/fields.js +6 -6
- package/dist/styles/global.cjs +37 -16
- package/dist/styles/global.d.cts +1 -1
- package/dist/styles/global.d.ts +1 -1
- package/dist/styles/global.js +5 -5
- package/dist/styles/themes.cjs +37 -16
- package/dist/styles/themes.d.cts +1 -1
- package/dist/styles/themes.d.ts +1 -1
- package/dist/styles/themes.js +3 -3
- package/dist/styles/type.d.cts +1 -1
- package/dist/styles/type.d.ts +1 -1
- package/dist/styles/type.js +6 -6
- package/dist/styles/typography.cjs +37 -16
- package/dist/styles/typography.d.cts +1 -1
- package/dist/styles/typography.d.ts +1 -1
- package/dist/styles/typography.js +4 -4
- package/dist/styles/utils.js +5 -5
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/toNonTypographicReactNodes.cjs +43 -21
- package/dist/utils/toNonTypographicReactNodes.d.cts +2 -1
- package/dist/utils/toNonTypographicReactNodes.d.ts +2 -1
- package/dist/utils/toNonTypographicReactNodes.js +65 -65
- package/dist/utils/toReactNodes.cjs +43 -21
- package/dist/utils/toReactNodes.d.cts +1 -1
- package/dist/utils/toReactNodes.d.ts +1 -1
- package/dist/utils/toReactNodes.js +78 -78
- package/package.json +1 -1
|
@@ -147,7 +147,7 @@ var colors = baseColors;
|
|
|
147
147
|
function isColorKey(key) {
|
|
148
148
|
return key in colors;
|
|
149
149
|
}
|
|
150
|
-
function hcNeutralFromBg(bgHex, defaultHex, altHex) {
|
|
150
|
+
function hcNeutralFromBg(bgHex, defaultHex = colors.black, altHex = colors.white) {
|
|
151
151
|
const bgRGB = hexToRGB(bgHex);
|
|
152
152
|
const hcRGB = hexToRGB(defaultHex);
|
|
153
153
|
if (!bgRGB || !hcRGB)
|
|
@@ -181,128 +181,15 @@ function hexToRGB(hex) {
|
|
|
181
181
|
] : [0, 0, 0];
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
// src/styles/z-index.tsx
|
|
185
|
-
var z = {
|
|
186
|
-
card: 1,
|
|
187
|
-
fieldError: 1,
|
|
188
|
-
textInput: 2,
|
|
189
|
-
select: 3,
|
|
190
|
-
selectFocused: 4,
|
|
191
|
-
walletActionPreviewTopGradient: 1,
|
|
192
|
-
headerContainer: 99,
|
|
193
|
-
smBanner: 99,
|
|
194
|
-
headerTop: 100,
|
|
195
|
-
navMenu: 100,
|
|
196
|
-
smNavMenu: 100,
|
|
197
|
-
navAction: 101,
|
|
198
|
-
smNavAction: 100,
|
|
199
|
-
// keep under navDropdown
|
|
200
|
-
notificationBanner: 170,
|
|
201
|
-
qrReaderVideo: 180,
|
|
202
|
-
qrReaderOverlay: 181,
|
|
203
|
-
modalOverlay: 190,
|
|
204
|
-
modalContainer: 191,
|
|
205
|
-
dropdown: 192,
|
|
206
|
-
tooltip: 193,
|
|
207
|
-
toast: 200
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
// src/components/Button.tsx
|
|
211
|
-
var import_react24 = require("@emotion/react");
|
|
212
|
-
var import_styled15 = __toESM(require("@emotion/styled"), 1);
|
|
213
|
-
var import_lodash_es4 = require("lodash-es");
|
|
214
|
-
var import_react25 = require("react");
|
|
215
|
-
|
|
216
|
-
// src/router.tsx
|
|
217
|
-
var import_lodash_es = require("lodash-es");
|
|
218
|
-
var import_react = require("react");
|
|
219
|
-
var import_react_router_dom = require("react-router-dom");
|
|
220
|
-
|
|
221
|
-
// src/utils/strings.tsx
|
|
222
|
-
function isString(str) {
|
|
223
|
-
return typeof str === "string";
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
// src/router.tsx
|
|
227
|
-
var import_jsx_runtime = require("@emotion/react/jsx-runtime");
|
|
228
|
-
function replaceParams(to, params) {
|
|
229
|
-
if (params) {
|
|
230
|
-
let toWithParams = to;
|
|
231
|
-
Object.entries((0, import_lodash_es.omit)(params, "query")).forEach(([key, value]) => {
|
|
232
|
-
if (typeof value !== "string") {
|
|
233
|
-
throw new Error(
|
|
234
|
-
`Only 'query' may be an object. Route params must be a string, but '${key}' is not.`
|
|
235
|
-
);
|
|
236
|
-
}
|
|
237
|
-
toWithParams = toWithParams.replace(`:${key}`, value);
|
|
238
|
-
});
|
|
239
|
-
if (params.query) {
|
|
240
|
-
let query = params.query;
|
|
241
|
-
if (typeof query !== "string") {
|
|
242
|
-
query = Object.entries(params.query).map(([key, value]) => `${key}${value ? `=${value}` : ""}`).join("&");
|
|
243
|
-
}
|
|
244
|
-
toWithParams = `${toWithParams}?${query}`;
|
|
245
|
-
}
|
|
246
|
-
to = toWithParams;
|
|
247
|
-
}
|
|
248
|
-
return to;
|
|
249
|
-
}
|
|
250
|
-
function Link({
|
|
251
|
-
to,
|
|
252
|
-
id,
|
|
253
|
-
externalLink,
|
|
254
|
-
params,
|
|
255
|
-
children,
|
|
256
|
-
css: css6,
|
|
257
|
-
onClick,
|
|
258
|
-
className,
|
|
259
|
-
hash = null,
|
|
260
|
-
blue = false,
|
|
261
|
-
newTab = false
|
|
262
|
-
}) {
|
|
263
|
-
if (!isString(to) && !externalLink && !onClick) {
|
|
264
|
-
throw new Error(
|
|
265
|
-
"Link must have either `to` or `externalLink` or `onClick` defined"
|
|
266
|
-
);
|
|
267
|
-
}
|
|
268
|
-
let toStr;
|
|
269
|
-
if (isString(to)) {
|
|
270
|
-
toStr = replaceParams(to, params);
|
|
271
|
-
toStr += hash ? `#${hash}` : "";
|
|
272
|
-
} else if (externalLink) {
|
|
273
|
-
const definedExternalLink = externalLink;
|
|
274
|
-
if (!definedExternalLink.startsWith("http")) {
|
|
275
|
-
throw new Error("Link's externalLink must start with http");
|
|
276
|
-
}
|
|
277
|
-
toStr = definedExternalLink;
|
|
278
|
-
} else {
|
|
279
|
-
toStr = "#";
|
|
280
|
-
}
|
|
281
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
282
|
-
import_react_router_dom.Link,
|
|
283
|
-
{
|
|
284
|
-
to: toStr,
|
|
285
|
-
id,
|
|
286
|
-
css: css6,
|
|
287
|
-
onClick,
|
|
288
|
-
className,
|
|
289
|
-
style: { color: blue ? colors.blue43 : "inherit" },
|
|
290
|
-
target: newTab ? "_blank" : void 0,
|
|
291
|
-
rel: newTab ? "noopener noreferrer" : void 0,
|
|
292
|
-
children
|
|
293
|
-
}
|
|
294
|
-
);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
184
|
// src/styles/common.tsx
|
|
298
|
-
var
|
|
185
|
+
var import_react4 = require("@emotion/react");
|
|
299
186
|
var import_styled = __toESM(require("@emotion/styled"), 1);
|
|
300
187
|
|
|
301
188
|
// src/styles/breakpoints.tsx
|
|
302
|
-
var
|
|
303
|
-
var
|
|
304
|
-
var
|
|
305
|
-
var
|
|
189
|
+
var import_react = require("@emotion/react");
|
|
190
|
+
var import_lodash_es = require("lodash-es");
|
|
191
|
+
var import_react2 = require("react");
|
|
192
|
+
var import_jsx_runtime = require("@emotion/react/jsx-runtime");
|
|
306
193
|
var Breakpoints = /* @__PURE__ */ ((Breakpoints2) => {
|
|
307
194
|
Breakpoints2["sm"] = "sm";
|
|
308
195
|
Breakpoints2["md"] = "md";
|
|
@@ -395,13 +282,14 @@ function inRange(currentBp, assertBp) {
|
|
|
395
282
|
}
|
|
396
283
|
|
|
397
284
|
// src/styles/themes.tsx
|
|
398
|
-
var
|
|
285
|
+
var import_react3 = require("@emotion/react");
|
|
399
286
|
var import_deepmerge = __toESM(require("deepmerge"), 1);
|
|
400
287
|
|
|
401
288
|
// src/styles/buttons.tsx
|
|
402
289
|
var buttonsThemeBase = {
|
|
403
290
|
defaultSize: "Small",
|
|
404
|
-
|
|
291
|
+
defaultTypographyType: "Body Strong",
|
|
292
|
+
defaultColor: "text",
|
|
405
293
|
defaultBorderRadius: 32,
|
|
406
294
|
defaultBorderWidth: 1,
|
|
407
295
|
defaultBackgroundColor: "bg",
|
|
@@ -425,6 +313,7 @@ var buttonsThemeBase = {
|
|
|
425
313
|
var defaultButtonsTheme = __spreadProps(__spreadValues({}, buttonsThemeBase), {
|
|
426
314
|
kinds: {
|
|
427
315
|
primary: {
|
|
316
|
+
defaultColor: "bg",
|
|
428
317
|
defaultBorderWidth: 0,
|
|
429
318
|
defaultBackgroundColor: "c9Neutral",
|
|
430
319
|
defaultBorderColor: "c9Neutral",
|
|
@@ -452,7 +341,20 @@ var defaultButtonsTheme = __spreadProps(__spreadValues({}, buttonsThemeBase), {
|
|
|
452
341
|
defaultHoverBorderColor: ["gray90", "gray20"]
|
|
453
342
|
},
|
|
454
343
|
blue39: {
|
|
455
|
-
defaultBorderColor: "blue39"
|
|
344
|
+
defaultBorderColor: "blue39",
|
|
345
|
+
defaultColor: "gray98"
|
|
346
|
+
},
|
|
347
|
+
blue43: {
|
|
348
|
+
defaultColor: "white"
|
|
349
|
+
},
|
|
350
|
+
green33: {
|
|
351
|
+
defaultColor: "white"
|
|
352
|
+
},
|
|
353
|
+
purple55: {
|
|
354
|
+
defaultColor: "white"
|
|
355
|
+
},
|
|
356
|
+
danger: {
|
|
357
|
+
defaultColor: "white"
|
|
456
358
|
}
|
|
457
359
|
}
|
|
458
360
|
});
|
|
@@ -3695,7 +3597,8 @@ var baseThemeColors = {
|
|
|
3695
3597
|
success: colors.success,
|
|
3696
3598
|
text: colors.black,
|
|
3697
3599
|
vlcNeutral: colors.gray95,
|
|
3698
|
-
warning: colors.warning
|
|
3600
|
+
warning: colors.warning,
|
|
3601
|
+
inputBackground: colors.white
|
|
3699
3602
|
};
|
|
3700
3603
|
var themeOrColorKeyValues = [
|
|
3701
3604
|
...Object.keys(baseThemeColors),
|
|
@@ -3743,7 +3646,8 @@ var darkBaseTheme = {
|
|
|
3743
3646
|
vlcNeutral: colors.gray20,
|
|
3744
3647
|
warning: colors.warning,
|
|
3745
3648
|
buttons: defaultButtonsTheme,
|
|
3746
|
-
loading: "LoadingSpinner"
|
|
3649
|
+
loading: "LoadingSpinner",
|
|
3650
|
+
inputBackground: colors.black
|
|
3747
3651
|
};
|
|
3748
3652
|
var lightTheme = extend(lightBaseTheme, {
|
|
3749
3653
|
header: extendBase(lightBaseTheme, {
|
|
@@ -3782,6 +3686,7 @@ var umameDocsLightTheme = extend(lightTheme, {
|
|
|
3782
3686
|
secondary: colors.grayBlue43,
|
|
3783
3687
|
text: colors.grayBlue9,
|
|
3784
3688
|
link: colors.blue39,
|
|
3689
|
+
inputBackground: colors.white,
|
|
3785
3690
|
typography: getTypography("UmameDocs" /* UmameDocs */, {
|
|
3786
3691
|
main: "Manrope",
|
|
3787
3692
|
code: "Monaco"
|
|
@@ -3826,28 +3731,30 @@ var bridgeBaseSettings = {
|
|
|
3826
3731
|
code: "Monaco"
|
|
3827
3732
|
}),
|
|
3828
3733
|
buttons: (0, import_deepmerge.default)(buttonsThemeBase, {
|
|
3829
|
-
|
|
3734
|
+
defaultTypographyType: "Title",
|
|
3830
3735
|
defaultSize: "Medium",
|
|
3831
3736
|
defaultBorderRadius: 8,
|
|
3832
3737
|
defaultBorderWidth: 0,
|
|
3738
|
+
defaultPaddingsY: {
|
|
3739
|
+
ExtraSmall: 14,
|
|
3740
|
+
Small: 14,
|
|
3741
|
+
Schmedium: 14,
|
|
3742
|
+
Medium: 14,
|
|
3743
|
+
Mlarge: 14,
|
|
3744
|
+
Large: 14
|
|
3745
|
+
},
|
|
3833
3746
|
kinds: {
|
|
3834
3747
|
primary: {
|
|
3748
|
+
defaultColor: "bg",
|
|
3835
3749
|
defaultBackgroundColor: "blue39",
|
|
3836
3750
|
defaultHoverBackgroundColor: "blue37"
|
|
3837
3751
|
},
|
|
3838
3752
|
ghost: {
|
|
3753
|
+
defaultColor: "secondary",
|
|
3839
3754
|
defaultBackgroundColor: "transparent",
|
|
3840
3755
|
defaultBorderWidth: 0,
|
|
3841
3756
|
defaultHoverBackgroundColor: "transparent",
|
|
3842
|
-
defaultHoverBorderColor: "transparent"
|
|
3843
|
-
defaultPaddingsY: {
|
|
3844
|
-
ExtraSmall: 0,
|
|
3845
|
-
Small: 0,
|
|
3846
|
-
Schmedium: 0,
|
|
3847
|
-
Medium: 0,
|
|
3848
|
-
Mlarge: 0,
|
|
3849
|
-
Large: 0
|
|
3850
|
-
}
|
|
3757
|
+
defaultHoverBorderColor: "transparent"
|
|
3851
3758
|
},
|
|
3852
3759
|
secondary: {
|
|
3853
3760
|
defaultBackgroundColor: "transparent",
|
|
@@ -3864,7 +3771,8 @@ var bridgeLightTheme = extend(lightTheme, __spreadProps(__spreadValues({}, bridg
|
|
|
3864
3771
|
bg: colors.gray98,
|
|
3865
3772
|
smBg: colors.gray98,
|
|
3866
3773
|
text: colors.grayBlue9,
|
|
3867
|
-
secondary: colors.grayBlue43
|
|
3774
|
+
secondary: colors.grayBlue43,
|
|
3775
|
+
inputBackground: colors.white
|
|
3868
3776
|
}));
|
|
3869
3777
|
var bridgeDarkTheme = extend(darkTheme, __spreadProps(__spreadValues({}, bridgeBaseSettings), {
|
|
3870
3778
|
type: "bridgeDark" /* BridgeDark */
|
|
@@ -3939,21 +3847,21 @@ var themeOr = (lightValue, darkValue) => ({ theme }) => {
|
|
|
3939
3847
|
var rootFontSizePx = 12;
|
|
3940
3848
|
var rootFontSizeRems = rootFontSizePx / 16;
|
|
3941
3849
|
function buildStandardContentInset(smPx, minSmMaxLgPx, lgPx) {
|
|
3942
|
-
const smCSS =
|
|
3850
|
+
const smCSS = import_react4.css`
|
|
3943
3851
|
${bp.sm(`
|
|
3944
3852
|
margin-left: auto;
|
|
3945
3853
|
margin-right: auto;
|
|
3946
3854
|
width: calc(100% - ${smPx * 2}px);
|
|
3947
3855
|
`)}
|
|
3948
3856
|
`;
|
|
3949
|
-
const minSmMaxLgCSS =
|
|
3857
|
+
const minSmMaxLgCSS = import_react4.css`
|
|
3950
3858
|
${bp.minSmMaxLg(`
|
|
3951
3859
|
margin-left: auto;
|
|
3952
3860
|
margin-right: auto;
|
|
3953
3861
|
width: calc(100% - ${minSmMaxLgPx * 2}px);
|
|
3954
3862
|
`)}
|
|
3955
3863
|
`;
|
|
3956
|
-
const lgCSS =
|
|
3864
|
+
const lgCSS = import_react4.css`
|
|
3957
3865
|
${bp.lg(`
|
|
3958
3866
|
margin-left: auto;
|
|
3959
3867
|
margin-right: auto;
|
|
@@ -3968,7 +3876,7 @@ function buildStandardContentInset(smPx, minSmMaxLgPx, lgPx) {
|
|
|
3968
3876
|
smCSS,
|
|
3969
3877
|
minSmMaxLgCSS,
|
|
3970
3878
|
lgCSS,
|
|
3971
|
-
css:
|
|
3879
|
+
css: import_react4.css`
|
|
3972
3880
|
${lgCSS}
|
|
3973
3881
|
${smCSS}
|
|
3974
3882
|
${minSmMaxLgCSS}
|
|
@@ -3976,12 +3884,12 @@ function buildStandardContentInset(smPx, minSmMaxLgPx, lgPx) {
|
|
|
3976
3884
|
};
|
|
3977
3885
|
}
|
|
3978
3886
|
var standardContentInset = buildStandardContentInset(16, 24, 32);
|
|
3979
|
-
var standardCardShadow =
|
|
3887
|
+
var standardCardShadow = import_react4.css`
|
|
3980
3888
|
box-shadow:
|
|
3981
3889
|
0px 4px 10px 0px rgba(0, 0, 0, 0.08),
|
|
3982
3890
|
0px 8px 24px 0px rgba(0, 0, 0, 0.04);
|
|
3983
3891
|
`;
|
|
3984
|
-
var standardCardShadowHard =
|
|
3892
|
+
var standardCardShadowHard = import_react4.css`
|
|
3985
3893
|
box-shadow:
|
|
3986
3894
|
0px 24px 24px -12px rgba(0, 0, 0, 0.06),
|
|
3987
3895
|
0px 12px 12px -6px rgba(0, 0, 0, 0.06),
|
|
@@ -3999,7 +3907,7 @@ var getFocusOutline = ({
|
|
|
3999
3907
|
onBgHex
|
|
4000
3908
|
}) => `${onBgHex ? theme.hcNeutralFromBg(onBgHex) : theme.hcNeutral} dashed 1px`;
|
|
4001
3909
|
var outlineOffset = "-2px";
|
|
4002
|
-
var standardFocusOutline = ({ theme }) =>
|
|
3910
|
+
var standardFocusOutline = ({ theme }) => import_react4.css`
|
|
4003
3911
|
&,
|
|
4004
3912
|
& a,
|
|
4005
3913
|
& button {
|
|
@@ -4009,30 +3917,31 @@ var standardFocusOutline = ({ theme }) => import_react5.css`
|
|
|
4009
3917
|
}
|
|
4010
3918
|
}
|
|
4011
3919
|
`;
|
|
4012
|
-
var subtext = ({ theme }) =>
|
|
3920
|
+
var subtext = ({ theme }) => import_react4.css`
|
|
4013
3921
|
color: ${theme.c6Neutral};
|
|
4014
3922
|
font-weight: 600;
|
|
4015
3923
|
`;
|
|
4016
3924
|
var Subtext = import_styled.default.div`
|
|
4017
3925
|
${subtext}
|
|
4018
3926
|
`;
|
|
4019
|
-
var darkGradientBg =
|
|
3927
|
+
var darkGradientBg = import_react4.css`
|
|
4020
3928
|
background: ${darkGradient};
|
|
4021
3929
|
`;
|
|
4022
3930
|
var overlaySurfaceBorderColor = ({
|
|
4023
3931
|
theme,
|
|
4024
3932
|
important = false
|
|
4025
|
-
}) =>
|
|
3933
|
+
}) => import_react4.css`
|
|
4026
3934
|
border-color: ${themeOr(theme.c1Neutral, theme.c3Neutral)({ theme })}
|
|
4027
3935
|
${important ? "!important" : ""};
|
|
4028
3936
|
`;
|
|
4029
3937
|
var overlaySurface = ({
|
|
4030
3938
|
theme,
|
|
4031
|
-
important = false
|
|
4032
|
-
|
|
4033
|
-
|
|
3939
|
+
important = false,
|
|
3940
|
+
border = true
|
|
3941
|
+
}) => import_react4.css`
|
|
3942
|
+
background-color: ${themeOr(theme.bg, theme.c1Neutral)({ theme })}
|
|
4034
3943
|
${important ? "!important" : ""};
|
|
4035
|
-
border: 0.5px solid ${important ? "!important" : ""}
|
|
3944
|
+
${border ? `border: 0.5px solid ${important ? "!important" : ""};` : ""}
|
|
4036
3945
|
${overlaySurfaceBorderColor({ theme, important })};
|
|
4037
3946
|
${themeOr(
|
|
4038
3947
|
`box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.08), 0px 1px 4px rgba(0, 0, 0, 0.1) ${important ? "!important" : ""};`,
|
|
@@ -4040,6 +3949,119 @@ var overlaySurface = ({
|
|
|
4040
3949
|
)({ theme })}
|
|
4041
3950
|
`;
|
|
4042
3951
|
|
|
3952
|
+
// src/styles/z-index.tsx
|
|
3953
|
+
var z = {
|
|
3954
|
+
card: 1,
|
|
3955
|
+
fieldError: 1,
|
|
3956
|
+
textInput: 2,
|
|
3957
|
+
select: 3,
|
|
3958
|
+
selectFocused: 4,
|
|
3959
|
+
walletActionPreviewTopGradient: 1,
|
|
3960
|
+
headerContainer: 99,
|
|
3961
|
+
smBanner: 99,
|
|
3962
|
+
headerTop: 100,
|
|
3963
|
+
navMenu: 100,
|
|
3964
|
+
smNavMenu: 100,
|
|
3965
|
+
navAction: 101,
|
|
3966
|
+
smNavAction: 100,
|
|
3967
|
+
// keep under navDropdown
|
|
3968
|
+
notificationBanner: 170,
|
|
3969
|
+
qrReaderVideo: 180,
|
|
3970
|
+
qrReaderOverlay: 181,
|
|
3971
|
+
modalOverlay: 190,
|
|
3972
|
+
modalContainer: 191,
|
|
3973
|
+
dropdown: 192,
|
|
3974
|
+
tooltip: 193,
|
|
3975
|
+
toast: 200
|
|
3976
|
+
};
|
|
3977
|
+
|
|
3978
|
+
// src/components/Button.tsx
|
|
3979
|
+
var import_react24 = require("@emotion/react");
|
|
3980
|
+
var import_styled15 = __toESM(require("@emotion/styled"), 1);
|
|
3981
|
+
var import_lodash_es4 = require("lodash-es");
|
|
3982
|
+
var import_react25 = require("react");
|
|
3983
|
+
|
|
3984
|
+
// src/router.tsx
|
|
3985
|
+
var import_lodash_es2 = require("lodash-es");
|
|
3986
|
+
var import_react5 = require("react");
|
|
3987
|
+
var import_react_router_dom = require("react-router-dom");
|
|
3988
|
+
|
|
3989
|
+
// src/utils/strings.tsx
|
|
3990
|
+
function isString(str) {
|
|
3991
|
+
return typeof str === "string";
|
|
3992
|
+
}
|
|
3993
|
+
|
|
3994
|
+
// src/router.tsx
|
|
3995
|
+
var import_jsx_runtime2 = require("@emotion/react/jsx-runtime");
|
|
3996
|
+
function replaceParams(to, params) {
|
|
3997
|
+
if (params) {
|
|
3998
|
+
let toWithParams = to;
|
|
3999
|
+
Object.entries((0, import_lodash_es2.omit)(params, "query")).forEach(([key, value]) => {
|
|
4000
|
+
if (typeof value !== "string") {
|
|
4001
|
+
throw new Error(
|
|
4002
|
+
`Only 'query' may be an object. Route params must be a string, but '${key}' is not.`
|
|
4003
|
+
);
|
|
4004
|
+
}
|
|
4005
|
+
toWithParams = toWithParams.replace(`:${key}`, value);
|
|
4006
|
+
});
|
|
4007
|
+
if (params.query) {
|
|
4008
|
+
let query = params.query;
|
|
4009
|
+
if (typeof query !== "string") {
|
|
4010
|
+
query = Object.entries(params.query).map(([key, value]) => `${key}${value ? `=${value}` : ""}`).join("&");
|
|
4011
|
+
}
|
|
4012
|
+
toWithParams = `${toWithParams}?${query}`;
|
|
4013
|
+
}
|
|
4014
|
+
to = toWithParams;
|
|
4015
|
+
}
|
|
4016
|
+
return to;
|
|
4017
|
+
}
|
|
4018
|
+
function Link({
|
|
4019
|
+
to,
|
|
4020
|
+
id,
|
|
4021
|
+
externalLink,
|
|
4022
|
+
params,
|
|
4023
|
+
children,
|
|
4024
|
+
css: css6,
|
|
4025
|
+
onClick,
|
|
4026
|
+
className,
|
|
4027
|
+
hash = null,
|
|
4028
|
+
blue = false,
|
|
4029
|
+
newTab = false
|
|
4030
|
+
}) {
|
|
4031
|
+
if (!isString(to) && !externalLink && !onClick) {
|
|
4032
|
+
throw new Error(
|
|
4033
|
+
"Link must have either `to` or `externalLink` or `onClick` defined"
|
|
4034
|
+
);
|
|
4035
|
+
}
|
|
4036
|
+
let toStr;
|
|
4037
|
+
if (isString(to)) {
|
|
4038
|
+
toStr = replaceParams(to, params);
|
|
4039
|
+
toStr += hash ? `#${hash}` : "";
|
|
4040
|
+
} else if (externalLink) {
|
|
4041
|
+
const definedExternalLink = externalLink;
|
|
4042
|
+
if (!definedExternalLink.startsWith("http")) {
|
|
4043
|
+
throw new Error("Link's externalLink must start with http");
|
|
4044
|
+
}
|
|
4045
|
+
toStr = definedExternalLink;
|
|
4046
|
+
} else {
|
|
4047
|
+
toStr = "#";
|
|
4048
|
+
}
|
|
4049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
4050
|
+
import_react_router_dom.Link,
|
|
4051
|
+
{
|
|
4052
|
+
to: toStr,
|
|
4053
|
+
id,
|
|
4054
|
+
css: css6,
|
|
4055
|
+
onClick,
|
|
4056
|
+
className,
|
|
4057
|
+
style: { color: blue ? colors.blue43 : "inherit" },
|
|
4058
|
+
target: newTab ? "_blank" : void 0,
|
|
4059
|
+
rel: newTab ? "noopener noreferrer" : void 0,
|
|
4060
|
+
children
|
|
4061
|
+
}
|
|
4062
|
+
);
|
|
4063
|
+
}
|
|
4064
|
+
|
|
4043
4065
|
// src/styles/typography.tsx
|
|
4044
4066
|
var applyTypography = (theme, typographyType, size, color = "inherit", applyToAll = true) => {
|
|
4045
4067
|
const selector = applyToAll ? "&, & *" : "&";
|
|
@@ -4499,8 +4521,8 @@ function ArrowUpRightCircleFill() {
|
|
|
4499
4521
|
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
4500
4522
|
"path",
|
|
4501
4523
|
{
|
|
4502
|
-
|
|
4503
|
-
|
|
4524
|
+
fillRule: "evenodd",
|
|
4525
|
+
clipRule: "evenodd",
|
|
4504
4526
|
d: "M20 1.25C30.3553 1.25 38.75 9.64468 38.75 20C38.75 30.3553 30.3553 38.75 20 38.75C9.64468 38.75 1.25 30.3553 1.25 20C1.25 9.64468 9.64468 1.25 20 1.25ZM15.4392 12.4122C14.8869 12.4122 14.4392 12.8599 14.4392 13.4122C14.4392 13.9644 14.8869 14.4122 15.4392 14.4122H24.1736L12.7051 25.8807C12.3146 26.2713 12.3146 26.9044 12.7051 27.2949C13.0956 27.6855 13.7288 27.6855 14.1193 27.2949L25.5879 15.8263V24.5608C25.5879 25.1131 26.0356 25.5608 26.5879 25.5608C27.1402 25.5608 27.5879 25.1131 27.5879 24.5608V13.4122C27.5879 12.8599 27.1402 12.4122 26.5879 12.4122H15.4392Z",
|
|
4505
4527
|
fill: "black"
|
|
4506
4528
|
}
|
|
@@ -5401,8 +5423,8 @@ function Figma() {
|
|
|
5401
5423
|
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
5402
5424
|
"path",
|
|
5403
5425
|
{
|
|
5404
|
-
|
|
5405
|
-
|
|
5426
|
+
fillRule: "evenodd",
|
|
5427
|
+
clipRule: "evenodd",
|
|
5406
5428
|
d: "M8.01074 9.04831C8.01074 5.43178 10.9425 2.5 14.5591 2.5L25.7952 2.5C29.4118 2.5 32.3435 5.43178 32.3435 9.04831C32.3435 11.3383 31.1681 13.3537 29.3876 14.5242C31.1681 15.6947 32.3435 17.7102 32.3435 20.0001C32.3435 23.6167 29.4118 26.5485 25.7952 26.5485H25.653C23.9575 26.5485 22.4126 25.9041 21.2496 24.847V30.8806C21.2496 34.5453 18.2412 37.5 14.5944 37.5C10.9868 37.5 8.01074 34.5772 8.01074 30.9517C8.01074 28.6617 9.18619 26.6463 10.9666 25.476C9.18618 24.3055 8.01074 22.2901 8.01074 20.0001C8.01074 17.7102 9.1862 15.6947 10.9667 14.5242C9.18621 13.3537 8.01074 11.3383 8.01074 9.04831ZM14.5591 13.4517C12.1272 13.4517 10.1557 11.4802 10.1557 9.04831C10.1557 6.61641 12.1272 4.64497 14.5591 4.64497L19.1047 4.64497V13.4517H14.5591ZM19.1047 15.5966H14.5591C12.1272 15.5966 10.1557 17.5682 10.1557 20.0001C10.1557 22.4321 12.1272 24.4035 14.5591 24.4035H19.1047V15.5966ZM19.1047 26.5485H14.5591C12.1271 26.5485 10.1557 28.5198 10.1557 30.9517C10.1557 33.3746 12.1535 35.355 14.5944 35.355C17.0746 35.355 19.1047 33.3428 19.1047 30.8806V26.5485ZM25.7952 15.5966L25.653 15.5968C23.2211 15.5968 21.2496 17.5682 21.2496 20.0001C21.2496 22.4321 23.2211 24.4035 25.653 24.4035H25.7952C28.2271 24.4035 30.1986 22.4321 30.1986 20.0001C30.1986 17.5682 28.227 15.5967 25.7952 15.5966C25.7953 15.5966 25.7952 15.5966 25.7952 15.5966ZM25.7952 14.5242V13.4517H21.2496V4.64497H25.7952C28.2271 4.64497 30.1986 6.61641 30.1986 9.04831C30.1986 11.4802 28.2271 13.4517 25.7952 13.4517",
|
|
5407
5429
|
fill: "black"
|
|
5408
5430
|
}
|
|
@@ -7941,7 +7963,7 @@ var IconContainer = import_styled2.default.span`
|
|
|
7941
7963
|
${({ theme, fontColor }) => {
|
|
7942
7964
|
const color = getFontColor(theme, fontColor, "inherit");
|
|
7943
7965
|
return `
|
|
7944
|
-
|
|
7966
|
+
svg, path {
|
|
7945
7967
|
color: ${getFontColor(theme, fontColor, "inherit")};
|
|
7946
7968
|
|
|
7947
7969
|
/*
|
|
@@ -8151,6 +8173,7 @@ function toNonTypographicReactNodes(toNonTypographicReactNodesArg) {
|
|
|
8151
8173
|
Link,
|
|
8152
8174
|
{
|
|
8153
8175
|
to: node.to,
|
|
8176
|
+
newTab: !!node.newTab,
|
|
8154
8177
|
children: node.text
|
|
8155
8178
|
},
|
|
8156
8179
|
`link-${i}-${node.text.substr(0, 10)}`
|
|
@@ -8448,22 +8471,6 @@ var renderTypography = (type, props) => {
|
|
|
8448
8471
|
|
|
8449
8472
|
// src/components/Button.tsx
|
|
8450
8473
|
var import_jsx_runtime131 = require("@emotion/react/jsx-runtime");
|
|
8451
|
-
function getDefaultTextColor({ kind }) {
|
|
8452
|
-
switch (kind) {
|
|
8453
|
-
case "blue43":
|
|
8454
|
-
case "green33":
|
|
8455
|
-
case "purple55":
|
|
8456
|
-
case "danger":
|
|
8457
|
-
return "white";
|
|
8458
|
-
case "blue39":
|
|
8459
|
-
return "gray98";
|
|
8460
|
-
case "primary": {
|
|
8461
|
-
return "bg";
|
|
8462
|
-
}
|
|
8463
|
-
default:
|
|
8464
|
-
return "text";
|
|
8465
|
-
}
|
|
8466
|
-
}
|
|
8467
8474
|
var roundPaddingsX = {
|
|
8468
8475
|
[TokenSize.ExtraSmall]: 10,
|
|
8469
8476
|
[TokenSize.Small]: 10,
|
|
@@ -8486,7 +8493,7 @@ function getPaddingX(size, kind, isRound) {
|
|
|
8486
8493
|
function getPadding({ paddingY, kind, size, iconSide, isRound }) {
|
|
8487
8494
|
const paddingX = getPaddingX(size, kind, isRound);
|
|
8488
8495
|
const paddingForIcon = 0;
|
|
8489
|
-
return `${paddingY}px ${paddingX + (iconSide === "right" ? paddingForIcon : 0)}px ${paddingY}px ${paddingX + (iconSide === "left" ? paddingForIcon : 0)}px`;
|
|
8496
|
+
return kind === "ghost" ? 0 : `${paddingY}px ${paddingX + (iconSide === "right" ? paddingForIcon : 0)}px ${paddingY}px ${paddingX + (iconSide === "left" ? paddingForIcon : 0)}px`;
|
|
8490
8497
|
}
|
|
8491
8498
|
function resolveBackgroundColorKey(theme, kind, defaultKey) {
|
|
8492
8499
|
var _a;
|
|
@@ -8516,12 +8523,14 @@ function resolveProps(props, theme) {
|
|
|
8516
8523
|
kind = "secondary",
|
|
8517
8524
|
size: sizeProp,
|
|
8518
8525
|
paddingY: paddingYType = "regular",
|
|
8519
|
-
borderRadius
|
|
8526
|
+
borderRadius,
|
|
8527
|
+
typography: typographyProp
|
|
8520
8528
|
} = _a, rest = __objRest(_a, [
|
|
8521
8529
|
"kind",
|
|
8522
8530
|
"size",
|
|
8523
8531
|
"paddingY",
|
|
8524
|
-
"borderRadius"
|
|
8532
|
+
"borderRadius",
|
|
8533
|
+
"typography"
|
|
8525
8534
|
]);
|
|
8526
8535
|
const size = resolveProp(sizeProp, kind, "defaultSize", theme);
|
|
8527
8536
|
const defaultPaddingsY = resolveProp(null, kind, "defaultPaddingsY", theme);
|
|
@@ -8547,9 +8556,15 @@ function resolveProps(props, theme) {
|
|
|
8547
8556
|
kind,
|
|
8548
8557
|
"defaultHoverBorderColor"
|
|
8549
8558
|
);
|
|
8559
|
+
const typography = {
|
|
8560
|
+
type: (typographyProp == null ? void 0 : typographyProp.type) || resolveProp(null, kind, "defaultTypographyType", theme),
|
|
8561
|
+
color: (typographyProp == null ? void 0 : typographyProp.color) || resolveProp(null, kind, "defaultColor", theme),
|
|
8562
|
+
size
|
|
8563
|
+
};
|
|
8550
8564
|
return __spreadProps(__spreadValues({}, rest), {
|
|
8551
8565
|
kind,
|
|
8552
8566
|
size,
|
|
8567
|
+
typography,
|
|
8553
8568
|
paddingY: typeof defaultPaddingY === "number" ? defaultPaddingY : defaultPaddingY[paddingYType],
|
|
8554
8569
|
borderRadius: resolveProp(borderRadius, kind, "defaultBorderRadius", theme),
|
|
8555
8570
|
backgroundColor,
|
|
@@ -8593,12 +8608,6 @@ function Button(props) {
|
|
|
8593
8608
|
borderRadius
|
|
8594
8609
|
} = resolveProps(props, theme);
|
|
8595
8610
|
const tooltipId = (0, import_react25.useRef)((0, import_lodash_es4.uniqueId)());
|
|
8596
|
-
const fontColor = (typography == null ? void 0 : typography.color) || getDefaultTextColor({ kind, theme });
|
|
8597
|
-
const buttonTypography = {
|
|
8598
|
-
type: (typography == null ? void 0 : typography.type) || theme.buttons.defaultTypography,
|
|
8599
|
-
size,
|
|
8600
|
-
color: fontColor
|
|
8601
|
-
};
|
|
8602
8611
|
const iconSize = size === "ExtraSmall" ? 12 : 16;
|
|
8603
8612
|
let currentIcon = null;
|
|
8604
8613
|
if (loading) {
|
|
@@ -8607,7 +8616,7 @@ function Button(props) {
|
|
|
8607
8616
|
{
|
|
8608
8617
|
iconSide,
|
|
8609
8618
|
text,
|
|
8610
|
-
typography
|
|
8619
|
+
typography,
|
|
8611
8620
|
kind,
|
|
8612
8621
|
children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Loading, { size: iconSize, center: false })
|
|
8613
8622
|
}
|
|
@@ -8618,9 +8627,9 @@ function Button(props) {
|
|
|
8618
8627
|
{
|
|
8619
8628
|
iconSide,
|
|
8620
8629
|
text,
|
|
8621
|
-
typography
|
|
8630
|
+
typography,
|
|
8622
8631
|
kind,
|
|
8623
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Icon, { name: icon, width: iconSize, color:
|
|
8632
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Icon, { name: icon, width: iconSize, color: typography.color })
|
|
8624
8633
|
}
|
|
8625
8634
|
);
|
|
8626
8635
|
}
|
|
@@ -8643,10 +8652,10 @@ function Button(props) {
|
|
|
8643
8652
|
textOverflow: "ellipsis",
|
|
8644
8653
|
overflow: "hidden"
|
|
8645
8654
|
},
|
|
8646
|
-
children: renderTypography(
|
|
8655
|
+
children: renderTypography(typography.type, {
|
|
8647
8656
|
content: text,
|
|
8648
|
-
color:
|
|
8649
|
-
size
|
|
8657
|
+
color: typography.color,
|
|
8658
|
+
size
|
|
8650
8659
|
})
|
|
8651
8660
|
}
|
|
8652
8661
|
),
|
|
@@ -8661,7 +8670,7 @@ function Button(props) {
|
|
|
8661
8670
|
id,
|
|
8662
8671
|
kind,
|
|
8663
8672
|
type,
|
|
8664
|
-
typography
|
|
8673
|
+
typography,
|
|
8665
8674
|
onClick,
|
|
8666
8675
|
fullWidth,
|
|
8667
8676
|
iconSide,
|
|
@@ -8787,6 +8796,9 @@ var Drawer = (props) => {
|
|
|
8787
8796
|
const [grabbing, setGrabbing] = (0, import_react26.useState)(false);
|
|
8788
8797
|
const drawerContainerRef = (0, import_react26.useRef)(null);
|
|
8789
8798
|
const handleClose = () => {
|
|
8799
|
+
if (props.nonDismissable) {
|
|
8800
|
+
return;
|
|
8801
|
+
}
|
|
8790
8802
|
setIsOpen(false);
|
|
8791
8803
|
setTimeout(() => {
|
|
8792
8804
|
props.onClose && props.onClose();
|
|
@@ -8796,6 +8808,9 @@ var Drawer = (props) => {
|
|
|
8796
8808
|
};
|
|
8797
8809
|
const handleTouchMove = (event) => {
|
|
8798
8810
|
var _a, _b;
|
|
8811
|
+
if (props.nonDismissable) {
|
|
8812
|
+
return;
|
|
8813
|
+
}
|
|
8799
8814
|
if (lastY === null) {
|
|
8800
8815
|
setLastY(event.touches[0].clientY);
|
|
8801
8816
|
} else {
|
|
@@ -8812,9 +8827,15 @@ var Drawer = (props) => {
|
|
|
8812
8827
|
}
|
|
8813
8828
|
};
|
|
8814
8829
|
const handleTouchStart = () => {
|
|
8830
|
+
if (props.nonDismissable) {
|
|
8831
|
+
return;
|
|
8832
|
+
}
|
|
8815
8833
|
setGrabbing(true);
|
|
8816
8834
|
};
|
|
8817
8835
|
const handleTouchEnd = () => {
|
|
8836
|
+
if (props.nonDismissable) {
|
|
8837
|
+
return;
|
|
8838
|
+
}
|
|
8818
8839
|
setGrabbing(false);
|
|
8819
8840
|
if (fractionVisible < 0.8) {
|
|
8820
8841
|
handleClose();
|
|
@@ -8842,16 +8863,17 @@ var Drawer = (props) => {
|
|
|
8842
8863
|
grabbing,
|
|
8843
8864
|
ref: drawerContainerRef,
|
|
8844
8865
|
children: [
|
|
8845
|
-
props.grabber && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Grabber, { onClick: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(GrabberBar, {}) }),
|
|
8846
|
-
props.
|
|
8866
|
+
props.grabber && !props.nonDismissable && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Grabber, { onClick: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(GrabberBar, {}) }),
|
|
8867
|
+
props.handleBack && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(BackButtonContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
8847
8868
|
Button,
|
|
8848
8869
|
{
|
|
8849
|
-
onClick:
|
|
8850
|
-
icon: "
|
|
8870
|
+
onClick: props.handleBack,
|
|
8871
|
+
icon: "ChevronLeft",
|
|
8851
8872
|
kind: "ghost",
|
|
8852
|
-
size: "
|
|
8873
|
+
size: "Small"
|
|
8853
8874
|
}
|
|
8854
8875
|
) }),
|
|
8876
|
+
props.closeButton && !props.nonDismissable && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(CloseButtonContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(CloseButton, { onClick: handleClose, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Icon, { name: "Close", width: 12 }) }) }),
|
|
8855
8877
|
props.children
|
|
8856
8878
|
]
|
|
8857
8879
|
}
|
|
@@ -8884,6 +8906,7 @@ var Background = import_styled16.default.div`
|
|
|
8884
8906
|
`;
|
|
8885
8907
|
var DrawerContainer = import_styled16.default.div`
|
|
8886
8908
|
position: fixed;
|
|
8909
|
+
max-height: 100dvh;
|
|
8887
8910
|
width: 100%;
|
|
8888
8911
|
background-color: ${({ theme }) => theme.bg};
|
|
8889
8912
|
right: 0;
|
|
@@ -8894,6 +8917,7 @@ var DrawerContainer = import_styled16.default.div`
|
|
|
8894
8917
|
display: flex;
|
|
8895
8918
|
flex-direction: column;
|
|
8896
8919
|
padding: ${"72px" /* 6xl */} ${"32px" /* xl */} ${"40px" /* 2xl */} ${"32px" /* xl */};
|
|
8920
|
+
overflow-y: scroll;
|
|
8897
8921
|
|
|
8898
8922
|
// Only smooth transition when not grabbing, otherwise dragging will feel very laggy
|
|
8899
8923
|
${(props) => props.grabbing && props.isOpen ? "" : "transition: transform 0.3s ease-in-out;"};
|
|
@@ -8940,11 +8964,32 @@ var CloseButtonContainer = import_styled16.default.div`
|
|
|
8940
8964
|
border-radius: 50%;
|
|
8941
8965
|
background-color: ${colors.grayBlue94};
|
|
8942
8966
|
padding: ${"8px" /* xs */};
|
|
8967
|
+
height: 30px;
|
|
8968
|
+
width: 30px;
|
|
8969
|
+
display: flex;
|
|
8970
|
+
align-items: center;
|
|
8943
8971
|
|
|
8944
8972
|
* > * {
|
|
8945
8973
|
line-height: 14px;
|
|
8946
8974
|
}
|
|
8947
8975
|
`;
|
|
8976
|
+
var CloseButton = (0, import_styled16.default)(UnstyledButton)`
|
|
8977
|
+
${standardFocusOutline}
|
|
8978
|
+
width: 24px;
|
|
8979
|
+
height: 24px;
|
|
8980
|
+
justify-self: flex-end;
|
|
8981
|
+
`;
|
|
8982
|
+
var BackButtonContainer = import_styled16.default.div`
|
|
8983
|
+
position: absolute;
|
|
8984
|
+
top: 20px;
|
|
8985
|
+
left: 20px;
|
|
8986
|
+
border-radius: 50%;
|
|
8987
|
+
padding: ${"8px" /* xs */};
|
|
8988
|
+
height: 30px;
|
|
8989
|
+
width: 30px;
|
|
8990
|
+
display: flex;
|
|
8991
|
+
align-items: center;
|
|
8992
|
+
`;
|
|
8948
8993
|
var GrabberBar = import_styled16.default.div`
|
|
8949
8994
|
width: 36px;
|
|
8950
8995
|
height: 5px;
|