@toptal/picasso-forms 69.0.7 → 70.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.
@@ -4,8 +4,9 @@ import type { FieldProps } from '../Field';
4
4
  import type { Props as FieldLabelProps } from '../FieldLabel';
5
5
  export declare type FormSwitchProps = Omit<SwitchProps, 'onChange'> & {
6
6
  onChange?: SwitchProps['onChange'];
7
+ value?: string;
7
8
  };
8
- export declare type Props = FormSwitchProps & FieldProps<SwitchProps['value']> & Omit<FieldLabelProps, 'name' | 'required'>;
9
+ export declare type Props = FormSwitchProps & FieldProps<FormSwitchProps['value']> & Omit<FieldLabelProps, 'name' | 'required'>;
9
10
  export declare const Switch: {
10
11
  (props: Props): JSX.Element;
11
12
  defaultProps: {};
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/Switch/Switch.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAIzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAE1C,OAAO,KAAK,EAAE,KAAK,IAAI,eAAe,EAAE,MAAM,eAAe,CAAA;AAE7D,oBAAY,eAAe,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,GAAG;IAC5D,QAAQ,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,CAAA;CACnC,CAAA;AACD,oBAAY,KAAK,GAAG,eAAe,GACjC,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,GAChC,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,UAAU,CAAC,CAAA;AAE5C,eAAO,MAAM,MAAM;YAAW,KAAK;;;CAyBlC,CAAA;AAMD,eAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/Switch/Switch.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAIzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAE1C,OAAO,KAAK,EAAE,KAAK,IAAI,eAAe,EAAE,MAAM,eAAe,CAAA;AAE7D,oBAAY,eAAe,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,GAAG;IAC5D,QAAQ,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,CAAA;IAClC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,oBAAY,KAAK,GAAG,eAAe,GACjC,UAAU,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,GACpC,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,UAAU,CAAC,CAAA;AAE5C,eAAO,MAAM,MAAM;YAAW,KAAK;;;CA+BlC,CAAA;AAMD,eAAe,MAAM,CAAA"}
@@ -17,7 +17,10 @@ export const Switch = (props) => (React.createElement(PicassoField, Object.assig
17
17
  var {
18
18
  // omitting highlight from inputProps
19
19
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
20
- highlight } = _a, inputProps = __rest(_a, ["highlight"]);
20
+ highlight,
21
+ // value is not expected in PicassoSwitch
22
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
23
+ value } = _a, inputProps = __rest(_a, ["highlight", "value"]);
21
24
  return React.createElement(PicassoSwitch, Object.assign({}, inputProps));
22
25
  }));
23
26
  Switch.defaultProps = {};
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.js","sourceRoot":"","sources":["../../../src/Switch/Switch.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,EAAE,YAAY,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAGlE,OAAO,YAAY,MAAM,UAAU,CAAA;AAUnC,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAA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AAC,iBAAiB,IAEzC,KAAK,CAAC,KAAK,CACM,CACrB,CAAC,CAAC,CAAC,IAAI,KAGT,CAAC,EAWD,EAAE,EAAE;QAXH;IACA,qCAAqC;IACrC,6DAA6D;IAC7D,SAAS;IACT,yCAAyC;IACzC,6DAA6D;IAC7D,KAAK,OAKN,EAJI,UAAU,cAPb,sBAQD,CADc;IAKb,OAAO,oBAAC,aAAa,oBAAK,UAAU,EAAI,CAAA;AAC1C,CAAC,CACY,CAChB,CAAA;AAED,MAAM,CAAC,YAAY,GAAG,EAAE,CAAA;AAExB,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAA;AAE7B,eAAe,MAAM,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toptal/picasso-forms",
3
- "version": "69.0.7",
3
+ "version": "70.0.0",
4
4
  "description": "Picasso form components",
5
5
  "author": "Toptal",
6
6
  "homepage": "https://github.com/toptal/picasso/tree/master/packages/picasso-forms#readme",
@@ -41,7 +41,7 @@
41
41
  "@toptal/picasso-checkbox": "2.0.4",
42
42
  "@toptal/picasso-outlined-input": "1.0.19",
43
43
  "@toptal/picasso-number-input": "1.0.20",
44
- "@toptal/picasso-switch": "1.0.12",
44
+ "@toptal/picasso-switch": "2.0.0",
45
45
  "@toptal/picasso-tagselector": "1.0.23",
46
46
  "@toptal/picasso-timepicker": "1.0.20",
47
47
  "@toptal/picasso-autocomplete": "1.0.21",
@@ -9,9 +9,11 @@ import type { Props as FieldLabelProps } from '../FieldLabel'
9
9
 
10
10
  export type FormSwitchProps = Omit<SwitchProps, 'onChange'> & {
11
11
  onChange?: SwitchProps['onChange']
12
+ value?: string
12
13
  }
14
+
13
15
  export type Props = FormSwitchProps &
14
- FieldProps<SwitchProps['value']> &
16
+ FieldProps<FormSwitchProps['value']> &
15
17
  Omit<FieldLabelProps, 'name' | 'required'>
16
18
 
17
19
  export const Switch = (props: Props) => (
@@ -34,8 +36,14 @@ export const Switch = (props: Props) => (
34
36
  // omitting highlight from inputProps
35
37
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
36
38
  highlight,
39
+ // value is not expected in PicassoSwitch
40
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
41
+ value,
37
42
  ...inputProps
38
- }: SwitchProps & { highlight?: 'autofill' }) => {
43
+ }: SwitchProps & {
44
+ highlight?: 'autofill'
45
+ value: FormSwitchProps['value']
46
+ }) => {
39
47
  return <PicassoSwitch {...inputProps} />
40
48
  }}
41
49
  </PicassoField>