@lightsparkdev/ui 1.0.3 → 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 +6 -0
- package/dist/{chunk-X4TGLNCH.js → chunk-242JGEN4.js} +3 -3
- package/dist/{chunk-7N2PFDYE.js → chunk-2P6TCMZN.js} +2 -2
- package/dist/{chunk-K7FYXGOI.js → chunk-3R5KJDSL.js} +1 -1
- package/dist/{chunk-SNFRMD6Z.js → chunk-4BERRPJN.js} +3 -3
- package/dist/{chunk-LH7GLNMY.js → chunk-4KURUJD2.js} +1 -1
- package/dist/{chunk-XDP7GCYE.js → chunk-4X67A2CS.js} +1 -1
- package/dist/{chunk-QQSV7XJX.js → chunk-5F7IOIWL.js} +1 -1
- package/dist/{chunk-BENSR2YW.js → chunk-5ON3ICVC.js} +1 -1
- package/dist/{chunk-XB4KQFK2.js → chunk-642OXLAD.js} +2 -2
- package/dist/{chunk-BDZ46Z2I.js → chunk-7BSME2ZU.js} +2 -2
- package/dist/{chunk-2AGBCGOW.js → chunk-7COKMITX.js} +2 -2
- package/dist/{chunk-Y7RQUJUS.js → chunk-7OJQZEVL.js} +5 -5
- package/dist/{chunk-XM2HQVUK.js → chunk-7RLDCOUT.js} +4 -4
- package/dist/{chunk-6CNJ5ZCC.js → chunk-7RMHMFS2.js} +3 -3
- package/dist/{chunk-35PJW7RT.js → chunk-AZOVE32P.js} +2 -2
- package/dist/{chunk-BHP5YL2N.js → chunk-BAGRU7JE.js} +1 -1
- package/dist/{chunk-KX5QZXCD.js → chunk-BPGBJRZE.js} +1 -1
- package/dist/{chunk-YRNEIRHM.js → chunk-BRRDPQWW.js} +4 -4
- package/dist/{chunk-LOL5TJ3H.js → chunk-C3YODRA3.js} +15 -15
- package/dist/{chunk-2XUHQWCJ.js → chunk-C4HNAZFZ.js} +3 -3
- package/dist/{chunk-PG2W2HVB.js → chunk-CZFFMEAS.js} +1 -1
- package/dist/{chunk-MRGHRTKA.js → chunk-DIKOS5R6.js} +2 -2
- package/dist/{chunk-5TTLUOJ5.js → chunk-DNGAINGL.js} +1 -1
- package/dist/{chunk-J3YVJWRG.js → chunk-DWUP3RDU.js} +4 -4
- package/dist/chunk-E5DUKMCU.js +65 -0
- package/dist/chunk-EIFK352Q.js +27 -0
- package/dist/{chunk-UH5F35II.js → chunk-GLEAWATH.js} +3 -3
- package/dist/{chunk-7WDAN3OC.js → chunk-GQVNE3NU.js} +1 -1
- package/dist/{chunk-WGKUDRZ7.js → chunk-HPZVUEDJ.js} +2 -2
- package/dist/{chunk-GWHKALYQ.js → chunk-HVDX4OZJ.js} +2 -2
- package/dist/{chunk-LTCJ6LNO.js → chunk-JAPRGAB7.js} +1 -1
- package/dist/{chunk-JNNJVBHF.js → chunk-JH53NBOD.js} +13 -9
- package/dist/{chunk-BSH6WRUZ.js → chunk-KBLCFXNL.js} +3 -3
- package/dist/{chunk-LGKXPUSI.js → chunk-KJHREJHT.js} +2 -2
- package/dist/{chunk-E4DUADXU.js → chunk-LFD2KVAB.js} +1 -1
- package/dist/{chunk-VXKNN4SF.js → chunk-LGXMGWLV.js} +17 -16
- package/dist/{chunk-435FPPZK.js → chunk-LLGN3OM3.js} +2 -2
- package/dist/{chunk-MWDDIXIP.js → chunk-MK2JFFUG.js} +1 -1
- package/dist/{chunk-SLKPLSJU.js → chunk-MNMVZI7D.js} +10 -10
- package/dist/{chunk-WTMJTGW4.js → chunk-OMY3WTAU.js} +2 -2
- package/dist/{chunk-4C2TISN7.js → chunk-OUHQXQOJ.js} +1 -1
- package/dist/{chunk-CRTTTIAD.js → chunk-OZQ5WPLN.js} +2 -2
- package/dist/{chunk-7FHOKVKJ.js → chunk-PDQVYUEW.js} +6 -6
- package/dist/{chunk-ILEZ6AWT.js → chunk-QCHEDM2I.js} +3 -3
- package/dist/{chunk-DXA3WUSX.js → chunk-RESJONBZ.js} +2 -2
- package/dist/{chunk-7YY6BH5O.js → chunk-SZ4KKLYJ.js} +2 -2
- package/dist/{chunk-7IHNYMFQ.js → chunk-THTKSZSR.js} +2 -2
- package/dist/{chunk-I3FI3FNP.js → chunk-TNDSUTUN.js} +2 -2
- package/dist/{chunk-PQKVR2BR.js → chunk-TNISOOCF.js} +1 -1
- package/dist/{chunk-4BFBANKF.js → chunk-UNFCVZ32.js} +36 -33
- package/dist/{chunk-B6S7Y4K7.js → chunk-V523QTZQ.js} +2 -2
- package/dist/{chunk-IBZBPQMZ.js → chunk-VNQE6KEX.js} +13 -4
- package/dist/{chunk-HGOGF6I7.js → chunk-VR2GLRXH.js} +1 -1
- package/dist/chunk-VWD7T5MQ.js +74 -0
- package/dist/{chunk-54EOEIEN.js → chunk-VXH6GWGE.js} +2 -2
- package/dist/{chunk-4JHXRPRB.js → chunk-W2N5QUG6.js} +9 -6
- package/dist/{chunk-YIHC25WB.js → chunk-WDJMAZFO.js} +3 -3
- package/dist/{chunk-C4KZC45Y.js → chunk-XS4MH3QA.js} +54 -71
- package/dist/{chunk-OKXC33OU.js → chunk-YRFCWL73.js} +5 -2
- package/dist/{chunk-GSKTHUQJ.js → chunk-YRZ3VNBI.js} +2 -2
- package/dist/{chunk-N2NPIZCV.js → chunk-ZCXGHQQF.js} +9 -9
- package/dist/{chunk-LIQSJ5R7.js → chunk-ZO35RX7V.js} +21 -13
- package/dist/{chunk-RPNTFEXE.js → chunk-ZS7G6WIG.js} +1 -1
- package/dist/components/Badge.cjs +7781 -7417
- 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 +50 -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 +36 -24
- 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 +39 -27
- 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 +13 -4
- 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 +13 -4
- package/dist/components/CodeBlock.js +8 -8
- package/dist/components/CodeInput/CodeInput.cjs +13 -4
- package/dist/components/CodeInput/CodeInput.js +6 -6
- package/dist/components/CodeInput/SingleCodeInput.cjs +13 -4
- package/dist/components/CodeInput/SingleCodeInput.js +5 -5
- package/dist/components/Collapsible.cjs +78 -7
- package/dist/components/Collapsible.js +6 -6
- package/dist/components/CommaNumberInput.cjs +13 -4
- 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 +13 -4
- package/dist/components/ContentTable.js +4 -4
- package/dist/components/CopyToClipboardButton.cjs +13 -4
- package/dist/components/CopyToClipboardButton.js +6 -6
- package/dist/components/CurrencyAmount.cjs +13 -4
- package/dist/components/CurrencyAmount.js +4 -4
- package/dist/components/Drawer.cjs +118 -43
- package/dist/components/Drawer.js +22 -22
- package/dist/components/Dropdown.cjs +13 -4
- 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 +13 -4
- package/dist/components/FileInput.js +10 -10
- package/dist/components/GradientCardHeader.js +5 -5
- package/dist/components/Icon/Icon.cjs +13 -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 +7347 -7340
- package/dist/components/IconWithCircleBackground.js +4 -73
- package/dist/components/InfoIconTooltip.cjs +53 -29
- 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 +13 -4
- package/dist/components/LightsparkProvider.js +4 -4
- package/dist/components/Loading.cjs +13 -4
- package/dist/components/Loading.js +4 -4
- package/dist/components/Modal.cjs +202 -127
- package/dist/components/Modal.d.cts +9 -9
- package/dist/components/Modal.d.ts +9 -9
- package/dist/components/Modal.js +27 -68
- package/dist/components/PageSection/PageSection.cjs +205 -97
- 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 +45 -21
- package/dist/components/PageSection/PageSectionNav.js +20 -20
- package/dist/components/PhoneInput.cjs +13 -4
- 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 +13 -4
- package/dist/components/Pill.js +7 -7
- package/dist/components/ProgressBar.cjs +13 -4
- package/dist/components/ProgressBar.js +3 -3
- package/dist/components/Radio.cjs +7406 -7335
- package/dist/components/Radio.js +8 -22
- package/dist/components/SecretContainer.cjs +13 -4
- package/dist/components/SecretContainer.js +7 -7
- package/dist/components/StatusIndicator.js +4 -4
- package/dist/components/TextButton.cjs +41 -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 +35 -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 +13 -4
- 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 +61 -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 +105 -98
- package/dist/components/Toggle.js +4 -4
- package/dist/components/Tooltip.cjs +13 -4
- package/dist/components/Tooltip.js +3 -3
- package/dist/components/UnstyledButton.js +3 -3
- package/dist/components/documentation/AnchorLinkHeader.cjs +13 -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 +13 -4
- 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 +13 -4
- 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 +13 -4
- 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.js +2 -2
- package/dist/components/documentation/index.cjs +13 -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 +8341 -8176
- 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 +100 -29
- package/dist/components/typography/Article.js +14 -14
- package/dist/components/typography/Body.cjs +13 -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 +13 -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 +13 -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 +13 -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 +13 -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 +13 -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 +13 -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 +13 -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 +13 -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 +13 -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 +100 -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 +29 -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 +13 -4
- package/dist/styles/common.d.cts +1 -1
- package/dist/styles/common.d.ts +1 -1
- package/dist/styles/common.js +2 -2
- package/dist/styles/fields.cjs +13 -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 +13 -4
- 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 +13 -4
- 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 +13 -4
- 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-36cdd0fe.d.ts → themes-37e92940.d.ts} +91 -74
- package/dist/{buttons-35280bfe.d.ts → themes-832e46b2.d.ts} +91 -74
- package/dist/utils/toNonTypographicReactNodes.cjs +13 -4
- package/dist/utils/toNonTypographicReactNodes.d.cts +1 -1
- package/dist/utils/toNonTypographicReactNodes.d.ts +1 -1
- package/dist/utils/toNonTypographicReactNodes.js +4 -4
- package/dist/utils/toReactNodes.cjs +54 -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-SEZEDINC.js +0 -35
|
@@ -22,6 +22,18 @@ var __spreadValues = (a, b) => {
|
|
|
22
22
|
return a;
|
|
23
23
|
};
|
|
24
24
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __objRest = (source, exclude) => {
|
|
26
|
+
var target = {};
|
|
27
|
+
for (var prop in source)
|
|
28
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
if (source != null && __getOwnPropSymbols)
|
|
31
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
25
37
|
var __export = (target, all) => {
|
|
26
38
|
for (var name in all)
|
|
27
39
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -81,9 +93,9 @@ __export(PageSection_exports, {
|
|
|
81
93
|
StyledPageSectionBox: () => StyledPageSectionBox
|
|
82
94
|
});
|
|
83
95
|
module.exports = __toCommonJS(PageSection_exports);
|
|
84
|
-
var
|
|
96
|
+
var import_react31 = require("@emotion/react");
|
|
85
97
|
var import_styled20 = __toESM(require("@emotion/styled"), 1);
|
|
86
|
-
var
|
|
98
|
+
var import_react32 = require("react");
|
|
87
99
|
|
|
88
100
|
// src/styles/breakpoints.tsx
|
|
89
101
|
var import_react = require("@emotion/react");
|
|
@@ -3596,8 +3608,7 @@ var baseThemeColors = {
|
|
|
3596
3608
|
success: colors.success,
|
|
3597
3609
|
text: colors.black,
|
|
3598
3610
|
vlcNeutral: colors.gray95,
|
|
3599
|
-
warning: colors.warning
|
|
3600
|
-
inputBackground: colors.white
|
|
3611
|
+
warning: colors.warning
|
|
3601
3612
|
};
|
|
3602
3613
|
var themeOrColorKeyValues = [
|
|
3603
3614
|
...Object.keys(baseThemeColors),
|
|
@@ -3609,6 +3620,10 @@ var baseTheme = __spreadProps(__spreadValues({}, baseThemeColors), {
|
|
|
3609
3620
|
typography: getTypography("Lightspark" /* Lightspark */),
|
|
3610
3621
|
hcNeutralFromBg: (bgHex) => hcNeutralFromBg(bgHex, colors.black, colors.white),
|
|
3611
3622
|
buttons: defaultButtonsTheme,
|
|
3623
|
+
badge: {
|
|
3624
|
+
bg: "c05Neutral"
|
|
3625
|
+
},
|
|
3626
|
+
inputBackground: colors.white,
|
|
3612
3627
|
loading: "LoadingSpinner"
|
|
3613
3628
|
});
|
|
3614
3629
|
var lightBaseTheme = baseTheme;
|
|
@@ -3646,7 +3661,10 @@ var darkBaseTheme = {
|
|
|
3646
3661
|
warning: colors.warning,
|
|
3647
3662
|
buttons: defaultButtonsTheme,
|
|
3648
3663
|
loading: "LoadingSpinner",
|
|
3649
|
-
inputBackground: colors.black
|
|
3664
|
+
inputBackground: colors.black,
|
|
3665
|
+
badge: {
|
|
3666
|
+
bg: "c15Neutral"
|
|
3667
|
+
}
|
|
3650
3668
|
};
|
|
3651
3669
|
var lightTheme = extend(lightBaseTheme, {
|
|
3652
3670
|
header: extendBase(lightBaseTheme, {
|
|
@@ -3762,7 +3780,10 @@ var bridgeBaseSettings = {
|
|
|
3762
3780
|
defaultBorderWidth: 1
|
|
3763
3781
|
}
|
|
3764
3782
|
}
|
|
3765
|
-
})
|
|
3783
|
+
}),
|
|
3784
|
+
badge: {
|
|
3785
|
+
bg: "grayBlue94"
|
|
3786
|
+
}
|
|
3766
3787
|
};
|
|
3767
3788
|
var bridgeLightTheme = extend(lightTheme, __spreadProps(__spreadValues({}, bridgeBaseSettings), {
|
|
3768
3789
|
type: "bridgeLight" /* BridgeLight */,
|
|
@@ -4233,7 +4254,11 @@ function select(component) {
|
|
|
4233
4254
|
}
|
|
4234
4255
|
|
|
4235
4256
|
// src/utils/toReactNodes.tsx
|
|
4236
|
-
var
|
|
4257
|
+
var import_lodash_es4 = require("lodash-es");
|
|
4258
|
+
var import_react26 = require("react");
|
|
4259
|
+
|
|
4260
|
+
// src/components/typography/renderTypography.tsx
|
|
4261
|
+
var import_react25 = __toESM(require("react"), 1);
|
|
4237
4262
|
|
|
4238
4263
|
// src/components/typography/Body.tsx
|
|
4239
4264
|
var import_styled5 = __toESM(require("@emotion/styled"), 1);
|
|
@@ -8591,7 +8616,6 @@ var StyledTitle = import_styled14.default.span`
|
|
|
8591
8616
|
`;
|
|
8592
8617
|
|
|
8593
8618
|
// src/components/typography/renderTypography.tsx
|
|
8594
|
-
var import_jsx_runtime130 = require("@emotion/react/jsx-runtime");
|
|
8595
8619
|
var typographyMap = {
|
|
8596
8620
|
Display,
|
|
8597
8621
|
Headline,
|
|
@@ -8603,60 +8627,144 @@ var typographyMap = {
|
|
|
8603
8627
|
"Label Strong": LabelStrong,
|
|
8604
8628
|
Overline,
|
|
8605
8629
|
Code: Code2,
|
|
8606
|
-
"Code Strong":
|
|
8630
|
+
"Code Strong": Code2
|
|
8607
8631
|
};
|
|
8608
8632
|
var renderTypography = (type, props) => {
|
|
8609
8633
|
const TypographyComponent = typographyMap[type];
|
|
8610
|
-
|
|
8634
|
+
const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
|
|
8635
|
+
return import_react25.default.createElement(TypographyComponent, rest, children);
|
|
8611
8636
|
};
|
|
8612
8637
|
|
|
8613
8638
|
// src/utils/toReactNodes.tsx
|
|
8614
|
-
var
|
|
8639
|
+
var import_jsx_runtime130 = require("@emotion/react/jsx-runtime");
|
|
8615
8640
|
function toReactNodes(toReactNodesArg) {
|
|
8616
8641
|
const toReactNodesArray = Array.isArray(toReactNodesArg) ? toReactNodesArg : [toReactNodesArg];
|
|
8617
8642
|
const reactNodes = toReactNodesArray.map((node, i) => {
|
|
8618
8643
|
let content;
|
|
8619
8644
|
if (!node) {
|
|
8620
8645
|
return null;
|
|
8621
|
-
} else if (typeof node !== "string" && "typography" in node && node.typography.type
|
|
8622
|
-
|
|
8646
|
+
} else if (typeof node !== "string" && "typography" in node && node.typography.type) {
|
|
8647
|
+
const props = node.typography.props || {};
|
|
8648
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_react26.Fragment, { children: renderTypography(
|
|
8623
8649
|
node.typography.type,
|
|
8624
|
-
Object.assign(
|
|
8625
|
-
content: node
|
|
8626
|
-
})
|
|
8650
|
+
Object.assign(props, { content: node })
|
|
8627
8651
|
) }, `typography-${i}-${node.text.substr(0, 10)}`);
|
|
8628
8652
|
} else {
|
|
8629
8653
|
content = toNonTypographicReactNodes(node);
|
|
8630
8654
|
}
|
|
8631
8655
|
return content || null;
|
|
8632
8656
|
});
|
|
8633
|
-
return /* @__PURE__ */ (0,
|
|
8657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_react26.Fragment, { children: reactNodes });
|
|
8658
|
+
}
|
|
8659
|
+
function setReactNodesTypography(nodesArg, nodesTypographyMap, replaceExistingTypography = true) {
|
|
8660
|
+
const nodes = Array.isArray(nodesArg) ? nodesArg : [nodesArg];
|
|
8661
|
+
const nodesWithTypography = nodes.map((node, i) => {
|
|
8662
|
+
if (isIconNode(node)) {
|
|
8663
|
+
return node;
|
|
8664
|
+
} else if (typeof node === "string") {
|
|
8665
|
+
if (nodesTypographyMap.text) {
|
|
8666
|
+
return {
|
|
8667
|
+
text: node,
|
|
8668
|
+
typography: nodesTypographyMap.text
|
|
8669
|
+
};
|
|
8670
|
+
}
|
|
8671
|
+
} else if (!node) {
|
|
8672
|
+
return node;
|
|
8673
|
+
}
|
|
8674
|
+
const useExistingTypography = !replaceExistingTypography && (0, import_lodash_es4.isObject)(node) && "typography" in node ? node.typography : void 0;
|
|
8675
|
+
if (isLinkNode(node)) {
|
|
8676
|
+
if (nodesTypographyMap.link) {
|
|
8677
|
+
return __spreadProps(__spreadValues({}, node), {
|
|
8678
|
+
typography: useExistingTypography || nodesTypographyMap.link
|
|
8679
|
+
});
|
|
8680
|
+
}
|
|
8681
|
+
} else if (isExternalLinkNode(node)) {
|
|
8682
|
+
if (nodesTypographyMap.externalLink) {
|
|
8683
|
+
return __spreadProps(__spreadValues({}, node), {
|
|
8684
|
+
typography: useExistingTypography || nodesTypographyMap.externalLink
|
|
8685
|
+
});
|
|
8686
|
+
}
|
|
8687
|
+
} else if (isNextLinkNode(node)) {
|
|
8688
|
+
if (nodesTypographyMap.nextLink) {
|
|
8689
|
+
return __spreadProps(__spreadValues({}, node), {
|
|
8690
|
+
typography: useExistingTypography || nodesTypographyMap.nextLink
|
|
8691
|
+
});
|
|
8692
|
+
}
|
|
8693
|
+
} else if (isTextNode(node)) {
|
|
8694
|
+
if (nodesTypographyMap.text) {
|
|
8695
|
+
return __spreadProps(__spreadValues({}, node), {
|
|
8696
|
+
typography: useExistingTypography || nodesTypographyMap.text
|
|
8697
|
+
});
|
|
8698
|
+
}
|
|
8699
|
+
}
|
|
8700
|
+
return node;
|
|
8701
|
+
});
|
|
8702
|
+
return nodesWithTypography;
|
|
8703
|
+
}
|
|
8704
|
+
function setDefaultReactNodesTypography(nodesArg, nodesTypographyMap) {
|
|
8705
|
+
return setReactNodesTypography(nodesArg, nodesTypographyMap, false);
|
|
8634
8706
|
}
|
|
8635
8707
|
|
|
8636
8708
|
// src/components/Badge.tsx
|
|
8637
8709
|
var import_styled15 = __toESM(require("@emotion/styled"), 1);
|
|
8638
|
-
var
|
|
8639
|
-
function Badge({
|
|
8640
|
-
|
|
8641
|
-
|
|
8642
|
-
|
|
8643
|
-
|
|
8644
|
-
|
|
8710
|
+
var import_jsx_runtime131 = require("@emotion/react/jsx-runtime");
|
|
8711
|
+
function Badge({
|
|
8712
|
+
content: contentProp,
|
|
8713
|
+
kind,
|
|
8714
|
+
icon,
|
|
8715
|
+
ml = 0,
|
|
8716
|
+
mr = 0,
|
|
8717
|
+
size: size2 = "sm",
|
|
8718
|
+
block = false,
|
|
8719
|
+
typography: typographyProp
|
|
8720
|
+
}) {
|
|
8721
|
+
const typography = {
|
|
8722
|
+
type: (typographyProp == null ? void 0 : typographyProp.type) || "Label Moderate",
|
|
8723
|
+
props: {
|
|
8724
|
+
size: (typographyProp == null ? void 0 : typographyProp.size) || "Small",
|
|
8725
|
+
color: (typographyProp == null ? void 0 : typographyProp.color) || (kind === "danger" ? "danger" : "text")
|
|
8726
|
+
}
|
|
8727
|
+
};
|
|
8728
|
+
const typographyMap2 = {
|
|
8729
|
+
link: typography,
|
|
8730
|
+
externalLink: typography,
|
|
8731
|
+
text: typography,
|
|
8732
|
+
nextLink: typography
|
|
8733
|
+
};
|
|
8734
|
+
let content = setDefaultReactNodesTypography(
|
|
8735
|
+
contentProp,
|
|
8736
|
+
typographyMap2
|
|
8737
|
+
);
|
|
8738
|
+
content = toReactNodes(content);
|
|
8739
|
+
return contentProp ? /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(StyledBadge, { kind, ml, size: size2, block, children: [
|
|
8740
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Icon, { name: icon.name, width: 20, color: icon.color }) : null,
|
|
8741
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(BadgeContent, { children: content })
|
|
8742
|
+
] }) : null;
|
|
8743
|
+
}
|
|
8744
|
+
var badgeSmVPadding = 2;
|
|
8745
|
+
var badgeSmHPadding = 6;
|
|
8746
|
+
var StyledBadge = import_styled15.default.div`
|
|
8747
|
+
${({ size: size2 }) => standardBorderRadius(size2 === "sm" ? 4 : 12)}
|
|
8645
8748
|
${({ ml }) => ml === 0 ? "" : `margin-left: ${ml}px;`}
|
|
8646
|
-
|
|
8647
|
-
|
|
8648
|
-
|
|
8749
|
+
|
|
8750
|
+
display: ${({ block }) => block ? "flex" : "inline-flex"};
|
|
8751
|
+
gap: ${({ size: size2 }) => size2 === "sm" ? badgeSmHPadding : 12}px;
|
|
8752
|
+
align-items: center;
|
|
8753
|
+
padding: ${({ size: size2 }) => size2 === "sm" ? `${badgeSmVPadding}px ${badgeSmHPadding}px` : "12px 16px"};
|
|
8754
|
+
background-color: ${({ theme, kind }) => {
|
|
8755
|
+
if (kind === "danger") {
|
|
8649
8756
|
return getColor(theme, "red42a10");
|
|
8650
8757
|
} else {
|
|
8651
|
-
return
|
|
8758
|
+
return getColor(theme, theme.badge.bg);
|
|
8652
8759
|
}
|
|
8653
8760
|
}};
|
|
8654
8761
|
`;
|
|
8762
|
+
var BadgeContent = import_styled15.default.div``;
|
|
8655
8763
|
|
|
8656
8764
|
// src/components/Dropdown.tsx
|
|
8657
|
-
var
|
|
8765
|
+
var import_react27 = require("@emotion/react");
|
|
8658
8766
|
var import_styled17 = __toESM(require("@emotion/styled"), 1);
|
|
8659
|
-
var
|
|
8767
|
+
var import_react28 = require("react");
|
|
8660
8768
|
var import_react_dom = __toESM(require("react-dom"), 1);
|
|
8661
8769
|
|
|
8662
8770
|
// src/styles/constants.ts
|
|
@@ -8679,7 +8787,7 @@ var UnstyledButton = import_styled16.default.button`
|
|
|
8679
8787
|
`;
|
|
8680
8788
|
|
|
8681
8789
|
// src/components/Dropdown.tsx
|
|
8682
|
-
var
|
|
8790
|
+
var import_jsx_runtime132 = require("@emotion/react/jsx-runtime");
|
|
8683
8791
|
function Dropdown({
|
|
8684
8792
|
button,
|
|
8685
8793
|
dropdownItems,
|
|
@@ -8696,22 +8804,22 @@ function Dropdown({
|
|
|
8696
8804
|
footer = null,
|
|
8697
8805
|
dropdownContent = null
|
|
8698
8806
|
}) {
|
|
8699
|
-
const theme = (0,
|
|
8700
|
-
const [isOpen, setIsOpen] = (0,
|
|
8701
|
-
const [dropdownButtonHeight, setDropdownButtonHeight] = (0,
|
|
8702
|
-
const [dropdownButtonWidth, setDropdownButtonWidth] = (0,
|
|
8703
|
-
const [dropdownCoords, setDropdownCoords] = (0,
|
|
8807
|
+
const theme = (0, import_react27.useTheme)();
|
|
8808
|
+
const [isOpen, setIsOpen] = (0, import_react28.useState)(false);
|
|
8809
|
+
const [dropdownButtonHeight, setDropdownButtonHeight] = (0, import_react28.useState)(0);
|
|
8810
|
+
const [dropdownButtonWidth, setDropdownButtonWidth] = (0, import_react28.useState)(0);
|
|
8811
|
+
const [dropdownCoords, setDropdownCoords] = (0, import_react28.useState)({
|
|
8704
8812
|
top: 0,
|
|
8705
8813
|
left: 0,
|
|
8706
8814
|
right: 0
|
|
8707
8815
|
});
|
|
8708
|
-
const dropdownRef = (0,
|
|
8709
|
-
const dropdownButtonRef = (0,
|
|
8710
|
-
const dropdownItemsRef = (0,
|
|
8711
|
-
const [dropdownItemsWidth, setDropdownItemsWidth] = (0,
|
|
8712
|
-
const nodeRef = (0,
|
|
8713
|
-
const [nodeReady, setNodeReady] = (0,
|
|
8714
|
-
(0,
|
|
8816
|
+
const dropdownRef = (0, import_react28.useRef)(null);
|
|
8817
|
+
const dropdownButtonRef = (0, import_react28.useRef)(null);
|
|
8818
|
+
const dropdownItemsRef = (0, import_react28.useRef)(null);
|
|
8819
|
+
const [dropdownItemsWidth, setDropdownItemsWidth] = (0, import_react28.useState)(0);
|
|
8820
|
+
const nodeRef = (0, import_react28.useRef)(null);
|
|
8821
|
+
const [nodeReady, setNodeReady] = (0, import_react28.useState)(false);
|
|
8822
|
+
(0, import_react28.useEffect)(() => {
|
|
8715
8823
|
if (!nodeRef.current) {
|
|
8716
8824
|
nodeRef.current = document.createElement("div");
|
|
8717
8825
|
document.body.appendChild(nodeRef.current);
|
|
@@ -8724,7 +8832,7 @@ function Dropdown({
|
|
|
8724
8832
|
}
|
|
8725
8833
|
};
|
|
8726
8834
|
}, []);
|
|
8727
|
-
const setOpen = (0,
|
|
8835
|
+
const setOpen = (0, import_react28.useCallback)(
|
|
8728
8836
|
(newValue) => {
|
|
8729
8837
|
setIsOpen(newValue);
|
|
8730
8838
|
if (newValue && onOpen) {
|
|
@@ -8750,13 +8858,13 @@ function Dropdown({
|
|
|
8750
8858
|
setOpen(false);
|
|
8751
8859
|
}
|
|
8752
8860
|
}
|
|
8753
|
-
const handleRef = (0,
|
|
8861
|
+
const handleRef = (0, import_react28.useCallback)((ref) => {
|
|
8754
8862
|
if (ref && !dropdownButtonRef.current) {
|
|
8755
8863
|
dropdownButtonRef.current = ref;
|
|
8756
8864
|
}
|
|
8757
8865
|
return ref;
|
|
8758
8866
|
}, []);
|
|
8759
|
-
(0,
|
|
8867
|
+
(0, import_react28.useEffect)(() => {
|
|
8760
8868
|
function handleClickOutside(event) {
|
|
8761
8869
|
const targetOutsideDropdownItems = dropdownItemsRef.current && !dropdownItemsRef.current.contains(event.target);
|
|
8762
8870
|
const targetOutsideDropdownButton = dropdownButtonRef.current && !dropdownButtonRef.current.contains(event.target);
|
|
@@ -8769,7 +8877,7 @@ function Dropdown({
|
|
|
8769
8877
|
window.document.removeEventListener("mousedown", handleClickOutside);
|
|
8770
8878
|
};
|
|
8771
8879
|
}, [isOpen, setOpen]);
|
|
8772
|
-
const reposition = (0,
|
|
8880
|
+
const reposition = (0, import_react28.useCallback)(() => {
|
|
8773
8881
|
if (dropdownButtonRef.current && dropdownItemsRef.current) {
|
|
8774
8882
|
const dropdownButtonRect = dropdownButtonRef.current.getBoundingClientRect();
|
|
8775
8883
|
setDropdownCoords({
|
|
@@ -8783,7 +8891,7 @@ function Dropdown({
|
|
|
8783
8891
|
setDropdownItemsWidth(dropdownItemsRect.width);
|
|
8784
8892
|
}
|
|
8785
8893
|
}, []);
|
|
8786
|
-
(0,
|
|
8894
|
+
(0, import_react28.useLayoutEffect)(() => {
|
|
8787
8895
|
function onWindowResize() {
|
|
8788
8896
|
setOpen(false);
|
|
8789
8897
|
reposition();
|
|
@@ -8821,7 +8929,7 @@ function Dropdown({
|
|
|
8821
8929
|
dropdownResizeObserver == null ? void 0 : dropdownResizeObserver.disconnect();
|
|
8822
8930
|
};
|
|
8823
8931
|
}, [setOpen, horizontalScrollRef, closeOnScroll, reposition]);
|
|
8824
|
-
const handleClickDropdownItems = (0,
|
|
8932
|
+
const handleClickDropdownItems = (0, import_react28.useCallback)(() => {
|
|
8825
8933
|
setOpen(false);
|
|
8826
8934
|
onClickDropdownItems && onClickDropdownItems();
|
|
8827
8935
|
}, [onClickDropdownItems, setOpen]);
|
|
@@ -8835,13 +8943,13 @@ function Dropdown({
|
|
|
8835
8943
|
}
|
|
8836
8944
|
const buttonContent = button.label || button.getContent && button.getContent({ isOpen, theme });
|
|
8837
8945
|
const containerCSS = getCSS && getCSS({ isOpen, theme });
|
|
8838
|
-
return /* @__PURE__ */ (0,
|
|
8946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
8839
8947
|
"div",
|
|
8840
8948
|
{
|
|
8841
8949
|
css: __spreadValues({ position: "relative", display: "inline-flex" }, containerCSS),
|
|
8842
8950
|
ref: dropdownRef,
|
|
8843
8951
|
children: [
|
|
8844
|
-
/* @__PURE__ */ (0,
|
|
8952
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
8845
8953
|
DropdownButton,
|
|
8846
8954
|
{
|
|
8847
8955
|
id: button.id,
|
|
@@ -8869,7 +8977,7 @@ function Dropdown({
|
|
|
8869
8977
|
}
|
|
8870
8978
|
),
|
|
8871
8979
|
nodeReady && nodeRef.current ? import_react_dom.default.createPortal(
|
|
8872
|
-
/* @__PURE__ */ (0,
|
|
8980
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
8873
8981
|
DropdownItems,
|
|
8874
8982
|
{
|
|
8875
8983
|
isOpen,
|
|
@@ -8880,7 +8988,7 @@ function Dropdown({
|
|
|
8880
8988
|
maxWidth: maxDropdownItemsWidth,
|
|
8881
8989
|
children: [
|
|
8882
8990
|
dropdownItems == null ? void 0 : dropdownItems.map((dropdownItem, i) => {
|
|
8883
|
-
return /* @__PURE__ */ (0,
|
|
8991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("li", { onBlur: handleBlur, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
8884
8992
|
DropdownItem,
|
|
8885
8993
|
{
|
|
8886
8994
|
dropdownItem,
|
|
@@ -8889,7 +8997,7 @@ function Dropdown({
|
|
|
8889
8997
|
) }, dropdownItem.label);
|
|
8890
8998
|
}),
|
|
8891
8999
|
dropdownContent,
|
|
8892
|
-
footer && /* @__PURE__ */ (0,
|
|
9000
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(DropdownFooter, { children: footer })
|
|
8893
9001
|
]
|
|
8894
9002
|
}
|
|
8895
9003
|
),
|
|
@@ -8923,9 +9031,9 @@ function DropdownItem({
|
|
|
8923
9031
|
dropdownItem,
|
|
8924
9032
|
onClick
|
|
8925
9033
|
}) {
|
|
8926
|
-
const theme = (0,
|
|
9034
|
+
const theme = (0, import_react27.useTheme)();
|
|
8927
9035
|
const dropdownItemIcon = dropdownItem.getIcon && dropdownItem.getIcon({ dropdownItem, theme });
|
|
8928
|
-
const dropdownItemIconNode = dropdownItemIcon ? /* @__PURE__ */ (0,
|
|
9036
|
+
const dropdownItemIconNode = dropdownItemIcon ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
8929
9037
|
Icon,
|
|
8930
9038
|
{
|
|
8931
9039
|
name: dropdownItemIcon.name,
|
|
@@ -8934,12 +9042,12 @@ function DropdownItem({
|
|
|
8934
9042
|
}
|
|
8935
9043
|
) : null;
|
|
8936
9044
|
const cssProp2 = dropdownItem.getCSS && dropdownItem.getCSS({ theme, dropdownItem });
|
|
8937
|
-
const onClickDropdownItem = (0,
|
|
9045
|
+
const onClickDropdownItem = (0, import_react28.useCallback)(() => {
|
|
8938
9046
|
dropdownItem.onClick && dropdownItem.onClick(dropdownItem);
|
|
8939
9047
|
onClick && onClick();
|
|
8940
9048
|
}, [dropdownItem, onClick]);
|
|
8941
9049
|
if (dropdownItem.to !== void 0 || dropdownItem.externalLink) {
|
|
8942
|
-
return /* @__PURE__ */ (0,
|
|
9050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
8943
9051
|
DropdownItemLink,
|
|
8944
9052
|
{
|
|
8945
9053
|
selected: Boolean(dropdownItem.selected),
|
|
@@ -8956,7 +9064,7 @@ function DropdownItem({
|
|
|
8956
9064
|
}
|
|
8957
9065
|
);
|
|
8958
9066
|
}
|
|
8959
|
-
return /* @__PURE__ */ (0,
|
|
9067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
8960
9068
|
DropdownItemDiv,
|
|
8961
9069
|
{
|
|
8962
9070
|
selected: false,
|
|
@@ -8993,13 +9101,13 @@ var dropdownItemStyle = ({ selected, theme }) => `
|
|
|
8993
9101
|
var cssProp = ({
|
|
8994
9102
|
theme,
|
|
8995
9103
|
selected
|
|
8996
|
-
}) =>
|
|
9104
|
+
}) => import_react27.css`
|
|
8997
9105
|
${dropdownItemStyle({ theme, selected: Boolean(selected) })}
|
|
8998
9106
|
${standardFocusOutline({ theme })}
|
|
8999
9107
|
`;
|
|
9000
9108
|
function DropdownItemLink(props) {
|
|
9001
|
-
const theme = (0,
|
|
9002
|
-
return /* @__PURE__ */ (0,
|
|
9109
|
+
const theme = (0, import_react27.useTheme)();
|
|
9110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
9003
9111
|
Link,
|
|
9004
9112
|
__spreadProps(__spreadValues({}, props), {
|
|
9005
9113
|
css: cssProp({ theme, selected: Boolean(props.selected) })
|
|
@@ -9012,9 +9120,9 @@ var DropdownItemDiv = import_styled17.default.div`
|
|
|
9012
9120
|
`;
|
|
9013
9121
|
|
|
9014
9122
|
// src/components/Loading.tsx
|
|
9015
|
-
var
|
|
9123
|
+
var import_react29 = require("@emotion/react");
|
|
9016
9124
|
var import_styled18 = __toESM(require("@emotion/styled"), 1);
|
|
9017
|
-
var
|
|
9125
|
+
var import_jsx_runtime133 = require("@emotion/react/jsx-runtime");
|
|
9018
9126
|
var defaultProps = {
|
|
9019
9127
|
size: 60,
|
|
9020
9128
|
center: true,
|
|
@@ -9025,8 +9133,8 @@ function Loading({
|
|
|
9025
9133
|
size: size2 = defaultProps.size,
|
|
9026
9134
|
ml = defaultProps.ml
|
|
9027
9135
|
}) {
|
|
9028
|
-
const theme = (0,
|
|
9029
|
-
return /* @__PURE__ */ (0,
|
|
9136
|
+
const theme = (0, import_react29.useTheme)();
|
|
9137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(LoadingWrapper, { center, ml, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Rotate, { children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Icon, { name: theme.loading, width: size2 }) }) });
|
|
9030
9138
|
}
|
|
9031
9139
|
Loading.defaultProps = defaultProps;
|
|
9032
9140
|
var LoadingWrapper = import_styled18.default.div`
|
|
@@ -9064,11 +9172,11 @@ var Rotate = import_styled18.default.div`
|
|
|
9064
9172
|
`;
|
|
9065
9173
|
|
|
9066
9174
|
// src/components/TextButton.tsx
|
|
9067
|
-
var
|
|
9175
|
+
var import_react30 = require("@emotion/react");
|
|
9068
9176
|
var import_styled19 = __toESM(require("@emotion/styled"), 1);
|
|
9069
9177
|
|
|
9070
9178
|
// src/components/TextIconAligner.tsx
|
|
9071
|
-
var
|
|
9179
|
+
var import_jsx_runtime134 = require("@emotion/react/jsx-runtime");
|
|
9072
9180
|
function TextIconAligner({
|
|
9073
9181
|
content,
|
|
9074
9182
|
typography,
|
|
@@ -9081,7 +9189,7 @@ function TextIconAligner({
|
|
|
9081
9189
|
size: (typography == null ? void 0 : typography.size) || "Small",
|
|
9082
9190
|
color: (typography == null ? void 0 : typography.color) || "inherit"
|
|
9083
9191
|
});
|
|
9084
|
-
const leftIconNode = leftIcon ? /* @__PURE__ */ (0,
|
|
9192
|
+
const leftIconNode = leftIcon ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
9085
9193
|
Icon,
|
|
9086
9194
|
{
|
|
9087
9195
|
name: leftIcon.name,
|
|
@@ -9090,7 +9198,7 @@ function TextIconAligner({
|
|
|
9090
9198
|
color: leftIcon.color
|
|
9091
9199
|
}
|
|
9092
9200
|
) : null;
|
|
9093
|
-
const rightIconNode = rightIcon ? /* @__PURE__ */ (0,
|
|
9201
|
+
const rightIconNode = rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
9094
9202
|
Icon,
|
|
9095
9203
|
{
|
|
9096
9204
|
name: rightIcon.name,
|
|
@@ -9099,7 +9207,7 @@ function TextIconAligner({
|
|
|
9099
9207
|
color: rightIcon.color
|
|
9100
9208
|
}
|
|
9101
9209
|
) : null;
|
|
9102
|
-
return /* @__PURE__ */ (0,
|
|
9210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
|
|
9103
9211
|
"span",
|
|
9104
9212
|
{
|
|
9105
9213
|
css: {
|
|
@@ -9118,7 +9226,7 @@ function TextIconAligner({
|
|
|
9118
9226
|
}
|
|
9119
9227
|
|
|
9120
9228
|
// src/components/TextButton.tsx
|
|
9121
|
-
var
|
|
9229
|
+
var import_jsx_runtime135 = require("@emotion/react/jsx-runtime");
|
|
9122
9230
|
function TextButton({
|
|
9123
9231
|
text: textProp,
|
|
9124
9232
|
to,
|
|
@@ -9144,7 +9252,7 @@ function TextButton({
|
|
|
9144
9252
|
};
|
|
9145
9253
|
}
|
|
9146
9254
|
const defaultIconColor = iconMatchTextColor ? void 0 : "mcNeutral";
|
|
9147
|
-
const content = /* @__PURE__ */ (0,
|
|
9255
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
9148
9256
|
TextIconAligner,
|
|
9149
9257
|
{
|
|
9150
9258
|
onClick,
|
|
@@ -9174,15 +9282,15 @@ function TextButton({
|
|
|
9174
9282
|
}
|
|
9175
9283
|
};
|
|
9176
9284
|
if (to) {
|
|
9177
|
-
return /* @__PURE__ */ (0,
|
|
9285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ButtonLink, __spreadProps(__spreadValues({}, commonProps), { to, params: toParams, children: content }));
|
|
9178
9286
|
}
|
|
9179
|
-
return href ? /* @__PURE__ */ (0,
|
|
9287
|
+
return href ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ButtonHrefLink, __spreadProps(__spreadValues({}, commonProps), { href, target: "_blank", children: content })) : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(StyledButton, __spreadProps(__spreadValues({}, commonProps), { children: content }));
|
|
9180
9288
|
}
|
|
9181
9289
|
var buttonStyle = ({
|
|
9182
9290
|
theme,
|
|
9183
9291
|
disabled,
|
|
9184
9292
|
padding
|
|
9185
|
-
}) =>
|
|
9293
|
+
}) => import_react30.css`
|
|
9186
9294
|
display: inline-flex;
|
|
9187
9295
|
opacity: ${disabled ? 0.2 : 1};
|
|
9188
9296
|
align-items: center;
|
|
@@ -9214,15 +9322,15 @@ var ButtonHrefLink = import_styled19.default.a`
|
|
|
9214
9322
|
var pageSectionScrollOffset = 20;
|
|
9215
9323
|
|
|
9216
9324
|
// src/components/PageSection/PageSection.tsx
|
|
9217
|
-
var
|
|
9325
|
+
var import_jsx_runtime136 = require("@emotion/react/jsx-runtime");
|
|
9218
9326
|
function PageSection({
|
|
9219
9327
|
children,
|
|
9220
9328
|
title,
|
|
9221
9329
|
sectionId,
|
|
9222
9330
|
headerOffset = 0
|
|
9223
9331
|
}) {
|
|
9224
|
-
return /* @__PURE__ */ (0,
|
|
9225
|
-
title ? /* @__PURE__ */ (0,
|
|
9332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(StyledPageSection, { scrollMarginTop: headerOffset + pageSectionScrollOffset, children: [
|
|
9333
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Heading, { type: "h3", id: sectionId, mt: 0, mb: 40, children: title }) : null,
|
|
9226
9334
|
children
|
|
9227
9335
|
] });
|
|
9228
9336
|
}
|
|
@@ -9250,9 +9358,9 @@ var PageSectionBoxActionColumn = ({
|
|
|
9250
9358
|
label,
|
|
9251
9359
|
value,
|
|
9252
9360
|
valueId
|
|
9253
|
-
}) => /* @__PURE__ */ (0,
|
|
9254
|
-
/* @__PURE__ */ (0,
|
|
9255
|
-
value ? /* @__PURE__ */ (0,
|
|
9361
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(StyledPageSectionBoxActionColumn, { children: [
|
|
9362
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(PageSectionBoxActionColumnLabel, { children: label }),
|
|
9363
|
+
value ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(PageSectionBoxActionColumnValue, { id: valueId, children: value }) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(PageSectionBoxActionColumnNoValue, { children: "Unknown" })
|
|
9256
9364
|
] });
|
|
9257
9365
|
var StyledPageSectionBoxActionColumn = import_styled20.default.div``;
|
|
9258
9366
|
var PageSectionBoxActionColumnLabel = import_styled20.default.div`
|
|
@@ -9283,18 +9391,18 @@ function PageSectionBoxAction({
|
|
|
9283
9391
|
to,
|
|
9284
9392
|
toParams
|
|
9285
9393
|
}) {
|
|
9286
|
-
const theme = (0,
|
|
9287
|
-
return loading ? /* @__PURE__ */ (0,
|
|
9394
|
+
const theme = (0, import_react31.useTheme)();
|
|
9395
|
+
return loading ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Loading, { size: 12, center: false }) }) : icon ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(UnstyledButton, { onClick: icon.onClick, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Icon, { name: icon.name, width: 12, color: "mcNeutral" }) }) }) : dropdownItems ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
9288
9396
|
Dropdown,
|
|
9289
9397
|
{
|
|
9290
9398
|
button: {
|
|
9291
|
-
getContent: () => /* @__PURE__ */ (0,
|
|
9399
|
+
getContent: () => /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Icon, { name: "DotGrid1x3Horizontal", width: 16 })
|
|
9292
9400
|
},
|
|
9293
9401
|
dropdownItems
|
|
9294
9402
|
}
|
|
9295
|
-
) : isDelete ? /* @__PURE__ */ (0,
|
|
9403
|
+
) : isDelete ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(UnstyledButton, { css: { color: theme.mcNeutral }, onClick, children: "Delete" }) : label ? (
|
|
9296
9404
|
/* Extra div for proper default alignment inside flex contexts */
|
|
9297
|
-
/* @__PURE__ */ (0,
|
|
9405
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
9298
9406
|
TextButton,
|
|
9299
9407
|
{
|
|
9300
9408
|
leftIcon: icon,
|
|
@@ -9315,21 +9423,21 @@ var PageSectionBoxActionRow = ({
|
|
|
9315
9423
|
action,
|
|
9316
9424
|
smFlexColumn = true
|
|
9317
9425
|
}) => {
|
|
9318
|
-
return /* @__PURE__ */ (0,
|
|
9426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_react32.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
|
|
9319
9427
|
SPageSectionBoxActionRow,
|
|
9320
9428
|
{
|
|
9321
9429
|
separator: Boolean(separator),
|
|
9322
9430
|
smFlexColumn: Boolean(smFlexColumn),
|
|
9323
9431
|
children: [
|
|
9324
|
-
title ? /* @__PURE__ */ (0,
|
|
9325
|
-
/* @__PURE__ */ (0,
|
|
9432
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { children: [
|
|
9433
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(PageSectionBoxTitle, { children: [
|
|
9326
9434
|
title,
|
|
9327
|
-
titleBadge ? /* @__PURE__ */ (0,
|
|
9435
|
+
titleBadge ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Badge, { content: titleBadge, ml: 4 }) : null
|
|
9328
9436
|
] }),
|
|
9329
|
-
description ? /* @__PURE__ */ (0,
|
|
9437
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(PageSectionBoxDescription, { children: description }) : null
|
|
9330
9438
|
] }) : null,
|
|
9331
9439
|
children,
|
|
9332
|
-
/* @__PURE__ */ (0,
|
|
9440
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(PageSectionBoxAction, __spreadValues({}, action))
|
|
9333
9441
|
]
|
|
9334
9442
|
}
|
|
9335
9443
|
) });
|
|
@@ -9377,10 +9485,10 @@ function PageSectionBox({
|
|
|
9377
9485
|
description,
|
|
9378
9486
|
children
|
|
9379
9487
|
}) {
|
|
9380
|
-
return /* @__PURE__ */ (0,
|
|
9381
|
-
description && /* @__PURE__ */ (0,
|
|
9488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(StyledPageSectionBox, { children: [
|
|
9489
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(PageSectionBoxDescription, { children: toReactNodes(description) }),
|
|
9382
9490
|
children,
|
|
9383
|
-
(action == null ? void 0 : action.label) ? /* @__PURE__ */ (0,
|
|
9491
|
+
(action == null ? void 0 : action.label) ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { css: { marginTop: "12px" }, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(PageSectionBoxAction, __spreadValues({}, action)) }) : null
|
|
9384
9492
|
] });
|
|
9385
9493
|
}
|
|
9386
9494
|
var StyledPageSectionBox = import_styled20.default.div`
|
|
@@ -9446,7 +9554,7 @@ var PageSectionBoxTitle = import_styled20.default.div`
|
|
|
9446
9554
|
align-items: center;
|
|
9447
9555
|
font-size: ${({ lg }) => lg ? 14 : 12}px;
|
|
9448
9556
|
font-weight: 600;
|
|
9449
|
-
line-height: ${({ lg }) => standardLineHeightEms * (lg ? 14 : 12) +
|
|
9557
|
+
line-height: ${({ lg }) => standardLineHeightEms * (lg ? 14 : 12) + badgeSmVPadding * 2}px;
|
|
9450
9558
|
`;
|
|
9451
9559
|
var PageSectionBoxDescription = import_styled20.default.div`
|
|
9452
9560
|
color: ${({ theme }) => theme.mcNeutral};
|
|
@@ -4,7 +4,7 @@ import { HeadingProps } from '../../styles/type.cjs';
|
|
|
4
4
|
import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
|
|
5
5
|
import react__default from 'react';
|
|
6
6
|
import { IconName } from '../Icon/types.cjs';
|
|
7
|
-
import '../../
|
|
7
|
+
import '../../themes-37e92940.js';
|
|
8
8
|
import '../../styles/tokens/typography.cjs';
|
|
9
9
|
import '@emotion/css';
|
|
10
10
|
import '../../styles/colors.cjs';
|