@aloudata/aloudata-design 2.14.2 → 2.14.4

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.
@@ -41,7 +41,6 @@ export interface BaseSelectProps extends BaseSelectPrivateProps, ISelectProps, R
41
41
  innerSearchValue?: string;
42
42
  setInnerSearchValue?: (value: string) => void;
43
43
  displayMenu?: MenuProps;
44
- status?: 'success' | 'error';
45
44
  open?: boolean;
46
45
  defaultOpen?: boolean;
47
46
  onOpenChange?: (open: boolean) => void;
@@ -67,7 +67,9 @@ var BaseSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
67
67
  _props$popupMatchSele = props.popupMatchSelectWidth,
68
68
  popupMatchSelectWidth = _props$popupMatchSele === void 0 ? true : _props$popupMatchSele,
69
69
  placement = props.placement,
70
- popupClassName = props.popupClassName;
70
+ popupClassName = props.popupClassName,
71
+ style = props.style,
72
+ listHeight = props.listHeight;
71
73
  var setClassNames = prefixCls('select');
72
74
  var selectRef = useRef(null);
73
75
  var widthStyle = getWidthStyle(width);
@@ -173,7 +175,7 @@ var BaseSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
173
175
  }, [displayMenu, isMultipleMode, onToggleOpen, onOptionSelect]);
174
176
  return /*#__PURE__*/React.createElement("div", {
175
177
  className: mergedClassName,
176
- style: widthStyle,
178
+ style: _objectSpread(_objectSpread({}, widthStyle), style),
177
179
  ref: selectRef,
178
180
  id: id,
179
181
  onClick: onClick,
@@ -194,6 +196,7 @@ var BaseSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
194
196
  overlayClassName: popupClassName,
195
197
  dropdownRender: dropdownRender,
196
198
  overlayStyle: overlayStyle || dropdownStyle,
199
+ listHeight: listHeight,
197
200
  placement: placement,
198
201
  onOpenChange: function onOpenChange(open) {
199
202
  if (isResponsiveMode) {
@@ -18,6 +18,7 @@ export interface SelectTriggerProps extends DropdownProps {
18
18
  searchValue?: string;
19
19
  setInnerSearchValue?: (value: string) => void;
20
20
  filterOption?: (inputValue: string, option: SelectOptionType) => boolean;
21
+ listHeight?: number;
21
22
  }
22
23
  declare const RefSelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<RefTriggerProps>>;
23
24
  export default RefSelectTrigger;
@@ -1,13 +1,13 @@
1
- var _excluded = ["overlayStyle", "disabled", "open", "children", "dropdownRender", "getPopupContainer", "onOpenChange", "showSearch", "searchValue", "setInnerSearchValue", "menu", "overlayClassName", "popupMatchSelectWidth", "notFoundContent"];
1
+ var _excluded = ["overlayStyle", "disabled", "open", "children", "dropdownRender", "getPopupContainer", "onOpenChange", "showSearch", "searchValue", "setInnerSearchValue", "menu", "overlayClassName", "placement", "popupMatchSelectWidth", "listHeight", "notFoundContent"];
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; }
5
5
  import React, { useCallback } from 'react';
6
6
  import Dropdown from "../Dropdown";
7
7
  import classnames from 'classnames';
8
- import { Empty } from '..';
9
8
  import SearchBox from "./components/SearchBox";
10
9
  import PopupContent from "./components/PopupContent";
10
+ import Empty from "../Empty";
11
11
  var RefSelectTrigger = /*#__PURE__*/React.forwardRef(function (props, ref) {
12
12
  var overlayStyle = props.overlayStyle,
13
13
  disabled = props.disabled,
@@ -21,7 +21,10 @@ var RefSelectTrigger = /*#__PURE__*/React.forwardRef(function (props, ref) {
21
21
  setInnerSearchValue = props.setInnerSearchValue,
22
22
  menuProps = props.menu,
23
23
  overlayClassName = props.overlayClassName,
24
+ _props$placement = props.placement,
25
+ placement = _props$placement === void 0 ? 'bottom-start' : _props$placement,
24
26
  popupMatchSelectWidth = props.popupMatchSelectWidth,
27
+ listHeight = props.listHeight,
25
28
  _props$notFoundConten = props.notFoundContent,
26
29
  notFoundContent = _props$notFoundConten === void 0 ? /*#__PURE__*/React.createElement(Empty, {
27
30
  size: "small"
@@ -40,7 +43,11 @@ var RefSelectTrigger = /*#__PURE__*/React.forwardRef(function (props, ref) {
40
43
  var customDropdownRender = useCallback(function (menu) {
41
44
  return /*#__PURE__*/React.createElement("div", {
42
45
  className: "beta-ald-select-popup",
43
- ref: popupRef
46
+ ref: popupRef,
47
+ style: {
48
+ height: listHeight,
49
+ overflow: 'auto'
50
+ }
44
51
  }, /*#__PURE__*/React.createElement(SearchBox, {
45
52
  showSearch: showSearch,
46
53
  value: searchValue,
@@ -53,11 +60,12 @@ var RefSelectTrigger = /*#__PURE__*/React.forwardRef(function (props, ref) {
53
60
  dropdownRender: dropdownRender,
54
61
  menuProps: menuProps
55
62
  }));
56
- }, [dropdownRender, menuProps, notFoundContent, searchValue, setInnerSearchValue, showSearch]);
63
+ }, [dropdownRender, listHeight, menuProps, notFoundContent, searchValue, setInnerSearchValue, showSearch]);
57
64
  return /*#__PURE__*/React.createElement(Dropdown, _extends({}, restProps, {
58
65
  disabled: disabled,
59
66
  open: open,
60
67
  menu: menuProps,
68
+ placement: placement,
61
69
  popupMatchTriggerWidth: popupMatchSelectWidth,
62
70
  overlayStyle: overlayStyle,
63
71
  overlayClassName: classnames('beta-ald-select-popup-container', overlayClassName),
@@ -7,7 +7,7 @@ export interface ISelectProps<ValueType = any, OptionType extends BaseOptionType
7
7
  prefix?: React.ReactNode;
8
8
  size?: 'small' | 'middle' | 'large';
9
9
  mode?: Mode;
10
- status?: 'success' | 'error';
10
+ status?: 'passed' | 'error';
11
11
  suffixIcon?: React.ReactNode;
12
12
  className?: string;
13
13
  id?: string;
@@ -17,6 +17,7 @@ export interface ISelectProps<ValueType = any, OptionType extends BaseOptionType
17
17
  allowClear?: boolean;
18
18
  showArrow?: boolean;
19
19
  borderLess?: boolean;
20
+ listHeight?: number;
20
21
  width?: 'auto' | 'fill' | number;
21
22
  dropdownClassName?: string;
22
23
  popupClassName?: string;
@@ -11,7 +11,7 @@
11
11
  }
12
12
 
13
13
  &-validating,
14
- &-success {
14
+ &-passed {
15
15
  border-color: #16a34a;
16
16
  }
17
17
 
@@ -15,6 +15,12 @@
15
15
  &-disabled {
16
16
  cursor: not-allowed;
17
17
 
18
+ .beta-ald-select-prefix {
19
+ svg {
20
+ opacity: 0.24;
21
+ }
22
+ }
23
+
18
24
  .beta-ald-select-suffix {
19
25
  opacity: 0.24;
20
26
  }
@@ -37,6 +37,7 @@
37
37
  margin-right: 4px;
38
38
  flex-shrink: 0;
39
39
  flex-grow: 0;
40
+ min-height: @lineHeight;
40
41
  }
41
42
 
42
43
  .beta-ald-select-placeholder {
@@ -45,6 +46,7 @@
45
46
  }
46
47
 
47
48
  .beta-ald-select-selector {
49
+ min-height: @lineHeight;
48
50
  flex: 1;
49
51
 
50
52
  .beta-ald-select-selector-multiple-responsive-selected-section {