@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.
- package/Component.responsive.d.ts +3 -5
- package/Component.responsive.js +3 -2
- package/Component.responsive.js.map +1 -0
- package/components/number-input/Component.d.ts +4 -7
- package/components/number-input/Component.js +3 -2
- package/components/number-input/Component.js.map +1 -0
- package/components/number-input/index.d.ts +1 -1
- package/components/number-input/index.js +3 -2
- package/components/number-input/index.js.map +1 -0
- package/components/steppers/Component.d.ts +3 -4
- package/components/steppers/Component.js +10 -15
- package/components/steppers/Component.js.map +1 -0
- package/components/steppers/default.css +6 -28
- package/components/steppers/default.module.css.js +8 -0
- package/components/steppers/default.module.css.js.map +1 -0
- package/components/steppers/index.css +9 -31
- package/components/steppers/index.d.ts +1 -1
- package/components/steppers/index.js +3 -2
- package/components/steppers/index.js.map +1 -0
- package/components/steppers/index.module.css.js +8 -0
- package/components/steppers/index.module.css.js.map +1 -0
- package/components/steppers/inverted.css +6 -28
- package/components/steppers/inverted.module.css.js +8 -0
- package/components/steppers/inverted.module.css.js.map +1 -0
- package/constants/min-max-safe-integer.d.ts +2 -3
- package/constants/min-max-safe-integer.js +1 -0
- package/constants/min-max-safe-integer.js.map +1 -0
- package/cssm/Component.responsive.d.ts +3 -5
- package/cssm/Component.responsive.js +6 -5
- package/cssm/Component.responsive.js.map +1 -0
- package/cssm/components/number-input/Component.d.ts +4 -7
- package/cssm/components/number-input/Component.js +7 -6
- package/cssm/components/number-input/Component.js.map +1 -0
- package/cssm/components/number-input/index.d.ts +1 -1
- package/cssm/components/number-input/index.js +3 -2
- package/cssm/components/number-input/index.js.map +1 -0
- package/cssm/components/steppers/Component.d.ts +3 -4
- package/cssm/components/steppers/Component.js +5 -4
- package/cssm/components/steppers/Component.js.map +1 -0
- package/cssm/components/steppers/default.module.css +3 -24
- package/cssm/components/steppers/index.d.ts +1 -1
- package/cssm/components/steppers/index.js +3 -2
- package/cssm/components/steppers/index.js.map +1 -0
- package/cssm/components/steppers/index.module.css +4 -25
- package/cssm/components/steppers/inverted.module.css +3 -24
- package/cssm/constants/min-max-safe-integer.d.ts +2 -3
- package/cssm/constants/min-max-safe-integer.js +1 -0
- package/cssm/constants/min-max-safe-integer.js.map +1 -0
- package/cssm/desktop/Component.desktop.d.ts +3 -5
- package/cssm/desktop/Component.desktop.js +3 -2
- package/cssm/desktop/Component.desktop.js.map +1 -0
- package/cssm/desktop/index.d.ts +1 -2
- package/cssm/desktop/index.js +3 -2
- package/cssm/desktop/index.js.map +1 -0
- package/cssm/index.d.ts +1 -2
- package/cssm/index.js +1 -0
- package/cssm/index.js.map +1 -0
- package/cssm/mobile/Component.mobile.d.ts +3 -5
- package/cssm/mobile/Component.mobile.js +3 -2
- package/cssm/mobile/Component.mobile.js.map +1 -0
- package/cssm/mobile/index.d.ts +1 -2
- package/cssm/mobile/index.js +3 -2
- package/cssm/mobile/index.js.map +1 -0
- package/cssm/shared/index.d.ts +3 -3
- package/cssm/shared/index.js +3 -2
- package/cssm/shared/index.js.map +1 -0
- package/cssm/utils.d.ts +10 -11
- package/cssm/utils.js +14 -13
- package/cssm/utils.js.map +1 -0
- package/desktop/Component.desktop.d.ts +3 -5
- package/desktop/Component.desktop.js +3 -2
- package/desktop/Component.desktop.js.map +1 -0
- package/desktop/index.d.ts +1 -2
- package/desktop/index.js +3 -2
- package/desktop/index.js.map +1 -0
- package/esm/Component.responsive.d.ts +3 -5
- package/esm/Component.responsive.js +1 -0
- package/esm/Component.responsive.js.map +1 -0
- package/esm/components/number-input/Component.d.ts +4 -7
- package/esm/components/number-input/Component.js +2 -1
- package/esm/components/number-input/Component.js.map +1 -0
- package/esm/components/number-input/index.d.ts +1 -1
- package/esm/components/number-input/index.js +1 -0
- package/esm/components/number-input/index.js.map +1 -0
- package/esm/components/steppers/Component.d.ts +3 -4
- package/esm/components/steppers/Component.js +4 -9
- package/esm/components/steppers/Component.js.map +1 -0
- package/esm/components/steppers/default.css +6 -28
- package/esm/components/steppers/default.module.css.js +6 -0
- package/esm/components/steppers/default.module.css.js.map +1 -0
- package/esm/components/steppers/index.css +9 -31
- package/esm/components/steppers/index.d.ts +1 -1
- package/esm/components/steppers/index.js +1 -0
- package/esm/components/steppers/index.js.map +1 -0
- package/esm/components/steppers/index.module.css.js +6 -0
- package/esm/components/steppers/index.module.css.js.map +1 -0
- package/esm/components/steppers/inverted.css +6 -28
- package/esm/components/steppers/inverted.module.css.js +6 -0
- package/esm/components/steppers/inverted.module.css.js.map +1 -0
- package/esm/constants/min-max-safe-integer.d.ts +2 -3
- package/esm/constants/min-max-safe-integer.js +1 -0
- package/esm/constants/min-max-safe-integer.js.map +1 -0
- package/esm/desktop/Component.desktop.d.ts +3 -5
- package/esm/desktop/Component.desktop.js +1 -0
- package/esm/desktop/Component.desktop.js.map +1 -0
- package/esm/desktop/index.d.ts +1 -2
- package/esm/desktop/index.js +1 -0
- package/esm/desktop/index.js.map +1 -0
- package/esm/index.d.ts +1 -2
- package/esm/index.js +1 -0
- package/esm/index.js.map +1 -0
- package/esm/mobile/Component.mobile.d.ts +3 -5
- package/esm/mobile/Component.mobile.js +1 -0
- package/esm/mobile/Component.mobile.js.map +1 -0
- package/esm/mobile/index.d.ts +1 -2
- package/esm/mobile/index.js +1 -0
- package/esm/mobile/index.js.map +1 -0
- package/esm/shared/index.d.ts +3 -3
- package/esm/shared/index.js +1 -0
- package/esm/shared/index.js.map +1 -0
- package/esm/utils.d.ts +10 -11
- package/esm/utils.js +3 -2
- package/esm/utils.js.map +1 -0
- package/index.d.ts +1 -2
- package/index.js +1 -0
- package/index.js.map +1 -0
- package/mobile/Component.mobile.d.ts +3 -5
- package/mobile/Component.mobile.js +3 -2
- package/mobile/Component.mobile.js.map +1 -0
- package/mobile/index.d.ts +1 -2
- package/mobile/index.js +3 -2
- package/mobile/index.js.map +1 -0
- package/modern/Component.responsive.d.ts +3 -5
- package/modern/Component.responsive.js +1 -0
- package/modern/Component.responsive.js.map +1 -0
- package/modern/components/number-input/Component.d.ts +4 -7
- package/modern/components/number-input/Component.js +2 -1
- package/modern/components/number-input/Component.js.map +1 -0
- package/modern/components/number-input/index.d.ts +1 -1
- package/modern/components/number-input/index.js +1 -0
- package/modern/components/number-input/index.js.map +1 -0
- package/modern/components/steppers/Component.d.ts +3 -4
- package/modern/components/steppers/Component.js +4 -9
- package/modern/components/steppers/Component.js.map +1 -0
- package/modern/components/steppers/default.css +6 -28
- package/modern/components/steppers/default.module.css.js +6 -0
- package/modern/components/steppers/default.module.css.js.map +1 -0
- package/modern/components/steppers/index.css +9 -31
- package/modern/components/steppers/index.d.ts +1 -1
- package/modern/components/steppers/index.js +1 -0
- package/modern/components/steppers/index.js.map +1 -0
- package/modern/components/steppers/index.module.css.js +6 -0
- package/modern/components/steppers/index.module.css.js.map +1 -0
- package/modern/components/steppers/inverted.css +6 -28
- package/modern/components/steppers/inverted.module.css.js +6 -0
- package/modern/components/steppers/inverted.module.css.js.map +1 -0
- package/modern/constants/min-max-safe-integer.d.ts +2 -3
- package/modern/constants/min-max-safe-integer.js +2 -1
- package/modern/constants/min-max-safe-integer.js.map +1 -0
- package/modern/desktop/Component.desktop.d.ts +3 -5
- package/modern/desktop/Component.desktop.js +1 -0
- package/modern/desktop/Component.desktop.js.map +1 -0
- package/modern/desktop/index.d.ts +1 -2
- package/modern/desktop/index.js +1 -0
- package/modern/desktop/index.js.map +1 -0
- package/modern/index.d.ts +1 -2
- package/modern/index.js +1 -0
- package/modern/index.js.map +1 -0
- package/modern/mobile/Component.mobile.d.ts +3 -5
- package/modern/mobile/Component.mobile.js +1 -0
- package/modern/mobile/Component.mobile.js.map +1 -0
- package/modern/mobile/index.d.ts +1 -2
- package/modern/mobile/index.js +1 -0
- package/modern/mobile/index.js.map +1 -0
- package/modern/shared/index.d.ts +3 -3
- package/modern/shared/index.js +1 -0
- package/modern/shared/index.js.map +1 -0
- package/modern/utils.d.ts +10 -11
- package/modern/utils.js +3 -2
- package/modern/utils.js.map +1 -0
- package/moderncssm/Component.responsive.d.ts +3 -5
- package/moderncssm/Component.responsive.js +1 -0
- package/moderncssm/Component.responsive.js.map +1 -0
- package/moderncssm/components/number-input/Component.d.ts +4 -7
- package/moderncssm/components/number-input/Component.js +2 -1
- package/moderncssm/components/number-input/Component.js.map +1 -0
- package/moderncssm/components/number-input/index.d.ts +1 -1
- package/moderncssm/components/number-input/index.js +1 -0
- package/moderncssm/components/number-input/index.js.map +1 -0
- package/moderncssm/components/steppers/Component.d.ts +3 -4
- package/moderncssm/components/steppers/Component.js +1 -0
- package/moderncssm/components/steppers/Component.js.map +1 -0
- package/moderncssm/components/steppers/default.module.css +0 -2
- package/moderncssm/components/steppers/index.d.ts +1 -1
- package/moderncssm/components/steppers/index.js +1 -0
- package/moderncssm/components/steppers/index.js.map +1 -0
- package/moderncssm/components/steppers/index.module.css +0 -2
- package/moderncssm/components/steppers/inverted.module.css +0 -2
- package/moderncssm/constants/min-max-safe-integer.d.ts +2 -3
- package/moderncssm/constants/min-max-safe-integer.js +2 -1
- package/moderncssm/constants/min-max-safe-integer.js.map +1 -0
- package/moderncssm/desktop/Component.desktop.d.ts +3 -5
- package/moderncssm/desktop/Component.desktop.js +1 -0
- package/moderncssm/desktop/Component.desktop.js.map +1 -0
- package/moderncssm/desktop/index.d.ts +1 -2
- package/moderncssm/desktop/index.js +1 -0
- package/moderncssm/desktop/index.js.map +1 -0
- package/moderncssm/index.d.ts +1 -2
- package/moderncssm/index.js +1 -0
- package/moderncssm/index.js.map +1 -0
- package/moderncssm/mobile/Component.mobile.d.ts +3 -5
- package/moderncssm/mobile/Component.mobile.js +1 -0
- package/moderncssm/mobile/Component.mobile.js.map +1 -0
- package/moderncssm/mobile/index.d.ts +1 -2
- package/moderncssm/mobile/index.js +1 -0
- package/moderncssm/mobile/index.js.map +1 -0
- package/moderncssm/shared/index.d.ts +3 -3
- package/moderncssm/shared/index.js +1 -0
- package/moderncssm/shared/index.js.map +1 -0
- package/moderncssm/utils.d.ts +10 -11
- package/moderncssm/utils.js +3 -2
- package/moderncssm/utils.js.map +1 -0
- package/package.json +9 -8
- package/shared/index.d.ts +3 -3
- package/shared/index.js +3 -2
- package/shared/index.js.map +1 -0
- package/utils.d.ts +10 -11
- package/utils.js +4 -3
- package/utils.js.map +1 -0
- package/desktop/package.json +0 -3
- package/mobile/package.json +0 -3
- package/shared/package.json +0 -3
- package/src/desktop/package.json +0 -3
- package/src/mobile/package.json +0 -3
- package/src/shared/package.json +0 -3
|
@@ -1,48 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
:
|
|
3
|
-
|
|
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 */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
5
|
-
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
6
|
-
} :root {
|
|
7
|
-
|
|
8
|
-
/* Hard */
|
|
9
|
-
|
|
10
|
-
/* Up */
|
|
11
|
-
|
|
12
|
-
/* Hard up */
|
|
13
|
-
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
14
|
-
|
|
15
|
-
/* новые значения, используйте их */
|
|
16
|
-
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
17
|
-
--gap-2xs-neg: -4px; /* deprecated */
|
|
18
|
-
--gap-xs-neg: -8px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
19
|
-
|
|
20
|
-
/* новые значения, используйте их */
|
|
21
|
-
|
|
22
|
-
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
23
|
-
/* stylelint-disable-next-line length-zero-no-unit */
|
|
1
|
+
:root {
|
|
2
|
+
--gap-2xs-neg: -4px;
|
|
3
|
+
--gap-xs-neg: -8px;
|
|
24
4
|
--gap-4-neg: var(--gap-2xs-neg);
|
|
25
5
|
--gap-8-neg: var(--gap-xs-neg);
|
|
26
|
-
}
|
|
27
|
-
} /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ :root {
|
|
28
|
-
} /* сбрасывает синюю подсветку при нажатии */ .number-input__component_1o6yd {
|
|
6
|
+
} .number-input__component_4kdxo {
|
|
29
7
|
display: flex;
|
|
30
8
|
flex-flow: row nowrap;
|
|
31
9
|
align-items: center;
|
|
32
10
|
border-radius: 5px;
|
|
33
11
|
transition: background-color 0.2s ease;
|
|
34
12
|
overflow: visible;
|
|
35
|
-
} .number-
|
|
13
|
+
} .number-input__separator_4kdxo {
|
|
36
14
|
height: 18px;
|
|
37
15
|
width: 1px;
|
|
38
|
-
} .number-
|
|
16
|
+
} .number-input__button_4kdxo {
|
|
39
17
|
width: 40px;
|
|
40
18
|
height: 40px;
|
|
41
|
-
} .number-input__size-
|
|
19
|
+
} .number-input__size-40_4kdxo {
|
|
42
20
|
margin-right: var(--gap-8-neg);
|
|
43
21
|
height: 32px;
|
|
44
|
-
} .number-input__size-
|
|
22
|
+
} .number-input__size-48_4kdxo {
|
|
45
23
|
margin-right: var(--gap-8-neg);
|
|
46
|
-
} .number-input__size-
|
|
24
|
+
} .number-input__size-56_4kdxo {
|
|
47
25
|
margin-right: var(--gap-4-neg);
|
|
48
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './Component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
|
|
3
|
+
var styles = {"component":"number-input__component_4kdxo","separator":"number-input__separator_4kdxo","button":"number-input__button_4kdxo","size-40":"number-input__size-40_4kdxo","size-48":"number-input__size-48_4kdxo","size-56":"number-input__size-56_4kdxo"};
|
|
4
|
+
|
|
5
|
+
export { styles as default };
|
|
6
|
+
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["../../src/components/steppers/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n border-radius: 5px;\n transition: background-color 0.2s ease;\n overflow: visible;\n}\n\n.separator {\n height: 18px;\n width: 1px;\n}\n\n.button {\n width: 40px;\n height: 40px;\n}\n\n.size-40 {\n margin-right: var(--gap-8-neg);\n height: 32px;\n}\n\n.size-48 {\n margin-right: var(--gap-8-neg);\n}\n\n.size-56 {\n margin-right: var(--gap-4-neg);\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,WAAW,CAAC,+BAA+B,CAAC,WAAW,CAAC,+BAA+B,CAAC,QAAQ,CAAC,4BAA4B,CAAC,SAAS,CAAC,6BAA6B,CAAC,SAAS,CAAC,6BAA6B,CAAC,SAAS,CAAC,6BAA6B,CAAC;;;;"}
|
|
@@ -1,33 +1,11 @@
|
|
|
1
|
-
|
|
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-inverted: rgba(214, 214, 229, 0.07);
|
|
5
|
-
--color-light-neutral-translucent-300-inverted: rgba(222, 222, 238, 0.13);
|
|
6
|
-
}
|
|
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 */
|
|
8
|
-
} :root {
|
|
9
|
-
|
|
10
|
-
/* Hard */
|
|
11
|
-
|
|
12
|
-
/* Up */
|
|
13
|
-
|
|
14
|
-
/* Hard up */
|
|
15
|
-
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
16
|
-
|
|
17
|
-
/* новые значения, используйте их */
|
|
18
|
-
} :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 */
|
|
19
|
-
|
|
20
|
-
/* новые значения, используйте их */
|
|
21
|
-
|
|
22
|
-
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
23
|
-
/* stylelint-disable-next-line length-zero-no-unit */
|
|
24
|
-
} :root {
|
|
25
|
-
} /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ :root {
|
|
26
|
-
} /* сбрасывает синюю подсветку при нажатии */ .number-input__separator_hvj5v {
|
|
3
|
+
--color-light-neutral-translucent-300-inverted: rgba(222, 222, 238, 0.13);
|
|
4
|
+
} .number-input__separator_1bl9y {
|
|
27
5
|
background-color: var(--color-light-neutral-translucent-300-inverted);
|
|
28
|
-
} .number-
|
|
6
|
+
} .number-input__steppers_1bl9y {
|
|
29
7
|
background-color: var(--color-light-neutral-translucent-0-inverted);
|
|
30
|
-
} .number-
|
|
31
|
-
.number-
|
|
8
|
+
} .number-input__steppersFocused_1bl9y,
|
|
9
|
+
.number-input__steppersDisabled_1bl9y {
|
|
32
10
|
background-color: var(--color-light-neutral-translucent-300-inverted);
|
|
33
11
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import './inverted.css';
|
|
2
|
+
|
|
3
|
+
var invertedColors = {"separator":"number-input__separator_1bl9y","steppers":"number-input__steppers_1bl9y","steppersFocused":"number-input__steppersFocused_1bl9y","steppersDisabled":"number-input__steppersDisabled_1bl9y"};
|
|
4
|
+
|
|
5
|
+
export { invertedColors as default };
|
|
6
|
+
//# sourceMappingURL=inverted.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inverted.module.css.js","sources":["../../src/components/steppers/inverted.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.separator {\n background-color: var(--color-light-neutral-translucent-300-inverted);\n}\n\n.steppers {\n background-color: var(--color-light-neutral-translucent-0-inverted);\n}\n\n.steppersFocused,\n.steppersDisabled {\n background-color: var(--color-light-neutral-translucent-300-inverted);\n}\n"],"names":[],"mappings":";;AAEgB,qBAAe,CAAC,WAAW,CAAC,+BAA+B,CAAC,UAAU,CAAC,8BAA8B,CAAC,iBAAiB,CAAC,qCAAqC,CAAC,kBAAkB,CAAC,sCAAsC,CAAC;;;;"}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
declare const MAX_SAFE_INTEGER: number;
|
|
2
|
-
declare const MIN_SAFE_INTEGER: number;
|
|
3
|
-
export { MAX_SAFE_INTEGER, MIN_SAFE_INTEGER };
|
|
1
|
+
export declare const MAX_SAFE_INTEGER: number;
|
|
2
|
+
export declare const MIN_SAFE_INTEGER: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"min-max-safe-integer.js","sources":["../../src/constants/min-max-safe-integer.ts"],"sourcesContent":["export const MAX_SAFE_INTEGER = 2 ** 53 - 1;\nexport const MIN_SAFE_INTEGER = -MAX_SAFE_INTEGER;\n"],"names":[],"mappings":"AAAa,IAAA,gBAAgB,GAAG,IAAA,CAAA,GAAA,CAAA,CAAC,EAAI,EAAE,CAAA,GAAG;AAC7B,IAAA,gBAAgB,GAAG,CAAC;;;;"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import { NumberInputProps } from
|
|
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>>;
|
|
@@ -6,3 +6,4 @@ import { NumberInput } from '../components/number-input/Component.js';
|
|
|
6
6
|
var NumberInputDesktop = forwardRef(function (props, ref) { return React.createElement(NumberInput, __assign({}, props, { Input: InputDesktop, ref: ref, view: 'desktop' })); });
|
|
7
7
|
|
|
8
8
|
export { NumberInputDesktop };
|
|
9
|
+
//# 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":[],"mappings":";;;;;AAQO,IAAM,kBAAkB,GAAG,UAAU,CACxC,UAAC,KAAK,EAAE,GAAG,EAAA,EAAK,OAAA,KAAA,CAAA,aAAA,CAAC,WAAW,EAAK,QAAA,CAAA,EAAA,EAAA,KAAK,EAAE,EAAA,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAC,SAAS,EAAA,CAAA,CAAG,CAAxE,EAAwE;;;;"}
|
package/esm/desktop/index.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { NumberInputDesktop, NumberInputDesktopProps } from
|
|
2
|
-
export {};
|
|
1
|
+
export { NumberInputDesktop, NumberInputDesktopProps } from './Component.desktop';
|
package/esm/desktop/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/esm/index.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { NumberInputResponsive as NumberInput, NumberInputResponsiveProps as NumberInputProps } from
|
|
2
|
-
export {};
|
|
1
|
+
export { NumberInputResponsive as NumberInput, NumberInputResponsiveProps as NumberInputProps, } from './Component.responsive';
|
package/esm/index.js
CHANGED
package/esm/index.js.map
ADDED
|
@@ -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
|
|
4
|
-
type NumberInputMobileProps = Omit<NumberInputProps, 'Input' | 'breakpoint' | 'view'>;
|
|
5
|
-
declare const NumberInputMobile: React.ForwardRefExoticComponent<NumberInputMobileProps & React.RefAttributes<HTMLInputElement>>;
|
|
6
|
-
export { NumberInputMobileProps, NumberInputMobile };
|
|
2
|
+
import { NumberInputProps } from '../components/number-input';
|
|
3
|
+
export declare type NumberInputMobileProps = Omit<NumberInputProps, 'Input' | 'breakpoint' | 'view'>;
|
|
4
|
+
export declare const NumberInputMobile: React.ForwardRefExoticComponent<NumberInputMobileProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -6,3 +6,4 @@ import { NumberInput } from '../components/number-input/Component.js';
|
|
|
6
6
|
var NumberInputMobile = forwardRef(function (props, ref) { return React.createElement(NumberInput, __assign({}, props, { Input: InputMobile, ref: ref, view: 'mobile' })); });
|
|
7
7
|
|
|
8
8
|
export { NumberInputMobile };
|
|
9
|
+
//# sourceMappingURL=Component.mobile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Component.mobile.js","sources":["../../src/mobile/Component.mobile.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { InputMobile } from '@alfalab/core-components-input/mobile';\n\nimport { NumberInput, NumberInputProps } from '../components/number-input';\n\nexport type NumberInputMobileProps = Omit<NumberInputProps, 'Input' | 'breakpoint' | 'view'>;\n\nexport const NumberInputMobile = forwardRef<HTMLInputElement, NumberInputMobileProps>(\n (props, ref) => <NumberInput {...props} Input={InputMobile} ref={ref} view='mobile' />,\n);\n"],"names":[],"mappings":";;;;;AAQO,IAAM,iBAAiB,GAAG,UAAU,CACvC,UAAC,KAAK,EAAE,GAAG,EAAA,EAAK,OAAA,KAAA,CAAA,aAAA,CAAC,WAAW,EAAK,QAAA,CAAA,EAAA,EAAA,KAAK,EAAE,EAAA,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAC,QAAQ,EAAA,CAAA,CAAG,CAAtE,EAAsE;;;;"}
|
package/esm/mobile/index.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { NumberInputMobile, NumberInputMobileProps } from
|
|
2
|
-
export {};
|
|
1
|
+
export { NumberInputMobile, NumberInputMobileProps } from './Component.mobile';
|
package/esm/mobile/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/esm/shared/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { getNumberInputTestIds } from
|
|
2
|
-
export { Steppers } from
|
|
3
|
-
export type { SteppersProps } from
|
|
1
|
+
export { getNumberInputTestIds } from '../utils';
|
|
2
|
+
export { Steppers } from '../components/steppers';
|
|
3
|
+
export type { SteppersProps } from '../components/steppers';
|
package/esm/shared/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/esm/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/esm/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { maskitoTransform } from '@maskito/core';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { fnUtils, getDataTestId } from '@alfalab/core-components-shared/esm';
|
|
3
|
+
import { MAX_SAFE_INTEGER, MIN_SAFE_INTEGER } from './constants/min-max-safe-integer.js';
|
|
4
4
|
|
|
5
5
|
/* eslint-disable no-param-reassign */
|
|
6
6
|
var MINUS_SIGN = '-';
|
|
@@ -266,3 +266,4 @@ var getMinMaxOrDefault = function (_a) {
|
|
|
266
266
|
};
|
|
267
267
|
|
|
268
268
|
export { MAX_DIGITS, MINUS_SIGN, SEPARATORS, createMaskOptions, createMinMaxPlugin, createNotEmptyPartsPlugin, getMinMaxOrDefault, getNumberInputTestIds, parseNumber, stringifyNumberWithoutExp };
|
|
269
|
+
//# sourceMappingURL=utils.js.map
|
package/esm/utils.js.map
ADDED
|
@@ -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":[],"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,CAA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as NumberInput, NumberInputResponsiveProps as NumberInputProps } from
|
|
2
|
-
export {};
|
|
1
|
+
export { NumberInputResponsive as NumberInput, NumberInputResponsiveProps as NumberInputProps, } from './Component.responsive';
|
package/index.js
CHANGED
package/index.js.map
ADDED
|
@@ -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
|
|
4
|
-
type NumberInputMobileProps = Omit<NumberInputProps, 'Input' | 'breakpoint' | 'view'>;
|
|
5
|
-
declare const NumberInputMobile: React.ForwardRefExoticComponent<NumberInputMobileProps & React.RefAttributes<HTMLInputElement>>;
|
|
6
|
-
export { NumberInputMobileProps, NumberInputMobile };
|
|
2
|
+
import { NumberInputProps } from '../components/number-input';
|
|
3
|
+
export declare type NumberInputMobileProps = Omit<NumberInputProps, 'Input' | 'breakpoint' | 'view'>;
|
|
4
|
+
export declare const NumberInputMobile: React.ForwardRefExoticComponent<NumberInputMobileProps & 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 mobile = require('@alfalab/core-components-input/mobile');
|
|
8
|
-
var
|
|
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 NumberInputMobile = React.forwardRef(function (props, ref) { return React__default.default.createElement(
|
|
14
|
+
var NumberInputMobile = React.forwardRef(function (props, ref) { return React__default.default.createElement(Component.NumberInput, tslib.__assign({}, props, { Input: mobile.InputMobile, ref: ref, view: 'mobile' })); });
|
|
15
15
|
|
|
16
16
|
exports.NumberInputMobile = NumberInputMobile;
|
|
17
|
+
//# sourceMappingURL=Component.mobile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Component.mobile.js","sources":["../src/mobile/Component.mobile.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { InputMobile } from '@alfalab/core-components-input/mobile';\n\nimport { NumberInput, NumberInputProps } from '../components/number-input';\n\nexport type NumberInputMobileProps = Omit<NumberInputProps, 'Input' | 'breakpoint' | 'view'>;\n\nexport const NumberInputMobile = forwardRef<HTMLInputElement, NumberInputMobileProps>(\n (props, ref) => <NumberInput {...props} Input={InputMobile} ref={ref} view='mobile' />,\n);\n"],"names":["forwardRef","React","NumberInput","__assign","InputMobile"],"mappings":";;;;;;;;;;;;;AAQO,IAAM,iBAAiB,GAAGA,gBAAU,CACvC,UAAC,KAAK,EAAE,GAAG,EAAA,EAAK,OAAAC,sBAAA,CAAA,aAAA,CAACC,qBAAW,EAAKC,cAAA,CAAA,EAAA,EAAA,KAAK,EAAE,EAAA,KAAK,EAAEC,kBAAW,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAC,QAAQ,EAAA,CAAA,CAAG,CAAtE,EAAsE;;;;"}
|
package/mobile/index.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { NumberInputMobile, NumberInputMobileProps } from
|
|
2
|
-
export {};
|
|
1
|
+
export { NumberInputMobile, NumberInputMobileProps } from './Component.mobile';
|
package/mobile/index.js
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var Component_mobile = require('./Component.mobile.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.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,6 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import { NumberInputProps } from
|
|
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>>;
|
|
@@ -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":";;;;;AASO,MAAM,qBAAqB,GAAG,UAAU,CAC3C,CACI,EACI,UAAU,EACV,MAAM,EACN,sBAAsB,GAAG,MAAM,KAAK,SAAS,GAAG,SAAS,GAAG,MAAM,KAAK,SAAS,EAChF,GAAG,SAAS,EACf,EACD,GAAG,KACH;IACA,MAAM,SAAS,GAAG,YAAY,CAAC,UAAU,EAAE,sBAAsB,CAAC;AAElE,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,WAAW,EAAA,EAAA,GACJ,SAAS,EACb,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,EACtC,UAAU,EAAE,UAAU,EACtB,sBAAsB,EAAE,sBAAsB,EAAA,CAChD;AAEV,CAAC;AAGL,qBAAqB,CAAC,WAAW,GAAG,uBAAuB;;;;"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
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>>;
|
|
@@ -3,7 +3,7 @@ import mergeRefs from 'react-merge-refs';
|
|
|
3
3
|
import { maskitoTransform } from '@maskito/core';
|
|
4
4
|
import { useMaskito } from '@maskito/react';
|
|
5
5
|
import { fnUtils, os } from '@alfalab/core-components-shared/modern';
|
|
6
|
-
import { createMaskOptions,
|
|
6
|
+
import { createMaskOptions, MAX_DIGITS, getMinMaxOrDefault, parseNumber, stringifyNumberWithoutExp, MINUS_SIGN } from '../../utils.js';
|
|
7
7
|
import { Steppers } from '../steppers/Component.js';
|
|
8
8
|
|
|
9
9
|
const NumberInput = forwardRef(({ value: propValue, onChange, separator = ',', fractionLength = MAX_DIGITS, defaultValue, Input, min: minProp, max: maxProp, rightAddons, dataTestId, disabled, onBlur, onFocus, view, step: stepProp, size = 48, disableUserInput, clear: clearProp, colors = 'default', ...restProps }, ref) => {
|
|
@@ -84,3 +84,4 @@ const NumberInput = forwardRef(({ value: propValue, onChange, separator = ',', f
|
|
|
84
84
|
});
|
|
85
85
|
|
|
86
86
|
export { NumberInput };
|
|
87
|
+
//# sourceMappingURL=Component.js.map
|