@alifd/chat 0.3.40-beta.0 → 0.3.40-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.
Files changed (241) hide show
  1. package/es/ai-loading/types.d.ts +1 -0
  2. package/es/button/button.d.ts +1 -2
  3. package/es/button/button.js +13 -19
  4. package/es/button/group.js +5 -42
  5. package/es/button/main.scss +36 -77
  6. package/es/card/main.scss +1 -1
  7. package/es/checkbox-group/main.scss +6 -7
  8. package/es/checkbox-group/types.d.ts +6 -0
  9. package/es/code-view/index.d.ts +11 -0
  10. package/es/code-view/index.js +63 -0
  11. package/es/code-view/main.scss +54 -0
  12. package/es/code-view/style.d.ts +4 -0
  13. package/es/code-view/style.js +4 -0
  14. package/es/code-view/types.d.ts +27 -0
  15. package/es/code-view/types.js +1 -0
  16. package/es/collapse/index.d.ts +157 -0
  17. package/es/collapse/index.js +20 -0
  18. package/es/collapse/main.scss +97 -0
  19. package/es/collapse/style.d.ts +2 -0
  20. package/es/collapse/style.js +2 -0
  21. package/es/collapse/types.d.ts +82 -0
  22. package/es/collapse/types.js +2 -0
  23. package/es/core/variables.scss +27 -12
  24. package/es/date-picker/DatePicker.d.ts +5 -0
  25. package/es/date-picker/DatePicker.js +15 -0
  26. package/es/date-picker/MonthPicker.d.ts +4 -0
  27. package/es/date-picker/MonthPicker.js +15 -0
  28. package/es/date-picker/RangePicker.d.ts +4 -0
  29. package/es/date-picker/RangePicker.js +17 -0
  30. package/es/date-picker/YearPicker.d.ts +4 -0
  31. package/es/date-picker/YearPicker.js +15 -0
  32. package/es/date-picker/index.d.ts +5 -23
  33. package/es/date-picker/index.js +11 -29
  34. package/es/date-picker/main.scss +23 -1
  35. package/es/date-picker/style.d.ts +1 -0
  36. package/es/date-picker/style.js +1 -0
  37. package/es/date-picker/types.d.ts +161 -81
  38. package/es/float-button/hooks/useAutoAlign.d.ts +1 -1
  39. package/es/form/style.d.ts +0 -1
  40. package/es/form/style.js +2 -1
  41. package/es/form/types.d.ts +3 -517
  42. package/es/form/types.js +5 -1
  43. package/es/html-render/index.d.ts +1 -1
  44. package/es/html-render/index.js +118 -106
  45. package/es/html-render/main.scss +27 -8
  46. package/es/html-render/style.d.ts +1 -0
  47. package/es/html-render/style.js +1 -0
  48. package/es/icon/index.d.ts +1 -1
  49. package/es/index.d.ts +3 -0
  50. package/es/index.js +4 -1
  51. package/es/input/index.d.ts +1 -1
  52. package/es/input/index.js +16 -6
  53. package/es/input/main.scss +25 -0
  54. package/es/input/style.d.ts +1 -0
  55. package/es/input/style.js +1 -0
  56. package/es/input/types.d.ts +58 -15
  57. package/es/markdown/index.d.ts +1 -2
  58. package/es/markdown/index.js +26 -15
  59. package/es/markdown/main.scss +4 -3
  60. package/es/markdown/style.d.ts +2 -1
  61. package/es/markdown/style.js +2 -1
  62. package/es/markdown/types.d.ts +20 -9
  63. package/es/message/index.d.ts +4 -4
  64. package/es/person-picker/index.d.ts +3 -190
  65. package/es/person-picker/index.js +23 -21
  66. package/es/person-picker/main.scss +15 -1
  67. package/es/person-picker/types.d.ts +53 -11
  68. package/es/radio-group/index.d.ts +1 -1
  69. package/es/radio-group/index.js +9 -3
  70. package/es/radio-group/main.scss +13 -5
  71. package/es/radio-group/types.d.ts +5 -3
  72. package/es/reference/index.d.ts +1 -1
  73. package/es/reference/index.js +14 -15
  74. package/es/reference/main.scss +1 -1
  75. package/es/reference/types.d.ts +1 -0
  76. package/es/select/button.d.ts +3 -0
  77. package/es/select/button.js +70 -0
  78. package/es/select/index.d.ts +79 -79
  79. package/es/select/index.js +13 -57
  80. package/es/select/main.scss +22 -4
  81. package/es/select/types.d.ts +108 -1
  82. package/es/step/index.js +2 -2
  83. package/es/step/main.scss +115 -66
  84. package/es/step/types.d.ts +13 -2
  85. package/es/table/index.d.ts +12 -0
  86. package/es/table/index.js +23 -0
  87. package/es/table/main.scss +30 -0
  88. package/es/table/style.d.ts +2 -0
  89. package/es/table/style.js +2 -0
  90. package/es/table/types.d.ts +98 -0
  91. package/es/table/types.js +1 -0
  92. package/es/tag/index.d.ts +5 -3
  93. package/es/tag/index.js +18 -2
  94. package/es/tag/main.scss +20 -4
  95. package/es/tag/types.d.ts +55 -0
  96. package/es/text/index.js +1 -1
  97. package/es/text/main.scss +4 -1
  98. package/es/text/types.d.ts +8 -0
  99. package/es/time-picker/index.d.ts +6 -15
  100. package/es/time-picker/index.js +71 -24
  101. package/es/time-picker/main.scss +19 -1
  102. package/es/time-picker/style.d.ts +1 -0
  103. package/es/time-picker/style.js +1 -0
  104. package/es/time-picker/types.d.ts +133 -8
  105. package/es/tool-status/index.d.ts +1 -1
  106. package/es/tool-status/index.js +1 -1
  107. package/es/tool-status/main.scss +2 -1
  108. package/es/tool-status/types.d.ts +7 -2
  109. package/es/utils/func.d.ts +1 -0
  110. package/es/utils/func.js +13 -0
  111. package/es/utils/github-dark.scss +137 -0
  112. package/es/utils/github.scss +137 -0
  113. package/es/utils/hoc/main.scss +166 -0
  114. package/es/utils/hoc/withLabel.d.ts +94 -0
  115. package/es/utils/hoc/withLabel.js +57 -0
  116. package/es/utils/index.d.ts +1 -0
  117. package/es/utils/index.js +1 -0
  118. package/lib/ai-loading/types.d.ts +1 -0
  119. package/lib/button/button.d.ts +1 -2
  120. package/lib/button/button.js +13 -19
  121. package/lib/button/group.js +4 -41
  122. package/lib/button/main.scss +36 -77
  123. package/lib/card/main.scss +1 -1
  124. package/lib/checkbox-group/main.scss +6 -7
  125. package/lib/checkbox-group/types.d.ts +6 -0
  126. package/lib/code-view/index.d.ts +11 -0
  127. package/lib/code-view/index.js +66 -0
  128. package/lib/code-view/main.scss +54 -0
  129. package/lib/code-view/style.d.ts +4 -0
  130. package/lib/code-view/style.js +6 -0
  131. package/lib/code-view/types.d.ts +27 -0
  132. package/lib/code-view/types.js +2 -0
  133. package/lib/collapse/index.d.ts +157 -0
  134. package/lib/collapse/index.js +22 -0
  135. package/lib/collapse/main.scss +97 -0
  136. package/lib/collapse/style.d.ts +2 -0
  137. package/lib/collapse/style.js +4 -0
  138. package/lib/collapse/types.d.ts +82 -0
  139. package/lib/collapse/types.js +3 -0
  140. package/lib/core/variables.scss +27 -12
  141. package/lib/date-picker/DatePicker.d.ts +5 -0
  142. package/lib/date-picker/DatePicker.js +17 -0
  143. package/lib/date-picker/MonthPicker.d.ts +4 -0
  144. package/lib/date-picker/MonthPicker.js +17 -0
  145. package/lib/date-picker/RangePicker.d.ts +4 -0
  146. package/lib/date-picker/RangePicker.js +19 -0
  147. package/lib/date-picker/YearPicker.d.ts +4 -0
  148. package/lib/date-picker/YearPicker.js +17 -0
  149. package/lib/date-picker/index.d.ts +5 -23
  150. package/lib/date-picker/index.js +10 -27
  151. package/lib/date-picker/main.scss +23 -1
  152. package/lib/date-picker/style.d.ts +1 -0
  153. package/lib/date-picker/style.js +1 -0
  154. package/lib/date-picker/types.d.ts +161 -81
  155. package/lib/float-button/hooks/useAutoAlign.d.ts +1 -1
  156. package/lib/form/style.d.ts +0 -1
  157. package/lib/form/style.js +1 -2
  158. package/lib/form/types.d.ts +3 -517
  159. package/lib/form/types.js +4 -1
  160. package/lib/html-render/index.d.ts +1 -1
  161. package/lib/html-render/index.js +118 -106
  162. package/lib/html-render/main.scss +27 -8
  163. package/lib/html-render/style.d.ts +1 -0
  164. package/lib/html-render/style.js +1 -0
  165. package/lib/icon/index.d.ts +1 -1
  166. package/lib/index.d.ts +3 -0
  167. package/lib/index.js +8 -2
  168. package/lib/input/index.d.ts +1 -1
  169. package/lib/input/index.js +16 -6
  170. package/lib/input/main.scss +25 -0
  171. package/lib/input/style.d.ts +1 -0
  172. package/lib/input/style.js +1 -0
  173. package/lib/input/types.d.ts +58 -15
  174. package/lib/markdown/index.d.ts +1 -2
  175. package/lib/markdown/index.js +26 -15
  176. package/lib/markdown/main.scss +4 -3
  177. package/lib/markdown/style.d.ts +2 -1
  178. package/lib/markdown/style.js +2 -1
  179. package/lib/markdown/types.d.ts +20 -9
  180. package/lib/message/index.d.ts +4 -4
  181. package/lib/person-picker/index.d.ts +3 -190
  182. package/lib/person-picker/index.js +22 -20
  183. package/lib/person-picker/main.scss +15 -1
  184. package/lib/person-picker/types.d.ts +53 -11
  185. package/lib/radio-group/index.d.ts +1 -1
  186. package/lib/radio-group/index.js +8 -2
  187. package/lib/radio-group/main.scss +13 -5
  188. package/lib/radio-group/types.d.ts +5 -3
  189. package/lib/reference/index.d.ts +1 -1
  190. package/lib/reference/index.js +17 -18
  191. package/lib/reference/main.scss +1 -1
  192. package/lib/reference/types.d.ts +1 -0
  193. package/lib/select/button.d.ts +3 -0
  194. package/lib/select/button.js +74 -0
  195. package/lib/select/index.d.ts +79 -79
  196. package/lib/select/index.js +11 -55
  197. package/lib/select/main.scss +22 -4
  198. package/lib/select/types.d.ts +108 -1
  199. package/lib/step/index.js +2 -2
  200. package/lib/step/main.scss +115 -66
  201. package/lib/step/types.d.ts +13 -2
  202. package/lib/table/index.d.ts +12 -0
  203. package/lib/table/index.js +25 -0
  204. package/lib/table/main.scss +30 -0
  205. package/lib/table/style.d.ts +2 -0
  206. package/lib/table/style.js +4 -0
  207. package/lib/table/types.d.ts +98 -0
  208. package/lib/table/types.js +2 -0
  209. package/lib/tag/index.d.ts +5 -3
  210. package/lib/tag/index.js +17 -1
  211. package/lib/tag/main.scss +20 -4
  212. package/lib/tag/types.d.ts +55 -0
  213. package/lib/text/index.js +1 -1
  214. package/lib/text/main.scss +4 -1
  215. package/lib/text/types.d.ts +8 -0
  216. package/lib/time-picker/index.d.ts +6 -15
  217. package/lib/time-picker/index.js +71 -23
  218. package/lib/time-picker/main.scss +19 -1
  219. package/lib/time-picker/style.d.ts +1 -0
  220. package/lib/time-picker/style.js +1 -0
  221. package/lib/time-picker/types.d.ts +133 -8
  222. package/lib/tool-status/index.d.ts +1 -1
  223. package/lib/tool-status/index.js +1 -1
  224. package/lib/tool-status/main.scss +2 -1
  225. package/lib/tool-status/types.d.ts +7 -2
  226. package/lib/utils/func.d.ts +1 -0
  227. package/lib/utils/func.js +15 -0
  228. package/lib/utils/github-dark.scss +137 -0
  229. package/lib/utils/github.scss +137 -0
  230. package/lib/utils/hoc/main.scss +166 -0
  231. package/lib/utils/hoc/withLabel.d.ts +94 -0
  232. package/lib/utils/hoc/withLabel.js +60 -0
  233. package/lib/utils/index.d.ts +1 -0
  234. package/lib/utils/index.js +1 -0
  235. package/package.json +49 -4
  236. package/es/form/index.d.ts +0 -23
  237. package/es/form/index.js +0 -33
  238. package/es/form/main.scss +0 -5
  239. package/lib/form/index.d.ts +0 -23
  240. package/lib/form/index.js +0 -35
  241. package/lib/form/main.scss +0 -5
@@ -1,17 +1,35 @@
1
1
  @import "../core/variables.scss";
2
2
 
3
3
  .#{$prefix}select {
4
+ width: 100%;
5
+ position: relative;
6
+ top: -0.5px;
7
+
8
+ .next-input.next-medium {
9
+ height: var(--form-element-medium-height, 28px) !important;
10
+
11
+ .next-input-text-field {
12
+ height: calc(var(--form-element-medium-height, 28px) - var(--input-border-width, 1px)*2) !important;
13
+ min-height: auto !important;
14
+ }
15
+ }
16
+
17
+ &.next-select-multiple .next-select-trigger-search {
18
+ position: relative;
19
+ top: 1px;
20
+ }
21
+
4
22
  .select-row-container {
5
23
  display: flex;
6
24
  justify-content: space-between;
7
- margin-top: 8px;
25
+ margin-top: var(--s-2, 8px);
8
26
 
9
27
  &:first-child {
10
28
  margin-top: 0px;
11
29
  }
12
30
 
13
31
  .select-item {
14
- margin-right: 8px;
32
+ // margin-right: var(--s-2, 8px);
15
33
 
16
34
  &.selected {
17
35
  border-color: $color-brand1-6;
@@ -19,11 +37,11 @@
19
37
  }
20
38
 
21
39
  &.row2{
22
- width: calc(50% - 8px);
40
+ width: calc(50% - 4px);
23
41
  }
24
42
 
25
43
  &.row3{
26
- width: calc(33.33% - 8px);
44
+ width: calc(33.33% - 4px);
27
45
  }
28
46
 
29
47
  &:last-child {
@@ -1,6 +1,113 @@
1
1
  import type { SelectProps as FusionSelectProps, DataSourceItem } from '@alifd/next/types/select/types';
2
+ /**
3
+ * @api Select
4
+ */
2
5
  export interface SelectProps extends FusionSelectProps {
3
- display: 'button' | 'select';
6
+ /**
7
+ * 展现形式
8
+ * @en Display mode
9
+ */
10
+ display: 'button' | 'select' | 'checkbox' | 'radio';
11
+ /**
12
+ * 按钮模式下的列数
13
+ * @en Number of columns in button mode
14
+ */
4
15
  buttonCols?: number;
16
+ /**
17
+ * 选择器尺寸
18
+ * @en Select size
19
+ * @defaultValue 'medium'
20
+ */
21
+ size?: 'medium';
22
+ /**
23
+ * 选择器模式
24
+ * @en Select mode
25
+ * @defaultValue 'single'
26
+ */
27
+ mode?: 'single' | 'multiple' | 'tag';
28
+ /**
29
+ * 是否禁用
30
+ * @en Whether is disabled
31
+ * @defaultValue false
32
+ */
33
+ disabled?: boolean;
34
+ /**
35
+ * 当前值,受控使用
36
+ * @en Current selected value(s)
37
+ */
38
+ value?: string | string[] | number | number[];
39
+ /**
40
+ * 默认值,非受控使用
41
+ * @en Default selected value(s)
42
+ */
43
+ defaultValue?: string | string[] | number | number[];
44
+ /**
45
+ * 数据源
46
+ * @en Data source for the Select
47
+ */
48
+ dataSource?: Array<DataSourceItem | string | number>;
49
+ /**
50
+ * 是否显示清除按钮
51
+ * @en Show clear button
52
+ * @defaultValue false
53
+ */
54
+ hasClear?: boolean;
55
+ /**
56
+ * 是否为必选
57
+ * @en Whether is required
58
+ * @defaultValue false
59
+ */
60
+ required?: boolean;
61
+ /**
62
+ * 输入框状态
63
+ * @en Input state
64
+ */
65
+ state?: 'error' | 'loading' | 'warning';
66
+ /**
67
+ * 自定义标签
68
+ * @en Custom label
69
+ */
70
+ label?: React.ReactNode;
71
+ /**
72
+ * 占位符
73
+ * @en Placeholder
74
+ */
75
+ placeholder?: string;
76
+ /**
77
+ * 值发生变化时的回调
78
+ * @en Callback when value changes
79
+ */
80
+ onChange?: (value: any, actionType: string) => void;
81
+ }
82
+ /**
83
+ * @api DataSourceItem
84
+ */
85
+ export interface DataSourceItemType {
86
+ /**
87
+ * 选项的文本内容
88
+ * @en Option text content
89
+ */
90
+ label: React.ReactNode;
91
+ /**
92
+ * 选项的值
93
+ * @en Option value
94
+ */
95
+ value: string | number;
96
+ /**
97
+ * 是否禁用该选项
98
+ * @en Whether the option is disabled
99
+ * @defaultValue false
100
+ */
101
+ disabled?: boolean;
102
+ /**
103
+ * 选项的提示文案
104
+ * @en Option title
105
+ */
106
+ title?: string;
107
+ /**
108
+ * 选项描述文本
109
+ * @en Option description
110
+ */
111
+ description?: string;
5
112
  }
6
113
  export type { DataSourceItem };
package/es/step/index.js CHANGED
@@ -12,7 +12,7 @@ import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
12
12
  const Step = forwardRef((_a, ref) => {
13
13
  var { className, shape = 'dot', showStatus = true, current = 0, stepsList = [], defaultCollapsed = false, collapsedSteps = 1, collapsedMore = (React.createElement("div", null,
14
14
  "\u67E5\u770B\u66F4\u591A",
15
- React.createElement(Icon, { type: "arrow-down", size: "xxs", style: { marginLeft: 2 } }))) } = _a, others = __rest(_a, ["className", "shape", "showStatus", "current", "stepsList", "defaultCollapsed", "collapsedSteps", "collapsedMore"]);
15
+ React.createElement(Icon, { type: "arrow-down", size: "xxs", style: { marginLeft: 2 } }))), size = 'large' } = _a, others = __rest(_a, ["className", "shape", "showStatus", "current", "stepsList", "defaultCollapsed", "collapsedSteps", "collapsedMore", "size"]);
16
16
  const [steps, setSteps] = useState([]);
17
17
  const [collapsed, setCollapsed] = useState(defaultCollapsed);
18
18
  useEffect(() => {
@@ -26,7 +26,7 @@ const Step = forwardRef((_a, ref) => {
26
26
  if (stepsList.length === 0) {
27
27
  return null;
28
28
  }
29
- return (React.createElement("div", Object.assign({ className: cs(`${PREFIX_DEFAULT}step`, className, collapsed && `${PREFIX_DEFAULT}step-collapsed`) }, others, { ref: ref }),
29
+ return (React.createElement("div", Object.assign({ className: cs(`${PREFIX_DEFAULT}step`, `${PREFIX_DEFAULT}step-${size}`, className, collapsed && `${PREFIX_DEFAULT}step-collapsed`) }, others, { ref: ref }),
30
30
  React.createElement(React.Fragment, null,
31
31
  React.createElement(StepComponent, { current: current, shape: shape, labelPlacement: "hoz", direction: "ver", readOnly: true }, steps),
32
32
  collapsed && stepsList.length > collapsedSteps && (React.createElement("div", { className: `${PREFIX_DEFAULT}step-collapsed-more`, onClick: () => setCollapsed(!collapsed) },
package/es/step/main.scss CHANGED
@@ -1,91 +1,140 @@
1
1
  @import '../core/variables.scss';
2
2
 
3
3
  .#{$prefix}step {
4
- .next-step-circle {
4
+
5
+ --step-circle-vertical-item-content-margin-top: 8px;
6
+ --step-dot-item-dot-process-size: 9px;
7
+
8
+ .next-step.next-step-vertical.next-step-label-horizontal {
5
9
  padding-left: 0;
6
10
 
7
- .next-step-item-node-circle {
8
- width: 24px !important;
9
- height: 24px !important;
10
- line-height: 24px !important;
11
- background-color: $color-fill1-3 !important;
12
- color: $color-text1-4 !important;
13
- font-weight: 500 !important;
14
- font-size: 16px !important;
15
- border: none !important;
16
- }
11
+ &.next-step-dot {
12
+ padding-bottom: 8px;
13
+ padding-top: 4px;
17
14
 
18
- .next-step-item-title {
19
- color: $color-text1-4 !important;
20
- font-weight: 500 !important;
21
- font-size: 16px !important;
22
- margin-top: 0px !important;
23
- line-height: 24px !important;
15
+ .next-step-item {
16
+ .next-step-item-body {
17
+ .next-step-item-title {
18
+ font-size: 14px;
19
+ line-height: 20px;
20
+ }
21
+ }
22
+ }
24
23
  }
25
24
 
26
- .next-step-item-tail {
27
- margin-top: 0 !important;
28
- }
29
- }
25
+ &.next-step-circle {
26
+ .next-step-item {
27
+ .next-step-item-tail {
28
+ margin-top: 0;
29
+ margin-bottom: 0;
30
+ visibility: visible;
31
+ }
30
32
 
31
- .next-step-dot {
32
- .next-step-item-title {
33
- line-height: 20px !important;
34
- font-size: 14px !important;
35
- font-weight: 500 !important;
36
- }
37
- .next-step-item-body {
38
- top: -5px !important;
39
- margin-left: 4px !important;
40
- .next-step-item-content {
41
- margin-top: 6px !important;
42
- margin-bottom: 20px !important;
43
- line-height: 18px !important;
33
+ &:last-child {
34
+ .next-step-item-tail {
35
+ visibility: visible;
36
+ }
37
+ }
44
38
  }
45
39
  }
46
- .next-step-item-node-dot {
47
- width: 9px !important;
48
- height: 9px !important;
40
+
41
+ .next-step-item {
42
+ .next-step-item-body {
43
+ .next-step-item-content {
44
+ margin-bottom: 12px;
45
+ }
46
+
47
+ .next-step-item-title {
48
+ margin-top: 0px;
49
+ }
50
+ }
49
51
  }
50
- .next-step-item-tail {
51
- margin: 0 auto !important;
52
+
53
+ &.next-step-dot {
54
+ .next-step-item {
55
+ &:last-child {
56
+ .next-step-item-body {
57
+ .next-step-item-content {
58
+ margin-bottom: 0;
59
+ }
60
+ }
61
+ }
62
+ .next-step-item-body {
63
+ top: -5px;
64
+
65
+ .next-step-item-content {
66
+ margin-bottom: 24px;
67
+ }
68
+ }
69
+
70
+ .next-step-item-tail {
71
+ margin: 0 auto;
72
+ }
73
+ .next-step-item-container {
74
+ margin-top: -8px;
75
+ margin-bottom: -6px;
76
+ }
77
+ }
52
78
  }
53
- .next-step-item-container {
54
- margin-top: -8px !important;
55
- margin-bottom: -6px !important;
79
+ }
80
+
81
+ .next-step-circle {
82
+ padding-left: 0;
83
+
84
+ .next-step-item-node-circle {
85
+ font-weight: 500;
56
86
  }
57
- .next-step-item-finish {
58
- .next-step-item-title {
59
- color: $color-text1-1 !important;
60
- }
61
- .next-step-item-content {
62
- color: $color-text1-1 !important;
87
+ }
88
+
89
+ &-large {
90
+ --step-circle-item-node-process-size: 24px;
91
+ --step-circle-item-node-font-size: 16px;
92
+ --step-circle-item-content-font-size: 14px;
93
+
94
+ .next-step.next-step-vertical.next-step-label-horizontal {
95
+ .next-step-item {
96
+ .next-step-item-body {
97
+ .next-step-item-title {
98
+ font-size: 18px;
99
+ }
100
+ }
63
101
  }
64
102
  }
65
- .next-step-item-wait {
66
- .next-step-item-title {
67
- color: $color-text1-1 !important;
68
- }
69
- .next-step-item-content {
70
- color: $color-text1-1 !important;
71
- }
72
- .next-step-item-node-dot {
73
- border-color: transparent !important;
74
- background: $color-text1-1 !important;
103
+ }
104
+
105
+ &-medium, &-small {
106
+ --step-circle-item-node-process-size: 20px;
107
+ --step-circle-item-node-font-size: 14px;
108
+ --font-lineheight-base: 20px;
109
+ --step-circle-item-content-font-size: 14px;
110
+
111
+ .next-step.next-step-vertical.next-step-label-horizontal {
112
+ .next-step-item {
113
+ .next-step-item-body {
114
+ .next-step-item-title {
115
+ font-size: 14px;
116
+ }
117
+ }
75
118
  }
76
119
  }
77
120
  }
78
121
  }
79
122
 
80
123
  .#{$prefix}step-collapsed {
81
- .next-step-item-last {
82
- .next-step-item-tail {
83
- visibility: visible !important;
84
- }
85
- }
86
- .next-step-item-body {
87
- .next-step-item-content {
88
- margin-bottom: 0px !important;
124
+ .next-step.next-step-vertical.next-step-label-horizontal {
125
+ .next-step-item {
126
+ &.next-step-item-last {
127
+ .next-step-item-tail {
128
+ visibility: visible;
129
+ }
130
+ }
131
+ &:last-child {
132
+ .next-step-item-body {
133
+ .next-step-item-content {
134
+ margin-bottom: 0px;
135
+ }
136
+ }
137
+ }
89
138
  }
90
139
  }
91
140
  }
@@ -2,13 +2,24 @@ import React, { type ReactNode } from 'react';
2
2
  import { type CommonProps } from '@alifd/next';
3
3
  /**
4
4
  * 步骤组件
5
+ * @api
5
6
  */
6
7
  export interface StepProps extends React.HTMLAttributes<HTMLElement>, CommonProps {
8
+ /**
9
+ * 自定义类名
10
+ * @skip
11
+ */
7
12
  className?: string;
8
13
  /**
9
- * 支持 circle、dot
14
+ * 支持 circle、dot、arrow 三种形状
15
+ * @defaultValue 'dot'
16
+ */
17
+ shape?: 'circle' | 'dot' | 'arrow';
18
+ /**
19
+ * 步骤条尺寸
20
+ * @defaultValue 'small'
10
21
  */
11
- shape?: 'circle' | 'dot';
22
+ size?: 'small' | 'large';
12
23
  /**
13
24
  * 是否根据 current 展示步骤状态,默认为 true
14
25
  */
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @component Table
3
+ * @en Table
4
+ * @type 展示 - Display
5
+ * @remarks 表格组件用于展示大量结构化数据。
6
+ */
7
+ import React from 'react';
8
+ import { Table as NextTable } from '@alifd/next';
9
+ import type { TableProps } from './types';
10
+ export * from './types';
11
+ declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<TableProps & React.RefAttributes<NextTable>, "key" | keyof TableProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, NextTable, {}>;
12
+ export default _default;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @component Table
3
+ * @en Table
4
+ * @type 展示 - Display
5
+ * @remarks 表格组件用于展示大量结构化数据。
6
+ */
7
+ import { __rest } from "tslib";
8
+ import React, { forwardRef } from 'react';
9
+ import { Table as NextTable, ConfigProvider } from '@alifd/next';
10
+ import cs from 'classnames';
11
+ import { PREFIX_DEFAULT } from '../utils';
12
+ const Table = forwardRef((_a, ref) => {
13
+ var { className, size = 'medium', hasBorder = true } = _a, props = __rest(_a, ["className", "size", "hasBorder"]);
14
+ return (React.createElement(NextTable, Object.assign({}, props, { ref: ref,
15
+ // hasBorder={false}
16
+ className: cs(`${PREFIX_DEFAULT}table`, {
17
+ [`${PREFIX_DEFAULT}table-${size}`]: size,
18
+ [`${PREFIX_DEFAULT}table-no-border`]: !hasBorder,
19
+ }, className), size: size })));
20
+ });
21
+ Table.displayName = 'Table';
22
+ export * from './types';
23
+ export default ConfigProvider.config(Table);
@@ -0,0 +1,30 @@
1
+ @import '../core/variables.scss';
2
+
3
+ .#{$prefix}table {
4
+ &.next-table {
5
+ border-radius: var(--corner-2, 8px);
6
+ border-left: none;
7
+ border-top: none;
8
+
9
+ th {
10
+ border-right: none;
11
+ border-left: none;
12
+ }
13
+
14
+ tbody {
15
+ tr {
16
+ td:first-child {
17
+ border-left: var(--table-normal-border-width, 1px) var(--table-normal-border-style, solid) var(--table-normal-border-color, #DCDEE3);
18
+ }
19
+ }
20
+ tr:last-child {
21
+ td:first-child {
22
+ border-bottom-left-radius: var(--corner-2, 8px);
23
+ }
24
+ td:last-child {
25
+ border-bottom-right-radius: var(--corner-2, 8px);
26
+ }
27
+ }
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,2 @@
1
+ import '@alifd/next/es/table/style2';
2
+ import './main.scss';
@@ -0,0 +1,2 @@
1
+ import '@alifd/next/es/table/style2';
2
+ import './main.scss';
@@ -0,0 +1,98 @@
1
+ import type { TableProps as FusionTableProps } from '@alifd/next/types/table';
2
+ /**
3
+ * 表格列定义类型
4
+ */
5
+ export interface ColumnType {
6
+ title?: React.ReactNode;
7
+ dataIndex?: string;
8
+ key?: string;
9
+ width?: string | number;
10
+ lock?: boolean;
11
+ [key: string]: unknown;
12
+ }
13
+ /**
14
+ * 表格数据源类型
15
+ */
16
+ export type DataSourceType = Record<string, unknown>;
17
+ /**
18
+ * @api Table
19
+ */
20
+ export interface TableProps extends FusionTableProps {
21
+ /**
22
+ * 样式类名的品牌前缀
23
+ * @skip
24
+ */
25
+ prefix?: string;
26
+ /**
27
+ * 尺寸 small为紧凑模式
28
+ * @skip
29
+ */
30
+ size?: 'small' | 'medium';
31
+ /**
32
+ * 自定义类名
33
+ * @skip
34
+ */
35
+ className?: string;
36
+ /**
37
+ * 自定义内联样式
38
+ * @skip
39
+ */
40
+ style?: React.CSSProperties;
41
+ /**
42
+ * 表格列配置
43
+ */
44
+ columns?: Array<ColumnType>;
45
+ /**
46
+ * 表格元素的 table-layout 属性,设为 fixed 表示内容不会影响列的布局
47
+ */
48
+ tableLayout?: 'fixed' | 'auto';
49
+ /**
50
+ * 表格的总长度,可以这么用:设置表格总长度 、设置部分列的宽度,这样表格会按照剩余空间大小,自动其他列分配宽度
51
+ */
52
+ tableWidth?: number;
53
+ /**
54
+ * 表格展示的数据源
55
+ */
56
+ dataSource?: Array<DataSourceType>;
57
+ /**
58
+ * 表格是否具有边框
59
+ */
60
+ hasBorder?: boolean;
61
+ /**
62
+ * 表格是否具有头部
63
+ */
64
+ hasHeader?: boolean;
65
+ /**
66
+ * 表格是否是斑马线
67
+ * @skip
68
+ */
69
+ isZebra?: boolean;
70
+ /**
71
+ * 表格是否在加载中
72
+ */
73
+ loading?: boolean;
74
+ /**
75
+ * 自定义国际化文案对象
76
+ * @skip
77
+ */
78
+ locale?: {
79
+ ok: string;
80
+ reset: string;
81
+ empty: string;
82
+ asc: string;
83
+ desc: string;
84
+ expanded: string;
85
+ folded: string;
86
+ filter: string;
87
+ selectAll: string;
88
+ };
89
+ /**
90
+ * 设置数据为空的时候的表格内容展现
91
+ * @skip
92
+ */
93
+ emptyContent?: React.ReactNode;
94
+ /**
95
+ * dataSource当中数据的主键,如果给定的数据源中的属性不包含该主键,会造成选择状态全部选中
96
+ */
97
+ primaryKey?: string;
98
+ }
@@ -0,0 +1 @@
1
+ export {};
package/es/tag/index.d.ts CHANGED
@@ -6,8 +6,8 @@
6
6
  * @when Tag
7
7
  */
8
8
  import React from 'react';
9
- import { TagProps } from './types';
10
- export type { TagProps } from '@alifd/next/types/tag';
9
+ import { type TagGroupProps, type TagProps } from './types';
10
+ export type { TagProps, TagGroupProps } from './types';
11
11
  declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<TagProps & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<(import("@alifd/next/types/tag").TagProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps) & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/tag").TagProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, {
12
12
  __destroyed: boolean;
13
13
  tagNode: HTMLDivElement | null;
@@ -1776,5 +1776,7 @@ declare const _default: import("@alifd/next/types/config-provider/types").Config
1776
1776
  UNSAFE_componentWillUpdate?(nextProps: Readonly<import("@alifd/next/types/tag").TagProps>, nextState: Readonly<{
1777
1777
  visible: boolean;
1778
1778
  }>, nextContext: any): void;
1779
- }>>, {}>;
1779
+ }>>, {}> & {
1780
+ Group: React.ForwardRefExoticComponent<Pick<TagGroupProps & React.RefAttributes<HTMLDivElement> & import("../utils").WithLabelProps, "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "size" | "onClose" | "key" | "state" | "label" | "labelLayout" | "disabled" | "required" | "readOnly" | "labelWidth" | "dataSource"> & React.RefAttributes<any>>;
1781
+ };
1780
1782
  export default _default;
package/es/tag/index.js CHANGED
@@ -9,13 +9,29 @@ import { __rest } from "tslib";
9
9
  import React, { forwardRef } from 'react';
10
10
  import { Tag as NextTag, ConfigProvider } from '@alifd/next';
11
11
  import cs from 'classnames';
12
- import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
12
+ import { PREFIX_DEFAULT, assignSubComponent, withLabel } from '../utils';
13
+ // Tag组件
13
14
  const Tag = forwardRef((_a, ref) => {
14
15
  var { className, size = 'small' } = _a, props = __rest(_a, ["className", "size"]);
15
16
  return (React.createElement(NextTag, Object.assign({}, props, { ref: ref, className: cs(`${PREFIX_DEFAULT}tag`, className), size: size })));
16
17
  });
17
- // 暂时只开放 Tag 组件,其它子组件后续看需求
18
+ const TagGroup = forwardRef((_a, ref) => {
19
+ var { className, children, dataSource, onClose, size = 'medium' } = _a, props = __rest(_a, ["className", "children", "dataSource", "onClose", "size"]);
20
+ const renderTags = () => {
21
+ if (!(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length)) {
22
+ return null;
23
+ }
24
+ return dataSource.map((item, index) => (React.createElement(Tag, { key: index, type: item.type || 'normal', color: item.color, closable: item.closable, size: item.size || size, onClose: onClose ? () => onClose(item, index) : undefined }, item.label)));
25
+ };
26
+ return (React.createElement("div", Object.assign({}, props, { ref: ref, className: cs(`${PREFIX_DEFAULT}tag-group`, `${PREFIX_DEFAULT}tag-group-${size}`, className) }), renderTags()));
27
+ });
28
+ // 添加 Label 支持到 TagGroup
29
+ const LabeledTagGroup = withLabel(TagGroup, {
30
+ enableHoverState: false,
31
+ });
32
+ // 导出组件
18
33
  const TagWithSub = assignSubComponent(Tag, {
19
34
  displayName: 'Tag',
35
+ Group: LabeledTagGroup,
20
36
  });
21
37
  export default ConfigProvider.config(TagWithSub);