diff --git a/.env b/.env index b2545d2..a7e00ae 100644 --- a/.env +++ b/.env @@ -1 +1,2 @@ -VITE_DEBUG_FORMKIT=true \ No newline at end of file +VITE_DEBUG_FORMKIT=true +# https://formkit.com/pro diff --git a/formkit.config.ts b/formkit.config.ts index 2d2b570..b43a3c9 100644 --- a/formkit.config.ts +++ b/formkit.config.ts @@ -14,9 +14,10 @@ import type { App } from 'vue'; import { addAsteriskPlugin } from './formkit.config.plugin.addAsteriskPlugin'; import { debugPlugin } from './formkit.config.plugin.debug'; import { PSelect } from '@/__fk-inputs__/inputs/p-select'; +import { createProPlugin, dropdown } from '@formkit/pro'; +import { rootClasses } from './formkit.config.theme'; const plugins: FormKitPlugin[] = [ - // createProPlugin(apiKey, { toggle }), // createLibraryPlugin(fkLibrary), createLibraryPlugin({ text, @@ -60,16 +61,17 @@ const plugins: FormKitPlugin[] = [ }, ), ]; -if (import.meta.env.VITE_DEBUG_FORMKIT === 'true') { - plugins.push(debugPlugin); -} -// const apiKey = 'fk-6cdd5192223' +if (import.meta.env.VITE_FORMKIT_PRO_KEY) + plugins.unshift(createProPlugin(import.meta.env.VITE_FORMKIT_PRO_KEY, { dropdown })); + +if (import.meta.env.VITE_DEBUG_FORMKIT === 'true') plugins.push(debugPlugin); + const config: FormKitOptions = { plugins, config: { // rootClasses: false, - // rootClasses, + rootClasses, // rootClasses: (sectionName: string, node: FormKitNode) => { // console.debug(`sectionName :>> `, sectionName); // } diff --git a/index.html b/index.html index 39efa31..3211b6d 100644 --- a/index.html +++ b/index.html @@ -33,6 +33,8 @@