@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.
- package/CHANGELOG.md +7 -0
- package/dist/{Alert-BZPM5zpX.js → Alert-C7vSI6Pm.js} +1 -1
- package/dist/{Alert-C4W0H_uN.cjs → Alert-mhu6mbgG.cjs} +7 -7
- package/dist/{MenuItem-Cx5lTXXm.js → MenuItem-BXwl6OyF.js} +1 -1
- package/dist/{MenuItem-DoBJsRR_.cjs → MenuItem-CtqW_LpQ.cjs} +6 -6
- package/dist/components/index.cjs +393 -106
- package/dist/components/index.js +296 -17
- package/dist/{css-utils-CH7es90t.cjs → palette-utils-CbuIJ8kb.cjs} +328 -0
- package/dist/{css-utils-CjUBRJVK.js → palette-utils-DBM8n43g.js} +316 -5
- package/dist/theme/index.cjs +517 -161
- package/dist/theme/index.js +414 -59
- package/dist/types/components/Avatar/Avatar.stories.d.ts.map +1 -1
- package/dist/types/components/List/List.d.ts +24 -0
- package/dist/types/components/List/List.d.ts.map +1 -0
- package/dist/types/components/List/List.stories.d.ts +452 -0
- package/dist/types/components/List/List.stories.d.ts.map +1 -0
- package/dist/types/components/List/List.test.d.ts +2 -0
- package/dist/types/components/List/List.test.d.ts.map +1 -0
- package/dist/types/components/List/ListItem/ListItem.d.ts +10 -0
- package/dist/types/components/List/ListItem/ListItem.d.ts.map +1 -0
- package/dist/types/components/List/ListItem/ListItem.stories.d.ts +409 -0
- package/dist/types/components/List/ListItem/ListItem.stories.d.ts.map +1 -0
- package/dist/types/components/List/ListItem/ListItem.test.d.ts +2 -0
- package/dist/types/components/List/ListItem/ListItem.test.d.ts.map +1 -0
- package/dist/types/components/List/ListItemButton/ListItemButton.d.ts +9 -0
- package/dist/types/components/List/ListItemButton/ListItemButton.d.ts.map +1 -0
- package/dist/types/components/List/ListItemButton/ListItemButton.test.d.ts +2 -0
- package/dist/types/components/List/ListItemButton/ListItemButton.test.d.ts.map +1 -0
- package/dist/types/components/List/ListItemIcon/ListItemIcon.d.ts +18 -0
- package/dist/types/components/List/ListItemIcon/ListItemIcon.d.ts.map +1 -0
- package/dist/types/components/List/ListItemIcon/ListItemIcon.test.d.ts +2 -0
- package/dist/types/components/List/ListItemIcon/ListItemIcon.test.d.ts.map +1 -0
- package/dist/types/components/List/ListItemRightContent/ListItemRightContent.d.ts +14 -0
- package/dist/types/components/List/ListItemRightContent/ListItemRightContent.d.ts.map +1 -0
- package/dist/types/components/List/ListItemRightContent/ListItemRightContent.test.d.ts +2 -0
- package/dist/types/components/List/ListItemRightContent/ListItemRightContent.test.d.ts.map +1 -0
- package/dist/types/components/List/ListSubheader/ListSubheader.d.ts +9 -0
- package/dist/types/components/List/ListSubheader/ListSubheader.d.ts.map +1 -0
- package/dist/types/components/List/ListSubheader/ListSubheader.test.d.ts +2 -0
- package/dist/types/components/List/ListSubheader/ListSubheader.test.d.ts.map +1 -0
- package/dist/types/components/List/index.d.ts +16 -0
- package/dist/types/components/List/index.d.ts.map +1 -0
- package/dist/types/components/List/test-utils/list-test-fixtures.d.ts +60 -0
- package/dist/types/components/List/test-utils/list-test-fixtures.d.ts.map +1 -0
- package/dist/types/components/List/test-utils/list-test-utils.d.ts +33 -0
- package/dist/types/components/List/test-utils/list-test-utils.d.ts.map +1 -0
- package/dist/types/components/List/types.d.ts +3 -0
- package/dist/types/components/List/types.d.ts.map +1 -0
- package/dist/types/components/List/utils/utils.d.ts +3 -0
- package/dist/types/components/List/utils/utils.d.ts.map +1 -0
- package/dist/types/components/List/utils/utils.test.d.ts +2 -0
- package/dist/types/components/List/utils/utils.test.d.ts.map +1 -0
- package/dist/types/components/Menu/Menu/Menu.d.ts.map +1 -1
- package/dist/types/components/Menu/Menu/Menu.stories.d.ts.map +1 -1
- package/dist/types/components/Tag/Tag.d.ts +1 -1
- package/dist/types/components/Tag/Tag.d.ts.map +1 -1
- package/dist/types/components/Tag/Tag.stories.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/theme/components/data-display.d.ts.map +1 -1
- package/dist/types/theme/components/navigation.d.ts.map +1 -1
- package/dist/types/theme/components/stories/Chip.stories.d.ts.map +1 -1
- package/dist/types/theme/tokens/colors.d.ts.map +1 -1
- package/dist/types/theme/types.d.ts +181 -0
- package/dist/types/theme/types.d.ts.map +1 -1
- package/dist/types/utils/palette-utils.d.ts +9 -0
- package/dist/types/utils/palette-utils.d.ts.map +1 -1
- package/dist/types/utils/theme-constants.d.ts +4 -0
- package/dist/types/utils/theme-constants.d.ts.map +1 -1
- package/dist/types/widgets/ChartLegend.d.ts +5 -3
- package/dist/types/widgets/ChartLegend.d.ts.map +1 -1
- package/dist/types/widgets/PieWidgetUI/PieCentralText.d.ts +2 -2
- package/dist/types/widgets/PieWidgetUI/PieCentralText.d.ts.map +1 -1
- package/dist/types/widgets/PieWidgetUI/PieWidgetUI.d.ts +4 -3
- package/dist/types/widgets/PieWidgetUI/PieWidgetUI.d.ts.map +1 -1
- package/dist/types/widgets/PieWidgetUI/usePieCategories.d.ts +1 -1
- package/dist/widgets/index.cjs +122 -120
- package/dist/widgets/index.js +10 -8
- package/package.json +1 -1
- package/dist/palette-utils-B9ybmwiI.cjs +0 -304
- package/dist/palette-utils-BHqJlHm9.js +0 -288
- package/dist/types/theme/components/stories/List.stories.d.ts +0 -62
- 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 "./
|
|
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
|
|
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, ${
|
|
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:
|
|
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:
|
|
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 =
|
|
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 ? `${
|
|
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(
|
|
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,
|
|
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
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
146
|
+
minHeight: paletteUtils.MENU_ITEM_SIZE_DENSE,
|
|
147
147
|
padding: theme.spacing(0.25, 0)
|
|
148
148
|
},
|
|
149
149
|
"&.MuiButtonBase-root.MuiMenuItem-gutters": {
|