@qn-pandora/pandora-component 3.1.1 → 4.0.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/CHANGELOG.json +24 -7
- package/CHANGELOG.md +16 -7
- package/README.md +36 -36
- package/es/components/AutoComplete/style.css +25 -29
- package/es/components/AutoComplete/style.less +8 -8
- package/es/components/Breadcrumb/style.less +9 -9
- package/es/components/Button/index.d.ts +0 -8
- package/es/components/Button/index.js +4 -4
- package/es/components/Button/style.css +100 -104
- package/es/components/Button/style.less +51 -62
- package/es/components/Card/RowExtra/style.less +8 -8
- package/es/components/Card/SearchInput/style.less +8 -8
- package/es/components/Card/style.css +28 -2
- package/es/components/Card/style.less +11 -11
- package/es/components/CheckTransformList/style.css +50 -21
- package/es/components/CheckTransformList/style.less +35 -35
- package/es/components/Checkbox/style.css +1 -1
- package/es/components/Checkbox/style.less +5 -5
- package/es/components/CheckboxList/index.d.ts +2 -0
- package/es/components/CheckboxList/index.js +2 -2
- package/es/components/CheckboxList/style.css +5 -3
- package/es/components/CheckboxList/style.less +11 -9
- package/es/components/Collapse/style.css +16 -12
- package/es/components/Collapse/style.less +57 -57
- package/es/components/CollapsiblePanel/style.css +4 -4
- package/es/components/CollapsiblePanel/style.less +63 -63
- package/es/components/DateTimePicker/Base/style.css +378 -49
- package/es/components/DateTimePicker/Base/style.less +160 -164
- package/es/components/DateTimePicker/BaseMobile/Absolute/style.less +35 -35
- package/es/components/DateTimePicker/BaseMobile/style.css +4 -4
- package/es/components/DateTimePicker/BaseMobile/style.less +32 -32
- package/es/components/DateTimePicker/Collapse/Panel/style.less +26 -26
- package/es/components/DateTimePicker/DisplayInput/style.css +47 -16
- package/es/components/DateTimePicker/DisplayInput/style.less +9 -9
- package/es/components/DateTimePicker/constants.d.ts +1 -1
- package/es/components/DateTimePicker/constants.js +17 -6
- package/es/components/DateTimePicker/index.js +1 -1
- package/es/components/DateTimePicker/style.css +7 -7
- package/es/components/DateTimePicker/style.less +19 -17
- package/es/components/DateTimePicker/transform.d.ts +4 -0
- package/es/components/DateTimePicker/transform.js +52 -0
- package/es/components/Drawer/index.d.ts +55 -2
- package/es/components/Drawer/index.js +3 -1
- package/es/components/Drawer/style.css +45 -45
- package/es/components/Drawer/style.less +17 -17
- package/es/components/Input/index.d.ts +1 -2
- package/es/components/Input/index.js +0 -2
- package/es/components/Input/style.css +47 -16
- package/es/components/Input/style.less +12 -12
- package/es/components/InputNumber/index.d.ts +1 -8
- package/es/components/InputNumber/index.js +1 -35
- package/es/components/KeyValuePair/style.less +21 -21
- package/es/components/Menu/Option.d.ts +10 -0
- package/es/components/Menu/Option.js +18 -2
- package/es/components/Menu/index.d.ts +1 -1
- package/es/components/Menu/index.js +3 -3
- package/es/components/Menu/style.css +20 -10
- package/es/components/Menu/style.less +18 -8
- package/es/components/Modal/style.less +30 -30
- package/es/components/NameExplainTooltip/style.less +10 -10
- package/es/components/NameLimiter/style.css +2 -4
- package/es/components/NameLimiter/style.less +19 -21
- package/es/components/OptionList/InlineOptionList/style.less +16 -16
- package/es/components/OptionList/OptionItem/style.css +2 -2
- package/es/components/OptionList/OptionItem/style.less +25 -25
- package/es/components/OptionList/PopoverOptionList/style.less +30 -30
- package/es/components/OptionList/style.css +2 -2
- package/es/components/OptionList/style.less +3 -3
- package/es/components/RadioGroup/style.css +8 -8
- package/es/components/RadioGroup/style.less +32 -32
- package/es/components/RangeInput/style.css +427 -27
- package/es/components/RangeInput/style.less +37 -37
- package/es/components/RemarkName/style.css +2 -4
- package/es/components/RemarkName/style.less +2 -2
- package/es/components/Selector/style.css +25 -29
- package/es/components/Selector/style.less +99 -100
- package/es/components/Spin/style.css +0 -1
- package/es/components/Spin/style.less +26 -26
- package/es/components/Steps/ControlButton/style.less +5 -5
- package/es/components/Steps/style.css +8 -6
- package/es/components/Steps/style.less +48 -46
- package/es/components/Table/ColumnTag/style.less +40 -40
- package/es/components/Table/index.js +7 -4
- package/es/components/Table/style.css +85 -27
- package/es/components/Table/style.less +306 -313
- package/es/components/Tabs/style.css +29 -1
- package/es/components/Tabs/style.less +33 -31
- package/es/components/TagList/Tag/style.less +72 -72
- package/es/components/TagList/TagSwitch/style.less +28 -28
- package/es/components/TagList/style.css +10 -10
- package/es/components/TagList/style.less +28 -28
- package/es/components/Timeline/TimelineItem/style.less +49 -49
- package/es/components/Timeline/style.less +23 -23
- package/es/components/Transfer/List/index.js +3 -3
- package/es/components/Transfer/List/style.css +3 -0
- package/es/components/Transfer/List/style.less +19 -15
- package/es/components/Transfer/ListBody/style.less +18 -18
- package/es/components/Transfer/style.css +3 -0
- package/es/components/Transfer/style.less +14 -14
- package/es/components/TreeSelector/style.css +64 -20
- package/es/components/TreeSelector/style.less +56 -54
- package/es/hoc/popContainer.d.ts +5 -0
- package/es/hoc/popContainer.js +37 -0
- package/es/index.css +3011 -2517
- package/es/index.d.ts +1 -1
- package/es/index.less +49 -50
- package/es/style/mixin.less +45 -45
- package/es/style/theme.less +389 -379
- package/lib/components/AutoComplete/style.css +25 -29
- package/lib/components/AutoComplete/style.less +8 -8
- package/lib/components/Breadcrumb/style.less +9 -9
- package/lib/components/Button/index.d.ts +0 -8
- package/lib/components/Button/index.js +4 -4
- package/lib/components/Button/style.css +100 -104
- package/lib/components/Button/style.less +51 -62
- package/lib/components/Card/RowExtra/style.less +8 -8
- package/lib/components/Card/SearchInput/style.less +8 -8
- package/lib/components/Card/style.css +28 -2
- package/lib/components/Card/style.less +11 -11
- package/lib/components/CheckTransformList/style.css +50 -21
- package/lib/components/CheckTransformList/style.less +35 -35
- package/lib/components/Checkbox/style.css +1 -1
- package/lib/components/Checkbox/style.less +5 -5
- package/lib/components/CheckboxList/index.d.ts +2 -0
- package/lib/components/CheckboxList/index.js +2 -2
- package/lib/components/CheckboxList/style.css +5 -3
- package/lib/components/CheckboxList/style.less +11 -9
- package/lib/components/Collapse/style.css +16 -12
- package/lib/components/Collapse/style.less +57 -57
- package/lib/components/CollapsiblePanel/style.css +4 -4
- package/lib/components/CollapsiblePanel/style.less +63 -63
- package/lib/components/DateTimePicker/Base/style.css +378 -49
- package/lib/components/DateTimePicker/Base/style.less +160 -164
- package/lib/components/DateTimePicker/BaseMobile/Absolute/style.less +35 -35
- package/lib/components/DateTimePicker/BaseMobile/style.css +4 -4
- package/lib/components/DateTimePicker/BaseMobile/style.less +32 -32
- package/lib/components/DateTimePicker/Collapse/Panel/style.less +26 -26
- package/lib/components/DateTimePicker/DisplayInput/style.css +47 -16
- package/lib/components/DateTimePicker/DisplayInput/style.less +9 -9
- package/lib/components/DateTimePicker/constants.d.ts +1 -1
- package/lib/components/DateTimePicker/constants.js +17 -6
- package/lib/components/DateTimePicker/index.js +1 -1
- package/lib/components/DateTimePicker/style.css +7 -7
- package/lib/components/DateTimePicker/style.less +19 -17
- package/lib/components/DateTimePicker/transform.d.ts +4 -0
- package/lib/components/DateTimePicker/transform.js +53 -0
- package/lib/components/Drawer/index.d.ts +55 -2
- package/lib/components/Drawer/index.js +3 -1
- package/lib/components/Drawer/style.css +45 -45
- package/lib/components/Drawer/style.less +17 -17
- package/lib/components/Input/index.d.ts +1 -2
- package/lib/components/Input/index.js +0 -2
- package/lib/components/Input/style.css +47 -16
- package/lib/components/Input/style.less +12 -12
- package/lib/components/InputNumber/index.d.ts +1 -8
- package/lib/components/InputNumber/index.js +1 -38
- package/lib/components/KeyValuePair/style.less +21 -21
- package/lib/components/Menu/Option.d.ts +10 -0
- package/lib/components/Menu/Option.js +18 -2
- package/lib/components/Menu/index.d.ts +1 -1
- package/lib/components/Menu/index.js +3 -3
- package/lib/components/Menu/style.css +20 -10
- package/lib/components/Menu/style.less +18 -8
- package/lib/components/Modal/style.less +30 -30
- package/lib/components/NameExplainTooltip/style.less +10 -10
- package/lib/components/NameLimiter/style.css +2 -4
- package/lib/components/NameLimiter/style.less +19 -21
- package/lib/components/OptionList/InlineOptionList/style.less +16 -16
- package/lib/components/OptionList/OptionItem/style.css +2 -2
- package/lib/components/OptionList/OptionItem/style.less +25 -25
- package/lib/components/OptionList/PopoverOptionList/style.less +30 -30
- package/lib/components/OptionList/style.css +2 -2
- package/lib/components/OptionList/style.less +3 -3
- package/lib/components/RadioGroup/style.css +8 -8
- package/lib/components/RadioGroup/style.less +32 -32
- package/lib/components/RangeInput/style.css +427 -27
- package/lib/components/RangeInput/style.less +37 -37
- package/lib/components/RemarkName/style.css +2 -4
- package/lib/components/RemarkName/style.less +2 -2
- package/lib/components/Selector/style.css +25 -29
- package/lib/components/Selector/style.less +99 -100
- package/lib/components/Spin/style.css +0 -1
- package/lib/components/Spin/style.less +26 -26
- package/lib/components/Steps/ControlButton/style.less +5 -5
- package/lib/components/Steps/style.css +8 -6
- package/lib/components/Steps/style.less +48 -46
- package/lib/components/Table/ColumnTag/style.less +40 -40
- package/lib/components/Table/index.js +6 -3
- package/lib/components/Table/style.css +85 -27
- package/lib/components/Table/style.less +306 -313
- package/lib/components/Tabs/style.css +29 -1
- package/lib/components/Tabs/style.less +33 -31
- package/lib/components/TagList/Tag/style.less +72 -72
- package/lib/components/TagList/TagSwitch/style.less +28 -28
- package/lib/components/TagList/style.css +10 -10
- package/lib/components/TagList/style.less +28 -28
- package/lib/components/Timeline/TimelineItem/style.less +49 -49
- package/lib/components/Timeline/style.less +23 -23
- package/lib/components/Transfer/List/index.js +3 -3
- package/lib/components/Transfer/List/style.css +3 -0
- package/lib/components/Transfer/List/style.less +19 -15
- package/lib/components/Transfer/ListBody/style.less +18 -18
- package/lib/components/Transfer/style.css +3 -0
- package/lib/components/Transfer/style.less +14 -14
- package/lib/components/TreeSelector/style.css +64 -20
- package/lib/components/TreeSelector/style.less +56 -54
- package/lib/hoc/popContainer.d.ts +5 -0
- package/lib/hoc/popContainer.js +47 -0
- package/lib/index.css +5102 -4608
- package/lib/index.d.ts +1 -1
- package/lib/index.less +49 -50
- package/lib/style/mixin.less +45 -45
- package/lib/style/theme.less +389 -379
- package/package.json +79 -108
- package/es/components/Input/NumberInput/index.d.ts +0 -29
- package/es/components/Input/NumberInput/index.js +0 -116
- package/es/components/InputNumber/style.css +0 -400
- package/es/components/InputNumber/style.less +0 -45
- package/lib/components/Input/NumberInput/index.d.ts +0 -29
- package/lib/components/Input/NumberInput/index.js +0 -121
- package/lib/components/InputNumber/style.css +0 -400
- package/lib/components/InputNumber/style.less +0 -45
@@ -1,400 +0,0 @@
|
|
1
|
-
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
|
2
|
-
/* stylelint-disable no-duplicate-selectors */
|
3
|
-
/* stylelint-disable */
|
4
|
-
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
|
5
|
-
.ant-input-number {
|
6
|
-
-webkit-box-sizing: border-box;
|
7
|
-
box-sizing: border-box;
|
8
|
-
color: rgba(0, 0, 0, 0.65);
|
9
|
-
font-variant: tabular-nums;
|
10
|
-
list-style: none;
|
11
|
-
-webkit-font-feature-settings: 'tnum';
|
12
|
-
font-feature-settings: 'tnum';
|
13
|
-
position: relative;
|
14
|
-
width: 100%;
|
15
|
-
min-width: 0;
|
16
|
-
padding: 4px 11px;
|
17
|
-
color: #333333;
|
18
|
-
font-size: 14px;
|
19
|
-
line-height: 1.5715;
|
20
|
-
background-color: transparent;
|
21
|
-
background-image: none;
|
22
|
-
border: 1px solid #bfbfbf;
|
23
|
-
-webkit-transition: all 0.3s;
|
24
|
-
transition: all 0.3s;
|
25
|
-
display: inline-block;
|
26
|
-
width: 90px;
|
27
|
-
margin: 0;
|
28
|
-
padding: 0;
|
29
|
-
border: 1px solid #e5e5e5;
|
30
|
-
border-radius: 2px;
|
31
|
-
}
|
32
|
-
.ant-input-number::-moz-placeholder {
|
33
|
-
opacity: 1;
|
34
|
-
}
|
35
|
-
.ant-input-number::-webkit-input-placeholder {
|
36
|
-
color: #bfbfbf;
|
37
|
-
}
|
38
|
-
.ant-input-number::-ms-input-placeholder {
|
39
|
-
color: #bfbfbf;
|
40
|
-
}
|
41
|
-
.ant-input-number::placeholder {
|
42
|
-
color: #bfbfbf;
|
43
|
-
}
|
44
|
-
.ant-input-number:placeholder-shown {
|
45
|
-
text-overflow: ellipsis;
|
46
|
-
}
|
47
|
-
.ant-input-number:hover {
|
48
|
-
border-color: #2c6dd2;
|
49
|
-
border-right-width: 1px !important;
|
50
|
-
}
|
51
|
-
.ant-input-number:focus,
|
52
|
-
.ant-input-number-focused {
|
53
|
-
border-color: #528cde;
|
54
|
-
border-right-width: 1px !important;
|
55
|
-
outline: 0;
|
56
|
-
-webkit-box-shadow: 0 0 0 2px rgba(44, 109, 210, 0.2);
|
57
|
-
box-shadow: 0 0 0 2px rgba(44, 109, 210, 0.2);
|
58
|
-
}
|
59
|
-
.ant-input-number-disabled {
|
60
|
-
color: rgba(0, 0, 0, 0.25);
|
61
|
-
background-color: #f5f5f5;
|
62
|
-
cursor: not-allowed;
|
63
|
-
opacity: 1;
|
64
|
-
}
|
65
|
-
.ant-input-number-disabled:hover {
|
66
|
-
border-color: #bfbfbf;
|
67
|
-
border-right-width: 1px !important;
|
68
|
-
}
|
69
|
-
.ant-input-number[disabled] {
|
70
|
-
color: rgba(0, 0, 0, 0.25);
|
71
|
-
background-color: #f5f5f5;
|
72
|
-
cursor: not-allowed;
|
73
|
-
opacity: 1;
|
74
|
-
}
|
75
|
-
.ant-input-number[disabled]:hover {
|
76
|
-
border-color: #bfbfbf;
|
77
|
-
border-right-width: 1px !important;
|
78
|
-
}
|
79
|
-
.ant-input-number-borderless,
|
80
|
-
.ant-input-number-borderless:hover,
|
81
|
-
.ant-input-number-borderless:focus,
|
82
|
-
.ant-input-number-borderless-focused,
|
83
|
-
.ant-input-number-borderless-disabled,
|
84
|
-
.ant-input-number-borderless[disabled] {
|
85
|
-
background-color: transparent;
|
86
|
-
border: none;
|
87
|
-
-webkit-box-shadow: none;
|
88
|
-
box-shadow: none;
|
89
|
-
}
|
90
|
-
textarea.ant-input-number {
|
91
|
-
max-width: 100%;
|
92
|
-
height: auto;
|
93
|
-
min-height: 32px;
|
94
|
-
line-height: 1.5715;
|
95
|
-
vertical-align: bottom;
|
96
|
-
-webkit-transition: all 0.3s, height 0s;
|
97
|
-
transition: all 0.3s, height 0s;
|
98
|
-
}
|
99
|
-
.ant-input-number-lg {
|
100
|
-
padding: 6.5px 11px;
|
101
|
-
font-size: 16px;
|
102
|
-
}
|
103
|
-
.ant-input-number-sm {
|
104
|
-
padding: 1px 7px;
|
105
|
-
}
|
106
|
-
.ant-input-number-handler {
|
107
|
-
position: relative;
|
108
|
-
display: block;
|
109
|
-
width: 100%;
|
110
|
-
height: 50%;
|
111
|
-
overflow: hidden;
|
112
|
-
color: rgba(0, 0, 0, 0.45);
|
113
|
-
font-weight: bold;
|
114
|
-
line-height: 0;
|
115
|
-
text-align: center;
|
116
|
-
border-left: 1px solid #e5e5e5;
|
117
|
-
-webkit-transition: all 0.1s linear;
|
118
|
-
transition: all 0.1s linear;
|
119
|
-
}
|
120
|
-
.ant-input-number-handler:active {
|
121
|
-
background: #f4f4f4;
|
122
|
-
}
|
123
|
-
.ant-input-number-handler:hover .ant-input-number-handler-up-inner,
|
124
|
-
.ant-input-number-handler:hover .ant-input-number-handler-down-inner {
|
125
|
-
color: #9ca0a6;
|
126
|
-
}
|
127
|
-
.ant-input-number-handler-up-inner,
|
128
|
-
.ant-input-number-handler-down-inner {
|
129
|
-
display: inline-block;
|
130
|
-
color: #bfbfbf;
|
131
|
-
font-style: normal;
|
132
|
-
line-height: 0;
|
133
|
-
text-align: center;
|
134
|
-
text-transform: none;
|
135
|
-
vertical-align: -0.125em;
|
136
|
-
text-rendering: optimizeLegibility;
|
137
|
-
-webkit-font-smoothing: antialiased;
|
138
|
-
-moz-osx-font-smoothing: grayscale;
|
139
|
-
position: absolute;
|
140
|
-
right: 4px;
|
141
|
-
width: 12px;
|
142
|
-
height: 12px;
|
143
|
-
color: rgba(0, 0, 0, 0.45);
|
144
|
-
line-height: 12px;
|
145
|
-
-webkit-transition: all 0.1s linear;
|
146
|
-
transition: all 0.1s linear;
|
147
|
-
-webkit-user-select: none;
|
148
|
-
-moz-user-select: none;
|
149
|
-
-ms-user-select: none;
|
150
|
-
user-select: none;
|
151
|
-
}
|
152
|
-
.ant-input-number-handler-up-inner > *,
|
153
|
-
.ant-input-number-handler-down-inner > * {
|
154
|
-
line-height: 1;
|
155
|
-
}
|
156
|
-
.ant-input-number-handler-up-inner svg,
|
157
|
-
.ant-input-number-handler-down-inner svg {
|
158
|
-
display: inline-block;
|
159
|
-
}
|
160
|
-
.ant-input-number-handler-up-inner::before,
|
161
|
-
.ant-input-number-handler-down-inner::before {
|
162
|
-
display: none;
|
163
|
-
}
|
164
|
-
.ant-input-number-handler-up-inner .ant-input-number-handler-up-inner-icon,
|
165
|
-
.ant-input-number-handler-up-inner .ant-input-number-handler-down-inner-icon,
|
166
|
-
.ant-input-number-handler-down-inner .ant-input-number-handler-up-inner-icon,
|
167
|
-
.ant-input-number-handler-down-inner .ant-input-number-handler-down-inner-icon {
|
168
|
-
display: block;
|
169
|
-
}
|
170
|
-
.ant-input-number:hover {
|
171
|
-
border-color: #2c6dd2;
|
172
|
-
border-right-width: 1px !important;
|
173
|
-
}
|
174
|
-
.ant-input-number:hover + .ant-form-item-children-icon {
|
175
|
-
opacity: 0;
|
176
|
-
-webkit-transition: opacity 0.24s linear 0.24s;
|
177
|
-
transition: opacity 0.24s linear 0.24s;
|
178
|
-
}
|
179
|
-
.ant-input-number-focused {
|
180
|
-
border-color: #528cde;
|
181
|
-
border-right-width: 1px !important;
|
182
|
-
outline: 0;
|
183
|
-
-webkit-box-shadow: 0 0 0 2px rgba(44, 109, 210, 0.2);
|
184
|
-
box-shadow: 0 0 0 2px rgba(44, 109, 210, 0.2);
|
185
|
-
}
|
186
|
-
.ant-input-number-disabled {
|
187
|
-
color: rgba(0, 0, 0, 0.25);
|
188
|
-
background-color: #f5f5f5;
|
189
|
-
cursor: not-allowed;
|
190
|
-
opacity: 1;
|
191
|
-
}
|
192
|
-
.ant-input-number-disabled:hover {
|
193
|
-
border-color: #bfbfbf;
|
194
|
-
border-right-width: 1px !important;
|
195
|
-
}
|
196
|
-
.ant-input-number-disabled .ant-input-number-input {
|
197
|
-
cursor: not-allowed;
|
198
|
-
}
|
199
|
-
.ant-input-number-disabled .ant-input-number-handler-wrap {
|
200
|
-
display: none;
|
201
|
-
}
|
202
|
-
.ant-input-number-readonly .ant-input-number-handler-wrap {
|
203
|
-
display: none;
|
204
|
-
}
|
205
|
-
.ant-input-number-input {
|
206
|
-
width: 100%;
|
207
|
-
height: 30px;
|
208
|
-
padding: 0 11px;
|
209
|
-
text-align: left;
|
210
|
-
background-color: transparent;
|
211
|
-
border: 0;
|
212
|
-
border-radius: 2px;
|
213
|
-
outline: 0;
|
214
|
-
-webkit-transition: all 0.3s linear;
|
215
|
-
transition: all 0.3s linear;
|
216
|
-
-moz-appearance: textfield !important;
|
217
|
-
}
|
218
|
-
.ant-input-number-input::-moz-placeholder {
|
219
|
-
opacity: 1;
|
220
|
-
}
|
221
|
-
.ant-input-number-input::-webkit-input-placeholder {
|
222
|
-
color: #bfbfbf;
|
223
|
-
}
|
224
|
-
.ant-input-number-input::-ms-input-placeholder {
|
225
|
-
color: #bfbfbf;
|
226
|
-
}
|
227
|
-
.ant-input-number-input::placeholder {
|
228
|
-
color: #bfbfbf;
|
229
|
-
}
|
230
|
-
.ant-input-number-input:placeholder-shown {
|
231
|
-
text-overflow: ellipsis;
|
232
|
-
}
|
233
|
-
.ant-input-number-input[type='number']::-webkit-inner-spin-button,
|
234
|
-
.ant-input-number-input[type='number']::-webkit-outer-spin-button {
|
235
|
-
margin: 0;
|
236
|
-
-webkit-appearance: none;
|
237
|
-
}
|
238
|
-
.ant-input-number-lg {
|
239
|
-
padding: 0;
|
240
|
-
font-size: 16px;
|
241
|
-
}
|
242
|
-
.ant-input-number-lg input {
|
243
|
-
height: 38px;
|
244
|
-
}
|
245
|
-
.ant-input-number-sm {
|
246
|
-
padding: 0;
|
247
|
-
}
|
248
|
-
.ant-input-number-sm input {
|
249
|
-
height: 24px;
|
250
|
-
padding: 0 7px;
|
251
|
-
}
|
252
|
-
.ant-input-number-handler-wrap {
|
253
|
-
position: absolute;
|
254
|
-
top: 0;
|
255
|
-
right: 0;
|
256
|
-
width: 22px;
|
257
|
-
height: 100%;
|
258
|
-
background: #ffffff;
|
259
|
-
border-radius: 0 2px 2px 0;
|
260
|
-
opacity: 0;
|
261
|
-
-webkit-transition: opacity 0.24s linear 0.1s;
|
262
|
-
transition: opacity 0.24s linear 0.1s;
|
263
|
-
}
|
264
|
-
.ant-input-number-handler-wrap .ant-input-number-handler .ant-input-number-handler-up-inner,
|
265
|
-
.ant-input-number-handler-wrap .ant-input-number-handler .ant-input-number-handler-down-inner {
|
266
|
-
min-width: auto;
|
267
|
-
margin-right: 0;
|
268
|
-
font-size: 7px;
|
269
|
-
}
|
270
|
-
.ant-input-number-borderless .ant-input-number-handler-wrap {
|
271
|
-
border-left-width: 0;
|
272
|
-
}
|
273
|
-
.ant-input-number-handler-wrap:hover .ant-input-number-handler {
|
274
|
-
height: 40%;
|
275
|
-
}
|
276
|
-
.ant-input-number:hover .ant-input-number-handler-wrap {
|
277
|
-
opacity: 1;
|
278
|
-
}
|
279
|
-
.ant-input-number-handler-up {
|
280
|
-
border-top-right-radius: 2px;
|
281
|
-
cursor: pointer;
|
282
|
-
}
|
283
|
-
.ant-input-number-handler-up-inner {
|
284
|
-
top: 50%;
|
285
|
-
margin-top: -5px;
|
286
|
-
text-align: center;
|
287
|
-
}
|
288
|
-
.ant-input-number-handler-up:hover {
|
289
|
-
height: 60% !important;
|
290
|
-
}
|
291
|
-
.ant-input-number-handler-down {
|
292
|
-
top: 0;
|
293
|
-
border-top: 1px solid #e5e5e5;
|
294
|
-
border-bottom-right-radius: 2px;
|
295
|
-
cursor: pointer;
|
296
|
-
}
|
297
|
-
.ant-input-number-handler-down-inner {
|
298
|
-
top: 50%;
|
299
|
-
text-align: center;
|
300
|
-
-webkit-transform: translateY(-50%);
|
301
|
-
transform: translateY(-50%);
|
302
|
-
}
|
303
|
-
.ant-input-number-handler-down:hover {
|
304
|
-
height: 60% !important;
|
305
|
-
}
|
306
|
-
.ant-input-number-borderless .ant-input-number-handler-down {
|
307
|
-
border-top-width: 0;
|
308
|
-
}
|
309
|
-
.ant-input-number-handler-up-disabled,
|
310
|
-
.ant-input-number-handler-down-disabled {
|
311
|
-
cursor: not-allowed;
|
312
|
-
}
|
313
|
-
.ant-input-number-handler-up-disabled:hover .ant-input-number-handler-up-inner,
|
314
|
-
.ant-input-number-handler-down-disabled:hover .ant-input-number-handler-down-inner {
|
315
|
-
color: rgba(0, 0, 0, 0.25);
|
316
|
-
}
|
317
|
-
.ant-input-number-borderless {
|
318
|
-
-webkit-box-shadow: none;
|
319
|
-
box-shadow: none;
|
320
|
-
}
|
321
|
-
.ant-input-number-out-of-range input {
|
322
|
-
color: #f5222d;
|
323
|
-
}
|
324
|
-
.ant-input-number-rtl {
|
325
|
-
direction: rtl;
|
326
|
-
}
|
327
|
-
.ant-input-number-rtl .ant-input-number-handler-wrap {
|
328
|
-
right: auto;
|
329
|
-
left: 0;
|
330
|
-
border-right: 1px solid #e5e5e5;
|
331
|
-
border-left: 0;
|
332
|
-
border-radius: 2px 0 0 2px;
|
333
|
-
}
|
334
|
-
.ant-input-number-rtl.ant-input-number-borderless .ant-input-number-handler-wrap {
|
335
|
-
border-right-width: 0;
|
336
|
-
}
|
337
|
-
.ant-input-number-rtl .ant-input-number-input {
|
338
|
-
direction: ltr;
|
339
|
-
text-align: right;
|
340
|
-
}
|
341
|
-
.ant-btn {
|
342
|
-
padding: 4px 15px;
|
343
|
-
}
|
344
|
-
.ant-btn-sm {
|
345
|
-
padding: 0 7px;
|
346
|
-
}
|
347
|
-
.pandora-sdk-input-number-group {
|
348
|
-
display: -webkit-box;
|
349
|
-
display: -ms-flexbox;
|
350
|
-
display: flex;
|
351
|
-
-ms-flex-wrap: nowrap;
|
352
|
-
flex-wrap: nowrap;
|
353
|
-
-webkit-box-align: stretch;
|
354
|
-
-ms-flex-align: stretch;
|
355
|
-
align-items: stretch;
|
356
|
-
}
|
357
|
-
.pandora-sdk-input-number-group .pandora-sdk-input-number-group-wrap {
|
358
|
-
-webkit-box-flex: 1;
|
359
|
-
-ms-flex-positive: 1;
|
360
|
-
flex-grow: 1;
|
361
|
-
}
|
362
|
-
.pandora-sdk-input-number-group .pandora-sdk-input-number-group-wrap .ant-input-number {
|
363
|
-
width: 100%;
|
364
|
-
}
|
365
|
-
.pandora-sdk-input-number-group .pandora-sdk-input-number-group-addon {
|
366
|
-
position: relative;
|
367
|
-
padding: 0 11px;
|
368
|
-
color: #333333;
|
369
|
-
font-weight: normal;
|
370
|
-
font-size: 14px;
|
371
|
-
text-align: center;
|
372
|
-
background-color: #fafafa;
|
373
|
-
border: 1px solid #d9d9d9;
|
374
|
-
border-radius: 2px;
|
375
|
-
-webkit-transition: all 0.3s;
|
376
|
-
transition: all 0.3s;
|
377
|
-
display: -webkit-box;
|
378
|
-
display: -ms-flexbox;
|
379
|
-
display: flex;
|
380
|
-
-webkit-box-align: center;
|
381
|
-
-ms-flex-align: center;
|
382
|
-
align-items: center;
|
383
|
-
}
|
384
|
-
.pandora-sdk-input-number-group .pandora-sdk-input-number-group-addon .ant-select {
|
385
|
-
margin: -1px -11px;
|
386
|
-
}
|
387
|
-
.pandora-sdk-input-number-group .pandora-sdk-input-number-group-addon .ant-select .ant-select-selector {
|
388
|
-
border: 0;
|
389
|
-
background-color: inherit;
|
390
|
-
}
|
391
|
-
.pandora-sdk-input-number-group .pandora-sdk-input-number-group-addon:first-child {
|
392
|
-
border-right: 0;
|
393
|
-
border-top-right-radius: 0;
|
394
|
-
border-bottom-right-radius: 0;
|
395
|
-
}
|
396
|
-
.pandora-sdk-input-number-group .pandora-sdk-input-number-group-addon:last-child {
|
397
|
-
border-left: 0;
|
398
|
-
border-top-left-radius: 0;
|
399
|
-
border-bottom-left-radius: 0;
|
400
|
-
}
|
@@ -1,45 +0,0 @@
|
|
1
|
-
@import 'antd/lib/input-number/style/index.less';
|
2
|
-
@import '../../style/theme.less';
|
3
|
-
|
4
|
-
.@{sdk-prefix}-input-number-group {
|
5
|
-
display: flex;
|
6
|
-
flex-wrap: nowrap;
|
7
|
-
align-items: stretch;
|
8
|
-
.@{sdk-prefix}-input-number-group-wrap {
|
9
|
-
flex-grow: 1;
|
10
|
-
.@{ant-prefix}-input-number {
|
11
|
-
width: 100%;
|
12
|
-
}
|
13
|
-
}
|
14
|
-
.@{sdk-prefix}-input-number-group-addon {
|
15
|
-
position: relative;
|
16
|
-
padding: 0 11px;
|
17
|
-
color: @input-color;
|
18
|
-
font-weight: normal;
|
19
|
-
font-size: 14px;
|
20
|
-
text-align: center;
|
21
|
-
background-color: @table-row-even-bg;
|
22
|
-
border: 1px solid @border-color-1;
|
23
|
-
border-radius: 2px;
|
24
|
-
transition: all 0.3s;
|
25
|
-
display: flex;
|
26
|
-
align-items: center;
|
27
|
-
.@{ant-prefix}-select {
|
28
|
-
margin: -1px -11px;
|
29
|
-
.@{ant-prefix}-select-selector {
|
30
|
-
border: 0;
|
31
|
-
background-color: inherit;
|
32
|
-
}
|
33
|
-
}
|
34
|
-
&:first-child {
|
35
|
-
border-right: 0;
|
36
|
-
border-top-right-radius: 0;
|
37
|
-
border-bottom-right-radius: 0;
|
38
|
-
}
|
39
|
-
&:last-child {
|
40
|
-
border-left: 0;
|
41
|
-
border-top-left-radius: 0;
|
42
|
-
border-bottom-left-radius: 0;
|
43
|
-
}
|
44
|
-
}
|
45
|
-
}
|
@@ -1,29 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
export interface INumberInputProps {
|
3
|
-
/** 当前值 */
|
4
|
-
value?: number;
|
5
|
-
/** placeholder */
|
6
|
-
placeholder?: string;
|
7
|
-
/** 最大值 */
|
8
|
-
min?: number;
|
9
|
-
/** 最小值 */
|
10
|
-
max?: number;
|
11
|
-
/** 小数保留的位数 */
|
12
|
-
precision?: number;
|
13
|
-
/** 前缀 */
|
14
|
-
addonAfter?: React.ReactNode;
|
15
|
-
/** 后缀 */
|
16
|
-
addonBefore?: React.ReactNode;
|
17
|
-
/** 组件类名 */
|
18
|
-
className?: string;
|
19
|
-
/** 设置当前值 */
|
20
|
-
onChange?: (value?: number) => void;
|
21
|
-
}
|
22
|
-
export default class NumberInput extends React.Component<INumberInputProps, any> {
|
23
|
-
value: string;
|
24
|
-
setValue(value: string): void;
|
25
|
-
handleChange(value: string): void;
|
26
|
-
handleBlur(): void;
|
27
|
-
componentDidMount(): void;
|
28
|
-
render(): JSX.Element;
|
29
|
-
}
|
@@ -1,121 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
3
|
-
var extendStatics = function (d, b) {
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
7
|
-
return extendStatics(d, b);
|
8
|
-
};
|
9
|
-
return function (d, b) {
|
10
|
-
extendStatics(d, b);
|
11
|
-
function __() { this.constructor = d; }
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13
|
-
};
|
14
|
-
})();
|
15
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
16
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
17
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
18
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
19
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
20
|
-
};
|
21
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
22
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
23
|
-
};
|
24
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
25
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
26
|
-
};
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
28
|
-
var react_1 = __importDefault(require("react"));
|
29
|
-
var mobx_react_1 = require("mobx-react");
|
30
|
-
var mobx_1 = require("mobx");
|
31
|
-
var lodash_1 = require("lodash");
|
32
|
-
var index_1 = __importDefault(require("../index"));
|
33
|
-
var bind_1 = __importDefault(require("../../../utils/bind"));
|
34
|
-
var NumberInput = /** @class */ (function (_super) {
|
35
|
-
__extends(NumberInput, _super);
|
36
|
-
function NumberInput() {
|
37
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
38
|
-
_this.value = '';
|
39
|
-
return _this;
|
40
|
-
}
|
41
|
-
NumberInput.prototype.setValue = function (value) {
|
42
|
-
this.value = value;
|
43
|
-
};
|
44
|
-
NumberInput.prototype.handleChange = function (value) {
|
45
|
-
var onChange = this.props.onChange;
|
46
|
-
var result = Number(value);
|
47
|
-
if (!onChange) {
|
48
|
-
return;
|
49
|
-
}
|
50
|
-
if (!isNaN(result)) {
|
51
|
-
onChange(value === '' ? undefined : result);
|
52
|
-
}
|
53
|
-
this.setValue(value);
|
54
|
-
};
|
55
|
-
NumberInput.prototype.handleBlur = function () {
|
56
|
-
var _a = this.props, min = _a.min, max = _a.max, precision = _a.precision, onChange = _a.onChange;
|
57
|
-
var result = Number(this.value);
|
58
|
-
if (!onChange) {
|
59
|
-
return;
|
60
|
-
}
|
61
|
-
if (this.value === '') {
|
62
|
-
onChange(undefined);
|
63
|
-
this.setValue('');
|
64
|
-
return;
|
65
|
-
}
|
66
|
-
if (isNaN(result)) {
|
67
|
-
onChange(min);
|
68
|
-
this.setValue(lodash_1.toString(min));
|
69
|
-
return;
|
70
|
-
}
|
71
|
-
if (lodash_1.isNumber(min) && min > result) {
|
72
|
-
onChange(min);
|
73
|
-
this.setValue(lodash_1.toString(min));
|
74
|
-
return;
|
75
|
-
}
|
76
|
-
if (lodash_1.isNumber(max) && max < result) {
|
77
|
-
onChange(max);
|
78
|
-
this.setValue(lodash_1.toString(max));
|
79
|
-
return;
|
80
|
-
}
|
81
|
-
if (lodash_1.isNumber(precision)) {
|
82
|
-
this.setValue(lodash_1.toString(lodash_1.floor(result, precision)));
|
83
|
-
onChange(lodash_1.floor(result, precision));
|
84
|
-
}
|
85
|
-
};
|
86
|
-
NumberInput.prototype.componentDidMount = function () {
|
87
|
-
this.setValue(lodash_1.toString(this.props.value));
|
88
|
-
};
|
89
|
-
NumberInput.prototype.render = function () {
|
90
|
-
var _a = this.props, placeholder = _a.placeholder, addonAfter = _a.addonAfter, addonBefore = _a.addonBefore, className = _a.className;
|
91
|
-
return (react_1.default.createElement(index_1.default, { className: className, value: this.value, onChange: this.handleChange, onBlur: this.handleBlur, placeholder: placeholder, addonAfter: addonAfter, addonBefore: addonBefore }));
|
92
|
-
};
|
93
|
-
__decorate([
|
94
|
-
mobx_1.observable,
|
95
|
-
__metadata("design:type", String)
|
96
|
-
], NumberInput.prototype, "value", void 0);
|
97
|
-
__decorate([
|
98
|
-
bind_1.default,
|
99
|
-
mobx_1.action,
|
100
|
-
__metadata("design:type", Function),
|
101
|
-
__metadata("design:paramtypes", [String]),
|
102
|
-
__metadata("design:returntype", void 0)
|
103
|
-
], NumberInput.prototype, "setValue", null);
|
104
|
-
__decorate([
|
105
|
-
bind_1.default,
|
106
|
-
__metadata("design:type", Function),
|
107
|
-
__metadata("design:paramtypes", [String]),
|
108
|
-
__metadata("design:returntype", void 0)
|
109
|
-
], NumberInput.prototype, "handleChange", null);
|
110
|
-
__decorate([
|
111
|
-
bind_1.default,
|
112
|
-
__metadata("design:type", Function),
|
113
|
-
__metadata("design:paramtypes", []),
|
114
|
-
__metadata("design:returntype", void 0)
|
115
|
-
], NumberInput.prototype, "handleBlur", null);
|
116
|
-
NumberInput = __decorate([
|
117
|
-
mobx_react_1.observer
|
118
|
-
], NumberInput);
|
119
|
-
return NumberInput;
|
120
|
-
}(react_1.default.Component));
|
121
|
-
exports.default = NumberInput;
|