@aloudata/aloudata-design 0.1.0-beta.3 → 0.2.0-beta.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 (154) hide show
  1. package/README.md +7 -0
  2. package/es/Button/demo/Icon/index.js +0 -3
  3. package/es/Button/demo/basic/index.js +1 -4
  4. package/es/Dropdown/demo/button/index.js +1 -1
  5. package/es/Empty/index.d.ts +8 -0
  6. package/es/Empty/index.js +57 -0
  7. package/es/Empty/style/index.d.ts +1 -0
  8. package/es/Empty/style/index.js +1 -0
  9. package/es/Empty/style/index.less +23 -0
  10. package/es/Icon/iconfont/demo_index.html +26 -3
  11. package/es/Icon/iconfont/iconfont.css +7 -3
  12. package/es/Icon/iconfont/iconfont.js +1 -1
  13. package/es/Icon/iconfont/iconfont.json +7 -0
  14. package/es/Icon/iconfont/iconfont.ttf +0 -0
  15. package/es/Icon/iconfont/iconfont.woff +0 -0
  16. package/es/Icon/iconfont/iconfont.woff2 +0 -0
  17. package/es/Icon/index.less +2 -2
  18. package/es/Input/components/Group/index.d.ts +0 -1
  19. package/es/Input/components/Password/index.d.ts +0 -1
  20. package/es/Menu/Divider.d.ts +0 -1
  21. package/es/Menu/style/index.less +4 -0
  22. package/es/Navigator/components/Menu/index.d.ts +19 -0
  23. package/es/Navigator/components/Menu/index.js +187 -0
  24. package/es/Navigator/demo/basic/index.d.ts +4 -0
  25. package/es/Navigator/demo/basic/index.js +45 -0
  26. package/es/Navigator/demo/basic/index.less +3 -0
  27. package/es/Navigator/demo/example/index.d.ts +4 -0
  28. package/es/Navigator/demo/example/index.js +153 -0
  29. package/es/Navigator/demo/example/index.less +10 -0
  30. package/es/Navigator/demo/logo.png +0 -0
  31. package/es/Navigator/demo/menuWithFooter/index.d.ts +4 -0
  32. package/es/Navigator/demo/menuWithFooter/index.js +73 -0
  33. package/es/Navigator/demo/menuWithFooter/index.less +3 -0
  34. package/es/Navigator/demo/subMenu/index.d.ts +4 -0
  35. package/es/Navigator/demo/subMenu/index.js +71 -0
  36. package/es/Navigator/demo/subMenu/index.less +3 -0
  37. package/es/Navigator/index.d.ts +41 -0
  38. package/es/Navigator/index.js +45 -0
  39. package/es/Navigator/style/index.d.ts +2 -0
  40. package/es/Navigator/style/index.js +2 -0
  41. package/es/Navigator/style/index.less +224 -0
  42. package/es/Select/OptionsList/OptionItem/RenderTooltip.js +2 -3
  43. package/es/Select/OptionsList/Options.d.ts +2 -2
  44. package/es/Select/OptionsList/index.js +1 -1
  45. package/es/Select/Selector/index.d.ts +2 -2
  46. package/es/Select/Selector/index.js +9 -6
  47. package/es/Select/demo/single/index.d.ts +1 -0
  48. package/es/Select/demo/single/index.js +4 -1
  49. package/es/Select/demo/single/index.less +5 -0
  50. package/es/Select/interface.d.ts +1 -2
  51. package/es/Select/style/index.less +2 -10
  52. package/es/Table/demo/basic/createData.d.ts +9 -0
  53. package/es/Table/demo/basic/createData.js +18 -0
  54. package/es/Table/demo/basic/index.d.ts +2 -0
  55. package/es/Table/demo/basic/index.js +64 -0
  56. package/es/Table/demo/editCell/index.d.ts +2 -0
  57. package/es/Table/demo/editCell/index.js +39 -0
  58. package/es/Table/demo/renderHeaderRight/index.d.ts +2 -0
  59. package/es/Table/demo/renderHeaderRight/index.js +37 -0
  60. package/es/Table/demo/rowSelect/index.d.ts +2 -0
  61. package/es/Table/demo/rowSelect/index.js +40 -0
  62. package/es/Table/demo/virtualList/index.d.ts +2 -0
  63. package/es/Table/demo/virtualList/index.js +88 -0
  64. package/es/Table/index.d.ts +5 -0
  65. package/es/Table/index.js +201 -0
  66. package/es/Table/interface.d.ts +14 -0
  67. package/es/Table/interface.js +1 -0
  68. package/es/Table/style/index.d.ts +2 -0
  69. package/es/Table/style/index.js +2 -0
  70. package/es/Table/style/index.less +111 -0
  71. package/es/Tooltip/index.d.ts +1 -0
  72. package/es/Tooltip/index.js +3 -1
  73. package/es/index.d.ts +2 -0
  74. package/es/index.js +3 -1
  75. package/es/style/themes/default/index.less +1 -1
  76. package/es/style/themes/default/{themeColor.less → themeColor.module.less} +0 -0
  77. package/es/style/themes/default/themeColor.module.less.d.ts +108 -0
  78. package/lib/Button/demo/Icon/index.js +0 -3
  79. package/lib/Button/demo/basic/index.js +1 -4
  80. package/lib/Dropdown/demo/button/index.js +1 -1
  81. package/lib/Empty/index.d.ts +8 -0
  82. package/lib/Empty/index.js +71 -0
  83. package/lib/Empty/style/index.d.ts +1 -0
  84. package/lib/Empty/style/index.js +3 -0
  85. package/lib/Empty/style/index.less +23 -0
  86. package/lib/Icon/iconfont/demo_index.html +26 -3
  87. package/lib/Icon/iconfont/iconfont.css +7 -3
  88. package/lib/Icon/iconfont/iconfont.js +1 -1
  89. package/lib/Icon/iconfont/iconfont.json +7 -0
  90. package/lib/Icon/iconfont/iconfont.ttf +0 -0
  91. package/lib/Icon/iconfont/iconfont.woff +0 -0
  92. package/lib/Icon/iconfont/iconfont.woff2 +0 -0
  93. package/lib/Icon/index.less +2 -2
  94. package/lib/Input/components/Group/index.d.ts +0 -1
  95. package/lib/Input/components/Password/index.d.ts +0 -1
  96. package/lib/Menu/Divider.d.ts +0 -1
  97. package/lib/Menu/style/index.less +4 -0
  98. package/lib/Navigator/components/Menu/index.d.ts +19 -0
  99. package/lib/Navigator/components/Menu/index.js +205 -0
  100. package/lib/Navigator/demo/basic/index.d.ts +4 -0
  101. package/lib/Navigator/demo/basic/index.js +62 -0
  102. package/lib/Navigator/demo/basic/index.less +3 -0
  103. package/lib/Navigator/demo/example/index.d.ts +4 -0
  104. package/lib/Navigator/demo/example/index.js +179 -0
  105. package/lib/Navigator/demo/example/index.less +10 -0
  106. package/lib/Navigator/demo/logo.png +0 -0
  107. package/lib/Navigator/demo/menuWithFooter/index.d.ts +4 -0
  108. package/lib/Navigator/demo/menuWithFooter/index.js +92 -0
  109. package/lib/Navigator/demo/menuWithFooter/index.less +3 -0
  110. package/lib/Navigator/demo/subMenu/index.d.ts +4 -0
  111. package/lib/Navigator/demo/subMenu/index.js +88 -0
  112. package/lib/Navigator/demo/subMenu/index.less +3 -0
  113. package/lib/Navigator/index.d.ts +41 -0
  114. package/lib/Navigator/index.js +64 -0
  115. package/lib/Navigator/style/index.d.ts +2 -0
  116. package/lib/Navigator/style/index.js +5 -0
  117. package/lib/Navigator/style/index.less +224 -0
  118. package/lib/Select/OptionsList/OptionItem/RenderTooltip.js +3 -5
  119. package/lib/Select/OptionsList/Options.d.ts +2 -2
  120. package/lib/Select/OptionsList/index.js +1 -1
  121. package/lib/Select/Selector/index.d.ts +2 -2
  122. package/lib/Select/Selector/index.js +11 -8
  123. package/lib/Select/demo/single/index.d.ts +1 -0
  124. package/lib/Select/demo/single/index.js +5 -1
  125. package/lib/Select/demo/single/index.less +5 -0
  126. package/lib/Select/interface.d.ts +1 -2
  127. package/lib/Select/style/index.less +2 -10
  128. package/lib/Table/demo/basic/createData.d.ts +9 -0
  129. package/lib/Table/demo/basic/createData.js +23 -0
  130. package/lib/Table/demo/basic/index.d.ts +2 -0
  131. package/lib/Table/demo/basic/index.js +80 -0
  132. package/lib/Table/demo/editCell/index.d.ts +2 -0
  133. package/lib/Table/demo/editCell/index.js +54 -0
  134. package/lib/Table/demo/renderHeaderRight/index.d.ts +2 -0
  135. package/lib/Table/demo/renderHeaderRight/index.js +52 -0
  136. package/lib/Table/demo/rowSelect/index.d.ts +2 -0
  137. package/lib/Table/demo/rowSelect/index.js +55 -0
  138. package/lib/Table/demo/virtualList/index.d.ts +2 -0
  139. package/lib/Table/demo/virtualList/index.js +103 -0
  140. package/lib/Table/index.d.ts +5 -0
  141. package/lib/Table/index.js +225 -0
  142. package/lib/Table/interface.d.ts +14 -0
  143. package/lib/Table/interface.js +5 -0
  144. package/lib/Table/style/index.d.ts +2 -0
  145. package/lib/Table/style/index.js +5 -0
  146. package/lib/Table/style/index.less +111 -0
  147. package/lib/Tooltip/index.d.ts +1 -0
  148. package/lib/Tooltip/index.js +3 -1
  149. package/lib/index.d.ts +2 -0
  150. package/lib/index.js +16 -0
  151. package/lib/style/themes/default/index.less +1 -1
  152. package/lib/style/themes/default/{themeColor.less → themeColor.module.less} +0 -0
  153. package/lib/style/themes/default/themeColor.module.less.d.ts +108 -0
  154. package/package.json +13 -5
@@ -0,0 +1,224 @@
1
+ @import '../../style/index.less';
2
+ @import '../../Icon/index.less';
3
+
4
+ /* stylelint-disable */
5
+
6
+ @ald-prefix:ant;
7
+
8
+ .supTitle() {
9
+ font-family: 'PingFang SC';
10
+ font-style: normal;
11
+ font-weight: 500;
12
+ font-size: 14px;
13
+ line-height: 20px;
14
+ }
15
+
16
+ .subTitle() {
17
+ font-family: 'PingFang SC';
18
+ font-style: normal;
19
+ font-weight: 400;
20
+ font-size: 12px;
21
+ line-height: 16px;
22
+ }
23
+
24
+ .ald-nav {
25
+ width: 216px;
26
+ background-color: @BBG15;
27
+ height: 100%;
28
+ display: flex;
29
+ flex-direction: column;
30
+ overflow: hidden;
31
+ user-select: none;
32
+
33
+ &-logo {
34
+ height: 72px;
35
+ padding: 24px;
36
+ width: 100%;
37
+
38
+ &-able-click {
39
+ cursor: pointer;
40
+ }
41
+ }
42
+
43
+ &-menu-icon-right.anticon {
44
+ color: @ND60;
45
+ }
46
+
47
+ &-menu {
48
+ flex: 1;
49
+ overflow-y: auto;
50
+ overflow-x: hidden;
51
+
52
+ .ant-menu-sub.ant-menu-inline {
53
+ background-color: unset;
54
+ }
55
+
56
+ .anticon.ant-menu-item-icon {
57
+ font-size: 20px !important;
58
+ width: 20px !important;
59
+ height: 20px !important;
60
+ }
61
+
62
+ &::-webkit-scrollbar-thumb {
63
+ border-radius: 6px;
64
+ background: @ND90;
65
+ border: 3px solid transparent;
66
+ background-clip: padding-box;
67
+ }
68
+
69
+ &::-webkit-scrollbar {
70
+ background-color: transparent;
71
+ width: 12px;
72
+ height: 12px;
73
+ }
74
+
75
+ .ant-menu-inline,
76
+ .ant-menu-vertical,
77
+ .ant-menu-vertical-left {
78
+ border-right: unset;
79
+ }
80
+
81
+ .ant-menu {
82
+ background: @BBG15;
83
+ color: @ND0;
84
+
85
+ &.ant-menu-root {
86
+
87
+ .ant-menu-item {
88
+ margin-bottom: 16px;
89
+ padding: 0 12px !important;
90
+ }
91
+
92
+ li:nth-last-child(1) {
93
+ margin-bottom: 0;
94
+ }
95
+ }
96
+
97
+ &.ant-menu-sub {
98
+ .ant-menu-item {
99
+ margin-top: 4px;
100
+ margin-bottom: 0;
101
+ padding: 0 12px 0 44px!important;
102
+ }
103
+ }
104
+
105
+ // 只有子级菜单相关颜色操作
106
+ .ant-menu-item-only-child {
107
+ color: @ND30;
108
+ height: 32px !important;
109
+ line-height: 32px !important;
110
+ font-size: 12px !important;
111
+ .subTitle();
112
+
113
+ &:hover {
114
+ color: @ND30 !important;
115
+ }
116
+
117
+ &.ant-menu-item-selected {
118
+ font-weight: 500;
119
+
120
+ &:hover {
121
+ color: @ND0 !important;
122
+ }
123
+ }
124
+ }
125
+
126
+ .ant-menu-item {
127
+ height: 40px;
128
+ width: 100%;
129
+ border-radius: 8px;
130
+ .supTitle();
131
+
132
+ &-selected {
133
+ background-color: @BBG20 !important;
134
+ color: @ND0;
135
+ position: relative;
136
+ overflow: unset;
137
+
138
+ ::before {
139
+ width: 4px;
140
+ content: '';
141
+ background: @B40;
142
+ height: 100%;
143
+ position: absolute;
144
+ top: 0;
145
+ left: -12px;
146
+ border-radius: 1px;
147
+ }
148
+ }
149
+
150
+ &::after {
151
+ display: none !important;
152
+ }
153
+ }
154
+
155
+ .ant-menu-submenu {
156
+ margin-bottom: 16px;
157
+
158
+ .ant-menu-submenu-title {
159
+ padding: 0 12px !important;
160
+ height: 40px;
161
+ line-height: 40px;
162
+ .supTitle();
163
+
164
+ &:hover {
165
+ color: @ND0;
166
+ }
167
+ }
168
+
169
+ &-selected {
170
+ color: @ND0;
171
+ }
172
+
173
+ &-active {
174
+ color: @ND0;
175
+ }
176
+ }
177
+
178
+ // 修改icon和文字的margin
179
+ .ant-menu-item .ant-menu-item-icon + span,
180
+ .ant-menu-submenu-title .ant-menu-item-icon + span,
181
+ .ant-menu-item .anticon + span,
182
+ .ant-menu-submenu-title .anticon + span {
183
+ margin-left: 12px;
184
+ }
185
+
186
+ // 取消item点击时的高亮背景色
187
+ .ant-menu-item:active,
188
+ .ant-menu-submenu-title:active {
189
+ background: unset;
190
+ }
191
+
192
+ .ant-menu-inline .ant-menu-item,
193
+ .ant-menu-inline .ant-menu-submenu-title {
194
+ width: 100% !important;
195
+ }
196
+
197
+ // 删除右侧的高亮
198
+ .ant-menu-vertical .ant-menu-item::after,
199
+ .ant-menu-vertical-left .ant-menu-item::after,
200
+ .ant-menu-vertical-right .ant-menu-item::after,
201
+ .ant-menu-inline .ant-menu-item::after {
202
+ display: none;
203
+ }
204
+ }
205
+
206
+ .ant-menu-light .ant-menu-item:hover,
207
+ .ant-menu-light .ant-menu-item-active,
208
+ .ant-menu-light .ant-menu:not(.ant-menu-inline) .ant-menu-submenu-open,
209
+ .ant-menu-light .ant-menu-submenu-active,
210
+ .ant-menu-light .ant-menu-submenu-title:hover {
211
+ color: unset;
212
+ }
213
+ }
214
+
215
+ &-footer {
216
+ height: 56px;
217
+
218
+ &-wrap {
219
+ border: 1px solid @ND0;
220
+ color: @ND0;
221
+ height: 100%;
222
+ }
223
+ }
224
+ }
@@ -1,6 +1,5 @@
1
- import "antd/es/tooltip/style";
2
- import _Tooltip from "antd/es/tooltip";
3
1
  import React from 'react';
2
+ import Tooltip from '../../../Tooltip';
4
3
 
5
4
  var RenderTooltip = function RenderTooltip(props, ref) {
6
5
  var tooltip = props.tooltip,
@@ -10,7 +9,7 @@ var RenderTooltip = function RenderTooltip(props, ref) {
10
9
  if (tooltip) {
11
10
  return /*#__PURE__*/React.createElement("div", {
12
11
  ref: ref
13
- }, /*#__PURE__*/React.createElement(_Tooltip, {
12
+ }, /*#__PURE__*/React.createElement(Tooltip, {
14
13
  title: tooltip,
15
14
  destroyTooltipOnHide: true,
16
15
  placement: "right",
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { IOptionProps } from '../interface';
3
- export interface IOptionFC extends React.FC<IOptionProps> {
2
+ import { IOption } from '../interface';
3
+ export interface IOptionFC extends React.FC<IOption> {
4
4
  isSelectOption: boolean;
5
5
  }
6
6
  declare const Option: IOptionFC;
@@ -156,7 +156,7 @@ var OptionsList = function OptionsList(props, ref) {
156
156
  return setActiveIndex(DEFAULT_ACTIVE_INDEX);
157
157
  }
158
158
  }, multiple && renderAllOptions(), data.length > ZERO_LENGTH ? /*#__PURE__*/React.createElement(VirtualList, _objectSpread({
159
- itemKey: "key",
159
+ itemKey: "value",
160
160
  prefixCls: prefixCls,
161
161
  ref: VirtualListRef,
162
162
  data: data,
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { ISelectorProps as SelectorProps } from '../interface';
3
- declare const ForwardSelector: React.ForwardRefExoticComponent<SelectorProps & React.RefAttributes<unknown>>;
2
+ import { ISelectorProps } from '../interface';
3
+ declare const ForwardSelector: React.ForwardRefExoticComponent<ISelectorProps & React.RefAttributes<unknown>>;
4
4
  export default ForwardSelector;
@@ -1,5 +1,3 @@
1
- import "antd/es/tooltip/style";
2
- import _Tooltip from "antd/es/tooltip";
3
1
  var _excluded = ["input", "disabled", "prefix", "size", "multiple", "bordered", "isFocused", "className", "visible", "style", "allowClear", "label", "mode", "value", "searchType", "arrowComponent", "closeComponent", "placeholder", "deleteValue", "optionLabelRenderer", "getOptionByValue", "onInputChange", "onAllowClear", "filteredOptions"];
4
2
 
5
3
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -36,7 +34,9 @@ import Icon from '../../Icon';
36
34
  import classnames from 'classnames';
37
35
  import { isEmpty, isNil } from 'lodash';
38
36
  import React, { useRef, useState, useImperativeHandle, useMemo } from 'react';
37
+ import Tooltip from '../../Tooltip';
39
38
  import OverFLow from 'rc-overflow';
39
+ import color from '../../style/themes/default/themeColor.module.less';
40
40
  var ZERO = 0;
41
41
  var ICON_LARGE_SIZE = 20;
42
42
  var ICON_SMALL_SIZE = 16;
@@ -45,7 +45,8 @@ var defaultArrowComponent = function defaultArrowComponent(prefix, size) {
45
45
  return /*#__PURE__*/React.createElement(Icon, {
46
46
  className: "".concat(prefix, "-icon-arrow"),
47
47
  size: size === 'large' ? ICON_LARGE_SIZE : ICON_SMALL_SIZE,
48
- type: "expand_more1"
48
+ type: "expand_more1",
49
+ color: color.NL40
49
50
  });
50
51
  };
51
52
 
@@ -53,7 +54,8 @@ var defaultCloseComponent = function defaultCloseComponent(prefix, size) {
53
54
  return /*#__PURE__*/React.createElement(Icon, {
54
55
  className: "".concat(prefix, "-icon-close"),
55
56
  size: size === 'large' ? ICON_LARGE_SIZE : ICON_SMALL_SIZE,
56
- type: "cancel"
57
+ type: "cancel",
58
+ color: color.NL40
57
59
  });
58
60
  };
59
61
 
@@ -183,10 +185,11 @@ var Selector = function Selector(props, ref) {
183
185
  return /*#__PURE__*/React.createElement("span", null, "\u7B49", valueItems.length, "\u9879");
184
186
  };
185
187
 
186
- return !input && !isNil(value) ? /*#__PURE__*/React.createElement(_Tooltip, {
188
+ return !input && !isNil(value) ? /*#__PURE__*/React.createElement(Tooltip // @ts-ignore
189
+ , {
187
190
  // @ts-ignore
188
191
  title: allValueLabel === null || allValueLabel === void 0 ? void 0 : allValueLabel.join(','),
189
- placement: "bottom",
192
+ placement: "top",
190
193
  getTooltipContainer: function getTooltipContainer() {
191
194
  var _selectorRef$current4;
192
195
 
@@ -1,2 +1,3 @@
1
+ import './index.less';
1
2
  declare const _default: () => JSX.Element;
2
3
  export default _default;
@@ -13,6 +13,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  import React from "react"; // import { Select } from '@aloudata/aloudata-design';
14
14
 
15
15
  import Select from '../../index';
16
+ import './index.less';
16
17
  var Option = Select.Option;
17
18
  export default (function () {
18
19
  var _React$useState = React.useState(''),
@@ -55,7 +56,9 @@ export default (function () {
55
56
  value: "f"
56
57
  }, "f"), /*#__PURE__*/React.createElement(Option, {
57
58
  key: "g",
58
- value: "g"
59
+ title: "gg",
60
+ value: "g",
61
+ tooltip: "a"
59
62
  }, "g")), /*#__PURE__*/React.createElement(Select, {
60
63
  className: 'ald-select',
61
64
  style: {
@@ -0,0 +1,5 @@
1
+ .ald-select-demo {
2
+ .ald-select {
3
+ margin: 0 24px 16px 0;
4
+ }
5
+ }
@@ -8,7 +8,7 @@ export interface IOption {
8
8
  /**
9
9
  列表单项主要文字
10
10
  */
11
- label: string | React.ReactNode;
11
+ label?: string | React.ReactNode;
12
12
  /**
13
13
  作为列表的 `key` 来使用
14
14
  */
@@ -16,7 +16,6 @@ export interface IOption {
16
16
  /**
17
17
  列表次要文字
18
18
  */
19
- description?: string;
20
19
  /**
21
20
  是否禁用
22
21
  */
@@ -130,7 +130,8 @@
130
130
  // box-shadow: 0 0 6px 0 @color-box-shadow-focused;
131
131
 
132
132
  .@{select-prefix-cls-legacy} {
133
- &-item-all {
133
+ &-item-all,
134
+ &-item {
134
135
  opacity: 0.5;
135
136
  }
136
137
  }
@@ -352,15 +353,6 @@
352
353
  }
353
354
  }
354
355
 
355
- &-single,
356
- &-focused {
357
- .@{select-prefix-cls-legacy} {
358
- &-item {
359
- opacity: 0.5;
360
- }
361
- }
362
- }
363
-
364
356
  // rc-trigger
365
357
  &-dropdown {
366
358
  position: absolute;
@@ -0,0 +1,9 @@
1
+ declare function makeData(length: number): {
2
+ firstName: string;
3
+ lastName: string;
4
+ age: number;
5
+ visits: number;
6
+ progress: number;
7
+ status: string;
8
+ }[];
9
+ export { makeData };
@@ -0,0 +1,18 @@
1
+ function makeData(length) {
2
+ var data = [];
3
+
4
+ for (var i = 0; i < length; i++) {
5
+ data.push({
6
+ firstName: 'supermarket',
7
+ lastName: 'charity',
8
+ age: i + 1,
9
+ visits: 47,
10
+ progress: 41,
11
+ status: 'relationship'
12
+ });
13
+ }
14
+
15
+ return data;
16
+ }
17
+
18
+ export { makeData };
@@ -0,0 +1,2 @@
1
+ declare const _default: () => JSX.Element;
2
+ export default _default;
@@ -0,0 +1,64 @@
1
+ import "antd/es/radio/style";
2
+ import _Radio from "antd/es/radio";
3
+
4
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
5
+
6
+ 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."); }
7
+
8
+ 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); }
9
+
10
+ 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; }
11
+
12
+ 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; }
13
+
14
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
15
+
16
+ import React from 'react';
17
+ import { Table } from '@aloudata/aloudata-design';
18
+ import { makeData } from './createData';
19
+ // import Table from '../../Example'
20
+ var columns = [{
21
+ Header: 'First Name',
22
+ accessor: 'firstName',
23
+ width: 150
24
+ }, {
25
+ Header: 'Last Name',
26
+ accessor: 'lastName'
27
+ }, {
28
+ Header: 'Age',
29
+ accessor: 'age'
30
+ }, {
31
+ Header: 'Visits',
32
+ accessor: 'visits'
33
+ }, {
34
+ Header: 'Status',
35
+ accessor: 'status'
36
+ }, {
37
+ Header: 'Profile Progress',
38
+ accessor: 'progress'
39
+ }];
40
+ export default (function () {
41
+ var _React$useState = React.useState(0),
42
+ _React$useState2 = _slicedToArray(_React$useState, 2),
43
+ scrollY = _React$useState2[0],
44
+ setScrollY = _React$useState2[1];
45
+
46
+ var handleChange = function handleChange(e) {
47
+ setScrollY(e.target.value);
48
+ };
49
+
50
+ return /*#__PURE__*/React.createElement("div", {
51
+ className: "ald-table-demo"
52
+ }, /*#__PURE__*/React.createElement(_Radio.Group, {
53
+ value: scrollY,
54
+ onChange: handleChange
55
+ }, /*#__PURE__*/React.createElement(_Radio.Button, {
56
+ value: 0
57
+ }, "\u65E0\u6EDA\u52A8"), /*#__PURE__*/React.createElement(_Radio.Button, {
58
+ value: 200
59
+ }, "\u5185\u90E8\u6EDA\u52A8")), /*#__PURE__*/React.createElement(Table, {
60
+ columns: columns,
61
+ scrollY: scrollY,
62
+ data: makeData(10)
63
+ }));
64
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: () => JSX.Element;
2
+ export default _default;
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ import { Table } from '@aloudata/aloudata-design';
3
+ import { makeData } from '../basic/createData'; // import Table from '../../Example'
4
+
5
+ var columns = [{
6
+ Header: 'First Name',
7
+ accessor: 'firstName',
8
+ width: 150
9
+ }, {
10
+ Header: 'Last Name',
11
+ accessor: 'lastName'
12
+ }, {
13
+ Header: 'Age',
14
+ accessor: 'age'
15
+ }, {
16
+ Header: 'Visits',
17
+ accessor: 'visits'
18
+ }, {
19
+ Header: 'Status',
20
+ accessor: 'status'
21
+ }, {
22
+ Header: 'Profile Progress',
23
+ accessor: 'progress',
24
+ Cell: function Cell(row) {
25
+ return /*#__PURE__*/React.createElement("div", {
26
+ style: {
27
+ color: 'red'
28
+ }
29
+ }, "\u8FDB\u5EA6\uFF1A", row.progress);
30
+ }
31
+ }];
32
+ export default (function () {
33
+ return /*#__PURE__*/React.createElement("div", {
34
+ className: "ald-table-demo"
35
+ }, /*#__PURE__*/React.createElement(Table, {
36
+ columns: columns,
37
+ data: makeData(10)
38
+ }));
39
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: () => JSX.Element;
2
+ export default _default;
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import { Table, Input } from '@aloudata/aloudata-design';
3
+ import { makeData } from '../basic/createData'; // import Table from '../../Example'
4
+
5
+ var columns = [{
6
+ Header: 'First Name',
7
+ accessor: 'firstName',
8
+ width: 150
9
+ }, {
10
+ Header: 'Last Name',
11
+ accessor: 'lastName'
12
+ }, {
13
+ Header: 'Age',
14
+ accessor: 'age'
15
+ }, {
16
+ Header: 'Visits',
17
+ accessor: 'visits'
18
+ }, {
19
+ Header: 'Status',
20
+ accessor: 'status'
21
+ }, {
22
+ Header: 'Profile Progress',
23
+ accessor: 'progress'
24
+ }];
25
+ export default (function () {
26
+ return /*#__PURE__*/React.createElement("div", {
27
+ className: "ald-table-demo"
28
+ }, /*#__PURE__*/React.createElement(Table, {
29
+ columns: columns,
30
+ data: makeData(10),
31
+ renderHeaderRight: function renderHeaderRight() {
32
+ return /*#__PURE__*/React.createElement(Input, {
33
+ placeholder: "\u8BF7\u8F93\u5165"
34
+ });
35
+ }
36
+ }));
37
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: () => JSX.Element;
2
+ export default _default;
@@ -0,0 +1,40 @@
1
+ import React from 'react';
2
+ import { Table, Input } from '@aloudata/aloudata-design';
3
+ import { makeData } from '../basic/createData'; // import Table from '../../Example'
4
+
5
+ var columns = [{
6
+ Header: 'First Name',
7
+ accessor: 'firstName',
8
+ width: 150
9
+ }, {
10
+ Header: 'Last Name',
11
+ accessor: 'lastName'
12
+ }, {
13
+ Header: 'Age',
14
+ accessor: 'age'
15
+ }, {
16
+ Header: 'Visits',
17
+ accessor: 'visits'
18
+ }, {
19
+ Header: 'Status',
20
+ accessor: 'status'
21
+ }, {
22
+ Header: 'Profile Progress',
23
+ accessor: 'progress'
24
+ }];
25
+ export default (function () {
26
+ return /*#__PURE__*/React.createElement("div", {
27
+ className: "ald-table-demo"
28
+ }, /*#__PURE__*/React.createElement(Table, {
29
+ columns: columns,
30
+ onRowSelected: function onRowSelected(record) {
31
+ console.log(record);
32
+ },
33
+ data: makeData(10),
34
+ renderHeaderRight: function renderHeaderRight() {
35
+ return /*#__PURE__*/React.createElement(Input, {
36
+ placeholder: "\u8BF7\u8F93\u5165"
37
+ });
38
+ }
39
+ }));
40
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: () => JSX.Element;
2
+ export default _default;