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/slider/thumb.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
|
|
@@ -7,153 +7,63 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import Tooltip from "../tooltip/index.js";
|
|
10
|
-
import { c } from "react/compiler-runtime";
|
|
11
10
|
import clsx from "clsx";
|
|
12
11
|
import { forwardRef, useState } from "react";
|
|
13
12
|
import { jsx } from "react/jsx-runtime";
|
|
14
|
-
|
|
15
|
-
var Thumb = forwardRef(function Thumb(
|
|
16
|
-
const $ = c(35);
|
|
17
|
-
const { value, min: t1, max: t2, vertical: t3, size, reverse: t4, disabled: t5, tooltipVisible: t6, tipFormatter, dragging: t7, onDragStart, onKeyDown } = t0;
|
|
18
|
-
const min = t1 === void 0 ? 0 : t1;
|
|
19
|
-
const max = t2 === void 0 ? 100 : t2;
|
|
20
|
-
const vertical = t3 === void 0 ? false : t3;
|
|
21
|
-
const reverse = t4 === void 0 ? false : t4;
|
|
22
|
-
const disabled = t5 === void 0 ? false : t5;
|
|
23
|
-
const tooltipVisible = t6 === void 0 ? null : t6;
|
|
24
|
-
const dragging = t7 === void 0 ? false : t7;
|
|
13
|
+
// components/slider/thumb.tsx
|
|
14
|
+
var Thumb = forwardRef(function Thumb({ value, min = 0, max = 100, vertical = false, size, reverse = false, disabled = false, tooltipVisible = null, tipFormatter, dragging = false, onDragStart, onKeyDown }, ref) {
|
|
25
15
|
const [hovered, setHovered] = useState(false);
|
|
26
16
|
const percent = max === min ? 0 : Math.max(0, Math.min(100, (value - min) / (max - min) * 100));
|
|
27
17
|
const thumbSize = size === "small" ? 18 : typeof size === "number" ? size : 24;
|
|
28
18
|
const position = `calc(${percent}% + ${(.5 - percent / 100) * thumbSize}px)`;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
transform: "translate(-50%, -50%)"
|
|
43
|
-
};
|
|
44
|
-
$[0] = position;
|
|
45
|
-
$[1] = reverse;
|
|
46
|
-
$[2] = vertical;
|
|
47
|
-
$[3] = t8;
|
|
48
|
-
} else t8 = $[3];
|
|
49
|
-
const style = t8;
|
|
19
|
+
const style = vertical ? reverse ? {
|
|
20
|
+
top: position,
|
|
21
|
+
transform: "translate(-50%, -50%)"
|
|
22
|
+
} : {
|
|
23
|
+
bottom: position,
|
|
24
|
+
transform: "translate(-50%, 50%)"
|
|
25
|
+
} : reverse ? {
|
|
26
|
+
right: position,
|
|
27
|
+
transform: "translate(50%, -50%)"
|
|
28
|
+
} : {
|
|
29
|
+
left: position,
|
|
30
|
+
transform: "translate(-50%, -50%)"
|
|
31
|
+
};
|
|
50
32
|
const shown = tooltipVisible === true || tooltipVisible !== false && (dragging || hovered);
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
const t10 = disabled || tooltipVisible === false;
|
|
59
|
-
const t11 = shown && !disabled;
|
|
60
|
-
const t12 = vertical ? "right" : "top";
|
|
61
|
-
const t13 = vertical ? "vertical" : "horizontal";
|
|
62
|
-
const t14 = disabled ? void 0 : 0;
|
|
63
|
-
const t15 = size === "small";
|
|
64
|
-
let t16;
|
|
65
|
-
if ($[7] !== dragging || $[8] !== t15) {
|
|
66
|
-
t16 = clsx("k-slider-thumb", {
|
|
67
|
-
"is-dragging": dragging,
|
|
68
|
-
"k-slider-thumb-sm": t15
|
|
69
|
-
});
|
|
70
|
-
$[7] = dragging;
|
|
71
|
-
$[8] = t15;
|
|
72
|
-
$[9] = t16;
|
|
73
|
-
} else t16 = $[9];
|
|
74
|
-
let t17;
|
|
75
|
-
let t18;
|
|
76
|
-
if ($[10] !== disabled || $[11] !== onDragStart) {
|
|
77
|
-
t17 = (event) => {
|
|
78
|
-
event.preventDefault();
|
|
79
|
-
event.stopPropagation();
|
|
80
|
-
if (!disabled) onDragStart?.(event);
|
|
81
|
-
};
|
|
82
|
-
t18 = (event_0) => {
|
|
83
|
-
event_0.preventDefault();
|
|
84
|
-
event_0.stopPropagation();
|
|
85
|
-
if (!disabled) onDragStart?.(event_0);
|
|
86
|
-
};
|
|
87
|
-
$[10] = disabled;
|
|
88
|
-
$[11] = onDragStart;
|
|
89
|
-
$[12] = t17;
|
|
90
|
-
$[13] = t18;
|
|
91
|
-
} else {
|
|
92
|
-
t17 = $[12];
|
|
93
|
-
t18 = $[13];
|
|
94
|
-
}
|
|
95
|
-
let t19;
|
|
96
|
-
let t20;
|
|
97
|
-
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
98
|
-
t19 = () => setHovered(true);
|
|
99
|
-
t20 = () => setHovered(false);
|
|
100
|
-
$[14] = t19;
|
|
101
|
-
$[15] = t20;
|
|
102
|
-
} else {
|
|
103
|
-
t19 = $[14];
|
|
104
|
-
t20 = $[15];
|
|
105
|
-
}
|
|
106
|
-
let t21;
|
|
107
|
-
if ($[16] !== disabled || $[17] !== max || $[18] !== min || $[19] !== onKeyDown || $[20] !== ref || $[21] !== style || $[22] !== t13 || $[23] !== t14 || $[24] !== t16 || $[25] !== t17 || $[26] !== t18 || $[27] !== value) {
|
|
108
|
-
t21 = /* @__PURE__ */ jsx("div", {
|
|
33
|
+
return /* @__PURE__ */ jsx(Tooltip, {
|
|
34
|
+
trigger: "manual",
|
|
35
|
+
title: tipFormatter ? tipFormatter(value) : String(value),
|
|
36
|
+
disabled: disabled || tooltipVisible === false,
|
|
37
|
+
show: shown && !disabled,
|
|
38
|
+
placement: vertical ? "right" : "top",
|
|
39
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
109
40
|
ref,
|
|
110
41
|
role: "slider",
|
|
111
42
|
"aria-valuemin": min,
|
|
112
43
|
"aria-valuemax": max,
|
|
113
44
|
"aria-valuenow": value,
|
|
114
45
|
"aria-disabled": disabled,
|
|
115
|
-
"aria-orientation":
|
|
116
|
-
tabIndex:
|
|
117
|
-
className:
|
|
46
|
+
"aria-orientation": vertical ? "vertical" : "horizontal",
|
|
47
|
+
tabIndex: disabled ? void 0 : 0,
|
|
48
|
+
className: clsx("k-slider-thumb", {
|
|
49
|
+
"is-dragging": dragging,
|
|
50
|
+
"k-slider-thumb-sm": size === "small"
|
|
51
|
+
}),
|
|
118
52
|
style,
|
|
119
|
-
onMouseDown:
|
|
120
|
-
|
|
53
|
+
onMouseDown: (event) => {
|
|
54
|
+
event.preventDefault();
|
|
55
|
+
event.stopPropagation();
|
|
56
|
+
if (!disabled) onDragStart?.(event);
|
|
57
|
+
},
|
|
58
|
+
onTouchStart: (event_0) => {
|
|
59
|
+
event_0.preventDefault();
|
|
60
|
+
event_0.stopPropagation();
|
|
61
|
+
if (!disabled) onDragStart?.(event_0);
|
|
62
|
+
},
|
|
121
63
|
onKeyDown,
|
|
122
|
-
onMouseEnter:
|
|
123
|
-
onMouseLeave:
|
|
124
|
-
})
|
|
125
|
-
|
|
126
|
-
$[17] = max;
|
|
127
|
-
$[18] = min;
|
|
128
|
-
$[19] = onKeyDown;
|
|
129
|
-
$[20] = ref;
|
|
130
|
-
$[21] = style;
|
|
131
|
-
$[22] = t13;
|
|
132
|
-
$[23] = t14;
|
|
133
|
-
$[24] = t16;
|
|
134
|
-
$[25] = t17;
|
|
135
|
-
$[26] = t18;
|
|
136
|
-
$[27] = value;
|
|
137
|
-
$[28] = t21;
|
|
138
|
-
} else t21 = $[28];
|
|
139
|
-
let t22;
|
|
140
|
-
if ($[29] !== t10 || $[30] !== t11 || $[31] !== t12 || $[32] !== t21 || $[33] !== t9) {
|
|
141
|
-
t22 = /* @__PURE__ */ jsx(Tooltip, {
|
|
142
|
-
trigger: "manual",
|
|
143
|
-
title: t9,
|
|
144
|
-
disabled: t10,
|
|
145
|
-
show: t11,
|
|
146
|
-
placement: t12,
|
|
147
|
-
children: t21
|
|
148
|
-
});
|
|
149
|
-
$[29] = t10;
|
|
150
|
-
$[30] = t11;
|
|
151
|
-
$[31] = t12;
|
|
152
|
-
$[32] = t21;
|
|
153
|
-
$[33] = t9;
|
|
154
|
-
$[34] = t22;
|
|
155
|
-
} else t22 = $[34];
|
|
156
|
-
return t22;
|
|
64
|
+
onMouseEnter: () => setHovered(true),
|
|
65
|
+
onMouseLeave: () => setHovered(false)
|
|
66
|
+
})
|
|
67
|
+
});
|
|
157
68
|
});
|
|
158
|
-
//#endregion
|
|
159
69
|
export { Thumb as default };
|
package/es/space/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
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
9
|
import { SizeContext } from "../config/size-context.js";
|
|
10
|
+
import { getChildren } from "../utils/react-node.js";
|
|
11
11
|
import clsx from "clsx";
|
|
12
12
|
import React, { useContext } from "react";
|
|
13
13
|
import { jsx } from "react/jsx-runtime";
|
|
14
|
-
|
|
14
|
+
// components/space/index.tsx
|
|
15
15
|
var Space = ({ align, vertical = false, direction, wrap = false, block = false, compact = false, size, split, children, className = "", style, ...rest }) => {
|
|
16
16
|
const parentSize = useContext(SizeContext);
|
|
17
17
|
const currentSize = size ?? parentSize;
|
|
@@ -90,5 +90,4 @@ var Space = ({ align, vertical = false, direction, wrap = false, block = false,
|
|
|
90
90
|
})
|
|
91
91
|
});
|
|
92
92
|
};
|
|
93
|
-
//#endregion
|
|
94
93
|
export { Space as default };
|
package/es/spin/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
|
|
@@ -10,7 +10,7 @@ import { useConfigAppearance } from "../config/use-config-appearance.js";
|
|
|
10
10
|
import clsx from "clsx";
|
|
11
11
|
import { useEffect, useRef, useState } from "react";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
|
|
13
|
+
// components/spin/index.tsx
|
|
14
14
|
var Spin = ({ spinning: spinningProp = true, delay = 0, size: sizeProp, mode = "rotate", children, className = "", ...rest }) => {
|
|
15
15
|
const inheritedAppearance = useConfigAppearance();
|
|
16
16
|
const size = sizeProp ?? inheritedAppearance.size;
|
|
@@ -57,5 +57,4 @@ var Spin = ({ spinning: spinningProp = true, delay = 0, size: sizeProp, mode = "
|
|
|
57
57
|
children: [spinNode, children]
|
|
58
58
|
});
|
|
59
59
|
};
|
|
60
|
-
//#endregion
|
|
61
60
|
export { Spin as default };
|
|
@@ -1,15 +1,15 @@
|
|
|
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 { c } from "react/compiler-runtime";
|
|
10
9
|
import clsx from "clsx";
|
|
11
10
|
import { jsx } from "react/jsx-runtime";
|
|
12
|
-
|
|
11
|
+
import { c } from "react/compiler-runtime";
|
|
12
|
+
// components/splitter/splitter-panel.tsx
|
|
13
13
|
function SplitterPanel(props) {
|
|
14
14
|
const $ = c(10);
|
|
15
15
|
let children;
|
|
@@ -46,5 +46,4 @@ function SplitterPanel(props) {
|
|
|
46
46
|
} else t1 = $[9];
|
|
47
47
|
return t1;
|
|
48
48
|
}
|
|
49
|
-
//#endregion
|
|
50
49
|
export { SplitterPanel };
|
package/es/splitter/splitter.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
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 { c } from "react/compiler-runtime";
|
|
10
9
|
import clsx from "clsx";
|
|
11
|
-
import { Children, Fragment, isValidElement, useEffect, useRef, useState } from "react";
|
|
10
|
+
import { Children, Fragment, isValidElement, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
12
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
|
|
12
|
+
// components/splitter/splitter.tsx
|
|
14
13
|
var parseToPixels = (value, total) => {
|
|
15
14
|
if (value === void 0 || value === "") return null;
|
|
16
15
|
if (typeof value === "number") return value;
|
|
@@ -19,169 +18,63 @@ var parseToPixels = (value, total) => {
|
|
|
19
18
|
if (text.endsWith("px")) return Number.parseFloat(text);
|
|
20
19
|
return Number.isFinite(Number(text)) ? Number.parseFloat(text) : null;
|
|
21
20
|
};
|
|
22
|
-
function Splitter(
|
|
23
|
-
const $ = c(36);
|
|
24
|
-
let children;
|
|
25
|
-
let className;
|
|
26
|
-
let onResize;
|
|
27
|
-
let onResizeEnd;
|
|
28
|
-
let onResizeStart;
|
|
29
|
-
let rest;
|
|
30
|
-
let t1;
|
|
31
|
-
if ($[0] !== t0) {
|
|
32
|
-
({direction: t1, onResize, onResizeEnd, onResizeStart, className, children, ...rest} = t0);
|
|
33
|
-
$[0] = t0;
|
|
34
|
-
$[1] = children;
|
|
35
|
-
$[2] = className;
|
|
36
|
-
$[3] = onResize;
|
|
37
|
-
$[4] = onResizeEnd;
|
|
38
|
-
$[5] = onResizeStart;
|
|
39
|
-
$[6] = rest;
|
|
40
|
-
$[7] = t1;
|
|
41
|
-
} else {
|
|
42
|
-
children = $[1];
|
|
43
|
-
className = $[2];
|
|
44
|
-
onResize = $[3];
|
|
45
|
-
onResizeEnd = $[4];
|
|
46
|
-
onResizeStart = $[5];
|
|
47
|
-
rest = $[6];
|
|
48
|
-
t1 = $[7];
|
|
49
|
-
}
|
|
50
|
-
const direction = t1 === void 0 ? "horizontal" : t1;
|
|
21
|
+
function Splitter({ direction = "horizontal", onResize, onResizeEnd, onResizeStart, className, children, ...rest }) {
|
|
51
22
|
const containerRef = useRef(null);
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
const sizesRef = useRef(t2);
|
|
58
|
-
let t3;
|
|
59
|
-
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
60
|
-
t3 = [];
|
|
61
|
-
$[9] = t3;
|
|
62
|
-
} else t3 = $[9];
|
|
63
|
-
let t4;
|
|
64
|
-
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
65
|
-
t4 = [];
|
|
66
|
-
$[10] = t4;
|
|
67
|
-
} else t4 = $[10];
|
|
68
|
-
let t5;
|
|
69
|
-
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
70
|
-
t5 = {
|
|
71
|
-
min: t3,
|
|
72
|
-
max: t4
|
|
73
|
-
};
|
|
74
|
-
$[11] = t5;
|
|
75
|
-
} else t5 = $[11];
|
|
76
|
-
const limitsRef = useRef(t5);
|
|
23
|
+
const sizesRef = useRef([]);
|
|
24
|
+
const limitsRef = useRef({
|
|
25
|
+
min: [],
|
|
26
|
+
max: []
|
|
27
|
+
});
|
|
77
28
|
const dragRef = useRef(null);
|
|
78
29
|
const moveHandlerRef = useRef(null);
|
|
79
30
|
const upHandlerRef = useRef(null);
|
|
80
31
|
const bodyCursorRef = useRef("");
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
const [sizes, setSizes] = useState(t6);
|
|
87
|
-
let t7;
|
|
88
|
-
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
89
|
-
t7 = [];
|
|
90
|
-
$[13] = t7;
|
|
91
|
-
} else t7 = $[13];
|
|
92
|
-
let t8;
|
|
93
|
-
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
94
|
-
t8 = [];
|
|
95
|
-
$[14] = t8;
|
|
96
|
-
} else t8 = $[14];
|
|
97
|
-
let t9;
|
|
98
|
-
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
99
|
-
t9 = {
|
|
100
|
-
min: t7,
|
|
101
|
-
max: t8
|
|
102
|
-
};
|
|
103
|
-
$[15] = t9;
|
|
104
|
-
} else t9 = $[15];
|
|
105
|
-
const [limits, setLimits] = useState(t9);
|
|
32
|
+
const [sizes, setSizes] = useState([]);
|
|
33
|
+
const [limits, setLimits] = useState({
|
|
34
|
+
min: [],
|
|
35
|
+
max: []
|
|
36
|
+
});
|
|
106
37
|
const [dragging, setDragging] = useState(false);
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const raw = panels.map((panel_1) => parseToPixels(panel_1.props.size, total));
|
|
124
|
-
const defined = raw.reduce(_temp, 0);
|
|
125
|
-
const emptyCount = raw.filter(_temp2).length;
|
|
126
|
-
const automatic = emptyCount ? Math.max(0, total - defined) / emptyCount : 0;
|
|
127
|
-
const next = raw.map((value_1) => value_1 ?? automatic);
|
|
128
|
-
const nextLimits = {
|
|
129
|
-
min,
|
|
130
|
-
max
|
|
131
|
-
};
|
|
132
|
-
limitsRef.current = nextLimits;
|
|
133
|
-
setLimits(nextLimits);
|
|
134
|
-
sizesRef.current = next;
|
|
135
|
-
setSizes(next);
|
|
38
|
+
const panels = useMemo(() => Children.toArray(children).filter(isValidElement), [children]);
|
|
39
|
+
const initialize = useCallback(() => {
|
|
40
|
+
const container = containerRef.current;
|
|
41
|
+
if (!container || panels.length === 0) return;
|
|
42
|
+
const rect = container.getBoundingClientRect();
|
|
43
|
+
const total = (direction === "horizontal" ? rect.width : rect.height) - (panels.length - 1) * 4;
|
|
44
|
+
const min = panels.map((panel) => parseToPixels(panel.props.min, total) ?? 0);
|
|
45
|
+
const max = panels.map((panel_0) => parseToPixels(panel_0.props.max, total) ?? total);
|
|
46
|
+
const raw = panels.map((panel_1) => parseToPixels(panel_1.props.size, total));
|
|
47
|
+
const defined = raw.reduce((sum, value) => sum + (value ?? 0), 0);
|
|
48
|
+
const emptyCount = raw.filter((value_0) => value_0 == null).length;
|
|
49
|
+
const automatic = emptyCount ? Math.max(0, total - defined) / emptyCount : 0;
|
|
50
|
+
const next = raw.map((value_1) => value_1 ?? automatic);
|
|
51
|
+
const nextLimits = {
|
|
52
|
+
min,
|
|
53
|
+
max
|
|
136
54
|
};
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
55
|
+
limitsRef.current = nextLimits;
|
|
56
|
+
setLimits(nextLimits);
|
|
57
|
+
sizesRef.current = next;
|
|
58
|
+
setSizes(next);
|
|
59
|
+
}, [direction, panels]);
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
initialize();
|
|
62
|
+
const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(initialize);
|
|
63
|
+
if (containerRef.current) observer?.observe(containerRef.current);
|
|
64
|
+
return () => observer?.disconnect();
|
|
65
|
+
}, [initialize]);
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
if (!dragging) return;
|
|
68
|
+
bodyCursorRef.current = document.body.style.cursor;
|
|
69
|
+
document.body.style.cursor = direction === "horizontal" ? "col-resize" : "row-resize";
|
|
70
|
+
document.body.classList.add("k-splitter-dragging");
|
|
71
|
+
return () => {
|
|
72
|
+
document.body.style.cursor = bodyCursorRef.current;
|
|
73
|
+
document.body.classList.remove("k-splitter-dragging");
|
|
150
74
|
};
|
|
151
|
-
|
|
152
|
-
$[21] = initialize;
|
|
153
|
-
$[22] = t12;
|
|
154
|
-
$[23] = t13;
|
|
155
|
-
} else {
|
|
156
|
-
t12 = $[22];
|
|
157
|
-
t13 = $[23];
|
|
158
|
-
}
|
|
159
|
-
useEffect(t12, t13);
|
|
160
|
-
let t14;
|
|
161
|
-
let t15;
|
|
162
|
-
if ($[24] !== direction || $[25] !== dragging) {
|
|
163
|
-
t14 = () => {
|
|
164
|
-
if (!dragging) return;
|
|
165
|
-
bodyCursorRef.current = document.body.style.cursor;
|
|
166
|
-
document.body.style.cursor = direction === "horizontal" ? "col-resize" : "row-resize";
|
|
167
|
-
document.body.classList.add("k-splitter-dragging");
|
|
168
|
-
return () => {
|
|
169
|
-
document.body.style.cursor = bodyCursorRef.current;
|
|
170
|
-
document.body.classList.remove("k-splitter-dragging");
|
|
171
|
-
};
|
|
172
|
-
};
|
|
173
|
-
t15 = [direction, dragging];
|
|
174
|
-
$[24] = direction;
|
|
175
|
-
$[25] = dragging;
|
|
176
|
-
$[26] = t14;
|
|
177
|
-
$[27] = t15;
|
|
178
|
-
} else {
|
|
179
|
-
t14 = $[26];
|
|
180
|
-
t15 = $[27];
|
|
181
|
-
}
|
|
182
|
-
useEffect(t14, t15);
|
|
75
|
+
}, [direction, dragging]);
|
|
183
76
|
const emitSizes = (callback) => {
|
|
184
|
-
callback?.(sizesRef.current.map(
|
|
77
|
+
callback?.(sizesRef.current.map((value_2) => Number(value_2.toFixed(3))));
|
|
185
78
|
};
|
|
186
79
|
const resizePair = (index, requestedSize) => {
|
|
187
80
|
const pairTotal = sizesRef.current[index] + sizesRef.current[index + 1];
|
|
@@ -205,7 +98,7 @@ function Splitter(t0) {
|
|
|
205
98
|
const active = dragRef.current;
|
|
206
99
|
const rect_0 = container_0.getBoundingClientRect();
|
|
207
100
|
const position = (direction === "horizontal" ? moveEvent.clientX - rect_0.left : moveEvent.clientY - rect_0.top) - active * 4;
|
|
208
|
-
const offset = sizesRef.current.slice(0, active).reduce(
|
|
101
|
+
const offset = sizesRef.current.slice(0, active).reduce((sum_0, value_3) => sum_0 + value_3, 0);
|
|
209
102
|
resizePair(active, position - offset);
|
|
210
103
|
emitSizes(onResize);
|
|
211
104
|
};
|
|
@@ -243,68 +136,33 @@ function Splitter(t0) {
|
|
|
243
136
|
emitSizes(onResize);
|
|
244
137
|
emitSizes(onResizeEnd);
|
|
245
138
|
};
|
|
246
|
-
let t16;
|
|
247
|
-
if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
|
|
248
|
-
t16 = [];
|
|
249
|
-
$[28] = t16;
|
|
250
|
-
} else t16 = $[28];
|
|
251
139
|
useEffect(() => () => {
|
|
252
140
|
if (moveHandlerRef.current) document.removeEventListener("mousemove", moveHandlerRef.current);
|
|
253
141
|
if (upHandlerRef.current) document.removeEventListener("mouseup", upHandlerRef.current);
|
|
254
|
-
},
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
onMouseDown: (event_1) => handleMouseDown(index_2, event_1),
|
|
280
|
-
onKeyDown: (event_2) => handleResizerKeyDown(index_2, event_2)
|
|
281
|
-
})] }, panel_2.key ?? index_2));
|
|
282
|
-
let t20;
|
|
283
|
-
if ($[32] !== rest || $[33] !== t18 || $[34] !== t19) {
|
|
284
|
-
t20 = /* @__PURE__ */ jsx("div", {
|
|
285
|
-
...rest,
|
|
286
|
-
ref: containerRef,
|
|
287
|
-
className: t18,
|
|
288
|
-
children: t19
|
|
289
|
-
});
|
|
290
|
-
$[32] = rest;
|
|
291
|
-
$[33] = t18;
|
|
292
|
-
$[34] = t19;
|
|
293
|
-
$[35] = t20;
|
|
294
|
-
} else t20 = $[35];
|
|
295
|
-
return t20;
|
|
296
|
-
}
|
|
297
|
-
function _temp4(sum_0, value_3) {
|
|
298
|
-
return sum_0 + value_3;
|
|
299
|
-
}
|
|
300
|
-
function _temp3(value_2) {
|
|
301
|
-
return Number(value_2.toFixed(3));
|
|
302
|
-
}
|
|
303
|
-
function _temp2(value_0) {
|
|
304
|
-
return value_0 == null;
|
|
305
|
-
}
|
|
306
|
-
function _temp(sum, value) {
|
|
307
|
-
return sum + (value ?? 0);
|
|
142
|
+
}, []);
|
|
143
|
+
return /* @__PURE__ */ jsx("div", {
|
|
144
|
+
...rest,
|
|
145
|
+
ref: containerRef,
|
|
146
|
+
className: clsx("k-splitter", `is-${direction}`, className),
|
|
147
|
+
children: panels.map((panel_2, index_2) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
148
|
+
className: "k-splitter-item",
|
|
149
|
+
style: {
|
|
150
|
+
flexBasis: sizes[index_2],
|
|
151
|
+
flexGrow: 0,
|
|
152
|
+
flexShrink: 0
|
|
153
|
+
},
|
|
154
|
+
children: panel_2
|
|
155
|
+
}), index_2 < panels.length - 1 && /* @__PURE__ */ jsx("div", {
|
|
156
|
+
className: "k-splitter-resizer",
|
|
157
|
+
role: "separator",
|
|
158
|
+
tabIndex: 0,
|
|
159
|
+
"aria-orientation": direction === "horizontal" ? "vertical" : "horizontal",
|
|
160
|
+
"aria-valuemin": Math.round(limits.min[index_2] ?? 0),
|
|
161
|
+
"aria-valuemax": Math.round(limits.max[index_2] ?? 0),
|
|
162
|
+
"aria-valuenow": Math.round(sizes[index_2] ?? 0),
|
|
163
|
+
onMouseDown: (event_1) => handleMouseDown(index_2, event_1),
|
|
164
|
+
onKeyDown: (event_2) => handleResizerKeyDown(index_2, event_2)
|
|
165
|
+
})] }, panel_2.key ?? index_2))
|
|
166
|
+
});
|
|
308
167
|
}
|
|
309
|
-
//#endregion
|
|
310
168
|
export { Splitter };
|