@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,1470 +1,1649 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { g as
|
|
3
|
-
import {
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
import { jsx as d, jsxs as P, Fragment as ie } from "react/jsx-runtime";
|
|
2
|
+
import { g as Oe, a as xe } from "./channelUtils.js";
|
|
3
|
+
import { e as Te, T as _ } from "./Typography.js";
|
|
4
|
+
import * as m from "react";
|
|
5
|
+
import { y as Pe, w as $e, P as o, j as Ne, z as le, A as Q, B as Fe, D as Be, E as je, c as I, f as M, a as D, F as ce, g as G, s as v, v as oe, h as w, m as z, u as A, b as W, t as Ie, r as ze } from "./DefaultPropsProvider.js";
|
|
6
|
+
import { c as Y } from "./createSimplePaletteValueFilter.js";
|
|
7
|
+
import { B as Ee, r as H, u as Me } from "./ButtonBase.js";
|
|
8
|
+
import { u as he, a as De, D as Ve } from "./Divider.js";
|
|
9
|
+
import { u as Ge } from "./resolveComponentProps.js";
|
|
10
|
+
import { u as Le } from "./useTheme2.js";
|
|
11
|
+
import { c as be } from "./createSvgIcon.js";
|
|
12
|
+
const qe = Pe();
|
|
13
|
+
function Ue(e) {
|
|
14
|
+
const {
|
|
15
|
+
theme: t,
|
|
16
|
+
name: r,
|
|
17
|
+
props: n
|
|
18
|
+
} = e;
|
|
19
|
+
return !t || !t.components || !t.components[r] || !t.components[r].defaultProps ? n : $e(t.components[r].defaultProps, n);
|
|
20
|
+
}
|
|
21
|
+
function _e({
|
|
22
|
+
props: e,
|
|
23
|
+
name: t,
|
|
24
|
+
defaultTheme: r,
|
|
25
|
+
themeId: n
|
|
26
|
+
}) {
|
|
27
|
+
let s = Le(r);
|
|
28
|
+
return n && (s = s[n] || s), Ue({
|
|
29
|
+
theme: s,
|
|
30
|
+
name: t,
|
|
31
|
+
props: e
|
|
28
32
|
});
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
nativeEvent: h.nativeEvent
|
|
42
|
-
}));
|
|
43
|
-
};
|
|
44
|
-
return /* @__PURE__ */ d.createElement("span", {
|
|
45
|
-
className: I,
|
|
46
|
-
title: S,
|
|
47
|
-
style: s,
|
|
48
|
-
ref: b
|
|
49
|
-
}, /* @__PURE__ */ d.createElement("input", ve({}, w, {
|
|
50
|
-
className: "".concat(t, "-input"),
|
|
51
|
-
ref: y,
|
|
52
|
-
onChange: p,
|
|
53
|
-
disabled: r,
|
|
54
|
-
checked: !!v,
|
|
55
|
-
type: u
|
|
56
|
-
})), /* @__PURE__ */ d.createElement("span", {
|
|
57
|
-
className: "".concat(t, "-inner")
|
|
58
|
-
}));
|
|
33
|
+
}
|
|
34
|
+
function Ae(...e) {
|
|
35
|
+
return e.reduce((t, r) => r == null ? t : function(...s) {
|
|
36
|
+
t.apply(this, s), r.apply(this, s);
|
|
37
|
+
}, () => {
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
const We = Ne(), He = qe("div", {
|
|
41
|
+
name: "MuiStack",
|
|
42
|
+
slot: "Root",
|
|
43
|
+
overridesResolver: (e, t) => t.root
|
|
59
44
|
});
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
45
|
+
function Xe(e) {
|
|
46
|
+
return _e({
|
|
47
|
+
props: e,
|
|
48
|
+
name: "MuiStack",
|
|
49
|
+
defaultTheme: We
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function Ze(e, t) {
|
|
53
|
+
const r = m.Children.toArray(e).filter(Boolean);
|
|
54
|
+
return r.reduce((n, s, i) => (n.push(s), i < r.length - 1 && n.push(/* @__PURE__ */ m.cloneElement(t, {
|
|
55
|
+
key: `separator-${i}`
|
|
56
|
+
})), n), []);
|
|
57
|
+
}
|
|
58
|
+
const Je = (e) => ({
|
|
59
|
+
row: "Left",
|
|
60
|
+
"row-reverse": "Right",
|
|
61
|
+
column: "Top",
|
|
62
|
+
"column-reverse": "Bottom"
|
|
63
|
+
})[e], Ke = ({
|
|
64
|
+
ownerState: e,
|
|
65
|
+
theme: t
|
|
66
|
+
}) => {
|
|
67
|
+
let r = {
|
|
68
|
+
display: "flex",
|
|
69
|
+
flexDirection: "column",
|
|
70
|
+
...le({
|
|
71
|
+
theme: t
|
|
72
|
+
}, Q({
|
|
73
|
+
values: e.direction,
|
|
74
|
+
breakpoints: t.breakpoints.values
|
|
75
|
+
}), (n) => ({
|
|
76
|
+
flexDirection: n
|
|
77
|
+
}))
|
|
78
|
+
};
|
|
79
|
+
if (e.spacing) {
|
|
80
|
+
const n = Fe(t), s = Object.keys(t.breakpoints.values).reduce((c, l) => ((typeof e.spacing == "object" && e.spacing[l] != null || typeof e.direction == "object" && e.direction[l] != null) && (c[l] = !0), c), {}), i = Q({
|
|
81
|
+
values: e.direction,
|
|
82
|
+
base: s
|
|
83
|
+
}), p = Q({
|
|
84
|
+
values: e.spacing,
|
|
85
|
+
base: s
|
|
86
|
+
});
|
|
87
|
+
typeof i == "object" && Object.keys(i).forEach((c, l, u) => {
|
|
88
|
+
if (!i[c]) {
|
|
89
|
+
const h = l > 0 ? i[u[l - 1]] : "column";
|
|
90
|
+
i[c] = h;
|
|
91
|
+
}
|
|
92
|
+
}), r = Be(r, le({
|
|
93
|
+
theme: t
|
|
94
|
+
}, p, (c, l) => e.useFlexGap ? {
|
|
95
|
+
gap: ce(n, c)
|
|
96
|
+
} : {
|
|
97
|
+
// The useFlexGap={false} implement relies on each child to give up control of the margin.
|
|
98
|
+
// We need to reset the margin to avoid double spacing.
|
|
99
|
+
"& > :not(style):not(style)": {
|
|
100
|
+
margin: 0
|
|
78
101
|
},
|
|
79
|
-
|
|
80
|
-
|
|
102
|
+
"& > :not(style) ~ :not(style)": {
|
|
103
|
+
[`margin${Je(l ? i[l] : e.direction)}`]: ce(n, c)
|
|
81
104
|
}
|
|
82
|
-
})
|
|
83
|
-
}
|
|
84
|
-
|
|
105
|
+
}));
|
|
106
|
+
}
|
|
107
|
+
return r = je(t.breakpoints, r), r;
|
|
108
|
+
};
|
|
109
|
+
function Qe(e = {}) {
|
|
85
110
|
const {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
111
|
+
// This will allow adding custom styled fn (for example for custom sx style function)
|
|
112
|
+
createStyledComponent: t = He,
|
|
113
|
+
useThemeProps: r = Xe,
|
|
114
|
+
componentName: n = "MuiStack"
|
|
115
|
+
} = e, s = () => M({
|
|
116
|
+
root: ["root"]
|
|
117
|
+
}, (c) => D(n, c), {}), i = t(Ke), p = /* @__PURE__ */ m.forwardRef(function(c, l) {
|
|
118
|
+
const u = r(c), a = Te(u), {
|
|
119
|
+
component: h = "div",
|
|
120
|
+
direction: C = "column",
|
|
121
|
+
spacing: k = 0,
|
|
122
|
+
divider: O,
|
|
123
|
+
children: y,
|
|
124
|
+
className: x,
|
|
125
|
+
useFlexGap: b = !1,
|
|
126
|
+
...T
|
|
127
|
+
} = a, S = {
|
|
128
|
+
direction: C,
|
|
129
|
+
spacing: k,
|
|
130
|
+
useFlexGap: b
|
|
131
|
+
}, B = s();
|
|
132
|
+
return /* @__PURE__ */ d(i, {
|
|
133
|
+
as: h,
|
|
134
|
+
ownerState: S,
|
|
135
|
+
ref: l,
|
|
136
|
+
className: I(B.root, x),
|
|
137
|
+
...T,
|
|
138
|
+
children: O ? Ze(y, O) : y
|
|
139
|
+
});
|
|
106
140
|
});
|
|
107
|
-
return {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
// hashId 在 wrapper 上,只能铺平
|
|
133
|
-
[`${n}-checked::after`]: {
|
|
134
|
-
position: "absolute",
|
|
135
|
-
insetBlockStart: 0,
|
|
136
|
-
insetInlineStart: 0,
|
|
137
|
-
width: "100%",
|
|
138
|
-
height: "100%",
|
|
139
|
-
border: `${E(g)} ${y} ${t}`,
|
|
140
|
-
borderRadius: "50%",
|
|
141
|
-
visibility: "hidden",
|
|
142
|
-
opacity: 0,
|
|
143
|
-
content: '""'
|
|
144
|
-
},
|
|
145
|
-
[n]: Object.assign(Object.assign({}, A(e)), {
|
|
146
|
-
position: "relative",
|
|
147
|
-
display: "inline-block",
|
|
148
|
-
outline: "none",
|
|
149
|
-
cursor: "pointer",
|
|
150
|
-
alignSelf: "center",
|
|
151
|
-
borderRadius: "50%"
|
|
152
|
-
}),
|
|
153
|
-
[`${n}-wrapper:hover &,
|
|
154
|
-
&:hover ${v}`]: {
|
|
155
|
-
borderColor: t
|
|
156
|
-
},
|
|
157
|
-
[`${n}-input:focus-visible + ${v}`]: Object.assign({}, Ce(e)),
|
|
158
|
-
[`${n}:hover::after, ${n}-wrapper:hover &::after`]: {
|
|
159
|
-
visibility: "visible"
|
|
160
|
-
},
|
|
161
|
-
[`${n}-inner`]: {
|
|
162
|
-
"&::after": {
|
|
163
|
-
boxSizing: "border-box",
|
|
164
|
-
position: "absolute",
|
|
165
|
-
insetBlockStart: "50%",
|
|
166
|
-
insetInlineStart: "50%",
|
|
167
|
-
display: "block",
|
|
168
|
-
width: p,
|
|
169
|
-
height: p,
|
|
170
|
-
marginBlockStart: f(1).mul(o).div(-2).equal({
|
|
171
|
-
unit: !0
|
|
172
|
-
}),
|
|
173
|
-
marginInlineStart: f(1).mul(o).div(-2).equal({
|
|
174
|
-
unit: !0
|
|
175
|
-
}),
|
|
176
|
-
backgroundColor: b,
|
|
177
|
-
borderBlockStart: 0,
|
|
178
|
-
borderInlineStart: 0,
|
|
179
|
-
borderRadius: p,
|
|
180
|
-
transform: "scale(0)",
|
|
181
|
-
opacity: 0,
|
|
182
|
-
transition: `all ${s} ${r}`,
|
|
183
|
-
content: '""'
|
|
184
|
-
},
|
|
185
|
-
boxSizing: "border-box",
|
|
186
|
-
position: "relative",
|
|
187
|
-
insetBlockStart: 0,
|
|
188
|
-
insetInlineStart: 0,
|
|
189
|
-
display: "block",
|
|
190
|
-
width: p,
|
|
191
|
-
height: p,
|
|
192
|
-
backgroundColor: l,
|
|
193
|
-
borderColor: c,
|
|
194
|
-
borderStyle: "solid",
|
|
195
|
-
borderWidth: g,
|
|
196
|
-
borderRadius: "50%",
|
|
197
|
-
transition: `all ${a}`
|
|
198
|
-
},
|
|
199
|
-
[`${n}-input`]: {
|
|
200
|
-
position: "absolute",
|
|
201
|
-
inset: 0,
|
|
202
|
-
zIndex: 1,
|
|
203
|
-
cursor: "pointer",
|
|
204
|
-
opacity: 0
|
|
205
|
-
},
|
|
206
|
-
// 选中状态
|
|
207
|
-
[`${n}-checked`]: {
|
|
208
|
-
[v]: {
|
|
209
|
-
borderColor: t,
|
|
210
|
-
backgroundColor: k,
|
|
211
|
-
"&::after": {
|
|
212
|
-
transform: `scale(${e.calc(e.dotSize).div(o).equal()})`,
|
|
213
|
-
opacity: 1,
|
|
214
|
-
transition: `all ${s} ${r}`
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
|
-
[`${n}-disabled`]: {
|
|
219
|
-
cursor: "not-allowed",
|
|
220
|
-
[v]: {
|
|
221
|
-
backgroundColor: u,
|
|
222
|
-
borderColor: c,
|
|
223
|
-
cursor: "not-allowed",
|
|
224
|
-
"&::after": {
|
|
225
|
-
backgroundColor: w
|
|
226
|
-
}
|
|
227
|
-
},
|
|
228
|
-
[`${n}-input`]: {
|
|
229
|
-
cursor: "not-allowed"
|
|
230
|
-
},
|
|
231
|
-
[`${n}-disabled + span`]: {
|
|
232
|
-
color: S,
|
|
233
|
-
cursor: "not-allowed"
|
|
234
|
-
},
|
|
235
|
-
[`&${n}-checked`]: {
|
|
236
|
-
[v]: {
|
|
237
|
-
"&::after": {
|
|
238
|
-
transform: `scale(${f(I).div(o).equal()})`
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
},
|
|
243
|
-
[`span${n} + *`]: {
|
|
244
|
-
paddingInlineStart: m,
|
|
245
|
-
paddingInlineEnd: m
|
|
246
|
-
}
|
|
247
|
-
})
|
|
248
|
-
};
|
|
249
|
-
}, Ye = (e) => {
|
|
141
|
+
return process.env.NODE_ENV !== "production" && (p.propTypes = {
|
|
142
|
+
children: o.node,
|
|
143
|
+
direction: o.oneOfType([o.oneOf(["column-reverse", "column", "row-reverse", "row"]), o.arrayOf(o.oneOf(["column-reverse", "column", "row-reverse", "row"])), o.object]),
|
|
144
|
+
divider: o.node,
|
|
145
|
+
spacing: o.oneOfType([o.arrayOf(o.oneOfType([o.number, o.string])), o.number, o.object, o.string]),
|
|
146
|
+
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
|
|
147
|
+
}), p;
|
|
148
|
+
}
|
|
149
|
+
function ye({
|
|
150
|
+
props: e,
|
|
151
|
+
states: t,
|
|
152
|
+
muiFormControl: r
|
|
153
|
+
}) {
|
|
154
|
+
return t.reduce((n, s) => (n[s] = e[s], r && typeof e[s] > "u" && (n[s] = r[s]), n), {});
|
|
155
|
+
}
|
|
156
|
+
const ge = /* @__PURE__ */ m.createContext(void 0);
|
|
157
|
+
process.env.NODE_ENV !== "production" && (ge.displayName = "FormControlContext");
|
|
158
|
+
function X() {
|
|
159
|
+
return m.useContext(ge);
|
|
160
|
+
}
|
|
161
|
+
function Ye(e) {
|
|
162
|
+
return D("PrivateSwitchBase", e);
|
|
163
|
+
}
|
|
164
|
+
G("PrivateSwitchBase", ["root", "checked", "disabled", "input", "edgeStart", "edgeEnd"]);
|
|
165
|
+
const eo = (e) => {
|
|
250
166
|
const {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
motionDurationMid: l,
|
|
259
|
-
buttonPaddingInline: c,
|
|
260
|
-
fontSize: g,
|
|
261
|
-
buttonBg: u,
|
|
262
|
-
fontSizeLG: S,
|
|
263
|
-
controlHeightLG: m,
|
|
264
|
-
controlHeightSM: w,
|
|
265
|
-
paddingXS: y,
|
|
266
|
-
borderRadius: b,
|
|
267
|
-
borderRadiusSM: k,
|
|
268
|
-
borderRadiusLG: f,
|
|
269
|
-
buttonCheckedBg: v,
|
|
270
|
-
buttonSolidCheckedColor: x,
|
|
271
|
-
colorTextDisabled: I,
|
|
272
|
-
colorBgContainerDisabled: p,
|
|
273
|
-
buttonCheckedBgDisabled: P,
|
|
274
|
-
buttonCheckedColorDisabled: h,
|
|
275
|
-
colorPrimary: $,
|
|
276
|
-
colorPrimaryHover: z,
|
|
277
|
-
colorPrimaryActive: C,
|
|
278
|
-
buttonSolidCheckedBg: R,
|
|
279
|
-
buttonSolidCheckedHoverBg: N,
|
|
280
|
-
buttonSolidCheckedActiveBg: j,
|
|
281
|
-
calc: M
|
|
282
|
-
} = e;
|
|
283
|
-
return {
|
|
284
|
-
[`${t}-button-wrapper`]: {
|
|
285
|
-
position: "relative",
|
|
286
|
-
display: "inline-block",
|
|
287
|
-
height: i,
|
|
288
|
-
margin: 0,
|
|
289
|
-
paddingInline: c,
|
|
290
|
-
paddingBlock: 0,
|
|
291
|
-
color: n,
|
|
292
|
-
fontSize: g,
|
|
293
|
-
lineHeight: E(M(i).sub(M(o).mul(2)).equal()),
|
|
294
|
-
background: u,
|
|
295
|
-
border: `${E(o)} ${s} ${a}`,
|
|
296
|
-
// strange align fix for chrome but works
|
|
297
|
-
// https://gw.alipayobjects.com/zos/rmsportal/VFTfKXJuogBAXcvfAUWJ.gif
|
|
298
|
-
borderBlockStartWidth: M(o).add(0.02).equal(),
|
|
299
|
-
borderInlineStartWidth: 0,
|
|
300
|
-
borderInlineEndWidth: o,
|
|
301
|
-
cursor: "pointer",
|
|
302
|
-
transition: [`color ${l}`, `background ${l}`, `box-shadow ${l}`].join(","),
|
|
303
|
-
a: {
|
|
304
|
-
color: n
|
|
305
|
-
},
|
|
306
|
-
[`> ${t}-button`]: {
|
|
307
|
-
position: "absolute",
|
|
308
|
-
insetBlockStart: 0,
|
|
309
|
-
insetInlineStart: 0,
|
|
310
|
-
zIndex: -1,
|
|
311
|
-
width: "100%",
|
|
312
|
-
height: "100%"
|
|
313
|
-
},
|
|
314
|
-
"&:not(:first-child)": {
|
|
315
|
-
"&::before": {
|
|
316
|
-
position: "absolute",
|
|
317
|
-
insetBlockStart: M(o).mul(-1).equal(),
|
|
318
|
-
insetInlineStart: M(o).mul(-1).equal(),
|
|
319
|
-
display: "block",
|
|
320
|
-
boxSizing: "content-box",
|
|
321
|
-
width: 1,
|
|
322
|
-
height: "100%",
|
|
323
|
-
paddingBlock: o,
|
|
324
|
-
paddingInline: 0,
|
|
325
|
-
backgroundColor: a,
|
|
326
|
-
transition: `background-color ${r}`,
|
|
327
|
-
content: '""'
|
|
328
|
-
}
|
|
329
|
-
},
|
|
330
|
-
"&:first-child": {
|
|
331
|
-
borderInlineStart: `${E(o)} ${s} ${a}`,
|
|
332
|
-
borderStartStartRadius: b,
|
|
333
|
-
borderEndStartRadius: b
|
|
334
|
-
},
|
|
335
|
-
"&:last-child": {
|
|
336
|
-
borderStartEndRadius: b,
|
|
337
|
-
borderEndEndRadius: b
|
|
338
|
-
},
|
|
339
|
-
"&:first-child:last-child": {
|
|
340
|
-
borderRadius: b
|
|
341
|
-
},
|
|
342
|
-
[`${t}-group-large &`]: {
|
|
343
|
-
height: m,
|
|
344
|
-
fontSize: S,
|
|
345
|
-
lineHeight: E(M(m).sub(M(o).mul(2)).equal()),
|
|
346
|
-
"&:first-child": {
|
|
347
|
-
borderStartStartRadius: f,
|
|
348
|
-
borderEndStartRadius: f
|
|
349
|
-
},
|
|
350
|
-
"&:last-child": {
|
|
351
|
-
borderStartEndRadius: f,
|
|
352
|
-
borderEndEndRadius: f
|
|
353
|
-
}
|
|
354
|
-
},
|
|
355
|
-
[`${t}-group-small &`]: {
|
|
356
|
-
height: w,
|
|
357
|
-
paddingInline: M(y).sub(o).equal(),
|
|
358
|
-
paddingBlock: 0,
|
|
359
|
-
lineHeight: E(M(w).sub(M(o).mul(2)).equal()),
|
|
360
|
-
"&:first-child": {
|
|
361
|
-
borderStartStartRadius: k,
|
|
362
|
-
borderEndStartRadius: k
|
|
363
|
-
},
|
|
364
|
-
"&:last-child": {
|
|
365
|
-
borderStartEndRadius: k,
|
|
366
|
-
borderEndEndRadius: k
|
|
367
|
-
}
|
|
368
|
-
},
|
|
369
|
-
"&:hover": {
|
|
370
|
-
position: "relative",
|
|
371
|
-
color: $
|
|
372
|
-
},
|
|
373
|
-
"&:has(:focus-visible)": Object.assign({}, Ce(e)),
|
|
374
|
-
[`${t}-inner, input[type='checkbox'], input[type='radio']`]: {
|
|
375
|
-
width: 0,
|
|
376
|
-
height: 0,
|
|
377
|
-
opacity: 0,
|
|
378
|
-
pointerEvents: "none"
|
|
379
|
-
},
|
|
380
|
-
[`&-checked:not(${t}-button-wrapper-disabled)`]: {
|
|
381
|
-
zIndex: 1,
|
|
382
|
-
color: $,
|
|
383
|
-
background: v,
|
|
384
|
-
borderColor: $,
|
|
385
|
-
"&::before": {
|
|
386
|
-
backgroundColor: $
|
|
387
|
-
},
|
|
388
|
-
"&:first-child": {
|
|
389
|
-
borderColor: $
|
|
390
|
-
},
|
|
391
|
-
"&:hover": {
|
|
392
|
-
color: z,
|
|
393
|
-
borderColor: z,
|
|
394
|
-
"&::before": {
|
|
395
|
-
backgroundColor: z
|
|
396
|
-
}
|
|
397
|
-
},
|
|
398
|
-
"&:active": {
|
|
399
|
-
color: C,
|
|
400
|
-
borderColor: C,
|
|
401
|
-
"&::before": {
|
|
402
|
-
backgroundColor: C
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
},
|
|
406
|
-
[`${t}-group-solid &-checked:not(${t}-button-wrapper-disabled)`]: {
|
|
407
|
-
color: x,
|
|
408
|
-
background: R,
|
|
409
|
-
borderColor: R,
|
|
410
|
-
"&:hover": {
|
|
411
|
-
color: x,
|
|
412
|
-
background: N,
|
|
413
|
-
borderColor: N
|
|
414
|
-
},
|
|
415
|
-
"&:active": {
|
|
416
|
-
color: x,
|
|
417
|
-
background: j,
|
|
418
|
-
borderColor: j
|
|
419
|
-
}
|
|
420
|
-
},
|
|
421
|
-
"&-disabled": {
|
|
422
|
-
color: I,
|
|
423
|
-
backgroundColor: p,
|
|
424
|
-
borderColor: a,
|
|
425
|
-
cursor: "not-allowed",
|
|
426
|
-
"&:first-child, &:hover": {
|
|
427
|
-
color: I,
|
|
428
|
-
backgroundColor: p,
|
|
429
|
-
borderColor: a
|
|
430
|
-
}
|
|
431
|
-
},
|
|
432
|
-
[`&-disabled${t}-button-wrapper-checked`]: {
|
|
433
|
-
color: h,
|
|
434
|
-
backgroundColor: P,
|
|
435
|
-
borderColor: a,
|
|
436
|
-
boxShadow: "none"
|
|
437
|
-
},
|
|
438
|
-
"&-block": {
|
|
439
|
-
flex: 1,
|
|
440
|
-
textAlign: "center"
|
|
441
|
-
}
|
|
442
|
-
}
|
|
167
|
+
classes: t,
|
|
168
|
+
checked: r,
|
|
169
|
+
disabled: n,
|
|
170
|
+
edge: s
|
|
171
|
+
} = e, i = {
|
|
172
|
+
root: ["root", r && "checked", n && "disabled", s && `edge${w(s)}`],
|
|
173
|
+
input: ["input"]
|
|
443
174
|
};
|
|
444
|
-
|
|
175
|
+
return M(i, Ye, t);
|
|
176
|
+
}, oo = v(Ee)({
|
|
177
|
+
padding: 9,
|
|
178
|
+
borderRadius: "50%",
|
|
179
|
+
variants: [{
|
|
180
|
+
props: {
|
|
181
|
+
edge: "start",
|
|
182
|
+
size: "small"
|
|
183
|
+
},
|
|
184
|
+
style: {
|
|
185
|
+
marginLeft: -3
|
|
186
|
+
}
|
|
187
|
+
}, {
|
|
188
|
+
props: ({
|
|
189
|
+
edge: e,
|
|
190
|
+
ownerState: t
|
|
191
|
+
}) => e === "start" && t.size !== "small",
|
|
192
|
+
style: {
|
|
193
|
+
marginLeft: -12
|
|
194
|
+
}
|
|
195
|
+
}, {
|
|
196
|
+
props: {
|
|
197
|
+
edge: "end",
|
|
198
|
+
size: "small"
|
|
199
|
+
},
|
|
200
|
+
style: {
|
|
201
|
+
marginRight: -3
|
|
202
|
+
}
|
|
203
|
+
}, {
|
|
204
|
+
props: ({
|
|
205
|
+
edge: e,
|
|
206
|
+
ownerState: t
|
|
207
|
+
}) => e === "end" && t.size !== "small",
|
|
208
|
+
style: {
|
|
209
|
+
marginRight: -12
|
|
210
|
+
}
|
|
211
|
+
}]
|
|
212
|
+
}), to = v("input", {
|
|
213
|
+
shouldForwardProp: oe
|
|
214
|
+
})({
|
|
215
|
+
cursor: "inherit",
|
|
216
|
+
position: "absolute",
|
|
217
|
+
opacity: 0,
|
|
218
|
+
width: "100%",
|
|
219
|
+
height: "100%",
|
|
220
|
+
top: 0,
|
|
221
|
+
left: 0,
|
|
222
|
+
margin: 0,
|
|
223
|
+
padding: 0,
|
|
224
|
+
zIndex: 1
|
|
225
|
+
}), te = /* @__PURE__ */ m.forwardRef(function(t, r) {
|
|
445
226
|
const {
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
227
|
+
autoFocus: n,
|
|
228
|
+
checked: s,
|
|
229
|
+
checkedIcon: i,
|
|
230
|
+
className: p,
|
|
231
|
+
defaultChecked: f,
|
|
232
|
+
disabled: c,
|
|
233
|
+
disableFocusRipple: l = !1,
|
|
234
|
+
edge: u = !1,
|
|
235
|
+
icon: a,
|
|
236
|
+
id: h,
|
|
237
|
+
inputProps: C,
|
|
238
|
+
inputRef: k,
|
|
239
|
+
name: O,
|
|
240
|
+
onBlur: y,
|
|
241
|
+
onChange: x,
|
|
242
|
+
onFocus: b,
|
|
243
|
+
readOnly: T,
|
|
244
|
+
required: S = !1,
|
|
245
|
+
tabIndex: B,
|
|
246
|
+
type: R,
|
|
247
|
+
value: L,
|
|
248
|
+
...Z
|
|
249
|
+
} = t, [E, q] = he({
|
|
250
|
+
controlled: s,
|
|
251
|
+
default: !!f,
|
|
252
|
+
name: "SwitchBase",
|
|
253
|
+
state: "checked"
|
|
254
|
+
}), $ = X(), J = (F) => {
|
|
255
|
+
b && b(F), $ && $.onFocus && $.onFocus(F);
|
|
256
|
+
}, V = (F) => {
|
|
257
|
+
y && y(F), $ && $.onBlur && $.onBlur(F);
|
|
258
|
+
}, j = (F) => {
|
|
259
|
+
if (F.nativeEvent.defaultPrevented)
|
|
260
|
+
return;
|
|
261
|
+
const ae = F.target.checked;
|
|
262
|
+
q(ae), x && x(F, ae);
|
|
481
263
|
};
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
264
|
+
let N = c;
|
|
265
|
+
$ && typeof N > "u" && (N = $.disabled);
|
|
266
|
+
const Re = R === "checkbox" || R === "radio", K = {
|
|
267
|
+
...t,
|
|
268
|
+
checked: E,
|
|
269
|
+
disabled: N,
|
|
270
|
+
disableFocusRipple: l,
|
|
271
|
+
edge: u
|
|
272
|
+
}, se = eo(K);
|
|
273
|
+
return /* @__PURE__ */ P(oo, {
|
|
274
|
+
component: "span",
|
|
275
|
+
className: I(se.root, p),
|
|
276
|
+
centerRipple: !0,
|
|
277
|
+
focusRipple: !l,
|
|
278
|
+
disabled: N,
|
|
279
|
+
tabIndex: null,
|
|
280
|
+
role: void 0,
|
|
281
|
+
onFocus: J,
|
|
282
|
+
onBlur: V,
|
|
283
|
+
ownerState: K,
|
|
284
|
+
ref: r,
|
|
285
|
+
...Z,
|
|
286
|
+
children: [/* @__PURE__ */ d(to, {
|
|
287
|
+
autoFocus: n,
|
|
288
|
+
checked: s,
|
|
289
|
+
defaultChecked: f,
|
|
290
|
+
className: se.input,
|
|
291
|
+
disabled: N,
|
|
292
|
+
id: Re ? h : void 0,
|
|
293
|
+
name: O,
|
|
294
|
+
onChange: j,
|
|
295
|
+
readOnly: T,
|
|
296
|
+
ref: k,
|
|
297
|
+
required: S,
|
|
298
|
+
ownerState: K,
|
|
299
|
+
tabIndex: B,
|
|
300
|
+
type: R,
|
|
301
|
+
...R === "checkbox" && L === void 0 ? {} : {
|
|
302
|
+
value: L
|
|
303
|
+
},
|
|
304
|
+
...C
|
|
305
|
+
}), E ? i : a]
|
|
489
306
|
});
|
|
490
|
-
return [Ue(s), Qe(s), Ye(s)];
|
|
491
|
-
}, Je, {
|
|
492
|
-
unitless: {
|
|
493
|
-
radioSize: !0,
|
|
494
|
-
dotSize: !0
|
|
495
|
-
}
|
|
496
307
|
});
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
308
|
+
process.env.NODE_ENV !== "production" && (te.propTypes = {
|
|
309
|
+
/**
|
|
310
|
+
* If `true`, the `input` element is focused during the first mount.
|
|
311
|
+
*/
|
|
312
|
+
autoFocus: o.bool,
|
|
313
|
+
/**
|
|
314
|
+
* If `true`, the component is checked.
|
|
315
|
+
*/
|
|
316
|
+
checked: o.bool,
|
|
317
|
+
/**
|
|
318
|
+
* The icon to display when the component is checked.
|
|
319
|
+
*/
|
|
320
|
+
checkedIcon: o.node.isRequired,
|
|
321
|
+
/**
|
|
322
|
+
* Override or extend the styles applied to the component.
|
|
323
|
+
*/
|
|
324
|
+
classes: o.object,
|
|
325
|
+
/**
|
|
326
|
+
* @ignore
|
|
327
|
+
*/
|
|
328
|
+
className: o.string,
|
|
329
|
+
/**
|
|
330
|
+
* @ignore
|
|
331
|
+
*/
|
|
332
|
+
defaultChecked: o.bool,
|
|
333
|
+
/**
|
|
334
|
+
* If `true`, the component is disabled.
|
|
335
|
+
*/
|
|
336
|
+
disabled: o.bool,
|
|
337
|
+
/**
|
|
338
|
+
* If `true`, the keyboard focus ripple is disabled.
|
|
339
|
+
* @default false
|
|
340
|
+
*/
|
|
341
|
+
disableFocusRipple: o.bool,
|
|
342
|
+
/**
|
|
343
|
+
* If given, uses a negative margin to counteract the padding on one
|
|
344
|
+
* side (this is often helpful for aligning the left or right
|
|
345
|
+
* side of the icon with content above or below, without ruining the border
|
|
346
|
+
* size and shape).
|
|
347
|
+
* @default false
|
|
348
|
+
*/
|
|
349
|
+
edge: o.oneOf(["end", "start", !1]),
|
|
350
|
+
/**
|
|
351
|
+
* The icon to display when the component is unchecked.
|
|
352
|
+
*/
|
|
353
|
+
icon: o.node.isRequired,
|
|
354
|
+
/**
|
|
355
|
+
* The id of the `input` element.
|
|
356
|
+
*/
|
|
357
|
+
id: o.string,
|
|
358
|
+
/**
|
|
359
|
+
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
360
|
+
*/
|
|
361
|
+
inputProps: o.object,
|
|
362
|
+
/**
|
|
363
|
+
* Pass a ref to the `input` element.
|
|
364
|
+
*/
|
|
365
|
+
inputRef: H,
|
|
366
|
+
/*
|
|
367
|
+
* @ignore
|
|
368
|
+
*/
|
|
369
|
+
name: o.string,
|
|
370
|
+
/**
|
|
371
|
+
* @ignore
|
|
372
|
+
*/
|
|
373
|
+
onBlur: o.func,
|
|
374
|
+
/**
|
|
375
|
+
* Callback fired when the state is changed.
|
|
376
|
+
*
|
|
377
|
+
* @param {object} event The event source of the callback.
|
|
378
|
+
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
379
|
+
*/
|
|
380
|
+
onChange: o.func,
|
|
381
|
+
/**
|
|
382
|
+
* @ignore
|
|
383
|
+
*/
|
|
384
|
+
onFocus: o.func,
|
|
385
|
+
/**
|
|
386
|
+
* It prevents the user from changing the value of the field
|
|
387
|
+
* (not from interacting with the field).
|
|
388
|
+
*/
|
|
389
|
+
readOnly: o.bool,
|
|
390
|
+
/**
|
|
391
|
+
* If `true`, the `input` element is required.
|
|
392
|
+
*/
|
|
393
|
+
required: o.bool,
|
|
394
|
+
/**
|
|
395
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
396
|
+
*/
|
|
397
|
+
sx: o.object,
|
|
398
|
+
/**
|
|
399
|
+
* @ignore
|
|
400
|
+
*/
|
|
401
|
+
tabIndex: o.oneOfType([o.number, o.string]),
|
|
402
|
+
/**
|
|
403
|
+
* The input component prop `type`.
|
|
404
|
+
*/
|
|
405
|
+
type: o.string.isRequired,
|
|
406
|
+
/**
|
|
407
|
+
* The value of the component.
|
|
408
|
+
*/
|
|
409
|
+
value: o.any
|
|
410
|
+
});
|
|
411
|
+
function ro(e) {
|
|
412
|
+
return D("MuiFormControlLabel", e);
|
|
413
|
+
}
|
|
414
|
+
const U = G("MuiFormControlLabel", ["root", "labelPlacementStart", "labelPlacementTop", "labelPlacementBottom", "disabled", "label", "error", "required", "asterisk"]), no = (e) => {
|
|
415
|
+
const {
|
|
416
|
+
classes: t,
|
|
417
|
+
disabled: r,
|
|
418
|
+
labelPlacement: n,
|
|
419
|
+
error: s,
|
|
420
|
+
required: i
|
|
421
|
+
} = e, p = {
|
|
422
|
+
root: ["root", r && "disabled", `labelPlacement${w(n)}`, s && "error", i && "required"],
|
|
423
|
+
label: ["label", r && "disabled"],
|
|
424
|
+
asterisk: ["asterisk", s && "error"]
|
|
425
|
+
};
|
|
426
|
+
return M(p, ro, t);
|
|
427
|
+
}, so = v("label", {
|
|
428
|
+
name: "MuiFormControlLabel",
|
|
429
|
+
slot: "Root",
|
|
430
|
+
overridesResolver: (e, t) => {
|
|
431
|
+
const {
|
|
432
|
+
ownerState: r
|
|
433
|
+
} = e;
|
|
434
|
+
return [{
|
|
435
|
+
[`& .${U.label}`]: t.label
|
|
436
|
+
}, t.root, t[`labelPlacement${w(r.labelPlacement)}`]];
|
|
516
437
|
}
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
438
|
+
})(z(({
|
|
439
|
+
theme: e
|
|
440
|
+
}) => ({
|
|
441
|
+
display: "inline-flex",
|
|
442
|
+
alignItems: "center",
|
|
443
|
+
cursor: "pointer",
|
|
444
|
+
// For correct alignment with the text.
|
|
445
|
+
verticalAlign: "middle",
|
|
446
|
+
WebkitTapHighlightColor: "transparent",
|
|
447
|
+
marginLeft: -11,
|
|
448
|
+
marginRight: 16,
|
|
449
|
+
// used for row presentation of radio/checkbox
|
|
450
|
+
[`&.${U.disabled}`]: {
|
|
451
|
+
cursor: "default"
|
|
452
|
+
},
|
|
453
|
+
[`& .${U.label}`]: {
|
|
454
|
+
[`&.${U.disabled}`]: {
|
|
455
|
+
color: (e.vars || e).palette.text.disabled
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
variants: [{
|
|
459
|
+
props: {
|
|
460
|
+
labelPlacement: "start"
|
|
461
|
+
},
|
|
462
|
+
style: {
|
|
463
|
+
flexDirection: "row-reverse",
|
|
464
|
+
marginRight: -11
|
|
465
|
+
}
|
|
520
466
|
}, {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
}
|
|
553
|
-
},
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
getPrefixCls: i,
|
|
558
|
-
direction: t
|
|
559
|
-
} = d.useContext(W), {
|
|
560
|
-
prefixCls: o,
|
|
561
|
-
className: s,
|
|
562
|
-
rootClassName: a,
|
|
563
|
-
options: r,
|
|
564
|
-
buttonStyle: l = "outline",
|
|
565
|
-
disabled: c,
|
|
566
|
-
children: g,
|
|
567
|
-
size: u,
|
|
568
|
-
style: S,
|
|
569
|
-
id: m,
|
|
570
|
-
optionType: w,
|
|
571
|
-
name: y,
|
|
572
|
-
defaultValue: b,
|
|
573
|
-
value: k,
|
|
574
|
-
block: f = !1,
|
|
575
|
-
onChange: v,
|
|
576
|
-
onMouseEnter: x,
|
|
577
|
-
onMouseLeave: I,
|
|
578
|
-
onFocus: p,
|
|
579
|
-
onBlur: P
|
|
580
|
-
} = e, [h, $] = Y(b, {
|
|
581
|
-
value: k
|
|
582
|
-
}), z = d.useCallback((O) => {
|
|
583
|
-
const H = h, B = O.target.value;
|
|
584
|
-
"value" in e || $(B), B !== H && (v == null || v(O));
|
|
585
|
-
}, [h, $, v]), C = i("radio", o), R = `${C}-group`, N = ge(C), [j, M, T] = we(C, N);
|
|
586
|
-
let X = g;
|
|
587
|
-
r && r.length > 0 && (X = r.map((O) => typeof O == "string" || typeof O == "number" ? /* @__PURE__ */ d.createElement(G, {
|
|
588
|
-
key: O.toString(),
|
|
589
|
-
prefixCls: C,
|
|
590
|
-
disabled: c,
|
|
591
|
-
value: O,
|
|
592
|
-
checked: h === O
|
|
593
|
-
}, O) : /* @__PURE__ */ d.createElement(G, {
|
|
594
|
-
key: `radio-group-value-options-${O.value}`,
|
|
595
|
-
prefixCls: C,
|
|
596
|
-
disabled: O.disabled || c,
|
|
597
|
-
value: O.value,
|
|
598
|
-
checked: h === O.value,
|
|
599
|
-
title: O.title,
|
|
600
|
-
style: O.style,
|
|
601
|
-
id: O.id,
|
|
602
|
-
required: O.required
|
|
603
|
-
}, O.label)));
|
|
604
|
-
const q = pe(u), V = _(R, `${R}-${l}`, {
|
|
605
|
-
[`${R}-${q}`]: q,
|
|
606
|
-
[`${R}-rtl`]: t === "rtl",
|
|
607
|
-
[`${R}-block`]: f
|
|
608
|
-
}, s, a, M, T, N), J = d.useMemo(() => ({
|
|
609
|
-
onChange: z,
|
|
610
|
-
value: h,
|
|
611
|
-
disabled: c,
|
|
612
|
-
name: y,
|
|
613
|
-
optionType: w,
|
|
614
|
-
block: f
|
|
615
|
-
}), [z, h, c, y, w, f]);
|
|
616
|
-
return j(/* @__PURE__ */ d.createElement("div", Object.assign({}, Ae(e, {
|
|
617
|
-
aria: !0,
|
|
618
|
-
data: !0
|
|
467
|
+
props: {
|
|
468
|
+
labelPlacement: "top"
|
|
469
|
+
},
|
|
470
|
+
style: {
|
|
471
|
+
flexDirection: "column-reverse"
|
|
472
|
+
}
|
|
473
|
+
}, {
|
|
474
|
+
props: {
|
|
475
|
+
labelPlacement: "bottom"
|
|
476
|
+
},
|
|
477
|
+
style: {
|
|
478
|
+
flexDirection: "column"
|
|
479
|
+
}
|
|
480
|
+
}, {
|
|
481
|
+
props: ({
|
|
482
|
+
labelPlacement: t
|
|
483
|
+
}) => t === "start" || t === "top" || t === "bottom",
|
|
484
|
+
style: {
|
|
485
|
+
marginLeft: 16
|
|
486
|
+
// used for row presentation of radio/checkbox
|
|
487
|
+
}
|
|
488
|
+
}]
|
|
489
|
+
}))), ao = v("span", {
|
|
490
|
+
name: "MuiFormControlLabel",
|
|
491
|
+
slot: "Asterisk",
|
|
492
|
+
overridesResolver: (e, t) => t.asterisk
|
|
493
|
+
})(z(({
|
|
494
|
+
theme: e
|
|
495
|
+
}) => ({
|
|
496
|
+
[`&.${U.error}`]: {
|
|
497
|
+
color: (e.vars || e).palette.error.main
|
|
498
|
+
}
|
|
499
|
+
}))), ve = /* @__PURE__ */ m.forwardRef(function(t, r) {
|
|
500
|
+
const n = A({
|
|
501
|
+
props: t,
|
|
502
|
+
name: "MuiFormControlLabel"
|
|
619
503
|
}), {
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
const it = (e, n) => {
|
|
640
|
-
const {
|
|
641
|
-
getPrefixCls: i
|
|
642
|
-
} = d.useContext(W), {
|
|
643
|
-
prefixCls: t
|
|
644
|
-
} = e, o = ot(e, ["prefixCls"]), s = i("radio", t);
|
|
645
|
-
return /* @__PURE__ */ d.createElement(Fe, {
|
|
646
|
-
value: "button"
|
|
647
|
-
}, /* @__PURE__ */ d.createElement(G, Object.assign({
|
|
648
|
-
prefixCls: s
|
|
649
|
-
}, o, {
|
|
650
|
-
type: "radio",
|
|
651
|
-
ref: n
|
|
652
|
-
})));
|
|
653
|
-
}, rt = /* @__PURE__ */ d.forwardRef(it), F = G;
|
|
654
|
-
F.Button = rt;
|
|
655
|
-
F.Group = nt;
|
|
656
|
-
F.__ANT_RADIO = !0;
|
|
657
|
-
const at = (e) => {
|
|
658
|
-
const {
|
|
659
|
-
componentCls: n,
|
|
660
|
-
sizePaddingEdgeHorizontal: i,
|
|
661
|
-
colorSplit: t,
|
|
662
|
-
lineWidth: o,
|
|
663
|
-
textPaddingInline: s,
|
|
664
|
-
orientationMargin: a,
|
|
665
|
-
verticalMarginInline: r
|
|
666
|
-
} = e;
|
|
667
|
-
return {
|
|
668
|
-
[n]: Object.assign(Object.assign({}, A(e)), {
|
|
669
|
-
borderBlockStart: `${E(o)} solid ${t}`,
|
|
670
|
-
// vertical
|
|
671
|
-
"&-vertical": {
|
|
672
|
-
position: "relative",
|
|
673
|
-
top: "-0.06em",
|
|
674
|
-
display: "inline-block",
|
|
675
|
-
height: "0.9em",
|
|
676
|
-
marginInline: r,
|
|
677
|
-
marginBlock: 0,
|
|
678
|
-
verticalAlign: "middle",
|
|
679
|
-
borderTop: 0,
|
|
680
|
-
borderInlineStart: `${E(o)} solid ${t}`
|
|
681
|
-
},
|
|
682
|
-
"&-horizontal": {
|
|
683
|
-
display: "flex",
|
|
684
|
-
clear: "both",
|
|
685
|
-
width: "100%",
|
|
686
|
-
minWidth: "100%",
|
|
687
|
-
// Fix https://github.com/ant-design/ant-design/issues/10914
|
|
688
|
-
margin: `${E(e.dividerHorizontalGutterMargin)} 0`
|
|
689
|
-
},
|
|
690
|
-
[`&-horizontal${n}-with-text`]: {
|
|
691
|
-
display: "flex",
|
|
692
|
-
alignItems: "center",
|
|
693
|
-
margin: `${E(e.dividerHorizontalWithTextGutterMargin)} 0`,
|
|
694
|
-
color: e.colorTextHeading,
|
|
695
|
-
fontWeight: 500,
|
|
696
|
-
fontSize: e.fontSizeLG,
|
|
697
|
-
whiteSpace: "nowrap",
|
|
698
|
-
textAlign: "center",
|
|
699
|
-
borderBlockStart: `0 ${t}`,
|
|
700
|
-
"&::before, &::after": {
|
|
701
|
-
position: "relative",
|
|
702
|
-
width: "50%",
|
|
703
|
-
borderBlockStart: `${E(o)} solid transparent`,
|
|
704
|
-
// Chrome not accept `inherit` in `border-top`
|
|
705
|
-
borderBlockStartColor: "inherit",
|
|
706
|
-
borderBlockEnd: 0,
|
|
707
|
-
transform: "translateY(50%)",
|
|
708
|
-
content: "''"
|
|
709
|
-
}
|
|
710
|
-
},
|
|
711
|
-
[`&-horizontal${n}-with-text-left`]: {
|
|
712
|
-
"&::before": {
|
|
713
|
-
width: `calc(${a} * 100%)`
|
|
714
|
-
},
|
|
715
|
-
"&::after": {
|
|
716
|
-
width: `calc(100% - ${a} * 100%)`
|
|
717
|
-
}
|
|
718
|
-
},
|
|
719
|
-
[`&-horizontal${n}-with-text-right`]: {
|
|
720
|
-
"&::before": {
|
|
721
|
-
width: `calc(100% - ${a} * 100%)`
|
|
722
|
-
},
|
|
723
|
-
"&::after": {
|
|
724
|
-
width: `calc(${a} * 100%)`
|
|
725
|
-
}
|
|
726
|
-
},
|
|
727
|
-
[`${n}-inner-text`]: {
|
|
728
|
-
display: "inline-block",
|
|
729
|
-
paddingBlock: 0,
|
|
730
|
-
paddingInline: s
|
|
731
|
-
},
|
|
732
|
-
"&-dashed": {
|
|
733
|
-
background: "none",
|
|
734
|
-
borderColor: t,
|
|
735
|
-
borderStyle: "dashed",
|
|
736
|
-
borderWidth: `${E(o)} 0 0`
|
|
737
|
-
},
|
|
738
|
-
[`&-horizontal${n}-with-text${n}-dashed`]: {
|
|
739
|
-
"&::before, &::after": {
|
|
740
|
-
borderStyle: "dashed none none"
|
|
741
|
-
}
|
|
742
|
-
},
|
|
743
|
-
[`&-vertical${n}-dashed`]: {
|
|
744
|
-
borderInlineStartWidth: o,
|
|
745
|
-
borderInlineEnd: 0,
|
|
746
|
-
borderBlockStart: 0,
|
|
747
|
-
borderBlockEnd: 0
|
|
748
|
-
},
|
|
749
|
-
"&-dotted": {
|
|
750
|
-
background: "none",
|
|
751
|
-
borderColor: t,
|
|
752
|
-
borderStyle: "dotted",
|
|
753
|
-
borderWidth: `${E(o)} 0 0`
|
|
754
|
-
},
|
|
755
|
-
[`&-horizontal${n}-with-text${n}-dotted`]: {
|
|
756
|
-
"&::before, &::after": {
|
|
757
|
-
borderStyle: "dotted none none"
|
|
758
|
-
}
|
|
759
|
-
},
|
|
760
|
-
[`&-vertical${n}-dotted`]: {
|
|
761
|
-
borderInlineStartWidth: o,
|
|
762
|
-
borderInlineEnd: 0,
|
|
763
|
-
borderBlockStart: 0,
|
|
764
|
-
borderBlockEnd: 0
|
|
765
|
-
},
|
|
766
|
-
[`&-plain${n}-with-text`]: {
|
|
767
|
-
color: e.colorText,
|
|
768
|
-
fontWeight: "normal",
|
|
769
|
-
fontSize: e.fontSize
|
|
770
|
-
},
|
|
771
|
-
[`&-horizontal${n}-with-text-left${n}-no-default-orientation-margin-left`]: {
|
|
772
|
-
"&::before": {
|
|
773
|
-
width: 0
|
|
774
|
-
},
|
|
775
|
-
"&::after": {
|
|
776
|
-
width: "100%"
|
|
777
|
-
},
|
|
778
|
-
[`${n}-inner-text`]: {
|
|
779
|
-
paddingInlineStart: i
|
|
780
|
-
}
|
|
781
|
-
},
|
|
782
|
-
[`&-horizontal${n}-with-text-right${n}-no-default-orientation-margin-right`]: {
|
|
783
|
-
"&::before": {
|
|
784
|
-
width: "100%"
|
|
785
|
-
},
|
|
786
|
-
"&::after": {
|
|
787
|
-
width: 0
|
|
788
|
-
},
|
|
789
|
-
[`${n}-inner-text`]: {
|
|
790
|
-
paddingInlineEnd: i
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
})
|
|
504
|
+
checked: s,
|
|
505
|
+
className: i,
|
|
506
|
+
componentsProps: p = {},
|
|
507
|
+
control: f,
|
|
508
|
+
disabled: c,
|
|
509
|
+
disableTypography: l,
|
|
510
|
+
inputRef: u,
|
|
511
|
+
label: a,
|
|
512
|
+
labelPlacement: h = "end",
|
|
513
|
+
name: C,
|
|
514
|
+
onChange: k,
|
|
515
|
+
required: O,
|
|
516
|
+
slots: y = {},
|
|
517
|
+
slotProps: x = {},
|
|
518
|
+
value: b,
|
|
519
|
+
...T
|
|
520
|
+
} = n, S = X(), B = c ?? f.props.disabled ?? (S == null ? void 0 : S.disabled), R = O ?? f.props.required, L = {
|
|
521
|
+
disabled: B,
|
|
522
|
+
required: R
|
|
794
523
|
};
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
orientationMargin: 0.05,
|
|
798
|
-
verticalMarginInline: e.marginXS
|
|
799
|
-
}), dt = ne("Divider", (e) => {
|
|
800
|
-
const n = oe(e, {
|
|
801
|
-
dividerHorizontalWithTextGutterMargin: e.margin,
|
|
802
|
-
dividerHorizontalGutterMargin: e.marginLG,
|
|
803
|
-
sizePaddingEdgeHorizontal: 0
|
|
524
|
+
["checked", "name", "onChange", "value", "inputRef"].forEach((N) => {
|
|
525
|
+
typeof f.props[N] > "u" && typeof n[N] < "u" && (L[N] = n[N]);
|
|
804
526
|
});
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
527
|
+
const Z = ye({
|
|
528
|
+
props: n,
|
|
529
|
+
muiFormControl: S,
|
|
530
|
+
states: ["error"]
|
|
531
|
+
}), E = {
|
|
532
|
+
...n,
|
|
533
|
+
disabled: B,
|
|
534
|
+
labelPlacement: h,
|
|
535
|
+
required: R,
|
|
536
|
+
error: Z.error
|
|
537
|
+
}, q = no(E), $ = {
|
|
538
|
+
slots: y,
|
|
539
|
+
slotProps: {
|
|
540
|
+
...p,
|
|
541
|
+
...x
|
|
542
|
+
}
|
|
543
|
+
}, [J, V] = Me("typography", {
|
|
544
|
+
elementType: _,
|
|
545
|
+
externalForwardedProps: $,
|
|
546
|
+
ownerState: E
|
|
547
|
+
});
|
|
548
|
+
let j = a;
|
|
549
|
+
return j != null && j.type !== _ && !l && (j = /* @__PURE__ */ d(J, {
|
|
550
|
+
component: "span",
|
|
551
|
+
...V,
|
|
552
|
+
className: I(q.label, V == null ? void 0 : V.className),
|
|
553
|
+
children: j
|
|
554
|
+
})), /* @__PURE__ */ P(so, {
|
|
555
|
+
className: I(q.root, i),
|
|
556
|
+
ownerState: E,
|
|
557
|
+
ref: r,
|
|
558
|
+
...T,
|
|
559
|
+
children: [/* @__PURE__ */ m.cloneElement(f, L), R ? /* @__PURE__ */ P("div", {
|
|
560
|
+
children: [j, /* @__PURE__ */ P(ao, {
|
|
561
|
+
ownerState: E,
|
|
562
|
+
"aria-hidden": !0,
|
|
563
|
+
className: q.asterisk,
|
|
564
|
+
children: [" ", "*"]
|
|
565
|
+
})]
|
|
566
|
+
}) : j]
|
|
567
|
+
});
|
|
568
|
+
});
|
|
569
|
+
process.env.NODE_ENV !== "production" && (ve.propTypes = {
|
|
570
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
571
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
572
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
573
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
574
|
+
/**
|
|
575
|
+
* If `true`, the component appears selected.
|
|
576
|
+
*/
|
|
577
|
+
checked: o.bool,
|
|
578
|
+
/**
|
|
579
|
+
* Override or extend the styles applied to the component.
|
|
580
|
+
*/
|
|
581
|
+
classes: o.object,
|
|
582
|
+
/**
|
|
583
|
+
* @ignore
|
|
584
|
+
*/
|
|
585
|
+
className: o.string,
|
|
586
|
+
/**
|
|
587
|
+
* The props used for each slot inside.
|
|
588
|
+
* @default {}
|
|
589
|
+
* @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
590
|
+
*/
|
|
591
|
+
componentsProps: o.shape({
|
|
592
|
+
typography: o.object
|
|
593
|
+
}),
|
|
594
|
+
/**
|
|
595
|
+
* A control element. For instance, it can be a `Radio`, a `Switch` or a `Checkbox`.
|
|
596
|
+
*/
|
|
597
|
+
control: o.element.isRequired,
|
|
598
|
+
/**
|
|
599
|
+
* If `true`, the control is disabled.
|
|
600
|
+
*/
|
|
601
|
+
disabled: o.bool,
|
|
602
|
+
/**
|
|
603
|
+
* If `true`, the label is rendered as it is passed without an additional typography node.
|
|
604
|
+
*/
|
|
605
|
+
disableTypography: o.bool,
|
|
606
|
+
/**
|
|
607
|
+
* Pass a ref to the `input` element.
|
|
608
|
+
*/
|
|
609
|
+
inputRef: H,
|
|
610
|
+
/**
|
|
611
|
+
* A text or an element to be used in an enclosing label element.
|
|
612
|
+
*/
|
|
613
|
+
label: o.node,
|
|
614
|
+
/**
|
|
615
|
+
* The position of the label.
|
|
616
|
+
* @default 'end'
|
|
617
|
+
*/
|
|
618
|
+
labelPlacement: o.oneOf(["bottom", "end", "start", "top"]),
|
|
619
|
+
/**
|
|
620
|
+
* @ignore
|
|
621
|
+
*/
|
|
622
|
+
name: o.string,
|
|
623
|
+
/**
|
|
624
|
+
* Callback fired when the state is changed.
|
|
625
|
+
*
|
|
626
|
+
* @param {React.SyntheticEvent} event The event source of the callback.
|
|
627
|
+
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
628
|
+
*/
|
|
629
|
+
onChange: o.func,
|
|
630
|
+
/**
|
|
631
|
+
* If `true`, the label will indicate that the `input` is required.
|
|
632
|
+
*/
|
|
633
|
+
required: o.bool,
|
|
634
|
+
/**
|
|
635
|
+
* The props used for each slot inside.
|
|
636
|
+
* @default {}
|
|
637
|
+
*/
|
|
638
|
+
slotProps: o.shape({
|
|
639
|
+
typography: o.oneOfType([o.func, o.object])
|
|
640
|
+
}),
|
|
641
|
+
/**
|
|
642
|
+
* The components used for each slot inside.
|
|
643
|
+
* @default {}
|
|
644
|
+
*/
|
|
645
|
+
slots: o.shape({
|
|
646
|
+
typography: o.elementType
|
|
647
|
+
}),
|
|
648
|
+
/**
|
|
649
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
650
|
+
*/
|
|
651
|
+
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
|
|
652
|
+
/**
|
|
653
|
+
* The value of the component.
|
|
654
|
+
*/
|
|
655
|
+
value: o.any
|
|
656
|
+
});
|
|
657
|
+
function io(e) {
|
|
658
|
+
return D("MuiFormGroup", e);
|
|
659
|
+
}
|
|
660
|
+
G("MuiFormGroup", ["root", "row", "error"]);
|
|
661
|
+
const lo = (e) => {
|
|
662
|
+
const {
|
|
663
|
+
classes: t,
|
|
664
|
+
row: r,
|
|
665
|
+
error: n
|
|
666
|
+
} = e;
|
|
667
|
+
return M({
|
|
668
|
+
root: ["root", r && "row", n && "error"]
|
|
669
|
+
}, io, t);
|
|
670
|
+
}, co = v("div", {
|
|
671
|
+
name: "MuiFormGroup",
|
|
672
|
+
slot: "Root",
|
|
673
|
+
overridesResolver: (e, t) => {
|
|
674
|
+
const {
|
|
675
|
+
ownerState: r
|
|
676
|
+
} = e;
|
|
677
|
+
return [t.root, r.row && t.row];
|
|
809
678
|
}
|
|
679
|
+
})({
|
|
680
|
+
display: "flex",
|
|
681
|
+
flexDirection: "column",
|
|
682
|
+
flexWrap: "wrap",
|
|
683
|
+
variants: [{
|
|
684
|
+
props: {
|
|
685
|
+
row: !0
|
|
686
|
+
},
|
|
687
|
+
style: {
|
|
688
|
+
flexDirection: "row"
|
|
689
|
+
}
|
|
690
|
+
}]
|
|
691
|
+
}), Ce = /* @__PURE__ */ m.forwardRef(function(t, r) {
|
|
692
|
+
const n = A({
|
|
693
|
+
props: t,
|
|
694
|
+
name: "MuiFormGroup"
|
|
695
|
+
}), {
|
|
696
|
+
className: s,
|
|
697
|
+
row: i = !1,
|
|
698
|
+
...p
|
|
699
|
+
} = n, f = X(), c = ye({
|
|
700
|
+
props: n,
|
|
701
|
+
muiFormControl: f,
|
|
702
|
+
states: ["error"]
|
|
703
|
+
}), l = {
|
|
704
|
+
...n,
|
|
705
|
+
row: i,
|
|
706
|
+
error: c.error
|
|
707
|
+
}, u = lo(l);
|
|
708
|
+
return /* @__PURE__ */ d(co, {
|
|
709
|
+
className: I(u.root, s),
|
|
710
|
+
ownerState: l,
|
|
711
|
+
ref: r,
|
|
712
|
+
...p
|
|
713
|
+
});
|
|
810
714
|
});
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
715
|
+
process.env.NODE_ENV !== "production" && (Ce.propTypes = {
|
|
716
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
717
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
718
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
719
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
720
|
+
/**
|
|
721
|
+
* The content of the component.
|
|
722
|
+
*/
|
|
723
|
+
children: o.node,
|
|
724
|
+
/**
|
|
725
|
+
* Override or extend the styles applied to the component.
|
|
726
|
+
*/
|
|
727
|
+
classes: o.object,
|
|
728
|
+
/**
|
|
729
|
+
* @ignore
|
|
730
|
+
*/
|
|
731
|
+
className: o.string,
|
|
732
|
+
/**
|
|
733
|
+
* Display group of elements in a compact row.
|
|
734
|
+
* @default false
|
|
735
|
+
*/
|
|
736
|
+
row: o.bool,
|
|
737
|
+
/**
|
|
738
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
739
|
+
*/
|
|
740
|
+
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
|
|
741
|
+
});
|
|
742
|
+
const po = be(/* @__PURE__ */ d("path", {
|
|
743
|
+
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"
|
|
744
|
+
}), "RadioButtonUnchecked"), uo = be(/* @__PURE__ */ d("path", {
|
|
745
|
+
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"
|
|
746
|
+
}), "RadioButtonChecked"), fo = v("span", {
|
|
747
|
+
shouldForwardProp: oe
|
|
748
|
+
})({
|
|
749
|
+
position: "relative",
|
|
750
|
+
display: "flex"
|
|
751
|
+
}), mo = v(po)({
|
|
752
|
+
// Scale applied to prevent dot misalignment in Safari
|
|
753
|
+
transform: "scale(1)"
|
|
754
|
+
}), ho = v(uo)(z(({
|
|
755
|
+
theme: e
|
|
756
|
+
}) => ({
|
|
757
|
+
left: 0,
|
|
758
|
+
position: "absolute",
|
|
759
|
+
transform: "scale(0)",
|
|
760
|
+
transition: e.transitions.create("transform", {
|
|
761
|
+
easing: e.transitions.easing.easeIn,
|
|
762
|
+
duration: e.transitions.duration.shortest
|
|
763
|
+
}),
|
|
764
|
+
variants: [{
|
|
765
|
+
props: {
|
|
766
|
+
checked: !0
|
|
767
|
+
},
|
|
768
|
+
style: {
|
|
769
|
+
transform: "scale(1)",
|
|
770
|
+
transition: e.transitions.create("transform", {
|
|
771
|
+
easing: e.transitions.easing.easeOut,
|
|
772
|
+
duration: e.transitions.duration.shortest
|
|
773
|
+
})
|
|
774
|
+
}
|
|
775
|
+
}]
|
|
776
|
+
})));
|
|
777
|
+
function re(e) {
|
|
819
778
|
const {
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
} =
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
className:
|
|
829
|
-
|
|
830
|
-
children:
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
[`${b}-${S}`]: S !== "solid",
|
|
840
|
-
[`${b}-plain`]: !!m,
|
|
841
|
-
[`${b}-rtl`]: i === "rtl",
|
|
842
|
-
[`${b}-no-default-orientation-margin-left`]: I,
|
|
843
|
-
[`${b}-no-default-orientation-margin-right`]: p
|
|
844
|
-
}, l, c), h = d.useMemo(() => typeof r == "number" ? r : /^\d+$/.test(r) ? Number(r) : r, [r]), $ = Object.assign(Object.assign({}, I && {
|
|
845
|
-
marginLeft: h
|
|
846
|
-
}), p && {
|
|
847
|
-
marginRight: h
|
|
779
|
+
checked: t = !1,
|
|
780
|
+
classes: r = {},
|
|
781
|
+
fontSize: n
|
|
782
|
+
} = e, s = {
|
|
783
|
+
...e,
|
|
784
|
+
checked: t
|
|
785
|
+
};
|
|
786
|
+
return /* @__PURE__ */ P(fo, {
|
|
787
|
+
className: r.root,
|
|
788
|
+
ownerState: s,
|
|
789
|
+
children: [/* @__PURE__ */ d(mo, {
|
|
790
|
+
fontSize: n,
|
|
791
|
+
className: r.background,
|
|
792
|
+
ownerState: s
|
|
793
|
+
}), /* @__PURE__ */ d(ho, {
|
|
794
|
+
fontSize: n,
|
|
795
|
+
className: r.dot,
|
|
796
|
+
ownerState: s
|
|
797
|
+
})]
|
|
848
798
|
});
|
|
849
|
-
if (process.env.NODE_ENV !== "production") {
|
|
850
|
-
const z = Se("Divider");
|
|
851
|
-
process.env.NODE_ENV !== "production" && z(!g || s !== "vertical", "usage", "`children` not working in `vertical` mode.");
|
|
852
|
-
}
|
|
853
|
-
return k(/* @__PURE__ */ d.createElement("div", Object.assign({
|
|
854
|
-
className: P,
|
|
855
|
-
style: Object.assign(Object.assign({}, t == null ? void 0 : t.style), w)
|
|
856
|
-
}, y, {
|
|
857
|
-
role: "separator"
|
|
858
|
-
}), g && s !== "vertical" && /* @__PURE__ */ d.createElement("span", {
|
|
859
|
-
className: `${b}-inner-text`,
|
|
860
|
-
style: $
|
|
861
|
-
}, g)));
|
|
862
|
-
};
|
|
863
|
-
process.env.NODE_ENV !== "production" && (ke.displayName = "Divider");
|
|
864
|
-
function se(e) {
|
|
865
|
-
return ["small", "middle", "large"].includes(e);
|
|
866
799
|
}
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
latestIndex: a
|
|
882
|
-
} = d.useContext(Ie);
|
|
883
|
-
return t == null ? null : /* @__PURE__ */ d.createElement(d.Fragment, null, /* @__PURE__ */ d.createElement("div", {
|
|
884
|
-
className: n,
|
|
885
|
-
style: s
|
|
886
|
-
}, t), i < a && o && /* @__PURE__ */ d.createElement("span", {
|
|
887
|
-
className: `${n}-split`
|
|
888
|
-
}, o));
|
|
889
|
-
};
|
|
890
|
-
var ht = function(e, n) {
|
|
891
|
-
var i = {};
|
|
892
|
-
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (i[t] = e[t]);
|
|
893
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, t = Object.getOwnPropertySymbols(e); o < t.length; o++)
|
|
894
|
-
n.indexOf(t[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[o]) && (i[t[o]] = e[t[o]]);
|
|
895
|
-
return i;
|
|
896
|
-
};
|
|
897
|
-
const gt = /* @__PURE__ */ d.forwardRef((e, n) => {
|
|
898
|
-
var i, t, o;
|
|
899
|
-
const {
|
|
900
|
-
getPrefixCls: s,
|
|
901
|
-
space: a,
|
|
902
|
-
direction: r
|
|
903
|
-
} = d.useContext(W), {
|
|
904
|
-
size: l = (i = a == null ? void 0 : a.size) !== null && i !== void 0 ? i : "small",
|
|
905
|
-
align: c,
|
|
906
|
-
className: g,
|
|
907
|
-
rootClassName: u,
|
|
908
|
-
children: S,
|
|
909
|
-
direction: m = "horizontal",
|
|
910
|
-
prefixCls: w,
|
|
911
|
-
split: y,
|
|
912
|
-
style: b,
|
|
913
|
-
wrap: k = !1,
|
|
914
|
-
classNames: f,
|
|
915
|
-
styles: v
|
|
916
|
-
} = e, x = ht(e, ["size", "align", "className", "rootClassName", "children", "direction", "prefixCls", "split", "style", "wrap", "classNames", "styles"]), [I, p] = Array.isArray(l) ? l : [l, l], P = se(p), h = se(I), $ = ce(p), z = ce(I), C = Te(S, {
|
|
917
|
-
keepEmpty: !0
|
|
918
|
-
}), R = c === void 0 && m === "horizontal" ? "center" : c, N = s("space", w), [j, M, T] = He(N), X = _(N, a == null ? void 0 : a.className, M, `${N}-${m}`, {
|
|
919
|
-
[`${N}-rtl`]: r === "rtl",
|
|
920
|
-
[`${N}-align-${R}`]: R,
|
|
921
|
-
[`${N}-gap-row-${p}`]: P,
|
|
922
|
-
[`${N}-gap-col-${I}`]: h
|
|
923
|
-
}, g, u, T), q = _(`${N}-item`, (t = f == null ? void 0 : f.item) !== null && t !== void 0 ? t : (o = a == null ? void 0 : a.classNames) === null || o === void 0 ? void 0 : o.item);
|
|
924
|
-
let V = 0;
|
|
925
|
-
const J = C.map((B, Z) => {
|
|
926
|
-
var ee, te;
|
|
927
|
-
B != null && (V = Z);
|
|
928
|
-
const Oe = (B == null ? void 0 : B.key) || `${q}-${Z}`;
|
|
929
|
-
return /* @__PURE__ */ d.createElement(ut, {
|
|
930
|
-
className: q,
|
|
931
|
-
key: Oe,
|
|
932
|
-
index: Z,
|
|
933
|
-
split: y,
|
|
934
|
-
style: (ee = v == null ? void 0 : v.item) !== null && ee !== void 0 ? ee : (te = a == null ? void 0 : a.styles) === null || te === void 0 ? void 0 : te.item
|
|
935
|
-
}, B);
|
|
936
|
-
}), O = d.useMemo(() => ({
|
|
937
|
-
latestIndex: V
|
|
938
|
-
}), [V]);
|
|
939
|
-
if (C.length === 0)
|
|
940
|
-
return null;
|
|
941
|
-
const H = {};
|
|
942
|
-
return k && (H.flexWrap = "wrap"), !h && z && (H.columnGap = I), !P && $ && (H.rowGap = p), j(/* @__PURE__ */ d.createElement("div", Object.assign({
|
|
943
|
-
ref: n,
|
|
944
|
-
className: X,
|
|
945
|
-
style: Object.assign(Object.assign(Object.assign({}, H), a == null ? void 0 : a.style), b)
|
|
946
|
-
}, x), /* @__PURE__ */ d.createElement(ct, {
|
|
947
|
-
value: O
|
|
948
|
-
}, J)));
|
|
949
|
-
}), ie = gt;
|
|
950
|
-
ie.Compact = _e;
|
|
951
|
-
process.env.NODE_ENV !== "production" && (ie.displayName = "Space");
|
|
952
|
-
var bt = ["prefixCls", "className", "checked", "defaultChecked", "disabled", "loadingIcon", "checkedChildren", "unCheckedChildren", "onClick", "onChange", "onKeyDown"], Ee = /* @__PURE__ */ d.forwardRef(function(e, n) {
|
|
953
|
-
var i, t = e.prefixCls, o = t === void 0 ? "rc-switch" : t, s = e.className, a = e.checked, r = e.defaultChecked, l = e.disabled, c = e.loadingIcon, g = e.checkedChildren, u = e.unCheckedChildren, S = e.onClick, m = e.onChange, w = e.onKeyDown, y = fe(e, bt), b = Y(!1, {
|
|
954
|
-
value: a,
|
|
955
|
-
defaultValue: r
|
|
956
|
-
}), k = me(b, 2), f = k[0], v = k[1];
|
|
957
|
-
function x(h, $) {
|
|
958
|
-
var z = f;
|
|
959
|
-
return l || (z = h, v(z), m == null || m(z, $)), z;
|
|
960
|
-
}
|
|
961
|
-
function I(h) {
|
|
962
|
-
h.which === ae.LEFT ? x(!1, h) : h.which === ae.RIGHT && x(!0, h), w == null || w(h);
|
|
963
|
-
}
|
|
964
|
-
function p(h) {
|
|
965
|
-
var $ = x(!f, h);
|
|
966
|
-
S == null || S($, h);
|
|
967
|
-
}
|
|
968
|
-
var P = _(o, s, (i = {}, U(i, "".concat(o, "-checked"), f), U(i, "".concat(o, "-disabled"), l), i));
|
|
969
|
-
return /* @__PURE__ */ d.createElement("button", ve({}, y, {
|
|
970
|
-
type: "button",
|
|
971
|
-
role: "switch",
|
|
972
|
-
"aria-checked": f,
|
|
973
|
-
disabled: l,
|
|
974
|
-
className: P,
|
|
975
|
-
ref: n,
|
|
976
|
-
onKeyDown: I,
|
|
977
|
-
onClick: p
|
|
978
|
-
}), c, /* @__PURE__ */ d.createElement("span", {
|
|
979
|
-
className: "".concat(o, "-inner")
|
|
980
|
-
}, /* @__PURE__ */ d.createElement("span", {
|
|
981
|
-
className: "".concat(o, "-inner-checked")
|
|
982
|
-
}, g), /* @__PURE__ */ d.createElement("span", {
|
|
983
|
-
className: "".concat(o, "-inner-unchecked")
|
|
984
|
-
}, u)));
|
|
800
|
+
process.env.NODE_ENV !== "production" && (re.propTypes = {
|
|
801
|
+
/**
|
|
802
|
+
* If `true`, the component is checked.
|
|
803
|
+
*/
|
|
804
|
+
checked: o.bool,
|
|
805
|
+
/**
|
|
806
|
+
* Override or extend the styles applied to the component.
|
|
807
|
+
*/
|
|
808
|
+
classes: o.object,
|
|
809
|
+
/**
|
|
810
|
+
* The size of the component.
|
|
811
|
+
* `small` is equivalent to the dense radio styling.
|
|
812
|
+
*/
|
|
813
|
+
fontSize: o.oneOf(["small", "medium"])
|
|
985
814
|
});
|
|
986
|
-
|
|
987
|
-
|
|
815
|
+
const ne = /* @__PURE__ */ m.createContext(void 0);
|
|
816
|
+
process.env.NODE_ENV !== "production" && (ne.displayName = "RadioGroupContext");
|
|
817
|
+
function bo() {
|
|
818
|
+
return m.useContext(ne);
|
|
819
|
+
}
|
|
820
|
+
function yo(e) {
|
|
821
|
+
return D("MuiRadio", e);
|
|
822
|
+
}
|
|
823
|
+
const de = G("MuiRadio", ["root", "checked", "disabled", "colorPrimary", "colorSecondary", "sizeSmall"]), go = (e) => {
|
|
988
824
|
const {
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
handleSizeSM: r,
|
|
996
|
-
calc: l
|
|
997
|
-
} = e, c = `${n}-inner`, g = E(l(r).add(l(t).mul(2)).equal()), u = E(l(a).mul(2).equal());
|
|
825
|
+
classes: t,
|
|
826
|
+
color: r,
|
|
827
|
+
size: n
|
|
828
|
+
} = e, s = {
|
|
829
|
+
root: ["root", `color${w(r)}`, n !== "medium" && `size${w(n)}`]
|
|
830
|
+
};
|
|
998
831
|
return {
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
},
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
832
|
+
...t,
|
|
833
|
+
...M(s, yo, t)
|
|
834
|
+
};
|
|
835
|
+
}, vo = v(te, {
|
|
836
|
+
shouldForwardProp: (e) => oe(e) || e === "classes",
|
|
837
|
+
name: "MuiRadio",
|
|
838
|
+
slot: "Root",
|
|
839
|
+
overridesResolver: (e, t) => {
|
|
840
|
+
const {
|
|
841
|
+
ownerState: r
|
|
842
|
+
} = e;
|
|
843
|
+
return [t.root, r.size !== "medium" && t[`size${w(r.size)}`], t[`color${w(r.color)}`]];
|
|
844
|
+
}
|
|
845
|
+
})(z(({
|
|
846
|
+
theme: e
|
|
847
|
+
}) => ({
|
|
848
|
+
color: (e.vars || e).palette.text.secondary,
|
|
849
|
+
[`&.${de.disabled}`]: {
|
|
850
|
+
color: (e.vars || e).palette.action.disabled
|
|
851
|
+
},
|
|
852
|
+
variants: [{
|
|
853
|
+
props: {
|
|
854
|
+
color: "default",
|
|
855
|
+
disabled: !1,
|
|
856
|
+
disableRipple: !1
|
|
857
|
+
},
|
|
858
|
+
style: {
|
|
859
|
+
"&:hover": {
|
|
860
|
+
backgroundColor: e.vars ? `rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})` : W(e.palette.action.active, e.palette.action.hoverOpacity)
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
}, ...Object.entries(e.palette).filter(Y()).map(([t]) => ({
|
|
864
|
+
props: {
|
|
865
|
+
color: t,
|
|
866
|
+
disabled: !1,
|
|
867
|
+
disableRipple: !1
|
|
868
|
+
},
|
|
869
|
+
style: {
|
|
870
|
+
"&:hover": {
|
|
871
|
+
backgroundColor: e.vars ? `rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})` : W(e.palette[t].main, e.palette.action.hoverOpacity)
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
})), ...Object.entries(e.palette).filter(Y()).map(([t]) => ({
|
|
875
|
+
props: {
|
|
876
|
+
color: t,
|
|
877
|
+
disabled: !1
|
|
878
|
+
},
|
|
879
|
+
style: {
|
|
880
|
+
[`&.${de.checked}`]: {
|
|
881
|
+
color: (e.vars || e).palette[t].main
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
})), {
|
|
885
|
+
// Should be last to override other colors
|
|
886
|
+
props: {
|
|
887
|
+
disableRipple: !1
|
|
888
|
+
},
|
|
889
|
+
style: {
|
|
890
|
+
// Reset on touch devices, it doesn't add specificity
|
|
891
|
+
"&:hover": {
|
|
892
|
+
"@media (hover: none)": {
|
|
893
|
+
backgroundColor: "transparent"
|
|
1058
894
|
}
|
|
1059
895
|
}
|
|
1060
896
|
}
|
|
1061
|
-
}
|
|
1062
|
-
}
|
|
897
|
+
}]
|
|
898
|
+
})));
|
|
899
|
+
function Co(e, t) {
|
|
900
|
+
return typeof t == "object" && t !== null ? e === t : String(e) === String(t);
|
|
901
|
+
}
|
|
902
|
+
const pe = /* @__PURE__ */ d(re, {
|
|
903
|
+
checked: !0
|
|
904
|
+
}), ue = /* @__PURE__ */ d(re, {}), ke = /* @__PURE__ */ m.forwardRef(function(t, r) {
|
|
905
|
+
const n = A({
|
|
906
|
+
props: t,
|
|
907
|
+
name: "MuiRadio"
|
|
908
|
+
}), {
|
|
909
|
+
checked: s,
|
|
910
|
+
checkedIcon: i = pe,
|
|
911
|
+
color: p = "primary",
|
|
912
|
+
icon: f = ue,
|
|
913
|
+
name: c,
|
|
914
|
+
onChange: l,
|
|
915
|
+
size: u = "medium",
|
|
916
|
+
className: a,
|
|
917
|
+
disabled: h,
|
|
918
|
+
disableRipple: C = !1,
|
|
919
|
+
...k
|
|
920
|
+
} = n, O = X();
|
|
921
|
+
let y = h;
|
|
922
|
+
O && typeof y > "u" && (y = O.disabled), y ?? (y = !1);
|
|
923
|
+
const x = {
|
|
924
|
+
...n,
|
|
925
|
+
disabled: y,
|
|
926
|
+
disableRipple: C,
|
|
927
|
+
color: p,
|
|
928
|
+
size: u
|
|
929
|
+
}, b = go(x), T = bo();
|
|
930
|
+
let S = s;
|
|
931
|
+
const B = Ae(l, T && T.onChange);
|
|
932
|
+
let R = c;
|
|
933
|
+
return T && (typeof S > "u" && (S = Co(T.value, n.value)), typeof R > "u" && (R = T.name)), /* @__PURE__ */ d(vo, {
|
|
934
|
+
type: "radio",
|
|
935
|
+
icon: /* @__PURE__ */ m.cloneElement(f, {
|
|
936
|
+
fontSize: ue.props.fontSize ?? u
|
|
937
|
+
}),
|
|
938
|
+
checkedIcon: /* @__PURE__ */ m.cloneElement(i, {
|
|
939
|
+
fontSize: pe.props.fontSize ?? u
|
|
940
|
+
}),
|
|
941
|
+
disabled: y,
|
|
942
|
+
ownerState: x,
|
|
943
|
+
classes: b,
|
|
944
|
+
name: R,
|
|
945
|
+
checked: S,
|
|
946
|
+
onChange: B,
|
|
947
|
+
ref: r,
|
|
948
|
+
className: I(b.root, a),
|
|
949
|
+
...k
|
|
950
|
+
});
|
|
951
|
+
});
|
|
952
|
+
process.env.NODE_ENV !== "production" && (ke.propTypes = {
|
|
953
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
954
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
955
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
956
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
957
|
+
/**
|
|
958
|
+
* If `true`, the component is checked.
|
|
959
|
+
*/
|
|
960
|
+
checked: o.bool,
|
|
961
|
+
/**
|
|
962
|
+
* The icon to display when the component is checked.
|
|
963
|
+
* @default <RadioButtonIcon checked />
|
|
964
|
+
*/
|
|
965
|
+
checkedIcon: o.node,
|
|
966
|
+
/**
|
|
967
|
+
* Override or extend the styles applied to the component.
|
|
968
|
+
*/
|
|
969
|
+
classes: o.object,
|
|
970
|
+
/**
|
|
971
|
+
* @ignore
|
|
972
|
+
*/
|
|
973
|
+
className: o.string,
|
|
974
|
+
/**
|
|
975
|
+
* The color of the component.
|
|
976
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
977
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
978
|
+
* @default 'primary'
|
|
979
|
+
*/
|
|
980
|
+
color: o.oneOfType([o.oneOf(["default", "primary", "secondary", "error", "info", "success", "warning"]), o.string]),
|
|
981
|
+
/**
|
|
982
|
+
* If `true`, the component is disabled.
|
|
983
|
+
*/
|
|
984
|
+
disabled: o.bool,
|
|
985
|
+
/**
|
|
986
|
+
* If `true`, the ripple effect is disabled.
|
|
987
|
+
* @default false
|
|
988
|
+
*/
|
|
989
|
+
disableRipple: o.bool,
|
|
990
|
+
/**
|
|
991
|
+
* The icon to display when the component is unchecked.
|
|
992
|
+
* @default <RadioButtonIcon />
|
|
993
|
+
*/
|
|
994
|
+
icon: o.node,
|
|
995
|
+
/**
|
|
996
|
+
* The id of the `input` element.
|
|
997
|
+
*/
|
|
998
|
+
id: o.string,
|
|
999
|
+
/**
|
|
1000
|
+
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
1001
|
+
*/
|
|
1002
|
+
inputProps: o.object,
|
|
1003
|
+
/**
|
|
1004
|
+
* Pass a ref to the `input` element.
|
|
1005
|
+
*/
|
|
1006
|
+
inputRef: H,
|
|
1007
|
+
/**
|
|
1008
|
+
* Name attribute of the `input` element.
|
|
1009
|
+
*/
|
|
1010
|
+
name: o.string,
|
|
1011
|
+
/**
|
|
1012
|
+
* Callback fired when the state is changed.
|
|
1013
|
+
*
|
|
1014
|
+
* @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
|
|
1015
|
+
* You can pull out the new value by accessing `event.target.value` (string).
|
|
1016
|
+
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
1017
|
+
*/
|
|
1018
|
+
onChange: o.func,
|
|
1019
|
+
/**
|
|
1020
|
+
* If `true`, the `input` element is required.
|
|
1021
|
+
* @default false
|
|
1022
|
+
*/
|
|
1023
|
+
required: o.bool,
|
|
1024
|
+
/**
|
|
1025
|
+
* The size of the component.
|
|
1026
|
+
* `small` is equivalent to the dense radio styling.
|
|
1027
|
+
* @default 'medium'
|
|
1028
|
+
*/
|
|
1029
|
+
size: o.oneOfType([o.oneOf(["medium", "small"]), o.string]),
|
|
1030
|
+
/**
|
|
1031
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
1032
|
+
*/
|
|
1033
|
+
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
|
|
1034
|
+
/**
|
|
1035
|
+
* The value of the component. The DOM API casts this to a string.
|
|
1036
|
+
*/
|
|
1037
|
+
value: o.any
|
|
1038
|
+
});
|
|
1039
|
+
function ko(e) {
|
|
1040
|
+
return D("MuiRadioGroup", e);
|
|
1041
|
+
}
|
|
1042
|
+
G("MuiRadioGroup", ["root", "row", "error"]);
|
|
1043
|
+
const wo = (e) => {
|
|
1063
1044
|
const {
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1045
|
+
classes: t,
|
|
1046
|
+
row: r,
|
|
1047
|
+
error: n
|
|
1067
1048
|
} = e;
|
|
1068
|
-
return {
|
|
1069
|
-
[n]
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1049
|
+
return M({
|
|
1050
|
+
root: ["root", r && "row", n && "error"]
|
|
1051
|
+
}, ko, t);
|
|
1052
|
+
}, we = /* @__PURE__ */ m.forwardRef(function(t, r) {
|
|
1053
|
+
const {
|
|
1054
|
+
// private
|
|
1055
|
+
// eslint-disable-next-line react/prop-types
|
|
1056
|
+
actions: n,
|
|
1057
|
+
children: s,
|
|
1058
|
+
className: i,
|
|
1059
|
+
defaultValue: p,
|
|
1060
|
+
name: f,
|
|
1061
|
+
onChange: c,
|
|
1062
|
+
value: l,
|
|
1063
|
+
...u
|
|
1064
|
+
} = t, a = m.useRef(null), h = wo(t), [C, k] = he({
|
|
1065
|
+
controlled: l,
|
|
1066
|
+
default: p,
|
|
1067
|
+
name: "RadioGroup"
|
|
1068
|
+
});
|
|
1069
|
+
m.useImperativeHandle(n, () => ({
|
|
1070
|
+
focus: () => {
|
|
1071
|
+
let b = a.current.querySelector("input:not(:disabled):checked");
|
|
1072
|
+
b || (b = a.current.querySelector("input:not(:disabled)")), b && b.focus();
|
|
1079
1073
|
}
|
|
1080
|
-
};
|
|
1081
|
-
|
|
1074
|
+
}), []);
|
|
1075
|
+
const O = Ge(r, a), y = De(f), x = m.useMemo(() => ({
|
|
1076
|
+
name: y,
|
|
1077
|
+
onChange(b) {
|
|
1078
|
+
k(b.target.value), c && c(b, b.target.value);
|
|
1079
|
+
},
|
|
1080
|
+
value: C
|
|
1081
|
+
}), [y, c, k, C]);
|
|
1082
|
+
return /* @__PURE__ */ d(ne.Provider, {
|
|
1083
|
+
value: x,
|
|
1084
|
+
children: /* @__PURE__ */ d(Ce, {
|
|
1085
|
+
role: "radiogroup",
|
|
1086
|
+
ref: O,
|
|
1087
|
+
className: I(h.root, i),
|
|
1088
|
+
...u,
|
|
1089
|
+
children: s
|
|
1090
|
+
})
|
|
1091
|
+
});
|
|
1092
|
+
});
|
|
1093
|
+
process.env.NODE_ENV !== "production" && (we.propTypes = {
|
|
1094
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
1095
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
1096
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
1097
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
1098
|
+
/**
|
|
1099
|
+
* The content of the component.
|
|
1100
|
+
*/
|
|
1101
|
+
children: o.node,
|
|
1102
|
+
/**
|
|
1103
|
+
* @ignore
|
|
1104
|
+
*/
|
|
1105
|
+
className: o.string,
|
|
1106
|
+
/**
|
|
1107
|
+
* The default value. Use when the component is not controlled.
|
|
1108
|
+
*/
|
|
1109
|
+
defaultValue: o.any,
|
|
1110
|
+
/**
|
|
1111
|
+
* The name used to reference the value of the control.
|
|
1112
|
+
* If you don't provide this prop, it falls back to a randomly generated name.
|
|
1113
|
+
*/
|
|
1114
|
+
name: o.string,
|
|
1115
|
+
/**
|
|
1116
|
+
* Callback fired when a radio button is selected.
|
|
1117
|
+
*
|
|
1118
|
+
* @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
|
|
1119
|
+
* @param {string} value The value of the selected radio button.
|
|
1120
|
+
* You can pull out the new value by accessing `event.target.value` (string).
|
|
1121
|
+
*/
|
|
1122
|
+
onChange: o.func,
|
|
1123
|
+
/**
|
|
1124
|
+
* Value of the selected radio button. The DOM API casts this to a string.
|
|
1125
|
+
*/
|
|
1126
|
+
value: o.any
|
|
1127
|
+
});
|
|
1128
|
+
const Se = Qe({
|
|
1129
|
+
createStyledComponent: v("div", {
|
|
1130
|
+
name: "MuiStack",
|
|
1131
|
+
slot: "Root",
|
|
1132
|
+
overridesResolver: (e, t) => t.root
|
|
1133
|
+
}),
|
|
1134
|
+
useThemeProps: (e) => A({
|
|
1135
|
+
props: e,
|
|
1136
|
+
name: "MuiStack"
|
|
1137
|
+
})
|
|
1138
|
+
});
|
|
1139
|
+
process.env.NODE_ENV !== "production" && (Se.propTypes = {
|
|
1140
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
1141
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
1142
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
1143
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
1144
|
+
/**
|
|
1145
|
+
* The content of the component.
|
|
1146
|
+
*/
|
|
1147
|
+
children: o.node,
|
|
1148
|
+
/**
|
|
1149
|
+
* The component used for the root node.
|
|
1150
|
+
* Either a string to use a HTML element or a component.
|
|
1151
|
+
*/
|
|
1152
|
+
component: o.elementType,
|
|
1153
|
+
/**
|
|
1154
|
+
* Defines the `flex-direction` style property.
|
|
1155
|
+
* It is applied for all screen sizes.
|
|
1156
|
+
* @default 'column'
|
|
1157
|
+
*/
|
|
1158
|
+
direction: o.oneOfType([o.oneOf(["column-reverse", "column", "row-reverse", "row"]), o.arrayOf(o.oneOf(["column-reverse", "column", "row-reverse", "row"])), o.object]),
|
|
1159
|
+
/**
|
|
1160
|
+
* Add an element between each child.
|
|
1161
|
+
*/
|
|
1162
|
+
divider: o.node,
|
|
1163
|
+
/**
|
|
1164
|
+
* Defines the space between immediate children.
|
|
1165
|
+
* @default 0
|
|
1166
|
+
*/
|
|
1167
|
+
spacing: o.oneOfType([o.arrayOf(o.oneOfType([o.number, o.string])), o.number, o.object, o.string]),
|
|
1168
|
+
/**
|
|
1169
|
+
* The system prop, which allows defining system overrides as well as additional CSS styles.
|
|
1170
|
+
*/
|
|
1171
|
+
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
|
|
1172
|
+
/**
|
|
1173
|
+
* If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
|
|
1174
|
+
*
|
|
1175
|
+
* While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
|
|
1176
|
+
* it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
|
|
1177
|
+
*
|
|
1178
|
+
* To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.
|
|
1179
|
+
* @default false
|
|
1180
|
+
*/
|
|
1181
|
+
useFlexGap: o.bool
|
|
1182
|
+
});
|
|
1183
|
+
function So(e) {
|
|
1184
|
+
return D("MuiSwitch", e);
|
|
1185
|
+
}
|
|
1186
|
+
const g = G("MuiSwitch", ["root", "edgeStart", "edgeEnd", "switchBase", "colorPrimary", "colorSecondary", "sizeSmall", "sizeMedium", "checked", "disabled", "input", "thumb", "track"]), Ro = (e) => {
|
|
1082
1187
|
const {
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
} = e,
|
|
1188
|
+
classes: t,
|
|
1189
|
+
edge: r,
|
|
1190
|
+
size: n,
|
|
1191
|
+
color: s,
|
|
1192
|
+
checked: i,
|
|
1193
|
+
disabled: p
|
|
1194
|
+
} = e, f = {
|
|
1195
|
+
root: ["root", r && `edge${w(r)}`, `size${w(n)}`],
|
|
1196
|
+
switchBase: ["switchBase", `color${w(s)}`, i && "checked", p && "disabled"],
|
|
1197
|
+
thumb: ["thumb"],
|
|
1198
|
+
track: ["track"],
|
|
1199
|
+
input: ["input"]
|
|
1200
|
+
}, c = M(f, So, t);
|
|
1090
1201
|
return {
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1202
|
+
...t,
|
|
1203
|
+
// forward the disabled and checked classes to the SwitchBase
|
|
1204
|
+
...c
|
|
1205
|
+
};
|
|
1206
|
+
}, Oo = v("span", {
|
|
1207
|
+
name: "MuiSwitch",
|
|
1208
|
+
slot: "Root",
|
|
1209
|
+
overridesResolver: (e, t) => {
|
|
1210
|
+
const {
|
|
1211
|
+
ownerState: r
|
|
1212
|
+
} = e;
|
|
1213
|
+
return [t.root, r.edge && t[`edge${w(r.edge)}`], t[`size${w(r.size)}`]];
|
|
1214
|
+
}
|
|
1215
|
+
})({
|
|
1216
|
+
display: "inline-flex",
|
|
1217
|
+
width: 34 + 12 * 2,
|
|
1218
|
+
height: 14 + 12 * 2,
|
|
1219
|
+
overflow: "hidden",
|
|
1220
|
+
padding: 12,
|
|
1221
|
+
boxSizing: "border-box",
|
|
1222
|
+
position: "relative",
|
|
1223
|
+
flexShrink: 0,
|
|
1224
|
+
zIndex: 0,
|
|
1225
|
+
// Reset the stacking context.
|
|
1226
|
+
verticalAlign: "middle",
|
|
1227
|
+
// For correct alignment with the text.
|
|
1228
|
+
"@media print": {
|
|
1229
|
+
colorAdjust: "exact"
|
|
1230
|
+
},
|
|
1231
|
+
variants: [{
|
|
1232
|
+
props: {
|
|
1233
|
+
edge: "start"
|
|
1234
|
+
},
|
|
1235
|
+
style: {
|
|
1236
|
+
marginLeft: -8
|
|
1237
|
+
}
|
|
1238
|
+
}, {
|
|
1239
|
+
props: {
|
|
1240
|
+
edge: "end"
|
|
1241
|
+
},
|
|
1242
|
+
style: {
|
|
1243
|
+
marginRight: -8
|
|
1244
|
+
}
|
|
1245
|
+
}, {
|
|
1246
|
+
props: {
|
|
1247
|
+
size: "small"
|
|
1248
|
+
},
|
|
1249
|
+
style: {
|
|
1250
|
+
width: 40,
|
|
1251
|
+
height: 24,
|
|
1252
|
+
padding: 7,
|
|
1253
|
+
[`& .${g.thumb}`]: {
|
|
1254
|
+
width: 16,
|
|
1255
|
+
height: 16
|
|
1114
1256
|
},
|
|
1115
|
-
[
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
},
|
|
1120
|
-
[`&${n}-checked ${r}::before`]: {
|
|
1121
|
-
insetInlineEnd: 0,
|
|
1122
|
-
insetInlineStart: e.switchHandleActiveInset
|
|
1257
|
+
[`& .${g.switchBase}`]: {
|
|
1258
|
+
padding: 4,
|
|
1259
|
+
[`&.${g.checked}`]: {
|
|
1260
|
+
transform: "translateX(16px)"
|
|
1123
1261
|
}
|
|
1124
1262
|
}
|
|
1125
1263
|
}
|
|
1126
|
-
}
|
|
1127
|
-
},
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1264
|
+
}]
|
|
1265
|
+
}), xo = v(te, {
|
|
1266
|
+
name: "MuiSwitch",
|
|
1267
|
+
slot: "SwitchBase",
|
|
1268
|
+
overridesResolver: (e, t) => {
|
|
1269
|
+
const {
|
|
1270
|
+
ownerState: r
|
|
1271
|
+
} = e;
|
|
1272
|
+
return [t.switchBase, {
|
|
1273
|
+
[`& .${g.input}`]: t.input
|
|
1274
|
+
}, r.color !== "default" && t[`color${w(r.color)}`]];
|
|
1275
|
+
}
|
|
1276
|
+
})(z(({
|
|
1277
|
+
theme: e
|
|
1278
|
+
}) => ({
|
|
1279
|
+
position: "absolute",
|
|
1280
|
+
top: 0,
|
|
1281
|
+
left: 0,
|
|
1282
|
+
zIndex: 1,
|
|
1283
|
+
// Render above the focus ripple.
|
|
1284
|
+
color: e.vars ? e.vars.palette.Switch.defaultColor : `${e.palette.mode === "light" ? e.palette.common.white : e.palette.grey[300]}`,
|
|
1285
|
+
transition: e.transitions.create(["left", "transform"], {
|
|
1286
|
+
duration: e.transitions.duration.shortest
|
|
1287
|
+
}),
|
|
1288
|
+
[`&.${g.checked}`]: {
|
|
1289
|
+
transform: "translateX(20px)"
|
|
1290
|
+
},
|
|
1291
|
+
[`&.${g.disabled}`]: {
|
|
1292
|
+
color: e.vars ? e.vars.palette.Switch.defaultDisabledColor : `${e.palette.mode === "light" ? e.palette.grey[100] : e.palette.grey[600]}`
|
|
1293
|
+
},
|
|
1294
|
+
[`&.${g.checked} + .${g.track}`]: {
|
|
1295
|
+
opacity: 0.5
|
|
1296
|
+
},
|
|
1297
|
+
[`&.${g.disabled} + .${g.track}`]: {
|
|
1298
|
+
opacity: e.vars ? e.vars.opacity.switchTrackDisabled : `${e.palette.mode === "light" ? 0.12 : 0.2}`
|
|
1299
|
+
},
|
|
1300
|
+
[`& .${g.input}`]: {
|
|
1301
|
+
left: "-100%",
|
|
1302
|
+
width: "300%"
|
|
1303
|
+
}
|
|
1304
|
+
})), z(({
|
|
1305
|
+
theme: e
|
|
1306
|
+
}) => ({
|
|
1307
|
+
"&:hover": {
|
|
1308
|
+
backgroundColor: e.vars ? `rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})` : W(e.palette.action.active, e.palette.action.hoverOpacity),
|
|
1309
|
+
// Reset on touch devices, it doesn't add specificity
|
|
1310
|
+
"@media (hover: none)": {
|
|
1311
|
+
backgroundColor: "transparent"
|
|
1312
|
+
}
|
|
1313
|
+
},
|
|
1314
|
+
variants: [...Object.entries(e.palette).filter(Y(["light"])).map(([t]) => ({
|
|
1315
|
+
props: {
|
|
1316
|
+
color: t
|
|
1317
|
+
},
|
|
1318
|
+
style: {
|
|
1319
|
+
[`&.${g.checked}`]: {
|
|
1320
|
+
color: (e.vars || e).palette[t].main,
|
|
1321
|
+
"&:hover": {
|
|
1322
|
+
backgroundColor: e.vars ? `rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})` : W(e.palette[t].main, e.palette.action.hoverOpacity),
|
|
1323
|
+
"@media (hover: none)": {
|
|
1324
|
+
backgroundColor: "transparent"
|
|
1182
1325
|
}
|
|
1183
1326
|
},
|
|
1184
|
-
[
|
|
1185
|
-
[`${
|
|
1186
|
-
marginInlineStart: r(t).mul(-1).mul(2).equal(),
|
|
1187
|
-
marginInlineEnd: r(t).mul(2).equal()
|
|
1188
|
-
}
|
|
1327
|
+
[`&.${g.disabled}`]: {
|
|
1328
|
+
color: e.vars ? e.vars.palette.Switch[`${t}DisabledColor`] : `${e.palette.mode === "light" ? Ie(e.palette[t].main, 0.62) : ze(e.palette[t].main, 0.55)}`
|
|
1189
1329
|
}
|
|
1330
|
+
},
|
|
1331
|
+
[`&.${g.checked} + .${g.track}`]: {
|
|
1332
|
+
backgroundColor: (e.vars || e).palette[t].main
|
|
1190
1333
|
}
|
|
1191
1334
|
}
|
|
1192
|
-
}
|
|
1193
|
-
},
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1335
|
+
}))]
|
|
1336
|
+
}))), To = v("span", {
|
|
1337
|
+
name: "MuiSwitch",
|
|
1338
|
+
slot: "Track",
|
|
1339
|
+
overridesResolver: (e, t) => t.track
|
|
1340
|
+
})(z(({
|
|
1341
|
+
theme: e
|
|
1342
|
+
}) => ({
|
|
1343
|
+
height: "100%",
|
|
1344
|
+
width: "100%",
|
|
1345
|
+
borderRadius: 14 / 2,
|
|
1346
|
+
zIndex: -1,
|
|
1347
|
+
transition: e.transitions.create(["opacity", "background-color"], {
|
|
1348
|
+
duration: e.transitions.duration.shortest
|
|
1349
|
+
}),
|
|
1350
|
+
backgroundColor: e.vars ? e.vars.palette.common.onBackground : `${e.palette.mode === "light" ? e.palette.common.black : e.palette.common.white}`,
|
|
1351
|
+
opacity: e.vars ? e.vars.opacity.switchTrack : `${e.palette.mode === "light" ? 0.38 : 0.3}`
|
|
1352
|
+
}))), Po = v("span", {
|
|
1353
|
+
name: "MuiSwitch",
|
|
1354
|
+
slot: "Thumb",
|
|
1355
|
+
overridesResolver: (e, t) => t.thumb
|
|
1356
|
+
})(z(({
|
|
1357
|
+
theme: e
|
|
1358
|
+
}) => ({
|
|
1359
|
+
boxShadow: (e.vars || e).shadows[1],
|
|
1360
|
+
backgroundColor: "currentColor",
|
|
1361
|
+
width: 20,
|
|
1362
|
+
height: 20,
|
|
1363
|
+
borderRadius: "50%"
|
|
1364
|
+
}))), ee = /* @__PURE__ */ m.forwardRef(function(t, r) {
|
|
1365
|
+
const n = A({
|
|
1366
|
+
props: t,
|
|
1367
|
+
name: "MuiSwitch"
|
|
1368
|
+
}), {
|
|
1369
|
+
className: s,
|
|
1370
|
+
color: i = "primary",
|
|
1371
|
+
edge: p = !1,
|
|
1372
|
+
size: f = "medium",
|
|
1373
|
+
sx: c,
|
|
1374
|
+
...l
|
|
1375
|
+
} = n, u = {
|
|
1376
|
+
...n,
|
|
1377
|
+
color: i,
|
|
1378
|
+
edge: p,
|
|
1379
|
+
size: f
|
|
1380
|
+
}, a = Ro(u), h = /* @__PURE__ */ d(Po, {
|
|
1381
|
+
className: a.thumb,
|
|
1382
|
+
ownerState: u
|
|
1383
|
+
});
|
|
1384
|
+
return /* @__PURE__ */ P(Oo, {
|
|
1385
|
+
className: I(a.root, s),
|
|
1386
|
+
sx: c,
|
|
1387
|
+
ownerState: u,
|
|
1388
|
+
children: [/* @__PURE__ */ d(xo, {
|
|
1389
|
+
type: "checkbox",
|
|
1390
|
+
icon: h,
|
|
1391
|
+
checkedIcon: h,
|
|
1392
|
+
ref: r,
|
|
1393
|
+
ownerState: u,
|
|
1394
|
+
...l,
|
|
1395
|
+
classes: {
|
|
1396
|
+
...a,
|
|
1397
|
+
root: a.switchBase
|
|
1235
1398
|
}
|
|
1236
|
-
})
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
fontSize: n,
|
|
1241
|
-
lineHeight: i,
|
|
1242
|
-
controlHeight: t,
|
|
1243
|
-
colorWhite: o
|
|
1244
|
-
} = e, s = n * i, a = t / 2, r = 2, l = s - r * 2, c = a - r * 2;
|
|
1245
|
-
return {
|
|
1246
|
-
trackHeight: s,
|
|
1247
|
-
trackHeightSM: a,
|
|
1248
|
-
trackMinWidth: l * 2 + r * 4,
|
|
1249
|
-
trackMinWidthSM: c * 2 + r * 2,
|
|
1250
|
-
trackPadding: r,
|
|
1251
|
-
// Fixed value
|
|
1252
|
-
handleBg: o,
|
|
1253
|
-
handleSize: l,
|
|
1254
|
-
handleSizeSM: c,
|
|
1255
|
-
handleShadow: `0 2px 4px 0 ${new Le("#00230b").setAlpha(0.2).toRgbString()}`,
|
|
1256
|
-
innerMinMargin: l / 2,
|
|
1257
|
-
innerMaxMargin: l + r + r * 2,
|
|
1258
|
-
innerMinMarginSM: c / 2,
|
|
1259
|
-
innerMaxMarginSM: c + r + r * 2
|
|
1260
|
-
};
|
|
1261
|
-
}, $t = ne("Switch", (e) => {
|
|
1262
|
-
const n = oe(e, {
|
|
1263
|
-
switchDuration: e.motionDurationMid,
|
|
1264
|
-
switchColor: e.colorPrimary,
|
|
1265
|
-
switchDisabledOpacity: e.opacityLoading,
|
|
1266
|
-
switchLoadingIconSize: e.calc(e.fontSizeIcon).mul(0.75).equal(),
|
|
1267
|
-
switchLoadingIconColor: `rgba(0, 0, 0, ${e.opacityLoading})`,
|
|
1268
|
-
switchHandleActiveInset: "-30%"
|
|
1399
|
+
}), /* @__PURE__ */ d(To, {
|
|
1400
|
+
className: a.track,
|
|
1401
|
+
ownerState: u
|
|
1402
|
+
})]
|
|
1269
1403
|
});
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
}
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1404
|
+
});
|
|
1405
|
+
process.env.NODE_ENV !== "production" && (ee.propTypes = {
|
|
1406
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
1407
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
1408
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
1409
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
1410
|
+
/**
|
|
1411
|
+
* If `true`, the component is checked.
|
|
1412
|
+
*/
|
|
1413
|
+
checked: o.bool,
|
|
1414
|
+
/**
|
|
1415
|
+
* The icon to display when the component is checked.
|
|
1416
|
+
*/
|
|
1417
|
+
checkedIcon: o.node,
|
|
1418
|
+
/**
|
|
1419
|
+
* Override or extend the styles applied to the component.
|
|
1420
|
+
*/
|
|
1421
|
+
classes: o.object,
|
|
1422
|
+
/**
|
|
1423
|
+
* @ignore
|
|
1424
|
+
*/
|
|
1425
|
+
className: o.string,
|
|
1426
|
+
/**
|
|
1427
|
+
* The color of the component.
|
|
1428
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
1429
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
1430
|
+
* @default 'primary'
|
|
1431
|
+
*/
|
|
1432
|
+
color: o.oneOfType([o.oneOf(["default", "primary", "secondary", "error", "info", "success", "warning"]), o.string]),
|
|
1433
|
+
/**
|
|
1434
|
+
* The default checked state. Use when the component is not controlled.
|
|
1435
|
+
*/
|
|
1436
|
+
defaultChecked: o.bool,
|
|
1437
|
+
/**
|
|
1438
|
+
* If `true`, the component is disabled.
|
|
1439
|
+
*/
|
|
1440
|
+
disabled: o.bool,
|
|
1441
|
+
/**
|
|
1442
|
+
* If `true`, the ripple effect is disabled.
|
|
1443
|
+
* @default false
|
|
1444
|
+
*/
|
|
1445
|
+
disableRipple: o.bool,
|
|
1446
|
+
/**
|
|
1447
|
+
* If given, uses a negative margin to counteract the padding on one
|
|
1448
|
+
* side (this is often helpful for aligning the left or right
|
|
1449
|
+
* side of the icon with content above or below, without ruining the border
|
|
1450
|
+
* size and shape).
|
|
1451
|
+
* @default false
|
|
1452
|
+
*/
|
|
1453
|
+
edge: o.oneOf(["end", "start", !1]),
|
|
1454
|
+
/**
|
|
1455
|
+
* The icon to display when the component is unchecked.
|
|
1456
|
+
*/
|
|
1457
|
+
icon: o.node,
|
|
1458
|
+
/**
|
|
1459
|
+
* The id of the `input` element.
|
|
1460
|
+
*/
|
|
1461
|
+
id: o.string,
|
|
1462
|
+
/**
|
|
1463
|
+
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
1464
|
+
*/
|
|
1465
|
+
inputProps: o.object,
|
|
1466
|
+
/**
|
|
1467
|
+
* Pass a ref to the `input` element.
|
|
1468
|
+
*/
|
|
1469
|
+
inputRef: H,
|
|
1470
|
+
/**
|
|
1471
|
+
* Callback fired when the state is changed.
|
|
1472
|
+
*
|
|
1473
|
+
* @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
|
|
1474
|
+
* You can pull out the new value by accessing `event.target.value` (string).
|
|
1475
|
+
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
1476
|
+
*/
|
|
1477
|
+
onChange: o.func,
|
|
1478
|
+
/**
|
|
1479
|
+
* If `true`, the `input` element is required.
|
|
1480
|
+
* @default false
|
|
1481
|
+
*/
|
|
1482
|
+
required: o.bool,
|
|
1483
|
+
/**
|
|
1484
|
+
* The size of the component.
|
|
1485
|
+
* `small` is equivalent to the dense switch styling.
|
|
1486
|
+
* @default 'medium'
|
|
1487
|
+
*/
|
|
1488
|
+
size: o.oneOfType([o.oneOf(["medium", "small"]), o.string]),
|
|
1489
|
+
/**
|
|
1490
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
1491
|
+
*/
|
|
1492
|
+
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
|
|
1493
|
+
/**
|
|
1494
|
+
* The value of the component. The DOM API casts this to a string.
|
|
1495
|
+
* The browser uses "on" as the default value.
|
|
1496
|
+
*/
|
|
1497
|
+
value: o.any
|
|
1498
|
+
});
|
|
1499
|
+
const $o = (e, t) => {
|
|
1500
|
+
const r = ["EMAIL", "INAPP_WEB", "SMS", "CALL", "PUSH", "WEB_PUSH"];
|
|
1501
|
+
return r.indexOf(e) - r.indexOf(t);
|
|
1502
|
+
}, fe = (e, t) => {
|
|
1503
|
+
const r = ["off", "instant", "hourly", "daily", "weekly", "monthly"];
|
|
1504
|
+
return r.indexOf(e) - r.indexOf(t);
|
|
1505
|
+
}, me = (e) => ({
|
|
1343
1506
|
off: "Off",
|
|
1344
1507
|
instant: "Instant",
|
|
1345
1508
|
hourly: "Hourly",
|
|
1346
1509
|
daily: "Daily",
|
|
1347
1510
|
weekly: "Weekly",
|
|
1348
1511
|
monthly: "Monthly"
|
|
1349
|
-
})[e],
|
|
1512
|
+
})[e], Go = ({
|
|
1350
1513
|
notification: e,
|
|
1351
|
-
preferences:
|
|
1352
|
-
updateDelivery:
|
|
1353
|
-
subNotificationId:
|
|
1354
|
-
}) => /* @__PURE__ */
|
|
1355
|
-
const
|
|
1356
|
-
(
|
|
1514
|
+
preferences: t,
|
|
1515
|
+
updateDelivery: r,
|
|
1516
|
+
subNotificationId: n
|
|
1517
|
+
}) => /* @__PURE__ */ d(ie, { children: e.channels.sort($o).map((s, i) => {
|
|
1518
|
+
const p = t.find(
|
|
1519
|
+
(a) => a.notificationId === e.notificationId && a.channel === s
|
|
1357
1520
|
);
|
|
1358
|
-
if (!
|
|
1521
|
+
if (!p)
|
|
1359
1522
|
return null;
|
|
1360
|
-
const
|
|
1361
|
-
e.options[
|
|
1523
|
+
const f = Oe(s), c = xe(s), l = Object.keys(
|
|
1524
|
+
e.options[s]
|
|
1362
1525
|
).filter(
|
|
1363
|
-
(
|
|
1526
|
+
(a) => a !== "defaultDeliveryOption" && a !== "defaultDeliverOption"
|
|
1364
1527
|
);
|
|
1365
|
-
let
|
|
1366
|
-
return
|
|
1367
|
-
|
|
1528
|
+
let u;
|
|
1529
|
+
return l.length === 1 ? u = /* @__PURE__ */ d(_, { variant: "body1", children: me(p.delivery) }) : l.length === 2 && l.includes("off") ? u = /* @__PURE__ */ d(
|
|
1530
|
+
ee,
|
|
1368
1531
|
{
|
|
1369
|
-
checked:
|
|
1370
|
-
onChange: (
|
|
1371
|
-
if (
|
|
1372
|
-
const
|
|
1373
|
-
|
|
1532
|
+
checked: p.delivery !== "off",
|
|
1533
|
+
onChange: (a, h) => {
|
|
1534
|
+
if (h) {
|
|
1535
|
+
const C = l.find((k) => k !== "off");
|
|
1536
|
+
r(
|
|
1374
1537
|
e.notificationId,
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1538
|
+
s,
|
|
1539
|
+
C,
|
|
1540
|
+
n
|
|
1378
1541
|
);
|
|
1379
1542
|
} else
|
|
1380
|
-
|
|
1543
|
+
r(
|
|
1381
1544
|
e.notificationId,
|
|
1382
|
-
|
|
1545
|
+
s,
|
|
1383
1546
|
"off",
|
|
1384
|
-
|
|
1547
|
+
n
|
|
1385
1548
|
);
|
|
1386
1549
|
}
|
|
1387
1550
|
}
|
|
1388
|
-
) :
|
|
1389
|
-
/* @__PURE__ */
|
|
1390
|
-
|
|
1551
|
+
) : u = /* @__PURE__ */ P(ie, { children: [
|
|
1552
|
+
/* @__PURE__ */ d(
|
|
1553
|
+
ee,
|
|
1391
1554
|
{
|
|
1392
|
-
checked:
|
|
1393
|
-
onChange: (
|
|
1394
|
-
if (
|
|
1395
|
-
const
|
|
1396
|
-
|
|
1555
|
+
checked: p.delivery !== "off",
|
|
1556
|
+
onChange: (a, h) => {
|
|
1557
|
+
if (h) {
|
|
1558
|
+
const C = l.sort(fe).find((k) => k !== "off");
|
|
1559
|
+
r(
|
|
1397
1560
|
e.notificationId,
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1561
|
+
s,
|
|
1562
|
+
C,
|
|
1563
|
+
n
|
|
1401
1564
|
);
|
|
1402
1565
|
} else
|
|
1403
|
-
|
|
1566
|
+
r(
|
|
1404
1567
|
e.notificationId,
|
|
1405
|
-
|
|
1568
|
+
s,
|
|
1406
1569
|
"off",
|
|
1407
|
-
|
|
1570
|
+
n
|
|
1408
1571
|
);
|
|
1409
1572
|
}
|
|
1410
1573
|
}
|
|
1411
1574
|
),
|
|
1412
|
-
/* @__PURE__ */
|
|
1575
|
+
/* @__PURE__ */ d(
|
|
1413
1576
|
"div",
|
|
1414
1577
|
{
|
|
1415
1578
|
style: {
|
|
1416
1579
|
width: "100%",
|
|
1417
1580
|
marginTop: 8,
|
|
1418
|
-
maxHeight:
|
|
1581
|
+
maxHeight: p.delivery !== "off" ? 1e3 : 0,
|
|
1419
1582
|
overflow: "hidden",
|
|
1420
1583
|
transition: "max-height 0.3s ease"
|
|
1421
1584
|
},
|
|
1422
|
-
children: /* @__PURE__ */
|
|
1423
|
-
/* @__PURE__ */
|
|
1424
|
-
/* @__PURE__ */
|
|
1425
|
-
|
|
1585
|
+
children: /* @__PURE__ */ P("div", { children: [
|
|
1586
|
+
/* @__PURE__ */ d("div", { style: { marginTop: 20 }, children: /* @__PURE__ */ d(_, { variant: "body1", fontWeight: 600, children: "Choose frequency:" }) }),
|
|
1587
|
+
/* @__PURE__ */ d(
|
|
1588
|
+
we,
|
|
1426
1589
|
{
|
|
1427
|
-
value:
|
|
1428
|
-
onChange: (
|
|
1429
|
-
|
|
1590
|
+
value: p.delivery,
|
|
1591
|
+
onChange: (a) => {
|
|
1592
|
+
r(
|
|
1430
1593
|
e.notificationId,
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1594
|
+
s,
|
|
1595
|
+
a.target.value,
|
|
1596
|
+
n
|
|
1434
1597
|
);
|
|
1435
1598
|
},
|
|
1436
|
-
children: /* @__PURE__ */
|
|
1599
|
+
children: /* @__PURE__ */ d(Se, { direction: "column", style: { paddingTop: 10 }, children: l.filter((a) => a !== "off").sort(fe).map((a) => /* @__PURE__ */ d(
|
|
1600
|
+
ve,
|
|
1601
|
+
{
|
|
1602
|
+
control: /* @__PURE__ */ d(ke, {}),
|
|
1603
|
+
value: a,
|
|
1604
|
+
label: me(a)
|
|
1605
|
+
},
|
|
1606
|
+
a
|
|
1607
|
+
)) })
|
|
1437
1608
|
}
|
|
1438
1609
|
)
|
|
1439
1610
|
] })
|
|
1440
1611
|
}
|
|
1441
1612
|
)
|
|
1442
|
-
] }), /* @__PURE__ */
|
|
1443
|
-
/* @__PURE__ */
|
|
1613
|
+
] }), /* @__PURE__ */ P("div", { children: [
|
|
1614
|
+
/* @__PURE__ */ P(
|
|
1444
1615
|
"div",
|
|
1445
1616
|
{
|
|
1446
1617
|
style: {
|
|
1447
1618
|
display: "flex",
|
|
1448
1619
|
justifyContent: "space-between",
|
|
1449
1620
|
flexWrap: "wrap",
|
|
1450
|
-
marginTop:
|
|
1451
|
-
marginBottom:
|
|
1621
|
+
marginTop: i === 0 ? 0 : 12,
|
|
1622
|
+
marginBottom: i === e.channels.length - 1 ? 0 : 12
|
|
1452
1623
|
},
|
|
1453
1624
|
children: [
|
|
1454
|
-
/* @__PURE__ */
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1625
|
+
/* @__PURE__ */ P(
|
|
1626
|
+
"div",
|
|
1627
|
+
{
|
|
1628
|
+
style: {
|
|
1629
|
+
display: "flex",
|
|
1630
|
+
alignItems: "center",
|
|
1631
|
+
gap: 8
|
|
1632
|
+
},
|
|
1633
|
+
children: [
|
|
1634
|
+
c,
|
|
1635
|
+
/* @__PURE__ */ d(_, { variant: "body1", children: f })
|
|
1636
|
+
]
|
|
1637
|
+
}
|
|
1638
|
+
),
|
|
1639
|
+
u
|
|
1460
1640
|
]
|
|
1461
|
-
}
|
|
1462
|
-
o
|
|
1641
|
+
}
|
|
1463
1642
|
),
|
|
1464
|
-
|
|
1465
|
-
] },
|
|
1643
|
+
i !== e.channels.length - 1 && /* @__PURE__ */ d(Ve, {})
|
|
1644
|
+
] }, s);
|
|
1466
1645
|
}) });
|
|
1467
1646
|
export {
|
|
1468
|
-
|
|
1469
|
-
|
|
1647
|
+
Go as P,
|
|
1648
|
+
Ae as c
|
|
1470
1649
|
};
|