@unicom-cloud/ui 0.8.89 → 0.8.90

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.
Files changed (140) hide show
  1. package/Anchor.js +4 -2
  2. package/AutoComplete.js +4 -2
  3. package/Avatar.js +4 -3
  4. package/Badge.js +6 -5
  5. package/Breadcrumb.js +4 -3
  6. package/Calendar.js +7 -5
  7. package/Card.js +6 -4
  8. package/Cascader.js +1 -1
  9. package/Checkbox.js +4 -4
  10. package/Collapse.js +3 -2
  11. package/ColorPicker.js +13 -2
  12. package/DatePicker.js +8 -8
  13. package/Form.js +3 -3
  14. package/Grid.js +10 -8
  15. package/List.js +1 -1
  16. package/Mentions.js +1 -1
  17. package/Pagination.js +1 -1
  18. package/Radio.js +5 -5
  19. package/Select.js +1 -1
  20. package/Table.js +3 -3
  21. package/TimePicker.js +2 -2
  22. package/Transfer.js +2 -2
  23. package/Tree.js +1 -1
  24. package/TreeSelect.js +3 -3
  25. package/Typography.js +1 -1
  26. package/anchor/Anchor.js +30 -29
  27. package/anchor/index.js +2 -0
  28. package/auto-complete/index.js +4 -2
  29. package/avatar/index.js +4 -3
  30. package/badge/index.js +39 -43
  31. package/breadcrumb/index.js +18 -17
  32. package/calendar/Month.js +2 -2
  33. package/calendar/Year.js +2 -2
  34. package/calendar/index.js +7 -5
  35. package/card/index.js +31 -29
  36. package/cascader/Cascader.js +1 -1
  37. package/cascader/index.js +1 -1
  38. package/cascader/util.js +1 -1
  39. package/checkbox/Checkbox.js +6 -6
  40. package/checkbox/Group.js +1 -1
  41. package/checkbox/GroupBlock.js +2 -2
  42. package/checkbox/index.js +4 -4
  43. package/chunk/B3LeSidy.js +192 -0
  44. package/chunk/{CgyNQvYg.js → BbQEqpOn.js} +388 -381
  45. package/chunk/{BP4igg_F.js → BcCuJQY8.js} +41 -40
  46. package/chunk/{Doi4-DdV.js → C8Kcc_9d.js} +99 -92
  47. package/chunk/D-Hw4x_H.js +88 -0
  48. package/chunk/{BC2OXILt.js → Dc-uXGtN.js} +1 -1
  49. package/collapse/Collapse.js +255 -13
  50. package/collapse/Item.js +2 -2
  51. package/collapse/index.js +4 -2
  52. package/color-picker/Panel.js +1 -1
  53. package/color-picker/index.js +13 -2
  54. package/date-picker/Picker.js +142 -138
  55. package/date-picker/RangePicker.js +2 -2
  56. package/date-picker/index.js +22 -22
  57. package/date-picker/util.js +1 -1
  58. package/form/Form.js +1 -1
  59. package/form/index.js +32 -32
  60. package/grid/index.js +13 -12
  61. package/image/Image.js +26 -25
  62. package/index.js +600 -571
  63. package/list/index.js +1 -1
  64. package/mentions/index.js +1 -1
  65. package/package.json +1 -1
  66. package/pagination/PageOption.js +1 -1
  67. package/pagination/Pagination.js +1 -1
  68. package/pagination/index.js +1 -1
  69. package/radio/Group.js +1 -1
  70. package/radio/GroupBlock.js +2 -2
  71. package/radio/Radio.js +4 -4
  72. package/radio/index.js +4 -4
  73. package/select/Option.js +1 -1
  74. package/select/Select.js +1 -1
  75. package/select/index.js +2 -2
  76. package/select/util.js +2 -2
  77. package/space/index.js +56 -54
  78. package/statistic/Countdown.js +1 -1
  79. package/steps/index.js +50 -49
  80. package/style.css +1 -1
  81. package/table/Table.js +2 -2
  82. package/table/index.js +3 -3
  83. package/time-picker/Picker.js +17 -17
  84. package/time-picker/RangePicker.js +7 -7
  85. package/time-picker/TimePicker.js +2 -2
  86. package/time-picker/index.js +2 -2
  87. package/time-picker/util.js +1 -1
  88. package/transfer/Item.js +1 -1
  89. package/transfer/List.js +1 -1
  90. package/transfer/index.js +2 -2
  91. package/tree/Animation.js +1 -1
  92. package/tree/Node.js +1 -1
  93. package/tree/NodeList.js +1 -1
  94. package/tree/Tree.js +3 -3
  95. package/tree/index.js +1 -1
  96. package/tree-select/List.js +1 -1
  97. package/tree-select/Select.js +1 -1
  98. package/tree-select/index.js +2 -2
  99. package/types/common/space/interface.d.ts +4 -0
  100. package/types/common/utils/dayjs.d.ts +2 -2
  101. package/types/pc/anchor/Anchor.d.ts +1 -0
  102. package/types/pc/anchor/index.d.ts +2 -1
  103. package/types/pc/auto-complete/index.d.ts +6 -0
  104. package/types/pc/avatar/index.d.ts +1 -0
  105. package/types/pc/badge/index.d.ts +5 -3
  106. package/types/pc/breadcrumb/index.d.ts +1 -0
  107. package/types/pc/calendar/index.d.ts +3 -0
  108. package/types/pc/card/index.d.ts +1 -0
  109. package/types/pc/cascader/Cascader.d.ts +1 -1
  110. package/types/pc/collapse/Collapse.d.ts +1 -0
  111. package/types/pc/collapse/index.d.ts +2 -1
  112. package/types/pc/color-picker/index.d.ts +7 -0
  113. package/types/pc/date-picker/index.d.ts +1 -1
  114. package/types/pc/date-picker/interface.d.ts +2 -2
  115. package/types/pc/date-picker/panel/Body.d.ts +1 -1
  116. package/types/pc/form/hook/useForm.d.ts +1 -1
  117. package/types/pc/form/index.d.ts +1 -1
  118. package/types/pc/grid/index.d.ts +3 -4
  119. package/types/pc/index.d.ts +15 -14
  120. package/types/pc/menu/Indent.d.ts +1 -1
  121. package/types/pc/space/index.d.ts +2 -2
  122. package/types/pc/steps/index.d.ts +1 -0
  123. package/types/pc/time-picker/index.d.ts +1 -1
  124. package/types/pc/utils/constant.d.ts +2 -2
  125. package/types/pc/utils/index.d.ts +1 -0
  126. package/types/pc/utils/names.d.ts +396 -85
  127. package/typography/Ellipsis.js +5 -4
  128. package/typography/index.js +1 -1
  129. package/utils/constant.js +6 -6
  130. package/utils/dayjs.js +1 -1
  131. package/utils/index.js +202 -200
  132. package/utils/names.js +294 -86
  133. package/version/index.js +1 -1
  134. package/virtual-list/VirtualList.js +117 -116
  135. package/chunk/C7bohPVD.js +0 -185
  136. package/chunk/DYmI9fFY.js +0 -257
  137. /package/grid/{grid.js → Grid.js} +0 -0
  138. /package/grid/{grid-item.js → GridItem.js} +0 -0
  139. /package/types/pc/grid/{grid.d.ts → Grid.d.ts} +0 -0
  140. /package/types/pc/grid/{grid-item.d.ts → GridItem.d.ts} +0 -0
package/chunk/C7bohPVD.js DELETED
@@ -1,185 +0,0 @@
1
- import c, { isDayjs as y } from "dayjs";
2
- import b from "dayjs/plugin/advancedFormat";
3
- import M from "dayjs/plugin/customParseFormat";
4
- import $ from "dayjs/plugin/isBetween";
5
- import F from "dayjs/plugin/quarterOfYear";
6
- import Y from "dayjs/plugin/timezone";
7
- import A from "dayjs/plugin/utc";
8
- import W from "dayjs/plugin/weekOfYear";
9
- import U from "dayjs/plugin/weekYear";
10
- import m from "lodash/isArray";
11
- import l from "lodash/isUndefined";
12
- const d = c()._isAMomentObject;
13
- d && (c.extend = () => {
14
- });
15
- const C = (t, e, n) => {
16
- n = function(r, f) {
17
- if (y(r))
18
- return r.clone();
19
- const i = typeof f == "object" ? f : {};
20
- return i.date = r, i.args = arguments, new e(i);
21
- };
22
- const o = e.prototype, s = o.$utils;
23
- o.$utils = function() {
24
- const r = s();
25
- return r.i = y, r;
26
- }, n.isDayjs = y;
27
- };
28
- c.extend(C);
29
- c.extend(M);
30
- c.extend($);
31
- c.extend(W);
32
- c.extend(b);
33
- c.extend(U);
34
- c.extend(F);
35
- c.extend(A);
36
- c.extend(Y);
37
- const a = c;
38
- function T(t, e) {
39
- const n = (t.day() - e + 7) % 7;
40
- return t.clone().startOf("day").subtract(n, "day").valueOf();
41
- }
42
- function H(t, e, n) {
43
- return T(t, n) === T(e, n);
44
- }
45
- const h = {
46
- add(t, e, n) {
47
- return d ? t.clone().add(e, n) : t.add(e, n);
48
- },
49
- subtract(t, e, n) {
50
- return d ? t.clone().subtract(e, n) : t.subtract(e, n);
51
- },
52
- startOf(t, e) {
53
- return d ? t.clone().startOf(e) : t.startOf(e);
54
- },
55
- endOf(t, e) {
56
- return d ? t.clone().endOf(e) : t.endOf(e);
57
- },
58
- set(t, e, n) {
59
- return d ? t.clone().set(e, n) : t.set(e, n);
60
- },
61
- isSameWeek(t, e, n, o) {
62
- return d ? H(t, e, n) : t.locale({ ...a.Ls[o], weekStart: n }).isSame(e, "week");
63
- }
64
- }, P = {
65
- year: 0,
66
- month: 1,
67
- day: 2,
68
- hour: 3,
69
- minute: 4,
70
- second: 5
71
- }, j = {}, S = (t, e) => {
72
- const n = `${t}|short`;
73
- let o = j[n];
74
- return o || (o = new Intl.DateTimeFormat("en-US", {
75
- hour12: !1,
76
- timeZone: t,
77
- year: "numeric",
78
- month: "2-digit",
79
- day: "2-digit",
80
- hour: "2-digit",
81
- minute: "2-digit",
82
- second: "2-digit"
83
- }), j[n] = o), o;
84
- }, v = (t, e) => {
85
- const n = new Date(t);
86
- return S(e).formatToParts(n);
87
- }, x = (t, e) => {
88
- const n = v(t, e), o = [];
89
- for (let O = 0; O < n.length; O += 1) {
90
- const { type: g, value: w } = n[O], D = P[g];
91
- D >= 0 && (o[D] = parseInt(w, 10));
92
- }
93
- const s = o[3], r = s === 24 ? 0 : s, f = Date.UTC(
94
- o[0],
95
- o[1] - 1,
96
- o[2],
97
- r,
98
- o[4],
99
- o[5],
100
- 0
101
- );
102
- let i = +t;
103
- const u = i % 1e3;
104
- return i -= u, (f - i) / (60 * 1e3);
105
- }, I = (t, e, n) => {
106
- let o = t - e * 60 * 1e3;
107
- const s = x(o, n);
108
- if (e === s)
109
- return [o, e];
110
- o -= (s - e) * 60 * 1e3;
111
- const r = x(o, n);
112
- return s === r ? [o, s] : [t - Math.min(s, r) * 60 * 1e3, Math.max(s, r)];
113
- };
114
- function k(t, e) {
115
- const n = x(t, e);
116
- return I(t, n, e)[1];
117
- }
118
- function K(t, e) {
119
- return l(t) && !e ? a() : p(a(), t, e);
120
- }
121
- function p(t, e, n, o) {
122
- if (!t || l(e) && !n)
123
- return t;
124
- const s = -t.toDate().getTimezoneOffset(), r = l(e) ? n ? k(t.valueOf(), n) : s : e, f = Math.abs(r) <= 16 ? r * 60 : r, i = o ? s - f : f - s, u = n ? k(a(t).valueOf() + i * 60 * 1e3, n) : r, O = i - (r - u), g = o || !l(e) ? i : O;
125
- return a(a(t).valueOf() + g * 60 * 1e3);
126
- }
127
- function X(t, e, n) {
128
- return p(t, e, n, !0);
129
- }
130
- function z(t) {
131
- const e = ["H", "h", "m", "s", "A", "a"];
132
- let n = "";
133
- return e.some((o) => t.indexOf(o) !== -1 ? (n = `${o}${t.split(` ${o}`)[1]}`, !0) : !1), n || "HH:mm:ss";
134
- }
135
- function V(t, e, n, o) {
136
- if (!t)
137
- return;
138
- const s = (f, i) => {
139
- if (y(f))
140
- return a(f.valueOf());
141
- if (typeof f == "string") {
142
- const u = a(f, m(e) ? e[i] : e);
143
- return u.isValid() ? u : a(f, "YYYY-MM-DD");
144
- }
145
- return a(f);
146
- }, r = (f, i) => n !== void 0 || o ? p(s(f, i), n, o) : s(f, i);
147
- return m(t) ? t.map((f, i) => f ? r(f, i) : void 0) : r(t, 0);
148
- }
149
- function tt(t, e) {
150
- const n = t.year(), o = t.month(), s = t.date();
151
- if (e) {
152
- let r = e;
153
- return r = h.set(r, "year", n), r = h.set(r, "month", o), r = h.set(r, "date", s), r;
154
- }
155
- return t;
156
- }
157
- function et(t) {
158
- if (!m(t) || !(t[0] && t[1]) || !(t[0].valueOf() > t[1].valueOf())) return t;
159
- const e = [...t];
160
- return e.sort((n, o) => n.valueOf() - o.valueOf()), e;
161
- }
162
- function nt(t, e) {
163
- return e === void 0 && t === void 0 ? !1 : e && !t || !e && t || a(e).valueOf() !== a(t).valueOf();
164
- }
165
- function ot(t, e) {
166
- return e === void 0 && t === void 0 ? !1 : e && !t || !e && t || m(e) && m(t) && a(e[0]).valueOf() !== a(t[0]).valueOf() || a(e[1]).valueOf() !== a(t[1]).valueOf();
167
- }
168
- function rt(t, e, n) {
169
- return typeof t == "string" && a(t, e).format(m(e) ? e[n] : e) === t;
170
- }
171
- export {
172
- K as a,
173
- et as b,
174
- z as c,
175
- a as d,
176
- tt as e,
177
- nt as f,
178
- V as g,
179
- rt as h,
180
- ot as i,
181
- X as j,
182
- p as k,
183
- h as m,
184
- k as t
185
- };
package/chunk/DYmI9fFY.js DELETED
@@ -1,257 +0,0 @@
1
- import { jsxs as w, jsx as r } from "react/jsx-runtime";
2
- import U from "@unicom-cloud/icons/IconUiCaretLeft";
3
- import L from "@unicom-cloud/icons/IconUiCaretRight";
4
- import V from "lodash/isFunction";
5
- import M, { useContext as O, useRef as A, createContext as B } from "react";
6
- import { a as T, I as S } from "./B44Hj5ad.js";
7
- import { u as q } from "./BFTV6myl.js";
8
- import { u as D } from "./D5wldVRB.js";
9
- import p from "@unicom-cloud/utils/class-name";
10
- import { o as G } from "./BKKEev13.js";
11
- import { u as J } from "./BJ9_azwQ.js";
12
- import { u as Q } from "./BYdIoY50.js";
13
- import { off as W, on as X } from "../utils/dom.js";
14
- function Y(f, g) {
15
- var I;
16
- const { getPrefixCls: a } = O(T), n = O(j), C = Q(), {
17
- children: s,
18
- name: c,
19
- header: $,
20
- className: H,
21
- style: N,
22
- contentStyle: E,
23
- extra: x,
24
- disabled: l,
25
- destroyOnHide: y,
26
- expandIcon: v,
27
- showExpandIcon: b = !0,
28
- ...R
29
- } = f, i = A(), m = A(), t = a == null ? void 0 : a("collapse-item"), d = ((I = n.activeKeys) == null ? void 0 : I.indexOf(c)) > -1, u = b ? "expandIcon" in f ? v : n.expandIcon : null, h = (e, o) => {
30
- var P;
31
- if (l)
32
- return;
33
- const { triggerRegion: K } = n;
34
- (o === (K === "icon" ? 0 : K === "header" ? 1 : 2) || // When triggerRegion is set to header, clicking icon should trigger onChange as well
35
- K === "header" && [0, 1].includes(o)) && ((P = n.onToggle) == null || P.call(n, c, e));
36
- };
37
- return /* @__PURE__ */ w(
38
- "div",
39
- {
40
- ref: g,
41
- ...R,
42
- className: p(
43
- t,
44
- {
45
- [`${t}-active`]: d,
46
- [`${t}-no-icon`]: !u,
47
- [`${t}-disabled`]: l
48
- },
49
- H
50
- ),
51
- style: N,
52
- children: [
53
- /* @__PURE__ */ w(
54
- "div",
55
- {
56
- role: "button",
57
- "aria-disabled": l,
58
- "aria-expanded": d,
59
- "data-active-region": n.triggerRegion,
60
- tabIndex: l ? -1 : 0,
61
- className: p(
62
- `${t}-header`,
63
- `${t}-header-${n.expandIconPosition}`,
64
- {
65
- [`${t}-header-disabled`]: l
66
- }
67
- ),
68
- onClick: (e) => h(e, 2),
69
- ...C({
70
- onPressEnter: (e) => {
71
- !l && n.onToggle(c, e);
72
- }
73
- }),
74
- children: [
75
- u && /* @__PURE__ */ r(
76
- S,
77
- {
78
- prefix: t,
79
- disabled: l,
80
- className: p({
81
- [`${t}-icon-hover-right`]: n.expandIconPosition === "right",
82
- [`${t}-header-icon-right`]: n.expandIconPosition === "right"
83
- }),
84
- onClick: (e) => h(e, 0),
85
- children: /* @__PURE__ */ r(
86
- "span",
87
- {
88
- className: p(`${t}-header-icon`, {
89
- [`${t}-header-icon-down`]: d
90
- }),
91
- children: u
92
- }
93
- )
94
- }
95
- ),
96
- /* @__PURE__ */ r(
97
- "div",
98
- {
99
- className: `${t}-header-title`,
100
- onClick: (e) => h(e, 1),
101
- children: $
102
- }
103
- ),
104
- x && /* @__PURE__ */ r(
105
- "div",
106
- {
107
- className: `${t}-header-extra`,
108
- onClick: (e) => {
109
- e.stopPropagation();
110
- },
111
- children: x
112
- }
113
- )
114
- ]
115
- }
116
- ),
117
- /* @__PURE__ */ r(
118
- J,
119
- {
120
- nodeRef: i,
121
- in: d,
122
- addEndListener: (e) => {
123
- W(i.current, "transitionend", e), X(i.current, "transitionend", e);
124
- },
125
- mountOnEnter: "destroyOnHide" in f ? y : n.destroyOnHide || n.lazyload,
126
- unmountOnExit: "destroyOnHide" in f ? y : n.destroyOnHide,
127
- onEnter: () => {
128
- const e = i.current;
129
- e && (e.style.height = "0", e.style.display = "block");
130
- },
131
- onEntering: () => {
132
- const e = i.current, o = m.current;
133
- e && o && (e.style.height = `${Math.max(e.scrollHeight, o.scrollHeight)}px`);
134
- },
135
- onEntered: () => {
136
- const e = i.current;
137
- e && (e.style.height = "auto");
138
- },
139
- onExit: () => {
140
- const e = i.current, o = m.current;
141
- e && o && (e.offsetHeight, o.offsetHeight, e.style.display = "block", e.style.height = `${Math.max(e.offsetHeight, o.offsetHeight)}px`, e.offsetHeight, o.offsetHeight);
142
- },
143
- onExiting: () => {
144
- const e = i.current;
145
- e && (e.style.height = "0");
146
- },
147
- onExited: () => {
148
- const e = i.current;
149
- e && (e.style.display = "none", e.style.height = "auto");
150
- },
151
- children: /* @__PURE__ */ r(
152
- "div",
153
- {
154
- ref: i,
155
- role: "region",
156
- className: p(`${t}-content`, {
157
- [`${t}-content-expanded`]: d
158
- }),
159
- children: /* @__PURE__ */ r(
160
- "div",
161
- {
162
- ref: m,
163
- style: E,
164
- className: `${t}-content-box`,
165
- children: s
166
- }
167
- )
168
- }
169
- )
170
- }
171
- )
172
- ]
173
- }
174
- );
175
- }
176
- const z = M.forwardRef(
177
- Y
178
- );
179
- z.displayName = "CollapseItem";
180
- const k = (f, g) => {
181
- const a = [].concat(f);
182
- return g ? a.slice(0, 1) : a;
183
- }, Z = {
184
- bordered: !0,
185
- lazyload: !0,
186
- expandIconPosition: "left"
187
- }, j = B({
188
- expandIconPosition: "left",
189
- expandIcon: /* @__PURE__ */ r(L, {}),
190
- activeKeys: [],
191
- onToggle: () => {
192
- }
193
- });
194
- function _(f, g) {
195
- const { getPrefixCls: a, componentConfig: n, rtl: C } = O(T), s = q(
196
- f,
197
- Z,
198
- n == null ? void 0 : n.Collapse
199
- ), [c, $] = D([], {
200
- defaultValue: "defaultActiveKey" in s ? k(s.defaultActiveKey, s.accordion) : void 0,
201
- value: "activeKey" in s ? k(s.activeKey, s.accordion) : void 0
202
- }), {
203
- children: H,
204
- className: N,
205
- style: E,
206
- bordered: x,
207
- lazyload: l,
208
- expandIcon: y,
209
- expandIconPosition: v,
210
- destroyOnHide: b,
211
- accordion: R,
212
- triggerRegion: i,
213
- onChange: m,
214
- ...t
215
- } = s, d = a == null ? void 0 : a("collapse"), u = (h, I) => {
216
- let e = [...c || []];
217
- const o = c == null ? void 0 : c.indexOf(h);
218
- o > -1 ? e.splice(o, 1) : R ? e = [h] : e.push(h), "activeKey" in s || $(e), V(m) && m(h, e, I);
219
- };
220
- return /* @__PURE__ */ r(
221
- j.Provider,
222
- {
223
- value: {
224
- activeKeys: c,
225
- triggerRegion: i,
226
- lazyload: l,
227
- destroyOnHide: b,
228
- expandIconPosition: v,
229
- onToggle: u,
230
- expandIcon: "expandIcon" in s ? y : v === "right" ? /* @__PURE__ */ r(U, {}) : /* @__PURE__ */ r(L, {})
231
- },
232
- children: /* @__PURE__ */ r(
233
- "div",
234
- {
235
- ref: g,
236
- ...G(t, ["activeKey", "defaultActiveKey"]),
237
- className: p(
238
- d,
239
- `${d}-${x ? "border" : "borderless"}`,
240
- { [`${d}-rtl`]: C },
241
- N
242
- ),
243
- style: E,
244
- children: H
245
- }
246
- )
247
- }
248
- );
249
- }
250
- const ee = M.forwardRef(_), F = ee;
251
- F.displayName = "Collapse";
252
- F.Item = z;
253
- export {
254
- F as C,
255
- z as I,
256
- j as a
257
- };
File without changes
File without changes
File without changes
File without changes