@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
|
@@ -1,31 +1,33 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as x, jsx as n, Fragment as ne } from "react/jsx-runtime";
|
|
2
2
|
import { g as we, a as Ce } from "../../assets/channelUtils.js";
|
|
3
|
+
import { getThemeColors as ke } from "../../utils/theme.js";
|
|
4
|
+
import { B as Se, r as W, b as Re, u as xe } from "../../assets/ButtonBase.js";
|
|
3
5
|
import { T as _ } from "../../assets/Typography.js";
|
|
4
|
-
import * as
|
|
5
|
-
import {
|
|
6
|
+
import * as v from "react";
|
|
7
|
+
import { g as L, P as o, e as w, a as A, o as Oe, n as $e } from "../../assets/createTheme.js";
|
|
8
|
+
import { g as q, s as C, r as ee, c as j, a as D, m as I, u as H } from "../../assets/DefaultPropsProvider.js";
|
|
6
9
|
import { c as Q } from "../../assets/createSimplePaletteValueFilter.js";
|
|
7
|
-
import { u as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
function Ne(e) {
|
|
10
|
+
import { u as X, f as ue, c as Pe, S as Te } from "../../assets/Stack.js";
|
|
11
|
+
import { a as fe, u as Fe } from "../../assets/dividerClasses.js";
|
|
12
|
+
import { u as Ne } from "../../assets/resolveComponentProps.js";
|
|
13
|
+
import { c as he } from "../../assets/createSvgIcon.js";
|
|
14
|
+
import { D as Be } from "../../assets/Divider.js";
|
|
15
|
+
function Ie(e) {
|
|
14
16
|
return L("PrivateSwitchBase", e);
|
|
15
17
|
}
|
|
16
18
|
q("PrivateSwitchBase", ["root", "checked", "disabled", "input", "edgeStart", "edgeEnd"]);
|
|
17
|
-
const
|
|
19
|
+
const ze = (e) => {
|
|
18
20
|
const {
|
|
19
21
|
classes: t,
|
|
20
22
|
checked: r,
|
|
21
|
-
disabled:
|
|
22
|
-
edge:
|
|
23
|
+
disabled: s,
|
|
24
|
+
edge: a
|
|
23
25
|
} = e, c = {
|
|
24
|
-
root: ["root", r && "checked",
|
|
26
|
+
root: ["root", r && "checked", s && "disabled", a && `edge${w(a)}`],
|
|
25
27
|
input: ["input"]
|
|
26
28
|
};
|
|
27
|
-
return D(c,
|
|
28
|
-
},
|
|
29
|
+
return D(c, Ie, t);
|
|
30
|
+
}, je = C(Se)({
|
|
29
31
|
padding: 9,
|
|
30
32
|
borderRadius: "50%",
|
|
31
33
|
variants: [{
|
|
@@ -61,7 +63,7 @@ const Be = (e) => {
|
|
|
61
63
|
marginRight: -12
|
|
62
64
|
}
|
|
63
65
|
}]
|
|
64
|
-
}),
|
|
66
|
+
}), Me = C("input", {
|
|
65
67
|
shouldForwardProp: ee
|
|
66
68
|
})({
|
|
67
69
|
cursor: "inherit",
|
|
@@ -74,87 +76,87 @@ const Be = (e) => {
|
|
|
74
76
|
margin: 0,
|
|
75
77
|
padding: 0,
|
|
76
78
|
zIndex: 1
|
|
77
|
-
}), oe = /* @__PURE__ */
|
|
79
|
+
}), oe = /* @__PURE__ */ v.forwardRef(function(t, r) {
|
|
78
80
|
const {
|
|
79
|
-
autoFocus:
|
|
80
|
-
checked:
|
|
81
|
+
autoFocus: s,
|
|
82
|
+
checked: a,
|
|
81
83
|
checkedIcon: c,
|
|
82
|
-
className:
|
|
84
|
+
className: i,
|
|
83
85
|
defaultChecked: u,
|
|
84
|
-
disabled:
|
|
85
|
-
disableFocusRipple:
|
|
86
|
-
edge:
|
|
87
|
-
icon:
|
|
88
|
-
id:
|
|
89
|
-
inputProps:
|
|
90
|
-
inputRef:
|
|
91
|
-
name:
|
|
92
|
-
onBlur:
|
|
93
|
-
onChange:
|
|
94
|
-
onFocus:
|
|
95
|
-
readOnly:
|
|
86
|
+
disabled: d,
|
|
87
|
+
disableFocusRipple: m = !1,
|
|
88
|
+
edge: f = !1,
|
|
89
|
+
icon: p,
|
|
90
|
+
id: b,
|
|
91
|
+
inputProps: l,
|
|
92
|
+
inputRef: R,
|
|
93
|
+
name: k,
|
|
94
|
+
onBlur: h,
|
|
95
|
+
onChange: T,
|
|
96
|
+
onFocus: g,
|
|
97
|
+
readOnly: F,
|
|
96
98
|
required: O = !1,
|
|
97
99
|
tabIndex: M,
|
|
98
|
-
type:
|
|
100
|
+
type: S,
|
|
99
101
|
value: G,
|
|
100
|
-
...
|
|
102
|
+
...K
|
|
101
103
|
} = t, [z, U] = fe({
|
|
102
|
-
controlled:
|
|
104
|
+
controlled: a,
|
|
103
105
|
default: !!u,
|
|
104
106
|
name: "SwitchBase",
|
|
105
107
|
state: "checked"
|
|
106
|
-
}),
|
|
107
|
-
|
|
108
|
-
}, E = (
|
|
109
|
-
|
|
110
|
-
}, B = (
|
|
111
|
-
if (
|
|
108
|
+
}), $ = X(), Z = (N) => {
|
|
109
|
+
g && g(N), $ && $.onFocus && $.onFocus(N);
|
|
110
|
+
}, E = (N) => {
|
|
111
|
+
h && h(N), $ && $.onBlur && $.onBlur(N);
|
|
112
|
+
}, B = (N) => {
|
|
113
|
+
if (N.nativeEvent.defaultPrevented)
|
|
112
114
|
return;
|
|
113
|
-
const
|
|
114
|
-
U(
|
|
115
|
+
const ae = N.target.checked;
|
|
116
|
+
U(ae), T && T(N, ae);
|
|
115
117
|
};
|
|
116
|
-
let
|
|
117
|
-
|
|
118
|
-
const ve =
|
|
118
|
+
let P = d;
|
|
119
|
+
$ && typeof P > "u" && (P = $.disabled);
|
|
120
|
+
const ve = S === "checkbox" || S === "radio", J = {
|
|
119
121
|
...t,
|
|
120
122
|
checked: z,
|
|
121
|
-
disabled:
|
|
122
|
-
disableFocusRipple:
|
|
123
|
-
edge:
|
|
124
|
-
},
|
|
125
|
-
return /* @__PURE__ */
|
|
123
|
+
disabled: P,
|
|
124
|
+
disableFocusRipple: m,
|
|
125
|
+
edge: f
|
|
126
|
+
}, se = ze(J);
|
|
127
|
+
return /* @__PURE__ */ x(je, {
|
|
126
128
|
component: "span",
|
|
127
|
-
className: j(
|
|
129
|
+
className: j(se.root, i),
|
|
128
130
|
centerRipple: !0,
|
|
129
|
-
focusRipple: !
|
|
130
|
-
disabled:
|
|
131
|
+
focusRipple: !m,
|
|
132
|
+
disabled: P,
|
|
131
133
|
tabIndex: null,
|
|
132
134
|
role: void 0,
|
|
133
|
-
onFocus:
|
|
135
|
+
onFocus: Z,
|
|
134
136
|
onBlur: E,
|
|
135
|
-
ownerState:
|
|
137
|
+
ownerState: J,
|
|
136
138
|
ref: r,
|
|
137
|
-
...
|
|
138
|
-
children: [/* @__PURE__ */
|
|
139
|
-
autoFocus:
|
|
140
|
-
checked:
|
|
139
|
+
...K,
|
|
140
|
+
children: [/* @__PURE__ */ n(Me, {
|
|
141
|
+
autoFocus: s,
|
|
142
|
+
checked: a,
|
|
141
143
|
defaultChecked: u,
|
|
142
|
-
className:
|
|
143
|
-
disabled:
|
|
144
|
-
id: ve ?
|
|
145
|
-
name:
|
|
144
|
+
className: se.input,
|
|
145
|
+
disabled: P,
|
|
146
|
+
id: ve ? b : void 0,
|
|
147
|
+
name: k,
|
|
146
148
|
onChange: B,
|
|
147
|
-
readOnly:
|
|
148
|
-
ref:
|
|
149
|
+
readOnly: F,
|
|
150
|
+
ref: R,
|
|
149
151
|
required: O,
|
|
150
|
-
ownerState:
|
|
152
|
+
ownerState: J,
|
|
151
153
|
tabIndex: M,
|
|
152
|
-
type:
|
|
153
|
-
...
|
|
154
|
+
type: S,
|
|
155
|
+
...S === "checkbox" && G === void 0 ? {} : {
|
|
154
156
|
value: G
|
|
155
157
|
},
|
|
156
|
-
...
|
|
157
|
-
}), z ? c :
|
|
158
|
+
...l
|
|
159
|
+
}), z ? c : p]
|
|
158
160
|
});
|
|
159
161
|
});
|
|
160
162
|
process.env.NODE_ENV !== "production" && (oe.propTypes = {
|
|
@@ -214,7 +216,7 @@ process.env.NODE_ENV !== "production" && (oe.propTypes = {
|
|
|
214
216
|
/**
|
|
215
217
|
* Pass a ref to the `input` element.
|
|
216
218
|
*/
|
|
217
|
-
inputRef:
|
|
219
|
+
inputRef: W,
|
|
218
220
|
/*
|
|
219
221
|
* @ignore
|
|
220
222
|
*/
|
|
@@ -260,23 +262,23 @@ process.env.NODE_ENV !== "production" && (oe.propTypes = {
|
|
|
260
262
|
*/
|
|
261
263
|
value: o.any
|
|
262
264
|
});
|
|
263
|
-
function
|
|
265
|
+
function Ee(e) {
|
|
264
266
|
return L("MuiFormControlLabel", e);
|
|
265
267
|
}
|
|
266
|
-
const V = q("MuiFormControlLabel", ["root", "labelPlacementStart", "labelPlacementTop", "labelPlacementBottom", "disabled", "label", "error", "required", "asterisk"]),
|
|
268
|
+
const V = q("MuiFormControlLabel", ["root", "labelPlacementStart", "labelPlacementTop", "labelPlacementBottom", "disabled", "label", "error", "required", "asterisk"]), Le = (e) => {
|
|
267
269
|
const {
|
|
268
270
|
classes: t,
|
|
269
271
|
disabled: r,
|
|
270
|
-
labelPlacement:
|
|
271
|
-
error:
|
|
272
|
+
labelPlacement: s,
|
|
273
|
+
error: a,
|
|
272
274
|
required: c
|
|
273
|
-
} = e,
|
|
274
|
-
root: ["root", r && "disabled", `labelPlacement${
|
|
275
|
+
} = e, i = {
|
|
276
|
+
root: ["root", r && "disabled", `labelPlacement${w(s)}`, a && "error", c && "required"],
|
|
275
277
|
label: ["label", r && "disabled"],
|
|
276
|
-
asterisk: ["asterisk",
|
|
278
|
+
asterisk: ["asterisk", a && "error"]
|
|
277
279
|
};
|
|
278
|
-
return D(
|
|
279
|
-
},
|
|
280
|
+
return D(i, Ee, t);
|
|
281
|
+
}, qe = C("label", {
|
|
280
282
|
name: "MuiFormControlLabel",
|
|
281
283
|
slot: "Root",
|
|
282
284
|
overridesResolver: (e, t) => {
|
|
@@ -285,7 +287,7 @@ const V = q("MuiFormControlLabel", ["root", "labelPlacementStart", "labelPlaceme
|
|
|
285
287
|
} = e;
|
|
286
288
|
return [{
|
|
287
289
|
[`& .${V.label}`]: t.label
|
|
288
|
-
}, t.root, t[`labelPlacement${
|
|
290
|
+
}, t.root, t[`labelPlacement${w(r.labelPlacement)}`]];
|
|
289
291
|
}
|
|
290
292
|
})(I(({
|
|
291
293
|
theme: e
|
|
@@ -338,7 +340,7 @@ const V = q("MuiFormControlLabel", ["root", "labelPlacementStart", "labelPlaceme
|
|
|
338
340
|
// used for row presentation of radio/checkbox
|
|
339
341
|
}
|
|
340
342
|
}]
|
|
341
|
-
}))),
|
|
343
|
+
}))), De = C("span", {
|
|
342
344
|
name: "MuiFormControlLabel",
|
|
343
345
|
slot: "Asterisk",
|
|
344
346
|
overridesResolver: (e, t) => t.asterisk
|
|
@@ -348,68 +350,68 @@ const V = q("MuiFormControlLabel", ["root", "labelPlacementStart", "labelPlaceme
|
|
|
348
350
|
[`&.${V.error}`]: {
|
|
349
351
|
color: (e.vars || e).palette.error.main
|
|
350
352
|
}
|
|
351
|
-
}))),
|
|
352
|
-
const
|
|
353
|
+
}))), me = /* @__PURE__ */ v.forwardRef(function(t, r) {
|
|
354
|
+
const s = H({
|
|
353
355
|
props: t,
|
|
354
356
|
name: "MuiFormControlLabel"
|
|
355
357
|
}), {
|
|
356
|
-
checked:
|
|
358
|
+
checked: a,
|
|
357
359
|
className: c,
|
|
358
|
-
componentsProps:
|
|
360
|
+
componentsProps: i = {},
|
|
359
361
|
control: u,
|
|
360
|
-
disabled:
|
|
361
|
-
disableTypography:
|
|
362
|
-
inputRef:
|
|
363
|
-
label:
|
|
364
|
-
labelPlacement:
|
|
365
|
-
name:
|
|
366
|
-
onChange:
|
|
367
|
-
required:
|
|
368
|
-
slots:
|
|
369
|
-
slotProps:
|
|
370
|
-
value:
|
|
371
|
-
...
|
|
372
|
-
} =
|
|
362
|
+
disabled: d,
|
|
363
|
+
disableTypography: m,
|
|
364
|
+
inputRef: f,
|
|
365
|
+
label: p,
|
|
366
|
+
labelPlacement: b = "end",
|
|
367
|
+
name: l,
|
|
368
|
+
onChange: R,
|
|
369
|
+
required: k,
|
|
370
|
+
slots: h = {},
|
|
371
|
+
slotProps: T = {},
|
|
372
|
+
value: g,
|
|
373
|
+
...F
|
|
374
|
+
} = s, O = X(), M = d ?? u.props.disabled ?? (O == null ? void 0 : O.disabled), S = k ?? u.props.required, G = {
|
|
373
375
|
disabled: M,
|
|
374
|
-
required:
|
|
376
|
+
required: S
|
|
375
377
|
};
|
|
376
|
-
["checked", "name", "onChange", "value", "inputRef"].forEach((
|
|
377
|
-
typeof u.props[
|
|
378
|
+
["checked", "name", "onChange", "value", "inputRef"].forEach((P) => {
|
|
379
|
+
typeof u.props[P] > "u" && typeof s[P] < "u" && (G[P] = s[P]);
|
|
378
380
|
});
|
|
379
|
-
const
|
|
380
|
-
props:
|
|
381
|
+
const K = ue({
|
|
382
|
+
props: s,
|
|
381
383
|
muiFormControl: O,
|
|
382
384
|
states: ["error"]
|
|
383
385
|
}), z = {
|
|
384
|
-
...
|
|
386
|
+
...s,
|
|
385
387
|
disabled: M,
|
|
386
|
-
labelPlacement:
|
|
387
|
-
required:
|
|
388
|
-
error:
|
|
389
|
-
}, U =
|
|
390
|
-
slots:
|
|
388
|
+
labelPlacement: b,
|
|
389
|
+
required: S,
|
|
390
|
+
error: K.error
|
|
391
|
+
}, U = Le(z), $ = {
|
|
392
|
+
slots: h,
|
|
391
393
|
slotProps: {
|
|
392
|
-
...
|
|
393
|
-
...
|
|
394
|
+
...i,
|
|
395
|
+
...T
|
|
394
396
|
}
|
|
395
|
-
}, [
|
|
397
|
+
}, [Z, E] = Re("typography", {
|
|
396
398
|
elementType: _,
|
|
397
|
-
externalForwardedProps:
|
|
399
|
+
externalForwardedProps: $,
|
|
398
400
|
ownerState: z
|
|
399
401
|
});
|
|
400
|
-
let B =
|
|
401
|
-
return B != null && B.type !== _ && !
|
|
402
|
+
let B = p;
|
|
403
|
+
return B != null && B.type !== _ && !m && (B = /* @__PURE__ */ n(Z, {
|
|
402
404
|
component: "span",
|
|
403
405
|
...E,
|
|
404
406
|
className: j(U.label, E == null ? void 0 : E.className),
|
|
405
407
|
children: B
|
|
406
|
-
})), /* @__PURE__ */
|
|
408
|
+
})), /* @__PURE__ */ x(qe, {
|
|
407
409
|
className: j(U.root, c),
|
|
408
410
|
ownerState: z,
|
|
409
411
|
ref: r,
|
|
410
|
-
...
|
|
411
|
-
children: [/* @__PURE__ */
|
|
412
|
-
children: [B, /* @__PURE__ */
|
|
412
|
+
...F,
|
|
413
|
+
children: [/* @__PURE__ */ v.cloneElement(u, G), S ? /* @__PURE__ */ x("div", {
|
|
414
|
+
children: [B, /* @__PURE__ */ x(De, {
|
|
413
415
|
ownerState: z,
|
|
414
416
|
"aria-hidden": !0,
|
|
415
417
|
className: U.asterisk,
|
|
@@ -418,7 +420,7 @@ const V = q("MuiFormControlLabel", ["root", "labelPlacementStart", "labelPlaceme
|
|
|
418
420
|
}) : B]
|
|
419
421
|
});
|
|
420
422
|
});
|
|
421
|
-
process.env.NODE_ENV !== "production" && (
|
|
423
|
+
process.env.NODE_ENV !== "production" && (me.propTypes = {
|
|
422
424
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
423
425
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
424
426
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -458,7 +460,7 @@ process.env.NODE_ENV !== "production" && (he.propTypes = {
|
|
|
458
460
|
/**
|
|
459
461
|
* Pass a ref to the `input` element.
|
|
460
462
|
*/
|
|
461
|
-
inputRef:
|
|
463
|
+
inputRef: W,
|
|
462
464
|
/**
|
|
463
465
|
* A text or an element to be used in an enclosing label element.
|
|
464
466
|
*/
|
|
@@ -506,20 +508,20 @@ process.env.NODE_ENV !== "production" && (he.propTypes = {
|
|
|
506
508
|
*/
|
|
507
509
|
value: o.any
|
|
508
510
|
});
|
|
509
|
-
function
|
|
511
|
+
function Ge(e) {
|
|
510
512
|
return L("MuiFormGroup", e);
|
|
511
513
|
}
|
|
512
514
|
q("MuiFormGroup", ["root", "row", "error"]);
|
|
513
|
-
const
|
|
515
|
+
const Ue = (e) => {
|
|
514
516
|
const {
|
|
515
517
|
classes: t,
|
|
516
518
|
row: r,
|
|
517
|
-
error:
|
|
519
|
+
error: s
|
|
518
520
|
} = e;
|
|
519
521
|
return D({
|
|
520
|
-
root: ["root", r && "row",
|
|
521
|
-
},
|
|
522
|
-
},
|
|
522
|
+
root: ["root", r && "row", s && "error"]
|
|
523
|
+
}, Ge, t);
|
|
524
|
+
}, Ve = C("div", {
|
|
523
525
|
name: "MuiFormGroup",
|
|
524
526
|
slot: "Root",
|
|
525
527
|
overridesResolver: (e, t) => {
|
|
@@ -540,31 +542,31 @@ const De = (e) => {
|
|
|
540
542
|
flexDirection: "row"
|
|
541
543
|
}
|
|
542
544
|
}]
|
|
543
|
-
}),
|
|
544
|
-
const
|
|
545
|
+
}), be = /* @__PURE__ */ v.forwardRef(function(t, r) {
|
|
546
|
+
const s = H({
|
|
545
547
|
props: t,
|
|
546
548
|
name: "MuiFormGroup"
|
|
547
549
|
}), {
|
|
548
|
-
className:
|
|
550
|
+
className: a,
|
|
549
551
|
row: c = !1,
|
|
550
|
-
...
|
|
551
|
-
} =
|
|
552
|
-
props:
|
|
552
|
+
...i
|
|
553
|
+
} = s, u = X(), d = ue({
|
|
554
|
+
props: s,
|
|
553
555
|
muiFormControl: u,
|
|
554
556
|
states: ["error"]
|
|
555
|
-
}),
|
|
556
|
-
...
|
|
557
|
+
}), m = {
|
|
558
|
+
...s,
|
|
557
559
|
row: c,
|
|
558
|
-
error:
|
|
559
|
-
},
|
|
560
|
-
return /* @__PURE__ */
|
|
561
|
-
className: j(
|
|
562
|
-
ownerState:
|
|
560
|
+
error: d.error
|
|
561
|
+
}, f = Ue(m);
|
|
562
|
+
return /* @__PURE__ */ n(Ve, {
|
|
563
|
+
className: j(f.root, a),
|
|
564
|
+
ownerState: m,
|
|
563
565
|
ref: r,
|
|
564
|
-
...
|
|
566
|
+
...i
|
|
565
567
|
});
|
|
566
568
|
});
|
|
567
|
-
process.env.NODE_ENV !== "production" && (
|
|
569
|
+
process.env.NODE_ENV !== "production" && (be.propTypes = {
|
|
568
570
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
569
571
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
570
572
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -591,19 +593,19 @@ process.env.NODE_ENV !== "production" && (me.propTypes = {
|
|
|
591
593
|
*/
|
|
592
594
|
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
|
|
593
595
|
});
|
|
594
|
-
const
|
|
596
|
+
const _e = he(/* @__PURE__ */ n("path", {
|
|
595
597
|
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
|
|
596
|
-
}), "RadioButtonUnchecked"),
|
|
598
|
+
}), "RadioButtonUnchecked"), Ae = he(/* @__PURE__ */ n("path", {
|
|
597
599
|
d: "M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"
|
|
598
|
-
}), "RadioButtonChecked"),
|
|
600
|
+
}), "RadioButtonChecked"), We = C("span", {
|
|
599
601
|
shouldForwardProp: ee
|
|
600
602
|
})({
|
|
601
603
|
position: "relative",
|
|
602
604
|
display: "flex"
|
|
603
|
-
}),
|
|
605
|
+
}), He = C(_e)({
|
|
604
606
|
// Scale applied to prevent dot misalignment in Safari
|
|
605
607
|
transform: "scale(1)"
|
|
606
|
-
}),
|
|
608
|
+
}), Xe = C(Ae)(I(({
|
|
607
609
|
theme: e
|
|
608
610
|
}) => ({
|
|
609
611
|
left: 0,
|
|
@@ -630,22 +632,22 @@ function te(e) {
|
|
|
630
632
|
const {
|
|
631
633
|
checked: t = !1,
|
|
632
634
|
classes: r = {},
|
|
633
|
-
fontSize:
|
|
634
|
-
} = e,
|
|
635
|
+
fontSize: s
|
|
636
|
+
} = e, a = {
|
|
635
637
|
...e,
|
|
636
638
|
checked: t
|
|
637
639
|
};
|
|
638
|
-
return /* @__PURE__ */
|
|
640
|
+
return /* @__PURE__ */ x(We, {
|
|
639
641
|
className: r.root,
|
|
640
|
-
ownerState:
|
|
641
|
-
children: [/* @__PURE__ */
|
|
642
|
-
fontSize:
|
|
642
|
+
ownerState: a,
|
|
643
|
+
children: [/* @__PURE__ */ n(He, {
|
|
644
|
+
fontSize: s,
|
|
643
645
|
className: r.background,
|
|
644
|
-
ownerState:
|
|
645
|
-
}), /* @__PURE__ */
|
|
646
|
-
fontSize:
|
|
646
|
+
ownerState: a
|
|
647
|
+
}), /* @__PURE__ */ n(Xe, {
|
|
648
|
+
fontSize: s,
|
|
647
649
|
className: r.dot,
|
|
648
|
-
ownerState:
|
|
650
|
+
ownerState: a
|
|
649
651
|
})]
|
|
650
652
|
});
|
|
651
653
|
}
|
|
@@ -664,27 +666,27 @@ process.env.NODE_ENV !== "production" && (te.propTypes = {
|
|
|
664
666
|
*/
|
|
665
667
|
fontSize: o.oneOf(["small", "medium"])
|
|
666
668
|
});
|
|
667
|
-
const re = /* @__PURE__ */
|
|
669
|
+
const re = /* @__PURE__ */ v.createContext(void 0);
|
|
668
670
|
process.env.NODE_ENV !== "production" && (re.displayName = "RadioGroupContext");
|
|
669
|
-
function
|
|
670
|
-
return
|
|
671
|
+
function Ke() {
|
|
672
|
+
return v.useContext(re);
|
|
671
673
|
}
|
|
672
|
-
function
|
|
674
|
+
function Ze(e) {
|
|
673
675
|
return L("MuiRadio", e);
|
|
674
676
|
}
|
|
675
|
-
const ie = q("MuiRadio", ["root", "checked", "disabled", "colorPrimary", "colorSecondary", "sizeSmall"]),
|
|
677
|
+
const ie = q("MuiRadio", ["root", "checked", "disabled", "colorPrimary", "colorSecondary", "sizeSmall"]), Je = (e) => {
|
|
676
678
|
const {
|
|
677
679
|
classes: t,
|
|
678
680
|
color: r,
|
|
679
|
-
size:
|
|
680
|
-
} = e,
|
|
681
|
-
root: ["root", `color${
|
|
681
|
+
size: s
|
|
682
|
+
} = e, a = {
|
|
683
|
+
root: ["root", `color${w(r)}`, s !== "medium" && `size${w(s)}`]
|
|
682
684
|
};
|
|
683
685
|
return {
|
|
684
686
|
...t,
|
|
685
|
-
...D(
|
|
687
|
+
...D(a, Ze, t)
|
|
686
688
|
};
|
|
687
|
-
},
|
|
689
|
+
}, Qe = C(oe, {
|
|
688
690
|
shouldForwardProp: (e) => ee(e) || e === "classes",
|
|
689
691
|
name: "MuiRadio",
|
|
690
692
|
slot: "Root",
|
|
@@ -692,7 +694,7 @@ const ie = q("MuiRadio", ["root", "checked", "disabled", "colorPrimary", "colorS
|
|
|
692
694
|
const {
|
|
693
695
|
ownerState: r
|
|
694
696
|
} = e;
|
|
695
|
-
return [t.root, r.size !== "medium" && t[`size${
|
|
697
|
+
return [t.root, r.size !== "medium" && t[`size${w(r.size)}`], t[`color${w(r.color)}`]];
|
|
696
698
|
}
|
|
697
699
|
})(I(({
|
|
698
700
|
theme: e
|
|
@@ -748,57 +750,57 @@ const ie = q("MuiRadio", ["root", "checked", "disabled", "colorPrimary", "colorS
|
|
|
748
750
|
}
|
|
749
751
|
}]
|
|
750
752
|
})));
|
|
751
|
-
function
|
|
753
|
+
function Ye(e, t) {
|
|
752
754
|
return typeof t == "object" && t !== null ? e === t : String(e) === String(t);
|
|
753
755
|
}
|
|
754
|
-
const le = /* @__PURE__ */
|
|
756
|
+
const le = /* @__PURE__ */ n(te, {
|
|
755
757
|
checked: !0
|
|
756
|
-
}), ce = /* @__PURE__ */
|
|
757
|
-
const
|
|
758
|
+
}), ce = /* @__PURE__ */ n(te, {}), ge = /* @__PURE__ */ v.forwardRef(function(t, r) {
|
|
759
|
+
const s = H({
|
|
758
760
|
props: t,
|
|
759
761
|
name: "MuiRadio"
|
|
760
762
|
}), {
|
|
761
|
-
checked:
|
|
763
|
+
checked: a,
|
|
762
764
|
checkedIcon: c = le,
|
|
763
|
-
color:
|
|
765
|
+
color: i = "primary",
|
|
764
766
|
icon: u = ce,
|
|
765
|
-
name:
|
|
766
|
-
onChange:
|
|
767
|
-
size:
|
|
768
|
-
className:
|
|
769
|
-
disabled:
|
|
770
|
-
disableRipple:
|
|
771
|
-
...
|
|
772
|
-
} =
|
|
773
|
-
let
|
|
774
|
-
|
|
775
|
-
const
|
|
776
|
-
...
|
|
777
|
-
disabled:
|
|
778
|
-
disableRipple:
|
|
779
|
-
color:
|
|
780
|
-
size:
|
|
781
|
-
},
|
|
782
|
-
let O =
|
|
783
|
-
const M =
|
|
784
|
-
let
|
|
785
|
-
return
|
|
767
|
+
name: d,
|
|
768
|
+
onChange: m,
|
|
769
|
+
size: f = "medium",
|
|
770
|
+
className: p,
|
|
771
|
+
disabled: b,
|
|
772
|
+
disableRipple: l = !1,
|
|
773
|
+
...R
|
|
774
|
+
} = s, k = X();
|
|
775
|
+
let h = b;
|
|
776
|
+
k && typeof h > "u" && (h = k.disabled), h ?? (h = !1);
|
|
777
|
+
const T = {
|
|
778
|
+
...s,
|
|
779
|
+
disabled: h,
|
|
780
|
+
disableRipple: l,
|
|
781
|
+
color: i,
|
|
782
|
+
size: f
|
|
783
|
+
}, g = Je(T), F = Ke();
|
|
784
|
+
let O = a;
|
|
785
|
+
const M = Pe(m, F && F.onChange);
|
|
786
|
+
let S = d;
|
|
787
|
+
return F && (typeof O > "u" && (O = Ye(F.value, s.value)), typeof S > "u" && (S = F.name)), /* @__PURE__ */ n(Qe, {
|
|
786
788
|
type: "radio",
|
|
787
|
-
icon: /* @__PURE__ */
|
|
788
|
-
fontSize: ce.props.fontSize ??
|
|
789
|
+
icon: /* @__PURE__ */ v.cloneElement(u, {
|
|
790
|
+
fontSize: ce.props.fontSize ?? f
|
|
789
791
|
}),
|
|
790
|
-
checkedIcon: /* @__PURE__ */
|
|
791
|
-
fontSize: le.props.fontSize ??
|
|
792
|
+
checkedIcon: /* @__PURE__ */ v.cloneElement(c, {
|
|
793
|
+
fontSize: le.props.fontSize ?? f
|
|
792
794
|
}),
|
|
793
|
-
disabled:
|
|
794
|
-
ownerState:
|
|
795
|
-
classes:
|
|
796
|
-
name:
|
|
795
|
+
disabled: h,
|
|
796
|
+
ownerState: T,
|
|
797
|
+
classes: g,
|
|
798
|
+
name: S,
|
|
797
799
|
checked: O,
|
|
798
800
|
onChange: M,
|
|
799
801
|
ref: r,
|
|
800
|
-
className: j(
|
|
801
|
-
...
|
|
802
|
+
className: j(g.root, p),
|
|
803
|
+
...R
|
|
802
804
|
});
|
|
803
805
|
});
|
|
804
806
|
process.env.NODE_ENV !== "production" && (ge.propTypes = {
|
|
@@ -855,7 +857,7 @@ process.env.NODE_ENV !== "production" && (ge.propTypes = {
|
|
|
855
857
|
/**
|
|
856
858
|
* Pass a ref to the `input` element.
|
|
857
859
|
*/
|
|
858
|
-
inputRef:
|
|
860
|
+
inputRef: W,
|
|
859
861
|
/**
|
|
860
862
|
* Name attribute of the `input` element.
|
|
861
863
|
*/
|
|
@@ -888,57 +890,57 @@ process.env.NODE_ENV !== "production" && (ge.propTypes = {
|
|
|
888
890
|
*/
|
|
889
891
|
value: o.any
|
|
890
892
|
});
|
|
891
|
-
function
|
|
893
|
+
function eo(e) {
|
|
892
894
|
return L("MuiRadioGroup", e);
|
|
893
895
|
}
|
|
894
896
|
q("MuiRadioGroup", ["root", "row", "error"]);
|
|
895
|
-
const
|
|
897
|
+
const oo = (e) => {
|
|
896
898
|
const {
|
|
897
899
|
classes: t,
|
|
898
900
|
row: r,
|
|
899
|
-
error:
|
|
901
|
+
error: s
|
|
900
902
|
} = e;
|
|
901
903
|
return D({
|
|
902
|
-
root: ["root", r && "row",
|
|
903
|
-
},
|
|
904
|
-
}, ye = /* @__PURE__ */
|
|
904
|
+
root: ["root", r && "row", s && "error"]
|
|
905
|
+
}, eo, t);
|
|
906
|
+
}, ye = /* @__PURE__ */ v.forwardRef(function(t, r) {
|
|
905
907
|
const {
|
|
906
908
|
// private
|
|
907
909
|
// eslint-disable-next-line react/prop-types
|
|
908
|
-
actions:
|
|
909
|
-
children:
|
|
910
|
+
actions: s,
|
|
911
|
+
children: a,
|
|
910
912
|
className: c,
|
|
911
|
-
defaultValue:
|
|
913
|
+
defaultValue: i,
|
|
912
914
|
name: u,
|
|
913
|
-
onChange:
|
|
914
|
-
value:
|
|
915
|
-
...
|
|
916
|
-
} = t,
|
|
917
|
-
controlled:
|
|
918
|
-
default:
|
|
915
|
+
onChange: d,
|
|
916
|
+
value: m,
|
|
917
|
+
...f
|
|
918
|
+
} = t, p = v.useRef(null), b = oo(t), [l, R] = fe({
|
|
919
|
+
controlled: m,
|
|
920
|
+
default: i,
|
|
919
921
|
name: "RadioGroup"
|
|
920
922
|
});
|
|
921
|
-
|
|
923
|
+
v.useImperativeHandle(s, () => ({
|
|
922
924
|
focus: () => {
|
|
923
|
-
let
|
|
924
|
-
|
|
925
|
+
let g = p.current.querySelector("input:not(:disabled):checked");
|
|
926
|
+
g || (g = p.current.querySelector("input:not(:disabled)")), g && g.focus();
|
|
925
927
|
}
|
|
926
928
|
}), []);
|
|
927
|
-
const
|
|
928
|
-
name:
|
|
929
|
-
onChange(
|
|
930
|
-
|
|
929
|
+
const k = Ne(r, p), h = Fe(u), T = v.useMemo(() => ({
|
|
930
|
+
name: h,
|
|
931
|
+
onChange(g) {
|
|
932
|
+
R(g.target.value), d && d(g, g.target.value);
|
|
931
933
|
},
|
|
932
|
-
value:
|
|
933
|
-
}), [
|
|
934
|
-
return /* @__PURE__ */
|
|
935
|
-
value:
|
|
936
|
-
children: /* @__PURE__ */
|
|
934
|
+
value: l
|
|
935
|
+
}), [h, d, R, l]);
|
|
936
|
+
return /* @__PURE__ */ n(re.Provider, {
|
|
937
|
+
value: T,
|
|
938
|
+
children: /* @__PURE__ */ n(be, {
|
|
937
939
|
role: "radiogroup",
|
|
938
|
-
ref:
|
|
939
|
-
className: j(
|
|
940
|
-
...
|
|
941
|
-
children:
|
|
940
|
+
ref: k,
|
|
941
|
+
className: j(b.root, c),
|
|
942
|
+
...f,
|
|
943
|
+
children: a
|
|
942
944
|
})
|
|
943
945
|
});
|
|
944
946
|
});
|
|
@@ -977,37 +979,37 @@ process.env.NODE_ENV !== "production" && (ye.propTypes = {
|
|
|
977
979
|
*/
|
|
978
980
|
value: o.any
|
|
979
981
|
});
|
|
980
|
-
function
|
|
982
|
+
function to(e) {
|
|
981
983
|
return L("MuiSwitch", e);
|
|
982
984
|
}
|
|
983
|
-
const
|
|
985
|
+
const y = q("MuiSwitch", ["root", "edgeStart", "edgeEnd", "switchBase", "colorPrimary", "colorSecondary", "sizeSmall", "sizeMedium", "checked", "disabled", "input", "thumb", "track"]), ro = (e) => {
|
|
984
986
|
const {
|
|
985
987
|
classes: t,
|
|
986
988
|
edge: r,
|
|
987
|
-
size:
|
|
988
|
-
color:
|
|
989
|
+
size: s,
|
|
990
|
+
color: a,
|
|
989
991
|
checked: c,
|
|
990
|
-
disabled:
|
|
992
|
+
disabled: i
|
|
991
993
|
} = e, u = {
|
|
992
|
-
root: ["root", r && `edge${
|
|
993
|
-
switchBase: ["switchBase", `color${
|
|
994
|
+
root: ["root", r && `edge${w(r)}`, `size${w(s)}`],
|
|
995
|
+
switchBase: ["switchBase", `color${w(a)}`, c && "checked", i && "disabled"],
|
|
994
996
|
thumb: ["thumb"],
|
|
995
997
|
track: ["track"],
|
|
996
998
|
input: ["input"]
|
|
997
|
-
},
|
|
999
|
+
}, d = D(u, to, t);
|
|
998
1000
|
return {
|
|
999
1001
|
...t,
|
|
1000
1002
|
// forward the disabled and checked classes to the SwitchBase
|
|
1001
|
-
...
|
|
1003
|
+
...d
|
|
1002
1004
|
};
|
|
1003
|
-
},
|
|
1005
|
+
}, so = C("span", {
|
|
1004
1006
|
name: "MuiSwitch",
|
|
1005
1007
|
slot: "Root",
|
|
1006
1008
|
overridesResolver: (e, t) => {
|
|
1007
1009
|
const {
|
|
1008
1010
|
ownerState: r
|
|
1009
1011
|
} = e;
|
|
1010
|
-
return [t.root, r.edge && t[`edge${
|
|
1012
|
+
return [t.root, r.edge && t[`edge${w(r.edge)}`], t[`size${w(r.size)}`]];
|
|
1011
1013
|
}
|
|
1012
1014
|
})({
|
|
1013
1015
|
display: "inline-flex",
|
|
@@ -1047,19 +1049,19 @@ const h = q("MuiSwitch", ["root", "edgeStart", "edgeEnd", "switchBase", "colorPr
|
|
|
1047
1049
|
width: 40,
|
|
1048
1050
|
height: 24,
|
|
1049
1051
|
padding: 7,
|
|
1050
|
-
[`& .${
|
|
1052
|
+
[`& .${y.thumb}`]: {
|
|
1051
1053
|
width: 16,
|
|
1052
1054
|
height: 16
|
|
1053
1055
|
},
|
|
1054
|
-
[`& .${
|
|
1056
|
+
[`& .${y.switchBase}`]: {
|
|
1055
1057
|
padding: 4,
|
|
1056
|
-
[`&.${
|
|
1058
|
+
[`&.${y.checked}`]: {
|
|
1057
1059
|
transform: "translateX(16px)"
|
|
1058
1060
|
}
|
|
1059
1061
|
}
|
|
1060
1062
|
}
|
|
1061
1063
|
}]
|
|
1062
|
-
}),
|
|
1064
|
+
}), ao = C(oe, {
|
|
1063
1065
|
name: "MuiSwitch",
|
|
1064
1066
|
slot: "SwitchBase",
|
|
1065
1067
|
overridesResolver: (e, t) => {
|
|
@@ -1067,8 +1069,8 @@ const h = q("MuiSwitch", ["root", "edgeStart", "edgeEnd", "switchBase", "colorPr
|
|
|
1067
1069
|
ownerState: r
|
|
1068
1070
|
} = e;
|
|
1069
1071
|
return [t.switchBase, {
|
|
1070
|
-
[`& .${
|
|
1071
|
-
}, r.color !== "default" && t[`color${
|
|
1072
|
+
[`& .${y.input}`]: t.input
|
|
1073
|
+
}, r.color !== "default" && t[`color${w(r.color)}`]];
|
|
1072
1074
|
}
|
|
1073
1075
|
})(I(({
|
|
1074
1076
|
theme: e
|
|
@@ -1082,19 +1084,19 @@ const h = q("MuiSwitch", ["root", "edgeStart", "edgeEnd", "switchBase", "colorPr
|
|
|
1082
1084
|
transition: e.transitions.create(["left", "transform"], {
|
|
1083
1085
|
duration: e.transitions.duration.shortest
|
|
1084
1086
|
}),
|
|
1085
|
-
[`&.${
|
|
1087
|
+
[`&.${y.checked}`]: {
|
|
1086
1088
|
transform: "translateX(20px)"
|
|
1087
1089
|
},
|
|
1088
|
-
[`&.${
|
|
1090
|
+
[`&.${y.disabled}`]: {
|
|
1089
1091
|
color: e.vars ? e.vars.palette.Switch.defaultDisabledColor : `${e.palette.mode === "light" ? e.palette.grey[100] : e.palette.grey[600]}`
|
|
1090
1092
|
},
|
|
1091
|
-
[`&.${
|
|
1093
|
+
[`&.${y.checked} + .${y.track}`]: {
|
|
1092
1094
|
opacity: 0.5
|
|
1093
1095
|
},
|
|
1094
|
-
[`&.${
|
|
1096
|
+
[`&.${y.disabled} + .${y.track}`]: {
|
|
1095
1097
|
opacity: e.vars ? e.vars.opacity.switchTrackDisabled : `${e.palette.mode === "light" ? 0.12 : 0.2}`
|
|
1096
1098
|
},
|
|
1097
|
-
[`& .${
|
|
1099
|
+
[`& .${y.input}`]: {
|
|
1098
1100
|
left: "-100%",
|
|
1099
1101
|
width: "300%"
|
|
1100
1102
|
}
|
|
@@ -1113,7 +1115,7 @@ const h = q("MuiSwitch", ["root", "edgeStart", "edgeEnd", "switchBase", "colorPr
|
|
|
1113
1115
|
color: t
|
|
1114
1116
|
},
|
|
1115
1117
|
style: {
|
|
1116
|
-
[`&.${
|
|
1118
|
+
[`&.${y.checked}`]: {
|
|
1117
1119
|
color: (e.vars || e).palette[t].main,
|
|
1118
1120
|
"&:hover": {
|
|
1119
1121
|
backgroundColor: e.vars ? `rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})` : A(e.palette[t].main, e.palette.action.hoverOpacity),
|
|
@@ -1121,16 +1123,16 @@ const h = q("MuiSwitch", ["root", "edgeStart", "edgeEnd", "switchBase", "colorPr
|
|
|
1121
1123
|
backgroundColor: "transparent"
|
|
1122
1124
|
}
|
|
1123
1125
|
},
|
|
1124
|
-
[`&.${
|
|
1125
|
-
color: e.vars ? e.vars.palette.Switch[`${t}DisabledColor`] : `${e.palette.mode === "light" ?
|
|
1126
|
+
[`&.${y.disabled}`]: {
|
|
1127
|
+
color: e.vars ? e.vars.palette.Switch[`${t}DisabledColor`] : `${e.palette.mode === "light" ? Oe(e.palette[t].main, 0.62) : $e(e.palette[t].main, 0.55)}`
|
|
1126
1128
|
}
|
|
1127
1129
|
},
|
|
1128
|
-
[`&.${
|
|
1130
|
+
[`&.${y.checked} + .${y.track}`]: {
|
|
1129
1131
|
backgroundColor: (e.vars || e).palette[t].main
|
|
1130
1132
|
}
|
|
1131
1133
|
}
|
|
1132
1134
|
}))]
|
|
1133
|
-
}))),
|
|
1135
|
+
}))), no = C("span", {
|
|
1134
1136
|
name: "MuiSwitch",
|
|
1135
1137
|
slot: "Track",
|
|
1136
1138
|
overridesResolver: (e, t) => t.track
|
|
@@ -1146,7 +1148,7 @@ const h = q("MuiSwitch", ["root", "edgeStart", "edgeEnd", "switchBase", "colorPr
|
|
|
1146
1148
|
}),
|
|
1147
1149
|
backgroundColor: e.vars ? e.vars.palette.common.onBackground : `${e.palette.mode === "light" ? e.palette.common.black : e.palette.common.white}`,
|
|
1148
1150
|
opacity: e.vars ? e.vars.opacity.switchTrack : `${e.palette.mode === "light" ? 0.38 : 0.3}`
|
|
1149
|
-
}))),
|
|
1151
|
+
}))), io = C("span", {
|
|
1150
1152
|
name: "MuiSwitch",
|
|
1151
1153
|
slot: "Thumb",
|
|
1152
1154
|
overridesResolver: (e, t) => t.thumb
|
|
@@ -1158,44 +1160,44 @@ const h = q("MuiSwitch", ["root", "edgeStart", "edgeEnd", "switchBase", "colorPr
|
|
|
1158
1160
|
width: 20,
|
|
1159
1161
|
height: 20,
|
|
1160
1162
|
borderRadius: "50%"
|
|
1161
|
-
}))), Y = /* @__PURE__ */
|
|
1162
|
-
const
|
|
1163
|
+
}))), Y = /* @__PURE__ */ v.forwardRef(function(t, r) {
|
|
1164
|
+
const s = H({
|
|
1163
1165
|
props: t,
|
|
1164
1166
|
name: "MuiSwitch"
|
|
1165
1167
|
}), {
|
|
1166
|
-
className:
|
|
1168
|
+
className: a,
|
|
1167
1169
|
color: c = "primary",
|
|
1168
|
-
edge:
|
|
1170
|
+
edge: i = !1,
|
|
1169
1171
|
size: u = "medium",
|
|
1170
|
-
sx:
|
|
1171
|
-
...
|
|
1172
|
-
} =
|
|
1173
|
-
...
|
|
1172
|
+
sx: d,
|
|
1173
|
+
...m
|
|
1174
|
+
} = s, f = {
|
|
1175
|
+
...s,
|
|
1174
1176
|
color: c,
|
|
1175
|
-
edge:
|
|
1177
|
+
edge: i,
|
|
1176
1178
|
size: u
|
|
1177
|
-
},
|
|
1178
|
-
className:
|
|
1179
|
-
ownerState:
|
|
1179
|
+
}, p = ro(f), b = /* @__PURE__ */ n(io, {
|
|
1180
|
+
className: p.thumb,
|
|
1181
|
+
ownerState: f
|
|
1180
1182
|
});
|
|
1181
|
-
return /* @__PURE__ */
|
|
1182
|
-
className: j(
|
|
1183
|
-
sx:
|
|
1184
|
-
ownerState:
|
|
1185
|
-
children: [/* @__PURE__ */
|
|
1183
|
+
return /* @__PURE__ */ x(so, {
|
|
1184
|
+
className: j(p.root, a),
|
|
1185
|
+
sx: d,
|
|
1186
|
+
ownerState: f,
|
|
1187
|
+
children: [/* @__PURE__ */ n(ao, {
|
|
1186
1188
|
type: "checkbox",
|
|
1187
|
-
icon:
|
|
1188
|
-
checkedIcon:
|
|
1189
|
+
icon: b,
|
|
1190
|
+
checkedIcon: b,
|
|
1189
1191
|
ref: r,
|
|
1190
|
-
ownerState:
|
|
1191
|
-
...
|
|
1192
|
+
ownerState: f,
|
|
1193
|
+
...m,
|
|
1192
1194
|
classes: {
|
|
1193
|
-
...
|
|
1194
|
-
root:
|
|
1195
|
+
...p,
|
|
1196
|
+
root: p.switchBase
|
|
1195
1197
|
}
|
|
1196
|
-
}), /* @__PURE__ */
|
|
1197
|
-
className:
|
|
1198
|
-
ownerState:
|
|
1198
|
+
}), /* @__PURE__ */ n(no, {
|
|
1199
|
+
className: p.track,
|
|
1200
|
+
ownerState: f
|
|
1199
1201
|
})]
|
|
1200
1202
|
});
|
|
1201
1203
|
});
|
|
@@ -1263,7 +1265,7 @@ process.env.NODE_ENV !== "production" && (Y.propTypes = {
|
|
|
1263
1265
|
/**
|
|
1264
1266
|
* Pass a ref to the `input` element.
|
|
1265
1267
|
*/
|
|
1266
|
-
inputRef:
|
|
1268
|
+
inputRef: W,
|
|
1267
1269
|
/**
|
|
1268
1270
|
* Callback fired when the state is changed.
|
|
1269
1271
|
*
|
|
@@ -1293,7 +1295,7 @@ process.env.NODE_ENV !== "production" && (Y.propTypes = {
|
|
|
1293
1295
|
*/
|
|
1294
1296
|
value: o.any
|
|
1295
1297
|
});
|
|
1296
|
-
const
|
|
1298
|
+
const lo = (e, t) => {
|
|
1297
1299
|
const r = [
|
|
1298
1300
|
"EMAIL",
|
|
1299
1301
|
"INAPP_WEB",
|
|
@@ -1314,140 +1316,151 @@ const no = (e, t) => {
|
|
|
1314
1316
|
daily: "Daily",
|
|
1315
1317
|
weekly: "Weekly",
|
|
1316
1318
|
monthly: "Monthly"
|
|
1317
|
-
})[e],
|
|
1319
|
+
})[e], So = ({
|
|
1318
1320
|
notification: e,
|
|
1319
1321
|
preferences: t,
|
|
1320
1322
|
updateDelivery: r,
|
|
1321
|
-
subNotificationId:
|
|
1322
|
-
}) =>
|
|
1323
|
-
const
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
{
|
|
1337
|
-
checked: l.delivery !== "off",
|
|
1338
|
-
onChange: (n, m) => {
|
|
1339
|
-
if (m) {
|
|
1340
|
-
const k = p.find((S) => S !== "off");
|
|
1341
|
-
r(
|
|
1342
|
-
e.notificationId,
|
|
1343
|
-
s,
|
|
1344
|
-
k,
|
|
1345
|
-
a
|
|
1346
|
-
);
|
|
1347
|
-
} else
|
|
1348
|
-
r(
|
|
1349
|
-
e.notificationId,
|
|
1350
|
-
s,
|
|
1351
|
-
"off",
|
|
1352
|
-
a
|
|
1353
|
-
);
|
|
1354
|
-
}
|
|
1355
|
-
}
|
|
1356
|
-
) : d = /* @__PURE__ */ R(ne, { children: [
|
|
1357
|
-
/* @__PURE__ */ i(
|
|
1323
|
+
subNotificationId: s
|
|
1324
|
+
}) => {
|
|
1325
|
+
const a = xe(), c = ke(a);
|
|
1326
|
+
return /* @__PURE__ */ n(ne, { children: e.channels.sort(lo).map((i, u) => {
|
|
1327
|
+
const d = t.find(
|
|
1328
|
+
(l) => l.notificationId === e.notificationId && l.channel === i
|
|
1329
|
+
);
|
|
1330
|
+
if (!d)
|
|
1331
|
+
return null;
|
|
1332
|
+
const m = we(i), f = Ce(i), p = Object.keys(
|
|
1333
|
+
e.options[i]
|
|
1334
|
+
).filter(
|
|
1335
|
+
(l) => l !== "defaultDeliveryOption" && l !== "defaultDeliverOption"
|
|
1336
|
+
);
|
|
1337
|
+
let b;
|
|
1338
|
+
return p.length === 1 ? b = /* @__PURE__ */ n(_, { variant: "body1", sx: { color: c.text }, children: pe(d.delivery) }) : p.length === 2 && p.includes("off") ? b = /* @__PURE__ */ n(
|
|
1358
1339
|
Y,
|
|
1359
1340
|
{
|
|
1360
|
-
checked:
|
|
1361
|
-
onChange: (
|
|
1362
|
-
if (
|
|
1363
|
-
const k = p.
|
|
1341
|
+
checked: d.delivery !== "off",
|
|
1342
|
+
onChange: (l, R) => {
|
|
1343
|
+
if (R) {
|
|
1344
|
+
const k = p.find((h) => h !== "off");
|
|
1364
1345
|
r(
|
|
1365
1346
|
e.notificationId,
|
|
1366
|
-
|
|
1347
|
+
i,
|
|
1367
1348
|
k,
|
|
1368
|
-
|
|
1349
|
+
s
|
|
1369
1350
|
);
|
|
1370
1351
|
} else
|
|
1371
1352
|
r(
|
|
1372
1353
|
e.notificationId,
|
|
1373
|
-
|
|
1354
|
+
i,
|
|
1374
1355
|
"off",
|
|
1375
|
-
|
|
1356
|
+
s
|
|
1376
1357
|
);
|
|
1377
1358
|
}
|
|
1378
1359
|
}
|
|
1379
|
-
),
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1360
|
+
) : b = /* @__PURE__ */ x(ne, { children: [
|
|
1361
|
+
/* @__PURE__ */ n(
|
|
1362
|
+
Y,
|
|
1363
|
+
{
|
|
1364
|
+
checked: d.delivery !== "off",
|
|
1365
|
+
onChange: (l, R) => {
|
|
1366
|
+
if (R) {
|
|
1367
|
+
const k = p.sort(de).find((h) => h !== "off");
|
|
1368
|
+
r(
|
|
1369
|
+
e.notificationId,
|
|
1370
|
+
i,
|
|
1371
|
+
k,
|
|
1372
|
+
s
|
|
1373
|
+
);
|
|
1374
|
+
} else
|
|
1375
|
+
r(
|
|
1376
|
+
e.notificationId,
|
|
1377
|
+
i,
|
|
1378
|
+
"off",
|
|
1379
|
+
s
|
|
1380
|
+
);
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
),
|
|
1384
|
+
/* @__PURE__ */ n(
|
|
1385
|
+
"div",
|
|
1386
|
+
{
|
|
1387
|
+
style: {
|
|
1388
|
+
width: "100%",
|
|
1389
|
+
marginTop: 8,
|
|
1390
|
+
maxHeight: d.delivery !== "off" ? 1e3 : 0,
|
|
1391
|
+
overflow: "hidden",
|
|
1392
|
+
transition: "max-height 0.3s ease"
|
|
1393
|
+
},
|
|
1394
|
+
children: /* @__PURE__ */ x("div", { children: [
|
|
1395
|
+
/* @__PURE__ */ n("div", { style: { marginTop: 20 }, children: /* @__PURE__ */ n(
|
|
1396
|
+
_,
|
|
1397
|
+
{
|
|
1398
|
+
variant: "body1",
|
|
1399
|
+
fontWeight: 600,
|
|
1400
|
+
sx: { color: c.text },
|
|
1401
|
+
children: "Choose frequency:"
|
|
1402
|
+
}
|
|
1403
|
+
) }),
|
|
1404
|
+
/* @__PURE__ */ n(
|
|
1405
|
+
ye,
|
|
1406
|
+
{
|
|
1407
|
+
value: d.delivery,
|
|
1408
|
+
onChange: (l) => {
|
|
1409
|
+
r(
|
|
1410
|
+
e.notificationId,
|
|
1411
|
+
i,
|
|
1412
|
+
l.target.value,
|
|
1413
|
+
s
|
|
1414
|
+
);
|
|
1410
1415
|
},
|
|
1411
|
-
n
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
"
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1416
|
+
children: /* @__PURE__ */ n(Te, { direction: "column", style: { paddingTop: 10 }, children: p.filter((l) => l !== "off").sort(de).map((l) => /* @__PURE__ */ n(
|
|
1417
|
+
me,
|
|
1418
|
+
{
|
|
1419
|
+
control: /* @__PURE__ */ n(ge, {}),
|
|
1420
|
+
value: l,
|
|
1421
|
+
label: pe(l)
|
|
1422
|
+
},
|
|
1423
|
+
l
|
|
1424
|
+
)) })
|
|
1425
|
+
}
|
|
1426
|
+
)
|
|
1427
|
+
] })
|
|
1428
|
+
}
|
|
1429
|
+
)
|
|
1430
|
+
] }), /* @__PURE__ */ x("div", { children: [
|
|
1431
|
+
/* @__PURE__ */ x(
|
|
1432
|
+
"div",
|
|
1433
|
+
{
|
|
1434
|
+
style: {
|
|
1435
|
+
display: "flex",
|
|
1436
|
+
justifyContent: "space-between",
|
|
1437
|
+
flexWrap: "wrap",
|
|
1438
|
+
marginTop: u === 0 ? 0 : 12,
|
|
1439
|
+
marginBottom: u === e.channels.length - 1 ? 0 : 12
|
|
1440
|
+
},
|
|
1441
|
+
children: [
|
|
1442
|
+
/* @__PURE__ */ x(
|
|
1443
|
+
"div",
|
|
1444
|
+
{
|
|
1445
|
+
style: {
|
|
1446
|
+
display: "flex",
|
|
1447
|
+
alignItems: "center",
|
|
1448
|
+
gap: 8
|
|
1449
|
+
},
|
|
1450
|
+
children: [
|
|
1451
|
+
f,
|
|
1452
|
+
/* @__PURE__ */ n(_, { variant: "body1", sx: { color: c.text }, children: m })
|
|
1453
|
+
]
|
|
1454
|
+
}
|
|
1455
|
+
),
|
|
1456
|
+
b
|
|
1457
|
+
]
|
|
1458
|
+
}
|
|
1459
|
+
),
|
|
1460
|
+
u !== e.channels.length - 1 && /* @__PURE__ */ n(Be, { sx: { borderColor: c.divider } })
|
|
1461
|
+
] }, i);
|
|
1462
|
+
}) });
|
|
1463
|
+
};
|
|
1451
1464
|
export {
|
|
1452
|
-
|
|
1465
|
+
So as PreferenceInput
|
|
1453
1466
|
};
|