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/empty/index.js
CHANGED
|
@@ -1,132 +1,55 @@
|
|
|
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 { ConfigContext, DEFAULT_LOCALE } from "../config/config-context.js";
|
|
10
9
|
import { Inbox } from "../node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js";
|
|
10
|
+
import { ConfigContext, DEFAULT_LOCALE } from "../config/config-context.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, { useContext } from "react";
|
|
15
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
-
|
|
17
|
-
var Empty = (
|
|
18
|
-
const $ = c(29);
|
|
19
|
-
let children;
|
|
20
|
-
let description;
|
|
21
|
-
let image;
|
|
22
|
-
let imageStyle;
|
|
23
|
-
let rest;
|
|
24
|
-
let t1;
|
|
25
|
-
if ($[0] !== t0) {
|
|
26
|
-
({description, image, imageStyle, children, className: t1, ...rest} = t0);
|
|
27
|
-
$[0] = t0;
|
|
28
|
-
$[1] = children;
|
|
29
|
-
$[2] = description;
|
|
30
|
-
$[3] = image;
|
|
31
|
-
$[4] = imageStyle;
|
|
32
|
-
$[5] = rest;
|
|
33
|
-
$[6] = t1;
|
|
34
|
-
} else {
|
|
35
|
-
children = $[1];
|
|
36
|
-
description = $[2];
|
|
37
|
-
image = $[3];
|
|
38
|
-
imageStyle = $[4];
|
|
39
|
-
rest = $[5];
|
|
40
|
-
t1 = $[6];
|
|
41
|
-
}
|
|
42
|
-
const className = t1 === void 0 ? "" : t1;
|
|
15
|
+
// components/empty/index.tsx
|
|
16
|
+
var Empty = ({ description, image, imageStyle, children, className = "", ...rest }) => {
|
|
43
17
|
const locale = useContext(ConfigContext)?.locale || DEFAULT_LOCALE;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
$[7] = description;
|
|
61
|
-
$[8] = image;
|
|
62
|
-
$[9] = imageStyle;
|
|
63
|
-
$[10] = locale?.k?.empty?.description;
|
|
64
|
-
$[11] = t2;
|
|
65
|
-
} else t2 = $[11];
|
|
66
|
-
const renderImage = t2;
|
|
18
|
+
const renderImage = () => {
|
|
19
|
+
if (!image) return /* @__PURE__ */ jsx(Icon, {
|
|
20
|
+
type: Inbox,
|
|
21
|
+
className: "k-empty-icon",
|
|
22
|
+
strokeWidth: "0.01em"
|
|
23
|
+
});
|
|
24
|
+
if (React.isValidElement(image)) return image;
|
|
25
|
+
return /* @__PURE__ */ jsx("img", {
|
|
26
|
+
src: image,
|
|
27
|
+
className: "k-empty-image",
|
|
28
|
+
style: imageStyle,
|
|
29
|
+
alt: typeof description === "string" ? description : locale?.k?.empty?.description || "Empty state image"
|
|
30
|
+
});
|
|
31
|
+
};
|
|
67
32
|
const descriptionText = typeof description === "string" ? description : locale?.k?.empty?.description;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
t4 = children ? /* @__PURE__ */ jsx("div", {
|
|
82
|
-
className: "k-empty-footer",
|
|
83
|
-
children
|
|
84
|
-
}) : null;
|
|
85
|
-
$[15] = children;
|
|
86
|
-
$[16] = t4;
|
|
87
|
-
} else t4 = $[16];
|
|
88
|
-
const footerNode = t4;
|
|
89
|
-
let t5;
|
|
90
|
-
if ($[17] !== className) {
|
|
91
|
-
t5 = clsx("k-empty", className);
|
|
92
|
-
$[17] = className;
|
|
93
|
-
$[18] = t5;
|
|
94
|
-
} else t5 = $[18];
|
|
95
|
-
const classes = t5;
|
|
96
|
-
let t6;
|
|
97
|
-
if ($[19] !== renderImage) {
|
|
98
|
-
t6 = renderImage();
|
|
99
|
-
$[19] = renderImage;
|
|
100
|
-
$[20] = t6;
|
|
101
|
-
} else t6 = $[20];
|
|
102
|
-
let t7;
|
|
103
|
-
if ($[21] !== descriptionNode || $[22] !== footerNode || $[23] !== t6) {
|
|
104
|
-
t7 = /* @__PURE__ */ jsxs("div", {
|
|
33
|
+
const descriptionNode = description !== false ? /* @__PURE__ */ jsx("p", {
|
|
34
|
+
className: "k-empty-description",
|
|
35
|
+
children: React.isValidElement(description) ? description : descriptionText
|
|
36
|
+
}) : null;
|
|
37
|
+
const footerNode = children ? /* @__PURE__ */ jsx("div", {
|
|
38
|
+
className: "k-empty-footer",
|
|
39
|
+
children
|
|
40
|
+
}) : null;
|
|
41
|
+
const classes = clsx("k-empty", className);
|
|
42
|
+
return /* @__PURE__ */ jsx("div", {
|
|
43
|
+
className: classes,
|
|
44
|
+
...rest,
|
|
45
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
105
46
|
className: "k-empty-content",
|
|
106
47
|
children: [
|
|
107
|
-
|
|
48
|
+
renderImage(),
|
|
108
49
|
descriptionNode,
|
|
109
50
|
footerNode
|
|
110
51
|
]
|
|
111
|
-
})
|
|
112
|
-
|
|
113
|
-
$[22] = footerNode;
|
|
114
|
-
$[23] = t6;
|
|
115
|
-
$[24] = t7;
|
|
116
|
-
} else t7 = $[24];
|
|
117
|
-
let t8;
|
|
118
|
-
if ($[25] !== classes || $[26] !== rest || $[27] !== t7) {
|
|
119
|
-
t8 = /* @__PURE__ */ jsx("div", {
|
|
120
|
-
className: classes,
|
|
121
|
-
...rest,
|
|
122
|
-
children: t7
|
|
123
|
-
});
|
|
124
|
-
$[25] = classes;
|
|
125
|
-
$[26] = rest;
|
|
126
|
-
$[27] = t7;
|
|
127
|
-
$[28] = t8;
|
|
128
|
-
} else t8 = $[28];
|
|
129
|
-
return t8;
|
|
52
|
+
})
|
|
53
|
+
});
|
|
130
54
|
};
|
|
131
|
-
//#endregion
|
|
132
55
|
export { Empty as default };
|
package/es/feature-card/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
|
|
@@ -11,7 +11,7 @@ import Icon from "../icon/index.js";
|
|
|
11
11
|
import { wash } from "../utils/color.js";
|
|
12
12
|
import clsx from "clsx";
|
|
13
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
-
|
|
14
|
+
// components/feature-card/index.tsx
|
|
15
15
|
var PAINTED_THEMES = [
|
|
16
16
|
"fill",
|
|
17
17
|
"outline",
|
|
@@ -81,5 +81,4 @@ function FeatureCard({ icon, title, desc, bordered = false, theme: themeProp, sh
|
|
|
81
81
|
]
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
|
-
//#endregion
|
|
85
84
|
export { FeatureCard as default };
|
|
@@ -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,11 +9,10 @@
|
|
|
9
9
|
import { normalizeSurfaceShape, resolvePaintedTheme, useConfigAppearance } from "../config/use-config-appearance.js";
|
|
10
10
|
import { CircleCheck, CircleX, Info, TriangleAlert } from "../node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.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 { isValidElement } from "react";
|
|
15
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
-
|
|
15
|
+
// components/feedback-panel/index.tsx
|
|
17
16
|
var PAINTED_THEMES = [
|
|
18
17
|
"fill",
|
|
19
18
|
"outline",
|
|
@@ -27,167 +26,43 @@ var symbols = {
|
|
|
27
26
|
caution: TriangleAlert,
|
|
28
27
|
neutral: Info
|
|
29
28
|
};
|
|
30
|
-
function FeedbackPanel(
|
|
31
|
-
const $ = c(46);
|
|
32
|
-
let actions;
|
|
33
|
-
let children;
|
|
34
|
-
let className;
|
|
35
|
-
let description;
|
|
36
|
-
let heading;
|
|
37
|
-
let rest;
|
|
38
|
-
let shapeProp;
|
|
39
|
-
let symbol;
|
|
40
|
-
let t1;
|
|
41
|
-
let t2;
|
|
42
|
-
let themeProp;
|
|
43
|
-
if ($[0] !== t0) {
|
|
44
|
-
({kind: t1, heading, description, symbol, compact: t2, actions, theme: themeProp, shape: shapeProp, children, className, ...rest} = t0);
|
|
45
|
-
$[0] = t0;
|
|
46
|
-
$[1] = actions;
|
|
47
|
-
$[2] = children;
|
|
48
|
-
$[3] = className;
|
|
49
|
-
$[4] = description;
|
|
50
|
-
$[5] = heading;
|
|
51
|
-
$[6] = rest;
|
|
52
|
-
$[7] = shapeProp;
|
|
53
|
-
$[8] = symbol;
|
|
54
|
-
$[9] = t1;
|
|
55
|
-
$[10] = t2;
|
|
56
|
-
$[11] = themeProp;
|
|
57
|
-
} else {
|
|
58
|
-
actions = $[1];
|
|
59
|
-
children = $[2];
|
|
60
|
-
className = $[3];
|
|
61
|
-
description = $[4];
|
|
62
|
-
heading = $[5];
|
|
63
|
-
rest = $[6];
|
|
64
|
-
shapeProp = $[7];
|
|
65
|
-
symbol = $[8];
|
|
66
|
-
t1 = $[9];
|
|
67
|
-
t2 = $[10];
|
|
68
|
-
themeProp = $[11];
|
|
69
|
-
}
|
|
70
|
-
const kind = t1 === void 0 ? "neutral" : t1;
|
|
71
|
-
const compact = t2 === void 0 ? false : t2;
|
|
29
|
+
function FeedbackPanel({ kind = "neutral", heading, description, symbol, compact = false, actions, theme: themeProp, shape: shapeProp, children, className, ...rest }) {
|
|
72
30
|
const inheritedAppearance = useConfigAppearance();
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const t4 = shapeProp ?? inheritedAppearance.shape ?? "round";
|
|
82
|
-
let t5;
|
|
83
|
-
if ($[15] !== t4) {
|
|
84
|
-
t5 = normalizeSurfaceShape(t4);
|
|
85
|
-
$[15] = t4;
|
|
86
|
-
$[16] = t5;
|
|
87
|
-
} else t5 = $[16];
|
|
88
|
-
const shape = t5;
|
|
89
|
-
let t6;
|
|
90
|
-
if ($[17] !== kind || $[18] !== symbol) {
|
|
91
|
-
t6 = symbol == null || Array.isArray(symbol) ? /* @__PURE__ */ jsx(Icon, { type: symbol ?? symbols[kind] }) : isValidElement(symbol) || typeof symbol !== "object" ? symbol : null;
|
|
92
|
-
$[17] = kind;
|
|
93
|
-
$[18] = symbol;
|
|
94
|
-
$[19] = t6;
|
|
95
|
-
} else t6 = $[19];
|
|
96
|
-
const symbolNode = t6;
|
|
97
|
-
const t7 = `k-feedback-panel-${kind}`;
|
|
98
|
-
const t8 = `k-feedback-panel-${theme}`;
|
|
99
|
-
const t9 = `k-feedback-panel-shape-${shape}`;
|
|
100
|
-
let t10;
|
|
101
|
-
if ($[20] !== className || $[21] !== compact || $[22] !== t7 || $[23] !== t8 || $[24] !== t9) {
|
|
102
|
-
t10 = clsx("k-feedback-panel", t7, t8, t9, { "k-feedback-panel-compact": compact }, className);
|
|
103
|
-
$[20] = className;
|
|
104
|
-
$[21] = compact;
|
|
105
|
-
$[22] = t7;
|
|
106
|
-
$[23] = t8;
|
|
107
|
-
$[24] = t9;
|
|
108
|
-
$[25] = t10;
|
|
109
|
-
} else t10 = $[25];
|
|
110
|
-
let t11;
|
|
111
|
-
if ($[26] !== symbolNode) {
|
|
112
|
-
t11 = /* @__PURE__ */ jsx("div", {
|
|
31
|
+
const theme = resolvePaintedTheme(themeProp ?? inheritedAppearance.theme, PAINTED_THEMES) ?? "outline";
|
|
32
|
+
const shape = normalizeSurfaceShape(shapeProp ?? inheritedAppearance.shape ?? "round");
|
|
33
|
+
const symbolNode = symbol == null || Array.isArray(symbol) ? /* @__PURE__ */ jsx(Icon, { type: symbol ?? symbols[kind] }) : isValidElement(symbol) || typeof symbol !== "object" ? symbol : null;
|
|
34
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
35
|
+
...rest,
|
|
36
|
+
className: clsx("k-feedback-panel", `k-feedback-panel-${kind}`, `k-feedback-panel-${theme}`, `k-feedback-panel-shape-${shape}`, { "k-feedback-panel-compact": compact }, className),
|
|
37
|
+
"aria-live": "polite",
|
|
38
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
113
39
|
className: "k-feedback-panel-mark",
|
|
114
40
|
"aria-hidden": "true",
|
|
115
41
|
children: /* @__PURE__ */ jsx("span", {
|
|
116
42
|
className: "k-feedback-panel-mark-inner",
|
|
117
43
|
children: symbolNode
|
|
118
44
|
})
|
|
119
|
-
})
|
|
120
|
-
$[26] = symbolNode;
|
|
121
|
-
$[27] = t11;
|
|
122
|
-
} else t11 = $[27];
|
|
123
|
-
let t12;
|
|
124
|
-
if ($[28] !== heading) {
|
|
125
|
-
t12 = heading != null && /* @__PURE__ */ jsx("div", {
|
|
126
|
-
className: "k-feedback-panel-heading",
|
|
127
|
-
children: heading
|
|
128
|
-
});
|
|
129
|
-
$[28] = heading;
|
|
130
|
-
$[29] = t12;
|
|
131
|
-
} else t12 = $[29];
|
|
132
|
-
let t13;
|
|
133
|
-
if ($[30] !== description) {
|
|
134
|
-
t13 = description != null && /* @__PURE__ */ jsx("div", {
|
|
135
|
-
className: "k-feedback-panel-description",
|
|
136
|
-
children: description
|
|
137
|
-
});
|
|
138
|
-
$[30] = description;
|
|
139
|
-
$[31] = t13;
|
|
140
|
-
} else t13 = $[31];
|
|
141
|
-
let t14;
|
|
142
|
-
if ($[32] !== children) {
|
|
143
|
-
t14 = children != null && /* @__PURE__ */ jsx("div", {
|
|
144
|
-
className: "k-feedback-panel-details",
|
|
145
|
-
children
|
|
146
|
-
});
|
|
147
|
-
$[32] = children;
|
|
148
|
-
$[33] = t14;
|
|
149
|
-
} else t14 = $[33];
|
|
150
|
-
let t15;
|
|
151
|
-
if ($[34] !== actions) {
|
|
152
|
-
t15 = actions != null && /* @__PURE__ */ jsx("div", {
|
|
153
|
-
className: "k-feedback-panel-actions",
|
|
154
|
-
children: actions
|
|
155
|
-
});
|
|
156
|
-
$[34] = actions;
|
|
157
|
-
$[35] = t15;
|
|
158
|
-
} else t15 = $[35];
|
|
159
|
-
let t16;
|
|
160
|
-
if ($[36] !== t12 || $[37] !== t13 || $[38] !== t14 || $[39] !== t15) {
|
|
161
|
-
t16 = /* @__PURE__ */ jsxs("div", {
|
|
45
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
162
46
|
className: "k-feedback-panel-main",
|
|
163
47
|
children: [
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
48
|
+
heading != null && /* @__PURE__ */ jsx("div", {
|
|
49
|
+
className: "k-feedback-panel-heading",
|
|
50
|
+
children: heading
|
|
51
|
+
}),
|
|
52
|
+
description != null && /* @__PURE__ */ jsx("div", {
|
|
53
|
+
className: "k-feedback-panel-description",
|
|
54
|
+
children: description
|
|
55
|
+
}),
|
|
56
|
+
children != null && /* @__PURE__ */ jsx("div", {
|
|
57
|
+
className: "k-feedback-panel-details",
|
|
58
|
+
children
|
|
59
|
+
}),
|
|
60
|
+
actions != null && /* @__PURE__ */ jsx("div", {
|
|
61
|
+
className: "k-feedback-panel-actions",
|
|
62
|
+
children: actions
|
|
63
|
+
})
|
|
168
64
|
]
|
|
169
|
-
})
|
|
170
|
-
|
|
171
|
-
$[37] = t13;
|
|
172
|
-
$[38] = t14;
|
|
173
|
-
$[39] = t15;
|
|
174
|
-
$[40] = t16;
|
|
175
|
-
} else t16 = $[40];
|
|
176
|
-
let t17;
|
|
177
|
-
if ($[41] !== rest || $[42] !== t10 || $[43] !== t11 || $[44] !== t16) {
|
|
178
|
-
t17 = /* @__PURE__ */ jsxs("section", {
|
|
179
|
-
...rest,
|
|
180
|
-
className: t10,
|
|
181
|
-
"aria-live": "polite",
|
|
182
|
-
children: [t11, t16]
|
|
183
|
-
});
|
|
184
|
-
$[41] = rest;
|
|
185
|
-
$[42] = t10;
|
|
186
|
-
$[43] = t11;
|
|
187
|
-
$[44] = t16;
|
|
188
|
-
$[45] = t17;
|
|
189
|
-
} else t17 = $[45];
|
|
190
|
-
return t17;
|
|
65
|
+
})]
|
|
66
|
+
});
|
|
191
67
|
}
|
|
192
|
-
//#endregion
|
|
193
68
|
export { FeedbackPanel as default };
|
package/es/flame-wrap/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,10 +7,10 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { createFlameWrap, htmlInCanvasMarkup, supportsHtmlInCanvas } from "./types.js";
|
|
10
|
-
import { c } from "react/compiler-runtime";
|
|
11
10
|
import { useEffect, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
|
|
12
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
|
|
12
|
+
import { c } from "react/compiler-runtime";
|
|
13
|
+
// components/flame-wrap/index.tsx
|
|
14
14
|
/**
|
|
15
15
|
* Adapted from Canvas UI by David Haz (DavidHDev).
|
|
16
16
|
* Source: https://github.com/DavidHDev/canvas-ui
|
|
@@ -265,5 +265,4 @@ function FlameWrap(t0) {
|
|
|
265
265
|
function _temp() {
|
|
266
266
|
return false;
|
|
267
267
|
}
|
|
268
|
-
//#endregion
|
|
269
268
|
export { FlameWrap, FlameWrap as default };
|
package/es/flame-wrap/types.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,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import "react";
|
|
10
|
-
|
|
10
|
+
// components/flame-wrap/types.ts
|
|
11
11
|
var DEFAULTS = {
|
|
12
12
|
color: [
|
|
13
13
|
.31,
|
|
@@ -637,5 +637,4 @@ function createFlameWrap(elements, options = {}) {
|
|
|
637
637
|
}
|
|
638
638
|
};
|
|
639
639
|
}
|
|
640
|
-
//#endregion
|
|
641
640
|
export { createFlameWrap, htmlInCanvasMarkup, supportsHtmlInCanvas };
|
package/es/flex/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 clsx from "clsx";
|
|
10
10
|
import "react";
|
|
11
11
|
import { jsx } from "react/jsx-runtime";
|
|
12
|
-
|
|
12
|
+
// components/flex/index.tsx
|
|
13
13
|
var Flex = ({ align, justify, vertical = false, wrap = false, size, children, className = "", style, ...rest }) => {
|
|
14
14
|
const currentAlign = !vertical && !align ? "center" : align;
|
|
15
15
|
const flexStyle = {};
|
|
@@ -42,5 +42,4 @@ var Flex = ({ align, justify, vertical = false, wrap = false, size, children, cl
|
|
|
42
42
|
children
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
|
-
//#endregion
|
|
46
45
|
export { Flex as default };
|
package/es/form/field-context.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,9 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { FormContext } from "./form-context.js";
|
|
10
|
-
import { c } from "react/compiler-runtime";
|
|
11
10
|
import { createContext, createElement, useContext } from "react";
|
|
12
|
-
|
|
11
|
+
import { c } from "react/compiler-runtime";
|
|
12
|
+
// components/form/field-context.ts
|
|
13
13
|
var FormFieldContext = createContext(void 0);
|
|
14
14
|
var formFieldComponents = /* @__PURE__ */ new WeakSet();
|
|
15
15
|
var resolveFormControlAttrs = (props, field) => ({
|
|
@@ -112,5 +112,4 @@ function createFormFieldComponent(Component, adapter = {}) {
|
|
|
112
112
|
function FormFieldProvider({ value, children }) {
|
|
113
113
|
return createElement(FormFieldContext.Provider, { value }, children);
|
|
114
114
|
}
|
|
115
|
-
//#endregion
|
|
116
115
|
export { FormFieldContext, FormFieldProvider, createFormFieldComponent, isFormFieldComponent, isFormFieldWrapper, markFormFieldWrapper, resolveFormControlAttrs };
|
package/es/form/form-context.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,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { createContext } from "react";
|
|
10
|
-
|
|
10
|
+
// components/form/form-context.ts
|
|
11
11
|
var FormContext = createContext(null);
|
|
12
|
-
//#endregion
|
|
13
12
|
export { FormContext };
|
package/es/form/form-item.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,14 +8,14 @@
|
|
|
8
8
|
|
|
9
9
|
import { ConfigContext, DEFAULT_LOCALE } from "../config/config-context.js";
|
|
10
10
|
import { Transition } from "../base/transition.js";
|
|
11
|
-
import { FormContext } from "./form-context.js";
|
|
12
|
-
import { FormFieldProvider, isFormFieldComponent, isFormFieldWrapper } from "./field-context.js";
|
|
13
11
|
import Col from "../row-col/col.js";
|
|
14
12
|
import Row from "../row-col/row.js";
|
|
13
|
+
import { FormContext } from "./form-context.js";
|
|
14
|
+
import { FormFieldProvider, isFormFieldComponent, isFormFieldWrapper } from "./field-context.js";
|
|
15
15
|
import clsx from "clsx";
|
|
16
16
|
import { Children, cloneElement, isValidElement, useCallback, useContext, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
17
17
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
-
|
|
18
|
+
// components/form/form-item.tsx
|
|
19
19
|
var PASS = { ok: true };
|
|
20
20
|
var NO_VALUE_OVERRIDE = Symbol("no-value-override");
|
|
21
21
|
var validationVersions = /* @__PURE__ */ new WeakMap();
|
|
@@ -324,5 +324,4 @@ function FormItem({ label, prop, labelCol, wrapperCol, rules, colon, children })
|
|
|
324
324
|
})]
|
|
325
325
|
});
|
|
326
326
|
}
|
|
327
|
-
//#endregion
|
|
328
327
|
export { FormItem as default };
|