@foodpilot/foods 2.11.32 → 2.11.34
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/dist/components/Banner/Banner.js +1 -1
- package/dist/components/Banner/banner.types.d.ts +6 -0
- package/dist/components/Banner/index.d.ts +1 -0
- package/dist/components/Banner/variants/ThemedBanner.d.ts +2 -1
- package/dist/components/Banner/variants/ThemedBanner.js +6 -4
- package/dist/main.js +2 -1
- package/dist/themes/common/MUIComponents/typography.d.ts +2 -1
- package/dist/themes/common/MUIComponents/typography.js +311 -195
- package/dist/themes/common/components.js +0 -37
- package/package.json +5 -5
|
@@ -7,7 +7,7 @@ const Banner = (props) => {
|
|
|
7
7
|
return /* @__PURE__ */ jsx(ClassicBanner, { variant, stylePresetOverride: props.stylePresetOverride, children: props.children });
|
|
8
8
|
}
|
|
9
9
|
if (variant === "themed") {
|
|
10
|
-
return /* @__PURE__ */ jsx(ThemedBanner, { variant, children: props.children });
|
|
10
|
+
return /* @__PURE__ */ jsx(ThemedBanner, { variant, colors: props.colors, children: props.children });
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
export {
|
|
@@ -6,9 +6,15 @@ export type StylePreset = {
|
|
|
6
6
|
icon: keyof typeof iconMapping;
|
|
7
7
|
color: string;
|
|
8
8
|
};
|
|
9
|
+
export type ThemedBannerColors = {
|
|
10
|
+
backgroundColor?: string;
|
|
11
|
+
color?: string;
|
|
12
|
+
sideBorder?: string;
|
|
13
|
+
};
|
|
9
14
|
export type BannerVariantProps = {
|
|
10
15
|
variant?: ClassicBannerType;
|
|
11
16
|
stylePresetOverride?: Partial<StylePreset>;
|
|
12
17
|
} | {
|
|
13
18
|
variant?: ThemedBannerType;
|
|
19
|
+
colors?: ThemedBannerColors;
|
|
14
20
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ThemedBannerType } from '../banner.types';
|
|
1
|
+
import { ThemedBannerColors, ThemedBannerType } from '../banner.types';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
type Props = {
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
variant?: ThemedBannerType;
|
|
6
|
+
colors?: ThemedBannerColors;
|
|
6
7
|
};
|
|
7
8
|
export declare const ThemedBanner: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -3,6 +3,8 @@ import { useTheme, Stack, Box, Typography } from "@mui/material";
|
|
|
3
3
|
import { FoodsIcon } from "../../Icons/FoodsIcon.js";
|
|
4
4
|
const ThemedBanner = (props) => {
|
|
5
5
|
const theme = useTheme();
|
|
6
|
+
const { colors } = props;
|
|
7
|
+
const { backgroundColor = "#EDF5FF", color = "#1976D2", sideBorder = "#398BDB" } = colors || {};
|
|
6
8
|
return /* @__PURE__ */ jsxs(
|
|
7
9
|
Stack,
|
|
8
10
|
{
|
|
@@ -10,14 +12,14 @@ const ThemedBanner = (props) => {
|
|
|
10
12
|
padding: theme.spacing(2),
|
|
11
13
|
gap: theme.spacing(1.5),
|
|
12
14
|
borderRadius: "8px",
|
|
13
|
-
borderLeft: `4px solid
|
|
15
|
+
borderLeft: `4px solid ${sideBorder}`,
|
|
14
16
|
sx: {
|
|
15
|
-
backgroundColor
|
|
16
|
-
color
|
|
17
|
+
backgroundColor,
|
|
18
|
+
color
|
|
17
19
|
},
|
|
18
20
|
children: [
|
|
19
21
|
/* @__PURE__ */ jsx(Box, { paddingTop: "2px", children: /* @__PURE__ */ jsx(FoodsIcon, { size: 2, icon: "information" }) }),
|
|
20
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small-medium", children: typeof props.children === "string" ? /* @__PURE__ */ jsx(
|
|
22
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small-medium", sx: { width: "100%" }, children: typeof props.children === "string" ? /* @__PURE__ */ jsx(
|
|
21
23
|
Box,
|
|
22
24
|
{
|
|
23
25
|
sx: {
|
package/dist/main.js
CHANGED
|
@@ -141,7 +141,7 @@ import { Textarea } from "./components/Textarea/Textarea.js";
|
|
|
141
141
|
import { ToggleSwitch } from "./components/ToggleSwitch/ToggleSwitch.js";
|
|
142
142
|
import { FoodsTooltip } from "./components/Tooltip/FoodsTooltip.js";
|
|
143
143
|
import { FoodsTreeview } from "./components/Treeview/Treeview.js";
|
|
144
|
-
import { allTypographyVariants, typographyConfig } from "./themes/common/MUIComponents/typography.js";
|
|
144
|
+
import { allTypographyVariants, deprecatedVariants, typographyConfig } from "./themes/common/MUIComponents/typography.js";
|
|
145
145
|
import { allColors, allMainColors, dataVisualizationColors, extraColors, greenTheme, greyTheme, orangeTheme, redTheme, shadows, yellowTheme } from "./themes/common/colors.js";
|
|
146
146
|
import { components } from "./themes/common/components.js";
|
|
147
147
|
import { custom, numbers } from "./themes/common/custom.js";
|
|
@@ -321,6 +321,7 @@ export {
|
|
|
321
321
|
computeSize,
|
|
322
322
|
custom,
|
|
323
323
|
dataVisualizationColors,
|
|
324
|
+
deprecatedVariants,
|
|
324
325
|
extraColors,
|
|
325
326
|
getThemeLogo,
|
|
326
327
|
greenTheme,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ThemeOptions } from '@mui/material';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const deprecatedVariants: readonly ["small", "body", "big", "huge", "number-huge"];
|
|
3
|
+
export declare const allTypographyVariants: readonly ["small", "body", "big", "huge", "number-huge", "h1", "h2", "h3", "h4", "h5", "h6", "small-regular", "small-medium", "small-semibold", "small-bold", "body-regular", "body-medium", "body-semibold", "body-bold", "big-regular", "big-medium", "big-semibold", "big-bold", "huge-regular", "huge-medium", "huge-semibold", "huge-bold", "cta", "number-big", "number-inter", "number-small", "number-micro"];
|
|
3
4
|
export type customTypographyVariants = (typeof allTypographyVariants)[number];
|
|
4
5
|
type TypographyNewVariants = Record<customTypographyVariants, React.CSSProperties>;
|
|
5
6
|
type TypographyPropsNewVariants = Record<customTypographyVariants, true>;
|
|
@@ -1,216 +1,332 @@
|
|
|
1
1
|
import { greyTheme } from "../colors.js";
|
|
2
|
+
const deprecatedVariants = ["small", "body", "big", "huge", "number-huge"];
|
|
2
3
|
const allTypographyVariants = [
|
|
4
|
+
// Legacy, but I duplicate them to avoid breaking changes
|
|
5
|
+
...deprecatedVariants,
|
|
3
6
|
"h1",
|
|
4
7
|
"h2",
|
|
5
8
|
"h3",
|
|
6
9
|
"h4",
|
|
7
10
|
"h5",
|
|
8
11
|
"h6",
|
|
9
|
-
"
|
|
10
|
-
"huge-medium",
|
|
11
|
-
"huge",
|
|
12
|
-
"big-bold",
|
|
13
|
-
"big-medium",
|
|
14
|
-
"big",
|
|
15
|
-
"body-bold",
|
|
16
|
-
"body-medium",
|
|
17
|
-
"body",
|
|
18
|
-
"small-bold",
|
|
12
|
+
"small-regular",
|
|
19
13
|
"small-medium",
|
|
20
|
-
"small",
|
|
14
|
+
"small-semibold",
|
|
15
|
+
"small-bold",
|
|
16
|
+
"body-regular",
|
|
17
|
+
"body-medium",
|
|
18
|
+
"body-semibold",
|
|
19
|
+
"body-bold",
|
|
20
|
+
"big-regular",
|
|
21
|
+
"big-medium",
|
|
22
|
+
"big-semibold",
|
|
23
|
+
"big-bold",
|
|
24
|
+
"huge-regular",
|
|
25
|
+
"huge-medium",
|
|
26
|
+
"huge-semibold",
|
|
27
|
+
"huge-bold",
|
|
21
28
|
"cta",
|
|
22
|
-
"number-huge",
|
|
23
29
|
"number-big",
|
|
24
30
|
"number-inter",
|
|
25
31
|
"number-small",
|
|
26
32
|
"number-micro"
|
|
27
33
|
];
|
|
28
|
-
const typographyConfig = (_palette) =>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
fontWeight: "700",
|
|
34
|
+
const typographyConfig = (_palette) => {
|
|
35
|
+
const defaultOption = {
|
|
36
|
+
// I am thinking we may want to use `color: inherit` or something like that.
|
|
37
|
+
// Still unsure
|
|
38
|
+
color: greyTheme[2800],
|
|
39
|
+
fontStyle: "normal"
|
|
40
|
+
};
|
|
41
|
+
const smallDefaults = {
|
|
42
|
+
fontSize: "0.75rem",
|
|
43
|
+
lineHeight: "160%",
|
|
44
|
+
letterSpacing: "0%",
|
|
45
|
+
"@media (max-width:1200px)": {
|
|
46
|
+
fontSize: "0.6rem",
|
|
47
|
+
lineHeight: "160%"
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
const smallFonts = {
|
|
51
|
+
small: {
|
|
52
|
+
...defaultOption,
|
|
53
|
+
...smallDefaults,
|
|
54
|
+
fontWeight: 400
|
|
55
|
+
},
|
|
56
|
+
"small-regular": {
|
|
57
|
+
...defaultOption,
|
|
58
|
+
...smallDefaults,
|
|
59
|
+
fontWeight: 400
|
|
60
|
+
},
|
|
61
|
+
"small-medium": {
|
|
62
|
+
...defaultOption,
|
|
63
|
+
...smallDefaults,
|
|
64
|
+
fontWeight: 500
|
|
65
|
+
},
|
|
66
|
+
"small-semibold": {
|
|
67
|
+
...defaultOption,
|
|
68
|
+
...smallDefaults,
|
|
69
|
+
fontWeight: 600
|
|
70
|
+
},
|
|
71
|
+
"small-bold": {
|
|
72
|
+
...defaultOption,
|
|
73
|
+
...smallDefaults,
|
|
74
|
+
fontWeight: 700
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
const bodyDefaults = {
|
|
73
78
|
fontSize: "0.875rem",
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
fontWeight: "500",
|
|
110
|
-
fontSize: "1rem",
|
|
111
|
-
// 16px
|
|
112
|
-
lineHeight: "1.8rem",
|
|
113
|
-
color: greyTheme[2800]
|
|
114
|
-
},
|
|
115
|
-
big: {
|
|
116
|
-
fontStyle: "normal",
|
|
117
|
-
fontWeight: "400",
|
|
118
|
-
fontSize: "1rem",
|
|
119
|
-
// 16px
|
|
120
|
-
lineHeight: "1.8rem",
|
|
121
|
-
color: greyTheme[2800]
|
|
122
|
-
},
|
|
123
|
-
"body-bold": {
|
|
124
|
-
fontStyle: "bold",
|
|
125
|
-
fontWeight: "600",
|
|
126
|
-
fontSize: "1rem",
|
|
127
|
-
// 16px
|
|
128
|
-
lineHeight: "1.8rem",
|
|
129
|
-
color: greyTheme[2800]
|
|
130
|
-
},
|
|
131
|
-
"body-medium": {
|
|
132
|
-
fontStyle: "normal",
|
|
133
|
-
fontWeight: "500",
|
|
134
|
-
fontSize: "1rem",
|
|
135
|
-
// 16px
|
|
136
|
-
lineHeight: "1.8rem",
|
|
137
|
-
color: greyTheme[2800]
|
|
138
|
-
},
|
|
139
|
-
body: {
|
|
140
|
-
fontStyle: "normal",
|
|
141
|
-
fontWeight: "400",
|
|
79
|
+
lineHeight: "160%",
|
|
80
|
+
letterSpacing: "0%",
|
|
81
|
+
"@media (max-width:1200px)": {
|
|
82
|
+
fontSize: "0.75rem",
|
|
83
|
+
lineHeight: "160%"
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
const bodyFonts = {
|
|
87
|
+
body: {
|
|
88
|
+
...defaultOption,
|
|
89
|
+
...bodyDefaults,
|
|
90
|
+
fontWeight: 400
|
|
91
|
+
},
|
|
92
|
+
"body-regular": {
|
|
93
|
+
...defaultOption,
|
|
94
|
+
...bodyDefaults,
|
|
95
|
+
fontWeight: 400
|
|
96
|
+
},
|
|
97
|
+
"body-medium": {
|
|
98
|
+
...defaultOption,
|
|
99
|
+
...bodyDefaults,
|
|
100
|
+
fontWeight: 500
|
|
101
|
+
},
|
|
102
|
+
"body-semibold": {
|
|
103
|
+
...defaultOption,
|
|
104
|
+
...bodyDefaults,
|
|
105
|
+
fontWeight: 600
|
|
106
|
+
},
|
|
107
|
+
"body-bold": {
|
|
108
|
+
...defaultOption,
|
|
109
|
+
...bodyDefaults,
|
|
110
|
+
fontWeight: 700
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
const bigDefaults = {
|
|
142
114
|
fontSize: "1rem",
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}
|
|
115
|
+
lineHeight: "160%",
|
|
116
|
+
letterSpacing: "0%",
|
|
117
|
+
"@media (max-width:1200px)": {
|
|
118
|
+
fontSize: "0.875rem",
|
|
119
|
+
lineHeight: "160%"
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
const bigFonts = {
|
|
123
|
+
big: {
|
|
124
|
+
...defaultOption,
|
|
125
|
+
...bigDefaults,
|
|
126
|
+
fontWeight: "400"
|
|
127
|
+
},
|
|
128
|
+
"big-regular": {
|
|
129
|
+
...defaultOption,
|
|
130
|
+
...bigDefaults,
|
|
131
|
+
fontWeight: "400"
|
|
132
|
+
},
|
|
133
|
+
"big-medium": {
|
|
134
|
+
...defaultOption,
|
|
135
|
+
...bigDefaults,
|
|
136
|
+
fontWeight: "500"
|
|
137
|
+
},
|
|
138
|
+
"big-semibold": {
|
|
139
|
+
...defaultOption,
|
|
140
|
+
...bigDefaults,
|
|
141
|
+
fontWeight: "600"
|
|
142
|
+
},
|
|
143
|
+
"big-bold": {
|
|
144
|
+
...defaultOption,
|
|
145
|
+
...bigDefaults,
|
|
146
|
+
fontWeight: "700"
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
const hugeDefaults = {
|
|
150
|
+
fontSize: "1.125rem",
|
|
151
|
+
lineHeight: "160%",
|
|
152
|
+
letterSpacing: "0%",
|
|
153
|
+
"@media (max-width:1200px)": {
|
|
154
|
+
fontSize: "1rem",
|
|
155
|
+
lineHeight: "160%"
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
const hugeFonts = {
|
|
159
|
+
huge: {
|
|
160
|
+
...defaultOption,
|
|
161
|
+
...hugeDefaults,
|
|
162
|
+
fontWeight: 400
|
|
163
|
+
},
|
|
164
|
+
"huge-regular": {
|
|
165
|
+
...defaultOption,
|
|
166
|
+
...hugeDefaults,
|
|
167
|
+
fontWeight: 400
|
|
168
|
+
},
|
|
169
|
+
"huge-medium": {
|
|
170
|
+
...defaultOption,
|
|
171
|
+
...hugeDefaults,
|
|
172
|
+
fontWeight: 500
|
|
173
|
+
},
|
|
174
|
+
"huge-semibold": {
|
|
175
|
+
...defaultOption,
|
|
176
|
+
...hugeDefaults,
|
|
177
|
+
fontWeight: 600
|
|
178
|
+
},
|
|
179
|
+
"huge-bold": {
|
|
180
|
+
...defaultOption,
|
|
181
|
+
...hugeDefaults,
|
|
182
|
+
fontWeight: 700
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
const numberFonts = {
|
|
186
|
+
"number-huge": {
|
|
187
|
+
// Same as big because huge has disappeared
|
|
188
|
+
...defaultOption,
|
|
189
|
+
fontWeight: 700,
|
|
190
|
+
fontSize: "2rem",
|
|
191
|
+
lineHeight: "116%",
|
|
192
|
+
letterSpacing: "0%",
|
|
193
|
+
"@media (max-width:1200px)": {
|
|
194
|
+
fontSize: "1.75rem"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"number-big": {
|
|
198
|
+
...defaultOption,
|
|
199
|
+
fontWeight: 700,
|
|
200
|
+
fontSize: "2rem",
|
|
201
|
+
lineHeight: "116%",
|
|
202
|
+
letterSpacing: "0%",
|
|
203
|
+
"@media (max-width:1200px)": {
|
|
204
|
+
fontSize: "1.75rem"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"number-inter": {
|
|
208
|
+
...defaultOption,
|
|
209
|
+
fontWeight: 700,
|
|
210
|
+
fontSize: "1.25rem",
|
|
211
|
+
lineHeight: "140%",
|
|
212
|
+
letterSpacing: "0%",
|
|
213
|
+
"@media (max-width:1200px)": {
|
|
214
|
+
fontSize: "1.125rem"
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"number-small": {
|
|
218
|
+
...defaultOption,
|
|
219
|
+
fontWeight: 700,
|
|
220
|
+
fontSize: "1rem",
|
|
221
|
+
lineHeight: "150%",
|
|
222
|
+
letterSpacing: "0%",
|
|
223
|
+
"@media (max-width:1200px)": {
|
|
224
|
+
fontSize: "0.75rem"
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"number-micro": {
|
|
228
|
+
...defaultOption,
|
|
229
|
+
fontWeight: 700,
|
|
230
|
+
fontSize: "0.875rem",
|
|
231
|
+
lineHeight: "1.4rem",
|
|
232
|
+
color: greyTheme[2800]
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
const headers = {
|
|
236
|
+
h1: {
|
|
237
|
+
...defaultOption,
|
|
238
|
+
fontWeight: "700",
|
|
239
|
+
fontSize: "2rem",
|
|
240
|
+
lineHeight: "160%",
|
|
241
|
+
letterSpacing: "0%",
|
|
242
|
+
"@media (max-width:1200px)": {
|
|
243
|
+
fontSize: "1.375rem",
|
|
244
|
+
lineHeight: "140%"
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
h2: {
|
|
248
|
+
...defaultOption,
|
|
249
|
+
fontWeight: "700",
|
|
250
|
+
fontSize: "1.5rem",
|
|
251
|
+
lineHeight: "160%",
|
|
252
|
+
letterSpacing: "0%",
|
|
253
|
+
"@media (max-width:1200px)": {
|
|
254
|
+
fontSize: "1.25rem",
|
|
255
|
+
lineHeight: "140%"
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
h3: {
|
|
259
|
+
...defaultOption,
|
|
260
|
+
fontWeight: "700",
|
|
261
|
+
fontSize: "1.25rem",
|
|
262
|
+
lineHeight: "160%",
|
|
263
|
+
letterSpace: "0%",
|
|
264
|
+
"@media (max-width:1200px)": {
|
|
265
|
+
fontSize: "1.125rem",
|
|
266
|
+
lineHeight: "140%"
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
h4: {
|
|
270
|
+
...defaultOption,
|
|
271
|
+
fontWeight: "700",
|
|
272
|
+
fontSize: "1.125rem",
|
|
273
|
+
lineHeight: "160%",
|
|
274
|
+
letterSpacing: "0%",
|
|
275
|
+
"@media (max-width:1200px)": {
|
|
276
|
+
fontSize: "1rem",
|
|
277
|
+
lineHeight: "150%"
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
h5: {
|
|
281
|
+
...defaultOption,
|
|
282
|
+
fontWeight: "700",
|
|
283
|
+
fontSize: "1rem",
|
|
284
|
+
lineHeight: "160%",
|
|
285
|
+
letterSpacing: "0%",
|
|
286
|
+
"@media (max-width:1200px)": {
|
|
287
|
+
fontSize: "0.875rem",
|
|
288
|
+
lineHeight: "150%"
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
// Deprecated
|
|
292
|
+
h6: {
|
|
293
|
+
...defaultOption,
|
|
294
|
+
fontWeight: "700",
|
|
295
|
+
fontSize: "1rem",
|
|
296
|
+
lineHeight: "160%",
|
|
297
|
+
letterSpacing: "0%",
|
|
298
|
+
"@media (max-width:1200px)": {
|
|
299
|
+
fontSize: "0.875rem",
|
|
300
|
+
lineHeight: "150%"
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
const ctaAndLinks = {
|
|
305
|
+
cta: {
|
|
306
|
+
...defaultOption,
|
|
307
|
+
fontWeight: 700,
|
|
308
|
+
fontSize: "0.875rem",
|
|
309
|
+
lineHeight: "150%",
|
|
310
|
+
letterSpacing: "0%",
|
|
311
|
+
"@media (max-width:1200px)": {
|
|
312
|
+
fontSize: "1rem"
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
const typographyOptions = {
|
|
317
|
+
fontFamily: ["Montserrat", "serif"].join(","),
|
|
318
|
+
...headers,
|
|
319
|
+
...smallFonts,
|
|
320
|
+
...bodyFonts,
|
|
321
|
+
...bigFonts,
|
|
322
|
+
...hugeFonts,
|
|
323
|
+
...ctaAndLinks,
|
|
324
|
+
...numberFonts
|
|
325
|
+
};
|
|
326
|
+
return typographyOptions;
|
|
327
|
+
};
|
|
213
328
|
export {
|
|
214
329
|
allTypographyVariants,
|
|
330
|
+
deprecatedVariants,
|
|
215
331
|
typographyConfig
|
|
216
332
|
};
|
|
@@ -720,43 +720,6 @@ const components = {
|
|
|
720
720
|
}
|
|
721
721
|
})
|
|
722
722
|
}
|
|
723
|
-
},
|
|
724
|
-
MuiTypography: {
|
|
725
|
-
styleOverrides: {
|
|
726
|
-
h1: ({ theme }) => ({
|
|
727
|
-
[theme.breakpoints.up("md")]: {
|
|
728
|
-
fontSize: "2rem",
|
|
729
|
-
// 32px desktop (au lieu de 28px mobile)
|
|
730
|
-
lineHeight: "3.2rem"
|
|
731
|
-
// Proportionnel
|
|
732
|
-
}
|
|
733
|
-
}),
|
|
734
|
-
h2: ({ theme }) => ({
|
|
735
|
-
[theme.breakpoints.up("md")]: {
|
|
736
|
-
fontSize: "1.5rem",
|
|
737
|
-
// 24px desktop (au lieu de 22px mobile)
|
|
738
|
-
lineHeight: "2.4rem"
|
|
739
|
-
// Proportionnel
|
|
740
|
-
}
|
|
741
|
-
}),
|
|
742
|
-
h3: ({ theme }) => ({
|
|
743
|
-
[theme.breakpoints.up("md")]: {
|
|
744
|
-
fontSize: "1.25rem",
|
|
745
|
-
// 20px desktop (au lieu de 18px mobile)
|
|
746
|
-
lineHeight: "2rem"
|
|
747
|
-
// Proportionnel
|
|
748
|
-
}
|
|
749
|
-
}),
|
|
750
|
-
h4: ({ theme }) => ({
|
|
751
|
-
[theme.breakpoints.up("md")]: {
|
|
752
|
-
fontSize: "1.125rem",
|
|
753
|
-
// 18px desktop (au lieu de 16px mobile)
|
|
754
|
-
lineHeight: "1.8rem"
|
|
755
|
-
// Proportionnel
|
|
756
|
-
}
|
|
757
|
-
})
|
|
758
|
-
// H5, H6, body, big, small restent à 16px sur tous écrans
|
|
759
|
-
}
|
|
760
723
|
}
|
|
761
724
|
};
|
|
762
725
|
export {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foodpilot/foods",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.11.
|
|
4
|
+
"version": "2.11.34",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/main.js",
|
|
7
7
|
"module": "./dist/main.js",
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
"@mui/x-date-pickers": "^7.0.0",
|
|
211
211
|
"@mui/x-tree-view": "^7.0.0",
|
|
212
212
|
"i18next": "^23.0.0 || ^25.0.0",
|
|
213
|
-
"lodash": "^4.17.
|
|
213
|
+
"lodash": "^4.17.23",
|
|
214
214
|
"material-react-table": "^2.0.0",
|
|
215
215
|
"react": "^18.0.0 || ^19.0.0",
|
|
216
216
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
@@ -278,9 +278,9 @@
|
|
|
278
278
|
"react-dom": "^19.0.0",
|
|
279
279
|
"rollup-plugin-visualizer": "^6.0.4",
|
|
280
280
|
"size-limit": "^11.2.0",
|
|
281
|
-
"storybook": "^9.1.
|
|
281
|
+
"storybook": "^9.1.17",
|
|
282
282
|
"typescript": "^5.3.3",
|
|
283
|
-
"vite": "^6.
|
|
283
|
+
"vite": "^6.4.1",
|
|
284
284
|
"vite-bundle-visualizer": "^1.2.1",
|
|
285
285
|
"vite-plugin-dts": "^4.5.0",
|
|
286
286
|
"vite-plugin-svgr": "^3"
|
|
@@ -311,7 +311,7 @@
|
|
|
311
311
|
"i18next-browser-languagedetector": "^7.2.0",
|
|
312
312
|
"i18next-http-backend": "^2.4.2",
|
|
313
313
|
"lexical": "^0.21.0",
|
|
314
|
-
"lodash": "^4.17.
|
|
314
|
+
"lodash": "^4.17.23",
|
|
315
315
|
"material-react-table": "^3.2.1",
|
|
316
316
|
"material-ui-popup-state": "^5.3.1",
|
|
317
317
|
"prettier": "^3.1.1",
|