@sikka/hawa 0.26.34 → 0.26.36-next

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 (78) hide show
  1. package/dist/alert/index.js +36 -12
  2. package/dist/alert/index.js.map +1 -1
  3. package/dist/alert/index.mjs +36 -12
  4. package/dist/alert/index.mjs.map +1 -1
  5. package/dist/appLayout/index.js +36 -12
  6. package/dist/appLayout/index.js.map +1 -1
  7. package/dist/appLayout/index.mjs +36 -12
  8. package/dist/appLayout/index.mjs.map +1 -1
  9. package/dist/backToTop/index.js +36 -12
  10. package/dist/backToTop/index.js.map +1 -1
  11. package/dist/backToTop/index.mjs +36 -12
  12. package/dist/backToTop/index.mjs.map +1 -1
  13. package/dist/blocks/auth/index.js +36 -12
  14. package/dist/blocks/auth/index.mjs +4 -4
  15. package/dist/blocks/feedback/index.js +36 -12
  16. package/dist/blocks/feedback/index.mjs +5 -5
  17. package/dist/blocks/index.js +36 -12
  18. package/dist/blocks/index.mjs +2 -2
  19. package/dist/blocks/misc/index.js +36 -12
  20. package/dist/blocks/misc/index.mjs +4 -4
  21. package/dist/blocks/pricing/index.js +36 -12
  22. package/dist/blocks/pricing/index.mjs +4 -4
  23. package/dist/button/index.js +36 -12
  24. package/dist/button/index.js.map +1 -1
  25. package/dist/button/index.mjs +36 -12
  26. package/dist/button/index.mjs.map +1 -1
  27. package/dist/{chunk-OY66MBXP.mjs → chunk-3XQAC7AK.mjs} +1 -1
  28. package/dist/{chunk-NMS5LCSQ.mjs → chunk-7HKPCELH.mjs} +1 -1
  29. package/dist/{chunk-5YXZXYLH.mjs → chunk-B3LVGXYC.mjs} +1 -1
  30. package/dist/{chunk-GVJYACGA.mjs → chunk-CDLNP6A4.mjs} +1 -1
  31. package/dist/{chunk-4EGKGSGY.mjs → chunk-COVI2KU2.mjs} +1 -1
  32. package/dist/{chunk-D36MPDGE.mjs → chunk-FVN4XR4B.mjs} +36 -12
  33. package/dist/{chunk-R4HAAT6R.mjs → chunk-W3D5MI6L.mjs} +1 -1
  34. package/dist/{chunk-F3DQJHTG.mjs → chunk-WM7JTAPS.mjs} +1 -1
  35. package/dist/{chunk-MQUAGP7K.mjs → chunk-WRPZUBMJ.mjs} +36 -12
  36. package/dist/{chunk-FQ6WVEHW.mjs → chunk-YQNGPETF.mjs} +1 -1
  37. package/dist/codeBlock/index.js +37 -13
  38. package/dist/codeBlock/index.js.map +1 -1
  39. package/dist/codeBlock/index.mjs +37 -13
  40. package/dist/codeBlock/index.mjs.map +1 -1
  41. package/dist/dataTable/index.js +36 -12
  42. package/dist/dataTable/index.js.map +1 -1
  43. package/dist/dataTable/index.mjs +36 -12
  44. package/dist/dataTable/index.mjs.map +1 -1
  45. package/dist/docsLayout/index.js +36 -12
  46. package/dist/docsLayout/index.js.map +1 -1
  47. package/dist/docsLayout/index.mjs +36 -12
  48. package/dist/docsLayout/index.mjs.map +1 -1
  49. package/dist/elements/index.d.mts +6 -2
  50. package/dist/elements/index.d.ts +6 -2
  51. package/dist/elements/index.js +37 -13
  52. package/dist/elements/index.mjs +4 -4
  53. package/dist/fileDropzone/index.js +36 -12
  54. package/dist/fileDropzone/index.js.map +1 -1
  55. package/dist/fileDropzone/index.mjs +36 -12
  56. package/dist/fileDropzone/index.mjs.map +1 -1
  57. package/dist/index.css +2 -19
  58. package/dist/index.d.mts +6 -2
  59. package/dist/index.d.ts +6 -2
  60. package/dist/index.js +37 -13
  61. package/dist/index.mjs +37 -13
  62. package/dist/layout/index.js +36 -12
  63. package/dist/layout/index.mjs +2 -2
  64. package/dist/loading/index.d.mts +6 -2
  65. package/dist/loading/index.d.ts +6 -2
  66. package/dist/loading/index.js +36 -12
  67. package/dist/loading/index.js.map +1 -1
  68. package/dist/loading/index.mjs +36 -12
  69. package/dist/loading/index.mjs.map +1 -1
  70. package/dist/sortButton/index.js +36 -12
  71. package/dist/sortButton/index.js.map +1 -1
  72. package/dist/sortButton/index.mjs +36 -12
  73. package/dist/sortButton/index.mjs.map +1 -1
  74. package/dist/splitButton/index.js +36 -12
  75. package/dist/splitButton/index.js.map +1 -1
  76. package/dist/splitButton/index.mjs +36 -12
  77. package/dist/splitButton/index.mjs.map +1 -1
  78. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../elements/button/Button.tsx","../../util/index.ts","../../elements/loading/Loading.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@util/index\";\nimport { Loading } from \"../loading/Loading\";\n\nconst buttonVariants = cva(\n \"hawa-inline-flex hawa-items-center hawa-select-none hawa-rounded-md hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-colors focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"hawa-bg-primary hawa-text-primary-foreground hover:hawa-bg-primary/90\",\n light: \"hawa-bg-primary/20 hawa-text-primary hover:hawa-bg-primary/40\",\n destructive:\n \"hawa-bg-destructive hawa-text-destructive-foreground hover:hawa-bg-destructive/90\",\n outline:\n \"hawa-border hawa-border-input hawa-bg-transparent hover:hawa-bg-accent hover:hawa-text-accent-foreground\",\n secondary:\n \"hawa-bg-secondary hawa-text-secondary-foreground hover:hawa-bg-secondary/80\",\n ghost: \"hover:hawa-bg-accent hover:hawa-text-accent-foreground\",\n link: \"hawa-text-primary hawa-underline-offset-4 hover:hawa-underline\",\n combobox: \"hawa-bg-background hawa-border\",\n neoBrutalism: \"neo-brutalism\"\n // \"hawa-cursor-pointer hawa-transition-all hawa-uppercase hawa-font-mono dark:hawa-bg-black hawa-font-bold hawa-py-2 hawa-px-4 hawa-rounded hawa-border-2 hawa-border-primary hawa-shadow-color-primary hawa-transition-[hawa-transform_50ms, hawa-box-shadow_50ms] active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active shadow-color-primary active:shadow-color-primary-active\",\n },\n size: {\n default: \"hawa-h-10 hawa-px-4 hawa-py-2\",\n heightless: \"hawa-px-4 hawa-py-4\",\n xs: \"hawa-h-fit hawa-min-h-[25px] hawa-py-1 hawa-text-[10px] hawa-px-2 \",\n sm: \"hawa-h-9 hawa-text-[11px] hawa-rounded-md hawa-px-3\",\n lg: \"hawa-h-11 hawa-rounded-md hawa-px-8\",\n xl: \"hawa-h-14 hawa-rounded-md hawa-px-10\",\n icon: \"hawa-h-10 hawa-w-10\",\n smallIcon: \"hawa-h-7 hawa-w-7\"\n }\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\"\n }\n }\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n centered?: boolean;\n isLoading?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n asChild = false,\n centered = true,\n isLoading,\n children,\n ...props\n },\n ref\n ) => {\n const Comp = \"button\";\n\n // Determine the color for the HawaLoading component based on the variant\n const loadingColor =\n variant === \"outline\" || variant === \"ghost\" || variant === \"neoBrutalism\"\n ? \"hawa-bg-primary\"\n : \"hawa-bg-primary-foreground\";\n\n return (\n <Comp\n className={cn(\n buttonVariants({ variant, size, className }),\n centered && \"hawa-justify-center\",\n // \"hawa-bg-red-500\"\n )}\n ref={ref}\n {...props}\n >\n {isLoading ? (\n <Loading\n design={\n size === \"icon\" || size === \"smallIcon\" ? \"spinner\" : \"dots-pulse\"\n }\n themeMode={variant === \"outline\" ? \"light\" : \"dark\"}\n color={loadingColor}\n size={size === \"sm\" || size === \"xs\" ? \"xs\" : \"button\"}\n />\n ) : (\n children\n )}\n </Comp>\n );\n }\n);\n\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(\n sanitizedHex\n );\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16)\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\")\n }\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n","import React, { FC } from \"react\";\n\nimport { cn } from \"@util/index\";\n\ntype LoadingTypes = {\n /** Specifies the size of the loading component.*/\n size?: \"button\" | \"xs\" | \"sm\" | \"normal\" | \"lg\" | \"xl\";\n /** Determines the design of the loading animation.*/\n design?:\n | \"spinner\"\n | \"dots-bounce\"\n | \"dots-pulse\"\n | \"pulse\"\n | \"spinner-dots\"\n | \"squircle\"\n | \"square\"\n | \"progress\"\n | \"orbit\";\n /** Specifies the color of the loading component. By default it will inherit the value of <span className=\"inline-code\">--primary</span> global CSS variable*/\n color?: string;\n className?: string;\n themeMode?: \"dark\" | \"light\";\n};\n\nexport const Loading: FC<LoadingTypes> = ({\n design = \"spinner\",\n size = \"sm\",\n themeMode = \"light\",\n color,\n ...props\n}) => {\n let sizeStyles = {\n button: \"hawa-h-4 hawa-w-4\",\n xs: \"hawa-h-1 hawa-w-1\",\n sm: \"hawa-h-6 hawa-w-6\",\n normal: \"hawa-h-8 hawa-w-8\",\n lg: \"hawa-h-14 hawa-w-14\",\n xl: \"hawa-h-24 hawa-w-24\"\n };\n\n let animationStyles: any = {\n pulse: \"hawa-animate-in hawa-fade-in hawa-duration-1000\",\n bounce: \"hawa-animate-bounce\"\n };\n switch (design.split(\"-\")[0]) {\n case \"dots\":\n return (\n <div\n className={cn(\"hawa-flex hawa-flex-row hawa-gap-2\", props.className)}\n >\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\"\n )}\n ></div>\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\"\n )}\n ></div>\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\"\n )}\n ></div>\n </div>\n );\n case \"square\":\n return (\n <svg\n className={cn(\"squircle-container\", sizeStyles[size])}\n viewBox=\"0 0 35 35\"\n height=\"35\"\n width=\"35\"\n >\n <rect\n className=\"squircle-track\"\n x=\"2.5\"\n y=\"2.5\"\n fill=\"none\"\n strokeWidth=\"5px\"\n width=\"32.5\"\n height=\"32.5\"\n />\n <rect\n className=\"square-car\"\n x=\"2.5\"\n y=\"2.5\"\n fill=\"none\"\n strokeWidth=\"5px\"\n width=\"32.5\"\n height=\"32.5\"\n pathLength=\"100\"\n />\n </svg>\n );\n case \"squircle\":\n return (\n <svg\n className={cn(\"squircle-container\", sizeStyles[size])}\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 37 37\"\n height=\"37\"\n width=\"37\"\n preserveAspectRatio=\"xMidYMid meet\"\n >\n <path\n className=\"squircle-track\"\n fill=\"none\"\n strokeWidth=\"5\"\n pathLength=\"100\"\n d=\"M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5\"\n ></path>\n <path\n className=\"squircle-car\"\n fill=\"none\"\n strokeWidth=\"5\"\n pathLength=\"100\"\n d=\"M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5\"\n ></path>\n </svg>\n );\n case \"progress\":\n return <div className=\"progress-loading\"></div>;\n case \"orbit\":\n return <div className=\"orbit-container\"></div>;\n\n default:\n return (\n <svg\n className={cn(\"circle-container\", sizeStyles[size])}\n viewBox=\"0 0 40 40\"\n height=\"40\"\n width=\"40\"\n >\n <circle\n className={cn(\"circle-track\", {\n \"hawa-stroke-primary-foreground\": themeMode === \"dark\",\n \"hawa-stroke-primary\": themeMode === \"light\"\n })}\n cx=\"20\"\n cy=\"20\"\n r=\"17.5\"\n pathLength=\"100\"\n strokeWidth=\"5px\"\n fill=\"none\"\n />\n <circle\n className={cn(\"circle-car\", {\n \"hawa-stroke-primary-foreground\": themeMode === \"dark\",\n \"hawa-stroke-primary\": themeMode === \"light\"\n })}\n cx=\"20\"\n cy=\"20\"\n r=\"17.5\"\n pathLength=\"100\"\n strokeWidth=\"5px\"\n fill=\"none\"\n />\n </svg>\n );\n // return (\n // <div\n // className={cn(\n // \"hawa-flex hawa-flex-row hawa-gap-x-3\",\n // props.className\n // )}\n // >\n // <div aria-label=\"Loading...\" role=\"status\">\n // <svg\n // className={cn(sizeStyles[size], \"hawa-animate-spin\")}\n // viewBox=\"3 3 18 18\"\n // >\n // <path\n // className=\"hawa-fill-primary/20\"\n // d=\"M12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5ZM3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12Z\"\n // ></path>\n // <path\n // className={color ? color : \"hawa-fill-primary\"}\n // d=\"M16.9497 7.05015C14.2161 4.31648 9.78392 4.31648 7.05025 7.05015C6.65973 7.44067 6.02656 7.44067 5.63604 7.05015C5.24551 6.65962 5.24551 6.02646 5.63604 5.63593C9.15076 2.12121 14.8492 2.12121 18.364 5.63593C18.7545 6.02646 18.7545 6.65962 18.364 7.05015C17.9734 7.44067 17.3403 7.44067 16.9497 7.05015Z\"\n // ></path>\n // </svg>\n // </div>\n // </div>\n // );\n }\n};\n"],"mappings":";AAAA,YAAYA,YAAW;AAEvB,SAAS,WAA8B;;;ACFvC,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACLA,OAAO,WAAmB;AAwBnB,IAAM,UAA4B,CAAC;AAAA,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AM,UAAU,CAAC;AAAA,UAC3C,YAAY;AAAA;AAAA,QAEd;AAAA,QACA;AAAA,QACC,GAAG;AAAA;AAAA,MAEH,YACC;AAAA,QAAC;AAAA;AAAA,UACC,QACE,SAAS,UAAU,SAAS,cAAc,YAAY;AAAA,UAExD,WAAW,YAAY,YAAY,UAAU;AAAA,UAC7C,OAAO;AAAA,UACP,MAAM,SAAS,QAAQ,SAAS,OAAO,OAAO;AAAA;AAAA,MAChD,IAEA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,OAAO,cAAc;","names":["React"]}
1
+ {"version":3,"sources":["../../elements/button/Button.tsx","../../util/index.ts","../../elements/loading/Loading.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@util/index\";\nimport { Loading } from \"../loading/Loading\";\n\nconst buttonVariants = cva(\n \"hawa-inline-flex hawa-items-center hawa-select-none hawa-rounded-md hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-colors focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"hawa-bg-primary hawa-text-primary-foreground hover:hawa-bg-primary/90\",\n light: \"hawa-bg-primary/20 hawa-text-primary hover:hawa-bg-primary/40\",\n destructive:\n \"hawa-bg-destructive hawa-text-destructive-foreground hover:hawa-bg-destructive/90\",\n outline:\n \"hawa-border hawa-border-input hawa-bg-transparent hover:hawa-bg-accent hover:hawa-text-accent-foreground\",\n secondary:\n \"hawa-bg-secondary hawa-text-secondary-foreground hover:hawa-bg-secondary/80\",\n ghost: \"hover:hawa-bg-accent hover:hawa-text-accent-foreground\",\n link: \"hawa-text-primary hawa-underline-offset-4 hover:hawa-underline\",\n combobox: \"hawa-bg-background hawa-border\",\n neoBrutalism: \"neo-brutalism\"\n // \"hawa-cursor-pointer hawa-transition-all hawa-uppercase hawa-font-mono dark:hawa-bg-black hawa-font-bold hawa-py-2 hawa-px-4 hawa-rounded hawa-border-2 hawa-border-primary hawa-shadow-color-primary hawa-transition-[hawa-transform_50ms, hawa-box-shadow_50ms] active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active shadow-color-primary active:shadow-color-primary-active\",\n },\n size: {\n default: \"hawa-h-10 hawa-px-4 hawa-py-2\",\n heightless: \"hawa-px-4 hawa-py-4\",\n xs: \"hawa-h-fit hawa-min-h-[25px] hawa-py-1 hawa-text-[10px] hawa-px-2 \",\n sm: \"hawa-h-9 hawa-text-[11px] hawa-rounded-md hawa-px-3\",\n lg: \"hawa-h-11 hawa-rounded-md hawa-px-8\",\n xl: \"hawa-h-14 hawa-rounded-md hawa-px-10\",\n icon: \"hawa-h-10 hawa-w-10\",\n smallIcon: \"hawa-h-7 hawa-w-7\"\n }\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\"\n }\n }\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n centered?: boolean;\n isLoading?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n asChild = false,\n centered = true,\n isLoading,\n children,\n ...props\n },\n ref\n ) => {\n const Comp = \"button\";\n\n // Determine the color for the HawaLoading component based on the variant\n const loadingColor =\n variant === \"outline\" || variant === \"ghost\" || variant === \"neoBrutalism\"\n ? \"hawa-bg-primary\"\n : \"hawa-bg-primary-foreground\";\n\n return (\n <Comp\n className={cn(\n buttonVariants({ variant, size, className }),\n centered && \"hawa-justify-center\",\n // \"hawa-bg-red-500\"\n )}\n ref={ref}\n {...props}\n >\n {isLoading ? (\n <Loading\n design={\n size === \"icon\" || size === \"smallIcon\" ? \"spinner\" : \"dots-pulse\"\n }\n themeMode={variant === \"outline\" ? \"light\" : \"dark\"}\n color={loadingColor}\n size={size === \"sm\" || size === \"xs\" ? \"xs\" : \"button\"}\n />\n ) : (\n children\n )}\n </Comp>\n );\n }\n);\n\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(\n sanitizedHex\n );\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16)\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\")\n }\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n","import React, { FC } from \"react\";\n\nimport { cn } from \"@util/index\";\n\ntype LoadingTypes = {\n /** Specifies the size of the loading component.*/\n size?: \"button\" | \"xs\" | \"sm\" | \"normal\" | \"lg\" | \"xl\";\n /** Determines the design of the loading animation.*/\n design?:\n | \"spinner\"\n | \"dots-bounce\"\n | \"dots-pulse\"\n | \"pulse\"\n | \"spinner-dots\"\n | \"squircle\"\n | \"square\"\n | \"progress\"\n | \"orbit\";\n /** Specifies the color of the loading component. By default it will inherit the value of --primary global CSS variable*/\n color?: string;\n classNames?: {\n container: string;\n track: string;\n car: string;\n };\n\n themeMode?: \"dark\" | \"light\";\n};\n\nexport const Loading: FC<LoadingTypes> = ({\n design = \"spinner\",\n size = \"sm\",\n themeMode = \"light\",\n classNames,\n color,\n ...props\n}) => {\n let sizeStyles = {\n button: \"hawa-h-4 hawa-w-4\",\n xs: \"hawa-h-1 hawa-w-1\",\n sm: \"hawa-h-6 hawa-w-6\",\n normal: \"hawa-h-8 hawa-w-8\",\n lg: \"hawa-h-14 hawa-w-14\",\n xl: \"hawa-h-24 hawa-w-24\"\n };\n\n let animationStyles: any = {\n pulse: \"hawa-animate-in hawa-fade-in hawa-duration-1000\",\n bounce: \"hawa-animate-bounce\"\n };\n switch (design.split(\"-\")[0]) {\n case \"dots\":\n return (\n <div\n className={cn(\n \"hawa-flex hawa-flex-row hawa-gap-2\",\n classNames?.container\n )}\n >\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\"\n )}\n ></div>\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\"\n )}\n ></div>\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\"\n )}\n ></div>\n </div>\n );\n case \"square\":\n return (\n <svg\n className={cn(\n \"squircle-container\",\n sizeStyles[size],\n classNames?.container\n )}\n viewBox=\"0 0 35 35\"\n height=\"35\"\n width=\"35\"\n >\n <rect\n className=\"squircle-track\"\n x=\"2.5\"\n y=\"2.5\"\n fill=\"none\"\n strokeWidth=\"5px\"\n width=\"32.5\"\n height=\"32.5\"\n />\n <rect\n className=\"square-car\"\n x=\"2.5\"\n y=\"2.5\"\n fill=\"none\"\n strokeWidth=\"5px\"\n width=\"32.5\"\n height=\"32.5\"\n pathLength=\"100\"\n />\n </svg>\n );\n case \"squircle\":\n return (\n <svg\n className={cn(\n \"squircle-container\",\n sizeStyles[size],\n classNames?.container\n )}\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 37 37\"\n height=\"37\"\n width=\"37\"\n preserveAspectRatio=\"xMidYMid meet\"\n >\n <path\n className=\"squircle-track\"\n fill=\"none\"\n strokeWidth=\"5\"\n pathLength=\"100\"\n d=\"M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5\"\n ></path>\n <path\n className=\"squircle-car\"\n fill=\"none\"\n strokeWidth=\"5\"\n pathLength=\"100\"\n d=\"M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5\"\n ></path>\n </svg>\n );\n case \"progress\":\n return <div className=\"progress-loading\"></div>;\n case \"orbit\":\n return <div className=\"orbit-container\"></div>;\n\n default:\n return (\n <svg\n className={cn(\n \"circle-container\",\n sizeStyles[size],\n classNames?.container\n )}\n viewBox=\"0 0 40 40\"\n height=\"40\"\n width=\"40\"\n >\n <circle\n className={cn(\n \"circle-track\",\n {\n \"hawa-stroke-primary-foreground\": themeMode === \"dark\",\n \"hawa-stroke-primary\": themeMode === \"light\"\n },\n classNames?.track\n )}\n cx=\"20\"\n cy=\"20\"\n r=\"17.5\"\n pathLength=\"100\"\n strokeWidth=\"5px\"\n fill=\"none\"\n />\n <circle\n className={cn(\n \"circle-car\",\n {\n \"hawa-stroke-primary-foreground\": themeMode === \"dark\",\n \"hawa-stroke-primary\": themeMode === \"light\"\n },\n classNames?.car\n )}\n cx=\"20\"\n cy=\"20\"\n r=\"17.5\"\n pathLength=\"100\"\n strokeWidth=\"5px\"\n fill=\"none\"\n />\n </svg>\n );\n // return (\n // <div\n // className={cn(\n // \"hawa-flex hawa-flex-row hawa-gap-x-3\",\n // props.className\n // )}\n // >\n // <div aria-label=\"Loading...\" role=\"status\">\n // <svg\n // className={cn(sizeStyles[size], \"hawa-animate-spin\")}\n // viewBox=\"3 3 18 18\"\n // >\n // <path\n // className=\"hawa-fill-primary/20\"\n // d=\"M12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5ZM3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12Z\"\n // ></path>\n // <path\n // className={color ? color : \"hawa-fill-primary\"}\n // d=\"M16.9497 7.05015C14.2161 4.31648 9.78392 4.31648 7.05025 7.05015C6.65973 7.44067 6.02656 7.44067 5.63604 7.05015C5.24551 6.65962 5.24551 6.02646 5.63604 5.63593C9.15076 2.12121 14.8492 2.12121 18.364 5.63593C18.7545 6.02646 18.7545 6.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I;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,WAAW;AAAA,MACb;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;AAUA,IAAM,SAAe;AAAA,EACnB,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,OAAO;AAGb,UAAM,eACJ,YAAY,aAAa,YAAY,WAAW,YAAY,iBACxD,oBACA;AAEN,WACE;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,UACT,eAAe,EAAE,SAAS,MAAM,UAAU,CAAC;AAAA,UAC3C,YAAY;AAAA;AAAA,QAEd;AAAA,QACA;AAAA,QACC,GAAG;AAAA;AAAA,MAEH,YACC;AAAA,QAAC;AAAA;AAAA,UACC,QACE,SAAS,UAAU,SAAS,cAAc,YAAY;AAAA,UAExD,WAAW,YAAY,YAAY,UAAU;AAAA,UAC7C,OAAO;AAAA,UACP,MAAM,SAAS,QAAQ,SAAS,OAAO,OAAO;AAAA;AAAA,MAChD,IAEA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,OAAO,cAAc;","names":["React"]}
@@ -2,7 +2,7 @@ import {
2
2
  Label,
3
3
  Skeleton,
4
4
  cn
5
- } from "./chunk-D36MPDGE.mjs";
5
+ } from "./chunk-FVN4XR4B.mjs";
6
6
 
7
7
  // elements/select/Select.tsx
8
8
  import React from "react";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Label,
3
3
  cn
4
- } from "./chunk-D36MPDGE.mjs";
4
+ } from "./chunk-FVN4XR4B.mjs";
5
5
 
6
6
  // elements/radio/Radio.tsx
7
7
  import React, { useState, useRef, useEffect } from "react";
@@ -2,7 +2,7 @@ import {
2
2
  Label,
3
3
  Skeleton,
4
4
  cn
5
- } from "./chunk-D36MPDGE.mjs";
5
+ } from "./chunk-FVN4XR4B.mjs";
6
6
 
7
7
  // elements/textarea/Textarea.tsx
8
8
  import * as React from "react";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  cn
3
- } from "./chunk-D36MPDGE.mjs";
3
+ } from "./chunk-FVN4XR4B.mjs";
4
4
 
5
5
  // icons/Emojis.tsx
6
6
  import React from "react";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  cn
3
- } from "./chunk-D36MPDGE.mjs";
3
+ } from "./chunk-FVN4XR4B.mjs";
4
4
 
5
5
  // elements/scrollArea/ScrollArea.tsx
6
6
  import * as React from "react";
@@ -15,6 +15,7 @@ var Loading = ({
15
15
  design = "spinner",
16
16
  size = "sm",
17
17
  themeMode = "light",
18
+ classNames,
18
19
  color,
19
20
  ...props
20
21
  }) => {
@@ -35,7 +36,10 @@ var Loading = ({
35
36
  return /* @__PURE__ */ React.createElement(
36
37
  "div",
37
38
  {
38
- className: cn("hawa-flex hawa-flex-row hawa-gap-2", props.className)
39
+ className: cn(
40
+ "hawa-flex hawa-flex-row hawa-gap-2",
41
+ classNames == null ? void 0 : classNames.container
42
+ )
39
43
  },
40
44
  /* @__PURE__ */ React.createElement(
41
45
  "div",
@@ -75,7 +79,11 @@ var Loading = ({
75
79
  return /* @__PURE__ */ React.createElement(
76
80
  "svg",
77
81
  {
78
- className: cn("squircle-container", sizeStyles[size]),
82
+ className: cn(
83
+ "squircle-container",
84
+ sizeStyles[size],
85
+ classNames == null ? void 0 : classNames.container
86
+ ),
79
87
  viewBox: "0 0 35 35",
80
88
  height: "35",
81
89
  width: "35"
@@ -110,7 +118,11 @@ var Loading = ({
110
118
  return /* @__PURE__ */ React.createElement(
111
119
  "svg",
112
120
  {
113
- className: cn("squircle-container", sizeStyles[size]),
121
+ className: cn(
122
+ "squircle-container",
123
+ sizeStyles[size],
124
+ classNames == null ? void 0 : classNames.container
125
+ ),
114
126
  x: "0px",
115
127
  y: "0px",
116
128
  viewBox: "0 0 37 37",
@@ -147,7 +159,11 @@ var Loading = ({
147
159
  return /* @__PURE__ */ React.createElement(
148
160
  "svg",
149
161
  {
150
- className: cn("circle-container", sizeStyles[size]),
162
+ className: cn(
163
+ "circle-container",
164
+ sizeStyles[size],
165
+ classNames == null ? void 0 : classNames.container
166
+ ),
151
167
  viewBox: "0 0 40 40",
152
168
  height: "40",
153
169
  width: "40"
@@ -155,10 +171,14 @@ var Loading = ({
155
171
  /* @__PURE__ */ React.createElement(
156
172
  "circle",
157
173
  {
158
- className: cn("circle-track", {
159
- "hawa-stroke-primary-foreground": themeMode === "dark",
160
- "hawa-stroke-primary": themeMode === "light"
161
- }),
174
+ className: cn(
175
+ "circle-track",
176
+ {
177
+ "hawa-stroke-primary-foreground": themeMode === "dark",
178
+ "hawa-stroke-primary": themeMode === "light"
179
+ },
180
+ classNames == null ? void 0 : classNames.track
181
+ ),
162
182
  cx: "20",
163
183
  cy: "20",
164
184
  r: "17.5",
@@ -170,10 +190,14 @@ var Loading = ({
170
190
  /* @__PURE__ */ React.createElement(
171
191
  "circle",
172
192
  {
173
- className: cn("circle-car", {
174
- "hawa-stroke-primary-foreground": themeMode === "dark",
175
- "hawa-stroke-primary": themeMode === "light"
176
- }),
193
+ className: cn(
194
+ "circle-car",
195
+ {
196
+ "hawa-stroke-primary-foreground": themeMode === "dark",
197
+ "hawa-stroke-primary": themeMode === "light"
198
+ },
199
+ classNames == null ? void 0 : classNames.car
200
+ ),
177
201
  cx: "20",
178
202
  cy: "20",
179
203
  r: "17.5",
@@ -2,7 +2,7 @@ import {
2
2
  Label,
3
3
  Skeleton,
4
4
  cn
5
- } from "./chunk-D36MPDGE.mjs";
5
+ } from "./chunk-FVN4XR4B.mjs";
6
6
 
7
7
  // elements/input/Input.tsx
8
8
  import React, { forwardRef } from "react";
@@ -4,7 +4,7 @@ import {
4
4
  Skeleton,
5
5
  Tooltip,
6
6
  cn
7
- } from "./chunk-MQUAGP7K.mjs";
7
+ } from "./chunk-WRPZUBMJ.mjs";
8
8
 
9
9
  // elements/alert/Alert.tsx
10
10
  import React, { useRef, useState, useEffect } from "react";
@@ -32,6 +32,7 @@ var Loading = ({
32
32
  design = "spinner",
33
33
  size = "sm",
34
34
  themeMode = "light",
35
+ classNames,
35
36
  color,
36
37
  ...props
37
38
  }) => {
@@ -52,7 +53,10 @@ var Loading = ({
52
53
  return /* @__PURE__ */ React.createElement(
53
54
  "div",
54
55
  {
55
- className: cn("hawa-flex hawa-flex-row hawa-gap-2", props.className)
56
+ className: cn(
57
+ "hawa-flex hawa-flex-row hawa-gap-2",
58
+ classNames == null ? void 0 : classNames.container
59
+ )
56
60
  },
57
61
  /* @__PURE__ */ React.createElement(
58
62
  "div",
@@ -92,7 +96,11 @@ var Loading = ({
92
96
  return /* @__PURE__ */ React.createElement(
93
97
  "svg",
94
98
  {
95
- className: cn("squircle-container", sizeStyles[size]),
99
+ className: cn(
100
+ "squircle-container",
101
+ sizeStyles[size],
102
+ classNames == null ? void 0 : classNames.container
103
+ ),
96
104
  viewBox: "0 0 35 35",
97
105
  height: "35",
98
106
  width: "35"
@@ -127,7 +135,11 @@ var Loading = ({
127
135
  return /* @__PURE__ */ React.createElement(
128
136
  "svg",
129
137
  {
130
- className: cn("squircle-container", sizeStyles[size]),
138
+ className: cn(
139
+ "squircle-container",
140
+ sizeStyles[size],
141
+ classNames == null ? void 0 : classNames.container
142
+ ),
131
143
  x: "0px",
132
144
  y: "0px",
133
145
  viewBox: "0 0 37 37",
@@ -164,7 +176,11 @@ var Loading = ({
164
176
  return /* @__PURE__ */ React.createElement(
165
177
  "svg",
166
178
  {
167
- className: cn("circle-container", sizeStyles[size]),
179
+ className: cn(
180
+ "circle-container",
181
+ sizeStyles[size],
182
+ classNames == null ? void 0 : classNames.container
183
+ ),
168
184
  viewBox: "0 0 40 40",
169
185
  height: "40",
170
186
  width: "40"
@@ -172,10 +188,14 @@ var Loading = ({
172
188
  /* @__PURE__ */ React.createElement(
173
189
  "circle",
174
190
  {
175
- className: cn("circle-track", {
176
- "hawa-stroke-primary-foreground": themeMode === "dark",
177
- "hawa-stroke-primary": themeMode === "light"
178
- }),
191
+ className: cn(
192
+ "circle-track",
193
+ {
194
+ "hawa-stroke-primary-foreground": themeMode === "dark",
195
+ "hawa-stroke-primary": themeMode === "light"
196
+ },
197
+ classNames == null ? void 0 : classNames.track
198
+ ),
179
199
  cx: "20",
180
200
  cy: "20",
181
201
  r: "17.5",
@@ -187,10 +207,14 @@ var Loading = ({
187
207
  /* @__PURE__ */ React.createElement(
188
208
  "circle",
189
209
  {
190
- className: cn("circle-car", {
191
- "hawa-stroke-primary-foreground": themeMode === "dark",
192
- "hawa-stroke-primary": themeMode === "light"
193
- }),
210
+ className: cn(
211
+ "circle-car",
212
+ {
213
+ "hawa-stroke-primary-foreground": themeMode === "dark",
214
+ "hawa-stroke-primary": themeMode === "light"
215
+ },
216
+ classNames == null ? void 0 : classNames.car
217
+ ),
194
218
  cx: "20",
195
219
  cy: "20",
196
220
  r: "17.5",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  cn
3
- } from "./chunk-MQUAGP7K.mjs";
3
+ } from "./chunk-WRPZUBMJ.mjs";
4
4
 
5
5
  // elements/sheet/Sheet.tsx
6
6
  import * as React from "react";
@@ -83,6 +83,7 @@ var Loading = ({
83
83
  design = "spinner",
84
84
  size = "sm",
85
85
  themeMode = "light",
86
+ classNames,
86
87
  color,
87
88
  ...props
88
89
  }) => {
@@ -103,7 +104,10 @@ var Loading = ({
103
104
  return /* @__PURE__ */ import_react2.default.createElement(
104
105
  "div",
105
106
  {
106
- className: cn("hawa-flex hawa-flex-row hawa-gap-2", props.className)
107
+ className: cn(
108
+ "hawa-flex hawa-flex-row hawa-gap-2",
109
+ classNames == null ? void 0 : classNames.container
110
+ )
107
111
  },
108
112
  /* @__PURE__ */ import_react2.default.createElement(
109
113
  "div",
@@ -143,7 +147,11 @@ var Loading = ({
143
147
  return /* @__PURE__ */ import_react2.default.createElement(
144
148
  "svg",
145
149
  {
146
- className: cn("squircle-container", sizeStyles[size]),
150
+ className: cn(
151
+ "squircle-container",
152
+ sizeStyles[size],
153
+ classNames == null ? void 0 : classNames.container
154
+ ),
147
155
  viewBox: "0 0 35 35",
148
156
  height: "35",
149
157
  width: "35"
@@ -178,7 +186,11 @@ var Loading = ({
178
186
  return /* @__PURE__ */ import_react2.default.createElement(
179
187
  "svg",
180
188
  {
181
- className: cn("squircle-container", sizeStyles[size]),
189
+ className: cn(
190
+ "squircle-container",
191
+ sizeStyles[size],
192
+ classNames == null ? void 0 : classNames.container
193
+ ),
182
194
  x: "0px",
183
195
  y: "0px",
184
196
  viewBox: "0 0 37 37",
@@ -215,7 +227,11 @@ var Loading = ({
215
227
  return /* @__PURE__ */ import_react2.default.createElement(
216
228
  "svg",
217
229
  {
218
- className: cn("circle-container", sizeStyles[size]),
230
+ className: cn(
231
+ "circle-container",
232
+ sizeStyles[size],
233
+ classNames == null ? void 0 : classNames.container
234
+ ),
219
235
  viewBox: "0 0 40 40",
220
236
  height: "40",
221
237
  width: "40"
@@ -223,10 +239,14 @@ var Loading = ({
223
239
  /* @__PURE__ */ import_react2.default.createElement(
224
240
  "circle",
225
241
  {
226
- className: cn("circle-track", {
227
- "hawa-stroke-primary-foreground": themeMode === "dark",
228
- "hawa-stroke-primary": themeMode === "light"
229
- }),
242
+ className: cn(
243
+ "circle-track",
244
+ {
245
+ "hawa-stroke-primary-foreground": themeMode === "dark",
246
+ "hawa-stroke-primary": themeMode === "light"
247
+ },
248
+ classNames == null ? void 0 : classNames.track
249
+ ),
230
250
  cx: "20",
231
251
  cy: "20",
232
252
  r: "17.5",
@@ -238,10 +258,14 @@ var Loading = ({
238
258
  /* @__PURE__ */ import_react2.default.createElement(
239
259
  "circle",
240
260
  {
241
- className: cn("circle-car", {
242
- "hawa-stroke-primary-foreground": themeMode === "dark",
243
- "hawa-stroke-primary": themeMode === "light"
244
- }),
261
+ className: cn(
262
+ "circle-car",
263
+ {
264
+ "hawa-stroke-primary-foreground": themeMode === "dark",
265
+ "hawa-stroke-primary": themeMode === "light"
266
+ },
267
+ classNames == null ? void 0 : classNames.car
268
+ ),
245
269
  cx: "20",
246
270
  cy: "20",
247
271
  r: "17.5",
@@ -459,7 +483,7 @@ var CodeBlock = ({
459
483
  "div",
460
484
  {
461
485
  className: cn(
462
- "hawa-flex hawa-w-full hawa-flex-row hawa-items-start hawa-justify-between hawa-border hawa-bg-gray-700 hawa-p-0 hawa-text-left hawa-text-sm sm:hawa-text-base ",
486
+ "hawa-flex hawa-w-full hawa-flex-row hawa-items-start hawa-justify-between hawa-border hawa-bg-gray-800 hawa-p-0 hawa-text-left hawa-text-sm sm:hawa-text-base ",
463
487
  tabs || fileName ? "hawa-rounded-b hawa-rounded-t-none" : "hawa-rounded"
464
488
  )
465
489
  },