@twintag/twintag-form 0.1.0 → 0.2.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/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +6 -0
- package/README.md +203 -0
- package/dist/index.es.js +3 -3
- package/dist/index.umd.js +15 -15
- package/dist/lib/components/Input/file.d.ts.map +1 -1
- package/dist/lib/types/index.d.ts +1 -0
- package/dist/lib/types/index.d.ts.map +1 -1
- package/dist/webcomponent.es.js +1036 -1036
- package/dist/webcomponent.umd.js +1 -1
- package/lib/components/Input/file.tsx +3 -1
- package/lib/components/Input/simple.tsx +1 -1
- package/lib/components/Input/textarea.tsx +1 -1
- package/lib/types/index.ts +1 -0
- package/package.json +2 -2
|
@@ -63,7 +63,9 @@ const File = ({ useForm, label, bind, options }: Props) => {
|
|
|
63
63
|
);
|
|
64
64
|
})
|
|
65
65
|
) : (
|
|
66
|
-
<span
|
|
66
|
+
<span className='block max-w-full overflow-hidden text-ellipsis whitespace-nowrap'>
|
|
67
|
+
{options?.placeholder || 'No file selected'}
|
|
68
|
+
</span>
|
|
67
69
|
)}
|
|
68
70
|
</span>
|
|
69
71
|
|
|
@@ -28,7 +28,7 @@ const Simple = ({ useForm, label, bind, options }: Props) => {
|
|
|
28
28
|
<input
|
|
29
29
|
id={id}
|
|
30
30
|
type='text'
|
|
31
|
-
placeholder='Write here...'
|
|
31
|
+
placeholder={options?.placeholder || 'Write here...'}
|
|
32
32
|
className={input()}
|
|
33
33
|
{...useForm!.register(bind as string, {
|
|
34
34
|
required: options?.optionalField ? false : `${label} is required`,
|
|
@@ -24,7 +24,7 @@ const Textarea = ({ useForm, label, bind, options }: Props) => {
|
|
|
24
24
|
<textarea
|
|
25
25
|
id={id}
|
|
26
26
|
className={input()}
|
|
27
|
-
placeholder='Write here...'
|
|
27
|
+
placeholder={options?.placeholder || 'Write here...'}
|
|
28
28
|
{...useForm!.register(bind as string, {
|
|
29
29
|
required: options?.optionalField ? false : `${label} is required`,
|
|
30
30
|
})}
|
package/lib/types/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twintag/twintag-form",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"author": "Twintag",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"typescript": "^5.0.2",
|
|
41
41
|
"vite": "^4.1.0",
|
|
42
42
|
"vite-plugin-dts": "^2.1.0",
|
|
43
|
-
"tsconfig": "0.0.0",
|
|
44
43
|
"tailwind-config": "0.0.0",
|
|
44
|
+
"tsconfig": "0.0.0",
|
|
45
45
|
"twintag-types": "0.0.0"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|