@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.
- package/dist/Icon/components/ArrowDownLightLine.d.ts +11 -0
- package/dist/Icon/components/ArrowDownLightLine.js +35 -0
- package/dist/Icon/components/CancelledCircleFill.d.ts +11 -0
- package/dist/Icon/components/CancelledCircleFill.js +35 -0
- package/dist/Icon/components/InProgressFill.d.ts +11 -0
- package/dist/Icon/components/InProgressFill.js +38 -0
- package/dist/Icon/index.d.ts +3 -0
- package/dist/Icon/index.js +3 -0
- package/dist/Icon/svg/Cancelled-Circle-fill.svg +5 -0
- package/dist/Icon/svg/In-Progress-fill.svg +8 -0
- package/dist/Icon/svg/arrow-down-light-line.svg +5 -0
- package/dist/Radio/components/Radio/index.js +45 -9
- package/dist/Radio/interface/radio.d.ts +3 -0
- package/dist/Radio/style/index.less +38 -5
- package/dist/Spin/CustomIcon/index.js +4 -1
- package/dist/StatusLight/index.d.ts +12 -0
- package/dist/StatusLight/index.js +74 -0
- package/dist/StatusLight/style/index.d.ts +2 -0
- package/dist/StatusLight/style/index.js +2 -0
- package/dist/StatusLight/style/index.less +47 -0
- package/dist/Table/components/ExpandCell.d.ts +11 -0
- package/dist/Table/components/ExpandCell.js +46 -0
- package/dist/Table/components/Pagination/index.d.ts +3 -2
- package/dist/Table/components/Pagination/index.js +1 -1
- package/dist/Table/helper.d.ts +2 -1
- package/dist/Table/helper.js +10 -0
- package/dist/Table/hooks/useExpandable.d.ts +23 -0
- package/dist/Table/hooks/useExpandable.js +152 -0
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +32 -17
- package/dist/Table/style/index.less +96 -45
- package/dist/Table/types.d.ts +10 -1
- package/dist/Tabs/index.d.ts +1 -1
- package/dist/Tabs/index.js +13 -13
- package/dist/Tabs/style/index.less +1 -0
- package/dist/ald.min.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.less +1 -0
- package/package.json +1 -1
package/dist/Table/types.d.ts
CHANGED
|
@@ -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?:
|
|
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
|
+
}
|
package/dist/Tabs/index.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export interface ITabsProps extends Omit<TabsProps, 'size'> {
|
|
|
55
55
|
*/
|
|
56
56
|
padding?: boolean | number;
|
|
57
57
|
/**
|
|
58
|
-
* @description tab和content
|
|
58
|
+
* @description tab和content之间的间距,仅在tabPosition为top时生效
|
|
59
59
|
* @default false
|
|
60
60
|
*/
|
|
61
61
|
compact?: boolean;
|
package/dist/Tabs/index.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
|
39
|
-
var
|
|
38
|
+
var monospace = tabPosition !== 'top' ? false : propsMonospace;
|
|
39
|
+
var padding = useMemo(function () {
|
|
40
40
|
if (tabPosition !== 'top') return 0;
|
|
41
|
-
if (typeof
|
|
42
|
-
return
|
|
41
|
+
if (typeof propsPadding === 'number') {
|
|
42
|
+
return propsPadding;
|
|
43
43
|
}
|
|
44
|
-
if (typeof
|
|
44
|
+
if (typeof propsPadding === 'boolean' && propsPadding) {
|
|
45
45
|
return 20;
|
|
46
46
|
}
|
|
47
47
|
return 0;
|
|
48
|
-
}, [
|
|
48
|
+
}, [propsPadding, tabPosition]);
|
|
49
49
|
var getTabBarGutter = function getTabBarGutter() {
|
|
50
|
-
if (tabPosition === 'top' && !
|
|
51
|
-
return
|
|
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(
|
|
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':
|
|
70
|
-
'ald-tabs-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
|
})
|