@foodpilot/foods 0.3.41 → 0.3.43
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/Badge/ComingSoonBadge.d.ts +5 -0
- package/dist/components/Badge/index.d.ts +1 -0
- package/dist/components/Cards/ScoreCard/Header/ScoreCardHeader.d.ts +8 -0
- package/dist/components/Cards/ScoreCard/Header/ValueSwitcher/ValuePopover.d.ts +11 -0
- package/dist/components/Cards/ScoreCard/Header/ValueSwitcher/ValueSwitcher.d.ts +8 -0
- package/dist/components/Cards/ScoreCard/ScoreCard.d.ts +15 -0
- package/dist/components/Cards/TrajectoryCards/Blocks/ThreeHorizontal.d.ts +13 -0
- package/dist/components/Cards/TrajectoryCards/Blocks/ThreeVertical.d.ts +13 -0
- package/dist/components/Cards/TrajectoryCards/Blocks/TrajectoryComparison.d.ts +10 -0
- package/dist/components/Cards/TrajectoryCards/Blocks/TwoHorizontal.d.ts +12 -0
- package/dist/components/Cards/TrajectoryCards/Blocks/TwoVertical.d.ts +1 -0
- package/dist/components/Cards/TrajectoryCards/Step.d.ts +17 -0
- package/dist/components/Cards/TrajectoryCards/TrajectoryCards.d.ts +11 -13
- package/dist/components/Cards/index.d.ts +1 -0
- package/dist/components/ComparisonBlock/Blocks/HorizontalLargeBlock.d.ts +19 -0
- package/dist/components/ComparisonBlock/Blocks/HorizontalMediumBlock.d.ts +20 -0
- package/dist/components/ComparisonBlock/Blocks/HorizontalSmallBlock.d.ts +13 -0
- package/dist/components/ComparisonBlock/Blocks/VerticalLargeBlock.d.ts +19 -0
- package/dist/components/ComparisonBlock/Blocks/VerticalMediumBlock.d.ts +19 -0
- package/dist/components/ComparisonBlock/ComparisonBlock.d.ts +24 -0
- package/dist/components/ComparisonBlock/getColorAndArrow.d.ts +15 -0
- package/dist/components/ComparisonBlock/index.d.ts +1 -1
- package/dist/main.js +3388 -3388
- package/dist/main.umd.cjs +51 -51
- package/package.json +1 -1
- package/dist/components/ComparisonBlock/FoodsComparisonBlock.d.ts +0 -33
- package/dist/components/ComparisonBlock/FoodsComparisonBlockHorizontalLarge.d.ts +0 -23
- package/dist/components/ComparisonBlock/FoodsComparisonBlockHorizontalMedium.d.ts +0 -23
- package/dist/components/ComparisonBlock/FoodsComparisonBlockHorizontalSmall.d.ts +0 -17
- package/dist/components/ComparisonBlock/FoodsComparisonBlockVerticalLarge.d.ts +0 -23
- package/dist/components/ComparisonBlock/FoodsComparisonBlockVerticalMedium.d.ts +0 -23
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { OptionsPopoverType } from './ValueSwitcher/ValueSwitcher';
|
|
2
|
+
|
|
3
|
+
export type ScoreCardHeaderProps = {
|
|
4
|
+
title: string;
|
|
5
|
+
selectedItemLabel: string;
|
|
6
|
+
optionsProps: OptionsPopoverType;
|
|
7
|
+
};
|
|
8
|
+
export declare const ScoreCardHeader: (props: ScoreCardHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SxProps } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
type Anchor = HTMLElement | null;
|
|
4
|
+
type ValuePopoverProps = {
|
|
5
|
+
anchor: Anchor;
|
|
6
|
+
setAnchor: (elementToAttachTo: Anchor) => void;
|
|
7
|
+
children: JSX.Element | undefined;
|
|
8
|
+
paperOverrides: SxProps | undefined;
|
|
9
|
+
};
|
|
10
|
+
export declare const ValuePopover: (props: ValuePopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { OptionsPopoverProps } from '../../../../Popover';
|
|
2
|
+
|
|
3
|
+
export type OptionsPopoverType = Pick<OptionsPopoverProps, "content" | "onChange" | "defaultIndex">;
|
|
4
|
+
export type ValueSwitcherProps = {
|
|
5
|
+
selectedItemLabel: string;
|
|
6
|
+
optionsProps: OptionsPopoverType;
|
|
7
|
+
};
|
|
8
|
+
export declare const ValueSwitcher: (props: ValueSwitcherProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OptionsPopoverType } from './Header/ValueSwitcher/ValueSwitcher';
|
|
2
|
+
|
|
3
|
+
type ScoreHeader = {
|
|
4
|
+
title: string;
|
|
5
|
+
selectedItemLabel: string;
|
|
6
|
+
optionsProps: OptionsPopoverType;
|
|
7
|
+
};
|
|
8
|
+
export type ScoreCardProps = {
|
|
9
|
+
header: ScoreHeader;
|
|
10
|
+
moreDetailAction?: () => void;
|
|
11
|
+
soonAvailableText?: string;
|
|
12
|
+
children?: JSX.Element;
|
|
13
|
+
};
|
|
14
|
+
export declare const ScoreCard: (props: ScoreCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StepProps } from '../TrajectoryCards';
|
|
2
|
+
import { Improvement } from '../../../ComparisonBlock/ComparisonBlock.tsx';
|
|
3
|
+
|
|
4
|
+
type ThreeHorizontalProps = {
|
|
5
|
+
steps: {
|
|
6
|
+
start: StepProps;
|
|
7
|
+
current: StepProps;
|
|
8
|
+
target: StepProps;
|
|
9
|
+
};
|
|
10
|
+
improvement: Improvement;
|
|
11
|
+
};
|
|
12
|
+
export declare const ThreeHorizontal: (props: ThreeHorizontalProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StepProps } from '../TrajectoryCards';
|
|
2
|
+
import { Improvement } from '../../../ComparisonBlock/ComparisonBlock.tsx';
|
|
3
|
+
|
|
4
|
+
type ThreeVerticalProps = {
|
|
5
|
+
steps: {
|
|
6
|
+
start: StepProps;
|
|
7
|
+
current: StepProps;
|
|
8
|
+
target: StepProps;
|
|
9
|
+
};
|
|
10
|
+
improvement: Improvement;
|
|
11
|
+
};
|
|
12
|
+
export declare const ThreeVertical: (props: ThreeVerticalProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Improvement } from '../../../ComparisonBlock/ComparisonBlock.tsx';
|
|
2
|
+
import { StepType } from '../Step';
|
|
3
|
+
|
|
4
|
+
type TrajectoryComparisonProps = {
|
|
5
|
+
improvement: Improvement;
|
|
6
|
+
value: StepType["value"];
|
|
7
|
+
comparedTo: StepType["value"];
|
|
8
|
+
};
|
|
9
|
+
export declare const TrajectoryComparison: (props: TrajectoryComparisonProps) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StepProps } from '../TrajectoryCards';
|
|
2
|
+
import { Improvement } from '../../../ComparisonBlock/ComparisonBlock.tsx';
|
|
3
|
+
|
|
4
|
+
type TwoHorizontalProps = {
|
|
5
|
+
steps: {
|
|
6
|
+
start: StepProps;
|
|
7
|
+
target: StepProps;
|
|
8
|
+
};
|
|
9
|
+
improvement: Improvement;
|
|
10
|
+
};
|
|
11
|
+
export declare const TwoHorizontal: (props: TwoHorizontalProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TwoVertical: (props: TwoVertical) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SxProps } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
export type StepType = {
|
|
4
|
+
year: string;
|
|
5
|
+
label: string;
|
|
6
|
+
value: number | null;
|
|
7
|
+
unit: string;
|
|
8
|
+
incomplete: boolean;
|
|
9
|
+
};
|
|
10
|
+
type StepsProps = {
|
|
11
|
+
step: StepType;
|
|
12
|
+
isLast: boolean;
|
|
13
|
+
isHorizontal?: boolean;
|
|
14
|
+
extra?: SxProps;
|
|
15
|
+
};
|
|
16
|
+
export declare const Step: (props: StepsProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
incomplete: boolean;
|
|
7
|
-
};
|
|
1
|
+
import { Improvement } from '../../ComparisonBlock/ComparisonBlock.tsx';
|
|
2
|
+
import { StepType } from './Step';
|
|
3
|
+
|
|
4
|
+
export type StepProps = Omit<StepType, "label">;
|
|
5
|
+
export type TrajectoryPosition = "horizontal" | "vertical";
|
|
8
6
|
export type TrajectorySteps = {
|
|
9
|
-
start:
|
|
10
|
-
current:
|
|
11
|
-
target:
|
|
7
|
+
start: StepProps;
|
|
8
|
+
current: StepProps | null;
|
|
9
|
+
target: StepProps;
|
|
12
10
|
};
|
|
13
11
|
export type TrajectoryCardsProps = {
|
|
14
12
|
steps: TrajectorySteps;
|
|
15
|
-
position:
|
|
16
|
-
|
|
13
|
+
position: TrajectoryPosition;
|
|
14
|
+
improvement: Improvement;
|
|
17
15
|
};
|
|
18
|
-
export declare const TrajectoryCards: (
|
|
16
|
+
export declare const TrajectoryCards: (props: TrajectoryCardsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IconMapping } from '../../Icons';
|
|
2
|
+
import { ColorSet } from '../getColorAndArrow';
|
|
3
|
+
|
|
4
|
+
type ComparisonBlockProps = {
|
|
5
|
+
percentageDifference: string;
|
|
6
|
+
comparedTo: {
|
|
7
|
+
value: number;
|
|
8
|
+
unit: string;
|
|
9
|
+
label: string;
|
|
10
|
+
};
|
|
11
|
+
iconName: keyof IconMapping;
|
|
12
|
+
colors: ColorSet;
|
|
13
|
+
comparisonText?: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare const HorizontalLargeBlock: (props: ComparisonBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IconMapping } from '../../Icons';
|
|
2
|
+
import { ColorSet } from '../getColorAndArrow';
|
|
3
|
+
|
|
4
|
+
type ComparisonBlockProps = {
|
|
5
|
+
percentageDifference: string;
|
|
6
|
+
comparedTo: {
|
|
7
|
+
value: number;
|
|
8
|
+
unit: string;
|
|
9
|
+
label: string;
|
|
10
|
+
};
|
|
11
|
+
iconName: keyof IconMapping;
|
|
12
|
+
colors: ColorSet;
|
|
13
|
+
comparisonText?: string;
|
|
14
|
+
disableText: boolean;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare const HorizontalMediumBlock: (props: ComparisonBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IconMapping } from '../../Icons';
|
|
2
|
+
import { ColorSet } from '../getColorAndArrow';
|
|
3
|
+
|
|
4
|
+
type ComparisonBlockProps = {
|
|
5
|
+
percentageDifference: string;
|
|
6
|
+
iconName: keyof IconMapping;
|
|
7
|
+
colors: ColorSet;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare const HorizontalSmallBlock: (props: ComparisonBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IconMapping } from '../../Icons';
|
|
2
|
+
import { ColorSet } from '../getColorAndArrow';
|
|
3
|
+
|
|
4
|
+
type ComparisonBlockProps = {
|
|
5
|
+
percentageDifference: string;
|
|
6
|
+
comparedTo: {
|
|
7
|
+
value: number;
|
|
8
|
+
unit: string;
|
|
9
|
+
label: string;
|
|
10
|
+
};
|
|
11
|
+
iconName: keyof IconMapping;
|
|
12
|
+
colors: ColorSet;
|
|
13
|
+
comparisonText?: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare const VerticalLargeBlock: (props: ComparisonBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IconMapping } from '../../Icons';
|
|
2
|
+
import { ColorSet } from '../getColorAndArrow';
|
|
3
|
+
|
|
4
|
+
type ComparisonBlockProps = {
|
|
5
|
+
percentageDifference: string;
|
|
6
|
+
comparedTo: {
|
|
7
|
+
value: number;
|
|
8
|
+
unit: string;
|
|
9
|
+
label: string;
|
|
10
|
+
};
|
|
11
|
+
iconName: keyof IconMapping;
|
|
12
|
+
colors: ColorSet;
|
|
13
|
+
comparisonText?: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare const VerticalMediumBlock: (props: ComparisonBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type Improvement = "increase" | "decrease";
|
|
2
|
+
type HorizontalLayout = {
|
|
3
|
+
direction: "horizontal";
|
|
4
|
+
size: "L" | "M" | "S";
|
|
5
|
+
};
|
|
6
|
+
type VerticalLayout = {
|
|
7
|
+
direction: "vertical";
|
|
8
|
+
size: "L" | "M";
|
|
9
|
+
};
|
|
10
|
+
type Layout = HorizontalLayout | VerticalLayout;
|
|
11
|
+
type ComparisonBlockProps = {
|
|
12
|
+
currentValue: number;
|
|
13
|
+
comparedTo: {
|
|
14
|
+
value: number;
|
|
15
|
+
unit: string;
|
|
16
|
+
label: string;
|
|
17
|
+
};
|
|
18
|
+
disableText?: boolean;
|
|
19
|
+
improvement: Improvement;
|
|
20
|
+
comparisonText?: string;
|
|
21
|
+
layout?: Layout;
|
|
22
|
+
};
|
|
23
|
+
export declare const ComparisonBlock: (props: ComparisonBlockProps) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IconMapping } from '../Icons';
|
|
2
|
+
import { Improvement } from './ComparisonBlock.tsx';
|
|
3
|
+
|
|
4
|
+
export type ColorSet = {
|
|
5
|
+
primaryColor: string;
|
|
6
|
+
secondaryColor: string;
|
|
7
|
+
};
|
|
8
|
+
export type ColorsType = Record<string, ColorSet>;
|
|
9
|
+
export declare const Colors: ColorsType;
|
|
10
|
+
type IconAndColor = {
|
|
11
|
+
icon: keyof IconMapping;
|
|
12
|
+
color: ColorSet;
|
|
13
|
+
};
|
|
14
|
+
export declare const getColorAndArrowIcon: (currentValue: number, previousValue: number, improvement: Improvement) => IconAndColor;
|
|
15
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ComparisonBlock } from './ComparisonBlock.tsx';
|