@sikka/hawa 0.26.21 → 0.26.22

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 (53) hide show
  1. package/README.md +2 -18
  2. package/dist/blocks/auth/index.mjs +5 -4
  3. package/dist/blocks/feedback/index.js +114 -118
  4. package/dist/blocks/feedback/index.mjs +6 -5
  5. package/dist/blocks/index.js +28 -30
  6. package/dist/blocks/index.mjs +2 -2
  7. package/dist/blocks/misc/index.js +28 -30
  8. package/dist/blocks/misc/index.mjs +20 -17
  9. package/dist/blocks/pricing/index.mjs +4 -4
  10. package/dist/{chunk-OTGCLEKC.mjs → chunk-2R7F2GL7.mjs} +20 -0
  11. package/dist/{chunk-POIP5U4M.mjs → chunk-4EGKGSGY.mjs} +1 -1
  12. package/dist/{chunk-APZM24KK.mjs → chunk-5YXZXYLH.mjs} +15 -18
  13. package/dist/{chunk-WPSUV4AD.mjs → chunk-F3DQJHTG.mjs} +29 -31
  14. package/dist/{chunk-VQQ6MUX5.mjs → chunk-FQ6WVEHW.mjs} +1 -1
  15. package/dist/{chunk-U3TZWNDZ.mjs → chunk-GVJYACGA.mjs} +1 -1
  16. package/dist/{chunk-Z5SL5QTQ.mjs → chunk-MQUAGP7K.mjs} +20 -0
  17. package/dist/{chunk-OAXF3RCQ.mjs → chunk-NMS5LCSQ.mjs} +1 -1
  18. package/dist/{chunk-4IOG44R3.mjs → chunk-OY66MBXP.mjs} +1 -1
  19. package/dist/{chunk-FDKCMEMD.mjs → chunk-R4HAAT6R.mjs} +1 -1
  20. package/dist/chunk-WUHNPHD5.mjs +0 -0
  21. package/dist/codeBlock/index.mjs +1 -1
  22. package/dist/colorPicker/index.d.mts +4 -0
  23. package/dist/colorPicker/index.d.ts +4 -0
  24. package/dist/colorPicker/index.js +80 -23
  25. package/dist/colorPicker/index.mjs +54 -15
  26. package/dist/dataTable/index.d.mts +2 -1
  27. package/dist/dataTable/index.d.ts +2 -1
  28. package/dist/dataTable/index.js +1 -1
  29. package/dist/dataTable/index.mjs +1 -1
  30. package/dist/elements/index.d.mts +7 -1
  31. package/dist/elements/index.d.ts +7 -1
  32. package/dist/elements/index.js +62 -34
  33. package/dist/elements/index.mjs +19 -7
  34. package/dist/index.css +11 -3
  35. package/dist/index.d.mts +7 -1
  36. package/dist/index.d.ts +7 -1
  37. package/dist/index.js +62 -34
  38. package/dist/index.mjs +62 -34
  39. package/dist/layout/index.mjs +2 -2
  40. package/dist/switch/index.d.mts +1 -1
  41. package/dist/switch/index.d.ts +1 -1
  42. package/dist/tabs/index.d.mts +2 -2
  43. package/dist/tabs/index.d.ts +2 -2
  44. package/dist/tabs/index.js +15 -13
  45. package/dist/tabs/index.mjs +15 -13
  46. package/dist/textarea/index.d.mts +1 -0
  47. package/dist/textarea/index.d.ts +1 -0
  48. package/dist/textarea/index.js +59 -36
  49. package/dist/textarea/index.mjs +59 -36
  50. package/package.json +1 -1
  51. package/dist/commonTypes-cyhMPvmz.d.mts +0 -4
  52. package/dist/commonTypes-cyhMPvmz.d.ts +0 -4
  53. /package/dist/{chunk-AREFDTXK.mjs → chunk-D36MPDGE.mjs} +0 -0
@@ -1,25 +1,26 @@
1
1
  import {
2
2
  Textarea
3
- } from "../../chunk-APZM24KK.mjs";
3
+ } from "../../chunk-5YXZXYLH.mjs";
4
4
  import {
5
5
  Select
6
- } from "../../chunk-4IOG44R3.mjs";
6
+ } from "../../chunk-OY66MBXP.mjs";
7
+ import "../../chunk-WUHNPHD5.mjs";
7
8
  import {
8
9
  Radio
9
- } from "../../chunk-OAXF3RCQ.mjs";
10
+ } from "../../chunk-NMS5LCSQ.mjs";
10
11
  import {
11
12
  BadEmoji,
12
13
  GoodEmoji,
13
14
  VeryBadEmoji,
14
15
  VeryGoodEmoji
15
- } from "../../chunk-U3TZWNDZ.mjs";
16
+ } from "../../chunk-GVJYACGA.mjs";
16
17
  import {
17
18
  Button,
18
19
  Card,
19
20
  CardContent,
20
21
  Label,
21
22
  cn
22
- } from "../../chunk-AREFDTXK.mjs";
23
+ } from "../../chunk-D36MPDGE.mjs";
23
24
 
24
25
  // blocks/feedback/UserReferralSource.tsx
25
26
  import React, { useRef, useState } from "react";
@@ -4547,6 +4547,7 @@ var Textarea = React27.forwardRef(
4547
4547
  forceHideHelperText,
4548
4548
  textareaProps,
4549
4549
  countPosition = "bottom",
4550
+ isLoading,
4550
4551
  ...props
4551
4552
  }, ref) => {
4552
4553
  return /* @__PURE__ */ React27.createElement(
@@ -4558,12 +4559,20 @@ var Textarea = React27.forwardRef(
4558
4559
  className
4559
4560
  )
4560
4561
  },
4561
- props.label && /* @__PURE__ */ React27.createElement(Label, { ...labelProps }, props.label),
4562
- /* @__PURE__ */ React27.createElement(
4562
+ /* @__PURE__ */ React27.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, props.label && /* @__PURE__ */ React27.createElement(Label, { ...labelProps }, props.label), showCount && countPosition === "top" && /* @__PURE__ */ React27.createElement(
4563
+ "div",
4564
+ {
4565
+ className: "hawa-text-start hawa-text-xs hawa-transition-all hawa-leading-none"
4566
+ },
4567
+ (textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
4568
+ "/",
4569
+ textareaProps == null ? void 0 : textareaProps.maxLength
4570
+ )),
4571
+ isLoading ? /* @__PURE__ */ React27.createElement(Skeleton, { style: { height: 40 } }) : /* @__PURE__ */ React27.createElement(
4563
4572
  "textarea",
4564
4573
  {
4565
4574
  className: cn(
4566
- "hawa-flex hawa-min-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
4575
+ "hawa-flex hawa-min-h-[40px] hawa-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
4567
4576
  classNames == null ? void 0 : classNames.textarea
4568
4577
  ),
4569
4578
  ref,
@@ -4579,20 +4588,7 @@ var Textarea = React27.forwardRef(
4579
4588
  )
4580
4589
  },
4581
4590
  props.helperText
4582
- ), showCount && /* @__PURE__ */ React27.createElement(
4583
- "div",
4584
- {
4585
- className: cn(
4586
- "hawa-text-start hawa-text-xs hawa-transition-all",
4587
- {
4588
- "hawa-absolute hawa-bottom-[80px] hawa-end-0 hawa-translate-y-1/2": countPosition === "top"
4589
- }
4590
- )
4591
- },
4592
- (textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
4593
- "/",
4594
- textareaProps == null ? void 0 : textareaProps.maxLength
4595
- ))
4591
+ ), showCount && countPosition === "bottom" && /* @__PURE__ */ React27.createElement("div", { className: "hawa-text-start hawa-text-xs hawa-transition-all" }, (textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0, "/", textareaProps == null ? void 0 : textareaProps.maxLength))
4596
4592
  );
4597
4593
  }
4598
4594
  );
@@ -5253,19 +5249,21 @@ var Chip = import_react27.default.forwardRef(
5253
5249
 
5254
5250
  // elements/tabs/Tabs.tsx
5255
5251
  var TabsContext = React35.createContext({ orientation: "vertical" });
5256
- var Tabs = React35.forwardRef(({ className, orientation, ...props }, ref) => /* @__PURE__ */ React35.createElement(
5257
- TabsPrimitive.Root,
5258
- {
5259
- ref,
5260
- className: cn(
5261
- "hawa-flex hawa-gap-2",
5262
- orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
5263
- className
5264
- ),
5265
- ...props
5266
- },
5267
- /* @__PURE__ */ React35.createElement(TabsContext.Provider, { value: { orientation } }, props.children)
5268
- ));
5252
+ var Tabs = React35.forwardRef(
5253
+ ({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React35.createElement(
5254
+ TabsPrimitive.Root,
5255
+ {
5256
+ ref,
5257
+ className: cn(
5258
+ "hawa-flex hawa-gap-2",
5259
+ orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
5260
+ className
5261
+ ),
5262
+ ...props
5263
+ },
5264
+ /* @__PURE__ */ React35.createElement(TabsContext.Provider, { value: { orientation } }, props.children)
5265
+ )
5266
+ );
5269
5267
  Tabs.displayName = TabsPrimitive.Root.displayName;
5270
5268
  var TabsList = React35.forwardRef(({ className, ...props }, ref) => {
5271
5269
  const { orientation } = React35.useContext(TabsContext);
@@ -25,7 +25,7 @@ import {
25
25
  UncheckMark,
26
26
  VeryBadEmoji,
27
27
  VeryGoodEmoji
28
- } from "../chunk-WPSUV4AD.mjs";
28
+ } from "../chunk-F3DQJHTG.mjs";
29
29
  import {
30
30
  Button,
31
31
  Card,
@@ -41,7 +41,7 @@ import {
41
41
  Skeleton,
42
42
  Tooltip,
43
43
  cn
44
- } from "../chunk-Z5SL5QTQ.mjs";
44
+ } from "../chunk-MQUAGP7K.mjs";
45
45
 
46
46
  // blocks/auth/LoginForm.tsx
47
47
  import React2, { useState } from "react";
@@ -180,19 +180,21 @@ var Chip = import_react.default.forwardRef(
180
180
 
181
181
  // elements/tabs/Tabs.tsx
182
182
  var TabsContext = React3.createContext({ orientation: "vertical" });
183
- var Tabs = React3.forwardRef(({ className, orientation, ...props }, ref) => /* @__PURE__ */ React3.createElement(
184
- TabsPrimitive.Root,
185
- {
186
- ref,
187
- className: cn(
188
- "hawa-flex hawa-gap-2",
189
- orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
190
- className
191
- ),
192
- ...props
193
- },
194
- /* @__PURE__ */ React3.createElement(TabsContext.Provider, { value: { orientation } }, props.children)
195
- ));
183
+ var Tabs = React3.forwardRef(
184
+ ({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React3.createElement(
185
+ TabsPrimitive.Root,
186
+ {
187
+ ref,
188
+ className: cn(
189
+ "hawa-flex hawa-gap-2",
190
+ orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
191
+ className
192
+ ),
193
+ ...props
194
+ },
195
+ /* @__PURE__ */ React3.createElement(TabsContext.Provider, { value: { orientation } }, props.children)
196
+ )
197
+ );
196
198
  Tabs.displayName = TabsPrimitive.Root.displayName;
197
199
  var TabsList = React3.forwardRef(({ className, ...props }, ref) => {
198
200
  const { orientation } = React3.useContext(TabsContext);
@@ -987,6 +989,7 @@ var Textarea = React18.forwardRef(
987
989
  forceHideHelperText,
988
990
  textareaProps,
989
991
  countPosition = "bottom",
992
+ isLoading,
990
993
  ...props
991
994
  }, ref) => {
992
995
  return /* @__PURE__ */ React18.createElement(
@@ -998,12 +1001,20 @@ var Textarea = React18.forwardRef(
998
1001
  className
999
1002
  )
1000
1003
  },
1001
- props.label && /* @__PURE__ */ React18.createElement(Label, { ...labelProps }, props.label),
1002
- /* @__PURE__ */ React18.createElement(
1004
+ /* @__PURE__ */ React18.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, props.label && /* @__PURE__ */ React18.createElement(Label, { ...labelProps }, props.label), showCount && countPosition === "top" && /* @__PURE__ */ React18.createElement(
1005
+ "div",
1006
+ {
1007
+ className: "hawa-text-start hawa-text-xs hawa-transition-all hawa-leading-none"
1008
+ },
1009
+ (textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
1010
+ "/",
1011
+ textareaProps == null ? void 0 : textareaProps.maxLength
1012
+ )),
1013
+ isLoading ? /* @__PURE__ */ React18.createElement(Skeleton, { style: { height: 40 } }) : /* @__PURE__ */ React18.createElement(
1003
1014
  "textarea",
1004
1015
  {
1005
1016
  className: cn(
1006
- "hawa-flex hawa-min-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
1017
+ "hawa-flex hawa-min-h-[40px] hawa-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
1007
1018
  classNames == null ? void 0 : classNames.textarea
1008
1019
  ),
1009
1020
  ref,
@@ -1019,20 +1030,7 @@ var Textarea = React18.forwardRef(
1019
1030
  )
1020
1031
  },
1021
1032
  props.helperText
1022
- ), showCount && /* @__PURE__ */ React18.createElement(
1023
- "div",
1024
- {
1025
- className: cn(
1026
- "hawa-text-start hawa-text-xs hawa-transition-all",
1027
- {
1028
- "hawa-absolute hawa-bottom-[80px] hawa-end-0 hawa-translate-y-1/2": countPosition === "top"
1029
- }
1030
- )
1031
- },
1032
- (textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
1033
- "/",
1034
- textareaProps == null ? void 0 : textareaProps.maxLength
1035
- ))
1033
+ ), showCount && countPosition === "bottom" && /* @__PURE__ */ React18.createElement("div", { className: "hawa-text-start hawa-text-xs hawa-transition-all" }, (textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0, "/", textareaProps == null ? void 0 : textareaProps.maxLength))
1036
1034
  );
1037
1035
  }
1038
1036
  );
@@ -1,13 +1,14 @@
1
1
  import {
2
2
  Input
3
- } from "../../chunk-FDKCMEMD.mjs";
3
+ } from "../../chunk-R4HAAT6R.mjs";
4
4
  import {
5
5
  Chip,
6
6
  ScrollArea
7
- } from "../../chunk-POIP5U4M.mjs";
7
+ } from "../../chunk-4EGKGSGY.mjs";
8
8
  import {
9
9
  Textarea
10
- } from "../../chunk-APZM24KK.mjs";
10
+ } from "../../chunk-5YXZXYLH.mjs";
11
+ import "../../chunk-WUHNPHD5.mjs";
11
12
  import {
12
13
  Button,
13
14
  Card,
@@ -17,7 +18,7 @@ import {
17
18
  CardHeader,
18
19
  CardTitle,
19
20
  cn
20
- } from "../../chunk-AREFDTXK.mjs";
21
+ } from "../../chunk-D36MPDGE.mjs";
21
22
 
22
23
  // blocks/misc/LegalTexts.tsx
23
24
  import React2 from "react";
@@ -26,19 +27,21 @@ import React2 from "react";
26
27
  import * as React from "react";
27
28
  import * as TabsPrimitive from "@radix-ui/react-tabs";
28
29
  var TabsContext = React.createContext({ orientation: "vertical" });
29
- var Tabs = React.forwardRef(({ className, orientation, ...props }, ref) => /* @__PURE__ */ React.createElement(
30
- TabsPrimitive.Root,
31
- {
32
- ref,
33
- className: cn(
34
- "hawa-flex hawa-gap-2",
35
- orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
36
- className
37
- ),
38
- ...props
39
- },
40
- /* @__PURE__ */ React.createElement(TabsContext.Provider, { value: { orientation } }, props.children)
41
- ));
30
+ var Tabs = React.forwardRef(
31
+ ({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React.createElement(
32
+ TabsPrimitive.Root,
33
+ {
34
+ ref,
35
+ className: cn(
36
+ "hawa-flex hawa-gap-2",
37
+ orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
38
+ className
39
+ ),
40
+ ...props
41
+ },
42
+ /* @__PURE__ */ React.createElement(TabsContext.Provider, { value: { orientation } }, props.children)
43
+ )
44
+ );
42
45
  Tabs.displayName = TabsPrimitive.Root.displayName;
43
46
  var TabsList = React.forwardRef(({ className, ...props }, ref) => {
44
47
  const { orientation } = React.useContext(TabsContext);
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  Chip,
3
3
  ScrollArea
4
- } from "../../chunk-POIP5U4M.mjs";
4
+ } from "../../chunk-4EGKGSGY.mjs";
5
5
  import "../../chunk-ZS3FB3PO.mjs";
6
6
  import {
7
7
  Radio
8
- } from "../../chunk-OAXF3RCQ.mjs";
8
+ } from "../../chunk-NMS5LCSQ.mjs";
9
9
  import {
10
10
  CheckMark,
11
11
  UncheckMark
12
- } from "../../chunk-U3TZWNDZ.mjs";
12
+ } from "../../chunk-GVJYACGA.mjs";
13
13
  import {
14
14
  Button,
15
15
  Card,
16
16
  Skeleton,
17
17
  Tooltip,
18
18
  cn
19
- } from "../../chunk-AREFDTXK.mjs";
19
+ } from "../../chunk-D36MPDGE.mjs";
20
20
 
21
21
  // blocks/pricing/PricingPlans.tsx
22
22
  import React8 from "react";
@@ -4,6 +4,25 @@ import { twMerge } from "tailwind-merge";
4
4
  function cn(...inputs) {
5
5
  return twMerge(clsx(inputs));
6
6
  }
7
+ var parseColor = (color) => {
8
+ if (color.startsWith("#")) {
9
+ let r = parseInt(color.slice(1, 3), 16);
10
+ let g = parseInt(color.slice(3, 5), 16);
11
+ let b = parseInt(color.slice(5, 7), 16);
12
+ return [r, g, b];
13
+ } else if (color.startsWith("rgb")) {
14
+ return color.match(/\d+/g).map(Number);
15
+ }
16
+ return [255, 255, 255];
17
+ };
18
+ var calculateLuminance = (color) => {
19
+ var _a;
20
+ const [r, g, b] = (_a = parseColor(color)) == null ? void 0 : _a.map((c) => {
21
+ c /= 255;
22
+ return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
23
+ });
24
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b;
25
+ };
7
26
 
8
27
  // elements/tooltip/Tooltip.tsx
9
28
  import React from "react";
@@ -58,5 +77,6 @@ var Tooltip = ({
58
77
 
59
78
  export {
60
79
  cn,
80
+ calculateLuminance,
61
81
  Tooltip
62
82
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  cn
3
- } from "./chunk-AREFDTXK.mjs";
3
+ } from "./chunk-D36MPDGE.mjs";
4
4
 
5
5
  // elements/scrollArea/ScrollArea.tsx
6
6
  import * as React from "react";
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  Label,
3
+ Skeleton,
3
4
  cn
4
- } from "./chunk-AREFDTXK.mjs";
5
+ } from "./chunk-D36MPDGE.mjs";
5
6
 
6
7
  // elements/textarea/Textarea.tsx
7
8
  import * as React from "react";
@@ -14,6 +15,7 @@ var Textarea = React.forwardRef(
14
15
  forceHideHelperText,
15
16
  textareaProps,
16
17
  countPosition = "bottom",
18
+ isLoading,
17
19
  ...props
18
20
  }, ref) => {
19
21
  return /* @__PURE__ */ React.createElement(
@@ -25,12 +27,20 @@ var Textarea = React.forwardRef(
25
27
  className
26
28
  )
27
29
  },
28
- props.label && /* @__PURE__ */ React.createElement(Label, { ...labelProps }, props.label),
29
- /* @__PURE__ */ React.createElement(
30
+ /* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, props.label && /* @__PURE__ */ React.createElement(Label, { ...labelProps }, props.label), showCount && countPosition === "top" && /* @__PURE__ */ React.createElement(
31
+ "div",
32
+ {
33
+ className: "hawa-text-start hawa-text-xs hawa-transition-all hawa-leading-none"
34
+ },
35
+ (textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
36
+ "/",
37
+ textareaProps == null ? void 0 : textareaProps.maxLength
38
+ )),
39
+ isLoading ? /* @__PURE__ */ React.createElement(Skeleton, { style: { height: 40 } }) : /* @__PURE__ */ React.createElement(
30
40
  "textarea",
31
41
  {
32
42
  className: cn(
33
- "hawa-flex hawa-min-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
43
+ "hawa-flex hawa-min-h-[40px] hawa-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
34
44
  classNames == null ? void 0 : classNames.textarea
35
45
  ),
36
46
  ref,
@@ -46,20 +56,7 @@ var Textarea = React.forwardRef(
46
56
  )
47
57
  },
48
58
  props.helperText
49
- ), showCount && /* @__PURE__ */ React.createElement(
50
- "div",
51
- {
52
- className: cn(
53
- "hawa-text-start hawa-text-xs hawa-transition-all",
54
- {
55
- "hawa-absolute hawa-bottom-[80px] hawa-end-0 hawa-translate-y-1/2": countPosition === "top"
56
- }
57
- )
58
- },
59
- (textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
60
- "/",
61
- textareaProps == null ? void 0 : textareaProps.maxLength
62
- ))
59
+ ), showCount && countPosition === "bottom" && /* @__PURE__ */ React.createElement("div", { className: "hawa-text-start hawa-text-xs hawa-transition-all" }, (textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0, "/", textareaProps == null ? void 0 : textareaProps.maxLength))
63
60
  );
64
61
  }
65
62
  );
@@ -4,7 +4,7 @@ import {
4
4
  Skeleton,
5
5
  Tooltip,
6
6
  cn
7
- } from "./chunk-Z5SL5QTQ.mjs";
7
+ } from "./chunk-MQUAGP7K.mjs";
8
8
 
9
9
  // elements/alert/Alert.tsx
10
10
  import React, { useRef, useState, useEffect } from "react";
@@ -2652,6 +2652,7 @@ var Textarea = React10.forwardRef(
2652
2652
  forceHideHelperText,
2653
2653
  textareaProps,
2654
2654
  countPosition = "bottom",
2655
+ isLoading,
2655
2656
  ...props
2656
2657
  }, ref) => {
2657
2658
  return /* @__PURE__ */ React10.createElement(
@@ -2663,12 +2664,20 @@ var Textarea = React10.forwardRef(
2663
2664
  className
2664
2665
  )
2665
2666
  },
2666
- props.label && /* @__PURE__ */ React10.createElement(Label, { ...labelProps }, props.label),
2667
- /* @__PURE__ */ React10.createElement(
2667
+ /* @__PURE__ */ React10.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, props.label && /* @__PURE__ */ React10.createElement(Label, { ...labelProps }, props.label), showCount && countPosition === "top" && /* @__PURE__ */ React10.createElement(
2668
+ "div",
2669
+ {
2670
+ className: "hawa-text-start hawa-text-xs hawa-transition-all hawa-leading-none"
2671
+ },
2672
+ (textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
2673
+ "/",
2674
+ textareaProps == null ? void 0 : textareaProps.maxLength
2675
+ )),
2676
+ isLoading ? /* @__PURE__ */ React10.createElement(Skeleton, { style: { height: 40 } }) : /* @__PURE__ */ React10.createElement(
2668
2677
  "textarea",
2669
2678
  {
2670
2679
  className: cn(
2671
- "hawa-flex hawa-min-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
2680
+ "hawa-flex hawa-min-h-[40px] hawa-h-[40px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-gray-400 placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
2672
2681
  classNames == null ? void 0 : classNames.textarea
2673
2682
  ),
2674
2683
  ref,
@@ -2684,20 +2693,7 @@ var Textarea = React10.forwardRef(
2684
2693
  )
2685
2694
  },
2686
2695
  props.helperText
2687
- ), showCount && /* @__PURE__ */ React10.createElement(
2688
- "div",
2689
- {
2690
- className: cn(
2691
- "hawa-text-start hawa-text-xs hawa-transition-all",
2692
- {
2693
- "hawa-absolute hawa-bottom-[80px] hawa-end-0 hawa-translate-y-1/2": countPosition === "top"
2694
- }
2695
- )
2696
- },
2697
- (textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
2698
- "/",
2699
- textareaProps == null ? void 0 : textareaProps.maxLength
2700
- ))
2696
+ ), showCount && countPosition === "bottom" && /* @__PURE__ */ React10.createElement("div", { className: "hawa-text-start hawa-text-xs hawa-transition-all" }, (textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0, "/", textareaProps == null ? void 0 : textareaProps.maxLength))
2701
2697
  );
2702
2698
  }
2703
2699
  );
@@ -2807,19 +2803,21 @@ ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
2807
2803
  import * as React13 from "react";
2808
2804
  import * as TabsPrimitive from "@radix-ui/react-tabs";
2809
2805
  var TabsContext = React13.createContext({ orientation: "vertical" });
2810
- var Tabs = React13.forwardRef(({ className, orientation, ...props }, ref) => /* @__PURE__ */ React13.createElement(
2811
- TabsPrimitive.Root,
2812
- {
2813
- ref,
2814
- className: cn(
2815
- "hawa-flex hawa-gap-2",
2816
- orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
2817
- className
2818
- ),
2819
- ...props
2820
- },
2821
- /* @__PURE__ */ React13.createElement(TabsContext.Provider, { value: { orientation } }, props.children)
2822
- ));
2806
+ var Tabs = React13.forwardRef(
2807
+ ({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React13.createElement(
2808
+ TabsPrimitive.Root,
2809
+ {
2810
+ ref,
2811
+ className: cn(
2812
+ "hawa-flex hawa-gap-2",
2813
+ orientation === "vertical" ? "hawa-flex-row" : "hawa-flex-col",
2814
+ className
2815
+ ),
2816
+ ...props
2817
+ },
2818
+ /* @__PURE__ */ React13.createElement(TabsContext.Provider, { value: { orientation } }, props.children)
2819
+ )
2820
+ );
2823
2821
  Tabs.displayName = TabsPrimitive.Root.displayName;
2824
2822
  var TabsList = React13.forwardRef(({ className, ...props }, ref) => {
2825
2823
  const { orientation } = React13.useContext(TabsContext);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  cn
3
- } from "./chunk-Z5SL5QTQ.mjs";
3
+ } from "./chunk-MQUAGP7K.mjs";
4
4
 
5
5
  // elements/sheet/Sheet.tsx
6
6
  import * as React from "react";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  cn
3
- } from "./chunk-AREFDTXK.mjs";
3
+ } from "./chunk-D36MPDGE.mjs";
4
4
 
5
5
  // icons/Emojis.tsx
6
6
  import React from "react";
@@ -7,6 +7,25 @@ import { twMerge } from "tailwind-merge";
7
7
  function cn(...inputs) {
8
8
  return twMerge(clsx(inputs));
9
9
  }
10
+ var parseColor = (color) => {
11
+ if (color.startsWith("#")) {
12
+ let r = parseInt(color.slice(1, 3), 16);
13
+ let g = parseInt(color.slice(3, 5), 16);
14
+ let b = parseInt(color.slice(5, 7), 16);
15
+ return [r, g, b];
16
+ } else if (color.startsWith("rgb")) {
17
+ return color.match(/\d+/g).map(Number);
18
+ }
19
+ return [255, 255, 255];
20
+ };
21
+ var calculateLuminance = (color) => {
22
+ var _a;
23
+ const [r, g, b] = (_a = parseColor(color)) == null ? void 0 : _a.map((c) => {
24
+ c /= 255;
25
+ return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
26
+ });
27
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b;
28
+ };
10
29
 
11
30
  // elements/loading/Loading.tsx
12
31
  var Loading = ({
@@ -1045,6 +1064,7 @@ var DropdownMenuRadio = (props) => {
1045
1064
 
1046
1065
  export {
1047
1066
  cn,
1067
+ calculateLuminance,
1048
1068
  Loading,
1049
1069
  buttonVariants,
1050
1070
  Button,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Label,
3
3
  cn
4
- } from "./chunk-AREFDTXK.mjs";
4
+ } from "./chunk-D36MPDGE.mjs";
5
5
 
6
6
  // elements/radio/Radio.tsx
7
7
  import React, { useState, useRef, useEffect } from "react";
@@ -2,7 +2,7 @@ import {
2
2
  Label,
3
3
  Skeleton,
4
4
  cn
5
- } from "./chunk-AREFDTXK.mjs";
5
+ } from "./chunk-D36MPDGE.mjs";
6
6
 
7
7
  // elements/select/Select.tsx
8
8
  import React from "react";
@@ -2,7 +2,7 @@ import {
2
2
  Label,
3
3
  Skeleton,
4
4
  cn
5
- } from "./chunk-AREFDTXK.mjs";
5
+ } from "./chunk-D36MPDGE.mjs";
6
6
 
7
7
  // elements/input/Input.tsx
8
8
  import React, { forwardRef } from "react";
File without changes
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Tooltip,
3
3
  cn
4
- } from "../chunk-OTGCLEKC.mjs";
4
+ } from "../chunk-2R7F2GL7.mjs";
5
5
 
6
6
  // elements/codeBlock/CodeBlock.tsx
7
7
  import React3, { useState as useState2 } from "react";
@@ -13,8 +13,12 @@ type LabelProps = {
13
13
  type ColorPickerTypes = {
14
14
  label?: string;
15
15
  id?: string;
16
+ isLoading?: boolean;
16
17
  labelProps?: LabelProps;
17
18
  helperText?: string;
19
+ forceHideHelperText?: boolean;
20
+ /** Boolean to enable/disable editing the input field and using it as a text field */
21
+ preview?: boolean;
18
22
  /** The hex code for the color */
19
23
  color?: any;
20
24
  /** Fires everytime the color changes */
@@ -13,8 +13,12 @@ type LabelProps = {
13
13
  type ColorPickerTypes = {
14
14
  label?: string;
15
15
  id?: string;
16
+ isLoading?: boolean;
16
17
  labelProps?: LabelProps;
17
18
  helperText?: string;
19
+ forceHideHelperText?: boolean;
20
+ /** Boolean to enable/disable editing the input field and using it as a text field */
21
+ preview?: boolean;
18
22
  /** The hex code for the color */
19
23
  color?: any;
20
24
  /** Fires everytime the color changes */