@toptal/picasso-number-input 3.0.2-alpha-fx-5880-page-head-2-7af9caef5.15 → 4.0.0

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;AAO1E,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,gFAyFvB,CAAA;AAeD,eAAe,WAAW,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, usePropDeprecationWarning, } from '@toptal/picasso-utils';
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, error, status, onResetClick, enableReset, width, icon, size, testIds, highlight } = props, rest = __rest(props
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: error ? 'error' : status, inputRef: inputRef, type: 'number', value: value, disabled: disabled, onChange: onChange, endAdornment: endAdornment, startAdornment: startAdornment, size: size, testIds: testIds }));
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,EACL,eAAe,EACf,yBAAyB,GAC1B,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAA;AAEvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAA;AA2BpE,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CACnC,SAAS,WAAW,CAAC,KAAK,EAAE,GAAG;IAC7B,MAAM,EACJ,IAAI,GAAG,CAAC,EACR,GAAG,GAAG,CAAC,QAAQ,EACf,GAAG,GAAG,QAAQ,EACd,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,MAAM,EACN,YAAY,EACZ,WAAW,EACX,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,SAAS,KAEP,KAAK,EADJ,IAAI,UACL,KAAK;IAET,kBAAkB;MApBZ,0KAkBL,CAAQ,CAAA;IAET,kBAAkB;IAClB,yBAAyB,CAAC;QACxB,KAAK;QACL,IAAI,EAAE,OAAO;QACb,aAAa,EAAE,aAAa;QAC5B,WAAW,EACT,qGAAqG;KACxG,CAAC,CAAA;IAEF,MAAM,QAAQ,GAAG,eAAe,CAC9B,GAAG,EACH,MAAM,CAAmB,IAAI,CAAC,CAC/B,CAAA;IAED,MAAM,YAAY,GAAG,YAAY,CA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+1,6 @@
1
1
  {
2
2
  "name": "@toptal/picasso-number-input",
3
- "version": "3.0.2-alpha-fx-5880-page-head-2-7af9caef5.15+7af9caef5",
3
+ "version": "4.0.0",
4
4
  "description": "Toptal UI components library - NumberInput",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -22,34 +22,33 @@
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-7af9caef5.26+7af9caef5",
26
- "@toptal/picasso-form": "5.0.1-alpha-fx-5880-page-head-2-7af9caef5.26+7af9caef5",
27
- "@toptal/picasso-icons": "1.6.1-alpha-fx-5880-page-head-2-7af9caef5.95+7af9caef5",
28
- "@toptal/picasso-input-adornment": "3.0.1-alpha-fx-5880-page-head-2-7af9caef5.26+7af9caef5",
29
- "@toptal/picasso-outlined-input": "3.0.2-alpha-fx-5880-page-head-2-7af9caef5.15+7af9caef5",
30
- "@toptal/picasso-shared": "15.0.1-alpha-fx-5880-page-head-2-7af9caef5.188+7af9caef5",
31
- "@toptal/picasso-utils": "1.0.4-alpha-fx-5880-page-head-2-7af9caef5.188+7af9caef5"
25
+ "@toptal/picasso-container": "3.0.1",
26
+ "@toptal/picasso-form": "6.0.0",
27
+ "@toptal/picasso-icons": "1.6.1",
28
+ "@toptal/picasso-input-adornment": "3.0.1",
29
+ "@toptal/picasso-outlined-input": "4.0.0",
30
+ "@toptal/picasso-shared": "15.0.0",
31
+ "@toptal/picasso-utils": "2.0.0"
32
32
  },
33
33
  "sideEffects": [
34
34
  "**/styles.ts",
35
35
  "**/styles.js"
36
36
  ],
37
37
  "peerDependencies": {
38
- "@toptal/picasso-tailwind": ">=2.7",
39
38
  "@toptal/picasso-tailwind-merge": "^2.0.0",
39
+ "@toptal/picasso-tailwind": ">=2.7",
40
40
  "react": ">=16.12.0 < 19.0.0"
41
41
  },
42
42
  "exports": {
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-7af9caef5.26+7af9caef5",
47
- "@toptal/picasso-test-utils": "1.1.2-alpha-fx-5880-page-head-2-7af9caef5.188+7af9caef5"
46
+ "@toptal/picasso-tailwind-merge": "2.0.1",
47
+ "@toptal/picasso-test-utils": "1.1.1"
48
48
  },
49
49
  "files": [
50
50
  "dist-package/**",
51
51
  "!dist-package/tsconfig.tsbuildinfo",
52
52
  "src"
53
- ],
54
- "gitHead": "7af9caef59ecb293478d369764d6a56061419420"
53
+ ]
55
54
  }
@@ -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={error ? 'error' : status}
103
+ status={status}
117
104
  inputRef={inputRef}
118
105
  type='number'
119
106
  value={value}
package/LICENSE DELETED
@@ -1,20 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2021-2022 Toptal, LLC
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of
6
- this software and associated documentation files (the “Software”), to deal in
7
- the Software without restriction, including without limitation the rights to
8
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
- the Software, and to permit persons to whom the Software is furnished to do so,
10
- subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.