Skip to content

Commit

Permalink
feat: InputNumber support stringMode (ant-design#29373)
Browse files Browse the repository at this point in the history
* add input-number demo

* update snapshot

* update demo

* docs: Update desc

* update doc

* clean up React useLayoutEffect warning

* fix ts definition

* re-trigger

* update rc-uitl version

* bump rc-input-number

* update

* update

* fix ts

* update demo snapshot

* update doc

* update demo
  • Loading branch information
zombieJ authored Feb 22, 2021
1 parent 1558048 commit bec5a08
Show file tree
Hide file tree
Showing 16 changed files with 353 additions and 216 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14108,6 +14108,7 @@ exports[`ConfigProvider components InputNumber configProvider 1`] = `
class="config-input-number-handler-wrap"
>
<span
aria-disabled="false"
aria-label="Increase Value"
class="config-input-number-handler config-input-number-handler-up"
role="button"
Expand All @@ -14134,6 +14135,7 @@ exports[`ConfigProvider components InputNumber configProvider 1`] = `
</span>
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="config-input-number-handler config-input-number-handler-down"
role="button"
Expand Down Expand Up @@ -14164,12 +14166,8 @@ exports[`ConfigProvider components InputNumber configProvider 1`] = `
class="config-input-number-input-wrap"
>
<input
aria-valuemax="9007199254740991"
aria-valuemin="-9007199254740991"
autocomplete="off"
class="config-input-number-input"
max="9007199254740991"
min="-9007199254740991"
role="spinbutton"
step="1"
value=""
Expand All @@ -14186,6 +14184,7 @@ exports[`ConfigProvider components InputNumber configProvider componentSize larg
class="config-input-number-handler-wrap"
>
<span
aria-disabled="false"
aria-label="Increase Value"
class="config-input-number-handler config-input-number-handler-up"
role="button"
Expand All @@ -14212,6 +14211,7 @@ exports[`ConfigProvider components InputNumber configProvider componentSize larg
</span>
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="config-input-number-handler config-input-number-handler-down"
role="button"
Expand Down Expand Up @@ -14242,12 +14242,8 @@ exports[`ConfigProvider components InputNumber configProvider componentSize larg
class="config-input-number-input-wrap"
>
<input
aria-valuemax="9007199254740991"
aria-valuemin="-9007199254740991"
autocomplete="off"
class="config-input-number-input"
max="9007199254740991"
min="-9007199254740991"
role="spinbutton"
step="1"
value=""
Expand All @@ -14264,6 +14260,7 @@ exports[`ConfigProvider components InputNumber configProvider componentSize midd
class="config-input-number-handler-wrap"
>
<span
aria-disabled="false"
aria-label="Increase Value"
class="config-input-number-handler config-input-number-handler-up"
role="button"
Expand All @@ -14290,6 +14287,7 @@ exports[`ConfigProvider components InputNumber configProvider componentSize midd
</span>
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="config-input-number-handler config-input-number-handler-down"
role="button"
Expand Down Expand Up @@ -14320,12 +14318,8 @@ exports[`ConfigProvider components InputNumber configProvider componentSize midd
class="config-input-number-input-wrap"
>
<input
aria-valuemax="9007199254740991"
aria-valuemin="-9007199254740991"
autocomplete="off"
class="config-input-number-input"
max="9007199254740991"
min="-9007199254740991"
role="spinbutton"
step="1"
value=""
Expand All @@ -14342,6 +14336,7 @@ exports[`ConfigProvider components InputNumber configProvider virtual and dropdo
class="ant-input-number-handler-wrap"
>
<span
aria-disabled="false"
aria-label="Increase Value"
class="ant-input-number-handler ant-input-number-handler-up"
role="button"
Expand All @@ -14368,6 +14363,7 @@ exports[`ConfigProvider components InputNumber configProvider virtual and dropdo
</span>
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-handler ant-input-number-handler-down"
role="button"
Expand Down Expand Up @@ -14398,12 +14394,8 @@ exports[`ConfigProvider components InputNumber configProvider virtual and dropdo
class="ant-input-number-input-wrap"
>
<input
aria-valuemax="9007199254740991"
aria-valuemin="-9007199254740991"
autocomplete="off"
class="ant-input-number-input"
max="9007199254740991"
min="-9007199254740991"
role="spinbutton"
step="1"
value=""
Expand All @@ -14420,6 +14412,7 @@ exports[`ConfigProvider components InputNumber normal 1`] = `
class="ant-input-number-handler-wrap"
>
<span
aria-disabled="false"
aria-label="Increase Value"
class="ant-input-number-handler ant-input-number-handler-up"
role="button"
Expand All @@ -14446,6 +14439,7 @@ exports[`ConfigProvider components InputNumber normal 1`] = `
</span>
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-handler ant-input-number-handler-down"
role="button"
Expand Down Expand Up @@ -14476,12 +14470,8 @@ exports[`ConfigProvider components InputNumber normal 1`] = `
class="ant-input-number-input-wrap"
>
<input
aria-valuemax="9007199254740991"
aria-valuemin="-9007199254740991"
autocomplete="off"
class="ant-input-number-input"
max="9007199254740991"
min="-9007199254740991"
role="spinbutton"
step="1"
value=""
Expand All @@ -14498,6 +14488,7 @@ exports[`ConfigProvider components InputNumber prefixCls 1`] = `
class="prefix-InputNumber-handler-wrap"
>
<span
aria-disabled="false"
aria-label="Increase Value"
class="prefix-InputNumber-handler prefix-InputNumber-handler-up"
role="button"
Expand All @@ -14524,6 +14515,7 @@ exports[`ConfigProvider components InputNumber prefixCls 1`] = `
</span>
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="prefix-InputNumber-handler prefix-InputNumber-handler-down"
role="button"
Expand Down Expand Up @@ -14554,12 +14546,8 @@ exports[`ConfigProvider components InputNumber prefixCls 1`] = `
class="prefix-InputNumber-input-wrap"
>
<input
aria-valuemax="9007199254740991"
aria-valuemin="-9007199254740991"
autocomplete="off"
class="prefix-InputNumber-input"
max="9007199254740991"
min="-9007199254740991"
role="spinbutton"
step="1"
value=""
Expand Down
26 changes: 10 additions & 16 deletions components/form/__tests__/__snapshots__/demo.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2640,6 +2640,7 @@ exports[`renders ./components/form/demo/nest-messages.md correctly 1`] = `
class="ant-input-number-handler-wrap"
>
<span
aria-disabled="false"
aria-label="Increase Value"
class="ant-input-number-handler ant-input-number-handler-up"
role="button"
Expand All @@ -2666,6 +2667,7 @@ exports[`renders ./components/form/demo/nest-messages.md correctly 1`] = `
</span>
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-handler ant-input-number-handler-down"
role="button"
Expand Down Expand Up @@ -2696,13 +2698,9 @@ exports[`renders ./components/form/demo/nest-messages.md correctly 1`] = `
class="ant-input-number-input-wrap"
>
<input
aria-valuemax="9007199254740991"
aria-valuemin="-9007199254740991"
autocomplete="off"
class="ant-input-number-input"
id="nest-messages_user_age"
max="9007199254740991"
min="-9007199254740991"
role="spinbutton"
step="1"
value=""
Expand Down Expand Up @@ -4347,6 +4345,7 @@ exports[`renders ./components/form/demo/size.md correctly 1`] = `
class="ant-input-number-handler-wrap"
>
<span
aria-disabled="false"
aria-label="Increase Value"
class="ant-input-number-handler ant-input-number-handler-up"
role="button"
Expand All @@ -4373,6 +4372,7 @@ exports[`renders ./components/form/demo/size.md correctly 1`] = `
</span>
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-handler ant-input-number-handler-down"
role="button"
Expand Down Expand Up @@ -4403,12 +4403,8 @@ exports[`renders ./components/form/demo/size.md correctly 1`] = `
class="ant-input-number-input-wrap"
>
<input
aria-valuemax="9007199254740991"
aria-valuemin="-9007199254740991"
autocomplete="off"
class="ant-input-number-input"
max="9007199254740991"
min="-9007199254740991"
role="spinbutton"
step="1"
value=""
Expand Down Expand Up @@ -5243,6 +5239,7 @@ exports[`renders ./components/form/demo/validate-other.md correctly 1`] = `
class="ant-input-number-handler-wrap"
>
<span
aria-disabled="false"
aria-label="Increase Value"
class="ant-input-number-handler ant-input-number-handler-up"
role="button"
Expand All @@ -5269,6 +5266,7 @@ exports[`renders ./components/form/demo/validate-other.md correctly 1`] = `
</span>
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-handler ant-input-number-handler-down"
role="button"
Expand Down Expand Up @@ -5305,8 +5303,6 @@ exports[`renders ./components/form/demo/validate-other.md correctly 1`] = `
autocomplete="off"
class="ant-input-number-input"
id="validate_other_input-number"
max="10"
min="1"
role="spinbutton"
step="1"
value="3"
Expand Down Expand Up @@ -7267,6 +7263,7 @@ exports[`renders ./components/form/demo/validate-static.md correctly 1`] = `
class="ant-input-number-handler-wrap"
>
<span
aria-disabled="false"
aria-label="Increase Value"
class="ant-input-number-handler ant-input-number-handler-up"
role="button"
Expand All @@ -7293,6 +7290,7 @@ exports[`renders ./components/form/demo/validate-static.md correctly 1`] = `
</span>
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-handler ant-input-number-handler-down"
role="button"
Expand Down Expand Up @@ -7323,12 +7321,8 @@ exports[`renders ./components/form/demo/validate-static.md correctly 1`] = `
class="ant-input-number-input-wrap"
>
<input
aria-valuemax="9007199254740991"
aria-valuemin="-9007199254740991"
autocomplete="off"
class="ant-input-number-input"
max="9007199254740991"
min="-9007199254740991"
role="spinbutton"
step="1"
value=""
Expand Down Expand Up @@ -7675,6 +7669,7 @@ exports[`renders ./components/form/demo/without-form-create.md correctly 1`] = `
class="ant-input-number-handler-wrap"
>
<span
aria-disabled="false"
aria-label="Increase Value"
class="ant-input-number-handler ant-input-number-handler-up"
role="button"
Expand All @@ -7701,6 +7696,7 @@ exports[`renders ./components/form/demo/without-form-create.md correctly 1`] = `
</span>
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-handler ant-input-number-handler-down"
role="button"
Expand Down Expand Up @@ -7736,8 +7732,6 @@ exports[`renders ./components/form/demo/without-form-create.md correctly 1`] = `
aria-valuenow="11"
autocomplete="off"
class="ant-input-number-input"
max="12"
min="8"
role="spinbutton"
step="1"
value="11"
Expand Down
Loading

0 comments on commit bec5a08

Please sign in to comment.