@gobolt/genesis 0.0.8 → 0.0.9
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 +35 -35
- 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,94 +1,91 @@
|
|
|
1
1
|
import * as r from "react";
|
|
2
|
-
import
|
|
3
|
-
import { _ as
|
|
4
|
-
import { _ as k, a as E, i as
|
|
5
|
-
import {
|
|
6
|
-
import { c as
|
|
7
|
-
|
|
8
|
-
var _ = te({}, U), pe = _.version, w = _.render, me = _.unmountComponentAtNode, C;
|
|
2
|
+
import L, { useContext as X, useRef as Z } from "react";
|
|
3
|
+
import { _ as ee, d as te, c as $ } from "./warning-C63HNL9U.js";
|
|
4
|
+
import { _ as k, a as E, i as ne } from "./isVisible-A-IfeFoT.js";
|
|
5
|
+
import { R as A, y as oe, z as re, A as se, w as g, B as ae, t as I, C as U, E as ue, b as ie, s as ce, h as le } from "./index-oK7z6jnz.js";
|
|
6
|
+
import { c as de } from "./reactNode-sKPeiqPL.js";
|
|
7
|
+
var _ = ee({}, A), fe = _.version, w = _.render, pe = _.unmountComponentAtNode, C;
|
|
9
8
|
try {
|
|
10
|
-
var
|
|
11
|
-
|
|
9
|
+
var me = Number((fe || "").split(".")[0]);
|
|
10
|
+
me >= 18 && (C = _.createRoot);
|
|
12
11
|
} catch {
|
|
13
12
|
}
|
|
14
|
-
function
|
|
13
|
+
function D(e) {
|
|
15
14
|
var t = _.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
16
|
-
t &&
|
|
15
|
+
t && te(t) === "object" && (t.usingClientEntryPoint = e);
|
|
17
16
|
}
|
|
18
17
|
var y = "__rc_react_root__";
|
|
19
|
-
function
|
|
20
|
-
|
|
18
|
+
function ve(e, t) {
|
|
19
|
+
D(!0);
|
|
21
20
|
var n = t[y] || C(t);
|
|
22
|
-
|
|
21
|
+
D(!1), n.render(e), t[y] = n;
|
|
23
22
|
}
|
|
24
|
-
function
|
|
23
|
+
function be(e, t) {
|
|
25
24
|
w == null || w(e, t);
|
|
26
25
|
}
|
|
27
|
-
function
|
|
26
|
+
function Re(e, t) {
|
|
28
27
|
if (C) {
|
|
29
|
-
|
|
28
|
+
ve(e, t);
|
|
30
29
|
return;
|
|
31
30
|
}
|
|
32
|
-
|
|
31
|
+
be(e, t);
|
|
33
32
|
}
|
|
34
|
-
function
|
|
33
|
+
function _e(e) {
|
|
35
34
|
return W.apply(this, arguments);
|
|
36
35
|
}
|
|
37
36
|
function W() {
|
|
38
37
|
return W = k(/* @__PURE__ */ E().mark(function e(t) {
|
|
39
38
|
return E().wrap(function(o) {
|
|
40
|
-
for (; ; )
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
39
|
+
for (; ; ) switch (o.prev = o.next) {
|
|
40
|
+
case 0:
|
|
41
|
+
return o.abrupt("return", Promise.resolve().then(function() {
|
|
42
|
+
var s;
|
|
43
|
+
(s = t[y]) === null || s === void 0 || s.unmount(), delete t[y];
|
|
44
|
+
}));
|
|
45
|
+
case 1:
|
|
46
|
+
case "end":
|
|
47
|
+
return o.stop();
|
|
48
|
+
}
|
|
51
49
|
}, e);
|
|
52
50
|
})), W.apply(this, arguments);
|
|
53
51
|
}
|
|
54
|
-
function
|
|
55
|
-
|
|
52
|
+
function he(e) {
|
|
53
|
+
pe(e);
|
|
56
54
|
}
|
|
57
|
-
function
|
|
55
|
+
function Ee(e) {
|
|
58
56
|
return O.apply(this, arguments);
|
|
59
57
|
}
|
|
60
58
|
function O() {
|
|
61
59
|
return O = k(/* @__PURE__ */ E().mark(function e(t) {
|
|
62
60
|
return E().wrap(function(o) {
|
|
63
|
-
for (; ; )
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
61
|
+
for (; ; ) switch (o.prev = o.next) {
|
|
62
|
+
case 0:
|
|
63
|
+
if (C === void 0) {
|
|
64
|
+
o.next = 2;
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
return o.abrupt("return", _e(t));
|
|
68
|
+
case 2:
|
|
69
|
+
he(t);
|
|
70
|
+
case 3:
|
|
71
|
+
case "end":
|
|
72
|
+
return o.stop();
|
|
73
|
+
}
|
|
77
74
|
}, e);
|
|
78
75
|
})), O.apply(this, arguments);
|
|
79
76
|
}
|
|
80
|
-
const
|
|
77
|
+
const ge = (e, t) => {
|
|
81
78
|
if (process.env.NODE_ENV !== "production") {
|
|
82
|
-
const n = parseInt(r.version.split(".")[0], 10), o = Object.keys(
|
|
83
|
-
process.env.NODE_ENV !== "production" &&
|
|
79
|
+
const n = parseInt(r.version.split(".")[0], 10), o = Object.keys(A);
|
|
80
|
+
process.env.NODE_ENV !== "production" && oe(n < 19 || o.includes("createRoot"), "compatible", "antd v5 support React is 16 ~ 18. see https://u.ant.design/v5-for-19 for compatible.");
|
|
84
81
|
}
|
|
85
|
-
return
|
|
82
|
+
return Re(e, t), () => Ee(t);
|
|
86
83
|
};
|
|
87
|
-
let
|
|
88
|
-
function
|
|
89
|
-
return
|
|
84
|
+
let ye = ge;
|
|
85
|
+
function Ce() {
|
|
86
|
+
return ye;
|
|
90
87
|
}
|
|
91
|
-
const
|
|
88
|
+
const we = (e) => {
|
|
92
89
|
const {
|
|
93
90
|
componentCls: t,
|
|
94
91
|
colorPrimary: n
|
|
@@ -115,12 +112,12 @@ const Se = (e) => {
|
|
|
115
112
|
}
|
|
116
113
|
}
|
|
117
114
|
};
|
|
118
|
-
},
|
|
115
|
+
}, Se = re("Wave", (e) => [we(e)]), j = `${se}-wave-target`;
|
|
119
116
|
function S(e) {
|
|
120
117
|
return e && e !== "#fff" && e !== "#ffffff" && e !== "rgb(255, 255, 255)" && e !== "rgba(255, 255, 255, 1)" && !/rgba\((?:\d*, ){3}0\)/.test(e) && // any transparent rgba color
|
|
121
118
|
e !== "transparent";
|
|
122
119
|
}
|
|
123
|
-
function
|
|
120
|
+
function Ne(e) {
|
|
124
121
|
const {
|
|
125
122
|
borderTopColor: t,
|
|
126
123
|
borderColor: n,
|
|
@@ -131,81 +128,81 @@ function We(e) {
|
|
|
131
128
|
function N(e) {
|
|
132
129
|
return Number.isNaN(e) ? 0 : e;
|
|
133
130
|
}
|
|
134
|
-
const
|
|
131
|
+
const We = (e) => {
|
|
135
132
|
const {
|
|
136
133
|
className: t,
|
|
137
134
|
target: n,
|
|
138
135
|
component: o,
|
|
139
136
|
registerUnmount: s
|
|
140
|
-
} = e,
|
|
137
|
+
} = e, i = r.useRef(null), c = r.useRef(null);
|
|
141
138
|
r.useEffect(() => {
|
|
142
139
|
c.current = s();
|
|
143
140
|
}, []);
|
|
144
|
-
const [d, h] = r.useState(null), [f, a] = r.useState([]), [m, v] = r.useState(0), [
|
|
141
|
+
const [d, h] = r.useState(null), [f, a] = r.useState([]), [m, v] = r.useState(0), [B, V] = r.useState(0), [P, z] = r.useState(0), [F, q] = r.useState(0), [M, H] = r.useState(!1), T = {
|
|
145
142
|
left: m,
|
|
146
|
-
top:
|
|
147
|
-
width:
|
|
143
|
+
top: B,
|
|
144
|
+
width: P,
|
|
148
145
|
height: F,
|
|
149
146
|
borderRadius: f.map((l) => `${l}px`).join(" ")
|
|
150
147
|
};
|
|
151
148
|
d && (T["--wave-color"] = d);
|
|
152
149
|
function x() {
|
|
153
150
|
const l = getComputedStyle(n);
|
|
154
|
-
h(
|
|
155
|
-
const
|
|
151
|
+
h(Ne(n));
|
|
152
|
+
const u = l.position === "static", {
|
|
156
153
|
borderLeftWidth: p,
|
|
157
154
|
borderTopWidth: b
|
|
158
155
|
} = l;
|
|
159
|
-
v(
|
|
156
|
+
v(u ? n.offsetLeft : N(-parseFloat(p))), V(u ? n.offsetTop : N(-parseFloat(b))), z(n.offsetWidth), q(n.offsetHeight);
|
|
160
157
|
const {
|
|
161
158
|
borderTopLeftRadius: R,
|
|
162
|
-
borderTopRightRadius:
|
|
163
|
-
borderBottomLeftRadius:
|
|
164
|
-
borderBottomRightRadius:
|
|
159
|
+
borderTopRightRadius: G,
|
|
160
|
+
borderBottomLeftRadius: Y,
|
|
161
|
+
borderBottomRightRadius: J
|
|
165
162
|
} = l;
|
|
166
|
-
a([R,
|
|
163
|
+
a([R, G, J, Y].map((Q) => N(parseFloat(Q))));
|
|
167
164
|
}
|
|
168
165
|
if (r.useEffect(() => {
|
|
169
166
|
if (n) {
|
|
170
167
|
const l = g(() => {
|
|
171
|
-
x(),
|
|
168
|
+
x(), H(!0);
|
|
172
169
|
});
|
|
173
|
-
let
|
|
174
|
-
return typeof ResizeObserver < "u" && (
|
|
175
|
-
g.cancel(l),
|
|
170
|
+
let u;
|
|
171
|
+
return typeof ResizeObserver < "u" && (u = new ResizeObserver(x), u.observe(n)), () => {
|
|
172
|
+
g.cancel(l), u == null || u.disconnect();
|
|
176
173
|
};
|
|
177
174
|
}
|
|
178
|
-
}, []), !
|
|
175
|
+
}, []), !M)
|
|
179
176
|
return null;
|
|
180
|
-
const
|
|
181
|
-
return /* @__PURE__ */ r.createElement(
|
|
177
|
+
const K = (o === "Checkbox" || o === "Radio") && (n == null ? void 0 : n.classList.contains(j));
|
|
178
|
+
return /* @__PURE__ */ r.createElement(ae, {
|
|
182
179
|
visible: !0,
|
|
183
180
|
motionAppear: !0,
|
|
184
181
|
motionName: "wave-motion",
|
|
185
182
|
motionDeadline: 5e3,
|
|
186
|
-
onAppearEnd: (l,
|
|
183
|
+
onAppearEnd: (l, u) => {
|
|
187
184
|
var p, b;
|
|
188
|
-
if (
|
|
189
|
-
const R = (p =
|
|
185
|
+
if (u.deadline || u.propertyName === "opacity") {
|
|
186
|
+
const R = (p = i.current) === null || p === void 0 ? void 0 : p.parentElement;
|
|
190
187
|
(b = c.current) === null || b === void 0 || b.call(c).then(() => {
|
|
191
188
|
R == null || R.remove();
|
|
192
189
|
});
|
|
193
190
|
}
|
|
194
191
|
return !1;
|
|
195
192
|
}
|
|
196
|
-
}, (l,
|
|
193
|
+
}, (l, u) => {
|
|
197
194
|
let {
|
|
198
195
|
className: p
|
|
199
196
|
} = l;
|
|
200
197
|
return /* @__PURE__ */ r.createElement("div", {
|
|
201
|
-
ref:
|
|
202
|
-
className:
|
|
203
|
-
"wave-quick":
|
|
198
|
+
ref: I(i, u),
|
|
199
|
+
className: $(t, p, {
|
|
200
|
+
"wave-quick": K
|
|
204
201
|
}),
|
|
205
202
|
style: T
|
|
206
203
|
});
|
|
207
204
|
});
|
|
208
|
-
},
|
|
205
|
+
}, Oe = (e, t) => {
|
|
209
206
|
var n;
|
|
210
207
|
const {
|
|
211
208
|
component: o
|
|
@@ -214,31 +211,31 @@ const Oe = (e) => {
|
|
|
214
211
|
return;
|
|
215
212
|
const s = document.createElement("div");
|
|
216
213
|
s.style.position = "absolute", s.style.left = "0px", s.style.top = "0px", e == null || e.insertBefore(s, e == null ? void 0 : e.firstChild);
|
|
217
|
-
const
|
|
214
|
+
const i = Ce();
|
|
218
215
|
let c = null;
|
|
219
216
|
function d() {
|
|
220
217
|
return c;
|
|
221
218
|
}
|
|
222
|
-
c =
|
|
219
|
+
c = i(/* @__PURE__ */ r.createElement(We, Object.assign({}, t, {
|
|
223
220
|
target: e,
|
|
224
221
|
registerUnmount: d
|
|
225
222
|
})), s);
|
|
226
|
-
},
|
|
223
|
+
}, Te = (e, t, n) => {
|
|
227
224
|
const {
|
|
228
225
|
wave: o
|
|
229
|
-
} = r.useContext(
|
|
226
|
+
} = r.useContext(U), [, s, i] = ue(), c = ie((f) => {
|
|
230
227
|
const a = e.current;
|
|
231
228
|
if (o != null && o.disabled || !a)
|
|
232
229
|
return;
|
|
233
230
|
const m = a.querySelector(`.${j}`) || a, {
|
|
234
231
|
showEffect: v
|
|
235
232
|
} = o || {};
|
|
236
|
-
(v ||
|
|
233
|
+
(v || Oe)(m, {
|
|
237
234
|
className: t,
|
|
238
235
|
token: s,
|
|
239
236
|
component: n,
|
|
240
237
|
event: f,
|
|
241
|
-
hashId:
|
|
238
|
+
hashId: i
|
|
242
239
|
});
|
|
243
240
|
}), d = r.useRef(null);
|
|
244
241
|
return (f) => {
|
|
@@ -246,36 +243,34 @@ const Oe = (e) => {
|
|
|
246
243
|
c(f);
|
|
247
244
|
});
|
|
248
245
|
};
|
|
249
|
-
},
|
|
246
|
+
}, xe = (e) => {
|
|
250
247
|
const {
|
|
251
248
|
children: t,
|
|
252
249
|
disabled: n,
|
|
253
250
|
component: o
|
|
254
251
|
} = e, {
|
|
255
252
|
getPrefixCls: s
|
|
256
|
-
} =
|
|
257
|
-
if (
|
|
258
|
-
const a =
|
|
253
|
+
} = X(U), i = Z(null), c = s("wave"), [, d] = Se(c), h = Te(i, $(c, d), o);
|
|
254
|
+
if (L.useEffect(() => {
|
|
255
|
+
const a = i.current;
|
|
259
256
|
if (!a || a.nodeType !== 1 || n)
|
|
260
257
|
return;
|
|
261
258
|
const m = (v) => {
|
|
262
|
-
!
|
|
259
|
+
!ne(v.target) || // No need wave
|
|
263
260
|
!a.getAttribute || a.getAttribute("disabled") || a.disabled || a.className.includes("disabled") || a.className.includes("-leave") || h(v);
|
|
264
261
|
};
|
|
265
262
|
return a.addEventListener("click", m, !0), () => {
|
|
266
263
|
a.removeEventListener("click", m, !0);
|
|
267
264
|
};
|
|
268
|
-
}, [n]), !/* @__PURE__ */
|
|
265
|
+
}, [n]), !/* @__PURE__ */ L.isValidElement(t))
|
|
269
266
|
return t ?? null;
|
|
270
|
-
const f =
|
|
271
|
-
return
|
|
267
|
+
const f = ce(t) ? I(le(t), i) : i;
|
|
268
|
+
return de(t, {
|
|
272
269
|
ref: f
|
|
273
270
|
});
|
|
274
271
|
};
|
|
275
|
-
process.env.NODE_ENV !== "production" && (
|
|
276
|
-
const je = B;
|
|
272
|
+
process.env.NODE_ENV !== "production" && (xe.displayName = "Wave");
|
|
277
273
|
export {
|
|
278
274
|
j as T,
|
|
279
|
-
|
|
280
|
-
we as g
|
|
275
|
+
xe as W
|
|
281
276
|
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import * as l from "react";
|
|
2
|
+
import U from "react";
|
|
3
|
+
import { c as P } from "./warning-C63HNL9U.js";
|
|
4
|
+
import { t as X } from "./isVisible-A-IfeFoT.js";
|
|
5
|
+
import { C as Y } from "./index-oK7z6jnz.js";
|
|
6
|
+
import { C as Z, u as ee } from "./Compact-CGY560JF.js";
|
|
7
|
+
function w(e) {
|
|
8
|
+
return ["small", "middle", "large"].includes(e);
|
|
9
|
+
}
|
|
10
|
+
function E(e) {
|
|
11
|
+
return e ? typeof e == "number" && !Number.isNaN(e) : !1;
|
|
12
|
+
}
|
|
13
|
+
const h = /* @__PURE__ */ U.createContext({
|
|
14
|
+
latestIndex: 0
|
|
15
|
+
}), ne = h.Provider, te = (e) => {
|
|
16
|
+
let {
|
|
17
|
+
className: i,
|
|
18
|
+
index: a,
|
|
19
|
+
children: n,
|
|
20
|
+
split: s,
|
|
21
|
+
style: m
|
|
22
|
+
} = e;
|
|
23
|
+
const {
|
|
24
|
+
latestIndex: t
|
|
25
|
+
} = l.useContext(h);
|
|
26
|
+
return n == null ? null : /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement("div", {
|
|
27
|
+
className: i,
|
|
28
|
+
style: m
|
|
29
|
+
}, n), a < t && s && /* @__PURE__ */ l.createElement("span", {
|
|
30
|
+
className: `${i}-split`
|
|
31
|
+
}, s));
|
|
32
|
+
};
|
|
33
|
+
var se = function(e, i) {
|
|
34
|
+
var a = {};
|
|
35
|
+
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && i.indexOf(n) < 0 && (a[n] = e[n]);
|
|
36
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var s = 0, n = Object.getOwnPropertySymbols(e); s < n.length; s++)
|
|
37
|
+
i.indexOf(n[s]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[s]) && (a[n[s]] = e[n[s]]);
|
|
38
|
+
return a;
|
|
39
|
+
};
|
|
40
|
+
const le = /* @__PURE__ */ l.forwardRef((e, i) => {
|
|
41
|
+
var a, n, s;
|
|
42
|
+
const {
|
|
43
|
+
getPrefixCls: m,
|
|
44
|
+
space: t,
|
|
45
|
+
direction: V
|
|
46
|
+
} = l.useContext(Y), {
|
|
47
|
+
size: c = (a = t == null ? void 0 : t.size) !== null && a !== void 0 ? a : "small",
|
|
48
|
+
align: S,
|
|
49
|
+
className: I,
|
|
50
|
+
rootClassName: k,
|
|
51
|
+
children: A,
|
|
52
|
+
direction: b = "horizontal",
|
|
53
|
+
prefixCls: G,
|
|
54
|
+
split: R,
|
|
55
|
+
style: H,
|
|
56
|
+
wrap: D = !1,
|
|
57
|
+
classNames: p,
|
|
58
|
+
styles: y
|
|
59
|
+
} = e, F = se(e, ["size", "align", "className", "rootClassName", "children", "direction", "prefixCls", "split", "style", "wrap", "classNames", "styles"]), [d, u] = Array.isArray(c) ? c : [c, c], z = w(u), O = w(d), M = E(u), W = E(d), v = X(A, {
|
|
60
|
+
keepEmpty: !0
|
|
61
|
+
}), $ = S === void 0 && b === "horizontal" ? "center" : S, r = m("space", G), [q, B, J] = ee(r), K = P(r, t == null ? void 0 : t.className, B, `${r}-${b}`, {
|
|
62
|
+
[`${r}-rtl`]: V === "rtl",
|
|
63
|
+
[`${r}-align-${$}`]: $,
|
|
64
|
+
[`${r}-gap-row-${u}`]: z,
|
|
65
|
+
[`${r}-gap-col-${d}`]: O
|
|
66
|
+
}, I, k, J), _ = P(`${r}-item`, (n = p == null ? void 0 : p.item) !== null && n !== void 0 ? n : (s = t == null ? void 0 : t.classNames) === null || s === void 0 ? void 0 : s.item);
|
|
67
|
+
let C = 0;
|
|
68
|
+
const L = v.map((o, N) => {
|
|
69
|
+
var g, x;
|
|
70
|
+
o != null && (C = N);
|
|
71
|
+
const T = (o == null ? void 0 : o.key) || `${_}-${N}`;
|
|
72
|
+
return /* @__PURE__ */ l.createElement(te, {
|
|
73
|
+
className: _,
|
|
74
|
+
key: T,
|
|
75
|
+
index: N,
|
|
76
|
+
split: R,
|
|
77
|
+
style: (g = y == null ? void 0 : y.item) !== null && g !== void 0 ? g : (x = t == null ? void 0 : t.styles) === null || x === void 0 ? void 0 : x.item
|
|
78
|
+
}, o);
|
|
79
|
+
}), Q = l.useMemo(() => ({
|
|
80
|
+
latestIndex: C
|
|
81
|
+
}), [C]);
|
|
82
|
+
if (v.length === 0)
|
|
83
|
+
return null;
|
|
84
|
+
const f = {};
|
|
85
|
+
return D && (f.flexWrap = "wrap"), !O && W && (f.columnGap = d), !z && M && (f.rowGap = u), q(/* @__PURE__ */ l.createElement("div", Object.assign({
|
|
86
|
+
ref: i,
|
|
87
|
+
className: K,
|
|
88
|
+
style: Object.assign(Object.assign(Object.assign({}, f), t == null ? void 0 : t.style), H)
|
|
89
|
+
}, F), /* @__PURE__ */ l.createElement(ne, {
|
|
90
|
+
value: Q
|
|
91
|
+
}, L)));
|
|
92
|
+
}), j = le;
|
|
93
|
+
j.Compact = Z;
|
|
94
|
+
process.env.NODE_ENV !== "production" && (j.displayName = "Space");
|
|
95
|
+
export {
|
|
96
|
+
j as S
|
|
97
|
+
};
|