@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.
- package/dist/Platform/MiniResultCard.d.ts +2 -0
- package/dist/Platform/MiniResultCard.js +1 -0
- package/dist/Platform.d.ts +2 -0
- package/dist/Platform.js +1 -1
- package/dist/esm/Platform/MiniResultCard.js +1 -0
- package/dist/esm/Platform.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/systems/Platform/GraphBar/GraphBar.js +1 -1
- package/dist/esm/systems/Platform/LikertGraph/LikertGraph.js +1 -1
- package/dist/esm/systems/Platform/LikertGraph/_partials/LikertGraphBar/LikertGraphBar.js +1 -1
- package/dist/esm/systems/Platform/LinkExpired/LinkExpired.js +1 -1
- package/dist/esm/systems/Platform/MFACodeVerify/MFACodeVerify.js +1 -1
- package/dist/esm/systems/Platform/MiniResultCard/MiniResultCard.js +1 -0
- package/dist/esm/systems/Platform/MiniResultCard/graphVariants.js +1 -0
- package/dist/esm/systems/Platform/QuestionLabel/QuestionLabel.js +1 -1
- package/dist/esm/systems/Platform/SliderGraph/SliderGraph.js +1 -1
- package/dist/esm/systems/Platform/SliderGraph/_partials/SliderGraphBar/SliderGraphBar.js +1 -1
- package/dist/esm/systems/Platform/SliderGraph/_partials/SliderGraphYAxis/SliderGraphYAxis.js +1 -1
- package/dist/esm/systems/Platform/SliderGraph/_partials/StyledComponents.js +1 -1
- package/dist/esm/systems/Platform/SliderGraph/utils/heightBasedOnPercentage.js +1 -1
- package/dist/esm/systems/Platform/SliderGraph/utils/mockData.js +1 -1
- package/dist/esm/systems/Platform/SliderGraph/utils/useSliderGraphProps.js +1 -1
- package/dist/esm/systems/WebCore/Typography/Typography.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/systems/Platform/GraphBar/GraphBar.d.ts +2 -2
- package/dist/systems/Platform/GraphBar/GraphBar.js +1 -1
- package/dist/systems/Platform/LikertGraph/LikertGraph.js +1 -1
- package/dist/systems/Platform/LikertGraph/_partials/LikertGraphBar/LikertGraphBar.js +1 -1
- package/dist/systems/Platform/LinkExpired/LinkExpired.js +1 -1
- package/dist/systems/Platform/MFACodeVerify/MFACodeVerify.js +1 -1
- package/dist/systems/Platform/MiniResultCard/MiniResultCard.d.ts +15 -0
- package/dist/systems/Platform/MiniResultCard/MiniResultCard.js +1 -0
- package/dist/systems/Platform/MiniResultCard/graphVariants.d.ts +25 -0
- package/dist/systems/Platform/MiniResultCard/graphVariants.js +1 -0
- package/dist/systems/Platform/QuestionLabel/QuestionLabel.d.ts +4 -0
- package/dist/systems/Platform/QuestionLabel/QuestionLabel.js +1 -1
- package/dist/systems/Platform/SliderGraph/SliderGraph.js +1 -1
- package/dist/systems/Platform/SliderGraph/_partials/SliderGraphBar/SliderGraphBar.js +1 -1
- package/dist/systems/Platform/SliderGraph/_partials/SliderGraphYAxis/SliderGraphYAxis.js +1 -1
- package/dist/systems/Platform/SliderGraph/_partials/StyledComponents.d.ts +24 -3
- package/dist/systems/Platform/SliderGraph/_partials/StyledComponents.js +1 -1
- package/dist/systems/Platform/SliderGraph/types.d.ts +7 -0
- package/dist/systems/Platform/SliderGraph/utils/heightBasedOnPercentage.js +1 -1
- package/dist/systems/Platform/SliderGraph/utils/mockData.js +1 -1
- package/dist/systems/Platform/SliderGraph/utils/useSliderGraphProps.d.ts +2 -2
- package/dist/systems/Platform/SliderGraph/utils/useSliderGraphProps.js +1 -1
- package/dist/systems/WebCore/Typography/Typography.d.ts +2 -0
- package/dist/systems/WebCore/Typography/Typography.js +1 -1
- 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
|
-
|
|
10
|
-
|
|
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=
|
|
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";
|
|
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
|
+
"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
|
|
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"),
|
|
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;
|