@unicom-cloud/ui-common 0.1.44 → 0.1.46
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/.virtual/_rolldown/runtime.js +1 -1
- package/animation/Animation.js +2 -2
- package/animation/constants.js +1 -1
- package/animation/context.js +1 -1
- package/animation/index.js +1 -1
- package/animation/style/index.js +1 -1
- package/animation/utils.js +1 -1
- package/base/Base.js +1 -1
- package/base/constants.js +1 -1
- package/base/context.js +1 -1
- package/base/index.js +1 -1
- package/base/style/index.js +1 -1
- package/base/utils.js +1 -1
- package/border-beam/BorderBeam.d.ts +6 -1
- package/border-beam/BorderBeam.js +2 -3
- package/border-beam/Effect.js +1 -1
- package/border-beam/constants.js +1 -1
- package/border-beam/context.js +1 -1
- package/border-beam/hooks/useBorderSize.js +1 -1
- package/border-beam/hooks/useChildDom.js +1 -1
- package/border-beam/index.d.ts +5 -0
- package/border-beam/index.js +1 -1
- package/border-beam/style/index.js +1 -1
- package/border-beam/utils.js +1 -1
- package/development/Development.d.ts +6 -1
- package/development/Development.js +2 -3
- package/development/constants.js +1 -1
- package/development/context.js +1 -1
- package/development/index.d.ts +5 -0
- package/development/index.js +1 -1
- package/development/style/index.js +1 -1
- package/development/utils.js +1 -1
- package/empty/Empty.d.ts +7 -1
- package/empty/Empty.js +2 -3
- package/empty/constants.js +1 -1
- package/empty/context.js +1 -1
- package/empty/index.d.ts +5 -0
- package/empty/index.js +1 -1
- package/empty/style/index.js +1 -1
- package/empty/utils.js +1 -1
- package/flex/Flex.d.ts +12 -2
- package/flex/Flex.js +35 -37
- package/flex/constants.js +1 -1
- package/flex/context.js +1 -1
- package/flex/index.d.ts +11 -1
- package/flex/index.js +1 -1
- package/flex/interface.d.ts +3 -12
- package/flex/style/index.js +1 -1
- package/flex/utils.js +2 -2
- package/higher-order/index.js +1 -1
- package/higher-order/with-speech-synthesis/context.js +1 -1
- package/higher-order/with-speech-synthesis/index.js +1 -1
- package/higher-order/with-speech-synthesis/style/index.js +1 -1
- package/higher-order/with-speech-synthesis/withSpeechSynthesis.js +1 -1
- package/hoc/withContext.js +1 -1
- package/hooks/create-deep-compare-effect/index.js +1 -1
- package/hooks/create-update-effect/index.js +1 -1
- package/hooks/create-use-storage-state/index.js +1 -1
- package/hooks/index.js +1 -1
- package/hooks/use-async-effect/index.js +1 -1
- package/hooks/use-boolean/index.js +1 -1
- package/hooks/use-click-away/index.js +1 -1
- package/hooks/use-computed-state/index.js +1 -1
- package/hooks/use-controllable-value/index.js +1 -1
- package/hooks/use-cookie-state/index.js +1 -1
- package/hooks/use-count-down/index.js +1 -1
- package/hooks/use-counter/index.js +1 -1
- package/hooks/use-create/index.js +1 -1
- package/hooks/use-creation/index.js +1 -1
- package/hooks/use-debounce/index.js +1 -1
- package/hooks/use-debounce-effect/index.js +1 -1
- package/hooks/use-debounce-fn/index.js +1 -1
- package/hooks/use-deep-compare-effect/index.js +1 -1
- package/hooks/use-deep-compare-layout-effect/index.js +1 -1
- package/hooks/use-document-visibility/index.js +1 -1
- package/hooks/use-drag/index.js +1 -1
- package/hooks/use-drag-move/index.js +1 -1
- package/hooks/use-drop/index.js +1 -1
- package/hooks/use-effect-event/index.js +1 -1
- package/hooks/use-event/index.js +1 -1
- package/hooks/use-event-emitter/index.js +1 -1
- package/hooks/use-event-listener/index.js +1 -1
- package/hooks/use-event-target/index.js +1 -1
- package/hooks/use-external/index.js +1 -1
- package/hooks/use-favicon/index.js +1 -1
- package/hooks/use-focus-within/index.js +1 -1
- package/hooks/use-force-update/index.js +1 -1
- package/hooks/use-fullscreen/index.js +1 -1
- package/hooks/use-get-state/index.js +1 -1
- package/hooks/use-history-travel/index.js +1 -1
- package/hooks/use-hover/index.js +1 -1
- package/hooks/use-id/index.js +1 -1
- package/hooks/use-in-viewport/index.js +1 -1
- package/hooks/use-infinite-scroll/index.js +1 -1
- package/hooks/use-intersection-observer/index.js +1 -1
- package/hooks/use-intersection-observers/index.js +1 -1
- package/hooks/use-interval/index.js +1 -1
- package/hooks/use-is-first-render/index.js +1 -1
- package/hooks/use-isomorphic-layout-effect/index.js +1 -1
- package/hooks/use-key-press/index.js +1 -1
- package/hooks/use-keyboard-event/index.js +1 -1
- package/hooks/use-latest/index.js +1 -1
- package/hooks/use-listen-window-resize/index.js +1 -1
- package/hooks/use-local-storage-state/index.js +1 -1
- package/hooks/use-lock-fn/index.js +1 -1
- package/hooks/use-long-press/index.js +1 -1
- package/hooks/use-map/index.js +1 -1
- package/hooks/use-media/index.js +1 -1
- package/hooks/use-memo/index.js +1 -1
- package/hooks/use-memoized-fn/index.js +1 -1
- package/hooks/use-merge-props/index.js +1 -1
- package/hooks/use-merge-value/index.js +1 -1
- package/hooks/use-mobile/index.js +1 -1
- package/hooks/use-mount/index.js +1 -1
- package/hooks/use-mouse/index.js +1 -1
- package/hooks/use-move/index.js +1 -1
- package/hooks/use-mutation-observer/index.js +1 -1
- package/hooks/use-mutation-observers/index.js +1 -1
- package/hooks/use-network/index.js +1 -1
- package/hooks/use-online-status/index.js +1 -1
- package/hooks/use-overflow-hidden/index.js +1 -1
- package/hooks/use-override-ref/index.js +1 -1
- package/hooks/use-pagination/index.js +1 -1
- package/hooks/use-paste-image/index.js +1 -1
- package/hooks/use-persist-callback/index.js +1 -1
- package/hooks/use-prefers-color-scheme-dark/index.js +1 -1
- package/hooks/use-previous/index.js +1 -1
- package/hooks/use-raf-interval/index.js +1 -1
- package/hooks/use-raf-state/index.js +1 -1
- package/hooks/use-raf-timeout/index.js +1 -1
- package/hooks/use-reactive/index.js +1 -1
- package/hooks/use-ref-latest/index.js +1 -1
- package/hooks/use-refs/index.js +1 -1
- package/hooks/use-request/index.js +1 -1
- package/hooks/use-request/src/Fetch.js +1 -1
- package/hooks/use-request/src/plugins/useAutoRunPlugin.js +1 -1
- package/hooks/use-request/src/plugins/useCachePlugin.js +1 -1
- package/hooks/use-request/src/plugins/useDebouncePlugin.js +29 -22
- package/hooks/use-request/src/plugins/useLoadingDelayPlugin.js +1 -1
- package/hooks/use-request/src/plugins/usePollingPlugin.js +1 -1
- package/hooks/use-request/src/plugins/useRefreshOnWindowFocusPlugin.js +1 -1
- package/hooks/use-request/src/plugins/useRetryPlugin.js +1 -1
- package/hooks/use-request/src/plugins/useThrottlePlugin.js +1 -1
- package/hooks/use-request/src/useRequest.js +1 -1
- package/hooks/use-request/src/useRequestImplement.js +1 -1
- package/hooks/use-request/src/utils/cache.js +1 -1
- package/hooks/use-request/src/utils/cachePromise.js +1 -1
- package/hooks/use-request/src/utils/cacheSubscribe.js +1 -1
- package/hooks/use-request/src/utils/isDocumentVisible.js +1 -1
- package/hooks/use-request/src/utils/isOnline.js +1 -1
- package/hooks/use-request/src/utils/limit.js +1 -1
- package/hooks/use-request/src/utils/subscribeFocus.js +2 -2
- package/hooks/use-request/src/utils/subscribeReVisible.js +1 -1
- package/hooks/use-reset-state/index.js +1 -1
- package/hooks/use-resize-observer/index.js +1 -1
- package/hooks/use-resize-observers/index.js +1 -1
- package/hooks/use-responsive/index.js +1 -1
- package/hooks/use-safe-state/index.js +1 -1
- package/hooks/use-scroll/index.js +1 -1
- package/hooks/use-selections/index.js +1 -1
- package/hooks/use-session-storage-state/index.js +1 -1
- package/hooks/use-set/index.js +1 -1
- package/hooks/use-set-state/index.js +1 -1
- package/hooks/use-size/index.js +1 -1
- package/hooks/use-state-callback/index.js +1 -1
- package/hooks/use-state-with-promise/index.js +1 -1
- package/hooks/use-sync-state/index.js +1 -1
- package/hooks/use-text-selection/index.js +1 -1
- package/hooks/use-theme/index.js +1 -1
- package/hooks/use-throttle/index.js +1 -1
- package/hooks/use-throttle-effect/index.js +1 -1
- package/hooks/use-throttle-fn/index.js +1 -1
- package/hooks/use-throttle-fn-with-raf/index.js +1 -1
- package/hooks/use-timeout/index.js +1 -1
- package/hooks/use-title/index.js +1 -1
- package/hooks/use-toggle/index.js +1 -1
- package/hooks/use-tracked-effect/index.js +1 -1
- package/hooks/use-unmount/index.js +1 -1
- package/hooks/use-unmounted-ref/index.js +1 -1
- package/hooks/use-update/index.js +1 -1
- package/hooks/use-update-effect/index.js +1 -1
- package/hooks/use-update-layout-effect/index.js +1 -1
- package/hooks/use-url-state/index.js +1 -1
- package/hooks/use-virtual-list/index.js +1 -1
- package/hooks/use-watch/index.js +1 -1
- package/hooks/use-web-socket/index.js +1 -1
- package/hooks/use-why-did-you-update/index.js +1 -1
- package/hooks/use-window-size/index.js +1 -1
- package/hooks/utils/createEffectWithTarget.js +1 -1
- package/hooks/utils/depsAreSame.js +1 -1
- package/hooks/utils/depsEqual.js +1 -1
- package/hooks/utils/domTarget.js +1 -1
- package/hooks/utils/getDocumentOrShadow.js +1 -1
- package/hooks/utils/index.js +1 -1
- package/hooks/utils/isAppleDevice.js +1 -1
- package/hooks/utils/isBrowser.js +1 -1
- package/hooks/utils/isDev.js +1 -1
- package/hooks/utils/rect.js +1 -1
- package/hooks/utils/useDeepCompareWithTarget.js +1 -1
- package/hooks/utils/useEffectWithTarget.js +1 -1
- package/hooks/utils/useIsomorphicLayoutEffectWithTarget.js +1 -1
- package/hooks/utils/useLayoutEffectWithTarget.js +1 -1
- package/icons/file/File.d.ts +6 -1
- package/icons/file/File.js +2 -3
- package/icons/file/context.js +1 -1
- package/icons/file/index.d.ts +5 -0
- package/icons/file/index.js +1 -1
- package/icons/file/style/index.js +1 -1
- package/index.js +632 -630
- package/package.json +1 -1
- package/progress/Progress.js +1 -1
- package/progress/constants.js +1 -1
- package/progress/index.js +1 -1
- package/progress/style/index.js +1 -1
- package/progress/utils.js +1 -1
- package/resize-observer/Collection.js +1 -1
- package/resize-observer/ResizeObserver.d.ts +6 -1
- package/resize-observer/ResizeObserver.js +2 -3
- package/resize-observer/SingleObserver.js +20 -17
- package/resize-observer/constants.js +1 -1
- package/resize-observer/context.js +1 -1
- package/resize-observer/index.d.ts +5 -0
- package/resize-observer/index.js +1 -1
- package/resize-observer/observerUtil.js +1 -1
- package/resize-observer/style/index.js +1 -1
- package/resize-observer/utils.js +1 -1
- package/space/Space.d.ts +12 -2
- package/space/Space.js +43 -50
- package/space/constants.js +1 -1
- package/space/context.js +1 -1
- package/space/index.d.ts +11 -1
- package/space/index.js +1 -1
- package/space/interface.d.ts +2 -15
- package/space/style/index.js +1 -1
- package/space/utils.js +1 -1
- package/suspense-fallback-test/SuspenseFallbackTest.d.ts +6 -1
- package/suspense-fallback-test/SuspenseFallbackTest.js +2 -3
- package/suspense-fallback-test/constants.js +1 -1
- package/suspense-fallback-test/context.js +1 -1
- package/suspense-fallback-test/index.d.ts +5 -0
- package/suspense-fallback-test/index.js +1 -1
- package/suspense-fallback-test/style/index.js +1 -1
- package/suspense-fallback-test/utils.js +1 -1
- package/test.js +1 -1
- package/timer/Timer.d.ts +6 -1
- package/timer/Timer.js +2 -3
- package/timer/constants.js +1 -1
- package/timer/context.js +1 -1
- package/timer/index.d.ts +5 -0
- package/timer/index.js +1 -1
- package/timer/style/index.js +1 -1
- package/timer/utils.js +1 -1
- package/transition/Transition.js +1 -1
- package/transition/TransitionCSS.js +1 -1
- package/transition/TransitionGroup.js +1 -1
- package/transition/TransitionStyle.js +1 -1
- package/transition/constants.js +1 -1
- package/transition/context.js +1 -1
- package/transition/index.js +1 -1
- package/transition/style/index.js +1 -1
- package/transition/utils.js +1 -1
- package/typewriter/Typewriter.d.ts +6 -1
- package/typewriter/Typewriter.js +2 -3
- package/typewriter/constants.js +1 -1
- package/typewriter/context.js +1 -1
- package/typewriter/index.d.ts +5 -0
- package/typewriter/index.js +1 -1
- package/typewriter/style/index.js +1 -1
- package/typewriter/utils.js +1 -1
- package/utils/callOrReturn.js +1 -1
- package/utils/callbackOriginRef.js +1 -1
- package/utils/caseName.js +1 -1
- package/utils/className.js +1 -1
- package/utils/constants.js +1 -1
- package/utils/copy.js +1 -1
- package/utils/css.js +1 -1
- package/utils/date.js +1 -1
- package/utils/dayjs.js +1 -1
- package/utils/document.js +1 -1
- package/utils/dom.d.ts +14 -4
- package/utils/dom.js +21 -10
- package/utils/emitter.js +1 -1
- package/utils/file.js +1 -1
- package/utils/fileRead.js +1 -1
- package/utils/fileToDataURL.js +1 -1
- package/utils/fillNBSP.js +1 -1
- package/utils/getElement.js +5 -5
- package/utils/getHighlightText.js +1 -1
- package/utils/getHotkeyHandler.js +1 -1
- package/utils/getScrollBarHeight.js +1 -1
- package/utils/getScrollBarSize.js +1 -1
- package/utils/getScrollBarWidth.js +1 -1
- package/utils/getScrollParent.js +1 -1
- package/utils/getStringLength.js +1 -1
- package/utils/include.js +1 -1
- package/utils/index.js +332 -330
- package/utils/initAllLineClamp.js +1 -1
- package/utils/intersectionObserver.js +1 -1
- package/utils/is.d.ts +2 -2
- package/utils/is.js +126 -127
- package/utils/keyboardCode.js +1 -1
- package/utils/lodash.d.ts +2 -1
- package/utils/lodash.js +72 -71
- package/utils/math.js +1 -1
- package/utils/mergeProps.js +1 -1
- package/utils/mergedToString.js +1 -1
- package/utils/mutationObserver.js +1 -1
- package/utils/names.js +1 -1
- package/utils/object.js +1 -1
- package/utils/omit.js +1 -1
- package/utils/pad.js +1 -1
- package/utils/pick.js +1 -1
- package/utils/pinyin.js +1 -1
- package/utils/react19Adapter.js +1 -1
- package/utils/reactNode.js +1 -1
- package/utils/ref.js +1 -1
- package/utils/resizeObserver.js +1 -1
- package/utils/saveAs.js +1 -1
- package/utils/screenfull.js +1 -1
- package/utils/scrollIntoViewIfNeeded.js +1 -1
- package/utils/scrollTo.js +1 -1
- package/utils/setCreateRoot.js +1 -1
- package/utils/setDarkTheme.js +1 -1
- package/utils/setDir.js +1 -1
- package/utils/setPrimaryColor.js +1 -1
- package/utils/setTheme.js +1 -1
- package/utils/string.js +1 -1
- package/utils/style.js +1 -1
- package/utils/tinycolor.js +1 -1
- package/utils/toArray.js +1 -1
- package/utils/tree.js +1 -1
- package/utils/tunnel.js +1 -1
- package/utils/tween.js +1 -1
- package/utils/uuid.js +1 -1
- package/utils/validate.js +1 -1
- package/utils/warning.js +1 -1
- package/version/index.js +6 -6
- /package/{suspense-fallback-test → base}/style/index.css +0 -0
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@unicom-cloud/ui-common","version":"0.1.
|
|
1
|
+
{"name":"@unicom-cloud/ui-common","version":"0.1.46","dependencies":{"@unicom-cloud/utils":"^0.1.0","@unicom-cloud/icons":"^0.1.0","react-compiler-runtime":"^1.0.0"},"peerDependencies":{"dayjs":"^1.11.21","lodash":"^4.18.1","react":"^18.3.1","react-dom":"^18.3.1","react-is":"^18.3.1"},"type":"module","types":"./index.d.ts","main":"./index.js","bin":{"ui":"./test.js"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}
|
package/progress/Progress.js
CHANGED
package/progress/constants.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 潘启宝 2026-08-
|
|
1
|
+
/* 潘启宝 2026-08-11 11:51:24 星期二 山东省济南市 */
|
|
2
2
|
/* 独立思考,明辨是非 */
|
package/progress/index.js
CHANGED
package/progress/style/index.js
CHANGED
package/progress/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 潘启宝 2026-08-
|
|
1
|
+
/* 潘启宝 2026-08-11 11:51:24 星期二 山东省济南市 */
|
|
2
2
|
/* 独立思考,明辨是非 */
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Collection } from './Collection';
|
|
3
3
|
import type { ResizeObserverProps } from './interface';
|
|
4
|
-
declare const ResizeObserver: React.ForwardRefExoticComponent<ResizeObserverProps & React.RefAttributes<HTMLElement
|
|
4
|
+
declare const ResizeObserver: React.ForwardRefExoticComponent<ResizeObserverProps & React.RefAttributes<HTMLElement>> & {
|
|
5
|
+
zh: string;
|
|
6
|
+
en: string;
|
|
7
|
+
displayName: string;
|
|
8
|
+
id: string;
|
|
9
|
+
};
|
|
5
10
|
export { Collection };
|
|
6
11
|
export default ResizeObserver;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-08-
|
|
1
|
+
/* 潘启宝 2026-08-11 11:51:24 星期二 山东省济南市 */
|
|
2
2
|
import { isFunction as e } from "../utils/is.js";
|
|
3
3
|
import t from "../hooks/use-merge-props/index.js";
|
|
4
4
|
import n from "../utils/toArray.js";
|
|
@@ -20,8 +20,7 @@ function d(r, o) {
|
|
|
20
20
|
}, e);
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
var f = l(d);
|
|
24
|
-
Object.assign(f, { ...r });
|
|
23
|
+
var f = Object.assign(l(d), { ...r });
|
|
25
24
|
//#endregion
|
|
26
25
|
export { o as Collection, f as default };
|
|
27
26
|
/* 独立思考,明辨是非 */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-08-
|
|
1
|
+
/* 潘启宝 2026-08-11 11:51:24 星期二 山东省济南市 */
|
|
2
2
|
import { isFunction as e } from "../utils/is.js";
|
|
3
3
|
import { getReactElementRef as t, supportRef as n, useComposeRef as r } from "../utils/ref.js";
|
|
4
4
|
import { getDOM as i } from "../utils/dom.js";
|
|
@@ -16,29 +16,32 @@ function g(l, g) {
|
|
|
16
16
|
m(g, () => D());
|
|
17
17
|
let O = h(l);
|
|
18
18
|
O.current = l;
|
|
19
|
-
let k = d((
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
let k = d((t) => {
|
|
20
|
+
if (!D()) return;
|
|
21
|
+
let { onResize: n, data: r } = O.current, { width: i, height: a } = t.getBoundingClientRect(), { offsetWidth: o, offsetHeight: s } = t, c = Math.floor(i), l = Math.floor(a);
|
|
22
|
+
if (C.current.width !== c || C.current.height !== l || C.current.offsetWidth !== o || C.current.offsetHeight !== s) {
|
|
23
|
+
let u = {
|
|
24
|
+
width: c,
|
|
25
|
+
height: l,
|
|
26
|
+
offsetWidth: o,
|
|
27
|
+
offsetHeight: s
|
|
27
28
|
};
|
|
28
|
-
C.current =
|
|
29
|
-
let
|
|
30
|
-
...
|
|
31
|
-
offsetWidth:
|
|
32
|
-
offsetHeight:
|
|
29
|
+
C.current = u;
|
|
30
|
+
let d = o === Math.round(i) ? i : o, f = s === Math.round(a) ? a : s, p = {
|
|
31
|
+
...u,
|
|
32
|
+
offsetWidth: d,
|
|
33
|
+
offsetHeight: f
|
|
33
34
|
};
|
|
34
|
-
b?.(
|
|
35
|
-
|
|
35
|
+
b?.(p, t, r), e(n) && Promise.resolve().then(() => {
|
|
36
|
+
n(p, t);
|
|
36
37
|
});
|
|
37
38
|
}
|
|
38
39
|
}, []);
|
|
39
40
|
return p(() => {
|
|
40
41
|
let e = D();
|
|
41
|
-
return e && !v && o(e, k), () =>
|
|
42
|
+
return e && !v && o(e, k), () => {
|
|
43
|
+
s(e, k);
|
|
44
|
+
};
|
|
42
45
|
}, [y.current, v]), w ? c(S, { ref: E }) : S;
|
|
43
46
|
}
|
|
44
47
|
var _ = l(g);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 潘启宝 2026-08-
|
|
1
|
+
/* 潘启宝 2026-08-11 11:51:24 星期二 山东省济南市 */
|
|
2
2
|
/* 独立思考,明辨是非 */
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import './style';
|
|
2
2
|
import { Collection } from './ResizeObserver';
|
|
3
3
|
declare const ResizeObserver: import("react").ForwardRefExoticComponent<import("./interface").ResizeObserverProps & import("react").RefAttributes<HTMLElement>> & {
|
|
4
|
+
zh: string;
|
|
5
|
+
en: string;
|
|
6
|
+
displayName: string;
|
|
7
|
+
id: string;
|
|
8
|
+
} & {
|
|
4
9
|
PropsContext: import("react").Context<Partial<import("./interface").ResizeObserverProps>>;
|
|
5
10
|
Collection: typeof Collection;
|
|
6
11
|
SingleObserver: import("react").ForwardRefExoticComponent<import("./SingleObserver").SingleObserverProps & import("react").RefAttributes<HTMLElement>>;
|
package/resize-observer/index.js
CHANGED
package/resize-observer/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 潘启宝 2026-08-
|
|
1
|
+
/* 潘启宝 2026-08-11 11:51:24 星期二 山东省济南市 */
|
|
2
2
|
/* 独立思考,明辨是非 */
|
package/space/Space.d.ts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import type { SpaceProps, SpaceVerticalProps } from './interface';
|
|
2
|
-
declare const Space: import("react").ForwardRefExoticComponent<SpaceProps & import("react").RefAttributes<unknown
|
|
3
|
-
|
|
2
|
+
declare const Space: import("react").ForwardRefExoticComponent<SpaceProps & import("react").RefAttributes<unknown>> & {
|
|
3
|
+
zh: string;
|
|
4
|
+
en: string;
|
|
5
|
+
displayName: string;
|
|
6
|
+
id: string;
|
|
7
|
+
};
|
|
8
|
+
declare const SpaceVertical: import("react").ForwardRefExoticComponent<SpaceVerticalProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
9
|
+
zh: string;
|
|
10
|
+
en: string;
|
|
11
|
+
displayName: string;
|
|
12
|
+
id: string;
|
|
13
|
+
};
|
|
4
14
|
export { SpaceVertical };
|
|
5
15
|
export default Space;
|
package/space/Space.js
CHANGED
|
@@ -1,75 +1,68 @@
|
|
|
1
|
-
/* 潘启宝 2026-08-
|
|
1
|
+
/* 潘启宝 2026-08-11 11:51:24 星期二 山东省济南市 */
|
|
2
2
|
import { isPresent as e } from "../utils/is.js";
|
|
3
|
-
import {
|
|
4
|
-
import n from "../
|
|
5
|
-
import r from "../
|
|
6
|
-
import i from "../utils/
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import l from "
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
3
|
+
import { get as t } from "../utils/lodash.js";
|
|
4
|
+
import { getDOM as n } from "../utils/dom.js";
|
|
5
|
+
import r from "../hooks/use-merge-props/index.js";
|
|
6
|
+
import i from "../utils/className.js";
|
|
7
|
+
import a from "../utils/toArray.js";
|
|
8
|
+
import { SPACE_COMPONENT_INFO as o, SPACE_VERTICAL_COMPONENT_INFO as s } from "../utils/names.js";
|
|
9
|
+
import { PropsContext as c, defaultProps as l } from "./context.js";
|
|
10
|
+
import u from "../flex/index.js";
|
|
11
|
+
import { Fragment as d, forwardRef as f, useContext as p, useImperativeHandle as m, useRef as h } from "react";
|
|
12
|
+
import { UI_COMMON_PREFIX as g } from "@unicom-cloud/utils/constants/ui";
|
|
13
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
13
14
|
//#region components/common/space/Space.tsx
|
|
14
|
-
function
|
|
15
|
-
let
|
|
15
|
+
function y(o, s) {
|
|
16
|
+
let f = p(c), y = r(o, { ...f }, l), { className: b, style: x, children: S, gap: C, direction: w, justifyContent: T, alignItems: E, wrap: D, separator: O, rtl: k, inline: A, ...j } = y, M = [
|
|
16
17
|
"horizontal",
|
|
17
18
|
"row-reverse",
|
|
18
19
|
"row"
|
|
19
|
-
].includes(
|
|
20
|
+
].includes(w);
|
|
20
21
|
[
|
|
21
22
|
"vertical",
|
|
22
23
|
"column-reverse",
|
|
23
24
|
"column"
|
|
24
|
-
].includes(
|
|
25
|
-
let
|
|
25
|
+
].includes(w);
|
|
26
|
+
let N = {
|
|
26
27
|
horizontal: "row",
|
|
27
28
|
vertical: "column"
|
|
28
|
-
}[
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
} })), /* @__PURE__ */ g(l, {
|
|
42
|
-
ref: V,
|
|
43
|
-
style: y,
|
|
44
|
-
className: z,
|
|
45
|
-
gap: S ?? x,
|
|
29
|
+
}[w] ?? w, P = t(y, ["size"], C), F = t(y, ["justify"], T), I = t(y, ["align"], E) ?? (M ? "center" : void 0), L = `${g}-space`, R = i(L, {
|
|
30
|
+
[`${L}-${w}`]: w,
|
|
31
|
+
[`${L}-justify-content-${F}`]: F,
|
|
32
|
+
[`${L}-align-items-${I}`]: I,
|
|
33
|
+
[`${L}-rtl`]: k
|
|
34
|
+
}, D ? `${L}-wrap` : `${L}-no-wrap`, b), z = a(S), B = h(null);
|
|
35
|
+
return m(s, () => ({ getRootElement() {
|
|
36
|
+
return n(B);
|
|
37
|
+
} })), /* @__PURE__ */ _(u, {
|
|
38
|
+
ref: B,
|
|
39
|
+
style: x,
|
|
40
|
+
className: R,
|
|
41
|
+
gap: P,
|
|
46
42
|
wrap: D,
|
|
47
|
-
justifyContent:
|
|
48
|
-
alignItems:
|
|
49
|
-
direction:
|
|
43
|
+
justifyContent: F,
|
|
44
|
+
alignItems: I,
|
|
45
|
+
direction: N,
|
|
50
46
|
rtl: k,
|
|
51
|
-
inline:
|
|
52
|
-
...
|
|
53
|
-
children:
|
|
47
|
+
inline: A,
|
|
48
|
+
...j,
|
|
49
|
+
children: z.map((t, n) => {
|
|
54
50
|
let r = t?.key ?? n, i = e(O) && n > 0;
|
|
55
|
-
return /* @__PURE__ */
|
|
56
|
-
className: `${
|
|
51
|
+
return /* @__PURE__ */ v(d, { children: [i && /* @__PURE__ */ _("div", {
|
|
52
|
+
className: `${L}-item-separator`,
|
|
57
53
|
children: O
|
|
58
|
-
}), /* @__PURE__ */
|
|
59
|
-
className: `${
|
|
54
|
+
}), /* @__PURE__ */ _("div", {
|
|
55
|
+
className: `${L}-item`,
|
|
60
56
|
children: t
|
|
61
57
|
})] }, r);
|
|
62
58
|
})
|
|
63
59
|
});
|
|
64
60
|
}
|
|
65
|
-
var y =
|
|
66
|
-
Object.assign(y, { ...a });
|
|
67
|
-
var b = d((e, t) => /* @__PURE__ */ g(y, {
|
|
61
|
+
var b = Object.assign(f(y), { ...o }), x = Object.assign(f((e, t) => /* @__PURE__ */ _(b, {
|
|
68
62
|
...e,
|
|
69
63
|
ref: t,
|
|
70
64
|
direction: "vertical"
|
|
71
|
-
}));
|
|
72
|
-
Object.assign(b, { ...o });
|
|
65
|
+
})), { ...s });
|
|
73
66
|
//#endregion
|
|
74
|
-
export {
|
|
67
|
+
export { x as SpaceVertical, b as default };
|
|
75
68
|
/* 独立思考,明辨是非 */
|
package/space/constants.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 潘启宝 2026-08-
|
|
1
|
+
/* 潘启宝 2026-08-11 11:51:24 星期二 山东省济南市 */
|
|
2
2
|
/* 独立思考,明辨是非 */
|
package/space/context.js
CHANGED
package/space/index.d.ts
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import './style';
|
|
2
2
|
import { SpaceVertical } from './Space';
|
|
3
3
|
declare const Space: import("react").ForwardRefExoticComponent<import("./interface").SpaceProps & import("react").RefAttributes<unknown>> & {
|
|
4
|
+
zh: string;
|
|
5
|
+
en: string;
|
|
6
|
+
displayName: string;
|
|
7
|
+
id: string;
|
|
8
|
+
} & {
|
|
4
9
|
PropsContext: import("react").Context<Partial<import("./interface").SpaceProps>>;
|
|
5
|
-
Vertical: import("react").ForwardRefExoticComponent<import("./interface").SpaceVerticalProps & import("react").RefAttributes<HTMLDivElement
|
|
10
|
+
Vertical: import("react").ForwardRefExoticComponent<import("./interface").SpaceVerticalProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
11
|
+
zh: string;
|
|
12
|
+
en: string;
|
|
13
|
+
displayName: string;
|
|
14
|
+
id: string;
|
|
15
|
+
};
|
|
6
16
|
zh: string;
|
|
7
17
|
en: string;
|
|
8
18
|
displayName: string;
|
package/space/index.js
CHANGED
package/space/interface.d.ts
CHANGED
|
@@ -9,28 +9,19 @@ export interface SpaceProps {
|
|
|
9
9
|
inline?: FlexProps['inline'];
|
|
10
10
|
/**
|
|
11
11
|
* @zh 交叉轴方向对齐方式
|
|
12
|
-
* @deprecated 请用 alignItems 属性替代
|
|
13
|
-
*/
|
|
14
|
-
align?: AlignItems | React.CSSProperties['alignItems'];
|
|
15
|
-
/**
|
|
16
|
-
* @zh 属性 align 的别名
|
|
17
12
|
*/
|
|
18
13
|
alignItems?: AlignItems | React.CSSProperties['alignItems'];
|
|
14
|
+
alignContent?: React.CSSProperties['alignContent'];
|
|
19
15
|
/**
|
|
20
16
|
* @zh 主轴方向上对齐方式
|
|
21
17
|
*/
|
|
22
18
|
justifyContent?: JustifyContent | React.CSSProperties['justifyContent'];
|
|
19
|
+
justifyItems?: React.CSSProperties['justifyItems'];
|
|
23
20
|
/**
|
|
24
21
|
* @zh 方向
|
|
25
22
|
* @defaultValue horizontal
|
|
26
23
|
*/
|
|
27
24
|
direction?: Direction | React.CSSProperties['flexDirection'];
|
|
28
|
-
/**
|
|
29
|
-
* @zh 尺寸
|
|
30
|
-
* @defaultValue small
|
|
31
|
-
* @deprecated 请用 gap 属性替代
|
|
32
|
-
*/
|
|
33
|
-
size?: GapType | GapType[];
|
|
34
25
|
/**
|
|
35
26
|
* @zh 间距
|
|
36
27
|
* @defaultValue small
|
|
@@ -52,10 +43,6 @@ export interface SpaceProps {
|
|
|
52
43
|
* @zh 是否启用RTL模式
|
|
53
44
|
*/
|
|
54
45
|
rtl?: boolean;
|
|
55
|
-
/**
|
|
56
|
-
* @zh 兼容历史功能
|
|
57
|
-
*/
|
|
58
|
-
legacy?: boolean;
|
|
59
46
|
}
|
|
60
47
|
export interface SpaceVerticalProps extends Omit<SpaceProps, 'direction'> {
|
|
61
48
|
}
|
package/space/style/index.js
CHANGED
package/space/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 潘启宝 2026-08-
|
|
1
|
+
/* 潘启宝 2026-08-11 11:51:24 星期二 山东省济南市 */
|
|
2
2
|
/* 独立思考,明辨是非 */
|
|
@@ -2,5 +2,10 @@
|
|
|
2
2
|
* SuspenseFallbackTest 组件
|
|
3
3
|
* @description 用于测试S uspense的fallback 状态,创建一个永远不会加载完成的懒加载组件
|
|
4
4
|
*/
|
|
5
|
-
declare const SuspenseFallbackTest: import("react").ForwardRefExoticComponent<object & import("react").RefAttributes<unknown
|
|
5
|
+
declare const SuspenseFallbackTest: import("react").ForwardRefExoticComponent<object & import("react").RefAttributes<unknown>> & {
|
|
6
|
+
zh: string;
|
|
7
|
+
en: string;
|
|
8
|
+
displayName: string;
|
|
9
|
+
id: string;
|
|
10
|
+
};
|
|
6
11
|
export default SuspenseFallbackTest;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-08-
|
|
1
|
+
/* 潘启宝 2026-08-11 11:51:24 星期二 山东省济南市 */
|
|
2
2
|
import e from "../hooks/use-merge-props/index.js";
|
|
3
3
|
import { SUSPENSE_FALLBACK_TEST_COMPONENT_INFO as t } from "../utils/names.js";
|
|
4
4
|
import { PropsContext as n, defaultProps as r } from "./context.js";
|
|
@@ -11,8 +11,7 @@ function u(t, i) {
|
|
|
11
11
|
let d = c(() => a(() => new Promise(() => {})), []);
|
|
12
12
|
return s(i, () => ({})), /* @__PURE__ */ l(d, {});
|
|
13
13
|
}
|
|
14
|
-
var d = i(u);
|
|
15
|
-
Object.assign(d, { ...t });
|
|
14
|
+
var d = Object.assign(i(u), { ...t });
|
|
16
15
|
//#endregion
|
|
17
16
|
export { d as default };
|
|
18
17
|
/* 独立思考,明辨是非 */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 潘启宝 2026-08-
|
|
1
|
+
/* 潘启宝 2026-08-11 11:51:24 星期二 山东省济南市 */
|
|
2
2
|
/* 独立思考,明辨是非 */
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import './style';
|
|
2
2
|
declare const SuspenseFallbackTest: import("react").ForwardRefExoticComponent<object & import("react").RefAttributes<unknown>> & {
|
|
3
|
+
zh: string;
|
|
4
|
+
en: string;
|
|
5
|
+
displayName: string;
|
|
6
|
+
id: string;
|
|
7
|
+
} & {
|
|
3
8
|
PropsContext: import("react").Context<object>;
|
|
4
9
|
zh: string;
|
|
5
10
|
en: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 潘启宝 2026-08-
|
|
1
|
+
/* 潘启宝 2026-08-11 11:51:24 星期二 山东省济南市 */
|
|
2
2
|
/* 独立思考,明辨是非 */
|
package/test.js
CHANGED
package/timer/Timer.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import type { TimerProps } from './interface';
|
|
2
|
-
declare const Timer: import("react").ForwardRefExoticComponent<TimerProps & import("react").RefAttributes<unknown
|
|
2
|
+
declare const Timer: import("react").ForwardRefExoticComponent<TimerProps & import("react").RefAttributes<unknown>> & {
|
|
3
|
+
zh: string;
|
|
4
|
+
en: string;
|
|
5
|
+
displayName: string;
|
|
6
|
+
id: string;
|
|
7
|
+
};
|
|
3
8
|
export default Timer;
|
package/timer/Timer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-08-
|
|
1
|
+
/* 潘启宝 2026-08-11 11:51:24 星期二 山东省济南市 */
|
|
2
2
|
import { isFunction as e } from "../utils/is.js";
|
|
3
3
|
import t from "../hooks/use-merge-props/index.js";
|
|
4
4
|
import n from "../utils/className.js";
|
|
@@ -36,8 +36,7 @@ function g(i, s) {
|
|
|
36
36
|
children: C.time
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
var _ = s(g);
|
|
40
|
-
Object.assign(_, { ...i });
|
|
39
|
+
var _ = Object.assign(s(g), { ...i });
|
|
41
40
|
//#endregion
|
|
42
41
|
export { _ as default };
|
|
43
42
|
/* 独立思考,明辨是非 */
|
package/timer/constants.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 潘启宝 2026-08-
|
|
1
|
+
/* 潘启宝 2026-08-11 11:51:24 星期二 山东省济南市 */
|
|
2
2
|
/* 独立思考,明辨是非 */
|
package/timer/context.js
CHANGED
package/timer/index.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import './style';
|
|
2
2
|
declare const Timer: import("react").ForwardRefExoticComponent<import("./interface").TimerProps & import("react").RefAttributes<unknown>> & {
|
|
3
|
+
zh: string;
|
|
4
|
+
en: string;
|
|
5
|
+
displayName: string;
|
|
6
|
+
id: string;
|
|
7
|
+
} & {
|
|
3
8
|
PropsContext: import("react").Context<Partial<import("./interface").TimerProps>>;
|
|
4
9
|
zh: string;
|
|
5
10
|
en: string;
|
package/timer/index.js
CHANGED
package/timer/style/index.js
CHANGED
package/timer/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 潘启宝 2026-08-
|
|
1
|
+
/* 潘启宝 2026-08-11 11:51:24 星期二 山东省济南市 */
|
|
2
2
|
/* 独立思考,明辨是非 */
|
package/transition/Transition.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-08-
|
|
1
|
+
/* 潘启宝 2026-08-11 11:51:24 星期二 山东省济南市 */
|
|
2
2
|
import { isExist as e, isFunction as t, isNull as n, isUndefined as r } from "../utils/is.js";
|
|
3
3
|
import i from "../hooks/use-latest/index.js";
|
|
4
4
|
import a from "../hooks/use-memoized-fn/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-08-
|
|
1
|
+
/* 潘启宝 2026-08-11 11:51:24 星期二 山东省济南市 */
|
|
2
2
|
import { isArray as e, isFunction as t, isPlainObject as n, isString as r, isStringAndExist as i } from "../utils/is.js";
|
|
3
3
|
import { castArray as a } from "../utils/lodash.js";
|
|
4
4
|
import o from "../utils/className.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-08-
|
|
1
|
+
/* 潘启宝 2026-08-11 11:51:24 星期二 山东省济南市 */
|
|
2
2
|
import { isEmpty as e, isFunction as t } from "../utils/is.js";
|
|
3
3
|
import { TRANSITION_STYLE_COMPONENT_INFO as n } from "../utils/names.js";
|
|
4
4
|
import { TRANSITION_PHASE_APPEAR_KEY as r } from "./constants.js";
|
package/transition/constants.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-08-
|
|
1
|
+
/* 潘启宝 2026-08-11 11:51:24 星期二 山东省济南市 */
|
|
2
2
|
//#region components/common/transition/constants.ts
|
|
3
3
|
var e = "mountOnEnter", t = "unmountOnExit", n = "alwaysMounted", r = "addEndListener", i = "duration", a = 500, o = "appear", s = "enter", c = "exit", l = /* @__PURE__ */ function(e) {
|
|
4
4
|
return e.APPEAR_START = `${o}Start`, e.APPEAR_ACTIVE = `${o}Active`, e.APPEAR_DONE = `${o}Done`, e.ENTER_START = `${s}Start`, e.ENTER_ACTIVE = `${s}Active`, e.ENTER_DONE = `${s}Done`, e.EXIT_START = `${c}Start`, e.EXIT_ACTIVE = `${c}Active`, e.EXIT_DONE = `${c}Done`, e;
|
package/transition/context.js
CHANGED