@sproutsocial/seeds-react-form-field 1.1.20 → 1.1.21
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/esm/index.js +179 -27
- package/dist/esm/index.js.map +1 -1
- package/dist/form-field.css +21 -0
- package/dist/index.d.mts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +180 -28
- package/dist/index.js.map +1 -1
- package/package.json +15 -4
- package/.eslintignore +0 -6
- package/.eslintrc.js +0 -4
- package/.turbo/turbo-build.log +0 -21
- package/CHANGELOG.md +0 -288
- package/jest.config.js +0 -9
- package/src/FormField.stories.tsx +0 -126
- package/src/FormField.tsx +0 -94
- package/src/FormFieldTypes.ts +0 -34
- package/src/__tests__/FormField.test.tsx +0 -115
- package/src/__tests__/FormField.typetest.tsx +0 -84
- package/src/index.ts +0 -5
- package/src/styled.d.ts +0 -7
- package/tsconfig.json +0 -15
- package/tsup.config.ts +0 -12
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Input } from "@sproutsocial/seeds-react-input";
|
|
3
|
-
// import Select from "@sproutsocial/seeds-react-select";
|
|
4
|
-
// import Textarea from "@sproutsocial/seeds-react-textarea";
|
|
5
|
-
import FormField from "../FormField";
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8
|
-
function FormFieldTypes() {
|
|
9
|
-
return (
|
|
10
|
-
<>
|
|
11
|
-
<FormField label="Title" helperText="This is a line of helper text">
|
|
12
|
-
{(props) => (
|
|
13
|
-
<Input {...props} name="title" placeholder="Enter a title" />
|
|
14
|
-
)}
|
|
15
|
-
</FormField>
|
|
16
|
-
{/* <FormField id="descriptionIdThatIWantedToPassIn" label="Description">
|
|
17
|
-
{(props) => (
|
|
18
|
-
<Textarea
|
|
19
|
-
{...props}
|
|
20
|
-
name="description"
|
|
21
|
-
placeholder="Enter a description"
|
|
22
|
-
/>
|
|
23
|
-
)}
|
|
24
|
-
</FormField>
|
|
25
|
-
<FormField label="Reason">
|
|
26
|
-
{(props) => (
|
|
27
|
-
<Select {...props} name="reason">
|
|
28
|
-
<option value="">Select a reason</option>
|
|
29
|
-
<option value="something">Something goes here</option>
|
|
30
|
-
</Select>
|
|
31
|
-
)}
|
|
32
|
-
</FormField> */}
|
|
33
|
-
<FormField
|
|
34
|
-
label="Title"
|
|
35
|
-
helperText="This is a line of helper text"
|
|
36
|
-
error="There is an error associated with this input"
|
|
37
|
-
>
|
|
38
|
-
{(props) => (
|
|
39
|
-
<Input {...props} name="title" placeholder="Enter a title" />
|
|
40
|
-
)}
|
|
41
|
-
</FormField>
|
|
42
|
-
{/* <FormField
|
|
43
|
-
id="descriptionIdThatIWantedToPassIn"
|
|
44
|
-
label="Description"
|
|
45
|
-
error="There is an error associated with this textarea"
|
|
46
|
-
>
|
|
47
|
-
{(props) => (
|
|
48
|
-
<Textarea
|
|
49
|
-
{...props}
|
|
50
|
-
name="description"
|
|
51
|
-
placeholder="Enter a description"
|
|
52
|
-
/>
|
|
53
|
-
)}
|
|
54
|
-
</FormField>
|
|
55
|
-
<FormField
|
|
56
|
-
label="Reason"
|
|
57
|
-
error="There is an error associated with this select"
|
|
58
|
-
>
|
|
59
|
-
{(props) => (
|
|
60
|
-
<Select {...props} name="reason">
|
|
61
|
-
<option value="">Select a reason</option>
|
|
62
|
-
<option value="something">Something goes here</option>
|
|
63
|
-
</Select>
|
|
64
|
-
)}
|
|
65
|
-
</FormField> */}
|
|
66
|
-
<FormField label="Title" required>
|
|
67
|
-
{(props) => <Input {...props} name="title" />}
|
|
68
|
-
</FormField>
|
|
69
|
-
{/* <FormField label="Title" required>
|
|
70
|
-
{(props) => <Textarea {...props} name="title" />}
|
|
71
|
-
</FormField>
|
|
72
|
-
<FormField label="Title" required>
|
|
73
|
-
{(props) => (
|
|
74
|
-
<Select {...props} name="reason">
|
|
75
|
-
<option value="">Select a reason</option>
|
|
76
|
-
<option value="something">Something goes here</option>
|
|
77
|
-
</Select>
|
|
78
|
-
)}
|
|
79
|
-
</FormField> */}
|
|
80
|
-
{/* @ts-expect-error - test that missing required props is rejected */}
|
|
81
|
-
<FormField />
|
|
82
|
-
</>
|
|
83
|
-
);
|
|
84
|
-
}
|
package/src/index.ts
DELETED
package/src/styled.d.ts
DELETED
package/tsconfig.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@sproutsocial/seeds-tsconfig/bundler/dom/library-monorepo",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"jsx": "react-jsx",
|
|
5
|
-
"module": "esnext"
|
|
6
|
-
},
|
|
7
|
-
"include": ["src/**/*"],
|
|
8
|
-
"exclude": [
|
|
9
|
-
"node_modules",
|
|
10
|
-
"dist",
|
|
11
|
-
"coverage",
|
|
12
|
-
"**/*.stories.tsx",
|
|
13
|
-
"**/*.stories.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
package/tsup.config.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "tsup";
|
|
2
|
-
|
|
3
|
-
export default defineConfig((options) => ({
|
|
4
|
-
entry: ["src/index.ts"],
|
|
5
|
-
format: ["cjs", "esm"],
|
|
6
|
-
clean: true,
|
|
7
|
-
legacyOutput: true,
|
|
8
|
-
dts: options.dts,
|
|
9
|
-
external: ["react"],
|
|
10
|
-
sourcemap: true,
|
|
11
|
-
metafile: options.metafile,
|
|
12
|
-
}));
|