@carto/meridian-ds 2.5.5-alpha-translations.1 → 2.6.0-alpha-searchfield.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +7 -2
  2. package/dist/{Alert-CRVceJ9N.js → Alert-C1VgP3N1.js} +1 -1
  3. package/dist/{Alert-Dyw7Z9wJ.cjs → Alert-F8G9P271.cjs} +7 -7
  4. package/dist/{MenuItem-o51jnNjL.cjs → MenuItem-Bssr5qGq.cjs} +6 -6
  5. package/dist/{MenuItem-h41wtQTz.js → MenuItem-COajCLkS.js} +1 -1
  6. package/dist/{SwatchSquare-CaaLsjAC.js → Search-C7wkXu3f.js} +4 -23
  7. package/dist/{SwatchSquare-B8PIY3Rd.cjs → Search-CMWbM9nD.cjs} +3 -22
  8. package/dist/SwatchSquare-B6KYVoqV.js +24 -0
  9. package/dist/SwatchSquare-DuXPIL7t.cjs +23 -0
  10. package/dist/components/index.cjs +370 -76
  11. package/dist/components/index.js +309 -15
  12. package/dist/{TablePaginationActions-CMC_ZxDN.cjs → css-utils-CqIN_t7x.cjs} +9 -0
  13. package/dist/{TablePaginationActions-DIFPc_wQ.js → css-utils-hxI-qUxK.js} +13 -4
  14. package/dist/custom-icons/index.cjs +3 -2
  15. package/dist/custom-icons/index.js +3 -2
  16. package/dist/theme/index.cjs +108 -114
  17. package/dist/theme/index.js +7 -13
  18. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.d.ts +117 -0
  19. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.d.ts.map +1 -0
  20. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.stories.d.ts +66 -0
  21. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.stories.d.ts.map +1 -0
  22. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.test.d.ts +2 -0
  23. package/dist/types/components/EllipsisWithTooltip/EllipsisWithTooltip.test.d.ts.map +1 -0
  24. package/dist/types/components/EllipsisWithTooltip/index.d.ts +3 -0
  25. package/dist/types/components/EllipsisWithTooltip/index.d.ts.map +1 -0
  26. package/dist/types/components/Link/Link.stories.d.ts +0 -7
  27. package/dist/types/components/Link/Link.stories.d.ts.map +1 -1
  28. package/dist/types/components/SearchField/SearchField.d.ts +32 -0
  29. package/dist/types/components/SearchField/SearchField.d.ts.map +1 -0
  30. package/dist/types/components/SearchField/SearchField.stories.d.ts +123 -0
  31. package/dist/types/components/SearchField/SearchField.stories.d.ts.map +1 -0
  32. package/dist/types/components/SearchField/index.d.ts +3 -0
  33. package/dist/types/components/SearchField/index.d.ts.map +1 -0
  34. package/dist/types/components/Tag/Tag.d.ts +176 -4
  35. package/dist/types/components/Tag/Tag.d.ts.map +1 -1
  36. package/dist/types/components/index.d.ts +4 -0
  37. package/dist/types/components/index.d.ts.map +1 -1
  38. package/dist/types/localization/en.d.ts +1 -0
  39. package/dist/types/localization/en.d.ts.map +1 -1
  40. package/dist/types/localization/es.d.ts +1 -0
  41. package/dist/types/localization/es.d.ts.map +1 -1
  42. package/dist/types/localization/id.d.ts +1 -0
  43. package/dist/types/localization/id.d.ts.map +1 -1
  44. package/dist/types/localization/index.d.ts +3 -0
  45. package/dist/types/localization/index.d.ts.map +1 -1
  46. package/dist/types/theme/components/forms.d.ts.map +1 -1
  47. package/dist/types/utils/css-utils.d.ts +14 -0
  48. package/dist/types/utils/css-utils.d.ts.map +1 -0
  49. package/dist/types/widgets/TableWidgetUI/TableWidgetUI.d.ts.map +1 -1
  50. package/dist/types/widgets/WrapperWidgetUI/WrapperWidgetUI.d.ts.map +1 -1
  51. package/dist/widgets/index.cjs +120 -124
  52. package/dist/widgets/index.js +6 -10
  53. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,12 +2,17 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ - New SearchField component [#308](https://github.com/CartoDB/meridian-ds/pull/308)
6
+
7
+ ## 2.0
8
+
9
+ ### 2.6.0
10
+
11
+ - New EllipsisWithTooltip component [#299](https://github.com/CartoDB/meridian-ds/pull/299)
5
12
  - Improve translations handling with `useTranslationFallback` hook [#293](https://github.com/CartoDB/meridian-ds/pull/293)
6
13
  - Add unit tests for data display components [#292](https://github.com/CartoDB/meridian-ds/pull/292)
7
14
  - Add unit tests for action components [#290](https://github.com/CartoDB/meridian-ds/pull/290)
8
15
 
9
- ## 2.0
10
-
11
16
  ### 2.5.5
12
17
 
13
18
  - Utils files: rename to kebab-case for better naming convention [#291](https://github.com/CartoDB/meridian-ds/pull/291)
@@ -3,7 +3,7 @@ import { forwardRef, useState } from "react";
3
3
  import { styled, Link as Link$1, Alert as Alert$1, Fade, AlertTitle } from "@mui/material";
4
4
  import { OpenInNewOutlined } from "@mui/icons-material";
5
5
  import "cartocolor";
6
- import { u as useImperativeIntl, c as ICON_SIZE_SMALL, b as ICON_SIZE_MEDIUM, T as Typography } from "./TablePaginationActions-DIFPc_wQ.js";
6
+ import { u as useImperativeIntl, c as ICON_SIZE_SMALL, b as ICON_SIZE_MEDIUM, T as Typography } from "./css-utils-hxI-qUxK.js";
7
7
  import { useIntl } from "react-intl";
8
8
  const ScreenReaderOnly = styled("span")(() => ({
9
9
  position: "absolute",
@@ -4,7 +4,7 @@ const React = require("react");
4
4
  const material = require("@mui/material");
5
5
  const iconsMaterial = require("@mui/icons-material");
6
6
  require("cartocolor");
7
- const TablePaginationActions = require("./TablePaginationActions-CMC_ZxDN.cjs");
7
+ const cssUtils = require("./css-utils-CqIN_t7x.cjs");
8
8
  const reactIntl = require("react-intl");
9
9
  const ScreenReaderOnly = material.styled("span")(() => ({
10
10
  position: "absolute",
@@ -19,7 +19,7 @@ const ScreenReaderOnly = material.styled("span")(() => ({
19
19
  }));
20
20
  function useTranslationFallback(translationKey, customText) {
21
21
  const intl = reactIntl.useIntl();
22
- const intlConfig = TablePaginationActions.useImperativeIntl(intl);
22
+ const intlConfig = cssUtils.useImperativeIntl(intl);
23
23
  if (customText !== void 0 && customText !== null) {
24
24
  return customText;
25
25
  }
@@ -44,7 +44,7 @@ const Icon = material.styled("span", {
44
44
  },
45
45
  svg: {
46
46
  // Size adapts to the text size, but make sure the icon size is at least 12px
47
- fontSize: `max(1em, ${TablePaginationActions.ICON_SIZE_SMALL})`,
47
+ fontSize: `max(1em, ${cssUtils.ICON_SIZE_SMALL})`,
48
48
  color: "inherit !important",
49
49
  "> path": {
50
50
  color: "inherit !important"
@@ -55,7 +55,7 @@ const Icon = material.styled("span", {
55
55
  top: "calc(1em * 1/5)",
56
56
  // 20% offset ratio
57
57
  svg: {
58
- fontSize: TablePaginationActions.ICON_SIZE_SMALL
58
+ fontSize: cssUtils.ICON_SIZE_SMALL
59
59
  }
60
60
  },
61
61
  // Button, body2 and body1 variants use medium-sized icons
@@ -63,7 +63,7 @@ const Icon = material.styled("span", {
63
63
  top: "calc(1em * 1/4)",
64
64
  // 25% offset ratio
65
65
  svg: {
66
- fontSize: TablePaginationActions.ICON_SIZE_MEDIUM
66
+ fontSize: cssUtils.ICON_SIZE_MEDIUM
67
67
  }
68
68
  }
69
69
  })
@@ -139,7 +139,7 @@ const StyledAlert = material.styled(material.Alert, {
139
139
  "icon message"
140
140
  "icon actions"
141
141
  `,
142
- gridTemplateColumns: hasCloseButton ? `${TablePaginationActions.ICON_SIZE_MEDIUM} 1fr ${theme.spacing(3)}` : `${TablePaginationActions.ICON_SIZE_MEDIUM}`
142
+ gridTemplateColumns: hasCloseButton ? `${cssUtils.ICON_SIZE_MEDIUM} 1fr ${theme.spacing(3)}` : `${cssUtils.ICON_SIZE_MEDIUM}`
143
143
  },
144
144
  ...isNeutral && {
145
145
  backgroundColor: theme.palette.default.background,
@@ -233,7 +233,7 @@ function _Alert({
233
233
  ...otherProps,
234
234
  children: [
235
235
  title && /* @__PURE__ */ jsxRuntime.jsx(material.AlertTitle, { children: title }),
236
- /* @__PURE__ */ jsxRuntime.jsx(TablePaginationActions.Typography, { variant: "caption", color: "inherit", component: "div", children })
236
+ /* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "caption", color: "inherit", component: "div", children })
237
237
  ]
238
238
  }
239
239
  ) });
@@ -2,7 +2,7 @@
2
2
  const jsxRuntime = require("react/jsx-runtime");
3
3
  const React = require("react");
4
4
  const material = require("@mui/material");
5
- const TablePaginationActions = require("./TablePaginationActions-CMC_ZxDN.cjs");
5
+ const cssUtils = require("./css-utils-CqIN_t7x.cjs");
6
6
  const StyledMenuItem = material.styled(material.MenuItem, {
7
7
  shouldForwardProp: (prop) => !["subtitle", "destructive", "extended", "fixed", "iconColor"].includes(
8
8
  prop
@@ -29,7 +29,7 @@ const StyledMenuItem = material.styled(material.MenuItem, {
29
29
  color: theme.palette.text.secondary
30
30
  },
31
31
  "&.MuiMenuItem-root": {
32
- minHeight: TablePaginationActions.MENU_ITEM_SIZE_DENSE,
32
+ minHeight: cssUtils.MENU_ITEM_SIZE_DENSE,
33
33
  paddingTop: 0,
34
34
  paddingBottom: 0,
35
35
  marginTop: theme.spacing(1),
@@ -96,7 +96,7 @@ const StyledMenuItem = material.styled(material.MenuItem, {
96
96
  },
97
97
  ...extended && {
98
98
  "&.MuiButtonBase-root.MuiMenuItem-root": {
99
- minHeight: TablePaginationActions.MENU_ITEM_SIZE_EXTENDED
99
+ minHeight: cssUtils.MENU_ITEM_SIZE_EXTENDED
100
100
  }
101
101
  },
102
102
  ...fixed && {
@@ -107,14 +107,14 @@ const StyledMenuItem = material.styled(material.MenuItem, {
107
107
  bottom: 0,
108
108
  right: 0,
109
109
  zIndex: 2,
110
- minHeight: TablePaginationActions.MENU_ITEM_SIZE_EXTENDED,
110
+ minHeight: cssUtils.MENU_ITEM_SIZE_EXTENDED,
111
111
  marginBottom: theme.spacing(1),
112
112
  padding: theme.spacing(0.5, 1.5),
113
113
  backgroundColor: `${theme.palette.background.paper} !important`,
114
114
  borderBottom: `1px solid ${theme.palette.divider}`
115
115
  },
116
116
  ".MuiAutocomplete-listbox &.MuiAutocomplete-option:first-of-type": {
117
- minHeight: TablePaginationActions.MENU_ITEM_SIZE_EXTENDED,
117
+ minHeight: cssUtils.MENU_ITEM_SIZE_EXTENDED,
118
118
  marginTop: 0,
119
119
  "&:hover": {
120
120
  backgroundColor: theme.palette.background.paper
@@ -128,7 +128,7 @@ const StyledMenuItem = material.styled(material.MenuItem, {
128
128
  },
129
129
  ...dense && {
130
130
  "&.MuiButtonBase-root.MuiMenuItem-root": {
131
- minHeight: TablePaginationActions.MENU_ITEM_SIZE_DENSE,
131
+ minHeight: cssUtils.MENU_ITEM_SIZE_DENSE,
132
132
  padding: theme.spacing(0.25, 1.5)
133
133
  }
134
134
  }
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import { styled, MenuItem as MenuItem$1 } from "@mui/material";
4
- import { e as MENU_ITEM_SIZE_DENSE, f as MENU_ITEM_SIZE_EXTENDED } from "./TablePaginationActions-DIFPc_wQ.js";
4
+ import { f as MENU_ITEM_SIZE_DENSE, h as MENU_ITEM_SIZE_EXTENDED } from "./css-utils-hxI-qUxK.js";
5
5
  const StyledMenuItem = styled(MenuItem$1, {
6
6
  shouldForwardProp: (prop) => !["subtitle", "destructive", "extended", "fixed", "iconColor"].includes(
7
7
  prop
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import { createSvgIcon } from "@mui/material";
4
- const Icon$1 = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsx(
4
+ const Icon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsx(
5
5
  "path",
6
6
  {
7
7
  fill: "currentColor",
@@ -10,26 +10,8 @@ const Icon$1 = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000
10
10
  clipRule: "evenodd"
11
11
  }
12
12
  ) });
13
- const BaseSvgIcon$1 = createSvgIcon(Icon$1(), "Search");
13
+ const BaseSvgIcon = createSvgIcon(Icon(), "Search");
14
14
  function Search({ width, height, sx, ...props }, ref) {
15
- return /* @__PURE__ */ jsx(
16
- BaseSvgIcon$1,
17
- {
18
- ref,
19
- viewBox: "0 0 24 24",
20
- sx: {
21
- width,
22
- height: height || width,
23
- ...sx
24
- },
25
- ...props
26
- }
27
- );
28
- }
29
- const Search$1 = forwardRef(Search);
30
- const Icon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsx("rect", { width: 16, height: 16, x: 4, y: 4, fill: "currentColor", rx: 2 }) });
31
- const BaseSvgIcon = createSvgIcon(Icon(), "SwatchSquare");
32
- function SwatchSquare({ width, height, sx, ...props }, ref) {
33
15
  return /* @__PURE__ */ jsx(
34
16
  BaseSvgIcon,
35
17
  {
@@ -44,8 +26,7 @@ function SwatchSquare({ width, height, sx, ...props }, ref) {
44
26
  }
45
27
  );
46
28
  }
47
- const SwatchSquare$1 = forwardRef(SwatchSquare);
29
+ const Search$1 = forwardRef(Search);
48
30
  export {
49
- Search$1 as S,
50
- SwatchSquare$1 as a
31
+ Search$1 as S
51
32
  };
@@ -2,7 +2,7 @@
2
2
  const jsxRuntime = require("react/jsx-runtime");
3
3
  const React = require("react");
4
4
  const material = require("@mui/material");
5
- const Icon$1 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
5
+ const Icon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
6
6
  "path",
7
7
  {
8
8
  fill: "currentColor",
@@ -11,26 +11,8 @@ const Icon$1 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.
11
11
  clipRule: "evenodd"
12
12
  }
13
13
  ) });
14
- const BaseSvgIcon$1 = material.createSvgIcon(Icon$1(), "Search");
14
+ const BaseSvgIcon = material.createSvgIcon(Icon(), "Search");
15
15
  function Search({ width, height, sx, ...props }, ref) {
16
- return /* @__PURE__ */ jsxRuntime.jsx(
17
- BaseSvgIcon$1,
18
- {
19
- ref,
20
- viewBox: "0 0 24 24",
21
- sx: {
22
- width,
23
- height: height || width,
24
- ...sx
25
- },
26
- ...props
27
- }
28
- );
29
- }
30
- const Search$1 = React.forwardRef(Search);
31
- const Icon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("rect", { width: 16, height: 16, x: 4, y: 4, fill: "currentColor", rx: 2 }) });
32
- const BaseSvgIcon = material.createSvgIcon(Icon(), "SwatchSquare");
33
- function SwatchSquare({ width, height, sx, ...props }, ref) {
34
16
  return /* @__PURE__ */ jsxRuntime.jsx(
35
17
  BaseSvgIcon,
36
18
  {
@@ -45,6 +27,5 @@ function SwatchSquare({ width, height, sx, ...props }, ref) {
45
27
  }
46
28
  );
47
29
  }
48
- const SwatchSquare$1 = React.forwardRef(SwatchSquare);
30
+ const Search$1 = React.forwardRef(Search);
49
31
  exports.Search = Search$1;
50
- exports.SwatchSquare = SwatchSquare$1;
@@ -0,0 +1,24 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { createSvgIcon } from "@mui/material";
4
+ const Icon = () => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsx("rect", { width: 16, height: 16, x: 4, y: 4, fill: "currentColor", rx: 2 }) });
5
+ const BaseSvgIcon = createSvgIcon(Icon(), "SwatchSquare");
6
+ function SwatchSquare({ width, height, sx, ...props }, ref) {
7
+ return /* @__PURE__ */ jsx(
8
+ BaseSvgIcon,
9
+ {
10
+ ref,
11
+ viewBox: "0 0 24 24",
12
+ sx: {
13
+ width,
14
+ height: height || width,
15
+ ...sx
16
+ },
17
+ ...props
18
+ }
19
+ );
20
+ }
21
+ const SwatchSquare$1 = forwardRef(SwatchSquare);
22
+ export {
23
+ SwatchSquare$1 as S
24
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ const jsxRuntime = require("react/jsx-runtime");
3
+ const React = require("react");
4
+ const material = require("@mui/material");
5
+ const Icon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("rect", { width: 16, height: 16, x: 4, y: 4, fill: "currentColor", rx: 2 }) });
6
+ const BaseSvgIcon = material.createSvgIcon(Icon(), "SwatchSquare");
7
+ function SwatchSquare({ width, height, sx, ...props }, ref) {
8
+ return /* @__PURE__ */ jsxRuntime.jsx(
9
+ BaseSvgIcon,
10
+ {
11
+ ref,
12
+ viewBox: "0 0 24 24",
13
+ sx: {
14
+ width,
15
+ height: height || width,
16
+ ...sx
17
+ },
18
+ ...props
19
+ }
20
+ );
21
+ }
22
+ const SwatchSquare$1 = React.forwardRef(SwatchSquare);
23
+ exports.SwatchSquare = SwatchSquare$1;