@alkimi.org/ui-kit 0.9.0 → 0.9.2

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 (169) hide show
  1. package/dist/{chunk-VNF4HDJR.mjs → chunk-2CF4QASK.mjs} +2 -2
  2. package/dist/chunk-2CF4QASK.mjs.map +1 -0
  3. package/dist/chunk-3FBDNJG5.js +3 -0
  4. package/dist/chunk-3FBDNJG5.js.map +1 -0
  5. package/dist/{chunk-WIQVLJ4E.js → chunk-5D66A4ZC.js} +2 -2
  6. package/dist/{chunk-WIQVLJ4E.js.map → chunk-5D66A4ZC.js.map} +1 -1
  7. package/dist/chunk-5X26XR44.js +3 -0
  8. package/dist/chunk-5X26XR44.js.map +1 -0
  9. package/dist/{chunk-MO2LRV57.js → chunk-65YNHKNP.js} +2 -2
  10. package/dist/{chunk-MO2LRV57.js.map → chunk-65YNHKNP.js.map} +1 -1
  11. package/dist/{chunk-XNNZN4OY.mjs → chunk-7APORI4E.mjs} +2 -2
  12. package/dist/{chunk-7FX23JBQ.mjs → chunk-AL2CF5GT.mjs} +2 -2
  13. package/dist/{chunk-BWPUNSDD.js → chunk-ANKLITGS.js} +2 -2
  14. package/dist/{chunk-BWPUNSDD.js.map → chunk-ANKLITGS.js.map} +1 -1
  15. package/dist/chunk-C7GTPYMH.mjs +3 -0
  16. package/dist/chunk-C7GTPYMH.mjs.map +1 -0
  17. package/dist/chunk-CMV76O4U.mjs +3 -0
  18. package/dist/chunk-CMV76O4U.mjs.map +1 -0
  19. package/dist/{chunk-WPUW2XFI.js → chunk-CP7BC57S.js} +2 -2
  20. package/dist/{chunk-WPUW2XFI.js.map → chunk-CP7BC57S.js.map} +1 -1
  21. package/dist/chunk-EWRKHBIV.js +3 -0
  22. package/dist/chunk-EWRKHBIV.js.map +1 -0
  23. package/dist/{chunk-HKLR7AH3.js → chunk-GVSERRZX.js} +2 -2
  24. package/dist/{chunk-HKLR7AH3.js.map → chunk-GVSERRZX.js.map} +1 -1
  25. package/dist/chunk-HRYHWWL4.mjs +3 -0
  26. package/dist/chunk-HRYHWWL4.mjs.map +1 -0
  27. package/dist/{chunk-ZF6PO6PJ.js → chunk-I5INE4KG.js} +2 -2
  28. package/dist/{chunk-ZF6PO6PJ.js.map → chunk-I5INE4KG.js.map} +1 -1
  29. package/dist/chunk-IXP2VV7S.mjs +3 -0
  30. package/dist/chunk-IXP2VV7S.mjs.map +1 -0
  31. package/dist/chunk-KGNX6UST.mjs +3 -0
  32. package/dist/chunk-KGNX6UST.mjs.map +1 -0
  33. package/dist/chunk-LCKRYIEJ.js +3 -0
  34. package/dist/chunk-LCKRYIEJ.js.map +1 -0
  35. package/dist/chunk-MSYJFTUX.js +3 -0
  36. package/dist/chunk-MSYJFTUX.js.map +1 -0
  37. package/dist/{chunk-JKSXSLVB.mjs → chunk-NGEWZBAJ.mjs} +2 -2
  38. package/dist/{chunk-7T4BNCXL.js → chunk-OXMHA73F.js} +2 -2
  39. package/dist/chunk-OXMHA73F.js.map +1 -0
  40. package/dist/{chunk-25PBXFF5.js → chunk-QMGLM2OR.js} +2 -2
  41. package/dist/chunk-QMGLM2OR.js.map +1 -0
  42. package/dist/{chunk-RLO6XENU.js → chunk-RKONP3N6.js} +2 -2
  43. package/dist/{chunk-RLO6XENU.js.map → chunk-RKONP3N6.js.map} +1 -1
  44. package/dist/{chunk-TUQM7P2C.js → chunk-RTGC7LPL.js} +2 -2
  45. package/dist/{chunk-TUQM7P2C.js.map → chunk-RTGC7LPL.js.map} +1 -1
  46. package/dist/chunk-RYJZXDJ5.mjs +3 -0
  47. package/dist/chunk-RYJZXDJ5.mjs.map +1 -0
  48. package/dist/chunk-S2TENS3V.mjs +3 -0
  49. package/dist/chunk-S2TENS3V.mjs.map +1 -0
  50. package/dist/{chunk-RJKKQWP2.js → chunk-SBL3PCZC.js} +2 -2
  51. package/dist/{chunk-RJKKQWP2.js.map → chunk-SBL3PCZC.js.map} +1 -1
  52. package/dist/{chunk-FR56YJGL.mjs → chunk-TAMQA7LM.mjs} +2 -2
  53. package/dist/{chunk-FR56YJGL.mjs.map → chunk-TAMQA7LM.mjs.map} +1 -1
  54. package/dist/{chunk-TLWWS45Z.mjs → chunk-U6XL5TKL.mjs} +2 -2
  55. package/dist/{chunk-WBCFLFLW.mjs → chunk-VDRRSPND.mjs} +2 -2
  56. package/dist/chunk-VMOF3XI2.mjs +3 -0
  57. package/dist/chunk-VMOF3XI2.mjs.map +1 -0
  58. package/dist/chunk-WY4HCUAP.mjs +3 -0
  59. package/dist/chunk-WY4HCUAP.mjs.map +1 -0
  60. package/dist/{chunk-RFYGH7BH.mjs → chunk-YENXK5HF.mjs} +2 -2
  61. package/dist/chunk-YENXK5HF.mjs.map +1 -0
  62. package/dist/chunk-ZDWAY77K.js +3 -0
  63. package/dist/{chunk-2S3AGBKQ.js.map → chunk-ZDWAY77K.js.map} +1 -1
  64. package/dist/components/GeometricFluidGrid.js +1 -1
  65. package/dist/components/GeometricFluidGrid.mjs +1 -1
  66. package/dist/components/TextDecoder.d.mts +4 -2
  67. package/dist/components/TextDecoder.d.ts +4 -2
  68. package/dist/components/TextDecoder.js +1 -1
  69. package/dist/components/TextDecoder.mjs +1 -1
  70. package/dist/components/breadcrumb.js +1 -1
  71. package/dist/components/breadcrumb.js.map +1 -1
  72. package/dist/components/breadcrumb.mjs +1 -1
  73. package/dist/components/breadcrumb.mjs.map +1 -1
  74. package/dist/components/button.d.mts +2 -2
  75. package/dist/components/button.d.ts +2 -2
  76. package/dist/components/button.js +1 -1
  77. package/dist/components/button.mjs +1 -1
  78. package/dist/components/calendar.js +1 -1
  79. package/dist/components/calendar.mjs +1 -1
  80. package/dist/components/card.d.mts +1 -0
  81. package/dist/components/card.d.ts +1 -0
  82. package/dist/components/card.js +1 -1
  83. package/dist/components/card.js.map +1 -1
  84. package/dist/components/card.mjs +1 -1
  85. package/dist/components/card.mjs.map +1 -1
  86. package/dist/components/checkbox.js +1 -1
  87. package/dist/components/checkbox.mjs +1 -1
  88. package/dist/components/combobox.d.mts +8 -3
  89. package/dist/components/combobox.d.ts +8 -3
  90. package/dist/components/combobox.js +1 -1
  91. package/dist/components/combobox.mjs +1 -1
  92. package/dist/components/command.d.mts +2 -2
  93. package/dist/components/command.d.ts +2 -2
  94. package/dist/components/command.js +1 -1
  95. package/dist/components/command.mjs +1 -1
  96. package/dist/components/date-picker.js +1 -1
  97. package/dist/components/date-picker.mjs +1 -1
  98. package/dist/components/date-range-picker.js +1 -1
  99. package/dist/components/date-range-picker.mjs +1 -1
  100. package/dist/components/dialog.js +1 -1
  101. package/dist/components/dialog.mjs +1 -1
  102. package/dist/components/drawer.js +1 -1
  103. package/dist/components/drawer.mjs +1 -1
  104. package/dist/components/file-upload.js +1 -1
  105. package/dist/components/file-upload.mjs +1 -1
  106. package/dist/components/label.js +1 -1
  107. package/dist/components/label.mjs +1 -1
  108. package/dist/components/sidebar.js +1 -1
  109. package/dist/components/sidebar.mjs +1 -1
  110. package/dist/components/slider.js +1 -1
  111. package/dist/components/slider.js.map +1 -1
  112. package/dist/components/slider.mjs +1 -1
  113. package/dist/components/slider.mjs.map +1 -1
  114. package/dist/components/table.d.mts +2 -1
  115. package/dist/components/table.d.ts +2 -1
  116. package/dist/components/table.js +1 -1
  117. package/dist/components/table.mjs +1 -1
  118. package/dist/components/tabs.js +1 -1
  119. package/dist/components/tabs.mjs +1 -1
  120. package/dist/components/tree-select.d.mts +26 -0
  121. package/dist/components/tree-select.d.ts +26 -0
  122. package/dist/components/tree-select.js +3 -0
  123. package/dist/components/tree-select.js.map +1 -0
  124. package/dist/components/tree-select.mjs +3 -0
  125. package/dist/components/tree-select.mjs.map +1 -0
  126. package/dist/index.css +1 -1
  127. package/dist/index.css.map +1 -1
  128. package/dist/index.d.mts +2 -1
  129. package/dist/index.d.ts +2 -1
  130. package/dist/index.js +1 -1
  131. package/dist/index.js.map +1 -1
  132. package/dist/index.mjs +1 -1
  133. package/dist/styles.css +1 -1
  134. package/dist/styles.css.map +1 -1
  135. package/package.json +1 -1
  136. package/dist/chunk-24H4O2Z5.js +0 -3
  137. package/dist/chunk-24H4O2Z5.js.map +0 -1
  138. package/dist/chunk-25PBXFF5.js.map +0 -1
  139. package/dist/chunk-2S3AGBKQ.js +0 -3
  140. package/dist/chunk-7T4BNCXL.js.map +0 -1
  141. package/dist/chunk-A7NIT2PJ.mjs +0 -3
  142. package/dist/chunk-A7NIT2PJ.mjs.map +0 -1
  143. package/dist/chunk-BENG4LHZ.js +0 -3
  144. package/dist/chunk-BENG4LHZ.js.map +0 -1
  145. package/dist/chunk-CDWSOB6B.mjs +0 -3
  146. package/dist/chunk-CDWSOB6B.mjs.map +0 -1
  147. package/dist/chunk-EMGXHXG7.mjs +0 -3
  148. package/dist/chunk-EMGXHXG7.mjs.map +0 -1
  149. package/dist/chunk-ERWX5WSB.js +0 -3
  150. package/dist/chunk-ERWX5WSB.js.map +0 -1
  151. package/dist/chunk-GOZDJRUZ.mjs +0 -3
  152. package/dist/chunk-GOZDJRUZ.mjs.map +0 -1
  153. package/dist/chunk-KPMYIU6M.mjs +0 -3
  154. package/dist/chunk-KPMYIU6M.mjs.map +0 -1
  155. package/dist/chunk-M3DW2W2P.js +0 -3
  156. package/dist/chunk-M3DW2W2P.js.map +0 -1
  157. package/dist/chunk-MPAY33XW.mjs +0 -3
  158. package/dist/chunk-MPAY33XW.mjs.map +0 -1
  159. package/dist/chunk-RFYGH7BH.mjs.map +0 -1
  160. package/dist/chunk-TF36SKHU.mjs +0 -3
  161. package/dist/chunk-TF36SKHU.mjs.map +0 -1
  162. package/dist/chunk-VNF4HDJR.mjs.map +0 -1
  163. package/dist/chunk-W65OWFZY.mjs +0 -3
  164. package/dist/chunk-W65OWFZY.mjs.map +0 -1
  165. /package/dist/{chunk-XNNZN4OY.mjs.map → chunk-7APORI4E.mjs.map} +0 -0
  166. /package/dist/{chunk-7FX23JBQ.mjs.map → chunk-AL2CF5GT.mjs.map} +0 -0
  167. /package/dist/{chunk-JKSXSLVB.mjs.map → chunk-NGEWZBAJ.mjs.map} +0 -0
  168. /package/dist/{chunk-TLWWS45Z.mjs.map → chunk-U6XL5TKL.mjs.map} +0 -0
  169. /package/dist/{chunk-WBCFLFLW.mjs.map → chunk-VDRRSPND.mjs.map} +0 -0
@@ -0,0 +1 @@
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 ReactNode,\n} from \"react\"\n\nconst SYMBOLS = \"!<>-_\\\\/[]{}—=+*^?#________\"\n\nconst randomChar = (symbols: string) =>\n symbols[Math.floor(Math.random() * symbols.length)]\n\nconst extractText = (node: ReactNode): string => {\n if (typeof node === \"string\" || typeof node === \"number\") return String(node)\n if (Array.isArray(node)) return node.map(extractText).join(\"\")\n if (React.isValidElement(node)) {\n const props = node.props as any\n return (\n (props.text || \"\") +\n (props.label || \"\") +\n (props.title || \"\") +\n extractText(props.children)\n )\n }\n return \"\"\n}\n\nconst injectScrambledText = (\n node: ReactNode,\n scrambledChars: (string | ReactNode)[],\n indexObj: { current: number }\n): ReactNode => {\n if (typeof node === \"string\" || typeof node === \"number\") {\n const text = String(node)\n const result: (string | ReactNode)[] = []\n for (let i = 0; i < text.length; i++) {\n result.push(\n <React.Fragment key={`char-${indexObj.current}`}>\n {scrambledChars[indexObj.current] || \"\"}\n </React.Fragment>\n )\n indexObj.current++\n }\n return result\n }\n\n if (Array.isArray(node)) {\n return node.map((child, idx) => (\n <React.Fragment key={`arr-${idx}-${indexObj.current}`}>\n {injectScrambledText(child, scrambledChars, indexObj)}\n </React.Fragment>\n ))\n }\n\n if (React.isValidElement(node)) {\n const props = node.props as any\n const newProps: any = {}\n\n if (props.children) {\n newProps.children = injectScrambledText(\n props.children,\n scrambledChars,\n indexObj\n )\n }\n return React.cloneElement(node, newProps)\n }\n return node\n}\n\nexport interface TextDecoderProps {\n children: ReactNode\n className?: string\n duration?: number\n symbols?: string\n delay?: number\n isLoading?: boolean\n speed?: number\n}\n\nexport default function TextDecoder ({\n children,\n className,\n duration = 40,\n symbols = SYMBOLS,\n delay = 0,\n isLoading = false,\n speed = 0.28,\n}: TextDecoderProps) {\n const [outputNodes, setOutputNodes] = useState<ReactNode>(null)\n const [isComplete, setIsComplete] = useState(false)\n const elementRef = useRef<HTMLSpanElement>(null)\n const frameRef = useRef(0)\n const queueRef = useRef<\n { to: string; start: number; end: number; char?: string }[]\n >([])\n const rafRef = useRef<number | null>(null)\n const hasAnimatedRef = useRef(false)\n\n const fullText = useMemo(() => extractText(children), [children])\n\n const setupQueue = () => {\n const newQueue = []\n for (let i = 0; i < fullText.length; i++) {\n const to = fullText[i]\n const start = Math.floor(Math.random() * (duration * 0.5))\n const end = start + Math.floor(Math.random() * (duration * 0.5))\n newQueue.push({ to, start, end })\n }\n queueRef.current = newQueue\n frameRef.current = 0\n setIsComplete(false)\n }\n\n const loadingCharsRef = useRef<(string | undefined)[]>([])\n\n const updateLoading = () => {\n const currentScrambledChars: (string | ReactNode)[] = []\n\n if (loadingCharsRef.current.length !== fullText.length) {\n loadingCharsRef.current = new Array(fullText.length).fill(undefined)\n }\n\n for (let i = 0; i < fullText.length; i++) {\n const char = fullText[i]\n\n if (char === \" \") {\n currentScrambledChars.push(\" \")\n } else {\n if (!loadingCharsRef.current[i] || Math.random() < speed) {\n loadingCharsRef.current[i] = randomChar(symbols)\n }\n\n currentScrambledChars.push(\n <span key={i} className=\"relative inline-block\">\n <span className=\"invisible select-none\" aria-hidden=\"true\">\n {char}\n </span>\n <span className=\"absolute inset-0 flex items-center justify-center opacity-50 font-mono leading-none\">\n {loadingCharsRef.current[i]}\n </span>\n </span>\n )\n }\n }\n\n const indexObj = { current: 0 }\n setOutputNodes(\n injectScrambledText(children, currentScrambledChars, indexObj)\n )\n\n rafRef.current = requestAnimationFrame(updateLoading)\n }\n\n const update = () => {\n let complete = 0\n const currentScrambledChars: (string | ReactNode)[] = []\n\n for (let i = 0; i < queueRef.current.length; i++) {\n const item = queueRef.current[i]\n\n if (frameRef.current >= item.end) {\n complete++\n currentScrambledChars.push(item.to)\n } else {\n if (frameRef.current >= item.start) {\n if (!item.char || Math.random() < speed) {\n item.char = randomChar(symbols)\n }\n }\n\n currentScrambledChars.push(\n <span key={i} className=\"relative inline-block\">\n <span className=\"invisible select-none\" aria-hidden=\"true\">\n {item.to === \" \" ? \"\\u00A0\" : item.to}\n </span>\n {frameRef.current >= item.start && (\n <span className=\"absolute inset-0 flex items-center justify-center opacity-50 font-mono leading-none\">\n {item.char}\n </span>\n )}\n </span>\n )\n }\n }\n\n const indexObj = { current: 0 }\n setOutputNodes(\n injectScrambledText(children, currentScrambledChars, indexObj)\n )\n\n if (complete === queueRef.current.length) {\n setIsComplete(true)\n } else {\n frameRef.current++\n rafRef.current = requestAnimationFrame(update)\n }\n }\n\n const wasLoadingRef = useRef(false)\n\n useEffect(() => {\n if (isLoading) {\n wasLoadingRef.current = true\n hasAnimatedRef.current = true\n setIsComplete(false)\n if (rafRef.current) cancelAnimationFrame(rafRef.current)\n rafRef.current = requestAnimationFrame(updateLoading)\n return () => {\n if (rafRef.current) cancelAnimationFrame(rafRef.current)\n }\n }\n\n if (wasLoadingRef.current) {\n wasLoadingRef.current = false\n setupQueue()\n rafRef.current = requestAnimationFrame(update)\n return () => {\n if (rafRef.current) cancelAnimationFrame(rafRef.current)\n }\n }\n }, [isLoading, fullText])\n\n useEffect(() => {\n if (isLoading) return\n\n const observer = new IntersectionObserver(\n (entries) => {\n if (entries[0].isIntersecting && !hasAnimatedRef.current) {\n hasAnimatedRef.current = true\n const timeoutId = setTimeout(() => {\n setupQueue()\n rafRef.current = requestAnimationFrame(update)\n }, delay)\n return () => clearTimeout(timeoutId)\n }\n },\n { threshold: 0.1 }\n )\n\n if (elementRef.current) observer.observe(elementRef.current)\n\n return () => {\n observer.disconnect()\n if (rafRef.current) cancelAnimationFrame(rafRef.current)\n }\n }, [fullText, delay, isLoading])\n\n return (\n <span\n ref={elementRef}\n className={cn(\"inline-block whitespace-pre-wrap\", className)}\n >\n {isComplete ? children : outputNodes}\n </span>\n )\n}\n"],"mappings":";yCAEA,OAAOA,GACL,YAAAC,EACA,aAAAC,EACA,WAAAC,EACA,UAAAC,MAEK,QAgCC,cAAAC,EAiGE,QAAAC,MAjGF,oBA9BR,IAAMC,EAAU,mCAEVC,EAAcC,GAClBA,EAAQ,KAAK,MAAM,KAAK,OAAO,EAAIA,EAAQ,MAAM,CAAC,EAE9CC,EAAeC,GAA4B,CAC/C,GAAI,OAAOA,GAAS,UAAY,OAAOA,GAAS,SAAU,OAAO,OAAOA,CAAI,EAC5E,GAAI,MAAM,QAAQA,CAAI,EAAG,OAAOA,EAAK,IAAID,CAAW,EAAE,KAAK,EAAE,EAC7D,GAAIV,EAAM,eAAeW,CAAI,EAAG,CAC9B,IAAMC,EAAQD,EAAK,MACnB,OACGC,EAAM,MAAQ,KACdA,EAAM,OAAS,KACfA,EAAM,OAAS,IAChBF,EAAYE,EAAM,QAAQ,CAE9B,CACA,MAAO,EACT,EAEMC,EAAsB,CAC1BF,EACAG,EACAC,IACc,CACd,GAAI,OAAOJ,GAAS,UAAY,OAAOA,GAAS,SAAU,CACxD,IAAMK,EAAO,OAAOL,CAAI,EAClBM,EAAiC,CAAC,EACxC,QAASC,EAAI,EAAGA,EAAIF,EAAK,OAAQE,IAC/BD,EAAO,KACLZ,EAACL,EAAM,SAAN,CACE,SAAAc,EAAeC,EAAS,OAAO,GAAK,IADlB,QAAQA,EAAS,OAAO,EAE7C,CACF,EACAA,EAAS,UAEX,OAAOE,CACT,CAEA,GAAI,MAAM,QAAQN,CAAI,EACpB,OAAOA,EAAK,IAAI,CAACQ,EAAOC,IACtBf,EAACL,EAAM,SAAN,CACE,SAAAa,EAAoBM,EAAOL,EAAgBC,CAAQ,GADjC,OAAOK,CAAG,IAAIL,EAAS,OAAO,EAEnD,CACD,EAGH,GAAIf,EAAM,eAAeW,CAAI,EAAG,CAC9B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ractText","node","props","injectScrambledText","scrambledChars","indexObj","text","result","i","child","idx","newProps","TextDecoder","children","className","duration","delay","isLoading","speed","outputNodes","setOutputNodes","isComplete","setIsComplete","elementRef","frameRef","queueRef","rafRef","hasAnimatedRef","fullText","setupQueue","newQueue","to","start","end","loadingCharsRef","updateLoading","currentScrambledChars","char","update","complete","item","wasLoadingRef","observer","entries","timeoutId","cn"]}
@@ -1,3 +1,3 @@
1
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; } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
2
- var _chunk3BVMHDYAjs = require('./chunk-3BVMHDYA.js');var _chunk7T4BNCXLjs = require('./chunk-7T4BNCXL.js');var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var i = _interopRequireWildcard(_react);var _reactdialog = require('@radix-ui/react-dialog'); var e = _interopRequireWildcard(_reactdialog);var _vaul = require('vaul');var _lucidereact = require('lucide-react');var _jsxruntime = require('react/jsx-runtime');var y=i.createContext({}),b= exports.a =({children:a,open:o,onOpenChange:n,...s})=>{let[p,c]=i.useState(!1),f=o!==void 0,m=f?o:p,r=f?n:R=>{c(R)};return _jsxruntime.jsx.call(void 0, e.Root,{open:m,onOpenChange:r,...s,children:_jsxruntime.jsx.call(void 0, y.Provider,{value:{open:m,onOpenChange:r},children:a})})};b.displayName="Dialog";var M=e.Trigger,P= exports.c =e.Portal,L= exports.d =e.Close,C= exports.e =i.forwardRef(({className:a,...o},n)=>_jsxruntime.jsx.call(void 0, e.Overlay,{ref:n,className:_chunkFUYXCJOQjs.a.call(void 0, "fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...o}));C.displayName=e.Overlay.displayName;var x=i.forwardRef(({className:a,children:o,showCloseButton:n=!0,closeOnOverlayClick:s=!0,...p},c)=>{let f=_chunk3BVMHDYAjs.a.call(void 0, "md"),m=i.useContext(y);return f?_jsxruntime.jsxs.call(void 0, P,{children:[_jsxruntime.jsx.call(void 0, C,{}),_jsxruntime.jsxs.call(void 0, e.Content,{ref:c,className:_chunkFUYXCJOQjs.a.call(void 0, "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background 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 sm:rounded-3xl overflow-auto",a),onPointerDownOutside:r=>{s||r.preventDefault()},onEscapeKeyDown:r=>{s||r.preventDefault()},...p,children:[o,n&&_jsxruntime.jsx.call(void 0, e.Close,{asChild:!0,children:_jsxruntime.jsxs.call(void 0, _chunk7T4BNCXLjs.b,{variant:"secondary",size:"icon",className:"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none",children:[_jsxruntime.jsx.call(void 0, _lucidereact.X,{className:"h-4 w-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Close"})]})})]})]}):_jsxruntime.jsx.call(void 0, P,{children:_jsxruntime.jsx.call(void 0, _vaul.Drawer.Root,{open:m.open,onOpenChange:m.onOpenChange,dismissible:s,children:_jsxruntime.jsxs.call(void 0, _vaul.Drawer.Portal,{children:[_jsxruntime.jsx.call(void 0, _vaul.Drawer.Overlay,{className:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm"}),_jsxruntime.jsxs.call(void 0, _vaul.Drawer.Content,{ref:c,className:_chunkFUYXCJOQjs.a.call(void 0, "fixed inset-x-0 bottom-0 z-50 mt-24 flex flex-col rounded-t-3xl border border-border bg-background shadow-lg outline-none",a),"aria-describedby":void 0,onPointerDownOutside:r=>{s||r.preventDefault()},onEscapeKeyDown:r=>{s||r.preventDefault()},...p,children:[_jsxruntime.jsx.call(void 0, "div",{className:"mx-auto mt-2 h-2 w-[100px] rounded-full bg-muted"}),n&&_jsxruntime.jsxs.call(void 0, _chunk7T4BNCXLjs.b,{variant:"secondary",size:"icon",onClick:()=>_optionalChain([m, 'access', _ => _.onOpenChange, 'optionalCall', _2 => _2(!1)]),className:"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none",children:[_jsxruntime.jsx.call(void 0, _lucidereact.X,{className:"h-4 w-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Close"})]}),_jsxruntime.jsx.call(void 0, "div",{children:o})]})]})})})});x.displayName=e.Content.displayName;var N=({className:a,...o})=>_jsxruntime.jsx.call(void 0, "div",{className:_chunkFUYXCJOQjs.a.call(void 0, "flex flex-col space-y-1.5 text-center sm:text-left",a),...o});N.displayName="DialogHeader";var w=({className:a,...o})=>_jsxruntime.jsx.call(void 0, "div",{className:_chunkFUYXCJOQjs.a.call(void 0, "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...o});w.displayName="DialogFooter";var h=i.forwardRef(({className:a,...o},n)=>_jsxruntime.jsx.call(void 0, e.Title,{ref:n,className:_chunkFUYXCJOQjs.a.call(void 0, "text-lg font-semibold leading-none tracking-tight",a),...o}));h.displayName=e.Title.displayName;var T=i.forwardRef(({className:a,...o},n)=>_jsxruntime.jsx.call(void 0, e.Description,{ref:n,className:_chunkFUYXCJOQjs.a.call(void 0, "text-sm text-muted-foreground",a),...o}));T.displayName=e.Description.displayName;exports.a = b; exports.b = M; exports.c = P; exports.d = L; exports.e = C; exports.f = x; exports.g = N; exports.h = w; exports.i = h; exports.j = T;
3
- //# sourceMappingURL=chunk-WPUW2XFI.js.map
2
+ var _chunk3BVMHDYAjs = require('./chunk-3BVMHDYA.js');var _chunkOXMHA73Fjs = require('./chunk-OXMHA73F.js');var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var i = _interopRequireWildcard(_react);var _reactdialog = require('@radix-ui/react-dialog'); var e = _interopRequireWildcard(_reactdialog);var _vaul = require('vaul');var _lucidereact = require('lucide-react');var _jsxruntime = require('react/jsx-runtime');var y=i.createContext({}),b= exports.a =({children:a,open:o,onOpenChange:n,...s})=>{let[p,c]=i.useState(!1),f=o!==void 0,m=f?o:p,r=f?n:R=>{c(R)};return _jsxruntime.jsx.call(void 0, e.Root,{open:m,onOpenChange:r,...s,children:_jsxruntime.jsx.call(void 0, y.Provider,{value:{open:m,onOpenChange:r},children:a})})};b.displayName="Dialog";var M=e.Trigger,P= exports.c =e.Portal,L= exports.d =e.Close,C= exports.e =i.forwardRef(({className:a,...o},n)=>_jsxruntime.jsx.call(void 0, e.Overlay,{ref:n,className:_chunkFUYXCJOQjs.a.call(void 0, "fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...o}));C.displayName=e.Overlay.displayName;var x=i.forwardRef(({className:a,children:o,showCloseButton:n=!0,closeOnOverlayClick:s=!0,...p},c)=>{let f=_chunk3BVMHDYAjs.a.call(void 0, "md"),m=i.useContext(y);return f?_jsxruntime.jsxs.call(void 0, P,{children:[_jsxruntime.jsx.call(void 0, C,{}),_jsxruntime.jsxs.call(void 0, e.Content,{ref:c,className:_chunkFUYXCJOQjs.a.call(void 0, "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background 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 sm:rounded-3xl overflow-auto",a),onPointerDownOutside:r=>{s||r.preventDefault()},onEscapeKeyDown:r=>{s||r.preventDefault()},...p,children:[o,n&&_jsxruntime.jsx.call(void 0, e.Close,{asChild:!0,children:_jsxruntime.jsxs.call(void 0, _chunkOXMHA73Fjs.b,{variant:"secondary",size:"icon",className:"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none",children:[_jsxruntime.jsx.call(void 0, _lucidereact.X,{className:"h-4 w-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Close"})]})})]})]}):_jsxruntime.jsx.call(void 0, P,{children:_jsxruntime.jsx.call(void 0, _vaul.Drawer.Root,{open:m.open,onOpenChange:m.onOpenChange,dismissible:s,children:_jsxruntime.jsxs.call(void 0, _vaul.Drawer.Portal,{children:[_jsxruntime.jsx.call(void 0, _vaul.Drawer.Overlay,{className:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm"}),_jsxruntime.jsxs.call(void 0, _vaul.Drawer.Content,{ref:c,className:_chunkFUYXCJOQjs.a.call(void 0, "fixed inset-x-0 bottom-0 z-50 mt-24 flex flex-col rounded-t-3xl border border-border bg-background shadow-lg outline-none",a),"aria-describedby":void 0,onPointerDownOutside:r=>{s||r.preventDefault()},onEscapeKeyDown:r=>{s||r.preventDefault()},...p,children:[_jsxruntime.jsx.call(void 0, "div",{className:"mx-auto mt-2 h-2 w-[100px] rounded-full bg-muted"}),n&&_jsxruntime.jsxs.call(void 0, _chunkOXMHA73Fjs.b,{variant:"secondary",size:"icon",onClick:()=>_optionalChain([m, 'access', _ => _.onOpenChange, 'optionalCall', _2 => _2(!1)]),className:"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none",children:[_jsxruntime.jsx.call(void 0, _lucidereact.X,{className:"h-4 w-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Close"})]}),_jsxruntime.jsx.call(void 0, "div",{children:o})]})]})})})});x.displayName=e.Content.displayName;var N=({className:a,...o})=>_jsxruntime.jsx.call(void 0, "div",{className:_chunkFUYXCJOQjs.a.call(void 0, "flex flex-col space-y-1.5 text-left md:text-center",a),...o});N.displayName="DialogHeader";var w=({className:a,...o})=>_jsxruntime.jsx.call(void 0, "div",{className:_chunkFUYXCJOQjs.a.call(void 0, "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...o});w.displayName="DialogFooter";var h=i.forwardRef(({className:a,...o},n)=>_jsxruntime.jsx.call(void 0, e.Title,{ref:n,className:_chunkFUYXCJOQjs.a.call(void 0, "text-lg font-semibold leading-none tracking-tight",a),...o}));h.displayName=e.Title.displayName;var T=i.forwardRef(({className:a,...o},n)=>_jsxruntime.jsx.call(void 0, e.Description,{ref:n,className:_chunkFUYXCJOQjs.a.call(void 0, "text-sm text-muted-foreground",a),...o}));T.displayName=e.Description.displayName;exports.a = b; exports.b = M; exports.c = P; exports.d = L; exports.e = C; exports.f = x; exports.g = N; exports.h = w; exports.i = h; exports.j = T;
3
+ //# sourceMappingURL=chunk-CP7BC57S.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-WPUW2XFI.js","../src/components/dialog.tsx"],"names":["DialogContentContext","Dialog","children","controlledOpen","controlledOnOpenChange","props","internalOpen","setInternalOpen","isControlled","open","onOpenChange","newOpen","jsx","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","ref","cn","DialogContent","showCloseButton","closeOnOverlayClick","isDesktop","useMediaQuery","context","jsxs","e","Button","X","DrawerPrimitive","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":"AAAA,22BAAY;AACZ,sDAAuC,sDAAwC,sDAAwC,uECChG,oGACU,4BACS,2CACxB,+CAgCZ,IArB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AAAA,EAC1BN,6BAAAA,CAAiB,CAAA,WAAA,CAAhB,CACC,GAAA,CAAKM,CAAAA,CACL,SAAA,CAAWC,gCAAAA,+BAAG,CAAiCF,CAAS,CAAA,CACvD,GAAGZ,CAAAA,CACN,CACD,CAAA,CACD6B,CAAAA,CAAkB,WAAA,CAA8B,CAAA,CAAA,WAAA,CAAY,WAAA,CAAA,qJAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-WPUW2XFI.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { Drawer as DrawerPrimitive } from \"vaul\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"./button\"\nimport { useMediaQuery } from \"@/lib/use-media-query\"\n\ninterface DialogContentContextValue {\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}\n\nconst DialogContentContext = React.createContext<DialogContentContextValue>({})\n\nconst Dialog = ({\n children,\n open: controlledOpen,\n onOpenChange: controlledOnOpenChange,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) => {\n // Use internal state when Dialog is uncontrolled\n const [internalOpen, setInternalOpen] = React.useState(false)\n\n const isControlled = controlledOpen !== undefined\n const open = isControlled ? controlledOpen : internalOpen\n const onOpenChange = isControlled\n ? controlledOnOpenChange\n : (newOpen: boolean) => {\n setInternalOpen(newOpen)\n }\n\n return (\n <DialogPrimitive.Root open={open} onOpenChange={onOpenChange} {...props}>\n <DialogContentContext.Provider value={{ open, onOpenChange }}>\n {children}\n </DialogContentContext.Provider>\n </DialogPrimitive.Root>\n )\n}\nDialog.displayName = \"Dialog\"\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n closeOnOverlayClick?: boolean\n }\n>(\n (\n {\n className,\n children,\n showCloseButton = true,\n closeOnOverlayClick = true,\n ...props\n },\n ref\n ) => {\n const isDesktop = useMediaQuery(\"md\")\n const context = React.useContext(DialogContentContext)\n\n if (!isDesktop) {\n // Mobile: Render as bottom drawer\n return (\n <DialogPortal>\n <DrawerPrimitive.Root\n open={context.open}\n onOpenChange={context.onOpenChange}\n dismissible={closeOnOverlayClick}\n >\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm\" />\n <DrawerPrimitive.Content\n ref={ref as any}\n className={cn(\n \"fixed inset-x-0 bottom-0 z-50 mt-24 flex flex-col rounded-t-3xl border border-border bg-background shadow-lg outline-none\",\n className\n )}\n aria-describedby={undefined}\n onPointerDownOutside={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n onEscapeKeyDown={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n {...props}\n >\n <div className=\"mx-auto mt-2 h-2 w-[100px] rounded-full bg-muted\" />\n {showCloseButton && (\n <Button\n variant=\"secondary\"\n size=\"icon\"\n onClick={() => context.onOpenChange?.(false)}\n className=\"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none\"\n >\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </Button>\n )}\n <div>{children}</div>\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n </DrawerPrimitive.Root>\n </DialogPortal>\n )\n }\n\n // Desktop: Render as centered dialog\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background 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 sm:rounded-3xl overflow-auto\",\n className\n )}\n onPointerDownOutside={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n onEscapeKeyDown={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close asChild>\n <Button\n variant=\"secondary\"\n size=\"icon\"\n className=\"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none\"\n >\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </Button>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n }\n)\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n)\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n)\nDialogFooter.displayName = \"DialogFooter\"\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"]}
1
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-CP7BC57S.js","../src/components/dialog.tsx"],"names":["DialogContentContext","Dialog","children","controlledOpen","controlledOnOpenChange","props","internalOpen","setInternalOpen","isControlled","open","onOpenChange","newOpen","jsx","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","ref","cn","DialogContent","showCloseButton","closeOnOverlayClick","isDesktop","useMediaQuery","context","jsxs","e","Button","X","DrawerPrimitive","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":"AAAA,22BAAY;AACZ,sDAAuC,sDAAwC,sDAAwC,uECChG,oGACU,4BACS,2CACxB,+CAgCZ,IArBAA,CAAAA,CAA6B,CAAA,CAAA,aAAA,CAAyC,CAAC,CAAC,CAAA,CAExEC,CAAAA,aAAS,CAAC,CACd,QAAA,CAAAC,CAAAA,CACA,IAAA,CAAMC,CAAAA,CACN,YAAA,CAAcC,CAAAA,CACd,GAAGC,CACL,CAAA,CAAA,EAAyD,CAEvD,GAAM,CAACC,CAAAA,CAAcC,CAAe,CAAA,CAAU,CAAA,CAAA,QAAA,CAAS,CAAA,CAAK,CA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k-CP7BC57S.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { Drawer as DrawerPrimitive } from \"vaul\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"./button\"\nimport { useMediaQuery } from \"@/lib/use-media-query\"\n\ninterface DialogContentContextValue {\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}\n\nconst DialogContentContext = React.createContext<DialogContentContextValue>({})\n\nconst Dialog = ({\n children,\n open: controlledOpen,\n onOpenChange: controlledOnOpenChange,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) => {\n // Use internal state when Dialog is uncontrolled\n const [internalOpen, setInternalOpen] = React.useState(false)\n\n const isControlled = controlledOpen !== undefined\n const open = isControlled ? controlledOpen : internalOpen\n const onOpenChange = isControlled\n ? controlledOnOpenChange\n : (newOpen: boolean) => {\n setInternalOpen(newOpen)\n }\n\n return (\n <DialogPrimitive.Root open={open} onOpenChange={onOpenChange} {...props}>\n <DialogContentContext.Provider value={{ open, onOpenChange }}>\n {children}\n </DialogContentContext.Provider>\n </DialogPrimitive.Root>\n )\n}\nDialog.displayName = \"Dialog\"\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n closeOnOverlayClick?: boolean\n }\n>(\n (\n {\n className,\n children,\n showCloseButton = true,\n closeOnOverlayClick = true,\n ...props\n },\n ref\n ) => {\n const isDesktop = useMediaQuery(\"md\")\n const context = React.useContext(DialogContentContext)\n\n if (!isDesktop) {\n // Mobile: Render as bottom drawer\n return (\n <DialogPortal>\n <DrawerPrimitive.Root\n open={context.open}\n onOpenChange={context.onOpenChange}\n dismissible={closeOnOverlayClick}\n >\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm\" />\n <DrawerPrimitive.Content\n ref={ref as any}\n className={cn(\n \"fixed inset-x-0 bottom-0 z-50 mt-24 flex flex-col rounded-t-3xl border border-border bg-background shadow-lg outline-none\",\n className\n )}\n aria-describedby={undefined}\n onPointerDownOutside={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n onEscapeKeyDown={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n {...props}\n >\n <div className=\"mx-auto mt-2 h-2 w-[100px] rounded-full bg-muted\" />\n {showCloseButton && (\n <Button\n variant=\"secondary\"\n size=\"icon\"\n onClick={() => context.onOpenChange?.(false)}\n className=\"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none\"\n >\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </Button>\n )}\n <div>{children}</div>\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n </DrawerPrimitive.Root>\n </DialogPortal>\n )\n }\n\n // Desktop: Render as centered dialog\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background 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 sm:rounded-3xl overflow-auto\",\n className\n )}\n onPointerDownOutside={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n onEscapeKeyDown={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close asChild>\n <Button\n variant=\"secondary\"\n size=\"icon\"\n className=\"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none\"\n >\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </Button>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n }\n)\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-left md:text-center\",\n className\n )}\n {...props}\n />\n)\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n)\nDialogFooter.displayName = \"DialogFooter\"\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"use client";
2
+ var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var _react2 = _interopRequireDefault(_react);var _jsxruntime = require('react/jsx-runtime');var j="!<>-_\\/[]{}\u2014=+*^?#________",C=e=>e[Math.floor(Math.random()*e.length)],S=e=>{if(typeof e=="string"||typeof e=="number")return String(e);if(Array.isArray(e))return e.map(S).join("");if(_react2.default.isValidElement(e)){let s=e.props;return(s.text||"")+(s.label||"")+(s.title||"")+S(s.children)}return""},N=(e,s,i)=>{if(typeof e=="string"||typeof e=="number"){let l=String(e),c=[];for(let m=0;m<l.length;m++)c.push(_jsxruntime.jsx.call(void 0, _react2.default.Fragment,{children:s[i.current]||""},`char-${i.current}`)),i.current++;return c}if(Array.isArray(e))return e.map((l,c)=>_jsxruntime.jsx.call(void 0, _react2.default.Fragment,{children:N(l,s,i)},`arr-${c}-${i.current}`));if(_react2.default.isValidElement(e)){let l=e.props,c={};return l.children&&(c.children=N(l.children,s,i)),_react2.default.cloneElement(e,c)}return e};function L({children:e,className:s,duration:i=40,symbols:l=j,delay:c=0,isLoading:m=!1,speed:T=.28}){let[D,_]=_react.useState.call(void 0, null),[P,y]=_react.useState.call(void 0, !1),A=_react.useRef.call(void 0, null),g=_react.useRef.call(void 0, 0),b=_react.useRef.call(void 0, []),t=_react.useRef.call(void 0, null),F=_react.useRef.call(void 0, !1),f=_react.useMemo.call(void 0, ()=>S(e),[e]),k=()=>{let r=[];for(let u=0;u<f.length;u++){let n=f[u],o=Math.floor(Math.random()*(i*.5)),a=o+Math.floor(Math.random()*(i*.5));r.push({to:n,start:o,end:a})}b.current=r,g.current=0,y(!1)},d=_react.useRef.call(void 0, []),v=()=>{let r=[];d.current.length!==f.length&&(d.current=new Array(f.length).fill(void 0));for(let n=0;n<f.length;n++){let o=f[n];o===" "?r.push(" "):((!d.current[n]||Math.random()<T)&&(d.current[n]=C(l)),r.push(_jsxruntime.jsxs.call(void 0, "span",{className:"relative inline-block",children:[_jsxruntime.jsx.call(void 0, "span",{className:"invisible select-none","aria-hidden":"true",children:o}),_jsxruntime.jsx.call(void 0, "span",{className:"absolute inset-0 flex items-center justify-center opacity-50 font-mono leading-none",children:d.current[n]})]},n)))}_(N(e,r,{current:0})),t.current=requestAnimationFrame(v)},x=()=>{let r=0,u=[];for(let o=0;o<b.current.length;o++){let a=b.current[o];g.current>=a.end?(r++,u.push(a.to)):(g.current>=a.start&&(!a.char||Math.random()<T)&&(a.char=C(l)),u.push(_jsxruntime.jsxs.call(void 0, "span",{className:"relative inline-block",children:[_jsxruntime.jsx.call(void 0, "span",{className:"invisible select-none","aria-hidden":"true",children:a.to===" "?"\xA0":a.to}),g.current>=a.start&&_jsxruntime.jsx.call(void 0, "span",{className:"absolute inset-0 flex items-center justify-center opacity-50 font-mono leading-none",children:a.char})]},o)))}_(N(e,u,{current:0})),r===b.current.length?y(!0):(g.current++,t.current=requestAnimationFrame(x))},M=_react.useRef.call(void 0, !1);return _react.useEffect.call(void 0, ()=>{if(m)return M.current=!0,F.current=!0,y(!1),t.current&&cancelAnimationFrame(t.current),t.current=requestAnimationFrame(v),()=>{t.current&&cancelAnimationFrame(t.current)};if(M.current)return M.current=!1,k(),t.current=requestAnimationFrame(x),()=>{t.current&&cancelAnimationFrame(t.current)}},[m,f]),_react.useEffect.call(void 0, ()=>{if(m)return;let r=new IntersectionObserver(u=>{if(u[0].isIntersecting&&!F.current){F.current=!0;let n=setTimeout(()=>{k(),t.current=requestAnimationFrame(x)},c);return()=>clearTimeout(n)}},{threshold:.1});return A.current&&r.observe(A.current),()=>{r.disconnect(),t.current&&cancelAnimationFrame(t.current)}},[f,c,m]),_jsxruntime.jsx.call(void 0, "span",{ref:A,className:_chunkFUYXCJOQjs.a.call(void 0, "inline-block whitespace-pre-wrap",s),children:P?e:D})}exports.a = L;
3
+ //# sourceMappingURL=chunk-EWRKHBIV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-EWRKHBIV.js","../src/components/TextDecoder.tsx"],"names":["SYMBOLS","randomChar","symbols","extractText","node","React","props","injectScrambledText","scrambledChars","indexObj","text","result","i","jsx"],"mappings":"AAAA,qLAAY;AACZ,sDAAuC,4ECOhC,+CAgCC,IA9BFA,CAAAA,CAAU,kCAAA,CAEVC,CAAAA,CAAcC,CAAAA,EAClBA,CAAAA,CAAQ,IAAA,CAAK,KAAA,CAAM,IAAA,CAAK,MAAA,CAAO,CAAA,CAAIA,CAAAA,CAAQ,MAAM,CAAC,CAAA,CAE9CC,CAAAA,CAAeC,CAAAA,EAA4B,CAC/C,EAAA,CAAI,OAAOA,CAAAA,EAAS,QAAA,EAAY,OAAOA,CAAAA,EAAS,QAAA,CAAU,OAAO,MAAA,CAAOA,CAAI,CAAA,CAC5E,EAAA,CAAI,KAAA,CAAM,OAAA,CAAQA,CAAI,CAAA,CAAG,OAAOA,CAAAA,CAAK,GAAA,CAAID,CAAW,CAAA,CAAE,IAAA,CAAK,EAAE,CAAA,CAC7D,EAAA,CAAIE,eAAAA,CAAM,cAAA,CAAeD,CAAI,CAAA,CAAG,CAC9B,IAAME,CAAAA,CAAQF,CAAAA,CAAK,KAAA,CACnB,MAAA,CACGE,CAAAA,CAAM,IAAA,EAAQ,EAAA,CAAA,CAAA,CACdA,CAAAA,CAAM,KAAA,EAAS,EAAA,CAAA,CAAA,CACfA,CAAAA,CAAM,KAAA,EAAS,EAAA,CAAA,CAChBH,CAAAA,CAAYG,CAAAA,CAAM,QAAQ,CAE9B,CACA,MAAO,EACT,CAAA,CAEMC,CAAAA,CAAsB,CAC1BH,CAAAA,CACAI,CAAAA,CACAC,CAAAA,CAAAA,EACc,CACd,EAAA,CAAI,OAAOL,CAAAA,EAAS,QAAA,EAAY,OAAOA,CAAAA,EAAS,QAAA,CAAU,CACxD,IAAMM,CAAAA,CAAO,MAAA,CAAON,CAAI,CAAA,CAClBO,CAAAA,CAAiC,CAAC,CAAA,CACxC,GAAA,CAAA,IAASC,CAAAA,CAAI,CAAA,CAAGA,CAAAA,CAAIF,CAAAA,CAAK,MAAA,CAAQE,CAAAA,EAAAA,CAC/BD,CAAAA,CAAO,IAAA,CACLE,6BAAAA,eAACR,CAAM,QAAA,CAAN,CACE,QAAA,CAAAG,CAAAA,CAAeC,CAAAA,CAAS,OAAO,CAAA,EAAK,EAAA,CAAA,CADlB,CAAA,KAAA,EAAQA,CAAAA,CAAS,OAAO,CAAA,CAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-EWRKHBIV.js","sourcesContent":[null,"\"use client\"\nimport { cn } from \"@/lib/utils\"\nimport React, {\n useState,\n useEffect,\n useMemo,\n useRef,\n ReactNode,\n} from \"react\"\n\nconst SYMBOLS = \"!<>-_\\\\/[]{}—=+*^?#________\"\n\nconst randomChar = (symbols: string) =>\n symbols[Math.floor(Math.random() * symbols.length)]\n\nconst extractText = (node: ReactNode): string => {\n if (typeof node === \"string\" || typeof node === \"number\") return String(node)\n if (Array.isArray(node)) return node.map(extractText).join(\"\")\n if (React.isValidElement(node)) {\n const props = node.props as any\n return (\n (props.text || \"\") +\n (props.label || \"\") +\n (props.title || \"\") +\n extractText(props.children)\n )\n }\n return \"\"\n}\n\nconst injectScrambledText = (\n node: ReactNode,\n scrambledChars: (string | ReactNode)[],\n indexObj: { current: number }\n): ReactNode => {\n if (typeof node === \"string\" || typeof node === \"number\") {\n const text = String(node)\n const result: (string | ReactNode)[] = []\n for (let i = 0; i < text.length; i++) {\n result.push(\n <React.Fragment key={`char-${indexObj.current}`}>\n {scrambledChars[indexObj.current] || \"\"}\n </React.Fragment>\n )\n indexObj.current++\n }\n return result\n }\n\n if (Array.isArray(node)) {\n return node.map((child, idx) => (\n <React.Fragment key={`arr-${idx}-${indexObj.current}`}>\n {injectScrambledText(child, scrambledChars, indexObj)}\n </React.Fragment>\n ))\n }\n\n if (React.isValidElement(node)) {\n const props = node.props as any\n const newProps: any = {}\n\n if (props.children) {\n newProps.children = injectScrambledText(\n props.children,\n scrambledChars,\n indexObj\n )\n }\n return React.cloneElement(node, newProps)\n }\n return node\n}\n\nexport interface TextDecoderProps {\n children: ReactNode\n className?: string\n duration?: number\n symbols?: string\n delay?: number\n isLoading?: boolean\n speed?: number\n}\n\nexport default function TextDecoder ({\n children,\n className,\n duration = 40,\n symbols = SYMBOLS,\n delay = 0,\n isLoading = false,\n speed = 0.28,\n}: TextDecoderProps) {\n const [outputNodes, setOutputNodes] = useState<ReactNode>(null)\n const [isComplete, setIsComplete] = useState(false)\n const elementRef = useRef<HTMLSpanElement>(null)\n const frameRef = useRef(0)\n const queueRef = useRef<\n { to: string; start: number; end: number; char?: string }[]\n >([])\n const rafRef = useRef<number | null>(null)\n const hasAnimatedRef = useRef(false)\n\n const fullText = useMemo(() => extractText(children), [children])\n\n const setupQueue = () => {\n const newQueue = []\n for (let i = 0; i < fullText.length; i++) {\n const to = fullText[i]\n const start = Math.floor(Math.random() * (duration * 0.5))\n const end = start + Math.floor(Math.random() * (duration * 0.5))\n newQueue.push({ to, start, end })\n }\n queueRef.current = newQueue\n frameRef.current = 0\n setIsComplete(false)\n }\n\n const loadingCharsRef = useRef<(string | undefined)[]>([])\n\n const updateLoading = () => {\n const currentScrambledChars: (string | ReactNode)[] = []\n\n if (loadingCharsRef.current.length !== fullText.length) {\n loadingCharsRef.current = new Array(fullText.length).fill(undefined)\n }\n\n for (let i = 0; i < fullText.length; i++) {\n const char = fullText[i]\n\n if (char === \" \") {\n currentScrambledChars.push(\" \")\n } else {\n if (!loadingCharsRef.current[i] || Math.random() < speed) {\n loadingCharsRef.current[i] = randomChar(symbols)\n }\n\n currentScrambledChars.push(\n <span key={i} className=\"relative inline-block\">\n <span className=\"invisible select-none\" aria-hidden=\"true\">\n {char}\n </span>\n <span className=\"absolute inset-0 flex items-center justify-center opacity-50 font-mono leading-none\">\n {loadingCharsRef.current[i]}\n </span>\n </span>\n )\n }\n }\n\n const indexObj = { current: 0 }\n setOutputNodes(\n injectScrambledText(children, currentScrambledChars, indexObj)\n )\n\n rafRef.current = requestAnimationFrame(updateLoading)\n }\n\n const update = () => {\n let complete = 0\n const currentScrambledChars: (string | ReactNode)[] = []\n\n for (let i = 0; i < queueRef.current.length; i++) {\n const item = queueRef.current[i]\n\n if (frameRef.current >= item.end) {\n complete++\n currentScrambledChars.push(item.to)\n } else {\n if (frameRef.current >= item.start) {\n if (!item.char || Math.random() < speed) {\n item.char = randomChar(symbols)\n }\n }\n\n currentScrambledChars.push(\n <span key={i} className=\"relative inline-block\">\n <span className=\"invisible select-none\" aria-hidden=\"true\">\n {item.to === \" \" ? \"\\u00A0\" : item.to}\n </span>\n {frameRef.current >= item.start && (\n <span className=\"absolute inset-0 flex items-center justify-center opacity-50 font-mono leading-none\">\n {item.char}\n </span>\n )}\n </span>\n )\n }\n }\n\n const indexObj = { current: 0 }\n setOutputNodes(\n injectScrambledText(children, currentScrambledChars, indexObj)\n )\n\n if (complete === queueRef.current.length) {\n setIsComplete(true)\n } else {\n frameRef.current++\n rafRef.current = requestAnimationFrame(update)\n }\n }\n\n const wasLoadingRef = useRef(false)\n\n useEffect(() => {\n if (isLoading) {\n wasLoadingRef.current = true\n hasAnimatedRef.current = true\n setIsComplete(false)\n if (rafRef.current) cancelAnimationFrame(rafRef.current)\n rafRef.current = requestAnimationFrame(updateLoading)\n return () => {\n if (rafRef.current) cancelAnimationFrame(rafRef.current)\n }\n }\n\n if (wasLoadingRef.current) {\n wasLoadingRef.current = false\n setupQueue()\n rafRef.current = requestAnimationFrame(update)\n return () => {\n if (rafRef.current) cancelAnimationFrame(rafRef.current)\n }\n }\n }, [isLoading, fullText])\n\n useEffect(() => {\n if (isLoading) return\n\n const observer = new IntersectionObserver(\n (entries) => {\n if (entries[0].isIntersecting && !hasAnimatedRef.current) {\n hasAnimatedRef.current = true\n const timeoutId = setTimeout(() => {\n setupQueue()\n rafRef.current = requestAnimationFrame(update)\n }, delay)\n return () => clearTimeout(timeoutId)\n }\n },\n { threshold: 0.1 }\n )\n\n if (elementRef.current) observer.observe(elementRef.current)\n\n return () => {\n observer.disconnect()\n if (rafRef.current) cancelAnimationFrame(rafRef.current)\n }\n }, [fullText, delay, isLoading])\n\n return (\n <span\n ref={elementRef}\n className={cn(\"inline-block whitespace-pre-wrap\", className)}\n >\n {isComplete ? children : outputNodes}\n </span>\n )\n}\n"]}
@@ -1,3 +1,3 @@
1
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 _chunkWPUW2XFIjs = require('./chunk-WPUW2XFI.js');var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var d = _interopRequireWildcard(_react);var _cmdk = require('cmdk');var _lucidereact = require('lucide-react');var _jsxruntime = require('react/jsx-runtime');var p=d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsx.call(void 0, _cmdk.Command,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));p.displayName=_cmdk.Command.displayName;var P=({children:e,...t})=>_jsxruntime.jsx.call(void 0, _chunkWPUW2XFIjs.a,{...t,children:_jsxruntime.jsx.call(void 0, _chunkWPUW2XFIjs.f,{className:"overflow-hidden p-0 shadow-lg",children:_jsxruntime.jsx.call(void 0, p,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[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",children:e})})}),c= exports.c =d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[_jsxruntime.jsx.call(void 0, _lucidereact.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),_jsxruntime.jsx.call(void 0, _cmdk.Command.Input,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));c.displayName=_cmdk.Command.Input.displayName;var f=d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.List,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));f.displayName=_cmdk.Command.List.displayName;var l=d.forwardRef((e,t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));l.displayName=_cmdk.Command.Empty.displayName;var u=d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Group,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "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-muted-foreground",e),...t}));u.displayName=_cmdk.Command.Group.displayName;var g=d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Separator,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "-mx-1 h-px bg-border",e),...t}));g.displayName=_cmdk.Command.Separator.displayName;var y=d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Item,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-muted aria-selected:text-secondary-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 truncate",e),...t}));y.displayName=_cmdk.Command.Item.displayName;var R=({className:e,...t})=>_jsxruntime.jsx.call(void 0, "span",{className:_chunkFUYXCJOQjs.a.call(void 0, "ml-auto text-xs tracking-widest text-muted-foreground",e),...t});R.displayName="CommandShortcut";exports.a = p; exports.b = P; exports.c = c; exports.d = f; exports.e = l; exports.f = u; exports.g = g; exports.h = y; exports.i = R;
3
- //# sourceMappingURL=chunk-HKLR7AH3.js.map
2
+ var _chunkCP7BC57Sjs = require('./chunk-CP7BC57S.js');var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var d = _interopRequireWildcard(_react);var _cmdk = require('cmdk');var _lucidereact = require('lucide-react');var _jsxruntime = require('react/jsx-runtime');var p=d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsx.call(void 0, _cmdk.Command,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));p.displayName=_cmdk.Command.displayName;var P=({children:e,...t})=>_jsxruntime.jsx.call(void 0, _chunkCP7BC57Sjs.a,{...t,children:_jsxruntime.jsx.call(void 0, _chunkCP7BC57Sjs.f,{className:"overflow-hidden p-0 shadow-lg",children:_jsxruntime.jsx.call(void 0, p,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[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",children:e})})}),c= exports.c =d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[_jsxruntime.jsx.call(void 0, _lucidereact.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),_jsxruntime.jsx.call(void 0, _cmdk.Command.Input,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));c.displayName=_cmdk.Command.Input.displayName;var f=d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.List,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));f.displayName=_cmdk.Command.List.displayName;var l=d.forwardRef((e,t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));l.displayName=_cmdk.Command.Empty.displayName;var u=d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Group,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "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-muted-foreground",e),...t}));u.displayName=_cmdk.Command.Group.displayName;var g=d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Separator,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "-mx-1 h-px bg-border",e),...t}));g.displayName=_cmdk.Command.Separator.displayName;var y=d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Item,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-muted aria-selected:text-secondary-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 truncate",e),...t}));y.displayName=_cmdk.Command.Item.displayName;var R=({className:e,...t})=>_jsxruntime.jsx.call(void 0, "span",{className:_chunkFUYXCJOQjs.a.call(void 0, "ml-auto text-xs tracking-widest text-muted-foreground",e),...t});R.displayName="CommandShortcut";exports.a = p; exports.b = P; exports.c = c; exports.d = f; exports.e = l; exports.f = u; exports.g = g; exports.h = y; exports.i = R;
3
+ //# sourceMappingURL=chunk-GVSERRZX.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-HKLR7AH3.js","../src/components/command.tsx"],"names":["Command","className","props","ref","jsx","CommandPrimitive","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","jsxs","Search","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut"],"mappings":"AAAA,uWAAY;AACZ,sDAA8C,sDAAwC,uECD/D,4BAEqB,2CACrB,+CASrB,IAJIA,CAAAA,CAAgB,CAAA,CAAA,UAAA,CAGpB,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAC1BC,6BAAAA,aAACC,CAAA,CACC,GAAA,CAAKF,CAAAA,CACL,SAAA,CAAWG,gCAAAA,2FACT,CACAL,CACF,CAAA,CACC,GAAGC,CAAAA,CACN,CACD,CAAA,CACDF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,CACL,SAAA,CAAWG,gCAAAA,oPACT,CACAL,CACF,CAAA,CACC,GAAGC,CAAAA,CACN,CACD,CAAA,CAEDgB,CAAAA,CAAY,WAAA,CAAcb,aAAAA,CAAiB,IAAA,CAAK,WAAA,CAEhD,IAAMc,CAAAA,CAAkB,CAAC,CACvB,SAAA,CAAAlB,CAAAA,CACA,GAAGC,CACL,CAAA,CAAA,EAEIE,6BAAAA,MAAC,CAAA,CACC,SAAA,CAAWE,gCAAAA,uDACT,CACAL,CACF,CAAA,CACC,GAAGC,CAAAA,CACN,CAAA,CAGJiB,CAAAA,CAAgB,WAAA,CAAc,iBAAA,CAAA,sIAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-HKLR7AH3.js","sourcesContent":[null,"import * as React from \"react\"\nimport { type DialogProps } from \"@radix-ui/react-dialog\"\nimport { Command as CommandPrimitive } from \"cmdk\"\nimport { Search } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Dialog, DialogContent } from \"@/components/dialog\"\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n className\n )}\n {...props}\n />\n))\nCommand.displayName = CommandPrimitive.displayName\n\ninterface CommandDialogProps extends DialogProps {}\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[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\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n </div>\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n {...props}\n />\n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty\n ref={ref}\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n))\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n \"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-muted-foreground\",\n className\n )}\n {...props}\n />\n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-muted aria-selected:text-secondary-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 truncate\",\n className\n )}\n {...props}\n />\n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\nCommandShortcut.displayName = \"CommandShortcut\"\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n}\n"]}
1
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-GVSERRZX.js","../src/components/command.tsx"],"names":["Command","className","props","ref","jsx","CommandPrimitive","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","jsxs","Search","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut"],"mappings":"AAAA,uWAAY;AACZ,sDAA8C,sDAAwC,uECD/D,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CAAAA,CACN,CACD,CAAA,CACDe,CAAAA,CAAiB,WAAA,CAAcZ,aAAAA,CAAiB,SAAA,CAAU,WAAA,CAE1D,IAAMa,CAAAA,CAAoB,CAAA,CAAA,UAAA,CAGxB,CAAC,CAAE,SAAA,CAAAjB,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAC1BC,6BAAAA,aAACC,CAAiB,IAAA,CAAjB,CACC,GAAA,CAAKF,CAAAA,CACL,SAAA,CAAWG,gCAAAA,oPACT,CACAL,CACF,CAAA,CACC,GAAGC,CAAAA,CACN,CACD,CAAA,CAEDgB,CAAAA,CAAY,WAAA,CAAcb,aAAAA,CAAiB,IAAA,CAAK,WAAA,CAEhD,IAAMc,CAAAA,CAAkB,CAAC,CACvB,SAAA,CAAAlB,CAAAA,CACA,GAAGC,CACL,CAAA,CAAA,EAEIE,6BAAAA,MAAC,CAAA,CACC,SAAA,CAAWE,gCAAAA,uDACT,CACAL,CACF,CAAA,CACC,GAAGC,CAAAA,CACN,CAAA,CAGJiB,CAAAA,CAAgB,WAAA,CAAc,iBAAA,CAAA,sIAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-GVSERRZX.js","sourcesContent":[null,"import * as React from \"react\"\nimport { type DialogProps } from \"@radix-ui/react-dialog\"\nimport { Command as CommandPrimitive } from \"cmdk\"\nimport { Search } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Dialog, DialogContent } from \"@/components/dialog\"\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n className\n )}\n {...props}\n />\n))\nCommand.displayName = CommandPrimitive.displayName\n\ninterface CommandDialogProps extends DialogProps {}\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[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\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n </div>\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n {...props}\n />\n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty\n ref={ref}\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n))\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n \"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-muted-foreground\",\n className\n )}\n {...props}\n />\n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-muted aria-selected:text-secondary-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 truncate\",\n className\n )}\n {...props}\n />\n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\nCommandShortcut.displayName = \"CommandShortcut\"\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n}\n"]}
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{a as n}from"./chunk-S5TKCF6T.mjs";import*as o from"react";import{Slot as l}from"@radix-ui/react-slot";import{cva as p}from"class-variance-authority";import{jsx as a,jsxs as b}from"react/jsx-runtime";var m=p("inline-flex items-center cursor-pointer justify-center whitespace-nowrap rounded-4xl font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 active:opacity-50 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary-accent text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive hover:bg-destructive/90",outline:"border border-input hover:bg-base-accent text-primary-accent",secondary:"bg-muted text-primary-accent hover:bg-muted/20",ghost:"hover:bg-base-accent text-primary-accent",link:"text-primary-accent underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 text-sm",sm:"h-8 text-xs px-3 py-2",lg:"h-10 px-8 py-2 text-sm",icon:"h-9 w-9",none:""}},defaultVariants:{variant:"default",size:"default"}}),f=o.forwardRef(({className:i,variant:s,size:c,asChild:d=!1,loading:e=!1,icon:r,...t},u)=>b(d?l:"button",{className:n(m({variant:s,size:c,className:i})),ref:u,disabled:e||t.disabled,...t,children:[e&&a("div",{className:"mr-2 h-4 w-4 animate-spin rounded-full border border-primary-foreground border-t-transparent"}),!e&&r&&a("span",{className:"mr-2",children:r}),t.children]}));f.displayName="Button";export{m as a,f as b};
3
+ //# sourceMappingURL=chunk-HRYHWWL4.mjs.map
@@ -0,0 +1 @@
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-4xl font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 active:opacity-50 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary-accent text-primary-foreground hover:bg-primary/90\",\n destructive: \"bg-destructive hover:bg-destructive/90\",\n outline: \"border border-input hover:bg-base-accent text-primary-accent\",\n secondary: \"bg-muted text-primary-accent hover:bg-muted/20\",\n ghost: \"hover:bg-base-accent text-primary-accent\",\n link: \"text-primary-accent underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2 text-sm\",\n sm: \"h-8 text-xs px-3 py-2\",\n lg: \"h-10 px-8 py-2 text-sm\",\n icon: \"h-9 w-9\",\n none: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport interface ButtonProps\n extends\n 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,gTACA,CACE,SAAU,CACR,QAAS,CACP,QACE,gEACF,YAAa,yCACb,QAAS,+DACT,UAAW,iDACX,MAAO,2CACP,KAAM,wDACR,EACA,KAAM,CACJ,QAAS,wBACT,GAAI,wBACJ,GAAI,yBACJ,KAAM,UACN,KAAM,EACR,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,SACR,CACF,CACF,EAWMC,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"]}
@@ -1,3 +1,3 @@
1
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 _react = require('react'); var a = _interopRequireWildcard(_react);var _jsxruntime = require('react/jsx-runtime');var r=a.forwardRef(({className:l,...t},o)=>_jsxruntime.jsx.call(void 0, "label",{ref:o,className:_chunkFUYXCJOQjs.a.call(void 0, "text-sm mb-2 font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",l),...t}));r.displayName="Label";exports.a = r;
3
- //# sourceMappingURL=chunk-ZF6PO6PJ.js.map
2
+ var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var a = _interopRequireWildcard(_react);var _jsxruntime = require('react/jsx-runtime');var r=a.forwardRef(({className:l,...t},o)=>_jsxruntime.jsx.call(void 0, "label",{ref:o,className:_chunkFUYXCJOQjs.a.call(void 0, "text-sm font-medium leading-5 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",l),...t}));r.displayName="Label";exports.a = r;
3
+ //# sourceMappingURL=chunk-I5INE4KG.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-ZF6PO6PJ.js","../src/components/label.tsx"],"names":["Label","className","props","ref","jsx","cn"],"mappings":"AAAA,uWAAY;AACZ,sDAAuC,uECChB,+CAOnB,IAFEA,CAAAA,CAAc,CAAA,CAAA,UAAA,CAClB,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACxBC,6BAAAA,OAAC,CAAA,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,gCAAAA,iGACT,CACAJ,CACF,CAAA,CACC,GAAGC,CAAAA,CACN,CAEJ,CAAA,CACAF,CAAAA,CAAM,WAAA,CAAc,OAAA,CAAA,cAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-ZF6PO6PJ.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\n\nexport interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {}\n\nconst Label = React.forwardRef<HTMLLabelElement, LabelProps>(\n ({ className, ...props }, ref) => (\n <label\n ref={ref}\n className={cn(\n \"text-sm mb-2 font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n className\n )}\n {...props}\n />\n )\n)\nLabel.displayName = \"Label\"\n\nexport { Label }\n"]}
1
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-I5INE4KG.js","../src/components/label.tsx"],"names":["Label","className","props","ref","jsx","cn"],"mappings":"AAAA,uWAAY;AACZ,sDAAuC,uECChB,+CAOnB,IAFEA,CAAAA,CAAc,CAAA,CAAA,UAAA,CAClB,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACxBC,6BAAAA,OAAC,CAAA,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,gCAAAA,yFACT,CACAJ,CACF,CAAA,CACC,GAAGC,CAAAA,CACN,CAEJ,CAAA,CACAF,CAAAA,CAAM,WAAA,CAAc,OAAA,CAAA,cAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-I5INE4KG.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\n\nexport interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {}\n\nconst Label = React.forwardRef<HTMLLabelElement, LabelProps>(\n ({ className, ...props }, ref) => (\n <label\n ref={ref}\n className={cn(\n \"text-sm font-medium leading-5 peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n className\n )}\n {...props}\n />\n )\n)\nLabel.displayName = \"Label\"\n\nexport { Label }\n"]}
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{a as z}from"./chunk-KGNX6UST.mjs";import{a as j,b as U,c as X}from"./chunk-FZ3NXOFK.mjs";import{a as E}from"./chunk-S5TKCF6T.mjs";import*as i from"react";import{Check as ne,ChevronDown as G,ChevronRight as ae,Search as se,X as ce}from"lucide-react";import{Fragment as ie,jsx as o,jsxs as x}from"react/jsx-runtime";function M(e){let n=[e.value];if(e.children)for(let a of e.children)n.push(...M(a));return n}function $(e,n){if(!e.children||e.children.length===0)return n.has(e.value)?"checked":"unchecked";let a=M(e),r=a.filter(l=>n.has(l)).length;return r===0?"unchecked":r===a.length?"checked":"indeterminate"}function J(e,n){let a=n.toLowerCase().trim();if(!a)return e;let r=[];for(let l of e){let f=l.label.toLowerCase().includes(a);if(l.children&&l.children.length>0){let h=J(l.children,n);f?r.push(l):h&&h.length>0&&r.push({...l,children:h})}else f&&r.push(l)}return r.length>0?r:null}function le(e,n){let a=n.toLowerCase().trim(),r=new Set;function l(f){let h=!1;for(let g of f){let w=g.label.toLowerCase().includes(a),S=!1;g.children&&(S=l(g.children)),(w||S)&&(r.add(g.value),h=!0)}return h}return l(e),r}function N(e,n){for(let a of e){if(a.value===n)return a;if(a.children){let r=N(a.children,n);if(r)return r}}}function Q(e){let n=new Set;for(let a of e)if(a.children&&a.children.length>0){n.add(a.value);for(let r of Q(a.children))n.add(r)}return n}function oe(e,n){if(!n)return e;let a=n.toLowerCase().trim();if(!a)return e;let r=e.toLowerCase().indexOf(a);return r===-1?e:x(ie,{children:[e.slice(0,r),o("span",{className:"font-semibold underline",children:e.slice(r,r+a.length)}),e.slice(r+a.length)]})}function W({node:e,depth:n,multiple:a,selectedSet:r,expandedValues:l,focusedValue:f,onToggleExpand:h,onSelect:g,onFocus:w,searchTerm:S}){let V=e.children&&e.children.length>0,y=l.has(e.value),b=a?$(e,r):r.has(e.value)?"checked":"unchecked",A=n*20;return x("div",{role:"treeitem","aria-expanded":V?y:void 0,"aria-selected":b==="checked",children:[x("div",{className:E("relative flex items-center gap-2 rounded-sm px-2 py-1.5 my-0.5 text-sm cursor-pointer select-none outline-none","hover:bg-muted",b==="checked"&&!a&&"bg-muted"),style:{paddingLeft:`${8+A}px`},onClick:()=>g(e),onFocus:()=>w(e.value),"data-tree-value":e.value,tabIndex:f===e.value?0:-1,children:[V?o("button",{type:"button",className:"h-4 w-4 shrink-0 flex items-center justify-center rounded-sm hover:bg-secondary",onClick:m=>{m.stopPropagation(),h(e.value)},"aria-label":y?`Collapse ${e.label}`:`Expand ${e.label}`,tabIndex:-1,children:y?o(G,{className:"h-3.5 w-3.5"}):o(ae,{className:"h-3.5 w-3.5"})}):o("span",{className:"h-4 w-4 shrink-0"}),a?o(z,{checked:b==="checked"?!0:b==="indeterminate"?"indeterminate":!1,onCheckedChange:()=>g(e),onClick:m=>m.stopPropagation(),className:"shrink-0","aria-label":e.label}):o(ne,{className:E("h-4 w-4 shrink-0",b==="checked"?"opacity-100":"opacity-0")}),o("span",{className:"truncate",children:oe(e.label,S)})]}),V&&y&&o("div",{role:"group",children:e.children.map(m=>o(W,{node:m,depth:n+1,multiple:a,selectedSet:r,expandedValues:l,focusedValue:f,onToggleExpand:h,onSelect:g,onFocus:w,searchTerm:S},m.value))})]})}function ge({nodes:e,value:n,onValueChange:a,multiple:r=!1,values:l=[],onValuesChange:f,placeholder:h="Select...",searchPlaceholder:g="Search...",emptyMessage:w="No results found.",disabled:S=!1,className:V,error:y=!1,defaultExpandedValues:b,expandAll:A=!1}){let[m,B]=i.useState(!1),[v,K]=i.useState(""),[p,k]=i.useState(null),[D,L]=i.useState(()=>A?Q(e):b?new Set(b):new Set),P=i.useRef(null),I=i.useRef(null),C=i.useMemo(()=>new Set(r?l:n?[n]:[]),[r,l,n]),F=i.useMemo(()=>v?J(e,v):e,[e,v]);i.useEffect(()=>{if(v){P.current||(P.current=new Set(D));let t=le(e,v);L(t)}else P.current&&(L(P.current),P.current=null)},[v,e]);let Y=i.useCallback(t=>{B(t),t||(K(""),k(null))},[]),T=i.useCallback(t=>{L(s=>{let d=new Set(s);return d.has(t)?d.delete(t):d.add(t),d})},[]),H=i.useCallback(t=>{if(r){let s=M(t),d=$(t,C),c;if(d==="checked"){let u=new Set(s);c=l.filter(R=>!u.has(R))}else{let u=s.filter(R=>!C.has(R));c=[...l,...u]}f?.(c)}else{if(t.children&&t.children.length>0){T(t.value);return}let d=t.value===n?"":t.value;a?.(d),B(!1)}},[r,l,n,C,f,a,T]),Z=i.useCallback((t,s)=>{s.preventDefault(),s.stopPropagation();let d=N(e,t);if(d){let c=new Set(M(d)),u=l.filter(R=>!c.has(R));f?.(u)}},[e,l,f]),q=i.useMemo(()=>{if(!r)return[];let t=[];function s(d){for(let c of d){let u=$(c,C);u==="checked"?t.push(c.value):u==="indeterminate"&&c.children&&s(c.children)}}return s(e),t},[e,C,r]),O=i.useCallback(()=>I.current?Array.from(I.current.querySelectorAll("[data-tree-value]")):[],[]),_=i.useCallback(t=>{let s=O(),d=s.findIndex(c=>c.dataset.treeValue===p);switch(t.key){case"ArrowDown":{t.preventDefault();let c=Math.min(d+1,s.length-1),u=s[c]?.dataset.treeValue;u&&(k(u),s[c]?.focus());break}case"ArrowUp":{t.preventDefault();let c=Math.max(d-1,0),u=s[c]?.dataset.treeValue;u&&(k(u),s[c]?.focus());break}case"ArrowRight":{if(t.preventDefault(),p){let c=N(e,p);if(c?.children?.length)if(!D.has(p))T(p);else{let u=c.children[0].value;k(u),requestAnimationFrame(()=>{O().find(re=>re.dataset.treeValue===u)?.focus()})}}break}case"ArrowLeft":{t.preventDefault(),p&&D.has(p)&&T(p);break}case"Enter":case" ":{if(t.preventDefault(),p){let c=N(e,p);c&&H(c)}break}case"Home":{t.preventDefault();let c=s[0]?.dataset.treeValue;c&&(k(c),s[0]?.focus());break}case"End":{t.preventDefault();let c=s[s.length-1]?.dataset.treeValue;c&&(k(c),s[s.length-1]?.focus());break}}},[p,e,D,O,T,H]),ee=()=>r?l.length===0?h:l.length===1?N(e,l[0])?.label??l[0]:`${l.length} selected`:n?N(e,n)?.label??n:h,te=()=>{if(!r||q.length===0)return null;let t=q.map(s=>N(e,s)).filter(Boolean);return o("div",{className:"max-h-[100px] overflow-y-auto px-2 py-1.5 border-b border-border",children:o("div",{className:"flex flex-wrap gap-1",children:t.map(s=>x("div",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs",children:[o("span",{className:"truncate max-w-[120px]",children:s.label}),o(ce,{className:"h-3 w-3 cursor-pointer shrink-0",onClick:d=>Z(s.value,d),"aria-label":`Remove ${s.label}`})]},s.value))})})};return x(j,{open:m,onOpenChange:Y,children:[o(U,{asChild:!0,children:x("button",{type:"button",role:"combobox","aria-expanded":m,"aria-haspopup":"tree",disabled:S,className:E("cursor-pointer flex my-2 h-9 w-full items-center justify-between rounded-3xl border border-border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",!n&&!l.length&&"text-secondary-text",y&&"border-destructive-foreground focus-visible:ring-destructive-foreground",V),children:[o("span",{className:"truncate",children:ee()}),o(G,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),x(X,{className:"p-0",align:"start",style:{width:"var(--radix-popover-trigger-width)"},children:[x("div",{className:"flex items-center border-b px-3",children:[o(se,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),o("input",{value:v,onChange:t=>K(t.target.value),placeholder:g,className:"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50","aria-label":"Search tree"})]}),te(),o("div",{className:"max-h-[300px] overflow-y-auto",children:F&&F.length>0?o("div",{ref:I,role:"tree","aria-label":"Options",className:"p-1",onKeyDown:_,children:F.map(t=>o(W,{node:t,depth:0,multiple:r,selectedSet:C,expandedValues:D,focusedValue:p,onToggleExpand:T,onSelect:H,onFocus:k,searchTerm:v},t.value))}):o("div",{className:"py-6 text-center text-sm text-muted-foreground",children:w})})]})]})}export{ge as a};
3
+ //# sourceMappingURL=chunk-IXP2VV7S.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/tree-select.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Check, ChevronDown, ChevronRight, Search, X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Checkbox } from \"@/components/checkbox\"\nimport { Popover, PopoverContent, PopoverTrigger } from \"@/components/popover\"\n\n// --- Public types ---\n\nexport interface TreeSelectNode {\n value: string\n label: string\n children?: TreeSelectNode[]\n}\n\nexport interface TreeSelectProps {\n nodes: TreeSelectNode[]\n value?: string\n onValueChange?: (value: string) => void\n multiple?: boolean\n values?: string[]\n onValuesChange?: (values: string[]) => void\n placeholder?: string\n searchPlaceholder?: string\n emptyMessage?: string\n disabled?: boolean\n className?: string\n error?: boolean\n defaultExpandedValues?: string[]\n expandAll?: boolean\n}\n\n// --- Internal types ---\n\ntype CheckState = \"checked\" | \"indeterminate\" | \"unchecked\"\n\n// --- Utility functions ---\n\nfunction getAllDescendantValues(node: TreeSelectNode): string[] {\n const values: string[] = [node.value]\n if (node.children) {\n for (const child of node.children) {\n values.push(...getAllDescendantValues(child))\n }\n }\n return values\n}\n\nfunction getCheckState(\n node: TreeSelectNode,\n selectedSet: Set<string>\n): CheckState {\n if (!node.children || node.children.length === 0) {\n return selectedSet.has(node.value) ? \"checked\" : \"unchecked\"\n }\n\n const descendants = getAllDescendantValues(node)\n const selectedCount = descendants.filter((v) => selectedSet.has(v)).length\n\n if (selectedCount === 0) return \"unchecked\"\n if (selectedCount === descendants.length) return \"checked\"\n return \"indeterminate\"\n}\n\nfunction filterTree(\n nodes: TreeSelectNode[],\n searchTerm: string\n): TreeSelectNode[] | null {\n const term = searchTerm.toLowerCase().trim()\n if (!term) return nodes\n\n const result: TreeSelectNode[] = []\n\n for (const node of nodes) {\n const labelMatches = node.label.toLowerCase().includes(term)\n\n if (node.children && node.children.length > 0) {\n const filteredChildren = filterTree(node.children, searchTerm)\n\n if (labelMatches) {\n result.push(node)\n } else if (filteredChildren && filteredChildren.length > 0) {\n result.push({ ...node, children: filteredChildren })\n }\n } else if (labelMatches) {\n result.push(node)\n }\n }\n\n return result.length > 0 ? result : null\n}\n\nfunction getValuesOfMatchingNodes(\n nodes: TreeSelectNode[],\n searchTerm: string\n): Set<string> {\n const term = searchTerm.toLowerCase().trim()\n const result = new Set<string>()\n\n function walk(nodeList: TreeSelectNode[]): boolean {\n let hasMatch = false\n for (const node of nodeList) {\n const labelMatches = node.label.toLowerCase().includes(term)\n let childHasMatch = false\n\n if (node.children) {\n childHasMatch = walk(node.children)\n }\n\n if (labelMatches || childHasMatch) {\n result.add(node.value)\n hasMatch = true\n }\n }\n return hasMatch\n }\n\n walk(nodes)\n return result\n}\n\nfunction findNodeByValue(\n nodes: TreeSelectNode[],\n value: string\n): TreeSelectNode | undefined {\n for (const node of nodes) {\n if (node.value === value) return node\n if (node.children) {\n const found = findNodeByValue(node.children, value)\n if (found) return found\n }\n }\n return undefined\n}\n\nfunction collectAllBranchValues(nodes: TreeSelectNode[]): Set<string> {\n const result = new Set<string>()\n for (const node of nodes) {\n if (node.children && node.children.length > 0) {\n result.add(node.value)\n for (const v of collectAllBranchValues(node.children)) {\n result.add(v)\n }\n }\n }\n return result\n}\n\nfunction renderHighlightedLabel(\n label: string,\n searchTerm: string\n): React.ReactNode {\n if (!searchTerm) return label\n\n const term = searchTerm.toLowerCase().trim()\n if (!term) return label\n\n const index = label.toLowerCase().indexOf(term)\n if (index === -1) return label\n\n return (\n <>\n {label.slice(0, index)}\n <span className=\"font-semibold underline\">\n {label.slice(index, index + term.length)}\n </span>\n {label.slice(index + term.length)}\n </>\n )\n}\n\n// --- TreeNodeItem (internal) ---\n\ninterface TreeNodeItemProps {\n node: TreeSelectNode\n depth: number\n multiple: boolean\n selectedSet: Set<string>\n expandedValues: Set<string>\n focusedValue: string | null\n onToggleExpand: (value: string) => void\n onSelect: (node: TreeSelectNode) => void\n onFocus: (value: string) => void\n searchTerm: string\n}\n\nfunction TreeNodeItem({\n node,\n depth,\n multiple,\n selectedSet,\n expandedValues,\n focusedValue,\n onToggleExpand,\n onSelect,\n onFocus,\n searchTerm,\n}: TreeNodeItemProps) {\n const hasChildren = node.children && node.children.length > 0\n const isExpanded = expandedValues.has(node.value)\n const checkState = multiple\n ? getCheckState(node, selectedSet)\n : selectedSet.has(node.value)\n ? \"checked\"\n : \"unchecked\"\n\n const indentPx = depth * 20\n\n return (\n <div\n role=\"treeitem\"\n aria-expanded={hasChildren ? isExpanded : undefined}\n aria-selected={checkState === \"checked\"}\n >\n <div\n className={cn(\n \"relative flex items-center gap-2 rounded-sm px-2 py-1.5 my-0.5 text-sm cursor-pointer select-none outline-none\",\n \"hover:bg-muted\",\n checkState === \"checked\" && !multiple && \"bg-muted\"\n // This adds a focus ring when the node is focused, but it's not needed for the tree-select component.\n // focusedValue === node.value && \"z-10 ring-2 ring-ring\"\n )}\n style={{ paddingLeft: `${8 + indentPx}px` }}\n onClick={() => onSelect(node)}\n onFocus={() => onFocus(node.value)}\n data-tree-value={node.value}\n tabIndex={focusedValue === node.value ? 0 : -1}\n >\n {hasChildren ? (\n <button\n type=\"button\"\n className=\"h-4 w-4 shrink-0 flex items-center justify-center rounded-sm hover:bg-secondary\"\n onClick={(e) => {\n e.stopPropagation()\n onToggleExpand(node.value)\n }}\n aria-label={\n isExpanded ? `Collapse ${node.label}` : `Expand ${node.label}`\n }\n tabIndex={-1}\n >\n {isExpanded ? (\n <ChevronDown className=\"h-3.5 w-3.5\" />\n ) : (\n <ChevronRight className=\"h-3.5 w-3.5\" />\n )}\n </button>\n ) : (\n <span className=\"h-4 w-4 shrink-0\" />\n )}\n\n {multiple ? (\n <Checkbox\n checked={\n checkState === \"checked\"\n ? true\n : checkState === \"indeterminate\"\n ? \"indeterminate\"\n : false\n }\n onCheckedChange={() => onSelect(node)}\n onClick={(e) => e.stopPropagation()}\n className=\"shrink-0\"\n aria-label={node.label}\n />\n ) : (\n <Check\n className={cn(\n \"h-4 w-4 shrink-0\",\n checkState === \"checked\" ? \"opacity-100\" : \"opacity-0\"\n )}\n />\n )}\n\n <span className=\"truncate\">\n {renderHighlightedLabel(node.label, searchTerm)}\n </span>\n </div>\n\n {hasChildren && isExpanded && (\n <div role=\"group\">\n {node.children!.map((child) => (\n <TreeNodeItem\n key={child.value}\n node={child}\n depth={depth + 1}\n multiple={multiple}\n selectedSet={selectedSet}\n expandedValues={expandedValues}\n focusedValue={focusedValue}\n onToggleExpand={onToggleExpand}\n onSelect={onSelect}\n onFocus={onFocus}\n searchTerm={searchTerm}\n />\n ))}\n </div>\n )}\n </div>\n )\n}\n\n// --- TreeSelect (main component) ---\n\nexport function TreeSelect({\n nodes,\n value,\n onValueChange,\n multiple = false,\n values = [],\n onValuesChange,\n placeholder = \"Select...\",\n searchPlaceholder = \"Search...\",\n emptyMessage = \"No results found.\",\n disabled = false,\n className,\n error = false,\n defaultExpandedValues,\n expandAll = false,\n}: TreeSelectProps) {\n const [open, setOpen] = React.useState(false)\n const [searchTerm, setSearchTerm] = React.useState(\"\")\n const [focusedValue, setFocusedValue] = React.useState<string | null>(null)\n const [expandedValues, setExpandedValues] = React.useState<Set<string>>(\n () => {\n if (expandAll) return collectAllBranchValues(nodes)\n if (defaultExpandedValues) return new Set(defaultExpandedValues)\n return new Set<string>()\n }\n )\n\n const preSearchExpandedRef = React.useRef<Set<string> | null>(null)\n const treeRef = React.useRef<HTMLDivElement>(null)\n\n const selectedSet = React.useMemo(\n () => new Set(multiple ? values : value ? [value] : []),\n [multiple, values, value]\n )\n\n const filteredNodes = React.useMemo(\n () => (searchTerm ? filterTree(nodes, searchTerm) : nodes),\n [nodes, searchTerm]\n )\n\n // Auto-expand matching ancestors during search\n React.useEffect(() => {\n if (searchTerm) {\n if (!preSearchExpandedRef.current) {\n preSearchExpandedRef.current = new Set(expandedValues)\n }\n const matchingAncestors = getValuesOfMatchingNodes(nodes, searchTerm)\n setExpandedValues(matchingAncestors)\n } else if (preSearchExpandedRef.current) {\n setExpandedValues(preSearchExpandedRef.current)\n preSearchExpandedRef.current = null\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [searchTerm, nodes])\n\n const handleOpenChange = React.useCallback((isOpen: boolean) => {\n setOpen(isOpen)\n if (!isOpen) {\n setSearchTerm(\"\")\n setFocusedValue(null)\n }\n }, [])\n\n const handleToggleExpand = React.useCallback((nodeValue: string) => {\n setExpandedValues((prev) => {\n const next = new Set(prev)\n if (next.has(nodeValue)) {\n next.delete(nodeValue)\n } else {\n next.add(nodeValue)\n }\n return next\n })\n }, [])\n\n const handleSelect = React.useCallback(\n (node: TreeSelectNode) => {\n if (multiple) {\n const allDescendants = getAllDescendantValues(node)\n const currentState = getCheckState(node, selectedSet)\n\n let newValues: string[]\n if (currentState === \"checked\") {\n const toRemove = new Set(allDescendants)\n newValues = values.filter((v) => !toRemove.has(v))\n } else {\n const toAdd = allDescendants.filter((v) => !selectedSet.has(v))\n newValues = [...values, ...toAdd]\n }\n onValuesChange?.(newValues)\n } else {\n // Single-select: clicking a parent toggles expand instead of selecting\n const hasChildren = node.children && node.children.length > 0\n if (hasChildren) {\n handleToggleExpand(node.value)\n return\n }\n const newValue = node.value === value ? \"\" : node.value\n onValueChange?.(newValue)\n setOpen(false)\n }\n },\n [\n multiple,\n values,\n value,\n selectedSet,\n onValuesChange,\n onValueChange,\n handleToggleExpand,\n ]\n )\n\n const handleRemoveChip = React.useCallback(\n (chipValue: string, e: React.MouseEvent) => {\n e.preventDefault()\n e.stopPropagation()\n const node = findNodeByValue(nodes, chipValue)\n if (node) {\n const toRemove = new Set(getAllDescendantValues(node))\n const newValues = values.filter((v) => !toRemove.has(v))\n onValuesChange?.(newValues)\n }\n },\n [nodes, values, onValuesChange]\n )\n\n // Smart chips: minimal set representing the selection\n const chipValues = React.useMemo(() => {\n if (!multiple) return []\n\n const chips: string[] = []\n\n function walk(nodeList: TreeSelectNode[]) {\n for (const node of nodeList) {\n const state = getCheckState(node, selectedSet)\n if (state === \"checked\") {\n chips.push(node.value)\n } else if (state === \"indeterminate\" && node.children) {\n walk(node.children)\n }\n }\n }\n\n walk(nodes)\n return chips\n }, [nodes, selectedSet, multiple])\n\n // Keyboard navigation\n const getVisibleNodes = React.useCallback((): HTMLElement[] => {\n if (!treeRef.current) return []\n return Array.from(treeRef.current.querySelectorAll(\"[data-tree-value]\"))\n }, [])\n\n const handleTreeKeyDown = React.useCallback(\n (e: React.KeyboardEvent) => {\n const visibleNodes = getVisibleNodes()\n const currentIndex = visibleNodes.findIndex(\n (el) => el.dataset.treeValue === focusedValue\n )\n\n switch (e.key) {\n case \"ArrowDown\": {\n e.preventDefault()\n const nextIndex = Math.min(currentIndex + 1, visibleNodes.length - 1)\n const nextValue = visibleNodes[nextIndex]?.dataset.treeValue\n if (nextValue) {\n setFocusedValue(nextValue)\n visibleNodes[nextIndex]?.focus()\n }\n break\n }\n case \"ArrowUp\": {\n e.preventDefault()\n const prevIndex = Math.max(currentIndex - 1, 0)\n const prevValue = visibleNodes[prevIndex]?.dataset.treeValue\n if (prevValue) {\n setFocusedValue(prevValue)\n visibleNodes[prevIndex]?.focus()\n }\n break\n }\n case \"ArrowRight\": {\n e.preventDefault()\n if (focusedValue) {\n const node = findNodeByValue(nodes, focusedValue)\n if (node?.children?.length) {\n if (!expandedValues.has(focusedValue)) {\n handleToggleExpand(focusedValue)\n } else {\n const firstChildValue = node.children[0].value\n setFocusedValue(firstChildValue)\n requestAnimationFrame(() => {\n const els = getVisibleNodes()\n const el = els.find(\n (n) => n.dataset.treeValue === firstChildValue\n )\n el?.focus()\n })\n }\n }\n }\n break\n }\n case \"ArrowLeft\": {\n e.preventDefault()\n if (focusedValue && expandedValues.has(focusedValue)) {\n handleToggleExpand(focusedValue)\n }\n break\n }\n case \"Enter\":\n case \" \": {\n e.preventDefault()\n if (focusedValue) {\n const node = findNodeByValue(nodes, focusedValue)\n if (node) handleSelect(node)\n }\n break\n }\n case \"Home\": {\n e.preventDefault()\n const firstValue = visibleNodes[0]?.dataset.treeValue\n if (firstValue) {\n setFocusedValue(firstValue)\n visibleNodes[0]?.focus()\n }\n break\n }\n case \"End\": {\n e.preventDefault()\n const lastValue =\n visibleNodes[visibleNodes.length - 1]?.dataset.treeValue\n if (lastValue) {\n setFocusedValue(lastValue)\n visibleNodes[visibleNodes.length - 1]?.focus()\n }\n break\n }\n }\n },\n [\n focusedValue,\n nodes,\n expandedValues,\n getVisibleNodes,\n handleToggleExpand,\n handleSelect,\n ]\n )\n\n const getDisplayText = () => {\n if (multiple) {\n if (values.length === 0) return placeholder\n if (values.length === 1) {\n const node = findNodeByValue(nodes, values[0])\n return node?.label ?? values[0]\n }\n return `${values.length} selected`\n }\n if (value) {\n const node = findNodeByValue(nodes, value)\n return node?.label ?? value\n }\n return placeholder\n }\n\n const renderSelectedChips = () => {\n if (!multiple || chipValues.length === 0) return null\n\n const chipNodes = chipValues\n .map((v) => findNodeByValue(nodes, v))\n .filter(Boolean) as TreeSelectNode[]\n\n return (\n <div className=\"max-h-[100px] overflow-y-auto px-2 py-1.5 border-b border-border\">\n <div className=\"flex flex-wrap gap-1\">\n {chipNodes.map((node) => (\n <div\n key={node.value}\n className=\"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs\"\n >\n <span className=\"truncate max-w-[120px]\">{node.label}</span>\n <X\n className=\"h-3 w-3 cursor-pointer shrink-0\"\n onClick={(e) => handleRemoveChip(node.value, e)}\n aria-label={`Remove ${node.label}`}\n />\n </div>\n ))}\n </div>\n </div>\n )\n }\n\n return (\n <Popover open={open} onOpenChange={handleOpenChange}>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n role=\"combobox\"\n aria-expanded={open}\n aria-haspopup=\"tree\"\n disabled={disabled}\n className={cn(\n \"cursor-pointer flex my-2 h-9 w-full items-center justify-between rounded-3xl border border-border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n !value && !values.length && \"text-secondary-text\",\n error &&\n \"border-destructive-foreground focus-visible:ring-destructive-foreground\",\n className\n )}\n >\n <span className=\"truncate\">{getDisplayText()}</span>\n <ChevronDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </button>\n </PopoverTrigger>\n <PopoverContent\n className=\"p-0\"\n align=\"start\"\n style={{ width: \"var(--radix-popover-trigger-width)\" }}\n >\n <div className=\"flex items-center border-b px-3\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <input\n value={searchTerm}\n onChange={(e) => setSearchTerm(e.target.value)}\n placeholder={searchPlaceholder}\n className=\"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\"\n aria-label=\"Search tree\"\n />\n </div>\n\n {renderSelectedChips()}\n\n <div className=\"max-h-[300px] overflow-y-auto\">\n {filteredNodes && filteredNodes.length > 0 ? (\n <div\n ref={treeRef}\n role=\"tree\"\n aria-label=\"Options\"\n className=\"p-1\"\n onKeyDown={handleTreeKeyDown}\n >\n {filteredNodes.map((node) => (\n <TreeNodeItem\n key={node.value}\n node={node}\n depth={0}\n multiple={multiple}\n selectedSet={selectedSet}\n expandedValues={expandedValues}\n focusedValue={focusedValue}\n onToggleExpand={handleToggleExpand}\n onSelect={handleSelect}\n onFocus={setFocusedValue}\n searchTerm={searchTerm}\n />\n ))}\n </div>\n ) : (\n <div className=\"py-6 text-center text-sm text-muted-foreground\">\n {emptyMessage}\n </div>\n )}\n </div>\n </PopoverContent>\n </Popover>\n )\n}\n"],"mappings":";yIAEA,UAAYA,MAAW,QACvB,OAAS,SAAAC,GAAO,eAAAC,EAAa,gBAAAC,GAAc,UAAAC,GAAQ,KAAAC,OAAS,eAgKxD,mBAAAC,GAEE,OAAAC,EAFF,QAAAC,MAAA,oBA3HJ,SAASC,EAAuBC,EAAgC,CAC9D,IAAMC,EAAmB,CAACD,EAAK,KAAK,EACpC,GAAIA,EAAK,SACP,QAAWE,KAASF,EAAK,SACvBC,EAAO,KAAK,GAAGF,EAAuBG,CAAK,CAAC,EAGhD,OAAOD,CACT,CAEA,SAASE,EACPH,EACAI,EACY,CACZ,GAAI,CAACJ,EAAK,UAAYA,EAAK,SAAS,SAAW,EAC7C,OAAOI,EAAY,IAAIJ,EAAK,KAAK,EAAI,UAAY,YAGnD,IAAMK,EAAcN,EAAuBC,CAAI,EACzCM,EAAgBD,EAAY,OAAQE,GAAMH,EAAY,IAAIG,CAAC,CAAC,EAAE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EAAA,CAEC,KAAM3B,EACN,MAAO,EACP,SAAU6B,EACV,YAAazB,EACb,eAAgB0B,EAChB,aAAcC,EACd,eAAgBoC,EAChB,SAAUI,EACV,QAASZ,EACT,WAAYjD,GAVPV,EAAK,KAWZ,CACD,EACH,EAEAH,EAAC,OAAI,UAAU,iDACZ,SAAAqD,EACH,EAEJ,GACF,GACF,CAEJ","names":["React","Check","ChevronDown","ChevronRight","Search","X","Fragment","jsx","jsxs","getAllDescendantValues","node","values","child","getCheckState","selectedSet","descendants","selectedCount","v","filterTree","nodes","searchTerm","term","result","labelMatches","filteredChildren","getValuesOfMatchingNodes","walk","nodeList","hasMatch","childHasMatch","findNodeByValue","value","found","collectAllBranchValues","renderHighlightedLabel","label","index","TreeNodeItem","depth","multiple","expandedValues","focusedValue","onToggleExpand","onSelect","onFocus","hasChildren","isExpanded","checkState","indentPx","cn","e","ChevronDown","ChevronRight","Checkbox","Check","TreeSelect","onValueChange","onValuesChange","placeholder","searchPlaceholder","emptyMessage","disabled","className","error","defaultExpandedValues","expandAll","open","setOpen","setSearchTerm","setFocusedValue","setExpandedValues","preSearchExpandedRef","treeRef","filteredNodes","matchingAncestors","handleOpenChange","isOpen","handleToggleExpand","nodeValue","prev","next","handleSelect","allDescendants","currentState","newValues","toRemove","toAdd","newValue","handleRemoveChip","chipValue","chipValues","chips","state","getVisibleNodes","handleTreeKeyDown","visibleNodes","currentIndex","el","nextIndex","nextValue","prevIndex","prevValue","firstChildValue","n","firstValue","lastValue","getDisplayText","renderSelectedChips","chipNodes","X","Popover","PopoverTrigger","PopoverContent","Search"]}
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{a as t}from"./chunk-S5TKCF6T.mjs";import*as o from"react";import*as e from"@radix-ui/react-checkbox";import{Check as n,Minus as d}from"lucide-react";import{jsx as i,jsxs as m}from"react/jsx-runtime";var s=o.forwardRef(({className:a,...r},c)=>i(e.Root,{ref:c,className:t("group peer h-4 w-4 bg-background shrink-0 rounded-xs border border-accent-muted ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-accent data-[state=checked]:border-accent data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-accent data-[state=indeterminate]:border-accent data-[state=indeterminate]:text-primary-foreground",a),...r,children:m(e.Indicator,{className:t("flex items-center justify-center text-current"),children:[i(n,{className:"h-4 w-4 group-data-[state=indeterminate]:hidden"}),i(d,{className:"h-4 w-4 hidden group-data-[state=indeterminate]:block"})]})}));s.displayName=e.Root.displayName;export{s as a};
3
+ //# sourceMappingURL=chunk-KGNX6UST.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/checkbox.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\"\nimport { Check, Minus } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Checkbox = React.forwardRef<\n React.ElementRef<typeof CheckboxPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n \"group peer h-4 w-4 bg-background shrink-0 rounded-xs border border-accent-muted ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-accent data-[state=checked]:border-accent data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-accent data-[state=indeterminate]:border-accent data-[state=indeterminate]:text-primary-foreground\",\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n className={cn(\"flex items-center justify-center text-current\")}\n >\n <Check className=\"h-4 w-4 group-data-[state=indeterminate]:hidden\" />\n <Minus className=\"h-4 w-4 hidden group-data-[state=indeterminate]:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\n\nexport { Checkbox }\n"],"mappings":";yCAEA,UAAYA,MAAW,QACvB,UAAYC,MAAuB,2BACnC,OAAS,SAAAC,EAAO,SAAAC,MAAa,eAgBzB,OAGE,OAAAC,EAHF,QAAAC,MAAA,oBAZJ,IAAMC,EAAiB,aAGrB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC1BL,EAAmB,OAAlB,CACC,IAAKK,EACL,UAAWC,EACT,6eACAH,CACF,EACC,GAAGC,EAEJ,SAAAH,EAAmB,YAAlB,CACC,UAAWK,EAAG,+CAA+C,EAE7D,UAAAN,EAACO,EAAA,CAAM,UAAU,kDAAkD,EACnEP,EAACQ,EAAA,CAAM,UAAU,wDAAwD,GAC3E,EACF,CACD,EACDN,EAAS,YAAgC,OAAK","names":["React","CheckboxPrimitive","Check","Minus","jsx","jsxs","Checkbox","className","props","ref","cn","Check","Minus"]}
@@ -0,0 +1,3 @@
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 _react = require('react'); var o = _interopRequireWildcard(_react);var _reactcheckbox = require('@radix-ui/react-checkbox'); var e = _interopRequireWildcard(_reactcheckbox);var _lucidereact = require('lucide-react');var _jsxruntime = require('react/jsx-runtime');var s=o.forwardRef(({className:a,...r},c)=>_jsxruntime.jsx.call(void 0, e.Root,{ref:c,className:_chunkFUYXCJOQjs.a.call(void 0, "group peer h-4 w-4 bg-background shrink-0 rounded-xs border border-accent-muted ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-accent data-[state=checked]:border-accent data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-accent data-[state=indeterminate]:border-accent data-[state=indeterminate]:text-primary-foreground",a),...r,children:_jsxruntime.jsxs.call(void 0, e.Indicator,{className:_chunkFUYXCJOQjs.a.call(void 0, "flex items-center justify-center text-current"),children:[_jsxruntime.jsx.call(void 0, _lucidereact.Check,{className:"h-4 w-4 group-data-[state=indeterminate]:hidden"}),_jsxruntime.jsx.call(void 0, _lucidereact.Minus,{className:"h-4 w-4 hidden group-data-[state=indeterminate]:block"})]})}));s.displayName=e.Root.displayName;exports.a = s;
3
+ //# sourceMappingURL=chunk-LCKRYIEJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-LCKRYIEJ.js","../src/components/checkbox.tsx"],"names":["Checkbox","className","props","ref","jsx","cn","jsxs","Check","Minus"],"mappings":"AAAA,uWAAY;AACZ,sDAAuC,uECChB,0GACY,2CACN,+CAgBzB,IAZEA,CAAAA,CAAiB,CAAA,CAAA,UAAA,CAGrB,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAC1BC,6BAAAA,CAAmB,CAAA,IAAA,CAAlB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,gCAAAA,4eACT,CACAJ,CACF,CAAA,CACC,GAAGC,CAAAA,CAEJ,QAAA,CAAAI,8BAAAA,CAAmB,CAAA,SAAA,CAAlB,CACC,SAAA,CAAWD,gCAAAA,+CAAkD,CAAA,CAE7D,QAAA,CAAA,CAAAD,6BAAAA,kBAACG,CAAA,CAAM,SAAA,CAAU,iDAAA,CAAkD,CAAA,CACnEH,6BAAAA,kBAACI,CAAA,CAAM,SAAA,CAAU,uDAAA,CAAwD,CAAA,CAAA,CAC3E,CAAA,CACF,CACD,CAAA,CACDR,CAAAA,CAAS,WAAA,CAAgC,CAAA,CAAA,IAAA,CAAK,WAAA,CAAA,cAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-LCKRYIEJ.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\"\nimport { Check, Minus } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Checkbox = React.forwardRef<\n React.ElementRef<typeof CheckboxPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n \"group peer h-4 w-4 bg-background shrink-0 rounded-xs border border-accent-muted ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-accent data-[state=checked]:border-accent data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-accent data-[state=indeterminate]:border-accent data-[state=indeterminate]:text-primary-foreground\",\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n className={cn(\"flex items-center justify-center text-current\")}\n >\n <Check className=\"h-4 w-4 group-data-[state=indeterminate]:hidden\" />\n <Minus className=\"h-4 w-4 hidden group-data-[state=indeterminate]:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\n\nexport { Checkbox }\n"]}
@@ -0,0 +1,3 @@
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; } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
2
+ var _chunkULIOO55Ijs = require('./chunk-ULIOO55I.js');var _chunkGVSERRZXjs = require('./chunk-GVSERRZX.js');var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var d = _interopRequireWildcard(_react);var _lucidereact = require('lucide-react');var _jsxruntime = require('react/jsx-runtime');function U({options:c=[],groups:s,value:i,onValueChange:M,placeholder:u="Select option...",searchPlaceholder:D="Search...",emptyMessage:E="No option found.",disabled:I=!1,className:T,error:L=!1,multiple:l=!1,values:r=[],onValuesChange:f}){let[g,v]=d.useState(!1),x=d.useMemo(()=>s?s.flatMap(e=>e.options):c,[s,c]),C=x.find(e=>e.value===i),a=x.filter(e=>r.includes(e.value)),X=e=>{if(l){let n=r.includes(e)?r.filter(m=>m!==e):[...r,e];_optionalChain([f, 'optionalCall', _ => _(n)])}else _optionalChain([M, 'optionalCall', _2 => _2(e===i?"":e)]),v(!1)},$=(e,n)=>{n.preventDefault(),n.stopPropagation();let m=r.filter(q=>q!==e);_optionalChain([f, 'optionalCall', _3 => _3(m)])},j=()=>l?a.length===0?u:a.length===1?a[0].label:`${a.length} selected`:C?C.label:u,h=e=>{let n=l?r.includes(e.value):i===e.value;return _jsxruntime.jsxs.call(void 0, _chunkGVSERRZXjs.h,{value:e.value,onSelect:X,className:"rounded-[12px]",children:[_jsxruntime.jsx.call(void 0, "span",{className:"truncate",children:e.label}),_jsxruntime.jsx.call(void 0, _lucidereact.Check,{className:_chunkFUYXCJOQjs.a.call(void 0, "ml-auto h-4 w-4 shrink-0",n?"opacity-100":"opacity-0")})]},e.value)},y=()=>!l||a.length===0?null:_jsxruntime.jsx.call(void 0, "div",{className:"px-2 py-1.5",children:_jsxruntime.jsx.call(void 0, "div",{className:"flex flex-wrap gap-1",children:a.map(e=>_jsxruntime.jsxs.call(void 0, "div",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs",children:[_jsxruntime.jsx.call(void 0, "span",{className:"truncate",children:e.label}),_jsxruntime.jsx.call(void 0, _lucidereact.X,{className:"h-3 w-3 cursor-pointer",onClick:n=>$(e.value,n)})]},e.value))})});return _jsxruntime.jsxs.call(void 0, _chunkULIOO55Ijs.a,{open:g,onOpenChange:v,children:[_jsxruntime.jsx.call(void 0, _chunkULIOO55Ijs.b,{asChild:!0,children:_jsxruntime.jsxs.call(void 0, "button",{type:"button",role:"combobox","aria-expanded":g,disabled:I,className:_chunkFUYXCJOQjs.a.call(void 0, "cursor-pointer flex my-2 h-9 w-full items-center justify-between rounded-3xl border border-border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",!i&&!r.length&&"text-secondary-text",L&&"border-destructive-foreground focus-visible:ring-destructive-foreground",T),children:[_jsxruntime.jsx.call(void 0, "span",{className:"truncate",children:j()}),_jsxruntime.jsx.call(void 0, _lucidereact.ChevronDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),_jsxruntime.jsx.call(void 0, _chunkULIOO55Ijs.c,{className:"overflow-hidden rounded-xl p-0",align:"start",style:{width:"var(--radix-popover-trigger-width)"},children:_jsxruntime.jsxs.call(void 0, _chunkGVSERRZXjs.a,{children:[_jsxruntime.jsx.call(void 0, _chunkGVSERRZXjs.c,{placeholder:D}),_jsxruntime.jsxs.call(void 0, _chunkGVSERRZXjs.d,{children:[_jsxruntime.jsx.call(void 0, _chunkGVSERRZXjs.e,{children:E}),s?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[y(),s.map(e=>_jsxruntime.jsx.call(void 0, _chunkGVSERRZXjs.f,{heading:e.label,children:e.options.map(h)},e.label))]}):_jsxruntime.jsxs.call(void 0, _chunkGVSERRZXjs.f,{children:[y(),c.map(h)]})]})]})})]})}exports.a = U;
3
+ //# sourceMappingURL=chunk-MSYJFTUX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-MSYJFTUX.js","../src/components/combobox.tsx"],"names":["Combobox","options","groups","value","onValueChange","placeholder","searchPlaceholder","emptyMessage","disabled","className","error","multiple","values","onValuesChange","open","setOpen","allOptions","g","selectedOption","option","selectedOptions","handleSelect","currentValue","newValues","v","handleRemoveValue","valueToRemove","e","getDisplayText"],"mappings":"AAAA,22BAAY;AACZ,sDAAqD,sDAA2E,sDAAwC,uECDjJ,2CACe,+CAoGhC,SA7DUA,CAAAA,CAAS,CACvB,OAAA,CAAAC,CAAAA,CAAU,CAAC,CAAA,CACX,MAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CAAc,kBAAA,CACd,iBAAA,CAAAC,CAAAA,CAAoB,WAAA,CACpB,YAAA,CAAAC,CAAAA,CAAe,kBAAA,CACf,QAAA,CAAAC,CAAAA,CAAW,CAAA,CAAA,CACX,SAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CAAQ,CAAA,CAAA,CACR,QAAA,CAAAC,CAAAA,CAAW,CAAA,CAAA,CACX,MAAA,CAAAC,CAAAA,CAAS,CAAC,CAAA,CACV,cAAA,CAAAC,CACF,CAAA,CAAkB,CAChB,GAAM,CAACC,CAAAA,CAAMC,CAAO,CAAA,CAAU,CAAA,CAAA,QAAA,CAAS,CAAA,CAAK,CAAA,CAEtCC,CAAAA,CAAmB,CAAA,CAAA,OAAA,CAAQ,CAAA,CAAA,EAC3Bd,CAAAA,CAAeA,CAAAA,CAAO,OAAA,CAASe,CAAAA,EAAMA,CAAAA,CAAE,OAAO,CAAA,CAC3ChB,CAAAA,CACN,CAACC,CAAAA,CAAQD,CAAO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k-MSYJFTUX.js","sourcesContent":[null,"import * as React from \"react\"\nimport { Check, ChevronDown, X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from \"@/components/command\"\nimport { Popover, PopoverContent, PopoverTrigger } from \"@/components/popover\"\n\nexport interface ComboboxOption {\n value: string\n label: string\n}\n\nexport interface ComboboxGroup {\n label: string\n options: ComboboxOption[]\n}\n\nexport interface ComboboxProps {\n options?: ComboboxOption[]\n groups?: ComboboxGroup[]\n value?: string\n onValueChange?: (value: string) => void\n placeholder?: string\n searchPlaceholder?: string\n emptyMessage?: string\n disabled?: boolean\n className?: string\n error?: boolean\n multiple?: boolean\n values?: string[]\n onValuesChange?: (values: string[]) => void\n}\n\nexport function Combobox({\n options = [],\n groups,\n value,\n onValueChange,\n placeholder = \"Select option...\",\n searchPlaceholder = \"Search...\",\n emptyMessage = \"No option found.\",\n disabled = false,\n className,\n error = false,\n multiple = false,\n values = [],\n onValuesChange,\n}: ComboboxProps) {\n const [open, setOpen] = React.useState(false)\n\n const allOptions = React.useMemo(() => {\n if (groups) return groups.flatMap((g) => g.options)\n return options\n }, [groups, options])\n\n const selectedOption = allOptions.find((option) => option.value === value)\n const selectedOptions = allOptions.filter((option) =>\n values.includes(option.value)\n )\n\n const handleSelect = (currentValue: string) => {\n if (multiple) {\n const newValues = values.includes(currentValue)\n ? values.filter((v) => v !== currentValue)\n : [...values, currentValue]\n onValuesChange?.(newValues)\n } else {\n onValueChange?.(currentValue === value ? \"\" : currentValue)\n setOpen(false)\n }\n }\n\n const handleRemoveValue = (valueToRemove: string, e: React.MouseEvent) => {\n e.preventDefault()\n e.stopPropagation()\n const newValues = values.filter((v) => v !== valueToRemove)\n onValuesChange?.(newValues)\n }\n\n const getDisplayText = () => {\n if (multiple) {\n if (selectedOptions.length === 0) return placeholder\n if (selectedOptions.length === 1) return selectedOptions[0].label\n return `${selectedOptions.length} selected`\n }\n return selectedOption ? selectedOption.label : placeholder\n }\n\n const renderOption = (option: ComboboxOption) => {\n const isSelected = multiple\n ? values.includes(option.value)\n : value === option.value\n\n return (\n <CommandItem\n key={option.value}\n value={option.value}\n onSelect={handleSelect}\n className=\"rounded-[12px]\"\n >\n <span className=\"truncate\">{option.label}</span>\n <Check\n className={cn(\n \"ml-auto h-4 w-4 shrink-0\",\n isSelected ? \"opacity-100\" : \"opacity-0\"\n )}\n />\n </CommandItem>\n )\n }\n\n const renderSelectedChips = () => {\n if (!multiple || selectedOptions.length === 0) return null\n\n return (\n <div className=\"px-2 py-1.5\">\n <div className=\"flex flex-wrap gap-1\">\n {selectedOptions.map((option) => (\n <div\n key={option.value}\n className=\"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs\"\n >\n <span className=\"truncate\">{option.label}</span>\n <X\n className=\"h-3 w-3 cursor-pointer\"\n onClick={(e) => handleRemoveValue(option.value, e)}\n />\n </div>\n ))}\n </div>\n </div>\n )\n }\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n role=\"combobox\"\n aria-expanded={open}\n disabled={disabled}\n className={cn(\n \"cursor-pointer flex my-2 h-9 w-full items-center justify-between rounded-3xl border border-border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n !value && !values.length && \"text-secondary-text\",\n error &&\n \"border-destructive-foreground focus-visible:ring-destructive-foreground\",\n className\n )}\n >\n <span className=\"truncate\">{getDisplayText()}</span>\n <ChevronDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </button>\n </PopoverTrigger>\n <PopoverContent\n className=\"overflow-hidden rounded-xl p-0\"\n align=\"start\"\n style={{ width: \"var(--radix-popover-trigger-width)\" }}\n >\n <Command>\n <CommandInput placeholder={searchPlaceholder} />\n <CommandList>\n <CommandEmpty>{emptyMessage}</CommandEmpty>\n {groups ? (\n <>\n {renderSelectedChips()}\n {groups.map((group) => (\n <CommandGroup key={group.label} heading={group.label}>\n {group.options.map(renderOption)}\n </CommandGroup>\n ))}\n </>\n ) : (\n <CommandGroup>\n {renderSelectedChips()}\n {options.map(renderOption)}\n </CommandGroup>\n )}\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n )\n}\n"]}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{a as f}from"./chunk-5TVDBV74.mjs";import{a as p}from"./chunk-4LR7SOCY.mjs";import{b as w}from"./chunk-W65OWFZY.mjs";import{a as i}from"./chunk-S5TKCF6T.mjs";import*as a from"react";import{X as x}from"lucide-react";import{Drawer as l}from"vaul";import{jsx as r,jsxs as d}from"react/jsx-runtime";var R="24rem",v=a.createContext(null);function h(){let e=a.useContext(v);if(!e)throw new Error("useDrawer must be used within a Drawer component.");return e}var y=a.forwardRef(({isOpen:e,onClose:o,width:t=R,children:s,...n},c)=>{let u=a.useRef(null),m=p("lg"),b=a.useMemo(()=>({isOpen:e,onClose:o,width:t}),[e,o,t]);return d(v.Provider,{value:b,children:[!m&&r(l.Root,{open:e,onOpenChange:D=>{D||o()},direction:"left",children:d(l.Portal,{children:[r(l.Overlay,{className:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm"}),d(l.Content,{className:"fixed inset-y-0 left-0 z-50 flex h-full w-[85vw] max-w-md flex-col bg-sidebar border-r border-sidebar-border text-primary-accent shadow-lg outline-none","aria-describedby":void 0,children:[r(l.Title,{className:"sr-only",children:"Drawer"}),s]})]})}),m&&d("div",{ref:c,className:"group/drawer peer","data-state":e?"open":"closed",...n,children:[r("div",{className:i("relative bg-sidebar transition-[width] duration-200 ease-linear",e?"":"w-0"),style:{width:e?t:"0"}}),r("div",{ref:u,className:i("fixed right-0 z-40 transition-[right,width,top,height] duration-200 ease-linear flex","top-(--sidebar-top,0px) h-[calc(100svh-var(--sidebar-top,0px))]",e?"right-0":"right-[calc(var(--drawer-width)*-1)]"),style:{"--drawer-width":t,width:t},children:r("div",{"data-drawer":"drawer",className:"flex h-full w-full flex-col",children:r("div",{className:"flex flex-col my-2.5 mr-2.5 rounded-2xl border bg-sidebar border-sidebar-border h-[calc(100%-1.25rem)] shadow",children:s})})})]})]})});y.displayName="Drawer";var C=a.forwardRef(({className:e,showCloseButton:o=!0,children:t,...s},n)=>{let{onClose:c}=h();return d("div",{ref:n,"data-drawer":"header",className:i("flex w-full items-start justify-between gap-2 p-4 border-b border-sidebar-border",e),...s,children:[r("div",{className:"flex-1",children:t}),o&&d(w,{variant:"secondary",size:"icon",onClick:c,className:"h-8 w-8 shrink-0 rounded-full",children:[r(x,{size:16}),r("span",{className:"sr-only",children:"Close drawer"})]})]})});C.displayName="DrawerHeader";var N=a.forwardRef(({className:e,...o},t)=>r("h2",{ref:t,className:i("text-lg font-semibold text-primary-accent",e),...o}));N.displayName="DrawerTitle";var g=a.forwardRef(({className:e,children:o,...t},s)=>r(f,{className:"flex-1",ref:s,children:r("div",{"data-drawer":"body",className:i("p-4",e),...t,children:o})}));g.displayName="DrawerBody";var P=a.forwardRef(({className:e,...o},t)=>r("div",{ref:t,"data-drawer":"footer",className:i("flex flex-col gap-2 p-4 border-t border-sidebar-border",e),...o}));P.displayName="DrawerFooter";export{h as a,y as b,C as c,N as d,g as e,P as f};
3
- //# sourceMappingURL=chunk-JKSXSLVB.mjs.map
2
+ import{a as f}from"./chunk-5TVDBV74.mjs";import{a as p}from"./chunk-4LR7SOCY.mjs";import{b as w}from"./chunk-HRYHWWL4.mjs";import{a as i}from"./chunk-S5TKCF6T.mjs";import*as a from"react";import{X as x}from"lucide-react";import{Drawer as l}from"vaul";import{jsx as r,jsxs as d}from"react/jsx-runtime";var R="24rem",v=a.createContext(null);function h(){let e=a.useContext(v);if(!e)throw new Error("useDrawer must be used within a Drawer component.");return e}var y=a.forwardRef(({isOpen:e,onClose:o,width:t=R,children:s,...n},c)=>{let u=a.useRef(null),m=p("lg"),b=a.useMemo(()=>({isOpen:e,onClose:o,width:t}),[e,o,t]);return d(v.Provider,{value:b,children:[!m&&r(l.Root,{open:e,onOpenChange:D=>{D||o()},direction:"left",children:d(l.Portal,{children:[r(l.Overlay,{className:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm"}),d(l.Content,{className:"fixed inset-y-0 left-0 z-50 flex h-full w-[85vw] max-w-md flex-col bg-sidebar border-r border-sidebar-border text-primary-accent shadow-lg outline-none","aria-describedby":void 0,children:[r(l.Title,{className:"sr-only",children:"Drawer"}),s]})]})}),m&&d("div",{ref:c,className:"group/drawer peer","data-state":e?"open":"closed",...n,children:[r("div",{className:i("relative bg-sidebar transition-[width] duration-200 ease-linear",e?"":"w-0"),style:{width:e?t:"0"}}),r("div",{ref:u,className:i("fixed right-0 z-40 transition-[right,width,top,height] duration-200 ease-linear flex","top-(--sidebar-top,0px) h-[calc(100svh-var(--sidebar-top,0px))]",e?"right-0":"right-[calc(var(--drawer-width)*-1)]"),style:{"--drawer-width":t,width:t},children:r("div",{"data-drawer":"drawer",className:"flex h-full w-full flex-col",children:r("div",{className:"flex flex-col my-2.5 mr-2.5 rounded-2xl border bg-sidebar border-sidebar-border h-[calc(100%-1.25rem)] shadow",children:s})})})]})]})});y.displayName="Drawer";var C=a.forwardRef(({className:e,showCloseButton:o=!0,children:t,...s},n)=>{let{onClose:c}=h();return d("div",{ref:n,"data-drawer":"header",className:i("flex w-full items-start justify-between gap-2 p-4 border-b border-sidebar-border",e),...s,children:[r("div",{className:"flex-1",children:t}),o&&d(w,{variant:"secondary",size:"icon",onClick:c,className:"h-8 w-8 shrink-0 rounded-full",children:[r(x,{size:16}),r("span",{className:"sr-only",children:"Close drawer"})]})]})});C.displayName="DrawerHeader";var N=a.forwardRef(({className:e,...o},t)=>r("h2",{ref:t,className:i("text-lg font-semibold text-primary-accent",e),...o}));N.displayName="DrawerTitle";var g=a.forwardRef(({className:e,children:o,...t},s)=>r(f,{className:"flex-1",ref:s,children:r("div",{"data-drawer":"body",className:i("p-4",e),...t,children:o})}));g.displayName="DrawerBody";var P=a.forwardRef(({className:e,...o},t)=>r("div",{ref:t,"data-drawer":"footer",className:i("flex flex-col gap-2 p-4 border-t border-sidebar-border",e),...o}));P.displayName="DrawerFooter";export{h as a,y as b,C as c,N as d,g as e,P as f};
3
+ //# sourceMappingURL=chunk-NGEWZBAJ.mjs.map
@@ -1,3 +1,3 @@
1
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 _react = require('react'); var o = _interopRequireWildcard(_react);var _reactslot = require('@radix-ui/react-slot');var _classvarianceauthority = require('class-variance-authority');var _jsxruntime = require('react/jsx-runtime');var m=_classvarianceauthority.cva.call(void 0, "inline-flex items-center cursor-pointer justify-center whitespace-nowrap rounded-4xl font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 active:opacity-50 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary-accent text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive hover:bg-destructive/90",outline:"border border-input hover:bg-base-accent text-primary-accent",secondary:"bg-muted text-primary-accent hover:bg-muted/20",ghost:"hover:bg-base-accent text-primary-accent",link:"text-primary-accent underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 text-sm",sm:"h-8 text-xs px-3 py-2",lg:"h-10 px-8 py-2 text-sm",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),f= exports.b =o.forwardRef(({className:i,variant:s,size:c,asChild:d=!1,loading:e=!1,icon:r,...t},u)=>_jsxruntime.jsxs.call(void 0, d?_reactslot.Slot:"button",{className:_chunkFUYXCJOQjs.a.call(void 0, m({variant:s,size:c,className:i})),ref:u,disabled:e||t.disabled,...t,children:[e&&_jsxruntime.jsx.call(void 0, "div",{className:"mr-2 h-4 w-4 animate-spin rounded-full border border-primary-foreground border-t-transparent"}),!e&&r&&_jsxruntime.jsx.call(void 0, "span",{className:"mr-2",children:r}),t.children]}));f.displayName="Button";exports.a = m; exports.b = f;
3
- //# sourceMappingURL=chunk-7T4BNCXL.js.map
2
+ var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var o = _interopRequireWildcard(_react);var _reactslot = require('@radix-ui/react-slot');var _classvarianceauthority = require('class-variance-authority');var _jsxruntime = require('react/jsx-runtime');var m=_classvarianceauthority.cva.call(void 0, "inline-flex items-center cursor-pointer justify-center whitespace-nowrap rounded-4xl font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 active:opacity-50 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary-accent text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive hover:bg-destructive/90",outline:"border border-input hover:bg-base-accent text-primary-accent",secondary:"bg-muted text-primary-accent hover:bg-muted/20",ghost:"hover:bg-base-accent text-primary-accent",link:"text-primary-accent underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 text-sm",sm:"h-8 text-xs px-3 py-2",lg:"h-10 px-8 py-2 text-sm",icon:"h-9 w-9",none:""}},defaultVariants:{variant:"default",size:"default"}}),f= exports.b =o.forwardRef(({className:i,variant:s,size:c,asChild:d=!1,loading:e=!1,icon:r,...t},u)=>_jsxruntime.jsxs.call(void 0, d?_reactslot.Slot:"button",{className:_chunkFUYXCJOQjs.a.call(void 0, m({variant:s,size:c,className:i})),ref:u,disabled:e||t.disabled,...t,children:[e&&_jsxruntime.jsx.call(void 0, "div",{className:"mr-2 h-4 w-4 animate-spin rounded-full border border-primary-foreground border-t-transparent"}),!e&&r&&_jsxruntime.jsx.call(void 0, "span",{className:"mr-2",children:r}),t.children]}));f.displayName="Button";exports.a = m; exports.b = f;
3
+ //# sourceMappingURL=chunk-OXMHA73F.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-OXMHA73F.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,+SACrB,CACA,CACE,QAAA,CAAU,CACR,OAAA,CAAS,CACP,OAAA,CACE,+DAAA,CACF,WAAA,CAAa,wCAAA,CACb,OAAA,CAAS,8DAAA,CACT,SAAA,CAAW,gDAAA,CACX,KAAA,CAAO,0CAAA,CACP,IAAA,CAAM,wDACR,CAAA,CACA,IAAA,CAAM,CACJ,OAAA,CAAS,uBAAA,CACT,EAAA,CAAI,uBAAA,CACJ,EAAA,CAAI,wBAAA,CACJ,IAAA,CAAM,SAAA,CACN,IAAA,CAAM,EACR,CACF,CAAA,CACA,eAAA,CAAiB,CACf,OAAA,CAAS,SAAA,CACT,IAAA,CAAM,SACR,CACF,CACF,CAAA,CAWMC,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-OXMHA73F.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-4xl font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 active:opacity-50 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary-accent text-primary-foreground hover:bg-primary/90\",\n destructive: \"bg-destructive hover:bg-destructive/90\",\n outline: \"border border-input hover:bg-base-accent text-primary-accent\",\n secondary: \"bg-muted text-primary-accent hover:bg-muted/20\",\n ghost: \"hover:bg-base-accent text-primary-accent\",\n link: \"text-primary-accent underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2 text-sm\",\n sm: \"h-8 text-xs px-3 py-2\",\n lg: \"h-10 px-8 py-2 text-sm\",\n icon: \"h-9 w-9\",\n none: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport interface ButtonProps\n extends\n 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"]}