@douyinfe/semi-ui 2.10.0 → 2.10.2-alpha.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.
- package/checkbox/checkbox.tsx +1 -3
- package/checkbox/checkboxInner.tsx +19 -14
- package/dist/css/semi.css +1 -0
- package/dist/umd/semi-ui.js +381 -349
- 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 +1 -2
- package/lib/cjs/checkbox/checkboxInner.js +21 -17
- 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/table/Body/BaseRow.d.ts +1 -0
- package/lib/cjs/table/Body/BaseRow.js +22 -0
- package/lib/cjs/tooltip/index.d.ts +1 -0
- package/lib/cjs/tooltip/index.js +9 -6
- package/lib/cjs/typography/title.d.ts +1 -1
- package/lib/es/checkbox/checkbox.js +1 -2
- package/lib/es/checkbox/checkboxInner.js +20 -17
- 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/table/Body/BaseRow.d.ts +1 -0
- package/lib/es/table/Body/BaseRow.js +22 -0
- package/lib/es/tooltip/index.d.ts +1 -0
- package/lib/es/tooltip/index.js +9 -6
- package/lib/es/typography/title.d.ts +1 -1
- package/package.json +9 -9
- package/popover/_story/popover.stories.js +38 -2
- package/table/Body/BaseRow.tsx +15 -0
- package/tooltip/index.tsx +9 -2
package/checkbox/checkbox.tsx
CHANGED
|
@@ -171,6 +171,7 @@ class Checkbox extends BaseComponent<CheckboxProps, CheckboxState> {
|
|
|
171
171
|
const { isCardType, isPureCardType } = this.context.checkboxGroup;
|
|
172
172
|
props.isCardType = isCardType;
|
|
173
173
|
props.isPureCardType = isPureCardType;
|
|
174
|
+
props['name'] = this.context.checkboxGroup.name;
|
|
174
175
|
}
|
|
175
176
|
|
|
176
177
|
const prefix = prefixCls || css.PREFIX;
|
|
@@ -192,8 +193,6 @@ class Checkbox extends BaseComponent<CheckboxProps, CheckboxState> {
|
|
|
192
193
|
[`${prefix}-cardType_extra_noChildren`]: props.isCardType && !children,
|
|
193
194
|
});
|
|
194
195
|
|
|
195
|
-
const name = inGroup && this.context.checkboxGroup.name;
|
|
196
|
-
|
|
197
196
|
const renderContent = () => (
|
|
198
197
|
<>
|
|
199
198
|
{children ? <span id={this.addonId} className={`${prefix}-addon`}>{children}</span> : null}
|
|
@@ -220,7 +219,6 @@ class Checkbox extends BaseComponent<CheckboxProps, CheckboxState> {
|
|
|
220
219
|
{...props}
|
|
221
220
|
addonId={children && this.addonId}
|
|
222
221
|
extraId={extra && this.extraId}
|
|
223
|
-
name={name}
|
|
224
222
|
isPureCardType={props.isPureCardType}
|
|
225
223
|
ref={ref => {
|
|
226
224
|
this.checkboxEntity = ref;
|
|
@@ -81,26 +81,31 @@ class CheckboxInner extends PureComponent<CheckboxInnerProps> {
|
|
|
81
81
|
<IconCheckboxIndeterminate />
|
|
82
82
|
) : null;
|
|
83
83
|
|
|
84
|
+
const inputProps: React.InputHTMLAttributes<HTMLInputElement> = {
|
|
85
|
+
type: "checkbox",
|
|
86
|
+
'aria-label': this.props['aria-label'],
|
|
87
|
+
'aria-disabled': disabled,
|
|
88
|
+
'aria-checked': checked,
|
|
89
|
+
'aria-labelledby': addonId,
|
|
90
|
+
'aria-describedby':extraId || this.props['aria-describedby'],
|
|
91
|
+
'aria-invalid': this.props['aria-invalid'],
|
|
92
|
+
'aria-errormessage': this.props['aria-errormessage'],
|
|
93
|
+
'aria-required': this.props['aria-required'],
|
|
94
|
+
className: css.INPUT,
|
|
95
|
+
onChange: noop,
|
|
96
|
+
checked: checked,
|
|
97
|
+
disabled: disabled,
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
name && (inputProps['name'] = name);
|
|
101
|
+
|
|
84
102
|
return (
|
|
85
103
|
<span className={wrapper}>
|
|
86
104
|
<input
|
|
87
|
-
|
|
88
|
-
aria-label={this.props['aria-label']}
|
|
89
|
-
aria-disabled={disabled}
|
|
90
|
-
aria-checked={checked}
|
|
91
|
-
aria-labelledby={addonId}
|
|
92
|
-
aria-describedby={extraId || this.props['aria-describedby']}
|
|
93
|
-
aria-invalid={this.props['aria-invalid']}
|
|
94
|
-
aria-errormessage={this.props['aria-errormessage']}
|
|
95
|
-
aria-required={this.props['aria-required']}
|
|
105
|
+
{...inputProps}
|
|
96
106
|
ref={ref => {
|
|
97
107
|
this.inputEntity = ref;
|
|
98
108
|
}}
|
|
99
|
-
className={css.INPUT}
|
|
100
|
-
onChange={noop}
|
|
101
|
-
checked={checked}
|
|
102
|
-
disabled={disabled}
|
|
103
|
-
name={name}
|
|
104
109
|
/>
|
|
105
110
|
<span className={inner}>{icon}</span>
|
|
106
111
|
</span>
|
package/dist/css/semi.css
CHANGED