@toptal/picasso-input-adornment 1.0.8 → 2.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/InputAdornment/InputAdornment.d.ts.map +1 -1
- package/dist-package/src/InputAdornment/InputAdornment.js +3 -13
- package/dist-package/src/InputAdornment/InputAdornment.js.map +1 -1
- package/dist-package/src/InputIconAdornment/InputIconAdornment.d.ts.map +1 -1
- package/dist-package/src/InputIconAdornment/InputIconAdornment.js +1 -7
- package/dist-package/src/InputIconAdornment/InputIconAdornment.js.map +1 -1
- package/dist-package/src/InputLimitAdornment/InputLimitAdornment.d.ts.map +1 -1
- package/dist-package/src/InputLimitAdornment/InputLimitAdornment.js +3 -11
- package/dist-package/src/InputLimitAdornment/InputLimitAdornment.js.map +1 -1
- package/dist-package/src/InputMultilineAdornment/InputMultilineAdornment.d.ts.map +1 -1
- package/dist-package/src/InputMultilineAdornment/InputMultilineAdornment.js +2 -10
- package/dist-package/src/InputMultilineAdornment/InputMultilineAdornment.js.map +1 -1
- package/package.json +7 -8
- package/src/InputAdornment/InputAdornment.tsx +11 -21
- package/src/InputIconAdornment/InputIconAdornment.tsx +1 -9
- package/src/InputLimitAdornment/InputLimitAdornment.tsx +6 -13
- package/src/InputMultilineAdornment/InputMultilineAdornment.tsx +5 -13
- package/dist-package/src/InputAdornment/styles.d.ts +0 -4
- package/dist-package/src/InputAdornment/styles.d.ts.map +0 -1
- package/dist-package/src/InputAdornment/styles.js +0 -27
- package/dist-package/src/InputAdornment/styles.js.map +0 -1
- package/dist-package/src/InputIconAdornment/styles.d.ts +0 -3
- package/dist-package/src/InputIconAdornment/styles.d.ts.map +0 -1
- package/dist-package/src/InputIconAdornment/styles.js +0 -7
- package/dist-package/src/InputIconAdornment/styles.js.map +0 -1
- package/dist-package/src/InputLimitAdornment/styles.d.ts +0 -4
- package/dist-package/src/InputLimitAdornment/styles.d.ts.map +0 -1
- package/dist-package/src/InputLimitAdornment/styles.js +0 -12
- package/dist-package/src/InputLimitAdornment/styles.js.map +0 -1
- package/dist-package/src/InputMultilineAdornment/styles.d.ts +0 -4
- package/dist-package/src/InputMultilineAdornment/styles.d.ts.map +0 -1
- package/dist-package/src/InputMultilineAdornment/styles.js +0 -16
- package/dist-package/src/InputMultilineAdornment/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/InputAdornment/styles.ts +0 -30
- package/src/InputIconAdornment/styles.ts +0 -8
- package/src/InputLimitAdornment/styles.ts +0 -14
- package/src/InputMultilineAdornment/styles.ts +0 -20
- package/src/styles.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputAdornment.d.ts","sourceRoot":"","sources":["../../../src/InputAdornment/InputAdornment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAc,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"InputAdornment.d.ts","sourceRoot":"","sources":["../../../src/InputAdornment/InputAdornment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAc,MAAM,OAAO,CAAA;AAElE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAIvD,aAAK,YAAY,GAAG,OAAO,GAAG,KAAK,CAAA;AAEnC,MAAM,WAAW,KAAM,SAAQ,SAAS,EAAE,cAAc,CAAC,cAAc,CAAC;IACtE,QAAQ,EAAE,SAAS,CAAA;IACnB,QAAQ,EAAE,YAAY,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,QAAA,MAAM,cAAc,UAAW,KAAK,gBA2CnC,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -10,28 +10,18 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import React, { useCallback } from 'react';
|
|
13
|
-
import { makeStyles } from '@material-ui/core/styles';
|
|
14
|
-
import { InputAdornment as MUIInputAdornment } from '@material-ui/core';
|
|
15
|
-
import cx from 'classnames';
|
|
16
13
|
import { noop } from '@toptal/picasso-utils';
|
|
17
|
-
import
|
|
18
|
-
const useStyles = makeStyles(styles, {
|
|
19
|
-
name: 'PicassoInputAdornment',
|
|
20
|
-
});
|
|
14
|
+
import { twMerge } from '@toptal/picasso-tailwind-merge';
|
|
21
15
|
const InputAdornment = (props) => {
|
|
22
16
|
const { className, style, children, position, disabled, disablePointerEvents, stopPropagation, 'data-testid': dataTestId, onClick = noop } = props, rest = __rest(props, ["className", "style", "children", "position", "disabled", "disablePointerEvents", "stopPropagation", 'data-testid', "onClick"]);
|
|
23
|
-
const classes = useStyles();
|
|
24
17
|
const handleClick = useCallback((event) => {
|
|
25
18
|
if (stopPropagation) {
|
|
26
19
|
event.stopPropagation();
|
|
27
20
|
}
|
|
28
21
|
onClick(event);
|
|
29
22
|
}, [onClick, stopPropagation]);
|
|
30
|
-
return (React.createElement(
|
|
31
|
-
|
|
32
|
-
[classes.rootDisabled]: disabled,
|
|
33
|
-
}),
|
|
34
|
-
}, className: className, style: style, position: position, disablePointerEvents: disablePointerEvents, onClick: handleClick, "data-testid": dataTestId }), children));
|
|
23
|
+
return (React.createElement("div", Object.assign({}, rest, { className: twMerge('text-graphite-700 h-auto flex items-center whitespace-nowrap max-h-[2em]', disabled && 'text-opacity-[0.48]', position === 'end' &&
|
|
24
|
+
'justify-end ml-auto flex-grow-0 flex-shrink-0 basis-auto', disablePointerEvents && 'pointer-events-none', className), style: style, onClick: handleClick, "data-testid": dataTestId }), children));
|
|
35
25
|
};
|
|
36
26
|
export default InputAdornment;
|
|
37
27
|
//# sourceMappingURL=InputAdornment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputAdornment.js","sourceRoot":"","sources":["../../../src/InputAdornment/InputAdornment.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAE1C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"InputAdornment.js","sourceRoot":"","sources":["../../../src/InputAdornment/InputAdornment.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAE1C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AAaxD,MAAM,cAAc,GAAG,CAAC,KAAY,EAAE,EAAE;IACtC,MAAM,EACJ,SAAS,EACT,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,oBAAoB,EACpB,eAAe,EACf,aAAa,EAAE,UAAU,EACzB,OAAO,GAAG,IAAI,KAEZ,KAAK,EADJ,IAAI,UACL,KAAK,EAXH,+HAWL,CAAQ,CAAA;IAET,MAAM,WAAW,GAAG,WAAW,CAC7B,CAAC,KAAiC,EAAE,EAAE;QACpC,IAAI,eAAe,EAAE;YACnB,KAAK,CAAC,eAAe,EAAE,CAAA;SACxB;QAED,OAAO,CAAC,KAAK,CAAC,CAAA;IAChB,CAAC,EACD,CAAC,OAAO,EAAE,eAAe,CAAC,CAC3B,CAAA;IAED,OAAO,CACL,6CACM,IAAI,IACR,SAAS,EAAE,OAAO,CAChB,0EAA0E,EAC1E,QAAQ,IAAI,qBAAqB,EACjC,QAAQ,KAAK,KAAK;YAChB,0DAA0D,EAC5D,oBAAoB,IAAI,qBAAqB,EAC7C,SAAS,CACV,EACD,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,WAAW,iBACP,UAAU,KAEtB,QAAQ,CACL,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputIconAdornment.d.ts","sourceRoot":"","sources":["../../../src/InputIconAdornment/InputIconAdornment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"InputIconAdornment.d.ts","sourceRoot":"","sources":["../../../src/InputIconAdornment/InputIconAdornment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAA;AAKpD,aAAK,YAAY,GAAG,OAAO,GAAG,KAAK,CAAA;AAEnC,MAAM,WAAW,KAAK;IACpB,QAAQ,EAAE,YAAY,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB;AAED,QAAA,MAAM,kBAAkB,UAAW,KAAK,gBAgBvC,CAAA;AAED,eAAe,kBAAkB,CAAA"}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { makeStyles } from '@material-ui/core/styles';
|
|
3
|
-
import styles from './styles';
|
|
4
2
|
import { InputAdornment } from '../InputAdornment';
|
|
5
|
-
const useStyles = makeStyles(styles, {
|
|
6
|
-
name: 'PicassoInputIconAdornment',
|
|
7
|
-
});
|
|
8
3
|
const InputIconAdornment = (props) => {
|
|
9
4
|
const { position, disabled, icon } = props;
|
|
10
|
-
const classes = useStyles();
|
|
11
5
|
const styledIcon = React.cloneElement(icon, {
|
|
12
|
-
className:
|
|
6
|
+
className: 'grow shrink basis-0',
|
|
13
7
|
role: 'presentation',
|
|
14
8
|
});
|
|
15
9
|
return (React.createElement(InputAdornment, { position: position, disabled: disabled, disablePointerEvents: true }, styledIcon));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputIconAdornment.js","sourceRoot":"","sources":["../../../src/InputIconAdornment/InputIconAdornment.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"InputIconAdornment.js","sourceRoot":"","sources":["../../../src/InputIconAdornment/InputIconAdornment.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAUlD,MAAM,kBAAkB,GAAG,CAAC,KAAY,EAAE,EAAE;IAC1C,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,KAAK,CAAA;IAC1C,MAAM,UAAU,GAAG,KAAK,CAAC,YAAY,CAAC,IAAoB,EAAE;QAC1D,SAAS,EAAE,qBAAqB;QAChC,IAAI,EAAE,cAAc;KACrB,CAAC,CAAA;IAEF,OAAO,CACL,oBAAC,cAAc,IACb,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,oBAAoB,UAEnB,UAAU,CACI,CAClB,CAAA;AACH,CAAC,CAAA;AAED,eAAe,kBAAkB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputLimitAdornment.d.ts","sourceRoot":"","sources":["../../../src/InputLimitAdornment/InputLimitAdornment.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"InputLimitAdornment.d.ts","sourceRoot":"","sources":["../../../src/InputLimitAdornment/InputLimitAdornment.tsx"],"names":[],"mappings":";AAMA,aAAK,WAAW,GAAG,WAAW,GAAG,SAAS,CAAA;AAE1C,MAAM,WAAW,KAAK;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,OAAO,EAAE,WAAW,CAAA;IACpB,OAAO,CAAC,EAAE;QACR,cAAc,CAAC,EAAE,MAAM,CAAA;QACvB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB,CAAA;CACF;AAgCD,QAAA,MAAM,mBAAmB,UAAW,KAAK,gBAyCxC,CAAA;AAED,eAAe,mBAAmB,CAAA"}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { InputAdornment } from '@material-ui/core';
|
|
5
|
-
import styles from './styles';
|
|
2
|
+
import { twJoin } from '@toptal/picasso-tailwind-merge';
|
|
3
|
+
import { InputAdornment } from '../InputAdornment';
|
|
6
4
|
import { InputMultilineAdornment } from '../InputMultilineAdornment';
|
|
7
|
-
const useStyles = makeStyles(styles, {
|
|
8
|
-
name: 'PicassoInputLimitAdornment',
|
|
9
|
-
});
|
|
10
5
|
const hasRemainingCounter = (counter) => counter === 'remaining';
|
|
11
6
|
const formatCharacters = (count) => count === 1 ? 'character' : 'characters';
|
|
12
7
|
const getCharsTillLimit = (charsLength, counter, limit) => (hasRemainingCounter(counter) ? limit - charsLength : charsLength);
|
|
@@ -22,7 +17,6 @@ const getMultilineLabel = ({ multiline, charsTillLimit, counter, }) => {
|
|
|
22
17
|
return `${formatCharacters(charsTillLimit)} entered`;
|
|
23
18
|
};
|
|
24
19
|
const InputLimitAdornment = (props) => {
|
|
25
|
-
const classes = useStyles();
|
|
26
20
|
const { multiline, charsLength, counter, limit, testIds } = props;
|
|
27
21
|
const charsTillLimit = getCharsTillLimit(charsLength, counter, limit);
|
|
28
22
|
const multilineLabel = getMultilineLabel({
|
|
@@ -38,9 +32,7 @@ const InputLimitAdornment = (props) => {
|
|
|
38
32
|
' ',
|
|
39
33
|
React.createElement("span", null, multilineLabel))));
|
|
40
34
|
}
|
|
41
|
-
return (React.createElement(InputAdornment, { "data-testid": testIds === null || testIds === void 0 ? void 0 : testIds.inputAdornment, position: 'end', disablePointerEvents: true, className:
|
|
42
|
-
[classes.limiterLabelError]: error,
|
|
43
|
-
}) },
|
|
35
|
+
return (React.createElement(InputAdornment, { "data-testid": testIds === null || testIds === void 0 ? void 0 : testIds.inputAdornment, position: 'end', disablePointerEvents: true, className: twJoin('text-[0.625rem] leading-4', error ? 'text-red-500' : 'text-gray-600') },
|
|
44
36
|
React.createElement("span", { "data-testid": testIds === null || testIds === void 0 ? void 0 : testIds.message },
|
|
45
37
|
React.createElement("span", { translate: 'no' }, charsTillLimit),
|
|
46
38
|
' ',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputLimitAdornment.js","sourceRoot":"","sources":["../../../src/InputLimitAdornment/InputLimitAdornment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"InputLimitAdornment.js","sourceRoot":"","sources":["../../../src/InputLimitAdornment/InputLimitAdornment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAA;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAA;AAepE,MAAM,mBAAmB,GAAG,CAAC,OAAoB,EAAE,EAAE,CAAC,OAAO,KAAK,WAAW,CAAA;AAC7E,MAAM,gBAAgB,GAAG,CAAC,KAAa,EAAE,EAAE,CACzC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,CAAA;AAE1C,MAAM,iBAAiB,GAAG,CACxB,WAAmB,EACnB,OAAoB,EACpB,KAAa,EACb,EAAE,CAAC,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAA;AAEvE,MAAM,iBAAiB,GAAG,CAAC,EACzB,SAAS,EACT,cAAc,EACd,OAAO,GAGR,EAAE,EAAE;IACH,IAAI,CAAC,SAAS,EAAE;QACd,OAAO,IAAI,CAAA;KACZ;IAED,IAAI,mBAAmB,CAAC,OAAO,CAAC,EAAE;QAChC,OAAO,cAAc,IAAI,CAAC;YACxB,CAAC,CAAC,GAAG,gBAAgB,CAAC,cAAc,CAAC,OAAO;YAC5C,CAAC,CAAC,gBAAgB,CAAA;KACrB;IAED,OAAO,GAAG,gBAAgB,CAAC,cAAc,CAAC,UAAU,CAAA;AACtD,CAAC,CAAA;AAED,MAAM,mBAAmB,GAAG,CAAC,KAAY,EAAE,EAAE;IAC3C,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK,CAAA;IAEjE,MAAM,cAAc,GAAG,iBAAiB,CAAC,WAAW,EAAE,OAAO,EAAE,KAAK,CAAC,CAAA;IACrE,MAAM,cAAc,GAAG,iBAAiB,CAAC;QACvC,SAAS;QACT,cAAc;QACd,OAAO;KACR,CAAC,CAAA;IACF,MAAM,KAAK,GAAG,cAAc,IAAI,CAAC,CAAA;IAEjC,IAAI,SAAS,EAAE;QACb,OAAO,CACL,oBAAC,uBAAuB,mBACT,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,EACpC,KAAK,EAAE,KAAK;YAEZ,6CAAmB,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;gBACjC,8BAAM,SAAS,EAAC,IAAI,IAAE,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,CAAQ;gBAAC,GAAG;gBAC1D,kCAAO,cAAc,CAAQ,CACxB,CACiB,CAC3B,CAAA;KACF;IAED,OAAO,CACL,oBAAC,cAAc,mBACA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,EACpC,QAAQ,EAAC,KAAK,EACd,oBAAoB,QACpB,SAAS,EAAE,MAAM,CACf,2BAA2B,EAC3B,KAAK,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,eAAe,CACzC;QAED,6CAAmB,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;YACjC,8BAAM,SAAS,EAAC,IAAI,IAAE,cAAc,CAAQ;YAAC,GAAG;YAChD,kCAAO,cAAc,CAAQ,CACxB,CACQ,CAClB,CAAA;AACH,CAAC,CAAA;AAED,eAAe,mBAAmB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputMultilineAdornment.d.ts","sourceRoot":"","sources":["../../../src/InputMultilineAdornment/InputMultilineAdornment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"InputMultilineAdornment.d.ts","sourceRoot":"","sources":["../../../src/InputMultilineAdornment/InputMultilineAdornment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtC,MAAM,WAAW,KAAK;IACpB,QAAQ,EAAE,SAAS,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,QAAA,MAAM,uBAAuB,UAAW,KAAK,gBAe5C,CAAA;AAED,eAAe,uBAAuB,CAAA"}
|
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { makeStyles } from '@material-ui/core/styles';
|
|
3
|
-
import cx from 'classnames';
|
|
4
2
|
import { Container } from '@toptal/picasso-container';
|
|
5
|
-
import
|
|
6
|
-
const useStyles = makeStyles(styles, {
|
|
7
|
-
name: 'PicassoInputMultilineAdornment',
|
|
8
|
-
});
|
|
3
|
+
import { twJoin } from '@toptal/picasso-tailwind-merge';
|
|
9
4
|
const InputMultilineAdornment = (props) => {
|
|
10
5
|
const { children, error, 'data-testid': dataTestId } = props;
|
|
11
|
-
|
|
12
|
-
return (React.createElement(Container, { flex: true, "data-testid": dataTestId, className: cx(classes.root, {
|
|
13
|
-
[classes.error]: error,
|
|
14
|
-
}) }, children));
|
|
6
|
+
return (React.createElement(Container, { flex: true, "data-testid": dataTestId, className: twJoin('text-[0.625rem] leading-[1] mt-1 mr-[0.125rem]', error ? 'text-red-500' : 'text-gray-600') }, children));
|
|
15
7
|
};
|
|
16
8
|
export default InputMultilineAdornment;
|
|
17
9
|
//# sourceMappingURL=InputMultilineAdornment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputMultilineAdornment.js","sourceRoot":"","sources":["../../../src/InputMultilineAdornment/InputMultilineAdornment.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"InputMultilineAdornment.js","sourceRoot":"","sources":["../../../src/InputMultilineAdornment/InputMultilineAdornment.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAA;AAQvD,MAAM,uBAAuB,GAAG,CAAC,KAAY,EAAE,EAAE;IAC/C,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,CAAA;IAE5D,OAAO,CACL,oBAAC,SAAS,IACR,IAAI,uBACS,UAAU,EACvB,SAAS,EAAE,MAAM,CACf,gDAAgD,EAChD,KAAK,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,eAAe,CACzC,IAEA,QAAQ,CACC,CACb,CAAA;AACH,CAAC,CAAA;AAED,eAAe,uBAAuB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toptal/picasso-input-adornment",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Toptal UI components library - InputAdornment",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -22,19 +22,18 @@
|
|
|
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-icons": "1.
|
|
25
|
+
"@toptal/picasso-container": "2.0.0",
|
|
26
|
+
"@toptal/picasso-icons": "1.6.0",
|
|
27
27
|
"@toptal/picasso-shared": "15.0.0",
|
|
28
|
-
"@toptal/picasso-utils": "1.0.3"
|
|
29
|
-
"classnames": "^2.5.1"
|
|
28
|
+
"@toptal/picasso-utils": "1.0.3"
|
|
30
29
|
},
|
|
31
30
|
"sideEffects": [
|
|
32
31
|
"**/styles.ts",
|
|
33
32
|
"**/styles.js"
|
|
34
33
|
],
|
|
35
34
|
"peerDependencies": {
|
|
36
|
-
"@
|
|
37
|
-
"@toptal/picasso-
|
|
35
|
+
"@toptal/picasso-tailwind-merge": "^1.0.1",
|
|
36
|
+
"@toptal/picasso-tailwind": ">=2.7",
|
|
38
37
|
"react": ">=16.12.0 < 19.0.0"
|
|
39
38
|
},
|
|
40
39
|
"exports": {
|
|
@@ -42,7 +41,7 @@
|
|
|
42
41
|
"./styles": "./dist-package/src/styles.js"
|
|
43
42
|
},
|
|
44
43
|
"devDependencies": {
|
|
45
|
-
"@toptal/picasso-
|
|
44
|
+
"@toptal/picasso-tailwind-merge": "1.2.0",
|
|
46
45
|
"@toptal/picasso-test-utils": "1.1.1"
|
|
47
46
|
},
|
|
48
47
|
"files": [
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import type { ReactNode, HTMLAttributes, MouseEvent } from 'react'
|
|
2
2
|
import React, { useCallback } from 'react'
|
|
3
|
-
import type { Theme } from '@material-ui/core/styles'
|
|
4
|
-
import { makeStyles } from '@material-ui/core/styles'
|
|
5
|
-
import { InputAdornment as MUIInputAdornment } from '@material-ui/core'
|
|
6
|
-
import cx from 'classnames'
|
|
7
3
|
import type { BaseProps } from '@toptal/picasso-shared'
|
|
8
4
|
import { noop } from '@toptal/picasso-utils'
|
|
9
|
-
|
|
10
|
-
import styles from './styles'
|
|
5
|
+
import { twMerge } from '@toptal/picasso-tailwind-merge'
|
|
11
6
|
|
|
12
7
|
type PositionType = 'start' | 'end'
|
|
13
8
|
|
|
@@ -20,10 +15,6 @@ export interface Props extends BaseProps, HTMLAttributes<HTMLDivElement> {
|
|
|
20
15
|
'data-testid'?: string
|
|
21
16
|
}
|
|
22
17
|
|
|
23
|
-
const useStyles = makeStyles<Theme>(styles, {
|
|
24
|
-
name: 'PicassoInputAdornment',
|
|
25
|
-
})
|
|
26
|
-
|
|
27
18
|
const InputAdornment = (props: Props) => {
|
|
28
19
|
const {
|
|
29
20
|
className,
|
|
@@ -38,7 +29,6 @@ const InputAdornment = (props: Props) => {
|
|
|
38
29
|
...rest
|
|
39
30
|
} = props
|
|
40
31
|
|
|
41
|
-
const classes = useStyles()
|
|
42
32
|
const handleClick = useCallback(
|
|
43
33
|
(event: MouseEvent<HTMLDivElement>) => {
|
|
44
34
|
if (stopPropagation) {
|
|
@@ -51,22 +41,22 @@ const InputAdornment = (props: Props) => {
|
|
|
51
41
|
)
|
|
52
42
|
|
|
53
43
|
return (
|
|
54
|
-
<
|
|
44
|
+
<div
|
|
55
45
|
{...rest}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
46
|
+
className={twMerge(
|
|
47
|
+
'text-graphite-700 h-auto flex items-center whitespace-nowrap max-h-[2em]',
|
|
48
|
+
disabled && 'text-opacity-[0.48]',
|
|
49
|
+
position === 'end' &&
|
|
50
|
+
'justify-end ml-auto flex-grow-0 flex-shrink-0 basis-auto',
|
|
51
|
+
disablePointerEvents && 'pointer-events-none',
|
|
52
|
+
className
|
|
53
|
+
)}
|
|
62
54
|
style={style}
|
|
63
|
-
position={position}
|
|
64
|
-
disablePointerEvents={disablePointerEvents}
|
|
65
55
|
onClick={handleClick}
|
|
66
56
|
data-testid={dataTestId}
|
|
67
57
|
>
|
|
68
58
|
{children}
|
|
69
|
-
</
|
|
59
|
+
</div>
|
|
70
60
|
)
|
|
71
61
|
}
|
|
72
62
|
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import type { ReactElement, ReactNode } from 'react'
|
|
2
2
|
import React from 'react'
|
|
3
|
-
import type { Theme } from '@material-ui/core/styles'
|
|
4
|
-
import { makeStyles } from '@material-ui/core/styles'
|
|
5
3
|
|
|
6
|
-
import styles from './styles'
|
|
7
4
|
import { InputAdornment } from '../InputAdornment'
|
|
8
5
|
|
|
9
6
|
type IconPosition = 'start' | 'end'
|
|
@@ -14,15 +11,10 @@ export interface Props {
|
|
|
14
11
|
icon?: ReactNode
|
|
15
12
|
}
|
|
16
13
|
|
|
17
|
-
const useStyles = makeStyles<Theme>(styles, {
|
|
18
|
-
name: 'PicassoInputIconAdornment',
|
|
19
|
-
})
|
|
20
|
-
|
|
21
14
|
const InputIconAdornment = (props: Props) => {
|
|
22
15
|
const { position, disabled, icon } = props
|
|
23
|
-
const classes = useStyles()
|
|
24
16
|
const styledIcon = React.cloneElement(icon as ReactElement, {
|
|
25
|
-
className:
|
|
17
|
+
className: 'grow shrink basis-0', // fix for IE11
|
|
26
18
|
role: 'presentation',
|
|
27
19
|
})
|
|
28
20
|
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import
|
|
3
|
-
import { makeStyles } from '@material-ui/core/styles'
|
|
4
|
-
import cx from 'classnames'
|
|
5
|
-
import { InputAdornment } from '@material-ui/core'
|
|
2
|
+
import { twJoin } from '@toptal/picasso-tailwind-merge'
|
|
6
3
|
|
|
7
|
-
import
|
|
4
|
+
import { InputAdornment } from '../InputAdornment'
|
|
8
5
|
import { InputMultilineAdornment } from '../InputMultilineAdornment'
|
|
9
6
|
|
|
10
7
|
type CounterType = 'remaining' | 'entered'
|
|
@@ -20,10 +17,6 @@ export interface Props {
|
|
|
20
17
|
}
|
|
21
18
|
}
|
|
22
19
|
|
|
23
|
-
const useStyles = makeStyles<Theme>(styles, {
|
|
24
|
-
name: 'PicassoInputLimitAdornment',
|
|
25
|
-
})
|
|
26
|
-
|
|
27
20
|
const hasRemainingCounter = (counter: CounterType) => counter === 'remaining'
|
|
28
21
|
const formatCharacters = (count: number) =>
|
|
29
22
|
count === 1 ? 'character' : 'characters'
|
|
@@ -55,7 +48,6 @@ const getMultilineLabel = ({
|
|
|
55
48
|
}
|
|
56
49
|
|
|
57
50
|
const InputLimitAdornment = (props: Props) => {
|
|
58
|
-
const classes = useStyles()
|
|
59
51
|
const { multiline, charsLength, counter, limit, testIds } = props
|
|
60
52
|
|
|
61
53
|
const charsTillLimit = getCharsTillLimit(charsLength, counter, limit)
|
|
@@ -85,9 +77,10 @@ const InputLimitAdornment = (props: Props) => {
|
|
|
85
77
|
data-testid={testIds?.inputAdornment}
|
|
86
78
|
position='end'
|
|
87
79
|
disablePointerEvents
|
|
88
|
-
className={
|
|
89
|
-
[
|
|
90
|
-
|
|
80
|
+
className={twJoin(
|
|
81
|
+
'text-[0.625rem] leading-4',
|
|
82
|
+
error ? 'text-red-500' : 'text-gray-600'
|
|
83
|
+
)}
|
|
91
84
|
>
|
|
92
85
|
<span data-testid={testIds?.message}>
|
|
93
86
|
<span translate='no'>{charsTillLimit}</span>{' '}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from 'react'
|
|
2
2
|
import React from 'react'
|
|
3
|
-
import type { Theme } from '@material-ui/core/styles'
|
|
4
|
-
import { makeStyles } from '@material-ui/core/styles'
|
|
5
|
-
import cx from 'classnames'
|
|
6
3
|
import { Container } from '@toptal/picasso-container'
|
|
7
|
-
|
|
8
|
-
import styles from './styles'
|
|
4
|
+
import { twJoin } from '@toptal/picasso-tailwind-merge'
|
|
9
5
|
|
|
10
6
|
export interface Props {
|
|
11
7
|
children: ReactNode
|
|
@@ -13,21 +9,17 @@ export interface Props {
|
|
|
13
9
|
'data-testid'?: string
|
|
14
10
|
}
|
|
15
11
|
|
|
16
|
-
const useStyles = makeStyles<Theme>(styles, {
|
|
17
|
-
name: 'PicassoInputMultilineAdornment',
|
|
18
|
-
})
|
|
19
|
-
|
|
20
12
|
const InputMultilineAdornment = (props: Props) => {
|
|
21
13
|
const { children, error, 'data-testid': dataTestId } = props
|
|
22
|
-
const classes = useStyles()
|
|
23
14
|
|
|
24
15
|
return (
|
|
25
16
|
<Container
|
|
26
17
|
flex
|
|
27
18
|
data-testid={dataTestId}
|
|
28
|
-
className={
|
|
29
|
-
[
|
|
30
|
-
|
|
19
|
+
className={twJoin(
|
|
20
|
+
'text-[0.625rem] leading-[1] mt-1 mr-[0.125rem]',
|
|
21
|
+
error ? 'text-red-500' : 'text-gray-600'
|
|
22
|
+
)}
|
|
31
23
|
>
|
|
32
24
|
{children}
|
|
33
25
|
</Container>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/InputAdornment/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;sCAsBjB,KAAK;AAAlC,wBAOI"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { createStyles } from '@material-ui/core';
|
|
2
|
-
import { alpha } from '@toptal/picasso-shared';
|
|
3
|
-
import { PicassoProvider } from '@toptal/picasso-provider';
|
|
4
|
-
PicassoProvider.override(({ palette }) => ({
|
|
5
|
-
MuiInputAdornment: {
|
|
6
|
-
root: {
|
|
7
|
-
color: palette.grey.dark,
|
|
8
|
-
height: 'auto',
|
|
9
|
-
},
|
|
10
|
-
positionStart: {
|
|
11
|
-
marginRight: 0,
|
|
12
|
-
},
|
|
13
|
-
positionEnd: {
|
|
14
|
-
justifyContent: 'flex-end',
|
|
15
|
-
flex: '0 0 auto',
|
|
16
|
-
marginLeft: 'auto',
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
}));
|
|
20
|
-
export default ({ palette }) => createStyles({
|
|
21
|
-
root: {},
|
|
22
|
-
rootDisabled: {
|
|
23
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
24
|
-
color: alpha(palette.grey.dark, 0.48),
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/InputAdornment/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAE1D,eAAe,CAAC,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;IACzC,iBAAiB,EAAE;QACjB,IAAI,EAAE;YACJ,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI;YACxB,MAAM,EAAE,MAAM;SACf;QACD,aAAa,EAAE;YACb,WAAW,EAAE,CAAC;SACf;QACD,WAAW,EAAE;YACX,cAAc,EAAE,UAAU;YAC1B,IAAI,EAAE,UAAU;YAChB,UAAU,EAAE,MAAM;SACnB;KACF;CACF,CAAC,CAAC,CAAA;AAEH,eAAe,CAAC,EAAE,OAAO,EAAS,EAAE,EAAE,CACpC,YAAY,CAAC;IACX,IAAI,EAAE,EAAE;IACR,YAAY,EAAE;QACZ,oEAAoE;QACpE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAK,EAAE,IAAI,CAAC;KACvC;CACF,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/InputIconAdornment/styles.ts"],"names":[],"mappings":";AAEA,wBAKI"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/InputIconAdornment/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEvD,eAAe,GAAG,EAAE,CAClB,YAAY,CAAC;IACX,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ,EAAE,eAAe;KAChC;CACF,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/InputLimitAdornment/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;sCAGxB,KAAK;AAAlC,wBAUI"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { createStyles } from '@material-ui/core/styles';
|
|
2
|
-
export default ({ palette }) => createStyles({
|
|
3
|
-
limiterLabel: {
|
|
4
|
-
color: palette.grey.main2,
|
|
5
|
-
fontSize: '0.625rem',
|
|
6
|
-
lineHeight: '1rem',
|
|
7
|
-
},
|
|
8
|
-
limiterLabelError: {
|
|
9
|
-
color: palette.red.main,
|
|
10
|
-
},
|
|
11
|
-
});
|
|
12
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/InputLimitAdornment/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEvD,eAAe,CAAC,EAAE,OAAO,EAAS,EAAE,EAAE,CACpC,YAAY,CAAC;IACX,YAAY,EAAE;QACZ,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;QACzB,QAAQ,EAAE,UAAU;QACpB,UAAU,EAAE,MAAM;KACnB;IACD,iBAAiB,EAAE;QACjB,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,IAAI;KACxB;CACF,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/InputMultilineAdornment/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;sCAIxB,KAAK;AAAlC,wBAeI"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { createStyles } from '@material-ui/core/styles';
|
|
2
|
-
import { rem } from '@toptal/picasso-shared';
|
|
3
|
-
export default ({ palette }) => createStyles({
|
|
4
|
-
root: {
|
|
5
|
-
fontSize: '0.625rem',
|
|
6
|
-
lineHeight: 1,
|
|
7
|
-
marginTop: '0.25rem',
|
|
8
|
-
color: palette.grey.main2,
|
|
9
|
-
marginRight: rem('2px'),
|
|
10
|
-
'&$error': {
|
|
11
|
-
color: palette.red.main,
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
error: {},
|
|
15
|
-
});
|
|
16
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/InputMultilineAdornment/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAA;AAE5C,eAAe,CAAC,EAAE,OAAO,EAAS,EAAE,EAAE,CACpC,YAAY,CAAC;IACX,IAAI,EAAE;QACJ,QAAQ,EAAE,UAAU;QACpB,UAAU,EAAE,CAAC;QACb,SAAS,EAAE,SAAS;QACpB,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;QACzB,WAAW,EAAE,GAAG,CAAC,KAAK,CAAC;QAEvB,SAAS,EAAE;YACT,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,IAAI;SACxB;KACF;IAED,KAAK,EAAE,EAAE;CACV,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":""}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { Theme } from '@material-ui/core'
|
|
2
|
-
import { createStyles } from '@material-ui/core'
|
|
3
|
-
import { alpha } from '@toptal/picasso-shared'
|
|
4
|
-
import { PicassoProvider } from '@toptal/picasso-provider'
|
|
5
|
-
|
|
6
|
-
PicassoProvider.override(({ palette }) => ({
|
|
7
|
-
MuiInputAdornment: {
|
|
8
|
-
root: {
|
|
9
|
-
color: palette.grey.dark,
|
|
10
|
-
height: 'auto',
|
|
11
|
-
},
|
|
12
|
-
positionStart: {
|
|
13
|
-
marginRight: 0,
|
|
14
|
-
},
|
|
15
|
-
positionEnd: {
|
|
16
|
-
justifyContent: 'flex-end',
|
|
17
|
-
flex: '0 0 auto',
|
|
18
|
-
marginLeft: 'auto',
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
}))
|
|
22
|
-
|
|
23
|
-
export default ({ palette }: Theme) =>
|
|
24
|
-
createStyles({
|
|
25
|
-
root: {},
|
|
26
|
-
rootDisabled: {
|
|
27
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
28
|
-
color: alpha(palette.grey.dark!, 0.48),
|
|
29
|
-
},
|
|
30
|
-
})
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Theme } from '@material-ui/core/styles'
|
|
2
|
-
import { createStyles } from '@material-ui/core/styles'
|
|
3
|
-
|
|
4
|
-
export default ({ palette }: Theme) =>
|
|
5
|
-
createStyles({
|
|
6
|
-
limiterLabel: {
|
|
7
|
-
color: palette.grey.main2,
|
|
8
|
-
fontSize: '0.625rem',
|
|
9
|
-
lineHeight: '1rem',
|
|
10
|
-
},
|
|
11
|
-
limiterLabelError: {
|
|
12
|
-
color: palette.red.main,
|
|
13
|
-
},
|
|
14
|
-
})
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Theme } from '@material-ui/core/styles'
|
|
2
|
-
import { createStyles } from '@material-ui/core/styles'
|
|
3
|
-
import { rem } from '@toptal/picasso-shared'
|
|
4
|
-
|
|
5
|
-
export default ({ palette }: Theme) =>
|
|
6
|
-
createStyles({
|
|
7
|
-
root: {
|
|
8
|
-
fontSize: '0.625rem',
|
|
9
|
-
lineHeight: 1,
|
|
10
|
-
marginTop: '0.25rem',
|
|
11
|
-
color: palette.grey.main2,
|
|
12
|
-
marginRight: rem('2px'),
|
|
13
|
-
|
|
14
|
-
'&$error': {
|
|
15
|
-
color: palette.red.main,
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
error: {},
|
|
20
|
-
})
|
package/src/styles.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {} from './InputAdornment/styles'
|