@carto/meridian-ds 2.9.3 → 2.9.4-alpha-lists.9

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 (83) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/{Alert-BZPM5zpX.js → Alert-C7vSI6Pm.js} +1 -1
  3. package/dist/{Alert-C4W0H_uN.cjs → Alert-mhu6mbgG.cjs} +7 -7
  4. package/dist/{MenuItem-Cx5lTXXm.js → MenuItem-BXwl6OyF.js} +1 -1
  5. package/dist/{MenuItem-DoBJsRR_.cjs → MenuItem-CtqW_LpQ.cjs} +6 -6
  6. package/dist/components/index.cjs +393 -106
  7. package/dist/components/index.js +296 -17
  8. package/dist/{css-utils-CH7es90t.cjs → palette-utils-CbuIJ8kb.cjs} +328 -0
  9. package/dist/{css-utils-CjUBRJVK.js → palette-utils-DBM8n43g.js} +316 -5
  10. package/dist/theme/index.cjs +517 -161
  11. package/dist/theme/index.js +414 -59
  12. package/dist/types/components/Avatar/Avatar.stories.d.ts.map +1 -1
  13. package/dist/types/components/List/List.d.ts +24 -0
  14. package/dist/types/components/List/List.d.ts.map +1 -0
  15. package/dist/types/components/List/List.stories.d.ts +452 -0
  16. package/dist/types/components/List/List.stories.d.ts.map +1 -0
  17. package/dist/types/components/List/List.test.d.ts +2 -0
  18. package/dist/types/components/List/List.test.d.ts.map +1 -0
  19. package/dist/types/components/List/ListItem/ListItem.d.ts +10 -0
  20. package/dist/types/components/List/ListItem/ListItem.d.ts.map +1 -0
  21. package/dist/types/components/List/ListItem/ListItem.stories.d.ts +409 -0
  22. package/dist/types/components/List/ListItem/ListItem.stories.d.ts.map +1 -0
  23. package/dist/types/components/List/ListItem/ListItem.test.d.ts +2 -0
  24. package/dist/types/components/List/ListItem/ListItem.test.d.ts.map +1 -0
  25. package/dist/types/components/List/ListItemButton/ListItemButton.d.ts +9 -0
  26. package/dist/types/components/List/ListItemButton/ListItemButton.d.ts.map +1 -0
  27. package/dist/types/components/List/ListItemButton/ListItemButton.test.d.ts +2 -0
  28. package/dist/types/components/List/ListItemButton/ListItemButton.test.d.ts.map +1 -0
  29. package/dist/types/components/List/ListItemIcon/ListItemIcon.d.ts +18 -0
  30. package/dist/types/components/List/ListItemIcon/ListItemIcon.d.ts.map +1 -0
  31. package/dist/types/components/List/ListItemIcon/ListItemIcon.test.d.ts +2 -0
  32. package/dist/types/components/List/ListItemIcon/ListItemIcon.test.d.ts.map +1 -0
  33. package/dist/types/components/List/ListItemRightContent/ListItemRightContent.d.ts +14 -0
  34. package/dist/types/components/List/ListItemRightContent/ListItemRightContent.d.ts.map +1 -0
  35. package/dist/types/components/List/ListItemRightContent/ListItemRightContent.test.d.ts +2 -0
  36. package/dist/types/components/List/ListItemRightContent/ListItemRightContent.test.d.ts.map +1 -0
  37. package/dist/types/components/List/ListSubheader/ListSubheader.d.ts +9 -0
  38. package/dist/types/components/List/ListSubheader/ListSubheader.d.ts.map +1 -0
  39. package/dist/types/components/List/ListSubheader/ListSubheader.test.d.ts +2 -0
  40. package/dist/types/components/List/ListSubheader/ListSubheader.test.d.ts.map +1 -0
  41. package/dist/types/components/List/index.d.ts +16 -0
  42. package/dist/types/components/List/index.d.ts.map +1 -0
  43. package/dist/types/components/List/test-utils/list-test-fixtures.d.ts +60 -0
  44. package/dist/types/components/List/test-utils/list-test-fixtures.d.ts.map +1 -0
  45. package/dist/types/components/List/test-utils/list-test-utils.d.ts +33 -0
  46. package/dist/types/components/List/test-utils/list-test-utils.d.ts.map +1 -0
  47. package/dist/types/components/List/types.d.ts +3 -0
  48. package/dist/types/components/List/types.d.ts.map +1 -0
  49. package/dist/types/components/List/utils/utils.d.ts +3 -0
  50. package/dist/types/components/List/utils/utils.d.ts.map +1 -0
  51. package/dist/types/components/List/utils/utils.test.d.ts +2 -0
  52. package/dist/types/components/List/utils/utils.test.d.ts.map +1 -0
  53. package/dist/types/components/Menu/Menu/Menu.d.ts.map +1 -1
  54. package/dist/types/components/Menu/Menu/Menu.stories.d.ts.map +1 -1
  55. package/dist/types/components/Tag/Tag.d.ts +1 -1
  56. package/dist/types/components/Tag/Tag.d.ts.map +1 -1
  57. package/dist/types/components/Tag/Tag.stories.d.ts.map +1 -1
  58. package/dist/types/components/index.d.ts +2 -0
  59. package/dist/types/components/index.d.ts.map +1 -1
  60. package/dist/types/theme/components/data-display.d.ts.map +1 -1
  61. package/dist/types/theme/components/navigation.d.ts.map +1 -1
  62. package/dist/types/theme/components/stories/Chip.stories.d.ts.map +1 -1
  63. package/dist/types/theme/tokens/colors.d.ts.map +1 -1
  64. package/dist/types/theme/types.d.ts +181 -0
  65. package/dist/types/theme/types.d.ts.map +1 -1
  66. package/dist/types/utils/palette-utils.d.ts +9 -0
  67. package/dist/types/utils/palette-utils.d.ts.map +1 -1
  68. package/dist/types/utils/theme-constants.d.ts +4 -0
  69. package/dist/types/utils/theme-constants.d.ts.map +1 -1
  70. package/dist/types/widgets/ChartLegend.d.ts +5 -3
  71. package/dist/types/widgets/ChartLegend.d.ts.map +1 -1
  72. package/dist/types/widgets/PieWidgetUI/PieCentralText.d.ts +2 -2
  73. package/dist/types/widgets/PieWidgetUI/PieCentralText.d.ts.map +1 -1
  74. package/dist/types/widgets/PieWidgetUI/PieWidgetUI.d.ts +4 -3
  75. package/dist/types/widgets/PieWidgetUI/PieWidgetUI.d.ts.map +1 -1
  76. package/dist/types/widgets/PieWidgetUI/usePieCategories.d.ts +1 -1
  77. package/dist/widgets/index.cjs +122 -120
  78. package/dist/widgets/index.js +10 -8
  79. package/package.json +1 -1
  80. package/dist/palette-utils-B9ybmwiI.cjs +0 -304
  81. package/dist/palette-utils-BHqJlHm9.js +0 -288
  82. package/dist/types/theme/components/stories/List.stories.d.ts +0 -62
  83. package/dist/types/theme/components/stories/List.stories.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,8 +2,15 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ - New List components (List, ListItem, ListSubheader, ListItemRightContent) [#336](https://github.com/CartoDB/meridian-ds/pull/336)
6
+ - Minor changes in: Avatar, Menu, Chip and Tag components [#350](https://github.com/CartoDB/meridian-ds/pull/350)
7
+
5
8
  ## 2.0
6
9
 
10
+ ### 2.9.4
11
+
12
+ - fix(widgets): Support null values in PieWidgetUI [#349](https://github.com/CartoDB/meridian-ds/pull/349)
13
+
7
14
  ### 2.9.3
8
15
 
9
16
  - Custom Icons: SwitchAccessShortcut [#347](https://github.com/CartoDB/meridian-ds/pull/347)
@@ -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 { c as ICON_SIZE_SMALL, b as ICON_SIZE_MEDIUM, u as useTranslationWithFallback, T as Typography } from "./css-utils-CjUBRJVK.js";
6
+ import { c as ICON_SIZE_SMALL, b as ICON_SIZE_MEDIUM, u as useTranslationWithFallback, T as Typography } from "./palette-utils-DBM8n43g.js";
7
7
  const ScreenReaderOnly = styled("span")(() => ({
8
8
  position: "absolute",
9
9
  width: 1,
@@ -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 cssUtils = require("./css-utils-CH7es90t.cjs");
7
+ const paletteUtils = require("./palette-utils-CbuIJ8kb.cjs");
8
8
  const ScreenReaderOnly = material.styled("span")(() => ({
9
9
  position: "absolute",
10
10
  width: 1,
@@ -35,7 +35,7 @@ const Icon = material.styled("span", {
35
35
  },
36
36
  svg: {
37
37
  // Size adapts to the text size, but make sure the icon size is at least 12px
38
- fontSize: `max(1em, ${cssUtils.ICON_SIZE_SMALL})`,
38
+ fontSize: `max(1em, ${paletteUtils.ICON_SIZE_SMALL})`,
39
39
  color: "inherit !important",
40
40
  "> path": {
41
41
  color: "inherit !important"
@@ -46,7 +46,7 @@ const Icon = material.styled("span", {
46
46
  top: "calc(1em * 1/5)",
47
47
  // 20% offset ratio
48
48
  svg: {
49
- fontSize: cssUtils.ICON_SIZE_SMALL
49
+ fontSize: paletteUtils.ICON_SIZE_SMALL
50
50
  }
51
51
  },
52
52
  // Button, body2 and body1 variants use medium-sized icons
@@ -54,7 +54,7 @@ const Icon = material.styled("span", {
54
54
  top: "calc(1em * 1/4)",
55
55
  // 25% offset ratio
56
56
  svg: {
57
- fontSize: cssUtils.ICON_SIZE_MEDIUM
57
+ fontSize: paletteUtils.ICON_SIZE_MEDIUM
58
58
  }
59
59
  }
60
60
  })
@@ -74,7 +74,7 @@ function _Link({
74
74
  "aria-describedby": ariaDescribedby,
75
75
  ...otherProps
76
76
  }, ref) {
77
- const screenReaderTextValue = cssUtils.useTranslationWithFallback(
77
+ const screenReaderTextValue = paletteUtils.useTranslationWithFallback(
78
78
  "c4r.button.opensInNewTab",
79
79
  screenReaderText
80
80
  );
@@ -121,7 +121,7 @@ const StyledAlert = material.styled(material.Alert, {
121
121
  "icon message"
122
122
  "icon actions"
123
123
  `,
124
- gridTemplateColumns: hasCloseButton ? `${cssUtils.ICON_SIZE_MEDIUM} 1fr ${theme.spacing(3)}` : `${cssUtils.ICON_SIZE_MEDIUM}`
124
+ gridTemplateColumns: hasCloseButton ? `${paletteUtils.ICON_SIZE_MEDIUM} 1fr ${theme.spacing(3)}` : `${paletteUtils.ICON_SIZE_MEDIUM}`
125
125
  },
126
126
  ...isSticky && {
127
127
  borderRadius: 0
@@ -198,7 +198,7 @@ function _Alert({
198
198
  ...otherProps,
199
199
  children: [
200
200
  title && /* @__PURE__ */ jsxRuntime.jsx(material.AlertTitle, { children: title }),
201
- /* @__PURE__ */ jsxRuntime.jsx(cssUtils.Typography, { variant: "caption", color: "inherit", component: "div", children })
201
+ /* @__PURE__ */ jsxRuntime.jsx(paletteUtils.Typography, { variant: "caption", color: "inherit", component: "div", children })
202
202
  ]
203
203
  }
204
204
  ) });
@@ -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 { f as MENU_ITEM_SIZE_DENSE, h as MENU_ITEM_SIZE_EXTENDED } from "./css-utils-CjUBRJVK.js";
4
+ import { f as MENU_ITEM_SIZE_DENSE, k as MENU_ITEM_SIZE_EXTENDED } from "./palette-utils-DBM8n43g.js";
5
5
  function getPixelToRem(px) {
6
6
  const fontBase = 16;
7
7
  const rem = 1 / fontBase * px + "rem";
@@ -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 cssUtils = require("./css-utils-CH7es90t.cjs");
5
+ const paletteUtils = require("./palette-utils-CbuIJ8kb.cjs");
6
6
  function getPixelToRem(px) {
7
7
  const fontBase = 16;
8
8
  const rem = 1 / fontBase * px + "rem";
@@ -41,7 +41,7 @@ const StyledMenuItem = material.styled(material.MenuItem, {
41
41
  color: theme.palette.text.secondary
42
42
  },
43
43
  "&.MuiMenuItem-root": {
44
- minHeight: cssUtils.MENU_ITEM_SIZE_DENSE,
44
+ minHeight: paletteUtils.MENU_ITEM_SIZE_DENSE,
45
45
  paddingTop: 0,
46
46
  paddingBottom: 0,
47
47
  marginTop: theme.spacing(1),
@@ -108,7 +108,7 @@ const StyledMenuItem = material.styled(material.MenuItem, {
108
108
  },
109
109
  ...extended && {
110
110
  "&.MuiButtonBase-root.MuiMenuItem-root": {
111
- minHeight: cssUtils.MENU_ITEM_SIZE_EXTENDED
111
+ minHeight: paletteUtils.MENU_ITEM_SIZE_EXTENDED
112
112
  }
113
113
  },
114
114
  ...fixed && {
@@ -119,7 +119,7 @@ const StyledMenuItem = material.styled(material.MenuItem, {
119
119
  bottom: 0,
120
120
  right: 0,
121
121
  zIndex: 2,
122
- minHeight: cssUtils.MENU_ITEM_SIZE_EXTENDED,
122
+ minHeight: paletteUtils.MENU_ITEM_SIZE_EXTENDED,
123
123
  marginBottom: theme.spacing(1),
124
124
  padding: theme.spacing(0.5, 0),
125
125
  backgroundColor: `${theme.palette.background.paper} !important`,
@@ -129,7 +129,7 @@ const StyledMenuItem = material.styled(material.MenuItem, {
129
129
  padding: theme.spacing(0.5, 1.5)
130
130
  },
131
131
  ".MuiAutocomplete-listbox &.MuiAutocomplete-option:first-of-type": {
132
- minHeight: cssUtils.MENU_ITEM_SIZE_EXTENDED,
132
+ minHeight: paletteUtils.MENU_ITEM_SIZE_EXTENDED,
133
133
  marginTop: 0,
134
134
  "&:hover": {
135
135
  backgroundColor: theme.palette.background.paper
@@ -143,7 +143,7 @@ const StyledMenuItem = material.styled(material.MenuItem, {
143
143
  },
144
144
  ...dense && {
145
145
  "&.MuiButtonBase-root.MuiMenuItem-root": {
146
- minHeight: cssUtils.MENU_ITEM_SIZE_DENSE,
146
+ minHeight: paletteUtils.MENU_ITEM_SIZE_DENSE,
147
147
  padding: theme.spacing(0.25, 0)
148
148
  },
149
149
  "&.MuiButtonBase-root.MuiMenuItem-gutters": {