@semcore/input-number 4.7.4 → 5.0.0-beta.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.md +3 -3
- package/lib/cjs/InputNumber.js +9 -9
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/es6/InputNumber.js +9 -9
- package/lib/es6/index.d.js.map +1 -1
- package/lib/types/index.d.ts +22 -16
- package/package.json +4 -4
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
|
-
## [
|
|
5
|
+
## [5.0.0] - 2023-07-15
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Break
|
|
8
8
|
|
|
9
|
-
-
|
|
9
|
+
- Strict, backward incompatible typings.
|
|
10
10
|
|
|
11
11
|
## [4.7.3] - 2023-06-27
|
|
12
12
|
|
package/lib/cjs/InputNumber.js
CHANGED
|
@@ -20,15 +20,15 @@ var _buttons = require("./buttons");
|
|
|
20
20
|
var _intergalacticDynamicLocales = require("./translations/__intergalactic-dynamic-locales");
|
|
21
21
|
var _i18nEnhance = _interopRequireDefault(require("@semcore/utils/lib/enhances/i18nEnhance"));
|
|
22
22
|
/*__reshadow-styles__:"./style/input-number.shadow.css"*/
|
|
23
|
-
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".
|
|
24
|
-
"__SValue": "
|
|
25
|
-
"__SControls": "
|
|
26
|
-
"_showControls": "
|
|
27
|
-
"__SUp": "
|
|
28
|
-
"__SDown": "
|
|
29
|
-
"_type_number": "
|
|
30
|
-
"_disabled": "
|
|
31
|
-
"__SValueHidden": "
|
|
23
|
+
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SValue_1k66r_gg_:focus~.___SControls_1k66r_gg_{display:flex}.___SControls_1k66r_gg_{display:none;flex-flow:column;justify-content:center;height:100%;box-sizing:border-box}.___SControls_1k66r_gg_.__showControls_1k66r_gg_{display:flex}.___SDown_1k66r_gg_,.___SUp_1k66r_gg_{padding:0;width:16px;color:var(--intergalactic-icon-secondary-neutral, #a9abb6);box-sizing:border-box;display:inline-flex;justify-content:center;border:0;background:0 0;cursor:pointer}.___SDown_1k66r_gg_:focus,.___SUp_1k66r_gg_:focus{outline:0}@media (hover:hover){.___SDown_1k66r_gg_:hover,.___SUp_1k66r_gg_:hover{color:var(--intergalactic-icon-secondary-neutral-hover-active, #8a8e9b)}}.___SUp_1k66r_gg_{padding-bottom:1px}.___SDown_1k66r_gg_{padding-top:1px}.___SValue_1k66r_gg_::-webkit-inner-spin-button,.___SValue_1k66r_gg_::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.___SValue_1k66r_gg_._type_number_1k66r_gg_{-moz-appearance:textfield}.___SValue_1k66r_gg_.__disabled_1k66r_gg_~.___SControls_1k66r_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SValueHidden_1k66r_gg_{position:absolute;top:0;width:1px;height:1px;padding:0;overflow:hidden}" /*__inner_css_end__*/, "1k66r_gg_") /*__reshadow_css_end__*/, {
|
|
24
|
+
"__SValue": "___SValue_1k66r_gg_",
|
|
25
|
+
"__SControls": "___SControls_1k66r_gg_",
|
|
26
|
+
"_showControls": "__showControls_1k66r_gg_",
|
|
27
|
+
"__SUp": "___SUp_1k66r_gg_",
|
|
28
|
+
"__SDown": "___SDown_1k66r_gg_",
|
|
29
|
+
"_type_number": "_type_number_1k66r_gg_",
|
|
30
|
+
"_disabled": "__disabled_1k66r_gg_",
|
|
31
|
+
"__SValueHidden": "___SValueHidden_1k66r_gg_"
|
|
32
32
|
});
|
|
33
33
|
function parseValueWithMinMax(value) {
|
|
34
34
|
var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.MIN_SAFE_INTEGER;
|
package/lib/cjs/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport {
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { Intergalactic, PropGetterFn, UnknownProperties } from '@semcore/core';\nimport { InputAddonProps, InputProps, InputValueProps } from '@semcore/input';\n\nexport type InputNumberValue = string;\nexport type InputNumberSize = 'm' | 'l';\n\n/** @deprecated */\nexport interface IInputNumberProps extends InputNumberProps, UnknownProperties {}\nexport type InputNumberProps = InputProps & {\n /** Input size\n * @default m\n * */\n size?: InputNumberSize;\n};\n\n/** @deprecated */\nexport interface IInputNumberValueProps extends InputNumberValueProps, UnknownProperties {}\nexport type InputNumberValueProps = InputValueProps & {\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 locale?: string;\n};\n\n/** @deprecated */\nexport interface IInputNumberControlsProps extends InputNumberControlsProps, UnknownProperties {}\nexport type InputNumberControlsProps = InputAddonProps & {\n /** Always displays controls (steppers)\n * @default false\n */\n showControls?: boolean;\n};\n\n/** @deprecated */\nexport interface IInputNumberCtx extends InputNumberCtx, UnknownProperties {}\nexport type InputNumberCtx = {\n getValueProps: PropGetterFn;\n getControlsProps: PropGetterFn;\n getAddonProps: PropGetterFn;\n};\n\ndeclare const InputNumber: Intergalactic.Component<'div', InputNumberProps, InputNumberCtx> & {\n Value: Intergalactic.Component<'input', InputNumberValueProps>;\n Controls: Intergalactic.Component<'div', InputNumberControlsProps>;\n Addon: Intergalactic.Component<'div', InputAddonProps>;\n};\n\nexport default InputNumber;\n"],"mappings":""}
|
package/lib/es6/InputNumber.js
CHANGED
|
@@ -16,15 +16,15 @@ import { IncrementIcon, DecrementIcon } from './buttons';
|
|
|
16
16
|
import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
|
|
17
17
|
import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
|
|
18
18
|
/*__reshadow-styles__:"./style/input-number.shadow.css"*/
|
|
19
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
20
|
-
"__SValue": "
|
|
21
|
-
"__SControls": "
|
|
22
|
-
"_showControls": "
|
|
23
|
-
"__SUp": "
|
|
24
|
-
"__SDown": "
|
|
25
|
-
"_type_number": "
|
|
26
|
-
"_disabled": "
|
|
27
|
-
"__SValueHidden": "
|
|
19
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SValue_1k66r_gg_:focus~.___SControls_1k66r_gg_{display:flex}.___SControls_1k66r_gg_{display:none;flex-flow:column;justify-content:center;height:100%;box-sizing:border-box}.___SControls_1k66r_gg_.__showControls_1k66r_gg_{display:flex}.___SDown_1k66r_gg_,.___SUp_1k66r_gg_{padding:0;width:16px;color:var(--intergalactic-icon-secondary-neutral, #a9abb6);box-sizing:border-box;display:inline-flex;justify-content:center;border:0;background:0 0;cursor:pointer}.___SDown_1k66r_gg_:focus,.___SUp_1k66r_gg_:focus{outline:0}@media (hover:hover){.___SDown_1k66r_gg_:hover,.___SUp_1k66r_gg_:hover{color:var(--intergalactic-icon-secondary-neutral-hover-active, #8a8e9b)}}.___SUp_1k66r_gg_{padding-bottom:1px}.___SDown_1k66r_gg_{padding-top:1px}.___SValue_1k66r_gg_::-webkit-inner-spin-button,.___SValue_1k66r_gg_::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.___SValue_1k66r_gg_._type_number_1k66r_gg_{-moz-appearance:textfield}.___SValue_1k66r_gg_.__disabled_1k66r_gg_~.___SControls_1k66r_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SValueHidden_1k66r_gg_{position:absolute;top:0;width:1px;height:1px;padding:0;overflow:hidden}" /*__inner_css_end__*/, "1k66r_gg_") /*__reshadow_css_end__*/, {
|
|
20
|
+
"__SValue": "___SValue_1k66r_gg_",
|
|
21
|
+
"__SControls": "___SControls_1k66r_gg_",
|
|
22
|
+
"_showControls": "__showControls_1k66r_gg_",
|
|
23
|
+
"__SUp": "___SUp_1k66r_gg_",
|
|
24
|
+
"__SDown": "___SDown_1k66r_gg_",
|
|
25
|
+
"_type_number": "_type_number_1k66r_gg_",
|
|
26
|
+
"_disabled": "__disabled_1k66r_gg_",
|
|
27
|
+
"__SValueHidden": "___SValueHidden_1k66r_gg_"
|
|
28
28
|
});
|
|
29
29
|
function parseValueWithMinMax(value) {
|
|
30
30
|
var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.MIN_SAFE_INTEGER;
|
package/lib/es6/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport {
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { Intergalactic, PropGetterFn, UnknownProperties } from '@semcore/core';\nimport { InputAddonProps, InputProps, InputValueProps } from '@semcore/input';\n\nexport type InputNumberValue = string;\nexport type InputNumberSize = 'm' | 'l';\n\n/** @deprecated */\nexport interface IInputNumberProps extends InputNumberProps, UnknownProperties {}\nexport type InputNumberProps = InputProps & {\n /** Input size\n * @default m\n * */\n size?: InputNumberSize;\n};\n\n/** @deprecated */\nexport interface IInputNumberValueProps extends InputNumberValueProps, UnknownProperties {}\nexport type InputNumberValueProps = InputValueProps & {\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 locale?: string;\n};\n\n/** @deprecated */\nexport interface IInputNumberControlsProps extends InputNumberControlsProps, UnknownProperties {}\nexport type InputNumberControlsProps = InputAddonProps & {\n /** Always displays controls (steppers)\n * @default false\n */\n showControls?: boolean;\n};\n\n/** @deprecated */\nexport interface IInputNumberCtx extends InputNumberCtx, UnknownProperties {}\nexport type InputNumberCtx = {\n getValueProps: PropGetterFn;\n getControlsProps: PropGetterFn;\n getAddonProps: PropGetterFn;\n};\n\ndeclare const InputNumber: Intergalactic.Component<'div', InputNumberProps, InputNumberCtx> & {\n Value: Intergalactic.Component<'input', InputNumberValueProps>;\n Controls: Intergalactic.Component<'div', InputNumberControlsProps>;\n Addon: Intergalactic.Component<'div', InputAddonProps>;\n};\n\nexport default InputNumber;\n"],"mappings":""}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Intergalactic, PropGetterFn, UnknownProperties } from '@semcore/core';
|
|
3
|
+
import { InputAddonProps, InputProps, InputValueProps } from '@semcore/input';
|
|
4
4
|
|
|
5
5
|
export type InputNumberValue = string;
|
|
6
6
|
export type InputNumberSize = 'm' | 'l';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/** @deprecated */
|
|
9
|
+
export interface IInputNumberProps extends InputNumberProps, UnknownProperties {}
|
|
10
|
+
export type InputNumberProps = InputProps & {
|
|
9
11
|
/** Input size
|
|
10
12
|
* @default m
|
|
11
13
|
* */
|
|
12
14
|
size?: InputNumberSize;
|
|
13
|
-
}
|
|
15
|
+
};
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
/** @deprecated */
|
|
18
|
+
export interface IInputNumberValueProps extends InputNumberValueProps, UnknownProperties {}
|
|
19
|
+
export type InputNumberValueProps = InputValueProps & {
|
|
16
20
|
/** Minimum value
|
|
17
21
|
* @default Number.MIN_SAFE_INTEGER
|
|
18
22
|
*/
|
|
@@ -30,27 +34,29 @@ export interface IInputNumberValueProps extends IInputValueProps {
|
|
|
30
34
|
/** Called when the input value changes, it returns its current value in numeric format */
|
|
31
35
|
onChange?: (value: InputNumberValue, event?: React.SyntheticEvent<HTMLInputElement>) => void;
|
|
32
36
|
locale?: string;
|
|
33
|
-
}
|
|
37
|
+
};
|
|
34
38
|
|
|
35
|
-
|
|
39
|
+
/** @deprecated */
|
|
40
|
+
export interface IInputNumberControlsProps extends InputNumberControlsProps, UnknownProperties {}
|
|
41
|
+
export type InputNumberControlsProps = InputAddonProps & {
|
|
36
42
|
/** Always displays controls (steppers)
|
|
37
43
|
* @default false
|
|
38
44
|
*/
|
|
39
45
|
showControls?: boolean;
|
|
40
|
-
}
|
|
46
|
+
};
|
|
41
47
|
|
|
42
|
-
|
|
48
|
+
/** @deprecated */
|
|
49
|
+
export interface IInputNumberCtx extends InputNumberCtx, UnknownProperties {}
|
|
50
|
+
export type InputNumberCtx = {
|
|
43
51
|
getValueProps: PropGetterFn;
|
|
44
52
|
getControlsProps: PropGetterFn;
|
|
45
53
|
getAddonProps: PropGetterFn;
|
|
46
|
-
}
|
|
54
|
+
};
|
|
47
55
|
|
|
48
|
-
declare const InputNumber:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
Controls: <T>(props: IInputNumberControlsProps & T) => ReturnEl;
|
|
53
|
-
Addon: <T>(props: IInputAddonProps & T) => ReturnEl;
|
|
56
|
+
declare const InputNumber: Intergalactic.Component<'div', InputNumberProps, InputNumberCtx> & {
|
|
57
|
+
Value: Intergalactic.Component<'input', InputNumberValueProps>;
|
|
58
|
+
Controls: Intergalactic.Component<'div', InputNumberControlsProps>;
|
|
59
|
+
Addon: Intergalactic.Component<'div', InputAddonProps>;
|
|
54
60
|
};
|
|
55
61
|
|
|
56
62
|
export default InputNumber;
|
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
|
+
"version": "5.0.0-beta.1",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@semcore/input": "
|
|
13
|
-
"@semcore/utils": "
|
|
12
|
+
"@semcore/input": "4.0.0-beta.1",
|
|
13
|
+
"@semcore/utils": "4.0.0-beta.1"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"@semcore/core": "
|
|
16
|
+
"@semcore/core": "2.0.0-beta.1",
|
|
17
17
|
"react": "16.8 - 18",
|
|
18
18
|
"react-dom": "16.8 - 18"
|
|
19
19
|
},
|