@notificationapi/react 0.0.37 → 1.0.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/dist/assets/Badge.js +456 -0
- package/dist/assets/Box.js +57 -0
- package/dist/assets/ButtonBase.js +1224 -0
- package/dist/assets/DefaultPropsProvider.js +4368 -0
- package/dist/assets/Divider.js +343 -0
- package/dist/assets/IconButton.js +225 -0
- package/dist/assets/Inbox.js +3051 -0
- package/dist/assets/InboxHeader.js +2338 -0
- package/dist/assets/Notification.js +5349 -7150
- package/dist/assets/NotificationPreferencesPopup.js +1694 -0
- package/dist/assets/Paper.js +154 -0
- package/dist/assets/Popover.js +451 -0
- package/dist/assets/Portal.js +110 -0
- package/dist/assets/PreferenceInput.js +1545 -1366
- package/dist/assets/Typography.js +292 -0
- package/dist/assets/WebPushOptInMessage.js +794 -407
- package/dist/assets/channelUtils.js +33 -65
- package/dist/assets/createSimplePaletteValueFilter.js +17 -0
- package/dist/assets/createSvgIcon.js +248 -0
- package/dist/assets/integerPropType.js +31 -0
- package/dist/assets/resolveComponentProps.js +93 -0
- package/dist/assets/style.css +1 -0
- package/dist/assets/useSlotProps.js +24 -0
- package/dist/assets/useTheme.js +10 -0
- package/dist/assets/useTheme2.js +16 -0
- package/dist/assets/utils.js +743 -0
- package/dist/components/Notifications/DefaultEmpty.d.ts +3 -0
- package/dist/components/Notifications/DefaultEmpty.js +7 -0
- package/dist/components/Notifications/Inbox.d.ts +4 -4
- package/dist/components/Notifications/Inbox.js +9 -6450
- package/dist/components/Notifications/InboxHeader.d.ts +1 -1
- package/dist/components/Notifications/InboxHeader.js +7 -53
- package/dist/components/Notifications/Notification.d.ts +3 -4
- package/dist/components/Notifications/Notification.js +6 -5
- package/dist/components/Notifications/NotificationCounter.js +16 -6
- package/dist/components/Notifications/NotificationFeed.d.ts +1 -2
- package/dist/components/Notifications/NotificationFeed.js +41 -38
- package/dist/components/Notifications/NotificationLauncher.d.ts +1 -0
- package/dist/components/Notifications/NotificationLauncher.js +100 -114
- package/dist/components/Notifications/NotificationPopup.d.ts +3 -4
- package/dist/components/Notifications/NotificationPopup.js +86 -88
- package/dist/components/Notifications/UnreadBadge.d.ts +7 -4
- package/dist/components/Notifications/UnreadBadge.js +28 -20
- package/dist/components/Notifications/interface.d.ts +0 -4
- package/dist/components/Notifications/interface.js +4 -5
- package/dist/components/Preferences/NotificationPreferencesInline.js +14 -14
- package/dist/components/Preferences/NotificationPreferencesPopup.js +7 -2068
- package/dist/components/Preferences/PreferenceInput.js +4 -3
- package/dist/components/Preferences/Preferences.js +1042 -547
- package/dist/components/Preferences/channelUtils.js +3 -4
- package/dist/components/Preferences/index.js +1 -1
- package/dist/components/Provider/context.d.ts +27 -0
- package/dist/components/Provider/context.js +7 -0
- package/dist/components/Provider/index.d.ts +2 -25
- package/dist/components/Provider/index.js +22 -24
- package/dist/components/WebPush/WebPushOptInMessage.js +3 -4
- package/dist/main.d.ts +1 -0
- package/dist/main.js +4 -4
- package/package.json +14 -12
- package/dist/assets/AntdIcon.js +0 -200
- package/dist/assets/CloseOutlined.js +0 -13
- package/dist/assets/PurePanel.js +0 -59
- package/dist/assets/RightOutlined.js +0 -13
- package/dist/assets/button.js +0 -1660
- package/dist/assets/colors.js +0 -36
- package/dist/assets/compact-item.js +0 -860
- package/dist/assets/index.js +0 -271
- package/dist/assets/index2.js +0 -647
- package/dist/assets/index3.js +0 -7527
- package/dist/assets/pickAttrs.js +0 -42
- package/dist/assets/presets.js +0 -810
- package/dist/assets/reactNode.js +0 -20821
|
@@ -1,77 +1,45 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}));
|
|
18
|
-
}, d = /* @__PURE__ */ a.forwardRef(O);
|
|
19
|
-
process.env.NODE_ENV !== "production" && (d.displayName = "ChromeOutlined");
|
|
20
|
-
var g = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z" } }] }, name: "mail", theme: "outlined" }, z = function(e, t) {
|
|
21
|
-
return /* @__PURE__ */ a.createElement(i, o({}, e, {
|
|
22
|
-
ref: t,
|
|
23
|
-
icon: g
|
|
24
|
-
}));
|
|
25
|
-
}, s = /* @__PURE__ */ a.forwardRef(z);
|
|
26
|
-
process.env.NODE_ENV !== "production" && (s.displayName = "MailOutlined");
|
|
27
|
-
var E = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z" } }] }, name: "message", theme: "outlined" }, y = function(e, t) {
|
|
28
|
-
return /* @__PURE__ */ a.createElement(i, o({}, e, {
|
|
29
|
-
ref: t,
|
|
30
|
-
icon: E
|
|
31
|
-
}));
|
|
32
|
-
}, m = /* @__PURE__ */ a.forwardRef(y);
|
|
33
|
-
process.env.NODE_ENV !== "production" && (m.displayName = "MessageOutlined");
|
|
34
|
-
var N = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M744 62H280c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h464c35.3 0 64-28.7 64-64V126c0-35.3-28.7-64-64-64zm-8 824H288V134h448v752zM472 784a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, name: "mobile", theme: "outlined" }, b = function(e, t) {
|
|
35
|
-
return /* @__PURE__ */ a.createElement(i, o({}, e, {
|
|
36
|
-
ref: t,
|
|
37
|
-
icon: N
|
|
38
|
-
}));
|
|
39
|
-
}, f = /* @__PURE__ */ a.forwardRef(b);
|
|
40
|
-
process.env.NODE_ENV !== "production" && (f.displayName = "MobileOutlined");
|
|
41
|
-
var C = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M877.1 238.7L770.6 132.3c-13-13-30.4-20.3-48.8-20.3s-35.8 7.2-48.8 20.3L558.3 246.8c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l89.6 89.7a405.46 405.46 0 01-86.4 127.3c-36.7 36.9-79.6 66-127.2 86.6l-89.6-89.7c-13-13-30.4-20.3-48.8-20.3a68.2 68.2 0 00-48.8 20.3L132.3 673c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l106.4 106.4c22.2 22.2 52.8 34.9 84.2 34.9 6.5 0 12.8-.5 19.2-1.6 132.4-21.8 263.8-92.3 369.9-198.3C818 606 888.4 474.6 910.4 342.1c6.3-37.6-6.3-76.3-33.3-103.4zm-37.6 91.5c-19.5 117.9-82.9 235.5-178.4 331s-213 158.9-330.9 178.4c-14.8 2.5-30-2.5-40.8-13.2L184.9 721.9 295.7 611l119.8 120 .9.9 21.6-8a481.29 481.29 0 00285.7-285.8l8-21.6-120.8-120.7 110.8-110.9 104.5 104.5c10.8 10.8 15.8 26 13.3 40.8z" } }] }, name: "phone", theme: "outlined" }, B = function(e, t) {
|
|
42
|
-
return /* @__PURE__ */ a.createElement(i, o({}, e, {
|
|
43
|
-
ref: t,
|
|
44
|
-
icon: C
|
|
45
|
-
}));
|
|
46
|
-
}, v = /* @__PURE__ */ a.forwardRef(B);
|
|
47
|
-
process.env.NODE_ENV !== "production" && (v.displayName = "PhoneOutlined");
|
|
48
|
-
const R = (r) => ({
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { Channels as c } from "../components/Notifications/interface.js";
|
|
3
|
+
import { c as t } from "./createSvgIcon.js";
|
|
4
|
+
const o = t(/* @__PURE__ */ a("path", {
|
|
5
|
+
d: "M20.01 15.38c-1.23 0-2.42-.2-3.53-.56-.35-.12-.74-.03-1.01.24l-1.57 1.97c-2.83-1.35-5.48-3.9-6.89-6.83l1.95-1.66c.27-.28.35-.67.24-1.02-.37-1.11-.56-2.3-.56-3.53 0-.54-.45-.99-.99-.99H4.19C3.65 3 3 3.24 3 3.99 3 13.28 10.73 21 20.01 21c.71 0 .99-.63.99-1.18v-3.45c0-.54-.45-.99-.99-.99"
|
|
6
|
+
}), "Call"), l = t(/* @__PURE__ */ a("path", {
|
|
7
|
+
d: "M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2zm-2 0-8 5-8-5zm0 12H4V8l8 5 8-5z"
|
|
8
|
+
}), "EmailOutlined"), e = t(/* @__PURE__ */ a("path", {
|
|
9
|
+
d: "M22 6.98V16c0 1.1-.9 2-2 2H6l-4 4V4c0-1.1.9-2 2-2h10.1c-.06.32-.1.66-.1 1 0 2.76 2.24 5 5 5 1.13 0 2.16-.39 3-1.02M16 3c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3"
|
|
10
|
+
}), "MarkChatUnread"), n = t(/* @__PURE__ */ a("path", {
|
|
11
|
+
d: "M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"
|
|
12
|
+
}), "NotificationsOutlined"), s = t(/* @__PURE__ */ a("path", {
|
|
13
|
+
d: "M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1m-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m4.5-4H7V4h9z"
|
|
14
|
+
}), "PhoneIphone"), m = t(/* @__PURE__ */ a("path", {
|
|
15
|
+
d: "M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M9 11H7V9h2zm4 0h-2V9h2zm4 0h-2V9h2z"
|
|
16
|
+
}), "Sms"), z = (r) => ({
|
|
49
17
|
EMAIL: "Email",
|
|
50
18
|
INAPP_WEB: "In-App",
|
|
51
19
|
SMS: "Text",
|
|
52
20
|
CALL: "Automated Calling",
|
|
53
21
|
PUSH: "Mobile",
|
|
54
22
|
WEB_PUSH: "Browser"
|
|
55
|
-
})[r],
|
|
23
|
+
})[r], C = (r) => {
|
|
56
24
|
switch (r) {
|
|
57
|
-
case
|
|
58
|
-
return /* @__PURE__ */ l
|
|
59
|
-
case
|
|
60
|
-
return /* @__PURE__ */
|
|
61
|
-
case
|
|
62
|
-
return /* @__PURE__ */
|
|
63
|
-
case
|
|
64
|
-
return /* @__PURE__ */
|
|
65
|
-
case
|
|
66
|
-
return /* @__PURE__ */
|
|
67
|
-
case
|
|
68
|
-
return /* @__PURE__ */
|
|
25
|
+
case c.EMAIL:
|
|
26
|
+
return /* @__PURE__ */ a(l, { fontSize: "small", color: "primary" });
|
|
27
|
+
case c.SMS:
|
|
28
|
+
return /* @__PURE__ */ a(m, { fontSize: "small", color: "primary" });
|
|
29
|
+
case c.PUSH:
|
|
30
|
+
return /* @__PURE__ */ a(s, { fontSize: "small", color: "primary" });
|
|
31
|
+
case c.CALL:
|
|
32
|
+
return /* @__PURE__ */ a(o, { fontSize: "small", color: "primary" });
|
|
33
|
+
case c.INAPP_WEB:
|
|
34
|
+
return /* @__PURE__ */ a(n, { fontSize: "small", color: "primary" });
|
|
35
|
+
case c.WEB_PUSH:
|
|
36
|
+
return /* @__PURE__ */ a(e, { fontSize: "small", color: "primary" });
|
|
69
37
|
default:
|
|
70
|
-
return /* @__PURE__ */ l
|
|
38
|
+
return /* @__PURE__ */ a(l, { fontSize: "small", color: "primary" });
|
|
71
39
|
}
|
|
72
40
|
};
|
|
73
41
|
export {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
42
|
+
n as N,
|
|
43
|
+
C as a,
|
|
44
|
+
z as g
|
|
77
45
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function n(e) {
|
|
2
|
+
return typeof e.main == "string";
|
|
3
|
+
}
|
|
4
|
+
function a(e, r = []) {
|
|
5
|
+
if (!n(e))
|
|
6
|
+
return !1;
|
|
7
|
+
for (const t of r)
|
|
8
|
+
if (!e.hasOwnProperty(t) || typeof e[t] != "string")
|
|
9
|
+
return !1;
|
|
10
|
+
return !0;
|
|
11
|
+
}
|
|
12
|
+
function i(e = []) {
|
|
13
|
+
return ([, r]) => r && a(r, e);
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
i as c
|
|
17
|
+
};
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import * as h from "react";
|
|
2
|
+
import { jsxs as b, jsx as I } from "react/jsx-runtime";
|
|
3
|
+
import { a as w, g as C, s as T, h as z, m as N, u as O, c as R, P as e, f as j } from "./DefaultPropsProvider.js";
|
|
4
|
+
function E(o) {
|
|
5
|
+
return w("MuiSvgIcon", o);
|
|
6
|
+
}
|
|
7
|
+
C("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
|
|
8
|
+
const $ = (o) => {
|
|
9
|
+
const {
|
|
10
|
+
color: r,
|
|
11
|
+
fontSize: n,
|
|
12
|
+
classes: s
|
|
13
|
+
} = o, t = {
|
|
14
|
+
root: ["root", r !== "inherit" && `color${z(r)}`, `fontSize${z(n)}`]
|
|
15
|
+
};
|
|
16
|
+
return j(t, E, s);
|
|
17
|
+
}, A = T("svg", {
|
|
18
|
+
name: "MuiSvgIcon",
|
|
19
|
+
slot: "Root",
|
|
20
|
+
overridesResolver: (o, r) => {
|
|
21
|
+
const {
|
|
22
|
+
ownerState: n
|
|
23
|
+
} = o;
|
|
24
|
+
return [r.root, n.color !== "inherit" && r[`color${z(n.color)}`], r[`fontSize${z(n.fontSize)}`]];
|
|
25
|
+
}
|
|
26
|
+
})(N(({
|
|
27
|
+
theme: o
|
|
28
|
+
}) => {
|
|
29
|
+
var r, n, s, t, c, S, a, g, p, d, l, m, y, f;
|
|
30
|
+
return {
|
|
31
|
+
userSelect: "none",
|
|
32
|
+
width: "1em",
|
|
33
|
+
height: "1em",
|
|
34
|
+
display: "inline-block",
|
|
35
|
+
flexShrink: 0,
|
|
36
|
+
transition: (t = (r = o.transitions) == null ? void 0 : r.create) == null ? void 0 : t.call(r, "fill", {
|
|
37
|
+
duration: (s = (n = (o.vars ?? o).transitions) == null ? void 0 : n.duration) == null ? void 0 : s.shorter
|
|
38
|
+
}),
|
|
39
|
+
variants: [
|
|
40
|
+
{
|
|
41
|
+
props: (i) => !i.hasSvgAsChild,
|
|
42
|
+
style: {
|
|
43
|
+
// the <svg> will define the property that has `currentColor`
|
|
44
|
+
// for example heroicons uses fill="none" and stroke="currentColor"
|
|
45
|
+
fill: "currentColor"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
props: {
|
|
50
|
+
fontSize: "inherit"
|
|
51
|
+
},
|
|
52
|
+
style: {
|
|
53
|
+
fontSize: "inherit"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
props: {
|
|
58
|
+
fontSize: "small"
|
|
59
|
+
},
|
|
60
|
+
style: {
|
|
61
|
+
fontSize: ((S = (c = o.typography) == null ? void 0 : c.pxToRem) == null ? void 0 : S.call(c, 20)) || "1.25rem"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
props: {
|
|
66
|
+
fontSize: "medium"
|
|
67
|
+
},
|
|
68
|
+
style: {
|
|
69
|
+
fontSize: ((g = (a = o.typography) == null ? void 0 : a.pxToRem) == null ? void 0 : g.call(a, 24)) || "1.5rem"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
props: {
|
|
74
|
+
fontSize: "large"
|
|
75
|
+
},
|
|
76
|
+
style: {
|
|
77
|
+
fontSize: ((d = (p = o.typography) == null ? void 0 : p.pxToRem) == null ? void 0 : d.call(p, 35)) || "2.1875rem"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
// TODO v5 deprecate color prop, v6 remove for sx
|
|
81
|
+
...Object.entries((o.vars ?? o).palette).filter(([, i]) => i && i.main).map(([i]) => {
|
|
82
|
+
var u, v;
|
|
83
|
+
return {
|
|
84
|
+
props: {
|
|
85
|
+
color: i
|
|
86
|
+
},
|
|
87
|
+
style: {
|
|
88
|
+
color: (v = (u = (o.vars ?? o).palette) == null ? void 0 : u[i]) == null ? void 0 : v.main
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
}),
|
|
92
|
+
{
|
|
93
|
+
props: {
|
|
94
|
+
color: "action"
|
|
95
|
+
},
|
|
96
|
+
style: {
|
|
97
|
+
color: (m = (l = (o.vars ?? o).palette) == null ? void 0 : l.action) == null ? void 0 : m.active
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
props: {
|
|
102
|
+
color: "disabled"
|
|
103
|
+
},
|
|
104
|
+
style: {
|
|
105
|
+
color: (f = (y = (o.vars ?? o).palette) == null ? void 0 : y.action) == null ? void 0 : f.disabled
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
props: {
|
|
110
|
+
color: "inherit"
|
|
111
|
+
},
|
|
112
|
+
style: {
|
|
113
|
+
color: void 0
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
};
|
|
118
|
+
})), x = /* @__PURE__ */ h.forwardRef(function(r, n) {
|
|
119
|
+
const s = O({
|
|
120
|
+
props: r,
|
|
121
|
+
name: "MuiSvgIcon"
|
|
122
|
+
}), {
|
|
123
|
+
children: t,
|
|
124
|
+
className: c,
|
|
125
|
+
color: S = "inherit",
|
|
126
|
+
component: a = "svg",
|
|
127
|
+
fontSize: g = "medium",
|
|
128
|
+
htmlColor: p,
|
|
129
|
+
inheritViewBox: d = !1,
|
|
130
|
+
titleAccess: l,
|
|
131
|
+
viewBox: m = "0 0 24 24",
|
|
132
|
+
...y
|
|
133
|
+
} = s, f = /* @__PURE__ */ h.isValidElement(t) && t.type === "svg", i = {
|
|
134
|
+
...s,
|
|
135
|
+
color: S,
|
|
136
|
+
component: a,
|
|
137
|
+
fontSize: g,
|
|
138
|
+
instanceFontSize: r.fontSize,
|
|
139
|
+
inheritViewBox: d,
|
|
140
|
+
viewBox: m,
|
|
141
|
+
hasSvgAsChild: f
|
|
142
|
+
}, u = {};
|
|
143
|
+
d || (u.viewBox = m);
|
|
144
|
+
const v = $(i);
|
|
145
|
+
return /* @__PURE__ */ b(A, {
|
|
146
|
+
as: a,
|
|
147
|
+
className: R(v.root, c),
|
|
148
|
+
focusable: "false",
|
|
149
|
+
color: p,
|
|
150
|
+
"aria-hidden": l ? void 0 : !0,
|
|
151
|
+
role: l ? "img" : void 0,
|
|
152
|
+
ref: n,
|
|
153
|
+
...u,
|
|
154
|
+
...y,
|
|
155
|
+
...f && t.props,
|
|
156
|
+
ownerState: i,
|
|
157
|
+
children: [f ? t.props.children : t, l ? /* @__PURE__ */ I("title", {
|
|
158
|
+
children: l
|
|
159
|
+
}) : null]
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
process.env.NODE_ENV !== "production" && (x.propTypes = {
|
|
163
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
164
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
165
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
166
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
167
|
+
/**
|
|
168
|
+
* Node passed into the SVG element.
|
|
169
|
+
*/
|
|
170
|
+
children: e.node,
|
|
171
|
+
/**
|
|
172
|
+
* Override or extend the styles applied to the component.
|
|
173
|
+
*/
|
|
174
|
+
classes: e.object,
|
|
175
|
+
/**
|
|
176
|
+
* @ignore
|
|
177
|
+
*/
|
|
178
|
+
className: e.string,
|
|
179
|
+
/**
|
|
180
|
+
* The color of the component.
|
|
181
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
182
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
183
|
+
* You can use the `htmlColor` prop to apply a color attribute to the SVG element.
|
|
184
|
+
* @default 'inherit'
|
|
185
|
+
*/
|
|
186
|
+
color: e.oneOfType([e.oneOf(["inherit", "action", "disabled", "primary", "secondary", "error", "info", "success", "warning"]), e.string]),
|
|
187
|
+
/**
|
|
188
|
+
* The component used for the root node.
|
|
189
|
+
* Either a string to use a HTML element or a component.
|
|
190
|
+
*/
|
|
191
|
+
component: e.elementType,
|
|
192
|
+
/**
|
|
193
|
+
* The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.
|
|
194
|
+
* @default 'medium'
|
|
195
|
+
*/
|
|
196
|
+
fontSize: e.oneOfType([e.oneOf(["inherit", "large", "medium", "small"]), e.string]),
|
|
197
|
+
/**
|
|
198
|
+
* Applies a color attribute to the SVG element.
|
|
199
|
+
*/
|
|
200
|
+
htmlColor: e.string,
|
|
201
|
+
/**
|
|
202
|
+
* If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`
|
|
203
|
+
* prop will be ignored.
|
|
204
|
+
* Useful when you want to reference a custom `component` and have `SvgIcon` pass that
|
|
205
|
+
* `component`'s viewBox to the root node.
|
|
206
|
+
* @default false
|
|
207
|
+
*/
|
|
208
|
+
inheritViewBox: e.bool,
|
|
209
|
+
/**
|
|
210
|
+
* The shape-rendering attribute. The behavior of the different options is described on the
|
|
211
|
+
* [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).
|
|
212
|
+
* If you are having issues with blurry icons you should investigate this prop.
|
|
213
|
+
*/
|
|
214
|
+
shapeRendering: e.string,
|
|
215
|
+
/**
|
|
216
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
217
|
+
*/
|
|
218
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
219
|
+
/**
|
|
220
|
+
* Provides a human-readable title for the element that contains it.
|
|
221
|
+
* https://www.w3.org/TR/SVG-access/#Equivalent
|
|
222
|
+
*/
|
|
223
|
+
titleAccess: e.string,
|
|
224
|
+
/**
|
|
225
|
+
* Allows you to redefine what the coordinates without units mean inside an SVG element.
|
|
226
|
+
* For example, if the SVG element is 500 (width) by 200 (height),
|
|
227
|
+
* and you pass viewBox="0 0 50 20",
|
|
228
|
+
* this means that the coordinates inside the SVG will go from the top left corner (0,0)
|
|
229
|
+
* to bottom right (50,20) and each unit will be worth 10px.
|
|
230
|
+
* @default '0 0 24 24'
|
|
231
|
+
*/
|
|
232
|
+
viewBox: e.string
|
|
233
|
+
});
|
|
234
|
+
x.muiName = "SvgIcon";
|
|
235
|
+
function V(o, r) {
|
|
236
|
+
function n(s, t) {
|
|
237
|
+
return /* @__PURE__ */ I(x, {
|
|
238
|
+
"data-testid": `${r}Icon`,
|
|
239
|
+
ref: t,
|
|
240
|
+
...s,
|
|
241
|
+
children: o
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
return process.env.NODE_ENV !== "production" && (n.displayName = `${r}Icon`), n.muiName = x.muiName, /* @__PURE__ */ h.memo(/* @__PURE__ */ h.forwardRef(n));
|
|
245
|
+
}
|
|
246
|
+
export {
|
|
247
|
+
V as c
|
|
248
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function f(e) {
|
|
2
|
+
const r = typeof e;
|
|
3
|
+
switch (r) {
|
|
4
|
+
case "number":
|
|
5
|
+
return Number.isNaN(e) ? "NaN" : Number.isFinite(e) ? e !== Math.floor(e) ? "float" : "number" : "Infinity";
|
|
6
|
+
case "object":
|
|
7
|
+
return e === null ? "null" : e.constructor.name;
|
|
8
|
+
default:
|
|
9
|
+
return r;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function o(e, r, n, i) {
|
|
13
|
+
const t = e[r];
|
|
14
|
+
if (t == null || !Number.isInteger(t)) {
|
|
15
|
+
const l = f(t);
|
|
16
|
+
return new RangeError(`Invalid ${i} \`${r}\` of type \`${l}\` supplied to \`${n}\`, expected \`integer\`.`);
|
|
17
|
+
}
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
function c(e, r, ...n) {
|
|
21
|
+
return e[r] === void 0 ? null : o(e, r, ...n);
|
|
22
|
+
}
|
|
23
|
+
function u() {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
c.isRequired = o;
|
|
27
|
+
u.isRequired = u;
|
|
28
|
+
const s = process.env.NODE_ENV === "production" ? u : c;
|
|
29
|
+
export {
|
|
30
|
+
s as i
|
|
31
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import * as k from "react";
|
|
2
|
+
import { c as N } from "./DefaultPropsProvider.js";
|
|
3
|
+
function O(n, s) {
|
|
4
|
+
typeof n == "function" ? n(s) : n && (n.current = s);
|
|
5
|
+
}
|
|
6
|
+
function W(...n) {
|
|
7
|
+
return k.useMemo(() => n.every((s) => s == null) ? null : (s) => {
|
|
8
|
+
n.forEach((e) => {
|
|
9
|
+
O(e, s);
|
|
10
|
+
});
|
|
11
|
+
}, n);
|
|
12
|
+
}
|
|
13
|
+
function R(n) {
|
|
14
|
+
return typeof n == "string";
|
|
15
|
+
}
|
|
16
|
+
function Z(n, s, e) {
|
|
17
|
+
return n === void 0 || R(n) ? s : {
|
|
18
|
+
...s,
|
|
19
|
+
ownerState: {
|
|
20
|
+
...s.ownerState,
|
|
21
|
+
...e
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function C(n, s = []) {
|
|
26
|
+
if (n === void 0)
|
|
27
|
+
return {};
|
|
28
|
+
const e = {};
|
|
29
|
+
return Object.keys(n).filter((t) => t.match(/^on[A-Z]/) && typeof n[t] == "function" && !s.includes(t)).forEach((t) => {
|
|
30
|
+
e[t] = n[t];
|
|
31
|
+
}), e;
|
|
32
|
+
}
|
|
33
|
+
function g(n) {
|
|
34
|
+
if (n === void 0)
|
|
35
|
+
return {};
|
|
36
|
+
const s = {};
|
|
37
|
+
return Object.keys(n).filter((e) => !(e.match(/^on[A-Z]/) && typeof n[e] == "function")).forEach((e) => {
|
|
38
|
+
s[e] = n[e];
|
|
39
|
+
}), s;
|
|
40
|
+
}
|
|
41
|
+
function M(n) {
|
|
42
|
+
const {
|
|
43
|
+
getSlotProps: s,
|
|
44
|
+
additionalProps: e,
|
|
45
|
+
externalSlotProps: t,
|
|
46
|
+
externalForwardedProps: c,
|
|
47
|
+
className: m
|
|
48
|
+
} = n;
|
|
49
|
+
if (!s) {
|
|
50
|
+
const a = N(e == null ? void 0 : e.className, m, c == null ? void 0 : c.className, t == null ? void 0 : t.className), h = {
|
|
51
|
+
...e == null ? void 0 : e.style,
|
|
52
|
+
...c == null ? void 0 : c.style,
|
|
53
|
+
...t == null ? void 0 : t.style
|
|
54
|
+
}, i = {
|
|
55
|
+
...e,
|
|
56
|
+
...c,
|
|
57
|
+
...t
|
|
58
|
+
};
|
|
59
|
+
return a.length > 0 && (i.className = a), Object.keys(h).length > 0 && (i.style = h), {
|
|
60
|
+
props: i,
|
|
61
|
+
internalRef: void 0
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
const E = C({
|
|
65
|
+
...c,
|
|
66
|
+
...t
|
|
67
|
+
}), v = g(t), H = g(c), f = s(E), y = N(f == null ? void 0 : f.className, e == null ? void 0 : e.className, m, c == null ? void 0 : c.className, t == null ? void 0 : t.className), l = {
|
|
68
|
+
...f == null ? void 0 : f.style,
|
|
69
|
+
...e == null ? void 0 : e.style,
|
|
70
|
+
...c == null ? void 0 : c.style,
|
|
71
|
+
...t == null ? void 0 : t.style
|
|
72
|
+
}, u = {
|
|
73
|
+
...f,
|
|
74
|
+
...e,
|
|
75
|
+
...H,
|
|
76
|
+
...v
|
|
77
|
+
};
|
|
78
|
+
return y.length > 0 && (u.className = y), Object.keys(l).length > 0 && (u.style = l), {
|
|
79
|
+
props: u,
|
|
80
|
+
internalRef: f.ref
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function j(n, s, e) {
|
|
84
|
+
return typeof n == "function" ? n(s, e) : n;
|
|
85
|
+
}
|
|
86
|
+
export {
|
|
87
|
+
Z as a,
|
|
88
|
+
C as e,
|
|
89
|
+
M as m,
|
|
90
|
+
j as r,
|
|
91
|
+
O as s,
|
|
92
|
+
W as u
|
|
93
|
+
};
|