@foodpilot/foods 0.2.0 → 0.3.0
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/Accordion/FormAccordion.d.ts +39 -0
- package/dist/components/Accordion/ProductAccordion.d.ts +3 -2
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Badge.d.ts +7 -0
- package/dist/components/Box/AdditionalContentBox.d.ts +10 -0
- package/dist/components/Box/CategoryBox.d.ts +1 -0
- package/dist/components/Box/ContextualContentBox.d.ts +8 -0
- package/dist/components/Box/HelperBox.d.ts +2 -0
- package/dist/components/Box/SectionBox.d.ts +8 -0
- package/dist/components/Box/WhiteBox.d.ts +2 -0
- package/dist/components/Box/index.d.ts +5 -0
- package/dist/components/Button/TertiaryToggleButton.d.ts +6 -2
- package/dist/components/Button/TertiaryToggleButtonNodeTitle.d.ts +13 -0
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/Chart/DoughnutChart.d.ts +12 -0
- package/dist/components/Chart/ScatterPlot.d.ts +22 -0
- package/dist/components/Chart/index.d.ts +2 -0
- package/dist/components/Checkbox/BaseCheckbox.d.ts +21 -0
- package/dist/components/Checkbox/FoodsCheckbox.d.ts +9 -0
- package/dist/components/Checkbox/PrimaryCheckbox.d.ts +2 -2
- package/dist/components/Checkbox/helperFunctions.d.ts +3 -0
- package/dist/components/Checkbox/index.d.ts +3 -0
- package/dist/components/Checkbox/types.d.ts +9 -0
- package/dist/components/CustomTypography/CustomTypography.d.ts +6 -0
- package/dist/components/CustomTypography/TypographyList.d.ts +7 -0
- package/dist/components/CustomTypography/index.d.ts +2 -0
- package/dist/components/Dialog/PrimaryDialog.d.ts +2 -2
- package/dist/components/Field/NumberField.d.ts +1 -1
- package/dist/components/Form/FoodsFormBase/ConfirmDialog.d.ts +8 -0
- package/dist/components/Form/FoodsFormBase/FoodsFormBase.d.ts +40 -0
- package/dist/components/Form/FoodsFormBase/FormBaseContext.d.ts +24 -0
- package/dist/components/Form/FoodsFormBase/FormTopBar/ActionButtons.d.ts +1 -0
- package/dist/components/Form/FoodsFormBase/FormTopBar/BarTitle.d.ts +1 -0
- package/dist/components/Form/FoodsFormBase/FormTopBar/FormTopBar.d.ts +1 -0
- package/dist/components/Form/FoodsFormBase/FormTopBar/IconThread.d.ts +1 -0
- package/dist/components/Form/FoodsFormBase/FormTopBar/SavingCloudStatus.d.ts +1 -0
- package/dist/components/Form/FoodsFormBase/FormTopBar/index.d.ts +1 -0
- package/dist/components/Form/FoodsFormBase/MainPageLayout.d.ts +1 -0
- package/dist/components/Form/FoodsFormBase/index.d.ts +3 -0
- package/dist/components/Form/FoodsFormBase/usePageLock.d.ts +17 -0
- package/dist/components/Form/FormBase.d.ts +22 -13
- package/dist/components/Form/FormBox.d.ts +7 -0
- package/dist/components/Form/FormPropertyBox.d.ts +14 -0
- package/dist/components/Form/FormTopBar.d.ts +21 -6
- package/dist/components/Form/FormUnit.d.ts +7 -0
- package/dist/components/Form/index.d.ts +5 -0
- package/dist/components/Grid/Cell/GreyCell.d.ts +2 -1
- package/dist/components/Grid/Cell/index.d.ts +0 -2
- package/dist/components/Indicator/ComparaisonIndicator.d.ts +4 -0
- package/dist/components/Indicator/index.d.ts +1 -0
- package/dist/components/LinearProgress.d.ts +8 -3
- package/dist/components/Navigation/FoodsNavBar/FoodsNavbar.d.ts +52 -0
- package/dist/components/Navigation/FoodsNavBar/Footer/Footer.d.ts +11 -0
- package/dist/components/Navigation/FoodsNavBar/Footer/UserButton.d.ts +10 -0
- package/dist/components/Navigation/FoodsNavBar/Footer/UserPopover.d.ts +12 -0
- package/dist/components/Navigation/FoodsNavBar/Footer/index.d.ts +1 -0
- package/dist/components/Navigation/FoodsNavBar/NavbarAction.d.ts +8 -0
- package/dist/components/Navigation/FoodsNavBar/Organization.d.ts +7 -0
- package/dist/components/Navigation/FoodsNavBar/index.d.ts +2 -0
- package/dist/components/Navigation/IconThread.d.ts +5 -6
- package/dist/components/Navigation/Navbar.d.ts +50 -7
- package/dist/components/Navigation/index.d.ts +1 -1
- package/dist/components/Number/NumberUnit.d.ts +7 -0
- package/dist/components/Number/Score.d.ts +7 -0
- package/dist/components/Number/index.d.ts +2 -0
- package/dist/components/Popover/AnchoredPopover.d.ts +2 -0
- package/dist/components/Popover/BigPopoverLayout.d.ts +5 -5
- package/dist/components/Popover/CoordinatePopover.d.ts +9 -0
- package/dist/components/Popover/OptionsPopover.d.ts +16 -0
- package/dist/components/Popover/WhitePopover.d.ts +8 -0
- package/dist/components/Popover/index.d.ts +3 -0
- package/dist/components/Radio/BaseRadio.d.ts +22 -0
- package/dist/components/Radio/FoodsRadioList.d.ts +9 -0
- package/dist/components/Radio/RadioBoolean.d.ts +8 -0
- package/dist/components/Radio/RadioList.d.ts +18 -0
- package/dist/components/Radio/index.d.ts +3 -0
- package/dist/components/{SsqCard.d.ts → Ssq/SsqCard.d.ts} +10 -6
- package/dist/components/Ssq/index.d.ts +1 -0
- package/dist/components/Tabs/ButtonTabs.d.ts +10 -0
- package/dist/components/Tabs/SectionTabs.d.ts +20 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Text/TextBlock.d.ts +13 -0
- package/dist/components/Text/TextTitle.d.ts +2 -2
- package/dist/components/Text/index.d.ts +1 -0
- package/dist/components/Textarea/Textarea.d.ts +6 -0
- package/dist/components/index.d.ts +9 -1
- package/dist/main.d.ts +2 -18
- package/dist/main.js +47244 -31358
- package/dist/main.umd.cjs +253 -182
- package/dist/themes/FoodPilotTheme.d.ts +3 -1
- package/dist/themes/ThemeExtensions.d.ts +53 -2
- package/dist/themes/WinePilotTheme.d.ts +3 -1
- package/package.json +6 -2
- package/dist/components/Grid/Cell/ArrayCell.d.ts +0 -3
- package/dist/components/Grid/Cell/LinkCell.d.ts +0 -5
- package/dist/components/Grid/MaterialGrid.d.ts +0 -6
- package/dist/types/Product.d.ts +0 -18
- package/dist/types/index.d.ts +0 -42
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import { GreyShades } from "./ThemeExtensions";
|
|
1
|
+
import { GreenShades, GreyShades, RedShades } from "./ThemeExtensions";
|
|
2
2
|
export declare const greyTheme: GreyShades;
|
|
3
|
+
export declare const redTheme: RedShades;
|
|
4
|
+
export declare const greenTheme: GreenShades;
|
|
3
5
|
export declare const FoodPilotTheme: import("@mui/material").Theme;
|
|
@@ -4,6 +4,8 @@ type CustomThemeKeys = {
|
|
|
4
4
|
custom: {
|
|
5
5
|
color: CustomColor;
|
|
6
6
|
grey: GreyShades;
|
|
7
|
+
red: RedShades;
|
|
8
|
+
green: GreenShades;
|
|
7
9
|
searchBox: SxProps;
|
|
8
10
|
rowMenuElement: SxProps;
|
|
9
11
|
productGrid: {
|
|
@@ -64,8 +66,33 @@ export type GreyShades = {
|
|
|
64
66
|
2900: string;
|
|
65
67
|
3000: string;
|
|
66
68
|
};
|
|
67
|
-
export type
|
|
68
|
-
|
|
69
|
+
export type RedShades = {
|
|
70
|
+
100: string;
|
|
71
|
+
200: string;
|
|
72
|
+
300: string;
|
|
73
|
+
400: string;
|
|
74
|
+
500: string;
|
|
75
|
+
600: string;
|
|
76
|
+
700: string;
|
|
77
|
+
800: string;
|
|
78
|
+
900: string;
|
|
79
|
+
1000: string;
|
|
80
|
+
};
|
|
81
|
+
export type GreenShades = {
|
|
82
|
+
100: string;
|
|
83
|
+
200: string;
|
|
84
|
+
300: string;
|
|
85
|
+
400: string;
|
|
86
|
+
500: string;
|
|
87
|
+
600: string;
|
|
88
|
+
700: string;
|
|
89
|
+
800: string;
|
|
90
|
+
900: string;
|
|
91
|
+
1000: string;
|
|
92
|
+
};
|
|
93
|
+
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";
|
|
94
|
+
export type customButtonVariants = "primary" | "secondary" | "ternary" | "text" | "black-text" | "selected-menu" | "selected-submenu" | "default-menu" | "black-filled" | "white-filled" | "white-filled-no-shadow";
|
|
95
|
+
export type customAvatarVariants = "small" | "medium" | "big";
|
|
69
96
|
type TypographyNewVariants = Record<customTypographyVariants, React.CSSProperties>;
|
|
70
97
|
type TypographyPropsNewVariants = Record<customTypographyVariants, true>;
|
|
71
98
|
declare module "@mui/material/styles" {
|
|
@@ -84,6 +111,30 @@ declare module "@mui/material/styles" {
|
|
|
84
111
|
interface ThemeOptions extends CustomThemeKeys {
|
|
85
112
|
}
|
|
86
113
|
}
|
|
114
|
+
type AvatarNewVariants = Record<customAvatarVariants, React.CSSProperties>;
|
|
115
|
+
type AvatarPropsNewVariants = Record<customAvatarVariants, true>;
|
|
116
|
+
declare module "@mui/material/styles" {
|
|
117
|
+
interface AvatarVariants extends AvatarNewVariants {
|
|
118
|
+
}
|
|
119
|
+
interface AvatarVariantsOptions extends AvatarNewVariants {
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
declare module "@mui/material/Avatar" {
|
|
123
|
+
interface AvatarPropsVariantOverrides extends AvatarPropsNewVariants {
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
type AvatarGroupNewVariants = Record<customAvatarVariants, React.CSSProperties>;
|
|
127
|
+
type AvatarGroupPropsNewVariants = Record<customAvatarVariants, true>;
|
|
128
|
+
declare module "@mui/material/styles" {
|
|
129
|
+
interface AvatarGroupVariants extends AvatarGroupNewVariants {
|
|
130
|
+
}
|
|
131
|
+
interface AvatarGroupVariantsOptions extends AvatarGroupNewVariants {
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
declare module "@mui/material/AvatarGroup" {
|
|
135
|
+
interface AvatarGroupPropsVariantOverrides extends AvatarGroupPropsNewVariants {
|
|
136
|
+
}
|
|
137
|
+
}
|
|
87
138
|
type ButtonNewVariants = Record<customButtonVariants, React.CSSProperties>;
|
|
88
139
|
type ButtonPropsNewVariants = Record<customButtonVariants, true>;
|
|
89
140
|
declare module "@mui/material/styles" {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import { GreyShades } from "./ThemeExtensions";
|
|
1
|
+
import { GreenShades, GreyShades, RedShades } from "./ThemeExtensions";
|
|
2
2
|
export declare const greyTheme: GreyShades;
|
|
3
|
+
export declare const redTheme: RedShades;
|
|
4
|
+
export declare const greenTheme: GreenShades;
|
|
3
5
|
export declare const WinePilotTheme: import("@mui/material").Theme;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foodpilot/foods",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/main.umd.cjs",
|
|
7
7
|
"module": "./dist/main.js",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"@storybook/react": "^7.6.7",
|
|
50
50
|
"@storybook/react-vite": "^7.6.7",
|
|
51
51
|
"@storybook/testing-library": "^0.2.2",
|
|
52
|
+
"@types/chroma-js": "^2.4.4",
|
|
52
53
|
"@types/react": "^18.2.47",
|
|
53
54
|
"@types/react-dom": "^18.2.18",
|
|
54
55
|
"@typescript-eslint/eslint-plugin": "^6.18.1",
|
|
@@ -74,16 +75,19 @@
|
|
|
74
75
|
},
|
|
75
76
|
"dependencies": {
|
|
76
77
|
"@mui/x-date-pickers": "^6.18.7",
|
|
78
|
+
"chart.js": "^4.4.2",
|
|
79
|
+
"chartjs-plugin-datalabels": "^2.2.0",
|
|
80
|
+
"chroma-js": "^2.4.2",
|
|
77
81
|
"i18next": "^23.7.16",
|
|
78
82
|
"i18next-browser-languagedetector": "^7.2.0",
|
|
79
83
|
"i18next-http-backend": "^2.4.2",
|
|
80
84
|
"lodash": "^4.17.21",
|
|
81
85
|
"material-react-table": "^2.5.1",
|
|
82
86
|
"prettier": "^3.1.1",
|
|
87
|
+
"react-chartjs-2": "^5.2.0",
|
|
83
88
|
"react-dnd": "^16.0.1",
|
|
84
89
|
"react-dnd-html5-backend": "^16.0.1",
|
|
85
90
|
"react-i18next": "^14.0.0",
|
|
86
|
-
"recoil": "^0.7.7",
|
|
87
91
|
"typeface-montserrat": "^1.1.13",
|
|
88
92
|
"uuid": "^9.0.1"
|
|
89
93
|
}
|
package/dist/types/Product.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare enum ProductKeys {
|
|
2
|
-
"name" = "name",
|
|
3
|
-
"brand" = "brand",
|
|
4
|
-
"tags" = "tags",
|
|
5
|
-
"identifier" = "identifier",
|
|
6
|
-
"upts" = "upts",
|
|
7
|
-
"hasUptsWarning" = "hasUptsWarning",
|
|
8
|
-
"isFavorite" = "isFavorite"
|
|
9
|
-
}
|
|
10
|
-
export type Product = {
|
|
11
|
-
[ProductKeys.name]: string;
|
|
12
|
-
[ProductKeys.brand]: string;
|
|
13
|
-
[ProductKeys.tags]: string[];
|
|
14
|
-
[ProductKeys.identifier]: string;
|
|
15
|
-
[ProductKeys.upts]: number | null;
|
|
16
|
-
[ProductKeys.hasUptsWarning]: boolean;
|
|
17
|
-
[ProductKeys.isFavorite]: boolean;
|
|
18
|
-
};
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export type Product = {
|
|
2
|
-
name: string;
|
|
3
|
-
clientId: string;
|
|
4
|
-
agribalyseId: string;
|
|
5
|
-
netWeight: number;
|
|
6
|
-
gamme: string[];
|
|
7
|
-
tags: string[];
|
|
8
|
-
ingredients: Ingredient[];
|
|
9
|
-
packagings: Packaging[];
|
|
10
|
-
transformations: Transformation[];
|
|
11
|
-
consumptions: Consumption[];
|
|
12
|
-
model?: string;
|
|
13
|
-
distribution: string;
|
|
14
|
-
};
|
|
15
|
-
export type EmptyProduct = Partial<Product>;
|
|
16
|
-
export type Transformation = {
|
|
17
|
-
id: number;
|
|
18
|
-
weight: number;
|
|
19
|
-
name: string;
|
|
20
|
-
};
|
|
21
|
-
export type Ingredient = {
|
|
22
|
-
name: string;
|
|
23
|
-
proportion: number;
|
|
24
|
-
weight: number;
|
|
25
|
-
chain: boolean;
|
|
26
|
-
supplier: string[];
|
|
27
|
-
tags: string[];
|
|
28
|
-
};
|
|
29
|
-
export type Material = {
|
|
30
|
-
name: string;
|
|
31
|
-
weight: number;
|
|
32
|
-
unit: string;
|
|
33
|
-
recycledPart: number;
|
|
34
|
-
};
|
|
35
|
-
export type Packaging = {
|
|
36
|
-
name: string;
|
|
37
|
-
weight: number;
|
|
38
|
-
items: Material[];
|
|
39
|
-
};
|
|
40
|
-
export type Consumption = {
|
|
41
|
-
name: string;
|
|
42
|
-
};
|