@unicom-cloud/ui 0.8.71 → 0.8.73
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/Affix.js +2 -2
- package/Alert.js +2 -2
- package/AutoComplete.js +2 -2
- package/BackTop.js +2 -2
- package/Badge.js +2 -2
- package/Breadcrumb.js +3 -3
- package/Button.js +1 -1
- package/Calendar.js +1 -1
- package/Card.js +1 -1
- package/Carousel.js +1 -1
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +1 -1
- package/Comment.js +1 -1
- package/ConfigProvider.js +1 -1
- package/Copy.js +1 -1
- package/DatePicker.js +1 -1
- package/Descriptions.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Dropdown.js +4 -4
- package/Empty.js +1 -1
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/InputNumber.js +1 -1
- package/Layout.js +1 -1
- package/Link.js +1 -1
- package/List.js +2 -2
- package/Mentions.js +2 -2
- package/Menu.js +1 -1
- package/Message.js +6 -5
- package/Modal.js +1 -1
- package/Notice.js +4 -4
- package/Notification.js +7 -6
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/Popconfirm.js +2 -2
- package/Popover.js +2 -2
- package/Progress.js +1 -1
- package/Radio.js +1 -1
- package/Rate.js +2 -2
- package/ResizeBox.js +2 -2
- package/Result.js +1 -1
- package/SelectView.js +4 -3
- package/Skeleton.js +1 -1
- package/Slider.js +3 -3
- package/Space.js +1 -1
- package/SpeechSynthesis.js +20 -20
- package/Spin.js +2 -2
- package/Statistic.js +1 -1
- package/Steps.js +1 -1
- package/Switch.js +7 -5
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +1 -1
- package/Tooltip.js +3 -3
- package/Transfer.js +2 -2
- package/Tree.js +1 -1
- package/Trigger.js +8 -7
- package/affix/index.js +2 -2
- package/alert/index.js +2 -2
- package/anchor/Anchor.js +53 -50
- package/anchor/Link.js +1 -1
- package/anchor/util.js +1 -1
- package/auto-complete/index.js +2 -2
- package/avatar/Avatar.js +1 -1
- package/avatar/Group.js +1 -1
- package/back-top/index.js +2 -2
- package/badge/Count.js +1 -1
- package/badge/index.js +50 -48
- package/breadcrumb/index.js +3 -3
- package/button/Group.js +1 -1
- package/button/index.js +1 -1
- package/calendar/index.js +2 -2
- package/card/Grid.js +1 -1
- package/card/Meta.js +1 -1
- package/card/index.js +1 -1
- package/carousel/Arrow.js +1 -1
- package/carousel/Indicator.js +1 -1
- package/carousel/index.js +1 -1
- package/cascader/Cascader.js +4 -4
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +3 -3
- package/checkbox/Group.js +3 -3
- package/checkbox/index.js +1 -1
- package/chunk/{C5X9bDyX.js → 7HDzVe32.js} +7 -7
- package/chunk/{BlElSWJg.js → B0UZ1Ee2.js} +3 -3
- package/chunk/{b1e8awfs.js → B0n0iRhF.js} +1 -1
- package/chunk/{BzPNDYAX.js → B7hulkj9.js} +2 -2
- package/chunk/Bj4EV0eG.js +27 -0
- package/chunk/{Bfq4YEcr.js → Bmvhjhzq.js} +9 -8
- package/chunk/Byd0ztYY.js +724 -0
- package/chunk/{URXCKjXr.js → C0pRaDCf.js} +23 -23
- package/chunk/{B4JiMp8I.js → CCVU-Kst.js} +8 -2
- package/chunk/{ClaNycDy.js → Cc_-i0o_.js} +2 -2
- package/chunk/CiY7w1ZO.js +647 -0
- package/chunk/{fFjj2KuF.js → Cj2SQJiO.js} +392 -414
- package/chunk/Coz3rCng.js +33 -0
- package/chunk/{BHL-PzAD.js → CplLA01W.js} +17 -17
- package/chunk/{8V534cS3.js → D2LLXZQX.js} +5 -7
- package/chunk/DAAff-FT.js +59 -0
- package/chunk/{CQTxhsUk.js → DJDOFlqC.js} +2 -2
- package/chunk/DU1RCDfh.js +29 -0
- package/chunk/{CdaT1b_F.js → DeV0v__J.js} +2 -2
- package/chunk/{I1dqAgn_.js → DejjIa3N.js} +176 -173
- package/chunk/{C6AJxF7d.js → Dg0M2OmF.js} +125 -125
- package/chunk/{DV7ywe_q.js → RS6OAxzv.js} +2 -2
- package/chunk/{CUs1AOCZ.js → UDX9U6M7.js} +3 -3
- package/chunk/{Biupwn8l.js → ZrBrCzQX.js} +6 -5
- package/chunk/{pEI3aB9Z.js → oHDWCJnz.js} +3 -3
- package/chunk/{D2DSUGNT.js → uH6uxyao.js} +1 -1
- package/chunk/{D090jlwP.js → xAb6ZgqS.js} +1 -1
- package/collapse/Collapse.js +3 -3
- package/collapse/Item.js +3 -3
- package/collapse/index.js +1 -1
- package/color-picker/ControlBar.js +1 -1
- package/color-picker/InputAlpha.js +1 -1
- package/color-picker/InputHex.js +8 -8
- package/color-picker/InputRgb.js +6 -6
- package/color-picker/Palette.js +2 -2
- package/color-picker/Panel.js +16 -16
- package/color-picker/colors.js +4 -4
- package/color-picker/index.js +3 -3
- package/color-picker/utils.js +1 -1
- package/comment/index.js +1 -1
- package/config-provider/ConfigProvider.js +2 -2
- package/config-provider/context.js +1 -1
- package/config-provider/index.js +2 -2
- package/copy/index.js +1 -1
- package/date-picker/Picker.js +1 -1
- package/date-picker/PickerRange.js +2 -2
- package/date-picker/index.js +1 -1
- package/descriptions/index.js +2 -2
- package/divider/index.js +1 -1
- package/draggable/index.js +1 -1
- package/drawer/Drawer.js +121 -111
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +4 -4
- package/empty/index.js +1 -1
- package/form/Form.js +2 -2
- package/form/FormItem.js +2 -2
- package/form/promisify.js +9 -8
- package/form/store.js +1 -1
- package/form/util.js +1 -1
- package/grid/Col.js +1 -1
- package/grid/Row.js +2 -2
- package/grid/grid-item.js +2 -2
- package/grid/grid.js +2 -2
- package/hooks/index.js +5 -5
- package/hooks/useInView.js +1 -1
- package/hooks/useIntersectionObserver.js +1 -1
- package/hooks/useMergeValue.js +1 -1
- package/hooks/useOverflowHidden.js +1 -1
- package/hooks/useOverrideRef.js +1 -1
- package/hooks/useVerificationCode.js +2 -2
- package/icon/index.js +1 -1
- package/icon-hover/index.js +1 -1
- package/image/Image.js +4 -4
- package/image/ImagePreview.js +8 -8
- package/image/ImagePreviewArrow.js +1 -1
- package/image/ImagePreviewGroup.js +2 -2
- package/image/index.js +1 -1
- package/index.js +591 -571
- package/input/Group.js +1 -1
- package/input/Input.js +47 -46
- package/input/InputElement.js +3 -3
- package/input/Password.js +2 -2
- package/input/Search.js +2 -2
- package/input/Textarea.js +6 -5
- package/input-number/index.js +1 -1
- package/input-tag/InputTag.js +52 -50
- package/layout/Content.js +1 -1
- package/layout/Footer.js +1 -1
- package/layout/Header.js +1 -1
- package/layout/Sider.js +3 -3
- package/layout/index.js +1 -1
- package/link/index.js +1 -1
- package/list/Item.js +1 -1
- package/list/Meta.js +1 -1
- package/list/index.js +2 -2
- package/locale/en-US.js +1 -1
- package/locale/tr-TR.js +1 -1
- package/mentions/index.js +2 -2
- package/menu/Item.js +1 -1
- package/menu/Menu.js +3 -3
- package/menu/OverflowWrap.js +1 -1
- package/menu/index.js +2 -2
- package/message/index.js +6 -5
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +8 -7
- package/modal/index.js +1 -1
- package/notice/index.js +4 -4
- package/notification/index.js +7 -6
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +1 -1
- package/overflow-ellipsis/index.js +1 -1
- package/package.json +1 -1
- package/page-header/index.js +1 -1
- package/pagination/PageItem.js +1 -1
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +1 -1
- package/pagination/Pagination.js +2 -2
- package/picker/Input.js +1 -1
- package/picker/InputRange.js +1 -1
- package/popconfirm/index.js +2 -2
- package/popover/index.js +2 -2
- package/progress/index.js +1 -1
- package/radio/Group.js +3 -3
- package/radio/Radio.js +3 -3
- package/radio/index.js +2 -2
- package/rate/index.js +26 -26
- package/resize-box/ResizeTrigger.js +21 -20
- package/resize-box/Split.js +1 -1
- package/resize-box/SplitGroup.js +1 -1
- package/resize-box/index.js +2 -2
- package/result/index.js +1 -1
- package/select/Option.js +1 -1
- package/select/Select.js +5 -4
- package/select/util.js +12 -12
- package/select-view/Core.js +3 -3
- package/select-view/index.js +2 -1
- package/skeleton/index.js +1 -1
- package/slider/Button.js +2 -2
- package/slider/Tick.js +1 -1
- package/slider/index.js +19 -19
- package/slider/util.js +8 -8
- package/space/index.js +1 -1
- package/speech-synthesis/index.js +20 -20
- package/spin/DotLoading.js +1 -1
- package/spin/index.js +2 -2
- package/statistic/Countdown.js +1 -1
- package/statistic/index.js +1 -1
- package/steps/index.js +1 -1
- package/style/variables.less +1 -1
- package/style.css +1 -1
- package/switch/index.js +16 -14
- package/table/Table.js +2 -2
- package/table/index.js +3 -3
- package/tabs/Tab.js +3 -3
- package/tabs/TabContent.js +2 -2
- package/tabs/TabPane.js +1 -1
- package/tabs/index.js +2 -2
- package/tag/index.js +1 -1
- package/time-picker/Picker.js +1 -1
- package/time-picker/TimePicker.js +1 -1
- package/timeline/Item.js +1 -1
- package/timeline/Timeline.js +1 -1
- package/tooltip/index.js +3 -3
- package/transfer/Item.js +2 -2
- package/transfer/List.js +2 -2
- package/transfer/index.js +2 -2
- package/tree/Animation.js +3 -3
- package/tree/Node.js +3 -3
- package/tree/NodeList.js +2 -2
- package/tree/Tree.js +3 -3
- package/tree/index.js +1 -1
- package/tree-select/Select.js +25 -25
- package/trigger/getPopupStyle.js +2 -2
- package/trigger/index.js +7 -6
- package/types/badge/interface.d.ts +1 -0
- package/types/color-picker/colors.d.ts +1 -1
- package/types/date-picker/util.d.ts +1 -1
- package/types/drawer/interface.d.ts +10 -0
- package/types/index.d.ts +0 -7
- package/types/modal/Confirm.d.ts +1 -0
- package/types/utils/PqbCSSTransition.d.ts +3 -0
- package/types/utils/caseName.d.ts +1 -0
- package/types/utils/className.d.ts +1 -0
- package/types/utils/color.d.ts +1 -0
- package/types/utils/computeScrollIntoView.d.ts +1 -0
- package/types/utils/contextHolder.d.ts +1 -0
- package/types/utils/copy.d.ts +1 -0
- package/types/utils/fileToURL.d.ts +1 -0
- package/types/utils/fillNBSP.d.ts +1 -0
- package/types/utils/getHighlightText.d.ts +1 -0
- package/types/utils/getHotkeyHandler.d.ts +1 -0
- package/types/utils/getStringLength.d.ts +1 -0
- package/types/utils/include.d.ts +1 -0
- package/types/utils/index.d.ts +29 -25
- package/types/utils/is.d.ts +1 -1
- package/types/utils/keyboardCode.d.ts +1 -0
- package/types/utils/math.d.ts +1 -0
- package/types/utils/mergeProps.d.ts +1 -0
- package/types/utils/mergedToString.d.ts +1 -0
- package/types/utils/names.d.ts +497 -81
- package/types/utils/omit.d.ts +1 -0
- package/types/utils/pick.d.ts +1 -1
- package/types/utils/reactTransitionGroup.d.ts +1 -0
- package/types/utils/responsiveObserve.d.ts +1 -0
- package/types/utils/saveAs.d.ts +1 -0
- package/types/utils/screenfull.d.ts +1 -0
- package/types/utils/scrollIntoView.d.ts +1 -0
- package/types/utils/tinycolor.d.ts +1 -0
- package/types/utils/tree.d.ts +1 -0
- package/types/utils/tween.d.ts +1 -0
- package/types/utils/uuid.d.ts +1 -0
- package/types/utils/validate.d.ts +1 -0
- package/types/version/index.d.ts +1 -1
- package/typography/Base.js +6 -5
- package/typography/Ellipsis.js +30 -29
- package/typography/Paragraph.js +1 -1
- package/typography/Typography.js +1 -1
- package/typography/index.js +28 -27
- package/upload/TriggerNode.js +1 -1
- package/upload/Upload.js +60 -58
- package/upload/Uploader.js +21 -21
- package/upload/request_.js +4 -3
- package/utils/PqbCSSTransition.js +5 -0
- package/utils/caseName.js +3 -2
- package/utils/className.js +3 -2
- package/{chunk/B6X4lnd0.js → utils/color.js} +55 -53
- package/utils/computeScrollIntoView.js +128 -0
- package/utils/contextHolder.js +3 -2
- package/utils/copy.js +4 -2
- package/utils/fileToURL.js +3 -2
- package/utils/fillNBSP.js +2 -1
- package/utils/getHighlightText.js +2 -1
- package/utils/getHotkeyHandler.js +2 -1
- package/utils/getStringLength.js +2 -1
- package/utils/include.js +2 -1
- package/utils/index.js +302 -249
- package/utils/is.js +104 -101
- package/utils/keyboardCode.js +2 -1
- package/utils/math.js +35 -0
- package/utils/mergeProps.js +2 -1
- package/utils/mergedToString.js +2 -1
- package/utils/names.js +332 -81
- package/utils/omit.js +2 -1
- package/utils/pick.js +1 -0
- package/utils/react19Adapter.js +1 -1
- package/utils/reactDOM.js +1 -1
- package/utils/reactTransitionGroup.js +10 -0
- package/utils/responsiveObserve.js +2 -1
- package/utils/saveAs.js +3 -2
- package/utils/screenfull.js +2 -1
- package/utils/scrollIntoView.js +4 -2
- package/utils/tinycolor.js +30 -0
- package/utils/tree.js +87 -0
- package/utils/tween.js +6 -0
- package/utils/uuid.js +5 -0
- package/utils/validate.js +7 -0
- package/verification-code/VerificationCode.js +1 -1
- package/version/index.js +3 -3
- package/virtual-list/VirtualList.js +1 -1
- package/watermark/Watermark.js +1 -1
- package/chunk/BibHFOCF.js +0 -34
- package/chunk/CVYWxu00.js +0 -155
- package/chunk/CZWGeRVA.js +0 -715
- package/chunk/CbLaCJmG.js +0 -26
- package/chunk/D-TPB2Do.js +0 -56
- package/chunk/Dm1NCTkX.js +0 -629
- package/chunk/EHx6bIK_.js +0 -98
- package/types/utils/CSSTransition.d.ts +0 -2
- package/utils/CSSTransition.js +0 -4
package/chunk/BibHFOCF.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { _ as u } from "./yl4BU7Sd.js";
|
|
2
|
-
function r(t, n) {
|
|
3
|
-
return new u(t).plus(n).toNumber();
|
|
4
|
-
}
|
|
5
|
-
function e(t, n) {
|
|
6
|
-
return new u(t).minus(n).toNumber();
|
|
7
|
-
}
|
|
8
|
-
function i(t, n) {
|
|
9
|
-
return new u(t).times(n).toNumber();
|
|
10
|
-
}
|
|
11
|
-
function o(t, n) {
|
|
12
|
-
return new u(t).div(n).toNumber();
|
|
13
|
-
}
|
|
14
|
-
const m = r, s = e, c = i, d = o, f = {
|
|
15
|
-
plus: r,
|
|
16
|
-
minus: e,
|
|
17
|
-
times: i,
|
|
18
|
-
div: o,
|
|
19
|
-
add: m,
|
|
20
|
-
subtract: s,
|
|
21
|
-
multiply: c,
|
|
22
|
-
divide: d
|
|
23
|
-
};
|
|
24
|
-
export {
|
|
25
|
-
c,
|
|
26
|
-
d,
|
|
27
|
-
e as i,
|
|
28
|
-
f as l,
|
|
29
|
-
s as m,
|
|
30
|
-
i as o,
|
|
31
|
-
o as r,
|
|
32
|
-
m as s,
|
|
33
|
-
r as u
|
|
34
|
-
};
|
package/chunk/CVYWxu00.js
DELETED
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
const _ = (t) => typeof t == "object" && t != null && t.nodeType === 1, $ = (t, e) => e && t === "hidden" ? !1 : t !== "visible" && t !== "clip", ot = (t) => {
|
|
2
|
-
if (!t.ownerDocument || !t.ownerDocument.defaultView)
|
|
3
|
-
return null;
|
|
4
|
-
try {
|
|
5
|
-
return t.ownerDocument.defaultView.frameElement;
|
|
6
|
-
} catch {
|
|
7
|
-
return null;
|
|
8
|
-
}
|
|
9
|
-
}, nt = (t) => {
|
|
10
|
-
const e = ot(t);
|
|
11
|
-
return e ? e.clientHeight < t.scrollHeight || e.clientWidth < t.scrollWidth : !1;
|
|
12
|
-
}, j = (t, e) => {
|
|
13
|
-
if (t.clientHeight < t.scrollHeight || t.clientWidth < t.scrollWidth) {
|
|
14
|
-
const l = getComputedStyle(t, null);
|
|
15
|
-
return $(l.overflowY, e) || $(l.overflowX, e) || nt(t);
|
|
16
|
-
}
|
|
17
|
-
return !1;
|
|
18
|
-
}, L = (t, e, l, h, u, n, r, d) => n < t && r > e || n > t && r < e ? 0 : n <= t && d <= l || r >= e && d >= l ? n - t - h : r > e && d < l || n < t && d > l ? r - e + u : 0, rt = (t) => t.parentElement ?? (t.getRootNode().host || null), lt = (t) => {
|
|
19
|
-
const e = window.getComputedStyle(t);
|
|
20
|
-
return {
|
|
21
|
-
top: parseFloat(e.scrollMarginTop) || 0,
|
|
22
|
-
right: parseFloat(e.scrollMarginRight) || 0,
|
|
23
|
-
bottom: parseFloat(e.scrollMarginBottom) || 0,
|
|
24
|
-
left: parseFloat(e.scrollMarginLeft) || 0
|
|
25
|
-
};
|
|
26
|
-
}, tt = (t, e) => {
|
|
27
|
-
var l, h;
|
|
28
|
-
if (typeof document > "u")
|
|
29
|
-
return [];
|
|
30
|
-
const { scrollMode: u, block: n, inline: r, boundary: d, skipOverflowHiddenElements: V } = e, et = typeof d == "function" ? d : (W) => W !== d;
|
|
31
|
-
if (!_(t))
|
|
32
|
-
throw new TypeError("Invalid target");
|
|
33
|
-
const D = document.scrollingElement || document.documentElement, v = [];
|
|
34
|
-
let a = t;
|
|
35
|
-
for (; _(a) && et(a); ) {
|
|
36
|
-
if (a = rt(a), a === D) {
|
|
37
|
-
v.push(a);
|
|
38
|
-
break;
|
|
39
|
-
}
|
|
40
|
-
a != null && a === document.body && j(a) && !j(document.documentElement) || a != null && j(a, V) && v.push(a);
|
|
41
|
-
}
|
|
42
|
-
const p = ((l = window.visualViewport) == null ? void 0 : l.width) ?? innerWidth, g = ((h = window.visualViewport) == null ? void 0 : h.height) ?? innerHeight, { scrollX: m, scrollY: b } = window, {
|
|
43
|
-
height: w,
|
|
44
|
-
width: y,
|
|
45
|
-
top: M,
|
|
46
|
-
right: O,
|
|
47
|
-
bottom: X,
|
|
48
|
-
left: H
|
|
49
|
-
} = t.getBoundingClientRect(), {
|
|
50
|
-
top: J,
|
|
51
|
-
right: K,
|
|
52
|
-
bottom: P,
|
|
53
|
-
left: Q
|
|
54
|
-
} = lt(t);
|
|
55
|
-
let c = n === "start" || n === "nearest" ? M - J : n === "end" ? X + P : M + w / 2 - J + P, f = r === "center" ? H + y / 2 - Q + K : r === "end" ? O + K : H - Q;
|
|
56
|
-
const Y = [];
|
|
57
|
-
for (let W = 0; W < v.length; W++) {
|
|
58
|
-
const o = v[W], { height: F, width: C, top: E, right: q, bottom: z, left: R } = o.getBoundingClientRect();
|
|
59
|
-
if (u === "if-needed" && M >= 0 && H >= 0 && X <= g && O <= p && // scrollingElement is added to the frames array even if it's not scrollable, in which case checking its bounds is not required
|
|
60
|
-
(o === D && !j(o) || M >= E && X <= z && H >= R && O <= q))
|
|
61
|
-
return Y;
|
|
62
|
-
const k = getComputedStyle(o), N = parseInt(k.borderLeftWidth, 10), T = parseInt(k.borderTopWidth, 10), x = parseInt(k.borderRightWidth, 10), B = parseInt(k.borderBottomWidth, 10);
|
|
63
|
-
let i = 0, s = 0;
|
|
64
|
-
const I = "offsetWidth" in o ? o.offsetWidth - o.clientWidth - N - x : 0, S = "offsetHeight" in o ? o.offsetHeight - o.clientHeight - T - B : 0, A = "offsetWidth" in o ? o.offsetWidth === 0 ? 0 : C / o.offsetWidth : 0, G = "offsetHeight" in o ? o.offsetHeight === 0 ? 0 : F / o.offsetHeight : 0;
|
|
65
|
-
if (D === o)
|
|
66
|
-
n === "start" ? i = c : n === "end" ? i = c - g : n === "nearest" ? i = L(
|
|
67
|
-
b,
|
|
68
|
-
b + g,
|
|
69
|
-
g,
|
|
70
|
-
T,
|
|
71
|
-
B,
|
|
72
|
-
b + c,
|
|
73
|
-
b + c + w,
|
|
74
|
-
w
|
|
75
|
-
) : i = c - g / 2, r === "start" ? s = f : r === "center" ? s = f - p / 2 : r === "end" ? s = f - p : s = L(
|
|
76
|
-
m,
|
|
77
|
-
m + p,
|
|
78
|
-
p,
|
|
79
|
-
N,
|
|
80
|
-
x,
|
|
81
|
-
m + f,
|
|
82
|
-
m + f + y,
|
|
83
|
-
y
|
|
84
|
-
), i = Math.max(0, i + b), s = Math.max(0, s + m);
|
|
85
|
-
else {
|
|
86
|
-
n === "start" ? i = c - E - T : n === "end" ? i = c - z + B + S : n === "nearest" ? i = L(
|
|
87
|
-
E,
|
|
88
|
-
z,
|
|
89
|
-
F,
|
|
90
|
-
T,
|
|
91
|
-
B + S,
|
|
92
|
-
c,
|
|
93
|
-
c + w,
|
|
94
|
-
w
|
|
95
|
-
) : i = c - (E + F / 2) + S / 2, r === "start" ? s = f - R - N : r === "center" ? s = f - (R + C / 2) + I / 2 : r === "end" ? s = f - q + x + I : s = L(
|
|
96
|
-
R,
|
|
97
|
-
q,
|
|
98
|
-
C,
|
|
99
|
-
N,
|
|
100
|
-
x + I,
|
|
101
|
-
f,
|
|
102
|
-
f + y,
|
|
103
|
-
y
|
|
104
|
-
);
|
|
105
|
-
const { scrollLeft: U, scrollTop: Z } = o;
|
|
106
|
-
i = G === 0 ? 0 : Math.max(
|
|
107
|
-
0,
|
|
108
|
-
Math.min(
|
|
109
|
-
Z + i / G,
|
|
110
|
-
o.scrollHeight - F / G + S
|
|
111
|
-
)
|
|
112
|
-
), s = A === 0 ? 0 : Math.max(
|
|
113
|
-
0,
|
|
114
|
-
Math.min(
|
|
115
|
-
U + s / A,
|
|
116
|
-
o.scrollWidth - C / A + I
|
|
117
|
-
)
|
|
118
|
-
), c += Z - i, f += U - s;
|
|
119
|
-
}
|
|
120
|
-
Y.push({ el: o, top: i, left: s });
|
|
121
|
-
}
|
|
122
|
-
return Y;
|
|
123
|
-
}, it = (t) => t === Object(t) && Object.keys(t).length !== 0, st = (t) => typeof t == "object" ? typeof t.behavior == "function" : !1, at = (t) => t === !1 ? { block: "end", inline: "nearest" } : it(t) ? t : { block: "start", inline: "nearest" }, ct = (t) => {
|
|
124
|
-
const e = window.getComputedStyle(t);
|
|
125
|
-
return {
|
|
126
|
-
top: parseFloat(e.scrollMarginTop) || 0,
|
|
127
|
-
right: parseFloat(e.scrollMarginRight) || 0,
|
|
128
|
-
bottom: parseFloat(e.scrollMarginBottom) || 0,
|
|
129
|
-
left: parseFloat(e.scrollMarginLeft) || 0
|
|
130
|
-
};
|
|
131
|
-
}, ft = (t) => {
|
|
132
|
-
let e = t;
|
|
133
|
-
for (; e && e.parentNode; ) {
|
|
134
|
-
if (e.parentNode === document)
|
|
135
|
-
return !0;
|
|
136
|
-
e.parentNode instanceof ShadowRoot ? e = e.parentNode.host : e = e.parentNode;
|
|
137
|
-
}
|
|
138
|
-
return !1;
|
|
139
|
-
};
|
|
140
|
-
function dt(t, e) {
|
|
141
|
-
if (!t.isConnected || !ft(t))
|
|
142
|
-
return;
|
|
143
|
-
const l = ct(t);
|
|
144
|
-
if (st(e))
|
|
145
|
-
return e.behavior(tt(t, e));
|
|
146
|
-
const h = typeof e == "boolean" || e == null ? void 0 : e.behavior;
|
|
147
|
-
for (const { el: u, top: n, left: r } of tt(t, at(e))) {
|
|
148
|
-
const d = n - l.top + l.bottom, V = r - l.left + l.right;
|
|
149
|
-
u.scroll({ top: d, left: V, behavior: h });
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
export {
|
|
153
|
-
tt as i,
|
|
154
|
-
dt as p
|
|
155
|
-
};
|