@douyinfe/semi-ui 2.19.0-alpha.1 → 2.19.0-alpha.4
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/_story/checkbox.stories.js +2 -0
- package/checkbox/checkbox.tsx +22 -19
- package/checkbox/checkboxGroup.tsx +0 -2
- package/dist/css/semi.css +16 -10
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +144 -78
- 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 +0 -1
- package/lib/cjs/checkbox/checkbox.js +18 -10
- package/lib/cjs/checkbox/checkboxGroup.js +2 -4
- package/lib/cjs/form/baseForm.d.ts +1 -1
- package/lib/cjs/form/baseForm.js +0 -1
- package/lib/cjs/form/field.d.ts +1 -1
- package/lib/cjs/popconfirm/index.d.ts +4 -2
- package/lib/cjs/popconfirm/index.js +49 -31
- package/lib/cjs/radio/radioGroup.js +2 -4
- package/lib/cjs/table/ColumnFilter.js +4 -2
- package/lib/cjs/table/ColumnSorter.d.ts +1 -0
- package/lib/cjs/table/ColumnSorter.js +9 -6
- package/lib/cjs/table/Table.js +11 -4
- package/lib/cjs/tabs/TabBar.js +5 -1
- package/lib/cjs/transfer/index.js +7 -2
- package/lib/cjs/typography/title.d.ts +1 -1
- package/lib/es/checkbox/checkbox.js +18 -10
- package/lib/es/checkbox/checkboxGroup.js +2 -4
- package/lib/es/form/baseForm.d.ts +1 -1
- package/lib/es/form/baseForm.js +0 -1
- package/lib/es/form/field.d.ts +1 -1
- package/lib/es/popconfirm/index.d.ts +4 -2
- package/lib/es/popconfirm/index.js +49 -31
- package/lib/es/radio/radioGroup.js +2 -4
- package/lib/es/table/ColumnFilter.js +4 -2
- package/lib/es/table/ColumnSorter.d.ts +1 -0
- package/lib/es/table/ColumnSorter.js +9 -6
- package/lib/es/table/Table.js +10 -4
- package/lib/es/tabs/TabBar.js +5 -1
- package/lib/es/transfer/index.js +7 -2
- package/lib/es/typography/title.d.ts +1 -1
- package/package.json +7 -7
- package/popconfirm/_story/popconfirm.stories.js +37 -1
- package/popconfirm/index.tsx +14 -6
- package/radio/radioGroup.tsx +0 -2
- package/table/ColumnFilter.tsx +2 -1
- package/table/ColumnSorter.tsx +16 -10
- package/table/Table.tsx +7 -4
- package/tabs/TabBar.tsx +7 -1
- package/transfer/index.tsx +7 -2
- package/webpack.config.js +3 -1
package/checkbox/checkbox.tsx
CHANGED
|
@@ -235,20 +235,27 @@ class Checkbox extends BaseComponent<CheckboxProps, CheckboxState> {
|
|
|
235
235
|
const name = inGroup && this.context.checkboxGroup.name;
|
|
236
236
|
const xSemiPropChildren = this.props['x-semi-children-alias'] || 'children';
|
|
237
237
|
|
|
238
|
-
const renderContent = () =>
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
238
|
+
const renderContent = () => {
|
|
239
|
+
if (!children && !extra) {
|
|
240
|
+
return null;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
return (
|
|
244
|
+
<div className={`${prefix}-content`}>
|
|
245
|
+
{children ? (
|
|
246
|
+
<span id={addonId} className={`${prefix}-addon`} x-semi-prop={xSemiPropChildren}>
|
|
247
|
+
{children}
|
|
248
|
+
</span>
|
|
249
|
+
) : null}
|
|
250
|
+
{extra ? (
|
|
251
|
+
<div id={extraId} className={extraCls} x-semi-prop="extra">
|
|
252
|
+
{extra}
|
|
253
|
+
</div>
|
|
254
|
+
) : null}
|
|
255
|
+
</div>
|
|
256
|
+
);
|
|
257
|
+
};
|
|
258
|
+
|
|
252
259
|
return (
|
|
253
260
|
// label is better than span, however span is here which is to solve gitlab issue #364
|
|
254
261
|
<span
|
|
@@ -276,11 +283,7 @@ class Checkbox extends BaseComponent<CheckboxProps, CheckboxState> {
|
|
|
276
283
|
onInputFocus={this.handleFocusVisible}
|
|
277
284
|
onInputBlur={this.handleBlur}
|
|
278
285
|
/>
|
|
279
|
-
{
|
|
280
|
-
props.isCardType ?
|
|
281
|
-
<div>{renderContent()}</div> :
|
|
282
|
-
renderContent()
|
|
283
|
-
}
|
|
286
|
+
{renderContent()}
|
|
284
287
|
</span>
|
|
285
288
|
);
|
|
286
289
|
}
|
|
@@ -136,7 +136,6 @@ class CheckboxGroup extends BaseComponent<CheckboxGroupProps, CheckboxGroupState
|
|
|
136
136
|
disabled={this.props.disabled}
|
|
137
137
|
value={option}
|
|
138
138
|
prefixCls={prefixCls}
|
|
139
|
-
type={type}
|
|
140
139
|
>
|
|
141
140
|
{option}
|
|
142
141
|
</Checkbox>
|
|
@@ -153,7 +152,6 @@ class CheckboxGroup extends BaseComponent<CheckboxGroupProps, CheckboxGroupState
|
|
|
153
152
|
className={option.className}
|
|
154
153
|
style={option.style}
|
|
155
154
|
onChange={option.onChange}
|
|
156
|
-
type={type}
|
|
157
155
|
>
|
|
158
156
|
{option.label}
|
|
159
157
|
</Checkbox>
|
package/dist/css/semi.css
CHANGED
|
@@ -3471,7 +3471,7 @@ body {
|
|
|
3471
3471
|
box-sizing: border-box;
|
|
3472
3472
|
position: relative;
|
|
3473
3473
|
display: flex;
|
|
3474
|
-
align-items:
|
|
3474
|
+
align-items: flex-start;
|
|
3475
3475
|
flex-wrap: wrap;
|
|
3476
3476
|
font-size: 14px;
|
|
3477
3477
|
line-height: 20px;
|
|
@@ -3479,6 +3479,7 @@ body {
|
|
|
3479
3479
|
cursor: pointer;
|
|
3480
3480
|
transition: background-color var(--semi-transition_duration-faster) var(--semi-transition_function-easeIn) var(--semi-transition_delay-fastest), border var(--semi-transition_duration-faster) var(--semi-transition_function-easeIn) var(--semi-transition_delay-fastest);
|
|
3481
3481
|
transform: scale(var(--semi-transform_scale-none));
|
|
3482
|
+
column-gap: 8px;
|
|
3482
3483
|
}
|
|
3483
3484
|
.semi-checkbox input[type=checkbox] {
|
|
3484
3485
|
position: absolute;
|
|
@@ -3489,11 +3490,16 @@ body {
|
|
|
3489
3490
|
margin: 0;
|
|
3490
3491
|
opacity: 0;
|
|
3491
3492
|
}
|
|
3493
|
+
.semi-checkbox-content {
|
|
3494
|
+
flex: 1;
|
|
3495
|
+
display: flex;
|
|
3496
|
+
flex-direction: column;
|
|
3497
|
+
row-gap: 4px;
|
|
3498
|
+
}
|
|
3492
3499
|
.semi-checkbox-addon {
|
|
3493
3500
|
display: flex;
|
|
3494
3501
|
flex: 1;
|
|
3495
3502
|
align-items: center;
|
|
3496
|
-
padding-left: 8px;
|
|
3497
3503
|
color: var(--semi-color-text-0);
|
|
3498
3504
|
line-height: 20px;
|
|
3499
3505
|
user-select: none;
|
|
@@ -3722,9 +3728,7 @@ body {
|
|
|
3722
3728
|
flex-grow: 1;
|
|
3723
3729
|
flex-basis: 100%;
|
|
3724
3730
|
box-sizing: border-box;
|
|
3725
|
-
padding-left: 24px;
|
|
3726
3731
|
color: var(--semi-color-text-2);
|
|
3727
|
-
margin-top: 4px;
|
|
3728
3732
|
}
|
|
3729
3733
|
.semi-checkbox-focus {
|
|
3730
3734
|
outline: 2px solid var(--semi-color-primary-light-active);
|
|
@@ -15309,7 +15313,6 @@ body {
|
|
|
15309
15313
|
.semi-select-option-icon {
|
|
15310
15314
|
width: 12px;
|
|
15311
15315
|
color: transparent;
|
|
15312
|
-
visibility: hidden;
|
|
15313
15316
|
margin-right: 8px;
|
|
15314
15317
|
display: flex;
|
|
15315
15318
|
justify-content: center;
|
|
@@ -15350,7 +15353,6 @@ body {
|
|
|
15350
15353
|
font-weight: 600;
|
|
15351
15354
|
}
|
|
15352
15355
|
.semi-select-option-selected .semi-select-option-icon {
|
|
15353
|
-
visibility: visible;
|
|
15354
15356
|
color: var(--semi-color-text-2);
|
|
15355
15357
|
}
|
|
15356
15358
|
.semi-select-option-focused {
|
|
@@ -17395,10 +17397,14 @@ body {
|
|
|
17395
17397
|
display: inline-block;
|
|
17396
17398
|
width: 16px;
|
|
17397
17399
|
height: 16px;
|
|
17398
|
-
cursor: pointer;
|
|
17399
17400
|
vertical-align: middle;
|
|
17400
17401
|
text-align: center;
|
|
17401
17402
|
}
|
|
17403
|
+
.semi-table .semi-table-column-sorter-wrapper {
|
|
17404
|
+
display: inline-flex;
|
|
17405
|
+
align-items: center;
|
|
17406
|
+
cursor: pointer;
|
|
17407
|
+
}
|
|
17402
17408
|
.semi-table .semi-table-column-sorter-up, .semi-table .semi-table-column-sorter-down {
|
|
17403
17409
|
height: 0;
|
|
17404
17410
|
display: block;
|
|
@@ -17421,11 +17427,11 @@ body {
|
|
|
17421
17427
|
display: inline-flex;
|
|
17422
17428
|
cursor: pointer;
|
|
17423
17429
|
color: var(--semi-color-text-2);
|
|
17424
|
-
|
|
17430
|
+
align-items: center;
|
|
17425
17431
|
}
|
|
17426
17432
|
.semi-table .semi-table-column-filter svg {
|
|
17427
|
-
width:
|
|
17428
|
-
height:
|
|
17433
|
+
width: 16px;
|
|
17434
|
+
height: 16px;
|
|
17429
17435
|
}
|
|
17430
17436
|
.semi-table .semi-table-column-filter.on {
|
|
17431
17437
|
color: var(--semi-color-primary);
|