@douyinfe/semi-ui 2.18.0 → 2.19.0-alpha.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.
- package/checkbox/checkboxGroup.tsx +11 -2
- package/dist/css/semi.css +6 -8
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +315 -288
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/form/baseForm.tsx +1 -0
- package/lib/cjs/checkbox/checkboxGroup.js +31 -8
- package/lib/cjs/form/baseForm.js +1 -0
- package/lib/cjs/radio/radioGroup.js +34 -7
- package/lib/cjs/table/ColumnFilter.js +2 -4
- package/lib/cjs/table/ColumnSorter.d.ts +0 -1
- package/lib/cjs/table/ColumnSorter.js +6 -9
- package/lib/cjs/table/Table.js +4 -11
- package/lib/cjs/tabs/TabBar.js +1 -5
- package/lib/cjs/transfer/index.js +2 -7
- package/lib/es/checkbox/checkboxGroup.js +27 -6
- package/lib/es/form/baseForm.js +1 -0
- package/lib/es/radio/radioGroup.js +30 -5
- package/lib/es/table/ColumnFilter.js +2 -4
- package/lib/es/table/ColumnSorter.d.ts +0 -1
- package/lib/es/table/ColumnSorter.js +6 -9
- package/lib/es/table/Table.js +4 -10
- package/lib/es/tabs/TabBar.js +1 -5
- package/lib/es/transfer/index.js +2 -7
- package/package.json +7 -7
- package/radio/radioGroup.tsx +15 -4
- package/table/ColumnFilter.tsx +1 -2
- package/table/ColumnSorter.tsx +10 -16
- package/table/Table.tsx +4 -7
- package/tabs/TabBar.tsx +1 -7
- package/transfer/index.tsx +2 -7
- package/webpack.config.js +1 -3
|
@@ -6,7 +6,7 @@ import { checkboxGroupClasses as css, strings } from '@douyinfe/semi-foundation/
|
|
|
6
6
|
import CheckboxGroupFoundation, { CheckboxGroupAdapter } from '@douyinfe/semi-foundation/checkbox/checkboxGroupFoundation';
|
|
7
7
|
import BaseComponent from '../_base/baseComponent';
|
|
8
8
|
import { Context } from './context';
|
|
9
|
-
import { isEqual } from 'lodash';
|
|
9
|
+
import { get, isEqual } from 'lodash';
|
|
10
10
|
import Checkbox, { CheckboxEvent } from './checkbox';
|
|
11
11
|
|
|
12
12
|
export type CheckboxDirection = 'horizontal' | 'vertical';
|
|
@@ -136,6 +136,7 @@ class CheckboxGroup extends BaseComponent<CheckboxGroupProps, CheckboxGroupState
|
|
|
136
136
|
disabled={this.props.disabled}
|
|
137
137
|
value={option}
|
|
138
138
|
prefixCls={prefixCls}
|
|
139
|
+
type={type}
|
|
139
140
|
>
|
|
140
141
|
{option}
|
|
141
142
|
</Checkbox>
|
|
@@ -152,6 +153,7 @@ class CheckboxGroup extends BaseComponent<CheckboxGroupProps, CheckboxGroupState
|
|
|
152
153
|
className={option.className}
|
|
153
154
|
style={option.style}
|
|
154
155
|
onChange={option.onChange}
|
|
156
|
+
type={type}
|
|
155
157
|
>
|
|
156
158
|
{option.label}
|
|
157
159
|
</Checkbox>
|
|
@@ -159,7 +161,14 @@ class CheckboxGroup extends BaseComponent<CheckboxGroupProps, CheckboxGroupState
|
|
|
159
161
|
}
|
|
160
162
|
});
|
|
161
163
|
} else if (children) {
|
|
162
|
-
inner = (React.Children.toArray(children) as React.ReactElement[]).map((itm, index) =>
|
|
164
|
+
inner = (React.Children.toArray(children) as React.ReactElement[]).map((itm, index) => {
|
|
165
|
+
const props: Record<string, any> = { key: index, role: 'listitem' };
|
|
166
|
+
const isCheckboxComp = ['Checkbox', 'CheckboxWithGroup'].some(comp => [get(itm, 'type.displayName'), get(itm, 'type.name')].includes(comp));
|
|
167
|
+
if (isCheckboxComp) {
|
|
168
|
+
props.type = type;
|
|
169
|
+
}
|
|
170
|
+
return React.cloneElement(itm, props);
|
|
171
|
+
});
|
|
163
172
|
}
|
|
164
173
|
|
|
165
174
|
return (
|
package/dist/css/semi.css
CHANGED
|
@@ -15309,6 +15309,7 @@ body {
|
|
|
15309
15309
|
.semi-select-option-icon {
|
|
15310
15310
|
width: 12px;
|
|
15311
15311
|
color: transparent;
|
|
15312
|
+
visibility: hidden;
|
|
15312
15313
|
margin-right: 8px;
|
|
15313
15314
|
display: flex;
|
|
15314
15315
|
justify-content: center;
|
|
@@ -15349,6 +15350,7 @@ body {
|
|
|
15349
15350
|
font-weight: 600;
|
|
15350
15351
|
}
|
|
15351
15352
|
.semi-select-option-selected .semi-select-option-icon {
|
|
15353
|
+
visibility: visible;
|
|
15352
15354
|
color: var(--semi-color-text-2);
|
|
15353
15355
|
}
|
|
15354
15356
|
.semi-select-option-focused {
|
|
@@ -17393,14 +17395,10 @@ body {
|
|
|
17393
17395
|
display: inline-block;
|
|
17394
17396
|
width: 16px;
|
|
17395
17397
|
height: 16px;
|
|
17398
|
+
cursor: pointer;
|
|
17396
17399
|
vertical-align: middle;
|
|
17397
17400
|
text-align: center;
|
|
17398
17401
|
}
|
|
17399
|
-
.semi-table .semi-table-column-sorter-wrapper {
|
|
17400
|
-
display: inline-flex;
|
|
17401
|
-
align-items: center;
|
|
17402
|
-
cursor: pointer;
|
|
17403
|
-
}
|
|
17404
17402
|
.semi-table .semi-table-column-sorter-up, .semi-table .semi-table-column-sorter-down {
|
|
17405
17403
|
height: 0;
|
|
17406
17404
|
display: block;
|
|
@@ -17423,11 +17421,11 @@ body {
|
|
|
17423
17421
|
display: inline-flex;
|
|
17424
17422
|
cursor: pointer;
|
|
17425
17423
|
color: var(--semi-color-text-2);
|
|
17426
|
-
align
|
|
17424
|
+
vertical-align: middle;
|
|
17427
17425
|
}
|
|
17428
17426
|
.semi-table .semi-table-column-filter svg {
|
|
17429
|
-
width:
|
|
17430
|
-
height:
|
|
17427
|
+
width: 12px;
|
|
17428
|
+
height: 12px;
|
|
17431
17429
|
}
|
|
17432
17430
|
.semi-table .semi-table-column-filter.on {
|
|
17433
17431
|
color: var(--semi-color-primary);
|