@toptal/picasso-input 1.0.17 → 2.0.0

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.
@@ -2,7 +2,6 @@ import type { Theme } from '@material-ui/core/styles';
2
2
  import '@toptal/picasso-outlined-input/styles';
3
3
  import '@toptal/picasso-input-adornment/styles';
4
4
  import '../InputBase/styles';
5
- import '../InputLabel/styles';
6
5
  declare const _default: (theme: Theme) => import("@material-ui/styles").StyleRules<{}, "root" | "rootMultiline" | "inputMultilineResizable" | "horizontalLayout" | "highlightAutofill">;
7
6
  export default _default;
8
7
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Input/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAErD,OAAO,uCAAuC,CAAA;AAC9C,OAAO,wCAAwC,CAAA;AAG/C,OAAO,qBAAqB,CAAA;AAC5B,OAAO,sBAAsB,CAAA;gCAEN,KAAK;AAA5B,wBAiBI"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Input/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAErD,OAAO,uCAAuC,CAAA;AAC9C,OAAO,wCAAwC,CAAA;AAG/C,OAAO,qBAAqB,CAAA;gCAEL,KAAK;AAA5B,wBAiBI"}
@@ -3,7 +3,6 @@ import '@toptal/picasso-outlined-input/styles';
3
3
  import '@toptal/picasso-input-adornment/styles';
4
4
  import highlightAutofillStyles from '../InputBase/highlight-styles';
5
5
  import '../InputBase/styles';
6
- import '../InputLabel/styles';
7
6
  export default (theme) => createStyles(Object.assign({ root: {
8
7
  fontSize: '1rem',
9
8
  backgroundColor: theme.palette.common.white,
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/Input/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,uCAAuC,CAAA;AAC9C,OAAO,wCAAwC,CAAA;AAE/C,OAAO,uBAAuB,MAAM,+BAA+B,CAAA;AACnE,OAAO,qBAAqB,CAAA;AAC5B,OAAO,sBAAsB,CAAA;AAE7B,eAAe,CAAC,KAAY,EAAE,EAAE,CAC9B,YAAY,iBACV,IAAI,EAAE;QACJ,QAAQ,EAAE,MAAM;QAChB,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK;QAC3C,MAAM,EAAE,MAAM;KACf,EACD,aAAa,EAAE;QACb,MAAM,EAAE,MAAM;KACf,EACD,uBAAuB,EAAE;QACvB,MAAM,EAAE,UAAU;KACnB,EACD,gBAAgB,EAAE;QAChB,KAAK,EAAE,MAAM;KACd,IACE,uBAAuB,CAAC,KAAK,CAAC,EACjC,CAAA"}
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/Input/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,uCAAuC,CAAA;AAC9C,OAAO,wCAAwC,CAAA;AAE/C,OAAO,uBAAuB,MAAM,+BAA+B,CAAA;AACnE,OAAO,qBAAqB,CAAA;AAE5B,eAAe,CAAC,KAAY,EAAE,EAAE,CAC9B,YAAY,iBACV,IAAI,EAAE;QACJ,QAAQ,EAAE,MAAM;QAChB,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK;QAC3C,MAAM,EAAE,MAAM;KACf,EACD,aAAa,EAAE;QACb,MAAM,EAAE,MAAM;KACf,EACD,uBAAuB,EAAE;QACvB,MAAM,EAAE,UAAU;KACnB,EACD,gBAAgB,EAAE;QAChB,KAAK,EAAE,MAAM;KACd,IACE,uBAAuB,CAAC,KAAK,CAAC,EACjC,CAAA"}
@@ -1,4 +1,3 @@
1
1
  export * from './Input';
2
- export * from './InputLabel';
3
2
  export { default as highlightStyles } from './InputBase/highlight-styles';
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAA"}
@@ -1,4 +1,3 @@
1
1
  export * from './Input';
2
- export * from './InputLabel';
3
2
  export { default as highlightStyles } from './InputBase/highlight-styles';
4
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toptal/picasso-input",
3
- "version": "1.0.17",
3
+ "version": "2.0.0",
4
4
  "description": "Toptal UI components library - Input",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -5,7 +5,6 @@ import '@toptal/picasso-input-adornment/styles'
5
5
 
6
6
  import highlightAutofillStyles from '../InputBase/highlight-styles'
7
7
  import '../InputBase/styles'
8
- import '../InputLabel/styles'
9
8
 
10
9
  export default (theme: Theme) =>
11
10
  createStyles({
package/src/index.ts CHANGED
@@ -1,3 +1,2 @@
1
1
  export * from './Input'
2
- export * from './InputLabel'
3
2
  export { default as highlightStyles } from './InputBase/highlight-styles'
package/src/styles.ts CHANGED
@@ -1,3 +1,2 @@
1
1
  import {} from './Input/styles'
2
2
  import {} from './InputBase/styles'
3
- import {} from './InputLabel/styles'
@@ -1,12 +0,0 @@
1
- import type { ReactNode, LabelHTMLAttributes } from 'react';
2
- import type { BaseProps } from '@toptal/picasso-shared';
3
- declare type VariantType = 'standard' | 'outlined' | 'filled';
4
- export interface Props extends BaseProps, Omit<LabelHTMLAttributes<HTMLLabelElement>, 'color'> {
5
- variant?: VariantType;
6
- htmlFor?: string;
7
- /** Label content */
8
- children?: ReactNode;
9
- }
10
- declare const InputLabel: (props: Props) => JSX.Element;
11
- export default InputLabel;
12
- //# sourceMappingURL=InputLabel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InputLabel.d.ts","sourceRoot":"","sources":["../../../src/InputLabel/InputLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAA;AAK3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAIvD,aAAK,WAAW,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAA;AAErD,MAAM,WAAW,KACf,SAAQ,SAAS,EACf,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IACtD,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAID,QAAA,MAAM,UAAU,UAAW,KAAK,gBAiB/B,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -1,23 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import React from 'react';
13
- import { makeStyles } from '@material-ui/core/styles';
14
- import { InputLabel as MUIInputLabel } from '@material-ui/core';
15
- import styles from './styles';
16
- const useStyles = makeStyles(styles, { name: 'PicassoInputLabel' });
17
- const InputLabel = (props) => {
18
- const { variant, htmlFor, className, style, children } = props, rest = __rest(props, ["variant", "htmlFor", "className", "style", "children"]);
19
- const classes = useStyles();
20
- return (React.createElement(MUIInputLabel, Object.assign({}, rest, { variant: variant, htmlFor: htmlFor, classes: classes, className: className, style: style }), children));
21
- };
22
- export default InputLabel;
23
- //# sourceMappingURL=InputLabel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InputLabel.js","sourceRoot":"","sources":["../../../src/InputLabel/InputLabel.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EAAE,UAAU,IAAI,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAG/D,OAAO,MAAM,MAAM,UAAU,CAAA;AAa7B,MAAM,SAAS,GAAG,UAAU,CAAQ,MAAM,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC,CAAA;AAE1E,MAAM,UAAU,GAAG,CAAC,KAAY,EAAE,EAAE;IAClC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAAjE,wDAAyD,CAAQ,CAAA;IAEvE,MAAM,OAAO,GAAG,SAAS,EAAE,CAAA;IAE3B,OAAO,CACL,oBAAC,aAAa,oBACR,IAAI,IACR,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,KAEX,QAAQ,CACK,CACjB,CAAA;AACH,CAAC,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -1,5 +0,0 @@
1
- import type { OmitInternalProps } from '@toptal/picasso-shared';
2
- import type { Props } from './InputLabel';
3
- export { default as InputLabel } from './InputLabel';
4
- export declare type InputLabelProps = OmitInternalProps<Props>;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/InputLabel/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAEzC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAA;AACpD,oBAAY,eAAe,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export { default as InputLabel } from './InputLabel';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/InputLabel/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAA"}
@@ -1,3 +0,0 @@
1
- declare const _default: () => import("@material-ui/styles").StyleRules<{}, "root">;
2
- export default _default;
3
- //# sourceMappingURL=styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/InputLabel/styles.ts"],"names":[],"mappings":";AAeA,wBAGI"}
@@ -1,16 +0,0 @@
1
- import { createStyles } from '@material-ui/core';
2
- import { PicassoProvider } from '@toptal/picasso-provider';
3
- PicassoProvider.override(({ palette }) => ({
4
- MuiInputLabel: {
5
- root: {
6
- fontSize: 'unset',
7
- },
8
- error: {
9
- color: palette.red.main,
10
- },
11
- },
12
- }));
13
- export default () => createStyles({
14
- root: {},
15
- });
16
- //# sourceMappingURL=styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/InputLabel/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAE1D,eAAe,CAAC,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAS,EAAE,EAAE,CAAC,CAAC;IAChD,aAAa,EAAE;QACb,IAAI,EAAE;YACJ,QAAQ,EAAE,OAAO;SAClB;QACD,KAAK,EAAE;YACL,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,IAAI;SACxB;KACF;CACF,CAAC,CAAC,CAAA;AAEH,eAAe,GAAG,EAAE,CAClB,YAAY,CAAC;IACX,IAAI,EAAE,EAAE;CACT,CAAC,CAAA"}
@@ -1,42 +0,0 @@
1
- import type { ReactNode, LabelHTMLAttributes } from 'react'
2
- import React from 'react'
3
- import type { Theme } from '@material-ui/core/styles'
4
- import { makeStyles } from '@material-ui/core/styles'
5
- import { InputLabel as MUIInputLabel } from '@material-ui/core'
6
- import type { BaseProps } from '@toptal/picasso-shared'
7
-
8
- import styles from './styles'
9
-
10
- type VariantType = 'standard' | 'outlined' | 'filled'
11
-
12
- export interface Props
13
- extends BaseProps,
14
- Omit<LabelHTMLAttributes<HTMLLabelElement>, 'color'> {
15
- variant?: VariantType
16
- htmlFor?: string
17
- /** Label content */
18
- children?: ReactNode
19
- }
20
-
21
- const useStyles = makeStyles<Theme>(styles, { name: 'PicassoInputLabel' })
22
-
23
- const InputLabel = (props: Props) => {
24
- const { variant, htmlFor, className, style, children, ...rest } = props
25
-
26
- const classes = useStyles()
27
-
28
- return (
29
- <MUIInputLabel
30
- {...rest}
31
- variant={variant}
32
- htmlFor={htmlFor}
33
- classes={classes}
34
- className={className}
35
- style={style}
36
- >
37
- {children}
38
- </MUIInputLabel>
39
- )
40
- }
41
-
42
- export default InputLabel
@@ -1,6 +0,0 @@
1
- import type { OmitInternalProps } from '@toptal/picasso-shared'
2
-
3
- import type { Props } from './InputLabel'
4
-
5
- export { default as InputLabel } from './InputLabel'
6
- export type InputLabelProps = OmitInternalProps<Props>
@@ -1,19 +0,0 @@
1
- import type { Theme } from '@material-ui/core'
2
- import { createStyles } from '@material-ui/core'
3
- import { PicassoProvider } from '@toptal/picasso-provider'
4
-
5
- PicassoProvider.override(({ palette }: Theme) => ({
6
- MuiInputLabel: {
7
- root: {
8
- fontSize: 'unset',
9
- },
10
- error: {
11
- color: palette.red.main,
12
- },
13
- },
14
- }))
15
-
16
- export default () =>
17
- createStyles({
18
- root: {},
19
- })