@useloops/design-system 1.4.738 → 1.4.739
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/WebCore/Menu/Menu.js +1 -1
- package/dist/esm/systems/WebCore/Menu/MenuItem.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/Menu/Menu.d.ts +2 -0
- package/dist/systems/WebCore/Menu/Menu.js +1 -1
- package/dist/systems/WebCore/Menu/MenuItem.js +1 -1
- package/dist/theme/theme.hooks.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as
|
|
1
|
+
import{jsx as e,Fragment as t}from"react/jsx-runtime";import{usePopupState as r}from"material-ui-popup-state/hooks";import{mergeSx as o}from"merge-sx";import p from"../Popper/Popper.js";import a from"./MenuItem.js";const i="min(320px, calc(100vw - 32px))",n=({menuItems:a,offset:n,placement:s,state:d,parentState:l,bindOn:c=["toggle"],trigger:h,width:f=192,maxWidth:u=i,showItemNumbers:v=!1,hoverLeaveDelay:g=0,slotProps:x})=>{const P=d||r({variant:"popper",parentPopupState:l});return e(p,{popperProps:{modifiers:[...n?[{name:"offset",options:{offset:n}}]:[],{name:"preventOverflow",options:{padding:8}}],placement:s,...x?.popper},surfaceProps:{...x?.surface,sx:o({ml:1,p:1,width:"max-content",minWidth:f,maxWidth:u},x?.surface?.sx)},bindOn:c,trigger:h,state:P,hoverLeaveDelay:g,children:e(t,{children:a?.map((e,t)=>m(e,t,P,v,g,P))})})},m=(o,n,s,d,l,c)=>{const h=r({variant:"popper",parentPopupState:c});return o.children?.length?e(p,{popperProps:{placement:"right-end",modifiers:[{name:"preventOverflow",options:{padding:8}}]},surfaceProps:{sx:{p:1,width:"max-content",minWidth:o.width,maxWidth:i}},bindOn:["trigger","hover"],state:h,trigger:e(a,{...o,active:h.isOpen}),hoverLeaveDelay:l,children:e(t,{children:o?.children?.map((e,t)=>m(e,t,s,void 0,l,h))})},`${o.label}-${n}`):e(a,{...o,onClick:e=>{return t=e,r=o?.onClick,t.stopPropagation(),void(r&&r(t));var t,r},baseState:s,showItemNumber:d,itemNumber:n+1},`${o.label}-${n}`)};export{i as MENU_MAX_WIDTH,n as default,m as mapMenuItems};
|
|
@@ -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,buttonBaseClasses as l,typographyClasses as c}from"@mui/material";import{mergeSx as d}from"merge-sx";import"../../BrandCore/colorRamps.js";import{base as m}from"../../BrandCore/primitiveVariables.js";import"../../BrandCore/semanticColor.js";import"../../BrandCore/types.js";import"../../BrandCore/typography.js";import p from"../../BrandCore/Icon/Icon.js";import"../../BrandCore/Sticker/Sticker.js";import"react";import{omitProps as h}from"../../../utils/shouldForwardProp.js";import{buttonInteraction as u}from"../ButtonBase/Button.variant-helpers.js";import"../ButtonBase/ButtonBase.js";import g from"../Label/Label.js";import{Text as x}from"../Text/Text.js";import f from"../Tooltip/Tooltip.js";const
|
|
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 m}from"../../BrandCore/primitiveVariables.js";import"../../BrandCore/semanticColor.js";import"../../BrandCore/types.js";import"../../BrandCore/typography.js";import p from"../../BrandCore/Icon/Icon.js";import"../../BrandCore/Sticker/Sticker.js";import"react";import{omitProps as h}from"../../../utils/shouldForwardProp.js";import{buttonInteraction as u}from"../ButtonBase/Button.variant-helpers.js";import"../ButtonBase/ButtonBase.js";import g from"../Label/Label.js";import{Text as x}from"../Text/Text.js";import f from"../Tooltip/Tooltip.js";const b=o(i,{shouldForwardProp:h("active","iconHeight")})(({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%",whiteSpace:"normal",...u(o,e),backgroundColor:e?o.custom.palette.surface.sunken:"transparent","& p":{minHeight:t},"&:disabled":{backgroundColor:"inherit","& p":{color:o.custom.palette.text.disabled}}})),w=o(r)(({theme:e})=>({padding:e.spacing(.5,1)})),v=o(r)(({theme:e})=>({alignItems:"center",display:"flex",gap:e.spacing(1),textAlign:"left"})),j=o(n,{shouldForwardProp:h("iconHeight")})(({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:h,divider:u,heading:y,selected:B,disabled:C,closeOnClick:k,hidden:I,onClick:H,startIcon:S,slotProps:T,tooltip:W,showItemNumber:P=!1,itemNumber:z,children:F})=>{const L=a(),$=3*m;return I?null:u?e(r,{sx:{height:32,display:"flex",alignItems:"center"},children:e(r,{sx:{borderBottom:`1px solid ${L.custom.palette.stroke.default}`,width:"100%"}})}):i?y?e(w,{children:e(x,{variant:"button",secondary:!0,children:i})}):e(b,{active:n,disabled:C,onClick:e=>{H&&H(e),k&&o?.close()},iconHeight:$,sx:{[`&.${l.root} .${c.root}`]:{minHeight:"initial"}},children:t(v,{sx:{width:"100%",justifyContent:"space-between",gap:1},children:[t(v,{sx:{flex:"1 1 auto",gap:1,minWidth:0},children:[P&&!!z&&e(g,{body:z,sizing:"xxs",colorScheme:"neutral",sx:{minWidth:32}}),void 0!==S&&e(p,{name:S,...T?.startIcon}),W?e(f,{message:i,slotProps:{wrapper:{sx:{minWidth:0,overflow:"hidden",flex:"1 1 0",width:0}}},children:e(x,{monospaced:!0,sx:d({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},h&&{color:L.custom.palette.text.negative},y&&{color:L.custom.palette.text.secondary}),variant:"button",children:i})}):e(x,{monospaced:!0,sx:d({whiteSpace:"normal",overflowWrap:"anywhere"},h&&{color:L.custom.palette.text.negative},y&&{color:L.custom.palette.text.secondary}),variant:"button",children:i})]}),t(j,{iconHeight:$,sx:{minWidth:$},children:[F?.length&&F.length>0&&e(s,{in:!0,children:e(r,{sx:{display:"flex",alignItems:"center"},children:e(p,{name:"chevron-right",size:$})})}),B&&e(s,{in:!0,children:e(r,{sx:{display:"flex",alignItems:"center"},children:e(p,{name:"check",size:$})})})]})]})}):null};export{y as default};
|
|
@@ -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 | undefined;
|
|
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, keyof _mui_material.ListItemButtonOwnProps> & Omit<_mui_material.ButtonBaseOwnProps, "tabIndex" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "nativeButton" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "type" | keyof _mui_material.ListItemButtonOwnProps> & _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, keyof _mui_material.ListItemButtonOwnProps> & Omit<_mui_material.ButtonBaseOwnProps, "tabIndex" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "nativeButton" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "type" | keyof _mui_material.ListItemButtonOwnProps> & _mui_material_OverridableComponent.CommonProps & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "sx" | "alignItems" | "disabled" | "style" | "children" | "autoFocus" | "className" | "tabIndex" | "classes" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "nativeButton" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "type" | "dense" | "disableGutters" | "divider" | "selected"> & _mui_system.MUIStyledCommonProps<_mui_material.Theme> & {
|
|
16
16
|
component?: React.ElementType | undefined;
|
|
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 | undefined;
|
|
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 | undefined;
|
|
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 | undefined;
|
|
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 | undefined;
|
|
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 | undefined;
|
|
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 | undefined;
|
|
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 };
|
|
@@ -13,7 +13,9 @@ interface MenuProps extends PropsWithChildren {
|
|
|
13
13
|
parentState?: PopupState;
|
|
14
14
|
bindOn?: PopperProps$1['bindOn'];
|
|
15
15
|
trigger: ReactElement;
|
|
16
|
+
/** Minimum width — the menu grows past this to fit its widest item. */
|
|
16
17
|
width?: number;
|
|
18
|
+
maxWidth?: number | string;
|
|
17
19
|
showItemNumbers?: boolean;
|
|
18
20
|
hoverLeaveDelay?: number;
|
|
19
21
|
slotProps?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("material-ui-popup-state/hooks"),r=require("merge-sx"),p=require("../Popper/Popper.js"),a=require("./MenuItem.js");const o="min(320px, calc(100vw - 32px))",n=(r,s,i,m,u,d)=>{const l=t.usePopupState({variant:"popper",parentPopupState:d});return r.children?.length?e.jsx(p,{popperProps:{placement:"right-end",modifiers:[{name:"preventOverflow",options:{padding:8}}]},surfaceProps:{sx:{p:1,width:"max-content",minWidth:r.width,maxWidth:o}},bindOn:["trigger","hover"],state:l,trigger:e.jsx(a,{...r,active:l.isOpen}),hoverLeaveDelay:u,children:e.jsx(e.Fragment,{children:r?.children?.map((e,t)=>n(e,t,i,void 0,u,l))})},`${r.label}-${s}`):e.jsx(a,{...r,onClick:e=>{return t=e,p=r?.onClick,t.stopPropagation(),void(p&&p(t));var t,p},baseState:i,showItemNumber:m,itemNumber:s+1},`${r.label}-${s}`)};exports.MENU_MAX_WIDTH=o,exports.default=({menuItems:a,offset:s,placement:i,state:m,parentState:u,bindOn:d=["toggle"],trigger:l,width:c=192,maxWidth:h=o,showItemNumbers:x=!1,hoverLeaveDelay:v=0,slotProps:g})=>{const f=m||t.usePopupState({variant:"popper",parentPopupState:u});return e.jsx(p,{popperProps:{modifiers:[...s?[{name:"offset",options:{offset:s}}]:[],{name:"preventOverflow",options:{padding:8}}],placement:i,...g?.popper},surfaceProps:{...g?.surface,sx:r.mergeSx({ml:1,p:1,width:"max-content",minWidth:c,maxWidth:h},g?.surface?.sx)},bindOn:d,trigger:l,state:f,hoverLeaveDelay:v,children:e.jsx(e.Fragment,{children:a?.map((e,t)=>n(e,t,f,x,v,f))})})},exports.mapMenuItems=n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("@mui/material"),r=require("merge-sx");require("../../BrandCore/colorRamps.js");var i=require("../../BrandCore/primitiveVariables.js");require("../../BrandCore/semanticColor.js"),require("../../BrandCore/types.js"),require("../../BrandCore/typography.js");var s=require("../../BrandCore/Icon/Icon.js");require("../../BrandCore/Sticker/Sticker.js"),require("react");var o=require("../../../utils/shouldForwardProp.js"),n=require("../ButtonBase/Button.variant-helpers.js");require("../ButtonBase/ButtonBase.js");var a=require("../Label/Label.js"),l=require("../Text/Text.js"),
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("@mui/material"),r=require("merge-sx");require("../../BrandCore/colorRamps.js");var i=require("../../BrandCore/primitiveVariables.js");require("../../BrandCore/semanticColor.js"),require("../../BrandCore/types.js"),require("../../BrandCore/typography.js");var s=require("../../BrandCore/Icon/Icon.js");require("../../BrandCore/Sticker/Sticker.js"),require("react");var o=require("../../../utils/shouldForwardProp.js"),n=require("../ButtonBase/Button.variant-helpers.js");require("../ButtonBase/ButtonBase.js");var a=require("../Label/Label.js"),l=require("../Text/Text.js"),c=require("../Tooltip/Tooltip.js");const d=t.styled(t.Button,{shouldForwardProp:o.omitProps("active","iconHeight")})(({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%",whiteSpace:"normal",...n.buttonInteraction(r,e),backgroundColor:e?r.custom.palette.surface.sunken:"transparent","& p":{minHeight:t},"&:disabled":{backgroundColor:"inherit","& p":{color:r.custom.palette.text.disabled}}})),x=t.styled(t.Box)(({theme:e})=>({padding:e.spacing(.5,1)})),u=t.styled(t.Box)(({theme:e})=>({alignItems:"center",display:"flex",gap:e.spacing(1),textAlign:"left"})),h=t.styled(t.Stack,{shouldForwardProp:o.omitProps("iconHeight")})(({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:o,label:n,active:p,danger:m,divider:g,heading:j,selected:b,disabled:v,closeOnClick:B,hidden:w,onClick:y,startIcon:f,slotProps:q,tooltip:C,showItemNumber:k=!1,itemNumber:I,children:S})=>{const T=t.useTheme(),H=3*i.base;return w?null:g?e.jsx(t.Box,{sx:{height:32,display:"flex",alignItems:"center"},children:e.jsx(t.Box,{sx:{borderBottom:`1px solid ${T.custom.palette.stroke.default}`,width:"100%"}})}):n?j?e.jsx(x,{children:e.jsx(l.Text,{variant:"button",secondary:!0,children:n})}):e.jsx(d,{active:p,disabled:v,onClick:e=>{y&&y(e),B&&o?.close()},iconHeight:H,sx:{[`&.${t.buttonBaseClasses.root} .${t.typographyClasses.root}`]:{minHeight:"initial"}},children:e.jsxs(u,{sx:{width:"100%",justifyContent:"space-between",gap:1},children:[e.jsxs(u,{sx:{flex:"1 1 auto",gap:1,minWidth:0},children:[k&&!!I&&e.jsx(a,{body:I,sizing:"xxs",colorScheme:"neutral",sx:{minWidth:32}}),void 0!==f&&e.jsx(s.default,{name:f,...q?.startIcon}),C?e.jsx(c,{message:n,slotProps:{wrapper:{sx:{minWidth:0,overflow:"hidden",flex:"1 1 0",width:0}}},children:e.jsx(l.Text,{monospaced:!0,sx:r.mergeSx({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},m&&{color:T.custom.palette.text.negative},j&&{color:T.custom.palette.text.secondary}),variant:"button",children:n})}):e.jsx(l.Text,{monospaced:!0,sx:r.mergeSx({whiteSpace:"normal",overflowWrap:"anywhere"},m&&{color:T.custom.palette.text.negative},j&&{color:T.custom.palette.text.secondary}),variant:"button",children:n})]}),e.jsxs(h,{iconHeight:H,sx:{minWidth:H},children:[S?.length&&S.length>0&&e.jsx(t.Grow,{in:!0,children:e.jsx(t.Box,{sx:{display:"flex",alignItems:"center"},children:e.jsx(s.default,{name:"chevron-right",size:H})})}),b&&e.jsx(t.Grow,{in:!0,children:e.jsx(t.Box,{sx:{display:"flex",alignItems:"center"},children:e.jsx(s.default,{name:"check",size:H})})})]})]})}):null};
|
|
@@ -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;
|