@notificationapi/react 1.6.2 → 1.8.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/dist/assets/Badge.js +4 -3
- package/dist/assets/Box.js +26 -24
- package/dist/assets/Button.js +20 -18
- package/dist/assets/ButtonBase.js +193 -185
- package/dist/assets/DefaultPropsProvider.js +416 -4199
- package/dist/assets/DefaultPropsProvider2.js +992 -0
- package/dist/assets/Divider.js +2 -1
- package/dist/assets/GlobalStyles.js +23 -0
- package/dist/assets/Grow.js +87 -92
- package/dist/assets/IconButton.js +8 -7
- package/dist/assets/List.js +12 -11
- package/dist/assets/Modal.js +18 -17
- package/dist/assets/Notification.js +787 -770
- package/dist/assets/Paper.js +6 -6
- package/dist/assets/Popover.js +38 -37
- package/dist/assets/Portal.js +38 -48
- package/dist/assets/Stack.js +32 -30
- package/dist/assets/Typography.js +84 -97
- package/dist/assets/createSvgIcon.js +25 -24
- package/dist/assets/createTheme.js +2828 -0
- package/dist/assets/dividerClasses.js +16 -15
- package/dist/assets/exactProp.js +13 -0
- package/dist/assets/index.js +19 -148
- package/dist/assets/index2.js +151 -0
- package/dist/assets/useTheme.js +6 -7
- package/dist/assets/{useTheme2.js → useThemeWithoutDefault.js} +63 -67
- package/dist/assets/utils.js +2 -2
- package/dist/components/Notifications/DefaultEmpty.d.ts +0 -1
- package/dist/components/Notifications/Inbox.d.ts +0 -1
- package/dist/components/Notifications/Inbox.js +592 -582
- package/dist/components/Notifications/InboxHeader.js +31 -30
- package/dist/components/Notifications/Notification.d.ts +0 -1
- package/dist/components/Notifications/Notification.js +4 -2
- package/dist/components/Notifications/NotificationCounter.d.ts +0 -1
- package/dist/components/Notifications/NotificationFeed.d.ts +0 -1
- package/dist/components/Notifications/NotificationFeed.js +40 -32
- package/dist/components/Notifications/NotificationLauncher.d.ts +0 -1
- package/dist/components/Notifications/NotificationLauncher.js +90 -64
- package/dist/components/Notifications/NotificationPopup.d.ts +0 -1
- package/dist/components/Notifications/NotificationPopup.js +76 -65
- package/dist/components/Notifications/UnreadBadge.d.ts +0 -1
- package/dist/components/Preferences/NotificationPreferencesInline.js +57 -39
- package/dist/components/Preferences/NotificationPreferencesPopup.js +111 -99
- package/dist/components/Preferences/PreferenceInput.d.ts +0 -1
- package/dist/components/Preferences/PreferenceInput.js +427 -414
- package/dist/components/Preferences/Preferences.js +329 -278
- package/dist/components/Preferences/channelUtils.d.ts +0 -1
- package/dist/components/Provider/context.d.ts +0 -1
- package/dist/components/Provider/index.d.ts +4 -2
- package/dist/components/Provider/index.js +986 -375
- package/dist/components/Slack/SlackConnect.js +8 -7
- package/dist/components/WebPush/WebPushOptInMessage.d.ts +0 -1
- package/dist/main.d.ts +2 -1
- package/dist/main.js +6 -3
- package/dist/utils/theme.d.ts +17 -0
- package/dist/utils/theme.js +104 -0
- package/package.json +7 -3
package/dist/assets/Divider.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as A from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { a as D, P as i } from "./createTheme.js";
|
|
3
|
+
import { s as b, m as u, u as T, c as R, a as S } from "./DefaultPropsProvider.js";
|
|
3
4
|
import { g as C } from "./dividerClasses.js";
|
|
4
5
|
import { jsx as v } from "react/jsx-runtime";
|
|
5
6
|
const L = (e) => {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { P as e } from "./createTheme.js";
|
|
3
|
+
import { G as r } from "./useThemeWithoutDefault.js";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
function p(t) {
|
|
6
|
+
return t == null || Object.keys(t).length === 0;
|
|
7
|
+
}
|
|
8
|
+
function y(t) {
|
|
9
|
+
const {
|
|
10
|
+
styles: o,
|
|
11
|
+
defaultTheme: l = {}
|
|
12
|
+
} = t;
|
|
13
|
+
return /* @__PURE__ */ n(r, {
|
|
14
|
+
styles: typeof o == "function" ? (s) => o(p(s) ? l : s) : o
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
process.env.NODE_ENV !== "production" && (y.propTypes = {
|
|
18
|
+
defaultTheme: e.object,
|
|
19
|
+
styles: e.oneOfType([e.array, e.string, e.object, e.func])
|
|
20
|
+
});
|
|
21
|
+
export {
|
|
22
|
+
y as G
|
|
23
|
+
};
|
package/dist/assets/Grow.js
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { P as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { T as
|
|
6
|
-
import { u as J } from "./ButtonBase.js";
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
import { P as n } from "./createTheme.js";
|
|
3
|
+
import { a as V, u as W } from "./ButtonBase.js";
|
|
4
|
+
import { jsx as k } from "react/jsx-runtime";
|
|
5
|
+
import { T as B, r as J, g as v } from "./utils.js";
|
|
7
6
|
import { u as M } from "./resolveComponentProps.js";
|
|
8
7
|
import { g as Q, e as U } from "./Portal.js";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const st = () => c.useContext(X) ?? !1;
|
|
12
|
-
function h(d) {
|
|
13
|
-
return `scale(${d}, ${d ** 2})`;
|
|
8
|
+
function h(l) {
|
|
9
|
+
return `scale(${l}, ${l ** 2})`;
|
|
14
10
|
}
|
|
15
|
-
const
|
|
11
|
+
const X = {
|
|
16
12
|
entering: {
|
|
17
13
|
opacity: 1,
|
|
18
14
|
transform: h(1)
|
|
@@ -21,101 +17,101 @@ const Y = {
|
|
|
21
17
|
opacity: 1,
|
|
22
18
|
transform: "none"
|
|
23
19
|
}
|
|
24
|
-
}, E = typeof navigator < "u" && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)4/i.test(navigator.userAgent), y = /* @__PURE__ */
|
|
20
|
+
}, E = typeof navigator < "u" && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)4/i.test(navigator.userAgent), y = /* @__PURE__ */ f.forwardRef(function(w, D) {
|
|
25
21
|
const {
|
|
26
22
|
addEndListener: x,
|
|
27
|
-
appear:
|
|
23
|
+
appear: L = !0,
|
|
28
24
|
children: m,
|
|
29
|
-
easing:
|
|
30
|
-
in:
|
|
31
|
-
onEnter:
|
|
32
|
-
onEntered:
|
|
33
|
-
onEntering:
|
|
34
|
-
onExit:
|
|
35
|
-
onExited:
|
|
36
|
-
onExiting:
|
|
25
|
+
easing: T,
|
|
26
|
+
in: R,
|
|
27
|
+
onEnter: b,
|
|
28
|
+
onEntered: j,
|
|
29
|
+
onEntering: H,
|
|
30
|
+
onExit: A,
|
|
31
|
+
onExited: O,
|
|
32
|
+
onExiting: P,
|
|
37
33
|
style: p,
|
|
38
|
-
timeout:
|
|
34
|
+
timeout: o = "auto",
|
|
39
35
|
// eslint-disable-next-line react/prop-types
|
|
40
|
-
TransitionComponent:
|
|
41
|
-
...
|
|
42
|
-
} =
|
|
43
|
-
if (
|
|
44
|
-
const e =
|
|
45
|
-
r === void 0 ?
|
|
36
|
+
TransitionComponent: F = B,
|
|
37
|
+
...G
|
|
38
|
+
} = w, S = V(), g = f.useRef(), s = W(), c = f.useRef(null), C = M(c, Q(m), D), a = (t) => (r) => {
|
|
39
|
+
if (t) {
|
|
40
|
+
const e = c.current;
|
|
41
|
+
r === void 0 ? t(e) : t(e, r);
|
|
46
42
|
}
|
|
47
|
-
},
|
|
48
|
-
|
|
43
|
+
}, N = a(H), _ = a((t, r) => {
|
|
44
|
+
J(t);
|
|
49
45
|
const {
|
|
50
46
|
duration: e,
|
|
51
|
-
delay:
|
|
52
|
-
easing:
|
|
53
|
-
} =
|
|
47
|
+
delay: d,
|
|
48
|
+
easing: i
|
|
49
|
+
} = v({
|
|
54
50
|
style: p,
|
|
55
|
-
timeout:
|
|
56
|
-
easing:
|
|
51
|
+
timeout: o,
|
|
52
|
+
easing: T
|
|
57
53
|
}, {
|
|
58
54
|
mode: "enter"
|
|
59
55
|
});
|
|
60
56
|
let u;
|
|
61
|
-
|
|
57
|
+
o === "auto" ? (u = s.transitions.getAutoHeightDuration(t.clientHeight), g.current = u) : u = e, t.style.transition = [s.transitions.create("opacity", {
|
|
62
58
|
duration: u,
|
|
63
|
-
delay:
|
|
59
|
+
delay: d
|
|
64
60
|
}), s.transitions.create("transform", {
|
|
65
61
|
duration: E ? u : u * 0.666,
|
|
66
|
-
delay:
|
|
67
|
-
easing:
|
|
68
|
-
})].join(","),
|
|
69
|
-
}),
|
|
62
|
+
delay: d,
|
|
63
|
+
easing: i
|
|
64
|
+
})].join(","), b && b(t, r);
|
|
65
|
+
}), $ = a(j), q = a(P), z = a((t) => {
|
|
70
66
|
const {
|
|
71
67
|
duration: r,
|
|
72
68
|
delay: e,
|
|
73
|
-
easing:
|
|
74
|
-
} =
|
|
69
|
+
easing: d
|
|
70
|
+
} = v({
|
|
75
71
|
style: p,
|
|
76
|
-
timeout:
|
|
77
|
-
easing:
|
|
72
|
+
timeout: o,
|
|
73
|
+
easing: T
|
|
78
74
|
}, {
|
|
79
75
|
mode: "exit"
|
|
80
76
|
});
|
|
81
|
-
let
|
|
82
|
-
|
|
83
|
-
duration:
|
|
77
|
+
let i;
|
|
78
|
+
o === "auto" ? (i = s.transitions.getAutoHeightDuration(t.clientHeight), g.current = i) : i = r, t.style.transition = [s.transitions.create("opacity", {
|
|
79
|
+
duration: i,
|
|
84
80
|
delay: e
|
|
85
81
|
}), s.transitions.create("transform", {
|
|
86
|
-
duration: E ?
|
|
87
|
-
delay: E ? e : e ||
|
|
88
|
-
easing:
|
|
89
|
-
})].join(","),
|
|
90
|
-
}),
|
|
91
|
-
return /* @__PURE__ */
|
|
92
|
-
appear:
|
|
93
|
-
in:
|
|
94
|
-
nodeRef:
|
|
82
|
+
duration: E ? i : i * 0.666,
|
|
83
|
+
delay: E ? e : e || i * 0.333,
|
|
84
|
+
easing: d
|
|
85
|
+
})].join(","), t.style.opacity = 0, t.style.transform = h(0.75), A && A(t);
|
|
86
|
+
}), K = a(O);
|
|
87
|
+
return /* @__PURE__ */ k(F, {
|
|
88
|
+
appear: L,
|
|
89
|
+
in: R,
|
|
90
|
+
nodeRef: c,
|
|
95
91
|
onEnter: _,
|
|
96
|
-
onEntered:
|
|
97
|
-
onEntering:
|
|
98
|
-
onExit:
|
|
99
|
-
onExited:
|
|
100
|
-
onExiting:
|
|
101
|
-
addEndListener: (
|
|
102
|
-
|
|
92
|
+
onEntered: $,
|
|
93
|
+
onEntering: N,
|
|
94
|
+
onExit: z,
|
|
95
|
+
onExited: K,
|
|
96
|
+
onExiting: q,
|
|
97
|
+
addEndListener: (t) => {
|
|
98
|
+
o === "auto" && S.start(g.current || 0, t), x && x(c.current, t);
|
|
103
99
|
},
|
|
104
|
-
timeout:
|
|
105
|
-
...
|
|
106
|
-
children: (
|
|
100
|
+
timeout: o === "auto" ? null : o,
|
|
101
|
+
...G,
|
|
102
|
+
children: (t, {
|
|
107
103
|
ownerState: r,
|
|
108
104
|
...e
|
|
109
|
-
}) => /* @__PURE__ */
|
|
105
|
+
}) => /* @__PURE__ */ f.cloneElement(m, {
|
|
110
106
|
style: {
|
|
111
107
|
opacity: 0,
|
|
112
108
|
transform: h(0.75),
|
|
113
|
-
visibility:
|
|
114
|
-
...
|
|
109
|
+
visibility: t === "exited" && !R ? "hidden" : void 0,
|
|
110
|
+
...X[t],
|
|
115
111
|
...p,
|
|
116
112
|
...m.props.style
|
|
117
113
|
},
|
|
118
|
-
ref:
|
|
114
|
+
ref: C,
|
|
119
115
|
...e
|
|
120
116
|
})
|
|
121
117
|
});
|
|
@@ -130,13 +126,13 @@ process.env.NODE_ENV !== "production" && (y.propTypes = {
|
|
|
130
126
|
* node and a done callback. Allows for more fine grained transition end
|
|
131
127
|
* logic. Note: Timeouts are still used as a fallback if provided.
|
|
132
128
|
*/
|
|
133
|
-
addEndListener:
|
|
129
|
+
addEndListener: n.func,
|
|
134
130
|
/**
|
|
135
131
|
* Perform the enter transition when it first mounts if `in` is also `true`.
|
|
136
132
|
* Set this to `false` to disable this behavior.
|
|
137
133
|
* @default true
|
|
138
134
|
*/
|
|
139
|
-
appear:
|
|
135
|
+
appear: n.bool,
|
|
140
136
|
/**
|
|
141
137
|
* A single child content element.
|
|
142
138
|
*/
|
|
@@ -145,42 +141,42 @@ process.env.NODE_ENV !== "production" && (y.propTypes = {
|
|
|
145
141
|
* The transition timing function.
|
|
146
142
|
* You may specify a single easing or a object containing enter and exit values.
|
|
147
143
|
*/
|
|
148
|
-
easing:
|
|
149
|
-
enter:
|
|
150
|
-
exit:
|
|
151
|
-
}),
|
|
144
|
+
easing: n.oneOfType([n.shape({
|
|
145
|
+
enter: n.string,
|
|
146
|
+
exit: n.string
|
|
147
|
+
}), n.string]),
|
|
152
148
|
/**
|
|
153
149
|
* If `true`, the component will transition in.
|
|
154
150
|
*/
|
|
155
|
-
in:
|
|
151
|
+
in: n.bool,
|
|
156
152
|
/**
|
|
157
153
|
* @ignore
|
|
158
154
|
*/
|
|
159
|
-
onEnter:
|
|
155
|
+
onEnter: n.func,
|
|
160
156
|
/**
|
|
161
157
|
* @ignore
|
|
162
158
|
*/
|
|
163
|
-
onEntered:
|
|
159
|
+
onEntered: n.func,
|
|
164
160
|
/**
|
|
165
161
|
* @ignore
|
|
166
162
|
*/
|
|
167
|
-
onEntering:
|
|
163
|
+
onEntering: n.func,
|
|
168
164
|
/**
|
|
169
165
|
* @ignore
|
|
170
166
|
*/
|
|
171
|
-
onExit:
|
|
167
|
+
onExit: n.func,
|
|
172
168
|
/**
|
|
173
169
|
* @ignore
|
|
174
170
|
*/
|
|
175
|
-
onExited:
|
|
171
|
+
onExited: n.func,
|
|
176
172
|
/**
|
|
177
173
|
* @ignore
|
|
178
174
|
*/
|
|
179
|
-
onExiting:
|
|
175
|
+
onExiting: n.func,
|
|
180
176
|
/**
|
|
181
177
|
* @ignore
|
|
182
178
|
*/
|
|
183
|
-
style:
|
|
179
|
+
style: n.object,
|
|
184
180
|
/**
|
|
185
181
|
* The duration for the transition, in milliseconds.
|
|
186
182
|
* You may specify a single timeout for all transitions, or individually with an object.
|
|
@@ -188,14 +184,13 @@ process.env.NODE_ENV !== "production" && (y.propTypes = {
|
|
|
188
184
|
* Set to 'auto' to automatically calculate transition time based on height.
|
|
189
185
|
* @default 'auto'
|
|
190
186
|
*/
|
|
191
|
-
timeout:
|
|
192
|
-
appear:
|
|
193
|
-
enter:
|
|
194
|
-
exit:
|
|
187
|
+
timeout: n.oneOfType([n.oneOf(["auto"]), n.number, n.shape({
|
|
188
|
+
appear: n.number,
|
|
189
|
+
enter: n.number,
|
|
190
|
+
exit: n.number
|
|
195
191
|
})])
|
|
196
192
|
});
|
|
197
193
|
y && (y.muiSupportAuto = !0);
|
|
198
194
|
export {
|
|
199
|
-
y as G
|
|
200
|
-
st as u
|
|
195
|
+
y as G
|
|
201
196
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as c from "react";
|
|
2
|
-
import { g as z, e as
|
|
2
|
+
import { g as z, e as a, a as g, P as e } from "./createTheme.js";
|
|
3
|
+
import { g as R, s as I, m as f, u as O, c as C, a as h } from "./DefaultPropsProvider.js";
|
|
3
4
|
import { c as y } from "./createSimplePaletteValueFilter.js";
|
|
4
5
|
import { jsx as T } from "react/jsx-runtime";
|
|
5
6
|
import { B as S, c as $ } from "./ButtonBase.js";
|
|
6
7
|
function x(o) {
|
|
7
|
-
return
|
|
8
|
+
return z("MuiIconButton", o);
|
|
8
9
|
}
|
|
9
|
-
const w =
|
|
10
|
+
const w = R("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge"]), j = (o) => {
|
|
10
11
|
const {
|
|
11
12
|
classes: t,
|
|
12
13
|
disabled: r,
|
|
@@ -26,7 +27,7 @@ const w = z("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
|
|
|
26
27
|
} = o;
|
|
27
28
|
return [t.root, r.color !== "default" && t[`color${a(r.color)}`], r.edge && t[`edge${a(r.edge)}`], t[`size${a(r.size)}`]];
|
|
28
29
|
}
|
|
29
|
-
})(
|
|
30
|
+
})(f(({
|
|
30
31
|
theme: o
|
|
31
32
|
}) => ({
|
|
32
33
|
textAlign: "center",
|
|
@@ -41,7 +42,7 @@ const w = z("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
|
|
|
41
42
|
variants: [{
|
|
42
43
|
props: (t) => !t.disableRipple,
|
|
43
44
|
style: {
|
|
44
|
-
"--IconButton-hoverBg": o.vars ? `rgba(${o.vars.palette.action.activeChannel} / ${o.vars.palette.action.hoverOpacity})` :
|
|
45
|
+
"--IconButton-hoverBg": o.vars ? `rgba(${o.vars.palette.action.activeChannel} / ${o.vars.palette.action.hoverOpacity})` : g(o.palette.action.active, o.palette.action.hoverOpacity),
|
|
45
46
|
"&:hover": {
|
|
46
47
|
backgroundColor: "var(--IconButton-hoverBg)",
|
|
47
48
|
// Reset on touch devices, it doesn't add specificity
|
|
@@ -81,7 +82,7 @@ const w = z("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
|
|
|
81
82
|
marginRight: -3
|
|
82
83
|
}
|
|
83
84
|
}]
|
|
84
|
-
})),
|
|
85
|
+
})), f(({
|
|
85
86
|
theme: o
|
|
86
87
|
}) => ({
|
|
87
88
|
variants: [{
|
|
@@ -103,7 +104,7 @@ const w = z("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
|
|
|
103
104
|
color: t
|
|
104
105
|
},
|
|
105
106
|
style: {
|
|
106
|
-
"--IconButton-hoverBg": o.vars ? `rgba(${(o.vars || o).palette[t].mainChannel} / ${o.vars.palette.action.hoverOpacity})` :
|
|
107
|
+
"--IconButton-hoverBg": o.vars ? `rgba(${(o.vars || o).palette[t].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : g((o.vars || o).palette[t].main, o.palette.action.hoverOpacity)
|
|
107
108
|
}
|
|
108
109
|
})), {
|
|
109
110
|
props: {
|
package/dist/assets/List.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as i from "react";
|
|
2
|
-
import { g as y,
|
|
2
|
+
import { g as y, P as s } from "./createTheme.js";
|
|
3
|
+
import { g as h, s as L, u as v, c as x, a as N } from "./DefaultPropsProvider.js";
|
|
3
4
|
import { jsx as C, jsxs as P } from "react/jsx-runtime";
|
|
4
|
-
function
|
|
5
|
+
function S(e, o) {
|
|
5
6
|
var t, n, a;
|
|
6
7
|
return /* @__PURE__ */ i.isValidElement(e) && o.indexOf(
|
|
7
8
|
// For server components `muiName` is avaialble in element.type._payload.value.muiName
|
|
@@ -10,15 +11,15 @@ function w(e, o) {
|
|
|
10
11
|
e.type.muiName ?? ((a = (n = (t = e.type) == null ? void 0 : t._payload) == null ? void 0 : n.value) == null ? void 0 : a.muiName)
|
|
11
12
|
) !== -1;
|
|
12
13
|
}
|
|
13
|
-
function
|
|
14
|
+
function U(e) {
|
|
14
15
|
return typeof e == "string";
|
|
15
16
|
}
|
|
16
17
|
const c = /* @__PURE__ */ i.createContext({});
|
|
17
18
|
process.env.NODE_ENV !== "production" && (c.displayName = "ListContext");
|
|
18
19
|
function T(e) {
|
|
19
|
-
return
|
|
20
|
+
return y("MuiList", e);
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
+
h("MuiList", ["root", "padding", "dense", "subheader"]);
|
|
22
23
|
const E = (e) => {
|
|
23
24
|
const {
|
|
24
25
|
classes: o,
|
|
@@ -70,8 +71,8 @@ const E = (e) => {
|
|
|
70
71
|
dense: r = !1,
|
|
71
72
|
disablePadding: u = !1,
|
|
72
73
|
subheader: m,
|
|
73
|
-
...
|
|
74
|
-
} = n,
|
|
74
|
+
...f
|
|
75
|
+
} = n, b = i.useMemo(() => ({
|
|
75
76
|
dense: r
|
|
76
77
|
}), [r]), p = {
|
|
77
78
|
...n,
|
|
@@ -80,13 +81,13 @@ const E = (e) => {
|
|
|
80
81
|
disablePadding: u
|
|
81
82
|
}, g = E(p);
|
|
82
83
|
return /* @__PURE__ */ C(c.Provider, {
|
|
83
|
-
value:
|
|
84
|
+
value: b,
|
|
84
85
|
children: /* @__PURE__ */ P(M, {
|
|
85
86
|
as: l,
|
|
86
87
|
className: x(g.root, d),
|
|
87
88
|
ref: t,
|
|
88
89
|
ownerState: p,
|
|
89
|
-
...
|
|
90
|
+
...f,
|
|
90
91
|
children: [m, a]
|
|
91
92
|
})
|
|
92
93
|
});
|
|
@@ -136,7 +137,7 @@ process.env.NODE_ENV !== "production" && (O.propTypes = {
|
|
|
136
137
|
});
|
|
137
138
|
export {
|
|
138
139
|
O as L,
|
|
139
|
-
|
|
140
|
+
S as a,
|
|
140
141
|
c as b,
|
|
141
|
-
|
|
142
|
+
U as i
|
|
142
143
|
};
|
package/dist/assets/Modal.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as f from "react";
|
|
2
|
-
import { P as e, g as le
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { P as e, g as le } from "./createTheme.js";
|
|
3
|
+
import { g as de, s as J, u as ue, c as X, a as fe, m as ke } from "./DefaultPropsProvider.js";
|
|
4
|
+
import { o as j, e as Q, g as pe, P as Pe, H as Ne } from "./Portal.js";
|
|
5
|
+
import { u as Y, e as Ce } from "./resolveComponentProps.js";
|
|
6
|
+
import { u as Se, b as H, f as oe } from "./ButtonBase.js";
|
|
6
7
|
import { c as re } from "./Stack.js";
|
|
7
8
|
import { jsx as A, jsxs as be } from "react/jsx-runtime";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
9
|
+
import { T as we, r as Ie, g as se } from "./utils.js";
|
|
10
|
+
import { e as Oe } from "./exactProp.js";
|
|
10
11
|
function _(t) {
|
|
11
12
|
return j(t).defaultView || window;
|
|
12
13
|
}
|
|
@@ -22,7 +23,7 @@ const Me = {
|
|
|
22
23
|
opacity: 1
|
|
23
24
|
}
|
|
24
25
|
}, me = /* @__PURE__ */ f.forwardRef(function(n, r) {
|
|
25
|
-
const o =
|
|
26
|
+
const o = Se(), i = {
|
|
26
27
|
enter: o.transitions.duration.enteringScreen,
|
|
27
28
|
exit: o.transitions.duration.leavingScreen
|
|
28
29
|
}, {
|
|
@@ -40,7 +41,7 @@ const Me = {
|
|
|
40
41
|
style: T,
|
|
41
42
|
timeout: k = i,
|
|
42
43
|
// eslint-disable-next-line react/prop-types
|
|
43
|
-
TransitionComponent: N =
|
|
44
|
+
TransitionComponent: N = we,
|
|
44
45
|
...l
|
|
45
46
|
} = n, m = f.useRef(null), C = Y(m, pe(c), r), x = (E) => (d) => {
|
|
46
47
|
if (E) {
|
|
@@ -48,7 +49,7 @@ const Me = {
|
|
|
48
49
|
d === void 0 ? E(u) : E(u, d);
|
|
49
50
|
}
|
|
50
51
|
}, R = x(v), S = x((E, d) => {
|
|
51
|
-
|
|
52
|
+
Ie(E);
|
|
52
53
|
const u = se({
|
|
53
54
|
style: T,
|
|
54
55
|
timeout: k,
|
|
@@ -174,9 +175,9 @@ process.env.NODE_ENV !== "production" && (me.propTypes = {
|
|
|
174
175
|
})])
|
|
175
176
|
});
|
|
176
177
|
function Ae(t) {
|
|
177
|
-
return
|
|
178
|
+
return le("MuiBackdrop", t);
|
|
178
179
|
}
|
|
179
|
-
|
|
180
|
+
de("MuiBackdrop", ["root", "invisible"]);
|
|
180
181
|
const De = (t) => {
|
|
181
182
|
const {
|
|
182
183
|
classes: n,
|
|
@@ -643,7 +644,7 @@ process.env.NODE_ENV !== "production" && ($.propTypes = {
|
|
|
643
644
|
*/
|
|
644
645
|
open: e.bool.isRequired
|
|
645
646
|
});
|
|
646
|
-
process.env.NODE_ENV !== "production" && ($.propTypes =
|
|
647
|
+
process.env.NODE_ENV !== "production" && ($.propTypes = Oe($.propTypes));
|
|
647
648
|
function Ye(t) {
|
|
648
649
|
return typeof t == "function" ? t() : t;
|
|
649
650
|
}
|
|
@@ -694,7 +695,7 @@ function Xe(t) {
|
|
|
694
695
|
};
|
|
695
696
|
return {
|
|
696
697
|
getRootProps: (d = {}) => {
|
|
697
|
-
const u =
|
|
698
|
+
const u = Ce(t);
|
|
698
699
|
delete u.onTransitionEnter, delete u.onTransitionExited;
|
|
699
700
|
const O = {
|
|
700
701
|
...u,
|
|
@@ -741,9 +742,9 @@ function Xe(t) {
|
|
|
741
742
|
};
|
|
742
743
|
}
|
|
743
744
|
function Je(t) {
|
|
744
|
-
return
|
|
745
|
+
return le("MuiModal", t);
|
|
745
746
|
}
|
|
746
|
-
|
|
747
|
+
de("MuiModal", ["root", "hidden", "backdrop"]);
|
|
747
748
|
const Qe = (t) => {
|
|
748
749
|
const {
|
|
749
750
|
open: n,
|
|
@@ -886,7 +887,7 @@ const Qe = (t) => {
|
|
|
886
887
|
className: X(s == null ? void 0 : s.className, M == null ? void 0 : M.backdrop),
|
|
887
888
|
ownerState: K
|
|
888
889
|
}), ve = Y(s == null ? void 0 : s.ref, ne.ref);
|
|
889
|
-
return !C && !F && (!ee || Z) ? null : /* @__PURE__ */ A(
|
|
890
|
+
return !C && !F && (!ee || Z) ? null : /* @__PURE__ */ A(Pe, {
|
|
890
891
|
ref: ge,
|
|
891
892
|
container: P,
|
|
892
893
|
disablePortal: k,
|
|
@@ -986,7 +987,7 @@ process.env.NODE_ENV !== "production" && (tt.propTypes = {
|
|
|
986
987
|
* By default, it uses the body of the top-level document object,
|
|
987
988
|
* so it's simply `document.body` most of the time.
|
|
988
989
|
*/
|
|
989
|
-
container: e.oneOfType([
|
|
990
|
+
container: e.oneOfType([Ne, e.func]),
|
|
990
991
|
/**
|
|
991
992
|
* If `true`, the modal will not automatically shift focus to itself when it opens, and
|
|
992
993
|
* replace it to the last focused element when it closes.
|