@carto/meridian-ds 2.7.0-alpha-loader.6 → 2.8.0-alpha-empty-state.1
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 +9 -2
- package/dist/{Alert-CHyETxuP.js → Alert-BZPM5zpX.js} +1 -1
- package/dist/{Alert-DyUCYGVG.cjs → Alert-C4W0H_uN.cjs} +1 -1
- package/dist/{MenuItem-BLZz_nSA.cjs → MenuItem-CgF4QdGi.cjs} +1 -1
- package/dist/{MenuItem-CM00TU3e.js → MenuItem-DRUK149i.js} +1 -1
- package/dist/components/index.cjs +159 -92
- package/dist/components/index.js +161 -94
- package/dist/{css-utils-B9V_AMcv.cjs → css-utils-CH7es90t.cjs} +1 -212
- package/dist/{css-utils-Cr7ZvmiF.js → css-utils-CjUBRJVK.js} +5 -216
- package/dist/custom-icons/index.cjs +296 -226
- package/dist/custom-icons/index.js +296 -226
- package/dist/palette-utils-B9ybmwiI.cjs +304 -0
- package/dist/palette-utils-BHqJlHm9.js +288 -0
- package/dist/theme/index.cjs +83 -14
- package/dist/theme/index.js +76 -6
- package/dist/types/components/CircularProgress/CircularProgress.stories.d.ts.map +1 -1
- package/dist/types/components/Dialog/DialogConfirmation/DialogConfirmation.d.ts +1 -1
- package/dist/types/components/Dialog/DialogConfirmation/DialogConfirmation.d.ts.map +1 -1
- package/dist/types/components/Dialog/DialogConfirmation/DialogConfirmation.stories.d.ts +13 -0
- package/dist/types/components/Dialog/DialogConfirmation/DialogConfirmation.stories.d.ts.map +1 -1
- package/dist/types/components/Dialog/DialogHeader/DialogHeader.d.ts +1 -1
- package/dist/types/components/Dialog/DialogHeader/DialogHeader.d.ts.map +1 -1
- package/dist/types/components/Dialog/DialogHeader/DialogHeader.stories.d.ts +31 -0
- package/dist/types/components/Dialog/DialogHeader/DialogHeader.stories.d.ts.map +1 -1
- package/dist/types/components/Dialog/types.d.ts +7 -1
- package/dist/types/components/Dialog/types.d.ts.map +1 -1
- package/dist/types/components/EmptyState/EmptyState.d.ts +4 -0
- package/dist/types/components/EmptyState/EmptyState.d.ts.map +1 -0
- package/dist/types/components/EmptyState/EmptyState.stories.d.ts +158 -0
- package/dist/types/components/EmptyState/EmptyState.stories.d.ts.map +1 -0
- package/dist/types/components/EmptyState/EmptyState.styled.d.ts +40 -0
- package/dist/types/components/EmptyState/EmptyState.styled.d.ts.map +1 -0
- package/dist/types/components/EmptyState/EmptyState.test.d.ts +2 -0
- package/dist/types/components/EmptyState/EmptyState.test.d.ts.map +1 -0
- package/dist/types/components/EmptyState/index.d.ts +3 -0
- package/dist/types/components/EmptyState/index.d.ts.map +1 -0
- package/dist/types/components/EmptyState/types.d.ts +71 -0
- package/dist/types/components/EmptyState/types.d.ts.map +1 -0
- package/dist/types/components/Loader/Loader.d.ts +1 -39
- package/dist/types/components/Loader/Loader.d.ts.map +1 -1
- package/dist/types/components/Loader/Loader.stories.d.ts +1 -1
- package/dist/types/components/Loader/Loader.stories.d.ts.map +1 -1
- package/dist/types/components/Loader/index.d.ts +1 -1
- package/dist/types/components/Loader/index.d.ts.map +1 -1
- package/dist/types/components/Loader/types.d.ts +40 -0
- package/dist/types/components/Loader/types.d.ts.map +1 -0
- package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +1 -4
- package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/custom-icons/CreateFolder.d.ts +4 -0
- package/dist/types/custom-icons/CreateFolder.d.ts.map +1 -0
- package/dist/types/custom-icons/FolderEmpty.d.ts +4 -0
- package/dist/types/custom-icons/FolderEmpty.d.ts.map +1 -0
- package/dist/types/custom-icons/SelectFeature.d.ts.map +1 -1
- package/dist/types/custom-icons/index.d.ts +2 -0
- package/dist/types/custom-icons/index.d.ts.map +1 -1
- package/dist/types/theme/components/buttons.d.ts.map +1 -1
- package/dist/types/theme/components/stories/LinearProgress.stories.d.ts.map +1 -1
- package/dist/types/theme/types.d.ts +6 -0
- package/dist/types/theme/types.d.ts.map +1 -1
- package/dist/widgets/index.cjs +5 -5
- package/dist/widgets/index.js +3 -3
- package/package.json +1 -1
- package/dist/palette-utils-C5CHlLXB.cjs +0 -93
- package/dist/palette-utils-D99Ib0kC.js +0 -77
package/dist/components/index.js
CHANGED
|
@@ -2,13 +2,13 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import React, { forwardRef, useState, useRef, useEffect, useMemo, createElement, Fragment as Fragment$1, useCallback, useImperativeHandle } from "react";
|
|
3
3
|
import { styled, Box, Button as Button$1, CircularProgress as CircularProgress$1, Popper, Grow, Paper, ClickAwayListener, MenuList as MenuList$1, MenuItem, ButtonGroup as ButtonGroup$1, TextField, InputAdornment, Select, FormControl, InputLabel, FormHelperText, Link, Checkbox, IconButton as IconButton$1, ListItemText, Tooltip, ToggleButtonGroup as ToggleButtonGroup$1, Stack, Autocomplete as Autocomplete$1, Divider, ListItemIcon, createFilterOptions, alpha, useTheme, AppBar as AppBar$1, Toolbar, Dialog as Dialog$1, DialogTitle as DialogTitle$1, Chip, DialogContent as DialogContent$1, DialogActions as DialogActions$1, Slide, Accordion, AccordionSummary, AccordionDetails, Avatar as Avatar$1, Menu as Menu$2, useMediaQuery, Snackbar as Snackbar$1, Portal, Fade } from "@mui/material";
|
|
4
4
|
import { OpenInNewOutlined, VisibilityOffOutlined, VisibilityOutlined, Cancel, ContentCopyOutlined, AddCircleOutlineOutlined, MenuOutlined, MoreVertOutlined, HelpOutline, ErrorOutline, CloseOutlined, Check, TodayOutlined } from "@mui/icons-material";
|
|
5
|
-
import { u as useTranslationWithFallback, T as Typography, c as ICON_SIZE_SMALL,
|
|
6
|
-
import { a } from "../css-utils-
|
|
7
|
-
import { S as ScreenReaderOnly, A as Alert$1 } from "../Alert-
|
|
8
|
-
import { L } from "../Alert-
|
|
5
|
+
import { u as useTranslationWithFallback, T as Typography, c as ICON_SIZE_SMALL, i as IconButton, f as MENU_ITEM_SIZE_DENSE, d as MENU_LIST_MAX_SIZE, h as MENU_ITEM_SIZE_EXTENDED, M as MENU_ITEM_SIZE_DEFAULT, A as APPBAR_SIZE, j as useImperativeIntl, b as ICON_SIZE_MEDIUM, N as NOTIFICATION_DURATION_IN_MS, e as ellipsisStyles } from "../css-utils-CjUBRJVK.js";
|
|
6
|
+
import { a } from "../css-utils-CjUBRJVK.js";
|
|
7
|
+
import { S as ScreenReaderOnly, A as Alert$1 } from "../Alert-BZPM5zpX.js";
|
|
8
|
+
import { L } from "../Alert-BZPM5zpX.js";
|
|
9
9
|
import { A as ArrowDown } from "../ArrowDown-d6bxUL0F.js";
|
|
10
10
|
import { A as ArrowUp, O as OpenDiagonallyRight, C as CloseDiagonallyRight } from "../OpenDiagonallyRight-CGdCEXlF.js";
|
|
11
|
-
import { M as MenuItem$1 } from "../MenuItem-
|
|
11
|
+
import { M as MenuItem$1 } from "../MenuItem-DRUK149i.js";
|
|
12
12
|
import "cartocolor";
|
|
13
13
|
import { FixedSizeList } from "react-window";
|
|
14
14
|
import { Controlled, UnControlled } from "react-codemirror2";
|
|
@@ -223,7 +223,7 @@ function SplitButton({
|
|
|
223
223
|
)
|
|
224
224
|
] });
|
|
225
225
|
}
|
|
226
|
-
const Root$
|
|
226
|
+
const Root$6 = styled(Box)(({ theme }) => ({
|
|
227
227
|
display: "flex",
|
|
228
228
|
alignItems: "center",
|
|
229
229
|
gap: theme.spacing(0.5)
|
|
@@ -257,7 +257,7 @@ function _LabelWithIndicator({
|
|
|
257
257
|
typographyProps
|
|
258
258
|
}, ref) {
|
|
259
259
|
return /* @__PURE__ */ jsxs(
|
|
260
|
-
Root$
|
|
260
|
+
Root$6,
|
|
261
261
|
{
|
|
262
262
|
ref,
|
|
263
263
|
"data-testid": dataTestId,
|
|
@@ -775,77 +775,8 @@ function _MultipleSelectField({
|
|
|
775
775
|
}
|
|
776
776
|
const MultipleSelectField = forwardRef(_MultipleSelectField);
|
|
777
777
|
const StyledToggleButtonGroup = styled(ToggleButtonGroup$1, {
|
|
778
|
-
shouldForwardProp: (prop) => prop !== "
|
|
779
|
-
})(
|
|
780
|
-
// Variants
|
|
781
|
-
...variant === "contained" && {
|
|
782
|
-
boxShadow: "none"
|
|
783
|
-
},
|
|
784
|
-
...variant === "unbounded" && {
|
|
785
|
-
boxShadow: "none",
|
|
786
|
-
borderRadius: theme.spacing(0.5),
|
|
787
|
-
"& .MuiDivider-root": {
|
|
788
|
-
height: theme.spacing(4),
|
|
789
|
-
"&.MuiToggleButtonGroup-groupedHorizontal": {
|
|
790
|
-
height: theme.spacing(4)
|
|
791
|
-
},
|
|
792
|
-
"&.MuiToggleButtonGroup-groupedVertical": {
|
|
793
|
-
height: "auto",
|
|
794
|
-
width: theme.spacing(4),
|
|
795
|
-
margin: `${theme.spacing(0.5, 0, 1)} !important`,
|
|
796
|
-
borderRadius: "0 !important"
|
|
797
|
-
}
|
|
798
|
-
},
|
|
799
|
-
"& .MuiToggleButton-sizeSmall": {
|
|
800
|
-
margin: 0,
|
|
801
|
-
"&.MuiToggleButtonGroup-grouped:not(.MuiDivider-root)": {
|
|
802
|
-
margin: 0
|
|
803
|
-
},
|
|
804
|
-
"& + .MuiDivider-root.MuiToggleButtonGroup-groupedHorizontal": {
|
|
805
|
-
height: theme.spacing(3)
|
|
806
|
-
},
|
|
807
|
-
"& + .MuiDivider-root.MuiToggleButtonGroup-groupedVertical": {
|
|
808
|
-
height: "auto",
|
|
809
|
-
width: theme.spacing(3)
|
|
810
|
-
}
|
|
811
|
-
},
|
|
812
|
-
".MuiToggleButtonGroup-grouped:not(.MuiDivider-root)": {
|
|
813
|
-
margin: 0,
|
|
814
|
-
"&:first-of-type": {
|
|
815
|
-
marginLeft: 0
|
|
816
|
-
},
|
|
817
|
-
"&:not(:last-of-type)": {
|
|
818
|
-
marginRight: theme.spacing(0.5)
|
|
819
|
-
}
|
|
820
|
-
},
|
|
821
|
-
"&.MuiToggleButtonGroup-horizontal:not(.MuiDivider-root)": {
|
|
822
|
-
".MuiToggleButtonGroup-grouped": {
|
|
823
|
-
margin: theme.spacing(0, 0.5)
|
|
824
|
-
}
|
|
825
|
-
},
|
|
826
|
-
"&.MuiToggleButtonGroup-vertical:not(.MuiDivider-root)": {
|
|
827
|
-
".MuiToggleButtonGroup-grouped": {
|
|
828
|
-
margin: theme.spacing(0, 0, 0.5),
|
|
829
|
-
"&:not(:last-of-type)": {
|
|
830
|
-
marginRight: 0
|
|
831
|
-
},
|
|
832
|
-
"&:last-of-type": {
|
|
833
|
-
marginBottom: 0
|
|
834
|
-
}
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
},
|
|
838
|
-
// Colors
|
|
839
|
-
...backgroundColor === "primary" && {
|
|
840
|
-
backgroundColor: theme.palette.background.paper
|
|
841
|
-
},
|
|
842
|
-
...backgroundColor === "secondary" && {
|
|
843
|
-
backgroundColor: theme.palette.background.default
|
|
844
|
-
},
|
|
845
|
-
...backgroundColor === "transparent" && {
|
|
846
|
-
backgroundColor: "transparent"
|
|
847
|
-
}
|
|
848
|
-
}));
|
|
778
|
+
shouldForwardProp: (prop) => prop !== "backgroundColor"
|
|
779
|
+
})();
|
|
849
780
|
function _ToggleButtonGroup({
|
|
850
781
|
children,
|
|
851
782
|
variant = "floating",
|
|
@@ -861,6 +792,7 @@ function _ToggleButtonGroup({
|
|
|
861
792
|
StyledToggleButtonGroup,
|
|
862
793
|
{
|
|
863
794
|
...rest,
|
|
795
|
+
ref,
|
|
864
796
|
variant,
|
|
865
797
|
backgroundColor: resolvedBackgroundColor,
|
|
866
798
|
orientation,
|
|
@@ -870,7 +802,6 @@ function _ToggleButtonGroup({
|
|
|
870
802
|
"data-size": size,
|
|
871
803
|
"data-background-color": resolvedBackgroundColor,
|
|
872
804
|
"data-name": "toggle-button-group",
|
|
873
|
-
ref,
|
|
874
805
|
children
|
|
875
806
|
}
|
|
876
807
|
);
|
|
@@ -1998,7 +1929,7 @@ function SecondaryText({ text }) {
|
|
|
1998
1929
|
}
|
|
1999
1930
|
);
|
|
2000
1931
|
}
|
|
2001
|
-
const Root$
|
|
1932
|
+
const Root$5 = styled(AppBar$1)(({ theme }) => ({
|
|
2002
1933
|
backgroundColor: theme.palette.brand.appBarMain,
|
|
2003
1934
|
userSelect: "none",
|
|
2004
1935
|
"& .MuiTypography-root": {
|
|
@@ -2033,7 +1964,7 @@ function _AppBar({
|
|
|
2033
1964
|
onClickMenu,
|
|
2034
1965
|
...otherProps
|
|
2035
1966
|
}, ref) {
|
|
2036
|
-
return /* @__PURE__ */ jsx(Root$
|
|
1967
|
+
return /* @__PURE__ */ jsx(Root$5, { ...otherProps, ref, "data-name": "app-bar", children: /* @__PURE__ */ jsxs(Toolbar, { children: [
|
|
2037
1968
|
/* @__PURE__ */ jsxs(BrandElements, { children: [
|
|
2038
1969
|
showBurgerMenu && /* @__PURE__ */ jsx(BurgerMenu, { onClickMenu }),
|
|
2039
1970
|
brandLogo && /* @__PURE__ */ jsx(BrandLogo, { logo: brandLogo }),
|
|
@@ -2713,7 +2644,7 @@ function CodeAreaInput({
|
|
|
2713
2644
|
}
|
|
2714
2645
|
);
|
|
2715
2646
|
}
|
|
2716
|
-
const Root$
|
|
2647
|
+
const Root$4 = styled(FormControl)(() => ({
|
|
2717
2648
|
display: "flex",
|
|
2718
2649
|
flexDirection: "column",
|
|
2719
2650
|
flex: 1
|
|
@@ -2905,7 +2836,7 @@ function CodeAreaField({
|
|
|
2905
2836
|
const readOnly = (options == null ? void 0 : options.readOnly) ?? false;
|
|
2906
2837
|
const lineNumbers = (options == null ? void 0 : options.lineNumbers) ?? true;
|
|
2907
2838
|
return /* @__PURE__ */ jsxs(
|
|
2908
|
-
Root$
|
|
2839
|
+
Root$4,
|
|
2909
2840
|
{
|
|
2910
2841
|
size,
|
|
2911
2842
|
error,
|
|
@@ -3302,6 +3233,8 @@ function DialogHeader({
|
|
|
3302
3233
|
"aria-label": ariaLabel,
|
|
3303
3234
|
closeIcon,
|
|
3304
3235
|
closeTooltipText,
|
|
3236
|
+
tooltipProps,
|
|
3237
|
+
iconButtonProps,
|
|
3305
3238
|
...otherProps
|
|
3306
3239
|
}) {
|
|
3307
3240
|
const closeTooltipLabel = useTranslationWithFallback(
|
|
@@ -3327,7 +3260,15 @@ function DialogHeader({
|
|
|
3327
3260
|
] }),
|
|
3328
3261
|
/* @__PURE__ */ jsxs(ItemsWrapper$1, { children: [
|
|
3329
3262
|
secondaryActions,
|
|
3330
|
-
onClose && /* @__PURE__ */ jsx(
|
|
3263
|
+
onClose && /* @__PURE__ */ jsx(
|
|
3264
|
+
Tooltip,
|
|
3265
|
+
{
|
|
3266
|
+
title: closeTooltipLabel,
|
|
3267
|
+
placement: "left",
|
|
3268
|
+
...tooltipProps,
|
|
3269
|
+
children: /* @__PURE__ */ jsx(IconButton$1, { onClick: onClose, ...iconButtonProps, children: closeIcon || /* @__PURE__ */ jsx(CloseIcon, { "data-testid": "CloseIcon" }) })
|
|
3270
|
+
}
|
|
3271
|
+
)
|
|
3331
3272
|
] })
|
|
3332
3273
|
] }),
|
|
3333
3274
|
children
|
|
@@ -3470,7 +3411,7 @@ function DialogAlert({
|
|
|
3470
3411
|
}) {
|
|
3471
3412
|
return /* @__PURE__ */ jsx(StyledAlert, { severity, ...otherProps, "data-name": "dialog-alert", children });
|
|
3472
3413
|
}
|
|
3473
|
-
const Root$
|
|
3414
|
+
const Root$3 = styled(Box, {
|
|
3474
3415
|
shouldForwardProp: (prop) => !["dark", "hasChildren"].includes(prop)
|
|
3475
3416
|
})(({ dark, hasChildren, theme }) => ({
|
|
3476
3417
|
flex: "0 0 auto",
|
|
@@ -3538,7 +3479,7 @@ function DialogFooter({
|
|
|
3538
3479
|
topContent,
|
|
3539
3480
|
!!alertContent && /* @__PURE__ */ jsx(DividerTop, {}),
|
|
3540
3481
|
/* @__PURE__ */ jsxs(
|
|
3541
|
-
Root$
|
|
3482
|
+
Root$3,
|
|
3542
3483
|
{
|
|
3543
3484
|
...otherProps,
|
|
3544
3485
|
dark,
|
|
@@ -3591,10 +3532,13 @@ function DialogConfirmation({
|
|
|
3591
3532
|
opened,
|
|
3592
3533
|
"data-testid": dataTestId,
|
|
3593
3534
|
"aria-label": ariaLabel,
|
|
3535
|
+
slideProps,
|
|
3594
3536
|
...alertProps
|
|
3595
3537
|
}) {
|
|
3596
3538
|
const containerRef = useRef(null);
|
|
3597
3539
|
const theme = useTheme();
|
|
3540
|
+
const timeout = (slideProps == null ? void 0 : slideProps.timeout) ?? 350;
|
|
3541
|
+
const direction = (slideProps == null ? void 0 : slideProps.direction) ?? "up";
|
|
3598
3542
|
const handleClickAway = () => {
|
|
3599
3543
|
if (onClickAway) {
|
|
3600
3544
|
onClickAway();
|
|
@@ -3611,13 +3555,17 @@ function DialogConfirmation({
|
|
|
3611
3555
|
children: /* @__PURE__ */ jsx(ClickAwayListener$1, { onClickAway: handleClickAway, children: /* @__PURE__ */ jsx(
|
|
3612
3556
|
Slide,
|
|
3613
3557
|
{
|
|
3614
|
-
direction: "up",
|
|
3615
|
-
in: opened,
|
|
3616
|
-
container: containerRef.current,
|
|
3617
3558
|
mountOnEnter: true,
|
|
3618
3559
|
unmountOnExit: true,
|
|
3619
3560
|
easing: theme.transitions.easing.easeOut,
|
|
3620
|
-
|
|
3561
|
+
direction,
|
|
3562
|
+
timeout,
|
|
3563
|
+
...slideProps,
|
|
3564
|
+
in: opened,
|
|
3565
|
+
container: containerRef.current,
|
|
3566
|
+
"data-name": "dialog-confirmation-slide",
|
|
3567
|
+
"data-direction": direction,
|
|
3568
|
+
"data-timeout": timeout,
|
|
3621
3569
|
children: /* @__PURE__ */ jsx(AnimationWrapper, { children: /* @__PURE__ */ jsxs(BackdropContent, { children: [
|
|
3622
3570
|
/* @__PURE__ */ jsx(DialogAlert, { severity, ...alertProps, children }),
|
|
3623
3571
|
/* @__PURE__ */ jsx(DialogActions, { children: actions })
|
|
@@ -3627,7 +3575,7 @@ function DialogConfirmation({
|
|
|
3627
3575
|
}
|
|
3628
3576
|
);
|
|
3629
3577
|
}
|
|
3630
|
-
const Root$
|
|
3578
|
+
const Root$2 = styled(Box)(({ theme }) => ({
|
|
3631
3579
|
display: "flex",
|
|
3632
3580
|
alignItems: "center",
|
|
3633
3581
|
justifyContent: "center",
|
|
@@ -3708,7 +3656,7 @@ function DialogStepper({
|
|
|
3708
3656
|
stepsLabels,
|
|
3709
3657
|
...props
|
|
3710
3658
|
}) {
|
|
3711
|
-
return /* @__PURE__ */ jsx(Root$
|
|
3659
|
+
return /* @__PURE__ */ jsx(Root$2, { ...props, "data-name": "dialog-stepper", children: /* @__PURE__ */ jsx(Box, { sx: { display: "flex" }, children: stepsLabels.map((stepLabel, idx) => {
|
|
3712
3660
|
const step = idx + 1;
|
|
3713
3661
|
const isCurrent = step === currentStep;
|
|
3714
3662
|
const isCompleted = step < currentStep;
|
|
@@ -3994,7 +3942,7 @@ function ClearButton({
|
|
|
3994
3942
|
}
|
|
3995
3943
|
) });
|
|
3996
3944
|
}
|
|
3997
|
-
const Root = styled(Box, {
|
|
3945
|
+
const Root$1 = styled(Box, {
|
|
3998
3946
|
shouldForwardProp: (prop) => !["size", "variant", "readOnly"].includes(prop)
|
|
3999
3947
|
})(({ size, variant, readOnly, theme }) => ({
|
|
4000
3948
|
// There is no specific slot to change TextField styles at DatePicker level, so we need to wrap our component to isolate this override. https://mui.com/x/react-date-pickers/date-picker/#customization
|
|
@@ -4034,7 +3982,7 @@ function DateFieldContainer({
|
|
|
4034
3982
|
readOnly,
|
|
4035
3983
|
...props
|
|
4036
3984
|
}) {
|
|
4037
|
-
return /* @__PURE__ */ jsx(Root, { ...props, size, variant, readOnly, children });
|
|
3985
|
+
return /* @__PURE__ */ jsx(Root$1, { ...props, size, variant, readOnly, children });
|
|
4038
3986
|
}
|
|
4039
3987
|
function DatePicker({
|
|
4040
3988
|
handleClear,
|
|
@@ -4718,6 +4666,124 @@ function DateTimePicker({
|
|
|
4718
4666
|
}
|
|
4719
4667
|
);
|
|
4720
4668
|
}
|
|
4669
|
+
const EMPTY_STATE_WIDTH = 576;
|
|
4670
|
+
const Root = styled(Stack, {
|
|
4671
|
+
shouldForwardProp: (prop) => prop !== "size" && prop !== "spacing" && prop !== "contentHeight" && prop !== "contentWidth"
|
|
4672
|
+
})(
|
|
4673
|
+
({ size = "medium", spacing, contentHeight, contentWidth, theme }) => ({
|
|
4674
|
+
display: "flex",
|
|
4675
|
+
justifyContent: "center",
|
|
4676
|
+
alignItems: "center",
|
|
4677
|
+
gap: theme.spacing(spacing ?? (size === "small" ? 1 : 2)),
|
|
4678
|
+
maxWidth: contentWidth ?? EMPTY_STATE_WIDTH,
|
|
4679
|
+
height: contentHeight,
|
|
4680
|
+
minHeight: contentHeight,
|
|
4681
|
+
margin: "0 auto"
|
|
4682
|
+
})
|
|
4683
|
+
);
|
|
4684
|
+
const IconWrapper = styled(Box, {
|
|
4685
|
+
shouldForwardProp: (prop) => prop !== "size" && prop !== "iconSize" && prop !== "iconColor"
|
|
4686
|
+
})(({ size, iconSize, iconColor = "default", theme }) => {
|
|
4687
|
+
const finalIconSize = iconSize ?? (size === "small" ? theme.spacing(5) : theme.spacing(6));
|
|
4688
|
+
return {
|
|
4689
|
+
display: "flex",
|
|
4690
|
+
".MuiSvgIcon-root": {
|
|
4691
|
+
width: finalIconSize,
|
|
4692
|
+
height: finalIconSize,
|
|
4693
|
+
fontSize: finalIconSize,
|
|
4694
|
+
...iconColor === "primary" && {
|
|
4695
|
+
color: theme.palette.primary.relatedLight
|
|
4696
|
+
},
|
|
4697
|
+
...iconColor === "secondary" && {
|
|
4698
|
+
color: theme.palette.secondary.relatedLight
|
|
4699
|
+
},
|
|
4700
|
+
...iconColor === "default" && {
|
|
4701
|
+
color: theme.palette.text.disabled
|
|
4702
|
+
}
|
|
4703
|
+
}
|
|
4704
|
+
};
|
|
4705
|
+
});
|
|
4706
|
+
const TextContent = styled(Stack)(({ theme }) => ({
|
|
4707
|
+
display: "flex",
|
|
4708
|
+
flexDirection: "column",
|
|
4709
|
+
alignItems: "center",
|
|
4710
|
+
gap: theme.spacing(0.5),
|
|
4711
|
+
textAlign: "center"
|
|
4712
|
+
}));
|
|
4713
|
+
const Actions = styled(Stack, {
|
|
4714
|
+
shouldForwardProp: (prop) => prop !== "size" && prop !== "spacing"
|
|
4715
|
+
})(({ size = "medium", spacing, theme }) => ({
|
|
4716
|
+
display: "flex",
|
|
4717
|
+
alignItems: "center",
|
|
4718
|
+
gap: theme.spacing(spacing ?? (size === "small" ? 1 : 2)),
|
|
4719
|
+
marginTop: theme.spacing(size === "small" ? 1 : 2),
|
|
4720
|
+
".MuiButton-root + .MuiButton-root": {
|
|
4721
|
+
marginLeft: 0
|
|
4722
|
+
}
|
|
4723
|
+
}));
|
|
4724
|
+
function _EmptyState({
|
|
4725
|
+
icon,
|
|
4726
|
+
title,
|
|
4727
|
+
description,
|
|
4728
|
+
actions,
|
|
4729
|
+
children,
|
|
4730
|
+
size = "medium",
|
|
4731
|
+
spacing,
|
|
4732
|
+
iconProps,
|
|
4733
|
+
contentWidth = EMPTY_STATE_WIDTH,
|
|
4734
|
+
contentHeight,
|
|
4735
|
+
sx,
|
|
4736
|
+
...otherProps
|
|
4737
|
+
}, ref) {
|
|
4738
|
+
const hasAnyTextContent = title || description;
|
|
4739
|
+
const isSmall = size === "small";
|
|
4740
|
+
const iconSize = (iconProps == null ? void 0 : iconProps.size) ?? (isSmall ? 40 : 48);
|
|
4741
|
+
const iconColor = (iconProps == null ? void 0 : iconProps.color) ?? "default";
|
|
4742
|
+
return /* @__PURE__ */ jsxs(
|
|
4743
|
+
Root,
|
|
4744
|
+
{
|
|
4745
|
+
ref,
|
|
4746
|
+
alignItems: "center",
|
|
4747
|
+
size,
|
|
4748
|
+
spacing,
|
|
4749
|
+
contentHeight,
|
|
4750
|
+
contentWidth,
|
|
4751
|
+
"data-name": "empty-state",
|
|
4752
|
+
sx,
|
|
4753
|
+
...otherProps,
|
|
4754
|
+
"data-size": size,
|
|
4755
|
+
"data-spacing": spacing,
|
|
4756
|
+
"data-content-height": contentHeight,
|
|
4757
|
+
"data-content-width": contentWidth,
|
|
4758
|
+
"data-icon-size": iconSize,
|
|
4759
|
+
"data-icon-color": iconColor,
|
|
4760
|
+
children: [
|
|
4761
|
+
icon && /* @__PURE__ */ jsx(IconWrapper, { size, iconSize, iconColor, children: icon }),
|
|
4762
|
+
hasAnyTextContent && /* @__PURE__ */ jsxs(TextContent, { children: [
|
|
4763
|
+
title && /* @__PURE__ */ jsx(
|
|
4764
|
+
Typography,
|
|
4765
|
+
{
|
|
4766
|
+
variant: isSmall ? "body2" : "body1",
|
|
4767
|
+
color: "textSecondary",
|
|
4768
|
+
children: title
|
|
4769
|
+
}
|
|
4770
|
+
),
|
|
4771
|
+
description && /* @__PURE__ */ jsx(
|
|
4772
|
+
Typography,
|
|
4773
|
+
{
|
|
4774
|
+
variant: isSmall ? "caption" : "body2",
|
|
4775
|
+
color: "textSecondary",
|
|
4776
|
+
children: description
|
|
4777
|
+
}
|
|
4778
|
+
)
|
|
4779
|
+
] }),
|
|
4780
|
+
actions && /* @__PURE__ */ jsx(Actions, { size, spacing, children: actions }),
|
|
4781
|
+
children
|
|
4782
|
+
]
|
|
4783
|
+
}
|
|
4784
|
+
);
|
|
4785
|
+
}
|
|
4786
|
+
const EmptyState = forwardRef(_EmptyState);
|
|
4721
4787
|
const DEFAULT_ITEMS = [{ outlinedBullet: false, value: "" }];
|
|
4722
4788
|
const Content$2 = styled("ul")(({ theme }) => ({
|
|
4723
4789
|
listStyle: "none",
|
|
@@ -6235,6 +6301,7 @@ export {
|
|
|
6235
6301
|
DialogPaper,
|
|
6236
6302
|
DialogStepper,
|
|
6237
6303
|
EllipsisWithTooltip,
|
|
6304
|
+
EmptyState,
|
|
6238
6305
|
FilterDropdown,
|
|
6239
6306
|
FilterDropdownMenuItem,
|
|
6240
6307
|
IconButton,
|
|
@@ -1,220 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const material = require("@mui/material");
|
|
3
2
|
const require$$0 = require("react-is");
|
|
4
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const material = require("@mui/material");
|
|
5
5
|
const React = require("react");
|
|
6
6
|
const iconsMaterial = require("@mui/icons-material");
|
|
7
7
|
const reactIntl = require("react-intl");
|
|
8
|
-
const COLOR_BLACK = "#2C3032";
|
|
9
|
-
const COLOR_WHITE = "#FFFFFF";
|
|
10
|
-
const COLOR_UNUSED = "#e91e63";
|
|
11
|
-
const baseColors = {
|
|
12
|
-
common: {
|
|
13
|
-
black: COLOR_BLACK,
|
|
14
|
-
white: COLOR_WHITE
|
|
15
|
-
},
|
|
16
|
-
neutral: {
|
|
17
|
-
50: "#f8f9f9",
|
|
18
|
-
100: "#e1e3e4",
|
|
19
|
-
200: "#cbcdcf",
|
|
20
|
-
300: "#b4b8ba",
|
|
21
|
-
400: "#9da2a6",
|
|
22
|
-
500: "#868d91",
|
|
23
|
-
600: "#6f777c",
|
|
24
|
-
700: "#595f63",
|
|
25
|
-
800: "#43474a",
|
|
26
|
-
900: COLOR_BLACK,
|
|
27
|
-
A100: "#ddddde",
|
|
28
|
-
A200: "#b9babb",
|
|
29
|
-
A400: "#7c7e7f",
|
|
30
|
-
A700: "#16191A"
|
|
31
|
-
},
|
|
32
|
-
blue: {
|
|
33
|
-
100: "#B9DAF9",
|
|
34
|
-
200: "#5DB2F6",
|
|
35
|
-
300: "#358BE7",
|
|
36
|
-
400: "#036FE2",
|
|
37
|
-
500: "#024D9E"
|
|
38
|
-
},
|
|
39
|
-
green: {
|
|
40
|
-
300: "#6BE2AD",
|
|
41
|
-
400: "#47DB99",
|
|
42
|
-
500: "#31996B"
|
|
43
|
-
},
|
|
44
|
-
lightGreen: {
|
|
45
|
-
300: "#8CB24A",
|
|
46
|
-
400: "#709F1D",
|
|
47
|
-
500: "#435F11"
|
|
48
|
-
},
|
|
49
|
-
indigo: {
|
|
50
|
-
300: "#34689F",
|
|
51
|
-
400: "#024388",
|
|
52
|
-
500: "#012C5A"
|
|
53
|
-
},
|
|
54
|
-
orange: {
|
|
55
|
-
300: "#F4B134",
|
|
56
|
-
400: "#F29E02",
|
|
57
|
-
500: "#A96E01"
|
|
58
|
-
},
|
|
59
|
-
red: {
|
|
60
|
-
300: "#CD593B",
|
|
61
|
-
400: "#C1300B",
|
|
62
|
-
500: "#872107"
|
|
63
|
-
},
|
|
64
|
-
qualitative: {
|
|
65
|
-
// CARTO colors
|
|
66
|
-
// TODO: Related discussion https://app.shortcut.com/cartoteam/story/264834/
|
|
67
|
-
bold: {
|
|
68
|
-
0: "#7F3C8D",
|
|
69
|
-
1: "#11A579",
|
|
70
|
-
2: "#3969AC",
|
|
71
|
-
3: "#F2B701",
|
|
72
|
-
4: "#E73F74",
|
|
73
|
-
5: "#80BA5A",
|
|
74
|
-
6: "#E68310",
|
|
75
|
-
7: "#008695",
|
|
76
|
-
8: "#CF1C90",
|
|
77
|
-
9: "#f97b72",
|
|
78
|
-
10: "#4b4b8f",
|
|
79
|
-
11: "#A5AA99"
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
shades: {
|
|
83
|
-
dark: {
|
|
84
|
-
90: material.alpha(COLOR_BLACK, 0.9),
|
|
85
|
-
60: material.alpha(COLOR_BLACK, 0.6),
|
|
86
|
-
40: material.alpha(COLOR_BLACK, 0.4),
|
|
87
|
-
25: material.alpha(COLOR_BLACK, 0.25),
|
|
88
|
-
12: material.alpha(COLOR_BLACK, 0.12),
|
|
89
|
-
8: material.alpha(COLOR_BLACK, 0.08),
|
|
90
|
-
4: material.alpha(COLOR_BLACK, 0.04)
|
|
91
|
-
},
|
|
92
|
-
light: {
|
|
93
|
-
90: material.alpha(COLOR_WHITE, 0.9),
|
|
94
|
-
60: material.alpha(COLOR_WHITE, 0.6),
|
|
95
|
-
40: material.alpha(COLOR_WHITE, 0.4),
|
|
96
|
-
25: material.alpha(COLOR_WHITE, 0.25),
|
|
97
|
-
12: material.alpha(COLOR_WHITE, 0.12),
|
|
98
|
-
8: material.alpha(COLOR_WHITE, 0.08),
|
|
99
|
-
4: material.alpha(COLOR_WHITE, 0.04)
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
const commonPalette = {
|
|
104
|
-
mode: "light",
|
|
105
|
-
contrastThreshold: 3,
|
|
106
|
-
tonalOffset: 0.2,
|
|
107
|
-
common: { ...baseColors.common },
|
|
108
|
-
primary: {
|
|
109
|
-
main: baseColors.blue[400],
|
|
110
|
-
dark: baseColors.blue[500],
|
|
111
|
-
light: baseColors.blue[300],
|
|
112
|
-
contrastText: baseColors.common.white,
|
|
113
|
-
background: material.alpha(baseColors.blue[400], 0.08),
|
|
114
|
-
relatedLight: "#EAF2FC",
|
|
115
|
-
relatedDark: COLOR_UNUSED
|
|
116
|
-
},
|
|
117
|
-
secondary: {
|
|
118
|
-
main: baseColors.green[400],
|
|
119
|
-
dark: baseColors.green[500],
|
|
120
|
-
light: baseColors.green[300],
|
|
121
|
-
contrastText: baseColors.common.black,
|
|
122
|
-
background: material.alpha(baseColors.green[400], 0.08),
|
|
123
|
-
relatedLight: "#EFFCF5",
|
|
124
|
-
relatedDark: COLOR_UNUSED
|
|
125
|
-
},
|
|
126
|
-
text: {
|
|
127
|
-
primary: baseColors.common.black,
|
|
128
|
-
secondary: baseColors.shades.dark[60],
|
|
129
|
-
disabled: baseColors.shades.dark[25],
|
|
130
|
-
hint: baseColors.shades.dark[40]
|
|
131
|
-
},
|
|
132
|
-
background: {
|
|
133
|
-
paper: baseColors.common.white,
|
|
134
|
-
default: baseColors.neutral[50]
|
|
135
|
-
},
|
|
136
|
-
action: {
|
|
137
|
-
active: baseColors.shades.dark[40],
|
|
138
|
-
hover: baseColors.shades.dark[8],
|
|
139
|
-
disabledBackground: baseColors.neutral[100],
|
|
140
|
-
disabled: baseColors.shades.dark[25],
|
|
141
|
-
selected: baseColors.shades.dark[12],
|
|
142
|
-
focus: baseColors.shades.dark[12],
|
|
143
|
-
activatedOpacity: 0.12,
|
|
144
|
-
hoverOpacity: 0.04,
|
|
145
|
-
selectedOpacity: 0.08,
|
|
146
|
-
disabledOpacity: 0.38,
|
|
147
|
-
focusOpacity: 0.12
|
|
148
|
-
},
|
|
149
|
-
info: {
|
|
150
|
-
main: baseColors.indigo[400],
|
|
151
|
-
dark: baseColors.indigo[500],
|
|
152
|
-
light: baseColors.indigo[300],
|
|
153
|
-
contrastText: baseColors.common.white,
|
|
154
|
-
relatedDark: "#0D2B4A",
|
|
155
|
-
relatedLight: "#E9EEF4",
|
|
156
|
-
background: COLOR_UNUSED
|
|
157
|
-
},
|
|
158
|
-
success: {
|
|
159
|
-
main: baseColors.lightGreen[400],
|
|
160
|
-
dark: baseColors.lightGreen[500],
|
|
161
|
-
light: baseColors.lightGreen[300],
|
|
162
|
-
contrastText: baseColors.common.white,
|
|
163
|
-
relatedDark: "#3D541A",
|
|
164
|
-
relatedLight: "#F2F5EB",
|
|
165
|
-
background: COLOR_UNUSED
|
|
166
|
-
},
|
|
167
|
-
warning: {
|
|
168
|
-
main: baseColors.orange[400],
|
|
169
|
-
dark: baseColors.orange[500],
|
|
170
|
-
light: baseColors.orange[300],
|
|
171
|
-
contrastText: baseColors.common.black,
|
|
172
|
-
relatedDark: "#78540F",
|
|
173
|
-
relatedLight: "#FEF6EA",
|
|
174
|
-
background: COLOR_UNUSED
|
|
175
|
-
},
|
|
176
|
-
error: {
|
|
177
|
-
main: baseColors.red[400],
|
|
178
|
-
light: baseColors.red[300],
|
|
179
|
-
dark: baseColors.red[500],
|
|
180
|
-
contrastText: baseColors.common.white,
|
|
181
|
-
relatedDark: "#622215",
|
|
182
|
-
relatedLight: "#F9EDEA",
|
|
183
|
-
background: COLOR_UNUSED
|
|
184
|
-
},
|
|
185
|
-
grey: {
|
|
186
|
-
...baseColors.neutral
|
|
187
|
-
},
|
|
188
|
-
divider: baseColors.shades.dark[12],
|
|
189
|
-
// Custom common colors
|
|
190
|
-
default: {
|
|
191
|
-
main: baseColors.neutral[100],
|
|
192
|
-
dark: baseColors.neutral[200],
|
|
193
|
-
light: baseColors.neutral[50],
|
|
194
|
-
outlinedBorder: baseColors.shades.dark[25],
|
|
195
|
-
background: baseColors.shades.dark[4],
|
|
196
|
-
relatedLight: COLOR_UNUSED,
|
|
197
|
-
relatedDark: COLOR_UNUSED,
|
|
198
|
-
contrastText: COLOR_UNUSED
|
|
199
|
-
},
|
|
200
|
-
brand: {
|
|
201
|
-
navyBlue: "#162945",
|
|
202
|
-
locationRed: "#EB1510",
|
|
203
|
-
predictionBlue: "#1785FB",
|
|
204
|
-
softBlue: "#F2F6F9",
|
|
205
|
-
appBarMain: "#162945",
|
|
206
|
-
appBarContrastText: baseColors.common.white
|
|
207
|
-
},
|
|
208
|
-
white: {
|
|
209
|
-
...baseColors.shades.light
|
|
210
|
-
},
|
|
211
|
-
black: {
|
|
212
|
-
...baseColors.shades.dark
|
|
213
|
-
},
|
|
214
|
-
qualitative: {
|
|
215
|
-
...baseColors.qualitative
|
|
216
|
-
}
|
|
217
|
-
};
|
|
218
8
|
function getDefaultExportFromCjs(x) {
|
|
219
9
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
220
10
|
}
|
|
@@ -5977,7 +5767,6 @@ exports.NOTIFICATION_DURATION_IN_MS = NOTIFICATION_DURATION_IN_MS;
|
|
|
5977
5767
|
exports.SPACING = SPACING;
|
|
5978
5768
|
exports.TablePaginationActions = TablePaginationActions;
|
|
5979
5769
|
exports.Typography = Typography;
|
|
5980
|
-
exports.commonPalette = commonPalette;
|
|
5981
5770
|
exports.ellipsisStyles = ellipsisStyles;
|
|
5982
5771
|
exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
|
|
5983
5772
|
exports.getSpacing = getSpacing;
|