@aloudata/aloudata-design 0.4.0-beta.1 → 0.4.0-beta.2

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.
@@ -90,7 +90,13 @@ interface CssExports {
90
90
  'SELECTOR_PADDING_HORIZONTAL_MIDDLE': string;
91
91
  'SELECTOR_PADDING_HORIZONTAL_MINI': string;
92
92
  'SELECTOR_PADDING_HORIZONTAL_SMALL': string;
93
+ 'SHADOW_BODY_TOP_LEFT': string;
93
94
  'SHADOW_L': string;
95
+ 'SHADOW_LG': string;
96
+ 'SHADOW_MD': string;
97
+ 'SHADOW_SM': string;
98
+ 'SHADOW_XL': string;
99
+ 'SHADOW_XS': string;
94
100
  'TA10': string;
95
101
  'TA20': string;
96
102
  'TA30': string;
@@ -33,8 +33,6 @@ var _TableBodyRowList = _interopRequireDefault(require("./components/TableBodyRo
33
33
 
34
34
  var _useFrame = require("./hooks/useFrame");
35
35
 
36
- var _variable = _interopRequireDefault(require("./style/variable.less"));
37
-
38
36
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
39
37
 
40
38
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -59,13 +57,15 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
59
57
 
60
58
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
61
59
 
60
+ var tableHeadRowHeight = 44;
62
61
  var SCROLLBAR_SIZE = 15;
63
62
  var ZERO = 0;
64
63
 
65
64
  function Table(props, ref) {
66
65
  var _classnames3;
67
66
 
68
- var columns = props.columns,
67
+ var tableKey = props.key,
68
+ columns = props.columns,
69
69
  data = props.data,
70
70
  onRowSelected = props.onRowSelected,
71
71
  loadMore = props.loadMore,
@@ -358,7 +358,7 @@ function Table(props, ref) {
358
358
  style: {
359
359
  overflow: 'overlay',
360
360
  overflowX: tableClientWidth + SCROLLBAR_SIZE > columnsTotalWidthRef.current ? 'hidden' : 'unset',
361
- height: tableClientHeight - _variable.default.TableHeadRowHeight
361
+ height: tableClientHeight - tableHeadRowHeight
362
362
  },
363
363
  ref: tableBodyRef,
364
364
  onScroll: onBodyScroll
@@ -366,12 +366,12 @@ function Table(props, ref) {
366
366
  };
367
367
 
368
368
  return /*#__PURE__*/_react.default.createElement("div", {
369
- className: (0, _classnames4.default)("".concat(prefixCls, "-inner-wrap"), _defineProperty({}, "".concat(prefixCls, "-innerScroll"), height))
369
+ className: (0, _classnames4.default)("".concat(prefixCls, "-inner-wrap"), _defineProperty({}, "".concat(prefixCls, "-innerScroll"), !!height))
370
370
  }, /*#__PURE__*/_react.default.createElement("div", {
371
371
  ref: tableHeadRef,
372
372
  className: "".concat(prefixCls, "-tableHeadScrollWrap")
373
373
  }, tableHeadNode), /*#__PURE__*/_react.default.createElement("div", Object.assign({}, getTableBodyProps(), {
374
- className: (0, _classnames4.default)("".concat(prefixCls, "-tbody"), _defineProperty({}, "".concat(prefixCls, "-tbody-innerScroll"), height))
374
+ className: (0, _classnames4.default)("".concat(prefixCls, "-tbody"), _defineProperty({}, "".concat(prefixCls, "-tbody-innerScroll"), !!height))
375
375
  }), renderNoHeightTableBody()));
376
376
  };
377
377
 
@@ -383,6 +383,7 @@ function Table(props, ref) {
383
383
  setTableClientHeight(clientHeight);
384
384
  }
385
385
  }, /*#__PURE__*/_react.default.createElement("div", {
386
+ key: tableKey,
386
387
  className: prefixCls,
387
388
  ref: tableRef,
388
389
  style: {
@@ -17,6 +17,7 @@ export interface IColumn<RecordType> {
17
17
  selected?: boolean;
18
18
  }
19
19
  export interface ITableProps<RecordType> {
20
+ key?: React.Key;
20
21
  columns: IColumn<RecordType>[];
21
22
  data: RecordType[];
22
23
  onRowSelected?: (row: RecordType) => void;
@@ -125,6 +125,10 @@
125
125
  display: flex;
126
126
  align-items: center;
127
127
  padding-left: 24px;
128
+
129
+ .ald-table-cell-container {
130
+ width: 100%;
131
+ }
128
132
  }
129
133
 
130
134
  &:hover {
@@ -2,9 +2,4 @@
2
2
 
3
3
  @ald-iconfont-css-prefix: anticon;
4
4
  @table-head-row-height: 44px;
5
- @table-head-row-height-num: 44;
6
5
  @table-body-row-height: 72px;
7
-
8
- :export {
9
- TableHeadRowHeight: @table-head-row-height-num;
10
- }
@@ -1,7 +1,7 @@
1
1
  // This file is automatically generated.
2
2
  // Please do not change this file!
3
3
  interface CssExports {
4
- 'TableHeadRowHeight': string;
4
+
5
5
  }
6
6
  export const cssExports: CssExports;
7
7
  export default cssExports;
package/lib/Tabs/index.js CHANGED
@@ -7,7 +7,7 @@ exports.default = Tabs;
7
7
 
8
8
  require("@aloudata/icons-react/styles/index.less");
9
9
 
10
- var _More2 = _interopRequireDefault(require("@aloudata/icons-react/es/icons/More"));
10
+ var _MoreFill2 = _interopRequireDefault(require("@aloudata/icons-react/es/icons/MoreFill"));
11
11
 
12
12
  require("antd/es/tabs/style");
13
13
 
@@ -49,7 +49,7 @@ function Tabs(props) {
49
49
  return /*#__PURE__*/_react.default.createElement(_tabs.default, Object.assign({
50
50
  moreIcon: /*#__PURE__*/_react.default.createElement("div", {
51
51
  className: "ald-tabs-moreIcon"
52
- }, /*#__PURE__*/_react.default.createElement(_More2.default, {
52
+ }, /*#__PURE__*/_react.default.createElement(_MoreFill2.default, {
53
53
  color: "currentColor"
54
54
  })),
55
55
  tabBarGutter: 24,
@@ -109,7 +109,7 @@
109
109
  @BG60: #D0D5DD;
110
110
  @BG70: #EAECF0;
111
111
  @BG80: #F2F4F7;
112
- @BG90: #F8FAFB;
112
+ @BG90: #F5F6F7;
113
113
  @BG95: #F9FAFB;
114
114
  @BG97: #FCFCFD;
115
115
  @BG100:#FFFFFF;
@@ -118,7 +118,13 @@
118
118
  /***
119
119
  * 投影
120
120
  ***/
121
- @shadow-L:0px 11px 15px rgba(0, 26, 51, 0.1), 0px 9px 46px rgba(0, 26, 51, 0.05), 0px 24px 38px rgba(0, 26, 51, 0.03);
121
+ @shadow-L: 0px 11px 15px rgba(0, 26, 51, 0.1), 0px 9px 46px rgba(0, 26, 51, 0.05), 0px 24px 38px rgba(0, 26, 51, 0.03);
122
+ @shadow-xl: 0px 20px 24px -4px rgba(16, 24, 40, 0.08), 0px 8px 8px -4px rgba(16, 24, 40, 0.03);
123
+ @shadow-lg: 0px 12px 16px -4px rgba(16, 24, 40, 0.08), 0px 4px 6px -2px rgba(16, 24, 40, 0.03);
124
+ @shadow-md: 0px 4px 6px -2px rgba(16, 24, 40, 0.08), 0px 2px 4px -2px rgba(16, 24, 40, 0.03);
125
+ @shadow-sm: 0px 1px 4px rgba(16, 24, 40, 0.06), 0px 1px 2px rgba(16, 24, 40, 0.04);
126
+ @shadow-xs: 0px 1px 2px rgba(16, 24, 40, 0.05);
127
+ @shadow-body-top-left: -4px -4px 2px rgba(0, 0, 0, 0.05);
122
128
 
123
129
  // 业务颜色
124
130
  // 除了原色之外,在业务、提示和标签等组件中使用一些次要颜色也很有帮助。这些次要颜色应该少用或作为重点使用,而主要颜色应该占优先地位。
@@ -337,6 +343,12 @@
337
343
  BG97: @BG97;
338
344
  BG100: @BG100;
339
345
  SHADOW_L: @shadow-L;
346
+ SHADOW_BODY_TOP_LEFT:@shadow-body-top-left;
347
+ SHADOW_XS: @shadow-xs;
348
+ SHADOW_SM: @shadow-sm;
349
+ SHADOW_MD: @shadow-md;
350
+ SHADOW_LG: @shadow-lg;
351
+ SHADOW_XL: @shadow-xl;
340
352
  TA10: @TA10;
341
353
  TA20: @TA20;
342
354
  TA30: @TA30;
@@ -82,7 +82,13 @@ interface CssExports {
82
82
  'SC90': string;
83
83
  'SC95': string;
84
84
  'SC98': string;
85
+ 'SHADOW_BODY_TOP_LEFT': string;
85
86
  'SHADOW_L': string;
87
+ 'SHADOW_LG': string;
88
+ 'SHADOW_MD': string;
89
+ 'SHADOW_SM': string;
90
+ 'SHADOW_XL': string;
91
+ 'SHADOW_XS': string;
86
92
  'TA10': string;
87
93
  'TA20': string;
88
94
  'TA30': string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aloudata/aloudata-design",
3
- "version": "0.4.0-beta.1",
3
+ "version": "0.4.0-beta.2",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -52,7 +52,7 @@
52
52
  ]
53
53
  },
54
54
  "dependencies": {
55
- "@aloudata/icons-react": "^0.0.8",
55
+ "@aloudata/icons-react": "^0.0.9",
56
56
  "@ant-design/icons": "^4.7.0",
57
57
  "antd": "^4.21.5",
58
58
  "babel-preset-react-app": "^10.0.1",
@@ -1,126 +0,0 @@
1
- // This file is automatically generated.
2
- // Please do not change this file!
3
- interface CssExports {
4
- 'B10': string;
5
- 'B20': string;
6
- 'B30': string;
7
- 'B40': string;
8
- 'B50': string;
9
- 'B60': string;
10
- 'B70': string;
11
- 'B80': string;
12
- 'B90': string;
13
- 'B95': string;
14
- 'B98': string;
15
- 'BG0': string;
16
- 'BG10': string;
17
- 'BG100': string;
18
- 'BG20': string;
19
- 'BG30': string;
20
- 'BG40': string;
21
- 'BG50': string;
22
- 'BG60': string;
23
- 'BG70': string;
24
- 'BG80': string;
25
- 'BG90': string;
26
- 'BG95': string;
27
- 'BG97': string;
28
- 'BLACK': string;
29
- 'IMAGE_HOLDER': string;
30
- 'MATE': string;
31
- 'ND0': string;
32
- 'ND10': string;
33
- 'ND20': string;
34
- 'ND30': string;
35
- 'ND40': string;
36
- 'ND50': string;
37
- 'ND60': string;
38
- 'ND70': string;
39
- 'ND80': string;
40
- 'ND90': string;
41
- 'ND95': string;
42
- 'ND97': string;
43
- 'NL0': string;
44
- 'NL10': string;
45
- 'NL20': string;
46
- 'NL30': string;
47
- 'NL40': string;
48
- 'NL50': string;
49
- 'NL60': string;
50
- 'NL70': string;
51
- 'NL80': string;
52
- 'NL90': string;
53
- 'NL95': string;
54
- 'NL97': string;
55
- 'SA10': string;
56
- 'SA20': string;
57
- 'SA30': string;
58
- 'SA40': string;
59
- 'SA50': string;
60
- 'SA60': string;
61
- 'SA70': string;
62
- 'SA80': string;
63
- 'SA90': string;
64
- 'SA95': string;
65
- 'SA98': string;
66
- 'SB10': string;
67
- 'SB20': string;
68
- 'SB30': string;
69
- 'SB40': string;
70
- 'SB50': string;
71
- 'SB60': string;
72
- 'SB70': string;
73
- 'SB80': string;
74
- 'SB90': string;
75
- 'SB95': string;
76
- 'SB98': string;
77
- 'SC10': string;
78
- 'SC20': string;
79
- 'SC30': string;
80
- 'SC40': string;
81
- 'SC50': string;
82
- 'SC60': string;
83
- 'SC70': string;
84
- 'SC80': string;
85
- 'SC90': string;
86
- 'SC95': string;
87
- 'SC98': string;
88
- 'SHADOW_L': string;
89
- 'TableHeadRowHeight': string;
90
- 'WHITE': string;
91
- 'ald-empty': string;
92
- 'ald-empty-description': string;
93
- 'ald-empty-image': string;
94
- 'ald-empty-img': string;
95
- 'ald-empty-large': string;
96
- 'ald-empty-small': string;
97
- 'ald-empty-title': string;
98
- 'ald-table': string;
99
- 'ald-table-bar': string;
100
- 'ald-table-canNotInnerScroll': string;
101
- 'ald-table-cell': string;
102
- 'ald-table-cell-content': string;
103
- 'ald-table-column-resizable': string;
104
- 'ald-table-empty-icon': string;
105
- 'ald-table-header': string;
106
- 'ald-table-header-left': string;
107
- 'ald-table-header-right': string;
108
- 'ald-table-init-loading': string;
109
- 'ald-table-inner-wrap': string;
110
- 'ald-table-list': string;
111
- 'ald-table-loading': string;
112
- 'ald-table-loading-icon': string;
113
- 'ald-table-page-loading': string;
114
- 'ald-table-row': string;
115
- 'ald-table-row-ellipsis': string;
116
- 'ald-table-row-list-wrap': string;
117
- 'ald-table-row-selected': string;
118
- 'ald-table-sortIcon': string;
119
- 'ald-table-table-wrap': string;
120
- 'ald-table-tableHeadScrollWrap': string;
121
- 'ald-table-tbody': string;
122
- 'ald-table-tbody-innerScroll': string;
123
- 'ald-table-thead': string;
124
- }
125
- export const cssExports: CssExports;
126
- export default cssExports;
@@ -1,126 +0,0 @@
1
- // This file is automatically generated.
2
- // Please do not change this file!
3
- interface CssExports {
4
- 'B10': string;
5
- 'B20': string;
6
- 'B30': string;
7
- 'B40': string;
8
- 'B50': string;
9
- 'B60': string;
10
- 'B70': string;
11
- 'B80': string;
12
- 'B90': string;
13
- 'B95': string;
14
- 'B98': string;
15
- 'BG0': string;
16
- 'BG10': string;
17
- 'BG100': string;
18
- 'BG20': string;
19
- 'BG30': string;
20
- 'BG40': string;
21
- 'BG50': string;
22
- 'BG60': string;
23
- 'BG70': string;
24
- 'BG80': string;
25
- 'BG90': string;
26
- 'BG95': string;
27
- 'BG97': string;
28
- 'BLACK': string;
29
- 'IMAGE_HOLDER': string;
30
- 'MATE': string;
31
- 'ND0': string;
32
- 'ND10': string;
33
- 'ND20': string;
34
- 'ND30': string;
35
- 'ND40': string;
36
- 'ND50': string;
37
- 'ND60': string;
38
- 'ND70': string;
39
- 'ND80': string;
40
- 'ND90': string;
41
- 'ND95': string;
42
- 'ND97': string;
43
- 'NL0': string;
44
- 'NL10': string;
45
- 'NL20': string;
46
- 'NL30': string;
47
- 'NL40': string;
48
- 'NL50': string;
49
- 'NL60': string;
50
- 'NL70': string;
51
- 'NL80': string;
52
- 'NL90': string;
53
- 'NL95': string;
54
- 'NL97': string;
55
- 'SA10': string;
56
- 'SA20': string;
57
- 'SA30': string;
58
- 'SA40': string;
59
- 'SA50': string;
60
- 'SA60': string;
61
- 'SA70': string;
62
- 'SA80': string;
63
- 'SA90': string;
64
- 'SA95': string;
65
- 'SA98': string;
66
- 'SB10': string;
67
- 'SB20': string;
68
- 'SB30': string;
69
- 'SB40': string;
70
- 'SB50': string;
71
- 'SB60': string;
72
- 'SB70': string;
73
- 'SB80': string;
74
- 'SB90': string;
75
- 'SB95': string;
76
- 'SB98': string;
77
- 'SC10': string;
78
- 'SC20': string;
79
- 'SC30': string;
80
- 'SC40': string;
81
- 'SC50': string;
82
- 'SC60': string;
83
- 'SC70': string;
84
- 'SC80': string;
85
- 'SC90': string;
86
- 'SC95': string;
87
- 'SC98': string;
88
- 'SHADOW_L': string;
89
- 'TableHeadRowHeight': string;
90
- 'WHITE': string;
91
- 'ald-empty': string;
92
- 'ald-empty-description': string;
93
- 'ald-empty-image': string;
94
- 'ald-empty-img': string;
95
- 'ald-empty-large': string;
96
- 'ald-empty-small': string;
97
- 'ald-empty-title': string;
98
- 'ald-table': string;
99
- 'ald-table-bar': string;
100
- 'ald-table-canNotInnerScroll': string;
101
- 'ald-table-cell': string;
102
- 'ald-table-cell-content': string;
103
- 'ald-table-column-resizable': string;
104
- 'ald-table-empty-icon': string;
105
- 'ald-table-header': string;
106
- 'ald-table-header-left': string;
107
- 'ald-table-header-right': string;
108
- 'ald-table-init-loading': string;
109
- 'ald-table-inner-wrap': string;
110
- 'ald-table-list': string;
111
- 'ald-table-loading': string;
112
- 'ald-table-loading-icon': string;
113
- 'ald-table-page-loading': string;
114
- 'ald-table-row': string;
115
- 'ald-table-row-ellipsis': string;
116
- 'ald-table-row-list-wrap': string;
117
- 'ald-table-row-selected': string;
118
- 'ald-table-sortIcon': string;
119
- 'ald-table-table-wrap': string;
120
- 'ald-table-tableHeadScrollWrap': string;
121
- 'ald-table-tbody': string;
122
- 'ald-table-tbody-innerScroll': string;
123
- 'ald-table-thead': string;
124
- }
125
- export const cssExports: CssExports;
126
- export default cssExports;