@useloops/design-system 1.4.582 → 1.4.583

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.
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{styled as o,Button as i,Box as r,Stack as n,useTheme as a,Grow as s}from"@mui/material";import{mergeSx as l}from"merge-sx";import"../../BrandCore/colorRamps.js";import{base as c}from"../../BrandCore/primitiveVariables.js";import"../../BrandCore/semanticColor.js";import"../../BrandCore/types.js";import"../../BrandCore/typography.js";import d from"../../BrandCore/Icon/Icon.js";import{buttonInteraction as p}from"../ButtonBase/Button.variant-helpers.js";import"../ButtonBase/ButtonBase.js";import m from"../Tooltip/Tooltip.js";import h from"../Typography/Typography.js";const g=o(i,{shouldForwardProp:e=>!["active","iconHeight"].includes(e)})(({active:e,iconHeight:t=24,theme:o})=>({borderRadius:o.spacing(o.custom.radius.sm),maxWidth:"100%",padding:o.spacing(.5,1),textTransform:"none",width:"100%",textOverflow:"ellipsis",whiteSpace:"nowrap",...p(o,e),backgroundColor:e?o.custom.palette.surface.sunken:"transparent","& p":{minHeight:t},"&:disabled":{backgroundColor:"inherit","& p":{color:o.custom.palette.text.disabled}}})),u=o(r)(({theme:e})=>({padding:e.spacing(.5,1)})),x=o(r)(({theme:e})=>({alignItems:"center",display:"flex",gap:e.spacing(1),textAlign:"left"})),f=o(n,{shouldForwardProp:e=>"iconHeight"!==e})(({iconHeight:e=24,theme:t})=>({height:e,width:24,alignItems:"center",color:t.custom.palette.icon.secondary,display:"flex",justifyContent:"center",marginLeft:"auto"})),y=({baseState:o,label:i,active:n,danger:p,divider:y,heading:v,selected:w,disabled:b,closeOnClick:B,hidden:C,onClick:j,startIcon:I,slotProps:k,tooltip:H,children:T})=>{const O=a(),P=3*c;return C?null:y?e(r,{sx:{height:32,display:"flex",alignItems:"center"},children:e(r,{sx:{borderBottom:`1px solid ${O.custom.palette.stroke.default}`,width:"100%"}})}):i?v?e(u,{children:e(h,{component:"p",type:"button",variation:"md",sx:{color:O.custom.palette.text.secondary},children:i})}):e(g,{active:n,disabled:b,onClick:e=>{j&&j(e),B&&o?.close()},iconHeight:P,children:t(x,{sx:{width:"100%",justifyContent:"space-between",gap:1},children:[t(x,{sx:{flex:"1 1 auto",gap:1,minWidth:0},children:[void 0!==I&&e(d,{name:I,...k?.startIcon}),H?e(m,{message:i,slotProps:{wrapper:{sx:{minWidth:0,overflow:"hidden",flex:"1 1 auto"}}},children:e(h,{monospaced:!0,component:"p",sx:l({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},p&&{color:O.custom.palette.text.negative},v&&{color:O.custom.palette.text.secondary}),type:"button",variation:"md",children:i})}):e(h,{monospaced:!0,component:"p",sx:l({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},p&&{color:O.custom.palette.text.negative},v&&{color:O.custom.palette.text.secondary}),type:"button",variation:"md",children:i})]}),t(f,{iconHeight:P,minWidth:P,children:[T?.length&&T.length>0&&e(s,{in:!0,children:e(r,{sx:{display:"flex",alignItems:"center"},children:e(d,{name:"chevron-right",size:P})})}),w&&e(s,{in:!0,children:e(r,{sx:{display:"flex",alignItems:"center"},children:e(d,{name:"check",size:P})})})]})]})}):null};export{y as default};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{styled as o,Button as i,Box as r,Stack as n,useTheme as a,Grow as s,buttonBaseClasses as l,typographyClasses as c}from"@mui/material";import{mergeSx as d}from"merge-sx";import"../../BrandCore/colorRamps.js";import{base as p}from"../../BrandCore/primitiveVariables.js";import"../../BrandCore/semanticColor.js";import"../../BrandCore/types.js";import"../../BrandCore/typography.js";import m from"../../BrandCore/Icon/Icon.js";import{buttonInteraction as h}from"../ButtonBase/Button.variant-helpers.js";import"../ButtonBase/ButtonBase.js";import g from"../Tooltip/Tooltip.js";import u from"../Typography/Typography.js";const x=o(i,{shouldForwardProp:e=>!["active","iconHeight"].includes(e)})(({active:e,iconHeight:t=24,theme:o})=>({borderRadius:o.spacing(o.custom.radius.sm),maxWidth:"100%",padding:o.spacing(.5,1),textTransform:"none",width:"100%",textOverflow:"ellipsis",whiteSpace:"nowrap",...h(o,e),backgroundColor:e?o.custom.palette.surface.sunken:"transparent","& p":{minHeight:t},"&:disabled":{backgroundColor:"inherit","& p":{color:o.custom.palette.text.disabled}}})),f=o(r)(({theme:e})=>({padding:e.spacing(.5,1)})),y=o(r)(({theme:e})=>({alignItems:"center",display:"flex",gap:e.spacing(1),textAlign:"left"})),v=o(n,{shouldForwardProp:e=>"iconHeight"!==e})(({iconHeight:e=24,theme:t})=>({height:e,width:24,alignItems:"center",color:t.custom.palette.icon.secondary,display:"flex",justifyContent:"center",marginLeft:"auto"})),w=({baseState:o,label:i,active:n,danger:h,divider:w,heading:b,selected:B,disabled:C,closeOnClick:j,hidden:I,onClick:k,startIcon:H,slotProps:T,tooltip:O,children:P})=>{const S=a(),W=3*p;return I?null:w?e(r,{sx:{height:32,display:"flex",alignItems:"center"},children:e(r,{sx:{borderBottom:`1px solid ${S.custom.palette.stroke.default}`,width:"100%"}})}):i?b?e(f,{children:e(u,{component:"p",type:"button",variation:"md",sx:{color:S.custom.palette.text.secondary},children:i})}):e(x,{active:n,disabled:C,onClick:e=>{k&&k(e),j&&o?.close()},iconHeight:W,sx:{[`&.${l.root} .${c.root}`]:{minHeight:"initial"}},children:t(y,{sx:{width:"100%",justifyContent:"space-between",gap:1},children:[t(y,{sx:{flex:"1 1 auto",gap:1,minWidth:0},children:[void 0!==H&&e(m,{name:H,...T?.startIcon}),O?e(g,{message:i,slotProps:{wrapper:{sx:{minWidth:0,overflow:"hidden",flex:"1 1 auto"}}},children:e(u,{monospaced:!0,component:"p",sx:d({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},h&&{color:S.custom.palette.text.negative},b&&{color:S.custom.palette.text.secondary}),type:"button",variation:"md",children:i})}):e(u,{monospaced:!0,component:"p",sx:d({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},h&&{color:S.custom.palette.text.negative},b&&{color:S.custom.palette.text.secondary}),type:"button",variation:"md",children:i})]}),t(v,{iconHeight:W,minWidth:W,children:[P?.length&&P.length>0&&e(s,{in:!0,children:e(r,{sx:{display:"flex",alignItems:"center"},children:e(m,{name:"chevron-right",size:W})})}),B&&e(s,{in:!0,children:e(r,{sx:{display:"flex",alignItems:"center"},children:e(m,{name:"check",size:W})})})]})]})}):null};export{w as default};
@@ -12,7 +12,7 @@ declare const SliderGraphWrapper: _emotion_styled.StyledComponent<_mui_system.Bo
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>, "sx" | "alignItems" | "className" | "style" | "classes" | "children" | "autoFocus" | "tabIndex" | "disableGutters" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "dense" | "divider" | "selected"> & _mui_system.MUIStyledCommonProps<_mui_material.Theme> & {
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
16
  component?: React.ElementType;
17
17
  } & {
18
18
  maxHeight: number;
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("@mui/material"),r=require("merge-sx");require("../../BrandCore/colorRamps.js");var o=require("../../BrandCore/primitiveVariables.js");require("../../BrandCore/semanticColor.js"),require("../../BrandCore/types.js"),require("../../BrandCore/typography.js");var i=require("../../BrandCore/Icon/Icon.js"),s=require("../ButtonBase/Button.variant-helpers.js");require("../ButtonBase/ButtonBase.js");var n=require("../Tooltip/Tooltip.js"),a=require("../Typography/Typography.js");const l=t.styled(t.Button,{shouldForwardProp:e=>!["active","iconHeight"].includes(e)})(({active:e,iconHeight:t=24,theme:r})=>({borderRadius:r.spacing(r.custom.radius.sm),maxWidth:"100%",padding:r.spacing(.5,1),textTransform:"none",width:"100%",textOverflow:"ellipsis",whiteSpace:"nowrap",...s.buttonInteraction(r,e),backgroundColor:e?r.custom.palette.surface.sunken:"transparent","& p":{minHeight:t},"&:disabled":{backgroundColor:"inherit","& p":{color:r.custom.palette.text.disabled}}})),c=t.styled(t.Box)(({theme:e})=>({padding:e.spacing(.5,1)})),d=t.styled(t.Box)(({theme:e})=>({alignItems:"center",display:"flex",gap:e.spacing(1),textAlign:"left"})),p=t.styled(t.Stack,{shouldForwardProp:e=>"iconHeight"!==e})(({iconHeight:e=24,theme:t})=>({height:e,width:24,alignItems:"center",color:t.custom.palette.icon.secondary,display:"flex",justifyContent:"center",marginLeft:"auto"}));module.exports=({baseState:s,label:h,active:x,danger:u,divider:m,heading:g,selected:j,disabled:y,closeOnClick:v,hidden:f,onClick:w,startIcon:B,slotProps:b,tooltip:C,children:q})=>{const I=t.useTheme(),k=3*o.base;return f?null:m?e.jsx(t.Box,{sx:{height:32,display:"flex",alignItems:"center"},children:e.jsx(t.Box,{sx:{borderBottom:`1px solid ${I.custom.palette.stroke.default}`,width:"100%"}})}):h?g?e.jsx(c,{children:e.jsx(a,{component:"p",type:"button",variation:"md",sx:{color:I.custom.palette.text.secondary},children:h})}):e.jsx(l,{active:x,disabled:y,onClick:e=>{w&&w(e),v&&s?.close()},iconHeight:k,children:e.jsxs(d,{sx:{width:"100%",justifyContent:"space-between",gap:1},children:[e.jsxs(d,{sx:{flex:"1 1 auto",gap:1,minWidth:0},children:[void 0!==B&&e.jsx(i.default,{name:B,...b?.startIcon}),C?e.jsx(n,{message:h,slotProps:{wrapper:{sx:{minWidth:0,overflow:"hidden",flex:"1 1 auto"}}},children:e.jsx(a,{monospaced:!0,component:"p",sx:r.mergeSx({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},u&&{color:I.custom.palette.text.negative},g&&{color:I.custom.palette.text.secondary}),type:"button",variation:"md",children:h})}):e.jsx(a,{monospaced:!0,component:"p",sx:r.mergeSx({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},u&&{color:I.custom.palette.text.negative},g&&{color:I.custom.palette.text.secondary}),type:"button",variation:"md",children:h})]}),e.jsxs(p,{iconHeight:k,minWidth:k,children:[q?.length&&q.length>0&&e.jsx(t.Grow,{in:!0,children:e.jsx(t.Box,{sx:{display:"flex",alignItems:"center"},children:e.jsx(i.default,{name:"chevron-right",size:k})})}),j&&e.jsx(t.Grow,{in:!0,children:e.jsx(t.Box,{sx:{display:"flex",alignItems:"center"},children:e.jsx(i.default,{name:"check",size:k})})})]})]})}):null};
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("@mui/material"),o=require("merge-sx");require("../../BrandCore/colorRamps.js");var r=require("../../BrandCore/primitiveVariables.js");require("../../BrandCore/semanticColor.js"),require("../../BrandCore/types.js"),require("../../BrandCore/typography.js");var i=require("../../BrandCore/Icon/Icon.js"),s=require("../ButtonBase/Button.variant-helpers.js");require("../ButtonBase/ButtonBase.js");var n=require("../Tooltip/Tooltip.js"),a=require("../Typography/Typography.js");const l=t.styled(t.Button,{shouldForwardProp:e=>!["active","iconHeight"].includes(e)})(({active:e,iconHeight:t=24,theme:o})=>({borderRadius:o.spacing(o.custom.radius.sm),maxWidth:"100%",padding:o.spacing(.5,1),textTransform:"none",width:"100%",textOverflow:"ellipsis",whiteSpace:"nowrap",...s.buttonInteraction(o,e),backgroundColor:e?o.custom.palette.surface.sunken:"transparent","& p":{minHeight:t},"&:disabled":{backgroundColor:"inherit","& p":{color:o.custom.palette.text.disabled}}})),c=t.styled(t.Box)(({theme:e})=>({padding:e.spacing(.5,1)})),d=t.styled(t.Box)(({theme:e})=>({alignItems:"center",display:"flex",gap:e.spacing(1),textAlign:"left"})),p=t.styled(t.Stack,{shouldForwardProp:e=>"iconHeight"!==e})(({iconHeight:e=24,theme:t})=>({height:e,width:24,alignItems:"center",color:t.custom.palette.icon.secondary,display:"flex",justifyContent:"center",marginLeft:"auto"}));module.exports=({baseState:s,label:h,active:x,danger:u,divider:m,heading:g,selected:j,disabled:y,closeOnClick:v,hidden:f,onClick:w,startIcon:B,slotProps:b,tooltip:C,children:q})=>{const I=t.useTheme(),k=3*r.base;return f?null:m?e.jsx(t.Box,{sx:{height:32,display:"flex",alignItems:"center"},children:e.jsx(t.Box,{sx:{borderBottom:`1px solid ${I.custom.palette.stroke.default}`,width:"100%"}})}):h?g?e.jsx(c,{children:e.jsx(a,{component:"p",type:"button",variation:"md",sx:{color:I.custom.palette.text.secondary},children:h})}):e.jsx(l,{active:x,disabled:y,onClick:e=>{w&&w(e),v&&s?.close()},iconHeight:k,sx:{[`&.${t.buttonBaseClasses.root} .${t.typographyClasses.root}`]:{minHeight:"initial"}},children:e.jsxs(d,{sx:{width:"100%",justifyContent:"space-between",gap:1},children:[e.jsxs(d,{sx:{flex:"1 1 auto",gap:1,minWidth:0},children:[void 0!==B&&e.jsx(i.default,{name:B,...b?.startIcon}),C?e.jsx(n,{message:h,slotProps:{wrapper:{sx:{minWidth:0,overflow:"hidden",flex:"1 1 auto"}}},children:e.jsx(a,{monospaced:!0,component:"p",sx:o.mergeSx({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},u&&{color:I.custom.palette.text.negative},g&&{color:I.custom.palette.text.secondary}),type:"button",variation:"md",children:h})}):e.jsx(a,{monospaced:!0,component:"p",sx:o.mergeSx({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},u&&{color:I.custom.palette.text.negative},g&&{color:I.custom.palette.text.secondary}),type:"button",variation:"md",children:h})]}),e.jsxs(p,{iconHeight:k,minWidth:k,children:[q?.length&&q.length>0&&e.jsx(t.Grow,{in:!0,children:e.jsx(t.Box,{sx:{display:"flex",alignItems:"center"},children:e.jsx(i.default,{name:"chevron-right",size:k})})}),j&&e.jsx(t.Grow,{in:!0,children:e.jsx(t.Box,{sx:{display:"flex",alignItems:"center"},children:e.jsx(i.default,{name:"check",size:k})})})]})]})}):null};
@@ -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<HTMLParagraphElement | HTMLHeadingElement>>;
15
+ declare const Typography: react.ForwardRefExoticComponent<TypographyProps & react.RefAttributes<HTMLHeadingElement | HTMLParagraphElement>>;
16
16
 
17
17
  export { Typography as default };
18
18
  export type { TypographyProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useloops/design-system",
3
- "version": "1.4.582",
3
+ "version": "1.4.583",
4
4
  "description": "The official React based Loops design system",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/esm/index.js",