@toptal/picasso-tagselector 1.0.22 → 1.0.24
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/TagSelectorInput/TagSelectorInput.d.ts.map +1 -1
- package/dist-package/src/TagSelectorInput/TagSelectorInput.js +1 -6
- package/dist-package/src/TagSelectorInput/TagSelectorInput.js.map +1 -1
- package/dist-package/src/TagSelectorInput/styles.d.ts +1 -2
- package/dist-package/src/TagSelectorInput/styles.d.ts.map +1 -1
- package/dist-package/src/TagSelectorInput/styles.js +10 -6
- package/dist-package/src/TagSelectorInput/styles.js.map +1 -1
- package/package.json +5 -6
- package/src/TagSelectorInput/TagSelectorInput.tsx +1 -7
- package/src/TagSelectorInput/styles.ts +1 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagSelectorInput.d.ts","sourceRoot":"","sources":["../../../src/TagSelectorInput/TagSelectorInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"TagSelectorInput.d.ts","sourceRoot":"","sources":["../../../src/TagSelectorInput/TagSelectorInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAczC,eAAO,MAAM,gBAAgB,qHAwF5B,CAAA;AAUD,eAAe,gBAAgB,CAAA"}
|
|
@@ -14,7 +14,6 @@ import cx from 'classnames';
|
|
|
14
14
|
import { makeStyles } from '@material-ui/core/styles';
|
|
15
15
|
import { OutlinedInput } from '@toptal/picasso-outlined-input';
|
|
16
16
|
import { usePropDeprecationWarning } from '@toptal/picasso-utils';
|
|
17
|
-
import { useFieldsLayoutContext } from '@toptal/picasso-form';
|
|
18
17
|
import styles from './styles';
|
|
19
18
|
const useStyles = makeStyles(styles, {
|
|
20
19
|
name: 'PicassoTagSelectorInput',
|
|
@@ -35,7 +34,6 @@ export const TagSelectorInput = forwardRef(function TagSelectorInput(props, ref)
|
|
|
35
34
|
description: 'Use the `status` prop instead. `error` is deprecated and will be removed in the next major release.',
|
|
36
35
|
});
|
|
37
36
|
const classes = useStyles();
|
|
38
|
-
const { layout } = useFieldsLayoutContext();
|
|
39
37
|
let usedEndAdornment = null;
|
|
40
38
|
if (endAdornment) {
|
|
41
39
|
usedEndAdornment = React.cloneElement(endAdornment, {
|
|
@@ -44,10 +42,7 @@ export const TagSelectorInput = forwardRef(function TagSelectorInput(props, ref)
|
|
|
44
42
|
}
|
|
45
43
|
return (React.createElement(OutlinedInput, { inputRef: ref, style: style, className: cx(classes.inputBase, {
|
|
46
44
|
[classes.withEndAdornment]: Boolean(endAdornment),
|
|
47
|
-
|
|
48
|
-
}), classes: {
|
|
49
|
-
root: cx({ [classes.highlightAutofill]: highlight === 'autofill' }),
|
|
50
|
-
}, id: id, name: name, defaultValue: defaultValue, value: value, placeholder: placeholder, status: error ? 'error' : status, disabled: disabled, autoFocus: autoFocus, autoComplete: autoComplete, multiline: multiline, rows: rows, rowsMax: rowsMax, type: type, width: width,
|
|
45
|
+
}), highlight: highlight, id: id, name: name, defaultValue: defaultValue, value: value, placeholder: placeholder, status: error ? 'error' : status, disabled: disabled, autoFocus: autoFocus, autoComplete: autoComplete, multiline: multiline, rows: rows, rowsMax: rowsMax, type: type, width: width,
|
|
51
46
|
// html attributes
|
|
52
47
|
inputProps: Object.assign(Object.assign({}, rest), inputProps), testIds: testIds, endAdornment: usedEndAdornment, startAdornment: startAdornment, onChange: onChange }, children));
|
|
53
48
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagSelectorInput.js","sourceRoot":"","sources":["../../../src/TagSelectorInput/TagSelectorInput.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EAAE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
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { Theme } from '@material-ui/core/styles';
|
|
2
1
|
export declare const TAG_SELECTOR_INPUT_GUTTER_SIZE: string;
|
|
3
|
-
declare const _default: (
|
|
2
|
+
declare const _default: () => import("@material-ui/styles").StyleRules<{}, "inputBase" | "withEndAdornment" | "endAdornment" | "horizontalLayout">;
|
|
4
3
|
export default _default;
|
|
5
4
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/TagSelectorInput/styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/TagSelectorInput/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,8BAA8B,QAAa,CAAA;;AAIxD,wBAiCI"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createStyles } from '@material-ui/core/styles';
|
|
2
2
|
import { rem } from '@toptal/picasso-shared';
|
|
3
|
-
import { highlightStyles as highlightAutofillStyles } from '@toptal/picasso-input';
|
|
4
3
|
export const TAG_SELECTOR_INPUT_GUTTER_SIZE = rem('4px');
|
|
5
4
|
const END_ADORNMENT_PADDING = '0.625em';
|
|
6
5
|
const END_ADORNMENT_HEIGHT = '1em';
|
|
7
|
-
export default (
|
|
6
|
+
export default () => createStyles({
|
|
7
|
+
inputBase: {
|
|
8
8
|
display: 'flex',
|
|
9
9
|
flexWrap: 'wrap',
|
|
10
10
|
height: 'auto',
|
|
@@ -21,14 +21,18 @@ export default (theme) => createStyles(Object.assign(Object.assign({ inputBase:
|
|
|
21
21
|
paddingRight: 0,
|
|
22
22
|
marginBottom: 0,
|
|
23
23
|
},
|
|
24
|
-
}
|
|
24
|
+
},
|
|
25
|
+
withEndAdornment: {
|
|
25
26
|
paddingRight: `calc(2*${END_ADORNMENT_PADDING} + ${END_ADORNMENT_HEIGHT})`,
|
|
26
|
-
},
|
|
27
|
+
},
|
|
28
|
+
endAdornment: {
|
|
27
29
|
position: 'absolute',
|
|
28
30
|
top: `calc(50% - 0.5 * ${END_ADORNMENT_HEIGHT})`,
|
|
29
31
|
right: '0.625em',
|
|
30
32
|
height: END_ADORNMENT_HEIGHT,
|
|
31
|
-
},
|
|
33
|
+
},
|
|
34
|
+
horizontalLayout: {
|
|
32
35
|
width: '100%',
|
|
33
|
-
}
|
|
36
|
+
},
|
|
37
|
+
});
|
|
34
38
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/TagSelectorInput/styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/TagSelectorInput/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAA;AAE5C,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,CAAC,KAAK,CAAC,CAAA;AACxD,MAAM,qBAAqB,GAAG,SAAS,CAAA;AACvC,MAAM,oBAAoB,GAAG,KAAK,CAAA;AAElC,eAAe,GAAG,EAAE,CAClB,YAAY,CAAC;IACX,SAAS,EAAE;QACT,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE,MAAM;QAChB,MAAM,EAAE,MAAM;QACd,aAAa,EAAE,8BAA8B;QAC7C,WAAW,EAAE,8BAA8B;QAC3C,UAAU,EAAE,8BAA8B;QAC1C,MAAM,EAAE,SAAS;QAEjB,WAAW,EAAE;YACX,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,CAAC;YACX,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC;YACnB,WAAW,EAAE,GAAG,CAAC,KAAK,CAAC;YACvB,YAAY,EAAE,CAAC;YACf,YAAY,EAAE,CAAC;SAChB;KACF;IACD,gBAAgB,EAAE;QAChB,YAAY,EAAE,UAAU,qBAAqB,MAAM,oBAAoB,GAAG;KAC3E;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,oBAAoB,oBAAoB,GAAG;QAChD,KAAK,EAAE,SAAS;QAChB,MAAM,EAAE,oBAAoB;KAC7B;IACD,gBAAgB,EAAE;QAChB,KAAK,EAAE,MAAM;KACd;CACF,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toptal/picasso-tagselector",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.24",
|
|
4
4
|
"description": "Toptal UI components library - Tagselector",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -22,12 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
"homepage": "https://github.com/toptal/picasso/tree/master/packages/picasso#readme",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@toptal/picasso-autocomplete": "1.0.
|
|
26
|
-
"@toptal/picasso-form": "3.0.
|
|
27
|
-
"@toptal/picasso-input": "
|
|
28
|
-
"@toptal/picasso-outlined-input": "1.0.18",
|
|
25
|
+
"@toptal/picasso-autocomplete": "1.0.22",
|
|
26
|
+
"@toptal/picasso-form": "3.0.4",
|
|
27
|
+
"@toptal/picasso-outlined-input": "1.1.0",
|
|
29
28
|
"@toptal/picasso-shared": "15.0.0",
|
|
30
|
-
"@toptal/picasso-tag": "2.0.
|
|
29
|
+
"@toptal/picasso-tag": "2.0.2",
|
|
31
30
|
"@toptal/picasso-utils": "1.0.3",
|
|
32
31
|
"classnames": "^2.5.1"
|
|
33
32
|
},
|
|
@@ -6,7 +6,6 @@ import { makeStyles } from '@material-ui/core/styles'
|
|
|
6
6
|
import { OutlinedInput } from '@toptal/picasso-outlined-input'
|
|
7
7
|
import { usePropDeprecationWarning } from '@toptal/picasso-utils'
|
|
8
8
|
import type { Props as InputProps } from '@toptal/picasso-input'
|
|
9
|
-
import { useFieldsLayoutContext } from '@toptal/picasso-form'
|
|
10
9
|
|
|
11
10
|
import styles from './styles'
|
|
12
11
|
|
|
@@ -58,8 +57,6 @@ export const TagSelectorInput = forwardRef<HTMLInputElement, InputProps>(
|
|
|
58
57
|
|
|
59
58
|
const classes = useStyles()
|
|
60
59
|
|
|
61
|
-
const { layout } = useFieldsLayoutContext()
|
|
62
|
-
|
|
63
60
|
let usedEndAdornment = null
|
|
64
61
|
|
|
65
62
|
if (endAdornment) {
|
|
@@ -74,11 +71,8 @@ export const TagSelectorInput = forwardRef<HTMLInputElement, InputProps>(
|
|
|
74
71
|
style={style}
|
|
75
72
|
className={cx(classes.inputBase, {
|
|
76
73
|
[classes.withEndAdornment]: Boolean(endAdornment),
|
|
77
|
-
[classes.horizontalLayout]: layout === 'horizontal',
|
|
78
74
|
})}
|
|
79
|
-
|
|
80
|
-
root: cx({ [classes.highlightAutofill]: highlight === 'autofill' }),
|
|
81
|
-
}}
|
|
75
|
+
highlight={highlight}
|
|
82
76
|
id={id}
|
|
83
77
|
name={name}
|
|
84
78
|
defaultValue={defaultValue}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import type { Theme } from '@material-ui/core/styles'
|
|
2
1
|
import { createStyles } from '@material-ui/core/styles'
|
|
3
2
|
import { rem } from '@toptal/picasso-shared'
|
|
4
|
-
import { highlightStyles as highlightAutofillStyles } from '@toptal/picasso-input'
|
|
5
3
|
|
|
6
4
|
export const TAG_SELECTOR_INPUT_GUTTER_SIZE = rem('4px')
|
|
7
5
|
const END_ADORNMENT_PADDING = '0.625em'
|
|
8
6
|
const END_ADORNMENT_HEIGHT = '1em'
|
|
9
7
|
|
|
10
|
-
export default (
|
|
8
|
+
export default () =>
|
|
11
9
|
createStyles({
|
|
12
10
|
inputBase: {
|
|
13
11
|
display: 'flex',
|
|
@@ -28,7 +26,6 @@ export default (theme: Theme) =>
|
|
|
28
26
|
marginBottom: 0,
|
|
29
27
|
},
|
|
30
28
|
},
|
|
31
|
-
...highlightAutofillStyles(theme),
|
|
32
29
|
withEndAdornment: {
|
|
33
30
|
paddingRight: `calc(2*${END_ADORNMENT_PADDING} + ${END_ADORNMENT_HEIGHT})`,
|
|
34
31
|
},
|