@carto/meridian-ds 2.8.0-alpha-empty-state.1 → 2.8.0-alpha-empty-state.2

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.
@@ -2,6 +2,18 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import { styled, MenuItem as MenuItem$1 } from "@mui/material";
4
4
  import { f as MENU_ITEM_SIZE_DENSE, h as MENU_ITEM_SIZE_EXTENDED } from "./css-utils-CjUBRJVK.js";
5
+ function getPixelToRem(px) {
6
+ const fontBase = 16;
7
+ const rem = 1 / fontBase * px + "rem";
8
+ return rem;
9
+ }
10
+ function getThemeColor(colorPath, theme) {
11
+ const colorValue = colorPath.split(".").reduce(
12
+ (acc, part) => acc && typeof acc === "object" && part in acc ? acc[part] : void 0,
13
+ theme.palette
14
+ );
15
+ return typeof colorValue === "string" ? colorValue : void 0;
16
+ }
5
17
  const StyledMenuItem = styled(MenuItem$1, {
6
18
  shouldForwardProp: (prop) => !["subtitle", "destructive", "extended", "fixed", "iconColor"].includes(
7
19
  prop
@@ -175,5 +187,7 @@ function _MenuItem({
175
187
  }
176
188
  const MenuItem = forwardRef(_MenuItem);
177
189
  export {
178
- MenuItem as M
190
+ MenuItem as M,
191
+ getThemeColor as a,
192
+ getPixelToRem as g
179
193
  };
@@ -3,6 +3,18 @@ const jsxRuntime = require("react/jsx-runtime");
3
3
  const React = require("react");
4
4
  const material = require("@mui/material");
5
5
  const cssUtils = require("./css-utils-CH7es90t.cjs");
6
+ function getPixelToRem(px) {
7
+ const fontBase = 16;
8
+ const rem = 1 / fontBase * px + "rem";
9
+ return rem;
10
+ }
11
+ function getThemeColor(colorPath, theme) {
12
+ const colorValue = colorPath.split(".").reduce(
13
+ (acc, part) => acc && typeof acc === "object" && part in acc ? acc[part] : void 0,
14
+ theme.palette
15
+ );
16
+ return typeof colorValue === "string" ? colorValue : void 0;
17
+ }
6
18
  const StyledMenuItem = material.styled(material.MenuItem, {
7
19
  shouldForwardProp: (prop) => !["subtitle", "destructive", "extended", "fixed", "iconColor"].includes(
8
20
  prop
@@ -176,3 +188,5 @@ function _MenuItem({
176
188
  }
177
189
  const MenuItem = React.forwardRef(_MenuItem);
178
190
  exports.MenuItem = MenuItem;
191
+ exports.getPixelToRem = getPixelToRem;
192
+ exports.getThemeColor = getThemeColor;
@@ -8,7 +8,7 @@ const cssUtils = require("../css-utils-CH7es90t.cjs");
8
8
  const Alert$1 = require("../Alert-C4W0H_uN.cjs");
9
9
  const ArrowDown = require("../ArrowDown-DJ0vhbsw.cjs");
10
10
  const OpenDiagonallyRight = require("../OpenDiagonallyRight-CpL4ROwg.cjs");
11
- const MenuItem = require("../MenuItem-CgF4QdGi.cjs");
11
+ const MenuItem = require("../MenuItem-DoBJsRR_.cjs");
12
12
  require("cartocolor");
13
13
  const reactWindow = require("react-window");
14
14
  const reactCodemirror2 = require("react-codemirror2");
@@ -4683,23 +4683,16 @@ const Root = material.styled(material.Stack, {
4683
4683
  );
4684
4684
  const IconWrapper = material.styled(material.Box, {
4685
4685
  shouldForwardProp: (prop) => prop !== "size" && prop !== "iconSize" && prop !== "iconColor"
4686
- })(({ size, iconSize, iconColor = "default", theme }) => {
4686
+ })(({ size, iconSize, iconColor, theme }) => {
4687
4687
  const finalIconSize = iconSize ?? (size === "small" ? theme.spacing(5) : theme.spacing(6));
4688
+ const colorValue = iconColor === null || iconColor === void 0 ? void 0 : MenuItem.getThemeColor(iconColor, theme);
4688
4689
  return {
4689
4690
  display: "flex",
4690
4691
  ".MuiSvgIcon-root": {
4691
4692
  width: finalIconSize,
4692
4693
  height: finalIconSize,
4693
4694
  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
- }
4695
+ ...colorValue && { color: colorValue }
4703
4696
  }
4704
4697
  };
4705
4698
  });
@@ -4733,12 +4726,14 @@ function _EmptyState({
4733
4726
  contentWidth = EMPTY_STATE_WIDTH,
4734
4727
  contentHeight,
4735
4728
  sx,
4729
+ titleProps,
4730
+ descriptionProps,
4736
4731
  ...otherProps
4737
4732
  }, ref) {
4738
4733
  const hasAnyTextContent = title || description;
4739
4734
  const isSmall = size === "small";
4740
4735
  const iconSize = (iconProps == null ? void 0 : iconProps.size) ?? (isSmall ? 40 : 48);
4741
- const iconColor = (iconProps == null ? void 0 : iconProps.color) ?? "default";
4736
+ const iconColor = iconProps && "color" in iconProps && iconProps.color === null ? null : (iconProps == null ? void 0 : iconProps.color) ?? "text.disabled";
4742
4737
  return /* @__PURE__ */ jsxRuntime.jsxs(
4743
4738
  Root,
4744
4739
  {
@@ -4748,15 +4743,15 @@ function _EmptyState({
4748
4743
  spacing,
4749
4744
  contentHeight,
4750
4745
  contentWidth,
4751
- "data-name": "empty-state",
4752
4746
  sx,
4753
4747
  ...otherProps,
4748
+ "data-name": "empty-state",
4754
4749
  "data-size": size,
4755
4750
  "data-spacing": spacing,
4756
4751
  "data-content-height": contentHeight,
4757
4752
  "data-content-width": contentWidth,
4758
4753
  "data-icon-size": iconSize,
4759
- "data-icon-color": iconColor,
4754
+ "data-icon-color": iconColor ?? "null",
4760
4755
  children: [
4761
4756
  icon && /* @__PURE__ */ jsxRuntime.jsx(IconWrapper, { size, iconSize, iconColor, children: icon }),
4762
4757
  hasAnyTextContent && /* @__PURE__ */ jsxRuntime.jsxs(TextContent, { children: [
@@ -4765,6 +4760,7 @@ function _EmptyState({
4765
4760
  {
4766
4761
  variant: isSmall ? "body2" : "body1",
4767
4762
  color: "textSecondary",
4763
+ ...titleProps,
4768
4764
  children: title
4769
4765
  }
4770
4766
  ),
@@ -4773,6 +4769,7 @@ function _EmptyState({
4773
4769
  {
4774
4770
  variant: isSmall ? "caption" : "body2",
4775
4771
  color: "textSecondary",
4772
+ ...descriptionProps,
4776
4773
  children: description
4777
4774
  }
4778
4775
  )
@@ -8,7 +8,7 @@ import { S as ScreenReaderOnly, A as Alert$1 } from "../Alert-BZPM5zpX.js";
8
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-DRUK149i.js";
11
+ import { M as MenuItem$1, a as getThemeColor } from "../MenuItem-Cx5lTXXm.js";
12
12
  import "cartocolor";
13
13
  import { FixedSizeList } from "react-window";
14
14
  import { Controlled, UnControlled } from "react-codemirror2";
@@ -4683,23 +4683,16 @@ const Root = styled(Stack, {
4683
4683
  );
4684
4684
  const IconWrapper = styled(Box, {
4685
4685
  shouldForwardProp: (prop) => prop !== "size" && prop !== "iconSize" && prop !== "iconColor"
4686
- })(({ size, iconSize, iconColor = "default", theme }) => {
4686
+ })(({ size, iconSize, iconColor, theme }) => {
4687
4687
  const finalIconSize = iconSize ?? (size === "small" ? theme.spacing(5) : theme.spacing(6));
4688
+ const colorValue = iconColor === null || iconColor === void 0 ? void 0 : getThemeColor(iconColor, theme);
4688
4689
  return {
4689
4690
  display: "flex",
4690
4691
  ".MuiSvgIcon-root": {
4691
4692
  width: finalIconSize,
4692
4693
  height: finalIconSize,
4693
4694
  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
- }
4695
+ ...colorValue && { color: colorValue }
4703
4696
  }
4704
4697
  };
4705
4698
  });
@@ -4733,12 +4726,14 @@ function _EmptyState({
4733
4726
  contentWidth = EMPTY_STATE_WIDTH,
4734
4727
  contentHeight,
4735
4728
  sx,
4729
+ titleProps,
4730
+ descriptionProps,
4736
4731
  ...otherProps
4737
4732
  }, ref) {
4738
4733
  const hasAnyTextContent = title || description;
4739
4734
  const isSmall = size === "small";
4740
4735
  const iconSize = (iconProps == null ? void 0 : iconProps.size) ?? (isSmall ? 40 : 48);
4741
- const iconColor = (iconProps == null ? void 0 : iconProps.color) ?? "default";
4736
+ const iconColor = iconProps && "color" in iconProps && iconProps.color === null ? null : (iconProps == null ? void 0 : iconProps.color) ?? "text.disabled";
4742
4737
  return /* @__PURE__ */ jsxs(
4743
4738
  Root,
4744
4739
  {
@@ -4748,15 +4743,15 @@ function _EmptyState({
4748
4743
  spacing,
4749
4744
  contentHeight,
4750
4745
  contentWidth,
4751
- "data-name": "empty-state",
4752
4746
  sx,
4753
4747
  ...otherProps,
4748
+ "data-name": "empty-state",
4754
4749
  "data-size": size,
4755
4750
  "data-spacing": spacing,
4756
4751
  "data-content-height": contentHeight,
4757
4752
  "data-content-width": contentWidth,
4758
4753
  "data-icon-size": iconSize,
4759
- "data-icon-color": iconColor,
4754
+ "data-icon-color": iconColor ?? "null",
4760
4755
  children: [
4761
4756
  icon && /* @__PURE__ */ jsx(IconWrapper, { size, iconSize, iconColor, children: icon }),
4762
4757
  hasAnyTextContent && /* @__PURE__ */ jsxs(TextContent, { children: [
@@ -4765,6 +4760,7 @@ function _EmptyState({
4765
4760
  {
4766
4761
  variant: isSmall ? "body2" : "body1",
4767
4762
  color: "textSecondary",
4763
+ ...titleProps,
4768
4764
  children: title
4769
4765
  }
4770
4766
  ),
@@ -4773,6 +4769,7 @@ function _EmptyState({
4773
4769
  {
4774
4770
  variant: isSmall ? "caption" : "body2",
4775
4771
  color: "textSecondary",
4772
+ ...descriptionProps,
4776
4773
  children: description
4777
4774
  }
4778
4775
  )
@@ -3,12 +3,12 @@ var _a, _b, _c, _d, _e, _f, _g, _h;
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const material = require("@mui/material");
5
5
  const paletteUtils = require("../palette-utils-B9ybmwiI.cjs");
6
+ const MenuItem = require("../MenuItem-DoBJsRR_.cjs");
6
7
  const jsxRuntime = require("react/jsx-runtime");
7
8
  const cssUtils = require("../css-utils-CH7es90t.cjs");
8
9
  const iconsMaterial = require("@mui/icons-material");
9
10
  const ArrowDown = require("../ArrowDown-DJ0vhbsw.cjs");
10
11
  const xDatePickers = require("@mui/x-date-pickers");
11
- const MenuItem = require("../MenuItem-CgF4QdGi.cjs");
12
12
  const themeShadows = [
13
13
  "none",
14
14
  // 0
@@ -44,11 +44,6 @@ const themeShadows = [
44
44
  "0px 11px 15px -7px rgba(44, 48, 50, 0.12), 0px 24px 38px 3px rgba(44, 48, 50, 0.08), 0px 9px 46px 8px rgba(44, 48, 50, 0.04)"
45
45
  // 24
46
46
  ];
47
- function getPixelToRem(px) {
48
- const fontBase = 16;
49
- const rem = 1 / fontBase * px + "rem";
50
- return rem;
51
- }
52
47
  const baseTypography = {
53
48
  htmlFontSize: 16,
54
49
  fontFamily: "Inter, sans-serif",
@@ -62,77 +57,77 @@ const baseTypography = {
62
57
  h1: {
63
58
  fontFamily: "Inter, sans-serif",
64
59
  fontWeight: 600,
65
- fontSize: getPixelToRem(96),
60
+ fontSize: MenuItem.getPixelToRem(96),
66
61
  lineHeight: 1.167,
67
62
  letterSpacing: "-1.5px"
68
63
  },
69
64
  h2: {
70
65
  fontFamily: "Inter, sans-serif",
71
66
  fontWeight: 600,
72
- fontSize: getPixelToRem(60),
67
+ fontSize: MenuItem.getPixelToRem(60),
73
68
  lineHeight: 1.2,
74
69
  letterSpacing: "-0.5px"
75
70
  },
76
71
  h3: {
77
72
  fontFamily: "Inter, sans-serif",
78
73
  fontWeight: 600,
79
- fontSize: getPixelToRem(48),
74
+ fontSize: MenuItem.getPixelToRem(48),
80
75
  lineHeight: 1.167,
81
76
  letterSpacing: 0
82
77
  },
83
78
  h4: {
84
79
  fontFamily: "Inter, sans-serif",
85
80
  fontWeight: 600,
86
- fontSize: getPixelToRem(32),
81
+ fontSize: MenuItem.getPixelToRem(32),
87
82
  lineHeight: 1.25,
88
83
  letterSpacing: 0
89
84
  },
90
85
  h5: {
91
86
  fontFamily: "Inter, sans-serif",
92
87
  fontWeight: 600,
93
- fontSize: getPixelToRem(24),
88
+ fontSize: MenuItem.getPixelToRem(24),
94
89
  lineHeight: 1.167,
95
90
  letterSpacing: 0
96
91
  },
97
92
  h6: {
98
93
  fontFamily: "Inter, sans-serif",
99
94
  fontWeight: 500,
100
- fontSize: getPixelToRem(18),
95
+ fontSize: MenuItem.getPixelToRem(18),
101
96
  lineHeight: 1.333,
102
97
  letterSpacing: 0
103
98
  },
104
99
  subtitle1: {
105
100
  fontFamily: "Inter, sans-serif",
106
101
  fontWeight: 500,
107
- fontSize: getPixelToRem(16),
102
+ fontSize: MenuItem.getPixelToRem(16),
108
103
  lineHeight: 1.5,
109
104
  letterSpacing: 0
110
105
  },
111
106
  subtitle2: {
112
107
  fontFamily: "Inter, sans-serif",
113
108
  fontWeight: 600,
114
- fontSize: getPixelToRem(13),
109
+ fontSize: MenuItem.getPixelToRem(13),
115
110
  lineHeight: 1.538,
116
111
  letterSpacing: 0
117
112
  },
118
113
  body1: {
119
114
  fontFamily: "Inter, sans-serif",
120
115
  fontWeight: 400,
121
- fontSize: getPixelToRem(16),
116
+ fontSize: MenuItem.getPixelToRem(16),
122
117
  lineHeight: 1.5,
123
118
  letterSpacing: 0
124
119
  },
125
120
  body2: {
126
121
  fontFamily: "Inter, sans-serif",
127
122
  fontWeight: 400,
128
- fontSize: getPixelToRem(13),
123
+ fontSize: MenuItem.getPixelToRem(13),
129
124
  lineHeight: 1.538,
130
125
  letterSpacing: 0
131
126
  },
132
127
  button: {
133
128
  fontFamily: "Inter, sans-serif",
134
129
  fontWeight: 500,
135
- fontSize: getPixelToRem(13),
130
+ fontSize: MenuItem.getPixelToRem(13),
136
131
  lineHeight: 1.538,
137
132
  letterSpacing: 0,
138
133
  textTransform: "inherit"
@@ -140,14 +135,14 @@ const baseTypography = {
140
135
  caption: {
141
136
  fontFamily: "Inter, sans-serif",
142
137
  fontWeight: 400,
143
- fontSize: getPixelToRem(11),
138
+ fontSize: MenuItem.getPixelToRem(11),
144
139
  lineHeight: 1.454,
145
140
  letterSpacing: 0
146
141
  },
147
142
  overline: {
148
143
  fontFamily: "Inter, sans-serif",
149
144
  fontWeight: 500,
150
- fontSize: getPixelToRem(10),
145
+ fontSize: MenuItem.getPixelToRem(10),
151
146
  lineHeight: 1.2,
152
147
  letterSpacing: "1.2px",
153
148
  textTransform: "uppercase"
@@ -167,7 +162,7 @@ const customTypography = {
167
162
  code1: {
168
163
  fontFamily: '"Overpass Mono", monospace',
169
164
  fontWeight: 400,
170
- fontSize: getPixelToRem(16),
165
+ fontSize: MenuItem.getPixelToRem(16),
171
166
  lineHeight: 1.5,
172
167
  letterSpacing: 0,
173
168
  fontVariantLigatures: "no-common-ligatures"
@@ -175,7 +170,7 @@ const customTypography = {
175
170
  code2: {
176
171
  fontFamily: '"Overpass Mono", monospace',
177
172
  fontWeight: 400,
178
- fontSize: getPixelToRem(14),
173
+ fontSize: MenuItem.getPixelToRem(14),
179
174
  lineHeight: 1.428,
180
175
  letterSpacing: 0,
181
176
  fontVariantLigatures: "no-common-ligatures"
@@ -183,7 +178,7 @@ const customTypography = {
183
178
  code3: {
184
179
  fontFamily: '"Overpass Mono", monospace',
185
180
  fontWeight: 400,
186
- fontSize: getPixelToRem(12),
181
+ fontSize: MenuItem.getPixelToRem(12),
187
182
  lineHeight: 1.333,
188
183
  letterSpacing: 0,
189
184
  fontVariantLigatures: "no-common-ligatures"
@@ -2,13 +2,13 @@ var _a, _b, _c, _d, _e, _f, _g, _h;
2
2
  import { alpha, Tooltip, responsiveFontSizes, createTheme } from "@mui/material";
3
3
  import { c as commonPalette } from "../palette-utils-BHqJlHm9.js";
4
4
  import { g } from "../palette-utils-BHqJlHm9.js";
5
+ import { g as getPixelToRem, M as MenuItem } from "../MenuItem-Cx5lTXXm.js";
5
6
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
6
7
  import { T as Typography, a as TablePaginationActions, I as ICON_SIZE_LARGE, b as ICON_SIZE_MEDIUM, c as ICON_SIZE_SMALL, g as getSpacing, e as ellipsisStyles, M as MENU_ITEM_SIZE_DEFAULT, d as MENU_LIST_MAX_SIZE, f as MENU_ITEM_SIZE_DENSE, A as APPBAR_SIZE, B as BREAKPOINTS, S as SPACING } from "../css-utils-CjUBRJVK.js";
7
8
  import { h, N } from "../css-utils-CjUBRJVK.js";
8
9
  import { Cancel, EventOutlined, ChevronRightOutlined, ChevronLeftOutlined, ExpandMoreOutlined, CheckCircleOutlined, InfoOutlined } from "@mui/icons-material";
9
10
  import { A as ArrowDown } from "../ArrowDown-d6bxUL0F.js";
10
11
  import { renderDigitalClockTimeView } from "@mui/x-date-pickers";
11
- import { M as MenuItem } from "../MenuItem-DRUK149i.js";
12
12
  const themeShadows = [
13
13
  "none",
14
14
  // 0
@@ -44,11 +44,6 @@ const themeShadows = [
44
44
  "0px 11px 15px -7px rgba(44, 48, 50, 0.12), 0px 24px 38px 3px rgba(44, 48, 50, 0.08), 0px 9px 46px 8px rgba(44, 48, 50, 0.04)"
45
45
  // 24
46
46
  ];
47
- function getPixelToRem(px) {
48
- const fontBase = 16;
49
- const rem = 1 / fontBase * px + "rem";
50
- return rem;
51
- }
52
47
  const baseTypography = {
53
48
  htmlFontSize: 16,
54
49
  fontFamily: "Inter, sans-serif",
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../../src/components/EmptyState/EmptyState.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AA0FzC,QAAA,MAAM,UAAU,4GAA2D,CAAA;AAC3E,eAAe,UAAU,CAAA"}
1
+ {"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../../src/components/EmptyState/EmptyState.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAmGzC,QAAA,MAAM,UAAU,4GAA2D,CAAA;AAC3E,eAAe,UAAU,CAAA"}
@@ -2,10 +2,10 @@ import { EmptyStateProps } from './types';
2
2
  type EmptyStateStoryProps = EmptyStateProps & {
3
3
  /**
4
4
  * The color of the icon.
5
- * It supports primary, secondary and default colors.
6
- * @default 'default'
5
+ * It supports any color from the theme (e.g., 'text.disabled', 'primary.main', 'text.secondary').
6
+ * @default 'text.disabled'
7
7
  */
8
- iconColor?: 'primary' | 'secondary' | 'default';
8
+ iconColor?: string;
9
9
  /**
10
10
  * The size of the icon.
11
11
  * @default undefined
@@ -76,8 +76,7 @@ declare const options: {
76
76
  };
77
77
  };
78
78
  iconColor: {
79
- control: "select";
80
- options: string[];
79
+ control: "text";
81
80
  description: string;
82
81
  if: {
83
82
  arg: string;
@@ -151,7 +150,9 @@ export declare const CustomSXStyles: {
151
150
  render: ({ iconSize, iconColor, iconProps, ...args }: EmptyStateStoryProps) => import("react/jsx-runtime").JSX.Element;
152
151
  args: {
153
152
  sx: {
153
+ padding: number;
154
154
  border: string;
155
+ borderRadius: number;
155
156
  };
156
157
  };
157
158
  };
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/EmptyState/EmptyState.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAKzC,KAAK,oBAAoB,GAAG,eAAe,GAAG;IAC5C;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAAA;IAC/C;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC3B,CAAA;AAED,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8FyB,CAAA;AACtC,eAAe,OAAO,CAAA;AAoStB,eAAO,MAAM,UAAU;0DA7RpB,oBAAoB;;;;;;CAkStB,CAAA;AAED,eAAO,MAAM,WAAW;mBA3JW,oBAAoB;CA6JtD,CAAA;AAED,eAAO,MAAM,OAAO;mBA3HW,oBAAoB;CA6HlD,CAAA;AAED,eAAO,MAAM,IAAI;mBAjSW,oBAAoB;CAmS/C,CAAA;AAED,eAAO,MAAM,SAAS;mBApQW,oBAAoB;CAsQpD,CAAA;AAED,eAAO,MAAM,iBAAiB;mBA5NW,oBAAoB;CA8N5D,CAAA;AAED,eAAO,MAAM,cAAc;0DAxTxB,oBAAoB;;;;;;CA6TtB,CAAA"}
1
+ {"version":3,"file":"EmptyState.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/EmptyState/EmptyState.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAKzC,KAAK,oBAAoB,GAAG,eAAe,GAAG;IAC5C;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC3B,CAAA;AAED,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4FyB,CAAA;AACtC,eAAe,OAAO,CAAA;AA4StB,eAAO,MAAM,UAAU;0DArSpB,oBAAoB;;;;;;CA0StB,CAAA;AAED,eAAO,MAAM,WAAW;mBAvKW,oBAAoB;CAyKtD,CAAA;AAED,eAAO,MAAM,OAAO;mBA3HW,oBAAoB;CA6HlD,CAAA;AAED,eAAO,MAAM,IAAI;mBAzSW,oBAAoB;CA2S/C,CAAA;AAED,eAAO,MAAM,SAAS;mBA5QW,oBAAoB;CA8QpD,CAAA;AAED,eAAO,MAAM,iBAAiB;mBAxOW,oBAAoB;CA0O5D,CAAA;AAED,eAAO,MAAM,cAAc;0DAhUxB,oBAAoB;;;;;;;;CAyUtB,CAAA"}
@@ -15,14 +15,7 @@ type RootProps = {
15
15
  type IconWrapperProps = {
16
16
  size?: EmptyStateProps['size'];
17
17
  iconSize?: number | string;
18
- iconColor?: NonNullable<EmptyStateProps['iconProps']>['color'];
19
- };
20
- /**
21
- * Props for the Actions styled component.
22
- */
23
- type ActionsProps = {
24
- size?: EmptyStateProps['size'];
25
- spacing?: number;
18
+ iconColor?: string | null;
26
19
  };
27
20
  export declare const Root: import('@emotion/styled').StyledComponent<import('@mui/material').StackOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
28
21
  ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
@@ -35,6 +28,9 @@ export declare const TextContent: import('@emotion/styled').StyledComponent<impo
35
28
  }, keyof import('@mui/material/OverridableComponent').CommonProps | keyof import('@mui/material').StackOwnProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
36
29
  export declare const Actions: import('@emotion/styled').StyledComponent<import('@mui/material').StackOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
37
30
  ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
38
- }, keyof import('@mui/material/OverridableComponent').CommonProps | keyof import('@mui/material').StackOwnProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & ActionsProps, {}, {}>;
31
+ }, keyof import('@mui/material/OverridableComponent').CommonProps | keyof import('@mui/material').StackOwnProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & {
32
+ size?: EmptyStateProps["size"];
33
+ spacing?: number;
34
+ }, {}, {}>;
39
35
  export {};
40
36
  //# sourceMappingURL=EmptyState.styled.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState.styled.d.ts","sourceRoot":"","sources":["../../../../src/components/EmptyState/EmptyState.styled.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,eAAO,MAAM,iBAAiB,MAAM,CAAA;AACpC;;GAEG;AACH,KAAK,SAAS,GAAG;IACf,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC/B,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC/B,CAAA;AAED;;GAEG;AACH,KAAK,gBAAgB,GAAG;IACtB,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;IAC9B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC1B,SAAS,CAAC,EAAE,WAAW,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;CAC/D,CAAA;AAED;;GAEG;AACH,KAAK,YAAY,GAAG;IAClB,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,IAAI;;iNAiBhB,CAAA;AAED,eAAO,MAAM,WAAW;;kLA2BtB,CAAA;AAEF,eAAO,MAAM,WAAW;;qMAMrB,CAAA;AAEH,eAAO,MAAM,OAAO;;oNAWjB,CAAA"}
1
+ {"version":3,"file":"EmptyState.styled.d.ts","sourceRoot":"","sources":["../../../../src/components/EmptyState/EmptyState.styled.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAEzC,eAAO,MAAM,iBAAiB,MAAM,CAAA;AAEpC;;GAEG;AACH,KAAK,SAAS,GAAG;IACf,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC/B,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC/B,CAAA;AAED;;GAEG;AACH,KAAK,gBAAgB,GAAG;IACtB,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;IAC9B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,IAAI;;iNAiBhB,CAAA;AAED,eAAO,MAAM,WAAW;;kLAwBtB,CAAA;AAEF,eAAO,MAAM,WAAW;;qMAMrB,CAAA;AAEH,eAAO,MAAM,OAAO;;;WAGX,eAAe,CAAC,MAAM,CAAC;cACpB,MAAM;UAUf,CAAA"}
@@ -1,5 +1,6 @@
1
1
  import { ReactElement, ReactNode } from 'react';
2
2
  import { SxProps, Theme } from '@mui/material';
3
+ import { TypographyProps } from '../Typography';
3
4
  /**
4
5
  * Props for the EmptyState component.
5
6
  */
@@ -12,10 +13,18 @@ export type EmptyStateProps = {
12
13
  * The title to display in the empty state.
13
14
  * */
14
15
  title?: ReactElement | string;
16
+ /**
17
+ * The Typography props to pass to the title component.
18
+ * */
19
+ titleProps?: TypographyProps;
15
20
  /**
16
21
  * The description to display in the empty state.
17
22
  * */
18
23
  description?: ReactElement | string;
24
+ /**
25
+ * The Typography props to pass to the description component.
26
+ * */
27
+ descriptionProps?: TypographyProps;
19
28
  /**
20
29
  * The actions to display in the empty state. Can be used to add a button, link, or other actionable elements to the empty state.
21
30
  * */
@@ -58,10 +67,12 @@ export type EmptyStateProps = {
58
67
  * */
59
68
  size?: number | string;
60
69
  /**
61
- * The color of the icon.
62
- * @default 'default'
70
+ * The color of the icon. It supports any color from the theme
71
+ * (e.g., "text.disabled", "primary.main", "text.secondary").
72
+ * Set to null to preserve the SVG's original color.
73
+ * @default 'text.disabled'
63
74
  * */
64
- color?: 'primary' | 'secondary' | 'default';
75
+ color?: string | null;
65
76
  };
66
77
  /**
67
78
  * The props to pass to the container element to override the default styles.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/EmptyState/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAE9C;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;SAEK;IACL,IAAI,EAAE,YAAY,CAAA;IAClB;;SAEK;IACL,KAAK,CAAC,EAAE,YAAY,GAAG,MAAM,CAAA;IAC7B;;SAEK;IACL,WAAW,CAAC,EAAE,YAAY,GAAG,MAAM,CAAA;IACnC;;SAEK;IACL,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB;;SAEK;IACL,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB;;;SAGK;IACL,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;IACzB;;;SAGK;IACL,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC/B;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC9B;;SAEK;IACL,SAAS,CAAC,EAAE;QACV;;;aAGK;QACL,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;QACtB;;;aAGK;QACL,KAAK,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAAA;KAC5C,CAAA;IACD;;OAEG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAA;CACpB,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/EmptyState/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;SAEK;IACL,IAAI,EAAE,YAAY,CAAA;IAClB;;SAEK;IACL,KAAK,CAAC,EAAE,YAAY,GAAG,MAAM,CAAA;IAC7B;;SAEK;IACL,UAAU,CAAC,EAAE,eAAe,CAAA;IAC5B;;SAEK;IACL,WAAW,CAAC,EAAE,YAAY,GAAG,MAAM,CAAA;IACnC;;SAEK;IACL,gBAAgB,CAAC,EAAE,eAAe,CAAA;IAClC;;SAEK;IACL,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB;;SAEK;IACL,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB;;;SAGK;IACL,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;IACzB;;;SAGK;IACL,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC/B;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC9B;;SAEK;IACL,SAAS,CAAC,EAAE;QACV;;;aAGK;QACL,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;QACtB;;;;;aAKK;QACL,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KACtB,CAAA;IACD;;OAEG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAA;CACpB,CAAA"}
@@ -122,9 +122,9 @@ export declare const ContentHeight: {
122
122
  export declare const CustomSXStyles: {
123
123
  render: ({ size, color, iconProps, ...args }: LoaderStoryProps) => import("react/jsx-runtime").JSX.Element;
124
124
  args: {
125
- sx: {
126
- border: string;
127
- };
125
+ padding: number;
126
+ border: string;
127
+ borderRadius: number;
128
128
  };
129
129
  };
130
130
  //# sourceMappingURL=Loader.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Loader.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Loader/Loader.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAE3D,KAAK,gBAAgB,GAAG,WAAW,GAAG;IACpC;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAAA;IAC3C;;;OAGG;IACH,IAAI,CAAC,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAA;CACrC,CAAA;AAED,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+DqB,CAAA;AAClC,eAAe,OAAO,CAAA;AA0GtB,eAAO,MAAM,UAAU;kDAxGgC,gBAAgB;;;;;;CA6GtE,CAAA;AAED,eAAO,MAAM,KAAK;gCApGwB,gBAAgB;CAsGzD,CAAA;AAED,eAAO,MAAM,IAAI;iCAnFyB,gBAAgB;CAqFzD,CAAA;AAED,eAAO,MAAM,mBAAmB;uCAtEiB,gBAAgB;CAwEhE,CAAA;AAED,eAAO,MAAM,eAAe;kDA3H2B,gBAAgB;;;;;;CAkItE,CAAA;AAED,eAAO,MAAM,aAAa;kDApI6B,gBAAgB;;;;CAyItE,CAAA;AAED,eAAO,MAAM,cAAc;kDA3I4B,gBAAgB;;;;;;CAgJtE,CAAA"}
1
+ {"version":3,"file":"Loader.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Loader/Loader.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAE3D,KAAK,gBAAgB,GAAG,WAAW,GAAG;IACpC;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAAA;IAC3C;;;OAGG;IACH,IAAI,CAAC,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAA;CACrC,CAAA;AAED,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+DqB,CAAA;AAClC,eAAe,OAAO,CAAA;AA0GtB,eAAO,MAAM,UAAU;kDAxGgC,gBAAgB;;;;;;CA6GtE,CAAA;AAED,eAAO,MAAM,KAAK;gCApGwB,gBAAgB;CAsGzD,CAAA;AAED,eAAO,MAAM,IAAI;iCAnFyB,gBAAgB;CAqFzD,CAAA;AAED,eAAO,MAAM,mBAAmB;uCAtEiB,gBAAgB;CAwEhE,CAAA;AAED,eAAO,MAAM,eAAe;kDA3H2B,gBAAgB;;;;;;CAkItE,CAAA;AAED,eAAO,MAAM,aAAa;kDApI6B,gBAAgB;;;;CAyItE,CAAA;AAED,eAAO,MAAM,cAAc;kDA3I4B,gBAAgB;;;;;;CAkJtE,CAAA"}
@@ -1,2 +1,18 @@
1
+ import { Theme } from '@mui/material';
1
2
  export declare function getPixelToRem(px: number): string;
3
+ /**
4
+ * Gets a color value from the theme palette using a string path.
5
+ * Supports theme color paths (e.g., 'text.disabled', 'primary.main', etc.)
6
+ *
7
+ * @param colorPath - The dot-separated path to the color in the theme palette (e.g., 'text.disabled', 'primary.main')
8
+ * @param theme - The MUI theme object
9
+ * @returns The color value as a string, or undefined if the path doesn't exist
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const color = getThemeColor('text.disabled', theme) // Returns theme.palette.text.disabled
14
+ * const primaryColor = getThemeColor('primary.main', theme) // Returns theme.palette.primary.main
15
+ * ```
16
+ */
17
+ export declare function getThemeColor(colorPath: string, theme: Theme): string | undefined;
2
18
  //# sourceMappingURL=theme-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme-utils.d.ts","sourceRoot":"","sources":["../../../src/utils/theme-utils.ts"],"names":[],"mappings":"AACA,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,UAKvC"}
1
+ {"version":3,"file":"theme-utils.d.ts","sourceRoot":"","sources":["../../../src/utils/theme-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAGrC,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,UAKvC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,KAAK,GACX,MAAM,GAAG,SAAS,CAYpB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carto/meridian-ds",
3
- "version": "2.8.0-alpha-empty-state.1",
3
+ "version": "2.8.0-alpha-empty-state.2",
4
4
  "description": "CARTO Meridian Design System",
5
5
  "type": "module",
6
6
  "scripts": {