+
@@ -17,10 +40,23 @@ import ZodForm from './zod-form/index.vue';
-
-
-
-
+
+
+ {{ { selectedCity } }}
diff --git a/src/__fk-inputs__/inputs/input-password.ts b/src/__fk-inputs__/inputs/p-input-password.ts
similarity index 96%
rename from src/__fk-inputs__/inputs/input-password.ts
rename to src/__fk-inputs__/inputs/p-input-password.ts
index 1ca5bb6..1b73b4e 100644
--- a/src/__fk-inputs__/inputs/input-password.ts
+++ b/src/__fk-inputs__/inputs/p-input-password.ts
@@ -12,11 +12,9 @@ const input = createSection('input', () => ({
props: {
invalid: '$state.invalid',
disabled: '$disabled',
- // name: '$node.name',
- // inputProps: {}
+ modelValue: '$_value',
onInput: '$handlers.DOMInput',
onBlur: '$handlers.blur',
- modelValue: '$_value',
inputId: '$id',
fluid: true,
},
diff --git a/src/__fk-inputs__/inputs/input-text.ts b/src/__fk-inputs__/inputs/p-input-text.ts
similarity index 100%
rename from src/__fk-inputs__/inputs/input-text.ts
rename to src/__fk-inputs__/inputs/p-input-text.ts
index 62c656e..7b9e696 100644
--- a/src/__fk-inputs__/inputs/input-text.ts
+++ b/src/__fk-inputs__/inputs/p-input-text.ts
@@ -14,9 +14,9 @@ const input = createSection('input', () => ({
type: '$type',
disabled: '$disabled',
name: '$node.name',
+ modelValue: '$_value',
onInput: '$handlers.DOMInput',
onBlur: '$handlers.blur',
- modelValue: '$_value',
id: '$id',
fluid: true,
},
diff --git a/src/__fk-inputs__/inputs/p-select.ts b/src/__fk-inputs__/inputs/p-select.ts
new file mode 100644
index 0000000..eda5f1d
--- /dev/null
+++ b/src/__fk-inputs__/inputs/p-select.ts
@@ -0,0 +1,45 @@
+import type { FormKitTypeDefinition } from '@formkit/core';
+import type { FormKitInputs } from '@formkit/inputs';
+import { createSection, label, outer } from '@formkit/inputs';
+import SchemaComponent from 'primevue/select';
+import { markRaw } from 'vue';
+import { floatLabel } from '../sections/floatLabel';
+import { messages } from '../sections/messages';
+
+const input = createSection('input', () => ({
+ $cmp: markRaw(SchemaComponent) as never,
+ bind: '$attrs',
+ props: {
+ invalid: '$state.invalid',
+ disabled: '$disabled',
+ modelValue: '$_value',
+ // onValueChange: '$handlers.DOMInput',
+ onBlur: '$handlers.blur',
+ id: '$id',
+ fluid: true,
+ options: '$options',
+ },
+}));
+
+export const PSelect: FormKitTypeDefinition = {
+ type: 'input',
+ schema: outer(
+ floatLabel(
+ input(), //
+ label('$label'),
+ ),
+ messages(),
+ ),
+ props: ['options'],
+ // schemaMemoKey: 'nnvujvlf2xr', // Math.random().toString(36).substring(2, 15)
+};
+
+declare module '@formkit/inputs' {
+ // https://formkit.com/essentials/custom-inputs#typescript-support
+ interface FormKitInputProps
> {
+ PSelect: {
+ type: 'PSelect';
+ options: Array;
+ };
+ }
+}
diff --git a/src/all-custom/all-custom.vue b/src/all-custom/all-custom.vue
index 548edae..2c9af68 100644
--- a/src/all-custom/all-custom.vue
+++ b/src/all-custom/all-custom.vue
@@ -1,6 +1,6 @@