antd-mobile 5.28.1 → 5.28.2
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/2x/bundle/antd-mobile.cjs.development.js +147 -125
- package/2x/bundle/antd-mobile.cjs.js +10 -9
- package/2x/bundle/antd-mobile.es.development.js +147 -125
- package/2x/bundle/antd-mobile.es.js +7276 -7250
- package/2x/bundle/antd-mobile.umd.development.js +147 -125
- package/2x/bundle/antd-mobile.umd.js +10 -9
- package/2x/bundle/css-vars-patch.css +1 -0
- package/2x/bundle/style.css +9 -1
- package/2x/cjs/components/popover/popover.css +1 -1
- package/2x/cjs/components/popover/popover.patch.css +1 -0
- package/2x/cjs/components/pull-to-refresh/pull-to-refresh.js +15 -16
- package/2x/cjs/components/stepper/index.d.ts +1 -1
- package/2x/cjs/components/stepper/stepper.d.ts +4 -2
- package/2x/cjs/components/stepper/stepper.js +21 -3
- package/2x/cjs/components/text-area/text-area.css +8 -0
- package/2x/cjs/components/text-area/text-area.js +12 -2
- package/2x/cjs/global/css-vars-patch.css +1 -0
- package/2x/cjs/index.d.ts +1 -1
- package/2x/cjs/locales/ko-KR.js +31 -2
- package/2x/cjs/utils/reduce-and-restore-motion.js +7 -6
- package/2x/cjs/utils/render-imperatively.js +9 -3
- package/2x/es/components/popover/popover.css +1 -1
- package/2x/es/components/popover/popover.patch.css +1 -0
- package/2x/es/components/pull-to-refresh/pull-to-refresh.js +15 -16
- package/2x/es/components/stepper/index.d.ts +1 -1
- package/2x/es/components/stepper/stepper.d.ts +4 -2
- package/2x/es/components/stepper/stepper.js +19 -3
- package/2x/es/components/text-area/text-area.css +8 -0
- package/2x/es/components/text-area/text-area.js +12 -2
- package/2x/es/global/css-vars-patch.css +1 -0
- package/2x/es/index.d.ts +1 -1
- package/2x/es/locales/ko-KR.js +31 -2
- package/2x/es/utils/reduce-and-restore-motion.js +7 -6
- package/2x/es/utils/render-imperatively.js +9 -3
- package/2x/package.json +2 -2
- package/bundle/antd-mobile.cjs.development.js +147 -125
- package/bundle/antd-mobile.cjs.js +10 -9
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +147 -125
- package/bundle/antd-mobile.es.js +7276 -7250
- package/bundle/antd-mobile.umd.development.js +147 -125
- package/bundle/antd-mobile.umd.js +10 -9
- package/bundle/css-vars-patch.css +1 -0
- package/bundle/style.css +1 -1
- package/cjs/components/popover/popover.css +1 -1
- package/cjs/components/popover/popover.patch.css +1 -0
- package/cjs/components/pull-to-refresh/pull-to-refresh.js +15 -16
- package/cjs/components/stepper/index.d.ts +1 -1
- package/cjs/components/stepper/stepper.d.ts +4 -2
- package/cjs/components/stepper/stepper.js +21 -3
- package/cjs/components/text-area/text-area.css +7 -0
- package/cjs/components/text-area/text-area.js +12 -2
- package/cjs/global/css-vars-patch.css +1 -0
- package/cjs/index.d.ts +1 -1
- package/cjs/locales/ko-KR.js +31 -2
- package/cjs/utils/reduce-and-restore-motion.js +7 -6
- package/cjs/utils/render-imperatively.js +9 -3
- package/es/components/popover/popover.css +1 -1
- package/es/components/popover/popover.patch.css +1 -0
- package/es/components/pull-to-refresh/pull-to-refresh.js +15 -16
- package/es/components/stepper/index.d.ts +1 -1
- package/es/components/stepper/stepper.d.ts +4 -2
- package/es/components/stepper/stepper.js +19 -3
- package/es/components/text-area/text-area.css +7 -0
- package/es/components/text-area/text-area.js +12 -2
- package/es/global/css-vars-patch.css +1 -0
- package/es/index.d.ts +1 -1
- package/es/locales/ko-KR.js +31 -2
- package/es/utils/reduce-and-restore-motion.js +7 -6
- package/es/utils/render-imperatively.js +9 -3
- package/package.json +2 -2
- package/umd/antd-mobile.js +1 -1
- package/umd/antd-mobile.js.LICENSE.txt +5 -4
|
@@ -3116,7 +3116,13 @@ const useLayoutEffectWithTarget = useEffectWithTarget;
|
|
|
3116
3116
|
const useIsomorphicLayoutEffectWithTarget = isBrowser$3 ? useLayoutEffectWithTarget : useEffectWithTarget$2;
|
|
3117
3117
|
const useIsomorphicLayoutEffectWithTarget$1 = useIsomorphicLayoutEffectWithTarget;
|
|
3118
3118
|
function useSize(target) {
|
|
3119
|
-
const [state, setState] = useRafState()
|
|
3119
|
+
const [state, setState] = useRafState(() => {
|
|
3120
|
+
const el = getTargetElement(target);
|
|
3121
|
+
return el ? {
|
|
3122
|
+
width: el.clientWidth,
|
|
3123
|
+
height: el.clientHeight
|
|
3124
|
+
} : void 0;
|
|
3125
|
+
});
|
|
3120
3126
|
useIsomorphicLayoutEffectWithTarget$1(() => {
|
|
3121
3127
|
const el = getTargetElement(target);
|
|
3122
3128
|
if (!el) {
|
|
@@ -7505,10 +7511,14 @@ function renderImperatively(element) {
|
|
|
7505
7511
|
ref: wrapperRef
|
|
7506
7512
|
}));
|
|
7507
7513
|
return {
|
|
7508
|
-
close: () => {
|
|
7514
|
+
close: () => __awaiter(this, void 0, void 0, function* () {
|
|
7509
7515
|
var _a;
|
|
7510
|
-
(
|
|
7511
|
-
|
|
7516
|
+
if (!wrapperRef.current) {
|
|
7517
|
+
unmount2();
|
|
7518
|
+
} else {
|
|
7519
|
+
(_a = wrapperRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
7520
|
+
}
|
|
7521
|
+
}),
|
|
7512
7522
|
replace: (element2) => {
|
|
7513
7523
|
var _a;
|
|
7514
7524
|
(_a = wrapperRef.current) === null || _a === void 0 ? void 0 : _a.replace(element2);
|
|
@@ -8435,9 +8445,10 @@ const ScrollMask$1 = (props) => {
|
|
|
8435
8445
|
}));
|
|
8436
8446
|
};
|
|
8437
8447
|
const ScrollMask = ScrollMask$1;
|
|
8438
|
-
var
|
|
8448
|
+
var _reactIs_18_2_0_reactIs = { exports: {} };
|
|
8439
8449
|
var reactIs_development$1 = {};
|
|
8440
|
-
/**
|
|
8450
|
+
/**
|
|
8451
|
+
* @license React
|
|
8441
8452
|
* react-is.development.js
|
|
8442
8453
|
*
|
|
8443
8454
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -8447,56 +8458,38 @@ var reactIs_development$1 = {};
|
|
|
8447
8458
|
*/
|
|
8448
8459
|
{
|
|
8449
8460
|
(function() {
|
|
8450
|
-
var REACT_ELEMENT_TYPE =
|
|
8451
|
-
var REACT_PORTAL_TYPE =
|
|
8452
|
-
var REACT_FRAGMENT_TYPE =
|
|
8453
|
-
var REACT_STRICT_MODE_TYPE =
|
|
8454
|
-
var REACT_PROFILER_TYPE =
|
|
8455
|
-
var REACT_PROVIDER_TYPE =
|
|
8456
|
-
var REACT_CONTEXT_TYPE =
|
|
8457
|
-
var
|
|
8458
|
-
var
|
|
8459
|
-
var
|
|
8460
|
-
var
|
|
8461
|
-
var
|
|
8462
|
-
var
|
|
8463
|
-
var
|
|
8464
|
-
var REACT_FUNDAMENTAL_TYPE = 60117;
|
|
8465
|
-
var REACT_DEBUG_TRACING_MODE_TYPE = 60129;
|
|
8466
|
-
var REACT_LEGACY_HIDDEN_TYPE = 60131;
|
|
8467
|
-
if (typeof Symbol === "function" && Symbol.for) {
|
|
8468
|
-
var symbolFor = Symbol.for;
|
|
8469
|
-
REACT_ELEMENT_TYPE = symbolFor("react.element");
|
|
8470
|
-
REACT_PORTAL_TYPE = symbolFor("react.portal");
|
|
8471
|
-
REACT_FRAGMENT_TYPE = symbolFor("react.fragment");
|
|
8472
|
-
REACT_STRICT_MODE_TYPE = symbolFor("react.strict_mode");
|
|
8473
|
-
REACT_PROFILER_TYPE = symbolFor("react.profiler");
|
|
8474
|
-
REACT_PROVIDER_TYPE = symbolFor("react.provider");
|
|
8475
|
-
REACT_CONTEXT_TYPE = symbolFor("react.context");
|
|
8476
|
-
REACT_FORWARD_REF_TYPE = symbolFor("react.forward_ref");
|
|
8477
|
-
REACT_SUSPENSE_TYPE = symbolFor("react.suspense");
|
|
8478
|
-
REACT_SUSPENSE_LIST_TYPE = symbolFor("react.suspense_list");
|
|
8479
|
-
REACT_MEMO_TYPE = symbolFor("react.memo");
|
|
8480
|
-
REACT_LAZY_TYPE = symbolFor("react.lazy");
|
|
8481
|
-
REACT_BLOCK_TYPE = symbolFor("react.block");
|
|
8482
|
-
REACT_SERVER_BLOCK_TYPE = symbolFor("react.server.block");
|
|
8483
|
-
REACT_FUNDAMENTAL_TYPE = symbolFor("react.fundamental");
|
|
8484
|
-
symbolFor("react.scope");
|
|
8485
|
-
symbolFor("react.opaque.id");
|
|
8486
|
-
REACT_DEBUG_TRACING_MODE_TYPE = symbolFor("react.debug_trace_mode");
|
|
8487
|
-
symbolFor("react.offscreen");
|
|
8488
|
-
REACT_LEGACY_HIDDEN_TYPE = symbolFor("react.legacy_hidden");
|
|
8489
|
-
}
|
|
8461
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.element");
|
|
8462
|
+
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
|
|
8463
|
+
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
8464
|
+
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
|
8465
|
+
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
|
8466
|
+
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
|
8467
|
+
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
|
8468
|
+
var REACT_SERVER_CONTEXT_TYPE = Symbol.for("react.server_context");
|
|
8469
|
+
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
|
8470
|
+
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
|
8471
|
+
var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
|
|
8472
|
+
var REACT_MEMO_TYPE = Symbol.for("react.memo");
|
|
8473
|
+
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
8474
|
+
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
|
|
8490
8475
|
var enableScopeAPI = false;
|
|
8476
|
+
var enableCacheElement = false;
|
|
8477
|
+
var enableTransitionTracing = false;
|
|
8478
|
+
var enableLegacyHidden = false;
|
|
8479
|
+
var enableDebugTracing = false;
|
|
8480
|
+
var REACT_MODULE_REFERENCE;
|
|
8481
|
+
{
|
|
8482
|
+
REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
|
|
8483
|
+
}
|
|
8491
8484
|
function isValidElementType(type4) {
|
|
8492
8485
|
if (typeof type4 === "string" || typeof type4 === "function") {
|
|
8493
8486
|
return true;
|
|
8494
8487
|
}
|
|
8495
|
-
if (type4 === REACT_FRAGMENT_TYPE || type4 === REACT_PROFILER_TYPE ||
|
|
8488
|
+
if (type4 === REACT_FRAGMENT_TYPE || type4 === REACT_PROFILER_TYPE || enableDebugTracing || type4 === REACT_STRICT_MODE_TYPE || type4 === REACT_SUSPENSE_TYPE || type4 === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type4 === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
|
|
8496
8489
|
return true;
|
|
8497
8490
|
}
|
|
8498
8491
|
if (typeof type4 === "object" && type4 !== null) {
|
|
8499
|
-
if (type4.$$typeof === REACT_LAZY_TYPE || type4.$$typeof === REACT_MEMO_TYPE || type4.$$typeof === REACT_PROVIDER_TYPE || type4.$$typeof === REACT_CONTEXT_TYPE || type4.$$typeof === REACT_FORWARD_REF_TYPE || type4.$$typeof ===
|
|
8492
|
+
if (type4.$$typeof === REACT_LAZY_TYPE || type4.$$typeof === REACT_MEMO_TYPE || type4.$$typeof === REACT_PROVIDER_TYPE || type4.$$typeof === REACT_CONTEXT_TYPE || type4.$$typeof === REACT_FORWARD_REF_TYPE || type4.$$typeof === REACT_MODULE_REFERENCE || type4.getModuleId !== void 0) {
|
|
8500
8493
|
return true;
|
|
8501
8494
|
}
|
|
8502
8495
|
}
|
|
@@ -8518,6 +8511,7 @@ var reactIs_development$1 = {};
|
|
|
8518
8511
|
default:
|
|
8519
8512
|
var $$typeofType = type4 && type4.$$typeof;
|
|
8520
8513
|
switch ($$typeofType) {
|
|
8514
|
+
case REACT_SERVER_CONTEXT_TYPE:
|
|
8521
8515
|
case REACT_CONTEXT_TYPE:
|
|
8522
8516
|
case REACT_FORWARD_REF_TYPE:
|
|
8523
8517
|
case REACT_LAZY_TYPE:
|
|
@@ -8545,6 +8539,7 @@ var reactIs_development$1 = {};
|
|
|
8545
8539
|
var Profiler = REACT_PROFILER_TYPE;
|
|
8546
8540
|
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
8547
8541
|
var Suspense = REACT_SUSPENSE_TYPE;
|
|
8542
|
+
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
|
8548
8543
|
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
8549
8544
|
var hasWarnedAboutDeprecatedIsConcurrentMode = false;
|
|
8550
8545
|
function isAsyncMode(object4) {
|
|
@@ -8598,6 +8593,9 @@ var reactIs_development$1 = {};
|
|
|
8598
8593
|
function isSuspense(object4) {
|
|
8599
8594
|
return typeOf(object4) === REACT_SUSPENSE_TYPE;
|
|
8600
8595
|
}
|
|
8596
|
+
function isSuspenseList(object4) {
|
|
8597
|
+
return typeOf(object4) === REACT_SUSPENSE_LIST_TYPE;
|
|
8598
|
+
}
|
|
8601
8599
|
reactIs_development$1.ContextConsumer = ContextConsumer;
|
|
8602
8600
|
reactIs_development$1.ContextProvider = ContextProvider;
|
|
8603
8601
|
reactIs_development$1.Element = Element2;
|
|
@@ -8609,6 +8607,7 @@ var reactIs_development$1 = {};
|
|
|
8609
8607
|
reactIs_development$1.Profiler = Profiler;
|
|
8610
8608
|
reactIs_development$1.StrictMode = StrictMode;
|
|
8611
8609
|
reactIs_development$1.Suspense = Suspense;
|
|
8610
|
+
reactIs_development$1.SuspenseList = SuspenseList;
|
|
8612
8611
|
reactIs_development$1.isAsyncMode = isAsyncMode;
|
|
8613
8612
|
reactIs_development$1.isConcurrentMode = isConcurrentMode;
|
|
8614
8613
|
reactIs_development$1.isContextConsumer = isContextConsumer;
|
|
@@ -8622,6 +8621,7 @@ var reactIs_development$1 = {};
|
|
|
8622
8621
|
reactIs_development$1.isProfiler = isProfiler;
|
|
8623
8622
|
reactIs_development$1.isStrictMode = isStrictMode;
|
|
8624
8623
|
reactIs_development$1.isSuspense = isSuspense;
|
|
8624
|
+
reactIs_development$1.isSuspenseList = isSuspenseList;
|
|
8625
8625
|
reactIs_development$1.isValidElementType = isValidElementType;
|
|
8626
8626
|
reactIs_development$1.typeOf = typeOf;
|
|
8627
8627
|
})();
|
|
@@ -8630,12 +8630,12 @@ var reactIs_development$1 = {};
|
|
|
8630
8630
|
{
|
|
8631
8631
|
module.exports = reactIs_development$1;
|
|
8632
8632
|
}
|
|
8633
|
-
})(
|
|
8633
|
+
})(_reactIs_18_2_0_reactIs);
|
|
8634
8634
|
function traverseReactNode(children, fn) {
|
|
8635
8635
|
let i = 0;
|
|
8636
8636
|
function handle(target) {
|
|
8637
8637
|
React__default.Children.forEach(target, (child) => {
|
|
8638
|
-
if (!
|
|
8638
|
+
if (!_reactIs_18_2_0_reactIs.exports.isFragment(child)) {
|
|
8639
8639
|
fn(child, i);
|
|
8640
8640
|
i += 1;
|
|
8641
8641
|
} else {
|
|
@@ -10889,7 +10889,7 @@ var useSyncExternalStoreShim_development = {};
|
|
|
10889
10889
|
var useState2 = React2.useState, useEffect2 = React2.useEffect, useLayoutEffect2 = React2.useLayoutEffect, useDebugValue = React2.useDebugValue;
|
|
10890
10890
|
var didWarnOld18Alpha = false;
|
|
10891
10891
|
var didWarnUncachedGetSnapshot = false;
|
|
10892
|
-
function useSyncExternalStore(
|
|
10892
|
+
function useSyncExternalStore(subscribe2, getSnapshot, getServerSnapshot) {
|
|
10893
10893
|
{
|
|
10894
10894
|
if (!didWarnOld18Alpha) {
|
|
10895
10895
|
if (React2.startTransition !== void 0) {
|
|
@@ -10922,7 +10922,7 @@ var useSyncExternalStoreShim_development = {};
|
|
|
10922
10922
|
inst
|
|
10923
10923
|
});
|
|
10924
10924
|
}
|
|
10925
|
-
}, [
|
|
10925
|
+
}, [subscribe2, value, getSnapshot]);
|
|
10926
10926
|
useEffect2(function() {
|
|
10927
10927
|
if (checkIfSnapshotChanged(inst)) {
|
|
10928
10928
|
forceUpdate({
|
|
@@ -10936,8 +10936,8 @@ var useSyncExternalStoreShim_development = {};
|
|
|
10936
10936
|
});
|
|
10937
10937
|
}
|
|
10938
10938
|
};
|
|
10939
|
-
return
|
|
10940
|
-
}, [
|
|
10939
|
+
return subscribe2(handleStoreChange);
|
|
10940
|
+
}, [subscribe2]);
|
|
10941
10941
|
useDebugValue(value);
|
|
10942
10942
|
return value;
|
|
10943
10943
|
}
|
|
@@ -10951,7 +10951,7 @@ var useSyncExternalStoreShim_development = {};
|
|
|
10951
10951
|
return true;
|
|
10952
10952
|
}
|
|
10953
10953
|
}
|
|
10954
|
-
function useSyncExternalStore$1(
|
|
10954
|
+
function useSyncExternalStore$1(subscribe2, getSnapshot, getServerSnapshot) {
|
|
10955
10955
|
return getSnapshot();
|
|
10956
10956
|
}
|
|
10957
10957
|
var canUseDOM = !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined");
|
|
@@ -10993,13 +10993,14 @@ function restoreMotion() {
|
|
|
10993
10993
|
function isMotionReduced() {
|
|
10994
10994
|
return reduced;
|
|
10995
10995
|
}
|
|
10996
|
+
function subscribe(onStoreChange) {
|
|
10997
|
+
subscribers.add(onStoreChange);
|
|
10998
|
+
return () => {
|
|
10999
|
+
subscribers.delete(onStoreChange);
|
|
11000
|
+
};
|
|
11001
|
+
}
|
|
10996
11002
|
function useMotionReduced() {
|
|
10997
|
-
return shim.exports.useSyncExternalStore(
|
|
10998
|
-
subscribers.add(onStoreChange);
|
|
10999
|
-
return () => {
|
|
11000
|
-
subscribers.delete(onStoreChange);
|
|
11001
|
-
};
|
|
11002
|
-
}, isMotionReduced);
|
|
11003
|
+
return shim.exports.useSyncExternalStore(subscribe, isMotionReduced);
|
|
11003
11004
|
}
|
|
11004
11005
|
const classPrefix$16 = "adm-spin-loading";
|
|
11005
11006
|
const colorRecord$2 = {
|
|
@@ -18767,9 +18768,9 @@ function isSimpleFunctionComponent(type4) {
|
|
|
18767
18768
|
return typeof type4 === "function" && !shouldConstruct(type4) && type4.defaultProps === void 0;
|
|
18768
18769
|
}
|
|
18769
18770
|
function isSafeSetRefComponent(component) {
|
|
18770
|
-
if (
|
|
18771
|
+
if (_reactIs_18_2_0_reactIs.exports.isFragment(component))
|
|
18771
18772
|
return false;
|
|
18772
|
-
if (
|
|
18773
|
+
if (_reactIs_18_2_0_reactIs.exports.isMemo(component))
|
|
18773
18774
|
return isSafeSetRefComponent(component.type);
|
|
18774
18775
|
return !isSimpleFunctionComponent(component.type);
|
|
18775
18776
|
}
|
|
@@ -19053,7 +19054,8 @@ const arrow = (options) => ({
|
|
|
19053
19054
|
y,
|
|
19054
19055
|
placement,
|
|
19055
19056
|
rects,
|
|
19056
|
-
platform: platform2
|
|
19057
|
+
platform: platform2,
|
|
19058
|
+
elements
|
|
19057
19059
|
} = state;
|
|
19058
19060
|
if (element == null) {
|
|
19059
19061
|
{
|
|
@@ -19069,14 +19071,16 @@ const arrow = (options) => ({
|
|
|
19069
19071
|
const axis = getMainAxisFromPlacement(placement);
|
|
19070
19072
|
const length = getLengthFromAxis(axis);
|
|
19071
19073
|
const arrowDimensions = await platform2.getDimensions(element);
|
|
19072
|
-
const
|
|
19073
|
-
const
|
|
19074
|
+
const isYAxis = axis === "y";
|
|
19075
|
+
const minProp = isYAxis ? "top" : "left";
|
|
19076
|
+
const maxProp = isYAxis ? "bottom" : "right";
|
|
19077
|
+
const clientProp = isYAxis ? "clientHeight" : "clientWidth";
|
|
19074
19078
|
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
|
|
19075
19079
|
const startDiff = coords[axis] - rects.reference[axis];
|
|
19076
19080
|
const arrowOffsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(element));
|
|
19077
|
-
let clientSize = arrowOffsetParent ?
|
|
19078
|
-
if (clientSize
|
|
19079
|
-
clientSize = rects.floating[length];
|
|
19081
|
+
let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
|
|
19082
|
+
if (!clientSize || !await (platform2.isElement == null ? void 0 : platform2.isElement(arrowOffsetParent))) {
|
|
19083
|
+
clientSize = elements.floating[clientProp] || rects.floating[length];
|
|
19080
19084
|
}
|
|
19081
19085
|
const centerToReference = endDiff / 2 - startDiff / 2;
|
|
19082
19086
|
const min2 = paddingObject[minProp];
|
|
@@ -19516,25 +19520,8 @@ function getWindow(node) {
|
|
|
19516
19520
|
function getComputedStyle$1(element) {
|
|
19517
19521
|
return getWindow(element).getComputedStyle(element);
|
|
19518
19522
|
}
|
|
19519
|
-
|
|
19520
|
-
|
|
19521
|
-
const round = Math.round;
|
|
19522
|
-
function getCssDimensions(element) {
|
|
19523
|
-
const css = getComputedStyle$1(element);
|
|
19524
|
-
let width = parseFloat(css.width);
|
|
19525
|
-
let height = parseFloat(css.height);
|
|
19526
|
-
const offsetWidth = element.offsetWidth;
|
|
19527
|
-
const offsetHeight = element.offsetHeight;
|
|
19528
|
-
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
19529
|
-
if (shouldFallback) {
|
|
19530
|
-
width = offsetWidth;
|
|
19531
|
-
height = offsetHeight;
|
|
19532
|
-
}
|
|
19533
|
-
return {
|
|
19534
|
-
width,
|
|
19535
|
-
height,
|
|
19536
|
-
fallback: shouldFallback
|
|
19537
|
-
};
|
|
19523
|
+
function isNode(value) {
|
|
19524
|
+
return value instanceof getWindow(value).Node;
|
|
19538
19525
|
}
|
|
19539
19526
|
function getNodeName(node) {
|
|
19540
19527
|
return isNode(node) ? (node.nodeName || "").toLowerCase() : "";
|
|
@@ -19557,9 +19544,6 @@ function isHTMLElement(value) {
|
|
|
19557
19544
|
function isElement(value) {
|
|
19558
19545
|
return value instanceof getWindow(value).Element;
|
|
19559
19546
|
}
|
|
19560
|
-
function isNode(value) {
|
|
19561
|
-
return value instanceof getWindow(value).Node;
|
|
19562
|
-
}
|
|
19563
19547
|
function isShadowRoot(node) {
|
|
19564
19548
|
if (typeof ShadowRoot === "undefined") {
|
|
19565
19549
|
return false;
|
|
@@ -19594,6 +19578,27 @@ function isClientRectVisualViewportBased() {
|
|
|
19594
19578
|
function isLastTraversableNode(node) {
|
|
19595
19579
|
return ["html", "body", "#document"].includes(getNodeName(node));
|
|
19596
19580
|
}
|
|
19581
|
+
const min = Math.min;
|
|
19582
|
+
const max = Math.max;
|
|
19583
|
+
const round = Math.round;
|
|
19584
|
+
function getCssDimensions(element) {
|
|
19585
|
+
const css = getComputedStyle$1(element);
|
|
19586
|
+
let width = parseFloat(css.width);
|
|
19587
|
+
let height = parseFloat(css.height);
|
|
19588
|
+
const hasOffset = isHTMLElement(element);
|
|
19589
|
+
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
19590
|
+
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
19591
|
+
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
19592
|
+
if (shouldFallback) {
|
|
19593
|
+
width = offsetWidth;
|
|
19594
|
+
height = offsetHeight;
|
|
19595
|
+
}
|
|
19596
|
+
return {
|
|
19597
|
+
width,
|
|
19598
|
+
height,
|
|
19599
|
+
fallback: shouldFallback
|
|
19600
|
+
};
|
|
19601
|
+
}
|
|
19597
19602
|
function unwrapElement(element) {
|
|
19598
19603
|
return !isElement(element) ? element.contextElement : element;
|
|
19599
19604
|
}
|
|
@@ -19670,16 +19675,12 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
19670
19675
|
currentIFrame = getWindow(currentIFrame).frameElement;
|
|
19671
19676
|
}
|
|
19672
19677
|
}
|
|
19673
|
-
return {
|
|
19678
|
+
return rectToClientRect({
|
|
19674
19679
|
width,
|
|
19675
19680
|
height,
|
|
19676
|
-
top: y,
|
|
19677
|
-
right: x + width,
|
|
19678
|
-
bottom: y + height,
|
|
19679
|
-
left: x,
|
|
19680
19681
|
x,
|
|
19681
19682
|
y
|
|
19682
|
-
};
|
|
19683
|
+
});
|
|
19683
19684
|
}
|
|
19684
19685
|
function getDocumentElement(node) {
|
|
19685
19686
|
return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement;
|
|
@@ -19907,10 +19908,7 @@ function getClippingRect(_ref) {
|
|
|
19907
19908
|
};
|
|
19908
19909
|
}
|
|
19909
19910
|
function getDimensions(element) {
|
|
19910
|
-
|
|
19911
|
-
return getCssDimensions(element);
|
|
19912
|
-
}
|
|
19913
|
-
return element.getBoundingClientRect();
|
|
19911
|
+
return getCssDimensions(element);
|
|
19914
19912
|
}
|
|
19915
19913
|
function getTrueOffsetParent(element, polyfill) {
|
|
19916
19914
|
if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") {
|
|
@@ -19934,6 +19932,9 @@ function getContainingBlock(element) {
|
|
|
19934
19932
|
}
|
|
19935
19933
|
function getOffsetParent(element, polyfill) {
|
|
19936
19934
|
const window2 = getWindow(element);
|
|
19935
|
+
if (!isHTMLElement(element)) {
|
|
19936
|
+
return window2;
|
|
19937
|
+
}
|
|
19937
19938
|
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
19938
19939
|
while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === "static") {
|
|
19939
19940
|
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
@@ -20022,12 +20023,8 @@ function autoUpdate(reference, floating, update2, options) {
|
|
|
20022
20023
|
});
|
|
20023
20024
|
let observer = null;
|
|
20024
20025
|
if (elementResize) {
|
|
20025
|
-
let initialUpdate = true;
|
|
20026
20026
|
observer = new ResizeObserver(() => {
|
|
20027
|
-
|
|
20028
|
-
update2();
|
|
20029
|
-
}
|
|
20030
|
-
initialUpdate = false;
|
|
20027
|
+
update2();
|
|
20031
20028
|
});
|
|
20032
20029
|
isElement(reference) && !animationFrame && observer.observe(reference);
|
|
20033
20030
|
if (!isElement(reference) && reference.contextElement && !animationFrame) {
|
|
@@ -22592,6 +22589,19 @@ const PullToRefresh$1 = (p) => {
|
|
|
22592
22589
|
(_a2 = elementRef.current) === null || _a2 === void 0 ? void 0 : _a2.addEventListener("touchmove", () => {
|
|
22593
22590
|
});
|
|
22594
22591
|
}, []);
|
|
22592
|
+
const reset = () => {
|
|
22593
|
+
return new Promise((resolve) => {
|
|
22594
|
+
api.start({
|
|
22595
|
+
to: {
|
|
22596
|
+
height: 0
|
|
22597
|
+
},
|
|
22598
|
+
onResolve() {
|
|
22599
|
+
setStatus("pulling");
|
|
22600
|
+
resolve();
|
|
22601
|
+
}
|
|
22602
|
+
});
|
|
22603
|
+
});
|
|
22604
|
+
};
|
|
22595
22605
|
function doRefresh() {
|
|
22596
22606
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22597
22607
|
api.start({
|
|
@@ -22602,27 +22612,13 @@ const PullToRefresh$1 = (p) => {
|
|
|
22602
22612
|
yield props.onRefresh();
|
|
22603
22613
|
setStatus("complete");
|
|
22604
22614
|
} catch (e) {
|
|
22605
|
-
|
|
22606
|
-
to: (next) => __awaiter(this, void 0, void 0, function* () {
|
|
22607
|
-
yield next({
|
|
22608
|
-
height: 0
|
|
22609
|
-
});
|
|
22610
|
-
setStatus("pulling");
|
|
22611
|
-
})
|
|
22612
|
-
});
|
|
22615
|
+
reset();
|
|
22613
22616
|
throw e;
|
|
22614
22617
|
}
|
|
22615
22618
|
if (props.completeDelay > 0) {
|
|
22616
22619
|
yield sleep(props.completeDelay);
|
|
22617
22620
|
}
|
|
22618
|
-
|
|
22619
|
-
to: (next) => __awaiter(this, void 0, void 0, function* () {
|
|
22620
|
-
yield next({
|
|
22621
|
-
height: 0
|
|
22622
|
-
});
|
|
22623
|
-
setStatus("pulling");
|
|
22624
|
-
})
|
|
22625
|
-
});
|
|
22621
|
+
reset();
|
|
22626
22622
|
});
|
|
22627
22623
|
}
|
|
22628
22624
|
useDrag((state) => {
|
|
@@ -24176,7 +24172,7 @@ const defaultProps$d = {
|
|
|
24176
24172
|
disabled: false,
|
|
24177
24173
|
allowEmpty: false
|
|
24178
24174
|
};
|
|
24179
|
-
function
|
|
24175
|
+
function InnerStepper(p, ref) {
|
|
24180
24176
|
const props = mergeProps(defaultProps$d, p);
|
|
24181
24177
|
const {
|
|
24182
24178
|
defaultValue = 0,
|
|
@@ -24195,6 +24191,20 @@ function Stepper(p) {
|
|
|
24195
24191
|
const {
|
|
24196
24192
|
locale
|
|
24197
24193
|
} = useConfig();
|
|
24194
|
+
useImperativeHandle(ref, () => ({
|
|
24195
|
+
focus: () => {
|
|
24196
|
+
var _a;
|
|
24197
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
24198
|
+
},
|
|
24199
|
+
blur: () => {
|
|
24200
|
+
var _a;
|
|
24201
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.blur();
|
|
24202
|
+
},
|
|
24203
|
+
get nativeElement() {
|
|
24204
|
+
var _a, _b;
|
|
24205
|
+
return (_b = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.nativeElement) !== null && _b !== void 0 ? _b : null;
|
|
24206
|
+
}
|
|
24207
|
+
}));
|
|
24198
24208
|
const fixedValue = (value2) => {
|
|
24199
24209
|
const fixedValue2 = digits !== void 0 ? toFixed(value2.toString(), ".", digits) : value2;
|
|
24200
24210
|
return fixedValue2.toString();
|
|
@@ -24359,6 +24369,8 @@ function Stepper(p) {
|
|
|
24359
24369
|
"aria-label": locale.Stepper.increase
|
|
24360
24370
|
}, React__default.createElement(AddOutline, null))));
|
|
24361
24371
|
}
|
|
24372
|
+
const Stepper$1 = forwardRef(InnerStepper);
|
|
24373
|
+
const Stepper = Stepper$1;
|
|
24362
24374
|
const steps = "";
|
|
24363
24375
|
const classPrefix$d = `adm-step`;
|
|
24364
24376
|
const Step = (props) => {
|
|
@@ -25167,6 +25179,7 @@ const TextArea$1 = forwardRef((p, ref) => {
|
|
|
25167
25179
|
}
|
|
25168
25180
|
const nativeTextAreaRef = useRef(null);
|
|
25169
25181
|
const heightRef = useRef("auto");
|
|
25182
|
+
const hiddenTextAreaRef = useRef(null);
|
|
25170
25183
|
useImperativeHandle(ref, () => ({
|
|
25171
25184
|
clear: () => {
|
|
25172
25185
|
setValue2("");
|
|
@@ -25187,10 +25200,13 @@ const TextArea$1 = forwardRef((p, ref) => {
|
|
|
25187
25200
|
if (!autoSize)
|
|
25188
25201
|
return;
|
|
25189
25202
|
const textArea2 = nativeTextAreaRef.current;
|
|
25203
|
+
const hiddenTextArea = hiddenTextAreaRef.current;
|
|
25190
25204
|
if (!textArea2)
|
|
25191
25205
|
return;
|
|
25192
25206
|
textArea2.style.height = heightRef.current;
|
|
25193
|
-
|
|
25207
|
+
if (!hiddenTextArea)
|
|
25208
|
+
return;
|
|
25209
|
+
let height = hiddenTextArea.scrollHeight;
|
|
25194
25210
|
if (typeof autoSize === "object") {
|
|
25195
25211
|
const computedStyle = window.getComputedStyle(textArea2);
|
|
25196
25212
|
const lineHeight = parseFloat(computedStyle.lineHeight);
|
|
@@ -25252,7 +25268,13 @@ const TextArea$1 = forwardRef((p, ref) => {
|
|
|
25252
25268
|
onFocus: props.onFocus,
|
|
25253
25269
|
onBlur: props.onBlur,
|
|
25254
25270
|
onClick: props.onClick
|
|
25255
|
-
}), count
|
|
25271
|
+
}), count, autoSize && React__default.createElement("textarea", {
|
|
25272
|
+
ref: hiddenTextAreaRef,
|
|
25273
|
+
className: `${classPrefix$6}-element ${classPrefix$6}-element-hidden`,
|
|
25274
|
+
value,
|
|
25275
|
+
"aria-hidden": true,
|
|
25276
|
+
readOnly: true
|
|
25277
|
+
})));
|
|
25256
25278
|
});
|
|
25257
25279
|
TextArea$1.defaultProps = defaultProps$6;
|
|
25258
25280
|
const TextArea = TextArea$1;
|