@toptal/picasso-number-input 3.0.2-alpha-fx-5880-page-head-2-7af9caef5.15 → 3.0.2-alpha-fx-5880-page-head-2-241fef4ab.23
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../../src/NumberInput/NumberInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAA6B,MAAM,OAAO,CAAA;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;
|
1
|
+
{"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../../src/NumberInput/NumberInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAA6B,MAAM,OAAO,CAAA;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAI1E,OAAO,KAAK,EAAE,KAAK,IAAI,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AAKjF,MAAM,WAAW,KACf,SAAQ,IAAI,CACR,iBAAiB,CAAC,kBAAkB,CAAC,EACrC,cAAc,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAC/C,EACD,SAAS;IACX,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,4CAA4C;IAC5C,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACrB,4CAA4C;IAC5C,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACrB,yEAAyE;IACzE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,uCAAuC;IACvC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;IAC/D,SAAS,CAAC,EAAE,UAAU,CAAA;CACvB;AAED,eAAO,MAAM,WAAW,gFA+EvB,CAAA;AAeD,eAAe,WAAW,CAAA"}
|
@@ -12,20 +12,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
12
12
|
import React, { forwardRef, useRef } from 'react';
|
13
13
|
import { OutlinedInput } from '@toptal/picasso-outlined-input';
|
14
14
|
import { InputAdornment } from '@toptal/picasso-input-adornment';
|
15
|
-
import { useCombinedRefs
|
15
|
+
import { useCombinedRefs } from '@toptal/picasso-utils';
|
16
16
|
import { twJoin } from '@toptal/picasso-tailwind-merge';
|
17
17
|
import { NumberInputEndAdornment } from '../NumberInputEndAdornment';
|
18
18
|
export const NumberInput = forwardRef(function NumberInput(props, ref) {
|
19
|
-
const { step = 1, min = -Infinity, max = Infinity, hideControls, value, onChange, disabled,
|
20
|
-
// TODO: [FX-4715]
|
21
|
-
, ["step", "min", "max", "hideControls", "value", "onChange", "disabled", "error", "status", "onResetClick", "enableReset", "width", "icon", "size", "testIds", "highlight"]);
|
22
|
-
// TODO: [FX-4715]
|
23
|
-
usePropDeprecationWarning({
|
24
|
-
props,
|
25
|
-
name: 'error',
|
26
|
-
componentName: 'NumberInput',
|
27
|
-
description: 'Use the `status` prop instead. `error` is deprecated and will be removed in the next major release.',
|
28
|
-
});
|
19
|
+
const { step = 1, min = -Infinity, max = Infinity, hideControls, value, onChange, disabled, status, onResetClick, enableReset, width, icon, size, testIds, highlight } = props, rest = __rest(props, ["step", "min", "max", "hideControls", "value", "onChange", "disabled", "status", "onResetClick", "enableReset", "width", "icon", "size", "testIds", "highlight"]);
|
29
20
|
const inputRef = useCombinedRefs(ref, useRef(null));
|
30
21
|
const endAdornment = hideControls ? null : (React.createElement(NumberInputEndAdornment, { step: step, min: min, max: max, value: value, disabled: disabled, size: size, inputRef: inputRef }));
|
31
22
|
const startAdornment = icon ? (React.createElement(InputAdornment, { position: 'start', disablePointerEvents: true }, icon)) : null;
|
@@ -38,7 +29,7 @@ export const NumberInput = forwardRef(function NumberInput(props, ref) {
|
|
38
29
|
'[-moz-appearance:textfield]'),
|
39
30
|
}, highlight: highlight, inputProps: Object.assign(Object.assign({}, rest), { step,
|
40
31
|
min,
|
41
|
-
max }), width: width, onResetClick: onResetClick, enableReset: enableReset, status:
|
32
|
+
max }), width: width, onResetClick: onResetClick, enableReset: enableReset, status: status, inputRef: inputRef, type: 'number', value: value, disabled: disabled, onChange: onChange, endAdornment: endAdornment, startAdornment: startAdornment, size: size, testIds: testIds }));
|
42
33
|
});
|
43
34
|
NumberInput.defaultProps = {
|
44
35
|
onChange: () => { },
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NumberInput.js","sourceRoot":"","sources":["../../../src/NumberInput/NumberInput.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAChE,OAAO,
|
1
|
+
{"version":3,"file":"NumberInput.js","sourceRoot":"","sources":["../../../src/NumberInput/NumberInput.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEvD,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAA;AAEvD,OAAO,EAAE,uBA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AAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,GAChB,CACH,CAAA;AACH,CAAC,CACF,CAAA;AAED,WAAW,CAAC,YAAY,GAAG;IACzB,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC;IAClB,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,GAAG,EAAE,CAAC,QAAQ;IACd,GAAG,EAAE,QAAQ;IACb,YAAY,EAAE,KAAK;IACnB,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,SAAS;CAClB,CAAA;AAED,WAAW,CAAC,WAAW,GAAG,aAAa,CAAA;AAEvC,eAAe,WAAW,CAAA"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@toptal/picasso-number-input",
|
3
|
-
"version": "3.0.2-alpha-fx-5880-page-head-2-
|
3
|
+
"version": "3.0.2-alpha-fx-5880-page-head-2-241fef4ab.23+241fef4ab",
|
4
4
|
"description": "Toptal UI components library - NumberInput",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -22,13 +22,13 @@
|
|
22
22
|
},
|
23
23
|
"homepage": "https://github.com/toptal/picasso/tree/master/packages/picasso#readme",
|
24
24
|
"dependencies": {
|
25
|
-
"@toptal/picasso-container": "3.0.1-alpha-fx-5880-page-head-2-
|
26
|
-
"@toptal/picasso-form": "5.0.1-alpha-fx-5880-page-head-2-
|
27
|
-
"@toptal/picasso-icons": "1.6.1-alpha-fx-5880-page-head-2-
|
28
|
-
"@toptal/picasso-input-adornment": "3.0.1-alpha-fx-5880-page-head-2-
|
29
|
-
"@toptal/picasso-outlined-input": "3.0.2-alpha-fx-5880-page-head-2-
|
30
|
-
"@toptal/picasso-shared": "15.0.1-alpha-fx-5880-page-head-2-
|
31
|
-
"@toptal/picasso-utils": "1.0.4-alpha-fx-5880-page-head-2-
|
25
|
+
"@toptal/picasso-container": "3.0.1-alpha-fx-5880-page-head-2-241fef4ab.34+241fef4ab",
|
26
|
+
"@toptal/picasso-form": "5.0.1-alpha-fx-5880-page-head-2-241fef4ab.34+241fef4ab",
|
27
|
+
"@toptal/picasso-icons": "1.6.1-alpha-fx-5880-page-head-2-241fef4ab.103+241fef4ab",
|
28
|
+
"@toptal/picasso-input-adornment": "3.0.1-alpha-fx-5880-page-head-2-241fef4ab.34+241fef4ab",
|
29
|
+
"@toptal/picasso-outlined-input": "3.0.2-alpha-fx-5880-page-head-2-241fef4ab.23+241fef4ab",
|
30
|
+
"@toptal/picasso-shared": "15.0.1-alpha-fx-5880-page-head-2-241fef4ab.196+241fef4ab",
|
31
|
+
"@toptal/picasso-utils": "1.0.4-alpha-fx-5880-page-head-2-241fef4ab.196+241fef4ab"
|
32
32
|
},
|
33
33
|
"sideEffects": [
|
34
34
|
"**/styles.ts",
|
@@ -43,13 +43,13 @@
|
|
43
43
|
".": "./dist-package/src/index.js"
|
44
44
|
},
|
45
45
|
"devDependencies": {
|
46
|
-
"@toptal/picasso-tailwind-merge": "2.0.1-alpha-fx-5880-page-head-2-
|
47
|
-
"@toptal/picasso-test-utils": "1.1.2-alpha-fx-5880-page-head-2-
|
46
|
+
"@toptal/picasso-tailwind-merge": "2.0.1-alpha-fx-5880-page-head-2-241fef4ab.34+241fef4ab",
|
47
|
+
"@toptal/picasso-test-utils": "1.1.2-alpha-fx-5880-page-head-2-241fef4ab.196+241fef4ab"
|
48
48
|
},
|
49
49
|
"files": [
|
50
50
|
"dist-package/**",
|
51
51
|
"!dist-package/tsconfig.tsbuildinfo",
|
52
52
|
"src"
|
53
53
|
],
|
54
|
-
"gitHead": "
|
54
|
+
"gitHead": "241fef4abd970386116acad79b109b78b2086e3c"
|
55
55
|
}
|
@@ -3,10 +3,7 @@ import React, { forwardRef, useRef } from 'react'
|
|
3
3
|
import type { BaseProps, OmitInternalProps } from '@toptal/picasso-shared'
|
4
4
|
import { OutlinedInput } from '@toptal/picasso-outlined-input'
|
5
5
|
import { InputAdornment } from '@toptal/picasso-input-adornment'
|
6
|
-
import {
|
7
|
-
useCombinedRefs,
|
8
|
-
usePropDeprecationWarning,
|
9
|
-
} from '@toptal/picasso-utils'
|
6
|
+
import { useCombinedRefs } from '@toptal/picasso-utils'
|
10
7
|
import type { Props as OutlinedInputProps } from '@toptal/picasso-outlined-input'
|
11
8
|
import { twJoin } from '@toptal/picasso-tailwind-merge'
|
12
9
|
|
@@ -47,7 +44,6 @@ export const NumberInput = forwardRef<HTMLInputElement, Props>(
|
|
47
44
|
value,
|
48
45
|
onChange,
|
49
46
|
disabled,
|
50
|
-
error,
|
51
47
|
status,
|
52
48
|
onResetClick,
|
53
49
|
enableReset,
|
@@ -59,15 +55,6 @@ export const NumberInput = forwardRef<HTMLInputElement, Props>(
|
|
59
55
|
...rest
|
60
56
|
} = props
|
61
57
|
|
62
|
-
// TODO: [FX-4715]
|
63
|
-
usePropDeprecationWarning({
|
64
|
-
props,
|
65
|
-
name: 'error',
|
66
|
-
componentName: 'NumberInput',
|
67
|
-
description:
|
68
|
-
'Use the `status` prop instead. `error` is deprecated and will be removed in the next major release.',
|
69
|
-
})
|
70
|
-
|
71
58
|
const inputRef = useCombinedRefs<HTMLInputElement>(
|
72
59
|
ref,
|
73
60
|
useRef<HTMLInputElement>(null)
|
@@ -113,7 +100,7 @@ export const NumberInput = forwardRef<HTMLInputElement, Props>(
|
|
113
100
|
width={width}
|
114
101
|
onResetClick={onResetClick}
|
115
102
|
enableReset={enableReset}
|
116
|
-
status={
|
103
|
+
status={status}
|
117
104
|
inputRef={inputRef}
|
118
105
|
type='number'
|
119
106
|
value={value}
|