@aloudata/aloudata-design 2.0.0-beta.3 → 2.0.0-beta.5

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.
@@ -23,7 +23,7 @@
23
23
 
24
24
  @button-height-small: 28px;
25
25
  @button-text-size-small: 12px;
26
- @button-border-radius-small: 2px;
26
+ @button-border-radius-small: var(--alias-radius-50, 4px);
27
27
  @button-padding-small: var(--alias-padding-75-minus-1, 6px)
28
28
  var(--alias-padding-150-minus-1, 12px);
29
29
  @button-line-height-small: 16px;
@@ -78,6 +78,7 @@
78
78
  box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.05),
79
79
  0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
80
80
  overflow: hidden;
81
+ padding: 4px 0;
81
82
  }
82
83
  // dropdown的容器
83
84
  .ant-dropdown.ant-dropdown {
@@ -10,9 +10,9 @@ var Search = function Search() {
10
10
  }, /*#__PURE__*/React.createElement("rect", {
11
11
  width: "240",
12
12
  height: "240",
13
- fill: "url(#pattern0)"
13
+ fill: "url(#patternSearch)"
14
14
  }), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("pattern", {
15
- id: "pattern0",
15
+ id: "patternSearch",
16
16
  patternContentUnits: "objectBoundingBox",
17
17
  width: "1",
18
18
  height: "1"
@@ -9,9 +9,9 @@ var SearchSmall = function SearchSmall() {
9
9
  }, /*#__PURE__*/React.createElement("rect", {
10
10
  width: "40",
11
11
  height: "40",
12
- fill: "url(#pattern0)"
12
+ fill: "url(#patternSmall)"
13
13
  }), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("pattern", {
14
- id: "pattern0",
14
+ id: "patternSmall",
15
15
  patternContentUnits: "objectBoundingBox",
16
16
  width: "1",
17
17
  height: "1"
@@ -4,8 +4,8 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
4
4
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
5
5
  import classnames from 'classnames';
6
6
  import React from 'react';
7
- import Button from "../../Button";
8
7
  import Checkbox from "../../Checkbox";
8
+ import TextLink from "../../TextLink/index";
9
9
  import { getAccount, getId, getPhoto } from "../utils";
10
10
  import { isUserGroup } from "../utils/getUsersWithUserId";
11
11
  import NickLabel from "./NickLabel";
@@ -36,8 +36,7 @@ export default function MultipleList(params) {
36
36
  name: user.name,
37
37
  photo: getPhoto(user),
38
38
  account: getAccount(user)
39
- })), isUserGroup(user) && hasNextLevel && /*#__PURE__*/React.createElement(Button, {
40
- type: "link",
39
+ })), isUserGroup(user) && hasNextLevel && /*#__PURE__*/React.createElement(TextLink, {
41
40
  className: "ald-member-picker-btn",
42
41
  onClick: function onClick(e) {
43
42
  onNextLevel === null || onNextLevel === void 0 ? void 0 : onNextLevel(user);
@@ -6,6 +6,7 @@
6
6
  @import '../../Empty/style/index.less';
7
7
  @import '../../message/style/index.less';
8
8
  @import '../../Spin/style/index.less';
9
+ @import '../../TextLink/style/index.less';
9
10
 
10
11
  @btnWidth: 30px;
11
12
 
@@ -308,8 +309,11 @@
308
309
  align-items: center;
309
310
  }
310
311
 
311
- .ald-select-popup.ald-member-picker-popup.ald-member-picker-popup {
312
+ .ald-select-popup.ald-member-picker-popup.ald-member-picker-popup.ald-member-picker-popup {
312
313
  border: none;
313
314
  background-color: transparent;
314
315
  overflow: hidden;
316
+ padding: 0;
317
+ box-shadow: none;
318
+ border-radius: 0;
315
319
  }
@@ -8,6 +8,7 @@ interface Props extends ScrollAreaProps {
8
8
  onViewportScroll?: (event: React.UIEvent<HTMLDivElement>) => void;
9
9
  innerClassName?: string;
10
10
  scrollBarHidden?: Array<'horizontal' | 'vertical'>;
11
+ contentDeterminesWidth?: boolean;
11
12
  }
12
13
  declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>>;
13
14
  export default _default;
@@ -1,4 +1,4 @@
1
- var _excluded = ["children", "className", "innerClassName", "horizontalScrollBarClassName", "verticalScrollBarClassName", "onViewportScroll", "scrollBarHidden"];
1
+ var _excluded = ["children", "className", "innerClassName", "horizontalScrollBarClassName", "verticalScrollBarClassName", "onViewportScroll", "contentDeterminesWidth", "scrollBarHidden"];
2
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
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
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; }
@@ -12,6 +12,7 @@ var ScrollArea = function ScrollArea(props, ref) {
12
12
  horizontalScrollBarClassName = props.horizontalScrollBarClassName,
13
13
  verticalScrollBarClassName = props.verticalScrollBarClassName,
14
14
  onViewportScroll = props.onViewportScroll,
15
+ contentDeterminesWidth = props.contentDeterminesWidth,
15
16
  scrollBarHidden = props.scrollBarHidden,
16
17
  rest = _objectWithoutProperties(props, _excluded);
17
18
  var isHorizontalScrollBarHidden = scrollBarHidden === null || scrollBarHidden === void 0 ? void 0 : scrollBarHidden.includes('horizontal');
@@ -20,7 +21,9 @@ var ScrollArea = function ScrollArea(props, ref) {
20
21
  scrollHideDelay: 50,
21
22
  className: classNames('ald-scroll-area', className)
22
23
  }), /*#__PURE__*/React.createElement(ScrollAreaComponent.Viewport, {
23
- className: classNames('ald-scroll-area-inner', innerClassName),
24
+ className: classNames('ald-scroll-area-inner', {
25
+ 'ald-scroll-area-width-auto': !contentDeterminesWidth
26
+ }, innerClassName),
24
27
  onScroll: function onScroll(event) {
25
28
  onViewportScroll === null || onViewportScroll === void 0 ? void 0 : onViewportScroll(event);
26
29
  },
@@ -46,4 +46,9 @@
46
46
  height: 100%;
47
47
  box-sizing: border-box;
48
48
  position: relative;
49
+
50
+ &.ald-scroll-area-width-auto > div {
51
+ // 覆盖内联的display:table;
52
+ display: block !important;
53
+ }
49
54
  }
@@ -23,6 +23,7 @@ import { FormItemInputContext } from 'antd/lib/form/context';
23
23
  import useStyle from 'antd/lib/select/style';
24
24
  import { useCompactItemContext } from 'antd/lib/space/Compact';
25
25
  import classNames from 'classnames';
26
+ import _ from 'lodash';
26
27
  import List from 'rc-virtual-list';
27
28
  import React, { forwardRef, useContext, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
28
29
  import { ConfigContext } from "../ConfigProvider";
@@ -370,7 +371,7 @@ var Select = /*#__PURE__*/forwardRef(function (props, ref) {
370
371
  setIsOpen(!isOpen);
371
372
  }
372
373
  },
373
- 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), _classNames), compactItemClassnames, hashId),
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),
374
375
  spellCheck: false,
375
376
  style: Object.assign(styleVar, style)
376
377
  }, !!prefix && /*#__PURE__*/React.createElement("span", {
@@ -404,6 +405,7 @@ var Select = /*#__PURE__*/forwardRef(function (props, ref) {
404
405
  className: "ald-select-suffix-icon"
405
406
  }),
406
407
  onDropdownVisibleChange: function onDropdownVisibleChange(open) {
408
+ console.log(open, 'open');
407
409
  setIsOpen(open);
408
410
  if (!open) {
409
411
  dropDownTimeRef.current = Date.now();
@@ -47,6 +47,9 @@
47
47
  align-items: center;
48
48
  transition: none;
49
49
  padding-right: 0;
50
+ padding-top: 0;
51
+ padding-bottom: 0;
52
+ position: relative;
50
53
 
51
54
  .ant-select-selection-search {
52
55
  display: flex;
@@ -59,14 +62,20 @@
59
62
  // 多选中存在这个样式
60
63
  .ant-select-selection-overflow {
61
64
  align-self: normal;
65
+ flex-wrap: nowrap;
66
+ margin-left: 6px;
67
+ min-width: 52px;
62
68
 
63
69
  .ant-select-selection-overflow-item {
64
70
  align-items: center;
65
71
  line-height: inherit;
66
- height: 100%;
72
+ flex: 1;
73
+ min-width: 0;
74
+ // height: 100%;
67
75
 
68
76
  & > span {
69
77
  display: inline-flex;
78
+ min-width: 0;
70
79
  }
71
80
 
72
81
  .ant-select-selection-item {
@@ -89,6 +98,8 @@
89
98
  }
90
99
 
91
100
  &.ant-select-selection-overflow-item-rest {
101
+ flex: none;
102
+
92
103
  .ant-select-selection-item {
93
104
  border: none;
94
105
  background: none;
@@ -111,10 +122,16 @@
111
122
  }
112
123
  }
113
124
 
125
+ &.ant-select-selection-overflow-item-suffix {
126
+ flex: none;
127
+ }
128
+
114
129
  .ald-select-multiple-tag-default {
115
130
  color: inherit;
116
- display: inline-flex;
117
- align-items: center;
131
+ min-width: 0;
132
+ white-space: nowrap;
133
+ text-overflow: ellipsis;
134
+ overflow: hidden;
118
135
  }
119
136
 
120
137
  .ant-select-selection-search-input {
@@ -123,12 +140,6 @@
123
140
  caret-color: var(--alias-colors-text-selected, #126fdd);
124
141
  }
125
142
  }
126
-
127
- .ant-select-selection-overflow-item:first-of-type {
128
- .ald-select-multiple-tag-default::before {
129
- content: '';
130
- }
131
- }
132
143
  }
133
144
 
134
145
  .ant-select-selection-placeholder {
@@ -12,17 +12,20 @@
12
12
  }
13
13
 
14
14
  .ant-select-arrow {
15
- position: initial;
16
- margin: 0;
15
+ top: 0;
16
+ bottom: 0;
17
+ margin: auto;
17
18
  }
18
19
 
19
20
  .ant-select-clear {
21
+ position: absolute;
22
+ top: 0;
23
+ bottom: 0;
24
+ margin: auto;
20
25
  transform: none;
21
26
  opacity: 1;
22
27
  align-items: center;
23
28
  flex: none;
24
- position: relative;
25
- margin-left: 8px;
26
29
  right: 0;
27
30
 
28
31
  &::before {
@@ -30,7 +33,6 @@
30
33
  top: 0;
31
34
  bottom: 0;
32
35
  margin: auto 0;
33
- left: -8px;
34
36
  content: '';
35
37
  height: 14px;
36
38
  width: 1px;
@@ -26,14 +26,13 @@
26
26
  }
27
27
 
28
28
  .ant-select {
29
- padding-right: @select-padding-horizontal-small;
30
-
31
29
  .ant-select-selector {
32
30
  height: @selector-height-small;
33
31
  line-height: @selector-height-small;
34
32
  padding-left: calc(
35
33
  @select-padding-horizontal-small + var(--ald-select-prefix-width)
36
34
  );
35
+ padding-right: @select-padding-horizontal-small;
37
36
 
38
37
  .ant-select-selection-item {
39
38
  line-height: inherit;
@@ -59,15 +58,89 @@
59
58
  );
60
59
  }
61
60
  }
61
+
62
+ &.ant-select-show-arrow:not(.ant-select-allow-clear) {
63
+ .ant-select-selector {
64
+ padding-right: calc(
65
+ @select-padding-horizontal-small + @select-icon-use-width-small
66
+ );
67
+ }
68
+ }
69
+
70
+ .ant-select-arrow {
71
+ right: @select-padding-horizontal-small;
72
+ }
73
+
74
+ .ant-select-clear {
75
+ right: @select-padding-horizontal-small;
76
+
77
+ &::before {
78
+ left: -@selector-gap-small;
79
+ }
80
+ }
62
81
  }
63
82
 
64
83
  .ald-select-prefix-select {
84
+ // 单选值容器
65
85
  .ant-select-selection-item {
66
- margin-left: @selector-item-margin-left-small;
86
+ margin-left: @selector-gap-small;
87
+ }
88
+ // 多选值容器
89
+ .ant-select-selection-overflow {
90
+ margin-left: @selector-gap-small;
67
91
  }
68
92
 
69
93
  .ant-select-selection-placeholder {
70
- margin-left: @selector-item-margin-left-small;
94
+ margin-left: @selector-gap-small;
95
+ }
96
+ }
97
+
98
+ &.ald-select-has-value {
99
+ .ant-select {
100
+ &.ant-select-allow-clear:not(.ant-select-show-arrow),
101
+ &.ant-select-show-arrow:not(.ant-select-allow-clear) {
102
+ .ant-select-selector {
103
+ padding-right: calc(
104
+ @select-padding-horizontal-small + @select-icon-use-width-small
105
+ );
106
+ }
107
+
108
+ .ant-select-arrow {
109
+ right: @select-padding-horizontal-small;
110
+ }
111
+
112
+ .ant-select-clear {
113
+ right: @select-padding-horizontal-small;
114
+
115
+ &::before {
116
+ left: -@selector-gap-small;
117
+ }
118
+ }
119
+ }
120
+
121
+ &.ant-select-show-arrow.ant-select-allow-clear {
122
+ .ant-select-selector {
123
+ padding-right: calc(
124
+ @select-padding-horizontal-small + @selector-gap-small +
125
+ @select-icon-use-width-small + @select-icon-use-width-small
126
+ );
127
+ }
128
+
129
+ .ant-select-arrow {
130
+ right: calc(
131
+ @select-padding-horizontal-small + @select-icon-use-width-small +
132
+ @selector-gap-small
133
+ );
134
+ }
135
+
136
+ .ant-select-clear {
137
+ right: @select-padding-horizontal-small;
138
+
139
+ &::before {
140
+ left: -@selector-gap-small;
141
+ }
142
+ }
143
+ }
71
144
  }
72
145
  }
73
146
  }
@@ -83,14 +156,13 @@
83
156
  }
84
157
 
85
158
  .ant-select {
86
- padding-right: @select-padding-horizontal-middle;
87
-
88
159
  .ant-select-selector {
89
160
  height: @selector-height-middle;
90
161
  line-height: @selector-height-middle;
91
162
  padding-left: calc(
92
163
  @select-padding-horizontal-middle + var(--ald-select-prefix-width)
93
164
  );
165
+ padding-right: @select-padding-horizontal-middle;
94
166
 
95
167
  .ant-select-selection-item {
96
168
  font-size: @select-font-size-middle;
@@ -116,15 +188,89 @@
116
188
  );
117
189
  }
118
190
  }
191
+
192
+ &.ant-select-show-arrow:not(.ant-select-allow-clear) {
193
+ .ant-select-selector {
194
+ padding-right: calc(
195
+ @select-padding-horizontal-middle + @select-icon-use-width-middle
196
+ );
197
+ }
198
+ }
199
+
200
+ .ant-select-arrow {
201
+ right: @select-padding-horizontal-middle;
202
+ }
203
+
204
+ .ant-select-clear {
205
+ right: @select-padding-horizontal-middle;
206
+
207
+ &::before {
208
+ left: -@selector-gap-middle;
209
+ }
210
+ }
119
211
  }
120
212
 
121
213
  .ald-select-prefix-select {
214
+ // 单选值容器
122
215
  .ant-select-selection-item {
123
- margin-left: @selector-item-margin-left-middle;
216
+ margin-left: @selector-gap-middle;
217
+ }
218
+ // 多选值容器
219
+ .ant-select-selection-overflow {
220
+ margin-left: @selector-gap-middle;
124
221
  }
125
222
 
126
223
  .ant-select-selection-placeholder {
127
- margin-left: @selector-item-margin-left-middle;
224
+ margin-left: @selector-gap-middle;
225
+ }
226
+ }
227
+
228
+ &.ald-select-has-value {
229
+ .ant-select {
230
+ &.ant-select-allow-clear:not(.ant-select-show-arrow),
231
+ &.ant-select-show-arrow:not(.ant-select-allow-clear) {
232
+ .ant-select-selector {
233
+ padding-right: calc(
234
+ @select-padding-horizontal-middle + @select-icon-use-width-middle
235
+ );
236
+ }
237
+
238
+ .ant-select-arrow {
239
+ right: @select-padding-horizontal-middle;
240
+ }
241
+
242
+ .ant-select-clear {
243
+ right: @select-padding-horizontal-middle;
244
+
245
+ &::before {
246
+ left: -@selector-gap-middle;
247
+ }
248
+ }
249
+ }
250
+
251
+ &.ant-select-show-arrow.ant-select-allow-clear {
252
+ .ant-select-selector {
253
+ padding-right: calc(
254
+ @select-padding-horizontal-middle + @selector-gap-middle +
255
+ @select-icon-use-width-middle + @select-icon-use-width-middle
256
+ );
257
+ }
258
+
259
+ .ant-select-arrow {
260
+ right: calc(
261
+ @select-padding-horizontal-middle + @select-icon-use-width-middle +
262
+ @selector-gap-middle
263
+ );
264
+ }
265
+
266
+ .ant-select-clear {
267
+ right: @select-padding-horizontal-middle;
268
+
269
+ &::before {
270
+ left: -@selector-gap-middle;
271
+ }
272
+ }
273
+ }
128
274
  }
129
275
  }
130
276
  }
@@ -140,14 +286,13 @@
140
286
  }
141
287
 
142
288
  .ant-select {
143
- padding-right: @select-padding-horizontal-large;
144
-
145
289
  .ant-select-selector {
146
290
  height: @selector-height-large;
147
291
  line-height: @selector-height-large;
148
292
  padding-left: calc(
149
293
  @select-padding-horizontal-large + var(--ald-select-prefix-width)
150
294
  );
295
+ padding-right: @select-padding-horizontal-large;
151
296
 
152
297
  .ant-select-selection-item {
153
298
  font-size: @select-font-size-large;
@@ -172,6 +317,90 @@
172
317
  @select-padding-horizontal-large + var(--ald-select-prefix-width)
173
318
  );
174
319
  }
320
+
321
+ &.ant-select-show-arrow:not(.ant-select-allow-clear) {
322
+ .ant-select-selector {
323
+ padding-right: calc(
324
+ @select-padding-horizontal-large + @select-icon-use-width-large
325
+ );
326
+ }
327
+ }
328
+
329
+ .ant-select-arrow {
330
+ right: @select-padding-horizontal-large;
331
+ }
332
+
333
+ .ant-select-clear {
334
+ right: @select-padding-horizontal-large;
335
+
336
+ &::before {
337
+ left: -@selector-gap-large;
338
+ }
339
+ }
340
+ }
341
+ }
342
+
343
+ .ald-select-prefix-select {
344
+ // 单选值容器
345
+ .ant-select-selection-item {
346
+ margin-left: @selector-gap-large;
347
+ }
348
+ // 多选值容器
349
+ .ant-select-selection-overflow {
350
+ margin-left: @selector-gap-large;
351
+ }
352
+
353
+ .ant-select-selection-placeholder {
354
+ margin-left: @selector-gap-large;
355
+ }
356
+ }
357
+
358
+ &.ald-select-has-value {
359
+ .ant-select {
360
+ &.ant-select-allow-clear:not(.ant-select-show-arrow),
361
+ &.ant-select-show-arrow:not(.ant-select-allow-clear) {
362
+ .ant-select-selector {
363
+ padding-right: calc(
364
+ @select-padding-horizontal-large + @select-icon-use-width-large
365
+ );
366
+ }
367
+
368
+ .ant-select-arrow {
369
+ right: @select-padding-horizontal-large;
370
+ }
371
+
372
+ .ant-select-clear {
373
+ right: @select-padding-horizontal-large;
374
+
375
+ &::before {
376
+ left: -@selector-gap-large;
377
+ }
378
+ }
379
+ }
380
+
381
+ &.ant-select-show-arrow.ant-select-allow-clear {
382
+ .ant-select-selector {
383
+ padding-right: calc(
384
+ @select-padding-horizontal-large + @selector-gap-large +
385
+ @select-icon-use-width-large + @select-icon-use-width-large
386
+ );
387
+ }
388
+
389
+ .ant-select-arrow {
390
+ right: calc(
391
+ @select-padding-horizontal-large + @select-icon-use-width-large +
392
+ @selector-gap-large
393
+ );
394
+ }
395
+
396
+ .ant-select-clear {
397
+ right: @select-padding-horizontal-large;
398
+
399
+ &::before {
400
+ left: -@selector-gap-large;
401
+ }
402
+ }
403
+ }
175
404
  }
176
405
  }
177
406
  }
@@ -187,16 +416,6 @@
187
416
  margin-top: 0;
188
417
  }
189
418
 
190
- .ald-select-prefix-select {
191
- .ant-select-selection-item {
192
- margin-left: @selector-item-margin-left-large;
193
- }
194
-
195
- .ant-select-selection-placeholder {
196
- margin-left: @selector-item-margin-left-large;
197
- }
198
- }
199
-
200
419
  &.ald-select-primary {
201
420
  font-weight: 500;
202
421
  }
@@ -7,7 +7,8 @@
7
7
  @select-line-height-large: 24px;
8
8
  @select-padding-horizontal-large: var(--alias-padding-150-minus-1, 12px);
9
9
  @selector-height-large: 34px;
10
- @selector-item-margin-left-large: 8px;
10
+ @selector-gap-large: 8px;
11
+ @select-icon-use-width-large: 24px; //16+8
11
12
 
12
13
  // medium size
13
14
  @select-height-middle: 32px;
@@ -16,7 +17,8 @@
16
17
  @select-line-height-middle: 20px;
17
18
  @select-padding-horizontal-middle: var(--alias-padding-150-minus-1, 12px);
18
19
  @selector-height-middle: 30px;
19
- @selector-item-margin-left-middle: 6px;
20
+ @selector-gap-middle: 6px;
21
+ @select-icon-use-width-middle: 22px; //16+6
20
22
 
21
23
  // small size
22
24
  @select-height-small: 28px;
@@ -25,4 +27,5 @@
25
27
  @select-line-height-small: 16px;
26
28
  @select-padding-horizontal-small: var(--alias-padding-150-minus-1, 12px);
27
29
  @selector-height-small: 26px;
28
- @selector-item-margin-left-small: 4px;
30
+ @selector-gap-small: 4px;
31
+ @select-icon-use-width-small: 20px; //16+4
@@ -7,7 +7,8 @@ import React from 'react';
7
7
  function TextLink(props) {
8
8
  var _classNames;
9
9
  var propsSize = props.size,
10
- type = props.type,
10
+ _props$type = props.type,
11
+ type = _props$type === void 0 ? 'primary' : _props$type,
11
12
  underline = props.underline,
12
13
  disabled = props.disabled,
13
14
  _props$icon = props.icon,
@@ -19,9 +19,6 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
19
19
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
20
  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; }
21
21
  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; }
22
- import FileOutlined from '@ant-design/icons/FileOutlined';
23
- import FolderOpenOutlined from '@ant-design/icons/FolderOpenOutlined';
24
- import FolderOutlined from '@ant-design/icons/FolderOutlined';
25
22
  import classNames from 'classnames';
26
23
  import { conductExpandParent } from 'rc-tree/lib/util';
27
24
  import { convertDataToEntities, convertTreeToData } from 'rc-tree/lib/utils/treeUtil';
@@ -29,14 +26,6 @@ import * as React from 'react';
29
26
  import { ConfigContext } from "../ConfigProvider";
30
27
  import Tree from "./Tree";
31
28
  import { calcRangeKeys, convertDirectoryKeysToNodes } from "./utils/dictUtil";
32
- function getIcon(props) {
33
- var isLeaf = props.isLeaf,
34
- expanded = props.expanded;
35
- if (isLeaf) {
36
- return /*#__PURE__*/React.createElement(FileOutlined, null);
37
- }
38
- return expanded ? /*#__PURE__*/React.createElement(FolderOpenOutlined, null) : /*#__PURE__*/React.createElement(FolderOutlined, null);
39
- }
40
29
  function getTreeData(_ref) {
41
30
  var treeData = _ref.treeData,
42
31
  children = _ref.children;
@@ -154,7 +143,6 @@ var DirectoryTree = function DirectoryTree(_ref2, ref) {
154
143
  var prefixCls = getPrefixCls('tree', customizePrefixCls);
155
144
  var connectClassName = classNames("".concat(prefixCls, "-directory"), _defineProperty({}, "".concat(prefixCls, "-directory-rtl"), direction === 'rtl'), className);
156
145
  return /*#__PURE__*/React.createElement(Tree, _extends({
157
- icon: getIcon,
158
146
  ref: ref,
159
147
  blockNode: true
160
148
  }, otherProps, {
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const App: React.FC;
3
+ export default App;