@sikka/hawa 0.26.21 → 0.26.23

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 (71) hide show
  1. package/README.md +2 -18
  2. package/dist/alert/index.d.mts +1 -0
  3. package/dist/alert/index.d.ts +1 -0
  4. package/dist/blocks/auth/index.mjs +5 -4
  5. package/dist/blocks/feedback/index.js +114 -118
  6. package/dist/blocks/feedback/index.mjs +6 -5
  7. package/dist/blocks/index.js +28 -30
  8. package/dist/blocks/index.mjs +3 -2
  9. package/dist/blocks/misc/index.js +28 -30
  10. package/dist/blocks/misc/index.mjs +20 -17
  11. package/dist/blocks/pricing/index.mjs +4 -4
  12. package/dist/carousel/index.d.mts +2 -0
  13. package/dist/carousel/index.d.ts +2 -0
  14. package/dist/carousel/index.js +31 -16
  15. package/dist/carousel/index.mjs +30 -15
  16. package/dist/checkbox/index.d.mts +1 -1
  17. package/dist/checkbox/index.d.ts +1 -1
  18. package/dist/chip/index.d.mts +1 -1
  19. package/dist/chip/index.d.ts +1 -1
  20. package/dist/{chunk-OTGCLEKC.mjs → chunk-2R7F2GL7.mjs} +20 -0
  21. package/dist/{chunk-POIP5U4M.mjs → chunk-4EGKGSGY.mjs} +1 -1
  22. package/dist/{chunk-APZM24KK.mjs → chunk-5YXZXYLH.mjs} +15 -18
  23. package/dist/{chunk-WPSUV4AD.mjs → chunk-F3DQJHTG.mjs} +29 -31
  24. package/dist/{chunk-VQQ6MUX5.mjs → chunk-FQ6WVEHW.mjs} +1 -1
  25. package/dist/{chunk-U3TZWNDZ.mjs → chunk-GVJYACGA.mjs} +1 -1
  26. package/dist/{chunk-Z5SL5QTQ.mjs → chunk-MQUAGP7K.mjs} +20 -0
  27. package/dist/{chunk-OAXF3RCQ.mjs → chunk-NMS5LCSQ.mjs} +1 -1
  28. package/dist/{chunk-4IOG44R3.mjs → chunk-OY66MBXP.mjs} +1 -1
  29. package/dist/{chunk-FDKCMEMD.mjs → chunk-R4HAAT6R.mjs} +1 -1
  30. package/dist/chunk-WUHNPHD5.mjs +0 -0
  31. package/dist/chunk-ZFXKCRJC.mjs +11 -0
  32. package/dist/codeBlock/index.d.mts +2 -1
  33. package/dist/codeBlock/index.d.ts +2 -1
  34. package/dist/codeBlock/index.js +21 -17
  35. package/dist/codeBlock/index.mjs +21 -12
  36. package/dist/collapsible/index.mjs +2 -0
  37. package/dist/colorPicker/index.d.mts +4 -0
  38. package/dist/colorPicker/index.d.ts +4 -0
  39. package/dist/colorPicker/index.js +80 -23
  40. package/dist/colorPicker/index.mjs +55 -15
  41. package/dist/commonTypes-2k6FnHw5.d.mts +4 -0
  42. package/dist/commonTypes-2k6FnHw5.d.ts +4 -0
  43. package/dist/dataTable/index.d.mts +2 -1
  44. package/dist/dataTable/index.d.ts +2 -1
  45. package/dist/dataTable/index.js +1 -1
  46. package/dist/dataTable/index.mjs +1 -1
  47. package/dist/elements/index.d.mts +11 -2
  48. package/dist/elements/index.d.ts +11 -2
  49. package/dist/elements/index.js +104 -59
  50. package/dist/elements/index.mjs +69 -33
  51. package/dist/hooks/index.mjs +1 -0
  52. package/dist/index.css +377 -202
  53. package/dist/index.d.mts +11 -2
  54. package/dist/index.d.ts +11 -2
  55. package/dist/index.js +104 -59
  56. package/dist/index.mjs +117 -60
  57. package/dist/layout/index.mjs +3 -2
  58. package/dist/switch/index.d.mts +1 -1
  59. package/dist/switch/index.d.ts +1 -1
  60. package/dist/tabs/index.d.mts +2 -2
  61. package/dist/tabs/index.d.ts +2 -2
  62. package/dist/tabs/index.js +15 -13
  63. package/dist/tabs/index.mjs +15 -13
  64. package/dist/textarea/index.d.mts +1 -0
  65. package/dist/textarea/index.d.ts +1 -0
  66. package/dist/textarea/index.js +59 -36
  67. package/dist/textarea/index.mjs +59 -36
  68. package/package.json +11 -10
  69. package/dist/commonTypes-cyhMPvmz.d.mts +0 -4
  70. package/dist/commonTypes-cyhMPvmz.d.ts +0 -4
  71. /package/dist/{chunk-AREFDTXK.mjs → chunk-D36MPDGE.mjs} +0 -0
@@ -35,7 +35,7 @@ __export(colorPicker_exports, {
35
35
  module.exports = __toCommonJS(colorPicker_exports);
36
36
 
37
37
  // elements/colorPicker/ColorPicker.tsx
38
- var import_react2 = __toESM(require("react"));
38
+ var import_react3 = __toESM(require("react"));
39
39
 
40
40
  // util/index.ts
41
41
  var import_clsx = require("clsx");
@@ -43,14 +43,60 @@ var import_tailwind_merge = require("tailwind-merge");
43
43
  function cn(...inputs) {
44
44
  return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
45
45
  }
46
+ var parseColor = (color) => {
47
+ if (color.startsWith("#")) {
48
+ let r = parseInt(color.slice(1, 3), 16);
49
+ let g = parseInt(color.slice(3, 5), 16);
50
+ let b = parseInt(color.slice(5, 7), 16);
51
+ return [r, g, b];
52
+ } else if (color.startsWith("rgb")) {
53
+ return color.match(/\d+/g).map(Number);
54
+ }
55
+ return [255, 255, 255];
56
+ };
57
+ var calculateLuminance = (color) => {
58
+ var _a;
59
+ const [r, g, b] = (_a = parseColor(color)) == null ? void 0 : _a.map((c) => {
60
+ c /= 255;
61
+ return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
62
+ });
63
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b;
64
+ };
65
+
66
+ // elements/skeleton/Skeleton.tsx
67
+ var import_react = __toESM(require("react"));
68
+ function Skeleton({
69
+ className,
70
+ content,
71
+ animation = "pulse",
72
+ ...props
73
+ }) {
74
+ const animationStyles = {
75
+ none: "hawa-rounded hawa-bg-muted",
76
+ pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
77
+ shimmer: "hawa-space-y-5 hawa-rounded hawa-bg-muted hawa-p-4 hawa-relative before:hawa-absolute before:hawa-inset-0 before:hawa--translate-x-full before:hawa-animate-[shimmer_2s_infinite] before:hawa-bg-gradient-to-r before:hawa-from-transparent before:hawa-via-gray-300/40 dark:before:hawa-via-white/10 before:hawa-to-transparent hawa-isolate hawa-overflow-hidden before:hawa-border-t before:hawa-border-rose-100/10"
78
+ };
79
+ return /* @__PURE__ */ import_react.default.createElement(
80
+ "div",
81
+ {
82
+ className: cn(
83
+ animationStyles[animation],
84
+ content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
85
+ className
86
+ ),
87
+ ...props
88
+ },
89
+ content && content
90
+ );
91
+ }
46
92
 
47
93
  // elements/label/Label.tsx
48
- var React2 = __toESM(require("react"));
94
+ var React3 = __toESM(require("react"));
49
95
 
50
96
  // elements/tooltip/Tooltip.tsx
51
- var import_react = __toESM(require("react"));
97
+ var import_react2 = __toESM(require("react"));
52
98
  var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
53
- var TooltipContent = import_react.default.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ import_react.default.createElement(
99
+ var TooltipContent = import_react2.default.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ import_react2.default.createElement(
54
100
  TooltipPrimitive.Content,
55
101
  {
56
102
  ref,
@@ -63,7 +109,7 @@ var TooltipContent = import_react.default.forwardRef(({ className, sideOffset =
63
109
  }
64
110
  ));
65
111
  TooltipContent.displayName = TooltipPrimitive.Content.displayName;
66
- var TooltipArrow = import_react.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ import_react.default.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
112
+ var TooltipArrow = import_react2.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ import_react2.default.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
67
113
  TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
68
114
  var Tooltip = ({
69
115
  side,
@@ -78,13 +124,13 @@ var Tooltip = ({
78
124
  delayDuration = 300,
79
125
  ...props
80
126
  }) => {
81
- return /* @__PURE__ */ import_react.default.createElement(
127
+ return /* @__PURE__ */ import_react2.default.createElement(
82
128
  TooltipPrimitive.TooltipProvider,
83
129
  {
84
130
  delayDuration,
85
131
  ...providerProps
86
132
  },
87
- /* @__PURE__ */ import_react.default.createElement(
133
+ /* @__PURE__ */ import_react2.default.createElement(
88
134
  TooltipPrimitive.Root,
89
135
  {
90
136
  open,
@@ -92,14 +138,14 @@ var Tooltip = ({
92
138
  onOpenChange,
93
139
  ...props
94
140
  },
95
- /* @__PURE__ */ import_react.default.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
96
- /* @__PURE__ */ import_react.default.createElement(TooltipContent, { side, align: "center", ...contentProps }, content)
141
+ /* @__PURE__ */ import_react2.default.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
142
+ /* @__PURE__ */ import_react2.default.createElement(TooltipContent, { side, align: "center", ...contentProps }, content)
97
143
  )
98
144
  );
99
145
  };
100
146
 
101
147
  // elements/label/Label.tsx
102
- var Label = React2.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React2.createElement(
148
+ var Label = React3.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React3.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React3.createElement(
103
149
  "label",
104
150
  {
105
151
  ref,
@@ -110,8 +156,8 @@ var Label = React2.forwardRef(({ className, hint, hintSide, required, children,
110
156
  ...props
111
157
  },
112
158
  children,
113
- required && /* @__PURE__ */ React2.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
114
- ), hint && /* @__PURE__ */ React2.createElement(
159
+ required && /* @__PURE__ */ React3.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
160
+ ), hint && /* @__PURE__ */ React3.createElement(
115
161
  Tooltip,
116
162
  {
117
163
  content: hint,
@@ -121,7 +167,7 @@ var Label = React2.forwardRef(({ className, hint, hintSide, required, children,
121
167
  onClick: (event) => event.preventDefault()
122
168
  }
123
169
  },
124
- /* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement(
170
+ /* @__PURE__ */ React3.createElement("div", null, /* @__PURE__ */ React3.createElement(
125
171
  "svg",
126
172
  {
127
173
  xmlns: "http://www.w3.org/2000/svg",
@@ -133,9 +179,9 @@ var Label = React2.forwardRef(({ className, hint, hintSide, required, children,
133
179
  strokeLinecap: "round",
134
180
  strokeLinejoin: "round"
135
181
  },
136
- /* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }),
137
- /* @__PURE__ */ React2.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
138
- /* @__PURE__ */ React2.createElement("path", { d: "M12 17h.01" })
182
+ /* @__PURE__ */ React3.createElement("circle", { cx: "12", cy: "12", r: "10" }),
183
+ /* @__PURE__ */ React3.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
184
+ /* @__PURE__ */ React3.createElement("path", { d: "M12 17h.01" })
139
185
  ))
140
186
  )));
141
187
  Label.displayName = "Label";
@@ -146,10 +192,13 @@ var ColorPicker = ({
146
192
  colorPickerProps,
147
193
  textInputProps,
148
194
  labelProps,
195
+ forceHideHelperText,
196
+ isLoading,
197
+ preview = false,
149
198
  ...props
150
199
  }) => {
151
- const [selectedColor, setSelectedColor] = (0, import_react2.useState)(props.color);
152
- (0, import_react2.useEffect)(() => {
200
+ const [selectedColor, setSelectedColor] = (0, import_react3.useState)(props.color);
201
+ (0, import_react3.useEffect)(() => {
153
202
  if (selectedColor && selectedColor[0] !== "#") {
154
203
  setSelectedColor(`#${selectedColor}`);
155
204
  }
@@ -166,15 +215,16 @@ var ColorPicker = ({
166
215
  props.handleChange(e);
167
216
  }
168
217
  };
169
- return /* @__PURE__ */ import_react2.default.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ import_react2.default.createElement(Label, { ...labelProps }, props.label), /* @__PURE__ */ import_react2.default.createElement("div", { dir: "ltr", className: "hawa-flex hawa-w-full hawa-flex-row" }, /* @__PURE__ */ import_react2.default.createElement(
218
+ return /* @__PURE__ */ import_react3.default.createElement("div", { className: "hawa-flex hawa-w-fit hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ import_react3.default.createElement(Label, { ...labelProps }, props.label), isLoading ? /* @__PURE__ */ import_react3.default.createElement(Skeleton, { style: { height: 40, width: 148 } }) : /* @__PURE__ */ import_react3.default.createElement("div", { dir: "ltr", className: "hawa-flex hawa-w-full hawa-flex-row" }, /* @__PURE__ */ import_react3.default.createElement(
170
219
  "div",
171
220
  {
172
221
  style: { height: 40, backgroundColor: selectedColor },
173
222
  className: "hawa-rounded-bl-lg hawa-rounded-tl-lg hawa-border"
174
223
  },
175
- /* @__PURE__ */ import_react2.default.createElement(
224
+ /* @__PURE__ */ import_react3.default.createElement(
176
225
  "input",
177
226
  {
227
+ disabled: preview,
178
228
  type: "color",
179
229
  value: selectedColor,
180
230
  onChange: (e) => {
@@ -190,19 +240,26 @@ var ColorPicker = ({
190
240
  ...colorPickerProps
191
241
  }
192
242
  )
193
- ), /* @__PURE__ */ import_react2.default.createElement("div", { className: "hawa-relative hawa-flex hawa-max-h-fit hawa-w-full hawa-flex-col hawa-justify-center hawa-gap-0" }, /* @__PURE__ */ import_react2.default.createElement(
243
+ ), /* @__PURE__ */ import_react3.default.createElement("div", { className: "hawa-relative hawa-flex hawa-max-h-fit hawa-w-full hawa-flex-col hawa-justify-center hawa-gap-0" }, /* @__PURE__ */ import_react3.default.createElement(
194
244
  "input",
195
245
  {
246
+ disabled: preview,
196
247
  maxLength: 7,
197
248
  type: "text",
198
249
  onInput: handleTextInputChange,
199
250
  value: selectedColor,
200
251
  className: cn(
201
- "hawa-block hawa-h-[40px] hawa-w-24 hawa-rounded hawa-rounded-l-none hawa-border hawa-border-l-0 hawa-border-l-transparent hawa-bg-background hawa-p-2 hawa-text-sm hawa-transition-all"
252
+ "hawa-block hawa-h-[40px] hawa-w-24 hawa-rounded hawa-rounded-l-none hawa-bg-background hawa-p-2 hawa-text-sm hawa-transition-all",
253
+ "hawa-border hawa-border-l-0 hawa-border-l-transparent"
254
+ // "hawa-border hawa-border-x-0 hawa-border-x-transparent hawa-border-b-0 hawa-rounded-tr-none"
202
255
  ),
256
+ style: {
257
+ backgroundColor: preview ? selectedColor : "hsl(var(--background))",
258
+ color: preview ? calculateLuminance(selectedColor) > 0.5 ? "black" : "white" : ""
259
+ },
203
260
  ...textInputProps
204
261
  }
205
- ))), /* @__PURE__ */ import_react2.default.createElement(
262
+ ))), !forceHideHelperText && /* @__PURE__ */ import_react3.default.createElement(
206
263
  "p",
207
264
  {
208
265
  className: cn(
@@ -1,17 +1,46 @@
1
1
  import {
2
2
  Tooltip,
3
+ calculateLuminance,
3
4
  cn
4
- } from "../chunk-OTGCLEKC.mjs";
5
+ } from "../chunk-2R7F2GL7.mjs";
6
+ import "../chunk-ZFXKCRJC.mjs";
5
7
 
6
8
  // elements/colorPicker/ColorPicker.tsx
7
- import React2, {
9
+ import React3, {
8
10
  useState,
9
11
  useEffect
10
12
  } from "react";
11
13
 
14
+ // elements/skeleton/Skeleton.tsx
15
+ import React from "react";
16
+ function Skeleton({
17
+ className,
18
+ content,
19
+ animation = "pulse",
20
+ ...props
21
+ }) {
22
+ const animationStyles = {
23
+ none: "hawa-rounded hawa-bg-muted",
24
+ pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted",
25
+ shimmer: "hawa-space-y-5 hawa-rounded hawa-bg-muted hawa-p-4 hawa-relative before:hawa-absolute before:hawa-inset-0 before:hawa--translate-x-full before:hawa-animate-[shimmer_2s_infinite] before:hawa-bg-gradient-to-r before:hawa-from-transparent before:hawa-via-gray-300/40 dark:before:hawa-via-white/10 before:hawa-to-transparent hawa-isolate hawa-overflow-hidden before:hawa-border-t before:hawa-border-rose-100/10"
26
+ };
27
+ return /* @__PURE__ */ React.createElement(
28
+ "div",
29
+ {
30
+ className: cn(
31
+ animationStyles[animation],
32
+ content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
33
+ className
34
+ ),
35
+ ...props
36
+ },
37
+ content && content
38
+ );
39
+ }
40
+
12
41
  // elements/label/Label.tsx
13
- import * as React from "react";
14
- var Label = React.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React.createElement(
42
+ import * as React2 from "react";
43
+ var Label = React2.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React2.createElement(
15
44
  "label",
16
45
  {
17
46
  ref,
@@ -22,8 +51,8 @@ var Label = React.forwardRef(({ className, hint, hintSide, required, children, .
22
51
  ...props
23
52
  },
24
53
  children,
25
- required && /* @__PURE__ */ React.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
26
- ), hint && /* @__PURE__ */ React.createElement(
54
+ required && /* @__PURE__ */ React2.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
55
+ ), hint && /* @__PURE__ */ React2.createElement(
27
56
  Tooltip,
28
57
  {
29
58
  content: hint,
@@ -33,7 +62,7 @@ var Label = React.forwardRef(({ className, hint, hintSide, required, children, .
33
62
  onClick: (event) => event.preventDefault()
34
63
  }
35
64
  },
36
- /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
65
+ /* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement(
37
66
  "svg",
38
67
  {
39
68
  xmlns: "http://www.w3.org/2000/svg",
@@ -45,9 +74,9 @@ var Label = React.forwardRef(({ className, hint, hintSide, required, children, .
45
74
  strokeLinecap: "round",
46
75
  strokeLinejoin: "round"
47
76
  },
48
- /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "10" }),
49
- /* @__PURE__ */ React.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
50
- /* @__PURE__ */ React.createElement("path", { d: "M12 17h.01" })
77
+ /* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }),
78
+ /* @__PURE__ */ React2.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
79
+ /* @__PURE__ */ React2.createElement("path", { d: "M12 17h.01" })
51
80
  ))
52
81
  )));
53
82
  Label.displayName = "Label";
@@ -58,6 +87,9 @@ var ColorPicker = ({
58
87
  colorPickerProps,
59
88
  textInputProps,
60
89
  labelProps,
90
+ forceHideHelperText,
91
+ isLoading,
92
+ preview = false,
61
93
  ...props
62
94
  }) => {
63
95
  const [selectedColor, setSelectedColor] = useState(props.color);
@@ -78,15 +110,16 @@ var ColorPicker = ({
78
110
  props.handleChange(e);
79
111
  }
80
112
  };
81
- return /* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React2.createElement(Label, { ...labelProps }, props.label), /* @__PURE__ */ React2.createElement("div", { dir: "ltr", className: "hawa-flex hawa-w-full hawa-flex-row" }, /* @__PURE__ */ React2.createElement(
113
+ return /* @__PURE__ */ React3.createElement("div", { className: "hawa-flex hawa-w-fit hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React3.createElement(Label, { ...labelProps }, props.label), isLoading ? /* @__PURE__ */ React3.createElement(Skeleton, { style: { height: 40, width: 148 } }) : /* @__PURE__ */ React3.createElement("div", { dir: "ltr", className: "hawa-flex hawa-w-full hawa-flex-row" }, /* @__PURE__ */ React3.createElement(
82
114
  "div",
83
115
  {
84
116
  style: { height: 40, backgroundColor: selectedColor },
85
117
  className: "hawa-rounded-bl-lg hawa-rounded-tl-lg hawa-border"
86
118
  },
87
- /* @__PURE__ */ React2.createElement(
119
+ /* @__PURE__ */ React3.createElement(
88
120
  "input",
89
121
  {
122
+ disabled: preview,
90
123
  type: "color",
91
124
  value: selectedColor,
92
125
  onChange: (e) => {
@@ -102,19 +135,26 @@ var ColorPicker = ({
102
135
  ...colorPickerProps
103
136
  }
104
137
  )
105
- ), /* @__PURE__ */ React2.createElement("div", { className: "hawa-relative hawa-flex hawa-max-h-fit hawa-w-full hawa-flex-col hawa-justify-center hawa-gap-0" }, /* @__PURE__ */ React2.createElement(
138
+ ), /* @__PURE__ */ React3.createElement("div", { className: "hawa-relative hawa-flex hawa-max-h-fit hawa-w-full hawa-flex-col hawa-justify-center hawa-gap-0" }, /* @__PURE__ */ React3.createElement(
106
139
  "input",
107
140
  {
141
+ disabled: preview,
108
142
  maxLength: 7,
109
143
  type: "text",
110
144
  onInput: handleTextInputChange,
111
145
  value: selectedColor,
112
146
  className: cn(
113
- "hawa-block hawa-h-[40px] hawa-w-24 hawa-rounded hawa-rounded-l-none hawa-border hawa-border-l-0 hawa-border-l-transparent hawa-bg-background hawa-p-2 hawa-text-sm hawa-transition-all"
147
+ "hawa-block hawa-h-[40px] hawa-w-24 hawa-rounded hawa-rounded-l-none hawa-bg-background hawa-p-2 hawa-text-sm hawa-transition-all",
148
+ "hawa-border hawa-border-l-0 hawa-border-l-transparent"
149
+ // "hawa-border hawa-border-x-0 hawa-border-x-transparent hawa-border-b-0 hawa-rounded-tr-none"
114
150
  ),
151
+ style: {
152
+ backgroundColor: preview ? selectedColor : "hsl(var(--background))",
153
+ color: preview ? calculateLuminance(selectedColor) > 0.5 ? "black" : "white" : ""
154
+ },
115
155
  ...textInputProps
116
156
  }
117
- ))), /* @__PURE__ */ React2.createElement(
157
+ ))), !forceHideHelperText && /* @__PURE__ */ React3.createElement(
118
158
  "p",
119
159
  {
120
160
  className: cn(
@@ -0,0 +1,4 @@
1
+ type DirectionType = "rtl" | "ltr";
2
+ type RadiusType = "full" | "inherit" | "none";
3
+
4
+ export type { DirectionType as D, RadiusType as R };
@@ -0,0 +1,4 @@
1
+ type DirectionType = "rtl" | "ltr";
2
+ type RadiusType = "full" | "inherit" | "none";
3
+
4
+ export type { DirectionType as D, RadiusType as R };
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
- import { RowData, ColumnDef } from '@tanstack/react-table';
3
2
  import { D as DirectionType } from '../commonTypes-ko_NGEoT.mjs';
3
+ import { RowData, ColumnDef } from '@tanstack/react-table';
4
+ export { ColumnDef } from '@tanstack/react-table';
4
5
 
5
6
  type DataTableProps<DataProps = {}> = {
6
7
  direction?: DirectionType;
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
- import { RowData, ColumnDef } from '@tanstack/react-table';
3
2
  import { D as DirectionType } from '../commonTypes-ko_NGEoT.js';
3
+ import { RowData, ColumnDef } from '@tanstack/react-table';
4
+ export { ColumnDef } from '@tanstack/react-table';
4
5
 
5
6
  type DataTableProps<DataProps = {}> = {
6
7
  direction?: DirectionType;
@@ -1145,7 +1145,7 @@ var DataTable = ({
1145
1145
  /* @__PURE__ */ React9.createElement("div", { className: "hawa-flex hawa-items-center hawa-justify-between" }, !props.showCount && /* @__PURE__ */ React9.createElement("div", { className: "hawa-flex hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm hawa-text-muted-foreground" }), props.showCount && /* @__PURE__ */ React9.createElement(
1146
1146
  "div",
1147
1147
  {
1148
- className: "text-sm text-muted-foreground",
1148
+ className: "text-muted-foreground text-sm",
1149
1149
  dir: props.direction
1150
1150
  },
1151
1151
  /* @__PURE__ */ React9.createElement("span", null, (_g = props.texts) == null ? void 0 : _g.total),
@@ -1114,7 +1114,7 @@ var DataTable = ({
1114
1114
  /* @__PURE__ */ React9.createElement("div", { className: "hawa-flex hawa-items-center hawa-justify-between" }, !props.showCount && /* @__PURE__ */ React9.createElement("div", { className: "hawa-flex hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm hawa-text-muted-foreground" }), props.showCount && /* @__PURE__ */ React9.createElement(
1115
1115
  "div",
1116
1116
  {
1117
- className: "text-sm text-muted-foreground",
1117
+ className: "text-muted-foreground text-sm",
1118
1118
  dir: props.direction
1119
1119
  },
1120
1120
  /* @__PURE__ */ React9.createElement("span", null, (_g = props.texts) == null ? void 0 : _g.total),
@@ -12,6 +12,7 @@ import * as SheetPrimitive from '@radix-ui/react-dialog';
12
12
  import { DialogProps } from '@radix-ui/react-dialog';
13
13
  import { VariantProps } from 'class-variance-authority';
14
14
  import { RowData, ColumnDef } from '@tanstack/react-table';
15
+ export { ColumnDef } from '@tanstack/react-table';
15
16
  import { L as LabelProps } from '../Radio-hsrLKNxE.mjs';
16
17
  export { b as Label, a as Radio, R as RadioOptionsTypes, c as Select, S as SelectOptionProps } from '../Radio-hsrLKNxE.mjs';
17
18
  import * as TabsPrimitive from '@radix-ui/react-tabs';
@@ -21,6 +22,7 @@ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
21
22
  import * as ProgressPrimitive from '@radix-ui/react-progress';
22
23
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
23
24
  import * as SliderPrimitive from '@radix-ui/react-slider';
25
+ import { HighlightProps } from 'prism-react-renderer';
24
26
  import { EmblaOptionsType } from 'embla-carousel';
25
27
  export { d as Toast, h as ToastAction, a as ToastActionElement, g as ToastClose, f as ToastDescription, T as ToastProps, b as ToastProvider, e as ToastTitle, c as ToastViewport } from '../Toast-VBd4UvlM.mjs';
26
28
  import '@radix-ui/react-dropdown-menu';
@@ -258,6 +260,7 @@ type AlertTypes = {
258
260
  variant: "outline" | "link" | "default" | "destructive" | "secondary" | "ghost";
259
261
  }
260
262
  ];
263
+ /** Removes the close button */
261
264
  persistent?: boolean;
262
265
  icon?: any;
263
266
  className?: any;
@@ -382,6 +385,7 @@ declare const Combobox: React.ForwardRefExoticComponent<ComboboxTypes<any> & Rea
382
385
 
383
386
  interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
384
387
  helperText?: string;
388
+ isLoading?: boolean;
385
389
  /** The label of the input field */
386
390
  label?: any;
387
391
  labelProps?: LabelProps;
@@ -437,7 +441,7 @@ type SortButtonProps = {
437
441
  declare const SortButton: React__default.FC<SortButtonProps>;
438
442
 
439
443
  declare const Tabs: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
440
- orientation?: OrientationType | undefined;
444
+ orientation?: "vertical" | "horizontal" | undefined;
441
445
  } & React.RefAttributes<HTMLDivElement>>;
442
446
  declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
443
447
  declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
@@ -627,8 +631,12 @@ declare const ScrollBar: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitiv
627
631
  type ColorPickerTypes = {
628
632
  label?: string;
629
633
  id?: string;
634
+ isLoading?: boolean;
630
635
  labelProps?: LabelProps;
631
636
  helperText?: string;
637
+ forceHideHelperText?: boolean;
638
+ /** Boolean to enable/disable editing the input field and using it as a text field */
639
+ preview?: boolean;
632
640
  /** The hex code for the color */
633
641
  color?: any;
634
642
  /** Fires everytime the color changes */
@@ -712,7 +720,7 @@ declare const ScrollIndicator: FC<ScrollIndicatorProps>;
712
720
 
713
721
  type CodeBlockTypes = {
714
722
  /** Specifies the programming language for syntax highlighting.*/
715
- language?: string;
723
+ language?: HighlightProps["language"];
716
724
  /** Defines the width of the code block.*/
717
725
  width?: "full" | "md" | "sm";
718
726
  /** Array of tabs each containing a title and code content.*/
@@ -736,6 +744,7 @@ type CarouselProps = {
736
744
  autoplay?: boolean;
737
745
  autoplayInterval?: number;
738
746
  options?: EmblaOptionsType;
747
+ direction?: DirectionType;
739
748
  };
740
749
  declare const Carousel: React__default.FC<CarouselProps>;
741
750
 
@@ -12,6 +12,7 @@ import * as SheetPrimitive from '@radix-ui/react-dialog';
12
12
  import { DialogProps } from '@radix-ui/react-dialog';
13
13
  import { VariantProps } from 'class-variance-authority';
14
14
  import { RowData, ColumnDef } from '@tanstack/react-table';
15
+ export { ColumnDef } from '@tanstack/react-table';
15
16
  import { L as LabelProps } from '../Radio-K1WGpnGA.js';
16
17
  export { b as Label, a as Radio, R as RadioOptionsTypes, c as Select, S as SelectOptionProps } from '../Radio-K1WGpnGA.js';
17
18
  import * as TabsPrimitive from '@radix-ui/react-tabs';
@@ -21,6 +22,7 @@ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
21
22
  import * as ProgressPrimitive from '@radix-ui/react-progress';
22
23
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
23
24
  import * as SliderPrimitive from '@radix-ui/react-slider';
25
+ import { HighlightProps } from 'prism-react-renderer';
24
26
  import { EmblaOptionsType } from 'embla-carousel';
25
27
  export { d as Toast, h as ToastAction, a as ToastActionElement, g as ToastClose, f as ToastDescription, T as ToastProps, b as ToastProvider, e as ToastTitle, c as ToastViewport } from '../Toast-pOd4uGZz.js';
26
28
  import '@radix-ui/react-dropdown-menu';
@@ -258,6 +260,7 @@ type AlertTypes = {
258
260
  variant: "outline" | "link" | "default" | "destructive" | "secondary" | "ghost";
259
261
  }
260
262
  ];
263
+ /** Removes the close button */
261
264
  persistent?: boolean;
262
265
  icon?: any;
263
266
  className?: any;
@@ -382,6 +385,7 @@ declare const Combobox: React.ForwardRefExoticComponent<ComboboxTypes<any> & Rea
382
385
 
383
386
  interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
384
387
  helperText?: string;
388
+ isLoading?: boolean;
385
389
  /** The label of the input field */
386
390
  label?: any;
387
391
  labelProps?: LabelProps;
@@ -437,7 +441,7 @@ type SortButtonProps = {
437
441
  declare const SortButton: React__default.FC<SortButtonProps>;
438
442
 
439
443
  declare const Tabs: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
440
- orientation?: OrientationType | undefined;
444
+ orientation?: "vertical" | "horizontal" | undefined;
441
445
  } & React.RefAttributes<HTMLDivElement>>;
442
446
  declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
443
447
  declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
@@ -627,8 +631,12 @@ declare const ScrollBar: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitiv
627
631
  type ColorPickerTypes = {
628
632
  label?: string;
629
633
  id?: string;
634
+ isLoading?: boolean;
630
635
  labelProps?: LabelProps;
631
636
  helperText?: string;
637
+ forceHideHelperText?: boolean;
638
+ /** Boolean to enable/disable editing the input field and using it as a text field */
639
+ preview?: boolean;
632
640
  /** The hex code for the color */
633
641
  color?: any;
634
642
  /** Fires everytime the color changes */
@@ -712,7 +720,7 @@ declare const ScrollIndicator: FC<ScrollIndicatorProps>;
712
720
 
713
721
  type CodeBlockTypes = {
714
722
  /** Specifies the programming language for syntax highlighting.*/
715
- language?: string;
723
+ language?: HighlightProps["language"];
716
724
  /** Defines the width of the code block.*/
717
725
  width?: "full" | "md" | "sm";
718
726
  /** Array of tabs each containing a title and code content.*/
@@ -736,6 +744,7 @@ type CarouselProps = {
736
744
  autoplay?: boolean;
737
745
  autoplayInterval?: number;
738
746
  options?: EmblaOptionsType;
747
+ direction?: DirectionType;
739
748
  };
740
749
  declare const Carousel: React__default.FC<CarouselProps>;
741
750