diff --git a/formkit.config.ts b/formkit.config.ts index 744acfe..f9cfe62 100644 --- a/formkit.config.ts +++ b/formkit.config.ts @@ -15,6 +15,7 @@ import type { App } from 'vue'; import { addAsteriskPlugin } from './formkit.config.plugin.addAsteriskPlugin'; import { debugPlugin } from './formkit.config.plugin.debug'; import { PDatePicker } from '@/__fk-inputs__/inputs/p-date-picker'; +import { PCascadeSelect } from '@/__fk-inputs__/inputs/p-cascade-select'; const plugins: FormKitPlugin[] = [ // createLibraryPlugin(fkLibrary), @@ -28,6 +29,7 @@ const plugins: FormKitPlugin[] = [ PInputPassword, PSelect, PDatePicker, + PCascadeSelect, }), // createLibraryPlugin( // { diff --git a/package.json b/package.json index c0a7d44..c3c2de1 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "primevue": "^4.2.5", "sweetalert2": "^11.15.3", "tailwindcss": "^3.4.17", + "utils4u": "^2.19.2", "vue": "^3.5.13", "zod-i18n-map": "^2.27.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c55a435..b3dd17c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -65,6 +65,9 @@ importers: tailwindcss: specifier: ^3.4.17 version: 3.4.17 + utils4u: + specifier: ^2.19.2 + version: 2.19.2 vue: specifier: ^3.5.13 version: 3.5.13(typescript@5.7.2) @@ -1296,8 +1299,8 @@ packages: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} - fastq@1.17.1: - resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + fastq@1.18.0: + resolution: {integrity: sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==} fdir@6.4.2: resolution: {integrity: sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==} @@ -1800,6 +1803,9 @@ packages: util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + utils4u@2.19.2: + resolution: {integrity: sha512-QjnPId4oadpieslF4SxxXHOxGJKG5xFlY/GqJS4a/1tUUDlC3AoMWksmXaX4FWO9AVANn5qgy5tLuYgS+VndRw==} + vite@6.0.5: resolution: {integrity: sha512-akD5IAH/ID5imgue2DYhzsEwCi0/4VKY31uhMLEYJwPP4TiUp8pL5PIK+Wo7H8qT8JY9i+pVfPydcFPYD1EL7g==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} @@ -2448,7 +2454,7 @@ snapshots: '@nodelib/fs.walk@1.2.8': dependencies: '@nodelib/fs.scandir': 2.1.5 - fastq: 1.17.1 + fastq: 1.18.0 '@pkgjs/parseargs@0.11.0': optional: true @@ -3078,7 +3084,7 @@ snapshots: merge2: 1.4.1 micromatch: 4.0.8 - fastq@1.17.1: + fastq@1.18.0: dependencies: reusify: 1.0.4 @@ -3591,6 +3597,8 @@ snapshots: util-deprecate@1.0.2: {} + utils4u@2.19.2: {} + vite@6.0.5(jiti@2.4.2)(tsx@4.19.2)(yaml@2.6.1): dependencies: esbuild: 0.24.0 diff --git a/src/App.vue b/src/App.vue index 1805b93..df30207 100644 --- a/src/App.vue +++ b/src/App.vue @@ -4,13 +4,81 @@ import AllCustom from './all-custom/all-custom.vue'; import TutorialForm from './tutorial-form/index.vue'; import ZodForm from './zod-form/index.vue'; -const datetime12h = ref(); -const datetime24h = ref(); -const time = ref(); -const date = ref(); -const dates = ref(); - - +const selectedCity = ref(); +const countries = ref([ + { + name: 'Australia', + code: 'AU', + states: [ + { + name: 'New South Wales', + cities: [ + { cname: 'Sydney', code: 'A-SY' }, + { cname: 'Newcastle', code: 'A-NE' }, + { cname: 'Wollongong', code: 'A-WO' } + ] + }, + { + name: 'Queensland', + cities: [ + { cname: 'Brisbane', code: 'A-BR' }, + { cname: 'Townsville', code: 'A-TO' } + ] + } + ] + }, + { + name: 'Canada', + code: 'CA', + states: [ + { + name: 'Quebec', + cities: [ + { cname: 'Montreal', code: 'C-MO' }, + { cname: 'Quebec City', code: 'C-QU' } + ] + }, + { + name: 'Ontario', + cities: [ + { cname: 'Ottawa', code: 'C-OT' }, + { cname: 'Toronto', code: 'C-TO' } + ] + } + ] + }, + { + name: 'United States', + code: 'US', + states: [ + { + name: 'California', + cities: [ + { cname: 'Los Angeles', code: 'US-LA' }, + { cname: 'San Diego', code: 'US-SD' }, + { cname: 'San Francisco', code: 'US-SF' } + ] + }, + { + name: 'Florida', + cities: [ + { cname: 'Jacksonville', code: 'US-JA' }, + { cname: 'Miami', code: 'US-MI' }, + { cname: 'Tampa', code: 'US-TA' }, + { cname: 'Orlando', code: 'US-OR' } + ] + }, + { + name: 'Texas', + cities: [ + { cname: 'Austin', code: 'US-AU' }, + { cname: 'Dallas', code: 'US-DA' }, + { cname: 'Houston', code: 'US-HO' } + ] + } + ] + } +]);