@toptal/picasso-forms 49.0.0 → 49.0.1

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,6 +1,7 @@
1
- import { CheckboxProps, CheckboxGroupProps } from '@toptal/picasso';
1
+ import { CheckboxGroupProps } from '@toptal/picasso';
2
2
  import { FieldProps } from '../Field';
3
- export declare type Props = CheckboxGroupProps & FieldProps<CheckboxProps['value']>;
3
+ declare type ValueType = string[] | undefined;
4
+ export declare type Props = CheckboxGroupProps & FieldProps<ValueType>;
4
5
  export declare const CheckboxGroup: {
5
6
  (props: Props): JSX.Element;
6
7
  displayName: string;
@@ -16,9 +16,9 @@ import PicassoField from '../Field';
16
16
  import FieldLabel from '../FieldLabel';
17
17
  import CheckboxGroupContext from './CheckboxGroupContext';
18
18
  export const CheckboxGroup = (props) => {
19
- const { children, titleCase, label } = props, rest = __rest(props, ["children", "titleCase", "label"]);
19
+ const { children, titleCase, label, initialValue } = props, rest = __rest(props, ["children", "titleCase", "label", "initialValue"]);
20
20
  return (React.createElement(CheckboxGroupContext.Provider, { value: props.name },
21
- React.createElement(PicassoField, Object.assign({}, rest, { type: 'checkbox', label: label ? (React.createElement(FieldLabel, { name: props.name, required: props.required, label: label, titleCase: titleCase })) : null }), () => (React.createElement(PicassoCheckbox.Group, Object.assign({}, rest), children)))));
21
+ React.createElement(PicassoField, Object.assign({}, rest, { initialValue: initialValue, type: 'checkbox', label: label ? (React.createElement(FieldLabel, { name: props.name, required: props.required, label: label, titleCase: titleCase })) : null }), () => (React.createElement(PicassoCheckbox.Group, Object.assign({}, rest), children)))));
22
22
  };
23
23
  CheckboxGroup.displayName = 'CheckboxGroup';
24
24
  export default CheckboxGroup;
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxGroup.js","sourceRoot":"","sources":["../../src/CheckboxGroup/CheckboxGroup.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,iDAAiD;AACjD,OAAO,KAAK,MAAM,O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AM,wBAAwB,CAAA;AAKzD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAY,EAAE,EAAE;IAC5C,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAA7D,kDAAqD,CAAQ,CAAA;IAEnE,OAAO,CACL,oBAAC,oBAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,CAAC,IAAI;QAC9C,oBAAC,YAAY,oBACP,IAAI,IACR,YAAY,EAAE,YAAY,EAC1B,IAAI,EAAC,UAAU,EACf,KAAK,EACH,KAAK,CAAC,CAAC,CAAC,CACN,oBAAC,UAAU,IACT,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,GACpB,CACH,CAAC,CAAC,CAAC,IAAI,KAGT,GAAG,EAAE,CAAC,CACL,oBAAC,eAAe,CAAC,KAAK,oBAAK,IAAI,GAAG,QAAQ,CAAyB,CACpE,CACY,CACe,CACjC,CAAA;AACH,CAAC,CAAA;AAED,aAAa,CAAC,WAAW,GAAG,eAAe,CAAA;AAE3C,eAAe,aAAa,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toptal/picasso-forms",
3
- "version": "49.0.0",
3
+ "version": "49.0.1",
4
4
  "description": "Picasso form components",
5
5
  "author": "Toptal",
6
6
  "homepage": "https://github.com/toptal/picasso/tree/master/packages/picasso-forms#readme",