@foodpilot/foods 2.7.13 → 2.7.15

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.
@@ -13,13 +13,10 @@ const useTableStyles = (options) => {
13
13
  const theme = useTheme();
14
14
  const { maxLinePerRow } = options;
15
15
  const bodyCell = {
16
- padding: "0 20px",
16
+ padding: theme.spacing(1, 2),
17
17
  "&:last-child[data-pinned='true']": {
18
18
  width: "1%"
19
19
  },
20
- color: theme.palette.primary[700],
21
- fontSize: "12px",
22
- fontWeight: 700,
23
20
  borderInline: `1px solid ${theme.custom.grey[500]}`,
24
21
  // Ajout des propriétés pour l'ellipsis sur 2 lignes
25
22
  "& p": {
@@ -27,11 +24,16 @@ const useTableStyles = (options) => {
27
24
  WebkitLineClamp: maxLinePerRow,
28
25
  WebkitBoxOrient: "vertical",
29
26
  overflow: "hidden",
30
- whiteSpace: "initial"
27
+ whiteSpace: "initial",
28
+ // This is for one words expression
29
+ // Either ellipsis
30
+ textOverflow: "ellipsis"
31
+ // Or wrap the word and break it
32
+ // wordBreak: "break-word",
31
33
  }
32
34
  };
33
35
  const bodyRow = {
34
- height: "64px",
36
+ minHeight: "64px",
35
37
  "&:hover td::after": {
36
38
  backgroundColor: theme.custom.grey[300]
37
39
  }
@@ -45,10 +47,14 @@ const useTableStyles = (options) => {
45
47
  WebkitLineClamp: maxLinePerRow,
46
48
  WebkitBoxOrient: "vertical",
47
49
  overflow: "hidden",
48
- whiteSpace: "initial"
50
+ whiteSpace: "initial",
51
+ lineHeight: "normal",
52
+ // This is for one words expression
53
+ textOverflow: "ellipsis"
49
54
  },
50
- // alignItems: "center",
51
- // alignSelf: "stretch",
55
+ padding: theme.spacing(2),
56
+ minHeight: "48px",
57
+ justifyContent: "center",
52
58
  // Masquer les séparateurs verticaux
53
59
  "&>.Mui-TableHeadCell-Content .MuiDivider-vertical": {
54
60
  opacity: "0"
@@ -146,6 +152,14 @@ function MRTGrid(props) {
146
152
  muiTableProps: {
147
153
  sx: styles.table
148
154
  },
155
+ muiSelectCheckboxProps: {
156
+ // Leaving that empty here to show we can manipulate the
157
+ // Checkbox select on ONE row here;
158
+ },
159
+ muiSelectAllCheckboxProps: {
160
+ // Leaving that empty here to show we can manipulate the
161
+ // Checkbox select on row header here;
162
+ },
149
163
  // Configuration de la pagination
150
164
  paginationDisplayMode: "pages",
151
165
  muiPaginationProps: {
package/dist/main.js CHANGED
@@ -135,7 +135,7 @@ import { Textarea } from "./components/Textarea/Textarea.js";
135
135
  import { ToggleSwitch } from "./components/ToggleSwitch/ToggleSwitch.js";
136
136
  import { FoodsTooltip } from "./components/Tooltip/FoodsTooltip.js";
137
137
  import { FoodsTreeview } from "./components/Treeview/Treeview.js";
138
- import { typographyConfig } from "./themes/common/MUIComponents/typography.js";
138
+ import { allTypographyVariants, typographyConfig } from "./themes/common/MUIComponents/typography.js";
139
139
  import { allColors, allMainColors, dataVisualizationColors, extraColors, greenTheme, greyTheme, orangeTheme, redTheme, shadows, yellowTheme } from "./themes/common/colors.js";
140
140
  import { components } from "./themes/common/components.js";
141
141
  import { custom, numbers } from "./themes/common/custom.js";
@@ -302,6 +302,7 @@ export {
302
302
  WinepilotThemeOptions,
303
303
  allColors,
304
304
  allMainColors,
305
+ allTypographyVariants,
305
306
  anyToCheckbox,
306
307
  checkboxToAny,
307
308
  components,
@@ -1,5 +1,6 @@
1
1
  import { ThemeOptions } from '@mui/material';
2
- export type customTypographyVariants = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "huge-bold" | "huge-medium" | "huge" | "big-bold" | "big-medium" | "big" | "body-bold" | "body-medium" | "body" | "small-bold" | "small-medium" | "small" | "number-big" | "number-inter" | "number-small" | "number-micro";
2
+ export declare const allTypographyVariants: readonly ["h1", "h2", "h3", "h4", "h5", "h6", "huge-bold", "huge-medium", "huge", "big-bold", "big-medium", "big", "body-bold", "body-medium", "body", "small-bold", "small-medium", "small", "cta", "number-huge", "number-big", "number-inter", "number-small", "number-micro"];
3
+ export type customTypographyVariants = (typeof allTypographyVariants)[number];
3
4
  type TypographyNewVariants = Record<customTypographyVariants, React.CSSProperties>;
4
5
  type TypographyPropsNewVariants = Record<customTypographyVariants, true>;
5
6
  declare module "@mui/material/styles" {
@@ -1,5 +1,31 @@
1
1
  import { greyTheme } from "../colors.js";
2
- const typographyConfig = {
2
+ const allTypographyVariants = [
3
+ "h1",
4
+ "h2",
5
+ "h3",
6
+ "h4",
7
+ "h5",
8
+ "h6",
9
+ "huge-bold",
10
+ "huge-medium",
11
+ "huge",
12
+ "big-bold",
13
+ "big-medium",
14
+ "big",
15
+ "body-bold",
16
+ "body-medium",
17
+ "body",
18
+ "small-bold",
19
+ "small-medium",
20
+ "small",
21
+ "cta",
22
+ "number-huge",
23
+ "number-big",
24
+ "number-inter",
25
+ "number-small",
26
+ "number-micro"
27
+ ];
28
+ const typographyConfig = (_palette) => ({
3
29
  fontFamily: ["Montserrat", "serif"].join(","),
4
30
  h1: {
5
31
  fontStyle: "normal",
@@ -50,7 +76,7 @@ const typographyConfig = {
50
76
  color: greyTheme[2800]
51
77
  },
52
78
  "huge-bold": {
53
- fontStyle: "normal",
79
+ fontStyle: "bold",
54
80
  fontWeight: 600,
55
81
  fontSize: "1.125rem",
56
82
  lineHeight: "2.025rem",
@@ -71,7 +97,7 @@ const typographyConfig = {
71
97
  color: greyTheme[2800]
72
98
  },
73
99
  "big-bold": {
74
- fontStyle: "normal",
100
+ fontStyle: "bold",
75
101
  fontWeight: "600",
76
102
  fontSize: "1rem",
77
103
  // 16px
@@ -95,7 +121,7 @@ const typographyConfig = {
95
121
  color: greyTheme[2800]
96
122
  },
97
123
  "body-bold": {
98
- fontStyle: "normal",
124
+ fontStyle: "bold",
99
125
  fontWeight: "600",
100
126
  fontSize: "1rem",
101
127
  // 16px
@@ -119,7 +145,7 @@ const typographyConfig = {
119
145
  color: greyTheme[2800]
120
146
  },
121
147
  "small-bold": {
122
- fontStyle: "normal",
148
+ fontStyle: "bold",
123
149
  fontWeight: 600,
124
150
  fontSize: "0.875rem",
125
151
  // 14px
@@ -141,6 +167,19 @@ const typographyConfig = {
141
167
  // 14px
142
168
  color: greyTheme[2800]
143
169
  },
170
+ cta: {
171
+ fontStyle: "bold",
172
+ fontWeight: 700,
173
+ fontSize: "0.875rem",
174
+ color: greyTheme[2800]
175
+ },
176
+ "number-huge": {
177
+ fontStyle: "normal",
178
+ fontWeight: 700,
179
+ fontSize: "2rem",
180
+ lineHeight: "3.2rem",
181
+ color: greyTheme[2800]
182
+ },
144
183
  "number-big": {
145
184
  fontStyle: "normal",
146
185
  fontWeight: 700,
@@ -170,7 +209,8 @@ const typographyConfig = {
170
209
  lineHeight: "1.4rem",
171
210
  color: greyTheme[2800]
172
211
  }
173
- };
212
+ });
174
213
  export {
214
+ allTypographyVariants,
175
215
  typographyConfig
176
216
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@foodpilot/foods",
3
3
  "private": false,
4
- "version": "2.7.13",
4
+ "version": "2.7.15",
5
5
  "type": "module",
6
6
  "main": "./dist/main.js",
7
7
  "module": "./dist/main.js",