@twintag/twintag-form 0.3.0 → 0.3.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.
- package/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +6 -0
- package/README.md +20 -9
- package/dist/index.es.js +2 -2
- package/dist/index.umd.js +2 -2
- package/dist/lib/styles.d.ts.map +1 -1
- package/dist/webcomponent.es.js +2 -2
- package/dist/webcomponent.umd.js +1 -1
- package/lib/components/Form/index.tsx +1 -1
- package/lib/components/Input/submit.tsx +1 -1
- package/lib/components/Label/index.tsx +1 -1
- package/lib/styles.ts +1 -1
- package/package.json +1 -1
- package/twind.config.ts +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @twintag/twintag-form@0.3.
|
|
2
|
+
> @twintag/twintag-form@0.3.1 build /home/runner/work/twintag-templates/twintag-templates/packages/twintag-form
|
|
3
3
|
> tsc && node ./scripts/build.js
|
|
4
4
|
|
|
5
5
|
[36mvite v4.3.9 [32mbuilding for production...[36m[39m
|
|
@@ -29,7 +29,7 @@ computing gzip size...
|
|
|
29
29
|
[2mdist/[22m[32mlib/types/index.d.ts [39m[1m[2m 0.45 kB[22m[1m[22m
|
|
30
30
|
[2mdist/[22m[32mlib/index.d.ts [39m[1m[2m 0.46 kB[22m[1m[22m
|
|
31
31
|
[2mdist/[22m[32mlib/styles.d.ts [39m[1m[2m 3.24 kB[22m[1m[22m
|
|
32
|
-
[2mdist/[22m[36mwebcomponent.es.js [39m[1m[33m1,009.45 kB[39m[22m[2m │ gzip: 240.
|
|
32
|
+
[2mdist/[22m[36mwebcomponent.es.js [39m[1m[33m1,009.45 kB[39m[22m[2m │ gzip: 240.02 kB[22m
|
|
33
33
|
[1m[33m[plugin:typescript][39m[22m [33m@rollup/plugin-typescript: Rollup 'sourcemap' option must be set to generate source maps.[39m
|
|
34
34
|
rendering chunks...
|
|
35
35
|
computing gzip size...
|
|
@@ -53,6 +53,6 @@ computing gzip size...
|
|
|
53
53
|
[2mdist/[22m[32mlib/index.d.ts [39m[1m[2m 0.46 kB[22m[1m[22m
|
|
54
54
|
[2mdist/[22m[32mlib/styles.d.ts [39m[1m[2m 3.24 kB[22m[1m[22m
|
|
55
55
|
[2mdist/[22m[36mwebcomponent.umd.js [39m[1m[33m622.35 kB[39m[22m[2m │ gzip: 194.56 kB[22m
|
|
56
|
-
[32m✓ built in
|
|
56
|
+
[32m✓ built in 24.15s[39m
|
|
57
57
|
[2mdist/[22m[36mindex.umd.js [39m[1m[33m556.28 kB[39m[22m[2m │ gzip: 172.27 kB[22m
|
|
58
|
-
[32m✓ built in
|
|
58
|
+
[32m✓ built in 24.46s[39m
|
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
- [Toggle](#toggle)
|
|
17
17
|
- [Submit](#submit)
|
|
18
18
|
- [Event Handling](#event-handling)
|
|
19
|
+
- [CSS](#css)
|
|
19
20
|
|
|
20
21
|
## **Introduction**
|
|
21
22
|
|
|
@@ -71,10 +72,10 @@ The `config` object contains the form structure. It is organized by the index of
|
|
|
71
72
|
|
|
72
73
|
Twintag Form provides some options to customize the form:
|
|
73
74
|
|
|
74
|
-
| Option | Type
|
|
75
|
-
| --------------- |
|
|
76
|
-
| `variant` | `alpha
|
|
77
|
-
| `resetOnSubmit` | `boolean`
|
|
75
|
+
| Option | Type | Description |
|
|
76
|
+
| --------------- | ------------ | ------------------------------------------------------------------------- |
|
|
77
|
+
| `variant` | `alpha/beta` | Variant of the form. |
|
|
78
|
+
| `resetOnSubmit` | `boolean` | If `true`, the form will be reset after submitting. (`false` per default) |
|
|
78
79
|
|
|
79
80
|
### **Inputs**
|
|
80
81
|
|
|
@@ -82,11 +83,11 @@ Twintag Form provides some options to customize the form:
|
|
|
82
83
|
|
|
83
84
|
Each input can be customized with the following options:
|
|
84
85
|
|
|
85
|
-
| Option | Type
|
|
86
|
-
| --------------- |
|
|
87
|
-
| `variant` | `alpha
|
|
88
|
-
| `placeholder` | `string`
|
|
89
|
-
| `optionalField` | `boolean`
|
|
86
|
+
| Option | Type | Description |
|
|
87
|
+
| --------------- | ------------ | ------------------------------------------------------------ |
|
|
88
|
+
| `variant` | `alpha/beta` | Variant of the input. |
|
|
89
|
+
| `placeholder` | `string` | Placeholder of the input. |
|
|
90
|
+
| `optionalField` | `boolean` | If `true`, the field will be optional. (`false` per default) |
|
|
90
91
|
|
|
91
92
|
```json
|
|
92
93
|
{
|
|
@@ -204,3 +205,13 @@ The `submit` input is a submit input.
|
|
|
204
205
|
});
|
|
205
206
|
</script>
|
|
206
207
|
```
|
|
208
|
+
|
|
209
|
+
## **CSS**
|
|
210
|
+
|
|
211
|
+
The form component exposes the following CSS variables:
|
|
212
|
+
|
|
213
|
+
| Variable | Description |
|
|
214
|
+
| ------------- | ------------------------ |
|
|
215
|
+
| `--clr-label` | Color of the labels. |
|
|
216
|
+
| `--clr-input` | Color of the inputs. |
|
|
217
|
+
| `--ff-text` | Font family of the text. |
|
package/dist/index.es.js
CHANGED
|
@@ -4193,7 +4193,7 @@ const gT = ({
|
|
|
4193
4193
|
"form",
|
|
4194
4194
|
{
|
|
4195
4195
|
ref: f,
|
|
4196
|
-
className: "
|
|
4196
|
+
className: "font-fftext relative",
|
|
4197
4197
|
onSubmit: b(R, _),
|
|
4198
4198
|
children: /* @__PURE__ */ dt.jsx("div", { className: "grid w-auto gap-4", children: /* @__PURE__ */ dt.jsx(gT, { useForm: { register: m, control: E }, children: u }) })
|
|
4199
4199
|
}
|
|
@@ -26786,7 +26786,7 @@ const pA = ({ useForm: u, label: s, bind: f, options: v }) => {
|
|
|
26786
26786
|
] });
|
|
26787
26787
|
}, vA = ({ label: u, options: s }) => {
|
|
26788
26788
|
const f = ua(() => s != null && s.variant ? Fw({ variant: s.variant }) : Fw(), []);
|
|
26789
|
-
return /* @__PURE__ */ dt.jsx("div", { className: "w-full
|
|
26789
|
+
return /* @__PURE__ */ dt.jsx("div", { className: "flex w-full justify-center", children: /* @__PURE__ */ dt.jsx("button", { type: "submit", className: f, children: u }) });
|
|
26790
26790
|
};
|
|
26791
26791
|
function hA(u, s) {
|
|
26792
26792
|
typeof u == "function" ? u(s) : u != null && (u.current = s);
|