@aloudata/aloudata-design 1.3.1 → 1.4.1

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.
Files changed (67) hide show
  1. package/dist/Avatar/component/Avatar/index.d.ts +3 -3
  2. package/dist/Avatar/component/Avatar/index.js +2 -2
  3. package/dist/Avatar/index.js +1 -1
  4. package/dist/Checkbox/index.d.ts +3 -3
  5. package/dist/Checkbox/index.js +1 -1
  6. package/dist/DataPreviewTable/components/Body/Error.d.ts +9 -0
  7. package/dist/DataPreviewTable/components/Body/Error.js +17 -0
  8. package/dist/DataPreviewTable/components/Body/SkeletonBody.d.ts +12 -0
  9. package/dist/DataPreviewTable/components/Body/SkeletonBody.js +63 -0
  10. package/dist/DataPreviewTable/components/Body/index.d.ts +12 -0
  11. package/dist/DataPreviewTable/components/Body/index.js +52 -0
  12. package/dist/DataPreviewTable/components/DragBar/index.d.ts +8 -0
  13. package/dist/DataPreviewTable/components/DragBar/index.js +93 -0
  14. package/dist/DataPreviewTable/components/Header/index.d.ts +10 -0
  15. package/dist/DataPreviewTable/components/Header/index.js +68 -0
  16. package/dist/DataPreviewTable/constant.d.ts +6 -0
  17. package/dist/DataPreviewTable/constant.js +7 -0
  18. package/dist/DataPreviewTable/hooks/useDirection.d.ts +28 -0
  19. package/dist/DataPreviewTable/hooks/useDirection.js +281 -0
  20. package/dist/DataPreviewTable/index.d.ts +4 -0
  21. package/dist/DataPreviewTable/index.js +105 -0
  22. package/dist/DataPreviewTable/interface.d.ts +26 -0
  23. package/dist/DataPreviewTable/interface.js +1 -0
  24. package/dist/DataPreviewTable/style/index.d.ts +2 -0
  25. package/dist/DataPreviewTable/style/index.js +2 -0
  26. package/dist/DataPreviewTable/style/index.less +138 -0
  27. package/dist/DataPreviewTable/utils/findRange.d.ts +13 -0
  28. package/dist/DataPreviewTable/utils/findRange.js +86 -0
  29. package/dist/DoubleCircleIcon/index.d.ts +1 -1
  30. package/dist/Dropdown/index.js +1 -1
  31. package/dist/Form/index.d.ts +27 -7
  32. package/dist/Form/index.js +46 -7
  33. package/dist/Input/components/Input/index.d.ts +3 -2
  34. package/dist/Input/components/Input/index.js +6 -4
  35. package/dist/Menu/SubMenu.d.ts +1 -1
  36. package/dist/Menu/SubMenu.js +1 -1
  37. package/dist/Progress/index.d.ts +13 -3
  38. package/dist/Progress/index.js +88 -3
  39. package/dist/Progress/style/index.less +56 -0
  40. package/dist/Radio/components/Group/index.d.ts +1 -1
  41. package/dist/ScrollArea/index.d.ts +11 -0
  42. package/dist/ScrollArea/index.js +49 -0
  43. package/dist/ScrollArea/style/index.d.ts +2 -0
  44. package/dist/ScrollArea/style/index.js +2 -0
  45. package/dist/ScrollArea/style/index.less +48 -0
  46. package/dist/Select/components/MultipleOption.d.ts +1 -1
  47. package/dist/Select/components/SingleOption.d.ts +1 -1
  48. package/dist/Select/index.d.ts +1 -0
  49. package/dist/Select/index.js +64 -26
  50. package/dist/Skeleton/index.d.ts +2 -2
  51. package/dist/Skeleton/index.js +1 -1
  52. package/dist/Space/index.d.ts +2 -2
  53. package/dist/Space/index.js +1 -1
  54. package/dist/Switch/index.d.ts +2 -2
  55. package/dist/Switch/index.js +1 -1
  56. package/dist/Tree/index.d.ts +5 -5
  57. package/dist/Upload/index.d.ts +2 -2
  58. package/dist/index.d.ts +3 -1
  59. package/dist/index.js +2 -0
  60. package/dist/locale/en_US.js +3 -3
  61. package/dist/locale/zh_CN.js +3 -3
  62. package/dist/locale-provider/LocaleReceiver.d.ts +2 -2
  63. package/dist/locale-provider/LocaleReceiver.js +1 -1
  64. package/dist/locale-provider/index.d.ts +7 -7
  65. package/dist/locale-provider/index.js +2 -2
  66. package/dist/notification/index.d.ts +1 -1
  67. package/package.json +2 -1
@@ -1,8 +1,28 @@
1
- import { Form } from 'antd';
2
- import { FormInstance, RuleRender, RuleObject, Rule } from 'antd/lib/form';
3
- import { FormProps } from 'antd/lib/form/Form';
4
- import { FormItemProps } from 'antd/lib/form/FormItem';
5
- import { FormListProps } from 'antd/lib/form/FormList';
6
- import { ErrorListProps } from 'antd/lib/form/ErrorList';
7
- export { FormInstance, FormProps, FormItemProps, Rule, RuleObject, RuleRender, FormListProps, ErrorListProps, };
1
+ import { FormProvider } from 'antd/lib/form/context';
2
+ import ErrorList, { type ErrorListProps } from 'antd/lib/form/ErrorList';
3
+ import { useForm, useWatch, type FormInstance, type FormProps } from 'antd/lib/form/Form';
4
+ import Item, { type FormItemProps } from 'antd/lib/form/FormItem';
5
+ import List, { type FormListFieldData, type FormListOperation, type FormListProps } from 'antd/lib/form/FormList';
6
+ import useFormInstance from 'antd/lib/form/hooks/useFormInstance';
7
+ import type { Rule, RuleObject, RuleRender } from 'rc-field-form/lib/interface';
8
+ import React from 'react';
9
+ declare const AldForm: <Values = any>(props: FormProps<Values> & {
10
+ children?: React.ReactNode;
11
+ } & {
12
+ ref?: React.Ref<FormInstance<Values>> | undefined;
13
+ }) => React.ReactElement;
14
+ declare type InternalFormType = typeof AldForm;
15
+ declare type CompoundedComponent = InternalFormType & {
16
+ useForm: typeof useForm;
17
+ useFormInstance: typeof useFormInstance;
18
+ useWatch: typeof useWatch;
19
+ Item: typeof Item;
20
+ List: typeof List;
21
+ ErrorList: typeof ErrorList;
22
+ Provider: typeof FormProvider;
23
+ /** @deprecated Only for warning usage. Do not use. */
24
+ create: () => void;
25
+ };
26
+ declare const Form: CompoundedComponent;
27
+ export type { FormInstance, FormProps, FormItemProps, ErrorListProps, Rule, RuleObject, RuleRender, FormListProps, FormListFieldData, FormListOperation, };
8
28
  export default Form;
@@ -1,8 +1,47 @@
1
- import { Form } from 'antd';
2
- import { FormInstance, RuleRender, RuleObject, Rule } from 'antd/lib/form';
3
- import { FormProps } from 'antd/lib/form/Form';
4
- import { FormItemProps } from 'antd/lib/form/FormItem';
5
- import { FormListProps } from 'antd/lib/form/FormList';
6
- import { ErrorListProps } from 'antd/lib/form/ErrorList';
7
- export { FormInstance, FormProps, FormItemProps, Rule, RuleObject, RuleRender, FormListProps, ErrorListProps };
1
+ var _excluded = ["children", "size"];
2
+
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
+
5
+ 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; }
6
+
7
+ 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; }
8
+
9
+ import { FormProvider } from 'antd/lib/form/context';
10
+ import ErrorList from 'antd/lib/form/ErrorList';
11
+ import InternalForm, { useForm, useWatch } from 'antd/lib/form/Form';
12
+ import Item from 'antd/lib/form/FormItem';
13
+ import List from 'antd/lib/form/FormList';
14
+ import useFormInstance from 'antd/lib/form/hooks/useFormInstance';
15
+ import warning from 'antd/lib/_util/warning';
16
+ import React, { forwardRef } from 'react';
17
+ import SizeContext, { SizeContextProvider } from "../ConfigProvider/sizeContext";
18
+ var AldForm = /*#__PURE__*/forwardRef(function (props, ref) {
19
+ var contextSize = React.useContext(SizeContext);
20
+
21
+ var children = props.children,
22
+ _props$size = props.size,
23
+ size = _props$size === void 0 ? contextSize : _props$size,
24
+ restProps = _objectWithoutProperties(props, _excluded);
25
+
26
+ return /*#__PURE__*/React.createElement(SizeContextProvider, {
27
+ size: size
28
+ }, /*#__PURE__*/React.createElement(InternalForm, _extends({
29
+ size: size
30
+ }, restProps, {
31
+ ref: ref
32
+ }), children));
33
+ });
34
+ var Form = AldForm;
35
+ Form.Item = Item;
36
+ Form.List = List;
37
+ Form.ErrorList = ErrorList;
38
+ Form.useForm = useForm;
39
+ Form.useFormInstance = useFormInstance;
40
+ Form.useWatch = useWatch;
41
+ Form.Provider = FormProvider;
42
+
43
+ Form.create = function () {
44
+ warning(false, 'Form', 'antd v4 removed `Form.create`. Please remove or use `@ant-design/compatible` instead.');
45
+ };
46
+
8
47
  export default Form;
@@ -1,13 +1,14 @@
1
- import React, { ReactNode } from 'react';
2
1
  import type { InputProps } from 'antd/lib/input/Input';
3
2
  import type { InputRef } from 'rc-input';
3
+ import React, { ReactNode } from 'react';
4
+ import { SizeType } from '../../../ConfigProvider/sizeContext';
4
5
  interface IShowCountProps {
5
6
  formatter: (args: {
6
7
  count: number;
7
8
  maxLength?: number;
8
9
  }) => string;
9
10
  }
10
- export declare type TSize = 'small' | 'middle' | 'large';
11
+ export declare type TSize = SizeType;
11
12
  export type { InputRef };
12
13
  declare type ChangeEventHandler = (e: React.ChangeEvent<HTMLInputElement>) => void;
13
14
  export interface IInputProps extends Omit<InputProps, 'size' | 'id' | 'prefix' | 'allowClear' | 'disabled' | 'showCount' | 'maxLength' | 'value' | 'defaultValue' | 'onPressEnter' | 'onChange' | 'addonAfter' | 'addonBefore'> {
@@ -6,22 +6,24 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
6
6
 
7
7
  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; }
8
8
 
9
- import React from 'react';
9
+ import SizeContext from 'antd/lib/config-provider/SizeContext';
10
10
  import AntdInput from 'antd/lib/input/Input';
11
11
  import classnames from 'classnames';
12
+ import React, { useContext } from 'react';
12
13
  export function getSizeType(sizeType) {
13
- if (['small', 'middle', 'large'].includes(sizeType)) {
14
+ if (['small', 'middle', 'large'].includes(sizeType || '')) {
14
15
  return sizeType;
15
16
  }
16
17
 
17
18
  return 'middle';
18
19
  }
19
20
  var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
20
- var _props$size = props.size,
21
- size = _props$size === void 0 ? 'middle' : _props$size,
21
+ var customSize = props.size,
22
22
  className = props.className,
23
23
  rest = _objectWithoutProperties(props, _excluded);
24
24
 
25
+ var contentSize = useContext(SizeContext);
26
+ var size = customSize || contentSize;
25
27
  return /*#__PURE__*/React.createElement(AntdInput, _extends({}, rest, {
26
28
  ref: ref,
27
29
  bordered: true,
@@ -1,5 +1,5 @@
1
+ import { SubMenuProps } from 'antd/lib/menu/SubMenu';
1
2
  import React from 'react';
2
- import { SubMenuProps } from 'antd/es/menu/SubMenu';
3
3
  export interface ISubMenuProps extends SubMenuProps {
4
4
  /**
5
5
  * @description 唯一标志
@@ -6,9 +6,9 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
6
6
 
7
7
  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; }
8
8
 
9
+ import { Menu as AntdMenu } from 'antd';
9
10
  import classNames from 'classnames';
10
11
  import React from 'react';
11
- import { Menu as AntdMenu } from 'antd';
12
12
  var AntdSubMenu = AntdMenu.SubMenu;
13
13
  export default function SubMenu(props) {
14
14
  var popupClassName = props.popupClassName,
@@ -1,3 +1,13 @@
1
- import Progress, { ProgressProps } from 'antd/es/progress';
2
- export { ProgressProps };
3
- export default Progress;
1
+ import React from 'react';
2
+ /**
3
+ * 条状进度条组件
4
+ */
5
+ declare const _default: React.ForwardRefExoticComponent<IProps & React.RefAttributes<unknown>>;
6
+ export default _default;
7
+ export interface IProps {
8
+ loading: boolean;
9
+ className?: string;
10
+ }
11
+ export interface IProgressRef {
12
+ restart: () => void;
13
+ }
@@ -1,3 +1,88 @@
1
- import Progress, { ProgressProps } from 'antd/es/progress';
2
- export { ProgressProps };
3
- export default Progress;
1
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+
3
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
+
5
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6
+
7
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
8
+
9
+ 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; }
10
+
11
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
12
+
13
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
+
15
+ import classNames from 'classnames';
16
+ import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useState } from 'react';
17
+ var ELoadingState;
18
+ /**
19
+ * 条状进度条组件
20
+ */
21
+
22
+ (function (ELoadingState) {
23
+ ELoadingState["IDLE"] = "IDLE";
24
+ ELoadingState["LOADING"] = "LOADING";
25
+ ELoadingState["LOADED"] = "LOADED";
26
+ })(ELoadingState || (ELoadingState = {}));
27
+
28
+ export default /*#__PURE__*/forwardRef(function Progress(props, ref) {
29
+ var _classNames2;
30
+
31
+ var loading = props.loading,
32
+ className = props.className;
33
+
34
+ var _useState = useState(ELoadingState.IDLE),
35
+ _useState2 = _slicedToArray(_useState, 2),
36
+ loadingState = _useState2[0],
37
+ setLoadingState = _useState2[1];
38
+
39
+ var _useState3 = useState(0),
40
+ _useState4 = _slicedToArray(_useState3, 2),
41
+ key = _useState4[0],
42
+ setKey = _useState4[1];
43
+
44
+ useImperativeHandle(ref, function () {
45
+ return {
46
+ restart: function restart() {
47
+ setKey(function (prev) {
48
+ return prev + 1;
49
+ });
50
+ }
51
+ };
52
+ });
53
+ useEffect(function () {
54
+ if (loadingState !== ELoadingState.IDLE) {
55
+ if (loadingState === ELoadingState.LOADING && !loading) {
56
+ // loading 变为 false 时,进度条开始消失
57
+ setLoadingState(ELoadingState.LOADED);
58
+ }
59
+
60
+ return;
61
+ } // 防止 loading 快速变化导致的闪烁
62
+
63
+
64
+ var DELAY_TIME = 200;
65
+ var timer = setTimeout(function () {
66
+ if (loading) {
67
+ setLoadingState(ELoadingState.LOADING);
68
+ }
69
+ }, DELAY_TIME);
70
+ return function () {
71
+ if (timer) {
72
+ clearTimeout(timer);
73
+ }
74
+ };
75
+ }, [loading, loadingState]);
76
+ var onAnimationEnd = useCallback(function () {
77
+ if (loadingState === ELoadingState.LOADED) {
78
+ setLoadingState(ELoadingState.IDLE);
79
+ }
80
+ }, [loadingState]);
81
+ return /*#__PURE__*/React.createElement("div", {
82
+ key: key,
83
+ className: classNames('ald-progress-bar', className, _defineProperty({}, 'ald-progress-bar-show-bg', loadingState !== ELoadingState.IDLE))
84
+ }, /*#__PURE__*/React.createElement("div", {
85
+ className: classNames('ald-progress-bar-inner', (_classNames2 = {}, _defineProperty(_classNames2, 'ald-progress-bar-show-loading', loadingState === ELoadingState.LOADING), _defineProperty(_classNames2, 'ald-progress-bar-hide-loading', loadingState === ELoadingState.LOADED), _classNames2)),
86
+ onAnimationEnd: onAnimationEnd
87
+ }));
88
+ });
@@ -1 +1,57 @@
1
1
  @import '../../style/index.less';
2
+
3
+ .ald-progress-bar {
4
+ border-radius: 2px 0 0;
5
+ height: 3px;
6
+ width: 100%;
7
+ pointer-events: none;
8
+
9
+ &-show-bg {
10
+ background-color: #d6e3f4;
11
+ }
12
+
13
+ &-inner {
14
+ background-color: #3271c9;
15
+ border-radius: 2px 0 0;
16
+ height: 100%;
17
+ width: 0;
18
+ }
19
+
20
+ &-show-loading {
21
+ animation: loading 2s ease-in-out forwards;
22
+ }
23
+
24
+ &-hide-loading {
25
+ animation: disappear 0.5s forwards;
26
+ }
27
+ }
28
+
29
+ @keyframes loading {
30
+ 0% {
31
+ width: 0;
32
+ }
33
+
34
+ 90% {
35
+ width: 90%;
36
+ }
37
+
38
+ 100% {
39
+ width: 90%;
40
+ }
41
+ }
42
+
43
+ @keyframes disappear {
44
+ 0% {
45
+ width: 90%;
46
+ }
47
+
48
+ 99% {
49
+ width: 99%;
50
+ opacity: 1;
51
+ }
52
+
53
+ 100% {
54
+ width: 100%;
55
+ opacity: 0;
56
+ }
57
+ }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { IRadioGroupProps } from '../../interface/radioGroup';
3
- export declare const RadioGroupContext: React.Context<Omit<IRadioGroupProps, "children" | "className"> & {
3
+ export declare const RadioGroupContext: React.Context<Omit<IRadioGroupProps, "className" | "children"> & {
4
4
  sliderRef?: React.RefObject<HTMLDivElement> | undefined;
5
5
  }>;
6
6
  export default function RadioGroup(props: IRadioGroupProps): JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { ScrollAreaProps } from '@radix-ui/react-scroll-area';
2
+ import React, { ReactNode } from 'react';
3
+ interface Props extends ScrollAreaProps {
4
+ children?: ReactNode;
5
+ className?: string;
6
+ horizontalScrollBarClassName?: string;
7
+ verticalScrollBarClassName?: string;
8
+ onViewportScroll?: (event: React.UIEvent<HTMLDivElement>) => void;
9
+ }
10
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>>;
11
+ export default _default;
@@ -0,0 +1,49 @@
1
+ var _excluded = ["children", "className", "horizontalScrollBarClassName", "verticalScrollBarClassName", "onViewportScroll"];
2
+
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
+
5
+ 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; }
6
+
7
+ 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; }
8
+
9
+ import * as ScrollAreaComponent from '@radix-ui/react-scroll-area';
10
+ import classNames from 'classnames';
11
+ import React, { forwardRef, memo } from 'react';
12
+
13
+ var ScrollArea = function ScrollArea(props, ref) {
14
+ var children = props.children,
15
+ className = props.className,
16
+ horizontalScrollBarClassName = props.horizontalScrollBarClassName,
17
+ verticalScrollBarClassName = props.verticalScrollBarClassName,
18
+ onViewportScroll = props.onViewportScroll,
19
+ rest = _objectWithoutProperties(props, _excluded);
20
+
21
+ return /*#__PURE__*/React.createElement(ScrollAreaComponent.Root, _extends({}, rest, {
22
+ scrollHideDelay: 50,
23
+ className: classNames('ald-scroll-area', className)
24
+ }), /*#__PURE__*/React.createElement(ScrollAreaComponent.Viewport, {
25
+ className: "ald-scroll-area-inner",
26
+ onScroll: function onScroll(event) {
27
+ onViewportScroll === null || onViewportScroll === void 0 ? void 0 : onViewportScroll(event);
28
+ },
29
+ ref: ref
30
+ }, children), /*#__PURE__*/React.createElement(ScrollAreaComponent.Scrollbar, {
31
+ style: {
32
+ right: 3
33
+ },
34
+ className: classNames('ald-scroll-area-bar', verticalScrollBarClassName),
35
+ orientation: "vertical"
36
+ }, /*#__PURE__*/React.createElement(ScrollAreaComponent.Thumb, {
37
+ className: 'ald-scroll-area-thumb'
38
+ })), /*#__PURE__*/React.createElement(ScrollAreaComponent.Scrollbar, {
39
+ className: classNames('ald-scroll-area-bar', horizontalScrollBarClassName),
40
+ style: {
41
+ bottom: 3
42
+ },
43
+ orientation: "horizontal"
44
+ }, /*#__PURE__*/React.createElement(ScrollAreaComponent.Thumb, {
45
+ className: 'ald-scroll-area-thumb'
46
+ })));
47
+ };
48
+
49
+ export default /*#__PURE__*/memo( /*#__PURE__*/forwardRef(ScrollArea));
@@ -0,0 +1,2 @@
1
+ import '../../style';
2
+ import './index.less';
@@ -0,0 +1,2 @@
1
+ import "../../style";
2
+ import "./index.less";
@@ -0,0 +1,48 @@
1
+ @import '../../style/index.less';
2
+
3
+ .ald-scroll-area {
4
+ width: 100%;
5
+ height: 100%;
6
+ overflow: hidden;
7
+ box-sizing: border-box;
8
+
9
+ --scrollbar-size: 6px;
10
+ // 滚动条轨道
11
+ .ald-scroll-area-bar {
12
+ z-index: 6;
13
+ display: flex;
14
+ user-select: none;
15
+ touch-action: none;
16
+ background: transparent;
17
+ transition: background 160ms ease-out;
18
+ }
19
+
20
+ .ald-scroll-area-bar[data-orientation='vertical'] {
21
+ width: var(--scrollbar-size);
22
+ padding: 2px 0;
23
+ }
24
+
25
+ .ald-scroll-area-bar[data-orientation='horizontal'] {
26
+ flex-direction: column;
27
+ padding: 0 2px;
28
+ height: var(--scrollbar-size);
29
+ }
30
+ // 滚动条可拖动条
31
+ .ald-scroll-area-thumb {
32
+ flex: 1;
33
+ background: #575757;
34
+ border-radius: var(--scrollbar-size);
35
+ position: relative;
36
+ opacity: 0.2;
37
+
38
+ &:hover {
39
+ opacity: 0.6;
40
+ }
41
+ }
42
+ }
43
+
44
+ .ald-scroll-area-inner {
45
+ width: 100%;
46
+ height: 100%;
47
+ box-sizing: border-box;
48
+ }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { DefaultOptionType } from 'antd/es/select';
2
+ import { DefaultOptionType } from 'antd/lib/select';
3
3
  interface IMultipleOptionProps {
4
4
  selected: boolean;
5
5
  disabled?: boolean;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { DefaultOptionType } from 'antd/es/select';
2
+ import { DefaultOptionType } from 'antd/lib/select';
3
3
  interface ISelectProps {
4
4
  selected: boolean;
5
5
  option: DefaultOptionType;
@@ -3,6 +3,7 @@ import React from 'react';
3
3
  export interface ISelectProps extends Omit<SelectProps, 'mode'> {
4
4
  prefix?: React.ReactNode;
5
5
  mode?: 'multiple';
6
+ showAllOption?: boolean;
6
7
  }
7
8
  export declare type IRefSelectProps = RefSelectProps;
8
9
  export declare type IAldRefSelectProps = IRefSelectProps & {