react-kui 3.2.1 → 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 +819 -162
- 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 +66 -210
- 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 +8 -9
- package/es/table/utils.js +2 -3
- 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/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/checkbox/checkbox.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
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 { useValue } from "../utils/use-value.js";
|
|
9
10
|
import { resolvePaintedTheme, useFormAppearance } from "../config/use-config-appearance.js";
|
|
11
|
+
import { createFormFieldComponent } from "../form/field-context.js";
|
|
10
12
|
import { Check } from "../node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js";
|
|
11
13
|
import Icon from "../icon/index.js";
|
|
12
|
-
import { useValue } from "../utils/use-value.js";
|
|
13
|
-
import { createFormFieldComponent } from "../form/field-context.js";
|
|
14
14
|
import { getValueWithType } from "../utils/checked.js";
|
|
15
15
|
import { CheckboxGroupContext } from "./checkbox-group-context.js";
|
|
16
16
|
import clsx from "clsx";
|
|
17
17
|
import { useContext, useLayoutEffect, useRef } from "react";
|
|
18
18
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
-
|
|
19
|
+
// components/checkbox/checkbox.tsx
|
|
20
20
|
var PAINTED_THEMES = ["fill", "outline"];
|
|
21
21
|
var Checkbox = ({ checked, valueType = "boolean", value, label, theme: themeProp, disabled = false, readOnly = false, indeterminate = false, size: sizeProp, onChange, children, className = "", id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, onClick, ...rest }) => {
|
|
22
22
|
const inheritedAppearance = useFormAppearance();
|
|
@@ -105,5 +105,4 @@ var checkbox_default = createFormFieldComponent(Checkbox, {
|
|
|
105
105
|
getFieldValue: (value) => value === true || value === 1 || value === "1",
|
|
106
106
|
getChangeValue: (event) => event.checked
|
|
107
107
|
});
|
|
108
|
-
//#endregion
|
|
109
108
|
export { checkbox_default as default };
|
package/es/checkbox/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
import checkbox_default$1 from "./checkbox.js";
|
|
10
10
|
import checkbox_group_default from "./checkbox-group.js";
|
|
11
|
-
|
|
11
|
+
// components/checkbox/index.ts
|
|
12
12
|
var checkbox_default = checkbox_default$1;
|
|
13
|
-
//#endregion
|
|
14
13
|
export { checkbox_default$1 as Checkbox, checkbox_group_default as CheckboxGroup, checkbox_default as default };
|
|
@@ -1,233 +1,111 @@
|
|
|
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 { Transition } from "../base/transition.js";
|
|
10
9
|
import { ChevronUp } from "../node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js";
|
|
10
|
+
import { Transition } from "../base/transition.js";
|
|
11
11
|
import Icon from "../icon/index.js";
|
|
12
|
-
import { c } from "react/compiler-runtime";
|
|
13
12
|
import clsx from "clsx";
|
|
14
13
|
import "react";
|
|
15
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
-
|
|
17
|
-
var CollapsePanel = (
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
t3 = $[8];
|
|
49
|
-
title = $[9];
|
|
50
|
-
}
|
|
51
|
-
const disabled = t1 === void 0 ? false : t1;
|
|
52
|
-
const active = t2 === void 0 ? false : t2;
|
|
53
|
-
const className = t3 === void 0 ? "" : t3;
|
|
54
|
-
const setCurrentHeight = _temp;
|
|
55
|
-
const resetTransitionStyles = _temp2;
|
|
56
|
-
let t4;
|
|
57
|
-
if ($[10] !== disabled || $[11] !== onExpand || $[12] !== panelKey) {
|
|
58
|
-
t4 = () => {
|
|
59
|
-
if (!disabled && panelKey !== void 0) onExpand?.(panelKey);
|
|
60
|
-
};
|
|
61
|
-
$[10] = disabled;
|
|
62
|
-
$[11] = onExpand;
|
|
63
|
-
$[12] = panelKey;
|
|
64
|
-
$[13] = t4;
|
|
65
|
-
} else t4 = $[13];
|
|
66
|
-
const handleClick = t4;
|
|
67
|
-
let t5;
|
|
68
|
-
if ($[14] !== handleClick) {
|
|
69
|
-
t5 = (event) => {
|
|
70
|
-
if (event.key !== "Enter" && event.key !== " ") return;
|
|
71
|
-
event.preventDefault();
|
|
72
|
-
handleClick();
|
|
73
|
-
};
|
|
74
|
-
$[14] = handleClick;
|
|
75
|
-
$[15] = t5;
|
|
76
|
-
} else t5 = $[15];
|
|
77
|
-
const handleKeyDown = t5;
|
|
78
|
-
let t6;
|
|
79
|
-
if ($[16] !== active || $[17] !== className || $[18] !== disabled) {
|
|
80
|
-
t6 = clsx("k-collapse-item", {
|
|
81
|
-
"k-collapse-item-active": active,
|
|
82
|
-
"k-collapse-item-disabled": disabled
|
|
83
|
-
}, className);
|
|
84
|
-
$[16] = active;
|
|
85
|
-
$[17] = className;
|
|
86
|
-
$[18] = disabled;
|
|
87
|
-
$[19] = t6;
|
|
88
|
-
} else t6 = $[19];
|
|
89
|
-
const classes = t6;
|
|
90
|
-
const t7 = disabled ? -1 : 0;
|
|
91
|
-
const t8 = disabled || void 0;
|
|
92
|
-
let t9;
|
|
93
|
-
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
94
|
-
t9 = /* @__PURE__ */ jsx(Icon, {
|
|
95
|
-
type: ChevronUp,
|
|
96
|
-
className: "k-collapse-arrow"
|
|
97
|
-
});
|
|
98
|
-
$[20] = t9;
|
|
99
|
-
} else t9 = $[20];
|
|
100
|
-
let t10;
|
|
101
|
-
if ($[21] !== title) {
|
|
102
|
-
t10 = /* @__PURE__ */ jsx("span", {
|
|
103
|
-
className: "k-collapse-title",
|
|
104
|
-
children: title
|
|
105
|
-
});
|
|
106
|
-
$[21] = title;
|
|
107
|
-
$[22] = t10;
|
|
108
|
-
} else t10 = $[22];
|
|
109
|
-
let t11;
|
|
110
|
-
if ($[23] !== extra) {
|
|
111
|
-
t11 = extra ? /* @__PURE__ */ jsx("span", {
|
|
112
|
-
className: "k-collapse-extra",
|
|
113
|
-
onClick: _temp3,
|
|
114
|
-
onKeyDown: _temp4,
|
|
115
|
-
children: extra
|
|
116
|
-
}) : null;
|
|
117
|
-
$[23] = extra;
|
|
118
|
-
$[24] = t11;
|
|
119
|
-
} else t11 = $[24];
|
|
120
|
-
let t12;
|
|
121
|
-
if ($[25] !== active || $[26] !== handleClick || $[27] !== handleKeyDown || $[28] !== t10 || $[29] !== t11 || $[30] !== t7 || $[31] !== t8) {
|
|
122
|
-
t12 = /* @__PURE__ */ jsxs("div", {
|
|
15
|
+
// components/collapse/collapse-panel.tsx
|
|
16
|
+
var CollapsePanel = ({ title, disabled = false, active = false, extra, panelKey, onExpand, children, className = "", ...rest }) => {
|
|
17
|
+
const setCurrentHeight = (element) => {
|
|
18
|
+
element.style.height = `${element.getBoundingClientRect().height}px`;
|
|
19
|
+
element.style.opacity = "1";
|
|
20
|
+
element.offsetHeight;
|
|
21
|
+
};
|
|
22
|
+
const resetTransitionStyles = (element_0) => {
|
|
23
|
+
element_0.style.height = "";
|
|
24
|
+
element_0.style.paddingTop = "";
|
|
25
|
+
element_0.style.paddingBottom = "";
|
|
26
|
+
element_0.style.marginTop = "";
|
|
27
|
+
element_0.style.marginBottom = "";
|
|
28
|
+
element_0.style.opacity = "";
|
|
29
|
+
element_0.style.overflow = "";
|
|
30
|
+
};
|
|
31
|
+
const handleClick = () => {
|
|
32
|
+
if (!disabled && panelKey !== void 0) onExpand?.(panelKey);
|
|
33
|
+
};
|
|
34
|
+
const handleKeyDown = (event) => {
|
|
35
|
+
if (event.key !== "Enter" && event.key !== " ") return;
|
|
36
|
+
event.preventDefault();
|
|
37
|
+
handleClick();
|
|
38
|
+
};
|
|
39
|
+
const classes = clsx("k-collapse-item", {
|
|
40
|
+
"k-collapse-item-active": active,
|
|
41
|
+
"k-collapse-item-disabled": disabled
|
|
42
|
+
}, className);
|
|
43
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
44
|
+
className: classes,
|
|
45
|
+
...rest,
|
|
46
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
123
47
|
className: "k-collapse-header",
|
|
124
48
|
role: "button",
|
|
125
|
-
tabIndex:
|
|
49
|
+
tabIndex: disabled ? -1 : 0,
|
|
126
50
|
"aria-expanded": active,
|
|
127
|
-
"aria-disabled":
|
|
51
|
+
"aria-disabled": disabled || void 0,
|
|
128
52
|
onClick: handleClick,
|
|
129
53
|
onKeyDown: handleKeyDown,
|
|
130
54
|
children: [
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
55
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
56
|
+
type: ChevronUp,
|
|
57
|
+
className: "k-collapse-arrow"
|
|
58
|
+
}),
|
|
59
|
+
/* @__PURE__ */ jsx("span", {
|
|
60
|
+
className: "k-collapse-title",
|
|
61
|
+
children: title
|
|
62
|
+
}),
|
|
63
|
+
extra ? /* @__PURE__ */ jsx("span", {
|
|
64
|
+
className: "k-collapse-extra",
|
|
65
|
+
onClick: (event_0) => event_0.stopPropagation(),
|
|
66
|
+
onKeyDown: (event_1) => event_1.stopPropagation(),
|
|
67
|
+
children: extra
|
|
68
|
+
}) : null
|
|
134
69
|
]
|
|
135
|
-
})
|
|
136
|
-
$[25] = active;
|
|
137
|
-
$[26] = handleClick;
|
|
138
|
-
$[27] = handleKeyDown;
|
|
139
|
-
$[28] = t10;
|
|
140
|
-
$[29] = t11;
|
|
141
|
-
$[30] = t7;
|
|
142
|
-
$[31] = t8;
|
|
143
|
-
$[32] = t12;
|
|
144
|
-
} else t12 = $[32];
|
|
145
|
-
let t13;
|
|
146
|
-
if ($[33] !== children) {
|
|
147
|
-
t13 = /* @__PURE__ */ jsx("div", {
|
|
148
|
-
className: "k-collapse-content",
|
|
149
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
150
|
-
className: "k-collapse-content-box",
|
|
151
|
-
children
|
|
152
|
-
})
|
|
153
|
-
});
|
|
154
|
-
$[33] = children;
|
|
155
|
-
$[34] = t13;
|
|
156
|
-
} else t13 = $[34];
|
|
157
|
-
let t14;
|
|
158
|
-
if ($[35] !== active || $[36] !== t13) {
|
|
159
|
-
t14 = /* @__PURE__ */ jsx(Transition, {
|
|
70
|
+
}), /* @__PURE__ */ jsx(Transition, {
|
|
160
71
|
show: active,
|
|
161
72
|
name: "k-collapse-slide",
|
|
162
73
|
timeout: 350,
|
|
163
|
-
onBeforeEnter:
|
|
164
|
-
|
|
74
|
+
onBeforeEnter: (element_1) => {
|
|
75
|
+
const reversing = element_1.style.height !== "";
|
|
76
|
+
element_1.style.overflow = "hidden";
|
|
77
|
+
element_1.style.height = reversing ? `${element_1.getBoundingClientRect().height}px` : "0px";
|
|
78
|
+
element_1.style.opacity = reversing ? getComputedStyle(element_1).opacity : "0.1";
|
|
79
|
+
element_1.offsetHeight;
|
|
80
|
+
},
|
|
81
|
+
onEnter: (element_2) => {
|
|
82
|
+
if (element_2.scrollHeight) {
|
|
83
|
+
element_2.style.height = `${element_2.scrollHeight}px`;
|
|
84
|
+
element_2.style.opacity = "1";
|
|
85
|
+
} else {
|
|
86
|
+
element_2.style.height = "";
|
|
87
|
+
element_2.style.opacity = "";
|
|
88
|
+
}
|
|
89
|
+
},
|
|
165
90
|
onAfterEnter: resetTransitionStyles,
|
|
166
91
|
onBeforeLeave: setCurrentHeight,
|
|
167
|
-
onLeave:
|
|
92
|
+
onLeave: (element_3) => {
|
|
93
|
+
element_3.style.height = "0px";
|
|
94
|
+
element_3.style.paddingTop = "0px";
|
|
95
|
+
element_3.style.paddingBottom = "0px";
|
|
96
|
+
element_3.style.marginTop = "0px";
|
|
97
|
+
element_3.style.marginBottom = "0px";
|
|
98
|
+
element_3.style.opacity = "0";
|
|
99
|
+
},
|
|
168
100
|
onAfterLeave: resetTransitionStyles,
|
|
169
|
-
children:
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
className: classes,
|
|
179
|
-
...rest,
|
|
180
|
-
children: [t12, t14]
|
|
181
|
-
});
|
|
182
|
-
$[38] = classes;
|
|
183
|
-
$[39] = rest;
|
|
184
|
-
$[40] = t12;
|
|
185
|
-
$[41] = t14;
|
|
186
|
-
$[42] = t15;
|
|
187
|
-
} else t15 = $[42];
|
|
188
|
-
return t15;
|
|
101
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
102
|
+
className: "k-collapse-content",
|
|
103
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
104
|
+
className: "k-collapse-content-box",
|
|
105
|
+
children
|
|
106
|
+
})
|
|
107
|
+
})
|
|
108
|
+
})]
|
|
109
|
+
});
|
|
189
110
|
};
|
|
190
|
-
function _temp(element) {
|
|
191
|
-
element.style.height = `${element.getBoundingClientRect().height}px`;
|
|
192
|
-
element.style.opacity = "1";
|
|
193
|
-
}
|
|
194
|
-
function _temp2(element_0) {
|
|
195
|
-
element_0.style.height = "";
|
|
196
|
-
element_0.style.paddingTop = "";
|
|
197
|
-
element_0.style.paddingBottom = "";
|
|
198
|
-
element_0.style.marginTop = "";
|
|
199
|
-
element_0.style.marginBottom = "";
|
|
200
|
-
element_0.style.opacity = "";
|
|
201
|
-
element_0.style.overflow = "";
|
|
202
|
-
}
|
|
203
|
-
function _temp3(event_0) {
|
|
204
|
-
return event_0.stopPropagation();
|
|
205
|
-
}
|
|
206
|
-
function _temp4(event_1) {
|
|
207
|
-
return event_1.stopPropagation();
|
|
208
|
-
}
|
|
209
|
-
function _temp5(element_1) {
|
|
210
|
-
const reversing = element_1.style.height !== "";
|
|
211
|
-
element_1.style.overflow = "hidden";
|
|
212
|
-
element_1.style.height = reversing ? `${element_1.getBoundingClientRect().height}px` : "0px";
|
|
213
|
-
element_1.style.opacity = reversing ? getComputedStyle(element_1).opacity : "0.1";
|
|
214
|
-
}
|
|
215
|
-
function _temp6(element_2) {
|
|
216
|
-
if (element_2.scrollHeight) {
|
|
217
|
-
element_2.style.height = `${element_2.scrollHeight}px`;
|
|
218
|
-
element_2.style.opacity = "1";
|
|
219
|
-
} else {
|
|
220
|
-
element_2.style.height = "";
|
|
221
|
-
element_2.style.opacity = "";
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
function _temp7(element_3) {
|
|
225
|
-
element_3.style.height = "0px";
|
|
226
|
-
element_3.style.paddingTop = "0px";
|
|
227
|
-
element_3.style.paddingBottom = "0px";
|
|
228
|
-
element_3.style.marginTop = "0px";
|
|
229
|
-
element_3.style.marginBottom = "0px";
|
|
230
|
-
element_3.style.opacity = "0";
|
|
231
|
-
}
|
|
232
|
-
//#endregion
|
|
233
111
|
export { CollapsePanel as default };
|
package/es/collapse/collapse.js
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
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 { getChildren } from "../utils/react-node.js";
|
|
10
|
-
import { normalizeSurfaceShape, resolvePaintedTheme, useConfigAppearance } from "../config/use-config-appearance.js";
|
|
11
9
|
import { useValue } from "../utils/use-value.js";
|
|
12
|
-
import {
|
|
10
|
+
import { normalizeSurfaceShape, resolvePaintedTheme, useConfigAppearance } from "../config/use-config-appearance.js";
|
|
11
|
+
import { getChildren } from "../utils/react-node.js";
|
|
13
12
|
import clsx from "clsx";
|
|
14
13
|
import React, { useState } from "react";
|
|
15
14
|
import { jsx } from "react/jsx-runtime";
|
|
16
|
-
|
|
15
|
+
// components/collapse/collapse.tsx
|
|
17
16
|
var PAINTED_THEMES = [
|
|
18
17
|
"fill",
|
|
19
18
|
"outline",
|
|
@@ -21,173 +20,42 @@ var PAINTED_THEMES = [
|
|
|
21
20
|
"solid",
|
|
22
21
|
"dashed"
|
|
23
22
|
];
|
|
24
|
-
var Collapse = (
|
|
25
|
-
const $ = c(49);
|
|
26
|
-
let children;
|
|
27
|
-
let onChange;
|
|
28
|
-
let onOpenKeysChange;
|
|
29
|
-
let openKeys;
|
|
30
|
-
let rest;
|
|
31
|
-
let shapeProp;
|
|
32
|
-
let t1;
|
|
33
|
-
let t2;
|
|
34
|
-
let t3;
|
|
35
|
-
let themeProp;
|
|
36
|
-
if ($[0] !== t0) {
|
|
37
|
-
({openKeys, accordion: t1, sample: t2, theme: themeProp, shape: shapeProp, onChange, onOpenKeysChange, children, className: t3, ...rest} = t0);
|
|
38
|
-
$[0] = t0;
|
|
39
|
-
$[1] = children;
|
|
40
|
-
$[2] = onChange;
|
|
41
|
-
$[3] = onOpenKeysChange;
|
|
42
|
-
$[4] = openKeys;
|
|
43
|
-
$[5] = rest;
|
|
44
|
-
$[6] = shapeProp;
|
|
45
|
-
$[7] = t1;
|
|
46
|
-
$[8] = t2;
|
|
47
|
-
$[9] = t3;
|
|
48
|
-
$[10] = themeProp;
|
|
49
|
-
} else {
|
|
50
|
-
children = $[1];
|
|
51
|
-
onChange = $[2];
|
|
52
|
-
onOpenKeysChange = $[3];
|
|
53
|
-
openKeys = $[4];
|
|
54
|
-
rest = $[5];
|
|
55
|
-
shapeProp = $[6];
|
|
56
|
-
t1 = $[7];
|
|
57
|
-
t2 = $[8];
|
|
58
|
-
t3 = $[9];
|
|
59
|
-
themeProp = $[10];
|
|
60
|
-
}
|
|
61
|
-
const accordion = t1 === void 0 ? false : t1;
|
|
62
|
-
const sample = t2 === void 0 ? false : t2;
|
|
63
|
-
const className = t3 === void 0 ? "" : t3;
|
|
23
|
+
var Collapse = ({ openKeys, accordion = false, sample = false, theme: themeProp, shape: shapeProp, onChange, onOpenKeysChange, children, className = "", ...rest }) => {
|
|
64
24
|
const inheritedAppearance = useConfigAppearance();
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
$[11] = inheritedAppearance;
|
|
69
|
-
$[12] = themeProp;
|
|
70
|
-
$[13] = t4;
|
|
71
|
-
} else t4 = $[13];
|
|
72
|
-
const theme = t4;
|
|
73
|
-
const t5 = shapeProp ?? inheritedAppearance.shape ?? "round";
|
|
74
|
-
let t6;
|
|
75
|
-
if ($[14] !== t5) {
|
|
76
|
-
t6 = normalizeSurfaceShape(t5);
|
|
77
|
-
$[14] = t5;
|
|
78
|
-
$[15] = t6;
|
|
79
|
-
} else t6 = $[15];
|
|
80
|
-
const shape = t6;
|
|
81
|
-
const [innerActiveKeys, setInnerActiveKeys] = useValue(openKeys, _temp);
|
|
25
|
+
const theme = resolvePaintedTheme(themeProp ?? inheritedAppearance.theme, PAINTED_THEMES) ?? "outline";
|
|
26
|
+
const shape = normalizeSurfaceShape(shapeProp ?? inheritedAppearance.shape ?? "round");
|
|
27
|
+
const [innerActiveKeys, setInnerActiveKeys] = useValue(openKeys, (next) => next ?? []);
|
|
82
28
|
const activeKeys = innerActiveKeys;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
$[16] = openKeys;
|
|
87
|
-
$[17] = t7;
|
|
88
|
-
} else t7 = $[17];
|
|
89
|
-
const [keyRegistry, setKeyRegistry] = useState(t7);
|
|
90
|
-
let resolvedKeys;
|
|
91
|
-
if ($[18] !== activeKeys || $[19] !== keyRegistry) {
|
|
92
|
-
resolvedKeys = new Map(keyRegistry);
|
|
93
|
-
activeKeys.forEach((key_0) => resolvedKeys.set(String(key_0), key_0));
|
|
94
|
-
$[18] = activeKeys;
|
|
95
|
-
$[19] = keyRegistry;
|
|
96
|
-
$[20] = resolvedKeys;
|
|
97
|
-
} else resolvedKeys = $[20];
|
|
29
|
+
const [keyRegistry, setKeyRegistry] = useState(() => new Map((openKeys ?? []).map((key) => [String(key), key])));
|
|
30
|
+
const resolvedKeys = new Map(keyRegistry);
|
|
31
|
+
activeKeys.forEach((key_0) => resolvedKeys.set(String(key_0), key_0));
|
|
98
32
|
if (activeKeys.some((key_1) => keyRegistry.get(String(key_1)) !== key_1)) setKeyRegistry(resolvedKeys);
|
|
99
|
-
const keysEqual =
|
|
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
|
-
$[31] = t9;
|
|
127
|
-
} else t9 = $[31];
|
|
128
|
-
const classes = t9;
|
|
129
|
-
let t10;
|
|
130
|
-
let t11;
|
|
131
|
-
let t12;
|
|
132
|
-
if ($[32] !== activeKeys || $[33] !== children || $[34] !== classes || $[35] !== handleExpand || $[36] !== resolvedKeys || $[37] !== rest) {
|
|
133
|
-
const childList = getChildren(children);
|
|
134
|
-
t10 = classes;
|
|
135
|
-
t11 = rest;
|
|
136
|
-
let t13;
|
|
137
|
-
if ($[41] !== activeKeys || $[42] !== handleExpand || $[43] !== resolvedKeys) {
|
|
138
|
-
t13 = (child, index_0) => {
|
|
139
|
-
if (!React.isValidElement(child)) return child;
|
|
140
|
-
const rawKey = child.props.panelKey ?? child.key ?? index_0;
|
|
141
|
-
const key_3 = child.props.panelKey ?? resolvedKeys.get(String(rawKey)) ?? rawKey;
|
|
142
|
-
const isActive = activeKeys.some((item_0) => keysEqual(item_0, key_3));
|
|
143
|
-
return React.cloneElement(child, {
|
|
144
|
-
panelKey: key_3,
|
|
145
|
-
active: isActive,
|
|
146
|
-
onExpand: handleExpand
|
|
147
|
-
});
|
|
148
|
-
};
|
|
149
|
-
$[41] = activeKeys;
|
|
150
|
-
$[42] = handleExpand;
|
|
151
|
-
$[43] = resolvedKeys;
|
|
152
|
-
$[44] = t13;
|
|
153
|
-
} else t13 = $[44];
|
|
154
|
-
t12 = childList.map(t13);
|
|
155
|
-
$[32] = activeKeys;
|
|
156
|
-
$[33] = children;
|
|
157
|
-
$[34] = classes;
|
|
158
|
-
$[35] = handleExpand;
|
|
159
|
-
$[36] = resolvedKeys;
|
|
160
|
-
$[37] = rest;
|
|
161
|
-
$[38] = t10;
|
|
162
|
-
$[39] = t11;
|
|
163
|
-
$[40] = t12;
|
|
164
|
-
} else {
|
|
165
|
-
t10 = $[38];
|
|
166
|
-
t11 = $[39];
|
|
167
|
-
t12 = $[40];
|
|
168
|
-
}
|
|
169
|
-
let t13;
|
|
170
|
-
if ($[45] !== t10 || $[46] !== t11 || $[47] !== t12) {
|
|
171
|
-
t13 = /* @__PURE__ */ jsx("div", {
|
|
172
|
-
className: t10,
|
|
173
|
-
...t11,
|
|
174
|
-
children: t12
|
|
175
|
-
});
|
|
176
|
-
$[45] = t10;
|
|
177
|
-
$[46] = t11;
|
|
178
|
-
$[47] = t12;
|
|
179
|
-
$[48] = t13;
|
|
180
|
-
} else t13 = $[48];
|
|
181
|
-
return t13;
|
|
33
|
+
const keysEqual = (left, right) => left === right || String(left) === String(right);
|
|
34
|
+
const handleExpand = (key_2) => {
|
|
35
|
+
if (!key_2 && key_2 !== 0) return;
|
|
36
|
+
let nextKeys = [...activeKeys];
|
|
37
|
+
if (nextKeys.findIndex((item) => keysEqual(item, key_2)) >= 0) nextKeys = accordion ? [] : nextKeys.filter((k) => !keysEqual(k, key_2));
|
|
38
|
+
else nextKeys = accordion ? [key_2] : [...nextKeys, key_2];
|
|
39
|
+
setInnerActiveKeys(nextKeys);
|
|
40
|
+
onOpenKeysChange?.(nextKeys);
|
|
41
|
+
onChange?.(key_2);
|
|
42
|
+
};
|
|
43
|
+
const classes = clsx("k-collapse", { "k-collapse-sample": sample }, `k-collapse-${theme}`, `k-collapse-${shape}`, className);
|
|
44
|
+
const childList = getChildren(children);
|
|
45
|
+
return /* @__PURE__ */ jsx("div", {
|
|
46
|
+
className: classes,
|
|
47
|
+
...rest,
|
|
48
|
+
children: childList.map((child, index_0) => {
|
|
49
|
+
if (!React.isValidElement(child)) return child;
|
|
50
|
+
const rawKey = child.props.panelKey ?? child.key ?? index_0;
|
|
51
|
+
const key_3 = child.props.panelKey ?? resolvedKeys.get(String(rawKey)) ?? rawKey;
|
|
52
|
+
const isActive = activeKeys.some((item_0) => keysEqual(item_0, key_3));
|
|
53
|
+
return React.cloneElement(child, {
|
|
54
|
+
panelKey: key_3,
|
|
55
|
+
active: isActive,
|
|
56
|
+
onExpand: handleExpand
|
|
57
|
+
});
|
|
58
|
+
})
|
|
59
|
+
});
|
|
182
60
|
};
|
|
183
|
-
function _temp(next) {
|
|
184
|
-
return next ?? [];
|
|
185
|
-
}
|
|
186
|
-
function _temp2(key) {
|
|
187
|
-
return [String(key), key];
|
|
188
|
-
}
|
|
189
|
-
function _temp3(left, right) {
|
|
190
|
-
return left === right || String(left) === String(right);
|
|
191
|
-
}
|
|
192
|
-
//#endregion
|
|
193
61
|
export { Collapse as default };
|