@notificationapi/react 0.0.10 → 0.0.12
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/Notification.js +37 -32
- package/dist/assets/Preferences.js +825 -810
- package/dist/components/Notifications/Notification.d.ts +3 -2
- package/dist/components/Notifications/NotificationFeed.d.ts +2 -1
- package/dist/components/Notifications/NotificationPopup.d.ts +2 -1
- package/dist/components/Notifications/UnreadBadge.js +1 -1
- package/dist/components/Preferences/NotificationPreferencesInline.d.ts +3 -1
- package/dist/components/Preferences/NotificationPreferencesInline.js +5 -4
- package/dist/components/Preferences/NotificationPreferencesPopup.d.ts +1 -0
- package/dist/components/Preferences/NotificationPreferencesPopup.js +2 -1
- package/dist/components/Preferences/PreferenceInput.d.ts +10 -0
- package/dist/components/Preferences/{PreferenceGroup.js → PreferenceInput.js} +2 -3
- package/dist/components/Preferences/Preferences.js +4 -5
- package/dist/components/Provider/index.d.ts +2 -20
- package/dist/components/Provider/index.js +115 -93
- package/dist/interface.d.ts +19 -0
- package/dist/interface.js +1 -0
- package/package.json +1 -1
- package/dist/components/Preferences/PreferenceGroup.d.ts +0 -7
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as R,
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
import { L as oe, w as ae, c as
|
|
6
|
-
import { u as
|
|
7
|
-
import { p as
|
|
8
|
-
const
|
|
1
|
+
import { jsx as R, Fragment as ne, jsxs as F } from "react/jsx-runtime";
|
|
2
|
+
import { DeliveryOptions as j, Channels as T, NotificationAPIContext as Xe } from "../components/Provider/index.js";
|
|
3
|
+
import * as s from "react";
|
|
4
|
+
import D, { forwardRef as Ue, useRef as be, useImperativeHandle as Ye, useContext as Qe } from "react";
|
|
5
|
+
import { L as oe, w as ae, c as _, M as H, _ as V, d as ve, g as re, m as le, r as G, u as M, N as Oe, a as W, p as Je, j as ce, D as ke, f as Ze, O as en, v as nn, q as tn, Q as on, b as Ce, n as an, T as rn, R as q } from "./colors.js";
|
|
6
|
+
import { u as Q, F as ln, p as Ne, W as Pe, w as cn, j as ge, K as te, x as fe, y as dn, o as $e, A as sn, B as un, e as hn, I as J, T as gn } from "./index3.js";
|
|
7
|
+
import { p as Me, a as fn, R as mn } from "./BellOutlined.js";
|
|
8
|
+
const pn = (e) => ({
|
|
9
9
|
[e.componentCls]: {
|
|
10
10
|
// For common/openAnimation
|
|
11
11
|
[`${e.antCls}-motion-collapse-legacy`]: {
|
|
@@ -21,57 +21,57 @@ const bn = (e) => ({
|
|
|
21
21
|
opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
}),
|
|
25
|
-
var
|
|
26
|
-
var o = e.prefixCls, t = o === void 0 ? "rc-checkbox" : o, i = e.className, r = e.style,
|
|
27
|
-
value:
|
|
28
|
-
}), $ = ae(I, 2), S = $[0],
|
|
29
|
-
|
|
24
|
+
}), ze = /* @__PURE__ */ s.createContext(null), bn = ze.Provider, Re = /* @__PURE__ */ s.createContext(null), vn = Re.Provider;
|
|
25
|
+
var Cn = ["prefixCls", "className", "style", "checked", "disabled", "defaultChecked", "type", "title", "onChange"], $n = /* @__PURE__ */ Ue(function(e, n) {
|
|
26
|
+
var o = e.prefixCls, t = o === void 0 ? "rc-checkbox" : o, i = e.className, r = e.style, d = e.checked, a = e.disabled, c = e.defaultChecked, l = c === void 0 ? !1 : c, h = e.type, u = h === void 0 ? "checkbox" : h, C = e.title, m = e.onChange, O = oe(e, Cn), b = be(null), p = be(null), I = Q(l, {
|
|
27
|
+
value: d
|
|
28
|
+
}), $ = ae(I, 2), S = $[0], v = $[1];
|
|
29
|
+
Ye(n, function() {
|
|
30
30
|
return {
|
|
31
|
-
focus: function(
|
|
32
|
-
var
|
|
33
|
-
(
|
|
31
|
+
focus: function(f) {
|
|
32
|
+
var w;
|
|
33
|
+
(w = b.current) === null || w === void 0 || w.focus(f);
|
|
34
34
|
},
|
|
35
35
|
blur: function() {
|
|
36
|
-
var
|
|
37
|
-
(
|
|
36
|
+
var f;
|
|
37
|
+
(f = b.current) === null || f === void 0 || f.blur();
|
|
38
38
|
},
|
|
39
|
-
input:
|
|
40
|
-
nativeElement:
|
|
39
|
+
input: b.current,
|
|
40
|
+
nativeElement: p.current
|
|
41
41
|
};
|
|
42
42
|
});
|
|
43
|
-
var x =
|
|
44
|
-
a || ("checked" in e ||
|
|
43
|
+
var x = _(t, i, H(H({}, "".concat(t, "-checked"), S), "".concat(t, "-disabled"), a)), g = function(f) {
|
|
44
|
+
a || ("checked" in e || v(f.target.checked), m == null || m({
|
|
45
45
|
target: ve(ve({}, e), {}, {
|
|
46
|
-
type:
|
|
47
|
-
checked:
|
|
46
|
+
type: u,
|
|
47
|
+
checked: f.target.checked
|
|
48
48
|
}),
|
|
49
49
|
stopPropagation: function() {
|
|
50
|
-
|
|
50
|
+
f.stopPropagation();
|
|
51
51
|
},
|
|
52
52
|
preventDefault: function() {
|
|
53
|
-
|
|
53
|
+
f.preventDefault();
|
|
54
54
|
},
|
|
55
|
-
nativeEvent:
|
|
55
|
+
nativeEvent: f.nativeEvent
|
|
56
56
|
}));
|
|
57
57
|
};
|
|
58
|
-
return /* @__PURE__ */
|
|
58
|
+
return /* @__PURE__ */ s.createElement("span", {
|
|
59
59
|
className: x,
|
|
60
|
-
title:
|
|
60
|
+
title: C,
|
|
61
61
|
style: r,
|
|
62
|
-
ref:
|
|
63
|
-
}, /* @__PURE__ */
|
|
62
|
+
ref: p
|
|
63
|
+
}, /* @__PURE__ */ s.createElement("input", V({}, O, {
|
|
64
64
|
className: "".concat(t, "-input"),
|
|
65
|
-
ref:
|
|
65
|
+
ref: b,
|
|
66
66
|
onChange: g,
|
|
67
67
|
disabled: a,
|
|
68
68
|
checked: !!S,
|
|
69
|
-
type:
|
|
70
|
-
})), /* @__PURE__ */
|
|
69
|
+
type: u
|
|
70
|
+
})), /* @__PURE__ */ s.createElement("span", {
|
|
71
71
|
className: "".concat(t, "-inner")
|
|
72
72
|
}));
|
|
73
73
|
});
|
|
74
|
-
const
|
|
74
|
+
const yn = (e) => {
|
|
75
75
|
const {
|
|
76
76
|
componentCls: n,
|
|
77
77
|
antCls: o
|
|
@@ -92,24 +92,24 @@ const Sn = (e) => {
|
|
|
92
92
|
}
|
|
93
93
|
})
|
|
94
94
|
};
|
|
95
|
-
},
|
|
95
|
+
}, Sn = (e) => {
|
|
96
96
|
const {
|
|
97
97
|
componentCls: n,
|
|
98
98
|
wrapperMarginInlineEnd: o,
|
|
99
99
|
colorPrimary: t,
|
|
100
100
|
radioSize: i,
|
|
101
101
|
motionDurationSlow: r,
|
|
102
|
-
motionDurationMid:
|
|
102
|
+
motionDurationMid: d,
|
|
103
103
|
motionEaseInOutCirc: a,
|
|
104
|
-
colorBgContainer:
|
|
105
|
-
colorBorder:
|
|
106
|
-
lineWidth:
|
|
107
|
-
colorBgContainerDisabled:
|
|
108
|
-
colorTextDisabled:
|
|
109
|
-
paddingXS:
|
|
110
|
-
dotColorDisabled:
|
|
111
|
-
lineType:
|
|
112
|
-
radioColor:
|
|
104
|
+
colorBgContainer: c,
|
|
105
|
+
colorBorder: l,
|
|
106
|
+
lineWidth: h,
|
|
107
|
+
colorBgContainerDisabled: u,
|
|
108
|
+
colorTextDisabled: C,
|
|
109
|
+
paddingXS: m,
|
|
110
|
+
dotColorDisabled: O,
|
|
111
|
+
lineType: b,
|
|
112
|
+
radioColor: p,
|
|
113
113
|
radioBgColor: I,
|
|
114
114
|
calc: $
|
|
115
115
|
} = e, S = `${n}-inner`, x = $(i).sub($(4).mul(2)), g = $(1).mul(i).equal();
|
|
@@ -141,7 +141,7 @@ const Sn = (e) => {
|
|
|
141
141
|
insetInlineStart: 0,
|
|
142
142
|
width: "100%",
|
|
143
143
|
height: "100%",
|
|
144
|
-
border: `${M(
|
|
144
|
+
border: `${M(h)} ${b} ${t}`,
|
|
145
145
|
borderRadius: "50%",
|
|
146
146
|
visibility: "hidden",
|
|
147
147
|
opacity: 0,
|
|
@@ -159,7 +159,7 @@ const Sn = (e) => {
|
|
|
159
159
|
&:hover ${S}`]: {
|
|
160
160
|
borderColor: t
|
|
161
161
|
},
|
|
162
|
-
[`${n}-input:focus-visible + ${S}`]: Object.assign({},
|
|
162
|
+
[`${n}-input:focus-visible + ${S}`]: Object.assign({}, Oe(e)),
|
|
163
163
|
[`${n}:hover::after, ${n}-wrapper:hover &::after`]: {
|
|
164
164
|
visibility: "visible"
|
|
165
165
|
},
|
|
@@ -174,7 +174,7 @@ const Sn = (e) => {
|
|
|
174
174
|
height: g,
|
|
175
175
|
marginBlockStart: $(1).mul(i).div(-2).equal(),
|
|
176
176
|
marginInlineStart: $(1).mul(i).div(-2).equal(),
|
|
177
|
-
backgroundColor:
|
|
177
|
+
backgroundColor: p,
|
|
178
178
|
borderBlockStart: 0,
|
|
179
179
|
borderInlineStart: 0,
|
|
180
180
|
borderRadius: g,
|
|
@@ -190,12 +190,12 @@ const Sn = (e) => {
|
|
|
190
190
|
display: "block",
|
|
191
191
|
width: g,
|
|
192
192
|
height: g,
|
|
193
|
-
backgroundColor:
|
|
194
|
-
borderColor:
|
|
193
|
+
backgroundColor: c,
|
|
194
|
+
borderColor: l,
|
|
195
195
|
borderStyle: "solid",
|
|
196
|
-
borderWidth:
|
|
196
|
+
borderWidth: h,
|
|
197
197
|
borderRadius: "50%",
|
|
198
|
-
transition: `all ${
|
|
198
|
+
transition: `all ${d}`
|
|
199
199
|
},
|
|
200
200
|
[`${n}-input`]: {
|
|
201
201
|
position: "absolute",
|
|
@@ -219,18 +219,18 @@ const Sn = (e) => {
|
|
|
219
219
|
[`${n}-disabled`]: {
|
|
220
220
|
cursor: "not-allowed",
|
|
221
221
|
[S]: {
|
|
222
|
-
backgroundColor:
|
|
223
|
-
borderColor:
|
|
222
|
+
backgroundColor: u,
|
|
223
|
+
borderColor: l,
|
|
224
224
|
cursor: "not-allowed",
|
|
225
225
|
"&::after": {
|
|
226
|
-
backgroundColor:
|
|
226
|
+
backgroundColor: O
|
|
227
227
|
}
|
|
228
228
|
},
|
|
229
229
|
[`${n}-input`]: {
|
|
230
230
|
cursor: "not-allowed"
|
|
231
231
|
},
|
|
232
232
|
[`${n}-disabled + span`]: {
|
|
233
|
-
color:
|
|
233
|
+
color: C,
|
|
234
234
|
cursor: "not-allowed"
|
|
235
235
|
},
|
|
236
236
|
[`&${n}-checked`]: {
|
|
@@ -244,43 +244,43 @@ const Sn = (e) => {
|
|
|
244
244
|
}
|
|
245
245
|
},
|
|
246
246
|
[`span${n} + *`]: {
|
|
247
|
-
paddingInlineStart:
|
|
248
|
-
paddingInlineEnd:
|
|
247
|
+
paddingInlineStart: m,
|
|
248
|
+
paddingInlineEnd: m
|
|
249
249
|
}
|
|
250
250
|
})
|
|
251
251
|
};
|
|
252
|
-
},
|
|
252
|
+
}, xn = (e) => {
|
|
253
253
|
const {
|
|
254
254
|
buttonColor: n,
|
|
255
255
|
controlHeight: o,
|
|
256
256
|
componentCls: t,
|
|
257
257
|
lineWidth: i,
|
|
258
258
|
lineType: r,
|
|
259
|
-
colorBorder:
|
|
259
|
+
colorBorder: d,
|
|
260
260
|
motionDurationSlow: a,
|
|
261
|
-
motionDurationMid:
|
|
262
|
-
buttonPaddingInline:
|
|
263
|
-
fontSize:
|
|
264
|
-
buttonBg:
|
|
265
|
-
fontSizeLG:
|
|
266
|
-
controlHeightLG:
|
|
267
|
-
controlHeightSM:
|
|
268
|
-
paddingXS:
|
|
269
|
-
borderRadius:
|
|
261
|
+
motionDurationMid: c,
|
|
262
|
+
buttonPaddingInline: l,
|
|
263
|
+
fontSize: h,
|
|
264
|
+
buttonBg: u,
|
|
265
|
+
fontSizeLG: C,
|
|
266
|
+
controlHeightLG: m,
|
|
267
|
+
controlHeightSM: O,
|
|
268
|
+
paddingXS: b,
|
|
269
|
+
borderRadius: p,
|
|
270
270
|
borderRadiusSM: I,
|
|
271
271
|
borderRadiusLG: $,
|
|
272
272
|
buttonCheckedBg: S,
|
|
273
|
-
buttonSolidCheckedColor:
|
|
273
|
+
buttonSolidCheckedColor: v,
|
|
274
274
|
colorTextDisabled: x,
|
|
275
275
|
colorBgContainerDisabled: g,
|
|
276
|
-
buttonCheckedBgDisabled:
|
|
277
|
-
buttonCheckedColorDisabled:
|
|
278
|
-
colorPrimary:
|
|
279
|
-
colorPrimaryHover:
|
|
276
|
+
buttonCheckedBgDisabled: k,
|
|
277
|
+
buttonCheckedColorDisabled: f,
|
|
278
|
+
colorPrimary: w,
|
|
279
|
+
colorPrimaryHover: N,
|
|
280
280
|
colorPrimaryActive: y,
|
|
281
281
|
buttonSolidCheckedBg: P,
|
|
282
|
-
buttonSolidCheckedHoverBg:
|
|
283
|
-
buttonSolidCheckedActiveBg:
|
|
282
|
+
buttonSolidCheckedHoverBg: B,
|
|
283
|
+
buttonSolidCheckedActiveBg: E,
|
|
284
284
|
calc: z
|
|
285
285
|
} = e;
|
|
286
286
|
return {
|
|
@@ -289,20 +289,20 @@ const Sn = (e) => {
|
|
|
289
289
|
display: "inline-block",
|
|
290
290
|
height: o,
|
|
291
291
|
margin: 0,
|
|
292
|
-
paddingInline:
|
|
292
|
+
paddingInline: l,
|
|
293
293
|
paddingBlock: 0,
|
|
294
294
|
color: n,
|
|
295
|
-
fontSize:
|
|
295
|
+
fontSize: h,
|
|
296
296
|
lineHeight: M(z(o).sub(z(i).mul(2)).equal()),
|
|
297
|
-
background:
|
|
298
|
-
border: `${M(i)} ${r} ${
|
|
297
|
+
background: u,
|
|
298
|
+
border: `${M(i)} ${r} ${d}`,
|
|
299
299
|
// strange align fix for chrome but works
|
|
300
300
|
// https://gw.alipayobjects.com/zos/rmsportal/VFTfKXJuogBAXcvfAUWJ.gif
|
|
301
301
|
borderBlockStartWidth: z(i).add(0.02).equal(),
|
|
302
302
|
borderInlineStartWidth: 0,
|
|
303
303
|
borderInlineEndWidth: i,
|
|
304
304
|
cursor: "pointer",
|
|
305
|
-
transition: [`color ${
|
|
305
|
+
transition: [`color ${c}`, `background ${c}`, `box-shadow ${c}`].join(","),
|
|
306
306
|
a: {
|
|
307
307
|
color: n
|
|
308
308
|
},
|
|
@@ -325,27 +325,27 @@ const Sn = (e) => {
|
|
|
325
325
|
height: "100%",
|
|
326
326
|
paddingBlock: i,
|
|
327
327
|
paddingInline: 0,
|
|
328
|
-
backgroundColor:
|
|
328
|
+
backgroundColor: d,
|
|
329
329
|
transition: `background-color ${a}`,
|
|
330
330
|
content: '""'
|
|
331
331
|
}
|
|
332
332
|
},
|
|
333
333
|
"&:first-child": {
|
|
334
|
-
borderInlineStart: `${M(i)} ${r} ${
|
|
335
|
-
borderStartStartRadius:
|
|
336
|
-
borderEndStartRadius:
|
|
334
|
+
borderInlineStart: `${M(i)} ${r} ${d}`,
|
|
335
|
+
borderStartStartRadius: p,
|
|
336
|
+
borderEndStartRadius: p
|
|
337
337
|
},
|
|
338
338
|
"&:last-child": {
|
|
339
|
-
borderStartEndRadius:
|
|
340
|
-
borderEndEndRadius:
|
|
339
|
+
borderStartEndRadius: p,
|
|
340
|
+
borderEndEndRadius: p
|
|
341
341
|
},
|
|
342
342
|
"&:first-child:last-child": {
|
|
343
|
-
borderRadius:
|
|
343
|
+
borderRadius: p
|
|
344
344
|
},
|
|
345
345
|
[`${t}-group-large &`]: {
|
|
346
|
-
height:
|
|
347
|
-
fontSize:
|
|
348
|
-
lineHeight: M(z(
|
|
346
|
+
height: m,
|
|
347
|
+
fontSize: C,
|
|
348
|
+
lineHeight: M(z(m).sub(z(i).mul(2)).equal()),
|
|
349
349
|
"&:first-child": {
|
|
350
350
|
borderStartStartRadius: $,
|
|
351
351
|
borderEndStartRadius: $
|
|
@@ -356,10 +356,10 @@ const Sn = (e) => {
|
|
|
356
356
|
}
|
|
357
357
|
},
|
|
358
358
|
[`${t}-group-small &`]: {
|
|
359
|
-
height:
|
|
360
|
-
paddingInline: z(
|
|
359
|
+
height: O,
|
|
360
|
+
paddingInline: z(b).sub(i).equal(),
|
|
361
361
|
paddingBlock: 0,
|
|
362
|
-
lineHeight: M(z(
|
|
362
|
+
lineHeight: M(z(O).sub(z(i).mul(2)).equal()),
|
|
363
363
|
"&:first-child": {
|
|
364
364
|
borderStartStartRadius: I,
|
|
365
365
|
borderEndStartRadius: I
|
|
@@ -371,9 +371,9 @@ const Sn = (e) => {
|
|
|
371
371
|
},
|
|
372
372
|
"&:hover": {
|
|
373
373
|
position: "relative",
|
|
374
|
-
color:
|
|
374
|
+
color: w
|
|
375
375
|
},
|
|
376
|
-
"&:has(:focus-visible)": Object.assign({},
|
|
376
|
+
"&:has(:focus-visible)": Object.assign({}, Oe(e)),
|
|
377
377
|
[`${t}-inner, input[type='checkbox'], input[type='radio']`]: {
|
|
378
378
|
width: 0,
|
|
379
379
|
height: 0,
|
|
@@ -382,20 +382,20 @@ const Sn = (e) => {
|
|
|
382
382
|
},
|
|
383
383
|
[`&-checked:not(${t}-button-wrapper-disabled)`]: {
|
|
384
384
|
zIndex: 1,
|
|
385
|
-
color:
|
|
385
|
+
color: w,
|
|
386
386
|
background: S,
|
|
387
|
-
borderColor:
|
|
387
|
+
borderColor: w,
|
|
388
388
|
"&::before": {
|
|
389
|
-
backgroundColor:
|
|
389
|
+
backgroundColor: w
|
|
390
390
|
},
|
|
391
391
|
"&:first-child": {
|
|
392
|
-
borderColor:
|
|
392
|
+
borderColor: w
|
|
393
393
|
},
|
|
394
394
|
"&:hover": {
|
|
395
|
-
color:
|
|
396
|
-
borderColor:
|
|
395
|
+
color: N,
|
|
396
|
+
borderColor: N,
|
|
397
397
|
"&::before": {
|
|
398
|
-
backgroundColor:
|
|
398
|
+
backgroundColor: N
|
|
399
399
|
}
|
|
400
400
|
},
|
|
401
401
|
"&:active": {
|
|
@@ -407,78 +407,78 @@ const Sn = (e) => {
|
|
|
407
407
|
}
|
|
408
408
|
},
|
|
409
409
|
[`${t}-group-solid &-checked:not(${t}-button-wrapper-disabled)`]: {
|
|
410
|
-
color:
|
|
410
|
+
color: v,
|
|
411
411
|
background: P,
|
|
412
412
|
borderColor: P,
|
|
413
413
|
"&:hover": {
|
|
414
|
-
color:
|
|
415
|
-
background:
|
|
416
|
-
borderColor:
|
|
414
|
+
color: v,
|
|
415
|
+
background: B,
|
|
416
|
+
borderColor: B
|
|
417
417
|
},
|
|
418
418
|
"&:active": {
|
|
419
|
-
color:
|
|
420
|
-
background:
|
|
421
|
-
borderColor:
|
|
419
|
+
color: v,
|
|
420
|
+
background: E,
|
|
421
|
+
borderColor: E
|
|
422
422
|
}
|
|
423
423
|
},
|
|
424
424
|
"&-disabled": {
|
|
425
425
|
color: x,
|
|
426
426
|
backgroundColor: g,
|
|
427
|
-
borderColor:
|
|
427
|
+
borderColor: d,
|
|
428
428
|
cursor: "not-allowed",
|
|
429
429
|
"&:first-child, &:hover": {
|
|
430
430
|
color: x,
|
|
431
431
|
backgroundColor: g,
|
|
432
|
-
borderColor:
|
|
432
|
+
borderColor: d
|
|
433
433
|
}
|
|
434
434
|
},
|
|
435
435
|
[`&-disabled${t}-button-wrapper-checked`]: {
|
|
436
|
-
color:
|
|
437
|
-
backgroundColor:
|
|
438
|
-
borderColor:
|
|
436
|
+
color: f,
|
|
437
|
+
backgroundColor: k,
|
|
438
|
+
borderColor: d,
|
|
439
439
|
boxShadow: "none"
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
442
|
};
|
|
443
|
-
},
|
|
443
|
+
}, In = (e) => {
|
|
444
444
|
const {
|
|
445
445
|
wireframe: n,
|
|
446
446
|
padding: o,
|
|
447
447
|
marginXS: t,
|
|
448
448
|
lineWidth: i,
|
|
449
449
|
fontSizeLG: r,
|
|
450
|
-
colorText:
|
|
450
|
+
colorText: d,
|
|
451
451
|
colorBgContainer: a,
|
|
452
|
-
colorTextDisabled:
|
|
453
|
-
controlItemBgActiveDisabled:
|
|
454
|
-
colorTextLightSolid:
|
|
455
|
-
colorPrimary:
|
|
456
|
-
colorPrimaryHover:
|
|
457
|
-
colorPrimaryActive:
|
|
458
|
-
colorWhite:
|
|
459
|
-
} = e,
|
|
452
|
+
colorTextDisabled: c,
|
|
453
|
+
controlItemBgActiveDisabled: l,
|
|
454
|
+
colorTextLightSolid: h,
|
|
455
|
+
colorPrimary: u,
|
|
456
|
+
colorPrimaryHover: C,
|
|
457
|
+
colorPrimaryActive: m,
|
|
458
|
+
colorWhite: O
|
|
459
|
+
} = e, b = 4, p = r, I = n ? p - b * 2 : p - (b + i) * 2;
|
|
460
460
|
return {
|
|
461
461
|
// Radio
|
|
462
|
-
radioSize:
|
|
462
|
+
radioSize: p,
|
|
463
463
|
dotSize: I,
|
|
464
|
-
dotColorDisabled:
|
|
464
|
+
dotColorDisabled: c,
|
|
465
465
|
// Radio buttons
|
|
466
|
-
buttonSolidCheckedColor:
|
|
467
|
-
buttonSolidCheckedBg:
|
|
468
|
-
buttonSolidCheckedHoverBg:
|
|
469
|
-
buttonSolidCheckedActiveBg:
|
|
466
|
+
buttonSolidCheckedColor: h,
|
|
467
|
+
buttonSolidCheckedBg: u,
|
|
468
|
+
buttonSolidCheckedHoverBg: C,
|
|
469
|
+
buttonSolidCheckedActiveBg: m,
|
|
470
470
|
buttonBg: a,
|
|
471
471
|
buttonCheckedBg: a,
|
|
472
|
-
buttonColor:
|
|
473
|
-
buttonCheckedBgDisabled:
|
|
474
|
-
buttonCheckedColorDisabled:
|
|
472
|
+
buttonColor: d,
|
|
473
|
+
buttonCheckedBgDisabled: l,
|
|
474
|
+
buttonCheckedColorDisabled: c,
|
|
475
475
|
buttonPaddingInline: o - i,
|
|
476
476
|
wrapperMarginInlineEnd: t,
|
|
477
477
|
// internal
|
|
478
|
-
radioColor: n ?
|
|
479
|
-
radioBgColor: n ? a :
|
|
478
|
+
radioColor: n ? u : O,
|
|
479
|
+
radioBgColor: n ? a : u
|
|
480
480
|
};
|
|
481
|
-
},
|
|
481
|
+
}, Be = re("Radio", (e) => {
|
|
482
482
|
const {
|
|
483
483
|
controlOutline: n,
|
|
484
484
|
controlOutlineWidth: o
|
|
@@ -486,14 +486,14 @@ const Sn = (e) => {
|
|
|
486
486
|
radioFocusShadow: t,
|
|
487
487
|
radioButtonFocusShadow: t
|
|
488
488
|
});
|
|
489
|
-
return [
|
|
490
|
-
},
|
|
489
|
+
return [yn(r), Sn(r), xn(r)];
|
|
490
|
+
}, In, {
|
|
491
491
|
unitless: {
|
|
492
492
|
radioSize: !0,
|
|
493
493
|
dotSize: !0
|
|
494
494
|
}
|
|
495
495
|
});
|
|
496
|
-
var
|
|
496
|
+
var wn = function(e, n) {
|
|
497
497
|
var o = {};
|
|
498
498
|
for (var t in e)
|
|
499
499
|
Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
|
|
@@ -502,128 +502,128 @@ var En = function(e, n) {
|
|
|
502
502
|
n.indexOf(t[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[i]) && (o[t[i]] = e[t[i]]);
|
|
503
503
|
return o;
|
|
504
504
|
};
|
|
505
|
-
const
|
|
505
|
+
const En = (e, n) => {
|
|
506
506
|
var o, t;
|
|
507
|
-
const i =
|
|
508
|
-
getPrefixCls:
|
|
507
|
+
const i = s.useContext(ze), r = s.useContext(Re), {
|
|
508
|
+
getPrefixCls: d,
|
|
509
509
|
direction: a,
|
|
510
|
-
radio:
|
|
511
|
-
} =
|
|
512
|
-
isFormItemInput:
|
|
513
|
-
} =
|
|
510
|
+
radio: c
|
|
511
|
+
} = s.useContext(W), l = s.useRef(null), h = Je(n, l), {
|
|
512
|
+
isFormItemInput: u
|
|
513
|
+
} = s.useContext(ln);
|
|
514
514
|
if (process.env.NODE_ENV !== "production") {
|
|
515
|
-
const
|
|
516
|
-
process.env.NODE_ENV !== "production" &&
|
|
515
|
+
const E = ce("Radio");
|
|
516
|
+
process.env.NODE_ENV !== "production" && E(!("optionType" in e), "usage", "`optionType` is only support in Radio.Group.");
|
|
517
517
|
}
|
|
518
|
-
const
|
|
518
|
+
const C = (E) => {
|
|
519
519
|
var z, A;
|
|
520
|
-
(z = e.onChange) === null || z === void 0 || z.call(e,
|
|
520
|
+
(z = e.onChange) === null || z === void 0 || z.call(e, E), (A = i == null ? void 0 : i.onChange) === null || A === void 0 || A.call(i, E);
|
|
521
521
|
}, {
|
|
522
|
-
prefixCls:
|
|
523
|
-
className:
|
|
524
|
-
rootClassName:
|
|
525
|
-
children:
|
|
522
|
+
prefixCls: m,
|
|
523
|
+
className: O,
|
|
524
|
+
rootClassName: b,
|
|
525
|
+
children: p,
|
|
526
526
|
style: I,
|
|
527
527
|
title: $
|
|
528
|
-
} = e, S =
|
|
529
|
-
i && (y.name = i.name, y.onChange =
|
|
530
|
-
const
|
|
528
|
+
} = e, S = wn(e, ["prefixCls", "className", "rootClassName", "children", "style", "title"]), v = d("radio", m), x = ((i == null ? void 0 : i.optionType) || r) === "button", g = x ? `${v}-button` : v, k = Ne(v), [f, w, N] = Be(v, k), y = Object.assign({}, S), P = s.useContext(ke);
|
|
529
|
+
i && (y.name = i.name, y.onChange = C, y.checked = e.value === i.value, y.disabled = (o = y.disabled) !== null && o !== void 0 ? o : i.disabled), y.disabled = (t = y.disabled) !== null && t !== void 0 ? t : P;
|
|
530
|
+
const B = _(`${g}-wrapper`, {
|
|
531
531
|
[`${g}-wrapper-checked`]: y.checked,
|
|
532
532
|
[`${g}-wrapper-disabled`]: y.disabled,
|
|
533
533
|
[`${g}-wrapper-rtl`]: a === "rtl",
|
|
534
|
-
[`${g}-wrapper-in-form-item`]:
|
|
535
|
-
},
|
|
536
|
-
return
|
|
534
|
+
[`${g}-wrapper-in-form-item`]: u
|
|
535
|
+
}, c == null ? void 0 : c.className, O, b, w, N, k);
|
|
536
|
+
return f(/* @__PURE__ */ s.createElement(Pe, {
|
|
537
537
|
component: "Radio",
|
|
538
538
|
disabled: y.disabled
|
|
539
|
-
}, /* @__PURE__ */
|
|
540
|
-
className:
|
|
541
|
-
style: Object.assign(Object.assign({},
|
|
539
|
+
}, /* @__PURE__ */ s.createElement("label", {
|
|
540
|
+
className: B,
|
|
541
|
+
style: Object.assign(Object.assign({}, c == null ? void 0 : c.style), I),
|
|
542
542
|
onMouseEnter: e.onMouseEnter,
|
|
543
543
|
onMouseLeave: e.onMouseLeave,
|
|
544
544
|
title: $
|
|
545
|
-
}, /* @__PURE__ */
|
|
546
|
-
className:
|
|
545
|
+
}, /* @__PURE__ */ s.createElement($n, Object.assign({}, y, {
|
|
546
|
+
className: _(y.className, !x && cn),
|
|
547
547
|
type: "radio",
|
|
548
548
|
prefixCls: g,
|
|
549
|
-
ref:
|
|
550
|
-
})),
|
|
551
|
-
},
|
|
552
|
-
process.env.NODE_ENV !== "production" && (
|
|
553
|
-
const
|
|
549
|
+
ref: h
|
|
550
|
+
})), p !== void 0 ? /* @__PURE__ */ s.createElement("span", null, p) : null)));
|
|
551
|
+
}, U = /* @__PURE__ */ s.forwardRef(En);
|
|
552
|
+
process.env.NODE_ENV !== "production" && (U.displayName = "Radio");
|
|
553
|
+
const On = /* @__PURE__ */ s.forwardRef((e, n) => {
|
|
554
554
|
const {
|
|
555
555
|
getPrefixCls: o,
|
|
556
556
|
direction: t
|
|
557
|
-
} =
|
|
557
|
+
} = s.useContext(W), [i, r] = Q(e.defaultValue, {
|
|
558
558
|
value: e.value
|
|
559
|
-
}),
|
|
560
|
-
const z = i, A =
|
|
559
|
+
}), d = (E) => {
|
|
560
|
+
const z = i, A = E.target.value;
|
|
561
561
|
"value" in e || r(A);
|
|
562
562
|
const {
|
|
563
563
|
onChange: L
|
|
564
564
|
} = e;
|
|
565
|
-
L && A !== z && L(
|
|
565
|
+
L && A !== z && L(E);
|
|
566
566
|
}, {
|
|
567
567
|
prefixCls: a,
|
|
568
|
-
className:
|
|
569
|
-
rootClassName:
|
|
570
|
-
options:
|
|
571
|
-
buttonStyle:
|
|
572
|
-
disabled:
|
|
573
|
-
children:
|
|
574
|
-
size:
|
|
575
|
-
style:
|
|
576
|
-
id:
|
|
568
|
+
className: c,
|
|
569
|
+
rootClassName: l,
|
|
570
|
+
options: h,
|
|
571
|
+
buttonStyle: u = "outline",
|
|
572
|
+
disabled: C,
|
|
573
|
+
children: m,
|
|
574
|
+
size: O,
|
|
575
|
+
style: b,
|
|
576
|
+
id: p,
|
|
577
577
|
onMouseEnter: I,
|
|
578
578
|
onMouseLeave: $,
|
|
579
579
|
onFocus: S,
|
|
580
|
-
onBlur:
|
|
581
|
-
} = e, x = o("radio", a), g = `${x}-group`,
|
|
582
|
-
let y =
|
|
583
|
-
|
|
584
|
-
key:
|
|
580
|
+
onBlur: v
|
|
581
|
+
} = e, x = o("radio", a), g = `${x}-group`, k = Ne(x), [f, w, N] = Be(x, k);
|
|
582
|
+
let y = m;
|
|
583
|
+
h && h.length > 0 && (y = h.map((E) => typeof E == "string" || typeof E == "number" ? /* @__PURE__ */ s.createElement(U, {
|
|
584
|
+
key: E.toString(),
|
|
585
585
|
prefixCls: x,
|
|
586
|
-
disabled:
|
|
587
|
-
value:
|
|
588
|
-
checked: i ===
|
|
589
|
-
},
|
|
590
|
-
key: `radio-group-value-options-${
|
|
586
|
+
disabled: C,
|
|
587
|
+
value: E,
|
|
588
|
+
checked: i === E
|
|
589
|
+
}, E) : /* @__PURE__ */ s.createElement(U, {
|
|
590
|
+
key: `radio-group-value-options-${E.value}`,
|
|
591
591
|
prefixCls: x,
|
|
592
|
-
disabled:
|
|
593
|
-
value:
|
|
594
|
-
checked: i ===
|
|
595
|
-
title:
|
|
596
|
-
style:
|
|
597
|
-
id:
|
|
598
|
-
required:
|
|
599
|
-
},
|
|
600
|
-
const P = ge(
|
|
592
|
+
disabled: E.disabled || C,
|
|
593
|
+
value: E.value,
|
|
594
|
+
checked: i === E.value,
|
|
595
|
+
title: E.title,
|
|
596
|
+
style: E.style,
|
|
597
|
+
id: E.id,
|
|
598
|
+
required: E.required
|
|
599
|
+
}, E.label)));
|
|
600
|
+
const P = ge(O), B = _(g, `${g}-${u}`, {
|
|
601
601
|
[`${g}-${P}`]: P,
|
|
602
602
|
[`${g}-rtl`]: t === "rtl"
|
|
603
|
-
}, l,
|
|
604
|
-
return
|
|
603
|
+
}, c, l, w, N, k);
|
|
604
|
+
return f(/* @__PURE__ */ s.createElement("div", Object.assign({}, Me(e, {
|
|
605
605
|
aria: !0,
|
|
606
606
|
data: !0
|
|
607
607
|
}), {
|
|
608
|
-
className:
|
|
609
|
-
style:
|
|
608
|
+
className: B,
|
|
609
|
+
style: b,
|
|
610
610
|
onMouseEnter: I,
|
|
611
611
|
onMouseLeave: $,
|
|
612
612
|
onFocus: S,
|
|
613
|
-
onBlur:
|
|
614
|
-
id:
|
|
613
|
+
onBlur: v,
|
|
614
|
+
id: p,
|
|
615
615
|
ref: n
|
|
616
|
-
}), /* @__PURE__ */
|
|
616
|
+
}), /* @__PURE__ */ s.createElement(bn, {
|
|
617
617
|
value: {
|
|
618
|
-
onChange:
|
|
618
|
+
onChange: d,
|
|
619
619
|
value: i,
|
|
620
620
|
disabled: e.disabled,
|
|
621
621
|
name: e.name,
|
|
622
622
|
optionType: e.optionType
|
|
623
623
|
}
|
|
624
624
|
}, y)));
|
|
625
|
-
}), kn = /* @__PURE__ */
|
|
626
|
-
var
|
|
625
|
+
}), kn = /* @__PURE__ */ s.memo(On);
|
|
626
|
+
var Nn = function(e, n) {
|
|
627
627
|
var o = {};
|
|
628
628
|
for (var t in e)
|
|
629
629
|
Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
|
|
@@ -632,240 +632,240 @@ var Pn = function(e, n) {
|
|
|
632
632
|
n.indexOf(t[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[i]) && (o[t[i]] = e[t[i]]);
|
|
633
633
|
return o;
|
|
634
634
|
};
|
|
635
|
-
const
|
|
635
|
+
const Pn = (e, n) => {
|
|
636
636
|
const {
|
|
637
637
|
getPrefixCls: o
|
|
638
|
-
} =
|
|
638
|
+
} = s.useContext(W), {
|
|
639
639
|
prefixCls: t
|
|
640
|
-
} = e, i =
|
|
641
|
-
return /* @__PURE__ */
|
|
640
|
+
} = e, i = Nn(e, ["prefixCls"]), r = o("radio", t);
|
|
641
|
+
return /* @__PURE__ */ s.createElement(vn, {
|
|
642
642
|
value: "button"
|
|
643
|
-
}, /* @__PURE__ */
|
|
643
|
+
}, /* @__PURE__ */ s.createElement(U, Object.assign({
|
|
644
644
|
prefixCls: r
|
|
645
645
|
}, i, {
|
|
646
646
|
type: "radio",
|
|
647
647
|
ref: n
|
|
648
648
|
})));
|
|
649
|
-
},
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
var
|
|
654
|
-
var o = e.prefixCls, t = e.forceRender, i = e.className, r = e.style,
|
|
655
|
-
return
|
|
656
|
-
(t || a) &&
|
|
657
|
-
}, [t, a]),
|
|
649
|
+
}, Mn = /* @__PURE__ */ s.forwardRef(Pn), Y = U;
|
|
650
|
+
Y.Button = Mn;
|
|
651
|
+
Y.Group = kn;
|
|
652
|
+
Y.__ANT_RADIO = !0;
|
|
653
|
+
var De = /* @__PURE__ */ D.forwardRef(function(e, n) {
|
|
654
|
+
var o = e.prefixCls, t = e.forceRender, i = e.className, r = e.style, d = e.children, a = e.isActive, c = e.role, l = D.useState(a || t), h = ae(l, 2), u = h[0], C = h[1];
|
|
655
|
+
return D.useEffect(function() {
|
|
656
|
+
(t || a) && C(!0);
|
|
657
|
+
}, [t, a]), u ? /* @__PURE__ */ D.createElement("div", {
|
|
658
658
|
ref: n,
|
|
659
|
-
className:
|
|
659
|
+
className: _("".concat(o, "-content"), H(H({}, "".concat(o, "-content-active"), a), "".concat(o, "-content-inactive"), !a), i),
|
|
660
660
|
style: r,
|
|
661
|
-
role:
|
|
662
|
-
}, /* @__PURE__ */
|
|
661
|
+
role: c
|
|
662
|
+
}, /* @__PURE__ */ D.createElement("div", {
|
|
663
663
|
className: "".concat(o, "-content-box")
|
|
664
|
-
},
|
|
664
|
+
}, d)) : null;
|
|
665
665
|
});
|
|
666
|
-
|
|
667
|
-
var
|
|
668
|
-
var o = e.showArrow, t = o === void 0 ? !0 : o, i = e.headerClass, r = e.isActive,
|
|
669
|
-
|
|
670
|
-
},
|
|
671
|
-
(z.key === "Enter" || z.keyCode === te.ENTER || z.which === te.ENTER) &&
|
|
672
|
-
},
|
|
666
|
+
De.displayName = "PanelContent";
|
|
667
|
+
var zn = ["showArrow", "headerClass", "isActive", "onItemClick", "forceRender", "className", "prefixCls", "collapsible", "accordion", "panelKey", "extra", "header", "expandIcon", "openMotion", "destroyInactivePanel", "children"], _e = /* @__PURE__ */ D.forwardRef(function(e, n) {
|
|
668
|
+
var o = e.showArrow, t = o === void 0 ? !0 : o, i = e.headerClass, r = e.isActive, d = e.onItemClick, a = e.forceRender, c = e.className, l = e.prefixCls, h = e.collapsible, u = e.accordion, C = e.panelKey, m = e.extra, O = e.header, b = e.expandIcon, p = e.openMotion, I = e.destroyInactivePanel, $ = e.children, S = oe(e, zn), v = h === "disabled", x = h === "header", g = h === "icon", k = m != null && typeof m != "boolean", f = function() {
|
|
669
|
+
d == null || d(C);
|
|
670
|
+
}, w = function(z) {
|
|
671
|
+
(z.key === "Enter" || z.keyCode === te.ENTER || z.which === te.ENTER) && f();
|
|
672
|
+
}, N = typeof b == "function" ? b(e) : /* @__PURE__ */ D.createElement("i", {
|
|
673
673
|
className: "arrow"
|
|
674
674
|
});
|
|
675
|
-
|
|
676
|
-
className: "".concat(
|
|
677
|
-
onClick: ["header", "icon"].includes(
|
|
678
|
-
},
|
|
679
|
-
var y =
|
|
675
|
+
N && (N = /* @__PURE__ */ D.createElement("div", {
|
|
676
|
+
className: "".concat(l, "-expand-icon"),
|
|
677
|
+
onClick: ["header", "icon"].includes(h) ? f : void 0
|
|
678
|
+
}, N));
|
|
679
|
+
var y = _(H(H(H({}, "".concat(l, "-item"), !0), "".concat(l, "-item-active"), r), "".concat(l, "-item-disabled"), v), c), P = _(i, H(H(H({}, "".concat(l, "-header"), !0), "".concat(l, "-header-collapsible-only"), x), "".concat(l, "-icon-collapsible-only"), g)), B = {
|
|
680
680
|
className: P,
|
|
681
681
|
"aria-expanded": r,
|
|
682
|
-
"aria-disabled":
|
|
683
|
-
onKeyDown:
|
|
682
|
+
"aria-disabled": v,
|
|
683
|
+
onKeyDown: w
|
|
684
684
|
};
|
|
685
|
-
return !x && !g && (
|
|
685
|
+
return !x && !g && (B.onClick = f, B.role = u ? "tab" : "button", B.tabIndex = v ? -1 : 0), /* @__PURE__ */ D.createElement("div", V({}, S, {
|
|
686
686
|
ref: n,
|
|
687
687
|
className: y
|
|
688
|
-
}), /* @__PURE__ */
|
|
689
|
-
className: "".concat(
|
|
690
|
-
onClick:
|
|
691
|
-
},
|
|
692
|
-
className: "".concat(
|
|
693
|
-
},
|
|
688
|
+
}), /* @__PURE__ */ D.createElement("div", B, t && N, /* @__PURE__ */ D.createElement("span", {
|
|
689
|
+
className: "".concat(l, "-header-text"),
|
|
690
|
+
onClick: h === "header" ? f : void 0
|
|
691
|
+
}, O), k && /* @__PURE__ */ D.createElement("div", {
|
|
692
|
+
className: "".concat(l, "-extra")
|
|
693
|
+
}, m)), /* @__PURE__ */ D.createElement(Ze, V({
|
|
694
694
|
visible: r,
|
|
695
|
-
leavedClassName: "".concat(
|
|
696
|
-
},
|
|
695
|
+
leavedClassName: "".concat(l, "-content-hidden")
|
|
696
|
+
}, p, {
|
|
697
697
|
forceRender: a,
|
|
698
698
|
removeOnLeave: I
|
|
699
|
-
}), function(
|
|
700
|
-
var A =
|
|
701
|
-
return /* @__PURE__ */
|
|
699
|
+
}), function(E, z) {
|
|
700
|
+
var A = E.className, L = E.style;
|
|
701
|
+
return /* @__PURE__ */ D.createElement(De, {
|
|
702
702
|
ref: z,
|
|
703
|
-
prefixCls:
|
|
703
|
+
prefixCls: l,
|
|
704
704
|
className: A,
|
|
705
705
|
style: L,
|
|
706
706
|
isActive: r,
|
|
707
707
|
forceRender: a,
|
|
708
|
-
role:
|
|
708
|
+
role: u ? "tabpanel" : void 0
|
|
709
709
|
}, $);
|
|
710
710
|
}));
|
|
711
|
-
}),
|
|
712
|
-
var t = o.prefixCls, i = o.accordion, r = o.collapsible,
|
|
713
|
-
return n.map(function(
|
|
714
|
-
var
|
|
715
|
-
x !== "disabled" && (a(
|
|
716
|
-
},
|
|
717
|
-
return i ?
|
|
711
|
+
}), Rn = ["children", "label", "key", "collapsible", "onItemClick", "destroyInactivePanel"], Bn = function(n, o) {
|
|
712
|
+
var t = o.prefixCls, i = o.accordion, r = o.collapsible, d = o.destroyInactivePanel, a = o.onItemClick, c = o.activeKey, l = o.openMotion, h = o.expandIcon;
|
|
713
|
+
return n.map(function(u, C) {
|
|
714
|
+
var m = u.children, O = u.label, b = u.key, p = u.collapsible, I = u.onItemClick, $ = u.destroyInactivePanel, S = oe(u, Rn), v = String(b ?? C), x = p ?? r, g = $ ?? d, k = function(N) {
|
|
715
|
+
x !== "disabled" && (a(N), I == null || I(N));
|
|
716
|
+
}, f = !1;
|
|
717
|
+
return i ? f = c[0] === v : f = c.indexOf(v) > -1, /* @__PURE__ */ D.createElement(_e, V({}, S, {
|
|
718
718
|
prefixCls: t,
|
|
719
|
-
key:
|
|
720
|
-
panelKey:
|
|
721
|
-
isActive:
|
|
719
|
+
key: v,
|
|
720
|
+
panelKey: v,
|
|
721
|
+
isActive: f,
|
|
722
722
|
accordion: i,
|
|
723
|
-
openMotion:
|
|
724
|
-
expandIcon:
|
|
725
|
-
header:
|
|
723
|
+
openMotion: l,
|
|
724
|
+
expandIcon: h,
|
|
725
|
+
header: O,
|
|
726
726
|
collapsible: x,
|
|
727
|
-
onItemClick:
|
|
727
|
+
onItemClick: k,
|
|
728
728
|
destroyInactivePanel: g
|
|
729
|
-
}),
|
|
729
|
+
}), m);
|
|
730
730
|
});
|
|
731
|
-
},
|
|
731
|
+
}, Dn = function(n, o, t) {
|
|
732
732
|
if (!n)
|
|
733
733
|
return null;
|
|
734
|
-
var i = t.prefixCls, r = t.accordion,
|
|
735
|
-
r ? S =
|
|
736
|
-
var
|
|
737
|
-
|
|
734
|
+
var i = t.prefixCls, r = t.accordion, d = t.collapsible, a = t.destroyInactivePanel, c = t.onItemClick, l = t.activeKey, h = t.openMotion, u = t.expandIcon, C = n.key || String(o), m = n.props, O = m.header, b = m.headerClass, p = m.destroyInactivePanel, I = m.collapsible, $ = m.onItemClick, S = !1;
|
|
735
|
+
r ? S = l[0] === C : S = l.indexOf(C) > -1;
|
|
736
|
+
var v = I ?? d, x = function(f) {
|
|
737
|
+
v !== "disabled" && (c(f), $ == null || $(f));
|
|
738
738
|
}, g = {
|
|
739
|
-
key:
|
|
740
|
-
panelKey:
|
|
741
|
-
header:
|
|
742
|
-
headerClass:
|
|
739
|
+
key: C,
|
|
740
|
+
panelKey: C,
|
|
741
|
+
header: O,
|
|
742
|
+
headerClass: b,
|
|
743
743
|
isActive: S,
|
|
744
744
|
prefixCls: i,
|
|
745
|
-
destroyInactivePanel:
|
|
746
|
-
openMotion:
|
|
745
|
+
destroyInactivePanel: p ?? a,
|
|
746
|
+
openMotion: h,
|
|
747
747
|
accordion: r,
|
|
748
748
|
children: n.props.children,
|
|
749
749
|
onItemClick: x,
|
|
750
|
-
expandIcon:
|
|
751
|
-
collapsible:
|
|
750
|
+
expandIcon: u,
|
|
751
|
+
collapsible: v
|
|
752
752
|
};
|
|
753
|
-
return typeof n.type == "string" ? n : (Object.keys(g).forEach(function(
|
|
754
|
-
typeof g[
|
|
755
|
-
}), /* @__PURE__ */
|
|
753
|
+
return typeof n.type == "string" ? n : (Object.keys(g).forEach(function(k) {
|
|
754
|
+
typeof g[k] > "u" && delete g[k];
|
|
755
|
+
}), /* @__PURE__ */ D.cloneElement(n, g));
|
|
756
756
|
};
|
|
757
|
-
function
|
|
757
|
+
function _n(e, n, o) {
|
|
758
758
|
return Array.isArray(e) ? Bn(e, o) : fe(n).map(function(t, i) {
|
|
759
|
-
return
|
|
759
|
+
return Dn(t, i, o);
|
|
760
760
|
});
|
|
761
761
|
}
|
|
762
|
-
function
|
|
762
|
+
function jn(e) {
|
|
763
763
|
var n = e;
|
|
764
764
|
if (!Array.isArray(n)) {
|
|
765
|
-
var o =
|
|
765
|
+
var o = nn(n);
|
|
766
766
|
n = o === "number" || o === "string" ? [n] : [];
|
|
767
767
|
}
|
|
768
768
|
return n.map(function(t) {
|
|
769
769
|
return String(t);
|
|
770
770
|
});
|
|
771
771
|
}
|
|
772
|
-
var
|
|
773
|
-
var o = e.prefixCls, t = o === void 0 ? "rc-collapse" : o, i = e.destroyInactivePanel, r = i === void 0 ? !1 : i,
|
|
774
|
-
value:
|
|
775
|
-
onChange: function(
|
|
776
|
-
return
|
|
772
|
+
var An = /* @__PURE__ */ D.forwardRef(function(e, n) {
|
|
773
|
+
var o = e.prefixCls, t = o === void 0 ? "rc-collapse" : o, i = e.destroyInactivePanel, r = i === void 0 ? !1 : i, d = e.style, a = e.accordion, c = e.className, l = e.children, h = e.collapsible, u = e.openMotion, C = e.expandIcon, m = e.activeKey, O = e.defaultActiveKey, b = e.onChange, p = e.items, I = _(t, c), $ = Q([], {
|
|
774
|
+
value: m,
|
|
775
|
+
onChange: function(w) {
|
|
776
|
+
return b == null ? void 0 : b(w);
|
|
777
777
|
},
|
|
778
|
-
defaultValue:
|
|
779
|
-
postState:
|
|
780
|
-
}), S = ae($, 2),
|
|
778
|
+
defaultValue: O,
|
|
779
|
+
postState: jn
|
|
780
|
+
}), S = ae($, 2), v = S[0], x = S[1], g = function(w) {
|
|
781
781
|
return x(function() {
|
|
782
782
|
if (a)
|
|
783
|
-
return
|
|
784
|
-
var
|
|
785
|
-
return y ?
|
|
786
|
-
return P !==
|
|
787
|
-
}) : [].concat(
|
|
783
|
+
return v[0] === w ? [] : [w];
|
|
784
|
+
var N = v.indexOf(w), y = N > -1;
|
|
785
|
+
return y ? v.filter(function(P) {
|
|
786
|
+
return P !== w;
|
|
787
|
+
}) : [].concat(tn(v), [w]);
|
|
788
788
|
});
|
|
789
789
|
};
|
|
790
|
-
|
|
791
|
-
var
|
|
790
|
+
en(!l, "[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");
|
|
791
|
+
var k = _n(p, l, {
|
|
792
792
|
prefixCls: t,
|
|
793
793
|
accordion: a,
|
|
794
|
-
openMotion:
|
|
795
|
-
expandIcon:
|
|
796
|
-
collapsible:
|
|
794
|
+
openMotion: u,
|
|
795
|
+
expandIcon: C,
|
|
796
|
+
collapsible: h,
|
|
797
797
|
destroyInactivePanel: r,
|
|
798
798
|
onItemClick: g,
|
|
799
|
-
activeKey:
|
|
799
|
+
activeKey: v
|
|
800
800
|
});
|
|
801
|
-
return /* @__PURE__ */
|
|
801
|
+
return /* @__PURE__ */ D.createElement("div", V({
|
|
802
802
|
ref: n,
|
|
803
803
|
className: I,
|
|
804
|
-
style:
|
|
804
|
+
style: d,
|
|
805
805
|
role: a ? "tablist" : void 0
|
|
806
|
-
},
|
|
806
|
+
}, Me(e, {
|
|
807
807
|
aria: !0,
|
|
808
808
|
data: !0
|
|
809
|
-
})),
|
|
809
|
+
})), k);
|
|
810
810
|
});
|
|
811
|
-
const me = Object.assign(
|
|
811
|
+
const me = Object.assign(An, {
|
|
812
812
|
/**
|
|
813
813
|
* @deprecated use `items` instead, will be removed in `v4.0.0`
|
|
814
814
|
*/
|
|
815
|
-
Panel:
|
|
815
|
+
Panel: _e
|
|
816
816
|
});
|
|
817
817
|
me.Panel;
|
|
818
|
-
const
|
|
818
|
+
const Tn = /* @__PURE__ */ s.forwardRef((e, n) => {
|
|
819
819
|
process.env.NODE_ENV !== "production" && ce("Collapse.Panel").deprecated(!("disabled" in e), "disabled", 'collapsible="disabled"');
|
|
820
820
|
const {
|
|
821
821
|
getPrefixCls: o
|
|
822
|
-
} =
|
|
822
|
+
} = s.useContext(W), {
|
|
823
823
|
prefixCls: t,
|
|
824
824
|
className: i,
|
|
825
825
|
showArrow: r = !0
|
|
826
|
-
} = e,
|
|
827
|
-
[`${
|
|
826
|
+
} = e, d = o("collapse", t), a = _({
|
|
827
|
+
[`${d}-no-arrow`]: !r
|
|
828
828
|
}, i);
|
|
829
|
-
return /* @__PURE__ */
|
|
829
|
+
return /* @__PURE__ */ s.createElement(me.Panel, Object.assign({
|
|
830
830
|
ref: n
|
|
831
831
|
}, e, {
|
|
832
|
-
prefixCls:
|
|
832
|
+
prefixCls: d,
|
|
833
833
|
className: a
|
|
834
834
|
}));
|
|
835
|
-
}),
|
|
835
|
+
}), Hn = (e) => {
|
|
836
836
|
const {
|
|
837
837
|
componentCls: n,
|
|
838
838
|
contentBg: o,
|
|
839
839
|
padding: t,
|
|
840
840
|
headerBg: i,
|
|
841
841
|
headerPadding: r,
|
|
842
|
-
collapseHeaderPaddingSM:
|
|
842
|
+
collapseHeaderPaddingSM: d,
|
|
843
843
|
collapseHeaderPaddingLG: a,
|
|
844
|
-
collapsePanelBorderRadius:
|
|
845
|
-
lineWidth:
|
|
846
|
-
lineType:
|
|
847
|
-
colorBorder:
|
|
848
|
-
colorText:
|
|
849
|
-
colorTextHeading:
|
|
850
|
-
colorTextDisabled:
|
|
851
|
-
fontSizeLG:
|
|
852
|
-
lineHeight:
|
|
844
|
+
collapsePanelBorderRadius: c,
|
|
845
|
+
lineWidth: l,
|
|
846
|
+
lineType: h,
|
|
847
|
+
colorBorder: u,
|
|
848
|
+
colorText: C,
|
|
849
|
+
colorTextHeading: m,
|
|
850
|
+
colorTextDisabled: O,
|
|
851
|
+
fontSizeLG: b,
|
|
852
|
+
lineHeight: p,
|
|
853
853
|
lineHeightLG: I,
|
|
854
854
|
marginSM: $,
|
|
855
855
|
paddingSM: S,
|
|
856
|
-
paddingLG:
|
|
856
|
+
paddingLG: v,
|
|
857
857
|
paddingXS: x,
|
|
858
858
|
motionDurationSlow: g,
|
|
859
|
-
fontSizeIcon:
|
|
860
|
-
contentPadding:
|
|
861
|
-
fontHeight:
|
|
862
|
-
fontHeightLG:
|
|
863
|
-
} = e, y = `${M(
|
|
859
|
+
fontSizeIcon: k,
|
|
860
|
+
contentPadding: f,
|
|
861
|
+
fontHeight: w,
|
|
862
|
+
fontHeightLG: N
|
|
863
|
+
} = e, y = `${M(l)} ${h} ${u}`;
|
|
864
864
|
return {
|
|
865
865
|
[n]: Object.assign(Object.assign({}, G(e)), {
|
|
866
866
|
backgroundColor: i,
|
|
867
867
|
border: y,
|
|
868
|
-
borderRadius:
|
|
868
|
+
borderRadius: c,
|
|
869
869
|
"&-rtl": {
|
|
870
870
|
direction: "rtl"
|
|
871
871
|
},
|
|
@@ -875,7 +875,7 @@ const Hn = /* @__PURE__ */ d.forwardRef((e, n) => {
|
|
|
875
875
|
[`
|
|
876
876
|
&,
|
|
877
877
|
& > ${n}-header`]: {
|
|
878
|
-
borderRadius: `0 0 ${M(
|
|
878
|
+
borderRadius: `0 0 ${M(c)} ${M(c)}`
|
|
879
879
|
}
|
|
880
880
|
},
|
|
881
881
|
[`> ${n}-header`]: {
|
|
@@ -885,8 +885,8 @@ const Hn = /* @__PURE__ */ d.forwardRef((e, n) => {
|
|
|
885
885
|
flexWrap: "nowrap",
|
|
886
886
|
alignItems: "flex-start",
|
|
887
887
|
padding: r,
|
|
888
|
-
color:
|
|
889
|
-
lineHeight:
|
|
888
|
+
color: m,
|
|
889
|
+
lineHeight: p,
|
|
890
890
|
cursor: "pointer",
|
|
891
891
|
transition: `all ${g}, visibility 0s`,
|
|
892
892
|
[`> ${n}-header-text`]: {
|
|
@@ -897,13 +897,13 @@ const Hn = /* @__PURE__ */ d.forwardRef((e, n) => {
|
|
|
897
897
|
},
|
|
898
898
|
// >>>>> Arrow
|
|
899
899
|
[`${n}-expand-icon`]: {
|
|
900
|
-
height:
|
|
900
|
+
height: w,
|
|
901
901
|
display: "flex",
|
|
902
902
|
alignItems: "center",
|
|
903
903
|
paddingInlineEnd: $
|
|
904
904
|
},
|
|
905
|
-
[`${n}-arrow`]: Object.assign(Object.assign({},
|
|
906
|
-
fontSize:
|
|
905
|
+
[`${n}-arrow`]: Object.assign(Object.assign({}, on()), {
|
|
906
|
+
fontSize: k,
|
|
907
907
|
// when `transform: rotate()` is applied to icon's root element
|
|
908
908
|
transition: `transform ${g}`,
|
|
909
909
|
// when `transform: rotate()` is applied to icon's child element
|
|
@@ -924,11 +924,11 @@ const Hn = /* @__PURE__ */ d.forwardRef((e, n) => {
|
|
|
924
924
|
}
|
|
925
925
|
},
|
|
926
926
|
[`${n}-content`]: {
|
|
927
|
-
color:
|
|
927
|
+
color: C,
|
|
928
928
|
backgroundColor: o,
|
|
929
929
|
borderTop: y,
|
|
930
930
|
[`& > ${n}-content-box`]: {
|
|
931
|
-
padding:
|
|
931
|
+
padding: f
|
|
932
932
|
},
|
|
933
933
|
"&-hidden": {
|
|
934
934
|
display: "none"
|
|
@@ -937,7 +937,7 @@ const Hn = /* @__PURE__ */ d.forwardRef((e, n) => {
|
|
|
937
937
|
"&-small": {
|
|
938
938
|
[`> ${n}-item`]: {
|
|
939
939
|
[`> ${n}-header`]: {
|
|
940
|
-
padding:
|
|
940
|
+
padding: d,
|
|
941
941
|
paddingInlineStart: x,
|
|
942
942
|
[`> ${n}-expand-icon`]: {
|
|
943
943
|
// Arrow offset
|
|
@@ -951,31 +951,31 @@ const Hn = /* @__PURE__ */ d.forwardRef((e, n) => {
|
|
|
951
951
|
},
|
|
952
952
|
"&-large": {
|
|
953
953
|
[`> ${n}-item`]: {
|
|
954
|
-
fontSize:
|
|
954
|
+
fontSize: b,
|
|
955
955
|
lineHeight: I,
|
|
956
956
|
[`> ${n}-header`]: {
|
|
957
957
|
padding: a,
|
|
958
958
|
paddingInlineStart: t,
|
|
959
959
|
[`> ${n}-expand-icon`]: {
|
|
960
|
-
height:
|
|
960
|
+
height: N,
|
|
961
961
|
// Arrow offset
|
|
962
|
-
marginInlineStart: e.calc(
|
|
962
|
+
marginInlineStart: e.calc(v).sub(t).equal()
|
|
963
963
|
}
|
|
964
964
|
},
|
|
965
965
|
[`> ${n}-content > ${n}-content-box`]: {
|
|
966
|
-
padding:
|
|
966
|
+
padding: v
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
969
|
},
|
|
970
970
|
[`${n}-item:last-child`]: {
|
|
971
971
|
borderBottom: 0,
|
|
972
972
|
[`> ${n}-content`]: {
|
|
973
|
-
borderRadius: `0 0 ${M(
|
|
973
|
+
borderRadius: `0 0 ${M(c)} ${M(c)}`
|
|
974
974
|
}
|
|
975
975
|
},
|
|
976
976
|
[`& ${n}-item-disabled > ${n}-header`]: {
|
|
977
977
|
"\n &,\n & > .arrow\n ": {
|
|
978
|
-
color:
|
|
978
|
+
color: O,
|
|
979
979
|
cursor: "not-allowed"
|
|
980
980
|
}
|
|
981
981
|
},
|
|
@@ -993,7 +993,7 @@ const Hn = /* @__PURE__ */ d.forwardRef((e, n) => {
|
|
|
993
993
|
}
|
|
994
994
|
})
|
|
995
995
|
};
|
|
996
|
-
},
|
|
996
|
+
}, Ln = (e) => {
|
|
997
997
|
const {
|
|
998
998
|
componentCls: n
|
|
999
999
|
} = e, o = `> ${n}-item > ${n}-header ${n}-arrow`;
|
|
@@ -1004,7 +1004,7 @@ const Hn = /* @__PURE__ */ d.forwardRef((e, n) => {
|
|
|
1004
1004
|
}
|
|
1005
1005
|
}
|
|
1006
1006
|
};
|
|
1007
|
-
},
|
|
1007
|
+
}, Vn = (e) => {
|
|
1008
1008
|
const {
|
|
1009
1009
|
componentCls: n,
|
|
1010
1010
|
headerBg: o,
|
|
@@ -1036,7 +1036,7 @@ const Hn = /* @__PURE__ */ d.forwardRef((e, n) => {
|
|
|
1036
1036
|
}
|
|
1037
1037
|
}
|
|
1038
1038
|
};
|
|
1039
|
-
},
|
|
1039
|
+
}, Wn = (e) => {
|
|
1040
1040
|
const {
|
|
1041
1041
|
componentCls: n,
|
|
1042
1042
|
paddingSM: o
|
|
@@ -1057,66 +1057,66 @@ const Hn = /* @__PURE__ */ d.forwardRef((e, n) => {
|
|
|
1057
1057
|
}
|
|
1058
1058
|
}
|
|
1059
1059
|
};
|
|
1060
|
-
},
|
|
1060
|
+
}, qn = (e) => ({
|
|
1061
1061
|
headerPadding: `${e.paddingSM}px ${e.padding}px`,
|
|
1062
1062
|
headerBg: e.colorFillAlter,
|
|
1063
1063
|
contentPadding: `${e.padding}px 16px`,
|
|
1064
1064
|
// Fixed Value
|
|
1065
1065
|
contentBg: e.colorBgContainer
|
|
1066
|
-
}),
|
|
1066
|
+
}), Fn = re("Collapse", (e) => {
|
|
1067
1067
|
const n = le(e, {
|
|
1068
1068
|
collapseHeaderPaddingSM: `${M(e.paddingXS)} ${M(e.paddingSM)}`,
|
|
1069
1069
|
collapseHeaderPaddingLG: `${M(e.padding)} ${M(e.paddingLG)}`,
|
|
1070
1070
|
collapsePanelBorderRadius: e.borderRadiusLG
|
|
1071
1071
|
});
|
|
1072
|
-
return [
|
|
1073
|
-
},
|
|
1072
|
+
return [Hn(n), Vn(n), Wn(n), Ln(n), pn(n)];
|
|
1073
|
+
}, qn), je = /* @__PURE__ */ s.forwardRef((e, n) => {
|
|
1074
1074
|
const {
|
|
1075
1075
|
getPrefixCls: o,
|
|
1076
1076
|
direction: t,
|
|
1077
1077
|
collapse: i
|
|
1078
|
-
} =
|
|
1078
|
+
} = s.useContext(W), {
|
|
1079
1079
|
prefixCls: r,
|
|
1080
|
-
className:
|
|
1080
|
+
className: d,
|
|
1081
1081
|
rootClassName: a,
|
|
1082
|
-
style:
|
|
1083
|
-
bordered:
|
|
1084
|
-
ghost:
|
|
1085
|
-
size:
|
|
1086
|
-
expandIconPosition:
|
|
1087
|
-
children:
|
|
1088
|
-
expandIcon:
|
|
1089
|
-
} = e,
|
|
1082
|
+
style: c,
|
|
1083
|
+
bordered: l = !0,
|
|
1084
|
+
ghost: h,
|
|
1085
|
+
size: u,
|
|
1086
|
+
expandIconPosition: C = "start",
|
|
1087
|
+
children: m,
|
|
1088
|
+
expandIcon: O
|
|
1089
|
+
} = e, b = ge((y) => {
|
|
1090
1090
|
var P;
|
|
1091
|
-
return (P =
|
|
1092
|
-
}),
|
|
1091
|
+
return (P = u ?? y) !== null && P !== void 0 ? P : "middle";
|
|
1092
|
+
}), p = o("collapse", r), I = o(), [$, S, v] = Fn(p);
|
|
1093
1093
|
if (process.env.NODE_ENV !== "production") {
|
|
1094
1094
|
const y = ce("Collapse");
|
|
1095
|
-
process.env.NODE_ENV !== "production" && y(
|
|
1095
|
+
process.env.NODE_ENV !== "production" && y(C !== "left" && C !== "right", "deprecated", "`expandIconPosition` with `left` or `right` is deprecated. Please use `start` or `end` instead.");
|
|
1096
1096
|
}
|
|
1097
|
-
const x =
|
|
1097
|
+
const x = s.useMemo(() => C === "left" ? "start" : C === "right" ? "end" : C, [C]), g = O ?? (i == null ? void 0 : i.expandIcon), k = s.useCallback(function() {
|
|
1098
1098
|
let y = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1099
|
-
const P = typeof g == "function" ? g(y) : /* @__PURE__ */
|
|
1099
|
+
const P = typeof g == "function" ? g(y) : /* @__PURE__ */ s.createElement(fn, {
|
|
1100
1100
|
rotate: y.isActive ? 90 : void 0
|
|
1101
1101
|
});
|
|
1102
1102
|
return Ce(P, () => {
|
|
1103
|
-
var
|
|
1103
|
+
var B;
|
|
1104
1104
|
return {
|
|
1105
|
-
className:
|
|
1105
|
+
className: _((B = P == null ? void 0 : P.props) === null || B === void 0 ? void 0 : B.className, `${p}-arrow`)
|
|
1106
1106
|
};
|
|
1107
1107
|
});
|
|
1108
|
-
}, [g,
|
|
1109
|
-
[`${
|
|
1110
|
-
[`${
|
|
1111
|
-
[`${
|
|
1112
|
-
[`${
|
|
1113
|
-
}, i == null ? void 0 : i.className,
|
|
1108
|
+
}, [g, p]), f = _(`${p}-icon-position-${x}`, {
|
|
1109
|
+
[`${p}-borderless`]: !l,
|
|
1110
|
+
[`${p}-rtl`]: t === "rtl",
|
|
1111
|
+
[`${p}-ghost`]: !!h,
|
|
1112
|
+
[`${p}-${b}`]: b !== "middle"
|
|
1113
|
+
}, i == null ? void 0 : i.className, d, a, S, v), w = Object.assign(Object.assign({}, dn(I)), {
|
|
1114
1114
|
motionAppear: !1,
|
|
1115
|
-
leavedClassName: `${
|
|
1116
|
-
}),
|
|
1117
|
-
var
|
|
1118
|
-
if (!((
|
|
1119
|
-
const z = (
|
|
1115
|
+
leavedClassName: `${p}-content-hidden`
|
|
1116
|
+
}), N = s.useMemo(() => m ? fe(m).map((y, P) => {
|
|
1117
|
+
var B, E;
|
|
1118
|
+
if (!((B = y.props) === null || B === void 0) && B.disabled) {
|
|
1119
|
+
const z = (E = y.key) !== null && E !== void 0 ? E : String(P), {
|
|
1120
1120
|
disabled: A,
|
|
1121
1121
|
collapsible: L
|
|
1122
1122
|
} = y.props, K = Object.assign(Object.assign({}, $e(y.props, ["disabled"])), {
|
|
@@ -1126,31 +1126,31 @@ const Hn = /* @__PURE__ */ d.forwardRef((e, n) => {
|
|
|
1126
1126
|
return Ce(y, K);
|
|
1127
1127
|
}
|
|
1128
1128
|
return y;
|
|
1129
|
-
}) : null, [
|
|
1129
|
+
}) : null, [m]);
|
|
1130
1130
|
return $(
|
|
1131
1131
|
// @ts-ignore
|
|
1132
|
-
/* @__PURE__ */
|
|
1132
|
+
/* @__PURE__ */ s.createElement(me, Object.assign({
|
|
1133
1133
|
ref: n,
|
|
1134
|
-
openMotion:
|
|
1134
|
+
openMotion: w
|
|
1135
1135
|
}, $e(e, ["rootClassName"]), {
|
|
1136
|
-
expandIcon:
|
|
1137
|
-
prefixCls:
|
|
1138
|
-
className:
|
|
1139
|
-
style: Object.assign(Object.assign({}, i == null ? void 0 : i.style),
|
|
1140
|
-
}),
|
|
1136
|
+
expandIcon: k,
|
|
1137
|
+
prefixCls: p,
|
|
1138
|
+
className: f,
|
|
1139
|
+
style: Object.assign(Object.assign({}, i == null ? void 0 : i.style), c)
|
|
1140
|
+
}), N)
|
|
1141
1141
|
);
|
|
1142
1142
|
});
|
|
1143
|
-
process.env.NODE_ENV !== "production" && (
|
|
1144
|
-
const
|
|
1145
|
-
Panel:
|
|
1146
|
-
}),
|
|
1143
|
+
process.env.NODE_ENV !== "production" && (je.displayName = "Collapse");
|
|
1144
|
+
const ye = Object.assign(je, {
|
|
1145
|
+
Panel: Tn
|
|
1146
|
+
}), Gn = (e) => {
|
|
1147
1147
|
const {
|
|
1148
1148
|
componentCls: n,
|
|
1149
1149
|
sizePaddingEdgeHorizontal: o,
|
|
1150
1150
|
colorSplit: t,
|
|
1151
1151
|
lineWidth: i,
|
|
1152
1152
|
textPaddingInline: r,
|
|
1153
|
-
orientationMargin:
|
|
1153
|
+
orientationMargin: d,
|
|
1154
1154
|
verticalMarginInline: a
|
|
1155
1155
|
} = e;
|
|
1156
1156
|
return {
|
|
@@ -1199,18 +1199,18 @@ const Kn = Object.assign(Le, {
|
|
|
1199
1199
|
},
|
|
1200
1200
|
[`&-horizontal${n}-with-text-left`]: {
|
|
1201
1201
|
"&::before": {
|
|
1202
|
-
width: `calc(${
|
|
1202
|
+
width: `calc(${d} * 100%)`
|
|
1203
1203
|
},
|
|
1204
1204
|
"&::after": {
|
|
1205
|
-
width: `calc(100% - ${
|
|
1205
|
+
width: `calc(100% - ${d} * 100%)`
|
|
1206
1206
|
}
|
|
1207
1207
|
},
|
|
1208
1208
|
[`&-horizontal${n}-with-text-right`]: {
|
|
1209
1209
|
"&::before": {
|
|
1210
|
-
width: `calc(100% - ${
|
|
1210
|
+
width: `calc(100% - ${d} * 100%)`
|
|
1211
1211
|
},
|
|
1212
1212
|
"&::after": {
|
|
1213
|
-
width: `calc(${
|
|
1213
|
+
width: `calc(${d} * 100%)`
|
|
1214
1214
|
}
|
|
1215
1215
|
},
|
|
1216
1216
|
[`${n}-inner-text`]: {
|
|
@@ -1264,23 +1264,23 @@ const Kn = Object.assign(Le, {
|
|
|
1264
1264
|
}
|
|
1265
1265
|
})
|
|
1266
1266
|
};
|
|
1267
|
-
},
|
|
1267
|
+
}, Kn = (e) => ({
|
|
1268
1268
|
textPaddingInline: "1em",
|
|
1269
1269
|
orientationMargin: 0.05,
|
|
1270
1270
|
verticalMarginInline: e.marginXS
|
|
1271
|
-
}),
|
|
1271
|
+
}), Xn = re("Divider", (e) => {
|
|
1272
1272
|
const n = le(e, {
|
|
1273
1273
|
dividerHorizontalWithTextGutterMargin: e.margin,
|
|
1274
1274
|
dividerHorizontalGutterMargin: e.marginLG,
|
|
1275
1275
|
sizePaddingEdgeHorizontal: 0
|
|
1276
1276
|
});
|
|
1277
|
-
return [
|
|
1278
|
-
},
|
|
1277
|
+
return [Gn(n)];
|
|
1278
|
+
}, Kn, {
|
|
1279
1279
|
unitless: {
|
|
1280
1280
|
orientationMargin: !0
|
|
1281
1281
|
}
|
|
1282
1282
|
});
|
|
1283
|
-
var
|
|
1283
|
+
var Un = function(e, n) {
|
|
1284
1284
|
var o = {};
|
|
1285
1285
|
for (var t in e)
|
|
1286
1286
|
Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
|
|
@@ -1289,59 +1289,59 @@ var Qn = function(e, n) {
|
|
|
1289
1289
|
n.indexOf(t[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[i]) && (o[t[i]] = e[t[i]]);
|
|
1290
1290
|
return o;
|
|
1291
1291
|
};
|
|
1292
|
-
const
|
|
1292
|
+
const Ae = (e) => {
|
|
1293
1293
|
const {
|
|
1294
1294
|
getPrefixCls: n,
|
|
1295
1295
|
direction: o,
|
|
1296
1296
|
divider: t
|
|
1297
|
-
} =
|
|
1297
|
+
} = s.useContext(W), {
|
|
1298
1298
|
prefixCls: i,
|
|
1299
1299
|
type: r = "horizontal",
|
|
1300
|
-
orientation:
|
|
1300
|
+
orientation: d = "center",
|
|
1301
1301
|
orientationMargin: a,
|
|
1302
|
-
className:
|
|
1303
|
-
rootClassName:
|
|
1304
|
-
children:
|
|
1305
|
-
dashed:
|
|
1306
|
-
plain:
|
|
1307
|
-
style:
|
|
1308
|
-
} = e,
|
|
1309
|
-
[`${
|
|
1310
|
-
[`${
|
|
1311
|
-
[`${
|
|
1312
|
-
[`${
|
|
1313
|
-
[`${
|
|
1314
|
-
[`${
|
|
1315
|
-
[`${
|
|
1316
|
-
},
|
|
1317
|
-
marginLeft:
|
|
1302
|
+
className: c,
|
|
1303
|
+
rootClassName: l,
|
|
1304
|
+
children: h,
|
|
1305
|
+
dashed: u,
|
|
1306
|
+
plain: C,
|
|
1307
|
+
style: m
|
|
1308
|
+
} = e, O = Un(e, ["prefixCls", "type", "orientation", "orientationMargin", "className", "rootClassName", "children", "dashed", "plain", "style"]), b = n("divider", i), [p, I, $] = Xn(b), S = d.length > 0 ? `-${d}` : d, v = !!h, x = d === "left" && a != null, g = d === "right" && a != null, k = _(b, t == null ? void 0 : t.className, I, $, `${b}-${r}`, {
|
|
1309
|
+
[`${b}-with-text`]: v,
|
|
1310
|
+
[`${b}-with-text${S}`]: v,
|
|
1311
|
+
[`${b}-dashed`]: !!u,
|
|
1312
|
+
[`${b}-plain`]: !!C,
|
|
1313
|
+
[`${b}-rtl`]: o === "rtl",
|
|
1314
|
+
[`${b}-no-default-orientation-margin-left`]: x,
|
|
1315
|
+
[`${b}-no-default-orientation-margin-right`]: g
|
|
1316
|
+
}, c, l), f = s.useMemo(() => typeof a == "number" ? a : /^\d+$/.test(a) ? Number(a) : a, [a]), w = Object.assign(Object.assign({}, x && {
|
|
1317
|
+
marginLeft: f
|
|
1318
1318
|
}), g && {
|
|
1319
|
-
marginRight:
|
|
1319
|
+
marginRight: f
|
|
1320
1320
|
});
|
|
1321
1321
|
if (process.env.NODE_ENV !== "production") {
|
|
1322
|
-
const
|
|
1323
|
-
process.env.NODE_ENV !== "production" &&
|
|
1322
|
+
const N = ce("Divider");
|
|
1323
|
+
process.env.NODE_ENV !== "production" && N(!h || r !== "vertical", "usage", "`children` not working in `vertical` mode.");
|
|
1324
1324
|
}
|
|
1325
|
-
return
|
|
1326
|
-
className:
|
|
1327
|
-
style: Object.assign(Object.assign({}, t == null ? void 0 : t.style),
|
|
1328
|
-
},
|
|
1325
|
+
return p(/* @__PURE__ */ s.createElement("div", Object.assign({
|
|
1326
|
+
className: k,
|
|
1327
|
+
style: Object.assign(Object.assign({}, t == null ? void 0 : t.style), m)
|
|
1328
|
+
}, O, {
|
|
1329
1329
|
role: "separator"
|
|
1330
|
-
}),
|
|
1331
|
-
className: `${
|
|
1332
|
-
style:
|
|
1333
|
-
},
|
|
1330
|
+
}), h && r !== "vertical" && /* @__PURE__ */ s.createElement("span", {
|
|
1331
|
+
className: `${b}-inner-text`,
|
|
1332
|
+
style: w
|
|
1333
|
+
}, h)));
|
|
1334
1334
|
};
|
|
1335
|
-
process.env.NODE_ENV !== "production" && (
|
|
1336
|
-
function
|
|
1335
|
+
process.env.NODE_ENV !== "production" && (Ae.displayName = "Divider");
|
|
1336
|
+
function Se(e) {
|
|
1337
1337
|
return ["small", "middle", "large"].includes(e);
|
|
1338
1338
|
}
|
|
1339
|
-
function
|
|
1339
|
+
function xe(e) {
|
|
1340
1340
|
return e ? typeof e == "number" && !Number.isNaN(e) : !1;
|
|
1341
1341
|
}
|
|
1342
|
-
const
|
|
1342
|
+
const Te = /* @__PURE__ */ D.createContext({
|
|
1343
1343
|
latestIndex: 0
|
|
1344
|
-
}),
|
|
1344
|
+
}), Yn = Te.Provider, Qn = (e) => {
|
|
1345
1345
|
let {
|
|
1346
1346
|
className: n,
|
|
1347
1347
|
index: o,
|
|
@@ -1350,16 +1350,16 @@ const We = /* @__PURE__ */ B.createContext({
|
|
|
1350
1350
|
style: r
|
|
1351
1351
|
} = e;
|
|
1352
1352
|
const {
|
|
1353
|
-
latestIndex:
|
|
1354
|
-
} =
|
|
1355
|
-
return t == null ? null : /* @__PURE__ */
|
|
1353
|
+
latestIndex: d
|
|
1354
|
+
} = s.useContext(Te);
|
|
1355
|
+
return t == null ? null : /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement("div", {
|
|
1356
1356
|
className: n,
|
|
1357
1357
|
style: r
|
|
1358
|
-
}, t), o <
|
|
1358
|
+
}, t), o < d && i && /* @__PURE__ */ s.createElement("span", {
|
|
1359
1359
|
className: `${n}-split`
|
|
1360
1360
|
}, i));
|
|
1361
1361
|
};
|
|
1362
|
-
var
|
|
1362
|
+
var Jn = function(e, n) {
|
|
1363
1363
|
var o = {};
|
|
1364
1364
|
for (var t in e)
|
|
1365
1365
|
Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
|
|
@@ -1368,107 +1368,107 @@ var et = function(e, n) {
|
|
|
1368
1368
|
n.indexOf(t[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[i]) && (o[t[i]] = e[t[i]]);
|
|
1369
1369
|
return o;
|
|
1370
1370
|
};
|
|
1371
|
-
const
|
|
1371
|
+
const Zn = /* @__PURE__ */ s.forwardRef((e, n) => {
|
|
1372
1372
|
var o, t;
|
|
1373
1373
|
const {
|
|
1374
1374
|
getPrefixCls: i,
|
|
1375
1375
|
space: r,
|
|
1376
|
-
direction:
|
|
1377
|
-
} =
|
|
1376
|
+
direction: d
|
|
1377
|
+
} = s.useContext(W), {
|
|
1378
1378
|
size: a = (r == null ? void 0 : r.size) || "small",
|
|
1379
|
-
align:
|
|
1380
|
-
className:
|
|
1381
|
-
rootClassName:
|
|
1382
|
-
children:
|
|
1383
|
-
direction:
|
|
1384
|
-
prefixCls:
|
|
1385
|
-
split:
|
|
1386
|
-
style:
|
|
1387
|
-
wrap:
|
|
1379
|
+
align: c,
|
|
1380
|
+
className: l,
|
|
1381
|
+
rootClassName: h,
|
|
1382
|
+
children: u,
|
|
1383
|
+
direction: C = "horizontal",
|
|
1384
|
+
prefixCls: m,
|
|
1385
|
+
split: O,
|
|
1386
|
+
style: b,
|
|
1387
|
+
wrap: p = !1,
|
|
1388
1388
|
classNames: I,
|
|
1389
1389
|
styles: $
|
|
1390
|
-
} = e, S =
|
|
1390
|
+
} = e, S = Jn(e, ["size", "align", "className", "rootClassName", "children", "direction", "prefixCls", "split", "style", "wrap", "classNames", "styles"]), [v, x] = Array.isArray(a) ? a : [a, a], g = Se(x), k = Se(v), f = xe(x), w = xe(v), N = fe(u, {
|
|
1391
1391
|
keepEmpty: !0
|
|
1392
|
-
}), y =
|
|
1393
|
-
[`${P}-rtl`]:
|
|
1392
|
+
}), y = c === void 0 && C === "horizontal" ? "center" : c, P = i("space", m), [B, E, z] = un(P), A = _(P, r == null ? void 0 : r.className, E, `${P}-${C}`, {
|
|
1393
|
+
[`${P}-rtl`]: d === "rtl",
|
|
1394
1394
|
[`${P}-align-${y}`]: y,
|
|
1395
1395
|
[`${P}-gap-row-${x}`]: g,
|
|
1396
|
-
[`${P}-gap-col-${
|
|
1397
|
-
},
|
|
1396
|
+
[`${P}-gap-col-${v}`]: k
|
|
1397
|
+
}, l, h, z), L = _(`${P}-item`, (o = I == null ? void 0 : I.item) !== null && o !== void 0 ? o : (t = r == null ? void 0 : r.classNames) === null || t === void 0 ? void 0 : t.item);
|
|
1398
1398
|
let K = 0;
|
|
1399
|
-
const
|
|
1400
|
-
var
|
|
1401
|
-
X != null && (K =
|
|
1402
|
-
const
|
|
1403
|
-
return /* @__PURE__ */
|
|
1399
|
+
const Fe = N.map((X, de) => {
|
|
1400
|
+
var se, ue;
|
|
1401
|
+
X != null && (K = de);
|
|
1402
|
+
const Ke = X && X.key || `${L}-${de}`;
|
|
1403
|
+
return /* @__PURE__ */ s.createElement(Qn, {
|
|
1404
1404
|
className: L,
|
|
1405
|
-
key:
|
|
1406
|
-
index:
|
|
1407
|
-
split:
|
|
1408
|
-
style: (
|
|
1405
|
+
key: Ke,
|
|
1406
|
+
index: de,
|
|
1407
|
+
split: O,
|
|
1408
|
+
style: (se = $ == null ? void 0 : $.item) !== null && se !== void 0 ? se : (ue = r == null ? void 0 : r.styles) === null || ue === void 0 ? void 0 : ue.item
|
|
1409
1409
|
}, X);
|
|
1410
|
-
}),
|
|
1410
|
+
}), Ge = s.useMemo(() => ({
|
|
1411
1411
|
latestIndex: K
|
|
1412
1412
|
}), [K]);
|
|
1413
|
-
if (
|
|
1413
|
+
if (N.length === 0)
|
|
1414
1414
|
return null;
|
|
1415
|
-
const
|
|
1416
|
-
return
|
|
1415
|
+
const Z = {};
|
|
1416
|
+
return p && (Z.flexWrap = "wrap"), !k && w && (Z.columnGap = v), !g && f && (Z.rowGap = x), B(/* @__PURE__ */ s.createElement("div", Object.assign({
|
|
1417
1417
|
ref: n,
|
|
1418
1418
|
className: A,
|
|
1419
|
-
style: Object.assign(Object.assign(Object.assign({},
|
|
1420
|
-
}, S), /* @__PURE__ */
|
|
1421
|
-
value:
|
|
1422
|
-
},
|
|
1423
|
-
}), pe =
|
|
1424
|
-
pe.Compact =
|
|
1419
|
+
style: Object.assign(Object.assign(Object.assign({}, Z), r == null ? void 0 : r.style), b)
|
|
1420
|
+
}, S), /* @__PURE__ */ s.createElement(Yn, {
|
|
1421
|
+
value: Ge
|
|
1422
|
+
}, Fe)));
|
|
1423
|
+
}), pe = Zn;
|
|
1424
|
+
pe.Compact = sn;
|
|
1425
1425
|
process.env.NODE_ENV !== "production" && (pe.displayName = "Space");
|
|
1426
|
-
var
|
|
1427
|
-
var o, t = e.prefixCls, i = t === void 0 ? "rc-switch" : t, r = e.className,
|
|
1428
|
-
value:
|
|
1426
|
+
var et = ["prefixCls", "className", "checked", "defaultChecked", "disabled", "loadingIcon", "checkedChildren", "unCheckedChildren", "onClick", "onChange", "onKeyDown"], He = /* @__PURE__ */ s.forwardRef(function(e, n) {
|
|
1427
|
+
var o, t = e.prefixCls, i = t === void 0 ? "rc-switch" : t, r = e.className, d = e.checked, a = e.defaultChecked, c = e.disabled, l = e.loadingIcon, h = e.checkedChildren, u = e.unCheckedChildren, C = e.onClick, m = e.onChange, O = e.onKeyDown, b = oe(e, et), p = Q(!1, {
|
|
1428
|
+
value: d,
|
|
1429
1429
|
defaultValue: a
|
|
1430
|
-
}), I = ae(
|
|
1431
|
-
function
|
|
1432
|
-
var
|
|
1433
|
-
return
|
|
1430
|
+
}), I = ae(p, 2), $ = I[0], S = I[1];
|
|
1431
|
+
function v(f, w) {
|
|
1432
|
+
var N = $;
|
|
1433
|
+
return c || (N = f, S(N), m == null || m(N, w)), N;
|
|
1434
1434
|
}
|
|
1435
|
-
function x(
|
|
1436
|
-
|
|
1435
|
+
function x(f) {
|
|
1436
|
+
f.which === te.LEFT ? v(!1, f) : f.which === te.RIGHT && v(!0, f), O == null || O(f);
|
|
1437
1437
|
}
|
|
1438
|
-
function g(
|
|
1439
|
-
var
|
|
1440
|
-
|
|
1438
|
+
function g(f) {
|
|
1439
|
+
var w = v(!$, f);
|
|
1440
|
+
C == null || C(w, f);
|
|
1441
1441
|
}
|
|
1442
|
-
var
|
|
1443
|
-
return /* @__PURE__ */
|
|
1442
|
+
var k = _(i, r, (o = {}, H(o, "".concat(i, "-checked"), $), H(o, "".concat(i, "-disabled"), c), o));
|
|
1443
|
+
return /* @__PURE__ */ s.createElement("button", V({}, b, {
|
|
1444
1444
|
type: "button",
|
|
1445
1445
|
role: "switch",
|
|
1446
1446
|
"aria-checked": $,
|
|
1447
|
-
disabled:
|
|
1448
|
-
className:
|
|
1447
|
+
disabled: c,
|
|
1448
|
+
className: k,
|
|
1449
1449
|
ref: n,
|
|
1450
1450
|
onKeyDown: x,
|
|
1451
1451
|
onClick: g
|
|
1452
|
-
}),
|
|
1452
|
+
}), l, /* @__PURE__ */ s.createElement("span", {
|
|
1453
1453
|
className: "".concat(i, "-inner")
|
|
1454
|
-
}, /* @__PURE__ */
|
|
1454
|
+
}, /* @__PURE__ */ s.createElement("span", {
|
|
1455
1455
|
className: "".concat(i, "-inner-checked")
|
|
1456
|
-
},
|
|
1456
|
+
}, h), /* @__PURE__ */ s.createElement("span", {
|
|
1457
1457
|
className: "".concat(i, "-inner-unchecked")
|
|
1458
|
-
},
|
|
1458
|
+
}, u)));
|
|
1459
1459
|
});
|
|
1460
|
-
|
|
1461
|
-
const
|
|
1460
|
+
He.displayName = "Switch";
|
|
1461
|
+
const nt = (e) => {
|
|
1462
1462
|
const {
|
|
1463
1463
|
componentCls: n,
|
|
1464
1464
|
trackHeightSM: o,
|
|
1465
1465
|
trackPadding: t,
|
|
1466
1466
|
trackMinWidthSM: i,
|
|
1467
1467
|
innerMinMarginSM: r,
|
|
1468
|
-
innerMaxMarginSM:
|
|
1468
|
+
innerMaxMarginSM: d,
|
|
1469
1469
|
handleSizeSM: a,
|
|
1470
|
-
calc:
|
|
1471
|
-
} = e,
|
|
1470
|
+
calc: c
|
|
1471
|
+
} = e, l = `${n}-inner`, h = M(c(a).add(c(t).mul(2)).equal()), u = M(c(d).mul(2).equal());
|
|
1472
1472
|
return {
|
|
1473
1473
|
[n]: {
|
|
1474
1474
|
[`&${n}-small`]: {
|
|
@@ -1476,17 +1476,17 @@ const it = (e) => {
|
|
|
1476
1476
|
height: o,
|
|
1477
1477
|
lineHeight: M(o),
|
|
1478
1478
|
[`${n}-inner`]: {
|
|
1479
|
-
paddingInlineStart:
|
|
1479
|
+
paddingInlineStart: d,
|
|
1480
1480
|
paddingInlineEnd: r,
|
|
1481
|
-
[`${
|
|
1481
|
+
[`${l}-checked, ${l}-unchecked`]: {
|
|
1482
1482
|
minHeight: o
|
|
1483
1483
|
},
|
|
1484
|
-
[`${
|
|
1485
|
-
marginInlineStart: `calc(-100% + ${
|
|
1486
|
-
marginInlineEnd: `calc(100% - ${
|
|
1484
|
+
[`${l}-checked`]: {
|
|
1485
|
+
marginInlineStart: `calc(-100% + ${h} - ${u})`,
|
|
1486
|
+
marginInlineEnd: `calc(100% - ${h} + ${u})`
|
|
1487
1487
|
},
|
|
1488
|
-
[`${
|
|
1489
|
-
marginTop:
|
|
1488
|
+
[`${l}-unchecked`]: {
|
|
1489
|
+
marginTop: c(o).mul(-1).equal(),
|
|
1490
1490
|
marginInlineStart: 0,
|
|
1491
1491
|
marginInlineEnd: 0
|
|
1492
1492
|
}
|
|
@@ -1496,44 +1496,44 @@ const it = (e) => {
|
|
|
1496
1496
|
height: a
|
|
1497
1497
|
},
|
|
1498
1498
|
[`${n}-loading-icon`]: {
|
|
1499
|
-
top:
|
|
1499
|
+
top: c(c(a).sub(e.switchLoadingIconSize)).div(2).equal(),
|
|
1500
1500
|
fontSize: e.switchLoadingIconSize
|
|
1501
1501
|
},
|
|
1502
1502
|
[`&${n}-checked`]: {
|
|
1503
1503
|
[`${n}-inner`]: {
|
|
1504
1504
|
paddingInlineStart: r,
|
|
1505
|
-
paddingInlineEnd:
|
|
1506
|
-
[`${
|
|
1505
|
+
paddingInlineEnd: d,
|
|
1506
|
+
[`${l}-checked`]: {
|
|
1507
1507
|
marginInlineStart: 0,
|
|
1508
1508
|
marginInlineEnd: 0
|
|
1509
1509
|
},
|
|
1510
|
-
[`${
|
|
1511
|
-
marginInlineStart: `calc(100% - ${
|
|
1512
|
-
marginInlineEnd: `calc(-100% + ${
|
|
1510
|
+
[`${l}-unchecked`]: {
|
|
1511
|
+
marginInlineStart: `calc(100% - ${h} + ${u})`,
|
|
1512
|
+
marginInlineEnd: `calc(-100% + ${h} - ${u})`
|
|
1513
1513
|
}
|
|
1514
1514
|
},
|
|
1515
1515
|
[`${n}-handle`]: {
|
|
1516
|
-
insetInlineStart: `calc(100% - ${M(
|
|
1516
|
+
insetInlineStart: `calc(100% - ${M(c(a).add(t).equal())})`
|
|
1517
1517
|
}
|
|
1518
1518
|
},
|
|
1519
1519
|
[`&:not(${n}-disabled):active`]: {
|
|
1520
|
-
[`&:not(${n}-checked) ${
|
|
1521
|
-
[`${
|
|
1522
|
-
marginInlineStart:
|
|
1523
|
-
marginInlineEnd:
|
|
1520
|
+
[`&:not(${n}-checked) ${l}`]: {
|
|
1521
|
+
[`${l}-unchecked`]: {
|
|
1522
|
+
marginInlineStart: c(e.marginXXS).div(2).equal(),
|
|
1523
|
+
marginInlineEnd: c(e.marginXXS).mul(-1).div(2).equal()
|
|
1524
1524
|
}
|
|
1525
1525
|
},
|
|
1526
|
-
[`&${n}-checked ${
|
|
1527
|
-
[`${
|
|
1528
|
-
marginInlineStart:
|
|
1529
|
-
marginInlineEnd:
|
|
1526
|
+
[`&${n}-checked ${l}`]: {
|
|
1527
|
+
[`${l}-checked`]: {
|
|
1528
|
+
marginInlineStart: c(e.marginXXS).mul(-1).div(2).equal(),
|
|
1529
|
+
marginInlineEnd: c(e.marginXXS).div(2).equal()
|
|
1530
1530
|
}
|
|
1531
1531
|
}
|
|
1532
1532
|
}
|
|
1533
1533
|
}
|
|
1534
1534
|
}
|
|
1535
1535
|
};
|
|
1536
|
-
},
|
|
1536
|
+
}, tt = (e) => {
|
|
1537
1537
|
const {
|
|
1538
1538
|
componentCls: n,
|
|
1539
1539
|
handleSize: o,
|
|
@@ -1552,14 +1552,14 @@ const it = (e) => {
|
|
|
1552
1552
|
}
|
|
1553
1553
|
}
|
|
1554
1554
|
};
|
|
1555
|
-
},
|
|
1555
|
+
}, it = (e) => {
|
|
1556
1556
|
const {
|
|
1557
1557
|
componentCls: n,
|
|
1558
1558
|
trackPadding: o,
|
|
1559
1559
|
handleBg: t,
|
|
1560
1560
|
handleShadow: i,
|
|
1561
1561
|
handleSize: r,
|
|
1562
|
-
calc:
|
|
1562
|
+
calc: d
|
|
1563
1563
|
} = e, a = `${n}-handle`;
|
|
1564
1564
|
return {
|
|
1565
1565
|
[n]: {
|
|
@@ -1577,14 +1577,14 @@ const it = (e) => {
|
|
|
1577
1577
|
bottom: 0,
|
|
1578
1578
|
insetInlineStart: 0,
|
|
1579
1579
|
backgroundColor: t,
|
|
1580
|
-
borderRadius:
|
|
1580
|
+
borderRadius: d(r).div(2).equal(),
|
|
1581
1581
|
boxShadow: i,
|
|
1582
1582
|
transition: `all ${e.switchDuration} ease-in-out`,
|
|
1583
1583
|
content: '""'
|
|
1584
1584
|
}
|
|
1585
1585
|
},
|
|
1586
1586
|
[`&${n}-checked ${a}`]: {
|
|
1587
|
-
insetInlineStart: `calc(100% - ${M(
|
|
1587
|
+
insetInlineStart: `calc(100% - ${M(d(r).add(o).equal())})`
|
|
1588
1588
|
},
|
|
1589
1589
|
[`&:not(${n}-disabled):active`]: {
|
|
1590
1590
|
[`${a}::before`]: {
|
|
@@ -1598,19 +1598,19 @@ const it = (e) => {
|
|
|
1598
1598
|
}
|
|
1599
1599
|
}
|
|
1600
1600
|
};
|
|
1601
|
-
},
|
|
1601
|
+
}, ot = (e) => {
|
|
1602
1602
|
const {
|
|
1603
1603
|
componentCls: n,
|
|
1604
1604
|
trackHeight: o,
|
|
1605
1605
|
trackPadding: t,
|
|
1606
1606
|
innerMinMargin: i,
|
|
1607
1607
|
innerMaxMargin: r,
|
|
1608
|
-
handleSize:
|
|
1608
|
+
handleSize: d,
|
|
1609
1609
|
calc: a
|
|
1610
|
-
} = e,
|
|
1610
|
+
} = e, c = `${n}-inner`, l = M(a(d).add(a(t).mul(2)).equal()), h = M(a(r).mul(2).equal());
|
|
1611
1611
|
return {
|
|
1612
1612
|
[n]: {
|
|
1613
|
-
[
|
|
1613
|
+
[c]: {
|
|
1614
1614
|
display: "block",
|
|
1615
1615
|
overflow: "hidden",
|
|
1616
1616
|
borderRadius: 100,
|
|
@@ -1618,7 +1618,7 @@ const it = (e) => {
|
|
|
1618
1618
|
paddingInlineStart: r,
|
|
1619
1619
|
paddingInlineEnd: i,
|
|
1620
1620
|
transition: `padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,
|
|
1621
|
-
[`${
|
|
1621
|
+
[`${c}-checked, ${c}-unchecked`]: {
|
|
1622
1622
|
display: "block",
|
|
1623
1623
|
color: e.colorTextLightSolid,
|
|
1624
1624
|
fontSize: e.fontSizeSM,
|
|
@@ -1626,37 +1626,37 @@ const it = (e) => {
|
|
|
1626
1626
|
pointerEvents: "none",
|
|
1627
1627
|
minHeight: o
|
|
1628
1628
|
},
|
|
1629
|
-
[`${
|
|
1630
|
-
marginInlineStart: `calc(-100% + ${
|
|
1631
|
-
marginInlineEnd: `calc(100% - ${
|
|
1629
|
+
[`${c}-checked`]: {
|
|
1630
|
+
marginInlineStart: `calc(-100% + ${l} - ${h})`,
|
|
1631
|
+
marginInlineEnd: `calc(100% - ${l} + ${h})`
|
|
1632
1632
|
},
|
|
1633
|
-
[`${
|
|
1633
|
+
[`${c}-unchecked`]: {
|
|
1634
1634
|
marginTop: a(o).mul(-1).equal(),
|
|
1635
1635
|
marginInlineStart: 0,
|
|
1636
1636
|
marginInlineEnd: 0
|
|
1637
1637
|
}
|
|
1638
1638
|
},
|
|
1639
|
-
[`&${n}-checked ${
|
|
1639
|
+
[`&${n}-checked ${c}`]: {
|
|
1640
1640
|
paddingInlineStart: i,
|
|
1641
1641
|
paddingInlineEnd: r,
|
|
1642
|
-
[`${
|
|
1642
|
+
[`${c}-checked`]: {
|
|
1643
1643
|
marginInlineStart: 0,
|
|
1644
1644
|
marginInlineEnd: 0
|
|
1645
1645
|
},
|
|
1646
|
-
[`${
|
|
1647
|
-
marginInlineStart: `calc(100% - ${
|
|
1648
|
-
marginInlineEnd: `calc(-100% + ${
|
|
1646
|
+
[`${c}-unchecked`]: {
|
|
1647
|
+
marginInlineStart: `calc(100% - ${l} + ${h})`,
|
|
1648
|
+
marginInlineEnd: `calc(-100% + ${l} - ${h})`
|
|
1649
1649
|
}
|
|
1650
1650
|
},
|
|
1651
1651
|
[`&:not(${n}-disabled):active`]: {
|
|
1652
|
-
[`&:not(${n}-checked) ${
|
|
1653
|
-
[`${
|
|
1652
|
+
[`&:not(${n}-checked) ${c}`]: {
|
|
1653
|
+
[`${c}-unchecked`]: {
|
|
1654
1654
|
marginInlineStart: a(t).mul(2).equal(),
|
|
1655
1655
|
marginInlineEnd: a(t).mul(-1).mul(2).equal()
|
|
1656
1656
|
}
|
|
1657
1657
|
},
|
|
1658
|
-
[`&${n}-checked ${
|
|
1659
|
-
[`${
|
|
1658
|
+
[`&${n}-checked ${c}`]: {
|
|
1659
|
+
[`${c}-checked`]: {
|
|
1660
1660
|
marginInlineStart: a(t).mul(-1).mul(2).equal(),
|
|
1661
1661
|
marginInlineEnd: a(t).mul(2).equal()
|
|
1662
1662
|
}
|
|
@@ -1664,7 +1664,7 @@ const it = (e) => {
|
|
|
1664
1664
|
}
|
|
1665
1665
|
}
|
|
1666
1666
|
};
|
|
1667
|
-
},
|
|
1667
|
+
}, at = (e) => {
|
|
1668
1668
|
const {
|
|
1669
1669
|
componentCls: n,
|
|
1670
1670
|
trackHeight: o,
|
|
@@ -1688,7 +1688,7 @@ const it = (e) => {
|
|
|
1688
1688
|
[`&:hover:not(${n}-disabled)`]: {
|
|
1689
1689
|
background: e.colorTextTertiary
|
|
1690
1690
|
}
|
|
1691
|
-
}),
|
|
1691
|
+
}), an(e)), {
|
|
1692
1692
|
[`&${n}-checked`]: {
|
|
1693
1693
|
background: e.switchColor,
|
|
1694
1694
|
[`&:hover:not(${n}-disabled)`]: {
|
|
@@ -1709,30 +1709,30 @@ const it = (e) => {
|
|
|
1709
1709
|
}
|
|
1710
1710
|
})
|
|
1711
1711
|
};
|
|
1712
|
-
},
|
|
1712
|
+
}, rt = (e) => {
|
|
1713
1713
|
const {
|
|
1714
1714
|
fontSize: n,
|
|
1715
1715
|
lineHeight: o,
|
|
1716
1716
|
controlHeight: t,
|
|
1717
1717
|
colorWhite: i
|
|
1718
|
-
} = e, r = n * o,
|
|
1718
|
+
} = e, r = n * o, d = t / 2, a = 2, c = r - a * 2, l = d - a * 2;
|
|
1719
1719
|
return {
|
|
1720
1720
|
trackHeight: r,
|
|
1721
|
-
trackHeightSM:
|
|
1722
|
-
trackMinWidth:
|
|
1723
|
-
trackMinWidthSM:
|
|
1721
|
+
trackHeightSM: d,
|
|
1722
|
+
trackMinWidth: c * 2 + a * 4,
|
|
1723
|
+
trackMinWidthSM: l * 2 + a * 2,
|
|
1724
1724
|
trackPadding: a,
|
|
1725
1725
|
// Fixed value
|
|
1726
1726
|
handleBg: i,
|
|
1727
|
-
handleSize:
|
|
1728
|
-
handleSizeSM:
|
|
1729
|
-
handleShadow: `0 2px 4px 0 ${new
|
|
1730
|
-
innerMinMargin:
|
|
1731
|
-
innerMaxMargin:
|
|
1732
|
-
innerMinMarginSM:
|
|
1733
|
-
innerMaxMarginSM:
|
|
1727
|
+
handleSize: c,
|
|
1728
|
+
handleSizeSM: l,
|
|
1729
|
+
handleShadow: `0 2px 4px 0 ${new rn("#00230b").setAlpha(0.2).toRgbString()}`,
|
|
1730
|
+
innerMinMargin: c / 2,
|
|
1731
|
+
innerMaxMargin: c + a + a * 2,
|
|
1732
|
+
innerMinMarginSM: l / 2,
|
|
1733
|
+
innerMaxMarginSM: l + a + a * 2
|
|
1734
1734
|
};
|
|
1735
|
-
},
|
|
1735
|
+
}, lt = re("Switch", (e) => {
|
|
1736
1736
|
const n = le(e, {
|
|
1737
1737
|
switchDuration: e.motionDurationMid,
|
|
1738
1738
|
switchColor: e.colorPrimary,
|
|
@@ -1742,18 +1742,18 @@ const it = (e) => {
|
|
|
1742
1742
|
switchHandleActiveInset: "-30%"
|
|
1743
1743
|
});
|
|
1744
1744
|
return [
|
|
1745
|
-
|
|
1745
|
+
at(n),
|
|
1746
1746
|
// inner style
|
|
1747
|
-
|
|
1747
|
+
ot(n),
|
|
1748
1748
|
// handle style
|
|
1749
|
-
|
|
1749
|
+
it(n),
|
|
1750
1750
|
// loading style
|
|
1751
|
-
|
|
1751
|
+
tt(n),
|
|
1752
1752
|
// small style
|
|
1753
|
-
|
|
1753
|
+
nt(n)
|
|
1754
1754
|
];
|
|
1755
|
-
},
|
|
1756
|
-
var
|
|
1755
|
+
}, rt);
|
|
1756
|
+
var ct = function(e, n) {
|
|
1757
1757
|
var o = {};
|
|
1758
1758
|
for (var t in e)
|
|
1759
1759
|
Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
|
|
@@ -1762,96 +1762,89 @@ var dt = function(e, n) {
|
|
|
1762
1762
|
n.indexOf(t[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[i]) && (o[t[i]] = e[t[i]]);
|
|
1763
1763
|
return o;
|
|
1764
1764
|
};
|
|
1765
|
-
const
|
|
1765
|
+
const dt = /* @__PURE__ */ s.forwardRef((e, n) => {
|
|
1766
1766
|
const {
|
|
1767
1767
|
prefixCls: o,
|
|
1768
1768
|
size: t,
|
|
1769
1769
|
disabled: i,
|
|
1770
1770
|
loading: r,
|
|
1771
|
-
className:
|
|
1771
|
+
className: d,
|
|
1772
1772
|
rootClassName: a,
|
|
1773
|
-
style:
|
|
1774
|
-
checked:
|
|
1775
|
-
value:
|
|
1776
|
-
defaultChecked:
|
|
1777
|
-
defaultValue:
|
|
1778
|
-
onChange:
|
|
1779
|
-
} = e,
|
|
1780
|
-
value:
|
|
1781
|
-
defaultValue:
|
|
1773
|
+
style: c,
|
|
1774
|
+
checked: l,
|
|
1775
|
+
value: h,
|
|
1776
|
+
defaultChecked: u,
|
|
1777
|
+
defaultValue: C,
|
|
1778
|
+
onChange: m
|
|
1779
|
+
} = e, O = ct(e, ["prefixCls", "size", "disabled", "loading", "className", "rootClassName", "style", "checked", "value", "defaultChecked", "defaultValue", "onChange"]), [b, p] = Q(!1, {
|
|
1780
|
+
value: l ?? h,
|
|
1781
|
+
defaultValue: u ?? C
|
|
1782
1782
|
}), {
|
|
1783
1783
|
getPrefixCls: I,
|
|
1784
1784
|
direction: $,
|
|
1785
1785
|
switch: S
|
|
1786
|
-
} =
|
|
1786
|
+
} = s.useContext(W), v = s.useContext(ke), x = (i ?? v) || r, g = I("switch", o), k = /* @__PURE__ */ s.createElement("div", {
|
|
1787
1787
|
className: `${g}-handle`
|
|
1788
|
-
}, r && /* @__PURE__ */
|
|
1788
|
+
}, r && /* @__PURE__ */ s.createElement(hn, {
|
|
1789
1789
|
className: `${g}-loading-icon`
|
|
1790
|
-
})), [
|
|
1790
|
+
})), [f, w, N] = lt(g), y = ge(t), P = _(S == null ? void 0 : S.className, {
|
|
1791
1791
|
[`${g}-small`]: y === "small",
|
|
1792
1792
|
[`${g}-loading`]: r,
|
|
1793
1793
|
[`${g}-rtl`]: $ === "rtl"
|
|
1794
|
-
},
|
|
1795
|
-
|
|
1794
|
+
}, d, a, w, N), B = Object.assign(Object.assign({}, S == null ? void 0 : S.style), c), E = function() {
|
|
1795
|
+
p(arguments.length <= 0 ? void 0 : arguments[0]), m == null || m.apply(void 0, arguments);
|
|
1796
1796
|
};
|
|
1797
|
-
return
|
|
1797
|
+
return f(/* @__PURE__ */ s.createElement(Pe, {
|
|
1798
1798
|
component: "Switch"
|
|
1799
|
-
}, /* @__PURE__ */
|
|
1800
|
-
checked:
|
|
1801
|
-
onChange:
|
|
1799
|
+
}, /* @__PURE__ */ s.createElement(He, Object.assign({}, O, {
|
|
1800
|
+
checked: b,
|
|
1801
|
+
onChange: E,
|
|
1802
1802
|
prefixCls: g,
|
|
1803
1803
|
className: P,
|
|
1804
|
-
style:
|
|
1804
|
+
style: B,
|
|
1805
1805
|
disabled: x,
|
|
1806
1806
|
ref: n,
|
|
1807
|
-
loadingIcon:
|
|
1807
|
+
loadingIcon: k
|
|
1808
1808
|
}))));
|
|
1809
|
-
}), ie =
|
|
1809
|
+
}), ie = dt;
|
|
1810
1810
|
ie.__ANT_SWITCH = !0;
|
|
1811
1811
|
process.env.NODE_ENV !== "production" && (ie.displayName = "Switch");
|
|
1812
|
-
var
|
|
1813
|
-
return /* @__PURE__ */
|
|
1812
|
+
var st = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M928 512.3v-.3c0-229.8-186.2-416-416-416S96 282.2 96 512v.4c0 229.8 186.2 416 416 416s416-186.2 416-416v-.3.2zm-6.7-74.6l.6 3.3-.6-3.3zM676.7 638.2c53.5-82.2 52.5-189.4-11.1-263.7l162.4-8.4c20.5 44.4 32 93.8 32 145.9 0 185.2-144.6 336.6-327.1 347.4l143.8-221.2zM512 652.3c-77.5 0-140.2-62.7-140.2-140.2 0-77.7 62.7-140.2 140.2-140.2S652.2 434.5 652.2 512 589.5 652.3 512 652.3zm369.2-331.7l-3-5.7 3 5.7zM512 164c121.3 0 228.2 62.1 290.4 156.2l-263.6-13.9c-97.5-5.7-190.2 49.2-222.3 141.1L227.8 311c63.1-88.9 166.9-147 284.2-147zM102.5 585.8c26 145 127.1 264 261.6 315.1C229.6 850 128.5 731 102.5 585.8zM164 512c0-55.9 13.2-108.7 36.6-155.5l119.7 235.4c44.1 86.7 137.4 139.7 234 121.6l-74 145.1C302.9 842.5 164 693.5 164 512zm324.7 415.4c4 .2 8 .4 12 .5-4-.2-8-.3-12-.5z" } }] }, name: "chrome", theme: "outlined" }, ut = function(n, o) {
|
|
1813
|
+
return /* @__PURE__ */ s.createElement(J, V({}, n, {
|
|
1814
|
+
ref: o,
|
|
1815
|
+
icon: st
|
|
1816
|
+
}));
|
|
1817
|
+
}, Le = /* @__PURE__ */ s.forwardRef(ut);
|
|
1818
|
+
process.env.NODE_ENV !== "production" && (Le.displayName = "ChromeOutlined");
|
|
1819
|
+
var ht = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z" } }] }, name: "mail", theme: "outlined" }, gt = function(n, o) {
|
|
1820
|
+
return /* @__PURE__ */ s.createElement(J, V({}, n, {
|
|
1814
1821
|
ref: o,
|
|
1815
1822
|
icon: ht
|
|
1816
1823
|
}));
|
|
1817
|
-
},
|
|
1818
|
-
process.env.NODE_ENV !== "production" && (
|
|
1819
|
-
var ft = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "
|
|
1820
|
-
return /* @__PURE__ */
|
|
1824
|
+
}, he = /* @__PURE__ */ s.forwardRef(gt);
|
|
1825
|
+
process.env.NODE_ENV !== "production" && (he.displayName = "MailOutlined");
|
|
1826
|
+
var ft = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z" } }] }, name: "message", theme: "outlined" }, mt = function(n, o) {
|
|
1827
|
+
return /* @__PURE__ */ s.createElement(J, V({}, n, {
|
|
1821
1828
|
ref: o,
|
|
1822
1829
|
icon: ft
|
|
1823
1830
|
}));
|
|
1824
|
-
},
|
|
1825
|
-
process.env.NODE_ENV !== "production" && (
|
|
1826
|
-
var pt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "
|
|
1827
|
-
return /* @__PURE__ */
|
|
1831
|
+
}, Ve = /* @__PURE__ */ s.forwardRef(mt);
|
|
1832
|
+
process.env.NODE_ENV !== "production" && (Ve.displayName = "MessageOutlined");
|
|
1833
|
+
var pt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M744 62H280c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h464c35.3 0 64-28.7 64-64V126c0-35.3-28.7-64-64-64zm-8 824H288V134h448v752zM472 784a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, name: "mobile", theme: "outlined" }, bt = function(n, o) {
|
|
1834
|
+
return /* @__PURE__ */ s.createElement(J, V({}, n, {
|
|
1828
1835
|
ref: o,
|
|
1829
1836
|
icon: pt
|
|
1830
1837
|
}));
|
|
1831
|
-
},
|
|
1832
|
-
process.env.NODE_ENV !== "production" && (
|
|
1833
|
-
var vt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "
|
|
1834
|
-
return /* @__PURE__ */
|
|
1838
|
+
}, We = /* @__PURE__ */ s.forwardRef(bt);
|
|
1839
|
+
process.env.NODE_ENV !== "production" && (We.displayName = "MobileOutlined");
|
|
1840
|
+
var vt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M877.1 238.7L770.6 132.3c-13-13-30.4-20.3-48.8-20.3s-35.8 7.2-48.8 20.3L558.3 246.8c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l89.6 89.7a405.46 405.46 0 01-86.4 127.3c-36.7 36.9-79.6 66-127.2 86.6l-89.6-89.7c-13-13-30.4-20.3-48.8-20.3a68.2 68.2 0 00-48.8 20.3L132.3 673c-13 13-20.3 30.5-20.3 48.9 0 18.5 7.2 35.8 20.3 48.9l106.4 106.4c22.2 22.2 52.8 34.9 84.2 34.9 6.5 0 12.8-.5 19.2-1.6 132.4-21.8 263.8-92.3 369.9-198.3C818 606 888.4 474.6 910.4 342.1c6.3-37.6-6.3-76.3-33.3-103.4zm-37.6 91.5c-19.5 117.9-82.9 235.5-178.4 331s-213 158.9-330.9 178.4c-14.8 2.5-30-2.5-40.8-13.2L184.9 721.9 295.7 611l119.8 120 .9.9 21.6-8a481.29 481.29 0 00285.7-285.8l8-21.6-120.8-120.7 110.8-110.9 104.5 104.5c10.8 10.8 15.8 26 13.3 40.8z" } }] }, name: "phone", theme: "outlined" }, Ct = function(n, o) {
|
|
1841
|
+
return /* @__PURE__ */ s.createElement(J, V({}, n, {
|
|
1835
1842
|
ref: o,
|
|
1836
1843
|
icon: vt
|
|
1837
1844
|
}));
|
|
1838
|
-
},
|
|
1839
|
-
process.env.NODE_ENV !== "production" && (
|
|
1840
|
-
|
|
1841
|
-
return /* @__PURE__ */ d.createElement(Z, V({}, n, {
|
|
1842
|
-
ref: o,
|
|
1843
|
-
icon: $t
|
|
1844
|
-
}));
|
|
1845
|
-
}, Xe = /* @__PURE__ */ d.forwardRef(yt);
|
|
1846
|
-
process.env.NODE_ENV !== "production" && (Xe.displayName = "PhoneOutlined");
|
|
1847
|
-
const U = De.Text, xe = (e) => ({
|
|
1848
|
-
off: "Off",
|
|
1849
|
-
instant: "Instant",
|
|
1850
|
-
hourly: "Hourly",
|
|
1851
|
-
daily: "Daily",
|
|
1852
|
-
weekly: "Weekly",
|
|
1853
|
-
monthly: "Monthly"
|
|
1854
|
-
})[e], St = (e, n) => {
|
|
1845
|
+
}, qe = /* @__PURE__ */ s.forwardRef(Ct);
|
|
1846
|
+
process.env.NODE_ENV !== "production" && (qe.displayName = "PhoneOutlined");
|
|
1847
|
+
const ee = gn.Text, $t = (e, n) => {
|
|
1855
1848
|
const o = [
|
|
1856
1849
|
T.EMAIL,
|
|
1857
1850
|
T.INAPP_WEB,
|
|
@@ -1863,204 +1856,226 @@ const U = De.Text, xe = (e) => ({
|
|
|
1863
1856
|
return o.indexOf(e) - o.indexOf(n);
|
|
1864
1857
|
}, Ie = (e, n) => {
|
|
1865
1858
|
const o = [
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1859
|
+
j.OFF,
|
|
1860
|
+
j.INSTANT,
|
|
1861
|
+
j.HOURLY,
|
|
1862
|
+
j.DAILY,
|
|
1863
|
+
j.WEEKLY,
|
|
1864
|
+
j.MONTHLY
|
|
1872
1865
|
];
|
|
1873
1866
|
return o.indexOf(e) - o.indexOf(n);
|
|
1874
|
-
}, we = () => {
|
|
1875
|
-
|
|
1876
|
-
|
|
1867
|
+
}, we = (e) => ({
|
|
1868
|
+
off: "Off",
|
|
1869
|
+
instant: "Instant",
|
|
1870
|
+
hourly: "Hourly",
|
|
1871
|
+
daily: "Daily",
|
|
1872
|
+
weekly: "Weekly",
|
|
1873
|
+
monthly: "Monthly"
|
|
1874
|
+
})[e], Ee = ({
|
|
1875
|
+
notification: e,
|
|
1876
|
+
preferences: n,
|
|
1877
|
+
updateDelivery: o,
|
|
1878
|
+
subNotificationId: t
|
|
1879
|
+
}) => /* @__PURE__ */ R(ne, { children: e.channels.sort($t).map((i, r) => {
|
|
1880
|
+
const d = n.find(
|
|
1881
|
+
(u) => u.notificationId === e.notificationId && u.channel === i
|
|
1882
|
+
);
|
|
1883
|
+
if (!d)
|
|
1877
1884
|
return null;
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
(
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
(u) => u !== "defaultDeliveryOption" && u !== "defaultDeliverOption"
|
|
1885
|
+
let a = yt(i), c = St(i);
|
|
1886
|
+
const l = Object.keys(e.options[i]).filter(
|
|
1887
|
+
(u) => u !== "defaultDeliveryOption" && u !== "defaultDeliverOption"
|
|
1888
|
+
);
|
|
1889
|
+
let h;
|
|
1890
|
+
return l.length === 1 ? h = /* @__PURE__ */ R(ee, { children: we(d.delivery) }) : l.length === 2 && l.includes(j.OFF) ? h = /* @__PURE__ */ R(
|
|
1891
|
+
ie,
|
|
1892
|
+
{
|
|
1893
|
+
checked: d.delivery !== j.OFF,
|
|
1894
|
+
onChange: (u) => {
|
|
1895
|
+
if (u) {
|
|
1896
|
+
const C = l.find(
|
|
1897
|
+
(m) => m !== j.OFF
|
|
1898
|
+
);
|
|
1899
|
+
o(
|
|
1900
|
+
e.notificationId,
|
|
1901
|
+
i,
|
|
1902
|
+
C,
|
|
1903
|
+
t
|
|
1898
1904
|
);
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1905
|
+
} else
|
|
1906
|
+
o(
|
|
1907
|
+
e.notificationId,
|
|
1908
|
+
i,
|
|
1909
|
+
j.OFF,
|
|
1910
|
+
t
|
|
1911
|
+
);
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
) : h = /* @__PURE__ */ F(ne, { children: [
|
|
1915
|
+
/* @__PURE__ */ R(
|
|
1916
|
+
ie,
|
|
1917
|
+
{
|
|
1918
|
+
checked: d.delivery !== j.OFF,
|
|
1919
|
+
onChange: (u) => {
|
|
1920
|
+
if (u) {
|
|
1921
|
+
const C = l.sort(Ie).find((m) => m !== j.OFF);
|
|
1922
|
+
o(
|
|
1923
|
+
e.notificationId,
|
|
1924
|
+
i,
|
|
1925
|
+
C,
|
|
1926
|
+
t
|
|
1927
|
+
);
|
|
1928
|
+
} else
|
|
1929
|
+
o(
|
|
1930
|
+
e.notificationId,
|
|
1931
|
+
i,
|
|
1932
|
+
j.OFF,
|
|
1933
|
+
t
|
|
1934
|
+
);
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1937
|
+
),
|
|
1938
|
+
/* @__PURE__ */ R(
|
|
1939
|
+
"div",
|
|
1940
|
+
{
|
|
1941
|
+
style: {
|
|
1942
|
+
width: "100%",
|
|
1943
|
+
marginTop: 8,
|
|
1944
|
+
maxHeight: d.delivery !== j.OFF ? 1e3 : 0,
|
|
1945
|
+
overflow: "hidden",
|
|
1946
|
+
transition: "max-height 0.3s ease"
|
|
1947
|
+
},
|
|
1948
|
+
children: /* @__PURE__ */ F("div", { children: [
|
|
1949
|
+
/* @__PURE__ */ R("div", { style: { marginTop: 20 }, children: /* @__PURE__ */ R(ee, { strong: !0, children: "Choose frequency:" }) }),
|
|
1950
|
+
/* @__PURE__ */ R(
|
|
1951
|
+
Y.Group,
|
|
1902
1952
|
{
|
|
1903
|
-
|
|
1953
|
+
value: d.delivery,
|
|
1904
1954
|
onChange: (u) => {
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
e.updateDelivery(
|
|
1912
|
-
i.notificationId,
|
|
1913
|
-
c,
|
|
1914
|
-
_.OFF
|
|
1915
|
-
);
|
|
1916
|
-
}
|
|
1917
|
-
}
|
|
1918
|
-
) : v = /* @__PURE__ */ F(ne, { children: [
|
|
1919
|
-
/* @__PURE__ */ R(
|
|
1920
|
-
ie,
|
|
1921
|
-
{
|
|
1922
|
-
checked: l.delivery !== _.OFF,
|
|
1923
|
-
onChange: (u) => {
|
|
1924
|
-
if (u) {
|
|
1925
|
-
const w = h.sort(Ie).find((m) => m !== _.OFF);
|
|
1926
|
-
e.updateDelivery(i.notificationId, c, w);
|
|
1927
|
-
} else
|
|
1928
|
-
e.updateDelivery(
|
|
1929
|
-
i.notificationId,
|
|
1930
|
-
c,
|
|
1931
|
-
_.OFF
|
|
1932
|
-
);
|
|
1933
|
-
}
|
|
1934
|
-
}
|
|
1935
|
-
),
|
|
1936
|
-
/* @__PURE__ */ R(
|
|
1937
|
-
"div",
|
|
1938
|
-
{
|
|
1939
|
-
style: {
|
|
1940
|
-
width: "100%",
|
|
1941
|
-
marginTop: 8,
|
|
1942
|
-
maxHeight: l.delivery !== _.OFF ? 1e3 : 0,
|
|
1943
|
-
overflow: "hidden",
|
|
1944
|
-
transition: "max-height 0.3s ease"
|
|
1945
|
-
},
|
|
1946
|
-
children: /* @__PURE__ */ F("div", { children: [
|
|
1947
|
-
/* @__PURE__ */ R("div", { style: { marginTop: 20 }, children: /* @__PURE__ */ R(U, { strong: !0, children: "Choose frequency:" }) }),
|
|
1948
|
-
/* @__PURE__ */ R(
|
|
1949
|
-
Q.Group,
|
|
1950
|
-
{
|
|
1951
|
-
value: l.delivery,
|
|
1952
|
-
onChange: (u) => {
|
|
1953
|
-
e.updateDelivery(
|
|
1954
|
-
i.notificationId,
|
|
1955
|
-
c,
|
|
1956
|
-
u.target.value
|
|
1957
|
-
);
|
|
1958
|
-
},
|
|
1959
|
-
children: /* @__PURE__ */ R(
|
|
1960
|
-
pe,
|
|
1961
|
-
{
|
|
1962
|
-
direction: "vertical",
|
|
1963
|
-
style: { paddingTop: 10 },
|
|
1964
|
-
children: h.filter((u) => u !== _.OFF).sort(Ie).map((u) => /* @__PURE__ */ R(Q, { value: u, children: /* @__PURE__ */ R(U, { children: xe(u) }) }, u))
|
|
1965
|
-
}
|
|
1966
|
-
)
|
|
1967
|
-
}
|
|
1968
|
-
)
|
|
1969
|
-
] })
|
|
1970
|
-
}
|
|
1971
|
-
)
|
|
1972
|
-
] }), /* @__PURE__ */ F(ne, { children: [
|
|
1973
|
-
/* @__PURE__ */ F(
|
|
1974
|
-
"div",
|
|
1975
|
-
{
|
|
1976
|
-
style: {
|
|
1977
|
-
display: "flex",
|
|
1978
|
-
justifyContent: "space-between",
|
|
1979
|
-
flexWrap: "wrap",
|
|
1980
|
-
marginTop: a === 0 ? 12 : 0,
|
|
1981
|
-
marginBottom: a === i.channels.length - 1 ? 12 : 0
|
|
1982
|
-
},
|
|
1983
|
-
children: [
|
|
1984
|
-
/* @__PURE__ */ F(U, { children: [
|
|
1985
|
-
f,
|
|
1986
|
-
" ",
|
|
1987
|
-
s
|
|
1988
|
-
] }),
|
|
1989
|
-
v
|
|
1990
|
-
]
|
|
1955
|
+
o(
|
|
1956
|
+
e.notificationId,
|
|
1957
|
+
i,
|
|
1958
|
+
u.target.value,
|
|
1959
|
+
t
|
|
1960
|
+
);
|
|
1991
1961
|
},
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
1962
|
+
children: /* @__PURE__ */ R(pe, { direction: "vertical", style: { paddingTop: 10 }, children: l.filter((u) => u !== j.OFF).sort(Ie).map((u) => /* @__PURE__ */ R(Y, { value: u, children: /* @__PURE__ */ R(ee, { children: we(u) }) }, u)) })
|
|
1963
|
+
}
|
|
1964
|
+
)
|
|
1965
|
+
] })
|
|
1966
|
+
}
|
|
1967
|
+
)
|
|
1968
|
+
] }), /* @__PURE__ */ F("div", { children: [
|
|
1969
|
+
/* @__PURE__ */ F(
|
|
1970
|
+
"div",
|
|
1971
|
+
{
|
|
1972
|
+
style: {
|
|
1973
|
+
display: "flex",
|
|
1974
|
+
justifyContent: "space-between",
|
|
1975
|
+
flexWrap: "wrap",
|
|
1976
|
+
marginTop: r === 0 ? 12 : 0,
|
|
1977
|
+
marginBottom: r === e.channels.length - 1 ? 12 : 0
|
|
1978
|
+
},
|
|
1979
|
+
children: [
|
|
1980
|
+
/* @__PURE__ */ F(ee, { children: [
|
|
1981
|
+
c,
|
|
1982
|
+
" ",
|
|
1983
|
+
a
|
|
1984
|
+
] }),
|
|
1985
|
+
h
|
|
1986
|
+
]
|
|
1987
|
+
},
|
|
1988
|
+
i
|
|
1989
|
+
),
|
|
1990
|
+
r !== e.channels.length - 1 && /* @__PURE__ */ R(Ae, {})
|
|
1991
|
+
] }, i);
|
|
1992
|
+
}) }), yt = (e) => ({
|
|
2002
1993
|
EMAIL: "Email",
|
|
2003
1994
|
INAPP_WEB: "In-App",
|
|
2004
1995
|
SMS: "Text",
|
|
2005
1996
|
CALL: "Automated Calling",
|
|
2006
1997
|
PUSH: "Mobile",
|
|
2007
1998
|
WEB_PUSH: "Browser"
|
|
2008
|
-
})[e],
|
|
1999
|
+
})[e], St = (e) => {
|
|
2009
2000
|
switch (e) {
|
|
2010
2001
|
case T.EMAIL:
|
|
2011
2002
|
return /* @__PURE__ */ R(he, { style: { color: q.primary } });
|
|
2012
2003
|
case T.SMS:
|
|
2013
|
-
return /* @__PURE__ */ R(
|
|
2004
|
+
return /* @__PURE__ */ R(Ve, { style: { color: q.primary } });
|
|
2014
2005
|
case T.PUSH:
|
|
2015
|
-
return /* @__PURE__ */ R(
|
|
2006
|
+
return /* @__PURE__ */ R(We, { style: { color: q.primary } });
|
|
2016
2007
|
case T.CALL:
|
|
2017
|
-
return /* @__PURE__ */ R(
|
|
2008
|
+
return /* @__PURE__ */ R(qe, { style: { color: q.primary } });
|
|
2018
2009
|
case T.INAPP_WEB:
|
|
2019
|
-
return /* @__PURE__ */ R(
|
|
2010
|
+
return /* @__PURE__ */ R(mn, { style: { color: q.primary } });
|
|
2020
2011
|
case T.WEB_PUSH:
|
|
2021
|
-
return /* @__PURE__ */ R(
|
|
2012
|
+
return /* @__PURE__ */ R(Le, { style: { color: q.primary } });
|
|
2022
2013
|
default:
|
|
2023
2014
|
return /* @__PURE__ */ R(he, { style: { color: q.primary } });
|
|
2024
2015
|
}
|
|
2025
2016
|
};
|
|
2026
|
-
function
|
|
2027
|
-
const e =
|
|
2017
|
+
function Nt() {
|
|
2018
|
+
const e = Qe(Xe);
|
|
2028
2019
|
if (!e || !e.preferences)
|
|
2029
2020
|
return null;
|
|
2030
|
-
const n = e.preferences.
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2021
|
+
const n = e.preferences.notifications.map(
|
|
2022
|
+
(o) => {
|
|
2023
|
+
var d, a, c;
|
|
2024
|
+
const t = (d = e.preferences) == null ? void 0 : d.preferences.filter(
|
|
2025
|
+
(l) => l.notificationId === o.notificationId && !l.subNotificationId
|
|
2026
|
+
), i = (a = e.preferences) == null ? void 0 : a.preferences.filter(
|
|
2027
|
+
(l) => l.notificationId === o.notificationId && l.subNotificationId
|
|
2028
|
+
), r = (c = e.preferences) == null ? void 0 : c.subNotifications.filter(
|
|
2029
|
+
(l) => i == null ? void 0 : i.find(
|
|
2030
|
+
(h) => h.subNotificationId === l.subNotificationId
|
|
2031
|
+
)
|
|
2032
|
+
);
|
|
2033
|
+
return {
|
|
2034
|
+
label: o.title,
|
|
2035
|
+
key: o.notificationId,
|
|
2036
|
+
children: /* @__PURE__ */ F(ne, { children: [
|
|
2037
|
+
/* @__PURE__ */ R(
|
|
2038
|
+
Ee,
|
|
2039
|
+
{
|
|
2040
|
+
notification: o,
|
|
2041
|
+
preferences: t || [],
|
|
2042
|
+
updateDelivery: e.updateDelivery
|
|
2043
|
+
},
|
|
2044
|
+
o.notificationId
|
|
2045
|
+
),
|
|
2046
|
+
r == null ? void 0 : r.map((l) => /* @__PURE__ */ R(
|
|
2047
|
+
ye,
|
|
2048
|
+
{
|
|
2049
|
+
bordered: !1,
|
|
2050
|
+
items: [
|
|
2051
|
+
{
|
|
2052
|
+
label: l.title,
|
|
2053
|
+
key: l.subNotificationId,
|
|
2054
|
+
children: /* @__PURE__ */ R(
|
|
2055
|
+
Ee,
|
|
2056
|
+
{
|
|
2057
|
+
notification: o,
|
|
2058
|
+
preferences: i || [],
|
|
2059
|
+
updateDelivery: e.updateDelivery,
|
|
2060
|
+
subNotificationId: l.subNotificationId
|
|
2061
|
+
},
|
|
2062
|
+
l.subNotificationId
|
|
2063
|
+
)
|
|
2064
|
+
}
|
|
2065
|
+
],
|
|
2066
|
+
defaultActiveKey: []
|
|
2067
|
+
},
|
|
2068
|
+
l.subNotificationId
|
|
2069
|
+
))
|
|
2070
|
+
] })
|
|
2071
|
+
};
|
|
2072
|
+
}
|
|
2073
|
+
);
|
|
2074
|
+
return /* @__PURE__ */ R(ne, { children: /* @__PURE__ */ R(ye, { items: n, defaultActiveKey: [] }) });
|
|
2060
2075
|
}
|
|
2061
2076
|
export {
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2077
|
+
Nt as P,
|
|
2078
|
+
Ee as a,
|
|
2079
|
+
St as b,
|
|
2080
|
+
yt as g
|
|
2066
2081
|
};
|