@foodpilot/foods 2.26.0 → 2.27.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/Banner/Banner.d.ts +15 -4
- package/dist/components/Banner/Banner.js +6 -1
- package/dist/components/Banner/banner.types.d.ts +1 -1
- package/dist/components/Checkbox/BaseCheckbox.d.ts +2 -1
- package/dist/components/Checkbox/BaseCheckbox.js +2 -2
- package/dist/components/Checkbox/FoodsCheckbox.js +2 -2
- package/dist/components/Form/FoodsFormFields/FoodsTextInput.d.ts +3 -0
- package/dist/components/Form/FoodsFormFields/FoodsTextInput.js +5 -5
- package/dist/components/Layout/BlockList/Blocks/Container/BlockItemInner.js +8 -8
- package/dist/components/Layout/BlockList/Blocks/InnerInputBlocks/RadioBlock.js +2 -2
- package/dist/components/Layout/BlockList/Blocks/InnerInputBlocks/SelectBlock.js +2 -2
- package/dist/components/Layout/BlockList/Headers/ListHeader.js +6 -6
- package/dist/components/Radio/BaseRadio.d.ts +2 -1
- package/dist/components/Radio/BaseRadio.js +4 -4
- package/dist/components/Radio/FoodsRadioList.js +2 -2
- package/dist/components/Radio/RadioBoolean.js +2 -2
- package/dist/components/Select/FoodsSelect/FoodsSelect.d.ts +3 -0
- package/dist/components/Select/FoodsSelect/FoodsSelect.js +6 -6
- package/dist/components/Select/FoodsSelect/Select.d.ts +2 -0
- package/dist/components/Select/FoodsSelect/Select.js +4 -4
- package/dist/components/Textarea/Textarea.d.ts +5 -3
- package/dist/components/Textarea/Textarea.js +3 -7
- package/dist/main.js +1 -1
- package/dist/themes/common/components.js +1 -1
- package/dist/themes/common/custom.d.ts +49 -0
- package/dist/themes/common/custom.js +1 -1
- package/package.json +4 -3
- package/dist/assets/undo.svg.js +0 -1
- package/dist/components/Banner/variants/ClassicBanner.d.ts +0 -11
- package/dist/components/Banner/variants/ClassicBanner.js +0 -4
- package/dist/components/Banner/variants/ThemedBanner.d.ts +0 -9
- package/dist/components/Banner/variants/ThemedBanner.js +0 -4
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { IconMappingProps } from '../Icons';
|
|
2
3
|
import { BannerVariantProps } from './banner.types';
|
|
3
|
-
type BannerProps = {
|
|
4
|
+
export type BannerProps = BannerVariantProps & {
|
|
4
5
|
children?: ReactNode;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
title?: ReactNode;
|
|
7
|
+
/** Announce the message when it changes; omit for static content or when a parent owns the announcement. */
|
|
8
|
+
role?: "alert" | "status";
|
|
9
|
+
/** Content revealed by Show more; the author chooses where to cut. */
|
|
10
|
+
hiddenContent?: ReactNode;
|
|
11
|
+
/** Optional action when there is no hidden content. */
|
|
12
|
+
actionLabel?: string;
|
|
13
|
+
actionIcon?: IconMappingProps;
|
|
14
|
+
onAction?: () => void;
|
|
15
|
+
showMoreLabel?: string;
|
|
16
|
+
showLessLabel?: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const Banner: (props: BannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsxs as o,jsx as e}from"react/jsx-runtime";import{useTheme as r,useMediaQuery as i,Stack as n,Box as t,Typography as c,Button as l}from"@mui/material";import{useState as d,useId as a}from"react";import{FoodsIcon as s}from"../Icons/FoodsIcon.js";const h=h=>{const{children:m,title:u,role:g,hiddenContent:f,actionLabel:p,actionIcon:x,onAction:w,showMoreLabel:b="Show more",showLessLabel:y="Show less",...v}=h,S=r(),k=i(S.breakpoints.down("md")),[z,W]=d(!1),I=a(),L=v.variant??"info",C="themed"===L?"info":L,H=((o,e)=>{switch(e){case"info":return{background:o.palette.primary[50],border:o.palette.primary[500],accent:o.palette.primary[800],icon:"information"};case"warning":return{background:o.custom.yellow[50],border:o.custom.yellow[600],accent:o.custom.yellow[700],icon:"warning"};case"error":return{background:o.custom.red[50],border:o.custom.red[600],accent:o.custom.red[700],icon:"warning"}}})(S,C),M="colors"in v?v.colors:void 0,O="stylePresetOverride"in v?v.stylePresetOverride:void 0,D=M?.color??O?.color??H.accent,$=null!=f&&!1!==f&&""!==f;/* @__PURE__ */
|
|
2
|
+
return o(n,{direction:k?"column":"row",gap:k&&"info"!==C?1:1.5,sx:{width:"100%",minWidth:0,padding:2,paddingLeft:k?3:2,borderRadius:"12px",border:`1px solid ${M?.sideBorder??H.border}`,backgroundColor:M?.backgroundColor??H.background,color:S.custom.grey[2500]},children:[
|
|
3
|
+
/* @__PURE__ */e(t,{"aria-hidden":"true",sx:{color:D,flexShrink:0,width:28,height:28},children:/* @__PURE__ */e(s,{icon:O?.icon??H.icon,size:{width:28,height:28}})}),
|
|
4
|
+
/* @__PURE__ */o(n,{gap:"info"===C?1.5:1,sx:{minWidth:0,flex:1},children:[
|
|
5
|
+
/* @__PURE__ */o(t,{role:g,sx:{overflowWrap:"anywhere"},children:[u&&/* @__PURE__ */e(c,{component:"div",sx:{fontWeight:700,fontSize:k?14:16,lineHeight:k?1.5:1.6,color:S.custom.grey[2800],mb:.5},children:u}),
|
|
6
|
+
/* @__PURE__ */o(c,{component:"div",sx:{fontSize:k?12:14,lineHeight:1.6,fontWeight:400,color:S.custom.grey[2500],"& > p":{margin:0}},children:["string"==typeof m&&"themed"===L?/* @__PURE__ */e(t,{sx:{"& > p":{margin:0}},dangerouslySetInnerHTML:{__html:m}}):m,$&&/* @__PURE__ */e(t,{id:I,hidden:!z,sx:{display:z?"contents":"none"},children:f})]})]}),$?/* @__PURE__ */e(l,{variant:"text","aria-expanded":z,"aria-controls":I,onClick:()=>W(o=>!o),endIcon:/* @__PURE__ */e(s,{icon:z?"arrowUpShort":"arrowDownShort",size:{width:k?20:16,height:k?20:16}}),sx:{alignSelf:"flex-start",color:D,p:0,py:k?1:0,fontWeight:700,fontSize:k?16:14,lineHeight:1.5,"&:hover":{color:D,textDecoration:"underline"},"&.Mui-focusVisible":{outline:`2px solid ${D}`,outlineOffset:2}},children:z?y:b}):p&&w&&/* @__PURE__ */e(l,{variant:"text",onClick:w,endIcon:x&&/* @__PURE__ */e(s,{icon:x,size:{width:k?20:16,height:k?20:16}}),sx:{alignSelf:"flex-start",color:D,p:0,py:k?1:0,fontWeight:700,fontSize:k?16:14,lineHeight:1.5,"&:hover":{color:D,textDecoration:"underline"},"&.Mui-focusVisible":{outline:`2px solid ${D}`,outlineOffset:2}},children:p})]})]})};export{h as Banner};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { iconMapping } from '../Icons';
|
|
2
2
|
export type MessageVariant = ClassicBannerType | ThemedBannerType;
|
|
3
|
-
export type ClassicBannerType = "info" | "error";
|
|
3
|
+
export type ClassicBannerType = "info" | "warning" | "error";
|
|
4
4
|
export type ThemedBannerType = "themed";
|
|
5
5
|
export type StylePreset = {
|
|
6
6
|
icon: keyof typeof iconMapping;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { CheckboxProps, FormGroupProps, FormControlLabelProps } from '@mui/material';
|
|
2
2
|
export type CheckboxId = string | number;
|
|
3
3
|
export type CheckboxName = string | number;
|
|
4
|
-
export type CheckboxProperties<T> =
|
|
4
|
+
export type CheckboxProperties<T> = CheckboxPropertyValue<T>[];
|
|
5
5
|
export type CheckboxPropertyValue<T> = {
|
|
6
|
+
id: CheckboxId;
|
|
6
7
|
name: CheckboxName;
|
|
7
8
|
state: boolean;
|
|
8
9
|
disabled?: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{FormGroup as o,FormControlLabel as r}from"@mui/material";import s from"../../assets/unchecked.svg.js";import t from"../../assets/checked.svg.js";import{StyledCheckbox as
|
|
2
|
-
return e(o,{...p,children:
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{FormGroup as o,FormControlLabel as r}from"@mui/material";import s from"../../assets/unchecked.svg.js";import t from"../../assets/checked.svg.js";import{StyledCheckbox as a}from"./StyledCheckbox.js";const c=c=>{const{values:m,onChange:n,FormGroupProps:p,FormControlLabelProps:i,CheckboxProps:l}=c;/* @__PURE__ */
|
|
2
|
+
return e(o,{...p,children:m.map((o,c)=>/* @__PURE__ */e(r,{sx:e=>({gap:e.spacing(2)}),checked:o.state,...i,label:o.name,control:/* @__PURE__ */e(a,{checkedIcon:/* @__PURE__ */e(t,{}),icon:/* @__PURE__ */e(s,{}),disableRipple:!0,...l,onChange:(e,o)=>{n(m.map((e,r)=>r===c?{...e,state:o}:e))}})},`${o.id}-${c}`))})};export{c as BaseCheckbox};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{BaseCheckbox as t}from"./BaseCheckbox.js";const a=a=>{const{values:
|
|
2
|
-
return e(t,{values:
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{BaseCheckbox as t}from"./BaseCheckbox.js";const a=a=>{const{values:n,selectedItems:r,onChange:s,getId:o=e=>e.id,getName:m=e=>e.name,...c}=a,i=r?.map(e=>o(e))??[],u=n.map(e=>{const t=o(e),a=i.includes(t),n=void 0!==r&&a;return{id:t,name:m(e),state:n,rawData:e}});/* @__PURE__ */
|
|
2
|
+
return e(t,{values:u,onChange:e=>{const t=e.flatMap(e=>!1===e.state?[]:e.rawData);return s(t)},...c})};export{a as FoodsCheckbox};
|
|
@@ -12,7 +12,10 @@ type OverridenProps = {
|
|
|
12
12
|
unit?: string;
|
|
13
13
|
unitAddon?: React.ReactNode;
|
|
14
14
|
error?: boolean;
|
|
15
|
+
errorMessage?: string;
|
|
16
|
+
resetButtonLabel?: string;
|
|
15
17
|
disabled?: boolean;
|
|
18
|
+
behaviour?: "fixed" | "dynamic";
|
|
16
19
|
};
|
|
17
20
|
type FoodsInputBase = Omit<InputBaseProps, keyof OverridenProps>;
|
|
18
21
|
export type FoodsTextInputProps = OverridenProps & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{jsxs as o,jsx as
|
|
2
|
-
return o(
|
|
3
|
-
/* @__PURE__ */o(
|
|
4
|
-
/* @__PURE__ */
|
|
5
|
-
/* @__PURE__ */r
|
|
1
|
+
import{jsxs as o,jsx as e}from"react/jsx-runtime";import{useTheme as t,Stack as i,Typography as r,Button as n,styled as a,InputBase as d}from"@mui/material";import{useId as l,useState as s}from"react";import{useTranslation as p}from"react-i18next";import{FoodsIconButton as u}from"../../Button/FoodsIconButton.js";import{FoodsIcon as c}from"../../Icons/FoodsIcon.js";import{useResponsiveBreakpoints as g}from"../../../themes/responsive/useResponsiveBreakpoints.js";const m=a=>{const{value:d,onChange:m,defaultOption:h,unit:b,unitAddon:f,error:x=!1,errorMessage:v,resetButtonLabel:k,disabled:W=!1,behaviour:z="dynamic",ExtraInputProps:I={},Tooltip:S={},StackProps:C={}}=a,H=t(),{t:M}=p(),w=k??M("reinitialiser_la_valeur_par_defaut",{defaultValue:"Reset default value"}),B=M("information",{defaultValue:"Information"}),{isMobile:P}=g(),$=l(),[j,R]=s(!1),A=I.id??$,D=x&&!W,_=`${A}-error`,F=[I["aria-describedby"],I.inputProps?.["aria-describedby"],D&&v?_:void 0].filter(Boolean).join(" ")||void 0,T=()=>{h&&(m(h.value),h.extraAction?.(h.value))};/* @__PURE__ */
|
|
2
|
+
return o(i,{gap:H.spacing(1),...C,children:[
|
|
3
|
+
/* @__PURE__ */o(i,{flexDirection:"row",gap:H.spacing(1.5),alignItems:"center",minWidth:0,children:[
|
|
4
|
+
/* @__PURE__ */e(y,{...I,id:A,fullWidth:"dynamic"===z,value:d,onChange:o=>{m(o.currentTarget.value)},error:D,disabled:W,"aria-invalid":D||void 0,"aria-describedby":F,inputProps:{...I.inputProps,"aria-describedby":F},sx:[{minWidth:0,flex:"dynamic"===z?"1 1 0":"0 0 auto",width:"fixed"===z?{xs:H.custom.textInput.fixedWidth.mobile,md:H.custom.textInput.fixedWidth.desktop}:void 0},...Array.isArray(I.sx)?I.sx:I.sx?[I.sx]:[]]}),b&&/* @__PURE__ */o(i,{flexDirection:"row",gap:H.spacing(.5),alignItems:"center",children:[
|
|
5
|
+
/* @__PURE__ */e(r,{variant:"inherit",maxWidth:"200px",sx:{fontSize:H.typography["body-medium"].fontSize,fontWeight:H.typography["body-medium"].fontWeight,lineHeight:H.typography["body-medium"].lineHeight,color:H.custom.grey[2800],textWrap:"nowrap",overflow:"clip",textOverflow:"ellipsis"},children:b}),f]}),P&&S.text&&/* @__PURE__ */e(u,{size:"xs",icon:"information",tooltip:{text:S.text,props:{...S.props,open:j,onClose:()=>R(!1)}},buttonProps:{"aria-label":B,"aria-expanded":j,onClick:()=>R(o=>!o),onBlur:()=>R(!1),onKeyDown:o=>{"Escape"===o.key&&R(!1)},disabled:W}}),!P&&h&&/* @__PURE__ */e(u,{size:"s",icon:"reset",tooltip:S,buttonProps:{onClick:T,disabled:W,"aria-label":w}})]}),D&&v&&/* @__PURE__ */e(r,{id:_,variant:"inherit",sx:{color:H.custom.red[600],fontSize:H.typography["body-medium"].fontSize,fontWeight:H.typography["body-medium"].fontWeight,lineHeight:H.typography["body-medium"].lineHeight},children:v}),h&&/* @__PURE__ */e(r,{variant:"inherit",sx:{color:H.custom.grey[2e3],fontSize:{xs:H.typography["body-regular"].fontSize,md:H.typography["small-regular"].fontSize},fontWeight:H.typography["body-regular"].fontWeight,lineHeight:H.typography["body-regular"].lineHeight},children:`${h.label} ${h.value}`}),P&&h&&/* @__PURE__ */e(n,{variant:"text",startIcon:/* @__PURE__ */e(c,{icon:"reset",size:2}),disabled:W,onClick:T,sx:{alignSelf:"flex-start",minHeight:H.custom.textInput.mobileResetHeight,padding:0,textDecoration:"underline",fontSize:H.typography["body-bold"].fontSize,fontWeight:H.typography["body-bold"].fontWeight,lineHeight:H.typography["body-bold"].lineHeight,color:H.palette.primary[800]},children:w})]})},y=a(d)(({theme:o})=>({"&.MuiInputBase-root":{backgroundColor:o.custom.grey[100],height:o.custom.textInput.desktopHeight,borderRadius:o.spacing(1),paddingInline:o.spacing(2),border:`1px solid ${o.custom.grey[600]}`,color:o.custom.grey[2800],...o.typography["body-regular"],"&:hover":{backgroundColor:o.custom.grey[300]},"& input::placeholder":{color:o.custom.grey[2e3],opacity:1,fontWeight:400},[o.breakpoints.down("md")]:{height:o.custom.textInput.mobileHeight,fontSize:o.typography["big-regular"].fontSize,paddingLeft:o.spacing(2),paddingRight:o.spacing(1.5),"& input::placeholder":{fontSize:o.typography["big-regular"].fontSize}}},"&.Mui-disabled":{backgroundColor:o.custom.grey[500],color:o.custom.grey[1400],"&:hover":{backgroundColor:o.custom.grey[500]},"& input.Mui-disabled":{WebkitTextFillColor:o.custom.grey[1400]}},"&.Mui-focused":{border:`2px solid ${o.custom.grey[2800]}`},"&.Mui-error":{border:`1px solid ${o.custom.red[600]}`,backgroundColor:o.custom.red[100],color:o.custom.grey[2800],"& input::placeholder":{color:o.custom.grey[2400]},"&:hover":{backgroundColor:o.custom.red[200]}},"&.Mui-error.Mui-focused":{border:`2px solid ${o.custom.red[600]}`,backgroundColor:o.custom.grey[100],"& input::placeholder":{color:o.custom.grey[2e3]}}}));export{m as FoodsTextInput};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{jsxs as
|
|
2
|
-
return r
|
|
3
|
-
/* @__PURE__ */i(
|
|
4
|
-
/* @__PURE__ */r
|
|
5
|
-
/* @__PURE__ */i(
|
|
6
|
-
/* @__PURE__ */i(
|
|
7
|
-
/* @__PURE__ */i(
|
|
8
|
-
/* @__PURE__ */i(
|
|
1
|
+
import{jsxs as s,jsx as i}from"react/jsx-runtime";import{useTheme as o,Stack as r,Typography as m,Box as n}from"@mui/material";import{LeftComparisonPart as t}from"../Common/LeftComparisonPart.js";const a=a=>{const{children:d,blockOptions:e}=a,x=o();/* @__PURE__ */
|
|
2
|
+
return s(r,{padding:x.spacing(0,4,0,4),gap:x.spacing(2),children:[
|
|
3
|
+
/* @__PURE__ */i(m,{variant:"h5",children:e.title}),
|
|
4
|
+
/* @__PURE__ */s(r,{flexDirection:"row",gap:x.spacing(3),sx:{display:"grid",gridTemplateColumns:{xs:"minmax(0, 1fr)",sm:"[a] 1fr [b] 1px [c] 1fr"},gridTemplateRows:{xs:"auto 1px auto",sm:"none"}},children:[
|
|
5
|
+
/* @__PURE__ */i(n,{sx:{gridColumn:{xs:"1",sm:"a"},gridRow:{xs:"1",sm:"auto"},minWidth:{xs:0,sm:"auto"}},children:/* @__PURE__ */i(t,{comparison:e.comparisonValues})}),
|
|
6
|
+
/* @__PURE__ */i(n,{sx:{gridColumn:{xs:"1",sm:"b"},gridRow:{xs:"2",sm:"auto"},border:{xs:"none",sm:`1px solid ${x.custom.grey[500]}`},borderTop:{xs:`1px solid ${x.custom.grey[500]}`,sm:`1px solid ${x.custom.grey[500]}`}}}),
|
|
7
|
+
/* @__PURE__ */i(n,{sx:{gridColumn:{xs:"1",sm:"c"},gridRow:{xs:"3",sm:"auto"},minWidth:{xs:0,sm:"auto"}},children:/* @__PURE__ */s(r,{gap:x.spacing(2),sx:{minWidth:{xs:0,sm:"auto"}},children:[
|
|
8
|
+
/* @__PURE__ */i(m,{variant:"body-bold",children:e.rightSubtitle}),d]})})]})]})};export{a as BlockItemInner};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as o,Fragment as r}from"react/jsx-runtime";import{BlockItemInner as t}from"../Container/BlockItemInner.js";import{FoodsRadioList as
|
|
2
|
-
return o(r,{children:/* @__PURE__ */o(t,{blockOptions:
|
|
1
|
+
import{jsx as o,Fragment as r}from"react/jsx-runtime";import{BlockItemInner as t}from"../Container/BlockItemInner.js";import{FoodsRadioList as n}from"../../../../Radio/FoodsRadioList.js";const s=s=>{const{blockOptions:i,...m}=s,e=m.FormControlProps?.sx,c=Array.isArray(e)?e:void 0===e?[]:[e];/* @__PURE__ */
|
|
2
|
+
return o(r,{children:/* @__PURE__ */o(t,{blockOptions:i,children:/* @__PURE__ */o(n,{...m,FormControlProps:{...m.FormControlProps,sx:[{flexDirection:{xs:"column",sm:"row"}},...c]}})})})};export{s as RadioBlock};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as o,Fragment as
|
|
2
|
-
return o(
|
|
1
|
+
import{jsx as o,Fragment as r}from"react/jsx-runtime";import{BlockItemInner as t}from"../Container/BlockItemInner.js";import{FoodsSelect as e}from"../../../../Select/FoodsSelect/FoodsSelect.js";const s=s=>{const{blockOptions:n,...c}=s;/* @__PURE__ */
|
|
2
|
+
return o(r,{children:/* @__PURE__ */o(t,{blockOptions:n,children:/* @__PURE__ */o(e,{...c,BoxProps:{width:{xs:"100%",sm:"300px"},...c.BoxProps}})})})};export{s as SelectBlock};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsxs as e,jsx as
|
|
2
|
-
return e(
|
|
3
|
-
/* @__PURE__ */
|
|
4
|
-
/* @__PURE__ */e(a,{sx:{display:"flex",gap:
|
|
5
|
-
/* @__PURE__ */
|
|
6
|
-
/* @__PURE__ */
|
|
1
|
+
import{jsxs as e,jsx as n}from"react/jsx-runtime";import{useTheme as t,Stack as i,Box as a,Button as r}from"@mui/material";import{FoodsIcon as s}from"../../../Icons/FoodsIcon.js";import{FlexibleTypography as o}from"../../../../innerComponents/FlexibleTypography.js";const c=c=>{const{title:l,cancel:m,confirm:p}=c,x=t();/* @__PURE__ */
|
|
2
|
+
return e(i,{flexDirection:{xs:"column",sm:"row"},gap:{xs:x.spacing(2),sm:x.spacing(4)},sx:{justifyContent:"space-between",alignItems:{xs:"stretch",sm:"center"},padding:x.spacing(3,4,3,4)},children:[
|
|
3
|
+
/* @__PURE__ */n(o,{text:l,defaultVariant:"h3"}),
|
|
4
|
+
/* @__PURE__ */e(a,{sx:{display:"flex",gap:x.spacing(2),flexWrap:{xs:"wrap",sm:"nowrap"},justifyContent:{xs:"flex-end",sm:"flex-start"}},children:[
|
|
5
|
+
/* @__PURE__ */n(r,{variant:"ternary",onClick:m.action,children:m.label}),
|
|
6
|
+
/* @__PURE__ */n(r,{variant:"validate",onClick:p.action,disabled:p.disabled??!1,startIcon:/* @__PURE__ */n(s,{size:2,icon:"check"}),children:p.label})]})]})};export{c as ListHeader};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { RadioProps, FormControlProps, FormControlLabelProps } from '@mui/material';
|
|
2
2
|
import { CSSProperties } from 'react';
|
|
3
|
-
export type RadioProperties<T> =
|
|
3
|
+
export type RadioProperties<T> = RadioPropertyValue<T>[];
|
|
4
4
|
export type RadioPropertyValue<T> = {
|
|
5
|
+
id: string | number;
|
|
5
6
|
name: string | number;
|
|
6
7
|
state: boolean;
|
|
7
8
|
disabled?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{createElement as r}from"react";import{FormControl as a,FormControlLabel as e,Radio as t,styled as n}from"@mui/material";import{greyTheme as i}from"../../themes/common/colors.js";const d=n=>{const{values:i,onChange:d,variant:
|
|
2
|
-
return o(a,{sx:{flexDirection:
|
|
3
|
-
return o("primary"===a?
|
|
4
|
-
return o("primary"===a?
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{createElement as r}from"react";import{FormControl as a,FormControlLabel as e,Radio as t,styled as n}from"@mui/material";import{greyTheme as i}from"../../themes/common/colors.js";const d=n=>{const{values:i,onChange:d,variant:l="primary",flexDirection:s="row",FormControlProps:b,FormControlLabelProps:m,RadioProps:h}=n;/* @__PURE__ */
|
|
2
|
+
return o(a,{sx:{flexDirection:s},...b,children:i.map((a,n)=>/* @__PURE__ */r(e,{value:n,componentsProps:{typography:{variant:"body"}},...m,key:`${a.id}-${n}`,label:a.name,control:/* @__PURE__ */o(t,{id:`${a.id}-${n}`,checked:a.state,disabled:a.disabled,icon:/* @__PURE__ */o(p,{variant:l}),checkedIcon:/* @__PURE__ */o(c,{variant:l}),disableRipple:!0,...h}),onChange:(o,r)=>{d(i.map((o,a)=>({...o,state:a===n&&r})))}}))})},p=n(r=>{const{variant:a,...e}=r;/* @__PURE__ */
|
|
3
|
+
return o("primary"===a?l:b,{...e})})({}),c=n(r=>{const{variant:a,...e}=r;/* @__PURE__ */
|
|
4
|
+
return o("primary"===a?s:m,{...e})})({}),l=n("span")({borderRadius:"50%",width:20,height:20,boxShadow:`0 0 0 2px ${i[1600]}`,backgroundColor:i[100],"input:disabled ~ &":{boxShadow:`0 0 0 2px ${i[800]}`,background:i[100]}}),s=n(l)({backgroundColor:i[2800],boxShadow:`0 0 0 2px ${i[2800]}`,"&::before":{display:"block",width:20,height:20,backgroundImage:`radial-gradient(${i[100]},${i[100]} 28%,transparent 32%)`,content:'""'},"input:disabled ~ &":{boxShadow:`0 0 0 2px ${i[800]}`,background:i[800],"&::before":{display:"block",width:20,height:20,backgroundImage:`radial-gradient(${i[100]},${i[100]} 28%,transparent 32%)`,content:'""'}}}),b=n(l)({boxShadow:`0 0 0 2px ${i[2800]}`}),m=n(s)({boxShadow:`0 0 0 2px ${i[2e3]}`,backgroundColor:i[2e3]});export{d as BaseRadio};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
2
|
-
return
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{BaseRadio as a}from"./BaseRadio.js";const e=e=>{const{values:r,selectedItem:n,onChange:o,getId:s=t=>t.id,getName:i=t=>t.name,...m}=e,d=r.map(t=>{const a=s(t),e=void 0!==n&&a===s(n);return{id:a,name:i(t),state:e,rawData:t}});/* @__PURE__ */
|
|
2
|
+
return t(a,{values:d,onChange:t=>{const a=t.find(t=>!0===t.state);if(void 0!==a&&void 0!==a.rawData)return o(a.rawData)},...m})};export{e as FoodsRadioList};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{BaseRadio as t}from"./BaseRadio.js";const a=a=>{const{value:n,onChange:o,trueKeyName:
|
|
2
|
-
return e(t,{values:{id1
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{BaseRadio as t}from"./BaseRadio.js";const a=a=>{const{value:n,onChange:o,trueKeyName:i="Oui",falseKeyName:s="Non",...m}=a;/* @__PURE__ */
|
|
2
|
+
return e(t,{values:[{id:"id1",name:i,state:!0===n},{id:"id2",name:s,state:!1===n}],onChange:e=>{const t=e.find(e=>!0===e.state);if(void 0!==t){const e=t.name===i;o(e)}},...m})};export{a as RadioBoolean};
|
|
@@ -14,6 +14,9 @@ export type FoodsSelectProps<T> = {
|
|
|
14
14
|
BoxOptionsProps?: SxProps;
|
|
15
15
|
unit?: string;
|
|
16
16
|
infiniteScroll?: FoodsSelectInfiniteScrollOptions;
|
|
17
|
+
error?: boolean;
|
|
18
|
+
errorMessage?: string;
|
|
19
|
+
resetButtonLabel?: string;
|
|
17
20
|
};
|
|
18
21
|
export type FoodsSelectInfiniteScrollOptions = {
|
|
19
22
|
hasNextPage: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{
|
|
2
|
-
return t(
|
|
3
|
-
/* @__PURE__ */t(
|
|
4
|
-
/* @__PURE__ */e(
|
|
5
|
-
return e(
|
|
6
|
-
return e(
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useTheme as o,Box as i,Typography as s,Button as r}from"@mui/material";import{useState as n,useId as l}from"react";import{useTranslation as a}from"react-i18next";import{FoodsIconButton as c}from"../../Button/FoodsIconButton.js";import{FoodsIcon as p}from"../../Icons/FoodsIcon.js";import{useResponsiveBreakpoints as d}from"../../../themes/responsive/useResponsiveBreakpoints.js";import{Select as m}from"./Select.js";import{FoodsSelectContextProvider as u}from"./Context/Provider.js";import{useFoodsSelectContext as h}from"./Context/useSelect.js";const g=n=>{const{options:u,id:g,selectedOption:f,originalValue:y,onChange:b,getId:S,getName:x,getIcon:O,getGroupName:k,unit:C,BoxProps:v={},BoxOptionsProps:z={},infiniteScroll:F,error:I=!1,errorMessage:W,resetButtonLabel:V}=n,{disabled:H,disableOnEmpty:j,textOptions:B}=h(),R=o(),{isMobile:w}=d(),{t:E}=a(),P=l(),$=g??P,G=`${$}-error`,N=I&&!H&&!(j&&0===u.length),T=V??E("reinitialiser_la_valeur_par_defaut",{defaultValue:"Reset default value"}),_=((e,t)=>!0!==e&&0!==t.length)(H,u);/* @__PURE__ */
|
|
2
|
+
return t(i,{sx:{width:!w&&_&&y?`calc(${R.custom.select.desktopWidth} + ${R.custom.select.desktopResetGap} + ${R.custom.select.desktopResetActionWidth})`:R.custom.select.desktopWidth,...v,...w?{width:"100%"}:{}},children:[
|
|
3
|
+
/* @__PURE__ */t(i,{sx:{display:"flex",alignItems:"center",direction:"row",gap:w?R.spacing(1):R.custom.select.desktopResetGap,minWidth:0},children:[
|
|
4
|
+
/* @__PURE__ */e(m,{id:$,options:u,getId:S,getName:x,onChange:b,getIcon:O,getGroupName:k,selectedOption:f,BoxOptionsProps:z,infiniteScroll:F,error:N,errorMessageId:N&&W?G:void 0}),C&&/* @__PURE__ */e(s,{variant:"body",children:C}),!w&&_&&y&&/* @__PURE__ */e(c,{size:"m",icon:"reset",tooltip:{text:T},buttonProps:{onClick:()=>b(y),"aria-label":T}})]}),N&&W&&/* @__PURE__ */e(s,{id:G,variant:"inherit",style:{fontSize:w?R.custom.select.mobileSupportingFontSize:R.custom.select.desktopValueFontSize,fontWeight:R.typography["body-medium"].fontWeight,lineHeight:R.typography["body-medium"].lineHeight},sx:{display:"block",mt:R.spacing(1),color:R.custom.select.errorText},children:W}),_&&y&&/* @__PURE__ */t(s,{variant:"inherit",style:{fontSize:w?R.custom.select.mobileSupportingFontSize:R.custom.select.desktopSupportingFontSize,fontWeight:R.typography["body-regular"].fontWeight,lineHeight:R.typography["body-regular"].lineHeight},sx:{display:"block",mt:R.spacing(1),color:R.custom.select.defaultText},children:[B.defaultValueText?`${B.defaultValueText}: `:"",x(y)]}),w&&_&&y&&/* @__PURE__ */e(r,{variant:"text",startIcon:/* @__PURE__ */e(p,{icon:"reset",size:2}),onClick:()=>b(y),style:{fontSize:R.custom.select.mobileResetFontSize,fontWeight:R.typography.cta.fontWeight,lineHeight:R.typography.cta.lineHeight},sx:{minHeight:R.custom.select.mobileResetHeight,padding:0,color:R.palette.primary[800],textDecoration:"underline"},children:T})]})},f=t=>{const{textOptions:o,noValue:i,disabled:s,closeOnSelect:r,disableSearch:l,disableOnEmpty:a=!1,filterControls:c,...p}=t,[d,m]=n("");/* @__PURE__ */
|
|
5
|
+
return e(u,{textOptions:o,noValue:i,disabled:s,closeOnSelect:r,disableSearch:l,search:d,setSearch:m,isSearchFound:e=>""===d||e.toLowerCase().includes(d.toLowerCase()),disableOnEmpty:a,filterControls:c,children:/* @__PURE__ */e(g,{...p})})},y=t=>{const{textOptions:o,noValue:i,disabled:s,closeOnSelect:r,search:n,setSearch:l,isSearchFound:a,disableOnEmpty:c=!1,filterControls:p,...d}=t;/* @__PURE__ */
|
|
6
|
+
return e(u,{textOptions:o,noValue:i,disabled:s,closeOnSelect:r,search:n,setSearch:l,isSearchFound:a,disableOnEmpty:c,filterControls:p,children:/* @__PURE__ */e(g,{...d})})};export{f as FoodsSelect,y as FoodsSelectServerPagination};
|
|
@@ -11,5 +11,7 @@ export type SelectProps<T> = {
|
|
|
11
11
|
selectedOption: T | null;
|
|
12
12
|
BoxOptionsProps: SxProps;
|
|
13
13
|
infiniteScroll?: FoodsSelectInfiniteScrollOptions;
|
|
14
|
+
error?: boolean;
|
|
15
|
+
errorMessageId?: string;
|
|
14
16
|
};
|
|
15
17
|
export declare const Select: <T>(props: SelectProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useTheme as t,Button as
|
|
1
|
+
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useTheme as t,Button as r,Typography as s}from"@mui/material";import{useState as i,Fragment as l}from"react";import{FoodsIcon as c}from"../../Icons/FoodsIcon.js";import{useResponsiveBreakpoints as n}from"../../../themes/responsive/useResponsiveBreakpoints.js";import{SelectOptions as a}from"./Options/SelectOptions.js";import{useFoodsSelectContext as d}from"./Context/useSelect.js";import{AnchoredPopover as p}from"../../Popover/AnchoredPopover.js";const u=u=>{const{textOptions:m,disabled:g,closeOnSelect:h,setSearch:x,disableOnEmpty:b}=d(),f=t(),{isMobile:v}=n(),[y,k]=i(null),S=()=>k(null),w=null!==y,{selectedOption:O,infiniteScroll:C}=u,I=g||b&&0===u.options.length,T=Boolean(u.error&&!I),B=/* @__PURE__ */o(c,{icon:w?"arrowUpShort":"arrowDownShort",size:2}),P=((e,o,t,r,s)=>0===e.length?null!==t?r(t):o:null===t?s:r(t))(u.options,m.emptyOptionsText,O,u.getName,m.placeholder);/* @__PURE__ */
|
|
2
2
|
return e(l,{children:[
|
|
3
|
-
/* @__PURE__ */e(
|
|
4
|
-
/* @__PURE__ */o(
|
|
5
|
-
/* @__PURE__ */o(
|
|
3
|
+
/* @__PURE__ */e(r,{variant:"select",id:u.id,"aria-invalid":T||void 0,"aria-describedby":T?u.errorMessageId:void 0,"aria-expanded":w,"aria-haspopup":"listbox",onClick:e=>w?S():k(e.currentTarget),sx:{width:"100%",minWidth:0,height:v?f.custom.select.mobileHeight:f.custom.select.desktopHeight,display:"flex",alignItems:"center",justifyContent:"space-between",gap:f.spacing(1.5),padding:`0 ${f.spacing(1.5)} 0 ${f.spacing(2)}`,color:f.custom.grey[2800],border:`${w?2:1}px solid ${T?f.custom.select.errorBorder:w?f.custom.grey[2800]:f.custom.select.border}`,backgroundColor:w?f.custom.select.background:T?f.custom.select.errorBackground:f.custom.select.background,"&:hover":{backgroundColor:w?f.custom.select.background:T?f.custom.select.errorBackground:f.custom.select.hoverBackground},"&.Mui-disabled":{color:f.custom.select.disabledText,backgroundColor:f.custom.select.disabledBackground,borderColor:f.custom.select.border}},disabled:I,children:[u.getIcon&&O&&u.getIcon(O),
|
|
4
|
+
/* @__PURE__ */o(s,{variant:"inherit",style:{fontSize:v?f.custom.select.mobileValueFontSize:f.custom.select.desktopValueFontSize,fontWeight:f.typography["body-regular"].fontWeight,lineHeight:f.typography["body-regular"].lineHeight},sx:{minWidth:0,flex:1,textAlign:"left",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",color:I?f.custom.select.disabledText:null===O&&T&&!w?f.custom.select.errorPlaceholderText:null===O?f.custom.select.placeholderText:f.custom.select.selectedText},children:P}),B]}),
|
|
5
|
+
/* @__PURE__ */o(p,{sx:{top:"5px"},paperProps:{width:"280px",maxHeight:"min(480px, calc(100% - 32px))",...C?{overflow:"hidden",display:"flex",flexDirection:"column"}:{},border:`1px solid ${f.custom.select.border}`,borderRadius:"12px",boxShadow:f.custom.shadows.popover,...u.BoxOptionsProps},variant:"headless",anchor:y,open:w,onClose:()=>{S(),x("")},anchorPosition:"rightside",children:/* @__PURE__ */o(a,{selectedOption:u.selectedOption,options:u.options,getId:u.getId,getName:u.getName,getIcon:u.getIcon,getGroupName:u.getGroupName,onChange:e=>{u.onChange(e),x(""),!0===h&&S()},infiniteScroll:C,onScroll:C?e=>{if(!0!==C?.hasNextPage||C.isFetchingNextPage)return;const o=e.currentTarget;o.scrollHeight-o.scrollTop-o.clientHeight<=32&&C.onLoadMore()}:void 0})})]})};export{u as Select};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { FocusEvent } from 'react';
|
|
2
|
-
type Variant = "primary" | "secondary" | "tertiary" | "disabled";
|
|
3
2
|
export type TextareaProps = {
|
|
4
3
|
value?: string;
|
|
5
4
|
onChange?: (newValue: string) => void;
|
|
6
5
|
onBlur?: (event: FocusEvent<HTMLTextAreaElement>) => void;
|
|
7
6
|
onFocus?: (event: FocusEvent<HTMLTextAreaElement>) => void;
|
|
7
|
+
id?: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
"aria-label"?: string;
|
|
10
|
+
"aria-labelledby"?: string;
|
|
11
|
+
"aria-describedby"?: string;
|
|
8
12
|
placeholder?: string;
|
|
9
|
-
variant?: Variant;
|
|
10
13
|
disabled?: boolean;
|
|
11
14
|
error?: boolean;
|
|
12
15
|
errorMessage?: string;
|
|
@@ -17,4 +20,3 @@ export type TextareaProps = {
|
|
|
17
20
|
content?: string;
|
|
18
21
|
};
|
|
19
22
|
export declare const Textarea: (props: TextareaProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export {};
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import{jsxs as
|
|
2
|
-
return
|
|
3
|
-
/* @__PURE__ */o(
|
|
4
|
-
return o(p,{...a});case"tertiary":/* @__PURE__ */
|
|
5
|
-
return o(m,{...a});case"disabled":/* @__PURE__ */
|
|
6
|
-
return o(g,{...a});default:/* @__PURE__ */
|
|
7
|
-
return o(h,{...a})}},u=l(t,{shouldForwardProp:r=>"$hasError"!==r})(({theme:r,$hasError:o})=>({width:"100%",lineHeight:"22px",padding:"20px 24px 60px 24px",borderRadius:"12px",resize:"none",...r.typography.body,fontFamily:r.typography.fontFamily,color:s[2800],borderColor:o?i[600]:s[500],"&:focus-visible":{outline:"0",borderColor:o?i[600]:s[2800]},...o&&{backgroundColor:i[100],color:i[600]}})),h=l(u)(({$hasError:r})=>({backgroundColor:r?i[100]:s[100]})),p=l(u)(({$hasError:r})=>({backgroundColor:r?i[100]:s[300]})),m=l(u)(({$hasError:r})=>({borderColor:r?i[600]:s[2800],backgroundColor:r?i[100]:s[100]})),g=l(u)({color:s[2e3],backgroundColor:s[500]});export{d as Textarea};
|
|
1
|
+
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useTheme as r,Stack as t,Typography as a,styled as i,TextareaAutosize as l}from"@mui/material";import{useId as n,useState as s}from"react";import{useResponsiveBreakpoints as c}from"../../themes/responsive/useResponsiveBreakpoints.js";const d=i=>{const l=r(),{isMobile:d}=c(),m=n(),{value:g,onChange:h,onBlur:p,onFocus:y,id:b=m,name:f,"aria-label":x,"aria-labelledby":v,"aria-describedby":w,placeholder:z,disabled:C=!1,error:S=!1,errorMessage:F,maxLength:A,minRows:R,maxRows:k=14,content:H}=i,[$,j]=s(H??""),B=void 0!==g,E=B?g.length:$.length,L=!C&&(S||void 0!==A&&E>A),T=void 0!==A||L&&!!F,W=`${b}-error`,G=[w,L&&F?W:void 0].filter(Boolean).join(" ")||void 0,M=B?{value:g,onChange:e=>h?.(e.currentTarget.value)}:{defaultValue:H,onChange:e=>{j(e.currentTarget.value),h?.(e.currentTarget.value)}};/* @__PURE__ */
|
|
2
|
+
return e(t,{gap:l.custom.textArea.footerGap,width:"100%",children:[
|
|
3
|
+
/* @__PURE__ */o(t,{minHeight:l.custom.textArea.minHeight,children:/* @__PURE__ */o(u,{...M,id:b,name:f,"aria-label":x,"aria-labelledby":v,"aria-describedby":G,"aria-invalid":L||void 0,onBlur:p,onFocus:y,placeholder:z,disabled:C,minRows:R,maxRows:k,maxLength:A,$hasError:L})}),T&&/* @__PURE__ */e(t,{flexDirection:"row",justifyContent:"space-between",alignItems:"baseline",gap:l.spacing(4),children:[L&&F&&/* @__PURE__ */o(a,{id:W,variant:"inherit",color:l.custom.red[600],sx:{minWidth:0,fontSize:l.custom.textArea.errorFontSize,lineHeight:l.typography["small-regular"].lineHeight},children:F}),void 0!==A&&/* @__PURE__ */e(a,{variant:"inherit",color:l.custom.grey[2e3],sx:{marginLeft:"auto",fontSize:d?l.custom.textArea.mobileCounterFontSize:l.typography["small-regular"].fontSize,fontWeight:l.typography["small-regular"].fontWeight,lineHeight:l.typography["small-regular"].lineHeight,whiteSpace:"nowrap"},children:[E," / ",A]})]})]})},u=i(l,{shouldForwardProp:e=>"$hasError"!==e})(({theme:e,$hasError:o})=>({boxSizing:"border-box",width:"100%",flexGrow:1,padding:e.custom.textArea.padding,borderRadius:e.custom.textArea.borderRadius,border:`1px solid ${o?e.custom.red[600]:e.custom.grey[600]}`,resize:"none",...e.typography["body-regular"],fontFamily:e.typography.fontFamily,fontSize:e.typography["body-regular"].fontSize,[e.breakpoints.down("md")]:{fontSize:e.custom.textArea.mobileFontSize},color:e.custom.grey[2800],backgroundColor:o?e.custom.red[100]:e.custom.grey[100],"&::placeholder":{color:o?e.custom.grey[2200]:e.custom.grey[2e3],opacity:1},"&:hover:not(:disabled):not(:focus)":{backgroundColor:o?e.custom.red[200]:e.custom.grey[300]},"&:hover:not(:disabled):not(:focus)::placeholder":{color:o?e.custom.grey[2400]:e.custom.grey[2100]},"&:focus":{outline:0,borderColor:o?e.custom.red[600]:e.custom.grey[2800],backgroundColor:e.custom.grey[100]},"&:focus::placeholder":{color:e.custom.grey[2e3]},"&:disabled":{color:e.custom.grey[1400],backgroundColor:e.custom.grey[500],borderColor:e.custom.grey[600]}}));export{d as Textarea};
|
package/dist/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getThemeLogo as o,isTheme as r,themeLogos as t,themeOptions as m,themes as s}from"./themes/index.js";import{Button as n,Typography as e}from"@mui/material";import{AccordionProduct as i}from"./components/Accordion/ProductAccordion.js";import{ActionPlanIndicatorBreakdownPopover as p}from"./components/ActionPlan/ActionPlanIndicatorBreakdownPopover.js";import{ActionPlanNetImpactBody as c}from"./components/ActionPlan/ActionPlanNetImpactBody.js";import{AdditionalContentBox as a}from"./components/Box/AdditionalContentBox.js";import{AnchoredPopover as f,HeadlessPopover as j,ThemedPopover as l}from"./components/Popover/AnchoredPopover.js";import{Article as d}from"./components/CMS/ArticleBlock/Article.js";import{ArticlesBox as B}from"./components/CMS/ArticleBlock/ArticlesBox.js";import{Badge as C}from"./components/Badge/Badge.js";import{Banner as u}from"./components/Banner/Banner.js";import{BigPopoverLayout as h}from"./components/Popover/BigPopoverLayout.js";import{BlockItemContainer as g}from"./components/Layout/BlockList/Blocks/Container/BlockItemContainer.js";import{BlockItemInner as F}from"./components/Layout/BlockList/Blocks/Container/BlockItemInner.js";import{BlockListContainer as T}from"./components/Layout/BlockList/BlockListContainer.js";import{BottomSheetDialog as k}from"./components/Dialog/BottomSheetDialog.js";import{BoxStyled as P,SecondaryTabs as S}from"./components/Tabs/SecondaryTabs.js";import{BreadcrumbItem as x}from"./components/Navigation/Breadcrumbs/BreadcrumbItem.js";import{Breadcrumbs as v}from"./components/Navigation/Breadcrumbs/Breadcrumbs.js";import{BreakdownTable as I}from"./components/Chart/BreakdownTable/BreakdownTable.js";import{ButtonTabs as y}from"./components/Tabs/ButtonTabs.js";import{CardImage as L}from"./components/CardImage.js";import{CategoryBox as b}from"./components/Box/CategoryBox.js";import{CheckboxBlock as N}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/CheckboxBlock.js";import{CollectiveTheme as A,CollectiveThemeOptions as H}from"./themes/themes/CollectiveTheme.js";import{ComingSoonBadge as D}from"./components/Badge/ComingSoonBadge.js";import{ComparisonArrow as G}from"./components/ComparisonBlock/ComparisonArrow.js";import{ComparisonBlock as R}from"./components/ComparisonBlock/ComparisonBlock.js";import{ComparisonLabel as w}from"./components/Chart/HistogramComparisonChart/ComparisonLabel.js";import{ConfirmDialog as U}from"./components/Form/FoodsFormBase/ConfirmDialog.js";import{ContextualContentBox as M}from"./components/Box/ContextualContentBox.js";import{CoordinatePopover as W}from"./components/Popover/CoordinatePopover.js";import{CountTabs as E}from"./components/Tabs/CountTabs/CountTabs.js";import{CustomRender as V}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/CustomRender.js";import{CustomToggleButton as O,TertiaryToggleButton as z}from"./components/Button/TertiaryToggleButton.js";import{CustomToggleButtonNodeTitle as Q,TertiaryToggleButtonNodeTitle as q}from"./components/Button/TertiaryToggleButtonNodeTitle.js";import{CustomTypography as J}from"./components/CustomTypography/CustomTypography.js";import{CustomizedAxisTick as K}from"./components/Chart/HistogramComparisonChart/CustomizedAxisTick.js";import{DefaultUserAction as X}from"./components/Navigation/FoodsNavBar/Plugin/DefaultUserAction.js";import{DottedBox as Y}from"./components/Box/DottedBox.js";import{DoughnutCard as Z}from"./components/Cards/DoughnutCard/DoughnutCard.js";import{DoughnutChart as $}from"./components/Chart/DoughnutChart/DoughnutChart.js";import{DrawerAction as _}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/DrawerAction.js";import{EcoScoreCell as oo}from"./components/Grid/Cell/EcoScoreCell.js";import{EditHeader as ro}from"./components/Layout/BlockList/Headers/EditHeader.js";import{EllipsisItem as to}from"./components/Pagination/PageItems/EllipsisItem.js";import{EmptyForm as mo}from"./components/Layout/BlockList/Blocks/InnerInfoBlocks/EmptyForm.js";import{EvolutionChart as so}from"./components/Chart/EvolutionChart/EvolutionChart.js";import{FixedMultiValueFilter as no}from"./components/Filter/FixedMultiValueFilter.js";import{FoodPilotTheme as eo,FoodpilotThemeOptions as io}from"./themes/themes/FoodPilotTheme.js";import{FoodsBadge as po}from"./components/Badge/FoodsBadge.js";import{FoodsCheckbox as co}from"./components/Checkbox/FoodsCheckbox.js";import{FoodsDeleteButton as ao}from"./components/Button/FoodsDeleteButton.js";import{FoodsFormBase as fo}from"./components/Form/FoodsFormBase/FoodsFormBase.js";import{FoodsIcon as jo}from"./components/Icons/FoodsIcon.js";import{FoodsIconButton as lo}from"./components/Button/FoodsIconButton.js";import{FoodsIllustrations as Bo}from"./components/Icons/FoodsIllustrations.js";import{FoodsNavbar as Co}from"./components/Navigation/FoodsNavBar/FoodsNavbar.js";import{FoodsPagination as uo}from"./components/Pagination/FoodsPagination.js";import{FoodsPaginationItem as ho}from"./components/Pagination/FoodsPaginationItem.js";import{FoodsRadioList as go}from"./components/Radio/FoodsRadioList.js";import{FoodsSearch as Fo}from"./components/Search/FoodsSearch.js";import{FoodsSelect as To,FoodsSelectServerPagination as ko}from"./components/Select/FoodsSelect/FoodsSelect.js";import{FoodsTabs as Po,SpecialTabs as So}from"./components/Tabs/FoodsTabs/FoodsTabs.js";import{FoodsTags as xo}from"./components/Tags/FoodsTags.js";import{FoodsTextInput as vo}from"./components/Form/FoodsFormFields/FoodsTextInput.js";import{FoodsThemeOptionsProvider as Io,FoodsThemeProvider as yo}from"./themes/FoodsThemeProvider.js";import{FoodsToggleButton as Lo}from"./components/Button/FoodsToggleButton.js";import{FoodsTooltip as bo}from"./components/Tooltip/FoodsTooltip.js";import{FoodsTreeview as No}from"./components/Treeview/Treeview.js";import{FoodsUserTags as Ao}from"./components/Tags/FoodsUserTags.js";import{FormAccordion as Ho}from"./components/Accordion/FormAccordion.js";import{FormBase as Do}from"./components/Form/FormBase.js";import{FormBaseContextProvider as Go,useFormBaseContext as Ro}from"./components/Form/FoodsFormBase/FormBaseContext.js";import{FormBox as wo}from"./components/Form/FormBox.js";import{FormPropertyBox as Uo}from"./components/Form/FormPropertyBox.js";import{FormTopBar as Mo}from"./components/Form/FoodsFormBase/FormTopBar/FormTopBar.js";import{FormUnit as Wo}from"./components/Form/FormUnit.js";import{GenericAccordion as Eo}from"./components/Accordion/GenericAccordion.js";import{GreyTextCell as Vo}from"./components/Grid/Cell/GreyCell.js";import{HeaderNav as Oo,NavBarLink as zo,Navbar as Qo,SubMenu as qo,UserNav as Jo}from"./components/Navigation/Navbar.js";import{HelperBox as Ko}from"./components/Box/HelperBox.js";import{HeroBlock as Xo}from"./components/CMS/HeroBlock/HeroBlock.js";import{HistogramComparisonChart as Yo}from"./components/Chart/HistogramComparisonChart/HistogramComparisonChart.js";import{HorizontalGaugeChart as Zo}from"./components/Chart/HorizontalGauge/HorizontalGaugeChart.js";import{IconThread as $o}from"./components/Navigation/IconThread.js";import{IndicatorBlock as _o}from"./components/CMS/IndicatorBlock/IndicatorBlock.js";import{InfoBox as or}from"./components/Box/InfoBox.js";import{InfoHeaderWithIllustration as rr}from"./components/Layout/InfoHeaderWithIllustration.js";import{InitHeader as tr}from"./components/Layout/BlockList/Headers/InitHeader.js";import{LeftComparisonPart as mr}from"./components/Layout/BlockList/Blocks/Common/LeftComparisonPart.js";import{LightIndicatorBlock as sr}from"./components/CMS/IndicatorBlock/LightIndicatorBlock.js";import{LineGroupBox as nr}from"./components/Box/LineGroupBox.js";import{LinearProgress as er}from"./components/LinearProgress.js";import{LinkAction as ir}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/LinkAction.js";import{ListHeader as pr}from"./components/Layout/BlockList/Headers/ListHeader.js";import{MRTGrid as cr}from"./components/Grid/MRTGrid.js";import{MRT_GRID_HUB_LAYOUT as ar}from"./components/Grid/mrtGridLayout.js";import{MultiValueFilter as fr}from"./components/Filter/MultiValueFilter.js";import{NumberField as jr}from"./components/Field/NumberField.js";import{NumberWithUnit as lr}from"./components/Number/NumberWithUnit.js";import{OptionsPopover as dr}from"./components/Popover/OptionsPopover.js";import{PageItem as Br}from"./components/Pagination/PageItems/PageItem.js";import{PageUpAndDownItem as Cr}from"./components/Pagination/PageItems/PageUpAndDownItem.js";import{FoodsPills as ur}from"./components/Input/Pills/Pills.js";import{PointsCell as hr}from"./components/Grid/Cell/PointsCell.js";import{PolymorphicChart as gr}from"./components/Chart/PolymorphicChart/PolymorphicChart.js";import{PolymorphicChartRenderer as Fr}from"./components/Chart/PolymorphicChart/PolymorphicChartRenderer.js";import{PrimaryCheckbox as Tr}from"./components/Checkbox/PrimaryCheckbox.js";import{PrimaryDialog as kr}from"./components/Dialog/PrimaryDialog.js";import{Progress as Pr}from"./components/Progress/Progress.js";import{ProgressCard as Sr}from"./components/ProgressCard/ProgressCard.js";import{QuoteBox as xr}from"./components/Box/QuoteBox.js";import{RadioBlock as vr}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/RadioBlock.js";import{RadioBoolean as Ir}from"./components/Radio/RadioBoolean.js";import{RadioList as yr}from"./components/Radio/RadioList.js";import{RichTextEditor as Lr}from"./components/RichTextEditor/RichTextEditor.js";import{RoundInput as br}from"./components/Input/RoundInput.js";import{RoundNumberInput as Nr}from"./components/Input/RoundNumberInput.js";import{ScatterPlot as Ar}from"./components/Chart/ScatterPlot/ScatterPlot.js";import{Score as Hr}from"./components/Number/Score.js";import{ScoreCard as Dr}from"./components/Cards/ScoreCard/ScoreCard.js";import{ScoreCardHeader as Gr}from"./components/Cards/ScoreCard/Header/ScoreCardHeader.js";import{ScoreContainer as Rr}from"./components/Badge/ScoreContainer.js";import{ScoreDistribution as wr}from"./components/Chart/ScoreDistribution/ScoreDistribution.js";import{ScoreOverviewCard as Ur}from"./components/Cards/ScoreOverviewCard/ScoreOverviewCard.js";import{ScoreSelect as Mr}from"./components/Select/ScoreSelect/ScoreSelect.js";import{ScoreValue as Wr}from"./components/Number/ScoreValue.js";import{SearchBox as Er}from"./components/Input/SearchBox.js";import{SectionBox as Vr}from"./components/Box/SectionBox.js";import{SectionTabs as Or}from"./components/Tabs/SectionTabs/SectionTabs.js";import{SeeMoreCard as zr}from"./components/Cards/SeeMoreCard/SeeMoreCard.js";import{SelectBlock as Qr}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/SelectBlock.js";import{SelectionCard as qr}from"./components/Cards/SelectionCard/SelectionCard.js";import{SelectionCardGroup as Jr}from"./components/Cards/SelectionCard/SelectionCardGroup.js";import{Separator as Kr}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/Separator.js";import{SolidGreyBox as Xr}from"./components/Box/SolidGreyBox.js";import{SpecialTab as Yr}from"./components/Tabs/FoodsTabs/FoodsTabTemplate.js";import{SuggestionBlock as Zr}from"./components/Layout/BlockList/Blocks/InnerInfoBlocks/SuggestionBlock.js";import{TextArrowList as $r}from"./components/Text/TextArrowList.js";import{TextField as _r}from"./components/Field/TextField.js";import{TextTitle as ot}from"./components/Text/TextTitle.js";import{TextTitleGreyIcon as rt}from"./components/Text/TextTitleGreyIcon.js";import{Textarea as tt}from"./components/Textarea/Textarea.js";import{ToggleSwitch as mt}from"./components/ToggleSwitch/ToggleSwitch.js";import{TopLinkAction as st}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/TopLinkAction.js";import{TrajectoryCards as nt}from"./components/Cards/TrajectoryCards/TrajectoryCards.js";import{TrajectoryChart as et}from"./components/Chart/TrajectoryChart/TrajectoryChart.js";import{TypographyList as it}from"./components/CustomTypography/TypographyList.js";import{UnitConverterPanel as pt}from"./components/UnitConverterPanel/UnitConverterPanel.js";import{UnsavedChangesDialog as ct}from"./components/Dialog/UnsavedChangesDialog.js";import{ValueDisplay as at}from"./components/Layout/BlockList/Blocks/Common/ValueDisplay.js";import{ValueLabel as ft}from"./components/Chart/HistogramComparisonChart/ValueLabel.js";import{ValueSwitcher as jt}from"./components/Cards/ScoreCard/Header/ValueSwitcher/ValueSwitcher.js";import{WarningBox as lt}from"./components/Box/WarningBox.js";import{WaterfallChart as dt}from"./components/Chart/WaterfallChart/WaterfallChart.js";import{WhiteBox as Bt}from"./components/Box/WhiteBox.js";import{WhiteGrid as Ct}from"./components/Box/WhiteGrid.js";import{WhitePopover as ut}from"./components/Popover/WhitePopover.js";import{WhitePopoverOnIcon as ht}from"./components/Popover/WhitePopoverOnIcon.js";import{WinePilotTheme as gt,WinepilotThemeOptions as Ft}from"./themes/themes/WinePilotTheme.js";import{allColors as Tt,allMainColors as kt,blueTheme as Pt,coralTheme as St,dataVisualizationColors as xt,extraColors as vt,greenTheme as It,greyTheme as yt,orangeTheme as Lt,redTheme as bt,shadows as Nt,yellowTheme as At}from"./themes/common/colors.js";import{allTypographyVariants as Ht,deprecatedVariants as Dt,typographyConfig as Gt}from"./themes/common/MUIComponents/typography.js";import{anyToCheckbox as Rt,checkboxToAny as wt}from"./components/Checkbox/helperFunctions.js";import{barChart as Ut,breadcrumb as Mt,countTabs as Wt,custom as Et,deleteButton as Vt,doughnutCard as Ot,formField as zt,ingredientCard as Qt,mediaUpload as qt,numberWithUnit as Jt,numbers as Kt,scoreCard as Xt,scoreDetail as Yt,scoreOverviewCard as Zt,scoreValue as $t,status as _t,strokes as om,tabs as rm,tags as tm,toggleSwitch as mm,tooltip as sm}from"./themes/common/custom.js";import{components as nm}from"./themes/common/components.js";import{computeSize as em,iconMapping as im}from"./components/Icons/iconConfig.js";import{illustationsMapping as pm}from"./components/Icons/illustrationsConfig.js";import{spacing as cm}from"./themes/common/spacing.js";import{useResponsiveBreakpoints as am}from"./themes/responsive/useResponsiveBreakpoints.js";import{useResponsivePadding as fm}from"./themes/responsive/useResponsivePadding.js";export{i as AccordionProduct,p as ActionPlanIndicatorBreakdownPopover,c as ActionPlanNetImpactBody,a as AdditionalContentBox,f as AnchoredPopover,d as Article,B as ArticlesBox,C as Badge,u as Banner,h as BigPopoverLayout,g as BlockItemContainer,F as BlockItemInner,T as BlockListContainer,k as BottomSheetDialog,P as BoxStyled,x as BreadcrumbItem,v as Breadcrumbs,I as BreakdownTable,n as Button,y as ButtonTabs,L as CardImage,b as CategoryBox,N as CheckboxBlock,A as CollectiveTheme,H as CollectiveThemeOptions,D as ComingSoonBadge,G as ComparisonArrow,R as ComparisonBlock,w as ComparisonLabel,U as ConfirmDialog,M as ContextualContentBox,W as CoordinatePopover,E as CountTabs,V as CustomRender,O as CustomToggleButton,Q as CustomToggleButtonNodeTitle,J as CustomTypography,K as CustomizedAxisTick,X as DefaultUserAction,Y as DottedBox,Z as DoughnutCard,$ as DoughnutChart,_ as DrawerAction,oo as EcoScoreCell,ro as EditHeader,to as EllipsisItem,mo as EmptyForm,so as EvolutionChart,no as FixedMultiValueFilter,eo as FoodPilotTheme,io as FoodpilotThemeOptions,po as FoodsBadge,co as FoodsCheckbox,ao as FoodsDeleteButton,fo as FoodsFormBase,jo as FoodsIcon,lo as FoodsIconButton,Bo as FoodsIllustrations,Co as FoodsNavbar,uo as FoodsPagination,ho as FoodsPaginationItem,go as FoodsRadioList,Fo as FoodsSearch,To as FoodsSelect,ko as FoodsSelectServerPagination,Po as FoodsTabs,xo as FoodsTags,vo as FoodsTextInput,Io as FoodsThemeOptionsProvider,yo as FoodsThemeProvider,Lo as FoodsToggleButton,bo as FoodsTooltip,No as FoodsTreeview,Ao as FoodsUserTags,Ho as FormAccordion,Do as FormBase,Go as FormBaseContextProvider,wo as FormBox,Uo as FormPropertyBox,Mo as FormTopBar,Wo as FormUnit,Eo as GenericAccordion,Vo as GreyTextCell,Oo as HeaderNav,j as HeadlessPopover,Ko as HelperBox,Xo as HeroBlock,Yo as HistogramComparisonChart,Zo as HorizontalGaugeChart,$o as IconThread,_o as IndicatorBlock,or as InfoBox,rr as InfoHeaderWithIllustration,tr as InitHeader,mr as LeftComparisonPart,sr as LightIndicatorBlock,nr as LineGroupBox,er as LinearProgress,ir as LinkAction,pr as ListHeader,cr as MRTGrid,ar as MRT_GRID_HUB_LAYOUT,fr as MultiValueFilter,zo as NavBarLink,Qo as Navbar,jr as NumberField,lr as NumberWithUnit,dr as OptionsPopover,Br as PageItem,Cr as PageUpAndDownItem,ur as Pills,hr as PointsCell,gr as PolymorphicChart,Fr as PolymorphicChartRenderer,Tr as PrimaryCheckbox,kr as PrimaryDialog,Pr as Progress,Sr as ProgressCard,xr as QuoteBox,vr as RadioBlock,Ir as RadioBoolean,yr as RadioList,Lr as RichTextEditor,br as RoundInput,Nr as RoundNumberInput,Ar as ScatterPlot,Hr as Score,Dr as ScoreCard,Gr as ScoreCardHeader,Rr as ScoreContainer,wr as ScoreDistribution,Ur as ScoreOverviewCard,Mr as ScoreSelect,Wr as ScoreValue,Er as SearchBox,S as SecondaryTabs,Vr as SectionBox,Or as SectionTabs,zr as SeeMoreCard,Qr as SelectBlock,qr as SelectionCard,Jr as SelectionCardGroup,Kr as Separator,Xr as SolidGreyBox,Yr as SpecialTab,So as SpecialTabs,qo as SubMenu,Zr as SuggestionBlock,z as TertiaryToggleButton,q as TertiaryToggleButtonNodeTitle,$r as TextArrowList,_r as TextField,ot as TextTitle,rt as TextTitleGreyIcon,tt as Textarea,l as ThemedPopover,mt as ToggleSwitch,st as TopLinkAction,nt as TrajectoryCards,et as TrajectoryChart,e as Typography,it as TypographyList,pt as UnitConverterPanel,ct as UnsavedChangesDialog,Jo as UserNav,at as ValueDisplay,ft as ValueLabel,jt as ValueSwitcher,lt as WarningBox,dt as WaterfallChart,Bt as WhiteBox,Ct as WhiteGrid,ut as WhitePopover,ht as WhitePopoverOnIcon,gt as WinePilotTheme,Ft as WinepilotThemeOptions,Tt as allColors,kt as allMainColors,Ht as allTypographyVariants,Rt as anyToCheckbox,Ut as barChart,Pt as blueTheme,Mt as breadcrumb,wt as checkboxToAny,nm as components,em as computeSize,St as coralTheme,Wt as countTabs,Et as custom,xt as dataVisualizationColors,Vt as deleteButton,Dt as deprecatedVariants,Ot as doughnutCard,vt as extraColors,zt as formField,o as getThemeLogo,It as greenTheme,yt as greyTheme,im as iconMapping,pm as illustationsMapping,Qt as ingredientCard,r as isTheme,qt as mediaUpload,Jt as numberWithUnit,Kt as numbers,Lt as orangeTheme,bt as redTheme,Xt as scoreCard,Yt as scoreDetail,Zt as scoreOverviewCard,$t as scoreValue,Nt as shadows,cm as spacing,_t as status,om as strokes,rm as tabs,tm as tags,t as themeLogos,m as themeOptions,s as themes,mm as toggleSwitch,sm as tooltip,Gt as typographyConfig,Ro as useFormBaseContext,am as useResponsiveBreakpoints,fm as useResponsivePadding,At as yellowTheme};
|
|
1
|
+
import{getThemeLogo as o,isTheme as r,themeLogos as t,themeOptions as m,themes as s}from"./themes/index.js";import{Button as n,Typography as e}from"@mui/material";import{AccordionProduct as i}from"./components/Accordion/ProductAccordion.js";import{ActionPlanIndicatorBreakdownPopover as p}from"./components/ActionPlan/ActionPlanIndicatorBreakdownPopover.js";import{ActionPlanNetImpactBody as c}from"./components/ActionPlan/ActionPlanNetImpactBody.js";import{AdditionalContentBox as a}from"./components/Box/AdditionalContentBox.js";import{AnchoredPopover as f,HeadlessPopover as j,ThemedPopover as l}from"./components/Popover/AnchoredPopover.js";import{Article as d}from"./components/CMS/ArticleBlock/Article.js";import{ArticlesBox as B}from"./components/CMS/ArticleBlock/ArticlesBox.js";import{Badge as C}from"./components/Badge/Badge.js";import{Banner as u}from"./components/Banner/Banner.js";import{BigPopoverLayout as h}from"./components/Popover/BigPopoverLayout.js";import{BlockItemContainer as g}from"./components/Layout/BlockList/Blocks/Container/BlockItemContainer.js";import{BlockItemInner as F}from"./components/Layout/BlockList/Blocks/Container/BlockItemInner.js";import{BlockListContainer as T}from"./components/Layout/BlockList/BlockListContainer.js";import{BottomSheetDialog as k}from"./components/Dialog/BottomSheetDialog.js";import{BoxStyled as P,SecondaryTabs as S}from"./components/Tabs/SecondaryTabs.js";import{BreadcrumbItem as x}from"./components/Navigation/Breadcrumbs/BreadcrumbItem.js";import{Breadcrumbs as v}from"./components/Navigation/Breadcrumbs/Breadcrumbs.js";import{BreakdownTable as I}from"./components/Chart/BreakdownTable/BreakdownTable.js";import{ButtonTabs as y}from"./components/Tabs/ButtonTabs.js";import{CardImage as L}from"./components/CardImage.js";import{CategoryBox as b}from"./components/Box/CategoryBox.js";import{CheckboxBlock as N}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/CheckboxBlock.js";import{CollectiveTheme as A,CollectiveThemeOptions as H}from"./themes/themes/CollectiveTheme.js";import{ComingSoonBadge as D}from"./components/Badge/ComingSoonBadge.js";import{ComparisonArrow as G}from"./components/ComparisonBlock/ComparisonArrow.js";import{ComparisonBlock as R}from"./components/ComparisonBlock/ComparisonBlock.js";import{ComparisonLabel as w}from"./components/Chart/HistogramComparisonChart/ComparisonLabel.js";import{ConfirmDialog as U}from"./components/Form/FoodsFormBase/ConfirmDialog.js";import{ContextualContentBox as M}from"./components/Box/ContextualContentBox.js";import{CoordinatePopover as W}from"./components/Popover/CoordinatePopover.js";import{CountTabs as E}from"./components/Tabs/CountTabs/CountTabs.js";import{CustomRender as V}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/CustomRender.js";import{CustomToggleButton as O,TertiaryToggleButton as z}from"./components/Button/TertiaryToggleButton.js";import{CustomToggleButtonNodeTitle as Q,TertiaryToggleButtonNodeTitle as q}from"./components/Button/TertiaryToggleButtonNodeTitle.js";import{CustomTypography as J}from"./components/CustomTypography/CustomTypography.js";import{CustomizedAxisTick as K}from"./components/Chart/HistogramComparisonChart/CustomizedAxisTick.js";import{DefaultUserAction as X}from"./components/Navigation/FoodsNavBar/Plugin/DefaultUserAction.js";import{DottedBox as Y}from"./components/Box/DottedBox.js";import{DoughnutCard as Z}from"./components/Cards/DoughnutCard/DoughnutCard.js";import{DoughnutChart as $}from"./components/Chart/DoughnutChart/DoughnutChart.js";import{DrawerAction as _}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/DrawerAction.js";import{EcoScoreCell as oo}from"./components/Grid/Cell/EcoScoreCell.js";import{EditHeader as ro}from"./components/Layout/BlockList/Headers/EditHeader.js";import{EllipsisItem as to}from"./components/Pagination/PageItems/EllipsisItem.js";import{EmptyForm as mo}from"./components/Layout/BlockList/Blocks/InnerInfoBlocks/EmptyForm.js";import{EvolutionChart as so}from"./components/Chart/EvolutionChart/EvolutionChart.js";import{FixedMultiValueFilter as no}from"./components/Filter/FixedMultiValueFilter.js";import{FoodPilotTheme as eo,FoodpilotThemeOptions as io}from"./themes/themes/FoodPilotTheme.js";import{FoodsBadge as po}from"./components/Badge/FoodsBadge.js";import{FoodsCheckbox as co}from"./components/Checkbox/FoodsCheckbox.js";import{FoodsDeleteButton as ao}from"./components/Button/FoodsDeleteButton.js";import{FoodsFormBase as fo}from"./components/Form/FoodsFormBase/FoodsFormBase.js";import{FoodsIcon as jo}from"./components/Icons/FoodsIcon.js";import{FoodsIconButton as lo}from"./components/Button/FoodsIconButton.js";import{FoodsIllustrations as Bo}from"./components/Icons/FoodsIllustrations.js";import{FoodsNavbar as Co}from"./components/Navigation/FoodsNavBar/FoodsNavbar.js";import{FoodsPagination as uo}from"./components/Pagination/FoodsPagination.js";import{FoodsPaginationItem as ho}from"./components/Pagination/FoodsPaginationItem.js";import{FoodsRadioList as go}from"./components/Radio/FoodsRadioList.js";import{FoodsSearch as Fo}from"./components/Search/FoodsSearch.js";import{FoodsSelect as To,FoodsSelectServerPagination as ko}from"./components/Select/FoodsSelect/FoodsSelect.js";import{FoodsTabs as Po,SpecialTabs as So}from"./components/Tabs/FoodsTabs/FoodsTabs.js";import{FoodsTags as xo}from"./components/Tags/FoodsTags.js";import{FoodsTextInput as vo}from"./components/Form/FoodsFormFields/FoodsTextInput.js";import{FoodsThemeOptionsProvider as Io,FoodsThemeProvider as yo}from"./themes/FoodsThemeProvider.js";import{FoodsToggleButton as Lo}from"./components/Button/FoodsToggleButton.js";import{FoodsTooltip as bo}from"./components/Tooltip/FoodsTooltip.js";import{FoodsTreeview as No}from"./components/Treeview/Treeview.js";import{FoodsUserTags as Ao}from"./components/Tags/FoodsUserTags.js";import{FormAccordion as Ho}from"./components/Accordion/FormAccordion.js";import{FormBase as Do}from"./components/Form/FormBase.js";import{FormBaseContextProvider as Go,useFormBaseContext as Ro}from"./components/Form/FoodsFormBase/FormBaseContext.js";import{FormBox as wo}from"./components/Form/FormBox.js";import{FormPropertyBox as Uo}from"./components/Form/FormPropertyBox.js";import{FormTopBar as Mo}from"./components/Form/FoodsFormBase/FormTopBar/FormTopBar.js";import{FormUnit as Wo}from"./components/Form/FormUnit.js";import{GenericAccordion as Eo}from"./components/Accordion/GenericAccordion.js";import{GreyTextCell as Vo}from"./components/Grid/Cell/GreyCell.js";import{HeaderNav as Oo,NavBarLink as zo,Navbar as Qo,SubMenu as qo,UserNav as Jo}from"./components/Navigation/Navbar.js";import{HelperBox as Ko}from"./components/Box/HelperBox.js";import{HeroBlock as Xo}from"./components/CMS/HeroBlock/HeroBlock.js";import{HistogramComparisonChart as Yo}from"./components/Chart/HistogramComparisonChart/HistogramComparisonChart.js";import{HorizontalGaugeChart as Zo}from"./components/Chart/HorizontalGauge/HorizontalGaugeChart.js";import{IconThread as $o}from"./components/Navigation/IconThread.js";import{IndicatorBlock as _o}from"./components/CMS/IndicatorBlock/IndicatorBlock.js";import{InfoBox as or}from"./components/Box/InfoBox.js";import{InfoHeaderWithIllustration as rr}from"./components/Layout/InfoHeaderWithIllustration.js";import{InitHeader as tr}from"./components/Layout/BlockList/Headers/InitHeader.js";import{LeftComparisonPart as mr}from"./components/Layout/BlockList/Blocks/Common/LeftComparisonPart.js";import{LightIndicatorBlock as sr}from"./components/CMS/IndicatorBlock/LightIndicatorBlock.js";import{LineGroupBox as nr}from"./components/Box/LineGroupBox.js";import{LinearProgress as er}from"./components/LinearProgress.js";import{LinkAction as ir}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/LinkAction.js";import{ListHeader as pr}from"./components/Layout/BlockList/Headers/ListHeader.js";import{MRTGrid as cr}from"./components/Grid/MRTGrid.js";import{MRT_GRID_HUB_LAYOUT as ar}from"./components/Grid/mrtGridLayout.js";import{MultiValueFilter as fr}from"./components/Filter/MultiValueFilter.js";import{NumberField as jr}from"./components/Field/NumberField.js";import{NumberWithUnit as lr}from"./components/Number/NumberWithUnit.js";import{OptionsPopover as dr}from"./components/Popover/OptionsPopover.js";import{PageItem as Br}from"./components/Pagination/PageItems/PageItem.js";import{PageUpAndDownItem as Cr}from"./components/Pagination/PageItems/PageUpAndDownItem.js";import{FoodsPills as ur}from"./components/Input/Pills/Pills.js";import{PointsCell as hr}from"./components/Grid/Cell/PointsCell.js";import{PolymorphicChart as gr}from"./components/Chart/PolymorphicChart/PolymorphicChart.js";import{PolymorphicChartRenderer as Fr}from"./components/Chart/PolymorphicChart/PolymorphicChartRenderer.js";import{PrimaryCheckbox as Tr}from"./components/Checkbox/PrimaryCheckbox.js";import{PrimaryDialog as kr}from"./components/Dialog/PrimaryDialog.js";import{Progress as Pr}from"./components/Progress/Progress.js";import{ProgressCard as Sr}from"./components/ProgressCard/ProgressCard.js";import{QuoteBox as xr}from"./components/Box/QuoteBox.js";import{RadioBlock as vr}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/RadioBlock.js";import{RadioBoolean as Ir}from"./components/Radio/RadioBoolean.js";import{RadioList as yr}from"./components/Radio/RadioList.js";import{RichTextEditor as Lr}from"./components/RichTextEditor/RichTextEditor.js";import{RoundInput as br}from"./components/Input/RoundInput.js";import{RoundNumberInput as Nr}from"./components/Input/RoundNumberInput.js";import{ScatterPlot as Ar}from"./components/Chart/ScatterPlot/ScatterPlot.js";import{Score as Hr}from"./components/Number/Score.js";import{ScoreCard as Dr}from"./components/Cards/ScoreCard/ScoreCard.js";import{ScoreCardHeader as Gr}from"./components/Cards/ScoreCard/Header/ScoreCardHeader.js";import{ScoreContainer as Rr}from"./components/Badge/ScoreContainer.js";import{ScoreDistribution as wr}from"./components/Chart/ScoreDistribution/ScoreDistribution.js";import{ScoreOverviewCard as Ur}from"./components/Cards/ScoreOverviewCard/ScoreOverviewCard.js";import{ScoreSelect as Mr}from"./components/Select/ScoreSelect/ScoreSelect.js";import{ScoreValue as Wr}from"./components/Number/ScoreValue.js";import{SearchBox as Er}from"./components/Input/SearchBox.js";import{SectionBox as Vr}from"./components/Box/SectionBox.js";import{SectionTabs as Or}from"./components/Tabs/SectionTabs/SectionTabs.js";import{SeeMoreCard as zr}from"./components/Cards/SeeMoreCard/SeeMoreCard.js";import{SelectBlock as Qr}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/SelectBlock.js";import{SelectionCard as qr}from"./components/Cards/SelectionCard/SelectionCard.js";import{SelectionCardGroup as Jr}from"./components/Cards/SelectionCard/SelectionCardGroup.js";import{Separator as Kr}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/Separator.js";import{SolidGreyBox as Xr}from"./components/Box/SolidGreyBox.js";import{SpecialTab as Yr}from"./components/Tabs/FoodsTabs/FoodsTabTemplate.js";import{SuggestionBlock as Zr}from"./components/Layout/BlockList/Blocks/InnerInfoBlocks/SuggestionBlock.js";import{TextArrowList as $r}from"./components/Text/TextArrowList.js";import{TextField as _r}from"./components/Field/TextField.js";import{TextTitle as ot}from"./components/Text/TextTitle.js";import{TextTitleGreyIcon as rt}from"./components/Text/TextTitleGreyIcon.js";import{Textarea as tt}from"./components/Textarea/Textarea.js";import{ToggleSwitch as mt}from"./components/ToggleSwitch/ToggleSwitch.js";import{TopLinkAction as st}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/TopLinkAction.js";import{TrajectoryCards as nt}from"./components/Cards/TrajectoryCards/TrajectoryCards.js";import{TrajectoryChart as et}from"./components/Chart/TrajectoryChart/TrajectoryChart.js";import{TypographyList as it}from"./components/CustomTypography/TypographyList.js";import{UnitConverterPanel as pt}from"./components/UnitConverterPanel/UnitConverterPanel.js";import{UnsavedChangesDialog as ct}from"./components/Dialog/UnsavedChangesDialog.js";import{ValueDisplay as at}from"./components/Layout/BlockList/Blocks/Common/ValueDisplay.js";import{ValueLabel as ft}from"./components/Chart/HistogramComparisonChart/ValueLabel.js";import{ValueSwitcher as jt}from"./components/Cards/ScoreCard/Header/ValueSwitcher/ValueSwitcher.js";import{WarningBox as lt}from"./components/Box/WarningBox.js";import{WaterfallChart as dt}from"./components/Chart/WaterfallChart/WaterfallChart.js";import{WhiteBox as Bt}from"./components/Box/WhiteBox.js";import{WhiteGrid as Ct}from"./components/Box/WhiteGrid.js";import{WhitePopover as ut}from"./components/Popover/WhitePopover.js";import{WhitePopoverOnIcon as ht}from"./components/Popover/WhitePopoverOnIcon.js";import{WinePilotTheme as gt,WinepilotThemeOptions as Ft}from"./themes/themes/WinePilotTheme.js";import{allColors as Tt,allMainColors as kt,blueTheme as Pt,coralTheme as St,dataVisualizationColors as xt,extraColors as vt,greenTheme as It,greyTheme as yt,orangeTheme as Lt,redTheme as bt,shadows as Nt,yellowTheme as At}from"./themes/common/colors.js";import{allTypographyVariants as Ht,deprecatedVariants as Dt,typographyConfig as Gt}from"./themes/common/MUIComponents/typography.js";import{anyToCheckbox as Rt,checkboxToAny as wt}from"./components/Checkbox/helperFunctions.js";import{barChart as Ut,breadcrumb as Mt,countTabs as Wt,custom as Et,deleteButton as Vt,doughnutCard as Ot,formField as zt,ingredientCard as Qt,mediaUpload as qt,numberWithUnit as Jt,numbers as Kt,scoreCard as Xt,scoreDetail as Yt,scoreOverviewCard as Zt,scoreValue as $t,select as _t,status as om,strokes as rm,tabs as tm,tags as mm,textArea as sm,textInput as nm,toggleSwitch as em,tooltip as im}from"./themes/common/custom.js";import{components as pm}from"./themes/common/components.js";import{computeSize as cm,iconMapping as am}from"./components/Icons/iconConfig.js";import{illustationsMapping as fm}from"./components/Icons/illustrationsConfig.js";import{spacing as jm}from"./themes/common/spacing.js";import{useResponsiveBreakpoints as lm}from"./themes/responsive/useResponsiveBreakpoints.js";import{useResponsivePadding as dm}from"./themes/responsive/useResponsivePadding.js";export{i as AccordionProduct,p as ActionPlanIndicatorBreakdownPopover,c as ActionPlanNetImpactBody,a as AdditionalContentBox,f as AnchoredPopover,d as Article,B as ArticlesBox,C as Badge,u as Banner,h as BigPopoverLayout,g as BlockItemContainer,F as BlockItemInner,T as BlockListContainer,k as BottomSheetDialog,P as BoxStyled,x as BreadcrumbItem,v as Breadcrumbs,I as BreakdownTable,n as Button,y as ButtonTabs,L as CardImage,b as CategoryBox,N as CheckboxBlock,A as CollectiveTheme,H as CollectiveThemeOptions,D as ComingSoonBadge,G as ComparisonArrow,R as ComparisonBlock,w as ComparisonLabel,U as ConfirmDialog,M as ContextualContentBox,W as CoordinatePopover,E as CountTabs,V as CustomRender,O as CustomToggleButton,Q as CustomToggleButtonNodeTitle,J as CustomTypography,K as CustomizedAxisTick,X as DefaultUserAction,Y as DottedBox,Z as DoughnutCard,$ as DoughnutChart,_ as DrawerAction,oo as EcoScoreCell,ro as EditHeader,to as EllipsisItem,mo as EmptyForm,so as EvolutionChart,no as FixedMultiValueFilter,eo as FoodPilotTheme,io as FoodpilotThemeOptions,po as FoodsBadge,co as FoodsCheckbox,ao as FoodsDeleteButton,fo as FoodsFormBase,jo as FoodsIcon,lo as FoodsIconButton,Bo as FoodsIllustrations,Co as FoodsNavbar,uo as FoodsPagination,ho as FoodsPaginationItem,go as FoodsRadioList,Fo as FoodsSearch,To as FoodsSelect,ko as FoodsSelectServerPagination,Po as FoodsTabs,xo as FoodsTags,vo as FoodsTextInput,Io as FoodsThemeOptionsProvider,yo as FoodsThemeProvider,Lo as FoodsToggleButton,bo as FoodsTooltip,No as FoodsTreeview,Ao as FoodsUserTags,Ho as FormAccordion,Do as FormBase,Go as FormBaseContextProvider,wo as FormBox,Uo as FormPropertyBox,Mo as FormTopBar,Wo as FormUnit,Eo as GenericAccordion,Vo as GreyTextCell,Oo as HeaderNav,j as HeadlessPopover,Ko as HelperBox,Xo as HeroBlock,Yo as HistogramComparisonChart,Zo as HorizontalGaugeChart,$o as IconThread,_o as IndicatorBlock,or as InfoBox,rr as InfoHeaderWithIllustration,tr as InitHeader,mr as LeftComparisonPart,sr as LightIndicatorBlock,nr as LineGroupBox,er as LinearProgress,ir as LinkAction,pr as ListHeader,cr as MRTGrid,ar as MRT_GRID_HUB_LAYOUT,fr as MultiValueFilter,zo as NavBarLink,Qo as Navbar,jr as NumberField,lr as NumberWithUnit,dr as OptionsPopover,Br as PageItem,Cr as PageUpAndDownItem,ur as Pills,hr as PointsCell,gr as PolymorphicChart,Fr as PolymorphicChartRenderer,Tr as PrimaryCheckbox,kr as PrimaryDialog,Pr as Progress,Sr as ProgressCard,xr as QuoteBox,vr as RadioBlock,Ir as RadioBoolean,yr as RadioList,Lr as RichTextEditor,br as RoundInput,Nr as RoundNumberInput,Ar as ScatterPlot,Hr as Score,Dr as ScoreCard,Gr as ScoreCardHeader,Rr as ScoreContainer,wr as ScoreDistribution,Ur as ScoreOverviewCard,Mr as ScoreSelect,Wr as ScoreValue,Er as SearchBox,S as SecondaryTabs,Vr as SectionBox,Or as SectionTabs,zr as SeeMoreCard,Qr as SelectBlock,qr as SelectionCard,Jr as SelectionCardGroup,Kr as Separator,Xr as SolidGreyBox,Yr as SpecialTab,So as SpecialTabs,qo as SubMenu,Zr as SuggestionBlock,z as TertiaryToggleButton,q as TertiaryToggleButtonNodeTitle,$r as TextArrowList,_r as TextField,ot as TextTitle,rt as TextTitleGreyIcon,tt as Textarea,l as ThemedPopover,mt as ToggleSwitch,st as TopLinkAction,nt as TrajectoryCards,et as TrajectoryChart,e as Typography,it as TypographyList,pt as UnitConverterPanel,ct as UnsavedChangesDialog,Jo as UserNav,at as ValueDisplay,ft as ValueLabel,jt as ValueSwitcher,lt as WarningBox,dt as WaterfallChart,Bt as WhiteBox,Ct as WhiteGrid,ut as WhitePopover,ht as WhitePopoverOnIcon,gt as WinePilotTheme,Ft as WinepilotThemeOptions,Tt as allColors,kt as allMainColors,Ht as allTypographyVariants,Rt as anyToCheckbox,Ut as barChart,Pt as blueTheme,Mt as breadcrumb,wt as checkboxToAny,pm as components,cm as computeSize,St as coralTheme,Wt as countTabs,Et as custom,xt as dataVisualizationColors,Vt as deleteButton,Dt as deprecatedVariants,Ot as doughnutCard,vt as extraColors,zt as formField,o as getThemeLogo,It as greenTheme,yt as greyTheme,am as iconMapping,fm as illustationsMapping,Qt as ingredientCard,r as isTheme,qt as mediaUpload,Jt as numberWithUnit,Kt as numbers,Lt as orangeTheme,bt as redTheme,Xt as scoreCard,Yt as scoreDetail,Zt as scoreOverviewCard,$t as scoreValue,_t as select,Nt as shadows,jm as spacing,om as status,rm as strokes,tm as tabs,mm as tags,sm as textArea,nm as textInput,t as themeLogos,m as themeOptions,s as themes,em as toggleSwitch,im as tooltip,Gt as typographyConfig,Ro as useFormBaseContext,lm as useResponsiveBreakpoints,dm as useResponsivePadding,At as yellowTheme};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{alpha as o}from"@mui/material";import{isTagVariant as r,getTagStyle as e}from"./MUIComponents/tagsStyles.js";const t={MuiDialog:{styleOverrides:{paper:{borderRadius:"1rem"}}},MuiAutocomplete:{styleOverrides:{root:()=>({})}},MuiAvatar:{defaultProps:{children:[]},styleOverrides:{root:({theme:o,ownerState:{alt:r=""}})=>{const e=r.split(" ").map(o=>o.charAt(0).toUpperCase()).join("");return{background:o.palette.primary[100],color:o.palette.primary[700],fontWeight:600,".MuiAvatar-img":{zIndex:1},":empty::before":{content:`"${e}"`}}}},variants:[{props:{variant:"small"},style:{width:"24px",height:"24px",fontSize:"10px"}},{props:{variant:"medium"},style:{width:"36px",height:"36px",fontSize:"13px"}},{props:{variant:"big"},style:{width:"40px",height:"40px",fontSize:"16px"}}]},MuiAvatarGroup:{defaultProps:{variant:"small",spacing:6,sx:{justifyContent:"flex-end"},slotProps:{additionalAvatar:{sx:{color:o=>o.custom.grey[2800],background:o=>o.custom.grey[400]}}}},styleOverrides:{root:({ownerState:{max:o=0}})=>({...[...Array(o)].reduce((r,e,t)=>({...r,[`& > .MuiAvatar-root:nth-of-type(${t+1})`]:{zIndex:o-t}}),{})})}},MuiButtonGroup:{defaultProps:{disableRipple:!0}},MuiButton:{defaultProps:{disableRipple:!0,loadingPosition:"start"},styleOverrides:{root:({theme:t,ownerState:
|
|
1
|
+
import{alpha as o}from"@mui/material";import{isTagVariant as r,getTagStyle as e}from"./MUIComponents/tagsStyles.js";const t={MuiDialog:{styleOverrides:{paper:{borderRadius:"1rem"}}},MuiAutocomplete:{styleOverrides:{root:()=>({})}},MuiAvatar:{defaultProps:{children:[]},styleOverrides:{root:({theme:o,ownerState:{alt:r=""}})=>{const e=r.split(" ").map(o=>o.charAt(0).toUpperCase()).join("");return{background:o.palette.primary[100],color:o.palette.primary[700],fontWeight:600,".MuiAvatar-img":{zIndex:1},":empty::before":{content:`"${e}"`}}}},variants:[{props:{variant:"small"},style:{width:"24px",height:"24px",fontSize:"10px"}},{props:{variant:"medium"},style:{width:"36px",height:"36px",fontSize:"13px"}},{props:{variant:"big"},style:{width:"40px",height:"40px",fontSize:"16px"}}]},MuiAvatarGroup:{defaultProps:{variant:"small",spacing:6,sx:{justifyContent:"flex-end"},slotProps:{additionalAvatar:{sx:{color:o=>o.custom.grey[2800],background:o=>o.custom.grey[400]}}}},styleOverrides:{root:({ownerState:{max:o=0}})=>({...[...Array(o)].reduce((r,e,t)=>({...r,[`& > .MuiAvatar-root:nth-of-type(${t+1})`]:{zIndex:o-t}}),{})})}},MuiButtonGroup:{defaultProps:{disableRipple:!0}},MuiButton:{defaultProps:{disableRipple:!0,loadingPosition:"start"},styleOverrides:{root:({theme:t,ownerState:d})=>{const n=d.variant,a=d.variant?.startsWith("dataviz");if(a){const o=parseInt((n??"").split("-")[1]),r=t.custom.dataviz.colorsWithExtra[o];if(void 0!==r)return{textTransform:"none",fontSize:"0.9rem",lineHeight:"1rem",borderRadius:t.spacing(1),height:"40px",fontWeight:700,transition:"none",color:t.custom.grey[100],boxShadow:"0px 4px 8px 0px #2A2B2714",background:r.main,":hover":{background:r.variant[700]},":disabled":!0===d.loading?{color:"center"===d.loadingPosition?"transparent":t.custom.grey[100],background:r.main}:{background:r.variant[100]},":active":{background:r.variant[700]}}}const i={..."primary"===n&&{transition:"none",background:`linear-gradient(${t.palette.primary[400]}, ${t.palette.primary[600]})`,color:t.custom.grey[100],boxShadow:"0px 4px 8px 0px #2A2B2714"},..."secondary"===n&&{border:`1px solid ${t.custom.grey[500]}`,background:`linear-gradient(${t.custom.grey[100]}}, ${t.custom.grey[300]})`},..."ternary"===n&&{border:`1px solid ${t.custom.grey[500]}`,background:t.custom.grey.gradientLight},..."text"===n&&{transition:"none",paddingInline:"0",color:t.palette.primary[700],fontWeight:"700"},..."selected-menu"===n&&{color:"white",background:`linear-gradient(${t.palette.primary[400]}, ${t.palette.primary[600]})`,borderRadius:"8px",padding:0},..."selected-submenu"===n&&{color:"white",backgroundColor:t.custom.grey[2300],background:t.custom.grey[2300],borderRadius:"8px",padding:0},..."default-menu"===n&&{color:t.custom.grey[100],background:"inherit",borderRadius:"8px",padding:0},..."black-text"===n&&{color:t.custom.grey[2800],background:"none",fontWeight:"600"},..."black-filled"===n&&{borderRadius:"8px",background:`linear-gradient(180deg, ${t.custom.grey[2600]} 0%, ${t.custom.grey[3e3]} 100%)`,boxShadow:"0px 4px 8px 0px rgba(42, 43, 39, 0.08)",color:t.custom.grey[100]},..."white-filled"===n&&{borderRadius:"8px",border:"1px solid "+t.custom.grey[500],background:`linear-gradient(180deg, ${t.custom.grey[100]} 0%, ${t.custom.grey[200]} 100%)`,boxShadow:" 0px 2px 8px 0px rgba(42, 43, 39, 0.04)"},..."white-filled-no-shadow"===n&&{borderRadius:"44px",border:`1px solid ${t.custom.grey[500]}`,background:`linear-gradient(180deg, ${t.custom.grey[100]} 0%, ${t.custom.grey[200]} 100%)`},..."select"===n&&{backgroundColor:t.custom.select.background,borderRadius:t.spacing(1),border:`1px solid ${t.custom.select.border}`},..."validate"===n&&{color:"#FFFFFF",transition:"none",background:`linear-gradient(180deg, ${t.custom.green[500]} 0%, ${t.custom.green[700]} 100%)`},..."delete"===n&&{color:"#FFFFFF",transition:"none",background:`${t.custom.red[600]}`},..."error"===n&&{transition:"none",paddingInline:"0",color:t.custom.red[600],fontWeight:"600"},..."delete-outline"===n&&{color:t.custom.red[600],transition:"none",background:"transparent",border:`1px solid ${t.custom.red[600]}`}};return{textTransform:"none",fontSize:"0.9rem",lineHeight:"1rem",borderRadius:t.spacing(1),height:"40px",fontWeight:700,...i,...!0===d.loading&&("text"===n||"error"===n)&&{"& .MuiButton-loadingIndicator":{left:0}},":hover":{..."primary"===n&&{background:t.palette.primary[600]},..."secondary"===n&&{background:t.custom.grey[400]},..."ternary"===n&&{border:`1px solid ${t.custom.grey[500]}`,background:t.custom.grey[400]},..."text"===n&&{background:"none",textDecoration:"underline"},..."select"===n&&{backgroundColor:t.custom.select.hoverBackground},..."default-menu"===n&&{backgroundColor:t.custom.grey[2500],borderRadius:"8px"},..."selected-menu"===n&&{borderRadius:"8px"},..."selected-submenu"===n&&{borderRadius:"8px"},..."validate"===n&&{background:t.custom.green[600]},..."delete"===n&&{background:t.custom.red[700]},..."error"===n&&{color:t.custom.red[900]},..."delete-outline"===n&&{background:t.custom.red[100],borderColor:t.custom.red[700],color:t.custom.red[700]}},":disabled":!0===d.loading?{color:"inherit",...i,..."center"===d.loadingPosition&&{color:"transparent"}}:{..."primary"===n&&{color:t.custom.grey[100],background:o(t.palette.primary[600]??"",.36)},..."secondary"===n&&{color:o(t.custom.grey[2800],.36),border:`1px solid ${o(t.custom.grey[500],.36)}`,background:t.custom.grey[100]},..."ternary"===n&&{border:`1px solid ${t.custom.grey[100]}`,background:t.custom.grey[500]},..."select"===n&&{backgroundColor:t.custom.select.disabledBackground,color:t.custom.select.disabledText},..."default-menu"===n&&{color:t.custom.grey[2300],borderRadius:"8px"},..."selected-menu"===n&&{color:t.custom.grey[2300],borderRadius:"8px"},..."selected-submenu"===n&&{color:t.custom.grey[2300],borderRadius:"8px"},..."validate"===n&&{background:o(t.custom.green[500],.36),color:"#FFFFFF"},..."delete"===n&&{background:t.custom.red[100],color:o(t.custom.red[600],.36)},..."error"===n&&{color:o(t.custom.red[700],.36)},..."delete-outline"===n&&{color:o(t.custom.red[600],.36),borderColor:o(t.custom.red[600],.36),background:"transparent"}},":active":{..."primary"===n&&{background:t.palette.primary[800]},..."secondary"===n&&{background:t.custom.grey[400]},..."secondary"===n&&{background:t.custom.grey[600]},..."default-menu"===n&&{backgroundColor:t.custom.grey[2e3],borderRadius:"8px"},..."selected-menu"===n&&{backgroundColor:t.custom.grey[2700],borderRadius:"8px"},..."selected-submenu"===n&&{borderRadius:"8px"},..."validate"===n&&{background:t.custom.green[800]},..."delete"===n&&{background:t.custom.red[800]},..."delete-outline"===n&&{background:t.custom.red[100],borderColor:t.custom.red[800]}},...r(n)&&e(n,t,d),..."icon-xs-nobackground"===n&&{padding:t.spacing(.5),minWidth:"auto",width:"24px",height:"24px",color:t.custom.grey[2800],backgroundColor:"inherit",borderRadius:"32px",":hover":{backgroundColor:t.custom.grey[600]},":active":{backgroundColor:t.custom.grey[1e3]},":disabled":{backgroundColor:"inherit",color:t.custom.grey[1400]}},..."icon-s-nobackground"===n&&{padding:t.spacing(1),minWidth:"auto",width:"36px",height:"36px",color:t.custom.grey[2800],backgroundColor:"inherit",borderRadius:"32px",":hover":{backgroundColor:t.custom.grey[600]},":active":{backgroundColor:t.custom.grey[1e3]},":disabled":{backgroundColor:"inherit",color:t.custom.grey[1400]}},..."icon-m-nobackground"===n&&{padding:t.spacing(1),minWidth:"auto",width:"44px",height:"44px",color:t.custom.grey[2800],backgroundColor:"inherit",borderRadius:"32px",":hover":{backgroundColor:t.custom.grey[600]},":active":{backgroundColor:t.custom.grey[1e3]},":disabled":{backgroundColor:"inherit",color:t.custom.grey[1400]}},..."icon-xs-withbackground"===n&&{padding:t.spacing(.5),minWidth:"auto",width:"24px",height:"24px",color:t.custom.grey[2800],background:"linear-gradient(180deg, #FFFFFF 0%, #F6F5F3 154.5%)",border:`1px solid ${t.custom.grey[500]}`,borderRadius:"32px",":hover":{background:"none",backgroundColor:t.custom.grey[400]},":active":{background:"none",backgroundColor:t.custom.grey[600],border:"none"},":disabled":{background:"none",backgroundColor:t.custom.grey[100],color:t.custom.grey[1400]}},..."icon-s-withbackground"===n&&{padding:t.spacing(1),minWidth:"auto",width:"36px",height:"36px",color:t.custom.grey[2800],background:"linear-gradient(180deg, #FFFFFF 0%, #F6F5F3 154.5%)",border:`1px solid ${t.custom.grey[500]}`,borderRadius:"32px",":hover":{background:"none",backgroundColor:t.custom.grey[400]},":active":{background:"none",backgroundColor:t.custom.grey[600],border:"none"},":disabled":{background:"none",backgroundColor:t.custom.grey[100],color:t.custom.grey[1400]}},..."icon-m-withbackground"===n&&{padding:t.spacing(1),minWidth:"auto",width:"44px",height:"44px",color:t.custom.grey[2800],background:"linear-gradient(180deg, #FFFFFF 0%, #F6F5F3 154.5%)",border:`1px solid ${t.custom.grey[500]}`,borderRadius:"32px",":hover":{background:"none",backgroundColor:t.custom.grey[400]},":active":{background:"none",backgroundColor:t.custom.grey[600],border:"none"},":disabled":{background:"none",backgroundColor:t.custom.grey[100],color:t.custom.grey[1400]}}}}}},MuiButtonBase:{styleOverrides:{root:{borderRadius:"15px"}}},MuiCircularProgress:{styleOverrides:{root:({theme:o,ownerState:r})=>({..."inherit"!==r.color&&{color:o.custom.grey[800]}})}},MuiIconButton:{styleOverrides:{root:({theme:o})=>({height:"44px",width:"44px",color:o.custom.grey[2800],backgroundColor:"inherit",":hover":{backgroundColor:o.custom.grey[600]},":focus":{backgroundColor:o.custom.grey[1e3]},":disabled":{backgroundColor:"inherit",color:o.custom.grey[1400]}})}},MuiChip:{styleOverrides:{root:({theme:o,ownerState:r})=>({paddingTop:o.spacing(.5),paddingRight:o.spacing(.5),paddingBottom:o.spacing(.5),paddingLeft:o.spacing(1),..."brand"===r.variant&&{backgroundColor:o.palette.primary[50]},..."neutral"===r.variant&&{backgroundColor:o.custom.grey[300]}})}}};export{t as components};
|
|
@@ -161,6 +161,52 @@ export declare const formField: {
|
|
|
161
161
|
readonly optionWidth: "130px";
|
|
162
162
|
};
|
|
163
163
|
};
|
|
164
|
+
/** Figma Text input component set `133:2958`. */
|
|
165
|
+
export declare const textInput: {
|
|
166
|
+
readonly desktopHeight: "40px";
|
|
167
|
+
readonly mobileHeight: "48px";
|
|
168
|
+
readonly fixedWidth: {
|
|
169
|
+
readonly desktop: "300px";
|
|
170
|
+
readonly mobile: "220px";
|
|
171
|
+
};
|
|
172
|
+
readonly mobileResetHeight: "40px";
|
|
173
|
+
};
|
|
174
|
+
/** Figma Text area component set `3660:814`. */
|
|
175
|
+
export declare const textArea: {
|
|
176
|
+
readonly minHeight: "200px";
|
|
177
|
+
readonly padding: "16px";
|
|
178
|
+
readonly borderRadius: "12px";
|
|
179
|
+
readonly footerGap: "8px";
|
|
180
|
+
readonly mobileFontSize: "16px";
|
|
181
|
+
readonly mobileCounterFontSize: "14px";
|
|
182
|
+
readonly errorFontSize: "12px";
|
|
183
|
+
};
|
|
184
|
+
/** Figma Select component set `4004:7072`, single-selection field. */
|
|
185
|
+
export declare const select: {
|
|
186
|
+
readonly desktopWidth: "300px";
|
|
187
|
+
readonly desktopHeight: "40px";
|
|
188
|
+
readonly desktopResetGap: "16px";
|
|
189
|
+
readonly desktopResetActionWidth: "44px";
|
|
190
|
+
readonly mobileHeight: "48px";
|
|
191
|
+
readonly mobileResetHeight: "40px";
|
|
192
|
+
readonly mobileResetFontSize: "14px";
|
|
193
|
+
readonly desktopValueFontSize: "14px";
|
|
194
|
+
readonly mobileValueFontSize: "16px";
|
|
195
|
+
readonly desktopSupportingFontSize: "12px";
|
|
196
|
+
readonly mobileSupportingFontSize: "14px";
|
|
197
|
+
readonly border: "#E0DEDD";
|
|
198
|
+
readonly background: "#FFFFFF";
|
|
199
|
+
readonly hoverBackground: "#F6F5F3";
|
|
200
|
+
readonly disabledBackground: "#E7E6E4";
|
|
201
|
+
readonly selectedText: "#50504D";
|
|
202
|
+
readonly placeholderText: "#767673";
|
|
203
|
+
readonly errorPlaceholderText: "#393A36";
|
|
204
|
+
readonly disabledText: "#A3A2A0";
|
|
205
|
+
readonly defaultText: "#767673";
|
|
206
|
+
readonly errorBackground: "#FFE4DE";
|
|
207
|
+
readonly errorBorder: "#D03210";
|
|
208
|
+
readonly errorText: "#D03210";
|
|
209
|
+
};
|
|
164
210
|
/**
|
|
165
211
|
* Shared bar-chart geometry.
|
|
166
212
|
* Figma provenance: zero-value Product life-cycle segments `13154:221949`
|
|
@@ -472,6 +518,9 @@ type CustomThemeKeys = {
|
|
|
472
518
|
scoreValue: typeof scoreValue;
|
|
473
519
|
numberWithUnit: typeof numberWithUnit;
|
|
474
520
|
formField: typeof formField;
|
|
521
|
+
textInput: typeof textInput;
|
|
522
|
+
textArea: typeof textArea;
|
|
523
|
+
select: typeof select;
|
|
475
524
|
barChart: typeof barChart;
|
|
476
525
|
mediaUpload: typeof mediaUpload;
|
|
477
526
|
tags: typeof tags;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"i18next";import{greyTheme as i,shadows as
|
|
1
|
+
import e from"i18next";import{greyTheme as i,shadows as o,redTheme as r,allMainColors as t,allColors as d,extraColors as a,dataVisualizationColors as p,coralTheme as n,blueTheme as x,yellowTheme as h,orangeTheme as l,greenTheme as c}from"./colors.js";const s={containerDivider:{color:i[600],style:"solid",width:"1px"}},g={width:"300px"},u={green:{surface:"#F2FFF9"}},b={surface:"#025155",emptyGuidanceForeground:"#EDF9FA",loading:{opacity:.7,transition:"opacity 120ms ease-out"}},m={width:"300px",heights:{inactive:"215px",selected:"231px"},icon:{containerSize:"48px",glyphSize:{width:40,height:40}},carouselControl:{inlineEndOffset:"-5px"},details:{chartHeight:"481px"}},w={stroke:{...s.containerDivider,color:"#E5E3E0"}},k={emptyIndicator:{size:"44px",iconSize:{width:26,height:26}},inline:{width:"70px"}},y={emptyIndicator:{micro:{size:"20px",iconSize:{width:11,height:11}},small:{size:"24px",iconSize:{width:13,height:13}},inter:{size:"30px",iconSize:{width:20,height:20}},big:{size:"38px",iconSize:{width:28,height:28}}},unitOffset:{compact:"-1px",regular:"-2px"}},S={compact:{width:"100px",optionWidth:"130px"}},z={desktopHeight:"40px",mobileHeight:"48px",fixedWidth:{desktop:"300px",mobile:"220px"},mobileResetHeight:"40px"},v={minHeight:"200px",padding:"16px",borderRadius:"12px",footerGap:"8px",mobileFontSize:"16px",mobileCounterFontSize:"14px",errorFontSize:"12px"},f={desktopWidth:"300px",desktopHeight:"40px",desktopResetGap:"16px",desktopResetActionWidth:"44px",mobileHeight:"48px",mobileResetHeight:"40px",mobileResetFontSize:"14px",desktopValueFontSize:"14px",mobileValueFontSize:"16px",desktopSupportingFontSize:"12px",mobileSupportingFontSize:"14px",border:i[600],background:i[100],hoverBackground:i[300],disabledBackground:i[500],selectedText:i[2500],placeholderText:i[2e3],errorPlaceholderText:i[2800],disabledText:i[1400],defaultText:i[2e3],errorBackground:r[100],errorBorder:r[600],errorText:r[600]},B={zeroValueWidth:"1px"},$={borderRadius:"8px",loadingIndicatorSize:28,errorMaxWidth:"260px",default:{size:120,stroke:s.containerDivider,emptyCopy:{typographyVariant:"body-regular",lineHeight:1.3}},compact:{size:110,contentInset:"6px",stroke:{...s.containerDivider,style:"dashed"},boxShadow:o.grey,emptyCopy:{width:"76px",typographyVariant:"small-regular"}},thumbnail:{size:70,contentInset:"4px",stroke:s.containerDivider,boxShadow:o.grey}},R={display:{height:"26px"}},C={gap:"8px",minHeight:"36px",padding:"8px 12px",borderRadius:"8px",focusRing:{color:i[2800],width:"2px",offset:"2px"},separatorPaddingInline:"4px",loadingWidth:24,loadingSelectedOpacity:.3,default:{background:`linear-gradient(180deg, ${i[100]} 0%, ${i[300]} 154.5%)`,hoverBackground:`linear-gradient(180deg, ${i[100]} 0%, ${i[400]} 154.5%)`,borderColor:i[500],boxShadow:o.grey,color:i[2800]},selected:{background:`linear-gradient(180deg, ${i[2600]} 0%, ${i[3e3]} 100%)`,hoverBackground:i[2800],borderColor:i[2800],boxShadow:o.hard,color:i[100]}},F={primary:{height:"60px"},secondary:{height:"60px"}},W={summaryWidth:"250px",barWidth:"250px",lifecycleBreakdownWidth:"364px",subscoreBreakdownWidth:"346px",impactBreakdownWidth:"318px",impactZeroBreakdownWidth:"292px",impactBenefitBreakdownWidth:"551px"},D={handleBorderRadius:"50%",legacyTrackBackground:"rgba(0,0,0,.25)",sizes:{default:{width:"52px",height:"28px",thumbSize:"20px",thumbInset:"4px",thumbTravel:"24px",trackBorderRadius:"16px"},medium:{width:"44px",height:"24px",thumbSize:"16px",thumbInset:"4px",thumbTravel:"20px",trackBorderRadius:"14px"},small:{width:"36px",height:"20px",thumbSize:"12px",thumbInset:"4px",thumbTravel:"16px",trackBorderRadius:"10px"}},status:{uncheckedColor:i[1400],uncheckedIconColor:i[2e3],handleBackground:`linear-gradient(180deg, ${i[100]} 0%, ${i[300]} 100%)`,iconSize:{width:14,height:14},trackBorderRadius:"20px"}},I=`linear-gradient(180deg, ${i[100]} 0%, ${i[300]} 154.5%)`,H={size:"40px",iconSize:{width:20,height:20},borderRadius:"44px",default:{background:I,borderColor:r[500],color:r[500]},hovered:{background:r[400],borderColor:r[500],color:i[100]},pressed:{background:r[600],borderColor:r[600],color:i[100]},disabled:{background:I,borderColor:r[200],color:r[200]}},T=`inset 0 0 0 ${s.containerDivider.width} ${s.containerDivider.color}`,V={gap:"4px",separatorIconSize:{width:16,height:16},pageLink:{height:"26px",paddingBlock:"2px",paddingInline:"8px",borderRadius:"8px",maxWidth:"226px",stroke:{default:T,hover:`inset 0 0 0 ${s.containerDivider.width} ${i[2800]}`},collapsed:{width:"24px",height:"16px",paddingInline:"4px",borderRadius:"4px"}},overflowMenu:{offset:"4px",padding:"16px",gap:"8px",borderRadius:"12px",boxShadow:`${T}, ${o.popover}`}},E=`${s.containerDivider.width} ${s.containerDivider.style} ${i[500]}`,A=`${s.containerDivider.width} ${s.containerDivider.style} ${s.containerDivider.color}`,M={contentAlignment:"center",default:{maxCharacters:100,width:"202px",maxWidth:"unset",padding:"12px 16px 12px 16px",borderRadius:"0.5rem",border:E,backgroundColor:i[100],boxShadow:`0px 4px 20px 0px ${i[500]}`,color:i[2800],margin:"8px",typographyVariant:"body-medium",arrow:{color:i[100],border:E}},simple:{width:"300px",maxWidth:"300px",contentMinHeight:"53px",paddingBlock:"2px",paddingInline:"8px",borderRadius:"8px",border:A,backgroundColor:i[100],boxShadow:o.popover,color:i[2500],margin:"8px",typographyVariant:"body-medium",arrow:{width:"16px",height:"8px",color:i[100],border:A}}},L={grey:i,red:r,green:c,orange:l,yellow:h,blue:x,coral:n,shadows:o,dataviz:{colors:p,extra:a,colorsWithExtra:d,onlyMainFromAll:t},doughnutCard:g,strokes:s,status:u,scoreCard:b,scoreOverviewCard:m,ingredientCard:w,scoreValue:k,numberWithUnit:y,formField:S,textInput:z,textArea:v,select:f,barChart:B,mediaUpload:$,tags:R,countTabs:C,tabs:F,scoreDetail:W,toggleSwitch:D,deleteButton:H,breadcrumb:V,tooltip:M,searchBox:{borderRadius:"24px",border:e=>"1px solid "+e.custom.grey[500],background:"white",boxShadow:e=>"0px 2px 8px 0px "+e.custom.grey[500]},rowMenuElement:{marginLeft:"12px",paddingRight:"8px",fontSize:"12px",fontWeight:"600",lineHeight:"20px"}},N={valueFormatterFn:(i,o=void 0)=>{const r=Number(i);return Number.isNaN(r)?"":o?r.toLocaleString(e.language,{maximumFractionDigits:o}):r.toLocaleString(e.language)}};export{B as barChart,V as breadcrumb,C as countTabs,L as custom,H as deleteButton,g as doughnutCard,S as formField,w as ingredientCard,$ as mediaUpload,y as numberWithUnit,N as numbers,b as scoreCard,W as scoreDetail,m as scoreOverviewCard,k as scoreValue,f as select,u as status,s as strokes,F as tabs,R as tags,v as textArea,z as textInput,D as toggleSwitch,M as tooltip};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foodpilot/foods",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.27.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/main.js",
|
|
7
7
|
"module": "./dist/main.js",
|
|
@@ -301,13 +301,14 @@
|
|
|
301
301
|
"rollup-plugin-visualizer": "^7.0.0",
|
|
302
302
|
"size-limit": "^12.0.0",
|
|
303
303
|
"storybook": "^10.6.4",
|
|
304
|
+
"storybook-addon-pseudo-states": "10.6.4",
|
|
304
305
|
"typescript": "^5.9.3",
|
|
305
306
|
"typescript-eslint": "^8.56.1",
|
|
306
307
|
"vite": "^7.3.7",
|
|
307
308
|
"vite-bundle-visualizer": "^1.2.1",
|
|
308
309
|
"vite-plugin-dts": "^4.5.0",
|
|
309
310
|
"vite-plugin-svgr": "^4.5.0",
|
|
310
|
-
"vitest": "^4.1.
|
|
311
|
+
"vitest": "^4.1.12"
|
|
311
312
|
},
|
|
312
313
|
"dependencies": {
|
|
313
314
|
"@lexical/react": "^0.41.0",
|
|
@@ -331,7 +332,7 @@
|
|
|
331
332
|
"chroma-js": "^3.2.0",
|
|
332
333
|
"i18next": "^23.0.0 || ^25.0.0",
|
|
333
334
|
"i18next-browser-languagedetector": "^8.2.1",
|
|
334
|
-
"i18next-http-backend": "^4.0.
|
|
335
|
+
"i18next-http-backend": "^4.0.4",
|
|
335
336
|
"lexical": "^0.41.0",
|
|
336
337
|
"lodash": "^4.18.1",
|
|
337
338
|
"material-ui-popup-state": "^5.3.1",
|
package/dist/assets/undo.svg.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as t from"react";const e=e=>/* @__PURE__ */t.createElement("svg",{width:16,height:15,viewBox:"0 0 16 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e},/* @__PURE__ */t.createElement("path",{d:"M2.89332 14.6818V13.0909H10.0842C11.1607 13.0909 12.0901 12.7383 12.8723 12.033C13.6545 11.3277 14.0456 10.45 14.0456 9.40002C14.0456 8.35 13.6545 7.47235 12.8723 6.76705C12.0901 6.06175 11.1607 5.7091 10.0842 5.7091H3.38648L6.0274 8.34999L4.91375 9.46364L0.36377 4.91363L4.91375 0.363647L6.0274 1.47727L3.38648 4.11819H10.0683C11.5903 4.11819 12.8988 4.62463 13.9939 5.63751C15.089 6.6504 15.6365 7.90456 15.6365 9.40002C15.6365 10.8955 15.089 12.1496 13.9939 13.1625C12.8988 14.1754 11.5903 14.6818 10.0683 14.6818H2.89332Z",fill:"currentColor"}));export{e as default};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BoxProps } from '@mui/material';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
import { ClassicBannerType, StylePreset } from '../banner.types';
|
|
4
|
-
type Props = {
|
|
5
|
-
children?: ReactNode;
|
|
6
|
-
BoxProps?: BoxProps;
|
|
7
|
-
variant?: ClassicBannerType;
|
|
8
|
-
stylePresetOverride?: Partial<StylePreset>;
|
|
9
|
-
};
|
|
10
|
-
export declare const ClassicBanner: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{jsx as o,jsxs as r}from"react/jsx-runtime";import{useTheme as i,Stack as n,Typography as c}from"@mui/material";import{FoodsIcon as t}from"../../Icons/FoodsIcon.js";import{WhiteBox as e}from"../../Box/WhiteBox.js";const m=m=>{const a=i(),{BoxProps:l,children:s,variant:d="info"}=m,p={info:{icon:"information",color:a.custom.grey[2800]},error:{icon:"warning",color:a.custom.red[600]}}[d];/* @__PURE__ */
|
|
2
|
-
return o(e,{padding:a.spacing(2),...l,children:/* @__PURE__ */r(n,{direction:"row",alignItems:"center",gap:a.spacing(1.5),color:p.color,children:[
|
|
3
|
-
/* @__PURE__ */o(t,{icon:p.icon,size:3,color:p.color}),
|
|
4
|
-
/* @__PURE__ */o(c,{variant:"body",color:p.color,children:s})]})})};export{m as ClassicBanner};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ThemedBannerColors, ThemedBannerType } from '../banner.types';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
type Props = {
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
variant?: ThemedBannerType;
|
|
6
|
-
colors?: ThemedBannerColors;
|
|
7
|
-
};
|
|
8
|
-
export declare const ThemedBanner: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{jsxs as r,jsx as o}from"react/jsx-runtime";import{useTheme as i,Stack as n,Box as e,Typography as d}from"@mui/material";import{FoodsIcon as c}from"../../Icons/FoodsIcon.js";const l=l=>{const s=i(),{colors:t}=l,{backgroundColor:a="#EDF5FF",color:m="#1976D2",sideBorder:p="#398BDB"}=t||{};/* @__PURE__ */
|
|
2
|
-
return r(n,{flexDirection:"row",padding:s.spacing(2),gap:s.spacing(1.5),borderRadius:"8px",borderLeft:`4px solid ${p}`,sx:{backgroundColor:a,color:m},children:[
|
|
3
|
-
/* @__PURE__ */o(e,{paddingTop:"2px",children:/* @__PURE__ */o(c,{size:2,icon:"information"})}),
|
|
4
|
-
/* @__PURE__ */o(d,{variant:"small-medium",sx:{width:"100%"},children:"string"==typeof l.children?/* @__PURE__ */o(e,{sx:{"> p":{margin:0,...s.typography["small-medium"]}},dangerouslySetInnerHTML:{__html:l.children}}):l.children})]})};export{l as ThemedBanner};
|