@aloudata/aloudata-design 2.0.0-beta.12 → 2.0.0-beta.13
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/dist/Checkbox/style/index.less +1 -1
- package/dist/Icon/components/ArrowRightLightLine.d.ts +11 -0
- package/dist/Icon/components/ArrowRightLightLine.js +35 -0
- package/dist/Icon/index.d.ts +1 -0
- package/dist/Icon/index.js +1 -0
- package/dist/Icon/svg/Arrow-Right-light-line.svg +5 -0
- package/dist/MemberPicker/index.js +24 -21
- package/dist/MemberPicker/interface.d.ts +1 -1
- package/dist/MemberPicker/style/index.less +6 -0
- package/dist/Modal/index.js +26 -7
- package/dist/Select/index.js +10 -2
- package/dist/Select/style/emptyShowAll.less +10 -0
- package/dist/Select/style/index.less +1 -1
- package/dist/Select/style/status.less +7 -1
- package/dist/Tree/Tree.js +5 -6
- package/dist/Tree/demo/basic/index.js +1 -0
- package/dist/Tree/style/checkbox.less +57 -36
- package/dist/Tree/style/index.less +11 -2
- package/dist/Tree/style/var.less +1 -1
- package/dist/ald.min.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SVGProps } from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
interface SVGRProps {
|
|
4
|
+
size?: number | string;
|
|
5
|
+
title?: string;
|
|
6
|
+
titleId?: string;
|
|
7
|
+
desc?: string;
|
|
8
|
+
descId?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const Memo: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement> & SVGRProps, "ref"> & React.RefAttributes<SVGSVGElement>>>;
|
|
11
|
+
export default Memo;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var _excluded = ["title", "titleId", "desc", "descId"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { forwardRef, memo } from 'react';
|
|
7
|
+
var ArrowRightLightLine = function ArrowRightLightLine(_ref, ref) {
|
|
8
|
+
var title = _ref.title,
|
|
9
|
+
titleId = _ref.titleId,
|
|
10
|
+
desc = _ref.desc,
|
|
11
|
+
descId = _ref.descId,
|
|
12
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
13
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
14
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15
|
+
width: props.width || props.size || 16,
|
|
16
|
+
height: props.height || props.size || 16,
|
|
17
|
+
fill: "none",
|
|
18
|
+
viewBox: "0 0 24 24",
|
|
19
|
+
ref: ref,
|
|
20
|
+
"aria-labelledby": titleId,
|
|
21
|
+
"aria-describedby": descId
|
|
22
|
+
}, props), desc ? /*#__PURE__*/React.createElement("desc", {
|
|
23
|
+
id: descId
|
|
24
|
+
}, desc) : null, title ? /*#__PURE__*/React.createElement("title", {
|
|
25
|
+
id: titleId
|
|
26
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
27
|
+
fill: props.color || 'currentColor',
|
|
28
|
+
fillRule: "evenodd",
|
|
29
|
+
d: "M9.47 6.47a.75.75 0 0 1 1.06 0l5 5a.75.75 0 0 1 0 1.06l-5 5a.75.75 0 1 1-1.06-1.06L13.94 12 9.47 7.53a.75.75 0 0 1 0-1.06Z",
|
|
30
|
+
clipRule: "evenodd"
|
|
31
|
+
}));
|
|
32
|
+
};
|
|
33
|
+
var ForwardRef = /*#__PURE__*/forwardRef(ArrowRightLightLine);
|
|
34
|
+
var Memo = /*#__PURE__*/memo(ForwardRef);
|
|
35
|
+
export default Memo;
|
package/dist/Icon/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as AlertTriangleDuotone } from './components/AlertTriangleDuotone';
|
|
2
2
|
export { default as AlertTriangleLine } from './components/AlertTriangleLine';
|
|
3
3
|
export { default as ArrowDownFill } from './components/ArrowDownFill';
|
|
4
|
+
export { default as ArrowRightLightLine } from './components/ArrowRightLightLine';
|
|
4
5
|
export { default as AttentionCircleFill } from './components/AttentionCircleFill';
|
|
5
6
|
export { default as AttentionTriangleFill } from './components/AttentionTriangleFill';
|
|
6
7
|
export { default as AttentionTriangleLightLine } from './components/AttentionTriangleLightLine';
|
package/dist/Icon/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as AlertTriangleDuotone } from "./components/AlertTriangleDuotone";
|
|
2
2
|
export { default as AlertTriangleLine } from "./components/AlertTriangleLine";
|
|
3
3
|
export { default as ArrowDownFill } from "./components/ArrowDownFill";
|
|
4
|
+
export { default as ArrowRightLightLine } from "./components/ArrowRightLightLine";
|
|
4
5
|
export { default as AttentionCircleFill } from "./components/AttentionCircleFill";
|
|
5
6
|
export { default as AttentionTriangleFill } from "./components/AttentionTriangleFill";
|
|
6
7
|
export { default as AttentionTriangleLightLine } from "./components/AttentionTriangleLightLine";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id=" Icon / Light / Arrow / Arrow-Right-light-line">
|
|
3
|
+
<path id="Icon" fill-rule="evenodd" clip-rule="evenodd" d="M9.46967 6.46967C9.76256 6.17678 10.2374 6.17678 10.5303 6.46967L15.5303 11.4697C15.8232 11.7626 15.8232 12.2374 15.5303 12.5303L10.5303 17.5303C10.2374 17.8232 9.76256 17.8232 9.46967 17.5303C9.17678 17.2374 9.17678 16.7626 9.46967 16.4697L13.9393 12L9.46967 7.53033C9.17678 7.23744 9.17678 6.76256 9.46967 6.46967Z" fill="black"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["value", "type", "onChange", "multiple", "dropdownWidth", "open", "onOpenChange", "placeholder", "className", "allowClear", "disabled", "onClear", "size", "selectType", "prefix", "lockedIds"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
1
3
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
2
4
|
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); }
|
|
3
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -6,6 +8,8 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
6
8
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
7
9
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
8
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
9
13
|
import { useRequest } from 'ahooks';
|
|
10
14
|
import classNames from 'classnames';
|
|
11
15
|
import _ from 'lodash';
|
|
@@ -40,7 +44,8 @@ var Component = function Component(_ref) {
|
|
|
40
44
|
selectType = _ref$selectType === void 0 ? 'secondary' : _ref$selectType,
|
|
41
45
|
propPrefix = _ref.prefix,
|
|
42
46
|
_ref$lockedIds = _ref.lockedIds,
|
|
43
|
-
lockedIds = _ref$lockedIds === void 0 ? [] : _ref$lockedIds
|
|
47
|
+
lockedIds = _ref$lockedIds === void 0 ? [] : _ref$lockedIds,
|
|
48
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
44
49
|
var _ConfigProvider$useGe = ConfigProvider.useGetUserList(),
|
|
45
50
|
getUsersByIds = _ConfigProvider$useGe.getUsersByIds,
|
|
46
51
|
getUsersByKeywords = _ConfigProvider$useGe.getUsersByKeywords;
|
|
@@ -186,22 +191,9 @@ var Component = function Component(_ref) {
|
|
|
186
191
|
setDropdownOpen(open);
|
|
187
192
|
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(open);
|
|
188
193
|
}, [onOpenChange]);
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
var user = searchUserList[0];
|
|
193
|
-
return /*#__PURE__*/React.createElement(Avatar, {
|
|
194
|
-
src: user === null || user === void 0 ? void 0 : user.photo,
|
|
195
|
-
size: 20
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
if (type === EMemberPicker.GROUP) return /*#__PURE__*/React.createElement(UserGroup, {
|
|
199
|
-
size: 20
|
|
200
|
-
});
|
|
201
|
-
return propPrefix;
|
|
202
|
-
}, [multiple, propPrefix, searchUserList, type]);
|
|
203
|
-
return /*#__PURE__*/React.createElement(Select, {
|
|
204
|
-
prefix: prefix,
|
|
194
|
+
return /*#__PURE__*/React.createElement(Select, _extends({
|
|
195
|
+
prefix: propPrefix
|
|
196
|
+
}, restProps, {
|
|
205
197
|
size: size,
|
|
206
198
|
type: selectType,
|
|
207
199
|
className: classNames('ald-member-picker-select', className),
|
|
@@ -228,14 +220,25 @@ var Component = function Component(_ref) {
|
|
|
228
220
|
options: selectedUserList.map(function (item) {
|
|
229
221
|
if (item.type === EUserType.USER_GROUP) return {
|
|
230
222
|
label: item.name,
|
|
231
|
-
value: item.groupId
|
|
223
|
+
value: item.groupId,
|
|
224
|
+
tag: /*#__PURE__*/React.createElement("div", {
|
|
225
|
+
className: 'ald-member-picker-tag'
|
|
226
|
+
}, /*#__PURE__*/React.createElement(UserGroup, {
|
|
227
|
+
size: 20
|
|
228
|
+
}), item.name)
|
|
232
229
|
};
|
|
233
230
|
return {
|
|
234
231
|
label: item.nickname || item.name,
|
|
235
|
-
value: item.userId
|
|
232
|
+
value: item.userId,
|
|
233
|
+
tag: /*#__PURE__*/React.createElement("div", {
|
|
234
|
+
className: 'ald-member-picker-tag'
|
|
235
|
+
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
236
|
+
size: 20,
|
|
237
|
+
src: item.photo
|
|
238
|
+
}), item.nickname || item.name)
|
|
236
239
|
};
|
|
237
240
|
}),
|
|
238
|
-
optionLabelProp:
|
|
241
|
+
optionLabelProp: multiple ? 'label' : 'tag',
|
|
239
242
|
open: dropdownOpen,
|
|
240
243
|
onDropdownVisibleChange: onDropdownOpenChange,
|
|
241
244
|
dropdownMatchSelectWidth: false,
|
|
@@ -256,7 +259,7 @@ var Component = function Component(_ref) {
|
|
|
256
259
|
onCancel: setDropdownOpen.bind(null, false)
|
|
257
260
|
}));
|
|
258
261
|
}
|
|
259
|
-
});
|
|
262
|
+
}));
|
|
260
263
|
};
|
|
261
264
|
var MemberSelector = Component;
|
|
262
265
|
MemberSelector.MemberPanel = MemberPanel;
|
|
@@ -9,7 +9,7 @@ export declare enum EMemberPicker {
|
|
|
9
9
|
USER = "USER",
|
|
10
10
|
BOTH = "BOTH"
|
|
11
11
|
}
|
|
12
|
-
export interface IBaseMemberSelectorProps extends
|
|
12
|
+
export interface IBaseMemberSelectorProps extends Omit<ISelectProps, 'type'> {
|
|
13
13
|
value?: TMemberPickerValue;
|
|
14
14
|
dropdownWidth?: number;
|
|
15
15
|
open?: boolean;
|
package/dist/Modal/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var _excluded = ["className", "type", "loading", "size", "disabled", "shape"],
|
|
|
5
5
|
_excluded4 = ["okButtonProps", "cancelButtonProps", "okType", "width", "title", "subTitle", "okText", "cancelText", "className"],
|
|
6
6
|
_excluded5 = ["okButtonProps", "cancelButtonProps", "okType", "width", "title", "subTitle", "okText", "cancelText", "className"],
|
|
7
7
|
_excluded6 = ["okButtonProps", "cancelButtonProps", "okType", "width", "title", "subTitle", "okText", "cancelText", "className"],
|
|
8
|
-
_excluded7 = ["okButtonProps", "cancelButtonProps", "okType", "width", "title", "subTitle", "className", "okText", "cancelText"];
|
|
8
|
+
_excluded7 = ["okButtonProps", "cancelButtonProps", "okType", "width", "title", "subTitle", "className", "okText", "cancelText", "type"];
|
|
9
9
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
10
10
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
11
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -65,6 +65,27 @@ var ModalTitle = function ModalTitle(_ref, type) {
|
|
|
65
65
|
className: 'ald-modal-text-sub-title'
|
|
66
66
|
}, subTitle)));
|
|
67
67
|
};
|
|
68
|
+
function getIcon(type) {
|
|
69
|
+
if (type === 'success') return /*#__PURE__*/React.createElement(CheckCircleLightLine, {
|
|
70
|
+
fill: "#fff",
|
|
71
|
+
color: "#22C55E",
|
|
72
|
+
size: 24
|
|
73
|
+
});
|
|
74
|
+
if (type === 'error') return /*#__PURE__*/React.createElement(AttentionTriangleLightLine, {
|
|
75
|
+
color: "#EF4444",
|
|
76
|
+
fill: '#fff',
|
|
77
|
+
size: 24
|
|
78
|
+
});
|
|
79
|
+
if (type === 'warning') return /*#__PURE__*/React.createElement(AttentionTriangleLightLine, {
|
|
80
|
+
color: "#EAB308",
|
|
81
|
+
size: 24
|
|
82
|
+
});
|
|
83
|
+
return /*#__PURE__*/React.createElement(InformationCircleLightLine, {
|
|
84
|
+
size: 24,
|
|
85
|
+
color: '#2986F4',
|
|
86
|
+
className: "ald-modal-close"
|
|
87
|
+
});
|
|
88
|
+
}
|
|
68
89
|
var OriginModal = function OriginModal(props) {
|
|
69
90
|
var className = props.className,
|
|
70
91
|
children = props.children,
|
|
@@ -260,6 +281,8 @@ Modal.confirm = function confirmFn(props) {
|
|
|
260
281
|
okText = _props$okText6 === void 0 ? '确定' : _props$okText6,
|
|
261
282
|
_props$cancelText6 = props.cancelText,
|
|
262
283
|
cancelText = _props$cancelText6 === void 0 ? '取消' : _props$cancelText6,
|
|
284
|
+
_props$type = props.type,
|
|
285
|
+
type = _props$type === void 0 ? 'confirm' : _props$type,
|
|
263
286
|
restProps = _objectWithoutProperties(props, _excluded7);
|
|
264
287
|
return AntdModal.confirm(_objectSpread({
|
|
265
288
|
okButtonProps: getButtonProps(okButtonProps, 'primary', okType),
|
|
@@ -267,14 +290,10 @@ Modal.confirm = function confirmFn(props) {
|
|
|
267
290
|
width: width || DEFAULT_WIDTH,
|
|
268
291
|
className: classNames('ald-modal', className),
|
|
269
292
|
title: ModalTitle({
|
|
270
|
-
icon:
|
|
271
|
-
size: 24,
|
|
272
|
-
color: '#2986F4',
|
|
273
|
-
className: "ald-modal-close"
|
|
274
|
-
}),
|
|
293
|
+
icon: getIcon(type),
|
|
275
294
|
title: title,
|
|
276
295
|
subTitle: subTitle
|
|
277
|
-
},
|
|
296
|
+
}, type),
|
|
278
297
|
okText: okText,
|
|
279
298
|
cancelText: cancelText
|
|
280
299
|
}, restProps));
|
package/dist/Select/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
var _excluded = ["mode", "options", "dropdownRender", "onDropdownVisibleChange", "defaultValue", "onChange", "open", "defaultOpen", "prefix", "prefixWidth", "className", "popupClassName", "listHeight", "notFoundContent", "value", "type", "tagRender", "style", "autoFocus", "showSearch", "showAllOption", "size", "status", "disabled", "prefixCls"];
|
|
2
|
+
var _excluded = ["mode", "options", "dropdownRender", "onDropdownVisibleChange", "defaultValue", "onChange", "open", "defaultOpen", "prefix", "prefixWidth", "className", "popupClassName", "listHeight", "notFoundContent", "value", "type", "tagRender", "style", "autoFocus", "showSearch", "showAllOption", "size", "status", "disabled", "prefixCls", "placeholder", "dropdownStyle"];
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
@@ -32,6 +32,9 @@ import Empty from "../Empty";
|
|
|
32
32
|
import { ArrowDownFill, TimesLightLine } from "../Icon";
|
|
33
33
|
import Option from "./components/Option";
|
|
34
34
|
var DEFAULT_ALL_OPTION_VALUE = 'default_all_option_value';
|
|
35
|
+
var defaultDropdownStyle = {
|
|
36
|
+
minWidth: 192
|
|
37
|
+
};
|
|
35
38
|
var DEFAULT_LIST_ITEM_HEIGHT = 36;
|
|
36
39
|
var getSelectedOptionsFromValue = function getSelectedOptionsFromValue(isMultiple, options, value, defaultValue) {
|
|
37
40
|
if (typeof value !== 'undefined') {
|
|
@@ -103,7 +106,10 @@ var Select = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
103
106
|
customStatus = props.status,
|
|
104
107
|
customDisabled = props.disabled,
|
|
105
108
|
customizePrefixCls = props.prefixCls,
|
|
109
|
+
propsPlaceholder = props.placeholder,
|
|
110
|
+
dropdownStyle = props.dropdownStyle,
|
|
106
111
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
112
|
+
var placeholder = type === 'primary' ? '全部' : propsPlaceholder;
|
|
107
113
|
var contentSize = useContext(SizeContext);
|
|
108
114
|
var _React$useContext = React.useContext(ConfigContext),
|
|
109
115
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
@@ -371,7 +377,7 @@ var Select = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
371
377
|
setIsOpen(!isOpen);
|
|
372
378
|
}
|
|
373
379
|
},
|
|
374
|
-
className: classNames('ald-select', className, (_classNames = {}, _defineProperty(_classNames, "ald-select-".concat(type), type === 'primary' || type === 'secondary'), _defineProperty(_classNames, 'ald-select-multiple', isMultiple), _defineProperty(_classNames, 'ald-select-single', !isMultiple), _defineProperty(_classNames, 'ald-select-large', size === 'large'), _defineProperty(_classNames, 'ald-select-small', size === 'small'), _defineProperty(_classNames, 'ald-select-disabled', mergedDisabled), _defineProperty(_classNames, 'ald-select-middle', size !== 'large' && size !== 'small'), _defineProperty(_classNames, 'ald-select-open', typeof _open === 'boolean' ? _open : isOpen), _defineProperty(_classNames, 'ald-select-focus', isFocus), _defineProperty(_classNames, "ald-select-status-".concat(mergedStatus), mergedStatus), _defineProperty(_classNames, 'ald-select-has-value', !_.isEmpty(value) || !_.isEmpty(currentValue)), _classNames), compactItemClassnames, hashId),
|
|
380
|
+
className: classNames('ald-select', className, (_classNames = {}, _defineProperty(_classNames, "ald-select-".concat(type), type === 'primary' || type === 'secondary'), _defineProperty(_classNames, 'ald-select-multiple', isMultiple), _defineProperty(_classNames, 'ald-select-single', !isMultiple), _defineProperty(_classNames, 'ald-select-large', size === 'large'), _defineProperty(_classNames, 'ald-select-small', size === 'small'), _defineProperty(_classNames, 'ald-select-disabled', mergedDisabled), _defineProperty(_classNames, 'ald-select-middle', size !== 'large' && size !== 'small'), _defineProperty(_classNames, 'ald-select-open', typeof _open === 'boolean' ? _open : isOpen), _defineProperty(_classNames, 'ald-select-focus', isFocus), _defineProperty(_classNames, "ald-select-status-".concat(mergedStatus), mergedStatus), _defineProperty(_classNames, 'ald-select-empty-show-all', type === 'primary'), _defineProperty(_classNames, 'ald-select-has-value', !_.isEmpty(value) || !_.isEmpty(currentValue)), _classNames), compactItemClassnames, hashId),
|
|
375
381
|
spellCheck: false,
|
|
376
382
|
style: Object.assign(styleVar, style)
|
|
377
383
|
}, !!prefix && /*#__PURE__*/React.createElement("span", {
|
|
@@ -380,6 +386,7 @@ var Select = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
380
386
|
}, prefix), /*#__PURE__*/React.createElement(AntdSelect, _extends({}, restProps, {
|
|
381
387
|
// @ts-ignore
|
|
382
388
|
status: mergedStatus,
|
|
389
|
+
placeholder: placeholder,
|
|
383
390
|
showSearch: showSearch,
|
|
384
391
|
options: innerOptions,
|
|
385
392
|
mode: isMultiple ? 'multiple' : undefined,
|
|
@@ -395,6 +402,7 @@ var Select = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
395
402
|
className: classNames({
|
|
396
403
|
'ald-select-prefix-select': !!prefix || prefix === 0
|
|
397
404
|
}),
|
|
405
|
+
dropdownStyle: dropdownStyle || defaultDropdownStyle,
|
|
398
406
|
clearIcon: /*#__PURE__*/React.createElement(TimesLightLine, {
|
|
399
407
|
className: "ald-select-clear-icon",
|
|
400
408
|
color: "#9CA3AF"
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
@import './selectDropdown.less';
|
|
8
8
|
@import './option.less';
|
|
9
9
|
@import './layout.less';
|
|
10
|
+
@import './emptyShowAll.less';
|
|
10
11
|
|
|
11
12
|
.ald-select.ald-select {
|
|
12
13
|
display: inline-block;
|
|
@@ -16,7 +17,6 @@
|
|
|
16
17
|
cursor: pointer;
|
|
17
18
|
border-width: 1px;
|
|
18
19
|
border-style: solid;
|
|
19
|
-
min-width: 192px;
|
|
20
20
|
|
|
21
21
|
.ald-select-prefix {
|
|
22
22
|
color: var(--alias-colors-text-subtle, #4b5563);
|
|
@@ -11,12 +11,18 @@
|
|
|
11
11
|
.ald-select.ald-select-primary {
|
|
12
12
|
.select-color(var(--alias-colors-border-accent-gray-subtle-default, #D1D5DB),var(--alias-colors-bg-skeleton-subtle, #F9FAFB),var(--alias-colors-text-default, #1f2937));
|
|
13
13
|
|
|
14
|
+
&.ald-select-multiple .ant-select {
|
|
15
|
+
.ant-select-selector {
|
|
16
|
+
color: var(--alias-colors-text-selected, #126fdd);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
14
20
|
&.ald-select-fitted {
|
|
15
21
|
.select-color(var(--alias-colors-border-accent-gray-subtle-default, #D1D5DB),var(--alias-colors-bg-skeleton-subtle, #F9FAFB),var(--alias-colors-text-default, #1f2937));
|
|
16
22
|
}
|
|
17
23
|
|
|
18
24
|
&:hover {
|
|
19
|
-
.select-color(var(--alias-colors-border-accent-gray-subtle-hover, #9ca3af),var(--alias-colors-bg-
|
|
25
|
+
.select-color(var(--alias-colors-border-accent-gray-subtle-hover, #9ca3af), var(--alias-colors-bg-accent-gray-subtler-default, #F9FAFB),var(--alias-colors-text-default, #1f2937));
|
|
20
26
|
}
|
|
21
27
|
|
|
22
28
|
&:active {
|
package/dist/Tree/Tree.js
CHANGED
|
@@ -13,11 +13,10 @@ import { noop } from 'lodash';
|
|
|
13
13
|
import RcTree from 'rc-tree';
|
|
14
14
|
import * as React from 'react';
|
|
15
15
|
import { ConfigContext } from "../ConfigProvider";
|
|
16
|
-
import {
|
|
16
|
+
import { ArrowRightLightLine, DragLine } from "../Icon";
|
|
17
17
|
import collapseMotion from "../_utils/motion";
|
|
18
18
|
import dropIndicatorRender from "./utils/dropIndicator";
|
|
19
19
|
import renderSwitcherIcon from "./utils/iconUtil";
|
|
20
|
-
var TREE_SWITCH_LARGE_ICON_SIZE = 20;
|
|
21
20
|
var TREE_SWITCH_CION_SIZE = 16;
|
|
22
21
|
|
|
23
22
|
// [Legacy] Compatible for v3
|
|
@@ -100,7 +99,7 @@ var Tree = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
100
99
|
keyEntities = nodeProps.context.keyEntities,
|
|
101
100
|
isLeaf = nodeProps.isLeaf;
|
|
102
101
|
var level = ((_keyEntities = keyEntities[eventKey]) === null || _keyEntities === void 0 ? void 0 : _keyEntities.level) || 0;
|
|
103
|
-
var iconSize =
|
|
102
|
+
var iconSize = TREE_SWITCH_CION_SIZE;
|
|
104
103
|
var indentWidth = isLeaf ? iconSize : 0;
|
|
105
104
|
indentWidth += level * (iconSize / 2);
|
|
106
105
|
return /*#__PURE__*/React.createElement("span", {
|
|
@@ -183,10 +182,10 @@ var Tree = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
183
182
|
// @ts-ignore
|
|
184
183
|
,
|
|
185
184
|
switcherIcon: function switcherIcon(nodeProps) {
|
|
186
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, renderIndent(nodeProps), renderSwitcherIcon(prefixCls, /*#__PURE__*/React.createElement(
|
|
187
|
-
size:
|
|
185
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, renderIndent(nodeProps), renderSwitcherIcon(prefixCls, /*#__PURE__*/React.createElement(ArrowRightLightLine, {
|
|
186
|
+
size: TREE_SWITCH_CION_SIZE,
|
|
188
187
|
color: '#9CA3AF'
|
|
189
|
-
}, "\u5C55\u5F00"), showLine, nodeProps,
|
|
188
|
+
}, "\u5C55\u5F00"), showLine, nodeProps, TREE_SWITCH_CION_SIZE));
|
|
190
189
|
},
|
|
191
190
|
draggable: draggableConfig
|
|
192
191
|
}), children);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
.aldCheckboxFn(
|
|
2
|
-
@checkbox-inner-prefix-cls: ~'@{checkbox-prefix-cls}-inner';
|
|
1
|
+
.aldCheckboxFn() {
|
|
3
2
|
// 一般状态
|
|
4
|
-
|
|
3
|
+
.ald-tree-checkbox {
|
|
5
4
|
.reset-component();
|
|
6
5
|
|
|
7
6
|
position: relative;
|
|
@@ -22,11 +21,7 @@
|
|
|
22
21
|
animation: ald-checkbox-effect 0.36s ease-in-out;
|
|
23
22
|
animation-fill-mode: backwards;
|
|
24
23
|
content: '';
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
&:hover::after,
|
|
28
|
-
.@{checkbox-prefix-cls}-wrapper:hover &::after {
|
|
29
|
-
visibility: hidden;
|
|
24
|
+
border-color: var(--alias-colors-bg-selected-strong-default, #126fdd);
|
|
30
25
|
}
|
|
31
26
|
|
|
32
27
|
&-inner {
|
|
@@ -38,7 +33,8 @@
|
|
|
38
33
|
height: @checkbox-size;
|
|
39
34
|
direction: ltr;
|
|
40
35
|
background-color: @checkbox-check-bg;
|
|
41
|
-
border: 1px solid
|
|
36
|
+
border: 1px solid
|
|
37
|
+
var(--alias-colors-border-accent-gray-subtle-default, #d1d5db);
|
|
42
38
|
border-radius: @checkbox-border-radius;
|
|
43
39
|
border-collapse: separate;
|
|
44
40
|
transition: all 0.3s;
|
|
@@ -54,7 +50,7 @@
|
|
|
54
50
|
display: table;
|
|
55
51
|
width: @check-width;
|
|
56
52
|
height: @check-height;
|
|
57
|
-
border: 2px solid
|
|
53
|
+
border: 2px solid;
|
|
58
54
|
border-top: 0;
|
|
59
55
|
border-left: 0;
|
|
60
56
|
transform: rotate(45deg) scale(0) translate(-50%, -50%);
|
|
@@ -62,6 +58,21 @@
|
|
|
62
58
|
transition: all 0.1s @ease-in-back, opacity 0.1s;
|
|
63
59
|
content: ' ';
|
|
64
60
|
}
|
|
61
|
+
|
|
62
|
+
&:hover {
|
|
63
|
+
border-color: var(
|
|
64
|
+
--alias-colors-border-accent-gray-subtle-hover,
|
|
65
|
+
#9ca3af
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&:active {
|
|
70
|
+
border-color: var(
|
|
71
|
+
--alias-colors-border-accent-gray-subtle-default,
|
|
72
|
+
#d1d5db
|
|
73
|
+
);
|
|
74
|
+
background-color: var(--alias-colors-bg-skeleton-strong, #f3f4f6);
|
|
75
|
+
}
|
|
65
76
|
}
|
|
66
77
|
|
|
67
78
|
&-input {
|
|
@@ -76,10 +87,10 @@
|
|
|
76
87
|
}
|
|
77
88
|
|
|
78
89
|
// 选中状态
|
|
79
|
-
|
|
90
|
+
.ald-tree-checkbox-checked .ald-tree-checkbox-inner::after {
|
|
80
91
|
position: absolute;
|
|
81
92
|
display: table;
|
|
82
|
-
border: 2px solid
|
|
93
|
+
border: 2px solid var(--alias-colors-icon-inverse-default, #fff);
|
|
83
94
|
border-top: 0;
|
|
84
95
|
border-left: 0;
|
|
85
96
|
transform: rotate(45deg) scale(1) translate(-50%, -50%);
|
|
@@ -88,30 +99,31 @@
|
|
|
88
99
|
content: ' ';
|
|
89
100
|
}
|
|
90
101
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
background-color: #
|
|
102
|
+
.ald-tree-checkbox-checked {
|
|
103
|
+
.ald-tree-checkbox-inner {
|
|
104
|
+
background-color: var(--alias-colors-bg-selected-strong-default, #126fdd);
|
|
105
|
+
border-color: var(--alias-colors-bg-selected-strong-default, #126fdd);
|
|
94
106
|
}
|
|
95
107
|
}
|
|
96
108
|
|
|
97
|
-
|
|
109
|
+
.ald-tree-checkbox-disabled {
|
|
98
110
|
cursor: initial;
|
|
99
111
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
border-color:
|
|
112
|
+
&.ald-tree-checkbox-checked {
|
|
113
|
+
.ald-tree-checkbox-inner::after {
|
|
114
|
+
border-color: var(--alias-colors-icon-disabled, rgba(0, 0, 0, 0.25));
|
|
103
115
|
animation-name: none;
|
|
104
116
|
}
|
|
105
117
|
}
|
|
106
118
|
|
|
107
|
-
|
|
119
|
+
.ald-tree-checkbox-input {
|
|
108
120
|
cursor: initial;
|
|
109
121
|
pointer-events: none;
|
|
110
122
|
}
|
|
111
123
|
|
|
112
|
-
|
|
113
|
-
background-color:
|
|
114
|
-
|
|
124
|
+
.ald-tree-checkbox-inner {
|
|
125
|
+
background-color: var(--alias-colors-bg-disabled, rgba(0, 0, 0, 0.05));
|
|
126
|
+
border-color: var(--alias-colors-border-disabled, rgba(0, 0, 0, 0.1));
|
|
115
127
|
|
|
116
128
|
&::after {
|
|
117
129
|
border-color: @input-disabled-bg;
|
|
@@ -127,12 +139,12 @@
|
|
|
127
139
|
|
|
128
140
|
// Not show highlight border of checkbox when disabled
|
|
129
141
|
&:hover::after,
|
|
130
|
-
|
|
142
|
+
.ald-tree-checkbox-wrapper:hover &::after {
|
|
131
143
|
visibility: hidden;
|
|
132
144
|
}
|
|
133
145
|
}
|
|
134
146
|
|
|
135
|
-
|
|
147
|
+
.ald-tree-checkbox-wrapper {
|
|
136
148
|
.reset-component();
|
|
137
149
|
|
|
138
150
|
display: inline-flex;
|
|
@@ -147,7 +159,7 @@
|
|
|
147
159
|
content: '\a0';
|
|
148
160
|
}
|
|
149
161
|
|
|
150
|
-
|
|
162
|
+
&.ald-tree-checkbox-wrapper-disabled {
|
|
151
163
|
cursor: initial;
|
|
152
164
|
}
|
|
153
165
|
|
|
@@ -163,12 +175,12 @@
|
|
|
163
175
|
}
|
|
164
176
|
}
|
|
165
177
|
|
|
166
|
-
|
|
178
|
+
.ald-tree-checkbox + span {
|
|
167
179
|
padding-right: 8px;
|
|
168
180
|
padding-left: 8px;
|
|
169
181
|
}
|
|
170
182
|
|
|
171
|
-
|
|
183
|
+
.ald-tree-checkbox-group {
|
|
172
184
|
.reset-component();
|
|
173
185
|
|
|
174
186
|
display: inline-block;
|
|
@@ -187,11 +199,13 @@
|
|
|
187
199
|
}
|
|
188
200
|
|
|
189
201
|
// 半选状态
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
background-color:
|
|
202
|
+
.ald-tree-checkbox-indeterminate {
|
|
203
|
+
.ald-tree-checkbox-inner {
|
|
204
|
+
background-color: var(--alias-colors-bg-selected-strong-default, #126fdd);
|
|
205
|
+
border-color: var(--alias-colors-bg-selected-strong-default, #126fdd);
|
|
193
206
|
}
|
|
194
|
-
|
|
207
|
+
|
|
208
|
+
.ald-tree-checkbox-inner::after {
|
|
195
209
|
@indeterminate-width: @checkbox-size - 8px;
|
|
196
210
|
@indeterminate-height: @checkbox-size - 14px;
|
|
197
211
|
|
|
@@ -199,16 +213,23 @@
|
|
|
199
213
|
left: 50%;
|
|
200
214
|
width: @indeterminate-width;
|
|
201
215
|
height: @indeterminate-height;
|
|
202
|
-
background-color:
|
|
216
|
+
background-color: var(--alias-colors-icon-inverse-default, #fff);
|
|
203
217
|
border: 0;
|
|
204
218
|
transform: translate(-50%, -50%) scale(1);
|
|
205
219
|
opacity: 1;
|
|
206
220
|
content: ' ';
|
|
207
221
|
}
|
|
208
222
|
|
|
209
|
-
|
|
210
|
-
background-color:
|
|
211
|
-
border-color:
|
|
223
|
+
&.ald-tree-checkbox-disabled .ald-tree-checkbox-inner {
|
|
224
|
+
background-color: var(--alias-colors-bg-disabled, rgba(0, 0, 0, 0.05));
|
|
225
|
+
border-color: var(--alias-colors-bg-disabled, rgba(0, 0, 0, 0.05));
|
|
226
|
+
|
|
227
|
+
&::after {
|
|
228
|
+
background-color: var(
|
|
229
|
+
--alias-colors-icon-disabled,
|
|
230
|
+
rgba(0, 0, 0, 0.25)
|
|
231
|
+
);
|
|
232
|
+
}
|
|
212
233
|
}
|
|
213
234
|
}
|
|
214
235
|
}
|