@foodpilot/foods 0.5.32 → 0.5.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/Accordion/FormAccordion.d.ts +1 -1
- package/dist/components/Accordion/ProductAccordion.d.ts +1 -1
- package/dist/components/ComparisonBlock/Blocks/HorizontalLargeBlock.d.ts +2 -15
- package/dist/components/ComparisonBlock/Blocks/HorizontalMediumBlock.d.ts +2 -16
- package/dist/components/ComparisonBlock/Blocks/HorizontalSmallBlock.d.ts +2 -9
- package/dist/components/ComparisonBlock/Blocks/VerticalLargeBlock.d.ts +2 -15
- package/dist/components/ComparisonBlock/Blocks/VerticalMediumBlock.d.ts +2 -15
- package/dist/components/ComparisonBlock/ComparisonBlock.d.ts +8 -6
- package/dist/components/ComparisonBlock/block.types.d.ts +14 -0
- package/dist/components/ComparisonBlock/useColorAndArrow.d.ts +8 -2
- package/dist/components/Form/FormUnit.d.ts +6 -0
- package/dist/components/Number/NumberWithUnit.d.ts +1 -0
- package/dist/main.js +9288 -9312
- package/dist/main.umd.cjs +113 -113
- package/package.json +1 -1
|
@@ -25,7 +25,7 @@ export declare const StyledFormAccordion: import('@emotion/styled').StyledCompon
|
|
|
25
25
|
TransitionProps?: import('@mui/material/transitions').TransitionProps;
|
|
26
26
|
} & import('@mui/material').AccordionSlotsAndSlotProps & Omit<import('@mui/material').PaperOwnProps, "classes" | "onChange"> & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
27
27
|
ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
|
|
28
|
-
}, keyof import('@mui/material/OverridableComponent').CommonProps | "children" | "sx" | "onChange" | "elevation" | "disabled" | "variant" | "
|
|
28
|
+
}, keyof import('@mui/material/OverridableComponent').CommonProps | "children" | "sx" | "onChange" | "elevation" | "disabled" | "variant" | "TransitionComponent" | "TransitionProps" | "expanded" | "square" | "defaultExpanded" | "disableGutters" | keyof import('@mui/material').AccordionSlotsAndSlotProps> & {
|
|
29
29
|
theme?: import('@emotion/react').Theme;
|
|
30
30
|
}, {}, {}>;
|
|
31
31
|
export declare const StyledFormAccordionSummary: import('@emotion/styled').StyledComponent<import('@mui/material').AccordionSummaryOwnProps & Omit<import('@mui/material').ButtonBaseOwnProps, "classes"> & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
@@ -14,7 +14,7 @@ export declare const StyledAccordion: import('@emotion/styled').StyledComponent<
|
|
|
14
14
|
TransitionProps?: import('@mui/material/transitions').TransitionProps;
|
|
15
15
|
} & import('@mui/material').AccordionSlotsAndSlotProps & Omit<import('@mui/material').PaperOwnProps, "classes" | "onChange"> & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
16
16
|
ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
17
|
-
}, keyof import('@mui/material/OverridableComponent').CommonProps | "children" | "sx" | "onChange" | "elevation" | "disabled" | "variant" | "
|
|
17
|
+
}, keyof import('@mui/material/OverridableComponent').CommonProps | "children" | "sx" | "onChange" | "elevation" | "disabled" | "variant" | "TransitionComponent" | "TransitionProps" | "expanded" | "square" | "defaultExpanded" | "disableGutters" | keyof import('@mui/material').AccordionSlotsAndSlotProps> & {
|
|
18
18
|
theme?: import('@emotion/react').Theme;
|
|
19
19
|
}, {}, {}>;
|
|
20
20
|
export type AccordionContent = {
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ColorSet } from '../useColorAndArrow';
|
|
3
|
-
type ComparisonBlockProps = {
|
|
4
|
-
percentageDifference: string;
|
|
5
|
-
comparedTo: {
|
|
6
|
-
value: number;
|
|
7
|
-
unit?: string;
|
|
8
|
-
label?: string;
|
|
9
|
-
};
|
|
10
|
-
iconName: keyof IconMapping;
|
|
11
|
-
colors: ColorSet;
|
|
12
|
-
comparisonText?: string;
|
|
13
|
-
};
|
|
1
|
+
import { InnerComparisonBlockProps } from '../block.types';
|
|
14
2
|
/**
|
|
15
3
|
* @internal
|
|
16
4
|
*/
|
|
17
|
-
export declare const HorizontalLargeBlock: (props:
|
|
18
|
-
export {};
|
|
5
|
+
export declare const HorizontalLargeBlock: (props: InnerComparisonBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ColorSet } from '../useColorAndArrow';
|
|
3
|
-
type ComparisonBlockProps = {
|
|
4
|
-
percentageDifference: string;
|
|
5
|
-
comparedTo: {
|
|
6
|
-
value: number;
|
|
7
|
-
unit?: string;
|
|
8
|
-
label?: string;
|
|
9
|
-
};
|
|
10
|
-
iconName: keyof IconMapping;
|
|
11
|
-
colors: ColorSet;
|
|
12
|
-
comparisonText?: string;
|
|
13
|
-
disableText: boolean;
|
|
14
|
-
};
|
|
1
|
+
import { InnerComparisonBlockProps } from '../block.types';
|
|
15
2
|
/**
|
|
16
3
|
* @internal
|
|
17
4
|
*/
|
|
18
|
-
export declare const HorizontalMediumBlock: (props:
|
|
19
|
-
export {};
|
|
5
|
+
export declare const HorizontalMediumBlock: (props: InnerComparisonBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ColorSet } from '../useColorAndArrow';
|
|
3
|
-
type ComparisonBlockProps = {
|
|
4
|
-
percentageDifference: string;
|
|
5
|
-
iconName: keyof IconMapping;
|
|
6
|
-
colors: ColorSet;
|
|
7
|
-
};
|
|
1
|
+
import { InnerComparisonBlockProps } from '../block.types';
|
|
8
2
|
/**
|
|
9
3
|
* @internal
|
|
10
4
|
*/
|
|
11
|
-
export declare const HorizontalSmallBlock: (props:
|
|
12
|
-
export {};
|
|
5
|
+
export declare const HorizontalSmallBlock: (props: InnerComparisonBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ColorSet } from '../useColorAndArrow';
|
|
3
|
-
type ComparisonBlockProps = {
|
|
4
|
-
percentageDifference: string;
|
|
5
|
-
comparedTo?: {
|
|
6
|
-
value?: number;
|
|
7
|
-
unit?: string;
|
|
8
|
-
label?: string;
|
|
9
|
-
};
|
|
10
|
-
iconName: keyof IconMapping;
|
|
11
|
-
colors: ColorSet;
|
|
12
|
-
comparisonText?: string;
|
|
13
|
-
};
|
|
1
|
+
import { InnerComparisonBlockProps } from '../block.types';
|
|
14
2
|
/**
|
|
15
3
|
* @internal
|
|
16
4
|
*/
|
|
17
|
-
export declare const VerticalLargeBlock: (props:
|
|
18
|
-
export {};
|
|
5
|
+
export declare const VerticalLargeBlock: (props: InnerComparisonBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ColorSet } from '../useColorAndArrow';
|
|
3
|
-
type ComparisonBlockProps = {
|
|
4
|
-
percentageDifference: string;
|
|
5
|
-
comparedTo: {
|
|
6
|
-
value: number;
|
|
7
|
-
unit?: string;
|
|
8
|
-
label?: string;
|
|
9
|
-
};
|
|
10
|
-
iconName: keyof IconMapping;
|
|
11
|
-
colors: ColorSet;
|
|
12
|
-
comparisonText?: string;
|
|
13
|
-
};
|
|
1
|
+
import { InnerComparisonBlockProps } from '../block.types';
|
|
14
2
|
/**
|
|
15
3
|
* @internal
|
|
16
4
|
*/
|
|
17
|
-
export declare const VerticalMediumBlock: (props:
|
|
18
|
-
export {};
|
|
5
|
+
export declare const VerticalMediumBlock: (props: InnerComparisonBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,18 +7,20 @@ type VerticalLayout = {
|
|
|
7
7
|
direction: "vertical";
|
|
8
8
|
size: "L" | "M";
|
|
9
9
|
};
|
|
10
|
-
type
|
|
10
|
+
export type ComparedTo = {
|
|
11
|
+
value: number | string;
|
|
12
|
+
unit?: string;
|
|
13
|
+
label?: string;
|
|
14
|
+
};
|
|
15
|
+
export type Layout = HorizontalLayout | VerticalLayout;
|
|
11
16
|
type ComparisonBlockProps = {
|
|
12
17
|
currentValue: number;
|
|
13
|
-
comparedTo:
|
|
14
|
-
value: number;
|
|
15
|
-
unit?: string;
|
|
16
|
-
label?: string;
|
|
17
|
-
};
|
|
18
|
+
comparedTo: ComparedTo;
|
|
18
19
|
improvement: Improvement;
|
|
19
20
|
disableText?: boolean;
|
|
20
21
|
comparisonText?: string;
|
|
21
22
|
layout?: Layout;
|
|
23
|
+
locale?: string;
|
|
22
24
|
};
|
|
23
25
|
export declare const ComparisonBlock: (props: ComparisonBlockProps) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
24
26
|
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IconMapping } from '../Icons';
|
|
2
|
+
import { ColorSet } from './useColorAndArrow';
|
|
3
|
+
export type InnerComparisonBlockProps = {
|
|
4
|
+
percentageDifference: string;
|
|
5
|
+
comparedTo: {
|
|
6
|
+
value: number | string;
|
|
7
|
+
unit?: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
};
|
|
10
|
+
iconName: keyof IconMapping;
|
|
11
|
+
colors: ColorSet;
|
|
12
|
+
comparisonText?: string;
|
|
13
|
+
disableText: boolean;
|
|
14
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IconMapping } from '../Icons/index.ts';
|
|
2
|
-
import { Improvement } from './ComparisonBlock.tsx';
|
|
2
|
+
import { Improvement, Layout } from './ComparisonBlock.tsx';
|
|
3
3
|
export type ColorSet = {
|
|
4
4
|
primaryColor: string;
|
|
5
5
|
secondaryColor: string;
|
|
@@ -8,5 +8,11 @@ type IconAndColor = {
|
|
|
8
8
|
icon: keyof IconMapping;
|
|
9
9
|
color: ColorSet;
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
type Options = {
|
|
12
|
+
currentValue: number;
|
|
13
|
+
previousValue: number;
|
|
14
|
+
improvement: Improvement;
|
|
15
|
+
layout: Layout;
|
|
16
|
+
};
|
|
17
|
+
export declare const useColorAndArrowIcon: (options: Options) => IconAndColor;
|
|
12
18
|
export {};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { BoxProps } from '@mui/material';
|
|
2
|
+
import { Improvement } from '../ComparisonBlock/ComparisonBlock';
|
|
3
|
+
type Comparison = {
|
|
4
|
+
toCompareTo: number | null;
|
|
5
|
+
improvement: Improvement;
|
|
6
|
+
};
|
|
2
7
|
type FormUnitProps = BoxProps & {
|
|
3
8
|
value: number;
|
|
4
9
|
unit: string;
|
|
10
|
+
comparison?: Comparison;
|
|
5
11
|
};
|
|
6
12
|
export declare const FormUnit: (props: FormUnitProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
13
|
export {};
|
|
@@ -3,5 +3,6 @@ export type NumberWithUnitProps = {
|
|
|
3
3
|
unit: string;
|
|
4
4
|
size?: "micro" | "small" | "inter" | "big";
|
|
5
5
|
position?: "default-side" | "below-left-aligned" | "below-center-aligned";
|
|
6
|
+
colorOverride?: string;
|
|
6
7
|
};
|
|
7
8
|
export declare const NumberWithUnit: (props: NumberWithUnitProps) => import("react/jsx-runtime").JSX.Element;
|