@alfalab/core-components-number-input 2.1.2 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Component.responsive.js +0 -10
- package/components/number-input/Component.js +3 -6
- package/components/number-input/default.css +4 -4
- package/components/number-input/index.css +3 -3
- package/components/number-input/index.js +0 -12
- package/components/number-input/inverted.css +4 -4
- package/components/steppers/Component.js +3 -3
- package/components/steppers/default.css +2 -2
- package/components/steppers/index.css +4 -4
- package/components/steppers/index.js +0 -6
- package/components/steppers/inverted.css +2 -2
- package/cssm/Component.responsive.js +0 -16
- package/cssm/components/number-input/Component.js +0 -6
- package/cssm/components/number-input/index.js +0 -18
- package/cssm/components/steppers/index.js +0 -9
- package/cssm/desktop/Component.desktop.js +0 -16
- package/cssm/desktop/index.js +0 -20
- package/cssm/index.js +0 -21
- package/cssm/mobile/Component.mobile.js +0 -16
- package/cssm/mobile/index.js +0 -20
- package/cssm/shared/index.d.ts +1 -0
- package/cssm/shared/index.js +9 -0
- package/cssm/utils.d.ts +12 -1
- package/cssm/utils.js +14 -0
- package/desktop/Component.desktop.js +0 -10
- package/desktop/index.js +0 -14
- package/esm/Component.responsive.js +0 -10
- package/esm/components/number-input/Component.js +3 -6
- package/esm/components/number-input/default.css +4 -4
- package/esm/components/number-input/index.css +3 -3
- package/esm/components/number-input/index.js +0 -12
- package/esm/components/number-input/inverted.css +4 -4
- package/esm/components/steppers/Component.js +3 -3
- package/esm/components/steppers/default.css +2 -2
- package/esm/components/steppers/index.css +4 -4
- package/esm/components/steppers/index.js +0 -6
- package/esm/components/steppers/inverted.css +2 -2
- package/esm/desktop/Component.desktop.js +0 -10
- package/esm/desktop/index.js +0 -14
- package/esm/index.js +0 -15
- package/esm/mobile/Component.mobile.js +0 -10
- package/esm/mobile/index.js +0 -14
- package/esm/shared/index.d.ts +1 -0
- package/esm/shared/index.js +1 -0
- package/esm/utils.d.ts +12 -1
- package/esm/utils.js +15 -2
- package/index.js +0 -15
- package/mobile/Component.mobile.js +0 -10
- package/mobile/index.js +0 -14
- package/modern/Component.responsive.js +0 -10
- package/modern/components/number-input/Component.js +3 -6
- package/modern/components/number-input/default.css +4 -4
- package/modern/components/number-input/index.css +3 -3
- package/modern/components/number-input/index.js +0 -11
- package/modern/components/number-input/inverted.css +4 -4
- package/modern/components/steppers/Component.js +3 -3
- package/modern/components/steppers/default.css +2 -2
- package/modern/components/steppers/index.css +4 -4
- package/modern/components/steppers/index.js +0 -6
- package/modern/components/steppers/inverted.css +2 -2
- package/modern/desktop/Component.desktop.js +0 -10
- package/modern/desktop/index.js +0 -13
- package/modern/index.js +0 -14
- package/modern/mobile/Component.mobile.js +0 -10
- package/modern/mobile/index.js +0 -13
- package/modern/shared/index.d.ts +1 -0
- package/modern/shared/index.js +1 -0
- package/modern/utils.d.ts +12 -1
- package/modern/utils.js +15 -2
- package/package.json +3 -3
- package/shared/index.d.ts +1 -0
- package/shared/index.js +9 -0
- package/shared/package.json +3 -0
- package/src/shared/index.ts +1 -0
- package/src/shared/package.json +3 -0
- package/src/utils.ts +15 -1
- package/utils.d.ts +12 -1
- package/utils.js +14 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: lu9v4 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-0-inverted: rgba(214, 214, 229, 0.07);
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .number-
|
|
19
|
+
} .number-input__steppers_fg0pj {
|
|
20
20
|
background-color: var(--color-light-neutral-translucent-0-inverted);
|
|
21
|
-
} .number-
|
|
22
|
-
.number-
|
|
21
|
+
} .number-input__steppersFocused_fg0pj,
|
|
22
|
+
.number-input__steppersDisabled_fg0pj {
|
|
23
23
|
background-color: var(--color-light-neutral-translucent-300-inverted);
|
|
24
24
|
}
|
|
@@ -5,13 +5,13 @@ import { getDataTestId } from '@alfalab/core-components-shared/esm';
|
|
|
5
5
|
import { MinusMIcon } from '@alfalab/icons-glyph/MinusMIcon';
|
|
6
6
|
import { PlusMediumMIcon } from '@alfalab/icons-glyph/PlusMediumMIcon';
|
|
7
7
|
|
|
8
|
-
var defaultColors = {"separator":"number-
|
|
8
|
+
var defaultColors = {"separator":"number-input__separator_1jhyf"};
|
|
9
9
|
require('./default.css')
|
|
10
10
|
|
|
11
|
-
var styles = {"component":"number-
|
|
11
|
+
var styles = {"component":"number-input__component_1qhsu","separator":"number-input__separator_1qhsu","button":"number-input__button_1qhsu"};
|
|
12
12
|
require('./index.css')
|
|
13
13
|
|
|
14
|
-
var invertedColors = {"separator":"number-
|
|
14
|
+
var invertedColors = {"separator":"number-input__separator_1mm20"};
|
|
15
15
|
require('./inverted.css')
|
|
16
16
|
|
|
17
17
|
var colorStyles = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 3m65w */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-300: rgba(15, 25, 55, 0.1); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .number-
|
|
18
|
+
} .number-input__separator_1jhyf {
|
|
19
19
|
background-color: var(--color-light-neutral-translucent-300);
|
|
20
20
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1xsr7 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
} :root {
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
|
-
} .number-
|
|
17
|
+
} .number-input__component_1qhsu {
|
|
18
18
|
display: flex;
|
|
19
19
|
flex-flow: row nowrap;
|
|
20
20
|
align-items: center;
|
|
21
21
|
border-radius: 5px;
|
|
22
22
|
transition: background-color 0.2s ease;
|
|
23
23
|
overflow: visible;
|
|
24
|
-
} .number-
|
|
24
|
+
} .number-input__separator_1qhsu {
|
|
25
25
|
height: 18px;
|
|
26
26
|
width: 1px;
|
|
27
|
-
} .number-
|
|
27
|
+
} .number-input__button_1qhsu {
|
|
28
28
|
width: 40px;
|
|
29
29
|
height: 40px;
|
|
30
30
|
}
|
|
@@ -1,7 +1 @@
|
|
|
1
1
|
export { Steppers } from './Component.js';
|
|
2
|
-
import 'react';
|
|
3
|
-
import 'classnames';
|
|
4
|
-
import '@alfalab/core-components-icon-button/esm';
|
|
5
|
-
import '@alfalab/core-components-shared/esm';
|
|
6
|
-
import '@alfalab/icons-glyph/MinusMIcon';
|
|
7
|
-
import '@alfalab/icons-glyph/PlusMediumMIcon';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 7ukdf */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-300-inverted: rgba(222, 222, 238, 0.13); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .number-
|
|
18
|
+
} .number-input__separator_1mm20 {
|
|
19
19
|
background-color: var(--color-light-neutral-translucent-300-inverted);
|
|
20
20
|
}
|
|
@@ -2,16 +2,6 @@ import { __assign } from 'tslib';
|
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
3
|
import { InputDesktop } from '@alfalab/core-components-input/esm/desktop';
|
|
4
4
|
import { NumberInput } from '../components/number-input/Component.js';
|
|
5
|
-
import 'react-merge-refs';
|
|
6
|
-
import '@maskito/core';
|
|
7
|
-
import '@maskito/react';
|
|
8
|
-
import 'classnames';
|
|
9
|
-
import '@alfalab/core-components-shared/esm';
|
|
10
|
-
import '../utils.js';
|
|
11
|
-
import '../components/steppers/Component.js';
|
|
12
|
-
import '@alfalab/core-components-icon-button/esm';
|
|
13
|
-
import '@alfalab/icons-glyph/MinusMIcon';
|
|
14
|
-
import '@alfalab/icons-glyph/PlusMediumMIcon';
|
|
15
5
|
|
|
16
6
|
var NumberInputDesktop = forwardRef(function (props, ref) { return React.createElement(NumberInput, __assign({}, props, { Input: InputDesktop, ref: ref, view: 'desktop' })); });
|
|
17
7
|
|
package/esm/desktop/index.js
CHANGED
|
@@ -1,15 +1 @@
|
|
|
1
1
|
export { NumberInputDesktop } from './Component.desktop.js';
|
|
2
|
-
import 'tslib';
|
|
3
|
-
import 'react';
|
|
4
|
-
import '@alfalab/core-components-input/esm/desktop';
|
|
5
|
-
import '../components/number-input/Component.js';
|
|
6
|
-
import 'react-merge-refs';
|
|
7
|
-
import '@maskito/core';
|
|
8
|
-
import '@maskito/react';
|
|
9
|
-
import 'classnames';
|
|
10
|
-
import '@alfalab/core-components-shared/esm';
|
|
11
|
-
import '../utils.js';
|
|
12
|
-
import '../components/steppers/Component.js';
|
|
13
|
-
import '@alfalab/core-components-icon-button/esm';
|
|
14
|
-
import '@alfalab/icons-glyph/MinusMIcon';
|
|
15
|
-
import '@alfalab/icons-glyph/PlusMediumMIcon';
|
package/esm/index.js
CHANGED
|
@@ -1,16 +1 @@
|
|
|
1
1
|
export { NumberInputResponsive as NumberInput } from './Component.responsive.js';
|
|
2
|
-
import 'tslib';
|
|
3
|
-
import 'react';
|
|
4
|
-
import '@alfalab/core-components-input/esm';
|
|
5
|
-
import '@alfalab/core-components-mq/esm';
|
|
6
|
-
import './components/number-input/Component.js';
|
|
7
|
-
import 'react-merge-refs';
|
|
8
|
-
import '@maskito/core';
|
|
9
|
-
import '@maskito/react';
|
|
10
|
-
import 'classnames';
|
|
11
|
-
import '@alfalab/core-components-shared/esm';
|
|
12
|
-
import './utils.js';
|
|
13
|
-
import './components/steppers/Component.js';
|
|
14
|
-
import '@alfalab/core-components-icon-button/esm';
|
|
15
|
-
import '@alfalab/icons-glyph/MinusMIcon';
|
|
16
|
-
import '@alfalab/icons-glyph/PlusMediumMIcon';
|
|
@@ -2,16 +2,6 @@ import { __assign } from 'tslib';
|
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
3
|
import { InputMobile } from '@alfalab/core-components-input/esm/mobile';
|
|
4
4
|
import { NumberInput } from '../components/number-input/Component.js';
|
|
5
|
-
import 'react-merge-refs';
|
|
6
|
-
import '@maskito/core';
|
|
7
|
-
import '@maskito/react';
|
|
8
|
-
import 'classnames';
|
|
9
|
-
import '@alfalab/core-components-shared/esm';
|
|
10
|
-
import '../utils.js';
|
|
11
|
-
import '../components/steppers/Component.js';
|
|
12
|
-
import '@alfalab/core-components-icon-button/esm';
|
|
13
|
-
import '@alfalab/icons-glyph/MinusMIcon';
|
|
14
|
-
import '@alfalab/icons-glyph/PlusMediumMIcon';
|
|
15
5
|
|
|
16
6
|
var NumberInputMobile = forwardRef(function (props, ref) { return React.createElement(NumberInput, __assign({}, props, { Input: InputMobile, ref: ref, view: 'mobile' })); });
|
|
17
7
|
|
package/esm/mobile/index.js
CHANGED
|
@@ -1,15 +1 @@
|
|
|
1
1
|
export { NumberInputMobile } from './Component.mobile.js';
|
|
2
|
-
import 'tslib';
|
|
3
|
-
import 'react';
|
|
4
|
-
import '@alfalab/core-components-input/esm/mobile';
|
|
5
|
-
import '../components/number-input/Component.js';
|
|
6
|
-
import 'react-merge-refs';
|
|
7
|
-
import '@maskito/core';
|
|
8
|
-
import '@maskito/react';
|
|
9
|
-
import 'classnames';
|
|
10
|
-
import '@alfalab/core-components-shared/esm';
|
|
11
|
-
import '../utils.js';
|
|
12
|
-
import '../components/steppers/Component.js';
|
|
13
|
-
import '@alfalab/core-components-icon-button/esm';
|
|
14
|
-
import '@alfalab/icons-glyph/MinusMIcon';
|
|
15
|
-
import '@alfalab/icons-glyph/PlusMediumMIcon';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getNumberInputTestIds } from "../utils";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getNumberInputTestIds } from '../utils.js';
|
package/esm/utils.d.ts
CHANGED
|
@@ -20,4 +20,15 @@ declare function createMinMaxPlugin({ min, max }: {
|
|
|
20
20
|
max: number;
|
|
21
21
|
}): MaskitoPlugin;
|
|
22
22
|
declare function createNotEmptyPartsPlugin(separator: string): MaskitoPlugin;
|
|
23
|
-
|
|
23
|
+
declare function getNumberInputTestIds(dataTestId: string): {
|
|
24
|
+
input: string;
|
|
25
|
+
inputWrapper: string;
|
|
26
|
+
inputWrapperInner: string;
|
|
27
|
+
leftAddons: string;
|
|
28
|
+
rightAddons: string;
|
|
29
|
+
error: string;
|
|
30
|
+
hint: string;
|
|
31
|
+
decrementButton: string;
|
|
32
|
+
incrementButton: string;
|
|
33
|
+
};
|
|
34
|
+
export { MINUS_SIGN, SEPARATORS, MAX_SAFE_INTEGER, MIN_SAFE_INTEGER, MAX_DIGITS, parseNumber, stringifyNumberWithoutExp, createMaskOptions, createMinMaxPlugin, createNotEmptyPartsPlugin, getNumberInputTestIds };
|
package/esm/utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { maskitoTransform } from '@maskito/core';
|
|
2
|
-
import { fnUtils } from '@alfalab/core-components-shared/esm';
|
|
2
|
+
import { getDataTestId, fnUtils } from '@alfalab/core-components-shared/esm';
|
|
3
3
|
|
|
4
4
|
/* eslint-disable no-param-reassign */
|
|
5
5
|
var MINUS_SIGN = '-';
|
|
@@ -242,5 +242,18 @@ function createNotEmptyPartsPlugin(separator) {
|
|
|
242
242
|
return function () { return element.removeEventListener('blur', listener, evListenerOptions); };
|
|
243
243
|
};
|
|
244
244
|
}
|
|
245
|
+
function getNumberInputTestIds(dataTestId) {
|
|
246
|
+
return {
|
|
247
|
+
input: dataTestId,
|
|
248
|
+
inputWrapper: getDataTestId(dataTestId, 'form-control'),
|
|
249
|
+
inputWrapperInner: getDataTestId(dataTestId, 'form-control-inner'),
|
|
250
|
+
leftAddons: getDataTestId(dataTestId, 'form-control-left-addons'),
|
|
251
|
+
rightAddons: getDataTestId(dataTestId, 'form-control-right-addons'),
|
|
252
|
+
error: getDataTestId(dataTestId, 'form-control-error-message'),
|
|
253
|
+
hint: getDataTestId(dataTestId, 'form-control-hint'),
|
|
254
|
+
decrementButton: getDataTestId(dataTestId, 'decrement-button'),
|
|
255
|
+
incrementButton: getDataTestId(dataTestId, 'increment-button'),
|
|
256
|
+
};
|
|
257
|
+
}
|
|
245
258
|
|
|
246
|
-
export { MAX_DIGITS, MAX_SAFE_INTEGER, MINUS_SIGN, MIN_SAFE_INTEGER, SEPARATORS, createMaskOptions, createMinMaxPlugin, createNotEmptyPartsPlugin, parseNumber, stringifyNumberWithoutExp };
|
|
259
|
+
export { MAX_DIGITS, MAX_SAFE_INTEGER, MINUS_SIGN, MIN_SAFE_INTEGER, SEPARATORS, createMaskOptions, createMinMaxPlugin, createNotEmptyPartsPlugin, getNumberInputTestIds, parseNumber, stringifyNumberWithoutExp };
|
package/index.js
CHANGED
|
@@ -3,21 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var Component_responsive = require('./Component.responsive.js');
|
|
6
|
-
require('tslib');
|
|
7
|
-
require('react');
|
|
8
|
-
require('@alfalab/core-components-input');
|
|
9
|
-
require('@alfalab/core-components-mq');
|
|
10
|
-
require('./components/number-input/Component.js');
|
|
11
|
-
require('react-merge-refs');
|
|
12
|
-
require('@maskito/core');
|
|
13
|
-
require('@maskito/react');
|
|
14
|
-
require('classnames');
|
|
15
|
-
require('@alfalab/core-components-shared');
|
|
16
|
-
require('./utils.js');
|
|
17
|
-
require('./components/steppers/Component.js');
|
|
18
|
-
require('@alfalab/core-components-icon-button');
|
|
19
|
-
require('@alfalab/icons-glyph/MinusMIcon');
|
|
20
|
-
require('@alfalab/icons-glyph/PlusMediumMIcon');
|
|
21
6
|
|
|
22
7
|
|
|
23
8
|
|
|
@@ -6,16 +6,6 @@ var tslib = require('tslib');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var mobile = require('@alfalab/core-components-input/mobile');
|
|
8
8
|
var components_numberInput_Component = require('../components/number-input/Component.js');
|
|
9
|
-
require('react-merge-refs');
|
|
10
|
-
require('@maskito/core');
|
|
11
|
-
require('@maskito/react');
|
|
12
|
-
require('classnames');
|
|
13
|
-
require('@alfalab/core-components-shared');
|
|
14
|
-
require('../utils.js');
|
|
15
|
-
require('../components/steppers/Component.js');
|
|
16
|
-
require('@alfalab/core-components-icon-button');
|
|
17
|
-
require('@alfalab/icons-glyph/MinusMIcon');
|
|
18
|
-
require('@alfalab/icons-glyph/PlusMediumMIcon');
|
|
19
9
|
|
|
20
10
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
21
11
|
|
package/mobile/index.js
CHANGED
|
@@ -3,20 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var mobile_Component_mobile = require('./Component.mobile.js');
|
|
6
|
-
require('tslib');
|
|
7
|
-
require('react');
|
|
8
|
-
require('@alfalab/core-components-input/mobile');
|
|
9
|
-
require('../components/number-input/Component.js');
|
|
10
|
-
require('react-merge-refs');
|
|
11
|
-
require('@maskito/core');
|
|
12
|
-
require('@maskito/react');
|
|
13
|
-
require('classnames');
|
|
14
|
-
require('@alfalab/core-components-shared');
|
|
15
|
-
require('../utils.js');
|
|
16
|
-
require('../components/steppers/Component.js');
|
|
17
|
-
require('@alfalab/core-components-icon-button');
|
|
18
|
-
require('@alfalab/icons-glyph/MinusMIcon');
|
|
19
|
-
require('@alfalab/icons-glyph/PlusMediumMIcon');
|
|
20
6
|
|
|
21
7
|
|
|
22
8
|
|
|
@@ -2,16 +2,6 @@ import React, { forwardRef } from 'react';
|
|
|
2
2
|
import { Input } from '@alfalab/core-components-input/modern';
|
|
3
3
|
import { useMatchMedia } from '@alfalab/core-components-mq/modern';
|
|
4
4
|
import { NumberInput } from './components/number-input/Component.js';
|
|
5
|
-
import 'react-merge-refs';
|
|
6
|
-
import '@maskito/core';
|
|
7
|
-
import '@maskito/react';
|
|
8
|
-
import 'classnames';
|
|
9
|
-
import '@alfalab/core-components-shared/modern';
|
|
10
|
-
import './utils.js';
|
|
11
|
-
import './components/steppers/Component.js';
|
|
12
|
-
import '@alfalab/core-components-icon-button/modern';
|
|
13
|
-
import '@alfalab/icons-glyph/MinusMIcon';
|
|
14
|
-
import '@alfalab/icons-glyph/PlusMediumMIcon';
|
|
15
5
|
|
|
16
6
|
const NumberInputResponsive = forwardRef(({ breakpoint = 1024, defaultMatchMediaValue, ...restProps }, ref) => {
|
|
17
7
|
const [isDesktop] = useMatchMedia(`(min-width: ${breakpoint}px)`, defaultMatchMediaValue);
|
|
@@ -6,17 +6,14 @@ import cn from 'classnames';
|
|
|
6
6
|
import { fnUtils, os } from '@alfalab/core-components-shared/modern';
|
|
7
7
|
import { createMaskOptions, parseNumber, stringifyNumberWithoutExp, MAX_DIGITS, MIN_SAFE_INTEGER, MAX_SAFE_INTEGER, MINUS_SIGN } from '../../utils.js';
|
|
8
8
|
import { Steppers } from '../steppers/Component.js';
|
|
9
|
-
import '@alfalab/core-components-icon-button/modern';
|
|
10
|
-
import '@alfalab/icons-glyph/MinusMIcon';
|
|
11
|
-
import '@alfalab/icons-glyph/PlusMediumMIcon';
|
|
12
9
|
|
|
13
|
-
const defaultColors = {"steppers":"number-
|
|
10
|
+
const defaultColors = {"steppers":"number-input__steppers_52k5h","steppersFocused":"number-input__steppersFocused_52k5h","steppersDisabled":"number-input__steppersDisabled_52k5h"};
|
|
14
11
|
require('./default.css')
|
|
15
12
|
|
|
16
|
-
const styles = {"s":"number-
|
|
13
|
+
const styles = {"s":"number-input__s_64fim","m":"number-input__m_64fim"};
|
|
17
14
|
require('./index.css')
|
|
18
15
|
|
|
19
|
-
const invertedColors = {"steppers":"number-
|
|
16
|
+
const invertedColors = {"steppers":"number-input__steppers_fg0pj","steppersFocused":"number-input__steppersFocused_fg0pj","steppersDisabled":"number-input__steppersDisabled_fg0pj"};
|
|
20
17
|
require('./inverted.css')
|
|
21
18
|
|
|
22
19
|
const colorStyles = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: lcz7u */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-0: #fff;
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .number-
|
|
19
|
+
} .number-input__steppers_52k5h {
|
|
20
20
|
background-color: var(--color-light-neutral-translucent-0);
|
|
21
|
-
} .number-
|
|
22
|
-
.number-
|
|
21
|
+
} .number-input__steppersFocused_52k5h,
|
|
22
|
+
.number-input__steppersDisabled_52k5h {
|
|
23
23
|
background-color: var(--color-light-neutral-translucent-200);
|
|
24
24
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 4sl5h */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
--gap-xs-neg: -8px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .number-
|
|
19
|
+
} .number-input__s_64fim {
|
|
20
20
|
margin-right: var(--gap-xs-neg);
|
|
21
|
-
} .number-
|
|
21
|
+
} .number-input__m_64fim {
|
|
22
22
|
margin-right: var(--gap-2xs-neg);
|
|
23
23
|
}
|
|
@@ -1,12 +1 @@
|
|
|
1
1
|
export { NumberInput } from './Component.js';
|
|
2
|
-
import 'react';
|
|
3
|
-
import 'react-merge-refs';
|
|
4
|
-
import '@maskito/core';
|
|
5
|
-
import '@maskito/react';
|
|
6
|
-
import 'classnames';
|
|
7
|
-
import '@alfalab/core-components-shared/modern';
|
|
8
|
-
import '../../utils.js';
|
|
9
|
-
import '../steppers/Component.js';
|
|
10
|
-
import '@alfalab/core-components-icon-button/modern';
|
|
11
|
-
import '@alfalab/icons-glyph/MinusMIcon';
|
|
12
|
-
import '@alfalab/icons-glyph/PlusMediumMIcon';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: lu9v4 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-0-inverted: rgba(214, 214, 229, 0.07);
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .number-
|
|
19
|
+
} .number-input__steppers_fg0pj {
|
|
20
20
|
background-color: var(--color-light-neutral-translucent-0-inverted);
|
|
21
|
-
} .number-
|
|
22
|
-
.number-
|
|
21
|
+
} .number-input__steppersFocused_fg0pj,
|
|
22
|
+
.number-input__steppersDisabled_fg0pj {
|
|
23
23
|
background-color: var(--color-light-neutral-translucent-300-inverted);
|
|
24
24
|
}
|
|
@@ -5,13 +5,13 @@ import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
|
5
5
|
import { MinusMIcon } from '@alfalab/icons-glyph/MinusMIcon';
|
|
6
6
|
import { PlusMediumMIcon } from '@alfalab/icons-glyph/PlusMediumMIcon';
|
|
7
7
|
|
|
8
|
-
const defaultColors = {"separator":"number-
|
|
8
|
+
const defaultColors = {"separator":"number-input__separator_1jhyf"};
|
|
9
9
|
require('./default.css')
|
|
10
10
|
|
|
11
|
-
const styles = {"component":"number-
|
|
11
|
+
const styles = {"component":"number-input__component_1qhsu","separator":"number-input__separator_1qhsu","button":"number-input__button_1qhsu"};
|
|
12
12
|
require('./index.css')
|
|
13
13
|
|
|
14
|
-
const invertedColors = {"separator":"number-
|
|
14
|
+
const invertedColors = {"separator":"number-input__separator_1mm20"};
|
|
15
15
|
require('./inverted.css')
|
|
16
16
|
|
|
17
17
|
const colorStyles = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 3m65w */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-300: rgba(15, 25, 55, 0.1); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .number-
|
|
18
|
+
} .number-input__separator_1jhyf {
|
|
19
19
|
background-color: var(--color-light-neutral-translucent-300);
|
|
20
20
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1xsr7 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
} :root {
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
|
-
} .number-
|
|
17
|
+
} .number-input__component_1qhsu {
|
|
18
18
|
display: flex;
|
|
19
19
|
flex-flow: row nowrap;
|
|
20
20
|
align-items: center;
|
|
21
21
|
border-radius: 5px;
|
|
22
22
|
transition: background-color 0.2s ease;
|
|
23
23
|
overflow: visible;
|
|
24
|
-
} .number-
|
|
24
|
+
} .number-input__separator_1qhsu {
|
|
25
25
|
height: 18px;
|
|
26
26
|
width: 1px;
|
|
27
|
-
} .number-
|
|
27
|
+
} .number-input__button_1qhsu {
|
|
28
28
|
width: 40px;
|
|
29
29
|
height: 40px;
|
|
30
30
|
}
|
|
@@ -1,7 +1 @@
|
|
|
1
1
|
export { Steppers } from './Component.js';
|
|
2
|
-
import 'react';
|
|
3
|
-
import 'classnames';
|
|
4
|
-
import '@alfalab/core-components-icon-button/modern';
|
|
5
|
-
import '@alfalab/core-components-shared/modern';
|
|
6
|
-
import '@alfalab/icons-glyph/MinusMIcon';
|
|
7
|
-
import '@alfalab/icons-glyph/PlusMediumMIcon';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 7ukdf */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-300-inverted: rgba(222, 222, 238, 0.13); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .number-
|
|
18
|
+
} .number-input__separator_1mm20 {
|
|
19
19
|
background-color: var(--color-light-neutral-translucent-300-inverted);
|
|
20
20
|
}
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { InputDesktop } from '@alfalab/core-components-input/modern/desktop';
|
|
3
3
|
import { NumberInput } from '../components/number-input/Component.js';
|
|
4
|
-
import 'react-merge-refs';
|
|
5
|
-
import '@maskito/core';
|
|
6
|
-
import '@maskito/react';
|
|
7
|
-
import 'classnames';
|
|
8
|
-
import '@alfalab/core-components-shared/modern';
|
|
9
|
-
import '../utils.js';
|
|
10
|
-
import '../components/steppers/Component.js';
|
|
11
|
-
import '@alfalab/core-components-icon-button/modern';
|
|
12
|
-
import '@alfalab/icons-glyph/MinusMIcon';
|
|
13
|
-
import '@alfalab/icons-glyph/PlusMediumMIcon';
|
|
14
4
|
|
|
15
5
|
const NumberInputDesktop = forwardRef((props, ref) => React.createElement(NumberInput, { ...props, Input: InputDesktop, ref: ref, view: 'desktop' }));
|
|
16
6
|
|
package/modern/desktop/index.js
CHANGED
|
@@ -1,14 +1 @@
|
|
|
1
1
|
export { NumberInputDesktop } from './Component.desktop.js';
|
|
2
|
-
import 'react';
|
|
3
|
-
import '@alfalab/core-components-input/modern/desktop';
|
|
4
|
-
import '../components/number-input/Component.js';
|
|
5
|
-
import 'react-merge-refs';
|
|
6
|
-
import '@maskito/core';
|
|
7
|
-
import '@maskito/react';
|
|
8
|
-
import 'classnames';
|
|
9
|
-
import '@alfalab/core-components-shared/modern';
|
|
10
|
-
import '../utils.js';
|
|
11
|
-
import '../components/steppers/Component.js';
|
|
12
|
-
import '@alfalab/core-components-icon-button/modern';
|
|
13
|
-
import '@alfalab/icons-glyph/MinusMIcon';
|
|
14
|
-
import '@alfalab/icons-glyph/PlusMediumMIcon';
|
package/modern/index.js
CHANGED
|
@@ -1,15 +1 @@
|
|
|
1
1
|
export { NumberInputResponsive as NumberInput } from './Component.responsive.js';
|
|
2
|
-
import 'react';
|
|
3
|
-
import '@alfalab/core-components-input/modern';
|
|
4
|
-
import '@alfalab/core-components-mq/modern';
|
|
5
|
-
import './components/number-input/Component.js';
|
|
6
|
-
import 'react-merge-refs';
|
|
7
|
-
import '@maskito/core';
|
|
8
|
-
import '@maskito/react';
|
|
9
|
-
import 'classnames';
|
|
10
|
-
import '@alfalab/core-components-shared/modern';
|
|
11
|
-
import './utils.js';
|
|
12
|
-
import './components/steppers/Component.js';
|
|
13
|
-
import '@alfalab/core-components-icon-button/modern';
|
|
14
|
-
import '@alfalab/icons-glyph/MinusMIcon';
|
|
15
|
-
import '@alfalab/icons-glyph/PlusMediumMIcon';
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { InputMobile } from '@alfalab/core-components-input/modern/mobile';
|
|
3
3
|
import { NumberInput } from '../components/number-input/Component.js';
|
|
4
|
-
import 'react-merge-refs';
|
|
5
|
-
import '@maskito/core';
|
|
6
|
-
import '@maskito/react';
|
|
7
|
-
import 'classnames';
|
|
8
|
-
import '@alfalab/core-components-shared/modern';
|
|
9
|
-
import '../utils.js';
|
|
10
|
-
import '../components/steppers/Component.js';
|
|
11
|
-
import '@alfalab/core-components-icon-button/modern';
|
|
12
|
-
import '@alfalab/icons-glyph/MinusMIcon';
|
|
13
|
-
import '@alfalab/icons-glyph/PlusMediumMIcon';
|
|
14
4
|
|
|
15
5
|
const NumberInputMobile = forwardRef((props, ref) => React.createElement(NumberInput, { ...props, Input: InputMobile, ref: ref, view: 'mobile' }));
|
|
16
6
|
|
package/modern/mobile/index.js
CHANGED
|
@@ -1,14 +1 @@
|
|
|
1
1
|
export { NumberInputMobile } from './Component.mobile.js';
|
|
2
|
-
import 'react';
|
|
3
|
-
import '@alfalab/core-components-input/modern/mobile';
|
|
4
|
-
import '../components/number-input/Component.js';
|
|
5
|
-
import 'react-merge-refs';
|
|
6
|
-
import '@maskito/core';
|
|
7
|
-
import '@maskito/react';
|
|
8
|
-
import 'classnames';
|
|
9
|
-
import '@alfalab/core-components-shared/modern';
|
|
10
|
-
import '../utils.js';
|
|
11
|
-
import '../components/steppers/Component.js';
|
|
12
|
-
import '@alfalab/core-components-icon-button/modern';
|
|
13
|
-
import '@alfalab/icons-glyph/MinusMIcon';
|
|
14
|
-
import '@alfalab/icons-glyph/PlusMediumMIcon';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getNumberInputTestIds } from "../utils";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getNumberInputTestIds } from '../utils.js';
|
package/modern/utils.d.ts
CHANGED
|
@@ -20,4 +20,15 @@ declare function createMinMaxPlugin({ min, max }: {
|
|
|
20
20
|
max: number;
|
|
21
21
|
}): MaskitoPlugin;
|
|
22
22
|
declare function createNotEmptyPartsPlugin(separator: string): MaskitoPlugin;
|
|
23
|
-
|
|
23
|
+
declare function getNumberInputTestIds(dataTestId: string): {
|
|
24
|
+
input: string;
|
|
25
|
+
inputWrapper: string;
|
|
26
|
+
inputWrapperInner: string;
|
|
27
|
+
leftAddons: string;
|
|
28
|
+
rightAddons: string;
|
|
29
|
+
error: string;
|
|
30
|
+
hint: string;
|
|
31
|
+
decrementButton: string;
|
|
32
|
+
incrementButton: string;
|
|
33
|
+
};
|
|
34
|
+
export { MINUS_SIGN, SEPARATORS, MAX_SAFE_INTEGER, MIN_SAFE_INTEGER, MAX_DIGITS, parseNumber, stringifyNumberWithoutExp, createMaskOptions, createMinMaxPlugin, createNotEmptyPartsPlugin, getNumberInputTestIds };
|