@sikka/hawa 0.43.5-next → 0.44.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.
Files changed (127) hide show
  1. package/dist/alert/index.d.mts +9 -1
  2. package/dist/alert/index.d.ts +9 -1
  3. package/dist/alert/index.js +40 -36
  4. package/dist/alert/index.js.map +1 -1
  5. package/dist/alert/index.mjs +40 -36
  6. package/dist/alert/index.mjs.map +1 -1
  7. package/dist/appLayout/index.js +11 -22
  8. package/dist/appLayout/index.js.map +1 -1
  9. package/dist/appLayout/index.mjs +11 -22
  10. package/dist/appLayout/index.mjs.map +1 -1
  11. package/dist/backToTop/index.js +11 -22
  12. package/dist/backToTop/index.js.map +1 -1
  13. package/dist/backToTop/index.mjs +11 -22
  14. package/dist/backToTop/index.mjs.map +1 -1
  15. package/dist/blocks/auth/index.js +40 -36
  16. package/dist/blocks/auth/index.mjs +33 -18
  17. package/dist/blocks/feedback/index.js +27 -30
  18. package/dist/blocks/feedback/index.mjs +5 -5
  19. package/dist/blocks/index.js +64 -52
  20. package/dist/blocks/index.mjs +2 -2
  21. package/dist/blocks/misc/index.js +11 -22
  22. package/dist/blocks/misc/index.mjs +5 -5
  23. package/dist/blocks/pricing/index.js +27 -30
  24. package/dist/blocks/pricing/index.mjs +4 -4
  25. package/dist/button/index.d.mts +1 -1
  26. package/dist/button/index.d.ts +1 -1
  27. package/dist/button/index.js +11 -22
  28. package/dist/button/index.js.map +1 -1
  29. package/dist/button/index.mjs +11 -22
  30. package/dist/button/index.mjs.map +1 -1
  31. package/dist/calendar/index.js +12 -23
  32. package/dist/calendar/index.js.map +1 -1
  33. package/dist/calendar/index.mjs +12 -23
  34. package/dist/calendar/index.mjs.map +1 -1
  35. package/dist/{chunk-RPJYSE6Y.mjs → chunk-3B7UZCET.mjs} +11 -22
  36. package/dist/{chunk-ZPNZUWM5.mjs → chunk-6LI35F6L.mjs} +11 -22
  37. package/dist/{chunk-PORTGNAK.mjs → chunk-DYYINLRJ.mjs} +1 -1
  38. package/dist/{chunk-WJ6XCEUI.mjs → chunk-FIUKVRL5.mjs} +1 -1
  39. package/dist/{chunk-VWJIORNH.mjs → chunk-FUYMZP4J.mjs} +1 -1
  40. package/dist/{chunk-P7TMXOPP.mjs → chunk-JDCQLGWW.mjs} +1 -1
  41. package/dist/{chunk-QBPDB7E2.mjs → chunk-JKZQWCAQ.mjs} +1 -1
  42. package/dist/{chunk-3MJGVWY2.mjs → chunk-MEXJAHQV.mjs} +55 -32
  43. package/dist/{chunk-QDZMNVKS.mjs → chunk-OE6XZ6LW.mjs} +17 -9
  44. package/dist/{chunk-ZWQWYHT4.mjs → chunk-XC6FSDW7.mjs} +1 -1
  45. package/dist/codeBlock/index.js +11 -22
  46. package/dist/codeBlock/index.js.map +1 -1
  47. package/dist/codeBlock/index.mjs +11 -22
  48. package/dist/codeBlock/index.mjs.map +1 -1
  49. package/dist/colorPicker/index.js +11 -22
  50. package/dist/colorPicker/index.js.map +1 -1
  51. package/dist/colorPicker/index.mjs +11 -22
  52. package/dist/colorPicker/index.mjs.map +1 -1
  53. package/dist/combobox/index.js +11 -22
  54. package/dist/combobox/index.js.map +1 -1
  55. package/dist/combobox/index.mjs +11 -22
  56. package/dist/combobox/index.mjs.map +1 -1
  57. package/dist/dataTable/index.js +11 -22
  58. package/dist/dataTable/index.js.map +1 -1
  59. package/dist/dataTable/index.mjs +11 -22
  60. package/dist/dataTable/index.mjs.map +1 -1
  61. package/dist/datePicker/index.d.mts +1 -1
  62. package/dist/datePicker/index.d.ts +1 -1
  63. package/dist/datePicker/index.js +22 -24
  64. package/dist/datePicker/index.js.map +1 -1
  65. package/dist/datePicker/index.mjs +22 -24
  66. package/dist/datePicker/index.mjs.map +1 -1
  67. package/dist/docsLayout/index.js +11 -22
  68. package/dist/docsLayout/index.js.map +1 -1
  69. package/dist/docsLayout/index.mjs +11 -22
  70. package/dist/docsLayout/index.mjs.map +1 -1
  71. package/dist/elements/index.d.mts +10 -2
  72. package/dist/elements/index.d.ts +10 -2
  73. package/dist/elements/index.js +65 -53
  74. package/dist/elements/index.mjs +3 -3
  75. package/dist/fileDropzone/index.js +40 -36
  76. package/dist/fileDropzone/index.js.map +1 -1
  77. package/dist/fileDropzone/index.mjs +40 -36
  78. package/dist/fileDropzone/index.mjs.map +1 -1
  79. package/dist/index.d.mts +9 -1
  80. package/dist/index.d.ts +9 -1
  81. package/dist/index.js +67 -55
  82. package/dist/index.mjs +67 -55
  83. package/dist/input/index.js +11 -22
  84. package/dist/input/index.js.map +1 -1
  85. package/dist/input/index.mjs +11 -22
  86. package/dist/input/index.mjs.map +1 -1
  87. package/dist/interfaceSettings/index.js +27 -30
  88. package/dist/interfaceSettings/index.js.map +1 -1
  89. package/dist/interfaceSettings/index.mjs +27 -30
  90. package/dist/interfaceSettings/index.mjs.map +1 -1
  91. package/dist/layout/index.js +11 -22
  92. package/dist/layout/index.mjs +2 -2
  93. package/dist/passwordInput/index.js +11 -22
  94. package/dist/passwordInput/index.js.map +1 -1
  95. package/dist/passwordInput/index.mjs +11 -22
  96. package/dist/passwordInput/index.mjs.map +1 -1
  97. package/dist/phoneInput/index.js +11 -22
  98. package/dist/phoneInput/index.js.map +1 -1
  99. package/dist/phoneInput/index.mjs +11 -22
  100. package/dist/phoneInput/index.mjs.map +1 -1
  101. package/dist/pinInput/index.js +11 -22
  102. package/dist/pinInput/index.js.map +1 -1
  103. package/dist/pinInput/index.mjs +11 -22
  104. package/dist/pinInput/index.mjs.map +1 -1
  105. package/dist/radio/index.js +27 -30
  106. package/dist/radio/index.js.map +1 -1
  107. package/dist/radio/index.mjs +27 -30
  108. package/dist/radio/index.mjs.map +1 -1
  109. package/dist/select/index.js +11 -22
  110. package/dist/select/index.js.map +1 -1
  111. package/dist/select/index.mjs +11 -22
  112. package/dist/select/index.mjs.map +1 -1
  113. package/dist/sortButton/index.js +11 -22
  114. package/dist/sortButton/index.js.map +1 -1
  115. package/dist/sortButton/index.mjs +11 -22
  116. package/dist/sortButton/index.mjs.map +1 -1
  117. package/dist/splitButton/index.d.mts +1 -1
  118. package/dist/splitButton/index.d.ts +1 -1
  119. package/dist/splitButton/index.js +11 -22
  120. package/dist/splitButton/index.js.map +1 -1
  121. package/dist/splitButton/index.mjs +11 -22
  122. package/dist/splitButton/index.mjs.map +1 -1
  123. package/dist/textarea/index.js +11 -22
  124. package/dist/textarea/index.js.map +1 -1
  125. package/dist/textarea/index.mjs +11 -22
  126. package/dist/textarea/index.mjs.map +1 -1
  127. package/package.json +1 -1
@@ -20,7 +20,15 @@ type AlertTypes = {
20
20
  /** Removes the close button */
21
21
  persistent?: boolean;
22
22
  icon?: any;
23
- className?: string;
23
+ classNames?: {
24
+ root?: string;
25
+ content?: string;
26
+ title?: string;
27
+ text?: string;
28
+ actions?: string;
29
+ icon?: string;
30
+ closeButton?: string;
31
+ };
24
32
  onAlertClosed?: () => void;
25
33
  noDestroy?: boolean;
26
34
  };
@@ -20,7 +20,15 @@ type AlertTypes = {
20
20
  /** Removes the close button */
21
21
  persistent?: boolean;
22
22
  icon?: any;
23
- className?: string;
23
+ classNames?: {
24
+ root?: string;
25
+ content?: string;
26
+ title?: string;
27
+ text?: string;
28
+ actions?: string;
29
+ icon?: string;
30
+ closeButton?: string;
31
+ };
24
32
  onAlertClosed?: () => void;
25
33
  noDestroy?: boolean;
26
34
  };
@@ -52,28 +52,17 @@ var import_class_variance_authority = require("class-variance-authority");
52
52
  // elements/helperText/HelperText.tsx
53
53
  var import_react = __toESM(require("react"));
54
54
  var HelperText = ({
55
- helperText,
56
- size = "xs"
57
- }) => {
58
- let sizes = {
59
- xs: "hawa-text-xs hawa-h-4",
60
- sm: "hawa-text-sm",
61
- md: "hawa-text-md",
62
- lg: "hawa-text-lg",
63
- xl: "hawa-text-xl"
64
- };
65
- return /* @__PURE__ */ import_react.default.createElement(
66
- "p",
67
- {
68
- className: cn(
69
- "hawa-my-0 hawa-text-start hawa-text-helper-color hawa-transition-all",
70
- helperText ? "hawa-opacity-100" : "hawa-h-0 hawa-opacity-0",
71
- sizes[size]
72
- )
73
- },
74
- helperText
75
- );
76
- };
55
+ helperText
56
+ }) => /* @__PURE__ */ import_react.default.createElement(
57
+ "p",
58
+ {
59
+ className: cn(
60
+ "hawa-my-0 hawa-text-start hawa-text-helper-color hawa-transition-all hawa-text-xs",
61
+ helperText ? "hawa-opacity-100 hawa-h-4" : "hawa-h-0 hawa-opacity-0"
62
+ )
63
+ },
64
+ helperText
65
+ );
77
66
 
78
67
  // elements/label/Label.tsx
79
68
  var React3 = __toESM(require("react"));
@@ -510,7 +499,7 @@ var Alert = ({
510
499
  severity = "none",
511
500
  duration,
512
501
  icon,
513
- className,
502
+ classNames,
514
503
  ...props
515
504
  }) => {
516
505
  const alertRef = (0, import_react4.useRef)(null);
@@ -561,21 +550,25 @@ var Alert = ({
561
550
  "hawa-relative hawa-mb-4 hawa-flex hawa-flex-col hawa-rounded hawa-p-4 hawa-text-sm hawa-transition-all",
562
551
  styleVariant[severity],
563
552
  closed ? "hawa-opacity-0" : "hawa-opacity-100",
564
- className
553
+ classNames == null ? void 0 : classNames.root
565
554
  )
566
555
  },
567
556
  /* @__PURE__ */ import_react4.default.createElement("div", { className: "hawa-flex hawa-flex-row" }, icon && /* @__PURE__ */ import_react4.default.createElement(
568
557
  "div",
569
558
  {
570
- className: direction === "rtl" ? "hawa-pl-2 hawa-pt-1" : "hawa-pr-2 hawa-pt-1"
559
+ className: cn(
560
+ direction === "rtl" ? "hawa-pl-2 hawa-pt-1" : "hawa-pr-2 hawa-pt-1",
561
+ classNames == null ? void 0 : classNames.icon
562
+ )
571
563
  },
572
564
  icon
573
- ), /* @__PURE__ */ import_react4.default.createElement("div", { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ import_react4.default.createElement(
565
+ ), /* @__PURE__ */ import_react4.default.createElement("div", { className: cn("hawa-flex hawa-flex-col", classNames == null ? void 0 : classNames.content) }, /* @__PURE__ */ import_react4.default.createElement(
574
566
  "span",
575
567
  {
576
568
  className: cn(
577
569
  "hawa-font-bold",
578
- direction === "rtl" ? "hawa-ml-8" : "hawa-mr-8"
570
+ direction === "rtl" ? "hawa-ml-8" : "hawa-mr-8",
571
+ classNames == null ? void 0 : classNames.title
579
572
  )
580
573
  },
581
574
  props.title
@@ -584,19 +577,29 @@ var Alert = ({
584
577
  {
585
578
  className: cn(
586
579
  direction === "rtl" ? "hawa-ml-8" : "hawa-mr-8",
587
- props.persistent ? "hawa-w-full" : "hawa-w-[calc(100% - 40px)]"
580
+ props.persistent ? "hawa-w-full" : "hawa-w-[calc(100% - 40px)]",
581
+ classNames == null ? void 0 : classNames.text
588
582
  )
589
583
  },
590
584
  props.text
591
- ), props.actions && /* @__PURE__ */ import_react4.default.createElement("div", { className: "hawa-mt-2 hawa-flex hawa-flex-row hawa-gap-2" }, props.actions.map((act, index) => /* @__PURE__ */ import_react4.default.createElement(
592
- Button,
585
+ ), props.actions && /* @__PURE__ */ import_react4.default.createElement(
586
+ "div",
593
587
  {
594
- key: index,
595
- variant: act.variant,
596
- onClick: act.onClick()
588
+ className: cn(
589
+ "hawa-mt-2 hawa-flex hawa-flex-row hawa-gap-2",
590
+ classNames == null ? void 0 : classNames.actions
591
+ )
597
592
  },
598
- act.label
599
- ))))),
593
+ props.actions.map((act, index) => /* @__PURE__ */ import_react4.default.createElement(
594
+ Button,
595
+ {
596
+ key: index,
597
+ variant: act.variant,
598
+ onClick: act.onClick()
599
+ },
600
+ act.label
601
+ ))
602
+ ))),
600
603
  !props.persistent && /* @__PURE__ */ import_react4.default.createElement(
601
604
  "button",
602
605
  {
@@ -606,7 +609,8 @@ var Alert = ({
606
609
  className: cn(
607
610
  "hawa-absolute hawa-top-2 hawa-inline-flex hawa-h-9 hawa-w-9 hawa-items-center hawa-justify-center hawa-rounded-inner hawa-p-1.5 hawa-transition-all hover:hawa-text-gray-900",
608
611
  closeButtonStyle[severity],
609
- direction === "rtl" ? "hawa-left-2" : "hawa-right-2"
612
+ direction === "rtl" ? "hawa-left-2" : "hawa-right-2",
613
+ classNames == null ? void 0 : classNames.closeButton
610
614
  ),
611
615
  onClick: () => {
612
616
  if (props.onAlertClosed) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../elements/alert/index.ts","../../elements/alert/Alert.tsx","../../util/index.ts","../../elements/button/Button.tsx","../../elements/helperText/HelperText.tsx","../../elements/label/Label.tsx","../../elements/tooltip/Tooltip.tsx","../../elements/loading/Loading.tsx"],"sourcesContent":["export * from \"./Alert\";\n","import React, { useRef, useState, useEffect } from \"react\";\n\nimport { cn } from \"@util/index\";\n\nimport { DirectionType, SeverityType } from \"@_types/commonTypes\";\n\nimport { Button } from \"../button\";\n\ntype AlertTypes = {\n severity?: SeverityType | \"hyper\" | \"oceanic\";\n /** The title of the alert placed above the text of the alert. Can be used alone */\n title?: React.ReactNode;\n /** The text of the alert placed below the title of the alert. Can be used alone */\n text: React.ReactNode;\n /** The duration for the alert to stay on the screen */\n duration?: number;\n direction?: DirectionType;\n actions?: [\n {\n label: string;\n onClick: any;\n variant:\n | \"outline\"\n | \"link\"\n | \"default\"\n | \"destructive\"\n | \"secondary\"\n | \"ghost\";\n },\n ];\n /** Removes the close button */\n persistent?: boolean;\n icon?: any;\n className?: string;\n onAlertClosed?: () => void;\n noDestroy?: boolean;\n};\n\nexport const Alert: React.FunctionComponent<AlertTypes> = ({\n direction = \"ltr\",\n severity = \"none\",\n duration,\n icon,\n className,\n ...props\n}) => {\n const alertRef = useRef<HTMLDivElement>(null);\n const [closed, setClosed] = useState(false);\n\n useEffect(() => {\n if (duration) {\n //To change opacity and hide the component\n const timeoutHide = setTimeout(() => {\n setClosed(true);\n }, duration);\n //To destroy the component after hiding it\n const timeoutDestroy = setTimeout(() => {\n setClosed(true);\n if (alertRef?.current) {\n alertRef?.current.removeChild(alertRef?.current.children[0]);\n }\n }, duration + 1000);\n\n return () => {\n clearTimeout(timeoutHide);\n clearTimeout(timeoutDestroy);\n };\n }\n }, [duration]);\n\n let closeButtonStyle = {\n none: \"\",\n info: \"\",\n warning: \"\",\n error: \"\",\n success: \"\",\n hyper: \"\",\n oceanic: \"\",\n };\n let styleVariant = {\n none: \"hawa-bg-background hawa-border\",\n info: \"hawa-text-info-foreground hawa-bg-info/90\",\n warning: \"hawa-text-warning-foreground hawa-bg-warning/90\",\n error: \"hawa-text-destructive-foreground hawa-bg-destructive/90\",\n success: \"hawa-text-success-foreground hawa-bg-success/90\",\n hyper:\n \"hawa-text-white hawa-bg-gradient-to-tl hawa-from-pink-700 hawa-via-red-500 hawa-to-yellow-600 \",\n oceanic:\n \"hawa-text-white hawa-bg-gradient-to-bl hawa-from-green-500 hawa-via-blue-700 hawa-to-purple-500\",\n };\n\n return (\n <div ref={alertRef}>\n <div\n data-testid=\"alert\"\n aria-label=\"Alert\"\n role=\"alert\"\n dir={direction}\n className={cn(\n \"hawa-relative hawa-mb-4 hawa-flex hawa-flex-col hawa-rounded hawa-p-4 hawa-text-sm hawa-transition-all\",\n styleVariant[severity],\n closed ? \"hawa-opacity-0\" : \"hawa-opacity-100\",\n className,\n )}\n >\n <div className=\"hawa-flex hawa-flex-row\">\n {icon && (\n <div\n className={\n direction === \"rtl\"\n ? \"hawa-pl-2 hawa-pt-1\"\n : \"hawa-pr-2 hawa-pt-1\"\n }\n >\n {icon}\n </div>\n )}\n <div className=\"hawa-flex hawa-flex-col\">\n <span\n className={cn(\n \"hawa-font-bold\",\n direction === \"rtl\" ? \"hawa-ml-8\" : \"hawa-mr-8\",\n )}\n >\n {props.title}\n </span>\n <span\n className={cn(\n direction === \"rtl\" ? \"hawa-ml-8\" : \"hawa-mr-8\",\n props.persistent ? \"hawa-w-full\" : \"hawa-w-[calc(100% - 40px)]\",\n )}\n >\n {props.text}\n </span>\n {props.actions && (\n <div className=\"hawa-mt-2 hawa-flex hawa-flex-row hawa-gap-2\">\n {props.actions.map((act, index) => (\n <Button\n key={index}\n variant={act.variant}\n onClick={act.onClick()}\n >\n {act.label}\n </Button>\n ))}\n </div>\n )}\n </div>\n </div>\n {!props.persistent && (\n <button\n type=\"button\"\n data-dismiss-target=\"#alert-default\"\n aria-label=\"Close\"\n className={cn(\n \"hawa-absolute hawa-top-2 hawa-inline-flex hawa-h-9 hawa-w-9 hawa-items-center hawa-justify-center hawa-rounded-inner hawa-p-1.5 hawa-transition-all hover:hawa-text-gray-900\",\n closeButtonStyle[severity],\n direction === \"rtl\" ? \"hawa-left-2\" : \"hawa-right-2\",\n )}\n onClick={() => {\n if (props.onAlertClosed) {\n props.onAlertClosed();\n }\n if (!props.noDestroy) {\n setClosed(true);\n setTimeout(() => {\n if (alertRef?.current) {\n alertRef?.current.removeChild(\n alertRef?.current.children[0],\n );\n }\n }, 200);\n }\n }}\n >\n <span className=\"hawa-sr-only\">Close</span>\n <svg\n aria-label=\"Close Icon\"\n aria-hidden=\"true\"\n className=\"hawa-h-5 hawa-w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </button>\n )}\n </div>\n </div>\n );\n};\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(\n sanitizedHex\n );\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16)\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\")\n }\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n","import * as React from \"react\";\n\nimport { cn } from \"@util/index\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { HelperText } from \"../helperText\";\nimport { Label, LabelProps } from \"../label\";\nimport { Loading } from \"../loading/Loading\";\n\nconst buttonVariants = cva(\n \"hawa-inline-flex hawa-items-center hawa-select-none hawa-rounded-md hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-colors focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"hawa-bg-primary hawa-text-primary-foreground hover:hawa-bg-primary/90\",\n light: \"hawa-bg-primary/20 hawa-text-primary hover:hawa-bg-primary/40\",\n destructive:\n \"hawa-bg-destructive hawa-text-destructive-foreground hover:hawa-bg-destructive/90\",\n outline:\n \"hawa-border hawa-border-input hawa-bg-transparent hover:hawa-bg-accent hover:hawa-text-accent-foreground\",\n secondary:\n \"hawa-bg-secondary hawa-text-secondary-foreground hover:hawa-bg-secondary/80\",\n ghost: \"hover:hawa-bg-accent hover:hawa-text-accent-foreground\",\n link: \"hawa-text-primary hawa-underline-offset-4 hover:hawa-underline\",\n combobox: \"hawa-bg-background hawa-border\",\n neoBrutalism: \"neo-brutalism\",\n // \"hawa-cursor-pointer hawa-transition-all hawa-uppercase hawa-font-mono dark:hawa-bg-black hawa-font-bold hawa-py-2 hawa-px-4 hawa-rounded hawa-border-2 hawa-border-primary hawa-shadow-color-primary hawa-transition-[hawa-transform_50ms, hawa-box-shadow_50ms] active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active shadow-color-primary active:shadow-color-primary-active\",\n },\n size: {\n default: \"hawa-h-10 hawa-px-4 hawa-py-2\",\n heightless: \"hawa-px-4 hawa-py-4\",\n xs: \"hawa-h-fit hawa-min-h-[25px] hawa-py-1 hawa-text-[10px] hawa-px-2 \",\n sm: \"hawa-h-9 hawa-text-[11px] hawa-rounded-md hawa-px-3\",\n lg: \"hawa-h-11 hawa-rounded-md hawa-px-8\",\n xl: \"hawa-h-14 hawa-rounded-md hawa-px-10\",\n icon: \"hawa-h-10 hawa-w-10\",\n smallIcon: \"hawa-h-7 hawa-w-7\",\n },\n },\n defaultVariants: { variant: \"default\", size: \"default\" },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n centered?: boolean;\n isLoading?: boolean;\n label?: string;\n labelProps?: LabelProps;\n /** The small red text under the input field to show validation. */\n helperText?: any;\n showHelperText?: boolean;\n /**\n * If true, the button will include a label and helper text. This is useful for forms where the button is part of the form.\n */\n asInput?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n label,\n variant,\n size,\n asChild = false,\n centered = true,\n isLoading,\n children,\n labelProps,\n showHelperText = false,\n asInput = false,\n ...props\n },\n ref,\n ) => {\n const Comp = \"button\";\n\n // Determine the color for the Loading component based on the variant\n const loadingColor =\n variant === \"outline\" || variant === \"ghost\" || variant === \"neoBrutalism\"\n ? \"hawa-bg-primary\"\n : \"hawa-bg-primary-foreground\";\n\n if (asInput) {\n return (\n <div className=\"hawa-flex hawa-flex-col hawa-gap-2\">\n {label && <Label {...labelProps}>{label}</Label>}\n <Comp\n className={cn(\n buttonVariants({ variant, size, className }),\n centered && \"hawa-justify-center\",\n )}\n ref={ref}\n {...props}\n >\n {isLoading ? (\n <Loading\n design={\n size === \"icon\" || size === \"smallIcon\"\n ? \"spinner\"\n : \"dots-pulse\"\n }\n themeMode={variant === \"outline\" ? \"light\" : \"dark\"}\n color={loadingColor}\n size={size === \"sm\" || size === \"xs\" ? \"xs\" : \"button\"}\n />\n ) : (\n children\n )}\n </Comp>\n {showHelperText && <HelperText helperText={props.helperText} />}\n </div>\n );\n } else {\n return (\n <Comp\n className={cn(\n buttonVariants({ variant, size, className }),\n centered && \"hawa-justify-center\",\n )}\n ref={ref}\n {...props}\n >\n {isLoading ? (\n <Loading\n design={\n size === \"icon\" || size === \"smallIcon\"\n ? \"spinner\"\n : \"dots-pulse\"\n }\n themeMode={variant === \"outline\" ? \"light\" : \"dark\"}\n color={loadingColor}\n size={size === \"sm\" || size === \"xs\" ? \"xs\" : \"button\"}\n />\n ) : (\n children\n )}\n </Comp>\n );\n }\n },\n);\n\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import React from \"react\";\n\nimport { cn } from \"@util/index\";\n\nexport const HelperText = ({\n helperText,\n size = \"xs\",\n}: {\n helperText?: any;\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n}) => {\n let sizes = {\n xs: \"hawa-text-xs hawa-h-4\",\n sm: \"hawa-text-sm\",\n md: \"hawa-text-md\",\n lg: \"hawa-text-lg\",\n xl: \"hawa-text-xl\",\n };\n\n return (\n <p\n className={cn(\n \"hawa-my-0 hawa-text-start hawa-text-helper-color hawa-transition-all\",\n helperText ? \"hawa-opacity-100\" : \"hawa-h-0 hawa-opacity-0\",\n sizes[size],\n )}\n >\n {helperText}\n </p>\n );\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 React, { FC } from \"react\";\n\nimport { cn } from \"@util/index\";\n\ntype LoadingTypes = {\n /** Specifies the size of the loading component.*/\n size?: \"button\" | \"xs\" | \"sm\" | \"normal\" | \"lg\" | \"xl\";\n /** Determines the design of the loading animation.*/\n design?:\n | \"spinner\"\n | \"dots-bounce\"\n | \"dots-pulse\"\n | \"pulse\"\n | \"spinner-dots\"\n | \"squircle\"\n | \"square\"\n | \"progress\"\n | \"orbit\";\n /** Specifies the color of the loading component. By default it will inherit the value of --primary global CSS variable*/\n color?: string;\n classNames?: {\n container?: string;\n track?: string;\n car?: string;\n };\n themeMode?: \"dark\" | \"light\";\n};\n\nexport const Loading: FC<LoadingTypes> = ({\n design = \"spinner\",\n size = \"normal\",\n themeMode = \"light\",\n classNames,\n color,\n ...props\n}) => {\n let sizeStyles = {\n button: \"hawa-h-4 hawa-w-4\",\n xs: \"hawa-h-1 hawa-w-1\",\n sm: \"hawa-h-6 hawa-w-6\",\n normal: \"hawa-h-8 hawa-w-8\",\n lg: \"hawa-h-14 hawa-w-14\",\n xl: \"hawa-h-24 hawa-w-24\",\n };\n let progressSizes = {\n button: \"hawa-h-1\",\n xs: \"hawa-h-1 hawa-w-1\",\n sm: \"hawa-h-6 hawa-w-6\",\n normal: \"\",\n lg: \"hawa-h-6\",\n xl: \"hawa-h-10 hawa-w-64\",\n };\n\n let animationStyles: any = {\n pulse: \"hawa-animate-in hawa-fade-in hawa-duration-1000\",\n bounce: \"hawa-animate-bounce\",\n };\n switch (design.split(\"-\")[0]) {\n case \"dots\":\n return (\n <div\n className={cn(\n \"hawa-flex hawa-flex-row hawa-gap-2\",\n classNames?.container,\n )}\n >\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\",\n )}\n ></div>\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\",\n )}\n ></div>\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\",\n )}\n ></div>\n </div>\n );\n case \"square\":\n return (\n <svg\n className={cn(\n \"squircle-container\",\n sizeStyles[size],\n classNames?.container,\n )}\n viewBox=\"0 0 35 35\"\n height=\"35\"\n width=\"35\"\n >\n <rect\n className=\"squircle-track\"\n x=\"2.5\"\n y=\"2.5\"\n fill=\"none\"\n strokeWidth=\"5px\"\n width=\"32.5\"\n height=\"32.5\"\n />\n <rect\n className=\"square-car\"\n x=\"2.5\"\n y=\"2.5\"\n fill=\"none\"\n strokeWidth=\"5px\"\n width=\"32.5\"\n height=\"32.5\"\n pathLength=\"100\"\n />\n </svg>\n );\n case \"squircle\":\n return (\n <svg\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 37 37\"\n height=\"37\"\n width=\"37\"\n preserveAspectRatio=\"xMidYMid meet\"\n className={cn(\n \"squircle-container\",\n sizeStyles[size],\n classNames?.container,\n )}\n >\n <path\n className={cn(\"squircle-track\", classNames?.track)}\n fill=\"none\"\n strokeWidth=\"5\"\n pathLength=\"100\"\n d=\"M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5\"\n ></path>\n <path\n className={cn(\"squircle-car\", classNames?.car)}\n fill=\"none\"\n strokeWidth=\"5\"\n pathLength=\"100\"\n d=\"M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5\"\n ></path>\n </svg>\n );\n case \"progress\":\n return (\n <div\n className={cn(\n \"progress-loading after:hawa-rounded hawa-rounded\",\n progressSizes[size],\n classNames?.container,\n )}\n ></div>\n );\n case \"orbit\":\n return (\n <div className={cn(\"orbit-container\", classNames?.container)}></div>\n );\n\n default:\n return (\n <svg\n viewBox=\"0 0 40 40\"\n height=\"40\"\n width=\"40\"\n className={cn(\n \"circle-container\",\n sizeStyles[size],\n classNames?.container,\n )}\n >\n <circle\n className={cn(\n \"circle-track\",\n {\n \"hawa-stroke-primary-foreground\": themeMode === \"dark\",\n \"hawa-stroke-primary\": themeMode === \"light\",\n },\n classNames?.track,\n )}\n cx=\"20\"\n cy=\"20\"\n r=\"17.5\"\n fill=\"none\"\n strokeWidth=\"5px\"\n pathLength=\"100\"\n />\n <circle\n className={cn(\n \"circle-car\",\n {\n \"hawa-stroke-primary-foreground\": themeMode === \"dark\",\n \"hawa-stroke-primary\": themeMode === \"light\",\n },\n classNames?.car,\n )}\n cx=\"20\"\n cy=\"20\"\n r=\"17.5\"\n fill=\"none\"\n pathLength=\"100\"\n strokeWidth=\"5px\"\n />\n </svg>\n );\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAAmD;;;ACAnD,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ACLA,IAAAC,SAAuB;AAGvB,sCAAuC;;;ACHvC,mBAAkB;AAIX,IAAM,aAAa,CAAC;AAAA,EACzB;AAAA,EACA,OAAO;AACT,MAGM;AACJ,MAAI,QAAQ;AAAA,IACV,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EACN;AAEA,SACE,6BAAAC,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,aAAa,qBAAqB;AAAA,QAClC,MAAM,IAAI;AAAA,MACZ;AAAA;AAAA,IAEC;AAAA,EACH;AAEJ;;;AC9BA,IAAAC,SAAuB;;;ACAvB,IAAAC,gBAAkB;AAElB,uBAAkC;AAKlC,IAAM,iBAAiB,cAAAC,QAAM,WAK3B,CAAC,EAAE,WAAW,aAAa,GAAG,OAAO,WAAW,GAAG,MAAM,GAAG,QAC5D,8BAAAA,QAAA;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AA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AY;AAAA,UACZ,WAAU;AAAA,UACV,MAAK;AAAA,UACL,SAAQ;AAAA;AAAA,QAER,8BAAAA,QAAA;AAAA,UAAC;AAAA;AAAA,YACC,UAAS;AAAA,YACT,GAAE;AAAA,YACF,UAAS;AAAA;AAAA,QACV;AAAA,MACH;AAAA,IACF;AAAA,EAEJ,CACF;AAEJ;","names":["import_react","React","React","React","import_react","React","import_react","React","React"]}
1
+ {"version":3,"sources":["../../elements/alert/index.ts","../../elements/alert/Alert.tsx","../../util/index.ts","../../elements/button/Button.tsx","../../elements/helperText/HelperText.tsx","../../elements/label/Label.tsx","../../elements/tooltip/Tooltip.tsx","../../elements/loading/Loading.tsx"],"sourcesContent":["export * from \"./Alert\";\n","import React, { useRef, useState, useEffect } from \"react\";\n\nimport { cn } from \"@util/index\";\n\nimport { DirectionType, SeverityType } from \"@_types/commonTypes\";\n\nimport { Button } from \"../button\";\n\ntype AlertTypes = {\n severity?: SeverityType | \"hyper\" | \"oceanic\";\n /** The title of the alert placed above the text of the alert. Can be used alone */\n title?: React.ReactNode;\n /** The text of the alert placed below the title of the alert. Can be used alone */\n text: React.ReactNode;\n /** The duration for the alert to stay on the screen */\n duration?: number;\n direction?: DirectionType;\n actions?: [\n {\n label: string;\n onClick: any;\n variant:\n | \"outline\"\n | \"link\"\n | \"default\"\n | \"destructive\"\n | \"secondary\"\n | \"ghost\";\n },\n ];\n /** Removes the close button */\n persistent?: boolean;\n icon?: any;\n classNames?: {\n root?: string;\n content?: string;\n title?: string;\n text?: string;\n actions?: string;\n icon?: string;\n closeButton?: string;\n };\n onAlertClosed?: () => void;\n noDestroy?: boolean;\n};\n\nexport const Alert: React.FunctionComponent<AlertTypes> = ({\n direction = \"ltr\",\n severity = \"none\",\n duration,\n icon,\n classNames,\n ...props\n}) => {\n const alertRef = useRef<HTMLDivElement>(null);\n const [closed, setClosed] = useState(false);\n\n useEffect(() => {\n if (duration) {\n //To change opacity and hide the component\n const timeoutHide = setTimeout(() => {\n setClosed(true);\n }, duration);\n //To destroy the component after hiding it\n const timeoutDestroy = setTimeout(() => {\n setClosed(true);\n if (alertRef?.current) {\n alertRef?.current.removeChild(alertRef?.current.children[0]);\n }\n }, duration + 1000);\n\n return () => {\n clearTimeout(timeoutHide);\n clearTimeout(timeoutDestroy);\n };\n }\n }, [duration]);\n\n let closeButtonStyle = {\n none: \"\",\n info: \"\",\n warning: \"\",\n error: \"\",\n success: \"\",\n hyper: \"\",\n oceanic: \"\",\n };\n let styleVariant = {\n none: \"hawa-bg-background hawa-border\",\n info: \"hawa-text-info-foreground hawa-bg-info/90\",\n warning: \"hawa-text-warning-foreground hawa-bg-warning/90\",\n error: \"hawa-text-destructive-foreground hawa-bg-destructive/90\",\n success: \"hawa-text-success-foreground hawa-bg-success/90\",\n hyper:\n \"hawa-text-white hawa-bg-gradient-to-tl hawa-from-pink-700 hawa-via-red-500 hawa-to-yellow-600 \",\n oceanic:\n \"hawa-text-white hawa-bg-gradient-to-bl hawa-from-green-500 hawa-via-blue-700 hawa-to-purple-500\",\n };\n\n return (\n <div ref={alertRef}>\n <div\n data-testid=\"alert\"\n aria-label=\"Alert\"\n role=\"alert\"\n dir={direction}\n className={cn(\n \"hawa-relative hawa-mb-4 hawa-flex hawa-flex-col hawa-rounded hawa-p-4 hawa-text-sm hawa-transition-all\",\n styleVariant[severity],\n closed ? \"hawa-opacity-0\" : \"hawa-opacity-100\",\n classNames?.root,\n )}\n >\n <div className=\"hawa-flex hawa-flex-row\">\n {icon && (\n <div\n className={cn(\n direction === \"rtl\"\n ? \"hawa-pl-2 hawa-pt-1\"\n : \"hawa-pr-2 hawa-pt-1\",\n classNames?.icon,\n )}\n >\n {icon}\n </div>\n )}\n <div className={cn(\"hawa-flex hawa-flex-col\", classNames?.content)}>\n <span\n className={cn(\n \"hawa-font-bold\",\n direction === \"rtl\" ? \"hawa-ml-8\" : \"hawa-mr-8\",\n classNames?.title,\n )}\n >\n {props.title}\n </span>\n <span\n className={cn(\n direction === \"rtl\" ? \"hawa-ml-8\" : \"hawa-mr-8\",\n props.persistent ? \"hawa-w-full\" : \"hawa-w-[calc(100% - 40px)]\",\n classNames?.text,\n )}\n >\n {props.text}\n </span>\n {props.actions && (\n <div\n className={cn(\n \"hawa-mt-2 hawa-flex hawa-flex-row hawa-gap-2\",\n classNames?.actions,\n )}\n >\n {props.actions.map((act, index) => (\n <Button\n key={index}\n variant={act.variant}\n onClick={act.onClick()}\n >\n {act.label}\n </Button>\n ))}\n </div>\n )}\n </div>\n </div>\n {!props.persistent && (\n <button\n type=\"button\"\n data-dismiss-target=\"#alert-default\"\n aria-label=\"Close\"\n className={cn(\n \"hawa-absolute hawa-top-2 hawa-inline-flex hawa-h-9 hawa-w-9 hawa-items-center hawa-justify-center hawa-rounded-inner hawa-p-1.5 hawa-transition-all hover:hawa-text-gray-900\",\n closeButtonStyle[severity],\n direction === \"rtl\" ? \"hawa-left-2\" : \"hawa-right-2\",\n classNames?.closeButton,\n )}\n onClick={() => {\n if (props.onAlertClosed) {\n props.onAlertClosed();\n }\n if (!props.noDestroy) {\n setClosed(true);\n setTimeout(() => {\n if (alertRef?.current) {\n alertRef?.current.removeChild(\n alertRef?.current.children[0],\n );\n }\n }, 200);\n }\n }}\n >\n <span className=\"hawa-sr-only\">Close</span>\n <svg\n aria-label=\"Close Icon\"\n aria-hidden=\"true\"\n className=\"hawa-h-5 hawa-w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n </button>\n )}\n </div>\n </div>\n );\n};\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(\n sanitizedHex\n );\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16)\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\")\n }\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n","import * as React from \"react\";\n\nimport { cn } from \"@util/index\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { HelperText } from \"../helperText\";\nimport { Label, LabelProps } from \"../label\";\nimport { Loading } from \"../loading/Loading\";\n\nconst buttonVariants = cva(\n \"hawa-inline-flex hawa-items-center hawa-select-none hawa-rounded-md hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-colors focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"hawa-bg-primary hawa-text-primary-foreground hover:hawa-bg-primary/90\",\n light: \"hawa-bg-primary/20 hawa-text-primary hover:hawa-bg-primary/40\",\n destructive:\n \"hawa-bg-destructive hawa-text-destructive-foreground hover:hawa-bg-destructive/90\",\n outline:\n \"hawa-border hawa-border-input hawa-bg-transparent hover:hawa-bg-accent hover:hawa-text-accent-foreground\",\n secondary:\n \"hawa-bg-secondary hawa-text-secondary-foreground hover:hawa-bg-secondary/80\",\n ghost: \"hover:hawa-bg-accent hover:hawa-text-accent-foreground\",\n link: \"hawa-text-primary hawa-underline-offset-4 hover:hawa-underline\",\n combobox: \"hawa-bg-background hawa-border\",\n neoBrutalism: \"neo-brutalism\",\n // \"hawa-cursor-pointer hawa-transition-all hawa-uppercase hawa-font-mono dark:hawa-bg-black hawa-font-bold hawa-py-2 hawa-px-4 hawa-rounded hawa-border-2 hawa-border-primary hawa-shadow-color-primary hawa-transition-[hawa-transform_50ms, hawa-box-shadow_50ms] active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active shadow-color-primary active:shadow-color-primary-active\",\n },\n size: {\n default: \"hawa-h-10 hawa-px-4 hawa-py-2\",\n heightless: \"hawa-px-4 hawa-py-4\",\n xs: \"hawa-h-fit hawa-min-h-[25px] hawa-py-1 hawa-text-[10px] hawa-px-2 \",\n sm: \"hawa-h-9 hawa-text-[11px] hawa-rounded-md hawa-px-3\",\n lg: \"hawa-h-11 hawa-rounded-md hawa-px-8\",\n xl: \"hawa-h-14 hawa-rounded-md hawa-px-10\",\n icon: \"hawa-h-10 hawa-w-10\",\n smallIcon: \"hawa-h-7 hawa-w-7\",\n },\n },\n defaultVariants: { variant: \"default\", size: \"default\" },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n centered?: boolean;\n isLoading?: boolean;\n label?: string;\n labelProps?: LabelProps;\n /** The small red text under the input field to show validation. */\n helperText?: any;\n showHelperText?: boolean;\n /**\n * If true, the button will include a label and helper text. This is useful for forms where the button is part of the form.\n */\n asInput?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n label,\n variant,\n size,\n asChild = false,\n centered = true,\n isLoading,\n children,\n labelProps,\n showHelperText = false,\n asInput = false,\n ...props\n },\n ref,\n ) => {\n const Comp = \"button\";\n\n // Determine the color for the Loading component based on the variant\n const loadingColor =\n variant === \"outline\" || variant === \"ghost\" || variant === \"neoBrutalism\"\n ? \"hawa-bg-primary\"\n : \"hawa-bg-primary-foreground\";\n\n if (asInput) {\n return (\n <div className=\"hawa-flex hawa-flex-col hawa-gap-2\">\n {label && <Label {...labelProps}>{label}</Label>}\n <Comp\n className={cn(\n buttonVariants({ variant, size, className }),\n centered && \"hawa-justify-center\",\n )}\n ref={ref}\n {...props}\n >\n {isLoading ? (\n <Loading\n design={\n size === \"icon\" || size === \"smallIcon\"\n ? \"spinner\"\n : \"dots-pulse\"\n }\n themeMode={variant === \"outline\" ? \"light\" : \"dark\"}\n color={loadingColor}\n size={size === \"sm\" || size === \"xs\" ? \"xs\" : \"button\"}\n />\n ) : (\n children\n )}\n </Comp>\n {showHelperText && <HelperText helperText={props.helperText} />}\n </div>\n );\n } else {\n return (\n <Comp\n className={cn(\n buttonVariants({ variant, size, className }),\n centered && \"hawa-justify-center\",\n )}\n ref={ref}\n {...props}\n >\n {isLoading ? (\n <Loading\n design={\n size === \"icon\" || size === \"smallIcon\"\n ? \"spinner\"\n : \"dots-pulse\"\n }\n themeMode={variant === \"outline\" ? \"light\" : \"dark\"}\n color={loadingColor}\n size={size === \"sm\" || size === \"xs\" ? \"xs\" : \"button\"}\n />\n ) : (\n children\n )}\n </Comp>\n );\n }\n },\n);\n\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\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 React, { FC } from \"react\";\n\nimport { cn } from \"@util/index\";\n\ntype LoadingTypes = {\n /** Specifies the size of the loading component.*/\n size?: \"button\" | \"xs\" | \"sm\" | \"normal\" | \"lg\" | \"xl\";\n /** Determines the design of the loading animation.*/\n design?:\n | \"spinner\"\n | \"dots-bounce\"\n | \"dots-pulse\"\n | \"pulse\"\n | \"spinner-dots\"\n | \"squircle\"\n | \"square\"\n | \"progress\"\n | \"orbit\";\n /** Specifies the color of the loading component. By default it will inherit the value of --primary global CSS variable*/\n color?: string;\n classNames?: {\n container?: string;\n track?: string;\n car?: string;\n };\n themeMode?: \"dark\" | \"light\";\n};\n\nexport const Loading: FC<LoadingTypes> = ({\n design = \"spinner\",\n size = \"normal\",\n themeMode = \"light\",\n classNames,\n color,\n ...props\n}) => {\n let sizeStyles = {\n button: \"hawa-h-4 hawa-w-4\",\n xs: \"hawa-h-1 hawa-w-1\",\n sm: \"hawa-h-6 hawa-w-6\",\n normal: \"hawa-h-8 hawa-w-8\",\n lg: \"hawa-h-14 hawa-w-14\",\n xl: \"hawa-h-24 hawa-w-24\",\n };\n let progressSizes = {\n button: \"hawa-h-1\",\n xs: \"hawa-h-1 hawa-w-1\",\n sm: \"hawa-h-6 hawa-w-6\",\n normal: \"\",\n lg: \"hawa-h-6\",\n xl: \"hawa-h-10 hawa-w-64\",\n };\n\n let animationStyles: any = {\n pulse: \"hawa-animate-in hawa-fade-in hawa-duration-1000\",\n bounce: \"hawa-animate-bounce\",\n };\n switch (design.split(\"-\")[0]) {\n case \"dots\":\n return (\n <div\n className={cn(\n \"hawa-flex hawa-flex-row hawa-gap-2\",\n classNames?.container,\n )}\n >\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\",\n )}\n ></div>\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\",\n )}\n ></div>\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\",\n )}\n ></div>\n </div>\n );\n case \"square\":\n return (\n <svg\n className={cn(\n \"squircle-container\",\n sizeStyles[size],\n classNames?.container,\n )}\n viewBox=\"0 0 35 35\"\n height=\"35\"\n width=\"35\"\n >\n <rect\n className=\"squircle-track\"\n x=\"2.5\"\n y=\"2.5\"\n fill=\"none\"\n strokeWidth=\"5px\"\n width=\"32.5\"\n height=\"32.5\"\n />\n <rect\n className=\"square-car\"\n x=\"2.5\"\n y=\"2.5\"\n fill=\"none\"\n strokeWidth=\"5px\"\n width=\"32.5\"\n height=\"32.5\"\n pathLength=\"100\"\n />\n </svg>\n );\n case \"squircle\":\n return (\n <svg\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 37 37\"\n height=\"37\"\n width=\"37\"\n preserveAspectRatio=\"xMidYMid meet\"\n className={cn(\n \"squircle-container\",\n sizeStyles[size],\n classNames?.container,\n )}\n >\n <path\n className={cn(\"squircle-track\", classNames?.track)}\n fill=\"none\"\n strokeWidth=\"5\"\n pathLength=\"100\"\n d=\"M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5\"\n ></path>\n <path\n className={cn(\"squircle-car\", classNames?.car)}\n fill=\"none\"\n strokeWidth=\"5\"\n pathLength=\"100\"\n d=\"M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5\"\n ></path>\n </svg>\n );\n case \"progress\":\n return (\n <div\n className={cn(\n \"progress-loading after:hawa-rounded hawa-rounded\",\n progressSizes[size],\n classNames?.container,\n )}\n ></div>\n );\n case \"orbit\":\n return (\n <div className={cn(\"orbit-container\", classNames?.container)}></div>\n );\n\n default:\n return (\n <svg\n viewBox=\"0 0 40 40\"\n height=\"40\"\n width=\"40\"\n className={cn(\n \"circle-container\",\n sizeStyles[size],\n classNames?.container,\n )}\n >\n <circle\n className={cn(\n \"circle-track\",\n {\n \"hawa-stroke-primary-foreground\": themeMode === \"dark\",\n \"hawa-stroke-primary\": themeMode === \"light\",\n },\n classNames?.track,\n )}\n cx=\"20\"\n cy=\"20\"\n r=\"17.5\"\n fill=\"none\"\n strokeWidth=\"5px\"\n pathLength=\"100\"\n />\n <circle\n className={cn(\n \"circle-car\",\n {\n \"hawa-stroke-primary-foreground\": themeMode === \"dark\",\n \"hawa-stroke-primary\": themeMode === \"light\",\n },\n classNames?.car,\n )}\n cx=\"20\"\n cy=\"20\"\n r=\"17.5\"\n fill=\"none\"\n pathLength=\"100\"\n strokeWidth=\"5px\"\n />\n </svg>\n );\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAAmD;;;ACAnD,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ACLA,IAAAC,SAAuB;AAGvB,sCAAuC;;;ACHvC,mBAAkB;AAIX,IAAM,aAAa,CAAC;AAAA,EACzB;AACF,MAGE,6BAAAC,QAAA;AAAA,EAAC;AAAA;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA,aAAa,8BAA8B;AAAA,IAC7C;AAAA;AAAA,EAEC;AACH;;;AChBF,IAAAC,SAAuB;;;ACAvB,IAAAC,gBAAkB;AAElB,uBAAkC;AAKlC,IAAM,iBAAiB,cAAAC,QAAM,WAK3B,CAAC,EAAE,WAAW,aAAa,GAAG,OAAO,WAAW,GAAG,MAAM,GAAG,QAC5D,8BAAAA,QAAA;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MAC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AAG,GAAG;AAAA,UACR;AAAA,QACF;AAAA;AAAA,MAEA,8BAAAA,QAAA,cAAC,UAAK,WAAU,kBAAe,OAAK;AAAA,MACpC,8BAAAA,QAAA;AAAA,QAAC;AAAA;AAAA,UACC,cAAW;AAAA,UACX,eAAY;AAAA,UACZ,WAAU;AAAA,UACV,MAAK;AAAA,UACL,SAAQ;AAAA;AAAA,QAER,8BAAAA,QAAA;AAAA,UAAC;AAAA;AAAA,YACC,UAAS;AAAA,YACT,GAAE;AAAA,YACF,UAAS;AAAA;AAAA,QACV;AAAA,MACH;AAAA,IACF;AAAA,EAEJ,CACF;AAEJ;","names":["import_react","React","React","React","import_react","React","import_react","React","React"]}
@@ -17,28 +17,17 @@ import { cva } from "class-variance-authority";
17
17
  // elements/helperText/HelperText.tsx
18
18
  import React from "react";
19
19
  var HelperText = ({
20
- helperText,
21
- size = "xs"
22
- }) => {
23
- let sizes = {
24
- xs: "hawa-text-xs hawa-h-4",
25
- sm: "hawa-text-sm",
26
- md: "hawa-text-md",
27
- lg: "hawa-text-lg",
28
- xl: "hawa-text-xl"
29
- };
30
- return /* @__PURE__ */ React.createElement(
31
- "p",
32
- {
33
- className: cn(
34
- "hawa-my-0 hawa-text-start hawa-text-helper-color hawa-transition-all",
35
- helperText ? "hawa-opacity-100" : "hawa-h-0 hawa-opacity-0",
36
- sizes[size]
37
- )
38
- },
39
- helperText
40
- );
41
- };
20
+ helperText
21
+ }) => /* @__PURE__ */ React.createElement(
22
+ "p",
23
+ {
24
+ className: cn(
25
+ "hawa-my-0 hawa-text-start hawa-text-helper-color hawa-transition-all hawa-text-xs",
26
+ helperText ? "hawa-opacity-100 hawa-h-4" : "hawa-h-0 hawa-opacity-0"
27
+ )
28
+ },
29
+ helperText
30
+ );
42
31
 
43
32
  // elements/label/Label.tsx
44
33
  import * as React3 from "react";
@@ -475,7 +464,7 @@ var Alert = ({
475
464
  severity = "none",
476
465
  duration,
477
466
  icon,
478
- className,
467
+ classNames,
479
468
  ...props
480
469
  }) => {
481
470
  const alertRef = useRef(null);
@@ -526,21 +515,25 @@ var Alert = ({
526
515
  "hawa-relative hawa-mb-4 hawa-flex hawa-flex-col hawa-rounded hawa-p-4 hawa-text-sm hawa-transition-all",
527
516
  styleVariant[severity],
528
517
  closed ? "hawa-opacity-0" : "hawa-opacity-100",
529
- className
518
+ classNames == null ? void 0 : classNames.root
530
519
  )
531
520
  },
532
521
  /* @__PURE__ */ React6.createElement("div", { className: "hawa-flex hawa-flex-row" }, icon && /* @__PURE__ */ React6.createElement(
533
522
  "div",
534
523
  {
535
- className: direction === "rtl" ? "hawa-pl-2 hawa-pt-1" : "hawa-pr-2 hawa-pt-1"
524
+ className: cn(
525
+ direction === "rtl" ? "hawa-pl-2 hawa-pt-1" : "hawa-pr-2 hawa-pt-1",
526
+ classNames == null ? void 0 : classNames.icon
527
+ )
536
528
  },
537
529
  icon
538
- ), /* @__PURE__ */ React6.createElement("div", { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ React6.createElement(
530
+ ), /* @__PURE__ */ React6.createElement("div", { className: cn("hawa-flex hawa-flex-col", classNames == null ? void 0 : classNames.content) }, /* @__PURE__ */ React6.createElement(
539
531
  "span",
540
532
  {
541
533
  className: cn(
542
534
  "hawa-font-bold",
543
- direction === "rtl" ? "hawa-ml-8" : "hawa-mr-8"
535
+ direction === "rtl" ? "hawa-ml-8" : "hawa-mr-8",
536
+ classNames == null ? void 0 : classNames.title
544
537
  )
545
538
  },
546
539
  props.title
@@ -549,19 +542,29 @@ var Alert = ({
549
542
  {
550
543
  className: cn(
551
544
  direction === "rtl" ? "hawa-ml-8" : "hawa-mr-8",
552
- props.persistent ? "hawa-w-full" : "hawa-w-[calc(100% - 40px)]"
545
+ props.persistent ? "hawa-w-full" : "hawa-w-[calc(100% - 40px)]",
546
+ classNames == null ? void 0 : classNames.text
553
547
  )
554
548
  },
555
549
  props.text
556
- ), props.actions && /* @__PURE__ */ React6.createElement("div", { className: "hawa-mt-2 hawa-flex hawa-flex-row hawa-gap-2" }, props.actions.map((act, index) => /* @__PURE__ */ React6.createElement(
557
- Button,
550
+ ), props.actions && /* @__PURE__ */ React6.createElement(
551
+ "div",
558
552
  {
559
- key: index,
560
- variant: act.variant,
561
- onClick: act.onClick()
553
+ className: cn(
554
+ "hawa-mt-2 hawa-flex hawa-flex-row hawa-gap-2",
555
+ classNames == null ? void 0 : classNames.actions
556
+ )
562
557
  },
563
- act.label
564
- ))))),
558
+ props.actions.map((act, index) => /* @__PURE__ */ React6.createElement(
559
+ Button,
560
+ {
561
+ key: index,
562
+ variant: act.variant,
563
+ onClick: act.onClick()
564
+ },
565
+ act.label
566
+ ))
567
+ ))),
565
568
  !props.persistent && /* @__PURE__ */ React6.createElement(
566
569
  "button",
567
570
  {
@@ -571,7 +574,8 @@ var Alert = ({
571
574
  className: cn(
572
575
  "hawa-absolute hawa-top-2 hawa-inline-flex hawa-h-9 hawa-w-9 hawa-items-center hawa-justify-center hawa-rounded-inner hawa-p-1.5 hawa-transition-all hover:hawa-text-gray-900",
573
576
  closeButtonStyle[severity],
574
- direction === "rtl" ? "hawa-left-2" : "hawa-right-2"
577
+ direction === "rtl" ? "hawa-left-2" : "hawa-right-2",
578
+ classNames == null ? void 0 : classNames.closeButton
575
579
  ),
576
580
  onClick: () => {
577
581
  if (props.onAlertClosed) {