1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
@import '../../style/themes/default';
@import '../../style/mixins/index';
@import '../../input/style/mixin';
@input-number-prefix-cls: ~'@{ant-prefix}-input-number';
.@{input-number-prefix-cls} {
.reset-component;
.input;
margin: 0;
padding: 0;
display: inline-block;
border: @border-width-base @border-style-base @border-color-base;
border-radius: @border-radius-base;
width: 90px;
&-handler {
text-align: center;
line-height: 0;
height: 50%;
overflow: hidden;
color: @text-color-secondary;
position: relative;
transition: all 0.1s linear;
display: block;
width: 100%;
font-weight: bold;
&:active {
background: #f4f4f4;
}
&:hover &-up-inner,
&:hover &-down-inner {
color: @primary-5;
}
}
&-handler-up-inner,
&-handler-down-inner {
.iconfont-mixin();
line-height: 12px;
user-select: none;
position: absolute;
width: 12px;
height: 12px;
transition: all 0.1s linear;
.iconfont-size-under-12px(7px);
right: 4px;
color: @text-color-secondary;
}
&:hover {
.hover();
}
&-focused {
.active();
}
&-disabled {
.disabled();
.@{input-number-prefix-cls}-input {
cursor: not-allowed;
}
.@{input-number-prefix-cls}-handler-wrap {
display: none;
}
}
&-input {
width: 100%;
text-align: left;
outline: 0;
-moz-appearance: textfield;
height: @input-height-base - 2px;
transition: all 0.3s linear;
background-color: transparent;
border: 0;
border-radius: @border-radius-base;
padding: 0 @control-padding-horizontal - 1px;
.placeholder();
}
&-lg {
padding: 0;
font-size: @font-size-lg;
input {
height: @input-height-lg - 2px;
}
}
&-sm {
padding: 0;
input {
height: @input-height-sm - 2px;
padding: 0 @control-padding-horizontal-sm - 1px;
}
}
&-handler-wrap {
border-left: @border-width-base @border-style-base @border-color-base;
width: 22px;
height: 100%;
background: @component-background;
position: absolute;
top: 0;
right: 0;
opacity: 0;
border-radius: 0 @border-radius-base @border-radius-base 0;
transition: opacity 0.24s linear 0.1s;
}
&-handler-wrap:hover &-handler {
height: 40%;
}
&:hover &-handler-wrap {
opacity: 1;
}
&-handler-up {
cursor: pointer;
&-inner {
top: 50%;
margin-top: -5px;
text-align: center;
}
&:hover {
height: 60% !important;
}
}
&-handler-down {
border-top: @border-width-base @border-style-base @border-color-base;
top: 0;
cursor: pointer;
&-inner {
top: 50%;
margin-top: -6px;
text-align: center;
}
&:hover {
height: 60% !important;
}
}
&-handler-up-disabled,
&-handler-down-disabled {
cursor: not-allowed;
}
&-handler-up-disabled:hover &-handler-up-inner,
&-handler-down-disabled:hover &-handler-down-inner {
color: @disabled-color;
}
}