@useloops/design-system 1.4.578 → 1.4.580
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/esm/systems/Platform/GraphBar/GraphBar.js +1 -1
- package/dist/esm/systems/Platform/MiniResultCard/MiniResultCard.js +1 -1
- package/dist/systems/Platform/GraphBar/GraphBar.js +1 -1
- package/dist/systems/Platform/MiniResultCard/MiniResultCard.js +1 -1
- package/dist/systems/Platform/SliderGraph/_partials/StyledComponents.d.ts +8 -8
- package/dist/systems/WebCore/InputFieldBase/InputFieldBase.d.ts +1 -1
- package/dist/systems/WebCore/Typography/Typography.d.ts +1 -1
- package/dist/theme/theme.hooks.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useTheme as o,ListItem as i,ListItemIcon as a,Stack as n,Box as l,ListItemText as s,formControlLabelClasses as
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useTheme as o,ListItem as i,ListItemIcon as a,Stack as n,Box as l,ListItemText as s,formControlLabelClasses as m}from"@mui/material";import c from"@number-flow/react";import{mergeSx as p}from"merge-sx";import{useState as d,useRef as h,useEffect as x,useCallback as g}from"react";import u from"../../WebCore/Checkbox/Checkbox.js";import"../../WebCore/Checkbox/StyledCheckbox.js";import y from"../../WebCore/Tooltip/Tooltip.js";import b from"../../WebCore/Typography/Typography.js";import f from"./_partials/StyledLinearProgress/StyledLinearProgress.js";import C from"./_partials/StyledListItemButton/StyledLisItemButton.js";import k from"./_partials/UnitText/UnitText.js";const T=({id:T,label:v,value:j=0,relativePercentage:w,respondentCount:B,tooltipContent:I,icon:P,hideIcon:S=!1,hideCheckbox:W=!1,hideUnitColumn1:F=!1,hideUnitColumn2:L=!1,animated:U=!0,checked:A=!1,disabled:_=!1,onChange:q,percentageSymbol:D=!1,compact:R,slotProps:$={}})=>{const M=o(),[z,E]=d(0),G=h(null),H=$.icon;x(()=>{const e=z,t=w||j,r=performance.now(),o=i=>{const a=i-r,n=Math.min(a/250,1);E(e+(t-e)*(n*(2-n))),n<1&&requestAnimationFrame(o)},i=requestAnimationFrame(o);return()=>cancelAnimationFrame(i)},[w,j]);const J=g(()=>{!_&&q&&q(!A)},[_,q,A]),K=F&&L,N=null!=j,O=null!=B;return e(i,{disablePadding:!0,sx:{mb:M.spacing(M.custom.margin.xs)},...$?.listItem,children:e(y,{message:I||v,followCursor:!0,placement:"bottom-start",slotProps:{wrapper:{sx:{width:"100%"}}},...$.tooltip,children:t(C,{id:T,role:void 0,onClick:J,dense:!0,disabled:_,sx:{display:"flex"},children:[!S&&P&&e(a,{...H,sx:p({minWidth:0,mr:M.custom.margin.xs,color:M.custom.palette.text.primary},H?.sx),children:P}),t(n,{direction:"row",width:1,gap:R?M.custom.margin.sm:M.custom.margin.md,alignItems:"center",children:[t(l,{sx:{display:"flex",position:"relative",width:"fill-available"},children:[!_&&e(f,{variant:"determinate",value:z,checked:A,...$.graphBar}),e(s,{disableTypography:!0,primary:e(b,{...$.graphBarTypography,component:"p",variation:"xs",noWrap:!0,sx:p($.graphBarTypography?.sx,{color:(()=>{if(!A||_)return M.custom.palette.text.disabled;return("object"==typeof $.graphBarTypography?.sx&&null!==$.graphBarTypography?.sx&&"color"in $.graphBarTypography.sx?$.graphBarTypography.sx.color:void 0)||M.palette.text.primary})()}),children:v}),sx:{my:0,position:"absolute",display:"flex",alignItems:"center",inset:0,ml:1}})]}),!K&&t(l,{display:"flex",justifyContent:"space-between",alignItems:"center",gap:M.custom.margin.xs,children:[!F&&e(k,{weight:"bold",color:M.palette.text.primary,disabled:_,checked:A,...$?.unitText1,children:N?t(r,{children:[e(c,{value:j,animated:U,...D&&{format:{minimumFractionDigits:1,maximumFractionDigits:1}}}),""+(D?"%":"")]}):"-"}),!L&&e(k,{color:M.palette.text.secondary,disabled:_,checked:A,...$?.unitText2,children:O?e(c,{value:B,animated:U}):"-"})]}),!W&&e(l,{display:"flex",justifyContent:"space-between",alignItems:"center",children:e(u,{id:`${T}-checkbox`,variant:"secondary",checked:!_&&A,disabled:_,...$.checkbox,checkboxLabel:void 0,inputRef:G,sx:p($.checkbox?.sx,{[`&.${m.root}`]:{marginRight:0}})})})]})]})})})};export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{styled as t,Box as r,useTheme as i,Stack as a,boxClasses as s}from"@mui/material";import
|
|
1
|
+
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{styled as t,Box as r,useTheme as i,Stack as a,boxClasses as s}from"@mui/material";import m from"@number-flow/react";import"../../BrandCore/colorRamps.js";import{base as n}from"../../BrandCore/primitiveVariables.js";import"../../BrandCore/semanticColor.js";import"../../BrandCore/types.js";import"../../BrandCore/typography.js";import p from"../../BrandCore/Icon/Icon.js";import"../../../utils/formValidation/misc.js";import"../../WebCore/utils/typography.util.js";import"../../WebCore/AnnualController/AnnualController.js";import"../../WebCore/Accordion/Accordion.js";import l from"../../WebCore/Typography/Typography.js";import"merge-sx";import"../../WebCore/Badge/Badge.js";import"../../WebCore/Breadcrumb/Breadcrumb.js";import d from"../../WebCore/Button/Button.js";import"../../WebCore/ButtonBase/ButtonBase.js";import"../../WebCore/Checkbox/StyledCheckbox.js";import"../../WebCore/InputFieldBase/InputFieldBase.js";import"../../WebCore/CreatableAutocomplete/CreatableAutocomplete.js";import"@mui/icons-material";import"../../WebCore/InputLabelBase/StyledInputLabelBase.js";import"../../WebCore/Differential/DifferentialContainer.js";import"../../WebCore/Differential/DifferentialRadio.js";import"../../WebCore/DropdownMenu/StyledMenu.js";import"react";import"../../WebCore/FormGenerator/FormGenerator.js";import"../../WebCore/GridOverlay/GridOverlay.js";import c from"../../WebCore/HtmlParser/HtmlParser.js";import"../../WebCore/IconButton/IconButton.js";import"../../WebCore/IconButtonBase/IconButtonBase.js";import"../../WebCore/IconButtonGroup/IconButtonGroup.js";import"../../WebCore/Image/Image.js";import"../../WebCore/Label/Label.js";import"../../WebCore/Likert/LikertContainer.js";import"../../WebCore/Likert/LikertLabel.js";import"../../WebCore/Likert/LikertRadio.js";import"../../WebCore/Link/StyledLink.js";import"@lottiefiles/dotlottie-react";import"../../WebCore/LoopsAiButton/LoopsAiButton.js";import"markdown-to-jsx";import"material-ui-popup-state/hooks";import"../../WebCore/Surface/Surface.js";import"../../WebCore/Menu/MenuItem.js";import"../../WebCore/ModalLayout/_partials/ModalActionsWrapper.js";import"../../WebCore/ModalLayout/_partials/ModalContentWrapper.js";import"../../WebCore/NavigationButton/NavigationButton.js";import"../../WebCore/Nudge/NudgeButton.js";import"../../WebCore/NumberField/NumberField.js";import"../../WebCore/Pill/StyledPill.js";import"../../WebCore/Progress/Progress.js";import"../../WebCore/ProgressBar/ProgressBar.js";import"../../WebCore/Radio/StyledRadio.js";import"../../WebCore/utils/autocomplete.styles.js";import"../../WebCore/Select/AutocompleteListbox.js";import"../../WebCore/Select/StyledAutocomplete.js";import"../../WebCore/Select/SelectItem.js";import"../../WebCore/Select/StyledSelect.js";import"../../WebCore/RankItem/RankItemContainer.js";import"../../WebCore/RankItem/RankItemLabel.js";import"../../WebCore/SortableList/SortableList.js";import"../../WebCore/SortableList/components/SortableItem/SortableItem.js";import"../../WebCore/SortableList/components/SortableOverlay/SortableOverlay.js";import"@tiptap/extension-placeholder";import"@tiptap/starter-kit";import"mui-tiptap";import"../../WebCore/RichTextField/StyledRichTextEditor.js";import"../../WebCore/Skeleton/Skeleton.js";import"../../WebCore/Slider/StyledSlider.js";import"../../WebCore/StarRating/StarRating.js";import"../../WebCore/Switch/StyledSwitch.js";import"../../WebCore/Textarea/Textarea.js";import"../../WebCore/TrialCard/TrialCardContainers.js";import"../../WebCore/TrialCard/TrialPill.js";import"../../WebCore/UserMenu/UserMenuButton.js";import"../../WebCore/VideoModal/VideoModal.js";import u from"../AssetItem/AssetItem.js";import b from"../QuestionLabel/QuestionLabel.js";const C=t(r)(({theme:e})=>({backgroundColor:e.custom.palette.surface.default,borderRadius:e.spacing(e.custom.radius.lg),boxShadow:e.custom.elevation.raised,minWidth:32*n+"px",maxWidth:64*n+"px",paddingBottom:e.spacing(e.custom.padding.md),display:"grid",gridTemplateRows:"auto 1fr 118px auto",gap:e.spacing(e.custom.margin.md)})),j=({question:t,questionType:n,subCopy:j,assetThumbnail:g,assetType:W,statTitle:h,statValue:x,onClickAsset:y,resultGraph:S,onClickShowMore:f})=>{const B=i();return e(C,{children:[o(b,{type:n,slotProps:{container:{sx:{borderRadius:`${B.spacing(B.custom.radius.lg)} ${B.spacing(B.custom.radius.lg)} 0 0`}}}}),e(a,{sx:{gap:B.spacing(B.custom.margin.sm),flexDirection:"row",justifyContent:"space-between",paddingX:B.spacing(B.custom.padding.md)},children:[e(a,{sx:{gap:B.spacing(B.custom.margin.sm)},children:[o(l,{component:"p",variation:"lg",weight:"bold",clamp:4,children:t}),j&&o(c,{typographyProps:{secondary:!0,variation:"sm",component:"p",clamp:3},children:j})]}),o(r,{sx:{minWidth:"92px",width:"92px",height:"92px",overflow:"hidden",borderRadius:B.spacing(B.custom.radius.xs),border:`1px solid ${B.custom.palette.stroke.light}`,boxShadow:B.custom.elevation.raised,[`> .${s.root}`]:{display:"flex",height:"100%"}},children:o(u,{mediaType:W,thumbnail:g,onClick:y})})]}),e(a,{sx:{gap:B.spacing(B.custom.margin.xs)},children:[e(a,{sx:{placeSelf:"center",alignItems:"center",flexDirection:"row",gap:B.spacing(B.custom.margin.sm),height:"18px"},children:[o(l,{component:"p",variation:"xs",children:h}),x&&e(l,{component:"p",variation:"xs",weight:"bold",monospaced:!0,children:[o(m,{value:x,animated:!0,format:{minimumFractionDigits:2,maximumFractionDigits:2}}),"likert"===n&&"%"]})]}),o(r,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",height:"96px",paddingX:B.spacing(B.custom.padding.md)},children:S})]}),f&&o(d,{sizing:"sm",sx:{placeSelf:"center"},variation:"outlined",endIcon:o(p,{name:"open-in-new"}),onClick:f,children:"View full result"})]})};export{j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("@mui/material"),r=require("@number-flow/react"),
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("@mui/material"),r=require("@number-flow/react"),i=require("merge-sx"),a=require("react"),s=require("../../WebCore/Checkbox/Checkbox.js");require("../../WebCore/Checkbox/StyledCheckbox.js");var o=require("../../WebCore/Tooltip/Tooltip.js"),n=require("../../WebCore/Typography/Typography.js"),l=require("./_partials/StyledLinearProgress/StyledLinearProgress.js"),c=require("./_partials/StyledListItemButton/StyledLisItemButton.js"),d=require("./_partials/UnitText/UnitText.js");function m(e){return e&&e.__esModule?e:{default:e}}var x=m(r);module.exports=({id:r,label:m,value:p=0,relativePercentage:u,respondentCount:h,tooltipContent:g,icon:y,hideIcon:b=!1,hideCheckbox:j=!1,hideUnitColumn1:f=!1,hideUnitColumn2:C=!1,animated:k=!0,checked:T=!1,disabled:v=!1,onChange:q,percentageSymbol:B=!1,compact:I,slotProps:w={}})=>{const S=t.useTheme(),[L,F]=a.useState(0),P=a.useRef(null),W=w.icon;a.useEffect(()=>{const e=L,t=u||p,r=performance.now(),i=a=>{const s=a-r,o=Math.min(s/250,1);F(e+(t-e)*(o*(2-o))),o<1&&requestAnimationFrame(i)},a=requestAnimationFrame(i);return()=>cancelAnimationFrame(a)},[u,p]);const _=a.useCallback(()=>{!v&&q&&q(!T)},[v,q,T]),U=f&&C,A=null!=p,R=null!=h;return e.jsx(t.ListItem,{disablePadding:!0,sx:{mb:S.spacing(S.custom.margin.xs)},...w?.listItem,children:e.jsx(o,{message:g||m,followCursor:!0,placement:"bottom-start",slotProps:{wrapper:{sx:{width:"100%"}}},...w.tooltip,children:e.jsxs(c,{id:r,role:void 0,onClick:_,dense:!0,disabled:v,sx:{display:"flex"},children:[!b&&y&&e.jsx(t.ListItemIcon,{...W,sx:i.mergeSx({minWidth:0,mr:S.custom.margin.xs,color:S.custom.palette.text.primary},W?.sx),children:y}),e.jsxs(t.Stack,{direction:"row",width:1,gap:I?S.custom.margin.sm:S.custom.margin.md,alignItems:"center",children:[e.jsxs(t.Box,{sx:{display:"flex",position:"relative",width:"fill-available"},children:[!v&&e.jsx(l,{variant:"determinate",value:L,checked:T,...w.graphBar}),e.jsx(t.ListItemText,{disableTypography:!0,primary:e.jsx(n,{...w.graphBarTypography,component:"p",variation:"xs",noWrap:!0,sx:i.mergeSx(w.graphBarTypography?.sx,{color:(()=>{if(!T||v)return S.custom.palette.text.disabled;return("object"==typeof w.graphBarTypography?.sx&&null!==w.graphBarTypography?.sx&&"color"in w.graphBarTypography.sx?w.graphBarTypography.sx.color:void 0)||S.palette.text.primary})()}),children:m}),sx:{my:0,position:"absolute",display:"flex",alignItems:"center",inset:0,ml:1}})]}),!U&&e.jsxs(t.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",gap:S.custom.margin.xs,children:[!f&&e.jsx(d,{weight:"bold",color:S.palette.text.primary,disabled:v,checked:T,...w?.unitText1,children:A?e.jsxs(e.Fragment,{children:[e.jsx(x.default,{value:p,animated:k,...B&&{format:{minimumFractionDigits:1,maximumFractionDigits:1}}}),""+(B?"%":"")]}):"-"}),!C&&e.jsx(d,{color:S.palette.text.secondary,disabled:v,checked:T,...w?.unitText2,children:R?e.jsx(x.default,{value:h,animated:k}):"-"})]}),!j&&e.jsx(t.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:e.jsx(s,{id:`${r}-checkbox`,variant:"secondary",checked:!v&&T,disabled:v,...w.checkbox,checkboxLabel:void 0,inputRef:P,sx:i.mergeSx(w.checkbox?.sx,{[`&.${t.formControlLabelClasses.root}`]:{marginRight:0}})})})]})]})})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),r=require("@mui/material"),i=require("@number-flow/react");require("../../BrandCore/colorRamps.js");var o=require("../../BrandCore/primitiveVariables.js");require("../../BrandCore/semanticColor.js"),require("../../BrandCore/types.js"),require("../../BrandCore/typography.js");var t=require("../../BrandCore/Icon/Icon.js");require("../../../utils/formValidation/misc.js"),require("../../WebCore/utils/typography.util.js"),require("../../WebCore/AnnualController/AnnualController.js"),require("../../WebCore/Accordion/Accordion.js");var s=require("../../WebCore/Typography/Typography.js");require("merge-sx"),require("../../WebCore/Badge/Badge.js"),require("../../WebCore/Breadcrumb/Breadcrumb.js");var a=require("../../WebCore/Button/Button.js");require("../../WebCore/ButtonBase/ButtonBase.js"),require("../../WebCore/Checkbox/StyledCheckbox.js"),require("../../WebCore/InputFieldBase/InputFieldBase.js"),require("../../WebCore/CreatableAutocomplete/CreatableAutocomplete.js"),require("@mui/icons-material"),require("../../WebCore/InputLabelBase/StyledInputLabelBase.js"),require("../../WebCore/Differential/DifferentialContainer.js"),require("../../WebCore/Differential/DifferentialRadio.js"),require("../../WebCore/DropdownMenu/StyledMenu.js"),require("react"),require("../../WebCore/FormGenerator/FormGenerator.js"),require("../../WebCore/GridOverlay/GridOverlay.js");var u=require("../../WebCore/HtmlParser/HtmlParser.js");require("../../WebCore/IconButton/IconButton.js"),require("../../WebCore/IconButtonBase/IconButtonBase.js"),require("../../WebCore/IconButtonGroup/IconButtonGroup.js"),require("../../WebCore/Image/Image.js"),require("../../WebCore/Label/Label.js"),require("../../WebCore/Likert/LikertContainer.js"),require("../../WebCore/Likert/LikertLabel.js"),require("../../WebCore/Likert/LikertRadio.js"),require("../../WebCore/Link/StyledLink.js"),require("@lottiefiles/dotlottie-react"),require("../../WebCore/LoopsAiButton/LoopsAiButton.js"),require("markdown-to-jsx"),require("material-ui-popup-state/hooks"),require("../../WebCore/Surface/Surface.js"),require("../../WebCore/Menu/MenuItem.js"),require("../../WebCore/ModalLayout/_partials/ModalActionsWrapper.js"),require("../../WebCore/ModalLayout/_partials/ModalContentWrapper.js"),require("../../WebCore/NavigationButton/NavigationButton.js"),require("../../WebCore/Nudge/NudgeButton.js"),require("../../WebCore/NumberField/NumberField.js"),require("../../WebCore/Pill/StyledPill.js"),require("../../WebCore/Progress/Progress.js"),require("../../WebCore/ProgressBar/ProgressBar.js"),require("../../WebCore/Radio/StyledRadio.js"),require("../../WebCore/utils/autocomplete.styles.js"),require("../../WebCore/Select/AutocompleteListbox.js"),require("../../WebCore/Select/StyledAutocomplete.js"),require("../../WebCore/Select/SelectItem.js"),require("../../WebCore/Select/StyledSelect.js"),require("../../WebCore/RankItem/RankItemContainer.js"),require("../../WebCore/RankItem/RankItemLabel.js"),require("../../WebCore/SortableList/SortableList.js"),require("../../WebCore/SortableList/components/SortableItem/SortableItem.js"),require("../../WebCore/SortableList/components/SortableOverlay/SortableOverlay.js"),require("@tiptap/extension-placeholder"),require("@tiptap/starter-kit"),require("mui-tiptap"),require("../../WebCore/RichTextField/StyledRichTextEditor.js"),require("../../WebCore/Skeleton/Skeleton.js"),require("../../WebCore/Slider/StyledSlider.js"),require("../../WebCore/StarRating/StarRating.js"),require("../../WebCore/Switch/StyledSwitch.js"),require("../../WebCore/Textarea/Textarea.js"),require("../../WebCore/TrialCard/TrialCardContainers.js"),require("../../WebCore/TrialCard/TrialPill.js"),require("../../WebCore/UserMenu/UserMenuButton.js"),require("../../WebCore/VideoModal/VideoModal.js");var n=require("../AssetItem/AssetItem.js"),l=require("../QuestionLabel/QuestionLabel.js");function d(e){return e&&e.__esModule?e:{default:e}}var c=d(i);const p=r.styled(r.Box)(({theme:e})=>({backgroundColor:e.custom.palette.surface.default,borderRadius:e.spacing(e.custom.radius.lg),boxShadow:e.custom.elevation.raised,minWidth:32*o.base+"px",maxWidth:64*o.base+"px",paddingBottom:e.spacing(e.custom.padding.md),display:"grid",gridTemplateRows:"auto 1fr 118px auto",gap:e.spacing(e.custom.margin.md)}));module.exports=({question:i,questionType:o,subCopy:d,assetThumbnail:b,assetType:m,statTitle:C,statValue:j,onClickAsset:q,resultGraph:g,onClickShowMore:W})=>{const x=r.useTheme();return e.jsxs(p,{children:[e.jsx(l,{type:o,slotProps:{container:{sx:{borderRadius:`${x.spacing(x.custom.radius.lg)} ${x.spacing(x.custom.radius.lg)} 0 0`}}}}),e.jsxs(r.Stack,{sx:{gap:x.spacing(x.custom.margin.sm),flexDirection:"row",justifyContent:"space-between",paddingX:x.spacing(x.custom.padding.md)},children:[e.jsxs(r.Stack,{sx:{gap:x.spacing(x.custom.margin.sm)},children:[e.jsx(s,{component:"p",variation:"lg",weight:"bold",clamp:4,children:i}),d&&e.jsx(u,{typographyProps:{secondary:!0,variation:"sm",component:"p",clamp:3},children:d})]}),e.jsx(r.Box,{sx:{minWidth:"92px",width:"92px",height:"92px",overflow:"hidden",borderRadius:x.spacing(x.custom.radius.xs),border:`1px solid ${x.custom.palette.stroke.light}`,boxShadow:x.custom.elevation.raised,[`> .${r.boxClasses.root}`]:{display:"flex",height:"100%"}},children:e.jsx(n,{mediaType:m,thumbnail:b,onClick:q})})]}),e.jsxs(r.Stack,{sx:{gap:x.spacing(x.custom.margin.xs)},children:[e.jsxs(r.Stack,{sx:{placeSelf:"center",alignItems:"center",flexDirection:"row",gap:x.spacing(x.custom.margin.sm),height:"18px"},children:[e.jsx(s,{component:"p",variation:"xs",children:C}),j&&e.jsxs(s,{component:"p",variation:"xs",weight:"bold",monospaced:!0,children:[e.jsx(c.default,{value:j,animated:!0}),"likert"===o&&"%"]})]}),e.jsx(r.Box,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",height:"96px",paddingX:x.spacing(x.custom.padding.md)},children:g})]}),W&&e.jsx(a,{sizing:"sm",sx:{placeSelf:"center"},variation:"outlined",endIcon:e.jsx(t.default,{name:"open-in-new"}),onClick:W,children:"View full result"})]})};
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("@mui/material"),i=require("@number-flow/react");require("../../BrandCore/colorRamps.js");var o=require("../../BrandCore/primitiveVariables.js");require("../../BrandCore/semanticColor.js"),require("../../BrandCore/types.js"),require("../../BrandCore/typography.js");var t=require("../../BrandCore/Icon/Icon.js");require("../../../utils/formValidation/misc.js"),require("../../WebCore/utils/typography.util.js"),require("../../WebCore/AnnualController/AnnualController.js"),require("../../WebCore/Accordion/Accordion.js");var s=require("../../WebCore/Typography/Typography.js");require("merge-sx"),require("../../WebCore/Badge/Badge.js"),require("../../WebCore/Breadcrumb/Breadcrumb.js");var a=require("../../WebCore/Button/Button.js");require("../../WebCore/ButtonBase/ButtonBase.js"),require("../../WebCore/Checkbox/StyledCheckbox.js"),require("../../WebCore/InputFieldBase/InputFieldBase.js"),require("../../WebCore/CreatableAutocomplete/CreatableAutocomplete.js"),require("@mui/icons-material"),require("../../WebCore/InputLabelBase/StyledInputLabelBase.js"),require("../../WebCore/Differential/DifferentialContainer.js"),require("../../WebCore/Differential/DifferentialRadio.js"),require("../../WebCore/DropdownMenu/StyledMenu.js"),require("react"),require("../../WebCore/FormGenerator/FormGenerator.js"),require("../../WebCore/GridOverlay/GridOverlay.js");var u=require("../../WebCore/HtmlParser/HtmlParser.js");require("../../WebCore/IconButton/IconButton.js"),require("../../WebCore/IconButtonBase/IconButtonBase.js"),require("../../WebCore/IconButtonGroup/IconButtonGroup.js"),require("../../WebCore/Image/Image.js"),require("../../WebCore/Label/Label.js"),require("../../WebCore/Likert/LikertContainer.js"),require("../../WebCore/Likert/LikertLabel.js"),require("../../WebCore/Likert/LikertRadio.js"),require("../../WebCore/Link/StyledLink.js"),require("@lottiefiles/dotlottie-react"),require("../../WebCore/LoopsAiButton/LoopsAiButton.js"),require("markdown-to-jsx"),require("material-ui-popup-state/hooks"),require("../../WebCore/Surface/Surface.js"),require("../../WebCore/Menu/MenuItem.js"),require("../../WebCore/ModalLayout/_partials/ModalActionsWrapper.js"),require("../../WebCore/ModalLayout/_partials/ModalContentWrapper.js"),require("../../WebCore/NavigationButton/NavigationButton.js"),require("../../WebCore/Nudge/NudgeButton.js"),require("../../WebCore/NumberField/NumberField.js"),require("../../WebCore/Pill/StyledPill.js"),require("../../WebCore/Progress/Progress.js"),require("../../WebCore/ProgressBar/ProgressBar.js"),require("../../WebCore/Radio/StyledRadio.js"),require("../../WebCore/utils/autocomplete.styles.js"),require("../../WebCore/Select/AutocompleteListbox.js"),require("../../WebCore/Select/StyledAutocomplete.js"),require("../../WebCore/Select/SelectItem.js"),require("../../WebCore/Select/StyledSelect.js"),require("../../WebCore/RankItem/RankItemContainer.js"),require("../../WebCore/RankItem/RankItemLabel.js"),require("../../WebCore/SortableList/SortableList.js"),require("../../WebCore/SortableList/components/SortableItem/SortableItem.js"),require("../../WebCore/SortableList/components/SortableOverlay/SortableOverlay.js"),require("@tiptap/extension-placeholder"),require("@tiptap/starter-kit"),require("mui-tiptap"),require("../../WebCore/RichTextField/StyledRichTextEditor.js"),require("../../WebCore/Skeleton/Skeleton.js"),require("../../WebCore/Slider/StyledSlider.js"),require("../../WebCore/StarRating/StarRating.js"),require("../../WebCore/Switch/StyledSwitch.js"),require("../../WebCore/Textarea/Textarea.js"),require("../../WebCore/TrialCard/TrialCardContainers.js"),require("../../WebCore/TrialCard/TrialPill.js"),require("../../WebCore/UserMenu/UserMenuButton.js"),require("../../WebCore/VideoModal/VideoModal.js");var n=require("../AssetItem/AssetItem.js"),l=require("../QuestionLabel/QuestionLabel.js");function d(e){return e&&e.__esModule?e:{default:e}}var c=d(i);const p=r.styled(r.Box)(({theme:e})=>({backgroundColor:e.custom.palette.surface.default,borderRadius:e.spacing(e.custom.radius.lg),boxShadow:e.custom.elevation.raised,minWidth:32*o.base+"px",maxWidth:64*o.base+"px",paddingBottom:e.spacing(e.custom.padding.md),display:"grid",gridTemplateRows:"auto 1fr 118px auto",gap:e.spacing(e.custom.margin.md)}));module.exports=({question:i,questionType:o,subCopy:d,assetThumbnail:b,assetType:m,statTitle:C,statValue:j,onClickAsset:q,resultGraph:g,onClickShowMore:W})=>{const x=r.useTheme();return e.jsxs(p,{children:[e.jsx(l,{type:o,slotProps:{container:{sx:{borderRadius:`${x.spacing(x.custom.radius.lg)} ${x.spacing(x.custom.radius.lg)} 0 0`}}}}),e.jsxs(r.Stack,{sx:{gap:x.spacing(x.custom.margin.sm),flexDirection:"row",justifyContent:"space-between",paddingX:x.spacing(x.custom.padding.md)},children:[e.jsxs(r.Stack,{sx:{gap:x.spacing(x.custom.margin.sm)},children:[e.jsx(s,{component:"p",variation:"lg",weight:"bold",clamp:4,children:i}),d&&e.jsx(u,{typographyProps:{secondary:!0,variation:"sm",component:"p",clamp:3},children:d})]}),e.jsx(r.Box,{sx:{minWidth:"92px",width:"92px",height:"92px",overflow:"hidden",borderRadius:x.spacing(x.custom.radius.xs),border:`1px solid ${x.custom.palette.stroke.light}`,boxShadow:x.custom.elevation.raised,[`> .${r.boxClasses.root}`]:{display:"flex",height:"100%"}},children:e.jsx(n,{mediaType:m,thumbnail:b,onClick:q})})]}),e.jsxs(r.Stack,{sx:{gap:x.spacing(x.custom.margin.xs)},children:[e.jsxs(r.Stack,{sx:{placeSelf:"center",alignItems:"center",flexDirection:"row",gap:x.spacing(x.custom.margin.sm),height:"18px"},children:[e.jsx(s,{component:"p",variation:"xs",children:C}),j&&e.jsxs(s,{component:"p",variation:"xs",weight:"bold",monospaced:!0,children:[e.jsx(c.default,{value:j,animated:!0,format:{minimumFractionDigits:2,maximumFractionDigits:2}}),"likert"===o&&"%"]})]}),e.jsx(r.Box,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",height:"96px",paddingX:x.spacing(x.custom.padding.md)},children:g})]}),W&&e.jsx(a,{sizing:"sm",sx:{placeSelf:"center"},variation:"outlined",endIcon:e.jsx(t.default,{name:"open-in-new"}),onClick:W,children:"View full result"})]})};
|
|
@@ -5,40 +5,40 @@ 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> & _mui_material_OverridableComponent.CommonProps & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof
|
|
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_system.BoxOwnProps<_mui_material.Theme> | keyof _mui_material_OverridableComponent.CommonProps> & {
|
|
9
9
|
component?: React.ElementType;
|
|
10
10
|
} & {
|
|
11
11
|
maxHeight: number;
|
|
12
12
|
} & {
|
|
13
13
|
responsive?: boolean;
|
|
14
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>, "
|
|
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>, "sx" | "alignItems" | "style" | "children" | "autoFocus" | "className" | "tabIndex" | "classes" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "dense" | "disableGutters" | "divider" | "selected"> & _mui_system.MUIStyledCommonProps<_mui_material.Theme> & {
|
|
16
16
|
component?: React.ElementType;
|
|
17
17
|
} & {
|
|
18
18
|
maxHeight: number;
|
|
19
19
|
} & {
|
|
20
20
|
responsive?: boolean;
|
|
21
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
|
|
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_system.BoxOwnProps<_mui_material.Theme> | keyof _mui_material_OverridableComponent.CommonProps> & {
|
|
23
23
|
component?: React.ElementType;
|
|
24
24
|
} & {
|
|
25
25
|
maxHeight: number;
|
|
26
26
|
} & {
|
|
27
27
|
responsive?: boolean;
|
|
28
28
|
}, {}, {}>;
|
|
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
|
|
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_system.BoxOwnProps<_mui_material.Theme> | keyof _mui_material_OverridableComponent.CommonProps> & {
|
|
30
30
|
component?: React.ElementType;
|
|
31
31
|
}, {}, {}>;
|
|
32
|
-
declare const VerticalBar: _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
|
|
32
|
+
declare const VerticalBar: _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_system.BoxOwnProps<_mui_material.Theme> | keyof _mui_material_OverridableComponent.CommonProps> & {
|
|
33
33
|
component?: React.ElementType;
|
|
34
34
|
} & CommonComponentProps & {
|
|
35
35
|
value: number;
|
|
36
36
|
checked: boolean;
|
|
37
37
|
}, {}, {}>;
|
|
38
|
-
declare const VerticalBarActions: _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> & _mui_system.BoxOwnProps<_mui_material.Theme> & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof
|
|
38
|
+
declare const VerticalBarActions: _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> & _mui_system.BoxOwnProps<_mui_material.Theme> & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_system.BoxOwnProps<_mui_material.Theme> | keyof _mui_material_OverridableComponent.CommonProps> & {
|
|
39
39
|
component?: React.ElementType;
|
|
40
40
|
}, {}, {}>;
|
|
41
|
-
declare const VerticalBarLabel: _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
|
|
41
|
+
declare const VerticalBarLabel: _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_system.BoxOwnProps<_mui_material.Theme> | keyof _mui_material_OverridableComponent.CommonProps> & {
|
|
42
42
|
component?: React.ElementType;
|
|
43
43
|
}, {}, {}>;
|
|
44
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> & {
|
|
@@ -46,7 +46,7 @@ declare const AxisSegmentWrapper: _emotion_styled.StyledComponent<_mui_material.
|
|
|
46
46
|
} & {
|
|
47
47
|
maxHeight: number;
|
|
48
48
|
} & Partial<SliderGraphBarProps>, {}, {}>;
|
|
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
|
|
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_system.BoxOwnProps<_mui_material.Theme> | keyof _mui_material_OverridableComponent.CommonProps> & {
|
|
50
50
|
component?: React.ElementType;
|
|
51
51
|
} & {
|
|
52
52
|
showGraphLines?: boolean;
|
|
@@ -6,7 +6,7 @@ import { TextFieldProps } from '@mui/material';
|
|
|
6
6
|
type InputFieldBaseProps = TextFieldProps;
|
|
7
7
|
declare const InputFieldBase: _emotion_styled.StyledComponent<{
|
|
8
8
|
variant?: _mui_material.TextFieldVariants | undefined;
|
|
9
|
-
} & Omit<_mui_material.
|
|
9
|
+
} & Omit<_mui_material.FilledTextFieldProps | _mui_material.OutlinedTextFieldProps | _mui_material.StandardTextFieldProps, "variant"> & (_mui_system.MUIStyledCommonProps<_mui_material.Theme> & InputFieldBaseProps), {}, {}>;
|
|
10
10
|
|
|
11
11
|
export { InputFieldBase as default };
|
|
12
12
|
export type { InputFieldBaseProps };
|
|
@@ -12,7 +12,7 @@ interface TypographyProps extends Omit<TypographyProps$1, 'ref'> {
|
|
|
12
12
|
secondary?: boolean;
|
|
13
13
|
textColor?: string;
|
|
14
14
|
}
|
|
15
|
-
declare const Typography: react.ForwardRefExoticComponent<TypographyProps & react.RefAttributes<
|
|
15
|
+
declare const Typography: react.ForwardRefExoticComponent<TypographyProps & react.RefAttributes<HTMLParagraphElement | HTMLHeadingElement>>;
|
|
16
16
|
|
|
17
17
|
export { Typography as default };
|
|
18
18
|
export type { TypographyProps };
|
|
@@ -4,7 +4,7 @@ import { PaletteMode, Direction } from '@mui/material';
|
|
|
4
4
|
import { ScreenSize, CustomTheme } from './types.js';
|
|
5
5
|
|
|
6
6
|
declare const useThemeBuilder: (initialMode?: PaletteMode, initialScreenSize?: ScreenSize, initialDirection?: Direction) => {
|
|
7
|
-
breakpoint: "" | "sm" | "
|
|
7
|
+
breakpoint: "" | "sm" | "md" | "lg" | "xl";
|
|
8
8
|
custom: CustomTheme;
|
|
9
9
|
gridOverlayVisible: boolean;
|
|
10
10
|
mode: PaletteMode;
|