antd-mobile 5.28.0 → 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 +341 -284
- package/2x/bundle/antd-mobile.cjs.js +10 -9
- package/2x/bundle/antd-mobile.es.development.js +341 -284
- package/2x/bundle/antd-mobile.es.js +4969 -4923
- package/2x/bundle/antd-mobile.umd.development.js +341 -284
- package/2x/bundle/antd-mobile.umd.js +10 -9
- package/2x/bundle/css-vars-patch.css +1 -0
- package/2x/bundle/style.css +9 -2
- package/2x/cjs/components/ellipsis/ellipsis.d.ts +1 -0
- package/2x/cjs/components/ellipsis/ellipsis.js +3 -2
- package/2x/cjs/components/nav-bar/nav-bar.d.ts +2 -2
- package/2x/cjs/components/popover/popover.css +1 -1
- package/2x/cjs/components/popover/popover.patch.css +1 -0
- package/2x/cjs/components/popup/popup.js +7 -1
- 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/steps/steps.css +0 -1
- package/2x/cjs/components/swiper/swiper.js +6 -3
- package/2x/cjs/components/text-area/text-area.css +8 -0
- package/2x/cjs/components/text-area/text-area.js +16 -3
- package/2x/cjs/global/css-vars-patch.css +1 -0
- package/2x/cjs/index.d.ts +1 -1
- package/2x/cjs/locales/base.d.ts +1 -0
- package/2x/cjs/locales/base.js +2 -1
- package/2x/cjs/locales/en-US.d.ts +1 -0
- package/2x/cjs/locales/es-ES.d.ts +1 -0
- package/2x/cjs/locales/fa-IR.d.ts +1 -0
- package/2x/cjs/locales/fr-FR.d.ts +1 -0
- package/2x/cjs/locales/id-ID.d.ts +1 -0
- package/2x/cjs/locales/ja-JP.d.ts +1 -0
- package/2x/cjs/locales/kk-KZ.d.ts +1 -0
- package/2x/cjs/locales/ko-KR.d.ts +1 -0
- package/2x/cjs/locales/ko-KR.js +31 -2
- package/2x/cjs/locales/zh-CN.d.ts +1 -0
- package/2x/cjs/locales/zh-CN.js +2 -1
- package/2x/cjs/locales/zh-HK.d.ts +1 -0
- package/2x/cjs/locales/zh-HK.js +2 -1
- package/2x/cjs/locales/zh-TW.d.ts +1 -0
- package/2x/cjs/locales/zh-TW.js +2 -1
- package/2x/cjs/utils/reduce-and-restore-motion.js +7 -6
- package/2x/cjs/utils/render-imperatively.js +9 -3
- package/2x/es/components/ellipsis/ellipsis.d.ts +1 -0
- package/2x/es/components/ellipsis/ellipsis.js +3 -2
- package/2x/es/components/nav-bar/nav-bar.d.ts +2 -2
- package/2x/es/components/popover/popover.css +1 -1
- package/2x/es/components/popover/popover.patch.css +1 -0
- package/2x/es/components/popup/popup.js +7 -1
- 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/steps/steps.css +0 -1
- package/2x/es/components/swiper/swiper.js +6 -3
- package/2x/es/components/text-area/text-area.css +8 -0
- package/2x/es/components/text-area/text-area.js +16 -3
- package/2x/es/global/css-vars-patch.css +1 -0
- package/2x/es/index.d.ts +1 -1
- package/2x/es/locales/base.d.ts +1 -0
- package/2x/es/locales/base.js +2 -1
- package/2x/es/locales/en-US.d.ts +1 -0
- package/2x/es/locales/es-ES.d.ts +1 -0
- package/2x/es/locales/fa-IR.d.ts +1 -0
- package/2x/es/locales/fr-FR.d.ts +1 -0
- package/2x/es/locales/id-ID.d.ts +1 -0
- package/2x/es/locales/ja-JP.d.ts +1 -0
- package/2x/es/locales/kk-KZ.d.ts +1 -0
- package/2x/es/locales/ko-KR.d.ts +1 -0
- package/2x/es/locales/ko-KR.js +31 -2
- package/2x/es/locales/zh-CN.d.ts +1 -0
- package/2x/es/locales/zh-CN.js +2 -1
- package/2x/es/locales/zh-HK.d.ts +1 -0
- package/2x/es/locales/zh-HK.js +2 -1
- package/2x/es/locales/zh-TW.d.ts +1 -0
- package/2x/es/locales/zh-TW.js +2 -1
- package/2x/es/utils/reduce-and-restore-motion.js +7 -6
- package/2x/es/utils/render-imperatively.js +9 -3
- package/2x/package.json +3 -3
- package/bundle/antd-mobile.cjs.development.js +341 -284
- package/bundle/antd-mobile.cjs.js +10 -9
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +341 -284
- package/bundle/antd-mobile.es.js +4969 -4923
- package/bundle/antd-mobile.umd.development.js +341 -284
- 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/ellipsis/ellipsis.d.ts +1 -0
- package/cjs/components/ellipsis/ellipsis.js +3 -2
- package/cjs/components/nav-bar/nav-bar.d.ts +2 -2
- package/cjs/components/popover/popover.css +1 -1
- package/cjs/components/popover/popover.patch.css +1 -0
- package/cjs/components/popup/popup.js +7 -1
- 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/steps/steps.css +0 -1
- package/cjs/components/swiper/swiper.js +6 -3
- package/cjs/components/text-area/text-area.css +7 -0
- package/cjs/components/text-area/text-area.js +16 -3
- package/cjs/global/css-vars-patch.css +1 -0
- package/cjs/index.d.ts +1 -1
- package/cjs/locales/base.d.ts +1 -0
- package/cjs/locales/base.js +2 -1
- package/cjs/locales/en-US.d.ts +1 -0
- package/cjs/locales/es-ES.d.ts +1 -0
- package/cjs/locales/fa-IR.d.ts +1 -0
- package/cjs/locales/fr-FR.d.ts +1 -0
- package/cjs/locales/id-ID.d.ts +1 -0
- package/cjs/locales/ja-JP.d.ts +1 -0
- package/cjs/locales/kk-KZ.d.ts +1 -0
- package/cjs/locales/ko-KR.d.ts +1 -0
- package/cjs/locales/ko-KR.js +31 -2
- package/cjs/locales/zh-CN.d.ts +1 -0
- package/cjs/locales/zh-CN.js +2 -1
- package/cjs/locales/zh-HK.d.ts +1 -0
- package/cjs/locales/zh-HK.js +2 -1
- package/cjs/locales/zh-TW.d.ts +1 -0
- package/cjs/locales/zh-TW.js +2 -1
- package/cjs/utils/reduce-and-restore-motion.js +7 -6
- package/cjs/utils/render-imperatively.js +9 -3
- package/es/components/ellipsis/ellipsis.d.ts +1 -0
- package/es/components/ellipsis/ellipsis.js +3 -2
- package/es/components/nav-bar/nav-bar.d.ts +2 -2
- package/es/components/popover/popover.css +1 -1
- package/es/components/popover/popover.patch.css +1 -0
- package/es/components/popup/popup.js +7 -1
- 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/steps/steps.css +0 -1
- package/es/components/swiper/swiper.js +6 -3
- package/es/components/text-area/text-area.css +7 -0
- package/es/components/text-area/text-area.js +16 -3
- package/es/global/css-vars-patch.css +1 -0
- package/es/index.d.ts +1 -1
- package/es/locales/base.d.ts +1 -0
- package/es/locales/base.js +2 -1
- package/es/locales/en-US.d.ts +1 -0
- package/es/locales/es-ES.d.ts +1 -0
- package/es/locales/fa-IR.d.ts +1 -0
- package/es/locales/fr-FR.d.ts +1 -0
- package/es/locales/id-ID.d.ts +1 -0
- package/es/locales/ja-JP.d.ts +1 -0
- package/es/locales/kk-KZ.d.ts +1 -0
- package/es/locales/ko-KR.d.ts +1 -0
- package/es/locales/ko-KR.js +31 -2
- package/es/locales/zh-CN.d.ts +1 -0
- package/es/locales/zh-CN.js +2 -1
- package/es/locales/zh-HK.d.ts +1 -0
- package/es/locales/zh-HK.js +2 -1
- package/es/locales/zh-TW.d.ts +1 -0
- package/es/locales/zh-TW.js +2 -1
- package/es/utils/reduce-and-restore-motion.js +7 -6
- package/es/utils/render-imperatively.js +9 -3
- package/package.json +3 -3
- package/umd/antd-mobile.js +1 -1
- package/umd/antd-mobile.js.LICENSE.txt +5 -4
|
@@ -90,7 +90,8 @@ const base = {
|
|
|
90
90
|
common: {
|
|
91
91
|
confirm: "Confirm",
|
|
92
92
|
cancel: "Cancel",
|
|
93
|
-
loading: "Loading"
|
|
93
|
+
loading: "Loading",
|
|
94
|
+
close: "Close"
|
|
94
95
|
},
|
|
95
96
|
Calendar: {
|
|
96
97
|
markItems: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
|
|
@@ -220,7 +221,8 @@ const zhCN = mergeLocale(base, {
|
|
|
220
221
|
common: {
|
|
221
222
|
confirm: "\u786E\u5B9A",
|
|
222
223
|
cancel: "\u53D6\u6D88",
|
|
223
|
-
loading: "\u52A0\u8F7D\u4E2D"
|
|
224
|
+
loading: "\u52A0\u8F7D\u4E2D",
|
|
225
|
+
close: "\u5173\u95ED"
|
|
224
226
|
},
|
|
225
227
|
Calendar: {
|
|
226
228
|
markItems: ["\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D", "\u65E5"],
|
|
@@ -3136,7 +3138,13 @@ const useLayoutEffectWithTarget = useEffectWithTarget;
|
|
|
3136
3138
|
const useIsomorphicLayoutEffectWithTarget = isBrowser$3 ? useLayoutEffectWithTarget : useEffectWithTarget$2;
|
|
3137
3139
|
const useIsomorphicLayoutEffectWithTarget$1 = useIsomorphicLayoutEffectWithTarget;
|
|
3138
3140
|
function useSize(target) {
|
|
3139
|
-
const [state, setState] = useRafState()
|
|
3141
|
+
const [state, setState] = useRafState(() => {
|
|
3142
|
+
const el = getTargetElement(target);
|
|
3143
|
+
return el ? {
|
|
3144
|
+
width: el.clientWidth,
|
|
3145
|
+
height: el.clientHeight
|
|
3146
|
+
} : void 0;
|
|
3147
|
+
});
|
|
3140
3148
|
useIsomorphicLayoutEffectWithTarget$1(() => {
|
|
3141
3149
|
const el = getTargetElement(target);
|
|
3142
3150
|
if (!el) {
|
|
@@ -7309,6 +7317,9 @@ const defaultProps$12 = Object.assign(Object.assign({}, defaultPopupBaseProps),
|
|
|
7309
7317
|
});
|
|
7310
7318
|
const Popup$1 = (p) => {
|
|
7311
7319
|
const props = mergeProps(defaultProps$12, p);
|
|
7320
|
+
const {
|
|
7321
|
+
locale
|
|
7322
|
+
} = useConfig();
|
|
7312
7323
|
const bodyCls = classNames(`${classPrefix$1k}-body`, props.bodyClassName, `${classPrefix$1k}-body-position-${props.position}`);
|
|
7313
7324
|
const [active, setActive] = React$4.useState(props.visible);
|
|
7314
7325
|
useIsomorphicLayoutEffect$2(() => {
|
|
@@ -7388,7 +7399,9 @@ const Popup$1 = (p) => {
|
|
|
7388
7399
|
onClick: () => {
|
|
7389
7400
|
var _a;
|
|
7390
7401
|
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
7391
|
-
}
|
|
7402
|
+
},
|
|
7403
|
+
role: "button",
|
|
7404
|
+
"aria-label": locale.common.close
|
|
7392
7405
|
}, React__default.default.createElement(CloseOutline, null)), props.children))));
|
|
7393
7406
|
return React__default.default.createElement(ShouldRender, {
|
|
7394
7407
|
active,
|
|
@@ -7520,10 +7533,14 @@ function renderImperatively(element) {
|
|
|
7520
7533
|
ref: wrapperRef
|
|
7521
7534
|
}));
|
|
7522
7535
|
return {
|
|
7523
|
-
close: () => {
|
|
7536
|
+
close: () => __awaiter(this, void 0, void 0, function* () {
|
|
7524
7537
|
var _a;
|
|
7525
|
-
(
|
|
7526
|
-
|
|
7538
|
+
if (!wrapperRef.current) {
|
|
7539
|
+
unmount2();
|
|
7540
|
+
} else {
|
|
7541
|
+
(_a = wrapperRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
7542
|
+
}
|
|
7543
|
+
}),
|
|
7527
7544
|
replace: (element2) => {
|
|
7528
7545
|
var _a;
|
|
7529
7546
|
(_a = wrapperRef.current) === null || _a === void 0 ? void 0 : _a.replace(element2);
|
|
@@ -8450,9 +8467,10 @@ const ScrollMask$1 = (props) => {
|
|
|
8450
8467
|
}));
|
|
8451
8468
|
};
|
|
8452
8469
|
const ScrollMask = ScrollMask$1;
|
|
8453
|
-
var
|
|
8470
|
+
var _reactIs_18_2_0_reactIs = { exports: {} };
|
|
8454
8471
|
var reactIs_development$1 = {};
|
|
8455
|
-
/**
|
|
8472
|
+
/**
|
|
8473
|
+
* @license React
|
|
8456
8474
|
* react-is.development.js
|
|
8457
8475
|
*
|
|
8458
8476
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -8462,56 +8480,38 @@ var reactIs_development$1 = {};
|
|
|
8462
8480
|
*/
|
|
8463
8481
|
{
|
|
8464
8482
|
(function() {
|
|
8465
|
-
var REACT_ELEMENT_TYPE =
|
|
8466
|
-
var REACT_PORTAL_TYPE =
|
|
8467
|
-
var REACT_FRAGMENT_TYPE =
|
|
8468
|
-
var REACT_STRICT_MODE_TYPE =
|
|
8469
|
-
var REACT_PROFILER_TYPE =
|
|
8470
|
-
var REACT_PROVIDER_TYPE =
|
|
8471
|
-
var REACT_CONTEXT_TYPE =
|
|
8472
|
-
var
|
|
8473
|
-
var
|
|
8474
|
-
var
|
|
8475
|
-
var
|
|
8476
|
-
var
|
|
8477
|
-
var
|
|
8478
|
-
var
|
|
8479
|
-
var REACT_FUNDAMENTAL_TYPE = 60117;
|
|
8480
|
-
var REACT_DEBUG_TRACING_MODE_TYPE = 60129;
|
|
8481
|
-
var REACT_LEGACY_HIDDEN_TYPE = 60131;
|
|
8482
|
-
if (typeof Symbol === "function" && Symbol.for) {
|
|
8483
|
-
var symbolFor = Symbol.for;
|
|
8484
|
-
REACT_ELEMENT_TYPE = symbolFor("react.element");
|
|
8485
|
-
REACT_PORTAL_TYPE = symbolFor("react.portal");
|
|
8486
|
-
REACT_FRAGMENT_TYPE = symbolFor("react.fragment");
|
|
8487
|
-
REACT_STRICT_MODE_TYPE = symbolFor("react.strict_mode");
|
|
8488
|
-
REACT_PROFILER_TYPE = symbolFor("react.profiler");
|
|
8489
|
-
REACT_PROVIDER_TYPE = symbolFor("react.provider");
|
|
8490
|
-
REACT_CONTEXT_TYPE = symbolFor("react.context");
|
|
8491
|
-
REACT_FORWARD_REF_TYPE = symbolFor("react.forward_ref");
|
|
8492
|
-
REACT_SUSPENSE_TYPE = symbolFor("react.suspense");
|
|
8493
|
-
REACT_SUSPENSE_LIST_TYPE = symbolFor("react.suspense_list");
|
|
8494
|
-
REACT_MEMO_TYPE = symbolFor("react.memo");
|
|
8495
|
-
REACT_LAZY_TYPE = symbolFor("react.lazy");
|
|
8496
|
-
REACT_BLOCK_TYPE = symbolFor("react.block");
|
|
8497
|
-
REACT_SERVER_BLOCK_TYPE = symbolFor("react.server.block");
|
|
8498
|
-
REACT_FUNDAMENTAL_TYPE = symbolFor("react.fundamental");
|
|
8499
|
-
symbolFor("react.scope");
|
|
8500
|
-
symbolFor("react.opaque.id");
|
|
8501
|
-
REACT_DEBUG_TRACING_MODE_TYPE = symbolFor("react.debug_trace_mode");
|
|
8502
|
-
symbolFor("react.offscreen");
|
|
8503
|
-
REACT_LEGACY_HIDDEN_TYPE = symbolFor("react.legacy_hidden");
|
|
8504
|
-
}
|
|
8483
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.element");
|
|
8484
|
+
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
|
|
8485
|
+
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
8486
|
+
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
|
8487
|
+
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
|
8488
|
+
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
|
8489
|
+
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
|
8490
|
+
var REACT_SERVER_CONTEXT_TYPE = Symbol.for("react.server_context");
|
|
8491
|
+
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
|
8492
|
+
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
|
8493
|
+
var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
|
|
8494
|
+
var REACT_MEMO_TYPE = Symbol.for("react.memo");
|
|
8495
|
+
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
8496
|
+
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
|
|
8505
8497
|
var enableScopeAPI = false;
|
|
8498
|
+
var enableCacheElement = false;
|
|
8499
|
+
var enableTransitionTracing = false;
|
|
8500
|
+
var enableLegacyHidden = false;
|
|
8501
|
+
var enableDebugTracing = false;
|
|
8502
|
+
var REACT_MODULE_REFERENCE;
|
|
8503
|
+
{
|
|
8504
|
+
REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
|
|
8505
|
+
}
|
|
8506
8506
|
function isValidElementType(type4) {
|
|
8507
8507
|
if (typeof type4 === "string" || typeof type4 === "function") {
|
|
8508
8508
|
return true;
|
|
8509
8509
|
}
|
|
8510
|
-
if (type4 === REACT_FRAGMENT_TYPE || type4 === REACT_PROFILER_TYPE ||
|
|
8510
|
+
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) {
|
|
8511
8511
|
return true;
|
|
8512
8512
|
}
|
|
8513
8513
|
if (typeof type4 === "object" && type4 !== null) {
|
|
8514
|
-
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 ===
|
|
8514
|
+
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) {
|
|
8515
8515
|
return true;
|
|
8516
8516
|
}
|
|
8517
8517
|
}
|
|
@@ -8533,6 +8533,7 @@ var reactIs_development$1 = {};
|
|
|
8533
8533
|
default:
|
|
8534
8534
|
var $$typeofType = type4 && type4.$$typeof;
|
|
8535
8535
|
switch ($$typeofType) {
|
|
8536
|
+
case REACT_SERVER_CONTEXT_TYPE:
|
|
8536
8537
|
case REACT_CONTEXT_TYPE:
|
|
8537
8538
|
case REACT_FORWARD_REF_TYPE:
|
|
8538
8539
|
case REACT_LAZY_TYPE:
|
|
@@ -8560,6 +8561,7 @@ var reactIs_development$1 = {};
|
|
|
8560
8561
|
var Profiler = REACT_PROFILER_TYPE;
|
|
8561
8562
|
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
8562
8563
|
var Suspense = REACT_SUSPENSE_TYPE;
|
|
8564
|
+
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
|
8563
8565
|
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
8564
8566
|
var hasWarnedAboutDeprecatedIsConcurrentMode = false;
|
|
8565
8567
|
function isAsyncMode(object4) {
|
|
@@ -8613,6 +8615,9 @@ var reactIs_development$1 = {};
|
|
|
8613
8615
|
function isSuspense(object4) {
|
|
8614
8616
|
return typeOf(object4) === REACT_SUSPENSE_TYPE;
|
|
8615
8617
|
}
|
|
8618
|
+
function isSuspenseList(object4) {
|
|
8619
|
+
return typeOf(object4) === REACT_SUSPENSE_LIST_TYPE;
|
|
8620
|
+
}
|
|
8616
8621
|
reactIs_development$1.ContextConsumer = ContextConsumer;
|
|
8617
8622
|
reactIs_development$1.ContextProvider = ContextProvider;
|
|
8618
8623
|
reactIs_development$1.Element = Element2;
|
|
@@ -8624,6 +8629,7 @@ var reactIs_development$1 = {};
|
|
|
8624
8629
|
reactIs_development$1.Profiler = Profiler;
|
|
8625
8630
|
reactIs_development$1.StrictMode = StrictMode;
|
|
8626
8631
|
reactIs_development$1.Suspense = Suspense;
|
|
8632
|
+
reactIs_development$1.SuspenseList = SuspenseList;
|
|
8627
8633
|
reactIs_development$1.isAsyncMode = isAsyncMode;
|
|
8628
8634
|
reactIs_development$1.isConcurrentMode = isConcurrentMode;
|
|
8629
8635
|
reactIs_development$1.isContextConsumer = isContextConsumer;
|
|
@@ -8637,6 +8643,7 @@ var reactIs_development$1 = {};
|
|
|
8637
8643
|
reactIs_development$1.isProfiler = isProfiler;
|
|
8638
8644
|
reactIs_development$1.isStrictMode = isStrictMode;
|
|
8639
8645
|
reactIs_development$1.isSuspense = isSuspense;
|
|
8646
|
+
reactIs_development$1.isSuspenseList = isSuspenseList;
|
|
8640
8647
|
reactIs_development$1.isValidElementType = isValidElementType;
|
|
8641
8648
|
reactIs_development$1.typeOf = typeOf;
|
|
8642
8649
|
})();
|
|
@@ -8645,12 +8652,12 @@ var reactIs_development$1 = {};
|
|
|
8645
8652
|
{
|
|
8646
8653
|
module2.exports = reactIs_development$1;
|
|
8647
8654
|
}
|
|
8648
|
-
})(
|
|
8655
|
+
})(_reactIs_18_2_0_reactIs);
|
|
8649
8656
|
function traverseReactNode(children, fn) {
|
|
8650
8657
|
let i = 0;
|
|
8651
8658
|
function handle(target) {
|
|
8652
8659
|
React__default.default.Children.forEach(target, (child) => {
|
|
8653
|
-
if (!
|
|
8660
|
+
if (!_reactIs_18_2_0_reactIs.exports.isFragment(child)) {
|
|
8654
8661
|
fn(child, i);
|
|
8655
8662
|
i += 1;
|
|
8656
8663
|
} else {
|
|
@@ -10904,7 +10911,7 @@ var useSyncExternalStoreShim_development = {};
|
|
|
10904
10911
|
var useState2 = React2.useState, useEffect = React2.useEffect, useLayoutEffect2 = React2.useLayoutEffect, useDebugValue = React2.useDebugValue;
|
|
10905
10912
|
var didWarnOld18Alpha = false;
|
|
10906
10913
|
var didWarnUncachedGetSnapshot = false;
|
|
10907
|
-
function useSyncExternalStore(
|
|
10914
|
+
function useSyncExternalStore(subscribe2, getSnapshot, getServerSnapshot) {
|
|
10908
10915
|
{
|
|
10909
10916
|
if (!didWarnOld18Alpha) {
|
|
10910
10917
|
if (React2.startTransition !== void 0) {
|
|
@@ -10937,7 +10944,7 @@ var useSyncExternalStoreShim_development = {};
|
|
|
10937
10944
|
inst
|
|
10938
10945
|
});
|
|
10939
10946
|
}
|
|
10940
|
-
}, [
|
|
10947
|
+
}, [subscribe2, value, getSnapshot]);
|
|
10941
10948
|
useEffect(function() {
|
|
10942
10949
|
if (checkIfSnapshotChanged(inst)) {
|
|
10943
10950
|
forceUpdate({
|
|
@@ -10951,8 +10958,8 @@ var useSyncExternalStoreShim_development = {};
|
|
|
10951
10958
|
});
|
|
10952
10959
|
}
|
|
10953
10960
|
};
|
|
10954
|
-
return
|
|
10955
|
-
}, [
|
|
10961
|
+
return subscribe2(handleStoreChange);
|
|
10962
|
+
}, [subscribe2]);
|
|
10956
10963
|
useDebugValue(value);
|
|
10957
10964
|
return value;
|
|
10958
10965
|
}
|
|
@@ -10966,7 +10973,7 @@ var useSyncExternalStoreShim_development = {};
|
|
|
10966
10973
|
return true;
|
|
10967
10974
|
}
|
|
10968
10975
|
}
|
|
10969
|
-
function useSyncExternalStore$1(
|
|
10976
|
+
function useSyncExternalStore$1(subscribe2, getSnapshot, getServerSnapshot) {
|
|
10970
10977
|
return getSnapshot();
|
|
10971
10978
|
}
|
|
10972
10979
|
var canUseDOM = !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined");
|
|
@@ -11008,13 +11015,14 @@ function restoreMotion() {
|
|
|
11008
11015
|
function isMotionReduced() {
|
|
11009
11016
|
return reduced;
|
|
11010
11017
|
}
|
|
11018
|
+
function subscribe(onStoreChange) {
|
|
11019
|
+
subscribers.add(onStoreChange);
|
|
11020
|
+
return () => {
|
|
11021
|
+
subscribers.delete(onStoreChange);
|
|
11022
|
+
};
|
|
11023
|
+
}
|
|
11011
11024
|
function useMotionReduced() {
|
|
11012
|
-
return shim.exports.useSyncExternalStore(
|
|
11013
|
-
subscribers.add(onStoreChange);
|
|
11014
|
-
return () => {
|
|
11015
|
-
subscribers.delete(onStoreChange);
|
|
11016
|
-
};
|
|
11017
|
-
}, isMotionReduced);
|
|
11025
|
+
return shim.exports.useSyncExternalStore(subscribe, isMotionReduced);
|
|
11018
11026
|
}
|
|
11019
11027
|
const classPrefix$16 = "adm-spin-loading";
|
|
11020
11028
|
const colorRecord$2 = {
|
|
@@ -13411,13 +13419,14 @@ const defaultProps$G = {
|
|
|
13411
13419
|
collapseText: "",
|
|
13412
13420
|
stopPropagationForActionButtons: [],
|
|
13413
13421
|
onContentClick: () => {
|
|
13414
|
-
}
|
|
13422
|
+
},
|
|
13423
|
+
defaultExpanded: false
|
|
13415
13424
|
};
|
|
13416
13425
|
const Ellipsis$1 = (p) => {
|
|
13417
13426
|
const props = mergeProps(defaultProps$G, p);
|
|
13418
13427
|
const rootRef = React$4.useRef(null);
|
|
13419
13428
|
const [ellipsised, setEllipsised] = React$4.useState({});
|
|
13420
|
-
const [expanded, setExpanded] = React$4.useState(
|
|
13429
|
+
const [expanded, setExpanded] = React$4.useState(props.defaultExpanded);
|
|
13421
13430
|
const [exceeded, setExceeded] = React$4.useState(false);
|
|
13422
13431
|
const chars = React$4.useMemo(() => _runes_0_4_3_runes.exports(props.content), [props.content]);
|
|
13423
13432
|
function getSubString(start2, end) {
|
|
@@ -16473,7 +16482,7 @@ function _validateRule() {
|
|
|
16473
16482
|
_validateRule = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee2(name, value, rule, options, messageVariables) {
|
|
16474
16483
|
var cloneRule, originValidator, subRuleField, validator, messages2, result2, subResults, kv, fillVariableResult;
|
|
16475
16484
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
16476
|
-
while (1)
|
|
16485
|
+
while (1)
|
|
16477
16486
|
switch (_context2.prev = _context2.next) {
|
|
16478
16487
|
case 0:
|
|
16479
16488
|
cloneRule = _objectSpread2({}, rule);
|
|
@@ -16546,7 +16555,6 @@ function _validateRule() {
|
|
|
16546
16555
|
case "end":
|
|
16547
16556
|
return _context2.stop();
|
|
16548
16557
|
}
|
|
16549
|
-
}
|
|
16550
16558
|
}, _callee2, null, [[9, 14]]);
|
|
16551
16559
|
}));
|
|
16552
16560
|
return _validateRule.apply(this, arguments);
|
|
@@ -16602,7 +16610,7 @@ function validateRules(namePath, value, rules2, options, validateFirst, messageV
|
|
|
16602
16610
|
var _ref3 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee(resolve, reject) {
|
|
16603
16611
|
var i, rule, errors;
|
|
16604
16612
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
16605
|
-
while (1)
|
|
16613
|
+
while (1)
|
|
16606
16614
|
switch (_context.prev = _context.next) {
|
|
16607
16615
|
case 0:
|
|
16608
16616
|
i = 0;
|
|
@@ -16635,7 +16643,6 @@ function validateRules(namePath, value, rules2, options, validateFirst, messageV
|
|
|
16635
16643
|
case "end":
|
|
16636
16644
|
return _context.stop();
|
|
16637
16645
|
}
|
|
16638
|
-
}
|
|
16639
16646
|
}, _callee);
|
|
16640
16647
|
}));
|
|
16641
16648
|
return function(_x6, _x7) {
|
|
@@ -16666,7 +16673,7 @@ function finishOnAllFailed(_x8) {
|
|
|
16666
16673
|
function _finishOnAllFailed() {
|
|
16667
16674
|
_finishOnAllFailed = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee3(rulePromises) {
|
|
16668
16675
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
16669
|
-
while (1)
|
|
16676
|
+
while (1)
|
|
16670
16677
|
switch (_context3.prev = _context3.next) {
|
|
16671
16678
|
case 0:
|
|
16672
16679
|
return _context3.abrupt("return", Promise.all(rulePromises).then(function(errorsList) {
|
|
@@ -16678,7 +16685,6 @@ function _finishOnAllFailed() {
|
|
|
16678
16685
|
case "end":
|
|
16679
16686
|
return _context3.stop();
|
|
16680
16687
|
}
|
|
16681
|
-
}
|
|
16682
16688
|
}, _callee3);
|
|
16683
16689
|
}));
|
|
16684
16690
|
return _finishOnAllFailed.apply(this, arguments);
|
|
@@ -16690,7 +16696,7 @@ function _finishOnFirstFailed() {
|
|
|
16690
16696
|
_finishOnFirstFailed = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee4(rulePromises) {
|
|
16691
16697
|
var count;
|
|
16692
16698
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
16693
|
-
while (1)
|
|
16699
|
+
while (1)
|
|
16694
16700
|
switch (_context4.prev = _context4.next) {
|
|
16695
16701
|
case 0:
|
|
16696
16702
|
count = 0;
|
|
@@ -16711,7 +16717,6 @@ function _finishOnFirstFailed() {
|
|
|
16711
16717
|
case "end":
|
|
16712
16718
|
return _context4.stop();
|
|
16713
16719
|
}
|
|
16714
|
-
}
|
|
16715
16720
|
}, _callee4);
|
|
16716
16721
|
}));
|
|
16717
16722
|
return _finishOnFirstFailed.apply(this, arguments);
|
|
@@ -18224,6 +18229,11 @@ function stringify(value) {
|
|
|
18224
18229
|
return Math.random();
|
|
18225
18230
|
}
|
|
18226
18231
|
}
|
|
18232
|
+
var useWatchWarning = function(namePath) {
|
|
18233
|
+
var fullyStr = namePath.join("__RC_FIELD_FORM_SPLIT__");
|
|
18234
|
+
var nameStrRef = React$4.useRef(fullyStr);
|
|
18235
|
+
warningOnce$1(nameStrRef.current === fullyStr, "`useWatch` is not support dynamic `namePath`. Please provide static instead.");
|
|
18236
|
+
};
|
|
18227
18237
|
function useWatch() {
|
|
18228
18238
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
18229
18239
|
args[_key] = arguments[_key];
|
|
@@ -18244,6 +18254,7 @@ function useWatch() {
|
|
|
18244
18254
|
var namePath = getNamePath(dependencies);
|
|
18245
18255
|
var namePathRef = React$4.useRef(namePath);
|
|
18246
18256
|
namePathRef.current = namePath;
|
|
18257
|
+
useWatchWarning(namePath);
|
|
18247
18258
|
React$4.useEffect(
|
|
18248
18259
|
function() {
|
|
18249
18260
|
if (!isValidForm) {
|
|
@@ -18779,9 +18790,9 @@ function isSimpleFunctionComponent(type4) {
|
|
|
18779
18790
|
return typeof type4 === "function" && !shouldConstruct(type4) && type4.defaultProps === void 0;
|
|
18780
18791
|
}
|
|
18781
18792
|
function isSafeSetRefComponent(component) {
|
|
18782
|
-
if (
|
|
18793
|
+
if (_reactIs_18_2_0_reactIs.exports.isFragment(component))
|
|
18783
18794
|
return false;
|
|
18784
|
-
if (
|
|
18795
|
+
if (_reactIs_18_2_0_reactIs.exports.isMemo(component))
|
|
18785
18796
|
return isSafeSetRefComponent(component.type);
|
|
18786
18797
|
return !isSimpleFunctionComponent(component.type);
|
|
18787
18798
|
}
|
|
@@ -18993,7 +19004,7 @@ function rectToClientRect(rect) {
|
|
|
18993
19004
|
bottom: rect.y + rect.height
|
|
18994
19005
|
};
|
|
18995
19006
|
}
|
|
18996
|
-
async function detectOverflow(
|
|
19007
|
+
async function detectOverflow(state, options) {
|
|
18997
19008
|
var _await$platform$isEle;
|
|
18998
19009
|
if (options === void 0) {
|
|
18999
19010
|
options = {};
|
|
@@ -19005,7 +19016,7 @@ async function detectOverflow(middlewareArguments, options) {
|
|
|
19005
19016
|
rects,
|
|
19006
19017
|
elements,
|
|
19007
19018
|
strategy
|
|
19008
|
-
} =
|
|
19019
|
+
} = state;
|
|
19009
19020
|
const {
|
|
19010
19021
|
boundary = "clippingAncestors",
|
|
19011
19022
|
rootBoundary = "viewport",
|
|
@@ -19055,7 +19066,7 @@ function within(min$1$1, value, max$1$1) {
|
|
|
19055
19066
|
const arrow = (options) => ({
|
|
19056
19067
|
name: "arrow",
|
|
19057
19068
|
options,
|
|
19058
|
-
async fn(
|
|
19069
|
+
async fn(state) {
|
|
19059
19070
|
const {
|
|
19060
19071
|
element,
|
|
19061
19072
|
padding = 0
|
|
@@ -19065,8 +19076,9 @@ const arrow = (options) => ({
|
|
|
19065
19076
|
y,
|
|
19066
19077
|
placement,
|
|
19067
19078
|
rects,
|
|
19068
|
-
platform: platform2
|
|
19069
|
-
|
|
19079
|
+
platform: platform2,
|
|
19080
|
+
elements
|
|
19081
|
+
} = state;
|
|
19070
19082
|
if (element == null) {
|
|
19071
19083
|
{
|
|
19072
19084
|
console.warn("Floating UI: No `element` was passed to the `arrow` middleware.");
|
|
@@ -19081,14 +19093,16 @@ const arrow = (options) => ({
|
|
|
19081
19093
|
const axis = getMainAxisFromPlacement(placement);
|
|
19082
19094
|
const length = getLengthFromAxis(axis);
|
|
19083
19095
|
const arrowDimensions = await platform2.getDimensions(element);
|
|
19084
|
-
const
|
|
19085
|
-
const
|
|
19096
|
+
const isYAxis = axis === "y";
|
|
19097
|
+
const minProp = isYAxis ? "top" : "left";
|
|
19098
|
+
const maxProp = isYAxis ? "bottom" : "right";
|
|
19099
|
+
const clientProp = isYAxis ? "clientHeight" : "clientWidth";
|
|
19086
19100
|
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
|
|
19087
19101
|
const startDiff = coords[axis] - rects.reference[axis];
|
|
19088
19102
|
const arrowOffsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(element));
|
|
19089
|
-
let clientSize = arrowOffsetParent ?
|
|
19090
|
-
if (clientSize
|
|
19091
|
-
clientSize = rects.floating[length];
|
|
19103
|
+
let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
|
|
19104
|
+
if (!clientSize || !await (platform2.isElement == null ? void 0 : platform2.isElement(arrowOffsetParent))) {
|
|
19105
|
+
clientSize = elements.floating[clientProp] || rects.floating[length];
|
|
19092
19106
|
}
|
|
19093
19107
|
const centerToReference = endDiff / 2 - startDiff / 2;
|
|
19094
19108
|
const min2 = paddingObject[minProp];
|
|
@@ -19179,7 +19193,7 @@ const flip = function(options) {
|
|
|
19179
19193
|
return {
|
|
19180
19194
|
name: "flip",
|
|
19181
19195
|
options,
|
|
19182
|
-
async fn(
|
|
19196
|
+
async fn(state) {
|
|
19183
19197
|
var _middlewareData$flip;
|
|
19184
19198
|
const {
|
|
19185
19199
|
placement,
|
|
@@ -19188,7 +19202,7 @@ const flip = function(options) {
|
|
|
19188
19202
|
initialPlacement,
|
|
19189
19203
|
platform: platform2,
|
|
19190
19204
|
elements
|
|
19191
|
-
} =
|
|
19205
|
+
} = state;
|
|
19192
19206
|
const {
|
|
19193
19207
|
mainAxis: checkMainAxis = true,
|
|
19194
19208
|
crossAxis: checkCrossAxis = true,
|
|
@@ -19206,7 +19220,7 @@ const flip = function(options) {
|
|
|
19206
19220
|
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
19207
19221
|
}
|
|
19208
19222
|
const placements = [initialPlacement, ...fallbackPlacements];
|
|
19209
|
-
const overflow = await detectOverflow(
|
|
19223
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
19210
19224
|
const overflows = [];
|
|
19211
19225
|
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
19212
19226
|
if (checkMainAxis) {
|
|
@@ -19224,7 +19238,7 @@ const flip = function(options) {
|
|
|
19224
19238
|
overflows
|
|
19225
19239
|
}];
|
|
19226
19240
|
if (!overflows.every((side2) => side2 <= 0)) {
|
|
19227
|
-
var _middlewareData$flip2;
|
|
19241
|
+
var _middlewareData$flip2, _overflowsData$filter;
|
|
19228
19242
|
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
19229
19243
|
const nextPlacement = placements[nextIndex];
|
|
19230
19244
|
if (nextPlacement) {
|
|
@@ -19238,19 +19252,21 @@ const flip = function(options) {
|
|
|
19238
19252
|
}
|
|
19239
19253
|
};
|
|
19240
19254
|
}
|
|
19241
|
-
let resetPlacement =
|
|
19242
|
-
|
|
19243
|
-
|
|
19244
|
-
|
|
19245
|
-
|
|
19246
|
-
|
|
19247
|
-
|
|
19255
|
+
let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
|
|
19256
|
+
if (!resetPlacement) {
|
|
19257
|
+
switch (fallbackStrategy) {
|
|
19258
|
+
case "bestFit": {
|
|
19259
|
+
var _overflowsData$map$so;
|
|
19260
|
+
const placement2 = (_overflowsData$map$so = overflowsData.map((d) => [d.placement, d.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];
|
|
19261
|
+
if (placement2) {
|
|
19262
|
+
resetPlacement = placement2;
|
|
19263
|
+
}
|
|
19264
|
+
break;
|
|
19248
19265
|
}
|
|
19249
|
-
|
|
19266
|
+
case "initialPlacement":
|
|
19267
|
+
resetPlacement = initialPlacement;
|
|
19268
|
+
break;
|
|
19250
19269
|
}
|
|
19251
|
-
case "initialPlacement":
|
|
19252
|
-
resetPlacement = initialPlacement;
|
|
19253
|
-
break;
|
|
19254
19270
|
}
|
|
19255
19271
|
if (placement !== resetPlacement) {
|
|
19256
19272
|
return {
|
|
@@ -19282,17 +19298,17 @@ const hide = function(options) {
|
|
|
19282
19298
|
return {
|
|
19283
19299
|
name: "hide",
|
|
19284
19300
|
options,
|
|
19285
|
-
async fn(
|
|
19301
|
+
async fn(state) {
|
|
19286
19302
|
const {
|
|
19287
19303
|
strategy = "referenceHidden",
|
|
19288
19304
|
...detectOverflowOptions
|
|
19289
19305
|
} = options;
|
|
19290
19306
|
const {
|
|
19291
19307
|
rects
|
|
19292
|
-
} =
|
|
19308
|
+
} = state;
|
|
19293
19309
|
switch (strategy) {
|
|
19294
19310
|
case "referenceHidden": {
|
|
19295
|
-
const overflow = await detectOverflow(
|
|
19311
|
+
const overflow = await detectOverflow(state, {
|
|
19296
19312
|
...detectOverflowOptions,
|
|
19297
19313
|
elementContext: "reference"
|
|
19298
19314
|
});
|
|
@@ -19305,7 +19321,7 @@ const hide = function(options) {
|
|
|
19305
19321
|
};
|
|
19306
19322
|
}
|
|
19307
19323
|
case "escaped": {
|
|
19308
|
-
const overflow = await detectOverflow(
|
|
19324
|
+
const overflow = await detectOverflow(state, {
|
|
19309
19325
|
...detectOverflowOptions,
|
|
19310
19326
|
altBoundary: true
|
|
19311
19327
|
});
|
|
@@ -19324,19 +19340,19 @@ const hide = function(options) {
|
|
|
19324
19340
|
}
|
|
19325
19341
|
};
|
|
19326
19342
|
};
|
|
19327
|
-
async function convertValueToCoords(
|
|
19343
|
+
async function convertValueToCoords(state, value) {
|
|
19328
19344
|
const {
|
|
19329
19345
|
placement,
|
|
19330
19346
|
platform: platform2,
|
|
19331
19347
|
elements
|
|
19332
|
-
} =
|
|
19348
|
+
} = state;
|
|
19333
19349
|
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
|
|
19334
19350
|
const side = getSide(placement);
|
|
19335
19351
|
const alignment = getAlignment(placement);
|
|
19336
19352
|
const isVertical = getMainAxisFromPlacement(placement) === "x";
|
|
19337
19353
|
const mainAxisMulti = ["left", "top"].includes(side) ? -1 : 1;
|
|
19338
19354
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
19339
|
-
const rawValue = typeof value === "function" ? value(
|
|
19355
|
+
const rawValue = typeof value === "function" ? value(state) : value;
|
|
19340
19356
|
let {
|
|
19341
19357
|
mainAxis,
|
|
19342
19358
|
crossAxis,
|
|
@@ -19369,12 +19385,12 @@ const offset = function(value) {
|
|
|
19369
19385
|
return {
|
|
19370
19386
|
name: "offset",
|
|
19371
19387
|
options: value,
|
|
19372
|
-
async fn(
|
|
19388
|
+
async fn(state) {
|
|
19373
19389
|
const {
|
|
19374
19390
|
x,
|
|
19375
19391
|
y
|
|
19376
|
-
} =
|
|
19377
|
-
const diffCoords = await convertValueToCoords(
|
|
19392
|
+
} = state;
|
|
19393
|
+
const diffCoords = await convertValueToCoords(state, value);
|
|
19378
19394
|
return {
|
|
19379
19395
|
x: x + diffCoords.x,
|
|
19380
19396
|
y: y + diffCoords.y,
|
|
@@ -19393,12 +19409,12 @@ const shift = function(options) {
|
|
|
19393
19409
|
return {
|
|
19394
19410
|
name: "shift",
|
|
19395
19411
|
options,
|
|
19396
|
-
async fn(
|
|
19412
|
+
async fn(state) {
|
|
19397
19413
|
const {
|
|
19398
19414
|
x,
|
|
19399
19415
|
y,
|
|
19400
19416
|
placement
|
|
19401
|
-
} =
|
|
19417
|
+
} = state;
|
|
19402
19418
|
const {
|
|
19403
19419
|
mainAxis: checkMainAxis = true,
|
|
19404
19420
|
crossAxis: checkCrossAxis = false,
|
|
@@ -19420,7 +19436,7 @@ const shift = function(options) {
|
|
|
19420
19436
|
x,
|
|
19421
19437
|
y
|
|
19422
19438
|
};
|
|
19423
|
-
const overflow = await detectOverflow(
|
|
19439
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
19424
19440
|
const mainAxis = getMainAxisFromPlacement(getSide(placement));
|
|
19425
19441
|
const crossAxis = getCrossAxis(mainAxis);
|
|
19426
19442
|
let mainAxisCoord = coords[mainAxis];
|
|
@@ -19440,7 +19456,7 @@ const shift = function(options) {
|
|
|
19440
19456
|
crossAxisCoord = within(min2, crossAxisCoord, max2);
|
|
19441
19457
|
}
|
|
19442
19458
|
const limitedCoords = limiter.fn({
|
|
19443
|
-
...
|
|
19459
|
+
...state,
|
|
19444
19460
|
[mainAxis]: mainAxisCoord,
|
|
19445
19461
|
[crossAxis]: crossAxisCoord
|
|
19446
19462
|
});
|
|
@@ -19460,14 +19476,14 @@ const limitShift = function(options) {
|
|
|
19460
19476
|
}
|
|
19461
19477
|
return {
|
|
19462
19478
|
options,
|
|
19463
|
-
fn(
|
|
19479
|
+
fn(state) {
|
|
19464
19480
|
const {
|
|
19465
19481
|
x,
|
|
19466
19482
|
y,
|
|
19467
19483
|
placement,
|
|
19468
19484
|
rects,
|
|
19469
19485
|
middlewareData
|
|
19470
|
-
} =
|
|
19486
|
+
} = state;
|
|
19471
19487
|
const {
|
|
19472
19488
|
offset: offset2 = 0,
|
|
19473
19489
|
mainAxis: checkMainAxis = true,
|
|
@@ -19481,7 +19497,7 @@ const limitShift = function(options) {
|
|
|
19481
19497
|
const crossAxis = getCrossAxis(mainAxis);
|
|
19482
19498
|
let mainAxisCoord = coords[mainAxis];
|
|
19483
19499
|
let crossAxisCoord = coords[crossAxis];
|
|
19484
|
-
const rawOffset = typeof offset2 === "function" ? offset2(
|
|
19500
|
+
const rawOffset = typeof offset2 === "function" ? offset2(state) : offset2;
|
|
19485
19501
|
const computedOffset = typeof rawOffset === "number" ? {
|
|
19486
19502
|
mainAxis: rawOffset,
|
|
19487
19503
|
crossAxis: 0
|
|
@@ -19526,6 +19542,9 @@ function getWindow(node) {
|
|
|
19526
19542
|
function getComputedStyle$1(element) {
|
|
19527
19543
|
return getWindow(element).getComputedStyle(element);
|
|
19528
19544
|
}
|
|
19545
|
+
function isNode(value) {
|
|
19546
|
+
return value instanceof getWindow(value).Node;
|
|
19547
|
+
}
|
|
19529
19548
|
function getNodeName(node) {
|
|
19530
19549
|
return isNode(node) ? (node.nodeName || "").toLowerCase() : "";
|
|
19531
19550
|
}
|
|
@@ -19547,9 +19566,6 @@ function isHTMLElement(value) {
|
|
|
19547
19566
|
function isElement(value) {
|
|
19548
19567
|
return value instanceof getWindow(value).Element;
|
|
19549
19568
|
}
|
|
19550
|
-
function isNode(value) {
|
|
19551
|
-
return value instanceof getWindow(value).Node;
|
|
19552
|
-
}
|
|
19553
19569
|
function isShadowRoot(node) {
|
|
19554
19570
|
if (typeof ShadowRoot === "undefined") {
|
|
19555
19571
|
return false;
|
|
@@ -19573,15 +19589,13 @@ function isContainingBlock(element) {
|
|
|
19573
19589
|
const isFirefox = /firefox/i.test(getUAString());
|
|
19574
19590
|
const css = getComputedStyle$1(element);
|
|
19575
19591
|
const backdropFilter = css.backdropFilter || css.WebkitBackdropFilter;
|
|
19576
|
-
return css.transform !== "none" || css.perspective !== "none" || (backdropFilter ? backdropFilter !== "none" : false) || isFirefox && css.willChange === "filter" || isFirefox && (css.filter ? css.filter !== "none" : false) || ["transform", "perspective"].some((value) => css.willChange.includes(value)) || ["paint", "layout", "strict", "content"].some(
|
|
19577
|
-
|
|
19578
|
-
|
|
19579
|
-
|
|
19580
|
-
}
|
|
19581
|
-
);
|
|
19592
|
+
return css.transform !== "none" || css.perspective !== "none" || (backdropFilter ? backdropFilter !== "none" : false) || isFirefox && css.willChange === "filter" || isFirefox && (css.filter ? css.filter !== "none" : false) || ["transform", "perspective"].some((value) => css.willChange.includes(value)) || ["paint", "layout", "strict", "content"].some((value) => {
|
|
19593
|
+
const contain = css.contain;
|
|
19594
|
+
return contain != null ? contain.includes(value) : false;
|
|
19595
|
+
});
|
|
19582
19596
|
}
|
|
19583
|
-
function
|
|
19584
|
-
return
|
|
19597
|
+
function isClientRectVisualViewportBased() {
|
|
19598
|
+
return /^((?!chrome|android).)*safari/i.test(getUAString());
|
|
19585
19599
|
}
|
|
19586
19600
|
function isLastTraversableNode(node) {
|
|
19587
19601
|
return ["html", "body", "#document"].includes(getNodeName(node));
|
|
@@ -19593,8 +19607,9 @@ function getCssDimensions(element) {
|
|
|
19593
19607
|
const css = getComputedStyle$1(element);
|
|
19594
19608
|
let width = parseFloat(css.width);
|
|
19595
19609
|
let height = parseFloat(css.height);
|
|
19596
|
-
const
|
|
19597
|
-
const
|
|
19610
|
+
const hasOffset = isHTMLElement(element);
|
|
19611
|
+
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
19612
|
+
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
19598
19613
|
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
19599
19614
|
if (shouldFallback) {
|
|
19600
19615
|
width = offsetWidth;
|
|
@@ -19658,7 +19673,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
19658
19673
|
}
|
|
19659
19674
|
}
|
|
19660
19675
|
const win = domElement ? getWindow(domElement) : window;
|
|
19661
|
-
const addVisualOffsets =
|
|
19676
|
+
const addVisualOffsets = isClientRectVisualViewportBased() && isFixedStrategy;
|
|
19662
19677
|
let x = (clientRect.left + (addVisualOffsets ? ((_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) || 0 : 0)) / scale2.x;
|
|
19663
19678
|
let y = (clientRect.top + (addVisualOffsets ? ((_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) || 0 : 0)) / scale2.y;
|
|
19664
19679
|
let width = clientRect.width / scale2.x;
|
|
@@ -19682,16 +19697,12 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
19682
19697
|
currentIFrame = getWindow(currentIFrame).frameElement;
|
|
19683
19698
|
}
|
|
19684
19699
|
}
|
|
19685
|
-
return {
|
|
19700
|
+
return rectToClientRect({
|
|
19686
19701
|
width,
|
|
19687
19702
|
height,
|
|
19688
|
-
top: y,
|
|
19689
|
-
right: x + width,
|
|
19690
|
-
bottom: y + height,
|
|
19691
|
-
left: x,
|
|
19692
19703
|
x,
|
|
19693
19704
|
y
|
|
19694
|
-
};
|
|
19705
|
+
});
|
|
19695
19706
|
}
|
|
19696
19707
|
function getDocumentElement(node) {
|
|
19697
19708
|
return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement;
|
|
@@ -19708,78 +19719,6 @@ function getNodeScroll(element) {
|
|
|
19708
19719
|
scrollTop: element.pageYOffset
|
|
19709
19720
|
};
|
|
19710
19721
|
}
|
|
19711
|
-
function getWindowScrollBarX(element) {
|
|
19712
|
-
return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
|
|
19713
|
-
}
|
|
19714
|
-
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
19715
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
19716
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
19717
|
-
const rect = getBoundingClientRect(element, true, strategy === "fixed", offsetParent);
|
|
19718
|
-
let scroll = {
|
|
19719
|
-
scrollLeft: 0,
|
|
19720
|
-
scrollTop: 0
|
|
19721
|
-
};
|
|
19722
|
-
const offsets = {
|
|
19723
|
-
x: 0,
|
|
19724
|
-
y: 0
|
|
19725
|
-
};
|
|
19726
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== "fixed") {
|
|
19727
|
-
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
|
|
19728
|
-
scroll = getNodeScroll(offsetParent);
|
|
19729
|
-
}
|
|
19730
|
-
if (isHTMLElement(offsetParent)) {
|
|
19731
|
-
const offsetRect = getBoundingClientRect(offsetParent, true);
|
|
19732
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
19733
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
19734
|
-
} else if (documentElement) {
|
|
19735
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
19736
|
-
}
|
|
19737
|
-
}
|
|
19738
|
-
return {
|
|
19739
|
-
x: rect.left + scroll.scrollLeft - offsets.x,
|
|
19740
|
-
y: rect.top + scroll.scrollTop - offsets.y,
|
|
19741
|
-
width: rect.width,
|
|
19742
|
-
height: rect.height
|
|
19743
|
-
};
|
|
19744
|
-
}
|
|
19745
|
-
function getParentNode(node) {
|
|
19746
|
-
if (getNodeName(node) === "html") {
|
|
19747
|
-
return node;
|
|
19748
|
-
}
|
|
19749
|
-
const result2 = node.assignedSlot || node.parentNode || (isShadowRoot(node) ? node.host : null) || getDocumentElement(node);
|
|
19750
|
-
return isShadowRoot(result2) ? result2.host : result2;
|
|
19751
|
-
}
|
|
19752
|
-
function getTrueOffsetParent(element) {
|
|
19753
|
-
if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") {
|
|
19754
|
-
return null;
|
|
19755
|
-
}
|
|
19756
|
-
return element.offsetParent;
|
|
19757
|
-
}
|
|
19758
|
-
function getContainingBlock(element) {
|
|
19759
|
-
let currentNode = getParentNode(element);
|
|
19760
|
-
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
19761
|
-
if (isContainingBlock(currentNode)) {
|
|
19762
|
-
return currentNode;
|
|
19763
|
-
} else {
|
|
19764
|
-
currentNode = getParentNode(currentNode);
|
|
19765
|
-
}
|
|
19766
|
-
}
|
|
19767
|
-
return null;
|
|
19768
|
-
}
|
|
19769
|
-
function getOffsetParent(element) {
|
|
19770
|
-
const window2 = getWindow(element);
|
|
19771
|
-
let offsetParent = getTrueOffsetParent(element);
|
|
19772
|
-
while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === "static") {
|
|
19773
|
-
offsetParent = getTrueOffsetParent(offsetParent);
|
|
19774
|
-
}
|
|
19775
|
-
if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle$1(offsetParent).position === "static" && !isContainingBlock(offsetParent))) {
|
|
19776
|
-
return window2;
|
|
19777
|
-
}
|
|
19778
|
-
return offsetParent || getContainingBlock(element) || window2;
|
|
19779
|
-
}
|
|
19780
|
-
function getDimensions(element) {
|
|
19781
|
-
return getCssDimensions(element);
|
|
19782
|
-
}
|
|
19783
19722
|
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
19784
19723
|
let {
|
|
19785
19724
|
rect,
|
|
@@ -19821,41 +19760,19 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
19821
19760
|
y: rect.y * scale2.y - scroll.scrollTop * scale2.y + offsets.y
|
|
19822
19761
|
};
|
|
19823
19762
|
}
|
|
19824
|
-
function
|
|
19825
|
-
|
|
19826
|
-
const html = getDocumentElement(element);
|
|
19827
|
-
const visualViewport = win.visualViewport;
|
|
19828
|
-
let width = html.clientWidth;
|
|
19829
|
-
let height = html.clientHeight;
|
|
19830
|
-
let x = 0;
|
|
19831
|
-
let y = 0;
|
|
19832
|
-
if (visualViewport) {
|
|
19833
|
-
width = visualViewport.width;
|
|
19834
|
-
height = visualViewport.height;
|
|
19835
|
-
const layoutViewport = isLayoutViewport();
|
|
19836
|
-
if (layoutViewport || !layoutViewport && strategy === "fixed") {
|
|
19837
|
-
x = visualViewport.offsetLeft;
|
|
19838
|
-
y = visualViewport.offsetTop;
|
|
19839
|
-
}
|
|
19840
|
-
}
|
|
19841
|
-
return {
|
|
19842
|
-
width,
|
|
19843
|
-
height,
|
|
19844
|
-
x,
|
|
19845
|
-
y
|
|
19846
|
-
};
|
|
19763
|
+
function getWindowScrollBarX(element) {
|
|
19764
|
+
return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
|
|
19847
19765
|
}
|
|
19848
19766
|
function getDocumentRect(element) {
|
|
19849
|
-
var _element$ownerDocumen;
|
|
19850
19767
|
const html = getDocumentElement(element);
|
|
19851
19768
|
const scroll = getNodeScroll(element);
|
|
19852
|
-
const body =
|
|
19853
|
-
const width = max(html.scrollWidth, html.clientWidth, body
|
|
19854
|
-
const height = max(html.scrollHeight, html.clientHeight, body
|
|
19769
|
+
const body = element.ownerDocument.body;
|
|
19770
|
+
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
19771
|
+
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
19855
19772
|
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
19856
19773
|
const y = -scroll.scrollTop;
|
|
19857
|
-
if (getComputedStyle$1(body
|
|
19858
|
-
x += max(html.clientWidth, body
|
|
19774
|
+
if (getComputedStyle$1(body).direction === "rtl") {
|
|
19775
|
+
x += max(html.clientWidth, body.clientWidth) - width;
|
|
19859
19776
|
}
|
|
19860
19777
|
return {
|
|
19861
19778
|
width,
|
|
@@ -19864,10 +19781,17 @@ function getDocumentRect(element) {
|
|
|
19864
19781
|
y
|
|
19865
19782
|
};
|
|
19866
19783
|
}
|
|
19784
|
+
function getParentNode(node) {
|
|
19785
|
+
if (getNodeName(node) === "html") {
|
|
19786
|
+
return node;
|
|
19787
|
+
}
|
|
19788
|
+
const result2 = node.assignedSlot || node.parentNode || isShadowRoot(node) && node.host || getDocumentElement(node);
|
|
19789
|
+
return isShadowRoot(result2) ? result2.host : result2;
|
|
19790
|
+
}
|
|
19867
19791
|
function getNearestOverflowAncestor(node) {
|
|
19868
19792
|
const parentNode = getParentNode(node);
|
|
19869
19793
|
if (isLastTraversableNode(parentNode)) {
|
|
19870
|
-
return
|
|
19794
|
+
return parentNode.ownerDocument.body;
|
|
19871
19795
|
}
|
|
19872
19796
|
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
19873
19797
|
return parentNode;
|
|
@@ -19887,6 +19811,30 @@ function getOverflowAncestors(node, list2) {
|
|
|
19887
19811
|
}
|
|
19888
19812
|
return list2.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
|
|
19889
19813
|
}
|
|
19814
|
+
function getViewportRect(element, strategy) {
|
|
19815
|
+
const win = getWindow(element);
|
|
19816
|
+
const html = getDocumentElement(element);
|
|
19817
|
+
const visualViewport = win.visualViewport;
|
|
19818
|
+
let width = html.clientWidth;
|
|
19819
|
+
let height = html.clientHeight;
|
|
19820
|
+
let x = 0;
|
|
19821
|
+
let y = 0;
|
|
19822
|
+
if (visualViewport) {
|
|
19823
|
+
width = visualViewport.width;
|
|
19824
|
+
height = visualViewport.height;
|
|
19825
|
+
const visualViewportBased = isClientRectVisualViewportBased();
|
|
19826
|
+
if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
|
|
19827
|
+
x = visualViewport.offsetLeft;
|
|
19828
|
+
y = visualViewport.offsetTop;
|
|
19829
|
+
}
|
|
19830
|
+
}
|
|
19831
|
+
return {
|
|
19832
|
+
width,
|
|
19833
|
+
height,
|
|
19834
|
+
x,
|
|
19835
|
+
y
|
|
19836
|
+
};
|
|
19837
|
+
}
|
|
19890
19838
|
function getInnerBoundingClientRect(element, strategy) {
|
|
19891
19839
|
const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
|
|
19892
19840
|
const top = clientRect.top + element.clientTop;
|
|
@@ -19900,24 +19848,33 @@ function getInnerBoundingClientRect(element, strategy) {
|
|
|
19900
19848
|
const x = left * scale2.x;
|
|
19901
19849
|
const y = top * scale2.y;
|
|
19902
19850
|
return {
|
|
19903
|
-
top: y,
|
|
19904
|
-
left: x,
|
|
19905
|
-
right: x + width,
|
|
19906
|
-
bottom: y + height,
|
|
19907
|
-
x,
|
|
19908
|
-
y,
|
|
19909
19851
|
width,
|
|
19910
|
-
height
|
|
19852
|
+
height,
|
|
19853
|
+
x,
|
|
19854
|
+
y
|
|
19911
19855
|
};
|
|
19912
19856
|
}
|
|
19913
19857
|
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
19858
|
+
let rect;
|
|
19914
19859
|
if (clippingAncestor === "viewport") {
|
|
19915
|
-
|
|
19916
|
-
}
|
|
19917
|
-
|
|
19918
|
-
|
|
19860
|
+
rect = getViewportRect(element, strategy);
|
|
19861
|
+
} else if (clippingAncestor === "document") {
|
|
19862
|
+
rect = getDocumentRect(getDocumentElement(element));
|
|
19863
|
+
} else if (isElement(clippingAncestor)) {
|
|
19864
|
+
rect = getInnerBoundingClientRect(clippingAncestor, strategy);
|
|
19865
|
+
} else {
|
|
19866
|
+
const mutableRect = {
|
|
19867
|
+
...clippingAncestor
|
|
19868
|
+
};
|
|
19869
|
+
if (isClientRectVisualViewportBased()) {
|
|
19870
|
+
var _win$visualViewport, _win$visualViewport2;
|
|
19871
|
+
const win = getWindow(element);
|
|
19872
|
+
mutableRect.x -= ((_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) || 0;
|
|
19873
|
+
mutableRect.y -= ((_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) || 0;
|
|
19874
|
+
}
|
|
19875
|
+
rect = mutableRect;
|
|
19919
19876
|
}
|
|
19920
|
-
return rectToClientRect(
|
|
19877
|
+
return rectToClientRect(rect);
|
|
19921
19878
|
}
|
|
19922
19879
|
function getClippingElementAncestors(element, cache) {
|
|
19923
19880
|
const cachedResult = cache.get(element);
|
|
@@ -19931,11 +19888,16 @@ function getClippingElementAncestors(element, cache) {
|
|
|
19931
19888
|
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
19932
19889
|
const computedStyle = getComputedStyle$1(currentNode);
|
|
19933
19890
|
const containingBlock = isContainingBlock(currentNode);
|
|
19934
|
-
const
|
|
19935
|
-
if (
|
|
19936
|
-
|
|
19891
|
+
const shouldIgnoreCurrentNode = computedStyle.position === "fixed";
|
|
19892
|
+
if (shouldIgnoreCurrentNode) {
|
|
19893
|
+
currentContainingBlockComputedStyle = null;
|
|
19937
19894
|
} else {
|
|
19938
|
-
|
|
19895
|
+
const shouldDropCurrentNode = elementIsFixed ? !containingBlock && !currentContainingBlockComputedStyle : !containingBlock && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position);
|
|
19896
|
+
if (shouldDropCurrentNode) {
|
|
19897
|
+
result2 = result2.filter((ancestor) => ancestor !== currentNode);
|
|
19898
|
+
} else {
|
|
19899
|
+
currentContainingBlockComputedStyle = computedStyle;
|
|
19900
|
+
}
|
|
19939
19901
|
}
|
|
19940
19902
|
currentNode = getParentNode(currentNode);
|
|
19941
19903
|
}
|
|
@@ -19967,6 +19929,74 @@ function getClippingRect(_ref) {
|
|
|
19967
19929
|
y: clippingRect.top
|
|
19968
19930
|
};
|
|
19969
19931
|
}
|
|
19932
|
+
function getDimensions(element) {
|
|
19933
|
+
return getCssDimensions(element);
|
|
19934
|
+
}
|
|
19935
|
+
function getTrueOffsetParent(element, polyfill) {
|
|
19936
|
+
if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") {
|
|
19937
|
+
return null;
|
|
19938
|
+
}
|
|
19939
|
+
if (polyfill) {
|
|
19940
|
+
return polyfill(element);
|
|
19941
|
+
}
|
|
19942
|
+
return element.offsetParent;
|
|
19943
|
+
}
|
|
19944
|
+
function getContainingBlock(element) {
|
|
19945
|
+
let currentNode = getParentNode(element);
|
|
19946
|
+
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
19947
|
+
if (isContainingBlock(currentNode)) {
|
|
19948
|
+
return currentNode;
|
|
19949
|
+
} else {
|
|
19950
|
+
currentNode = getParentNode(currentNode);
|
|
19951
|
+
}
|
|
19952
|
+
}
|
|
19953
|
+
return null;
|
|
19954
|
+
}
|
|
19955
|
+
function getOffsetParent(element, polyfill) {
|
|
19956
|
+
const window2 = getWindow(element);
|
|
19957
|
+
if (!isHTMLElement(element)) {
|
|
19958
|
+
return window2;
|
|
19959
|
+
}
|
|
19960
|
+
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
19961
|
+
while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === "static") {
|
|
19962
|
+
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
19963
|
+
}
|
|
19964
|
+
if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle$1(offsetParent).position === "static" && !isContainingBlock(offsetParent))) {
|
|
19965
|
+
return window2;
|
|
19966
|
+
}
|
|
19967
|
+
return offsetParent || getContainingBlock(element) || window2;
|
|
19968
|
+
}
|
|
19969
|
+
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
19970
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
19971
|
+
const documentElement = getDocumentElement(offsetParent);
|
|
19972
|
+
const rect = getBoundingClientRect(element, true, strategy === "fixed", offsetParent);
|
|
19973
|
+
let scroll = {
|
|
19974
|
+
scrollLeft: 0,
|
|
19975
|
+
scrollTop: 0
|
|
19976
|
+
};
|
|
19977
|
+
const offsets = {
|
|
19978
|
+
x: 0,
|
|
19979
|
+
y: 0
|
|
19980
|
+
};
|
|
19981
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== "fixed") {
|
|
19982
|
+
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
|
|
19983
|
+
scroll = getNodeScroll(offsetParent);
|
|
19984
|
+
}
|
|
19985
|
+
if (isHTMLElement(offsetParent)) {
|
|
19986
|
+
const offsetRect = getBoundingClientRect(offsetParent, true);
|
|
19987
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
19988
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
19989
|
+
} else if (documentElement) {
|
|
19990
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
19991
|
+
}
|
|
19992
|
+
}
|
|
19993
|
+
return {
|
|
19994
|
+
x: rect.left + scroll.scrollLeft - offsets.x,
|
|
19995
|
+
y: rect.top + scroll.scrollTop - offsets.y,
|
|
19996
|
+
width: rect.width,
|
|
19997
|
+
height: rect.height
|
|
19998
|
+
};
|
|
19999
|
+
}
|
|
19970
20000
|
const platform = {
|
|
19971
20001
|
getClippingRect,
|
|
19972
20002
|
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
@@ -20015,12 +20045,8 @@ function autoUpdate(reference, floating, update2, options) {
|
|
|
20015
20045
|
});
|
|
20016
20046
|
let observer = null;
|
|
20017
20047
|
if (elementResize) {
|
|
20018
|
-
let initialUpdate = true;
|
|
20019
20048
|
observer = new ResizeObserver(() => {
|
|
20020
|
-
|
|
20021
|
-
update2();
|
|
20022
|
-
}
|
|
20023
|
-
initialUpdate = false;
|
|
20049
|
+
update2();
|
|
20024
20050
|
});
|
|
20025
20051
|
isElement(reference) && !animationFrame && observer.observe(reference);
|
|
20026
20052
|
if (!isElement(reference) && reference.contextElement && !animationFrame) {
|
|
@@ -22585,6 +22611,19 @@ const PullToRefresh$1 = (p) => {
|
|
|
22585
22611
|
(_a2 = elementRef.current) === null || _a2 === void 0 ? void 0 : _a2.addEventListener("touchmove", () => {
|
|
22586
22612
|
});
|
|
22587
22613
|
}, []);
|
|
22614
|
+
const reset = () => {
|
|
22615
|
+
return new Promise((resolve) => {
|
|
22616
|
+
api.start({
|
|
22617
|
+
to: {
|
|
22618
|
+
height: 0
|
|
22619
|
+
},
|
|
22620
|
+
onResolve() {
|
|
22621
|
+
setStatus("pulling");
|
|
22622
|
+
resolve();
|
|
22623
|
+
}
|
|
22624
|
+
});
|
|
22625
|
+
});
|
|
22626
|
+
};
|
|
22588
22627
|
function doRefresh() {
|
|
22589
22628
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22590
22629
|
api.start({
|
|
@@ -22595,27 +22634,13 @@ const PullToRefresh$1 = (p) => {
|
|
|
22595
22634
|
yield props.onRefresh();
|
|
22596
22635
|
setStatus("complete");
|
|
22597
22636
|
} catch (e) {
|
|
22598
|
-
|
|
22599
|
-
to: (next) => __awaiter(this, void 0, void 0, function* () {
|
|
22600
|
-
yield next({
|
|
22601
|
-
height: 0
|
|
22602
|
-
});
|
|
22603
|
-
setStatus("pulling");
|
|
22604
|
-
})
|
|
22605
|
-
});
|
|
22637
|
+
reset();
|
|
22606
22638
|
throw e;
|
|
22607
22639
|
}
|
|
22608
22640
|
if (props.completeDelay > 0) {
|
|
22609
22641
|
yield sleep(props.completeDelay);
|
|
22610
22642
|
}
|
|
22611
|
-
|
|
22612
|
-
to: (next) => __awaiter(this, void 0, void 0, function* () {
|
|
22613
|
-
yield next({
|
|
22614
|
-
height: 0
|
|
22615
|
-
});
|
|
22616
|
-
setStatus("pulling");
|
|
22617
|
-
})
|
|
22618
|
-
});
|
|
22643
|
+
reset();
|
|
22619
22644
|
});
|
|
22620
22645
|
}
|
|
22621
22646
|
useDrag((state) => {
|
|
@@ -24169,7 +24194,7 @@ const defaultProps$d = {
|
|
|
24169
24194
|
disabled: false,
|
|
24170
24195
|
allowEmpty: false
|
|
24171
24196
|
};
|
|
24172
|
-
function
|
|
24197
|
+
function InnerStepper(p, ref) {
|
|
24173
24198
|
const props = mergeProps(defaultProps$d, p);
|
|
24174
24199
|
const {
|
|
24175
24200
|
defaultValue = 0,
|
|
@@ -24188,6 +24213,20 @@ function Stepper(p) {
|
|
|
24188
24213
|
const {
|
|
24189
24214
|
locale
|
|
24190
24215
|
} = useConfig();
|
|
24216
|
+
React$4.useImperativeHandle(ref, () => ({
|
|
24217
|
+
focus: () => {
|
|
24218
|
+
var _a;
|
|
24219
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
24220
|
+
},
|
|
24221
|
+
blur: () => {
|
|
24222
|
+
var _a;
|
|
24223
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.blur();
|
|
24224
|
+
},
|
|
24225
|
+
get nativeElement() {
|
|
24226
|
+
var _a, _b;
|
|
24227
|
+
return (_b = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.nativeElement) !== null && _b !== void 0 ? _b : null;
|
|
24228
|
+
}
|
|
24229
|
+
}));
|
|
24191
24230
|
const fixedValue = (value2) => {
|
|
24192
24231
|
const fixedValue2 = digits !== void 0 ? toFixed(value2.toString(), ".", digits) : value2;
|
|
24193
24232
|
return fixedValue2.toString();
|
|
@@ -24352,6 +24391,8 @@ function Stepper(p) {
|
|
|
24352
24391
|
"aria-label": locale.Stepper.increase
|
|
24353
24392
|
}, React__default.default.createElement(AddOutline, null))));
|
|
24354
24393
|
}
|
|
24394
|
+
const Stepper$1 = React$4.forwardRef(InnerStepper);
|
|
24395
|
+
const Stepper = Stepper$1;
|
|
24355
24396
|
const steps = "";
|
|
24356
24397
|
const classPrefix$d = `adm-step`;
|
|
24357
24398
|
const Step = (props) => {
|
|
@@ -24850,11 +24891,15 @@ const Swiper = React$4.forwardRef(staged_1((p, ref) => {
|
|
|
24850
24891
|
React$4.useEffect(() => {
|
|
24851
24892
|
if (!autoplay || dragging)
|
|
24852
24893
|
return;
|
|
24853
|
-
|
|
24894
|
+
let interval;
|
|
24895
|
+
function tick() {
|
|
24896
|
+
interval = window.setTimeout(tick, autoplayInterval);
|
|
24854
24897
|
swipeNext();
|
|
24855
|
-
}
|
|
24898
|
+
}
|
|
24899
|
+
interval = window.setTimeout(tick, autoplayInterval);
|
|
24856
24900
|
return () => {
|
|
24857
|
-
|
|
24901
|
+
if (interval)
|
|
24902
|
+
window.clearTimeout(interval);
|
|
24858
24903
|
};
|
|
24859
24904
|
}, [autoplay, autoplayInterval, dragging, count]);
|
|
24860
24905
|
function renderTrackInner() {
|
|
@@ -25155,6 +25200,8 @@ const TextArea$1 = React$4.forwardRef((p, ref) => {
|
|
|
25155
25200
|
devError("TextArea", "`value` prop on `TextArea` should not be `null`. Consider using an empty string to clear the component.");
|
|
25156
25201
|
}
|
|
25157
25202
|
const nativeTextAreaRef = React$4.useRef(null);
|
|
25203
|
+
const heightRef = React$4.useRef("auto");
|
|
25204
|
+
const hiddenTextAreaRef = React$4.useRef(null);
|
|
25158
25205
|
React$4.useImperativeHandle(ref, () => ({
|
|
25159
25206
|
clear: () => {
|
|
25160
25207
|
setValue2("");
|
|
@@ -25175,10 +25222,13 @@ const TextArea$1 = React$4.forwardRef((p, ref) => {
|
|
|
25175
25222
|
if (!autoSize)
|
|
25176
25223
|
return;
|
|
25177
25224
|
const textArea2 = nativeTextAreaRef.current;
|
|
25225
|
+
const hiddenTextArea = hiddenTextAreaRef.current;
|
|
25178
25226
|
if (!textArea2)
|
|
25179
25227
|
return;
|
|
25180
|
-
textArea2.style.height =
|
|
25181
|
-
|
|
25228
|
+
textArea2.style.height = heightRef.current;
|
|
25229
|
+
if (!hiddenTextArea)
|
|
25230
|
+
return;
|
|
25231
|
+
let height = hiddenTextArea.scrollHeight;
|
|
25182
25232
|
if (typeof autoSize === "object") {
|
|
25183
25233
|
const computedStyle = window.getComputedStyle(textArea2);
|
|
25184
25234
|
const lineHeight = parseFloat(computedStyle.lineHeight);
|
|
@@ -25189,6 +25239,7 @@ const TextArea$1 = React$4.forwardRef((p, ref) => {
|
|
|
25189
25239
|
height = Math.min(height, autoSize.maxRows * lineHeight);
|
|
25190
25240
|
}
|
|
25191
25241
|
}
|
|
25242
|
+
heightRef.current = `${height}px`;
|
|
25192
25243
|
textArea2.style.height = `${height}px`;
|
|
25193
25244
|
}, [value, autoSize]);
|
|
25194
25245
|
const compositingRef = React$4.useRef(false);
|
|
@@ -25239,7 +25290,13 @@ const TextArea$1 = React$4.forwardRef((p, ref) => {
|
|
|
25239
25290
|
onFocus: props.onFocus,
|
|
25240
25291
|
onBlur: props.onBlur,
|
|
25241
25292
|
onClick: props.onClick
|
|
25242
|
-
}), count
|
|
25293
|
+
}), count, autoSize && React__default.default.createElement("textarea", {
|
|
25294
|
+
ref: hiddenTextAreaRef,
|
|
25295
|
+
className: `${classPrefix$6}-element ${classPrefix$6}-element-hidden`,
|
|
25296
|
+
value,
|
|
25297
|
+
"aria-hidden": true,
|
|
25298
|
+
readOnly: true
|
|
25299
|
+
})));
|
|
25243
25300
|
});
|
|
25244
25301
|
TextArea$1.defaultProps = defaultProps$6;
|
|
25245
25302
|
const TextArea = TextArea$1;
|