@useloops/design-system 1.4.557 → 1.4.558

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.
Files changed (50) hide show
  1. package/dist/Platform/MiniResultCard.d.ts +2 -0
  2. package/dist/Platform/MiniResultCard.js +1 -0
  3. package/dist/Platform.d.ts +2 -0
  4. package/dist/Platform.js +1 -1
  5. package/dist/esm/Platform/MiniResultCard.js +1 -0
  6. package/dist/esm/Platform.js +1 -1
  7. package/dist/esm/index.js +1 -1
  8. package/dist/esm/systems/Platform/GraphBar/GraphBar.js +1 -1
  9. package/dist/esm/systems/Platform/LikertGraph/LikertGraph.js +1 -1
  10. package/dist/esm/systems/Platform/LikertGraph/_partials/LikertGraphBar/LikertGraphBar.js +1 -1
  11. package/dist/esm/systems/Platform/LinkExpired/LinkExpired.js +1 -1
  12. package/dist/esm/systems/Platform/MFACodeVerify/MFACodeVerify.js +1 -1
  13. package/dist/esm/systems/Platform/MiniResultCard/MiniResultCard.js +1 -0
  14. package/dist/esm/systems/Platform/MiniResultCard/graphVariants.js +1 -0
  15. package/dist/esm/systems/Platform/QuestionLabel/QuestionLabel.js +1 -1
  16. package/dist/esm/systems/Platform/SliderGraph/SliderGraph.js +1 -1
  17. package/dist/esm/systems/Platform/SliderGraph/_partials/SliderGraphBar/SliderGraphBar.js +1 -1
  18. package/dist/esm/systems/Platform/SliderGraph/_partials/SliderGraphYAxis/SliderGraphYAxis.js +1 -1
  19. package/dist/esm/systems/Platform/SliderGraph/_partials/StyledComponents.js +1 -1
  20. package/dist/esm/systems/Platform/SliderGraph/utils/heightBasedOnPercentage.js +1 -1
  21. package/dist/esm/systems/Platform/SliderGraph/utils/mockData.js +1 -1
  22. package/dist/esm/systems/Platform/SliderGraph/utils/useSliderGraphProps.js +1 -1
  23. package/dist/esm/systems/WebCore/Typography/Typography.js +1 -1
  24. package/dist/index.d.ts +2 -0
  25. package/dist/index.js +1 -1
  26. package/dist/systems/Platform/GraphBar/GraphBar.d.ts +2 -2
  27. package/dist/systems/Platform/GraphBar/GraphBar.js +1 -1
  28. package/dist/systems/Platform/LikertGraph/LikertGraph.js +1 -1
  29. package/dist/systems/Platform/LikertGraph/_partials/LikertGraphBar/LikertGraphBar.js +1 -1
  30. package/dist/systems/Platform/LinkExpired/LinkExpired.js +1 -1
  31. package/dist/systems/Platform/MFACodeVerify/MFACodeVerify.js +1 -1
  32. package/dist/systems/Platform/MiniResultCard/MiniResultCard.d.ts +15 -0
  33. package/dist/systems/Platform/MiniResultCard/MiniResultCard.js +1 -0
  34. package/dist/systems/Platform/MiniResultCard/graphVariants.d.ts +25 -0
  35. package/dist/systems/Platform/MiniResultCard/graphVariants.js +1 -0
  36. package/dist/systems/Platform/QuestionLabel/QuestionLabel.d.ts +4 -0
  37. package/dist/systems/Platform/QuestionLabel/QuestionLabel.js +1 -1
  38. package/dist/systems/Platform/SliderGraph/SliderGraph.js +1 -1
  39. package/dist/systems/Platform/SliderGraph/_partials/SliderGraphBar/SliderGraphBar.js +1 -1
  40. package/dist/systems/Platform/SliderGraph/_partials/SliderGraphYAxis/SliderGraphYAxis.js +1 -1
  41. package/dist/systems/Platform/SliderGraph/_partials/StyledComponents.d.ts +24 -3
  42. package/dist/systems/Platform/SliderGraph/_partials/StyledComponents.js +1 -1
  43. package/dist/systems/Platform/SliderGraph/types.d.ts +7 -0
  44. package/dist/systems/Platform/SliderGraph/utils/heightBasedOnPercentage.js +1 -1
  45. package/dist/systems/Platform/SliderGraph/utils/mockData.js +1 -1
  46. package/dist/systems/Platform/SliderGraph/utils/useSliderGraphProps.d.ts +2 -2
  47. package/dist/systems/Platform/SliderGraph/utils/useSliderGraphProps.js +1 -1
  48. package/dist/systems/WebCore/Typography/Typography.d.ts +2 -0
  49. package/dist/systems/WebCore/Typography/Typography.js +1 -1
  50. package/package.json +1 -1
@@ -5,9 +5,27 @@ import * as _mui_system from '@mui/system';
5
5
  import * as _mui_material from '@mui/material';
6
6
  import { SliderGraphBarProps, CommonComponentProps } from '../types.js';
7
7
 
8
- declare const SliderGraphWrapper: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_system.BoxOwnProps<_mui_material.Theme>> & _mui_system.MUIStyledCommonProps<_mui_material.Theme>, {}, {}>;
9
- declare const VeticalBarWrapper: _emotion_styled.StyledComponent<_mui_material.ListItemButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, "classes"> & _mui_material_OverridableComponent.CommonProps & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "alignItems" | "className" | "style" | "classes" | "children" | "sx" | "autoFocus" | "tabIndex" | "disableGutters" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "dense" | "divider" | "selected"> & _mui_system.MUIStyledCommonProps<_mui_material.Theme>, {}, {}>;
10
- declare const SliderGraphBarWrapper: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_system.BoxOwnProps<_mui_material.Theme>> & _mui_system.MUIStyledCommonProps<_mui_material.Theme>, {}, {}>;
8
+ declare const SliderGraphWrapper: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_system.BoxOwnProps<_mui_material.Theme>> & _mui_system.MUIStyledCommonProps<_mui_material.Theme> & _mui_material_OverridableComponent.CommonProps & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_material_OverridableComponent.CommonProps | keyof _mui_system.BoxOwnProps<_mui_material.Theme>> & {
9
+ component?: React.ElementType;
10
+ } & {
11
+ maxHeight: number;
12
+ } & {
13
+ responsive?: boolean;
14
+ }, {}, {}>;
15
+ declare const VeticalBarWrapper: _emotion_styled.StyledComponent<_mui_material.ListItemButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, "classes"> & _mui_material_OverridableComponent.CommonProps & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "alignItems" | "className" | "style" | "classes" | "children" | "sx" | "autoFocus" | "tabIndex" | "disableGutters" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "dense" | "divider" | "selected"> & _mui_system.MUIStyledCommonProps<_mui_material.Theme> & {
16
+ component?: React.ElementType;
17
+ } & {
18
+ maxHeight: number;
19
+ } & {
20
+ responsive?: boolean;
21
+ }, {}, {}>;
22
+ declare const SliderGraphBarWrapper: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_system.BoxOwnProps<_mui_material.Theme>> & _mui_system.MUIStyledCommonProps<_mui_material.Theme> & _mui_material_OverridableComponent.CommonProps & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_material_OverridableComponent.CommonProps | keyof _mui_system.BoxOwnProps<_mui_material.Theme>> & {
23
+ component?: React.ElementType;
24
+ } & {
25
+ maxHeight: number;
26
+ } & {
27
+ responsive?: boolean;
28
+ }, {}, {}>;
11
29
  declare const VerticalBarValue: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_system.BoxOwnProps<_mui_material.Theme>> & _mui_system.MUIStyledCommonProps<_mui_material.Theme> & _mui_material_OverridableComponent.CommonProps & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_material_OverridableComponent.CommonProps | keyof _mui_system.BoxOwnProps<_mui_material.Theme>> & {
12
30
  component?: React.ElementType;
13
31
  }, {}, {}>;
@@ -25,11 +43,14 @@ declare const VerticalBarLabel: _emotion_styled.StyledComponent<_mui_system.BoxO
25
43
  }, {}, {}>;
26
44
  declare const AxisSegmentWrapper: _emotion_styled.StyledComponent<_mui_material.StackOwnProps & _mui_material_OverridableComponent.CommonProps & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_material_OverridableComponent.CommonProps | keyof _mui_material.StackOwnProps> & _mui_system.MUIStyledCommonProps<_mui_material.Theme> & {
27
45
  component?: React.ElementType;
46
+ } & {
47
+ maxHeight: number;
28
48
  } & Partial<SliderGraphBarProps>, {}, {}>;
29
49
  declare const AxisSegment: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_system.BoxOwnProps<_mui_material.Theme>> & _mui_system.MUIStyledCommonProps<_mui_material.Theme> & _mui_material_OverridableComponent.CommonProps & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_material_OverridableComponent.CommonProps | keyof _mui_system.BoxOwnProps<_mui_material.Theme>> & {
30
50
  component?: React.ElementType;
31
51
  } & {
32
52
  showGraphLines?: boolean;
53
+ graphWidth?: number;
33
54
  }, {}, {}>;
34
55
 
35
56
  export { AxisSegment, AxisSegmentWrapper, SliderGraphBarWrapper, SliderGraphWrapper, VerticalBar, VerticalBarActions, VerticalBarLabel, VerticalBarValue, VeticalBarWrapper };
@@ -1 +1 @@
1
- "use strict";var e=require("@mui/material");const t=465,i=e.styled(e.Box)(({theme:e})=>({height:24,width:24,margin:e.spacing(.5)})),o=e.styled(e.Box)(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"flex-end",gap:e.spacing(.5),width:"100%",minWidth:450,minHeight:497,padding:16,boxSizing:"border-box",overflow:"hidden"})),r=e.styled(e.ListItemButton)(({theme:i})=>({padding:i.spacing(.5),paddingBottom:i.spacing(1),borderRadius:i.spacing(i.custom.radius.md),backgroundColor:i.custom.palette.interaction.none,display:"flex",minWidth:33,flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:t,"&:hover":{backgroundColor:i.custom.palette.interaction.hover,[`& .${e.formControlLabelClasses.root}`]:{[`& .${e.checkboxClasses.root}`]:{backgroundColor:i.custom.palette.blue[0]}}},"&:active":{backgroundColor:i.custom.palette.interaction.press},"&.Mui-selected":{backgroundColor:i.custom.palette.interaction.press},"&.Mui-disabled":{opacity:1}})),a=e.styled(e.Box)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(.5),height:t,width:"100%"})),s=e.styled(e.Box)(()=>({height:22,display:"flex",alignItems:"center"})),n=e.styled(e.Box)(({theme:e,value:t,disabled:i,checked:o})=>({transition:"background 200ms ease",width:"100%",height:t,backgroundColor:i||!o?e.custom.palette.neutral[100]:e.custom.palette.purple[500],borderRadius:e.spacing(e.custom.radius.sm)})),l=e.styled(e.Stack)(()=>({alignItems:"center",display:"flex",justifyContent:"flex-end"})),d=e.styled(e.Box)(({theme:e})=>({height:24,marginTop:e.spacing(1),display:"flex",alignItems:"center"})),p=e.styled(e.Stack,{shouldForwardProp:e=>"hideLabel"!==e&&"hideCheckbox"!==e})(()=>({height:t,boxSizing:"border-box"})),c=e.styled(e.Stack,{shouldForwardProp:e=>"hideLabel"!==e&&"hideCheckbox"!==e})(({theme:e,hideLabel:i,hideCheckbox:o})=>({height:t,display:"flex",justifyContent:"space-between",paddingRight:e.spacing(e.custom.margin.sm),paddingTop:i||o?e.spacing(.5):e.spacing(2),boxSizing:"border-box"})),h=e.styled(e.Box,{shouldForwardProp:e=>"showGraphLines"!==e})(({showGraphLines:e,theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-end",height:18,width:32,textAlign:"right",position:"relative","&:after":{content:'""',position:"absolute",left:`calc(100% + ${t.spacing(2)})`,bottom:8,width:e?400:0,height:1,backgroundColor:"currentColor",opacity:.1}}));exports.Axis=p,exports.AxisSegment=h,exports.AxisSegmentWrapper=c,exports.GRAPH_HEIGHT=t,exports.GRAPH_PADDING=16,exports.GRAPH_WIDTH=450,exports.SliderGraphBarWrapper=a,exports.SliderGraphWrapper=o,exports.Spacer=i,exports.VerticalBar=n,exports.VerticalBarActions=l,exports.VerticalBarLabel=d,exports.VerticalBarValue=s,exports.VeticalBarWrapper=r;
1
+ "use strict";var e=require("@mui/material");const t=e.styled(e.Box)(({theme:e})=>({height:24,width:24,margin:e.spacing(.5)})),i=e.styled(e.Box,{shouldForwardProp:e=>!["maxHeight","responsive"].includes(e)})(({theme:e,maxHeight:t,responsive:i})=>({display:"flex",flexDirection:"row",alignItems:"flex-end",gap:e.spacing(.5),width:"100%",minWidth:i?"auto":450,minHeight:t+32,padding:"0 16px",boxSizing:"border-box",overflow:"hidden"})),o=e.styled(e.ListItemButton,{shouldForwardProp:e=>!["maxHeight","responsive"].includes(e)})(({theme:t,maxHeight:i,responsive:o})=>({padding:o?t.spacing(.25):t.spacing(.5),paddingBottom:t.spacing(1),borderRadius:t.spacing(t.custom.radius.md),backgroundColor:t.custom.palette.interaction.none,display:"flex",minWidth:o?"auto":33,flex:o?1:"none",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:i,"&:hover":{backgroundColor:t.custom.palette.interaction.hover,[`& .${e.formControlLabelClasses.root}`]:{[`& .${e.checkboxClasses.root}`]:{backgroundColor:t.custom.palette.blue[0]}}},"&:active":{backgroundColor:t.custom.palette.interaction.press},"&.Mui-selected":{backgroundColor:t.custom.palette.interaction.press},"&.Mui-disabled":{opacity:1}})),r=e.styled(e.Box,{shouldForwardProp:e=>!["maxHeight","responsive"].includes(e)})(({theme:e,maxHeight:t,responsive:i})=>({display:"flex",alignItems:"center",gap:i?0:e.spacing(.5),height:t,width:"100%"})),a=e.styled(e.Box)(()=>({height:22,display:"flex",alignItems:"center"})),s=e.styled(e.Box)(({theme:e,value:t,disabled:i,checked:o})=>({transition:"background 200ms ease",width:"100%",height:t,backgroundColor:i||!o?e.custom.palette.neutral[100]:e.custom.palette.purple[500],borderRadius:e.spacing(e.custom.radius.sm)})),n=e.styled(e.Stack)(()=>({alignItems:"center",display:"flex",justifyContent:"flex-end"})),l=e.styled(e.Box)(({theme:e})=>({height:24,marginTop:e.spacing(1),display:"flex",alignItems:"center"})),d=e.styled(e.Stack,{shouldForwardProp:e=>!["maxHeight"].includes(e)})(({maxHeight:e})=>({height:e,boxSizing:"border-box"})),p=e.styled(e.Stack,{shouldForwardProp:e=>!["maxHeight","hideLabel","hideCheckbox"].includes(e)})(({theme:e,hideLabel:t,hideCheckbox:i,maxHeight:o})=>({height:o,display:"flex",justifyContent:"space-between",paddingRight:e.spacing(e.custom.margin.sm),paddingTop:t||i?e.spacing(.5):e.spacing(2),boxSizing:"border-box"})),c=e.styled(e.Box,{shouldForwardProp:e=>!["showGraphLines","graphWidth"].includes(e)})(({showGraphLines:e,theme:t,graphWidth:i})=>({display:"flex",alignItems:"center",justifyContent:"flex-end",height:18,width:32,textAlign:"right",position:"relative","&:after":{content:'""',position:"absolute",left:`calc(100% + ${t.spacing(2)})`,bottom:8,width:e?i?i-50:400:0,height:1,backgroundColor:"currentColor",opacity:.1}}));exports.Axis=d,exports.AxisSegment=c,exports.AxisSegmentWrapper=p,exports.GRAPH_PADDING=16,exports.GRAPH_WIDTH=450,exports.SliderGraphBarWrapper=r,exports.SliderGraphWrapper=i,exports.Spacer=t,exports.VerticalBar=s,exports.VerticalBarActions=n,exports.VerticalBarLabel=l,exports.VerticalBarValue=a,exports.VeticalBarWrapper=o;
@@ -18,10 +18,12 @@ interface SliderGraphYAxisProps extends CommonComponentProps {
18
18
  rounding: number | null;
19
19
  tickInterval: TickInterval | null;
20
20
  yAxisMax: number;
21
+ graphMaxHeight: number;
21
22
  hideLabel?: boolean;
22
23
  hideCheckbox?: boolean;
23
24
  showGraphLines?: boolean;
24
25
  yAxisTickData?: number[];
26
+ responsive?: boolean;
25
27
  slotProps?: {
26
28
  root?: StackProps;
27
29
  };
@@ -38,6 +40,7 @@ interface SliderGraphProps extends CommonComponentProps {
38
40
  root?: BoxProps;
39
41
  yAxis?: StackProps;
40
42
  barsWrapper?: BoxProps;
43
+ bar?: Partial<SliderGraphBarProps>;
41
44
  };
42
45
  hideYAxis?: boolean;
43
46
  hideCheckboxes?: boolean;
@@ -45,6 +48,8 @@ interface SliderGraphProps extends CommonComponentProps {
45
48
  hideValues?: boolean;
46
49
  showGraphLines?: boolean;
47
50
  disableTooltips?: boolean;
51
+ maxHeight?: number;
52
+ responsive?: boolean;
48
53
  }
49
54
  interface SliderGraphBarProps extends CommonComponentProps {
50
55
  id: string;
@@ -64,6 +69,8 @@ interface SliderGraphBarProps extends CommonComponentProps {
64
69
  hideCheckbox?: boolean;
65
70
  animateBar?: boolean;
66
71
  onChange?: (id: string, checked: boolean) => void;
72
+ graphMaxHeight: number;
73
+ responsive?: boolean;
67
74
  percentageSymbol?: boolean;
68
75
  slotProps?: {
69
76
  barWrapper?: ListItemButtonProps;
@@ -1 +1 @@
1
- "use strict";var e=require("../_partials/StyledComponents.js");exports.heightBasedOnPercentage=(t,r,a)=>{if(t<=0)return 1;const s=e.GRAPH_HEIGHT-85,n=Math.ceil(a/r)*r;return Math.max(1,t/n*s)};
1
+ "use strict";exports.heightBasedOnPercentage=(e,t,h,a,i={})=>{if(e<=0)return 1;let r=12;i.hideValue||(r+=22),i.hideLabel||(r+=32),i.hideCheckbox||(r+=24);const c=a-r,n=Math.ceil(h/t)*t;return Math.max(1,e/n*c)};
@@ -1 +1 @@
1
- "use strict";var e=require("../../../../node_modules/@faker-js/faker/dist/chunk-KZPPZA2C.js");function t(t){const n=e.a.number.int({min:1,max:10}),a=e.a.number.float({min:0,max:100,fractionDigits:1}),r=Math.min(e.a.number.float({min:0,max:125,fractionDigits:0}),100);return{amount:n,percentage:a,name:t.toString(),relativePercentage:r}}exports.generateSliderGraphDataItem=t,exports.generateSliderGraphMockData=function(){const n=e.a.number.int({min:1,max:11});return[...new Array(n)].map((e,n)=>t(n))},exports.generateZeroDataItem=function(e){return{amount:0,name:e.toString(),percentage:0,relativePercentage:0}};
1
+ "use strict";var e=require("../../../../node_modules/@faker-js/faker/dist/chunk-KZPPZA2C.js");function t(t){const n=e.a.number.int({min:1,max:10}),a=e.a.number.float({min:0,max:100,fractionDigits:1}),r=Math.min(e.a.number.float({min:0,max:125,fractionDigits:0}),100);return{amount:n,percentage:a,name:t.toString(),relativePercentage:r}}exports.generateSliderGraphDataItem=t,exports.generateSliderGraphMockData=function(){const n=e.a.number.int({min:3,max:11});return[...new Array(n)].map((e,n)=>t(n))},exports.generateZeroDataItem=function(e){return{amount:0,name:e.toString(),percentage:0,relativePercentage:0}};
@@ -4,9 +4,9 @@ import { SliderGraphDataItem, SliderGraphBarProps } from '../types.js';
4
4
  interface UseSliderGraphPropsReturn {
5
5
  storedData: SliderGraphBarProps[];
6
6
  setStoredData: react__default.Dispatch<react__default.SetStateAction<SliderGraphBarProps[]>>;
7
- createInitialData: (data: SliderGraphDataItem[]) => SliderGraphBarProps[];
7
+ createInitialData: (data: SliderGraphDataItem[], graphMaxHeight?: number) => SliderGraphBarProps[];
8
8
  }
9
- declare const useSliderGraphProps: (data: SliderGraphDataItem[]) => UseSliderGraphPropsReturn;
9
+ declare const useSliderGraphProps: (data: SliderGraphDataItem[], graphMaxHeight?: number) => UseSliderGraphPropsReturn;
10
10
 
11
11
  export { useSliderGraphProps as default };
12
12
  export type { UseSliderGraphPropsReturn };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),a=require("../../../../node_modules/uuid/dist/esm-browser/v4.js");function t(e){return e&&e.__esModule?e:{default:e}}var r=t(e);const n=e=>{const t=Math.max(...e.map(e=>e.percentage));return e.map(e=>({percentage:e.percentage,amount:e.amount,label:e.name,relativePercentage:e.relativePercentage,id:a(),checked:!0,tickInterval:10,disableTooltip:!1,hideCheckbox:!1,hideLabel:!1,hideValue:!1,animateBar:!0,disabled:!1,loading:!1,onChange:(a,t)=>console.warn(e,t),value:e.percentage,toolTipContent:`${e.percentage}%`,maxDataValue:t}))};exports.createInitialData=n,exports.default=e=>{const[a,t]=r.default.useState(()=>n(e));return{storedData:a,setStoredData:t,createInitialData:n}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),a=require("../../../../node_modules/uuid/dist/esm-browser/v4.js");function t(e){return e&&e.__esModule?e:{default:e}}var r=t(e);const n=(e,t=465)=>{const r=Math.max(...e.map(e=>e.percentage));return e.map(e=>({percentage:e.percentage,amount:e.amount,label:e.name,relativePercentage:e.relativePercentage,id:a(),checked:!0,tickInterval:10,disableTooltip:!1,hideCheckbox:!1,hideLabel:!1,hideValue:!1,animateBar:!0,disabled:!1,loading:!1,onChange:(a,t)=>console.warn(e,t),value:e.percentage,toolTipContent:`${e.percentage}%`,maxDataValue:r,graphMaxHeight:t}))};exports.createInitialData=n,exports.default=(e,a=465)=>{const[t,o]=r.default.useState(()=>n(e,a));return{storedData:t,setStoredData:o,createInitialData:n}};
@@ -9,6 +9,8 @@ interface TypographyProps extends Omit<TypographyProps$1, 'ref'> {
9
9
  weight?: 'default' | 'bold';
10
10
  monospaced?: boolean;
11
11
  sx?: SxProps<Theme>;
12
+ secondary?: boolean;
13
+ textColor?: string;
12
14
  }
13
15
  declare const Typography: react.ForwardRefExoticComponent<TypographyProps & react.RefAttributes<HTMLHeadingElement | HTMLParagraphElement>>;
14
16
 
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("@mui/material"),r=require("merge-sx"),i=require("react"),a=require("../../BrandCore/types.js");const o=e=>"bold"===e?a.FontWeight.BOLD:a.FontWeight.DEFAULT,n=i.forwardRef(({component:i,weight:a="default",variation:n,clamp:u=0,type:s="default",monospaced:m,...l},p)=>e.jsx(t.Typography,{ref:p,variant:n,fontWeight:o(a),component:i,...l,sx:r.mergeSx(l.sx,!!u&&{display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical",WebkitLineClamp:u},"button"===s&&{lineHeight:1.2},m&&{fontVariantNumeric:"tabular-nums"})}));module.exports=n;
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("@mui/material"),r=require("merge-sx"),o=require("react"),i=require("../../BrandCore/types.js");const a=e=>"bold"===e?i.FontWeight.BOLD:i.FontWeight.DEFAULT,n=o.forwardRef(({component:o,weight:i="default",variation:n,clamp:s=0,type:u="default",monospaced:l,secondary:c,textColor:m,...d},p)=>{const x=t.useTheme();return e.jsx(t.Typography,{ref:p,variant:n,fontWeight:a(i),component:o,...d,sx:r.mergeSx(d.sx,!!s&&{display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical",WebkitLineClamp:s},"button"===u&&{lineHeight:1.2},l&&{fontVariantNumeric:"tabular-nums"},c&&{color:x.custom.palette.text.secondary},Boolean(m)&&{color:m})})});module.exports=n;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useloops/design-system",
3
- "version": "1.4.557",
3
+ "version": "1.4.558",
4
4
  "description": "The official React based Loops design system",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/esm/index.js",