@alfalab/core-components-number-input 2.7.2 → 3.0.0-snapshot-6a9d3fc

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 (235) hide show
  1. package/Component.responsive.d.ts +3 -5
  2. package/Component.responsive.js +3 -2
  3. package/Component.responsive.js.map +1 -0
  4. package/components/number-input/Component.d.ts +4 -7
  5. package/components/number-input/Component.js +3 -2
  6. package/components/number-input/Component.js.map +1 -0
  7. package/components/number-input/index.d.ts +1 -1
  8. package/components/number-input/index.js +3 -2
  9. package/components/number-input/index.js.map +1 -0
  10. package/components/steppers/Component.d.ts +3 -4
  11. package/components/steppers/Component.js +10 -15
  12. package/components/steppers/Component.js.map +1 -0
  13. package/components/steppers/default.css +6 -28
  14. package/components/steppers/default.module.css.js +8 -0
  15. package/components/steppers/default.module.css.js.map +1 -0
  16. package/components/steppers/index.css +9 -31
  17. package/components/steppers/index.d.ts +1 -1
  18. package/components/steppers/index.js +3 -2
  19. package/components/steppers/index.js.map +1 -0
  20. package/components/steppers/index.module.css.js +8 -0
  21. package/components/steppers/index.module.css.js.map +1 -0
  22. package/components/steppers/inverted.css +6 -28
  23. package/components/steppers/inverted.module.css.js +8 -0
  24. package/components/steppers/inverted.module.css.js.map +1 -0
  25. package/constants/min-max-safe-integer.d.ts +2 -3
  26. package/constants/min-max-safe-integer.js +1 -0
  27. package/constants/min-max-safe-integer.js.map +1 -0
  28. package/cssm/Component.responsive.d.ts +3 -5
  29. package/cssm/Component.responsive.js +6 -5
  30. package/cssm/Component.responsive.js.map +1 -0
  31. package/cssm/components/number-input/Component.d.ts +4 -7
  32. package/cssm/components/number-input/Component.js +7 -6
  33. package/cssm/components/number-input/Component.js.map +1 -0
  34. package/cssm/components/number-input/index.d.ts +1 -1
  35. package/cssm/components/number-input/index.js +3 -2
  36. package/cssm/components/number-input/index.js.map +1 -0
  37. package/cssm/components/steppers/Component.d.ts +3 -4
  38. package/cssm/components/steppers/Component.js +5 -4
  39. package/cssm/components/steppers/Component.js.map +1 -0
  40. package/cssm/components/steppers/default.module.css +3 -24
  41. package/cssm/components/steppers/index.d.ts +1 -1
  42. package/cssm/components/steppers/index.js +3 -2
  43. package/cssm/components/steppers/index.js.map +1 -0
  44. package/cssm/components/steppers/index.module.css +4 -25
  45. package/cssm/components/steppers/inverted.module.css +3 -24
  46. package/cssm/constants/min-max-safe-integer.d.ts +2 -3
  47. package/cssm/constants/min-max-safe-integer.js +1 -0
  48. package/cssm/constants/min-max-safe-integer.js.map +1 -0
  49. package/cssm/desktop/Component.desktop.d.ts +3 -5
  50. package/cssm/desktop/Component.desktop.js +3 -2
  51. package/cssm/desktop/Component.desktop.js.map +1 -0
  52. package/cssm/desktop/index.d.ts +1 -2
  53. package/cssm/desktop/index.js +3 -2
  54. package/cssm/desktop/index.js.map +1 -0
  55. package/cssm/index.d.ts +1 -2
  56. package/cssm/index.js +1 -0
  57. package/cssm/index.js.map +1 -0
  58. package/cssm/mobile/Component.mobile.d.ts +3 -5
  59. package/cssm/mobile/Component.mobile.js +3 -2
  60. package/cssm/mobile/Component.mobile.js.map +1 -0
  61. package/cssm/mobile/index.d.ts +1 -2
  62. package/cssm/mobile/index.js +3 -2
  63. package/cssm/mobile/index.js.map +1 -0
  64. package/cssm/shared/index.d.ts +3 -3
  65. package/cssm/shared/index.js +3 -2
  66. package/cssm/shared/index.js.map +1 -0
  67. package/cssm/utils.d.ts +10 -11
  68. package/cssm/utils.js +14 -13
  69. package/cssm/utils.js.map +1 -0
  70. package/desktop/Component.desktop.d.ts +3 -5
  71. package/desktop/Component.desktop.js +3 -2
  72. package/desktop/Component.desktop.js.map +1 -0
  73. package/desktop/index.d.ts +1 -2
  74. package/desktop/index.js +3 -2
  75. package/desktop/index.js.map +1 -0
  76. package/esm/Component.responsive.d.ts +3 -5
  77. package/esm/Component.responsive.js +1 -0
  78. package/esm/Component.responsive.js.map +1 -0
  79. package/esm/components/number-input/Component.d.ts +4 -7
  80. package/esm/components/number-input/Component.js +2 -1
  81. package/esm/components/number-input/Component.js.map +1 -0
  82. package/esm/components/number-input/index.d.ts +1 -1
  83. package/esm/components/number-input/index.js +1 -0
  84. package/esm/components/number-input/index.js.map +1 -0
  85. package/esm/components/steppers/Component.d.ts +3 -4
  86. package/esm/components/steppers/Component.js +4 -9
  87. package/esm/components/steppers/Component.js.map +1 -0
  88. package/esm/components/steppers/default.css +6 -28
  89. package/esm/components/steppers/default.module.css.js +6 -0
  90. package/esm/components/steppers/default.module.css.js.map +1 -0
  91. package/esm/components/steppers/index.css +9 -31
  92. package/esm/components/steppers/index.d.ts +1 -1
  93. package/esm/components/steppers/index.js +1 -0
  94. package/esm/components/steppers/index.js.map +1 -0
  95. package/esm/components/steppers/index.module.css.js +6 -0
  96. package/esm/components/steppers/index.module.css.js.map +1 -0
  97. package/esm/components/steppers/inverted.css +6 -28
  98. package/esm/components/steppers/inverted.module.css.js +6 -0
  99. package/esm/components/steppers/inverted.module.css.js.map +1 -0
  100. package/esm/constants/min-max-safe-integer.d.ts +2 -3
  101. package/esm/constants/min-max-safe-integer.js +1 -0
  102. package/esm/constants/min-max-safe-integer.js.map +1 -0
  103. package/esm/desktop/Component.desktop.d.ts +3 -5
  104. package/esm/desktop/Component.desktop.js +1 -0
  105. package/esm/desktop/Component.desktop.js.map +1 -0
  106. package/esm/desktop/index.d.ts +1 -2
  107. package/esm/desktop/index.js +1 -0
  108. package/esm/desktop/index.js.map +1 -0
  109. package/esm/index.d.ts +1 -2
  110. package/esm/index.js +1 -0
  111. package/esm/index.js.map +1 -0
  112. package/esm/mobile/Component.mobile.d.ts +3 -5
  113. package/esm/mobile/Component.mobile.js +1 -0
  114. package/esm/mobile/Component.mobile.js.map +1 -0
  115. package/esm/mobile/index.d.ts +1 -2
  116. package/esm/mobile/index.js +1 -0
  117. package/esm/mobile/index.js.map +1 -0
  118. package/esm/shared/index.d.ts +3 -3
  119. package/esm/shared/index.js +1 -0
  120. package/esm/shared/index.js.map +1 -0
  121. package/esm/utils.d.ts +10 -11
  122. package/esm/utils.js +3 -2
  123. package/esm/utils.js.map +1 -0
  124. package/index.d.ts +1 -2
  125. package/index.js +1 -0
  126. package/index.js.map +1 -0
  127. package/mobile/Component.mobile.d.ts +3 -5
  128. package/mobile/Component.mobile.js +3 -2
  129. package/mobile/Component.mobile.js.map +1 -0
  130. package/mobile/index.d.ts +1 -2
  131. package/mobile/index.js +3 -2
  132. package/mobile/index.js.map +1 -0
  133. package/modern/Component.responsive.d.ts +3 -5
  134. package/modern/Component.responsive.js +1 -0
  135. package/modern/Component.responsive.js.map +1 -0
  136. package/modern/components/number-input/Component.d.ts +4 -7
  137. package/modern/components/number-input/Component.js +2 -1
  138. package/modern/components/number-input/Component.js.map +1 -0
  139. package/modern/components/number-input/index.d.ts +1 -1
  140. package/modern/components/number-input/index.js +1 -0
  141. package/modern/components/number-input/index.js.map +1 -0
  142. package/modern/components/steppers/Component.d.ts +3 -4
  143. package/modern/components/steppers/Component.js +4 -9
  144. package/modern/components/steppers/Component.js.map +1 -0
  145. package/modern/components/steppers/default.css +6 -28
  146. package/modern/components/steppers/default.module.css.js +6 -0
  147. package/modern/components/steppers/default.module.css.js.map +1 -0
  148. package/modern/components/steppers/index.css +9 -31
  149. package/modern/components/steppers/index.d.ts +1 -1
  150. package/modern/components/steppers/index.js +1 -0
  151. package/modern/components/steppers/index.js.map +1 -0
  152. package/modern/components/steppers/index.module.css.js +6 -0
  153. package/modern/components/steppers/index.module.css.js.map +1 -0
  154. package/modern/components/steppers/inverted.css +6 -28
  155. package/modern/components/steppers/inverted.module.css.js +6 -0
  156. package/modern/components/steppers/inverted.module.css.js.map +1 -0
  157. package/modern/constants/min-max-safe-integer.d.ts +2 -3
  158. package/modern/constants/min-max-safe-integer.js +2 -1
  159. package/modern/constants/min-max-safe-integer.js.map +1 -0
  160. package/modern/desktop/Component.desktop.d.ts +3 -5
  161. package/modern/desktop/Component.desktop.js +1 -0
  162. package/modern/desktop/Component.desktop.js.map +1 -0
  163. package/modern/desktop/index.d.ts +1 -2
  164. package/modern/desktop/index.js +1 -0
  165. package/modern/desktop/index.js.map +1 -0
  166. package/modern/index.d.ts +1 -2
  167. package/modern/index.js +1 -0
  168. package/modern/index.js.map +1 -0
  169. package/modern/mobile/Component.mobile.d.ts +3 -5
  170. package/modern/mobile/Component.mobile.js +1 -0
  171. package/modern/mobile/Component.mobile.js.map +1 -0
  172. package/modern/mobile/index.d.ts +1 -2
  173. package/modern/mobile/index.js +1 -0
  174. package/modern/mobile/index.js.map +1 -0
  175. package/modern/shared/index.d.ts +3 -3
  176. package/modern/shared/index.js +1 -0
  177. package/modern/shared/index.js.map +1 -0
  178. package/modern/utils.d.ts +10 -11
  179. package/modern/utils.js +3 -2
  180. package/modern/utils.js.map +1 -0
  181. package/moderncssm/Component.responsive.d.ts +3 -5
  182. package/moderncssm/Component.responsive.js +1 -0
  183. package/moderncssm/Component.responsive.js.map +1 -0
  184. package/moderncssm/components/number-input/Component.d.ts +4 -7
  185. package/moderncssm/components/number-input/Component.js +2 -1
  186. package/moderncssm/components/number-input/Component.js.map +1 -0
  187. package/moderncssm/components/number-input/index.d.ts +1 -1
  188. package/moderncssm/components/number-input/index.js +1 -0
  189. package/moderncssm/components/number-input/index.js.map +1 -0
  190. package/moderncssm/components/steppers/Component.d.ts +3 -4
  191. package/moderncssm/components/steppers/Component.js +1 -0
  192. package/moderncssm/components/steppers/Component.js.map +1 -0
  193. package/moderncssm/components/steppers/default.module.css +0 -2
  194. package/moderncssm/components/steppers/index.d.ts +1 -1
  195. package/moderncssm/components/steppers/index.js +1 -0
  196. package/moderncssm/components/steppers/index.js.map +1 -0
  197. package/moderncssm/components/steppers/index.module.css +0 -2
  198. package/moderncssm/components/steppers/inverted.module.css +0 -2
  199. package/moderncssm/constants/min-max-safe-integer.d.ts +2 -3
  200. package/moderncssm/constants/min-max-safe-integer.js +2 -1
  201. package/moderncssm/constants/min-max-safe-integer.js.map +1 -0
  202. package/moderncssm/desktop/Component.desktop.d.ts +3 -5
  203. package/moderncssm/desktop/Component.desktop.js +1 -0
  204. package/moderncssm/desktop/Component.desktop.js.map +1 -0
  205. package/moderncssm/desktop/index.d.ts +1 -2
  206. package/moderncssm/desktop/index.js +1 -0
  207. package/moderncssm/desktop/index.js.map +1 -0
  208. package/moderncssm/index.d.ts +1 -2
  209. package/moderncssm/index.js +1 -0
  210. package/moderncssm/index.js.map +1 -0
  211. package/moderncssm/mobile/Component.mobile.d.ts +3 -5
  212. package/moderncssm/mobile/Component.mobile.js +1 -0
  213. package/moderncssm/mobile/Component.mobile.js.map +1 -0
  214. package/moderncssm/mobile/index.d.ts +1 -2
  215. package/moderncssm/mobile/index.js +1 -0
  216. package/moderncssm/mobile/index.js.map +1 -0
  217. package/moderncssm/shared/index.d.ts +3 -3
  218. package/moderncssm/shared/index.js +1 -0
  219. package/moderncssm/shared/index.js.map +1 -0
  220. package/moderncssm/utils.d.ts +10 -11
  221. package/moderncssm/utils.js +3 -2
  222. package/moderncssm/utils.js.map +1 -0
  223. package/package.json +9 -8
  224. package/shared/index.d.ts +3 -3
  225. package/shared/index.js +3 -2
  226. package/shared/index.js.map +1 -0
  227. package/utils.d.ts +10 -11
  228. package/utils.js +4 -3
  229. package/utils.js.map +1 -0
  230. package/desktop/package.json +0 -3
  231. package/mobile/package.json +0 -3
  232. package/shared/package.json +0 -3
  233. package/src/desktop/package.json +0 -3
  234. package/src/mobile/package.json +0 -3
  235. package/src/shared/package.json +0 -3
@@ -2,8 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var mobile_Component_mobile = require('./Component.mobile.js');
5
+ var Component_mobile = require('./Component.mobile.js');
6
6
 
7
7
 
8
8
 
9
- exports.NumberInputMobile = mobile_Component_mobile.NumberInputMobile;
9
+ exports.NumberInputMobile = Component_mobile.NumberInputMobile;
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,3 +1,3 @@
1
- export { getNumberInputTestIds } from "../utils";
2
- export { Steppers } from "../components/steppers/index";
3
- export type { SteppersProps } from "../components/steppers/index";
1
+ export { getNumberInputTestIds } from '../utils';
2
+ export { Steppers } from '../components/steppers';
3
+ export type { SteppersProps } from '../components/steppers';
@@ -3,9 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var utils = require('../utils.js');
6
- var components_steppers_Component = require('../components/steppers/Component.js');
6
+ var Component = require('../components/steppers/Component.js');
7
7
 
8
8
 
9
9
 
10
10
  exports.getNumberInputTestIds = utils.getNumberInputTestIds;
11
- exports.Steppers = components_steppers_Component.Steppers;
11
+ exports.Steppers = Component.Steppers;
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
package/cssm/utils.d.ts CHANGED
@@ -1,24 +1,24 @@
1
1
  import { MaskitoOptions, MaskitoPlugin } from '@maskito/core';
2
- declare const MINUS_SIGN = "-";
3
- declare const SEPARATORS: string[];
4
- declare const MAX_DIGITS = 15;
5
- declare function parseNumber(value?: string | number | null): number;
2
+ export declare const MINUS_SIGN = "-";
3
+ export declare const SEPARATORS: string[];
4
+ export declare const MAX_DIGITS = 15;
5
+ export declare function parseNumber(value?: string | number | null): number;
6
6
  /**
7
7
  * Преобразовать число в строку с заменой экспоненты на десятичную дробь
8
8
  */
9
- declare function stringifyNumberWithoutExp(value: number): string;
10
- declare function createMaskOptions({ separator, fractionLength, min, max, }: {
9
+ export declare function stringifyNumberWithoutExp(value: number): string;
10
+ export declare function createMaskOptions({ separator, fractionLength, min, max, }: {
11
11
  separator: string;
12
12
  fractionLength: number;
13
13
  min: number;
14
14
  max: number;
15
15
  }): MaskitoOptions;
16
- declare function createMinMaxPlugin({ min, max }: {
16
+ export declare function createMinMaxPlugin({ min, max }: {
17
17
  min: number;
18
18
  max: number;
19
19
  }): MaskitoPlugin;
20
- declare function createNotEmptyPartsPlugin(separator: string): MaskitoPlugin;
21
- declare function getNumberInputTestIds(dataTestId: string): {
20
+ export declare function createNotEmptyPartsPlugin(separator: string): MaskitoPlugin;
21
+ export declare function getNumberInputTestIds(dataTestId: string): {
22
22
  input: string;
23
23
  inputWrapper: string;
24
24
  inputWrapperInner: string;
@@ -33,11 +33,10 @@ declare function getNumberInputTestIds(dataTestId: string): {
33
33
  * Определение минимального / максимального значения
34
34
  * @description Если значение не передано, вернется { Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER }
35
35
  */
36
- declare const getMinMaxOrDefault: ({ minProp, maxProp, }: {
36
+ export declare const getMinMaxOrDefault: ({ minProp, maxProp, }: {
37
37
  minProp?: number | undefined;
38
38
  maxProp?: number | undefined;
39
39
  }) => {
40
40
  min: number;
41
41
  max: number;
42
42
  };
43
- export { MINUS_SIGN, SEPARATORS, MAX_DIGITS, parseNumber, stringifyNumberWithoutExp, createMaskOptions, createMinMaxPlugin, createNotEmptyPartsPlugin, getNumberInputTestIds, getMinMaxOrDefault };
package/cssm/utils.js CHANGED
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var core = require('@maskito/core');
6
- var coreComponentsShared = require('@alfalab/core-components-shared/cssm');
7
- var constants_minMaxSafeInteger = require('./constants/min-max-safe-integer.js');
6
+ var cssm = require('@alfalab/core-components-shared/cssm');
7
+ var minMaxSafeInteger = require('./constants/min-max-safe-integer.js');
8
8
 
9
9
  /* eslint-disable no-param-reassign */
10
10
  var MINUS_SIGN = '-';
@@ -210,7 +210,7 @@ function createMinMaxPlugin(_a) {
210
210
  return function (element, options) {
211
211
  var listener = function () {
212
212
  var parsedNumber = parseNumber(element.value);
213
- var clampedNumber = coreComponentsShared.fnUtils.clamp(parsedNumber, min, max);
213
+ var clampedNumber = cssm.fnUtils.clamp(parsedNumber, min, max);
214
214
  if (!Number.isNaN(parsedNumber) && parsedNumber !== clampedNumber) {
215
215
  element.value = core.maskitoTransform(stringifyNumberWithoutExp(clampedNumber), options);
216
216
  element.dispatchEvent(new Event('input', { bubbles: true }));
@@ -248,14 +248,14 @@ function createNotEmptyPartsPlugin(separator) {
248
248
  function getNumberInputTestIds(dataTestId) {
249
249
  return {
250
250
  input: dataTestId,
251
- inputWrapper: coreComponentsShared.getDataTestId(dataTestId, 'form-control'),
252
- inputWrapperInner: coreComponentsShared.getDataTestId(dataTestId, 'form-control-inner'),
253
- leftAddons: coreComponentsShared.getDataTestId(dataTestId, 'form-control-left-addons'),
254
- rightAddons: coreComponentsShared.getDataTestId(dataTestId, 'form-control-right-addons'),
255
- error: coreComponentsShared.getDataTestId(dataTestId, 'form-control-error-message'),
256
- hint: coreComponentsShared.getDataTestId(dataTestId, 'form-control-hint'),
257
- decrementButton: coreComponentsShared.getDataTestId(dataTestId, 'decrement-button'),
258
- incrementButton: coreComponentsShared.getDataTestId(dataTestId, 'increment-button'),
251
+ inputWrapper: cssm.getDataTestId(dataTestId, 'form-control'),
252
+ inputWrapperInner: cssm.getDataTestId(dataTestId, 'form-control-inner'),
253
+ leftAddons: cssm.getDataTestId(dataTestId, 'form-control-left-addons'),
254
+ rightAddons: cssm.getDataTestId(dataTestId, 'form-control-right-addons'),
255
+ error: cssm.getDataTestId(dataTestId, 'form-control-error-message'),
256
+ hint: cssm.getDataTestId(dataTestId, 'form-control-hint'),
257
+ decrementButton: cssm.getDataTestId(dataTestId, 'decrement-button'),
258
+ incrementButton: cssm.getDataTestId(dataTestId, 'increment-button'),
259
259
  };
260
260
  }
261
261
  /**
@@ -264,8 +264,8 @@ function getNumberInputTestIds(dataTestId) {
264
264
  */
265
265
  var getMinMaxOrDefault = function (_a) {
266
266
  var minProp = _a.minProp, maxProp = _a.maxProp;
267
- var min = Math.max(constants_minMaxSafeInteger.MIN_SAFE_INTEGER, minProp !== null && minProp !== void 0 ? minProp : constants_minMaxSafeInteger.MIN_SAFE_INTEGER);
268
- var max = Math.min(constants_minMaxSafeInteger.MAX_SAFE_INTEGER, maxProp !== null && maxProp !== void 0 ? maxProp : constants_minMaxSafeInteger.MAX_SAFE_INTEGER);
267
+ var min = Math.max(minMaxSafeInteger.MIN_SAFE_INTEGER, minProp !== null && minProp !== void 0 ? minProp : minMaxSafeInteger.MIN_SAFE_INTEGER);
268
+ var max = Math.min(minMaxSafeInteger.MAX_SAFE_INTEGER, maxProp !== null && maxProp !== void 0 ? maxProp : minMaxSafeInteger.MAX_SAFE_INTEGER);
269
269
  return { min: min, max: max };
270
270
  };
271
271
 
@@ -279,3 +279,4 @@ exports.getMinMaxOrDefault = getMinMaxOrDefault;
279
279
  exports.getNumberInputTestIds = getNumberInputTestIds;
280
280
  exports.parseNumber = parseNumber;
281
281
  exports.stringifyNumberWithoutExp = stringifyNumberWithoutExp;
282
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sources":["../src/utils.ts"],"sourcesContent":["/* eslint-disable no-param-reassign */\nimport {\n MaskitoOptions,\n MaskitoPlugin,\n MaskitoPostprocessor,\n MaskitoPreprocessor,\n maskitoTransform,\n} from '@maskito/core';\n\nimport { fnUtils, getDataTestId } from '@alfalab/core-components-shared';\n\nimport { MAX_SAFE_INTEGER, MIN_SAFE_INTEGER } from './constants/min-max-safe-integer';\n\nexport const MINUS_SIGN = '-';\nexport const SEPARATORS = [',', '.'];\nexport const MAX_DIGITS = 15; // с 16 уже упираемся в MAX_SAFE_INTEGER\n\nexport function parseNumber(value: string | number | null = '') {\n if (typeof value === 'number') return value;\n\n const pseudoSeparatorsRegExp = new RegExp(`[${SEPARATORS.join('')}]`, 'gi');\n\n return value\n ? parseFloat(\n value\n .replace(new RegExp(`[^${MINUS_SIGN}${SEPARATORS.join('')}0-9]`, 'gi'), '')\n .replace(pseudoSeparatorsRegExp, '.'),\n )\n : NaN;\n}\n\n/**\n * Преобразовать число в строку с заменой экспоненты на десятичную дробь\n */\nexport function stringifyNumberWithoutExp(value: number): string {\n const valueString = String(value);\n const [numberPart, expPart] = valueString.split('e-');\n\n let valueWithoutExp = valueString;\n\n if (expPart) {\n const [, fractionalPart] = numberPart.split('.');\n const decimalDigits = Number(expPart) + (fractionalPart?.length || 0);\n\n valueWithoutExp = value.toFixed(decimalDigits);\n }\n\n return valueWithoutExp;\n}\n\nconst getNumberRegExp = (min: number, fractionLength: number): RegExp => {\n let reStr = '[0-9]*';\n\n if (min < 0) {\n reStr = `(\\\\${MINUS_SIGN})?${reStr}`;\n }\n\n if (fractionLength !== 0) {\n reStr = `${reStr}[${SEPARATORS.map((s) => `\\\\${s}`).join('')}]?[0-9]{0,${\n fractionLength || MAX_DIGITS\n }}`;\n }\n\n return new RegExp(`^${reStr}$`);\n};\n\nexport function createMaskOptions({\n separator,\n fractionLength,\n min,\n max,\n}: {\n separator: string;\n fractionLength: number;\n min: number;\n max: number;\n}): MaskitoOptions {\n return {\n mask: getNumberRegExp(min, fractionLength),\n preprocessors: [\n createPseudoSeparatorPreprocessor(separator),\n createNotEmptyIntegerPartPreprocessor({ separator, fractionLength }),\n createZeroFractionLengthPreprocessor(fractionLength, separator),\n createRepeatedSeparatorPreprocessor(separator),\n ],\n postprocessors: [\n createLeadingZeroesValidationPostprocessor(separator),\n createMinMaxPostprocessor({ min, max, separator }),\n ],\n plugins: [createNotEmptyPartsPlugin(separator), createMinMaxPlugin({ min, max })],\n };\n}\n\n/**\n * Заполняет целочисленную часть при вводе separator.\n * @example Type , => 0,\n */\nfunction createNotEmptyIntegerPartPreprocessor({\n separator,\n fractionLength,\n}: {\n separator: string;\n fractionLength: number;\n}): MaskitoPreprocessor {\n const startWithDecimalSepRegExp = new RegExp(`^\\\\D*\\\\${separator}`);\n\n return ({ elementState, data }) => {\n const { value, selection } = elementState;\n const [from] = selection;\n\n if (\n fractionLength <= 0 ||\n value.includes(separator) ||\n !data.match(startWithDecimalSepRegExp)\n ) {\n return { elementState, data };\n }\n\n const digitsBeforeCursor = value.slice(0, from).match(/\\d+/);\n\n return {\n elementState,\n data: digitsBeforeCursor ? data : `0${data}`,\n };\n };\n}\n\n/**\n * Не позволяет вводить невалидный разделитель.\n */\nfunction createPseudoSeparatorPreprocessor(separator: string): MaskitoPreprocessor {\n const pseudoSeparatorsRegExp = new RegExp(`[${SEPARATORS.join('')}]`, 'gi');\n\n return ({ elementState, data }) => {\n const { value, selection } = elementState;\n\n return {\n elementState: {\n selection,\n value: value.replace(pseudoSeparatorsRegExp, separator),\n },\n data: data.replace(pseudoSeparatorsRegExp, separator),\n };\n };\n}\n\n/**\n * Помогает верно обрезать значения при вставке, если fractionLength===0\n * @example paste 123,123 -> 123\n */\nfunction createZeroFractionLengthPreprocessor(\n fractionLength: number,\n separator: string,\n): MaskitoPreprocessor {\n if (fractionLength > 0) {\n return (state) => state;\n }\n\n const decimalPartRegExp = new RegExp(`\\\\${separator}.*$`, 'g');\n\n return ({ elementState, data }) => {\n const { value, selection } = elementState;\n const [from, to] = selection;\n const newValue = value.replace(decimalPartRegExp, '');\n\n return {\n elementState: {\n selection: [Math.min(from, newValue.length), Math.min(to, newValue.length)],\n value: newValue,\n },\n data: data.replace(decimalPartRegExp, ''),\n };\n };\n}\n\n/**\n * Запрещает вводить второй сепаратор\n */\nfunction createRepeatedSeparatorPreprocessor(separator: string): MaskitoPreprocessor {\n return ({ elementState, data }) => {\n const { value, selection } = elementState;\n const [from, to] = selection;\n\n return {\n elementState,\n data:\n !value.includes(separator) || value.slice(from, to + 1).includes(separator)\n ? data\n : data.replace(new RegExp(`\\\\${separator}`), ''),\n };\n };\n}\n\n/**\n * Удаляет лишние нули в начале целой части.\n * @example 0,|00005 => Backspace => |5\n * @example -0,|00005 => Backspace => -|5\n * @example \"000000\" => 0|\n * @example 0| => Type \"5\" => 5|\n */\nfunction createLeadingZeroesValidationPostprocessor(separator: string): MaskitoPostprocessor {\n const trimLeadingZeroes = (value: string): string =>\n value\n .replace(new RegExp('^(\\\\D+)?0+(?=0)'), '$1')\n .replace(new RegExp('^(\\\\D+)?0+(?=[1-9])'), '$1');\n\n const countTrimmedZeroesBefore = (value: string, index: number): number => {\n const valueBefore = value.slice(0, index);\n const followedByZero = value.slice(index).startsWith('0');\n\n return (\n valueBefore.length - trimLeadingZeroes(valueBefore).length + (followedByZero ? 1 : 0)\n );\n };\n\n return ({ value, selection }) => {\n const [from, to] = selection;\n const hasSeparator = value.includes(separator);\n const [integerPart, decimalPart = ''] = value.split(separator);\n const zeroTrimmedIntegerPart = trimLeadingZeroes(integerPart);\n\n if (integerPart === zeroTrimmedIntegerPart) {\n return { value, selection };\n }\n\n const newFrom = from - countTrimmedZeroesBefore(value, from);\n const newTo = to - countTrimmedZeroesBefore(value, to);\n\n return {\n value: zeroTrimmedIntegerPart + (hasSeparator ? separator : '') + decimalPart,\n selection: [Math.max(newFrom, 0), Math.max(newTo, 0)],\n };\n };\n}\n\n/**\n * Валидирует значение с учетом min max значений.\n * Работает совместно с createMinMaxPlugin\n */\nfunction createMinMaxPostprocessor({\n min,\n max,\n separator,\n}: {\n min: number;\n max: number;\n separator: string;\n}): MaskitoPostprocessor {\n return ({ value, selection }) => {\n const parsedNumber = parseNumber(value);\n\n const limitedValue =\n /**\n * Здесь невозможно ограничить нижнюю границу, если пользователь вводит положительное число.\n * То же самое для верхней границы и отрицательного числа.\n * Если min=5, то без этого условия не получится ввести 40, похожая ситуация и с отрицательным max\n */\n parsedNumber > 0 ? Math.min(parsedNumber, max) : Math.max(parsedNumber, min);\n\n if (!Number.isNaN(parsedNumber) && limitedValue !== parsedNumber) {\n const newValue = `${limitedValue}`.replace('.', separator);\n\n return {\n value: newValue,\n selection: [newValue.length, newValue.length],\n };\n }\n\n return {\n value,\n selection,\n };\n };\n}\n\nexport function createMinMaxPlugin({ min, max }: { min: number; max: number }): MaskitoPlugin {\n return (element, options) => {\n const listener = () => {\n const parsedNumber = parseNumber(element.value);\n\n const clampedNumber = fnUtils.clamp(parsedNumber, min, max);\n\n if (!Number.isNaN(parsedNumber) && parsedNumber !== clampedNumber) {\n element.value = maskitoTransform(stringifyNumberWithoutExp(clampedNumber), options);\n element.dispatchEvent(new Event('input', { bubbles: true }));\n }\n };\n\n const evListenerOptions = { capture: true };\n\n element.addEventListener('blur', listener, evListenerOptions);\n\n return () => element.removeEventListener('blur', listener, evListenerOptions);\n };\n}\n\nexport function createNotEmptyPartsPlugin(separator: string): MaskitoPlugin {\n return (element) => {\n const listener = () => {\n const newValue = element.value\n // 0,9000000 -> 0,9\n .replace(new RegExp(`(\\\\${separator}\\\\d*?)(0+$)`), '$1')\n // ,2 => 0,2\n .replace(new RegExp(`^(\\\\D+)?\\\\${separator}`), `$10${separator}`)\n // 0, -> 0\n .replace(new RegExp(`\\\\${separator}$`), '')\n // -0 -> 0\n .replace(new RegExp(`^${MINUS_SIGN}0$`), '0')\n // - -> ''\n .replace(new RegExp(`^${MINUS_SIGN}$`), '');\n\n if (newValue !== element.value) {\n element.value = newValue;\n element.dispatchEvent(new Event('input', { bubbles: true }));\n }\n };\n\n const evListenerOptions = { capture: true };\n\n element.addEventListener('blur', listener, evListenerOptions);\n\n return () => element.removeEventListener('blur', listener, evListenerOptions);\n };\n}\n\nexport function getNumberInputTestIds(dataTestId: string) {\n return {\n input: dataTestId,\n inputWrapper: getDataTestId(dataTestId, 'form-control'),\n inputWrapperInner: getDataTestId(dataTestId, 'form-control-inner'),\n leftAddons: getDataTestId(dataTestId, 'form-control-left-addons'),\n rightAddons: getDataTestId(dataTestId, 'form-control-right-addons'),\n error: getDataTestId(dataTestId, 'form-control-error-message'),\n hint: getDataTestId(dataTestId, 'form-control-hint'),\n decrementButton: getDataTestId(dataTestId, 'decrement-button'),\n incrementButton: getDataTestId(dataTestId, 'increment-button'),\n };\n}\n\n/**\n * Определение минимального / максимального значения\n * @description Если значение не передано, вернется { Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER }\n */\nexport const getMinMaxOrDefault = ({\n minProp,\n maxProp,\n}: {\n minProp?: number;\n maxProp?: number;\n}) => {\n const min = Math.max(MIN_SAFE_INTEGER, minProp ?? MIN_SAFE_INTEGER);\n const max = Math.min(MAX_SAFE_INTEGER, maxProp ?? MAX_SAFE_INTEGER);\n\n return { min, max };\n};\n"],"names":["fnUtils","maskitoTransform","getDataTestId","MIN_SAFE_INTEGER","MAX_SAFE_INTEGER"],"mappings":";;;;;;;;AAAA;AAaO,IAAM,UAAU,GAAG;IACb,UAAU,GAAG,CAAC,GAAG,EAAE,GAAG;AACtB,IAAA,UAAU,GAAG,GAAG;AAEvB,SAAU,WAAW,CAAC,KAAkC,EAAA;AAAlC,IAAA,IAAA,KAAA,KAAA,MAAA,EAAA,EAAA,KAAkC,GAAA,EAAA,CAAA;IAC1D,IAAI,OAAO,KAAK,KAAK,QAAQ;AAAE,QAAA,OAAO,KAAK;AAE3C,IAAA,IAAM,sBAAsB,GAAG,IAAI,MAAM,CAAC,WAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,EAAA,GAAA,CAAG,EAAE,IAAI,CAAC;AAE3E,IAAA,OAAO;UACD,UAAU,CACN;AACK,aAAA,OAAO,CAAC,IAAI,MAAM,CAAC,IAAK,CAAA,MAAA,CAAA,UAAU,SAAG,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,EAAM,MAAA,CAAA,EAAE,IAAI,CAAC,EAAE,EAAE;AACzE,aAAA,OAAO,CAAC,sBAAsB,EAAE,GAAG,CAAC;UAE7C,GAAG;AACb;AAEA;;AAEG;AACG,SAAU,yBAAyB,CAAC,KAAa,EAAA;AACnD,IAAA,IAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC;AAC3B,IAAA,IAAA,EAAwB,GAAA,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,EAA9C,UAAU,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,OAAO,QAA2B;IAErD,IAAI,eAAe,GAAG,WAAW;AAEjC,IAAA,IAAI,OAAO,EAAE;QACH,IAAA,EAAA,GAAqB,UAAU,CAAC,KAAK,CA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AC,UAAU,EAAE,oBAAoB,CAAC;AAClE,QAAA,UAAU,EAAEA,kBAAa,CAAC,UAAU,EAAE,0BAA0B,CAAC;AACjE,QAAA,WAAW,EAAEA,kBAAa,CAAC,UAAU,EAAE,2BAA2B,CAAC;AACnE,QAAA,KAAK,EAAEA,kBAAa,CAAC,UAAU,EAAE,4BAA4B,CAAC;AAC9D,QAAA,IAAI,EAAEA,kBAAa,CAAC,UAAU,EAAE,mBAAmB,CAAC;AACpD,QAAA,eAAe,EAAEA,kBAAa,CAAC,UAAU,EAAE,kBAAkB,CAAC;AAC9D,QAAA,eAAe,EAAEA,kBAAa,CAAC,UAAU,EAAE,kBAAkB,CAAC;KACjE;AACL;AAEA;;;AAGG;AACI,IAAM,kBAAkB,GAAG,UAAC,EAMlC,EAAA;QALG,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,OAAO,GAAA,EAAA,CAAA,OAAA;AAKP,IAAA,IAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAACC,kCAAgB,EAAE,OAAO,KAAA,IAAA,IAAP,OAAO,KAAP,MAAA,GAAA,OAAO,GAAIA,kCAAgB,CAAC;AACnE,IAAA,IAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAACC,kCAAgB,EAAE,OAAO,KAAA,IAAA,IAAP,OAAO,KAAP,MAAA,GAAA,OAAO,GAAIA,kCAAgB,CAAC;AAEnE,IAAA,OAAO,EAAE,GAAG,EAAA,GAAA,EAAE,GAAG,EAAA,GAAA,EAAE;AACvB;;;;;;;;;;;;;"}
@@ -1,6 +1,4 @@
1
- /// <reference types="react" />
2
1
  import React from 'react';
3
- import { NumberInputProps } from "../components/number-input/index";
4
- type NumberInputDesktopProps = Omit<NumberInputProps, 'Input' | 'breakpoint' | 'view'>;
5
- declare const NumberInputDesktop: React.ForwardRefExoticComponent<NumberInputDesktopProps & React.RefAttributes<HTMLInputElement>>;
6
- export { NumberInputDesktopProps, NumberInputDesktop };
2
+ import { NumberInputProps } from '../components/number-input';
3
+ export declare type NumberInputDesktopProps = Omit<NumberInputProps, 'Input' | 'breakpoint' | 'view'>;
4
+ export declare const NumberInputDesktop: React.ForwardRefExoticComponent<NumberInputDesktopProps & React.RefAttributes<HTMLInputElement>>;
@@ -5,12 +5,13 @@ 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 Component = require('../components/number-input/Component.js');
9
9
 
10
10
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
11
11
 
12
12
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
13
13
 
14
- var NumberInputDesktop = React.forwardRef(function (props, ref) { return React__default.default.createElement(components_numberInput_Component.NumberInput, tslib.__assign({}, props, { Input: desktop.InputDesktop, ref: ref, view: 'desktop' })); });
14
+ var NumberInputDesktop = React.forwardRef(function (props, ref) { return React__default.default.createElement(Component.NumberInput, tslib.__assign({}, props, { Input: desktop.InputDesktop, ref: ref, view: 'desktop' })); });
15
15
 
16
16
  exports.NumberInputDesktop = NumberInputDesktop;
17
+ //# sourceMappingURL=Component.desktop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Component.desktop.js","sources":["../src/desktop/Component.desktop.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { InputDesktop } from '@alfalab/core-components-input/desktop';\n\nimport { NumberInput, NumberInputProps } from '../components/number-input';\n\nexport type NumberInputDesktopProps = Omit<NumberInputProps, 'Input' | 'breakpoint' | 'view'>;\n\nexport const NumberInputDesktop = forwardRef<HTMLInputElement, NumberInputDesktopProps>(\n (props, ref) => <NumberInput {...props} Input={InputDesktop} ref={ref} view='desktop' />,\n);\n"],"names":["forwardRef","React","NumberInput","__assign","InputDesktop"],"mappings":";;;;;;;;;;;;;AAQO,IAAM,kBAAkB,GAAGA,gBAAU,CACxC,UAAC,KAAK,EAAE,GAAG,EAAA,EAAK,OAAAC,sBAAA,CAAA,aAAA,CAACC,qBAAW,EAAKC,cAAA,CAAA,EAAA,EAAA,KAAK,EAAE,EAAA,KAAK,EAAEC,oBAAY,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAC,SAAS,EAAA,CAAA,CAAG,CAAxE,EAAwE;;;;"}
@@ -1,2 +1 @@
1
- export { NumberInputDesktop, NumberInputDesktopProps } from "./Component.desktop";
2
- export {};
1
+ export { NumberInputDesktop, NumberInputDesktopProps } from './Component.desktop';
package/desktop/index.js CHANGED
@@ -2,8 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var desktop_Component_desktop = require('./Component.desktop.js');
5
+ var Component_desktop = require('./Component.desktop.js');
6
6
 
7
7
 
8
8
 
9
- exports.NumberInputDesktop = desktop_Component_desktop.NumberInputDesktop;
9
+ exports.NumberInputDesktop = Component_desktop.NumberInputDesktop;
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,6 +1,4 @@
1
- /// <reference types="react" />
2
1
  import React from 'react';
3
- import { NumberInputProps } from "./components/number-input/index";
4
- type NumberInputResponsiveProps = Omit<NumberInputProps, 'Input' | 'view'>;
5
- declare const NumberInputResponsive: React.ForwardRefExoticComponent<NumberInputResponsiveProps & React.RefAttributes<HTMLInputElement>>;
6
- export { NumberInputResponsiveProps, NumberInputResponsive };
2
+ import { NumberInputProps } from './components/number-input';
3
+ export declare type NumberInputResponsiveProps = Omit<NumberInputProps, 'Input' | 'view'>;
4
+ export declare const NumberInputResponsive: React.ForwardRefExoticComponent<NumberInputResponsiveProps & React.RefAttributes<HTMLInputElement>>;
@@ -12,3 +12,4 @@ var NumberInputResponsive = forwardRef(function (_a, ref) {
12
12
  NumberInputResponsive.displayName = 'NumberInputResponsive';
13
13
 
14
14
  export { NumberInputResponsive };
15
+ //# sourceMappingURL=Component.responsive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Component.responsive.js","sources":["../src/Component.responsive.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { Input } from '@alfalab/core-components-input';\nimport { useIsDesktop } from '@alfalab/core-components-mq';\n\nimport { NumberInput, NumberInputProps } from './components/number-input';\n\nexport type NumberInputResponsiveProps = Omit<NumberInputProps, 'Input' | 'view'>;\n\nexport const NumberInputResponsive = forwardRef<HTMLInputElement, NumberInputResponsiveProps>(\n (\n {\n breakpoint,\n client,\n defaultMatchMediaValue = client === undefined ? undefined : client === 'desktop',\n ...restProps\n },\n ref,\n ) => {\n const isDesktop = useIsDesktop(breakpoint, defaultMatchMediaValue);\n\n return (\n <NumberInput\n {...restProps}\n Input={Input}\n ref={ref}\n view={isDesktop ? 'desktop' : 'mobile'}\n breakpoint={breakpoint}\n defaultMatchMediaValue={defaultMatchMediaValue}\n />\n );\n },\n);\n\nNumberInputResponsive.displayName = 'NumberInputResponsive';\n"],"names":[],"mappings":";;;;;;IASa,qBAAqB,GAAG,UAAU,CAC3C,UACI,EAKC,EACD,GAAG,EAAA;AALC,IAAA,IAAA,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,EAAgF,GAAA,EAAA,CAAA,sBAAA,EAAhF,sBAAsB,GAAA,EAAA,KAAA,MAAA,GAAG,MAAM,KAAK,SAAS,GAAG,SAAS,GAAG,MAAM,KAAK,SAAS,GAAA,EAAA,EAC7E,SAAS,GAJhB,MAAA,CAAA,EAAA,EAAA,CAAA,YAAA,EAAA,QAAA,EAAA,wBAAA,CAKC,CADe;IAIhB,IAAM,SAAS,GAAG,YAAY,CAAC,UAAU,EAAE,sBAAsB,CAAC;AAElE,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,WAAW,EAAA,QAAA,CAAA,EAAA,EACJ,SAAS,EACb,EAAA,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,EACtC,UAAU,EAAE,UAAU,EACtB,sBAAsB,EAAE,sBAAsB,EAAA,CAAA,CAChD;AAEV,CAAC;AAGL,qBAAqB,CAAC,WAAW,GAAG,uBAAuB;;;;"}
@@ -1,8 +1,6 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { ChangeEvent, FC, Ref } from "react";
4
- import { InputProps } from "@alfalab/core-components-input";
5
- interface NumberInputProps extends Omit<InputProps, 'value' | 'onChange' | 'type' | 'defaultValue' | 'dataTestId'> {
1
+ import React, { ChangeEvent, FC, Ref } from 'react';
2
+ import type { InputProps } from '@alfalab/core-components-input';
3
+ export interface NumberInputProps extends Omit<InputProps, 'value' | 'onChange' | 'type' | 'defaultValue' | 'dataTestId'> {
6
4
  /**
7
5
  * Значение поля ввода
8
6
  */
@@ -56,5 +54,4 @@ interface NumberInputProps extends Omit<InputProps, 'value' | 'onChange' | 'type
56
54
  */
57
55
  dataTestId?: string;
58
56
  }
59
- declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & React.RefAttributes<HTMLInputElement>>;
60
- export { NumberInputProps, NumberInput };
57
+ export declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -4,7 +4,7 @@ import mergeRefs from 'react-merge-refs';
4
4
  import { maskitoTransform } from '@maskito/core';
5
5
  import { useMaskito } from '@maskito/react';
6
6
  import { fnUtils, os } from '@alfalab/core-components-shared/esm';
7
- import { getMinMaxOrDefault, createMaskOptions, parseNumber, stringifyNumberWithoutExp, MAX_DIGITS, MINUS_SIGN } from '../../utils.js';
7
+ import { createMaskOptions, MAX_DIGITS, getMinMaxOrDefault, parseNumber, stringifyNumberWithoutExp, MINUS_SIGN } from '../../utils.js';
8
8
  import { Steppers } from '../steppers/Component.js';
9
9
 
10
10
  var NumberInput = forwardRef(function (_a, ref) {
@@ -89,3 +89,4 @@ var NumberInput = forwardRef(function (_a, ref) {
89
89
  });
90
90
 
91
91
  export { NumberInput };
92
+ //# sourceMappingURL=Component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Component.js","sources":["../../../src/components/number-input/Component.tsx"],"sourcesContent":["import React, {\n ChangeEvent,\n FC,\n FocusEvent,\n forwardRef,\n Ref,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport mergeRefs from 'react-merge-refs';\nimport { MaskitoOptions, maskitoTransform } from '@maskito/core';\nimport { useMaskito } from '@maskito/react';\n\nimport type { InputProps } from '@alfalab/core-components-input';\nimport { fnUtils, os } from '@alfalab/core-components-shared';\n\nimport {\n createMaskOptions,\n getMinMaxOrDefault,\n MAX_DIGITS,\n MINUS_SIGN,\n parseNumber,\n stringifyNumberWithoutExp,\n} from '../../utils';\nimport { Steppers } from '../steppers';\n\nexport interface NumberInputProps\n extends Omit<InputProps, 'value' | 'onChange' | 'type' | 'defaultValue' | 'dataTestId'> {\n /**\n * Значение поля ввода\n */\n value?: string | number | null;\n\n /**\n * Значение по-умолчанию\n */\n defaultValue?: string | number | null;\n\n /**\n * Разделитель ',' или '.'\n */\n separator?: '.' | ',';\n\n /**\n * Количество символов после разделителя\n * Если указан проп step, то всегда 0\n */\n fractionLength?: number;\n\n /**\n * Шаг инкремента/декремента. Используйте только целочисленные значения\n */\n step?: number;\n\n /**\n * Минимальное значение\n * @default Number.MIN_SAFE_INTEGER\n */\n min?: number;\n\n /**\n * Максимальное значение\n * @default Number.MAX_SAFE_INTEGER\n */\n max?: number;\n\n /**\n * Отображение компонента в мобильном или десктопном виде\n */\n view?: 'desktop' | 'mobile';\n\n /**\n * Компонент инпута\n */\n Input: FC<InputProps & { ref?: Ref<HTMLInputElement> }>;\n\n /**\n * Обработчик события изменения значения\n */\n onChange?: (e: ChangeEvent<HTMLInputElement> | null, payload: { value: number | null }) => void;\n\n /**\n * Идентификатор для систем автоматизированного тестирования.\n * Для кнопки инкремента используется модификатор -increment-button, декремента -decrement-button\n */\n dataTestId?: string;\n}\n\nexport const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(\n (\n {\n value: propValue,\n onChange,\n separator = ',',\n fractionLength = MAX_DIGITS,\n defaultValue,\n Input,\n min: minProp,\n max: maxProp,\n rightAddons,\n dataTestId,\n disabled,\n onBlur,\n onFocus,\n view,\n step: stepProp,\n size = 48,\n disableUserInput,\n clear: clearProp,\n colors = 'default',\n ...restProps\n },\n ref,\n ) => {\n const { min, max } = getMinMaxOrDefault({ minProp, maxProp });\n const withStepper = stepProp !== undefined;\n\n const maskOptions: MaskitoOptions = useMemo(\n () =>\n createMaskOptions({\n separator,\n fractionLength: withStepper ? 0 : fractionLength,\n min,\n max,\n }),\n [separator, fractionLength, min, max, withStepper],\n );\n\n const [focused, setFocused] = useState(false);\n const [value, setValue] = useState(() => {\n if (defaultValue == null) {\n return withStepper ? fnUtils.clamp(0, min, max).toString() : '';\n }\n\n return fnUtils\n .clamp(\n parseNumber(maskitoTransform(defaultValue.toString(), maskOptions)),\n min,\n max,\n )\n .toString();\n });\n\n const maskRef = useMaskito({ options: maskOptions });\n\n useEffect(() => {\n if (propValue !== undefined) {\n setValue((prev) => {\n const parsedNumber = parseNumber(propValue);\n\n if (parsedNumber !== parseNumber(prev)) {\n return maskitoTransform(\n stringifyNumberWithoutExp(parsedNumber),\n maskOptions,\n );\n }\n\n return prev;\n });\n }\n }, [maskOptions, propValue, separator]);\n\n const getMaxLength = (valueString: string) => {\n const hasSeparator = valueString?.includes(separator);\n const hasSigns = valueString?.startsWith(MINUS_SIGN);\n\n return MAX_DIGITS + (hasSeparator ? 1 : 0) + (hasSigns ? 1 : 0);\n };\n\n const getStep = () => Math.round(stepProp ?? 1);\n\n const changeValue = (\n event: ChangeEvent<HTMLInputElement> | null,\n newValue: number | null,\n ) => {\n const isNaNValue = Number.isNaN(newValue);\n const valueString = event?.target.value ?? newValue?.toString() ?? '';\n\n setValue(valueString);\n\n if (valueString === '' || !isNaNValue) {\n onChange?.(event, {\n value: isNaNValue ? null : newValue,\n });\n }\n };\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n const valueString = event.target.value;\n\n changeValue(event, parseNumber(valueString));\n };\n\n const handleIncrement = () => {\n const parsed = parseNumber(value);\n const nextValue = maskitoTransform(\n (Number.isNaN(parsed) ? min : parsed + getStep()).toString(),\n maskOptions,\n );\n\n changeValue(null, parseNumber(nextValue));\n };\n\n const handleDecrement = () => {\n const parsed = parseNumber(value);\n const nextValue = maskitoTransform(\n (Number.isNaN(parsed) ? max : parsed - getStep()).toString(),\n maskOptions,\n );\n\n changeValue(null, parseNumber(nextValue));\n };\n\n const handleFocus = (e: FocusEvent<HTMLInputElement>) => {\n onFocus?.(e);\n\n if (!disableUserInput) {\n setFocused(true);\n }\n };\n\n const handleBlur = (e: FocusEvent<HTMLInputElement>) => {\n onBlur?.(e);\n setFocused(false);\n };\n\n return (\n <Input\n maxLength={getMaxLength(value)}\n {...restProps}\n // В iOS в цифровой клавиатуре невозможно ввести минус.\n inputMode={min < 0 && os.isIOS() ? 'text' : 'decimal'}\n ref={mergeRefs([ref, maskRef])}\n value={value}\n onInput={handleChange}\n dataTestId={dataTestId}\n colors={colors}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n size={size}\n disableUserInput={disableUserInput}\n clear={clearProp && /\\d/.test(value)}\n rightAddons={\n withStepper ? (\n <React.Fragment>\n {rightAddons}\n <Steppers\n colors={colors}\n dataTestId={dataTestId}\n disabled={disabled}\n focused={focused}\n value={parseNumber(value)}\n min={min}\n max={max}\n onIncrement={handleIncrement}\n onDecrement={handleDecrement}\n size={size}\n />\n </React.Fragment>\n ) : (\n rightAddons\n )\n }\n />\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;;;IAyFa,WAAW,GAAG,UAAU,CACjC,UACI,EAqBC,EACD,GAAG,EAAA;AArBC,IAAA,IAAO,SAAS,GAAA,EAAA,CAAA,KAAA,CAAA,CAChB,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,E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G,CAAC,CAAC;QACX,UAAU,CAAC,KAAK,CAAC;AACrB,KAAC;IAED,QACI,KAAC,CAAA,aAAA,CAAA,KAAK,EACF,QAAA,CAAA,EAAA,SAAS,EAAE,YAAY,CAAC,KAAK,CAAC,EAAA,EAC1B,SAAS,EAAA;;AAEb,QAAA,SAAS,EAAE,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,GAAG,MAAM,GAAG,SAAS,EACrD,GAAG,EAAE,SAAS,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,EAC9B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,YAAY,EACrB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,IAAI,EACV,gBAAgB,EAAE,gBAAgB,EAClC,KAAK,EAAE,SAAS,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EACpC,WAAW,EACP,WAAW,IACP,KAAC,CAAA,aAAA,CAAA,KAAK,CAAC,QAAQ,EAAA,IAAA;YACV,WAAW;YACZ,KAAC,CAAA,aAAA,CAAA,QAAQ,EACL,EAAA,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC,EACzB,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,eAAe,EAC5B,WAAW,EAAE,eAAe,EAC5B,IAAI,EAAE,IAAI,EAAA,CACZ,CACW,KAEjB,WAAW,CACd,EAEP,CAAA,CAAA;AAEV,CAAC;;;;"}
@@ -1 +1 @@
1
- export { NumberInput, NumberInputProps } from "./Component";
1
+ export { NumberInput, NumberInputProps } from './Component';
@@ -1 +1,2 @@
1
1
  export { NumberInput } from './Component.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,6 +1,6 @@
1
1
  import { FC } from 'react';
2
- import { InputProps } from "@alfalab/core-components-input";
3
- type SteppersProps = {
2
+ import { InputProps } from '@alfalab/core-components-input';
3
+ export declare type SteppersProps = {
4
4
  value: number;
5
5
  min: number;
6
6
  max: number;
@@ -13,5 +13,4 @@ type SteppersProps = {
13
13
  colors: 'default' | 'inverted';
14
14
  size: InputProps['size'];
15
15
  };
16
- declare const Steppers: FC<SteppersProps>;
17
- export { SteppersProps, Steppers };
16
+ export declare const Steppers: FC<SteppersProps>;
@@ -6,15 +6,9 @@ import { MinusMIcon } from '@alfalab/icons-glyph/MinusMIcon';
6
6
  import { MinusSIcon } from '@alfalab/icons-glyph/MinusSIcon';
7
7
  import { PlusMediumMIcon } from '@alfalab/icons-glyph/PlusMediumMIcon';
8
8
  import { PlusSIcon } from '@alfalab/icons-glyph/PlusSIcon';
9
-
10
- var defaultColors = {"separator":"number-input__separator_1eu4v","steppers":"number-input__steppers_1eu4v","steppersFocused":"number-input__steppersFocused_1eu4v","steppersDisabled":"number-input__steppersDisabled_1eu4v"};
11
- require('./default.css')
12
-
13
- var styles = {"component":"number-input__component_1o6yd","separator":"number-input__separator_1o6yd","button":"number-input__button_1o6yd","size-40":"number-input__size-40_1o6yd","size-48":"number-input__size-48_1o6yd","size-56":"number-input__size-56_1o6yd"};
14
- require('./index.css')
15
-
16
- var invertedColors = {"separator":"number-input__separator_hvj5v","steppers":"number-input__steppers_hvj5v","steppersFocused":"number-input__steppersFocused_hvj5v","steppersDisabled":"number-input__steppersDisabled_hvj5v"};
17
- require('./inverted.css')
9
+ import defaultColors from './default.module.css.js';
10
+ import styles from './index.module.css.js';
11
+ import invertedColors from './inverted.module.css.js';
18
12
 
19
13
  var colorStyles = {
20
14
  default: defaultColors,
@@ -52,3 +46,4 @@ var Steppers = function (_a) {
52
46
  Steppers.displayName = 'Steppers';
53
47
 
54
48
  export { Steppers };
49
+ //# sourceMappingURL=Component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Component.js","sources":["../../../src/components/steppers/Component.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport cn from 'classnames';\n\nimport { IconButton } from '@alfalab/core-components-icon-button';\nimport { InputProps } from '@alfalab/core-components-input';\nimport { getDataTestId } from '@alfalab/core-components-shared';\nimport { MinusMIcon } from '@alfalab/icons-glyph/MinusMIcon';\nimport { MinusSIcon } from '@alfalab/icons-glyph/MinusSIcon';\nimport { PlusMediumMIcon } from '@alfalab/icons-glyph/PlusMediumMIcon';\nimport { PlusSIcon } from '@alfalab/icons-glyph/PlusSIcon';\n\nimport defaultColors from './default.module.css';\nimport styles from './index.module.css';\nimport invertedColors from './inverted.module.css';\n\nexport type SteppersProps = {\n value: number;\n min: number;\n max: number;\n className?: string;\n disabled?: boolean;\n focused?: boolean;\n onIncrement: () => void;\n onDecrement: () => void;\n dataTestId?: string;\n colors: 'default' | 'inverted';\n size: InputProps['size'];\n};\n\nconst colorStyles = {\n default: defaultColors,\n inverted: invertedColors,\n};\n\nfunction preventDefault(e: React.MouseEvent<HTMLElement>) {\n e.preventDefault();\n}\n\nconst SIZE_TO_CLASSNAME_MAP = {\n s: 'size-48',\n m: 'size-56',\n l: 'size-64',\n xl: 'size-72',\n 40: 'size-40',\n 48: 'size-48',\n 56: 'size-56',\n 64: 'size-64',\n 72: 'size-72',\n};\n\nexport const Steppers: FC<SteppersProps> = ({\n className,\n onIncrement,\n onDecrement,\n value,\n min,\n max,\n disabled,\n focused,\n dataTestId,\n colors,\n size = 48,\n}) => {\n const decButtonDisabled = disabled || value <= min;\n const incButtonDisabled = disabled || value >= max;\n\n const MinusIconComponent = size === 40 ? MinusSIcon : MinusMIcon;\n const PlusIconComponent = size === 40 ? PlusSIcon : PlusMediumMIcon;\n\n return (\n <div\n className={cn(\n styles.component,\n colorStyles[colors].steppers,\n styles[SIZE_TO_CLASSNAME_MAP[size]],\n className,\n {\n [colorStyles[colors].steppersFocused]: focused,\n [colorStyles[colors].steppersDisabled]: disabled,\n },\n )}\n >\n <IconButton\n colors={colors}\n disabled={decButtonDisabled}\n className={styles.button}\n icon={<MinusIconComponent />}\n aria-label='уменьшить'\n onMouseDown={preventDefault}\n onClick={onDecrement}\n dataTestId={getDataTestId(dataTestId, 'decrement-button')}\n view='secondary'\n />\n <div className={cn(styles.separator, colorStyles[colors].separator)} />\n <IconButton\n colors={colors}\n disabled={incButtonDisabled}\n className={styles.button}\n icon={<PlusIconComponent />}\n aria-label='увеличить'\n onMouseDown={preventDefault}\n onClick={onIncrement}\n dataTestId={getDataTestId(dataTestId, 'increment-button')}\n view='secondary'\n />\n </div>\n );\n};\n\nSteppers.displayName = 'Steppers';\n"],"names":[],"mappings":";;;;;;;;;;;;AA6BA,IAAM,WAAW,GAAG;AAChB,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,QAAQ,EAAE,cAAc;CAC3B;AAED,SAAS,cAAc,CAAC,CAAgC,EAAA;IACpD,CAAC,CAAC,cAAc,EAAE;AACtB;AAEA,IAAM,qBAAqB,GAAG;AAC1B,IAAA,CAAC,EAAE,SAAS;AACZ,IAAA,CAAC,EAAE,SAAS;AACZ,IAAA,CAAC,EAAE,SAAS;AACZ,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;AACb,IAAA,EAAE,EAAE,SAAS;CAChB;AAEM,IAAM,QAAQ,GAAsB,UAAC,EAY3C,EAAA;;AAXG,IAAA,IAAA,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,KAAK,WAAA,EACL,GAAG,GAAA,EAAA,CAAA,GAAA,EACH,GAAG,GAAA,EAAA,CAAA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BAAkB,CAAC,EACzD,IAAI,EAAC,WAAW,EAClB,CAAA;AACF,QAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,EAAI,CAAA;QACvE,KAAC,CAAA,aAAA,CAAA,UAAU,IACP,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,iBAAiB,EAC3B,SAAS,EAAE,MAAM,CAAC,MAAM,EACxB,IAAI,EAAE,KAAA,CAAA,aAAA,CAAC,iBAAiB,EAAA,IAAA,CAAG,EAChB,YAAA,EAAA,wDAAW,EACtB,WAAW,EAAE,cAAc,EAC3B,OAAO,EAAE,WAAW,EACpB,UAAU,EAAE,aAAa,CAAC,UAAU,EAAE,kBAAkB,CAAC,EACzD,IAAI,EAAC,WAAW,EAAA,CAClB,CACA;AAEd;AAEA,QAAQ,CAAC,WAAW,GAAG,UAAU;;;;"}
@@ -1,34 +1,12 @@
1
- /* hash: 1cjw1 */
2
- :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 */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* 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 {
1
+ :root {
4
2
  --color-light-neutral-translucent-0: #fff;
5
3
  --color-light-neutral-translucent-200: rgba(30, 43, 68, 0.08);
6
- --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 */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* 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 { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
8
- } :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 */
9
- } :root {
10
-
11
- /* Hard */
12
-
13
- /* Up */
14
-
15
- /* Hard up */
16
- } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
17
-
18
- /* новые значения, используйте их */
19
- } :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 */
20
-
21
- /* новые значения, используйте их */
22
-
23
- /* no-unit может приводить к проблемам в calc (#1559) */
24
- /* stylelint-disable-next-line length-zero-no-unit */
25
- } :root {
26
- } /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ :root {
27
- } /* сбрасывает синюю подсветку при нажатии */ .number-input__separator_1eu4v {
4
+ --color-light-neutral-translucent-300: rgba(15, 25, 55, 0.1);
5
+ } .number-input__separator_tiyq6 {
28
6
  background-color: var(--color-light-neutral-translucent-300);
29
- } .number-input__steppers_1eu4v {
7
+ } .number-input__steppers_tiyq6 {
30
8
  background-color: var(--color-light-neutral-translucent-0);
31
- } .number-input__steppersFocused_1eu4v,
32
- .number-input__steppersDisabled_1eu4v {
9
+ } .number-input__steppersFocused_tiyq6,
10
+ .number-input__steppersDisabled_tiyq6 {
33
11
  background-color: var(--color-light-neutral-translucent-200);
34
12
  }
@@ -0,0 +1,6 @@
1
+ import './default.css';
2
+
3
+ var defaultColors = {"separator":"number-input__separator_tiyq6","steppers":"number-input__steppers_tiyq6","steppersFocused":"number-input__steppersFocused_tiyq6","steppersDisabled":"number-input__steppersDisabled_tiyq6"};
4
+
5
+ export { defaultColors as default };
6
+ //# sourceMappingURL=default.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default.module.css.js","sources":["../../src/components/steppers/default.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.separator {\n background-color: var(--color-light-neutral-translucent-300);\n}\n\n.steppers {\n background-color: var(--color-light-neutral-translucent-0);\n}\n\n.steppersFocused,\n.steppersDisabled {\n background-color: var(--color-light-neutral-translucent-200);\n}\n"],"names":[],"mappings":";;AAEgB,oBAAe,CAAC,WAAW,CAAC,+BAA+B,CAAC,UAAU,CAAC,8BAA8B,CAAC,iBAAiB,CAAC,qCAAqC,CAAC,kBAAkB,CAAC,sCAAsC,CAAC;;;;"}