2017-07-21 20:23:38 +08:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
2018-12-26 22:34:29 +08:00
|
|
|
exports[`Input allowClear should change type when click 1`] = `
|
|
|
|
<Input
|
|
|
|
allowClear={true}
|
|
|
|
disabled={false}
|
|
|
|
type="text"
|
|
|
|
>
|
|
|
|
<Consumer>
|
|
|
|
<span
|
|
|
|
className="ant-input-affix-wrapper"
|
|
|
|
>
|
|
|
|
<input
|
|
|
|
className="ant-input"
|
|
|
|
disabled={false}
|
|
|
|
onChange={[Function]}
|
|
|
|
onKeyDown={[Function]}
|
|
|
|
style={null}
|
|
|
|
type="text"
|
|
|
|
value="111"
|
|
|
|
/>
|
|
|
|
<span
|
|
|
|
className="ant-input-suffix"
|
|
|
|
>
|
|
|
|
<Icon
|
|
|
|
className="ant-input-clear-icon"
|
|
|
|
onClick={[Function]}
|
2018-12-28 17:07:02 +08:00
|
|
|
role="button"
|
2018-12-26 22:34:29 +08:00
|
|
|
theme="filled"
|
|
|
|
type="close-circle"
|
|
|
|
>
|
2019-01-10 18:46:57 +08:00
|
|
|
<LocaleReceiver
|
|
|
|
componentName="Icon"
|
2018-12-26 22:34:29 +08:00
|
|
|
>
|
2019-01-10 18:46:57 +08:00
|
|
|
<i
|
|
|
|
aria-label="icon: close-circle"
|
|
|
|
className="anticon anticon-close-circle ant-input-clear-icon"
|
|
|
|
onClick={[Function]}
|
|
|
|
role="button"
|
|
|
|
tabIndex={-1}
|
2018-12-26 22:34:29 +08:00
|
|
|
>
|
2019-01-10 18:46:57 +08:00
|
|
|
<IconReact
|
2018-12-26 22:34:29 +08:00
|
|
|
className=""
|
2019-01-10 18:46:57 +08:00
|
|
|
type="close-circle-fill"
|
2018-12-26 22:34:29 +08:00
|
|
|
>
|
2019-01-10 18:46:57 +08:00
|
|
|
<svg
|
|
|
|
aria-hidden="true"
|
|
|
|
className=""
|
|
|
|
data-icon="close-circle"
|
|
|
|
fill="currentColor"
|
2019-04-11 12:48:36 +08:00
|
|
|
focusable="false"
|
2019-01-10 18:46:57 +08:00
|
|
|
height="1em"
|
|
|
|
key="svg-close-circle"
|
|
|
|
viewBox="64 64 896 896"
|
|
|
|
width="1em"
|
|
|
|
>
|
|
|
|
<path
|
|
|
|
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"
|
|
|
|
key="svg-close-circle-svg-0"
|
|
|
|
/>
|
|
|
|
</svg>
|
|
|
|
</IconReact>
|
|
|
|
</i>
|
|
|
|
</LocaleReceiver>
|
2018-12-26 22:34:29 +08:00
|
|
|
</Icon>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</Consumer>
|
|
|
|
</Input>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`Input allowClear should change type when click 2`] = `
|
|
|
|
<Input
|
|
|
|
allowClear={true}
|
|
|
|
disabled={false}
|
|
|
|
type="text"
|
|
|
|
>
|
|
|
|
<Consumer>
|
|
|
|
<span
|
|
|
|
className="ant-input-affix-wrapper"
|
|
|
|
>
|
|
|
|
<input
|
|
|
|
className="ant-input"
|
|
|
|
disabled={false}
|
|
|
|
onChange={[Function]}
|
|
|
|
onKeyDown={[Function]}
|
|
|
|
style={null}
|
|
|
|
type="text"
|
|
|
|
value=""
|
|
|
|
/>
|
|
|
|
<span
|
|
|
|
className="ant-input-suffix"
|
|
|
|
/>
|
|
|
|
</span>
|
|
|
|
</Consumer>
|
|
|
|
</Input>
|
|
|
|
`;
|
|
|
|
|
2019-02-07 11:39:16 +08:00
|
|
|
exports[`Input allowClear should not show icon if defaultValue is undefined, null or empty string 1`] = `
|
|
|
|
<Input
|
|
|
|
allowClear={true}
|
|
|
|
defaultValue={null}
|
|
|
|
disabled={false}
|
|
|
|
type="text"
|
|
|
|
>
|
|
|
|
<Consumer>
|
|
|
|
<span
|
|
|
|
className="ant-input-affix-wrapper"
|
|
|
|
>
|
|
|
|
<input
|
|
|
|
className="ant-input"
|
|
|
|
disabled={false}
|
|
|
|
onChange={[Function]}
|
|
|
|
onKeyDown={[Function]}
|
|
|
|
style={null}
|
|
|
|
type="text"
|
|
|
|
value=""
|
|
|
|
/>
|
|
|
|
<span
|
|
|
|
className="ant-input-suffix"
|
|
|
|
/>
|
|
|
|
</span>
|
|
|
|
</Consumer>
|
|
|
|
</Input>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`Input allowClear should not show icon if defaultValue is undefined, null or empty string 2`] = `
|
|
|
|
<Input
|
|
|
|
allowClear={true}
|
|
|
|
disabled={false}
|
|
|
|
type="text"
|
|
|
|
>
|
|
|
|
<Consumer>
|
|
|
|
<span
|
|
|
|
className="ant-input-affix-wrapper"
|
|
|
|
>
|
|
|
|
<input
|
|
|
|
className="ant-input"
|
|
|
|
disabled={false}
|
|
|
|
onChange={[Function]}
|
|
|
|
onKeyDown={[Function]}
|
|
|
|
style={null}
|
|
|
|
type="text"
|
|
|
|
value=""
|
|
|
|
/>
|
|
|
|
<span
|
|
|
|
className="ant-input-suffix"
|
|
|
|
/>
|
|
|
|
</span>
|
|
|
|
</Consumer>
|
|
|
|
</Input>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`Input allowClear should not show icon if defaultValue is undefined, null or empty string 3`] = `
|
|
|
|
<Input
|
|
|
|
allowClear={true}
|
|
|
|
defaultValue=""
|
|
|
|
disabled={false}
|
|
|
|
type="text"
|
|
|
|
>
|
|
|
|
<Consumer>
|
|
|
|
<span
|
|
|
|
className="ant-input-affix-wrapper"
|
|
|
|
>
|
|
|
|
<input
|
|
|
|
className="ant-input"
|
|
|
|
disabled={false}
|
|
|
|
onChange={[Function]}
|
|
|
|
onKeyDown={[Function]}
|
|
|
|
style={null}
|
|
|
|
type="text"
|
|
|
|
value=""
|
|
|
|
/>
|
|
|
|
<span
|
|
|
|
className="ant-input-suffix"
|
|
|
|
/>
|
|
|
|
</span>
|
|
|
|
</Consumer>
|
|
|
|
</Input>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`Input allowClear should not show icon if value is undefined, null or empty string 1`] = `
|
|
|
|
<Input
|
|
|
|
allowClear={true}
|
|
|
|
disabled={false}
|
|
|
|
type="text"
|
|
|
|
value={null}
|
|
|
|
>
|
|
|
|
<Consumer>
|
|
|
|
<span
|
|
|
|
className="ant-input-affix-wrapper"
|
|
|
|
>
|
|
|
|
<input
|
|
|
|
className="ant-input"
|
|
|
|
disabled={false}
|
|
|
|
onChange={[Function]}
|
|
|
|
onKeyDown={[Function]}
|
|
|
|
style={null}
|
|
|
|
type="text"
|
|
|
|
value=""
|
|
|
|
/>
|
|
|
|
<span
|
|
|
|
className="ant-input-suffix"
|
|
|
|
/>
|
|
|
|
</span>
|
|
|
|
</Consumer>
|
|
|
|
</Input>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`Input allowClear should not show icon if value is undefined, null or empty string 2`] = `
|
|
|
|
<Input
|
|
|
|
allowClear={true}
|
|
|
|
disabled={false}
|
|
|
|
type="text"
|
|
|
|
>
|
|
|
|
<Consumer>
|
|
|
|
<span
|
|
|
|
className="ant-input-affix-wrapper"
|
|
|
|
>
|
|
|
|
<input
|
|
|
|
className="ant-input"
|
|
|
|
disabled={false}
|
|
|
|
onChange={[Function]}
|
|
|
|
onKeyDown={[Function]}
|
|
|
|
style={null}
|
|
|
|
type="text"
|
|
|
|
value=""
|
|
|
|
/>
|
|
|
|
<span
|
|
|
|
className="ant-input-suffix"
|
|
|
|
/>
|
|
|
|
</span>
|
|
|
|
</Consumer>
|
|
|
|
</Input>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`Input allowClear should not show icon if value is undefined, null or empty string 3`] = `
|
|
|
|
<Input
|
|
|
|
allowClear={true}
|
|
|
|
disabled={false}
|
|
|
|
type="text"
|
|
|
|
value=""
|
|
|
|
>
|
|
|
|
<Consumer>
|
|
|
|
<span
|
|
|
|
className="ant-input-affix-wrapper"
|
|
|
|
>
|
|
|
|
<input
|
|
|
|
className="ant-input"
|
|
|
|
disabled={false}
|
|
|
|
onChange={[Function]}
|
|
|
|
onKeyDown={[Function]}
|
|
|
|
style={null}
|
|
|
|
type="text"
|
|
|
|
value=""
|
|
|
|
/>
|
|
|
|
<span
|
|
|
|
className="ant-input-suffix"
|
|
|
|
/>
|
|
|
|
</span>
|
|
|
|
</Consumer>
|
|
|
|
</Input>
|
|
|
|
`;
|
|
|
|
|
2017-09-27 09:56:30 +08:00
|
|
|
exports[`Input should support maxLength 1`] = `
|
|
|
|
<Input
|
|
|
|
disabled={false}
|
2018-12-28 14:40:10 +08:00
|
|
|
maxLength={3}
|
2017-09-27 09:56:30 +08:00
|
|
|
type="text"
|
|
|
|
>
|
2018-12-05 19:12:18 +08:00
|
|
|
<Consumer>
|
|
|
|
<input
|
|
|
|
className="ant-input"
|
|
|
|
disabled={false}
|
2018-12-28 14:40:10 +08:00
|
|
|
maxLength={3}
|
2018-12-27 11:41:30 +08:00
|
|
|
onChange={[Function]}
|
2018-12-05 19:12:18 +08:00
|
|
|
onKeyDown={[Function]}
|
|
|
|
type="text"
|
2018-12-27 11:41:30 +08:00
|
|
|
value=""
|
2018-12-05 19:12:18 +08:00
|
|
|
/>
|
|
|
|
</Consumer>
|
2017-09-27 09:56:30 +08:00
|
|
|
</Input>
|
|
|
|
`;
|
|
|
|
|
2018-12-05 15:47:26 +08:00
|
|
|
exports[`Input.Password should change type when click 1`] = `
|
|
|
|
<Password
|
|
|
|
action="click"
|
|
|
|
inputPrefixCls="ant-input"
|
|
|
|
prefixCls="ant-input-password"
|
2018-12-05 18:13:47 +08:00
|
|
|
visibilityToggle={true}
|
2018-12-05 15:47:26 +08:00
|
|
|
>
|
|
|
|
<Input
|
|
|
|
action="click"
|
|
|
|
className="ant-input-password"
|
|
|
|
disabled={false}
|
|
|
|
prefixCls="ant-input"
|
|
|
|
suffix={
|
|
|
|
<Icon
|
|
|
|
className="ant-input-password-icon"
|
|
|
|
onClick={[Function]}
|
2019-03-04 21:57:30 +08:00
|
|
|
onMouseDown={[Function]}
|
2019-03-14 15:34:09 +08:00
|
|
|
type="eye-invisible"
|
2018-12-05 15:47:26 +08:00
|
|
|
/>
|
|
|
|
}
|
|
|
|
type="password"
|
|
|
|
>
|
2018-12-05 19:26:32 +08:00
|
|
|
<Consumer>
|
2018-12-05 15:47:26 +08:00
|
|
|
<span
|
2018-12-05 19:26:32 +08:00
|
|
|
className="ant-input-password ant-input-affix-wrapper"
|
2018-12-05 15:47:26 +08:00
|
|
|
>
|
2018-12-05 19:26:32 +08:00
|
|
|
<input
|
|
|
|
action="click"
|
|
|
|
className="ant-input"
|
|
|
|
disabled={false}
|
2018-12-27 11:41:30 +08:00
|
|
|
onChange={[Function]}
|
2018-12-05 19:26:32 +08:00
|
|
|
onKeyDown={[Function]}
|
|
|
|
style={null}
|
|
|
|
type="password"
|
2018-12-27 11:41:30 +08:00
|
|
|
value="111"
|
2018-12-05 19:26:32 +08:00
|
|
|
/>
|
|
|
|
<span
|
|
|
|
className="ant-input-suffix"
|
2018-12-05 15:47:26 +08:00
|
|
|
>
|
2018-12-05 19:26:32 +08:00
|
|
|
<Icon
|
|
|
|
className="ant-input-password-icon"
|
|
|
|
key="passwordIcon"
|
2018-12-05 15:47:26 +08:00
|
|
|
onClick={[Function]}
|
2019-03-04 21:57:30 +08:00
|
|
|
onMouseDown={[Function]}
|
2019-03-14 15:34:09 +08:00
|
|
|
type="eye-invisible"
|
2018-12-05 15:47:26 +08:00
|
|
|
>
|
2019-01-10 18:46:57 +08:00
|
|
|
<LocaleReceiver
|
|
|
|
componentName="Icon"
|
2018-12-05 15:47:26 +08:00
|
|
|
>
|
2019-01-10 18:46:57 +08:00
|
|
|
<i
|
2019-03-14 15:34:09 +08:00
|
|
|
aria-label="icon: eye-invisible"
|
|
|
|
className="anticon anticon-eye-invisible ant-input-password-icon"
|
2019-01-10 18:46:57 +08:00
|
|
|
onClick={[Function]}
|
2019-03-04 21:57:30 +08:00
|
|
|
onMouseDown={[Function]}
|
2019-01-10 18:46:57 +08:00
|
|
|
tabIndex={-1}
|
2018-12-05 15:47:26 +08:00
|
|
|
>
|
2019-01-10 18:46:57 +08:00
|
|
|
<IconReact
|
2018-12-05 19:26:32 +08:00
|
|
|
className=""
|
2019-03-14 15:34:09 +08:00
|
|
|
type="eye-invisible-o"
|
2018-12-05 19:26:32 +08:00
|
|
|
>
|
2019-01-10 18:46:57 +08:00
|
|
|
<svg
|
|
|
|
aria-hidden="true"
|
|
|
|
className=""
|
2019-03-14 15:34:09 +08:00
|
|
|
data-icon="eye-invisible"
|
2019-01-10 18:46:57 +08:00
|
|
|
fill="currentColor"
|
2019-04-11 12:48:36 +08:00
|
|
|
focusable="false"
|
2019-01-10 18:46:57 +08:00
|
|
|
height="1em"
|
2019-03-14 15:34:09 +08:00
|
|
|
key="svg-eye-invisible"
|
2019-01-10 18:46:57 +08:00
|
|
|
viewBox="64 64 896 896"
|
|
|
|
width="1em"
|
|
|
|
>
|
|
|
|
<path
|
2019-03-14 15:34:09 +08:00
|
|
|
d="M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 0 0 0-51.5zm-63.57-320.64L836 122.88a8 8 0 0 0-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 0 0 0 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 0 0 0 11.31L155.17 889a8 8 0 0 0 11.31 0l712.15-712.12a8 8 0 0 0 0-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 0 0-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 0 1 146.2-106.69L401.31 546.2A112 112 0 0 1 396 512z"
|
|
|
|
key="svg-eye-invisible-svg-0"
|
|
|
|
/>
|
|
|
|
<path
|
|
|
|
d="M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 0 0 227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 0 1-112 112z"
|
|
|
|
key="svg-eye-invisible-svg-1"
|
2019-01-10 18:46:57 +08:00
|
|
|
/>
|
|
|
|
</svg>
|
|
|
|
</IconReact>
|
|
|
|
</i>
|
|
|
|
</LocaleReceiver>
|
2018-12-05 19:26:32 +08:00
|
|
|
</Icon>
|
|
|
|
</span>
|
2018-12-05 15:47:26 +08:00
|
|
|
</span>
|
2018-12-05 19:26:32 +08:00
|
|
|
</Consumer>
|
2018-12-05 15:47:26 +08:00
|
|
|
</Input>
|
|
|
|
</Password>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`Input.Password should change type when click 2`] = `
|
|
|
|
<Password
|
|
|
|
action="click"
|
|
|
|
inputPrefixCls="ant-input"
|
|
|
|
prefixCls="ant-input-password"
|
2018-12-05 18:13:47 +08:00
|
|
|
visibilityToggle={true}
|
2018-12-05 15:47:26 +08:00
|
|
|
>
|
|
|
|
<Input
|
|
|
|
action="click"
|
|
|
|
className="ant-input-password"
|
|
|
|
disabled={false}
|
|
|
|
prefixCls="ant-input"
|
|
|
|
suffix={
|
|
|
|
<Icon
|
|
|
|
className="ant-input-password-icon"
|
|
|
|
onClick={[Function]}
|
2019-03-04 21:57:30 +08:00
|
|
|
onMouseDown={[Function]}
|
2019-03-14 15:34:09 +08:00
|
|
|
type="eye"
|
2018-12-05 15:47:26 +08:00
|
|
|
/>
|
|
|
|
}
|
|
|
|
type="text"
|
|
|
|
>
|
2018-12-05 19:26:32 +08:00
|
|
|
<Consumer>
|
2018-12-05 15:47:26 +08:00
|
|
|
<span
|
2018-12-05 19:26:32 +08:00
|
|
|
className="ant-input-password ant-input-affix-wrapper"
|
2018-12-05 15:47:26 +08:00
|
|
|
>
|
2018-12-05 19:26:32 +08:00
|
|
|
<input
|
|
|
|
action="click"
|
|
|
|
className="ant-input"
|
|
|
|
disabled={false}
|
2018-12-27 11:41:30 +08:00
|
|
|
onChange={[Function]}
|
2018-12-05 19:26:32 +08:00
|
|
|
onKeyDown={[Function]}
|
|
|
|
style={null}
|
|
|
|
type="text"
|
2018-12-27 11:41:30 +08:00
|
|
|
value="111"
|
2018-12-05 19:26:32 +08:00
|
|
|
/>
|
|
|
|
<span
|
|
|
|
className="ant-input-suffix"
|
2018-12-05 15:47:26 +08:00
|
|
|
>
|
2018-12-05 19:26:32 +08:00
|
|
|
<Icon
|
|
|
|
className="ant-input-password-icon"
|
|
|
|
key="passwordIcon"
|
2018-12-05 15:47:26 +08:00
|
|
|
onClick={[Function]}
|
2019-03-04 21:57:30 +08:00
|
|
|
onMouseDown={[Function]}
|
2019-03-14 15:34:09 +08:00
|
|
|
type="eye"
|
2018-12-05 15:47:26 +08:00
|
|
|
>
|
2019-01-10 18:46:57 +08:00
|
|
|
<LocaleReceiver
|
|
|
|
componentName="Icon"
|
2018-12-05 15:47:26 +08:00
|
|
|
>
|
2019-01-10 18:46:57 +08:00
|
|
|
<i
|
2019-03-14 15:34:09 +08:00
|
|
|
aria-label="icon: eye"
|
|
|
|
className="anticon anticon-eye ant-input-password-icon"
|
2019-01-10 18:46:57 +08:00
|
|
|
onClick={[Function]}
|
2019-03-04 21:57:30 +08:00
|
|
|
onMouseDown={[Function]}
|
2019-01-10 18:46:57 +08:00
|
|
|
tabIndex={-1}
|
2018-12-05 15:47:26 +08:00
|
|
|
>
|
2019-01-10 18:46:57 +08:00
|
|
|
<IconReact
|
2018-12-05 19:26:32 +08:00
|
|
|
className=""
|
2019-03-14 15:34:09 +08:00
|
|
|
type="eye-o"
|
2018-12-05 19:26:32 +08:00
|
|
|
>
|
2019-01-10 18:46:57 +08:00
|
|
|
<svg
|
|
|
|
aria-hidden="true"
|
|
|
|
className=""
|
2019-03-14 15:34:09 +08:00
|
|
|
data-icon="eye"
|
2019-01-10 18:46:57 +08:00
|
|
|
fill="currentColor"
|
2019-04-11 12:48:36 +08:00
|
|
|
focusable="false"
|
2019-01-10 18:46:57 +08:00
|
|
|
height="1em"
|
2019-03-14 15:34:09 +08:00
|
|
|
key="svg-eye"
|
2019-01-10 18:46:57 +08:00
|
|
|
viewBox="64 64 896 896"
|
|
|
|
width="1em"
|
|
|
|
>
|
|
|
|
<path
|
2019-03-14 15:34:09 +08:00
|
|
|
d="M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 0 0 0 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"
|
|
|
|
key="svg-eye-svg-0"
|
2019-01-10 18:46:57 +08:00
|
|
|
/>
|
|
|
|
</svg>
|
|
|
|
</IconReact>
|
|
|
|
</i>
|
|
|
|
</LocaleReceiver>
|
2018-12-05 19:26:32 +08:00
|
|
|
</Icon>
|
|
|
|
</span>
|
2018-12-05 15:47:26 +08:00
|
|
|
</span>
|
2018-12-05 19:26:32 +08:00
|
|
|
</Consumer>
|
2018-12-05 15:47:26 +08:00
|
|
|
</Input>
|
|
|
|
</Password>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`Input.Password should change type when click 3`] = `
|
2018-12-05 18:13:47 +08:00
|
|
|
<Password
|
|
|
|
action="click"
|
|
|
|
inputPrefixCls="ant-input"
|
|
|
|
prefixCls="ant-input-password"
|
|
|
|
visibilityToggle={true}
|
2018-12-05 15:47:26 +08:00
|
|
|
>
|
|
|
|
<Input
|
|
|
|
action="click"
|
|
|
|
className="ant-input-password"
|
|
|
|
disabled={false}
|
|
|
|
prefixCls="ant-input"
|
|
|
|
suffix={
|
|
|
|
<Icon
|
|
|
|
className="ant-input-password-icon"
|
|
|
|
onClick={[Function]}
|
2019-03-04 21:57:30 +08:00
|
|
|
onMouseDown={[Function]}
|
2019-03-14 15:34:09 +08:00
|
|
|
type="eye-invisible"
|
2018-12-05 15:47:26 +08:00
|
|
|
/>
|
|
|
|
}
|
|
|
|
type="password"
|
|
|
|
>
|
2018-12-05 19:26:32 +08:00
|
|
|
<Consumer>
|
2018-12-05 15:47:26 +08:00
|
|
|
<span
|
2018-12-05 19:26:32 +08:00
|
|
|
className="ant-input-password ant-input-affix-wrapper"
|
2018-12-05 15:47:26 +08:00
|
|
|
>
|
2018-12-05 19:26:32 +08:00
|
|
|
<input
|
|
|
|
action="click"
|
|
|
|
className="ant-input"
|
|
|
|
disabled={false}
|
2018-12-27 11:41:30 +08:00
|
|
|
onChange={[Function]}
|
2018-12-05 19:26:32 +08:00
|
|
|
onKeyDown={[Function]}
|
|
|
|
style={null}
|
|
|
|
type="password"
|
2018-12-27 11:41:30 +08:00
|
|
|
value="111"
|
2018-12-05 19:26:32 +08:00
|
|
|
/>
|
|
|
|
<span
|
|
|
|
className="ant-input-suffix"
|
2018-12-05 15:47:26 +08:00
|
|
|
>
|
2018-12-05 19:26:32 +08:00
|
|
|
<Icon
|
|
|
|
className="ant-input-password-icon"
|
|
|
|
key="passwordIcon"
|
2018-12-05 15:47:26 +08:00
|
|
|
onClick={[Function]}
|
2019-03-04 21:57:30 +08:00
|
|
|
onMouseDown={[Function]}
|
2019-03-14 15:34:09 +08:00
|
|
|
type="eye-invisible"
|
2018-12-05 15:47:26 +08:00
|
|
|
>
|
2019-01-10 18:46:57 +08:00
|
|
|
<LocaleReceiver
|
|
|
|
componentName="Icon"
|
2018-12-05 15:47:26 +08:00
|
|
|
>
|
2019-01-10 18:46:57 +08:00
|
|
|
<i
|
2019-03-14 15:34:09 +08:00
|
|
|
aria-label="icon: eye-invisible"
|
|
|
|
className="anticon anticon-eye-invisible ant-input-password-icon"
|
2019-01-10 18:46:57 +08:00
|
|
|
onClick={[Function]}
|
2019-03-04 21:57:30 +08:00
|
|
|
onMouseDown={[Function]}
|
2019-01-10 18:46:57 +08:00
|
|
|
tabIndex={-1}
|
2018-12-05 15:47:26 +08:00
|
|
|
>
|
2019-01-10 18:46:57 +08:00
|
|
|
<IconReact
|
2018-12-05 19:26:32 +08:00
|
|
|
className=""
|
2019-03-14 15:34:09 +08:00
|
|
|
type="eye-invisible-o"
|
2018-12-05 19:26:32 +08:00
|
|
|
>
|
2019-01-10 18:46:57 +08:00
|
|
|
<svg
|
|
|
|
aria-hidden="true"
|
|
|
|
className=""
|
2019-03-14 15:34:09 +08:00
|
|
|
data-icon="eye-invisible"
|
2019-01-10 18:46:57 +08:00
|
|
|
fill="currentColor"
|
2019-04-11 12:48:36 +08:00
|
|
|
focusable="false"
|
2019-01-10 18:46:57 +08:00
|
|
|
height="1em"
|
2019-03-14 15:34:09 +08:00
|
|
|
key="svg-eye-invisible"
|
2019-01-10 18:46:57 +08:00
|
|
|
viewBox="64 64 896 896"
|
|
|
|
width="1em"
|
|
|
|
>
|
|
|
|
<path
|
2019-03-14 15:34:09 +08:00
|
|
|
d="M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 0 0 0-51.5zm-63.57-320.64L836 122.88a8 8 0 0 0-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 0 0 0 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 0 0 0 11.31L155.17 889a8 8 0 0 0 11.31 0l712.15-712.12a8 8 0 0 0 0-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 0 0-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 0 1 146.2-106.69L401.31 546.2A112 112 0 0 1 396 512z"
|
|
|
|
key="svg-eye-invisible-svg-0"
|
|
|
|
/>
|
|
|
|
<path
|
|
|
|
d="M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 0 0 227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 0 1-112 112z"
|
|
|
|
key="svg-eye-invisible-svg-1"
|
2019-01-10 18:46:57 +08:00
|
|
|
/>
|
|
|
|
</svg>
|
|
|
|
</IconReact>
|
|
|
|
</i>
|
|
|
|
</LocaleReceiver>
|
2018-12-05 19:26:32 +08:00
|
|
|
</Icon>
|
|
|
|
</span>
|
2018-12-05 15:47:26 +08:00
|
|
|
</span>
|
2018-12-05 19:26:32 +08:00
|
|
|
</Consumer>
|
2018-12-05 15:47:26 +08:00
|
|
|
</Input>
|
|
|
|
</Password>
|
|
|
|
`;
|
|
|
|
|
2017-11-01 12:12:16 +08:00
|
|
|
exports[`Input.Search should support suffix 1`] = `
|
|
|
|
<Search
|
2017-11-06 19:00:36 +08:00
|
|
|
enterButton={false}
|
2017-11-01 12:12:16 +08:00
|
|
|
suffix="suffix"
|
|
|
|
>
|
2018-12-05 19:12:18 +08:00
|
|
|
<Consumer>
|
|
|
|
<Input
|
|
|
|
className="ant-input-search"
|
|
|
|
disabled={false}
|
|
|
|
onPressEnter={[Function]}
|
|
|
|
prefixCls="ant-input"
|
|
|
|
suffix={
|
|
|
|
Array [
|
|
|
|
"suffix",
|
|
|
|
<Icon
|
|
|
|
className="ant-input-search-icon"
|
|
|
|
onClick={[Function]}
|
|
|
|
type="search"
|
|
|
|
/>,
|
|
|
|
]
|
|
|
|
}
|
|
|
|
type="text"
|
2017-11-01 12:12:16 +08:00
|
|
|
>
|
2018-12-05 19:12:18 +08:00
|
|
|
<Consumer>
|
|
|
|
<span
|
|
|
|
className="ant-input-search ant-input-affix-wrapper"
|
2017-11-01 12:12:16 +08:00
|
|
|
>
|
2018-12-05 19:12:18 +08:00
|
|
|
<input
|
|
|
|
className="ant-input"
|
|
|
|
disabled={false}
|
2018-12-27 11:41:30 +08:00
|
|
|
onChange={[Function]}
|
2018-12-05 19:12:18 +08:00
|
|
|
onKeyDown={[Function]}
|
|
|
|
style={null}
|
|
|
|
type="text"
|
2018-12-27 11:41:30 +08:00
|
|
|
value=""
|
2018-12-05 19:12:18 +08:00
|
|
|
/>
|
|
|
|
<span
|
|
|
|
className="ant-input-suffix"
|
2018-07-18 10:33:54 +08:00
|
|
|
>
|
2018-12-05 19:12:18 +08:00
|
|
|
suffix
|
|
|
|
<Icon
|
|
|
|
className="ant-input-search-icon"
|
|
|
|
key="searchIcon"
|
|
|
|
onClick={[Function]}
|
|
|
|
type="search"
|
2018-09-02 19:53:29 +08:00
|
|
|
>
|
2019-01-10 18:46:57 +08:00
|
|
|
<LocaleReceiver
|
|
|
|
componentName="Icon"
|
2018-09-02 19:53:29 +08:00
|
|
|
>
|
2019-01-10 18:46:57 +08:00
|
|
|
<i
|
|
|
|
aria-label="icon: search"
|
|
|
|
className="anticon anticon-search ant-input-search-icon"
|
|
|
|
onClick={[Function]}
|
|
|
|
tabIndex={-1}
|
2018-12-05 19:12:18 +08:00
|
|
|
>
|
2019-01-10 18:46:57 +08:00
|
|
|
<IconReact
|
2018-12-05 19:12:18 +08:00
|
|
|
className=""
|
2019-01-10 18:46:57 +08:00
|
|
|
type="search-o"
|
2018-12-05 19:12:18 +08:00
|
|
|
>
|
2019-01-10 18:46:57 +08:00
|
|
|
<svg
|
|
|
|
aria-hidden="true"
|
|
|
|
className=""
|
|
|
|
data-icon="search"
|
|
|
|
fill="currentColor"
|
2019-04-11 12:48:36 +08:00
|
|
|
focusable="false"
|
2019-01-10 18:46:57 +08:00
|
|
|
height="1em"
|
|
|
|
key="svg-search"
|
|
|
|
viewBox="64 64 896 896"
|
|
|
|
width="1em"
|
|
|
|
>
|
|
|
|
<path
|
|
|
|
d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0 0 11.6 0l43.6-43.5a8.2 8.2 0 0 0 0-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"
|
|
|
|
key="svg-search-svg-0"
|
|
|
|
/>
|
|
|
|
</svg>
|
|
|
|
</IconReact>
|
|
|
|
</i>
|
|
|
|
</LocaleReceiver>
|
2018-12-05 19:12:18 +08:00
|
|
|
</Icon>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</Consumer>
|
|
|
|
</Input>
|
|
|
|
</Consumer>
|
2017-11-01 12:12:16 +08:00
|
|
|
</Search>
|
|
|
|
`;
|
|
|
|
|
2017-07-21 20:23:38 +08:00
|
|
|
exports[`TextArea should support disabled 1`] = `
|
|
|
|
<TextArea
|
|
|
|
disabled={true}
|
|
|
|
>
|
2018-12-05 19:12:18 +08:00
|
|
|
<Consumer>
|
2019-02-19 11:42:05 +08:00
|
|
|
<ReactResizeObserver
|
2018-12-05 19:12:18 +08:00
|
|
|
disabled={true}
|
2019-02-19 11:42:05 +08:00
|
|
|
onResize={[Function]}
|
|
|
|
>
|
|
|
|
<textarea
|
|
|
|
className="ant-input ant-input-disabled"
|
|
|
|
disabled={true}
|
|
|
|
onChange={[Function]}
|
|
|
|
onKeyDown={[Function]}
|
|
|
|
style={Object {}}
|
|
|
|
/>
|
|
|
|
</ReactResizeObserver>
|
2018-12-05 19:12:18 +08:00
|
|
|
</Consumer>
|
2017-07-21 20:23:38 +08:00
|
|
|
</TextArea>
|
|
|
|
`;
|
2017-09-27 09:56:30 +08:00
|
|
|
|
|
|
|
exports[`TextArea should support maxLength 1`] = `
|
|
|
|
<TextArea
|
2018-12-28 14:40:10 +08:00
|
|
|
maxLength={10}
|
2017-09-27 09:56:30 +08:00
|
|
|
>
|
2018-12-05 19:12:18 +08:00
|
|
|
<Consumer>
|
2019-02-19 11:42:05 +08:00
|
|
|
<ReactResizeObserver
|
|
|
|
disabled={true}
|
|
|
|
onResize={[Function]}
|
|
|
|
>
|
|
|
|
<textarea
|
|
|
|
className="ant-input"
|
|
|
|
maxLength={10}
|
|
|
|
onChange={[Function]}
|
|
|
|
onKeyDown={[Function]}
|
|
|
|
style={Object {}}
|
|
|
|
/>
|
|
|
|
</ReactResizeObserver>
|
2018-12-05 19:12:18 +08:00
|
|
|
</Consumer>
|
2017-09-27 09:56:30 +08:00
|
|
|
</TextArea>
|
|
|
|
`;
|