@sikka/hawa 0.30.24-next → 0.30.26-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 (83) hide show
  1. package/dist/blocks/index.js +100 -72
  2. package/dist/blocks/index.mjs +1 -1
  3. package/dist/blocks/misc/index.js +88 -60
  4. package/dist/blocks/misc/index.mjs +105 -75
  5. package/dist/blocks/pricing/index.mjs +1 -1
  6. package/dist/breadcrumb/index.d.mts +7 -5
  7. package/dist/breadcrumb/index.d.ts +7 -5
  8. package/dist/breadcrumb/index.js +36 -12
  9. package/dist/breadcrumb/index.js.map +1 -1
  10. package/dist/breadcrumb/index.mjs +36 -12
  11. package/dist/breadcrumb/index.mjs.map +1 -1
  12. package/dist/{chunk-7LAUVLVZ.mjs → chunk-QDRFTC7W.mjs} +96 -62
  13. package/dist/combobox/index.js.map +1 -1
  14. package/dist/combobox/index.mjs.map +1 -1
  15. package/dist/commonTypes-LrR8QrYP.d.mts +5 -0
  16. package/dist/commonTypes-LrR8QrYP.d.ts +5 -0
  17. package/dist/commonTypes-MeUyaBib.d.mts +5 -0
  18. package/dist/commonTypes-MeUyaBib.d.ts +5 -0
  19. package/dist/elements/index.d.mts +11 -5
  20. package/dist/elements/index.d.ts +11 -5
  21. package/dist/elements/index.js +149 -98
  22. package/dist/elements/index.mjs +32 -13
  23. package/dist/floatBox/index.d.mts +12 -0
  24. package/dist/floatBox/index.d.ts +12 -0
  25. package/dist/floatBox/index.js +85 -0
  26. package/dist/floatBox/index.js.map +1 -0
  27. package/dist/floatBox/index.mjs +49 -0
  28. package/dist/floatBox/index.mjs.map +1 -0
  29. package/dist/index.css +101 -56
  30. package/dist/index.d.mts +11 -5
  31. package/dist/index.d.ts +11 -5
  32. package/dist/index.js +189 -138
  33. package/dist/index.mjs +706 -657
  34. package/dist/input/index.d.mts +2 -1
  35. package/dist/input/index.d.ts +2 -1
  36. package/dist/label/index.d.mts +1 -2
  37. package/dist/label/index.d.ts +1 -2
  38. package/dist/passwordInput/index.js.map +1 -1
  39. package/dist/passwordInput/index.mjs.map +1 -1
  40. package/dist/phoneInput/index.d.mts +2 -1
  41. package/dist/phoneInput/index.d.ts +2 -1
  42. package/dist/popover/index.d.mts +3 -1
  43. package/dist/popover/index.d.ts +3 -1
  44. package/dist/popover/index.js +6 -0
  45. package/dist/popover/index.js.map +1 -1
  46. package/dist/popover/index.mjs +4 -0
  47. package/dist/popover/index.mjs.map +1 -1
  48. package/dist/progress/index.d.mts +8 -1
  49. package/dist/progress/index.d.ts +8 -1
  50. package/dist/radio/index.d.mts +9 -1
  51. package/dist/radio/index.d.ts +9 -1
  52. package/dist/scrollArea/index.d.mts +1 -1
  53. package/dist/scrollArea/index.d.ts +1 -1
  54. package/dist/separator/index.d.mts +1 -1
  55. package/dist/separator/index.d.ts +1 -1
  56. package/dist/signature/index.d.mts +1 -2
  57. package/dist/signature/index.d.ts +1 -2
  58. package/dist/simpleTable/index.d.mts +1 -1
  59. package/dist/simpleTable/index.d.ts +1 -1
  60. package/dist/switch/index.d.mts +2 -1
  61. package/dist/switch/index.d.ts +2 -1
  62. package/dist/tabs/index.d.mts +3 -1
  63. package/dist/tabs/index.d.ts +3 -1
  64. package/dist/tabs/index.js +60 -32
  65. package/dist/tabs/index.js.map +1 -1
  66. package/dist/tabs/index.mjs +60 -32
  67. package/dist/tabs/index.mjs.map +1 -1
  68. package/dist/textarea/index.d.mts +1 -1
  69. package/dist/textarea/index.d.ts +1 -1
  70. package/dist/toast/index.d.mts +1 -1
  71. package/dist/toast/index.d.ts +1 -1
  72. package/dist/toaster/index.d.mts +22 -4
  73. package/dist/toaster/index.d.ts +22 -4
  74. package/dist/tooltip/index.d.mts +3 -4
  75. package/dist/tooltip/index.d.ts +3 -4
  76. package/package.json +8 -8
  77. package/dist/Label-9FHRF7Ex.d.mts +0 -14
  78. package/dist/Label-9FHRF7Ex.d.ts +0 -14
  79. package/dist/commonTypes-3k5cNB1s.d.mts +0 -4
  80. package/dist/commonTypes-3k5cNB1s.d.ts +0 -4
  81. package/dist/commonTypes-PBumfOBg.d.mts +0 -3
  82. package/dist/commonTypes-PBumfOBg.d.ts +0 -3
  83. /package/dist/{chunk-CVOMHXJK.mjs → chunk-BXGDHNAY.mjs} +0 -0
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  Chip,
7
7
  ScrollArea
8
- } from "../../chunk-CVOMHXJK.mjs";
8
+ } from "../../chunk-BXGDHNAY.mjs";
9
9
  import {
10
10
  Textarea
11
11
  } from "../../chunk-AEFNDLFD.mjs";
@@ -24,12 +24,49 @@ import {
24
24
  } from "../../chunk-ZGNBKYX7.mjs";
25
25
 
26
26
  // blocks/misc/LegalTexts.tsx
27
- import React2 from "react";
27
+ import React3 from "react";
28
28
 
29
29
  // elements/tabs/Tabs.tsx
30
- import * as React from "react";
30
+ import * as React2 from "react";
31
31
  import * as TabsPrimitive from "@radix-ui/react-tabs";
32
32
  import { tv } from "tailwind-variants";
33
+
34
+ // elements/floatBox/FloatBox.tsx
35
+ import * as React from "react";
36
+ var FloatBox = ({
37
+ className,
38
+ open,
39
+ side = "bottom",
40
+ sideOffset = 40,
41
+ ...props
42
+ }) => {
43
+ let widthStyles = {
44
+ trigger: "var(--radix-popover-trigger-width)",
45
+ default: "auto"
46
+ };
47
+ let sideOffsetStyles = {
48
+ bottom: { top: sideOffset },
49
+ top: { bottom: sideOffset },
50
+ right: { left: sideOffset },
51
+ left: { right: sideOffset }
52
+ };
53
+ return /* @__PURE__ */ React.createElement(
54
+ "div",
55
+ {
56
+ className: cn(
57
+ "data-[floatbox-state=closed]:hawa-invisible data-[floatbox-state=open]:hawa-visible hawa-absolute dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[floatbox-state=open]:hawa-animate-in data-[floatbox-state=closed]:hawa-animate-out data-[floatbox-state=closed]:hawa-fade-out-0 data-[floatbox-state=open]:hawa-fade-in-0 data-[floatbox-state=closed]:hawa-zoom-out-95 data-[floatbox-state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
58
+ sideOffsetStyles[side],
59
+ className
60
+ ),
61
+ style: { ...sideOffsetStyles[side] },
62
+ "data-side": side,
63
+ "data-floatbox-state": open ? "open" : "closed"
64
+ },
65
+ props.children
66
+ );
67
+ };
68
+
69
+ // elements/tabs/Tabs.tsx
33
70
  var tabsListVariant = tv({
34
71
  base: "",
35
72
  variants: {
@@ -38,10 +75,7 @@ var tabsListVariant = tv({
38
75
  underlined: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10",
39
76
  underlined_tabs: "hawa-flex hawa-w-fit hawa-flex-wrap hawa-items-center hawa-justify-start hawa-gap-1 hawa-text-muted-foreground"
40
77
  },
41
- orientation: {
42
- horizontal: "",
43
- vertical: ""
44
- }
78
+ orientation: { horizontal: "", vertical: "" }
45
79
  },
46
80
  compoundVariants: [
47
81
  {
@@ -55,10 +89,7 @@ var tabsListVariant = tv({
55
89
  class: "hawa-border-b-2 hawa-border-b-primary"
56
90
  }
57
91
  ],
58
- defaultVariants: {
59
- variant: "default",
60
- orientation: "horizontal"
61
- }
92
+ defaultVariants: { variant: "default", orientation: "horizontal" }
62
93
  });
63
94
  var tabsTriggerVariant = tv({
64
95
  base: "",
@@ -68,10 +99,7 @@ var tabsTriggerVariant = tv({
68
99
  underlined: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-rounded-none hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50",
69
100
  underlined_tabs: "hawa-inline-flex hawa-w-full hawa-flex-1 hawa-select-none hawa-items-center hawa-justify-center hawa-gap-2 hawa-whitespace-nowrap hawa-rounded hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-all focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50 hawa-bg-primary/10 data-[state=active]:hawa-bg-primary data-[state=active]:hawa-text-primary-foreground dark:hawa-border-primary/10"
70
101
  },
71
- orientation: {
72
- horizontal: "",
73
- vertical: ""
74
- }
102
+ orientation: { horizontal: "", vertical: "" }
75
103
  },
76
104
  compoundVariants: [
77
105
  {
@@ -95,13 +123,10 @@ var tabsTriggerVariant = tv({
95
123
  class: "hawa-rounded-e-none"
96
124
  }
97
125
  ],
98
- defaultVariants: {
99
- variant: "default",
100
- orientation: "horizontal"
101
- }
126
+ defaultVariants: { variant: "default", orientation: "horizontal" }
102
127
  });
103
- var TabsContext = React.createContext({ orientation: "horizontal", variant: "default" });
104
- var Tabs = React.forwardRef(({ className, orientation, variant = "default", ...props }, ref) => /* @__PURE__ */ React.createElement(
128
+ var TabsContext = React2.createContext({ orientation: "horizontal", variant: "default" });
129
+ var Tabs = React2.forwardRef(({ className, orientation, variant = "default", ...props }, ref) => /* @__PURE__ */ React2.createElement(
105
130
  TabsPrimitive.Root,
106
131
  {
107
132
  ref,
@@ -112,12 +137,11 @@ var Tabs = React.forwardRef(({ className, orientation, variant = "default", ...p
112
137
  ),
113
138
  ...props
114
139
  },
115
- /* @__PURE__ */ React.createElement(TabsContext.Provider, { value: { orientation, variant } }, props.children)
140
+ /* @__PURE__ */ React2.createElement(TabsContext.Provider, { value: { orientation, variant } }, props.children)
116
141
  ));
117
- Tabs.displayName = TabsPrimitive.Root.displayName;
118
- var TabsList = React.forwardRef(({ className, ...props }, ref) => {
119
- const { orientation, variant } = React.useContext(TabsContext);
120
- return /* @__PURE__ */ React.createElement(
142
+ var TabsList = React2.forwardRef(({ className, ...props }, ref) => {
143
+ const { orientation, variant } = React2.useContext(TabsContext);
144
+ return /* @__PURE__ */ React2.createElement(
121
145
  TabsPrimitive.List,
122
146
  {
123
147
  ref,
@@ -130,22 +154,25 @@ var TabsList = React.forwardRef(({ className, ...props }, ref) => {
130
154
  }
131
155
  );
132
156
  });
133
- TabsList.displayName = TabsPrimitive.List.displayName;
134
- var TabsTrigger = React.forwardRef(({ className, chipProps, ...props }, ref) => {
135
- const { orientation, variant } = React.useContext(TabsContext);
136
- return /* @__PURE__ */ React.createElement(
157
+ var TabsTrigger = React2.forwardRef(({ className, chipProps, ...props }, ref) => {
158
+ const { orientation, variant } = React2.useContext(TabsContext);
159
+ return /* @__PURE__ */ React2.createElement(
137
160
  TabsPrimitive.Trigger,
138
161
  {
139
162
  ref,
140
- className: cn(tabsTriggerVariant({ variant, orientation }), className),
163
+ className: cn(
164
+ tabsTriggerVariant({ variant, orientation }),
165
+ "hawa-relative",
166
+ className
167
+ ),
141
168
  ...props
142
169
  },
143
170
  props.children,
144
- chipProps && /* @__PURE__ */ React.createElement(Chip, { ...chipProps })
171
+ chipProps && /* @__PURE__ */ React2.createElement(Chip, { ...chipProps }),
172
+ /* @__PURE__ */ React2.createElement(FloatBox, { open: props.showPopover }, props.popoverContent)
145
173
  );
146
174
  });
147
- TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
148
- var TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
175
+ var TabsContent = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
149
176
  TabsPrimitive.Content,
150
177
  {
151
178
  ref,
@@ -156,11 +183,14 @@ var TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
156
183
  ...props
157
184
  }
158
185
  ));
186
+ Tabs.displayName = TabsPrimitive.Root.displayName;
187
+ TabsList.displayName = TabsPrimitive.List.displayName;
188
+ TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
159
189
  TabsContent.displayName = TabsPrimitive.Content.displayName;
160
190
 
161
191
  // blocks/misc/LegalTexts.tsx
162
192
  var LegalTexts = ({ tabs, ...props }) => {
163
- return /* @__PURE__ */ React2.createElement(
193
+ return /* @__PURE__ */ React3.createElement(
164
194
  Tabs,
165
195
  {
166
196
  value: props.activeTab,
@@ -168,8 +198,8 @@ var LegalTexts = ({ tabs, ...props }) => {
168
198
  defaultValue: props.defaultTab || tabs[0].value,
169
199
  dir: props.direction
170
200
  },
171
- /* @__PURE__ */ React2.createElement(TabsList, { className: "hawa-w-full" }, tabs.map((tab, index) => /* @__PURE__ */ React2.createElement(TabsTrigger, { key: index, value: tab.value }, tab.title))),
172
- tabs.map((tab, index) => /* @__PURE__ */ React2.createElement(TabsContent, { key: index, value: tab.value }, /* @__PURE__ */ React2.createElement(
201
+ /* @__PURE__ */ React3.createElement(TabsList, { className: "hawa-w-full" }, tabs.map((tab, index) => /* @__PURE__ */ React3.createElement(TabsTrigger, { key: index, value: tab.value }, tab.title))),
202
+ tabs.map((tab, index) => /* @__PURE__ */ React3.createElement(TabsContent, { key: index, value: tab.value }, /* @__PURE__ */ React3.createElement(
173
203
  ScrollArea,
174
204
  {
175
205
  className: cn(
@@ -183,9 +213,9 @@ var LegalTexts = ({ tabs, ...props }) => {
183
213
  };
184
214
 
185
215
  // blocks/misc/EmptyState.tsx
186
- import React3 from "react";
216
+ import React4 from "react";
187
217
  var EmptyState = ({ texts, onActionClick }) => {
188
- return /* @__PURE__ */ React3.createElement(Card, null, /* @__PURE__ */ React3.createElement(CardContent, { headless: true }, /* @__PURE__ */ React3.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-text-center " }, /* @__PURE__ */ React3.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__ */ React3.createElement(
218
+ return /* @__PURE__ */ React4.createElement(Card, null, /* @__PURE__ */ React4.createElement(CardContent, { headless: true }, /* @__PURE__ */ React4.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-text-center " }, /* @__PURE__ */ React4.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__ */ React4.createElement(
189
219
  "svg",
190
220
  {
191
221
  stroke: "currentColor",
@@ -195,30 +225,30 @@ var EmptyState = ({ texts, onActionClick }) => {
195
225
  height: "0.35em",
196
226
  width: "0.35em"
197
227
  },
198
- /* @__PURE__ */ React3.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" })
199
- )), /* @__PURE__ */ React3.createElement("div", { className: "hawa-m-2 hawa-text-xl hawa-font-bold" }, (texts == null ? void 0 : texts.youreCaughtUp) || "You're all caught up"))), /* @__PURE__ */ React3.createElement(CardFooter, null, /* @__PURE__ */ React3.createElement(Button, { className: "hawa-w-full", onClick: () => onActionClick() }, (texts == null ? void 0 : texts.actionText) || "Go Home")));
228
+ /* @__PURE__ */ React4.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" })
229
+ )), /* @__PURE__ */ React4.createElement("div", { className: "hawa-m-2 hawa-text-xl hawa-font-bold" }, (texts == null ? void 0 : texts.youreCaughtUp) || "You're all caught up"))), /* @__PURE__ */ React4.createElement(CardFooter, null, /* @__PURE__ */ React4.createElement(Button, { className: "hawa-w-full", onClick: () => onActionClick() }, (texts == null ? void 0 : texts.actionText) || "Go Home")));
200
230
  };
201
231
 
202
232
  // blocks/misc/Testimonial.tsx
203
- import React4 from "react";
233
+ import React5 from "react";
204
234
  var Testimonial = () => {
205
- return /* @__PURE__ */ React4.createElement(Card, null, /* @__PURE__ */ React4.createElement(CardContent, { headless: true }, /* @__PURE__ */ React4.createElement("div", null, /* @__PURE__ */ React4.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__ */ React4.createElement("div", { className: "flex flex-row gap-4" }, /* @__PURE__ */ React4.createElement("svg", { width: "48", height: "48", viewBox: "0 0 48 48", fill: "none" }, /* @__PURE__ */ React4.createElement("rect", { width: "48", height: "48", rx: "24", fill: "#45BE8B" }), /* @__PURE__ */ React4.createElement(
235
+ return /* @__PURE__ */ React5.createElement(Card, null, /* @__PURE__ */ React5.createElement(CardContent, { headless: true }, /* @__PURE__ */ React5.createElement("div", null, /* @__PURE__ */ React5.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__ */ React5.createElement("div", { className: "flex flex-row gap-4" }, /* @__PURE__ */ React5.createElement("svg", { width: "48", height: "48", viewBox: "0 0 48 48", fill: "none" }, /* @__PURE__ */ React5.createElement("rect", { width: "48", height: "48", rx: "24", fill: "#45BE8B" }), /* @__PURE__ */ React5.createElement(
206
236
  "path",
207
237
  {
208
238
  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",
209
239
  fill: "#FFFFFF"
210
240
  }
211
- ), /* @__PURE__ */ React4.createElement(
241
+ ), /* @__PURE__ */ React5.createElement(
212
242
  "path",
213
243
  {
214
244
  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",
215
245
  fill: "#FFFFFF"
216
246
  }
217
- )), /* @__PURE__ */ React4.createElement("span", { className: "border border-l " }), " ", /* @__PURE__ */ React4.createElement("div", null, /* @__PURE__ */ React4.createElement("strong", null, "Brent Lassi"), /* @__PURE__ */ React4.createElement("div", null, " Chief Information Security Officer")))));
247
+ )), /* @__PURE__ */ React5.createElement("span", { className: "border border-l " }), " ", /* @__PURE__ */ React5.createElement("div", null, /* @__PURE__ */ React5.createElement("strong", null, "Brent Lassi"), /* @__PURE__ */ React5.createElement("div", null, " Chief Information Security Officer")))));
218
248
  };
219
249
 
220
250
  // blocks/misc/LeadGenerator.tsx
221
- import React5 from "react";
251
+ import React6 from "react";
222
252
  import { useForm, Controller } from "react-hook-form";
223
253
  var LeadGenerator = ({ texts, submitHandler }) => {
224
254
  var _a;
@@ -230,14 +260,14 @@ var LeadGenerator = ({ texts, submitHandler }) => {
230
260
  console.log("handleNewsletterSub props was not provided");
231
261
  }
232
262
  };
233
- return /* @__PURE__ */ React5.createElement(Card, null, /* @__PURE__ */ React5.createElement(CardHeader, null, /* @__PURE__ */ React5.createElement(CardTitle, null, texts == null ? void 0 : texts.title), /* @__PURE__ */ React5.createElement(CardDescription, null, texts == null ? void 0 : texts.subtitle)), /* @__PURE__ */ React5.createElement(CardContent, null, /* @__PURE__ */ React5.createElement(
263
+ return /* @__PURE__ */ React6.createElement(Card, null, /* @__PURE__ */ React6.createElement(CardHeader, null, /* @__PURE__ */ React6.createElement(CardTitle, null, texts == null ? void 0 : texts.title), /* @__PURE__ */ React6.createElement(CardDescription, null, texts == null ? void 0 : texts.subtitle)), /* @__PURE__ */ React6.createElement(CardContent, null, /* @__PURE__ */ React6.createElement(
234
264
  "form",
235
265
  {
236
266
  noValidate: true,
237
267
  className: "hawa-flex hawa-flex-row hawa-gap-2",
238
268
  onSubmit: handleSubmit(onSubmit)
239
269
  },
240
- /* @__PURE__ */ React5.createElement(
270
+ /* @__PURE__ */ React6.createElement(
241
271
  Controller,
242
272
  {
243
273
  name: "email",
@@ -250,27 +280,27 @@ var LeadGenerator = ({ texts, submitHandler }) => {
250
280
  }
251
281
  },
252
282
  defaultValue: "",
253
- render: ({ field }) => /* @__PURE__ */ React5.createElement(Input, { ...field, type: "email", placeholder: "example@sikka.io" })
283
+ render: ({ field }) => /* @__PURE__ */ React6.createElement(Input, { ...field, type: "email", placeholder: "example@sikka.io" })
254
284
  }
255
285
  ),
256
- /* @__PURE__ */ React5.createElement(Button, { type: "submit", disabled: !formState.isValid }, (_a = texts == null ? void 0 : texts.submit) != null ? _a : "Submit")
286
+ /* @__PURE__ */ React6.createElement(Button, { type: "submit", disabled: !formState.isValid }, (_a = texts == null ? void 0 : texts.submit) != null ? _a : "Submit")
257
287
  )));
258
288
  };
259
289
 
260
290
  // blocks/misc/Announcement.tsx
261
- import React6 from "react";
291
+ import React7 from "react";
262
292
  var Announcement = ({
263
293
  onActionClick,
264
294
  ...props
265
295
  }) => {
266
- return /* @__PURE__ */ React6.createElement(Card, null, /* @__PURE__ */ React6.createElement(
296
+ return /* @__PURE__ */ React7.createElement(Card, null, /* @__PURE__ */ React7.createElement(
267
297
  CardContent,
268
298
  {
269
299
  headless: true,
270
300
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-between"
271
301
  },
272
- /* @__PURE__ */ React6.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-start hawa-justify-center " }, /* @__PURE__ */ React6.createElement("span", { className: "hawa-text-lg hawa-font-bold" }, props.title), /* @__PURE__ */ React6.createElement("span", { className: "hawa-text-sm" }, props.subtitle)),
273
- /* @__PURE__ */ React6.createElement(
302
+ /* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-start hawa-justify-center " }, /* @__PURE__ */ React7.createElement("span", { className: "hawa-text-lg hawa-font-bold" }, props.title), /* @__PURE__ */ React7.createElement("span", { className: "hawa-text-sm" }, props.subtitle)),
303
+ /* @__PURE__ */ React7.createElement(
274
304
  Button,
275
305
  {
276
306
  onClick: () => onActionClick(),
@@ -282,15 +312,15 @@ var Announcement = ({
282
312
  };
283
313
 
284
314
  // blocks/misc/NotFound.tsx
285
- import React7 from "react";
315
+ import React8 from "react";
286
316
  var NotFound = ({ texts }) => {
287
- return /* @__PURE__ */ React7.createElement(Card, null, /* @__PURE__ */ React7.createElement(CardContent, { headless: true }, /* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center dark:hawa-text-white" }, /* @__PURE__ */ React7.createElement("div", { className: "hawa-text-center hawa-text-6xl hawa-font-bold " }, "404"), /* @__PURE__ */ React7.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__ */ React7.createElement("div", { className: "hawa-mb-4 hawa-text-center" }, (texts == null ? void 0 : texts.ifLost) || /* @__PURE__ */ React7.createElement(React7.Fragment, null, "If you're lost please contact us ", /* @__PURE__ */ React7.createElement("span", { className: "clickable-link" }, "help@sikka.io"))), /* @__PURE__ */ React7.createElement(Button, { className: "hawa-w-full" }, (texts == null ? void 0 : texts.home) || "Home"))));
317
+ return /* @__PURE__ */ React8.createElement(Card, null, /* @__PURE__ */ React8.createElement(CardContent, { headless: true }, /* @__PURE__ */ React8.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center dark:hawa-text-white" }, /* @__PURE__ */ React8.createElement("div", { className: "hawa-text-center hawa-text-6xl hawa-font-bold " }, "404"), /* @__PURE__ */ React8.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__ */ React8.createElement("div", { className: "hawa-mb-4 hawa-text-center" }, (texts == null ? void 0 : texts.ifLost) || /* @__PURE__ */ React8.createElement(React8.Fragment, null, "If you're lost please contact us ", /* @__PURE__ */ React8.createElement("span", { className: "clickable-link" }, "help@sikka.io"))), /* @__PURE__ */ React8.createElement(Button, { className: "hawa-w-full" }, (texts == null ? void 0 : texts.home) || "Home"))));
288
318
  };
289
319
 
290
320
  // blocks/misc/NoPermission.tsx
291
- import React8 from "react";
321
+ import React9 from "react";
292
322
  var NoPermission = ({ texts }) => {
293
- return /* @__PURE__ */ React8.createElement(Card, null, /* @__PURE__ */ React8.createElement(CardContent, { headless: true }, /* @__PURE__ */ React8.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-text-center" }, /* @__PURE__ */ React8.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__ */ React8.createElement(
323
+ return /* @__PURE__ */ React9.createElement(Card, null, /* @__PURE__ */ React9.createElement(CardContent, { headless: true }, /* @__PURE__ */ React9.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-text-center" }, /* @__PURE__ */ React9.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__ */ React9.createElement(
294
324
  "svg",
295
325
  {
296
326
  stroke: "currentColor",
@@ -300,12 +330,12 @@ var NoPermission = ({ texts }) => {
300
330
  height: "0.35em",
301
331
  width: "0.35em"
302
332
  },
303
- /* @__PURE__ */ React8.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" })
304
- )), /* @__PURE__ */ React8.createElement("div", { className: "hawa-m-2 hawa-text-xl hawa-font-bold" }, (texts == null ? void 0 : texts.title) || "You don't have permission"), /* @__PURE__ */ React8.createElement("div", null, (texts == null ? void 0 : texts.subtitle) || "If you think this is a problem please contact your administrator or our customer support"))));
333
+ /* @__PURE__ */ React9.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" })
334
+ )), /* @__PURE__ */ React9.createElement("div", { className: "hawa-m-2 hawa-text-xl hawa-font-bold" }, (texts == null ? void 0 : texts.title) || "You don't have permission"), /* @__PURE__ */ React9.createElement("div", null, (texts == null ? void 0 : texts.subtitle) || "If you think this is a problem please contact your administrator or our customer support"))));
305
335
  };
306
336
 
307
337
  // blocks/misc/ContactForm.tsx
308
- import React9 from "react";
338
+ import React10 from "react";
309
339
  import { useForm as useForm2, Controller as Controller2 } from "react-hook-form";
310
340
  import { zodResolver } from "@hookform/resolvers/zod";
311
341
  import * as z from "zod";
@@ -377,7 +407,7 @@ var ContactForm = ({
377
407
  console.log("Form is submitted but onSubmit prop is missing");
378
408
  }
379
409
  };
380
- return /* @__PURE__ */ React9.createElement(
410
+ return /* @__PURE__ */ React10.createElement(
381
411
  Card,
382
412
  {
383
413
  className: cn(
@@ -386,7 +416,7 @@ var ContactForm = ({
386
416
  ),
387
417
  style: cardless ? { boxShadow: "none" } : void 0
388
418
  },
389
- /* @__PURE__ */ React9.createElement(CardContent, { headless: true, className: cardless ? "!hawa-p-0" : "" }, /* @__PURE__ */ React9.createElement(
419
+ /* @__PURE__ */ React10.createElement(CardContent, { headless: true, className: cardless ? "!hawa-p-0" : "" }, /* @__PURE__ */ React10.createElement(
390
420
  "form",
391
421
  {
392
422
  noValidate: true,
@@ -395,7 +425,7 @@ var ContactForm = ({
395
425
  id: formId,
396
426
  autoComplete: formAutoComplete
397
427
  },
398
- /* @__PURE__ */ React9.createElement(
428
+ /* @__PURE__ */ React10.createElement(
399
429
  "div",
400
430
  {
401
431
  className: cn(
@@ -406,14 +436,14 @@ var ContactForm = ({
406
436
  }
407
437
  )
408
438
  },
409
- /* @__PURE__ */ React9.createElement(
439
+ /* @__PURE__ */ React10.createElement(
410
440
  Controller2,
411
441
  {
412
442
  control,
413
443
  name: "name",
414
444
  render: ({ field }) => {
415
445
  var _a2;
416
- return /* @__PURE__ */ React9.createElement(
446
+ return /* @__PURE__ */ React10.createElement(
417
447
  Input,
418
448
  {
419
449
  label: (texts == null ? void 0 : texts.name.label) || "Name",
@@ -426,14 +456,14 @@ var ContactForm = ({
426
456
  }
427
457
  }
428
458
  ),
429
- /* @__PURE__ */ React9.createElement(
459
+ /* @__PURE__ */ React10.createElement(
430
460
  Controller2,
431
461
  {
432
462
  control,
433
463
  name: "email",
434
464
  render: ({ field }) => {
435
465
  var _a2;
436
- return /* @__PURE__ */ React9.createElement(
466
+ return /* @__PURE__ */ React10.createElement(
437
467
  Input,
438
468
  {
439
469
  label: (texts == null ? void 0 : texts.email.label) || "Email",
@@ -449,7 +479,7 @@ var ContactForm = ({
449
479
  ),
450
480
  customFields && customFields.map((customField) => {
451
481
  console.log("custom", customField);
452
- return /* @__PURE__ */ React9.createElement(
482
+ return /* @__PURE__ */ React10.createElement(
453
483
  Controller2,
454
484
  {
455
485
  control,
@@ -459,7 +489,7 @@ var ContactForm = ({
459
489
  switch (type) {
460
490
  case "text":
461
491
  case "number":
462
- return /* @__PURE__ */ React9.createElement(
492
+ return /* @__PURE__ */ React10.createElement(
463
493
  Input,
464
494
  {
465
495
  id: customField.name,
@@ -470,7 +500,7 @@ var ContactForm = ({
470
500
  }
471
501
  );
472
502
  case "select":
473
- return /* @__PURE__ */ React9.createElement(
503
+ return /* @__PURE__ */ React10.createElement(
474
504
  Select,
475
505
  {
476
506
  label,
@@ -480,20 +510,20 @@ var ContactForm = ({
480
510
  }
481
511
  );
482
512
  default:
483
- return /* @__PURE__ */ React9.createElement("div", null, "Unknown type");
513
+ return /* @__PURE__ */ React10.createElement("div", null, "Unknown type");
484
514
  }
485
515
  }
486
516
  }
487
517
  );
488
518
  }),
489
- /* @__PURE__ */ React9.createElement(
519
+ /* @__PURE__ */ React10.createElement(
490
520
  Controller2,
491
521
  {
492
522
  control,
493
523
  name: "message",
494
524
  render: ({ field }) => {
495
525
  var _a2;
496
- return /* @__PURE__ */ React9.createElement(
526
+ return /* @__PURE__ */ React10.createElement(
497
527
  Textarea,
498
528
  {
499
529
  label: (texts == null ? void 0 : texts.message.label) || "Message",
@@ -510,7 +540,7 @@ var ContactForm = ({
510
540
  }
511
541
  }
512
542
  ),
513
- /* @__PURE__ */ React9.createElement(Button, { type: "submit", className: "hawa-w-full" }, (texts == null ? void 0 : texts.submit) || "Submit")
543
+ /* @__PURE__ */ React10.createElement(Button, { type: "submit", className: "hawa-w-full" }, (texts == null ? void 0 : texts.submit) || "Submit")
514
544
  ))
515
545
  );
516
546
  };
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  Chip,
4
4
  ScrollArea
5
- } from "../../chunk-CVOMHXJK.mjs";
5
+ } from "../../chunk-BXGDHNAY.mjs";
6
6
  import "../../chunk-47APBDKK.mjs";
7
7
  import {
8
8
  Radio
@@ -1,14 +1,16 @@
1
1
  import { FC, ReactNode } from 'react';
2
2
 
3
+ type BreadcrumbItemProps = {
4
+ label: string;
5
+ href: string;
6
+ };
3
7
  interface BCTypes {
4
8
  /** The array of crumbs, each one with a label and a href link */
5
- breadcrumbLinks: {
6
- label: string;
7
- href: string;
8
- }[];
9
+ breadcrumbLinks: BreadcrumbItemProps[];
9
10
  /** The separator between each crumb, can be character or React Node. The default is ">" */
10
11
  separator?: string | ReactNode;
12
+ size?: "normal" | "small" | "xs";
11
13
  }
12
14
  declare const Breadcrumb: FC<BCTypes>;
13
15
 
14
- export { Breadcrumb };
16
+ export { Breadcrumb, type BreadcrumbItemProps };
@@ -1,14 +1,16 @@
1
1
  import { FC, ReactNode } from 'react';
2
2
 
3
+ type BreadcrumbItemProps = {
4
+ label: string;
5
+ href: string;
6
+ };
3
7
  interface BCTypes {
4
8
  /** The array of crumbs, each one with a label and a href link */
5
- breadcrumbLinks: {
6
- label: string;
7
- href: string;
8
- }[];
9
+ breadcrumbLinks: BreadcrumbItemProps[];
9
10
  /** The separator between each crumb, can be character or React Node. The default is ">" */
10
11
  separator?: string | ReactNode;
12
+ size?: "normal" | "small" | "xs";
11
13
  }
12
14
  declare const Breadcrumb: FC<BCTypes>;
13
15
 
14
- export { Breadcrumb };
16
+ export { Breadcrumb, type BreadcrumbItemProps };
@@ -37,26 +37,50 @@ module.exports = __toCommonJS(breadcrumb_exports);
37
37
 
38
38
  // elements/breadcrumb/Breadcrumb.tsx
39
39
  var import_react = __toESM(require("react"));
40
+
41
+ // util/index.ts
42
+ var import_clsx = require("clsx");
43
+ var import_tailwind_merge = require("tailwind-merge");
44
+ function cn(...inputs) {
45
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
46
+ }
47
+
48
+ // elements/breadcrumb/Breadcrumb.tsx
40
49
  var Breadcrumb = ({
41
50
  breadcrumbLinks,
42
- separator = ">"
51
+ separator = ">",
52
+ size = "normal"
43
53
  }) => {
44
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm" }, breadcrumbLinks.map((singleBreadcrumbLink, index) => /* @__PURE__ */ import_react.default.createElement(
54
+ const textStyles = {
55
+ normal: "",
56
+ small: "hawa-text-sm",
57
+ xs: "hawa-text-xs"
58
+ };
59
+ return /* @__PURE__ */ import_react.default.createElement(
45
60
  "div",
46
61
  {
47
- key: index,
48
- className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2"
62
+ className: cn(
63
+ "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm",
64
+ textStyles[size]
65
+ )
49
66
  },
50
- /* @__PURE__ */ import_react.default.createElement(
51
- "a",
67
+ breadcrumbLinks.map((singleBreadcrumbLink, index) => /* @__PURE__ */ import_react.default.createElement(
68
+ "div",
52
69
  {
53
- href: singleBreadcrumbLink.href,
54
- className: index + 1 === breadcrumbLinks.length ? "hawa-pointer-events-none" : "hawa-underline-offset-4 hawa-transition-all hover:hawa-text-primary hover:hawa-underline hover:hawa-decoration-2"
70
+ key: index,
71
+ className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2"
55
72
  },
56
- singleBreadcrumbLink.label
57
- ),
58
- index != breadcrumbLinks.length - 1 ? typeof separator == "string" ? /* @__PURE__ */ import_react.default.createElement("div", null, separator) : /* @__PURE__ */ import_react.default.createElement("div", null, separator) : null
59
- )));
73
+ /* @__PURE__ */ import_react.default.createElement(
74
+ "a",
75
+ {
76
+ href: singleBreadcrumbLink.href,
77
+ className: index + 1 === breadcrumbLinks.length ? "hawa-pointer-events-none" : "hawa-underline-offset-4 hawa-transition-all hover:hawa-text-primary hover:hawa-underline hover:hawa-decoration-2"
78
+ },
79
+ singleBreadcrumbLink.label
80
+ ),
81
+ index != breadcrumbLinks.length - 1 ? typeof separator == "string" ? /* @__PURE__ */ import_react.default.createElement("div", null, separator) : /* @__PURE__ */ import_react.default.createElement("div", null, separator) : null
82
+ ))
83
+ );
60
84
  };
61
85
  // Annotate the CommonJS export names for ESM import in node:
62
86
  0 && (module.exports = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../elements/breadcrumb/index.ts","../../elements/breadcrumb/Breadcrumb.tsx"],"sourcesContent":["export * from \"./Breadcrumb\";\n","import React, { FC, ReactNode } from \"react\";\n\ninterface BCTypes {\n /** The array of crumbs, each one with a label and a href link */\n breadcrumbLinks: { label: string; href: string }[];\n /** The separator between each crumb, can be character or React Node. The default is \">\" */\n separator?: string | ReactNode;\n}\n\nexport const Breadcrumb: FC<BCTypes> = ({\n breadcrumbLinks,\n separator = \">\"\n}) => {\n return (\n <div className=\"hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm\">\n {breadcrumbLinks.map((singleBreadcrumbLink, index) => (\n <div\n key={index}\n className=\"hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2\"\n >\n <a\n href={singleBreadcrumbLink.href}\n className={\n index + 1 === breadcrumbLinks.length\n ? \"hawa-pointer-events-none\"\n : \"hawa-underline-offset-4 hawa-transition-all hover:hawa-text-primary hover:hawa-underline hover:hawa-decoration-2\"\n }\n >\n {singleBreadcrumbLink.label}\n </a>\n {index != breadcrumbLinks.length - 1 ? (\n typeof separator == \"string\" ? (\n <div>{separator}</div>\n ) : (\n <div>{separator}</div>\n )\n ) : null}\n </div>\n ))}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAqC;AAS9B,IAAM,aAA0B,CAAC;AAAA,EACtC;AAAA,EACA,YAAY;AACd,MAAM;AACJ,SACE,6BAAAA,QAAA,cAAC,SAAI,WAAU,uEACZ,gBAAgB,IAAI,CAAC,sBAAsB,UAC1C,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,MACL,WAAU;AAAA;AAAA,IAEV,6BAAAA,QAAA;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,qBAAqB;AAAA,QAC3B,WACE,QAAQ,MAAM,gBAAgB,SAC1B,6BACA;AAAA;AAAA,MAGL,qBAAqB;AAAA,IACxB;AAAA,IACC,SAAS,gBAAgB,SAAS,IACjC,OAAO,aAAa,WAClB,6BAAAA,QAAA,cAAC,aAAK,SAAU,IAEhB,6BAAAA,QAAA,cAAC,aAAK,SAAU,IAEhB;AAAA,EACN,CACD,CACH;AAEJ;","names":["React"]}
1
+ {"version":3,"sources":["../../elements/breadcrumb/index.ts","../../elements/breadcrumb/Breadcrumb.tsx","../../util/index.ts"],"sourcesContent":["export * from \"./Breadcrumb\";\n","import React, { FC, ReactNode } from \"react\";\n\nimport { cn } from \"@util/index\";\n\nexport type BreadcrumbItemProps = {\n label: string;\n href: string;\n};\ninterface BCTypes {\n /** The array of crumbs, each one with a label and a href link */\n breadcrumbLinks: BreadcrumbItemProps[];\n /** The separator between each crumb, can be character or React Node. The default is \">\" */\n separator?: string | ReactNode;\n size?: \"normal\" | \"small\" | \"xs\";\n}\n\nexport const Breadcrumb: FC<BCTypes> = ({\n breadcrumbLinks,\n separator = \">\",\n size = \"normal\",\n}) => {\n const textStyles = {\n normal: \"\",\n small: \"hawa-text-sm\",\n xs: \"hawa-text-xs\",\n };\n return (\n <div\n className={cn(\n \"hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm\",\n textStyles[size],\n )}\n >\n {breadcrumbLinks.map((singleBreadcrumbLink, index) => (\n <div\n key={index}\n className=\"hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2\"\n >\n <a\n href={singleBreadcrumbLink.href}\n className={\n index + 1 === breadcrumbLinks.length\n ? \"hawa-pointer-events-none\"\n : \"hawa-underline-offset-4 hawa-transition-all hover:hawa-text-primary hover:hawa-underline hover:hawa-decoration-2\"\n }\n >\n {singleBreadcrumbLink.label}\n </a>\n {index != breadcrumbLinks.length - 1 ? (\n typeof separator == \"string\" ? (\n <div>{separator}</div>\n ) : (\n <div>{separator}</div>\n )\n ) : null}\n </div>\n ))}\n </div>\n );\n};\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(\n sanitizedHex\n );\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16)\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\")\n }\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAqC;;;ACArC,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADWO,IAAM,aAA0B,CAAC;AAAA,EACtC;AAAA,EACA,YAAY;AAAA,EACZ,OAAO;AACT,MAAM;AACJ,QAAM,aAAa;AAAA,IACjB,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,IAAI;AAAA,EACN;AACA,SACE,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,WAAW,IAAI;AAAA,MACjB;AAAA;AAAA,IAEC,gBAAgB,IAAI,CAAC,sBAAsB,UAC1C,6BAAAA,QAAA;AAAA,MAAC;AAAA;AAAA,QACC,KAAK;AAAA,QACL,WAAU;AAAA;AAAA,MAEV,6BAAAA,QAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAM,qBAAqB;AAAA,UAC3B,WACE,QAAQ,MAAM,gBAAgB,SAC1B,6BACA;AAAA;AAAA,QAGL,qBAAqB;AAAA,MACxB;AAAA,MACC,SAAS,gBAAgB,SAAS,IACjC,OAAO,aAAa,WAClB,6BAAAA,QAAA,cAAC,aAAK,SAAU,IAEhB,6BAAAA,QAAA,cAAC,aAAK,SAAU,IAEhB;AAAA,IACN,CACD;AAAA,EACH;AAEJ;","names":["React"]}