@unicom-cloud/ui 0.8.84 → 0.8.85
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/AutoComplete.js +1 -1
- package/Calendar.js +1 -1
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/ColorPicker.js +1 -1
- package/Form.js +13 -13
- package/List.js +1 -1
- package/Mentions.js +1 -1
- package/Pagination.js +1 -1
- package/Radio.js +1 -1
- package/Select.js +1 -1
- package/Space.js +2 -2
- package/Table.js +1 -1
- package/Transfer.js +1 -1
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Typography.js +1 -1
- package/auto-complete/index.js +1 -1
- package/calendar/index.js +1 -1
- package/cascader/Cascader.js +1 -1
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +1 -1
- package/checkbox/Group.js +1 -1
- package/checkbox/GroupBlock.js +1 -1
- package/checkbox/index.js +2 -2
- package/chunk/BP4igg_F.js +213 -0
- package/chunk/{DO3k0z6J.js → DSXeBMp3.js} +11 -9
- package/color-picker/Panel.js +1 -1
- package/color-picker/index.js +1 -1
- package/development/index.js +1 -1
- package/form/Form.js +14 -158
- package/form/FormList.js +3 -2
- package/form/index.js +57 -56
- package/icons/file.js +67 -0
- package/index.js +288 -283
- package/list/index.js +1 -1
- package/mentions/index.js +1 -1
- package/package.json +1 -1
- package/pagination/PageOption.js +1 -1
- package/pagination/Pagination.js +1 -1
- package/pagination/index.js +1 -1
- package/radio/Group.js +1 -1
- package/radio/GroupBlock.js +1 -1
- package/radio/Radio.js +1 -1
- package/radio/index.js +2 -2
- package/select/Option.js +1 -1
- package/select/Select.js +1 -1
- package/select/index.js +2 -2
- package/select/util.js +1 -1
- package/space/index.js +135 -83
- package/space-/index.js +92 -0
- package/space-/interface.js +1 -0
- package/{space → space-}/toArray.js +2 -2
- package/style.css +1 -1
- package/table/Table.js +1 -1
- package/table/index.js +1 -1
- package/transfer/Item.js +1 -1
- package/transfer/List.js +1 -1
- package/transfer/index.js +1 -1
- package/tree/Animation.js +1 -1
- package/tree/Node.js +1 -1
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +1 -1
- package/tree/index.js +1 -1
- package/tree-select/List.js +1 -1
- package/tree-select/Select.js +1 -1
- package/tree-select/index.js +2 -2
- package/trigger/index.js +83 -83
- package/types/common/icons/file/index.d.ts +4 -0
- package/types/common/icons/file/interface.d.ts +20 -0
- package/types/common/space/index.d.ts +5 -0
- package/types/common/space/interface.d.ts +32 -0
- package/types/common/utils/color.d.ts +1 -0
- package/types/common/utils/computeScrollIntoView.d.ts +1 -0
- package/types/common/utils/index.d.ts +40 -0
- package/types/common/utils/is.d.ts +1 -1
- package/types/common/utils/math.d.ts +1 -0
- package/types/common/utils/reactTransitionGroup.d.ts +1 -0
- package/types/common/utils/tree.d.ts +1 -0
- package/types/common/utils/tween.d.ts +1 -0
- package/types/common/utils/uuid.d.ts +1 -0
- package/types/common/utils/validate.d.ts +1 -0
- package/types/pc/cascader/base/node.d.ts +1 -1
- package/types/pc/date-picker/RangePicker.d.ts +1 -1
- package/types/pc/form/FormList.d.ts +5 -5
- package/types/pc/form/hook/useForm.d.ts +5 -0
- package/types/pc/form/index.d.ts +3 -2
- package/types/pc/icons/file/index.d.ts +4 -0
- package/types/pc/icons/file/interface.d.ts +7 -0
- package/types/pc/index.d.ts +3 -0
- package/types/pc/space/index.d.ts +3 -5
- package/types/pc/space/interface.d.ts +5 -33
- package/types/pc/space-/index.d.ts +6 -0
- package/types/pc/space-/interface.d.ts +38 -0
- package/types/pc/space-/toArray.d.ts +3 -0
- package/types/pc/table/interface.d.ts +3 -1
- package/types/pc/table/util.d.ts +1 -1
- package/typography/Ellipsis.js +4 -2
- package/typography/index.js +1 -1
- package/version/index.js +1 -1
- package/form/useForm.js +0 -53
- package/types/pc/form/useForm.d.ts +0 -4
- package/types/pc/space/toArray.d.ts +0 -2
package/list/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import "../chunk/B44Hj5ad.js";
|
|
|
5
5
|
import "../grid/Col.js";
|
|
6
6
|
import "../grid/Row.js";
|
|
7
7
|
import "../chunk/BFTV6myl.js";
|
|
8
|
-
import { L as I } from "../chunk/
|
|
8
|
+
import { L as I } from "../chunk/DSXeBMp3.js";
|
|
9
9
|
import "../spin/index.js";
|
|
10
10
|
import "@unicom-cloud/utils/class-name";
|
|
11
11
|
import "../chunk/BKKEev13.js";
|
package/mentions/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import "../chunk/B44Hj5ad.js";
|
|
|
4
4
|
import "../chunk/BFTV6myl.js";
|
|
5
5
|
import "../chunk/CXPOj2uy.js";
|
|
6
6
|
import "../input/Input.js";
|
|
7
|
-
import { M as s } from "../chunk/
|
|
7
|
+
import { M as s } from "../chunk/DSXeBMp3.js";
|
|
8
8
|
import "@unicom-cloud/utils/class-name";
|
|
9
9
|
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
10
10
|
import "./util.js";
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@unicom-cloud/ui","version":"0.8.
|
|
1
|
+
{"name":"@unicom-cloud/ui","version":"0.8.85","dependencies":{"@unicom-cloud/icons":"latest"},"peerDependencies":{"dayjs":"^1.11.10","lodash":"^4.17.21","react":"^18.3.1","react-dom":"^18.3.1"},"peerDependenciesMeta":{},"type":"module","types":"types/pc/index.d.ts","main":"./index.js","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}
|
package/pagination/PageOption.js
CHANGED
package/pagination/Pagination.js
CHANGED
package/pagination/index.js
CHANGED
package/radio/Group.js
CHANGED
|
@@ -8,7 +8,7 @@ import "../chunk/CXPOj2uy.js";
|
|
|
8
8
|
import "@unicom-cloud/utils/class-name";
|
|
9
9
|
import "../utils/constant.js";
|
|
10
10
|
import "../chunk/ClqoGc3r.js";
|
|
11
|
-
import { x as C, g as f, e as l } from "../chunk/
|
|
11
|
+
import { x as C, g as f, e as l } from "../chunk/DSXeBMp3.js";
|
|
12
12
|
export {
|
|
13
13
|
C as ClearRadioGroupContext,
|
|
14
14
|
f as RadioGroupContext,
|
package/radio/GroupBlock.js
CHANGED
|
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import "../chunk/B44Hj5ad.js";
|
|
4
4
|
import "../chunk/BFTV6myl.js";
|
|
5
|
-
import { f as a } from "../chunk/
|
|
5
|
+
import { f as a } from "../chunk/DSXeBMp3.js";
|
|
6
6
|
import "@unicom-cloud/utils/class-name";
|
|
7
7
|
export {
|
|
8
8
|
a as default
|
package/radio/Radio.js
CHANGED
|
@@ -7,7 +7,7 @@ import "../chunk/BFTV6myl.js";
|
|
|
7
7
|
import "../chunk/CXPOj2uy.js";
|
|
8
8
|
import "@unicom-cloud/utils/class-name";
|
|
9
9
|
import "../chunk/BKKEev13.js";
|
|
10
|
-
import { e as R, f, g as G, R as l } from "../chunk/
|
|
10
|
+
import { e as R, f, g as G, R as l } from "../chunk/DSXeBMp3.js";
|
|
11
11
|
export {
|
|
12
12
|
R as RadioGroup,
|
|
13
13
|
f as RadioGroupBlock,
|
package/radio/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as a } from "../chunk/
|
|
2
|
-
import { x as e, e as p, f as d, g as i } from "../chunk/
|
|
1
|
+
import { R as a } from "../chunk/DSXeBMp3.js";
|
|
2
|
+
import { x as e, e as p, f as d, g as i } from "../chunk/DSXeBMp3.js";
|
|
3
3
|
export {
|
|
4
4
|
e as ClearRadioGroupContext,
|
|
5
5
|
p as RadioGroup,
|
package/select/Option.js
CHANGED
package/select/Select.js
CHANGED
|
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "lodash/isArray";
|
|
3
3
|
import "lodash/isFunction";
|
|
4
4
|
import "react";
|
|
5
|
-
import { O as h, S as j } from "../chunk/
|
|
5
|
+
import { O as h, S as j } from "../chunk/DSXeBMp3.js";
|
|
6
6
|
import "../chunk/B44Hj5ad.js";
|
|
7
7
|
import "../chunk/B4YRLi8r.js";
|
|
8
8
|
import "../chunk/BFTV6myl.js";
|
package/select/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as o } from "../chunk/
|
|
2
|
-
import { O as r } from "../chunk/
|
|
1
|
+
import { S as o } from "../chunk/DSXeBMp3.js";
|
|
2
|
+
import { O as r } from "../chunk/DSXeBMp3.js";
|
|
3
3
|
import { default as f } from "./OptGroup.js";
|
|
4
4
|
export {
|
|
5
5
|
r as SelectOption,
|
package/select/util.js
CHANGED
|
@@ -9,7 +9,7 @@ import "lodash/isString";
|
|
|
9
9
|
import "react";
|
|
10
10
|
import "../chunk/CftuXmo_.js";
|
|
11
11
|
import "../chunk/B7M-FGia.js";
|
|
12
|
-
import { a5 as c, a6 as d, a7 as v, a8 as E, a9 as O, aa as S } from "../chunk/
|
|
12
|
+
import { a5 as c, a6 as d, a7 as v, a8 as E, a9 as O, aa as S } from "../chunk/DSXeBMp3.js";
|
|
13
13
|
export {
|
|
14
14
|
c as flatChildren,
|
|
15
15
|
d as getValidValue,
|
package/space/index.js
CHANGED
|
@@ -1,92 +1,144 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as f, useContext as S } from "react";
|
|
3
|
+
import { UI_COMMON_PREFIX as g } from "@unicom-cloud/utils/constant/ui";
|
|
4
|
+
import { u as N } from "../chunk/BFTV6myl.js";
|
|
5
|
+
import "@unicom-cloud/utils/case-name";
|
|
6
|
+
import w from "@unicom-cloud/utils/class-name";
|
|
7
|
+
import "../chunk/9TSjT7x_.js";
|
|
8
|
+
import "@unicom-cloud/utils/clipboard-copy";
|
|
9
|
+
import "../chunk/C7bohPVD.js";
|
|
10
|
+
import "../utils/dom.js";
|
|
11
|
+
import "@unicom-cloud/utils/file/fileToURL";
|
|
12
|
+
import "lodash/escapeRegExp";
|
|
13
|
+
import "lodash/isArray";
|
|
14
|
+
import "lodash/isNumber";
|
|
15
|
+
import "lodash/isString";
|
|
16
|
+
import "../chunk/ClM74To2.js";
|
|
17
|
+
import "lodash/camelCase";
|
|
18
|
+
import "lodash/capitalize";
|
|
19
|
+
import "lodash/cloneDeep";
|
|
20
|
+
import "lodash/debounce";
|
|
21
|
+
import "lodash/get";
|
|
22
|
+
import "lodash/has";
|
|
23
|
+
import "lodash/kebabCase";
|
|
24
|
+
import "lodash/merge";
|
|
25
|
+
import "lodash/mergeWith";
|
|
26
|
+
import "lodash/set";
|
|
27
|
+
import "lodash/setWith";
|
|
28
|
+
import "lodash/snakeCase";
|
|
29
|
+
import "lodash/startCase";
|
|
30
|
+
import "lodash/throttle";
|
|
31
|
+
import "lodash/uniq";
|
|
32
|
+
import "lodash/upperFirst";
|
|
33
|
+
import "@unicom-cloud/utils/math";
|
|
34
|
+
import "lodash/isPlainObject";
|
|
35
|
+
import "../chunk/BJ9_azwQ.js";
|
|
36
|
+
import "../chunk/BZ3igxQN.js";
|
|
37
|
+
import "@unicom-cloud/utils/file/saveAs";
|
|
38
|
+
import "@unicom-cloud/utils/screenfull";
|
|
39
|
+
import "@unicom-cloud/utils/tree";
|
|
40
|
+
import { isArray as y, isNumber as h } from "@unicom-cloud/utils/is";
|
|
41
|
+
import "uuid";
|
|
42
|
+
import "../chunk/DEuVgCzp.js";
|
|
43
|
+
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
44
|
+
import { a as x } from "../chunk/B44Hj5ad.js";
|
|
45
|
+
import "lodash/isEqualWith";
|
|
46
|
+
import "../chunk/B4WG1mhs.js";
|
|
47
|
+
import "@unicom-cloud/utils/constant";
|
|
48
|
+
const M = {
|
|
49
|
+
gap: "small",
|
|
11
50
|
direction: "horizontal"
|
|
12
51
|
};
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
52
|
+
function C(r = 8) {
|
|
53
|
+
if (h(r))
|
|
54
|
+
return r;
|
|
55
|
+
if (y(r))
|
|
56
|
+
return r.map((i, t, p) => C(i));
|
|
57
|
+
switch (r) {
|
|
58
|
+
case "mini":
|
|
59
|
+
return 4;
|
|
60
|
+
case "small":
|
|
61
|
+
return 8;
|
|
62
|
+
case "medium":
|
|
63
|
+
return 16;
|
|
64
|
+
case "large":
|
|
65
|
+
return 24;
|
|
66
|
+
default:
|
|
67
|
+
return 8;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function _(r, i) {
|
|
71
|
+
const t = `${g}-space`, p = N(r, M), {
|
|
72
|
+
className: $,
|
|
73
|
+
style: s,
|
|
74
|
+
children: c,
|
|
75
|
+
gap: e,
|
|
76
|
+
direction: n,
|
|
77
|
+
wrap: l = !0,
|
|
78
|
+
...a
|
|
79
|
+
} = p, m = C(e), o = { ...s };
|
|
80
|
+
return y(m) ? (o.rowGap = m[0], o.columnGap = m[1]) : o.gap = m, /* @__PURE__ */ u(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
ref: i,
|
|
84
|
+
className: w(
|
|
85
|
+
`${t}`,
|
|
86
|
+
l && `${t}-wrap`,
|
|
87
|
+
`${t}-${n}`,
|
|
88
|
+
$
|
|
89
|
+
),
|
|
90
|
+
style: o,
|
|
91
|
+
...a,
|
|
92
|
+
children: c
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
const d = f(_);
|
|
97
|
+
d.displayName = "Space";
|
|
98
|
+
function z(r, i) {
|
|
99
|
+
return /* @__PURE__ */ u(d, { ref: i, ...r, direction: "vertical", children: r.children });
|
|
100
|
+
}
|
|
101
|
+
const P = f(z);
|
|
102
|
+
P.displayName = "SpaceVertical";
|
|
103
|
+
const V = {
|
|
104
|
+
gap: "small",
|
|
105
|
+
direction: "horizontal"
|
|
106
|
+
};
|
|
107
|
+
function v(r, i) {
|
|
108
|
+
const { getPrefixCls: t, componentConfig: p, rtl: $ } = S(x), s = N(
|
|
109
|
+
r,
|
|
110
|
+
V,
|
|
17
111
|
p == null ? void 0 : p.Space
|
|
18
112
|
), {
|
|
19
|
-
className:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
e,
|
|
113
|
+
className: c,
|
|
114
|
+
direction: e,
|
|
115
|
+
size: n,
|
|
116
|
+
// 向上兼容,请用 gap 属性
|
|
117
|
+
gap: l,
|
|
118
|
+
wrap: a,
|
|
119
|
+
...m
|
|
120
|
+
} = s, o = t == null ? void 0 : t("space");
|
|
121
|
+
return /* @__PURE__ */ u(
|
|
122
|
+
d,
|
|
30
123
|
{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return 4;
|
|
44
|
-
case "small":
|
|
45
|
-
return 8;
|
|
46
|
-
case "medium":
|
|
47
|
-
return 16;
|
|
48
|
-
case "large":
|
|
49
|
-
return 24;
|
|
50
|
-
default:
|
|
51
|
-
return 8;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
const N = H(C);
|
|
55
|
-
function A(r) {
|
|
56
|
-
const n = N.length === r + 1, a = $ ? "marginLeft" : "marginRight";
|
|
57
|
-
if (typeof i == "string" || typeof i == "number") {
|
|
58
|
-
const t = g(i);
|
|
59
|
-
return u ? n ? { marginBottom: t } : {
|
|
60
|
-
[`${a}`]: t,
|
|
61
|
-
marginBottom: t
|
|
62
|
-
} : n ? {} : {
|
|
63
|
-
[o === "vertical" ? "marginBottom" : a]: t
|
|
64
|
-
};
|
|
124
|
+
ref: i,
|
|
125
|
+
className: w(
|
|
126
|
+
`${o}`,
|
|
127
|
+
a && `${o}-wrap`,
|
|
128
|
+
`${o}-${e}`,
|
|
129
|
+
c
|
|
130
|
+
),
|
|
131
|
+
direction: e,
|
|
132
|
+
wrap: a,
|
|
133
|
+
gap: n || // 向上兼容,请用 gap 属性
|
|
134
|
+
l,
|
|
135
|
+
...m
|
|
65
136
|
}
|
|
66
|
-
|
|
67
|
-
const t = g(i[0]), d = g(i[1]);
|
|
68
|
-
return u ? n ? { marginBottom: d } : {
|
|
69
|
-
[`${a}`]: t,
|
|
70
|
-
marginBottom: d
|
|
71
|
-
} : o === "vertical" ? { marginBottom: d } : { [`${a}`]: t };
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
return /* @__PURE__ */ s("div", { ref: m, className: z, style: B, ...x, children: N.map((r, n) => {
|
|
75
|
-
const a = (r == null ? void 0 : r.key) || n, t = f != null && n > 0;
|
|
76
|
-
return /* @__PURE__ */ L(b.Fragment, { children: [
|
|
77
|
-
t && /* @__PURE__ */ s("div", { className: `${e}-item-split`, children: f }),
|
|
78
|
-
/* @__PURE__ */ s("div", { className: `${e}-item`, style: A(n), children: r })
|
|
79
|
-
] }, a);
|
|
80
|
-
}) });
|
|
81
|
-
}
|
|
82
|
-
const v = h(P);
|
|
83
|
-
v.displayName = "Space";
|
|
84
|
-
function q(c, m) {
|
|
85
|
-
return /* @__PURE__ */ s(v, { ref: m, direction: "vertical", children: c.children });
|
|
137
|
+
);
|
|
86
138
|
}
|
|
87
|
-
const
|
|
88
|
-
|
|
139
|
+
const G = f(v);
|
|
140
|
+
G.displayName = "Space";
|
|
89
141
|
export {
|
|
90
|
-
|
|
91
|
-
|
|
142
|
+
P as SpaceVertical,
|
|
143
|
+
G as default
|
|
92
144
|
};
|
package/space-/index.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { jsx as c, jsxs as M } from "react/jsx-runtime";
|
|
2
|
+
import R from "lodash/isArray";
|
|
3
|
+
import V from "lodash/isNumber";
|
|
4
|
+
import { forwardRef as h, useContext as b, Fragment as j } from "react";
|
|
5
|
+
import { a as k } from "../chunk/B44Hj5ad.js";
|
|
6
|
+
import { u as D } from "../chunk/BFTV6myl.js";
|
|
7
|
+
import F from "@unicom-cloud/utils/class-name";
|
|
8
|
+
import H from "./toArray.js";
|
|
9
|
+
const O = {
|
|
10
|
+
size: "small",
|
|
11
|
+
direction: "horizontal"
|
|
12
|
+
};
|
|
13
|
+
function P(s, m) {
|
|
14
|
+
const { getPrefixCls: l, componentConfig: p, rtl: $ } = b(k), S = D(
|
|
15
|
+
s,
|
|
16
|
+
O,
|
|
17
|
+
p == null ? void 0 : p.Space
|
|
18
|
+
), {
|
|
19
|
+
className: w,
|
|
20
|
+
style: B,
|
|
21
|
+
children: C,
|
|
22
|
+
size: i,
|
|
23
|
+
direction: o,
|
|
24
|
+
align: x,
|
|
25
|
+
wrap: u,
|
|
26
|
+
split: f,
|
|
27
|
+
...z
|
|
28
|
+
} = S, e = l == null ? void 0 : l("space-"), y = x || (o === "horizontal" ? "center" : ""), A = F(
|
|
29
|
+
e,
|
|
30
|
+
{
|
|
31
|
+
[`${e}-${o}`]: o,
|
|
32
|
+
[`${e}-align-${y}`]: y,
|
|
33
|
+
[`${e}-wrap`]: u,
|
|
34
|
+
[`${e}-rtl`]: $
|
|
35
|
+
},
|
|
36
|
+
w
|
|
37
|
+
);
|
|
38
|
+
function g(r) {
|
|
39
|
+
if (V(r))
|
|
40
|
+
return r;
|
|
41
|
+
switch (r) {
|
|
42
|
+
case "mini":
|
|
43
|
+
return 4;
|
|
44
|
+
case "small":
|
|
45
|
+
return 8;
|
|
46
|
+
case "medium":
|
|
47
|
+
return 16;
|
|
48
|
+
case "large":
|
|
49
|
+
return 24;
|
|
50
|
+
default:
|
|
51
|
+
return 8;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
const N = H(C);
|
|
55
|
+
function L(r) {
|
|
56
|
+
const n = N.length === r + 1, a = $ ? "marginLeft" : "marginRight";
|
|
57
|
+
if (typeof i == "string" || typeof i == "number") {
|
|
58
|
+
const t = g(i);
|
|
59
|
+
return u ? n ? { marginBottom: t } : {
|
|
60
|
+
[`${a}`]: t,
|
|
61
|
+
marginBottom: t
|
|
62
|
+
} : n ? {} : {
|
|
63
|
+
[o === "vertical" ? "marginBottom" : a]: t
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
if (R(i)) {
|
|
67
|
+
const t = g(i[0]), d = g(i[1]);
|
|
68
|
+
return u ? n ? { marginBottom: d } : {
|
|
69
|
+
[`${a}`]: t,
|
|
70
|
+
marginBottom: d
|
|
71
|
+
} : o === "vertical" ? { marginBottom: d } : { [`${a}`]: t };
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return /* @__PURE__ */ c("div", { ref: m, className: A, style: B, ...z, children: N.map((r, n) => {
|
|
75
|
+
const a = (r == null ? void 0 : r.key) || n, t = f != null && n > 0;
|
|
76
|
+
return /* @__PURE__ */ M(j, { children: [
|
|
77
|
+
t && /* @__PURE__ */ c("div", { className: `${e}-item-split`, children: f }),
|
|
78
|
+
/* @__PURE__ */ c("div", { className: `${e}-item`, style: L(n), children: r })
|
|
79
|
+
] }, a);
|
|
80
|
+
}) });
|
|
81
|
+
}
|
|
82
|
+
const v = h(P);
|
|
83
|
+
v.displayName = "Space-";
|
|
84
|
+
function q(s, m) {
|
|
85
|
+
return /* @__PURE__ */ c(v, { ref: m, ...s, direction: "vertical", children: s.children });
|
|
86
|
+
}
|
|
87
|
+
const E = h(q);
|
|
88
|
+
E.displayName = "SpaceVertical-";
|
|
89
|
+
export {
|
|
90
|
+
E as SpaceVertical,
|
|
91
|
+
v as default
|
|
92
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import e from "react";
|
|
1
|
+
import { Children as e } from "react";
|
|
2
2
|
import { isFragment as n } from "react-is";
|
|
3
3
|
function p(t) {
|
|
4
4
|
let o = [];
|
|
5
|
-
return e.
|
|
5
|
+
return e.forEach(t, (r) => {
|
|
6
6
|
n(r) && r.props ? o = o.concat(p(r.props.children)) : r != null && o.push(r);
|
|
7
7
|
}), o;
|
|
8
8
|
}
|