@frontfriend/tailwind 4.0.18 → 4.0.19

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.
Files changed (38) hide show
  1. package/dist/browser.mjs +1 -1
  2. package/dist/browser.mjs.map +3 -3
  3. package/dist/cli.js +33 -32
  4. package/dist/component-recipes.d.ts +14 -0
  5. package/dist/components-config-schema.js +1 -1
  6. package/dist/components-config-schema.js.map +3 -3
  7. package/dist/ffdc.d.ts +11 -1
  8. package/dist/ffdc.js +1 -1
  9. package/dist/ffdc.js.map +4 -4
  10. package/dist/index.js +3 -3
  11. package/dist/index.js.map +4 -4
  12. package/dist/index.mjs +1 -1
  13. package/dist/index.mjs.map +3 -3
  14. package/dist/lib/core/cache-manager.js +4 -3
  15. package/dist/lib/core/cached-components-config.js +2 -0
  16. package/dist/lib/core/cached-components-config.js.map +7 -0
  17. package/dist/lib/core/component-recipes.js +8 -0
  18. package/dist/lib/core/component-recipes.js.map +7 -0
  19. package/dist/lib/core/components-config-schema.js +1 -1
  20. package/dist/lib/core/components-config-schema.js.map +3 -3
  21. package/dist/next.js +1 -1
  22. package/dist/next.js.map +4 -4
  23. package/dist/runtime.js +1 -1
  24. package/dist/runtime.js.map +3 -3
  25. package/dist/types/index.d.ts +15 -1
  26. package/dist/vite.js +6 -19
  27. package/dist/vite.js.map +4 -4
  28. package/dist/vite.mjs +4 -4
  29. package/dist/vite.mjs.map +3 -3
  30. package/package.json +7 -1
  31. package/scripts/build.js +32 -9
  32. package/src/theme.css +3 -9
  33. package/dist/lib/core/default-config-data.js +0 -2
  34. package/dist/lib/core/default-config-data.js.map +0 -7
  35. package/dist/lib/core/default-config.js +0 -2
  36. package/dist/lib/core/default-config.js.map +0 -7
  37. package/scripts/master-components-config.json +0 -1678
  38. package/scripts/update-default-config-data.js +0 -891
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../index.mjs"],
4
- "sourcesContent": ["// ES Module wrapper for frontfriend-tailwind\n// This file provides ES module exports for both Node.js and browser environments\n\nimport { createRequire } from 'module';\n\nconst require = createRequire(import.meta.url);\nconst { componentsConfigSchema, isCSSClassString } = require('./lib/core/components-config-schema.js');\n\n// Determine environment\nconst isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';\nconst isNode = typeof process !== 'undefined' && process.versions && process.versions.node;\n\n// Lazy-loaded CJS module reference\nlet cjsModule = null;\n\n// Create plugin function that loads CJS module on demand\n// Uses synchronous require() which is safe because:\n// 1. Only runs in Node.js (build-time, not browser)\n// 2. Node.js is single-threaded - no race conditions\n// 3. Tailwind config evaluation happens synchronously during build\nconst plugin = isNode\n ? function(...args) {\n if (!cjsModule) {\n try {\n // Use dynamic require - only available in Node.js\n const module = require('module');\n const req = module.createRequire(import.meta.url);\n cjsModule = req('./index.js');\n } catch (error) {\n console.error('[FrontFriend] Failed to load plugin:', error);\n return {};\n }\n }\n return typeof cjsModule === 'function' ? cjsModule(...args) : cjsModule;\n }\n : function() {\n // Browser: Use stub function\n if (isBrowser) {\n console.warn('[FrontFriend] The Tailwind plugin cannot be used directly in browser environments');\n }\n return {};\n };\n\n/**\n * Creates a deep proxy that gracefully handles arbitrary nested property access\n * without throwing errors. This is essential for SSR and build-time scenarios\n * where configuration might not be loaded yet.\n *\n * Features:\n * - Infinite depth access: config.a.b.c.d.e never crashes\n * - Referential equality: config.a === config.a (memoized)\n * - Iteration support: Object.keys(), spread operator, for...in\n * - Type coercion: Works with toString, valueOf, Symbol.toPrimitive\n * - 'in' operator: 'property' in config returns true\n *\n * @returns {Proxy} A proxy object that handles any property access safely\n *\n * @example\n * const config = createDeepProxy();\n * const value = config.sidebar.root.wrapper.base; // Never crashes\n * config.a === config.a; // true (referential equality)\n * 'anything' in config; // true\n * Object.keys(config); // []\n */\nfunction createDeepProxy() {\n // Cache for memoization - ensures referential equality\n // This is critical for React dependency arrays and equality checks\n const cache = new Map();\n\n const handler = {\n /**\n * Handles property access with memoization\n * Ensures config.a === config.a for referential equality\n */\n get(target, prop) {\n // Handle special cases for type coercion and inspection\n if (prop === Symbol.toPrimitive || prop === 'valueOf') {\n return () => '';\n }\n if (prop === 'toString' || prop === Symbol.toStringTag) {\n return () => '';\n }\n if (prop === 'constructor') {\n return Object;\n }\n\n // Return cached proxy for same property to maintain referential equality\n // This prevents issues with React hooks and memoization\n if (!cache.has(prop)) {\n cache.set(prop, createDeepProxy());\n }\n return cache.get(prop);\n },\n\n /**\n * Handles 'in' operator\n * Makes 'property' in config return true for any property\n */\n has(target, prop) {\n // Return true for all properties except internal symbols\n if (typeof prop === 'symbol' && prop.toString().includes('nodejs.util.inspect')) {\n return false;\n }\n return true;\n },\n\n /**\n * Handles Object.keys(), Object.getOwnPropertyNames(), for...in\n * Returns empty array since proxy represents missing/unknown config\n */\n ownKeys(target) {\n return [];\n },\n\n /**\n * Handles Object.getOwnPropertyDescriptor()\n * Required for proper iteration support with ownKeys\n */\n getOwnPropertyDescriptor(target, prop) {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n };\n\n return new Proxy({}, handler);\n}\n\n/**\n * FrontFriend Design Config (ffdc) - Safe config wrapper with SSR support\n *\n * Wraps configuration objects to prevent crashes during SSR or when config\n * is not yet loaded. Returns actual config if valid, or a deep proxy fallback.\n *\n * This is the recommended way to access config in components to ensure\n * they work during both build-time (SSR) and runtime.\n *\n * @param {Object|null|undefined} config - The configuration object to wrap\n * @returns {Object|Proxy} The config object or a safe deep proxy\n *\n * @example\n * import { config, ffdc } from '@frontfriend/tailwind';\n *\n * // Safe access during SSR - never crashes\n * const sidebarConfig = ffdc(config || {}).sidebar;\n * const className = sidebarConfig.root.wrapper.base; // Always safe\n *\n * @example\n * // In a React component\n * function Sidebar() {\n * const cfg = ffdc(config).sidebar;\n * return <div className={cfg.root.base}>...</div>;\n * }\n */\nexport function ffdc(config) {\n // During SSR or initial load, config might not be available yet\n // Return a deep proxy that handles any property access without crashing\n if (!config || typeof config !== 'object') {\n return createDeepProxy();\n }\n\n return config;\n}\n\n// Export config and iconSet with lazy getters\n// In Node.js, load CJS module on first access\n// In browser, use proxies with global variable fallbacks\nexport const config = new Proxy({}, {\n // Cache for the loaded CJS module config\n _cjsConfig: null,\n // Cache for memoized deep proxies\n _proxyCache: new Map(),\n\n get(target, prop) {\n // Handle special cases for console.log, JSON.stringify, etc.\n if (prop === Symbol.toPrimitive || prop === 'valueOf') {\n return () => '';\n }\n if (prop === 'toString' || prop === Symbol.toStringTag) {\n return () => '[object Object]';\n }\n if (prop === 'constructor') {\n return Object;\n }\n\n // In Node.js, try to get config from CJS module first\n if (isNode && !this._cjsConfig && cjsModule) {\n this._cjsConfig = cjsModule.config;\n }\n\n if (isNode && this._cjsConfig && prop in this._cjsConfig) {\n return this._cjsConfig[prop];\n }\n\n // Try to get config from globals\n let _config = null;\n if (typeof __FF_CONFIG__ !== 'undefined') {\n _config = __FF_CONFIG__;\n } else if (typeof process !== 'undefined' && process.env) {\n if (process.env.NEXT_PUBLIC_FF_CONFIG) {\n try {\n _config = JSON.parse(process.env.NEXT_PUBLIC_FF_CONFIG);\n } catch (e) {\n console.warn('[FrontFriend] Failed to parse NEXT_PUBLIC_FF_CONFIG');\n }\n } else if (process.env.__FF_CONFIG__) {\n try {\n _config = JSON.parse(process.env.__FF_CONFIG__);\n } catch (e) {\n console.warn('[FrontFriend] Failed to parse __FF_CONFIG__');\n }\n }\n } else if (isBrowser && window.__FF_CONFIG__) {\n _config = window.__FF_CONFIG__;\n }\n\n // Return actual config value if it exists\n if (_config && prop in _config) {\n return _config[prop];\n }\n\n // Return memoized deep proxy for missing properties\n if (!this._proxyCache.has(prop)) {\n this._proxyCache.set(prop, createDeepProxy());\n }\n return this._proxyCache.get(prop);\n },\n\n has(target, prop) {\n return true;\n },\n\n ownKeys(target) {\n return [];\n },\n\n getOwnPropertyDescriptor(target, prop) {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n });\n\nexport const iconSet = new Proxy({}, {\n // Cache for the loaded CJS module iconSet\n _cjsIconSet: null,\n\n get(target, prop) {\n if (prop === Symbol.toPrimitive || prop === 'valueOf') {\n return () => '';\n }\n if (prop === 'toString' || prop === Symbol.toStringTag) {\n return () => '[object Object]';\n }\n if (prop === 'constructor') {\n return Object;\n }\n\n // In Node.js, try to get iconSet from CJS module first\n if (isNode && !this._cjsIconSet && cjsModule) {\n this._cjsIconSet = cjsModule.iconSet;\n }\n\n if (isNode && this._cjsIconSet && prop in this._cjsIconSet) {\n return this._cjsIconSet[prop];\n }\n\n // Try to get icons from globals\n let _iconSet = null;\n if (typeof __FF_ICONS__ !== 'undefined') {\n _iconSet = __FF_ICONS__;\n } else if (typeof process !== 'undefined' && process.env) {\n if (process.env.NEXT_PUBLIC_FF_ICONS) {\n try {\n _iconSet = JSON.parse(process.env.NEXT_PUBLIC_FF_ICONS);\n } catch (e) {\n console.warn('[FrontFriend] Failed to parse NEXT_PUBLIC_FF_ICONS');\n }\n } else if (process.env.__FF_ICONS__) {\n try {\n _iconSet = JSON.parse(process.env.__FF_ICONS__);\n } catch (e) {\n console.warn('[FrontFriend] Failed to parse __FF_ICONS__');\n }\n }\n } else if (isBrowser && window.__FF_ICONS__) {\n _iconSet = window.__FF_ICONS__;\n }\n\n if (_iconSet && prop in _iconSet) {\n return _iconSet[prop];\n }\n\n return null;\n },\n\n has(target, prop) {\n return false;\n },\n\n ownKeys(target) {\n return [];\n },\n\n getOwnPropertyDescriptor(target, prop) {\n return undefined;\n },\n });\n\nexport { componentsConfigSchema, isCSSClassString };\n\n// Default export is the plugin\nexport default plugin;\n"],
5
- "mappings": "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",
6
- "names": ["createRequire", "require", "componentsConfigSchema", "isCSSClassString", "isBrowser", "isNode", "cjsModule", "plugin", "args", "error", "createDeepProxy", "cache", "handler", "target", "prop", "ffdc", "config", "_config", "iconSet", "_iconSet", "frontfriend_tailwind_default", "plugin"]
4
+ "sourcesContent": ["// ES Module wrapper for frontfriend-tailwind\n// This file provides ES module exports for both Node.js and browser environments\n\nimport { createRequire } from 'module';\n\nconst require = createRequire(import.meta.url);\nconst { componentsConfigSchema, isCSSClassString } = require('./lib/core/components-config-schema.js');\n\n// Determine environment\nconst isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';\nconst isNode = typeof process !== 'undefined' && process.versions && process.versions.node;\n\n// Lazy-loaded CJS module reference\nlet cjsModule = null;\n\n// Create plugin function that loads CJS module on demand\n// Uses synchronous require() which is safe because:\n// 1. Only runs in Node.js (build-time, not browser)\n// 2. Node.js is single-threaded - no race conditions\n// 3. Tailwind config evaluation happens synchronously during build\nconst plugin = isNode\n ? function(...args) {\n if (!cjsModule) {\n try {\n // Use dynamic require - only available in Node.js\n const module = require('module');\n const req = module.createRequire(import.meta.url);\n cjsModule = req('./index.js');\n } catch (error) {\n console.error('[FrontFriend] Failed to load plugin:', error);\n return {};\n }\n }\n return typeof cjsModule === 'function' ? cjsModule(...args) : cjsModule;\n }\n : function() {\n // Browser: Use stub function\n if (isBrowser) {\n console.warn('[FrontFriend] The Tailwind plugin cannot be used directly in browser environments');\n }\n return {};\n };\n\n/**\n * Creates a deep proxy that gracefully handles arbitrary nested property access\n * without throwing errors. This is essential for SSR and build-time scenarios\n * where configuration might not be loaded yet.\n *\n * Features:\n * - Infinite depth access: config.a.b.c.d.e never crashes\n * - Referential equality: config.a === config.a (memoized)\n * - Iteration support: Object.keys(), spread operator, for...in\n * - Type coercion: Works with toString, valueOf, Symbol.toPrimitive\n * - 'in' operator: 'property' in config returns true\n *\n * @returns {Proxy} A proxy object that handles any property access safely\n *\n * @example\n * const config = createDeepProxy();\n * const value = config.sidebar.root.wrapper.base; // Never crashes\n * config.a === config.a; // true (referential equality)\n * 'anything' in config; // true\n * Object.keys(config); // []\n */\nfunction createDeepProxy() {\n // Cache for memoization - ensures referential equality\n // This is critical for React dependency arrays and equality checks\n const cache = new Map();\n\n const handler = {\n /**\n * Handles property access with memoization\n * Ensures config.a === config.a for referential equality\n */\n get(target, prop) {\n // Handle special cases for type coercion and inspection\n if (prop === Symbol.toPrimitive || prop === 'valueOf') {\n return () => '';\n }\n if (prop === 'toString' || prop === Symbol.toStringTag) {\n return () => '';\n }\n if (prop === 'constructor') {\n return Object;\n }\n\n // Return cached proxy for same property to maintain referential equality\n // This prevents issues with React hooks and memoization\n if (!cache.has(prop)) {\n cache.set(prop, createDeepProxy());\n }\n return cache.get(prop);\n },\n\n /**\n * Handles 'in' operator\n * Makes 'property' in config return true for any property\n */\n has(target, prop) {\n // Return true for all properties except internal symbols\n if (typeof prop === 'symbol' && prop.toString().includes('nodejs.util.inspect')) {\n return false;\n }\n return true;\n },\n\n /**\n * Handles Object.keys(), Object.getOwnPropertyNames(), for...in\n * Returns empty array since proxy represents missing/unknown config\n */\n ownKeys(target) {\n return [];\n },\n\n /**\n * Handles Object.getOwnPropertyDescriptor()\n * Required for proper iteration support with ownKeys\n */\n getOwnPropertyDescriptor(target, prop) {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n };\n\n return new Proxy({}, handler);\n}\n\nfunction isPlainObject(value) {\n return value !== null && typeof value === 'object' && !Array.isArray(value);\n}\n\nfunction mergeConfigTrees(left, right) {\n if (!isPlainObject(left) || !isPlainObject(right)) {\n return right === undefined ? left : right;\n }\n const result = { ...left };\n for (const [key, value] of Object.entries(right)) {\n result[key] = key in result ? mergeConfigTrees(result[key], value) : value;\n }\n return result;\n}\n\nfunction findTreeConflicts(left, right, path = [], conflicts = []) {\n if (left === undefined || right === undefined) return conflicts;\n if (!isPlainObject(left) || !isPlainObject(right)) {\n conflicts.push(path.join('.'));\n return conflicts;\n }\n for (const key of Object.keys(left)) {\n if (key in right) findTreeConflicts(left[key], right[key], [...path, key], conflicts);\n }\n return conflicts;\n}\n\nfunction normalizeV4Component(envelope, path = []) {\n if (!isPlainObject(envelope) || !('styles' in envelope || 'behavior' in envelope)) {\n return envelope;\n }\n const conflicts = findTreeConflicts(envelope.styles, envelope.behavior, path);\n if (conflicts.length > 0) {\n throw new Error(`Component config styles/behavior conflict at ${conflicts.join(', ')}`);\n }\n return mergeConfigTrees(envelope.styles || {}, envelope.behavior || {});\n}\n\nfunction normalizeV4Config(config) {\n let changed = false;\n const result = {};\n for (const [name, envelope] of Object.entries(config)) {\n result[name] = normalizeV4Component(envelope, [name]);\n if (result[name] !== envelope) changed = true;\n }\n return changed ? result : config;\n}\n\n/**\n * FrontFriend Design Config (ffdc) - Safe config wrapper with SSR support\n *\n * Wraps configuration objects to prevent crashes during SSR or when config\n * is not yet loaded. Returns actual config if valid, or a deep proxy fallback.\n *\n * This is the recommended way to access config in components to ensure\n * they work during both build-time (SSR) and runtime.\n *\n * @param {Object|null|undefined} config - The configuration object to wrap\n * @returns {Object|Proxy} The config object or a safe deep proxy\n *\n * @example\n * import { config, ffdc } from '@frontfriend/tailwind';\n *\n * // Safe access during SSR - never crashes\n * const sidebarConfig = ffdc(config || {}).sidebar;\n * const className = sidebarConfig.root.wrapper.base; // Always safe\n *\n * @example\n * // In a React component\n * function Sidebar() {\n * const cfg = ffdc(config).sidebar;\n * return <div className={cfg.root.base}>...</div>;\n * }\n */\nexport function ffdc(config) {\n // During SSR or initial load, config might not be available yet\n // Return a deep proxy that handles any property access without crashing\n if (!config || typeof config !== 'object') {\n return createDeepProxy();\n }\n\n return normalizeV4Config(config);\n}\n\n// Export config and iconSet with lazy getters\n// In Node.js, load CJS module on first access\n// In browser, use proxies with global variable fallbacks\nexport const config = new Proxy({}, {\n // Cache for the loaded CJS module config\n _cjsConfig: null,\n // Cache for memoized deep proxies\n _proxyCache: new Map(),\n\n get(target, prop) {\n // Handle special cases for console.log, JSON.stringify, etc.\n if (prop === Symbol.toPrimitive || prop === 'valueOf') {\n return () => '';\n }\n if (prop === 'toString' || prop === Symbol.toStringTag) {\n return () => '[object Object]';\n }\n if (prop === 'constructor') {\n return Object;\n }\n\n // In Node.js, try to get config from CJS module first\n if (isNode && !this._cjsConfig && cjsModule) {\n this._cjsConfig = cjsModule.config;\n }\n\n if (isNode && this._cjsConfig && prop in this._cjsConfig) {\n return this._cjsConfig[prop];\n }\n\n // Try to get config from globals\n let _config = null;\n if (typeof __FF_CONFIG__ !== 'undefined') {\n _config = __FF_CONFIG__;\n } else if (typeof process !== 'undefined' && process.env) {\n if (process.env.NEXT_PUBLIC_FF_CONFIG) {\n try {\n _config = JSON.parse(process.env.NEXT_PUBLIC_FF_CONFIG);\n } catch (e) {\n console.warn('[FrontFriend] Failed to parse NEXT_PUBLIC_FF_CONFIG');\n }\n } else if (process.env.__FF_CONFIG__) {\n try {\n _config = JSON.parse(process.env.__FF_CONFIG__);\n } catch (e) {\n console.warn('[FrontFriend] Failed to parse __FF_CONFIG__');\n }\n }\n } else if (isBrowser && window.__FF_CONFIG__) {\n _config = window.__FF_CONFIG__;\n }\n\n // Return actual config value if it exists\n if (_config && prop in _config) {\n return normalizeV4Component(_config[prop], [String(prop)]);\n }\n\n // Return memoized deep proxy for missing properties\n if (!this._proxyCache.has(prop)) {\n this._proxyCache.set(prop, createDeepProxy());\n }\n return this._proxyCache.get(prop);\n },\n\n has(target, prop) {\n return true;\n },\n\n ownKeys(target) {\n return [];\n },\n\n getOwnPropertyDescriptor(target, prop) {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n });\n\nexport const iconSet = new Proxy({}, {\n // Cache for the loaded CJS module iconSet\n _cjsIconSet: null,\n\n get(target, prop) {\n if (prop === Symbol.toPrimitive || prop === 'valueOf') {\n return () => '';\n }\n if (prop === 'toString' || prop === Symbol.toStringTag) {\n return () => '[object Object]';\n }\n if (prop === 'constructor') {\n return Object;\n }\n\n // In Node.js, try to get iconSet from CJS module first\n if (isNode && !this._cjsIconSet && cjsModule) {\n this._cjsIconSet = cjsModule.iconSet;\n }\n\n if (isNode && this._cjsIconSet && prop in this._cjsIconSet) {\n return this._cjsIconSet[prop];\n }\n\n // Try to get icons from globals\n let _iconSet = null;\n if (typeof __FF_ICONS__ !== 'undefined') {\n _iconSet = __FF_ICONS__;\n } else if (typeof process !== 'undefined' && process.env) {\n if (process.env.NEXT_PUBLIC_FF_ICONS) {\n try {\n _iconSet = JSON.parse(process.env.NEXT_PUBLIC_FF_ICONS);\n } catch (e) {\n console.warn('[FrontFriend] Failed to parse NEXT_PUBLIC_FF_ICONS');\n }\n } else if (process.env.__FF_ICONS__) {\n try {\n _iconSet = JSON.parse(process.env.__FF_ICONS__);\n } catch (e) {\n console.warn('[FrontFriend] Failed to parse __FF_ICONS__');\n }\n }\n } else if (isBrowser && window.__FF_ICONS__) {\n _iconSet = window.__FF_ICONS__;\n }\n\n if (_iconSet && prop in _iconSet) {\n return _iconSet[prop];\n }\n\n return null;\n },\n\n has(target, prop) {\n return false;\n },\n\n ownKeys(target) {\n return [];\n },\n\n getOwnPropertyDescriptor(target, prop) {\n return undefined;\n },\n });\n\nexport { componentsConfigSchema, isCSSClassString };\n\n// Default export is the plugin\nexport default plugin;\n"],
5
+ "mappings": "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",
6
+ "names": ["createRequire", "require", "componentsConfigSchema", "isCSSClassString", "isBrowser", "isNode", "cjsModule", "plugin", "args", "error", "createDeepProxy", "cache", "handler", "target", "prop", "isPlainObject", "value", "mergeConfigTrees", "left", "right", "result", "key", "findTreeConflicts", "path", "conflicts", "normalizeV4Component", "envelope", "normalizeV4Config", "config", "changed", "name", "ffdc", "_config", "iconSet", "_iconSet", "frontfriend_tailwind_default", "plugin"]
7
7
  }
@@ -145,14 +145,13 @@ class CacheManager {
145
145
  // Create cache directory
146
146
  ensureDirectoryExists(this.cacheDir);
147
147
 
148
- // Save metadata first
148
+ // Metadata is the cache commit marker. Write it last so an interrupted
149
+ // refresh is never advertised as a complete, current cache.
149
150
  const metadata = {
150
151
  timestamp: new Date().toISOString(),
151
152
  version: data.metadata?.version || '2.0.0',
152
153
  ffId: data.metadata?.ffId
153
154
  };
154
- writeJsonFile(this.metadataFile, metadata);
155
-
156
155
  // Save .js files
157
156
  const jsFiles = [
158
157
  'tokens',
@@ -200,6 +199,8 @@ class CacheManager {
200
199
  if (data.classesContent !== undefined) {
201
200
  writeTextFile(path.join(this.cacheDir, 'classes.css'), data.classesContent);
202
201
  }
202
+
203
+ writeJsonFile(this.metadataFile, metadata);
203
204
  } catch (error) {
204
205
  throw new CacheError(`Failed to save cache: ${error.message}`, 'write');
205
206
  }
@@ -0,0 +1,2 @@
1
+ var t='FrontFriend components configuration not found. Run "npx frontfriend init" or "npx frontfriend sync".',i="FrontFriend components configuration was not returned by the SaaS app. The cache was not updated.";function r(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function e(n,o=t){if(!r(n)||Object.keys(n).length===0)throw new Error(o);return n}function s(n){if(!n.exists())throw new Error(t);let o=n.load();return{componentsConfig:e(o==null?void 0:o.componentsConfig),icons:r(o.icons)?o.icons:{}}}module.exports={CACHE_ERROR_MESSAGE:t,SAAS_ERROR_MESSAGE:i,assertComponentsConfig:e,loadCachedComponents:s};
2
+ //# sourceMappingURL=cached-components-config.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../lib/core/cached-components-config.js"],
4
+ "sourcesContent": ["const CACHE_ERROR_MESSAGE =\n 'FrontFriend components configuration not found. Run \"npx frontfriend init\" or \"npx frontfriend sync\".';\nconst SAAS_ERROR_MESSAGE =\n 'FrontFriend components configuration was not returned by the SaaS app. The cache was not updated.';\n\nfunction isPlainObject(value) {\n return value !== null && typeof value === 'object' && !Array.isArray(value);\n}\n\nfunction assertComponentsConfig(componentsConfig, message = CACHE_ERROR_MESSAGE) {\n if (!isPlainObject(componentsConfig) || Object.keys(componentsConfig).length === 0) {\n throw new Error(message);\n }\n\n return componentsConfig;\n}\n\nfunction loadCachedComponents(cacheManager) {\n if (!cacheManager.exists()) throw new Error(CACHE_ERROR_MESSAGE);\n\n const cache = cacheManager.load();\n const componentsConfig = assertComponentsConfig(cache?.componentsConfig);\n\n return {\n componentsConfig,\n icons: isPlainObject(cache.icons) ? cache.icons : {},\n };\n}\n\nmodule.exports = {\n CACHE_ERROR_MESSAGE,\n SAAS_ERROR_MESSAGE,\n assertComponentsConfig,\n loadCachedComponents,\n};\n"],
5
+ "mappings": "AAAA,IAAMA,EACJ,wGACIC,EACJ,oGAEF,SAASC,EAAcC,EAAO,CAC5B,OAAOA,IAAU,MAAQ,OAAOA,GAAU,UAAY,CAAC,MAAM,QAAQA,CAAK,CAC5E,CAEA,SAASC,EAAuBC,EAAkBC,EAAUN,EAAqB,CAC/E,GAAI,CAACE,EAAcG,CAAgB,GAAK,OAAO,KAAKA,CAAgB,EAAE,SAAW,EAC/E,MAAM,IAAI,MAAMC,CAAO,EAGzB,OAAOD,CACT,CAEA,SAASE,EAAqBC,EAAc,CAC1C,GAAI,CAACA,EAAa,OAAO,EAAG,MAAM,IAAI,MAAMR,CAAmB,EAE/D,IAAMS,EAAQD,EAAa,KAAK,EAGhC,MAAO,CACL,iBAHuBJ,EAAuBK,GAAA,YAAAA,EAAO,gBAAgB,EAIrE,MAAOP,EAAcO,EAAM,KAAK,EAAIA,EAAM,MAAQ,CAAC,CACrD,CACF,CAEA,OAAO,QAAU,CACf,oBAAAT,EACA,mBAAAC,EACA,uBAAAG,EACA,qBAAAG,CACF",
6
+ "names": ["CACHE_ERROR_MESSAGE", "SAAS_ERROR_MESSAGE", "isPlainObject", "value", "assertComponentsConfig", "componentsConfig", "message", "loadCachedComponents", "cacheManager", "cache"]
7
+ }
@@ -0,0 +1,8 @@
1
+ var j=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports);var h=j((k,b)=>{function u(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function p(e,n){if(!u(e)||!u(n))return n===void 0?e:n;let t={...e};for(let[r,o]of Object.entries(n))t[r]=r in t?p(t[r],o):o;return t}function l(e,n,t=[],r=[]){if(e===void 0||n===void 0)return r;if(!u(e)||!u(n))return r.push(t.join(".")),r;for(let o of Object.keys(e))o in n&&l(e[o],n[o],[...t,o],r);return r}function y(e){return u(e)&&("styles"in e||"behavior"in e)}function m(e,n="component"){if(!y(e))return e;let t=l(e.styles,e.behavior,[n]);if(t.length>0)throw new Error(`Component config styles/behavior conflict at ${t.join(", ")}`);return p(e.styles||{},e.behavior||{})}function d(e){if(!u(e))return e;let n=!1,t={};for(let[r,o]of Object.entries(e))t[r]=m(o,r),t[r]!==o&&(n=!0);return n?t:e}b.exports={deepMerge:p,findTreeConflicts:l,isV4Envelope:y,toRuntimeComponentConfig:m,toRuntimeComponentsConfig:d}});var{findTreeConflicts:C}=h();function $(e){return String(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase()}function g(e,n){let t=e.filter(r=>!["styles","slots","variants"].includes(r)&&r!=="root");return[n,...t.map($)].filter(Boolean).join("-")}function w(e){let n=[],t=[];for(let r of e.trim().split(/\s+/))/^(group|peer)(?:\/[^\s]+)?$/.test(r)?n.push(r):t.push(r);return{passthrough:n,recipe:t}}function O(e,n={}){let t=n.prefix||"ff",r={};function o(i,s){if(typeof i=="string"){let c=g(s,t),f=w(i);return r[c]=f.recipe.join(" "),[c,...f.passthrough].join(" ")}if(Array.isArray(i))return i.map((c,f)=>o(c,[...s,String(f)]));if(!i||typeof i!="object")throw new Error(`Style value at ${s.join(".")} must be a string or object`);return Object.fromEntries(Object.entries(i).map(([c,f])=>[c,o(f,[...s,c])]))}let a={};for(let[i,s]of Object.entries(e||{})){if(!s||typeof s!="object"||!("styles"in s))throw new Error(`Component ${i} must use the v4 styles/behavior envelope`);let c=C(s.styles,s.behavior,[i]);if(c.length>0)throw new Error(`Component config styles/behavior conflict at ${c.join(", ")}`);a[i]={styles:o(s.styles,[i,"styles"]),...s.behavior===void 0?{}:{behavior:s.behavior}}}return{config:a,classes:r}}function A(e,n={}){let t=n.scope||"default";if(!/^[a-zA-Z0-9_-]+$/.test(t))throw new Error("Recipe scope may only contain letters, numbers, dashes, and underscores");return`@layer base {
2
+ ${Object.entries(e).filter(([,o])=>typeof o=="string"&&o.trim()).map(([o,a])=>` :where([data-ff-recipe="${t}"]) .${o} {
3
+ @apply ${a.trim()};
4
+ }`).join(`
5
+ `)}
6
+ }
7
+ `}module.exports={createComponentRecipe:O,emitComponentRecipeCss:A};
8
+ //# sourceMappingURL=component-recipes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../lib/core/components-config-v4.js", "../../../lib/core/component-recipes.js"],
4
+ "sourcesContent": ["function isPlainObject(value) {\n return value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction deepMerge(left, right) {\n if (!isPlainObject(left) || !isPlainObject(right))\n return right === undefined ? left : right;\n\n const result = { ...left };\n for (const [key, value] of Object.entries(right)) {\n result[key] = key in result ? deepMerge(result[key], value) : value;\n }\n return result;\n}\n\nfunction findTreeConflicts(left, right, path = [], conflicts = []) {\n if (left === undefined || right === undefined) return conflicts;\n if (!isPlainObject(left) || !isPlainObject(right)) {\n conflicts.push(path.join('.'));\n return conflicts;\n }\n\n for (const key of Object.keys(left)) {\n if (key in right) {\n findTreeConflicts(left[key], right[key], [...path, key], conflicts);\n }\n }\n return conflicts;\n}\n\nfunction isV4Envelope(value) {\n return isPlainObject(value) && (\"styles\" in value || \"behavior\" in value);\n}\n\nfunction toRuntimeComponentConfig(envelope, component = 'component') {\n if (!isV4Envelope(envelope)) return envelope;\n const conflicts = findTreeConflicts(envelope.styles, envelope.behavior, [component]);\n if (conflicts.length > 0) {\n throw new Error(`Component config styles/behavior conflict at ${conflicts.join(', ')}`);\n }\n return deepMerge(envelope.styles || {}, envelope.behavior || {});\n}\n\nfunction toRuntimeComponentsConfig(config) {\n if (!isPlainObject(config)) return config;\n\n let changed = false;\n const result = {};\n for (const [name, envelope] of Object.entries(config)) {\n result[name] = toRuntimeComponentConfig(envelope, name);\n if (result[name] !== envelope) changed = true;\n }\n return changed ? result : config;\n}\n\nmodule.exports = {\n deepMerge,\n findTreeConflicts,\n isV4Envelope,\n toRuntimeComponentConfig,\n toRuntimeComponentsConfig,\n};\n", "const { findTreeConflicts } = require(\"./components-config-v4\");\n\nfunction toMarkerPart(value) {\n return String(value)\n .replace(/([a-z0-9])([A-Z])/g, \"$1-$2\")\n .replace(/[^a-zA-Z0-9]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\")\n .toLowerCase();\n}\n\nfunction markerForPath(path, prefix) {\n const parts = path.filter(\n (part) =>\n ![\"styles\", \"slots\", \"variants\"].includes(part) && part !== \"root\",\n );\n return [prefix, ...parts.map(toMarkerPart)].filter(Boolean).join(\"-\");\n}\n\nfunction splitPassthroughClasses(value) {\n const passthrough = [];\n const recipe = [];\n for (const token of value.trim().split(/\\s+/)) {\n if (/^(group|peer)(?:\\/[^\\s]+)?$/.test(token)) passthrough.push(token);\n else recipe.push(token);\n }\n return { passthrough, recipe };\n}\n\nfunction createComponentRecipe(componentsConfig, options = {}) {\n const prefix = options.prefix || \"ff\";\n const classes = {};\n\n function visitStyles(value, path) {\n if (typeof value === \"string\") {\n const marker = markerForPath(path, prefix);\n const split = splitPassthroughClasses(value);\n classes[marker] = split.recipe.join(\" \");\n return [marker, ...split.passthrough].join(\" \");\n }\n\n if (Array.isArray(value)) {\n return value.map((entry, index) =>\n visitStyles(entry, [...path, String(index)]),\n );\n }\n if (!value || typeof value !== \"object\") {\n throw new Error(\n `Style value at ${path.join(\".\")} must be a string or object`,\n );\n }\n\n return Object.fromEntries(\n Object.entries(value).map(([key, child]) => [\n key,\n visitStyles(child, [...path, key]),\n ]),\n );\n }\n\n const config = {};\n for (const [component, envelope] of Object.entries(componentsConfig || {})) {\n if (!envelope || typeof envelope !== \"object\" || !(\"styles\" in envelope)) {\n throw new Error(\n `Component ${component} must use the v4 styles/behavior envelope`,\n );\n }\n const conflicts = findTreeConflicts(envelope.styles, envelope.behavior, [\n component,\n ]);\n if (conflicts.length > 0) {\n throw new Error(\n `Component config styles/behavior conflict at ${conflicts.join(\", \")}`,\n );\n }\n config[component] = {\n styles: visitStyles(envelope.styles, [component, \"styles\"]),\n ...(envelope.behavior === undefined\n ? {}\n : { behavior: envelope.behavior }),\n };\n }\n\n return {\n config,\n classes,\n };\n}\n\nfunction emitComponentRecipeCss(classes, options = {}) {\n const scope = options.scope || \"default\";\n if (!/^[a-zA-Z0-9_-]+$/.test(scope)) {\n throw new Error(\n \"Recipe scope may only contain letters, numbers, dashes, and underscores\",\n );\n }\n\n const rules = Object.entries(classes)\n .filter(([, value]) => typeof value === \"string\" && value.trim())\n .map(\n ([marker, value]) =>\n ` :where([data-ff-recipe=\"${scope}\"]) .${marker} {\\n @apply ${value.trim()};\\n }`,\n )\n .join(\"\\n\");\n\n return `@layer base {\\n${rules}\\n}\\n`;\n}\n\nmodule.exports = {\n createComponentRecipe,\n emitComponentRecipeCss,\n};\n"],
5
+ "mappings": "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",
6
+ "names": ["require_components_config_v4", "__commonJSMin", "exports", "module", "isPlainObject", "value", "deepMerge", "left", "right", "result", "key", "findTreeConflicts", "path", "conflicts", "isV4Envelope", "toRuntimeComponentConfig", "envelope", "component", "toRuntimeComponentsConfig", "config", "changed", "name", "findTreeConflicts", "toMarkerPart", "value", "markerForPath", "path", "prefix", "parts", "part", "splitPassthroughClasses", "passthrough", "recipe", "token", "createComponentRecipe", "componentsConfig", "options", "classes", "visitStyles", "marker", "split", "entry", "index", "key", "child", "config", "component", "envelope", "conflicts", "emitComponentRecipeCss", "scope"]
7
+ }
@@ -1,2 +1,2 @@
1
- var r={anyOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},f={$id:"https://frontfriend.dev/schemas/components-config.schema.json",type:"object",additionalProperties:{anyOf:[{$ref:"#/$defs/classValue"},{$ref:"#/$defs/componentEnvelope"}]},$defs:{classValue:r,slotValue:{anyOf:[{$ref:"#/$defs/classValue"},{type:"object",additionalProperties:{$ref:"#/$defs/slotValue"}}]},reservedBucket:{anyOf:[{$ref:"#/$defs/classValue"},{type:"object",additionalProperties:{$ref:"#/$defs/slotValue"}}]},componentEnvelope:{type:"object",additionalProperties:!1,properties:{root:{$ref:"#/$defs/slotValue"},variants:{type:"object",additionalProperties:{$ref:"#/$defs/reservedBucket"}},variant:{$ref:"#/$defs/reservedBucket"},size:{$ref:"#/$defs/reservedBucket"},sizes:{$ref:"#/$defs/reservedBucket"},iconPosition:{$ref:"#/$defs/reservedBucket"},icons:{$ref:"#/$defs/reservedBucket"},color:{$ref:"#/$defs/reservedBucket"},fullwidth:{$ref:"#/$defs/reservedBucket"},states:{$ref:"#/$defs/reservedBucket"},compoundVariants:{$ref:"#/$defs/reservedBucket"},defaultVariants:{$ref:"#/$defs/reservedBucket"},props:{$ref:"#/$defs/reservedBucket"},slots:{type:"object",additionalProperties:{$ref:"#/$defs/slotValue"}}}}}};function o(e){if(typeof e!="string"||e.trim().length===0||/^[0-9]+(?:\.[0-9]+)?$/.test(e)||e==="true"||e==="false")return!1;let s=/\s/.test(e),t=/[-:\[\]\/]/.test(e);return!0}module.exports={componentsConfigSchema:f,isCSSClassString:o};
1
+ var t={$id:"https://frontfriend.dev/schemas/components-config.v4.schema.json",type:"object",additionalProperties:{$ref:"#/$defs/componentEnvelope"},$defs:{styleTree:{anyOf:[{type:"string"},{type:"object",additionalProperties:{$ref:"#/$defs/styleTree"}}]},behaviorTree:{anyOf:[{type:["string","number","boolean","null"]},{type:"array",items:{$ref:"#/$defs/behaviorTree"}},{type:"object",additionalProperties:{$ref:"#/$defs/behaviorTree"}}]},componentEnvelope:{type:"object",additionalProperties:!1,required:["styles"],properties:{styles:{type:"object",additionalProperties:{$ref:"#/$defs/styleTree"}},behavior:{type:"object",additionalProperties:{$ref:"#/$defs/behaviorTree"}}}}}};function r(e){return typeof e=="string"&&e.trim().length>0}module.exports={componentsConfigSchema:t,isCSSClassString:r};
2
2
  //# sourceMappingURL=components-config-schema.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../lib/core/components-config-schema.js"],
4
- "sourcesContent": ["/**\n * Shared componentsConfig schema for FrontFriend tools.\n *\n * The schema defines the canonical per-component envelope used by ffdc,\n * validation scripts, migration tooling, and registry completeness checks.\n * Keep this file as the single source of truth; consumers should re-export it\n * instead of maintaining local schema copies.\n */\n\nconst classValueSchema = {\n anyOf: [\n { type: 'string' },\n { type: 'number' },\n { type: 'boolean' },\n { type: 'null' },\n ],\n};\n\nconst componentsConfigSchema = {\n $id: 'https://frontfriend.dev/schemas/components-config.schema.json',\n type: 'object',\n // A component is a bare class string (e.g. spinner: \"animate-spin\") or a\n // strict envelope.\n additionalProperties: {\n anyOf: [{ $ref: '#/$defs/classValue' }, { $ref: '#/$defs/componentEnvelope' }],\n },\n $defs: {\n classValue: classValueSchema,\n\n // Permissive recursive tree used INSIDE `slots` and for `root`: leaves are\n // class values, objects nest freely. Slot internals are NOT namespaced\n // again (slots live at the component top level only), so e.g.\n // `slots.trigger.icon` and `slots.list.line` stay as plain nested keys.\n slotValue: {\n anyOf: [\n { $ref: '#/$defs/classValue' },\n { type: 'object', additionalProperties: { $ref: '#/$defs/slotValue' } },\n ],\n },\n\n // Variant / prop buckets: a class-value leaf or a (possibly nested) map.\n reservedBucket: {\n anyOf: [\n { $ref: '#/$defs/classValue' },\n { type: 'object', additionalProperties: { $ref: '#/$defs/slotValue' } },\n ],\n },\n\n // STRICT canonical v4 envelope: a fixed set of reserved buckets plus a\n // single `slots` namespace holding every named child slot.\n // `additionalProperties: false` is what standardizes the shape \u2014 any stray\n // top-level key (a slot left outside `slots`, a typo) is rejected.\n componentEnvelope: {\n type: 'object',\n additionalProperties: false,\n properties: {\n // Root classes for the component. Usually a class string; some\n // components (e.g. sidebar) nest a sub-tree under root.\n root: { $ref: '#/$defs/slotValue' },\n\n // Canonical variant buckets (variants.variant, variants.size, \u2026) plus\n // the flat compatibility aliases.\n variants: { type: 'object', additionalProperties: { $ref: '#/$defs/reservedBucket' } },\n variant: { $ref: '#/$defs/reservedBucket' },\n size: { $ref: '#/$defs/reservedBucket' },\n sizes: { $ref: '#/$defs/reservedBucket' },\n iconPosition: { $ref: '#/$defs/reservedBucket' },\n icons: { $ref: '#/$defs/reservedBucket' },\n color: { $ref: '#/$defs/reservedBucket' },\n fullwidth: { $ref: '#/$defs/reservedBucket' },\n states: { $ref: '#/$defs/reservedBucket' },\n compoundVariants: { $ref: '#/$defs/reservedBucket' },\n defaultVariants: { $ref: '#/$defs/reservedBucket' },\n props: { $ref: '#/$defs/reservedBucket' },\n\n // All named child slots (item, trigger, content, icon, menu, \u2026) live\n // here. Top-level only \u2014 slot internals stay direct.\n slots: { type: 'object', additionalProperties: { $ref: '#/$defs/slotValue' } },\n },\n },\n },\n};\n\nfunction isCSSClassString(value) {\n if (typeof value !== 'string') return false;\n\n if (value.trim().length === 0) return false;\n\n if (/^[0-9]+(?:\\.[0-9]+)?$/.test(value)) return false;\n\n if (value === 'true' || value === 'false') return false;\n\n const hasSpaces = /\\s/.test(value);\n const hasTailwindSyntax = /[-:\\[\\]\\/]/.test(value);\n\n if (hasSpaces || hasTailwindSyntax) return true;\n\n return true;\n}\n\nmodule.exports = {\n componentsConfigSchema,\n isCSSClassString,\n};\n"],
5
- "mappings": "AASA,IAAMA,EAAmB,CACvB,MAAO,CACL,CAAE,KAAM,QAAS,EACjB,CAAE,KAAM,QAAS,EACjB,CAAE,KAAM,SAAU,EAClB,CAAE,KAAM,MAAO,CACjB,CACF,EAEMC,EAAyB,CAC7B,IAAK,gEACL,KAAM,SAGN,qBAAsB,CACpB,MAAO,CAAC,CAAE,KAAM,oBAAqB,EAAG,CAAE,KAAM,2BAA4B,CAAC,CAC/E,EACA,MAAO,CACL,WAAYD,EAMZ,UAAW,CACT,MAAO,CACL,CAAE,KAAM,oBAAqB,EAC7B,CAAE,KAAM,SAAU,qBAAsB,CAAE,KAAM,mBAAoB,CAAE,CACxE,CACF,EAGA,eAAgB,CACd,MAAO,CACL,CAAE,KAAM,oBAAqB,EAC7B,CAAE,KAAM,SAAU,qBAAsB,CAAE,KAAM,mBAAoB,CAAE,CACxE,CACF,EAMA,kBAAmB,CACjB,KAAM,SACN,qBAAsB,GACtB,WAAY,CAGV,KAAM,CAAE,KAAM,mBAAoB,EAIlC,SAAU,CAAE,KAAM,SAAU,qBAAsB,CAAE,KAAM,wBAAyB,CAAE,EACrF,QAAS,CAAE,KAAM,wBAAyB,EAC1C,KAAM,CAAE,KAAM,wBAAyB,EACvC,MAAO,CAAE,KAAM,wBAAyB,EACxC,aAAc,CAAE,KAAM,wBAAyB,EAC/C,MAAO,CAAE,KAAM,wBAAyB,EACxC,MAAO,CAAE,KAAM,wBAAyB,EACxC,UAAW,CAAE,KAAM,wBAAyB,EAC5C,OAAQ,CAAE,KAAM,wBAAyB,EACzC,iBAAkB,CAAE,KAAM,wBAAyB,EACnD,gBAAiB,CAAE,KAAM,wBAAyB,EAClD,MAAO,CAAE,KAAM,wBAAyB,EAIxC,MAAO,CAAE,KAAM,SAAU,qBAAsB,CAAE,KAAM,mBAAoB,CAAE,CAC/E,CACF,CACF,CACF,EAEA,SAASE,EAAiBC,EAAO,CAO/B,GANI,OAAOA,GAAU,UAEjBA,EAAM,KAAK,EAAE,SAAW,GAExB,wBAAwB,KAAKA,CAAK,GAElCA,IAAU,QAAUA,IAAU,QAAS,MAAO,GAElD,IAAMC,EAAY,KAAK,KAAKD,CAAK,EAC3BE,EAAoB,aAAa,KAAKF,CAAK,EAEjD,MAA2C,EAG7C,CAEA,OAAO,QAAU,CACf,uBAAAF,EACA,iBAAAC,CACF",
6
- "names": ["classValueSchema", "componentsConfigSchema", "isCSSClassString", "value", "hasSpaces", "hasTailwindSyntax"]
4
+ "sourcesContent": ["/**\n * Canonical Frontfriend v4 componentsConfig schema.\n *\n * Styling and runtime behavior are deliberately separate. Every string below\n * `styles` is a Tailwind class string; values below `behavior` are component\n * data and are never interpreted as CSS.\n */\n\nconst componentsConfigSchema = {\n $id: \"https://frontfriend.dev/schemas/components-config.v4.schema.json\",\n type: \"object\",\n additionalProperties: { $ref: \"#/$defs/componentEnvelope\" },\n $defs: {\n styleTree: {\n anyOf: [\n { type: \"string\" },\n { type: \"object\", additionalProperties: { $ref: \"#/$defs/styleTree\" } },\n ],\n },\n behaviorTree: {\n anyOf: [\n { type: [\"string\", \"number\", \"boolean\", \"null\"] },\n { type: \"array\", items: { $ref: \"#/$defs/behaviorTree\" } },\n {\n type: \"object\",\n additionalProperties: { $ref: \"#/$defs/behaviorTree\" },\n },\n ],\n },\n componentEnvelope: {\n type: \"object\",\n additionalProperties: false,\n required: [\"styles\"],\n properties: {\n styles: {\n type: \"object\",\n additionalProperties: { $ref: \"#/$defs/styleTree\" },\n },\n behavior: {\n type: \"object\",\n additionalProperties: { $ref: \"#/$defs/behaviorTree\" },\n },\n },\n },\n },\n};\n\nfunction isCSSClassString(value) {\n return typeof value === \"string\" && value.trim().length > 0;\n}\n\nmodule.exports = {\n componentsConfigSchema,\n isCSSClassString,\n};\n"],
5
+ "mappings": "AAQA,IAAMA,EAAyB,CAC7B,IAAK,mEACL,KAAM,SACN,qBAAsB,CAAE,KAAM,2BAA4B,EAC1D,MAAO,CACL,UAAW,CACT,MAAO,CACL,CAAE,KAAM,QAAS,EACjB,CAAE,KAAM,SAAU,qBAAsB,CAAE,KAAM,mBAAoB,CAAE,CACxE,CACF,EACA,aAAc,CACZ,MAAO,CACL,CAAE,KAAM,CAAC,SAAU,SAAU,UAAW,MAAM,CAAE,EAChD,CAAE,KAAM,QAAS,MAAO,CAAE,KAAM,sBAAuB,CAAE,EACzD,CACE,KAAM,SACN,qBAAsB,CAAE,KAAM,sBAAuB,CACvD,CACF,CACF,EACA,kBAAmB,CACjB,KAAM,SACN,qBAAsB,GACtB,SAAU,CAAC,QAAQ,EACnB,WAAY,CACV,OAAQ,CACN,KAAM,SACN,qBAAsB,CAAE,KAAM,mBAAoB,CACpD,EACA,SAAU,CACR,KAAM,SACN,qBAAsB,CAAE,KAAM,sBAAuB,CACvD,CACF,CACF,CACF,CACF,EAEA,SAASC,EAAiBC,EAAO,CAC/B,OAAO,OAAOA,GAAU,UAAYA,EAAM,KAAK,EAAE,OAAS,CAC5D,CAEA,OAAO,QAAU,CACf,uBAAAF,EACA,iBAAAC,CACF",
6
+ "names": ["componentsConfigSchema", "isCSSClassString", "value"]
7
7
  }
package/dist/next.js CHANGED
@@ -1,2 +1,2 @@
1
- var p=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var C=p((we,_)=>{var W="https://app.dev.frontfriend.dev",K="https://registry-legacy.frontfriend.dev",Y=".cache/frontfriend",X={JS:["tokens.js","variables.js","semanticVariables.js","semanticDarkVariables.js","safelist.js","custom.js"],JSON:["fonts.json","icons.json","components-config.json","version.json","metadata.json"]},Z={FF_ID:"FF_ID",FF_API_URL:"FF_API_URL",FF_USE_LOCAL:"FF_USE_LOCAL",FF_AUTH_TOKEN:"FF_AUTH_TOKEN"};_.exports={DEFAULT_API_URL:W,LEGACY_API_URL:K,CACHE_DIR_NAME:Y,CACHE_TTL_DAYS:7,CACHE_TTL_MS:6048e5,CACHE_FILES:X,ENV_VARS:Z}});var I=p((ke,S)=>{var h=class extends Error{constructor(e,r,o){super(e),this.name="APIError",this.statusCode=r,this.url=o,this.code=`API_${r}`}},y=class extends Error{constructor(e,r){super(e),this.name="CacheError",this.operation=r,this.code=`CACHE_${r.toUpperCase()}`}},v=class extends Error{constructor(e,r){super(e),this.name="ConfigError",this.field=r,this.code=r?`CONFIG_${String(r).toUpperCase()}`:"CONFIG_ERROR"}},w=class extends Error{constructor(e,r){super(e),this.name="ProcessingError",this.token=r,this.code="PROCESSING_ERROR"}};S.exports={APIError:h,CacheError:y,ConfigError:v,ProcessingError:w}});var A=p((ze,F)=>{var l=require("fs");function Q(t){try{let e=l.readFileSync(t,"utf8");return JSON.parse(e)}catch(e){if(e.code==="ENOENT")return null;throw e}}function ee(t){try{return l.readFileSync(t,"utf8").replace(/^\uFEFF/,"")}catch(e){if(e.code==="ENOENT")return null;throw e}}function te(t,e,r=2){let o=JSON.stringify(e,null,r);l.writeFileSync(t,o,"utf8")}function re(t,e){l.writeFileSync(t,e,"utf8")}function oe(t,e){if(e==null||typeof e=="object"&&Object.keys(e).length===0||Array.isArray(e)&&e.length===0){let o=`module.exports = ${Array.isArray(e)?"[]":"{}"};`;l.writeFileSync(t,o,"utf8")}else{let r=`module.exports = ${JSON.stringify(e,null,2)};`;l.writeFileSync(t,r,"utf8")}}function ae(t){return l.existsSync(t)}function ne(t){l.mkdirSync(t,{recursive:!0})}function ie(t){l.rmSync(t,{recursive:!0,force:!0})}F.exports={readJsonFileSafe:Q,readFileSafe:ee,writeJsonFile:te,writeTextFile:re,writeModuleExportsFile:oe,fileExists:ae,ensureDirectoryExists:ne,removeDirectory:ie}});var R=p((je,T)=>{var d=require("path"),{CACHE_DIR_NAME:se,CACHE_TTL_MS:de,CACHE_FILES:O}=C(),{CacheError:D}=I(),{readJsonFileSafe:g,readFileSafe:le,writeJsonFile:E,writeTextFile:L,writeModuleExportsFile:N,fileExists:k,ensureDirectoryExists:ue,removeDirectory:pe}=A(),z=class{constructor(e=process.cwd()){this.appRoot=e,this.cacheDir=d.join(e,"node_modules",se),this.metadataFile=d.join(this.cacheDir,"metadata.json"),this.maxAge=de}getCacheDir(){return this.cacheDir}isLocalOnly(){let e=g(this.metadataFile);return(e==null?void 0:e.version)==="local-components"}getIconLibrary(){let e=d.join(this.cacheDir,"iconLibrary.json");return k(e)?g(e):null}exists(){return k(this.cacheDir)}isValid(){if(!this.exists())return!1;try{let e=g(this.metadataFile);if(!e)return!1;let r=new Date(e.timestamp).getTime();return Date.now()-r<this.maxAge}catch{return!1}}load(){if(!this.exists())return null;try{let e={};for(let r of O.JS){let o=d.join(this.cacheDir,r);if(k(o)){let a=r.replace(".js","");try{let n=le(o);if(n!==null){let i={},s={exports:i};new Function("module","exports",n)(s,i),e[a]=s.exports}}catch(n){console.warn(`[Frontfriend] Failed to load ${r}: ${n.message}`),(n.message.includes("Unexpected token")||n.message.includes("Invalid character"))&&console.warn("[Frontfriend] This might be a BOM or encoding issue. Try deleting node_modules/.cache/frontfriend and running `npx frontfriend init` again.")}}}for(let r of O.JSON){let o=d.join(this.cacheDir,r),a=r.replace(".json",""),n=g(o);n!==null&&(e[a]=n)}return e["components-config"]&&(e.componentsConfig=e["components-config"],delete e["components-config"]),e.cls&&!e.safelist&&(e.safelist=e.cls,delete e.cls),e}catch(e){throw new D(`Failed to load cache: ${e.message}`,"read")}}save(e){var r,o;try{ue(this.cacheDir);let a={timestamp:new Date().toISOString(),version:((r=e.metadata)==null?void 0:r.version)||"2.0.0",ffId:(o=e.metadata)==null?void 0:o.ffId};E(this.metadataFile,a);let n=["tokens","variables","semanticVariables","semanticDarkVariables","safelist","custom"];for(let s of n)if(e[s]!==void 0){let u=d.join(this.cacheDir,`${s}.js`);N(u,e[s])}if(e.safelist&&Array.isArray(e.safelist)){let s=d.join(this.cacheDir,"safelist.js");N(s,e.safelist)}let i={fonts:e.fonts,icons:e.icons||e.iconSet,"components-config":e.componentsConfig,iconLibrary:e.iconLibrary,version:e.version};for(let[s,u]of Object.entries(i))if(u!==void 0){let x=d.join(this.cacheDir,`${s}.json`);E(x,u)}e.themeCSS!==void 0&&L(d.join(this.cacheDir,"theme.css"),e.themeCSS),e.classesContent!==void 0&&L(d.join(this.cacheDir,"classes.css"),e.classesContent)}catch(a){throw new D(`Failed to save cache: ${a.message}`,"write")}}clear(){this.exists()&&pe(this.cacheDir)}};T.exports=z});var V=p((_e,P)=>{P.exports={accordion:{root:"border border-border rounded-md [&>*:last-child]:border-b-0 font-primary",slots:{font:"font-primary text-primary",last:"[&>*]:border-b-0",header:"flex",item:"border-b border-border",trigger:{root:"flex flex-1 items-center text-primary active:text-primary/90 justify-between p-4 font-semibold transition-all [&[data-state=open]>svg]:rotate-180",icon:"shrink-0 transition-transform duration-200"},content:{root:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down text-foreground",wrapper:"p-4 pt-0"}}},actionbar:{root:"pb-safe-bottom w-full justify-center border-t border-border z-20 bg-card items-center absolute bottom-0 left-1/2 transform -translate-x-1/2 flex",variant:{compact:"py-4 px-4",relaxed:"px-6 py-6"},slots:{content:"gap-3 lg:gap-8 flex flex-row w-full"},props:{maxWidth:"max-w-2xl",align:{start:"justify-start",end:"justify-end",center:"justify-center",justify:"justify-between",stretch:"[&>*]:flex-1"}}},alert:{root:"relative w-full rounded-md min-h-12 border gap-2 p-4 [&>svg~*]:pl-7 flex flex-col justify-center [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 font-primary shadow-sm",variant:{default:"bg-muted border border-transparent [&>svg]:text-muted-foreground text-foreground [&>div]:text-muted-foreground",destructive:"bg-destructive border border-transparent [&>svg]:text-destructive-foreground text-destructive-foreground",info:"bg-primary border border-transparent [&>svg]:text-primary-foreground text-primary-foreground",success:"bg-primary border border-transparent [&>svg]:text-primary-foreground text-primary-foreground",warning:"bg-primary border border-transparent [&>svg]:text-primary-foreground text-primary-foreground",brand:"bg-primary border border-transparent [&>svg]:text-primary-foreground text-primary-foreground"},slots:{title:"text-base leading-none tracking-tight font-semibold mb-0",description:"text-sm [&_p]:leading-relaxed leading-relaxed font-normal"}},alertDialog:{slots:{overlay:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",content:"font-primary border border-border fixed left-[50%] top-[50%] z-50 max-w-[90vw] grid w-full lg:max-w-lg translate-x-[-50%] translate-y-[-50%] gap-6 border border-border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 rounded-lg shadow-2xl",header:"flex flex-col space-y-2 gap-0.5 text-left",footer:"flex flex-row justify-end gap-4",title:"text-lg font-semibold text-foreground",description:"text-sm text-muted-foreground font-medium",media:"mb-2 inline-flex size-16 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8",cancel:"sm:mt-0"}},avatar:{root:"font-primary group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none",slots:{image:"aspect-square h-full w-full",fallback:"bg-muted flex size-full items-center justify-center rounded-full text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",badge:"absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground ring-2 ring-background select-none group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2 group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",group:"group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",groupCount:"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3"},props:{size:{default:"",sm:"size-6",lg:"size-10"}}},badge:{root:"font-primary inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive [&>svg]:pointer-events-none [&>svg]:size-3",variant:{main:"bg-primary border-transparent text-primary-foreground [&>svg]:text-primary-foreground",secondary:"bg-secondary border-transparent text-secondary-foreground [&>svg]:text-secondary-foreground",destructive:"bg-destructive border-transparent text-white [&>svg]:text-white",success:"bg-primary border-transparent text-primary-foreground [&>svg]:text-primary-foreground",tertiary:"bg-transparent border-border text-foreground [&>svg]:text-foreground",warning:"bg-primary border-transparent text-primary-foreground [&>svg]:text-primary-foreground",brand:"bg-primary border-transparent text-primary-foreground [&>svg]:text-primary-foreground",informative:"bg-primary border-transparent text-primary-foreground [&>svg]:text-primary-foreground",highlight:"bg-primary border-transparent text-primary-foreground [&>svg]:text-primary-foreground",subtle:{main:"bg-primary border-transparent text-primary-foreground [&>svg]:text-primary-foreground",secondary:"bg-primary border-transparent text-primary-foreground [&>svg]:text-primary-foreground",destructive:"bg-destructive border-transparent text-destructive-foreground [&>svg]:text-destructive-foreground",success:"bg-primary border-transparent text-primary-foreground [&>svg]:text-primary-foreground",warning:"bg-primary border-transparent text-primary-foreground [&>svg]:text-primary-foreground",tertiary:"bg-muted border-transparent text-foreground [&>svg]:text-foreground",brand:"bg-primary border-transparent text-primary-foreground [&>svg]:text-primary-foreground",informative:"bg-primary border-transparent text-primary-foreground [&>svg]:text-primary-foreground",highlight:"bg-primary border-transparent text-primary-foreground [&>svg]:text-primary-foreground"}},slots:{icon:"cursor-pointer",bullet:"p-0.5 w-5 h-5"},states:{dismissable:"hover:opacity-80"}},button:{root:"font-primary group inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20",size:{default:"h-9 px-4 py-2",sm:"h-8 gap-1.5 px-3",lg:"h-10 px-6",small:"text-sm font-medium tracking-0 pl-3 pr-3 h-9",large:"text-base font-semibold tracking-0 pl-4 pr-4 h-12",icon:"size-9",xs:"h-6 gap-1 px-2 text-xs"},iconPosition:{prefix:{small:"pl-2",default:"pl-3",large:"pl-3",sm:"pl-2",lg:"pl-3"},suffix:{small:"pr-2",default:"pr-3",large:"pr-3",sm:"pr-2",lg:"pr-3"},default:{small:"w-8 px-0",default:"w-9 px-0",large:"w-10 px-0",sm:"pl-2 pr-2 w-9",lg:"pl-3 pr-3 w-12"}},fullwidth:{false:"",true:"w-full"},defaultVariants:{variant:"main",size:"default"},compoundVariants:{links:"p-0 text-sm font-medium tracking-0 h-fit"},variant:{main:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",tertiary:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20",ghost:"hover:bg-accent hover:text-accent-foreground",ghostmain:"text-primary hover:bg-accent hover:text-primary/90",link:"text-primary underline-offset-4 hover:underline",linkdestructive:"text-destructive underline-offset-4 hover:underline",default:"bg-primary hover:bg-primary/90 active:bg-primary/90 disabled:opacity-50 text-primary-foreground hover:text-primary-foreground active:text-primary-foreground disabled:opacity-50 border-primary hover:border-transparent active:border-transparent disabled:opacity-50 border-0",outline:"bg-background hover:bg-muted/80 active:bg-muted/80 disabled:opacity-50 text-muted-foreground hover:text-foreground active:text-foreground disabled:opacity-50 border-border hover:border-border active:border-border disabled:border-transparent border border-t border-b border-r border-l",linkDestructive:"text-destructive hover:text-destructive active:text-destructive disabled:opacity-50"},slots:{icon:{size:{sm:"4",default:"4",lg:"4"},color:{main:"text-primary-foreground",secondary:"text-secondary-foreground",tertiary:"text-foreground group-hover:text-accent-foreground",destructive:"text-white",ghost:"text-foreground group-hover:text-accent-foreground",ghostmain:"text-primary",link:"text-primary",linkdestructive:"text-destructive"}}}},calendar:{root:"p-3 rounded-md font-primary",slots:{caption:{root:"flex justify-center pt-1 relative items-center",label:"text-sm text-foreground leading-snug font-medium"},months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",nav:{root:"space-x-1 flex items-center",button:{next:{root:"absolute right-1",props:{iconSize:{else:"4",ghost:"6"},defaultVariant:"ghostmain"}},root:"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",iconSize:"w-7 h-7",previous:{root:"absolute left-1",props:{iconSize:{else:"4",ghost:"6"},defaultVariant:"ghostmain"}}}},row:"flex w-full mt-2 cursor-not-allowed",table:"w-full border-collapse space-y-1",head:{row:"flex",cell:"text-muted-foreground leading-snug w-9 font-normal text-sm"},cell:"text-center text-sm p-0 relative [&:has([aria-selected])]:bg-muted/80 first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:{root:"h-9 w-9 p-0 font-normal text-foreground aria-selected:opacity-100 inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background hover:bg-muted/80 aria-selected:hover:bg-primary/90",range:{end:"day-range-end",middle:"aria-selected:bg-muted/80 aria-selected:text-foreground aria-selected:hover:bg-muted/80"},selected:"bg-primary text-primary-foreground hover:bg-primary/90 hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",today:"bg-primary text-primary-foreground aria-selected:bg-primary/90 aria-selected:text-primary-foreground aria-selected:hover:bg-primary/90 aria-selected:focus:bg-primary/90",outside:"opacity-50 opacity-50 aria-selected:text-foreground day-outside aria-selected:bg-muted/80 aria-selected:hover:bg-muted/80 aria-selected:hover:text-foreground aria-selected:focus:bg-muted/80 aria-selected:focus:text-foreground",disabled:"text-foreground opacity-50",hidden:"invisible"},customRoot:"p-3 rounded-md font-primary",header:"flex justify-center pt-1 relative items-center",content:"grid grid-cols-3 gap-2",options:"cursor-pointer",selectGroup:"flex items-center gap-2",nativeSelect:"h-8 rounded-md border border-input bg-background px-2 text-sm",range:{root:"p-3 rounded-md font-primary",container:"flex flex-col gap-4 sm:flex-row",row:"flex w-full mt-2",navSpacer:"h-7 w-7"}}},card:{root:"flex flex-col gap-6 rounded-xl font-primary border bg-card text-foreground border-border relative py-6 shadow-sm",slots:{title:"text-base text-foreground font-semibold leading-normal",description:"text-xs font-medium text-muted-foreground",header:"flex flex-col gap-1.5 px-6",content:"px-6",action:"col-start-2 row-span-2 row-start-1 self-start justify-self-end",footer:"flex gap-4 items-center px-6"},props:{footerAlign:{justify:"flex justify-between",end:"flex justify-end",start:"flex justify-start",stretch:"flex [&>*]:flex-1"}},states:{outside:"absolute w-full pt-8 mt-[-16px] -z-10",noContent:"p-4"}},chart:{root:'font-primary flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:text-foreground [&_.recharts-cartesian-grid_line]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke="#fff"]]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke="#ccc"]]:stroke-border [&_.recharts-radial-bar-background-sector]:text-muted-foreground [&_.recharts-rectangle.recharts-tooltip-cursor]:text-muted-foreground [&_.recharts-reference-line-line]:stroke-border [&_.recharts-sector[stroke="#fff"]]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none',slots:{tooltip:{root:"grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",label:{root:"flex flex-1 justify-between leading-none",wrapper:"font-medium"},payload:{root:"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",wrapper:"grid gap-1.5"},indicator:"shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",value:"font-mono font-medium tabular-nums text-foreground"},legend:{content:{root:"flex items-center justify-center gap-4",wrapper:"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"},align:{true:"pb-3",false:"pt-3"},item:"h-2 w-2 shrink-0 rounded-[2px]"},legendItem:"h-2 w-2 shrink-0 rounded-[2px]",dot:{indicator:{root:"items-center",size:"h-2.5 w-2.5"}},line:{indicator:{size:"w-1"}},dashed:{indicator:{root:"w-0 border-[1.5px] border-dashed bg-transparent",label:"my-0.5"}},nest:{label:{true:"items-end",false:"items-center",container:"grid gap-1.5",text:"text-muted-foreground"}}}},checkbox:{root:"peer size-4 shrink-0 rounded-[4px] border border-border bg-background shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",slots:{icon:"text-primary-foreground flex items-center justify-center"}},checkboxField:{root:"flex items-center gap-2 font-primary w-fit",states:{disabled:"opacity-5"}},command:{root:"flex h-full w-full flex-col overflow-hidden rounded-md bg-background text-foreground font-primary",slots:{dialog:{content:"overflow-hidden p-0",root:"**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",srOnly:"sr-only"},input:{wrapper:"flex h-9 items-center gap-2 border-b border-border px-3 text-muted-foreground",icon:"size-4 shrink-0 opacity-50",root:"flex h-10 w-full rounded-md bg-transparent py-3 text-sm text-foreground outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"},list:"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",empty:"py-6 text-center text-sm",group:"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-foreground",separator:"-mx-1 h-px bg-muted",item:"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-hidden select-none data-[highlighted]:bg-muted/80 data-[highlighted]:text-foreground data-[selected=true]:bg-muted/80 data-[selected=true]:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4 [&_svg:not([class*=text-])]:text-muted-foreground",shortcut:"ml-auto text-xs tracking-widest text-muted-foreground",combobox:{label:"px-2 py-1.5 text-xs font-medium text-foreground"}}},datePicker:{root:"w-[280px] justify-start text-left font-normal gap-y-0 [&>span]:truncate font-primary",slots:{button:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-normal ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 text-sm font-medium tracking-0 pl-4 pr-4 h-10 bg-muted hover:bg-accent/80 active:bg-accent/80 disabled:opacity-50 border-border hover:border-border active:border-border disabled:opacity-50 border border-t border-b border-r border-l",trigger:{popover:"w-fit justify-start font-normal text-sm leading-none",text:"truncate text-default-mid",select:"w-full mx-auto mb-2"},popover:{content:{root:"flex p-0 items-start gap-6 w-auto flex-col h-[563px] bg-popover z-50",relaxed:"flex p-0 items-start gap-6 w-auto flex-col lg:flex-row h-[522px] lg:h-auto bg-popover z-50",range:"w-auto p-0 z-50"}},separator:{root:"hidden",relaxed:"h-[397px] shrink-0 hidden lg:flex"},dateInput:{relaxed:"lg:flex-row",root:"flex justify-between gap-6 w-full flex-col",wrapper:"flex gap-2 w-full",control:"w-full justify-center",separator:"py-1"},calendar:{container:{wrapper:"h-[457px]",root:"flex flex-col gap-2 items-start justify-between",relaxed:"lg:w-[544px] h-[397px]"}},buttons:{root:"flex-1",relaxed:"lg:flex-initial",trigger:"w-fit justify-start",container:{root:"flex gap-2",relaxed:"lg:pr-4"}},selectContent:"z-50",fullWidth:"w-full"},props:{presets:{relaxed:"flex flex-col items-sart gap-2 w-[150px]"}},states:{isSelected:{true:"pointer-events-none",false:"w-full justify-start"}}},dateInput:{root:"flex border rounded-lg items-center text-sm px-1 font-medium leading-5 font-primary text-default-subtle h-10 border-border shadow-sm",slots:{arrowUp:"ArrowUp",arrowDown:"ArrowDown",arrowLeft:"ArrowLeft",arrowRight:"ArrowRight",delete:"Delete",tab:"Tab",backspace:"Backspace",enter:"Enter",inputs:{month:"p-0 outline-none w-6 border-none text-center bg-background",day:"p-0 outline-none w-7 border-none text-center bg-background",year:"p-0 outline-none w-12 border-none text-center bg-background"},span:"opacity-20 -mx-px"}},dialog:{slots:{overlay:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",content:"fixed flex flex-col lg:max-h-[90vh] max-h-[100vh] bg-background font-primary left-[50%] overflow-clip top-[50%] z-50 w-full translate-x-[-50%] translate-y-[-50%] data-[state=open]:animate-in data-[state=closed]:animate-out duration-200 border border-border data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-2xl shadow-2xl",body:"gap-0 flex flex-col h-full w-full overflow-y-auto mb-20 text-foreground",close:"absolute right-4 top-4 opacity-70 transition-opacity hover:opacity-100 disabled:pointer-events-none",header:"flex gap-0.5 flex-col p-6 pr-14 space-y-1.5 text-left bg-card sticky top-0",footer:"bg-card gap-4 h-20 px-6 items-center fixed bottom-0 w-full flex",title:"text-2xl font-semibold leading-normal tracking-tight text-foreground",description:"text-sm text-muted-foreground leading-normal font-semibold"},props:{footerAlign:{justify:"flex justify-between",end:"flex justify-end",start:"flex justify-start",stretch:"flex [&>*]:flex-1"},width:{xs:"max-w-sm",sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg","3xl":"max-w-3xl","5xl":"max-w-5xl",full:"max-w-full",fit:"max-w-fit"},height:{full:"h-full",auto:"h-auto",else:"h-auto lg:h-full"},padding:{true:"px-6",false:"px-0"}},states:{isSm:"w-full"}},drawer:{slots:{overlay:"fixed inset-0 z-50 bg-black/80",content:{root:"overflow-clip fixed font-primary z-50 w-full",wrapper:"w-full h-full flex flex-col rounded-lg border border-border bg-background overflow-clip shadow-2xl"},header:"grid gap-0.5 text-left bg-card p-6 pr-14 sticky top-0 self-stretch",footer:"flex h-20 gap-4 bg-card items-center p-6 sticky bottom-0 w-full",title:"text-2xl font-semibold leading-none tracking-tight text-foreground",description:"text-sm font-semibold text-muted-foreground",close:"absolute right-4 top-4 z-51",body:"gap-6 flex flex-col h-full w-full overflow-y-auto text-foreground max-h-[calc(100vh-160px)]",side:{left:"left-0 bottom-0",right:"right-0 bottom-0",bottom:"bottom-0",top:"top-0"},portal:{overlay:"no-after",content:"no_after p-2 max-h-screen"},handle:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"},props:{footerAlign:{justify:"flex justify-between",end:"flex justify-end",start:"flex justify-start",stretch:"flex [&>*]:flex-1"},width:{xs:"max-w-sm",sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg","3xl":"max-w-3xl","5xl":"max-w-5xl",full:"max-w-full",fit:"max-w-fit"},height:{full:"h-full",auto:"h-auto",else:"h-auto lg:h-full"},lgSide:{left:"lg:left-0 lg:bottom-0 lg:top-auto lg:right-auto",right:"lg:right-0 lg:bottom-0 lg:top-auto lg:left-auto",bottom:"lg:bottom-0 lg:inset-x-auto lg:top-auto",top:"lg:top-0 lg:inset-x-auto lg:bottom-auto"},padding:{true:"px-6",false:"px-0"}},states:{isSm:"w-full"}},dropdown:{slots:{subTrigger:{root:"flex cursor-base select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none text-foreground data-[highlighted]:bg-accent/80 data-[highlighted]:border-transparent data-[highlighted]:text-foreground",icon:"ml-auto"},subContent:"font-primary z-30 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",content:"font-primary z-30 min-w-[8rem] gap-y-1 overflow-hidden border-border rounded-md border bg-popover p-1 text-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",item:"group relative leading-snug font-normal border-0 border-transparent gap-x-2 hover:bg-muted/80 hover:border-transparent data-[disabled]:bg-transparent data-[disabled]:border-transparent text-foreground hover:text-foreground data-[disabled]:opacity-50 flex cursor-base select-none bg-transparent items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-muted/80 data-[highlighted]:border-transparent data-[highlighted]:text-foreground",destructive:{item:"group relative leading-snug font-normal border-0 border-transparent gap-x-2 hover:bg-muted/80 hover:border-transparent data-[disabled]:bg-transparent data-[disabled]:border-transparent text-destructive hover:text-destructive data-[disabled]:text-destructive flex cursor-base select-none bg-transparent items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-muted data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-muted/80 data-[highlighted]:border-transparent data-[highlighted]:text-destructive",shortcut:"ml-auto tracking-widest text-destructive"},checkbox:{item:"group relative leading-snug font-normal border-0 border-transparent gap-x-2 hover:bg-accent/80 hover:border-transparent data-[disabled]:bg-transparent data-[disabled]:border-transparent text-foreground hover:text-foreground data-[disabled]:opacity-50 flex cursor-base select-none bg-transparent items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-accent/80 data-[highlighted]:border-transparent data-[highlighted]:text-foreground",icon:"h-4 w-4 shrink-0 justify-center"},radio:{item:"relative flex cursor-base select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 text-foreground data-[highlighted]:bg-accent/80 data-[highlighted]:border-transparent data-[highlighted]:text-foreground",icon:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",indicator:"fill-current"},label:"bg-transparent border-transparent text-foreground px-2 py-1.5 rounded-sm text-sm leading-snug font-semibold",separator:"-mx-1 my-1 bg-muted h-px",inset:"pl-8",trigger:"outline-none",shortcut:"ml-auto tracking-widest text-muted-foreground group-hover:text-muted-foreground disabled:opacity-50"}},fileupload:{root:"flex flex-col gap-4 items-center w-[343px] relative",slots:{uploader:"w-full relative shadow-sm shadow-sm rounded-md",card:"p-4 w-full min-h-[144px] flex flex-col justify-center items-center gap-0 border-border bg-muted shadow-sm",container:"flex flex-col justify-center items-center gap-1 self-stretch relative",name:"text-center text-foreground font-primary text-lg w-full truncate font-semibold h-[27px]",description:"text-center font-primary text-muted-foreground text-sm w-full truncate font-medium h-[27px]",list:{title:"w-full flex justify-between items-center",root:"w-full font-primary",icon:{positive:"[&>svg]:text-primary",negative:"[&>svg]:text-destructive"}},spinner:"text-primary",button:"absolute z-20 top-4 right-4",cursor:"cursor-pointer",borderless:"border-0"},states:{dragging:"bg-muted"}},form:{slots:{label:{error:"text-destructive font-primary"},description:"text-sm text-muted-foreground font-primary",message:"text-sm font-medium text-destructive font-primary",item:{vertical:"flex flex-col gap-2 w-full",horizontal:"flex flex-row gap-2 items-center"}}},input:{root:"font-primary flex h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base md:text-sm shadow-xs transition-[color,box-shadow] outline-none text-foreground placeholder:text-muted-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive disabled:cursor-not-allowed disabled:opacity-50",slots:{file:"text-muted-foreground",container:"relative w-full text-foreground",prefixIcon:{root:"absolute left-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:cursor-not-allowed",props:{size:"4"}},prefix:"absolute left-3 top-1/2 transform -translate-y-1/2 font-medium text-sm font-primary disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",prefixSlot:"absolute left-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",suffixIcon:{root:"absolute right-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:cursor-not-allowed",props:{size:"4"}},suffix:"absolute right-3 top-1/2 transform -translate-y-1/2 font-medium text-sm font-primary disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",suffixSlot:"absolute right-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",clearable:{root:"absolute right-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:cursor-not-allowed cursor-pointer w-5 h-5 text-primary hover:text-primary/90 active:text-primary/90 p-0 hover:bg-transparent active:bg-transparent",props:{size:"default"}},passwordIcon:"absolute right-3 cursor-pointer top-1/2 transform -translate-y-1/2 font-medium text-sm font-primary disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",clearableIconSuffix:"right-12",textCenter:"text-center",numberField:{root:"grid gap-1.5",content:"relative [&>[data-slot=input]]:has-[[data-slot=increment]]:pr-5 [&>[data-slot=input]]:has-[[data-slot=decrement]]:pl-5",input:"flex h-9 w-full rounded-md border border-input bg-transparent py-1 text-sm text-center shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",increment:"absolute top-1/2 -translate-y-1/2 right-0 disabled:cursor-not-allowed disabled:opacity-20 p-3",decrement:"absolute top-1/2 -translate-y-1/2 left-0 p-3 disabled:cursor-not-allowed disabled:opacity-20",icon:"h-4 w-4"}}},inputOTP:{root:"flex items-center gap-x-2 has-[:disabled]:opacity-50 font-primary",slots:{group:"flex items-center",input:"disabled:cursor-not-allowed",slot:{root:"p-3 font-medium relative flex h-10 w-10 bg-background text-muted-foreground items-center justify-center border-y border-r border-border text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md text-center shadow-sm",active:"z-10 ring-2"},fakeCaret:{wrapper:"pointer-events-none absolute inset-0 flex items-center justify-center",root:"h-4 w-px animate-caret-blink bg-accent duration-1000"}}},label:{root:"flex items-center gap-2 text-sm leading-none font-medium select-none font-primary group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",slots:{main:"text-muted-foreground disable:opacity-50",secondary:"text-muted-foreground disable:opacity-50"},states:{disabled:"opacity-50"}},list:{root:"gap-y-2 flex flex-col rounded-2xl font-primary text-foreground",slots:{content:"border border-border rounded-2xl bg-card",item:"p-3 px-4 gap-x-3 border-border border-b gap-y-0.5 min-h-14 flex items-center justify-between",wrapper:"justify-between flex items-center gap-x-3 w-full",attribute:"flex flex-col gap-x-1 justify-center",first:"text-base leading-normal font-medium text-foreground text-right whitespace-nowrap",second:"text-sm leading-normal font-medium text-muted-foreground text-right whitespace-nowrap",itemTitle:{root:"flex flex-col",title:"text-base leading-normal font-semibold text-foreground",description:"text-sm leading-normal font-medium text-muted-foreground"},title:{root:"text-primary p-0",main:"text-base leading-normal font-semibold",secondary:"text-xs leading-normal font-medium",justify:"flex justify-between",end:"flex justify-end",start:"flex justify-start",stretch:"flex [&>*]:flex-1"}},props:{naked:{false:"[&>*:last-child]:[&>*:last-child]:border-b-0 [&>*:first-child]:[&>*:last-child]:rounded-t-2xl [&>*:last-child]:[&>*:last-child]:rounded-b-2xl",true:"[&>*:last-child]:bg-transparent border-0 [&>*:last-child]:border-transparent rounded-none [&>*:last-child>*]:px-0"},shadow:{true:"[&>*:last-child]:shadow-none",false:"[&>*:last-child]:shadow-sm"}},states:{interactive:"hover:bg-primary/90 cursor-pointer",inverted:"[&>*]:flex-col-reverse"}},navbar:{root:"flex flex-col w-full items-center z-20",variant:{relaxed:"py-5 px-0 gap-4 gap-y-1",compact:"py-3 px-0 gap-2"},slots:{wrapper:"font-primary font-medium flex flex-col w-full z-20 absolute w-full top-0 left-1/2 transform -translate-x-1/2 text-sm text-foreground px-6 bg-transparent lg:bg-transparent",container:"flex w-full flex-col items-start z-20 justify-center flex-1",content:"h-10 flex w-full relative gap-4",isTitle:"h-auto items-center",centerTitle:"flex-col items-center",external:"w-full hidden lg:flex",center:{root:"font-semibold h-full flex items-center max-w-full min-w-0 flex-[2] flex-col justify-center text-center",relaxed:"text-lg leading-normal",text:"line-clamp-1 w-full",compact:"text-lg"},left:"flex flex-1 justify-start items-center h-full gap-2 shrink-0",right:"flex flex-1 justify-end items-center h-full shrink-0 gap-4"}},page:{root:"ff-page bg-background lg:bg-card h-screen text-foreground font-primary",variant:{focus:"bg-background lg:bg-background h-auto min-h-screen",focusOld:"bg-card lg:bg-card",inset:"bg-background lg:bg-background","focus-inset":"bg-background lg:bg-background","inset-2col":"bg-background lg:bg-background","inset-max-w":"bg-background lg:bg-background","inset-no-bg":"bg-muted lg:bg-muted"},slots:{side:{root:"ff-pageSide px-4 py-4 lg:px-8 lg:py-8 pb-1 lg:pb-8 lg:border-border lg:border-r lg:w-80 w-full flex flex-col items-center lg:h-full h-fit lg:min-w-80",focus:"lg:py-10 lg:px-11 px-5 py-4 pb-4 lg:pb-10 gap-8 min-w-0 lg:min-w-0 lg:rounded-l-3xl rounded-t-3xl lg:rounded-t-none w-full lg:w-full bg-primary flex-col items-start overflow-hidden"},container:{root:"ff-pageContainer flex flex-col items-center w-full h-full lg:h-full min-h-full lg:max-w-7xl bg-transparent",focus:"max-w-5xl min-h-0 h-full lg:h-fit",focusOld:"bg-transparent lg:bg-transparent max-w-[9999px] lg:max-w-7xl rounded-t-none rounded-b-none border-0 border-border","focus-inset":"max-w-[358px] lg:max-w-3xl lg:min-h-[536px] min-h-[576px] h-fit lg:h-fit min-h-none rounded-lg border border-border bg-card lg:bg-card shadow-sm relative overflow-hidden pb-18 lg:pb-[88px]",inset:"max-w-[9999px] lg:max-w-[9999px] rounded-lg border border-border bg-card lg:bg-card shadow-sm relative overflow-hidden shadow-sm pb-18 lg:pb-[88px]","inset-max-w":"max-w-[9999px] lg:max-w-[9999px] rounded-lg border border-border bg-card lg:bg-card shadow-sm relative overflow-hidden shadow-sm pb-18 lg:pb-[88px]","inset-2col":"max-w-[9999px] lg:max-w-[1216px] rounded-lg border lg:min-h-0 lg:max-h-[800px] border-border bg-card lg:bg-card shadow-sm relative overflow-hidden shadow-sm","inset-no-bg":"max-w-[9999px] lg:max-w-[1440px] bg-transparent lg:bg-transparent shadow-sm relative overflow-hidden shadow-sm"},wrap:{root:"ff-pageWrap pt-16 pb-0 lg:pb-0 lg:pt-20 flex items-center flex-col self-stretch h-full bg-transparent lg:bg-transparent",focusOld:"pt-16 pb-28 lg:pt-24 lg:pb-28 h-full",focus:"lg:pt-0 pt-0 pb-0 lg:pb-0 min-h-screen","focus-inset":"pt-16 pb-4 lg:pt-20 lg:pb-0 bg-transparent lg:bg-transparent",inset:"px-0 pb-0 pt-16 lg:pt-20 bg-transparent lg:bg-transparent","inset-max-w":"px-0 pb-0 pt-16 lg:pt-20 bg-transparent lg:bg-transparent","inset-2col":"px-0 py-0 lg:px-0 lg:py-0 bg-transparent lg:bg-transparent","inset-no-bg":"px-0 pb-0 pt-16 lg:pt-20 bg-transparent lg:bg-transparent"},content:{root:"ff-pageContent flex gap-16 w-full self-stretch items-start h-full",focus:"lg:pt-0 pt-0 pb-0 lg:pb-0 border border-border overflow-hidden","focus-inset":"lg:gap-16 gap-0 justify-center items-start self-stretch w-full",focusOld:"justify-center",inset:"gap-16 self-stretch w-full","inset-max-w":"gap-16 self-stretch w-full justify-center overflow-x-auto lg:overflow-x-hidden","inset-2col":"lg:gap-16 gap-0 self-stretch w-full justify-center","inset-no-bg":"lg:gap-16 gap-0 self-stretch w-full items-start"},main:{root:"ff-pageMain h-full w-full bg-transparent max-w-none gap-y-6 flex flex-col items-start lg:py-6 lg:px-6 px-4 py-4 max-w-[9999px] flex-1 self-stretch overflow-x-auto lg:overflow-x-hidden",focus:"lg:px-10 lg:py-10 px-4 ly-4 w-full flex-col justify-center items-start gap-0 lg:min-h-0",focusOld:"bg-transparent lg:bg-transparent border-transparent lg:border-transparent px-0 py-0 lg:px-0 lg:py-0 max-w-[9999px] lg:max-w-3xl","focus-inset":"lg:max-w-3xl max-w-[9999px] lg:py-6 lg:px-6 px-4 py-4 lg:gap-6 gap-4 bg-transparent items-start w-full",noPadding:"lg:px-0 lg:py-0 py-0 px-0",inset:"lg:min-h-[536px] min-h-[576px] max-w-[9999px] lg:py-6 lg:px-6 px-4 py-4 lg:gap-6 gap-4 bg-transparent lg:items-center items-start","inset-2col":"lg:min-h-[536px] min-h-[576px] max-w-[9999px] lg:flex-row flex-col-reverse lg:py-0 lg:px-0 px-0 py-0 lg:gap-0 gap-0 bg-transparent lg:items-start items-start","inset-no-bg":"lg:min-h-[536px] min-h-[576px] max-w-[9999px] lg:py-6 lg:px-6 px-4 py-4 lg:gap-6 gap-4 bg-transparent lg:items-center items-start","inset-max-w":"lg:min-h-[536px] min-h-[576px] lg:h-fit h-fit lg:max-w-3xl max-w-[9999px] self-stretch lg:py-6 lg:px-6 px-4 py-4 lg:gap-6 gap-4 bg-transparent lg:items-center items-start"},inner:{root:"ff-pageInner flex flex-col items-center w-full h-full min-h-full self-stretch bg-card",focus:"lg:py-6 lg:px-6 px-2 py-2 h-full items-center justify-center min-h-screen bg-transparent",noPadding:"lg:px-0 lg:py-0 py-0 px-0",inset:"lg:px-6 px-4 pt-0 lg:pb-6 pb-4 bg-transparent","inset-max-w":"lg:px-6 px-4 pt-0 lg:pb-6 pb-4 bg-transparent","inset-2col":"lg:px-6 px-4 lg:pb-6 pb-6 lg:pt-6 pt-4 bg-transparent lg:justify-center","focus-inset":"lg:px-0 px-0 lg:pt-6 pt-2 lg:pb-12 pb-4 bg-transparent","inset-no-bg":"lg:px-0 px-0 pt-0 lg:pb-0 pb-0 bg-transparent"}},props:{layout:{props:{options:"main,focus"}}}},multiSelect:{slots:{trigger:"flex w-full items-center bg-background h-auto min-h-10 max-h-auto p-3 px-4 justify-between [&_svg]:pointer-events-auto rounded-md font-normal",wrapper:"flex flex-wrap items-center gap-2",optionIcon:"mr-2",controls:"flex items-center justify-between gap-2",separator:"flex min-h-6 h-full",noValue:"flex items-center justify-between w-full mx-auto",placeholder:"text-sm text-foreground mx-3",item:"cursor-pointer justify-normal gap-1",noClearable:"ml-2",createNew:"flex flex-col gap-2 items-center",createNewButton:"w-fit",error:"px-3 py-1.5 text-destructive text-xs",empty:"px-2 py-1.5 text-xs text-muted-foreground"},states:{selected:"flex justify-between items-center w-full"}},pdfViewer:{root:"w-full h-full font-primary",slots:{worker:{root:"rpv-core__viewer flex h-full relative border",wrapper:"w-full h-full"},toolbar:{root:"items-center rounded-sm bottom-6 flex left-1/2 p-1 absolute z-[1] bg-muted translate-x-[-50%]",icon:{root:"px-0 py-0.5",center:"px-0 py-0.5 ml-auto"}},input:"w-[40px] mr-2",viewer:"flex-1 overflow-hidden"}},phoneInput:{root:"font-primary focus:placeholder:text-muted-foreground w-full text-foreground file:disabled:placeholder:opacity-50 gap-x-2 file:disabled:opacity-50 file:disabled:opacity-50 file:disabled:opacity-50 leading-relaxed font-medium font-primary text-sm disabled:opacity-100 h-10 file:h-full gap-x-2 px-3 py-2 bg-background border-border placeholder:text-muted-foreground rounded-md focus:ring border focus:ring-blue-600 focus:ring-2 focus:ring-offset-1 focus:bg-muted focus-visible:outline-none focus:border-border focus:text-foreground disabled:opacity-50 disabled:border-border file:border-0 disabled:placeholder:opacity-50 disabled:opacity-50 disabled:opacity-50 file:bg-transparent file:border-border file:placeholder:text-muted-foreground file:text-foreground disabled:cursor-not-allowed [&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden shadow-sm",slots:{file:"text-muted-foreground",container:"relative w-full text-foreground",prefixIcon:{root:"absolute left-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:cursor-not-allowed",props:{size:"4"}},prefix:"absolute left-3 top-1/2 transform -translate-y-1/2 font-medium text-sm font-primary disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",prefixSlot:"absolute left-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",suffixIcon:{root:"absolute right-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:cursor-not-allowed",props:{size:"4"}},suffix:"absolute right-3 top-1/2 transform -translate-y-1/2 font-medium text-sm font-primary disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",suffixSlot:"absolute right-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",clearable:{root:"absolute right-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:cursor-not-allowed cursor-pointer w-5 h-5 text-primary hover:text-primary/90 active:text-primary/90 p-0 hover:bg-transparent active:bg-transparent",props:{size:"default"}},passwordIcon:"absolute right-3 cursor-pointer top-1/2 transform -translate-y-1/2 font-medium text-sm font-primary disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",clearableIconSuffix:"right-12",wrapper:"flex gap-4",selectorWrapper:"flex items-center",nativeSelect:"base-select",trigger:{layout:"flex items-center"},dialCode:"ml-2",triggerIcon:"ml-2 h-4 w-4",flagIcon:"-mr-2 h-5 w-5",content:"w-[300px] p-0",item:"gap-2",itemLabel:"flex-1 text-sm",input:"w-full",flag:"bg-muted flex h-4 w-6 overflow-hidden rounded-sm"}},popover:{root:"z-30 font-primary w-72 rounded-md border gap-0 border-border bg-popover text-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 shadow-md",slots:{trigger:"rounded-md",header:"flex flex-col gap-1 text-sm",title:"font-medium",description:"text-muted-foreground"},props:{padding:{true:"p-4",false:"p-0"}}},progress:{root:"relative h-2 w-full overflow-hidden rounded-full bg-primary/20",slots:{indicator:"h-full w-full rounded-full flex-1 bg-primary transition-all"}},radiogroup:{color:{root:"text-primary",disabled:"opacity-50"},slots:{groupe:"grid gap-2 font-primary text-foreground",item:"aspect-square group size-4 shrink-0 bg-background text-primary border-border rounded-full border shadow-xs focus:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",indicator:"flex items-center justify-center",icon:"size-2 rounded-full"}},radiogroupeField:{root:"flex gap-2 font-primary self-stretch p-px",states:{disabled:"opacity-50"}},segmented:{root:"relative",slots:{icon:"text-primary",trigger:"tab-trigger",activeTrigger:"tab-trigger-active"},states:{active:"[&>svg]:text-primary",disabled:"pointer-events-none opacity-50"}},select:{slots:{trigger:"flex w-full items-center justify-between gap-2 font-primary rounded-md px-3 py-2 border border-border bg-transparent text-sm text-muted-foreground shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:truncate h-9",scrollButton:"flex cursor-base items-center justify-center py-1",content:{root:"font-primary p-1 max-h-96 min-w-32 relative bg-popover text-popover-foreground border-border gap-y-1 border rounded-md z-30 overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 shadow-md",popper:"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1"},label:"text-sm leading-snug font-semibold bg-transparent border-transparent text-foreground pl-8 pr-2 pt-1.5 pb-1.5",item:{root:"select-none focus:outline-none relative flex w-full items-center data-[disabled]:opacity-50 data-[disabled]:opacity-50 rounded-sm pl-8 pr-2 pt-1.5 pb-1.5 font-normal text-sm leading-snug border-0 bg-transparent border-transparent hover:bg-muted/80 hover:border-transparent data-[disabled]:bg-transparent data-[disabled]:border-transparent text-foreground hover:text-foreground data-[highlighted]:text-foreground data-[highlighted]:bg-muted/80 data-[highlighted]:border-transparent",icon:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},separator:"-mx-1 my-1 h-px bg-border",viewport:"",group:"w-full",icon:"opacity-50"}},separator:{root:"bg-transparent border-border border-b text-muted-foreground rounded-full font-normal",slots:{container:{root:"flex gap-2 font-primary text-foreground",horizontal:"flex-row items-center w-full",vertical:"flex-col items-center h-full"},vertical:"h-full w-[1px] border-b-0 border-l",horizontal:"h-[1px] w-full"},props:{padding:{horizontal:"py-4",vertical:"px-4"}}},sheet:{slots:{overlay:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",content:{base:"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",variants:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},closeButton:"absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-muted",header:"flex flex-col space-y-2 text-center sm:text-left",footer:"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",title:"text-lg font-semibold text-foreground",description:"text-sm text-muted-foreground",srOnly:"sr-only"}},sidebar:{root:{base:"flex h-full w-[var(--sidebar-width)] flex-col bg-background text-foreground",props:{width:{root:"16rem",icon:"88px",mobile:"18rem"},shortcut:""},container:"flex h-full w-full flex-col",default:"group peer hidden lg:block",wrapper:{base:"duration-200 relative h-svh w-[var(--sidebar-width)] bg-transparent transition-[width] ease-linear",collapsibleOffcanvas:"group-data-[collapsible=offcanvas]:w-0",flipped:"group-data-[side=right]:rotate-180",variants:{floating:"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]",inset:"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]",default:"group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]"}},fixed:{base:"duration-200 fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] ease-linear md:flex border-border",side:{left:"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]",right:"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]"},variants:{floatingOrInset:"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]",default:"group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)] group-data-[side=left]:border-r group-data-[side=right]:border-l"},inner:"flex h-full w-full flex-col text-foreground bg-background group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-border group-data-[variant=floating]:shadow"},foreground:"text-sidebar-foreground"},slots:{sheet:{root:"w-[var(--sidebar-width)] bg-background p-0 text-foreground [&>button]:hidden"},provider:{wrapper:"group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar"},rail:"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-muted/80 group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex [[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize [[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar [[data-side=left][data-collapsible=offcanvas]_&]:-right-2 [[data-side=right][data-collapsible=offcanvas]_&]:-left-2",trigger:"p-1 flex items-center border-border justify-center bg-card [&>svg]:text-foreground [&>svg]:size-4 [&>svg]:shrink-0",separator:"mx-2 w-auto bg-muted",content:"flex min-h-0 flex-1 flex-col gap-3 overflow-auto group-data-[collapsible=icon]:overflow-hidden px-2 py-3",header:"flex flex-col gap-2 pt-6 px-6 pb-0",footer:"flex flex-col gap-2 px-4 py-4",input:"h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-teal-600",inset:"relative flex min-h-svh flex-1 flex-col bg-background peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] lg:peer-data-[variant=inset]:m-2 lg:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 lg:peer-data-[variant=inset]:ml-0 lg:peer-data-[variant=inset]:rounded-xl lg:peer-data-[variant=inset]:shadow min-h-full relative overflow-hidden",group:{root:"relative flex w-full min-w-0 flex-col px-2 py-3",label:"duration-200 flex h-8 shrink-0 items-center font-primary rounded-md px-4 text-xs font-normal text-muted-foreground outline-none transition-[margin,opa] ease-linear [&>svg]:text-foreground [&>svg]:size-4 [&>svg]:shrink-0 group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",content:"w-full text-sm",action:"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-foreground outline-none ring-teal-600 transition-transform hover:bg-muted/80 hover:text-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0 after:absolute after:-inset-2 after:lg:hidden group-data-[collapsible=icon]:hidden"},menu:{root:"flex w-full min-w-0 flex-col gap-2 py-2 px-2",item:"group/menu-item relative rounded-md font-primary font-medium",badge:"absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-foreground select-none pointer-events-none peer-hover/menu-button:text-foreground peer-data-[active=true]/menu-button:text-foreground peer-data-[size=sm]/menu-button:top-1 peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 group-data-[collapsible=icon]:hidden",action:"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-foreground outline-none ring-teal-600 transition-transform hover:bg-muted/80 hover:text-foreground focus-visible:ring-2 peer-hover/menu-button:text-foreground after:absolute after:-inset-2 after:lg:hidden peer-data-[size=sm]/menu-button:top-1 peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 group-data-[collapsible=icon]:hidden",actionHover:"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-foreground lg:opacity-0",skeleton:{root:"rounded-md h-8 flex gap-2 px-2 items-center",icon:"size-4 rounded-md",text:"h-4 flex-1 max-w-[var(--skeleton-width)]"},button:{root:"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md py-2 px-3 text-left text-sm outline-none transition-[width,height,padding] focus-visible:ring-2 active:bg-muted/80 active:text-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-muted/80 data-[active=true]:font-medium data-[active=true]:text-foreground data-[state=open]:hover:bg-muted/80 data-[state=open]: group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 font-medium",variant:{default:"items-center gap-2 overflow-hidden rounded-md font-primary font-medium px-2 py-1.5 text-muted-foreground aria-disabled:bg-transparent hover:text-foreground hover:bg-muted/80 aria-expanded:bg-background aria-expanded:text-foreground [&>svg]:aria-expanded:text-foreground aria-disabled:[&>svg]:opacity-50 aria-disabled:opacity-50 [&>svg]:hover:text-foreground [&>svg]:text-muted-foreground data-[active=true]:bg-background [&>svg]:data-[active=true]:text-foreground data-[active=true]:text-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-muted/80 hover:text-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-11 text-base",sm:"h-7 text-xs",lg:"h-12 text-sm p-0"},defaultVariants:{variant:"default",size:"default"}},sub:{list:"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",button:"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md font-primary font-medium px-3 py-2 text-muted-foreground aria-disabled:bg-transparent hover:text-foreground hover:bg-muted/80 focus-visible:ring-2 active:bg-background active:text-foreground active:[&>svg]:text-foreground aria-disabled:[&>svg]:opacity-50 aria-disabled:opacity-50 [&>svg]:hover:text-foreground [&>svg]:text-muted-foreground data-[active=true]:bg-background data-[active=true]:text-foreground group-data-[collapsible=icon]:hidden",buttonSize:{sm:"text-xs",default:"text-base",md:"text-sm"}}},srOnly:"sr-only"}},skeleton:{root:"animate-pulse rounded-md bg-accent"},spinner:{root:"animate-spin",slots:{track:"opacity-20"}},switch:{root:"peer inline-flex h-[1.15rem] w-8 shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",slots:{trigger:"pointer-events-none block size-4 rounded-full bg-background shadow ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"}},table:{root:"w-full overflow-clip caption-bottom text-sm bg-background rounded-md font-primary text-foreground",slots:{header:"[&_tr]:border-b h-12 bg-background border-border w-full",body:"[&_tr:last-child]:border-0",footer:"border-t bg-background font-medium [&>tr]:last:border-b-0",row:"items-center border-b [&>*:first-child]:pl-4 [&>*:last-child]:pr-4 border-border group transition-colors bg-background data-[state=selected]:bg-muted/80",head:"px-2 py-[10px] bg-transparent text-left align-middle font-medium text-muted-foreground text-xs",cell:"truncate px-2 h-12 align-middle [&:has([role=checkbox])]:pr-0 font-medium text-foreground text-sm",caption:"mt-4 text-sm text-muted-foreground",container:"w-full",empty:"flex items-center justify-center py-10"}},tabs:{root:"group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",slots:{list:{root:"inline-flex h-9 w-fit gap-1 items-center justify-center rounded-lg p-[3px] font-primary bg-muted text-muted-foreground",line:"bg-transparent p-0 rounded-none border-border border-none border-b gap-0 h-auto relative",indicator:"absolute bottom-0 h-[1px] z-10 bg-primary transition-all duration-300 disabled:opacity-50",solidActive:"absolute transition-all duration-300 disabled:opacity-50 h-8 rounded-md bottom-auto bg-primary left-0 shadow",solidRoot:"relative"},trigger:{root:"gap-1 font-sm leading-snug font-medium inline-flex items-center justify-center whitespace-nowrap bg-transparent transition-all disabled:cursor-not-allowed disabled:opacity-50 disabled:opacity-50",solid:"font-primary text-sm font-semibold [&>svg]:text-muted-foreground rounded-md px-3 py-1.5 text-muted-foreground data-[state=active]:text-primary-foreground data-[state=active]:[&>svg]:text-primary-foreground z-0",line:"text-muted-foreground text-base font-semibold px-4 py-2 rounded-none bg-transparent z-0 data-[state=active]:text-primary/90 data-[state=active]:[&>svg]:text-primary/90 [&>svg]:text-muted-foreground border-border border-b font-semibold"},content:"font-primary mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"}},textarea:{root:"flex field-sizing-content min-h-16 w-full font-primary rounded-md border border-border bg-transparent px-3 py-2 text-base md:text-sm shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",slots:{noResize:"resize-none"}},toast:{root:"lg:max-w-md justify-end flex",variant:{root:"flex w-full font-primary p-4 items-center gap-2 rounded-md border shadow-lg group",neutral:"bg-muted border-transparent",destructive:"bg-destructive border-transparent",warning:"bg-primary border-border",success:"bg-primary border-border",info:"bg-primary border-border"},slots:{description:{variant:{root:"leading-4 text-xs font-normal",neutral:"!text-muted-foreground flex",destructive:"!text-destructive-foreground",warning:"!text-muted-foreground",success:"!text-muted-foreground",info:"!text-muted-foreground"}},title:{variant:{root:"text-sm leading-4 font-medium",neutral:"text-foreground",destructive:"text-destructive-foreground",warning:"text-primary-foreground",success:"text-primary-foreground",info:"text-primary-foreground"}},icon:{root:"size-4",loading:"size-4 animate-spin",variant:{neutral:"text-foreground",destructive:"text-destructive-foreground",warning:"text-primary-foreground",success:"text-primary-foreground",info:"text-primary-foreground"}},content:"flex gap-1 items-start flex-col flex-1",toaster:"toaster group"}},tooltip:{slots:{content:"z-30 w-fit overflow-hidden rounded-md font-normal font-primary bg-foreground px-3 py-1.5 text-xs text-balance text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",arrow:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"}},avatarGroup:{root:"flex flex-row relative h-10 w-full font-primary",slots:{avatar:"relative -ml-2 first:ml-0"}},breadcrumb:{root:"",icons:{separator:"ChevronRight",ellipsis:"MoreHorizontal"},slots:{list:"flex flex-wrap items-center gap-1.5 text-sm break-words text-foreground sm:gap-2.5",item:"inline-flex items-center gap-1.5",link:"transition-colors hover:text-foreground",page:"font-normal text-foreground",separator:"[&>svg]:size-3.5",ellipsis:"flex size-9 items-center justify-center",icon:"size-4",srOnly:"sr-only"}},dateSlider:{root:"p-3 rounded-md font-primary",slots:{caption:{root:"flex justify-center pt-1 relative items-center",label:"text-sm text-foreground leading-snug font-medium"},months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",nav:{root:"space-x-1 flex items-center",button:{next:{root:"absolute right-1",props:{iconSize:{else:"4",ghost:"6"},defaultVariant:"ghostmain"}},root:"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",iconSize:"w-7 h-7",previous:{root:"absolute left-1",props:{iconSize:{else:"4",ghost:"6"},defaultVariant:"ghostmain"}}}},row:"flex w-full mt-2 cursor-not-allowed",table:"w-full border-collapse space-y-1",head:{row:"flex",cell:"text-muted-foreground leading-snug w-9 font-normal text-sm"},cell:"text-center text-sm p-0 relative",day:{root:"h-9 w-9 p-0 font-normal text-foreground aria-selected:opacity-100 inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background hover:bg-muted/80 aria-selected:hover:bg-primary/90",range:{end:"day-range-end",middle:"aria-selected:bg-muted/80 aria-selected:text-foreground aria-selected:hover:bg-muted/80"},selected:"bg-primary text-primary-foreground hover:bg-primary/90 hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",today:"bg-primary text-primary-foreground aria-selected:bg-primary/90 aria-selected:text-primary-foreground aria-selected:hover:bg-primary/90 aria-selected:focus:bg-primary/90",outside:"opacity-50 opacity-50 aria-selected:text-foreground day-outside aria-selected:bg-muted/80 aria-selected:hover:bg-muted/80 aria-selected:hover:text-foreground aria-selected:focus:bg-muted/80 aria-selected:focus:text-foreground",disabled:"text-foreground opacity-50",hidden:"invisible"},customRootSlider:"w-full",header:"flex justify-center pt-1 relative items-center",selectContent:"z-50",buttons:{props:{variant:"ghost"}},dialog:{false:"hidden",content:"grid gap-4",body:"grid gap-4",range:"grid gap-4"}}},dayIndicator:{root:"relative w-full min-w-10 h-10 rounded-[10px] shadow-sm flex items-center justify-center overflow-hidden",variant:{anomaly:{bg:"bg-[var(--extra-six-subtle)]",text:"text-primary"},"extra-one":{bg:"bg-[var(--extra-one-subtle)]",text:"text-[var(--extra-one-mid)]",striped:"subtle-one"},"extra-six":{bg:"bg-[var(--extra-six-subtle)]",text:"text-[var(--extra-six-strong)]",striped:"subtle-six"},"extra-two":{bg:"bg-[var(--extra-two-subtle)]",text:"text-[var(--extra-two-mid)]",striped:"subtle-two"},"extra-five":{bg:"bg-[var(--extra-five-subtle)]",text:"text-[var(--extra-five-mid)]",striped:"subtle-five"},"extra-four":{bg:"bg-[var(--extra-four-subtle)]",text:"text-[var(--extra-four-mid)]",striped:"subtle-four"},"extra-three":{bg:"bg-[var(--extra-three-subtle)]",text:"text-[var(--extra-three-mid)]",striped:"subtle-three"},"extra-seven-strong":{bg:"bg-[var(--extra-seven-strong)]",text:"text-[var(--extra-seven-subtle)]"},"extra-seven-subtle":{bg:"bg-[var(--extra-seven-subtle)]",text:"text-[var(--extra-seven-mid)]"}},slots:{bg:{full:"absolute inset-0",layer:"bg-accent",halfTop:"absolute top-0 left-0 right-0 h-1/2",halfBottom:"absolute bottom-0 left-0 right-0 h-1/2"},border:"border border-border",number:"relative z-[5] text-base font-primary",default:"extra-six",outline:{info:"border-border",main:"border-border",brand:"border-primary",success:"border-border",warning:"border-border",destructive:"border-destructive"},iconBadge:{bg:{info:"bg-primary",main:"bg-accent",brand:"bg-primary",success:"bg-primary",warning:"bg-primary",destructive:"bg-destructive"},icon:"text-white h-[14px] w-[14px]",border:"border-border",container:"absolute top-0 right-0 z-[2] flex items-center justify-center bg-primary rounded-bl-[5px] h-[14px] w-[14px]"},topBorder:"absolute top-0 left-0 right-0 h-1 bg-destructive z-[3]",bottomBorder:"absolute bottom-0 left-0 right-0 h-1 bg-primary z-[3]"}},inputNumber:{root:"font-primary focus:placeholder:text-muted-foreground w-full text-foreground file:disabled:placeholder:opacity-50 gap-x-2 file:disabled:opacity-50 file:disabled:opacity-50 file:disabled:opacity-50 leading-relaxed font-medium font-primary text-sm disabled:opacity-100 h-10 file:h-full gap-x-2 px-3 py-2 bg-background border-border placeholder:text-muted-foreground rounded-md focus:ring border focus:ring-blue-600 focus:ring-2 focus:ring-offset-1 focus:bg-muted focus-visible:outline-none focus:border-border focus:text-foreground disabled:opacity-50 disabled:border-border file:border-0 disabled:placeholder:opacity-50 disabled:opacity-50 disabled:opacity-50 file:bg-transparent file:border-border file:placeholder:text-muted-foreground file:text-foreground disabled:cursor-not-allowed [&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden shadow-sm",slots:{file:"text-muted-foreground",container:"relative w-full text-foreground",prefixIcon:{root:"absolute left-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:cursor-not-allowed",props:{size:"4"}},prefix:"absolute left-3 top-1/2 transform -translate-y-1/2 font-medium text-sm font-primary disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",prefixSlot:"absolute left-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",suffixIcon:{root:"absolute right-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:cursor-not-allowed",props:{size:"4"}},suffix:"absolute right-3 top-1/2 transform -translate-y-1/2 font-medium text-sm font-primary disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",suffixSlot:"absolute right-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",clearable:{root:"absolute right-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:cursor-not-allowed cursor-pointer w-5 h-5 text-primary hover:text-primary/90 active:text-primary/90 p-0 hover:bg-transparent active:bg-transparent",props:{size:"default"}},passwordIcon:"absolute right-3 cursor-pointer top-1/2 transform -translate-y-1/2 font-medium text-sm font-primary disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",clearableIconSuffix:"right-12",textCenter:"text-center"}},resizable:{root:"flex",icons:{handle:"GripVertical"},slots:{panel:"relative",handle:"bg-border focus-visible:ring-ring relative flex w-px items-center justify-center",handleIcon:"z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border",iconSize:"2.5"}},stepper:{root:"block w-full",slots:{nav:"group/stepper-nav inline-flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col",item:"group/step flex items-center justify-center not-last:flex-1 data-[disabled]:pointer-events-none data-[disabled]:opacity-60 group-data-[orientation=horizontal]/stepper-nav:flex-row group-data-[orientation=vertical]/stepper-nav:flex-col",trigger:"focus-visible:border-ring focus-visible:ring-ring/50 inline-flex cursor-pointer items-center gap-2.5 rounded-full outline-none focus-visible:z-10 focus-visible:ring-3 disabled:pointer-events-none disabled:opacity-60",indicator:"border-background bg-muted text-foreground data-[state=completed]:bg-primary data-[state=completed]:text-primary-foreground data-[state=active]:bg-primary data-[state=active]:text-primary-foreground relative flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full text-xs",indicatorContent:"absolute",separator:"bg-muted group-data-[state=completed]/step:bg-primary data-[state=completed]:bg-primary m-0.5 rounded-sm group-data-[orientation=horizontal]/stepper-nav:h-0.5 group-data-[orientation=horizontal]/stepper-nav:flex-1 group-data-[orientation=vertical]/stepper-nav:h-12 group-data-[orientation=vertical]/stepper-nav:w-0.5",title:"text-sm leading-none font-medium text-foreground",description:"text-sm text-muted-foreground",panel:"w-full",content:"w-full",contentHidden:"hidden"}},tabBar:{root:"pb-safe-bottom w-full justify-center border-t border-border z-20 bg-card items-center absolute bottom-0 left-1/2 transform -translate-x-1/2 flex",variant:{compact:"py-4 px-4",relaxed:"px-6 py-6"},slots:{content:"gap-3 lg:gap-8 flex flex-row w-full"},props:{maxWidth:"max-w-2xl",align:{start:"justify-start",end:"justify-end",center:"justify-center",justify:"justify-between",stretch:"[&>*]:flex-1"}}},timePicker:{slots:{trigger:"w-full",input:"w-full",wrapper:"grid gap-4",popover:{content:"w-auto p-4"},select:{root:"grid gap-2",label:"text-sm font-medium text-foreground",container:"flex flex-col gap-2",content:"max-h-48 overflow-y-auto"}}},toggle:{root:"inline-flex items-center justify-center rounded-md text-sm font-medium hover:bg-accent hover:text-accent-foreground",size:{default:"h-9 px-3",sm:"h-8 px-2",lg:"h-10 px-4"},variant:{default:"bg-transparent",outline:"border border-input bg-transparent"}},slider:{root:"relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",slots:{track:"relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5",range:"absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full",thumb:"block size-4 shrink-0 rounded-full border border-primary bg-white shadow-sm ring-ring/50 transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"}},pagination:{root:"mx-auto flex w-full justify-center",icons:{previous:"ChevronLeft",next:"ChevronRight",ellipsis:"MoreHorizontal"},slots:{content:"flex flex-row items-center gap-1",previous:"gap-1 px-2.5 sm:pl-2.5",next:"gap-1 px-2.5 sm:pr-2.5",ellipsis:"flex size-9 items-center justify-center",icon:"size-4",label:"hidden sm:block",srOnly:"sr-only"}},scrollarea:{root:"relative",slots:{viewport:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",scrollbar:"flex touch-none p-px transition-colors select-none",vertical:"h-full w-2.5 border-l border-l-transparent",horizontal:"h-2.5 flex-col border-t border-t-transparent",thumb:"relative flex-1 rounded-full bg-muted"}},hovercard:{root:"",slots:{content:"z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border bg-popover p-4 text-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95"}},contextmenu:{root:"",icons:{submenu:"ChevronRight",check:"Check",radio:"Circle"},slots:{subTrigger:"flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-muted focus:text-foreground data-[inset]:pl-8 data-[state=open]:bg-muted data-[state=open]:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4 [&_svg:not([class*=text-])]:text-foreground",subContent:"z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",content:"z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",item:"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4 [&_svg:not([class*=text-])]:text-foreground data-[variant=destructive]:*:[svg]:text-negative-mid!",checkboxItem:"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4",radioItem:"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4",indicator:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",label:"px-2 py-1.5 text-sm font-medium text-foreground data-[inset]:pl-8",separator:"-mx-1 my-1 h-px bg-muted",shortcut:"ml-auto text-xs tracking-widest text-foreground",icon:"ml-auto",checkIcon:"size-4",circleIcon:"size-2 fill-current"}},menubar:{root:"flex h-9 items-center gap-1 rounded-md border bg-background p-1 shadow-xs",icons:{submenu:"ChevronRight",check:"Check",radio:"Circle"},slots:{trigger:"flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none focus:bg-muted focus:text-foreground data-[state=open]:bg-muted data-[state=open]:text-foreground",content:"z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",item:"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4 [&_svg:not([class*=text-])]:text-foreground data-[variant=destructive]:*:[svg]:text-negative-mid!",checkboxItem:"relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4",radioItem:"relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4",subTrigger:"flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-muted focus:text-foreground data-[inset]:pl-8 data-[state=open]:bg-muted data-[state=open]:text-foreground",subContent:"z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",indicator:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",label:"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",separator:"-mx-1 my-1 h-px bg-muted",shortcut:"ml-auto text-xs tracking-widest text-foreground",icon:"ml-auto",checkIcon:"size-4",circleIcon:"size-2 fill-current"}},navigationmenu:{root:"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",icons:{trigger:"ChevronDown"},slots:{list:"group flex flex-1 list-none items-center justify-center gap-1",trigger:"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-muted/80 hover:text-foreground focus:bg-muted focus:text-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-muted/80 data-[state=open]:text-foreground data-[state=open]:focus:bg-muted data-[state=open]:bg-muted/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1",triggerIcon:"relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",content:"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto",link:"data-[active=true]:focus:bg-muted/80 data-[active=true]:hover:bg-muted/80 data-[active=true]:bg-muted/50 data-[active=true]:text-foreground hover:bg-muted/80 hover:text-foreground focus:bg-muted focus:text-foreground focus-visible:ring-ring/50 [&_svg:not([class*=text-])]:text-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*=size-])]:size-4",viewportWrapper:"absolute top-full left-0 isolate z-50 flex justify-center",viewport:"origin-top-center bg-popover text-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-md border shadow md:w-(--radix-navigation-menu-viewport-width)",indicator:"data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-1 flex h-1.5 items-end justify-center overflow-hidden",indicatorInner:"bg-muted relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md",item:"relative"}},carousel:{root:"relative",icons:{previous:"ArrowLeft",next:"ArrowRight"},slots:{viewport:"overflow-hidden",content:"flex",contentHorizontal:"-ml-4",contentVertical:"-mt-4 flex-col",item:"min-w-0 shrink-0 grow-0 basis-full",itemHorizontal:"pl-4",itemVertical:"pt-4",button:"absolute size-8 rounded-full",previousHorizontal:"top-1/2 -left-12 -translate-y-1/2",previousVertical:"-top-12 left-1/2 -translate-x-1/2 rotate-90",nextHorizontal:"top-1/2 -right-12 -translate-y-1/2",nextVertical:"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",srOnly:"sr-only"}},aspectratio:{root:""},togglegroup:{root:"group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",slots:{item:"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l"}},buttongroup:{root:"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*=w-])]:w-fit [&>input]:flex-1",slots:{horizontal:"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",vertical:"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none",text:"flex items-center gap-2 rounded-md border border-border bg-muted px-4 text-sm font-medium text-foreground shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*=size-])]:size-4",item:"flex items-center gap-2 rounded-md border border-border bg-muted px-4 text-sm font-medium text-foreground shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*=size-])]:size-4",separator:"relative m-0! self-stretch bg-muted data-[orientation=vertical]:h-auto"}},inputgroup:{root:"group/input-group relative flex w-full items-center rounded-md border border-border bg-background shadow-xs transition-[color,box-shadow] outline-none h-9 min-w-0 has-[>textarea]:h-auto has-[>[data-align=inline-start]]:[&>input]:pl-2 has-[>[data-align=inline-end]]:[&>input]:pr-2 has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[[data-slot=input-group-control]:focus-visible]:border-primary has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-disabled:opacity-50 has-disabled:opacity-50",slots:{addon:{root:"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg]:pointer-events-none [&>svg:not([class*=size-])]:size-4 [&>svg:not([class*=text-])]:text-muted-foreground",align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","block-start":"order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3","block-end":"order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3"}},button:{root:"flex items-center gap-2 text-sm shadow-none",size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*=size-])]:size-3.5",sm:"h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},text:"flex items-center gap-2 text-sm text-foreground [&_svg]:pointer-events-none [&_svg:not([class*=size-])]:size-4 [&_svg:not([class*=text-])]:text-muted-foreground",input:"flex h-full min-w-0 flex-1 rounded-none border-0 bg-transparent px-3 py-1 text-sm text-foreground placeholder:text-muted-foreground shadow-none outline-none ring-0 focus-visible:ring-0 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-transparent aria-invalid:ring-0",textarea:"flex min-h-16 w-full flex-1 resize-none rounded-none border-0 bg-transparent px-3 py-3 text-sm text-foreground placeholder:text-muted-foreground shadow-none outline-none ring-0 focus-visible:ring-0 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-transparent aria-invalid:ring-0"}},field:{root:"group/field flex w-full gap-3 data-[invalid=true]:text-destructive",slots:{fieldset:"flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",legend:"mb-3 font-medium data-[variant=legend]:text-base data-[variant=label]:text-sm",group:"group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",vertical:"flex-col [&>*]:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center [&>[data-slot=field-label]]:flex-auto",responsive:"flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto",content:"group/field-content flex flex-1 flex-col gap-1.5 leading-snug",label:"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4 has-data-[state=checked]:border-primary/80 has-data-[state=checked]:bg-primary/5 dark:has-data-[state=checked]:bg-primary/10",title:"flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",description:"text-sm leading-normal font-normal text-foreground group-has-[[data-orientation=horizontal]]/field:text-balance last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5 [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary/90",separator:"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",separatorLine:"absolute inset-0 top-1/2",separatorContent:"relative mx-auto block w-fit bg-background px-2 text-foreground",error:"text-destructive text-sm font-normal",errorList:"ml-4 flex list-disc flex-col gap-1"}},empty:{root:"flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12",slots:{header:"flex max-w-sm flex-col items-center gap-2 text-center",media:"mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",mediaDefault:"bg-transparent",mediaIcon:"flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*=size-])]:size-6",title:"text-lg font-medium tracking-tight",description:"text-sm/relaxed text-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary/90",content:"flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance"}},item:{root:"group/item flex flex-wrap items-center rounded-md border border-transparent text-sm transition-colors duration-100 outline-none focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted/50",slots:{group:"group/item-group flex flex-col",separator:"my-0",variantDefault:"bg-transparent",variantOutline:"border-border",variantMuted:"bg-muted/50",sizeDefault:"gap-4 p-4",sizeSm:"gap-2.5 px-4 py-3",media:"flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none",mediaDefault:"bg-transparent",mediaIcon:"size-8 rounded-sm border bg-muted [&_svg:not([class*=size-])]:size-4",mediaImage:"size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover",content:"flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none",title:"flex w-fit items-center gap-2 text-sm leading-snug font-medium",description:"line-clamp-2 text-sm leading-normal font-normal text-balance text-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary/90",actions:"flex items-center gap-2",header:"flex basis-full items-center justify-between gap-2",footer:"flex basis-full items-center justify-between gap-2"}},kbd:{root:"pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-foreground select-none [&_svg:not([class*=size-])]:size-3 [[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-layer-below dark:[[data-slot=tooltip-content]_&]:bg-background/10",slots:{group:"inline-flex items-center gap-1"}},nativeselect:{root:"group/native-select relative w-fit has-[select:disabled]:opacity-50",icons:{selector:"ChevronDown"},slots:{select:"h-9 w-full min-w-0 appearance-none rounded-md border border-border bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-foreground disabled:pointer-events-none disabled:cursor-not-allowed data-[size=sm]:h-8 data-[size=sm]:py-1 dark:bg-background/30 dark:hover:bg-background/50 focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",icon:"pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 text-foreground opacity-50 select-none",option:"bg-[Canvas] text-[CanvasText]"}},tagsinput:{root:"flex min-h-9 w-full flex-wrap items-center gap-2 rounded-md border border-border bg-transparent px-3 py-1 shadow-xs focus-within:border-primary focus-within:ring-[3px] focus-within:ring-ring/50 data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",icons:{delete:"X"},slots:{input:"min-w-20 flex-1 bg-transparent outline-none placeholder:text-foreground disabled:cursor-not-allowed",item:"inline-flex items-center gap-1 rounded-md border bg-muted px-2 py-1 text-sm",text:"",delete:"rounded-sm opacity-70 hover:opacity-100",icon:"size-3"}},alertdialog:{slots:{overlay:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",content:"font-primary border border-border fixed left-[50%] top-[50%] z-50 max-w-[90vw] grid w-full lg:max-w-lg translate-x-[-50%] translate-y-[-50%] gap-6 border border-border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 rounded-lg shadow-2xl",header:"flex flex-col space-y-2 gap-0.5 text-left",footer:"flex flex-row justify-end gap-4",title:"text-lg font-semibold text-foreground",description:"text-sm text-muted-foreground font-medium",media:"mb-2 inline-flex size-16 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8",cancel:"sm:mt-0"}},avatargroup:{root:"flex flex-row relative h-10 w-full font-primary",slots:{avatar:"relative -ml-2 first:ml-0"}},checkboxfield:{root:"flex items-center gap-2 font-primary w-fit",states:{disabled:"opacity-5"}},datepicker:{root:"w-[280px] justify-start text-left font-normal gap-y-0 [&>span]:truncate font-primary",slots:{button:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-normal ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 text-sm font-medium tracking-0 pl-4 pr-4 h-10 bg-muted hover:bg-accent/80 active:bg-accent/80 disabled:opacity-50 border-border hover:border-border active:border-border disabled:opacity-50 border border-t border-b border-r border-l",trigger:{popover:"w-fit justify-start font-normal text-sm leading-none",text:"truncate text-default-mid",select:"w-full mx-auto mb-2"},popover:{content:{root:"flex p-0 items-start gap-6 w-auto flex-col h-[563px] bg-popover z-50",relaxed:"flex p-0 items-start gap-6 w-auto flex-col lg:flex-row h-[522px] lg:h-auto bg-popover z-50",range:"w-auto p-0 z-50"}},separator:{root:"hidden",relaxed:"h-[397px] shrink-0 hidden lg:flex"},dateInput:{relaxed:"lg:flex-row",root:"flex justify-between gap-6 w-full flex-col",wrapper:"flex gap-2 w-full",control:"w-full justify-center",separator:"py-1"},calendar:{container:{wrapper:"h-[457px]",root:"flex flex-col gap-2 items-start justify-between",relaxed:"lg:w-[544px] h-[397px]"}},buttons:{root:"flex-1",relaxed:"lg:flex-initial",trigger:"w-fit justify-start",container:{root:"flex gap-2",relaxed:"lg:pr-4"}},selectContent:"z-50",fullWidth:"w-full"},props:{presets:{relaxed:"flex flex-col items-sart gap-2 w-[150px]"}},states:{isSelected:{true:"pointer-events-none",false:"w-full justify-start"}}},dateinput:{root:"flex border rounded-lg items-center text-sm px-1 font-medium leading-5 font-primary text-default-subtle h-10 border-border shadow-sm",slots:{arrowUp:"ArrowUp",arrowDown:"ArrowDown",arrowLeft:"ArrowLeft",arrowRight:"ArrowRight",delete:"Delete",tab:"Tab",backspace:"Backspace",enter:"Enter",inputs:{month:"p-0 outline-none w-6 border-none text-center bg-background",day:"p-0 outline-none w-7 border-none text-center bg-background",year:"p-0 outline-none w-12 border-none text-center bg-background"},span:"opacity-20 -mx-px"}},dropdownmenu:{slots:{subTrigger:{root:"flex cursor-base select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none text-foreground data-[highlighted]:bg-accent/80 data-[highlighted]:border-transparent data-[highlighted]:text-foreground",icon:"ml-auto"},subContent:"font-primary z-30 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",content:"font-primary z-30 min-w-[8rem] gap-y-1 overflow-hidden border-border rounded-md border bg-popover p-1 text-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",item:"group relative leading-snug font-normal border-0 border-transparent gap-x-2 hover:bg-muted/80 hover:border-transparent data-[disabled]:bg-transparent data-[disabled]:border-transparent text-foreground hover:text-foreground data-[disabled]:opacity-50 flex cursor-base select-none bg-transparent items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-muted/80 data-[highlighted]:border-transparent data-[highlighted]:text-foreground",destructive:{item:"group relative leading-snug font-normal border-0 border-transparent gap-x-2 hover:bg-muted/80 hover:border-transparent data-[disabled]:bg-transparent data-[disabled]:border-transparent text-destructive hover:text-destructive data-[disabled]:text-destructive flex cursor-base select-none bg-transparent items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-muted data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-muted/80 data-[highlighted]:border-transparent data-[highlighted]:text-destructive",shortcut:"ml-auto tracking-widest text-destructive"},checkbox:{item:"group relative leading-snug font-normal border-0 border-transparent gap-x-2 hover:bg-accent/80 hover:border-transparent data-[disabled]:bg-transparent data-[disabled]:border-transparent text-foreground hover:text-foreground data-[disabled]:opacity-50 flex cursor-base select-none bg-transparent items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-accent/80 data-[highlighted]:border-transparent data-[highlighted]:text-foreground",icon:"h-4 w-4 shrink-0 justify-center"},radio:{item:"relative flex cursor-base select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 text-foreground data-[highlighted]:bg-accent/80 data-[highlighted]:border-transparent data-[highlighted]:text-foreground",icon:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",indicator:"fill-current"},label:"bg-transparent border-transparent text-foreground px-2 py-1.5 rounded-sm text-sm leading-snug font-semibold",separator:"-mx-1 my-1 bg-muted h-px",inset:"pl-8",trigger:"outline-none",shortcut:"ml-auto tracking-widest text-muted-foreground group-hover:text-muted-foreground disabled:opacity-50"}},multiselect:{slots:{trigger:"flex w-full items-center bg-background h-auto min-h-10 max-h-auto p-3 px-4 justify-between [&_svg]:pointer-events-auto rounded-md font-normal",wrapper:"flex flex-wrap items-center gap-2",optionIcon:"mr-2",controls:"flex items-center justify-between gap-2",separator:"flex min-h-6 h-full",noValue:"flex items-center justify-between w-full mx-auto",placeholder:"text-sm text-foreground mx-3",item:"cursor-pointer justify-normal gap-1",noClearable:"ml-2",createNew:"flex flex-col gap-2 items-center",createNewButton:"w-fit",error:"px-3 py-1.5 text-destructive text-xs",empty:"px-2 py-1.5 text-xs text-muted-foreground"},states:{selected:"flex justify-between items-center w-full"}},pdfviewer:{root:"w-full h-full font-primary",slots:{worker:{root:"rpv-core__viewer flex h-full relative border",wrapper:"w-full h-full"},toolbar:{root:"items-center rounded-sm bottom-6 flex left-1/2 p-1 absolute z-[1] bg-muted translate-x-[-50%]",icon:{root:"px-0 py-0.5",center:"px-0 py-0.5 ml-auto"}},input:"w-[40px] mr-2",viewer:"flex-1 overflow-hidden"}},radiogroupfield:{root:"flex gap-2 font-primary self-stretch p-px",states:{disabled:"opacity-50"}},timepicker:{slots:{trigger:"w-full",input:"w-full",wrapper:"grid gap-4",popover:{content:"w-auto p-4"},select:{root:"grid gap-2",label:"text-sm font-medium text-foreground",container:"flex flex-col gap-2",content:"max-h-48 overflow-y-auto"}}},inputotp:{root:"flex items-center gap-x-2 has-[:disabled]:opacity-50 font-primary",slots:{group:"flex items-center",input:"disabled:cursor-not-allowed",slot:{root:"p-3 font-medium relative flex h-10 w-10 bg-background text-muted-foreground items-center justify-center border-y border-r border-border text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md text-center shadow-sm",active:"z-10 ring-2"},fakeCaret:{wrapper:"pointer-events-none absolute inset-0 flex items-center justify-center",root:"h-4 w-px animate-caret-blink bg-accent duration-1000"}}},phoneinput:{root:"font-primary focus:placeholder:text-muted-foreground w-full text-foreground file:disabled:placeholder:opacity-50 gap-x-2 file:disabled:opacity-50 file:disabled:opacity-50 file:disabled:opacity-50 leading-relaxed font-medium font-primary text-sm disabled:opacity-100 h-10 file:h-full gap-x-2 px-3 py-2 bg-background border-border placeholder:text-muted-foreground rounded-md focus:ring border focus:ring-blue-600 focus:ring-2 focus:ring-offset-1 focus:bg-muted focus-visible:outline-none focus:border-border focus:text-foreground disabled:opacity-50 disabled:border-border file:border-0 disabled:placeholder:opacity-50 disabled:opacity-50 disabled:opacity-50 file:bg-transparent file:border-border file:placeholder:text-muted-foreground file:text-foreground disabled:cursor-not-allowed [&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden shadow-sm",slots:{file:"text-muted-foreground",container:"relative w-full text-foreground",prefixIcon:{root:"absolute left-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:cursor-not-allowed",props:{size:"4"}},prefix:"absolute left-3 top-1/2 transform -translate-y-1/2 font-medium text-sm font-primary disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",prefixSlot:"absolute left-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",suffixIcon:{root:"absolute right-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:cursor-not-allowed",props:{size:"4"}},suffix:"absolute right-3 top-1/2 transform -translate-y-1/2 font-medium text-sm font-primary disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",suffixSlot:"absolute right-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",clearable:{root:"absolute right-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:cursor-not-allowed cursor-pointer w-5 h-5 text-primary hover:text-primary/90 active:text-primary/90 p-0 hover:bg-transparent active:bg-transparent",props:{size:"default"}},passwordIcon:"absolute right-3 cursor-pointer top-1/2 transform -translate-y-1/2 font-medium text-sm font-primary disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",clearableIconSuffix:"right-12",wrapper:"flex gap-4",selectorWrapper:"flex items-center",nativeSelect:"base-select",trigger:{layout:"flex items-center"},dialCode:"ml-2",triggerIcon:"ml-2 h-4 w-4",flagIcon:"-mr-2 h-5 w-5",content:"w-[300px] p-0",item:"gap-2",itemLabel:"flex-1 text-sm",input:"w-full",flag:"bg-muted flex h-4 w-6 overflow-hidden rounded-sm"}},inputnumber:{root:"font-primary focus:placeholder:text-muted-foreground w-full text-foreground file:disabled:placeholder:opacity-50 gap-x-2 file:disabled:opacity-50 file:disabled:opacity-50 file:disabled:opacity-50 leading-relaxed font-medium font-primary text-sm disabled:opacity-100 h-10 file:h-full gap-x-2 px-3 py-2 bg-background border-border placeholder:text-muted-foreground rounded-md focus:ring border focus:ring-blue-600 focus:ring-2 focus:ring-offset-1 focus:bg-muted focus-visible:outline-none focus:border-border focus:text-foreground disabled:opacity-50 disabled:border-border file:border-0 disabled:placeholder:opacity-50 disabled:opacity-50 disabled:opacity-50 file:bg-transparent file:border-border file:placeholder:text-muted-foreground file:text-foreground disabled:cursor-not-allowed [&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden shadow-sm",slots:{file:"text-muted-foreground",container:"relative w-full text-foreground",prefixIcon:{root:"absolute left-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:cursor-not-allowed",props:{size:"4"}},prefix:"absolute left-3 top-1/2 transform -translate-y-1/2 font-medium text-sm font-primary disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",prefixSlot:"absolute left-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",suffixIcon:{root:"absolute right-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:cursor-not-allowed",props:{size:"4"}},suffix:"absolute right-3 top-1/2 transform -translate-y-1/2 font-medium text-sm font-primary disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",suffixSlot:"absolute right-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",clearable:{root:"absolute right-3 top-1/2 transform -translate-y-1/2 disabled:opacity-100 disabled:cursor-not-allowed cursor-pointer w-5 h-5 text-primary hover:text-primary/90 active:text-primary/90 p-0 hover:bg-transparent active:bg-transparent",props:{size:"default"}},passwordIcon:"absolute right-3 cursor-pointer top-1/2 transform -translate-y-1/2 font-medium text-sm font-primary disabled:opacity-100 disabled:opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",clearableIconSuffix:"right-12",textCenter:"text-center"}},dateslider:{root:"p-3 rounded-md font-primary",slots:{caption:{root:"flex justify-center pt-1 relative items-center",label:"text-sm text-foreground leading-snug font-medium"},months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",nav:{root:"space-x-1 flex items-center",button:{next:{root:"absolute right-1",props:{iconSize:{else:"4",ghost:"6"},defaultVariant:"ghostmain"}},root:"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",iconSize:"w-7 h-7",previous:{root:"absolute left-1",props:{iconSize:{else:"4",ghost:"6"},defaultVariant:"ghostmain"}}}},row:"flex w-full mt-2 cursor-not-allowed",table:"w-full border-collapse space-y-1",head:{row:"flex",cell:"text-muted-foreground leading-snug w-9 font-normal text-sm"},cell:"text-center text-sm p-0 relative",day:{root:"h-9 w-9 p-0 font-normal text-foreground aria-selected:opacity-100 inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background hover:bg-muted/80 aria-selected:hover:bg-primary/90",range:{end:"day-range-end",middle:"aria-selected:bg-muted/80 aria-selected:text-foreground aria-selected:hover:bg-muted/80"},selected:"bg-primary text-primary-foreground hover:bg-primary/90 hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",today:"bg-primary text-primary-foreground aria-selected:bg-primary/90 aria-selected:text-primary-foreground aria-selected:hover:bg-primary/90 aria-selected:focus:bg-primary/90",outside:"opacity-50 opacity-50 aria-selected:text-foreground day-outside aria-selected:bg-muted/80 aria-selected:hover:bg-muted/80 aria-selected:hover:text-foreground aria-selected:focus:bg-muted/80 aria-selected:focus:text-foreground",disabled:"text-foreground opacity-50",hidden:"invisible"},customRootSlider:"w-full",header:"flex justify-center pt-1 relative items-center",selectContent:"z-50",buttons:{props:{variant:"ghost"}},dialog:{false:"hidden",content:"grid gap-4",body:"grid gap-4",range:"grid gap-4"}}},tabbar:{root:"pb-safe-bottom w-full justify-center border-t border-border z-20 bg-card items-center absolute bottom-0 left-1/2 transform -translate-x-1/2 flex",variant:{compact:"py-4 px-4",relaxed:"px-6 py-6"},slots:{content:"gap-3 lg:gap-8 flex flex-row w-full"},props:{maxWidth:"max-w-2xl",align:{start:"justify-start",end:"justify-end",center:"justify-center",justify:"justify-between",stretch:"[&>*]:flex-1"}}},collapsible:{root:"w-full",slots:{trigger:"inline-flex items-center justify-between gap-2",content:"overflow-hidden"}},icon:{root:"shrink-0"},themeprovider:{root:"contents",slots:{themePicker:{srOnly:"sr-only"}}},themepicker:{root:"inline-flex items-center gap-2 rounded-md border border-border bg-background p-1",slots:{icon:{light:"h-[1.2rem] w-[1.2rem] scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90",dark:"absolute h-[1.2rem] w-[1.2rem] scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0"},srOnly:"sr-only"}},fileuploader:{slots:{cursor:"cursor-pointer",borderless:"border-0"}}}});var q=p((Ce,M)=>{var ce=V(),fe={button:{root:"font-sans group inline-flex shrink-0 items-center justify-center gap-2 rounded-md border border-transparent font-medium transition-colors disabled:pointer-events-none disabled:opacity-50",variant:{main:"bg-primary text-primary-foreground hover:bg-primary/90",default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",tertiary:"border-border bg-background text-foreground hover:bg-accent hover:text-accent-foreground",outline:"border-border bg-background text-foreground hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground",ghostmain:"bg-transparent text-primary hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",linkDestructive:"text-destructive underline-offset-4 hover:underline",linkdestructive:"text-destructive underline-offset-4 hover:underline"},size:{xs:"h-8 px-2 text-xs",small:"h-9 px-3 text-sm",default:"h-10 px-4 py-2 text-sm",sm:"h-9 px-3 text-sm",icon:"h-10 w-10 px-0",lg:"h-11 px-8 text-base",large:"h-11 px-8 text-base"},iconPosition:{prefix:{sm:"pl-2",default:"pl-3",lg:"pl-4",small:"pl-2",large:"pl-4"},suffix:{sm:"pr-2",default:"pr-3",lg:"pr-4",small:"pr-2",large:"pr-4"},default:{sm:"h-9 w-9 px-0",default:"h-10 w-10 px-0",lg:"h-11 w-11 px-0",small:"h-9 w-9 px-0",large:"h-11 w-11 px-0"}},slots:{icon:{root:"gap-2",size:{xs:"3",small:"4",sm:"4",default:"4",lg:"5",large:"5",icon:"4"},color:{main:"text-primary-foreground",default:"text-primary-foreground",destructive:"text-destructive-foreground",tertiary:"text-foreground",outline:"text-foreground",secondary:"text-secondary-foreground",ghost:"text-foreground",ghostmain:"text-primary",link:"text-primary",linkDestructive:"text-destructive",linkdestructive:"text-destructive"}}},compoundVariants:{links:"h-auto p-0 text-sm font-medium"},defaultVariants:{variant:"main",size:"default"}},spinner:{root:"animate-spin text-primary"}},H=b(ce,fe);function c(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function b(t,e){if(e===void 0)return f(t);if(t===void 0)return f(e);if(c(t)!==c(e))return f(t);if(!c(t)||!c(e))return f(e);let r=f(t);for(let[o,a]of Object.entries(e))r[o]=b(t[o],a);return r}function f(t){if(t!==void 0)return JSON.parse(JSON.stringify(t))}var ge={dropdownmenu:"dropdown"},me=[["dropdown","dropdown-menu"],["alertdialog","alert-dialog"],["aspectratio","aspect-ratio"],["buttongroup","button-group"],["contextmenu","context-menu"],["hovercard","hover-card"],["inputgroup","input-group"],["inputotp","input-otp"],["nativeselect","native-select"],["navigationmenu","navigation-menu"],["radiogroup","radio-group"],["scrollarea","scroll-area"],["togglegroup","toggle-group"]],m=t=>String(t).toLowerCase().replace(/[^a-z0-9]/g,"");function U(t){let e=m(t);return ge[e]||e}function J(t){let e=new Set([t]),r=m(t);for(let a of me)if(a.some(n=>m(n)===r))for(let n of a)e.add(n);let o=new Set;for(let a of e)o.add(a),o.add(m(a)),o.add(a.replace(/[-_ ]+([a-z0-9])/g,(n,i)=>i.toUpperCase())),o.add(a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase());return[...o]}function B(t){if(!c(t))return t;for(let e of Object.keys(t))for(let r of J(e))r in t||(t[r]=t[e]);return t}function be(t){let e={},r={};for(let a of[H,t||{}])if(c(a))for(let n of Object.keys(a)){let i=U(n);e[i]=b(e[i],a[n]),(r[i]=r[i]||[]).push(n)}let o={};for(let a of Object.keys(e))for(let n of r[a])o[n]=e[a];return B(o)}M.exports={bundledDefaultConfig:H,deepMerge:b,mergeComponentsConfig:be,normalizeComponentKey:U,componentKeyVariants:J,expandComponentKeyAliases:B}});var xe=R(),{mergeComponentsConfig:$}=q(),he=require("path");function ye(t={}){let e=new xe(process.cwd()),r=null,o=$(null),a={},n=!1;return e.exists()?(r=e.load(),r&&(n=!0,o=$(r.componentsConfig),a=r.icons||{})):console.warn('[FrontFriend Next.js] No cache found. Using bundled defaults. Run "npx frontfriend init" to fetch cloud config.'),{...t,env:{...t.env,NEXT_PUBLIC_FF_CONFIG:JSON.stringify(o),NEXT_PUBLIC_FF_ICONS:JSON.stringify(a)},webpack:(i,s)=>{if(typeof t.webpack=="function"&&(i=t.webpack(i,s)),n&&typeof e.getCacheDir=="function"){let j=he.join(e.getCacheDir(),"theme.css");i.resolve=i.resolve||{},i.resolve.alias=i.resolve.alias||{},i.resolve.alias["@frontfriend/tailwind/theme"]=j,i.resolve.alias["@frontfriend/tailwind/theme.css"]=j}let{webpack:u}=s,x=u.DefinePlugin,G={__FF_CONFIG__:JSON.stringify(o),__FF_ICONS__:JSON.stringify(a)};return i.plugins=i.plugins||[],i.plugins.push(new x(G)),s.dev&&!s.isServer&&console.log("[FrontFriend Next.js] Injected configuration and icons into client build"),i}}}module.exports=ye;
1
+ var u=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var A=u((le,E)=>{var J="https://app.dev.frontfriend.dev",H="https://registry-legacy.frontfriend.dev",U=".cache/frontfriend",M={JS:["tokens.js","variables.js","semanticVariables.js","semanticDarkVariables.js","safelist.js","custom.js"],JSON:["fonts.json","icons.json","components-config.json","version.json","metadata.json"]},$={FF_ID:"FF_ID",FF_API_URL:"FF_API_URL",FF_USE_LOCAL:"FF_USE_LOCAL",FF_AUTH_TOKEN:"FF_AUTH_TOKEN"};E.exports={DEFAULT_API_URL:J,LEGACY_API_URL:H,CACHE_DIR_NAME:U,CACHE_TTL_DAYS:7,CACHE_TTL_MS:6048e5,CACHE_FILES:M,ENV_VARS:$}});var j=u((fe,w)=>{var p=class extends Error{constructor(e,n,r){super(e),this.name="APIError",this.statusCode=n,this.url=r,this.code=`API_${n}`}},F=class extends Error{constructor(e,n){super(e),this.name="CacheError",this.operation=n,this.code=`CACHE_${n.toUpperCase()}`}},m=class extends Error{constructor(e,n){super(e),this.name="ConfigError",this.field=n,this.code=n?`CONFIG_${String(n).toUpperCase()}`:"CONFIG_ERROR"}},_=class extends Error{constructor(e,n){super(e),this.name="ProcessingError",this.token=n,this.code="PROCESSING_ERROR"}};w.exports={APIError:p,CacheError:F,ConfigError:m,ProcessingError:_}});var g=u((ue,D)=>{var a=require("fs");function q(t){try{let e=a.readFileSync(t,"utf8");return JSON.parse(e)}catch(e){if(e.code==="ENOENT")return null;throw e}}function G(t){try{return a.readFileSync(t,"utf8").replace(/^\uFEFF/,"")}catch(e){if(e.code==="ENOENT")return null;throw e}}function V(t,e,n=2){let r=JSON.stringify(e,null,n);a.writeFileSync(t,r,"utf8")}function Y(t,e){a.writeFileSync(t,e,"utf8")}function B(t,e){if(e==null||typeof e=="object"&&Object.keys(e).length===0||Array.isArray(e)&&e.length===0){let r=`module.exports = ${Array.isArray(e)?"[]":"{}"};`;a.writeFileSync(t,r,"utf8")}else{let n=`module.exports = ${JSON.stringify(e,null,2)};`;a.writeFileSync(t,n,"utf8")}}function K(t){return a.existsSync(t)}function X(t){a.mkdirSync(t,{recursive:!0})}function z(t){a.rmSync(t,{recursive:!0,force:!0})}D.exports={readJsonFileSafe:q,readFileSafe:G,writeJsonFile:V,writeTextFile:Y,writeModuleExportsFile:B,fileExists:K,ensureDirectoryExists:X,removeDirectory:z}});var L=u((he,I)=>{var c=require("path"),{CACHE_DIR_NAME:Q,CACHE_TTL_MS:W,CACHE_FILES:x}=A(),{CacheError:O}=j(),{readJsonFileSafe:d,readFileSafe:Z,writeJsonFile:v,writeTextFile:N,writeModuleExportsFile:T,fileExists:S,ensureDirectoryExists:ee,removeDirectory:te}=g(),y=class{constructor(e=process.cwd()){this.appRoot=e,this.cacheDir=c.join(e,"node_modules",Q),this.metadataFile=c.join(this.cacheDir,"metadata.json"),this.maxAge=W}getCacheDir(){return this.cacheDir}isLocalOnly(){let e=d(this.metadataFile);return(e==null?void 0:e.version)==="local-components"}getIconLibrary(){let e=c.join(this.cacheDir,"iconLibrary.json");return S(e)?d(e):null}exists(){return S(this.cacheDir)}isValid(){if(!this.exists())return!1;try{let e=d(this.metadataFile);if(!e)return!1;let n=new Date(e.timestamp).getTime();return Date.now()-n<this.maxAge}catch{return!1}}load(){if(!this.exists())return null;try{let e={};for(let n of x.JS){let r=c.join(this.cacheDir,n);if(S(r)){let s=n.replace(".js","");try{let o=Z(r);if(o!==null){let f={},i={exports:f};new Function("module","exports",o)(i,f),e[s]=i.exports}}catch(o){console.warn(`[Frontfriend] Failed to load ${n}: ${o.message}`),(o.message.includes("Unexpected token")||o.message.includes("Invalid character"))&&console.warn("[Frontfriend] This might be a BOM or encoding issue. Try deleting node_modules/.cache/frontfriend and running `npx frontfriend init` again.")}}}for(let n of x.JSON){let r=c.join(this.cacheDir,n),s=n.replace(".json",""),o=d(r);o!==null&&(e[s]=o)}return e["components-config"]&&(e.componentsConfig=e["components-config"],delete e["components-config"]),e.cls&&!e.safelist&&(e.safelist=e.cls,delete e.cls),e}catch(e){throw new O(`Failed to load cache: ${e.message}`,"read")}}save(e){var n,r;try{ee(this.cacheDir);let s={timestamp:new Date().toISOString(),version:((n=e.metadata)==null?void 0:n.version)||"2.0.0",ffId:(r=e.metadata)==null?void 0:r.ffId},o=["tokens","variables","semanticVariables","semanticDarkVariables","safelist","custom"];for(let i of o)if(e[i]!==void 0){let l=c.join(this.cacheDir,`${i}.js`);T(l,e[i])}if(e.safelist&&Array.isArray(e.safelist)){let i=c.join(this.cacheDir,"safelist.js");T(i,e.safelist)}let f={fonts:e.fonts,icons:e.icons||e.iconSet,"components-config":e.componentsConfig,iconLibrary:e.iconLibrary,version:e.version};for(let[i,l]of Object.entries(f))if(l!==void 0){let h=c.join(this.cacheDir,`${i}.json`);v(h,l)}e.themeCSS!==void 0&&N(c.join(this.cacheDir,"theme.css"),e.themeCSS),e.classesContent!==void 0&&N(c.join(this.cacheDir,"classes.css"),e.classesContent),v(this.metadataFile,s)}catch(s){throw new O(`Failed to save cache: ${s.message}`,"write")}}clear(){this.exists()&&te(this.cacheDir)}};I.exports=y});var P=u((de,k)=>{var C='FrontFriend components configuration not found. Run "npx frontfriend init" or "npx frontfriend sync".',ne="FrontFriend components configuration was not returned by the SaaS app. The cache was not updated.";function b(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function R(t,e=C){if(!b(t)||Object.keys(t).length===0)throw new Error(e);return t}function se(t){if(!t.exists())throw new Error(C);let e=t.load();return{componentsConfig:R(e==null?void 0:e.componentsConfig),icons:b(e.icons)?e.icons:{}}}k.exports={CACHE_ERROR_MESSAGE:C,SAAS_ERROR_MESSAGE:ne,assertComponentsConfig:R,loadCachedComponents:se}});var re=L(),{loadCachedComponents:oe}=P(),ie=require("path");function ce(t={}){let e=new re(process.cwd()),{componentsConfig:n,icons:r}=oe(e);return{...t,env:{...t.env,NEXT_PUBLIC_FF_CONFIG:JSON.stringify(n),NEXT_PUBLIC_FF_ICONS:JSON.stringify(r)},webpack:(s,o)=>{if(typeof t.webpack=="function"&&(s=t.webpack(s,o)),typeof e.getCacheDir=="function"){let h=ie.join(e.getCacheDir(),"theme.css");s.resolve=s.resolve||{},s.resolve.alias=s.resolve.alias||{},s.resolve.alias["@frontfriend/tailwind/theme"]=h,s.resolve.alias["@frontfriend/tailwind/theme.css"]=h}let{webpack:f}=o,i=f.DefinePlugin,l={__FF_CONFIG__:JSON.stringify(n),__FF_ICONS__:JSON.stringify(r)};return s.plugins=s.plugins||[],s.plugins.push(new i(l)),o.dev&&!o.isServer&&console.log("[FrontFriend Next.js] Injected configuration and icons into client build"),s}}}module.exports=ce;
2
2
  //# sourceMappingURL=next.js.map