Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto Form #497

Merged
merged 29 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0d86869
chore: initial poc
zernonia Apr 16, 2024
ed054e0
chore: cleanup, log on the docs
zernonia Apr 16, 2024
9f37b12
feat: add file component
zernonia Apr 17, 2024
49ad6c8
feat: typing for nested config
zernonia Apr 18, 2024
318d4c8
feat: more props for form field
zernonia Apr 18, 2024
7370383
feat: export field component, expose more slotprops
zernonia Apr 18, 2024
1120f04
feat: array, config label
zernonia Apr 19, 2024
1c56246
feat: improve array
zernonia Apr 19, 2024
b07b4d4
feat: support custom form state
zernonia Apr 19, 2024
c986fed
chore: prevent schema props showing on attribute
zernonia Apr 19, 2024
0cd3371
feat: dependencies rendering
zernonia Apr 19, 2024
9162c74
refactor: change name to fieldName to allow easier slotProps binding
zernonia Apr 19, 2024
baa83ec
feat: improve file upload
zernonia Apr 20, 2024
9769d10
feat: expose custom auto form slot
zernonia Apr 20, 2024
ed9c709
chore: bump
zernonia Apr 20, 2024
637aa11
chore: replicate to default styling
zernonia Apr 20, 2024
cc577e3
chore: build registry
zernonia Apr 20, 2024
bdc4ccc
fix: export component before init
zernonia Apr 20, 2024
07a0b9a
chore: add examples
zernonia Apr 21, 2024
d674549
chore: add form api example
zernonia Apr 21, 2024
f255983
fix: warning in console
zernonia Apr 22, 2024
058026c
chore: bump package version
zernonia Apr 22, 2024
02a4f02
chore: update example, complete md
zernonia Apr 23, 2024
5ac2f74
feat: allow zod description as label, allow custom component
zernonia Apr 23, 2024
2891dd2
docs: fix link
zernonia Apr 24, 2024
63081e8
feat: show required field for object
zernonia Apr 24, 2024
5733d62
Merge remote-tracking branch 'origin/dev' into autoform
zernonia Apr 24, 2024
ec29254
chore: replace enumProps
zernonia May 1, 2024
dffef69
Merge remote-tracking branch 'origin/dev' into autoform
zernonia May 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/www/.vitepress/theme/components/Callout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ defineProps<CalloutProps>()
<AlertTitle v-if="title">
{{ title }}
</AlertTitle>
<AlertDescription>
<AlertDescription class="[&_a]:underline">
<slot />
</AlertDescription>
</Alert>
Expand Down
12 changes: 11 additions & 1 deletion apps/www/.vitepress/theme/config/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface NavItem {
}

export type SidebarNavItem = NavItem & {
items: SidebarNavItem[]
items?: SidebarNavItem[]
}

export type NavItemWithChildren = NavItem & {
Expand Down Expand Up @@ -134,6 +134,16 @@ export const docsConfig: DocsConfig = {
},
],
},
{
title: 'Extended',
items: [
{
title: 'Auto Form',
href: '/docs/components/auto-form',
items: [],
},
],
},
{
title: 'Components',
items: [
Expand Down
112 changes: 112 additions & 0 deletions apps/www/__registry__/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,62 @@ export const Index = {
component: () => import("../src/lib/registry/default/example/AspectRatioDemo.vue").then((m) => m.default),
files: ["../src/lib/registry/default/example/AspectRatioDemo.vue"],
},
"AutoFormApi": {
name: "AutoFormApi",
type: "components:example",
registryDependencies: ["button","toast","auto-form"],
component: () => import("../src/lib/registry/default/example/AutoFormApi.vue").then((m) => m.default),
files: ["../src/lib/registry/default/example/AutoFormApi.vue"],
},
"AutoFormArray": {
name: "AutoFormArray",
type: "components:example",
registryDependencies: ["button","toast","auto-form"],
component: () => import("../src/lib/registry/default/example/AutoFormArray.vue").then((m) => m.default),
files: ["../src/lib/registry/default/example/AutoFormArray.vue"],
},
"AutoFormBasic": {
name: "AutoFormBasic",
type: "components:example",
registryDependencies: ["button","toast","auto-form"],
component: () => import("../src/lib/registry/default/example/AutoFormBasic.vue").then((m) => m.default),
files: ["../src/lib/registry/default/example/AutoFormBasic.vue"],
},
"AutoFormConfirmPassword": {
name: "AutoFormConfirmPassword",
type: "components:example",
registryDependencies: ["button","toast","auto-form"],
component: () => import("../src/lib/registry/default/example/AutoFormConfirmPassword.vue").then((m) => m.default),
files: ["../src/lib/registry/default/example/AutoFormConfirmPassword.vue"],
},
"AutoFormControlled": {
name: "AutoFormControlled",
type: "components:example",
registryDependencies: ["button","toast","auto-form"],
component: () => import("../src/lib/registry/default/example/AutoFormControlled.vue").then((m) => m.default),
files: ["../src/lib/registry/default/example/AutoFormControlled.vue"],
},
"AutoFormDependencies": {
name: "AutoFormDependencies",
type: "components:example",
registryDependencies: ["button","toast","auto-form"],
component: () => import("../src/lib/registry/default/example/AutoFormDependencies.vue").then((m) => m.default),
files: ["../src/lib/registry/default/example/AutoFormDependencies.vue"],
},
"AutoFormInputWithoutLabel": {
name: "AutoFormInputWithoutLabel",
type: "components:example",
registryDependencies: ["button","toast","auto-form"],
component: () => import("../src/lib/registry/default/example/AutoFormInputWithoutLabel.vue").then((m) => m.default),
files: ["../src/lib/registry/default/example/AutoFormInputWithoutLabel.vue"],
},
"AutoFormSubObject": {
name: "AutoFormSubObject",
type: "components:example",
registryDependencies: ["button","toast","auto-form"],
component: () => import("../src/lib/registry/default/example/AutoFormSubObject.vue").then((m) => m.default),
files: ["../src/lib/registry/default/example/AutoFormSubObject.vue"],
},
"AvatarDemo": {
name: "AvatarDemo",
type: "components:example",
Expand Down Expand Up @@ -1278,6 +1334,62 @@ export const Index = {
component: () => import("../src/lib/registry/new-york/example/AspectRatioDemo.vue").then((m) => m.default),
files: ["../src/lib/registry/new-york/example/AspectRatioDemo.vue"],
},
"AutoFormApi": {
name: "AutoFormApi",
type: "components:example",
registryDependencies: ["button","toast","auto-form"],
component: () => import("../src/lib/registry/new-york/example/AutoFormApi.vue").then((m) => m.default),
files: ["../src/lib/registry/new-york/example/AutoFormApi.vue"],
},
"AutoFormArray": {
name: "AutoFormArray",
type: "components:example",
registryDependencies: ["button","toast","auto-form"],
component: () => import("../src/lib/registry/new-york/example/AutoFormArray.vue").then((m) => m.default),
files: ["../src/lib/registry/new-york/example/AutoFormArray.vue"],
},
"AutoFormBasic": {
name: "AutoFormBasic",
type: "components:example",
registryDependencies: ["button","toast","auto-form"],
component: () => import("../src/lib/registry/new-york/example/AutoFormBasic.vue").then((m) => m.default),
files: ["../src/lib/registry/new-york/example/AutoFormBasic.vue"],
},
"AutoFormConfirmPassword": {
name: "AutoFormConfirmPassword",
type: "components:example",
registryDependencies: ["button","toast","auto-form"],
component: () => import("../src/lib/registry/new-york/example/AutoFormConfirmPassword.vue").then((m) => m.default),
files: ["../src/lib/registry/new-york/example/AutoFormConfirmPassword.vue"],
},
"AutoFormControlled": {
name: "AutoFormControlled",
type: "components:example",
registryDependencies: ["button","toast","auto-form"],
component: () => import("../src/lib/registry/new-york/example/AutoFormControlled.vue").then((m) => m.default),
files: ["../src/lib/registry/new-york/example/AutoFormControlled.vue"],
},
"AutoFormDependencies": {
name: "AutoFormDependencies",
type: "components:example",
registryDependencies: ["button","toast","auto-form"],
component: () => import("../src/lib/registry/new-york/example/AutoFormDependencies.vue").then((m) => m.default),
files: ["../src/lib/registry/new-york/example/AutoFormDependencies.vue"],
},
"AutoFormInputWithoutLabel": {
name: "AutoFormInputWithoutLabel",
type: "components:example",
registryDependencies: ["button","toast","auto-form"],
component: () => import("../src/lib/registry/new-york/example/AutoFormInputWithoutLabel.vue").then((m) => m.default),
files: ["../src/lib/registry/new-york/example/AutoFormInputWithoutLabel.vue"],
},
"AutoFormSubObject": {
name: "AutoFormSubObject",
type: "components:example",
registryDependencies: ["button","toast","auto-form"],
component: () => import("../src/lib/registry/new-york/example/AutoFormSubObject.vue").then((m) => m.default),
files: ["../src/lib/registry/new-york/example/AutoFormSubObject.vue"],
},
"AvatarDemo": {
name: "AvatarDemo",
type: "components:example",
Expand Down
2 changes: 1 addition & 1 deletion apps/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"tailwindcss-animate": "^1.0.7",
"v-calendar": "^3.1.2",
"vaul-vue": "^0.1.0",
"vee-validate": "4.12.5",
"vee-validate": "4.12.6",
"vue": "^3.4.24",
"vue-sonner": "^1.1.2",
"vue-wrap-balancer": "^1.1.3",
Expand Down
Loading
Loading