@wandelbots/mui 1.0.0 → 1.1.0
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/README.md +5 -0
- package/dist/components/AdornedTextField/AdornedAutocomplete.cjs +1 -1
- package/dist/components/AdornedTextField/AdornedAutocomplete.d.ts +7 -5
- package/dist/components/AdornedTextField/AdornedAutocomplete.d.ts.map +1 -1
- package/dist/components/AdornedTextField/AdornedAutocomplete.js +13 -12
- package/dist/components/ElevationCard/ElevationCard.cjs +1 -1
- package/dist/components/ElevationCard/ElevationCard.d.ts +5 -2
- package/dist/components/ElevationCard/ElevationCard.d.ts.map +1 -1
- package/dist/components/ElevationCard/ElevationCard.js +23 -19
- package/dist/components/RoundedIconButton/RoundedIconButton.cjs +1 -1
- package/dist/components/RoundedIconButton/RoundedIconButton.d.ts +12 -3
- package/dist/components/RoundedIconButton/RoundedIconButton.d.ts.map +1 -1
- package/dist/components/RoundedIconButton/RoundedIconButton.js +37 -27
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -8,6 +8,11 @@ building blocks are defined **once** here and reused consistently across apps.
|
|
|
8
8
|
**This is the only package that ships a MUI theme.** `@wandelbots/design-tokens` stays
|
|
9
9
|
framework-agnostic (values only); the theme composes those values into MUI shape here.
|
|
10
10
|
|
|
11
|
+
**Pick `@wandelbots/mui` *or* `@wandelbots/hui` — never both.** The two are alternatives,
|
|
12
|
+
not companions: they cover the same primitives from the same design tokens through two
|
|
13
|
+
different styling systems. MUI apps take this package; headless / non-MUI apps take
|
|
14
|
+
`@wandelbots/hui`.
|
|
15
|
+
|
|
11
16
|
**Non-goals:** no domain logic, no data fetching, no API/WebSocket code, no robot/motion
|
|
12
17
|
knowledge. Those live in `wandelbots-js-react-components` (separate repo).
|
|
13
18
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),b=require("@mui/material/Autocomplete"),j=require("./AdornedTextField.cjs"),o=({label:t,placeholder:u,adornedSize:i="medium",error:r,helperText:c,slotProps:e,freeSolo:m,...A})=>d.jsx(b,{freeSolo:m??!0,...A,renderInput:({InputProps:n,InputLabelProps:x,...a})=>d.jsx(j.AdornedTextField,{...a,label:t,placeholder:u,adornedSize:i,error:r,helperText:c,slotProps:{...e,input:{...n,...e==null?void 0:e.input,endAdornment:n.endAdornment},inputLabel:{...x,...e==null?void 0:e.inputLabel}}})});exports.AdornedAutocomplete=o;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AutocompleteProps } from "@mui/material/Autocomplete";
|
|
2
2
|
import type { ReactNode } from "react";
|
|
3
3
|
import type { AdornedTextFieldProps, AdornedTextFieldSize } from "./AdornedTextField";
|
|
4
|
-
export type AdornedAutocompleteProps = Omit<AutocompleteProps<
|
|
4
|
+
export type AdornedAutocompleteProps<T = string, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = true> = Omit<AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>, "renderInput" | "slotProps"> & {
|
|
5
5
|
label?: string;
|
|
6
6
|
placeholder?: string;
|
|
7
7
|
adornedSize?: AdornedTextFieldSize;
|
|
@@ -11,9 +11,11 @@ export type AdornedAutocompleteProps = Omit<AutocompleteProps<string, false, fal
|
|
|
11
11
|
slotProps?: AdornedTextFieldProps["slotProps"];
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* `AutocompleteProps
|
|
14
|
+
* `Autocomplete` styled like `AdornedTextField` (outlined look,
|
|
15
|
+
* `secondary.dark` background, 10px radius). Accepts all MUI
|
|
16
|
+
* `AutocompleteProps` (minus `renderInput`) — `T`, `multiple`,
|
|
17
|
+
* `disableClearable` and `freeSolo` are all open; `freeSolo` defaults to
|
|
18
|
+
* `true` to match this component's original free-text behavior.
|
|
17
19
|
*/
|
|
18
|
-
export declare const AdornedAutocomplete: ({ label, placeholder, adornedSize, error, helperText, slotProps, ...props }: AdornedAutocompleteProps) => import("react").JSX.Element;
|
|
20
|
+
export declare const AdornedAutocomplete: <T = string, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = true>({ label, placeholder, adornedSize, error, helperText, slotProps, freeSolo, ...props }: AdornedAutocompleteProps<T, Multiple, DisableClearable, FreeSolo>) => import("react").JSX.Element;
|
|
19
21
|
//# sourceMappingURL=AdornedAutocomplete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdornedAutocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/AdornedTextField/AdornedAutocomplete.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAEnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EACV,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"AdornedAutocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/AdornedTextField/AdornedAutocomplete.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAEnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EACV,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,oBAAoB,CAAA;AAQ3B,MAAM,MAAM,wBAAwB,CAClC,CAAC,GAAG,MAAM,EACV,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,KAAK,EAC5C,gBAAgB,SAAS,OAAO,GAAG,SAAS,GAAG,KAAK,EACpD,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,IAAI,IACzC,IAAI,CACN,iBAAiB,CAAC,CAAC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,CAAC,EAC1D,aAAa,GAAG,WAAW,CAC5B,GAAG;IACF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,oBAAoB,CAAA;IAClC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,4FAA4F;IAC5F,SAAS,CAAC,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAA;CAC/C,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAC9B,CAAC,GAAG,MAAM,EACV,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,KAAK,EAC5C,gBAAgB,SAAS,OAAO,GAAG,SAAS,GAAG,KAAK,EACpD,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,IAAI,EAC3C,uFASC,wBAAwB,CAAC,CAAC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,CAAC,gCA8BnE,CAAA"}
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as m } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
4
|
-
import { AdornedTextField as
|
|
5
|
-
const
|
|
3
|
+
import a from "@mui/material/Autocomplete";
|
|
4
|
+
import { AdornedTextField as b } from "./AdornedTextField.js";
|
|
5
|
+
const S = ({
|
|
6
6
|
label: d,
|
|
7
7
|
placeholder: i,
|
|
8
8
|
adornedSize: t = "medium",
|
|
9
9
|
error: u,
|
|
10
10
|
helperText: r,
|
|
11
11
|
slotProps: e,
|
|
12
|
-
|
|
12
|
+
freeSolo: A,
|
|
13
|
+
...f
|
|
13
14
|
}) => /* @__PURE__ */ m(
|
|
14
|
-
|
|
15
|
+
a,
|
|
15
16
|
{
|
|
16
|
-
freeSolo: !0,
|
|
17
|
-
...
|
|
18
|
-
renderInput: ({ InputProps: n, InputLabelProps:
|
|
19
|
-
|
|
17
|
+
freeSolo: A ?? !0,
|
|
18
|
+
...f,
|
|
19
|
+
renderInput: ({ InputProps: n, InputLabelProps: c, ...x }) => /* @__PURE__ */ m(
|
|
20
|
+
b,
|
|
20
21
|
{
|
|
21
|
-
...
|
|
22
|
+
...x,
|
|
22
23
|
label: d,
|
|
23
24
|
placeholder: i,
|
|
24
25
|
adornedSize: t,
|
|
@@ -35,12 +36,12 @@ const F = ({
|
|
|
35
36
|
// legacy InputProps it's built from when both are present).
|
|
36
37
|
endAdornment: n.endAdornment
|
|
37
38
|
},
|
|
38
|
-
inputLabel: { ...
|
|
39
|
+
inputLabel: { ...c, ...e == null ? void 0 : e.inputLabel }
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
)
|
|
42
43
|
}
|
|
43
44
|
);
|
|
44
45
|
export {
|
|
45
|
-
|
|
46
|
+
S as AdornedAutocomplete
|
|
46
47
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),c=require("@mui/material/Box"),b={surface:5,raised:8};function p({elevation:d="surface",bordered:i=!0,children:o,sx:r,"data-testid":s,component:t,ref:n}){const u=b[d];return l.jsx(c,{ref:n,...t?{component:t}:{},"data-testid":s,sx:[{borderRadius:e=>`${e.shape.borderRadius}px`,backgroundColor:e=>{var a;return(a=e.palette.backgroundPaperElevation)==null?void 0:a[u]},...i&&{border:e=>`1px solid ${e.palette.divider}`}},...Array.isArray(r)?r:[r]],children:o})}exports.ElevationCard=p;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SxProps, Theme } from "@mui/material/styles";
|
|
2
|
-
import type { ReactNode } from "react";
|
|
2
|
+
import type { ElementType, ReactNode, Ref } from "react";
|
|
3
3
|
/**
|
|
4
4
|
* Semantic elevation levels for cards.
|
|
5
5
|
*
|
|
@@ -19,6 +19,9 @@ export interface ElevationCardProps {
|
|
|
19
19
|
sx?: SxProps<Theme>;
|
|
20
20
|
/** Optional test ID for e2e selectors. */
|
|
21
21
|
"data-testid"?: string;
|
|
22
|
+
/** Root element/component, e.g. "li" for list semantics (default: "div"). */
|
|
23
|
+
component?: ElementType;
|
|
24
|
+
ref?: Ref<HTMLElement>;
|
|
22
25
|
}
|
|
23
26
|
/**
|
|
24
27
|
* A reusable card primitive
|
|
@@ -32,5 +35,5 @@ export interface ElevationCardProps {
|
|
|
32
35
|
* </ElevationCard>
|
|
33
36
|
* ```
|
|
34
37
|
*/
|
|
35
|
-
export declare function ElevationCard({ elevation, bordered, children, sx, "data-testid": dataTestId, }: ElevationCardProps): import("react").JSX.Element;
|
|
38
|
+
export declare function ElevationCard({ elevation, bordered, children, sx, "data-testid": dataTestId, component, ref, }: ElevationCardProps): import("react").JSX.Element;
|
|
36
39
|
//# sourceMappingURL=ElevationCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElevationCard.d.ts","sourceRoot":"","sources":["../../../src/components/ElevationCard/ElevationCard.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ElevationCard.d.ts","sourceRoot":"","sources":["../../../src/components/ElevationCard/ElevationCard.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAExD;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,CAAA;AAOjD,MAAM,WAAW,kBAAkB;IACjC,4DAA4D;IAC5D,SAAS,CAAC,EAAE,cAAc,CAAA;IAC1B,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAA;IACnB,0CAA0C;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,6EAA6E;IAC7E,SAAS,CAAC,EAAE,WAAW,CAAA;IACvB,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAA;CACvB;AAWD;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,EAC5B,SAAqB,EACrB,QAAe,EACf,QAAQ,EACR,EAAE,EACF,aAAa,EAAE,UAAU,EACzB,SAAS,EACT,GAAG,GACJ,EAAE,kBAAkB,+BAuBpB"}
|
|
@@ -1,39 +1,43 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
2
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
3
|
+
import l from "@mui/material/Box";
|
|
4
|
+
const c = {
|
|
5
5
|
surface: 5,
|
|
6
6
|
raised: 8
|
|
7
7
|
};
|
|
8
|
-
function
|
|
9
|
-
elevation:
|
|
8
|
+
function f({
|
|
9
|
+
elevation: d = "surface",
|
|
10
10
|
bordered: o = !0,
|
|
11
|
-
children:
|
|
12
|
-
sx:
|
|
13
|
-
"data-testid":
|
|
11
|
+
children: i,
|
|
12
|
+
sx: a,
|
|
13
|
+
"data-testid": s,
|
|
14
|
+
component: e,
|
|
15
|
+
ref: n
|
|
14
16
|
}) {
|
|
15
|
-
const
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
|
|
17
|
+
const p = c[d];
|
|
18
|
+
return /* @__PURE__ */ u(
|
|
19
|
+
l,
|
|
18
20
|
{
|
|
19
|
-
|
|
21
|
+
ref: n,
|
|
22
|
+
...e ? { component: e } : {},
|
|
23
|
+
"data-testid": s,
|
|
20
24
|
sx: [
|
|
21
25
|
{
|
|
22
|
-
borderRadius:
|
|
23
|
-
backgroundColor: (
|
|
26
|
+
borderRadius: (r) => `${r.shape.borderRadius}px`,
|
|
27
|
+
backgroundColor: (r) => {
|
|
24
28
|
var t;
|
|
25
|
-
return (t =
|
|
29
|
+
return (t = r.palette.backgroundPaperElevation) == null ? void 0 : t[p];
|
|
26
30
|
},
|
|
27
31
|
...o && {
|
|
28
|
-
border: (
|
|
32
|
+
border: (r) => `1px solid ${r.palette.divider}`
|
|
29
33
|
}
|
|
30
34
|
},
|
|
31
|
-
...Array.isArray(
|
|
35
|
+
...Array.isArray(a) ? a : [a]
|
|
32
36
|
],
|
|
33
|
-
children:
|
|
37
|
+
children: i
|
|
34
38
|
}
|
|
35
39
|
);
|
|
36
40
|
}
|
|
37
41
|
export {
|
|
38
|
-
|
|
42
|
+
f as ElevationCard
|
|
39
43
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),R=require("@mui/material/IconButton");function x({icon:u,onClick:i,bgColor:e,isActive:n,disabled:c,dataTestId:l,ariaLabel:p,href:a,size:s,sx:t,ref:b}){return g.jsx(R,{ref:b,...a?{href:a}:{},size:s,onClick:i,disabled:c,sx:[r=>{var o,d;return{backgroundColor:n!==void 0?n?e??((o=r.palette.backgroundPaperElevation)==null?void 0:o[11]):"transparent":e??((d=r.palette.backgroundPaperElevation)==null?void 0:d[11]),borderRadius:`${r.shape.borderRadius}px`,width:"30px",height:"30px"}},...Array.isArray(t)?t:[t]],"data-testid":l,"aria-label":p,children:u})}exports.RoundedIconButton=x;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IconButtonProps } from "@mui/material/IconButton";
|
|
2
|
+
import type { SxProps, Theme } from "@mui/material/styles";
|
|
3
|
+
import type { MouseEventHandler, ReactNode, Ref } from "react";
|
|
2
4
|
export type RoundedIconButtonProps = {
|
|
3
5
|
icon: ReactNode;
|
|
4
|
-
|
|
6
|
+
/** Covers both render modes: a `<button>`, or an `<a>` when `href` is set. */
|
|
7
|
+
onClick?: MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;
|
|
5
8
|
/** Overrides the default background (`backgroundPaperElevation[11]`). */
|
|
6
9
|
bgColor?: string;
|
|
7
10
|
/**
|
|
@@ -12,10 +15,16 @@ export type RoundedIconButtonProps = {
|
|
|
12
15
|
disabled?: boolean;
|
|
13
16
|
dataTestId?: string;
|
|
14
17
|
ariaLabel?: string;
|
|
18
|
+
/** Renders the button as a link (forwarded to the underlying `IconButton`/`ButtonBase`). */
|
|
19
|
+
href?: string;
|
|
20
|
+
/** MUI's own size scale, affects icon padding — the 30×30 root size is unaffected. */
|
|
21
|
+
size?: IconButtonProps["size"];
|
|
22
|
+
sx?: SxProps<Theme>;
|
|
23
|
+
ref?: Ref<HTMLButtonElement>;
|
|
15
24
|
};
|
|
16
25
|
/**
|
|
17
26
|
* Small square (30×30) icon button with rounded corners on an elevated
|
|
18
27
|
* background, styled to NovaDeck's canonical look.
|
|
19
28
|
*/
|
|
20
|
-
export declare function RoundedIconButton({ icon, onClick, bgColor, isActive, disabled, dataTestId, ariaLabel, }: RoundedIconButtonProps): import("react").JSX.Element;
|
|
29
|
+
export declare function RoundedIconButton({ icon, onClick, bgColor, isActive, disabled, dataTestId, ariaLabel, href, size, sx, ref, }: RoundedIconButtonProps): import("react").JSX.Element;
|
|
21
30
|
//# sourceMappingURL=RoundedIconButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoundedIconButton.d.ts","sourceRoot":"","sources":["../../../src/components/RoundedIconButton/RoundedIconButton.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"RoundedIconButton.d.ts","sourceRoot":"","sources":["../../../src/components/RoundedIconButton/RoundedIconButton.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAE9D,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,SAAS,CAAA;IACf,8EAA8E;IAC9E,OAAO,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,CAAA;IAClE,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,4FAA4F;IAC5F,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,sFAAsF;IACtF,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAA;IAC9B,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAA;IACnB,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAA;CAC7B,CAAA;AAYD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,OAAO,EACP,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,EAAE,EACF,GAAG,GACJ,EAAE,sBAAsB,+BA4BxB"}
|
|
@@ -1,35 +1,45 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import
|
|
4
|
-
function
|
|
5
|
-
icon:
|
|
6
|
-
onClick:
|
|
7
|
-
bgColor:
|
|
8
|
-
isActive:
|
|
9
|
-
disabled:
|
|
10
|
-
dataTestId:
|
|
11
|
-
ariaLabel:
|
|
2
|
+
import { jsx as x } from "react/jsx-runtime";
|
|
3
|
+
import g from "@mui/material/IconButton";
|
|
4
|
+
function f({
|
|
5
|
+
icon: i,
|
|
6
|
+
onClick: p,
|
|
7
|
+
bgColor: o,
|
|
8
|
+
isActive: t,
|
|
9
|
+
disabled: u,
|
|
10
|
+
dataTestId: l,
|
|
11
|
+
ariaLabel: c,
|
|
12
|
+
href: n,
|
|
13
|
+
size: b,
|
|
14
|
+
sx: r,
|
|
15
|
+
ref: s
|
|
12
16
|
}) {
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
|
|
17
|
+
return /* @__PURE__ */ x(
|
|
18
|
+
g,
|
|
15
19
|
{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
ref: s,
|
|
21
|
+
...n ? { href: n } : {},
|
|
22
|
+
size: b,
|
|
23
|
+
onClick: p,
|
|
24
|
+
disabled: u,
|
|
25
|
+
sx: [
|
|
26
|
+
(a) => {
|
|
27
|
+
var d, e;
|
|
28
|
+
return {
|
|
29
|
+
backgroundColor: t !== void 0 ? t ? o ?? ((d = a.palette.backgroundPaperElevation) == null ? void 0 : d[11]) : "transparent" : o ?? ((e = a.palette.backgroundPaperElevation) == null ? void 0 : e[11]),
|
|
30
|
+
borderRadius: `${a.shape.borderRadius}px`,
|
|
31
|
+
width: "30px",
|
|
32
|
+
height: "30px"
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
...Array.isArray(r) ? r : [r]
|
|
36
|
+
],
|
|
37
|
+
"data-testid": l,
|
|
38
|
+
"aria-label": c,
|
|
39
|
+
children: i
|
|
30
40
|
}
|
|
31
41
|
);
|
|
32
42
|
}
|
|
33
43
|
export {
|
|
34
|
-
|
|
44
|
+
f as RoundedIconButton
|
|
35
45
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wandelbots/mui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Wandelbots Nova MUI layer: dark-mode MUI-7 theme (createNovaMuiTheme) + presentational React components and input validators.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"react-dom": "^19"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@wandelbots/design-tokens": "2.
|
|
62
|
+
"@wandelbots/design-tokens": "2.1.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@emotion/react": "^11.14.0",
|