@sikka/hawa 0.35.5-next → 0.35.6-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.
- package/dist/appLayout/index.js +177 -170
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +198 -191
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/blocks/index.js +60 -60
- package/dist/blocks/index.mjs +12 -12
- package/dist/blocks/misc/index.js +49 -49
- package/dist/blocks/misc/index.mjs +62 -62
- package/dist/{chunk-TERP5K6R.mjs → chunk-57EAKTAP.mjs} +1 -184
- package/dist/{chunk-G7JHUC5N.mjs → chunk-ANXGMZXS.mjs} +205 -0
- package/dist/{chunk-HSRW7X3Z.mjs → chunk-MZRUEJED.mjs} +1 -1
- package/dist/chunk-SYGWSBJL.mjs +63 -0
- package/dist/elements/index.js +74 -74
- package/dist/elements/index.mjs +9 -9
- package/dist/hooks/index.d.mts +4 -1
- package/dist/hooks/index.d.ts +4 -1
- package/dist/hooks/index.js +31 -2
- package/dist/hooks/index.mjs +4 -2
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +177 -177
- package/dist/index.mjs +723 -724
- package/dist/layout/index.js +285 -278
- package/dist/layout/index.mjs +26 -57
- package/dist/passwordInput/index.js.map +1 -1
- package/dist/passwordInput/index.mjs.map +1 -1
- package/dist/tabs/index.js +20 -20
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +25 -25
- package/dist/tabs/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-545D35G6.mjs +0 -54
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../elements/passwordInput/PasswordInput.tsx","../../icons/Emojis.tsx","../../icons/InputIcons.tsx","../../util/index.ts","../../icons/CommonIcons.tsx","../../elements/input/Input.tsx","../../elements/label/Label.tsx","../../elements/tooltip/Tooltip.tsx","../../elements/skeleton/Skeleton.tsx","../../elements/popover/Popover.tsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\n\nimport { CheckMark, EyeIcon, HiddenEyeIcon, UncheckMark } from \"../../icons\";\nimport { Input } from \"../input\";\nimport { Popover } from \"../popover\";\n\ntype PasswordInputIndicatorProps = {\n strength?: any;\n};\nexport const PasswordStrengthIndicator: React.FC<\n PasswordInputIndicatorProps\n> = ({ strength }) => {\n const strengthLevels = [\n \"none\",\n \"very-weak\",\n \"weak\",\n \"medium\",\n \"strong\",\n \"very-strong\"\n ];\n const strengthColors: any = {\n none: \"hawa-bg-red-700\",\n \"very-weak\": \"hawa-bg-red-600\",\n weak: \"hawa-bg-red-500\",\n medium: \"hawa-bg-yellow-500\",\n strong: \"hawa-bg-green-400\",\n \"very-strong\": \"hawa-bg-green-600\"\n };\n const currentStrengthLevel = strengthLevels[strength];\n const width = {\n none: \"0%\",\n \"very-weak\": \"20%\",\n weak: \"40%\",\n medium: \"60%\",\n strong: \"80%\",\n \"very-strong\": \"100%\"\n }[currentStrengthLevel];\n\n return (\n <div className=\"hawa-mt-0.5 hawa-h-2 hawa-w-full hawa-rounded hawa-bg-gray-200\">\n <div\n className={`${strengthColors[currentStrengthLevel]} hawa-h-full hawa-rounded hawa-transition-all hawa-duration-300`}\n style={{ width }}\n />\n </div>\n );\n};\n\ntype PasswordInputType = {\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;\n hidePopover?: boolean;\n};\n\nexport const PasswordInput: React.FC<PasswordInputType> = ({\n hidePopover,\n ...props\n}) => {\n const [inputValue, setInputValue] = useState(\"\");\n const [isInputFocused, setIsInputFocused] = useState(false);\n const [currentStr, setCurrentStr] = useState(0);\n const [passwordVisible, setPasswordVisible] = useState(false);\n // States for each criterion\n const [lengthCriteriaMet, setLengthCriteriaMet] = useState(false);\n const [numberCriteriaMet, setNumberCriteriaMet] = useState(false);\n const [specialCharCriteriaMet, setSpecialCharCriteriaMet] = useState(false);\n const [lowercaseCriteriaMet, setLowercaseCriteriaMet] = useState(false);\n const [uppercaseCriteriaMet, setUppercaseCriteriaMet] = useState(false);\n\n useEffect(() => {\n // Calculate strength based on the criteria met\n const calculateStrength = () => {\n let strengthScore = 0;\n if (lengthCriteriaMet) strengthScore += 1;\n if (numberCriteriaMet) strengthScore += 1;\n if (specialCharCriteriaMet) strengthScore += 1;\n if (lowercaseCriteriaMet) strengthScore += 1;\n if (uppercaseCriteriaMet) strengthScore += 1;\n return strengthScore;\n };\n\n const currentStrengthScore = calculateStrength();\n setCurrentStr(currentStrengthScore);\n }, [inputValue]);\n\n const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const newPassword = event.target.value;\n if (props.onChange) {\n props.onChange(event);\n }\n setInputValue(newPassword);\n\n // Update each criterion state based on the new password\n setLengthCriteriaMet(newPassword.length >= 8);\n setNumberCriteriaMet(/\\d/.test(newPassword));\n setSpecialCharCriteriaMet(/[!@#$%^&*(),.?\":{}|<>]/.test(newPassword));\n setLowercaseCriteriaMet(/[a-z]/.test(newPassword));\n setUppercaseCriteriaMet(/[A-Z]/.test(newPassword));\n };\n\n // Event handler for when the input gains focus\n const handleInputFocus = () => {\n if (!hidePopover) {\n setIsInputFocused(true);\n }\n };\n\n // Event handler for when the input loses focus\n const handleInputBlur = () => {\n setIsInputFocused(false);\n };\n\n const getCriteriaClass = (isMet: boolean) =>\n isMet\n ? \"hawa-flex hawa-flex-row hawa-gap-2 hawa-text-sm hawa-items-center hawa-text-green-500\"\n : \"hawa-flex hawa-flex-row hawa-gap-2 hawa-text-sm hawa-items-center hawa-text-red-600\";\n\n return (\n <div>\n <Popover\n width=\"trigger\"\n sideOffset={20}\n open={isInputFocused}\n onOpenChange={setIsInputFocused}\n triggerProps={{ asChild: true }}\n contentProps={{ onOpenAutoFocus: (e: any) => e.preventDefault() }}\n trigger={\n <div\n onClick={(e) => {\n e.preventDefault();\n if (!hidePopover) {\n setIsInputFocused(true);\n }\n }}\n >\n <Input\n width=\"full\"\n className=\"hawa-w-full\"\n label={\"test\"}\n onChange={handleInputChange}\n onFocus={handleInputFocus} // Set the input as focused\n onBlur={handleInputBlur}\n type={passwordVisible ? \"text\" : \"password\"}\n endIcon={\n <div\n className=\"hawa-cursor-pointer\"\n onClick={() => setPasswordVisible(!passwordVisible)}\n >\n {passwordVisible ? (\n <EyeIcon className=\"hawa-text-gray-500\" />\n ) : (\n <HiddenEyeIcon className=\"hawa-text-gray-500\" />\n )}{\" \"}\n </div>\n }\n />\n </div>\n }\n >\n <div className=\"hawa-rounded hawa-p-2\">\n <ul className=\"hawa-rounded hawa-p-2\">\n <li className={getCriteriaClass(lengthCriteriaMet)}>\n {lengthCriteriaMet ? (\n <CheckMark size=\"sm\" />\n ) : (\n <UncheckMark size=\"sm\" />\n )}\n At least 8 characters long\n </li>\n <li className={getCriteriaClass(numberCriteriaMet)}>\n {numberCriteriaMet ? (\n <CheckMark size=\"sm\" />\n ) : (\n <UncheckMark size=\"sm\" />\n )}\n At least 1 number\n </li>\n <li className={getCriteriaClass(specialCharCriteriaMet)}>\n {specialCharCriteriaMet ? (\n <CheckMark size=\"sm\" />\n ) : (\n <UncheckMark size=\"sm\" />\n )}\n At least 1 special character\n </li>\n <li className={getCriteriaClass(lowercaseCriteriaMet)}>\n {lowercaseCriteriaMet ? (\n <CheckMark size=\"sm\" />\n ) : (\n <UncheckMark size=\"sm\" />\n )}\n At least 1 lowercase letter\n </li>\n <li className={getCriteriaClass(uppercaseCriteriaMet)}>\n {uppercaseCriteriaMet ? (\n <CheckMark size=\"sm\" />\n ) : (\n <UncheckMark size=\"sm\" />\n )}\n At least 1 uppercase letter\n </li>\n </ul>\n </div>\n </Popover>\n <PasswordStrengthIndicator strength={currentStr} />\n </div>\n );\n};\n","import React from \"react\";\n\nexport const VeryGoodEmoji = () => (\n <svg\n fill=\"none\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n width=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g clipPath=\"url(#clip0_53_166)\">\n <path\n clipRule=\"evenodd\"\n d=\"M14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 4.41015 4.41015 1.5 8 1.5C11.5899 1.5 14.5 4.41015 14.5 8ZM16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM4.5 8.97498H3.875V9.59998C3.875 11.4747 5.81046 12.8637 7.99817 12.8637C10.1879 12.8637 12.125 11.4832 12.125 9.59998V8.97498H11.5H4.5ZM7.99817 11.6137C6.59406 11.6137 5.63842 10.9482 5.28118 10.225H10.7202C10.3641 10.9504 9.40797 11.6137 7.99817 11.6137Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n ></path>\n <path\n clipRule=\"evenodd\"\n d=\"M6.15295 4.92093L5.375 3.5L4.59705 4.92093L3 5.21885L4.11625 6.39495L3.90717 8L5.375 7.30593L6.84283 8L6.63375 6.39495L7.75 5.21885L6.15295 4.92093ZM11.403 4.92093L10.625 3.5L9.84705 4.92093L8.25 5.21885L9.36625 6.39495L9.15717 8L10.625 7.30593L12.0928 8L11.8837 6.39495L13 5.21885L11.403 4.92093Z\"\n fill=\"#FF990A\"\n fillRule=\"evenodd\"\n ></path>\n </g>\n </svg>\n);\nexport const GoodEmoji = () => (\n <svg\n fill=\"none\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n width=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g clipPath=\"url(#clip0_53_167)\">\n <path\n clipRule=\"evenodd\"\n d=\"M14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 4.41015 4.41015 1.5 8 1.5C11.5899 1.5 14.5 4.41015 14.5 8ZM16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM11.5249 10.8478L11.8727 10.3286L10.8342 9.6329L10.4863 10.1522C9.94904 10.9543 9.0363 11.4802 8.00098 11.4802C6.96759 11.4802 6.05634 10.9563 5.51863 10.1567L5.16986 9.63804L4.13259 10.3356L4.48137 10.8542C5.2414 11.9844 6.53398 12.7302 8.00098 12.7302C9.47073 12.7302 10.7654 11.9816 11.5249 10.8478ZM6.75 6.75C6.75 7.30228 6.30228 7.75 5.75 7.75C5.19772 7.75 4.75 7.30228 4.75 6.75C4.75 6.19772 5.19772 5.75 5.75 5.75C6.30228 5.75 6.75 6.19772 6.75 6.75ZM10.25 7.75C10.8023 7.75 11.25 7.30228 11.25 6.75C11.25 6.19772 10.8023 5.75 10.25 5.75C9.69771 5.75 9.25 6.19772 9.25 6.75C9.25 7.30228 9.69771 7.75 10.25 7.75Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n ></path>\n </g>\n </svg>\n);\nexport const BadEmoji = () => (\n <svg\n fill=\"none\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n width=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g clipPath=\"url(#clip0_53_152)\">\n <path\n clipRule=\"evenodd\"\n d=\"M14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 4.41015 4.41015 1.5 8 1.5C11.5899 1.5 14.5 4.41015 14.5 8ZM16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM5.75 7.75C6.30228 7.75 6.75 7.30228 6.75 6.75C6.75 6.19772 6.30228 5.75 5.75 5.75C5.19772 5.75 4.75 6.19772 4.75 6.75C4.75 7.30228 5.19772 7.75 5.75 7.75ZM11.25 6.75C11.25 7.30228 10.8023 7.75 10.25 7.75C9.69771 7.75 9.25 7.30228 9.25 6.75C9.25 6.19772 9.69771 5.75 10.25 5.75C10.8023 5.75 11.25 6.19772 11.25 6.75ZM11.5249 11.2622L11.8727 11.7814L10.8342 12.4771L10.4863 11.9578C9.94904 11.1557 9.0363 10.6298 8.00098 10.6298C6.96759 10.6298 6.05634 11.1537 5.51863 11.9533L5.16986 12.4719L4.13259 11.7744L4.48137 11.2558C5.2414 10.1256 6.53398 9.37982 8.00098 9.37982C9.47073 9.37982 10.7654 10.1284 11.5249 11.2622Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n ></path>\n </g>\n </svg>\n);\nexport const VeryBadEmoji = () => (\n <svg\n fill=\"none\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n width=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g clipPath=\"url(#clip0_53_151)\">\n <path\n d=\"M11.841 12.0225C12.7197 12.9324 12.7197 14.4077 11.841 15.3176C10.9623 16.2275 9.53769 16.2275 8.65901 15.3176C7.78033 14.4077 7.78033 12.9324 8.65901 12.0225L10.25 10.375L11.841 12.0225Z\"\n fill=\"#0070F3\"\n ></path>\n <path\n clipRule=\"evenodd\"\n d=\"M8 1.5C4.41015 1.5 1.5 4.41015 1.5 8C1.5 10.9668 3.48826 13.4711 6.20649 14.2496L5.79351 15.6916C2.44895 14.7338 0 11.6539 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8C16 9.4652 15.6054 10.8405 14.9162 12.023L13.6203 11.2677C14.1794 10.3083 14.5 9.19272 14.5 8C14.5 4.41015 11.5899 1.5 8 1.5ZM6.75 6.75C6.75 7.30228 6.30228 7.75 5.75 7.75C5.19772 7.75 4.75 7.30228 4.75 6.75C4.75 6.19772 5.19772 5.75 5.75 5.75C6.30228 5.75 6.75 6.19772 6.75 6.75ZM10.25 7.75C10.8023 7.75 11.25 7.30228 11.25 6.75C11.25 6.19772 10.8023 5.75 10.25 5.75C9.69771 5.75 9.25 6.19772 9.25 6.75C9.25 7.30228 9.69771 7.75 10.25 7.75Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n ></path>\n </g>\n </svg>\n);\n","import React from \"react\";\n\nimport { cn } from \"@util/index\";\n\nexport const EyeIcon = (props: any) => (\n <div className={cn(\"hawa-h-5 hawa-w-5\", props.className)}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z\" />\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n </svg>\n </div>\n);\nexport const HiddenEyeIcon = (props: any) => (\n <div className={cn(\"hawa-h-5 hawa-w-5\", props.className)}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M9.88 9.88a3 3 0 1 0 4.24 4.24\" />\n <path d=\"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68\" />\n <path d=\"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61\" />\n <line x1=\"2\" x2=\"22\" y1=\"2\" y2=\"22\" />\n </svg>\n </div>\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 React from \"react\";\n\nimport { cn } from \"@util/index\";\n\nexport const CheckMark = ({ size = \"default\", className }: any) => {\n let sizeStyles: any = {\n default: \"hawa-h-5 hawa-w-5\",\n sm: \"hawa-h-3 hawa-w-3\"\n };\n return (\n <svg\n className={cn(sizeStyles[size], className)}\n aria-hidden=\"true\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n );\n};\n\nexport const UncheckMark = ({ size = \"default\", className }: any) => {\n let sizeStyles: any = {\n default: \"hawa-h-5 hawa-w-5\",\n sm: \"hawa-h-3 hawa-w-3\"\n };\n\n return (\n <svg\n className={cn(sizeStyles[size], className)}\n aria-hidden=\"true\"\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 );\n};\n","import React, { forwardRef } from \"react\";\n\nimport { cn } from \"@util/index\";\n\nimport { Label, LabelProps } from \"../label/Label\";\nimport { Skeleton } from \"../skeleton/Skeleton\";\n\nexport type TextFieldTypes = React.InputHTMLAttributes<HTMLInputElement> & {\n isLoading?: boolean;\n containerClassName?: string;\n margin?: \"none\" | \"normal\" | \"large\";\n width?: \"small\" | \"normal\" | \"full\" | \"auto\";\n /** The label of the input field */\n label?: any;\n labelProps?: LabelProps;\n hideSeparator?: boolean;\n /** The small red text under the input field to show validation. */\n helperText?: any;\n forceHideHelperText?: boolean;\n inputProps?: React.InputHTMLAttributes<HTMLInputElement>;\n /** The icon inside the input field */\n icon?: any;\n /** Boolean to enable/disable editing the input field and using it as a text field */\n preview?: boolean;\n // maxLength?: any;\n iconInside?: React.ReactNode;\n endIcon?: React.ReactNode;\n endIconProps?: { className?: string };\n startIcon?: React.ReactNode;\n placeholder?: React.ReactNode;\n /** Show the count of characters left in the input field. Works along with maxLength prop. */\n showCount?: boolean;\n countPosition?: \"top\" | \"bottom\" | \"center\";\n popup?: boolean;\n popupContent?: React.ReactNode;\n outsidePrefix?: any;\n prefixText?: any;\n};\nexport const Input = forwardRef<HTMLInputElement, TextFieldTypes>(\n (\n {\n margin = \"none\",\n width = \"full\",\n preview = false,\n forceHideHelperText = false,\n labelProps,\n placeholder,\n showCount,\n inputProps,\n countPosition = \"bottom\",\n ...props\n },\n ref,\n ) => {\n let marginStyles = {\n none: \"hawa-mb-0\",\n normal: \"hawa-mb-3\",\n large: \"hawa-mb-5\",\n };\n let widthStyles = {\n small: \"hawa-w-full hawa-max-w-2xs\",\n normal: \"hawa-w-1/2\",\n full: \"hawa-w-full\",\n auto: \"\",\n };\n\n let defaultStyle =\n \"hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0\";\n let defaultInputStyle =\n \"hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm \";\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n let newValue = e.target.value;\n\n if (props.prefixText) {\n // If newValue is shorter than prefixText, set newValue to prefixText\n if (newValue.length < props.prefixText.length) {\n newValue = props.prefixText;\n } else {\n // Check if newValue starts with a substring of prefixText\n const isSubstring = props.prefixText.startsWith(newValue);\n\n if (!isSubstring && !newValue.startsWith(props.prefixText)) {\n newValue = `${props.prefixText}${newValue}`;\n }\n }\n }\n\n if (props.onChange) {\n const newEvent = { ...e, target: { ...e.target, value: newValue } };\n props.onChange(newEvent as React.ChangeEvent<HTMLInputElement>);\n }\n };\n\n return (\n <div\n className={cn(\n defaultStyle,\n marginStyles[margin],\n widthStyles[width],\n props.containerClassName,\n \"hawa-w-full hawa-gap-2\",\n )}\n >\n {props.label && <Label {...labelProps}>{props.label}</Label>}\n <div className=\"hawa-flex hawa-flex-row hawa-w-full hawa-items-center \">\n {props.outsidePrefix && (\n <span\n className={cn(\n \"hawa-me-2 hawa-opacity-90\",\n !forceHideHelperText && \"hawa-mb-2\",\n )}\n >\n {props.outsidePrefix}\n </span>\n )}\n {props.isLoading ? (\n <div className=\"hawa-pb-2 hawa-w-full\">\n <Skeleton className=\"hawa-h-[40px] hawa-w-full\" />\n </div>\n ) : (\n <>\n {!props.hideSeparator && (\n <div\n className={cn(\n \"hawa-absolute hawa-top-[22px] hawa-h-[0.8px] hawa-w-full hawa-bg-gray-200 hawa-transition-all dark:hawa-bg-gray-800\",\n preview ? \"hawa-opacity-100\" : \"hawa-opacity-0\",\n )}\n ></div>\n )}\n <div className=\"hawa-flex hawa-flex-col hawa-w-full hawa-gap-2\">\n <div className={\"hawa-relative\"}>\n {props.startIcon && (\n <div className=\"hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2\">\n {props.startIcon}\n </div>\n )}\n {props.endIcon && (\n <div\n className={cn(\n \"hawa-absolute hawa-end-3 hawa-top-1/2 hawa--translate-y-1/2\",\n props.endIconProps?.className,\n )}\n >\n {props.endIcon}\n </div>\n )}\n <input\n required\n dir={props.dir}\n type={props.type}\n value={props.value}\n onChange={handleChange}\n autoComplete={props.autoComplete}\n defaultValue={props.defaultValue}\n placeholder={placeholder}\n disabled={props.disabled || preview}\n style={{ height: 40 }}\n {...inputProps}\n className={cn(\n defaultInputStyle,\n \" focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 dark:hawa-text-white\",\n {\n \"hawa-pe-9\": props.endIcon,\n \"hawa-ps-9\": props.startIcon,\n \"hawa-pe-[60px]\": countPosition === \"center\",\n },\n preview &&\n \"hawa-border-transparent hawa-bg-transparent hawa-px-0\",\n inputProps?.className,\n )}\n />\n </div>\n\n {/* Regular helper text */}\n {!forceHideHelperText && (\n <p\n className={cn(\n \"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all\",\n props.helperText\n ? \"hawa-h-4 hawa-opacity-100\"\n : \"hawa-h-0 hawa-opacity-0\",\n )}\n >\n {props.helperText}\n </p>\n )}\n {/* Popover helper text */}\n {!props.disabled && forceHideHelperText && (\n <div\n className={cn(\n \"hawa-absolute hawa-end-0 hawa-top-[47px] hawa-z-20 hawa-translate-y-1/2 hawa-rounded hawa-bg-background hawa-text-start hawa-text-xs hawa-text-helper-color hawa-drop-shadow-md hawa-transition-all\",\n props.helperText\n ? \"hawa-border hawa-p-1\"\n : \"hawa-border-none hawa-p-0\",\n )}\n >\n {props.helperText}\n </div>\n )}\n {/* Character Counter */}\n {showCount && (\n <div\n className={cn(\n \"hawa-absolute hawa-translate-y-1/2 hawa-text-start hawa-text-xs hawa-transition-all\",\n {\n \"hawa-end-0 hawa-top-[62px]\":\n countPosition === \"bottom\",\n \"hawa-bottom-[62px] hawa-end-0\":\n countPosition === \"top\",\n \"hawa-end-2\": countPosition === \"center\",\n },\n )}\n >\n {props.value ? String(props.value).length : 0}/\n {props.maxLength}\n </div>\n )}\n\n {/* Popover helper text */}\n {/* {props.popup && (\n <div\n className={cn(\n \"hawa-absolute hawa-top-[47px] hawa-min-h-fit hawa-w-full hawa-text-xs hawa-text-helper-color hawa-transition-all hawa-text-start hawa-rounded hawa-end-0 hawa-z-20 hawa-drop-shadow-md hawa-bg-background hawa-translate-y-1/2\",\n props.helperText\n ? \"hawa-border hawa-p-1\"\n : \"hawa-border-none hawa-p-0\"\n )}\n >\n {props.popupContent}\n </div>\n )} */}\n </div>\n </>\n )}\n </div>\n </div>\n );\n },\n);\n","import * as React from \"react\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nimport { cn } from \"@util/index\";\nimport { Tooltip } from \"../tooltip\";\n\nexport type LabelProps = {\n hint?: React.ReactNode;\n hintSide?: PositionType;\n htmlFor?: string;\n required?: boolean;\n};\n\nconst Label = React.forwardRef<\n HTMLLabelElement,\n React.LabelHTMLAttributes<HTMLLabelElement> & LabelProps\n>(({ className, hint, hintSide, required, children, ...props }, ref) => (\n <div className=\"hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all\">\n <label\n ref={ref}\n className={cn(\n \"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70\",\n className\n )}\n {...props}\n >\n {children}\n {required && <span className=\"hawa-mx-0.5 hawa-text-red-500\">*</span>}\n </label>\n {hint && (\n <Tooltip\n content={hint}\n side={hintSide}\n triggerProps={{\n tabIndex: -1,\n onClick: (event) => event.preventDefault()\n }}\n >\n <div>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"hawa-h-[14px] hawa-w-[14px] hawa-cursor-help\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3\" />\n <path d=\"M12 17h.01\" />\n </svg>\n </div>\n </Tooltip>\n )}\n </div>\n));\n\nLabel.displayName = \"Label\";\n\nexport { Label };\n","import React from \"react\";\n\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { cn } from \"@util/index\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> & {\n size?: \"default\" | \"small\" | \"large\";\n }\n>(({ className, sideOffset = 4, size = \"default\", ...props }, ref) => (\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"hawa-z-50 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-text-popover-foreground hawa-shadow-md hawa-animate-in hawa-fade-in-0 hawa-zoom-in-95 data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=closed]:hawa-zoom-out-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2\",\n {\n \"hawa-text-xs\": size === \"small\",\n \"hawa-text-xl\": size === \"large\"\n },\n className\n )}\n {...props}\n />\n));\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\n\nconst TooltipArrow = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Arrow>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Arrow>\n>(({ className, ...props }, ref) => (\n <TooltipPrimitive.Arrow ref={ref} className={cn(className)} {...props} />\n));\nTooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;\n\ntype TooltipTypes = {\n /** Controls the open state of the tooltip. */\n open?: any;\n /** Specifies the side where the tooltip will appear. */\n side?: PositionType;\n /** Content to be displayed within the tooltip. */\n content?: any;\n /** Elements to which the tooltip is anchored. */\n children?: any;\n /** Sets the default open state of the tooltip. */\n defaultOpen?: any;\n /** Event handler for open state changes. */\n onOpenChange?: any;\n /** Duration of the delay before the tooltip appears. */\n delayDuration?: any;\n /** Size of the tooltip. */\n size?: \"default\" | \"small\" | \"large\";\n /** Disables the tooltip. */\n disabled?: boolean;\n triggerProps?: TooltipPrimitive.TooltipTriggerProps;\n contentProps?: TooltipPrimitive.TooltipContentProps;\n providerProps?: TooltipPrimitive.TooltipProviderProps;\n};\n\nconst Tooltip: React.FunctionComponent<TooltipTypes> = ({\n side,\n size,\n open,\n content,\n children,\n disabled,\n defaultOpen,\n onOpenChange,\n triggerProps,\n contentProps,\n providerProps,\n delayDuration = 300,\n ...props\n}) => {\n return (\n <TooltipPrimitive.TooltipProvider\n delayDuration={delayDuration}\n {...providerProps}\n >\n <TooltipPrimitive.Root\n open={!disabled && open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}\n {...props}\n >\n <TooltipPrimitive.Trigger {...triggerProps}>\n {children}\n </TooltipPrimitive.Trigger>\n <TooltipContent\n size={size}\n side={side}\n align=\"center\"\n {...contentProps}\n style={{\n ...contentProps?.style,\n maxWidth: \"var(--radix-tooltip-content-available-width)\",\n maxHeight: \"var(--radix-tooltip-content-available-height)\"\n }}\n >\n {content}\n </TooltipContent>\n </TooltipPrimitive.Root>\n </TooltipPrimitive.TooltipProvider>\n );\n};\n\nexport { Tooltip };\n","import React from \"react\";\n\nimport { cn } from \"@util/index\";\n\ninterface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {\n className?: string;\n animation?: \"none\" | \"pulse\" | \"shimmer\";\n content?: any;\n fade?: \"top\" | \"bottom\" | \"left\" | \"right\";\n}\n\nfunction Skeleton({\n className,\n content,\n animation = \"pulse\",\n fade,\n ...props\n}: SkeletonProps) {\n const animationStyles = {\n none: \"hawa-rounded hawa-bg-muted\",\n pulse: \"hawa-animate-pulse hawa-rounded hawa-bg-muted\",\n shimmer:\n \"hawa-space-y-5 hawa-rounded hawa-bg-muted hawa-p-4 hawa-relative before:hawa-absolute before:hawa-inset-0 before:hawa--translate-x-full before:hawa-animate-[shimmer_2s_infinite] before:hawa-bg-gradient-to-r before:hawa-from-transparent before:hawa-via-gray-300/40 dark:before:hawa-via-white/10 before:hawa-to-transparent hawa-isolate hawa-overflow-hidden before:hawa-border-t before:hawa-border-rose-100/10\",\n };\n const fadeStyle = {\n bottom: \"hawa-mask-fade-bottom\",\n top: \"hawa-mask-fade-top\",\n right: \"hawa-mask-fade-right\",\n left: \"hawa-mask-fade-left \",\n };\n\n return (\n <div\n className={cn(\n animationStyles[animation],\n content &&\n \"hawa-flex hawa-flex-col hawa-items-center hawa-justify-center\",\n fade && fadeStyle[fade],\n className,\n )}\n {...props}\n >\n {content && content}\n </div>\n );\n}\n\nexport { Skeleton };\n","import * as React from \"react\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { cn } from \"@util/index\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\n container?: HTMLElement | null;\n }\n>(\n (\n { className, align = \"center\", sideOffset = 4, container, ...props },\n ref,\n ) => (\n <PopoverPrimitive.Portal container={container}>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n ),\n);\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\ninterface PopoverProps {\n side?: PositionType;\n align?: \"start\" | \"center\" | \"end\";\n trigger?: React.ReactNode;\n children: React.ReactNode;\n className?: string;\n sideOffset?: number;\n disableTrigger?: any;\n width?: \"trigger\" | \"default\";\n open?: boolean;\n contentProps?: PopoverPrimitive.PopoverContentProps;\n triggerProps?: PopoverPrimitive.PopoverTriggerProps;\n}\n\ntype HawaPopoverTypes = PopoverProps &\n React.ComponentProps<typeof PopoverPrimitive.Root>;\n\nconst Popover: React.FC<HawaPopoverTypes> = ({\n trigger,\n children,\n className,\n align = \"center\",\n side,\n sideOffset = 4,\n open,\n width = \"default\",\n disableTrigger,\n contentProps,\n triggerProps,\n ...props\n}) => {\n let widthStyles = {\n trigger: \"var(--radix-popover-trigger-width)\",\n default: \"auto\",\n };\n\n return (\n <PopoverPrimitive.Root open={open} {...props}>\n <PopoverPrimitive.Trigger\n className=\"hawa-w-full\"\n disabled={disableTrigger}\n {...triggerProps}\n >\n {trigger}\n </PopoverPrimitive.Trigger>\n <PopoverContent\n side={side}\n className={className}\n align={align}\n sideOffset={sideOffset}\n style={{\n width: widthStyles[width],\n maxWidth: \"var(--radix-popover-content-available-width)\",\n maxHeight: \"var(--radix-popover-content-available-height)\",\n }}\n {...contentProps}\n >\n {children}\n </PopoverContent>\n </PopoverPrimitive.Root>\n );\n};\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\nconst PopoverPortal = PopoverPrimitive.Portal;\nconst PopoverRoot = PopoverPrimitive.Root;\n\nexport { Popover, PopoverPortal, PopoverRoot, PopoverContent, PopoverTrigger };\n"],"mappings":";;;AAAA,OAAOA,UAAS,WAAW,gBAAgB;;;ACA3C,OAAO,WAAW;;;ACAlB,OAAOC,YAAW;;;ACAlB,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADDO,IAAM,UAAU,CAAC,UACtB,gBAAAC,OAAA,cAAC,SAAI,WAAW,GAAG,qBAAqB,MAAM,SAAS,KACrD,gBAAAA,OAAA;AAAA,EAAC;AAAA;AAAA,IACC,OAAM;AAAA,IACN,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,QAAO;AAAA,IACP,aAAY;AAAA,IACZ,eAAc;AAAA,IACd,gBAAe;AAAA;AAAA,EAEf,gBAAAA,OAAA,cAAC,UAAK,GAAE,gDAA+C;AAAA,EACvD,gBAAAA,OAAA,cAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,KAAI;AAChC,CACF;AAEK,IAAM,gBAAgB,CAAC,UAC5B,gBAAAA,OAAA,cAAC,SAAI,WAAW,GAAG,qBAAqB,MAAM,SAAS,KACrD,gBAAAA,OAAA;AAAA,EAAC;AAAA;AAAA,IACC,OAAM;AAAA,IACN,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,QAAO;AAAA,IACP,aAAY;AAAA,IACZ,eAAc;AAAA,IACd,gBAAe;AAAA;AAAA,EAEf,gBAAAA,OAAA,cAAC,UAAK,GAAE,kCAAiC;AAAA,EACzC,gBAAAA,OAAA,cAAC,UAAK,GAAE,gFAA+E;AAAA,EACvF,gBAAAA,OAAA,cAAC,UAAK,GAAE,0EAAyE;AAAA,EACj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AAW,iBAAiB,sBAAsB,KACnD,yBACC,gBAAAA,OAAA,cAAC,aAAU,MAAK,MAAK,IAErB,gBAAAA,OAAA,cAAC,eAAY,MAAK,MAAK,GACvB,8BAEJ,GACA,gBAAAA,OAAA,cAAC,QAAG,WAAW,iBAAiB,oBAAoB,KACjD,uBACC,gBAAAA,OAAA,cAAC,aAAU,MAAK,MAAK,IAErB,gBAAAA,OAAA,cAAC,eAAY,MAAK,MAAK,GACvB,6BAEJ,GACA,gBAAAA,OAAA,cAAC,QAAG,WAAW,iBAAiB,oBAAoB,KACjD,uBACC,gBAAAA,OAAA,cAAC,aAAU,MAAK,MAAK,IAErB,gBAAAA,OAAA,cAAC,eAAY,MAAK,MAAK,GACvB,6BAEJ,CACF,CACF;AAAA,EACF,GACA,gBAAAA,OAAA,cAAC,6BAA0B,UAAU,YAAY,CACnD;AAEJ;","names":["React","React","React","React","React","React","forwardRef","React","React","React","React","React","forwardRef","React","React","React"]}
|
1
|
+
{"version":3,"sources":["../../elements/passwordInput/PasswordInput.tsx","../../icons/Emojis.tsx","../../icons/InputIcons.tsx","../../util/index.ts","../../icons/CommonIcons.tsx","../../elements/input/Input.tsx","../../elements/label/Label.tsx","../../elements/tooltip/Tooltip.tsx","../../elements/skeleton/Skeleton.tsx","../../elements/popover/Popover.tsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\n\nimport { CheckMark, EyeIcon, HiddenEyeIcon, UncheckMark } from \"../../icons\";\nimport { Input } from \"../input\";\nimport { Popover } from \"../popover\";\n\ntype PasswordInputIndicatorProps = {\n strength?: any;\n};\nexport const PasswordStrengthIndicator: React.FC<\n PasswordInputIndicatorProps\n> = ({ strength }) => {\n const strengthLevels = [\n \"none\",\n \"very-weak\",\n \"weak\",\n \"medium\",\n \"strong\",\n \"very-strong\"\n ];\n const strengthColors: any = {\n none: \"hawa-bg-red-700\",\n \"very-weak\": \"hawa-bg-red-600\",\n weak: \"hawa-bg-red-500\",\n medium: \"hawa-bg-yellow-500\",\n strong: \"hawa-bg-green-400\",\n \"very-strong\": \"hawa-bg-green-600\"\n };\n const currentStrengthLevel = strengthLevels[strength];\n const width = {\n none: \"0%\",\n \"very-weak\": \"20%\",\n weak: \"40%\",\n medium: \"60%\",\n strong: \"80%\",\n \"very-strong\": \"100%\"\n }[currentStrengthLevel];\n\n return (\n <div className=\"hawa-mt-0.5 hawa-h-2 hawa-w-full hawa-rounded hawa-bg-gray-200\">\n <div\n className={`${strengthColors[currentStrengthLevel]} hawa-h-full hawa-rounded hawa-transition-all hawa-duration-300`}\n style={{ width }}\n />\n </div>\n );\n};\n\ntype PasswordInputType = {\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;\n hidePopover?: boolean;\n};\n\nexport const PasswordInput: React.FC<PasswordInputType> = ({\n hidePopover,\n ...props\n}) => {\n const [inputValue, setInputValue] = useState(\"\");\n const [isInputFocused, setIsInputFocused] = useState(false);\n const [currentStr, setCurrentStr] = useState(0);\n const [passwordVisible, setPasswordVisible] = useState(false);\n // States for each criterion\n const [lengthCriteriaMet, setLengthCriteriaMet] = useState(false);\n const [numberCriteriaMet, setNumberCriteriaMet] = useState(false);\n const [specialCharCriteriaMet, setSpecialCharCriteriaMet] = useState(false);\n const [lowercaseCriteriaMet, setLowercaseCriteriaMet] = useState(false);\n const [uppercaseCriteriaMet, setUppercaseCriteriaMet] = useState(false);\n\n useEffect(() => {\n // Calculate strength based on the criteria met\n const calculateStrength = () => {\n let strengthScore = 0;\n if (lengthCriteriaMet) strengthScore += 1;\n if (numberCriteriaMet) strengthScore += 1;\n if (specialCharCriteriaMet) strengthScore += 1;\n if (lowercaseCriteriaMet) strengthScore += 1;\n if (uppercaseCriteriaMet) strengthScore += 1;\n return strengthScore;\n };\n\n const currentStrengthScore = calculateStrength();\n setCurrentStr(currentStrengthScore);\n }, [inputValue]);\n\n const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const newPassword = event.target.value;\n if (props.onChange) {\n props.onChange(event);\n }\n setInputValue(newPassword);\n\n // Update each criterion state based on the new password\n setLengthCriteriaMet(newPassword.length >= 8);\n setNumberCriteriaMet(/\\d/.test(newPassword));\n setSpecialCharCriteriaMet(/[!@#$%^&*(),.?\":{}|<>]/.test(newPassword));\n setLowercaseCriteriaMet(/[a-z]/.test(newPassword));\n setUppercaseCriteriaMet(/[A-Z]/.test(newPassword));\n };\n\n // Event handler for when the input gains focus\n const handleInputFocus = () => {\n if (!hidePopover) {\n setIsInputFocused(true);\n }\n };\n\n // Event handler for when the input loses focus\n const handleInputBlur = () => {\n setIsInputFocused(false);\n };\n\n const getCriteriaClass = (isMet: boolean) =>\n isMet\n ? \"hawa-flex hawa-flex-row hawa-gap-2 hawa-text-sm hawa-items-center hawa-text-green-500\"\n : \"hawa-flex hawa-flex-row hawa-gap-2 hawa-text-sm hawa-items-center hawa-text-red-600\";\n\n return (\n <div>\n <Popover\n width=\"trigger\"\n sideOffset={20}\n open={isInputFocused}\n onOpenChange={setIsInputFocused}\n triggerProps={{ asChild: true }}\n contentProps={{ onOpenAutoFocus: (e: any) => e.preventDefault() }}\n trigger={\n <div\n onClick={(e) => {\n e.preventDefault();\n if (!hidePopover) {\n setIsInputFocused(true);\n }\n }}\n >\n <Input\n width=\"full\"\n className=\"hawa-w-full\"\n label={\"test\"}\n onChange={handleInputChange}\n onFocus={handleInputFocus} // Set the input as focused\n onBlur={handleInputBlur}\n type={passwordVisible ? \"text\" : \"password\"}\n endIcon={\n <div\n className=\"hawa-cursor-pointer\"\n onClick={() => setPasswordVisible(!passwordVisible)}\n >\n {passwordVisible ? (\n <EyeIcon className=\"hawa-text-gray-500\" />\n ) : (\n <HiddenEyeIcon className=\"hawa-text-gray-500\" />\n )}{\" \"}\n </div>\n }\n />\n </div>\n }\n >\n <div className=\"hawa-rounded hawa-p-2\">\n <ul className=\"hawa-rounded hawa-p-2\">\n <li className={getCriteriaClass(lengthCriteriaMet)}>\n {lengthCriteriaMet ? (\n <CheckMark size=\"sm\" />\n ) : (\n <UncheckMark size=\"sm\" />\n )}\n At least 8 characters long\n </li>\n <li className={getCriteriaClass(numberCriteriaMet)}>\n {numberCriteriaMet ? (\n <CheckMark size=\"sm\" />\n ) : (\n <UncheckMark size=\"sm\" />\n )}\n At least 1 number\n </li>\n <li className={getCriteriaClass(specialCharCriteriaMet)}>\n {specialCharCriteriaMet ? (\n <CheckMark size=\"sm\" />\n ) : (\n <UncheckMark size=\"sm\" />\n )}\n At least 1 special character\n </li>\n <li className={getCriteriaClass(lowercaseCriteriaMet)}>\n {lowercaseCriteriaMet ? (\n <CheckMark size=\"sm\" />\n ) : (\n <UncheckMark size=\"sm\" />\n )}\n At least 1 lowercase letter\n </li>\n <li className={getCriteriaClass(uppercaseCriteriaMet)}>\n {uppercaseCriteriaMet ? (\n <CheckMark size=\"sm\" />\n ) : (\n <UncheckMark size=\"sm\" />\n )}\n At least 1 uppercase letter\n </li>\n </ul>\n </div>\n </Popover>\n <PasswordStrengthIndicator strength={currentStr} />\n </div>\n );\n};\n","import React from \"react\";\n\nexport const VeryGoodEmoji = () => (\n <svg\n fill=\"none\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n width=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g clipPath=\"url(#clip0_53_166)\">\n <path\n clipRule=\"evenodd\"\n d=\"M14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 4.41015 4.41015 1.5 8 1.5C11.5899 1.5 14.5 4.41015 14.5 8ZM16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM4.5 8.97498H3.875V9.59998C3.875 11.4747 5.81046 12.8637 7.99817 12.8637C10.1879 12.8637 12.125 11.4832 12.125 9.59998V8.97498H11.5H4.5ZM7.99817 11.6137C6.59406 11.6137 5.63842 10.9482 5.28118 10.225H10.7202C10.3641 10.9504 9.40797 11.6137 7.99817 11.6137Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n ></path>\n <path\n clipRule=\"evenodd\"\n d=\"M6.15295 4.92093L5.375 3.5L4.59705 4.92093L3 5.21885L4.11625 6.39495L3.90717 8L5.375 7.30593L6.84283 8L6.63375 6.39495L7.75 5.21885L6.15295 4.92093ZM11.403 4.92093L10.625 3.5L9.84705 4.92093L8.25 5.21885L9.36625 6.39495L9.15717 8L10.625 7.30593L12.0928 8L11.8837 6.39495L13 5.21885L11.403 4.92093Z\"\n fill=\"#FF990A\"\n fillRule=\"evenodd\"\n ></path>\n </g>\n </svg>\n);\nexport const GoodEmoji = () => (\n <svg\n fill=\"none\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n width=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g clipPath=\"url(#clip0_53_167)\">\n <path\n clipRule=\"evenodd\"\n d=\"M14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 4.41015 4.41015 1.5 8 1.5C11.5899 1.5 14.5 4.41015 14.5 8ZM16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM11.5249 10.8478L11.8727 10.3286L10.8342 9.6329L10.4863 10.1522C9.94904 10.9543 9.0363 11.4802 8.00098 11.4802C6.96759 11.4802 6.05634 10.9563 5.51863 10.1567L5.16986 9.63804L4.13259 10.3356L4.48137 10.8542C5.2414 11.9844 6.53398 12.7302 8.00098 12.7302C9.47073 12.7302 10.7654 11.9816 11.5249 10.8478ZM6.75 6.75C6.75 7.30228 6.30228 7.75 5.75 7.75C5.19772 7.75 4.75 7.30228 4.75 6.75C4.75 6.19772 5.19772 5.75 5.75 5.75C6.30228 5.75 6.75 6.19772 6.75 6.75ZM10.25 7.75C10.8023 7.75 11.25 7.30228 11.25 6.75C11.25 6.19772 10.8023 5.75 10.25 5.75C9.69771 5.75 9.25 6.19772 9.25 6.75C9.25 7.30228 9.69771 7.75 10.25 7.75Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n ></path>\n </g>\n </svg>\n);\nexport const BadEmoji = () => (\n <svg\n fill=\"none\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n width=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g clipPath=\"url(#clip0_53_152)\">\n <path\n clipRule=\"evenodd\"\n d=\"M14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8C1.5 4.41015 4.41015 1.5 8 1.5C11.5899 1.5 14.5 4.41015 14.5 8ZM16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM5.75 7.75C6.30228 7.75 6.75 7.30228 6.75 6.75C6.75 6.19772 6.30228 5.75 5.75 5.75C5.19772 5.75 4.75 6.19772 4.75 6.75C4.75 7.30228 5.19772 7.75 5.75 7.75ZM11.25 6.75C11.25 7.30228 10.8023 7.75 10.25 7.75C9.69771 7.75 9.25 7.30228 9.25 6.75C9.25 6.19772 9.69771 5.75 10.25 5.75C10.8023 5.75 11.25 6.19772 11.25 6.75ZM11.5249 11.2622L11.8727 11.7814L10.8342 12.4771L10.4863 11.9578C9.94904 11.1557 9.0363 10.6298 8.00098 10.6298C6.96759 10.6298 6.05634 11.1537 5.51863 11.9533L5.16986 12.4719L4.13259 11.7744L4.48137 11.2558C5.2414 10.1256 6.53398 9.37982 8.00098 9.37982C9.47073 9.37982 10.7654 10.1284 11.5249 11.2622Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n ></path>\n </g>\n </svg>\n);\nexport const VeryBadEmoji = () => (\n <svg\n fill=\"none\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n width=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g clipPath=\"url(#clip0_53_151)\">\n <path\n d=\"M11.841 12.0225C12.7197 12.9324 12.7197 14.4077 11.841 15.3176C10.9623 16.2275 9.53769 16.2275 8.65901 15.3176C7.78033 14.4077 7.78033 12.9324 8.65901 12.0225L10.25 10.375L11.841 12.0225Z\"\n fill=\"#0070F3\"\n ></path>\n <path\n clipRule=\"evenodd\"\n d=\"M8 1.5C4.41015 1.5 1.5 4.41015 1.5 8C1.5 10.9668 3.48826 13.4711 6.20649 14.2496L5.79351 15.6916C2.44895 14.7338 0 11.6539 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8C16 9.4652 15.6054 10.8405 14.9162 12.023L13.6203 11.2677C14.1794 10.3083 14.5 9.19272 14.5 8C14.5 4.41015 11.5899 1.5 8 1.5ZM6.75 6.75C6.75 7.30228 6.30228 7.75 5.75 7.75C5.19772 7.75 4.75 7.30228 4.75 6.75C4.75 6.19772 5.19772 5.75 5.75 5.75C6.30228 5.75 6.75 6.19772 6.75 6.75ZM10.25 7.75C10.8023 7.75 11.25 7.30228 11.25 6.75C11.25 6.19772 10.8023 5.75 10.25 5.75C9.69771 5.75 9.25 6.19772 9.25 6.75C9.25 7.30228 9.69771 7.75 10.25 7.75Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n ></path>\n </g>\n </svg>\n);\n","import React from \"react\";\n\nimport { cn } from \"@util/index\";\n\nexport const EyeIcon = (props: any) => (\n <div className={cn(\"hawa-h-5 hawa-w-5\", props.className)}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z\" />\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n </svg>\n </div>\n);\nexport const HiddenEyeIcon = (props: any) => (\n <div className={cn(\"hawa-h-5 hawa-w-5\", props.className)}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M9.88 9.88a3 3 0 1 0 4.24 4.24\" />\n <path d=\"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68\" />\n <path d=\"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61\" />\n <line x1=\"2\" x2=\"22\" y1=\"2\" y2=\"22\" />\n </svg>\n </div>\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 React from \"react\";\n\nimport { cn } from \"@util/index\";\n\nexport const CheckMark = ({ size = \"default\", className }: any) => {\n let sizeStyles: any = {\n default: \"hawa-h-5 hawa-w-5\",\n sm: \"hawa-h-3 hawa-w-3\",\n };\n return (\n <svg\n className={cn(sizeStyles[size], className)}\n aria-hidden=\"true\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n );\n};\n\nexport const UncheckMark = ({ size = \"default\", className }: any) => {\n let sizeStyles: any = {\n default: \"hawa-h-5 hawa-w-5\",\n sm: \"hawa-h-3 hawa-w-3\",\n };\n\n return (\n <svg\n className={cn(sizeStyles[size], className)}\n aria-hidden=\"true\"\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 );\n};\nexport const MenuIcon = () => (\n <svg\n aria-label=\"Menu Button\"\n stroke=\"currentColor\"\n fill=\"currentColor\"\n strokeWidth={0}\n viewBox=\"0 0 20 20\"\n aria-hidden=\"true\"\n height=\"1.6em\"\n width=\"1.6em\"\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z\"\n ></path>\n </svg>\n);\n","import React, { forwardRef } from \"react\";\n\nimport { cn } from \"@util/index\";\n\nimport { Label, LabelProps } from \"../label/Label\";\nimport { Skeleton } from \"../skeleton/Skeleton\";\n\nexport type TextFieldTypes = React.InputHTMLAttributes<HTMLInputElement> & {\n isLoading?: boolean;\n containerClassName?: string;\n margin?: \"none\" | \"normal\" | \"large\";\n width?: \"small\" | \"normal\" | \"full\" | \"auto\";\n /** The label of the input field */\n label?: any;\n labelProps?: LabelProps;\n hideSeparator?: boolean;\n /** The small red text under the input field to show validation. */\n helperText?: any;\n forceHideHelperText?: boolean;\n inputProps?: React.InputHTMLAttributes<HTMLInputElement>;\n /** The icon inside the input field */\n icon?: any;\n /** Boolean to enable/disable editing the input field and using it as a text field */\n preview?: boolean;\n // maxLength?: any;\n iconInside?: React.ReactNode;\n endIcon?: React.ReactNode;\n endIconProps?: { className?: string };\n startIcon?: React.ReactNode;\n placeholder?: React.ReactNode;\n /** Show the count of characters left in the input field. Works along with maxLength prop. */\n showCount?: boolean;\n countPosition?: \"top\" | \"bottom\" | \"center\";\n popup?: boolean;\n popupContent?: React.ReactNode;\n outsidePrefix?: any;\n prefixText?: any;\n};\nexport const Input = forwardRef<HTMLInputElement, TextFieldTypes>(\n (\n {\n margin = \"none\",\n width = \"full\",\n preview = false,\n forceHideHelperText = false,\n labelProps,\n placeholder,\n showCount,\n inputProps,\n countPosition = \"bottom\",\n ...props\n },\n ref,\n ) => {\n let marginStyles = {\n none: \"hawa-mb-0\",\n normal: \"hawa-mb-3\",\n large: \"hawa-mb-5\",\n };\n let widthStyles = {\n small: \"hawa-w-full hawa-max-w-2xs\",\n normal: \"hawa-w-1/2\",\n full: \"hawa-w-full\",\n auto: \"\",\n };\n\n let defaultStyle =\n \"hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0\";\n let defaultInputStyle =\n \"hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm \";\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n let newValue = e.target.value;\n\n if (props.prefixText) {\n // If newValue is shorter than prefixText, set newValue to prefixText\n if (newValue.length < props.prefixText.length) {\n newValue = props.prefixText;\n } else {\n // Check if newValue starts with a substring of prefixText\n const isSubstring = props.prefixText.startsWith(newValue);\n\n if (!isSubstring && !newValue.startsWith(props.prefixText)) {\n newValue = `${props.prefixText}${newValue}`;\n }\n }\n }\n\n if (props.onChange) {\n const newEvent = { ...e, target: { ...e.target, value: newValue } };\n props.onChange(newEvent as React.ChangeEvent<HTMLInputElement>);\n }\n };\n\n return (\n <div\n className={cn(\n defaultStyle,\n marginStyles[margin],\n widthStyles[width],\n props.containerClassName,\n \"hawa-w-full hawa-gap-2\",\n )}\n >\n {props.label && <Label {...labelProps}>{props.label}</Label>}\n <div className=\"hawa-flex hawa-flex-row hawa-w-full hawa-items-center \">\n {props.outsidePrefix && (\n <span\n className={cn(\n \"hawa-me-2 hawa-opacity-90\",\n !forceHideHelperText && \"hawa-mb-2\",\n )}\n >\n {props.outsidePrefix}\n </span>\n )}\n {props.isLoading ? (\n <div className=\"hawa-pb-2 hawa-w-full\">\n <Skeleton className=\"hawa-h-[40px] hawa-w-full\" />\n </div>\n ) : (\n <>\n {!props.hideSeparator && (\n <div\n className={cn(\n \"hawa-absolute hawa-top-[22px] hawa-h-[0.8px] hawa-w-full hawa-bg-gray-200 hawa-transition-all dark:hawa-bg-gray-800\",\n preview ? \"hawa-opacity-100\" : \"hawa-opacity-0\",\n )}\n ></div>\n )}\n <div className=\"hawa-flex hawa-flex-col hawa-w-full hawa-gap-2\">\n <div className={\"hawa-relative\"}>\n {props.startIcon && (\n <div className=\"hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2\">\n {props.startIcon}\n </div>\n )}\n {props.endIcon && (\n <div\n className={cn(\n \"hawa-absolute hawa-end-3 hawa-top-1/2 hawa--translate-y-1/2\",\n props.endIconProps?.className,\n )}\n >\n {props.endIcon}\n </div>\n )}\n <input\n required\n dir={props.dir}\n type={props.type}\n value={props.value}\n onChange={handleChange}\n autoComplete={props.autoComplete}\n defaultValue={props.defaultValue}\n placeholder={placeholder}\n disabled={props.disabled || preview}\n style={{ height: 40 }}\n {...inputProps}\n className={cn(\n defaultInputStyle,\n \" focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 dark:hawa-text-white\",\n {\n \"hawa-pe-9\": props.endIcon,\n \"hawa-ps-9\": props.startIcon,\n \"hawa-pe-[60px]\": countPosition === \"center\",\n },\n preview &&\n \"hawa-border-transparent hawa-bg-transparent hawa-px-0\",\n inputProps?.className,\n )}\n />\n </div>\n\n {/* Regular helper text */}\n {!forceHideHelperText && (\n <p\n className={cn(\n \"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all\",\n props.helperText\n ? \"hawa-h-4 hawa-opacity-100\"\n : \"hawa-h-0 hawa-opacity-0\",\n )}\n >\n {props.helperText}\n </p>\n )}\n {/* Popover helper text */}\n {!props.disabled && forceHideHelperText && (\n <div\n className={cn(\n \"hawa-absolute hawa-end-0 hawa-top-[47px] hawa-z-20 hawa-translate-y-1/2 hawa-rounded hawa-bg-background hawa-text-start hawa-text-xs hawa-text-helper-color hawa-drop-shadow-md hawa-transition-all\",\n props.helperText\n ? \"hawa-border hawa-p-1\"\n : \"hawa-border-none hawa-p-0\",\n )}\n >\n {props.helperText}\n </div>\n )}\n {/* Character Counter */}\n {showCount && (\n <div\n className={cn(\n \"hawa-absolute hawa-translate-y-1/2 hawa-text-start hawa-text-xs hawa-transition-all\",\n {\n \"hawa-end-0 hawa-top-[62px]\":\n countPosition === \"bottom\",\n \"hawa-bottom-[62px] hawa-end-0\":\n countPosition === \"top\",\n \"hawa-end-2\": countPosition === \"center\",\n },\n )}\n >\n {props.value ? String(props.value).length : 0}/\n {props.maxLength}\n </div>\n )}\n\n {/* Popover helper text */}\n {/* {props.popup && (\n <div\n className={cn(\n \"hawa-absolute hawa-top-[47px] hawa-min-h-fit hawa-w-full hawa-text-xs hawa-text-helper-color hawa-transition-all hawa-text-start hawa-rounded hawa-end-0 hawa-z-20 hawa-drop-shadow-md hawa-bg-background hawa-translate-y-1/2\",\n props.helperText\n ? \"hawa-border hawa-p-1\"\n : \"hawa-border-none hawa-p-0\"\n )}\n >\n {props.popupContent}\n </div>\n )} */}\n </div>\n </>\n )}\n </div>\n </div>\n );\n },\n);\n","import * as React from \"react\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nimport { cn } from \"@util/index\";\nimport { Tooltip } from \"../tooltip\";\n\nexport type LabelProps = {\n hint?: React.ReactNode;\n hintSide?: PositionType;\n htmlFor?: string;\n required?: boolean;\n};\n\nconst Label = React.forwardRef<\n HTMLLabelElement,\n React.LabelHTMLAttributes<HTMLLabelElement> & LabelProps\n>(({ className, hint, hintSide, required, children, ...props }, ref) => (\n <div className=\"hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all\">\n <label\n ref={ref}\n className={cn(\n \"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70\",\n className\n )}\n {...props}\n >\n {children}\n {required && <span className=\"hawa-mx-0.5 hawa-text-red-500\">*</span>}\n </label>\n {hint && (\n <Tooltip\n content={hint}\n side={hintSide}\n triggerProps={{\n tabIndex: -1,\n onClick: (event) => event.preventDefault()\n }}\n >\n <div>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"hawa-h-[14px] hawa-w-[14px] hawa-cursor-help\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3\" />\n <path d=\"M12 17h.01\" />\n </svg>\n </div>\n </Tooltip>\n )}\n </div>\n));\n\nLabel.displayName = \"Label\";\n\nexport { Label };\n","import React from \"react\";\n\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { cn } from \"@util/index\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> & {\n size?: \"default\" | \"small\" | \"large\";\n }\n>(({ className, sideOffset = 4, size = \"default\", ...props }, ref) => (\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"hawa-z-50 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-text-popover-foreground hawa-shadow-md hawa-animate-in hawa-fade-in-0 hawa-zoom-in-95 data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=closed]:hawa-zoom-out-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2\",\n {\n \"hawa-text-xs\": size === \"small\",\n \"hawa-text-xl\": size === \"large\"\n },\n className\n )}\n {...props}\n />\n));\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\n\nconst TooltipArrow = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Arrow>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Arrow>\n>(({ className, ...props }, ref) => (\n <TooltipPrimitive.Arrow ref={ref} className={cn(className)} {...props} />\n));\nTooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;\n\ntype TooltipTypes = {\n /** Controls the open state of the tooltip. */\n open?: any;\n /** Specifies the side where the tooltip will appear. */\n side?: PositionType;\n /** Content to be displayed within the tooltip. */\n content?: any;\n /** Elements to which the tooltip is anchored. */\n children?: any;\n /** Sets the default open state of the tooltip. */\n defaultOpen?: any;\n /** Event handler for open state changes. */\n onOpenChange?: any;\n /** Duration of the delay before the tooltip appears. */\n delayDuration?: any;\n /** Size of the tooltip. */\n size?: \"default\" | \"small\" | \"large\";\n /** Disables the tooltip. */\n disabled?: boolean;\n triggerProps?: TooltipPrimitive.TooltipTriggerProps;\n contentProps?: TooltipPrimitive.TooltipContentProps;\n providerProps?: TooltipPrimitive.TooltipProviderProps;\n};\n\nconst Tooltip: React.FunctionComponent<TooltipTypes> = ({\n side,\n size,\n open,\n content,\n children,\n disabled,\n defaultOpen,\n onOpenChange,\n triggerProps,\n contentProps,\n providerProps,\n delayDuration = 300,\n ...props\n}) => {\n return (\n <TooltipPrimitive.TooltipProvider\n delayDuration={delayDuration}\n {...providerProps}\n >\n <TooltipPrimitive.Root\n open={!disabled && open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}\n {...props}\n >\n <TooltipPrimitive.Trigger {...triggerProps}>\n {children}\n </TooltipPrimitive.Trigger>\n <TooltipContent\n size={size}\n side={side}\n align=\"center\"\n {...contentProps}\n style={{\n ...contentProps?.style,\n maxWidth: \"var(--radix-tooltip-content-available-width)\",\n maxHeight: \"var(--radix-tooltip-content-available-height)\"\n }}\n >\n {content}\n </TooltipContent>\n </TooltipPrimitive.Root>\n </TooltipPrimitive.TooltipProvider>\n );\n};\n\nexport { Tooltip };\n","import React from \"react\";\n\nimport { cn } from \"@util/index\";\n\ninterface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {\n className?: string;\n animation?: \"none\" | \"pulse\" | \"shimmer\";\n content?: any;\n fade?: \"top\" | \"bottom\" | \"left\" | \"right\";\n}\n\nfunction Skeleton({\n className,\n content,\n animation = \"pulse\",\n fade,\n ...props\n}: SkeletonProps) {\n const animationStyles = {\n none: \"hawa-rounded hawa-bg-muted\",\n pulse: \"hawa-animate-pulse hawa-rounded hawa-bg-muted\",\n shimmer:\n \"hawa-space-y-5 hawa-rounded hawa-bg-muted hawa-p-4 hawa-relative before:hawa-absolute before:hawa-inset-0 before:hawa--translate-x-full before:hawa-animate-[shimmer_2s_infinite] before:hawa-bg-gradient-to-r before:hawa-from-transparent before:hawa-via-gray-300/40 dark:before:hawa-via-white/10 before:hawa-to-transparent hawa-isolate hawa-overflow-hidden before:hawa-border-t before:hawa-border-rose-100/10\",\n };\n const fadeStyle = {\n bottom: \"hawa-mask-fade-bottom\",\n top: \"hawa-mask-fade-top\",\n right: \"hawa-mask-fade-right\",\n left: \"hawa-mask-fade-left \",\n };\n\n return (\n <div\n className={cn(\n animationStyles[animation],\n content &&\n \"hawa-flex hawa-flex-col hawa-items-center hawa-justify-center\",\n fade && fadeStyle[fade],\n className,\n )}\n {...props}\n >\n {content && content}\n </div>\n );\n}\n\nexport { Skeleton };\n","import * as React from \"react\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { cn } from \"@util/index\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\n container?: HTMLElement | null;\n }\n>(\n (\n { className, align = \"center\", sideOffset = 4, container, ...props },\n ref,\n ) => (\n <PopoverPrimitive.Portal container={container}>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n ),\n);\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\ninterface PopoverProps {\n side?: PositionType;\n align?: \"start\" | \"center\" | \"end\";\n trigger?: React.ReactNode;\n children: React.ReactNode;\n className?: string;\n sideOffset?: number;\n disableTrigger?: any;\n width?: \"trigger\" | \"default\";\n open?: boolean;\n contentProps?: PopoverPrimitive.PopoverContentProps;\n triggerProps?: PopoverPrimitive.PopoverTriggerProps;\n}\n\ntype HawaPopoverTypes = PopoverProps &\n React.ComponentProps<typeof PopoverPrimitive.Root>;\n\nconst Popover: React.FC<HawaPopoverTypes> = ({\n trigger,\n children,\n className,\n align = \"center\",\n side,\n sideOffset = 4,\n open,\n width = \"default\",\n disableTrigger,\n contentProps,\n triggerProps,\n ...props\n}) => {\n let widthStyles = {\n trigger: \"var(--radix-popover-trigger-width)\",\n default: \"auto\",\n };\n\n return (\n <PopoverPrimitive.Root open={open} {...props}>\n <PopoverPrimitive.Trigger\n className=\"hawa-w-full\"\n disabled={disableTrigger}\n {...triggerProps}\n >\n {trigger}\n </PopoverPrimitive.Trigger>\n <PopoverContent\n side={side}\n className={className}\n align={align}\n sideOffset={sideOffset}\n style={{\n width: widthStyles[width],\n maxWidth: \"var(--radix-popover-content-available-width)\",\n maxHeight: \"var(--radix-popover-content-available-height)\",\n }}\n {...contentProps}\n >\n {children}\n </PopoverContent>\n </PopoverPrimitive.Root>\n );\n};\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\nconst PopoverPortal = PopoverPrimitive.Portal;\nconst PopoverRoot = PopoverPrimitive.Root;\n\nexport { Popover, PopoverPortal, PopoverRoot, PopoverContent, PopoverTrigger };\n"],"mappings":";;;AAAA,OAAOA,UAAS,WAAW,gBAAgB;;;ACA3C,OAAO,WAAW;;;ACAlB,OAAOC,YAAW;;;ACAlB,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADDO,IAAM,UAAU,CAAC,UACtB,gBAAAC,OAAA,cAAC,SAAI,WAAW,GAAG,qBAAqB,MAAM,SAAS,KACrD,gBAAAA,OAAA;AAAA,EAAC;AAAA;AAAA,IACC,OAAM;AAAA,IACN,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,QAAO;AAAA,IACP,aAAY;AAAA,IACZ,eAAc;AAAA,IACd,gBAAe;AAAA;AAAA,EAEf,gBAAAA,OAAA,cAAC,UAAK,GAAE,gDAA+C;AAAA,EACvD,gBAAAA,OAAA,cAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,KAAI;AAChC,CACF;AAEK,IAAM,gBAAgB,CAAC,UAC5B,gBAAAA,OAAA,cAAC,SAAI,WAAW,GAAG,qBAAqB,MAAM,SAAS,KACrD,gBAAAA,OAAA;AAAA,EAAC;AAAA;AAAA,IACC,OAAM;AAAA,IACN,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,QAAO;AAAA,IACP,aAAY;AAAA,IACZ,eAAc;AAAA,IACd,gBAAe;AAAA;AAAA,EAEf,gBAAAA,OAAA,cAAC,UAAK,GAAE,kCAAiC;AAAA,EACzC,gBAAAA,OAAA,cAAC,UAAK,GAAE,gFAA+E;AAAA,EACvF,gBAAAA,OAAA,cAAC,UAAK,GAAE,0EAAyE;AAAA,EACjF,gBAAAA,OAAA,cAAC,UAAK,IAAG,KAAI,IAAG,M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cAAC,aAAU,MAAK,MAAK,IAErB,gBAAAA,OAAA,cAAC,eAAY,MAAK,MAAK,GACvB,8BAEJ,GACA,gBAAAA,OAAA,cAAC,QAAG,WAAW,iBAAiB,oBAAoB,KACjD,uBACC,gBAAAA,OAAA,cAAC,aAAU,MAAK,MAAK,IAErB,gBAAAA,OAAA,cAAC,eAAY,MAAK,MAAK,GACvB,6BAEJ,GACA,gBAAAA,OAAA,cAAC,QAAG,WAAW,iBAAiB,oBAAoB,KACjD,uBACC,gBAAAA,OAAA,cAAC,aAAU,MAAK,MAAK,IAErB,gBAAAA,OAAA,cAAC,eAAY,MAAK,MAAK,GACvB,6BAEJ,CACF,CACF;AAAA,EACF,GACA,gBAAAA,OAAA,cAAC,6BAA0B,UAAU,YAAY,CACnD;AAEJ;","names":["React","React","React","React","React","React","forwardRef","React","React","React","React","React","forwardRef","React","React","React"]}
|
package/dist/tabs/index.js
CHANGED
@@ -39,7 +39,7 @@ __export(tabs_exports, {
|
|
39
39
|
module.exports = __toCommonJS(tabs_exports);
|
40
40
|
|
41
41
|
// elements/tabs/Tabs.tsx
|
42
|
-
var
|
42
|
+
var React11 = __toESM(require("react"));
|
43
43
|
|
44
44
|
// hooks/useIsomorphicEffect.ts
|
45
45
|
var import_react = require("react");
|
@@ -122,8 +122,8 @@ var useMeasureDirty = (ref) => {
|
|
122
122
|
return rect;
|
123
123
|
};
|
124
124
|
|
125
|
-
// hooks/
|
126
|
-
var import_react16 =
|
125
|
+
// hooks/useClickOutside.ts
|
126
|
+
var import_react16 = require("react");
|
127
127
|
|
128
128
|
// elements/tabs/Tabs.tsx
|
129
129
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"));
|
@@ -220,7 +220,7 @@ var Chip = import_react17.default.forwardRef(
|
|
220
220
|
);
|
221
221
|
|
222
222
|
// elements/floatBox/FloatBox.tsx
|
223
|
-
var
|
223
|
+
var React10 = __toESM(require("react"));
|
224
224
|
var FloatBox = ({
|
225
225
|
className,
|
226
226
|
open,
|
@@ -258,7 +258,7 @@ var FloatBox = ({
|
|
258
258
|
right: "hawa-arrow-default-left",
|
259
259
|
left: "hawa-arrow-default-right"
|
260
260
|
};
|
261
|
-
return /* @__PURE__ */
|
261
|
+
return /* @__PURE__ */ React10.createElement(
|
262
262
|
"div",
|
263
263
|
{
|
264
264
|
className: cn(
|
@@ -269,8 +269,8 @@ var FloatBox = ({
|
|
269
269
|
"data-side": side,
|
270
270
|
"data-floatbox-state": open ? "open" : "closed"
|
271
271
|
},
|
272
|
-
withArrow && /* @__PURE__ */
|
273
|
-
/* @__PURE__ */
|
272
|
+
withArrow && /* @__PURE__ */ React10.createElement("div", { className: cn(arrowDirection[side]) }),
|
273
|
+
/* @__PURE__ */ React10.createElement("span", null, props.children)
|
274
274
|
);
|
275
275
|
};
|
276
276
|
|
@@ -333,8 +333,8 @@ var tabsTriggerVariant = (0, import_tailwind_variants.tv)({
|
|
333
333
|
],
|
334
334
|
defaultVariants: { variant: "default", orientation: "horizontal" }
|
335
335
|
});
|
336
|
-
var TabsContext =
|
337
|
-
var Tabs =
|
336
|
+
var TabsContext = React11.createContext({ orientation: "horizontal", variant: "default" });
|
337
|
+
var Tabs = React11.forwardRef(({ className, orientation, variant = "default", ...props }, ref) => /* @__PURE__ */ React11.createElement(
|
338
338
|
TabsPrimitive.Root,
|
339
339
|
{
|
340
340
|
ref,
|
@@ -345,11 +345,11 @@ var Tabs = React12.forwardRef(({ className, orientation, variant = "default", ..
|
|
345
345
|
),
|
346
346
|
...props
|
347
347
|
},
|
348
|
-
/* @__PURE__ */
|
348
|
+
/* @__PURE__ */ React11.createElement(TabsContext.Provider, { value: { orientation, variant } }, props.children)
|
349
349
|
));
|
350
|
-
var TabsList =
|
351
|
-
const { orientation, variant } =
|
352
|
-
return /* @__PURE__ */
|
350
|
+
var TabsList = React11.forwardRef(({ className, ...props }, ref) => {
|
351
|
+
const { orientation, variant } = React11.useContext(TabsContext);
|
352
|
+
return /* @__PURE__ */ React11.createElement(
|
353
353
|
TabsPrimitive.List,
|
354
354
|
{
|
355
355
|
ref,
|
@@ -362,11 +362,11 @@ var TabsList = React12.forwardRef(({ className, ...props }, ref) => {
|
|
362
362
|
}
|
363
363
|
);
|
364
364
|
});
|
365
|
-
var TabsTrigger =
|
366
|
-
const { orientation, variant } =
|
367
|
-
const tabTriggerRef =
|
365
|
+
var TabsTrigger = React11.forwardRef(({ className, chipProps, ...props }, ref) => {
|
366
|
+
const { orientation, variant } = React11.useContext(TabsContext);
|
367
|
+
const tabTriggerRef = React11.useRef(null);
|
368
368
|
const { width } = useMeasureDirty(tabTriggerRef);
|
369
|
-
return /* @__PURE__ */
|
369
|
+
return /* @__PURE__ */ React11.createElement(
|
370
370
|
TabsPrimitive.Trigger,
|
371
371
|
{
|
372
372
|
ref: tabTriggerRef,
|
@@ -378,8 +378,8 @@ var TabsTrigger = React12.forwardRef(({ className, chipProps, ...props }, ref) =
|
|
378
378
|
...props
|
379
379
|
},
|
380
380
|
props.children,
|
381
|
-
chipProps && /* @__PURE__ */
|
382
|
-
/* @__PURE__ */
|
381
|
+
chipProps && /* @__PURE__ */ React11.createElement(Chip, { ...chipProps }),
|
382
|
+
/* @__PURE__ */ React11.createElement(
|
383
383
|
FloatBox,
|
384
384
|
{
|
385
385
|
withArrow: true,
|
@@ -392,7 +392,7 @@ var TabsTrigger = React12.forwardRef(({ className, chipProps, ...props }, ref) =
|
|
392
392
|
)
|
393
393
|
);
|
394
394
|
});
|
395
|
-
var TabsContent =
|
395
|
+
var TabsContent = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React11.createElement(
|
396
396
|
TabsPrimitive.Content,
|
397
397
|
{
|
398
398
|
ref,
|