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/layout/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
|
|
@@ -7,52 +7,16 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { SiderHookContext } from "./layout-context.js";
|
|
10
|
-
import { c } from "react/compiler-runtime";
|
|
11
10
|
import clsx from "clsx";
|
|
12
11
|
import { useCallback, useContext, useEffect, useState } from "react";
|
|
13
12
|
import { jsx } from "react/jsx-runtime";
|
|
14
|
-
|
|
15
|
-
function BasicSection(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if ($[0] !== t0) {
|
|
22
|
-
({suffixCls, children, className: t1, ...rest} = t0);
|
|
23
|
-
$[0] = t0;
|
|
24
|
-
$[1] = children;
|
|
25
|
-
$[2] = rest;
|
|
26
|
-
$[3] = suffixCls;
|
|
27
|
-
$[4] = t1;
|
|
28
|
-
} else {
|
|
29
|
-
children = $[1];
|
|
30
|
-
rest = $[2];
|
|
31
|
-
suffixCls = $[3];
|
|
32
|
-
t1 = $[4];
|
|
33
|
-
}
|
|
34
|
-
const className = t1 === void 0 ? "" : t1;
|
|
35
|
-
const t2 = `k-${suffixCls}`;
|
|
36
|
-
let t3;
|
|
37
|
-
if ($[5] !== className || $[6] !== t2) {
|
|
38
|
-
t3 = clsx(t2, className);
|
|
39
|
-
$[5] = className;
|
|
40
|
-
$[6] = t2;
|
|
41
|
-
$[7] = t3;
|
|
42
|
-
} else t3 = $[7];
|
|
43
|
-
let t4;
|
|
44
|
-
if ($[8] !== children || $[9] !== rest || $[10] !== t3) {
|
|
45
|
-
t4 = /* @__PURE__ */ jsx("section", {
|
|
46
|
-
className: t3,
|
|
47
|
-
...rest,
|
|
48
|
-
children
|
|
49
|
-
});
|
|
50
|
-
$[8] = children;
|
|
51
|
-
$[9] = rest;
|
|
52
|
-
$[10] = t3;
|
|
53
|
-
$[11] = t4;
|
|
54
|
-
} else t4 = $[11];
|
|
55
|
-
return t4;
|
|
13
|
+
// components/layout/index.tsx
|
|
14
|
+
function BasicSection({ suffixCls, children, className = "", ...rest }) {
|
|
15
|
+
return /* @__PURE__ */ jsx("section", {
|
|
16
|
+
className: clsx(`k-${suffixCls}`, className),
|
|
17
|
+
...rest,
|
|
18
|
+
children
|
|
19
|
+
});
|
|
56
20
|
}
|
|
57
21
|
var LayoutMain = ({ suffixCls = "layout", hasSider, children, className = "", ...rest }) => {
|
|
58
22
|
const [siderCount, setSiderCount] = useState(0);
|
|
@@ -69,188 +33,52 @@ var LayoutMain = ({ suffixCls = "layout", hasSider, children, className = "", ..
|
|
|
69
33
|
})
|
|
70
34
|
});
|
|
71
35
|
};
|
|
72
|
-
var Sider = (
|
|
73
|
-
const $ = c(25);
|
|
74
|
-
let children;
|
|
75
|
-
let collapsed;
|
|
76
|
-
let collapsible;
|
|
77
|
-
let rest;
|
|
78
|
-
let style;
|
|
79
|
-
let t1;
|
|
80
|
-
let t2;
|
|
81
|
-
let t3;
|
|
82
|
-
let t4;
|
|
83
|
-
if ($[0] !== t0) {
|
|
84
|
-
({suffixCls: t1, width: t2, collapsedWidth: t3, collapsible, collapsed, children, className: t4, style, ...rest} = t0);
|
|
85
|
-
$[0] = t0;
|
|
86
|
-
$[1] = children;
|
|
87
|
-
$[2] = collapsed;
|
|
88
|
-
$[3] = collapsible;
|
|
89
|
-
$[4] = rest;
|
|
90
|
-
$[5] = style;
|
|
91
|
-
$[6] = t1;
|
|
92
|
-
$[7] = t2;
|
|
93
|
-
$[8] = t3;
|
|
94
|
-
$[9] = t4;
|
|
95
|
-
} else {
|
|
96
|
-
children = $[1];
|
|
97
|
-
collapsed = $[2];
|
|
98
|
-
collapsible = $[3];
|
|
99
|
-
rest = $[4];
|
|
100
|
-
style = $[5];
|
|
101
|
-
t1 = $[6];
|
|
102
|
-
t2 = $[7];
|
|
103
|
-
t3 = $[8];
|
|
104
|
-
t4 = $[9];
|
|
105
|
-
}
|
|
106
|
-
const suffixCls = t1 === void 0 ? "layout-sider" : t1;
|
|
107
|
-
const width = t2 === void 0 ? 200 : t2;
|
|
108
|
-
const collapsedWidth = t3 === void 0 ? 80 : t3;
|
|
109
|
-
const className = t4 === void 0 ? "" : t4;
|
|
36
|
+
var Sider = ({ suffixCls = "layout-sider", width = 200, collapsedWidth = 80, collapsible, collapsed, children, className = "", style, ...rest }) => {
|
|
110
37
|
const collectSider = useContext(SiderHookContext);
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
collectSider?.(true);
|
|
116
|
-
return () => {
|
|
117
|
-
collectSider?.(false);
|
|
118
|
-
};
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
collectSider?.(true);
|
|
40
|
+
return () => {
|
|
41
|
+
collectSider?.(false);
|
|
119
42
|
};
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
$[11] = t5;
|
|
123
|
-
$[12] = t6;
|
|
124
|
-
} else {
|
|
125
|
-
t5 = $[11];
|
|
126
|
-
t6 = $[12];
|
|
127
|
-
}
|
|
128
|
-
useEffect(t5, t6);
|
|
129
|
-
const t7 = `k-${suffixCls}`;
|
|
130
|
-
let t8;
|
|
131
|
-
if ($[13] !== className || $[14] !== t7) {
|
|
132
|
-
t8 = clsx(t7, className);
|
|
133
|
-
$[13] = className;
|
|
134
|
-
$[14] = t7;
|
|
135
|
-
$[15] = t8;
|
|
136
|
-
} else t8 = $[15];
|
|
137
|
-
const classes = t8;
|
|
43
|
+
}, [collectSider]);
|
|
44
|
+
const classes = clsx(`k-${suffixCls}`, className);
|
|
138
45
|
const siderWidth = style?.width ?? (collapsible && collapsed ? collapsedWidth : width);
|
|
139
46
|
const resolvedWidth = typeof siderWidth === "number" ? `${siderWidth}px` : siderWidth;
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
$[19] = t10;
|
|
154
|
-
} else t10 = $[19];
|
|
155
|
-
const siderStyle = t10;
|
|
156
|
-
let t11;
|
|
157
|
-
if ($[20] !== children || $[21] !== classes || $[22] !== rest || $[23] !== siderStyle) {
|
|
158
|
-
t11 = /* @__PURE__ */ jsx("aside", {
|
|
159
|
-
className: classes,
|
|
160
|
-
style: siderStyle,
|
|
161
|
-
...rest,
|
|
162
|
-
children
|
|
163
|
-
});
|
|
164
|
-
$[20] = children;
|
|
165
|
-
$[21] = classes;
|
|
166
|
-
$[22] = rest;
|
|
167
|
-
$[23] = siderStyle;
|
|
168
|
-
$[24] = t11;
|
|
169
|
-
} else t11 = $[24];
|
|
170
|
-
return t11;
|
|
47
|
+
const siderStyle = {
|
|
48
|
+
width: resolvedWidth,
|
|
49
|
+
flex: `0 0 ${resolvedWidth}`,
|
|
50
|
+
maxWidth: resolvedWidth,
|
|
51
|
+
minWidth: resolvedWidth,
|
|
52
|
+
...style
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */ jsx("aside", {
|
|
55
|
+
className: classes,
|
|
56
|
+
style: siderStyle,
|
|
57
|
+
...rest,
|
|
58
|
+
children
|
|
59
|
+
});
|
|
171
60
|
};
|
|
172
|
-
function Content(
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
({suffixCls: t1, ...props} = t0);
|
|
178
|
-
$[0] = t0;
|
|
179
|
-
$[1] = props;
|
|
180
|
-
$[2] = t1;
|
|
181
|
-
} else {
|
|
182
|
-
props = $[1];
|
|
183
|
-
t1 = $[2];
|
|
184
|
-
}
|
|
185
|
-
const suffixCls = t1 === void 0 ? "layout-content" : t1;
|
|
186
|
-
let t2;
|
|
187
|
-
if ($[3] !== props || $[4] !== suffixCls) {
|
|
188
|
-
t2 = /* @__PURE__ */ jsx(BasicSection, {
|
|
189
|
-
suffixCls,
|
|
190
|
-
...props
|
|
191
|
-
});
|
|
192
|
-
$[3] = props;
|
|
193
|
-
$[4] = suffixCls;
|
|
194
|
-
$[5] = t2;
|
|
195
|
-
} else t2 = $[5];
|
|
196
|
-
return t2;
|
|
61
|
+
function Content({ suffixCls = "layout-content", ...props }) {
|
|
62
|
+
return /* @__PURE__ */ jsx(BasicSection, {
|
|
63
|
+
suffixCls,
|
|
64
|
+
...props
|
|
65
|
+
});
|
|
197
66
|
}
|
|
198
|
-
function Header(
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
({suffixCls: t1, ...props} = t0);
|
|
204
|
-
$[0] = t0;
|
|
205
|
-
$[1] = props;
|
|
206
|
-
$[2] = t1;
|
|
207
|
-
} else {
|
|
208
|
-
props = $[1];
|
|
209
|
-
t1 = $[2];
|
|
210
|
-
}
|
|
211
|
-
const suffixCls = t1 === void 0 ? "layout-header" : t1;
|
|
212
|
-
let t2;
|
|
213
|
-
if ($[3] !== props || $[4] !== suffixCls) {
|
|
214
|
-
t2 = /* @__PURE__ */ jsx(BasicSection, {
|
|
215
|
-
suffixCls,
|
|
216
|
-
...props
|
|
217
|
-
});
|
|
218
|
-
$[3] = props;
|
|
219
|
-
$[4] = suffixCls;
|
|
220
|
-
$[5] = t2;
|
|
221
|
-
} else t2 = $[5];
|
|
222
|
-
return t2;
|
|
67
|
+
function Header({ suffixCls = "layout-header", ...props }) {
|
|
68
|
+
return /* @__PURE__ */ jsx(BasicSection, {
|
|
69
|
+
suffixCls,
|
|
70
|
+
...props
|
|
71
|
+
});
|
|
223
72
|
}
|
|
224
|
-
function Footer(
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
({suffixCls: t1, ...props} = t0);
|
|
230
|
-
$[0] = t0;
|
|
231
|
-
$[1] = props;
|
|
232
|
-
$[2] = t1;
|
|
233
|
-
} else {
|
|
234
|
-
props = $[1];
|
|
235
|
-
t1 = $[2];
|
|
236
|
-
}
|
|
237
|
-
const suffixCls = t1 === void 0 ? "layout-footer" : t1;
|
|
238
|
-
let t2;
|
|
239
|
-
if ($[3] !== props || $[4] !== suffixCls) {
|
|
240
|
-
t2 = /* @__PURE__ */ jsx(BasicSection, {
|
|
241
|
-
suffixCls,
|
|
242
|
-
...props
|
|
243
|
-
});
|
|
244
|
-
$[3] = props;
|
|
245
|
-
$[4] = suffixCls;
|
|
246
|
-
$[5] = t2;
|
|
247
|
-
} else t2 = $[5];
|
|
248
|
-
return t2;
|
|
73
|
+
function Footer({ suffixCls = "layout-footer", ...props }) {
|
|
74
|
+
return /* @__PURE__ */ jsx(BasicSection, {
|
|
75
|
+
suffixCls,
|
|
76
|
+
...props
|
|
77
|
+
});
|
|
249
78
|
}
|
|
250
79
|
var Layout = LayoutMain;
|
|
251
80
|
Layout.Header = Header;
|
|
252
81
|
Layout.Footer = Footer;
|
|
253
82
|
Layout.Content = Content;
|
|
254
83
|
Layout.Sider = Sider;
|
|
255
|
-
//#endregion
|
|
256
84
|
export { Content, Footer, Header, Layout, Layout as default, Sider };
|
|
@@ -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,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { createContext } from "react";
|
|
10
|
-
|
|
10
|
+
// components/layout/layout-context.ts
|
|
11
11
|
var SiderHookContext = createContext(null);
|
|
12
|
-
//#endregion
|
|
13
12
|
export { SiderHookContext };
|
package/es/list-panel/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,10 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
import { resolvePaintedTheme, useConfigAppearance } from "../config/use-config-appearance.js";
|
|
10
10
|
import Card from "../card/index.js";
|
|
11
|
-
import { c } from "react/compiler-runtime";
|
|
12
11
|
import clsx from "clsx";
|
|
13
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
-
|
|
13
|
+
// components/list-panel/index.tsx
|
|
15
14
|
var PAINTED_THEMES = [
|
|
16
15
|
"fill",
|
|
17
16
|
"outline",
|
|
@@ -19,189 +18,52 @@ var PAINTED_THEMES = [
|
|
|
19
18
|
"solid",
|
|
20
19
|
"dashed"
|
|
21
20
|
];
|
|
22
|
-
function ListPanel(
|
|
23
|
-
const $ = c(54);
|
|
24
|
-
let actions;
|
|
25
|
-
let children;
|
|
26
|
-
let className;
|
|
27
|
-
let filters;
|
|
28
|
-
let footer;
|
|
29
|
-
let rest;
|
|
30
|
-
let selection;
|
|
31
|
-
let shapeProp;
|
|
32
|
-
let sizeProp;
|
|
33
|
-
let summary;
|
|
34
|
-
let t1;
|
|
35
|
-
let t2;
|
|
36
|
-
let themeProp;
|
|
37
|
-
if ($[0] !== t0) {
|
|
38
|
-
({summary, bordered: t1, theme: themeProp, shape: shapeProp, size: sizeProp, selectedCount: t2, filters, actions, selection, footer, children, className, ...rest} = t0);
|
|
39
|
-
$[0] = t0;
|
|
40
|
-
$[1] = actions;
|
|
41
|
-
$[2] = children;
|
|
42
|
-
$[3] = className;
|
|
43
|
-
$[4] = filters;
|
|
44
|
-
$[5] = footer;
|
|
45
|
-
$[6] = rest;
|
|
46
|
-
$[7] = selection;
|
|
47
|
-
$[8] = shapeProp;
|
|
48
|
-
$[9] = sizeProp;
|
|
49
|
-
$[10] = summary;
|
|
50
|
-
$[11] = t1;
|
|
51
|
-
$[12] = t2;
|
|
52
|
-
$[13] = themeProp;
|
|
53
|
-
} else {
|
|
54
|
-
actions = $[1];
|
|
55
|
-
children = $[2];
|
|
56
|
-
className = $[3];
|
|
57
|
-
filters = $[4];
|
|
58
|
-
footer = $[5];
|
|
59
|
-
rest = $[6];
|
|
60
|
-
selection = $[7];
|
|
61
|
-
shapeProp = $[8];
|
|
62
|
-
sizeProp = $[9];
|
|
63
|
-
summary = $[10];
|
|
64
|
-
t1 = $[11];
|
|
65
|
-
t2 = $[12];
|
|
66
|
-
themeProp = $[13];
|
|
67
|
-
}
|
|
68
|
-
const bordered = t1 === void 0 ? true : t1;
|
|
69
|
-
const selectedCount = t2 === void 0 ? 0 : t2;
|
|
21
|
+
function ListPanel({ summary, bordered = true, theme: themeProp, shape: shapeProp, size: sizeProp, selectedCount = 0, filters, actions, selection, footer, children, className, ...rest }) {
|
|
70
22
|
const inheritedAppearance = useConfigAppearance();
|
|
71
|
-
|
|
72
|
-
if ($[14] !== inheritedAppearance || $[15] !== themeProp) {
|
|
73
|
-
t3 = resolvePaintedTheme(themeProp ?? inheritedAppearance.theme, PAINTED_THEMES) ?? "outline";
|
|
74
|
-
$[14] = inheritedAppearance;
|
|
75
|
-
$[15] = themeProp;
|
|
76
|
-
$[16] = t3;
|
|
77
|
-
} else t3 = $[16];
|
|
78
|
-
const theme = t3;
|
|
23
|
+
const theme = resolvePaintedTheme(themeProp ?? inheritedAppearance.theme, PAINTED_THEMES) ?? "outline";
|
|
79
24
|
const size = sizeProp ?? inheritedAppearance.size ?? "medium";
|
|
80
|
-
const hasNode =
|
|
81
|
-
|
|
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
|
-
children: summary
|
|
124
|
-
}), hasActions && actions]
|
|
125
|
-
})] })
|
|
126
|
-
});
|
|
127
|
-
$[17] = actions;
|
|
128
|
-
$[18] = bordered;
|
|
129
|
-
$[19] = className;
|
|
130
|
-
$[20] = filters;
|
|
131
|
-
$[21] = rest;
|
|
132
|
-
$[22] = selectedCount;
|
|
133
|
-
$[23] = selection;
|
|
134
|
-
$[24] = shapeProp;
|
|
135
|
-
$[25] = size;
|
|
136
|
-
$[26] = summary;
|
|
137
|
-
$[27] = theme;
|
|
138
|
-
$[28] = T0;
|
|
139
|
-
$[29] = t10;
|
|
140
|
-
$[30] = t4;
|
|
141
|
-
$[31] = t5;
|
|
142
|
-
$[32] = t6;
|
|
143
|
-
$[33] = t7;
|
|
144
|
-
$[34] = t8;
|
|
145
|
-
$[35] = t9;
|
|
146
|
-
} else {
|
|
147
|
-
T0 = $[28];
|
|
148
|
-
t10 = $[29];
|
|
149
|
-
t4 = $[30];
|
|
150
|
-
t5 = $[31];
|
|
151
|
-
t6 = $[32];
|
|
152
|
-
t7 = $[33];
|
|
153
|
-
t8 = $[34];
|
|
154
|
-
t9 = $[35];
|
|
155
|
-
}
|
|
156
|
-
let t11;
|
|
157
|
-
if ($[39] !== children) {
|
|
158
|
-
t11 = /* @__PURE__ */ jsx("div", {
|
|
159
|
-
className: "k-list-panel-content",
|
|
160
|
-
children
|
|
161
|
-
});
|
|
162
|
-
$[39] = children;
|
|
163
|
-
$[40] = t11;
|
|
164
|
-
} else t11 = $[40];
|
|
165
|
-
let t12;
|
|
166
|
-
if ($[41] !== footer) {
|
|
167
|
-
t12 = hasNode(footer) && /* @__PURE__ */ jsx("div", {
|
|
168
|
-
className: "k-list-panel-footer",
|
|
169
|
-
children: footer
|
|
170
|
-
});
|
|
171
|
-
$[41] = footer;
|
|
172
|
-
$[42] = t12;
|
|
173
|
-
} else t12 = $[42];
|
|
174
|
-
let t13;
|
|
175
|
-
if ($[43] !== T0 || $[44] !== t10 || $[45] !== t11 || $[46] !== t12 || $[47] !== t4 || $[48] !== t5 || $[49] !== t6 || $[50] !== t7 || $[51] !== t8 || $[52] !== t9) {
|
|
176
|
-
t13 = /* @__PURE__ */ jsxs(T0, {
|
|
177
|
-
...t4,
|
|
178
|
-
className: t5,
|
|
179
|
-
bordered: t6,
|
|
180
|
-
theme: t7,
|
|
181
|
-
shape: t8,
|
|
182
|
-
size: t9,
|
|
183
|
-
children: [
|
|
184
|
-
t10,
|
|
185
|
-
t11,
|
|
186
|
-
t12
|
|
187
|
-
]
|
|
188
|
-
});
|
|
189
|
-
$[43] = T0;
|
|
190
|
-
$[44] = t10;
|
|
191
|
-
$[45] = t11;
|
|
192
|
-
$[46] = t12;
|
|
193
|
-
$[47] = t4;
|
|
194
|
-
$[48] = t5;
|
|
195
|
-
$[49] = t6;
|
|
196
|
-
$[50] = t7;
|
|
197
|
-
$[51] = t8;
|
|
198
|
-
$[52] = t9;
|
|
199
|
-
$[53] = t13;
|
|
200
|
-
} else t13 = $[53];
|
|
201
|
-
return t13;
|
|
25
|
+
const hasNode = (node) => node !== null && node !== void 0 && node !== false;
|
|
26
|
+
const selectionContent = typeof selection === "function" ? selection(selectedCount) : selection;
|
|
27
|
+
const hasSummary = hasNode(summary);
|
|
28
|
+
const hasSelection = Number.isFinite(selectedCount) && selectedCount > 0 && hasNode(selectionContent);
|
|
29
|
+
const hasFilters = hasNode(filters);
|
|
30
|
+
const hasActions = hasNode(actions);
|
|
31
|
+
const hasToolbar = hasFilters || hasActions || hasSummary || hasSelection;
|
|
32
|
+
return /* @__PURE__ */ jsxs(Card, {
|
|
33
|
+
...rest,
|
|
34
|
+
className: clsx("k-list-panel", !bordered && "k-list-panel-borderless", className),
|
|
35
|
+
bordered,
|
|
36
|
+
theme,
|
|
37
|
+
shape: shapeProp,
|
|
38
|
+
size,
|
|
39
|
+
children: [
|
|
40
|
+
hasToolbar && /* @__PURE__ */ jsx("div", {
|
|
41
|
+
className: clsx("k-list-panel-toolbar", hasSelection && "k-list-panel-toolbar-selection"),
|
|
42
|
+
role: "toolbar",
|
|
43
|
+
children: hasSelection ? /* @__PURE__ */ jsx("div", {
|
|
44
|
+
className: "k-list-panel-selection",
|
|
45
|
+
children: selectionContent
|
|
46
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [hasFilters && /* @__PURE__ */ jsx("div", {
|
|
47
|
+
className: "k-list-panel-filters",
|
|
48
|
+
children: filters
|
|
49
|
+
}), (hasSummary || hasActions) && /* @__PURE__ */ jsxs("div", {
|
|
50
|
+
className: "k-list-panel-toolbar-extra",
|
|
51
|
+
children: [hasSummary && /* @__PURE__ */ jsx("div", {
|
|
52
|
+
className: "k-list-panel-summary",
|
|
53
|
+
"aria-live": "polite",
|
|
54
|
+
children: summary
|
|
55
|
+
}), hasActions && actions]
|
|
56
|
+
})] })
|
|
57
|
+
}),
|
|
58
|
+
/* @__PURE__ */ jsx("div", {
|
|
59
|
+
className: "k-list-panel-content",
|
|
60
|
+
children
|
|
61
|
+
}),
|
|
62
|
+
hasNode(footer) && /* @__PURE__ */ jsx("div", {
|
|
63
|
+
className: "k-list-panel-footer",
|
|
64
|
+
children: footer
|
|
65
|
+
})
|
|
66
|
+
]
|
|
67
|
+
});
|
|
202
68
|
}
|
|
203
|
-
function _temp(node) {
|
|
204
|
-
return node !== null && node !== void 0 && node !== false;
|
|
205
|
-
}
|
|
206
|
-
//#endregion
|
|
207
69
|
export { ListPanel as default };
|
package/es/loading/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
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import LoadingBar from "./loading-bar.js";
|
|
10
10
|
import { jsx } from "react/jsx-runtime";
|
|
11
11
|
import { createRoot } from "react-dom/client";
|
|
12
|
-
|
|
12
|
+
// components/loading/index.tsx
|
|
13
13
|
var root = null;
|
|
14
14
|
var instance = null;
|
|
15
15
|
var container = null;
|
|
@@ -65,5 +65,4 @@ var loading = {
|
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
|
-
//#endregion
|
|
69
68
|
export { loading as default };
|