@foodpilot/foods 2.21.0 → 2.22.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/Chart/HorizontalGauge/components/GaugeStatistics.js +4 -4
- package/dist/components/Dialog/UnsavedChangesDialog.d.ts +14 -0
- package/dist/components/Dialog/UnsavedChangesDialog.js +7 -0
- package/dist/components/Dialog/index.d.ts +1 -0
- package/dist/components/Dialog/index.js +1 -0
- package/dist/components/Form/UnitConverterPopover.js +19 -9
- package/dist/components/Select/FoodsSelect/FoodsSelect.d.ts +8 -0
- package/dist/components/Select/FoodsSelect/FoodsSelect.js +5 -5
- package/dist/components/Select/FoodsSelect/Options/Line/OptionLine.js +2 -2
- package/dist/components/Select/FoodsSelect/Options/SelectOptions.d.ts +3 -0
- package/dist/components/Select/FoodsSelect/Options/SelectOptions.js +8 -6
- package/dist/components/Select/FoodsSelect/Select.d.ts +3 -0
- package/dist/components/Select/FoodsSelect/Select.js +5 -5
- package/dist/components/Tags/FoodsTags.js +3 -3
- package/dist/main.js +1 -1
- package/dist/themes/common/MUIComponents/buttons.d.ts +1 -1
- package/dist/themes/common/MUIComponents/tagsStyles.d.ts +8 -0
- package/dist/themes/common/MUIComponents/tagsStyles.js +1 -0
- package/dist/themes/common/components.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,Fragment as a,jsxs as t}from"react/jsx-runtime";import{useRef as n,useState as r,useMemo as i,useCallback as o,useLayoutEffect as m}from"react";import{useTheme as s,Typography as l,Box as
|
|
2
|
-
/* @__PURE__ */e(
|
|
3
|
-
/* @__PURE__ */e(h,{variant:"tags-grey",label:B[a],sx:{backgroundColor:G.custom.grey[500],borderColor:G.custom.grey[600],
|
|
4
|
-
return e(
|
|
1
|
+
import{jsx as e,Fragment as a,jsxs as t}from"react/jsx-runtime";import{useRef as n,useState as r,useMemo as i,useCallback as o,useLayoutEffect as m}from"react";import{useTheme as s,Typography as l,Box as c,Stack as u}from"@mui/material";import{GAUGE_CONSTANTS as d}from"../constants.js";import{formatValue as p}from"../utils/formatters.js";import{INITIAL_STATISTIC_LAYOUT as T,getFittingAnchor as x,assignStatisticLanes as g}from"../utils/statisticLayout.js";import{FoodsTags as h}from"../../../Tags/FoodsTags.js";const b=b=>{const{minValue:I,medianValue:S,maxValue:f,labelMinimum:A,labelMedian:_,labelMaximum:C,labelPositions:v,showMedian:y,height:L,animated:E,precision:O=0,valueFormatter:N,onLaneCountChange:U,onMedianLaneChange:w}=b,G=s(),j=n({minimum:null,median:null,maximum:null}),[F,$]=r(T),z=Number.parseFloat(G.spacing(d.LAYOUT.STATISTIC_LANE_SPACING_UNITS)),M=Number.parseFloat(G.spacing(d.LAYOUT.STATISTIC_COLLISION_GAP_UNITS)),R=v.min.x,Y=v.max.x,P=R+(Y-R)/2,V=i(()=>({minimum:N?N(I,O):p(I,O),median:N?N(S,O):p(S,O),maximum:N?N(f,O):p(f,O)}),[f,S,I,O,N]),B=i(()=>({minimum:A,median:_,maximum:C}),[C,_,A]),X=i(()=>({minimum:v.min,median:v.median,maximum:v.max}),[v.max,v.median,v.min]),k=i(()=>y?["minimum","median","maximum"]:["minimum","maximum"],[y]),D=o(()=>{const e=k.map(e=>{const a=j.current[e]?.getBoundingClientRect().width??0,t="median"===e?x(X[e],a,R,Y):X[e].anchor;return{id:e,x:X[e].x,width:a,anchor:t}}),a=g(e,M),t=k.reduce((t,n)=>(t[n]={anchor:e.find(e=>e.id===n)?.anchor??X[n].anchor,lane:a[n]},t),{...T}),n=Math.max(...Object.values(a))+1;$(e=>k.every(a=>e[a].anchor===t[a].anchor&&e[a].lane===t[a].lane)?e:t),U(n),w(y?a.median:0)},[M,Y,R,U,w,X,y,k]);return m(()=>{if(D(),"undefined"==typeof ResizeObserver)return;const e=new ResizeObserver(D);return Object.values(j.current).forEach(a=>a&&e.observe(a)),()=>e.disconnect()},[D]),/* @__PURE__ */e(a,{children:k.map(a=>{const n=X[a].x>P,r=/* @__PURE__ */e(l,{variant:"small-bold",color:G.custom.grey[2800],sx:{..."minimum"===a&&{mr:"-0.5px",transform:"translateX(-0.5px)"},..."maximum"===a&&{ml:"-0.5px",transform:"translateX(0.5px)"}},children:V[a]},"value"),i=Boolean(B[a].trim())&&/* @__PURE__ */t(c,{component:"span",sx:{display:"inline-flex",position:"relative"},children:[
|
|
2
|
+
/* @__PURE__ */e(c,{component:"span","aria-hidden":"true","data-testid":`horizontal-gauge-statistic-${a}-caret`,sx:{backgroundColor:G.custom.grey[500],borderBottom:n?0:`1px solid ${G.custom.grey[600]}`,borderLeft:n?0:`1px solid ${G.custom.grey[600]}`,borderRight:n?`1px solid ${G.custom.grey[600]}`:0,borderTop:n?`1px solid ${G.custom.grey[600]}`:0,boxSizing:"border-box",height:G.spacing(d.LAYOUT.STATISTIC_TAG_CARET_SIZE_UNITS),left:n?"auto":0,pointerEvents:"none",position:"absolute",right:n?0:"auto",top:"50%",transform:n?"translate(50%, -50%) rotate(45deg)":"translate(-50%, -50%) rotate(45deg)",width:G.spacing(d.LAYOUT.STATISTIC_TAG_CARET_SIZE_UNITS),zIndex:1}}),
|
|
3
|
+
/* @__PURE__ */e(h,{variant:"tags-grey",label:B[a],sx:{backgroundColor:G.custom.grey[500],borderColor:G.custom.grey[600],px:.625,pointerEvents:"none"}})]},"tag");/* @__PURE__ */
|
|
4
|
+
return e(u,{ref:e=>{j.current[a]=e},"data-testid":`horizontal-gauge-statistic-${a}`,"data-anchor":F[a].anchor,"data-lane":F[a].lane,sx:{alignItems:"center",flexDirection:"row",position:"absolute",left:X[a].x,top:L-d.LEGEND_HEIGHT+Number.parseFloat(G.spacing(d.LAYOUT.STATISTIC_TOP_OFFSET_UNITS))+F[a].lane*z,transform:`translateX(${o=F[a].anchor,"start"===o?"0":"end"===o?"-100%":"-50%"})`,gap:G.spacing(d.LAYOUT.STATISTIC_VALUE_TAG_GAP_UNITS),opacity:1,transition:E?G.transitions.create(["transform","opacity"]):"none",whiteSpace:"nowrap",pointerEvents:"none"},children:n?[i,r]:[r,i]},a);var o})})};export{b as GaugeStatistics};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type UnsavedChangesDialogProps = {
|
|
2
|
+
open: boolean;
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
saveLabel: string;
|
|
6
|
+
discardLabel: string;
|
|
7
|
+
keepEditingLabel: string;
|
|
8
|
+
busy?: boolean;
|
|
9
|
+
saveDisabled?: boolean;
|
|
10
|
+
onSave: () => void;
|
|
11
|
+
onDiscard: () => void;
|
|
12
|
+
onKeepEditing: () => void;
|
|
13
|
+
};
|
|
14
|
+
export declare const UnsavedChangesDialog: (props: UnsavedChangesDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{jsxs as i,jsx as a}from"react/jsx-runtime";import{useId as e,useRef as r}from"react";import n from"@mui/material/Dialog";import o from"@mui/material/DialogActions";import t from"@mui/material/DialogContent";import l from"@mui/material/DialogTitle";import{Typography as d,Button as s}from"@mui/material";const c=c=>{const{open:p,title:m,description:u,saveLabel:g,discardLabel:h,keepEditingLabel:f,busy:b=!1,saveDisabled:y=!1,onSave:v,onDiscard:x,onKeepEditing:D}=c,w=e(),W=e(),k=r(null),C=()=>{b||D()};/* @__PURE__ */
|
|
2
|
+
return i(n,{open:p,onClose:C,disableEscapeKeyDown:b,fullWidth:!0,maxWidth:"xs","aria-labelledby":w,"aria-describedby":u?W:void 0,slotProps:{paper:{"aria-busy":b},transition:{onEntered:()=>k.current?.focus()}},children:[
|
|
3
|
+
/* @__PURE__ */a(l,{id:w,variant:"h3",sx:i=>({padding:i.spacing(3,3,2),overflowWrap:"anywhere"}),children:m}),u&&/* @__PURE__ */a(t,{sx:i=>({padding:i.spacing(0,3,2)}),children:/* @__PURE__ */a(d,{id:W,component:"p",variant:"body-regular",sx:{overflowWrap:"anywhere"},children:u})}),
|
|
4
|
+
/* @__PURE__ */i(o,{disableSpacing:!0,sx:i=>({flexDirection:"column",gap:i.spacing(1.5),padding:i.spacing(1,3,3),"& .MuiButton-root":{height:"auto",minHeight:i.spacing(5),padding:i.spacing(1,2),whiteSpace:"normal",overflowWrap:"anywhere","&.Mui-focusVisible":{outline:`${i.spacing(.25)} ${i.custom.strokes.containerDivider.style} ${i.palette.primary[700]}`,outlineOffset:i.spacing(.25)}}}),children:[
|
|
5
|
+
/* @__PURE__ */a(s,{variant:"primary",fullWidth:!0,disabled:b||y,loading:b,onClick:()=>{b||y||v()},children:g}),
|
|
6
|
+
/* @__PURE__ */a(s,{variant:"secondary",fullWidth:!0,disabled:b,onClick:()=>{b||x()},children:h}),
|
|
7
|
+
/* @__PURE__ */a(s,{ref:k,variant:"secondary",fullWidth:!0,disabled:b,onClick:C,children:f})]})]})};export{c as UnsavedChangesDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{PrimaryDialog as o}from"./PrimaryDialog.js";import{BottomSheetDialog as r}from"./BottomSheetDialog.js";import{UnsavedChangesDialog as m}from"./UnsavedChangesDialog.js";export{r as BottomSheetDialog,o as PrimaryDialog,m as UnsavedChangesDialog};
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
2
|
-
return e(
|
|
3
|
-
/* @__PURE__ */
|
|
4
|
-
/* @__PURE__ */
|
|
5
|
-
/* @__PURE__ */e(
|
|
6
|
-
/* @__PURE__ */e(
|
|
7
|
-
/* @__PURE__ */
|
|
8
|
-
/* @__PURE__ */e(
|
|
9
|
-
/* @__PURE__ */e(
|
|
1
|
+
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useTheme as r,Stack as i,Typography as n,Box as t,Divider as a,Button as c}from"@mui/material";import{useMemo as l}from"react";import{AnchoredPopover as s}from"../Popover/AnchoredPopover.js";import{FoodsTextInput as d}from"./FoodsFormFields/FoodsTextInput.js";import{FoodsSelect as m}from"../Select/FoodsSelect/FoodsSelect.js";const p=p=>{const{open:u,anchor:g,onClose:h,targetAbbreviation:b,options:v,selectedOptionId:x,onSelectedOptionIdChange:f,sourceValue:y,onSourceValueChange:C,labels:w,onApply:I,disabled:S=!1}=p,F=r(),P=l(()=>v.find(e=>e.id===x)??null,[v,x]),O=l(()=>{const e=Number(y.replace(",","."));return!P||Number.isNaN(e)?null:e*P.factor},[y,P]);/* @__PURE__ */
|
|
2
|
+
return e(s,{variant:"themed",open:u,anchor:g,onClose:h,anchorPosition:"rightside",children:/* @__PURE__ */o(i,{gap:F.spacing(2),sx:{minWidth:F.spacing(44)},children:[
|
|
3
|
+
/* @__PURE__ */o(i,{direction:"row",gap:F.spacing(1.5),alignItems:"flex-end",children:[
|
|
4
|
+
/* @__PURE__ */o(i,{gap:F.spacing(1),flex:1,minWidth:0,children:[
|
|
5
|
+
/* @__PURE__ */e(n,{variant:"small-medium",color:F.custom.grey[2200],children:w.sourceValue}),
|
|
6
|
+
/* @__PURE__ */e(d,{value:y,onChange:C,disabled:S,ExtraInputProps:{type:"number"},StackProps:{sx:{width:"100%"}}})]}),
|
|
7
|
+
/* @__PURE__ */o(i,{gap:F.spacing(1),sx:{width:F.custom.formField.compact.optionWidth},children:[
|
|
8
|
+
/* @__PURE__ */e(n,{variant:"small-medium",color:F.custom.grey[2200],children:w.sourceUnit}),
|
|
9
|
+
/* @__PURE__ */e(m,{options:v,selectedOption:P,onChange:e=>{e&&f(e.id)},getId:e=>e.id,getName:e=>e.abbreviation,disabled:S||0===v.length,disableSearch:!0,closeOnSelect:!0,textOptions:{placeholder:w.sourceUnit,searchPlaceholder:w.sourceUnit,emptyOptionsText:w.sourceUnit,noResult:w.sourceUnit},BoxProps:{width:"100%"}})]})]}),null!==O&&P&&/* @__PURE__ */o(t,{sx:{backgroundColor:F.custom.grey[300],border:`1px solid ${F.custom.grey[500]}`,borderRadius:F.spacing(1),padding:F.spacing(1.5,2)},children:[
|
|
10
|
+
/* @__PURE__ */e(n,{variant:"small-medium",color:F.custom.grey[2200],children:w.preview}),
|
|
11
|
+
/* @__PURE__ */o(i,{direction:"row",alignItems:"baseline",gap:F.spacing(1),mt:F.spacing(.5),flexWrap:"wrap",children:[
|
|
12
|
+
/* @__PURE__ */o(n,{variant:"body-medium",children:[y," ",P.abbreviation]}),
|
|
13
|
+
/* @__PURE__ */e(n,{variant:"body-regular",color:F.custom.grey[2e3],children:"→"}),
|
|
14
|
+
/* @__PURE__ */o(n,{variant:"body-medium",children:[O," ",b]})]}),
|
|
15
|
+
/* @__PURE__ */o(n,{variant:"small-medium",color:F.custom.grey[2e3],mt:F.spacing(1),children:[w.factorHint,": ",P.factor," → ",b,P.source?` (${P.source})`:""]})]}),
|
|
16
|
+
/* @__PURE__ */e(a,{}),
|
|
17
|
+
/* @__PURE__ */o(i,{direction:"row",gap:F.spacing(1),justifyContent:"flex-end",alignItems:"center",children:[
|
|
18
|
+
/* @__PURE__ */e(c,{variant:"text",onClick:h,disabled:S,children:w.cancel}),
|
|
19
|
+
/* @__PURE__ */e(c,{variant:"primary",onClick:I,disabled:S||null===O||null===P,children:w.apply})]})]})})};export{p as UnitConverterPopover};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SxProps } from '@mui/material';
|
|
2
2
|
import { ExtraSelectOptions, SearchOptions } from './Context/Provider';
|
|
3
3
|
export type FoodsSelectProps<T> = {
|
|
4
|
+
id?: string;
|
|
4
5
|
selectedOption: T | null;
|
|
5
6
|
options: T[];
|
|
6
7
|
onChange: (selectedValue: T | null) => void;
|
|
@@ -11,6 +12,13 @@ export type FoodsSelectProps<T> = {
|
|
|
11
12
|
BoxProps?: SxProps;
|
|
12
13
|
BoxOptionsProps?: SxProps;
|
|
13
14
|
unit?: string;
|
|
15
|
+
infiniteScroll?: FoodsSelectInfiniteScrollOptions;
|
|
16
|
+
};
|
|
17
|
+
export type FoodsSelectInfiniteScrollOptions = {
|
|
18
|
+
hasNextPage: boolean;
|
|
19
|
+
isFetchingNextPage: boolean;
|
|
20
|
+
onLoadMore: () => void;
|
|
21
|
+
loadingText?: string;
|
|
14
22
|
};
|
|
15
23
|
export type SelectWrapperProps<T> = FoodsSelectProps<T> & ExtraSelectOptions;
|
|
16
24
|
export declare const FoodsSelect: <T>(props: SelectWrapperProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Box as o,Typography as
|
|
2
|
-
return t(o,{sx:{width:"300px",...
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Box as o,Typography as i,IconButton as n}from"@mui/material";import s from"../../../assets/undo.svg.js";import{Select as r}from"./Select.js";import{FoodsSelectContextProvider as l}from"./Context/Provider.js";import{useFoodsSelectContext as a}from"./Context/useSelect.js";import{useState as c}from"react";const d=l=>{const{options:c,id:d,selectedOption:p,originalValue:m,onChange:h,getId:u,getName:x,getIcon:O,unit:S,BoxProps:g={},BoxOptionsProps:b={},infiniteScroll:f}=l,{disabled:C,textOptions:y}=a(),V=((e,t)=>!0!==e&&0!==t.length)(C,c);/* @__PURE__ */
|
|
2
|
+
return t(o,{sx:{width:"300px",...g},children:[
|
|
3
3
|
/* @__PURE__ */t(o,{sx:{display:"flex",alignItems:"center",direction:"row",gap:"8px"},children:[
|
|
4
|
-
/* @__PURE__ */e(r,{options:c,getId:
|
|
5
|
-
return e(
|
|
6
|
-
return e(
|
|
4
|
+
/* @__PURE__ */e(r,{id:d,options:c,getId:u,getName:x,onChange:h,getIcon:O,selectedOption:p,BoxOptionsProps:b,infiniteScroll:f}),S&&/* @__PURE__ */e(i,{variant:"body",children:S}),V&&m&&/* @__PURE__ */e(n,{onClick:()=>h(m),children:/* @__PURE__ */e(s,{})})]}),V&&m&&/* @__PURE__ */e(i,{variant:"small-medium",children:`${y.defaultValueText} : ${x(m)}`})]})},p=t=>{const{textOptions:o,noValue:i,disabled:n,closeOnSelect:s,disableSearch:r,disableOnEmpty:a=!1,...p}=t,[m,h]=c("");/* @__PURE__ */
|
|
5
|
+
return e(l,{textOptions:o,noValue:i,disabled:n,closeOnSelect:s,disableSearch:r,search:m,setSearch:h,isSearchFound:e=>""===m||e.toLowerCase().includes(m.toLowerCase()),disableOnEmpty:a,children:/* @__PURE__ */e(d,{...p})})},m=t=>{const{textOptions:o,noValue:i,disabled:n,closeOnSelect:s,search:r,setSearch:a,isSearchFound:c,disableOnEmpty:p=!1,...m}=t;/* @__PURE__ */
|
|
6
|
+
return e(l,{textOptions:o,noValue:i,disabled:n,closeOnSelect:s,search:r,setSearch:a,isSearchFound:c,disableOnEmpty:p,children:/* @__PURE__ */e(d,{...m})})};export{p as FoodsSelect,m as FoodsSelectServerPagination};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useTheme as
|
|
2
|
-
return e(
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useTheme as t,Box as o}from"@mui/material";import{DefaultLine as r}from"./Default.js";import{SelectedLine as i}from"./Selected.js";const n=n=>{const{isSelected:l,icon:a,displayText:p,onClick:c}=n,s=t();/* @__PURE__ */
|
|
2
|
+
return e(o,{role:"option","aria-selected":l,tabIndex:0,sx:{display:"flex",alignItems:"center",gap:"10px",paddingBlock:"4px",":hover":{backgroundColor:s.custom.grey[300]}},onClick:()=>c&&c(),onKeyDown:e=>{!c||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),c())},children:/* @__PURE__ */e(o,{sx:{display:"flex",alignItems:"center",gap:"10px",position:"relative",width:"90%",left:"5%",cursor:"pointer"},children:/* @__PURE__ */e(!1===l?r:i,{displayText:p,icon:a})})})};export{n as OptionLine};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FoodsSelectInfiniteScrollOptions } from '../FoodsSelect';
|
|
1
2
|
export type SelectOptionsProps<T> = {
|
|
2
3
|
selectedOption: T | null;
|
|
3
4
|
options: T[];
|
|
@@ -5,5 +6,7 @@ export type SelectOptionsProps<T> = {
|
|
|
5
6
|
getName: (item: T) => string;
|
|
6
7
|
getIcon?: (item: T) => React.JSX.Element;
|
|
7
8
|
onChange: (selectedValue: T | null) => void;
|
|
9
|
+
infiniteScroll?: FoodsSelectInfiniteScrollOptions;
|
|
10
|
+
onScroll?: React.UIEventHandler<HTMLDivElement>;
|
|
8
11
|
};
|
|
9
12
|
export declare const SelectOptions: <T>(props: SelectOptionsProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useTheme as o,Box as n,Typography as r}from"@mui/material";import{Fragment as
|
|
2
|
-
return e(n,{sx:{marginBlock:"8px",display:"flex",flexDirection:"column"},children:[
|
|
3
|
-
/* @__PURE__ */t(s,{selectedOption:
|
|
4
|
-
/* @__PURE__ */t(
|
|
5
|
-
/* @__PURE__ */t(
|
|
6
|
-
return t(
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useTheme as o,Box as n,Typography as i,CircularProgress as r}from"@mui/material";import{Fragment as l}from"react";import{OptionLine as a}from"./Line/OptionLine.js";import{OptionsHeader as s}from"./Header/OptionHeader.js";import{useFoodsSelectContext as c}from"../Context/useSelect.js";import{FoodsBadge as d}from"../../../Badge/FoodsBadge.js";const p=p=>{const m=o(),{selectedOption:g,options:x,getId:u,getName:f,onChange:h,getIcon:y,infiniteScroll:b,onScroll:j}=p,{isSearchFound:C,textOptions:S}=c(),k=x.filter(e=>C(f(e)));/* @__PURE__ */
|
|
2
|
+
return e(n,{role:"listbox","aria-label":S.placeholder,onScroll:j,sx:{marginBlock:"8px",display:"flex",flexDirection:"column",...b?{height:"280px",overflowY:"auto"}:{}},children:[
|
|
3
|
+
/* @__PURE__ */t(s,{selectedOption:g,getName:f,getIcon:y,onChange:h}),0===k.length&&/* @__PURE__ */e(n,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"8px",marginBlock:"4px"},children:[
|
|
4
|
+
/* @__PURE__ */t(d,{icon:"questionMark",size:3,boxProps:{sx:{backgroundColor:m.palette.primary[50],borderRadius:"32px"}}}),
|
|
5
|
+
/* @__PURE__ */t(i,{variant:"body-medium",children:S.noResult})]}),k.map((e,o)=>{const n=f(e),i=null!==g&&u(e)===u(g);if(!0===i)return null;const r=y?y(e):null;/* @__PURE__ */
|
|
6
|
+
return t(l,{children:/* @__PURE__ */t(a,{isSelected:i,icon:r,displayText:n,onClick:()=>h(e)})},`select-${o}`)}),!0===b?.isFetchingNextPage&&/* @__PURE__ */e(n,{role:"status","aria-label":b.loadingText??"Loading…",sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:1,padding:1},children:[
|
|
7
|
+
/* @__PURE__ */t(r,{size:18}),
|
|
8
|
+
/* @__PURE__ */t(i,{variant:"small",children:b.loadingText??"Loading…"})]})]})};export{p as SelectOptions};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { SxProps } from '@mui/material';
|
|
2
|
+
import { FoodsSelectInfiniteScrollOptions } from './FoodsSelect';
|
|
2
3
|
export type SelectProps<T> = {
|
|
4
|
+
id?: string;
|
|
3
5
|
options: T[];
|
|
4
6
|
getId: (item: T) => number | string;
|
|
5
7
|
getName: (item: T) => string;
|
|
@@ -7,5 +9,6 @@ export type SelectProps<T> = {
|
|
|
7
9
|
onChange: (selectedValue: T | null) => void;
|
|
8
10
|
selectedOption: T | null;
|
|
9
11
|
BoxOptionsProps: SxProps;
|
|
12
|
+
infiniteScroll?: FoodsSelectInfiniteScrollOptions;
|
|
10
13
|
};
|
|
11
14
|
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
|
|
2
|
-
return e(
|
|
3
|
-
/* @__PURE__ */e(
|
|
4
|
-
/* @__PURE__ */
|
|
5
|
-
/* @__PURE__ */
|
|
1
|
+
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useTheme as t,Button as i,Typography as r}from"@mui/material";import{useState as n,Fragment as l}from"react";import p from"@mui/icons-material/KeyboardArrowDown";import s from"@mui/icons-material/KeyboardArrowUp";import{SelectOptions as a}from"./Options/SelectOptions.js";import{useFoodsSelectContext as c}from"./Context/useSelect.js";import{AnchoredPopover as d}from"../../Popover/AnchoredPopover.js";const m=m=>{const{textOptions:x,disabled:g,closeOnSelect:h,setSearch:u,disableOnEmpty:f}=c(),w=t(),[b,O]=n(null),v=()=>O(null),y=null!==b,{selectedOption:S,infiniteScroll:I}=m,P=/* @__PURE__ */o(y?s:p,{}),C=y?{border:`2px solid ${w.custom.grey[2800]}`}:{},j=((e,o,t,i,r)=>0===e.length?null!==t?i(t):o:null===t?r:i(t))(m.options,x.emptyOptionsText,S,m.getName,x.placeholder),N=f&&0===m.options.length;/* @__PURE__ */
|
|
2
|
+
return e(l,{children:[
|
|
3
|
+
/* @__PURE__ */e(i,{variant:"select",id:m.id,onClick:e=>y?v():O(e.currentTarget),sx:{...C,width:"100%",height:"40px",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0px 12px 0px 12px"},disabled:g||N,children:[m.getIcon&&S&&m.getIcon(S),
|
|
4
|
+
/* @__PURE__ */o(r,{variant:"body-medium",sx:{width:"100%",textAlign:"left",marginLeft:"8px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:j}),P]}),
|
|
5
|
+
/* @__PURE__ */o(d,{sx:{top:"5px"},paperProps:{width:"280px",maxHeight:"300px",...I?{overflow:"hidden"}:{},border:`1px solid ${w.custom.grey[500]}`,borderRadius:"12px",boxShadow:"0px 4px 20px 0px #514E4E1F",...m.BoxOptionsProps},variant:"headless",anchor:b,open:y,onClose:()=>{v(),u("")},anchorPosition:"rightside",children:/* @__PURE__ */o(a,{selectedOption:m.selectedOption,options:m.options,getId:m.getId,getName:m.getName,getIcon:m.getIcon,onChange:e=>{m.onChange(e),u(""),!0===h&&v()},infiniteScroll:I,onScroll:I?e=>{if(!0!==I?.hasNextPage||I.isFetchingNextPage)return;const o=e.currentTarget;o.scrollHeight-o.scrollTop-o.clientHeight<=32&&I.onLoadMore()}:void 0})})]})};export{m as Select};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{jsx as o,jsxs as
|
|
2
|
-
return o(
|
|
3
|
-
/* @__PURE__ */o(
|
|
1
|
+
import{jsx as o,jsxs as n}from"react/jsx-runtime";import{useTheme as r,Button as a,Stack as i,Typography as c}from"@mui/material";import{FoodsIcon as d}from"../Icons/FoodsIcon.js";const t=t=>{const{variant:e="tags-grey",label:s,detail:l,size:g="compact",colors:p,startIcon:u,endIcon:b,onClick:m,disabled:h,sx:k}=t,I=r(),v="display"===g,x=p?.foreground??"inherit",y=Array.isArray(k)?k:[k],f=n=>/* @__PURE__ */o(c,{sx:{color:x},variant:"small-bold",children:/* @__PURE__ */o(d,{size:1,icon:n})});/* @__PURE__ */
|
|
2
|
+
return o(a,{"aria-label":v?[s,l].filter(Boolean).join(" "):void 0,startIcon:u&&f(u),endIcon:b&&f(b),variant:e,onClick:m,disabled:h,sx:[{borderColor:"transparent",...p&&{background:p.background,backgroundColor:p.background,color:p.foreground,"&:hover, &:active":{background:p.background,backgroundColor:p.background}},...v&&{borderRadius:I.spacing(.5),gap:I.spacing(.25),height:I.custom.tags.display.height,paddingBlock:I.spacing(.25),paddingInlineStart:I.spacing(1),paddingInlineEnd:b?I.spacing(.25):I.spacing(1),"& .MuiButton-endIcon, & .MuiButton-startIcon":{color:x,margin:I.spacing(0),padding:I.spacing(.5)}}},...y],children:v?/* @__PURE__ */n(i,{component:"span",direction:"row",alignItems:"center",sx:{gap:I.spacing(.5)},children:[
|
|
3
|
+
/* @__PURE__ */o(c,{component:"span",sx:{color:x},variant:"body-semibold",children:s}),l&&/* @__PURE__ */o(c,{component:"span",sx:{color:x},variant:"body-regular",children:l})]}):/* @__PURE__ */o(c,{sx:{color:x},variant:"small-bold",children:s})})};export{t as FoodsTags};
|
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{AdditionalContentBox as p}from"./components/Box/AdditionalContentBox.js";import{AnchoredPopover as c,HeadlessPopover as a,ThemedPopover as f}from"./components/Popover/AnchoredPopover.js";import{Article as j}from"./components/CMS/ArticleBlock/Article.js";import{ArticlesBox as l}from"./components/CMS/ArticleBlock/ArticlesBox.js";import{Badge as d}from"./components/Badge/Badge.js";import{Banner as B}from"./components/Banner/Banner.js";import{BigPopoverLayout as C}from"./components/Popover/BigPopoverLayout.js";import{BlockItemContainer as u}from"./components/Layout/BlockList/Blocks/Container/BlockItemContainer.js";import{BlockItemInner as h}from"./components/Layout/BlockList/Blocks/Container/BlockItemInner.js";import{BlockListContainer as g}from"./components/Layout/BlockList/BlockListContainer.js";import{BottomSheetDialog as F}from"./components/Dialog/BottomSheetDialog.js";import{BoxStyled as T,SecondaryTabs as k}from"./components/Tabs/SecondaryTabs.js";import{BreadcrumbItem as S}from"./components/Navigation/Breadcrumbs/BreadcrumbItem.js";import{Breadcrumbs as x}from"./components/Navigation/Breadcrumbs/Breadcrumbs.js";import{BreakdownTable as P}from"./components/Chart/BreakdownTable/BreakdownTable.js";import{ButtonTabs as v}from"./components/Tabs/ButtonTabs.js";import{CardImage as I}from"./components/CardImage.js";import{CategoryBox as y}from"./components/Box/CategoryBox.js";import{CheckboxBlock as L}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/CheckboxBlock.js";import{CollectiveTheme as b,CollectiveThemeOptions as N}from"./themes/themes/CollectiveTheme.js";import{ComingSoonBadge as A}from"./components/Badge/ComingSoonBadge.js";import{ComparisonArrow as H}from"./components/ComparisonBlock/ComparisonArrow.js";import{ComparisonBlock as D}from"./components/ComparisonBlock/ComparisonBlock.js";import{ComparisonLabel as G}from"./components/Chart/HistogramComparisonChart/ComparisonLabel.js";import{ConfirmDialog as R}from"./components/Form/FoodsFormBase/ConfirmDialog.js";import{ContextualContentBox as w}from"./components/Box/ContextualContentBox.js";import{CoordinatePopover as U}from"./components/Popover/CoordinatePopover.js";import{CountTabs as M}from"./components/Tabs/CountTabs/CountTabs.js";import{CustomRender as W}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/CustomRender.js";import{CustomToggleButton as E,TertiaryToggleButton as V}from"./components/Button/TertiaryToggleButton.js";import{CustomToggleButtonNodeTitle as O,TertiaryToggleButtonNodeTitle as z}from"./components/Button/TertiaryToggleButtonNodeTitle.js";import{CustomTypography as Q}from"./components/CustomTypography/CustomTypography.js";import{CustomizedAxisTick as q}from"./components/Chart/HistogramComparisonChart/CustomizedAxisTick.js";import{DefaultUserAction as J}from"./components/Navigation/FoodsNavBar/Plugin/DefaultUserAction.js";import{DottedBox as K}from"./components/Box/DottedBox.js";import{DoughnutCard as X}from"./components/Cards/DoughnutCard/DoughnutCard.js";import{DoughnutChart as Y}from"./components/Chart/DoughnutChart/DoughnutChart.js";import{DrawerAction as Z}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/DrawerAction.js";import{EcoScoreCell as $}from"./components/Grid/Cell/EcoScoreCell.js";import{EditHeader as _}from"./components/Layout/BlockList/Headers/EditHeader.js";import{EllipsisItem as oo}from"./components/Pagination/PageItems/EllipsisItem.js";import{EmptyForm as ro}from"./components/Layout/BlockList/Blocks/InnerInfoBlocks/EmptyForm.js";import{EvolutionChart as to}from"./components/Chart/EvolutionChart/EvolutionChart.js";import{FixedMultiValueFilter as mo}from"./components/Filter/FixedMultiValueFilter.js";import{FoodPilotTheme as so,FoodpilotThemeOptions as no}from"./themes/themes/FoodPilotTheme.js";import{FoodsBadge as eo}from"./components/Badge/FoodsBadge.js";import{FoodsCheckbox as io}from"./components/Checkbox/FoodsCheckbox.js";import{FoodsDeleteButton as po}from"./components/Button/FoodsDeleteButton.js";import{FoodsFormBase as co}from"./components/Form/FoodsFormBase/FoodsFormBase.js";import{FoodsIcon as ao}from"./components/Icons/FoodsIcon.js";import{FoodsIconButton as fo}from"./components/Button/FoodsIconButton.js";import{FoodsIllustrations as jo}from"./components/Icons/FoodsIllustrations.js";import{FoodsNavbar as lo}from"./components/Navigation/FoodsNavBar/FoodsNavbar.js";import{FoodsPagination as Bo}from"./components/Pagination/FoodsPagination.js";import{FoodsPaginationItem as Co}from"./components/Pagination/FoodsPaginationItem.js";import{FoodsRadioList as uo}from"./components/Radio/FoodsRadioList.js";import{FoodsSearch as ho}from"./components/Search/FoodsSearch.js";import{FoodsSelect as go,FoodsSelectServerPagination as Fo}from"./components/Select/FoodsSelect/FoodsSelect.js";import{FoodsTabs as To,SpecialTabs as ko}from"./components/Tabs/FoodsTabs/FoodsTabs.js";import{FoodsTags as So}from"./components/Tags/FoodsTags.js";import{FoodsTextInput as xo}from"./components/Form/FoodsFormFields/FoodsTextInput.js";import{FoodsThemeOptionsProvider as Po,FoodsThemeProvider as vo}from"./themes/FoodsThemeProvider.js";import{FoodsToggleButton as Io}from"./components/Button/FoodsToggleButton.js";import{FoodsTooltip as yo}from"./components/Tooltip/FoodsTooltip.js";import{FoodsTreeview as Lo}from"./components/Treeview/Treeview.js";import{FoodsUserTags as bo}from"./components/Tags/FoodsUserTags.js";import{FormAccordion as No}from"./components/Accordion/FormAccordion.js";import{FormBase as Ao}from"./components/Form/FormBase.js";import{FormBaseContextProvider as Ho,useFormBaseContext as Do}from"./components/Form/FoodsFormBase/FormBaseContext.js";import{FormBox as Go}from"./components/Form/FormBox.js";import{FormPropertyBox as Ro}from"./components/Form/FormPropertyBox.js";import{FormTopBar as wo}from"./components/Form/FoodsFormBase/FormTopBar/FormTopBar.js";import{FormUnit as Uo}from"./components/Form/FormUnit.js";import{GenericAccordion as Mo}from"./components/Accordion/GenericAccordion.js";import{GreyTextCell as Wo}from"./components/Grid/Cell/GreyCell.js";import{HeaderNav as Eo,NavBarLink as Vo,Navbar as Oo,SubMenu as zo,UserNav as Qo}from"./components/Navigation/Navbar.js";import{HelperBox as qo}from"./components/Box/HelperBox.js";import{HeroBlock as Jo}from"./components/CMS/HeroBlock/HeroBlock.js";import{HistogramComparisonChart as Ko}from"./components/Chart/HistogramComparisonChart/HistogramComparisonChart.js";import{HorizontalGaugeChart as Xo}from"./components/Chart/HorizontalGauge/HorizontalGaugeChart.js";import{IconThread as Yo}from"./components/Navigation/IconThread.js";import{IndicatorBlock as Zo}from"./components/CMS/IndicatorBlock/IndicatorBlock.js";import{InfoBox as $o}from"./components/Box/InfoBox.js";import{InfoHeaderWithIllustration as _o}from"./components/Layout/InfoHeaderWithIllustration.js";import{InitHeader as or}from"./components/Layout/BlockList/Headers/InitHeader.js";import{LeftComparisonPart as rr}from"./components/Layout/BlockList/Blocks/Common/LeftComparisonPart.js";import{LightIndicatorBlock as tr}from"./components/CMS/IndicatorBlock/LightIndicatorBlock.js";import{LineGroupBox as mr}from"./components/Box/LineGroupBox.js";import{LinearProgress as sr}from"./components/LinearProgress.js";import{LinkAction as nr}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/LinkAction.js";import{ListHeader as er}from"./components/Layout/BlockList/Headers/ListHeader.js";import{MRTGrid as ir}from"./components/Grid/MRTGrid.js";import{MRT_GRID_HUB_LAYOUT as pr}from"./components/Grid/mrtGridLayout.js";import{MultiValueFilter as cr}from"./components/Filter/MultiValueFilter.js";import{NumberField as ar}from"./components/Field/NumberField.js";import{NumberWithUnit as fr}from"./components/Number/NumberWithUnit.js";import{OptionsPopover as jr}from"./components/Popover/OptionsPopover.js";import{PageItem as lr}from"./components/Pagination/PageItems/PageItem.js";import{PageUpAndDownItem as dr}from"./components/Pagination/PageItems/PageUpAndDownItem.js";import{FoodsPills as Br}from"./components/Input/Pills/Pills.js";import{PointsCell as Cr}from"./components/Grid/Cell/PointsCell.js";import{PolymorphicChart as ur}from"./components/Chart/PolymorphicChart/PolymorphicChart.js";import{PolymorphicChartRenderer as hr}from"./components/Chart/PolymorphicChart/PolymorphicChartRenderer.js";import{PrimaryCheckbox as gr}from"./components/Checkbox/PrimaryCheckbox.js";import{PrimaryDialog as Fr}from"./components/Dialog/PrimaryDialog.js";import{Progress as Tr}from"./components/Progress/Progress.js";import{ProgressCard as kr}from"./components/ProgressCard/ProgressCard.js";import{QuoteBox as Sr}from"./components/Box/QuoteBox.js";import{RadioBlock as xr}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/RadioBlock.js";import{RadioBoolean as Pr}from"./components/Radio/RadioBoolean.js";import{RadioList as vr}from"./components/Radio/RadioList.js";import{RichTextEditor as Ir}from"./components/RichTextEditor/RichTextEditor.js";import{RoundInput as yr}from"./components/Input/RoundInput.js";import{RoundNumberInput as Lr}from"./components/Input/RoundNumberInput.js";import{ScatterPlot as br}from"./components/Chart/ScatterPlot/ScatterPlot.js";import{Score as Nr}from"./components/Number/Score.js";import{ScoreCard as Ar}from"./components/Cards/ScoreCard/ScoreCard.js";import{ScoreCardHeader as Hr}from"./components/Cards/ScoreCard/Header/ScoreCardHeader.js";import{ScoreContainer as Dr}from"./components/Badge/ScoreContainer.js";import{ScoreDistribution as Gr}from"./components/Chart/ScoreDistribution/ScoreDistribution.js";import{ScoreOverviewCard as Rr}from"./components/Cards/ScoreOverviewCard/ScoreOverviewCard.js";import{ScoreSelect as wr}from"./components/Select/ScoreSelect/ScoreSelect.js";import{ScoreValue as Ur}from"./components/Number/ScoreValue.js";import{SearchBox as Mr}from"./components/Input/SearchBox.js";import{SectionBox as Wr}from"./components/Box/SectionBox.js";import{SectionTabs as Er}from"./components/Tabs/SectionTabs/SectionTabs.js";import{SeeMoreCard as Vr}from"./components/Cards/SeeMoreCard/SeeMoreCard.js";import{SelectBlock as Or}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/SelectBlock.js";import{SelectionCard as zr}from"./components/Cards/SelectionCard/SelectionCard.js";import{SelectionCardGroup as Qr}from"./components/Cards/SelectionCard/SelectionCardGroup.js";import{Separator as qr}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/Separator.js";import{SolidGreyBox as Jr}from"./components/Box/SolidGreyBox.js";import{SpecialTab as Kr}from"./components/Tabs/FoodsTabs/FoodsTabTemplate.js";import{SuggestionBlock as Xr}from"./components/Layout/BlockList/Blocks/InnerInfoBlocks/SuggestionBlock.js";import{TextArrowList as Yr}from"./components/Text/TextArrowList.js";import{TextField as Zr}from"./components/Field/TextField.js";import{TextTitle as $r}from"./components/Text/TextTitle.js";import{TextTitleGreyIcon as _r}from"./components/Text/TextTitleGreyIcon.js";import{Textarea as ot}from"./components/Textarea/Textarea.js";import{ToggleSwitch as rt}from"./components/ToggleSwitch/ToggleSwitch.js";import{TopLinkAction as tt}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/TopLinkAction.js";import{TrajectoryCards as mt}from"./components/Cards/TrajectoryCards/TrajectoryCards.js";import{TrajectoryChart as st}from"./components/Chart/TrajectoryChart/TrajectoryChart.js";import{TypographyList as nt}from"./components/CustomTypography/TypographyList.js";import{UnitConverterPopover as et}from"./components/Form/UnitConverterPopover.js";import{ValueDisplay as it}from"./components/Layout/BlockList/Blocks/Common/ValueDisplay.js";import{ValueLabel as pt}from"./components/Chart/HistogramComparisonChart/ValueLabel.js";import{ValueSwitcher as ct}from"./components/Cards/ScoreCard/Header/ValueSwitcher/ValueSwitcher.js";import{WarningBox as at}from"./components/Box/WarningBox.js";import{WaterfallChart as ft}from"./components/Chart/WaterfallChart/WaterfallChart.js";import{WhiteBox as jt}from"./components/Box/WhiteBox.js";import{WhiteGrid as lt}from"./components/Box/WhiteGrid.js";import{WhitePopover as dt}from"./components/Popover/WhitePopover.js";import{WhitePopoverOnIcon as Bt}from"./components/Popover/WhitePopoverOnIcon.js";import{WinePilotTheme as Ct,WinepilotThemeOptions as ut}from"./themes/themes/WinePilotTheme.js";import{allColors as ht,allMainColors as gt,blueTheme as Ft,coralTheme as Tt,dataVisualizationColors as kt,extraColors as St,greenTheme as xt,greyTheme as Pt,orangeTheme as vt,redTheme as It,shadows as yt,yellowTheme as Lt}from"./themes/common/colors.js";import{allTypographyVariants as bt,deprecatedVariants as Nt,typographyConfig as At}from"./themes/common/MUIComponents/typography.js";import{anyToCheckbox as Ht,checkboxToAny as Dt}from"./components/Checkbox/helperFunctions.js";import{barChart as Gt,breadcrumb as Rt,countTabs as wt,custom as Ut,deleteButton as Mt,doughnutCard as Wt,formField as Et,ingredientCard as Vt,mediaUpload as Ot,numberWithUnit as zt,numbers as Qt,scoreCard as qt,scoreDetail as Jt,scoreOverviewCard as Kt,scoreValue as Xt,status as Yt,strokes as Zt,tabs as $t,tags as _t,toggleSwitch as om,tooltip as rm}from"./themes/common/custom.js";import{components as tm}from"./themes/common/components.js";import{computeSize as mm,iconMapping as sm}from"./components/Icons/iconConfig.js";import{illustationsMapping as nm}from"./components/Icons/illustrationsConfig.js";import{spacing as em}from"./themes/common/spacing.js";import{useResponsiveBreakpoints as im}from"./themes/responsive/useResponsiveBreakpoints.js";import{useResponsivePadding as pm}from"./themes/responsive/useResponsivePadding.js";export{i as AccordionProduct,p as AdditionalContentBox,c as AnchoredPopover,j as Article,l as ArticlesBox,d as Badge,B as Banner,C as BigPopoverLayout,u as BlockItemContainer,h as BlockItemInner,g as BlockListContainer,F as BottomSheetDialog,T as BoxStyled,S as BreadcrumbItem,x as Breadcrumbs,P as BreakdownTable,n as Button,v as ButtonTabs,I as CardImage,y as CategoryBox,L as CheckboxBlock,b as CollectiveTheme,N as CollectiveThemeOptions,A as ComingSoonBadge,H as ComparisonArrow,D as ComparisonBlock,G as ComparisonLabel,R as ConfirmDialog,w as ContextualContentBox,U as CoordinatePopover,M as CountTabs,W as CustomRender,E as CustomToggleButton,O as CustomToggleButtonNodeTitle,Q as CustomTypography,q as CustomizedAxisTick,J as DefaultUserAction,K as DottedBox,X as DoughnutCard,Y as DoughnutChart,Z as DrawerAction,$ as EcoScoreCell,_ as EditHeader,oo as EllipsisItem,ro as EmptyForm,to as EvolutionChart,mo as FixedMultiValueFilter,so as FoodPilotTheme,no as FoodpilotThemeOptions,eo as FoodsBadge,io as FoodsCheckbox,po as FoodsDeleteButton,co as FoodsFormBase,ao as FoodsIcon,fo as FoodsIconButton,jo as FoodsIllustrations,lo as FoodsNavbar,Bo as FoodsPagination,Co as FoodsPaginationItem,uo as FoodsRadioList,ho as FoodsSearch,go as FoodsSelect,Fo as FoodsSelectServerPagination,To as FoodsTabs,So as FoodsTags,xo as FoodsTextInput,Po as FoodsThemeOptionsProvider,vo as FoodsThemeProvider,Io as FoodsToggleButton,yo as FoodsTooltip,Lo as FoodsTreeview,bo as FoodsUserTags,No as FormAccordion,Ao as FormBase,Ho as FormBaseContextProvider,Go as FormBox,Ro as FormPropertyBox,wo as FormTopBar,Uo as FormUnit,Mo as GenericAccordion,Wo as GreyTextCell,Eo as HeaderNav,a as HeadlessPopover,qo as HelperBox,Jo as HeroBlock,Ko as HistogramComparisonChart,Xo as HorizontalGaugeChart,Yo as IconThread,Zo as IndicatorBlock,$o as InfoBox,_o as InfoHeaderWithIllustration,or as InitHeader,rr as LeftComparisonPart,tr as LightIndicatorBlock,mr as LineGroupBox,sr as LinearProgress,nr as LinkAction,er as ListHeader,ir as MRTGrid,pr as MRT_GRID_HUB_LAYOUT,cr as MultiValueFilter,Vo as NavBarLink,Oo as Navbar,ar as NumberField,fr as NumberWithUnit,jr as OptionsPopover,lr as PageItem,dr as PageUpAndDownItem,Br as Pills,Cr as PointsCell,ur as PolymorphicChart,hr as PolymorphicChartRenderer,gr as PrimaryCheckbox,Fr as PrimaryDialog,Tr as Progress,kr as ProgressCard,Sr as QuoteBox,xr as RadioBlock,Pr as RadioBoolean,vr as RadioList,Ir as RichTextEditor,yr as RoundInput,Lr as RoundNumberInput,br as ScatterPlot,Nr as Score,Ar as ScoreCard,Hr as ScoreCardHeader,Dr as ScoreContainer,Gr as ScoreDistribution,Rr as ScoreOverviewCard,wr as ScoreSelect,Ur as ScoreValue,Mr as SearchBox,k as SecondaryTabs,Wr as SectionBox,Er as SectionTabs,Vr as SeeMoreCard,Or as SelectBlock,zr as SelectionCard,Qr as SelectionCardGroup,qr as Separator,Jr as SolidGreyBox,Kr as SpecialTab,ko as SpecialTabs,zo as SubMenu,Xr as SuggestionBlock,V as TertiaryToggleButton,z as TertiaryToggleButtonNodeTitle,Yr as TextArrowList,Zr as TextField,$r as TextTitle,_r as TextTitleGreyIcon,ot as Textarea,f as ThemedPopover,rt as ToggleSwitch,tt as TopLinkAction,mt as TrajectoryCards,st as TrajectoryChart,e as Typography,nt as TypographyList,et as UnitConverterPopover,Qo as UserNav,it as ValueDisplay,pt as ValueLabel,ct as ValueSwitcher,at as WarningBox,ft as WaterfallChart,jt as WhiteBox,lt as WhiteGrid,dt as WhitePopover,Bt as WhitePopoverOnIcon,Ct as WinePilotTheme,ut as WinepilotThemeOptions,ht as allColors,gt as allMainColors,bt as allTypographyVariants,Ht as anyToCheckbox,Gt as barChart,Ft as blueTheme,Rt as breadcrumb,Dt as checkboxToAny,tm as components,mm as computeSize,Tt as coralTheme,wt as countTabs,Ut as custom,kt as dataVisualizationColors,Mt as deleteButton,Nt as deprecatedVariants,Wt as doughnutCard,St as extraColors,Et as formField,o as getThemeLogo,xt as greenTheme,Pt as greyTheme,sm as iconMapping,nm as illustationsMapping,Vt as ingredientCard,r as isTheme,Ot as mediaUpload,zt as numberWithUnit,Qt as numbers,vt as orangeTheme,It as redTheme,qt as scoreCard,Jt as scoreDetail,Kt as scoreOverviewCard,Xt as scoreValue,yt as shadows,em as spacing,Yt as status,Zt as strokes,$t as tabs,_t as tags,t as themeLogos,m as themeOptions,s as themes,om as toggleSwitch,rm as tooltip,At as typographyConfig,Do as useFormBaseContext,im as useResponsiveBreakpoints,pm as useResponsivePadding,Lt 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{AdditionalContentBox as p}from"./components/Box/AdditionalContentBox.js";import{AnchoredPopover as c,HeadlessPopover as a,ThemedPopover as f}from"./components/Popover/AnchoredPopover.js";import{Article as j}from"./components/CMS/ArticleBlock/Article.js";import{ArticlesBox as l}from"./components/CMS/ArticleBlock/ArticlesBox.js";import{Badge as d}from"./components/Badge/Badge.js";import{Banner as B}from"./components/Banner/Banner.js";import{BigPopoverLayout as C}from"./components/Popover/BigPopoverLayout.js";import{BlockItemContainer as u}from"./components/Layout/BlockList/Blocks/Container/BlockItemContainer.js";import{BlockItemInner as h}from"./components/Layout/BlockList/Blocks/Container/BlockItemInner.js";import{BlockListContainer as g}from"./components/Layout/BlockList/BlockListContainer.js";import{BottomSheetDialog as F}from"./components/Dialog/BottomSheetDialog.js";import{BoxStyled as T,SecondaryTabs as k}from"./components/Tabs/SecondaryTabs.js";import{BreadcrumbItem as S}from"./components/Navigation/Breadcrumbs/BreadcrumbItem.js";import{Breadcrumbs as x}from"./components/Navigation/Breadcrumbs/Breadcrumbs.js";import{BreakdownTable as P}from"./components/Chart/BreakdownTable/BreakdownTable.js";import{ButtonTabs as v}from"./components/Tabs/ButtonTabs.js";import{CardImage as I}from"./components/CardImage.js";import{CategoryBox as y}from"./components/Box/CategoryBox.js";import{CheckboxBlock as L}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/CheckboxBlock.js";import{CollectiveTheme as b,CollectiveThemeOptions as N}from"./themes/themes/CollectiveTheme.js";import{ComingSoonBadge as A}from"./components/Badge/ComingSoonBadge.js";import{ComparisonArrow as H}from"./components/ComparisonBlock/ComparisonArrow.js";import{ComparisonBlock as D}from"./components/ComparisonBlock/ComparisonBlock.js";import{ComparisonLabel as G}from"./components/Chart/HistogramComparisonChart/ComparisonLabel.js";import{ConfirmDialog as R}from"./components/Form/FoodsFormBase/ConfirmDialog.js";import{ContextualContentBox as w}from"./components/Box/ContextualContentBox.js";import{CoordinatePopover as U}from"./components/Popover/CoordinatePopover.js";import{CountTabs as M}from"./components/Tabs/CountTabs/CountTabs.js";import{CustomRender as W}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/CustomRender.js";import{CustomToggleButton as E,TertiaryToggleButton as V}from"./components/Button/TertiaryToggleButton.js";import{CustomToggleButtonNodeTitle as O,TertiaryToggleButtonNodeTitle as z}from"./components/Button/TertiaryToggleButtonNodeTitle.js";import{CustomTypography as Q}from"./components/CustomTypography/CustomTypography.js";import{CustomizedAxisTick as q}from"./components/Chart/HistogramComparisonChart/CustomizedAxisTick.js";import{DefaultUserAction as J}from"./components/Navigation/FoodsNavBar/Plugin/DefaultUserAction.js";import{DottedBox as K}from"./components/Box/DottedBox.js";import{DoughnutCard as X}from"./components/Cards/DoughnutCard/DoughnutCard.js";import{DoughnutChart as Y}from"./components/Chart/DoughnutChart/DoughnutChart.js";import{DrawerAction as Z}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/DrawerAction.js";import{EcoScoreCell as $}from"./components/Grid/Cell/EcoScoreCell.js";import{EditHeader as _}from"./components/Layout/BlockList/Headers/EditHeader.js";import{EllipsisItem as oo}from"./components/Pagination/PageItems/EllipsisItem.js";import{EmptyForm as ro}from"./components/Layout/BlockList/Blocks/InnerInfoBlocks/EmptyForm.js";import{EvolutionChart as to}from"./components/Chart/EvolutionChart/EvolutionChart.js";import{FixedMultiValueFilter as mo}from"./components/Filter/FixedMultiValueFilter.js";import{FoodPilotTheme as so,FoodpilotThemeOptions as no}from"./themes/themes/FoodPilotTheme.js";import{FoodsBadge as eo}from"./components/Badge/FoodsBadge.js";import{FoodsCheckbox as io}from"./components/Checkbox/FoodsCheckbox.js";import{FoodsDeleteButton as po}from"./components/Button/FoodsDeleteButton.js";import{FoodsFormBase as co}from"./components/Form/FoodsFormBase/FoodsFormBase.js";import{FoodsIcon as ao}from"./components/Icons/FoodsIcon.js";import{FoodsIconButton as fo}from"./components/Button/FoodsIconButton.js";import{FoodsIllustrations as jo}from"./components/Icons/FoodsIllustrations.js";import{FoodsNavbar as lo}from"./components/Navigation/FoodsNavBar/FoodsNavbar.js";import{FoodsPagination as Bo}from"./components/Pagination/FoodsPagination.js";import{FoodsPaginationItem as Co}from"./components/Pagination/FoodsPaginationItem.js";import{FoodsRadioList as uo}from"./components/Radio/FoodsRadioList.js";import{FoodsSearch as ho}from"./components/Search/FoodsSearch.js";import{FoodsSelect as go,FoodsSelectServerPagination as Fo}from"./components/Select/FoodsSelect/FoodsSelect.js";import{FoodsTabs as To,SpecialTabs as ko}from"./components/Tabs/FoodsTabs/FoodsTabs.js";import{FoodsTags as So}from"./components/Tags/FoodsTags.js";import{FoodsTextInput as xo}from"./components/Form/FoodsFormFields/FoodsTextInput.js";import{FoodsThemeOptionsProvider as Po,FoodsThemeProvider as vo}from"./themes/FoodsThemeProvider.js";import{FoodsToggleButton as Io}from"./components/Button/FoodsToggleButton.js";import{FoodsTooltip as yo}from"./components/Tooltip/FoodsTooltip.js";import{FoodsTreeview as Lo}from"./components/Treeview/Treeview.js";import{FoodsUserTags as bo}from"./components/Tags/FoodsUserTags.js";import{FormAccordion as No}from"./components/Accordion/FormAccordion.js";import{FormBase as Ao}from"./components/Form/FormBase.js";import{FormBaseContextProvider as Ho,useFormBaseContext as Do}from"./components/Form/FoodsFormBase/FormBaseContext.js";import{FormBox as Go}from"./components/Form/FormBox.js";import{FormPropertyBox as Ro}from"./components/Form/FormPropertyBox.js";import{FormTopBar as wo}from"./components/Form/FoodsFormBase/FormTopBar/FormTopBar.js";import{FormUnit as Uo}from"./components/Form/FormUnit.js";import{GenericAccordion as Mo}from"./components/Accordion/GenericAccordion.js";import{GreyTextCell as Wo}from"./components/Grid/Cell/GreyCell.js";import{HeaderNav as Eo,NavBarLink as Vo,Navbar as Oo,SubMenu as zo,UserNav as Qo}from"./components/Navigation/Navbar.js";import{HelperBox as qo}from"./components/Box/HelperBox.js";import{HeroBlock as Jo}from"./components/CMS/HeroBlock/HeroBlock.js";import{HistogramComparisonChart as Ko}from"./components/Chart/HistogramComparisonChart/HistogramComparisonChart.js";import{HorizontalGaugeChart as Xo}from"./components/Chart/HorizontalGauge/HorizontalGaugeChart.js";import{IconThread as Yo}from"./components/Navigation/IconThread.js";import{IndicatorBlock as Zo}from"./components/CMS/IndicatorBlock/IndicatorBlock.js";import{InfoBox as $o}from"./components/Box/InfoBox.js";import{InfoHeaderWithIllustration as _o}from"./components/Layout/InfoHeaderWithIllustration.js";import{InitHeader as or}from"./components/Layout/BlockList/Headers/InitHeader.js";import{LeftComparisonPart as rr}from"./components/Layout/BlockList/Blocks/Common/LeftComparisonPart.js";import{LightIndicatorBlock as tr}from"./components/CMS/IndicatorBlock/LightIndicatorBlock.js";import{LineGroupBox as mr}from"./components/Box/LineGroupBox.js";import{LinearProgress as sr}from"./components/LinearProgress.js";import{LinkAction as nr}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/LinkAction.js";import{ListHeader as er}from"./components/Layout/BlockList/Headers/ListHeader.js";import{MRTGrid as ir}from"./components/Grid/MRTGrid.js";import{MRT_GRID_HUB_LAYOUT as pr}from"./components/Grid/mrtGridLayout.js";import{MultiValueFilter as cr}from"./components/Filter/MultiValueFilter.js";import{NumberField as ar}from"./components/Field/NumberField.js";import{NumberWithUnit as fr}from"./components/Number/NumberWithUnit.js";import{OptionsPopover as jr}from"./components/Popover/OptionsPopover.js";import{PageItem as lr}from"./components/Pagination/PageItems/PageItem.js";import{PageUpAndDownItem as dr}from"./components/Pagination/PageItems/PageUpAndDownItem.js";import{FoodsPills as Br}from"./components/Input/Pills/Pills.js";import{PointsCell as Cr}from"./components/Grid/Cell/PointsCell.js";import{PolymorphicChart as ur}from"./components/Chart/PolymorphicChart/PolymorphicChart.js";import{PolymorphicChartRenderer as hr}from"./components/Chart/PolymorphicChart/PolymorphicChartRenderer.js";import{PrimaryCheckbox as gr}from"./components/Checkbox/PrimaryCheckbox.js";import{PrimaryDialog as Fr}from"./components/Dialog/PrimaryDialog.js";import{Progress as Tr}from"./components/Progress/Progress.js";import{ProgressCard as kr}from"./components/ProgressCard/ProgressCard.js";import{QuoteBox as Sr}from"./components/Box/QuoteBox.js";import{RadioBlock as xr}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/RadioBlock.js";import{RadioBoolean as Pr}from"./components/Radio/RadioBoolean.js";import{RadioList as vr}from"./components/Radio/RadioList.js";import{RichTextEditor as Ir}from"./components/RichTextEditor/RichTextEditor.js";import{RoundInput as yr}from"./components/Input/RoundInput.js";import{RoundNumberInput as Lr}from"./components/Input/RoundNumberInput.js";import{ScatterPlot as br}from"./components/Chart/ScatterPlot/ScatterPlot.js";import{Score as Nr}from"./components/Number/Score.js";import{ScoreCard as Ar}from"./components/Cards/ScoreCard/ScoreCard.js";import{ScoreCardHeader as Hr}from"./components/Cards/ScoreCard/Header/ScoreCardHeader.js";import{ScoreContainer as Dr}from"./components/Badge/ScoreContainer.js";import{ScoreDistribution as Gr}from"./components/Chart/ScoreDistribution/ScoreDistribution.js";import{ScoreOverviewCard as Rr}from"./components/Cards/ScoreOverviewCard/ScoreOverviewCard.js";import{ScoreSelect as wr}from"./components/Select/ScoreSelect/ScoreSelect.js";import{ScoreValue as Ur}from"./components/Number/ScoreValue.js";import{SearchBox as Mr}from"./components/Input/SearchBox.js";import{SectionBox as Wr}from"./components/Box/SectionBox.js";import{SectionTabs as Er}from"./components/Tabs/SectionTabs/SectionTabs.js";import{SeeMoreCard as Vr}from"./components/Cards/SeeMoreCard/SeeMoreCard.js";import{SelectBlock as Or}from"./components/Layout/BlockList/Blocks/InnerInputBlocks/SelectBlock.js";import{SelectionCard as zr}from"./components/Cards/SelectionCard/SelectionCard.js";import{SelectionCardGroup as Qr}from"./components/Cards/SelectionCard/SelectionCardGroup.js";import{Separator as qr}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/Separator.js";import{SolidGreyBox as Jr}from"./components/Box/SolidGreyBox.js";import{SpecialTab as Kr}from"./components/Tabs/FoodsTabs/FoodsTabTemplate.js";import{SuggestionBlock as Xr}from"./components/Layout/BlockList/Blocks/InnerInfoBlocks/SuggestionBlock.js";import{TextArrowList as Yr}from"./components/Text/TextArrowList.js";import{TextField as Zr}from"./components/Field/TextField.js";import{TextTitle as $r}from"./components/Text/TextTitle.js";import{TextTitleGreyIcon as _r}from"./components/Text/TextTitleGreyIcon.js";import{Textarea as ot}from"./components/Textarea/Textarea.js";import{ToggleSwitch as rt}from"./components/ToggleSwitch/ToggleSwitch.js";import{TopLinkAction as tt}from"./components/Navigation/FoodsNavBar/Sections/UserButtons/Button/TopLinkAction.js";import{TrajectoryCards as mt}from"./components/Cards/TrajectoryCards/TrajectoryCards.js";import{TrajectoryChart as st}from"./components/Chart/TrajectoryChart/TrajectoryChart.js";import{TypographyList as nt}from"./components/CustomTypography/TypographyList.js";import{UnitConverterPopover as et}from"./components/Form/UnitConverterPopover.js";import{UnsavedChangesDialog as it}from"./components/Dialog/UnsavedChangesDialog.js";import{ValueDisplay as pt}from"./components/Layout/BlockList/Blocks/Common/ValueDisplay.js";import{ValueLabel as ct}from"./components/Chart/HistogramComparisonChart/ValueLabel.js";import{ValueSwitcher as at}from"./components/Cards/ScoreCard/Header/ValueSwitcher/ValueSwitcher.js";import{WarningBox as ft}from"./components/Box/WarningBox.js";import{WaterfallChart as jt}from"./components/Chart/WaterfallChart/WaterfallChart.js";import{WhiteBox as lt}from"./components/Box/WhiteBox.js";import{WhiteGrid as dt}from"./components/Box/WhiteGrid.js";import{WhitePopover as Bt}from"./components/Popover/WhitePopover.js";import{WhitePopoverOnIcon as Ct}from"./components/Popover/WhitePopoverOnIcon.js";import{WinePilotTheme as ut,WinepilotThemeOptions as ht}from"./themes/themes/WinePilotTheme.js";import{allColors as gt,allMainColors as Ft,blueTheme as Tt,coralTheme as kt,dataVisualizationColors as St,extraColors as xt,greenTheme as Pt,greyTheme as vt,orangeTheme as It,redTheme as yt,shadows as Lt,yellowTheme as bt}from"./themes/common/colors.js";import{allTypographyVariants as Nt,deprecatedVariants as At,typographyConfig as Ht}from"./themes/common/MUIComponents/typography.js";import{anyToCheckbox as Dt,checkboxToAny as Gt}from"./components/Checkbox/helperFunctions.js";import{barChart as Rt,breadcrumb as wt,countTabs as Ut,custom as Mt,deleteButton as Wt,doughnutCard as Et,formField as Vt,ingredientCard as Ot,mediaUpload as zt,numberWithUnit as Qt,numbers as qt,scoreCard as Jt,scoreDetail as Kt,scoreOverviewCard as Xt,scoreValue as Yt,status as Zt,strokes as $t,tabs as _t,tags as om,toggleSwitch as rm,tooltip as tm}from"./themes/common/custom.js";import{components as mm}from"./themes/common/components.js";import{computeSize as sm,iconMapping as nm}from"./components/Icons/iconConfig.js";import{illustationsMapping as em}from"./components/Icons/illustrationsConfig.js";import{spacing as im}from"./themes/common/spacing.js";import{useResponsiveBreakpoints as pm}from"./themes/responsive/useResponsiveBreakpoints.js";import{useResponsivePadding as cm}from"./themes/responsive/useResponsivePadding.js";export{i as AccordionProduct,p as AdditionalContentBox,c as AnchoredPopover,j as Article,l as ArticlesBox,d as Badge,B as Banner,C as BigPopoverLayout,u as BlockItemContainer,h as BlockItemInner,g as BlockListContainer,F as BottomSheetDialog,T as BoxStyled,S as BreadcrumbItem,x as Breadcrumbs,P as BreakdownTable,n as Button,v as ButtonTabs,I as CardImage,y as CategoryBox,L as CheckboxBlock,b as CollectiveTheme,N as CollectiveThemeOptions,A as ComingSoonBadge,H as ComparisonArrow,D as ComparisonBlock,G as ComparisonLabel,R as ConfirmDialog,w as ContextualContentBox,U as CoordinatePopover,M as CountTabs,W as CustomRender,E as CustomToggleButton,O as CustomToggleButtonNodeTitle,Q as CustomTypography,q as CustomizedAxisTick,J as DefaultUserAction,K as DottedBox,X as DoughnutCard,Y as DoughnutChart,Z as DrawerAction,$ as EcoScoreCell,_ as EditHeader,oo as EllipsisItem,ro as EmptyForm,to as EvolutionChart,mo as FixedMultiValueFilter,so as FoodPilotTheme,no as FoodpilotThemeOptions,eo as FoodsBadge,io as FoodsCheckbox,po as FoodsDeleteButton,co as FoodsFormBase,ao as FoodsIcon,fo as FoodsIconButton,jo as FoodsIllustrations,lo as FoodsNavbar,Bo as FoodsPagination,Co as FoodsPaginationItem,uo as FoodsRadioList,ho as FoodsSearch,go as FoodsSelect,Fo as FoodsSelectServerPagination,To as FoodsTabs,So as FoodsTags,xo as FoodsTextInput,Po as FoodsThemeOptionsProvider,vo as FoodsThemeProvider,Io as FoodsToggleButton,yo as FoodsTooltip,Lo as FoodsTreeview,bo as FoodsUserTags,No as FormAccordion,Ao as FormBase,Ho as FormBaseContextProvider,Go as FormBox,Ro as FormPropertyBox,wo as FormTopBar,Uo as FormUnit,Mo as GenericAccordion,Wo as GreyTextCell,Eo as HeaderNav,a as HeadlessPopover,qo as HelperBox,Jo as HeroBlock,Ko as HistogramComparisonChart,Xo as HorizontalGaugeChart,Yo as IconThread,Zo as IndicatorBlock,$o as InfoBox,_o as InfoHeaderWithIllustration,or as InitHeader,rr as LeftComparisonPart,tr as LightIndicatorBlock,mr as LineGroupBox,sr as LinearProgress,nr as LinkAction,er as ListHeader,ir as MRTGrid,pr as MRT_GRID_HUB_LAYOUT,cr as MultiValueFilter,Vo as NavBarLink,Oo as Navbar,ar as NumberField,fr as NumberWithUnit,jr as OptionsPopover,lr as PageItem,dr as PageUpAndDownItem,Br as Pills,Cr as PointsCell,ur as PolymorphicChart,hr as PolymorphicChartRenderer,gr as PrimaryCheckbox,Fr as PrimaryDialog,Tr as Progress,kr as ProgressCard,Sr as QuoteBox,xr as RadioBlock,Pr as RadioBoolean,vr as RadioList,Ir as RichTextEditor,yr as RoundInput,Lr as RoundNumberInput,br as ScatterPlot,Nr as Score,Ar as ScoreCard,Hr as ScoreCardHeader,Dr as ScoreContainer,Gr as ScoreDistribution,Rr as ScoreOverviewCard,wr as ScoreSelect,Ur as ScoreValue,Mr as SearchBox,k as SecondaryTabs,Wr as SectionBox,Er as SectionTabs,Vr as SeeMoreCard,Or as SelectBlock,zr as SelectionCard,Qr as SelectionCardGroup,qr as Separator,Jr as SolidGreyBox,Kr as SpecialTab,ko as SpecialTabs,zo as SubMenu,Xr as SuggestionBlock,V as TertiaryToggleButton,z as TertiaryToggleButtonNodeTitle,Yr as TextArrowList,Zr as TextField,$r as TextTitle,_r as TextTitleGreyIcon,ot as Textarea,f as ThemedPopover,rt as ToggleSwitch,tt as TopLinkAction,mt as TrajectoryCards,st as TrajectoryChart,e as Typography,nt as TypographyList,et as UnitConverterPopover,it as UnsavedChangesDialog,Qo as UserNav,pt as ValueDisplay,ct as ValueLabel,at as ValueSwitcher,ft as WarningBox,jt as WaterfallChart,lt as WhiteBox,dt as WhiteGrid,Bt as WhitePopover,Ct as WhitePopoverOnIcon,ut as WinePilotTheme,ht as WinepilotThemeOptions,gt as allColors,Ft as allMainColors,Nt as allTypographyVariants,Dt as anyToCheckbox,Rt as barChart,Tt as blueTheme,wt as breadcrumb,Gt as checkboxToAny,mm as components,sm as computeSize,kt as coralTheme,Ut as countTabs,Mt as custom,St as dataVisualizationColors,Wt as deleteButton,At as deprecatedVariants,Et as doughnutCard,xt as extraColors,Vt as formField,o as getThemeLogo,Pt as greenTheme,vt as greyTheme,nm as iconMapping,em as illustationsMapping,Ot as ingredientCard,r as isTheme,zt as mediaUpload,Qt as numberWithUnit,qt as numbers,It as orangeTheme,yt as redTheme,Jt as scoreCard,Kt as scoreDetail,Xt as scoreOverviewCard,Yt as scoreValue,Lt as shadows,im as spacing,Zt as status,$t as strokes,_t as tabs,om as tags,t as themeLogos,m as themeOptions,s as themes,rm as toggleSwitch,tm as tooltip,Ht as typographyConfig,Do as useFormBaseContext,pm as useResponsiveBreakpoints,cm as useResponsivePadding,bt as yellowTheme};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatavizVariant } from '../../../components/Icons/illustrationProps';
|
|
2
2
|
export type IconButtonVariants = "icon-xs-nobackground" | "icon-s-nobackground" | "icon-m-nobackground" | "icon-xs-withbackground" | "icon-s-withbackground" | "icon-m-withbackground";
|
|
3
|
-
export type TagsButtonVariants = "tags-grey" | "tags-black" | "tags-white" | "tags-red" | "tags-green" | "tags-blue" | "tags-coral";
|
|
3
|
+
export type TagsButtonVariants = "tags-grey" | "tags-black" | "tags-white" | "tags-red" | "tags-green" | "tags-blue" | "tags-coral" | "tags-brand";
|
|
4
4
|
export type customButtonVariants = "primary" | "secondary" | "ternary" | "text" | "black-text" | "selected-menu" | "selected-submenu" | "default-menu" | "black-filled" | "white-filled" | "white-filled-no-shadow" | "select" | "validate" | "error" | "delete" | "delete-outline" | IconButtonVariants | TagsButtonVariants | DatavizVariant;
|
|
5
5
|
type ButtonNewVariants = Record<customButtonVariants, React.CSSProperties>;
|
|
6
6
|
type ButtonPropsNewVariants = Record<customButtonVariants, true>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CSSObject, Theme } from '@mui/material';
|
|
2
|
+
import { TagsButtonVariants } from './buttons';
|
|
3
|
+
type TagsOwnerState = {
|
|
4
|
+
onClick?: unknown;
|
|
5
|
+
};
|
|
6
|
+
export declare const getTagStyle: (variant: TagsButtonVariants, theme: Theme, ownerState: TagsOwnerState) => CSSObject;
|
|
7
|
+
export declare const isTagVariant: (variant: string | undefined) => variant is TagsButtonVariants;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o={"tags-grey":(o,r)=>({padding:o.spacing(0,1),border:`1px solid ${o.custom.grey[400]}`,borderRadius:"4px",backgroundColor:o.custom.grey[400],color:o.custom.grey[2800],height:"24px",minWidth:"auto",...void 0!==r.onClick?{cursor:"pointer",":hover":{border:`1px solid ${o.custom.grey[500]}`,backgroundColor:o.custom.grey[300]},":active":{border:`1px solid ${o.custom.grey[500]}`,backgroundColor:o.custom.grey[500]},":disabled":{border:`1px solid ${o.custom.grey[500]}`,backgroundColor:o.custom.grey[100],color:o.custom.grey[1400]}}:{cursor:"default",":hover":{cursor:"default"},"&.Mui-disabled":{color:o.custom.grey[2800]}}}),"tags-black":(o,r)=>({padding:o.spacing(0,1),border:`1px solid ${o.custom.grey[400]}`,borderRadius:"4px",background:"linear-gradient(180deg, #484945 0%, #2A2B27 100%)",color:o.custom.grey[100],height:"24px",minWidth:"auto",...void 0!==r.onClick?{cursor:"pointer",":hover":{border:`1px solid ${o.custom.grey[500]}`,backgroundColor:o.custom.grey[300]},":active":{border:`1px solid ${o.custom.grey[500]}`,backgroundColor:o.custom.grey[500]},":disabled":{border:`1px solid ${o.custom.grey[500]}`,background:o.custom.grey[100],backgroundColor:o.custom.grey[100],color:o.custom.grey[1400]}}:{cursor:"default",":hover":{cursor:"default"},"&.Mui-disabled":{color:o.custom.grey[100]}}}),"tags-white":(o,r)=>({padding:o.spacing(0,1),border:`1px solid ${o.custom.grey[400]} !important`,borderRadius:"4px",backgroundColor:o.custom.grey[100],color:o.custom.grey[2800],height:"24px",minWidth:"auto",cursor:"default",...void 0!==r.onClick&&{cursor:"pointer",":hover":{border:`1px solid ${o.custom.grey[500]}`,backgroundColor:o.custom.grey[300]},":active":{border:`1px solid ${o.custom.grey[500]}`,backgroundColor:o.custom.grey[500]},":disabled":{border:`1px solid ${o.custom.grey[500]}`,backgroundColor:o.custom.grey[100],color:o.custom.grey[1400]}},...void 0===r.onClick&&{"&.Mui-disabled":{color:o.custom.grey[2800]}}}),"tags-red":(o,r)=>({padding:o.spacing(0,1),border:`1px solid ${o.custom.red[100]}`,borderRadius:"4px",backgroundColor:o.custom.red[100],color:o.custom.red[600],height:"24px",minWidth:"auto",...void 0!==r.onClick?{cursor:"pointer",":hover":{border:`1px solid ${o.custom.grey[500]}`,backgroundColor:o.custom.grey[300]},":active":{border:`1px solid ${o.custom.grey[500]}`,backgroundColor:o.custom.grey[500]},":disabled":{border:`1px solid ${o.custom.grey[500]}`,backgroundColor:o.custom.grey[100],color:o.custom.grey[1400]}}:{cursor:"default",":hover":{cursor:"default"},"&.Mui-disabled":{color:o.custom.red[600]}}}),"tags-green":(o,r)=>({padding:o.spacing(0,1),borderRadius:"4px",height:"24px",minWidth:"auto",border:`1px solid ${o.custom.grey[400]}`,backgroundColor:o.custom.green[100],color:o.custom.green[600],...void 0!==r.onClick?{cursor:"pointer",":hover":{border:`1px solid ${o.custom.grey[400]}`,backgroundColor:o.custom.green[100],color:o.custom.green[600]},":active":{border:`1px solid ${o.custom.grey[500]}`,backgroundColor:o.custom.grey[500]},":disabled":{border:`1px solid ${o.custom.grey[500]}`,backgroundColor:o.custom.grey[100],color:o.custom.grey[1400]}}:{cursor:"default",":hover":{cursor:"default"},"&.Mui-disabled":{color:o.custom.green[600]}}}),"tags-blue":(o,r)=>({padding:o.spacing(0,1),borderRadius:"4px",height:"24px",minWidth:"auto",border:`1px solid ${o.custom.blue[100]}`,backgroundColor:o.custom.blue[100],color:o.custom.blue[700],...void 0!==r.onClick?{cursor:"pointer",":hover":{border:`1px solid ${o.custom.blue[200]}`,backgroundColor:o.custom.blue[50],color:o.custom.blue[700]},":active":{border:`1px solid ${o.custom.blue[300]}`,backgroundColor:o.custom.blue[200]},":disabled":{border:`1px solid ${o.custom.grey[500]}`,backgroundColor:o.custom.grey[100],color:o.custom.grey[1400]}}:{cursor:"default",":hover":{cursor:"default"},"&.Mui-disabled":{color:o.custom.blue[700]}}}),"tags-coral":(o,r)=>({padding:o.spacing(0,1),borderRadius:"4px",height:"24px",minWidth:"auto",border:`1px solid ${o.custom.coral[100]}`,backgroundColor:o.custom.coral[100],color:o.custom.coral[700],...void 0!==r.onClick?{cursor:"pointer",":hover":{border:`1px solid ${o.custom.coral[200]}`,backgroundColor:o.custom.coral[50],color:o.custom.coral[700]},":active":{border:`1px solid ${o.custom.coral[300]}`,backgroundColor:o.custom.coral[200]},":disabled":{border:`1px solid ${o.custom.grey[500]}`,backgroundColor:o.custom.grey[100],color:o.custom.grey[1400]}}:{cursor:"default",":hover":{cursor:"default"},"&.Mui-disabled":{color:o.custom.coral[700]}}}),"tags-brand":(o,r)=>({padding:o.spacing(0,1),borderRadius:"4px",height:"24px",minWidth:"auto",border:`1px solid ${o.palette.primary[100]}`,backgroundColor:o.palette.primary[100],color:o.palette.primary[800],...void 0!==r.onClick?{cursor:"pointer",":hover":{border:`1px solid ${o.palette.primary[200]}`,backgroundColor:o.palette.primary[50],color:o.palette.primary[800]},":active":{border:`1px solid ${o.palette.primary[300]}`,backgroundColor:o.palette.primary[200],color:o.palette.primary[900]},":disabled":{border:`1px solid ${o.custom.grey[500]}`,backgroundColor:o.custom.grey[100],color:o.custom.grey[1400]}}:{cursor:"default",":hover":{cursor:"default"},"&.Mui-disabled":{color:o.palette.primary[800]}}})},r=(r,e,c)=>o[r](e,c),e=["tags-grey","tags-black","tags-white","tags-red","tags-green","tags-blue","tags-coral","tags-brand"],c=o=>e.includes(o);export{r as getTagStyle,c as isTagVariant};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{alpha as o}from"@mui/material";const r={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},styleOverrides:{root:({theme:r,ownerState:e})=>{const t=e.variant,d=e.variant?.startsWith("dataviz");if(d){const o=parseInt((t??"").split("-")[1]),e=r.custom.dataviz.colorsWithExtra[o];if(void 0!==e)return{textTransform:"none",fontSize:"0.9rem",lineHeight:"1rem",borderRadius:r.spacing(1),height:"40px",fontWeight:700,transition:"none",color:r.custom.grey[100],boxShadow:"0px 4px 8px 0px #2A2B2714",background:e.main,":hover":{background:e.variant[700]},":disabled":{background:e.variant[100]},":active":{background:e.variant[700]}}}return{textTransform:"none",fontSize:"0.9rem",lineHeight:"1rem",borderRadius:r.spacing(1),height:"40px",fontWeight:700,..."primary"===t&&{transition:"none",background:`linear-gradient(${r.palette.primary[400]}, ${r.palette.primary[600]})`,color:r.custom.grey[100],boxShadow:"0px 4px 8px 0px #2A2B2714"},..."secondary"===t&&{border:`1px solid ${r.custom.grey[500]}`,background:`linear-gradient(${r.custom.grey[100]}}, ${r.custom.grey[300]})`},..."ternary"===t&&{border:`1px solid ${r.custom.grey[500]}`,background:r.custom.grey.gradientLight},..."text"===t&&{transition:"none",paddingInline:"0",color:r.palette.primary[700],fontWeight:"700"},..."selected-menu"===t&&{color:"white",background:`linear-gradient(${r.palette.primary[400]}, ${r.palette.primary[600]})`,borderRadius:"8px",padding:0},..."selected-submenu"===t&&{color:"white",backgroundColor:r.custom.grey[2300],background:r.custom.grey[2300],borderRadius:"8px",padding:0},..."default-menu"===t&&{color:r.custom.grey[100],background:"inherit",borderRadius:"8px",padding:0},..."black-text"===t&&{color:r.custom.grey[2800],background:"none",fontWeight:"600"},..."black-filled"===t&&{borderRadius:"8px",background:`linear-gradient(180deg, ${r.custom.grey[2600]} 0%, ${r.custom.grey[3e3]} 100%)`,boxShadow:"0px 4px 8px 0px rgba(42, 43, 39, 0.08)",color:r.custom.grey[100]},..."white-filled"===t&&{borderRadius:"8px",border:"1px solid "+r.custom.grey[500],background:`linear-gradient(180deg, ${r.custom.grey[100]} 0%, ${r.custom.grey[200]} 100%)`,boxShadow:" 0px 2px 8px 0px rgba(42, 43, 39, 0.04)"},..."white-filled-no-shadow"===t&&{borderRadius:"44px",border:`1px solid ${r.custom.grey[500]}`,background:`linear-gradient(180deg, ${r.custom.grey[100]} 0%, ${r.custom.grey[200]} 100%)`},..."select"===t&&{backgroundColor:r.custom.grey[100],borderRadius:r.spacing(1),border:`1px solid ${r.custom.grey[500]}`},..."validate"===t&&{color:"#FFFFFF",transition:"none",background:`linear-gradient(180deg, ${r.custom.green[500]} 0%, ${r.custom.green[700]} 100%)`},..."delete"===t&&{color:"#FFFFFF",transition:"none",background:`${r.custom.red[600]}`},..."error"===t&&{transition:"none",paddingInline:"0",color:r.custom.red[600],fontWeight:"600"},..."delete-outline"===t&&{color:r.custom.red[600],transition:"none",background:"transparent",border:`1px solid ${r.custom.red[600]}`},":hover":{..."primary"===t&&{background:r.palette.primary[600]},..."secondary"===t&&{background:r.custom.grey[400]},..."ternary"===t&&{border:`1px solid ${r.custom.grey[500]}`,background:r.custom.grey[400]},..."text"===t&&{background:"none",textDecoration:"underline"},..."select"===t&&{backgroundColor:r.custom.grey[300]},..."default-menu"===t&&{backgroundColor:r.custom.grey[2500],borderRadius:"8px"},..."selected-menu"===t&&{borderRadius:"8px"},..."selected-submenu"===t&&{borderRadius:"8px"},..."validate"===t&&{background:r.custom.green[600]},..."delete"===t&&{background:r.custom.red[700]},..."error"===t&&{color:r.custom.red[900]},..."delete-outline"===t&&{background:r.custom.red[100],borderColor:r.custom.red[700],color:r.custom.red[700]}},":disabled":{..."primary"===t&&{color:r.custom.grey[100],background:o(r.palette.primary[600]??"",.36)},..."secondary"===t&&{color:o(r.custom.grey[2800],.36),border:`1px solid ${o(r.custom.grey[500],.36)}`,background:r.custom.grey[100]},..."ternary"===t&&{border:`1px solid ${r.custom.grey[100]}`,background:r.custom.grey[500]},..."select"===t&&{backgroundColor:r.custom.grey[500]},..."default-menu"===t&&{color:r.custom.grey[2300],borderRadius:"8px"},..."selected-menu"===t&&{color:r.custom.grey[2300],borderRadius:"8px"},..."selected-submenu"===t&&{color:r.custom.grey[2300],borderRadius:"8px"},..."validate"===t&&{background:o(r.custom.green[500],.36),color:"#FFFFFF"},..."delete"===t&&{background:r.custom.red[100],color:o(r.custom.red[600],.36)},..."error"===t&&{color:o(r.custom.red[700],.36)},..."delete-outline"===t&&{color:o(r.custom.red[600],.36),borderColor:o(r.custom.red[600],.36),background:"transparent"}},":active":{..."primary"===t&&{background:r.palette.primary[800]},..."secondary"===t&&{background:r.custom.grey[400]},..."secondary"===t&&{background:r.custom.grey[600]},..."default-menu"===t&&{backgroundColor:r.custom.grey[2e3],borderRadius:"8px"},..."selected-menu"===t&&{backgroundColor:r.custom.grey[2700],borderRadius:"8px"},..."selected-submenu"===t&&{borderRadius:"8px"},..."validate"===t&&{background:r.custom.green[800]},..."delete"===t&&{background:r.custom.red[800]},..."delete-outline"===t&&{background:r.custom.red[100],borderColor:r.custom.red[800]}},..."tags-grey"===t&&{padding:r.spacing(0,1),border:`1px solid ${r.custom.grey[400]}`,borderRadius:"4px",backgroundColor:r.custom.grey[400],color:r.custom.grey[2800],height:"24px",...void 0!==e.onClick?{cursor:"pointer",":hover":{border:`1px solid ${r.custom.grey[500]}`,backgroundColor:r.custom.grey[300]},":active":{border:`1px solid ${r.custom.grey[500]}`,backgroundColor:r.custom.grey[500]},":disabled":{border:`1px solid ${r.custom.grey[500]}`,backgroundColor:r.custom.grey[100],color:r.custom.grey[1400]}}:{cursor:"default",":hover":{cursor:"default"}}},..."tags-black"===t&&{padding:r.spacing(0,1),border:`1px solid ${r.custom.grey[400]}`,borderRadius:"4px",background:"linear-gradient(180deg, #484945 0%, #2A2B27 100%)",color:r.custom.grey[100],height:"24px",...void 0!==e.onClick?{cursor:"pointer",":hover":{border:`1px solid ${r.custom.grey[500]}`,backgroundColor:r.custom.grey[300]},":active":{border:`1px solid ${r.custom.grey[500]}`,backgroundColor:r.custom.grey[500]},":disabled":{border:`1px solid ${r.custom.grey[500]}`,backgroundColor:r.custom.grey[100],color:r.custom.grey[1400]}}:{cursor:"default",":hover":{cursor:"default"}}},..."tags-white"===t&&{padding:r.spacing(0,1),border:`1px solid ${r.custom.grey[400]} !important`,borderRadius:"4px",backgroundColor:r.custom.grey[100],color:r.custom.grey[2800],height:"24px",cursor:"default",...void 0!==e.onClick&&{cursor:"pointer",":hover":{border:`1px solid ${r.custom.grey[500]}`,backgroundColor:r.custom.grey[300]},":active":{border:`1px solid ${r.custom.grey[500]}`,backgroundColor:r.custom.grey[500]},":disabled":{border:`1px solid ${r.custom.grey[500]}`,backgroundColor:r.custom.grey[100],color:r.custom.grey[1400]}}},..."tags-red"===t&&{padding:r.spacing(0,1),border:`1px solid ${r.custom.red[100]}`,borderRadius:"4px",backgroundColor:r.custom.red[100],color:r.custom.red[600],height:"24px",...void 0!==e.onClick?{cursor:"pointer",":hover":{border:`1px solid ${r.custom.grey[500]}`,backgroundColor:r.custom.grey[300]},":active":{border:`1px solid ${r.custom.grey[500]}`,backgroundColor:r.custom.grey[500]},":disabled":{border:`1px solid ${r.custom.grey[500]}`,backgroundColor:r.custom.grey[100],color:r.custom.grey[1400]}}:{cursor:"default",":hover":{cursor:"default"}}},..."tags-green"===t&&{padding:r.spacing(0,1),borderRadius:"4px",height:"24px",border:`1px solid ${r.custom.grey[400]}`,backgroundColor:r.custom.green[100],color:r.custom.green[600],...void 0!==e.onClick?{cursor:"pointer",":hover":{border:`1px solid ${r.custom.grey[400]}`,backgroundColor:r.custom.green[100],color:r.custom.green[600]},":active":{border:`1px solid ${r.custom.grey[500]}`,backgroundColor:r.custom.grey[500]},":disabled":{border:`1px solid ${r.custom.grey[500]}`,backgroundColor:r.custom.grey[100],color:r.custom.grey[1400]}}:{cursor:"default",":hover":{cursor:"default"}}},..."tags-blue"===t&&{padding:r.spacing(0,1),borderRadius:"4px",height:"24px",border:`1px solid ${r.custom.blue[100]}`,backgroundColor:r.custom.blue[100],color:r.custom.blue[700],...void 0!==e.onClick?{cursor:"pointer",":hover":{border:`1px solid ${r.custom.blue[200]}`,backgroundColor:r.custom.blue[50],color:r.custom.blue[700]},":active":{border:`1px solid ${r.custom.blue[300]}`,backgroundColor:r.custom.blue[200]},":disabled":{border:`1px solid ${r.custom.grey[500]}`,backgroundColor:r.custom.grey[100],color:r.custom.grey[1400]}}:{cursor:"default",":hover":{cursor:"default"}}},..."tags-coral"===t&&{padding:r.spacing(0,1),borderRadius:"4px",height:"24px",border:`1px solid ${r.custom.coral[100]}`,backgroundColor:r.custom.coral[100],color:r.custom.coral[700],...void 0!==e.onClick?{cursor:"pointer",":hover":{border:`1px solid ${r.custom.coral[200]}`,backgroundColor:r.custom.coral[50],color:r.custom.coral[700]},":active":{border:`1px solid ${r.custom.coral[300]}`,backgroundColor:r.custom.coral[200]},":disabled":{border:`1px solid ${r.custom.grey[500]}`,backgroundColor:r.custom.grey[100],color:r.custom.grey[1400]}}:{cursor:"default",":hover":{cursor:"default"}}},..."icon-xs-nobackground"===t&&{padding:r.spacing(.5),minWidth:"auto",width:"24px",height:"24px",color:r.custom.grey[2800],backgroundColor:"inherit",borderRadius:"32px",":hover":{backgroundColor:r.custom.grey[600]},":active":{backgroundColor:r.custom.grey[1e3]},":disabled":{backgroundColor:"inherit",color:r.custom.grey[1400]}},..."icon-s-nobackground"===t&&{padding:r.spacing(1),minWidth:"auto",width:"36px",height:"36px",color:r.custom.grey[2800],backgroundColor:"inherit",borderRadius:"32px",":hover":{backgroundColor:r.custom.grey[600]},":active":{backgroundColor:r.custom.grey[1e3]},":disabled":{backgroundColor:"inherit",color:r.custom.grey[1400]}},..."icon-m-nobackground"===t&&{padding:r.spacing(1),minWidth:"auto",width:"44px",height:"44px",color:r.custom.grey[2800],backgroundColor:"inherit",borderRadius:"32px",":hover":{backgroundColor:r.custom.grey[600]},":active":{backgroundColor:r.custom.grey[1e3]},":disabled":{backgroundColor:"inherit",color:r.custom.grey[1400]}},..."icon-xs-withbackground"===t&&{padding:r.spacing(.5),minWidth:"auto",width:"24px",height:"24px",color:r.custom.grey[2800],background:"linear-gradient(180deg, #FFFFFF 0%, #F6F5F3 154.5%)",border:`1px solid ${r.custom.grey[500]}`,borderRadius:"32px",":hover":{background:"none",backgroundColor:r.custom.grey[400]},":active":{background:"none",backgroundColor:r.custom.grey[600],border:"none"},":disabled":{background:"none",backgroundColor:r.custom.grey[100],color:r.custom.grey[1400]}},..."icon-s-withbackground"===t&&{padding:r.spacing(1),minWidth:"auto",width:"36px",height:"36px",color:r.custom.grey[2800],background:"linear-gradient(180deg, #FFFFFF 0%, #F6F5F3 154.5%)",border:`1px solid ${r.custom.grey[500]}`,borderRadius:"32px",":hover":{background:"none",backgroundColor:r.custom.grey[400]},":active":{background:"none",backgroundColor:r.custom.grey[600],border:"none"},":disabled":{background:"none",backgroundColor:r.custom.grey[100],color:r.custom.grey[1400]}},..."icon-m-withbackground"===t&&{padding:r.spacing(1),minWidth:"auto",width:"44px",height:"44px",color:r.custom.grey[2800],background:"linear-gradient(180deg, #FFFFFF 0%, #F6F5F3 154.5%)",border:`1px solid ${r.custom.grey[500]}`,borderRadius:"32px",":hover":{background:"none",backgroundColor:r.custom.grey[400]},":active":{background:"none",backgroundColor:r.custom.grey[600],border:"none"},":disabled":{background:"none",backgroundColor:r.custom.grey[100],color:r.custom.grey[1400]}}}}}},MuiButtonBase:{styleOverrides:{root:{borderRadius:"15px"}}},MuiCircularProgress:{styleOverrides:{root:({theme:o})=>({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{r as components};
|
|
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},styleOverrides:{root:({theme:t,ownerState:d})=>{const a=d.variant,n=d.variant?.startsWith("dataviz");if(n){const o=parseInt((a??"").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":{background:r.variant[100]},":active":{background:r.variant[700]}}}return{textTransform:"none",fontSize:"0.9rem",lineHeight:"1rem",borderRadius:t.spacing(1),height:"40px",fontWeight:700,..."primary"===a&&{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"===a&&{border:`1px solid ${t.custom.grey[500]}`,background:`linear-gradient(${t.custom.grey[100]}}, ${t.custom.grey[300]})`},..."ternary"===a&&{border:`1px solid ${t.custom.grey[500]}`,background:t.custom.grey.gradientLight},..."text"===a&&{transition:"none",paddingInline:"0",color:t.palette.primary[700],fontWeight:"700"},..."selected-menu"===a&&{color:"white",background:`linear-gradient(${t.palette.primary[400]}, ${t.palette.primary[600]})`,borderRadius:"8px",padding:0},..."selected-submenu"===a&&{color:"white",backgroundColor:t.custom.grey[2300],background:t.custom.grey[2300],borderRadius:"8px",padding:0},..."default-menu"===a&&{color:t.custom.grey[100],background:"inherit",borderRadius:"8px",padding:0},..."black-text"===a&&{color:t.custom.grey[2800],background:"none",fontWeight:"600"},..."black-filled"===a&&{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"===a&&{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"===a&&{borderRadius:"44px",border:`1px solid ${t.custom.grey[500]}`,background:`linear-gradient(180deg, ${t.custom.grey[100]} 0%, ${t.custom.grey[200]} 100%)`},..."select"===a&&{backgroundColor:t.custom.grey[100],borderRadius:t.spacing(1),border:`1px solid ${t.custom.grey[500]}`},..."validate"===a&&{color:"#FFFFFF",transition:"none",background:`linear-gradient(180deg, ${t.custom.green[500]} 0%, ${t.custom.green[700]} 100%)`},..."delete"===a&&{color:"#FFFFFF",transition:"none",background:`${t.custom.red[600]}`},..."error"===a&&{transition:"none",paddingInline:"0",color:t.custom.red[600],fontWeight:"600"},..."delete-outline"===a&&{color:t.custom.red[600],transition:"none",background:"transparent",border:`1px solid ${t.custom.red[600]}`},":hover":{..."primary"===a&&{background:t.palette.primary[600]},..."secondary"===a&&{background:t.custom.grey[400]},..."ternary"===a&&{border:`1px solid ${t.custom.grey[500]}`,background:t.custom.grey[400]},..."text"===a&&{background:"none",textDecoration:"underline"},..."select"===a&&{backgroundColor:t.custom.grey[300]},..."default-menu"===a&&{backgroundColor:t.custom.grey[2500],borderRadius:"8px"},..."selected-menu"===a&&{borderRadius:"8px"},..."selected-submenu"===a&&{borderRadius:"8px"},..."validate"===a&&{background:t.custom.green[600]},..."delete"===a&&{background:t.custom.red[700]},..."error"===a&&{color:t.custom.red[900]},..."delete-outline"===a&&{background:t.custom.red[100],borderColor:t.custom.red[700],color:t.custom.red[700]}},":disabled":{..."primary"===a&&{color:t.custom.grey[100],background:o(t.palette.primary[600]??"",.36)},..."secondary"===a&&{color:o(t.custom.grey[2800],.36),border:`1px solid ${o(t.custom.grey[500],.36)}`,background:t.custom.grey[100]},..."ternary"===a&&{border:`1px solid ${t.custom.grey[100]}`,background:t.custom.grey[500]},..."select"===a&&{backgroundColor:t.custom.grey[500]},..."default-menu"===a&&{color:t.custom.grey[2300],borderRadius:"8px"},..."selected-menu"===a&&{color:t.custom.grey[2300],borderRadius:"8px"},..."selected-submenu"===a&&{color:t.custom.grey[2300],borderRadius:"8px"},..."validate"===a&&{background:o(t.custom.green[500],.36),color:"#FFFFFF"},..."delete"===a&&{background:t.custom.red[100],color:o(t.custom.red[600],.36)},..."error"===a&&{color:o(t.custom.red[700],.36)},..."delete-outline"===a&&{color:o(t.custom.red[600],.36),borderColor:o(t.custom.red[600],.36),background:"transparent"}},":active":{..."primary"===a&&{background:t.palette.primary[800]},..."secondary"===a&&{background:t.custom.grey[400]},..."secondary"===a&&{background:t.custom.grey[600]},..."default-menu"===a&&{backgroundColor:t.custom.grey[2e3],borderRadius:"8px"},..."selected-menu"===a&&{backgroundColor:t.custom.grey[2700],borderRadius:"8px"},..."selected-submenu"===a&&{borderRadius:"8px"},..."validate"===a&&{background:t.custom.green[800]},..."delete"===a&&{background:t.custom.red[800]},..."delete-outline"===a&&{background:t.custom.red[100],borderColor:t.custom.red[800]}},...r(a)&&e(a,t,d),..."icon-xs-nobackground"===a&&{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"===a&&{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"===a&&{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"===a&&{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"===a&&{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"===a&&{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})=>({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};
|