@gobolt/genesis 0.0.8 → 0.0.10
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/README.md +10 -0
- package/dist/{AntdIcon-c395a1c4.js → AntdIcon-BoLh1dP8.js} +66 -68
- package/dist/CheckOutlined-CeTKr6II.js +13 -0
- package/dist/{CloseCircleFilled-ddc51e7e.js → CloseCircleFilled-DXCxlIQL.js} +8 -11
- package/dist/{CloseOutlined-14b8bba1.js → CloseOutlined-ClXDNn82.js} +9 -12
- package/dist/{Compact-c39ed20d.js → Compact-CGY560JF.js} +63 -65
- package/dist/ContextIsolator-D5x2Ih51.js +20 -0
- package/dist/{ExclamationCircleFilled-23ef9812.js → ExclamationCircleFilled-C0Kj5KQV.js} +16 -22
- package/dist/KeyCode-DM2sFh3-.js +517 -0
- package/dist/LoadingOutlined-8EnJdZ7I.js +13 -0
- package/dist/{Overflow-a570fa69.js → Overflow-PBZD-PFm.js} +63 -64
- package/dist/{DownOutlined-64a4732a.js → PurePanel-BqPLRtc2.js} +67 -70
- package/dist/{SearchOutlined-a9014e08.js → SearchOutlined-BP3Z2K6j.js} +8 -11
- package/dist/{TextArea-20825221.js → TextArea-DKwCct3i.js} +583 -588
- package/dist/Typography-aGoDUl4R.js +710 -0
- package/dist/bundle.css +1204 -0
- package/dist/{button-fa1c119c.js → button-CDQgO1OK.js} +274 -278
- package/dist/{collapse-345bc884.js → collapse-Dtpt-6W_.js} +2 -2
- package/dist/compact-item-DH13cl8A.js +61 -0
- package/dist/components/Badge/Badge.d.ts +2 -2
- package/dist/components/Badge/Badge.js +63 -62
- package/dist/components/Badge/__tests__/Badge.test.js +11 -65
- package/dist/components/Badge/index.js +2 -21
- package/dist/components/Badge/styles.js +7 -8
- package/dist/components/Breadcrumb/Breadcrumb.js +8 -24
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +21 -7
- package/dist/components/Breadcrumb/__tests__/Breadcrumb.test.js +13 -60
- package/dist/components/Breadcrumb/index.js +2 -25
- package/dist/components/Breadcrumb/styles.d.ts +10 -6
- package/dist/components/Breadcrumb/styles.js +787 -808
- package/dist/components/Button/Button.d.ts +6 -4
- package/dist/components/Button/Button.js +20 -40
- package/dist/components/Button/__tests__/Button.test.js +9 -54
- package/dist/components/Button/index.js +2 -20
- package/dist/components/Button/styles.d.ts +9 -5
- package/dist/components/Button/styles.js +19 -30
- package/dist/components/Checkbox/Checkbox.js +8 -38
- package/dist/components/Checkbox/__tests__/Checkbox.test.js +16 -62
- package/dist/components/Checkbox/index.js +2 -47
- package/dist/components/Checkbox/styles.d.ts +8 -1
- package/dist/components/Checkbox/styles.js +181 -188
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.d.ts +2 -4
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +19 -51
- package/dist/components/ErrorBoundaryFallback/index.d.ts +1 -0
- package/dist/components/ErrorBoundaryFallback/index.js +2 -49
- package/dist/components/ErrorBoundaryFallback/styles.d.ts +1 -3
- package/dist/components/ErrorBoundaryFallback/styles.js +34 -37
- package/dist/components/Form/Form.d.ts +18 -5
- package/dist/components/Form/Form.js +4 -45
- package/dist/components/Form/__stories__/FormStory.js +44 -81
- package/dist/components/Form/__tests__/form.test.d.ts +1 -0
- package/dist/components/Form/__tests__/form.test.js +18 -0
- package/dist/components/Form/index.js +2 -46
- package/dist/components/Form/styles.d.ts +3 -0
- package/dist/components/Form/styles.js +5 -0
- package/dist/components/Input/Input.js +6 -29
- package/dist/components/Input/__tests__/Input.test.js +21 -66
- package/dist/components/Input/index.js +2 -29
- package/dist/components/Input/styles.d.ts +5 -2
- package/dist/components/Input/styles.js +319 -332
- package/dist/components/Message/Message.d.ts +4 -4
- package/dist/components/Message/Message.js +53 -80
- package/dist/components/Message/__tests__/Message.test.js +24 -70
- package/dist/components/Message/index.js +2 -48
- package/dist/components/Message/styles.d.ts +4 -1
- package/dist/components/Message/styles.js +24 -18
- package/dist/components/Notification/Notification.d.ts +11 -10
- package/dist/components/Notification/Notification.js +306 -372
- package/dist/components/Notification/NotificationRightChevron.d.ts +2 -0
- package/dist/components/Notification/NotificationRightChevron.js +23 -0
- package/dist/components/Notification/__tests__/Notification.test.js +8 -69
- package/dist/components/Notification/index.js +2 -59
- package/dist/components/Notification/styles.d.ts +13 -3
- package/dist/components/Notification/styles.js +36 -20
- package/dist/components/Radio/Radio.js +20 -106
- package/dist/components/Radio/RadioGroup.js +18 -71
- package/dist/components/Radio/__stories__/RadioGroup.stories.d.ts +1 -1
- package/dist/components/Radio/__tests__/RadioGroup.test.js +15 -70
- package/dist/components/Radio/index.d.ts +1 -1
- package/dist/components/Radio/index.js +2 -56
- package/dist/components/Select/DropdownChevron.d.ts +2 -0
- package/dist/components/Select/DropdownChevron.js +23 -0
- package/dist/components/Select/Select.d.ts +9 -4
- package/dist/components/Select/Select.js +29 -41
- package/dist/components/Select/__tests__/Select.test.js +10752 -93
- package/dist/components/Select/index.js +2 -28
- package/dist/components/Select/styles.d.ts +20 -6
- package/dist/components/Select/styles.js +1381 -1370
- package/dist/components/Toast/Toast.d.ts +4 -4
- package/dist/components/Toast/Toast.js +8 -37
- package/dist/components/Toast/__stories__/Toast.stories.d.ts +1 -0
- package/dist/components/Toast/__tests__/Toast.test.js +10 -55
- package/dist/components/Toast/index.js +2 -46
- package/dist/components/Toast/styles.d.ts +6 -1
- package/dist/components/Toast/styles.js +36 -21
- package/dist/components/Typography/Typography.d.ts +7 -4
- package/dist/components/Typography/Typography.js +2 -42
- package/dist/components/Typography/__stories__/Typography.stories.d.ts +1 -0
- package/dist/components/Typography/__tests__/Typography.test.js +19 -56
- package/dist/components/Typography/index.js +2 -46
- package/dist/components/Typography/styles.d.ts +18 -4
- package/dist/components/Typography/styles.js +36 -43
- package/dist/components/index.d.ts +13 -5
- package/dist/components/index.js +24 -70
- package/dist/{context-3b8a39af.js → context-BMW3aJEf.js} +538 -548
- package/dist/genesis/GenesisThemeBreakdown.js +38 -55
- package/dist/genesis/GenesisThemeDemo.js +3 -53
- package/dist/genesis/styles.d.ts +6 -2
- package/dist/genesis/styles.js +496 -521
- package/dist/{index-e2b72ca8.js → index-1CBpubM3.js} +97 -102
- package/dist/index-BZAhCB_K.js +97 -0
- package/dist/{index-501fc13d.js → index-C0SmxWLS.js} +367 -392
- package/dist/index-C8haFnXI.js +1112 -0
- package/dist/index-CfDY25LP.js +873 -0
- package/dist/index-DPW8XdWj.js +952 -0
- package/dist/{index-8c8d2d0c.js → index-bKlRxQp4.js} +114 -114
- package/dist/index-oK7z6jnz.js +22795 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +31 -77
- package/dist/{isVisible-729780f5.js → isVisible-A-IfeFoT.js} +67 -94
- package/dist/{magic-string.es-b7491176.js → magic-string.es-D2FWSwU3.js} +56 -103
- package/dist/{pickAttrs-00ba4687.js → pickAttrs-B0YTfcV1.js} +1 -1
- package/dist/providers/GenesisProvider.d.ts +0 -5
- package/dist/providers/GenesisProvider.js +9 -59
- package/dist/providers/ThemeProvider.d.ts +1 -2
- package/dist/providers/ThemeProvider.js +11 -13
- package/dist/providers/ToastProvider.d.ts +11 -4
- package/dist/providers/ToastProvider.js +10 -39
- package/dist/providers/index.d.ts +2 -3
- package/dist/providers/index.js +4 -51
- package/dist/providers/useGenesis.d.ts +7 -0
- package/dist/providers/useGenesis.js +6 -0
- package/dist/setup-BvfREoHl.js +33891 -0
- package/dist/{styled-components.browser.esm-02f500bc.js → styled-components.browser.esm-CZ1XM4o4.js} +72 -134
- package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +15 -45
- package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +15 -45
- package/dist/styles/design-tokens/{typography → typography-tokens}/TypographyTokens.stories.d.ts +1 -0
- package/dist/styles/design-tokens/variables.d.ts +10 -10
- package/dist/styles/design-tokens/variables.js +1 -1
- package/dist/styles/global-styles.d.ts +1 -0
- package/dist/styles/global-styles.js +14 -31
- package/dist/styles/theme/genesis-theme.js +257 -212
- package/dist/styles/theme/genesis-theme.types.d.ts +46 -0
- package/dist/styles/theme/index.js +4 -5
- package/dist/styles-CT_fyXBd.js +1808 -0
- package/dist/test/setup.js +3 -46
- package/dist/useLocale-DT-z_vQ6.js +16 -0
- package/dist/useVariants-DvhXfgJY.js +30 -0
- package/dist/utils/isAllEnglishString.js +1 -2
- package/dist/{presets-83ccb923.js → warning-C63HNL9U.js} +358 -356
- package/package.json +51 -43
- package/dist/CheckOutlined-52d9ac25.js +0 -29
- package/dist/ContextIsolator-b09b2c52.js +0 -20
- package/dist/EllipsisOutlined-60122660.js +0 -1115
- package/dist/InfoCircleFilled-c5f90c20.js +0 -16
- package/dist/RightOutlined-83515eb4.js +0 -16
- package/dist/compact-item-b8f85aa6.js +0 -75
- package/dist/index-0a886e53.js +0 -100
- package/dist/index-0b9ee239.js +0 -955
- package/dist/index-1a33c134.js +0 -1389
- package/dist/index-4003d75b.js +0 -3748
- package/dist/index-89035ea5.js +0 -3242
- package/dist/providers/ToastWrapper.d.ts +0 -7
- package/dist/providers/ToastWrapper.js +0 -56
- package/dist/setup-aaca7b6f.js +0 -21158
- package/dist/styles/theme/global-styles.d.ts +0 -1
- package/dist/styles/theme/global-styles.js +0 -36
- package/dist/useVariants-a0d64298.js +0 -30
- /package/dist/{presetColors-ccf8cb4c.js → presetColors-Cl8UP3Nw.js} +0 -0
- /package/dist/{reactNode-f4391605.js → reactNode-sKPeiqPL.js} +0 -0
|
@@ -1,40 +1,39 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import s, { forwardRef as oe, useState as
|
|
3
|
-
import { c as N, e as Ue, _ as w, F as Je, d as yr, f as
|
|
4
|
-
import { u as Sr, o as xr } from "./isVisible-
|
|
5
|
-
import { C as Qe,
|
|
6
|
-
import { W as Dr } from "./index-
|
|
7
|
-
import { b as Tr, a as Lr } from "./Compact-
|
|
8
|
-
import { c as zr, i as Ar } from "./reactNode-
|
|
9
|
-
import { P as rr } from "./presetColors-
|
|
10
|
-
import {
|
|
11
|
-
|
|
1
|
+
import * as q from "react";
|
|
2
|
+
import s, { forwardRef as oe, useState as xe, useRef as j, useEffect as k, useMemo as ee, useContext as he, Children as vr } from "react";
|
|
3
|
+
import { c as N, e as Ue, _ as w, F as Je, d as yr, f as Y, h as $e, a as be } from "./warning-C63HNL9U.js";
|
|
4
|
+
import { u as Sr, o as xr } from "./isVisible-A-IfeFoT.js";
|
|
5
|
+
import { C as Qe, E as $r, v as Ze, x as Er, B as Br, _ as Hr, d as Or, e as Ke, f as ke, b as er, m as ne, G as pe, g as Rr, q as te, H as Nr, I as Pr, J as jr, D as Ir, j as wr } from "./index-oK7z6jnz.js";
|
|
6
|
+
import { W as Dr } from "./index-1CBpubM3.js";
|
|
7
|
+
import { b as Tr, a as Lr } from "./Compact-CGY560JF.js";
|
|
8
|
+
import { c as zr, i as Ar } from "./reactNode-sKPeiqPL.js";
|
|
9
|
+
import { P as rr } from "./presetColors-Cl8UP3Nw.js";
|
|
10
|
+
import { R as _r } from "./LoadingOutlined-8EnJdZ7I.js";
|
|
11
|
+
import { g as Mr } from "./compact-item-DH13cl8A.js";
|
|
12
|
+
var Gr = function(e, r) {
|
|
12
13
|
var t = {};
|
|
13
|
-
for (var o in e)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
for (var n = 0, o = Object.getOwnPropertySymbols(e); n < o.length; n++)
|
|
17
|
-
r.indexOf(o[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[n]) && (t[o[n]] = e[o[n]]);
|
|
14
|
+
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && r.indexOf(o) < 0 && (t[o] = e[o]);
|
|
15
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var n = 0, o = Object.getOwnPropertySymbols(e); n < o.length; n++)
|
|
16
|
+
r.indexOf(o[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[n]) && (t[o[n]] = e[o[n]]);
|
|
18
17
|
return t;
|
|
19
18
|
};
|
|
20
|
-
const tr = /* @__PURE__ */
|
|
19
|
+
const tr = /* @__PURE__ */ q.createContext(void 0), Fr = (e) => {
|
|
21
20
|
const {
|
|
22
21
|
getPrefixCls: r,
|
|
23
22
|
direction: t
|
|
24
|
-
} =
|
|
23
|
+
} = q.useContext(Qe), {
|
|
25
24
|
prefixCls: o,
|
|
26
25
|
size: n,
|
|
27
26
|
className: a
|
|
28
|
-
} = e, l = Gr(e, ["prefixCls", "size", "className"]), i = r("btn-group", o), [, , c] = $r()
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
27
|
+
} = e, l = Gr(e, ["prefixCls", "size", "className"]), i = r("btn-group", o), [, , c] = $r(), u = q.useMemo(() => {
|
|
28
|
+
switch (n) {
|
|
29
|
+
case "large":
|
|
30
|
+
return "lg";
|
|
31
|
+
case "small":
|
|
32
|
+
return "sm";
|
|
33
|
+
default:
|
|
34
|
+
return "";
|
|
35
|
+
}
|
|
36
|
+
}, [n]);
|
|
38
37
|
if (process.env.NODE_ENV !== "production") {
|
|
39
38
|
const g = Ze("Button.Group");
|
|
40
39
|
process.env.NODE_ENV !== "production" && g(!n || ["large", "small", "middle"].includes(n), "usage", "Invalid prop `size`.");
|
|
@@ -43,27 +42,27 @@ const tr = /* @__PURE__ */ K.createContext(void 0), Fr = (e) => {
|
|
|
43
42
|
[`${i}-${u}`]: u,
|
|
44
43
|
[`${i}-rtl`]: t === "rtl"
|
|
45
44
|
}, a, c);
|
|
46
|
-
return /* @__PURE__ */
|
|
45
|
+
return /* @__PURE__ */ q.createElement(tr.Provider, {
|
|
47
46
|
value: n
|
|
48
|
-
}, /* @__PURE__ */
|
|
47
|
+
}, /* @__PURE__ */ q.createElement("div", Object.assign({}, l, {
|
|
49
48
|
className: d
|
|
50
49
|
})));
|
|
51
|
-
},
|
|
52
|
-
function
|
|
50
|
+
}, We = /^[\u4E00-\u9FA5]{2}$/, Ee = We.test.bind(We);
|
|
51
|
+
function qe(e) {
|
|
53
52
|
return typeof e == "string";
|
|
54
53
|
}
|
|
55
54
|
function re(e) {
|
|
56
55
|
return e === "text" || e === "link";
|
|
57
56
|
}
|
|
58
|
-
function
|
|
57
|
+
function Vr(e, r) {
|
|
59
58
|
if (e == null)
|
|
60
59
|
return;
|
|
61
60
|
const t = r ? " " : "";
|
|
62
|
-
return typeof e != "string" && typeof e != "number" &&
|
|
61
|
+
return typeof e != "string" && typeof e != "number" && qe(e.type) && Ee(e.props.children) ? zr(e, {
|
|
63
62
|
children: e.props.children.split("").join(t)
|
|
64
|
-
}) :
|
|
63
|
+
}) : qe(e) ? Ee(e) ? /* @__PURE__ */ s.createElement("span", null, e.split("").join(t)) : /* @__PURE__ */ s.createElement("span", null, e) : Ar(e) ? /* @__PURE__ */ s.createElement("span", null, e) : e;
|
|
65
64
|
}
|
|
66
|
-
function
|
|
65
|
+
function Wr(e, r) {
|
|
67
66
|
let t = !1;
|
|
68
67
|
const o = [];
|
|
69
68
|
return s.Children.forEach(e, (n) => {
|
|
@@ -74,10 +73,10 @@ function Xr(e, r) {
|
|
|
74
73
|
} else
|
|
75
74
|
o.push(n);
|
|
76
75
|
t = l;
|
|
77
|
-
}), s.Children.map(o, (n) =>
|
|
76
|
+
}), s.Children.map(o, (n) => Vr(n, r));
|
|
78
77
|
}
|
|
79
78
|
["default", "primary", "danger"].concat(Er(rr));
|
|
80
|
-
const
|
|
79
|
+
const Be = /* @__PURE__ */ oe((e, r) => {
|
|
81
80
|
const {
|
|
82
81
|
className: t,
|
|
83
82
|
style: o,
|
|
@@ -89,14 +88,14 @@ const qr = /* @__PURE__ */ oe((e, r) => {
|
|
|
89
88
|
className: l,
|
|
90
89
|
style: o
|
|
91
90
|
}, n);
|
|
92
|
-
}),
|
|
91
|
+
}), Xe = /* @__PURE__ */ oe((e, r) => {
|
|
93
92
|
const {
|
|
94
93
|
prefixCls: t,
|
|
95
94
|
className: o,
|
|
96
95
|
style: n,
|
|
97
96
|
iconClassName: a
|
|
98
97
|
} = e, l = N(`${t}-loading-icon`, o);
|
|
99
|
-
return /* @__PURE__ */ s.createElement(
|
|
98
|
+
return /* @__PURE__ */ s.createElement(Be, {
|
|
100
99
|
prefixCls: t,
|
|
101
100
|
className: l,
|
|
102
101
|
style: n,
|
|
@@ -104,15 +103,15 @@ const qr = /* @__PURE__ */ oe((e, r) => {
|
|
|
104
103
|
}, /* @__PURE__ */ s.createElement(_r, {
|
|
105
104
|
className: a
|
|
106
105
|
}));
|
|
107
|
-
}),
|
|
106
|
+
}), ve = () => ({
|
|
108
107
|
width: 0,
|
|
109
108
|
opacity: 0,
|
|
110
109
|
transform: "scale(0)"
|
|
111
|
-
}),
|
|
110
|
+
}), ye = (e) => ({
|
|
112
111
|
width: e.scrollWidth,
|
|
113
112
|
opacity: 1,
|
|
114
113
|
transform: "scale(1)"
|
|
115
|
-
}),
|
|
114
|
+
}), qr = (e) => {
|
|
116
115
|
const {
|
|
117
116
|
prefixCls: r,
|
|
118
117
|
loading: t,
|
|
@@ -121,7 +120,7 @@ const qr = /* @__PURE__ */ oe((e, r) => {
|
|
|
121
120
|
style: a,
|
|
122
121
|
mount: l
|
|
123
122
|
} = e, i = !!t;
|
|
124
|
-
return o ? /* @__PURE__ */ s.createElement(
|
|
123
|
+
return o ? /* @__PURE__ */ s.createElement(Xe, {
|
|
125
124
|
prefixCls: r,
|
|
126
125
|
className: n,
|
|
127
126
|
style: a
|
|
@@ -133,26 +132,26 @@ const qr = /* @__PURE__ */ oe((e, r) => {
|
|
|
133
132
|
motionEnter: !l,
|
|
134
133
|
motionLeave: !l,
|
|
135
134
|
removeOnLeave: !0,
|
|
136
|
-
onAppearStart:
|
|
137
|
-
onAppearActive:
|
|
138
|
-
onEnterStart:
|
|
139
|
-
onEnterActive:
|
|
140
|
-
onLeaveStart:
|
|
141
|
-
onLeaveActive:
|
|
135
|
+
onAppearStart: ve,
|
|
136
|
+
onAppearActive: ye,
|
|
137
|
+
onEnterStart: ve,
|
|
138
|
+
onEnterActive: ye,
|
|
139
|
+
onLeaveStart: ye,
|
|
140
|
+
onLeaveActive: ve
|
|
142
141
|
}, (c, u) => {
|
|
143
142
|
let {
|
|
144
143
|
className: d,
|
|
145
144
|
style: g
|
|
146
145
|
} = c;
|
|
147
|
-
const
|
|
148
|
-
return /* @__PURE__ */ s.createElement(
|
|
146
|
+
const b = Object.assign(Object.assign({}, a), g);
|
|
147
|
+
return /* @__PURE__ */ s.createElement(Xe, {
|
|
149
148
|
prefixCls: r,
|
|
150
149
|
className: N(n, d),
|
|
151
|
-
style:
|
|
150
|
+
style: b,
|
|
152
151
|
ref: u
|
|
153
152
|
});
|
|
154
153
|
});
|
|
155
|
-
},
|
|
154
|
+
}, Ye = (e, r) => ({
|
|
156
155
|
// Border
|
|
157
156
|
[`> span, > ${e}`]: {
|
|
158
157
|
"&:not(:last-child)": {
|
|
@@ -170,7 +169,7 @@ const qr = /* @__PURE__ */ oe((e, r) => {
|
|
|
170
169
|
}
|
|
171
170
|
}
|
|
172
171
|
}
|
|
173
|
-
}),
|
|
172
|
+
}), Xr = (e) => {
|
|
174
173
|
const {
|
|
175
174
|
componentCls: r,
|
|
176
175
|
fontSize: t,
|
|
@@ -218,14 +217,14 @@ const qr = /* @__PURE__ */ oe((e, r) => {
|
|
|
218
217
|
Ye(`${r}-danger`, a)
|
|
219
218
|
]
|
|
220
219
|
};
|
|
221
|
-
}
|
|
222
|
-
var
|
|
220
|
+
};
|
|
221
|
+
var Yr = ["b"], Ur = ["v"], Se = function(r) {
|
|
223
222
|
return Math.round(Number(r || 0));
|
|
224
|
-
},
|
|
223
|
+
}, Jr = function(r) {
|
|
225
224
|
if (r instanceof Je)
|
|
226
225
|
return r;
|
|
227
226
|
if (r && yr(r) === "object" && "h" in r && "b" in r) {
|
|
228
|
-
var t = r, o = t.b, n = Ue(t,
|
|
227
|
+
var t = r, o = t.b, n = Ue(t, Yr);
|
|
229
228
|
return w(w({}, n), {}, {
|
|
230
229
|
v: o
|
|
231
230
|
});
|
|
@@ -235,28 +234,28 @@ var Zr = ["b"], Kr = ["v"], xe = function(r) {
|
|
|
235
234
|
Hr(t, e);
|
|
236
235
|
var r = Or(t);
|
|
237
236
|
function t(o) {
|
|
238
|
-
return Ke(this, t), r.call(this,
|
|
237
|
+
return Ke(this, t), r.call(this, Jr(o));
|
|
239
238
|
}
|
|
240
239
|
return ke(t, [{
|
|
241
240
|
key: "toHsbString",
|
|
242
241
|
value: function() {
|
|
243
|
-
var n = this.toHsb(), a =
|
|
242
|
+
var n = this.toHsb(), a = Se(n.s * 100), l = Se(n.b * 100), i = Se(n.h), c = n.a, u = "hsb(".concat(i, ", ").concat(a, "%, ").concat(l, "%)"), d = "hsba(".concat(i, ", ").concat(a, "%, ").concat(l, "%, ").concat(c.toFixed(c === 0 ? 0 : 2), ")");
|
|
244
243
|
return c === 1 ? u : d;
|
|
245
244
|
}
|
|
246
245
|
}, {
|
|
247
246
|
key: "toHsb",
|
|
248
247
|
value: function() {
|
|
249
|
-
var n = this.toHsv(), a = n.v, l = Ue(n,
|
|
248
|
+
var n = this.toHsv(), a = n.v, l = Ue(n, Ur);
|
|
250
249
|
return w(w({}, l), {}, {
|
|
251
250
|
b: a,
|
|
252
251
|
a: this.a
|
|
253
252
|
});
|
|
254
253
|
}
|
|
255
254
|
}]), t;
|
|
256
|
-
}(Je),
|
|
255
|
+
}(Je), Qr = "rc-color-picker", X = function(r) {
|
|
257
256
|
return r instanceof D ? r : new D(r);
|
|
258
|
-
},
|
|
259
|
-
var t = r.offset, o = r.targetRef, n = r.containerRef, a = r.color, l = r.type, i = n.current.getBoundingClientRect(), c = i.width, u = i.height, d = o.current.getBoundingClientRect(), g = d.width,
|
|
257
|
+
}, Zr = X("#1677ff"), or = function(r) {
|
|
258
|
+
var t = r.offset, o = r.targetRef, n = r.containerRef, a = r.color, l = r.type, i = n.current.getBoundingClientRect(), c = i.width, u = i.height, d = o.current.getBoundingClientRect(), g = d.width, b = d.height, m = g / 2, C = b / 2, y = (t.x + m) / c, E = 1 - (t.y + C) / u, H = a.toHsb(), B = y, S = (t.x + m) / c * 360;
|
|
260
259
|
if (l)
|
|
261
260
|
switch (l) {
|
|
262
261
|
case "hue":
|
|
@@ -293,7 +292,7 @@ var Zr = ["b"], Kr = ["v"], xe = function(r) {
|
|
|
293
292
|
y: (1 - o.b) * 100
|
|
294
293
|
};
|
|
295
294
|
}
|
|
296
|
-
},
|
|
295
|
+
}, Kr = function(r) {
|
|
297
296
|
var t = r.color, o = r.prefixCls, n = r.className, a = r.style, l = r.onClick, i = "".concat(o, "-color-block");
|
|
298
297
|
return /* @__PURE__ */ s.createElement("div", {
|
|
299
298
|
className: N(i, n),
|
|
@@ -306,7 +305,7 @@ var Zr = ["b"], Kr = ["v"], xe = function(r) {
|
|
|
306
305
|
}
|
|
307
306
|
}));
|
|
308
307
|
};
|
|
309
|
-
function
|
|
308
|
+
function kr(e) {
|
|
310
309
|
var r = "touches" in e ? e.touches[0] : e, t = document.documentElement.scrollLeft || document.body.scrollLeft || window.pageXOffset, o = document.documentElement.scrollTop || document.body.scrollTop || window.pageYOffset;
|
|
311
310
|
return {
|
|
312
311
|
pageX: r.pageX - t,
|
|
@@ -314,38 +313,38 @@ function ot(e) {
|
|
|
314
313
|
};
|
|
315
314
|
}
|
|
316
315
|
function ar(e) {
|
|
317
|
-
var r = e.targetRef, t = e.containerRef, o = e.direction, n = e.onDragChange, a = e.onDragChangeComplete, l = e.calculate, i = e.color, c = e.disabledDrag, u =
|
|
316
|
+
var r = e.targetRef, t = e.containerRef, o = e.direction, n = e.onDragChange, a = e.onDragChangeComplete, l = e.calculate, i = e.color, c = e.disabledDrag, u = xe({
|
|
318
317
|
x: 0,
|
|
319
318
|
y: 0
|
|
320
|
-
}), d =
|
|
319
|
+
}), d = Y(u, 2), g = d[0], b = d[1], m = j(null), C = j(null);
|
|
321
320
|
k(function() {
|
|
322
|
-
|
|
321
|
+
b(l());
|
|
323
322
|
}, [i]), k(function() {
|
|
324
323
|
return function() {
|
|
325
|
-
document.removeEventListener("mousemove",
|
|
324
|
+
document.removeEventListener("mousemove", m.current), document.removeEventListener("mouseup", C.current), document.removeEventListener("touchmove", m.current), document.removeEventListener("touchend", C.current), m.current = null, C.current = null;
|
|
326
325
|
};
|
|
327
326
|
}, []);
|
|
328
|
-
var y = function(
|
|
329
|
-
var
|
|
327
|
+
var y = function(f) {
|
|
328
|
+
var h = kr(f), U = h.pageX, J = h.pageY, O = t.current.getBoundingClientRect(), G = O.x, T = O.y, Q = O.width, F = O.height, L = r.current.getBoundingClientRect(), z = L.width, R = L.height, V = z / 2, M = R / 2, P = Math.max(0, Math.min(U - G, Q)) - V, p = Math.max(0, Math.min(J - T, F)) - M, x = {
|
|
330
329
|
x: P,
|
|
331
|
-
y: o === "x" ? g.y :
|
|
330
|
+
y: o === "x" ? g.y : p
|
|
332
331
|
};
|
|
333
332
|
if (z === 0 && R === 0 || z !== R)
|
|
334
333
|
return !1;
|
|
335
334
|
n == null || n(x);
|
|
336
|
-
}, E = function(
|
|
337
|
-
|
|
338
|
-
}, H = function(
|
|
339
|
-
|
|
340
|
-
}, B = function(
|
|
341
|
-
document.removeEventListener("mousemove",
|
|
335
|
+
}, E = function(f) {
|
|
336
|
+
f.preventDefault(), y(f);
|
|
337
|
+
}, H = function(f) {
|
|
338
|
+
f.preventDefault(), document.removeEventListener("mousemove", m.current), document.removeEventListener("mouseup", C.current), document.removeEventListener("touchmove", m.current), document.removeEventListener("touchend", C.current), m.current = null, C.current = null, a == null || a();
|
|
339
|
+
}, B = function(f) {
|
|
340
|
+
document.removeEventListener("mousemove", m.current), document.removeEventListener("mouseup", C.current), !c && (y(f), document.addEventListener("mousemove", E), document.addEventListener("mouseup", H), document.addEventListener("touchmove", E), document.addEventListener("touchend", H), m.current = E, C.current = H);
|
|
342
341
|
};
|
|
343
342
|
return [g, B];
|
|
344
343
|
}
|
|
345
344
|
var lr = function(r) {
|
|
346
345
|
var t = r.size, o = t === void 0 ? "default" : t, n = r.color, a = r.prefixCls;
|
|
347
346
|
return /* @__PURE__ */ s.createElement("div", {
|
|
348
|
-
className: N("".concat(a, "-handler"),
|
|
347
|
+
className: N("".concat(a, "-handler"), $e({}, "".concat(a, "-handler-sm"), o === "small")),
|
|
349
348
|
style: {
|
|
350
349
|
backgroundColor: n
|
|
351
350
|
}
|
|
@@ -370,8 +369,8 @@ var lr = function(r) {
|
|
|
370
369
|
transform: "translate(-50%, -50%)"
|
|
371
370
|
}
|
|
372
371
|
}, t);
|
|
373
|
-
}),
|
|
374
|
-
var t = r.color, o = r.onChange, n = r.prefixCls, a = r.onChangeComplete, l = r.disabled, i =
|
|
372
|
+
}), et = function(r) {
|
|
373
|
+
var t = r.color, o = r.onChange, n = r.prefixCls, a = r.onChangeComplete, l = r.disabled, i = j(), c = j(), u = j(t), d = er(function(y) {
|
|
375
374
|
var E = or({
|
|
376
375
|
offset: y,
|
|
377
376
|
targetRef: c,
|
|
@@ -391,17 +390,17 @@ var lr = function(r) {
|
|
|
391
390
|
return a == null ? void 0 : a(u.current);
|
|
392
391
|
},
|
|
393
392
|
disabledDrag: l
|
|
394
|
-
}),
|
|
393
|
+
}), b = Y(g, 2), m = b[0], C = b[1];
|
|
395
394
|
return /* @__PURE__ */ s.createElement("div", {
|
|
396
395
|
ref: i,
|
|
397
396
|
className: "".concat(n, "-select"),
|
|
398
|
-
onMouseDown:
|
|
399
|
-
onTouchStart:
|
|
397
|
+
onMouseDown: C,
|
|
398
|
+
onTouchStart: C
|
|
400
399
|
}, /* @__PURE__ */ s.createElement(ir, {
|
|
401
400
|
prefixCls: n
|
|
402
401
|
}, /* @__PURE__ */ s.createElement(cr, {
|
|
403
|
-
x:
|
|
404
|
-
y:
|
|
402
|
+
x: m.x,
|
|
403
|
+
y: m.y,
|
|
405
404
|
ref: c
|
|
406
405
|
}, /* @__PURE__ */ s.createElement(lr, {
|
|
407
406
|
color: t.toRgbString(),
|
|
@@ -413,14 +412,14 @@ var lr = function(r) {
|
|
|
413
412
|
backgroundImage: "linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0))"
|
|
414
413
|
}
|
|
415
414
|
})));
|
|
416
|
-
},
|
|
415
|
+
}, rt = function(r, t) {
|
|
417
416
|
var o = Sr(r, {
|
|
418
417
|
value: t
|
|
419
|
-
}), n =
|
|
418
|
+
}), n = Y(o, 2), a = n[0], l = n[1], i = ee(function() {
|
|
420
419
|
return X(a);
|
|
421
420
|
}, [a]);
|
|
422
421
|
return [i, l];
|
|
423
|
-
},
|
|
422
|
+
}, tt = function(r) {
|
|
424
423
|
var t = r.colors, o = r.children, n = r.direction, a = n === void 0 ? "to right" : n, l = r.type, i = r.prefixCls, c = ee(function() {
|
|
425
424
|
return t.map(function(u, d) {
|
|
426
425
|
var g = X(u);
|
|
@@ -435,42 +434,42 @@ var lr = function(r) {
|
|
|
435
434
|
background: "linear-gradient(".concat(a, ", ").concat(c, ")")
|
|
436
435
|
}
|
|
437
436
|
}, o);
|
|
438
|
-
},
|
|
439
|
-
var t = r.prefixCls, o = r.colors, n = r.disabled, a = r.onChange, l = r.onChangeComplete, i = r.color, c = r.type, u =
|
|
440
|
-
return c === "hue" ?
|
|
441
|
-
},
|
|
442
|
-
var
|
|
443
|
-
offset:
|
|
437
|
+
}, ot = function(r) {
|
|
438
|
+
var t = r.prefixCls, o = r.colors, n = r.disabled, a = r.onChange, l = r.onChangeComplete, i = r.color, c = r.type, u = j(), d = j(), g = j(i), b = function(h) {
|
|
439
|
+
return c === "hue" ? h.getHue() : h.a * 100;
|
|
440
|
+
}, m = er(function(f) {
|
|
441
|
+
var h = or({
|
|
442
|
+
offset: f,
|
|
444
443
|
targetRef: d,
|
|
445
444
|
containerRef: u,
|
|
446
445
|
color: i,
|
|
447
446
|
type: c
|
|
448
447
|
});
|
|
449
|
-
g.current =
|
|
450
|
-
}),
|
|
448
|
+
g.current = h, a(b(h));
|
|
449
|
+
}), C = ar({
|
|
451
450
|
color: i,
|
|
452
451
|
targetRef: d,
|
|
453
452
|
containerRef: u,
|
|
454
453
|
calculate: function() {
|
|
455
454
|
return nr(i, c);
|
|
456
455
|
},
|
|
457
|
-
onDragChange:
|
|
456
|
+
onDragChange: m,
|
|
458
457
|
onDragChangeComplete: function() {
|
|
459
|
-
l(
|
|
458
|
+
l(b(g.current));
|
|
460
459
|
},
|
|
461
460
|
direction: "x",
|
|
462
461
|
disabledDrag: n
|
|
463
|
-
}), y =
|
|
462
|
+
}), y = Y(C, 2), E = y[0], H = y[1], B = s.useMemo(function() {
|
|
464
463
|
if (c === "hue") {
|
|
465
|
-
var
|
|
466
|
-
|
|
467
|
-
var
|
|
468
|
-
return
|
|
464
|
+
var f = i.toHsb();
|
|
465
|
+
f.s = 1, f.b = 1, f.a = 1;
|
|
466
|
+
var h = new D(f);
|
|
467
|
+
return h;
|
|
469
468
|
}
|
|
470
469
|
return i;
|
|
471
470
|
}, [i, c]), S = s.useMemo(function() {
|
|
472
|
-
return o.map(function(
|
|
473
|
-
return "".concat(
|
|
471
|
+
return o.map(function(f) {
|
|
472
|
+
return "".concat(f.color, " ").concat(f.percent, "%");
|
|
474
473
|
});
|
|
475
474
|
}, [o]);
|
|
476
475
|
return /* @__PURE__ */ s.createElement("div", {
|
|
@@ -488,19 +487,19 @@ var lr = function(r) {
|
|
|
488
487
|
size: "small",
|
|
489
488
|
color: B.toHexString(),
|
|
490
489
|
prefixCls: t
|
|
491
|
-
})), /* @__PURE__ */ s.createElement(
|
|
490
|
+
})), /* @__PURE__ */ s.createElement(tt, {
|
|
492
491
|
colors: S,
|
|
493
492
|
type: c,
|
|
494
493
|
prefixCls: t
|
|
495
494
|
})));
|
|
496
495
|
};
|
|
497
|
-
function
|
|
498
|
-
return
|
|
496
|
+
function nt(e) {
|
|
497
|
+
return q.useMemo(function() {
|
|
499
498
|
var r = e || {}, t = r.slider;
|
|
500
|
-
return [t ||
|
|
499
|
+
return [t || ot];
|
|
501
500
|
}, [e]);
|
|
502
501
|
}
|
|
503
|
-
var
|
|
502
|
+
var at = [{
|
|
504
503
|
color: "rgb(255, 0, 0)",
|
|
505
504
|
percent: 0
|
|
506
505
|
}, {
|
|
@@ -521,65 +520,65 @@ var st = [{
|
|
|
521
520
|
}, {
|
|
522
521
|
color: "rgb(255, 0, 0)",
|
|
523
522
|
percent: 100
|
|
524
|
-
}],
|
|
525
|
-
var t = e.value, o = e.defaultValue, n = e.prefixCls, a = n === void 0 ?
|
|
526
|
-
return
|
|
527
|
-
}, [
|
|
528
|
-
t ||
|
|
529
|
-
}, G = function(
|
|
530
|
-
return new D(
|
|
531
|
-
}, T = function(
|
|
532
|
-
return new D(
|
|
533
|
-
},
|
|
534
|
-
O(G(
|
|
523
|
+
}], lt = /* @__PURE__ */ oe(function(e, r) {
|
|
524
|
+
var t = e.value, o = e.defaultValue, n = e.prefixCls, a = n === void 0 ? Qr : n, l = e.onChange, i = e.onChangeComplete, c = e.className, u = e.style, d = e.panelRender, g = e.disabledAlpha, b = g === void 0 ? !1 : g, m = e.disabled, C = m === void 0 ? !1 : m, y = e.components, E = nt(y), H = Y(E, 1), B = H[0], S = rt(o || Zr, t), f = Y(S, 2), h = f[0], U = f[1], J = ee(function() {
|
|
525
|
+
return h.setA(1).toRgbString();
|
|
526
|
+
}, [h]), O = function(p, x) {
|
|
527
|
+
t || U(p), l == null || l(p, x);
|
|
528
|
+
}, G = function(p) {
|
|
529
|
+
return new D(h.setHue(p));
|
|
530
|
+
}, T = function(p) {
|
|
531
|
+
return new D(h.setA(p / 100));
|
|
532
|
+
}, Q = function(p) {
|
|
533
|
+
O(G(p), {
|
|
535
534
|
type: "hue",
|
|
536
|
-
value:
|
|
535
|
+
value: p
|
|
537
536
|
});
|
|
538
|
-
}, F = function(
|
|
539
|
-
O(T(
|
|
537
|
+
}, F = function(p) {
|
|
538
|
+
O(T(p), {
|
|
540
539
|
type: "alpha",
|
|
541
|
-
value:
|
|
540
|
+
value: p
|
|
542
541
|
});
|
|
543
|
-
}, L = function(
|
|
544
|
-
i && i(G(
|
|
545
|
-
}, z = function(
|
|
546
|
-
i && i(T(
|
|
547
|
-
}, R = N("".concat(a, "-panel"), c,
|
|
542
|
+
}, L = function(p) {
|
|
543
|
+
i && i(G(p));
|
|
544
|
+
}, z = function(p) {
|
|
545
|
+
i && i(T(p));
|
|
546
|
+
}, R = N("".concat(a, "-panel"), c, $e({}, "".concat(a, "-panel-disabled"), C)), V = {
|
|
548
547
|
prefixCls: a,
|
|
549
|
-
disabled:
|
|
550
|
-
color:
|
|
551
|
-
}, M = /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement(
|
|
548
|
+
disabled: C,
|
|
549
|
+
color: h
|
|
550
|
+
}, M = /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement(et, be({
|
|
552
551
|
onChange: O
|
|
553
552
|
}, V, {
|
|
554
553
|
onChangeComplete: i
|
|
555
554
|
})), /* @__PURE__ */ s.createElement("div", {
|
|
556
555
|
className: "".concat(a, "-slider-container")
|
|
557
556
|
}, /* @__PURE__ */ s.createElement("div", {
|
|
558
|
-
className: N("".concat(a, "-slider-group"),
|
|
557
|
+
className: N("".concat(a, "-slider-group"), $e({}, "".concat(a, "-slider-group-disabled-alpha"), b))
|
|
559
558
|
}, /* @__PURE__ */ s.createElement(B, be({}, V, {
|
|
560
559
|
type: "hue",
|
|
561
|
-
colors:
|
|
560
|
+
colors: at,
|
|
562
561
|
min: 0,
|
|
563
562
|
max: 359,
|
|
564
|
-
value:
|
|
565
|
-
onChange:
|
|
563
|
+
value: h.getHue(),
|
|
564
|
+
onChange: Q,
|
|
566
565
|
onChangeComplete: L
|
|
567
|
-
})), !
|
|
566
|
+
})), !b && /* @__PURE__ */ s.createElement(B, be({}, V, {
|
|
568
567
|
type: "alpha",
|
|
569
568
|
colors: [{
|
|
570
569
|
percent: 0,
|
|
571
570
|
color: "rgba(255, 0, 4, 0)"
|
|
572
571
|
}, {
|
|
573
572
|
percent: 100,
|
|
574
|
-
color:
|
|
573
|
+
color: J
|
|
575
574
|
}],
|
|
576
575
|
min: 0,
|
|
577
576
|
max: 100,
|
|
578
|
-
value:
|
|
577
|
+
value: h.a * 100,
|
|
579
578
|
onChange: F,
|
|
580
579
|
onChangeComplete: z
|
|
581
|
-
}))), /* @__PURE__ */ s.createElement(
|
|
582
|
-
color:
|
|
580
|
+
}))), /* @__PURE__ */ s.createElement(Kr, {
|
|
581
|
+
color: h.toRgbString(),
|
|
583
582
|
prefixCls: a
|
|
584
583
|
})));
|
|
585
584
|
return /* @__PURE__ */ s.createElement("div", {
|
|
@@ -588,9 +587,9 @@ var st = [{
|
|
|
588
587
|
ref: r
|
|
589
588
|
}, typeof d == "function" ? d(M) : M);
|
|
590
589
|
});
|
|
591
|
-
process.env.NODE_ENV !== "production" && (
|
|
592
|
-
const
|
|
593
|
-
let
|
|
590
|
+
process.env.NODE_ENV !== "production" && (lt.displayName = "ColorPicker");
|
|
591
|
+
const it = (e, r) => (e == null ? void 0 : e.replace(/[^\w/]/g, "").slice(0, r ? 8 : 6)) || "", ct = (e, r) => e ? it(e, r) : "";
|
|
592
|
+
let st = /* @__PURE__ */ function() {
|
|
594
593
|
function e(r) {
|
|
595
594
|
Ke(this, e);
|
|
596
595
|
var t;
|
|
@@ -626,7 +625,7 @@ let mt = /* @__PURE__ */ function() {
|
|
|
626
625
|
}, {
|
|
627
626
|
key: "toHex",
|
|
628
627
|
value: function() {
|
|
629
|
-
return
|
|
628
|
+
return ct(this.toHexString(), this.metaColor.a < 1);
|
|
630
629
|
}
|
|
631
630
|
}, {
|
|
632
631
|
key: "toHexString",
|
|
@@ -674,7 +673,7 @@ let mt = /* @__PURE__ */ function() {
|
|
|
674
673
|
}
|
|
675
674
|
}]);
|
|
676
675
|
}();
|
|
677
|
-
const
|
|
676
|
+
const ut = (e, r) => {
|
|
678
677
|
const {
|
|
679
678
|
r: t,
|
|
680
679
|
g: o,
|
|
@@ -694,7 +693,7 @@ const ft = (e, r) => {
|
|
|
694
693
|
});
|
|
695
694
|
}, ur = (e) => {
|
|
696
695
|
var r, t, o, n, a, l;
|
|
697
|
-
const i = (r = e.contentFontSize) !== null && r !== void 0 ? r : e.fontSize, c = (t = e.contentFontSizeSM) !== null && t !== void 0 ? t : e.fontSize, u = (o = e.contentFontSizeLG) !== null && o !== void 0 ? o : e.fontSizeLG, d = (n = e.contentLineHeight) !== null && n !== void 0 ? n : pe(i), g = (a = e.contentLineHeightSM) !== null && a !== void 0 ? a : pe(c),
|
|
696
|
+
const i = (r = e.contentFontSize) !== null && r !== void 0 ? r : e.fontSize, c = (t = e.contentFontSizeSM) !== null && t !== void 0 ? t : e.fontSize, u = (o = e.contentFontSizeLG) !== null && o !== void 0 ? o : e.fontSizeLG, d = (n = e.contentLineHeight) !== null && n !== void 0 ? n : pe(i), g = (a = e.contentLineHeightSM) !== null && a !== void 0 ? a : pe(c), b = (l = e.contentLineHeightLG) !== null && l !== void 0 ? l : pe(u), m = ut(new st(e.colorBgSolid), "#fff") ? "#000" : "#fff";
|
|
698
697
|
return {
|
|
699
698
|
fontWeight: 400,
|
|
700
699
|
defaultShadow: `0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,
|
|
@@ -728,18 +727,18 @@ const ft = (e, r) => {
|
|
|
728
727
|
defaultActiveBg: e.colorBgContainer,
|
|
729
728
|
defaultActiveColor: e.colorPrimaryActive,
|
|
730
729
|
defaultActiveBorderColor: e.colorPrimaryActive,
|
|
731
|
-
solidTextColor:
|
|
730
|
+
solidTextColor: m,
|
|
732
731
|
contentFontSize: i,
|
|
733
732
|
contentFontSizeSM: c,
|
|
734
733
|
contentFontSizeLG: u,
|
|
735
734
|
contentLineHeight: d,
|
|
736
735
|
contentLineHeightSM: g,
|
|
737
|
-
contentLineHeightLG:
|
|
736
|
+
contentLineHeightLG: b,
|
|
738
737
|
paddingBlock: Math.max((e.controlHeight - i * d) / 2 - e.lineWidth, 0),
|
|
739
738
|
paddingBlockSM: Math.max((e.controlHeightSM - c * g) / 2 - e.lineWidth, 0),
|
|
740
|
-
paddingBlockLG: Math.max((e.controlHeightLG - u *
|
|
739
|
+
paddingBlockLG: Math.max((e.controlHeightLG - u * b) / 2 - e.lineWidth, 0)
|
|
741
740
|
};
|
|
742
|
-
},
|
|
741
|
+
}, dt = (e) => {
|
|
743
742
|
const {
|
|
744
743
|
componentCls: r,
|
|
745
744
|
iconCls: t,
|
|
@@ -844,22 +843,22 @@ const ft = (e, r) => {
|
|
|
844
843
|
"&:hover": r,
|
|
845
844
|
"&:active": t
|
|
846
845
|
}
|
|
847
|
-
}),
|
|
846
|
+
}), gt = (e) => ({
|
|
848
847
|
minWidth: e.controlHeight,
|
|
849
848
|
paddingInlineStart: 0,
|
|
850
849
|
paddingInlineEnd: 0,
|
|
851
850
|
borderRadius: "50%"
|
|
852
|
-
}),
|
|
851
|
+
}), ft = (e) => ({
|
|
853
852
|
borderRadius: e.controlHeight,
|
|
854
853
|
paddingInlineStart: e.calc(e.controlHeight).div(2).equal(),
|
|
855
854
|
paddingInlineEnd: e.calc(e.controlHeight).div(2).equal()
|
|
856
|
-
}),
|
|
855
|
+
}), mt = (e) => ({
|
|
857
856
|
cursor: "not-allowed",
|
|
858
857
|
borderColor: e.borderColorDisabled,
|
|
859
858
|
color: e.colorTextDisabled,
|
|
860
859
|
background: e.colorBgContainerDisabled,
|
|
861
860
|
boxShadow: "none"
|
|
862
|
-
}),
|
|
861
|
+
}), He = (e, r, t, o, n, a, l, i) => ({
|
|
863
862
|
[`&${e}-background-ghost`]: Object.assign(Object.assign({
|
|
864
863
|
color: t || void 0,
|
|
865
864
|
background: r,
|
|
@@ -876,15 +875,15 @@ const ft = (e, r) => {
|
|
|
876
875
|
borderColor: a || void 0
|
|
877
876
|
}
|
|
878
877
|
})
|
|
879
|
-
}),
|
|
880
|
-
[`&:disabled, &${e.componentCls}-disabled`]: Object.assign({},
|
|
881
|
-
}),
|
|
878
|
+
}), Ct = (e) => ({
|
|
879
|
+
[`&:disabled, &${e.componentCls}-disabled`]: Object.assign({}, mt(e))
|
|
880
|
+
}), ht = (e) => ({
|
|
882
881
|
[`&:disabled, &${e.componentCls}-disabled`]: {
|
|
883
882
|
cursor: "not-allowed",
|
|
884
883
|
color: e.colorTextDisabled
|
|
885
884
|
}
|
|
886
885
|
}), ae = (e, r, t, o) => {
|
|
887
|
-
const a = o && ["link", "text"].includes(o) ?
|
|
886
|
+
const a = o && ["link", "text"].includes(o) ? ht : Ct;
|
|
888
887
|
return Object.assign(Object.assign({}, a(e)), dr(e.componentCls, r, t));
|
|
889
888
|
}, le = (e, r, t, o, n) => ({
|
|
890
889
|
[`&${e.componentCls}-variant-solid`]: Object.assign({
|
|
@@ -910,7 +909,7 @@ const ft = (e, r) => {
|
|
|
910
909
|
color: r,
|
|
911
910
|
boxShadow: "none"
|
|
912
911
|
}, ae(e, o, n, t))
|
|
913
|
-
}),
|
|
912
|
+
}), bt = (e) => {
|
|
914
913
|
const {
|
|
915
914
|
componentCls: r
|
|
916
915
|
} = e;
|
|
@@ -949,7 +948,7 @@ const ft = (e, r) => {
|
|
|
949
948
|
}))
|
|
950
949
|
});
|
|
951
950
|
}, {});
|
|
952
|
-
},
|
|
951
|
+
}, pt = (e) => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
|
|
953
952
|
color: e.defaultColor,
|
|
954
953
|
boxShadow: e.defaultShadow
|
|
955
954
|
}, le(e, e.solidTextColor, e.colorBgSolid, {
|
|
@@ -967,7 +966,7 @@ const ft = (e, r) => {
|
|
|
967
966
|
background: e.linkHoverBg
|
|
968
967
|
}, {
|
|
969
968
|
color: e.colorLinkActive
|
|
970
|
-
})),
|
|
969
|
+
})), He(e.componentCls, e.ghostBg, e.defaultGhostColor, e.defaultGhostBorderColor, e.colorTextDisabled, e.colorBorder)), vt = (e) => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
|
|
971
970
|
color: e.colorPrimary,
|
|
972
971
|
boxShadow: e.primaryShadow
|
|
973
972
|
}, ie(e, e.colorPrimary, e.colorBgContainer, {
|
|
@@ -988,13 +987,13 @@ const ft = (e, r) => {
|
|
|
988
987
|
}, {
|
|
989
988
|
color: e.colorPrimaryTextActive,
|
|
990
989
|
background: e.colorPrimaryBorder
|
|
991
|
-
})),
|
|
990
|
+
})), He(e.componentCls, e.ghostBg, e.colorPrimary, e.colorPrimary, e.colorTextDisabled, e.colorBorder, {
|
|
992
991
|
color: e.colorPrimaryHover,
|
|
993
992
|
borderColor: e.colorPrimaryHover
|
|
994
993
|
}, {
|
|
995
994
|
color: e.colorPrimaryActive,
|
|
996
995
|
borderColor: e.colorPrimaryActive
|
|
997
|
-
})),
|
|
996
|
+
})), yt = (e) => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
|
|
998
997
|
color: e.colorError,
|
|
999
998
|
boxShadow: e.dangerShadow
|
|
1000
999
|
}, le(e, e.dangerColor, e.colorError, {
|
|
@@ -1021,22 +1020,22 @@ const ft = (e, r) => {
|
|
|
1021
1020
|
color: e.colorErrorHover
|
|
1022
1021
|
}, {
|
|
1023
1022
|
color: e.colorErrorActive
|
|
1024
|
-
})),
|
|
1023
|
+
})), He(e.componentCls, e.ghostBg, e.colorError, e.colorError, e.colorTextDisabled, e.colorBorder, {
|
|
1025
1024
|
color: e.colorErrorHover,
|
|
1026
1025
|
borderColor: e.colorErrorHover
|
|
1027
1026
|
}, {
|
|
1028
1027
|
color: e.colorErrorActive,
|
|
1029
1028
|
borderColor: e.colorErrorActive
|
|
1030
|
-
})),
|
|
1029
|
+
})), St = (e) => {
|
|
1031
1030
|
const {
|
|
1032
1031
|
componentCls: r
|
|
1033
1032
|
} = e;
|
|
1034
1033
|
return Object.assign({
|
|
1035
|
-
[`${r}-color-default`]:
|
|
1036
|
-
[`${r}-color-primary`]:
|
|
1037
|
-
[`${r}-color-dangerous`]:
|
|
1038
|
-
},
|
|
1039
|
-
},
|
|
1034
|
+
[`${r}-color-default`]: pt(e),
|
|
1035
|
+
[`${r}-color-primary`]: vt(e),
|
|
1036
|
+
[`${r}-color-dangerous`]: yt(e)
|
|
1037
|
+
}, bt(e));
|
|
1038
|
+
}, xt = (e) => Object.assign(Object.assign(Object.assign(Object.assign({}, ie(e, e.defaultBorderColor, e.defaultBg, {
|
|
1040
1039
|
color: e.defaultHoverColor,
|
|
1041
1040
|
borderColor: e.defaultHoverBorderColor,
|
|
1042
1041
|
background: e.defaultHoverBg
|
|
@@ -1061,7 +1060,7 @@ const ft = (e, r) => {
|
|
|
1061
1060
|
background: e.linkHoverBg
|
|
1062
1061
|
}, {
|
|
1063
1062
|
color: e.colorLinkActive
|
|
1064
|
-
})),
|
|
1063
|
+
})), Oe = function(e) {
|
|
1065
1064
|
let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
1066
1065
|
const {
|
|
1067
1066
|
componentCls: t,
|
|
@@ -1090,18 +1089,18 @@ const ft = (e, r) => {
|
|
|
1090
1089
|
},
|
|
1091
1090
|
// Shape - patch prefixCls again to override solid border radius style
|
|
1092
1091
|
{
|
|
1093
|
-
[`${t}${t}-circle${r}`]:
|
|
1092
|
+
[`${t}${t}-circle${r}`]: gt(e)
|
|
1094
1093
|
},
|
|
1095
1094
|
{
|
|
1096
|
-
[`${t}${t}-round${r}`]:
|
|
1095
|
+
[`${t}${t}-round${r}`]: ft(e)
|
|
1097
1096
|
}
|
|
1098
1097
|
];
|
|
1099
|
-
},
|
|
1098
|
+
}, $t = (e) => {
|
|
1100
1099
|
const r = ne(e, {
|
|
1101
1100
|
fontSize: e.contentFontSize
|
|
1102
1101
|
});
|
|
1103
|
-
return
|
|
1104
|
-
},
|
|
1102
|
+
return Oe(r, e.componentCls);
|
|
1103
|
+
}, Et = (e) => {
|
|
1105
1104
|
const r = ne(e, {
|
|
1106
1105
|
controlHeight: e.controlHeightSM,
|
|
1107
1106
|
fontSize: e.contentFontSizeSM,
|
|
@@ -1111,8 +1110,8 @@ const ft = (e, r) => {
|
|
|
1111
1110
|
borderRadius: e.borderRadiusSM,
|
|
1112
1111
|
buttonIconOnlyFontSize: e.onlyIconSizeSM
|
|
1113
1112
|
});
|
|
1114
|
-
return
|
|
1115
|
-
},
|
|
1113
|
+
return Oe(r, `${e.componentCls}-sm`);
|
|
1114
|
+
}, Bt = (e) => {
|
|
1116
1115
|
const r = ne(e, {
|
|
1117
1116
|
controlHeight: e.controlHeightLG,
|
|
1118
1117
|
fontSize: e.contentFontSizeLG,
|
|
@@ -1121,8 +1120,8 @@ const ft = (e, r) => {
|
|
|
1121
1120
|
borderRadius: e.borderRadiusLG,
|
|
1122
1121
|
buttonIconOnlyFontSize: e.onlyIconSizeLG
|
|
1123
1122
|
});
|
|
1124
|
-
return
|
|
1125
|
-
},
|
|
1123
|
+
return Oe(r, `${e.componentCls}-lg`);
|
|
1124
|
+
}, Ht = (e) => {
|
|
1126
1125
|
const {
|
|
1127
1126
|
componentCls: r
|
|
1128
1127
|
} = e;
|
|
@@ -1133,23 +1132,23 @@ const ft = (e, r) => {
|
|
|
1133
1132
|
}
|
|
1134
1133
|
}
|
|
1135
1134
|
};
|
|
1136
|
-
},
|
|
1135
|
+
}, Ot = Rr("Button", (e) => {
|
|
1137
1136
|
const r = sr(e);
|
|
1138
1137
|
return [
|
|
1139
1138
|
// Shared
|
|
1140
|
-
|
|
1139
|
+
dt(r),
|
|
1141
1140
|
// Size
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1141
|
+
$t(r),
|
|
1142
|
+
Et(r),
|
|
1143
|
+
Bt(r),
|
|
1145
1144
|
// Block
|
|
1146
|
-
|
|
1145
|
+
Ht(r),
|
|
1147
1146
|
// Color
|
|
1148
|
-
|
|
1147
|
+
St(r),
|
|
1149
1148
|
// https://github.com/ant-design/ant-design/issues/50969
|
|
1150
|
-
|
|
1149
|
+
xt(r),
|
|
1151
1150
|
// Button Group
|
|
1152
|
-
|
|
1151
|
+
Xr(r)
|
|
1153
1152
|
];
|
|
1154
1153
|
}, ur, {
|
|
1155
1154
|
unitless: {
|
|
@@ -1159,7 +1158,7 @@ const ft = (e, r) => {
|
|
|
1159
1158
|
contentLineHeightLG: !0
|
|
1160
1159
|
}
|
|
1161
1160
|
});
|
|
1162
|
-
function
|
|
1161
|
+
function Rt(e, r) {
|
|
1163
1162
|
return {
|
|
1164
1163
|
// border collapse
|
|
1165
1164
|
[`&-item:not(${r}-last-item)`]: {
|
|
@@ -1175,7 +1174,7 @@ function jt(e, r) {
|
|
|
1175
1174
|
}
|
|
1176
1175
|
};
|
|
1177
1176
|
}
|
|
1178
|
-
function
|
|
1177
|
+
function Nt(e, r) {
|
|
1179
1178
|
return {
|
|
1180
1179
|
[`&-item:not(${r}-first-item):not(${r}-last-item)`]: {
|
|
1181
1180
|
borderRadius: 0
|
|
@@ -1194,13 +1193,13 @@ function wt(e, r) {
|
|
|
1194
1193
|
}
|
|
1195
1194
|
};
|
|
1196
1195
|
}
|
|
1197
|
-
function
|
|
1196
|
+
function Pt(e) {
|
|
1198
1197
|
const r = `${e.componentCls}-compact-vertical`;
|
|
1199
1198
|
return {
|
|
1200
|
-
[r]: Object.assign(Object.assign({},
|
|
1199
|
+
[r]: Object.assign(Object.assign({}, Rt(e, r)), Nt(e.componentCls, r))
|
|
1201
1200
|
};
|
|
1202
1201
|
}
|
|
1203
|
-
const
|
|
1202
|
+
const jt = (e) => {
|
|
1204
1203
|
const {
|
|
1205
1204
|
componentCls: r,
|
|
1206
1205
|
colorPrimaryHover: t,
|
|
@@ -1221,25 +1220,23 @@ const Tt = (e) => {
|
|
|
1221
1220
|
};
|
|
1222
1221
|
};
|
|
1223
1222
|
return Object.assign(Object.assign({}, l()), l(!0));
|
|
1224
|
-
},
|
|
1223
|
+
}, It = jr(["Button", "compact"], (e) => {
|
|
1225
1224
|
const r = sr(e);
|
|
1226
1225
|
return [
|
|
1227
1226
|
// Space Compact
|
|
1228
1227
|
Mr(r),
|
|
1229
|
-
|
|
1230
|
-
|
|
1228
|
+
Pt(r),
|
|
1229
|
+
jt(r)
|
|
1231
1230
|
];
|
|
1232
1231
|
}, ur);
|
|
1233
|
-
var
|
|
1232
|
+
var wt = function(e, r) {
|
|
1234
1233
|
var t = {};
|
|
1235
|
-
for (var o in e)
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
for (var n = 0, o = Object.getOwnPropertySymbols(e); n < o.length; n++)
|
|
1239
|
-
r.indexOf(o[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[n]) && (t[o[n]] = e[o[n]]);
|
|
1234
|
+
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && r.indexOf(o) < 0 && (t[o] = e[o]);
|
|
1235
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var n = 0, o = Object.getOwnPropertySymbols(e); n < o.length; n++)
|
|
1236
|
+
r.indexOf(o[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[n]) && (t[o[n]] = e[o[n]]);
|
|
1240
1237
|
return t;
|
|
1241
1238
|
};
|
|
1242
|
-
function
|
|
1239
|
+
function Dt(e) {
|
|
1243
1240
|
if (typeof e == "object" && e) {
|
|
1244
1241
|
let r = e == null ? void 0 : e.delay;
|
|
1245
1242
|
return r = !Number.isNaN(r) && typeof r == "number" ? r : 0, {
|
|
@@ -1252,13 +1249,13 @@ function At(e) {
|
|
|
1252
1249
|
delay: 0
|
|
1253
1250
|
};
|
|
1254
1251
|
}
|
|
1255
|
-
const
|
|
1252
|
+
const Tt = {
|
|
1256
1253
|
default: ["default", "outlined"],
|
|
1257
1254
|
primary: ["primary", "solid"],
|
|
1258
1255
|
dashed: ["default", "dashed"],
|
|
1259
1256
|
link: ["primary", "link"],
|
|
1260
1257
|
text: ["default", "text"]
|
|
1261
|
-
},
|
|
1258
|
+
}, Lt = /* @__PURE__ */ s.forwardRef((e, r) => {
|
|
1262
1259
|
var t, o, n, a;
|
|
1263
1260
|
const {
|
|
1264
1261
|
loading: l = !1,
|
|
@@ -1267,133 +1264,132 @@ const _t = {
|
|
|
1267
1264
|
variant: u,
|
|
1268
1265
|
type: d,
|
|
1269
1266
|
danger: g = !1,
|
|
1270
|
-
shape:
|
|
1271
|
-
size:
|
|
1272
|
-
styles:
|
|
1267
|
+
shape: b = "default",
|
|
1268
|
+
size: m,
|
|
1269
|
+
styles: C,
|
|
1273
1270
|
disabled: y,
|
|
1274
1271
|
className: E,
|
|
1275
1272
|
rootClassName: H,
|
|
1276
1273
|
children: B,
|
|
1277
1274
|
icon: S,
|
|
1278
|
-
iconPosition:
|
|
1279
|
-
ghost:
|
|
1280
|
-
block:
|
|
1275
|
+
iconPosition: f = "start",
|
|
1276
|
+
ghost: h = !1,
|
|
1277
|
+
block: U = !1,
|
|
1281
1278
|
// React does not recognize the `htmlType` prop on a DOM element. Here we pick it out of `rest`.
|
|
1282
|
-
htmlType:
|
|
1279
|
+
htmlType: J = "button",
|
|
1283
1280
|
classNames: O,
|
|
1284
1281
|
style: G = {},
|
|
1285
1282
|
autoInsertSpace: T,
|
|
1286
|
-
autoFocus:
|
|
1287
|
-
} = e, F =
|
|
1283
|
+
autoFocus: Q
|
|
1284
|
+
} = e, F = wt(e, ["loading", "prefixCls", "color", "variant", "type", "danger", "shape", "size", "styles", "disabled", "className", "rootClassName", "children", "icon", "iconPosition", "ghost", "block", "htmlType", "classNames", "style", "autoInsertSpace", "autoFocus"]), L = d || "default", [z, R] = ee(() => {
|
|
1288
1285
|
if (c && u)
|
|
1289
1286
|
return [c, u];
|
|
1290
|
-
const $ =
|
|
1287
|
+
const $ = Tt[L] || [];
|
|
1291
1288
|
return g ? ["danger", $[1]] : $;
|
|
1292
1289
|
}, [d, c, u, g]), M = z === "danger" ? "dangerous" : z, {
|
|
1293
1290
|
getPrefixCls: P,
|
|
1294
|
-
direction:
|
|
1291
|
+
direction: p,
|
|
1295
1292
|
button: x
|
|
1296
|
-
} = he(Qe),
|
|
1297
|
-
s.useEffect(() => (
|
|
1298
|
-
|
|
1293
|
+
} = he(Qe), ue = (t = T ?? (x == null ? void 0 : x.autoInsertSpace)) !== null && t !== void 0 ? t : !0, v = P("btn", i), [Ne, gr, fr] = Ot(v), mr = he(Ir), W = y ?? mr, Cr = he(tr), Z = ee(() => Dt(l), [l]), [A, Pe] = xe(Z.loading), [de, je] = xe(!1), K = j(null), Ie = wr(r, K), we = vr.count(B) === 1 && !S && !re(R), ge = j(!0);
|
|
1294
|
+
s.useEffect(() => (ge.current = !1, () => {
|
|
1295
|
+
ge.current = !0;
|
|
1299
1296
|
}), []), k(() => {
|
|
1300
1297
|
let $ = null;
|
|
1301
|
-
|
|
1298
|
+
Z.delay > 0 ? $ = setTimeout(() => {
|
|
1302
1299
|
$ = null, Pe(!0);
|
|
1303
|
-
},
|
|
1304
|
-
function
|
|
1300
|
+
}, Z.delay) : Pe(Z.loading);
|
|
1301
|
+
function I() {
|
|
1305
1302
|
$ && (clearTimeout($), $ = null);
|
|
1306
1303
|
}
|
|
1307
|
-
return
|
|
1308
|
-
}, [
|
|
1309
|
-
if (!
|
|
1304
|
+
return I;
|
|
1305
|
+
}, [Z]), k(() => {
|
|
1306
|
+
if (!K.current || !ue)
|
|
1310
1307
|
return;
|
|
1311
|
-
const $ =
|
|
1312
|
-
we &&
|
|
1308
|
+
const $ = K.current.textContent || "";
|
|
1309
|
+
we && Ee($) ? de || je(!0) : de && je(!1);
|
|
1313
1310
|
}), k(() => {
|
|
1314
|
-
|
|
1311
|
+
Q && K.current && K.current.focus();
|
|
1315
1312
|
}, []);
|
|
1316
1313
|
const De = s.useCallback(($) => {
|
|
1317
|
-
var
|
|
1314
|
+
var I;
|
|
1318
1315
|
if (A || W) {
|
|
1319
1316
|
$.preventDefault();
|
|
1320
1317
|
return;
|
|
1321
1318
|
}
|
|
1322
|
-
(
|
|
1319
|
+
(I = e.onClick) === null || I === void 0 || I.call(e, $);
|
|
1323
1320
|
}, [e.onClick, A, W]);
|
|
1324
1321
|
if (process.env.NODE_ENV !== "production") {
|
|
1325
1322
|
const $ = Ze("Button");
|
|
1326
|
-
process.env.NODE_ENV !== "production" && $(!(typeof S == "string" && S.length > 2), "breaking", `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${S}\` at https://ant.design/components/icon`), process.env.NODE_ENV !== "production" && $(!(
|
|
1323
|
+
process.env.NODE_ENV !== "production" && $(!(typeof S == "string" && S.length > 2), "breaking", `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${S}\` at https://ant.design/components/icon`), process.env.NODE_ENV !== "production" && $(!(h && re(R)), "usage", "`link` or `text` button can't be a `ghost` button.");
|
|
1327
1324
|
}
|
|
1328
1325
|
const {
|
|
1329
|
-
compactSize:
|
|
1326
|
+
compactSize: hr,
|
|
1330
1327
|
compactItemClassnames: Te
|
|
1331
|
-
} = Tr(
|
|
1328
|
+
} = Tr(v, p), br = {
|
|
1332
1329
|
large: "lg",
|
|
1333
1330
|
small: "sm",
|
|
1334
1331
|
middle: void 0
|
|
1335
1332
|
}, Le = Lr(($) => {
|
|
1336
|
-
var
|
|
1337
|
-
return (Ce = (
|
|
1338
|
-
}), ze = Le && (o =
|
|
1339
|
-
[`${
|
|
1333
|
+
var I, Ce;
|
|
1334
|
+
return (Ce = (I = m ?? hr) !== null && I !== void 0 ? I : Cr) !== null && Ce !== void 0 ? Ce : $;
|
|
1335
|
+
}), ze = Le && (o = br[Le]) !== null && o !== void 0 ? o : "", pr = A ? "loading" : S, fe = xr(F, ["navigate"]), Ae = N(v, gr, fr, {
|
|
1336
|
+
[`${v}-${b}`]: b !== "default" && b,
|
|
1340
1337
|
// line(253 - 254): Compatible with versions earlier than 5.21.0
|
|
1341
|
-
[`${
|
|
1342
|
-
[`${
|
|
1343
|
-
[`${
|
|
1344
|
-
[`${
|
|
1345
|
-
[`${
|
|
1346
|
-
[`${
|
|
1347
|
-
[`${
|
|
1348
|
-
[`${
|
|
1349
|
-
[`${
|
|
1350
|
-
[`${
|
|
1351
|
-
[`${
|
|
1352
|
-
[`${
|
|
1353
|
-
}, Te, E, H, x == null ? void 0 : x.className), _e = Object.assign(Object.assign({}, x == null ? void 0 : x.style), G), Me = N(O == null ? void 0 : O.icon, (n = x == null ? void 0 : x.classNames) === null || n === void 0 ? void 0 : n.icon), Ge = Object.assign(Object.assign({}, (
|
|
1354
|
-
prefixCls:
|
|
1338
|
+
[`${v}-${L}`]: L,
|
|
1339
|
+
[`${v}-dangerous`]: g,
|
|
1340
|
+
[`${v}-color-${M}`]: M,
|
|
1341
|
+
[`${v}-variant-${R}`]: R,
|
|
1342
|
+
[`${v}-${ze}`]: ze,
|
|
1343
|
+
[`${v}-icon-only`]: !B && B !== 0 && !!pr,
|
|
1344
|
+
[`${v}-background-ghost`]: h && !re(R),
|
|
1345
|
+
[`${v}-loading`]: A,
|
|
1346
|
+
[`${v}-two-chinese-chars`]: de && ue && !A,
|
|
1347
|
+
[`${v}-block`]: U,
|
|
1348
|
+
[`${v}-rtl`]: p === "rtl",
|
|
1349
|
+
[`${v}-icon-end`]: f === "end"
|
|
1350
|
+
}, Te, E, H, x == null ? void 0 : x.className), _e = Object.assign(Object.assign({}, x == null ? void 0 : x.style), G), Me = N(O == null ? void 0 : O.icon, (n = x == null ? void 0 : x.classNames) === null || n === void 0 ? void 0 : n.icon), Ge = Object.assign(Object.assign({}, (C == null ? void 0 : C.icon) || {}), ((a = x == null ? void 0 : x.styles) === null || a === void 0 ? void 0 : a.icon) || {}), Fe = S && !A ? /* @__PURE__ */ s.createElement(Be, {
|
|
1351
|
+
prefixCls: v,
|
|
1355
1352
|
className: Me,
|
|
1356
1353
|
style: Ge
|
|
1357
|
-
}, S) : typeof l == "object" && l.icon ? /* @__PURE__ */ s.createElement(
|
|
1358
|
-
prefixCls:
|
|
1354
|
+
}, S) : l && typeof l == "object" && l.icon ? /* @__PURE__ */ s.createElement(Be, {
|
|
1355
|
+
prefixCls: v,
|
|
1359
1356
|
className: Me,
|
|
1360
1357
|
style: Ge
|
|
1361
|
-
}, l.icon) : /* @__PURE__ */ s.createElement(
|
|
1358
|
+
}, l.icon) : /* @__PURE__ */ s.createElement(qr, {
|
|
1362
1359
|
existIcon: !!S,
|
|
1363
|
-
prefixCls:
|
|
1360
|
+
prefixCls: v,
|
|
1364
1361
|
loading: A,
|
|
1365
|
-
mount:
|
|
1366
|
-
}), Ve = B || B === 0 ?
|
|
1362
|
+
mount: ge.current
|
|
1363
|
+
}), Ve = B || B === 0 ? Wr(B, we && ue) : null;
|
|
1367
1364
|
if (fe.href !== void 0)
|
|
1368
1365
|
return Ne(/* @__PURE__ */ s.createElement("a", Object.assign({}, fe, {
|
|
1369
1366
|
className: N(Ae, {
|
|
1370
|
-
[`${
|
|
1367
|
+
[`${v}-disabled`]: W
|
|
1371
1368
|
}),
|
|
1372
1369
|
href: W ? void 0 : fe.href,
|
|
1373
1370
|
style: _e,
|
|
1374
1371
|
onClick: De,
|
|
1375
|
-
ref:
|
|
1372
|
+
ref: Ie,
|
|
1376
1373
|
tabIndex: W ? -1 : 0
|
|
1377
1374
|
}), Fe, Ve));
|
|
1378
|
-
let
|
|
1379
|
-
type:
|
|
1375
|
+
let me = /* @__PURE__ */ s.createElement("button", Object.assign({}, F, {
|
|
1376
|
+
type: J,
|
|
1380
1377
|
className: Ae,
|
|
1381
1378
|
style: _e,
|
|
1382
1379
|
onClick: De,
|
|
1383
1380
|
disabled: W,
|
|
1384
|
-
ref:
|
|
1385
|
-
}), Fe, Ve, Te && /* @__PURE__ */ s.createElement(
|
|
1386
|
-
prefixCls:
|
|
1381
|
+
ref: Ie
|
|
1382
|
+
}), Fe, Ve, Te && /* @__PURE__ */ s.createElement(It, {
|
|
1383
|
+
prefixCls: v
|
|
1387
1384
|
}));
|
|
1388
|
-
return re(R) || (
|
|
1385
|
+
return re(R) || (me = /* @__PURE__ */ s.createElement(Dr, {
|
|
1389
1386
|
component: "Button",
|
|
1390
1387
|
disabled: A
|
|
1391
|
-
},
|
|
1392
|
-
}),
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
process.env.NODE_ENV !== "production" && (
|
|
1396
|
-
const Qt = ue;
|
|
1388
|
+
}, me)), Ne(me);
|
|
1389
|
+
}), Re = Lt;
|
|
1390
|
+
Re.Group = Fr;
|
|
1391
|
+
Re.__ANT_BUTTON = !0;
|
|
1392
|
+
process.env.NODE_ENV !== "production" && (Re.displayName = "Button");
|
|
1397
1393
|
export {
|
|
1398
|
-
|
|
1394
|
+
Re as B
|
|
1399
1395
|
};
|