@sikka/hawa 0.45.0-next → 0.45.1-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.
@@ -3413,6 +3413,7 @@ var Select = ({
3413
3413
  options: props.options,
3414
3414
  getOptionLabel: props.getOptionLabel,
3415
3415
  defaultValue: props.defaultValue,
3416
+ value: props.value,
3416
3417
  placeholder: props.placeholder,
3417
3418
  isDisabled: props.disabled,
3418
3419
  isClearable: props.isClearable,
@@ -7,7 +7,7 @@ import {
7
7
  } from "../../chunk-47APBDKK.mjs";
8
8
  import {
9
9
  Select
10
- } from "../../chunk-LMYT23CT.mjs";
10
+ } from "../../chunk-D3B3MKLS.mjs";
11
11
  import {
12
12
  EyeIcon,
13
13
  HiddenEyeIcon
@@ -750,7 +750,8 @@ var Radio = (0, import_react4.forwardRef)(
750
750
  "hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]",
751
751
  orientationStyle[orientation],
752
752
  widthStyle[width],
753
- tabsContainerClassName
753
+ tabsContainerClassName,
754
+ props.direction === "rtl" ? "hawa-flex-row-reverse" : ""
754
755
  )
755
756
  },
756
757
  (_b = props.options) == null ? void 0 : _b.map((opt, o) => {
@@ -1654,6 +1655,7 @@ var Select = ({
1654
1655
  options: props.options,
1655
1656
  getOptionLabel: props.getOptionLabel,
1656
1657
  defaultValue: props.defaultValue,
1658
+ value: props.value,
1657
1659
  placeholder: props.placeholder,
1658
1660
  isDisabled: props.disabled,
1659
1661
  isClearable: props.isClearable,
@@ -4,11 +4,11 @@ import {
4
4
  } from "../../chunk-FIUKVRL5.mjs";
5
5
  import {
6
6
  Select
7
- } from "../../chunk-LMYT23CT.mjs";
7
+ } from "../../chunk-D3B3MKLS.mjs";
8
8
  import {
9
9
  Popover,
10
10
  Radio
11
- } from "../../chunk-OE6XZ6LW.mjs";
11
+ } from "../../chunk-YABFWOF3.mjs";
12
12
  import {
13
13
  BadEmoji,
14
14
  GoodEmoji,
@@ -3434,6 +3434,7 @@ var Select = ({
3434
3434
  options: props.options,
3435
3435
  getOptionLabel: props.getOptionLabel,
3436
3436
  defaultValue: props.defaultValue,
3437
+ value: props.value,
3437
3438
  placeholder: props.placeholder,
3438
3439
  isDisabled: props.disabled,
3439
3440
  isClearable: props.isClearable,
@@ -5248,7 +5249,8 @@ var Radio = (0, import_react25.forwardRef)(
5248
5249
  "hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]",
5249
5250
  orientationStyle[orientation],
5250
5251
  widthStyle[width],
5251
- tabsContainerClassName
5252
+ tabsContainerClassName,
5253
+ props.direction === "rtl" ? "hawa-flex-row-reverse" : ""
5252
5254
  )
5253
5255
  },
5254
5256
  (_b = props.options) == null ? void 0 : _b.map((opt, o) => {
@@ -17,7 +17,7 @@ import {
17
17
  TabsList,
18
18
  TabsTrigger,
19
19
  Textarea
20
- } from "../chunk-QMNXTGM4.mjs";
20
+ } from "../chunk-QOVVJCFE.mjs";
21
21
  import {
22
22
  getHotkeyHandler
23
23
  } from "../chunk-WL7C2A5D.mjs";
@@ -1617,6 +1617,7 @@ var Select = ({
1617
1617
  options: props.options,
1618
1618
  getOptionLabel: props.getOptionLabel,
1619
1619
  defaultValue: props.defaultValue,
1620
+ value: props.value,
1620
1621
  placeholder: props.placeholder,
1621
1622
  isDisabled: props.disabled,
1622
1623
  isClearable: props.isClearable,
@@ -11,7 +11,7 @@ import {
11
11
  } from "../../chunk-FIUKVRL5.mjs";
12
12
  import {
13
13
  Select
14
- } from "../../chunk-LMYT23CT.mjs";
14
+ } from "../../chunk-D3B3MKLS.mjs";
15
15
  import {
16
16
  Button,
17
17
  Card,
@@ -1159,7 +1159,8 @@ var Radio = (0, import_react13.forwardRef)(
1159
1159
  "hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]",
1160
1160
  orientationStyle[orientation],
1161
1161
  widthStyle[width],
1162
- tabsContainerClassName
1162
+ tabsContainerClassName,
1163
+ props.direction === "rtl" ? "hawa-flex-row-reverse" : ""
1163
1164
  )
1164
1165
  },
1165
1166
  (_b = props.options) == null ? void 0 : _b.map((opt, o) => {
@@ -6,7 +6,7 @@ import {
6
6
  import "../../chunk-47APBDKK.mjs";
7
7
  import {
8
8
  Radio
9
- } from "../../chunk-OE6XZ6LW.mjs";
9
+ } from "../../chunk-YABFWOF3.mjs";
10
10
  import {
11
11
  CheckMark,
12
12
  UncheckMark
@@ -147,6 +147,7 @@ var Select = ({
147
147
  options: props.options,
148
148
  getOptionLabel: props.getOptionLabel,
149
149
  defaultValue: props.defaultValue,
150
+ value: props.value,
150
151
  placeholder: props.placeholder,
151
152
  isDisabled: props.disabled,
152
153
  isClearable: props.isClearable,
@@ -474,6 +474,7 @@ var Select = ({
474
474
  options: props.options,
475
475
  getOptionLabel: props.getOptionLabel,
476
476
  defaultValue: props.defaultValue,
477
+ value: props.value,
477
478
  placeholder: props.placeholder,
478
479
  isDisabled: props.disabled,
479
480
  isClearable: props.isClearable,
@@ -2716,7 +2717,8 @@ var Radio = forwardRef7(
2716
2717
  "hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]",
2717
2718
  orientationStyle[orientation],
2718
2719
  widthStyle[width],
2719
- tabsContainerClassName
2720
+ tabsContainerClassName,
2721
+ props.direction === "rtl" ? "hawa-flex-row-reverse" : ""
2720
2722
  )
2721
2723
  },
2722
2724
  (_b = props.options) == null ? void 0 : _b.map((opt, o) => {
@@ -159,7 +159,8 @@ var Radio = forwardRef2(
159
159
  "hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]",
160
160
  orientationStyle[orientation],
161
161
  widthStyle[width],
162
- tabsContainerClassName
162
+ tabsContainerClassName,
163
+ props.direction === "rtl" ? "hawa-flex-row-reverse" : ""
163
164
  )
164
165
  },
165
166
  (_b = props.options) == null ? void 0 : _b.map((opt, o) => {
@@ -3993,7 +3993,8 @@ var Radio = (0, import_react13.forwardRef)(
3993
3993
  "hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]",
3994
3994
  orientationStyle[orientation],
3995
3995
  widthStyle[width],
3996
- tabsContainerClassName
3996
+ tabsContainerClassName,
3997
+ props.direction === "rtl" ? "hawa-flex-row-reverse" : ""
3997
3998
  )
3998
3999
  },
3999
4000
  (_b = props.options) == null ? void 0 : _b.map((opt, o) => {
@@ -5379,6 +5380,7 @@ var Select = ({
5379
5380
  options: props.options,
5380
5381
  getOptionLabel: props.getOptionLabel,
5381
5382
  defaultValue: props.defaultValue,
5383
+ value: props.value,
5382
5384
  placeholder: props.placeholder,
5383
5385
  isDisabled: props.disabled,
5384
5386
  isClearable: props.isClearable,
@@ -26,7 +26,7 @@ import {
26
26
  TabsList,
27
27
  TabsTrigger,
28
28
  Textarea
29
- } from "../chunk-QMNXTGM4.mjs";
29
+ } from "../chunk-QOVVJCFE.mjs";
30
30
  import {
31
31
  useClipboard
32
32
  } from "../chunk-WL7C2A5D.mjs";
package/dist/index.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- ! tailwindcss v3.4.7 | MIT License | https://tailwindcss.com
2
+ ! tailwindcss v3.4.8 | MIT License | https://tailwindcss.com
3
3
  *//*
4
4
  1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
5
5
  2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
package/dist/index.js CHANGED
@@ -4068,7 +4068,8 @@ var Radio = (0, import_react13.forwardRef)(
4068
4068
  "hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]",
4069
4069
  orientationStyle[orientation],
4070
4070
  widthStyle[width],
4071
- tabsContainerClassName
4071
+ tabsContainerClassName,
4072
+ props.direction === "rtl" ? "hawa-flex-row-reverse" : ""
4072
4073
  )
4073
4074
  },
4074
4075
  (_b = props.options) == null ? void 0 : _b.map((opt, o) => {
@@ -5906,6 +5907,7 @@ var Select = ({
5906
5907
  options: props.options,
5907
5908
  getOptionLabel: props.getOptionLabel,
5908
5909
  defaultValue: props.defaultValue,
5910
+ value: props.value,
5909
5911
  placeholder: props.placeholder,
5910
5912
  isDisabled: props.disabled,
5911
5913
  isClearable: props.isClearable,
package/dist/index.mjs CHANGED
@@ -3824,7 +3824,8 @@ var Radio = forwardRef16(
3824
3824
  "hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]",
3825
3825
  orientationStyle[orientation],
3826
3826
  widthStyle[width],
3827
- tabsContainerClassName
3827
+ tabsContainerClassName,
3828
+ props.direction === "rtl" ? "hawa-flex-row-reverse" : ""
3828
3829
  )
3829
3830
  },
3830
3831
  (_b = props.options) == null ? void 0 : _b.map((opt, o) => {
@@ -5662,6 +5663,7 @@ var Select = ({
5662
5663
  options: props.options,
5663
5664
  getOptionLabel: props.getOptionLabel,
5664
5665
  defaultValue: props.defaultValue,
5666
+ value: props.value,
5665
5667
  placeholder: props.placeholder,
5666
5668
  isDisabled: props.disabled,
5667
5669
  isClearable: props.isClearable,
@@ -289,7 +289,8 @@ var Radio = (0, import_react3.forwardRef)(
289
289
  "hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]",
290
290
  orientationStyle[orientation],
291
291
  widthStyle[width],
292
- tabsContainerClassName
292
+ tabsContainerClassName,
293
+ props.direction === "rtl" ? "hawa-flex-row-reverse" : ""
293
294
  )
294
295
  },
295
296
  (_b = props.options) == null ? void 0 : _b.map((opt, o) => {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../elements/interfaceSettings/index.ts","../../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":["export * from \"./InterfaceSettings\";\n","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 Popover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BAAS,CAAC;AAAA,MACZ;AAAA,MACA,QAAO;AAAA,MACP,SAAS;AAAA,QACP;AAAA,UACE,OAAO;AAAA,UACP,OACE,8BAAAA,QAAA;AAAA,YAAC;AAAA;AAAA,cACC,OAAM;AAAA,cACN,QAAO;AAAA,cACP,SAAQ;AAAA,cACR,MAAK;AAAA,cACL,OAAM;AAAA,cACN,WAAU;AAAA;AAAA,YAEV,8BAAAA,QAAA;AAAA,cAAC;AAAA;AAAA,gBACC,GAAE;AAAA,gBACF,MAAK;AAAA;AAAA,YACN;AAAA,UACH;AAAA,QAEJ;AAAA,QACA;AAAA,UACE,OAAO;AAAA,UACP,OACE,8BAAAA,QAAA;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,8BAAAA,QAAA,cAAC,UAAK,GAAE,sCAAqC;AAAA,UAC/C;AAAA,QAEJ;AAAA,MACF;AAAA;AAAA,EACF,CACF;AAEJ;","names":["import_react","import_react","React","React","import_react","React","React","React","_a","React"]}
1
+ {"version":3,"sources":["../../elements/interfaceSettings/index.ts","../../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":["export * from \"./InterfaceSettings\";\n","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;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAAoC;;;ACApC,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ACLA,IAAAC,gBAAmE;AAGnE,wBAA4C;;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AAAA;AAAA,gBACC,GAAE;AAAA,gBACF,MAAK;AAAA;AAAA,YACN;AAAA,UACH;AAAA,QAEJ;AAAA,QACA;AAAA,UACE,OAAO;AAAA,UACP,OACE,8BAAAA,QAAA;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,8BAAAA,QAAA,cAAC,UAAK,GAAE,sCAAqC;AAAA,UAC/C;AAAA,QAEJ;AAAA,MACF;AAAA;AAAA,EACF,CACF;AAEJ;","names":["import_react","import_react","React","React","import_react","React","React","React","_a","React"]}
@@ -254,7 +254,8 @@ var Radio = forwardRef3(
254
254
  "hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]",
255
255
  orientationStyle[orientation],
256
256
  widthStyle[width],
257
- tabsContainerClassName
257
+ tabsContainerClassName,
258
+ props.direction === "rtl" ? "hawa-flex-row-reverse" : ""
258
259
  )
259
260
  },
260
261
  (_b = props.options) == null ? void 0 : _b.map((opt, o) => {