@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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @twintag/twintag-form@0.3.0 build /home/runner/work/twintag-templates/twintag-templates/packages/twintag-form
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
  vite v4.3.9 building for production...
@@ -29,7 +29,7 @@ computing gzip size...
29
29
  dist/lib/types/index.d.ts  0.45 kB
30
30
  dist/lib/index.d.ts  0.46 kB
31
31
  dist/lib/styles.d.ts  3.24 kB
32
- dist/webcomponent.es.js 1,009.45 kB │ gzip: 240.03 kB
32
+ dist/webcomponent.es.js 1,009.45 kB │ gzip: 240.02 kB
33
33
  [plugin:typescript] @rollup/plugin-typescript: Rollup 'sourcemap' option must be set to generate source maps.
34
34
  rendering chunks...
35
35
  computing gzip size...
@@ -53,6 +53,6 @@ computing gzip size...
53
53
  dist/lib/index.d.ts  0.46 kB
54
54
  dist/lib/styles.d.ts  3.24 kB
55
55
  dist/webcomponent.umd.js 622.35 kB │ gzip: 194.56 kB
56
- ✓ built in 17.53s
56
+ ✓ built in 24.15s
57
57
  dist/index.umd.js 556.28 kB │ gzip: 172.27 kB
58
- ✓ built in 17.66s
58
+ ✓ built in 24.46s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @twintag/twintag-form
2
2
 
3
+ ## 0.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Update documentation.
8
+
3
9
  ## 0.3.0
4
10
 
5
11
  ### Minor Changes
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 | Description |
75
- | --------------- | --------- | ------------------------------------------------------------------------- | -------------------- |
76
- | `variant` | `alpha | beta` | Variant of the form. |
77
- | `resetOnSubmit` | `boolean` | If `true`, the form will be reset after submitting. (`false` per default) |
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 | Description |
86
- | --------------- | --------- | ------------------------------------------------------------ | --------------------- |
87
- | `variant` | `alpha | beta` | Variant of the input. |
88
- | `placeholder` | `string` | Placeholder of the input. |
89
- | `optionalField` | `boolean` | If `true`, the field will be optional. (`false` per default) |
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: "relative font-fftext",
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 flex justify-center", children: /* @__PURE__ */ dt.jsx("button", { type: "submit", className: f, children: u }) });
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);