@sikka/hawa 0.49.14-next → 0.49.15-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 (77) hide show
  1. package/dist/{Chip-KG1_ZmCL.d.mts → Chip-BRMzT5TB.d.mts} +2 -2
  2. package/dist/{Chip-Cw1twk4G.d.ts → Chip-D58g8OJ_.d.ts} +2 -2
  3. package/dist/accordion/index.d.mts +1 -1
  4. package/dist/accordion/index.d.ts +1 -1
  5. package/dist/accordion/index.js.map +1 -1
  6. package/dist/accordion/index.mjs.map +1 -1
  7. package/dist/appLayout/index.js +1 -1
  8. package/dist/appLayout/index.js.map +1 -1
  9. package/dist/appLayout/index.mjs +1 -1
  10. package/dist/appLayout/index.mjs.map +1 -1
  11. package/dist/badge/index.d.mts +1 -1
  12. package/dist/badge/index.d.ts +1 -1
  13. package/dist/badge/index.js +11 -2
  14. package/dist/badge/index.js.map +1 -1
  15. package/dist/badge/index.mjs +11 -2
  16. package/dist/badge/index.mjs.map +1 -1
  17. package/dist/blocks/auth/index.js +15 -15
  18. package/dist/blocks/auth/index.mjs +15 -15
  19. package/dist/blocks/index.d.mts +1 -1
  20. package/dist/blocks/index.d.ts +1 -1
  21. package/dist/blocks/index.js +15 -15
  22. package/dist/blocks/index.mjs +3 -3
  23. package/dist/button/index.d.mts +1 -1
  24. package/dist/button/index.d.ts +1 -1
  25. package/dist/chip/index.d.mts +2 -2
  26. package/dist/chip/index.d.ts +2 -2
  27. package/dist/chip/index.js.map +1 -1
  28. package/dist/chip/index.mjs.map +1 -1
  29. package/dist/{chunk-FTS7YP7U.mjs → chunk-NJJVVA2A.mjs} +16 -16
  30. package/dist/{chunk-5SQBJRWE.mjs → chunk-OWMN44TT.mjs} +1 -1
  31. package/dist/{chunk-3AANFRLZ.mjs → chunk-Z3ZL22XB.mjs} +1 -1
  32. package/dist/count/index.d.mts +2 -2
  33. package/dist/count/index.d.ts +2 -2
  34. package/dist/count/index.js.map +1 -1
  35. package/dist/count/index.mjs.map +1 -1
  36. package/dist/datePicker/index.d.mts +1 -1
  37. package/dist/datePicker/index.d.ts +1 -1
  38. package/dist/docsLayout/index.js +1 -1
  39. package/dist/docsLayout/index.js.map +1 -1
  40. package/dist/docsLayout/index.mjs +1 -1
  41. package/dist/docsLayout/index.mjs.map +1 -1
  42. package/dist/elements/index.d.mts +9 -7
  43. package/dist/elements/index.d.ts +9 -7
  44. package/dist/elements/index.js +32 -21
  45. package/dist/elements/index.mjs +20 -9
  46. package/dist/fileDropzone/index.js +6 -4
  47. package/dist/fileDropzone/index.js.map +1 -1
  48. package/dist/fileDropzone/index.mjs +6 -4
  49. package/dist/fileDropzone/index.mjs.map +1 -1
  50. package/dist/hooks/index.d.mts +2 -2
  51. package/dist/hooks/index.d.ts +2 -2
  52. package/dist/hooks/index.js +2 -2
  53. package/dist/hooks/index.mjs +2 -2
  54. package/dist/index.css +124 -124
  55. package/dist/index.d.mts +11 -9
  56. package/dist/index.d.ts +11 -9
  57. package/dist/index.js +35 -24
  58. package/dist/index.mjs +35 -24
  59. package/dist/layout/index.d.mts +1 -1
  60. package/dist/layout/index.d.ts +1 -1
  61. package/dist/layout/index.js +2 -2
  62. package/dist/layout/index.mjs +2 -2
  63. package/dist/pinInput/index.d.mts +4 -2
  64. package/dist/pinInput/index.d.ts +4 -2
  65. package/dist/pinInput/index.js +15 -15
  66. package/dist/pinInput/index.js.map +1 -1
  67. package/dist/pinInput/index.mjs +15 -15
  68. package/dist/pinInput/index.mjs.map +1 -1
  69. package/dist/sidebar/index.js.map +1 -1
  70. package/dist/sidebar/index.mjs.map +1 -1
  71. package/dist/splitButton/index.d.mts +1 -1
  72. package/dist/splitButton/index.d.ts +1 -1
  73. package/dist/tabs/index.d.mts +1 -1
  74. package/dist/tabs/index.d.ts +1 -1
  75. package/dist/tabs/index.js.map +1 -1
  76. package/dist/tabs/index.mjs.map +1 -1
  77. package/package.json +45 -45
@@ -3,8 +3,8 @@ import React__default, { FC, RefObject, ReactNode, ChangeEvent, InputHTMLAttribu
3
3
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
4
4
  import { P as PositionType, D as DirectionType, S as SeverityType, R as RadiusType, O as OrientationType } from '../commonTypes-C-g8nFFC.js';
5
5
  export { D as DropdownMenu, f as DropdownMenuCheckboxItem, d as DropdownMenuContent, k as DropdownMenuGroup, e as DropdownMenuItem, h as DropdownMenuLabel, b as DropdownMenuRadio, o as DropdownMenuRadioGroup, g as DropdownMenuRadioItem, a as DropdownMenuRoot, i as DropdownMenuSeparator, j as DropdownMenuShortcut, l as DropdownMenuSub, m as DropdownMenuSubContent, n as DropdownMenuSubTrigger, c as DropdownMenuTrigger, M as MenuItemType, S as SubItem } from '../DropdownMenu-CDnFCzfc.js';
6
- import { a as ChipTypes } from '../Chip-Cw1twk4G.js';
7
- export { b as Chip, C as ChipColors } from '../Chip-Cw1twk4G.js';
6
+ import { a as ChipTypes } from '../Chip-D58g8OJ_.js';
7
+ export { b as Chip, C as ChipColors } from '../Chip-D58g8OJ_.js';
8
8
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
9
9
  import * as class_variance_authority_types from 'class-variance-authority/types';
10
10
  import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
@@ -337,7 +337,7 @@ interface AvatarProps {
337
337
  declare const Avatar: React__default.FC<AvatarProps>;
338
338
 
339
339
  declare const buttonVariants: (props?: ({
340
- variant?: "link" | "default" | "combobox" | "light" | "destructive" | "outline" | "secondary" | "ghost" | "neoBrutalism" | null | undefined;
340
+ variant?: "link" | "combobox" | "default" | "light" | "destructive" | "outline" | "secondary" | "ghost" | "neoBrutalism" | null | undefined;
341
341
  size?: "default" | "icon" | "xs" | "sm" | "lg" | "xl" | "heightless" | "smallIcon" | null | undefined;
342
342
  } & class_variance_authority_types.ClassProp) | undefined) => string;
343
343
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
@@ -740,7 +740,7 @@ declare const AppStores: FC<StoreButtonsTypes>;
740
740
 
741
741
  type BadgeTypes = {
742
742
  position: "right" | "left";
743
- anchor: RefObject<HTMLElement>;
743
+ anchor: RefObject<HTMLDivElement | null>;
744
744
  size?: "small" | "default" | "large";
745
745
  text?: string | number;
746
746
  className?: string;
@@ -748,25 +748,27 @@ type BadgeTypes = {
748
748
  declare const Badge: FC<BadgeTypes>;
749
749
  declare const BadgedComponent: ({ children, className, hideBadge, position, size, text }: any) => React__default.JSX.Element;
750
750
 
751
- declare const PinInputRoot: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "containerClassName" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "noScriptCSSFallback"> & {
751
+ declare const PinInputRoot: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "containerClassName" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "noScriptCSSFallback"> & {
752
752
  value?: string;
753
753
  onChange?: (newValue: string) => unknown;
754
754
  maxLength: number;
755
755
  textAlign?: "left" | "center" | "right";
756
756
  onComplete?: (...args: any[]) => unknown;
757
757
  pushPasswordManagerStrategy?: "increase-width" | "none";
758
+ pasteTransformer?: (pasted: string) => string;
758
759
  containerClassName?: string;
759
760
  noScriptCSSFallback?: string | null;
760
761
  } & {
761
762
  render: (props: input_otp.RenderProps) => React.ReactNode;
762
763
  children?: never;
763
- } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "containerClassName" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "noScriptCSSFallback"> & {
764
+ } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "containerClassName" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "noScriptCSSFallback"> & {
764
765
  value?: string;
765
766
  onChange?: (newValue: string) => unknown;
766
767
  maxLength: number;
767
768
  textAlign?: "left" | "center" | "right";
768
769
  onComplete?: (...args: any[]) => unknown;
769
770
  pushPasswordManagerStrategy?: "increase-width" | "none";
771
+ pasteTransformer?: (pasted: string) => string;
770
772
  containerClassName?: string;
771
773
  noScriptCSSFallback?: string | null;
772
774
  } & {
@@ -947,7 +949,7 @@ declare const Carousel: React__default.FC<CarouselProps>;
947
949
 
948
950
  type IconCountTypes = {
949
951
  /** The icon of the counter */
950
- icon: JSX.Element;
952
+ icon: React__default.JSX.Element;
951
953
  /** The text next to the icon */
952
954
  count?: string;
953
955
  };
@@ -4128,11 +4128,13 @@ var FileDropzone = ({
4128
4128
  var _a, _b, _c, _d, _e, _f;
4129
4129
  const [cmp, setCmp] = (0, import_react14.useState)(0);
4130
4130
  const [max, setMax] = (0, import_react14.useState)(0);
4131
+ const [filesAccepted, setFilesAccepted] = (0, import_react14.useState)([]);
4131
4132
  const { getRootProps, getInputProps, fileRejections, acceptedFiles, isDragActive } = (0, import_react_dropzone.useDropzone)({
4132
4133
  multiple: true,
4133
4134
  accept,
4134
4135
  maxSize,
4135
4136
  maxFiles,
4137
+ useFsAccessApi: true,
4136
4138
  onDrop: (acceptedFiles2) => {
4137
4139
  setFiles(
4138
4140
  acceptedFiles2.map(
@@ -4155,12 +4157,12 @@ var FileDropzone = ({
4155
4157
  setFiles(acceptedFiles);
4156
4158
  }, [acceptedFiles, cmp, setFiles]);
4157
4159
  onClearFiles = () => {
4158
- acceptedFiles.length = 0;
4159
- acceptedFiles.splice(0, acceptedFiles.length);
4160
+ setFilesAccepted([]);
4161
+ setFilesAccepted(filesAccepted.splice(0, filesAccepted.length));
4160
4162
  setFiles([]);
4161
4163
  };
4162
4164
  const clearAllFiles = () => {
4163
- acceptedFiles.length = 0;
4165
+ setFilesAccepted([]);
4164
4166
  setFiles([]);
4165
4167
  };
4166
4168
  (0, import_react14.useEffect)(() => {
@@ -4188,7 +4190,7 @@ var FileDropzone = ({
4188
4190
  {
4189
4191
  onClick: (e) => {
4190
4192
  e.stopPropagation();
4191
- acceptedFiles.splice(acceptedFiles.indexOf(file), 1);
4193
+ setFilesAccepted(filesAccepted.splice(filesAccepted.indexOf(file), 1));
4192
4194
  setCmp(Math.random);
4193
4195
  onDeleteFile(file);
4194
4196
  },
@@ -5057,7 +5059,7 @@ var Badge = ({
5057
5059
  (0, import_react38.useEffect)(() => {
5058
5060
  const handlePositioning = () => {
5059
5061
  var _a;
5060
- if (anchor.current && indicatorRef.current) {
5062
+ if (anchor && anchor.current && indicatorRef.current) {
5061
5063
  const rect = anchor.current.getBoundingClientRect();
5062
5064
  const parentRect = (_a = indicatorRef.current.parentElement) == null ? void 0 : _a.getBoundingClientRect();
5063
5065
  const style = window.getComputedStyle(anchor.current);
@@ -5096,7 +5098,16 @@ var Badge = ({
5096
5098
  };
5097
5099
  var BadgedComponent = ({ children, className, hideBadge, position, size, text }) => {
5098
5100
  const ref = (0, import_react38.useRef)(null);
5099
- return /* @__PURE__ */ import_react38.default.createElement("div", { className: cn("hawa-relative hawa-w-fit", className), ref }, !hideBadge && /* @__PURE__ */ import_react38.default.createElement(Badge, { size, text, position, anchor: ref, className: "hawa-z-10" }), children);
5101
+ return /* @__PURE__ */ import_react38.default.createElement("div", { className: cn("hawa-relative hawa-w-fit", className), ref }, !hideBadge && /* @__PURE__ */ import_react38.default.createElement(
5102
+ Badge,
5103
+ {
5104
+ size,
5105
+ text,
5106
+ position,
5107
+ anchor: ref || null,
5108
+ className: "hawa-z-10"
5109
+ }
5110
+ ), children);
5100
5111
  };
5101
5112
 
5102
5113
  // elements/phoneInput/PhoneInput.tsx
@@ -6859,19 +6870,19 @@ var PhoneInput = ({
6859
6870
  var React50 = __toESM(require("react"));
6860
6871
  var import_input_otp = require("input-otp");
6861
6872
 
6862
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
6873
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
6863
6874
  var import_react41 = require("react");
6864
6875
 
6865
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
6876
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
6866
6877
  var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
6867
6878
  var mergeClasses = (...classes) => classes.filter((className, index, array) => {
6868
- return Boolean(className) && array.indexOf(className) === index;
6869
- }).join(" ");
6879
+ return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
6880
+ }).join(" ").trim();
6870
6881
 
6871
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
6882
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
6872
6883
  var import_react40 = require("react");
6873
6884
 
6874
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
6885
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
6875
6886
  var defaultAttributes = {
6876
6887
  xmlns: "http://www.w3.org/2000/svg",
6877
6888
  width: 24,
@@ -6884,7 +6895,7 @@ var defaultAttributes = {
6884
6895
  strokeLinejoin: "round"
6885
6896
  };
6886
6897
 
6887
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
6898
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
6888
6899
  var Icon = (0, import_react40.forwardRef)(
6889
6900
  ({
6890
6901
  color = "currentColor",
@@ -6916,7 +6927,7 @@ var Icon = (0, import_react40.forwardRef)(
6916
6927
  }
6917
6928
  );
6918
6929
 
6919
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
6930
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
6920
6931
  var createLucideIcon = (iconName, iconNode) => {
6921
6932
  const Component = (0, import_react41.forwardRef)(
6922
6933
  ({ className, ...props }, ref) => (0, import_react41.createElement)(Icon, {
@@ -6930,7 +6941,7 @@ var createLucideIcon = (iconName, iconNode) => {
6930
6941
  return Component;
6931
6942
  };
6932
6943
 
6933
- // ../../node_modules/.pnpm/lucide-react@0.441.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
6944
+ // ../../node_modules/.pnpm/lucide-react@0.468.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
6934
6945
  var Dot = createLucideIcon("Dot", [
6935
6946
  ["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
6936
6947
  ]);
@@ -8385,7 +8396,7 @@ var PhoneMockup = ({
8385
8396
 
8386
8397
  lucide-react/dist/esm/shared/src/utils.js:
8387
8398
  (**
8388
- * @license lucide-react v0.441.0 - ISC
8399
+ * @license lucide-react v0.468.0 - ISC
8389
8400
  *
8390
8401
  * This source code is licensed under the ISC license.
8391
8402
  * See the LICENSE file in the root directory of this source tree.
@@ -8393,7 +8404,7 @@ lucide-react/dist/esm/shared/src/utils.js:
8393
8404
 
8394
8405
  lucide-react/dist/esm/defaultAttributes.js:
8395
8406
  (**
8396
- * @license lucide-react v0.441.0 - ISC
8407
+ * @license lucide-react v0.468.0 - ISC
8397
8408
  *
8398
8409
  * This source code is licensed under the ISC license.
8399
8410
  * See the LICENSE file in the root directory of this source tree.
@@ -8401,7 +8412,7 @@ lucide-react/dist/esm/defaultAttributes.js:
8401
8412
 
8402
8413
  lucide-react/dist/esm/Icon.js:
8403
8414
  (**
8404
- * @license lucide-react v0.441.0 - ISC
8415
+ * @license lucide-react v0.468.0 - ISC
8405
8416
  *
8406
8417
  * This source code is licensed under the ISC license.
8407
8418
  * See the LICENSE file in the root directory of this source tree.
@@ -8409,7 +8420,7 @@ lucide-react/dist/esm/Icon.js:
8409
8420
 
8410
8421
  lucide-react/dist/esm/createLucideIcon.js:
8411
8422
  (**
8412
- * @license lucide-react v0.441.0 - ISC
8423
+ * @license lucide-react v0.468.0 - ISC
8413
8424
  *
8414
8425
  * This source code is licensed under the ISC license.
8415
8426
  * See the LICENSE file in the root directory of this source tree.
@@ -8417,7 +8428,7 @@ lucide-react/dist/esm/createLucideIcon.js:
8417
8428
 
8418
8429
  lucide-react/dist/esm/icons/dot.js:
8419
8430
  (**
8420
- * @license lucide-react v0.441.0 - ISC
8431
+ * @license lucide-react v0.468.0 - ISC
8421
8432
  *
8422
8433
  * This source code is licensed under the ISC license.
8423
8434
  * See the LICENSE file in the root directory of this source tree.
@@ -8425,7 +8436,7 @@ lucide-react/dist/esm/icons/dot.js:
8425
8436
 
8426
8437
  lucide-react/dist/esm/lucide-react.js:
8427
8438
  (**
8428
- * @license lucide-react v0.441.0 - ISC
8439
+ * @license lucide-react v0.468.0 - ISC
8429
8440
  *
8430
8441
  * This source code is licensed under the ISC license.
8431
8442
  * See the LICENSE file in the root directory of this source tree.
@@ -26,10 +26,10 @@ import {
26
26
  TabsList,
27
27
  TabsTrigger,
28
28
  Textarea
29
- } from "../chunk-FTS7YP7U.mjs";
29
+ } from "../chunk-NJJVVA2A.mjs";
30
30
  import {
31
31
  useClipboard
32
- } from "../chunk-3AANFRLZ.mjs";
32
+ } from "../chunk-Z3ZL22XB.mjs";
33
33
  import {
34
34
  Sheet,
35
35
  SheetClose,
@@ -84,7 +84,7 @@ import {
84
84
  } from "../chunk-YGLAEAJY.mjs";
85
85
  import {
86
86
  __require
87
- } from "../chunk-5SQBJRWE.mjs";
87
+ } from "../chunk-OWMN44TT.mjs";
88
88
 
89
89
  // elements/accordion/Accordion.tsx
90
90
  import * as React3 from "react";
@@ -1726,11 +1726,13 @@ var FileDropzone = ({
1726
1726
  var _a, _b, _c, _d, _e, _f;
1727
1727
  const [cmp, setCmp] = useState5(0);
1728
1728
  const [max, setMax] = useState5(0);
1729
+ const [filesAccepted, setFilesAccepted] = useState5([]);
1729
1730
  const { getRootProps, getInputProps, fileRejections, acceptedFiles, isDragActive } = useDropzone({
1730
1731
  multiple: true,
1731
1732
  accept,
1732
1733
  maxSize,
1733
1734
  maxFiles,
1735
+ useFsAccessApi: true,
1734
1736
  onDrop: (acceptedFiles2) => {
1735
1737
  setFiles(
1736
1738
  acceptedFiles2.map(
@@ -1753,12 +1755,12 @@ var FileDropzone = ({
1753
1755
  setFiles(acceptedFiles);
1754
1756
  }, [acceptedFiles, cmp, setFiles]);
1755
1757
  onClearFiles = () => {
1756
- acceptedFiles.length = 0;
1757
- acceptedFiles.splice(0, acceptedFiles.length);
1758
+ setFilesAccepted([]);
1759
+ setFilesAccepted(filesAccepted.splice(0, filesAccepted.length));
1758
1760
  setFiles([]);
1759
1761
  };
1760
1762
  const clearAllFiles = () => {
1761
- acceptedFiles.length = 0;
1763
+ setFilesAccepted([]);
1762
1764
  setFiles([]);
1763
1765
  };
1764
1766
  useEffect4(() => {
@@ -1786,7 +1788,7 @@ var FileDropzone = ({
1786
1788
  {
1787
1789
  onClick: (e) => {
1788
1790
  e.stopPropagation();
1789
- acceptedFiles.splice(acceptedFiles.indexOf(file), 1);
1791
+ setFilesAccepted(filesAccepted.splice(filesAccepted.indexOf(file), 1));
1790
1792
  setCmp(Math.random);
1791
1793
  onDeleteFile(file);
1792
1794
  },
@@ -2060,7 +2062,7 @@ var Badge = ({
2060
2062
  useEffect6(() => {
2061
2063
  const handlePositioning = () => {
2062
2064
  var _a;
2063
- if (anchor.current && indicatorRef.current) {
2065
+ if (anchor && anchor.current && indicatorRef.current) {
2064
2066
  const rect = anchor.current.getBoundingClientRect();
2065
2067
  const parentRect = (_a = indicatorRef.current.parentElement) == null ? void 0 : _a.getBoundingClientRect();
2066
2068
  const style = window.getComputedStyle(anchor.current);
@@ -2099,7 +2101,16 @@ var Badge = ({
2099
2101
  };
2100
2102
  var BadgedComponent = ({ children, className, hideBadge, position, size, text }) => {
2101
2103
  const ref = useRef5(null);
2102
- return /* @__PURE__ */ React19.createElement("div", { className: cn("hawa-relative hawa-w-fit", className), ref }, !hideBadge && /* @__PURE__ */ React19.createElement(Badge, { size, text, position, anchor: ref, className: "hawa-z-10" }), children);
2104
+ return /* @__PURE__ */ React19.createElement("div", { className: cn("hawa-relative hawa-w-fit", className), ref }, !hideBadge && /* @__PURE__ */ React19.createElement(
2105
+ Badge,
2106
+ {
2107
+ size,
2108
+ text,
2109
+ position,
2110
+ anchor: ref || null,
2111
+ className: "hawa-z-10"
2112
+ }
2113
+ ), children);
2103
2114
  };
2104
2115
 
2105
2116
  // elements/colorPicker/ColorPicker.tsx
@@ -633,11 +633,13 @@ var FileDropzone = ({
633
633
  var _a, _b, _c, _d, _e, _f;
634
634
  const [cmp, setCmp] = (0, import_react5.useState)(0);
635
635
  const [max, setMax] = (0, import_react5.useState)(0);
636
+ const [filesAccepted, setFilesAccepted] = (0, import_react5.useState)([]);
636
637
  const { getRootProps, getInputProps, fileRejections, acceptedFiles, isDragActive } = (0, import_react_dropzone.useDropzone)({
637
638
  multiple: true,
638
639
  accept,
639
640
  maxSize,
640
641
  maxFiles,
642
+ useFsAccessApi: true,
641
643
  onDrop: (acceptedFiles2) => {
642
644
  setFiles(
643
645
  acceptedFiles2.map(
@@ -660,12 +662,12 @@ var FileDropzone = ({
660
662
  setFiles(acceptedFiles);
661
663
  }, [acceptedFiles, cmp, setFiles]);
662
664
  onClearFiles = () => {
663
- acceptedFiles.length = 0;
664
- acceptedFiles.splice(0, acceptedFiles.length);
665
+ setFilesAccepted([]);
666
+ setFilesAccepted(filesAccepted.splice(0, filesAccepted.length));
665
667
  setFiles([]);
666
668
  };
667
669
  const clearAllFiles = () => {
668
- acceptedFiles.length = 0;
670
+ setFilesAccepted([]);
669
671
  setFiles([]);
670
672
  };
671
673
  (0, import_react5.useEffect)(() => {
@@ -693,7 +695,7 @@ var FileDropzone = ({
693
695
  {
694
696
  onClick: (e) => {
695
697
  e.stopPropagation();
696
- acceptedFiles.splice(acceptedFiles.indexOf(file), 1);
698
+ setFilesAccepted(filesAccepted.splice(filesAccepted.indexOf(file), 1));
697
699
  setCmp(Math.random);
698
700
  onDeleteFile(file);
699
701
  },
@@ -1 +1 @@
1
- {"version":3,"sources":["../../elements/fileDropzone/index.ts","../../elements/fileDropzone/FileDropzone.tsx","../../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 \"./FileDropzone\";\n","import React, { useEffect, useState } from \"react\";\nimport { useDropzone } from \"react-dropzone\";\n\nimport clsx from \"clsx\";\n\nimport { Alert } from \"../alert/Alert\";\nimport { Button } from \"../button\";\n\ntype FileDropzoneTypes = {\n /** The text label above the component. Consistant with the other form input fields */\n label?: string;\n files: [File];\n setFiles: any;\n setDeletedFiles: any;\n maxFiles: number;\n accept: any;\n onAcceptedFiles: any;\n showPreview: any;\n onDeleteFile: any;\n onClearFiles: any;\n maxSize: number;\n errorMessages: string;\n disclaimer?: boolean;\n termsLink?: string;\n privacyLink?: string;\n /** The translation object, use this to replace the default text with any translated text you want.*/\n texts: {\n errorUploading: any;\n clickHereToUpload: any;\n maxFileSize: any;\n tooManyFiles: any;\n fileTooLarge: any;\n acceptedFileTypes: any;\n invalidFileType: any;\n terms?: string;\n privacyPolicy?: string;\n disclaimer?: string;\n and?: string;\n };\n};\n\nexport const FileDropzone: React.FunctionComponent<FileDropzoneTypes> = ({\n texts,\n files,\n setFiles,\n setDeletedFiles,\n onAcceptedFiles,\n errorMessages,\n maxFiles,\n accept,\n showPreview,\n onDeleteFile,\n onClearFiles,\n disclaimer,\n maxSize,\n label,\n termsLink,\n privacyLink,\n}) => {\n const [cmp, setCmp] = useState(0);\n const [max, setMax] = useState<any>(0);\n\n const { getRootProps, getInputProps, fileRejections, acceptedFiles, isDragActive } = useDropzone({\n multiple: true,\n accept: accept,\n maxSize: maxSize,\n maxFiles: maxFiles,\n onDrop: (acceptedFiles: any) => {\n setFiles(\n acceptedFiles.map((file: any, index: any) =>\n Object.assign(file, {\n preview: URL.createObjectURL(file),\n }),\n ),\n );\n },\n });\n useEffect(\n () => () => {\n files?.forEach((file: any) => {\n URL.revokeObjectURL(file.preview);\n });\n },\n [files],\n );\n useEffect(() => {\n setFiles(acceptedFiles);\n }, [acceptedFiles, cmp, setFiles]);\n onClearFiles = () => {\n acceptedFiles.length = 0;\n acceptedFiles.splice(0, acceptedFiles.length);\n setFiles([]);\n };\n\n const clearAllFiles = () => {\n acceptedFiles.length = 0;\n setFiles([]);\n };\n\n useEffect(() => {\n if (maxSize > 0) {\n const k = 1024;\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"];\n const i = Math.floor(Math.log(maxSize) / Math.log(1024));\n\n setMax(parseFloat((maxSize / Math.pow(1024, i)).toFixed(2)) + \" \" + sizes[i]);\n }\n }, [maxSize]);\n const errs = fileRejections.map((rej: any, i: any) => {\n switch (rej.errors[0].code) {\n case \"file-too-large\":\n return <Alert key={i} text={rej.file.name} title={texts.fileTooLarge} severity=\"error\" />;\n case \"too-many-files\":\n return <Alert key={i} text={rej.file.name} title={texts.tooManyFiles} severity=\"error\" />;\n case \"file-invalid-type\":\n return (\n <Alert key={i} text={rej.file.name} title={texts.invalidFileType} severity=\"error\" />\n );\n\n default:\n return <Alert key={i} text={rej.file.name} title={rej.errors[0].code} severity=\"error\" />;\n }\n });\n const thumbs = files?.map((file: any, index: any) => (\n <div className=\"hawa-relative hawa-rounded\" key={index}>\n <button\n onClick={(e) => {\n e.stopPropagation();\n acceptedFiles.splice(acceptedFiles.indexOf(file), 1);\n setCmp(Math.random);\n onDeleteFile(file);\n }}\n type=\"button\"\n className=\"hawa-absolute hawa-left-0 hawa-ml-auto hawa-inline-flex hawa-items-center hawa-rounded-inner hawa-rounded-bl-none hawa-rounded-tr-none hawa-bg-gray-900 hawa-p-1.5 hawa-text-sm hawa-text-gray-400 hawa-transition-all hover:hawa-bg-gray-200 hover:hawa-text-gray-900 dark:hover:hawa-bg-gray-600 dark:hover:hawa-text-white\"\n data-modal-toggle=\"defaultModal\"\n >\n <svg\n aria-hidden=\"true\"\n className=\"hawa-h-5 hawa-w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n <span className=\"hawa-sr-only\">Close modal</span>\n </button>\n\n <div\n style={{\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n overflow: \"hidden\",\n height: 100,\n width: 100,\n backgroundImage: `url(${file.preview})`,\n backgroundSize: \"cover\",\n backgroundPosition: \"center\",\n border: \"1px solid black\",\n }}\n className=\"hawa-rounded\"\n key={file.name}\n />\n </div>\n ));\n\n return (\n <div>\n {label && (\n <div className=\"hawa-mb-2 hawa-block hawa-text-sm hawa-font-medium hawa-text-gray-900 dark:hawa-text-gray-300\">\n {label}\n </div>\n )}\n <div\n className={clsx(\n \"hawa-flex hawa-flex-col hawa-justify-center hawa-rounded hawa-border hawa-border-dashed hawa-p-6 hawa-transition-all\",\n isDragActive ? \"hawa-bg-muted\" : \"hawa-bg-muted/20 hover:hawa-bg-muted/50\",\n )}\n >\n <div {...getRootProps({})}>\n <p {...getInputProps()} />\n <div className=\"hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-gap-2 hawa-pt-4 hawa-text-center\">\n <svg\n stroke=\"currentColor\"\n fill=\"none\"\n strokeWidth=\"2\"\n viewBox=\"0 0 24 24\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n height=\"1.5em\"\n width=\"1.5em\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n <path d=\"M19 11v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2\"></path>\n <path d=\"M13 13l9 3l-4 2l-2 4l-3 -9\"></path>\n <path d=\"M3 3l0 .01\"></path>\n <path d=\"M7 3l0 .01\"></path>\n <path d=\"M11 3l0 .01\"></path>\n <path d=\"M15 3l0 .01\"></path>\n <path d=\"M3 7l0 .01\"></path>\n <path d=\"M3 11l0 .01\"></path>\n <path d=\"M3 15l0 .01\"></path>\n </svg>\n {typeof texts.clickHereToUpload === \"function\"\n ? texts.clickHereToUpload()\n : texts.clickHereToUpload}\n </div>\n <div className=\"hawa-select-none hawa-pt-2 hawa-text-center hawa-text-xs\">\n {texts.acceptedFileTypes} {accept.split(\",\")}\n </div>\n <div className=\"hawa-select-none hawa-pb-2 hawa-pt-1 hawa-text-center hawa-text-xs\">\n {texts.maxFileSize} {max}\n </div>\n </div>\n {acceptedFiles.length > 0 && (\n <div className=\"hawa-flex hawa-justify-center hawa-rounded-lg hawa-p-2\">\n <Button onClick={clearAllFiles}>Clear All</Button>\n </div>\n )}\n {acceptedFiles.length > 0 && thumbs && showPreview ? (\n <aside className=\"hawa-flex hawa-flex-row hawa-flex-wrap hawa-justify-center hawa-gap-2 hawa-rounded-lg hawa-p-2\">\n {thumbs}\n </aside>\n ) : null}\n <div className=\"px-4\">{fileRejections[0]?.errors[0]?.code && errs}</div>\n </div>\n {disclaimer && (\n <div className=\"hawa-mt-2 hawa-text-sm hawa-text-muted-foreground/50\">\n {texts.disclaimer ?? \"By uploading a file you agree to our\"}{\" \"}\n <a href={termsLink} className=\"clickable-link hawa-text-muted-foreground/50\">\n {texts.terms ?? \"Terms\"}\n </a>{\" \"}\n {texts.and ?? \"and\"}{\" \"}\n <a href={privacyLink} className=\"clickable-link hawa-text-muted-foreground/50\">\n {texts.privacyPolicy ?? \"Privacy Policy\"}\n </a>\n </div>\n )}\n </div>\n );\n};\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: \"outline\" | \"link\" | \"default\" | \"destructive\" | \"secondary\" | \"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\" ? \"hawa-pl-2 hawa-pt-1\" : \"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(\"hawa-mt-2 hawa-flex hawa-flex-row hawa-gap-2\", classNames?.actions)}\n >\n {props.actions.map((act, index) => (\n <Button key={index} variant={act.variant} onClick={act.onClick()}>\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(alertRef?.current.children[0]);\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(sanitizedHex);\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: \"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: \"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={size === \"icon\" || size === \"smallIcon\" ? \"spinner\" : \"dots-pulse\"}\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={size === \"icon\" || size === \"smallIcon\" ? \"spinner\" : \"dots-pulse\"}\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 = ({ helperText }: { helperText?: string | React.ReactNode }) => (\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 delayDuration={delayDuration} {...providerProps}>\n <TooltipPrimitive.Root\n open={!disabled && open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}\n {...props}\n >\n <TooltipPrimitive.Trigger {...triggerProps}>{children}</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 className={cn(\"hawa-flex hawa-flex-row hawa-gap-2\", classNames?.container)}>\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(\"squircle-container\", sizeStyles[size], classNames?.container)}\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(\"squircle-container\", sizeStyles[size], classNames?.container)}\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 <div className={cn(\"orbit-container\", classNames?.container)}></div>;\n\n default:\n return (\n <svg\n viewBox=\"0 0 40 40\"\n height=\"40\"\n width=\"40\"\n className={cn(\"circle-container\", sizeStyles[size], classNames?.container)}\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,gBAA2C;AAC3C,4BAA4B;AAE5B,IAAAC,eAAiB;;;ACHjB,IAAAC,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,EAAE,WAAW,MACtC,6BAAAC,QAAA;AAAA,EAAC;AAAA;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA,aAAa,8BAA8B;AAAA,IAC7C;AAAA;AAAA,EAEC;AACH;;;ACZF,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,MACT;AAAA,MACA;AAAA,QACE,gBAAgB,SAAS;AAAA,QACzB,gBAAgB,SAAS;AAAA,MAC3B;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,eAAe,cAA+B,yBAAQ;AAEtD,IAAM,eAAe,cAAAA,QAAM,WAGzB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,8BAAAA,QAAA,cAAkB,wBAAjB,EAAuB,KAAU,WAAW,GAA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;","names":["import_react","import_clsx","import_react","React","React","React","import_react","React","import_react","React","React","acceptedFiles","React","clsx"]}
1
+ {"version":3,"sources":["../../elements/fileDropzone/index.ts","../../elements/fileDropzone/FileDropzone.tsx","../../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 \"./FileDropzone\";\n","import React, { useEffect, useState } from \"react\";\nimport { useDropzone } from \"react-dropzone\";\n\nimport clsx from \"clsx\";\n\nimport { Alert } from \"../alert/Alert\";\nimport { Button } from \"../button\";\n\ntype FileDropzoneTypes = {\n /** The text label above the component. Consistant with the other form input fields */\n label?: string;\n files: [File];\n setFiles: any;\n setDeletedFiles: any;\n maxFiles: number;\n accept: any;\n onAcceptedFiles: any;\n showPreview: any;\n onDeleteFile: any;\n onClearFiles: any;\n maxSize: number;\n errorMessages: string;\n disclaimer?: boolean;\n termsLink?: string;\n privacyLink?: string;\n /** The translation object, use this to replace the default text with any translated text you want.*/\n texts: {\n errorUploading: any;\n clickHereToUpload: any;\n maxFileSize: any;\n tooManyFiles: any;\n fileTooLarge: any;\n acceptedFileTypes: any;\n invalidFileType: any;\n terms?: string;\n privacyPolicy?: string;\n disclaimer?: string;\n and?: string;\n };\n};\n\nexport const FileDropzone: React.FunctionComponent<FileDropzoneTypes> = ({\n texts,\n files,\n setFiles,\n setDeletedFiles,\n onAcceptedFiles,\n errorMessages,\n maxFiles,\n accept,\n showPreview,\n onDeleteFile,\n onClearFiles,\n disclaimer,\n maxSize,\n label,\n termsLink,\n privacyLink,\n}) => {\n const [cmp, setCmp] = useState(0);\n const [max, setMax] = useState<any>(0);\n const [filesAccepted, setFilesAccepted] = useState<any>([]);\n\n const { getRootProps, getInputProps, fileRejections, acceptedFiles, isDragActive } = useDropzone({\n multiple: true,\n accept: accept,\n maxSize: maxSize,\n maxFiles: maxFiles,\n useFsAccessApi: true,\n onDrop: (acceptedFiles) => {\n setFiles(\n acceptedFiles.map((file: any, index: any) =>\n Object.assign(file, {\n preview: URL.createObjectURL(file),\n }),\n ),\n );\n },\n });\n useEffect(\n () => () => {\n files?.forEach((file: any) => {\n URL.revokeObjectURL(file.preview);\n });\n },\n [files],\n );\n useEffect(() => {\n setFiles(acceptedFiles);\n }, [acceptedFiles, cmp, setFiles]);\n\n onClearFiles = () => {\n setFilesAccepted([]);\n setFilesAccepted(filesAccepted.splice(0, filesAccepted.length));\n setFiles([]);\n };\n\n const clearAllFiles = () => {\n setFilesAccepted([]);\n setFiles([]);\n };\n\n useEffect(() => {\n if (maxSize > 0) {\n const k = 1024;\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\", \"ZB\", \"YB\"];\n const i = Math.floor(Math.log(maxSize) / Math.log(1024));\n\n setMax(parseFloat((maxSize / Math.pow(1024, i)).toFixed(2)) + \" \" + sizes[i]);\n }\n }, [maxSize]);\n const errs = fileRejections.map((rej: any, i: any) => {\n switch (rej.errors[0].code) {\n case \"file-too-large\":\n return <Alert key={i} text={rej.file.name} title={texts.fileTooLarge} severity=\"error\" />;\n case \"too-many-files\":\n return <Alert key={i} text={rej.file.name} title={texts.tooManyFiles} severity=\"error\" />;\n case \"file-invalid-type\":\n return (\n <Alert key={i} text={rej.file.name} title={texts.invalidFileType} severity=\"error\" />\n );\n\n default:\n return <Alert key={i} text={rej.file.name} title={rej.errors[0].code} severity=\"error\" />;\n }\n });\n const thumbs = files?.map((file: any, index: any) => (\n <div className=\"hawa-relative hawa-rounded\" key={index}>\n <button\n onClick={(e) => {\n e.stopPropagation();\n setFilesAccepted(filesAccepted.splice(filesAccepted.indexOf(file), 1));\n setCmp(Math.random);\n onDeleteFile(file);\n }}\n type=\"button\"\n className=\"hawa-absolute hawa-left-0 hawa-ml-auto hawa-inline-flex hawa-items-center hawa-rounded-inner hawa-rounded-bl-none hawa-rounded-tr-none hawa-bg-gray-900 hawa-p-1.5 hawa-text-sm hawa-text-gray-400 hawa-transition-all hover:hawa-bg-gray-200 hover:hawa-text-gray-900 dark:hover:hawa-bg-gray-600 dark:hover:hawa-text-white\"\n data-modal-toggle=\"defaultModal\"\n >\n <svg\n aria-hidden=\"true\"\n className=\"hawa-h-5 hawa-w-5\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n <span className=\"hawa-sr-only\">Close modal</span>\n </button>\n\n <div\n style={{\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n overflow: \"hidden\",\n height: 100,\n width: 100,\n backgroundImage: `url(${file.preview})`,\n backgroundSize: \"cover\",\n backgroundPosition: \"center\",\n border: \"1px solid black\",\n }}\n className=\"hawa-rounded\"\n key={file.name}\n />\n </div>\n ));\n\n return (\n <div>\n {label && (\n <div className=\"hawa-mb-2 hawa-block hawa-text-sm hawa-font-medium hawa-text-gray-900 dark:hawa-text-gray-300\">\n {label}\n </div>\n )}\n <div\n className={clsx(\n \"hawa-flex hawa-flex-col hawa-justify-center hawa-rounded hawa-border hawa-border-dashed hawa-p-6 hawa-transition-all\",\n isDragActive ? \"hawa-bg-muted\" : \"hawa-bg-muted/20 hover:hawa-bg-muted/50\",\n )}\n >\n <div {...getRootProps({})}>\n <p {...getInputProps()} />\n <div className=\"hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-gap-2 hawa-pt-4 hawa-text-center\">\n <svg\n stroke=\"currentColor\"\n fill=\"none\"\n strokeWidth=\"2\"\n viewBox=\"0 0 24 24\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n height=\"1.5em\"\n width=\"1.5em\"\n >\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n <path d=\"M19 11v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2\"></path>\n <path d=\"M13 13l9 3l-4 2l-2 4l-3 -9\"></path>\n <path d=\"M3 3l0 .01\"></path>\n <path d=\"M7 3l0 .01\"></path>\n <path d=\"M11 3l0 .01\"></path>\n <path d=\"M15 3l0 .01\"></path>\n <path d=\"M3 7l0 .01\"></path>\n <path d=\"M3 11l0 .01\"></path>\n <path d=\"M3 15l0 .01\"></path>\n </svg>\n {typeof texts.clickHereToUpload === \"function\"\n ? texts.clickHereToUpload()\n : texts.clickHereToUpload}\n </div>\n <div className=\"hawa-select-none hawa-pt-2 hawa-text-center hawa-text-xs\">\n {texts.acceptedFileTypes} {accept.split(\",\")}\n </div>\n <div className=\"hawa-select-none hawa-pb-2 hawa-pt-1 hawa-text-center hawa-text-xs\">\n {texts.maxFileSize} {max}\n </div>\n </div>\n {acceptedFiles.length > 0 && (\n <div className=\"hawa-flex hawa-justify-center hawa-rounded-lg hawa-p-2\">\n <Button onClick={clearAllFiles}>Clear All</Button>\n </div>\n )}\n {acceptedFiles.length > 0 && thumbs && showPreview ? (\n <aside className=\"hawa-flex hawa-flex-row hawa-flex-wrap hawa-justify-center hawa-gap-2 hawa-rounded-lg hawa-p-2\">\n {thumbs}\n </aside>\n ) : null}\n <div className=\"px-4\">{fileRejections[0]?.errors[0]?.code && errs}</div>\n </div>\n {disclaimer && (\n <div className=\"hawa-mt-2 hawa-text-sm hawa-text-muted-foreground/50\">\n {texts.disclaimer ?? \"By uploading a file you agree to our\"}{\" \"}\n <a href={termsLink} className=\"clickable-link hawa-text-muted-foreground/50\">\n {texts.terms ?? \"Terms\"}\n </a>{\" \"}\n {texts.and ?? \"and\"}{\" \"}\n <a href={privacyLink} className=\"clickable-link hawa-text-muted-foreground/50\">\n {texts.privacyPolicy ?? \"Privacy Policy\"}\n </a>\n </div>\n )}\n </div>\n );\n};\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: \"outline\" | \"link\" | \"default\" | \"destructive\" | \"secondary\" | \"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\" ? \"hawa-pl-2 hawa-pt-1\" : \"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(\"hawa-mt-2 hawa-flex hawa-flex-row hawa-gap-2\", classNames?.actions)}\n >\n {props.actions.map((act, index) => (\n <Button key={index} variant={act.variant} onClick={act.onClick()}>\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(alertRef?.current.children[0]);\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(sanitizedHex);\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: \"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: \"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={size === \"icon\" || size === \"smallIcon\" ? \"spinner\" : \"dots-pulse\"}\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={size === \"icon\" || size === \"smallIcon\" ? \"spinner\" : \"dots-pulse\"}\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 = ({ helperText }: { helperText?: string | React.ReactNode }) => (\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 delayDuration={delayDuration} {...providerProps}>\n <TooltipPrimitive.Root\n open={!disabled && open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}\n {...props}\n >\n <TooltipPrimitive.Trigger {...triggerProps}>{children}</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 className={cn(\"hawa-flex hawa-flex-row hawa-gap-2\", classNames?.container)}>\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(\"squircle-container\", sizeStyles[size], classNames?.container)}\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(\"squircle-container\", sizeStyles[size], classNames?.container)}\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 <div className={cn(\"orbit-container\", classNames?.container)}></div>;\n\n default:\n return (\n <svg\n viewBox=\"0 0 40 40\"\n height=\"40\"\n width=\"40\"\n className={cn(\"circle-container\", sizeStyles[size], classNames?.container)}\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":";;;;;;;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AK,GAAE,cAAa;AAAA,MACrB,8BAAAA,QAAA,cAAC,UAAK,GAAE,eAAc;AAAA,MACtB,8BAAAA,QAAA,cAAC,UAAK,GAAE,eAAc;AAAA,MACtB,8BAAAA,QAAA,cAAC,UAAK,GAAE,cAAa;AAAA,MACrB,8BAAAA,QAAA,cAAC,UAAK,GAAE,eAAc;AAAA,MACtB,8BAAAA,QAAA,cAAC,UAAK,GAAE,eAAc;AAAA,IACxB,GACC,OAAO,MAAM,sBAAsB,aAChC,MAAM,kBAAkB,IACxB,MAAM,iBACZ,GACA,8BAAAA,QAAA,cAAC,SAAI,WAAU,8DACZ,MAAM,mBAAkB,KAAE,OAAO,MAAM,GAAG,CAC7C,GACA,8BAAAA,QAAA,cAAC,SAAI,WAAU,wEACZ,MAAM,aAAY,KAAE,GACvB,CACF;AAAA,IACC,cAAc,SAAS,KACtB,8BAAAA,QAAA,cAAC,SAAI,WAAU,4DACb,8BAAAA,QAAA,cAAC,UAAO,SAAS,iBAAe,WAAS,CAC3C;AAAA,IAED,cAAc,SAAS,KAAK,UAAU,cACrC,8BAAAA,QAAA,cAAC,WAAM,WAAU,oGACd,MACH,IACE;AAAA,IACJ,8BAAAA,QAAA,cAAC,SAAI,WAAU,YAAQ,0BAAe,CAAC,MAAhB,mBAAmB,OAAO,OAA1B,mBAA8B,SAAQ,IAAK;AAAA,EACpE,GACC,cACC,8BAAAA,QAAA,cAAC,SAAI,WAAU,2DACZ,WAAM,eAAN,YAAoB,wCAAwC,KAC7D,8BAAAA,QAAA,cAAC,OAAE,MAAM,WAAW,WAAU,mDAC3B,WAAM,UAAN,YAAe,OAClB,GAAK,MACJ,WAAM,QAAN,YAAa,OAAO,KACrB,8BAAAA,QAAA,cAAC,OAAE,MAAM,aAAa,WAAU,mDAC7B,WAAM,kBAAN,YAAuB,gBAC1B,CACF,CAEJ;AAEJ;","names":["import_react","import_clsx","import_react","React","React","React","import_react","React","import_react","React","React","acceptedFiles","React","clsx"]}