@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
@@ -0,0 +1,192 @@
1
+ import a, { isDayjs as l } from "dayjs";
2
+ import M from "dayjs/plugin/advancedFormat";
3
+ import $ from "dayjs/plugin/customParseFormat";
4
+ import v 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 d from "lodash/isArray";
11
+ import O from "lodash/isUndefined";
12
+ const u = a()._isAMomentObject;
13
+ u && (a.extend = () => {
14
+ });
15
+ const C = (t, e, n) => {
16
+ n = function(o, c) {
17
+ if (l(o))
18
+ return o.clone();
19
+ const i = typeof c == "object" ? c : {};
20
+ return i.date = o, i.args = arguments, new e(i);
21
+ };
22
+ const r = e.prototype, s = r.$utils;
23
+ r.$utils = function() {
24
+ const o = s();
25
+ return o.i = l, o;
26
+ }, n.isDayjs = l;
27
+ };
28
+ a.extend(C);
29
+ a.extend($);
30
+ a.extend(v);
31
+ a.extend(W);
32
+ a.extend(M);
33
+ a.extend(U);
34
+ a.extend(F);
35
+ a.extend(A);
36
+ a.extend(Y);
37
+ const f = a;
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 u ? t.clone().add(e, n) : t.add(e, n);
48
+ },
49
+ subtract(t, e, n) {
50
+ return u ? t.clone().subtract(e, n) : t.subtract(e, n);
51
+ },
52
+ startOf(t, e) {
53
+ return u ? t.clone().startOf(e) : t.startOf(e);
54
+ },
55
+ endOf(t, e) {
56
+ return u ? t.clone().endOf(e) : t.endOf(e);
57
+ },
58
+ set(t, e, n) {
59
+ return u ? t.clone().set(e, n) : t.set(e, n);
60
+ },
61
+ isSameWeek(t, e, n, r) {
62
+ return u ? H(t, e, n) : t.locale({ ...f.Ls[r], 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 r = j[n];
74
+ return r || (r = 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] = r), r;
84
+ }, I = (t, e) => {
85
+ const n = new Date(t);
86
+ return S(e).formatToParts(n);
87
+ }, x = (t, e) => {
88
+ const n = I(t, e), r = [];
89
+ for (let m = 0; m < n.length; m += 1) {
90
+ const { type: g, value: b } = n[m], D = P[g];
91
+ D >= 0 && (r[D] = parseInt(b, 10));
92
+ }
93
+ const s = r[3], o = s === 24 ? 0 : s, c = Date.UTC(
94
+ r[0],
95
+ r[1] - 1,
96
+ r[2],
97
+ o,
98
+ r[4],
99
+ r[5],
100
+ 0
101
+ );
102
+ let i = +t;
103
+ const y = i % 1e3;
104
+ return i -= y, (c - i) / (60 * 1e3);
105
+ }, _ = (t, e, n) => {
106
+ let r = t - e * 60 * 1e3;
107
+ const s = x(r, n);
108
+ if (e === s)
109
+ return [r, e];
110
+ r -= (s - e) * 60 * 1e3;
111
+ const o = x(r, n);
112
+ return s === o ? [r, s] : [t - Math.min(s, o) * 60 * 1e3, Math.max(s, o)];
113
+ };
114
+ function k(t, e) {
115
+ const n = x(t, e);
116
+ return _(t, n, e)[1];
117
+ }
118
+ function z(t, e) {
119
+ return O(t) && !e ? f() : p(f(), t, e);
120
+ }
121
+ function p(t, e, n, r) {
122
+ if (!t || O(e) && !n)
123
+ return t;
124
+ const s = -t.toDate().getTimezoneOffset(), o = O(e) ? n ? k(t.valueOf(), n) : s : e, c = Math.abs(o) <= 16 ? o * 60 : o, i = r ? s - c : c - s, y = n ? k(f(t).valueOf() + i * 60 * 1e3, n) : o, m = i - (o - y), g = r || !O(e) ? i : m;
125
+ return f(f(t).valueOf() + g * 60 * 1e3);
126
+ }
127
+ function V(t, e, n) {
128
+ return p(t, e, n, !0);
129
+ }
130
+ function tt(t) {
131
+ const e = ["H", "h", "m", "s", "A", "a"];
132
+ let n = "";
133
+ return e.some((r) => t.indexOf(r) !== -1 ? (n = `${r}${t.split(` ${r}`)[1]}`, !0) : !1), n || "HH:mm:ss";
134
+ }
135
+ function L(t, e) {
136
+ if (l(t))
137
+ return f(t.valueOf());
138
+ if (typeof t == "string") {
139
+ const n = f(t, e);
140
+ return n.isValid() ? n : f(t, "YYYY-MM-DD");
141
+ }
142
+ return f(t);
143
+ }
144
+ function w(t, e, n, r) {
145
+ let s = L(t, e);
146
+ return (n !== void 0 || r) && (s = p(s, n, r)), s;
147
+ }
148
+ function et(t, e, n, r) {
149
+ if (!t) return;
150
+ const s = d(e) ? e : [e];
151
+ return d(t) ? t.map((o, c, i) => {
152
+ if (o)
153
+ return w(o, s[c], n, r);
154
+ }) : w(t, s[0], n, r);
155
+ }
156
+ function nt(t, e) {
157
+ const n = t.year(), r = t.month(), s = t.date();
158
+ if (e) {
159
+ let o = e;
160
+ return o = h.set(o, "year", n), o = h.set(o, "month", r), o = h.set(o, "date", s), o;
161
+ }
162
+ return t;
163
+ }
164
+ function rt(t) {
165
+ if (!d(t) || !(t[0] && t[1]) || !(t[0].valueOf() > t[1].valueOf())) return t;
166
+ const e = [...t];
167
+ return e.sort((n, r) => n.valueOf() - r.valueOf()), e;
168
+ }
169
+ function ot(t, e) {
170
+ return e === void 0 && t === void 0 ? !1 : e && !t || !e && t || f(e).valueOf() !== f(t).valueOf();
171
+ }
172
+ function st(t, e) {
173
+ return e === void 0 && t === void 0 ? !1 : e && !t || !e && t || d(e) && d(t) && f(e[0]).valueOf() !== f(t[0]).valueOf() || f(e[1]).valueOf() !== f(t[1]).valueOf();
174
+ }
175
+ function ft(t, e, n) {
176
+ return typeof t == "string" && f(t, e).format(d(e) ? e[n] : e) === t;
177
+ }
178
+ export {
179
+ z as a,
180
+ rt as b,
181
+ tt as c,
182
+ f as d,
183
+ nt as e,
184
+ ot as f,
185
+ et as g,
186
+ ft as h,
187
+ st as i,
188
+ V as j,
189
+ p as k,
190
+ h as m,
191
+ k as t
192
+ };