@toptal/picasso-forms 46.0.3-alpha-fx-mui-perf-test.39 → 46.0.3

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.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { AutocompleteProps } from '@toptal/picasso';
3
2
  import { FieldProps } from '../Field';
4
3
  export declare type Props = AutocompleteProps & FieldProps<AutocompleteProps['value']>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ButtonCheckboxProps } from '@toptal/picasso';
3
2
  import { FieldProps } from '../Field';
4
3
  declare type CheckboxValue = ButtonCheckboxProps['value'] | ButtonCheckboxProps['checked'];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ButtonRadioProps } from '@toptal/picasso';
3
2
  export declare type Props = ButtonRadioProps & {
4
3
  name?: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CheckboxProps } from '@toptal/picasso';
3
2
  import { FieldProps } from '../Field';
4
3
  declare type CheckboxValue = CheckboxProps['value'] | CheckboxProps['checked'];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CheckboxProps, CheckboxGroupProps } from '@toptal/picasso';
3
2
  import { FieldProps } from '../Field';
4
3
  export declare type Props = CheckboxGroupProps & FieldProps<CheckboxProps['value']>;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const _default: import("react").Context<string | undefined>;
3
2
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DatePickerProps } from '@toptal/picasso';
3
2
  import { FieldProps } from '../Field';
4
3
  export declare type FormDatePickerProps = Omit<DatePickerProps, 'onChange'> & {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DropzoneProps } from '@toptal/picasso';
3
2
  import { FieldProps } from '../Field';
4
3
  export declare type Props = DropzoneProps & FieldProps<DropzoneProps['value']> & {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TextLabelProps } from '@toptal/picasso-shared';
3
2
  export declare type Props = {
4
3
  name?: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Props as FieldProps } from '../Field';
3
2
  import { ValueType, IFormComponentProps } from '../FieldBase';
4
3
  export declare type Props<TWrappedComponentProps, TInputValue> = Omit<FieldProps<TWrappedComponentProps, TInputValue>, 'label'> & {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FileInputProps } from '@toptal/picasso';
3
2
  import { FieldProps } from '../Field';
4
3
  export declare type Props = FileInputProps & FieldProps<FileInputProps['value']>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FormProps } from '@toptal/picasso';
3
2
  interface Props extends FormProps {
4
3
  setActiveFieldTouched: () => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const FormCompound: {
3
2
  <T extends import("final-form").AnyObject = import("final-form").AnyObject>(props: import("../Form").Props<T>): JSX.Element;
4
3
  defaultProps: {};
@@ -97,5 +96,5 @@ export declare const FormCompound: {
97
96
  };
98
97
  displayName: string;
99
98
  };
100
- RichTextEditor: ({ onChange, defaultValue, ...rest }: import("../RichTextEditor/RichTextEditor").Props) => JSX.Element;
99
+ RichTextEditor: (props: import("../RichTextEditor/RichTextEditor").Props) => JSX.Element;
101
100
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare type RequiredVariant = 'default' | 'asterisk';
3
2
  declare type ValidationOnSubmitConfig = {
4
3
  showValidState?: false;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { OutlinedInputStatus } from '@toptal/picasso';
3
2
  import { FieldMetaState } from 'react-final-form';
4
3
  import { Props as FieldProps } from '../Field';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { NumberInputProps } from '@toptal/picasso';
3
2
  import { FieldProps } from '../Field';
4
3
  export declare type Props = NumberInputProps & FieldProps<NumberInputProps['value']>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PasswordInputProps } from '@toptal/picasso';
3
2
  interface FieldRendererProps extends PasswordInputProps {
4
3
  onShowContent: () => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PasswordInputProps } from '@toptal/picasso';
3
2
  import { FieldProps } from '../Field';
4
3
  export declare type Props = PasswordInputProps & FieldProps<PasswordInputProps['value']> & {
@@ -1 +1 @@
1
- {"version":3,"file":"validators.js","sourceRoot":"","sources":["../../src/PasswordInput/validators.ts"],"names":[],"mappings":"AAAA,MAAM,sBAAsB,GAAG,CAAC,KAAa,EAAE,EAAE;IAC/C,OAAO,KAAK,CAAC,MAAM,IAAI,CAAC,CAAA;AAC1B,CAAC,CAAA;AAED,MAAM,4BAA4B,GAAG,CAAC,KAAa,EAAE,EAAE;IACrD,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC,CAAA;AAED,MAAM,4BAA4B,GAAG,CAAC,KAAa,EAAE,EAAE;IACrD,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC,CAAA;AAED,MAAM,gBAAgB,GAAG,CAAC,KAAa,EAAE,EAAE;IACzC,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC,CAAA;AAED,MAAM,0BAA0B,GAAG,CAAC,KAAa,EAAE,EAAE;IACnD,6CAA6C;IAC7C,OAAO,uCAAuC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC7D,CAAC,CAAA;AAED,eAAe;IACb,sBAAsB;IACtB,4BAA4B;IAC5B,4BAA4B;IAC5B,gBAAgB;IAChB,0BAA0B;CAC3B,CAAA"}
1
+ {"version":3,"file":"validators.js","sourceRoot":"","sources":["../../src/PasswordInput/validators.ts"],"names":[],"mappings":"AAAA,MAAM,sBAAsB,GAAG,CAAC,KAAa,EAAE,EAAE;IAC/C,OAAO,KAAK,CAAC,MAAM,IAAI,CAAC,CAAA;AAC1B,CAAC,CAAA;AAED,MAAM,4BAA4B,GAAG,CAAC,KAAa,EAAE,EAAE;IACrD,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAC5B,CAAC,CAAA;AAED,MAAM,4BAA4B,GAAG,CAAC,KAAa,EAAE,EAAE;IACrD,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAC5B,CAAC,CAAA;AAED,MAAM,gBAAgB,GAAG,CAAC,KAAa,EAAE,EAAE;IACzC,OAAO,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAC5B,CAAC,CAAA;AAED,MAAM,0BAA0B,GAAG,CAAC,KAAa,EAAE,EAAE;IACnD,6CAA6C;IAC7C,OAAO,uCAAuC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAC5D,CAAC,CAAA;AAED,eAAe;IACb,sBAAsB;IACtB,4BAA4B;IAC5B,4BAA4B;IAC5B,gBAAgB;IAChB,0BAA0B;CAC3B,CAAA"}
package/Radio/Radio.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { RadioProps } from '@toptal/picasso';
3
2
  export declare type Props = RadioProps & {
4
3
  name?: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { RadioProps, RadioGroupProps } from '@toptal/picasso';
3
2
  import { FieldProps } from '../Field';
4
3
  export declare type Props = RadioGroupProps & FieldProps<RadioProps['value']>;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const _default: import("react").Context<string | undefined>;
3
2
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { RatingStarsProps as PicassoRatingStarsProps, RatingThumbsProps as PicassoRatingThumbsProps } from '@toptal/picasso';
3
2
  import { FieldProps } from '../Field';
4
3
  export declare type RatingStarsProps = PicassoRatingStarsProps & FieldProps<PicassoRatingStarsProps['value']>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ASTType, RichTextEditorProps } from '@toptal/picasso';
3
2
  import { Except } from 'type-fest';
4
3
  import { FieldProps } from '../FieldWrapper';
@@ -8,5 +7,5 @@ declare type OverriddenProps = {
8
7
  initialValue?: never;
9
8
  };
10
9
  export declare type Props = RichTextEditorProps & Except<FieldProps<string>, keyof OverriddenProps> & OverriddenProps;
11
- export declare const RichTextEditor: ({ onChange, defaultValue, ...rest }: Props) => JSX.Element;
10
+ export declare const RichTextEditor: (props: Props) => JSX.Element;
12
11
  export default RichTextEditor;
@@ -12,8 +12,9 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import { RichTextEditor as PicassoRichTextEditor, } from '@toptal/picasso';
13
13
  import React, { useCallback, useState } from 'react';
14
14
  import InputField from '../InputField';
15
- export const RichTextEditor = (_a) => {
16
- var { onChange, defaultValue } = _a, rest = __rest(_a, ["onChange", "defaultValue"]);
15
+ import FieldLabel from '../FieldLabel';
16
+ export const RichTextEditor = (props) => {
17
+ const { onChange, defaultValue, label, titleCase } = props, rest = __rest(props, ["onChange", "defaultValue", "label", "titleCase"]);
17
18
  const [value, setValue] = useState('');
18
19
  // Because RichTextEditor doesn't have an value input we need to implement this
19
20
  // as an compatibility layer between final-form
@@ -21,7 +22,8 @@ export const RichTextEditor = (_a) => {
21
22
  setValue(newVal);
22
23
  onChange === null || onChange === void 0 ? void 0 : onChange(newVal);
23
24
  }, [onChange, setValue]);
24
- return (React.createElement(InputField, Object.assign({ value: value, onChange: handleOnChange }, rest), (inputProps) => (React.createElement(PicassoRichTextEditor, Object.assign({ defaultValue: defaultValue }, inputProps)))));
25
+ const hiddenInputId = `${props.id}-hidden-input`;
26
+ return (React.createElement(InputField, Object.assign({ value: value, onChange: handleOnChange, label: label ? (React.createElement(FieldLabel, { name: hiddenInputId, required: props.required, label: label, titleCase: titleCase })) : null }, rest), (inputProps) => (React.createElement(PicassoRichTextEditor, Object.assign({ defaultValue: defaultValue, hiddenInputId: hiddenInputId }, inputProps)))));
25
27
  };
26
28
  export default RichTextEditor;
27
29
  //# sourceMappingURL=RichTextEditor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextEditor.js","sourceRoot":"","sources":["../../src/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAEL,cAAc,IAAI,qBAAqB,GAExC,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAIpD,OAAO,UAAU,MAAM,eAAe,CAAA;AActC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAA0C,EAAE,EAAE;QAA9C,EAAE,QAAQ,EAAE,YAAY,OAAkB,EAAb,IAAI,cAAjC,4BAAmC,CAAF;IAC9D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAA;IAEtC,+EAA+E;IAC/E,+CAA+C;IAC/C,MAAM,cAAc,GAAG,WAAW,CAChC,CAAC,MAAc,EAAE,EAAE;QACjB,QAAQ,CAAC,MAAM,CAAC,CAAA;QAChB,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,MAAM,CAAC,CAAA;IACpB,CAAC,EACD,CAAC,QAAQ,EAAE,QAAQ,CAAC,CACrB,CAAA;IAED,OAAO,CACL,oBAAC,UAAU,kBACT,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,cAAc,IACpB,IAAI,GAEP,CAAC,UAA+B,EAAE,EAAE,CAAC,CACpC,oBAAC,qBAAqB,kBAAC,YAAY,EAAE,YAAY,IAAM,UAAU,EAAI,CACtE,CACU,CACd,CAAA;AACH,CAAC,CAAA;AAED,eAAe,cAAc,CAAA"}
1
+ {"version":3,"file":"RichTextEditor.js","sourceRoot":"","sources":["../../src/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAEL,cAAc,IAAI,qBAAqB,GAEx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A"}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SelectProps, SelectValueType } from '@toptal/picasso';
3
2
  import { FieldProps } from '../Field';
4
3
  export declare type Props<T extends SelectValueType, M extends boolean = false> = SelectProps<T, M> & FieldProps<SelectProps<T, M>['value']>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SwitchProps } from '@toptal/picasso';
3
2
  import { FieldProps } from '../Field';
4
3
  export declare type FormSwitchProps = Omit<SwitchProps, 'onChange'> & {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TagSelectorProps } from '@toptal/picasso';
3
2
  import { FieldProps } from '../Field';
4
3
  export declare type Props = TagSelectorProps & FieldProps<TagSelectorProps['value']>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TimePickerProps } from '@toptal/picasso';
3
2
  import { FieldProps } from '../Field';
4
3
  export declare type FormTimePickerProps = Omit<TimePickerProps, 'onChange'> & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toptal/picasso-forms",
3
- "version": "46.0.3-alpha-fx-mui-perf-test.39+ec2256eb",
3
+ "version": "46.0.3",
4
4
  "description": "Picasso form components",
5
5
  "author": "Toptal",
6
6
  "homepage": "https://github.com/toptal/picasso/tree/master/packages/picasso-forms#readme",
@@ -26,8 +26,8 @@
26
26
  "@toptal/picasso": "^26.0.0",
27
27
  "@toptal/picasso-shared": "^9.0.0",
28
28
  "react": ">=16.12.0 < 19.0.0",
29
- "react-dom": ">=16.12.0 < 19.0.0",
30
- "typescript": "4.6.x"
29
+ "typescript": "4.6.x",
30
+ "react-dom": ">=16.12.0 < 19.0.0"
31
31
  },
32
32
  "dependencies": {
33
33
  "classnames": "^2.3.1",
@@ -44,6 +44,5 @@
44
44
  "@types/react-final-form-listeners": "^1.0.0",
45
45
  "storybook-readme": "^5.0.9",
46
46
  "type-fest": "^2.14.0"
47
- },
48
- "gitHead": "ec2256ebfd7f18d5b2057548f60330b7efc58ed5"
47
+ }
49
48
  }