@semcore/input-number 4.0.15 → 4.0.17
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 +12 -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 +3 -2
- package/lib/cjs/index.d.ts +0 -55
- package/lib/es6/index.d.ts +0 -55
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [4.0.17] - 2022-10-04
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/input` [3.0.15 ~> 3.0.16], `@semcore/utils` [3.37.1 ~> 3.37.2]).
|
|
10
|
+
|
|
11
|
+
## [4.0.16] - 2022-08-30
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Version patch update due to children dependencies update (`@semcore/input` [3.0.14 ~> 3.0.15], `@semcore/utils` [3.37.0 ~> 3.37.1]).
|
|
16
|
+
|
|
5
17
|
## [4.0.15] - 2022-08-25
|
|
6
18
|
|
|
7
19
|
### Added
|
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
|
+
".___SInputNumber_1nwc8_gg_:hover .___SValue_1nwc8_gg_:not(.__disabled_1nwc8_gg_)~.___SControls_1nwc8_gg_{visibility:visible}.___SValue_1nwc8_gg_:focus~.___SControls_1nwc8_gg_{visibility:visible}.___SControls_1nwc8_gg_{display:flex;flex-flow:column;justify-content:center;height:100%;visibility:hidden;box-sizing:border-box}.___SControls_1nwc8_gg_.__showControls_1nwc8_gg_{visibility:visible}.___SDown_1nwc8_gg_,.___SUp_1nwc8_gg_{padding:0;width:16px;color:#a9abb6;box-sizing:border-box;display:inline-flex;justify-content:center;border:none;background:none;cursor:pointer}.___SDown_1nwc8_gg_:focus,.___SUp_1nwc8_gg_:focus{outline:none}.___SDown_1nwc8_gg_:hover,.___SUp_1nwc8_gg_:hover{color:#484a54}.___SUp_1nwc8_gg_{padding-bottom:1px}.___SDown_1nwc8_gg_{padding-top:1px}.___SValue_1nwc8_gg_::-webkit-inner-spin-button,.___SValue_1nwc8_gg_::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.___SValue_1nwc8_gg_._type_number_1nwc8_gg_{-moz-appearance:textfield}.___SValue_1nwc8_gg_.__disabled_1nwc8_gg_~.___SControls_1nwc8_gg_{opacity:0.3;cursor:default;pointer-events:none}.___SValueHidden_1nwc8_gg_{position:absolute;top:0;width:1px;height:1px;padding:0;overflow:hidden}"
|
|
52
52
|
/*__inner_css_end__*/
|
|
53
|
-
, "
|
|
53
|
+
, "1nwc8_gg_")
|
|
54
54
|
/*__reshadow_css_end__*/
|
|
55
55
|
, {
|
|
56
|
-
"__SInputNumber": "
|
|
57
|
-
"__SValue": "
|
|
58
|
-
"_disabled": "
|
|
59
|
-
"__SControls": "
|
|
60
|
-
"_showControls": "
|
|
61
|
-
"__SDown": "
|
|
62
|
-
"__SUp": "
|
|
63
|
-
"_type_number": "
|
|
64
|
-
"__SValueHidden": "
|
|
56
|
+
"__SInputNumber": "___SInputNumber_1nwc8_gg_",
|
|
57
|
+
"__SValue": "___SValue_1nwc8_gg_",
|
|
58
|
+
"_disabled": "__disabled_1nwc8_gg_",
|
|
59
|
+
"__SControls": "___SControls_1nwc8_gg_",
|
|
60
|
+
"_showControls": "__showControls_1nwc8_gg_",
|
|
61
|
+
"__SDown": "___SDown_1nwc8_gg_",
|
|
62
|
+
"__SUp": "___SUp_1nwc8_gg_",
|
|
63
|
+
"_type_number": "_type_number_1nwc8_gg_",
|
|
64
|
+
"__SValueHidden": "___SValueHidden_1nwc8_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
|
+
".___SInputNumber_1nwc8_gg_:hover .___SValue_1nwc8_gg_:not(.__disabled_1nwc8_gg_)~.___SControls_1nwc8_gg_{visibility:visible}.___SValue_1nwc8_gg_:focus~.___SControls_1nwc8_gg_{visibility:visible}.___SControls_1nwc8_gg_{display:flex;flex-flow:column;justify-content:center;height:100%;visibility:hidden;box-sizing:border-box}.___SControls_1nwc8_gg_.__showControls_1nwc8_gg_{visibility:visible}.___SDown_1nwc8_gg_,.___SUp_1nwc8_gg_{padding:0;width:16px;color:#a9abb6;box-sizing:border-box;display:inline-flex;justify-content:center;border:none;background:none;cursor:pointer}.___SDown_1nwc8_gg_:focus,.___SUp_1nwc8_gg_:focus{outline:none}.___SDown_1nwc8_gg_:hover,.___SUp_1nwc8_gg_:hover{color:#484a54}.___SUp_1nwc8_gg_{padding-bottom:1px}.___SDown_1nwc8_gg_{padding-top:1px}.___SValue_1nwc8_gg_::-webkit-inner-spin-button,.___SValue_1nwc8_gg_::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.___SValue_1nwc8_gg_._type_number_1nwc8_gg_{-moz-appearance:textfield}.___SValue_1nwc8_gg_.__disabled_1nwc8_gg_~.___SControls_1nwc8_gg_{opacity:0.3;cursor:default;pointer-events:none}.___SValueHidden_1nwc8_gg_{position:absolute;top:0;width:1px;height:1px;padding:0;overflow:hidden}"
|
|
32
32
|
/*__inner_css_end__*/
|
|
33
|
-
, "
|
|
33
|
+
, "1nwc8_gg_")
|
|
34
34
|
/*__reshadow_css_end__*/
|
|
35
35
|
, {
|
|
36
|
-
"__SInputNumber": "
|
|
37
|
-
"__SValue": "
|
|
38
|
-
"_disabled": "
|
|
39
|
-
"__SControls": "
|
|
40
|
-
"_showControls": "
|
|
41
|
-
"__SDown": "
|
|
42
|
-
"__SUp": "
|
|
43
|
-
"_type_number": "
|
|
44
|
-
"__SValueHidden": "
|
|
36
|
+
"__SInputNumber": "___SInputNumber_1nwc8_gg_",
|
|
37
|
+
"__SValue": "___SValue_1nwc8_gg_",
|
|
38
|
+
"_disabled": "__disabled_1nwc8_gg_",
|
|
39
|
+
"__SControls": "___SControls_1nwc8_gg_",
|
|
40
|
+
"_showControls": "__showControls_1nwc8_gg_",
|
|
41
|
+
"__SDown": "___SDown_1nwc8_gg_",
|
|
42
|
+
"__SUp": "___SUp_1nwc8_gg_",
|
|
43
|
+
"_type_number": "_type_number_1nwc8_gg_",
|
|
44
|
+
"__SValueHidden": "___SValueHidden_1nwc8_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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/input-number",
|
|
3
3
|
"description": "Semrush InputNumber Component",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.17",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"scripts": {
|
|
12
|
-
"build": "
|
|
12
|
+
"build": "pnpm semcore-builder --source=js",
|
|
13
13
|
"test": "jest"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"directory": "semcore/input-number"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
+
"@types/react": "16.8 - 17",
|
|
32
33
|
"@semcore/jest-preset-ui": "1.0.0"
|
|
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;
|