@twintag/twintag-form 1.4.0-beta.1 → 1.4.0-beta.3
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 +12 -0
- package/README.md +8 -4
- package/dev/main.tsx +453 -233
- package/dist/components/config.d.ts +2 -2
- package/dist/components/containers/accordion.d.ts +2 -4
- package/dist/components/fields/checkbox.d.ts +1 -1
- package/dist/components/fields/date-picker.d.ts +1 -1
- package/dist/components/fields/file.d.ts +1 -1
- package/dist/components/fields/input.d.ts +1 -1
- package/dist/components/fields/radiogroup.d.ts +3 -1
- package/dist/components/fields/textarea.d.ts +1 -1
- package/dist/components/fields/toggle.d.ts +1 -1
- package/dist/components/fields/tri-toggle.d.ts +1 -1
- package/dist/components/provider.d.ts +3 -3
- package/dist/twintag-form.react.js +1637 -1624
- package/dist/types/index.d.ts +37 -22
- package/dist/utils/data.d.ts +5 -1
- package/index.html +1 -0
- package/lib/components/config.tsx +2 -2
- package/lib/components/containers/accordion.tsx +33 -14
- package/lib/components/fields/checkbox.tsx +1 -1
- package/lib/components/fields/date-picker.tsx +5 -1
- package/lib/components/fields/file.tsx +83 -83
- package/lib/components/fields/input.tsx +1 -1
- package/lib/components/fields/radiogroup.tsx +5 -1
- package/lib/components/fields/textarea.tsx +1 -1
- package/lib/components/fields/toggle.tsx +1 -1
- package/lib/components/fields/tri-toggle.tsx +1 -1
- package/lib/components/provider.tsx +163 -159
- package/lib/index.tsx +41 -41
- package/lib/types/index.ts +82 -49
- package/lib/utils/data.ts +5 -2
- package/package.json +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @twintag/twintag-form@1.4.0-beta.
|
|
2
|
+
> @twintag/twintag-form@1.4.0-beta.3 build C:\Users\daryl\Desktop\twintag-projects\twintag-admin\packages\twintag-form
|
|
3
3
|
> tsc && vite build
|
|
4
4
|
|
|
5
5
|
[36mvite v5.2.11 [32mbuilding for production...[36m[39m
|
|
@@ -14,8 +14,8 @@ computing gzip size...
|
|
|
14
14
|
[vite:dts] Outside emitted: C:/Users/daryl/Desktop/twintag-projects/twintag-admin/packages/twintag-form/prettier.config.d.mts
|
|
15
15
|
[vite:dts] Outside emitted: C:/Users/daryl/Desktop/twintag-projects/twintag-admin/packages/twintag-form/dev/main.d.ts
|
|
16
16
|
[vite:dts] Outside emitted: C:/Users/daryl/Desktop/twintag-projects/twintag-admin/packages/twintag-form/vite.config.d.ts
|
|
17
|
-
[vite:dts] Declaration files built in
|
|
17
|
+
[vite:dts] Declaration files built in 5747ms.
|
|
18
18
|
|
|
19
19
|
[2mdist/[22m[36mtwintag-form.webcomponent.js [39m[1m[2m119.76 kB[22m[1m[22m[2m │ gzip: 33.52 kB[22m
|
|
20
|
-
[2mdist/[22m[36mtwintag-form.react.js [39m[1m[33m706.
|
|
21
|
-
[32m✓ built in
|
|
20
|
+
[2mdist/[22m[36mtwintag-form.react.js [39m[1m[33m706.33 kB[39m[22m[2m │ gzip: 144.27 kB[22m
|
|
21
|
+
[32m✓ built in 12.63s[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @twintag/twintag-form
|
|
2
2
|
|
|
3
|
+
## 1.4.0-beta.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix: accordion does not expand when `value` is not provided
|
|
8
|
+
|
|
9
|
+
## 1.4.0-beta.2
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- fix: add accordion `defaultValue` option
|
|
14
|
+
|
|
3
15
|
## 1.4.0-beta.1
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -247,13 +247,17 @@ Each input can be customized with the following optional options:
|
|
|
247
247
|
```json
|
|
248
248
|
{
|
|
249
249
|
"type": "accordion",
|
|
250
|
+
"props": {
|
|
251
|
+
"defaultValue": "first-item" // optional: default expanded item
|
|
252
|
+
},
|
|
250
253
|
"children": [
|
|
251
254
|
{
|
|
252
255
|
"type": "accordion",
|
|
253
256
|
"props": {
|
|
254
257
|
"subtype": "item",
|
|
255
|
-
"
|
|
256
|
-
"
|
|
258
|
+
"value": "first-item", // optional
|
|
259
|
+
"label": "Your label",
|
|
260
|
+
"icon": "archive-box-x-mark"
|
|
257
261
|
},
|
|
258
262
|
"children": [
|
|
259
263
|
{
|
|
@@ -348,13 +352,13 @@ The form component exposes the following CSS variables:
|
|
|
348
352
|
| --tf-background | Background color for the input fields. |
|
|
349
353
|
| --tf-foreground | Text color for the input fields. |
|
|
350
354
|
| | |
|
|
351
|
-
| --tf-muted | Used for `toggle` and `tri-toggle` background when value is false.
|
|
355
|
+
| --tf-muted | Used for `toggle` and `tri-toggle` background when value is false. |
|
|
352
356
|
| --tf-muted-foreground | Color used for `placeholder` text (inputs) and description text. |
|
|
353
357
|
| | |
|
|
354
358
|
| --tf-primary | This color complements `primary-foreground`: `submit` button text |
|
|
355
359
|
| --tf-primary-foreground | This color is used for, `submit` background, `label` text and input value. |
|
|
356
360
|
| | |
|
|
357
|
-
| --tf-accent | The accent color is used for `toggle`, `tri-toggle`, `checkbox` and `radiogroup` inputs.
|
|
361
|
+
| --tf-accent | The accent color is used for `toggle`, `tri-toggle`, `checkbox` and `radiogroup` inputs. |
|
|
358
362
|
| --tf-accent-foreground | This color complements `accent` to show contrast between elements: `checkbox` check icon. |
|
|
359
363
|
| | |
|
|
360
364
|
| --tf-destructive | This color is used for `error` messages and the asterisk to mark a required input. |
|