ant-design/components/input/__tests__/__snapshots__/demo.test.js.snap

775 lines
17 KiB
Plaintext
Raw Normal View History

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/input/demo/addon.md correctly 1`] = `
2016-11-22 14:28:05 +08:00
<div>
<div
2017-09-20 16:26:18 +08:00
style="margin-bottom:16px"
>
2016-11-22 14:28:05 +08:00
<span
2017-05-28 15:30:43 +08:00
class="ant-input-group-wrapper"
>
2016-11-22 14:28:05 +08:00
<span
2017-05-28 15:30:43 +08:00
class="ant-input-wrapper ant-input-group"
>
2017-05-28 15:30:43 +08:00
<span
class="ant-input-group-addon"
>
Http://
</span>
<input
class="ant-input"
type="text"
value="mysite"
/>
<span
class="ant-input-group-addon"
>
.com
</span>
2016-11-22 14:28:05 +08:00
</span>
</span>
</div>
<div
2017-09-20 16:26:18 +08:00
style="margin-bottom:16px"
>
2016-11-22 14:28:05 +08:00
<span
2017-05-28 15:30:43 +08:00
class="ant-input-group-wrapper"
>
2016-11-22 14:28:05 +08:00
<span
2017-05-28 15:30:43 +08:00
class="ant-input-wrapper ant-input-group"
>
2017-05-28 15:30:43 +08:00
<span
class="ant-input-group-addon"
>
2016-11-22 14:28:05 +08:00
<div
2017-05-28 15:30:43 +08:00
class="ant-select ant-select-enabled"
style="width:90px"
>
2016-11-22 14:28:05 +08:00
<div
2017-05-28 15:30:43 +08:00
aria-autocomplete="list"
aria-expanded="false"
aria-haspopup="true"
class="ant-select-selection
2017-10-09 13:32:11 +08:00
ant-select-selection--single"
2017-05-28 15:30:43 +08:00
role="combobox"
tabindex="0"
>
2016-11-22 14:28:05 +08:00
<div
2017-05-28 15:30:43 +08:00
class="ant-select-selection__rendered"
>
2017-05-28 15:30:43 +08:00
<div
class="ant-select-selection-selected-value"
2017-09-20 16:26:18 +08:00
style="display:block;opacity:1"
2017-05-28 15:30:43 +08:00
title="Http://"
>
Http://
</div>
2016-11-22 14:28:05 +08:00
</div>
2017-05-28 15:30:43 +08:00
<span
class="ant-select-arrow"
2017-09-20 16:26:18 +08:00
style="user-select:none;-webkit-user-select:none"
2017-05-28 15:30:43 +08:00
unselectable="unselectable"
>
<b />
</span>
2016-11-22 14:28:05 +08:00
</div>
</div>
2017-05-28 15:30:43 +08:00
</span>
<input
class="ant-input"
type="text"
value="mysite"
/>
<span
class="ant-input-group-addon"
>
2016-11-22 14:28:05 +08:00
<div
2017-05-28 15:30:43 +08:00
class="ant-select ant-select-enabled"
style="width:80px"
>
2016-11-22 14:28:05 +08:00
<div
2017-05-28 15:30:43 +08:00
aria-autocomplete="list"
aria-expanded="false"
aria-haspopup="true"
class="ant-select-selection
2017-10-09 13:32:11 +08:00
ant-select-selection--single"
2017-05-28 15:30:43 +08:00
role="combobox"
tabindex="0"
>
2016-11-22 14:28:05 +08:00
<div
2017-05-28 15:30:43 +08:00
class="ant-select-selection__rendered"
>
2017-05-28 15:30:43 +08:00
<div
class="ant-select-selection-selected-value"
2017-09-20 16:26:18 +08:00
style="display:block;opacity:1"
2017-05-28 15:30:43 +08:00
title=".com"
>
.com
</div>
2016-11-22 14:28:05 +08:00
</div>
2017-05-28 15:30:43 +08:00
<span
class="ant-select-arrow"
2017-09-20 16:26:18 +08:00
style="user-select:none;-webkit-user-select:none"
2017-05-28 15:30:43 +08:00
unselectable="unselectable"
>
<b />
</span>
2016-11-22 14:28:05 +08:00
</div>
</div>
2017-05-28 15:30:43 +08:00
</span>
2016-11-22 14:28:05 +08:00
</span>
</span>
</div>
<div
2017-09-20 16:26:18 +08:00
style="margin-bottom:16px"
>
2016-11-22 14:28:05 +08:00
<span
2017-05-28 15:30:43 +08:00
class="ant-input-group-wrapper"
>
2016-11-22 14:28:05 +08:00
<span
2017-05-28 15:30:43 +08:00
class="ant-input-wrapper ant-input-group"
>
2017-05-28 15:30:43 +08:00
<input
class="ant-input"
type="text"
value="mysite"
/>
2017-05-28 15:30:43 +08:00
<span
class="ant-input-group-addon"
>
<i
class="anticon anticon-setting"
/>
</span>
2016-11-22 14:28:05 +08:00
</span>
</span>
</div>
</div>
`;
exports[`renders ./components/input/demo/autosize-textarea.md correctly 1`] = `
2016-11-22 14:28:05 +08:00
<div>
2016-12-04 16:57:38 +08:00
<textarea
class="ant-input"
placeholder="Autosize height based on content lines"
/>
2016-11-22 14:28:05 +08:00
<div
2017-09-20 16:26:18 +08:00
style="margin:24px 0"
/>
2016-12-04 16:57:38 +08:00
<textarea
class="ant-input"
placeholder="Autosize height with minimum and maximum number of lines"
/>
2016-11-22 14:28:05 +08:00
</div>
`;
exports[`renders ./components/input/demo/basic.md correctly 1`] = `
2016-12-04 16:57:38 +08:00
<input
class="ant-input"
placeholder="Basic usage"
type="text"
/>
2016-11-22 14:28:05 +08:00
`;
exports[`renders ./components/input/demo/group.md correctly 1`] = `
2016-11-22 14:28:05 +08:00
<div>
<span
class="ant-input-group ant-input-group-lg"
>
2016-11-22 14:28:05 +08:00
<div
2018-03-02 15:26:05 +08:00
class="ant-col-5"
>
2016-12-04 16:57:38 +08:00
<input
class="ant-input"
type="text"
value="0571"
/>
2016-11-22 14:28:05 +08:00
</div>
<div
class="ant-col-8"
>
2016-12-04 16:57:38 +08:00
<input
class="ant-input"
type="text"
value="26888888"
/>
2016-11-22 14:28:05 +08:00
</div>
</span>
<br />
<span
class="ant-input-group ant-input-group-compact"
>
<input
class="ant-input"
2017-09-20 16:26:18 +08:00
style="width:20%"
type="text"
value="0571"
/>
<input
class="ant-input"
2017-09-20 16:26:18 +08:00
style="width:30%"
type="text"
value="26888888"
/>
</span>
<br />
<span
class="ant-input-group ant-input-group-compact"
>
<div
class="ant-select ant-select-enabled"
>
<div
aria-autocomplete="list"
aria-expanded="false"
aria-haspopup="true"
class="ant-select-selection
2017-10-09 13:32:11 +08:00
ant-select-selection--single"
role="combobox"
tabindex="0"
>
<div
class="ant-select-selection__rendered"
>
<div
class="ant-select-selection-selected-value"
2017-09-20 16:26:18 +08:00
style="display:block;opacity:1"
title="Zhejiang"
>
Zhejiang
</div>
</div>
<span
class="ant-select-arrow"
2017-09-20 16:26:18 +08:00
style="user-select:none;-webkit-user-select:none"
unselectable="unselectable"
>
<b />
</span>
</div>
</div>
<input
class="ant-input"
2017-09-20 16:26:18 +08:00
style="width:50%"
type="text"
value="Xihu District, Hangzhou"
/>
</span>
<br />
<span
class="ant-input-group ant-input-group-compact"
>
<div
class="ant-select ant-select-enabled"
>
<div
aria-autocomplete="list"
aria-expanded="false"
aria-haspopup="true"
class="ant-select-selection
2017-10-09 13:32:11 +08:00
ant-select-selection--single"
role="combobox"
tabindex="0"
>
<div
class="ant-select-selection__rendered"
>
<div
class="ant-select-selection-selected-value"
2017-09-20 16:26:18 +08:00
style="display:block;opacity:1"
title="Option1"
>
Option1
</div>
</div>
<span
class="ant-select-arrow"
2017-09-20 16:26:18 +08:00
style="user-select:none;-webkit-user-select:none"
unselectable="unselectable"
>
<b />
</span>
</div>
</div>
<input
class="ant-input"
2017-09-20 16:26:18 +08:00
style="width:50%"
type="text"
value="input content"
/>
<div
class="ant-input-number"
>
<div
class="ant-input-number-handler-wrap"
>
<span
2017-04-24 17:08:56 +08:00
aria-disabled="false"
aria-label="Increase Value"
2017-04-10 13:21:15 +08:00
class="ant-input-number-handler ant-input-number-handler-up "
2017-04-24 17:08:56 +08:00
role="button"
unselectable="unselectable"
>
<span
class="ant-input-number-handler-up-inner"
unselectable="unselectable"
/>
</span>
<span
2017-04-24 17:08:56 +08:00
aria-disabled="false"
aria-label="Decrease Value"
2017-04-10 13:21:15 +08:00
class="ant-input-number-handler ant-input-number-handler-down "
2017-04-24 17:08:56 +08:00
role="button"
unselectable="unselectable"
>
<span
class="ant-input-number-handler-down-inner"
unselectable="unselectable"
/>
</span>
</div>
<div
aria-valuemin="-9007199254740991"
class="ant-input-number-input-wrap"
2017-04-24 17:08:56 +08:00
role="spinbutton"
>
<input
autocomplete="off"
class="ant-input-number-input"
min="-9007199254740991"
2017-08-18 12:17:07 +08:00
step="1"
value=""
/>
</div>
</div>
</span>
<br />
<span
class="ant-input-group ant-input-group-compact"
>
<input
class="ant-input"
2017-09-20 16:26:18 +08:00
style="width:50%"
type="text"
value="input content"
/>
<span
class="ant-calendar-picker"
>
2017-06-03 01:38:26 +08:00
<div>
<input
class="ant-calendar-picker-input ant-input"
placeholder="Select date"
readonly=""
value=""
/>
<span
class="ant-calendar-picker-icon"
/>
2017-06-03 01:38:26 +08:00
</div>
</span>
</span>
<br />
<span
class="ant-input-group ant-input-group-compact"
>
<div
class="ant-select ant-select-enabled"
>
<div
aria-autocomplete="list"
aria-expanded="false"
aria-haspopup="true"
class="ant-select-selection
2017-10-09 13:32:11 +08:00
ant-select-selection--single"
role="combobox"
tabindex="0"
>
<div
class="ant-select-selection__rendered"
>
<div
class="ant-select-selection-selected-value"
2017-09-20 16:26:18 +08:00
style="display:block;opacity:1"
title="Option1-1"
>
Option1-1
</div>
</div>
<span
class="ant-select-arrow"
2017-09-20 16:26:18 +08:00
style="user-select:none;-webkit-user-select:none"
unselectable="unselectable"
>
<b />
</span>
</div>
</div>
<div
class="ant-select ant-select-enabled"
>
<div
aria-autocomplete="list"
aria-expanded="false"
aria-haspopup="true"
class="ant-select-selection
2017-10-09 13:32:11 +08:00
ant-select-selection--single"
role="combobox"
tabindex="0"
>
<div
class="ant-select-selection__rendered"
>
<div
class="ant-select-selection-selected-value"
2017-09-20 16:26:18 +08:00
style="display:block;opacity:1"
title="Option2-2"
>
Option2-2
</div>
</div>
<span
class="ant-select-arrow"
2017-09-20 16:26:18 +08:00
style="user-select:none;-webkit-user-select:none"
unselectable="unselectable"
>
<b />
</span>
</div>
</div>
</span>
<br />
2017-04-19 11:31:28 +08:00
<span
class="ant-input-group ant-input-group-compact"
>
<div
class="ant-select ant-select-enabled"
>
<div
aria-autocomplete="list"
aria-expanded="false"
aria-haspopup="true"
class="ant-select-selection
2017-10-09 13:32:11 +08:00
ant-select-selection--single"
2017-04-19 11:31:28 +08:00
role="combobox"
tabindex="0"
>
<div
class="ant-select-selection__rendered"
>
<div
class="ant-select-selection-selected-value"
2017-09-20 16:26:18 +08:00
style="display:block;opacity:1"
title="Between"
2017-04-19 11:31:28 +08:00
>
Between
2017-04-19 11:31:28 +08:00
</div>
</div>
<span
class="ant-select-arrow"
2017-09-20 16:26:18 +08:00
style="user-select:none;-webkit-user-select:none"
2017-04-19 11:31:28 +08:00
unselectable="unselectable"
>
<b />
</span>
</div>
</div>
<input
class="ant-input"
placeholder="Minimum"
2017-09-20 16:26:18 +08:00
style="width:100px;text-align:center"
2017-04-19 11:31:28 +08:00
type="text"
/>
<input
2017-08-04 21:25:21 +08:00
class="ant-input ant-input-disabled"
disabled=""
2017-04-19 11:31:28 +08:00
placeholder="~"
2018-01-10 17:07:54 +08:00
style="width:30px;border-left:0;pointer-events:none;background-color:#fff"
2017-04-19 11:31:28 +08:00
type="text"
/>
<input
class="ant-input"
placeholder="Maximum"
2017-09-20 16:26:18 +08:00
style="width:100px;text-align:center;border-left:0"
2017-04-19 11:31:28 +08:00
type="text"
/>
</span>
<br />
<span
class="ant-input-group ant-input-group-compact"
>
<div
class="ant-select ant-select-enabled"
>
<div
aria-autocomplete="list"
aria-expanded="false"
aria-haspopup="true"
class="ant-select-selection
2017-10-09 13:32:11 +08:00
ant-select-selection--single"
role="combobox"
tabindex="0"
>
<div
class="ant-select-selection__rendered"
>
<div
class="ant-select-selection-selected-value"
2017-09-20 16:26:18 +08:00
style="display:block;opacity:1"
title="Sign Up"
>
Sign Up
</div>
</div>
<span
class="ant-select-arrow"
2017-09-20 16:26:18 +08:00
style="user-select:none;-webkit-user-select:none"
unselectable="unselectable"
>
<b />
</span>
</div>
</div>
<div
class="ant-select-show-search ant-select-auto-complete ant-select ant-select-combobox ant-select-enabled"
2017-09-20 16:26:18 +08:00
style="width:200px"
>
<div
aria-autocomplete="list"
aria-expanded="false"
aria-haspopup="true"
class="ant-select-selection
2017-10-09 13:32:11 +08:00
ant-select-selection--single"
role="combobox"
>
<div
class="ant-select-selection__rendered"
>
<div
class="ant-select-selection__placeholder"
2017-09-20 16:26:18 +08:00
style="display:block;user-select:none;-webkit-user-select:none"
unselectable="unselectable"
>
Email
</div>
<ul>
<li
class="ant-select-search ant-select-search--inline"
>
<div
class="ant-select-search__field__wrap"
>
<input
2017-07-12 21:44:46 +08:00
class="ant-input ant-select-search__field"
type="text"
value=""
/>
<span
class="ant-select-search__field__mirror"
>
 
</span>
</div>
</li>
</ul>
</div>
<span
class="ant-select-arrow"
2017-09-20 16:26:18 +08:00
style="user-select:none;-webkit-user-select:none"
unselectable="unselectable"
>
<b />
</span>
</div>
</div>
</span>
2017-04-26 15:17:35 +08:00
<br />
<span
class="ant-input-group ant-input-group-compact"
>
<div
class="ant-select ant-select-enabled"
2017-09-20 16:26:18 +08:00
style="width:30%"
2017-04-26 15:17:35 +08:00
>
<div
aria-autocomplete="list"
aria-expanded="false"
aria-haspopup="true"
class="ant-select-selection
2017-10-09 13:32:11 +08:00
ant-select-selection--single"
2017-04-26 15:17:35 +08:00
role="combobox"
tabindex="0"
>
<div
class="ant-select-selection__rendered"
>
<div
class="ant-select-selection-selected-value"
2017-09-20 16:26:18 +08:00
style="display:block;opacity:1"
2017-04-26 15:17:35 +08:00
title="Home"
>
Home
</div>
</div>
<span
class="ant-select-arrow"
2017-09-20 16:26:18 +08:00
style="user-select:none;-webkit-user-select:none"
2017-04-26 15:17:35 +08:00
unselectable="unselectable"
>
<b />
</span>
</div>
</div>
<span
class="ant-cascader-picker"
2017-09-20 16:26:18 +08:00
style="width:70%"
2017-04-26 15:17:35 +08:00
tabindex="0"
>
<span
class="ant-cascader-picker-label"
/>
2017-04-26 15:17:35 +08:00
<input
autocomplete="off"
class="ant-input ant-cascader-input "
placeholder="Select Address"
readonly=""
type="text"
value=""
/>
<i
class="anticon anticon-down ant-cascader-picker-arrow"
/>
</span>
</span>
2016-11-22 14:28:05 +08:00
</div>
`;
exports[`renders ./components/input/demo/presuffix.md correctly 1`] = `
2017-01-05 17:24:14 +08:00
<span
class="ant-input-affix-wrapper"
>
2017-01-05 17:24:14 +08:00
<span
class="ant-input-prefix"
>
2017-01-05 17:24:14 +08:00
<i
class="anticon anticon-user"
style="color:rgba(0,0,0,.25)"
/>
2017-01-05 17:24:14 +08:00
</span>
<input
class="ant-input"
placeholder="Enter your username"
2017-01-05 17:24:14 +08:00
type="text"
value=""
/>
2017-01-05 17:24:14 +08:00
</span>
`;
exports[`renders ./components/input/demo/search-input.md correctly 1`] = `
<div>
<span
class="ant-input-search ant-input-affix-wrapper"
2017-09-20 16:26:18 +08:00
style="width:200px"
>
<input
class="ant-input"
placeholder="input search text"
type="text"
/>
<span
class="ant-input-suffix"
>
<i
class="anticon anticon-search ant-input-search-icon"
/>
</span>
</span>
<br />
<br />
<span
class="ant-input-search ant-input-search-enter-button ant-input-affix-wrapper"
>
<input
class="ant-input"
placeholder="input search text"
type="text"
/>
<span
class="ant-input-suffix"
>
<button
class="ant-btn ant-input-search-button ant-btn-primary"
type="button"
>
<i
class="anticon anticon-search"
/>
</button>
</span>
</span>
<br />
<br />
<span
class="ant-input-search ant-input-search-enter-button ant-input-search-large ant-input-affix-wrapper ant-input-affix-wrapper-lg"
>
<input
class="ant-input ant-input-lg"
placeholder="input search text"
type="text"
/>
<span
class="ant-input-suffix"
>
<button
class="ant-btn ant-input-search-button ant-btn-primary ant-btn-lg"
type="button"
>
<span>
Search
</span>
</button>
</span>
</span>
</div>
2016-11-22 14:28:05 +08:00
`;
exports[`renders ./components/input/demo/size.md correctly 1`] = `
2016-11-22 14:28:05 +08:00
<div
class="example-input"
>
2016-12-04 16:57:38 +08:00
<input
class="ant-input ant-input-lg"
placeholder="large size"
type="text"
/>
2016-12-04 16:57:38 +08:00
<input
class="ant-input"
placeholder="default size"
type="text"
/>
2016-12-04 16:57:38 +08:00
<input
class="ant-input ant-input-sm"
placeholder="small size"
type="text"
/>
2016-11-22 14:28:05 +08:00
</div>
`;
exports[`renders ./components/input/demo/textarea.md correctly 1`] = `
2016-12-04 16:57:38 +08:00
<textarea
class="ant-input"
rows="4"
/>
2016-11-22 14:28:05 +08:00
`;
exports[`renders ./components/input/demo/tooltip.md correctly 1`] = `
2017-02-19 15:21:46 +08:00
<input
class="ant-input"
maxlength="25"
placeholder="Input a number"
2017-09-20 16:26:18 +08:00
style="width:120px"
2017-02-19 15:21:46 +08:00
type="text"
value=""
/>
`;