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/poptip/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 Popup from "../popup/index.js";
|
|
10
|
-
import { c } from "react/compiler-runtime";
|
|
11
10
|
import "react";
|
|
12
11
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
|
|
12
|
+
import { c } from "react/compiler-runtime";
|
|
13
|
+
// components/poptip/index.tsx
|
|
14
14
|
function PoptipPanel(props) {
|
|
15
15
|
const $ = c(2);
|
|
16
16
|
let t0;
|
|
@@ -24,89 +24,30 @@ function PoptipPanel(props) {
|
|
|
24
24
|
} else t0 = $[1];
|
|
25
25
|
return t0;
|
|
26
26
|
}
|
|
27
|
-
var Poptip = (
|
|
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
|
-
$[5] = t9;
|
|
54
|
-
} else t9 = $[5];
|
|
55
|
-
let t10;
|
|
56
|
-
if ($[6] !== title) {
|
|
57
|
-
t10 = title ? /* @__PURE__ */ jsx("div", {
|
|
58
|
-
className: "k-poptip-title",
|
|
59
|
-
children: title
|
|
60
|
-
}) : null;
|
|
61
|
-
$[6] = title;
|
|
62
|
-
$[7] = t10;
|
|
63
|
-
} else t10 = $[7];
|
|
64
|
-
let t11;
|
|
65
|
-
if ($[8] !== content) {
|
|
66
|
-
t11 = /* @__PURE__ */ jsx("div", {
|
|
67
|
-
className: "k-poptip-body",
|
|
68
|
-
children: content
|
|
69
|
-
});
|
|
70
|
-
$[8] = content;
|
|
71
|
-
$[9] = t11;
|
|
72
|
-
} else t11 = $[9];
|
|
73
|
-
let t12;
|
|
74
|
-
if ($[10] !== t10 || $[11] !== t11) {
|
|
75
|
-
t12 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t10, t11] });
|
|
76
|
-
$[10] = t10;
|
|
77
|
-
$[11] = t11;
|
|
78
|
-
$[12] = t12;
|
|
79
|
-
} else t12 = $[12];
|
|
80
|
-
let t13;
|
|
81
|
-
if ($[13] !== children || $[14] !== destroyOnClose || $[15] !== panelOnly || $[16] !== placement || $[17] !== t12 || $[18] !== t6 || $[19] !== t7 || $[20] !== t8 || $[21] !== t9 || $[22] !== trigger) {
|
|
82
|
-
t13 = /* @__PURE__ */ jsx(Popup, {
|
|
83
|
-
open: t6,
|
|
84
|
-
trigger,
|
|
85
|
-
placement,
|
|
86
|
-
panelOnly,
|
|
87
|
-
arrow: true,
|
|
88
|
-
destroyOnClose,
|
|
89
|
-
respectDefaultPrevented: false,
|
|
90
|
-
prefixCls: "k-poptip",
|
|
91
|
-
className: t7,
|
|
92
|
-
style: t8,
|
|
93
|
-
onOpenChange: t9,
|
|
94
|
-
overlay: t12,
|
|
95
|
-
children
|
|
96
|
-
});
|
|
97
|
-
$[13] = children;
|
|
98
|
-
$[14] = destroyOnClose;
|
|
99
|
-
$[15] = panelOnly;
|
|
100
|
-
$[16] = placement;
|
|
101
|
-
$[17] = t12;
|
|
102
|
-
$[18] = t6;
|
|
103
|
-
$[19] = t7;
|
|
104
|
-
$[20] = t8;
|
|
105
|
-
$[21] = t9;
|
|
106
|
-
$[22] = trigger;
|
|
107
|
-
$[23] = t13;
|
|
108
|
-
} else t13 = $[23];
|
|
109
|
-
return t13;
|
|
110
|
-
};
|
|
111
|
-
//#endregion
|
|
27
|
+
var Poptip = ({ dark = false, open, show, title, content, width, trigger = "hover", placement = "top", arrowPointAtCenter = false, destroyOnClose = true, panelOnly = false, onClose, onOpenChange, onShowChange, children }) => /* @__PURE__ */ jsx(Popup, {
|
|
28
|
+
open: open ?? show,
|
|
29
|
+
trigger,
|
|
30
|
+
placement,
|
|
31
|
+
arrowPointAtCenter,
|
|
32
|
+
panelOnly,
|
|
33
|
+
arrow: true,
|
|
34
|
+
destroyOnClose,
|
|
35
|
+
respectDefaultPrevented: false,
|
|
36
|
+
prefixCls: "k-poptip",
|
|
37
|
+
className: dark ? "k-poptip-dark" : void 0,
|
|
38
|
+
style: { width },
|
|
39
|
+
onOpenChange: (next) => {
|
|
40
|
+
onOpenChange?.(next);
|
|
41
|
+
onShowChange?.(next);
|
|
42
|
+
if (!next) onClose?.();
|
|
43
|
+
},
|
|
44
|
+
overlay: /* @__PURE__ */ jsxs(Fragment$1, { children: [title ? /* @__PURE__ */ jsx("div", {
|
|
45
|
+
className: "k-poptip-title",
|
|
46
|
+
children: title
|
|
47
|
+
}) : null, /* @__PURE__ */ jsx("div", {
|
|
48
|
+
className: "k-poptip-body",
|
|
49
|
+
children: content
|
|
50
|
+
})] }),
|
|
51
|
+
children
|
|
52
|
+
});
|
|
112
53
|
export { PoptipPanel, Poptip as default };
|
package/es/popup/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
|
|
@@ -13,10 +13,10 @@ import { setPlacement } from "../utils/placement.js";
|
|
|
13
13
|
import { createFrameScheduler, isEventOutside } from "../utils/popup.js";
|
|
14
14
|
import { getChildren, setRef } from "../utils/react-node.js";
|
|
15
15
|
import { closePopupChildren, isTopPopupLayer, popupLayerElements, registerPopupLayer } from "./layers.js";
|
|
16
|
-
import { c } from "react/compiler-runtime";
|
|
17
16
|
import React, { forwardRef, useCallback, useEffect, useEffectEvent, useImperativeHandle, useLayoutEffect, useRef, useState } from "react";
|
|
18
17
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
-
|
|
18
|
+
import { c } from "react/compiler-runtime";
|
|
19
|
+
// components/popup/index.tsx
|
|
20
20
|
var PopupArrow = (t0) => {
|
|
21
21
|
const $ = c(9);
|
|
22
22
|
const { prefixCls } = t0;
|
|
@@ -59,6 +59,7 @@ var PopupArrow = (t0) => {
|
|
|
59
59
|
if ($[6] !== t1 || $[7] !== t5) {
|
|
60
60
|
t6 = /* @__PURE__ */ jsx("div", {
|
|
61
61
|
className: t1,
|
|
62
|
+
"data-popup-arrow": "",
|
|
62
63
|
"aria-hidden": "true",
|
|
63
64
|
children: t5
|
|
64
65
|
});
|
|
@@ -68,7 +69,7 @@ var PopupArrow = (t0) => {
|
|
|
68
69
|
} else t6 = $[8];
|
|
69
70
|
return t6;
|
|
70
71
|
};
|
|
71
|
-
var Popup = forwardRef(function Popup({ open, disabled = false, placement = "bottom-left", trigger = "click", arrow = false, offset = 3, openDelay = 0, closeDelay = 300, closeOnOutsideClick = true, closeOnEscape = true, matchTriggerWidth = false, getPopupContainer, destroyOnClose = false, target, onOpenChange, onAfterOpen, onAfterClose, children, overlay, raw = false, outsideEvent = "click", transitionDuration = 300, getAnchorPosition, prefixCls = "k-popup", transitionName = prefixCls, panelOnly = false, triggerProps, onTriggerKeyDown, respectDefaultPrevented = true, contentStyle, arrowContent, hideWhenDetached = false, className, style, ...attrs }, forwardedRef) {
|
|
72
|
+
var Popup = forwardRef(function Popup({ open, disabled = false, placement = "bottom-left", trigger = "click", arrow = false, arrowPointAtCenter = false, offset = 3, openDelay = 0, closeDelay = 300, closeOnOutsideClick = true, closeOnEscape = true, matchTriggerWidth = false, getPopupContainer, destroyOnClose = false, target, onOpenChange, onAfterOpen, onAfterClose, children, overlay, raw = false, outsideEvent = "click", transitionDuration = 300, getAnchorPosition, prefixCls = "k-popup", transitionName = prefixCls, panelOnly = false, triggerProps, onTriggerKeyDown, respectDefaultPrevented = true, contentStyle, arrowContent, hideWhenDetached = false, className, style, ...attrs }, forwardedRef) {
|
|
72
73
|
const [innerOpen, setInnerOpen] = useState(open ?? false);
|
|
73
74
|
const [previousOpen, setPreviousOpen] = useState(open);
|
|
74
75
|
if (open !== previousOpen) {
|
|
@@ -131,6 +132,7 @@ var Popup = forwardRef(function Popup({ open, disabled = false, placement = "bot
|
|
|
131
132
|
setPlacement({
|
|
132
133
|
...refs,
|
|
133
134
|
offset,
|
|
135
|
+
arrowPointAtCenter,
|
|
134
136
|
position: getAnchorPosition?.() ?? (point ? {
|
|
135
137
|
x: rect.left + point.x,
|
|
136
138
|
y: rect.top + point.y
|
|
@@ -151,7 +153,8 @@ var Popup = forwardRef(function Popup({ open, disabled = false, placement = "bot
|
|
|
151
153
|
offset,
|
|
152
154
|
panelOnly,
|
|
153
155
|
placement,
|
|
154
|
-
getAnchorPosition
|
|
156
|
+
getAnchorPosition,
|
|
157
|
+
arrowPointAtCenter
|
|
155
158
|
]);
|
|
156
159
|
const requestFromEvent = useEffectEvent(request);
|
|
157
160
|
usePopupHost(() => requestFromEvent(false, { reason: "host" }));
|
|
@@ -428,5 +431,4 @@ var Popup = forwardRef(function Popup({ open, disabled = false, placement = "bot
|
|
|
428
431
|
})
|
|
429
432
|
})] });
|
|
430
433
|
});
|
|
431
|
-
//#endregion
|
|
432
434
|
export { PopupArrow, Popup as default };
|
package/es/popup/layers.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 { nextOverlayOrder } from "../utils/overlay-order.js";
|
|
10
|
-
|
|
10
|
+
// components/popup/layers.ts
|
|
11
11
|
var layers = [];
|
|
12
12
|
var openedAt = /* @__PURE__ */ new WeakMap();
|
|
13
13
|
function registerPopupLayer(layer) {
|
|
@@ -38,5 +38,4 @@ function closePopupChildren(popup) {
|
|
|
38
38
|
const layer = layers.find((item) => item.popup === popup);
|
|
39
39
|
if (layer) descendants(layer).reverse().forEach((child) => child.close());
|
|
40
40
|
}
|
|
41
|
-
//#endregion
|
|
42
41
|
export { closePopupChildren, isTopPopupLayer, latestPopupLayerOrder, popupLayerElements, registerPopupLayer };
|
package/es/progress/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,245 +9,111 @@
|
|
|
9
9
|
import { useConfigAppearance } from "../config/use-config-appearance.js";
|
|
10
10
|
import { Check, CircleCheck, CircleX, X } 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 "react";
|
|
15
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
-
|
|
17
|
-
var Progress = (
|
|
18
|
-
const $ = c(54);
|
|
19
|
-
let children;
|
|
20
|
-
let color;
|
|
21
|
-
let format;
|
|
22
|
-
let rest;
|
|
23
|
-
let sizeProp;
|
|
24
|
-
let strokeHeight;
|
|
25
|
-
let style;
|
|
26
|
-
let t1;
|
|
27
|
-
let t2;
|
|
28
|
-
let t3;
|
|
29
|
-
let t4;
|
|
30
|
-
let t5;
|
|
31
|
-
let t6;
|
|
32
|
-
let t7;
|
|
33
|
-
let t8;
|
|
34
|
-
let width;
|
|
35
|
-
if ($[0] !== t0) {
|
|
36
|
-
({percent: t1, strokeWidth: t2, color, format, width, strokeHeight, gapDegree: t3, strokeLinecap: t4, size: sizeProp, status: t5, type: t6, showInfo: t7, children, className: t8, style, ...rest} = t0);
|
|
37
|
-
$[0] = t0;
|
|
38
|
-
$[1] = children;
|
|
39
|
-
$[2] = color;
|
|
40
|
-
$[3] = format;
|
|
41
|
-
$[4] = rest;
|
|
42
|
-
$[5] = sizeProp;
|
|
43
|
-
$[6] = strokeHeight;
|
|
44
|
-
$[7] = style;
|
|
45
|
-
$[8] = t1;
|
|
46
|
-
$[9] = t2;
|
|
47
|
-
$[10] = t3;
|
|
48
|
-
$[11] = t4;
|
|
49
|
-
$[12] = t5;
|
|
50
|
-
$[13] = t6;
|
|
51
|
-
$[14] = t7;
|
|
52
|
-
$[15] = t8;
|
|
53
|
-
$[16] = width;
|
|
54
|
-
} else {
|
|
55
|
-
children = $[1];
|
|
56
|
-
color = $[2];
|
|
57
|
-
format = $[3];
|
|
58
|
-
rest = $[4];
|
|
59
|
-
sizeProp = $[5];
|
|
60
|
-
strokeHeight = $[6];
|
|
61
|
-
style = $[7];
|
|
62
|
-
t1 = $[8];
|
|
63
|
-
t2 = $[9];
|
|
64
|
-
t3 = $[10];
|
|
65
|
-
t4 = $[11];
|
|
66
|
-
t5 = $[12];
|
|
67
|
-
t6 = $[13];
|
|
68
|
-
t7 = $[14];
|
|
69
|
-
t8 = $[15];
|
|
70
|
-
width = $[16];
|
|
71
|
-
}
|
|
72
|
-
const percent = t1 === void 0 ? 0 : t1;
|
|
73
|
-
const strokeWidth = t2 === void 0 ? 6 : t2;
|
|
74
|
-
const gapDegree = t3 === void 0 ? 75 : t3;
|
|
75
|
-
const strokeLinecap = t4 === void 0 ? "round" : t4;
|
|
76
|
-
const status = t5 === void 0 ? "normal" : t5;
|
|
77
|
-
const type = t6 === void 0 ? "line" : t6;
|
|
78
|
-
const showInfo = t7 === void 0 ? true : t7;
|
|
79
|
-
const className = t8 === void 0 ? "" : t8;
|
|
15
|
+
// components/progress/index.tsx
|
|
16
|
+
var Progress = ({ percent = 0, strokeWidth = 6, color, format, width, strokeHeight, gapDegree = 75, strokeLinecap = "round", size: sizeProp, status = "normal", type = "line", showInfo = true, children, className = "", style, ...rest }) => {
|
|
80
17
|
const inheritedAppearance = useConfigAppearance();
|
|
81
18
|
const size = sizeProp ?? inheritedAppearance.size;
|
|
82
19
|
const currentPercent = percent;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
if (
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
if (
|
|
94
|
-
|
|
95
|
-
if (currentPercent === 100) text = /* @__PURE__ */ jsx(Icon, { type: Check });
|
|
96
|
-
if (currentStatus === "exception") text = /* @__PURE__ */ jsx(Icon, { type: X });
|
|
97
|
-
}
|
|
20
|
+
const renderTip = (currentStatus, currentType) => {
|
|
21
|
+
if (!showInfo) return null;
|
|
22
|
+
let text = `${currentPercent}%`;
|
|
23
|
+
if (format) text = format(currentPercent);
|
|
24
|
+
else if (currentType === "line") {
|
|
25
|
+
if (currentPercent === 100) text = /* @__PURE__ */ jsx(Icon, { type: CircleCheck });
|
|
26
|
+
if (currentStatus === "exception") text = /* @__PURE__ */ jsx(Icon, { type: CircleX });
|
|
27
|
+
} else if (currentType === "circle" || currentType === "dashboard") {
|
|
28
|
+
if (children) text = children;
|
|
29
|
+
else {
|
|
30
|
+
if (currentPercent === 100) text = /* @__PURE__ */ jsx(Icon, { type: Check });
|
|
31
|
+
if (currentStatus === "exception") text = /* @__PURE__ */ jsx(Icon, { type: X });
|
|
98
32
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
const endY = 2 * radius;
|
|
117
|
-
let gap = Math.max(0, gapDegree);
|
|
118
|
-
gap = Math.min(259, gap);
|
|
119
|
-
const d = `M 50,50
|
|
120
|
-
m 0, ${beginY}
|
|
121
|
-
a ${radius},${radius} 0 1 1 0, ${-endY}
|
|
33
|
+
}
|
|
34
|
+
return /* @__PURE__ */ jsx("div", {
|
|
35
|
+
className: "k-progress-text",
|
|
36
|
+
children: text
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
const renderCircle = (pct, strokeColor, dashboard) => {
|
|
40
|
+
const radius = 50 - strokeWidth / 2;
|
|
41
|
+
const beginX = 0;
|
|
42
|
+
const beginY = radius;
|
|
43
|
+
const endX = 0;
|
|
44
|
+
const endY = 2 * radius;
|
|
45
|
+
let gap = Math.max(0, gapDegree);
|
|
46
|
+
gap = Math.min(259, gap);
|
|
47
|
+
const d = `M 50,50
|
|
48
|
+
m ${beginX}, ${beginY}
|
|
49
|
+
a ${radius},${radius} 0 1 1 ${endX}, ${-endY}
|
|
122
50
|
a ${radius},${radius} 0 1 1 0,${endY}`;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
51
|
+
const len = Math.PI * 2 * radius;
|
|
52
|
+
const bgStyle = {
|
|
53
|
+
strokeDasharray: `${pct / 100 * (len - (dashboard ? gap : 0))}px ${len}px`,
|
|
54
|
+
transition: `stroke-dasharray .3s ease 0s,opacity 0.3s ease 0s`,
|
|
55
|
+
strokeDashoffset: dashboard ? -gap / 2 : 0,
|
|
56
|
+
stroke: strokeColor,
|
|
57
|
+
strokeLinecap,
|
|
58
|
+
opacity: pct === 0 ? 0 : 1
|
|
59
|
+
};
|
|
60
|
+
const ds = {};
|
|
61
|
+
if (dashboard) {
|
|
62
|
+
ds.strokeDasharray = `${len - gap}px ${len}px`;
|
|
63
|
+
ds.strokeDashoffset = -gap / 2;
|
|
64
|
+
ds.strokeLinecap = strokeLinecap;
|
|
65
|
+
}
|
|
66
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
67
|
+
viewBox: `0 0 100 100`,
|
|
68
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
69
|
+
strokeWidth,
|
|
70
|
+
d,
|
|
71
|
+
fill: "none",
|
|
72
|
+
style: ds,
|
|
73
|
+
className: "k-progress-inner"
|
|
74
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
75
|
+
strokeWidth,
|
|
76
|
+
d,
|
|
77
|
+
fill: "none",
|
|
78
|
+
style: bgStyle,
|
|
79
|
+
className: "k-progress-bg"
|
|
80
|
+
})]
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
const renderBar = () => {
|
|
84
|
+
if (type === "line") {
|
|
85
|
+
const bgStyle_0 = {
|
|
86
|
+
width: `${currentPercent}%`,
|
|
87
|
+
backgroundColor: color || void 0
|
|
131
88
|
};
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
viewBox: "0 0 100 100",
|
|
140
|
-
children: [/* @__PURE__ */ jsx("path", {
|
|
141
|
-
strokeWidth,
|
|
142
|
-
d,
|
|
143
|
-
fill: "none",
|
|
144
|
-
style: ds,
|
|
145
|
-
className: "k-progress-inner"
|
|
146
|
-
}), /* @__PURE__ */ jsx("path", {
|
|
147
|
-
strokeWidth,
|
|
148
|
-
d,
|
|
149
|
-
fill: "none",
|
|
150
|
-
style: bgStyle,
|
|
151
|
-
className: "k-progress-bg"
|
|
152
|
-
})]
|
|
89
|
+
if (strokeHeight) bgStyle_0.height = `${strokeHeight}px`;
|
|
90
|
+
return /* @__PURE__ */ jsx("div", {
|
|
91
|
+
className: "k-progress-inner",
|
|
92
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
93
|
+
className: "k-progress-bg",
|
|
94
|
+
style: bgStyle_0
|
|
95
|
+
})
|
|
153
96
|
});
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
$[25] = t10;
|
|
159
|
-
} else t10 = $[25];
|
|
160
|
-
const renderCircle = t10;
|
|
161
|
-
let t11;
|
|
162
|
-
if ($[26] !== color || $[27] !== currentPercent || $[28] !== renderCircle || $[29] !== strokeHeight || $[30] !== type) {
|
|
163
|
-
t11 = () => {
|
|
164
|
-
if (type === "line") {
|
|
165
|
-
const bgStyle_0 = {
|
|
166
|
-
width: `${currentPercent}%`,
|
|
167
|
-
backgroundColor: color || void 0
|
|
168
|
-
};
|
|
169
|
-
if (strokeHeight) bgStyle_0.height = `${strokeHeight}px`;
|
|
170
|
-
return /* @__PURE__ */ jsx("div", {
|
|
171
|
-
className: "k-progress-inner",
|
|
172
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
173
|
-
className: "k-progress-bg",
|
|
174
|
-
style: bgStyle_0
|
|
175
|
-
})
|
|
176
|
-
});
|
|
177
|
-
} else if (type === "circle") return renderCircle(currentPercent, color, false);
|
|
178
|
-
else if (type === "dashboard") return renderCircle(currentPercent, color, true);
|
|
179
|
-
return null;
|
|
180
|
-
};
|
|
181
|
-
$[26] = color;
|
|
182
|
-
$[27] = currentPercent;
|
|
183
|
-
$[28] = renderCircle;
|
|
184
|
-
$[29] = strokeHeight;
|
|
185
|
-
$[30] = type;
|
|
186
|
-
$[31] = t11;
|
|
187
|
-
} else t11 = $[31];
|
|
188
|
-
const renderBar = t11;
|
|
97
|
+
} else if (type === "circle") return renderCircle(currentPercent, color, false);
|
|
98
|
+
else if (type === "dashboard") return renderCircle(currentPercent, color, true);
|
|
99
|
+
return null;
|
|
100
|
+
};
|
|
189
101
|
let finalStatus = status;
|
|
190
102
|
if (currentPercent === 100 && status !== "exception") finalStatus = "success";
|
|
191
|
-
const
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
if (
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
$[37] = t16;
|
|
207
|
-
} else t16 = $[37];
|
|
208
|
-
const classes = t16;
|
|
209
|
-
let pgStyle;
|
|
210
|
-
if ($[38] !== style || $[39] !== type || $[40] !== width) {
|
|
211
|
-
pgStyle = { ...style };
|
|
212
|
-
if (type !== "line" && width !== void 0 && width > 10) {
|
|
213
|
-
pgStyle.width = `${width}px`;
|
|
214
|
-
pgStyle.height = `${width}px`;
|
|
215
|
-
}
|
|
216
|
-
$[38] = style;
|
|
217
|
-
$[39] = type;
|
|
218
|
-
$[40] = width;
|
|
219
|
-
$[41] = pgStyle;
|
|
220
|
-
} else pgStyle = $[41];
|
|
221
|
-
let t17;
|
|
222
|
-
if ($[42] !== renderBar) {
|
|
223
|
-
t17 = renderBar();
|
|
224
|
-
$[42] = renderBar;
|
|
225
|
-
$[43] = t17;
|
|
226
|
-
} else t17 = $[43];
|
|
227
|
-
let t18;
|
|
228
|
-
if ($[44] !== finalStatus || $[45] !== renderTip || $[46] !== type) {
|
|
229
|
-
t18 = renderTip(finalStatus, type);
|
|
230
|
-
$[44] = finalStatus;
|
|
231
|
-
$[45] = renderTip;
|
|
232
|
-
$[46] = type;
|
|
233
|
-
$[47] = t18;
|
|
234
|
-
} else t18 = $[47];
|
|
235
|
-
let t19;
|
|
236
|
-
if ($[48] !== classes || $[49] !== pgStyle || $[50] !== rest || $[51] !== t17 || $[52] !== t18) {
|
|
237
|
-
t19 = /* @__PURE__ */ jsxs("div", {
|
|
238
|
-
className: classes,
|
|
239
|
-
style: pgStyle,
|
|
240
|
-
...rest,
|
|
241
|
-
children: [t17, t18]
|
|
242
|
-
});
|
|
243
|
-
$[48] = classes;
|
|
244
|
-
$[49] = pgStyle;
|
|
245
|
-
$[50] = rest;
|
|
246
|
-
$[51] = t17;
|
|
247
|
-
$[52] = t18;
|
|
248
|
-
$[53] = t19;
|
|
249
|
-
} else t19 = $[53];
|
|
250
|
-
return t19;
|
|
103
|
+
const classes = clsx("k-progress", `k-progress-${type}`, `k-progress-${finalStatus}`, {
|
|
104
|
+
"k-progress-sm": type === "line" && size === "small",
|
|
105
|
+
"k-progress-hide-info": !showInfo
|
|
106
|
+
}, className);
|
|
107
|
+
const pgStyle = { ...style };
|
|
108
|
+
if (type !== "line" && width !== void 0 && width > 10) {
|
|
109
|
+
pgStyle.width = `${width}px`;
|
|
110
|
+
pgStyle.height = `${width}px`;
|
|
111
|
+
}
|
|
112
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
113
|
+
className: classes,
|
|
114
|
+
style: pgStyle,
|
|
115
|
+
...rest,
|
|
116
|
+
children: [renderBar(), renderTip(finalStatus, type)]
|
|
117
|
+
});
|
|
251
118
|
};
|
|
252
|
-
//#endregion
|
|
253
119
|
export { Progress as default };
|
package/es/qrcode/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
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 { resolvePaintedTheme, useConfigAppearance } from "../config/use-config-appearance.js";
|
|
11
10
|
import Button from "../button/button.js";
|
|
11
|
+
import { ConfigContext, DEFAULT_LOCALE } from "../config/config-context.js";
|
|
12
12
|
import Spin from "../spin/index.js";
|
|
13
13
|
import clsx from "clsx";
|
|
14
14
|
import { forwardRef, useCallback, useContext, useEffect, useImperativeHandle, useRef } from "react";
|
|
15
15
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
16
16
|
import Color from "color";
|
|
17
17
|
import { toCanvas } from "qrcode";
|
|
18
|
-
|
|
18
|
+
// components/qrcode/index.tsx
|
|
19
19
|
var PAINTED_THEMES = [
|
|
20
20
|
"fill",
|
|
21
21
|
"outline",
|
|
@@ -206,5 +206,4 @@ var QRCode = forwardRef(function QRCode({ value, size = 160, colorDark = "var(--
|
|
|
206
206
|
})]
|
|
207
207
|
});
|
|
208
208
|
});
|
|
209
|
-
//#endregion
|
|
210
209
|
export { QRCode as default };
|