@toptal/picasso-input 2.0.8 → 3.0.1
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/dist-package/src/Input/Input.d.ts.map +1 -1
- package/dist-package/src/Input/Input.js +1 -13
- package/dist-package/src/Input/Input.js.map +1 -1
- package/package.json +8 -11
- package/src/Input/Input.tsx +2 -18
- package/src/Input/__snapshots__/test.tsx.snap +27 -111
- package/src/Input/story/MultilineExpand.example.tsx +1 -1
- package/dist-package/src/Input/styles.d.ts +0 -6
- package/dist-package/src/Input/styles.d.ts.map +0 -1
- package/dist-package/src/Input/styles.js +0 -16
- package/dist-package/src/Input/styles.js.map +0 -1
- package/dist-package/src/InputBase/styles.d.ts +0 -2
- package/dist-package/src/InputBase/styles.d.ts.map +0 -1
- package/dist-package/src/InputBase/styles.js +0 -18
- package/dist-package/src/InputBase/styles.js.map +0 -1
- package/dist-package/src/styles.d.ts +0 -2
- package/dist-package/src/styles.d.ts.map +0 -1
- package/dist-package/src/styles.js +0 -2
- package/dist-package/src/styles.js.map +0 -1
- package/src/Input/styles.ts +0 -18
- package/src/InputBase/styles.ts +0 -19
- package/src/styles.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/Input/Input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,UAAU,EACX,MAAM,OAAO,CAAA;AACd,OAAO,KAAqB,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/Input/Input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,UAAU,EACX,MAAM,OAAO,CAAA;AACd,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,wBA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AAE,MAAM,CAAA;IACb,uGAAuG;IACvG,cAAc,CAAC,EAAE,SAAS,CAAA;IAC1B,mGAAmG;IACnG,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,CACT,KAAK,EAAE,WAAW,CAChB,mBAAmB,GAAG,gBAAgB,GAAG,iBAAiB,CAC3D,KACE,IAAI,CAAA;IACT,oFAAoF;IACpF,KAAK,CAAC,EAAE,wBAAwB,CAAC,OAAO,CAAC,CAAA;IACzC,wCAAwC;IACxC,OAAO,CAAC,EAAE,wBAAwB,CAAC,SAAS,CAAC,CAAA;IAC7C,qBAAqB;IACrB,IAAI,CAAC,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAA;IAC7C,sEAAsE;IACtE,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,qDAAqD;IACrD,YAAY,CAAC,EAAE,CACb,KAAK,EAAE,UAAU,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,KACrD,IAAI,CAAA;IACT,+BAA+B;IAC/B,UAAU,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;IACnC,OAAO,CAAC,EAAE;QACR,cAAc,CAAC,EAAE,MAAM,CAAA;QACvB,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,CAAA;IACD,sBAAsB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,KAAK,IAAI,CAAA;IACpE,SAAS,CAAC,EAAE,UAAU,CAAA;CACvB;AAuID,eAAO,MAAM,KAAK,gFAuIhB,CAAA;AAgBF,eAAe,KAAK,CAAA"}
|
|
@@ -10,15 +10,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import React, { forwardRef } from 'react';
|
|
13
|
-
import cx from 'classnames';
|
|
14
|
-
import { makeStyles } from '@material-ui/core/styles';
|
|
15
13
|
import { useHasMultilineCounter } from '@toptal/picasso-shared';
|
|
16
14
|
import { OutlinedInput } from '@toptal/picasso-outlined-input';
|
|
17
15
|
import { disableUnsupportedProps, usePropDeprecationWarning, } from '@toptal/picasso-utils';
|
|
18
16
|
import { InputLimitAdornment, InputIconAdornment, InputValidIconAdornment, } from '@toptal/picasso-input-adornment';
|
|
19
17
|
import { Container } from '@toptal/picasso-container';
|
|
20
|
-
import styles from './styles';
|
|
21
|
-
const useStyles = makeStyles(styles, { name: 'PicassoInput' });
|
|
22
18
|
const hasRemainingCounter = ({ counter, limit, }) => Boolean(counter === 'remaining' && limit);
|
|
23
19
|
const hasEnteredCounter = ({ counter }) => counter === 'entered';
|
|
24
20
|
const hasCounter = ({ counter, limit }) => hasRemainingCounter({ counter, limit }) || hasEnteredCounter({ counter });
|
|
@@ -83,18 +79,10 @@ export const Input = forwardRef(function Input(props, ref) {
|
|
|
83
79
|
description: 'Use the `status` prop instead. `error` is deprecated and will be removed in the next major release.',
|
|
84
80
|
});
|
|
85
81
|
const charsLength = value ? value.length : 0;
|
|
86
|
-
const classes = useStyles();
|
|
87
82
|
const showCounter = !!charsLength && hasCounter({ counter, limit });
|
|
88
83
|
useHasMultilineCounter(name, showCounter && multiline, setHasMultilineCounter);
|
|
89
84
|
return (React.createElement(React.Fragment, null,
|
|
90
|
-
React.createElement(OutlinedInput, { ref: outlineRef, inputRef: ref, className: className, style: style, highlight: highlight,
|
|
91
|
-
root: cx(classes.root, {
|
|
92
|
-
[classes.rootMultiline]: multiline,
|
|
93
|
-
}),
|
|
94
|
-
input: cx(classes.input, {
|
|
95
|
-
[classes.inputMultilineResizable]: multiline && multilineResizable,
|
|
96
|
-
}),
|
|
97
|
-
}, id: id, name: name, defaultValue: defaultValue, value: value, placeholder: placeholder, status: error ? 'error' : status, disabled: disabled, multiline: multiline, autoFocus: autoFocus, rows: rows, rowsMax: rowsMax, type: type, width: width, size: size, onClick: onClick,
|
|
85
|
+
React.createElement(OutlinedInput, { ref: outlineRef, inputRef: ref, className: className, style: style, highlight: highlight, multiline: multiline, multilineResizable: multilineResizable, id: id, name: name, defaultValue: defaultValue, value: value, placeholder: placeholder, status: error ? 'error' : status, disabled: disabled, autoFocus: autoFocus, rows: rows, rowsMax: rowsMax, type: type, width: width, size: size, onClick: onClick,
|
|
98
86
|
// html attributes
|
|
99
87
|
inputProps: Object.assign(Object.assign({}, rest), inputProps), startAdornment: startAdornment || (React.createElement(StartAdornment, { icon: icon, iconPosition: iconPosition, disabled: disabled })), endAdornment: endAdornment || (React.createElement(EndAdornment, { icon: icon, iconPosition: iconPosition, disabled: disabled, limit: limit, charsLength: charsLength, multiline: multiline, counter: counter, status: status, testIds: testIds, showCounter: showCounter })), onChange: onChange, enableReset: enableReset, onResetClick: onResetClick, testIds: testIds }, children),
|
|
100
88
|
hasMultilineAdornment({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/Input/Input.tsx"],"names":[],"mappings":";;;;;;;;;;;AAOA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/Input/Input.tsx"],"names":[],"mappings":";;;;;;;;;;;AAOA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,EACL,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AA+FrD,MAAM,mBAAmB,GAAG,CAAC,EAC3B,OAAO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AG;IACnB,YAAY,EAAE,MAAM;IACpB,OAAO,EAAE,WAAW;IACpB,YAAY,EAAE,OAAO;IACrB,SAAS,EAAE,KAAK;IAChB,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC;IAClB,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC;IACtB,MAAM,EAAE,SAAS;CAClB,CAAA;AAED,KAAK,CAAC,WAAW,GAAG,OAAO,CAAA;AAE3B,eAAe,KAAK,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toptal/picasso-input",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Toptal UI components library - Input",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -22,22 +22,20 @@
|
|
|
22
22
|
},
|
|
23
23
|
"homepage": "https://github.com/toptal/picasso/tree/master/packages/picasso#readme",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@toptal/picasso-container": "
|
|
26
|
-
"@toptal/picasso-form": "
|
|
27
|
-
"@toptal/picasso-icons": "1.
|
|
28
|
-
"@toptal/picasso-input-adornment": "
|
|
29
|
-
"@toptal/picasso-outlined-input": "
|
|
25
|
+
"@toptal/picasso-container": "2.0.0",
|
|
26
|
+
"@toptal/picasso-form": "4.0.1",
|
|
27
|
+
"@toptal/picasso-icons": "1.6.0",
|
|
28
|
+
"@toptal/picasso-input-adornment": "2.0.1",
|
|
29
|
+
"@toptal/picasso-outlined-input": "2.0.1",
|
|
30
30
|
"@toptal/picasso-shared": "15.0.0",
|
|
31
|
-
"@toptal/picasso-utils": "1.0.3"
|
|
32
|
-
"classnames": "^2.5.1"
|
|
31
|
+
"@toptal/picasso-utils": "1.0.3"
|
|
33
32
|
},
|
|
34
33
|
"sideEffects": [
|
|
35
34
|
"**/styles.ts",
|
|
36
35
|
"**/styles.js"
|
|
37
36
|
],
|
|
38
37
|
"peerDependencies": {
|
|
39
|
-
"@
|
|
40
|
-
"@toptal/picasso-provider": "*",
|
|
38
|
+
"@toptal/picasso-tailwind": ">=2.7",
|
|
41
39
|
"react": ">=16.12.0 < 19.0.0"
|
|
42
40
|
},
|
|
43
41
|
"exports": {
|
|
@@ -45,7 +43,6 @@
|
|
|
45
43
|
"./styles": "./dist-package/src/styles.js"
|
|
46
44
|
},
|
|
47
45
|
"devDependencies": {
|
|
48
|
-
"@toptal/picasso-provider": "4.2.1",
|
|
49
46
|
"@toptal/picasso-test-utils": "1.1.1"
|
|
50
47
|
},
|
|
51
48
|
"files": [
|
package/src/Input/Input.tsx
CHANGED
|
@@ -6,9 +6,6 @@ import type {
|
|
|
6
6
|
MouseEvent,
|
|
7
7
|
} from 'react'
|
|
8
8
|
import React, { forwardRef } from 'react'
|
|
9
|
-
import cx from 'classnames'
|
|
10
|
-
import type { Theme } from '@material-ui/core/styles'
|
|
11
|
-
import { makeStyles } from '@material-ui/core/styles'
|
|
12
9
|
import type { BaseProps, SizeType } from '@toptal/picasso-shared'
|
|
13
10
|
import { useHasMultilineCounter } from '@toptal/picasso-shared'
|
|
14
11
|
import { OutlinedInput } from '@toptal/picasso-outlined-input'
|
|
@@ -29,8 +26,6 @@ import type {
|
|
|
29
26
|
} from '@toptal/picasso-input-adornment'
|
|
30
27
|
import type { BaseInputProps, Status } from '@toptal/picasso-outlined-input'
|
|
31
28
|
|
|
32
|
-
import styles from './styles'
|
|
33
|
-
|
|
34
29
|
export interface Props
|
|
35
30
|
extends BaseProps,
|
|
36
31
|
Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
@@ -119,8 +114,6 @@ type EndAdornmentProps = Pick<
|
|
|
119
114
|
| 'testIds'
|
|
120
115
|
> & { charsLength?: number; showCounter: boolean }
|
|
121
116
|
|
|
122
|
-
const useStyles = makeStyles<Theme>(styles, { name: 'PicassoInput' })
|
|
123
|
-
|
|
124
117
|
const hasRemainingCounter = ({
|
|
125
118
|
counter,
|
|
126
119
|
limit,
|
|
@@ -293,8 +286,6 @@ export const Input = forwardRef<HTMLInputElement, Props>(function Input(
|
|
|
293
286
|
|
|
294
287
|
const charsLength = value ? value.length : 0
|
|
295
288
|
|
|
296
|
-
const classes = useStyles()
|
|
297
|
-
|
|
298
289
|
const showCounter = !!charsLength && hasCounter({ counter, limit })
|
|
299
290
|
|
|
300
291
|
useHasMultilineCounter(name, showCounter && multiline, setHasMultilineCounter)
|
|
@@ -307,14 +298,8 @@ export const Input = forwardRef<HTMLInputElement, Props>(function Input(
|
|
|
307
298
|
className={className}
|
|
308
299
|
style={style}
|
|
309
300
|
highlight={highlight}
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
[classes.rootMultiline]: multiline,
|
|
313
|
-
}),
|
|
314
|
-
input: cx(classes.input, {
|
|
315
|
-
[classes.inputMultilineResizable]: multiline && multilineResizable,
|
|
316
|
-
}),
|
|
317
|
-
}}
|
|
301
|
+
multiline={multiline}
|
|
302
|
+
multilineResizable={multilineResizable}
|
|
318
303
|
id={id}
|
|
319
304
|
name={name}
|
|
320
305
|
defaultValue={defaultValue}
|
|
@@ -322,7 +307,6 @@ export const Input = forwardRef<HTMLInputElement, Props>(function Input(
|
|
|
322
307
|
placeholder={placeholder}
|
|
323
308
|
status={error ? 'error' : status}
|
|
324
309
|
disabled={disabled}
|
|
325
|
-
multiline={multiline}
|
|
326
310
|
autoFocus={autoFocus}
|
|
327
311
|
rows={rows}
|
|
328
312
|
rowsMax={rowsMax}
|
|
@@ -6,13 +6,13 @@ exports[`Input renders icon in the beginning 1`] = `
|
|
|
6
6
|
class="Picasso-root"
|
|
7
7
|
>
|
|
8
8
|
<div
|
|
9
|
-
class="
|
|
9
|
+
class="base-Input base-Input base-Input relative inline-flex gap-y gap-x items-center rounded-sm [font-size:_unset] hover:[&_.resetButtonDirty]:visible p-2 h-8 w-[18.75rem] bg-white after:content-[""] after:inline-block after:absolute after:top-0 after:bottom-0 after:right-0 after:left-0 after:pointer-events after:border-solid after:rounded-sm after:border-gray [&:has(input:focus)]:after:border-blue after:border [&:has(input:focus)]:after:shadow-[0_0_0_3px] [&:has(input:focus)]:after:shadow-blue hover:[&:not(:has(input:focus))]:after:border-gray text-black cursor-[inherit]"
|
|
10
10
|
>
|
|
11
11
|
<div
|
|
12
|
-
class="
|
|
12
|
+
class="text-graphite h-auto flex items-center whitespace-nowrap max-h pointer-events"
|
|
13
13
|
>
|
|
14
14
|
<svg
|
|
15
|
-
class="PicassoSvgSearch16-root
|
|
15
|
+
class="PicassoSvgSearch16-root grow shrink basis-0"
|
|
16
16
|
style="min-width: 16px; min-height: 16px;"
|
|
17
17
|
viewBox="0 0 16 16"
|
|
18
18
|
>
|
|
@@ -24,24 +24,10 @@ exports[`Input renders icon in the beginning 1`] = `
|
|
|
24
24
|
<input
|
|
25
25
|
aria-invalid="false"
|
|
26
26
|
autocomplete="none"
|
|
27
|
-
class="
|
|
27
|
+
class="base-Input [&::-webkit-calendar-picker-indicator]:bg bg-transparent border-none box-border cursor-[inherit] h-full outline-none p-0 peer resize-none w-full text-md leading-4 text-black [&::placeholder]:text-gray [&::placeholder]:opacity-100"
|
|
28
28
|
type="text"
|
|
29
29
|
value=""
|
|
30
30
|
/>
|
|
31
|
-
<fieldset
|
|
32
|
-
aria-hidden="true"
|
|
33
|
-
class="PrivateNotchedOutline-root MuiOutlinedInput-notchedOutline PicassoOutlinedInput-notchedOutline"
|
|
34
|
-
style="padding-left: 8px;"
|
|
35
|
-
>
|
|
36
|
-
<legend
|
|
37
|
-
class="PrivateNotchedOutline-legend"
|
|
38
|
-
style="width: 0.01px;"
|
|
39
|
-
>
|
|
40
|
-
<span>
|
|
41
|
-
|
|
42
|
-
</span>
|
|
43
|
-
</legend>
|
|
44
|
-
</fieldset>
|
|
45
31
|
</div>
|
|
46
32
|
</div>
|
|
47
33
|
</div>
|
|
@@ -53,13 +39,13 @@ exports[`Input renders icon in the end 1`] = `
|
|
|
53
39
|
class="Picasso-root"
|
|
54
40
|
>
|
|
55
41
|
<div
|
|
56
|
-
class="
|
|
42
|
+
class="base-Input base-Input base-Input relative inline-flex gap-y gap-x items-center rounded-sm [font-size:_unset] hover:[&_.resetButtonDirty]:visible p-2 h-8 w-[18.75rem] bg-white after:content-[""] after:inline-block after:absolute after:top-0 after:bottom-0 after:right-0 after:left-0 after:pointer-events after:border-solid after:rounded-sm after:border-gray [&:has(input:focus)]:after:border-blue after:border [&:has(input:focus)]:after:shadow-[0_0_0_3px] [&:has(input:focus)]:after:shadow-blue hover:[&:not(:has(input:focus))]:after:border-gray text-black cursor-[inherit]"
|
|
57
43
|
>
|
|
58
44
|
<div
|
|
59
|
-
class="
|
|
45
|
+
class="text-graphite h-auto flex items-center whitespace-nowrap max-h pointer-events"
|
|
60
46
|
>
|
|
61
47
|
<svg
|
|
62
|
-
class="PicassoSvgSearch16-root
|
|
48
|
+
class="PicassoSvgSearch16-root grow shrink basis-0"
|
|
63
49
|
style="min-width: 16px; min-height: 16px;"
|
|
64
50
|
viewBox="0 0 16 16"
|
|
65
51
|
>
|
|
@@ -71,24 +57,10 @@ exports[`Input renders icon in the end 1`] = `
|
|
|
71
57
|
<input
|
|
72
58
|
aria-invalid="false"
|
|
73
59
|
autocomplete="none"
|
|
74
|
-
class="
|
|
60
|
+
class="base-Input [&::-webkit-calendar-picker-indicator]:bg bg-transparent border-none box-border cursor-[inherit] h-full outline-none p-0 peer resize-none w-full text-md leading-4 text-black [&::placeholder]:text-gray [&::placeholder]:opacity-100"
|
|
75
61
|
type="text"
|
|
76
62
|
value=""
|
|
77
63
|
/>
|
|
78
|
-
<fieldset
|
|
79
|
-
aria-hidden="true"
|
|
80
|
-
class="PrivateNotchedOutline-root MuiOutlinedInput-notchedOutline PicassoOutlinedInput-notchedOutline"
|
|
81
|
-
style="padding-left: 8px;"
|
|
82
|
-
>
|
|
83
|
-
<legend
|
|
84
|
-
class="PrivateNotchedOutline-legend"
|
|
85
|
-
style="width: 0.01px;"
|
|
86
|
-
>
|
|
87
|
-
<span>
|
|
88
|
-
|
|
89
|
-
</span>
|
|
90
|
-
</legend>
|
|
91
|
-
</fieldset>
|
|
92
64
|
</div>
|
|
93
65
|
</div>
|
|
94
66
|
</div>
|
|
@@ -100,38 +72,24 @@ exports[`Input should show manual resize handler 1`] = `
|
|
|
100
72
|
class="Picasso-root"
|
|
101
73
|
>
|
|
102
74
|
<div
|
|
103
|
-
class="
|
|
75
|
+
class="base-Input base-Input base-Input base-Input relative inline-flex gap-y gap-x items-center rounded-sm [font-size:_unset] hover:[&_.resetButtonDirty]:visible p-2 h-auto w-[18.75rem] bg-white after:content-[""] after:inline-block after:absolute after:top-0 after:bottom-0 after:right-0 after:left-0 after:pointer-events after:border-solid after:rounded-sm after:border-gray [&:has(input:focus)]:after:border-blue after:border [&:has(input:focus)]:after:shadow-[0_0_0_3px] [&:has(input:focus)]:after:shadow-blue hover:[&:not(:has(input:focus))]:after:border-gray text-black cursor-[inherit]"
|
|
104
76
|
>
|
|
105
77
|
<textarea
|
|
106
78
|
aria-invalid="false"
|
|
107
79
|
autocomplete="none"
|
|
108
|
-
class="
|
|
109
|
-
rows="4"
|
|
80
|
+
class="base-Input base-Input [&::-webkit-calendar-picker-indicator]:bg bg-transparent border-none box-border cursor-[inherit] h-full outline-none p-0 peer w-full text-md leading-4 text-black [&::placeholder]:text-gray [&::placeholder]:opacity-100 resize-y"
|
|
110
81
|
style="height: 0px; overflow: hidden;"
|
|
82
|
+
type="text"
|
|
111
83
|
>
|
|
112
84
|
Some value
|
|
113
85
|
</textarea>
|
|
114
86
|
<textarea
|
|
115
87
|
aria-hidden="true"
|
|
116
|
-
class="
|
|
88
|
+
class="base-Input base-Input [&::-webkit-calendar-picker-indicator]:bg bg-transparent border-none box-border cursor-[inherit] h-full outline-none p-0 peer w-full text-md leading-4 text-black [&::placeholder]:text-gray [&::placeholder]:opacity-100 resize-y"
|
|
117
89
|
readonly=""
|
|
118
|
-
style="visibility: hidden; position: absolute; overflow: hidden; height: 0px; top: 0px; left: 0px; transform: translateZ(0);
|
|
90
|
+
style="visibility: hidden; position: absolute; overflow: hidden; height: 0px; top: 0px; left: 0px; transform: translateZ(0); padding-top: 0px; padding-bottom: 0px;"
|
|
119
91
|
tabindex="-1"
|
|
120
92
|
/>
|
|
121
|
-
<fieldset
|
|
122
|
-
aria-hidden="true"
|
|
123
|
-
class="PrivateNotchedOutline-root MuiOutlinedInput-notchedOutline PicassoOutlinedInput-notchedOutline"
|
|
124
|
-
style="padding-left: 8px;"
|
|
125
|
-
>
|
|
126
|
-
<legend
|
|
127
|
-
class="PrivateNotchedOutline-legend"
|
|
128
|
-
style="width: 0.01px;"
|
|
129
|
-
>
|
|
130
|
-
<span>
|
|
131
|
-
|
|
132
|
-
</span>
|
|
133
|
-
</legend>
|
|
134
|
-
</fieldset>
|
|
135
93
|
</div>
|
|
136
94
|
</div>
|
|
137
95
|
</div>
|
|
@@ -143,17 +101,17 @@ exports[`Input should show reset button 1`] = `
|
|
|
143
101
|
class="Picasso-root"
|
|
144
102
|
>
|
|
145
103
|
<div
|
|
146
|
-
class="
|
|
104
|
+
class="base-Input base-Input base-Input relative inline-flex gap-y gap-x items-center rounded-sm [font-size:_unset] hover:[&_.resetButtonDirty]:visible p-2 h-8 w-[18.75rem] bg-white after:content-[""] after:inline-block after:absolute after:top-0 after:bottom-0 after:right-0 after:left-0 after:pointer-events after:border-solid after:rounded-sm after:border-gray [&:has(input:focus)]:after:border-blue after:border [&:has(input:focus)]:after:shadow-[0_0_0_3px] [&:has(input:focus)]:after:shadow-blue hover:[&:not(:has(input:focus))]:after:border-gray text-black cursor-[inherit]"
|
|
147
105
|
>
|
|
148
106
|
<input
|
|
149
107
|
aria-invalid="false"
|
|
150
108
|
autocomplete="none"
|
|
151
|
-
class="
|
|
109
|
+
class="base-Input [&::-webkit-calendar-picker-indicator]:bg bg-transparent border-none box-border cursor-[inherit] h-full outline-none p-0 peer resize-none w-full text-md leading-4 text-black [&::placeholder]:text-gray [&::placeholder]:opacity-100"
|
|
152
110
|
type="text"
|
|
153
111
|
value="Some value"
|
|
154
112
|
/>
|
|
155
113
|
<div
|
|
156
|
-
class="
|
|
114
|
+
class="text-graphite h-auto flex items-center whitespace-nowrap max-h justify-end ml-auto flex-grow flex-shrink basis-auto invisible peer-focus:visible peer-hover:visible"
|
|
157
115
|
data-testid="reset-adornment"
|
|
158
116
|
>
|
|
159
117
|
<button
|
|
@@ -165,7 +123,7 @@ exports[`Input should show reset button 1`] = `
|
|
|
165
123
|
type="button"
|
|
166
124
|
>
|
|
167
125
|
<span
|
|
168
|
-
class="
|
|
126
|
+
class="items-center inline-flex font-semibold whitespace-nowrap text-button"
|
|
169
127
|
>
|
|
170
128
|
<svg
|
|
171
129
|
class="PicassoSvgCloseMinor16-root text-[1.2em] flex-1"
|
|
@@ -179,20 +137,6 @@ exports[`Input should show reset button 1`] = `
|
|
|
179
137
|
</span>
|
|
180
138
|
</button>
|
|
181
139
|
</div>
|
|
182
|
-
<fieldset
|
|
183
|
-
aria-hidden="true"
|
|
184
|
-
class="PrivateNotchedOutline-root MuiOutlinedInput-notchedOutline PicassoOutlinedInput-notchedOutline"
|
|
185
|
-
style="padding-left: 8px;"
|
|
186
|
-
>
|
|
187
|
-
<legend
|
|
188
|
-
class="PrivateNotchedOutline-legend"
|
|
189
|
-
style="width: 0.01px;"
|
|
190
|
-
>
|
|
191
|
-
<span>
|
|
192
|
-
|
|
193
|
-
</span>
|
|
194
|
-
</legend>
|
|
195
|
-
</fieldset>
|
|
196
140
|
</div>
|
|
197
141
|
</div>
|
|
198
142
|
</div>
|
|
@@ -204,39 +148,25 @@ exports[`Input shows counter for multiline input 1`] = `
|
|
|
204
148
|
class="Picasso-root"
|
|
205
149
|
>
|
|
206
150
|
<div
|
|
207
|
-
class="
|
|
151
|
+
class="base-Input base-Input base-Input base-Input relative inline-flex gap-y gap-x items-center rounded-sm [font-size:_unset] hover:[&_.resetButtonDirty]:visible p-2 h-auto w-[18.75rem] bg-white after:content-[""] after:inline-block after:absolute after:top-0 after:bottom-0 after:right-0 after:left-0 after:pointer-events after:border-solid after:rounded-sm after:border-gray [&:has(input:focus)]:after:border-blue after:border [&:has(input:focus)]:after:shadow-[0_0_0_3px] [&:has(input:focus)]:after:shadow-blue hover:[&:not(:has(input:focus))]:after:border-gray text-black cursor-[inherit]"
|
|
208
152
|
>
|
|
209
153
|
<textarea
|
|
210
154
|
aria-invalid="false"
|
|
211
155
|
autocomplete="none"
|
|
212
|
-
class="
|
|
213
|
-
rows="4"
|
|
156
|
+
class="base-Input base-Input [&::-webkit-calendar-picker-indicator]:bg bg-transparent border-none box-border cursor-[inherit] h-full outline-none p-0 peer resize-none w-full text-md leading-4 text-black [&::placeholder]:text-gray [&::placeholder]:opacity-100"
|
|
214
157
|
style="height: 0px; overflow: hidden;"
|
|
158
|
+
type="text"
|
|
215
159
|
/>
|
|
216
160
|
<textarea
|
|
217
161
|
aria-hidden="true"
|
|
218
|
-
class="
|
|
162
|
+
class="base-Input base-Input [&::-webkit-calendar-picker-indicator]:bg bg-transparent border-none box-border cursor-[inherit] h-full outline-none p-0 peer resize-none w-full text-md leading-4 text-black [&::placeholder]:text-gray [&::placeholder]:opacity-100"
|
|
219
163
|
readonly=""
|
|
220
|
-
style="visibility: hidden; position: absolute; overflow: hidden; height: 0px; top: 0px; left: 0px; transform: translateZ(0);
|
|
164
|
+
style="visibility: hidden; position: absolute; overflow: hidden; height: 0px; top: 0px; left: 0px; transform: translateZ(0); padding-top: 0px; padding-bottom: 0px;"
|
|
221
165
|
tabindex="-1"
|
|
222
166
|
/>
|
|
223
|
-
<fieldset
|
|
224
|
-
aria-hidden="true"
|
|
225
|
-
class="PrivateNotchedOutline-root MuiOutlinedInput-notchedOutline PicassoOutlinedInput-notchedOutline"
|
|
226
|
-
style="padding-left: 8px;"
|
|
227
|
-
>
|
|
228
|
-
<legend
|
|
229
|
-
class="PrivateNotchedOutline-legend"
|
|
230
|
-
style="width: 0.01px;"
|
|
231
|
-
>
|
|
232
|
-
<span>
|
|
233
|
-
|
|
234
|
-
</span>
|
|
235
|
-
</legend>
|
|
236
|
-
</fieldset>
|
|
237
167
|
</div>
|
|
238
168
|
<div
|
|
239
|
-
class="
|
|
169
|
+
class="flex"
|
|
240
170
|
/>
|
|
241
171
|
</div>
|
|
242
172
|
</div>
|
|
@@ -248,29 +178,15 @@ exports[`Input shows counter for regular input 1`] = `
|
|
|
248
178
|
class="Picasso-root"
|
|
249
179
|
>
|
|
250
180
|
<div
|
|
251
|
-
class="
|
|
181
|
+
class="base-Input base-Input base-Input relative inline-flex gap-y gap-x items-center rounded-sm [font-size:_unset] hover:[&_.resetButtonDirty]:visible p-2 h-8 w-[18.75rem] bg-white after:content-[""] after:inline-block after:absolute after:top-0 after:bottom-0 after:right-0 after:left-0 after:pointer-events after:border-solid after:rounded-sm after:border-gray [&:has(input:focus)]:after:border-blue after:border [&:has(input:focus)]:after:shadow-[0_0_0_3px] [&:has(input:focus)]:after:shadow-blue hover:[&:not(:has(input:focus))]:after:border-gray text-black cursor-[inherit]"
|
|
252
182
|
>
|
|
253
183
|
<input
|
|
254
184
|
aria-invalid="false"
|
|
255
185
|
autocomplete="none"
|
|
256
|
-
class="
|
|
186
|
+
class="base-Input [&::-webkit-calendar-picker-indicator]:bg bg-transparent border-none box-border cursor-[inherit] h-full outline-none p-0 peer resize-none w-full text-md leading-4 text-black [&::placeholder]:text-gray [&::placeholder]:opacity-100"
|
|
257
187
|
type="text"
|
|
258
188
|
value=""
|
|
259
189
|
/>
|
|
260
|
-
<fieldset
|
|
261
|
-
aria-hidden="true"
|
|
262
|
-
class="PrivateNotchedOutline-root MuiOutlinedInput-notchedOutline PicassoOutlinedInput-notchedOutline"
|
|
263
|
-
style="padding-left: 8px;"
|
|
264
|
-
>
|
|
265
|
-
<legend
|
|
266
|
-
class="PrivateNotchedOutline-legend"
|
|
267
|
-
style="width: 0.01px;"
|
|
268
|
-
>
|
|
269
|
-
<span>
|
|
270
|
-
|
|
271
|
-
</span>
|
|
272
|
-
</legend>
|
|
273
|
-
</fieldset>
|
|
274
190
|
</div>
|
|
275
191
|
</div>
|
|
276
192
|
</div>
|
|
@@ -278,7 +194,7 @@ exports[`Input shows counter for regular input 1`] = `
|
|
|
278
194
|
|
|
279
195
|
exports[`Input shows excess chars for multiline input with exceeded limit 1`] = `
|
|
280
196
|
<div
|
|
281
|
-
class="
|
|
197
|
+
class="flex text-[0.625rem] leading-[1] mt-1 mr-[0.125rem] text-red"
|
|
282
198
|
data-testid="limit-adornment-multiline-label"
|
|
283
199
|
>
|
|
284
200
|
<span>
|
|
@@ -297,7 +213,7 @@ exports[`Input shows excess chars for multiline input with exceeded limit 1`] =
|
|
|
297
213
|
|
|
298
214
|
exports[`Input shows remaining chars for for multiline input with limit 1`] = `
|
|
299
215
|
<div
|
|
300
|
-
class="
|
|
216
|
+
class="flex text-[0.625rem] leading-[1] mt-1 mr-[0.125rem] text-red"
|
|
301
217
|
data-testid="limit-adornment-multiline-label"
|
|
302
218
|
>
|
|
303
219
|
<span>
|
|
@@ -20,7 +20,7 @@ const Example = () => {
|
|
|
20
20
|
</Container>
|
|
21
21
|
<Container padded={SPACING_4}>
|
|
22
22
|
<Typography variant='heading' size='small'>
|
|
23
|
-
With auto-expand (up to 5 rows) and manual resize
|
|
23
|
+
With auto-expand (up to 5 rows) and manual resize (not limited)
|
|
24
24
|
</Typography>
|
|
25
25
|
<Container right={SPACING_4}>
|
|
26
26
|
<Input
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import '@toptal/picasso-outlined-input/styles';
|
|
2
|
-
import '@toptal/picasso-input-adornment/styles';
|
|
3
|
-
import '../InputBase/styles';
|
|
4
|
-
declare const _default: () => import("@material-ui/styles").StyleRules<{}, "root" | "rootMultiline" | "inputMultilineResizable">;
|
|
5
|
-
export default _default;
|
|
6
|
-
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Input/styles.ts"],"names":[],"mappings":"AACA,OAAO,uCAAuC,CAAA;AAC9C,OAAO,wCAAwC,CAAA;AAE/C,OAAO,qBAAqB,CAAA;;AAE5B,wBAWI"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { createStyles } from '@material-ui/core/styles';
|
|
2
|
-
import '@toptal/picasso-outlined-input/styles';
|
|
3
|
-
import '@toptal/picasso-input-adornment/styles';
|
|
4
|
-
import '../InputBase/styles';
|
|
5
|
-
export default () => createStyles({
|
|
6
|
-
root: {
|
|
7
|
-
cursor: 'text',
|
|
8
|
-
},
|
|
9
|
-
rootMultiline: {
|
|
10
|
-
height: 'auto',
|
|
11
|
-
},
|
|
12
|
-
inputMultilineResizable: {
|
|
13
|
-
resize: 'vertical',
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/Input/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,uCAAuC,CAAA;AAC9C,OAAO,wCAAwC,CAAA;AAE/C,OAAO,qBAAqB,CAAA;AAE5B,eAAe,GAAG,EAAE,CAClB,YAAY,CAAC;IACX,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM;KACf;IACD,aAAa,EAAE;QACb,MAAM,EAAE,MAAM;KACf;IACD,uBAAuB,EAAE;QACvB,MAAM,EAAE,UAAU;KACnB;CACF,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/InputBase/styles.ts"],"names":[],"mappings":""}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { PicassoProvider } from '@toptal/picasso-provider';
|
|
2
|
-
PicassoProvider.override(({ typography, palette }) => ({
|
|
3
|
-
MuiInputBase: {
|
|
4
|
-
root: {
|
|
5
|
-
fontSize: 'unset',
|
|
6
|
-
backgroundColor: palette.common.white,
|
|
7
|
-
},
|
|
8
|
-
input: {
|
|
9
|
-
fontSize: typography.inputSize,
|
|
10
|
-
lineHeight: '1.2em',
|
|
11
|
-
},
|
|
12
|
-
error: {
|
|
13
|
-
color: palette.red.main,
|
|
14
|
-
backgroundColor: palette.red.lighter,
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
}));
|
|
18
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/InputBase/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAE1D,eAAe,CAAC,QAAQ,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,EAAS,EAAE,EAAE,CAAC,CAAC;IAC5D,YAAY,EAAE;QACZ,IAAI,EAAE;YACJ,QAAQ,EAAE,OAAO;YACjB,eAAe,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK;SACtC;QACD,KAAK,EAAE;YACL,QAAQ,EAAE,UAAU,CAAC,SAAS;YAC9B,UAAU,EAAE,OAAO;SACpB;QACD,KAAK,EAAE;YACL,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,IAAI;YACvB,eAAe,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO;SACrC;KACF;CACF,CAAC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/styles.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/styles.ts"],"names":[],"mappings":""}
|
package/src/Input/styles.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { createStyles } from '@material-ui/core/styles'
|
|
2
|
-
import '@toptal/picasso-outlined-input/styles'
|
|
3
|
-
import '@toptal/picasso-input-adornment/styles'
|
|
4
|
-
|
|
5
|
-
import '../InputBase/styles'
|
|
6
|
-
|
|
7
|
-
export default () =>
|
|
8
|
-
createStyles({
|
|
9
|
-
root: {
|
|
10
|
-
cursor: 'text',
|
|
11
|
-
},
|
|
12
|
-
rootMultiline: {
|
|
13
|
-
height: 'auto',
|
|
14
|
-
},
|
|
15
|
-
inputMultilineResizable: {
|
|
16
|
-
resize: 'vertical',
|
|
17
|
-
},
|
|
18
|
-
})
|
package/src/InputBase/styles.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Theme } from '@material-ui/core/styles'
|
|
2
|
-
import { PicassoProvider } from '@toptal/picasso-provider'
|
|
3
|
-
|
|
4
|
-
PicassoProvider.override(({ typography, palette }: Theme) => ({
|
|
5
|
-
MuiInputBase: {
|
|
6
|
-
root: {
|
|
7
|
-
fontSize: 'unset',
|
|
8
|
-
backgroundColor: palette.common.white,
|
|
9
|
-
},
|
|
10
|
-
input: {
|
|
11
|
-
fontSize: typography.inputSize,
|
|
12
|
-
lineHeight: '1.2em',
|
|
13
|
-
},
|
|
14
|
-
error: {
|
|
15
|
-
color: palette.red.main,
|
|
16
|
-
backgroundColor: palette.red.lighter,
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
}))
|
package/src/styles.ts
DELETED