@alkimi.org/ui-kit 0.1.17 → 0.1.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 (48) hide show
  1. package/dist/chunk-FUYXCJOQ.js.map +1 -1
  2. package/dist/chunk-JK6CQDLQ.mjs +3 -0
  3. package/dist/chunk-JK6CQDLQ.mjs.map +1 -0
  4. package/dist/chunk-JNEIOQGF.js.map +1 -1
  5. package/dist/chunk-KJFYVVDG.js +3 -0
  6. package/dist/chunk-KJFYVVDG.js.map +1 -0
  7. package/dist/{chunk-WJXJQZGO.js → chunk-LX3KCZOW.js} +2 -2
  8. package/dist/chunk-LX3KCZOW.js.map +1 -0
  9. package/dist/chunk-PC2BSBO3.mjs +3 -0
  10. package/dist/chunk-PC2BSBO3.mjs.map +1 -0
  11. package/dist/chunk-R74QDO2Z.js.map +1 -1
  12. package/dist/chunk-SIGGW2CQ.js +3 -0
  13. package/dist/chunk-SIGGW2CQ.js.map +1 -0
  14. package/dist/chunk-V5ORUPUF.mjs +3 -0
  15. package/dist/chunk-V5ORUPUF.mjs.map +1 -0
  16. package/dist/components/GlitchLink.js.map +1 -1
  17. package/dist/components/PixelLoad.js.map +1 -1
  18. package/dist/components/TextDecoder.d.mts +3 -0
  19. package/dist/components/TextDecoder.d.ts +3 -0
  20. package/dist/components/TextDecoder.js +1 -1
  21. package/dist/components/TextDecoder.js.map +1 -1
  22. package/dist/components/TextDecoder.mjs +1 -1
  23. package/dist/components/button.js +1 -1
  24. package/dist/components/button.js.map +1 -1
  25. package/dist/components/button.mjs +1 -1
  26. package/dist/components/card.js.map +1 -1
  27. package/dist/components/tabs.js +1 -1
  28. package/dist/components/tabs.js.map +1 -1
  29. package/dist/components/tabs.mjs +1 -1
  30. package/dist/index.css +1 -1
  31. package/dist/index.css.map +1 -1
  32. package/dist/index.js +1 -1
  33. package/dist/index.js.map +1 -1
  34. package/dist/index.mjs +1 -1
  35. package/dist/styles.css +1 -1
  36. package/dist/styles.css.map +1 -1
  37. package/package.json +1 -1
  38. package/dist/chunk-2XHWLYXD.mjs +0 -3
  39. package/dist/chunk-2XHWLYXD.mjs.map +0 -1
  40. package/dist/chunk-5CDUAMIG.js +0 -3
  41. package/dist/chunk-5CDUAMIG.js.map +0 -1
  42. package/dist/chunk-74PDRKS7.js +0 -3
  43. package/dist/chunk-74PDRKS7.js.map +0 -1
  44. package/dist/chunk-AXL7HSZW.mjs +0 -3
  45. package/dist/chunk-AXL7HSZW.mjs.map +0 -1
  46. package/dist/chunk-WJXJQZGO.js.map +0 -1
  47. package/dist/chunk-XNHJPYUV.mjs +0 -3
  48. package/dist/chunk-XNHJPYUV.mjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-5CDUAMIG.js","../src/components/TextDecoder.tsx"],"names":["SYMBOLS","MAX_ITERATIONS","SPEED","scrambleText","input","word","extractText","node","React","props","result","scrambleReactNode","scrambledText","textStartIndex","text","scrambled","i","child","index","scrambledChild","originalKey"],"mappings":"AAAA,qLAAY;AACZ,sDAAuC,4ECQhC,+CAqSH,IAlSEA,CAAAA,CAAU,CAAC,IAAA,CAAM,GAAA,CAAK,GAAA,CAAK,GAAA,CAAK,GAAA,CAAK,GAAA,CAAK,GAAA,CAAK,GAAA,CAAK,GAAA,CAAK,GAAG,CAAA,CAC5DC,CAAAA,CAAiB,CAAA,CACjBC,CAAAA,CAAQ,GAAA,CAGRC,CAAAA,CAAgBC,CAAAA,EACfA,CAAAA,CAEEA,CAAAA,CACJ,KAAA,CAAM,GAAG,CAAA,CACT,GAAA,CAAKC,CAAAA,EACCA,CAAAA,CACgBL,CAAAA,CAAQ,IAAA,CAAK,KAAA,CAAM,IAAA,CAAK,MAAA,CAAO,CAAA,CAAIA,CAAAA,CAAQ,MAAM,CAAC,CAAA,CACnD,MAAA,CAAOK,CAAAA,CAAK,MAAM,CAAA,CAFpB,EAGnB,CAAA,CACA,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AA,EAAAA,CAC3BH,CAAAA,CAAe,OAAA,CAAUD,CAAAA,CAAc,MAAA,CAAA,CACzCG,CAAAA,EAAaH,CAAAA,CAAcC,CAAAA,CAAe,OAAO,CAAA,CACjDA,CAAAA,CAAe,OAAA,EAAA,CAAA,CAGfE,CAAAA,EAAaD,CAAAA,CAAKE,CAAC,CAAA,CAGvB,OAAOD,CACT,CAEA,EAAA,CAAI,KAAA,CAAM,OAAA,CAAQR,CAAI,CAAA,CACpB,OAAOA,CAAAA,CAAK,GAAA,CAAI,CAACU,CAAAA,CAAOC,CAAAA,CAAAA,EAAU,CAChC,IAAMC,CAAAA,CAAiBR,CAAAA,CACrBM,CAAAA,CACAL,CAAAA,CACAC,CACF,CAAA,CAEA,EAAA,CAAIL,eAAAA,CAAM,cAAA,CAAeW,CAAc,CAAA,CAAG,CACxC,IAAMC,CAAAA,CAAcZ,eAAAA,CAAM,cAAA,CAAeS,CAAK,CAAA,CAAIA,CAAAA,CAAM,GAAA,CAAM,IAAA,CAC9D,EAAA,CAAIE,CAAAA,CAAe,GAAA,EAAO,IAAA,EAAQC,CAAAA,EAAe,IAAA,CAC/C,OAAOZ,eAAAA,CAAM,YAAA,CAAaW,CAAAA,CAAgB,CAAE,GAAA,CAAK,CAAA,QAAA,EAAWD,CAAK,CAAA,CAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-5CDUAMIG.js","sourcesContent":[null,"\"use client\"\nimport { cn } from \"@/lib/utils\"\nimport React, {\n useState,\n useEffect,\n useMemo,\n useRef,\n Suspense,\n ReactNode,\n} from \"react\"\n\n// The symbols to use for the scrambling effect (moved outside to avoid recreation)\nconst SYMBOLS = [\"\\\\\", \"-\", \"?\", \"/\", \"#\", \"!\", \"_\", \"+\", \"<\", \">\"]\nconst MAX_ITERATIONS = 3 // How many times to scramble\nconst SPEED = 200 // Speed in milliseconds between scrambles\n\n// Helper function moved outside component to avoid recreation\nconst scrambleText = (input: string): string => {\n if (!input) return \"\"\n\n return input\n .split(\" \")\n .map((word: string) => {\n if (!word) return \"\"\n const randomSymbol = SYMBOLS[Math.floor(Math.random() * SYMBOLS.length)]\n return randomSymbol.repeat(word.length)\n })\n .join(\" \")\n}\n\n// Extract text content from React nodes recursively\n// Also checks common text props like 'text', 'label', 'title', etc.\nconst extractText = (node: ReactNode): string => {\n if (typeof node === \"string\" || typeof node === \"number\") {\n return String(node)\n }\n\n if (Array.isArray(node)) {\n return node.map(extractText).join(\"\")\n }\n\n if (React.isValidElement(node)) {\n const props = node.props as {\n children?: ReactNode\n text?: string\n label?: string\n title?: string\n [key: string]: unknown\n }\n\n let result = \"\"\n\n // Extract text from props first (in order: text, label, title)\n if (typeof props.text === \"string\") {\n result += props.text\n }\n if (typeof props.label === \"string\") {\n result += props.label\n }\n if (typeof props.title === \"string\") {\n result += props.title\n }\n\n // Then extract from children\n if (props.children) {\n result += extractText(props.children)\n }\n\n return result\n }\n\n return \"\"\n}\n\n// Clone React nodes and replace text content with scrambled text\n// This function maps scrambled text back to the original structure\nconst scrambleReactNode = (\n node: ReactNode,\n scrambledText: string,\n textStartIndex: { current: number }\n): ReactNode => {\n if (typeof node === \"string\" || typeof node === \"number\") {\n const text = String(node)\n // For each character in the original text, take the corresponding scrambled character\n // This preserves the length and structure\n let scrambled = \"\"\n for (let i = 0; i < text.length; i++) {\n if (textStartIndex.current < scrambledText.length) {\n scrambled += scrambledText[textStartIndex.current]\n textStartIndex.current++\n } else {\n // Fallback if scrambled text is shorter (shouldn't happen, but safety check)\n scrambled += text[i]\n }\n }\n return scrambled\n }\n\n if (Array.isArray(node)) {\n return node.map((child, index) => {\n const scrambledChild = scrambleReactNode(\n child,\n scrambledText,\n textStartIndex\n )\n // Preserve original key if it exists, otherwise add one for React elements\n if (React.isValidElement(scrambledChild)) {\n const originalKey = React.isValidElement(child) ? child.key : null\n if (scrambledChild.key == null && originalKey == null) {\n return React.cloneElement(scrambledChild, { key: `decoded-${index}` })\n }\n // If original had a key but scrambled doesn't, preserve it\n if (scrambledChild.key == null && originalKey != null) {\n return React.cloneElement(scrambledChild, { key: originalKey })\n }\n }\n return scrambledChild\n })\n }\n\n if (React.isValidElement(node)) {\n // Regular element handling - works for all components\n const props = node.props as {\n children?: ReactNode\n text?: string\n label?: string\n title?: string\n [key: string]: unknown\n }\n const newProps = { ...props }\n\n // Handle text props in the same order as extraction (text, label, title)\n if (typeof props.text === \"string\") {\n const text = props.text\n let scrambled = \"\"\n for (let i = 0; i < text.length; i++) {\n if (textStartIndex.current < scrambledText.length) {\n scrambled += scrambledText[textStartIndex.current]\n textStartIndex.current++\n } else {\n scrambled += text[i]\n }\n }\n newProps.text = scrambled\n }\n\n if (typeof props.label === \"string\") {\n const label = props.label\n let scrambled = \"\"\n for (let i = 0; i < label.length; i++) {\n if (textStartIndex.current < scrambledText.length) {\n scrambled += scrambledText[textStartIndex.current]\n textStartIndex.current++\n } else {\n scrambled += label[i]\n }\n }\n newProps.label = scrambled\n }\n\n if (typeof props.title === \"string\") {\n const title = props.title\n let scrambled = \"\"\n for (let i = 0; i < title.length; i++) {\n if (textStartIndex.current < scrambledText.length) {\n scrambled += scrambledText[textStartIndex.current]\n textStartIndex.current++\n } else {\n scrambled += title[i]\n }\n }\n newProps.title = scrambled\n }\n\n // Handle children after props\n if (props.children) {\n newProps.children = scrambleReactNode(\n props.children,\n scrambledText,\n textStartIndex\n )\n }\n return React.cloneElement(node, newProps)\n }\n\n return node\n}\n\nexport interface TextDecoderProps {\n children: ReactNode\n className?: string\n delay?: number // Delay in milliseconds before starting animation\n}\n\nconst TextDecoder = ({ children, className, delay = 0 }: TextDecoderProps) => {\n const [displayContent, setDisplayContent] = useState<ReactNode>(null)\n const [hasAnimated, setHasAnimated] = useState(false)\n const [showDecoded, setShowDecoded] = useState(true)\n const elementRef = useRef<HTMLSpanElement>(null)\n\n // Extract full text for scrambling\n const fullText = useMemo(() => extractText(children), [children])\n\n // Memoize initial scrambled text\n const initialScrambled = useMemo(() => scrambleText(fullText), [fullText])\n\n // Initialize with scrambled content to prevent layout shift\n useEffect(() => {\n if (!hasAnimated && fullText) {\n const textStartIndex = { current: 0 }\n const scrambledContent = scrambleReactNode(\n children,\n initialScrambled,\n textStartIndex\n )\n setDisplayContent(scrambledContent)\n setShowDecoded(true)\n }\n }, [children, initialScrambled, hasAnimated, fullText])\n\n useEffect(() => {\n if (!fullText) {\n setDisplayContent(null)\n setShowDecoded(false)\n return\n }\n\n // If already animated, hide decoded and show children\n if (hasAnimated) {\n setShowDecoded(false)\n return\n }\n\n const element = elementRef.current\n if (!element) return\n\n let iteration = 0\n let intervalId: NodeJS.Timeout | null = null\n let delayTimeoutId: NodeJS.Timeout | null = null\n\n // Intersection Observer to detect when element is visible\n const observer = new IntersectionObserver(\n (entries) => {\n const entry = entries[0]\n if (entry.isIntersecting && !hasAnimated) {\n // Start animation after delay\n delayTimeoutId = setTimeout(() => {\n // 1. Initial scramble\n const textStartIndex = { current: 0 }\n const scrambledContent = scrambleReactNode(\n children,\n initialScrambled,\n textStartIndex\n )\n setDisplayContent(scrambledContent)\n setShowDecoded(true)\n\n // 2. Set up the interval\n intervalId = setInterval(() => {\n iteration++\n\n if (iteration >= MAX_ITERATIONS) {\n // Stop scrambling, fade out decoded and fade in children\n setHasAnimated(true)\n setShowDecoded(false)\n if (intervalId) clearInterval(intervalId)\n } else {\n // Continue scrambling\n const newScrambled = scrambleText(fullText)\n const textStartIndex = { current: 0 }\n const scrambledContent = scrambleReactNode(\n children,\n newScrambled,\n textStartIndex\n )\n setDisplayContent(scrambledContent)\n }\n }, SPEED)\n }, delay)\n\n // Disconnect observer once animation starts\n observer.disconnect()\n }\n },\n {\n threshold: 0.1, // Trigger when 10% of the element is visible\n }\n )\n\n observer.observe(element)\n\n // Cleanup function\n return () => {\n observer.disconnect()\n if (intervalId) clearInterval(intervalId)\n if (delayTimeoutId) clearTimeout(delayTimeoutId)\n }\n }, [children, fullText, initialScrambled, hasAnimated, delay])\n\n const ariaLabel = useMemo(() => extractText(children), [children])\n\n return (\n <span\n ref={elementRef}\n aria-label={ariaLabel} // Accessibility: Screen readers read the real text\n className={cn(\"grid *:col-start-1 *:row-start-1\", className)}\n >\n {/* Both elements in the same grid cell - prevents width changes */}\n <span\n className={cn(\n \"transition-opacity duration-300\",\n hasAnimated ? \"opacity-100\" : \"opacity-0\"\n )}\n >\n {children}\n </span>\n {/* Decoded animation overlay in the same grid cell */}\n {showDecoded && displayContent && (\n <span className=\"transition-opacity duration-300\">\n {displayContent}\n </span>\n )}\n </span>\n )\n}\n\nconst SuspenseDecodedText = (props: TextDecoderProps) => {\n return (\n <Suspense\n fallback={\n <span className={cn(\"opacity-0\", props.className)}>\n {props.children}\n </span>\n }\n >\n <TextDecoder {...props} />\n </Suspense>\n )\n}\n\nexport default SuspenseDecodedText\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";
2
- var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _reacttabs = require('@radix-ui/react-tabs'); var e = _interopRequireWildcard(_reacttabs);var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var C=e.Root,y= exports.b =_react.forwardRef.call(void 0, ({className:r,...n},t)=>{let[c,b]=_react.useState.call(void 0, {left:0,width:0}),s=_react.useRef.call(void 0, null);_react.useEffect.call(void 0, ()=>{let i=()=>{if(!s.current)return;let f=s.current.querySelector('[data-state="active"]');if(f){let v=s.current.getBoundingClientRect(),m=f.getBoundingClientRect();b({left:m.left-v.left,width:m.width})}};i();let u=new MutationObserver(i);return s.current&&u.observe(s.current,{attributes:!0,attributeFilter:["data-state"],subtree:!0}),window.addEventListener("resize",i),()=>{u.disconnect(),window.removeEventListener("resize",i)}},[]);let d=_react.useCallback.call(void 0, i=>{s.current=i,typeof t=="function"?t(i):t&&(t.current=i)},[t]);return _jsxruntime.jsxs.call(void 0, e.List,{ref:d,className:_chunkFUYXCJOQjs.a.call(void 0, "relative inline-flex items-center justify-center rounded-3xl bg-muted p-1 text-muted-foreground",r),...n,children:[_jsxruntime.jsx.call(void 0, "span",{className:"absolute h-[calc(100%-0.5rem)] rounded-3xl bg-background shadow-sm transition-all duration-200 ease-out",style:{left:`${c.left}px`,width:`${c.width}px`}}),n.children]})});y.displayName=e.List.displayName;var P=_react.forwardRef.call(void 0, ({className:r,...n},t)=>_jsxruntime.jsx.call(void 0, e.Trigger,{ref:t,className:_chunkFUYXCJOQjs.a.call(void 0, "cursor-pointer relative inline-flex items-center justify-center whitespace-nowrap rounded-3xl px-3 py-1 text-sm font-medium ring-offset-background transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground z-10",r),...n}));P.displayName=e.Trigger.displayName;var w=_react.forwardRef.call(void 0, ({className:r,...n},t)=>_jsxruntime.jsx.call(void 0, e.Content,{ref:t,className:_chunkFUYXCJOQjs.a.call(void 0, "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",r),...n}));w.displayName=e.Content.displayName;exports.a = C; exports.b = y; exports.c = P; exports.d = w;
3
- //# sourceMappingURL=chunk-74PDRKS7.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-74PDRKS7.js","../src/components/tabs.tsx"],"names":["Tabs","TabsList","forwardRef","className","props","ref","indicatorStyle","setIndicatorStyle","useState","listRef","useRef","useEffect","updateIndicator","activeTab","listRect","tabRect","observer","combinedRef","useCallback","node","jsxs","cn","jsx"],"mappings":"AAAA,uWAAY;AACZ,sDAAuC,8FCDR,8BAGsC,+CAsEjE,IApEEA,CAAAA,CAAqB,CAAA,CAAA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,CACpB,MAAA,CAAO,mBAAA,CAAoB,QAAA,CAAUJ,CAAe,CACtD,CACF,CAAA,CAAG,CAAC,CAAC,CAAA,CAGL,IAAMK,CAAAA,CAAcC,gCAAAA,CACjBC,EAAgC,CAC7BV,CAAAA,CAA0D,OAAA,CAAUU,CAAAA,CAElE,OAAOd,CAAAA,EAAQ,UAAA,CACjBA,CAAAA,CAAIc,CAAI,CAAA,CACCd,CAAAA,EAAAA,CACPA,CAAAA,CAAsD,OAAA,CAAUc,CAAAA,CAEtE,CAAA,CACA,CAACd,CAAG,CACN,CAAA,CAEA,OACEe,8BAAAA,CAAe,CAAA,IAAA,CAAd,CACC,GAAA,CAAKH,CAAAA,CACL,SAAA,CAAWI,gCAAAA,iGACT,CACAlB,CACF,CAAA,CACC,GAAGC,CAAAA,CAGJ,QAAA,CAAA,CAAAkB,6BAAAA,MAAC,CAAA,CACC,SAAA,CAAU,yGAAA,CACV,KAAA,CAAO,CACL,IAAA,CAAM,CAAA,EAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-74PDRKS7.js","sourcesContent":[null,"import * as TabsPrimitive from \"@radix-ui/react-tabs\"\n\nimport { cn } from \"@/lib/utils\"\nimport { forwardRef, useCallback, useEffect, useRef, useState } from \"react\"\n\nconst Tabs = TabsPrimitive.Root\n\nconst TabsList = forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => {\n const [indicatorStyle, setIndicatorStyle] = useState({\n left: 0,\n width: 0,\n })\n const listRef = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n const updateIndicator = () => {\n if (!listRef.current) return\n\n const activeTab = listRef.current.querySelector(\n '[data-state=\"active\"]'\n ) as HTMLElement\n\n if (activeTab) {\n const listRect = listRef.current.getBoundingClientRect()\n const tabRect = activeTab.getBoundingClientRect()\n\n setIndicatorStyle({\n left: tabRect.left - listRect.left,\n width: tabRect.width,\n })\n }\n }\n\n updateIndicator()\n\n // Use MutationObserver to detect when data-state changes\n const observer = new MutationObserver(updateIndicator)\n\n if (listRef.current) {\n observer.observe(listRef.current, {\n attributes: true,\n attributeFilter: [\"data-state\"],\n subtree: true,\n })\n }\n\n // Also update on window resize\n window.addEventListener(\"resize\", updateIndicator)\n\n return () => {\n observer.disconnect()\n window.removeEventListener(\"resize\", updateIndicator)\n }\n }, [])\n\n // Combine refs\n const combinedRef = useCallback(\n (node: HTMLDivElement | null) => {\n ;(listRef as React.MutableRefObject<HTMLDivElement | null>).current = node\n\n if (typeof ref === \"function\") {\n ref(node)\n } else if (ref) {\n ;(ref as React.MutableRefObject<HTMLDivElement | null>).current = node\n }\n },\n [ref]\n )\n\n return (\n <TabsPrimitive.List\n ref={combinedRef}\n className={cn(\n \"relative inline-flex items-center justify-center rounded-3xl bg-muted p-1 text-muted-foreground\",\n className\n )}\n {...props}\n >\n {/* Animated indicator */}\n <span\n className=\"absolute h-[calc(100%-0.5rem)] rounded-3xl bg-background shadow-sm transition-all duration-200 ease-out\"\n style={{\n left: `${indicatorStyle.left}px`,\n width: `${indicatorStyle.width}px`,\n }}\n />\n {props.children}\n </TabsPrimitive.List>\n )\n})\nTabsList.displayName = TabsPrimitive.List.displayName\n\nconst TabsTrigger = forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n \"cursor-pointer relative inline-flex items-center justify-center whitespace-nowrap rounded-3xl px-3 py-1 text-sm font-medium ring-offset-background transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground z-10\",\n className\n )}\n {...props}\n />\n))\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName\n\nconst TabsContent = forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(\n \"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n className\n )}\n {...props}\n />\n))\nTabsContent.displayName = TabsPrimitive.Content.displayName\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\n"]}
@@ -1,3 +0,0 @@
1
- "use client";
2
- import{a as b}from"./chunk-S5TKCF6T.mjs";import a,{useState as E,useEffect as A,useMemo as S,useRef as V,Suspense as L}from"react";import{jsx as m,jsxs as _}from"react/jsx-runtime";var D=["\\","-","?","/","#","!","_","+","<",">"],O=3,H=200,v=e=>e?e.split(" ").map(n=>n?D[Math.floor(Math.random()*D.length)].repeat(n.length):"").join(" "):"",d=e=>{if(typeof e=="string"||typeof e=="number")return String(e);if(Array.isArray(e))return e.map(d).join("");if(a.isValidElement(e)){let n=e.props,r="";return typeof n.text=="string"&&(r+=n.text),typeof n.label=="string"&&(r+=n.label),typeof n.title=="string"&&(r+=n.title),n.children&&(r+=d(n.children)),r}return""},p=(e,n,r)=>{if(typeof e=="string"||typeof e=="number"){let s=String(e),i="";for(let t=0;t<s.length;t++)r.current<n.length?(i+=n[r.current],r.current++):i+=s[t];return i}if(Array.isArray(e))return e.map((s,i)=>{let t=p(s,n,r);if(a.isValidElement(t)){let l=a.isValidElement(s)?s.key:null;if(t.key==null&&l==null)return a.cloneElement(t,{key:`decoded-${i}`});if(t.key==null&&l!=null)return a.cloneElement(t,{key:l})}return t});if(a.isValidElement(e)){let s=e.props,i={...s};if(typeof s.text=="string"){let t=s.text,l="";for(let o=0;o<t.length;o++)r.current<n.length?(l+=n[r.current],r.current++):l+=t[o];i.text=l}if(typeof s.label=="string"){let t=s.label,l="";for(let o=0;o<t.length;o++)r.current<n.length?(l+=n[r.current],r.current++):l+=t[o];i.label=l}if(typeof s.title=="string"){let t=s.title,l="";for(let o=0;o<t.length;o++)r.current<n.length?(l+=n[r.current],r.current++):l+=t[o];i.title=l}return s.children&&(i.children=p(s.children,n,r)),a.cloneElement(e,i)}return e},I=({children:e,className:n,delay:r=0})=>{let[s,i]=E(null),[t,l]=E(!1),[o,u]=E(!0),k=V(null),c=S(()=>d(e),[e]),g=S(()=>v(c),[c]);A(()=>{if(!t&&c){let y=p(e,g,{current:0});i(y),u(!0)}},[e,g,t,c]),A(()=>{if(!c){i(null),u(!1);return}if(t){u(!1);return}let N=k.current;if(!N)return;let y=0,f=null,h=null,R=new IntersectionObserver(T=>{T[0].isIntersecting&&!t&&(h=setTimeout(()=>{let C=p(e,g,{current:0});i(C),u(!0),f=setInterval(()=>{if(y++,y>=O)l(!0),u(!1),f&&clearInterval(f);else{let M=v(c),P=p(e,M,{current:0});i(P)}},H)},r),R.disconnect())},{threshold:.1});return R.observe(N),()=>{R.disconnect(),f&&clearInterval(f),h&&clearTimeout(h)}},[e,c,g,t,r]);let w=S(()=>d(e),[e]);return _("span",{ref:k,"aria-label":w,className:b("grid *:col-start-1 *:row-start-1",n),children:[m("span",{className:b("transition-opacity duration-300",t?"opacity-100":"opacity-0"),children:e}),o&&s&&m("span",{className:"transition-opacity duration-300",children:s})]})},J=e=>m(L,{fallback:m("span",{className:b("opacity-0",e.className),children:e.children}),children:m(I,{...e})}),q=J;export{q as a};
3
- //# sourceMappingURL=chunk-AXL7HSZW.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/TextDecoder.tsx"],"sourcesContent":["\"use client\"\nimport { cn } from \"@/lib/utils\"\nimport React, {\n useState,\n useEffect,\n useMemo,\n useRef,\n Suspense,\n ReactNode,\n} from \"react\"\n\n// The symbols to use for the scrambling effect (moved outside to avoid recreation)\nconst SYMBOLS = [\"\\\\\", \"-\", \"?\", \"/\", \"#\", \"!\", \"_\", \"+\", \"<\", \">\"]\nconst MAX_ITERATIONS = 3 // How many times to scramble\nconst SPEED = 200 // Speed in milliseconds between scrambles\n\n// Helper function moved outside component to avoid recreation\nconst scrambleText = (input: string): string => {\n if (!input) return \"\"\n\n return input\n .split(\" \")\n .map((word: string) => {\n if (!word) return \"\"\n const randomSymbol = SYMBOLS[Math.floor(Math.random() * SYMBOLS.length)]\n return randomSymbol.repeat(word.length)\n })\n .join(\" \")\n}\n\n// Extract text content from React nodes recursively\n// Also checks common text props like 'text', 'label', 'title', etc.\nconst extractText = (node: ReactNode): string => {\n if (typeof node === \"string\" || typeof node === \"number\") {\n return String(node)\n }\n\n if (Array.isArray(node)) {\n return node.map(extractText).join(\"\")\n }\n\n if (React.isValidElement(node)) {\n const props = node.props as {\n children?: ReactNode\n text?: string\n label?: string\n title?: string\n [key: string]: unknown\n }\n\n let result = \"\"\n\n // Extract text from props first (in order: text, label, title)\n if (typeof props.text === \"string\") {\n result += props.text\n }\n if (typeof props.label === \"string\") {\n result += props.label\n }\n if (typeof props.title === \"string\") {\n result += props.title\n }\n\n // Then extract from children\n if (props.children) {\n result += extractText(props.children)\n }\n\n return result\n }\n\n return \"\"\n}\n\n// Clone React nodes and replace text content with scrambled text\n// This function maps scrambled text back to the original structure\nconst scrambleReactNode = (\n node: ReactNode,\n scrambledText: string,\n textStartIndex: { current: number }\n): ReactNode => {\n if (typeof node === \"string\" || typeof node === \"number\") {\n const text = String(node)\n // For each character in the original text, take the corresponding scrambled character\n // This preserves the length and structure\n let scrambled = \"\"\n for (let i = 0; i < text.length; i++) {\n if (textStartIndex.current < scrambledText.length) {\n scrambled += scrambledText[textStartIndex.current]\n textStartIndex.current++\n } else {\n // Fallback if scrambled text is shorter (shouldn't happen, but safety check)\n scrambled += text[i]\n }\n }\n return scrambled\n }\n\n if (Array.isArray(node)) {\n return node.map((child, index) => {\n const scrambledChild = scrambleReactNode(\n child,\n scrambledText,\n textStartIndex\n )\n // Preserve original key if it exists, otherwise add one for React elements\n if (React.isValidElement(scrambledChild)) {\n const originalKey = React.isValidElement(child) ? child.key : null\n if (scrambledChild.key == null && originalKey == null) {\n return React.cloneElement(scrambledChild, { key: `decoded-${index}` })\n }\n // If original had a key but scrambled doesn't, preserve it\n if (scrambledChild.key == null && originalKey != null) {\n return React.cloneElement(scrambledChild, { key: originalKey })\n }\n }\n return scrambledChild\n })\n }\n\n if (React.isValidElement(node)) {\n // Regular element handling - works for all components\n const props = node.props as {\n children?: ReactNode\n text?: string\n label?: string\n title?: string\n [key: string]: unknown\n }\n const newProps = { ...props }\n\n // Handle text props in the same order as extraction (text, label, title)\n if (typeof props.text === \"string\") {\n const text = props.text\n let scrambled = \"\"\n for (let i = 0; i < text.length; i++) {\n if (textStartIndex.current < scrambledText.length) {\n scrambled += scrambledText[textStartIndex.current]\n textStartIndex.current++\n } else {\n scrambled += text[i]\n }\n }\n newProps.text = scrambled\n }\n\n if (typeof props.label === \"string\") {\n const label = props.label\n let scrambled = \"\"\n for (let i = 0; i < label.length; i++) {\n if (textStartIndex.current < scrambledText.length) {\n scrambled += scrambledText[textStartIndex.current]\n textStartIndex.current++\n } else {\n scrambled += label[i]\n }\n }\n newProps.label = scrambled\n }\n\n if (typeof props.title === \"string\") {\n const title = props.title\n let scrambled = \"\"\n for (let i = 0; i < title.length; i++) {\n if (textStartIndex.current < scrambledText.length) {\n scrambled += scrambledText[textStartIndex.current]\n textStartIndex.current++\n } else {\n scrambled += title[i]\n }\n }\n newProps.title = scrambled\n }\n\n // Handle children after props\n if (props.children) {\n newProps.children = scrambleReactNode(\n props.children,\n scrambledText,\n textStartIndex\n )\n }\n return React.cloneElement(node, newProps)\n }\n\n return node\n}\n\nexport interface TextDecoderProps {\n children: ReactNode\n className?: string\n delay?: number // Delay in milliseconds before starting animation\n}\n\nconst TextDecoder = ({ children, className, delay = 0 }: TextDecoderProps) => {\n const [displayContent, setDisplayContent] = useState<ReactNode>(null)\n const [hasAnimated, setHasAnimated] = useState(false)\n const [showDecoded, setShowDecoded] = useState(true)\n const elementRef = useRef<HTMLSpanElement>(null)\n\n // Extract full text for scrambling\n const fullText = useMemo(() => extractText(children), [children])\n\n // Memoize initial scrambled text\n const initialScrambled = useMemo(() => scrambleText(fullText), [fullText])\n\n // Initialize with scrambled content to prevent layout shift\n useEffect(() => {\n if (!hasAnimated && fullText) {\n const textStartIndex = { current: 0 }\n const scrambledContent = scrambleReactNode(\n children,\n initialScrambled,\n textStartIndex\n )\n setDisplayContent(scrambledContent)\n setShowDecoded(true)\n }\n }, [children, initialScrambled, hasAnimated, fullText])\n\n useEffect(() => {\n if (!fullText) {\n setDisplayContent(null)\n setShowDecoded(false)\n return\n }\n\n // If already animated, hide decoded and show children\n if (hasAnimated) {\n setShowDecoded(false)\n return\n }\n\n const element = elementRef.current\n if (!element) return\n\n let iteration = 0\n let intervalId: NodeJS.Timeout | null = null\n let delayTimeoutId: NodeJS.Timeout | null = null\n\n // Intersection Observer to detect when element is visible\n const observer = new IntersectionObserver(\n (entries) => {\n const entry = entries[0]\n if (entry.isIntersecting && !hasAnimated) {\n // Start animation after delay\n delayTimeoutId = setTimeout(() => {\n // 1. Initial scramble\n const textStartIndex = { current: 0 }\n const scrambledContent = scrambleReactNode(\n children,\n initialScrambled,\n textStartIndex\n )\n setDisplayContent(scrambledContent)\n setShowDecoded(true)\n\n // 2. Set up the interval\n intervalId = setInterval(() => {\n iteration++\n\n if (iteration >= MAX_ITERATIONS) {\n // Stop scrambling, fade out decoded and fade in children\n setHasAnimated(true)\n setShowDecoded(false)\n if (intervalId) clearInterval(intervalId)\n } else {\n // Continue scrambling\n const newScrambled = scrambleText(fullText)\n const textStartIndex = { current: 0 }\n const scrambledContent = scrambleReactNode(\n children,\n newScrambled,\n textStartIndex\n )\n setDisplayContent(scrambledContent)\n }\n }, SPEED)\n }, delay)\n\n // Disconnect observer once animation starts\n observer.disconnect()\n }\n },\n {\n threshold: 0.1, // Trigger when 10% of the element is visible\n }\n )\n\n observer.observe(element)\n\n // Cleanup function\n return () => {\n observer.disconnect()\n if (intervalId) clearInterval(intervalId)\n if (delayTimeoutId) clearTimeout(delayTimeoutId)\n }\n }, [children, fullText, initialScrambled, hasAnimated, delay])\n\n const ariaLabel = useMemo(() => extractText(children), [children])\n\n return (\n <span\n ref={elementRef}\n aria-label={ariaLabel} // Accessibility: Screen readers read the real text\n className={cn(\"grid *:col-start-1 *:row-start-1\", className)}\n >\n {/* Both elements in the same grid cell - prevents width changes */}\n <span\n className={cn(\n \"transition-opacity duration-300\",\n hasAnimated ? \"opacity-100\" : \"opacity-0\"\n )}\n >\n {children}\n </span>\n {/* Decoded animation overlay in the same grid cell */}\n {showDecoded && displayContent && (\n <span className=\"transition-opacity duration-300\">\n {displayContent}\n </span>\n )}\n </span>\n )\n}\n\nconst SuspenseDecodedText = (props: TextDecoderProps) => {\n return (\n <Suspense\n fallback={\n <span className={cn(\"opacity-0\", props.className)}>\n {props.children}\n </span>\n }\n >\n <TextDecoder {...props} />\n </Suspense>\n )\n}\n\nexport default SuspenseDecodedText\n"],"mappings":";yCAEA,OAAOA,GACL,YAAAC,EACA,aAAAC,EACA,WAAAC,EACA,UAAAC,EACA,YAAAC,MAEK,QAqSH,OAME,OAAAC,EANF,QAAAC,MAAA,oBAlSJ,IAAMC,EAAU,CAAC,KAAM,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,GAAG,EAC5DC,EAAiB,EACjBC,EAAQ,IAGRC,EAAgBC,GACfA,EAEEA,EACJ,MAAM,GAAG,EACT,IAAKC,GACCA,EACgBL,EAAQ,KAAK,MAAM,KAAK,OAAO,EAAIA,EAAQ,MAAM,CAAC,EACnD,OAAOK,EAAK,MAAM,EAFpB,EAGnB,EACA,KAAK,GAAG,EATQ,GAcfC,EAAeC,GAA4B,CAC/C,GAAI,OAAOA,GAAS,UAAY,OAAOA,GAAS,SAC9C,OAAO,OAAOA,CAAI,EAGpB,GAAI,MAAM,QAAQA,CAAI,EACpB,OAAOA,EAAK,IAAID,CAAW,EAAE,KAAK,EAAE,EAGtC,GAAId,EAAM,eAAee,CAAI,EAAG,CAC9B,IAAMC,EAAQD,E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jE,OACEzB,EAAC,QACC,IAAKkC,EACL,aAAYW,EACZ,UAAWC,EAAG,mCAAoCpB,CAAS,EAG3D,UAAA3B,EAAC,QACC,UAAW+C,EACT,kCACAhB,EAAc,cAAgB,WAChC,EAEC,SAAAL,EACH,EAECO,GAAeJ,GACd7B,EAAC,QAAK,UAAU,kCACb,SAAA6B,EACH,GAEJ,CAEJ,EAEMmB,EAAuBtC,GAEzBV,EAACD,EAAA,CACC,SACEC,EAAC,QAAK,UAAW+C,EAAG,YAAarC,EAAM,SAAS,EAC7C,SAAAA,EAAM,SACT,EAGF,SAAAV,EAACyB,EAAA,CAAa,GAAGf,EAAO,EAC1B,EAIGuC,EAAQD","names":["React","useState","useEffect","useMemo","useRef","Suspense","jsx","jsxs","SYMBOLS","MAX_ITERATIONS","SPEED","scrambleText","input","word","extractText","node","props","result","scrambleReactNode","scrambledText","textStartIndex","text","scrambled","i","child","index","scrambledChild","originalKey","newProps","label","title","TextDecoder","children","className","delay","displayContent","setDisplayContent","hasAnimated","setHasAnimated","showDecoded","setShowDecoded","elementRef","fullText","initialScrambled","scrambledContent","element","iteration","intervalId","delayTimeoutId","observer","entries","newScrambled","ariaLabel","cn","SuspenseDecodedText","TextDecoder_default"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-WJXJQZGO.js","../src/components/button.tsx"],"names":["buttonVariants","cva","Button","className","variant","size","asChild","loading","icon","props","ref","jsxs","Slot","cn","jsx"],"mappings":"AAAA,uWAAY;AACZ,sDAAuC,uECDhB,iDACF,kEACkB,+CAwDjC,IApDAA,CAAAA,CAAiBC,yCAAAA,gSACrB,CACA,CACE,QAAA,CAAU,CACR,OAAA,CAAS,CACP,OAAA,CAAS,wDAAA,CACT,WAAA,CACE,oEAAA,CACF,OAAA,CACE,gFAAA,CACF,SAAA,CACE,8DAAA,CACF,KAAA,CAAO,8CAAA,CACP,IAAA,CAAM,iDACR,CAAA,CACA,IAAA,CAAM,CACJ,OAAA,CAAS,yBAAA,CACT,EAAA,CAAI,uBAAA,CACJ,EAAA,CAAI,0BAAA,CACJ,IAAA,CAAM,SACR,CACF,CAAA,CACA,eAAA,CAAiB,CACf,OAAA,CAAS,SAAA,CACT,IAAA,CAAM,SACR,CACF,CACF,CAAA,CAUMC,CAAAA,aAAe,CAAA,CAAA,UAAA,CACnB,CACE,CACE,SAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CAAU,CAAA,CAAA,CACV,OAAA,CAAAC,CAAAA,CAAU,CAAA,CAAA,CACV,IAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CACAC,CAAAA,CAAAA,EAIEC,8BAAAA,CAFWL,CAAUM,eAAAA,CAAO,QAAA,CAE3B,CACC,SAAA,CAAWC,gCAAAA,CAAGb,CAAe,CAAE,OAAA,CAAAI,CAAAA,CAAS,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAF,CAAU,CAAC,CAAC,CAAA,CAC1D,GAAA,CAAKO,CAAAA,CACL,QAAA,CAAUH,CAAAA,EAAWE,CAAAA,CAAM,QAAA,CAC1B,GAAGA,CAAAA,CAEH,QAAA,CAAA,CAAAF,CAAAA,EACCO,6BAAAA,KAAC,CAAA,CAAI,SAAA,CAAU,8FAAA,CAA+F,CAAA,CAE/G,CAACP,CAAAA,EAAWC,CAAAA,EAAQM,6BAAAA,MAAC,CAAA,CAAK,SAAA,CAAU,MAAA,CAAQ,QAAA,CAAAN,CAAAA,CAAK,CAAA,CACjDC,CAAAA,CAAM,QAAA,CAAA,CACT,CAGN,CAAA,CACAP,CAAAA,CAAO,WAAA,CAAc,QAAA,CAAA,6BAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-WJXJQZGO.js","sourcesContent":[null,"import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst buttonVariants = cva(\n \"inline-flex items-center cursor-pointer justify-center whitespace-nowrap rounded-3xl font-medium 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\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary/80 text-secondary-foreground hover:bg-secondary\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2 text-base\",\n sm: \"h-8 text-sm px-3 py-2\",\n lg: \"h-10 px-8 py-2 text-base\",\n icon: \"h-9 w-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean\n loading?: boolean\n icon?: React.ReactNode\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n asChild = false,\n loading = false,\n icon,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={loading || props.disabled}\n {...props}\n >\n {loading && (\n <div className=\"mr-2 h-4 w-4 animate-spin rounded-full border border-primary-foreground border-t-transparent\" />\n )}\n {!loading && icon && <span className=\"mr-2\">{icon}</span>}\n {props.children}\n </Comp>\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n"]}
@@ -1,3 +0,0 @@
1
- "use client";
2
- import{a as o}from"./chunk-S5TKCF6T.mjs";import*as a from"react";import{Slot as l}from"@radix-ui/react-slot";import{cva as f}from"class-variance-authority";import{jsx as n,jsxs as m}from"react/jsx-runtime";var p=f("inline-flex items-center cursor-pointer justify-center whitespace-nowrap rounded-3xl font-medium 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",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary/80 text-secondary-foreground hover:bg-secondary",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 text-base",sm:"h-8 text-sm px-3 py-2",lg:"h-10 px-8 py-2 text-base",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),b=a.forwardRef(({className:i,variant:s,size:d,asChild:c=!1,loading:e=!1,icon:r,...t},u)=>m(c?l:"button",{className:o(p({variant:s,size:d,className:i})),ref:u,disabled:e||t.disabled,...t,children:[e&&n("div",{className:"mr-2 h-4 w-4 animate-spin rounded-full border border-primary-foreground border-t-transparent"}),!e&&r&&n("span",{className:"mr-2",children:r}),t.children]}));b.displayName="Button";export{p as a,b};
3
- //# sourceMappingURL=chunk-XNHJPYUV.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/button.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst buttonVariants = cva(\n \"inline-flex items-center cursor-pointer justify-center whitespace-nowrap rounded-3xl font-medium 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\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary/80 text-secondary-foreground hover:bg-secondary\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2 text-base\",\n sm: \"h-8 text-sm px-3 py-2\",\n lg: \"h-10 px-8 py-2 text-base\",\n icon: \"h-9 w-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean\n loading?: boolean\n icon?: React.ReactNode\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n asChild = false,\n loading = false,\n icon,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={loading || props.disabled}\n {...props}\n >\n {loading && (\n <div className=\"mr-2 h-4 w-4 animate-spin rounded-full border border-primary-foreground border-t-transparent\" />\n )}\n {!loading && icon && <span className=\"mr-2\">{icon}</span>}\n {props.children}\n </Comp>\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n"],"mappings":";yCAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OAAS,OAAAC,MAA8B,2BAwDjC,OAOI,OAAAC,EAPJ,QAAAC,MAAA,oBApDN,IAAMC,EAAiBC,EACrB,iSACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,yDACT,YACE,qEACF,QACE,iFACF,UACE,+DACF,MAAO,+CACP,KAAM,iDACR,EACA,KAAM,CACJ,QAAS,0BACT,GAAI,wBACJ,GAAI,2BACJ,KAAM,SACR,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,SACR,CACF,CACF,EAUMC,EAAe,aACnB,CACE,CACE,UAAAC,EACA,QAAAC,EACA,KAAAC,EACA,QAAAC,EAAU,GACV,QAAAC,EAAU,GACV,KAAAC,EACA,GAAGC,CACL,EACAC,IAIEX,EAFWO,EAAUK,EAAO,SAE3B,CACC,UAAWC,EAAGZ,EAAe,CAAE,QAAAI,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,CAAC,EAC1D,IAAKO,EACL,SAAUH,GAAWE,EAAM,SAC1B,GAAGA,EAEH,UAAAF,GACCT,EAAC,OAAI,UAAU,+FAA+F,EAE/G,CAACS,GAAWC,GAAQV,EAAC,QAAK,UAAU,OAAQ,SAAAU,EAAK,EACjDC,EAAM,UACT,CAGN,EACAP,EAAO,YAAc","names":["React","Slot","cva","jsx","jsxs","buttonVariants","cva","Button","className","variant","size","asChild","loading","icon","props","ref","Slot","cn"]}