@arolariu/components 0.0.39 → 0.0.40

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 (43) hide show
  1. package/CONTRIBUTING.md +371 -371
  2. package/DEBUGGING.md +401 -401
  3. package/EXAMPLES.md +1035 -1035
  4. package/{CHANGELOG.md → changelog.md} +7 -0
  5. package/dist/cjs/components/ui/bubble-background.cjs +1 -2
  6. package/dist/cjs/components/ui/bubble-background.cjs.map +1 -1
  7. package/dist/cjs/components/ui/calendar.cjs.map +1 -1
  8. package/dist/cjs/components/ui/chart.cjs.map +1 -1
  9. package/dist/cjs/components/ui/command.cjs +1 -1
  10. package/dist/cjs/components/ui/drawer.cjs.map +1 -1
  11. package/dist/cjs/components/ui/dropdrawer.cjs.map +1 -1
  12. package/dist/cjs/components/ui/input.cjs.map +1 -1
  13. package/dist/cjs/components/ui/ripple-button.cjs.map +1 -1
  14. package/dist/cjs/components/ui/scratcher.cjs.map +1 -1
  15. package/dist/cjs/components/ui/sidebar.cjs +4 -4
  16. package/dist/cjs/components/ui/sonner.cjs +2 -2
  17. package/dist/cjs/components/ui/tooltip.cjs +1 -1
  18. package/dist/cjs/index.cjs +6 -6
  19. package/dist/cjs/index.css +1 -1
  20. package/dist/cjs/index.css.map +1 -1
  21. package/dist/esm/components/ui/bubble-background.js +1 -2
  22. package/dist/esm/components/ui/bubble-background.js.map +1 -1
  23. package/dist/esm/components/ui/calendar.js.map +1 -1
  24. package/dist/esm/components/ui/chart.js.map +1 -1
  25. package/dist/esm/components/ui/drawer.js.map +1 -1
  26. package/dist/esm/components/ui/dropdrawer.js.map +1 -1
  27. package/dist/esm/components/ui/input.js.map +1 -1
  28. package/dist/esm/components/ui/ripple-button.js.map +1 -1
  29. package/dist/esm/components/ui/scratcher.js.map +1 -1
  30. package/dist/esm/index.css +1 -1
  31. package/dist/esm/index.css.map +1 -1
  32. package/dist/index.css +1 -1
  33. package/dist/types/components/ui/bubble-background.d.ts.map +1 -1
  34. package/package.json +51 -52
  35. package/{README.md → readme.md} +627 -627
  36. package/src/components/ui/bubble-background.tsx +189 -187
  37. package/src/components/ui/calendar.tsx +213 -213
  38. package/src/components/ui/chart.tsx +380 -380
  39. package/src/components/ui/drawer.tsx +141 -141
  40. package/src/components/ui/dropdrawer.tsx +973 -973
  41. package/src/components/ui/input.tsx +22 -22
  42. package/src/components/ui/ripple-button.tsx +111 -111
  43. package/src/components/ui/scratcher.tsx +171 -171
@@ -1 +1 @@
1
- {"version":3,"file":"components\\ui\\ripple-button.cjs","sources":["webpack://@arolariu/components/webpack/runtime/define_property_getters","webpack://@arolariu/components/webpack/runtime/has_own_property","webpack://@arolariu/components/webpack/runtime/make_namespace_object","webpack://@arolariu/components/./src/components/ui/ripple-button.tsx"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\n\nimport * as React from \"react\";\nimport { type HTMLMotionProps, motion, type Transition } from \"motion/react\";\n\nimport { cn } from \"@/lib/utils\";\n\ninterface Ripple {\n id: number;\n x: number;\n y: number;\n}\n\ninterface RippleButtonProps extends HTMLMotionProps<\"button\"> {\n children: React.ReactNode;\n rippleClassName?: string;\n scale?: number;\n transition?: Transition;\n}\n\nconst RippleButton = React.forwardRef<HTMLButtonElement, RippleButtonProps>(\n (\n {\n children,\n onClick,\n className,\n rippleClassName,\n scale = 10,\n transition = { duration: 0.6, ease: \"easeOut\" },\n ...props\n },\n ref,\n ) => {\n const [ripples, setRipples] = React.useState<Ripple[]>([]);\n const buttonRef = React.useRef<HTMLButtonElement>(null);\n React.useImperativeHandle(\n ref,\n () => buttonRef.current as HTMLButtonElement,\n );\n\n const createRipple = React.useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n const button = buttonRef.current;\n if (!button) return;\n\n const rect = button.getBoundingClientRect();\n const x = event.clientX - rect.left;\n const y = event.clientY - rect.top;\n\n const newRipple: Ripple = {\n id: Date.now(),\n x,\n y,\n };\n\n setRipples((prev) => [...prev, newRipple]);\n\n setTimeout(() => {\n setRipples((prev) => prev.filter((r) => r.id !== newRipple.id));\n }, 600);\n },\n [],\n );\n\n const handleClick = React.useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n createRipple(event);\n if (onClick) {\n onClick(event);\n }\n },\n [createRipple, onClick],\n );\n\n return (\n <motion.button\n ref={buttonRef}\n onClick={handleClick}\n whileTap={{ scale: 0.95 }}\n whileHover={{ scale: 1.05 }}\n className={cn(\n \"relative h-10 px-4 py-2 text-sm font-medium text-primary-foreground overflow-hidden bg-primary cursor-pointer rounded-lg focus:outline-none\",\n className,\n )}\n {...props}\n >\n {children}\n {ripples.map((ripple) => (\n <motion.span\n key={ripple.id}\n initial={{ scale: 0, opacity: 0.5 }}\n animate={{ scale, opacity: 0 }}\n transition={transition}\n className={cn(\n \"absolute bg-primary-foreground rounded-full size-5 pointer-events-none\",\n rippleClassName,\n )}\n style={{\n top: ripple.y - 10,\n left: ripple.x - 10,\n }}\n />\n ))}\n </motion.button>\n );\n },\n);\n\nRippleButton.displayName = \"RippleButton\";\n\nexport { RippleButton, type RippleButtonProps };\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","RippleButton","React","children","onClick","className","rippleClassName","scale","transition","props","ref","ripples","setRipples","buttonRef","createRipple","event","button","rect","x","y","newRipple","Date","prev","setTimeout","r","handleClick","motion","cn","ripple"],"mappings":";;;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC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AW;YACTX,WAAW,CAACU,OAASA,KAAK,MAAM,CAAC,CAACE,IAAMA,EAAE,EAAE,KAAKJ,UAAU,EAAE;QAC/D,GAAG;IACL,GACA,EAAE;IAGJ,MAAMK,cAAcvB,+BAAAA,WAAiB,CACnC,CAACa;QACCD,aAAaC;QACb,IAAIX,SACFA,QAAQW;IAEZ,GACA;QAACD;QAAcV;KAAQ;IAGzB,OACE,WADF,GACE,sCAACsB,sBAAAA,MAAAA,CAAAA,MAAa;QACZ,KAAKb;QACL,SAASY;QACT,UAAU;YAAE,OAAO;QAAK;QACxB,YAAY;YAAE,OAAO;QAAK;QAC1B,WAAWE,IAAAA,0BAAAA,EAAAA,EACT,+IACAtB;QAED,GAAGI,KAAK;;YAERN;YACAQ,QAAQ,GAAG,CAAC,CAACiB,SACZ,WADYA,GACZ,qCAACF,sBAAAA,MAAAA,CAAAA,IAAW;oBAEV,SAAS;wBAAE,OAAO;wBAAG,SAAS;oBAAI;oBAClC,SAAS;wBAAEnB;wBAAO,SAAS;oBAAE;oBAC7B,YAAYC;oBACZ,WAAWmB,IAAAA,0BAAAA,EAAAA,EACT,0EACArB;oBAEF,OAAO;wBACL,KAAKsB,OAAO,CAAC,GAAG;wBAChB,MAAMA,OAAO,CAAC,GAAG;oBACnB;mBAXKA,OAAO,EAAE;;;AAgBxB;AAGF3B,aAAa,WAAW,GAAG"}
1
+ {"version":3,"file":"components\\ui\\ripple-button.cjs","sources":["webpack://@arolariu/components/webpack/runtime/define_property_getters","webpack://@arolariu/components/webpack/runtime/has_own_property","webpack://@arolariu/components/webpack/runtime/make_namespace_object","webpack://@arolariu/components/./src/components/ui/ripple-button.tsx"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\r\n\r\nimport * as React from \"react\";\r\nimport { type HTMLMotionProps, motion, type Transition } from \"motion/react\";\r\n\r\nimport { cn } from \"@/lib/utils\";\r\n\r\ninterface Ripple {\r\n id: number;\r\n x: number;\r\n y: number;\r\n}\r\n\r\ninterface RippleButtonProps extends HTMLMotionProps<\"button\"> {\r\n children: React.ReactNode;\r\n rippleClassName?: string;\r\n scale?: number;\r\n transition?: Transition;\r\n}\r\n\r\nconst RippleButton = React.forwardRef<HTMLButtonElement, RippleButtonProps>(\r\n (\r\n {\r\n children,\r\n onClick,\r\n className,\r\n rippleClassName,\r\n scale = 10,\r\n transition = { duration: 0.6, ease: \"easeOut\" },\r\n ...props\r\n },\r\n ref,\r\n ) => {\r\n const [ripples, setRipples] = React.useState<Ripple[]>([]);\r\n const buttonRef = React.useRef<HTMLButtonElement>(null);\r\n React.useImperativeHandle(\r\n ref,\r\n () => buttonRef.current as HTMLButtonElement,\r\n );\r\n\r\n const createRipple = React.useCallback(\r\n (event: React.MouseEvent<HTMLButtonElement>) => {\r\n const button = buttonRef.current;\r\n if (!button) return;\r\n\r\n const rect = button.getBoundingClientRect();\r\n const x = event.clientX - rect.left;\r\n const y = event.clientY - rect.top;\r\n\r\n const newRipple: Ripple = {\r\n id: Date.now(),\r\n x,\r\n y,\r\n };\r\n\r\n setRipples((prev) => [...prev, newRipple]);\r\n\r\n setTimeout(() => {\r\n setRipples((prev) => prev.filter((r) => r.id !== newRipple.id));\r\n }, 600);\r\n },\r\n [],\r\n );\r\n\r\n const handleClick = React.useCallback(\r\n (event: React.MouseEvent<HTMLButtonElement>) => {\r\n createRipple(event);\r\n if (onClick) {\r\n onClick(event);\r\n }\r\n },\r\n [createRipple, onClick],\r\n );\r\n\r\n return (\r\n <motion.button\r\n ref={buttonRef}\r\n onClick={handleClick}\r\n whileTap={{ scale: 0.95 }}\r\n whileHover={{ scale: 1.05 }}\r\n className={cn(\r\n \"relative h-10 px-4 py-2 text-sm font-medium text-primary-foreground overflow-hidden bg-primary cursor-pointer rounded-lg focus:outline-none\",\r\n className,\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n {ripples.map((ripple) => (\r\n <motion.span\r\n key={ripple.id}\r\n initial={{ scale: 0, opacity: 0.5 }}\r\n animate={{ scale, opacity: 0 }}\r\n transition={transition}\r\n className={cn(\r\n \"absolute bg-primary-foreground rounded-full size-5 pointer-events-none\",\r\n rippleClassName,\r\n )}\r\n style={{\r\n top: ripple.y - 10,\r\n left: ripple.x - 10,\r\n }}\r\n />\r\n ))}\r\n </motion.button>\r\n );\r\n },\r\n);\r\n\r\nRippleButton.displayName = \"RippleButton\";\r\n\r\nexport { RippleButton, type RippleButtonProps };\r\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","RippleButton","React","children","onClick","className","rippleClassName","scale","transition","props","ref","ripples","setRipples","buttonRef","createRipple","event","button","rect","x","y","newRipple","Date","prev","setTimeout","r","handleClick","motion","cn","ripple"],"mappings":";;;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAF,oBAAoB,CAAC,GAAG,CAACI,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFL,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,sBAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;Q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IACAtB;QAED,GAAGI,KAAK;;YAERN;YACAQ,QAAQ,GAAG,CAAC,CAACiB,SACZ,WADYA,GACZ,qCAACF,sBAAAA,MAAAA,CAAAA,IAAW;oBAEV,SAAS;wBAAE,OAAO;wBAAG,SAAS;oBAAI;oBAClC,SAAS;wBAAEnB;wBAAO,SAAS;oBAAE;oBAC7B,YAAYC;oBACZ,WAAWmB,IAAAA,0BAAAA,EAAAA,EACT,0EACArB;oBAEF,OAAO;wBACL,KAAKsB,OAAO,CAAC,GAAG;wBAChB,MAAMA,OAAO,CAAC,GAAG;oBACnB;mBAXKA,OAAO,EAAE;;;AAgBxB;AAGF3B,aAAa,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"components\\ui\\scratcher.cjs","sources":["webpack://@arolariu/components/webpack/runtime/define_property_getters","webpack://@arolariu/components/webpack/runtime/has_own_property","webpack://@arolariu/components/webpack/runtime/make_namespace_object","webpack://@arolariu/components/./src/components/ui/scratcher.tsx"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\n\nimport { cn } from \"@/lib/utils\";\nimport { motion, useAnimation } from \"motion/react\";\nimport React, { useEffect, useRef, useState } from \"react\";\n\ninterface ScratcherProps {\n children: React.ReactNode;\n width: number;\n height: number;\n minScratchPercentage?: number;\n className?: string;\n onComplete?: () => void;\n gradientColors?: [string, string, string];\n}\n\nexport const Scratcher: React.FC<ScratcherProps> = ({\n width,\n height,\n minScratchPercentage = 50,\n onComplete,\n children,\n className,\n gradientColors = [\"#A97CF8\", \"#F38CB8\", \"#FDCC92\"],\n}) => {\n const canvasRef = useRef<HTMLCanvasElement>(null);\n const [isScratching, setIsScratching] = useState(false);\n const [isComplete, setIsComplete] = useState(false);\n\n const controls = useAnimation();\n\n useEffect(() => {\n const canvas = canvasRef.current;\n const ctx = canvas?.getContext(\"2d\");\n if (canvas && ctx) {\n ctx.fillStyle = \"#ccc\";\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n const gradient = ctx.createLinearGradient(\n 0,\n 0,\n canvas.width,\n canvas.height,\n );\n gradient.addColorStop(0, gradientColors[0]);\n gradient.addColorStop(0.5, gradientColors[1]);\n gradient.addColorStop(1, gradientColors[2]);\n ctx.fillStyle = gradient;\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n }\n }, [gradientColors]);\n\n useEffect(() => {\n const handleDocumentMouseMove = (event: MouseEvent) => {\n if (!isScratching) return;\n scratch(event.clientX, event.clientY);\n };\n\n const handleDocumentTouchMove = (event: TouchEvent) => {\n if (!isScratching) return;\n const touch = event.touches[0];\n scratch(touch.clientX, touch.clientY);\n };\n\n const handleDocumentMouseUp = () => {\n setIsScratching(false);\n checkCompletion();\n };\n\n const handleDocumentTouchEnd = () => {\n setIsScratching(false);\n checkCompletion();\n };\n\n document.addEventListener(\"mousedown\", handleDocumentMouseMove);\n document.addEventListener(\"mousemove\", handleDocumentMouseMove);\n document.addEventListener(\"touchstart\", handleDocumentTouchMove);\n document.addEventListener(\"touchmove\", handleDocumentTouchMove);\n document.addEventListener(\"mouseup\", handleDocumentMouseUp);\n document.addEventListener(\"touchend\", handleDocumentTouchEnd);\n document.addEventListener(\"touchcancel\", handleDocumentTouchEnd);\n\n return () => {\n document.removeEventListener(\"mousedown\", handleDocumentMouseMove);\n document.removeEventListener(\"mousemove\", handleDocumentMouseMove);\n document.removeEventListener(\"touchstart\", handleDocumentTouchMove);\n document.removeEventListener(\"touchmove\", handleDocumentTouchMove);\n document.removeEventListener(\"mouseup\", handleDocumentMouseUp);\n document.removeEventListener(\"touchend\", handleDocumentTouchEnd);\n document.removeEventListener(\"touchcancel\", handleDocumentTouchEnd);\n };\n }, [isScratching]);\n\n const handleMouseDown = () => setIsScratching(true);\n\n const handleTouchStart = () => setIsScratching(true);\n\n const scratch = (clientX: number, clientY: number) => {\n const canvas = canvasRef.current;\n const ctx = canvas?.getContext(\"2d\");\n if (canvas && ctx) {\n const rect = canvas.getBoundingClientRect();\n const x = clientX - rect.left + 16;\n const y = clientY - rect.top + 16;\n ctx.globalCompositeOperation = \"destination-out\";\n ctx.beginPath();\n ctx.arc(x, y, 30, 0, Math.PI * 2);\n ctx.fill();\n }\n };\n\n const startAnimation = async () => {\n await controls.start({\n scale: [1, 1.5, 1],\n rotate: [0, 10, -10, 10, -10, 0],\n transition: { duration: 0.5 },\n });\n\n // Call onComplete after animation finishes\n if (onComplete) {\n onComplete();\n }\n };\n\n const checkCompletion = () => {\n if (isComplete) return;\n\n const canvas = canvasRef.current;\n const ctx = canvas?.getContext(\"2d\");\n if (canvas && ctx) {\n const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n const pixels = imageData.data;\n const totalPixels = pixels.length / 4;\n let clearPixels = 0;\n\n for (let i = 3; i < pixels.length; i += 4) {\n if (pixels[i] === 0) clearPixels++;\n }\n\n const percentage = (clearPixels / totalPixels) * 100;\n\n if (percentage >= minScratchPercentage) {\n setIsComplete(true);\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n startAnimation();\n }\n }\n };\n\n return (\n <motion.div\n className={cn(\"relative select-none\", className)}\n style={{\n width,\n height,\n cursor:\n \"url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIj4KICA8Y2lyY2xlIGN4PSIxNiIgY3k9IjE2IiByPSIxNSIgc3R5bGU9ImZpbGw6I2ZmZjtzdHJva2U6IzAwMDtzdHJva2Utd2lkdGg6MXB4OyIgLz4KPC9zdmc+'), auto\",\n }}\n animate={controls}\n >\n <canvas\n ref={canvasRef}\n width={width}\n height={height}\n className=\"absolute left-0 top-0\"\n onMouseDown={handleMouseDown}\n onTouchStart={handleTouchStart}\n ></canvas>\n {children}\n </motion.div>\n );\n};\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","Scratcher","width","height","minScratchPercentage","onComplete","children","className","gradientColors","canvasRef","useRef","isScratching","setIsScratching","useState","isComplete","setIsComplete","controls","useAnimation","useEffect","canvas","ctx","gradient","handleDocumentMouseMove","event","scratch","handleDocumentTouchMove","touch","handleDocumentMouseUp","checkCompletion","handleDocumentTouchEnd","document","handleMouseDown","handleTouchStart","clientX","clientY","rect","x","y","Math","startAnimation","imageData","pixels","totalPixels","clearPixels","i","percentage","motion","cn"],"mappings":";;;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAF,oBAAoB,CAAC,GAAG,CAACI,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFL,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,sBAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;;;;;ACUO,MAAMI,YAAsC,CAAC,EAClDC,KAAK,EACLC,MAAM,EACNC,uBAAuB,EAAE,EACzBC,UAAU,EACVC,QAAQ,EACRC,SAAS,EACTC,iB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,UAAU;YAAI;QAC9B;QAGA,IAAIX,YACFA;IAEJ;IAEA,MAAMuB,kBAAkB;QACtB,IAAId,YAAY;QAEhB,MAAMK,SAASV,UAAU,OAAO;QAChC,MAAMW,MAAMD,QAAQ,WAAW;QAC/B,IAAIA,UAAUC,KAAK;YACjB,MAAMoB,YAAYpB,IAAI,YAAY,CAAC,GAAG,GAAGD,OAAO,KAAK,EAAEA,OAAO,MAAM;YACpE,MAAMsB,SAASD,UAAU,IAAI;YAC7B,MAAME,cAAcD,OAAO,MAAM,GAAG;YACpC,IAAIE,cAAc;YAElB,IAAK,IAAIC,IAAI,GAAGA,IAAIH,OAAO,MAAM,EAAEG,KAAK,EACtC,IAAIH,MAAAA,MAAM,CAACG,EAAE,EAAQD;YAGvB,MAAME,aAAcF,cAAcD,cAAe;YAEjD,IAAIG,cAAczC,sBAAsB;gBACtCW,cAAc;gBACdK,IAAI,SAAS,CAAC,GAAG,GAAGD,OAAO,KAAK,EAAEA,OAAO,MAAM;gBAC/CoB;YACF;QACF;IACF;IAEA,OACE,WADF,GACE,sCAACO,sBAAAA,MAAAA,CAAAA,GAAU;QACT,WAAWC,IAAAA,0BAAAA,EAAAA,EAAG,wBAAwBxC;QACtC,OAAO;YACLL;YACAC;YACA,QACE;QACJ;QACA,SAASa;;0BAET,qCAAC;gBACC,KAAKP;gBACL,OAAOP;gBACP,QAAQC;gBACR,WAAU;gBACV,aAAa4B;gBACb,cAAcC;;YAEf1B;;;AAGP"}
1
+ {"version":3,"file":"components\\ui\\scratcher.cjs","sources":["webpack://@arolariu/components/webpack/runtime/define_property_getters","webpack://@arolariu/components/webpack/runtime/has_own_property","webpack://@arolariu/components/webpack/runtime/make_namespace_object","webpack://@arolariu/components/./src/components/ui/scratcher.tsx"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\r\n\r\nimport { cn } from \"@/lib/utils\";\r\nimport { motion, useAnimation } from \"motion/react\";\r\nimport React, { useEffect, useRef, useState } from \"react\";\r\n\r\ninterface ScratcherProps {\r\n children: React.ReactNode;\r\n width: number;\r\n height: number;\r\n minScratchPercentage?: number;\r\n className?: string;\r\n onComplete?: () => void;\r\n gradientColors?: [string, string, string];\r\n}\r\n\r\nexport const Scratcher: React.FC<ScratcherProps> = ({\r\n width,\r\n height,\r\n minScratchPercentage = 50,\r\n onComplete,\r\n children,\r\n className,\r\n gradientColors = [\"#A97CF8\", \"#F38CB8\", \"#FDCC92\"],\r\n}) => {\r\n const canvasRef = useRef<HTMLCanvasElement>(null);\r\n const [isScratching, setIsScratching] = useState(false);\r\n const [isComplete, setIsComplete] = useState(false);\r\n\r\n const controls = useAnimation();\r\n\r\n useEffect(() => {\r\n const canvas = canvasRef.current;\r\n const ctx = canvas?.getContext(\"2d\");\r\n if (canvas && ctx) {\r\n ctx.fillStyle = \"#ccc\";\r\n ctx.fillRect(0, 0, canvas.width, canvas.height);\r\n const gradient = ctx.createLinearGradient(\r\n 0,\r\n 0,\r\n canvas.width,\r\n canvas.height,\r\n );\r\n gradient.addColorStop(0, gradientColors[0]);\r\n gradient.addColorStop(0.5, gradientColors[1]);\r\n gradient.addColorStop(1, gradientColors[2]);\r\n ctx.fillStyle = gradient;\r\n ctx.fillRect(0, 0, canvas.width, canvas.height);\r\n }\r\n }, [gradientColors]);\r\n\r\n useEffect(() => {\r\n const handleDocumentMouseMove = (event: MouseEvent) => {\r\n if (!isScratching) return;\r\n scratch(event.clientX, event.clientY);\r\n };\r\n\r\n const handleDocumentTouchMove = (event: TouchEvent) => {\r\n if (!isScratching) return;\r\n const touch = event.touches[0];\r\n scratch(touch.clientX, touch.clientY);\r\n };\r\n\r\n const handleDocumentMouseUp = () => {\r\n setIsScratching(false);\r\n checkCompletion();\r\n };\r\n\r\n const handleDocumentTouchEnd = () => {\r\n setIsScratching(false);\r\n checkCompletion();\r\n };\r\n\r\n document.addEventListener(\"mousedown\", handleDocumentMouseMove);\r\n document.addEventListener(\"mousemove\", handleDocumentMouseMove);\r\n document.addEventListener(\"touchstart\", handleDocumentTouchMove);\r\n document.addEventListener(\"touchmove\", handleDocumentTouchMove);\r\n document.addEventListener(\"mouseup\", handleDocumentMouseUp);\r\n document.addEventListener(\"touchend\", handleDocumentTouchEnd);\r\n document.addEventListener(\"touchcancel\", handleDocumentTouchEnd);\r\n\r\n return () => {\r\n document.removeEventListener(\"mousedown\", handleDocumentMouseMove);\r\n document.removeEventListener(\"mousemove\", handleDocumentMouseMove);\r\n document.removeEventListener(\"touchstart\", handleDocumentTouchMove);\r\n document.removeEventListener(\"touchmove\", handleDocumentTouchMove);\r\n document.removeEventListener(\"mouseup\", handleDocumentMouseUp);\r\n document.removeEventListener(\"touchend\", handleDocumentTouchEnd);\r\n document.removeEventListener(\"touchcancel\", handleDocumentTouchEnd);\r\n };\r\n }, [isScratching]);\r\n\r\n const handleMouseDown = () => setIsScratching(true);\r\n\r\n const handleTouchStart = () => setIsScratching(true);\r\n\r\n const scratch = (clientX: number, clientY: number) => {\r\n const canvas = canvasRef.current;\r\n const ctx = canvas?.getContext(\"2d\");\r\n if (canvas && ctx) {\r\n const rect = canvas.getBoundingClientRect();\r\n const x = clientX - rect.left + 16;\r\n const y = clientY - rect.top + 16;\r\n ctx.globalCompositeOperation = \"destination-out\";\r\n ctx.beginPath();\r\n ctx.arc(x, y, 30, 0, Math.PI * 2);\r\n ctx.fill();\r\n }\r\n };\r\n\r\n const startAnimation = async () => {\r\n await controls.start({\r\n scale: [1, 1.5, 1],\r\n rotate: [0, 10, -10, 10, -10, 0],\r\n transition: { duration: 0.5 },\r\n });\r\n\r\n // Call onComplete after animation finishes\r\n if (onComplete) {\r\n onComplete();\r\n }\r\n };\r\n\r\n const checkCompletion = () => {\r\n if (isComplete) return;\r\n\r\n const canvas = canvasRef.current;\r\n const ctx = canvas?.getContext(\"2d\");\r\n if (canvas && ctx) {\r\n const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);\r\n const pixels = imageData.data;\r\n const totalPixels = pixels.length / 4;\r\n let clearPixels = 0;\r\n\r\n for (let i = 3; i < pixels.length; i += 4) {\r\n if (pixels[i] === 0) clearPixels++;\r\n }\r\n\r\n const percentage = (clearPixels / totalPixels) * 100;\r\n\r\n if (percentage >= minScratchPercentage) {\r\n setIsComplete(true);\r\n ctx.clearRect(0, 0, canvas.width, canvas.height);\r\n startAnimation();\r\n }\r\n }\r\n };\r\n\r\n return (\r\n <motion.div\r\n className={cn(\"relative select-none\", className)}\r\n style={{\r\n width,\r\n height,\r\n cursor:\r\n \"url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIj4KICA8Y2lyY2xlIGN4PSIxNiIgY3k9IjE2IiByPSIxNSIgc3R5bGU9ImZpbGw6I2ZmZjtzdHJva2U6IzAwMDtzdHJva2Utd2lkdGg6MXB4OyIgLz4KPC9zdmc+'), auto\",\r\n }}\r\n animate={controls}\r\n >\r\n <canvas\r\n ref={canvasRef}\r\n width={width}\r\n height={height}\r\n className=\"absolute left-0 top-0\"\r\n onMouseDown={handleMouseDown}\r\n onTouchStart={handleTouchStart}\r\n ></canvas>\r\n {children}\r\n </motion.div>\r\n );\r\n};\r\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","Scratcher","width","height","minScratchPercentage","onComplete","children","className","gradientColors","canvasRef","useRef","isScratching","setIsScratching","useState","isComplete","setIsComplete","controls","useAnimation","useEffect","canvas","ctx","gradient","handleDocumentMouseMove","event","scratch","handleDocumentTouchMove","touch","handleDocumentMouseUp","checkCompletion","handleDocumentTouchEnd","document","handleMouseDown","handleTouchStart","clientX","clientY","rect","x","y","Math","startAnimation","imageData","pixels","totalPixels","clearPixels","i","percentage","motion","cn"],"mappings":";;;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAF,oBAAoB,CAAC,GAAG,CAACI,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFL,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,sBAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;;;;;ACUO,MAAMI,YAAsC,CAAC,EAClDC,KAAK,EACLC,MAAM,EACNC,uBAAuB,EAAE,EACzBC,UAAU,EACVC,QAAQ,EACRC,SAAS,EACTC,iBAAiB;IAAC;IAAW;IAAW;CAAU,EACnD;IACC,MAAMC,YAAYC,IAAAA,+BAAAA,MAAAA,EAA0B;IAC5C,MAAM,CAACC,cAAcC,gBAAgB,GAAGC,IAAAA,+BAAAA,QAAAA,EAAS;IACjD,MAAM,CAACC,YAAYC,cAAc,GAAGF,IAAAA,+BAAAA,QAAAA,EAAS;IAE7C,MAAMG,WAAWC,IAAAA,sBAAAA,YAAAA;IAEjBC,IAAAA,+BAAAA,SAAAA,EAAU;QACR,MAAMC,SAASV,UAAU,OAAO;QAChC,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C,IAAIE,cAAc;YAElB,IAAK,IAAIC,IAAI,GAAGA,IAAIH,OAAO,MAAM,EAAEG,KAAK,EACtC,IAAIH,MAAAA,MAAM,CAACG,EAAE,EAAQD;YAGvB,MAAME,aAAcF,cAAcD,cAAe;YAEjD,IAAIG,cAAczC,sBAAsB;gBACtCW,cAAc;gBACdK,IAAI,SAAS,CAAC,GAAG,GAAGD,OAAO,KAAK,EAAEA,OAAO,MAAM;gBAC/CoB;YACF;QACF;IACF;IAEA,OACE,WADF,GACE,sCAACO,sBAAAA,MAAAA,CAAAA,GAAU;QACT,WAAWC,IAAAA,0BAAAA,EAAAA,EAAG,wBAAwBxC;QACtC,OAAO;YACLL;YACAC;YACA,QACE;QACJ;QACA,SAASa;;0BAET,qCAAC;gBACC,KAAKP;gBACL,OAAOP;gBACP,QAAQC;gBACR,WAAU;gBACV,aAAa4B;gBACb,cAAcC;;YAEf1B;;;AAGP"}
@@ -25,7 +25,6 @@ var __webpack_require__ = {};
25
25
  var __webpack_exports__ = {};
26
26
  __webpack_require__.r(__webpack_exports__);
27
27
  __webpack_require__.d(__webpack_exports__, {
28
- SidebarProvider: ()=>SidebarProvider,
29
28
  SidebarMenuItem: ()=>SidebarMenuItem,
30
29
  SidebarHeader: ()=>SidebarHeader,
31
30
  SidebarMenuSkeleton: ()=>SidebarMenuSkeleton,
@@ -37,18 +36,19 @@ __webpack_require__.d(__webpack_exports__, {
37
36
  SidebarMenuBadge: ()=>SidebarMenuBadge,
38
37
  SidebarInset: ()=>SidebarInset,
39
38
  SidebarRail: ()=>SidebarRail,
39
+ Sidebar: ()=>Sidebar,
40
40
  SidebarTrigger: ()=>SidebarTrigger,
41
41
  SidebarGroupContent: ()=>SidebarGroupContent,
42
42
  SidebarGroupLabel: ()=>SidebarGroupLabel,
43
43
  useSidebar: ()=>useSidebar,
44
44
  SidebarMenuSubItem: ()=>SidebarMenuSubItem,
45
- Sidebar: ()=>Sidebar,
46
- SidebarMenuButton: ()=>SidebarMenuButton,
47
45
  SidebarFooter: ()=>SidebarFooter,
46
+ SidebarMenuButton: ()=>SidebarMenuButton,
48
47
  SidebarContent: ()=>SidebarContent,
49
48
  SidebarInput: ()=>SidebarInput,
50
49
  SidebarMenuAction: ()=>SidebarMenuAction,
51
- SidebarMenuSub: ()=>SidebarMenuSub
50
+ SidebarMenuSub: ()=>SidebarMenuSub,
51
+ SidebarProvider: ()=>SidebarProvider
52
52
  });
53
53
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
54
54
  const external_react_namespaceObject = require("react");
@@ -25,8 +25,8 @@ var __webpack_require__ = {};
25
25
  var __webpack_exports__ = {};
26
26
  __webpack_require__.r(__webpack_exports__);
27
27
  __webpack_require__.d(__webpack_exports__, {
28
- toast: ()=>external_sonner_namespaceObject.toast,
29
- Toaster: ()=>Toaster
28
+ Toaster: ()=>Toaster,
29
+ toast: ()=>external_sonner_namespaceObject.toast
30
30
  });
31
31
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
32
32
  require("react");
@@ -25,9 +25,9 @@ var __webpack_require__ = {};
25
25
  var __webpack_exports__ = {};
26
26
  __webpack_require__.r(__webpack_exports__);
27
27
  __webpack_require__.d(__webpack_exports__, {
28
+ Tooltip: ()=>Tooltip,
28
29
  TooltipContent: ()=>TooltipContent,
29
30
  TooltipProvider: ()=>TooltipProvider,
30
- Tooltip: ()=>Tooltip,
31
31
  TooltipTrigger: ()=>TooltipTrigger
32
32
  });
33
33
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
@@ -35,7 +35,6 @@ __webpack_require__.d(__webpack_exports__, {
35
35
  DropDrawerGroup: ()=>dropdrawer_cjs_namespaceObject.DropDrawerGroup,
36
36
  FlipButton: ()=>flip_button_cjs_namespaceObject.FlipButton,
37
37
  CardTitle: ()=>card_cjs_namespaceObject.CardTitle,
38
- Toaster: ()=>sonner_cjs_namespaceObject.Toaster,
39
38
  NavigationMenuTrigger: ()=>navigation_menu_cjs_namespaceObject.NavigationMenuTrigger,
40
39
  toast: ()=>sonner_cjs_namespaceObject.toast,
41
40
  DropDrawerFooter: ()=>dropdrawer_cjs_namespaceObject.DropDrawerFooter,
@@ -77,6 +76,7 @@ __webpack_require__.d(__webpack_exports__, {
77
76
  SidebarMenuAction: ()=>sidebar_cjs_namespaceObject.SidebarMenuAction,
78
77
  RippleButton: ()=>ripple_button_cjs_namespaceObject.RippleButton,
79
78
  SheetFooter: ()=>sheet_cjs_namespaceObject.SheetFooter,
79
+ Command: ()=>command_cjs_namespaceObject.Command,
80
80
  DropDrawerSub: ()=>dropdrawer_cjs_namespaceObject.DropDrawerSub,
81
81
  ContextMenuSubContent: ()=>context_menu_cjs_namespaceObject.ContextMenuSubContent,
82
82
  Accordion: ()=>accordion_cjs_namespaceObject.Accordion,
@@ -96,20 +96,22 @@ __webpack_require__.d(__webpack_exports__, {
96
96
  Input: ()=>input_cjs_namespaceObject.Input,
97
97
  TabsList: ()=>tabs_cjs_namespaceObject.TabsList,
98
98
  AlertDialogHeader: ()=>alert_dialog_cjs_namespaceObject.AlertDialogHeader,
99
+ Toaster: ()=>sonner_cjs_namespaceObject.Toaster,
99
100
  AlertDialogDescription: ()=>alert_dialog_cjs_namespaceObject.AlertDialogDescription,
100
101
  CollapsibleTrigger: ()=>collapsible_cjs_namespaceObject.CollapsibleTrigger,
101
102
  AvatarImage: ()=>avatar_cjs_namespaceObject.AvatarImage,
102
103
  ContextMenuRadioItem: ()=>context_menu_cjs_namespaceObject.ContextMenuRadioItem,
103
104
  AlertDialogAction: ()=>alert_dialog_cjs_namespaceObject.AlertDialogAction,
104
105
  DialogPortal: ()=>dialog_cjs_namespaceObject.DialogPortal,
106
+ Popover: ()=>popover_cjs_namespaceObject.Popover,
105
107
  TableCaption: ()=>table_cjs_namespaceObject.TableCaption,
106
108
  Toggle: ()=>toggle_cjs_namespaceObject.Toggle,
107
109
  Carousel: ()=>carousel_cjs_namespaceObject.Carousel,
110
+ Sidebar: ()=>sidebar_cjs_namespaceObject.Sidebar,
108
111
  Switch: ()=>switch_cjs_namespaceObject.Switch,
109
112
  DotBackground: ()=>dot_background_cjs_namespaceObject.DotBackground,
110
113
  DialogTitle: ()=>dialog_cjs_namespaceObject.DialogTitle,
111
114
  AccordionTrigger: ()=>accordion_cjs_namespaceObject.AccordionTrigger,
112
- Sidebar: ()=>sidebar_cjs_namespaceObject.Sidebar,
113
115
  DropDrawerItem: ()=>dropdrawer_cjs_namespaceObject.DropDrawerItem,
114
116
  SelectGroup: ()=>select_cjs_namespaceObject.SelectGroup,
115
117
  SidebarHeader: ()=>sidebar_cjs_namespaceObject.SidebarHeader,
@@ -183,7 +185,6 @@ __webpack_require__.d(__webpack_exports__, {
183
185
  DrawerHeader: ()=>drawer_cjs_namespaceObject.DrawerHeader,
184
186
  Separator: ()=>separator_cjs_namespaceObject.Separator,
185
187
  DialogFooter: ()=>dialog_cjs_namespaceObject.DialogFooter,
186
- Popover: ()=>popover_cjs_namespaceObject.Popover,
187
188
  CarouselItem: ()=>carousel_cjs_namespaceObject.CarouselItem,
188
189
  GradientText: ()=>gradient_text_cjs_namespaceObject.GradientText,
189
190
  ToggleGroup: ()=>toggle_group_cjs_namespaceObject.ToggleGroup,
@@ -221,7 +222,6 @@ __webpack_require__.d(__webpack_exports__, {
221
222
  Checkbox: ()=>checkbox_cjs_namespaceObject.Checkbox,
222
223
  CardHeader: ()=>card_cjs_namespaceObject.CardHeader,
223
224
  DropdownMenuShortcut: ()=>dropdown_menu_cjs_namespaceObject.DropdownMenuShortcut,
224
- Tooltip: ()=>tooltip_cjs_namespaceObject.Tooltip,
225
225
  FormControl: ()=>form_cjs_namespaceObject.FormControl,
226
226
  useSidebar: ()=>sidebar_cjs_namespaceObject.useSidebar,
227
227
  useIsMobile: ()=>use_mobile_cjs_namespaceObject.useIsMobile,
@@ -233,9 +233,11 @@ __webpack_require__.d(__webpack_exports__, {
233
233
  SelectContent: ()=>select_cjs_namespaceObject.SelectContent,
234
234
  AlertDialogPortal: ()=>alert_dialog_cjs_namespaceObject.AlertDialogPortal,
235
235
  Textarea: ()=>textarea_cjs_namespaceObject.Textarea,
236
+ Tooltip: ()=>tooltip_cjs_namespaceObject.Tooltip,
236
237
  TooltipTrigger: ()=>tooltip_cjs_namespaceObject.TooltipTrigger,
237
238
  SheetHeader: ()=>sheet_cjs_namespaceObject.SheetHeader,
238
239
  ResizablePanelGroup: ()=>resizable_cjs_namespaceObject.ResizablePanelGroup,
240
+ Menubar: ()=>menubar_cjs_namespaceObject.Menubar,
239
241
  ScrollArea: ()=>scroll_area_cjs_namespaceObject.ScrollArea,
240
242
  ContextMenuPortal: ()=>context_menu_cjs_namespaceObject.ContextMenuPortal,
241
243
  DropDrawerSeparator: ()=>dropdrawer_cjs_namespaceObject.DropDrawerSeparator,
@@ -255,7 +257,6 @@ __webpack_require__.d(__webpack_exports__, {
255
257
  Table: ()=>table_cjs_namespaceObject.Table,
256
258
  SidebarGroupContent: ()=>sidebar_cjs_namespaceObject.SidebarGroupContent,
257
259
  TableHead: ()=>table_cjs_namespaceObject.TableHead,
258
- Command: ()=>command_cjs_namespaceObject.Command,
259
260
  SidebarMenuSubItem: ()=>sidebar_cjs_namespaceObject.SidebarMenuSubItem,
260
261
  ChartLegendContent: ()=>chart_cjs_namespaceObject.ChartLegendContent,
261
262
  NavigationMenuItem: ()=>navigation_menu_cjs_namespaceObject.NavigationMenuItem,
@@ -282,7 +283,6 @@ __webpack_require__.d(__webpack_exports__, {
282
283
  SidebarFooter: ()=>sidebar_cjs_namespaceObject.SidebarFooter,
283
284
  BubbleBackground: ()=>bubble_background_cjs_namespaceObject.BubbleBackground,
284
285
  badgeVariants: ()=>badge_cjs_namespaceObject.badgeVariants,
285
- Menubar: ()=>menubar_cjs_namespaceObject.Menubar,
286
286
  Skeleton: ()=>skeleton_cjs_namespaceObject.Skeleton,
287
287
  DrawerOverlay: ()=>drawer_cjs_namespaceObject.DrawerOverlay,
288
288
  MenubarItem: ()=>menubar_cjs_namespaceObject.MenubarItem,
@@ -7006,7 +7006,7 @@
7006
7006
  @property --tw-gradient-from-position {
7007
7007
  syntax: "<length-percentage>";
7008
7008
  inherits: false;
7009
- initial-value: 0;
7009
+ initial-value: 0%;
7010
7010
  }
7011
7011
 
7012
7012
  @property --tw-gradient-via-position {