@unicom-cloud/ui 0.8.81 → 0.8.82
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/Affix.js +1 -1
- package/Alert.js +1 -1
- package/AutoComplete.js +2 -2
- package/BackTop.js +2 -2
- package/Badge.js +1 -1
- package/Breadcrumb.js +2 -2
- package/Button.js +1 -1
- package/Calendar.js +2 -2
- package/Card.js +1 -1
- package/Carousel.js +1 -1
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +2 -2
- package/Comment.js +1 -1
- package/ConfigProvider.js +5 -4
- package/Copy.js +1 -1
- package/DatePicker.js +7 -7
- package/Descriptions.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Dropdown.js +1 -1
- package/Empty.js +1 -1
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/InputNumber.js +1 -1
- package/Layout.js +1 -1
- package/Link.js +1 -1
- package/List.js +2 -2
- package/Mentions.js +2 -2
- package/Menu.js +1 -1
- package/Message.js +1 -1
- package/Modal.js +1 -1
- package/Notice.js +1 -1
- package/Notification.js +5 -5
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/Pagination.js +1 -1
- package/Popconfirm.js +1 -1
- package/Popover.js +1 -1
- package/Progress.js +1 -1
- package/Radio.js +1 -1
- package/Rate.js +1 -1
- package/ResizeBox.js +1 -1
- package/Result.js +1 -1
- package/Select.js +1 -1
- package/Skeleton.js +1 -1
- package/Slider.js +1 -1
- package/Space.js +1 -1
- package/SpeechSynthesis.js +1 -1
- package/Spin.js +1 -1
- package/Statistic.js +2 -2
- package/Steps.js +1 -1
- package/Switch.js +1 -1
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +1 -1
- package/Tooltip.js +1 -1
- package/Transfer.js +2 -2
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +1 -1
- package/Typography.js +1 -1
- package/affix/index.js +60 -57
- package/alert/index.js +53 -53
- package/anchor/Anchor.js +72 -72
- package/anchor/Link.js +27 -27
- package/anchor/util.js +1 -1
- package/auto-complete/index.js +2 -2
- package/avatar/Avatar.js +31 -31
- package/avatar/Group.js +25 -25
- package/back-top/index.js +30 -30
- package/badge/index.js +37 -37
- package/breadcrumb/index.js +26 -26
- package/button/Group.js +7 -7
- package/button/index.js +29 -29
- package/calendar/index.js +2 -2
- package/card/Grid.js +12 -12
- package/card/Meta.js +17 -17
- package/card/index.js +44 -44
- package/carousel/Arrow.js +19 -19
- package/carousel/Indicator.js +25 -25
- package/carousel/index.js +77 -77
- package/cascader/Cascader.js +2 -2
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +2 -2
- package/checkbox/Group.js +2 -2
- package/checkbox/GroupBlock.js +2 -2
- package/checkbox/index.js +2 -2
- package/chunk/{yLRv5RIK.js → CQI1gsQs.js} +181 -181
- package/chunk/CmMehQON.js +1464 -0
- package/chunk/Cplu5dtQ.js +730 -0
- package/chunk/{C5X4hOkx.js → D0338Pbq.js} +80 -80
- package/chunk/{DYspELhF.js → DXDbeIai.js} +223 -223
- package/chunk/{DEiyXzBZ.js → DfrB26fI.js} +63 -63
- package/chunk/{BG7YGUsx.js → dKvAiKxr.js} +119 -119
- package/chunk/{BNevupAU.js → uKZyjtff.js} +5 -4
- package/chunk/{DLBfXSnU.js → w221i0nK.js} +2872 -2871
- package/collapse/Collapse.js +2 -2
- package/collapse/Item.js +2 -2
- package/collapse/index.js +1 -1
- package/color-picker/ControlBar.js +36 -36
- package/color-picker/InputAlpha.js +11 -11
- package/color-picker/InputHex.js +24 -24
- package/color-picker/InputRgb.js +23 -23
- package/color-picker/Palette.js +18 -18
- package/color-picker/Panel.js +2 -2
- package/color-picker/index.js +2 -2
- package/comment/index.js +31 -31
- package/config-provider/ConfigProvider.js +5 -4
- package/config-provider/context.js +2 -2
- package/config-provider/index.js +4 -3
- package/copy/index.js +28 -28
- package/date-picker/Picker.js +276 -276
- package/date-picker/{PickerRange.js → RangePicker.js} +2 -2
- package/date-picker/index.js +26 -27
- package/descriptions/index.js +33 -33
- package/divider/index.js +12 -12
- package/draggable/index.js +23 -23
- package/drawer/Drawer.js +81 -81
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +56 -56
- package/empty/index.js +1 -1
- package/form/Form.js +76 -76
- package/form/FormItem.js +64 -64
- package/grid/Col.js +53 -53
- package/grid/Row.js +34 -34
- package/grid/grid-item.js +29 -29
- package/grid/grid.js +50 -50
- package/icon/index.js +20 -19
- package/icon-hover/index.js +1 -1
- package/image/Image.js +86 -86
- package/image/ImagePreview.js +2 -2
- package/image/ImagePreviewArrow.js +22 -22
- package/image/ImagePreviewGroup.js +1 -1
- package/image/index.js +1 -1
- package/index.js +410 -408
- package/input/Group.js +8 -8
- package/input/Input.js +322 -322
- package/input/InputElement.js +1 -1
- package/input/Password.js +1 -1
- package/input/Search.js +1 -1
- package/input/Textarea.js +1 -1
- package/input-number/index.js +1 -1
- package/input-tag/InputTag.js +40 -40
- package/layout/Content.js +7 -7
- package/layout/Footer.js +9 -9
- package/layout/Header.js +7 -7
- package/layout/Sider.js +55 -55
- package/layout/index.js +32 -32
- package/link/index.js +35 -35
- package/list/Item.js +29 -29
- package/list/Meta.js +12 -12
- package/list/index.js +2 -2
- package/mentions/index.js +2 -2
- package/menu/Menu.js +2 -2
- package/menu/OverflowWrap.js +1 -1
- package/menu/index.js +2 -2
- package/message/index.js +1 -1
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +2 -2
- package/modal/index.js +1 -1
- package/notice/index.js +1 -1
- package/notification/index.js +5 -5
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +12 -12
- package/overflow-ellipsis/index.js +24 -24
- package/package.json +1 -1
- package/page-header/index.js +38 -38
- package/pagination/PageItem.js +16 -16
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +2 -2
- package/pagination/Pagination.js +2 -2
- package/pagination/index.js +1 -1
- package/picker/Input.js +69 -69
- package/picker/InputRange.js +111 -111
- package/popconfirm/index.js +61 -61
- package/popover/index.js +35 -35
- package/progress/index.js +22 -22
- package/radio/Group.js +2 -2
- package/radio/GroupBlock.js +2 -2
- package/radio/Radio.js +2 -2
- package/radio/index.js +2 -2
- package/rate/index.js +49 -49
- package/resize-box/ResizeTrigger.js +34 -34
- package/resize-box/Split.js +56 -56
- package/resize-box/SplitGroup.js +55 -55
- package/resize-box/index.js +51 -51
- package/result/index.js +41 -41
- package/select/Option.js +1 -1
- package/select/Select.js +2 -2
- package/select/index.js +2 -2
- package/select/util.js +1 -1
- package/select-view/Core.js +125 -125
- package/skeleton/index.js +20 -20
- package/slider/Button.js +57 -57
- package/slider/index.js +116 -116
- package/space/index.js +46 -44
- package/speech-synthesis/index.js +1 -1
- package/spin/DotLoading.js +10 -10
- package/spin/index.js +44 -44
- package/statistic/Countdown.js +34 -34
- package/statistic/index.js +67 -67
- package/steps/index.js +55 -55
- package/style.css +1 -1
- package/switch/index.js +54 -54
- package/table/Table.js +3 -3
- package/table/index.js +1 -1
- package/tabs/Tab.js +2 -2
- package/tabs/TabContent.js +2 -2
- package/tabs/TabPane.js +12 -12
- package/tabs/index.js +2 -2
- package/tag/index.js +45 -45
- package/time-picker/Picker.js +76 -76
- package/time-picker/TimePicker.js +136 -136
- package/time-picker/index.js +8 -8
- package/time-picker/util.js +5 -5
- package/timeline/Item.js +47 -47
- package/timeline/Timeline.js +41 -41
- package/tooltip/index.js +29 -29
- package/transfer/Item.js +2 -2
- package/transfer/List.js +2 -2
- package/transfer/index.js +2 -2
- package/tree/Animation.js +2 -2
- package/tree/Node.js +2 -2
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +2 -2
- package/tree/index.js +1 -1
- package/tree-select/List.js +1 -1
- package/tree-select/Select.js +2 -2
- package/tree-select/index.js +2 -2
- package/trigger/index.js +60 -60
- package/types/config-provider/ConfigProvider.d.ts +2 -2
- package/types/config-provider/context.d.ts +1 -1
- package/types/date-picker/index.d.ts +8 -9
- package/types/date-picker/interface.d.ts +9 -9
- package/types/index.d.ts +1 -1
- package/types/picker/Input.d.ts +2 -2
- package/types/space/index.d.ts +2 -1
- package/types/utils/names.d.ts +1 -1
- package/typography/Base.js +53 -53
- package/typography/Ellipsis.js +9 -8
- package/typography/Operations.js +28 -28
- package/typography/Paragraph.js +8 -8
- package/typography/Typography.js +7 -7
- package/typography/index.js +1 -1
- package/upload/TriggerNode.js +47 -47
- package/upload/Upload.js +184 -184
- package/utils/contextHolder.js +3 -3
- package/utils/index.js +13 -13
- package/utils/names.js +1 -1
- package/utils/setPrimaryColor.js +18 -13
- package/utils/tween.js +1 -1
- package/verification-code/VerificationCode.js +49 -49
- package/version/index.js +1 -1
- package/watermark/Watermark.js +24 -24
- package/chunk/CQvM33Vg.js +0 -724
- package/chunk/yhU2zeeu.js +0 -1461
- /package/types/date-picker/{PickerRange.d.ts → RangePicker.d.ts} +0 -0
package/select-view/Core.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as P } from "react/jsx-runtime";
|
|
2
2
|
import We, { useRef as ue, useContext as qe, useState as de, useEffect as Xe, useImperativeHandle as Je, useMemo as Qe, createElement as Ye } from "react";
|
|
3
3
|
import Ze from "@unicom-cloud/icons/IconUiClose";
|
|
4
4
|
import eo from "@unicom-cloud/icons/IconUiDown";
|
|
5
5
|
import oo from "@unicom-cloud/icons/IconUiLoading";
|
|
6
6
|
import no from "@unicom-cloud/icons/IconUiSearch";
|
|
7
7
|
import ro from "lodash/isFunction";
|
|
8
|
-
import
|
|
9
|
-
import { a as to, I as so } from "../chunk/
|
|
8
|
+
import pe from "lodash/isUndefined";
|
|
9
|
+
import { a as to, I as so } from "../chunk/Cplu5dtQ.js";
|
|
10
10
|
import { u as ao } from "../chunk/CQ_WOOmf.js";
|
|
11
11
|
import { u as co } from "../chunk/BsY85n3_.js";
|
|
12
12
|
import lo from "../input-tag/InputTag.js";
|
|
13
13
|
import io from "../input/InputElement.js";
|
|
14
14
|
import uo from "../popover/index.js";
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { f as
|
|
18
|
-
import { i as
|
|
15
|
+
import me from "../tag/index.js";
|
|
16
|
+
import D from "@unicom-cloud/utils/class-name";
|
|
17
|
+
import { f as fe } from "../chunk/CftuXmo_.js";
|
|
18
|
+
import { i as po } from "../chunk/CYhxqVkn.js";
|
|
19
19
|
import "../chunk/ClM74To2.js";
|
|
20
|
-
import { Enter as
|
|
20
|
+
import { Enter as mo, Backspace as fo } from "@unicom-cloud/utils/constant/keyboardCode";
|
|
21
21
|
import { isPlainObject as C, isNumber as he } from "@unicom-cloud/utils/is";
|
|
22
|
-
const
|
|
22
|
+
const Q = "__pqb_value_tag_placeholder", I = {
|
|
23
23
|
BEFORE: 0,
|
|
24
24
|
EDITING: 1,
|
|
25
25
|
NONE: 2
|
|
@@ -37,122 +37,122 @@ const J = "__pqb_value_tag_placeholder", w = {
|
|
|
37
37
|
disabled: h,
|
|
38
38
|
animation: Se,
|
|
39
39
|
prefixCls: n,
|
|
40
|
-
suffixIcon:
|
|
41
|
-
arrowIcon:
|
|
40
|
+
suffixIcon: Y,
|
|
41
|
+
arrowIcon: Z,
|
|
42
42
|
removeIcon: ye,
|
|
43
|
-
clearIcon:
|
|
44
|
-
placeholder:
|
|
45
|
-
renderText:
|
|
43
|
+
clearIcon: F,
|
|
44
|
+
placeholder: ee,
|
|
45
|
+
renderText: oe,
|
|
46
46
|
value: g,
|
|
47
|
-
inputValue:
|
|
48
|
-
popupVisible:
|
|
47
|
+
inputValue: O,
|
|
48
|
+
popupVisible: m,
|
|
49
49
|
maxTagCount: c,
|
|
50
50
|
isMultiple: v,
|
|
51
|
-
isEmptyValue:
|
|
52
|
-
prefix:
|
|
53
|
-
ariaControls:
|
|
54
|
-
renderTag:
|
|
55
|
-
dragToSort:
|
|
56
|
-
rtl:
|
|
57
|
-
htmlDataAttributes:
|
|
58
|
-
onKeyDown:
|
|
59
|
-
onChangeInputValue:
|
|
51
|
+
isEmptyValue: R,
|
|
52
|
+
prefix: M,
|
|
53
|
+
ariaControls: Ee,
|
|
54
|
+
renderTag: A,
|
|
55
|
+
dragToSort: ne,
|
|
56
|
+
rtl: ke,
|
|
57
|
+
htmlDataAttributes: Pe,
|
|
58
|
+
onKeyDown: _,
|
|
59
|
+
onChangeInputValue: U,
|
|
60
60
|
onPaste: De,
|
|
61
61
|
onClear: Fe,
|
|
62
|
-
onFocus:
|
|
63
|
-
onBlur:
|
|
64
|
-
onRemoveCheckedItem:
|
|
65
|
-
onSort:
|
|
62
|
+
onFocus: B,
|
|
63
|
+
onBlur: V,
|
|
64
|
+
onRemoveCheckedItem: z,
|
|
65
|
+
onSort: L,
|
|
66
66
|
...Oe
|
|
67
|
-
} = N,
|
|
67
|
+
} = N, T = ue(null), f = ue(null), { size: Re, getPrefixCls: w } = qe(to), [Me, re] = de(I.NONE), [j, te] = de(!1), Ae = ao(), $ = "showSearch" in N ? N.showSearch : v, p = $ || Ie, y = Ne || Re, H = j || m, _e = C($) && $.retainInputValue, b = !v && g !== void 0 ? oe(g).text : "", G = (e) => {
|
|
68
68
|
var o;
|
|
69
69
|
(o = e == null ? void 0 : e.preventDefault) == null || o.call(e);
|
|
70
|
-
},
|
|
71
|
-
const o =
|
|
70
|
+
}, K = (e) => {
|
|
71
|
+
const o = p ? T.current : f.current;
|
|
72
72
|
o && (e === "focus" ? o.focus() : o.blur());
|
|
73
|
-
},
|
|
74
|
-
|
|
73
|
+
}, E = (e, o) => {
|
|
74
|
+
p && o.target === f.current || (e === "focus" ? (te(!0), B == null || B(o)) : (te(!1), V == null || V(o)));
|
|
75
75
|
}, se = (e) => {
|
|
76
|
-
if (
|
|
76
|
+
if (p && e.currentTarget === f.current)
|
|
77
77
|
return;
|
|
78
|
-
e.key ===
|
|
78
|
+
e.key === mo.key && e.preventDefault(), _ == null || _(e);
|
|
79
79
|
};
|
|
80
80
|
Xe(() => {
|
|
81
|
-
|
|
82
|
-
}, [
|
|
83
|
-
dom:
|
|
84
|
-
getRootDOMNode: () =>
|
|
85
|
-
focus:
|
|
86
|
-
blur:
|
|
87
|
-
getWidth: () =>
|
|
81
|
+
K(m ? "focus" : "blur"), p && re(m ? I.BEFORE : I.NONE);
|
|
82
|
+
}, [m]), Je(ge, () => ({
|
|
83
|
+
dom: f.current,
|
|
84
|
+
getRootDOMNode: () => f.current,
|
|
85
|
+
focus: K.bind(null, "focus"),
|
|
86
|
+
blur: K.bind(null, "blur"),
|
|
87
|
+
getWidth: () => f.current && f.current.clientWidth
|
|
88
88
|
}));
|
|
89
|
-
const Ue = "arrowIcon" in N ?
|
|
89
|
+
const Ue = "arrowIcon" in N ? Z === null ? null : /* @__PURE__ */ t("div", { className: `${n}-arrow-icon`, children: Z }) : /* @__PURE__ */ t("div", { className: `${n}-arrow-icon`, children: /* @__PURE__ */ t(eo, {}) }), Be = $e ? /* @__PURE__ */ t("span", { className: `${n}-loading-icon`, children: /* @__PURE__ */ t(oo, {}) }) : Y ? /* @__PURE__ */ t("span", { className: `${n}-suffix-icon`, children: Y }) : N.showSearch && m ? /* @__PURE__ */ t("div", { className: `${n}-search-icon`, children: /* @__PURE__ */ t(no, {}) }) : Ue, i = {
|
|
90
90
|
paste: De,
|
|
91
91
|
keyDown: se,
|
|
92
92
|
focus: (e) => {
|
|
93
|
-
e.stopPropagation(),
|
|
93
|
+
e.stopPropagation(), E("focus", e);
|
|
94
94
|
},
|
|
95
95
|
blur: (e) => {
|
|
96
|
-
e.stopPropagation(),
|
|
96
|
+
e.stopPropagation(), E("blur", e);
|
|
97
97
|
},
|
|
98
98
|
change: (e, o) => {
|
|
99
|
-
re(
|
|
99
|
+
re(I.EDITING), U == null || U(e, o);
|
|
100
100
|
}
|
|
101
101
|
}, Ve = () => {
|
|
102
102
|
let e;
|
|
103
103
|
switch (Me) {
|
|
104
|
-
case
|
|
105
|
-
e =
|
|
104
|
+
case I.BEFORE:
|
|
105
|
+
e = O || (_e ? b : "");
|
|
106
106
|
break;
|
|
107
|
-
case
|
|
108
|
-
e =
|
|
107
|
+
case I.EDITING:
|
|
108
|
+
e = O || "";
|
|
109
109
|
break;
|
|
110
110
|
default:
|
|
111
111
|
e = b;
|
|
112
112
|
break;
|
|
113
113
|
}
|
|
114
|
-
const o = !!(
|
|
114
|
+
const o = !!(H && p || R), s = {
|
|
115
115
|
style: { width: "100%" },
|
|
116
116
|
// _inputValue after renderText(value) may be rich text, but the value of <input> cannot be object
|
|
117
117
|
value: o && typeof e != "object" ? e : "",
|
|
118
118
|
// Allow placeholder to display the selected value first when searching
|
|
119
|
-
placeholder:
|
|
119
|
+
placeholder: p && b && typeof b != "object" ? b : ee
|
|
120
120
|
};
|
|
121
|
-
return
|
|
121
|
+
return p ? (s.onPaste = i.paste, s.onKeyDown = i.keyDown, s.onFocus = i.focus, s.onBlur = i.blur, s.onChange = i.change) : (s.tabIndex = -1, s.style.pointerEvents = "none"), /* @__PURE__ */ P("span", { className: `${n}-view-selector`, children: [
|
|
122
122
|
/* @__PURE__ */ t(
|
|
123
123
|
io,
|
|
124
124
|
{
|
|
125
125
|
"aria-hidden": !o || void 0,
|
|
126
|
-
ref:
|
|
126
|
+
ref: T,
|
|
127
127
|
disabled: h,
|
|
128
|
-
className:
|
|
128
|
+
className: D(`${n}-view-input`, {
|
|
129
129
|
[`${n}-hidden`]: !o
|
|
130
130
|
}),
|
|
131
131
|
autoComplete: "off",
|
|
132
132
|
...s
|
|
133
133
|
}
|
|
134
134
|
),
|
|
135
|
-
o ? /* @__PURE__ */ t("span", { className: `${n}-view-value-mirror`, children:
|
|
135
|
+
o ? /* @__PURE__ */ t("span", { className: `${n}-view-value-mirror`, children: fe(s.value ? e : s.placeholder) }) : null,
|
|
136
136
|
/* @__PURE__ */ t(
|
|
137
137
|
"span",
|
|
138
138
|
{
|
|
139
139
|
style: o ? { display: "none" } : {},
|
|
140
140
|
className: `${n}-view-value`,
|
|
141
|
-
children:
|
|
141
|
+
children: fe(R ? s.placeholder : e)
|
|
142
142
|
}
|
|
143
143
|
)
|
|
144
144
|
] });
|
|
145
|
-
},
|
|
146
|
-
const o =
|
|
145
|
+
}, W = co(oe), ae = C(c) ? c.count : c, ce = (e) => {
|
|
146
|
+
const o = W(e);
|
|
147
147
|
return { value: e, label: o.text, closable: !o.disabled };
|
|
148
|
-
},
|
|
148
|
+
}, q = Qe(() => {
|
|
149
149
|
if (!v)
|
|
150
150
|
return [];
|
|
151
|
-
const e =
|
|
152
|
-
return (he(ae) ? e.slice(0, ae) : e).map((
|
|
153
|
-
}, [g, v, c,
|
|
154
|
-
const e = C(c) ? c.count : c, o = C(c) && c.showPopover, s =
|
|
155
|
-
|
|
151
|
+
const e = pe(g) ? [] : [].concat(g);
|
|
152
|
+
return (he(ae) ? e.slice(0, ae) : e).map((k) => ce(k));
|
|
153
|
+
}, [g, v, c, W]), ze = () => {
|
|
154
|
+
const e = C(c) ? c.count : c, o = C(c) && c.showPopover, s = w == null ? void 0 : w("input-tag"), k = (r) => C(c) && ro(c.render) ? c.render(r) : e === "responsive" ? /* @__PURE__ */ P(
|
|
155
|
+
me,
|
|
156
156
|
{
|
|
157
157
|
className: `${s}-tag`,
|
|
158
158
|
children: [
|
|
@@ -161,24 +161,24 @@ const J = "__pqb_value_tag_placeholder", w = {
|
|
|
161
161
|
"..."
|
|
162
162
|
]
|
|
163
163
|
},
|
|
164
|
-
|
|
165
|
-
) : `+${r}...`, x =
|
|
164
|
+
Q
|
|
165
|
+
) : `+${r}...`, x = pe(g) ? [] : [].concat(g), He = () => {
|
|
166
166
|
for (let r = x.length - 1; r >= 0; r--) {
|
|
167
167
|
const l = x[r];
|
|
168
|
-
if (!
|
|
168
|
+
if (!W(l).disabled)
|
|
169
169
|
return r;
|
|
170
170
|
}
|
|
171
171
|
return -1;
|
|
172
|
-
},
|
|
172
|
+
}, X = {
|
|
173
173
|
onPaste: i.paste,
|
|
174
174
|
onKeyDown: i.keyDown,
|
|
175
175
|
onFocus: i.focus,
|
|
176
176
|
onBlur: i.blur,
|
|
177
177
|
onInputChange: i.change,
|
|
178
178
|
onRemove: (r, l, u) => {
|
|
179
|
-
const
|
|
179
|
+
const S = u.key;
|
|
180
180
|
let a = -1;
|
|
181
|
-
|
|
181
|
+
S === fo.key && (a = He()) !== -1 && (r = x[a], l = a), c && Ae(), z == null || z(r, l, u);
|
|
182
182
|
}
|
|
183
183
|
}, Ge = {
|
|
184
184
|
suffix: null,
|
|
@@ -192,38 +192,38 @@ const J = "__pqb_value_tag_placeholder", w = {
|
|
|
192
192
|
const r = x.length - e;
|
|
193
193
|
if (r > 0) {
|
|
194
194
|
const l = {
|
|
195
|
-
label:
|
|
195
|
+
label: k(r),
|
|
196
196
|
closable: !1,
|
|
197
197
|
// InputTag needs to extract value as key
|
|
198
|
-
value:
|
|
198
|
+
value: Q
|
|
199
199
|
};
|
|
200
200
|
if (o) {
|
|
201
201
|
const u = x.map((a, d) => ({ val: a, index: d })).slice(e).map((a) => {
|
|
202
202
|
const d = ce(a.val);
|
|
203
|
-
return
|
|
203
|
+
return A ? A(
|
|
204
204
|
{
|
|
205
205
|
...d,
|
|
206
|
-
onClose: (
|
|
207
|
-
|
|
206
|
+
onClose: (J) => {
|
|
207
|
+
X.onRemove(d.value, a.index, J);
|
|
208
208
|
}
|
|
209
209
|
},
|
|
210
210
|
a.index,
|
|
211
|
-
|
|
211
|
+
q.concat(l)
|
|
212
212
|
) : /* @__PURE__ */ Ye(
|
|
213
|
-
|
|
213
|
+
me,
|
|
214
214
|
{
|
|
215
215
|
...d,
|
|
216
216
|
key: d.value,
|
|
217
217
|
className: `${s}-tag`,
|
|
218
|
-
onClose: (
|
|
218
|
+
onClose: (J) => X.onRemove(d.value, a.index, J)
|
|
219
219
|
},
|
|
220
220
|
d.label
|
|
221
221
|
);
|
|
222
|
-
}),
|
|
222
|
+
}), S = C(o) ? o : {};
|
|
223
223
|
l.label = /* @__PURE__ */ t(
|
|
224
224
|
uo,
|
|
225
225
|
{
|
|
226
|
-
|
|
226
|
+
...S,
|
|
227
227
|
content: !!u.length && /* @__PURE__ */ t(
|
|
228
228
|
"div",
|
|
229
229
|
{
|
|
@@ -240,68 +240,68 @@ const J = "__pqb_value_tag_placeholder", w = {
|
|
|
240
240
|
return l;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
})(), Ke = ie ?
|
|
243
|
+
})(), Ke = ie ? q.concat(ie) : q;
|
|
244
244
|
return /* @__PURE__ */ t(
|
|
245
245
|
lo,
|
|
246
246
|
{
|
|
247
247
|
...Ge,
|
|
248
|
-
className:
|
|
249
|
-
ref:
|
|
248
|
+
className: H ? `${w == null ? void 0 : w("input-tag")}-focus` : "",
|
|
249
|
+
ref: T,
|
|
250
250
|
disabled: h,
|
|
251
|
-
dragToSort:
|
|
252
|
-
disableInput:
|
|
251
|
+
dragToSort: ne,
|
|
252
|
+
disableInput: !$,
|
|
253
253
|
animation: Se,
|
|
254
|
-
placeholder:
|
|
254
|
+
placeholder: ee,
|
|
255
255
|
value: Ke,
|
|
256
|
-
inputValue:
|
|
257
|
-
size:
|
|
256
|
+
inputValue: O,
|
|
257
|
+
size: y,
|
|
258
258
|
tagClassName: `${n}-tag`,
|
|
259
|
-
renderTag:
|
|
259
|
+
renderTag: A,
|
|
260
260
|
icon: { removeIcon: ye },
|
|
261
261
|
maxTagCount: e === "responsive" ? {
|
|
262
262
|
count: e,
|
|
263
|
-
render:
|
|
263
|
+
render: k,
|
|
264
264
|
popoverProps: C(o) ? o : o ? {} : { disabled: !0 }
|
|
265
265
|
} : void 0,
|
|
266
266
|
onChange: (r, l) => {
|
|
267
|
-
if (
|
|
267
|
+
if (L && l === "sort") {
|
|
268
268
|
const u = r.indexOf(
|
|
269
|
-
|
|
269
|
+
Q
|
|
270
270
|
);
|
|
271
271
|
if (u > -1) {
|
|
272
|
-
const
|
|
272
|
+
const S = r.slice(0, u), a = r.slice(u + 1), d = x.slice(
|
|
273
273
|
r.length - 1 - x.length
|
|
274
274
|
);
|
|
275
|
-
|
|
275
|
+
L(S.concat(d, a));
|
|
276
276
|
} else
|
|
277
|
-
|
|
277
|
+
L(r);
|
|
278
278
|
}
|
|
279
279
|
},
|
|
280
|
-
...
|
|
280
|
+
...X
|
|
281
281
|
}
|
|
282
282
|
);
|
|
283
|
-
}, le = Te || (N.error ? "error" : void 0), Le = !h && !
|
|
283
|
+
}, le = Te || (N.error ? "error" : void 0), Le = !h && !R && we ? /* @__PURE__ */ t(
|
|
284
284
|
so,
|
|
285
285
|
{
|
|
286
|
-
size:
|
|
286
|
+
size: y,
|
|
287
287
|
className: `${n}-clear-icon`,
|
|
288
288
|
onClick: Fe,
|
|
289
|
-
onMouseDown:
|
|
290
|
-
children:
|
|
289
|
+
onMouseDown: G,
|
|
290
|
+
children: F ?? /* @__PURE__ */ t(Ze, {})
|
|
291
291
|
},
|
|
292
292
|
"clearIcon"
|
|
293
|
-
) : null, je =
|
|
293
|
+
) : null, je = D(
|
|
294
294
|
n,
|
|
295
295
|
`${n}-${v ? "multiple" : "single"}`,
|
|
296
296
|
{
|
|
297
|
-
[`${n}-show-search`]:
|
|
298
|
-
[`${n}-open`]:
|
|
299
|
-
[`${n}-size-${
|
|
300
|
-
[`${n}-focused`]:
|
|
297
|
+
[`${n}-show-search`]: $,
|
|
298
|
+
[`${n}-open`]: m,
|
|
299
|
+
[`${n}-size-${y}`]: y,
|
|
300
|
+
[`${n}-focused`]: H,
|
|
301
301
|
[`${n}-${le}`]: le,
|
|
302
302
|
[`${n}-disabled`]: h,
|
|
303
303
|
[`${n}-no-border`]: !ve,
|
|
304
|
-
[`${n}-rtl`]:
|
|
304
|
+
[`${n}-rtl`]: ke
|
|
305
305
|
},
|
|
306
306
|
Ce
|
|
307
307
|
);
|
|
@@ -311,46 +311,46 @@ const J = "__pqb_value_tag_placeholder", w = {
|
|
|
311
311
|
role: "combobox",
|
|
312
312
|
"aria-haspopup": "listbox",
|
|
313
313
|
"aria-autocomplete": "list",
|
|
314
|
-
"aria-expanded":
|
|
314
|
+
"aria-expanded": m,
|
|
315
315
|
"aria-disabled": h,
|
|
316
|
-
"aria-controls":
|
|
317
|
-
...
|
|
318
|
-
...
|
|
319
|
-
ref:
|
|
316
|
+
"aria-controls": Ee,
|
|
317
|
+
...po(Oe, ["onClick", "onMouseEnter", "onMouseLeave"]),
|
|
318
|
+
...Pe,
|
|
319
|
+
ref: f,
|
|
320
320
|
tabIndex: h ? -1 : 0,
|
|
321
321
|
id: be,
|
|
322
322
|
style: xe,
|
|
323
323
|
className: je,
|
|
324
324
|
onKeyDown: se,
|
|
325
325
|
onFocus: (e) => {
|
|
326
|
-
!h && !
|
|
326
|
+
!h && !ne && (p ? T.current && T.current.focus() : E("focus", e));
|
|
327
327
|
},
|
|
328
|
-
onBlur: (e) =>
|
|
329
|
-
children: /* @__PURE__ */
|
|
328
|
+
onBlur: (e) => E("blur", e),
|
|
329
|
+
children: /* @__PURE__ */ P(
|
|
330
330
|
"div",
|
|
331
331
|
{
|
|
332
332
|
title: typeof b == "string" ? b : void 0,
|
|
333
|
-
className:
|
|
334
|
-
[`${n}-view-with-prefix`]:
|
|
333
|
+
className: D(`${n}-view`, {
|
|
334
|
+
[`${n}-view-with-prefix`]: M
|
|
335
335
|
}),
|
|
336
|
-
onClick: (e) =>
|
|
336
|
+
onClick: (e) => m && p && e.stopPropagation(),
|
|
337
337
|
children: [
|
|
338
|
-
|
|
338
|
+
M && /* @__PURE__ */ t(
|
|
339
339
|
"div",
|
|
340
340
|
{
|
|
341
341
|
"aria-hidden": "true",
|
|
342
|
-
className:
|
|
343
|
-
onMouseDown: (e) =>
|
|
344
|
-
children:
|
|
342
|
+
className: D(`${n}-prefix`),
|
|
343
|
+
onMouseDown: (e) => j && G(e),
|
|
344
|
+
children: M
|
|
345
345
|
}
|
|
346
346
|
),
|
|
347
347
|
v ? ze() : Ve(),
|
|
348
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ P(
|
|
349
349
|
"div",
|
|
350
350
|
{
|
|
351
351
|
"aria-hidden": "true",
|
|
352
352
|
className: `${n}-suffix`,
|
|
353
|
-
onMouseDown: (e) =>
|
|
353
|
+
onMouseDown: (e) => j && G(e),
|
|
354
354
|
children: [
|
|
355
355
|
Le,
|
|
356
356
|
Be
|
package/skeleton/index.js
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as P } from "react/jsx-runtime";
|
|
2
2
|
import C from "lodash/isPlainObject";
|
|
3
3
|
import S, { forwardRef as j, useContext as v } from "react";
|
|
4
|
-
import { a as b } from "../chunk/
|
|
4
|
+
import { a as b } from "../chunk/Cplu5dtQ.js";
|
|
5
5
|
import { u as y } from "../chunk/BFTV6myl.js";
|
|
6
6
|
import R from "@unicom-cloud/utils/class-name";
|
|
7
7
|
import { a as w } from "../chunk/ClqoGc3r.js";
|
|
8
8
|
import A from "./Image.js";
|
|
9
9
|
import D from "./Text.js";
|
|
10
|
-
function
|
|
10
|
+
function l(o) {
|
|
11
11
|
return C(o) ? o : {};
|
|
12
12
|
}
|
|
13
13
|
const F = {
|
|
14
14
|
text: !0,
|
|
15
15
|
loading: !0
|
|
16
16
|
};
|
|
17
|
-
function I(o,
|
|
18
|
-
const { getPrefixCls:
|
|
17
|
+
function I(o, p) {
|
|
18
|
+
const { getPrefixCls: r, componentConfig: n, rtl: d } = v(b), a = y(
|
|
19
19
|
o,
|
|
20
20
|
F,
|
|
21
|
-
|
|
22
|
-
), { style:
|
|
21
|
+
n == null ? void 0 : n.Skeleton
|
|
22
|
+
), { style: f, className: u, animation: g, loading: x, image: i, text: m, children: h } = a, s = l(i), N = l(m), t = r == null ? void 0 : r("skeleton"), $ = R(
|
|
23
23
|
t,
|
|
24
24
|
{
|
|
25
25
|
[`${t}-animate`]: g,
|
|
26
|
-
[`${t}-rtl`]:
|
|
26
|
+
[`${t}-rtl`]: d
|
|
27
27
|
},
|
|
28
28
|
u
|
|
29
29
|
);
|
|
30
|
-
function
|
|
31
|
-
return i && /* @__PURE__ */ e("div", { className: `${t}-header`, children: /* @__PURE__ */ e(A, { prefixCls: t, ...
|
|
30
|
+
function c() {
|
|
31
|
+
return i && /* @__PURE__ */ e("div", { className: `${t}-header`, children: /* @__PURE__ */ e(A, { prefixCls: t, ...s }) });
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
return
|
|
33
|
+
function k() {
|
|
34
|
+
return m && /* @__PURE__ */ e("div", { className: `${t}-content`, children: /* @__PURE__ */ e(D, { prefixCls: t, ...N }) });
|
|
35
35
|
}
|
|
36
|
-
return /* @__PURE__ */ e(S.Fragment, { children: x ? /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ e(S.Fragment, { children: x ? /* @__PURE__ */ P(
|
|
37
37
|
"div",
|
|
38
38
|
{
|
|
39
|
-
...w(
|
|
40
|
-
className:
|
|
41
|
-
style:
|
|
42
|
-
ref:
|
|
39
|
+
...w(a),
|
|
40
|
+
className: $,
|
|
41
|
+
style: f,
|
|
42
|
+
ref: p,
|
|
43
43
|
children: [
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
s.position !== "right" && c(),
|
|
45
|
+
k(),
|
|
46
|
+
s.position === "right" && c()
|
|
47
47
|
]
|
|
48
48
|
}
|
|
49
49
|
) : h });
|