envoc-form 5.0.3 → 5.0.6
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/README.md +163 -20
- package/es/ConfirmBaseForm/ConfirmBaseForm.js +2 -2
- package/es/DatePicker/DatePickerGroup.js +2 -2
- package/es/FieldArray/FieldArray.js +4 -4
- package/es/File/FileGroup.js +3 -3
- package/es/Form/Form.js +2 -2
- package/es/Group.js +3 -3
- package/es/Input/CheckboxGroup.d.ts +6 -0
- package/es/Input/CheckboxGroup.js +14 -0
- package/es/Input/CheckboxInputGroup.d.ts +13 -0
- package/es/Input/CheckboxInputGroup.js +41 -0
- package/es/Input/IconInputGroup.js +2 -2
- package/es/Input/InputGroup.js +2 -2
- package/es/Input/MoneyInputGroup.js +2 -2
- package/es/Input/NumberInputGroup.js +2 -2
- package/es/Input/PhoneNumberInputGroup.js +2 -2
- package/es/Input/StringInputGroup.js +2 -2
- package/es/Select/SelectGroup.js +3 -3
- package/es/StandardFormActions.js +3 -3
- package/es/SubmitFormButton.js +2 -2
- package/es/TextArea/TextAreaGroup.js +2 -2
- package/es/index.d.ts +2 -0
- package/es/index.js +1 -0
- package/lib/ConfirmBaseForm/ConfirmBaseForm.js +2 -5
- package/lib/DatePicker/DatePickerGroup.js +2 -2
- package/lib/FieldArray/FieldArray.js +4 -4
- package/lib/File/FileGroup.js +3 -3
- package/lib/Form/Form.js +2 -2
- package/lib/Group.js +3 -3
- package/lib/Input/CheckboxGroup.d.ts +6 -0
- package/lib/Input/CheckboxGroup.js +20 -0
- package/lib/Input/CheckboxInputGroup.d.ts +13 -0
- package/lib/Input/CheckboxInputGroup.js +46 -0
- package/lib/Input/IconInputGroup.js +2 -2
- package/lib/Input/InputGroup.js +2 -2
- package/lib/Input/MoneyInputGroup.js +2 -2
- package/lib/Input/NumberInputGroup.js +2 -2
- package/lib/Input/PhoneNumberInputGroup.js +2 -2
- package/lib/Input/StringInputGroup.js +2 -2
- package/lib/Select/SelectGroup.js +3 -3
- package/lib/StandardFormActions.js +3 -3
- package/lib/SubmitFormButton.js +2 -2
- package/lib/TextArea/TextAreaGroup.js +2 -2
- package/lib/index.d.ts +2 -0
- package/lib/index.js +3 -1
- package/package.json +111 -111
- package/src/AddressInput/AddressInput.test.tsx +27 -27
- package/src/AddressInput/AddressInput.tsx +82 -82
- package/src/AddressInput/UsStates.ts +55 -55
- package/src/AddressInput/__snapshots__/AddressInput.test.tsx.snap +182 -182
- package/src/ConfirmBaseForm/ConfirmBaseForm.test.tsx +24 -24
- package/src/ConfirmBaseForm/ConfirmBaseForm.tsx +74 -74
- package/src/ConfirmBaseForm/__snapshots__/ConfirmBaseForm.test.tsx.snap +23 -23
- package/src/ConfirmDeleteForm/ConfirmDeleteForm.test.tsx +24 -24
- package/src/ConfirmDeleteForm/ConfirmDeleteForm.tsx +87 -87
- package/src/ConfirmDeleteForm/__snapshots__/ConfirmDeleteForm.test.tsx.snap +25 -25
- package/src/DatePicker/DatePicker.test.tsx +48 -48
- package/src/DatePicker/DatePickerGroup.tsx +109 -115
- package/src/DatePicker/DatePickerHelper.ts +4 -4
- package/src/DatePicker/StringDateOnlyPickerGroup.tsx +28 -28
- package/src/DatePicker/StringDatePickerGroup.tsx +20 -20
- package/src/DatePicker/__snapshots__/DatePicker.test.tsx.snap +152 -152
- package/src/Field/CustomFieldInputProps.ts +10 -10
- package/src/Field/CustomFieldMetaProps.ts +5 -5
- package/src/Field/Field.tsx +113 -113
- package/src/Field/FieldErrorScrollTarget.tsx +12 -12
- package/src/Field/FieldNameContext.ts +6 -6
- package/src/Field/FieldSection.tsx +18 -18
- package/src/Field/InjectedFieldProps.ts +8 -8
- package/src/Field/StandAloneInput.tsx +55 -55
- package/src/Field/useStandardField.ts +125 -125
- package/src/FieldArray/FieldArray.tsx +154 -154
- package/src/File/FileGroup.test.tsx +35 -35
- package/src/File/FileGroup.tsx +82 -85
- package/src/File/FileList.tsx +21 -21
- package/src/File/__snapshots__/FileGroup.test.tsx.snap +34 -34
- package/src/File/humanFileSize.ts +8 -8
- package/src/Form/FocusError.tsx +55 -55
- package/src/Form/Form.test.tsx +14 -14
- package/src/Form/Form.tsx +234 -237
- package/src/Form/FormBasedPreventNavigation.tsx +56 -56
- package/src/Form/LegacyFormBasedPreventNavigation.tsx +77 -77
- package/src/Form/NewFormBasedPreventNavigation.tsx +59 -59
- package/src/Form/ServerErrorContext.ts +18 -18
- package/src/Form/__snapshots__/Form.test.tsx.snap +10 -10
- package/src/FormActions.tsx +47 -47
- package/src/FormDefaults.ts +2 -2
- package/src/Group.tsx +62 -62
- package/src/Input/CheckboxGroup.tsx +60 -0
- package/src/Input/CheckboxInputGroup.tsx +78 -0
- package/src/Input/IconInputGroup.tsx +54 -54
- package/src/Input/InputGroup.tsx +66 -72
- package/src/Input/MoneyInputGroup.tsx +47 -50
- package/src/Input/NumberInputGroup.tsx +45 -48
- package/src/Input/PhoneNumberInputGroup.tsx +45 -45
- package/src/Input/StringInputGroup.tsx +50 -53
- package/src/Input/__Tests__/CheckboxInputGroup.test.tsx +26 -0
- package/src/Input/__Tests__/IconInputGroup.test.tsx +35 -35
- package/src/Input/__Tests__/MoneyInputGroup.test.tsx +37 -37
- package/src/Input/__Tests__/NumberInputGroup.test.tsx +35 -35
- package/src/Input/__Tests__/PhoneNumberInputGroup.test.tsx +36 -36
- package/src/Input/__Tests__/StringInputGroup.test.tsx +27 -27
- package/src/Input/__Tests__/__snapshots__/CheckboxInputGroup.test.tsx.snap +33 -0
- package/src/Input/__Tests__/__snapshots__/IconInputGroup.test.tsx.snap +32 -32
- package/src/Input/__Tests__/__snapshots__/MoneyInputGroup.test.tsx.snap +34 -34
- package/src/Input/__Tests__/__snapshots__/NumberInputGroup.test.tsx.snap +32 -32
- package/src/Input/__Tests__/__snapshots__/PhoneNumberInputGroup.test.tsx.snap +33 -33
- package/src/Input/__Tests__/__snapshots__/StringInputGroup.test.tsx.snap +31 -31
- package/src/Normalization/NormalizationFunction.ts +4 -4
- package/src/Normalization/normalizers.ts +44 -44
- package/src/Select/BooleanSelectGroup.tsx +28 -28
- package/src/Select/NumberSelectGroup.tsx +16 -16
- package/src/Select/SelectGroup.tsx +124 -124
- package/src/Select/SelectGroupPropsHelper.ts +4 -4
- package/src/Select/StringSelectGroup.tsx +16 -16
- package/src/Select/__tests__/BooleanSelectGroup.test.tsx +35 -35
- package/src/Select/__tests__/NumberSelectGroup.test.tsx +87 -87
- package/src/Select/__tests__/StringSelectGroup.test.tsx +89 -89
- package/src/Select/__tests__/__snapshots__/BooleanSelectGroup.test.tsx.snap +98 -98
- package/src/Select/__tests__/__snapshots__/NumberSelectGroup.test.tsx.snap +195 -195
- package/src/Select/__tests__/__snapshots__/StringSelectGroup.test.tsx.snap +195 -195
- package/src/StandardFormActions.tsx +41 -41
- package/src/SubmitFormButton.tsx +54 -54
- package/src/TextArea/TextAreaGroup.tsx +64 -64
- package/src/Validation/ValidatedApiResult.ts +8 -8
- package/src/Validation/ValidationError.ts +6 -6
- package/src/Validation/ValidationFunction.ts +4 -4
- package/src/Validation/validators.test.tsx +81 -81
- package/src/Validation/validators.ts +97 -97
- package/src/__Tests__/FormTestBase.tsx +65 -64
- package/src/__Tests__/RealisticForm.test.tsx +82 -82
- package/src/__Tests__/StandardFormActions.test.tsx +17 -17
- package/src/__Tests__/SubmitFormButton.test.tsx +17 -17
- package/src/__Tests__/__snapshots__/StandardFormActions.test.tsx.snap +27 -27
- package/src/__Tests__/__snapshots__/SubmitFormButton.test.tsx.snap +20 -20
- package/src/__Tests__/index.ts +3 -3
- package/src/_variables.scss +11 -11
- package/src/index.ts +156 -153
- package/src/react-app-env.d.ts +1 -1
- package/src/setupTests.ts +1 -1
- package/src/utils/objectContainsNonSerializableProperty.test.tsx +49 -49
- package/src/utils/objectContainsNonSerializableProperty.ts +17 -17
- package/src/utils/objectToFormData.test.tsx +76 -76
- package/src/utils/objectToFormData.ts +105 -105
- package/src/utils/typeChecks.ts +18 -18
@@ -1,82 +1,82 @@
|
|
1
|
-
import { render, screen, waitFor } from '@testing-library/react';
|
2
|
-
import user from '@testing-library/user-event';
|
3
|
-
import FormTestBase from './FormTestBase';
|
4
|
-
import { Form, StringInputGroup, ValidatedApiResult } from '../';
|
5
|
-
import { PersonDto } from '../__Tests__/FormTestBase';
|
6
|
-
import StandardFormActions from '../StandardFormActions';
|
7
|
-
import { validators } from '../';
|
8
|
-
|
9
|
-
const handleSubmitMock = jest.fn((value: PersonDto | FormData) => {
|
10
|
-
//return value;
|
11
|
-
return new Promise<ValidatedApiResult>((res, rej) => {
|
12
|
-
setTimeout(() => {
|
13
|
-
res({});
|
14
|
-
}, 15);
|
15
|
-
});
|
16
|
-
});
|
17
|
-
|
18
|
-
describe('Realistic Form', () => {
|
19
|
-
it('Validates, resolves validation, submits values', async () => {
|
20
|
-
global.scrollTo = jest.fn();
|
21
|
-
const fullForm = (
|
22
|
-
<FormTestBase handleSubmit={handleSubmitMock}>
|
23
|
-
{({ Field }) => (
|
24
|
-
<>
|
25
|
-
<Field name="name" label="name" Component={StringInputGroup} />
|
26
|
-
<Field
|
27
|
-
name="nameWithIcon"
|
28
|
-
label="Name with Icon"
|
29
|
-
Component={StringInputGroup}
|
30
|
-
validate={validators.required}
|
31
|
-
/>
|
32
|
-
<StandardFormActions />
|
33
|
-
<Form.DisplayFormState />
|
34
|
-
</>
|
35
|
-
)}
|
36
|
-
</FormTestBase>
|
37
|
-
);
|
38
|
-
|
39
|
-
render(fullForm);
|
40
|
-
const nameInput = screen.getByLabelText('name');
|
41
|
-
const formSubmitButton = screen.getByRole('button', {
|
42
|
-
name: 'Submit',
|
43
|
-
});
|
44
|
-
//The form should start off with the submit button disabled
|
45
|
-
expect(formSubmitButton).toBeDisabled();
|
46
|
-
|
47
|
-
//Enter a name into the name input
|
48
|
-
user.click(nameInput);
|
49
|
-
user.type(nameInput, 'Travis Overmier');
|
50
|
-
expect(nameInput).toHaveValue('Travis Overmier');
|
51
|
-
|
52
|
-
//Submit should be enabled, click submit
|
53
|
-
expect(formSubmitButton).toBeEnabled();
|
54
|
-
user.click(formSubmitButton);
|
55
|
-
|
56
|
-
//Submit should disable while 'submitting' then re-enable
|
57
|
-
expect(formSubmitButton).toBeDisabled();
|
58
|
-
await waitFor(() => {
|
59
|
-
expect(formSubmitButton).toBeEnabled();
|
60
|
-
});
|
61
|
-
|
62
|
-
//Validation message should appear
|
63
|
-
const nameWithIconInput = screen.getByLabelText('Name with Icon');
|
64
|
-
expect(nameWithIconInput).toHaveErrorMessage('Required');
|
65
|
-
|
66
|
-
//Fill in field, error message goes away
|
67
|
-
user.type(nameWithIconInput, 'Kyle Joiner');
|
68
|
-
user.tab();
|
69
|
-
await waitFor(() => {
|
70
|
-
expect(nameWithIconInput).not.toHaveErrorMessage();
|
71
|
-
});
|
72
|
-
|
73
|
-
//Click the submit button
|
74
|
-
user.click(formSubmitButton);
|
75
|
-
await waitFor(() => {
|
76
|
-
expect(handleSubmitMock).toHaveBeenCalled();
|
77
|
-
expect(JSON.stringify(handleSubmitMock.mock.calls[0][0])).toBe(
|
78
|
-
`{"name":"Travis Overmier","nameWithIcon":"Kyle Joiner"}`
|
79
|
-
);
|
80
|
-
});
|
81
|
-
});
|
82
|
-
});
|
1
|
+
import { render, screen, waitFor } from '@testing-library/react';
|
2
|
+
import user from '@testing-library/user-event';
|
3
|
+
import FormTestBase from './FormTestBase';
|
4
|
+
import { Form, StringInputGroup, ValidatedApiResult } from '../';
|
5
|
+
import { PersonDto } from '../__Tests__/FormTestBase';
|
6
|
+
import StandardFormActions from '../StandardFormActions';
|
7
|
+
import { validators } from '../';
|
8
|
+
|
9
|
+
const handleSubmitMock = jest.fn((value: PersonDto | FormData) => {
|
10
|
+
//return value;
|
11
|
+
return new Promise<ValidatedApiResult>((res, rej) => {
|
12
|
+
setTimeout(() => {
|
13
|
+
res({});
|
14
|
+
}, 15);
|
15
|
+
});
|
16
|
+
});
|
17
|
+
|
18
|
+
describe('Realistic Form', () => {
|
19
|
+
it('Validates, resolves validation, submits values', async () => {
|
20
|
+
global.scrollTo = jest.fn();
|
21
|
+
const fullForm = (
|
22
|
+
<FormTestBase handleSubmit={handleSubmitMock}>
|
23
|
+
{({ Field }) => (
|
24
|
+
<>
|
25
|
+
<Field name="name" label="name" Component={StringInputGroup} />
|
26
|
+
<Field
|
27
|
+
name="nameWithIcon"
|
28
|
+
label="Name with Icon"
|
29
|
+
Component={StringInputGroup}
|
30
|
+
validate={validators.required}
|
31
|
+
/>
|
32
|
+
<StandardFormActions />
|
33
|
+
<Form.DisplayFormState />
|
34
|
+
</>
|
35
|
+
)}
|
36
|
+
</FormTestBase>
|
37
|
+
);
|
38
|
+
|
39
|
+
render(fullForm);
|
40
|
+
const nameInput = screen.getByLabelText('name');
|
41
|
+
const formSubmitButton = screen.getByRole('button', {
|
42
|
+
name: 'Submit',
|
43
|
+
});
|
44
|
+
//The form should start off with the submit button disabled
|
45
|
+
expect(formSubmitButton).toBeDisabled();
|
46
|
+
|
47
|
+
//Enter a name into the name input
|
48
|
+
user.click(nameInput);
|
49
|
+
user.type(nameInput, 'Travis Overmier');
|
50
|
+
expect(nameInput).toHaveValue('Travis Overmier');
|
51
|
+
|
52
|
+
//Submit should be enabled, click submit
|
53
|
+
expect(formSubmitButton).toBeEnabled();
|
54
|
+
user.click(formSubmitButton);
|
55
|
+
|
56
|
+
//Submit should disable while 'submitting' then re-enable
|
57
|
+
expect(formSubmitButton).toBeDisabled();
|
58
|
+
await waitFor(() => {
|
59
|
+
expect(formSubmitButton).toBeEnabled();
|
60
|
+
});
|
61
|
+
|
62
|
+
//Validation message should appear
|
63
|
+
const nameWithIconInput = screen.getByLabelText('Name with Icon');
|
64
|
+
expect(nameWithIconInput).toHaveErrorMessage('Required');
|
65
|
+
|
66
|
+
//Fill in field, error message goes away
|
67
|
+
user.type(nameWithIconInput, 'Kyle Joiner');
|
68
|
+
user.tab();
|
69
|
+
await waitFor(() => {
|
70
|
+
expect(nameWithIconInput).not.toHaveErrorMessage();
|
71
|
+
});
|
72
|
+
|
73
|
+
//Click the submit button
|
74
|
+
user.click(formSubmitButton);
|
75
|
+
await waitFor(() => {
|
76
|
+
expect(handleSubmitMock).toHaveBeenCalled();
|
77
|
+
expect(JSON.stringify(handleSubmitMock.mock.calls[0][0])).toBe(
|
78
|
+
`{"name":"Travis Overmier","nameWithIcon":"Kyle Joiner"}`
|
79
|
+
);
|
80
|
+
});
|
81
|
+
});
|
82
|
+
});
|
@@ -1,17 +1,17 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { render } from '@testing-library/react';
|
3
|
-
import FormTestBase from './FormTestBase';
|
4
|
-
import StandardFormActions from '../StandardFormActions';
|
5
|
-
|
6
|
-
describe('StandardFormActions', () => {
|
7
|
-
it('renders without crashing', () => {
|
8
|
-
render(<FormTestBase>{() => <StandardFormActions />}</FormTestBase>);
|
9
|
-
});
|
10
|
-
|
11
|
-
it('has matching snapshot', () => {
|
12
|
-
const renderResult = render(
|
13
|
-
<FormTestBase>{() => <StandardFormActions />}</FormTestBase>
|
14
|
-
);
|
15
|
-
expect(renderResult.asFragment()).toMatchSnapshot();
|
16
|
-
});
|
17
|
-
});
|
1
|
+
import React from 'react';
|
2
|
+
import { render } from '@testing-library/react';
|
3
|
+
import FormTestBase from './FormTestBase';
|
4
|
+
import StandardFormActions from '../StandardFormActions';
|
5
|
+
|
6
|
+
describe('StandardFormActions', () => {
|
7
|
+
it('renders without crashing', () => {
|
8
|
+
render(<FormTestBase>{() => <StandardFormActions />}</FormTestBase>);
|
9
|
+
});
|
10
|
+
|
11
|
+
it('has matching snapshot', () => {
|
12
|
+
const renderResult = render(
|
13
|
+
<FormTestBase>{() => <StandardFormActions />}</FormTestBase>
|
14
|
+
);
|
15
|
+
expect(renderResult.asFragment()).toMatchSnapshot();
|
16
|
+
});
|
17
|
+
});
|
@@ -1,17 +1,17 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { render } from '@testing-library/react';
|
3
|
-
import FormTestBase from './FormTestBase';
|
4
|
-
import SubmitFormButton from '../SubmitFormButton';
|
5
|
-
|
6
|
-
describe('SubmitFormButton', () => {
|
7
|
-
it('renders without crashing', () => {
|
8
|
-
render(<FormTestBase>{() => <SubmitFormButton />}</FormTestBase>);
|
9
|
-
});
|
10
|
-
|
11
|
-
it('has matching snapshot', () => {
|
12
|
-
const renderResult = render(
|
13
|
-
<FormTestBase>{() => <SubmitFormButton />}</FormTestBase>
|
14
|
-
);
|
15
|
-
expect(renderResult.asFragment()).toMatchSnapshot();
|
16
|
-
});
|
17
|
-
});
|
1
|
+
import React from 'react';
|
2
|
+
import { render } from '@testing-library/react';
|
3
|
+
import FormTestBase from './FormTestBase';
|
4
|
+
import SubmitFormButton from '../SubmitFormButton';
|
5
|
+
|
6
|
+
describe('SubmitFormButton', () => {
|
7
|
+
it('renders without crashing', () => {
|
8
|
+
render(<FormTestBase>{() => <SubmitFormButton />}</FormTestBase>);
|
9
|
+
});
|
10
|
+
|
11
|
+
it('has matching snapshot', () => {
|
12
|
+
const renderResult = render(
|
13
|
+
<FormTestBase>{() => <SubmitFormButton />}</FormTestBase>
|
14
|
+
);
|
15
|
+
expect(renderResult.asFragment()).toMatchSnapshot();
|
16
|
+
});
|
17
|
+
});
|
@@ -1,27 +1,27 @@
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
-
|
3
|
-
exports[`StandardFormActions has matching snapshot 1`] = `
|
4
|
-
<DocumentFragment>
|
5
|
-
<form
|
6
|
-
action="#"
|
7
|
-
class="envoc-form-form"
|
8
|
-
>
|
9
|
-
<button
|
10
|
-
aria-label="Submit"
|
11
|
-
class="envoc-form-submit-form-button"
|
12
|
-
disabled=""
|
13
|
-
title="You haven't made any changes"
|
14
|
-
type="submit"
|
15
|
-
>
|
16
|
-
Submit
|
17
|
-
</button>
|
18
|
-
|
19
|
-
<button
|
20
|
-
class="envoc-form-standard-form-actions-cancel-button"
|
21
|
-
type="button"
|
22
|
-
>
|
23
|
-
Cancel
|
24
|
-
</button>
|
25
|
-
</form>
|
26
|
-
</DocumentFragment>
|
27
|
-
`;
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
+
|
3
|
+
exports[`StandardFormActions has matching snapshot 1`] = `
|
4
|
+
<DocumentFragment>
|
5
|
+
<form
|
6
|
+
action="#"
|
7
|
+
class="envoc-form-form"
|
8
|
+
>
|
9
|
+
<button
|
10
|
+
aria-label="Submit"
|
11
|
+
class="envoc-form-submit-form-button"
|
12
|
+
disabled=""
|
13
|
+
title="You haven't made any changes"
|
14
|
+
type="submit"
|
15
|
+
>
|
16
|
+
Submit
|
17
|
+
</button>
|
18
|
+
|
19
|
+
<button
|
20
|
+
class="envoc-form-standard-form-actions-cancel-button"
|
21
|
+
type="button"
|
22
|
+
>
|
23
|
+
Cancel
|
24
|
+
</button>
|
25
|
+
</form>
|
26
|
+
</DocumentFragment>
|
27
|
+
`;
|
@@ -1,20 +1,20 @@
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
-
|
3
|
-
exports[`SubmitFormButton has matching snapshot 1`] = `
|
4
|
-
<DocumentFragment>
|
5
|
-
<form
|
6
|
-
action="#"
|
7
|
-
class="envoc-form-form"
|
8
|
-
>
|
9
|
-
<button
|
10
|
-
aria-label="Submit"
|
11
|
-
class="envoc-form-submit-form-button"
|
12
|
-
disabled=""
|
13
|
-
title="You haven't made any changes"
|
14
|
-
type="submit"
|
15
|
-
>
|
16
|
-
Submit
|
17
|
-
</button>
|
18
|
-
</form>
|
19
|
-
</DocumentFragment>
|
20
|
-
`;
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
+
|
3
|
+
exports[`SubmitFormButton has matching snapshot 1`] = `
|
4
|
+
<DocumentFragment>
|
5
|
+
<form
|
6
|
+
action="#"
|
7
|
+
class="envoc-form-form"
|
8
|
+
>
|
9
|
+
<button
|
10
|
+
aria-label="Submit"
|
11
|
+
class="envoc-form-submit-form-button"
|
12
|
+
disabled=""
|
13
|
+
title="You haven't made any changes"
|
14
|
+
type="submit"
|
15
|
+
>
|
16
|
+
Submit
|
17
|
+
</button>
|
18
|
+
</form>
|
19
|
+
</DocumentFragment>
|
20
|
+
`;
|
package/src/__Tests__/index.ts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
import FormTestBase from './FormTestBase';
|
2
|
-
|
3
|
-
export { FormTestBase };
|
1
|
+
import FormTestBase from './FormTestBase';
|
2
|
+
|
3
|
+
export { FormTestBase };
|
package/src/_variables.scss
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
//These variables are normally in the template directly,
|
2
|
-
|
3
|
-
$red: #f86c6b;
|
4
|
-
// Couldn't find these variables directly from coreui/bootstrap
|
5
|
-
$input-border-color: #c2cfd6;
|
6
|
-
$input-border-color--focused: #8ad4ee;
|
7
|
-
$input-box-shadow--focused: 0 0 0 0.2rem rgba(32, 168, 216, 0.25);
|
8
|
-
|
9
|
-
//Taken from react-select because it fit better in the color scheme and is more readable.
|
10
|
-
$input-disabled-background-color: hsl(0, 0%, 95%);
|
11
|
-
$input-disabled-border-color: hsl(0, 0%, 90%);
|
1
|
+
//These variables are normally in the template directly,
|
2
|
+
|
3
|
+
$red: #f86c6b;
|
4
|
+
// Couldn't find these variables directly from coreui/bootstrap
|
5
|
+
$input-border-color: #c2cfd6;
|
6
|
+
$input-border-color--focused: #8ad4ee;
|
7
|
+
$input-box-shadow--focused: 0 0 0 0.2rem rgba(32, 168, 216, 0.25);
|
8
|
+
|
9
|
+
//Taken from react-select because it fit better in the color scheme and is more readable.
|
10
|
+
$input-disabled-background-color: hsl(0, 0%, 95%);
|
11
|
+
$input-disabled-border-color: hsl(0, 0%, 90%);
|