@sikka/hawa 0.35.5-next → 0.36.0-next

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/dist/{Chip-BtgTAs8x.d.mts → Chip-CGl24Kd9.d.mts} +2 -2
  2. package/dist/{Chip-DQsP5hFS.d.ts → Chip-Cato49ar.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 +6 -4
  6. package/dist/accordion/index.js.map +1 -1
  7. package/dist/accordion/index.mjs +6 -4
  8. package/dist/accordion/index.mjs.map +1 -1
  9. package/dist/appLayout/index.js +180 -172
  10. package/dist/appLayout/index.js.map +1 -1
  11. package/dist/appLayout/index.mjs +201 -193
  12. package/dist/appLayout/index.mjs.map +1 -1
  13. package/dist/blocks/auth/index.js +28 -5
  14. package/dist/blocks/auth/index.mjs +4 -4
  15. package/dist/blocks/feedback/index.js +0 -1
  16. package/dist/blocks/feedback/index.mjs +1 -1
  17. package/dist/blocks/index.js +94 -69
  18. package/dist/blocks/index.mjs +12 -12
  19. package/dist/blocks/misc/index.js +81 -56
  20. package/dist/blocks/misc/index.mjs +65 -65
  21. package/dist/blocks/pricing/index.js +6 -4
  22. package/dist/blocks/pricing/index.mjs +1 -1
  23. package/dist/chip/index.d.mts +2 -2
  24. package/dist/chip/index.d.ts +2 -2
  25. package/dist/chip/index.js +6 -4
  26. package/dist/chip/index.js.map +1 -1
  27. package/dist/chip/index.mjs +6 -4
  28. package/dist/chip/index.mjs.map +1 -1
  29. package/dist/{chunk-HSRW7X3Z.mjs → chunk-6QIOEUE2.mjs} +1 -1
  30. package/dist/{chunk-JEZLVXSU.mjs → chunk-BXBSZD5X.mjs} +26 -2
  31. package/dist/{chunk-LVXG3SMD.mjs → chunk-CJ57JBYA.mjs} +6 -4
  32. package/dist/{chunk-CD6AQVU3.mjs → chunk-HLYAX77R.mjs} +0 -1
  33. package/dist/{chunk-G7JHUC5N.mjs → chunk-NNPNQK6F.mjs} +211 -4
  34. package/dist/chunk-SYGWSBJL.mjs +63 -0
  35. package/dist/{chunk-TERP5K6R.mjs → chunk-T33FXOHA.mjs} +29 -189
  36. package/dist/colorPicker/index.js +1 -1
  37. package/dist/colorPicker/index.js.map +1 -1
  38. package/dist/colorPicker/index.mjs +1 -1
  39. package/dist/colorPicker/index.mjs.map +1 -1
  40. package/dist/dataTable/index.js +41 -5
  41. package/dist/dataTable/index.js.map +1 -1
  42. package/dist/dataTable/index.mjs +41 -5
  43. package/dist/dataTable/index.mjs.map +1 -1
  44. package/dist/datePicker/index.d.mts +1 -0
  45. package/dist/datePicker/index.d.ts +1 -0
  46. package/dist/datePicker/index.js +3 -2
  47. package/dist/datePicker/index.js.map +1 -1
  48. package/dist/datePicker/index.mjs +3 -2
  49. package/dist/datePicker/index.mjs.map +1 -1
  50. package/dist/elements/index.d.mts +8 -4
  51. package/dist/elements/index.d.ts +8 -4
  52. package/dist/elements/index.js +124 -87
  53. package/dist/elements/index.mjs +25 -13
  54. package/dist/hooks/index.d.mts +4 -1
  55. package/dist/hooks/index.d.ts +4 -1
  56. package/dist/hooks/index.js +31 -2
  57. package/dist/hooks/index.mjs +4 -2
  58. package/dist/index.css +10 -0
  59. package/dist/index.d.mts +11 -5
  60. package/dist/index.d.ts +11 -5
  61. package/dist/index.js +225 -189
  62. package/dist/index.mjs +771 -736
  63. package/dist/input/index.d.mts +6 -2
  64. package/dist/input/index.d.ts +6 -2
  65. package/dist/input/index.js +26 -2
  66. package/dist/input/index.js.map +1 -1
  67. package/dist/input/index.mjs +26 -2
  68. package/dist/input/index.mjs.map +1 -1
  69. package/dist/layout/index.d.mts +1 -1
  70. package/dist/layout/index.d.ts +1 -1
  71. package/dist/layout/index.js +289 -281
  72. package/dist/layout/index.mjs +24 -56
  73. package/dist/passwordInput/index.js +26 -2
  74. package/dist/passwordInput/index.js.map +1 -1
  75. package/dist/passwordInput/index.mjs +26 -2
  76. package/dist/passwordInput/index.mjs.map +1 -1
  77. package/dist/phoneInput/index.js +1 -2
  78. package/dist/phoneInput/index.js.map +1 -1
  79. package/dist/phoneInput/index.mjs +1 -2
  80. package/dist/phoneInput/index.mjs.map +1 -1
  81. package/dist/pinInput/index.js +1 -1
  82. package/dist/pinInput/index.js.map +1 -1
  83. package/dist/pinInput/index.mjs +1 -1
  84. package/dist/pinInput/index.mjs.map +1 -1
  85. package/dist/select/index.js +0 -1
  86. package/dist/select/index.js.map +1 -1
  87. package/dist/select/index.mjs +0 -1
  88. package/dist/select/index.mjs.map +1 -1
  89. package/dist/sidebar/index.js +6 -4
  90. package/dist/sidebar/index.js.map +1 -1
  91. package/dist/sidebar/index.mjs +6 -4
  92. package/dist/sidebar/index.mjs.map +1 -1
  93. package/dist/tabs/index.d.mts +1 -1
  94. package/dist/tabs/index.d.ts +1 -1
  95. package/dist/tabs/index.js +26 -24
  96. package/dist/tabs/index.js.map +1 -1
  97. package/dist/tabs/index.mjs +30 -28
  98. package/dist/tabs/index.mjs.map +1 -1
  99. package/package.json +7 -8
  100. package/dist/chunk-545D35G6.mjs +0 -54
@@ -1,17 +1,17 @@
1
1
  "use client";
2
2
  import {
3
3
  Input
4
- } from "../../chunk-JEZLVXSU.mjs";
4
+ } from "../../chunk-BXBSZD5X.mjs";
5
5
  import {
6
6
  Chip,
7
7
  ScrollArea
8
- } from "../../chunk-LVXG3SMD.mjs";
8
+ } from "../../chunk-CJ57JBYA.mjs";
9
9
  import {
10
10
  Textarea
11
11
  } from "../../chunk-WABHQMUI.mjs";
12
12
  import {
13
13
  Select
14
- } from "../../chunk-CD6AQVU3.mjs";
14
+ } from "../../chunk-HLYAX77R.mjs";
15
15
  import {
16
16
  Button,
17
17
  Card,
@@ -24,10 +24,10 @@ import {
24
24
  } from "../../chunk-YP2CCKZG.mjs";
25
25
 
26
26
  // blocks/misc/LegalTexts.tsx
27
- import React12 from "react";
27
+ import React11 from "react";
28
28
 
29
29
  // elements/tabs/Tabs.tsx
30
- import * as React11 from "react";
30
+ import * as React10 from "react";
31
31
 
32
32
  // hooks/useIsomorphicEffect.ts
33
33
  import { useEffect, useLayoutEffect } from "react";
@@ -110,15 +110,15 @@ var useMeasureDirty = (ref) => {
110
110
  return rect;
111
111
  };
112
112
 
113
- // hooks/useOutsideClick.ts
114
- import React9 from "react";
113
+ // hooks/useClickOutside.ts
114
+ import { useEffect as useEffect14, useRef as useRef8 } from "react";
115
115
 
116
116
  // elements/tabs/Tabs.tsx
117
117
  import * as TabsPrimitive from "@radix-ui/react-tabs";
118
118
  import { tv } from "tailwind-variants";
119
119
 
120
120
  // elements/floatBox/FloatBox.tsx
121
- import * as React10 from "react";
121
+ import * as React9 from "react";
122
122
  var FloatBox = ({
123
123
  className,
124
124
  open,
@@ -156,7 +156,7 @@ var FloatBox = ({
156
156
  right: "hawa-arrow-default-left",
157
157
  left: "hawa-arrow-default-right"
158
158
  };
159
- return /* @__PURE__ */ React10.createElement(
159
+ return /* @__PURE__ */ React9.createElement(
160
160
  "div",
161
161
  {
162
162
  className: cn(
@@ -167,8 +167,8 @@ var FloatBox = ({
167
167
  "data-side": side,
168
168
  "data-floatbox-state": open ? "open" : "closed"
169
169
  },
170
- withArrow && /* @__PURE__ */ React10.createElement("div", { className: cn(arrowDirection[side]) }),
171
- /* @__PURE__ */ React10.createElement("span", null, props.children)
170
+ withArrow && /* @__PURE__ */ React9.createElement("div", { className: cn(arrowDirection[side]) }),
171
+ /* @__PURE__ */ React9.createElement("span", null, props.children)
172
172
  );
173
173
  };
174
174
 
@@ -231,8 +231,8 @@ var tabsTriggerVariant = tv({
231
231
  ],
232
232
  defaultVariants: { variant: "default", orientation: "horizontal" }
233
233
  });
234
- var TabsContext = React11.createContext({ orientation: "horizontal", variant: "default" });
235
- var Tabs = React11.forwardRef(({ className, orientation, variant = "default", ...props }, ref) => /* @__PURE__ */ React11.createElement(
234
+ var TabsContext = React10.createContext({ orientation: "horizontal", variant: "default" });
235
+ var Tabs = React10.forwardRef(({ className, orientation, variant = "default", ...props }, ref) => /* @__PURE__ */ React10.createElement(
236
236
  TabsPrimitive.Root,
237
237
  {
238
238
  ref,
@@ -243,11 +243,11 @@ var Tabs = React11.forwardRef(({ className, orientation, variant = "default", ..
243
243
  ),
244
244
  ...props
245
245
  },
246
- /* @__PURE__ */ React11.createElement(TabsContext.Provider, { value: { orientation, variant } }, props.children)
246
+ /* @__PURE__ */ React10.createElement(TabsContext.Provider, { value: { orientation, variant } }, props.children)
247
247
  ));
248
- var TabsList = React11.forwardRef(({ className, ...props }, ref) => {
249
- const { orientation, variant } = React11.useContext(TabsContext);
250
- return /* @__PURE__ */ React11.createElement(
248
+ var TabsList = React10.forwardRef(({ className, ...props }, ref) => {
249
+ const { orientation, variant } = React10.useContext(TabsContext);
250
+ return /* @__PURE__ */ React10.createElement(
251
251
  TabsPrimitive.List,
252
252
  {
253
253
  ref,
@@ -260,11 +260,11 @@ var TabsList = React11.forwardRef(({ className, ...props }, ref) => {
260
260
  }
261
261
  );
262
262
  });
263
- var TabsTrigger = React11.forwardRef(({ className, chipProps, ...props }, ref) => {
264
- const { orientation, variant } = React11.useContext(TabsContext);
265
- const tabTriggerRef = React11.useRef(null);
263
+ var TabsTrigger = React10.forwardRef(({ className, chipProps, ...props }, ref) => {
264
+ const { orientation, variant } = React10.useContext(TabsContext);
265
+ const tabTriggerRef = React10.useRef(null);
266
266
  const { width } = useMeasureDirty(tabTriggerRef);
267
- return /* @__PURE__ */ React11.createElement(
267
+ return /* @__PURE__ */ React10.createElement(
268
268
  TabsPrimitive.Trigger,
269
269
  {
270
270
  ref: tabTriggerRef,
@@ -276,8 +276,8 @@ var TabsTrigger = React11.forwardRef(({ className, chipProps, ...props }, ref) =
276
276
  ...props
277
277
  },
278
278
  props.children,
279
- chipProps && /* @__PURE__ */ React11.createElement(Chip, { ...chipProps }),
280
- /* @__PURE__ */ React11.createElement(
279
+ chipProps && /* @__PURE__ */ React10.createElement(Chip, { ...chipProps }),
280
+ /* @__PURE__ */ React10.createElement(
281
281
  FloatBox,
282
282
  {
283
283
  withArrow: true,
@@ -290,7 +290,7 @@ var TabsTrigger = React11.forwardRef(({ className, chipProps, ...props }, ref) =
290
290
  )
291
291
  );
292
292
  });
293
- var TabsContent = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React11.createElement(
293
+ var TabsContent = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
294
294
  TabsPrimitive.Content,
295
295
  {
296
296
  ref,
@@ -308,7 +308,7 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
308
308
 
309
309
  // blocks/misc/LegalTexts.tsx
310
310
  var LegalTexts = ({ tabs, ...props }) => {
311
- return /* @__PURE__ */ React12.createElement(
311
+ return /* @__PURE__ */ React11.createElement(
312
312
  Tabs,
313
313
  {
314
314
  value: props.activeTab,
@@ -316,8 +316,8 @@ var LegalTexts = ({ tabs, ...props }) => {
316
316
  defaultValue: props.defaultTab || tabs[0].value,
317
317
  dir: props.direction
318
318
  },
319
- /* @__PURE__ */ React12.createElement(TabsList, { className: "hawa-w-full" }, tabs.map((tab, index) => /* @__PURE__ */ React12.createElement(TabsTrigger, { key: index, value: tab.value }, tab.title))),
320
- tabs.map((tab, index) => /* @__PURE__ */ React12.createElement(TabsContent, { key: index, value: tab.value }, /* @__PURE__ */ React12.createElement(
319
+ /* @__PURE__ */ React11.createElement(TabsList, { className: "hawa-w-full" }, tabs.map((tab, index) => /* @__PURE__ */ React11.createElement(TabsTrigger, { key: index, value: tab.value }, tab.title))),
320
+ tabs.map((tab, index) => /* @__PURE__ */ React11.createElement(TabsContent, { key: index, value: tab.value }, /* @__PURE__ */ React11.createElement(
321
321
  ScrollArea,
322
322
  {
323
323
  className: cn(
@@ -331,9 +331,9 @@ var LegalTexts = ({ tabs, ...props }) => {
331
331
  };
332
332
 
333
333
  // blocks/misc/EmptyState.tsx
334
- import React13 from "react";
334
+ import React12 from "react";
335
335
  var EmptyState = ({ texts, onActionClick }) => {
336
- return /* @__PURE__ */ React13.createElement(Card, null, /* @__PURE__ */ React13.createElement(CardContent, { headless: true }, /* @__PURE__ */ React13.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-text-center " }, /* @__PURE__ */ React13.createElement("div", { className: "hawa-flex hawa-h-10 hawa-w-10 hawa-flex-col hawa-items-center hawa-justify-center hawa-rounded-3xl hawa-bg-primary hawa-text-6xl hawa-font-bold hawa-text-primary-foreground" }, /* @__PURE__ */ React13.createElement(
336
+ return /* @__PURE__ */ React12.createElement(Card, null, /* @__PURE__ */ React12.createElement(CardContent, { headless: true }, /* @__PURE__ */ React12.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-text-center " }, /* @__PURE__ */ React12.createElement("div", { className: "hawa-flex hawa-h-10 hawa-w-10 hawa-flex-col hawa-items-center hawa-justify-center hawa-rounded-3xl hawa-bg-primary hawa-text-6xl hawa-font-bold hawa-text-primary-foreground" }, /* @__PURE__ */ React12.createElement(
337
337
  "svg",
338
338
  {
339
339
  stroke: "currentColor",
@@ -343,30 +343,30 @@ var EmptyState = ({ texts, onActionClick }) => {
343
343
  height: "0.35em",
344
344
  width: "0.35em"
345
345
  },
346
- /* @__PURE__ */ React13.createElement("path", { d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" })
347
- )), /* @__PURE__ */ React13.createElement("div", { className: "hawa-m-2 hawa-text-xl hawa-font-bold" }, (texts == null ? void 0 : texts.youreCaughtUp) || "You're all caught up"))), /* @__PURE__ */ React13.createElement(CardFooter, null, /* @__PURE__ */ React13.createElement(Button, { className: "hawa-w-full", onClick: () => onActionClick() }, (texts == null ? void 0 : texts.actionText) || "Go Home")));
346
+ /* @__PURE__ */ React12.createElement("path", { d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" })
347
+ )), /* @__PURE__ */ React12.createElement("div", { className: "hawa-m-2 hawa-text-xl hawa-font-bold" }, (texts == null ? void 0 : texts.youreCaughtUp) || "You're all caught up"))), /* @__PURE__ */ React12.createElement(CardFooter, null, /* @__PURE__ */ React12.createElement(Button, { className: "hawa-w-full", onClick: () => onActionClick() }, (texts == null ? void 0 : texts.actionText) || "Go Home")));
348
348
  };
349
349
 
350
350
  // blocks/misc/Testimonial.tsx
351
- import React14 from "react";
351
+ import React13 from "react";
352
352
  var Testimonial = () => {
353
- return /* @__PURE__ */ React14.createElement(Card, null, /* @__PURE__ */ React14.createElement(CardContent, { headless: true }, /* @__PURE__ */ React14.createElement("div", null, /* @__PURE__ */ React14.createElement("p", { className: "mb-4 max-w-sm" }, "The team at Sikka Software is simply amazing. The tech is easy to follow, easy to work with, and infinitely flexible. The solution opportunities created by Tines are endless.")), /* @__PURE__ */ React14.createElement("div", { className: "flex flex-row gap-4" }, /* @__PURE__ */ React14.createElement("svg", { width: "48", height: "48", viewBox: "0 0 48 48", fill: "none" }, /* @__PURE__ */ React14.createElement("rect", { width: "48", height: "48", rx: "24", fill: "#45BE8B" }), /* @__PURE__ */ React14.createElement(
353
+ return /* @__PURE__ */ React13.createElement(Card, null, /* @__PURE__ */ React13.createElement(CardContent, { headless: true }, /* @__PURE__ */ React13.createElement("div", null, /* @__PURE__ */ React13.createElement("p", { className: "mb-4 max-w-sm" }, "The team at Sikka Software is simply amazing. The tech is easy to follow, easy to work with, and infinitely flexible. The solution opportunities created by Tines are endless.")), /* @__PURE__ */ React13.createElement("div", { className: "flex flex-row gap-4" }, /* @__PURE__ */ React13.createElement("svg", { width: "48", height: "48", viewBox: "0 0 48 48", fill: "none" }, /* @__PURE__ */ React13.createElement("rect", { width: "48", height: "48", rx: "24", fill: "#45BE8B" }), /* @__PURE__ */ React13.createElement(
354
354
  "path",
355
355
  {
356
356
  d: "M14.1412 22.4427L17.5803 16.5199C17.7671 16.1981 18.1112 16 18.4834 16H20.8581C21.653 16 22.1565 16.8528 21.7725 17.5488L19.3042 22.0225C19.2202 22.1747 19.1762 22.3458 19.1762 22.5196C19.1762 23.0879 19.6369 23.5486 20.2052 23.5486H21.5827C22.1594 23.5486 22.627 24.0162 22.627 24.5929V31.347C22.627 31.9237 22.1594 32.3913 21.5827 32.3913H15.0443C14.4676 32.3913 14 31.9237 14 31.347V22.9671C14 22.7829 14.0487 22.602 14.1412 22.4427Z",
357
357
  fill: "#FFFFFF"
358
358
  }
359
- ), /* @__PURE__ */ React14.createElement(
359
+ ), /* @__PURE__ */ React13.createElement(
360
360
  "path",
361
361
  {
362
362
  d: "M25.356 22.4427L28.7951 16.5199C28.982 16.1981 29.326 16 29.6982 16H32.0729C32.8679 16 33.3713 16.8528 32.9873 17.5488L30.5191 22.0225C30.4351 22.1747 30.391 22.3458 30.391 22.5196C30.391 23.0879 30.8518 23.5486 31.4201 23.5486H32.7975C33.3743 23.5486 33.8418 24.0162 33.8418 24.5929V31.347C33.8418 31.9237 33.3743 32.3913 32.7975 32.3913H26.2592C25.6824 32.3913 25.2148 31.9237 25.2148 31.347V22.9671C25.2148 22.7829 25.2636 22.602 25.356 22.4427Z",
363
363
  fill: "#FFFFFF"
364
364
  }
365
- )), /* @__PURE__ */ React14.createElement("span", { className: "border border-l " }), " ", /* @__PURE__ */ React14.createElement("div", null, /* @__PURE__ */ React14.createElement("strong", null, "Brent Lassi"), /* @__PURE__ */ React14.createElement("div", null, " Chief Information Security Officer")))));
365
+ )), /* @__PURE__ */ React13.createElement("span", { className: "border border-l " }), " ", /* @__PURE__ */ React13.createElement("div", null, /* @__PURE__ */ React13.createElement("strong", null, "Brent Lassi"), /* @__PURE__ */ React13.createElement("div", null, " Chief Information Security Officer")))));
366
366
  };
367
367
 
368
368
  // blocks/misc/LeadGenerator.tsx
369
- import React15 from "react";
369
+ import React14 from "react";
370
370
  import { useForm, Controller } from "react-hook-form";
371
371
  var LeadGenerator = ({ texts, submitHandler }) => {
372
372
  var _a;
@@ -378,14 +378,14 @@ var LeadGenerator = ({ texts, submitHandler }) => {
378
378
  console.log("handleNewsletterSub props was not provided");
379
379
  }
380
380
  };
381
- return /* @__PURE__ */ React15.createElement(Card, null, /* @__PURE__ */ React15.createElement(CardHeader, null, /* @__PURE__ */ React15.createElement(CardTitle, null, texts == null ? void 0 : texts.title), /* @__PURE__ */ React15.createElement(CardDescription, null, texts == null ? void 0 : texts.subtitle)), /* @__PURE__ */ React15.createElement(CardContent, null, /* @__PURE__ */ React15.createElement(
381
+ return /* @__PURE__ */ React14.createElement(Card, null, /* @__PURE__ */ React14.createElement(CardHeader, null, /* @__PURE__ */ React14.createElement(CardTitle, null, texts == null ? void 0 : texts.title), /* @__PURE__ */ React14.createElement(CardDescription, null, texts == null ? void 0 : texts.subtitle)), /* @__PURE__ */ React14.createElement(CardContent, null, /* @__PURE__ */ React14.createElement(
382
382
  "form",
383
383
  {
384
384
  noValidate: true,
385
385
  className: "hawa-flex hawa-flex-row hawa-gap-2",
386
386
  onSubmit: handleSubmit(onSubmit)
387
387
  },
388
- /* @__PURE__ */ React15.createElement(
388
+ /* @__PURE__ */ React14.createElement(
389
389
  Controller,
390
390
  {
391
391
  name: "email",
@@ -398,27 +398,27 @@ var LeadGenerator = ({ texts, submitHandler }) => {
398
398
  }
399
399
  },
400
400
  defaultValue: "",
401
- render: ({ field }) => /* @__PURE__ */ React15.createElement(Input, { ...field, type: "email", placeholder: "example@sikka.io" })
401
+ render: ({ field }) => /* @__PURE__ */ React14.createElement(Input, { ...field, type: "email", placeholder: "example@sikka.io" })
402
402
  }
403
403
  ),
404
- /* @__PURE__ */ React15.createElement(Button, { type: "submit", disabled: !formState.isValid }, (_a = texts == null ? void 0 : texts.submit) != null ? _a : "Submit")
404
+ /* @__PURE__ */ React14.createElement(Button, { type: "submit", disabled: !formState.isValid }, (_a = texts == null ? void 0 : texts.submit) != null ? _a : "Submit")
405
405
  )));
406
406
  };
407
407
 
408
408
  // blocks/misc/Announcement.tsx
409
- import React16 from "react";
409
+ import React15 from "react";
410
410
  var Announcement = ({
411
411
  onActionClick,
412
412
  ...props
413
413
  }) => {
414
- return /* @__PURE__ */ React16.createElement(Card, null, /* @__PURE__ */ React16.createElement(
414
+ return /* @__PURE__ */ React15.createElement(Card, null, /* @__PURE__ */ React15.createElement(
415
415
  CardContent,
416
416
  {
417
417
  headless: true,
418
418
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-between"
419
419
  },
420
- /* @__PURE__ */ React16.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-start hawa-justify-center " }, /* @__PURE__ */ React16.createElement("span", { className: "hawa-text-lg hawa-font-bold" }, props.title), /* @__PURE__ */ React16.createElement("span", { className: "hawa-text-sm" }, props.subtitle)),
421
- /* @__PURE__ */ React16.createElement(
420
+ /* @__PURE__ */ React15.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-start hawa-justify-center " }, /* @__PURE__ */ React15.createElement("span", { className: "hawa-text-lg hawa-font-bold" }, props.title), /* @__PURE__ */ React15.createElement("span", { className: "hawa-text-sm" }, props.subtitle)),
421
+ /* @__PURE__ */ React15.createElement(
422
422
  Button,
423
423
  {
424
424
  onClick: () => onActionClick(),
@@ -430,15 +430,15 @@ var Announcement = ({
430
430
  };
431
431
 
432
432
  // blocks/misc/NotFound.tsx
433
- import React17 from "react";
433
+ import React16 from "react";
434
434
  var NotFound = ({ texts }) => {
435
- return /* @__PURE__ */ React17.createElement(Card, null, /* @__PURE__ */ React17.createElement(CardContent, { headless: true }, /* @__PURE__ */ React17.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center dark:hawa-text-white" }, /* @__PURE__ */ React17.createElement("div", { className: "hawa-text-center hawa-text-6xl hawa-font-bold " }, "404"), /* @__PURE__ */ React17.createElement("div", { className: "hawa-m-2 hawa-text-center hawa-text-xl hawa-font-bold " }, (texts == null ? void 0 : texts.pageNotFound) || "Page Not Found"), /* @__PURE__ */ React17.createElement("div", { className: "hawa-mb-4 hawa-text-center" }, (texts == null ? void 0 : texts.ifLost) || /* @__PURE__ */ React17.createElement(React17.Fragment, null, "If you're lost please contact us ", /* @__PURE__ */ React17.createElement("span", { className: "clickable-link" }, "help@sikka.io"))), /* @__PURE__ */ React17.createElement(Button, { className: "hawa-w-full" }, (texts == null ? void 0 : texts.home) || "Home"))));
435
+ return /* @__PURE__ */ React16.createElement(Card, null, /* @__PURE__ */ React16.createElement(CardContent, { headless: true }, /* @__PURE__ */ React16.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center dark:hawa-text-white" }, /* @__PURE__ */ React16.createElement("div", { className: "hawa-text-center hawa-text-6xl hawa-font-bold " }, "404"), /* @__PURE__ */ React16.createElement("div", { className: "hawa-m-2 hawa-text-center hawa-text-xl hawa-font-bold " }, (texts == null ? void 0 : texts.pageNotFound) || "Page Not Found"), /* @__PURE__ */ React16.createElement("div", { className: "hawa-mb-4 hawa-text-center" }, (texts == null ? void 0 : texts.ifLost) || /* @__PURE__ */ React16.createElement(React16.Fragment, null, "If you're lost please contact us ", /* @__PURE__ */ React16.createElement("span", { className: "clickable-link" }, "help@sikka.io"))), /* @__PURE__ */ React16.createElement(Button, { className: "hawa-w-full" }, (texts == null ? void 0 : texts.home) || "Home"))));
436
436
  };
437
437
 
438
438
  // blocks/misc/NoPermission.tsx
439
- import React18 from "react";
439
+ import React17 from "react";
440
440
  var NoPermission = ({ texts }) => {
441
- return /* @__PURE__ */ React18.createElement(Card, null, /* @__PURE__ */ React18.createElement(CardContent, { headless: true }, /* @__PURE__ */ React18.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-text-center" }, /* @__PURE__ */ React18.createElement("div", { className: "hawa-flex hawa-h-10 hawa-w-10 hawa-flex-col hawa-items-center hawa-justify-center hawa-rounded-3xl hawa-bg-primary hawa-text-6xl hawa-font-bold hawa-text-primary-foreground" }, /* @__PURE__ */ React18.createElement(
441
+ return /* @__PURE__ */ React17.createElement(Card, null, /* @__PURE__ */ React17.createElement(CardContent, { headless: true }, /* @__PURE__ */ React17.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-text-center" }, /* @__PURE__ */ React17.createElement("div", { className: "hawa-flex hawa-h-10 hawa-w-10 hawa-flex-col hawa-items-center hawa-justify-center hawa-rounded-3xl hawa-bg-primary hawa-text-6xl hawa-font-bold hawa-text-primary-foreground" }, /* @__PURE__ */ React17.createElement(
442
442
  "svg",
443
443
  {
444
444
  stroke: "currentColor",
@@ -448,12 +448,12 @@ var NoPermission = ({ texts }) => {
448
448
  height: "0.35em",
449
449
  width: "0.35em"
450
450
  },
451
- /* @__PURE__ */ React18.createElement("path", { d: "M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z" })
452
- )), /* @__PURE__ */ React18.createElement("div", { className: "hawa-m-2 hawa-text-xl hawa-font-bold" }, (texts == null ? void 0 : texts.title) || "You don't have permission"), /* @__PURE__ */ React18.createElement("div", null, (texts == null ? void 0 : texts.subtitle) || "If you think this is a problem please contact your administrator or our customer support"))));
451
+ /* @__PURE__ */ React17.createElement("path", { d: "M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z" })
452
+ )), /* @__PURE__ */ React17.createElement("div", { className: "hawa-m-2 hawa-text-xl hawa-font-bold" }, (texts == null ? void 0 : texts.title) || "You don't have permission"), /* @__PURE__ */ React17.createElement("div", null, (texts == null ? void 0 : texts.subtitle) || "If you think this is a problem please contact your administrator or our customer support"))));
453
453
  };
454
454
 
455
455
  // blocks/misc/ContactForm.tsx
456
- import React19 from "react";
456
+ import React18 from "react";
457
457
  import { useForm as useForm2, Controller as Controller2 } from "react-hook-form";
458
458
  import { zodResolver } from "@hookform/resolvers/zod";
459
459
  import * as z from "zod";
@@ -526,7 +526,7 @@ var ContactForm = ({
526
526
  console.log("Form is submitted but onSubmit prop is missing");
527
527
  }
528
528
  };
529
- return /* @__PURE__ */ React19.createElement(
529
+ return /* @__PURE__ */ React18.createElement(
530
530
  Card,
531
531
  {
532
532
  className: cn(
@@ -535,7 +535,7 @@ var ContactForm = ({
535
535
  ),
536
536
  style: cardless ? { boxShadow: "none" } : void 0
537
537
  },
538
- /* @__PURE__ */ React19.createElement(CardContent, { headless: true, className: cardless ? "!hawa-p-0" : "" }, props.showSuccess ? /* @__PURE__ */ React19.createElement(CardHeader, null, /* @__PURE__ */ React19.createElement(CardTitle, null, ((_d = texts == null ? void 0 : texts.success) == null ? void 0 : _d.title) || "Message Sent! \u{1F389}"), /* @__PURE__ */ React19.createElement(CardDescription, null, ((_e = texts == null ? void 0 : texts.success) == null ? void 0 : _e.description) || "Thank you for your submission, we will get back to you as soon as possible.")) : /* @__PURE__ */ React19.createElement(
538
+ /* @__PURE__ */ React18.createElement(CardContent, { headless: true, className: cardless ? "!hawa-p-0" : "" }, props.showSuccess ? /* @__PURE__ */ React18.createElement(CardHeader, null, /* @__PURE__ */ React18.createElement(CardTitle, null, ((_d = texts == null ? void 0 : texts.success) == null ? void 0 : _d.title) || "Message Sent! \u{1F389}"), /* @__PURE__ */ React18.createElement(CardDescription, null, ((_e = texts == null ? void 0 : texts.success) == null ? void 0 : _e.description) || "Thank you for your submission, we will get back to you as soon as possible.")) : /* @__PURE__ */ React18.createElement(
539
539
  "form",
540
540
  {
541
541
  noValidate: true,
@@ -544,7 +544,7 @@ var ContactForm = ({
544
544
  id: formId,
545
545
  autoComplete: formAutoComplete
546
546
  },
547
- /* @__PURE__ */ React19.createElement(
547
+ /* @__PURE__ */ React18.createElement(
548
548
  "div",
549
549
  {
550
550
  className: cn(
@@ -555,14 +555,14 @@ var ContactForm = ({
555
555
  }
556
556
  )
557
557
  },
558
- /* @__PURE__ */ React19.createElement(
558
+ /* @__PURE__ */ React18.createElement(
559
559
  Controller2,
560
560
  {
561
561
  control,
562
562
  name: "name",
563
563
  render: ({ field }) => {
564
564
  var _a2;
565
- return /* @__PURE__ */ React19.createElement(
565
+ return /* @__PURE__ */ React18.createElement(
566
566
  Input,
567
567
  {
568
568
  label: (texts == null ? void 0 : texts.name.label) || "Name",
@@ -575,14 +575,14 @@ var ContactForm = ({
575
575
  }
576
576
  }
577
577
  ),
578
- /* @__PURE__ */ React19.createElement(
578
+ /* @__PURE__ */ React18.createElement(
579
579
  Controller2,
580
580
  {
581
581
  control,
582
582
  name: "email",
583
583
  render: ({ field }) => {
584
584
  var _a2;
585
- return /* @__PURE__ */ React19.createElement(
585
+ return /* @__PURE__ */ React18.createElement(
586
586
  Input,
587
587
  {
588
588
  label: (texts == null ? void 0 : texts.email.label) || "Email",
@@ -598,7 +598,7 @@ var ContactForm = ({
598
598
  ),
599
599
  customFields && customFields.map((customField) => {
600
600
  console.log("custom", customField);
601
- return /* @__PURE__ */ React19.createElement(
601
+ return /* @__PURE__ */ React18.createElement(
602
602
  Controller2,
603
603
  {
604
604
  control,
@@ -608,7 +608,7 @@ var ContactForm = ({
608
608
  switch (type) {
609
609
  case "text":
610
610
  case "number":
611
- return /* @__PURE__ */ React19.createElement(
611
+ return /* @__PURE__ */ React18.createElement(
612
612
  Input,
613
613
  {
614
614
  id: customField.name,
@@ -619,7 +619,7 @@ var ContactForm = ({
619
619
  }
620
620
  );
621
621
  case "select":
622
- return /* @__PURE__ */ React19.createElement(
622
+ return /* @__PURE__ */ React18.createElement(
623
623
  Select,
624
624
  {
625
625
  label,
@@ -629,20 +629,20 @@ var ContactForm = ({
629
629
  }
630
630
  );
631
631
  default:
632
- return /* @__PURE__ */ React19.createElement("div", null, "Unknown type");
632
+ return /* @__PURE__ */ React18.createElement("div", null, "Unknown type");
633
633
  }
634
634
  }
635
635
  }
636
636
  );
637
637
  }),
638
- /* @__PURE__ */ React19.createElement(
638
+ /* @__PURE__ */ React18.createElement(
639
639
  Controller2,
640
640
  {
641
641
  control,
642
642
  name: "message",
643
643
  render: ({ field }) => {
644
644
  var _a2;
645
- return /* @__PURE__ */ React19.createElement(
645
+ return /* @__PURE__ */ React18.createElement(
646
646
  Textarea,
647
647
  {
648
648
  label: (texts == null ? void 0 : texts.message.label) || "Message",
@@ -659,7 +659,7 @@ var ContactForm = ({
659
659
  }
660
660
  }
661
661
  ),
662
- /* @__PURE__ */ React19.createElement(Button, { type: "submit", className: "hawa-w-full" }, (texts == null ? void 0 : texts.submit) || "Submit")
662
+ /* @__PURE__ */ React18.createElement(Button, { type: "submit", className: "hawa-w-full" }, (texts == null ? void 0 : texts.submit) || "Submit")
663
663
  ))
664
664
  );
665
665
  };
@@ -631,7 +631,8 @@ var Chip = import_react7.default.forwardRef(
631
631
  icon,
632
632
  color,
633
633
  radius = "inherit",
634
- dotType,
634
+ dot,
635
+ dotStatus = "none",
635
636
  ...rest
636
637
  }, ref) => {
637
638
  let defaultStyles = "hawa-flex hawa-flex-row hawa-w-fit hawa-gap-1 hawa-items-center hawa-px-2.5 hawa-py-1 hawa-font-bold ";
@@ -650,7 +651,8 @@ var Chip = import_react7.default.forwardRef(
650
651
  normal: "hawa-flex hawa-h-2 hawa-w-2 hawa-rounded-full",
651
652
  large: "hawa-flex hawa-h-3 hawa-w-3 hawa-rounded-full"
652
653
  };
653
- let dotTypeStyles = {
654
+ let dotStatusStyles = {
655
+ none: "hawa-bg-gray-500 dark:hawa-bg-gray-800",
654
656
  available: "hawa-bg-green-500",
655
657
  unavailable: "hawa-bg-red-500"
656
658
  };
@@ -678,10 +680,10 @@ var Chip = import_react7.default.forwardRef(
678
680
  color ? colorStyles[color] : "hawa-border hawa-bg-none"
679
681
  )
680
682
  },
681
- dotType && /* @__PURE__ */ import_react7.default.createElement(
683
+ dot && /* @__PURE__ */ import_react7.default.createElement(
682
684
  "span",
683
685
  {
684
- className: cn(dotStyles[size], dotTypeStyles[dotType])
686
+ className: cn(dotStyles[size], dotStatusStyles[dotStatus])
685
687
  }
686
688
  ),
687
689
  icon && icon,
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  Chip,
4
4
  ScrollArea
5
- } from "../../chunk-LVXG3SMD.mjs";
5
+ } from "../../chunk-CJ57JBYA.mjs";
6
6
  import "../../chunk-47APBDKK.mjs";
7
7
  import {
8
8
  Radio
@@ -14,7 +14,7 @@ type ChipTypes = React__default.HTMLAttributes<HTMLSpanElement> & {
14
14
  /** Enable/Disable the dot before the label of the chip */
15
15
  dot?: boolean;
16
16
  /** Red/Green dot next to the label of the chip indicating online/offline or available/unavailable */
17
- dotType?: "available" | "unavailable";
17
+ dotStatus?: "available" | "unavailable" | "none";
18
18
  radius?: RadiusType;
19
19
  };
20
20
  declare const Chip: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLSpanElement> & {
@@ -29,7 +29,7 @@ declare const Chip: React__default.ForwardRefExoticComponent<React__default.HTML
29
29
  /** Enable/Disable the dot before the label of the chip */
30
30
  dot?: boolean | undefined;
31
31
  /** Red/Green dot next to the label of the chip indicating online/offline or available/unavailable */
32
- dotType?: "available" | "unavailable" | undefined;
32
+ dotStatus?: "none" | "available" | "unavailable" | undefined;
33
33
  radius?: RadiusType | undefined;
34
34
  } & React__default.RefAttributes<HTMLSpanElement>>;
35
35
 
@@ -14,7 +14,7 @@ type ChipTypes = React__default.HTMLAttributes<HTMLSpanElement> & {
14
14
  /** Enable/Disable the dot before the label of the chip */
15
15
  dot?: boolean;
16
16
  /** Red/Green dot next to the label of the chip indicating online/offline or available/unavailable */
17
- dotType?: "available" | "unavailable";
17
+ dotStatus?: "available" | "unavailable" | "none";
18
18
  radius?: RadiusType;
19
19
  };
20
20
  declare const Chip: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLSpanElement> & {
@@ -29,7 +29,7 @@ declare const Chip: React__default.ForwardRefExoticComponent<React__default.HTML
29
29
  /** Enable/Disable the dot before the label of the chip */
30
30
  dot?: boolean | undefined;
31
31
  /** Red/Green dot next to the label of the chip indicating online/offline or available/unavailable */
32
- dotType?: "available" | "unavailable" | undefined;
32
+ dotStatus?: "none" | "available" | "unavailable" | undefined;
33
33
  radius?: RadiusType | undefined;
34
34
  } & React__default.RefAttributes<HTMLSpanElement>>;
35
35
 
@@ -53,7 +53,8 @@ var Chip = import_react.default.forwardRef(
53
53
  icon,
54
54
  color,
55
55
  radius = "inherit",
56
- dotType,
56
+ dot,
57
+ dotStatus = "none",
57
58
  ...rest
58
59
  }, ref) => {
59
60
  let defaultStyles = "hawa-flex hawa-flex-row hawa-w-fit hawa-gap-1 hawa-items-center hawa-px-2.5 hawa-py-1 hawa-font-bold ";
@@ -72,7 +73,8 @@ var Chip = import_react.default.forwardRef(
72
73
  normal: "hawa-flex hawa-h-2 hawa-w-2 hawa-rounded-full",
73
74
  large: "hawa-flex hawa-h-3 hawa-w-3 hawa-rounded-full"
74
75
  };
75
- let dotTypeStyles = {
76
+ let dotStatusStyles = {
77
+ none: "hawa-bg-gray-500 dark:hawa-bg-gray-800",
76
78
  available: "hawa-bg-green-500",
77
79
  unavailable: "hawa-bg-red-500"
78
80
  };
@@ -100,10 +102,10 @@ var Chip = import_react.default.forwardRef(
100
102
  color ? colorStyles[color] : "hawa-border hawa-bg-none"
101
103
  )
102
104
  },
103
- dotType && /* @__PURE__ */ import_react.default.createElement(
105
+ dot && /* @__PURE__ */ import_react.default.createElement(
104
106
  "span",
105
107
  {
106
- className: cn(dotStyles[size], dotTypeStyles[dotType])
108
+ className: cn(dotStyles[size], dotStatusStyles[dotStatus])
107
109
  }
108
110
  ),
109
111
  icon && icon,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../elements/chip/index.ts","../../elements/chip/Chip.tsx","../../util/index.ts"],"sourcesContent":["export * from \"./Chip\";\n","import React from \"react\";\n\nimport { RadiusType } from \"@_types/commonTypes\";\n\nimport { cn } from \"@util/index\";\n\nexport type ChipColors =\n | \"green\"\n | \"blue\"\n | \"red\"\n | \"yellow\"\n | \"orange\"\n | \"purple\"\n | \"cyan\"\n | \"hyper\"\n | \"oceanic\";\n\nexport type ChipTypes = React.HTMLAttributes<HTMLSpanElement> & {\n /** The text inside the chip */\n label: string;\n /** The small icon before the chip label */\n icon?: JSX.Element;\n /** The color of the chip, must be a tailwind color */\n color?: ChipColors;\n /** The size of the chip */\n size?: \"small\" | \"normal\" | \"large\";\n /** Enable/Disable the dot before the label of the chip */\n dot?: boolean;\n /** Red/Green dot next to the label of the chip indicating online/offline or available/unavailable */\n dotType?: \"available\" | \"unavailable\";\n radius?: RadiusType;\n};\n\nexport const Chip = React.forwardRef<HTMLSpanElement, ChipTypes>(\n (\n {\n label,\n size = \"normal\",\n icon,\n color,\n radius = \"inherit\",\n dotType,\n ...rest\n },\n ref\n ) => {\n let defaultStyles =\n \"hawa-flex hawa-flex-row hawa-w-fit hawa-gap-1 hawa-items-center hawa-px-2.5 hawa-py-1 hawa-font-bold \";\n let radiusStyles = {\n inherit: \" hawa-rounded\",\n full: \"hawa-rounded-full\",\n none: \"hawa-rounded-none\"\n };\n let sizeStyles = {\n small:\n \"hawa-h-[15px] hawa-leading-4 hawa-px-0 hawa-py-0 hawa-text-[9px] hawa-gap-0.5 \",\n normal: \"hawa-h-fit hawa-text-xs\",\n large: \"hawa-text-base\"\n };\n let dotStyles = {\n small: \"hawa-flex hawa-h-1 hawa-w-1 hawa-rounded-full\",\n normal: \"hawa-flex hawa-h-2 hawa-w-2 hawa-rounded-full\",\n large: \"hawa-flex hawa-h-3 hawa-w-3 hawa-rounded-full\"\n };\n let dotTypeStyles = {\n available: \"hawa-bg-green-500\",\n unavailable: \"hawa-bg-red-500\"\n };\n let colorStyles: any = {\n green:\n \"hawa-bg-green-200 hawa-text-green-700 dark:hawa-bg-green-700 dark:hawa-text-green-200\",\n blue: \"hawa-bg-blue-200 hawa-text-blue-700 dark:hawa-bg-blue-700 dark:hawa-text-blue-100\",\n red: \"hawa-bg-red-200 hawa-text-red-700 dark:hawa-bg-red-700 dark:hawa-text-red-100\",\n yellow:\n \"hawa-bg-yellow-200 hawa-text-yellow-700 dark:hawa-bg-yellow-600 dark:hawa-text-black\",\n orange:\n \"hawa-bg-orange-200 hawa-text-orange-700 dark:hawa-bg-orange-700 dark:hawa-text-orange-100\",\n purple:\n \"hawa-bg-purple-200 hawa-text-purple-700 dark:hawa-bg-purple-700 dark:hawa-text-purple-100\",\n cyan: \"hawa-bg-cyan-200 hawa-text-cyan-700 dark:hawa-bg-cyan-700 dark:hawa-text-cyan-100\",\n hyper:\n \"hawa-text-white dark:hawa-text-black hawa-bg-gradient-to-tl hawa-from-pink-500 hawa-via-red-500 hawa-to-yellow-500 \",\n oceanic:\n \"hawa-text-white dark:hawa-text-black hawa-bg-gradient-to-bl hawa-from-green-300 hawa-via-blue-500 hawa-to-purple-600\"\n };\n if (label) {\n return (\n <span\n {...rest}\n ref={ref}\n className={cn(\n defaultStyles,\n sizeStyles[size],\n radiusStyles[radius],\n color ? colorStyles[color] : \"hawa-border hawa-bg-none\"\n )}\n >\n {dotType && (\n <span\n className={cn(dotStyles[size], dotTypeStyles[dotType])}\n ></span>\n )}\n {icon && icon}\n {label}\n </span>\n );\n } else {\n return (\n <span\n {...rest}\n ref={ref}\n className={cn(\n \"hawa-h-2 hawa-w-2 hawa-rounded-full\",\n color ? colorStyles[color] : \"hawa-border hawa-bg-none\"\n )}\n ></span>\n );\n }\n }\n);\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(\n sanitizedHex\n );\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16)\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\")\n }\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAkB;;;ACAlB,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;AD4BO,IAAM,OAAO,aAAAA,QAAM;AAAA,EACxB,CACE;AAAA,IACE;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL,GACA,QACG;AACH,QAAI,gBACF;AACF,QAAI,eAAe;AAAA,MACjB,SAAS;AAAA,MACT,MAAM;AAAA,MACN,MAAM;AAAA,IACR;AACA,QAAI,aAAa;AAAA,MACf,OACE;AAAA,MACF,QAAQ;AAAA,MACR,OAAO;AAAA,IACT;AACA,QAAI,YAAY;AAAA,MACd,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,OAAO;AAAA,IACT;AACA,QAAI,gBAAgB;AAAA,MAClB,WAAW;AAAA,MACX,aAAa;AAAA,IACf;AACA,QAAI,cAAmB;AAAA,MACrB,OACE;AAAA,MACF,MAAM;AAAA,MACN,KAAK;AAAA,MACL,QACE;AAAA,MACF,QACE;AAAA,MACF,QACE;AAAA,MACF,MAAM;AAAA,MACN,OACE;AAAA,MACF,SACE;AAAA,IACJ;AACA,QAAI,OAAO;AACT,aACE,6BAAAA,QAAA;AAAA,QAAC;AAAA;AAAA,UACE,GAAG;AAAA,UACJ;AAAA,UACA,WAAW;AAAA,YACT;AAAA,YACA,WAAW,IAAI;AAAA,YACf,aAAa,MAAM;AAAA,YACnB,QAAQ,YAAY,KAAK,IAAI;AAAA,UAC/B;AAAA;AAAA,QAEC,WACC,6BAAAA,QAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,GAAG,UAAU,IAAI,GAAG,cAAc,OAAO,CAAC;AAAA;AAAA,QACtD;AAAA,QAEF,QAAQ;AAAA,QACR;AAAA,MACH;AAAA,IAEJ,OAAO;AACL,aACE,6BAAAA,QAAA;AAAA,QAAC;AAAA;AAAA,UACE,GAAG;AAAA,UACJ;AAAA,UACA,WAAW;AAAA,YACT;AAAA,YACA,QAAQ,YAAY,KAAK,IAAI;AAAA,UAC/B;AAAA;AAAA,MACD;AAAA,IAEL;AAAA,EACF;AACF;","names":["React"]}
1
+ {"version":3,"sources":["../../elements/chip/index.ts","../../elements/chip/Chip.tsx","../../util/index.ts"],"sourcesContent":["export * from \"./Chip\";\n","import React from \"react\";\n\nimport { cn } from \"@util/index\";\n\nimport { RadiusType } from \"@_types/commonTypes\";\n\nexport type ChipColors =\n | \"green\"\n | \"blue\"\n | \"red\"\n | \"yellow\"\n | \"orange\"\n | \"purple\"\n | \"cyan\"\n | \"hyper\"\n | \"oceanic\";\n\nexport type ChipTypes = React.HTMLAttributes<HTMLSpanElement> & {\n /** The text inside the chip */\n label: string;\n /** The small icon before the chip label */\n icon?: JSX.Element;\n /** The color of the chip, must be a tailwind color */\n color?: ChipColors;\n /** The size of the chip */\n size?: \"small\" | \"normal\" | \"large\";\n /** Enable/Disable the dot before the label of the chip */\n dot?: boolean;\n /** Red/Green dot next to the label of the chip indicating online/offline or available/unavailable */\n dotStatus?: \"available\" | \"unavailable\" | \"none\";\n radius?: RadiusType;\n};\n\nexport const Chip = React.forwardRef<HTMLSpanElement, ChipTypes>(\n (\n {\n label,\n size = \"normal\",\n icon,\n color,\n radius = \"inherit\",\n dot,\n dotStatus = \"none\",\n ...rest\n },\n ref,\n ) => {\n let defaultStyles =\n \"hawa-flex hawa-flex-row hawa-w-fit hawa-gap-1 hawa-items-center hawa-px-2.5 hawa-py-1 hawa-font-bold \";\n let radiusStyles = {\n inherit: \" hawa-rounded\",\n full: \"hawa-rounded-full\",\n none: \"hawa-rounded-none\",\n };\n let sizeStyles = {\n small:\n \"hawa-h-[15px] hawa-leading-4 hawa-px-0 hawa-py-0 hawa-text-[9px] hawa-gap-0.5 \",\n normal: \"hawa-h-fit hawa-text-xs\",\n large: \"hawa-text-base\",\n };\n let dotStyles = {\n small: \"hawa-flex hawa-h-1 hawa-w-1 hawa-rounded-full\",\n normal: \"hawa-flex hawa-h-2 hawa-w-2 hawa-rounded-full\",\n large: \"hawa-flex hawa-h-3 hawa-w-3 hawa-rounded-full\",\n };\n let dotStatusStyles = {\n none: \"hawa-bg-gray-500 dark:hawa-bg-gray-800\",\n available: \"hawa-bg-green-500\",\n unavailable: \"hawa-bg-red-500\",\n };\n let colorStyles: any = {\n green:\n \"hawa-bg-green-200 hawa-text-green-700 dark:hawa-bg-green-700 dark:hawa-text-green-200\",\n blue: \"hawa-bg-blue-200 hawa-text-blue-700 dark:hawa-bg-blue-700 dark:hawa-text-blue-100\",\n red: \"hawa-bg-red-200 hawa-text-red-700 dark:hawa-bg-red-700 dark:hawa-text-red-100\",\n yellow:\n \"hawa-bg-yellow-200 hawa-text-yellow-700 dark:hawa-bg-yellow-600 dark:hawa-text-black\",\n orange:\n \"hawa-bg-orange-200 hawa-text-orange-700 dark:hawa-bg-orange-700 dark:hawa-text-orange-100\",\n purple:\n \"hawa-bg-purple-200 hawa-text-purple-700 dark:hawa-bg-purple-700 dark:hawa-text-purple-100\",\n cyan: \"hawa-bg-cyan-200 hawa-text-cyan-700 dark:hawa-bg-cyan-700 dark:hawa-text-cyan-100\",\n hyper:\n \"hawa-text-white dark:hawa-text-black hawa-bg-gradient-to-tl hawa-from-pink-500 hawa-via-red-500 hawa-to-yellow-500 \",\n oceanic:\n \"hawa-text-white dark:hawa-text-black hawa-bg-gradient-to-bl hawa-from-green-300 hawa-via-blue-500 hawa-to-purple-600\",\n };\n if (label) {\n return (\n <span\n {...rest}\n ref={ref}\n className={cn(\n defaultStyles,\n sizeStyles[size],\n radiusStyles[radius],\n color ? colorStyles[color] : \"hawa-border hawa-bg-none\",\n )}\n >\n {dot && (\n <span\n className={cn(dotStyles[size], dotStatusStyles[dotStatus])}\n ></span>\n )}\n {icon && icon}\n {label}\n </span>\n );\n } else {\n return (\n <span\n {...rest}\n ref={ref}\n className={cn(\n \"hawa-h-2 hawa-w-2 hawa-rounded-full\",\n color ? colorStyles[color] : \"hawa-border hawa-bg-none\",\n )}\n ></span>\n );\n }\n },\n);\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(\n sanitizedHex\n );\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16)\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\")\n }\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAkB;;;ACAlB,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;AD4BO,IAAM,OAAO,aAAAA,QAAM;AAAA,EACxB,CACE;AAAA,IACE;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA,YAAY;AAAA,IACZ,GAAG;AAAA,EACL,GACA,QACG;AACH,QAAI,gBACF;AACF,QAAI,eAAe;AAAA,MACjB,SAAS;AAAA,MACT,MAAM;AAAA,MACN,MAAM;AAAA,IACR;AACA,QAAI,aAAa;AAAA,MACf,OACE;AAAA,MACF,QAAQ;AAAA,MACR,OAAO;AAAA,IACT;AACA,QAAI,YAAY;AAAA,MACd,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,OAAO;AAAA,IACT;AACA,QAAI,kBAAkB;AAAA,MACpB,MAAM;AAAA,MACN,WAAW;AAAA,MACX,aAAa;AAAA,IACf;AACA,QAAI,cAAmB;AAAA,MACrB,OACE;AAAA,MACF,MAAM;AAAA,MACN,KAAK;AAAA,MACL,QACE;AAAA,MACF,QACE;AAAA,MACF,QACE;AAAA,MACF,MAAM;AAAA,MACN,OACE;AAAA,MACF,SACE;AAAA,IACJ;AACA,QAAI,OAAO;AACT,aACE,6BAAAA,QAAA;AAAA,QAAC;AAAA;AAAA,UACE,GAAG;AAAA,UACJ;AAAA,UACA,WAAW;AAAA,YACT;AAAA,YACA,WAAW,IAAI;AAAA,YACf,aAAa,MAAM;AAAA,YACnB,QAAQ,YAAY,KAAK,IAAI;AAAA,UAC/B;AAAA;AAAA,QAEC,OACC,6BAAAA,QAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,GAAG,UAAU,IAAI,GAAG,gBAAgB,SAAS,CAAC;AAAA;AAAA,QAC1D;AAAA,QAEF,QAAQ;AAAA,QACR;AAAA,MACH;AAAA,IAEJ,OAAO;AACL,aACE,6BAAAA,QAAA;AAAA,QAAC;AAAA;AAAA,UACE,GAAG;AAAA,UACJ;AAAA,UACA,WAAW;AAAA,YACT;AAAA,YACA,QAAQ,YAAY,KAAK,IAAI;AAAA,UAC/B;AAAA;AAAA,MACD;AAAA,IAEL;AAAA,EACF;AACF;","names":["React"]}
@@ -18,7 +18,8 @@ var Chip = React.forwardRef(
18
18
  icon,
19
19
  color,
20
20
  radius = "inherit",
21
- dotType,
21
+ dot,
22
+ dotStatus = "none",
22
23
  ...rest
23
24
  }, ref) => {
24
25
  let defaultStyles = "hawa-flex hawa-flex-row hawa-w-fit hawa-gap-1 hawa-items-center hawa-px-2.5 hawa-py-1 hawa-font-bold ";
@@ -37,7 +38,8 @@ var Chip = React.forwardRef(
37
38
  normal: "hawa-flex hawa-h-2 hawa-w-2 hawa-rounded-full",
38
39
  large: "hawa-flex hawa-h-3 hawa-w-3 hawa-rounded-full"
39
40
  };
40
- let dotTypeStyles = {
41
+ let dotStatusStyles = {
42
+ none: "hawa-bg-gray-500 dark:hawa-bg-gray-800",
41
43
  available: "hawa-bg-green-500",
42
44
  unavailable: "hawa-bg-red-500"
43
45
  };
@@ -65,10 +67,10 @@ var Chip = React.forwardRef(
65
67
  color ? colorStyles[color] : "hawa-border hawa-bg-none"
66
68
  )
67
69
  },
68
- dotType && /* @__PURE__ */ React.createElement(
70
+ dot && /* @__PURE__ */ React.createElement(
69
71
  "span",
70
72
  {
71
- className: cn(dotStyles[size], dotTypeStyles[dotType])
73
+ className: cn(dotStyles[size], dotStatusStyles[dotStatus])
72
74
  }
73
75
  ),
74
76
  icon && icon,