@toptal/picasso-forms 6.0.5 → 7.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.
- package/{dist-package/Autocomplete → Autocomplete}/Autocomplete.d.ts +0 -0
- package/{dist-package/Autocomplete → Autocomplete}/Autocomplete.js +0 -0
- package/{dist-package/Autocomplete → Autocomplete}/Autocomplete.js.map +0 -0
- package/{dist-package/Autocomplete → Autocomplete}/index.d.ts +0 -0
- package/{dist-package/Autocomplete → Autocomplete}/index.js +0 -0
- package/{dist-package/Autocomplete → Autocomplete}/index.js.map +0 -0
- package/{dist-package/ButtonCheckbox → ButtonCheckbox}/ButtonCheckbox.d.ts +0 -0
- package/{dist-package/ButtonCheckbox → ButtonCheckbox}/ButtonCheckbox.js +0 -0
- package/{dist-package/ButtonCheckbox → ButtonCheckbox}/ButtonCheckbox.js.map +0 -0
- package/{dist-package/ButtonCheckbox → ButtonCheckbox}/index.d.ts +0 -0
- package/{dist-package/ButtonCheckbox → ButtonCheckbox}/index.js +0 -0
- package/{dist-package/ButtonCheckbox → ButtonCheckbox}/index.js.map +0 -0
- package/{dist-package/ButtonRadio → ButtonRadio}/ButtonRadio.d.ts +0 -0
- package/{dist-package/ButtonRadio → ButtonRadio}/ButtonRadio.js +0 -0
- package/{dist-package/ButtonRadio → ButtonRadio}/ButtonRadio.js.map +0 -0
- package/{dist-package/ButtonRadio → ButtonRadio}/index.d.ts +0 -0
- package/{dist-package/ButtonRadio → ButtonRadio}/index.js +0 -0
- package/{dist-package/ButtonRadio → ButtonRadio}/index.js.map +0 -0
- package/{dist-package/Checkbox → Checkbox}/Checkbox.d.ts +0 -0
- package/{dist-package/Checkbox → Checkbox}/Checkbox.js +0 -0
- package/{dist-package/Checkbox → Checkbox}/Checkbox.js.map +0 -0
- package/{dist-package/Checkbox → Checkbox}/index.d.ts +0 -0
- package/{dist-package/Checkbox → Checkbox}/index.js +0 -0
- package/{dist-package/Checkbox → Checkbox}/index.js.map +0 -0
- package/{dist-package/CheckboxGroup → CheckboxGroup}/CheckboxGroup.d.ts +0 -0
- package/{dist-package/CheckboxGroup → CheckboxGroup}/CheckboxGroup.js +0 -0
- package/{dist-package/CheckboxGroup → CheckboxGroup}/CheckboxGroup.js.map +0 -0
- package/{dist-package/CheckboxGroup → CheckboxGroup}/CheckboxGroupContext.d.ts +0 -0
- package/{dist-package/CheckboxGroup → CheckboxGroup}/CheckboxGroupContext.js +0 -0
- package/{dist-package/CheckboxGroup → CheckboxGroup}/CheckboxGroupContext.js.map +0 -0
- package/{dist-package/CheckboxGroup → CheckboxGroup}/index.d.ts +0 -0
- package/{dist-package/CheckboxGroup → CheckboxGroup}/index.js +0 -0
- package/{dist-package/CheckboxGroup → CheckboxGroup}/index.js.map +0 -0
- package/{dist-package/DatePicker → DatePicker}/DatePicker.d.ts +0 -0
- package/{dist-package/DatePicker → DatePicker}/DatePicker.js +0 -0
- package/{dist-package/DatePicker → DatePicker}/DatePicker.js.map +0 -0
- package/{dist-package/DatePicker → DatePicker}/index.d.ts +0 -0
- package/{dist-package/DatePicker → DatePicker}/index.js +0 -0
- package/{dist-package/DatePicker → DatePicker}/index.js.map +0 -0
- package/{dist-package/FieldWrapper → FieldWrapper}/FieldWrapper.d.ts +0 -0
- package/{dist-package/FieldWrapper → FieldWrapper}/FieldWrapper.js +0 -0
- package/{dist-package/FieldWrapper → FieldWrapper}/FieldWrapper.js.map +0 -0
- package/{dist-package/FieldWrapper → FieldWrapper}/index.d.ts +0 -0
- package/{dist-package/FieldWrapper → FieldWrapper}/index.js +0 -0
- package/{dist-package/FieldWrapper → FieldWrapper}/index.js.map +0 -0
- package/{dist-package/FileInput → FileInput}/FileInput.d.ts +0 -0
- package/{dist-package/FileInput → FileInput}/FileInput.js +0 -0
- package/{dist-package/FileInput → FileInput}/FileInput.js.map +0 -0
- package/{dist-package/FileInput → FileInput}/index.d.ts +0 -0
- package/{dist-package/FileInput → FileInput}/index.js +0 -0
- package/{dist-package/FileInput → FileInput}/index.js.map +0 -0
- package/{dist-package/Form → Form}/Form.d.ts +0 -0
- package/{dist-package/Form → Form}/Form.js +0 -0
- package/{dist-package/Form → Form}/Form.js.map +0 -0
- package/{dist-package/Form → Form}/FormContext.d.ts +0 -0
- package/{dist-package/Form → Form}/FormContext.js +0 -0
- package/{dist-package/Form → Form}/FormContext.js.map +0 -0
- package/{dist-package/Form → Form}/index.d.ts +0 -0
- package/{dist-package/Form → Form}/index.js +0 -0
- package/{dist-package/Form → Form}/index.js.map +0 -0
- package/{dist-package/FormConfig → FormConfig}/FormConfig.d.ts +0 -0
- package/{dist-package/FormConfig → FormConfig}/FormConfig.js +0 -0
- package/{dist-package/FormConfig → FormConfig}/FormConfig.js.map +0 -0
- package/{dist-package/FormConfig → FormConfig}/index.d.ts +0 -0
- package/{dist-package/FormConfig → FormConfig}/index.js +0 -0
- package/{dist-package/FormConfig → FormConfig}/index.js.map +0 -0
- package/{dist-package/Input → Input}/Input.d.ts +0 -0
- package/Input/Input.js +25 -0
- package/Input/Input.js.map +1 -0
- package/{dist-package/Input → Input}/index.d.ts +0 -0
- package/{dist-package/Input → Input}/index.js +0 -0
- package/{dist-package/Input → Input}/index.js.map +0 -0
- package/{dist-package/NumberInput → NumberInput}/NumberInput.d.ts +0 -0
- package/{dist-package/NumberInput → NumberInput}/NumberInput.js +0 -0
- package/{dist-package/NumberInput → NumberInput}/NumberInput.js.map +0 -0
- package/{dist-package/NumberInput → NumberInput}/index.d.ts +0 -0
- package/{dist-package/NumberInput → NumberInput}/index.js +0 -0
- package/{dist-package/NumberInput → NumberInput}/index.js.map +0 -0
- package/{dist-package/Radio → Radio}/Radio.d.ts +0 -0
- package/{dist-package/Radio → Radio}/Radio.js +0 -0
- package/{dist-package/Radio → Radio}/Radio.js.map +0 -0
- package/{dist-package/Radio → Radio}/index.d.ts +0 -0
- package/{dist-package/Radio → Radio}/index.js +0 -0
- package/{dist-package/Radio → Radio}/index.js.map +0 -0
- package/{dist-package/RadioGroup → RadioGroup}/RadioGroup.d.ts +0 -0
- package/{dist-package/RadioGroup → RadioGroup}/RadioGroup.js +0 -0
- package/{dist-package/RadioGroup → RadioGroup}/RadioGroup.js.map +0 -0
- package/{dist-package/RadioGroup → RadioGroup}/RadioGroupContext.d.ts +0 -0
- package/{dist-package/RadioGroup → RadioGroup}/RadioGroupContext.js +0 -0
- package/{dist-package/RadioGroup → RadioGroup}/RadioGroupContext.js.map +0 -0
- package/{dist-package/RadioGroup → RadioGroup}/index.d.ts +0 -0
- package/{dist-package/RadioGroup → RadioGroup}/index.js +0 -0
- package/{dist-package/RadioGroup → RadioGroup}/index.js.map +0 -0
- package/{dist-package/Rating → Rating}/Rating.d.ts +0 -0
- package/{dist-package/Rating → Rating}/Rating.js +0 -0
- package/{dist-package/Rating → Rating}/Rating.js.map +0 -0
- package/{dist-package/Rating → Rating}/index.d.ts +0 -0
- package/{dist-package/Rating → Rating}/index.js +0 -0
- package/{dist-package/Rating → Rating}/index.js.map +0 -0
- package/{dist-package/Select → Select}/Select.d.ts +0 -0
- package/{dist-package/Select → Select}/Select.js +0 -0
- package/{dist-package/Select → Select}/Select.js.map +0 -0
- package/{dist-package/Select → Select}/index.d.ts +0 -0
- package/{dist-package/Select → Select}/index.js +0 -0
- package/{dist-package/Select → Select}/index.js.map +0 -0
- package/{dist-package/SubmitButton → SubmitButton}/SubmitButton.d.ts +0 -0
- package/{dist-package/SubmitButton → SubmitButton}/SubmitButton.js +0 -0
- package/{dist-package/SubmitButton → SubmitButton}/SubmitButton.js.map +0 -0
- package/{dist-package/SubmitButton → SubmitButton}/index.d.ts +0 -0
- package/{dist-package/SubmitButton → SubmitButton}/index.js +0 -0
- package/{dist-package/SubmitButton → SubmitButton}/index.js.map +0 -0
- package/{dist-package/Switch → Switch}/Switch.d.ts +0 -0
- package/{dist-package/Switch → Switch}/Switch.js +0 -0
- package/{dist-package/Switch → Switch}/Switch.js.map +0 -0
- package/{dist-package/Switch → Switch}/index.d.ts +0 -0
- package/{dist-package/Switch → Switch}/index.js +0 -0
- package/{dist-package/Switch → Switch}/index.js.map +0 -0
- package/{dist-package/TagSelector → TagSelector}/TagSelector.d.ts +0 -0
- package/{dist-package/TagSelector → TagSelector}/TagSelector.js +0 -0
- package/{dist-package/TagSelector → TagSelector}/TagSelector.js.map +0 -0
- package/{dist-package/TagSelector → TagSelector}/index.d.ts +0 -0
- package/{dist-package/TagSelector → TagSelector}/index.js +0 -0
- package/{dist-package/TagSelector → TagSelector}/index.js.map +0 -0
- package/{dist-package/TimePicker → TimePicker}/TimePicker.d.ts +0 -0
- package/{dist-package/TimePicker → TimePicker}/TimePicker.js +0 -0
- package/{dist-package/TimePicker → TimePicker}/TimePicker.js.map +0 -0
- package/{dist-package/TimePicker → TimePicker}/index.d.ts +0 -0
- package/{dist-package/TimePicker → TimePicker}/index.js +0 -0
- package/{dist-package/TimePicker → TimePicker}/index.js.map +0 -0
- package/{dist-package/index.d.ts → index.d.ts} +0 -0
- package/{dist-package/index.js → index.js} +0 -0
- package/{dist-package/index.js.map → index.js.map} +0 -0
- package/package.json +6 -6
- package/{dist-package/utils → utils}/flat-map.d.ts +0 -0
- package/{dist-package/utils → utils}/flat-map.js +0 -0
- package/{dist-package/utils → utils}/flat-map.js.map +0 -0
- package/{dist-package/utils → utils}/index.d.ts +0 -0
- package/{dist-package/utils → utils}/index.js +0 -0
- package/{dist-package/utils → utils}/index.js.map +0 -0
- package/{dist-package/utils → utils}/scroll-to-error-decorator.d.ts +0 -0
- package/{dist-package/utils → utils}/scroll-to-error-decorator.js +0 -0
- package/{dist-package/utils → utils}/scroll-to-error-decorator.js.map +0 -0
- package/{dist-package/utils → utils}/validators.d.ts +0 -0
- package/{dist-package/utils → utils}/validators.js +0 -0
- package/{dist-package/utils → utils}/validators.js.map +0 -0
- package/CHANGELOG.md +0 -657
- package/dist-package/Input/Input.js +0 -26
- package/dist-package/Input/Input.js.map +0 -1
- package/dist-package/Input/utils/get-input-name.d.ts +0 -2
- package/dist-package/Input/utils/get-input-name.js +0 -9
- package/dist-package/Input/utils/get-input-name.js.map +0 -1
- package/dist-package/Input/utils/get-input-name.test.d.ts +0 -1
- package/dist-package/Input/utils/get-input-name.test.js +0 -12
- package/dist-package/Input/utils/get-input-name.test.js.map +0 -1
- package/dist-package/README.md +0 -29
- package/dist-package/package.json +0 -44
- package/src/Autocomplete/Autocomplete.tsx +0 -21
- package/src/Autocomplete/index.ts +0 -1
- package/src/ButtonCheckbox/ButtonCheckbox.tsx +0 -57
- package/src/ButtonCheckbox/index.ts +0 -1
- package/src/ButtonRadio/ButtonRadio.tsx +0 -24
- package/src/ButtonRadio/index.ts +0 -1
- package/src/Checkbox/Checkbox.tsx +0 -73
- package/src/Checkbox/__snapshots__/test.tsx.snap +0 -254
- package/src/Checkbox/index.ts +0 -1
- package/src/Checkbox/test.tsx +0 -91
- package/src/CheckboxGroup/CheckboxGroup.tsx +0 -30
- package/src/CheckboxGroup/CheckboxGroupContext.ts +0 -3
- package/src/CheckboxGroup/index.ts +0 -3
- package/src/CheckboxGroup/test.tsx +0 -35
- package/src/DatePicker/DatePicker.tsx +0 -26
- package/src/DatePicker/index.ts +0 -1
- package/src/FieldWrapper/FieldWrapper.tsx +0 -287
- package/src/FieldWrapper/index.ts +0 -2
- package/src/FieldWrapper/story/index.jsx +0 -137
- package/src/FileInput/FileInput.tsx +0 -66
- package/src/FileInput/index.ts +0 -1
- package/src/Form/Form.tsx +0 -181
- package/src/Form/FormContext.ts +0 -38
- package/src/Form/__image_snapshots__/form-default-snap.png +0 -0
- package/src/Form/__image_snapshots__/form-form-level-configurations-snap.png +0 -0
- package/src/Form/__snapshots__/test.tsx.snap +0 -61
- package/src/Form/index.ts +0 -1
- package/src/Form/story/BackendCommunication.example.tsx +0 -139
- package/src/Form/story/CustomFormLevelConfiguration.example.tsx +0 -26
- package/src/Form/story/CustomValidator.example.tsx +0 -45
- package/src/Form/story/Default.example.tsx +0 -177
- package/src/Form/story/FileInput.example.tsx +0 -42
- package/src/Form/story/ParseInput.example.tsx +0 -28
- package/src/Form/story/TitleCase.example.tsx +0 -167
- package/src/Form/story/ValidateOnSubmit.example.tsx +0 -85
- package/src/Form/story/index.jsx +0 -203
- package/src/Form/test.tsx +0 -27
- package/src/FormConfig/FormConfig.ts +0 -12
- package/src/FormConfig/index.ts +0 -1
- package/src/FormConfig/test.tsx +0 -44
- package/src/Input/Input.tsx +0 -27
- package/src/Input/index.ts +0 -1
- package/src/Input/test.tsx +0 -34
- package/src/Input/utils/get-input-name.test.ts +0 -16
- package/src/Input/utils/get-input-name.ts +0 -11
- package/src/NumberInput/NumberInput.tsx +0 -45
- package/src/NumberInput/index.ts +0 -1
- package/src/Radio/Radio.tsx +0 -24
- package/src/Radio/__snapshots__/test.tsx.snap +0 -231
- package/src/Radio/index.ts +0 -1
- package/src/Radio/test.tsx +0 -49
- package/src/RadioGroup/RadioGroup.tsx +0 -39
- package/src/RadioGroup/RadioGroupContext.ts +0 -3
- package/src/RadioGroup/index.ts +0 -3
- package/src/RadioGroup/test.tsx +0 -35
- package/src/Rating/Rating.tsx +0 -22
- package/src/Rating/index.ts +0 -1
- package/src/Select/Select.tsx +0 -47
- package/src/Select/index.ts +0 -1
- package/src/SubmitButton/SubmitButton.tsx +0 -70
- package/src/SubmitButton/__image_snapshots__/submitbutton-button-types-snap.png +0 -0
- package/src/SubmitButton/__image_snapshots__/submitbutton-default-snap.png +0 -0
- package/src/SubmitButton/index.ts +0 -6
- package/src/SubmitButton/story/ButtonTypes.example.tsx +0 -46
- package/src/SubmitButton/story/Default.example.tsx +0 -15
- package/src/SubmitButton/story/index.jsx +0 -32
- package/src/Switch/Switch.tsx +0 -23
- package/src/Switch/index.ts +0 -1
- package/src/TagSelector/TagSelector.tsx +0 -25
- package/src/TagSelector/index.ts +0 -1
- package/src/TimePicker/TimePicker.tsx +0 -24
- package/src/TimePicker/index.ts +0 -1
- package/src/index.ts +0 -16
- package/src/story/Deserialization.example.tsx +0 -34
- package/src/story/FormSpy.example.tsx +0 -42
- package/src/story/index.jsx +0 -37
- package/src/utils/flat-map.ts +0 -4
- package/src/utils/index.ts +0 -3
- package/src/utils/scroll-to-error-decorator.ts +0 -78
- package/src/utils/validators.ts +0 -18
- package/tsconfig.build.json +0 -7
|
@@ -1,26 +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 from 'react';
|
|
13
|
-
import { Input as PicassoInput } from '@toptal/picasso';
|
|
14
|
-
import FieldWrapper from '../FieldWrapper';
|
|
15
|
-
import getInputName from './utils/get-input-name';
|
|
16
|
-
export const Input = React.forwardRef((props, ref) => (React.createElement(FieldWrapper, Object.assign({}, props), (_a) => {
|
|
17
|
-
var { name } = _a, inputProps = __rest(_a, ["name"]);
|
|
18
|
-
return (
|
|
19
|
-
// TODO: remove getInputName completely when Chrome fixes autocomplete issue
|
|
20
|
-
// Link to the issue: https://bugs.chromium.org/p/chromium/issues/detail?id=1255609
|
|
21
|
-
React.createElement(PicassoInput, Object.assign({ name: getInputName(name) }, inputProps, { ref: ref })));
|
|
22
|
-
})));
|
|
23
|
-
Input.defaultProps = {};
|
|
24
|
-
Input.displayName = 'Input';
|
|
25
|
-
export default Input;
|
|
26
|
-
//# sourceMappingURL=Input.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../src/Input/Input.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,KAAK,IAAI,YAAY,EAAc,MAAM,iBAAiB,CAAA;AAEnE,OAAO,YAA4B,MAAM,iBAAiB,CAAA;AAC1D,OAAO,YAAY,MAAM,wBAAwB,CAAA;AAQjD,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAA0B,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CAC7E,oBAAC,YAAY,oBAAqB,KAAK,GACpC,CAAC,EAAmC,EAAE,EAAE;QAAvC,EAAE,IAAI,OAA6B,EAAxB,UAAU,cAArB,QAAuB,CAAF;IAAmB,OAAA;IACxC,4EAA4E;IAC5E,mFAAmF;IACnF,oBAAC,YAAY,kBAAC,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,IAAM,UAAU,IAAE,GAAG,EAAE,GAAG,IAAI,CACrE,CAAA;CAAA,CACY,CAChB,CAAC,CAAA;AAEF,KAAK,CAAC,YAAY,GAAG,EAAE,CAAA;AAEvB,KAAK,CAAC,WAAW,GAAG,OAAO,CAAA;AAE3B,eAAe,KAAK,CAAA"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const NAMES_NEED_POSTFIX = ['field', 'input', 'title'];
|
|
2
|
-
const getInputName = (name) => {
|
|
3
|
-
if (name && NAMES_NEED_POSTFIX.includes(name)) {
|
|
4
|
-
return `${name}-picasso`;
|
|
5
|
-
}
|
|
6
|
-
return name;
|
|
7
|
-
};
|
|
8
|
-
export default getInputName;
|
|
9
|
-
//# sourceMappingURL=get-input-name.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-input-name.js","sourceRoot":"","sources":["../../../src/Input/utils/get-input-name.ts"],"names":[],"mappings":"AAAA,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;AAEtD,MAAM,YAAY,GAAG,CAAC,IAAa,EAAE,EAAE;IACrC,IAAI,IAAI,IAAI,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;QAC7C,OAAO,GAAG,IAAI,UAAU,CAAA;KACzB;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import getInputName from './get-input-name';
|
|
2
|
-
describe('#getInputName', () => {
|
|
3
|
-
it.each(['title', 'field', 'input'])('adds postfix to "%s"', name => {
|
|
4
|
-
expect(getInputName(name)).toBe(`${name}-picasso`);
|
|
5
|
-
});
|
|
6
|
-
it('returns all other names', () => {
|
|
7
|
-
expect(getInputName('name')).toBe('name');
|
|
8
|
-
expect(getInputName('email')).toBe('email');
|
|
9
|
-
expect(getInputName(undefined)).toBeUndefined();
|
|
10
|
-
});
|
|
11
|
-
});
|
|
12
|
-
//# sourceMappingURL=get-input-name.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-input-name.test.js","sourceRoot":"","sources":["../../../src/Input/utils/get-input-name.test.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,kBAAkB,CAAA;AAE3C,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,EAAE,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAU,CAAC,CAC3C,sBAAsB,EACtB,IAAI,CAAC,EAAE;QACL,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,UAAU,CAAC,CAAA;IACpD,CAAC,CACF,CAAA;IAED,EAAE,CAAC,yBAAyB,EAAE,GAAG,EAAE;QACjC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACzC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC3C,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,EAAE,CAAA;IACjD,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
package/dist-package/README.md
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# @toptal/picasso-forms
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.com/package/@toptal/picasso-forms)
|
|
4
|
-
|
|
5
|
-
This package combines the state-management power of [React Final Form](https://final-form.org/react) with the amazing UX of Picasso. It also provides access to [React Final Form Arrays](https://github.com/final-form/react-final-form-arrays).
|
|
6
|
-
|
|
7
|
-
## Prerequisites
|
|
8
|
-
|
|
9
|
-
The following peer dependencies are required:
|
|
10
|
-
|
|
11
|
-
- `@toptal/picasso`
|
|
12
|
-
- `@toptal/picasso-lab`
|
|
13
|
-
- `@toptal/picasso-shared`
|
|
14
|
-
- `react`
|
|
15
|
-
- `react-dom`
|
|
16
|
-
|
|
17
|
-
## Setup
|
|
18
|
-
|
|
19
|
-
- `yarn add @toptal/picasso-forms`
|
|
20
|
-
|
|
21
|
-
## Limitations
|
|
22
|
-
|
|
23
|
-
Not all final-form features are exposed through this package. If you find a missing one, please [open a Pull Request](../../CONTRIBUTING.md) and add it!
|
|
24
|
-
|
|
25
|
-
For more info on what's available, check [the index](./src/index.ts).
|
|
26
|
-
|
|
27
|
-
## Documentation
|
|
28
|
-
|
|
29
|
-
Documentation and demos are available at [picasso.toptal.net](https://picasso.toptal.net/).
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@toptal/picasso-forms",
|
|
3
|
-
"version": "6.0.5",
|
|
4
|
-
"description": "Picasso form components",
|
|
5
|
-
"author": "Toptal",
|
|
6
|
-
"homepage": "https://github.com/toptal/picasso/tree/master/packages/picasso-forms#readme",
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"main": "index.js",
|
|
9
|
-
"module": "index.js",
|
|
10
|
-
"publishConfig": {
|
|
11
|
-
"access": "public"
|
|
12
|
-
},
|
|
13
|
-
"repository": {
|
|
14
|
-
"type": "git",
|
|
15
|
-
"url": "git+https://github.com/toptal/picasso.git"
|
|
16
|
-
},
|
|
17
|
-
"scripts": {
|
|
18
|
-
"build:package": "cross-env NODE_ENV=production node ../../bin/build.js --tsConfig=./tsconfig.build.json",
|
|
19
|
-
"prepublishOnly": "../../bin/prepublish.js"
|
|
20
|
-
},
|
|
21
|
-
"bugs": {
|
|
22
|
-
"url": "https://github.com/toptal/picasso/issues"
|
|
23
|
-
},
|
|
24
|
-
"peerDependencies": {
|
|
25
|
-
"@toptal/picasso": "^13.4.2",
|
|
26
|
-
"@toptal/picasso-lab": "^9.3.1",
|
|
27
|
-
"@toptal/picasso-shared": "^7",
|
|
28
|
-
"react": "^16.12.0",
|
|
29
|
-
"react-dom": "^16.12.0"
|
|
30
|
-
},
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"classnames": "^2.3.1",
|
|
33
|
-
"final-form": "^4.20.2",
|
|
34
|
-
"final-form-arrays": "^3.0.2",
|
|
35
|
-
"react-final-form": "^6.5.1",
|
|
36
|
-
"react-final-form-arrays": "^3.1.3",
|
|
37
|
-
"react-final-form-listeners": "^1.0.3"
|
|
38
|
-
},
|
|
39
|
-
"devDependencies": {
|
|
40
|
-
"@types/classnames": "^2.3.1",
|
|
41
|
-
"@types/react-final-form-listeners": "^1.0.0",
|
|
42
|
-
"storybook-readme": "^5.0.9"
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import {
|
|
3
|
-
Autocomplete as PicassoAutocomplete,
|
|
4
|
-
AutocompleteProps
|
|
5
|
-
} from '@toptal/picasso'
|
|
6
|
-
|
|
7
|
-
import FieldWrapper, { FieldProps } from '../FieldWrapper'
|
|
8
|
-
|
|
9
|
-
export type Props = AutocompleteProps & FieldProps<AutocompleteProps['value']>
|
|
10
|
-
|
|
11
|
-
export const Autocomplete = (props: Props) => (
|
|
12
|
-
<FieldWrapper<AutocompleteProps> {...props}>
|
|
13
|
-
{(inputProps: AutocompleteProps) => {
|
|
14
|
-
return <PicassoAutocomplete {...inputProps} />
|
|
15
|
-
}}
|
|
16
|
-
</FieldWrapper>
|
|
17
|
-
)
|
|
18
|
-
|
|
19
|
-
Autocomplete.displayName = 'Autocomplete'
|
|
20
|
-
|
|
21
|
-
export default Autocomplete
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './Autocomplete'
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import React, { useContext } from 'react'
|
|
2
|
-
import { Button, ButtonCheckboxProps } from '@toptal/picasso'
|
|
3
|
-
import {
|
|
4
|
-
Field,
|
|
5
|
-
FieldRenderProps as FinalFormFieldProps
|
|
6
|
-
} from 'react-final-form'
|
|
7
|
-
|
|
8
|
-
import FieldWrapper, { FieldProps } from '../FieldWrapper'
|
|
9
|
-
import { CheckboxGroupContext } from '../CheckboxGroup'
|
|
10
|
-
|
|
11
|
-
type CheckboxValue =
|
|
12
|
-
| ButtonCheckboxProps['value']
|
|
13
|
-
| ButtonCheckboxProps['checked']
|
|
14
|
-
|
|
15
|
-
type CheckboxFormProps = Omit<ButtonCheckboxProps, 'requiredDecoration'> & {
|
|
16
|
-
required?: boolean
|
|
17
|
-
}
|
|
18
|
-
type CheckboxWithoutGroup = CheckboxFormProps & FieldProps<CheckboxValue>
|
|
19
|
-
type CheckboxInGroup = CheckboxFormProps & { name?: string }
|
|
20
|
-
|
|
21
|
-
export type Props = CheckboxWithoutGroup | CheckboxInGroup
|
|
22
|
-
|
|
23
|
-
const ButtonCheckbox = ({ name, value, required, ...restProps }: Props) => {
|
|
24
|
-
const groupName = useContext(CheckboxGroupContext)
|
|
25
|
-
const isCheckboxInGroup = Boolean(groupName)
|
|
26
|
-
|
|
27
|
-
if (isCheckboxInGroup) {
|
|
28
|
-
return (
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
30
|
-
<Field type='checkbox' name={name || groupName!} value={value}>
|
|
31
|
-
{({
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
33
|
-
input: { value: inputValue, type, ...restInput }
|
|
34
|
-
}: FinalFormFieldProps<CheckboxValue>) => {
|
|
35
|
-
return <Button.Checkbox {...restProps} {...restInput} />
|
|
36
|
-
}}
|
|
37
|
-
</Field>
|
|
38
|
-
)
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<FieldWrapper
|
|
43
|
-
type='checkbox'
|
|
44
|
-
hideFieldLabel
|
|
45
|
-
required={required}
|
|
46
|
-
{...restProps}
|
|
47
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
48
|
-
name={name!}
|
|
49
|
-
>
|
|
50
|
-
{(input: ButtonCheckboxProps) => <Button.Checkbox {...input} />}
|
|
51
|
-
</FieldWrapper>
|
|
52
|
-
)
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
ButtonCheckbox.displayName = 'ButtonCheckbox'
|
|
56
|
-
|
|
57
|
-
export default ButtonCheckbox
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './ButtonCheckbox'
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React, { useContext } from 'react'
|
|
2
|
-
import { Button, ButtonRadioProps } from '@toptal/picasso'
|
|
3
|
-
import { Field } from 'react-final-form'
|
|
4
|
-
|
|
5
|
-
import { RadioGroupContext } from '../RadioGroup'
|
|
6
|
-
|
|
7
|
-
export type Props = ButtonRadioProps & {
|
|
8
|
-
name?: string
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const ButtonRadio = ({ name, ...rest }: Props) => {
|
|
12
|
-
const groupName = useContext(RadioGroupContext)
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
16
|
-
<Field name={name || groupName!} type='radio' value={rest.value}>
|
|
17
|
-
{({ input }) => <Button.Radio checked={input.checked} {...rest} />}
|
|
18
|
-
</Field>
|
|
19
|
-
)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
ButtonRadio.displayName = 'ButtonRadio'
|
|
23
|
-
|
|
24
|
-
export default ButtonRadio
|
package/src/ButtonRadio/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './ButtonRadio'
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import React, { useContext } from 'react'
|
|
2
|
-
import { Checkbox as PicassoCheckbox, CheckboxProps } from '@toptal/picasso'
|
|
3
|
-
import {
|
|
4
|
-
Field,
|
|
5
|
-
FieldRenderProps as FinalFormFieldProps
|
|
6
|
-
} from 'react-final-form'
|
|
7
|
-
|
|
8
|
-
import FieldWrapper, { FieldProps } from '../FieldWrapper'
|
|
9
|
-
import { CheckboxGroupContext } from '../CheckboxGroup'
|
|
10
|
-
import { useFormConfig } from '../FormConfig'
|
|
11
|
-
|
|
12
|
-
type CheckboxValue = CheckboxProps['value'] | CheckboxProps['checked']
|
|
13
|
-
|
|
14
|
-
type CheckboxFormProps = Omit<CheckboxProps, 'requiredDecoration'> & {
|
|
15
|
-
required?: boolean
|
|
16
|
-
}
|
|
17
|
-
type CheckboxWithoutGroup = CheckboxFormProps & FieldProps<CheckboxValue>
|
|
18
|
-
type CheckboxInGroup = CheckboxFormProps & { name?: string }
|
|
19
|
-
|
|
20
|
-
export type Props = CheckboxWithoutGroup | CheckboxInGroup
|
|
21
|
-
|
|
22
|
-
export const Checkbox = ({
|
|
23
|
-
name,
|
|
24
|
-
value,
|
|
25
|
-
required,
|
|
26
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
27
|
-
defaultValue,
|
|
28
|
-
...restProps
|
|
29
|
-
}: Props) => {
|
|
30
|
-
const formConfig = useFormConfig()
|
|
31
|
-
const groupName = useContext(CheckboxGroupContext)
|
|
32
|
-
const isCheckboxInGroup = Boolean(groupName)
|
|
33
|
-
|
|
34
|
-
if (isCheckboxInGroup) {
|
|
35
|
-
return (
|
|
36
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
37
|
-
<Field type='checkbox' name={name || groupName!} value={value}>
|
|
38
|
-
{({
|
|
39
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
40
|
-
input: { value: inputValue, type, ...restInput }
|
|
41
|
-
}: FinalFormFieldProps<CheckboxValue>) => {
|
|
42
|
-
return <PicassoCheckbox {...restProps} {...restInput} />
|
|
43
|
-
}}
|
|
44
|
-
</Field>
|
|
45
|
-
)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const showAsterisk = required && formConfig.requiredVariant === 'asterisk'
|
|
49
|
-
const requiredDecoration = showAsterisk ? 'asterisk' : undefined
|
|
50
|
-
|
|
51
|
-
return (
|
|
52
|
-
<FieldWrapper
|
|
53
|
-
type='checkbox'
|
|
54
|
-
hideFieldLabel
|
|
55
|
-
required={required}
|
|
56
|
-
{...restProps}
|
|
57
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
58
|
-
name={name!}
|
|
59
|
-
>
|
|
60
|
-
{(input: CheckboxProps) => (
|
|
61
|
-
<PicassoCheckbox
|
|
62
|
-
{...input}
|
|
63
|
-
titleCase={restProps.titleCase}
|
|
64
|
-
requiredDecoration={requiredDecoration}
|
|
65
|
-
/>
|
|
66
|
-
)}
|
|
67
|
-
</FieldWrapper>
|
|
68
|
-
)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
Checkbox.displayName = 'Checkbox'
|
|
72
|
-
|
|
73
|
-
export default Checkbox
|
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`Form.Checkbox default render for checkboxes in a group 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<div
|
|
6
|
-
class="Picasso-root"
|
|
7
|
-
>
|
|
8
|
-
<div
|
|
9
|
-
class=""
|
|
10
|
-
>
|
|
11
|
-
<form>
|
|
12
|
-
<div
|
|
13
|
-
class="PicassoFormField-root"
|
|
14
|
-
data-field-has-error="false"
|
|
15
|
-
>
|
|
16
|
-
<label
|
|
17
|
-
class="PicassoFormLabel-root"
|
|
18
|
-
for="checkbox-group"
|
|
19
|
-
>
|
|
20
|
-
<span
|
|
21
|
-
class="PicassoFormLabel-text"
|
|
22
|
-
>
|
|
23
|
-
checkbox-group-label
|
|
24
|
-
(optional)
|
|
25
|
-
</span>
|
|
26
|
-
</label>
|
|
27
|
-
<div
|
|
28
|
-
class="MuiFormGroup-root PicassoCheckboxGroup-root PicassoCheckboxGroup-root"
|
|
29
|
-
label="checkbox-group-label"
|
|
30
|
-
name="checkbox-group"
|
|
31
|
-
>
|
|
32
|
-
<div
|
|
33
|
-
class="MuiGrid-root PicassoCheckboxGroup-grid MuiGrid-container PicassoGrid-container MuiGrid-direction-xs MuiGrid-align-items-xs-flex"
|
|
34
|
-
>
|
|
35
|
-
<div
|
|
36
|
-
class="MuiGrid-root PicassoCheckboxGroup-gridItem MuiGrid-item"
|
|
37
|
-
>
|
|
38
|
-
<label
|
|
39
|
-
class="PicassoFormControlLabel-root PicassoCheckbox-root picasso-checkbox"
|
|
40
|
-
>
|
|
41
|
-
<span
|
|
42
|
-
class="PicassoContainer-flex PicassoContainer-inline PicassoCheckbox-checkboxWrapper"
|
|
43
|
-
>
|
|
44
|
-
<span
|
|
45
|
-
aria-disabled="false"
|
|
46
|
-
class="MuiButtonBase-root MuiIconButton-root PrivateSwitchBase-root MuiCheckbox-root PicassoCheckbox-root MuiCheckbox-colorSecondary PicassoCheckbox-withLabel MuiIconButton-colorSecondary"
|
|
47
|
-
>
|
|
48
|
-
<span
|
|
49
|
-
class="MuiIconButton-label"
|
|
50
|
-
>
|
|
51
|
-
<input
|
|
52
|
-
class="PrivateSwitchBase-input"
|
|
53
|
-
data-indeterminate="false"
|
|
54
|
-
name="checkbox-group"
|
|
55
|
-
type="checkbox"
|
|
56
|
-
value=""
|
|
57
|
-
/>
|
|
58
|
-
<div
|
|
59
|
-
class="PicassoCheckbox-uncheckedIcon"
|
|
60
|
-
/>
|
|
61
|
-
</span>
|
|
62
|
-
</span>
|
|
63
|
-
</span>
|
|
64
|
-
<span
|
|
65
|
-
class="PicassoFormLabel-root PicassoFormLabel-inline PicassoFormControlLabel-label PicassoCheckbox-label"
|
|
66
|
-
>
|
|
67
|
-
<span
|
|
68
|
-
class="PicassoFormLabel-text"
|
|
69
|
-
>
|
|
70
|
-
checkbox-label-0
|
|
71
|
-
</span>
|
|
72
|
-
</span>
|
|
73
|
-
</label>
|
|
74
|
-
</div>
|
|
75
|
-
<div
|
|
76
|
-
class="MuiGrid-root PicassoCheckboxGroup-gridItem MuiGrid-item"
|
|
77
|
-
>
|
|
78
|
-
<label
|
|
79
|
-
class="PicassoFormControlLabel-root PicassoCheckbox-root picasso-checkbox"
|
|
80
|
-
>
|
|
81
|
-
<span
|
|
82
|
-
class="PicassoContainer-flex PicassoContainer-inline PicassoCheckbox-checkboxWrapper"
|
|
83
|
-
>
|
|
84
|
-
<span
|
|
85
|
-
aria-disabled="false"
|
|
86
|
-
class="MuiButtonBase-root MuiIconButton-root PrivateSwitchBase-root MuiCheckbox-root PicassoCheckbox-root MuiCheckbox-colorSecondary PicassoCheckbox-withLabel MuiIconButton-colorSecondary"
|
|
87
|
-
>
|
|
88
|
-
<span
|
|
89
|
-
class="MuiIconButton-label"
|
|
90
|
-
>
|
|
91
|
-
<input
|
|
92
|
-
class="PrivateSwitchBase-input"
|
|
93
|
-
data-indeterminate="false"
|
|
94
|
-
name="checkbox-group"
|
|
95
|
-
type="checkbox"
|
|
96
|
-
value=""
|
|
97
|
-
/>
|
|
98
|
-
<div
|
|
99
|
-
class="PicassoCheckbox-uncheckedIcon"
|
|
100
|
-
/>
|
|
101
|
-
</span>
|
|
102
|
-
</span>
|
|
103
|
-
</span>
|
|
104
|
-
<span
|
|
105
|
-
class="PicassoFormLabel-root PicassoFormLabel-inline PicassoFormControlLabel-label PicassoCheckbox-label"
|
|
106
|
-
>
|
|
107
|
-
<span
|
|
108
|
-
class="PicassoFormLabel-text"
|
|
109
|
-
>
|
|
110
|
-
checkbox-label-1
|
|
111
|
-
</span>
|
|
112
|
-
</span>
|
|
113
|
-
</label>
|
|
114
|
-
</div>
|
|
115
|
-
</div>
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
</form>
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
</div>
|
|
122
|
-
`;
|
|
123
|
-
|
|
124
|
-
exports[`Form.Checkbox default render for single checkbox 1`] = `
|
|
125
|
-
<div>
|
|
126
|
-
<div
|
|
127
|
-
class="Picasso-root"
|
|
128
|
-
>
|
|
129
|
-
<div
|
|
130
|
-
class=""
|
|
131
|
-
>
|
|
132
|
-
<form>
|
|
133
|
-
<div
|
|
134
|
-
class="PicassoFormField-root"
|
|
135
|
-
data-field-has-error="false"
|
|
136
|
-
data-testid="single-checkbox"
|
|
137
|
-
>
|
|
138
|
-
<label
|
|
139
|
-
class="PicassoFormControlLabel-root PicassoCheckbox-root picasso-checkbox"
|
|
140
|
-
>
|
|
141
|
-
<span
|
|
142
|
-
class="PicassoContainer-flex PicassoContainer-inline PicassoCheckbox-checkboxWrapper"
|
|
143
|
-
>
|
|
144
|
-
<span
|
|
145
|
-
aria-disabled="false"
|
|
146
|
-
class="MuiButtonBase-root MuiIconButton-root PrivateSwitchBase-root MuiCheckbox-root PicassoCheckbox-root MuiCheckbox-colorSecondary PicassoCheckbox-withLabel MuiIconButton-colorSecondary"
|
|
147
|
-
>
|
|
148
|
-
<span
|
|
149
|
-
class="MuiIconButton-label"
|
|
150
|
-
>
|
|
151
|
-
<input
|
|
152
|
-
class="PrivateSwitchBase-input"
|
|
153
|
-
data-indeterminate="false"
|
|
154
|
-
id="single-checkbox"
|
|
155
|
-
name="single-checkbox"
|
|
156
|
-
type="checkbox"
|
|
157
|
-
value=""
|
|
158
|
-
/>
|
|
159
|
-
<div
|
|
160
|
-
class="PicassoCheckbox-uncheckedIcon"
|
|
161
|
-
/>
|
|
162
|
-
</span>
|
|
163
|
-
</span>
|
|
164
|
-
</span>
|
|
165
|
-
<span
|
|
166
|
-
class="PicassoFormLabel-root PicassoFormLabel-inline PicassoFormControlLabel-label PicassoCheckbox-label"
|
|
167
|
-
>
|
|
168
|
-
<span
|
|
169
|
-
class="PicassoFormLabel-text"
|
|
170
|
-
>
|
|
171
|
-
The checkbox label
|
|
172
|
-
</span>
|
|
173
|
-
</span>
|
|
174
|
-
</label>
|
|
175
|
-
</div>
|
|
176
|
-
</form>
|
|
177
|
-
</div>
|
|
178
|
-
</div>
|
|
179
|
-
</div>
|
|
180
|
-
`;
|
|
181
|
-
|
|
182
|
-
exports[`Form.Checkbox required with asterisk single checkbox 1`] = `
|
|
183
|
-
<div>
|
|
184
|
-
<div
|
|
185
|
-
class="Picasso-root"
|
|
186
|
-
>
|
|
187
|
-
<div
|
|
188
|
-
class=""
|
|
189
|
-
>
|
|
190
|
-
<form>
|
|
191
|
-
<div
|
|
192
|
-
class="PicassoFormField-root"
|
|
193
|
-
data-field-has-error="false"
|
|
194
|
-
data-testid="single-checkbox"
|
|
195
|
-
>
|
|
196
|
-
<label
|
|
197
|
-
class="PicassoFormControlLabel-root PicassoCheckbox-root picasso-checkbox"
|
|
198
|
-
>
|
|
199
|
-
<span
|
|
200
|
-
class="PicassoContainer-flex PicassoContainer-inline PicassoCheckbox-checkboxWrapper"
|
|
201
|
-
>
|
|
202
|
-
<span
|
|
203
|
-
aria-disabled="false"
|
|
204
|
-
class="MuiButtonBase-root MuiIconButton-root PrivateSwitchBase-root MuiCheckbox-root PicassoCheckbox-root MuiCheckbox-colorSecondary PicassoCheckbox-withLabel MuiIconButton-colorSecondary"
|
|
205
|
-
>
|
|
206
|
-
<span
|
|
207
|
-
class="MuiIconButton-label"
|
|
208
|
-
>
|
|
209
|
-
<input
|
|
210
|
-
class="PrivateSwitchBase-input"
|
|
211
|
-
data-indeterminate="false"
|
|
212
|
-
id="single-checkbox"
|
|
213
|
-
name="single-checkbox"
|
|
214
|
-
type="checkbox"
|
|
215
|
-
value=""
|
|
216
|
-
/>
|
|
217
|
-
<div
|
|
218
|
-
class="PicassoCheckbox-uncheckedIcon"
|
|
219
|
-
/>
|
|
220
|
-
</span>
|
|
221
|
-
</span>
|
|
222
|
-
</span>
|
|
223
|
-
<span
|
|
224
|
-
class="PicassoFormLabel-root PicassoFormLabel-inline PicassoFormControlLabel-label PicassoCheckbox-label"
|
|
225
|
-
>
|
|
226
|
-
<span
|
|
227
|
-
class="PicassoFormLabel-asterisk"
|
|
228
|
-
>
|
|
229
|
-
*
|
|
230
|
-
</span>
|
|
231
|
-
<span
|
|
232
|
-
class="PicassoFormLabel-text"
|
|
233
|
-
>
|
|
234
|
-
The checkbox label
|
|
235
|
-
</span>
|
|
236
|
-
</span>
|
|
237
|
-
</label>
|
|
238
|
-
</div>
|
|
239
|
-
</form>
|
|
240
|
-
</div>
|
|
241
|
-
</div>
|
|
242
|
-
</div>
|
|
243
|
-
`;
|
|
244
|
-
|
|
245
|
-
exports[`Form.Checkbox when required prop is passed does not set "required" attribute to input tag, to avoid Chrome tooltip 1`] = `
|
|
246
|
-
<input
|
|
247
|
-
class="PrivateSwitchBase-input"
|
|
248
|
-
data-indeterminate="false"
|
|
249
|
-
id="single-checkbox"
|
|
250
|
-
name="single-checkbox"
|
|
251
|
-
type="checkbox"
|
|
252
|
-
value=""
|
|
253
|
-
/>
|
|
254
|
-
`;
|
package/src/Checkbox/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './Checkbox'
|