@useloops/design-system 1.4.554 → 1.4.556

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 n,Box as i,Stack as r,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"../Typography/Typography.js";const h=o(n,{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%",...p(o,e),backgroundColor:e?o.custom.palette.surface.sunken:"transparent","& p":{alignItems:"center",display:"flex",height:t},"&:disabled":{backgroundColor:"inherit","& p":{color:o.custom.palette.text.disabled}}})),g=o(i)(({theme:e})=>({padding:e.spacing(.5,1.5)})),u=o(i)(({theme:e})=>({alignItems:"center",display:"flex",gap:e.spacing(1),justifyContent:"space-between",textAlign:"left"})),x=o(r)(({iconHeight:e=24,theme:t})=>({height:e,width:24,alignItems:"center",color:t.custom.palette.icon.secondary,display:"flex",justifyContent:"center",marginLeft:"auto"})),f=({baseState:o,label:n,active:r,danger:p,divider:f,heading:y,selected:B,disabled:C,closeOnClick:b,onClick:j,startIcon:v,slotProps:I,children:k})=>{const w=a(),H=3*c;return f?e(i,{sx:{height:"32px",display:"flex",alignItems:"center"},children:e(i,{sx:{borderBottom:`1px solid ${w.custom.palette.stroke.default}`,width:"100%"}})}):n?y?e(g,{children:e(m,{component:"p",type:"button",variation:"md",sx:{color:w.custom.palette.text.secondary},children:n})}):e(h,{active:r,disabled:C,onClick:e=>{j&&j(e),b&&o?.close()},iconHeight:H,children:t(u,{sx:{flex:1,gap:1,justifyContent:"start"},children:[void 0!==v&&e(d,{name:v,...I?.startIcon}),e(u,{sx:{px:.5},children:e(m,{monospaced:!0,component:"p",sx:l(p&&{color:w.custom.palette.text.negative},y&&{color:w.custom.palette.text.secondary}),type:"button",variation:"md",children:n})}),(Boolean(k?.length)||B)&&t(x,{iconHeight:H,children:[k?.length&&k.length>0&&e(s,{in:!0,children:e(i,{sx:{display:"flex",alignItems:"center"},children:e(d,{name:"chevron-right",size:H})})}),B&&e(s,{in:!0,children:e(i,{sx:{display:"flex",alignItems:"center"},children:e(d,{name:"check",size:H})})})]})]})}):null};export{f as default};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{styled as o,Button as n,Box as i,Stack as r,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"../Typography/Typography.js";const h=o(n,{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%",...p(o,e),backgroundColor:e?o.custom.palette.surface.sunken:"transparent","& p":{alignItems:"center",display:"flex",height:t},"&:disabled":{backgroundColor:"inherit","& p":{color:o.custom.palette.text.disabled}}})),g=o(i)(({theme:e})=>({padding:e.spacing(.5,1.5)})),u=o(i)(({theme:e})=>({alignItems:"center",display:"flex",gap:e.spacing(1),justifyContent:"space-between",textAlign:"left"})),x=o(r)(({iconHeight:e=24,theme:t})=>({height:e,width:24,alignItems:"center",color:t.custom.palette.icon.secondary,display:"flex",justifyContent:"center",marginLeft:"auto"})),f=({baseState:o,label:n,active:r,danger:p,divider:f,heading:y,selected:B,disabled:C,closeOnClick:b,hidden:j,onClick:v,startIcon:I,slotProps:k,children:w})=>{const H=a(),T=3*c;return j?null:f?e(i,{sx:{height:"32px",display:"flex",alignItems:"center"},children:e(i,{sx:{borderBottom:`1px solid ${H.custom.palette.stroke.default}`,width:"100%"}})}):n?y?e(g,{children:e(m,{component:"p",type:"button",variation:"md",sx:{color:H.custom.palette.text.secondary},children:n})}):e(h,{active:r,disabled:C,onClick:e=>{v&&v(e),b&&o?.close()},iconHeight:T,children:t(u,{sx:{flex:1,gap:1,justifyContent:"start"},children:[void 0!==I&&e(d,{name:I,...k?.startIcon}),e(u,{sx:{px:.5},children:e(m,{monospaced:!0,component:"p",sx:l(p&&{color:H.custom.palette.text.negative},y&&{color:H.custom.palette.text.secondary}),type:"button",variation:"md",children:n})}),(Boolean(w?.length)||B)&&t(x,{iconHeight:T,children:[w?.length&&w.length>0&&e(s,{in:!0,children:e(i,{sx:{display:"flex",alignItems:"center"},children:e(d,{name:"chevron-right",size:T})})}),B&&e(s,{in:!0,children:e(i,{sx:{display:"flex",alignItems:"center"},children:e(d,{name:"check",size:T})})})]})]})}):null};export{f as default};
@@ -13,6 +13,7 @@ interface MenuItemProps {
13
13
  selected?: boolean;
14
14
  disabled?: boolean;
15
15
  closeOnClick?: boolean;
16
+ hidden?: boolean;
16
17
  onClick?: MouseEventHandler<HTMLButtonElement>;
17
18
  children?: MenuItemProps[];
18
19
  width?: 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 s=require("../../BrandCore/primitiveVariables.js");require("../../BrandCore/semanticColor.js"),require("../../BrandCore/types.js"),require("../../BrandCore/typography.js");var n=require("../../BrandCore/Icon/Icon.js"),i=require("../ButtonBase/Button.variant-helpers.js");require("../ButtonBase/ButtonBase.js");var o=require("../Typography/Typography.js");const a=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%",...i.buttonInteraction(r,e),backgroundColor:e?r.custom.palette.surface.sunken:"transparent","& p":{alignItems:"center",display:"flex",height:t},"&:disabled":{backgroundColor:"inherit","& p":{color:r.custom.palette.text.disabled}}})),l=t.styled(t.Box)(({theme:e})=>({padding:e.spacing(.5,1.5)})),c=t.styled(t.Box)(({theme:e})=>({alignItems:"center",display:"flex",gap:e.spacing(1),justifyContent:"space-between",textAlign:"left"})),d=t.styled(t.Stack)(({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:i,label:u,active:x,danger:p,divider:h,heading:m,selected:g,disabled:j,closeOnClick:y,onClick:B,startIcon:f,slotProps:b,children:v})=>{const C=t.useTheme(),q=3*s.base;return h?e.jsx(t.Box,{sx:{height:"32px",display:"flex",alignItems:"center"},children:e.jsx(t.Box,{sx:{borderBottom:`1px solid ${C.custom.palette.stroke.default}`,width:"100%"}})}):u?m?e.jsx(l,{children:e.jsx(o,{component:"p",type:"button",variation:"md",sx:{color:C.custom.palette.text.secondary},children:u})}):e.jsx(a,{active:x,disabled:j,onClick:e=>{B&&B(e),y&&i?.close()},iconHeight:q,children:e.jsxs(c,{sx:{flex:1,gap:1,justifyContent:"start"},children:[void 0!==f&&e.jsx(n.default,{name:f,...b?.startIcon}),e.jsx(c,{sx:{px:.5},children:e.jsx(o,{monospaced:!0,component:"p",sx:r.mergeSx(p&&{color:C.custom.palette.text.negative},m&&{color:C.custom.palette.text.secondary}),type:"button",variation:"md",children:u})}),(Boolean(v?.length)||g)&&e.jsxs(d,{iconHeight:q,children:[v?.length&&v.length>0&&e.jsx(t.Grow,{in:!0,children:e.jsx(t.Box,{sx:{display:"flex",alignItems:"center"},children:e.jsx(n.default,{name:"chevron-right",size:q})})}),g&&e.jsx(t.Grow,{in:!0,children:e.jsx(t.Box,{sx:{display:"flex",alignItems:"center"},children:e.jsx(n.default,{name:"check",size:q})})})]})]})}):null};
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("@mui/material"),r=require("merge-sx");require("../../BrandCore/colorRamps.js");var s=require("../../BrandCore/primitiveVariables.js");require("../../BrandCore/semanticColor.js"),require("../../BrandCore/types.js"),require("../../BrandCore/typography.js");var n=require("../../BrandCore/Icon/Icon.js"),i=require("../ButtonBase/Button.variant-helpers.js");require("../ButtonBase/ButtonBase.js");var o=require("../Typography/Typography.js");const a=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%",...i.buttonInteraction(r,e),backgroundColor:e?r.custom.palette.surface.sunken:"transparent","& p":{alignItems:"center",display:"flex",height:t},"&:disabled":{backgroundColor:"inherit","& p":{color:r.custom.palette.text.disabled}}})),l=t.styled(t.Box)(({theme:e})=>({padding:e.spacing(.5,1.5)})),c=t.styled(t.Box)(({theme:e})=>({alignItems:"center",display:"flex",gap:e.spacing(1),justifyContent:"space-between",textAlign:"left"})),d=t.styled(t.Stack)(({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:i,label:u,active:x,danger:p,divider:h,heading:m,selected:g,disabled:j,closeOnClick:y,hidden:B,onClick:f,startIcon:b,slotProps:v,children:C})=>{const q=t.useTheme(),I=3*s.base;return B?null:h?e.jsx(t.Box,{sx:{height:"32px",display:"flex",alignItems:"center"},children:e.jsx(t.Box,{sx:{borderBottom:`1px solid ${q.custom.palette.stroke.default}`,width:"100%"}})}):u?m?e.jsx(l,{children:e.jsx(o,{component:"p",type:"button",variation:"md",sx:{color:q.custom.palette.text.secondary},children:u})}):e.jsx(a,{active:x,disabled:j,onClick:e=>{f&&f(e),y&&i?.close()},iconHeight:I,children:e.jsxs(c,{sx:{flex:1,gap:1,justifyContent:"start"},children:[void 0!==b&&e.jsx(n.default,{name:b,...v?.startIcon}),e.jsx(c,{sx:{px:.5},children:e.jsx(o,{monospaced:!0,component:"p",sx:r.mergeSx(p&&{color:q.custom.palette.text.negative},m&&{color:q.custom.palette.text.secondary}),type:"button",variation:"md",children:u})}),(Boolean(C?.length)||g)&&e.jsxs(d,{iconHeight:I,children:[C?.length&&C.length>0&&e.jsx(t.Grow,{in:!0,children:e.jsx(t.Box,{sx:{display:"flex",alignItems:"center"},children:e.jsx(n.default,{name:"chevron-right",size:I})})}),g&&e.jsx(t.Grow,{in:!0,children:e.jsx(t.Box,{sx:{display:"flex",alignItems:"center"},children:e.jsx(n.default,{name:"check",size:I})})})]})]})}):null};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useloops/design-system",
3
- "version": "1.4.554",
3
+ "version": "1.4.556",
4
4
  "description": "The official React based Loops design system",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -105,7 +105,7 @@
105
105
  "dev": "storybook dev -p 6006 --no-open",
106
106
  "clean": "rimraf dist",
107
107
  "build": "storybook build -o dist",
108
- "start": "NODE_ENV=production npx tsx server",
108
+ "start": "NODE_ENV=production bun run server.ts",
109
109
  "package": "bun run clean && rollup -c --bundleConfigAsCjs",
110
110
  "test": "bun test --preload ./config/spec/bun-setup.ts",
111
111
  "test:unit": "bun test --preload ./config/spec/bun-setup.ts src/ config/",