@notificationapi/react 1.4.0 → 1.5.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 +1 -1
- package/dist/assets/Box.js +13 -13
- package/dist/assets/Button.js +781 -0
- package/dist/assets/ButtonBase.js +409 -622
- package/dist/assets/DefaultPropsProvider.js +220 -215
- package/dist/assets/Divider.js +105 -154
- package/dist/assets/Grow.js +201 -0
- package/dist/assets/IconButton.js +1 -1
- package/dist/assets/List.js +142 -0
- package/dist/assets/Modal.js +1094 -0
- package/dist/assets/Notification.js +80 -79
- package/dist/assets/Paper.js +1 -1
- package/dist/assets/Popover.js +8 -6
- package/dist/assets/Portal.js +2 -2
- package/dist/assets/Stack.js +216 -0
- package/dist/assets/Typography.js +193 -117
- package/dist/assets/WebPushOptInMessage.js +40 -814
- package/dist/assets/createSvgIcon.js +5 -5
- package/dist/assets/dividerClasses.js +56 -0
- package/dist/assets/index.js +151 -0
- package/dist/assets/useTheme2.js +253 -11
- package/dist/assets/utils.js +4 -4
- package/dist/components/Notifications/Inbox.js +2927 -9
- package/dist/components/Notifications/InboxHeader.js +2146 -7
- package/dist/components/Notifications/NotificationFeed.js +13 -13
- package/dist/components/Notifications/NotificationLauncher.js +2 -2
- package/dist/components/Notifications/NotificationPopup.js +7 -7
- package/dist/components/Preferences/NotificationPreferencesPopup.js +608 -7
- package/dist/components/Preferences/PreferenceInput.js +1451 -6
- package/dist/components/Preferences/Preferences.js +368 -515
- package/dist/components/Preferences/index.js +1 -1
- package/dist/components/Provider/index.js +226 -202
- package/dist/components/Slack/SlackConnect.d.ts +12 -0
- package/dist/components/Slack/SlackConnect.js +4826 -0
- package/dist/components/Slack/index.d.ts +1 -0
- package/dist/components/Slack/index.js +4 -0
- package/dist/components/WebPush/WebPushOptInMessage.js +3 -2
- package/dist/main.d.ts +1 -0
- package/dist/main.js +5 -3
- package/package.json +4 -4
- package/dist/assets/Inbox.js +0 -3061
- package/dist/assets/InboxHeader.js +0 -2338
- package/dist/assets/NotificationPreferencesPopup.js +0 -1694
- package/dist/assets/PreferenceInput.js +0 -1657
package/dist/assets/Divider.js
CHANGED
|
@@ -1,87 +1,40 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
1
|
+
import * as A from "react";
|
|
2
|
+
import { s as b, m as u, a as D, u as T, c as R, P as i, b as S } from "./DefaultPropsProvider.js";
|
|
3
|
+
import { g as C } from "./dividerClasses.js";
|
|
3
4
|
import { jsx as v } from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
function L(t) {
|
|
6
|
-
const [e, i] = l.useState(t), o = t || e;
|
|
7
|
-
return l.useEffect(() => {
|
|
8
|
-
e == null && (b += 1, i(`mui-${b}`));
|
|
9
|
-
}, [e]), o;
|
|
10
|
-
}
|
|
11
|
-
const N = {
|
|
12
|
-
...l
|
|
13
|
-
}, m = N.useId;
|
|
14
|
-
function k(t) {
|
|
15
|
-
if (m !== void 0) {
|
|
16
|
-
const e = m();
|
|
17
|
-
return t ?? e;
|
|
18
|
-
}
|
|
19
|
-
return L(t);
|
|
20
|
-
}
|
|
21
|
-
function z({
|
|
22
|
-
controlled: t,
|
|
23
|
-
default: e,
|
|
24
|
-
name: i,
|
|
25
|
-
state: o = "value"
|
|
26
|
-
}) {
|
|
27
|
-
const {
|
|
28
|
-
current: n
|
|
29
|
-
} = l.useRef(t !== void 0), [d, a] = l.useState(e), s = n ? t : d;
|
|
30
|
-
if (process.env.NODE_ENV !== "production") {
|
|
31
|
-
l.useEffect(() => {
|
|
32
|
-
n !== (t !== void 0) && console.error([`MUI: A component is changing the ${n ? "" : "un"}controlled ${o} state of ${i} to be ${n ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${i} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
|
|
33
|
-
`));
|
|
34
|
-
}, [o, i, t]);
|
|
35
|
-
const {
|
|
36
|
-
current: p
|
|
37
|
-
} = l.useRef(e);
|
|
38
|
-
l.useEffect(() => {
|
|
39
|
-
!n && !Object.is(p, e) && console.error([`MUI: A component is changing the default ${o} state of an uncontrolled ${i} after being initialized. To suppress this warning opt to use a controlled ${i}.`].join(`
|
|
40
|
-
`));
|
|
41
|
-
}, [JSON.stringify(e)]);
|
|
42
|
-
}
|
|
43
|
-
const c = l.useCallback((p) => {
|
|
44
|
-
n || a(p);
|
|
45
|
-
}, []);
|
|
46
|
-
return [s, c];
|
|
47
|
-
}
|
|
48
|
-
function O(t) {
|
|
49
|
-
return R("MuiDivider", t);
|
|
50
|
-
}
|
|
51
|
-
A("MuiDivider", ["root", "absolute", "fullWidth", "inset", "middle", "flexItem", "light", "vertical", "withChildren", "withChildrenVertical", "textAlignRight", "textAlignLeft", "wrapper", "wrapperVertical"]);
|
|
52
|
-
const W = (t) => {
|
|
5
|
+
const L = (e) => {
|
|
53
6
|
const {
|
|
54
|
-
absolute:
|
|
55
|
-
children:
|
|
56
|
-
classes:
|
|
57
|
-
flexItem:
|
|
58
|
-
light:
|
|
59
|
-
orientation:
|
|
60
|
-
textAlign:
|
|
61
|
-
variant:
|
|
62
|
-
} =
|
|
63
|
-
return
|
|
64
|
-
root: ["root",
|
|
65
|
-
wrapper: ["wrapper",
|
|
66
|
-
},
|
|
67
|
-
},
|
|
7
|
+
absolute: t,
|
|
8
|
+
children: r,
|
|
9
|
+
classes: s,
|
|
10
|
+
flexItem: p,
|
|
11
|
+
light: n,
|
|
12
|
+
orientation: o,
|
|
13
|
+
textAlign: a,
|
|
14
|
+
variant: l
|
|
15
|
+
} = e;
|
|
16
|
+
return S({
|
|
17
|
+
root: ["root", t && "absolute", l, n && "light", o === "vertical" && "vertical", p && "flexItem", r && "withChildren", r && o === "vertical" && "withChildrenVertical", a === "right" && o !== "vertical" && "textAlignRight", a === "left" && o !== "vertical" && "textAlignLeft"],
|
|
18
|
+
wrapper: ["wrapper", o === "vertical" && "wrapperVertical"]
|
|
19
|
+
}, C, s);
|
|
20
|
+
}, O = b("div", {
|
|
68
21
|
name: "MuiDivider",
|
|
69
22
|
slot: "Root",
|
|
70
|
-
overridesResolver: (
|
|
23
|
+
overridesResolver: (e, t) => {
|
|
71
24
|
const {
|
|
72
|
-
ownerState:
|
|
73
|
-
} =
|
|
74
|
-
return [
|
|
25
|
+
ownerState: r
|
|
26
|
+
} = e;
|
|
27
|
+
return [t.root, r.absolute && t.absolute, t[r.variant], r.light && t.light, r.orientation === "vertical" && t.vertical, r.flexItem && t.flexItem, r.children && t.withChildren, r.children && r.orientation === "vertical" && t.withChildrenVertical, r.textAlign === "right" && r.orientation !== "vertical" && t.textAlignRight, r.textAlign === "left" && r.orientation !== "vertical" && t.textAlignLeft];
|
|
75
28
|
}
|
|
76
|
-
})(
|
|
77
|
-
theme:
|
|
29
|
+
})(u(({
|
|
30
|
+
theme: e
|
|
78
31
|
}) => ({
|
|
79
32
|
margin: 0,
|
|
80
33
|
// Reset browser default style.
|
|
81
34
|
flexShrink: 0,
|
|
82
35
|
borderWidth: 0,
|
|
83
36
|
borderStyle: "solid",
|
|
84
|
-
borderColor: (
|
|
37
|
+
borderColor: (e.vars || e).palette.divider,
|
|
85
38
|
borderBottomWidth: "thin",
|
|
86
39
|
variants: [{
|
|
87
40
|
props: {
|
|
@@ -98,7 +51,7 @@ const W = (t) => {
|
|
|
98
51
|
light: !0
|
|
99
52
|
},
|
|
100
53
|
style: {
|
|
101
|
-
borderColor:
|
|
54
|
+
borderColor: e.vars ? `rgba(${e.vars.palette.dividerChannel} / 0.08)` : D(e.palette.divider, 0.08)
|
|
102
55
|
}
|
|
103
56
|
}, {
|
|
104
57
|
props: {
|
|
@@ -113,8 +66,8 @@ const W = (t) => {
|
|
|
113
66
|
orientation: "horizontal"
|
|
114
67
|
},
|
|
115
68
|
style: {
|
|
116
|
-
marginLeft:
|
|
117
|
-
marginRight:
|
|
69
|
+
marginLeft: e.spacing(2),
|
|
70
|
+
marginRight: e.spacing(2)
|
|
118
71
|
}
|
|
119
72
|
}, {
|
|
120
73
|
props: {
|
|
@@ -122,8 +75,8 @@ const W = (t) => {
|
|
|
122
75
|
orientation: "vertical"
|
|
123
76
|
},
|
|
124
77
|
style: {
|
|
125
|
-
marginTop:
|
|
126
|
-
marginBottom:
|
|
78
|
+
marginTop: e.spacing(1),
|
|
79
|
+
marginBottom: e.spacing(1)
|
|
127
80
|
}
|
|
128
81
|
}, {
|
|
129
82
|
props: {
|
|
@@ -144,8 +97,8 @@ const W = (t) => {
|
|
|
144
97
|
}
|
|
145
98
|
}, {
|
|
146
99
|
props: ({
|
|
147
|
-
ownerState:
|
|
148
|
-
}) => !!
|
|
100
|
+
ownerState: t
|
|
101
|
+
}) => !!t.children,
|
|
149
102
|
style: {
|
|
150
103
|
display: "flex",
|
|
151
104
|
textAlign: "center",
|
|
@@ -159,31 +112,31 @@ const W = (t) => {
|
|
|
159
112
|
}
|
|
160
113
|
}, {
|
|
161
114
|
props: ({
|
|
162
|
-
ownerState:
|
|
163
|
-
}) =>
|
|
115
|
+
ownerState: t
|
|
116
|
+
}) => t.children && t.orientation !== "vertical",
|
|
164
117
|
style: {
|
|
165
118
|
"&::before, &::after": {
|
|
166
119
|
width: "100%",
|
|
167
|
-
borderTop: `thin solid ${(
|
|
120
|
+
borderTop: `thin solid ${(e.vars || e).palette.divider}`,
|
|
168
121
|
borderTopStyle: "inherit"
|
|
169
122
|
}
|
|
170
123
|
}
|
|
171
124
|
}, {
|
|
172
125
|
props: ({
|
|
173
|
-
ownerState:
|
|
174
|
-
}) =>
|
|
126
|
+
ownerState: t
|
|
127
|
+
}) => t.orientation === "vertical" && t.children,
|
|
175
128
|
style: {
|
|
176
129
|
flexDirection: "column",
|
|
177
130
|
"&::before, &::after": {
|
|
178
131
|
height: "100%",
|
|
179
|
-
borderLeft: `thin solid ${(
|
|
132
|
+
borderLeft: `thin solid ${(e.vars || e).palette.divider}`,
|
|
180
133
|
borderLeftStyle: "inherit"
|
|
181
134
|
}
|
|
182
135
|
}
|
|
183
136
|
}, {
|
|
184
137
|
props: ({
|
|
185
|
-
ownerState:
|
|
186
|
-
}) =>
|
|
138
|
+
ownerState: t
|
|
139
|
+
}) => t.textAlign === "right" && t.orientation !== "vertical",
|
|
187
140
|
style: {
|
|
188
141
|
"&::before": {
|
|
189
142
|
width: "90%"
|
|
@@ -194,8 +147,8 @@ const W = (t) => {
|
|
|
194
147
|
}
|
|
195
148
|
}, {
|
|
196
149
|
props: ({
|
|
197
|
-
ownerState:
|
|
198
|
-
}) =>
|
|
150
|
+
ownerState: t
|
|
151
|
+
}) => t.textAlign === "left" && t.orientation !== "vertical",
|
|
199
152
|
style: {
|
|
200
153
|
"&::before": {
|
|
201
154
|
width: "10%"
|
|
@@ -205,75 +158,75 @@ const W = (t) => {
|
|
|
205
158
|
}
|
|
206
159
|
}
|
|
207
160
|
}]
|
|
208
|
-
}))),
|
|
161
|
+
}))), W = b("span", {
|
|
209
162
|
name: "MuiDivider",
|
|
210
163
|
slot: "Wrapper",
|
|
211
|
-
overridesResolver: (
|
|
164
|
+
overridesResolver: (e, t) => {
|
|
212
165
|
const {
|
|
213
|
-
ownerState:
|
|
214
|
-
} =
|
|
215
|
-
return [
|
|
166
|
+
ownerState: r
|
|
167
|
+
} = e;
|
|
168
|
+
return [t.wrapper, r.orientation === "vertical" && t.wrapperVertical];
|
|
216
169
|
}
|
|
217
|
-
})(
|
|
218
|
-
theme:
|
|
170
|
+
})(u(({
|
|
171
|
+
theme: e
|
|
219
172
|
}) => ({
|
|
220
173
|
display: "inline-block",
|
|
221
|
-
paddingLeft: `calc(${
|
|
222
|
-
paddingRight: `calc(${
|
|
174
|
+
paddingLeft: `calc(${e.spacing(1)} * 1.2)`,
|
|
175
|
+
paddingRight: `calc(${e.spacing(1)} * 1.2)`,
|
|
223
176
|
whiteSpace: "nowrap",
|
|
224
177
|
variants: [{
|
|
225
178
|
props: {
|
|
226
179
|
orientation: "vertical"
|
|
227
180
|
},
|
|
228
181
|
style: {
|
|
229
|
-
paddingTop: `calc(${
|
|
230
|
-
paddingBottom: `calc(${
|
|
182
|
+
paddingTop: `calc(${e.spacing(1)} * 1.2)`,
|
|
183
|
+
paddingBottom: `calc(${e.spacing(1)} * 1.2)`
|
|
231
184
|
}
|
|
232
185
|
}]
|
|
233
|
-
}))),
|
|
234
|
-
const
|
|
235
|
-
props:
|
|
186
|
+
}))), f = /* @__PURE__ */ A.forwardRef(function(t, r) {
|
|
187
|
+
const s = T({
|
|
188
|
+
props: t,
|
|
236
189
|
name: "MuiDivider"
|
|
237
190
|
}), {
|
|
238
|
-
absolute:
|
|
239
|
-
children:
|
|
240
|
-
className:
|
|
241
|
-
orientation:
|
|
242
|
-
component:
|
|
243
|
-
flexItem:
|
|
244
|
-
light:
|
|
245
|
-
role:
|
|
246
|
-
textAlign:
|
|
247
|
-
variant:
|
|
248
|
-
...
|
|
249
|
-
} =
|
|
250
|
-
...
|
|
251
|
-
absolute:
|
|
252
|
-
component:
|
|
253
|
-
flexItem:
|
|
254
|
-
light:
|
|
255
|
-
orientation:
|
|
256
|
-
role:
|
|
257
|
-
textAlign:
|
|
258
|
-
variant:
|
|
259
|
-
},
|
|
260
|
-
return /* @__PURE__ */ v(
|
|
261
|
-
as:
|
|
262
|
-
className:
|
|
263
|
-
role:
|
|
264
|
-
ref:
|
|
265
|
-
ownerState:
|
|
266
|
-
"aria-orientation":
|
|
267
|
-
...
|
|
268
|
-
children:
|
|
269
|
-
className:
|
|
270
|
-
ownerState:
|
|
271
|
-
children:
|
|
191
|
+
absolute: p = !1,
|
|
192
|
+
children: n,
|
|
193
|
+
className: o,
|
|
194
|
+
orientation: a = "horizontal",
|
|
195
|
+
component: l = n || a === "vertical" ? "div" : "hr",
|
|
196
|
+
flexItem: g = !1,
|
|
197
|
+
light: m = !1,
|
|
198
|
+
role: c = l !== "hr" ? "separator" : void 0,
|
|
199
|
+
textAlign: x = "center",
|
|
200
|
+
variant: w = "fullWidth",
|
|
201
|
+
...y
|
|
202
|
+
} = s, d = {
|
|
203
|
+
...s,
|
|
204
|
+
absolute: p,
|
|
205
|
+
component: l,
|
|
206
|
+
flexItem: g,
|
|
207
|
+
light: m,
|
|
208
|
+
orientation: a,
|
|
209
|
+
role: c,
|
|
210
|
+
textAlign: x,
|
|
211
|
+
variant: w
|
|
212
|
+
}, h = L(d);
|
|
213
|
+
return /* @__PURE__ */ v(O, {
|
|
214
|
+
as: l,
|
|
215
|
+
className: R(h.root, o),
|
|
216
|
+
role: c,
|
|
217
|
+
ref: r,
|
|
218
|
+
ownerState: d,
|
|
219
|
+
"aria-orientation": c === "separator" && (l !== "hr" || a === "vertical") ? a : void 0,
|
|
220
|
+
...y,
|
|
221
|
+
children: n ? /* @__PURE__ */ v(W, {
|
|
222
|
+
className: h.wrapper,
|
|
223
|
+
ownerState: d,
|
|
224
|
+
children: n
|
|
272
225
|
}) : null
|
|
273
226
|
});
|
|
274
227
|
});
|
|
275
|
-
|
|
276
|
-
process.env.NODE_ENV !== "production" && (
|
|
228
|
+
f && (f.muiSkipListHighlight = !0);
|
|
229
|
+
process.env.NODE_ENV !== "production" && (f.propTypes = {
|
|
277
230
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
278
231
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
279
232
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -282,62 +235,60 @@ process.env.NODE_ENV !== "production" && (h.propTypes = {
|
|
|
282
235
|
* Absolutely position the element.
|
|
283
236
|
* @default false
|
|
284
237
|
*/
|
|
285
|
-
absolute:
|
|
238
|
+
absolute: i.bool,
|
|
286
239
|
/**
|
|
287
240
|
* The content of the component.
|
|
288
241
|
*/
|
|
289
|
-
children:
|
|
242
|
+
children: i.node,
|
|
290
243
|
/**
|
|
291
244
|
* Override or extend the styles applied to the component.
|
|
292
245
|
*/
|
|
293
|
-
classes:
|
|
246
|
+
classes: i.object,
|
|
294
247
|
/**
|
|
295
248
|
* @ignore
|
|
296
249
|
*/
|
|
297
|
-
className:
|
|
250
|
+
className: i.string,
|
|
298
251
|
/**
|
|
299
252
|
* The component used for the root node.
|
|
300
253
|
* Either a string to use a HTML element or a component.
|
|
301
254
|
*/
|
|
302
|
-
component:
|
|
255
|
+
component: i.elementType,
|
|
303
256
|
/**
|
|
304
257
|
* If `true`, a vertical divider will have the correct height when used in flex container.
|
|
305
258
|
* (By default, a vertical divider will have a calculated height of `0px` if it is the child of a flex container.)
|
|
306
259
|
* @default false
|
|
307
260
|
*/
|
|
308
|
-
flexItem:
|
|
261
|
+
flexItem: i.bool,
|
|
309
262
|
/**
|
|
310
263
|
* If `true`, the divider will have a lighter color.
|
|
311
264
|
* @default false
|
|
312
265
|
* @deprecated Use <Divider sx={{ opacity: 0.6 }} /> (or any opacity or color) instead. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
313
266
|
*/
|
|
314
|
-
light:
|
|
267
|
+
light: i.bool,
|
|
315
268
|
/**
|
|
316
269
|
* The component orientation.
|
|
317
270
|
* @default 'horizontal'
|
|
318
271
|
*/
|
|
319
|
-
orientation:
|
|
272
|
+
orientation: i.oneOf(["horizontal", "vertical"]),
|
|
320
273
|
/**
|
|
321
274
|
* @ignore
|
|
322
275
|
*/
|
|
323
|
-
role:
|
|
276
|
+
role: i.string,
|
|
324
277
|
/**
|
|
325
278
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
326
279
|
*/
|
|
327
|
-
sx:
|
|
280
|
+
sx: i.oneOfType([i.arrayOf(i.oneOfType([i.func, i.object, i.bool])), i.func, i.object]),
|
|
328
281
|
/**
|
|
329
282
|
* The text alignment.
|
|
330
283
|
* @default 'center'
|
|
331
284
|
*/
|
|
332
|
-
textAlign:
|
|
285
|
+
textAlign: i.oneOf(["center", "left", "right"]),
|
|
333
286
|
/**
|
|
334
287
|
* The variant to use.
|
|
335
288
|
* @default 'fullWidth'
|
|
336
289
|
*/
|
|
337
|
-
variant:
|
|
290
|
+
variant: i.oneOfType([i.oneOf(["fullWidth", "inset", "middle"]), i.string])
|
|
338
291
|
});
|
|
339
292
|
export {
|
|
340
|
-
|
|
341
|
-
k as a,
|
|
342
|
-
z as u
|
|
293
|
+
f as D
|
|
343
294
|
};
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import * as c from "react";
|
|
2
|
+
import { P as t } from "./DefaultPropsProvider.js";
|
|
3
|
+
import { jsx as K } from "react/jsx-runtime";
|
|
4
|
+
import { u as W } from "./useTheme.js";
|
|
5
|
+
import { T as k, r as B, g as A } from "./utils.js";
|
|
6
|
+
import { u as J } from "./ButtonBase.js";
|
|
7
|
+
import { u as M } from "./resolveComponentProps.js";
|
|
8
|
+
import { g as Q, e as U } from "./Portal.js";
|
|
9
|
+
const X = /* @__PURE__ */ c.createContext();
|
|
10
|
+
process.env.NODE_ENV !== "production" && (t.node, t.bool);
|
|
11
|
+
const st = () => c.useContext(X) ?? !1;
|
|
12
|
+
function h(d) {
|
|
13
|
+
return `scale(${d}, ${d ** 2})`;
|
|
14
|
+
}
|
|
15
|
+
const Y = {
|
|
16
|
+
entering: {
|
|
17
|
+
opacity: 1,
|
|
18
|
+
transform: h(1)
|
|
19
|
+
},
|
|
20
|
+
entered: {
|
|
21
|
+
opacity: 1,
|
|
22
|
+
transform: "none"
|
|
23
|
+
}
|
|
24
|
+
}, E = typeof navigator < "u" && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)4/i.test(navigator.userAgent), y = /* @__PURE__ */ c.forwardRef(function(D, w) {
|
|
25
|
+
const {
|
|
26
|
+
addEndListener: x,
|
|
27
|
+
appear: C = !0,
|
|
28
|
+
children: m,
|
|
29
|
+
easing: R,
|
|
30
|
+
in: T,
|
|
31
|
+
onEnter: v,
|
|
32
|
+
onEntered: L,
|
|
33
|
+
onEntering: O,
|
|
34
|
+
onExit: b,
|
|
35
|
+
onExited: j,
|
|
36
|
+
onExiting: H,
|
|
37
|
+
style: p,
|
|
38
|
+
timeout: i = "auto",
|
|
39
|
+
// eslint-disable-next-line react/prop-types
|
|
40
|
+
TransitionComponent: N = k,
|
|
41
|
+
...P
|
|
42
|
+
} = D, F = J(), g = c.useRef(), s = W(), f = c.useRef(null), G = M(f, Q(m), w), a = (n) => (r) => {
|
|
43
|
+
if (n) {
|
|
44
|
+
const e = f.current;
|
|
45
|
+
r === void 0 ? n(e) : n(e, r);
|
|
46
|
+
}
|
|
47
|
+
}, S = a(O), _ = a((n, r) => {
|
|
48
|
+
B(n);
|
|
49
|
+
const {
|
|
50
|
+
duration: e,
|
|
51
|
+
delay: l,
|
|
52
|
+
easing: o
|
|
53
|
+
} = A({
|
|
54
|
+
style: p,
|
|
55
|
+
timeout: i,
|
|
56
|
+
easing: R
|
|
57
|
+
}, {
|
|
58
|
+
mode: "enter"
|
|
59
|
+
});
|
|
60
|
+
let u;
|
|
61
|
+
i === "auto" ? (u = s.transitions.getAutoHeightDuration(n.clientHeight), g.current = u) : u = e, n.style.transition = [s.transitions.create("opacity", {
|
|
62
|
+
duration: u,
|
|
63
|
+
delay: l
|
|
64
|
+
}), s.transitions.create("transform", {
|
|
65
|
+
duration: E ? u : u * 0.666,
|
|
66
|
+
delay: l,
|
|
67
|
+
easing: o
|
|
68
|
+
})].join(","), v && v(n, r);
|
|
69
|
+
}), V = a(L), $ = a(H), q = a((n) => {
|
|
70
|
+
const {
|
|
71
|
+
duration: r,
|
|
72
|
+
delay: e,
|
|
73
|
+
easing: l
|
|
74
|
+
} = A({
|
|
75
|
+
style: p,
|
|
76
|
+
timeout: i,
|
|
77
|
+
easing: R
|
|
78
|
+
}, {
|
|
79
|
+
mode: "exit"
|
|
80
|
+
});
|
|
81
|
+
let o;
|
|
82
|
+
i === "auto" ? (o = s.transitions.getAutoHeightDuration(n.clientHeight), g.current = o) : o = r, n.style.transition = [s.transitions.create("opacity", {
|
|
83
|
+
duration: o,
|
|
84
|
+
delay: e
|
|
85
|
+
}), s.transitions.create("transform", {
|
|
86
|
+
duration: E ? o : o * 0.666,
|
|
87
|
+
delay: E ? e : e || o * 0.333,
|
|
88
|
+
easing: l
|
|
89
|
+
})].join(","), n.style.opacity = 0, n.style.transform = h(0.75), b && b(n);
|
|
90
|
+
}), z = a(j);
|
|
91
|
+
return /* @__PURE__ */ K(N, {
|
|
92
|
+
appear: C,
|
|
93
|
+
in: T,
|
|
94
|
+
nodeRef: f,
|
|
95
|
+
onEnter: _,
|
|
96
|
+
onEntered: V,
|
|
97
|
+
onEntering: S,
|
|
98
|
+
onExit: q,
|
|
99
|
+
onExited: z,
|
|
100
|
+
onExiting: $,
|
|
101
|
+
addEndListener: (n) => {
|
|
102
|
+
i === "auto" && F.start(g.current || 0, n), x && x(f.current, n);
|
|
103
|
+
},
|
|
104
|
+
timeout: i === "auto" ? null : i,
|
|
105
|
+
...P,
|
|
106
|
+
children: (n, {
|
|
107
|
+
ownerState: r,
|
|
108
|
+
...e
|
|
109
|
+
}) => /* @__PURE__ */ c.cloneElement(m, {
|
|
110
|
+
style: {
|
|
111
|
+
opacity: 0,
|
|
112
|
+
transform: h(0.75),
|
|
113
|
+
visibility: n === "exited" && !T ? "hidden" : void 0,
|
|
114
|
+
...Y[n],
|
|
115
|
+
...p,
|
|
116
|
+
...m.props.style
|
|
117
|
+
},
|
|
118
|
+
ref: G,
|
|
119
|
+
...e
|
|
120
|
+
})
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
process.env.NODE_ENV !== "production" && (y.propTypes = {
|
|
124
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
125
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
126
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
127
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
128
|
+
/**
|
|
129
|
+
* Add a custom transition end trigger. Called with the transitioning DOM
|
|
130
|
+
* node and a done callback. Allows for more fine grained transition end
|
|
131
|
+
* logic. Note: Timeouts are still used as a fallback if provided.
|
|
132
|
+
*/
|
|
133
|
+
addEndListener: t.func,
|
|
134
|
+
/**
|
|
135
|
+
* Perform the enter transition when it first mounts if `in` is also `true`.
|
|
136
|
+
* Set this to `false` to disable this behavior.
|
|
137
|
+
* @default true
|
|
138
|
+
*/
|
|
139
|
+
appear: t.bool,
|
|
140
|
+
/**
|
|
141
|
+
* A single child content element.
|
|
142
|
+
*/
|
|
143
|
+
children: U.isRequired,
|
|
144
|
+
/**
|
|
145
|
+
* The transition timing function.
|
|
146
|
+
* You may specify a single easing or a object containing enter and exit values.
|
|
147
|
+
*/
|
|
148
|
+
easing: t.oneOfType([t.shape({
|
|
149
|
+
enter: t.string,
|
|
150
|
+
exit: t.string
|
|
151
|
+
}), t.string]),
|
|
152
|
+
/**
|
|
153
|
+
* If `true`, the component will transition in.
|
|
154
|
+
*/
|
|
155
|
+
in: t.bool,
|
|
156
|
+
/**
|
|
157
|
+
* @ignore
|
|
158
|
+
*/
|
|
159
|
+
onEnter: t.func,
|
|
160
|
+
/**
|
|
161
|
+
* @ignore
|
|
162
|
+
*/
|
|
163
|
+
onEntered: t.func,
|
|
164
|
+
/**
|
|
165
|
+
* @ignore
|
|
166
|
+
*/
|
|
167
|
+
onEntering: t.func,
|
|
168
|
+
/**
|
|
169
|
+
* @ignore
|
|
170
|
+
*/
|
|
171
|
+
onExit: t.func,
|
|
172
|
+
/**
|
|
173
|
+
* @ignore
|
|
174
|
+
*/
|
|
175
|
+
onExited: t.func,
|
|
176
|
+
/**
|
|
177
|
+
* @ignore
|
|
178
|
+
*/
|
|
179
|
+
onExiting: t.func,
|
|
180
|
+
/**
|
|
181
|
+
* @ignore
|
|
182
|
+
*/
|
|
183
|
+
style: t.object,
|
|
184
|
+
/**
|
|
185
|
+
* The duration for the transition, in milliseconds.
|
|
186
|
+
* You may specify a single timeout for all transitions, or individually with an object.
|
|
187
|
+
*
|
|
188
|
+
* Set to 'auto' to automatically calculate transition time based on height.
|
|
189
|
+
* @default 'auto'
|
|
190
|
+
*/
|
|
191
|
+
timeout: t.oneOfType([t.oneOf(["auto"]), t.number, t.shape({
|
|
192
|
+
appear: t.number,
|
|
193
|
+
enter: t.number,
|
|
194
|
+
exit: t.number
|
|
195
|
+
})])
|
|
196
|
+
});
|
|
197
|
+
y && (y.muiSupportAuto = !0);
|
|
198
|
+
export {
|
|
199
|
+
y as G,
|
|
200
|
+
st as u
|
|
201
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as c from "react";
|
|
2
|
-
import { g as z,
|
|
2
|
+
import { g as z, e as R, s as I, h as a, m as g, a as f, u as O, c as C, P as e, b as h } from "./DefaultPropsProvider.js";
|
|
3
3
|
import { c as y } from "./createSimplePaletteValueFilter.js";
|
|
4
4
|
import { jsx as T } from "react/jsx-runtime";
|
|
5
5
|
import { B as S, c as $ } from "./ButtonBase.js";
|