@foodpilot/foods 0.1.2
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/README.md +30 -0
- package/dist/atoms/gammeAtom.d.ts +12 -0
- package/dist/atoms/index.d.ts +5 -0
- package/dist/atoms/ingredientsAtom.d.ts +7 -0
- package/dist/atoms/productGridAtom.d.ts +13 -0
- package/dist/atoms/questionnaireAtom.d.ts +4 -0
- package/dist/components/Accordion/AccordionProduct.d.ts +27 -0
- package/dist/components/Accordion/GenericAccordion.d.ts +8 -0
- package/dist/components/Accordion/index.d.ts +2 -0
- package/dist/components/BaseTemplate/BaseTemplate.d.ts +4 -0
- package/dist/components/BaseTemplate/Footer.d.ts +1 -0
- package/dist/components/BaseTemplate/Navbar.d.ts +11 -0
- package/dist/components/BaseTemplate/index.d.ts +4 -0
- package/dist/components/Box/CategoryBox.d.ts +4 -0
- package/dist/components/Box/DottedBox.d.ts +5 -0
- package/dist/components/Box/InfoBox.d.ts +5 -0
- package/dist/components/Box/LineGroupBox.d.ts +9 -0
- package/dist/components/Box/QuoteBox.d.ts +5 -0
- package/dist/components/Box/SolidGreyBox.d.ts +5 -0
- package/dist/components/Box/WarningBox.d.ts +5 -0
- package/dist/components/Box/index.d.ts +7 -0
- package/dist/components/Button/Button.d.ts +6 -0
- package/dist/components/Button/TertiaryToggleButton.d.ts +9 -0
- package/dist/components/Button/index.d.ts +3 -0
- package/dist/components/CardImage.d.ts +5 -0
- package/dist/components/Checkbox/PrimaryCheckbox.d.ts +13 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/Dialog/ConsumptionModal.d.ts +11 -0
- package/dist/components/Dialog/MaterialModal.d.ts +11 -0
- package/dist/components/Dialog/PackagingModal.d.ts +11 -0
- package/dist/components/Dialog/PrimaryDialog.d.ts +16 -0
- package/dist/components/Dialog/TransformationModal.d.ts +11 -0
- package/dist/components/Dialog/index.d.ts +5 -0
- package/dist/components/Fields/CategoryField.d.ts +9 -0
- package/dist/components/Fields/GammeField.d.ts +9 -0
- package/dist/components/Fields/NumberField.d.ts +9 -0
- package/dist/components/Fields/TextField.d.ts +9 -0
- package/dist/components/Fields/index.d.ts +4 -0
- package/dist/components/Form/FormBase.d.ts +19 -0
- package/dist/components/Form/index.d.ts +2 -0
- package/dist/components/Grid/MRTGrid.d.ts +4 -0
- package/dist/components/Grid/MaterialGrid.d.ts +6 -0
- package/dist/components/Grid/index.d.ts +2 -0
- package/dist/components/Inputs/RoundInput.d.ts +3 -0
- package/dist/components/Inputs/RoundNumberInput.d.ts +5 -0
- package/dist/components/Inputs/SearchBox.d.ts +7 -0
- package/dist/components/Inputs/index.d.ts +3 -0
- package/dist/components/LinearProgress.d.ts +9 -0
- package/dist/components/Navigation/FormTopBar.d.ts +11 -0
- package/dist/components/Navigation/IconThread.d.ts +10 -0
- package/dist/components/Navigation/index.d.ts +2 -0
- package/dist/components/Popover/AddProductPopover.d.ts +1 -0
- package/dist/components/Popover/AnchoredPopover.d.ts +16 -0
- package/dist/components/Popover/BigPopoverLayout.d.ts +12 -0
- package/dist/components/Popover/CommonSelectProductLine.d.ts +13 -0
- package/dist/components/Popover/WhitePopoverOnIcon.d.ts +8 -0
- package/dist/components/Popover/index.d.ts +6 -0
- package/dist/components/ProductGrid/Cells/ArrayCell.d.ts +3 -0
- package/dist/components/ProductGrid/Cells/EcoScoreCell.d.ts +6 -0
- package/dist/components/ProductGrid/Cells/GreyCell.d.ts +3 -0
- package/dist/components/ProductGrid/Cells/LinkCell.d.ts +4 -0
- package/dist/components/ProductGrid/Cells/PointsCell.d.ts +4 -0
- package/dist/components/ProductGrid/Cells/index.d.ts +6 -0
- package/dist/components/ProductGrid/Layout/ProductPageHeader.d.ts +1 -0
- package/dist/components/ProductGrid/Layout/TableHeader.d.ts +1 -0
- package/dist/components/ProductGrid/Layout/index.d.ts +3 -0
- package/dist/components/ProductGrid/Popovers/ColumnPositionPopover.d.ts +4 -0
- package/dist/components/ProductGrid/Popovers/DraggableColumn.d.ts +8 -0
- package/dist/components/ProductGrid/Popovers/FilterPopover.d.ts +4 -0
- package/dist/components/ProductGrid/Popovers/ProductCreationMenu.d.ts +1 -0
- package/dist/components/ProductGrid/Popovers/RowMenu.d.ts +1 -0
- package/dist/components/ProductGrid/Popovers/index.d.ts +6 -0
- package/dist/components/ProductGrid/ProductGrid.d.ts +11 -0
- package/dist/components/ProductGrid/index.d.ts +5 -0
- package/dist/components/SsqCard.d.ts +22 -0
- package/dist/components/Texts/TextArrowList.d.ts +4 -0
- package/dist/components/Texts/TextTitle.d.ts +8 -0
- package/dist/components/Texts/TextTitleGreyIcon.d.ts +8 -0
- package/dist/components/Texts/index.d.ts +3 -0
- package/dist/components/index.d.ts +17 -0
- package/dist/main.d.ts +11 -0
- package/dist/main.js +54278 -0
- package/dist/main.umd.cjs +426 -0
- package/dist/themes/FoodPilotTheme.d.ts +3 -0
- package/dist/themes/ThemeExtensions.d.ts +99 -0
- package/dist/themes/WinePilotTheme.d.ts +3 -0
- package/dist/themes/index.d.ts +3 -0
- package/dist/types/Product.d.ts +18 -0
- package/dist/types/index.d.ts +42 -0
- package/package.json +77 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SxProps } from "@mui/system";
|
|
3
|
+
type CustomThemeKeys = {
|
|
4
|
+
custom: {
|
|
5
|
+
color: CustomColor;
|
|
6
|
+
grey: GreyShades;
|
|
7
|
+
searchBox: SxProps;
|
|
8
|
+
rowMenuElement: SxProps;
|
|
9
|
+
productGrid: {
|
|
10
|
+
baseCell: SxProps;
|
|
11
|
+
boldCell: SxProps;
|
|
12
|
+
greyCell: SxProps;
|
|
13
|
+
headerCell: SxProps;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export type CustomColor = {
|
|
18
|
+
main: string;
|
|
19
|
+
gradient: string;
|
|
20
|
+
reverseGradient: string;
|
|
21
|
+
100: string;
|
|
22
|
+
200: string;
|
|
23
|
+
300: string;
|
|
24
|
+
400: string;
|
|
25
|
+
500: string;
|
|
26
|
+
600: string;
|
|
27
|
+
700: string;
|
|
28
|
+
"700-light": string;
|
|
29
|
+
800: string;
|
|
30
|
+
900: string;
|
|
31
|
+
1000: string;
|
|
32
|
+
};
|
|
33
|
+
export type GreyShades = {
|
|
34
|
+
gradientDark: string;
|
|
35
|
+
gradientLight: string;
|
|
36
|
+
100: string;
|
|
37
|
+
200: string;
|
|
38
|
+
300: string;
|
|
39
|
+
400: string;
|
|
40
|
+
500: string;
|
|
41
|
+
600: string;
|
|
42
|
+
700: string;
|
|
43
|
+
800: string;
|
|
44
|
+
900: string;
|
|
45
|
+
1000: string;
|
|
46
|
+
1100: string;
|
|
47
|
+
1200: string;
|
|
48
|
+
1300: string;
|
|
49
|
+
1400: string;
|
|
50
|
+
1500: string;
|
|
51
|
+
1600: string;
|
|
52
|
+
1700: string;
|
|
53
|
+
1800: string;
|
|
54
|
+
1900: string;
|
|
55
|
+
2000: string;
|
|
56
|
+
2100: string;
|
|
57
|
+
2200: string;
|
|
58
|
+
2300: string;
|
|
59
|
+
2400: string;
|
|
60
|
+
2500: string;
|
|
61
|
+
2600: string;
|
|
62
|
+
2700: string;
|
|
63
|
+
2800: string;
|
|
64
|
+
2900: string;
|
|
65
|
+
3000: string;
|
|
66
|
+
};
|
|
67
|
+
export type customTypographyVariants = "h1" | "h2" | "h3" | "h4" | "h5" | "huge" | "big-bold" | "big-medium" | "big" | "body-bold" | "body" | "body-light" | "popover-header" | "grey-tag" | "white-tag";
|
|
68
|
+
export type customButtonVariants = "primary" | "secondary" | "ternary" | "text" | "black-text" | "navbar-current" | "navbar" | "black-filled" | "white-filled" | "white-filled-no-shadow";
|
|
69
|
+
type TypographyNewVariants = Record<customTypographyVariants, React.CSSProperties>;
|
|
70
|
+
type TypographyPropsNewVariants = Record<customTypographyVariants, true>;
|
|
71
|
+
declare module "@mui/material/styles" {
|
|
72
|
+
interface TypographyVariants extends TypographyNewVariants {
|
|
73
|
+
}
|
|
74
|
+
interface TypographyVariantsOptions extends TypographyNewVariants {
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
declare module "@mui/material/Typography" {
|
|
78
|
+
interface TypographyPropsVariantOverrides extends TypographyPropsNewVariants {
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
declare module "@mui/material/styles" {
|
|
82
|
+
interface Theme extends CustomThemeKeys {
|
|
83
|
+
}
|
|
84
|
+
interface ThemeOptions extends CustomThemeKeys {
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
type ButtonNewVariants = Record<customButtonVariants, React.CSSProperties>;
|
|
88
|
+
type ButtonPropsNewVariants = Record<customButtonVariants, true>;
|
|
89
|
+
declare module "@mui/material/styles" {
|
|
90
|
+
interface ButtonVariants extends ButtonNewVariants {
|
|
91
|
+
}
|
|
92
|
+
interface ButtonVariantsOptions extends ButtonNewVariants {
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
declare module "@mui/material/Button" {
|
|
96
|
+
interface ButtonPropsVariantOverrides extends ButtonPropsNewVariants {
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@foodpilot/foods",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.1.2",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/main.umd.cjs",
|
|
7
|
+
"module": "./dist/main.js",
|
|
8
|
+
"types": "./dist/main.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/main.js",
|
|
12
|
+
"require": "./dist/main.umd.cjs"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"dev": "vite",
|
|
20
|
+
"build": "tsc && vite build",
|
|
21
|
+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
22
|
+
"preview": "vite preview",
|
|
23
|
+
"storybook": "storybook dev -p 6006",
|
|
24
|
+
"build-storybook": "storybook build"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"react": "^18.2.0",
|
|
28
|
+
"react-dom": "^18.2.0"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@emotion/react": "^11.11.3",
|
|
32
|
+
"@emotion/styled": "^11.11.0",
|
|
33
|
+
"@mui/icons-material": "^5.15.3",
|
|
34
|
+
"@mui/material": "^5.15.3",
|
|
35
|
+
"@storybook/addon-actions": "^7.6.7",
|
|
36
|
+
"@storybook/addon-essentials": "^7.6.7",
|
|
37
|
+
"@storybook/addon-interactions": "^7.6.7",
|
|
38
|
+
"@storybook/addon-links": "^7.6.7",
|
|
39
|
+
"@storybook/addon-mdx-gfm": "^7.6.7",
|
|
40
|
+
"@storybook/addon-onboarding": "^1.0.10",
|
|
41
|
+
"@storybook/blocks": "^7.6.7",
|
|
42
|
+
"@storybook/react": "^7.6.7",
|
|
43
|
+
"@storybook/react-vite": "^7.6.7",
|
|
44
|
+
"@storybook/testing-library": "^0.2.2",
|
|
45
|
+
"@types/react": "^18.2.47",
|
|
46
|
+
"@types/react-dom": "^18.2.18",
|
|
47
|
+
"@typescript-eslint/eslint-plugin": "^6.18.1",
|
|
48
|
+
"@typescript-eslint/parser": "^6.18.1",
|
|
49
|
+
"@vitejs/plugin-react": "^4.2.1",
|
|
50
|
+
"eslint": "^8.56.0",
|
|
51
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
52
|
+
"eslint-plugin-react-refresh": "^0.4.5",
|
|
53
|
+
"eslint-plugin-storybook": "^0.6.15",
|
|
54
|
+
"react": "^18.2.0",
|
|
55
|
+
"react-dom": "^18.2.0",
|
|
56
|
+
"storybook": "^7.6.7",
|
|
57
|
+
"typescript": "^5.3.3",
|
|
58
|
+
"vite": "^5.0.11",
|
|
59
|
+
"vite-plugin-dts": "^3.7.0",
|
|
60
|
+
"vite-plugin-svgr": "^3"
|
|
61
|
+
},
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"@mui/x-date-pickers": "^6.18.7",
|
|
64
|
+
"i18next": "^23.7.16",
|
|
65
|
+
"i18next-browser-languagedetector": "^7.2.0",
|
|
66
|
+
"i18next-http-backend": "^2.4.2",
|
|
67
|
+
"lodash": "^4.17.21",
|
|
68
|
+
"material-react-table": "^2.5.1",
|
|
69
|
+
"prettier": "^3.1.1",
|
|
70
|
+
"react-dnd": "^16.0.1",
|
|
71
|
+
"react-dnd-html5-backend": "^16.0.1",
|
|
72
|
+
"react-i18next": "^14.0.0",
|
|
73
|
+
"recoil": "^0.7.7",
|
|
74
|
+
"typeface-montserrat": "^1.1.13",
|
|
75
|
+
"uuid": "^9.0.1"
|
|
76
|
+
}
|
|
77
|
+
}
|