@m4l/base 1.5.0 → 1.5.1-beta-chore-764-remove-s3-assets.1
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/components/Icon/Icon.d.ts +4 -1
- package/components/Icon/Icon.d.ts.map +1 -1
- package/components/Icon/Icon.js +50 -48
- package/components/Icon/Icon.styles.d.ts.map +1 -1
- package/components/Icon/Icon.styles.js +27 -26
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +20 -17
- package/package.json +3 -2
- package/utils/getIconPaintStyles/getIconPaintStyles.d.ts +43 -0
- package/utils/getIconPaintStyles/getIconPaintStyles.d.ts.map +1 -0
- package/utils/getIconPaintStyles/getIconPaintStyles.js +19 -0
- package/utils/getIconPaintStyles/index.d.ts +2 -0
- package/utils/getIconPaintStyles/index.d.ts.map +1 -0
|
@@ -2,6 +2,9 @@ import { IconProps } from './types';
|
|
|
2
2
|
/**
|
|
3
3
|
* Render the base Icon primitive with URL-mask and SVG-component support.
|
|
4
4
|
*/
|
|
5
|
-
declare const Icon:
|
|
5
|
+
declare const Icon: {
|
|
6
|
+
(props: IconProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
isM4LIconComponent: boolean;
|
|
8
|
+
};
|
|
6
9
|
export { Icon };
|
|
7
10
|
//# sourceMappingURL=Icon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../../../packages/base/src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAkB,SAAS,EAA0C,MAAM,SAAS,CAAC;AAgC5F;;GAEG;AACH,QAAA,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../../../packages/base/src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAkB,SAAS,EAA0C,MAAM,SAAS,CAAC;AAgC5F;;GAEG;AACH,QAAA,MAAM,IAAI;YAAW,SAAS;;CAqH7B,CAAC;AAIF,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
package/components/Icon/Icon.js
CHANGED
|
@@ -1,101 +1,103 @@
|
|
|
1
1
|
import { jsxs as P, Fragment as j, jsx as n } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { isValidElement as
|
|
4
|
-
import { useModuleSkeleton as
|
|
5
|
-
import { getPropDataTestId as
|
|
6
|
-
import { ICON_CLASSES as o, normalizeIconSize as
|
|
7
|
-
import { TooltipStyled as
|
|
2
|
+
import u from "clsx";
|
|
3
|
+
import { isValidElement as S, cloneElement as A } from "react";
|
|
4
|
+
import { useModuleSkeleton as L } from "@m4l/core";
|
|
5
|
+
import { getPropDataTestId as s } from "../../utils/getNameDataTestId.js";
|
|
6
|
+
import { ICON_CLASSES as o, normalizeIconSize as M, ICON_PREFIX as a } from "./constants.js";
|
|
7
|
+
import { TooltipStyled as F, RootStyled as k, IconSkeletonStyled as O, IconStyled as _ } from "./slots/IconSlots.js";
|
|
8
8
|
function B(t) {
|
|
9
9
|
return "src" in t && typeof t.src == "string" || "icon" in t && typeof t.icon == "string";
|
|
10
10
|
}
|
|
11
11
|
function V(t) {
|
|
12
|
-
return "src" in t && t.src !== void 0 &&
|
|
12
|
+
return "src" in t && t.src !== void 0 && S(t.src) || "icon" in t && t.icon !== void 0 && S(t.icon);
|
|
13
13
|
}
|
|
14
14
|
function X(t) {
|
|
15
15
|
if (B(t) || V(t))
|
|
16
16
|
return "src" in t ? t.src : t.icon;
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const $ = (t) => {
|
|
19
19
|
const {
|
|
20
|
-
size:
|
|
21
|
-
rotationAngle:
|
|
22
|
-
tooltipContent:
|
|
23
|
-
color:
|
|
24
|
-
className:
|
|
20
|
+
size: C = "medium",
|
|
21
|
+
rotationAngle: l,
|
|
22
|
+
tooltipContent: f,
|
|
23
|
+
color: x = "text.primary",
|
|
24
|
+
className: I,
|
|
25
25
|
placement: N = "bottom",
|
|
26
26
|
instaceDataTestId: w,
|
|
27
27
|
instanceDataTestId: R,
|
|
28
|
-
disabled:
|
|
28
|
+
disabled: d,
|
|
29
29
|
selected: T,
|
|
30
30
|
enabledSelected: D,
|
|
31
|
-
onClick:
|
|
32
|
-
ariaLabel:
|
|
33
|
-
} = t, y =
|
|
31
|
+
onClick: g,
|
|
32
|
+
ariaLabel: i
|
|
33
|
+
} = t, y = L(), c = R ?? w, e = X(t), m = M(C), E = e !== void 0 ? typeof e == "string" : void 0, h = i ? {
|
|
34
34
|
role: "img",
|
|
35
|
-
"aria-label":
|
|
35
|
+
"aria-label": i
|
|
36
36
|
} : {
|
|
37
37
|
"aria-hidden": !0
|
|
38
|
-
},
|
|
39
|
-
size:
|
|
40
|
-
color:
|
|
38
|
+
}, r = {
|
|
39
|
+
size: m,
|
|
40
|
+
color: x,
|
|
41
41
|
src: e,
|
|
42
|
-
disabled:
|
|
43
|
-
rotationAngle:
|
|
42
|
+
disabled: d,
|
|
43
|
+
rotationAngle: l,
|
|
44
44
|
selected: T,
|
|
45
45
|
enabledSelected: D,
|
|
46
46
|
isSkeleton: y,
|
|
47
47
|
isMaskStrategy: E
|
|
48
|
-
}, v = typeof
|
|
49
|
-
className:
|
|
50
|
-
ownerState: { ...
|
|
51
|
-
onClick: v ?
|
|
48
|
+
}, v = typeof g == "function" && !d, z = {
|
|
49
|
+
className: u(I, o.root),
|
|
50
|
+
ownerState: { ...r },
|
|
51
|
+
onClick: v ? g : void 0,
|
|
52
52
|
tabIndex: v ? 0 : -1,
|
|
53
|
-
"aria-disabled":
|
|
54
|
-
...
|
|
53
|
+
"aria-disabled": d,
|
|
54
|
+
...s(a, "root", c)
|
|
55
55
|
}, b = () => e && typeof e == "string" ? /* @__PURE__ */ n(
|
|
56
56
|
_,
|
|
57
57
|
{
|
|
58
|
-
className:
|
|
59
|
-
ownerState: { ...
|
|
60
|
-
...
|
|
58
|
+
className: u(o.icon, o.root),
|
|
59
|
+
ownerState: { ...r },
|
|
60
|
+
...s(a, "icon", c),
|
|
61
61
|
...h
|
|
62
62
|
}
|
|
63
|
-
) : e &&
|
|
63
|
+
) : e && S(e) ? A(e, {
|
|
64
64
|
sx: {
|
|
65
|
-
fontSize:
|
|
66
|
-
...
|
|
67
|
-
transform: `rotate(${
|
|
65
|
+
fontSize: m === "small" ? "small" : "medium",
|
|
66
|
+
...l && {
|
|
67
|
+
transform: `rotate(${l}deg)`
|
|
68
68
|
},
|
|
69
69
|
width: "100%",
|
|
70
70
|
height: "100%"
|
|
71
71
|
},
|
|
72
|
-
...h
|
|
72
|
+
...h,
|
|
73
|
+
...i ? { titleAccess: i } : {}
|
|
73
74
|
}) : null;
|
|
74
75
|
return /* @__PURE__ */ P(j, { children: [
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
f ? /* @__PURE__ */ n(
|
|
77
|
+
F,
|
|
77
78
|
{
|
|
78
|
-
className:
|
|
79
|
-
title:
|
|
80
|
-
ownerState: { ...
|
|
79
|
+
className: I || o.tooltip,
|
|
80
|
+
title: f,
|
|
81
|
+
ownerState: { ...r },
|
|
81
82
|
placement: N,
|
|
82
|
-
size:
|
|
83
|
-
...
|
|
83
|
+
size: m,
|
|
84
|
+
...s(a, "tooltip", c),
|
|
84
85
|
children: /* @__PURE__ */ n(k, { ...z, children: b() })
|
|
85
86
|
}
|
|
86
87
|
) : /* @__PURE__ */ n(k, { ...z, children: b() }),
|
|
87
88
|
y && /* @__PURE__ */ n(
|
|
88
89
|
O,
|
|
89
90
|
{
|
|
90
|
-
className:
|
|
91
|
+
className: u(o.iconSkeleton, o.root),
|
|
91
92
|
variant: "rectangular",
|
|
92
|
-
ownerState: { ...
|
|
93
|
+
ownerState: { ...r },
|
|
93
94
|
"aria-hidden": "true",
|
|
94
|
-
...
|
|
95
|
+
...s(a, "iconSkeleton", c)
|
|
95
96
|
}
|
|
96
97
|
)
|
|
97
98
|
] });
|
|
98
99
|
};
|
|
100
|
+
$.isM4LIconComponent = !0;
|
|
99
101
|
export {
|
|
100
|
-
|
|
102
|
+
$ as Icon
|
|
101
103
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/base/src/components/Icon/Icon.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Icon.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/base/src/components/Icon/Icon.styles.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAkB,UAAU,EAAE,MAAM,SAAS,CAAC;AAkD1D,eAAO,MAAM,UAAU,EAAE,UAgExB,CAAC"}
|
|
@@ -1,41 +1,42 @@
|
|
|
1
1
|
import { getSizeStyles as o } from "../../utils/getSizeStyles/getSizeStyles.js";
|
|
2
2
|
import { ICON_CLASSES as l } from "./constants.js";
|
|
3
|
-
|
|
3
|
+
import { ICON_SVG_SHAPE_SELECTOR as d } from "../../utils/getIconPaintStyles/getIconPaintStyles.js";
|
|
4
|
+
const c = {
|
|
4
5
|
small: 16,
|
|
5
6
|
medium: 24
|
|
6
7
|
};
|
|
7
|
-
function
|
|
8
|
-
const
|
|
9
|
-
return e.split(".").reduce((s,
|
|
10
|
-
if (s && typeof s == "object" &&
|
|
11
|
-
return s[
|
|
12
|
-
},
|
|
8
|
+
function p(t, e) {
|
|
9
|
+
const i = t.vars?.palette ?? t.palette;
|
|
10
|
+
return e.split(".").reduce((s, n) => {
|
|
11
|
+
if (s && typeof s == "object" && n in s)
|
|
12
|
+
return s[n];
|
|
13
|
+
}, i) ?? (e.includes(".") ? i.text.primary : e);
|
|
13
14
|
}
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
return o(
|
|
17
|
-
width:
|
|
18
|
-
height:
|
|
15
|
+
function a(t, e = "medium") {
|
|
16
|
+
if (t.vars?.size && t.generalSettings)
|
|
17
|
+
return o(t, e, "base", (r) => ({
|
|
18
|
+
width: r,
|
|
19
|
+
height: r
|
|
19
20
|
}));
|
|
20
|
-
const
|
|
21
|
+
const i = c[e];
|
|
21
22
|
return {
|
|
22
|
-
width:
|
|
23
|
-
height:
|
|
23
|
+
width: i,
|
|
24
|
+
height: i
|
|
24
25
|
};
|
|
25
26
|
}
|
|
26
|
-
const
|
|
27
|
+
const m = {
|
|
27
28
|
/**
|
|
28
29
|
* Root styles for the Icon component, handling both mask and non-mask strategies, as well as disabled and selected states.
|
|
29
30
|
*/
|
|
30
|
-
root: ({ theme:
|
|
31
|
-
const
|
|
31
|
+
root: ({ theme: t, ownerState: e }) => {
|
|
32
|
+
const i = e?.disabled ? (t.vars?.palette ?? t.palette).text.disabled : e?.selected && e?.enabledSelected ? (t.vars?.palette ?? t.palette).primary.enabled : p(t, String(e?.color));
|
|
32
33
|
return {
|
|
33
34
|
display: e?.isSkeleton ? "none" : "flex",
|
|
34
35
|
justifyContent: "center",
|
|
35
36
|
alignItems: "center",
|
|
36
37
|
width: "fit-content",
|
|
37
38
|
transition: "transform 0.5s ease-in-out",
|
|
38
|
-
...
|
|
39
|
+
...a(t, e?.size ?? "medium"),
|
|
39
40
|
...e?.isMaskStrategy === !1 && {
|
|
40
41
|
"& .MuiSvgIcon-root": {
|
|
41
42
|
width: "inherit",
|
|
@@ -43,8 +44,8 @@ const u = {
|
|
|
43
44
|
display: "flex",
|
|
44
45
|
alignItems: "center",
|
|
45
46
|
justifyContent: "center",
|
|
46
|
-
|
|
47
|
-
fill:
|
|
47
|
+
[d]: {
|
|
48
|
+
fill: i
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
},
|
|
@@ -60,7 +61,7 @@ const u = {
|
|
|
60
61
|
...e?.rotationAngle && {
|
|
61
62
|
transform: `rotate(${e.rotationAngle}deg)`
|
|
62
63
|
},
|
|
63
|
-
backgroundColor:
|
|
64
|
+
backgroundColor: i
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
67
|
};
|
|
@@ -75,14 +76,14 @@ const u = {
|
|
|
75
76
|
/**
|
|
76
77
|
* Skeleton styles for the icon element when in loading state.
|
|
77
78
|
*/
|
|
78
|
-
iconSkeleton: ({ theme:
|
|
79
|
+
iconSkeleton: ({ theme: t, ownerState: e }) => ({
|
|
79
80
|
"&": {
|
|
80
|
-
borderRadius:
|
|
81
|
-
...
|
|
81
|
+
borderRadius: t.size?.borderRadius?.r1 ?? t.shape.borderRadius,
|
|
82
|
+
...a(t, e?.size ?? "medium")
|
|
82
83
|
}
|
|
83
84
|
}),
|
|
84
85
|
tooltip: {}
|
|
85
86
|
};
|
|
86
87
|
export {
|
|
87
|
-
|
|
88
|
+
m as iconStyles
|
|
88
89
|
};
|
package/index.d.ts
CHANGED
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/base/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/base/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AAGjC,cAAc,4BAA4B,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,32 +1,35 @@
|
|
|
1
1
|
import { Icon as O } from "./components/Icon/Icon.js";
|
|
2
|
-
import { ICON_CLASSES as
|
|
2
|
+
import { ICON_CLASSES as S, ICON_KEY_COMPONENT as e, ICON_PREFIX as T } from "./components/Icon/constants.js";
|
|
3
3
|
import { ButtonBase as E } from "./extended/mui/ButtonBase/ButtonBase.js";
|
|
4
4
|
import { buttonBaseStyles as p } from "./extended/mui/ButtonBase/ButtonBase.styles.js";
|
|
5
|
-
import { BUTTON_BASE_KEY_COMPONENT as
|
|
5
|
+
import { BUTTON_BASE_KEY_COMPONENT as C } from "./extended/mui/ButtonBase/constants.js";
|
|
6
6
|
import { ButtonBaseSlots as f } from "./extended/mui/ButtonBase/slots/ButtonBaseEnum.js";
|
|
7
7
|
import { RootStyled as x, SkeletonStyled as A } from "./extended/mui/ButtonBase/slots/ButtonBaseSlots.js";
|
|
8
8
|
import { Tooltip as L } from "./extended/mui/Tooltip/Tooltip.js";
|
|
9
|
-
import { DEFAULT_TOOLTIP_OFFSET as
|
|
10
|
-
import { Typography as
|
|
11
|
-
import { TYPOGRAPHY_CLASSES as
|
|
9
|
+
import { DEFAULT_TOOLTIP_OFFSET as n, TOOLTIP_CLASSES as B, TOOLTIP_KEY_COMPONENT as R } from "./extended/mui/Tooltip/constants.js";
|
|
10
|
+
import { Typography as y } from "./extended/mui/Typography/Typography.js";
|
|
11
|
+
import { TYPOGRAPHY_CLASSES as a, TYPOGRAPHY_CLASS_NAME_SPECIFY as G, TYPOGRAPHY_FONTS as H, TYPOGRAPHY_KEY_COMPONENT as M } from "./extended/mui/Typography/constants.js";
|
|
12
|
+
import { ICON_SVG_SHAPE_SELECTOR as u, getIconPaintStyles as c } from "./utils/getIconPaintStyles/getIconPaintStyles.js";
|
|
12
13
|
export {
|
|
13
|
-
|
|
14
|
+
C as BUTTON_BASE_KEY_COMPONENT,
|
|
14
15
|
E as ButtonBase,
|
|
15
16
|
f as ButtonBaseSlots,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
n as DEFAULT_TOOLTIP_OFFSET,
|
|
18
|
+
S as ICON_CLASSES,
|
|
19
|
+
e as ICON_KEY_COMPONENT,
|
|
20
|
+
T as ICON_PREFIX,
|
|
21
|
+
u as ICON_SVG_SHAPE_SELECTOR,
|
|
20
22
|
O as Icon,
|
|
21
23
|
x as RootStyled,
|
|
22
24
|
A as SkeletonStyled,
|
|
23
|
-
|
|
25
|
+
B as TOOLTIP_CLASSES,
|
|
24
26
|
R as TOOLTIP_KEY_COMPONENT,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
a as TYPOGRAPHY_CLASSES,
|
|
28
|
+
G as TYPOGRAPHY_CLASS_NAME_SPECIFY,
|
|
29
|
+
H as TYPOGRAPHY_FONTS,
|
|
30
|
+
M as TYPOGRAPHY_KEY_COMPONENT,
|
|
29
31
|
L as Tooltip,
|
|
30
|
-
|
|
31
|
-
p as buttonBaseStyles
|
|
32
|
+
y as Typography,
|
|
33
|
+
p as buttonBaseStyles,
|
|
34
|
+
c as getIconPaintStyles
|
|
32
35
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/base",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1-beta-chore-764-remove-s3-assets.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -30,10 +30,11 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@m4l/core": "^2.0.33",
|
|
33
|
+
"@m4l/icons": "^1.0.0",
|
|
33
34
|
"@m4l/styles": "^7.1.48",
|
|
34
35
|
"@emotion/react": "11.14.0",
|
|
35
36
|
"clsx": "2.1.1",
|
|
36
|
-
"react": "19.
|
|
37
|
+
"react": "19.1.0",
|
|
37
38
|
"@mui/material": "5.16.7"
|
|
38
39
|
}
|
|
39
40
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shape elements MUI's `createSvgIcon` renders inside `.MuiSvgIcon-root`.
|
|
3
|
+
*
|
|
4
|
+
* `Icon` switches DOM strategy based on its source: a URL string renders the
|
|
5
|
+
* `.M4LIcon-icon` mask element painted with `background-color`, while a React
|
|
6
|
+
* element (the `@m4l/icons` case) renders an `.MuiSvgIcon-root` painted with
|
|
7
|
+
* `fill` on these shapes. A recoloring rule that targets only the mask class
|
|
8
|
+
* silently misses every SVG icon, so both branches must always be declared.
|
|
9
|
+
*/
|
|
10
|
+
export declare const ICON_SVG_SHAPE_SELECTOR = "& svg, & path, & rect, & circle, & ellipse, & polygon, & polyline, & line, & g, & text, & tspan, & use";
|
|
11
|
+
export interface IconPaintOptions {
|
|
12
|
+
/**
|
|
13
|
+
* Selector inserted between the rule root and the icon nodes, for call sites
|
|
14
|
+
* that must reach a nested icon without repainting sibling content.
|
|
15
|
+
* Example: `'.M4LIcon-root'` yields `'& .M4LIcon-root .M4LIcon-icon'`.
|
|
16
|
+
*/
|
|
17
|
+
scope?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the paint declarations carry `!important`. Defaults to `true`
|
|
20
|
+
* because `Icon` and `IconButton` both paint icons from rules with very high
|
|
21
|
+
* specificity, so a plain declaration usually loses.
|
|
22
|
+
*/
|
|
23
|
+
important?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Paint an M4L icon across both `Icon` rendering strategies, mask and SVG.
|
|
27
|
+
*
|
|
28
|
+
* `stroke: 'none'` is always emitted: some system icons ship stroke geometry
|
|
29
|
+
* that renders as an outline artifact once the fill is recolored.
|
|
30
|
+
*/
|
|
31
|
+
export declare function getIconPaintStyles(color: string, options?: IconPaintOptions): {
|
|
32
|
+
[x: string]: {
|
|
33
|
+
backgroundColor: string;
|
|
34
|
+
"& svg, & path, & rect, & circle, & ellipse, & polygon, & polyline, & line, & g, & text, & tspan, & use"?: undefined;
|
|
35
|
+
} | {
|
|
36
|
+
"& svg, & path, & rect, & circle, & ellipse, & polygon, & polyline, & line, & g, & text, & tspan, & use": {
|
|
37
|
+
fill: string;
|
|
38
|
+
stroke: string;
|
|
39
|
+
};
|
|
40
|
+
backgroundColor?: undefined;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=getIconPaintStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getIconPaintStyles.d.ts","sourceRoot":"","sources":["../../../../../../packages/base/src/utils/getIconPaintStyles/getIconPaintStyles.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,2GACsE,CAAC;AAE3G,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB;;;;;;;;;;;EAgB3E"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const r = "& svg, & path, & rect, & circle, & ellipse, & polygon, & polyline, & line, & g, & text, & tspan, & use";
|
|
2
|
+
function l(t, c) {
|
|
3
|
+
const { scope: n, important: i = !0 } = c ?? {}, o = n ? `& ${n} ` : "& ", e = i ? `${t} !important` : t;
|
|
4
|
+
return {
|
|
5
|
+
[`${o}.M4LIcon-icon`]: {
|
|
6
|
+
backgroundColor: e
|
|
7
|
+
},
|
|
8
|
+
[`${o}.MuiSvgIcon-root`]: {
|
|
9
|
+
[r]: {
|
|
10
|
+
fill: e,
|
|
11
|
+
stroke: "none"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
r as ICON_SVG_SHAPE_SELECTOR,
|
|
18
|
+
l as getIconPaintStyles
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/base/src/utils/getIconPaintStyles/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|