@alfalab/core-components-number-input 2.0.1 → 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.
Files changed (66) hide show
  1. package/components/number-input/Component.d.ts +6 -1
  2. package/components/number-input/Component.js +3 -3
  3. package/components/number-input/default.css +4 -4
  4. package/components/number-input/index.css +3 -3
  5. package/components/number-input/inverted.css +4 -4
  6. package/components/steppers/Component.js +3 -3
  7. package/components/steppers/default.css +2 -2
  8. package/components/steppers/index.css +4 -4
  9. package/components/steppers/inverted.css +2 -2
  10. package/cssm/components/number-input/Component.d.ts +6 -1
  11. package/{Component.desktop.d.ts → cssm/desktop/Component.desktop.d.ts} +1 -1
  12. package/cssm/{Component.desktop.js → desktop/Component.desktop.js} +9 -9
  13. package/cssm/desktop/index.d.ts +1 -1
  14. package/cssm/desktop/index.js +2 -2
  15. package/{esm → cssm/mobile}/Component.mobile.d.ts +1 -1
  16. package/cssm/{Component.mobile.js → mobile/Component.mobile.js} +9 -9
  17. package/cssm/mobile/index.d.ts +1 -1
  18. package/cssm/mobile/index.js +2 -2
  19. package/{cssm → desktop}/Component.desktop.d.ts +1 -1
  20. package/{Component.desktop.js → desktop/Component.desktop.js} +3 -3
  21. package/desktop/index.d.ts +1 -1
  22. package/desktop/index.js +2 -2
  23. package/esm/components/number-input/Component.d.ts +6 -1
  24. package/esm/components/number-input/Component.js +3 -3
  25. package/esm/components/number-input/default.css +4 -4
  26. package/esm/components/number-input/index.css +3 -3
  27. package/esm/components/number-input/inverted.css +4 -4
  28. package/esm/components/steppers/Component.js +3 -3
  29. package/esm/components/steppers/default.css +2 -2
  30. package/esm/components/steppers/index.css +4 -4
  31. package/esm/components/steppers/inverted.css +2 -2
  32. package/esm/{Component.desktop.d.ts → desktop/Component.desktop.d.ts} +1 -1
  33. package/esm/{Component.desktop.js → desktop/Component.desktop.js} +3 -3
  34. package/esm/desktop/index.d.ts +1 -1
  35. package/esm/desktop/index.js +1 -1
  36. package/{modern → esm/mobile}/Component.mobile.d.ts +1 -1
  37. package/esm/{Component.mobile.js → mobile/Component.mobile.js} +3 -3
  38. package/esm/mobile/index.d.ts +1 -1
  39. package/esm/mobile/index.js +1 -1
  40. package/{Component.mobile.d.ts → mobile/Component.mobile.d.ts} +1 -1
  41. package/{Component.mobile.js → mobile/Component.mobile.js} +3 -3
  42. package/mobile/index.d.ts +1 -1
  43. package/mobile/index.js +2 -2
  44. package/modern/components/number-input/Component.d.ts +6 -1
  45. package/modern/components/number-input/Component.js +3 -3
  46. package/modern/components/number-input/default.css +4 -4
  47. package/modern/components/number-input/index.css +3 -3
  48. package/modern/components/number-input/inverted.css +4 -4
  49. package/modern/components/steppers/Component.js +3 -3
  50. package/modern/components/steppers/default.css +2 -2
  51. package/modern/components/steppers/index.css +4 -4
  52. package/modern/components/steppers/inverted.css +2 -2
  53. package/modern/{Component.desktop.d.ts → desktop/Component.desktop.d.ts} +1 -1
  54. package/modern/{Component.desktop.js → desktop/Component.desktop.js} +3 -3
  55. package/modern/desktop/index.d.ts +1 -1
  56. package/modern/desktop/index.js +1 -1
  57. package/{cssm → modern/mobile}/Component.mobile.d.ts +1 -1
  58. package/modern/{Component.mobile.js → mobile/Component.mobile.js} +3 -3
  59. package/modern/mobile/index.d.ts +1 -1
  60. package/modern/mobile/index.js +1 -1
  61. package/package.json +3 -3
  62. package/src/components/number-input/Component.tsx +7 -1
  63. package/src/{Component.desktop.tsx → desktop/Component.desktop.tsx} +1 -1
  64. package/src/desktop/index.ts +1 -1
  65. package/src/{Component.mobile.tsx → mobile/Component.mobile.tsx} +1 -1
  66. package/src/mobile/index.ts +1 -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-input__steppers_vqdas","steppersFocused":"number-input__steppersFocused_vqdas","steppersDisabled":"number-input__steppersDisabled_vqdas"};
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-input__s_77v6k","m":"number-input__m_77v6k"};
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-input__steppers_163tu","steppersFocused":"number-input__steppersFocused_163tu","steppersDisabled":"number-input__steppersDisabled_163tu"};
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: o5lab */
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-input__steppers_vqdas {
19
+ } .number-input__steppers_o1dic {
20
20
  background-color: var(--color-light-neutral-1500-inverted);
21
- } .number-input__steppersFocused_vqdas,
22
- .number-input__steppersDisabled_vqdas {
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: bzled */
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-input__s_77v6k {
19
+ } .number-input__s_witfz {
20
20
  margin-right: var(--gap-xs-neg);
21
- } .number-input__m_77v6k {
21
+ } .number-input__m_witfz {
22
22
  margin-right: var(--gap-2xs-neg);
23
23
  }
@@ -1,4 +1,4 @@
1
- /* hash: omvxl */
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-input__steppers_163tu {
19
+ } .number-input__steppers_yeu2e {
20
20
  background-color: var(--color-light-neutral-1500);
21
- } .number-input__steppersFocused_163tu,
22
- .number-input__steppersDisabled_163tu {
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-input__separator_1xrwr"};
17
+ var defaultColors = {"separator":"number-input__separator_6fshv"};
18
18
  require('./default.css')
19
19
 
20
- var styles = {"component":"number-input__component_1ab92","separator":"number-input__separator_1ab92","button":"number-input__button_1ab92"};
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-input__separator_1uwaa"};
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: 306x5 */
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-input__separator_1xrwr {
18
+ } .number-input__separator_6fshv {
19
19
  background-color: var(--color-light-neutral-translucent-300);
20
20
  }
@@ -1,4 +1,4 @@
1
- /* hash: 6nhr0 */
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-input__component_1ab92 {
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-input__separator_1ab92 {
24
+ } .number-input__separator_l0asm {
25
25
  height: 18px;
26
26
  width: 1px;
27
- } .number-input__button_1ab92 {
27
+ } .number-input__button_l0asm {
28
28
  width: 40px;
29
29
  height: 40px;
30
30
  }
@@ -1,4 +1,4 @@
1
- /* hash: 78l4o */
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-input__separator_1uwaa {
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 };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { NumberInputProps } from "./components/number-input/index";
3
+ import { NumberInputProps } from "../components/number-input/index";
4
4
  type NumberInputDesktopProps = Omit<NumberInputProps, 'Input' | 'breakpoint' | 'view'>;
5
5
  declare const NumberInputDesktop: React.ForwardRefExoticComponent<NumberInputDesktopProps & React.RefAttributes<HTMLInputElement>>;
6
6
  export { NumberInputDesktopProps, NumberInputDesktop };
@@ -5,23 +5,23 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var tslib = require('tslib');
6
6
  var React = require('react');
7
7
  var desktop = require('@alfalab/core-components-input/cssm/desktop');
8
- var components_numberInput_Component = require('./components/number-input/Component.js');
8
+ var components_numberInput_Component = require('../components/number-input/Component.js');
9
9
  require('react-merge-refs');
10
10
  require('@maskito/core');
11
11
  require('@maskito/react');
12
12
  require('classnames');
13
13
  require('@alfalab/core-components-shared/cssm');
14
- require('./utils.js');
15
- require('./components/steppers/Component.js');
14
+ require('../utils.js');
15
+ require('../components/steppers/Component.js');
16
16
  require('@alfalab/core-components-icon-button/cssm');
17
17
  require('@alfalab/icons-glyph/MinusMIcon');
18
18
  require('@alfalab/icons-glyph/PlusMediumMIcon');
19
- require('./components/steppers/default.module.css');
20
- require('./components/steppers/index.module.css');
21
- require('./components/steppers/inverted.module.css');
22
- require('./components/number-input/default.module.css');
23
- require('./components/number-input/index.module.css');
24
- require('./components/number-input/inverted.module.css');
19
+ require('../components/steppers/default.module.css');
20
+ require('../components/steppers/index.module.css');
21
+ require('../components/steppers/inverted.module.css');
22
+ require('../components/number-input/default.module.css');
23
+ require('../components/number-input/index.module.css');
24
+ require('../components/number-input/inverted.module.css');
25
25
 
26
26
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
27
27
 
@@ -1,2 +1,2 @@
1
- export { NumberInputDesktop, NumberInputDesktopProps } from "../Component.desktop";
1
+ export { NumberInputDesktop, NumberInputDesktopProps } from "./Component.desktop";
2
2
  export {};
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Component_desktop = require('../Component.desktop.js');
5
+ var desktop_Component_desktop = require('./Component.desktop.js');
6
6
  require('tslib');
7
7
  require('react');
8
8
  require('@alfalab/core-components-input/cssm/desktop');
@@ -26,4 +26,4 @@ require('../components/number-input/inverted.module.css');
26
26
 
27
27
 
28
28
 
29
- exports.NumberInputDesktop = Component_desktop.NumberInputDesktop;
29
+ exports.NumberInputDesktop = desktop_Component_desktop.NumberInputDesktop;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { NumberInputProps } from "./components/number-input/index";
3
+ import { NumberInputProps } from "../components/number-input/index";
4
4
  type NumberInputMobileProps = Omit<NumberInputProps, 'Input' | 'breakpoint' | 'view'>;
5
5
  declare const NumberInputMobile: React.ForwardRefExoticComponent<NumberInputMobileProps & React.RefAttributes<HTMLInputElement>>;
6
6
  export { NumberInputMobileProps, NumberInputMobile };
@@ -5,23 +5,23 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var tslib = require('tslib');
6
6
  var React = require('react');
7
7
  var mobile = require('@alfalab/core-components-input/cssm/mobile');
8
- var components_numberInput_Component = require('./components/number-input/Component.js');
8
+ var components_numberInput_Component = require('../components/number-input/Component.js');
9
9
  require('react-merge-refs');
10
10
  require('@maskito/core');
11
11
  require('@maskito/react');
12
12
  require('classnames');
13
13
  require('@alfalab/core-components-shared/cssm');
14
- require('./utils.js');
15
- require('./components/steppers/Component.js');
14
+ require('../utils.js');
15
+ require('../components/steppers/Component.js');
16
16
  require('@alfalab/core-components-icon-button/cssm');
17
17
  require('@alfalab/icons-glyph/MinusMIcon');
18
18
  require('@alfalab/icons-glyph/PlusMediumMIcon');
19
- require('./components/steppers/default.module.css');
20
- require('./components/steppers/index.module.css');
21
- require('./components/steppers/inverted.module.css');
22
- require('./components/number-input/default.module.css');
23
- require('./components/number-input/index.module.css');
24
- require('./components/number-input/inverted.module.css');
19
+ require('../components/steppers/default.module.css');
20
+ require('../components/steppers/index.module.css');
21
+ require('../components/steppers/inverted.module.css');
22
+ require('../components/number-input/default.module.css');
23
+ require('../components/number-input/index.module.css');
24
+ require('../components/number-input/inverted.module.css');
25
25
 
26
26
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
27
27
 
@@ -1,2 +1,2 @@
1
- export { NumberInputMobile, NumberInputMobileProps } from "../Component.mobile";
1
+ export { NumberInputMobile, NumberInputMobileProps } from "./Component.mobile";
2
2
  export {};
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Component_mobile = require('../Component.mobile.js');
5
+ var mobile_Component_mobile = require('./Component.mobile.js');
6
6
  require('tslib');
7
7
  require('react');
8
8
  require('@alfalab/core-components-input/cssm/mobile');
@@ -26,4 +26,4 @@ require('../components/number-input/inverted.module.css');
26
26
 
27
27
 
28
28
 
29
- exports.NumberInputMobile = Component_mobile.NumberInputMobile;
29
+ exports.NumberInputMobile = mobile_Component_mobile.NumberInputMobile;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { NumberInputProps } from "./components/number-input/index";
3
+ import { NumberInputProps } from "../components/number-input/index";
4
4
  type NumberInputDesktopProps = Omit<NumberInputProps, 'Input' | 'breakpoint' | 'view'>;
5
5
  declare const NumberInputDesktop: React.ForwardRefExoticComponent<NumberInputDesktopProps & React.RefAttributes<HTMLInputElement>>;
6
6
  export { NumberInputDesktopProps, NumberInputDesktop };
@@ -5,14 +5,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var tslib = require('tslib');
6
6
  var React = require('react');
7
7
  var desktop = require('@alfalab/core-components-input/desktop');
8
- var components_numberInput_Component = require('./components/number-input/Component.js');
8
+ var components_numberInput_Component = require('../components/number-input/Component.js');
9
9
  require('react-merge-refs');
10
10
  require('@maskito/core');
11
11
  require('@maskito/react');
12
12
  require('classnames');
13
13
  require('@alfalab/core-components-shared');
14
- require('./utils.js');
15
- require('./components/steppers/Component.js');
14
+ require('../utils.js');
15
+ require('../components/steppers/Component.js');
16
16
  require('@alfalab/core-components-icon-button');
17
17
  require('@alfalab/icons-glyph/MinusMIcon');
18
18
  require('@alfalab/icons-glyph/PlusMediumMIcon');
@@ -1,2 +1,2 @@
1
- export { NumberInputDesktop, NumberInputDesktopProps } from "../Component.desktop";
1
+ export { NumberInputDesktop, NumberInputDesktopProps } from "./Component.desktop";
2
2
  export {};
package/desktop/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Component_desktop = require('../Component.desktop.js');
5
+ var desktop_Component_desktop = require('./Component.desktop.js');
6
6
  require('tslib');
7
7
  require('react');
8
8
  require('@alfalab/core-components-input/desktop');
@@ -20,4 +20,4 @@ require('@alfalab/icons-glyph/PlusMediumMIcon');
20
20
 
21
21
 
22
22
 
23
- exports.NumberInputDesktop = Component_desktop.NumberInputDesktop;
23
+ exports.NumberInputDesktop = desktop_Component_desktop.NumberInputDesktop;
@@ -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-input__steppers_vqdas","steppersFocused":"number-input__steppersFocused_vqdas","steppersDisabled":"number-input__steppersDisabled_vqdas"};
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-input__s_77v6k","m":"number-input__m_77v6k"};
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-input__steppers_163tu","steppersFocused":"number-input__steppersFocused_163tu","steppersDisabled":"number-input__steppersDisabled_163tu"};
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: o5lab */
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-input__steppers_vqdas {
19
+ } .number-input__steppers_o1dic {
20
20
  background-color: var(--color-light-neutral-1500-inverted);
21
- } .number-input__steppersFocused_vqdas,
22
- .number-input__steppersDisabled_vqdas {
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: bzled */
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-input__s_77v6k {
19
+ } .number-input__s_witfz {
20
20
  margin-right: var(--gap-xs-neg);
21
- } .number-input__m_77v6k {
21
+ } .number-input__m_witfz {
22
22
  margin-right: var(--gap-2xs-neg);
23
23
  }
@@ -1,4 +1,4 @@
1
- /* hash: omvxl */
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-input__steppers_163tu {
19
+ } .number-input__steppers_yeu2e {
20
20
  background-color: var(--color-light-neutral-1500);
21
- } .number-input__steppersFocused_163tu,
22
- .number-input__steppersDisabled_163tu {
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-input__separator_1xrwr"};
8
+ var defaultColors = {"separator":"number-input__separator_6fshv"};
9
9
  require('./default.css')
10
10
 
11
- var styles = {"component":"number-input__component_1ab92","separator":"number-input__separator_1ab92","button":"number-input__button_1ab92"};
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-input__separator_1uwaa"};
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: 306x5 */
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-input__separator_1xrwr {
18
+ } .number-input__separator_6fshv {
19
19
  background-color: var(--color-light-neutral-translucent-300);
20
20
  }
@@ -1,4 +1,4 @@
1
- /* hash: 6nhr0 */
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-input__component_1ab92 {
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-input__separator_1ab92 {
24
+ } .number-input__separator_l0asm {
25
25
  height: 18px;
26
26
  width: 1px;
27
- } .number-input__button_1ab92 {
27
+ } .number-input__button_l0asm {
28
28
  width: 40px;
29
29
  height: 40px;
30
30
  }
@@ -1,4 +1,4 @@
1
- /* hash: 78l4o */
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-input__separator_1uwaa {
18
+ } .number-input__separator_9jw2q {
19
19
  background-color: var(--color-light-neutral-translucent-300-inverted);
20
20
  }
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { NumberInputProps } from "./components/number-input/index";
3
+ import { NumberInputProps } from "../components/number-input/index";
4
4
  type NumberInputDesktopProps = Omit<NumberInputProps, 'Input' | 'breakpoint' | 'view'>;
5
5
  declare const NumberInputDesktop: React.ForwardRefExoticComponent<NumberInputDesktopProps & React.RefAttributes<HTMLInputElement>>;
6
6
  export { NumberInputDesktopProps, NumberInputDesktop };
@@ -1,14 +1,14 @@
1
1
  import { __assign } from 'tslib';
2
2
  import React, { forwardRef } from 'react';
3
3
  import { InputDesktop } from '@alfalab/core-components-input/esm/desktop';
4
- import { NumberInput } from './components/number-input/Component.js';
4
+ import { NumberInput } from '../components/number-input/Component.js';
5
5
  import 'react-merge-refs';
6
6
  import '@maskito/core';
7
7
  import '@maskito/react';
8
8
  import 'classnames';
9
9
  import '@alfalab/core-components-shared/esm';
10
- import './utils.js';
11
- import './components/steppers/Component.js';
10
+ import '../utils.js';
11
+ import '../components/steppers/Component.js';
12
12
  import '@alfalab/core-components-icon-button/esm';
13
13
  import '@alfalab/icons-glyph/MinusMIcon';
14
14
  import '@alfalab/icons-glyph/PlusMediumMIcon';
@@ -1,2 +1,2 @@
1
- export { NumberInputDesktop, NumberInputDesktopProps } from "../Component.desktop";
1
+ export { NumberInputDesktop, NumberInputDesktopProps } from "./Component.desktop";
2
2
  export {};
@@ -1,4 +1,4 @@
1
- export { NumberInputDesktop } from '../Component.desktop.js';
1
+ export { NumberInputDesktop } from './Component.desktop.js';
2
2
  import 'tslib';
3
3
  import 'react';
4
4
  import '@alfalab/core-components-input/esm/desktop';
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { NumberInputProps } from "./components/number-input/index";
3
+ import { NumberInputProps } from "../components/number-input/index";
4
4
  type NumberInputMobileProps = Omit<NumberInputProps, 'Input' | 'breakpoint' | 'view'>;
5
5
  declare const NumberInputMobile: React.ForwardRefExoticComponent<NumberInputMobileProps & React.RefAttributes<HTMLInputElement>>;
6
6
  export { NumberInputMobileProps, NumberInputMobile };
@@ -1,14 +1,14 @@
1
1
  import { __assign } from 'tslib';
2
2
  import React, { forwardRef } from 'react';
3
3
  import { InputMobile } from '@alfalab/core-components-input/esm/mobile';
4
- import { NumberInput } from './components/number-input/Component.js';
4
+ import { NumberInput } from '../components/number-input/Component.js';
5
5
  import 'react-merge-refs';
6
6
  import '@maskito/core';
7
7
  import '@maskito/react';
8
8
  import 'classnames';
9
9
  import '@alfalab/core-components-shared/esm';
10
- import './utils.js';
11
- import './components/steppers/Component.js';
10
+ import '../utils.js';
11
+ import '../components/steppers/Component.js';
12
12
  import '@alfalab/core-components-icon-button/esm';
13
13
  import '@alfalab/icons-glyph/MinusMIcon';
14
14
  import '@alfalab/icons-glyph/PlusMediumMIcon';
@@ -1,2 +1,2 @@
1
- export { NumberInputMobile, NumberInputMobileProps } from "../Component.mobile";
1
+ export { NumberInputMobile, NumberInputMobileProps } from "./Component.mobile";
2
2
  export {};
@@ -1,4 +1,4 @@
1
- export { NumberInputMobile } from '../Component.mobile.js';
1
+ export { NumberInputMobile } from './Component.mobile.js';
2
2
  import 'tslib';
3
3
  import 'react';
4
4
  import '@alfalab/core-components-input/esm/mobile';
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { NumberInputProps } from "./components/number-input/index";
3
+ import { NumberInputProps } from "../components/number-input/index";
4
4
  type NumberInputMobileProps = Omit<NumberInputProps, 'Input' | 'breakpoint' | 'view'>;
5
5
  declare const NumberInputMobile: React.ForwardRefExoticComponent<NumberInputMobileProps & React.RefAttributes<HTMLInputElement>>;
6
6
  export { NumberInputMobileProps, NumberInputMobile };
@@ -5,14 +5,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var tslib = require('tslib');
6
6
  var React = require('react');
7
7
  var mobile = require('@alfalab/core-components-input/mobile');
8
- var components_numberInput_Component = require('./components/number-input/Component.js');
8
+ var components_numberInput_Component = require('../components/number-input/Component.js');
9
9
  require('react-merge-refs');
10
10
  require('@maskito/core');
11
11
  require('@maskito/react');
12
12
  require('classnames');
13
13
  require('@alfalab/core-components-shared');
14
- require('./utils.js');
15
- require('./components/steppers/Component.js');
14
+ require('../utils.js');
15
+ require('../components/steppers/Component.js');
16
16
  require('@alfalab/core-components-icon-button');
17
17
  require('@alfalab/icons-glyph/MinusMIcon');
18
18
  require('@alfalab/icons-glyph/PlusMediumMIcon');
package/mobile/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { NumberInputMobile, NumberInputMobileProps } from "../Component.mobile";
1
+ export { NumberInputMobile, NumberInputMobileProps } from "./Component.mobile";
2
2
  export {};
package/mobile/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Component_mobile = require('../Component.mobile.js');
5
+ var mobile_Component_mobile = require('./Component.mobile.js');
6
6
  require('tslib');
7
7
  require('react');
8
8
  require('@alfalab/core-components-input/mobile');
@@ -20,4 +20,4 @@ require('@alfalab/icons-glyph/PlusMediumMIcon');
20
20
 
21
21
 
22
22
 
23
- exports.NumberInputMobile = Component_mobile.NumberInputMobile;
23
+ exports.NumberInputMobile = mobile_Component_mobile.NumberInputMobile;
@@ -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-input__steppers_vqdas","steppersFocused":"number-input__steppersFocused_vqdas","steppersDisabled":"number-input__steppersDisabled_vqdas"};
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-input__s_77v6k","m":"number-input__m_77v6k"};
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-input__steppers_163tu","steppersFocused":"number-input__steppersFocused_163tu","steppersDisabled":"number-input__steppersDisabled_163tu"};
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: o5lab */
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-input__steppers_vqdas {
19
+ } .number-input__steppers_o1dic {
20
20
  background-color: var(--color-light-neutral-1500-inverted);
21
- } .number-input__steppersFocused_vqdas,
22
- .number-input__steppersDisabled_vqdas {
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: bzled */
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-input__s_77v6k {
19
+ } .number-input__s_witfz {
20
20
  margin-right: var(--gap-xs-neg);
21
- } .number-input__m_77v6k {
21
+ } .number-input__m_witfz {
22
22
  margin-right: var(--gap-2xs-neg);
23
23
  }
@@ -1,4 +1,4 @@
1
- /* hash: omvxl */
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-input__steppers_163tu {
19
+ } .number-input__steppers_yeu2e {
20
20
  background-color: var(--color-light-neutral-1500);
21
- } .number-input__steppersFocused_163tu,
22
- .number-input__steppersDisabled_163tu {
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-input__separator_1xrwr"};
8
+ const defaultColors = {"separator":"number-input__separator_6fshv"};
9
9
  require('./default.css')
10
10
 
11
- const styles = {"component":"number-input__component_1ab92","separator":"number-input__separator_1ab92","button":"number-input__button_1ab92"};
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-input__separator_1uwaa"};
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: 306x5 */
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-input__separator_1xrwr {
18
+ } .number-input__separator_6fshv {
19
19
  background-color: var(--color-light-neutral-translucent-300);
20
20
  }
@@ -1,4 +1,4 @@
1
- /* hash: 6nhr0 */
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-input__component_1ab92 {
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-input__separator_1ab92 {
24
+ } .number-input__separator_l0asm {
25
25
  height: 18px;
26
26
  width: 1px;
27
- } .number-input__button_1ab92 {
27
+ } .number-input__button_l0asm {
28
28
  width: 40px;
29
29
  height: 40px;
30
30
  }
@@ -1,4 +1,4 @@
1
- /* hash: 78l4o */
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-input__separator_1uwaa {
18
+ } .number-input__separator_9jw2q {
19
19
  background-color: var(--color-light-neutral-translucent-300-inverted);
20
20
  }
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { NumberInputProps } from "./components/number-input/index";
3
+ import { NumberInputProps } from "../components/number-input/index";
4
4
  type NumberInputDesktopProps = Omit<NumberInputProps, 'Input' | 'breakpoint' | 'view'>;
5
5
  declare const NumberInputDesktop: React.ForwardRefExoticComponent<NumberInputDesktopProps & React.RefAttributes<HTMLInputElement>>;
6
6
  export { NumberInputDesktopProps, NumberInputDesktop };
@@ -1,13 +1,13 @@
1
1
  import React, { forwardRef } from 'react';
2
2
  import { InputDesktop } from '@alfalab/core-components-input/modern/desktop';
3
- import { NumberInput } from './components/number-input/Component.js';
3
+ import { NumberInput } from '../components/number-input/Component.js';
4
4
  import 'react-merge-refs';
5
5
  import '@maskito/core';
6
6
  import '@maskito/react';
7
7
  import 'classnames';
8
8
  import '@alfalab/core-components-shared/modern';
9
- import './utils.js';
10
- import './components/steppers/Component.js';
9
+ import '../utils.js';
10
+ import '../components/steppers/Component.js';
11
11
  import '@alfalab/core-components-icon-button/modern';
12
12
  import '@alfalab/icons-glyph/MinusMIcon';
13
13
  import '@alfalab/icons-glyph/PlusMediumMIcon';
@@ -1,2 +1,2 @@
1
- export { NumberInputDesktop, NumberInputDesktopProps } from "../Component.desktop";
1
+ export { NumberInputDesktop, NumberInputDesktopProps } from "./Component.desktop";
2
2
  export {};
@@ -1,4 +1,4 @@
1
- export { NumberInputDesktop } from '../Component.desktop.js';
1
+ export { NumberInputDesktop } from './Component.desktop.js';
2
2
  import 'react';
3
3
  import '@alfalab/core-components-input/modern/desktop';
4
4
  import '../components/number-input/Component.js';
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { NumberInputProps } from "./components/number-input/index";
3
+ import { NumberInputProps } from "../components/number-input/index";
4
4
  type NumberInputMobileProps = Omit<NumberInputProps, 'Input' | 'breakpoint' | 'view'>;
5
5
  declare const NumberInputMobile: React.ForwardRefExoticComponent<NumberInputMobileProps & React.RefAttributes<HTMLInputElement>>;
6
6
  export { NumberInputMobileProps, NumberInputMobile };
@@ -1,13 +1,13 @@
1
1
  import React, { forwardRef } from 'react';
2
2
  import { InputMobile } from '@alfalab/core-components-input/modern/mobile';
3
- import { NumberInput } from './components/number-input/Component.js';
3
+ import { NumberInput } from '../components/number-input/Component.js';
4
4
  import 'react-merge-refs';
5
5
  import '@maskito/core';
6
6
  import '@maskito/react';
7
7
  import 'classnames';
8
8
  import '@alfalab/core-components-shared/modern';
9
- import './utils.js';
10
- import './components/steppers/Component.js';
9
+ import '../utils.js';
10
+ import '../components/steppers/Component.js';
11
11
  import '@alfalab/core-components-icon-button/modern';
12
12
  import '@alfalab/icons-glyph/MinusMIcon';
13
13
  import '@alfalab/icons-glyph/PlusMediumMIcon';
@@ -1,2 +1,2 @@
1
- export { NumberInputMobile, NumberInputMobileProps } from "../Component.mobile";
1
+ export { NumberInputMobile, NumberInputMobileProps } from "./Component.mobile";
2
2
  export {};
@@ -1,4 +1,4 @@
1
- export { NumberInputMobile } from '../Component.mobile.js';
1
+ export { NumberInputMobile } from './Component.mobile.js';
2
2
  import 'react';
3
3
  import '@alfalab/core-components-input/modern/mobile';
4
4
  import '../components/number-input/Component.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-number-input",
3
- "version": "2.0.1",
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": "^13.0.1",
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.1",
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>(
@@ -2,7 +2,7 @@ import React, { forwardRef } from 'react';
2
2
 
3
3
  import { InputDesktop } from '@alfalab/core-components-input/desktop';
4
4
 
5
- import { NumberInput, NumberInputProps } from './components/number-input';
5
+ import { NumberInput, NumberInputProps } from '../components/number-input';
6
6
 
7
7
  export type NumberInputDesktopProps = Omit<NumberInputProps, 'Input' | 'breakpoint' | 'view'>;
8
8
 
@@ -1 +1 @@
1
- export { NumberInputDesktop, NumberInputDesktopProps } from '../Component.desktop';
1
+ export { NumberInputDesktop, NumberInputDesktopProps } from './Component.desktop';
@@ -2,7 +2,7 @@ import React, { forwardRef } from 'react';
2
2
 
3
3
  import { InputMobile } from '@alfalab/core-components-input/mobile';
4
4
 
5
- import { NumberInput, NumberInputProps } from './components/number-input';
5
+ import { NumberInput, NumberInputProps } from '../components/number-input';
6
6
 
7
7
  export type NumberInputMobileProps = Omit<NumberInputProps, 'Input' | 'breakpoint' | 'view'>;
8
8
 
@@ -1 +1 @@
1
- export { NumberInputMobile, NumberInputMobileProps } from '../Component.mobile';
1
+ export { NumberInputMobile, NumberInputMobileProps } from './Component.mobile';