antd-mobile 5.28.0 → 5.28.1
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 +235 -200
- package/2x/bundle/antd-mobile.cjs.js +9 -9
- package/2x/bundle/antd-mobile.es.development.js +235 -200
- package/2x/bundle/antd-mobile.es.js +5086 -5066
- package/2x/bundle/antd-mobile.umd.development.js +235 -200
- package/2x/bundle/antd-mobile.umd.js +9 -9
- package/2x/bundle/style.css +0 -1
- 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/popup/popup.js +7 -1
- 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.js +4 -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/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/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/popup/popup.js +7 -1
- 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.js +4 -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/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/package.json +2 -2
- package/bundle/antd-mobile.cjs.development.js +235 -200
- package/bundle/antd-mobile.cjs.js +9 -9
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +235 -200
- package/bundle/antd-mobile.es.js +5086 -5066
- package/bundle/antd-mobile.umd.development.js +235 -200
- package/bundle/antd-mobile.umd.js +9 -9
- 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/popup/popup.js +7 -1
- package/cjs/components/steps/steps.css +0 -1
- package/cjs/components/swiper/swiper.js +6 -3
- package/cjs/components/text-area/text-area.js +4 -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/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/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/popup/popup.js +7 -1
- package/es/components/steps/steps.css +0 -1
- package/es/components/swiper/swiper.js +6 -3
- package/es/components/text-area/text-area.js +4 -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/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/package.json +2 -2
- package/umd/antd-mobile.js +1 -1
|
@@ -68,7 +68,8 @@ const base = {
|
|
|
68
68
|
common: {
|
|
69
69
|
confirm: "Confirm",
|
|
70
70
|
cancel: "Cancel",
|
|
71
|
-
loading: "Loading"
|
|
71
|
+
loading: "Loading",
|
|
72
|
+
close: "Close"
|
|
72
73
|
},
|
|
73
74
|
Calendar: {
|
|
74
75
|
markItems: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
|
|
@@ -198,7 +199,8 @@ const zhCN = mergeLocale(base, {
|
|
|
198
199
|
common: {
|
|
199
200
|
confirm: "\u786E\u5B9A",
|
|
200
201
|
cancel: "\u53D6\u6D88",
|
|
201
|
-
loading: "\u52A0\u8F7D\u4E2D"
|
|
202
|
+
loading: "\u52A0\u8F7D\u4E2D",
|
|
203
|
+
close: "\u5173\u95ED"
|
|
202
204
|
},
|
|
203
205
|
Calendar: {
|
|
204
206
|
markItems: ["\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D", "\u65E5"],
|
|
@@ -7287,6 +7289,9 @@ const defaultProps$12 = Object.assign(Object.assign({}, defaultPopupBaseProps),
|
|
|
7287
7289
|
});
|
|
7288
7290
|
const Popup$1 = (p) => {
|
|
7289
7291
|
const props = mergeProps(defaultProps$12, p);
|
|
7292
|
+
const {
|
|
7293
|
+
locale
|
|
7294
|
+
} = useConfig();
|
|
7290
7295
|
const bodyCls = classNames(`${classPrefix$1k}-body`, props.bodyClassName, `${classPrefix$1k}-body-position-${props.position}`);
|
|
7291
7296
|
const [active, setActive] = useState$1(props.visible);
|
|
7292
7297
|
useIsomorphicLayoutEffect$2(() => {
|
|
@@ -7366,7 +7371,9 @@ const Popup$1 = (p) => {
|
|
|
7366
7371
|
onClick: () => {
|
|
7367
7372
|
var _a;
|
|
7368
7373
|
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
7369
|
-
}
|
|
7374
|
+
},
|
|
7375
|
+
role: "button",
|
|
7376
|
+
"aria-label": locale.common.close
|
|
7370
7377
|
}, React__default.createElement(CloseOutline, null)), props.children))));
|
|
7371
7378
|
return React__default.createElement(ShouldRender, {
|
|
7372
7379
|
active,
|
|
@@ -13389,13 +13396,14 @@ const defaultProps$G = {
|
|
|
13389
13396
|
collapseText: "",
|
|
13390
13397
|
stopPropagationForActionButtons: [],
|
|
13391
13398
|
onContentClick: () => {
|
|
13392
|
-
}
|
|
13399
|
+
},
|
|
13400
|
+
defaultExpanded: false
|
|
13393
13401
|
};
|
|
13394
13402
|
const Ellipsis$1 = (p) => {
|
|
13395
13403
|
const props = mergeProps(defaultProps$G, p);
|
|
13396
13404
|
const rootRef = useRef(null);
|
|
13397
13405
|
const [ellipsised, setEllipsised] = useState$1({});
|
|
13398
|
-
const [expanded, setExpanded] = useState$1(
|
|
13406
|
+
const [expanded, setExpanded] = useState$1(props.defaultExpanded);
|
|
13399
13407
|
const [exceeded, setExceeded] = useState$1(false);
|
|
13400
13408
|
const chars = useMemo(() => _runes_0_4_3_runes.exports(props.content), [props.content]);
|
|
13401
13409
|
function getSubString(start2, end) {
|
|
@@ -16451,7 +16459,7 @@ function _validateRule() {
|
|
|
16451
16459
|
_validateRule = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee2(name, value, rule, options, messageVariables) {
|
|
16452
16460
|
var cloneRule, originValidator, subRuleField, validator, messages2, result2, subResults, kv, fillVariableResult;
|
|
16453
16461
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
16454
|
-
while (1)
|
|
16462
|
+
while (1)
|
|
16455
16463
|
switch (_context2.prev = _context2.next) {
|
|
16456
16464
|
case 0:
|
|
16457
16465
|
cloneRule = _objectSpread2({}, rule);
|
|
@@ -16524,7 +16532,6 @@ function _validateRule() {
|
|
|
16524
16532
|
case "end":
|
|
16525
16533
|
return _context2.stop();
|
|
16526
16534
|
}
|
|
16527
|
-
}
|
|
16528
16535
|
}, _callee2, null, [[9, 14]]);
|
|
16529
16536
|
}));
|
|
16530
16537
|
return _validateRule.apply(this, arguments);
|
|
@@ -16580,7 +16587,7 @@ function validateRules(namePath, value, rules2, options, validateFirst, messageV
|
|
|
16580
16587
|
var _ref3 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee(resolve, reject) {
|
|
16581
16588
|
var i, rule, errors;
|
|
16582
16589
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
16583
|
-
while (1)
|
|
16590
|
+
while (1)
|
|
16584
16591
|
switch (_context.prev = _context.next) {
|
|
16585
16592
|
case 0:
|
|
16586
16593
|
i = 0;
|
|
@@ -16613,7 +16620,6 @@ function validateRules(namePath, value, rules2, options, validateFirst, messageV
|
|
|
16613
16620
|
case "end":
|
|
16614
16621
|
return _context.stop();
|
|
16615
16622
|
}
|
|
16616
|
-
}
|
|
16617
16623
|
}, _callee);
|
|
16618
16624
|
}));
|
|
16619
16625
|
return function(_x6, _x7) {
|
|
@@ -16644,7 +16650,7 @@ function finishOnAllFailed(_x8) {
|
|
|
16644
16650
|
function _finishOnAllFailed() {
|
|
16645
16651
|
_finishOnAllFailed = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee3(rulePromises) {
|
|
16646
16652
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
16647
|
-
while (1)
|
|
16653
|
+
while (1)
|
|
16648
16654
|
switch (_context3.prev = _context3.next) {
|
|
16649
16655
|
case 0:
|
|
16650
16656
|
return _context3.abrupt("return", Promise.all(rulePromises).then(function(errorsList) {
|
|
@@ -16656,7 +16662,6 @@ function _finishOnAllFailed() {
|
|
|
16656
16662
|
case "end":
|
|
16657
16663
|
return _context3.stop();
|
|
16658
16664
|
}
|
|
16659
|
-
}
|
|
16660
16665
|
}, _callee3);
|
|
16661
16666
|
}));
|
|
16662
16667
|
return _finishOnAllFailed.apply(this, arguments);
|
|
@@ -16668,7 +16673,7 @@ function _finishOnFirstFailed() {
|
|
|
16668
16673
|
_finishOnFirstFailed = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee4(rulePromises) {
|
|
16669
16674
|
var count;
|
|
16670
16675
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
16671
|
-
while (1)
|
|
16676
|
+
while (1)
|
|
16672
16677
|
switch (_context4.prev = _context4.next) {
|
|
16673
16678
|
case 0:
|
|
16674
16679
|
count = 0;
|
|
@@ -16689,7 +16694,6 @@ function _finishOnFirstFailed() {
|
|
|
16689
16694
|
case "end":
|
|
16690
16695
|
return _context4.stop();
|
|
16691
16696
|
}
|
|
16692
|
-
}
|
|
16693
16697
|
}, _callee4);
|
|
16694
16698
|
}));
|
|
16695
16699
|
return _finishOnFirstFailed.apply(this, arguments);
|
|
@@ -18202,6 +18206,11 @@ function stringify(value) {
|
|
|
18202
18206
|
return Math.random();
|
|
18203
18207
|
}
|
|
18204
18208
|
}
|
|
18209
|
+
var useWatchWarning = function(namePath) {
|
|
18210
|
+
var fullyStr = namePath.join("__RC_FIELD_FORM_SPLIT__");
|
|
18211
|
+
var nameStrRef = useRef(fullyStr);
|
|
18212
|
+
warningOnce$1(nameStrRef.current === fullyStr, "`useWatch` is not support dynamic `namePath`. Please provide static instead.");
|
|
18213
|
+
};
|
|
18205
18214
|
function useWatch() {
|
|
18206
18215
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
18207
18216
|
args[_key] = arguments[_key];
|
|
@@ -18222,6 +18231,7 @@ function useWatch() {
|
|
|
18222
18231
|
var namePath = getNamePath(dependencies);
|
|
18223
18232
|
var namePathRef = useRef(namePath);
|
|
18224
18233
|
namePathRef.current = namePath;
|
|
18234
|
+
useWatchWarning(namePath);
|
|
18225
18235
|
useEffect(
|
|
18226
18236
|
function() {
|
|
18227
18237
|
if (!isValidForm) {
|
|
@@ -18971,7 +18981,7 @@ function rectToClientRect(rect) {
|
|
|
18971
18981
|
bottom: rect.y + rect.height
|
|
18972
18982
|
};
|
|
18973
18983
|
}
|
|
18974
|
-
async function detectOverflow(
|
|
18984
|
+
async function detectOverflow(state, options) {
|
|
18975
18985
|
var _await$platform$isEle;
|
|
18976
18986
|
if (options === void 0) {
|
|
18977
18987
|
options = {};
|
|
@@ -18983,7 +18993,7 @@ async function detectOverflow(middlewareArguments, options) {
|
|
|
18983
18993
|
rects,
|
|
18984
18994
|
elements,
|
|
18985
18995
|
strategy
|
|
18986
|
-
} =
|
|
18996
|
+
} = state;
|
|
18987
18997
|
const {
|
|
18988
18998
|
boundary = "clippingAncestors",
|
|
18989
18999
|
rootBoundary = "viewport",
|
|
@@ -19033,7 +19043,7 @@ function within(min$1$1, value, max$1$1) {
|
|
|
19033
19043
|
const arrow = (options) => ({
|
|
19034
19044
|
name: "arrow",
|
|
19035
19045
|
options,
|
|
19036
|
-
async fn(
|
|
19046
|
+
async fn(state) {
|
|
19037
19047
|
const {
|
|
19038
19048
|
element,
|
|
19039
19049
|
padding = 0
|
|
@@ -19044,7 +19054,7 @@ const arrow = (options) => ({
|
|
|
19044
19054
|
placement,
|
|
19045
19055
|
rects,
|
|
19046
19056
|
platform: platform2
|
|
19047
|
-
} =
|
|
19057
|
+
} = state;
|
|
19048
19058
|
if (element == null) {
|
|
19049
19059
|
{
|
|
19050
19060
|
console.warn("Floating UI: No `element` was passed to the `arrow` middleware.");
|
|
@@ -19157,7 +19167,7 @@ const flip = function(options) {
|
|
|
19157
19167
|
return {
|
|
19158
19168
|
name: "flip",
|
|
19159
19169
|
options,
|
|
19160
|
-
async fn(
|
|
19170
|
+
async fn(state) {
|
|
19161
19171
|
var _middlewareData$flip;
|
|
19162
19172
|
const {
|
|
19163
19173
|
placement,
|
|
@@ -19166,7 +19176,7 @@ const flip = function(options) {
|
|
|
19166
19176
|
initialPlacement,
|
|
19167
19177
|
platform: platform2,
|
|
19168
19178
|
elements
|
|
19169
|
-
} =
|
|
19179
|
+
} = state;
|
|
19170
19180
|
const {
|
|
19171
19181
|
mainAxis: checkMainAxis = true,
|
|
19172
19182
|
crossAxis: checkCrossAxis = true,
|
|
@@ -19184,7 +19194,7 @@ const flip = function(options) {
|
|
|
19184
19194
|
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
19185
19195
|
}
|
|
19186
19196
|
const placements = [initialPlacement, ...fallbackPlacements];
|
|
19187
|
-
const overflow = await detectOverflow(
|
|
19197
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
19188
19198
|
const overflows = [];
|
|
19189
19199
|
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
19190
19200
|
if (checkMainAxis) {
|
|
@@ -19202,7 +19212,7 @@ const flip = function(options) {
|
|
|
19202
19212
|
overflows
|
|
19203
19213
|
}];
|
|
19204
19214
|
if (!overflows.every((side2) => side2 <= 0)) {
|
|
19205
|
-
var _middlewareData$flip2;
|
|
19215
|
+
var _middlewareData$flip2, _overflowsData$filter;
|
|
19206
19216
|
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
19207
19217
|
const nextPlacement = placements[nextIndex];
|
|
19208
19218
|
if (nextPlacement) {
|
|
@@ -19216,19 +19226,21 @@ const flip = function(options) {
|
|
|
19216
19226
|
}
|
|
19217
19227
|
};
|
|
19218
19228
|
}
|
|
19219
|
-
let resetPlacement =
|
|
19220
|
-
|
|
19221
|
-
|
|
19222
|
-
|
|
19223
|
-
|
|
19224
|
-
|
|
19225
|
-
|
|
19229
|
+
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;
|
|
19230
|
+
if (!resetPlacement) {
|
|
19231
|
+
switch (fallbackStrategy) {
|
|
19232
|
+
case "bestFit": {
|
|
19233
|
+
var _overflowsData$map$so;
|
|
19234
|
+
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];
|
|
19235
|
+
if (placement2) {
|
|
19236
|
+
resetPlacement = placement2;
|
|
19237
|
+
}
|
|
19238
|
+
break;
|
|
19226
19239
|
}
|
|
19227
|
-
|
|
19240
|
+
case "initialPlacement":
|
|
19241
|
+
resetPlacement = initialPlacement;
|
|
19242
|
+
break;
|
|
19228
19243
|
}
|
|
19229
|
-
case "initialPlacement":
|
|
19230
|
-
resetPlacement = initialPlacement;
|
|
19231
|
-
break;
|
|
19232
19244
|
}
|
|
19233
19245
|
if (placement !== resetPlacement) {
|
|
19234
19246
|
return {
|
|
@@ -19260,17 +19272,17 @@ const hide = function(options) {
|
|
|
19260
19272
|
return {
|
|
19261
19273
|
name: "hide",
|
|
19262
19274
|
options,
|
|
19263
|
-
async fn(
|
|
19275
|
+
async fn(state) {
|
|
19264
19276
|
const {
|
|
19265
19277
|
strategy = "referenceHidden",
|
|
19266
19278
|
...detectOverflowOptions
|
|
19267
19279
|
} = options;
|
|
19268
19280
|
const {
|
|
19269
19281
|
rects
|
|
19270
|
-
} =
|
|
19282
|
+
} = state;
|
|
19271
19283
|
switch (strategy) {
|
|
19272
19284
|
case "referenceHidden": {
|
|
19273
|
-
const overflow = await detectOverflow(
|
|
19285
|
+
const overflow = await detectOverflow(state, {
|
|
19274
19286
|
...detectOverflowOptions,
|
|
19275
19287
|
elementContext: "reference"
|
|
19276
19288
|
});
|
|
@@ -19283,7 +19295,7 @@ const hide = function(options) {
|
|
|
19283
19295
|
};
|
|
19284
19296
|
}
|
|
19285
19297
|
case "escaped": {
|
|
19286
|
-
const overflow = await detectOverflow(
|
|
19298
|
+
const overflow = await detectOverflow(state, {
|
|
19287
19299
|
...detectOverflowOptions,
|
|
19288
19300
|
altBoundary: true
|
|
19289
19301
|
});
|
|
@@ -19302,19 +19314,19 @@ const hide = function(options) {
|
|
|
19302
19314
|
}
|
|
19303
19315
|
};
|
|
19304
19316
|
};
|
|
19305
|
-
async function convertValueToCoords(
|
|
19317
|
+
async function convertValueToCoords(state, value) {
|
|
19306
19318
|
const {
|
|
19307
19319
|
placement,
|
|
19308
19320
|
platform: platform2,
|
|
19309
19321
|
elements
|
|
19310
|
-
} =
|
|
19322
|
+
} = state;
|
|
19311
19323
|
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
|
|
19312
19324
|
const side = getSide(placement);
|
|
19313
19325
|
const alignment = getAlignment(placement);
|
|
19314
19326
|
const isVertical = getMainAxisFromPlacement(placement) === "x";
|
|
19315
19327
|
const mainAxisMulti = ["left", "top"].includes(side) ? -1 : 1;
|
|
19316
19328
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
19317
|
-
const rawValue = typeof value === "function" ? value(
|
|
19329
|
+
const rawValue = typeof value === "function" ? value(state) : value;
|
|
19318
19330
|
let {
|
|
19319
19331
|
mainAxis,
|
|
19320
19332
|
crossAxis,
|
|
@@ -19347,12 +19359,12 @@ const offset = function(value) {
|
|
|
19347
19359
|
return {
|
|
19348
19360
|
name: "offset",
|
|
19349
19361
|
options: value,
|
|
19350
|
-
async fn(
|
|
19362
|
+
async fn(state) {
|
|
19351
19363
|
const {
|
|
19352
19364
|
x,
|
|
19353
19365
|
y
|
|
19354
|
-
} =
|
|
19355
|
-
const diffCoords = await convertValueToCoords(
|
|
19366
|
+
} = state;
|
|
19367
|
+
const diffCoords = await convertValueToCoords(state, value);
|
|
19356
19368
|
return {
|
|
19357
19369
|
x: x + diffCoords.x,
|
|
19358
19370
|
y: y + diffCoords.y,
|
|
@@ -19371,12 +19383,12 @@ const shift = function(options) {
|
|
|
19371
19383
|
return {
|
|
19372
19384
|
name: "shift",
|
|
19373
19385
|
options,
|
|
19374
|
-
async fn(
|
|
19386
|
+
async fn(state) {
|
|
19375
19387
|
const {
|
|
19376
19388
|
x,
|
|
19377
19389
|
y,
|
|
19378
19390
|
placement
|
|
19379
|
-
} =
|
|
19391
|
+
} = state;
|
|
19380
19392
|
const {
|
|
19381
19393
|
mainAxis: checkMainAxis = true,
|
|
19382
19394
|
crossAxis: checkCrossAxis = false,
|
|
@@ -19398,7 +19410,7 @@ const shift = function(options) {
|
|
|
19398
19410
|
x,
|
|
19399
19411
|
y
|
|
19400
19412
|
};
|
|
19401
|
-
const overflow = await detectOverflow(
|
|
19413
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
19402
19414
|
const mainAxis = getMainAxisFromPlacement(getSide(placement));
|
|
19403
19415
|
const crossAxis = getCrossAxis(mainAxis);
|
|
19404
19416
|
let mainAxisCoord = coords[mainAxis];
|
|
@@ -19418,7 +19430,7 @@ const shift = function(options) {
|
|
|
19418
19430
|
crossAxisCoord = within(min2, crossAxisCoord, max2);
|
|
19419
19431
|
}
|
|
19420
19432
|
const limitedCoords = limiter.fn({
|
|
19421
|
-
...
|
|
19433
|
+
...state,
|
|
19422
19434
|
[mainAxis]: mainAxisCoord,
|
|
19423
19435
|
[crossAxis]: crossAxisCoord
|
|
19424
19436
|
});
|
|
@@ -19438,14 +19450,14 @@ const limitShift = function(options) {
|
|
|
19438
19450
|
}
|
|
19439
19451
|
return {
|
|
19440
19452
|
options,
|
|
19441
|
-
fn(
|
|
19453
|
+
fn(state) {
|
|
19442
19454
|
const {
|
|
19443
19455
|
x,
|
|
19444
19456
|
y,
|
|
19445
19457
|
placement,
|
|
19446
19458
|
rects,
|
|
19447
19459
|
middlewareData
|
|
19448
|
-
} =
|
|
19460
|
+
} = state;
|
|
19449
19461
|
const {
|
|
19450
19462
|
offset: offset2 = 0,
|
|
19451
19463
|
mainAxis: checkMainAxis = true,
|
|
@@ -19459,7 +19471,7 @@ const limitShift = function(options) {
|
|
|
19459
19471
|
const crossAxis = getCrossAxis(mainAxis);
|
|
19460
19472
|
let mainAxisCoord = coords[mainAxis];
|
|
19461
19473
|
let crossAxisCoord = coords[crossAxis];
|
|
19462
|
-
const rawOffset = typeof offset2 === "function" ? offset2(
|
|
19474
|
+
const rawOffset = typeof offset2 === "function" ? offset2(state) : offset2;
|
|
19463
19475
|
const computedOffset = typeof rawOffset === "number" ? {
|
|
19464
19476
|
mainAxis: rawOffset,
|
|
19465
19477
|
crossAxis: 0
|
|
@@ -19504,6 +19516,26 @@ function getWindow(node) {
|
|
|
19504
19516
|
function getComputedStyle$1(element) {
|
|
19505
19517
|
return getWindow(element).getComputedStyle(element);
|
|
19506
19518
|
}
|
|
19519
|
+
const min = Math.min;
|
|
19520
|
+
const max = Math.max;
|
|
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
|
+
};
|
|
19538
|
+
}
|
|
19507
19539
|
function getNodeName(node) {
|
|
19508
19540
|
return isNode(node) ? (node.nodeName || "").toLowerCase() : "";
|
|
19509
19541
|
}
|
|
@@ -19551,39 +19583,17 @@ function isContainingBlock(element) {
|
|
|
19551
19583
|
const isFirefox = /firefox/i.test(getUAString());
|
|
19552
19584
|
const css = getComputedStyle$1(element);
|
|
19553
19585
|
const backdropFilter = css.backdropFilter || css.WebkitBackdropFilter;
|
|
19554
|
-
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(
|
|
19555
|
-
|
|
19556
|
-
|
|
19557
|
-
|
|
19558
|
-
}
|
|
19559
|
-
);
|
|
19586
|
+
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) => {
|
|
19587
|
+
const contain = css.contain;
|
|
19588
|
+
return contain != null ? contain.includes(value) : false;
|
|
19589
|
+
});
|
|
19560
19590
|
}
|
|
19561
|
-
function
|
|
19562
|
-
return
|
|
19591
|
+
function isClientRectVisualViewportBased() {
|
|
19592
|
+
return /^((?!chrome|android).)*safari/i.test(getUAString());
|
|
19563
19593
|
}
|
|
19564
19594
|
function isLastTraversableNode(node) {
|
|
19565
19595
|
return ["html", "body", "#document"].includes(getNodeName(node));
|
|
19566
19596
|
}
|
|
19567
|
-
const min = Math.min;
|
|
19568
|
-
const max = Math.max;
|
|
19569
|
-
const round = Math.round;
|
|
19570
|
-
function getCssDimensions(element) {
|
|
19571
|
-
const css = getComputedStyle$1(element);
|
|
19572
|
-
let width = parseFloat(css.width);
|
|
19573
|
-
let height = parseFloat(css.height);
|
|
19574
|
-
const offsetWidth = element.offsetWidth;
|
|
19575
|
-
const offsetHeight = element.offsetHeight;
|
|
19576
|
-
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
19577
|
-
if (shouldFallback) {
|
|
19578
|
-
width = offsetWidth;
|
|
19579
|
-
height = offsetHeight;
|
|
19580
|
-
}
|
|
19581
|
-
return {
|
|
19582
|
-
width,
|
|
19583
|
-
height,
|
|
19584
|
-
fallback: shouldFallback
|
|
19585
|
-
};
|
|
19586
|
-
}
|
|
19587
19597
|
function unwrapElement(element) {
|
|
19588
19598
|
return !isElement(element) ? element.contextElement : element;
|
|
19589
19599
|
}
|
|
@@ -19636,7 +19646,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
19636
19646
|
}
|
|
19637
19647
|
}
|
|
19638
19648
|
const win = domElement ? getWindow(domElement) : window;
|
|
19639
|
-
const addVisualOffsets =
|
|
19649
|
+
const addVisualOffsets = isClientRectVisualViewportBased() && isFixedStrategy;
|
|
19640
19650
|
let x = (clientRect.left + (addVisualOffsets ? ((_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) || 0 : 0)) / scale2.x;
|
|
19641
19651
|
let y = (clientRect.top + (addVisualOffsets ? ((_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) || 0 : 0)) / scale2.y;
|
|
19642
19652
|
let width = clientRect.width / scale2.x;
|
|
@@ -19686,78 +19696,6 @@ function getNodeScroll(element) {
|
|
|
19686
19696
|
scrollTop: element.pageYOffset
|
|
19687
19697
|
};
|
|
19688
19698
|
}
|
|
19689
|
-
function getWindowScrollBarX(element) {
|
|
19690
|
-
return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
|
|
19691
|
-
}
|
|
19692
|
-
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
19693
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
19694
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
19695
|
-
const rect = getBoundingClientRect(element, true, strategy === "fixed", offsetParent);
|
|
19696
|
-
let scroll = {
|
|
19697
|
-
scrollLeft: 0,
|
|
19698
|
-
scrollTop: 0
|
|
19699
|
-
};
|
|
19700
|
-
const offsets = {
|
|
19701
|
-
x: 0,
|
|
19702
|
-
y: 0
|
|
19703
|
-
};
|
|
19704
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== "fixed") {
|
|
19705
|
-
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
|
|
19706
|
-
scroll = getNodeScroll(offsetParent);
|
|
19707
|
-
}
|
|
19708
|
-
if (isHTMLElement(offsetParent)) {
|
|
19709
|
-
const offsetRect = getBoundingClientRect(offsetParent, true);
|
|
19710
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
19711
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
19712
|
-
} else if (documentElement) {
|
|
19713
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
19714
|
-
}
|
|
19715
|
-
}
|
|
19716
|
-
return {
|
|
19717
|
-
x: rect.left + scroll.scrollLeft - offsets.x,
|
|
19718
|
-
y: rect.top + scroll.scrollTop - offsets.y,
|
|
19719
|
-
width: rect.width,
|
|
19720
|
-
height: rect.height
|
|
19721
|
-
};
|
|
19722
|
-
}
|
|
19723
|
-
function getParentNode(node) {
|
|
19724
|
-
if (getNodeName(node) === "html") {
|
|
19725
|
-
return node;
|
|
19726
|
-
}
|
|
19727
|
-
const result2 = node.assignedSlot || node.parentNode || (isShadowRoot(node) ? node.host : null) || getDocumentElement(node);
|
|
19728
|
-
return isShadowRoot(result2) ? result2.host : result2;
|
|
19729
|
-
}
|
|
19730
|
-
function getTrueOffsetParent(element) {
|
|
19731
|
-
if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") {
|
|
19732
|
-
return null;
|
|
19733
|
-
}
|
|
19734
|
-
return element.offsetParent;
|
|
19735
|
-
}
|
|
19736
|
-
function getContainingBlock(element) {
|
|
19737
|
-
let currentNode = getParentNode(element);
|
|
19738
|
-
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
19739
|
-
if (isContainingBlock(currentNode)) {
|
|
19740
|
-
return currentNode;
|
|
19741
|
-
} else {
|
|
19742
|
-
currentNode = getParentNode(currentNode);
|
|
19743
|
-
}
|
|
19744
|
-
}
|
|
19745
|
-
return null;
|
|
19746
|
-
}
|
|
19747
|
-
function getOffsetParent(element) {
|
|
19748
|
-
const window2 = getWindow(element);
|
|
19749
|
-
let offsetParent = getTrueOffsetParent(element);
|
|
19750
|
-
while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === "static") {
|
|
19751
|
-
offsetParent = getTrueOffsetParent(offsetParent);
|
|
19752
|
-
}
|
|
19753
|
-
if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle$1(offsetParent).position === "static" && !isContainingBlock(offsetParent))) {
|
|
19754
|
-
return window2;
|
|
19755
|
-
}
|
|
19756
|
-
return offsetParent || getContainingBlock(element) || window2;
|
|
19757
|
-
}
|
|
19758
|
-
function getDimensions(element) {
|
|
19759
|
-
return getCssDimensions(element);
|
|
19760
|
-
}
|
|
19761
19699
|
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
19762
19700
|
let {
|
|
19763
19701
|
rect,
|
|
@@ -19799,41 +19737,19 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
19799
19737
|
y: rect.y * scale2.y - scroll.scrollTop * scale2.y + offsets.y
|
|
19800
19738
|
};
|
|
19801
19739
|
}
|
|
19802
|
-
function
|
|
19803
|
-
|
|
19804
|
-
const html = getDocumentElement(element);
|
|
19805
|
-
const visualViewport = win.visualViewport;
|
|
19806
|
-
let width = html.clientWidth;
|
|
19807
|
-
let height = html.clientHeight;
|
|
19808
|
-
let x = 0;
|
|
19809
|
-
let y = 0;
|
|
19810
|
-
if (visualViewport) {
|
|
19811
|
-
width = visualViewport.width;
|
|
19812
|
-
height = visualViewport.height;
|
|
19813
|
-
const layoutViewport = isLayoutViewport();
|
|
19814
|
-
if (layoutViewport || !layoutViewport && strategy === "fixed") {
|
|
19815
|
-
x = visualViewport.offsetLeft;
|
|
19816
|
-
y = visualViewport.offsetTop;
|
|
19817
|
-
}
|
|
19818
|
-
}
|
|
19819
|
-
return {
|
|
19820
|
-
width,
|
|
19821
|
-
height,
|
|
19822
|
-
x,
|
|
19823
|
-
y
|
|
19824
|
-
};
|
|
19740
|
+
function getWindowScrollBarX(element) {
|
|
19741
|
+
return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
|
|
19825
19742
|
}
|
|
19826
19743
|
function getDocumentRect(element) {
|
|
19827
|
-
var _element$ownerDocumen;
|
|
19828
19744
|
const html = getDocumentElement(element);
|
|
19829
19745
|
const scroll = getNodeScroll(element);
|
|
19830
|
-
const body =
|
|
19831
|
-
const width = max(html.scrollWidth, html.clientWidth, body
|
|
19832
|
-
const height = max(html.scrollHeight, html.clientHeight, body
|
|
19746
|
+
const body = element.ownerDocument.body;
|
|
19747
|
+
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
19748
|
+
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
19833
19749
|
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
19834
19750
|
const y = -scroll.scrollTop;
|
|
19835
|
-
if (getComputedStyle$1(body
|
|
19836
|
-
x += max(html.clientWidth, body
|
|
19751
|
+
if (getComputedStyle$1(body).direction === "rtl") {
|
|
19752
|
+
x += max(html.clientWidth, body.clientWidth) - width;
|
|
19837
19753
|
}
|
|
19838
19754
|
return {
|
|
19839
19755
|
width,
|
|
@@ -19842,10 +19758,17 @@ function getDocumentRect(element) {
|
|
|
19842
19758
|
y
|
|
19843
19759
|
};
|
|
19844
19760
|
}
|
|
19761
|
+
function getParentNode(node) {
|
|
19762
|
+
if (getNodeName(node) === "html") {
|
|
19763
|
+
return node;
|
|
19764
|
+
}
|
|
19765
|
+
const result2 = node.assignedSlot || node.parentNode || isShadowRoot(node) && node.host || getDocumentElement(node);
|
|
19766
|
+
return isShadowRoot(result2) ? result2.host : result2;
|
|
19767
|
+
}
|
|
19845
19768
|
function getNearestOverflowAncestor(node) {
|
|
19846
19769
|
const parentNode = getParentNode(node);
|
|
19847
19770
|
if (isLastTraversableNode(parentNode)) {
|
|
19848
|
-
return
|
|
19771
|
+
return parentNode.ownerDocument.body;
|
|
19849
19772
|
}
|
|
19850
19773
|
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
19851
19774
|
return parentNode;
|
|
@@ -19865,6 +19788,30 @@ function getOverflowAncestors(node, list2) {
|
|
|
19865
19788
|
}
|
|
19866
19789
|
return list2.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
|
|
19867
19790
|
}
|
|
19791
|
+
function getViewportRect(element, strategy) {
|
|
19792
|
+
const win = getWindow(element);
|
|
19793
|
+
const html = getDocumentElement(element);
|
|
19794
|
+
const visualViewport = win.visualViewport;
|
|
19795
|
+
let width = html.clientWidth;
|
|
19796
|
+
let height = html.clientHeight;
|
|
19797
|
+
let x = 0;
|
|
19798
|
+
let y = 0;
|
|
19799
|
+
if (visualViewport) {
|
|
19800
|
+
width = visualViewport.width;
|
|
19801
|
+
height = visualViewport.height;
|
|
19802
|
+
const visualViewportBased = isClientRectVisualViewportBased();
|
|
19803
|
+
if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
|
|
19804
|
+
x = visualViewport.offsetLeft;
|
|
19805
|
+
y = visualViewport.offsetTop;
|
|
19806
|
+
}
|
|
19807
|
+
}
|
|
19808
|
+
return {
|
|
19809
|
+
width,
|
|
19810
|
+
height,
|
|
19811
|
+
x,
|
|
19812
|
+
y
|
|
19813
|
+
};
|
|
19814
|
+
}
|
|
19868
19815
|
function getInnerBoundingClientRect(element, strategy) {
|
|
19869
19816
|
const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
|
|
19870
19817
|
const top = clientRect.top + element.clientTop;
|
|
@@ -19878,24 +19825,33 @@ function getInnerBoundingClientRect(element, strategy) {
|
|
|
19878
19825
|
const x = left * scale2.x;
|
|
19879
19826
|
const y = top * scale2.y;
|
|
19880
19827
|
return {
|
|
19881
|
-
top: y,
|
|
19882
|
-
left: x,
|
|
19883
|
-
right: x + width,
|
|
19884
|
-
bottom: y + height,
|
|
19885
|
-
x,
|
|
19886
|
-
y,
|
|
19887
19828
|
width,
|
|
19888
|
-
height
|
|
19829
|
+
height,
|
|
19830
|
+
x,
|
|
19831
|
+
y
|
|
19889
19832
|
};
|
|
19890
19833
|
}
|
|
19891
19834
|
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
19835
|
+
let rect;
|
|
19892
19836
|
if (clippingAncestor === "viewport") {
|
|
19893
|
-
|
|
19894
|
-
}
|
|
19895
|
-
|
|
19896
|
-
|
|
19837
|
+
rect = getViewportRect(element, strategy);
|
|
19838
|
+
} else if (clippingAncestor === "document") {
|
|
19839
|
+
rect = getDocumentRect(getDocumentElement(element));
|
|
19840
|
+
} else if (isElement(clippingAncestor)) {
|
|
19841
|
+
rect = getInnerBoundingClientRect(clippingAncestor, strategy);
|
|
19842
|
+
} else {
|
|
19843
|
+
const mutableRect = {
|
|
19844
|
+
...clippingAncestor
|
|
19845
|
+
};
|
|
19846
|
+
if (isClientRectVisualViewportBased()) {
|
|
19847
|
+
var _win$visualViewport, _win$visualViewport2;
|
|
19848
|
+
const win = getWindow(element);
|
|
19849
|
+
mutableRect.x -= ((_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) || 0;
|
|
19850
|
+
mutableRect.y -= ((_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) || 0;
|
|
19851
|
+
}
|
|
19852
|
+
rect = mutableRect;
|
|
19897
19853
|
}
|
|
19898
|
-
return rectToClientRect(
|
|
19854
|
+
return rectToClientRect(rect);
|
|
19899
19855
|
}
|
|
19900
19856
|
function getClippingElementAncestors(element, cache) {
|
|
19901
19857
|
const cachedResult = cache.get(element);
|
|
@@ -19909,11 +19865,16 @@ function getClippingElementAncestors(element, cache) {
|
|
|
19909
19865
|
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
19910
19866
|
const computedStyle = getComputedStyle$1(currentNode);
|
|
19911
19867
|
const containingBlock = isContainingBlock(currentNode);
|
|
19912
|
-
const
|
|
19913
|
-
if (
|
|
19914
|
-
|
|
19868
|
+
const shouldIgnoreCurrentNode = computedStyle.position === "fixed";
|
|
19869
|
+
if (shouldIgnoreCurrentNode) {
|
|
19870
|
+
currentContainingBlockComputedStyle = null;
|
|
19915
19871
|
} else {
|
|
19916
|
-
|
|
19872
|
+
const shouldDropCurrentNode = elementIsFixed ? !containingBlock && !currentContainingBlockComputedStyle : !containingBlock && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position);
|
|
19873
|
+
if (shouldDropCurrentNode) {
|
|
19874
|
+
result2 = result2.filter((ancestor) => ancestor !== currentNode);
|
|
19875
|
+
} else {
|
|
19876
|
+
currentContainingBlockComputedStyle = computedStyle;
|
|
19877
|
+
}
|
|
19917
19878
|
}
|
|
19918
19879
|
currentNode = getParentNode(currentNode);
|
|
19919
19880
|
}
|
|
@@ -19945,6 +19906,74 @@ function getClippingRect(_ref) {
|
|
|
19945
19906
|
y: clippingRect.top
|
|
19946
19907
|
};
|
|
19947
19908
|
}
|
|
19909
|
+
function getDimensions(element) {
|
|
19910
|
+
if (isHTMLElement(element)) {
|
|
19911
|
+
return getCssDimensions(element);
|
|
19912
|
+
}
|
|
19913
|
+
return element.getBoundingClientRect();
|
|
19914
|
+
}
|
|
19915
|
+
function getTrueOffsetParent(element, polyfill) {
|
|
19916
|
+
if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") {
|
|
19917
|
+
return null;
|
|
19918
|
+
}
|
|
19919
|
+
if (polyfill) {
|
|
19920
|
+
return polyfill(element);
|
|
19921
|
+
}
|
|
19922
|
+
return element.offsetParent;
|
|
19923
|
+
}
|
|
19924
|
+
function getContainingBlock(element) {
|
|
19925
|
+
let currentNode = getParentNode(element);
|
|
19926
|
+
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
19927
|
+
if (isContainingBlock(currentNode)) {
|
|
19928
|
+
return currentNode;
|
|
19929
|
+
} else {
|
|
19930
|
+
currentNode = getParentNode(currentNode);
|
|
19931
|
+
}
|
|
19932
|
+
}
|
|
19933
|
+
return null;
|
|
19934
|
+
}
|
|
19935
|
+
function getOffsetParent(element, polyfill) {
|
|
19936
|
+
const window2 = getWindow(element);
|
|
19937
|
+
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
19938
|
+
while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === "static") {
|
|
19939
|
+
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
19940
|
+
}
|
|
19941
|
+
if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle$1(offsetParent).position === "static" && !isContainingBlock(offsetParent))) {
|
|
19942
|
+
return window2;
|
|
19943
|
+
}
|
|
19944
|
+
return offsetParent || getContainingBlock(element) || window2;
|
|
19945
|
+
}
|
|
19946
|
+
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
19947
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
19948
|
+
const documentElement = getDocumentElement(offsetParent);
|
|
19949
|
+
const rect = getBoundingClientRect(element, true, strategy === "fixed", offsetParent);
|
|
19950
|
+
let scroll = {
|
|
19951
|
+
scrollLeft: 0,
|
|
19952
|
+
scrollTop: 0
|
|
19953
|
+
};
|
|
19954
|
+
const offsets = {
|
|
19955
|
+
x: 0,
|
|
19956
|
+
y: 0
|
|
19957
|
+
};
|
|
19958
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== "fixed") {
|
|
19959
|
+
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
|
|
19960
|
+
scroll = getNodeScroll(offsetParent);
|
|
19961
|
+
}
|
|
19962
|
+
if (isHTMLElement(offsetParent)) {
|
|
19963
|
+
const offsetRect = getBoundingClientRect(offsetParent, true);
|
|
19964
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
19965
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
19966
|
+
} else if (documentElement) {
|
|
19967
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
19968
|
+
}
|
|
19969
|
+
}
|
|
19970
|
+
return {
|
|
19971
|
+
x: rect.left + scroll.scrollLeft - offsets.x,
|
|
19972
|
+
y: rect.top + scroll.scrollTop - offsets.y,
|
|
19973
|
+
width: rect.width,
|
|
19974
|
+
height: rect.height
|
|
19975
|
+
};
|
|
19976
|
+
}
|
|
19948
19977
|
const platform = {
|
|
19949
19978
|
getClippingRect,
|
|
19950
19979
|
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
@@ -24828,11 +24857,15 @@ const Swiper = forwardRef(staged_1((p, ref) => {
|
|
|
24828
24857
|
useEffect(() => {
|
|
24829
24858
|
if (!autoplay || dragging)
|
|
24830
24859
|
return;
|
|
24831
|
-
|
|
24860
|
+
let interval;
|
|
24861
|
+
function tick() {
|
|
24862
|
+
interval = window.setTimeout(tick, autoplayInterval);
|
|
24832
24863
|
swipeNext();
|
|
24833
|
-
}
|
|
24864
|
+
}
|
|
24865
|
+
interval = window.setTimeout(tick, autoplayInterval);
|
|
24834
24866
|
return () => {
|
|
24835
|
-
|
|
24867
|
+
if (interval)
|
|
24868
|
+
window.clearTimeout(interval);
|
|
24836
24869
|
};
|
|
24837
24870
|
}, [autoplay, autoplayInterval, dragging, count]);
|
|
24838
24871
|
function renderTrackInner() {
|
|
@@ -25133,6 +25166,7 @@ const TextArea$1 = forwardRef((p, ref) => {
|
|
|
25133
25166
|
devError("TextArea", "`value` prop on `TextArea` should not be `null`. Consider using an empty string to clear the component.");
|
|
25134
25167
|
}
|
|
25135
25168
|
const nativeTextAreaRef = useRef(null);
|
|
25169
|
+
const heightRef = useRef("auto");
|
|
25136
25170
|
useImperativeHandle(ref, () => ({
|
|
25137
25171
|
clear: () => {
|
|
25138
25172
|
setValue2("");
|
|
@@ -25155,7 +25189,7 @@ const TextArea$1 = forwardRef((p, ref) => {
|
|
|
25155
25189
|
const textArea2 = nativeTextAreaRef.current;
|
|
25156
25190
|
if (!textArea2)
|
|
25157
25191
|
return;
|
|
25158
|
-
textArea2.style.height =
|
|
25192
|
+
textArea2.style.height = heightRef.current;
|
|
25159
25193
|
let height = textArea2.scrollHeight;
|
|
25160
25194
|
if (typeof autoSize === "object") {
|
|
25161
25195
|
const computedStyle = window.getComputedStyle(textArea2);
|
|
@@ -25167,6 +25201,7 @@ const TextArea$1 = forwardRef((p, ref) => {
|
|
|
25167
25201
|
height = Math.min(height, autoSize.maxRows * lineHeight);
|
|
25168
25202
|
}
|
|
25169
25203
|
}
|
|
25204
|
+
heightRef.current = `${height}px`;
|
|
25170
25205
|
textArea2.style.height = `${height}px`;
|
|
25171
25206
|
}, [value, autoSize]);
|
|
25172
25207
|
const compositingRef = useRef(false);
|