@sikka/hawa 0.45.0-next → 0.46.0-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/blocks/auth/index.js +14 -13
- package/dist/blocks/auth/index.mjs +14 -14
- package/dist/blocks/feedback/index.js +3 -1
- package/dist/blocks/feedback/index.mjs +2 -2
- package/dist/blocks/index.js +16 -14
- package/dist/blocks/index.mjs +1 -1
- package/dist/blocks/misc/index.js +1 -0
- package/dist/blocks/misc/index.mjs +1 -1
- package/dist/blocks/pricing/index.js +2 -1
- package/dist/blocks/pricing/index.mjs +1 -1
- package/dist/{chunk-LMYT23CT.mjs → chunk-D3B3MKLS.mjs} +1 -0
- package/dist/{chunk-QMNXTGM4.mjs → chunk-IEB2ANWU.mjs} +16 -14
- package/dist/{chunk-OE6XZ6LW.mjs → chunk-YABFWOF3.mjs} +2 -1
- package/dist/elements/index.js +16 -14
- package/dist/elements/index.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +16 -14
- package/dist/index.mjs +16 -14
- package/dist/interfaceSettings/index.js +2 -1
- package/dist/interfaceSettings/index.js.map +1 -1
- package/dist/interfaceSettings/index.mjs +2 -1
- package/dist/interfaceSettings/index.mjs.map +1 -1
- package/dist/phoneInput/index.js +1 -0
- package/dist/phoneInput/index.js.map +1 -1
- package/dist/phoneInput/index.mjs +1 -0
- package/dist/phoneInput/index.mjs.map +1 -1
- package/dist/pinInput/index.js +13 -13
- package/dist/pinInput/index.js.map +1 -1
- package/dist/pinInput/index.mjs +13 -13
- package/dist/pinInput/index.mjs.map +1 -1
- package/dist/radio/index.js +2 -1
- package/dist/radio/index.js.map +1 -1
- package/dist/radio/index.mjs +2 -1
- package/dist/radio/index.mjs.map +1 -1
- package/dist/select/index.js +1 -0
- package/dist/select/index.js.map +1 -1
- package/dist/select/index.mjs +1 -0
- package/dist/select/index.mjs.map +1 -1
- package/package.json +6 -6
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../elements/interfaceSettings/InterfaceSettings.tsx","../../util/index.ts","../../elements/radio/Radio.tsx","../../elements/helperText/HelperText.tsx","../../elements/label/Label.tsx","../../elements/tooltip/Tooltip.tsx","../../elements/popover/Popover.tsx"],"sourcesContent":["import React, { FC, useState } from \"react\";\n\nimport { cn } from \"@util/index\";\n\nimport { OrientationType } from \"@_types/commonTypes\";\n\nimport { Radio } from \"../radio/Radio\";\n\ntype TypographyTypes = {\n /** Function to handle language change. */\n handleLanguage?: (e: any) => void;\n /** Current selected language. */\n currentLanguage?: string;\n /** Function to handle theme color mode change. */\n handleColorMode?: (e: any) => void;\n /** Current selected theme color mode. */\n currentColorMode?: \"light\" | \"dark\";\n orientation?: OrientationType;\n width?: \"default\" | \"full\";\n};\nexport const InterfaceSettings: FC<TypographyTypes> = ({\n orientation = \"horizontal\",\n width = \"default\",\n handleColorMode,\n handleLanguage,\n ...props\n}) => {\n const [color, setColor] = useState(props.currentColorMode);\n const [language, setLanguage] = useState(props.currentLanguage);\n let orientationStyle = {\n horizontal: \"hawa-flex hawa-flex-row hawa-justify-between\",\n vertical: \"hawa-flex hawa-flex-col hawa-items-center hawa-gap-2\",\n };\n return (\n <div className={cn(orientationStyle[orientation])}>\n <Radio\n name=\"language\"\n width={width}\n defaultValue={language}\n onChange={(e: any) => {\n if (handleLanguage) {\n handleLanguage(e);\n }\n setLanguage(e);\n }}\n design=\"tabs\"\n options={[\n { value: \"ar\", label: \"عربي\" },\n { value: \"en\", label: \"English\" },\n ]}\n />\n <Radio\n name=\"theme\"\n width={width}\n defaultValue={color}\n onChange={(e: any) => {\n if (handleColorMode) {\n handleColorMode(e);\n }\n setColor(e);\n }}\n design=\"tabs\"\n options={[\n {\n value: \"light\",\n label: (\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"hawa-h-[1.2rem] hawa-w-[1.2rem] hawa-rotate-0 hawa-scale-100 hawa-transition-all dark:hawa--rotate-90\"\n >\n <path\n d=\"M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z\"\n fill=\"currentColor\"\n ></path>\n </svg>\n ),\n },\n {\n value: \"dark\",\n label: (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n className=\"hawa-h-[1.2rem] hawa-w-[1.2rem] hawa-transition-all dark:hawa-rotate-0 dark:hawa-scale-100\"\n >\n <path d=\"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z\"></path>\n </svg>\n ),\n },\n ]}\n />\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 React, { useState, FC, useRef, useEffect, forwardRef } from \"react\";\n\nimport { PopoverContentProps } from \"@radix-ui/react-popover\";\nimport { TabsList, TabsTrigger, Tabs } from \"@radix-ui/react-tabs\";\nimport { cn } from \"@util/index\";\n\nimport { DirectionType, OrientationType } from \"../../types/commonTypes\";\nimport { HelperText } from \"../helperText\";\nimport { Label, LabelProps } from \"../label/Label\";\nimport { PopoverContent, PopoverRoot, PopoverTrigger } from \"../popover\";\n\nexport type RadioOptionsTypes = {\n value: any;\n label: any;\n disabled?: any;\n sublabel?: any;\n icon?: any;\n tooltip?: string;\n tooltipContentProps?: PopoverContentProps;\n};\n\ntype RadioTypes = {\n /** Required to enable selection and differentiate between different Radio instances. */\n name: string;\n disabled?: boolean;\n orientation?: OrientationType;\n design?: \"default\" | \"tabs\" | \"cards\" | \"bordered\";\n width?: \"default\" | \"full\" | \"none\";\n size?: \"default\" | \"lg\" | \"sm\" | \"xs\";\n options: RadioOptionsTypes[];\n onChange?: any;\n defaultValue?: any;\n value?: any;\n direction?: DirectionType;\n helperText?: any;\n labelProps?: LabelProps;\n label?: string;\n tabsContainerClassName?: string;\n forceHideHelperText?: boolean;\n containerClassNames?: {\n bordered?: string;\n tabs?: string;\n cards?: string;\n default?: string;\n };\n};\n\nexport const Radio = forwardRef<HTMLInputElement, RadioTypes>(\n (\n {\n design = \"default\",\n width = \"default\",\n size = \"default\",\n orientation = \"horizontal\",\n name,\n labelProps,\n tabsContainerClassName,\n forceHideHelperText = false,\n onChange,\n containerClassNames,\n ...props\n },\n ref,\n ) => {\n let activeTabStyle =\n \"hawa-inline-block hawa-w-full hawa-text-primary-foreground hawa-bg-primary hawa-active dark:hawa-bg-primary\";\n let inactiveTabStyle = `hawa-inline-block hawa-w-full hawa-transition-all hawa-bg-primary-foreground dark:hover:hawa-text-white\n ${props.disabled ? \"\" : \"hover:hawa-bg-muted\"}`;\n let orientationStyle = {\n horizontal: \"hawa-flex hawa-flex-row\",\n vertical: \"hawa-flex hawa-flex-col\",\n };\n\n let tabSizeStyle = {\n default: \"hawa-py-2 hawa-px-4 hawa-text-sm\",\n lg: \"hawa-py-2 hawa-px-4\",\n sm: \"hawa-p-1.5 hawa-text-xs\",\n xs: \"hawa-p-1 hawa-text-[10px]\",\n };\n let widthStyle = {\n none: \"\",\n default: \"hawa-max-w-fit\",\n full: \"hawa-w-full\",\n };\n const [parentDirection, setParentDirection] = React.useState<string | null>(\n null,\n );\n const [selectedOption, setSelectedOption] = useState(\n props.defaultValue || props.value,\n );\n const [openTooltip, setOpenTooltip] = useState<number | null>(null);\n\n const parentRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const parentNode = parentRef.current?.parentNode as HTMLElement | null;\n if (parentNode) {\n const dir = window.getComputedStyle(parentNode).direction;\n setParentDirection(dir);\n }\n });\n\n const handleChange = (opt: RadioOptionsTypes) => {\n setSelectedOption(opt.value);\n if (onChange) {\n // use the more generic onChange prop\n onChange(opt.value); // You can pass the entire option or just the value\n } else {\n console.log(\"onChange was not provided\");\n }\n };\n\n const radio_option_tabs_styling = [\n \"hawa-w-full hawa-last hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 \",\n !props.disabled && \"hawa-cursor-pointer\",\n orientation === \"horizontal\" &&\n parentDirection === \"ltr\" &&\n \"hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r\",\n orientation === \"horizontal\" &&\n parentDirection === \"rtl\" &&\n \"hawa-rounded-none first:hawa-rounded-r last:hawa-rounded-l\",\n orientation === \"vertical\" &&\n \"hawa-rounded-none first:hawa-rounded-t last:hawa-rounded-b\",\n tabSizeStyle[size],\n ];\n\n switch (design) {\n case \"tabs\":\n return (\n <div\n className={cn(\n \"hawa-gap-2 hawa-flex hawa-flex-col\",\n containerClassNames?.tabs,\n )}\n >\n {props.label && <Label {...labelProps}>{props.label}</Label>}\n <Tabs>\n <TabsList\n role=\"tablist\"\n ref={parentRef}\n className={cn(\n props.options && props.options?.length > 2\n ? \"hawa-flex-wrap xs:hawa-max-w-full xs:hawa-flex-nowrap\"\n : \"\",\n \"hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]\",\n orientationStyle[orientation],\n widthStyle[width],\n tabsContainerClassName,\n )}\n >\n {props.options?.map((opt, o) => {\n return opt.tooltip ? (\n <PopoverRoot\n key={o}\n open={o === openTooltip}\n onOpenChange={(bool) => setOpenTooltip(bool ? o : null)}\n >\n <PopoverTrigger\n onMouseEnter={() => setOpenTooltip(o)}\n onMouseLeave={() => setOpenTooltip(null)}\n asChild\n >\n <TabsTrigger\n aria-current={\n selectedOption === opt.value ? \"page\" : undefined\n }\n value={opt.value}\n role=\"tab\"\n tabIndex={0}\n onClick={() => {\n if (props.disabled || opt.disabled) return;\n handleChange(opt);\n }}\n className={cn(\n ...radio_option_tabs_styling,\n selectedOption === opt.value\n ? activeTabStyle\n : inactiveTabStyle,\n )}\n >\n {opt.icon && opt.icon}\n {opt.label}\n </TabsTrigger>\n </PopoverTrigger>\n <PopoverContent {...opt.tooltipContentProps}>\n {opt.tooltip}\n </PopoverContent>\n </PopoverRoot>\n ) : (\n <TabsTrigger\n key={o}\n role=\"tab\"\n tabIndex={0}\n aria-current={\n selectedOption === opt.value ? \"page\" : undefined\n }\n onClick={() => {\n if (props.disabled || opt.disabled) return;\n handleChange(opt);\n }}\n className={cn(\n ...radio_option_tabs_styling,\n selectedOption === opt.value\n ? activeTabStyle\n : inactiveTabStyle,\n )}\n value={opt.value}\n >\n {opt.icon && opt.icon}\n {opt.label}\n </TabsTrigger>\n );\n })}\n </TabsList>\n </Tabs>\n {!forceHideHelperText && (\n <HelperText helperText={props.helperText} />\n )}\n </div>\n );\n case \"bordered\":\n return (\n <div\n className={cn(\n orientationStyle[orientation],\n \"hawa-gap-4\",\n containerClassNames?.bordered,\n )}\n >\n {props.options &&\n props.options.map((opt, i) => (\n <div key={i} className=\"hawa-w-full hawa-rounded hawa-border\">\n <div\n className={cn(\n \"radio-item radio-item-bordered hawa-flex hawa-items-center hawa-transition-all\",\n props.direction === \"rtl\"\n ? \"margin-left right-19px\"\n : \"margin-right left-23px\",\n )}\n key={i + 1}\n >\n <input\n disabled={opt.disabled}\n id={opt.value.toString()}\n type=\"radio\"\n value={opt.value}\n name={name}\n onChange={() => handleChange(opt)}\n />\n <label\n htmlFor={opt.value.toString()}\n className={cn(\n \"hawa-ml-2 hawa-w-full hawa-select-none hawa-p-4 hawa-pl-3 hawa-text-sm hawa-font-medium hawa-text-black dark:hawa-text-white\",\n opt.disabled\n ? \"hawa-opacity-50\"\n : \"hawa-cursor-pointer hawa-text-gray-900\",\n )}\n >\n {opt.label}\n </label>\n </div>\n </div>\n ))}\n </div>\n );\n case \"cards\":\n return (\n <ul\n className={cn(\n orientationStyle[orientation],\n \"hawa-gap-4\",\n containerClassNames?.cards,\n )}\n >\n {props.options?.map((opt: any, o) => (\n <li key={o} onClick={() => handleChange(opt)}>\n <input\n type=\"radio\"\n id={opt.value.toString()}\n name={name}\n value={opt.value.toString()}\n className=\"hawa-peer hawa-hidden\"\n required\n disabled={opt.disabled}\n />\n <label\n htmlFor={opt.value.toString()}\n className={cn(\n \"hawa-inline-flex hawa-h-full hawa-w-full hawa-transition-all hawa-items-center hawa-justify-between hawa-rounded-lg hawa-border hawa-border-foreground/10 hawa-bg-background hawa-p-5 hawa-text-gray-500 peer-checked:hawa-border-primary peer-checked:hawa-text-primary dark:hawa-border-foreground/10 dark:hawa-bg-foreground/5 dark:hawa-text-gray-400 dark:peer-checked:hawa-text-primary\",\n opt.disabled\n ? \"hawa-opacity-50\"\n : \"hawa-cursor-pointer hover:hawa-bg-foreground/10 hover:hawa-text-gray-600 dark:hover:hawa-bg-foreground/20 dark:hover:hawa-text-gray-300\",\n )}\n >\n <div className=\"hawa-block hawa-h-full hawa-w-full\">\n <div className=\"hawa-w-full hawa-text-lg hawa-font-semibold\">\n {opt.label}\n </div>\n <div className=\"hawa-w-full\">{opt.sublabel}</div>\n </div>\n </label>\n </li>\n ))}\n </ul>\n );\n\n default:\n return (\n <div\n className={cn(\n \"hawa-flex hawa-flex-col hawa-gap-2\",\n containerClassNames?.default,\n )}\n >\n {props.label && <Label {...labelProps}>{props.label}</Label>}\n <div className={cn(orientationStyle[orientation], \"hawa-gap-2\")}>\n {props.options &&\n props.options.map((opt, i) => (\n <div\n className={cn(\n \"radio-item radio-item-default hawa-flex hawa-items-center hawa-transition-all\",\n props.direction === \"rtl\"\n ? \"margin-left right-3px\"\n : \"margin-right left-3px\",\n )}\n key={i + 1}\n >\n <input\n // TODO: spread the usual radio props\n disabled={opt.disabled}\n id={opt.value.toString()}\n type=\"radio\"\n value={opt.value}\n name={name}\n onChange={() => handleChange(opt)}\n />\n <label\n htmlFor={opt.value.toString()}\n className={cn(\n \"hawa-text-sm hawa-font-medium dark:hawa-text-white\",\n opt.disabled\n ? \"hawa-text-gray-400\"\n : \"hawa-cursor-pointer hawa-text-gray-900\",\n )}\n >\n {opt.label}\n </label>\n </div>\n ))}\n </div>\n <HelperText helperText={props.helperText} />\n </div>\n );\n }\n },\n);\n","import React from \"react\";\n\nimport { cn } from \"@util/index\";\n\nexport const HelperText = ({\n helperText,\n}: {\n helperText?: string | React.ReactNode;\n}) => (\n <p\n className={cn(\n \"hawa-my-0 hawa-text-start hawa-text-helper-color hawa-transition-all hawa-text-xs\",\n helperText ? \"hawa-opacity-100 hawa-h-4\" : \"hawa-h-0 hawa-opacity-0\",\n )}\n >\n {helperText}\n </p>\n);\n","import * as React from \"react\";\n\nimport { cn } from \"@util/index\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\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.TooltipProps;\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 * 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,UAAa,YAAAC,iBAAgB;;;ACApC,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACLA,OAAOC,UAAS,UAAc,QAAQ,WAAW,cAAAC,mBAAkB;AAGnE,SAAS,UAAU,aAAa,YAAY;;;ACH5C,OAAO,WAAW;AAIX,IAAM,aAAa,CAAC;AAAA,EACzB;AACF,MAGE;AAAA,EAAC;AAAA;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA,aAAa,8BAA8B;AAAA,IAC7C;AAAA;AAAA,EAEC;AACH;;;AChBF,YAAYC,YAAW;;;ACAvB,OAAOC,YAAW;AAElB,YAAY,sBAAsB;AAKlC,IAAM,iBAAiBC,OAAM,WAK3B,CAAC,EAAE,WAAW,aAAa,GAAG,OAAO,WAAW,GAAG,MAAM,GAAG,QAC5D,gBAAAA,OAAA;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,QACE,gBAAgB,SAAS;AAAA,QACzB,gBAAgB,SAAS;AAAA,MAC3B;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,eAAe,cAA+B,yBAAQ;AAEtD,IAAM,eAAeA,OAAM,WAGzB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,gBAAAA,OAAA,cAAkB,wBAAjB,EAAuB,KAAU,WAAW,GAAG,SAAS,GAAI,GAAG,OAAO,CACxE;AACD,aAAa,cAA+B,uBAAM;AA0BlD,IAAM,UAAiD,CAAC;AAAA,EACtD;AAAA,E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AACpB,YAAI,iBAAiB;AACnB,0BAAgB,CAAC;AAAA,QACnB;AACA,iBAAS,CAAC;AAAA,MACZ;AAAA,MACA,QAAO;AAAA,MACP,SAAS;AAAA,QACP;AAAA,UACE,OAAO;AAAA,UACP,OACE,gBAAAA,OAAA;AAAA,YAAC;AAAA;AAAA,cACC,OAAM;AAAA,cACN,QAAO;AAAA,cACP,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,OAAM;AAAA,cACN,WAAU;AAAA;AAAA,YAEV,gBAAAA,OAAA;AAAA,cAAC;AAAA;AAAA,gBACC,GAAE;AAAA,gBACF,MAAK;AAAA;AAAA,YACN;AAAA,UACH;AAAA,QAEJ;AAAA,QACA;AAAA,UACE,OAAO;AAAA,UACP,OACE,gBAAAA,OAAA;AAAA,YAAC;AAAA;AAAA,cACC,OAAM;AAAA,cACN,OAAM;AAAA,cACN,QAAO;AAAA,cACP,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,QAAO;AAAA,cACP,WAAU;AAAA;AAAA,YAEV,gBAAAA,OAAA,cAAC,UAAK,GAAE,sCAAqC;AAAA,UAC/C;AAAA,QAEJ;AAAA,MACF;AAAA;AAAA,EACF,CACF;AAEJ;","names":["React","useState","React","forwardRef","React","React","React","React","forwardRef","React","_a","useState","React"]}
|
1
|
+
{"version":3,"sources":["../../elements/interfaceSettings/InterfaceSettings.tsx","../../util/index.ts","../../elements/radio/Radio.tsx","../../elements/helperText/HelperText.tsx","../../elements/label/Label.tsx","../../elements/tooltip/Tooltip.tsx","../../elements/popover/Popover.tsx"],"sourcesContent":["import React, { FC, useState } from \"react\";\n\nimport { cn } from \"@util/index\";\n\nimport { OrientationType } from \"@_types/commonTypes\";\n\nimport { Radio } from \"../radio/Radio\";\n\ntype TypographyTypes = {\n /** Function to handle language change. */\n handleLanguage?: (e: any) => void;\n /** Current selected language. */\n currentLanguage?: string;\n /** Function to handle theme color mode change. */\n handleColorMode?: (e: any) => void;\n /** Current selected theme color mode. */\n currentColorMode?: \"light\" | \"dark\";\n orientation?: OrientationType;\n width?: \"default\" | \"full\";\n};\nexport const InterfaceSettings: FC<TypographyTypes> = ({\n orientation = \"horizontal\",\n width = \"default\",\n handleColorMode,\n handleLanguage,\n ...props\n}) => {\n const [color, setColor] = useState(props.currentColorMode);\n const [language, setLanguage] = useState(props.currentLanguage);\n let orientationStyle = {\n horizontal: \"hawa-flex hawa-flex-row hawa-justify-between\",\n vertical: \"hawa-flex hawa-flex-col hawa-items-center hawa-gap-2\",\n };\n return (\n <div className={cn(orientationStyle[orientation])}>\n <Radio\n name=\"language\"\n width={width}\n defaultValue={language}\n onChange={(e: any) => {\n if (handleLanguage) {\n handleLanguage(e);\n }\n setLanguage(e);\n }}\n design=\"tabs\"\n options={[\n { value: \"ar\", label: \"عربي\" },\n { value: \"en\", label: \"English\" },\n ]}\n />\n <Radio\n name=\"theme\"\n width={width}\n defaultValue={color}\n onChange={(e: any) => {\n if (handleColorMode) {\n handleColorMode(e);\n }\n setColor(e);\n }}\n design=\"tabs\"\n options={[\n {\n value: \"light\",\n label: (\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"hawa-h-[1.2rem] hawa-w-[1.2rem] hawa-rotate-0 hawa-scale-100 hawa-transition-all dark:hawa--rotate-90\"\n >\n <path\n d=\"M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z\"\n fill=\"currentColor\"\n ></path>\n </svg>\n ),\n },\n {\n value: \"dark\",\n label: (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n className=\"hawa-h-[1.2rem] hawa-w-[1.2rem] hawa-transition-all dark:hawa-rotate-0 dark:hawa-scale-100\"\n >\n <path d=\"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z\"></path>\n </svg>\n ),\n },\n ]}\n />\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 React, { useState, FC, useRef, useEffect, forwardRef } from \"react\";\n\nimport { PopoverContentProps } from \"@radix-ui/react-popover\";\nimport { TabsList, TabsTrigger, Tabs } from \"@radix-ui/react-tabs\";\nimport { cn } from \"@util/index\";\n\nimport { DirectionType, OrientationType } from \"../../types/commonTypes\";\nimport { HelperText } from \"../helperText\";\nimport { Label, LabelProps } from \"../label/Label\";\nimport { PopoverContent, PopoverRoot, PopoverTrigger } from \"../popover\";\n\nexport type RadioOptionsTypes = {\n value: any;\n label: any;\n disabled?: any;\n sublabel?: any;\n icon?: any;\n tooltip?: string;\n tooltipContentProps?: PopoverContentProps;\n};\n\ntype RadioTypes = {\n /** Required to enable selection and differentiate between different Radio instances. */\n name: string;\n disabled?: boolean;\n orientation?: OrientationType;\n design?: \"default\" | \"tabs\" | \"cards\" | \"bordered\";\n width?: \"default\" | \"full\" | \"none\";\n size?: \"default\" | \"lg\" | \"sm\" | \"xs\";\n options: RadioOptionsTypes[];\n onChange?: any;\n defaultValue?: any;\n value?: any;\n direction?: DirectionType;\n helperText?: any;\n labelProps?: LabelProps;\n label?: string;\n tabsContainerClassName?: string;\n forceHideHelperText?: boolean;\n containerClassNames?: {\n bordered?: string;\n tabs?: string;\n cards?: string;\n default?: string;\n };\n};\n\nexport const Radio = forwardRef<HTMLInputElement, RadioTypes>(\n (\n {\n design = \"default\",\n width = \"default\",\n size = \"default\",\n orientation = \"horizontal\",\n name,\n labelProps,\n tabsContainerClassName,\n forceHideHelperText = false,\n onChange,\n containerClassNames,\n ...props\n },\n ref,\n ) => {\n let activeTabStyle =\n \"hawa-inline-block hawa-w-full hawa-text-primary-foreground hawa-bg-primary hawa-active dark:hawa-bg-primary\";\n let inactiveTabStyle = `hawa-inline-block hawa-w-full hawa-transition-all hawa-bg-primary-foreground dark:hover:hawa-text-white\n ${props.disabled ? \"\" : \"hover:hawa-bg-muted\"}`;\n let orientationStyle = {\n horizontal: \"hawa-flex hawa-flex-row\",\n vertical: \"hawa-flex hawa-flex-col\",\n };\n\n let tabSizeStyle = {\n default: \"hawa-py-2 hawa-px-4 hawa-text-sm\",\n lg: \"hawa-py-2 hawa-px-4\",\n sm: \"hawa-p-1.5 hawa-text-xs\",\n xs: \"hawa-p-1 hawa-text-[10px]\",\n };\n let widthStyle = {\n none: \"\",\n default: \"hawa-max-w-fit\",\n full: \"hawa-w-full\",\n };\n const [parentDirection, setParentDirection] = React.useState<string | null>(\n null,\n );\n const [selectedOption, setSelectedOption] = useState(\n props.defaultValue || props.value,\n );\n const [openTooltip, setOpenTooltip] = useState<number | null>(null);\n\n const parentRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const parentNode = parentRef.current?.parentNode as HTMLElement | null;\n if (parentNode) {\n const dir = window.getComputedStyle(parentNode).direction;\n setParentDirection(dir);\n }\n });\n\n const handleChange = (opt: RadioOptionsTypes) => {\n setSelectedOption(opt.value);\n if (onChange) {\n // use the more generic onChange prop\n onChange(opt.value); // You can pass the entire option or just the value\n } else {\n console.log(\"onChange was not provided\");\n }\n };\n\n const radio_option_tabs_styling = [\n \"hawa-w-full hawa-last hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 \",\n !props.disabled && \"hawa-cursor-pointer\",\n orientation === \"horizontal\" &&\n parentDirection === \"ltr\" &&\n \"hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r\",\n orientation === \"horizontal\" &&\n parentDirection === \"rtl\" &&\n \"hawa-rounded-none first:hawa-rounded-r last:hawa-rounded-l\",\n orientation === \"vertical\" &&\n \"hawa-rounded-none first:hawa-rounded-t last:hawa-rounded-b\",\n tabSizeStyle[size],\n ];\n\n switch (design) {\n case \"tabs\":\n return (\n <div\n className={cn(\n \"hawa-gap-2 hawa-flex hawa-flex-col\",\n containerClassNames?.tabs,\n )}\n >\n {props.label && <Label {...labelProps}>{props.label}</Label>}\n <Tabs>\n <TabsList\n role=\"tablist\"\n ref={parentRef}\n className={cn(\n props.options && props.options?.length > 2\n ? \"hawa-flex-wrap xs:hawa-max-w-full xs:hawa-flex-nowrap\"\n : \"\",\n \"hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]\",\n orientationStyle[orientation],\n widthStyle[width],\n tabsContainerClassName,\n props.direction === \"rtl\" ? \"hawa-flex-row-reverse\" : \"\",\n )}\n >\n {props.options?.map((opt, o) => {\n return opt.tooltip ? (\n <PopoverRoot\n key={o}\n open={o === openTooltip}\n onOpenChange={(bool) => setOpenTooltip(bool ? o : null)}\n >\n <PopoverTrigger\n onMouseEnter={() => setOpenTooltip(o)}\n onMouseLeave={() => setOpenTooltip(null)}\n asChild\n >\n <TabsTrigger\n aria-current={\n selectedOption === opt.value ? \"page\" : undefined\n }\n value={opt.value}\n role=\"tab\"\n tabIndex={0}\n onClick={() => {\n if (props.disabled || opt.disabled) return;\n handleChange(opt);\n }}\n className={cn(\n ...radio_option_tabs_styling,\n selectedOption === opt.value\n ? activeTabStyle\n : inactiveTabStyle,\n )}\n >\n {opt.icon && opt.icon}\n {opt.label}\n </TabsTrigger>\n </PopoverTrigger>\n <PopoverContent {...opt.tooltipContentProps}>\n {opt.tooltip}\n </PopoverContent>\n </PopoverRoot>\n ) : (\n <TabsTrigger\n key={o}\n role=\"tab\"\n tabIndex={0}\n aria-current={\n selectedOption === opt.value ? \"page\" : undefined\n }\n onClick={() => {\n if (props.disabled || opt.disabled) return;\n handleChange(opt);\n }}\n className={cn(\n ...radio_option_tabs_styling,\n selectedOption === opt.value\n ? activeTabStyle\n : inactiveTabStyle,\n )}\n value={opt.value}\n >\n {opt.icon && opt.icon}\n {opt.label}\n </TabsTrigger>\n );\n })}\n </TabsList>\n </Tabs>\n {!forceHideHelperText && (\n <HelperText helperText={props.helperText} />\n )}\n </div>\n );\n case \"bordered\":\n return (\n <div\n className={cn(\n orientationStyle[orientation],\n \"hawa-gap-4\",\n containerClassNames?.bordered,\n )}\n >\n {props.options &&\n props.options.map((opt, i) => (\n <div key={i} className=\"hawa-w-full hawa-rounded hawa-border\">\n <div\n className={cn(\n \"radio-item radio-item-bordered hawa-flex hawa-items-center hawa-transition-all\",\n props.direction === \"rtl\"\n ? \"margin-left right-19px\"\n : \"margin-right left-23px\",\n )}\n key={i + 1}\n >\n <input\n disabled={opt.disabled}\n id={opt.value.toString()}\n type=\"radio\"\n value={opt.value}\n name={name}\n onChange={() => handleChange(opt)}\n />\n <label\n htmlFor={opt.value.toString()}\n className={cn(\n \"hawa-ml-2 hawa-w-full hawa-select-none hawa-p-4 hawa-pl-3 hawa-text-sm hawa-font-medium hawa-text-black dark:hawa-text-white\",\n opt.disabled\n ? \"hawa-opacity-50\"\n : \"hawa-cursor-pointer hawa-text-gray-900\",\n )}\n >\n {opt.label}\n </label>\n </div>\n </div>\n ))}\n </div>\n );\n case \"cards\":\n return (\n <ul\n className={cn(\n orientationStyle[orientation],\n \"hawa-gap-4\",\n containerClassNames?.cards,\n )}\n >\n {props.options?.map((opt: any, o) => (\n <li key={o} onClick={() => handleChange(opt)}>\n <input\n type=\"radio\"\n id={opt.value.toString()}\n name={name}\n value={opt.value.toString()}\n className=\"hawa-peer hawa-hidden\"\n required\n disabled={opt.disabled}\n />\n <label\n htmlFor={opt.value.toString()}\n className={cn(\n \"hawa-inline-flex hawa-h-full hawa-w-full hawa-transition-all hawa-items-center hawa-justify-between hawa-rounded-lg hawa-border hawa-border-foreground/10 hawa-bg-background hawa-p-5 hawa-text-gray-500 peer-checked:hawa-border-primary peer-checked:hawa-text-primary dark:hawa-border-foreground/10 dark:hawa-bg-foreground/5 dark:hawa-text-gray-400 dark:peer-checked:hawa-text-primary\",\n opt.disabled\n ? \"hawa-opacity-50\"\n : \"hawa-cursor-pointer hover:hawa-bg-foreground/10 hover:hawa-text-gray-600 dark:hover:hawa-bg-foreground/20 dark:hover:hawa-text-gray-300\",\n )}\n >\n <div className=\"hawa-block hawa-h-full hawa-w-full\">\n <div className=\"hawa-w-full hawa-text-lg hawa-font-semibold\">\n {opt.label}\n </div>\n <div className=\"hawa-w-full\">{opt.sublabel}</div>\n </div>\n </label>\n </li>\n ))}\n </ul>\n );\n\n default:\n return (\n <div\n className={cn(\n \"hawa-flex hawa-flex-col hawa-gap-2\",\n containerClassNames?.default,\n )}\n >\n {props.label && <Label {...labelProps}>{props.label}</Label>}\n <div className={cn(orientationStyle[orientation], \"hawa-gap-2\")}>\n {props.options &&\n props.options.map((opt, i) => (\n <div\n className={cn(\n \"radio-item radio-item-default hawa-flex hawa-items-center hawa-transition-all\",\n props.direction === \"rtl\"\n ? \"margin-left right-3px\"\n : \"margin-right left-3px\",\n )}\n key={i + 1}\n >\n <input\n // TODO: spread the usual radio props\n disabled={opt.disabled}\n id={opt.value.toString()}\n type=\"radio\"\n value={opt.value}\n name={name}\n onChange={() => handleChange(opt)}\n />\n <label\n htmlFor={opt.value.toString()}\n className={cn(\n \"hawa-text-sm hawa-font-medium dark:hawa-text-white\",\n opt.disabled\n ? \"hawa-text-gray-400\"\n : \"hawa-cursor-pointer hawa-text-gray-900\",\n )}\n >\n {opt.label}\n </label>\n </div>\n ))}\n </div>\n <HelperText helperText={props.helperText} />\n </div>\n );\n }\n },\n);\n","import React from \"react\";\n\nimport { cn } from \"@util/index\";\n\nexport const HelperText = ({\n helperText,\n}: {\n helperText?: string | React.ReactNode;\n}) => (\n <p\n className={cn(\n \"hawa-my-0 hawa-text-start hawa-text-helper-color hawa-transition-all hawa-text-xs\",\n helperText ? \"hawa-opacity-100 hawa-h-4\" : \"hawa-h-0 hawa-opacity-0\",\n )}\n >\n {helperText}\n </p>\n);\n","import * as React from \"react\";\n\nimport { cn } from \"@util/index\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\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.TooltipProps;\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 * 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,UAAa,YAAAC,iBAAgB;;;ACApC,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACLA,OAAOC,UAAS,UAAc,QAAQ,WAAW,cAAAC,mBAAkB;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AAC;AAAA;AAAA,gBACC,GAAE;AAAA,gBACF,MAAK;AAAA;AAAA,YACN;AAAA,UACH;AAAA,QAEJ;AAAA,QACA;AAAA,UACE,OAAO;AAAA,UACP,OACE,gBAAAA,OAAA;AAAA,YAAC;AAAA;AAAA,cACC,OAAM;AAAA,cACN,OAAM;AAAA,cACN,QAAO;AAAA,cACP,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,QAAO;AAAA,cACP,WAAU;AAAA;AAAA,YAEV,gBAAAA,OAAA,cAAC,UAAK,GAAE,sCAAqC;AAAA,UAC/C;AAAA,QAEJ;AAAA,MACF;AAAA;AAAA,EACF,CACF;AAEJ;","names":["React","useState","React","forwardRef","React","React","React","React","forwardRef","React","_a","useState","React"]}
|
package/dist/phoneInput/index.js
CHANGED
@@ -2047,6 +2047,7 @@ var Select = ({
|
|
2047
2047
|
options: props.options,
|
2048
2048
|
getOptionLabel: props.getOptionLabel,
|
2049
2049
|
defaultValue: props.defaultValue,
|
2050
|
+
value: props.value,
|
2050
2051
|
placeholder: props.placeholder,
|
2051
2052
|
isDisabled: props.disabled,
|
2052
2053
|
isClearable: props.isClearable,
|