@foodpilot/foods 0.3.62 → 0.3.64
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/ScoreContainer.d.ts +2 -1
- package/dist/components/Box/ContentBlock.d.ts +14 -0
- package/dist/components/Box/IndicatorBox.d.ts +11 -0
- package/dist/components/Box/index.d.ts +2 -0
- package/dist/components/Button/TertiaryToggleButton.d.ts +1 -1
- package/dist/components/Button/TertiaryToggleButtonNodeTitle.d.ts +1 -1
- package/dist/components/Cards/ScoreCard/Header/ScoreCardHeader.d.ts +9 -4
- package/dist/components/Cards/ScoreCard/Header/ValueSwitcher/ValueSwitcher.d.ts +3 -2
- package/dist/components/Cards/TrajectoryCards/Blocks/ThreeHorizontal.d.ts +2 -1
- package/dist/components/Cards/TrajectoryCards/Blocks/ThreeVertical.d.ts +2 -1
- package/dist/components/Cards/TrajectoryCards/Blocks/TwoHorizontal.d.ts +2 -1
- package/dist/components/Cards/TrajectoryCards/Step.d.ts +3 -2
- package/dist/components/Cards/TrajectoryCards/TrajectoryCards.d.ts +7 -0
- package/dist/components/Chart/DoughnutChart/DoughnutChart.d.ts +1 -0
- package/dist/components/Chart/DoughnutChart/doughnutChartAdditions.d.ts +1 -0
- package/dist/components/Field/TextField.d.ts +1 -1
- package/dist/components/Layout/BlockList/Blocks/ActionsBlock/ActionRow.d.ts +1 -0
- package/dist/components/Layout/BlockList/Blocks/Container/BlockItemContainer.d.ts +2 -2
- package/dist/components/Number/NumberWithUnit.d.ts +7 -0
- package/dist/components/Number/index.d.ts +1 -1
- package/dist/components/Popover/OptionsPopover.d.ts +3 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/innerComponents/FlexibleTypography.d.ts +1 -0
- package/dist/main.js +6200 -6033
- package/dist/main.umd.cjs +100 -100
- package/dist/themes/ThemeExtensions.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/Number/NumberUnit.d.ts +0 -7
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { BoxProps } from '@mui/material';
|
|
2
3
|
|
|
3
4
|
type ScoreContainerProps = {
|
|
4
5
|
children: ReactNode;
|
|
5
|
-
|
|
6
|
+
boxProps?: BoxProps;
|
|
6
7
|
};
|
|
7
8
|
export declare const ScoreContainer: (props: ScoreContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SxProps } from '@mui/system';
|
|
2
|
+
|
|
3
|
+
export type ContentBlockProps = {
|
|
4
|
+
title: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
callToAction?: {
|
|
7
|
+
text: string;
|
|
8
|
+
onClick: () => void;
|
|
9
|
+
};
|
|
10
|
+
children?: JSX.Element | JSX.Element[];
|
|
11
|
+
image?: JSX.Element;
|
|
12
|
+
sxProps?: SxProps;
|
|
13
|
+
};
|
|
14
|
+
export declare const ContentBlock: (props: ContentBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type IndicatorBoxProps = {
|
|
2
|
+
title: string;
|
|
3
|
+
children: JSX.Element | JSX.Element[];
|
|
4
|
+
objectives: {
|
|
5
|
+
objective: string;
|
|
6
|
+
component: JSX.Element;
|
|
7
|
+
}[];
|
|
8
|
+
tooltipMessage?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const IndicatorBox: (props: IndicatorBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from './AdditionalContentBox';
|
|
2
2
|
export * from './CategoryBox';
|
|
3
3
|
export * from './ContextualContentBox';
|
|
4
|
+
export * from './ContentBlock';
|
|
4
5
|
export * from './DottedBox';
|
|
5
6
|
export * from './HelperBox';
|
|
7
|
+
export * from './IndicatorBox';
|
|
6
8
|
export * from './InfoBox';
|
|
7
9
|
export * from './LineGroupBox';
|
|
8
10
|
export * from './QuoteBox';
|
|
@@ -2,7 +2,7 @@ import { ToggleButtonProps } from '@mui/material';
|
|
|
2
2
|
|
|
3
3
|
export declare const CustomToggleButton: import('@emotion/styled').StyledComponent<import('@mui/material').ToggleButtonOwnProps & Omit<import('@mui/material').ButtonBaseOwnProps, "classes"> & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
4
4
|
ref?: ((instance: HTMLButtonElement | 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<HTMLButtonElement> | null | undefined;
|
|
5
|
-
}, "size" | "className" | "style" | "classes" | "color" | "children" | "sx" | "tabIndex" | "onChange" | "onClick" | "disabled" | "
|
|
5
|
+
}, "value" | "size" | "className" | "style" | "classes" | "color" | "children" | "sx" | "tabIndex" | "onChange" | "onClick" | "disabled" | "action" | "selected" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "fullWidth"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
6
6
|
type ToggleButtonsPropsWithoutEnforcedKeys = Omit<ToggleButtonProps, "value" | "onClick" | "selected">;
|
|
7
7
|
export type TertiaryToggleButtonProps = ToggleButtonsPropsWithoutEnforcedKeys & {
|
|
8
8
|
choices: string[];
|
|
@@ -3,7 +3,7 @@ import { ReactNode } from 'react';
|
|
|
3
3
|
|
|
4
4
|
export declare const CustomToggleButtonNodeTitle: import('@emotion/styled').StyledComponent<import('@mui/material').ToggleButtonOwnProps & Omit<import('@mui/material').ButtonBaseOwnProps, "classes"> & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
5
5
|
ref?: ((instance: HTMLButtonElement | 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<HTMLButtonElement> | null | undefined;
|
|
6
|
-
}, "size" | "className" | "style" | "classes" | "color" | "children" | "sx" | "tabIndex" | "onChange" | "onClick" | "disabled" | "
|
|
6
|
+
}, "value" | "size" | "className" | "style" | "classes" | "color" | "children" | "sx" | "tabIndex" | "onChange" | "onClick" | "disabled" | "action" | "selected" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "fullWidth"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
7
7
|
type ToggleButtonsPropsWithoutEnforcedKeys = Omit<ToggleButtonProps, "value" | "onClick" | "selected">;
|
|
8
8
|
export type TertiaryToggleButtonPropsNodeTitle = ToggleButtonsPropsWithoutEnforcedKeys & {
|
|
9
9
|
choices: ReactNode[];
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OptionsPopoverOption } from '../../../Popover';
|
|
2
2
|
|
|
3
|
+
export type HeaderOptions = {
|
|
4
|
+
id: number;
|
|
5
|
+
label: string;
|
|
6
|
+
group: string;
|
|
7
|
+
onClick?: OptionsPopoverOption["onClick"];
|
|
8
|
+
};
|
|
3
9
|
export type ScoreCardHeaderProps = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
optionsProps: OptionsPopoverType;
|
|
10
|
+
selectedItemId: number | null;
|
|
11
|
+
options: HeaderOptions[];
|
|
7
12
|
};
|
|
8
13
|
export declare const ScoreCardHeader: (props: ScoreCardHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { OptionsPopoverSection } from '../../../../Popover';
|
|
2
|
+
import { HeaderOptions } from '../ScoreCardHeader';
|
|
2
3
|
|
|
3
4
|
export type OptionsPopoverType = {
|
|
4
|
-
content: OptionsPopoverSection;
|
|
5
|
+
content: OptionsPopoverSection[];
|
|
5
6
|
onChange: (optionId: number) => void;
|
|
6
7
|
};
|
|
7
8
|
export type ValueSwitcherProps = {
|
|
8
|
-
|
|
9
|
+
selectedItem: HeaderOptions | undefined;
|
|
9
10
|
optionsProps: OptionsPopoverType;
|
|
10
11
|
};
|
|
11
12
|
export declare const ValueSwitcher: (props: ValueSwitcherProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StepProps } from '../TrajectoryCards';
|
|
1
|
+
import { StepProps, TrajectoryStepsText } from '../TrajectoryCards';
|
|
2
2
|
import { Improvement } from '../../../ComparisonBlock/ComparisonBlock.tsx';
|
|
3
3
|
|
|
4
4
|
type ThreeHorizontalProps = {
|
|
@@ -8,6 +8,7 @@ type ThreeHorizontalProps = {
|
|
|
8
8
|
target: StepProps;
|
|
9
9
|
};
|
|
10
10
|
improvement: Improvement;
|
|
11
|
+
textOptions: TrajectoryStepsText;
|
|
11
12
|
};
|
|
12
13
|
export declare const ThreeHorizontal: (props: ThreeHorizontalProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StepProps } from '../TrajectoryCards';
|
|
1
|
+
import { StepProps, TrajectoryStepsText } from '../TrajectoryCards';
|
|
2
2
|
import { Improvement } from '../../../ComparisonBlock/ComparisonBlock.tsx';
|
|
3
3
|
|
|
4
4
|
type ThreeVerticalProps = {
|
|
@@ -8,6 +8,7 @@ type ThreeVerticalProps = {
|
|
|
8
8
|
target: StepProps;
|
|
9
9
|
};
|
|
10
10
|
improvement: Improvement;
|
|
11
|
+
textOptions: TrajectoryStepsText;
|
|
11
12
|
};
|
|
12
13
|
export declare const ThreeVertical: (props: ThreeVerticalProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StepProps } from '../TrajectoryCards';
|
|
1
|
+
import { StepProps, TrajectoryStepsText } from '../TrajectoryCards';
|
|
2
2
|
import { Improvement } from '../../../ComparisonBlock/ComparisonBlock.tsx';
|
|
3
3
|
|
|
4
4
|
type TwoHorizontalProps = {
|
|
@@ -7,6 +7,7 @@ type TwoHorizontalProps = {
|
|
|
7
7
|
target: StepProps;
|
|
8
8
|
};
|
|
9
9
|
improvement: Improvement;
|
|
10
|
+
textOptions: TrajectoryStepsText;
|
|
10
11
|
};
|
|
11
12
|
export declare const TwoHorizontal: (props: TwoHorizontalProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { SxProps } from '@mui/material';
|
|
2
|
+
import { FlexibleString } from '../../../innerComponents/FlexibleTypography';
|
|
2
3
|
|
|
3
4
|
export type StepType = {
|
|
4
|
-
year:
|
|
5
|
-
label:
|
|
5
|
+
year: FlexibleString;
|
|
6
|
+
label: FlexibleString;
|
|
6
7
|
value: number | null;
|
|
7
8
|
unit: string;
|
|
8
9
|
incomplete: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Improvement } from '../../ComparisonBlock/ComparisonBlock.tsx';
|
|
2
2
|
import { StepType } from './Step';
|
|
3
|
+
import { FlexibleString } from '../../../innerComponents/FlexibleTypography.tsx';
|
|
3
4
|
|
|
4
5
|
export type StepProps = Omit<StepType, "label">;
|
|
5
6
|
export type TrajectoryPosition = "horizontal" | "vertical";
|
|
@@ -8,9 +9,15 @@ export type TrajectorySteps = {
|
|
|
8
9
|
current: StepProps | null;
|
|
9
10
|
target: StepProps;
|
|
10
11
|
};
|
|
12
|
+
export type TrajectoryStepsText = {
|
|
13
|
+
startingStep: FlexibleString;
|
|
14
|
+
currentStep: FlexibleString;
|
|
15
|
+
targetStep: FlexibleString;
|
|
16
|
+
};
|
|
11
17
|
export type TrajectoryCardsProps = {
|
|
12
18
|
steps: TrajectorySteps;
|
|
13
19
|
position: TrajectoryPosition;
|
|
14
20
|
improvement: Improvement;
|
|
21
|
+
textOptions?: TrajectoryStepsText;
|
|
15
22
|
};
|
|
16
23
|
export declare const TrajectoryCards: (props: TrajectoryCardsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -12,5 +12,6 @@ export type DoughnutChartProps = Omit<ChartProps<"doughnut">, "data" | "type"> &
|
|
|
12
12
|
icons?: ReactNode[];
|
|
13
13
|
children?: ReactNode;
|
|
14
14
|
className?: string;
|
|
15
|
+
valuesFormatterFn?: (value: number) => string;
|
|
15
16
|
};
|
|
16
17
|
export declare const DoughnutChart: (props: DoughnutChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -324,6 +324,7 @@ export declare const getDoughnutConfig: (props: Omit<DoughnutChartProps, "legend
|
|
|
324
324
|
updateMode?: import('chart.js').UpdateMode | undefined;
|
|
325
325
|
valuesUnit?: string | undefined;
|
|
326
326
|
icons?: import('react').ReactNode[] | undefined;
|
|
327
|
+
valuesFormatterFn?: ((value: number) => string) | undefined;
|
|
327
328
|
};
|
|
328
329
|
export declare const extractPaletteFromTheme: (theme: Theme, min: number, max: number) => Property.Color[];
|
|
329
330
|
export declare const createPalette: (colors: Property.Color[], values: number[]) => Property.Color[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type BlockItemContainerProps = {
|
|
2
2
|
title: string;
|
|
3
|
-
value: number;
|
|
4
|
-
unit
|
|
3
|
+
value: number | null;
|
|
4
|
+
unit?: string;
|
|
5
5
|
fields?: JSX.Element[];
|
|
6
6
|
};
|
|
7
7
|
export declare const BlockItemContainer: (props: BlockItemContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type NumberWithUnitProps = {
|
|
2
|
+
value: number | null;
|
|
3
|
+
unit: string;
|
|
4
|
+
size?: "micro" | "small" | "inter" | "big";
|
|
5
|
+
position?: "default-side" | "below-left-aligned" | "below-center-aligned";
|
|
6
|
+
};
|
|
7
|
+
export declare const NumberWithUnit: (props: NumberWithUnitProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './NumberWithUnit.tsx';
|
|
2
2
|
export * from './Score';
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { BoxProps } from '@mui/material';
|
|
2
2
|
|
|
3
|
+
type ShouldAbort = boolean;
|
|
3
4
|
export type OptionsPopoverOption = {
|
|
4
5
|
id: string | number;
|
|
5
6
|
label: string;
|
|
6
7
|
active?: boolean;
|
|
7
8
|
disabled?: boolean;
|
|
9
|
+
onClick?: (option: OptionsPopoverOption, section: OptionsPopoverSection) => void | ShouldAbort;
|
|
8
10
|
};
|
|
9
11
|
export type OptionsPopoverSection = {
|
|
10
12
|
header?: string;
|
|
@@ -16,3 +18,4 @@ export type OptionsPopoverProps = Omit<BoxProps, "content" | "onChange"> & {
|
|
|
16
18
|
defaultIndex?: string | number;
|
|
17
19
|
};
|
|
18
20
|
export declare function OptionsPopover(props: OptionsPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -6,7 +6,6 @@ export * from './CardImage';
|
|
|
6
6
|
export * from './Cards';
|
|
7
7
|
export * from './Chart';
|
|
8
8
|
export * from './Checkbox';
|
|
9
|
-
export * from './ComparisonBlock';
|
|
10
9
|
export * from './CustomTypography';
|
|
11
10
|
export * from './Dialog';
|
|
12
11
|
export * from './Field';
|
|
@@ -27,3 +26,4 @@ export * from './Ssq';
|
|
|
27
26
|
export * from './Tabs';
|
|
28
27
|
export * from './Text';
|
|
29
28
|
export * from './Treeview';
|
|
29
|
+
export * from './ComparisonBlock';
|
|
@@ -4,5 +4,6 @@ export type FlexibleString = JSX.Element | string;
|
|
|
4
4
|
export type FlexibleTypographyProps = {
|
|
5
5
|
text: FlexibleString;
|
|
6
6
|
defaultVariant: TypographyProps["variant"];
|
|
7
|
+
typographyProps?: Omit<TypographyProps, "variant">;
|
|
7
8
|
};
|
|
8
9
|
export declare const FlexibleTypography: (props: FlexibleTypographyProps) => JSX.Element;
|