@toptal/picasso-outlined-input 4.1.2 → 4.1.3-alpha-1757603192867.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.
Files changed (29) hide show
  1. package/package.json +13 -12
  2. package/dist-package/src/OutlinedInput/OutlinedInput.d.ts +0 -5
  3. package/dist-package/src/OutlinedInput/OutlinedInput.d.ts.map +0 -1
  4. package/dist-package/src/OutlinedInput/OutlinedInput.js +0 -94
  5. package/dist-package/src/OutlinedInput/OutlinedInput.js.map +0 -1
  6. package/dist-package/src/OutlinedInput/index.d.ts +0 -7
  7. package/dist-package/src/OutlinedInput/index.d.ts.map +0 -1
  8. package/dist-package/src/OutlinedInput/index.js +0 -3
  9. package/dist-package/src/OutlinedInput/index.js.map +0 -1
  10. package/dist-package/src/OutlinedInput/stylesInput.d.ts +0 -24
  11. package/dist-package/src/OutlinedInput/stylesInput.d.ts.map +0 -1
  12. package/dist-package/src/OutlinedInput/stylesInput.js +0 -60
  13. package/dist-package/src/OutlinedInput/stylesInput.js.map +0 -1
  14. package/dist-package/src/OutlinedInput/stylesRoot.d.ts +0 -70
  15. package/dist-package/src/OutlinedInput/stylesRoot.d.ts.map +0 -1
  16. package/dist-package/src/OutlinedInput/stylesRoot.js +0 -148
  17. package/dist-package/src/OutlinedInput/stylesRoot.js.map +0 -1
  18. package/dist-package/src/OutlinedInput/types.d.ts +0 -57
  19. package/dist-package/src/OutlinedInput/types.d.ts.map +0 -1
  20. package/dist-package/src/OutlinedInput/types.js +0 -2
  21. package/dist-package/src/OutlinedInput/types.js.map +0 -1
  22. package/dist-package/src/OutlinedInput/utils.d.ts +0 -2
  23. package/dist-package/src/OutlinedInput/utils.d.ts.map +0 -1
  24. package/dist-package/src/OutlinedInput/utils.js +0 -2
  25. package/dist-package/src/OutlinedInput/utils.js.map +0 -1
  26. package/dist-package/src/index.d.ts +0 -2
  27. package/dist-package/src/index.d.ts.map +0 -1
  28. package/dist-package/src/index.js +0 -2
  29. package/dist-package/src/index.js.map +0 -1
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@toptal/picasso-outlined-input",
3
- "version": "4.1.2",
3
+ "version": "4.1.3-alpha-1757603192867.0",
4
4
  "description": "Toptal UI components library - OutlinedInput",
5
5
  "publishConfig": {
6
- "access": "public"
6
+ "access": "public",
7
+ "provenance": true
7
8
  },
8
9
  "main": "./dist-package/src/index.js",
9
10
  "module": "./dist-package/src/index.js",
10
11
  "scripts": {
11
12
  "build:package": "tsc -b tsconfig.json",
12
- "prepublishOnly": "yarn build:package"
13
+ "prepublishOnly": "echo 0"
13
14
  },
14
15
  "repository": {
15
16
  "type": "git",
@@ -22,12 +23,12 @@
22
23
  },
23
24
  "homepage": "https://github.com/toptal/picasso/tree/master/packages/picasso#readme",
24
25
  "dependencies": {
25
- "@toptal/picasso-button": "4.0.23",
26
- "@toptal/picasso-form": "6.3.2",
27
- "@toptal/picasso-icons": "1.12.1",
28
- "@toptal/picasso-input-adornment": "3.0.10",
29
- "@toptal/picasso-shared": "15.0.0",
30
- "@toptal/picasso-utils": "3.1.0",
26
+ "@toptal/picasso-button": "4.0.24-alpha-1757603192867.0",
27
+ "@toptal/picasso-form": "6.3.3-alpha-1757603192867.0",
28
+ "@toptal/picasso-icons": "1.12.2-alpha-1757603192867.0",
29
+ "@toptal/picasso-input-adornment": "3.0.11-alpha-1757603192867.0",
30
+ "@toptal/picasso-shared": "15.0.1-alpha-1757603192867.0",
31
+ "@toptal/picasso-utils": "3.1.1-alpha-1757603192867.0",
31
32
  "@mui/base": "5.0.0-beta.58",
32
33
  "classnames": "^2.5.1"
33
34
  },
@@ -36,12 +37,12 @@
36
37
  "**/styles.js"
37
38
  ],
38
39
  "peerDependencies": {
39
- "@toptal/picasso-tailwind-merge": "^2.0.0",
40
- "@toptal/picasso-tailwind": ">=2.5.0",
40
+ "@toptal/picasso-tailwind-merge": "2.0.4-alpha-1757603192867.0",
41
+ "@toptal/picasso-tailwind": "3.0.1-alpha-1757603192867.0",
41
42
  "react": ">=16.12.0 < 19.0.0"
42
43
  },
43
44
  "devDependencies": {
44
- "@toptal/picasso-tailwind-merge": "2.0.3"
45
+ "@toptal/picasso-tailwind-merge": "2.0.4-alpha-1757603192867.0"
45
46
  },
46
47
  "exports": {
47
48
  ".": "./dist-package/src/index.js",
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import type { Props } from './types';
3
- declare const OutlinedInput: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLElement>>;
4
- export default OutlinedInput;
5
- //# sourceMappingURL=OutlinedInput.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OutlinedInput.d.ts","sourceRoot":"","sources":["../../../src/OutlinedInput/OutlinedInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkD,MAAM,OAAO,CAAA;AAmBtE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAmDpC,QAAA,MAAM,aAAa,2EAkIjB,CAAA;AAWF,eAAe,aAAa,CAAA"}
@@ -1,94 +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, { forwardRef, useImperativeHandle, useRef } from 'react';
13
- import { InputAdornment, InputValidIconAdornment, } from '@toptal/picasso-input-adornment';
14
- import { ButtonCircular } from '@toptal/picasso-button';
15
- import { CloseMinor16 } from '@toptal/picasso-icons';
16
- import { noop } from '@toptal/picasso-utils';
17
- import { useFieldsLayoutContext } from '@toptal/picasso-form';
18
- import { Input } from '@mui/base/Input';
19
- import { TextareaAutosize, } from '@mui/base/TextareaAutosize';
20
- import { twJoin, twMerge } from '@toptal/picasso-tailwind-merge';
21
- import { getRootClassName } from './stylesRoot';
22
- import { getInputClassName } from './stylesInput';
23
- import { getRows } from './utils';
24
- const ResetButton = ({ hasValue, onClick, testIds, }) => (React.createElement(InputAdornment, { "data-testid": testIds === null || testIds === void 0 ? void 0 : testIds.resetButton, position: 'end', className: twJoin('invisible', hasValue && 'peer-focus:visible peer-active:visible group-hover:visible') },
25
- React.createElement(ButtonCircular, { tabIndex: -1, icon: React.createElement(CloseMinor16, null), variant: 'flat', role: 'reset', onClick: onClick, onMouseDown: (event) => event.preventDefault(), onFocus: (event) => event.stopPropagation() })));
26
- const Textarea = forwardRef((_a, ref) => {
27
- var {
28
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
29
- ownerState } = _a, rest = __rest(_a, ["ownerState"]);
30
- return React.createElement(TextareaAutosize, Object.assign({ ref: ref }, rest));
31
- });
32
- const OutlinedInput = forwardRef(function OutlinedInput(props, ref) {
33
- const { className, style, multiline, multilineResizable, autoFocus, rows, rowsMax, width = 'auto', inputComponent, inputProps, defaultValue, value, type = 'text', status, startAdornment, endAdornment: userDefinedEndAdornment, onChange, size = 'medium', enableReset, disabled, onResetClick = noop, inputRef, testIds, highlight, classes } = props, rest = __rest(props, ["className", "style", "multiline", "multilineResizable", "autoFocus", "rows", "rowsMax", "width", "inputComponent", "inputProps", "defaultValue", "value", "type", "status", "startAdornment", "endAdornment", "onChange", "size", "enableReset", "disabled", "onResetClick", "inputRef", "testIds", "highlight", "classes"]);
34
- const { layout } = useFieldsLayoutContext();
35
- const isDark = (inputProps === null || inputProps === void 0 ? void 0 : inputProps.variant) === 'dark';
36
- const shouldShowReset = enableReset && !disabled;
37
- const hasEndAdornment = status === 'success' || shouldShowReset;
38
- const endAdornment = hasEndAdornment ? (React.createElement(React.Fragment, null,
39
- shouldShowReset && (React.createElement(ResetButton, { hasValue: Boolean(value), onClick: onResetClick, testIds: testIds })),
40
- !multiline && status === 'success' && (React.createElement(InputValidIconAdornment, { "data-testid": testIds === null || testIds === void 0 ? void 0 : testIds.validIcon })),
41
- userDefinedEndAdornment)) : (userDefinedEndAdornment);
42
- const divRef = useRef(null);
43
- useImperativeHandle(ref, () => divRef.current, []);
44
- const isError = Boolean(status === 'error');
45
- const isWarning = Boolean(status === 'warning');
46
- const inputClassName = getInputClassName({
47
- size,
48
- disabled,
49
- isDark,
50
- multiline,
51
- multilineResizable,
52
- type,
53
- inputProps,
54
- });
55
- const rootClassName = getRootClassName({
56
- size,
57
- width,
58
- type,
59
- layout,
60
- isDark,
61
- multiline,
62
- highlight,
63
- disabled,
64
- className,
65
- classes,
66
- isError,
67
- isWarning,
68
- });
69
- const multilineProps = multiline
70
- ? {
71
- multiline: true,
72
- // to keep the same behavior as in MUI@4
73
- // rows: getRows(rows),
74
- minRows: getRows(rows),
75
- maxRows: getRows(rowsMax),
76
- }
77
- : {};
78
- return (React.createElement(Input, Object.assign({}, rest, { slots: { input: inputComponent, textarea: Textarea }, slotProps: {
79
- root: {
80
- ref: divRef,
81
- className: twMerge(rootClassName, classes === null || classes === void 0 ? void 0 : classes.root, className),
82
- },
83
- input: Object.assign(Object.assign({}, inputProps), { ref: inputRef, className: twMerge(inputClassName, classes === null || classes === void 0 ? void 0 : classes.input, inputProps === null || inputProps === void 0 ? void 0 : inputProps.className), type, 'aria-invalid': isError }),
84
- }, style: style, error: isError, defaultValue: defaultValue, value: value, startAdornment: startAdornment, endAdornment: endAdornment, autoFocus: autoFocus, onChange: onChange, disabled: disabled }, multilineProps)));
85
- });
86
- OutlinedInput.defaultProps = {
87
- width: 'auto',
88
- size: 'medium',
89
- onResetClick: noop,
90
- status: 'default',
91
- };
92
- OutlinedInput.displayName = 'OutlinedInput';
93
- export default OutlinedInput;
94
- //# sourceMappingURL=OutlinedInput.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OutlinedInput.js","sourceRoot":"","sources":["../../../src/OutlinedInput/OutlinedInput.tsx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OAAO,CAAC,aAAa,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,EAAE,SAAS,CAAC;aAC5D;YACD,KAAK,kCACA,UAAU,KACb,GAAG,EAAE,QAAQ,EACb,SAAS,EAAE,OAAO,CAChB,cAAc,EACd,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,EACd,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,SAAS,CACtB,EACD,IAAI,EACJ,cAAc,EAAE,OAAO,GACxB;SACF,EACD,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,OAAO,EACd,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,IACd,cAAc,EAClB,CACH,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,aAAa,CAAC,YAAY,GAAG;IAC3B,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,QAAQ;IACd,YAAY,EAAE,IAAI;IAClB,MAAM,EAAE,SAAS;CAClB,CAAA;AAED,aAAa,CAAC,WAAW,GAAG,eAAe,CAAA;AAE3C,eAAe,aAAa,CAAA"}
@@ -1,7 +0,0 @@
1
- import type { OmitInternalProps } from '@toptal/picasso-shared';
2
- import type { Props } from './types';
3
- export { default as OutlinedInput } from './OutlinedInput';
4
- export declare type OutlinedInputProps = OmitInternalProps<Props>;
5
- export * from './OutlinedInput';
6
- export type { Status, BaseInputProps, InputProps, Size, Props } from './types';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/OutlinedInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEpC,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC1D,oBAAY,kBAAkB,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAA;AACzD,cAAc,iBAAiB,CAAA;AAC/B,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA"}
@@ -1,3 +0,0 @@
1
- export { default as OutlinedInput } from './OutlinedInput';
2
- export * from './OutlinedInput';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/OutlinedInput/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE1D,cAAc,iBAAiB,CAAA"}
@@ -1,24 +0,0 @@
1
- import type { Size, Props } from './types';
2
- export declare const classesBySize: Record<Size, string>;
3
- export declare const fontColorClasses: {
4
- dark: string;
5
- disabled: string[];
6
- default: string;
7
- timepicker: string;
8
- };
9
- export declare const getFontColorClass: ({ isDark, disabled, type, inputPropsDisabled, }: {
10
- isDark: boolean;
11
- disabled?: boolean | undefined;
12
- type?: string | undefined;
13
- inputPropsDisabled?: boolean | undefined;
14
- }) => string | string[];
15
- export declare const placeholderClasses: {
16
- default: string[];
17
- dark: string[];
18
- };
19
- export declare const inputClasses: string[];
20
- export declare const getInputClassName: ({ size, disabled, isDark, multiline, multilineResizable, type, inputProps, }: Partial<Props> & {
21
- isDark: boolean;
22
- size: Size;
23
- }) => (string | false | string[] | undefined)[];
24
- //# sourceMappingURL=stylesInput.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stylesInput.d.ts","sourceRoot":"","sources":["../../../src/OutlinedInput/stylesInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE1C,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAI9C,CAAA;AAED,eAAO,MAAM,gBAAgB;;;;;CAU5B,CAAA;AAED,eAAO,MAAM,iBAAiB;YAMpB,OAAO;;;;uBAmBhB,CAAA;AAED,eAAO,MAAM,kBAAkB;;;CAG9B,CAAA;AAED,eAAO,MAAM,YAAY,UAaxB,CAAA;AAED,eAAO,MAAM,iBAAiB;YAQA,OAAO;UAAQ,IAAI;+CAWhD,CAAA"}
@@ -1,60 +0,0 @@
1
- export const classesBySize = {
2
- small: 'text-xxs leading-4',
3
- medium: 'text-md leading-4',
4
- large: 'text-lg leading-4',
5
- };
6
- export const fontColorClasses = {
7
- dark: 'text-white',
8
- disabled: [
9
- 'text-gray-600',
10
- // On Safari the text gets a bit lighter as if it had some transparency applied to it
11
- // We need this webkit-specific property to achieve the exact font color
12
- '[&::-webkit-text-fill-color]:text-gray-600',
13
- ],
14
- default: 'text-black',
15
- timepicker: 'text-black',
16
- };
17
- export const getFontColorClass = ({ isDark, disabled, type, inputPropsDisabled, }) => {
18
- if (isDark) {
19
- return fontColorClasses.dark;
20
- }
21
- if (type === 'time' && inputPropsDisabled) {
22
- // It's a special case for TimePicker
23
- return fontColorClasses.timepicker;
24
- }
25
- if (disabled) {
26
- return fontColorClasses.disabled;
27
- }
28
- return fontColorClasses.default;
29
- };
30
- export const placeholderClasses = {
31
- default: ['[&::placeholder]:text-gray-600', '[&::placeholder]:opacity-100'],
32
- dark: ['[&::placeholder]:text-white', '[&::placeholder]:opacity-[0.64]'],
33
- };
34
- export const inputClasses = [
35
- '[&::-webkit-calendar-picker-indicator]:bg-none',
36
- 'bg-transparent',
37
- 'border-none',
38
- 'box-border',
39
- 'cursor-[inherit]',
40
- 'h-full',
41
- 'outline-none',
42
- 'p-0',
43
- 'peer',
44
- 'resize-none',
45
- 'resize-none',
46
- 'w-full',
47
- ];
48
- export const getInputClassName = ({ size, disabled, isDark, multiline, multilineResizable, type, inputProps, }) => [
49
- inputClasses,
50
- classesBySize[size],
51
- getFontColorClass({
52
- isDark,
53
- disabled,
54
- type,
55
- inputPropsDisabled: inputProps === null || inputProps === void 0 ? void 0 : inputProps.disabled,
56
- }),
57
- isDark ? placeholderClasses.dark : placeholderClasses.default,
58
- multiline && multilineResizable && 'resize-y',
59
- ];
60
- //# sourceMappingURL=stylesInput.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stylesInput.js","sourceRoot":"","sources":["../../../src/OutlinedInput/stylesInput.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAyB;IACjD,KAAK,EAAE,oBAAoB;IAC3B,MAAM,EAAE,mBAAmB;IAC3B,KAAK,EAAE,mBAAmB;CAC3B,CAAA;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE;QACR,eAAe;QACf,qFAAqF;QACrF,wEAAwE;QACxE,4CAA4C;KACjC;IACb,OAAO,EAAE,YAAY;IACrB,UAAU,EAAE,YAAY;CACzB,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAChC,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,kBAAkB,GAMnB,EAAE,EAAE;IACH,IAAI,MAAM,EAAE;QACV,OAAO,gBAAgB,CAAC,IAAI,CAAA;KAC7B;IAED,IAAI,IAAI,KAAK,MAAM,IAAI,kBAAkB,EAAE;QACzC,qCAAqC;QACrC,OAAO,gBAAgB,CAAC,UAAU,CAAA;KACnC;IAED,IAAI,QAAQ,EAAE;QACZ,OAAO,gBAAgB,CAAC,QAAQ,CAAA;KACjC;IAED,OAAO,gBAAgB,CAAC,OAAO,CAAA;AACjC,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,OAAO,EAAE,CAAC,gCAAgC,EAAE,8BAA8B,CAAC;IAC3E,IAAI,EAAE,CAAC,6BAA6B,EAAE,iCAAiC,CAAC;CACzE,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,gDAAgD;IAChD,gBAAgB;IAChB,aAAa;IACb,YAAY;IACZ,kBAAkB;IAClB,QAAQ;IACR,cAAc;IACd,KAAK;IACL,MAAM;IACN,aAAa;IACb,aAAa;IACb,QAAQ;CACT,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAChC,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,SAAS,EACT,kBAAkB,EAClB,IAAI,EACJ,UAAU,GACuC,EAAE,EAAE,CAAC;IACtD,YAAY;IACZ,aAAa,CAAC,IAAI,CAAC;IACnB,iBAAiB,CAAC;QAChB,MAAM;QACN,QAAQ;QACR,IAAI;QACJ,kBAAkB,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,QAAQ;KACzC,CAAC;IACF,MAAM,CAAC,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC,OAAO;IAC7D,SAAS,IAAI,kBAAkB,IAAI,UAAU;CAC9C,CAAA"}
@@ -1,70 +0,0 @@
1
- import type { FieldLayout } from '@toptal/picasso-form';
2
- import type { WidthType, Size, Props } from './types';
3
- export declare const spacingBySize: Record<Size, string>;
4
- export declare const heightClasses: {
5
- readonly singleline: Record<"small" | "medium" | "large", string>;
6
- readonly multiline: "h-auto";
7
- };
8
- export declare const fontColorClass: {
9
- default: string;
10
- disabled: string;
11
- };
12
- export declare const cursorClass: {
13
- default: string;
14
- disabled: string;
15
- };
16
- export declare const bgClasses: {
17
- disabled: string;
18
- dark: string;
19
- highlight: string;
20
- default: string;
21
- };
22
- export declare const widthClasses: Record<WidthType | FieldLayout, string>;
23
- export declare const borderPseudoCoreClasses: string[];
24
- export declare const borderPseudoClassesByState: {
25
- borderColor: {
26
- dark: string;
27
- default: string[];
28
- disabled: string;
29
- error: string[];
30
- warning: string[];
31
- hoverWithoutFocus: string;
32
- };
33
- border: {
34
- dark: string;
35
- default: string;
36
- disabled: string;
37
- error: string;
38
- warning: string;
39
- };
40
- shadow: {
41
- dark: string;
42
- default: string[];
43
- disabled: string;
44
- error: string[];
45
- warning: string[];
46
- };
47
- };
48
- export declare const rootBasicClasses: string[];
49
- export declare const getHeightClasses: ({ size, multiline, }: {
50
- size: Size;
51
- multiline: boolean | undefined;
52
- }) => string;
53
- export declare const getWidthClasses: ({ width, layout, }: {
54
- width: WidthType;
55
- layout: FieldLayout;
56
- }) => string;
57
- export declare const getBackgroundColorClasses: ({ isDark, disabled, highlight, }: {
58
- isDark: boolean;
59
- disabled: boolean | undefined;
60
- highlight: string | undefined;
61
- }) => string;
62
- export declare const getRootClassName: ({ size, width, type, layout, isDark, multiline, highlight, disabled, isError, isWarning, }: Partial<Props> & {
63
- isDark: boolean;
64
- layout: FieldLayout;
65
- isError: boolean;
66
- size: Size;
67
- width: WidthType;
68
- isWarning: boolean;
69
- }) => (string | false | (string | (string | string[])[])[])[];
70
- //# sourceMappingURL=stylesRoot.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stylesRoot.d.ts","sourceRoot":"","sources":["../../../src/OutlinedInput/stylesRoot.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAEvD,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAErD,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAI9C,CAAA;AAED,eAAO,MAAM,aAAa;;;CAOhB,CAAA;AAEV,eAAO,MAAM,cAAc;;;CAG1B,CAAA;AAED,eAAO,MAAM,WAAW;;;CAGvB,CAAA;AAED,eAAO,MAAM,SAAS;;;;;CAKrB,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,SAAS,GAAG,WAAW,EAAE,MAAM,CAMhE,CAAA;AAED,eAAO,MAAM,uBAAuB,UAcnC,CAAA;AAED,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;CAmCtC,CAAA;AAED,eAAO,MAAM,gBAAgB,UAW5B,CAAA;AAED,eAAO,MAAM,gBAAgB;UAIrB,IAAI;eACC,OAAO,GAAG,SAAS;YAC4C,CAAA;AAE5E,eAAO,MAAM,eAAe;WAInB,SAAS;YACR,WAAW;YAC0D,CAAA;AAE/E,eAAO,MAAM,yBAAyB;YAK5B,OAAO;cACL,OAAO,GAAG,SAAS;eAClB,MAAM,GAAG,SAAS;YAe9B,CAAA;AAiDD,eAAO,MAAM,gBAAgB;YAYnB,OAAO;YACP,WAAW;aACV,OAAO;UACV,IAAI;WACH,SAAS;eACL,OAAO;6DAWnB,CAAA"}
@@ -1,148 +0,0 @@
1
- export const spacingBySize = {
2
- small: 'py-1 px-[0.625rem]',
3
- medium: 'p-2',
4
- large: 'p-3',
5
- };
6
- export const heightClasses = {
7
- singleline: {
8
- small: 'h-6',
9
- medium: 'h-8',
10
- large: 'h-12',
11
- },
12
- multiline: 'h-auto',
13
- };
14
- export const fontColorClass = {
15
- default: 'text-black',
16
- disabled: 'text-gray-500',
17
- };
18
- export const cursorClass = {
19
- default: 'cursor-[inherit]',
20
- disabled: 'cursor-default',
21
- };
22
- export const bgClasses = {
23
- disabled: 'bg-gray-200',
24
- dark: 'bg-[#081237]',
25
- highlight: 'bg-yellow-100/60',
26
- default: 'bg-white',
27
- };
28
- export const widthClasses = {
29
- full: 'w-full',
30
- shrink: 'w-auto',
31
- auto: 'w-[18.75rem]',
32
- horizontal: 'w-full',
33
- vertical: '',
34
- };
35
- export const borderPseudoCoreClasses = [
36
- 'after:content-[""]',
37
- 'after:inline-block',
38
- 'after:absolute',
39
- 'after:top-0',
40
- 'after:bottom-0',
41
- 'after:right-0',
42
- 'after:left-0',
43
- 'after:pointer-events-none',
44
- 'after:border-solid',
45
- 'after:rounded-sm',
46
- ];
47
- export const borderPseudoClassesByState = {
48
- borderColor: {
49
- dark: '',
50
- default: ['after:border-gray-400', '[&:has(:focus)]:after:border-blue-500'],
51
- disabled: 'after:border-gray-400',
52
- error: ['after:border-red-500', '[&:has(:focus)]:after:border-red-500'],
53
- warning: [
54
- 'after:border-yellow-500',
55
- '[&:has(:focus)]:after:border-yellow-500',
56
- ],
57
- hoverWithoutFocus: 'hover:[&:not(:has(:focus))]:after:border-gray-600',
58
- },
59
- border: {
60
- dark: 'after:border-none',
61
- default: 'after:border',
62
- disabled: '',
63
- error: '',
64
- warning: '',
65
- },
66
- shadow: {
67
- dark: '[&:has(:focus)]:after:shadow-0',
68
- default: [
69
- '[&:has(:focus)]:after:shadow-[0_0_0_3px]',
70
- '[&:has(:focus)]:after:shadow-blue-500/[.48]',
71
- ],
72
- disabled: '',
73
- error: [
74
- '[&:has(:focus)]:after:shadow-[0_0_0_3px]',
75
- '[&:has(:focus)]:after:shadow-red-500/[.48]',
76
- ],
77
- warning: [
78
- '[&:has(:focus)]:after:shadow-[0_0_0_3px]',
79
- '[&:has(:focus)]:after:shadow-yellow-500/[.48]',
80
- ],
81
- },
82
- };
83
- export const rootBasicClasses = [
84
- 'relative',
85
- 'text-black',
86
- 'inline-flex',
87
- 'gap-y-1',
88
- 'gap-x-2',
89
- 'items-center',
90
- 'rounded-sm',
91
- '[font-size:_unset]',
92
- 'group',
93
- 'text-nowrap',
94
- ];
95
- export const getHeightClasses = ({ size, multiline, }) => (multiline ? heightClasses.multiline : heightClasses.singleline[size]);
96
- export const getWidthClasses = ({ width, layout, }) => (layout === 'horizontal' ? widthClasses.horizontal : widthClasses[width]);
97
- export const getBackgroundColorClasses = ({ isDark, disabled, highlight, }) => {
98
- if (disabled) {
99
- return bgClasses.disabled;
100
- }
101
- if (isDark) {
102
- return bgClasses.dark;
103
- }
104
- if (highlight === 'autofill') {
105
- return bgClasses.highlight;
106
- }
107
- return bgClasses.default;
108
- };
109
- const getTextColorClass = (disabled) => disabled ? fontColorClass.disabled : fontColorClass.default;
110
- const getCursorClass = (disabled) => disabled ? cursorClass.disabled : cursorClass.default;
111
- const getClassForState = (state, { borderColor, border, shadow }) => {
112
- return [
113
- borderColor[state] || borderColor.default,
114
- border[state] || border.default,
115
- shadow[state] || shadow.default,
116
- ];
117
- };
118
- const borderPseudoElement = (conditions) => {
119
- const { disabled, isDark, isError, isWarning } = conditions;
120
- const { borderColor } = borderPseudoClassesByState;
121
- const primaryState = isError
122
- ? 'error'
123
- : disabled
124
- ? 'disabled'
125
- : isDark
126
- ? 'dark'
127
- : isWarning
128
- ? 'warning'
129
- : 'default';
130
- const hoverClass = !disabled && !isError && !isWarning ? borderColor.hoverWithoutFocus : '';
131
- return [
132
- borderPseudoCoreClasses,
133
- getClassForState(primaryState, borderPseudoClassesByState),
134
- hoverClass,
135
- ];
136
- };
137
- export const getRootClassName = ({ size, width, type, layout, isDark, multiline, highlight, disabled, isError, isWarning, }) => [
138
- rootBasicClasses,
139
- spacingBySize[size],
140
- getHeightClasses({ size, multiline }),
141
- getWidthClasses({ width, layout }),
142
- getBackgroundColorClasses({ isDark, disabled, highlight }),
143
- borderPseudoElement({ isDark, disabled, isError, isWarning }),
144
- getTextColorClass(disabled),
145
- getCursorClass(disabled),
146
- type === 'hidden' && 'hidden',
147
- ];
148
- //# sourceMappingURL=stylesRoot.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stylesRoot.js","sourceRoot":"","sources":["../../../src/OutlinedInput/stylesRoot.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,aAAa,GAAyB;IACjD,KAAK,EAAE,oBAAoB;IAC3B,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,KAAK;CACb,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,UAAU,EAAE;QACV,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,KAAK;QACb,KAAK,EAAE,MAAM;KACU;IACzB,SAAS,EAAE,QAAQ;CACX,CAAA;AAEV,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO,EAAE,YAAY;IACrB,QAAQ,EAAE,eAAe;CAC1B,CAAA;AAED,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AAa,CAAC,IAAI,CAAC;IACnB,gBAAgB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IACrC,eAAe,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAClC,yBAAyB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC1D,mBAAmB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;IAC7D,iBAAiB,CAAC,QAAQ,CAAC;IAC3B,cAAc,CAAC,QAAQ,CAAC;IACxB,IAAI,KAAK,QAAQ,IAAI,QAAQ;CAC9B,CAAA"}
@@ -1,57 +0,0 @@
1
- import type { ChangeEventHandler, ReactType, ReactNode, InputHTMLAttributes, MouseEvent } from 'react';
2
- import type { SizeType, BaseProps } from '@toptal/picasso-shared';
3
- import type { InputBaseComponentProps } from '@material-ui/core/InputBase';
4
- export declare type WidthType = 'full' | 'shrink' | 'auto';
5
- export declare type Size = SizeType<'small' | 'medium' | 'large'>;
6
- export declare type ValueType = (string | number | boolean | object)[] | string | number | boolean | object;
7
- export declare type Status = 'error' | 'success' | 'warning' | 'default';
8
- export declare type BaseInputProps = InputBaseComponentProps & {
9
- variant?: 'dark' | 'light';
10
- };
11
- export interface InputProps extends React.HTMLAttributes<HTMLInputElement>, BaseProps {
12
- size?: number | 'small' | 'medium' | 'large';
13
- multiple?: boolean | undefined;
14
- }
15
- export interface Props extends BaseProps, Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'size' | 'color'> {
16
- /** Classes for input and root */
17
- classes?: {
18
- input?: string;
19
- root?: string;
20
- };
21
- /** Width of the component */
22
- width?: WidthType;
23
- inputComponent?: ReactType<InputBaseComponentProps>;
24
- inputProps?: BaseInputProps;
25
- defaultValue?: ValueType;
26
- value?: ValueType;
27
- /** Whether `Input` should be rendered as `TextArea` or not */
28
- multiline?: boolean;
29
- /** If true, `TextArea` would be resizable vertical */
30
- multilineResizable?: boolean;
31
- /** If true, the input element will be focused during the first mount */
32
- autoFocus?: boolean;
33
- /** Specify rows amount for `TextArea` */
34
- rows?: string | number;
35
- rowsMax?: string | number;
36
- /** Type attribute of the Input element. It should be a valid HTML5 input type */
37
- type?: string;
38
- /** Indicate input status */
39
- status?: Status;
40
- startAdornment?: ReactNode;
41
- endAdornment?: ReactNode;
42
- onChange?: ChangeEventHandler<HTMLInputElement>;
43
- /** Component size */
44
- size?: Size;
45
- /** Whether to render reset icon when there is a value in the input */
46
- enableReset?: boolean;
47
- /** Callback invoked when reset button was clicked */
48
- onResetClick?: (event: MouseEvent<HTMLButtonElement & HTMLAnchorElement>) => void;
49
- /** Ref of the input element */
50
- inputRef?: React.Ref<HTMLInputElement>;
51
- testIds?: {
52
- resetButton?: string;
53
- validIcon?: string;
54
- };
55
- highlight?: 'autofill';
56
- }
57
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/OutlinedInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,SAAS,EACT,SAAS,EACT,mBAAmB,EACnB,UAAU,EACX,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAEjE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AAE1E,oBAAY,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAA;AAElD,oBAAY,IAAI,GAAG,QAAQ,CAAC,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAA;AAEzD,oBAAY,SAAS,GACjB,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC,EAAE,GACtC,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,CAAA;AAEV,oBAAY,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,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AA;IACxB,QAAQ,CAAC,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;IAC/C,qBAAqB;IACrB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,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,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA;IACtC,OAAO,CAAC,EAAE;QACR,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,CAAA;IACD,SAAS,CAAC,EAAE,UAAU,CAAA;CACvB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/OutlinedInput/types.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export declare const getRows: (rows: number | string | undefined) => number | undefined;
2
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/OutlinedInput/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,SAAU,MAAM,GAAG,MAAM,GAAG,SAAS,uBACI,CAAA"}
@@ -1,2 +0,0 @@
1
- export const getRows = (rows) => typeof Number(rows) === 'number' ? Number(rows) : undefined;
2
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/OutlinedInput/utils.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,IAAiC,EAAE,EAAE,CAC3D,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './OutlinedInput';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './OutlinedInput';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}