@sikka/hawa 0.30.10-next → 0.30.12-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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../elements/destroyableCard/DestroyableCard.tsx","../../util/index.ts","../../elements/card/Card.tsx"],"sourcesContent":["import React, { FC, useRef, useState } from \"react\";\n\nimport { DirectionType } from \"@_types/commonTypes\";\n\nimport { cn } from \"@util/index\";\nimport { Card, CardContent } from \"../card\";\n\ntype DestroyableCard = {\n position?: \"bottom-right\" | \"bottom-left\";\n direction?: DirectionType;\n fixed?: boolean;\n children?: any;\n};\nexport const DestroyableCard: FC<DestroyableCard> = ({\n position = \"bottom-right\",\n fixed,\n direction,\n ...props\n}) => {\n const [closed, setClosed] = useState(false);\n const popUpRef = useRef<HTMLDivElement>(null);\n\n const boxPosition = {\n \"bottom-right\": \"hawa-right-4 hawa-bottom-4\",\n \"bottom-left\": \"hawa-left-4 hawa-bottom-4\"\n };\n\n return (\n <div\n className={cn(\n \"hawa-transition-all\",\n closed ? \"hawa-opacity-0\" : \"hawa-opacity-100\"\n )}\n ref={popUpRef}\n >\n <Card\n className={cn(\n fixed ? \"hawa-fixed\" : \"hawa-relative\",\n fixed && position && boxPosition[position]\n )}\n dir={direction}\n >\n <button\n type=\"button\"\n className={cn(\n direction === \"rtl\" ? \"hawa-left-2\" : \"hawa-right-2\",\n \"hawa-absolute hawa-top-2 hawa-inline-flex hawa-h-8 hawa-w-8 hawa-rounded hawa-p-1.5 hawa-text-gray-400 hawa-transition-all hover:hawa-bg-gray-100 hover:hawa-text-gray-900 focus:hawa-ring-2 focus:hawa-ring-gray-300 dark:hawa-bg-gray-800 dark:hawa-text-gray-500 dark:hover:hawa-bg-gray-700 dark:hover:hawa-text-white\"\n )}\n data-dismiss-target=\"#destroyable-card\"\n aria-label=\"Close\"\n onClick={() => {\n setClosed(true);\n setTimeout(() => {\n if (popUpRef?.current) {\n popUpRef?.current.removeChild(popUpRef?.current.children[0]);\n }\n }, 200);\n }}\n >\n <svg\n aria-hidden=\"true\"\n className=\"hawa-h-5 hawa-w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </button>\n <CardContent headless>{props.children}</CardContent>\n </Card>\n </div>\n );\n};\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 * as React from \"react\";\n\nimport { cn } from \"@util/index\";\n\ninterface CardProps extends React.HTMLAttributes<HTMLDivElement> {\n clickable?: boolean;\n variant?: \"default\" | \"neoBrutalism\";\n}\n\ntype CardContentProps = {\n headless?: boolean;\n noPadding?: boolean;\n} & React.HTMLAttributes<HTMLDivElement>;\n\nconst Card = React.forwardRef<HTMLDivElement, CardProps>(\n ({ className, variant = \"default\", clickable = false, ...props }, ref) => {\n let variantStyles = {\n default: cn(\n \"hawa-rounded-lg hawa-border hawa-bg-card hawa-text-card-foreground hawa-shadow-sm\",\n clickable &&\n \"hawa-cursor-pointer hawa-transition-all hover:hawa-drop-shadow-md dark:hover:dark-shadow\"\n ),\n neoBrutalism: cn(\n \"neo-brutalism\",\n // \"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] transition-all uppercase font-mono dark:bg-black font-bold py-2 px-4 rounded border-2 border-primary shadow-color-primary transition-[transform_50ms, box-shadow_50ms]\",\n clickable &&\n \"hawa-cursor-pointer active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active active:translate-x-0.5 active:translate-y-0.5 active:shadow-color-primary-active\"\n )\n };\n return (\n <div\n ref={ref}\n className={cn(className, variantStyles[variant])}\n {...props}\n />\n );\n }\n);\nconst CardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"hawa-flex hawa-flex-col hawa-space-y-1.5 hawa-p-6\",\n className\n )}\n {...props}\n />\n));\nconst CardTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn(\"hawa-text-2xl hawa-font-semibold \", className)}\n {...props}\n />\n));\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn(\"hawa-text-sm hawa-text-muted-foreground\", className)}\n {...props}\n />\n));\nconst CardContent = React.forwardRef<HTMLDivElement, CardContentProps>(\n ({ headless, noPadding, className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n noPadding ? \"hawa-p-0\" : \"hawa-p-6\",\n headless ? \"hawa-pt-6\" : \"hawa-pt-0\",\n className\n )}\n {...props}\n />\n )\n);\nconst CardFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & { noPadding?: boolean }\n>(({ className, noPadding, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n noPadding ? \"hawa-p-0\" : \"hawa-p-6\",\n \"hawa-flex hawa-items-center hawa-pt-0\",\n className\n )}\n {...props}\n />\n));\n\nCardDescription.displayName = \"CardDescription\";\nCardContent.displayName = \"CardContent\";\nCardHeader.displayName = \"CardHeader\";\nCardFooter.displayName = \"CardFooter\";\nCardTitle.displayName = \"CardTitle\";\nCard.displayName = \"Card\";\n\nexport {\n CardDescription,\n CardContent,\n CardHeader,\n CardFooter,\n CardTitle,\n Card\n};\n"],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AAQ,YAAY,qCAAU,QAAQ,SAAS;AAAA,cAC3D;AAAA,YACF,GAAG,GAAG;AAAA,UACR;AAAA;AAAA,QAEA,gBAAAA,OAAA;AAAA,UAAC;AAAA;AAAA,YACC,eAAY;AAAA,YACZ,WAAU;AAAA,YACV,MAAK;AAAA,YACL,SAAQ;AAAA;AAAA,UAER,gBAAAA,OAAA;AAAA,YAAC;AAAA;AAAA,cACC,UAAS;AAAA,cACT,GAAE;AAAA,cACF,UAAS;AAAA;AAAA,UACV;AAAA,QACH;AAAA,MACF;AAAA,MACA,gBAAAA,OAAA,cAAC,eAAY,UAAQ,QAAE,MAAM,QAAS;AAAA,IACxC;AAAA,EACF;AAEJ;","names":["React","React"]}
1
+ {"version":3,"sources":["../../elements/destroyableCard/DestroyableCard.tsx","../../util/index.ts","../../elements/card/Card.tsx"],"sourcesContent":["import React, { FC, useRef, useState } from \"react\";\n\nimport { DirectionType } from \"@_types/commonTypes\";\n\nimport { cn } from \"@util/index\";\nimport { Card, CardContent } from \"../card\";\n\ntype DestroyableCard = {\n position?: \"bottom-right\" | \"bottom-left\";\n direction?: DirectionType;\n fixed?: boolean;\n children?: any;\n};\nexport const DestroyableCard: FC<DestroyableCard> = ({\n position = \"bottom-right\",\n fixed,\n direction,\n ...props\n}) => {\n const [closed, setClosed] = useState(false);\n const popUpRef = useRef<HTMLDivElement>(null);\n\n const boxPosition = {\n \"bottom-right\": \"hawa-right-4 hawa-bottom-4\",\n \"bottom-left\": \"hawa-left-4 hawa-bottom-4\"\n };\n\n return (\n <div\n className={cn(\n \"hawa-transition-all\",\n closed ? \"hawa-opacity-0\" : \"hawa-opacity-100\"\n )}\n ref={popUpRef}\n >\n <Card\n className={cn(\n fixed ? \"hawa-fixed\" : \"hawa-relative\",\n fixed && position && boxPosition[position]\n )}\n dir={direction}\n >\n <button\n type=\"button\"\n className={cn(\n direction === \"rtl\" ? \"hawa-left-2\" : \"hawa-right-2\",\n \"hawa-absolute hawa-top-2 hawa-inline-flex hawa-h-8 hawa-w-8 hawa-rounded hawa-p-1.5 hawa-text-gray-400 hawa-transition-all hover:hawa-bg-gray-100 hover:hawa-text-gray-900 focus:hawa-ring-2 focus:hawa-ring-gray-300 dark:hawa-bg-gray-800 dark:hawa-text-gray-500 dark:hover:hawa-bg-gray-700 dark:hover:hawa-text-white\"\n )}\n data-dismiss-target=\"#destroyable-card\"\n aria-label=\"Close\"\n onClick={() => {\n setClosed(true);\n setTimeout(() => {\n if (popUpRef?.current) {\n popUpRef?.current.removeChild(popUpRef?.current.children[0]);\n }\n }, 200);\n }}\n >\n <svg\n aria-hidden=\"true\"\n className=\"hawa-h-5 hawa-w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </button>\n <CardContent headless>{props.children}</CardContent>\n </Card>\n </div>\n );\n};\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 * as React from \"react\";\n\nimport { cn } from \"@util/index\";\n\ninterface CardProps extends React.HTMLAttributes<HTMLDivElement> {\n clickable?: boolean;\n variant?: \"default\" | \"neoBrutalism\";\n}\n\ntype CardContentProps = {\n headless?: boolean;\n noPadding?: boolean;\n} & React.HTMLAttributes<HTMLDivElement>;\n\nconst Card = React.forwardRef<HTMLDivElement, CardProps>(\n ({ className, variant = \"default\", clickable = false, ...props }, ref) => {\n let variantStyles = {\n default: cn(\n \"hawa-rounded-lg hawa-border hawa-bg-card hawa-text-card-foreground hawa-shadow-sm\",\n clickable &&\n \"hawa-cursor-pointer hawa-transition-all hover:hawa-drop-shadow-md dark:hover:dark-shadow\",\n ),\n neoBrutalism: cn(\n \"neo-brutalism\",\n // \"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] transition-all uppercase font-mono dark:bg-black font-bold py-2 px-4 rounded border-2 border-primary shadow-color-primary transition-[transform_50ms, box-shadow_50ms]\",\n clickable &&\n \"hawa-cursor-pointer active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active active:translate-x-0.5 active:translate-y-0.5 active:shadow-color-primary-active\",\n ),\n };\n return (\n <div\n ref={ref}\n className={cn(className, variantStyles[variant])}\n {...props}\n />\n );\n },\n);\nconst CardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"hawa-flex hawa-flex-col hawa-space-y-1.5 hawa-p-6\",\n className,\n )}\n {...props}\n />\n));\nconst CardTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn(\"hawa-text-2xl hawa-font-semibold \", className)}\n {...props}\n />\n));\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn(\"hawa-text-sm hawa-text-muted-foreground\", className)}\n {...props}\n />\n));\nconst CardContent = React.forwardRef<HTMLDivElement, CardContentProps>(\n ({ headless, noPadding, className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n noPadding ? \"hawa-p-0\" : \"hawa-p-6\",\n headless ? \"hawa-pt-6\" : \"hawa-pt-0\",\n className,\n )}\n {...props}\n />\n ),\n);\nconst CardFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & { noPadding?: boolean }\n>(({ className, noPadding, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n noPadding ? \"hawa-p-0\" : \"hawa-p-6\",\n \"hawa-flex hawa-items-center hawa-pt-0\",\n className,\n )}\n {...props}\n />\n));\n\nCardDescription.displayName = \"CardDescription\";\nCardContent.displayName = \"CardContent\";\nCardHeader.displayName = \"CardHeader\";\nCardFooter.displayName = \"CardFooter\";\nCardTitle.displayName = \"CardTitle\";\nCard.displayName = \"Card\";\n\nexport {\n CardDescription,\n CardContent,\n CardHeader,\n CardFooter,\n CardTitle,\n Card,\n};\n"],"mappings":";;;AAAA,OAAOA,UAAa,QAAQ,gBAAgB;;;ACA5C,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACLA,YAAY,WAAW;AAcvB,IAAM,OAAa;AAAA,EACjB,CAAC,EAAE,WAAW,UAAU,WAAW,YAAY,OAAO,GAAG,MAAM,GAAG,QAAQ;AACxE,QAAI,gBAAgB;AAAA,MAClB,SAAS;AAAA,QACP;AAAA,QACA,aACE;AAAA,MACJ;AAAA,MACA,cAAc;AAAA,QACZ;AAAA;AAAA,QAEA,aACE;AAAA,MACJ;AAAA,IACF;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW,GAAG,WAAW,cAAc,OAAO,CAAC;AAAA,QAC9C,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AACA,IAAM,aAAmB,iBAGvB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,IAAM,YAAkB,iBAGtB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA,WAAW,GAAG,qCAAqC,SAAS;AAAA,IAC3D,GAAG;AAAA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AAY,YAAY,QAAQ;AAAA,QAC3C;AAAA,QACA,KAAK;AAAA;AAAA,MAEL,gBAAAA,OAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,WAAW;AAAA,YACT,cAAc,QAAQ,gBAAgB;AAAA,YACtC;AAAA,UACF;AAAA,UACA,uBAAoB;AAAA,UACpB,cAAW;AAAA,UACX,SAAS,MAAM;AACb,sBAAU,IAAI;AACd,uBAAW,MAAM;AACf,kBAAI,qCAAU,SAAS;AACrB,qDAAU,QAAQ,YAAY,qCAAU,QAAQ,SAAS;AAAA,cAC3D;AAAA,YACF,GAAG,GAAG;AAAA,UACR;AAAA;AAAA,QAEA,gBAAAA,OAAA;AAAA,UAAC;AAAA;AAAA,YACC,eAAY;AAAA,YACZ,WAAU;AAAA,YACV,MAAK;AAAA,YACL,SAAQ;AAAA;AAAA,UAER,gBAAAA,OAAA;AAAA,YAAC;AAAA;AAAA,cACC,UAAS;AAAA,cACT,GAAE;AAAA,cACF,UAAS;AAAA;AAAA,UACV;AAAA,QACH;AAAA,MACF;AAAA,MACA,gBAAAA,OAAA,cAAC,eAAY,UAAQ,QAAE,MAAM,QAAS;AAAA,IACxC;AAAA,EACF;AAEJ;","names":["React","React"]}
@@ -357,21 +357,21 @@ type BackToTopTypes = {
357
357
  };
358
358
  declare const BackToTop: FC<BackToTopTypes>;
359
359
 
360
- declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
361
- declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
362
360
  interface TableHeadProps extends React.ThHTMLAttributes<HTMLTableCellElement> {
363
361
  clickable?: boolean;
364
362
  condensed?: boolean;
365
363
  }
366
- declare const TableHead: React.ForwardRefExoticComponent<TableHeadProps & React.RefAttributes<HTMLTableCellElement>>;
367
- declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
368
- declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
369
- declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
370
364
  interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {
371
365
  condensed?: boolean;
372
366
  enablePadding?: boolean;
373
367
  padding?: "condensed" | "default" | "noPadding";
374
368
  }
369
+ declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
370
+ declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
371
+ declare const TableHead: React.ForwardRefExoticComponent<TableHeadProps & React.RefAttributes<HTMLTableCellElement>>;
372
+ declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
373
+ declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
374
+ declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
375
375
  declare const TableCell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLTableCellElement>>;
376
376
  declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
377
377
 
@@ -357,21 +357,21 @@ type BackToTopTypes = {
357
357
  };
358
358
  declare const BackToTop: FC<BackToTopTypes>;
359
359
 
360
- declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
361
- declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
362
360
  interface TableHeadProps extends React.ThHTMLAttributes<HTMLTableCellElement> {
363
361
  clickable?: boolean;
364
362
  condensed?: boolean;
365
363
  }
366
- declare const TableHead: React.ForwardRefExoticComponent<TableHeadProps & React.RefAttributes<HTMLTableCellElement>>;
367
- declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
368
- declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
369
- declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
370
364
  interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {
371
365
  condensed?: boolean;
372
366
  enablePadding?: boolean;
373
367
  padding?: "condensed" | "default" | "noPadding";
374
368
  }
369
+ declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
370
+ declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
371
+ declare const TableHead: React.ForwardRefExoticComponent<TableHeadProps & React.RefAttributes<HTMLTableCellElement>>;
372
+ declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
373
+ declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
374
+ declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
375
375
  declare const TableCell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLTableCellElement>>;
376
376
  declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
377
377
 
@@ -2660,7 +2660,6 @@ var Table = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
2660
2660
  ...props
2661
2661
  }
2662
2662
  )));
2663
- Table.displayName = "Table";
2664
2663
  var TableHeader = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React21.createElement(
2665
2664
  "thead",
2666
2665
  {
@@ -2669,7 +2668,6 @@ var TableHeader = React21.forwardRef(({ className, ...props }, ref) => /* @__PUR
2669
2668
  ...props
2670
2669
  }
2671
2670
  ));
2672
- TableHeader.displayName = "TableHeader";
2673
2671
  var TableHead = React21.forwardRef(
2674
2672
  ({ className, condensed, clickable, dir, ...props }, ref) => /* @__PURE__ */ React21.createElement(
2675
2673
  "th",
@@ -2689,9 +2687,7 @@ var TableHead = React21.forwardRef(
2689
2687
  }
2690
2688
  )
2691
2689
  );
2692
- TableHead.displayName = "TableHead";
2693
2690
  var TableBody = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React21.createElement("tbody", { ref, className: cn("hawa-border-none", className), ...props }));
2694
- TableBody.displayName = "TableBody";
2695
2691
  var TableFooter = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React21.createElement(
2696
2692
  "tfoot",
2697
2693
  {
@@ -2703,7 +2699,6 @@ var TableFooter = React21.forwardRef(({ className, ...props }, ref) => /* @__PUR
2703
2699
  ...props
2704
2700
  }
2705
2701
  ));
2706
- TableFooter.displayName = "TableFooter";
2707
2702
  var TableRow = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React21.createElement(
2708
2703
  "tr",
2709
2704
  {
@@ -2717,7 +2712,6 @@ var TableRow = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__
2717
2712
  ...props
2718
2713
  }
2719
2714
  ));
2720
- TableRow.displayName = "TableRow";
2721
2715
  var TableCell = React21.forwardRef(
2722
2716
  ({ className, enablePadding = true, padding = "default", ...props }, ref) => {
2723
2717
  let paddingStyles = {
@@ -2746,7 +2740,6 @@ var TableCell = React21.forwardRef(
2746
2740
  );
2747
2741
  }
2748
2742
  );
2749
- TableCell.displayName = "TableCell";
2750
2743
  var TableCaption = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React21.createElement(
2751
2744
  "caption",
2752
2745
  {
@@ -2758,6 +2751,13 @@ var TableCaption = React21.forwardRef(({ className, ...props }, ref) => /* @__PU
2758
2751
  ...props
2759
2752
  }
2760
2753
  ));
2754
+ Table.displayName = "Table";
2755
+ TableRow.displayName = "TableRow";
2756
+ TableBody.displayName = "TableBody";
2757
+ TableHead.displayName = "TableHead";
2758
+ TableCell.displayName = "TableCell";
2759
+ TableFooter.displayName = "TableFooter";
2760
+ TableHeader.displayName = "TableHeader";
2761
2761
  TableCaption.displayName = "TableCaption";
2762
2762
 
2763
2763
  // elements/dataTable/DataTable.tsx
@@ -2810,6 +2810,9 @@ var DataTable = ({
2810
2810
  rowSelection,
2811
2811
  expanded
2812
2812
  }
2813
+ // defaultColumn: {
2814
+ // maxSize: 200
2815
+ // }
2813
2816
  });
2814
2817
  const pageText = ((_a = props.texts) == null ? void 0 : _a.page) || "page";
2815
2818
  const itemsPerPageOptions = (_b = props.itemsPerPage) == null ? void 0 : _b.map((item) => ({
@@ -2883,7 +2886,10 @@ var DataTable = ({
2883
2886
  dir: props.direction,
2884
2887
  condensed: props.condensed,
2885
2888
  clickable: Boolean(isSortable),
2886
- key: header.id
2889
+ key: header.id,
2890
+ style: {
2891
+ maxWidth: header.column.columnDef.maxSize
2892
+ }
2887
2893
  },
2888
2894
  header.isPlaceholder ? null : (0, import_react_table.flexRender)(
2889
2895
  header.column.columnDef.header,
@@ -2901,6 +2907,9 @@ var DataTable = ({
2901
2907
  return /* @__PURE__ */ React22.createElement(
2902
2908
  TableCell,
2903
2909
  {
2910
+ style: {
2911
+ maxWidth: cell.column.columnDef.maxSize
2912
+ },
2904
2913
  dir: props.direction,
2905
2914
  padding: props.condensed ? "condensed" : (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.padding,
2906
2915
  key: cell.id
@@ -7150,7 +7159,10 @@ var SimpleTable = ({
7150
7159
  {
7151
7160
  condensed: props.condensed,
7152
7161
  dir: props.direction,
7153
- key: header.id
7162
+ key: header.id,
7163
+ style: {
7164
+ maxWidth: header.column.columnDef.maxSize
7165
+ }
7154
7166
  },
7155
7167
  header.isPlaceholder ? null : (0, import_react_table2.flexRender)(
7156
7168
  header.column.columnDef.header,
@@ -7170,6 +7182,9 @@ var SimpleTable = ({
7170
7182
  {
7171
7183
  dir: props.direction,
7172
7184
  padding: props.condensed ? "condensed" : (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.padding,
7185
+ style: {
7186
+ maxWidth: cell.column.columnDef.maxSize
7187
+ },
7173
7188
  key: cell.id
7174
7189
  },
7175
7190
  (0, import_react_table2.flexRender)(
@@ -803,7 +803,6 @@ var Table = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
803
803
  ...props
804
804
  }
805
805
  )));
806
- Table.displayName = "Table";
807
806
  var TableHeader = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React9.createElement(
808
807
  "thead",
809
808
  {
@@ -812,7 +811,6 @@ var TableHeader = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
812
811
  ...props
813
812
  }
814
813
  ));
815
- TableHeader.displayName = "TableHeader";
816
814
  var TableHead = React9.forwardRef(
817
815
  ({ className, condensed, clickable, dir, ...props }, ref) => /* @__PURE__ */ React9.createElement(
818
816
  "th",
@@ -832,9 +830,7 @@ var TableHead = React9.forwardRef(
832
830
  }
833
831
  )
834
832
  );
835
- TableHead.displayName = "TableHead";
836
833
  var TableBody = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React9.createElement("tbody", { ref, className: cn("hawa-border-none", className), ...props }));
837
- TableBody.displayName = "TableBody";
838
834
  var TableFooter = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React9.createElement(
839
835
  "tfoot",
840
836
  {
@@ -846,7 +842,6 @@ var TableFooter = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
846
842
  ...props
847
843
  }
848
844
  ));
849
- TableFooter.displayName = "TableFooter";
850
845
  var TableRow = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React9.createElement(
851
846
  "tr",
852
847
  {
@@ -860,7 +855,6 @@ var TableRow = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__
860
855
  ...props
861
856
  }
862
857
  ));
863
- TableRow.displayName = "TableRow";
864
858
  var TableCell = React9.forwardRef(
865
859
  ({ className, enablePadding = true, padding = "default", ...props }, ref) => {
866
860
  let paddingStyles = {
@@ -889,7 +883,6 @@ var TableCell = React9.forwardRef(
889
883
  );
890
884
  }
891
885
  );
892
- TableCell.displayName = "TableCell";
893
886
  var TableCaption = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React9.createElement(
894
887
  "caption",
895
888
  {
@@ -901,6 +894,13 @@ var TableCaption = React9.forwardRef(({ className, ...props }, ref) => /* @__PUR
901
894
  ...props
902
895
  }
903
896
  ));
897
+ Table.displayName = "Table";
898
+ TableRow.displayName = "TableRow";
899
+ TableBody.displayName = "TableBody";
900
+ TableHead.displayName = "TableHead";
901
+ TableCell.displayName = "TableCell";
902
+ TableFooter.displayName = "TableFooter";
903
+ TableHeader.displayName = "TableHeader";
904
904
  TableCaption.displayName = "TableCaption";
905
905
 
906
906
  // elements/dataTable/DataTable.tsx
@@ -953,6 +953,9 @@ var DataTable = ({
953
953
  rowSelection,
954
954
  expanded
955
955
  }
956
+ // defaultColumn: {
957
+ // maxSize: 200
958
+ // }
956
959
  });
957
960
  const pageText = ((_a = props.texts) == null ? void 0 : _a.page) || "page";
958
961
  const itemsPerPageOptions = (_b = props.itemsPerPage) == null ? void 0 : _b.map((item) => ({
@@ -1026,7 +1029,10 @@ var DataTable = ({
1026
1029
  dir: props.direction,
1027
1030
  condensed: props.condensed,
1028
1031
  clickable: Boolean(isSortable),
1029
- key: header.id
1032
+ key: header.id,
1033
+ style: {
1034
+ maxWidth: header.column.columnDef.maxSize
1035
+ }
1030
1036
  },
1031
1037
  header.isPlaceholder ? null : flexRender(
1032
1038
  header.column.columnDef.header,
@@ -1044,6 +1050,9 @@ var DataTable = ({
1044
1050
  return /* @__PURE__ */ React10.createElement(
1045
1051
  TableCell,
1046
1052
  {
1053
+ style: {
1054
+ maxWidth: cell.column.columnDef.maxSize
1055
+ },
1047
1056
  dir: props.direction,
1048
1057
  padding: props.condensed ? "condensed" : (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.padding,
1049
1058
  key: cell.id
@@ -2550,7 +2559,10 @@ var SimpleTable = ({
2550
2559
  {
2551
2560
  condensed: props.condensed,
2552
2561
  dir: props.direction,
2553
- key: header.id
2562
+ key: header.id,
2563
+ style: {
2564
+ maxWidth: header.column.columnDef.maxSize
2565
+ }
2554
2566
  },
2555
2567
  header.isPlaceholder ? null : flexRender2(
2556
2568
  header.column.columnDef.header,
@@ -2570,6 +2582,9 @@ var SimpleTable = ({
2570
2582
  {
2571
2583
  dir: props.direction,
2572
2584
  padding: props.condensed ? "condensed" : (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.padding,
2585
+ style: {
2586
+ maxWidth: cell.column.columnDef.maxSize
2587
+ },
2573
2588
  key: cell.id
2574
2589
  },
2575
2590
  flexRender2(
package/dist/index.d.mts CHANGED
@@ -520,21 +520,21 @@ type RadioTypes = {
520
520
  };
521
521
  declare const Radio: FC<RadioTypes>;
522
522
 
523
- declare const Table: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableElement> & React$1.RefAttributes<HTMLTableElement>>;
524
- declare const TableHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
525
523
  interface TableHeadProps extends React$1.ThHTMLAttributes<HTMLTableCellElement> {
526
524
  clickable?: boolean;
527
525
  condensed?: boolean;
528
526
  }
529
- declare const TableHead: React$1.ForwardRefExoticComponent<TableHeadProps & React$1.RefAttributes<HTMLTableCellElement>>;
530
- declare const TableBody: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
531
- declare const TableFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
532
- declare const TableRow: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableRowElement> & React$1.RefAttributes<HTMLTableRowElement>>;
533
527
  interface TableCellProps extends React$1.TdHTMLAttributes<HTMLTableCellElement> {
534
528
  condensed?: boolean;
535
529
  enablePadding?: boolean;
536
530
  padding?: "condensed" | "default" | "noPadding";
537
531
  }
532
+ declare const Table: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableElement> & React$1.RefAttributes<HTMLTableElement>>;
533
+ declare const TableHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
534
+ declare const TableHead: React$1.ForwardRefExoticComponent<TableHeadProps & React$1.RefAttributes<HTMLTableCellElement>>;
535
+ declare const TableBody: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
536
+ declare const TableFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
537
+ declare const TableRow: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableRowElement> & React$1.RefAttributes<HTMLTableRowElement>>;
538
538
  declare const TableCell: React$1.ForwardRefExoticComponent<TableCellProps & React$1.RefAttributes<HTMLTableCellElement>>;
539
539
  declare const TableCaption: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableCaptionElement> & React$1.RefAttributes<HTMLTableCaptionElement>>;
540
540
 
package/dist/index.d.ts CHANGED
@@ -520,21 +520,21 @@ type RadioTypes = {
520
520
  };
521
521
  declare const Radio: FC<RadioTypes>;
522
522
 
523
- declare const Table: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableElement> & React$1.RefAttributes<HTMLTableElement>>;
524
- declare const TableHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
525
523
  interface TableHeadProps extends React$1.ThHTMLAttributes<HTMLTableCellElement> {
526
524
  clickable?: boolean;
527
525
  condensed?: boolean;
528
526
  }
529
- declare const TableHead: React$1.ForwardRefExoticComponent<TableHeadProps & React$1.RefAttributes<HTMLTableCellElement>>;
530
- declare const TableBody: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
531
- declare const TableFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
532
- declare const TableRow: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableRowElement> & React$1.RefAttributes<HTMLTableRowElement>>;
533
527
  interface TableCellProps extends React$1.TdHTMLAttributes<HTMLTableCellElement> {
534
528
  condensed?: boolean;
535
529
  enablePadding?: boolean;
536
530
  padding?: "condensed" | "default" | "noPadding";
537
531
  }
532
+ declare const Table: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableElement> & React$1.RefAttributes<HTMLTableElement>>;
533
+ declare const TableHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
534
+ declare const TableHead: React$1.ForwardRefExoticComponent<TableHeadProps & React$1.RefAttributes<HTMLTableCellElement>>;
535
+ declare const TableBody: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
536
+ declare const TableFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
537
+ declare const TableRow: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableRowElement> & React$1.RefAttributes<HTMLTableRowElement>>;
538
538
  declare const TableCell: React$1.ForwardRefExoticComponent<TableCellProps & React$1.RefAttributes<HTMLTableCellElement>>;
539
539
  declare const TableCaption: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableCaptionElement> & React$1.RefAttributes<HTMLTableCaptionElement>>;
540
540
 
package/dist/index.js CHANGED
@@ -2727,7 +2727,6 @@ var Table = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
2727
2727
  ...props
2728
2728
  }
2729
2729
  )));
2730
- Table.displayName = "Table";
2731
2730
  var TableHeader = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React21.createElement(
2732
2731
  "thead",
2733
2732
  {
@@ -2736,7 +2735,6 @@ var TableHeader = React21.forwardRef(({ className, ...props }, ref) => /* @__PUR
2736
2735
  ...props
2737
2736
  }
2738
2737
  ));
2739
- TableHeader.displayName = "TableHeader";
2740
2738
  var TableHead = React21.forwardRef(
2741
2739
  ({ className, condensed, clickable, dir, ...props }, ref) => /* @__PURE__ */ React21.createElement(
2742
2740
  "th",
@@ -2756,9 +2754,7 @@ var TableHead = React21.forwardRef(
2756
2754
  }
2757
2755
  )
2758
2756
  );
2759
- TableHead.displayName = "TableHead";
2760
2757
  var TableBody = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React21.createElement("tbody", { ref, className: cn("hawa-border-none", className), ...props }));
2761
- TableBody.displayName = "TableBody";
2762
2758
  var TableFooter = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React21.createElement(
2763
2759
  "tfoot",
2764
2760
  {
@@ -2770,7 +2766,6 @@ var TableFooter = React21.forwardRef(({ className, ...props }, ref) => /* @__PUR
2770
2766
  ...props
2771
2767
  }
2772
2768
  ));
2773
- TableFooter.displayName = "TableFooter";
2774
2769
  var TableRow = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React21.createElement(
2775
2770
  "tr",
2776
2771
  {
@@ -2784,7 +2779,6 @@ var TableRow = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__
2784
2779
  ...props
2785
2780
  }
2786
2781
  ));
2787
- TableRow.displayName = "TableRow";
2788
2782
  var TableCell = React21.forwardRef(
2789
2783
  ({ className, enablePadding = true, padding = "default", ...props }, ref) => {
2790
2784
  let paddingStyles = {
@@ -2813,7 +2807,6 @@ var TableCell = React21.forwardRef(
2813
2807
  );
2814
2808
  }
2815
2809
  );
2816
- TableCell.displayName = "TableCell";
2817
2810
  var TableCaption = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React21.createElement(
2818
2811
  "caption",
2819
2812
  {
@@ -2825,6 +2818,13 @@ var TableCaption = React21.forwardRef(({ className, ...props }, ref) => /* @__PU
2825
2818
  ...props
2826
2819
  }
2827
2820
  ));
2821
+ Table.displayName = "Table";
2822
+ TableRow.displayName = "TableRow";
2823
+ TableBody.displayName = "TableBody";
2824
+ TableHead.displayName = "TableHead";
2825
+ TableCell.displayName = "TableCell";
2826
+ TableFooter.displayName = "TableFooter";
2827
+ TableHeader.displayName = "TableHeader";
2828
2828
  TableCaption.displayName = "TableCaption";
2829
2829
 
2830
2830
  // elements/dataTable/DataTable.tsx
@@ -2877,6 +2877,9 @@ var DataTable = ({
2877
2877
  rowSelection,
2878
2878
  expanded
2879
2879
  }
2880
+ // defaultColumn: {
2881
+ // maxSize: 200
2882
+ // }
2880
2883
  });
2881
2884
  const pageText = ((_a = props.texts) == null ? void 0 : _a.page) || "page";
2882
2885
  const itemsPerPageOptions = (_b = props.itemsPerPage) == null ? void 0 : _b.map((item) => ({
@@ -2950,7 +2953,10 @@ var DataTable = ({
2950
2953
  dir: props.direction,
2951
2954
  condensed: props.condensed,
2952
2955
  clickable: Boolean(isSortable),
2953
- key: header.id
2956
+ key: header.id,
2957
+ style: {
2958
+ maxWidth: header.column.columnDef.maxSize
2959
+ }
2954
2960
  },
2955
2961
  header.isPlaceholder ? null : (0, import_react_table.flexRender)(
2956
2962
  header.column.columnDef.header,
@@ -2968,6 +2974,9 @@ var DataTable = ({
2968
2974
  return /* @__PURE__ */ React22.createElement(
2969
2975
  TableCell,
2970
2976
  {
2977
+ style: {
2978
+ maxWidth: cell.column.columnDef.maxSize
2979
+ },
2971
2980
  dir: props.direction,
2972
2981
  padding: props.condensed ? "condensed" : (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.padding,
2973
2982
  key: cell.id
@@ -7307,7 +7316,10 @@ var SimpleTable = ({
7307
7316
  {
7308
7317
  condensed: props.condensed,
7309
7318
  dir: props.direction,
7310
- key: header.id
7319
+ key: header.id,
7320
+ style: {
7321
+ maxWidth: header.column.columnDef.maxSize
7322
+ }
7311
7323
  },
7312
7324
  header.isPlaceholder ? null : (0, import_react_table2.flexRender)(
7313
7325
  header.column.columnDef.header,
@@ -7327,6 +7339,9 @@ var SimpleTable = ({
7327
7339
  {
7328
7340
  dir: props.direction,
7329
7341
  padding: props.condensed ? "condensed" : (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.padding,
7342
+ style: {
7343
+ maxWidth: cell.column.columnDef.maxSize
7344
+ },
7330
7345
  key: cell.id
7331
7346
  },
7332
7347
  (0, import_react_table2.flexRender)(
@@ -10236,7 +10251,7 @@ var RegisterForm = ({
10236
10251
  (texts == null ? void 0 : texts.registerText) || "Register"
10237
10252
  ),
10238
10253
  props.additionalButtons
10239
- )), /* @__PURE__ */ import_react48.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-1 hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-white" }, /* @__PURE__ */ import_react48.default.createElement("span", null, (texts == null ? void 0 : texts.existingUserText) || "Already have an account?"), /* @__PURE__ */ import_react48.default.createElement("span", { onClick: props.onRouteToLogin, className: "clickable-link" }, (texts == null ? void 0 : texts.loginText) || "Login")))),
10254
+ )), props.onRouteToLogin && /* @__PURE__ */ import_react48.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-1 hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-white" }, /* @__PURE__ */ import_react48.default.createElement("span", null, (texts == null ? void 0 : texts.existingUserText) || "Already have an account?"), /* @__PURE__ */ import_react48.default.createElement("span", { onClick: props.onRouteToLogin, className: "clickable-link" }, (texts == null ? void 0 : texts.loginText) || "Login")))),
10240
10255
  props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ import_react48.default.createElement(
10241
10256
  CardFooter,
10242
10257
  {