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/rate/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,246 +9,88 @@
|
|
|
9
9
|
import { useValue } from "../utils/use-value.js";
|
|
10
10
|
import { createFormFieldComponent } from "../form/field-context.js";
|
|
11
11
|
import Star from "./star.js";
|
|
12
|
-
import { c } from "react/compiler-runtime";
|
|
13
12
|
import clsx from "clsx";
|
|
14
13
|
import { useState } from "react";
|
|
15
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
-
|
|
17
|
-
var Rate = (
|
|
18
|
-
const
|
|
19
|
-
let character;
|
|
20
|
-
let color;
|
|
21
|
-
let icon;
|
|
22
|
-
let onChange;
|
|
23
|
-
let rest;
|
|
24
|
-
let size;
|
|
25
|
-
let style;
|
|
26
|
-
let t1;
|
|
27
|
-
let t10;
|
|
28
|
-
let t2;
|
|
29
|
-
let t3;
|
|
30
|
-
let t4;
|
|
31
|
-
let t5;
|
|
32
|
-
let t6;
|
|
33
|
-
let t7;
|
|
34
|
-
let t8;
|
|
35
|
-
let t9;
|
|
36
|
-
let value;
|
|
37
|
-
if ($[0] !== t0) {
|
|
38
|
-
({value, allowClear: t1, allowHalf: t2, color, size, showScore: t3, tooltips: t4, disabled: t5, readOnly: t6, count: t7, character, icon, symbolReverseFill: t8, strokeWidth: t9, onChange, className: t10, style, ...rest} = t0);
|
|
39
|
-
$[0] = t0;
|
|
40
|
-
$[1] = character;
|
|
41
|
-
$[2] = color;
|
|
42
|
-
$[3] = icon;
|
|
43
|
-
$[4] = onChange;
|
|
44
|
-
$[5] = rest;
|
|
45
|
-
$[6] = size;
|
|
46
|
-
$[7] = style;
|
|
47
|
-
$[8] = t1;
|
|
48
|
-
$[9] = t10;
|
|
49
|
-
$[10] = t2;
|
|
50
|
-
$[11] = t3;
|
|
51
|
-
$[12] = t4;
|
|
52
|
-
$[13] = t5;
|
|
53
|
-
$[14] = t6;
|
|
54
|
-
$[15] = t7;
|
|
55
|
-
$[16] = t8;
|
|
56
|
-
$[17] = t9;
|
|
57
|
-
$[18] = value;
|
|
58
|
-
} else {
|
|
59
|
-
character = $[1];
|
|
60
|
-
color = $[2];
|
|
61
|
-
icon = $[3];
|
|
62
|
-
onChange = $[4];
|
|
63
|
-
rest = $[5];
|
|
64
|
-
size = $[6];
|
|
65
|
-
style = $[7];
|
|
66
|
-
t1 = $[8];
|
|
67
|
-
t10 = $[9];
|
|
68
|
-
t2 = $[10];
|
|
69
|
-
t3 = $[11];
|
|
70
|
-
t4 = $[12];
|
|
71
|
-
t5 = $[13];
|
|
72
|
-
t6 = $[14];
|
|
73
|
-
t7 = $[15];
|
|
74
|
-
t8 = $[16];
|
|
75
|
-
t9 = $[17];
|
|
76
|
-
value = $[18];
|
|
77
|
-
}
|
|
78
|
-
const allowClear = t1 === void 0 ? true : t1;
|
|
79
|
-
const allowHalf = t2 === void 0 ? false : t2;
|
|
80
|
-
const showScore = t3 === void 0 ? false : t3;
|
|
81
|
-
let t11;
|
|
82
|
-
if ($[19] !== t4) {
|
|
83
|
-
t11 = t4 === void 0 ? [] : t4;
|
|
84
|
-
$[19] = t4;
|
|
85
|
-
$[20] = t11;
|
|
86
|
-
} else t11 = $[20];
|
|
87
|
-
const tooltips = t11;
|
|
88
|
-
const disabled = t5 === void 0 ? false : t5;
|
|
89
|
-
const readOnly = t6 === void 0 ? false : t6;
|
|
90
|
-
const count = t7 === void 0 ? 5 : t7;
|
|
91
|
-
const symbolReverseFill = t8 === void 0 ? false : t8;
|
|
92
|
-
const strokeWidth = t9 === void 0 ? 1 : t9;
|
|
93
|
-
const className = t10 === void 0 ? "" : t10;
|
|
94
|
-
const [innerValue, setInnerValue] = useValue(value, _temp);
|
|
15
|
+
// components/rate/index.tsx
|
|
16
|
+
var Rate = ({ value, allowClear = true, allowHalf = false, color, size, showScore = false, tooltips = [], disabled = false, readOnly = false, count = 5, character, icon, symbolReverseFill = false, strokeWidth = 1, onChange, className = "", style, ...rest }) => {
|
|
17
|
+
const [innerValue, setInnerValue] = useValue(value, (next) => Number(next ?? 0));
|
|
95
18
|
const [tempValue, setTempValue] = useState(null);
|
|
96
19
|
const [cleared, setCleared] = useState(false);
|
|
97
20
|
const currentValue = innerValue;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
if (
|
|
102
|
-
if (
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
$[23] = cleared;
|
|
121
|
-
$[24] = currentValue;
|
|
122
|
-
$[25] = disabled;
|
|
123
|
-
$[26] = onChange;
|
|
124
|
-
$[27] = readOnly;
|
|
125
|
-
$[28] = setInnerValue;
|
|
126
|
-
$[29] = t12;
|
|
127
|
-
} else t12 = $[29];
|
|
128
|
-
const update = t12;
|
|
129
|
-
let t13;
|
|
130
|
-
if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
|
|
131
|
-
t13 = () => {
|
|
132
|
-
setTempValue(null);
|
|
133
|
-
setCleared(false);
|
|
134
|
-
};
|
|
135
|
-
$[30] = t13;
|
|
136
|
-
} else t13 = $[30];
|
|
137
|
-
const mouseLeave = t13;
|
|
21
|
+
const update = (t, index, percent) => {
|
|
22
|
+
if (disabled || readOnly) return;
|
|
23
|
+
if (t === "M") {
|
|
24
|
+
if (cleared) return;
|
|
25
|
+
if (allowHalf) setTempValue(index - (percent < .5 ? .5 : 0));
|
|
26
|
+
else setTempValue(index);
|
|
27
|
+
} else {
|
|
28
|
+
let v = index - (allowHalf ? percent < .5 ? .5 : 0 : 0);
|
|
29
|
+
v = parseFloat(v.toFixed(2));
|
|
30
|
+
const nextValue = v === currentValue && allowClear ? 0 : v;
|
|
31
|
+
setInnerValue(nextValue);
|
|
32
|
+
if (nextValue === 0) {
|
|
33
|
+
setCleared(true);
|
|
34
|
+
setTempValue(null);
|
|
35
|
+
} else setCleared(false);
|
|
36
|
+
onChange?.(nextValue);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
const mouseLeave = () => {
|
|
40
|
+
setTempValue(null);
|
|
41
|
+
setCleared(false);
|
|
42
|
+
};
|
|
138
43
|
const tpValue = !disabled && !readOnly && tempValue !== null ? tempValue : currentValue;
|
|
139
44
|
let actualCount = count;
|
|
140
45
|
if (isNaN(Number(count)) || count <= 0) actualCount = 5;
|
|
141
46
|
if (actualCount > 15) actualCount = 15;
|
|
142
47
|
let numSize;
|
|
143
|
-
if (typeof size === "string") {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
$[32] = actualCount;
|
|
179
|
-
$[33] = allowHalf;
|
|
180
|
-
$[34] = character;
|
|
181
|
-
$[35] = disabled;
|
|
182
|
-
$[36] = icon;
|
|
183
|
-
$[37] = numSize;
|
|
184
|
-
$[38] = readOnly;
|
|
185
|
-
$[39] = strokeWidth;
|
|
186
|
-
$[40] = symbolReverseFill;
|
|
187
|
-
$[41] = tooltips;
|
|
188
|
-
$[42] = tpValue;
|
|
189
|
-
$[43] = update;
|
|
190
|
-
$[44] = stars;
|
|
191
|
-
} else stars = $[44];
|
|
192
|
-
const t14 = numSize ? `${numSize}px` : void 0;
|
|
193
|
-
const t15 = color || void 0;
|
|
194
|
-
let t16;
|
|
195
|
-
if ($[45] !== style || $[46] !== t14 || $[47] !== t15) {
|
|
196
|
-
t16 = {
|
|
197
|
-
fontSize: t14,
|
|
198
|
-
color: t15,
|
|
199
|
-
...style
|
|
200
|
-
};
|
|
201
|
-
$[45] = style;
|
|
202
|
-
$[46] = t14;
|
|
203
|
-
$[47] = t15;
|
|
204
|
-
$[48] = t16;
|
|
205
|
-
} else t16 = $[48];
|
|
206
|
-
const containerStyle = t16;
|
|
207
|
-
let t17;
|
|
208
|
-
if ($[49] !== className || $[50] !== disabled || $[51] !== readOnly) {
|
|
209
|
-
t17 = clsx("k-rate", {
|
|
48
|
+
if (typeof size === "string") numSize = {
|
|
49
|
+
small: 20,
|
|
50
|
+
medium: 24,
|
|
51
|
+
large: 32,
|
|
52
|
+
default: 24
|
|
53
|
+
}[size] ?? 24;
|
|
54
|
+
else numSize = size;
|
|
55
|
+
const stars = [];
|
|
56
|
+
for (let i = 1; i <= actualCount; i++) {
|
|
57
|
+
const mod = i - tpValue;
|
|
58
|
+
const starPercent = (1 - (i - tpValue)) * 100;
|
|
59
|
+
stars.push(/* @__PURE__ */ jsx(Star, {
|
|
60
|
+
allowHalf,
|
|
61
|
+
full: tpValue >= i,
|
|
62
|
+
half: mod > 0 && mod < 1,
|
|
63
|
+
icon,
|
|
64
|
+
character,
|
|
65
|
+
size: numSize,
|
|
66
|
+
disabled: disabled || readOnly,
|
|
67
|
+
percent: starPercent < 100 ? starPercent : void 0,
|
|
68
|
+
tooltips: tooltips[i - 1],
|
|
69
|
+
index: i,
|
|
70
|
+
symbolReverseFill,
|
|
71
|
+
strokeWidth,
|
|
72
|
+
onUpdate: update
|
|
73
|
+
}, i));
|
|
74
|
+
}
|
|
75
|
+
const containerStyle = {
|
|
76
|
+
fontSize: numSize ? `${numSize}px` : void 0,
|
|
77
|
+
color: color || void 0,
|
|
78
|
+
...style
|
|
79
|
+
};
|
|
80
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
81
|
+
className: clsx("k-rate", {
|
|
210
82
|
"k-rate-disabled": disabled,
|
|
211
83
|
"k-rate-readonly": readOnly
|
|
212
|
-
}, className)
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
const t18 = readOnly || void 0;
|
|
219
|
-
let t19;
|
|
220
|
-
if ($[53] !== currentValue || $[54] !== showScore) {
|
|
221
|
-
t19 = showScore ? /* @__PURE__ */ jsx("span", {
|
|
84
|
+
}, className),
|
|
85
|
+
"aria-readonly": readOnly || void 0,
|
|
86
|
+
style: containerStyle,
|
|
87
|
+
onMouseLeave: mouseLeave,
|
|
88
|
+
...rest,
|
|
89
|
+
children: [stars, showScore ? /* @__PURE__ */ jsx("span", {
|
|
222
90
|
className: "k-rate-score",
|
|
223
91
|
children: currentValue
|
|
224
|
-
}) : null
|
|
225
|
-
|
|
226
|
-
$[54] = showScore;
|
|
227
|
-
$[55] = t19;
|
|
228
|
-
} else t19 = $[55];
|
|
229
|
-
let t20;
|
|
230
|
-
if ($[56] !== containerStyle || $[57] !== rest || $[58] !== stars || $[59] !== t17 || $[60] !== t18 || $[61] !== t19) {
|
|
231
|
-
t20 = /* @__PURE__ */ jsxs("div", {
|
|
232
|
-
className: t17,
|
|
233
|
-
"aria-readonly": t18,
|
|
234
|
-
style: containerStyle,
|
|
235
|
-
onMouseLeave: mouseLeave,
|
|
236
|
-
...rest,
|
|
237
|
-
children: [stars, t19]
|
|
238
|
-
});
|
|
239
|
-
$[56] = containerStyle;
|
|
240
|
-
$[57] = rest;
|
|
241
|
-
$[58] = stars;
|
|
242
|
-
$[59] = t17;
|
|
243
|
-
$[60] = t18;
|
|
244
|
-
$[61] = t19;
|
|
245
|
-
$[62] = t20;
|
|
246
|
-
} else t20 = $[62];
|
|
247
|
-
return t20;
|
|
92
|
+
}) : null]
|
|
93
|
+
});
|
|
248
94
|
};
|
|
249
95
|
var rate_default = createFormFieldComponent(Rate, { inherit: ["size", "disabled"] });
|
|
250
|
-
function _temp(next) {
|
|
251
|
-
return Number(next ?? 0);
|
|
252
|
-
}
|
|
253
|
-
//#endregion
|
|
254
96
|
export { rate_default as default };
|
package/es/rate/star.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,142 +9,51 @@
|
|
|
9
9
|
import { Star as Star$1 } from "../node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js";
|
|
10
10
|
import Icon from "../icon/index.js";
|
|
11
11
|
import Tooltip from "../tooltip/index.js";
|
|
12
|
-
import { c } from "react/compiler-runtime";
|
|
13
12
|
import clsx from "clsx";
|
|
14
13
|
import "react";
|
|
15
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
-
|
|
17
|
-
var Star = (
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const { clientX } = e;
|
|
31
|
-
let p = 0;
|
|
32
|
-
if (target) {
|
|
33
|
-
const { left, width } = target.getBoundingClientRect();
|
|
34
|
-
p = (clientX - left) / width;
|
|
35
|
-
}
|
|
36
|
-
onUpdate?.(t, index, p);
|
|
37
|
-
};
|
|
38
|
-
$[0] = disabled;
|
|
39
|
-
$[1] = index;
|
|
40
|
-
$[2] = onUpdate;
|
|
41
|
-
$[3] = t6;
|
|
42
|
-
} else t6 = $[3];
|
|
43
|
-
const handleEvent = t6;
|
|
44
|
-
let t7;
|
|
45
|
-
if ($[4] !== icon || $[5] !== index) {
|
|
46
|
-
t7 = typeof icon === "function" ? icon(index) : icon;
|
|
47
|
-
$[4] = icon;
|
|
48
|
-
$[5] = index;
|
|
49
|
-
$[6] = t7;
|
|
50
|
-
} else t7 = $[6];
|
|
51
|
-
const iconType = t7;
|
|
15
|
+
// components/rate/star.tsx
|
|
16
|
+
var Star = ({ character, tooltips, percent, full = false, half = false, disabled = false, icon, size, index, symbolReverseFill = false, strokeWidth = 1, onUpdate }) => {
|
|
17
|
+
const handleEvent = (e, t) => {
|
|
18
|
+
if (disabled) return;
|
|
19
|
+
const target = e.currentTarget;
|
|
20
|
+
const { clientX } = e;
|
|
21
|
+
let p = 0;
|
|
22
|
+
if (target) {
|
|
23
|
+
const { left, width } = target.getBoundingClientRect();
|
|
24
|
+
p = (clientX - left) / width;
|
|
25
|
+
}
|
|
26
|
+
onUpdate?.(t, index, p);
|
|
27
|
+
};
|
|
28
|
+
const iconType = typeof icon === "function" ? icon(index) : icon;
|
|
52
29
|
const reverse = symbolReverseFill || !iconType;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
const characterNode = t8;
|
|
70
|
-
let t9;
|
|
71
|
-
if ($[14] !== full || $[15] !== half) {
|
|
72
|
-
t9 = clsx("k-star", {
|
|
73
|
-
"k-star-full": full,
|
|
74
|
-
"k-star-half": half
|
|
75
|
-
});
|
|
76
|
-
$[14] = full;
|
|
77
|
-
$[15] = half;
|
|
78
|
-
$[16] = t9;
|
|
79
|
-
} else t9 = $[16];
|
|
80
|
-
const classes = t9;
|
|
81
|
-
const t10 = disabled && percent !== void 0 ? `${percent}%` : void 0;
|
|
82
|
-
let t11;
|
|
83
|
-
if ($[17] !== t10) {
|
|
84
|
-
t11 = { width: t10 };
|
|
85
|
-
$[17] = t10;
|
|
86
|
-
$[18] = t11;
|
|
87
|
-
} else t11 = $[18];
|
|
88
|
-
const frontStyle = t11;
|
|
89
|
-
let t12;
|
|
90
|
-
let t13;
|
|
91
|
-
if ($[19] !== handleEvent) {
|
|
92
|
-
t12 = (e_0) => handleEvent(e_0, "C");
|
|
93
|
-
t13 = (e_1) => handleEvent(e_1, "M");
|
|
94
|
-
$[19] = handleEvent;
|
|
95
|
-
$[20] = t12;
|
|
96
|
-
$[21] = t13;
|
|
97
|
-
} else {
|
|
98
|
-
t12 = $[20];
|
|
99
|
-
t13 = $[21];
|
|
100
|
-
}
|
|
101
|
-
let t14;
|
|
102
|
-
if ($[22] !== characterNode || $[23] !== frontStyle) {
|
|
103
|
-
t14 = /* @__PURE__ */ jsx("span", {
|
|
30
|
+
const characterNode = (typeof character === "function" ? character(index) : character) || /* @__PURE__ */ jsx(Icon, {
|
|
31
|
+
type: iconType || Star$1,
|
|
32
|
+
size,
|
|
33
|
+
reverseFill: reverse,
|
|
34
|
+
strokeWidth
|
|
35
|
+
});
|
|
36
|
+
const classes = clsx("k-star", {
|
|
37
|
+
"k-star-full": full,
|
|
38
|
+
"k-star-half": half
|
|
39
|
+
});
|
|
40
|
+
const frontStyle = { width: disabled && percent !== void 0 ? `${percent}%` : void 0 };
|
|
41
|
+
const node = /* @__PURE__ */ jsxs("span", {
|
|
42
|
+
className: classes,
|
|
43
|
+
onClick: (e_0) => handleEvent(e_0, "C"),
|
|
44
|
+
onMouseMove: (e_1) => handleEvent(e_1, "M"),
|
|
45
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
104
46
|
className: "k-star-front",
|
|
105
47
|
style: frontStyle,
|
|
106
48
|
children: characterNode
|
|
107
|
-
})
|
|
108
|
-
$[22] = characterNode;
|
|
109
|
-
$[23] = frontStyle;
|
|
110
|
-
$[24] = t14;
|
|
111
|
-
} else t14 = $[24];
|
|
112
|
-
let t15;
|
|
113
|
-
if ($[25] !== characterNode) {
|
|
114
|
-
t15 = /* @__PURE__ */ jsx("span", {
|
|
49
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
115
50
|
className: "k-star-back",
|
|
116
51
|
children: characterNode
|
|
117
|
-
})
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
t16 = /* @__PURE__ */ jsxs("span", {
|
|
124
|
-
className: classes,
|
|
125
|
-
onClick: t12,
|
|
126
|
-
onMouseMove: t13,
|
|
127
|
-
children: [t14, t15]
|
|
128
|
-
});
|
|
129
|
-
$[27] = classes;
|
|
130
|
-
$[28] = t12;
|
|
131
|
-
$[29] = t13;
|
|
132
|
-
$[30] = t14;
|
|
133
|
-
$[31] = t15;
|
|
134
|
-
$[32] = t16;
|
|
135
|
-
} else t16 = $[32];
|
|
136
|
-
const node = t16;
|
|
137
|
-
let t17;
|
|
138
|
-
if ($[33] !== node || $[34] !== tooltips) {
|
|
139
|
-
t17 = tooltips ? /* @__PURE__ */ jsx(Tooltip, {
|
|
140
|
-
title: tooltips,
|
|
141
|
-
children: node
|
|
142
|
-
}) : node;
|
|
143
|
-
$[33] = node;
|
|
144
|
-
$[34] = tooltips;
|
|
145
|
-
$[35] = t17;
|
|
146
|
-
} else t17 = $[35];
|
|
147
|
-
return t17;
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
54
|
+
return tooltips ? /* @__PURE__ */ jsx(Tooltip, {
|
|
55
|
+
title: tooltips,
|
|
56
|
+
children: node
|
|
57
|
+
}) : node;
|
|
148
58
|
};
|
|
149
|
-
//#endregion
|
|
150
59
|
export { Star as default };
|
package/es/result/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,140 +8,48 @@
|
|
|
8
8
|
|
|
9
9
|
import { CircleCheck, CircleX, Info, TriangleAlert } from "../node_modules/.pnpm/kui-icons@5.0.0/node_modules/kui-icons/dist/kui-icons.esm.js";
|
|
10
10
|
import Icon from "../icon/index.js";
|
|
11
|
-
import { c } from "react/compiler-runtime";
|
|
12
11
|
import clsx from "clsx";
|
|
13
12
|
import { isValidElement } from "react";
|
|
14
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
-
|
|
14
|
+
// components/result/index.tsx
|
|
16
15
|
var statusIcons = {
|
|
17
16
|
success: CircleCheck,
|
|
18
17
|
error: CircleX,
|
|
19
18
|
info: Info,
|
|
20
19
|
warning: TriangleAlert
|
|
21
20
|
};
|
|
22
|
-
function Result(
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
let t2;
|
|
56
|
-
if ($[9] !== icon || $[10] !== isHttpStatus || $[11] !== status) {
|
|
57
|
-
t2 = icon == null ? isHttpStatus ? /* @__PURE__ */ jsx("span", {
|
|
58
|
-
className: "k-result-code",
|
|
59
|
-
children: status
|
|
60
|
-
}) : /* @__PURE__ */ jsx(Icon, { type: statusIcons[status] }) : Array.isArray(icon) ? /* @__PURE__ */ jsx(Icon, { type: icon }) : isValidElement(icon) || typeof icon !== "object" ? icon : null;
|
|
61
|
-
$[9] = icon;
|
|
62
|
-
$[10] = isHttpStatus;
|
|
63
|
-
$[11] = status;
|
|
64
|
-
$[12] = t2;
|
|
65
|
-
} else t2 = $[12];
|
|
66
|
-
const iconNode = t2;
|
|
67
|
-
const t3 = `k-result-${status}`;
|
|
68
|
-
let t4;
|
|
69
|
-
if ($[13] !== className || $[14] !== t3) {
|
|
70
|
-
t4 = clsx("k-result", t3, className);
|
|
71
|
-
$[13] = className;
|
|
72
|
-
$[14] = t3;
|
|
73
|
-
$[15] = t4;
|
|
74
|
-
} else t4 = $[15];
|
|
75
|
-
let t5;
|
|
76
|
-
if ($[16] !== iconNode) {
|
|
77
|
-
t5 = /* @__PURE__ */ jsx("div", {
|
|
78
|
-
className: "k-result-icon",
|
|
79
|
-
"aria-hidden": "true",
|
|
80
|
-
children: iconNode
|
|
81
|
-
});
|
|
82
|
-
$[16] = iconNode;
|
|
83
|
-
$[17] = t5;
|
|
84
|
-
} else t5 = $[17];
|
|
85
|
-
let t6;
|
|
86
|
-
if ($[18] !== title) {
|
|
87
|
-
t6 = title != null && /* @__PURE__ */ jsx("div", {
|
|
88
|
-
className: "k-result-title",
|
|
89
|
-
children: title
|
|
90
|
-
});
|
|
91
|
-
$[18] = title;
|
|
92
|
-
$[19] = t6;
|
|
93
|
-
} else t6 = $[19];
|
|
94
|
-
let t7;
|
|
95
|
-
if ($[20] !== subTitle) {
|
|
96
|
-
t7 = subTitle != null && /* @__PURE__ */ jsx("div", {
|
|
97
|
-
className: "k-result-subtitle",
|
|
98
|
-
children: subTitle
|
|
99
|
-
});
|
|
100
|
-
$[20] = subTitle;
|
|
101
|
-
$[21] = t7;
|
|
102
|
-
} else t7 = $[21];
|
|
103
|
-
let t8;
|
|
104
|
-
if ($[22] !== children) {
|
|
105
|
-
t8 = children != null && /* @__PURE__ */ jsx("div", {
|
|
106
|
-
className: "k-result-content",
|
|
107
|
-
children
|
|
108
|
-
});
|
|
109
|
-
$[22] = children;
|
|
110
|
-
$[23] = t8;
|
|
111
|
-
} else t8 = $[23];
|
|
112
|
-
let t9;
|
|
113
|
-
if ($[24] !== extra) {
|
|
114
|
-
t9 = extra != null && /* @__PURE__ */ jsx("div", {
|
|
115
|
-
className: "k-result-extra",
|
|
116
|
-
children: extra
|
|
117
|
-
});
|
|
118
|
-
$[24] = extra;
|
|
119
|
-
$[25] = t9;
|
|
120
|
-
} else t9 = $[25];
|
|
121
|
-
let t10;
|
|
122
|
-
if ($[26] !== rest || $[27] !== t4 || $[28] !== t5 || $[29] !== t6 || $[30] !== t7 || $[31] !== t8 || $[32] !== t9) {
|
|
123
|
-
t10 = /* @__PURE__ */ jsxs("div", {
|
|
124
|
-
...rest,
|
|
125
|
-
className: t4,
|
|
126
|
-
role: "status",
|
|
127
|
-
children: [
|
|
128
|
-
t5,
|
|
129
|
-
t6,
|
|
130
|
-
t7,
|
|
131
|
-
t8,
|
|
132
|
-
t9
|
|
133
|
-
]
|
|
134
|
-
});
|
|
135
|
-
$[26] = rest;
|
|
136
|
-
$[27] = t4;
|
|
137
|
-
$[28] = t5;
|
|
138
|
-
$[29] = t6;
|
|
139
|
-
$[30] = t7;
|
|
140
|
-
$[31] = t8;
|
|
141
|
-
$[32] = t9;
|
|
142
|
-
$[33] = t10;
|
|
143
|
-
} else t10 = $[33];
|
|
144
|
-
return t10;
|
|
21
|
+
function Result({ status = "info", title, subTitle, icon, extra, children, className, ...rest }) {
|
|
22
|
+
const iconNode = icon == null ? status === "403" || status === "404" || status === "500" ? /* @__PURE__ */ jsx("span", {
|
|
23
|
+
className: "k-result-code",
|
|
24
|
+
children: status
|
|
25
|
+
}) : /* @__PURE__ */ jsx(Icon, { type: statusIcons[status] }) : Array.isArray(icon) ? /* @__PURE__ */ jsx(Icon, { type: icon }) : isValidElement(icon) || typeof icon !== "object" ? icon : null;
|
|
26
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
27
|
+
...rest,
|
|
28
|
+
className: clsx("k-result", `k-result-${status}`, className),
|
|
29
|
+
role: "status",
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ jsx("div", {
|
|
32
|
+
className: "k-result-icon",
|
|
33
|
+
"aria-hidden": "true",
|
|
34
|
+
children: iconNode
|
|
35
|
+
}),
|
|
36
|
+
title != null && /* @__PURE__ */ jsx("div", {
|
|
37
|
+
className: "k-result-title",
|
|
38
|
+
children: title
|
|
39
|
+
}),
|
|
40
|
+
subTitle != null && /* @__PURE__ */ jsx("div", {
|
|
41
|
+
className: "k-result-subtitle",
|
|
42
|
+
children: subTitle
|
|
43
|
+
}),
|
|
44
|
+
children != null && /* @__PURE__ */ jsx("div", {
|
|
45
|
+
className: "k-result-content",
|
|
46
|
+
children
|
|
47
|
+
}),
|
|
48
|
+
extra != null && /* @__PURE__ */ jsx("div", {
|
|
49
|
+
className: "k-result-extra",
|
|
50
|
+
children: extra
|
|
51
|
+
})
|
|
52
|
+
]
|
|
53
|
+
});
|
|
145
54
|
}
|
|
146
|
-
//#endregion
|
|
147
55
|
export { Result as default };
|