acud 0.0.74 → 0.0.75

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.
@@ -122,7 +122,6 @@ function PickerPanel(props) {
122
122
  var now = generateConfig.getNow();
123
123
  if (!date) return now; // When value is null and set showTime
124
124
 
125
- // When value is null and set showTime
126
125
  if (!mergedValue && showTime) {
127
126
  if (_typeof(showTime) === 'object') {
128
127
  return setDateTime(generateConfig, date, showTime.defaultValue || now);
@@ -172,7 +172,6 @@ function InnerRangePicker(props) {
172
172
  } // Fill disabled unit
173
173
 
174
174
 
175
- // Fill disabled unit
176
175
  for (var i = 0; i < 2; i += 1) {
177
176
  if (mergedDisabled[i] && !getValue(postValues, i) && !getValue(allowEmpty, i)) {
178
177
  postValues = updateValues(postValues, generateConfig.getNow(), i);
@@ -1,5 +1,5 @@
1
- declare const _default: () => (callback: () => void) => void;
2
1
  /**
3
2
  * Always trigger latest once when call multiple time
4
3
  */
4
+ declare const _default: () => (callback: () => void) => void;
5
5
  export default _default;
@@ -19,35 +19,35 @@
19
19
  max-width: calc(100vw - 32px);
20
20
 
21
21
  &-sm {
22
- .modal-size-config(sm, false);
22
+ .modal-size-config(sm);
23
23
  }
24
24
 
25
25
  &-sm > &-content {
26
- .modal-size-config(sm, true);
26
+ .modal-size-config-content(sm);
27
27
  }
28
28
 
29
29
  &-md {
30
- .modal-size-config(md, false);
30
+ .modal-size-config(md);
31
31
  }
32
32
 
33
33
  &-md > &-content {
34
- .modal-size-config(md, true);
34
+ .modal-size-config-content(md);
35
35
  }
36
36
 
37
37
  &-lg {
38
- .modal-size-config(lg, false);
38
+ .modal-size-config(lg);
39
39
  }
40
40
 
41
41
  &-lg > &-content {
42
- .modal-size-config(lg, true);
42
+ .modal-size-config-content(lg);
43
43
  }
44
44
 
45
45
  &-xl {
46
- .modal-size-config(xl, false);
46
+ .modal-size-config(xl);
47
47
  }
48
48
 
49
49
  &-xl > &-content {
50
- .modal-size-config(xl, true);
50
+ .modal-size-config-content(xl);
51
51
  }
52
52
 
53
53
  // 弹框内容
@@ -37,11 +37,20 @@
37
37
  }
38
38
  }
39
39
 
40
- .modal-size-config(@type, @content) {
41
- @width: ~'modal-width-@{type}';
40
+ .modal-size(@type) {
42
41
  @min-height: ~'modal-height-@{type}';
43
42
  @max-height: ~'modal-max-height-@{type}';
44
- width: if(@content, 100%, @@width);
45
43
  min-height: @@min-height;
46
44
  max-height: @@max-height;
47
45
  }
46
+
47
+ .modal-size-config-content(@type) {
48
+ width: 100%;
49
+ .modal-size(@type);
50
+ }
51
+
52
+ .modal-size-config(@type) {
53
+ @width: ~'modal-width-@{type}';
54
+ width: @@width;
55
+ .modal-size(@type);
56
+ }
@@ -15,10 +15,11 @@ export interface OptionListProps<OptionsType extends object[]> {
15
15
  notFoundContent?: React.ReactNode;
16
16
  mode?: string;
17
17
  menuItemSelectedIcon?: RenderNode;
18
- childrenAsData: boolean;
19
- searchValue: string;
20
- virtual: boolean;
21
- defaultExpandGroupKey: string[] | string | number[] | number | boolean;
18
+ childrenAsData?: boolean;
19
+ searchValue?: string;
20
+ virtual?: boolean;
21
+ keepExpand?: boolean;
22
+ defaultExpandGroupKey?: string[] | string | number[] | number | boolean;
22
23
  renderEmpty?: (componentName?: string, des?: string | undefined) => React.ReactNode;
23
24
  onSelect: (value: RawValueType, option: {
24
25
  selected: boolean;
@@ -61,6 +61,8 @@ var OptionList = function OptionList(_ref, ref) {
61
61
  mode = _ref.mode,
62
62
  open = _ref.open,
63
63
  virtual = _ref.virtual,
64
+ _ref$keepExpand = _ref.keepExpand,
65
+ keepExpand = _ref$keepExpand === void 0 ? false : _ref$keepExpand,
64
66
  _ref$defaultExpandGro = _ref.defaultExpandGroupKey,
65
67
  defaultExpandGroupKey = _ref$defaultExpandGro === void 0 ? false : _ref$defaultExpandGro,
66
68
  renderEmpty = _ref.renderEmpty,
@@ -399,6 +401,8 @@ var OptionList = function OptionList(_ref, ref) {
399
401
  e.stopPropagation();
400
402
  };
401
403
 
404
+ var isKeepExpand = !multiple && keepExpand;
405
+
402
406
  var renderOption = function renderOption(data, values, groupOption, label, itemIndex, groupKey) {
403
407
  var _classNames;
404
408
 
@@ -416,7 +420,7 @@ var OptionList = function OptionList(_ref, ref) {
416
420
 
417
421
  var selected = values.has(value);
418
422
  var optionPrefixCls = "".concat(itemPrefixCls, "-option");
419
- var optionClassName = classNames(itemPrefixCls, optionPrefixCls, className, (_classNames = {}, _defineProperty(_classNames, "".concat(optionPrefixCls, "-grouped"), groupOption), _defineProperty(_classNames, "".concat(optionPrefixCls, "-active"), activeIndex === itemIndex && !disabled), _defineProperty(_classNames, "".concat(optionPrefixCls, "-disabled"), disabled), _defineProperty(_classNames, "".concat(optionPrefixCls, "-selected"), selected), _classNames));
423
+ var optionClassName = classNames(itemPrefixCls, optionPrefixCls, className, (_classNames = {}, _defineProperty(_classNames, "".concat(optionPrefixCls, "-grouped"), groupOption), _defineProperty(_classNames, "".concat(optionPrefixCls, "-grouped-keep-expand"), isKeepExpand), _defineProperty(_classNames, "".concat(optionPrefixCls, "-active"), activeIndex === itemIndex && !disabled), _defineProperty(_classNames, "".concat(optionPrefixCls, "-disabled"), disabled), _defineProperty(_classNames, "".concat(optionPrefixCls, "-selected"), selected), _classNames));
420
424
  var mergedLabel = childrenAsData ? children : label; // const iconVisible = !menuItemSelectedIcon || typeof menuItemSelectedIcon === 'function' || selected;
421
425
 
422
426
  var content = mergedLabel || value;
@@ -444,7 +448,7 @@ var OptionList = function OptionList(_ref, ref) {
444
448
  }
445
449
  },
446
450
  style: _extends({
447
- display: groupOption && !expandGroupKey.includes(groupKey) ? 'none' : ''
451
+ display: groupOption && !expandGroupKey.includes(groupKey) && !isKeepExpand ? 'none' : ''
448
452
  }, style)
449
453
  }), multiple && /*#__PURE__*/React.createElement(Checkbox, {
450
454
  checked: selected,
@@ -501,8 +505,12 @@ var OptionList = function OptionList(_ref, ref) {
501
505
 
502
506
  if (group) {
503
507
  return /*#__PURE__*/React.createElement("div", {
504
- className: classNames(itemPrefixCls, "".concat(itemPrefixCls, "-group")),
508
+ className: classNames(itemPrefixCls, "".concat(itemPrefixCls, "-group"), _defineProperty({}, "".concat(itemPrefixCls, "-group-keep-expand"), isKeepExpand)),
505
509
  onClick: function onClick() {
510
+ if (isKeepExpand) {
511
+ return;
512
+ }
513
+
506
514
  var gIndex = expandGroupKey.indexOf(key);
507
515
 
508
516
  var newGroupKey = _toConsumableArray(expandGroupKey);
@@ -510,7 +518,7 @@ var OptionList = function OptionList(_ref, ref) {
510
518
  gIndex !== -1 ? newGroupKey.splice(gIndex, 1) : newGroupKey.push(key);
511
519
  setExpandGroupKey(newGroupKey);
512
520
  }
513
- }, /*#__PURE__*/React.createElement("span", {
521
+ }, !isKeepExpand && /*#__PURE__*/React.createElement("span", {
514
522
  className: "".concat(itemPrefixCls, "-group-arrow")
515
523
  }, expandGroupKey.includes(key) ? /*#__PURE__*/React.createElement(OutlinedDown, null) : /*#__PURE__*/React.createElement(OutlinedRight, null)), multiple && /*#__PURE__*/React.createElement(Checkbox, {
516
524
  className: "".concat(itemPrefixCls, "-group-checkbox"),
@@ -81,6 +81,7 @@ export interface SelectProps<OptionsType extends object[], ValueType> extends Re
81
81
  showAction?: ('focus' | 'click')[];
82
82
  tabIndex?: number;
83
83
  renderEmpty?: (componentName?: string, des?: string | undefined) => React.ReactNode;
84
+ keepExpand?: boolean;
84
85
  defaultExpandGroupKey?: string[] | string | number[] | number | boolean;
85
86
  onKeyUp?: React.KeyboardEventHandler<HTMLDivElement>;
86
87
  onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
@@ -119,6 +119,7 @@ export default function generateSelector(config) {
119
119
  tokenSeparators = props.tokenSeparators,
120
120
  tagRender = props.tagRender,
121
121
  renderEmpty = props.renderEmpty,
122
+ keepExpand = props.keepExpand,
122
123
  defaultExpandGroupKey = props.defaultExpandGroupKey,
123
124
  onPopupScroll = props.onPopupScroll,
124
125
  onDropdownVisibleChange = props.onDropdownVisibleChange,
@@ -133,7 +134,7 @@ export default function generateSelector(config) {
133
134
  onClear = props.onClear,
134
135
  _props$internalProps = props.internalProps,
135
136
  internalProps = _props$internalProps === void 0 ? {} : _props$internalProps,
136
- restProps = __rest(props, ["prefixCls", "className", "id", "open", "defaultOpen", "options", "children", "mode", "value", "defaultValue", "labelInValue", "showSearch", "inputValue", "searchValue", "filterOption", "filterSort", "optionFilterProp", "autoClearSearchValue", "onSearch", "suffixIconPre", "removeIcon", "allowClear", "clearIcon", "showArrow", "menuItemSelectedIcon", "disabled", "loading", "defaultActiveFirstOption", "notFoundContent", "optionLabelProp", "backfill", "tabIndex", "getInputElement", "getPopupContainer", "listHeight", "listItemHeight", "animation", "transitionName", "virtual", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "showAction", "direction", "tokenSeparators", "tagRender", "renderEmpty", "defaultExpandGroupKey", "onPopupScroll", "onDropdownVisibleChange", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown", "onChange", "onSelect", "onDeselect", "onClear", "internalProps"]);
137
+ restProps = __rest(props, ["prefixCls", "className", "id", "open", "defaultOpen", "options", "children", "mode", "value", "defaultValue", "labelInValue", "showSearch", "inputValue", "searchValue", "filterOption", "filterSort", "optionFilterProp", "autoClearSearchValue", "onSearch", "suffixIconPre", "removeIcon", "allowClear", "clearIcon", "showArrow", "menuItemSelectedIcon", "disabled", "loading", "defaultActiveFirstOption", "notFoundContent", "optionLabelProp", "backfill", "tabIndex", "getInputElement", "getPopupContainer", "listHeight", "listItemHeight", "animation", "transitionName", "virtual", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "showAction", "direction", "tokenSeparators", "tagRender", "renderEmpty", "keepExpand", "defaultExpandGroupKey", "onPopupScroll", "onDropdownVisibleChange", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown", "onChange", "onSelect", "onDeselect", "onClear", "internalProps"]);
137
138
 
138
139
  var useInternalProps = internalProps.mark === INTERNAL_PROPS_MARK;
139
140
  var domProps = omitDOMProps ? omitDOMProps(restProps) : restProps;
@@ -782,6 +783,7 @@ export default function generateSelector(config) {
782
783
  defaultActiveFirstOption: mergedDefaultActiveFirstOption,
783
784
  notFoundContent: notFoundContent,
784
785
  renderEmpty: renderEmpty,
786
+ keepExpand: keepExpand,
785
787
  defaultExpandGroupKey: defaultExpandGroupKey,
786
788
  onScroll: onPopupScroll,
787
789
  searchValue: mergedSearchValue,
@@ -674,6 +674,9 @@
674
674
  .acud-select-item-group-checkbox {
675
675
  margin-right: 8px;
676
676
  }
677
+ .acud-select-item-group.acud-select-item-group-keep-expand {
678
+ color: #B8BABF;
679
+ }
677
680
  .acud-select-item-option {
678
681
  display: flex;
679
682
  }
@@ -704,6 +707,9 @@
704
707
  .acud-select-item-option-grouped {
705
708
  padding-left: 48px;
706
709
  }
710
+ .acud-select-item-option-grouped.acud-select-item-option-grouped-keep-expand {
711
+ padding-left: 24px;
712
+ }
707
713
  .acud-select-lg {
708
714
  font-size: 14px;
709
715
  }
@@ -287,6 +287,9 @@
287
287
  &-checkbox {
288
288
  margin-right: 2 * @P;
289
289
  }
290
+ &&-keep-expand {
291
+ color: @G6;
292
+ }
290
293
  }
291
294
 
292
295
  // =========== Option ===========
@@ -328,6 +331,9 @@
328
331
 
329
332
  &-grouped {
330
333
  padding-left: 12 * @P;
334
+ &&-keep-expand {
335
+ padding-left: 6 * @P;
336
+ }
331
337
  }
332
338
  // .basic-config-select-item(@select-dropdown-default-tp, @select-dropdown-default-p);
333
339
  }
@@ -135,7 +135,6 @@ export function RawList(props, ref) {
135
135
  } // Always use virtual scroll bar in avoid shaking
136
136
 
137
137
 
138
- // Always use virtual scroll bar in avoid shaking
139
138
  if (!inVirtual) {
140
139
  return {
141
140
  scrollHeight: ((_a = fillerInnerRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight) || 0,
@@ -157,14 +156,12 @@ export function RawList(props, ref) {
157
156
  var cacheHeight = heights.get(key);
158
157
  var currentItemBottom = itemTop + (cacheHeight === undefined ? itemHeight : cacheHeight); // Check item top in the range
159
158
 
160
- // Check item top in the range
161
159
  if (currentItemBottom >= scrollTop && startIndex === undefined) {
162
160
  startIndex = i;
163
161
  startOffset = itemTop;
164
162
  } // Check item bottom in the range. We will render additional one item for motion usage
165
163
 
166
164
 
167
- // Check item bottom in the range. We will render additional one item for motion usage
168
165
  if (currentItemBottom > scrollTop + height && endIndex === undefined) {
169
166
  endIndex = i;
170
167
  }
@@ -175,9 +172,6 @@ export function RawList(props, ref) {
175
172
  /* istanbul ignore next */
176
173
 
177
174
 
178
- // Fallback to normal if not match. This code should never reach
179
-
180
- /* istanbul ignore next */
181
175
  if (startIndex === undefined) {
182
176
  startIndex = 0;
183
177
  startOffset = 0;
@@ -188,7 +182,6 @@ export function RawList(props, ref) {
188
182
  } // Give cache to improve scroll experience
189
183
 
190
184
 
191
- // Give cache to improve scroll experience
192
185
  endIndex = Math.min(endIndex + 1, mergedData.length);
193
186
  return {
194
187
  scrollHeight: itemTop,
@@ -159,7 +159,6 @@ function PickerPanel(props) {
159
159
  var now = generateConfig.getNow();
160
160
  if (!date) return now; // When value is null and set showTime
161
161
 
162
- // When value is null and set showTime
163
162
  if (!mergedValue && showTime) {
164
163
  if ((0, _typeof2["default"])(showTime) === 'object') {
165
164
  return (0, _timeUtil.setDateTime)(generateConfig, date, showTime.defaultValue || now);
@@ -212,7 +212,6 @@ function InnerRangePicker(props) {
212
212
  } // Fill disabled unit
213
213
 
214
214
 
215
- // Fill disabled unit
216
215
  for (var i = 0; i < 2; i += 1) {
217
216
  if (mergedDisabled[i] && !(0, _miscUtil.getValue)(postValues, i) && !(0, _miscUtil.getValue)(allowEmpty, i)) {
218
217
  postValues = (0, _miscUtil.updateValues)(postValues, generateConfig.getNow(), i);
@@ -1,5 +1,5 @@
1
- declare const _default: () => (callback: () => void) => void;
2
1
  /**
3
2
  * Always trigger latest once when call multiple time
4
3
  */
4
+ declare const _default: () => (callback: () => void) => void;
5
5
  export default _default;
@@ -19,35 +19,35 @@
19
19
  max-width: calc(100vw - 32px);
20
20
 
21
21
  &-sm {
22
- .modal-size-config(sm, false);
22
+ .modal-size-config(sm);
23
23
  }
24
24
 
25
25
  &-sm > &-content {
26
- .modal-size-config(sm, true);
26
+ .modal-size-config-content(sm);
27
27
  }
28
28
 
29
29
  &-md {
30
- .modal-size-config(md, false);
30
+ .modal-size-config(md);
31
31
  }
32
32
 
33
33
  &-md > &-content {
34
- .modal-size-config(md, true);
34
+ .modal-size-config-content(md);
35
35
  }
36
36
 
37
37
  &-lg {
38
- .modal-size-config(lg, false);
38
+ .modal-size-config(lg);
39
39
  }
40
40
 
41
41
  &-lg > &-content {
42
- .modal-size-config(lg, true);
42
+ .modal-size-config-content(lg);
43
43
  }
44
44
 
45
45
  &-xl {
46
- .modal-size-config(xl, false);
46
+ .modal-size-config(xl);
47
47
  }
48
48
 
49
49
  &-xl > &-content {
50
- .modal-size-config(xl, true);
50
+ .modal-size-config-content(xl);
51
51
  }
52
52
 
53
53
  // 弹框内容
@@ -37,11 +37,20 @@
37
37
  }
38
38
  }
39
39
 
40
- .modal-size-config(@type, @content) {
41
- @width: ~'modal-width-@{type}';
40
+ .modal-size(@type) {
42
41
  @min-height: ~'modal-height-@{type}';
43
42
  @max-height: ~'modal-max-height-@{type}';
44
- width: if(@content, 100%, @@width);
45
43
  min-height: @@min-height;
46
44
  max-height: @@max-height;
47
45
  }
46
+
47
+ .modal-size-config-content(@type) {
48
+ width: 100%;
49
+ .modal-size(@type);
50
+ }
51
+
52
+ .modal-size-config(@type) {
53
+ @width: ~'modal-width-@{type}';
54
+ width: @@width;
55
+ .modal-size(@type);
56
+ }
@@ -15,10 +15,11 @@ export interface OptionListProps<OptionsType extends object[]> {
15
15
  notFoundContent?: React.ReactNode;
16
16
  mode?: string;
17
17
  menuItemSelectedIcon?: RenderNode;
18
- childrenAsData: boolean;
19
- searchValue: string;
20
- virtual: boolean;
21
- defaultExpandGroupKey: string[] | string | number[] | number | boolean;
18
+ childrenAsData?: boolean;
19
+ searchValue?: string;
20
+ virtual?: boolean;
21
+ keepExpand?: boolean;
22
+ defaultExpandGroupKey?: string[] | string | number[] | number | boolean;
22
23
  renderEmpty?: (componentName?: string, des?: string | undefined) => React.ReactNode;
23
24
  onSelect: (value: RawValueType, option: {
24
25
  selected: boolean;
@@ -87,6 +87,8 @@ var OptionList = function OptionList(_ref, ref) {
87
87
  mode = _ref.mode,
88
88
  open = _ref.open,
89
89
  virtual = _ref.virtual,
90
+ _ref$keepExpand = _ref.keepExpand,
91
+ keepExpand = _ref$keepExpand === void 0 ? false : _ref$keepExpand,
90
92
  _ref$defaultExpandGro = _ref.defaultExpandGroupKey,
91
93
  defaultExpandGroupKey = _ref$defaultExpandGro === void 0 ? false : _ref$defaultExpandGro,
92
94
  renderEmpty = _ref.renderEmpty,
@@ -425,6 +427,8 @@ var OptionList = function OptionList(_ref, ref) {
425
427
  e.stopPropagation();
426
428
  };
427
429
 
430
+ var isKeepExpand = !multiple && keepExpand;
431
+
428
432
  var renderOption = function renderOption(data, values, groupOption, label, itemIndex, groupKey) {
429
433
  var _classNames;
430
434
 
@@ -442,7 +446,7 @@ var OptionList = function OptionList(_ref, ref) {
442
446
 
443
447
  var selected = values.has(value);
444
448
  var optionPrefixCls = "".concat(itemPrefixCls, "-option");
445
- var optionClassName = (0, _classnames["default"])(itemPrefixCls, optionPrefixCls, className, (_classNames = {}, (0, _defineProperty2["default"])(_classNames, "".concat(optionPrefixCls, "-grouped"), groupOption), (0, _defineProperty2["default"])(_classNames, "".concat(optionPrefixCls, "-active"), activeIndex === itemIndex && !disabled), (0, _defineProperty2["default"])(_classNames, "".concat(optionPrefixCls, "-disabled"), disabled), (0, _defineProperty2["default"])(_classNames, "".concat(optionPrefixCls, "-selected"), selected), _classNames));
449
+ var optionClassName = (0, _classnames["default"])(itemPrefixCls, optionPrefixCls, className, (_classNames = {}, (0, _defineProperty2["default"])(_classNames, "".concat(optionPrefixCls, "-grouped"), groupOption), (0, _defineProperty2["default"])(_classNames, "".concat(optionPrefixCls, "-grouped-keep-expand"), isKeepExpand), (0, _defineProperty2["default"])(_classNames, "".concat(optionPrefixCls, "-active"), activeIndex === itemIndex && !disabled), (0, _defineProperty2["default"])(_classNames, "".concat(optionPrefixCls, "-disabled"), disabled), (0, _defineProperty2["default"])(_classNames, "".concat(optionPrefixCls, "-selected"), selected), _classNames));
446
450
  var mergedLabel = childrenAsData ? children : label; // const iconVisible = !menuItemSelectedIcon || typeof menuItemSelectedIcon === 'function' || selected;
447
451
 
448
452
  var content = mergedLabel || value;
@@ -470,7 +474,7 @@ var OptionList = function OptionList(_ref, ref) {
470
474
  }
471
475
  },
472
476
  style: (0, _extends2["default"])({
473
- display: groupOption && !expandGroupKey.includes(groupKey) ? 'none' : ''
477
+ display: groupOption && !expandGroupKey.includes(groupKey) && !isKeepExpand ? 'none' : ''
474
478
  }, style)
475
479
  }), multiple && /*#__PURE__*/React.createElement(_checkbox["default"], {
476
480
  checked: selected,
@@ -527,14 +531,18 @@ var OptionList = function OptionList(_ref, ref) {
527
531
 
528
532
  if (group) {
529
533
  return /*#__PURE__*/React.createElement("div", {
530
- className: (0, _classnames["default"])(itemPrefixCls, "".concat(itemPrefixCls, "-group")),
534
+ className: (0, _classnames["default"])(itemPrefixCls, "".concat(itemPrefixCls, "-group"), (0, _defineProperty2["default"])({}, "".concat(itemPrefixCls, "-group-keep-expand"), isKeepExpand)),
531
535
  onClick: function onClick() {
536
+ if (isKeepExpand) {
537
+ return;
538
+ }
539
+
532
540
  var gIndex = expandGroupKey.indexOf(key);
533
541
  var newGroupKey = (0, _toConsumableArray2["default"])(expandGroupKey);
534
542
  gIndex !== -1 ? newGroupKey.splice(gIndex, 1) : newGroupKey.push(key);
535
543
  setExpandGroupKey(newGroupKey);
536
544
  }
537
- }, /*#__PURE__*/React.createElement("span", {
545
+ }, !isKeepExpand && /*#__PURE__*/React.createElement("span", {
538
546
  className: "".concat(itemPrefixCls, "-group-arrow")
539
547
  }, expandGroupKey.includes(key) ? /*#__PURE__*/React.createElement(_acudIcon.OutlinedDown, null) : /*#__PURE__*/React.createElement(_acudIcon.OutlinedRight, null)), multiple && /*#__PURE__*/React.createElement(_checkbox["default"], {
540
548
  className: "".concat(itemPrefixCls, "-group-checkbox"),
@@ -81,6 +81,7 @@ export interface SelectProps<OptionsType extends object[], ValueType> extends Re
81
81
  showAction?: ('focus' | 'click')[];
82
82
  tabIndex?: number;
83
83
  renderEmpty?: (componentName?: string, des?: string | undefined) => React.ReactNode;
84
+ keepExpand?: boolean;
84
85
  defaultExpandGroupKey?: string[] | string | number[] | number | boolean;
85
86
  onKeyUp?: React.KeyboardEventHandler<HTMLDivElement>;
86
87
  onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
@@ -153,6 +153,7 @@ function generateSelector(config) {
153
153
  tokenSeparators = props.tokenSeparators,
154
154
  tagRender = props.tagRender,
155
155
  renderEmpty = props.renderEmpty,
156
+ keepExpand = props.keepExpand,
156
157
  defaultExpandGroupKey = props.defaultExpandGroupKey,
157
158
  onPopupScroll = props.onPopupScroll,
158
159
  onDropdownVisibleChange = props.onDropdownVisibleChange,
@@ -167,7 +168,7 @@ function generateSelector(config) {
167
168
  onClear = props.onClear,
168
169
  _props$internalProps = props.internalProps,
169
170
  internalProps = _props$internalProps === void 0 ? {} : _props$internalProps,
170
- restProps = __rest(props, ["prefixCls", "className", "id", "open", "defaultOpen", "options", "children", "mode", "value", "defaultValue", "labelInValue", "showSearch", "inputValue", "searchValue", "filterOption", "filterSort", "optionFilterProp", "autoClearSearchValue", "onSearch", "suffixIconPre", "removeIcon", "allowClear", "clearIcon", "showArrow", "menuItemSelectedIcon", "disabled", "loading", "defaultActiveFirstOption", "notFoundContent", "optionLabelProp", "backfill", "tabIndex", "getInputElement", "getPopupContainer", "listHeight", "listItemHeight", "animation", "transitionName", "virtual", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "showAction", "direction", "tokenSeparators", "tagRender", "renderEmpty", "defaultExpandGroupKey", "onPopupScroll", "onDropdownVisibleChange", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown", "onChange", "onSelect", "onDeselect", "onClear", "internalProps"]);
171
+ restProps = __rest(props, ["prefixCls", "className", "id", "open", "defaultOpen", "options", "children", "mode", "value", "defaultValue", "labelInValue", "showSearch", "inputValue", "searchValue", "filterOption", "filterSort", "optionFilterProp", "autoClearSearchValue", "onSearch", "suffixIconPre", "removeIcon", "allowClear", "clearIcon", "showArrow", "menuItemSelectedIcon", "disabled", "loading", "defaultActiveFirstOption", "notFoundContent", "optionLabelProp", "backfill", "tabIndex", "getInputElement", "getPopupContainer", "listHeight", "listItemHeight", "animation", "transitionName", "virtual", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "showAction", "direction", "tokenSeparators", "tagRender", "renderEmpty", "keepExpand", "defaultExpandGroupKey", "onPopupScroll", "onDropdownVisibleChange", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown", "onChange", "onSelect", "onDeselect", "onClear", "internalProps"]);
171
172
 
172
173
  var useInternalProps = internalProps.mark === _generator.INTERNAL_PROPS_MARK;
173
174
  var domProps = omitDOMProps ? omitDOMProps(restProps) : restProps;
@@ -815,6 +816,7 @@ function generateSelector(config) {
815
816
  defaultActiveFirstOption: mergedDefaultActiveFirstOption,
816
817
  notFoundContent: notFoundContent,
817
818
  renderEmpty: renderEmpty,
819
+ keepExpand: keepExpand,
818
820
  defaultExpandGroupKey: defaultExpandGroupKey,
819
821
  onScroll: onPopupScroll,
820
822
  searchValue: mergedSearchValue,
@@ -674,6 +674,9 @@
674
674
  .acud-select-item-group-checkbox {
675
675
  margin-right: 8px;
676
676
  }
677
+ .acud-select-item-group.acud-select-item-group-keep-expand {
678
+ color: #B8BABF;
679
+ }
677
680
  .acud-select-item-option {
678
681
  display: flex;
679
682
  }
@@ -704,6 +707,9 @@
704
707
  .acud-select-item-option-grouped {
705
708
  padding-left: 48px;
706
709
  }
710
+ .acud-select-item-option-grouped.acud-select-item-option-grouped-keep-expand {
711
+ padding-left: 24px;
712
+ }
707
713
  .acud-select-lg {
708
714
  font-size: 14px;
709
715
  }
@@ -287,6 +287,9 @@
287
287
  &-checkbox {
288
288
  margin-right: 2 * @P;
289
289
  }
290
+ &&-keep-expand {
291
+ color: @G6;
292
+ }
290
293
  }
291
294
 
292
295
  // =========== Option ===========
@@ -328,6 +331,9 @@
328
331
 
329
332
  &-grouped {
330
333
  padding-left: 12 * @P;
334
+ &&-keep-expand {
335
+ padding-left: 6 * @P;
336
+ }
331
337
  }
332
338
  // .basic-config-select-item(@select-dropdown-default-tp, @select-dropdown-default-p);
333
339
  }
@@ -165,7 +165,6 @@ function RawList(props, ref) {
165
165
  } // Always use virtual scroll bar in avoid shaking
166
166
 
167
167
 
168
- // Always use virtual scroll bar in avoid shaking
169
168
  if (!inVirtual) {
170
169
  return {
171
170
  scrollHeight: ((_a = fillerInnerRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight) || 0,
@@ -187,14 +186,12 @@ function RawList(props, ref) {
187
186
  var cacheHeight = heights.get(key);
188
187
  var currentItemBottom = itemTop + (cacheHeight === undefined ? itemHeight : cacheHeight); // Check item top in the range
189
188
 
190
- // Check item top in the range
191
189
  if (currentItemBottom >= scrollTop && startIndex === undefined) {
192
190
  startIndex = i;
193
191
  startOffset = itemTop;
194
192
  } // Check item bottom in the range. We will render additional one item for motion usage
195
193
 
196
194
 
197
- // Check item bottom in the range. We will render additional one item for motion usage
198
195
  if (currentItemBottom > scrollTop + height && endIndex === undefined) {
199
196
  endIndex = i;
200
197
  }
@@ -205,9 +202,6 @@ function RawList(props, ref) {
205
202
  /* istanbul ignore next */
206
203
 
207
204
 
208
- // Fallback to normal if not match. This code should never reach
209
-
210
- /* istanbul ignore next */
211
205
  if (startIndex === undefined) {
212
206
  startIndex = 0;
213
207
  startOffset = 0;
@@ -218,7 +212,6 @@ function RawList(props, ref) {
218
212
  } // Give cache to improve scroll experience
219
213
 
220
214
 
221
- // Give cache to improve scroll experience
222
215
  endIndex = Math.min(endIndex + 1, mergedData.length);
223
216
  return {
224
217
  scrollHeight: itemTop,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "acud",
3
- "version": "0.0.74",
3
+ "version": "0.0.75",
4
4
  "description": "acg react 组件库",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",