@alfalab/core-components-number-input 2.0.2 → 2.0.3
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/components/number-input/Component.d.ts +6 -1
- package/components/number-input/Component.js +3 -3
- package/components/number-input/default.css +4 -4
- package/components/number-input/index.css +3 -3
- package/components/number-input/inverted.css +4 -4
- package/components/steppers/Component.js +3 -3
- package/components/steppers/default.css +2 -2
- package/components/steppers/index.css +4 -4
- package/components/steppers/inverted.css +2 -2
- package/cssm/components/number-input/Component.d.ts +6 -1
- package/esm/components/number-input/Component.d.ts +6 -1
- package/esm/components/number-input/Component.js +3 -3
- package/esm/components/number-input/default.css +4 -4
- package/esm/components/number-input/index.css +3 -3
- package/esm/components/number-input/inverted.css +4 -4
- package/esm/components/steppers/Component.js +3 -3
- package/esm/components/steppers/default.css +2 -2
- package/esm/components/steppers/index.css +4 -4
- package/esm/components/steppers/inverted.css +2 -2
- package/modern/components/number-input/Component.d.ts +6 -1
- package/modern/components/number-input/Component.js +3 -3
- package/modern/components/number-input/default.css +4 -4
- package/modern/components/number-input/index.css +3 -3
- package/modern/components/number-input/inverted.css +4 -4
- package/modern/components/steppers/Component.js +3 -3
- package/modern/components/steppers/default.css +2 -2
- package/modern/components/steppers/index.css +4 -4
- package/modern/components/steppers/inverted.css +2 -2
- package/package.json +3 -3
- package/src/components/number-input/Component.tsx +7 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ChangeEvent, FC, Ref } from "react";
|
|
4
4
|
import { InputProps } from "@alfalab/core-components-input";
|
|
5
|
-
interface NumberInputProps extends Omit<InputProps, 'value' | 'onChange' | 'type' | 'defaultValue'> {
|
|
5
|
+
interface NumberInputProps extends Omit<InputProps, 'value' | 'onChange' | 'type' | 'defaultValue' | 'dataTestId'> {
|
|
6
6
|
/**
|
|
7
7
|
* Значение поля ввода
|
|
8
8
|
*/
|
|
@@ -50,6 +50,11 @@ interface NumberInputProps extends Omit<InputProps, 'value' | 'onChange' | 'type
|
|
|
50
50
|
onChange?: (e: ChangeEvent<HTMLInputElement> | null, payload: {
|
|
51
51
|
value: number | null;
|
|
52
52
|
}) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Идентификатор для систем автоматизированного тестирования.
|
|
55
|
+
* Для кнопки инкремента используется модификатор -increment-button, декремента -decrement-button
|
|
56
|
+
*/
|
|
57
|
+
dataTestId?: string;
|
|
53
58
|
}
|
|
54
59
|
declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
55
60
|
export { NumberInputProps, NumberInput };
|
|
@@ -21,13 +21,13 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
21
21
|
var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
22
22
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
23
23
|
|
|
24
|
-
var defaultColors = {"steppers":"number-
|
|
24
|
+
var defaultColors = {"steppers":"number-input__steppers_o1dic","steppersFocused":"number-input__steppersFocused_o1dic","steppersDisabled":"number-input__steppersDisabled_o1dic"};
|
|
25
25
|
require('./default.css')
|
|
26
26
|
|
|
27
|
-
var styles = {"s":"number-
|
|
27
|
+
var styles = {"s":"number-input__s_witfz","m":"number-input__m_witfz"};
|
|
28
28
|
require('./index.css')
|
|
29
29
|
|
|
30
|
-
var invertedColors = {"steppers":"number-
|
|
30
|
+
var invertedColors = {"steppers":"number-input__steppers_yeu2e","steppersFocused":"number-input__steppersFocused_yeu2e","steppersDisabled":"number-input__steppersDisabled_yeu2e"};
|
|
31
31
|
require('./inverted.css')
|
|
32
32
|
|
|
33
33
|
var colorStyles = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1lyun */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-1500-inverted: #fff;
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .number-
|
|
19
|
+
} .number-input__steppers_o1dic {
|
|
20
20
|
background-color: var(--color-light-neutral-1500-inverted);
|
|
21
|
-
} .number-
|
|
22
|
-
.number-
|
|
21
|
+
} .number-input__steppersFocused_o1dic,
|
|
22
|
+
.number-input__steppersDisabled_o1dic {
|
|
23
23
|
background-color: var(--color-light-neutral-translucent-200);
|
|
24
24
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1m0j6 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
--gap-xs-neg: -8px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .number-
|
|
19
|
+
} .number-input__s_witfz {
|
|
20
20
|
margin-right: var(--gap-xs-neg);
|
|
21
|
-
} .number-
|
|
21
|
+
} .number-input__m_witfz {
|
|
22
22
|
margin-right: var(--gap-2xs-neg);
|
|
23
23
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1mg5a */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-1500: #0e0e0e;
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .number-
|
|
19
|
+
} .number-input__steppers_yeu2e {
|
|
20
20
|
background-color: var(--color-light-neutral-1500);
|
|
21
|
-
} .number-
|
|
22
|
-
.number-
|
|
21
|
+
} .number-input__steppersFocused_yeu2e,
|
|
22
|
+
.number-input__steppersDisabled_yeu2e {
|
|
23
23
|
background-color: var(--color-light-neutral-translucent-300-inverted);
|
|
24
24
|
}
|
|
@@ -14,13 +14,13 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
14
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
15
15
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
16
16
|
|
|
17
|
-
var defaultColors = {"separator":"number-
|
|
17
|
+
var defaultColors = {"separator":"number-input__separator_6fshv"};
|
|
18
18
|
require('./default.css')
|
|
19
19
|
|
|
20
|
-
var styles = {"component":"number-
|
|
20
|
+
var styles = {"component":"number-input__component_l0asm","separator":"number-input__separator_l0asm","button":"number-input__button_l0asm"};
|
|
21
21
|
require('./index.css')
|
|
22
22
|
|
|
23
|
-
var invertedColors = {"separator":"number-
|
|
23
|
+
var invertedColors = {"separator":"number-input__separator_9jw2q"};
|
|
24
24
|
require('./inverted.css')
|
|
25
25
|
|
|
26
26
|
var colorStyles = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1481l */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-300: rgba(15, 25, 55, 0.1); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .number-
|
|
18
|
+
} .number-input__separator_6fshv {
|
|
19
19
|
background-color: var(--color-light-neutral-translucent-300);
|
|
20
20
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: vno0s */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
} :root {
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
|
-
} .number-
|
|
17
|
+
} .number-input__component_l0asm {
|
|
18
18
|
display: flex;
|
|
19
19
|
flex-flow: row nowrap;
|
|
20
20
|
align-items: center;
|
|
21
21
|
border-radius: 5px;
|
|
22
22
|
transition: background-color 0.2s ease;
|
|
23
23
|
overflow: visible;
|
|
24
|
-
} .number-
|
|
24
|
+
} .number-input__separator_l0asm {
|
|
25
25
|
height: 18px;
|
|
26
26
|
width: 1px;
|
|
27
|
-
} .number-
|
|
27
|
+
} .number-input__button_l0asm {
|
|
28
28
|
width: 40px;
|
|
29
29
|
height: 40px;
|
|
30
30
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 18gft */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-300-inverted: rgba(222, 222, 238, 0.13); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .number-
|
|
18
|
+
} .number-input__separator_9jw2q {
|
|
19
19
|
background-color: var(--color-light-neutral-translucent-300-inverted);
|
|
20
20
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ChangeEvent, FC, Ref } from "react";
|
|
4
4
|
import { InputProps } from "@alfalab/core-components-input";
|
|
5
|
-
interface NumberInputProps extends Omit<InputProps, 'value' | 'onChange' | 'type' | 'defaultValue'> {
|
|
5
|
+
interface NumberInputProps extends Omit<InputProps, 'value' | 'onChange' | 'type' | 'defaultValue' | 'dataTestId'> {
|
|
6
6
|
/**
|
|
7
7
|
* Значение поля ввода
|
|
8
8
|
*/
|
|
@@ -50,6 +50,11 @@ interface NumberInputProps extends Omit<InputProps, 'value' | 'onChange' | 'type
|
|
|
50
50
|
onChange?: (e: ChangeEvent<HTMLInputElement> | null, payload: {
|
|
51
51
|
value: number | null;
|
|
52
52
|
}) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Идентификатор для систем автоматизированного тестирования.
|
|
55
|
+
* Для кнопки инкремента используется модификатор -increment-button, декремента -decrement-button
|
|
56
|
+
*/
|
|
57
|
+
dataTestId?: string;
|
|
53
58
|
}
|
|
54
59
|
declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
55
60
|
export { NumberInputProps, NumberInput };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ChangeEvent, FC, Ref } from "react";
|
|
4
4
|
import { InputProps } from "@alfalab/core-components-input";
|
|
5
|
-
interface NumberInputProps extends Omit<InputProps, 'value' | 'onChange' | 'type' | 'defaultValue'> {
|
|
5
|
+
interface NumberInputProps extends Omit<InputProps, 'value' | 'onChange' | 'type' | 'defaultValue' | 'dataTestId'> {
|
|
6
6
|
/**
|
|
7
7
|
* Значение поля ввода
|
|
8
8
|
*/
|
|
@@ -50,6 +50,11 @@ interface NumberInputProps extends Omit<InputProps, 'value' | 'onChange' | 'type
|
|
|
50
50
|
onChange?: (e: ChangeEvent<HTMLInputElement> | null, payload: {
|
|
51
51
|
value: number | null;
|
|
52
52
|
}) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Идентификатор для систем автоматизированного тестирования.
|
|
55
|
+
* Для кнопки инкремента используется модификатор -increment-button, декремента -decrement-button
|
|
56
|
+
*/
|
|
57
|
+
dataTestId?: string;
|
|
53
58
|
}
|
|
54
59
|
declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
55
60
|
export { NumberInputProps, NumberInput };
|
|
@@ -11,13 +11,13 @@ import '@alfalab/core-components-icon-button/esm';
|
|
|
11
11
|
import '@alfalab/icons-glyph/MinusMIcon';
|
|
12
12
|
import '@alfalab/icons-glyph/PlusMediumMIcon';
|
|
13
13
|
|
|
14
|
-
var defaultColors = {"steppers":"number-
|
|
14
|
+
var defaultColors = {"steppers":"number-input__steppers_o1dic","steppersFocused":"number-input__steppersFocused_o1dic","steppersDisabled":"number-input__steppersDisabled_o1dic"};
|
|
15
15
|
require('./default.css')
|
|
16
16
|
|
|
17
|
-
var styles = {"s":"number-
|
|
17
|
+
var styles = {"s":"number-input__s_witfz","m":"number-input__m_witfz"};
|
|
18
18
|
require('./index.css')
|
|
19
19
|
|
|
20
|
-
var invertedColors = {"steppers":"number-
|
|
20
|
+
var invertedColors = {"steppers":"number-input__steppers_yeu2e","steppersFocused":"number-input__steppersFocused_yeu2e","steppersDisabled":"number-input__steppersDisabled_yeu2e"};
|
|
21
21
|
require('./inverted.css')
|
|
22
22
|
|
|
23
23
|
var colorStyles = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1lyun */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-1500-inverted: #fff;
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .number-
|
|
19
|
+
} .number-input__steppers_o1dic {
|
|
20
20
|
background-color: var(--color-light-neutral-1500-inverted);
|
|
21
|
-
} .number-
|
|
22
|
-
.number-
|
|
21
|
+
} .number-input__steppersFocused_o1dic,
|
|
22
|
+
.number-input__steppersDisabled_o1dic {
|
|
23
23
|
background-color: var(--color-light-neutral-translucent-200);
|
|
24
24
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1m0j6 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
--gap-xs-neg: -8px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .number-
|
|
19
|
+
} .number-input__s_witfz {
|
|
20
20
|
margin-right: var(--gap-xs-neg);
|
|
21
|
-
} .number-
|
|
21
|
+
} .number-input__m_witfz {
|
|
22
22
|
margin-right: var(--gap-2xs-neg);
|
|
23
23
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1mg5a */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-1500: #0e0e0e;
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .number-
|
|
19
|
+
} .number-input__steppers_yeu2e {
|
|
20
20
|
background-color: var(--color-light-neutral-1500);
|
|
21
|
-
} .number-
|
|
22
|
-
.number-
|
|
21
|
+
} .number-input__steppersFocused_yeu2e,
|
|
22
|
+
.number-input__steppersDisabled_yeu2e {
|
|
23
23
|
background-color: var(--color-light-neutral-translucent-300-inverted);
|
|
24
24
|
}
|
|
@@ -5,13 +5,13 @@ import { getDataTestId } from '@alfalab/core-components-shared/esm';
|
|
|
5
5
|
import { MinusMIcon } from '@alfalab/icons-glyph/MinusMIcon';
|
|
6
6
|
import { PlusMediumMIcon } from '@alfalab/icons-glyph/PlusMediumMIcon';
|
|
7
7
|
|
|
8
|
-
var defaultColors = {"separator":"number-
|
|
8
|
+
var defaultColors = {"separator":"number-input__separator_6fshv"};
|
|
9
9
|
require('./default.css')
|
|
10
10
|
|
|
11
|
-
var styles = {"component":"number-
|
|
11
|
+
var styles = {"component":"number-input__component_l0asm","separator":"number-input__separator_l0asm","button":"number-input__button_l0asm"};
|
|
12
12
|
require('./index.css')
|
|
13
13
|
|
|
14
|
-
var invertedColors = {"separator":"number-
|
|
14
|
+
var invertedColors = {"separator":"number-input__separator_9jw2q"};
|
|
15
15
|
require('./inverted.css')
|
|
16
16
|
|
|
17
17
|
var colorStyles = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1481l */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-300: rgba(15, 25, 55, 0.1); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .number-
|
|
18
|
+
} .number-input__separator_6fshv {
|
|
19
19
|
background-color: var(--color-light-neutral-translucent-300);
|
|
20
20
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: vno0s */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
} :root {
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
|
-
} .number-
|
|
17
|
+
} .number-input__component_l0asm {
|
|
18
18
|
display: flex;
|
|
19
19
|
flex-flow: row nowrap;
|
|
20
20
|
align-items: center;
|
|
21
21
|
border-radius: 5px;
|
|
22
22
|
transition: background-color 0.2s ease;
|
|
23
23
|
overflow: visible;
|
|
24
|
-
} .number-
|
|
24
|
+
} .number-input__separator_l0asm {
|
|
25
25
|
height: 18px;
|
|
26
26
|
width: 1px;
|
|
27
|
-
} .number-
|
|
27
|
+
} .number-input__button_l0asm {
|
|
28
28
|
width: 40px;
|
|
29
29
|
height: 40px;
|
|
30
30
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 18gft */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-300-inverted: rgba(222, 222, 238, 0.13); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .number-
|
|
18
|
+
} .number-input__separator_9jw2q {
|
|
19
19
|
background-color: var(--color-light-neutral-translucent-300-inverted);
|
|
20
20
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ChangeEvent, FC, Ref } from "react";
|
|
4
4
|
import { InputProps } from "@alfalab/core-components-input";
|
|
5
|
-
interface NumberInputProps extends Omit<InputProps, 'value' | 'onChange' | 'type' | 'defaultValue'> {
|
|
5
|
+
interface NumberInputProps extends Omit<InputProps, 'value' | 'onChange' | 'type' | 'defaultValue' | 'dataTestId'> {
|
|
6
6
|
/**
|
|
7
7
|
* Значение поля ввода
|
|
8
8
|
*/
|
|
@@ -50,6 +50,11 @@ interface NumberInputProps extends Omit<InputProps, 'value' | 'onChange' | 'type
|
|
|
50
50
|
onChange?: (e: ChangeEvent<HTMLInputElement> | null, payload: {
|
|
51
51
|
value: number | null;
|
|
52
52
|
}) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Идентификатор для систем автоматизированного тестирования.
|
|
55
|
+
* Для кнопки инкремента используется модификатор -increment-button, декремента -decrement-button
|
|
56
|
+
*/
|
|
57
|
+
dataTestId?: string;
|
|
53
58
|
}
|
|
54
59
|
declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
55
60
|
export { NumberInputProps, NumberInput };
|
|
@@ -10,13 +10,13 @@ import '@alfalab/core-components-icon-button/modern';
|
|
|
10
10
|
import '@alfalab/icons-glyph/MinusMIcon';
|
|
11
11
|
import '@alfalab/icons-glyph/PlusMediumMIcon';
|
|
12
12
|
|
|
13
|
-
const defaultColors = {"steppers":"number-
|
|
13
|
+
const defaultColors = {"steppers":"number-input__steppers_o1dic","steppersFocused":"number-input__steppersFocused_o1dic","steppersDisabled":"number-input__steppersDisabled_o1dic"};
|
|
14
14
|
require('./default.css')
|
|
15
15
|
|
|
16
|
-
const styles = {"s":"number-
|
|
16
|
+
const styles = {"s":"number-input__s_witfz","m":"number-input__m_witfz"};
|
|
17
17
|
require('./index.css')
|
|
18
18
|
|
|
19
|
-
const invertedColors = {"steppers":"number-
|
|
19
|
+
const invertedColors = {"steppers":"number-input__steppers_yeu2e","steppersFocused":"number-input__steppersFocused_yeu2e","steppersDisabled":"number-input__steppersDisabled_yeu2e"};
|
|
20
20
|
require('./inverted.css')
|
|
21
21
|
|
|
22
22
|
const colorStyles = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1lyun */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-1500-inverted: #fff;
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .number-
|
|
19
|
+
} .number-input__steppers_o1dic {
|
|
20
20
|
background-color: var(--color-light-neutral-1500-inverted);
|
|
21
|
-
} .number-
|
|
22
|
-
.number-
|
|
21
|
+
} .number-input__steppersFocused_o1dic,
|
|
22
|
+
.number-input__steppersDisabled_o1dic {
|
|
23
23
|
background-color: var(--color-light-neutral-translucent-200);
|
|
24
24
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1m0j6 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
--gap-xs-neg: -8px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .number-
|
|
19
|
+
} .number-input__s_witfz {
|
|
20
20
|
margin-right: var(--gap-xs-neg);
|
|
21
|
-
} .number-
|
|
21
|
+
} .number-input__m_witfz {
|
|
22
22
|
margin-right: var(--gap-2xs-neg);
|
|
23
23
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1mg5a */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-1500: #0e0e0e;
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .number-
|
|
19
|
+
} .number-input__steppers_yeu2e {
|
|
20
20
|
background-color: var(--color-light-neutral-1500);
|
|
21
|
-
} .number-
|
|
22
|
-
.number-
|
|
21
|
+
} .number-input__steppersFocused_yeu2e,
|
|
22
|
+
.number-input__steppersDisabled_yeu2e {
|
|
23
23
|
background-color: var(--color-light-neutral-translucent-300-inverted);
|
|
24
24
|
}
|
|
@@ -5,13 +5,13 @@ import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
|
5
5
|
import { MinusMIcon } from '@alfalab/icons-glyph/MinusMIcon';
|
|
6
6
|
import { PlusMediumMIcon } from '@alfalab/icons-glyph/PlusMediumMIcon';
|
|
7
7
|
|
|
8
|
-
const defaultColors = {"separator":"number-
|
|
8
|
+
const defaultColors = {"separator":"number-input__separator_6fshv"};
|
|
9
9
|
require('./default.css')
|
|
10
10
|
|
|
11
|
-
const styles = {"component":"number-
|
|
11
|
+
const styles = {"component":"number-input__component_l0asm","separator":"number-input__separator_l0asm","button":"number-input__button_l0asm"};
|
|
12
12
|
require('./index.css')
|
|
13
13
|
|
|
14
|
-
const invertedColors = {"separator":"number-
|
|
14
|
+
const invertedColors = {"separator":"number-input__separator_9jw2q"};
|
|
15
15
|
require('./inverted.css')
|
|
16
16
|
|
|
17
17
|
const colorStyles = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1481l */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-300: rgba(15, 25, 55, 0.1); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .number-
|
|
18
|
+
} .number-input__separator_6fshv {
|
|
19
19
|
background-color: var(--color-light-neutral-translucent-300);
|
|
20
20
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: vno0s */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
} :root {
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
|
-
} .number-
|
|
17
|
+
} .number-input__component_l0asm {
|
|
18
18
|
display: flex;
|
|
19
19
|
flex-flow: row nowrap;
|
|
20
20
|
align-items: center;
|
|
21
21
|
border-radius: 5px;
|
|
22
22
|
transition: background-color 0.2s ease;
|
|
23
23
|
overflow: visible;
|
|
24
|
-
} .number-
|
|
24
|
+
} .number-input__separator_l0asm {
|
|
25
25
|
height: 18px;
|
|
26
26
|
width: 1px;
|
|
27
|
-
} .number-
|
|
27
|
+
} .number-input__button_l0asm {
|
|
28
28
|
width: 40px;
|
|
29
29
|
height: 40px;
|
|
30
30
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 18gft */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-300-inverted: rgba(222, 222, 238, 0.13); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .number-
|
|
18
|
+
} .number-input__separator_9jw2q {
|
|
19
19
|
background-color: var(--color-light-neutral-translucent-300-inverted);
|
|
20
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-number-input",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@alfalab/core-components-input": "^
|
|
17
|
+
"@alfalab/core-components-input": "^14.0.0",
|
|
18
18
|
"@alfalab/core-components-mq": "^4.2.0",
|
|
19
|
-
"@alfalab/core-components-icon-button": "^6.4.
|
|
19
|
+
"@alfalab/core-components-icon-button": "^6.4.3",
|
|
20
20
|
"@alfalab/core-components-shared": "^0.8.0",
|
|
21
21
|
"@alfalab/icons-glyph": "^2.108.0",
|
|
22
22
|
"@maskito/core": "^1.7.0",
|
|
@@ -37,7 +37,7 @@ const colorStyles = {
|
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
export interface NumberInputProps
|
|
40
|
-
extends Omit<InputProps, 'value' | 'onChange' | 'type' | 'defaultValue'> {
|
|
40
|
+
extends Omit<InputProps, 'value' | 'onChange' | 'type' | 'defaultValue' | 'dataTestId'> {
|
|
41
41
|
/**
|
|
42
42
|
* Значение поля ввода
|
|
43
43
|
*/
|
|
@@ -90,6 +90,12 @@ export interface NumberInputProps
|
|
|
90
90
|
* Обработчик события изменения значения
|
|
91
91
|
*/
|
|
92
92
|
onChange?: (e: ChangeEvent<HTMLInputElement> | null, payload: { value: number | null }) => void;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Идентификатор для систем автоматизированного тестирования.
|
|
96
|
+
* Для кнопки инкремента используется модификатор -increment-button, декремента -decrement-button
|
|
97
|
+
*/
|
|
98
|
+
dataTestId?: string;
|
|
93
99
|
}
|
|
94
100
|
|
|
95
101
|
export const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(
|