@unicom-cloud/ui 0.8.98 → 0.8.100
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/Anchor.js +3 -1
- package/Badge.js +54 -7
- package/Copy.js +49 -2
- package/Flex.js +12 -0
- package/Grid.js +1 -1
- package/LiquidFill.js +60 -2
- package/Marquee.js +62 -0
- package/QrCode.js +14 -9
- package/Segmented.js +11 -0
- package/Space.js +14 -6
- package/Splitter.js +6 -0
- package/Tag.js +3 -2
- package/Tour.js +14 -9
- package/alert/index.js +38 -39
- package/anchor/index.js +5 -3
- package/badge/index.js +174 -80
- package/collapse/Collapse.js +54 -48
- package/components/common/space/index.js +90 -106
- package/copy/index.js +83 -35
- package/flex/index.js +59 -0
- package/flex/interface.js +34 -0
- package/flex/utils.js +13 -0
- package/grid/{GridItem.js → Item.js} +15 -15
- package/grid/index.js +1 -1
- package/index.js +490 -477
- package/input/Button.js +39 -34
- package/input/Textarea.js +108 -104
- package/liquid-fill/index.js +256 -2
- package/marquee/index.js +283 -0
- package/menu/Item.js +17 -16
- package/package.json +1 -1
- package/qr-code/index.js +54 -36
- package/rate/index.js +8 -8
- package/segmented/index.js +225 -0
- package/space/index.js +28 -29
- package/spin/index.js +75 -62
- package/splitter/Panel.js +39 -0
- package/splitter/SplitBar.js +157 -0
- package/splitter/Splitter.js +139 -0
- package/splitter/hooks/useEvent.js +12 -0
- package/splitter/hooks/useItems.js +26 -0
- package/splitter/hooks/useResizable.js +26 -0
- package/splitter/hooks/useResize.js +68 -0
- package/splitter/hooks/useSizes.js +60 -0
- package/splitter/index.js +7 -0
- package/splitter/interface.js +1 -0
- package/style.css +1 -1
- package/table/Table.js +1 -1
- package/table/hook/useThResizable.js +72 -26
- package/table/tbody/Td.js +80 -77
- package/table/th-resizable/index.js +92 -35
- package/tag/index.js +42 -41
- package/tooltip/index.js +89 -82
- package/tour/index.js +110 -89
- package/types/common/hooks/useMergeProps.d.ts +1 -1
- package/types/common/space/index.d.ts +7 -5
- package/types/common/space/interface.d.ts +29 -16
- package/types/pc/affix/interface.d.ts +0 -2
- package/types/pc/alert/index.d.ts +2 -2
- package/types/pc/anchor/index.d.ts +2 -1
- package/types/pc/anchor/interface.d.ts +0 -2
- package/types/pc/auto-complete/interface.d.ts +0 -6
- package/types/pc/avatar/interface.d.ts +0 -4
- package/types/pc/badge/index.d.ts +4 -4
- package/types/pc/badge/interface.d.ts +26 -0
- package/types/pc/breadcrumb/interface.d.ts +0 -3
- package/types/pc/carousel/interface.d.ts +2 -6
- package/types/pc/cascader/interface.d.ts +6 -18
- package/types/pc/checkbox/interface.d.ts +0 -1
- package/types/pc/collapse/interface.d.ts +4 -2
- package/types/pc/color-picker/interface.d.ts +0 -2
- package/types/pc/config-provider/interface.d.ts +16 -14
- package/types/pc/copy/interface.d.ts +2 -1
- package/types/pc/date-picker/RangePicker.d.ts +1 -1
- package/types/pc/date-picker/interface.d.ts +0 -17
- package/types/pc/descriptions/interface.d.ts +0 -1
- package/types/pc/drawer/interface.d.ts +0 -7
- package/types/pc/dropdown/interface.d.ts +0 -1
- package/types/pc/flex/index.d.ts +9 -0
- package/types/pc/flex/interface.d.ts +61 -0
- package/types/pc/flex/utils.d.ts +9 -0
- package/types/pc/form/interface.d.ts +9 -22
- package/types/pc/form/util.d.ts +1 -1
- package/types/pc/grid/index.d.ts +3 -3
- package/types/pc/grid/interface.d.ts +1 -6
- package/types/pc/image/interface.d.ts +0 -13
- package/types/pc/index.d.ts +16 -6
- package/types/pc/input/Textarea.d.ts +2 -6
- package/types/pc/input/interface.d.ts +5 -13
- package/types/pc/input-number/interface.d.ts +0 -4
- package/types/pc/input-tag/interface.d.ts +0 -13
- package/types/pc/layout/interface.d.ts +0 -1
- package/types/pc/link/interface.d.ts +0 -1
- package/types/pc/liquid-fill/index.d.ts +114 -1
- package/types/pc/list/interface.d.ts +0 -4
- package/types/pc/marquee/index.d.ts +61 -0
- package/types/pc/menu/context.d.ts +1 -1
- package/types/pc/menu/interface.d.ts +0 -8
- package/types/pc/message/interface.d.ts +0 -2
- package/types/pc/modal/interface.d.ts +0 -5
- package/types/pc/notification/interface.d.ts +0 -1
- package/types/pc/pagination/interface.d.ts +0 -2
- package/types/pc/popconfirm/interface.d.ts +8 -10
- package/types/pc/popover/interface.d.ts +0 -1
- package/types/pc/progress/interface.d.ts +0 -3
- package/types/pc/qr-code/index.d.ts +1 -1
- package/types/pc/rate/index.d.ts +2 -2
- package/types/pc/resize-box/interface.d.ts +1 -7
- package/types/pc/segmented/index.d.ts +8 -0
- package/types/pc/segmented/interface.d.ts +88 -0
- package/types/pc/select/interface.d.ts +0 -12
- package/types/pc/select-view/interface.d.ts +0 -7
- package/types/pc/slider/interface.d.ts +0 -4
- package/types/pc/space/index.d.ts +4 -1
- package/types/pc/space/interface.d.ts +6 -10
- package/types/pc/spin/interface.d.ts +4 -1
- package/types/pc/splitter/Panel.d.ts +8 -0
- package/types/pc/splitter/SplitBar.d.ts +21 -0
- package/types/pc/splitter/Splitter.d.ts +4 -0
- package/types/pc/splitter/hooks/useEvent.d.ts +3 -0
- package/types/pc/splitter/hooks/useItems.d.ts +10 -0
- package/types/pc/splitter/hooks/useResizable.d.ts +8 -0
- package/types/pc/splitter/hooks/useResize.d.ts +4 -0
- package/types/pc/splitter/hooks/useSizes.d.ts +5 -0
- package/types/pc/splitter/index.d.ts +8 -0
- package/types/pc/splitter/interface.d.ts +213 -0
- package/types/pc/statistic/interface.d.ts +0 -4
- package/types/pc/steps/interface.d.ts +0 -3
- package/types/pc/table/hook/useThResizable.d.ts +2 -2
- package/types/pc/table/interface.d.ts +4 -15
- package/types/pc/tabs/interface.d.ts +0 -7
- package/types/pc/tag/index.d.ts +2 -0
- package/types/pc/tag/interface.d.ts +0 -1
- package/types/pc/time-picker/interface.d.ts +0 -7
- package/types/pc/tooltip/interface.d.ts +4 -1
- package/types/pc/tour/index.d.ts +6 -1
- package/types/pc/transfer/interface.d.ts +2 -9
- package/types/pc/tree/interface.d.ts +2 -8
- package/types/pc/tree-select/interface.d.ts +0 -8
- package/types/pc/trigger/interface.d.ts +0 -5
- package/types/pc/typography/EditContent.d.ts +2 -1
- package/types/pc/typography/interface.d.ts +45 -30
- package/types/pc/upload/interface.d.ts +6 -11
- package/types/pc/utils/index.d.ts +1 -0
- package/types/pc/utils/names.d.ts +24 -0
- package/types/pc/utils/toArray.d.ts +7 -0
- package/types/pc/verification-code/interface.d.ts +0 -2
- package/types/pc/watermark/interface.d.ts +0 -2
- package/typography/Base.js +73 -73
- package/typography/EditContent.js +43 -33
- package/typography/Ellipsis.js +117 -184
- package/typography/Operations.js +97 -49
- package/typography/useCssEllipsis.js +7 -6
- package/utils/index.js +117 -115
- package/utils/names.js +16 -0
- package/utils/toArray.js +12 -0
- package/version/index.js +1 -1
- package/_virtual/_commonjsHelpers.js +0 -6
- package/_virtual/index.js +0 -7
- package/_virtual/index2.js +0 -4
- package/liquid-fill/LiquidFill.js +0 -226
- package/liquid-fill/LiquidFill2.js +0 -3
- package/space-/index.js +0 -93
- package/types/common/utils/color.d.ts +0 -1
- package/types/common/utils/computeScrollIntoView.d.ts +0 -1
- package/types/common/utils/index.d.ts +0 -45
- package/types/common/utils/math.d.ts +0 -1
- package/types/common/utils/reactTransitionGroup.d.ts +0 -1
- package/types/common/utils/tree.d.ts +0 -1
- package/types/common/utils/tween.d.ts +0 -1
- package/types/common/utils/uuid.d.ts +0 -1
- package/types/common/utils/validate.d.ts +0 -1
- package/types/pc/liquid-fill/LiquidFill.d.ts +0 -115
- package/types/pc/liquid-fill/LiquidFill2.d.ts +0 -1
- package/types/pc/space-/index.d.ts +0 -6
- package/types/pc/space-/interface.d.ts +0 -38
- /package/{space- → components/common/space}/toArray.js +0 -0
- /package/{space- → segmented}/interface.js +0 -0
- /package/types/{pc/space- → common/space}/toArray.d.ts +0 -0
- /package/types/pc/grid/{GridItem.d.ts → Item.d.ts} +0 -0
package/utils/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { default as s } from "@unicom-cloud/utils/case-name";
|
|
|
2
2
|
import { default as m } from "@unicom-cloud/utils/class-name";
|
|
3
3
|
import { cmykToRgb as p, convertDecimalToHex as l, convertHexToDecimal as n, hslToRgb as d, hsvToRgb as x, numberInputToObject as u, parseIntFromHex as c, rgbToCmyk as g, rgbToHex as y, rgbToHsl as T, rgbToHsv as S, rgbToRgb as R, rgbaToArgbHex as b, rgbaToHex as C } from "../dist/tinycolor/src/conversion.js";
|
|
4
4
|
import { names as E } from "../dist/tinycolor/src/css-color-names.js";
|
|
5
|
-
import { inputToRGB as
|
|
5
|
+
import { inputToRGB as N, isValidCSSUnit as v, stringInputToObject as D } from "../dist/tinycolor/src/format-input.js";
|
|
6
6
|
import { compareColorByRange as O } from "../dist/tinycolor/customize/index.js";
|
|
7
7
|
import { TinyColor as P } from "../dist/tinycolor/src/index.js";
|
|
8
8
|
import { a as B } from "../dist/tinycolor/chunk/BOzCVdr0.js";
|
|
@@ -18,7 +18,7 @@ import { fillNBSP as Te } from "../components/common/utils/fillNBSP.js";
|
|
|
18
18
|
import { getHighlightText as Re } from "../components/common/utils/getHighlightText.js";
|
|
19
19
|
import { getHotkeyHandler as Ce } from "../components/common/utils/getHotkeyHandler.js";
|
|
20
20
|
import { getStringLength as Ee } from "../components/common/utils/getStringLength.js";
|
|
21
|
-
import { include as
|
|
21
|
+
import { include as Ne } from "../components/common/utils/include.js";
|
|
22
22
|
import "lodash/isFunction";
|
|
23
23
|
import { default as De } from "lodash/throttle";
|
|
24
24
|
import * as r from "./is.js";
|
|
@@ -44,7 +44,7 @@ import { COMPONENT_NAMES as gr } from "./names.js";
|
|
|
44
44
|
import { omit as Tr } from "../components/common/utils/omit.js";
|
|
45
45
|
import { padEnd as Rr, padStart as br } from "../components/common/utils/pad.js";
|
|
46
46
|
import { pick as hr, pickDataAttributes as Er } from "../components/common/utils/pick.js";
|
|
47
|
-
import { PqbCSSTransition as
|
|
47
|
+
import { PqbCSSTransition as Nr } from "../components/common/utils/PqbCSSTransition.js";
|
|
48
48
|
import { callbackOriginRef as Dr, findDOMNode_ as Mr } from "../components/common/utils/reactDOM.js";
|
|
49
49
|
import { default as Ir } from "../dist/react-transition-group/src/CSSTransition.js";
|
|
50
50
|
import { default as kr } from "../dist/react-transition-group/src/ReplaceTransition.js";
|
|
@@ -60,34 +60,35 @@ import { setPrimaryColor as tt } from "./setPrimaryColor.js";
|
|
|
60
60
|
import { setTheme as at } from "./setTheme.js";
|
|
61
61
|
import { fixedWidth as it, getStyle as mt, setTransformStyle as ft } from "../components/common/utils/style.js";
|
|
62
62
|
import { throttleByRaf as lt } from "../components/common/utils/throttleByRaf.js";
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
63
|
+
import { toArray as dt } from "./toArray.js";
|
|
64
|
+
import { findNodeBy as ut, getChildWithParentBy as ct, getItemBy as gt, getItemBy2 as yt, getItemBy3 as Tt, getItemByID as St, getLabelFromDictionaryByValue as Rt } from "@unicom-cloud/utils/tree";
|
|
65
|
+
import { Tween as Ct } from "../dist/tween/src/tween.js";
|
|
66
|
+
import { default as Et } from "../dist/tween/src/easing.js";
|
|
67
|
+
import { v4 as Nt, v4 as vt } from "uuid";
|
|
68
|
+
import { Schema as Mt, default as Ot } from "../dist/validate/src/index.js";
|
|
69
|
+
import { d as Pt } from "../dist/validate/chunk/BXTR2LmP.js";
|
|
70
|
+
import { warning as Bt } from "../components/common/utils/warning.js";
|
|
70
71
|
import * as t from "@unicom-cloud/utils/constant/keyboardCode";
|
|
71
|
-
import { UI_PC_KEY as
|
|
72
|
-
import { NOOP as
|
|
73
|
-
import { isArguments as
|
|
74
|
-
import { isClassComponent as
|
|
75
|
-
import { isAsyncMode as
|
|
72
|
+
import { UI_PC_KEY as Vt, UI_PC_THEME_DARK_CLASS_NAME as jt } from "@unicom-cloud/utils/constant/ui";
|
|
73
|
+
import { NOOP as Ht } from "../components/common/utils/constant.js";
|
|
74
|
+
import { isArguments as Wt, isArray as _t, isArrayBuffer as Ut, isArrayLike as zt, isArrayLikeObject as qt, isBlob as Gt, isBoolean as Kt, isBuffer as Jt, isColor as Yt, isColor2 as Qt, isDate as Xt, isElement as Zt, isEmpty as $t, isEmptyArray as eo, isEmptyObject as ro, isEmptyValue as to, isEqual as oo, isEqualWith as ao, isError as so, isFile as io, isFinite as mo, isFunction as fo, isInteger as po, isJSON as lo, isLength as no, isMap as xo, isMatch as uo, isMatchWith as co, isNaN as go, isNative as yo, isNil as To, isNull as So, isNumber as Ro, isObject as bo, isObjectLike as Co, isPlainObject as ho, isPromise as Eo, isReadableByteStreamControllerSupported as Ao, isReadableStream as No, isReadableStreamDefaultControllerSupported as vo, isReadableStreamSupported as Do, isReadableStreamSymbolAsyncIteratorSupported as Mo, isRegExp as Oo, isSafeInteger as Io, isSet as Po, isString as ko, isSymbol as Bo, isTypedArray as wo, isUndefined as Vo, isValidColor as jo, isWeakMap as Fo, isWeakSet as Ho } from "@unicom-cloud/utils/is";
|
|
75
|
+
import { isClassComponent as Wo, isDOMElement as _o, isDayjs as Uo, isEmptyReactNode as zo, isExist as qo, isForwardRefReact as Go, isNullOrUndefined as Ko, isReact18 as Jo, isReact19 as Yo, isReactComponent as Qo, isSupportRef as Xo, isWindow as Zo, supportRef as $o } from "../components/common/utils/is.js";
|
|
76
|
+
import { isAsyncMode as ra, isConcurrentMode as ta, isContextConsumer as oa, isContextProvider as aa, isElement as sa, isForwardRef as ia, isFragment as ma, isLazy as fa, isMemo as pa, isPortal as la, isProfiler as na, isStrictMode as da, isSuspense as xa, isValidElementType as ua } from "react-is";
|
|
76
77
|
export {
|
|
77
78
|
gr as COMPONENT_NAMES,
|
|
78
79
|
Ir as CSSTransition,
|
|
79
80
|
_ as ContextHolderElement,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
Pt as DefaultValidateMessage,
|
|
82
|
+
Ht as NOOP,
|
|
83
|
+
Nr as PqbCSSTransition,
|
|
83
84
|
kr as ReplaceTransition,
|
|
84
|
-
|
|
85
|
+
Mt as Schema,
|
|
85
86
|
wr as SwitchTransition,
|
|
86
87
|
P as TinyColor,
|
|
87
88
|
jr as Transition,
|
|
88
89
|
Hr as TransitionGroup,
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
Vt as UI_PC_KEY,
|
|
91
|
+
jt as UI_PC_THEME_DARK_CLASS_NAME,
|
|
91
92
|
Dr as callbackOriginRef,
|
|
92
93
|
Oe as camelCase,
|
|
93
94
|
Pe as capitalize,
|
|
@@ -109,22 +110,22 @@ export {
|
|
|
109
110
|
Y as dayjs,
|
|
110
111
|
Ve as debounce,
|
|
111
112
|
ir as div,
|
|
112
|
-
|
|
113
|
+
Et as easing,
|
|
113
114
|
ge as fileToURL,
|
|
114
115
|
Te as fillNBSP,
|
|
115
116
|
Mr as findDOMNode_,
|
|
116
|
-
|
|
117
|
+
ut as findNodeBy,
|
|
117
118
|
it as fixedWidth,
|
|
118
119
|
Fe as get,
|
|
119
|
-
|
|
120
|
+
ct as getChildWithParentBy,
|
|
120
121
|
Q as getDayjsValue,
|
|
121
122
|
Re as getHighlightText,
|
|
122
123
|
Ce as getHotkeyHandler,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
gt as getItemBy,
|
|
125
|
+
yt as getItemBy2,
|
|
126
|
+
Tt as getItemBy3,
|
|
127
|
+
St as getItemByID,
|
|
128
|
+
Rt as getLabelFromDictionaryByValue,
|
|
128
129
|
X as getNow,
|
|
129
130
|
le as getScrollElements,
|
|
130
131
|
Z as getSortedDayjsArray,
|
|
@@ -135,93 +136,93 @@ export {
|
|
|
135
136
|
Le as has,
|
|
136
137
|
d as hslToRgb,
|
|
137
138
|
x as hsvToRgb,
|
|
138
|
-
|
|
139
|
-
|
|
139
|
+
Ne as include,
|
|
140
|
+
N as inputToRGB,
|
|
140
141
|
r as is,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
142
|
+
Wt as isArguments,
|
|
143
|
+
_t as isArray,
|
|
144
|
+
Ut as isArrayBuffer,
|
|
145
|
+
zt as isArrayLike,
|
|
146
|
+
qt as isArrayLikeObject,
|
|
147
|
+
Gt as isBlob,
|
|
148
|
+
Kt as isBoolean,
|
|
149
|
+
Jt as isBuffer,
|
|
150
|
+
Wo as isClassComponent,
|
|
151
|
+
Yt as isColor,
|
|
152
|
+
Qt as isColor2,
|
|
153
|
+
_o as isDOMElement,
|
|
154
|
+
Xt as isDate,
|
|
155
|
+
Uo as isDayjs,
|
|
155
156
|
re as isDayjsArrayChange,
|
|
156
157
|
te as isDayjsChange,
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
158
|
+
Zt as isElement,
|
|
159
|
+
$t as isEmpty,
|
|
160
|
+
eo as isEmptyArray,
|
|
161
|
+
ro as isEmptyObject,
|
|
162
|
+
zo as isEmptyReactNode,
|
|
163
|
+
to as isEmptyValue,
|
|
164
|
+
oo as isEqual,
|
|
165
|
+
ao as isEqualWith,
|
|
166
|
+
so as isError,
|
|
167
|
+
qo as isExist,
|
|
168
|
+
io as isFile,
|
|
169
|
+
mo as isFinite,
|
|
170
|
+
Go as isForwardRefReact,
|
|
171
|
+
fo as isFunction,
|
|
172
|
+
po as isInteger,
|
|
173
|
+
lo as isJSON,
|
|
174
|
+
no as isLength,
|
|
175
|
+
xo as isMap,
|
|
176
|
+
uo as isMatch,
|
|
177
|
+
co as isMatchWith,
|
|
178
|
+
go as isNaN,
|
|
179
|
+
yo as isNative,
|
|
180
|
+
To as isNil,
|
|
181
|
+
So as isNull,
|
|
182
|
+
Ko as isNullOrUndefined,
|
|
183
|
+
Ro as isNumber,
|
|
184
|
+
bo as isObject,
|
|
185
|
+
Co as isObjectLike,
|
|
186
|
+
ho as isPlainObject,
|
|
187
|
+
Eo as isPromise,
|
|
188
|
+
Jo as isReact18,
|
|
189
|
+
Yo as isReact19,
|
|
190
|
+
ra as isReactAsyncMode,
|
|
191
|
+
Qo as isReactComponent,
|
|
192
|
+
ta as isReactConcurrentMode,
|
|
193
|
+
oa as isReactContextConsumer,
|
|
194
|
+
aa as isReactContextProvider,
|
|
195
|
+
sa as isReactElement,
|
|
196
|
+
ia as isReactForwardRef,
|
|
197
|
+
ma as isReactFragment,
|
|
198
|
+
fa as isReactLazy,
|
|
199
|
+
pa as isReactMemo,
|
|
200
|
+
la as isReactPortal,
|
|
201
|
+
na as isReactProfiler,
|
|
202
|
+
da as isReactStrictMode,
|
|
203
|
+
xa as isReactSuspense,
|
|
204
|
+
ua as isReactValidElementType,
|
|
205
|
+
Ao as isReadableByteStreamControllerSupported,
|
|
206
|
+
No as isReadableStream,
|
|
207
|
+
vo as isReadableStreamDefaultControllerSupported,
|
|
208
|
+
Do as isReadableStreamSupported,
|
|
209
|
+
Mo as isReadableStreamSymbolAsyncIteratorSupported,
|
|
210
|
+
Oo as isRegExp,
|
|
211
|
+
Io as isSafeInteger,
|
|
211
212
|
ne as isScrollElement,
|
|
212
213
|
de as isServerRendering,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
214
|
+
Po as isSet,
|
|
215
|
+
ko as isString,
|
|
216
|
+
Xo as isSupportRef,
|
|
217
|
+
Bo as isSymbol,
|
|
218
|
+
wo as isTypedArray,
|
|
219
|
+
Vo as isUndefined,
|
|
219
220
|
v as isValidCSSUnit,
|
|
220
|
-
|
|
221
|
+
jo as isValidColor,
|
|
221
222
|
oe as isValidTimeString,
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
223
|
+
Fo as isWeakMap,
|
|
224
|
+
Ho as isWeakSet,
|
|
225
|
+
Zo as isWindow,
|
|
225
226
|
_e as kebabCase,
|
|
226
227
|
t as keyboardCode,
|
|
227
228
|
mr as math,
|
|
@@ -268,18 +269,19 @@ export {
|
|
|
268
269
|
Ze as snakeCase,
|
|
269
270
|
er as startCase,
|
|
270
271
|
D as stringInputToObject,
|
|
271
|
-
|
|
272
|
+
$o as supportRef,
|
|
272
273
|
De as throttle,
|
|
273
274
|
lt as throttleByRaf,
|
|
274
275
|
lr as times,
|
|
275
276
|
se as timezoneToOffset,
|
|
277
|
+
dt as toArray,
|
|
276
278
|
ie as toLocal,
|
|
277
279
|
me as toTimezone,
|
|
278
|
-
|
|
280
|
+
Ct as tween,
|
|
279
281
|
tr as uniq,
|
|
280
282
|
ar as upperFirst,
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
283
|
+
Nt as uuid,
|
|
284
|
+
vt as uuidv4,
|
|
285
|
+
Ot as validate,
|
|
286
|
+
Bt as warning
|
|
285
287
|
};
|
package/utils/names.js
CHANGED
|
@@ -558,6 +558,22 @@ const e = {
|
|
|
558
558
|
LiquidFill: {
|
|
559
559
|
zh: "水球图",
|
|
560
560
|
en: "LiquidFill"
|
|
561
|
+
},
|
|
562
|
+
Marquee: {
|
|
563
|
+
zh: "跑马灯",
|
|
564
|
+
en: "Marquee"
|
|
565
|
+
},
|
|
566
|
+
Segmented: {
|
|
567
|
+
zh: "分段控制器",
|
|
568
|
+
en: "Segmented"
|
|
569
|
+
},
|
|
570
|
+
Splitter: {
|
|
571
|
+
zh: "分隔面板",
|
|
572
|
+
en: "Splitter"
|
|
573
|
+
},
|
|
574
|
+
Flex: {
|
|
575
|
+
zh: "弹性布局",
|
|
576
|
+
en: "Flex"
|
|
561
577
|
}
|
|
562
578
|
};
|
|
563
579
|
export {
|
package/utils/toArray.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import t from "react";
|
|
2
|
+
import { isFragment as f } from "react-is";
|
|
3
|
+
function s(a, p = {}) {
|
|
4
|
+
const e = [];
|
|
5
|
+
return t.Children.forEach(a, (r) => {
|
|
6
|
+
r == null && !p.keepEmpty || (Array.isArray(r) ? e.push(...s(r, p)) : f(r) && "props" in r && r.props ? e.push(...s(r.props.children, p)) : t.isValidElement(r) && e.push(r));
|
|
7
|
+
}), e;
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
s as default,
|
|
11
|
+
s as toArray
|
|
12
|
+
};
|
package/version/index.js
CHANGED
package/_virtual/index.js
DELETED
package/_virtual/index2.js
DELETED
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
import { jsx as a, jsxs as x } from "react/jsx-runtime";
|
|
2
|
-
import { useContext as nt, useRef as P, useState as O, useEffect as j } from "react";
|
|
3
|
-
import "../config-provider/ConfigProvider.js";
|
|
4
|
-
import "@unicom-cloud/utils/case-name";
|
|
5
|
-
import at from "@unicom-cloud/utils/class-name";
|
|
6
|
-
import "../dist/tinycolor/chunk/BOzCVdr0.js";
|
|
7
|
-
import "@unicom-cloud/utils/constant/ui";
|
|
8
|
-
import "../utils/contextHolder.js";
|
|
9
|
-
import "@unicom-cloud/utils/dayjs";
|
|
10
|
-
import "@unicom-cloud/utils/clipboard-copy";
|
|
11
|
-
import "../components/common/utils/dayjs.js";
|
|
12
|
-
import "../components/common/utils/dom.js";
|
|
13
|
-
import "@unicom-cloud/utils/file/fileToURL";
|
|
14
|
-
import "lodash/escapeRegExp";
|
|
15
|
-
import "lodash/isArray";
|
|
16
|
-
import "lodash/isNumber";
|
|
17
|
-
import "lodash/isString";
|
|
18
|
-
import "lodash/isFunction";
|
|
19
|
-
import "lodash/throttle";
|
|
20
|
-
import "../components/common/utils/is.js";
|
|
21
|
-
import "lodash/camelCase";
|
|
22
|
-
import "lodash/capitalize";
|
|
23
|
-
import "lodash/cloneDeep";
|
|
24
|
-
import "lodash/debounce";
|
|
25
|
-
import "lodash/get";
|
|
26
|
-
import "lodash/has";
|
|
27
|
-
import "lodash/kebabCase";
|
|
28
|
-
import st from "lodash/merge";
|
|
29
|
-
import "lodash/mergeWith";
|
|
30
|
-
import "lodash/set";
|
|
31
|
-
import "lodash/setWith";
|
|
32
|
-
import "lodash/snakeCase";
|
|
33
|
-
import "lodash/startCase";
|
|
34
|
-
import "lodash/uniq";
|
|
35
|
-
import "lodash/upperFirst";
|
|
36
|
-
import "@unicom-cloud/utils/math";
|
|
37
|
-
import "lodash/isPlainObject";
|
|
38
|
-
import "../dist/react-transition-group/src/CSSTransition.js";
|
|
39
|
-
import "../dist/react-transition-group/src/ReplaceTransition.js";
|
|
40
|
-
import "../dist/react-transition-group/src/SwitchTransition.js";
|
|
41
|
-
import "../dist/react-transition-group/chunk/CPfP7aNL.js";
|
|
42
|
-
import "../dist/react-transition-group/src/TransitionGroup.js";
|
|
43
|
-
import "../components/common/utils/reactDOM.js";
|
|
44
|
-
import "@unicom-cloud/utils/file/saveAs";
|
|
45
|
-
import "@unicom-cloud/utils/screenfull";
|
|
46
|
-
import "@unicom-cloud/utils/constant/ui.js";
|
|
47
|
-
import "@unicom-cloud/utils/tree";
|
|
48
|
-
import "@unicom-cloud/utils/is";
|
|
49
|
-
import { v4 as b } from "uuid";
|
|
50
|
-
import "../dist/validate/src/index.js";
|
|
51
|
-
import "@unicom-cloud/utils/constant/keyboardCode";
|
|
52
|
-
import mt from "../config-provider/context.js";
|
|
53
|
-
const se = (D) => {
|
|
54
|
-
const { getPrefixCls: I, componentConfig: V } = nt(mt), {
|
|
55
|
-
style: _,
|
|
56
|
-
className: E,
|
|
57
|
-
value: A = 0.5,
|
|
58
|
-
size: i = 200,
|
|
59
|
-
fontSize: h,
|
|
60
|
-
waveColor: F = "rgb(var(--pqb-blue-6))",
|
|
61
|
-
backgroundColor: N = "var(--pqb-color-neutral-1)",
|
|
62
|
-
textColor: H = "var(--pqb-color-neutral-8)",
|
|
63
|
-
showPercent: Y = !0,
|
|
64
|
-
duration: y = 2e3,
|
|
65
|
-
waveCount: c = 3,
|
|
66
|
-
waveAmplitude: J = 10,
|
|
67
|
-
borderColor: q = "var(--pqb-color-neutral-4)",
|
|
68
|
-
borderWidth: g = 2,
|
|
69
|
-
outerBorderColor: K = q,
|
|
70
|
-
outerBorderWidth: w = 0,
|
|
71
|
-
borderGap: Q = 2,
|
|
72
|
-
decimalPlaces: U = 0,
|
|
73
|
-
percentFontScale: X = 0.5,
|
|
74
|
-
waveSpeedVariation: Z = 0.5
|
|
75
|
-
} = st({}, V?.LiquidFill, D), n = I?.("liquid-fill"), d = P({
|
|
76
|
-
clipPath: b(),
|
|
77
|
-
// 裁剪路径ID
|
|
78
|
-
waveGradient: b(),
|
|
79
|
-
// 波浪渐变ID
|
|
80
|
-
bgGradient: b()
|
|
81
|
-
// 背景渐变ID
|
|
82
|
-
}).current, tt = P(null), o = P({
|
|
83
|
-
fill: 0,
|
|
84
|
-
// 填充动画ID
|
|
85
|
-
wave: 0,
|
|
86
|
-
// 波浪动画ID
|
|
87
|
-
startTime: 0
|
|
88
|
-
// 动画开始时间
|
|
89
|
-
}).current, [$, G] = O(0), [et, z] = O([]), M = i / 2 - w / 2, W = M - Q - g / 2, m = W - g / 2, e = i / 2, S = m * 2, rt = S * ($ / 100) + g / 2, k = (r, t) => {
|
|
90
|
-
if (typeof t == "string") return null;
|
|
91
|
-
const { from: s, to: l, direction: p = "vertical" } = t;
|
|
92
|
-
return /* @__PURE__ */ x("linearGradient", { id: r, x1: "0%", y1: "0%", x2: p === "horizontal" ? "100%" : "0%", y2: p === "horizontal" ? "0%" : "100%", children: [
|
|
93
|
-
/* @__PURE__ */ a("stop", { offset: "0%", stopColor: s }),
|
|
94
|
-
/* @__PURE__ */ a("stop", { offset: "100%", stopColor: l })
|
|
95
|
-
] });
|
|
96
|
-
}, B = (r, t) => typeof r == "string" ? r : `url(#${t})`, ot = (r, t, s) => {
|
|
97
|
-
const l = [], v = e - m, L = e + m;
|
|
98
|
-
for (let f = 0; f <= 30; f++) {
|
|
99
|
-
const u = v + f / 30 * S, C = Math.min(
|
|
100
|
-
e + m - rt + // 这里原来是减去 waterHeight,现在直接使用 waterHeight
|
|
101
|
-
r * Math.sin((u - v) * t + s),
|
|
102
|
-
e + m
|
|
103
|
-
);
|
|
104
|
-
l.push([u, C]);
|
|
105
|
-
}
|
|
106
|
-
return l.push([L, e + m]), l.push([v, e + m]), l.map(([f, u], C) => `${C === 0 ? "M" : "L"}${f} ${u}`).join(" ");
|
|
107
|
-
}, it = () => Array.from({ length: c }).map((r, t) => {
|
|
108
|
-
const s = J * (c - t) / c, l = 0.02 * (t + 1), p = et[t] || 0;
|
|
109
|
-
return /* @__PURE__ */ a(
|
|
110
|
-
"path",
|
|
111
|
-
{
|
|
112
|
-
className: `${n}-path`,
|
|
113
|
-
d: ot(s, l, p),
|
|
114
|
-
fill: B(F, d.waveGradient),
|
|
115
|
-
fillOpacity: 0.3 + 0.7 / c * t
|
|
116
|
-
},
|
|
117
|
-
t
|
|
118
|
-
);
|
|
119
|
-
}), R = () => {
|
|
120
|
-
z(
|
|
121
|
-
(r) => r.map(
|
|
122
|
-
(t, s) => t + 0.02 * (s + 1) * (1 + Z * Math.random())
|
|
123
|
-
)
|
|
124
|
-
), $ < 100 && (o.wave = requestAnimationFrame(R));
|
|
125
|
-
}, T = (r) => {
|
|
126
|
-
o.startTime || (o.startTime = r);
|
|
127
|
-
const t = r - o.startTime, s = Math.min(t / y, 1) * A * 100;
|
|
128
|
-
G(s), t < y && (o.fill = requestAnimationFrame(T));
|
|
129
|
-
};
|
|
130
|
-
return j(() => {
|
|
131
|
-
z(Array.from({ length: c }, (r, t) => t * Math.PI));
|
|
132
|
-
}, [c]), j(() => (cancelAnimationFrame(o.fill), cancelAnimationFrame(o.wave), o.startTime = 0, G(0), o.fill = requestAnimationFrame(T), o.wave = requestAnimationFrame(R), () => {
|
|
133
|
-
cancelAnimationFrame(o.fill), cancelAnimationFrame(o.wave);
|
|
134
|
-
}), [A, y, c]), /* @__PURE__ */ a(
|
|
135
|
-
"div",
|
|
136
|
-
{
|
|
137
|
-
className: at(n, E),
|
|
138
|
-
style: {
|
|
139
|
-
width: i,
|
|
140
|
-
height: i,
|
|
141
|
-
..._
|
|
142
|
-
},
|
|
143
|
-
children: /* @__PURE__ */ x(
|
|
144
|
-
"svg",
|
|
145
|
-
{
|
|
146
|
-
className: `${n}-svg`,
|
|
147
|
-
ref: tt,
|
|
148
|
-
width: i,
|
|
149
|
-
height: i,
|
|
150
|
-
viewBox: `0 0 ${i} ${i}`,
|
|
151
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
152
|
-
children: [
|
|
153
|
-
/* @__PURE__ */ x("defs", { children: [
|
|
154
|
-
k(d.waveGradient, F),
|
|
155
|
-
k(d.bgGradient, N),
|
|
156
|
-
/* @__PURE__ */ a("clipPath", { id: d.clipPath, className: `${n}-clipPath`, children: /* @__PURE__ */ a(
|
|
157
|
-
"circle",
|
|
158
|
-
{
|
|
159
|
-
className: `${n}-clipPath-circle`,
|
|
160
|
-
cx: e,
|
|
161
|
-
cy: e,
|
|
162
|
-
r: m
|
|
163
|
-
}
|
|
164
|
-
) })
|
|
165
|
-
] }),
|
|
166
|
-
w > 0 && /* @__PURE__ */ a(
|
|
167
|
-
"circle",
|
|
168
|
-
{
|
|
169
|
-
className: `${n}-outerBorder`,
|
|
170
|
-
cx: e,
|
|
171
|
-
cy: e,
|
|
172
|
-
r: M,
|
|
173
|
-
fill: "none",
|
|
174
|
-
stroke: K,
|
|
175
|
-
strokeWidth: w,
|
|
176
|
-
strokeOpacity: 0.5
|
|
177
|
-
}
|
|
178
|
-
),
|
|
179
|
-
/* @__PURE__ */ a(
|
|
180
|
-
"circle",
|
|
181
|
-
{
|
|
182
|
-
className: `${n}-border`,
|
|
183
|
-
cx: e,
|
|
184
|
-
cy: e,
|
|
185
|
-
r: W,
|
|
186
|
-
fill: B(N, d.bgGradient),
|
|
187
|
-
stroke: q,
|
|
188
|
-
strokeWidth: g
|
|
189
|
-
}
|
|
190
|
-
),
|
|
191
|
-
/* @__PURE__ */ a("g", { className: `${n}-g`, clipPath: `url(#${d.clipPath})`, children: it() }),
|
|
192
|
-
Y && /* @__PURE__ */ x(
|
|
193
|
-
"text",
|
|
194
|
-
{
|
|
195
|
-
className: `${n}-text`,
|
|
196
|
-
x: e,
|
|
197
|
-
y: e,
|
|
198
|
-
fill: H,
|
|
199
|
-
fontSize: typeof h == "string" ? h : i * 0.15,
|
|
200
|
-
textAnchor: "middle",
|
|
201
|
-
dominantBaseline: "middle",
|
|
202
|
-
children: [
|
|
203
|
-
$.toFixed(U),
|
|
204
|
-
/* @__PURE__ */ a(
|
|
205
|
-
"tspan",
|
|
206
|
-
{
|
|
207
|
-
style: {
|
|
208
|
-
fontSize: `calc(${typeof h == "string" ? h : `${i * 0.15}px`} * ${X})`
|
|
209
|
-
},
|
|
210
|
-
className: `${n}-text-tspan`,
|
|
211
|
-
alignmentBaseline: "mathematical",
|
|
212
|
-
children: "%"
|
|
213
|
-
}
|
|
214
|
-
)
|
|
215
|
-
]
|
|
216
|
-
}
|
|
217
|
-
)
|
|
218
|
-
]
|
|
219
|
-
}
|
|
220
|
-
)
|
|
221
|
-
}
|
|
222
|
-
);
|
|
223
|
-
};
|
|
224
|
-
export {
|
|
225
|
-
se as default
|
|
226
|
-
};
|