react-kui 3.2.0 → 3.3.0
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/ai/kui-components.json +825 -168
- package/es/_virtual/_rolldown/runtime.js +2 -3
- package/es/affix/index.js +73 -185
- package/es/alert/index.js +3 -4
- package/es/anchor/anchor-context.js +2 -3
- package/es/anchor/anchor-link.js +3 -4
- package/es/anchor/anchor.js +195 -398
- package/es/auto-complete/index.js +160 -561
- package/es/avatar/avatar-group-context.js +2 -3
- package/es/avatar/avatar-group.js +32 -124
- package/es/avatar/avatar.js +58 -159
- package/es/back-top/index.js +66 -201
- package/es/badge/index.js +4 -5
- package/es/base/teleport.js +22 -54
- package/es/base/transition-props.js +2 -3
- package/es/base/transition.js +2 -3
- package/es/breadcrumb/breadcrumb-context.js +2 -3
- package/es/breadcrumb/breadcrumb-item.js +19 -102
- package/es/breadcrumb/breadcrumb.js +10 -59
- package/es/button/button-group-context.js +2 -3
- package/es/button/button-group.js +15 -75
- package/es/button/button.js +4 -5
- package/es/calendar/index.js +4 -5
- package/es/card/index.js +4 -5
- package/es/carousel/carousel-context.js +2 -3
- package/es/carousel/carousel-item.js +3 -4
- package/es/carousel/carousel.js +281 -628
- package/es/carousel/drag.js +2 -3
- package/es/cascader/index.js +7 -8
- package/es/check-card/check-card-group.js +53 -179
- package/es/check-card/check-card.js +100 -293
- package/es/check-card/context.js +2 -3
- package/es/checkbox/checkbox-group-context.js +2 -3
- package/es/checkbox/checkbox-group.js +34 -138
- package/es/checkbox/checkbox.js +4 -5
- package/es/checkbox/index.js +2 -3
- package/es/collapse/collapse-panel.js +84 -206
- package/es/collapse/collapse.js +38 -170
- package/es/color-picker/alpha.js +44 -125
- package/es/color-picker/hue.js +39 -108
- package/es/color-picker/index.js +7 -6
- package/es/color-picker/mode.js +76 -159
- package/es/color-picker/paint.js +66 -163
- package/es/color-picker/presets.js +12 -44
- package/es/components.js +37 -32
- package/es/config/config-context.js +2 -3
- package/es/config/context.js +2 -3
- package/es/config/index.js +3 -4
- package/es/config/popup-host.js +3 -4
- package/es/config/size-context.js +2 -3
- package/es/config/use-config-appearance.js +3 -4
- package/es/const/var.js +2 -3
- package/es/date-picker/index.js +8 -9
- package/es/descriptions/descriptions-item.js +3 -4
- package/es/descriptions/descriptions.js +53 -144
- package/es/divider/index.js +2 -3
- package/es/drawer/index.js +171 -465
- package/es/dropdown/dropdown-button.js +25 -128
- package/es/dropdown/dropdown-context.js +2 -3
- package/es/dropdown/dropdown.js +56 -207
- package/es/dropdown/trigger.js +37 -125
- package/es/empty/index.js +34 -111
- package/es/feature-card/index.js +2 -3
- package/es/feedback-panel/index.js +30 -155
- package/es/flame-wrap/index.js +3 -4
- package/es/flame-wrap/types.js +2 -3
- package/es/flex/index.js +2 -3
- package/es/form/field-context.js +3 -4
- package/es/form/form-context.js +2 -3
- package/es/form/form-item.js +4 -5
- package/es/form/form.js +108 -279
- package/es/form/utils.js +2 -3
- package/es/gradient-picker/corners.js +55 -0
- package/es/gradient-picker/index.js +191 -0
- package/es/gradient-picker/stops.js +219 -0
- package/es/gradient-picker/types.js +147 -0
- package/es/grid/grid-item.js +25 -116
- package/es/grid/grid.js +40 -151
- package/es/grid/useBreakpoint.js +3 -4
- package/es/icon/index.js +24 -126
- package/es/image/group.js +3 -4
- package/es/image/image-group-context.js +2 -3
- package/es/image/image.js +5 -6
- package/es/image/instance.js +2 -3
- package/es/image/preview.js +4 -5
- package/es/image/utils.js +2 -3
- package/es/index.js +5 -4
- package/es/input/index.js +2 -3
- package/es/input/input-base.js +4 -5
- package/es/input/input-box.js +2 -3
- package/es/input/input-group.js +4 -5
- package/es/input/input.js +3 -4
- package/es/input/textarea.js +3 -4
- package/es/input-number/drag.js +63 -0
- package/es/input-number/index.js +41 -11
- package/es/input-otp/index.js +3 -4
- package/es/input-tag/index.js +5 -6
- package/es/kanban/index.js +31 -168
- package/es/layout/index.js +43 -215
- package/es/layout/layout-context.js +2 -3
- package/es/list-panel/index.js +47 -185
- package/es/loading/index.js +2 -3
- package/es/loading/loading-bar.js +54 -114
- package/es/locale/de.js +2 -3
- package/es/locale/el.js +2 -3
- package/es/locale/en.js +2 -3
- package/es/locale/fr.js +2 -3
- package/es/locale/it.js +2 -3
- package/es/locale/ja.js +2 -3
- package/es/locale/ko.js +2 -3
- package/es/locale/ru.js +2 -3
- package/es/locale/th.js +2 -3
- package/es/locale/uk.js +2 -3
- package/es/locale/vi.js +2 -3
- package/es/locale/zh-CN.js +2 -3
- package/es/locale/zh-TW.js +2 -3
- package/es/mentions/index.js +214 -581
- package/es/menu/menu-context.js +2 -3
- package/es/menu/menu-divider.js +3 -4
- package/es/menu/menu-group.js +3 -4
- package/es/menu/menu-item.js +2 -3
- package/es/menu/menu-keyboard.js +2 -3
- package/es/menu/menu.js +184 -442
- package/es/menu/recursive-menu.js +3 -4
- package/es/menu/sub-menu.js +5 -6
- package/es/message/index.js +2 -3
- package/es/modal/api.js +2 -3
- package/es/modal/modal.js +263 -599
- package/es/modal/toast.js +63 -179
- package/es/node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js +2 -3
- package/es/notice/container.js +2 -3
- package/es/notice/content.js +4 -5
- package/es/notice/index.js +2 -3
- package/es/notice/instance.js +2 -3
- package/es/page/index.js +4 -5
- package/es/page/responsive.js +2 -3
- package/es/page-header/index.js +3 -4
- package/es/popconfirm/index.js +24 -70
- package/es/poptip/index.js +29 -88
- package/es/popup/index.js +8 -6
- package/es/popup/layers.js +2 -3
- package/es/progress/index.js +95 -229
- package/es/qrcode/index.js +3 -4
- package/es/radio/radio-button.js +37 -131
- package/es/radio/radio-group-context.js +2 -3
- package/es/radio/radio-group.js +69 -223
- package/es/radio/radio.js +3 -4
- package/es/rate/index.js +68 -226
- package/es/rate/star.js +38 -129
- package/es/result/index.js +35 -127
- package/es/ripple/index.js +3 -4
- package/es/ripple/types.js +2 -3
- package/es/row-col/col.js +59 -149
- package/es/row-col/row.js +2 -3
- package/es/segmented/index.js +72 -196
- package/es/select/option.js +23 -116
- package/es/select/select.js +9 -10
- package/es/skeleton/skeleton-avatar.js +2 -3
- package/es/skeleton/skeleton-button.js +2 -3
- package/es/skeleton/skeleton-image.js +28 -108
- package/es/skeleton/skeleton-text.js +17 -93
- package/es/skeleton/skeleton.js +46 -133
- package/es/skeleton/use-skeleton-loading.js +3 -4
- package/es/slider/index.js +92 -286
- package/es/slider/thumb.js +43 -133
- package/es/space/index.js +3 -4
- package/es/spin/index.js +2 -3
- package/es/splitter/splitter-panel.js +3 -4
- package/es/splitter/splitter.js +77 -219
- package/es/stat-card/countup.js +46 -141
- package/es/stat-card/rollup.js +27 -105
- package/es/stat-card/stat-card.js +3 -4
- package/es/stat-card/stat-number.js +26 -113
- package/es/stat-card/utils/countup.js +2 -3
- package/es/stat-card/utils/odometer.js +2 -3
- package/es/stat-card/utils/stat-item-key.js +2 -3
- package/es/steps/index.js +45 -123
- package/es/switch/index.js +4 -5
- package/es/table/column-setting.js +43 -139
- package/es/table/index.js +25 -15
- package/es/table/utils.js +3 -5
- package/es/tabs/tab-panel.js +19 -71
- package/es/tabs/tabs.js +6 -7
- package/es/tag/index.js +4 -5
- package/es/time-line/timeline-item.js +3 -4
- package/es/time-line/timeline.js +8 -44
- package/es/tooltip/index.js +41 -142
- package/es/tour/index.js +138 -356
- package/es/transfer/index.js +184 -487
- package/es/tree/index.js +8 -9
- package/es/tree/utils.js +2 -3
- package/es/tree-select/index.js +8 -9
- package/es/typography/index.js +75 -306
- package/es/upload/file-list.js +95 -119
- package/es/upload/index.js +8 -9
- package/es/upload/picture-sort.js +2 -3
- package/es/upload/selector.js +63 -193
- package/es/utils/checked.js +2 -3
- package/es/utils/color.js +2 -3
- package/es/utils/css.js +2 -3
- package/es/utils/focus.js +2 -3
- package/es/utils/number.js +2 -3
- package/es/utils/overlay-order.js +2 -3
- package/es/utils/overlay-stack.js +3 -4
- package/es/utils/placement.js +16 -4
- package/es/utils/popup-arrow.js +45 -0
- package/es/utils/popup.js +2 -3
- package/es/utils/promise.js +2 -3
- package/es/utils/react-node.js +2 -3
- package/es/utils/selection-tags.js +2 -3
- package/es/utils/share.js +2 -3
- package/es/utils/theme.js +2 -3
- package/es/utils/transition.js +2 -3
- package/es/utils/use-value.js +3 -4
- package/es/virtual-list/index.js +49 -187
- package/es/virtual-list/range.js +2 -3
- package/es/watermark/index.js +149 -289
- package/lib/index.cjs +2 -2
- package/lib/locale/de.cjs +1 -1
- package/lib/locale/el.cjs +1 -1
- package/lib/locale/en.cjs +1 -1
- package/lib/locale/fr.cjs +1 -1
- package/lib/locale/it.cjs +1 -1
- package/lib/locale/ja.cjs +1 -1
- package/lib/locale/ko.cjs +1 -1
- package/lib/locale/ru.cjs +1 -1
- package/lib/locale/th.cjs +1 -1
- package/lib/locale/uk.cjs +1 -1
- package/lib/locale/vi.cjs +1 -1
- package/lib/locale/zh-CN.cjs +1 -1
- package/lib/locale/zh-TW.cjs +1 -1
- package/package.json +24 -24
- package/style/base.css +1 -1
- package/style/components.css +2 -2
- package/style/index.css +2 -2
- package/style/theme.css +1 -1
- package/types/affix/index.d.cts +1 -1
- package/types/affix/index.d.ts +1 -1
- package/types/anchor/anchor-link.d.cts +1 -1
- package/types/anchor/anchor-link.d.ts +1 -1
- package/types/anchor/anchor.d.cts +1 -1
- package/types/anchor/anchor.d.ts +1 -1
- package/types/back-top/index.d.cts +1 -1
- package/types/back-top/index.d.ts +1 -1
- package/types/carousel/carousel-item.d.cts +1 -1
- package/types/carousel/carousel-item.d.ts +1 -1
- package/types/cascader/index.d.cts +1 -1
- package/types/cascader/index.d.ts +1 -1
- package/types/color-picker/alpha.d.cts +1 -1
- package/types/color-picker/alpha.d.ts +1 -1
- package/types/color-picker/hue.d.cts +1 -1
- package/types/color-picker/hue.d.ts +1 -1
- package/types/color-picker/index.d.cts +3 -2
- package/types/color-picker/index.d.ts +3 -2
- package/types/color-picker/mode.d.cts +1 -1
- package/types/color-picker/mode.d.ts +1 -1
- package/types/color-picker/paint.d.cts +1 -1
- package/types/color-picker/paint.d.ts +1 -1
- package/types/color-picker/presets.d.cts +1 -1
- package/types/color-picker/presets.d.ts +1 -1
- package/types/components.d.cts +3 -0
- package/types/components.d.ts +3 -0
- package/types/date-picker/index.d.cts +2 -2
- package/types/date-picker/index.d.ts +2 -2
- package/types/feature-card/index.d.cts +1 -1
- package/types/feature-card/index.d.ts +1 -1
- package/types/feedback-panel/index.d.cts +1 -1
- package/types/feedback-panel/index.d.ts +1 -1
- package/types/flame-wrap/index.d.cts +1 -1
- package/types/flame-wrap/index.d.ts +1 -1
- package/types/form/form-item.d.cts +1 -1
- package/types/form/form-item.d.ts +1 -1
- package/types/gradient-picker/corners.d.cts +8 -0
- package/types/gradient-picker/corners.d.ts +8 -0
- package/types/gradient-picker/index.d.cts +25 -0
- package/types/gradient-picker/index.d.ts +25 -0
- package/types/gradient-picker/stops.d.cts +12 -0
- package/types/gradient-picker/stops.d.ts +12 -0
- package/types/gradient-picker/types.d.cts +34 -0
- package/types/gradient-picker/types.d.ts +34 -0
- package/types/grid/grid-item.d.cts +1 -1
- package/types/grid/grid-item.d.ts +1 -1
- package/types/grid/grid.d.cts +1 -1
- package/types/grid/grid.d.ts +1 -1
- package/types/image/group.d.cts +1 -1
- package/types/image/group.d.ts +1 -1
- package/types/input-number/drag.d.cts +9 -0
- package/types/input-number/drag.d.ts +9 -0
- package/types/input-number/index.d.cts +1 -0
- package/types/input-number/index.d.ts +1 -0
- package/types/kanban/index.d.cts +1 -1
- package/types/kanban/index.d.ts +1 -1
- package/types/list-panel/index.d.cts +1 -1
- package/types/list-panel/index.d.ts +1 -1
- package/types/loading/loading-bar.d.cts +1 -1
- package/types/loading/loading-bar.d.ts +1 -1
- package/types/modal/toast.d.cts +1 -1
- package/types/modal/toast.d.ts +1 -1
- package/types/notice/content.d.cts +2 -2
- package/types/notice/content.d.ts +2 -2
- package/types/page-header/index.d.cts +1 -1
- package/types/page-header/index.d.ts +1 -1
- package/types/popconfirm/index.d.cts +1 -0
- package/types/popconfirm/index.d.ts +1 -0
- package/types/poptip/index.d.cts +1 -0
- package/types/poptip/index.d.ts +1 -0
- package/types/popup/index.d.cts +1 -0
- package/types/popup/index.d.ts +1 -0
- package/types/result/index.d.cts +1 -1
- package/types/result/index.d.ts +1 -1
- package/types/ripple/index.d.cts +1 -1
- package/types/ripple/index.d.ts +1 -1
- package/types/segmented/index.d.cts +2 -1
- package/types/segmented/index.d.ts +2 -1
- package/types/slider/index.d.cts +1 -1
- package/types/slider/index.d.ts +1 -1
- package/types/splitter/splitter-panel.d.cts +1 -1
- package/types/splitter/splitter-panel.d.ts +1 -1
- package/types/splitter/splitter.d.cts +1 -1
- package/types/splitter/splitter.d.ts +1 -1
- package/types/stat-card/countup.d.cts +1 -1
- package/types/stat-card/countup.d.ts +1 -1
- package/types/stat-card/rollup.d.cts +1 -1
- package/types/stat-card/rollup.d.ts +1 -1
- package/types/stat-card/stat-card.d.cts +1 -1
- package/types/stat-card/stat-card.d.ts +1 -1
- package/types/stat-card/stat-number.d.cts +1 -1
- package/types/stat-card/stat-number.d.ts +1 -1
- package/types/table/column-setting.d.cts +1 -1
- package/types/table/column-setting.d.ts +1 -1
- package/types/table/index.d.cts +1 -1
- package/types/table/index.d.ts +1 -1
- package/types/time-line/timeline-item.d.cts +1 -1
- package/types/time-line/timeline-item.d.ts +1 -1
- package/types/time-line/timeline.d.cts +1 -1
- package/types/time-line/timeline.d.ts +1 -1
- package/types/tooltip/index.d.cts +1 -0
- package/types/tooltip/index.d.ts +1 -0
- package/types/transfer/index.d.cts +1 -1
- package/types/transfer/index.d.ts +1 -1
- package/types/tree-select/index.d.cts +1 -1
- package/types/tree-select/index.d.ts +1 -1
- package/types/upload/file-list.d.cts +1 -1
- package/types/upload/file-list.d.ts +1 -1
- package/types/upload/selector.d.cts +1 -1
- package/types/upload/selector.d.ts +1 -1
- package/types/utils/placement.d.cts +2 -1
- package/types/utils/placement.d.ts +2 -1
- package/types/utils/popup-arrow.d.cts +5 -0
- package/types/utils/popup-arrow.d.ts +5 -0
- package/types/utils/selection-tags.d.cts +1 -1
- package/types/utils/selection-tags.d.ts +1 -1
- package/types/watermark/index.d.cts +1 -1
- package/types/watermark/index.d.ts +1 -1
package/es/drawer/index.js
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* react-kui v3.
|
|
2
|
+
* react-kui v3.3.0
|
|
3
3
|
* Copyright 2017-present, kui-react.
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
* Homepage: https://react.k-ui.cn
|
|
6
6
|
* Author: Qiu / https://chuchur.com
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { X } from "../node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js";
|
|
10
10
|
import Teleport from "../base/teleport.js";
|
|
11
11
|
import { Transition } from "../base/transition.js";
|
|
12
|
-
import { PopupHostContext, usePopupHostScope } from "../config/popup-host.js";
|
|
13
|
-
import { toggleContainerScroll } from "../utils/react-node.js";
|
|
14
|
-
import { X } from "../node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js";
|
|
15
|
-
import { useValue } from "../utils/use-value.js";
|
|
16
12
|
import Button from "../button/button.js";
|
|
13
|
+
import { ConfigContext, DEFAULT_LOCALE } from "../config/config-context.js";
|
|
14
|
+
import { PopupHostContext, usePopupHostScope } from "../config/popup-host.js";
|
|
17
15
|
import { toCssLength } from "../utils/css.js";
|
|
18
16
|
import { pushOverlay } from "../utils/overlay-stack.js";
|
|
19
|
-
import {
|
|
17
|
+
import { toggleContainerScroll } from "../utils/react-node.js";
|
|
18
|
+
import { useValue } from "../utils/use-value.js";
|
|
20
19
|
import clsx from "clsx";
|
|
21
|
-
import { useContext, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
20
|
+
import { useCallback, useContext, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
22
21
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
23
|
-
|
|
22
|
+
// components/drawer/index.tsx
|
|
24
23
|
var getBody = () => document.body;
|
|
25
24
|
var ensurePositioningContext = (element) => {
|
|
26
25
|
if (element === document.body) return;
|
|
@@ -32,23 +31,10 @@ var ensurePositioningContext = (element) => {
|
|
|
32
31
|
if (element.style.position === "relative") element.style.position = position;
|
|
33
32
|
};
|
|
34
33
|
};
|
|
35
|
-
var Drawer = (
|
|
36
|
-
const $ = c(112);
|
|
37
|
-
const { open, title, width: t1, height: t2, okText, cancelText, placement: t3, closable: t4, footer: t5, maskClosable: t6, target: t7, mask: t8, loading: t9, escKey: t10, destroyOnClose: t11, onOk, onCancel, onClose, onOpenChange, children } = t0;
|
|
38
|
-
const width = t1 === void 0 ? 520 : t1;
|
|
39
|
-
const height = t2 === void 0 ? 520 : t2;
|
|
40
|
-
const placement = t3 === void 0 ? "right" : t3;
|
|
41
|
-
const closable = t4 === void 0 ? true : t4;
|
|
42
|
-
const footer = t5 === void 0 ? true : t5;
|
|
43
|
-
const maskClosable = t6 === void 0 ? true : t6;
|
|
44
|
-
const target = t7 === void 0 ? getBody : t7;
|
|
45
|
-
const mask = t8 === void 0 ? true : t8;
|
|
46
|
-
const loading = t9 === void 0 ? false : t9;
|
|
47
|
-
const escKey = t10 === void 0 ? true : t10;
|
|
48
|
-
const destroyOnClose = t11 === void 0 ? true : t11;
|
|
34
|
+
var Drawer = ({ open, title, width = 520, height = 520, okText, cancelText, placement = "right", closable = true, footer = true, maskClosable = true, target = getBody, mask = true, loading = false, escKey = true, destroyOnClose = true, onOk, onCancel, onClose, onOpenChange, children }) => {
|
|
49
35
|
const locale = useContext(ConfigContext)?.locale || DEFAULT_LOCALE;
|
|
50
36
|
const { register: registerHostedPopup, closeAll: closeHostedPopups } = usePopupHostScope();
|
|
51
|
-
const [innerOpen, setInnerOpen] = useValue(open,
|
|
37
|
+
const [innerOpen, setInnerOpen] = useValue(open, (next) => next ?? false);
|
|
52
38
|
const currentOpen = innerOpen;
|
|
53
39
|
const [visible, setVisible] = useState(false);
|
|
54
40
|
const [rendered, setRendered] = useState(false);
|
|
@@ -57,335 +43,138 @@ var Drawer = (t0) => {
|
|
|
57
43
|
const previousFocus = useRef(null);
|
|
58
44
|
const overlayRef = useRef(null);
|
|
59
45
|
const hideTimerRef = useRef(null);
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
const setWrapRef = t12;
|
|
70
|
-
let t13;
|
|
71
|
-
if ($[2] !== target) {
|
|
72
|
-
t13 = () => {
|
|
73
|
-
const candidate = typeof target === "function" ? target() : target;
|
|
74
|
-
if (candidate && "current" in candidate) return candidate.current;
|
|
75
|
-
return candidate ?? null;
|
|
76
|
-
};
|
|
77
|
-
$[2] = target;
|
|
78
|
-
$[3] = t13;
|
|
79
|
-
} else t13 = $[3];
|
|
80
|
-
const resolveTarget = t13;
|
|
46
|
+
const setWrapRef = useCallback((node) => {
|
|
47
|
+
wrapRef.current = node;
|
|
48
|
+
if (node && visible) node.focus();
|
|
49
|
+
}, [visible]);
|
|
50
|
+
const resolveTarget = useCallback(() => {
|
|
51
|
+
const candidate = typeof target === "function" ? target() : target;
|
|
52
|
+
if (candidate && "current" in candidate) return candidate.current;
|
|
53
|
+
return candidate ?? null;
|
|
54
|
+
}, [target]);
|
|
81
55
|
const isBody = targetEl === document.body;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
$[10] = closeHostedPopups;
|
|
135
|
-
$[11] = destroyOnClose;
|
|
136
|
-
$[12] = t17;
|
|
137
|
-
} else t17 = $[12];
|
|
138
|
-
const toggle = t17;
|
|
139
|
-
let t18;
|
|
140
|
-
let t19;
|
|
141
|
-
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
142
|
-
t18 = () => cancelHide;
|
|
143
|
-
t19 = [cancelHide];
|
|
144
|
-
$[13] = t18;
|
|
145
|
-
$[14] = t19;
|
|
146
|
-
} else {
|
|
147
|
-
t18 = $[13];
|
|
148
|
-
t19 = $[14];
|
|
149
|
-
}
|
|
150
|
-
useEffect(t18, t19);
|
|
151
|
-
let t20;
|
|
152
|
-
if ($[15] !== onOpenChange || $[16] !== setInnerOpen) {
|
|
153
|
-
t20 = (next_0) => {
|
|
154
|
-
setInnerOpen(next_0);
|
|
155
|
-
onOpenChange?.(next_0);
|
|
156
|
-
};
|
|
157
|
-
$[15] = onOpenChange;
|
|
158
|
-
$[16] = setInnerOpen;
|
|
159
|
-
$[17] = t20;
|
|
160
|
-
} else t20 = $[17];
|
|
161
|
-
const requestOpen = t20;
|
|
162
|
-
let t21;
|
|
163
|
-
if ($[18] !== onClose || $[19] !== requestOpen) {
|
|
164
|
-
t21 = () => {
|
|
165
|
-
requestOpen(false);
|
|
166
|
-
onClose?.();
|
|
167
|
-
};
|
|
168
|
-
$[18] = onClose;
|
|
169
|
-
$[19] = requestOpen;
|
|
170
|
-
$[20] = t21;
|
|
171
|
-
} else t21 = $[20];
|
|
172
|
-
const close = t21;
|
|
173
|
-
let t22;
|
|
174
|
-
let t23;
|
|
175
|
-
if ($[21] !== rendered || $[22] !== visible) {
|
|
176
|
-
t22 = () => {
|
|
177
|
-
if (!rendered || !visible) return;
|
|
178
|
-
const handle = pushOverlay();
|
|
179
|
-
overlayRef.current = handle;
|
|
180
|
-
return () => {
|
|
181
|
-
handle.release();
|
|
182
|
-
if (overlayRef.current === handle) overlayRef.current = null;
|
|
183
|
-
};
|
|
184
|
-
};
|
|
185
|
-
t23 = [rendered, visible];
|
|
186
|
-
$[21] = rendered;
|
|
187
|
-
$[22] = visible;
|
|
188
|
-
$[23] = t22;
|
|
189
|
-
$[24] = t23;
|
|
190
|
-
} else {
|
|
191
|
-
t22 = $[23];
|
|
192
|
-
t23 = $[24];
|
|
193
|
-
}
|
|
194
|
-
useEffect(t22, t23);
|
|
195
|
-
let t24;
|
|
196
|
-
if ($[25] !== close || $[26] !== visible) {
|
|
197
|
-
t24 = (e) => {
|
|
198
|
-
if (e.key !== "Escape" || e.defaultPrevented) return;
|
|
199
|
-
if (!visible) return;
|
|
200
|
-
if (!overlayRef.current?.isTop()) return;
|
|
201
|
-
close();
|
|
202
|
-
};
|
|
203
|
-
$[25] = close;
|
|
204
|
-
$[26] = visible;
|
|
205
|
-
$[27] = t24;
|
|
206
|
-
} else t24 = $[27];
|
|
207
|
-
const escToClose = t24;
|
|
208
|
-
let t25;
|
|
209
|
-
let t26;
|
|
210
|
-
if ($[28] !== currentOpen || $[29] !== targetEl || $[30] !== toggle) {
|
|
211
|
-
t25 = () => {
|
|
212
|
-
if (currentOpen && !targetEl) return;
|
|
213
|
-
const timer = setTimeout(() => toggle(currentOpen), 0);
|
|
214
|
-
return () => clearTimeout(timer);
|
|
215
|
-
};
|
|
216
|
-
t26 = [
|
|
217
|
-
currentOpen,
|
|
218
|
-
targetEl,
|
|
219
|
-
toggle
|
|
220
|
-
];
|
|
221
|
-
$[28] = currentOpen;
|
|
222
|
-
$[29] = targetEl;
|
|
223
|
-
$[30] = toggle;
|
|
224
|
-
$[31] = t25;
|
|
225
|
-
$[32] = t26;
|
|
226
|
-
} else {
|
|
227
|
-
t25 = $[31];
|
|
228
|
-
t26 = $[32];
|
|
229
|
-
}
|
|
230
|
-
useEffect(t25, t26);
|
|
231
|
-
let t27;
|
|
232
|
-
let t28;
|
|
233
|
-
if ($[33] !== escKey || $[34] !== escToClose) {
|
|
234
|
-
t27 = () => {
|
|
235
|
-
if (escKey) document.addEventListener("keydown", escToClose);
|
|
236
|
-
return () => {
|
|
237
|
-
if (escKey) document.removeEventListener("keydown", escToClose);
|
|
238
|
-
};
|
|
239
|
-
};
|
|
240
|
-
t28 = [escKey, escToClose];
|
|
241
|
-
$[33] = escKey;
|
|
242
|
-
$[34] = escToClose;
|
|
243
|
-
$[35] = t27;
|
|
244
|
-
$[36] = t28;
|
|
245
|
-
} else {
|
|
246
|
-
t27 = $[35];
|
|
247
|
-
t28 = $[36];
|
|
248
|
-
}
|
|
249
|
-
useEffect(t27, t28);
|
|
250
|
-
let t29;
|
|
251
|
-
let t30;
|
|
252
|
-
if ($[37] !== currentOpen || $[38] !== targetEl) {
|
|
253
|
-
t29 = () => {
|
|
254
|
-
if (!targetEl) return;
|
|
255
|
-
toggleContainerScroll(targetEl, currentOpen);
|
|
256
|
-
return () => toggleContainerScroll(targetEl, false);
|
|
257
|
-
};
|
|
258
|
-
t30 = [currentOpen, targetEl];
|
|
259
|
-
$[37] = currentOpen;
|
|
260
|
-
$[38] = targetEl;
|
|
261
|
-
$[39] = t29;
|
|
262
|
-
$[40] = t30;
|
|
263
|
-
} else {
|
|
264
|
-
t29 = $[39];
|
|
265
|
-
t30 = $[40];
|
|
266
|
-
}
|
|
267
|
-
useEffect(t29, t30);
|
|
268
|
-
let t31;
|
|
269
|
-
let t32;
|
|
270
|
-
if ($[41] !== rendered || $[42] !== targetEl) {
|
|
271
|
-
t31 = () => {
|
|
272
|
-
if (rendered && targetEl) return ensurePositioningContext(targetEl);
|
|
56
|
+
useLayoutEffect(() => {
|
|
57
|
+
const frame = requestAnimationFrame(() => {
|
|
58
|
+
const nextTarget = resolveTarget();
|
|
59
|
+
setTargetEl((current) => current === nextTarget ? current : nextTarget);
|
|
60
|
+
});
|
|
61
|
+
return () => cancelAnimationFrame(frame);
|
|
62
|
+
}, [currentOpen, resolveTarget]);
|
|
63
|
+
const cancelHide = useCallback(() => {
|
|
64
|
+
if (hideTimerRef.current === null) return;
|
|
65
|
+
clearTimeout(hideTimerRef.current);
|
|
66
|
+
hideTimerRef.current = null;
|
|
67
|
+
}, []);
|
|
68
|
+
const toggle = useCallback((value) => {
|
|
69
|
+
if (value) {
|
|
70
|
+
cancelHide();
|
|
71
|
+
previousFocus.current = document.activeElement;
|
|
72
|
+
setRendered(true);
|
|
73
|
+
setTimeout(() => {
|
|
74
|
+
setVisible(true);
|
|
75
|
+
wrapRef.current?.focus();
|
|
76
|
+
}, 0);
|
|
77
|
+
} else {
|
|
78
|
+
closeHostedPopups();
|
|
79
|
+
setVisible(false);
|
|
80
|
+
previousFocus.current?.focus();
|
|
81
|
+
cancelHide();
|
|
82
|
+
hideTimerRef.current = setTimeout(() => {
|
|
83
|
+
hideTimerRef.current = null;
|
|
84
|
+
if (destroyOnClose) setRendered(false);
|
|
85
|
+
}, 300);
|
|
86
|
+
}
|
|
87
|
+
}, [
|
|
88
|
+
cancelHide,
|
|
89
|
+
closeHostedPopups,
|
|
90
|
+
destroyOnClose
|
|
91
|
+
]);
|
|
92
|
+
useEffect(() => cancelHide, [cancelHide]);
|
|
93
|
+
const requestOpen = useCallback((next_0) => {
|
|
94
|
+
setInnerOpen(next_0);
|
|
95
|
+
onOpenChange?.(next_0);
|
|
96
|
+
}, [onOpenChange, setInnerOpen]);
|
|
97
|
+
const close = useCallback(() => {
|
|
98
|
+
requestOpen(false);
|
|
99
|
+
onClose?.();
|
|
100
|
+
}, [onClose, requestOpen]);
|
|
101
|
+
useEffect(() => {
|
|
102
|
+
if (!rendered || !visible) return;
|
|
103
|
+
const handle = pushOverlay();
|
|
104
|
+
overlayRef.current = handle;
|
|
105
|
+
return () => {
|
|
106
|
+
handle.release();
|
|
107
|
+
if (overlayRef.current === handle) overlayRef.current = null;
|
|
273
108
|
};
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
109
|
+
}, [rendered, visible]);
|
|
110
|
+
const escToClose = useCallback((e) => {
|
|
111
|
+
if (e.key !== "Escape" || e.defaultPrevented) return;
|
|
112
|
+
if (!visible) return;
|
|
113
|
+
if (!overlayRef.current?.isTop()) return;
|
|
114
|
+
close();
|
|
115
|
+
}, [close, visible]);
|
|
116
|
+
useEffect(() => {
|
|
117
|
+
if (currentOpen && !targetEl) return;
|
|
118
|
+
const timer = setTimeout(() => toggle(currentOpen), 0);
|
|
119
|
+
return () => clearTimeout(timer);
|
|
120
|
+
}, [
|
|
121
|
+
currentOpen,
|
|
122
|
+
targetEl,
|
|
123
|
+
toggle
|
|
124
|
+
]);
|
|
125
|
+
useEffect(() => {
|
|
126
|
+
if (escKey) document.addEventListener("keydown", escToClose);
|
|
127
|
+
return () => {
|
|
128
|
+
if (escKey) document.removeEventListener("keydown", escToClose);
|
|
289
129
|
};
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
130
|
+
}, [escKey, escToClose]);
|
|
131
|
+
useEffect(() => {
|
|
132
|
+
if (!targetEl) return;
|
|
133
|
+
toggleContainerScroll(targetEl, currentOpen);
|
|
134
|
+
return () => toggleContainerScroll(targetEl, false);
|
|
135
|
+
}, [currentOpen, targetEl]);
|
|
136
|
+
useLayoutEffect(() => {
|
|
137
|
+
if (rendered && targetEl) return ensurePositioningContext(targetEl);
|
|
138
|
+
}, [rendered, targetEl]);
|
|
139
|
+
const cancel = () => {
|
|
140
|
+
requestOpen(false);
|
|
141
|
+
onCancel?.();
|
|
142
|
+
};
|
|
143
|
+
const ok = () => onOk?.();
|
|
302
144
|
const okLabel = okText || locale?.k?.common?.ok;
|
|
303
145
|
const cancelLabel = cancelText || locale?.k?.common?.cancel;
|
|
304
146
|
const hasFooter = footer !== false && footer != null;
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
children:
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
className: "k-drawer-close",
|
|
333
|
-
size: "small",
|
|
334
|
-
type: "text",
|
|
335
|
-
onClick: close,
|
|
336
|
-
icon: X
|
|
337
|
-
}) : null;
|
|
338
|
-
$[58] = closable;
|
|
339
|
-
$[59] = close;
|
|
340
|
-
$[60] = t36;
|
|
341
|
-
} else t36 = $[60];
|
|
342
|
-
const closeNode = t36;
|
|
343
|
-
let drawerStyle;
|
|
344
|
-
if ($[61] !== height || $[62] !== placement || $[63] !== width) {
|
|
345
|
-
drawerStyle = {};
|
|
346
|
-
if (placement === "left" || placement === "right") {
|
|
347
|
-
let t37;
|
|
348
|
-
if ($[65] !== width) {
|
|
349
|
-
t37 = toCssLength(width);
|
|
350
|
-
$[65] = width;
|
|
351
|
-
$[66] = t37;
|
|
352
|
-
} else t37 = $[66];
|
|
353
|
-
drawerStyle.width = t37;
|
|
354
|
-
}
|
|
355
|
-
if (placement === "top" || placement === "bottom") {
|
|
356
|
-
let t37;
|
|
357
|
-
if ($[67] !== height) {
|
|
358
|
-
t37 = toCssLength(height);
|
|
359
|
-
$[67] = height;
|
|
360
|
-
$[68] = t37;
|
|
361
|
-
} else t37 = $[68];
|
|
362
|
-
drawerStyle.height = t37;
|
|
363
|
-
}
|
|
364
|
-
$[61] = height;
|
|
365
|
-
$[62] = placement;
|
|
366
|
-
$[63] = width;
|
|
367
|
-
$[64] = drawerStyle;
|
|
368
|
-
} else drawerStyle = $[64];
|
|
369
|
-
const t37 = `k-drawer-${placement}`;
|
|
370
|
-
const t38 = !mask;
|
|
371
|
-
let t39;
|
|
372
|
-
if ($[69] !== hasFooter || $[70] !== isBody || $[71] !== t37 || $[72] !== t38) {
|
|
373
|
-
t39 = clsx("k-drawer", t37, {
|
|
374
|
-
"k-drawer-has-footer": hasFooter,
|
|
375
|
-
"k-drawer-to-body": isBody,
|
|
376
|
-
"k-drawer-no-mask": t38
|
|
377
|
-
});
|
|
378
|
-
$[69] = hasFooter;
|
|
379
|
-
$[70] = isBody;
|
|
380
|
-
$[71] = t37;
|
|
381
|
-
$[72] = t38;
|
|
382
|
-
$[73] = t39;
|
|
383
|
-
} else t39 = $[73];
|
|
384
|
-
const classes = t39;
|
|
147
|
+
const footerNode = hasFooter ? /* @__PURE__ */ jsx("div", {
|
|
148
|
+
className: "k-drawer-footer",
|
|
149
|
+
children: footer === true ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Button, {
|
|
150
|
+
onClick: cancel,
|
|
151
|
+
children: cancelLabel
|
|
152
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
153
|
+
type: "primary",
|
|
154
|
+
onClick: ok,
|
|
155
|
+
loading,
|
|
156
|
+
children: okLabel
|
|
157
|
+
})] }) : footer
|
|
158
|
+
}) : null;
|
|
159
|
+
const closeNode = closable ? /* @__PURE__ */ jsx(Button, {
|
|
160
|
+
className: "k-drawer-close",
|
|
161
|
+
size: "small",
|
|
162
|
+
type: "text",
|
|
163
|
+
onClick: close,
|
|
164
|
+
icon: X
|
|
165
|
+
}) : null;
|
|
166
|
+
const drawerStyle = {};
|
|
167
|
+
if (placement === "left" || placement === "right") drawerStyle.width = toCssLength(width);
|
|
168
|
+
if (placement === "top" || placement === "bottom") drawerStyle.height = toCssLength(height);
|
|
169
|
+
const classes = clsx("k-drawer", `k-drawer-${placement}`, {
|
|
170
|
+
"k-drawer-has-footer": hasFooter,
|
|
171
|
+
"k-drawer-to-body": isBody,
|
|
172
|
+
"k-drawer-no-mask": !mask
|
|
173
|
+
});
|
|
385
174
|
if (!rendered || !targetEl) return null;
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
175
|
+
const drawerEl = /* @__PURE__ */ jsxs("div", {
|
|
176
|
+
className: classes,
|
|
177
|
+
children: [mask && /* @__PURE__ */ jsx(Transition, {
|
|
389
178
|
name: "k-drawer-fade",
|
|
390
179
|
show: visible,
|
|
391
180
|
timeout: 400,
|
|
@@ -395,129 +184,46 @@ var Drawer = (t0) => {
|
|
|
395
184
|
className: clsx("k-drawer-mask", { "k-drawer-mask-to-body": isBody }),
|
|
396
185
|
onClick: maskClosable ? close : void 0
|
|
397
186
|
})
|
|
398
|
-
})
|
|
399
|
-
$[74] = close;
|
|
400
|
-
$[75] = destroyOnClose;
|
|
401
|
-
$[76] = isBody;
|
|
402
|
-
$[77] = mask;
|
|
403
|
-
$[78] = maskClosable;
|
|
404
|
-
$[79] = visible;
|
|
405
|
-
$[80] = t40;
|
|
406
|
-
} else t40 = $[80];
|
|
407
|
-
const t41 = `k-drawer-${placement}`;
|
|
408
|
-
let t42;
|
|
409
|
-
if ($[81] !== closable || $[82] !== closeNode || $[83] !== title) {
|
|
410
|
-
t42 = (title != null || closable) && /* @__PURE__ */ jsxs("div", {
|
|
411
|
-
className: "k-drawer-header",
|
|
412
|
-
children: [closeNode, /* @__PURE__ */ jsx("div", {
|
|
413
|
-
className: "k-drawer-header-inner",
|
|
414
|
-
children: title
|
|
415
|
-
})]
|
|
416
|
-
});
|
|
417
|
-
$[81] = closable;
|
|
418
|
-
$[82] = closeNode;
|
|
419
|
-
$[83] = title;
|
|
420
|
-
$[84] = t42;
|
|
421
|
-
} else t42 = $[84];
|
|
422
|
-
let t43;
|
|
423
|
-
if ($[85] !== children) {
|
|
424
|
-
t43 = /* @__PURE__ */ jsx("div", {
|
|
425
|
-
className: "k-drawer-body",
|
|
426
|
-
children
|
|
427
|
-
});
|
|
428
|
-
$[85] = children;
|
|
429
|
-
$[86] = t43;
|
|
430
|
-
} else t43 = $[86];
|
|
431
|
-
let t44;
|
|
432
|
-
if ($[87] !== footerNode || $[88] !== t42 || $[89] !== t43) {
|
|
433
|
-
t44 = /* @__PURE__ */ jsxs("div", {
|
|
434
|
-
className: "k-drawer-content",
|
|
435
|
-
children: [
|
|
436
|
-
t42,
|
|
437
|
-
t43,
|
|
438
|
-
footerNode
|
|
439
|
-
]
|
|
440
|
-
});
|
|
441
|
-
$[87] = footerNode;
|
|
442
|
-
$[88] = t42;
|
|
443
|
-
$[89] = t43;
|
|
444
|
-
$[90] = t44;
|
|
445
|
-
} else t44 = $[90];
|
|
446
|
-
let t45;
|
|
447
|
-
if ($[91] !== drawerStyle || $[92] !== t44) {
|
|
448
|
-
t45 = /* @__PURE__ */ jsx("div", {
|
|
449
|
-
className: "k-drawer-box",
|
|
450
|
-
style: drawerStyle,
|
|
451
|
-
children: t44
|
|
452
|
-
});
|
|
453
|
-
$[91] = drawerStyle;
|
|
454
|
-
$[92] = t44;
|
|
455
|
-
$[93] = t45;
|
|
456
|
-
} else t45 = $[93];
|
|
457
|
-
let t46;
|
|
458
|
-
if ($[94] !== destroyOnClose || $[95] !== t41 || $[96] !== t45 || $[97] !== visible) {
|
|
459
|
-
t46 = /* @__PURE__ */ jsx(Transition, {
|
|
460
|
-
show: visible,
|
|
461
|
-
name: t41,
|
|
462
|
-
timeout: 200,
|
|
463
|
-
appear: true,
|
|
464
|
-
unmountOnExit: destroyOnClose,
|
|
465
|
-
children: t45
|
|
466
|
-
});
|
|
467
|
-
$[94] = destroyOnClose;
|
|
468
|
-
$[95] = t41;
|
|
469
|
-
$[96] = t45;
|
|
470
|
-
$[97] = visible;
|
|
471
|
-
$[98] = t46;
|
|
472
|
-
} else t46 = $[98];
|
|
473
|
-
let t47;
|
|
474
|
-
if ($[99] !== setWrapRef || $[100] !== t46) {
|
|
475
|
-
t47 = /* @__PURE__ */ jsx("div", {
|
|
187
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
476
188
|
ref: setWrapRef,
|
|
477
189
|
className: "k-drawer-wrap",
|
|
478
190
|
tabIndex: -1,
|
|
479
|
-
children:
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
191
|
+
children: /* @__PURE__ */ jsx(Transition, {
|
|
192
|
+
show: visible,
|
|
193
|
+
name: `k-drawer-${placement}`,
|
|
194
|
+
timeout: 200,
|
|
195
|
+
appear: true,
|
|
196
|
+
unmountOnExit: destroyOnClose,
|
|
197
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
198
|
+
className: "k-drawer-box",
|
|
199
|
+
style: drawerStyle,
|
|
200
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
201
|
+
className: "k-drawer-content",
|
|
202
|
+
children: [
|
|
203
|
+
(title != null || closable) && /* @__PURE__ */ jsxs("div", {
|
|
204
|
+
className: "k-drawer-header",
|
|
205
|
+
children: [closeNode, /* @__PURE__ */ jsx("div", {
|
|
206
|
+
className: "k-drawer-header-inner",
|
|
207
|
+
children: title
|
|
208
|
+
})]
|
|
209
|
+
}),
|
|
210
|
+
/* @__PURE__ */ jsx("div", {
|
|
211
|
+
className: "k-drawer-body",
|
|
212
|
+
children
|
|
213
|
+
}),
|
|
214
|
+
footerNode
|
|
215
|
+
]
|
|
216
|
+
})
|
|
217
|
+
})
|
|
218
|
+
})
|
|
219
|
+
})]
|
|
220
|
+
});
|
|
221
|
+
return /* @__PURE__ */ jsx(Teleport, {
|
|
222
|
+
to: targetEl,
|
|
223
|
+
children: /* @__PURE__ */ jsx(PopupHostContext.Provider, {
|
|
500
224
|
value: registerHostedPopup,
|
|
501
225
|
children: drawerEl
|
|
502
|
-
})
|
|
503
|
-
|
|
504
|
-
$[107] = registerHostedPopup;
|
|
505
|
-
$[108] = t49;
|
|
506
|
-
} else t49 = $[108];
|
|
507
|
-
let t50;
|
|
508
|
-
if ($[109] !== t49 || $[110] !== targetEl) {
|
|
509
|
-
t50 = /* @__PURE__ */ jsx(Teleport, {
|
|
510
|
-
to: targetEl,
|
|
511
|
-
children: t49
|
|
512
|
-
});
|
|
513
|
-
$[109] = t49;
|
|
514
|
-
$[110] = targetEl;
|
|
515
|
-
$[111] = t50;
|
|
516
|
-
} else t50 = $[111];
|
|
517
|
-
return t50;
|
|
226
|
+
})
|
|
227
|
+
});
|
|
518
228
|
};
|
|
519
|
-
function _temp(next) {
|
|
520
|
-
return next ?? false;
|
|
521
|
-
}
|
|
522
|
-
//#endregion
|
|
523
229
|
export { Drawer as default };
|