@aloudata/aloudata-design 2.5.2 → 2.6.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 (40) hide show
  1. package/dist/Icon/components/ArrowDownLightLine.d.ts +11 -0
  2. package/dist/Icon/components/ArrowDownLightLine.js +35 -0
  3. package/dist/Icon/components/CancelledCircleFill.d.ts +11 -0
  4. package/dist/Icon/components/CancelledCircleFill.js +35 -0
  5. package/dist/Icon/components/InProgressFill.d.ts +11 -0
  6. package/dist/Icon/components/InProgressFill.js +38 -0
  7. package/dist/Icon/index.d.ts +3 -0
  8. package/dist/Icon/index.js +3 -0
  9. package/dist/Icon/svg/Cancelled-Circle-fill.svg +5 -0
  10. package/dist/Icon/svg/In-Progress-fill.svg +8 -0
  11. package/dist/Icon/svg/arrow-down-light-line.svg +5 -0
  12. package/dist/Radio/components/Radio/index.js +45 -9
  13. package/dist/Radio/interface/radio.d.ts +3 -0
  14. package/dist/Radio/style/index.less +38 -5
  15. package/dist/Spin/CustomIcon/index.js +4 -1
  16. package/dist/StatusLight/index.d.ts +12 -0
  17. package/dist/StatusLight/index.js +74 -0
  18. package/dist/StatusLight/style/index.d.ts +2 -0
  19. package/dist/StatusLight/style/index.js +2 -0
  20. package/dist/StatusLight/style/index.less +47 -0
  21. package/dist/Table/components/ExpandCell.d.ts +11 -0
  22. package/dist/Table/components/ExpandCell.js +46 -0
  23. package/dist/Table/components/Pagination/index.d.ts +3 -2
  24. package/dist/Table/components/Pagination/index.js +1 -1
  25. package/dist/Table/helper.d.ts +2 -1
  26. package/dist/Table/helper.js +10 -0
  27. package/dist/Table/hooks/useExpandable.d.ts +23 -0
  28. package/dist/Table/hooks/useExpandable.js +152 -0
  29. package/dist/Table/index.d.ts +1 -1
  30. package/dist/Table/index.js +32 -17
  31. package/dist/Table/style/index.less +96 -45
  32. package/dist/Table/types.d.ts +10 -1
  33. package/dist/Tabs/index.d.ts +1 -1
  34. package/dist/Tabs/index.js +13 -13
  35. package/dist/Tabs/style/index.less +1 -0
  36. package/dist/ald.min.css +1 -1
  37. package/dist/index.d.ts +1 -0
  38. package/dist/index.js +1 -0
  39. package/dist/index.less +1 -0
  40. package/package.json +1 -1
@@ -3,7 +3,7 @@ import { IPaginationProps } from '../Pagination/types';
3
3
  export interface ITableProps<TDataItem extends object> {
4
4
  columns: ITableColumn<TDataItem>[];
5
5
  data: TDataItem[];
6
- rowKey?: string | ((record: TDataItem) => string | number);
6
+ rowKey?: TRowKey<TDataItem>;
7
7
  columnSizing?: boolean;
8
8
  sticky?: boolean | {
9
9
  offsetHeader: number;
@@ -15,7 +15,9 @@ export interface ITableProps<TDataItem extends object> {
15
15
  rowClassName?: (record: TDataItem, index: number) => string;
16
16
  onRowClick?: (record: TDataItem, index: number) => void;
17
17
  onError?: (errorInfo: ITableCellErrorInfo) => void;
18
+ expandable?: ITableExpandable<TDataItem> | boolean;
18
19
  }
20
+ export type TRowKey<TDataItem extends object> = string | ((record: TDataItem) => string | number);
19
21
  export interface ITableCellErrorInfo {
20
22
  error: Error;
21
23
  stack: React.ErrorInfo['componentStack'];
@@ -44,3 +46,10 @@ export interface ITableColumn<TDataItem = unknown> {
44
46
  export interface IInnerTableColumn<TDataItem = unknown> extends ITableColumn<TDataItem> {
45
47
  columnWidths: number[];
46
48
  }
49
+ export interface ITableExpandable<TDataItem = unknown> {
50
+ childrenColumnName?: string;
51
+ defaultExpandAllRows?: boolean;
52
+ defaultExpandedRowKeys?: string[];
53
+ expandedRowKeys?: string[];
54
+ onExpand?: (record: TDataItem, isExpanded: boolean) => void;
55
+ }
@@ -55,7 +55,7 @@ export interface ITabsProps extends Omit<TabsProps, 'size'> {
55
55
  */
56
56
  padding?: boolean | number;
57
57
  /**
58
- * @description tab和content之间的间距,默认16px,仅在tabPosition为top时生效
58
+ * @description tab和content之间的间距,仅在tabPosition为top时生效
59
59
  * @default false
60
60
  */
61
61
  compact?: boolean;
@@ -21,11 +21,11 @@ export default function Tabs(props) {
21
21
  adaptHeight = props.adaptHeight,
22
22
  _props$style = props.style,
23
23
  style = _props$style === void 0 ? {} : _props$style,
24
- monospace = props.monospace,
24
+ propsMonospace = props.monospace,
25
25
  _props$tabPosition = props.tabPosition,
26
26
  tabPosition = _props$tabPosition === void 0 ? 'top' : _props$tabPosition,
27
27
  _props$padding = props.padding,
28
- padding = _props$padding === void 0 ? false : _props$padding,
28
+ propsPadding = _props$padding === void 0 ? false : _props$padding,
29
29
  compact = props.compact,
30
30
  _props$hasDividing = props.hasDividing,
31
31
  hasDividing = _props$hasDividing === void 0 ? true : _props$hasDividing,
@@ -35,20 +35,20 @@ export default function Tabs(props) {
35
35
  if (size === 'small') {
36
36
  tabsProps.size = size;
37
37
  }
38
- var _monospace = tabPosition !== 'top' ? false : monospace;
39
- var _padding = useMemo(function () {
38
+ var monospace = tabPosition !== 'top' ? false : propsMonospace;
39
+ var padding = useMemo(function () {
40
40
  if (tabPosition !== 'top') return 0;
41
- if (typeof padding === 'number') {
42
- return padding;
41
+ if (typeof propsPadding === 'number') {
42
+ return propsPadding;
43
43
  }
44
- if (typeof padding === 'boolean' && padding) {
44
+ if (typeof propsPadding === 'boolean' && propsPadding) {
45
45
  return 20;
46
46
  }
47
47
  return 0;
48
- }, [padding, tabPosition]);
48
+ }, [propsPadding, tabPosition]);
49
49
  var getTabBarGutter = function getTabBarGutter() {
50
- if (tabPosition === 'top' && !_monospace) {
51
- return 20;
50
+ if (tabPosition === 'top' && !monospace) {
51
+ return 24;
52
52
  }
53
53
  return 0;
54
54
  };
@@ -58,7 +58,7 @@ export default function Tabs(props) {
58
58
  }, /*#__PURE__*/React.createElement(MoreVerticalLine, null)),
59
59
  style: Object.assign(style, {
60
60
  '--header-bg-color': headerBackgroundColor,
61
- '--tabs-padding': "".concat(_padding, "px")
61
+ '--tabs-padding': "".concat(padding, "px")
62
62
  }),
63
63
  tabPosition: tabPosition,
64
64
  tabBarGutter: getTabBarGutter(),
@@ -66,8 +66,8 @@ export default function Tabs(props) {
66
66
  className: classNames('ald-tabs', className, {
67
67
  'ald-adapt-height': adaptHeight,
68
68
  'ald-tabs-default': size !== 'small',
69
- 'ald-tabs-monospace': _monospace,
70
- 'ald-tabs-padding': !!padding,
69
+ 'ald-tabs-monospace': monospace,
70
+ 'ald-tabs-padding': !!propsPadding,
71
71
  'ald-tabs-compact': !!compact,
72
72
  'ald-tabs-no-dividing': !hasDividing
73
73
  })
@@ -22,6 +22,7 @@
22
22
  .ant-tabs.ald-tabs {
23
23
  &.ant-tabs {
24
24
  color: @NL40;
25
+ font-size: 14px;
25
26
 
26
27
  .ant-tabs-nav {
27
28
  background-color: var(--header-bg-color);