@toptal/picasso-form 6.0.0 → 6.1.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.
|
@@ -4,6 +4,8 @@ import type { BaseProps } from '@toptal/picasso-shared';
|
|
|
4
4
|
export interface Props extends BaseProps, HTMLAttributes<HTMLDivElement> {
|
|
5
5
|
/** The text of the hint */
|
|
6
6
|
children: ReactNode;
|
|
7
|
+
/** Whether the FormHint is disabled */
|
|
8
|
+
disabled?: boolean;
|
|
7
9
|
}
|
|
8
10
|
export declare const FormHint: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
9
11
|
export default FormHint;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormHint.d.ts","sourceRoot":"","sources":["../../../src/FormHint/FormHint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AACtD,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAIvD,MAAM,WAAW,KAAM,SAAQ,SAAS,EAAE,cAAc,CAAC,cAAc,CAAC;IACtE,2BAA2B;IAC3B,QAAQ,EAAE,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"FormHint.d.ts","sourceRoot":"","sources":["../../../src/FormHint/FormHint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AACtD,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAIvD,MAAM,WAAW,KAAM,SAAQ,SAAS,EAAE,cAAc,CAAC,cAAc,CAAC;IACtE,2BAA2B;IAC3B,QAAQ,EAAE,SAAS,CAAA;IACnB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,QAAQ,8EAkBnB,CAAA;AAMF,eAAe,QAAQ,CAAA"}
|
|
@@ -13,9 +13,9 @@ import React, { forwardRef } from 'react';
|
|
|
13
13
|
import { Typography } from '@toptal/picasso-typography';
|
|
14
14
|
import { twMerge } from '@toptal/picasso-tailwind-merge';
|
|
15
15
|
export const FormHint = forwardRef(function FormHint(props, ref) {
|
|
16
|
-
const { children, className, style } = props, rest = __rest(props, ["children", "className", "style"]);
|
|
16
|
+
const { children, className, style, disabled } = props, rest = __rest(props, ["children", "className", "style", "disabled"]);
|
|
17
17
|
return (React.createElement("div", Object.assign({}, rest, { ref: ref, className: twMerge('mt-1', className), style: style }),
|
|
18
|
-
React.createElement(Typography, { size: 'xxsmall' }, children)));
|
|
18
|
+
React.createElement(Typography, { size: 'xxsmall', color: disabled ? 'grey-main-2' : undefined }, children)));
|
|
19
19
|
});
|
|
20
20
|
FormHint.defaultProps = {};
|
|
21
21
|
FormHint.displayName = 'FormHint';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormHint.js","sourceRoot":"","sources":["../../../src/FormHint/FormHint.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;
|
|
1
|
+
{"version":3,"file":"FormHint.js","sourceRoot":"","sources":["../../../src/FormHint/FormHint.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AASxD,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAwB,SAAS,QAAQ,CACzE,KAAK,EACL,GAAG;IAEH,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAAzD,8CAAiD,CAAQ,CAAA;IAE/D,OAAO,CACL,6CACM,IAAI,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,EACrC,KAAK,EAAE,KAAK;QAEZ,oBAAC,UAAU,IAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,IACnE,QAAQ,CACE,CACT,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,QAAQ,CAAC,YAAY,GAAG,EAAE,CAAA;AAE1B,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAA;AAEjC,eAAe,QAAQ,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toptal/picasso-form",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "Toptal UI components library - Form",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"homepage": "https://github.com/toptal/picasso/tree/master/packages/picasso#readme",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@toptal/picasso-collapse": "3.0.1",
|
|
26
|
-
"@toptal/picasso-container": "3.0
|
|
26
|
+
"@toptal/picasso-container": "3.1.0",
|
|
27
27
|
"@toptal/picasso-grid": "5.0.1",
|
|
28
28
|
"@toptal/picasso-icons": "1.6.1",
|
|
29
29
|
"@toptal/picasso-shared": "15.0.0",
|
|
@@ -7,13 +7,15 @@ import { twMerge } from '@toptal/picasso-tailwind-merge'
|
|
|
7
7
|
export interface Props extends BaseProps, HTMLAttributes<HTMLDivElement> {
|
|
8
8
|
/** The text of the hint */
|
|
9
9
|
children: ReactNode
|
|
10
|
+
/** Whether the FormHint is disabled */
|
|
11
|
+
disabled?: boolean
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
export const FormHint = forwardRef<HTMLDivElement, Props>(function FormHint(
|
|
13
15
|
props,
|
|
14
16
|
ref
|
|
15
17
|
) {
|
|
16
|
-
const { children, className, style, ...rest } = props
|
|
18
|
+
const { children, className, style, disabled, ...rest } = props
|
|
17
19
|
|
|
18
20
|
return (
|
|
19
21
|
<div
|
|
@@ -22,7 +24,9 @@ export const FormHint = forwardRef<HTMLDivElement, Props>(function FormHint(
|
|
|
22
24
|
className={twMerge('mt-1', className)}
|
|
23
25
|
style={style}
|
|
24
26
|
>
|
|
25
|
-
<Typography size='xxsmall'
|
|
27
|
+
<Typography size='xxsmall' color={disabled ? 'grey-main-2' : undefined}>
|
|
28
|
+
{children}
|
|
29
|
+
</Typography>
|
|
26
30
|
</div>
|
|
27
31
|
)
|
|
28
32
|
})
|