@alfalab/core-components-number-input 2.0.0 → 2.0.2

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 (85) hide show
  1. package/components/number-input/Component.js +19 -9
  2. package/components/number-input/default.css +24 -0
  3. package/components/number-input/index.css +4 -11
  4. package/components/number-input/inverted.css +24 -0
  5. package/components/steppers/Component.d.ts +1 -0
  6. package/components/steppers/Component.js +15 -5
  7. package/components/steppers/default.css +20 -0
  8. package/components/steppers/index.css +5 -7
  9. package/components/steppers/inverted.css +20 -0
  10. package/cssm/Component.responsive.js +4 -0
  11. package/cssm/components/number-input/Component.js +18 -8
  12. package/cssm/components/number-input/default.module.css +23 -0
  13. package/cssm/components/number-input/index.js +4 -0
  14. package/cssm/components/number-input/index.module.css +1 -8
  15. package/cssm/components/number-input/inverted.module.css +23 -0
  16. package/cssm/components/steppers/Component.d.ts +1 -0
  17. package/cssm/components/steppers/Component.js +12 -4
  18. package/cssm/components/steppers/default.module.css +19 -0
  19. package/cssm/components/steppers/index.js +2 -0
  20. package/cssm/components/steppers/index.module.css +1 -3
  21. package/cssm/components/steppers/inverted.module.css +19 -0
  22. package/{Component.desktop.d.ts → cssm/desktop/Component.desktop.d.ts} +1 -1
  23. package/cssm/{Component.desktop.js → desktop/Component.desktop.js} +9 -5
  24. package/cssm/desktop/index.d.ts +1 -1
  25. package/cssm/desktop/index.js +6 -2
  26. package/cssm/index.js +4 -0
  27. package/{esm → cssm/mobile}/Component.mobile.d.ts +1 -1
  28. package/cssm/{Component.mobile.js → mobile/Component.mobile.js} +9 -5
  29. package/cssm/mobile/index.d.ts +1 -1
  30. package/cssm/mobile/index.js +6 -2
  31. package/{cssm → desktop}/Component.desktop.d.ts +1 -1
  32. package/{Component.desktop.js → desktop/Component.desktop.js} +3 -3
  33. package/desktop/index.d.ts +1 -1
  34. package/desktop/index.js +2 -2
  35. package/esm/components/number-input/Component.js +19 -9
  36. package/esm/components/number-input/default.css +24 -0
  37. package/esm/components/number-input/index.css +4 -11
  38. package/esm/components/number-input/inverted.css +24 -0
  39. package/esm/components/steppers/Component.d.ts +1 -0
  40. package/esm/components/steppers/Component.js +15 -5
  41. package/esm/components/steppers/default.css +20 -0
  42. package/esm/components/steppers/index.css +5 -7
  43. package/esm/components/steppers/inverted.css +20 -0
  44. package/esm/{Component.desktop.d.ts → desktop/Component.desktop.d.ts} +1 -1
  45. package/esm/{Component.desktop.js → desktop/Component.desktop.js} +3 -3
  46. package/esm/desktop/index.d.ts +1 -1
  47. package/esm/desktop/index.js +1 -1
  48. package/{modern → esm/mobile}/Component.mobile.d.ts +1 -1
  49. package/esm/{Component.mobile.js → mobile/Component.mobile.js} +3 -3
  50. package/esm/mobile/index.d.ts +1 -1
  51. package/esm/mobile/index.js +1 -1
  52. package/{Component.mobile.d.ts → mobile/Component.mobile.d.ts} +1 -1
  53. package/{Component.mobile.js → mobile/Component.mobile.js} +3 -3
  54. package/mobile/index.d.ts +1 -1
  55. package/mobile/index.js +2 -2
  56. package/modern/components/number-input/Component.js +16 -6
  57. package/modern/components/number-input/default.css +24 -0
  58. package/modern/components/number-input/index.css +4 -11
  59. package/modern/components/number-input/inverted.css +24 -0
  60. package/modern/components/steppers/Component.d.ts +1 -0
  61. package/modern/components/steppers/Component.js +15 -5
  62. package/modern/components/steppers/default.css +20 -0
  63. package/modern/components/steppers/index.css +5 -7
  64. package/modern/components/steppers/inverted.css +20 -0
  65. package/modern/{Component.desktop.d.ts → desktop/Component.desktop.d.ts} +1 -1
  66. package/modern/{Component.desktop.js → desktop/Component.desktop.js} +3 -3
  67. package/modern/desktop/index.d.ts +1 -1
  68. package/modern/desktop/index.js +1 -1
  69. package/{cssm → modern/mobile}/Component.mobile.d.ts +1 -1
  70. package/modern/{Component.mobile.js → mobile/Component.mobile.js} +3 -3
  71. package/modern/mobile/index.d.ts +1 -1
  72. package/modern/mobile/index.js +1 -1
  73. package/package.json +3 -3
  74. package/src/components/number-input/Component.tsx +13 -3
  75. package/src/components/number-input/default.module.css +10 -0
  76. package/src/components/number-input/index.module.css +0 -9
  77. package/src/components/number-input/inverted.module.css +10 -0
  78. package/src/components/steppers/Component.tsx +12 -1
  79. package/src/components/steppers/default.module.css +5 -0
  80. package/src/components/steppers/index.module.css +0 -1
  81. package/src/components/steppers/inverted.module.css +5 -0
  82. package/src/{Component.desktop.tsx → desktop/Component.desktop.tsx} +1 -1
  83. package/src/desktop/index.ts +1 -1
  84. package/src/{Component.mobile.tsx → mobile/Component.mobile.tsx} +1 -1
  85. package/src/mobile/index.ts +1 -1
@@ -5,19 +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/index.module.css');
20
- require('./components/number-input/index.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');
21
25
 
22
26
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
23
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');
@@ -17,9 +17,13 @@ require('../components/steppers/Component.js');
17
17
  require('@alfalab/core-components-icon-button/cssm');
18
18
  require('@alfalab/icons-glyph/MinusMIcon');
19
19
  require('@alfalab/icons-glyph/PlusMediumMIcon');
20
+ require('../components/steppers/default.module.css');
20
21
  require('../components/steppers/index.module.css');
22
+ require('../components/steppers/inverted.module.css');
23
+ require('../components/number-input/default.module.css');
21
24
  require('../components/number-input/index.module.css');
25
+ require('../components/number-input/inverted.module.css');
22
26
 
23
27
 
24
28
 
25
- exports.NumberInputDesktop = Component_desktop.NumberInputDesktop;
29
+ exports.NumberInputDesktop = desktop_Component_desktop.NumberInputDesktop;
package/cssm/index.js CHANGED
@@ -18,8 +18,12 @@ require('./components/steppers/Component.js');
18
18
  require('@alfalab/core-components-icon-button/cssm');
19
19
  require('@alfalab/icons-glyph/MinusMIcon');
20
20
  require('@alfalab/icons-glyph/PlusMediumMIcon');
21
+ require('./components/steppers/default.module.css');
21
22
  require('./components/steppers/index.module.css');
23
+ require('./components/steppers/inverted.module.css');
24
+ require('./components/number-input/default.module.css');
22
25
  require('./components/number-input/index.module.css');
26
+ require('./components/number-input/inverted.module.css');
23
27
 
24
28
 
25
29
 
@@ -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,19 +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/index.module.css');
20
- require('./components/number-input/index.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');
21
25
 
22
26
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
23
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');
@@ -17,9 +17,13 @@ require('../components/steppers/Component.js');
17
17
  require('@alfalab/core-components-icon-button/cssm');
18
18
  require('@alfalab/icons-glyph/MinusMIcon');
19
19
  require('@alfalab/icons-glyph/PlusMediumMIcon');
20
+ require('../components/steppers/default.module.css');
20
21
  require('../components/steppers/index.module.css');
22
+ require('../components/steppers/inverted.module.css');
23
+ require('../components/number-input/default.module.css');
21
24
  require('../components/number-input/index.module.css');
25
+ require('../components/number-input/inverted.module.css');
22
26
 
23
27
 
24
28
 
25
- 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;
@@ -11,12 +11,22 @@ 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 styles = {"steppers":"number-input__steppers_1g1qu","steppersFocused":"number-input__steppersFocused_1g1qu","steppersDisable":"number-input__steppersDisable_1g1qu","s":"number-input__s_1g1qu","m":"number-input__m_1g1qu"};
14
+ var defaultColors = {"steppers":"number-input__steppers_rxb9r","steppersFocused":"number-input__steppersFocused_rxb9r","steppersDisabled":"number-input__steppersDisabled_rxb9r"};
15
+ require('./default.css')
16
+
17
+ var styles = {"s":"number-input__s_ua8m2","m":"number-input__m_ua8m2"};
15
18
  require('./index.css')
16
19
 
20
+ var invertedColors = {"steppers":"number-input__steppers_12art","steppersFocused":"number-input__steppersFocused_12art","steppersDisabled":"number-input__steppersDisabled_12art"};
21
+ require('./inverted.css')
22
+
23
+ var colorStyles = {
24
+ default: defaultColors,
25
+ inverted: invertedColors,
26
+ };
17
27
  var NumberInput = forwardRef(function (_a, ref) {
18
28
  var _b;
19
- var propValue = _a.value, onChange = _a.onChange, _c = _a.separator, separator = _c === void 0 ? ',' : _c, _d = _a.fractionLength, fractionLength = _d === void 0 ? MAX_DIGITS : _d, defaultValue = _a.defaultValue, Input = _a.Input, minProp = _a.min, maxProp = _a.max, rightAddons = _a.rightAddons, dataTestId = _a.dataTestId, disabled = _a.disabled, onBlur = _a.onBlur, onFocus = _a.onFocus; _a.view; var stepProp = _a.step, _e = _a.size, size = _e === void 0 ? 's' : _e, disableUserInput = _a.disableUserInput, clearProp = _a.clear, restProps = __rest(_a, ["value", "onChange", "separator", "fractionLength", "defaultValue", "Input", "min", "max", "rightAddons", "dataTestId", "disabled", "onBlur", "onFocus", "view", "step", "size", "disableUserInput", "clear"]);
29
+ var propValue = _a.value, onChange = _a.onChange, _c = _a.separator, separator = _c === void 0 ? ',' : _c, _d = _a.fractionLength, fractionLength = _d === void 0 ? MAX_DIGITS : _d, defaultValue = _a.defaultValue, Input = _a.Input, minProp = _a.min, maxProp = _a.max, rightAddons = _a.rightAddons, dataTestId = _a.dataTestId, disabled = _a.disabled, onBlur = _a.onBlur, onFocus = _a.onFocus; _a.view; var stepProp = _a.step, _e = _a.size, size = _e === void 0 ? 's' : _e, disableUserInput = _a.disableUserInput, clearProp = _a.clear, _f = _a.colors, colors = _f === void 0 ? 'default' : _f, restProps = __rest(_a, ["value", "onChange", "separator", "fractionLength", "defaultValue", "Input", "min", "max", "rightAddons", "dataTestId", "disabled", "onBlur", "onFocus", "view", "step", "size", "disableUserInput", "clear", "colors"]);
20
30
  var min = Math.max(MIN_SAFE_INTEGER, minProp !== null && minProp !== void 0 ? minProp : MIN_SAFE_INTEGER);
21
31
  var max = Math.min(MAX_SAFE_INTEGER, maxProp !== null && maxProp !== void 0 ? maxProp : MAX_SAFE_INTEGER);
22
32
  var withStepper = stepProp !== undefined;
@@ -28,15 +38,15 @@ var NumberInput = forwardRef(function (_a, ref) {
28
38
  max: max,
29
39
  });
30
40
  }, [separator, fractionLength, min, max, withStepper]);
31
- var _f = useState(false), focused = _f[0], setFocused = _f[1];
32
- var _g = useState(function () {
41
+ var _g = useState(false), focused = _g[0], setFocused = _g[1];
42
+ var _h = useState(function () {
33
43
  if (defaultValue == null) {
34
44
  return withStepper ? fnUtils.clamp(0, min, max).toString() : '';
35
45
  }
36
46
  return fnUtils
37
47
  .clamp(parseNumber(maskitoTransform(defaultValue.toString(), maskOptions)), min, max)
38
48
  .toString();
39
- }), value = _g[0], setValue = _g[1];
49
+ }), value = _h[0], setValue = _h[1];
40
50
  var maskRef = useMaskito({ options: maskOptions });
41
51
  useEffect(function () {
42
52
  if (propValue !== undefined) {
@@ -92,11 +102,11 @@ var NumberInput = forwardRef(function (_a, ref) {
92
102
  };
93
103
  return (React.createElement(Input, __assign({ maxLength: getMaxLength(value) }, restProps, {
94
104
  // В iOS в цифровой клавиатуре невозможно ввести минус.
95
- inputMode: min < 0 && os.isIOS() ? 'text' : 'decimal', ref: mergeRefs([ref, maskRef]), value: value, onInput: handleChange, dataTestId: dataTestId, disabled: disabled, onFocus: handleFocus, onBlur: handleBlur, size: size, disableUserInput: disableUserInput, clear: clearProp && /\d/.test(value), rightAddons: withStepper ? (React.createElement(React.Fragment, null,
105
+ inputMode: min < 0 && os.isIOS() ? 'text' : 'decimal', ref: mergeRefs([ref, maskRef]), value: value, onInput: handleChange, dataTestId: dataTestId, colors: colors, disabled: disabled, onFocus: handleFocus, onBlur: handleBlur, size: size, disableUserInput: disableUserInput, clear: clearProp && /\d/.test(value), rightAddons: withStepper ? (React.createElement(React.Fragment, null,
96
106
  rightAddons,
97
- React.createElement(Steppers, { dataTestId: dataTestId, disabled: disabled, value: parseNumber(value), min: min, max: max, className: cn(styles.steppers, styles[size], (_b = {},
98
- _b[styles.steppersFocused] = focused,
99
- _b[styles.steppersDisable] = disabled,
107
+ React.createElement(Steppers, { colors: colors, dataTestId: dataTestId, disabled: disabled, value: parseNumber(value), min: min, max: max, className: cn(colorStyles[colors].steppers, styles[size], (_b = {},
108
+ _b[colorStyles[colors].steppersFocused] = focused,
109
+ _b[colorStyles[colors].steppersDisabled] = disabled,
100
110
  _b)), onIncrement: handleIncrement, onDecrement: handleDecrement }))) : (rightAddons) })));
101
111
  });
102
112
 
@@ -0,0 +1,24 @@
1
+ /* hash: 1v873 */
2
+ :root {
3
+ } /* deprecated */ :root {
4
+ --color-light-neutral-1500-inverted: #fff;
5
+ --color-light-neutral-translucent-200: rgba(30, 43, 68, 0.08); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
6
+ } :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 */
7
+ } :root {
8
+ } :root {
9
+
10
+ /* Hard */
11
+
12
+ /* Up */
13
+
14
+ /* Hard up */
15
+ } :root {
16
+ } :root {
17
+ } :root {
18
+ } :root {
19
+ } .number-input__steppers_rxb9r {
20
+ background-color: var(--color-light-neutral-1500-inverted);
21
+ } .number-input__steppersFocused_rxb9r,
22
+ .number-input__steppersDisabled_rxb9r {
23
+ background-color: var(--color-light-neutral-translucent-200);
24
+ }
@@ -1,8 +1,6 @@
1
- /* hash: ppwj9 */
1
+ /* hash: wriah */
2
2
  :root {
3
- } /* deprecated */ :root {
4
- --color-light-neutral-0: #fff;
5
- --color-light-neutral-translucent-200: rgba(30, 43, 68, 0.08); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
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 */
6
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 */
7
5
  } :root {
8
6
  } :root {
@@ -18,13 +16,8 @@
18
16
  --gap-xs-neg: -8px;
19
17
  } :root {
20
18
  } :root {
21
- } .number-input__steppers_1g1qu {
22
- background-color: var(--color-light-neutral-0);
23
- } .number-input__steppersFocused_1g1qu,
24
- .number-input__steppersDisable_1g1qu {
25
- background-color: var(--color-light-neutral-translucent-200);
26
- } .number-input__s_1g1qu {
19
+ } .number-input__s_ua8m2 {
27
20
  margin-right: var(--gap-xs-neg);
28
- } .number-input__m_1g1qu {
21
+ } .number-input__m_ua8m2 {
29
22
  margin-right: var(--gap-2xs-neg);
30
23
  }
@@ -0,0 +1,24 @@
1
+ /* hash: 1vphq */
2
+ :root {
3
+ } /* deprecated */ :root {
4
+ --color-light-neutral-1500: #0e0e0e;
5
+ --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 */
6
+ } :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 */
7
+ } :root {
8
+ } :root {
9
+
10
+ /* Hard */
11
+
12
+ /* Up */
13
+
14
+ /* Hard up */
15
+ } :root {
16
+ } :root {
17
+ } :root {
18
+ } :root {
19
+ } .number-input__steppers_12art {
20
+ background-color: var(--color-light-neutral-1500);
21
+ } .number-input__steppersFocused_12art,
22
+ .number-input__steppersDisabled_12art {
23
+ background-color: var(--color-light-neutral-translucent-300-inverted);
24
+ }
@@ -9,6 +9,7 @@ type SteppersProps = {
9
9
  onIncrement: () => void;
10
10
  onDecrement: () => void;
11
11
  dataTestId?: string;
12
+ colors: 'default' | 'inverted';
12
13
  };
13
14
  declare const Steppers: React.FC<SteppersProps>;
14
15
  export { SteppersProps, Steppers };
@@ -5,20 +5,30 @@ 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 styles = {"component":"number-input__component_1k8eq","separator":"number-input__separator_1k8eq","button":"number-input__button_1k8eq"};
8
+ var defaultColors = {"separator":"number-input__separator_5558q"};
9
+ require('./default.css')
10
+
11
+ var styles = {"component":"number-input__component_dl4y5","separator":"number-input__separator_dl4y5","button":"number-input__button_dl4y5"};
9
12
  require('./index.css')
10
13
 
14
+ var invertedColors = {"separator":"number-input__separator_898tm"};
15
+ require('./inverted.css')
16
+
17
+ var colorStyles = {
18
+ default: defaultColors,
19
+ inverted: invertedColors,
20
+ };
11
21
  function preventDefault(e) {
12
22
  e.preventDefault();
13
23
  }
14
24
  var Steppers = function (_a) {
15
- var className = _a.className, onIncrement = _a.onIncrement, onDecrement = _a.onDecrement, value = _a.value, min = _a.min, max = _a.max, disabled = _a.disabled, dataTestId = _a.dataTestId;
25
+ var className = _a.className, onIncrement = _a.onIncrement, onDecrement = _a.onDecrement, value = _a.value, min = _a.min, max = _a.max, disabled = _a.disabled, dataTestId = _a.dataTestId, colors = _a.colors;
16
26
  var decButtonDisabled = disabled || value <= min;
17
27
  var incButtonDisabled = disabled || value >= max;
18
28
  return (React.createElement("div", { className: cn(styles.component, className) },
19
- React.createElement(IconButton, { disabled: decButtonDisabled, className: styles.button, icon: React.createElement(MinusMIcon, null), "aria-label": '\u0443\u043C\u0435\u043D\u044C\u0448\u0438\u0442\u044C', onMouseDown: preventDefault, onClick: onDecrement, dataTestId: getDataTestId(dataTestId, 'decrement-button'), view: 'secondary' }),
20
- React.createElement("div", { className: styles.separator }),
21
- React.createElement(IconButton, { disabled: incButtonDisabled, className: styles.button, icon: React.createElement(PlusMediumMIcon, null), "aria-label": '\u0443\u0432\u0435\u043B\u0438\u0447\u0438\u0442\u044C', onMouseDown: preventDefault, onClick: onIncrement, dataTestId: getDataTestId(dataTestId, 'increment-button'), view: 'secondary' })));
29
+ React.createElement(IconButton, { colors: colors, disabled: decButtonDisabled, className: styles.button, icon: React.createElement(MinusMIcon, null), "aria-label": '\u0443\u043C\u0435\u043D\u044C\u0448\u0438\u0442\u044C', onMouseDown: preventDefault, onClick: onDecrement, dataTestId: getDataTestId(dataTestId, 'decrement-button'), view: 'secondary' }),
30
+ React.createElement("div", { className: cn(styles.separator, colorStyles[colors].separator) }),
31
+ React.createElement(IconButton, { colors: colors, disabled: incButtonDisabled, className: styles.button, icon: React.createElement(PlusMediumMIcon, null), "aria-label": '\u0443\u0432\u0435\u043B\u0438\u0447\u0438\u0442\u044C', onMouseDown: preventDefault, onClick: onIncrement, dataTestId: getDataTestId(dataTestId, 'increment-button'), view: 'secondary' })));
22
32
  };
23
33
 
24
34
  export { Steppers };
@@ -0,0 +1,20 @@
1
+ /* hash: 1a2sq */
2
+ :root {
3
+ } /* deprecated */ :root {
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 */
5
+ } :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 */
6
+ } :root {
7
+ } :root {
8
+
9
+ /* Hard */
10
+
11
+ /* Up */
12
+
13
+ /* Hard up */
14
+ } :root {
15
+ } :root {
16
+ } :root {
17
+ } :root {
18
+ } .number-input__separator_5558q {
19
+ background-color: var(--color-light-neutral-translucent-300);
20
+ }
@@ -1,7 +1,6 @@
1
- /* hash: 1x7ch */
1
+ /* hash: 73hh8 */
2
2
  :root {
3
- } /* deprecated */ :root {
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 */
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 */
5
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 */
6
5
  } :root {
7
6
  } :root {
@@ -15,18 +14,17 @@
15
14
  } :root {
16
15
  } :root {
17
16
  } :root {
18
- } .number-input__component_1k8eq {
17
+ } .number-input__component_dl4y5 {
19
18
  display: flex;
20
19
  flex-flow: row nowrap;
21
20
  align-items: center;
22
21
  border-radius: 5px;
23
22
  transition: background-color 0.2s ease;
24
23
  overflow: visible;
25
- } .number-input__separator_1k8eq {
24
+ } .number-input__separator_dl4y5 {
26
25
  height: 18px;
27
26
  width: 1px;
28
- background-color: var(--color-light-neutral-translucent-300);
29
- } .number-input__button_1k8eq {
27
+ } .number-input__button_dl4y5 {
30
28
  width: 40px;
31
29
  height: 40px;
32
30
  }
@@ -0,0 +1,20 @@
1
+ /* hash: 1eb6x */
2
+ :root {
3
+ } /* deprecated */ :root {
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 */
5
+ } :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 */
6
+ } :root {
7
+ } :root {
8
+
9
+ /* Hard */
10
+
11
+ /* Up */
12
+
13
+ /* Hard up */
14
+ } :root {
15
+ } :root {
16
+ } :root {
17
+ } :root {
18
+ } .number-input__separator_898tm {
19
+ background-color: var(--color-light-neutral-translucent-300-inverted);
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;