@semcore/input-number 4.0.16 → 4.0.18
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.md +2 -68
- package/LICENSE +21 -0
- package/lib/cjs/InputNumber.js +11 -11
- package/lib/cjs/index.d.js +2 -0
- package/lib/cjs/index.d.js.map +1 -0
- package/lib/es6/InputNumber.js +11 -11
- package/lib/es6/index.d.js +2 -0
- package/lib/es6/index.d.js.map +1 -0
- package/package.json +7 -6
- package/lib/cjs/index.d.ts +0 -55
- package/lib/es6/index.d.ts +0 -55
package/CHANGELOG.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
-
## [4.0.
|
|
5
|
+
## [4.0.18] - 2022-10-10
|
|
6
6
|
|
|
7
7
|
### Changed
|
|
8
8
|
|
|
9
|
-
- Version patch update due to children dependencies update (`@semcore/input` [3.0.
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/input` [3.0.16 ~> 3.1.0]).
|
|
10
10
|
|
|
11
11
|
## [4.0.15] - 2022-08-25
|
|
12
12
|
|
|
@@ -20,42 +20,6 @@ CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangel
|
|
|
20
20
|
|
|
21
21
|
- Version patch update due to children dependencies update (`@semcore/input` [3.0.13 ~> 3.0.14]).
|
|
22
22
|
|
|
23
|
-
## [4.0.13] - 2022-08-18
|
|
24
|
-
|
|
25
|
-
### Changed
|
|
26
|
-
|
|
27
|
-
- Version patch update due to children dependencies update (`@semcore/input` [3.0.12 ~> 3.0.13], `@semcore/utils` [3.36.0 ~> 3.37.0]).
|
|
28
|
-
|
|
29
|
-
## [4.0.12] - 2022-08-11
|
|
30
|
-
|
|
31
|
-
### Changed
|
|
32
|
-
|
|
33
|
-
- Version patch update due to children dependencies update (`@semcore/input` [3.0.11 ~> 3.0.12], `@semcore/utils` [3.35.1 ~> 3.36.0]).
|
|
34
|
-
|
|
35
|
-
## [4.0.11] - 2022-07-25
|
|
36
|
-
|
|
37
|
-
### Changed
|
|
38
|
-
|
|
39
|
-
- Version patch update due to children dependencies update (`@semcore/input` [3.0.9 ~> 3.0.10]).
|
|
40
|
-
|
|
41
|
-
## [4.0.10] - 2022-07-22
|
|
42
|
-
|
|
43
|
-
### Changed
|
|
44
|
-
|
|
45
|
-
- Version patch update due to children dependencies update (`@semcore/input` [3.0.8 ~> 3.0.9], `@semcore/utils` [3.34.0 ~> 3.35.0]).
|
|
46
|
-
|
|
47
|
-
## [4.0.9] - 2022-07-14
|
|
48
|
-
|
|
49
|
-
### Changed
|
|
50
|
-
|
|
51
|
-
- Version patch update due to children dependencies update (`@semcore/input` [3.0.7 ~> 3.0.8]).
|
|
52
|
-
|
|
53
|
-
## [4.0.8] - 2022-07-14
|
|
54
|
-
|
|
55
|
-
### Changed
|
|
56
|
-
|
|
57
|
-
- Version patch update due to children dependencies update (`@semcore/input` [3.0.6 ~> 3.0.7]).
|
|
58
|
-
|
|
59
23
|
## [4.0.7] - 2022-07-13
|
|
60
24
|
|
|
61
25
|
### Fixed
|
|
@@ -68,36 +32,6 @@ CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangel
|
|
|
68
32
|
|
|
69
33
|
- Version patch update due to children dependencies update (`@semcore/utils` [3.33.0 ~> 3.34.0], `@semcore/input` [3.0.5 ~> 3.0.6]).
|
|
70
34
|
|
|
71
|
-
## [4.0.5] - 2022-06-02
|
|
72
|
-
|
|
73
|
-
### Changed
|
|
74
|
-
|
|
75
|
-
- Version patch update due to children dependencies update (`@semcore/utils` [3.32.2 ~> 3.33.0], `@semcore/input` [3.0.4 ~> 3.0.5]).
|
|
76
|
-
|
|
77
|
-
## [4.0.4] - 2022-05-31
|
|
78
|
-
|
|
79
|
-
### Changed
|
|
80
|
-
|
|
81
|
-
- Version patch update due to children dependencies update (`@semcore/utils` [3.32.1 ~> 3.32.2], `@semcore/input` [3.0.3 ~> 3.0.4]).
|
|
82
|
-
|
|
83
|
-
## [4.0.3] - 2022-05-23
|
|
84
|
-
|
|
85
|
-
### Changed
|
|
86
|
-
|
|
87
|
-
- Version patch update due to children dependencies update (`@semcore/input` [3.0.2 ~> 3.0.3]).
|
|
88
|
-
|
|
89
|
-
## [4.0.2] - 2022-05-19
|
|
90
|
-
|
|
91
|
-
### Changed
|
|
92
|
-
|
|
93
|
-
- Version patch update due to children dependencies update (`@semcore/utils` [3.32.0 ~> 3.32.1], `@semcore/input` [3.0.1 ~> 3.0.2]).
|
|
94
|
-
|
|
95
|
-
## [4.0.1] - 2022-05-18
|
|
96
|
-
|
|
97
|
-
### Changed
|
|
98
|
-
|
|
99
|
-
- Version patch update due to children dependencies update (`@semcore/input` [3.0.0 ~> 3.0.1]).
|
|
100
|
-
|
|
101
35
|
## [4.0.0] - 2022-05-17
|
|
102
36
|
|
|
103
37
|
### BREAK
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright ©, 2022, Semrush Inc. (written by Roman Lysov, Sergey Kobets, Mikhail Karachev, Julia Mnizhek, Elena Krasnopolskaia, Mikhail Sereniti).
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/lib/cjs/InputNumber.js
CHANGED
|
@@ -48,20 +48,20 @@ var style = (
|
|
|
48
48
|
/*__reshadow_css_start__*/
|
|
49
49
|
_core.sstyled.insert(
|
|
50
50
|
/*__inner_css_start__*/
|
|
51
|
-
".
|
|
51
|
+
":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___SInputNumber_5yuhi_gg_:hover .___SValue_5yuhi_gg_:not(.__disabled_5yuhi_gg_) ~ .___SControls_5yuhi_gg_ {\n visibility: visible;\n }\n\n.___SValue_5yuhi_gg_:focus ~ .___SControls_5yuhi_gg_ {\n visibility: visible;\n}\n\n.___SControls_5yuhi_gg_ {\n display: flex;\n flex-flow: column;\n justify-content: center;\n height: 100%;\n visibility: hidden;\n box-sizing: border-box;\n}\n\n.___SControls_5yuhi_gg_.__showControls_5yuhi_gg_ {\n visibility: visible;\n}\n\n.___SUp_5yuhi_gg_,\n.___SDown_5yuhi_gg_ {\n padding: 0;\n width: 16px;\n color: #a9abb6;\n box-sizing: border-box;\n display: inline-flex;\n justify-content: center;\n border: none;\n background: none;\n cursor: pointer\n}\n\n.___SUp_5yuhi_gg_:focus, .___SDown_5yuhi_gg_:focus {\n outline: none;\n }\n\n.___SUp_5yuhi_gg_:hover, .___SDown_5yuhi_gg_:hover {\n color: #484a54;\n }\n\n.___SUp_5yuhi_gg_ {\n padding-bottom: 1px;\n}\n\n.___SDown_5yuhi_gg_ {\n padding-top: 1px;\n}\n\n.___SValue_5yuhi_gg_::-webkit-outer-spin-button,\n .___SValue_5yuhi_gg_::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n.___SValue_5yuhi_gg_._type_number_5yuhi_gg_ {\n -moz-appearance: textfield;\n }\n\n.___SValue_5yuhi_gg_.__disabled_5yuhi_gg_ ~ .___SControls_5yuhi_gg_ {\n opacity: 0.3;\n cursor: default;\n pointer-events: none;\n}\n\n.___SValueHidden_5yuhi_gg_ {\n position: absolute;\n top: 0;\n width: 1px;\n height: 1px;\n padding: 0;\n overflow: hidden;\n}\n"
|
|
52
52
|
/*__inner_css_end__*/
|
|
53
|
-
, "
|
|
53
|
+
, "5yuhi_gg_")
|
|
54
54
|
/*__reshadow_css_end__*/
|
|
55
55
|
, {
|
|
56
|
-
"__SInputNumber": "
|
|
57
|
-
"__SValue": "
|
|
58
|
-
"_disabled": "
|
|
59
|
-
"__SControls": "
|
|
60
|
-
"_showControls": "
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"_type_number": "
|
|
64
|
-
"__SValueHidden": "
|
|
56
|
+
"__SInputNumber": "___SInputNumber_5yuhi_gg_",
|
|
57
|
+
"__SValue": "___SValue_5yuhi_gg_",
|
|
58
|
+
"_disabled": "__disabled_5yuhi_gg_",
|
|
59
|
+
"__SControls": "___SControls_5yuhi_gg_",
|
|
60
|
+
"_showControls": "__showControls_5yuhi_gg_",
|
|
61
|
+
"__SUp": "___SUp_5yuhi_gg_",
|
|
62
|
+
"__SDown": "___SDown_5yuhi_gg_",
|
|
63
|
+
"_type_number": "_type_number_5yuhi_gg_",
|
|
64
|
+
"__SValueHidden": "___SValueHidden_5yuhi_gg_"
|
|
65
65
|
});
|
|
66
66
|
|
|
67
67
|
function parseValueWithMinMax(value) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { CProps, PropGetterFn, ReturnEl } from '@semcore/core';\nimport { IInputAddonProps, IInputProps, IInputValueProps } from '@semcore/input';\n\nexport type InputNumberValue = string;\nexport type InputNumberSize = 'm' | 'l';\n\nexport interface IInputNumberProps extends IInputProps {\n /** Input size\n * @default m\n * */\n size?: InputNumberSize;\n}\n\nexport interface IInputNumberValueProps extends IInputValueProps {\n /** Minimum value\n * @default Number.MIN_SAFE_INTEGER\n */\n min?: number;\n /** Maximum value\n * @default Number.MAX_SAFE_INTEGER\n */\n max?: number;\n /** Value change step\n * @default 1\n */\n step?: number;\n /** Numeric value */\n value?: InputNumberValue;\n /** Called when the input value changes, it returns its current value in numeric format */\n onChange?: (value: InputNumberValue, event?: React.SyntheticEvent<HTMLInputElement>) => void;\n}\n\nexport interface IInputNumberControlsProps extends IInputAddonProps {\n /** Always displays controls (steppers)\n * @default false\n */\n showControls?: boolean;\n}\n\nexport interface IInputNumberCtx {\n getValueProps: PropGetterFn;\n getControlsProps: PropGetterFn;\n getAddonProps: PropGetterFn;\n}\n\ndeclare const InputNumber: (<T>(\n props: CProps<IInputNumberProps & T, IInputNumberCtx>,\n) => ReturnEl) & {\n Value: <T>(props: IInputNumberValueProps & T) => ReturnEl;\n Controls: <T>(props: IInputNumberControlsProps & T) => ReturnEl;\n Addon: <T>(props: IInputAddonProps & T) => ReturnEl;\n};\n\nexport default InputNumber;\n"],"mappings":""}
|
package/lib/es6/InputNumber.js
CHANGED
|
@@ -28,20 +28,20 @@ var style = (
|
|
|
28
28
|
/*__reshadow_css_start__*/
|
|
29
29
|
_sstyled.insert(
|
|
30
30
|
/*__inner_css_start__*/
|
|
31
|
-
".
|
|
31
|
+
":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___SInputNumber_5yuhi_gg_:hover .___SValue_5yuhi_gg_:not(.__disabled_5yuhi_gg_) ~ .___SControls_5yuhi_gg_ {\n visibility: visible;\n }\n\n.___SValue_5yuhi_gg_:focus ~ .___SControls_5yuhi_gg_ {\n visibility: visible;\n}\n\n.___SControls_5yuhi_gg_ {\n display: flex;\n flex-flow: column;\n justify-content: center;\n height: 100%;\n visibility: hidden;\n box-sizing: border-box;\n}\n\n.___SControls_5yuhi_gg_.__showControls_5yuhi_gg_ {\n visibility: visible;\n}\n\n.___SUp_5yuhi_gg_,\n.___SDown_5yuhi_gg_ {\n padding: 0;\n width: 16px;\n color: #a9abb6;\n box-sizing: border-box;\n display: inline-flex;\n justify-content: center;\n border: none;\n background: none;\n cursor: pointer\n}\n\n.___SUp_5yuhi_gg_:focus, .___SDown_5yuhi_gg_:focus {\n outline: none;\n }\n\n.___SUp_5yuhi_gg_:hover, .___SDown_5yuhi_gg_:hover {\n color: #484a54;\n }\n\n.___SUp_5yuhi_gg_ {\n padding-bottom: 1px;\n}\n\n.___SDown_5yuhi_gg_ {\n padding-top: 1px;\n}\n\n.___SValue_5yuhi_gg_::-webkit-outer-spin-button,\n .___SValue_5yuhi_gg_::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n.___SValue_5yuhi_gg_._type_number_5yuhi_gg_ {\n -moz-appearance: textfield;\n }\n\n.___SValue_5yuhi_gg_.__disabled_5yuhi_gg_ ~ .___SControls_5yuhi_gg_ {\n opacity: 0.3;\n cursor: default;\n pointer-events: none;\n}\n\n.___SValueHidden_5yuhi_gg_ {\n position: absolute;\n top: 0;\n width: 1px;\n height: 1px;\n padding: 0;\n overflow: hidden;\n}\n"
|
|
32
32
|
/*__inner_css_end__*/
|
|
33
|
-
, "
|
|
33
|
+
, "5yuhi_gg_")
|
|
34
34
|
/*__reshadow_css_end__*/
|
|
35
35
|
, {
|
|
36
|
-
"__SInputNumber": "
|
|
37
|
-
"__SValue": "
|
|
38
|
-
"_disabled": "
|
|
39
|
-
"__SControls": "
|
|
40
|
-
"_showControls": "
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"_type_number": "
|
|
44
|
-
"__SValueHidden": "
|
|
36
|
+
"__SInputNumber": "___SInputNumber_5yuhi_gg_",
|
|
37
|
+
"__SValue": "___SValue_5yuhi_gg_",
|
|
38
|
+
"_disabled": "__disabled_5yuhi_gg_",
|
|
39
|
+
"__SControls": "___SControls_5yuhi_gg_",
|
|
40
|
+
"_showControls": "__showControls_5yuhi_gg_",
|
|
41
|
+
"__SUp": "___SUp_5yuhi_gg_",
|
|
42
|
+
"__SDown": "___SDown_5yuhi_gg_",
|
|
43
|
+
"_type_number": "_type_number_5yuhi_gg_",
|
|
44
|
+
"__SValueHidden": "___SValueHidden_5yuhi_gg_"
|
|
45
45
|
});
|
|
46
46
|
|
|
47
47
|
function parseValueWithMinMax(value) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { CProps, PropGetterFn, ReturnEl } from '@semcore/core';\nimport { IInputAddonProps, IInputProps, IInputValueProps } from '@semcore/input';\n\nexport type InputNumberValue = string;\nexport type InputNumberSize = 'm' | 'l';\n\nexport interface IInputNumberProps extends IInputProps {\n /** Input size\n * @default m\n * */\n size?: InputNumberSize;\n}\n\nexport interface IInputNumberValueProps extends IInputValueProps {\n /** Minimum value\n * @default Number.MIN_SAFE_INTEGER\n */\n min?: number;\n /** Maximum value\n * @default Number.MAX_SAFE_INTEGER\n */\n max?: number;\n /** Value change step\n * @default 1\n */\n step?: number;\n /** Numeric value */\n value?: InputNumberValue;\n /** Called when the input value changes, it returns its current value in numeric format */\n onChange?: (value: InputNumberValue, event?: React.SyntheticEvent<HTMLInputElement>) => void;\n}\n\nexport interface IInputNumberControlsProps extends IInputAddonProps {\n /** Always displays controls (steppers)\n * @default false\n */\n showControls?: boolean;\n}\n\nexport interface IInputNumberCtx {\n getValueProps: PropGetterFn;\n getControlsProps: PropGetterFn;\n getAddonProps: PropGetterFn;\n}\n\ndeclare const InputNumber: (<T>(\n props: CProps<IInputNumberProps & T, IInputNumberCtx>,\n) => ReturnEl) & {\n Value: <T>(props: IInputNumberValueProps & T) => ReturnEl;\n Controls: <T>(props: IInputNumberControlsProps & T) => ReturnEl;\n Addon: <T>(props: IInputAddonProps & T) => ReturnEl;\n};\n\nexport default InputNumber;\n"],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/input-number",
|
|
3
3
|
"description": "Semrush InputNumber Component",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.18",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
10
10
|
"license": "MIT",
|
|
11
|
-
"scripts": {
|
|
12
|
-
"build": "build --source=js",
|
|
13
|
-
"test": "jest"
|
|
14
|
-
},
|
|
15
11
|
"dependencies": {
|
|
16
12
|
"@semcore/input": "^3.0.0",
|
|
17
13
|
"@semcore/utils": "^3.15"
|
|
@@ -29,6 +25,11 @@
|
|
|
29
25
|
"directory": "semcore/input-number"
|
|
30
26
|
},
|
|
31
27
|
"devDependencies": {
|
|
28
|
+
"@types/react": "16.8 - 17",
|
|
32
29
|
"@semcore/jest-preset-ui": "1.0.0"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "pnpm semcore-builder --source=js",
|
|
33
|
+
"test": "jest"
|
|
33
34
|
}
|
|
34
|
-
}
|
|
35
|
+
}
|
package/lib/cjs/index.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';
|
|
3
|
-
import { IInputAddonProps, IInputProps, IInputValueProps } from '@semcore/input';
|
|
4
|
-
|
|
5
|
-
export type InputNumberValue = string;
|
|
6
|
-
export type InputNumberSize = 'm' | 'l';
|
|
7
|
-
|
|
8
|
-
export interface IInputNumberProps extends IInputProps {
|
|
9
|
-
/** Input size
|
|
10
|
-
* @default m
|
|
11
|
-
* */
|
|
12
|
-
size?: InputNumberSize;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface IInputNumberValueProps extends IInputValueProps {
|
|
16
|
-
/** Minimum value
|
|
17
|
-
* @default Number.MIN_SAFE_INTEGER
|
|
18
|
-
*/
|
|
19
|
-
min?: number;
|
|
20
|
-
/** Maximum value
|
|
21
|
-
* @default Number.MAX_SAFE_INTEGER
|
|
22
|
-
*/
|
|
23
|
-
max?: number;
|
|
24
|
-
/** Value change step
|
|
25
|
-
* @default 1
|
|
26
|
-
*/
|
|
27
|
-
step?: number;
|
|
28
|
-
/** Numeric value */
|
|
29
|
-
value?: InputNumberValue;
|
|
30
|
-
/** Called when the input value changes, it returns its current value in numeric format */
|
|
31
|
-
onChange?: (value: InputNumberValue, event?: React.SyntheticEvent<HTMLInputElement>) => void;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface IInputNumberControlsProps extends IInputAddonProps {
|
|
35
|
-
/** Always displays controls (steppers)
|
|
36
|
-
* @default false
|
|
37
|
-
*/
|
|
38
|
-
showControls?: boolean;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface IInputNumberCtx {
|
|
42
|
-
getValueProps: PropGetterFn;
|
|
43
|
-
getControlsProps: PropGetterFn;
|
|
44
|
-
getAddonProps: PropGetterFn;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
declare const InputNumber: (<T>(
|
|
48
|
-
props: CProps<IInputNumberProps & T, IInputNumberCtx>,
|
|
49
|
-
) => ReturnEl) & {
|
|
50
|
-
Value: <T>(props: IInputNumberValueProps & T) => ReturnEl;
|
|
51
|
-
Controls: <T>(props: IInputNumberControlsProps & T) => ReturnEl;
|
|
52
|
-
Addon: <T>(props: IInputAddonProps & T) => ReturnEl;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export default InputNumber;
|
package/lib/es6/index.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';
|
|
3
|
-
import { IInputAddonProps, IInputProps, IInputValueProps } from '@semcore/input';
|
|
4
|
-
|
|
5
|
-
export type InputNumberValue = string;
|
|
6
|
-
export type InputNumberSize = 'm' | 'l';
|
|
7
|
-
|
|
8
|
-
export interface IInputNumberProps extends IInputProps {
|
|
9
|
-
/** Input size
|
|
10
|
-
* @default m
|
|
11
|
-
* */
|
|
12
|
-
size?: InputNumberSize;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface IInputNumberValueProps extends IInputValueProps {
|
|
16
|
-
/** Minimum value
|
|
17
|
-
* @default Number.MIN_SAFE_INTEGER
|
|
18
|
-
*/
|
|
19
|
-
min?: number;
|
|
20
|
-
/** Maximum value
|
|
21
|
-
* @default Number.MAX_SAFE_INTEGER
|
|
22
|
-
*/
|
|
23
|
-
max?: number;
|
|
24
|
-
/** Value change step
|
|
25
|
-
* @default 1
|
|
26
|
-
*/
|
|
27
|
-
step?: number;
|
|
28
|
-
/** Numeric value */
|
|
29
|
-
value?: InputNumberValue;
|
|
30
|
-
/** Called when the input value changes, it returns its current value in numeric format */
|
|
31
|
-
onChange?: (value: InputNumberValue, event?: React.SyntheticEvent<HTMLInputElement>) => void;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface IInputNumberControlsProps extends IInputAddonProps {
|
|
35
|
-
/** Always displays controls (steppers)
|
|
36
|
-
* @default false
|
|
37
|
-
*/
|
|
38
|
-
showControls?: boolean;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface IInputNumberCtx {
|
|
42
|
-
getValueProps: PropGetterFn;
|
|
43
|
-
getControlsProps: PropGetterFn;
|
|
44
|
-
getAddonProps: PropGetterFn;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
declare const InputNumber: (<T>(
|
|
48
|
-
props: CProps<IInputNumberProps & T, IInputNumberCtx>,
|
|
49
|
-
) => ReturnEl) & {
|
|
50
|
-
Value: <T>(props: IInputNumberValueProps & T) => ReturnEl;
|
|
51
|
-
Controls: <T>(props: IInputNumberControlsProps & T) => ReturnEl;
|
|
52
|
-
Addon: <T>(props: IInputAddonProps & T) => ReturnEl;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export default InputNumber;
|