@sikka/hawa 0.30.26-next → 0.30.28-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.
@@ -24,45 +24,148 @@ import {
24
24
  } from "../../chunk-ZGNBKYX7.mjs";
25
25
 
26
26
  // blocks/misc/LegalTexts.tsx
27
- import React3 from "react";
27
+ import React11 from "react";
28
+
29
+ // elements/tabs/Tabs.tsx
30
+ import * as React10 from "react";
31
+
32
+ // hooks/useIsomorphicEffect.ts
33
+ import { useEffect, useLayoutEffect } from "react";
34
+
35
+ // hooks/useDiscloser.ts
36
+ import { useState } from "react";
37
+
38
+ // hooks/useHover.ts
39
+ import { useEffect as useEffect2, useRef, useState as useState2 } from "react";
40
+
41
+ // hooks/useToast.ts
42
+ import * as React3 from "react";
43
+
44
+ // hooks/useCarousel.ts
45
+ import { useState as useState4, useRef as useRef2 } from "react";
46
+
47
+ // hooks/useDialogCarousel.ts
48
+ import { useEffect as useEffect4, useState as useState5 } from "react";
49
+ import AutoHeight from "embla-carousel-auto-height";
50
+ import useEmblaCarousel from "embla-carousel-react";
51
+
52
+ // hooks/useDialogSteps.ts
53
+ import { useState as useState6, useEffect as useEffect5, useRef as useRef3 } from "react";
54
+
55
+ // hooks/useClipboard.ts
56
+ import { useState as useState7 } from "react";
57
+
58
+ // hooks/useBreakpoint.ts
59
+ import { useState as useState8, useEffect as useEffect6 } from "react";
60
+
61
+ // hooks/useWindowSize.ts
62
+ import { useEffect as useEffect7, useState as useState9 } from "react";
63
+
64
+ // hooks/useFocusWithin.ts
65
+ import { useRef as useRef4, useState as useState10, useEffect as useEffect8 } from "react";
66
+
67
+ // hooks/useMediaQuery.ts
68
+ import { useState as useState11, useEffect as useEffect9, useRef as useRef5 } from "react";
69
+
70
+ // hooks/useScrollPosition.ts
71
+ import { useState as useState12, useEffect as useEffect10 } from "react";
72
+
73
+ // hooks/useTable.ts
74
+ import { useState as useState13, useEffect as useEffect11 } from "react";
75
+
76
+ // hooks/useTabs.ts
77
+ import { useEffect as useEffect12, useState as useState14 } from "react";
78
+
79
+ // hooks/useMeasureDirty.ts
80
+ import { useEffect as useEffect13, useRef as useRef7, useState as useState15 } from "react";
81
+ var useMeasureDirty = (ref) => {
82
+ const frame = useRef7(0);
83
+ const [rect, set] = useState15({
84
+ width: 0,
85
+ height: 0,
86
+ top: 0,
87
+ left: 0,
88
+ bottom: 0,
89
+ right: 0
90
+ });
91
+ const [observer] = useState15(
92
+ () => new ResizeObserver((entries) => {
93
+ const entry = entries[0];
94
+ if (entry) {
95
+ cancelAnimationFrame(frame.current);
96
+ frame.current = requestAnimationFrame(() => {
97
+ if (ref.current) {
98
+ set(entry.contentRect);
99
+ }
100
+ });
101
+ }
102
+ })
103
+ );
104
+ useEffect13(() => {
105
+ observer.disconnect();
106
+ if (ref.current) {
107
+ observer.observe(ref.current);
108
+ }
109
+ }, [ref]);
110
+ return rect;
111
+ };
28
112
 
29
113
  // elements/tabs/Tabs.tsx
30
- import * as React2 from "react";
31
114
  import * as TabsPrimitive from "@radix-ui/react-tabs";
32
115
  import { tv } from "tailwind-variants";
33
116
 
34
117
  // elements/floatBox/FloatBox.tsx
35
- import * as React from "react";
118
+ import * as React9 from "react";
36
119
  var FloatBox = ({
37
120
  className,
38
121
  open,
39
122
  side = "bottom",
40
123
  sideOffset = 40,
124
+ align = "center",
125
+ arrow = true,
41
126
  ...props
42
127
  }) => {
43
- let widthStyles = {
44
- trigger: "var(--radix-popover-trigger-width)",
45
- default: "auto"
128
+ let stylesMap = {
129
+ bottom: {
130
+ start: { top: sideOffset, insetInlineStart: 0 },
131
+ center: { top: sideOffset },
132
+ end: { top: sideOffset, insetInlineEnd: 0 }
133
+ },
134
+ top: {
135
+ start: { bottom: sideOffset, insetInlineStart: 0 },
136
+ center: { bottom: sideOffset },
137
+ end: { bottom: sideOffset, insetInlineEnd: 0 }
138
+ },
139
+ right: {
140
+ start: { left: sideOffset, top: -5 },
141
+ center: { left: sideOffset },
142
+ end: { left: sideOffset, bottom: 0 }
143
+ },
144
+ left: {
145
+ start: { right: sideOffset, top: 0 },
146
+ center: { right: sideOffset },
147
+ end: { right: sideOffset, bottom: 0 }
148
+ }
46
149
  };
47
- let sideOffsetStyles = {
48
- bottom: { top: sideOffset },
49
- top: { bottom: sideOffset },
50
- right: { left: sideOffset },
51
- left: { right: sideOffset }
150
+ const arrowDirection = {
151
+ top: "hawa-arrow-default-bottom",
152
+ bottom: "hawa-arrow-default-top",
153
+ right: "hawa-arrow-default-left",
154
+ left: "hawa-arrow-default-right"
52
155
  };
53
- return /* @__PURE__ */ React.createElement(
156
+ return /* @__PURE__ */ React9.createElement(
54
157
  "div",
55
158
  {
56
159
  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],
160
+ "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-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 hawa-bg-popover",
59
161
  className
60
162
  ),
61
- style: { ...sideOffsetStyles[side] },
163
+ style: { ...stylesMap[side][align] },
62
164
  "data-side": side,
63
165
  "data-floatbox-state": open ? "open" : "closed"
64
166
  },
65
- props.children
167
+ arrow && /* @__PURE__ */ React9.createElement("div", { className: cn("hawa-bg-red-500", arrowDirection[side]) }),
168
+ /* @__PURE__ */ React9.createElement("span", null, props.children)
66
169
  );
67
170
  };
68
171
 
@@ -125,8 +228,8 @@ var tabsTriggerVariant = tv({
125
228
  ],
126
229
  defaultVariants: { variant: "default", orientation: "horizontal" }
127
230
  });
128
- var TabsContext = React2.createContext({ orientation: "horizontal", variant: "default" });
129
- var Tabs = React2.forwardRef(({ className, orientation, variant = "default", ...props }, ref) => /* @__PURE__ */ React2.createElement(
231
+ var TabsContext = React10.createContext({ orientation: "horizontal", variant: "default" });
232
+ var Tabs = React10.forwardRef(({ className, orientation, variant = "default", ...props }, ref) => /* @__PURE__ */ React10.createElement(
130
233
  TabsPrimitive.Root,
131
234
  {
132
235
  ref,
@@ -137,11 +240,11 @@ var Tabs = React2.forwardRef(({ className, orientation, variant = "default", ...
137
240
  ),
138
241
  ...props
139
242
  },
140
- /* @__PURE__ */ React2.createElement(TabsContext.Provider, { value: { orientation, variant } }, props.children)
243
+ /* @__PURE__ */ React10.createElement(TabsContext.Provider, { value: { orientation, variant } }, props.children)
141
244
  ));
142
- var TabsList = React2.forwardRef(({ className, ...props }, ref) => {
143
- const { orientation, variant } = React2.useContext(TabsContext);
144
- return /* @__PURE__ */ React2.createElement(
245
+ var TabsList = React10.forwardRef(({ className, ...props }, ref) => {
246
+ const { orientation, variant } = React10.useContext(TabsContext);
247
+ return /* @__PURE__ */ React10.createElement(
145
248
  TabsPrimitive.List,
146
249
  {
147
250
  ref,
@@ -154,12 +257,14 @@ var TabsList = React2.forwardRef(({ className, ...props }, ref) => {
154
257
  }
155
258
  );
156
259
  });
157
- var TabsTrigger = React2.forwardRef(({ className, chipProps, ...props }, ref) => {
158
- const { orientation, variant } = React2.useContext(TabsContext);
159
- return /* @__PURE__ */ React2.createElement(
260
+ var TabsTrigger = React10.forwardRef(({ className, chipProps, ...props }, ref) => {
261
+ const { orientation, variant } = React10.useContext(TabsContext);
262
+ const tabTriggerRef = React10.useRef(null);
263
+ const { width } = useMeasureDirty(tabTriggerRef);
264
+ return /* @__PURE__ */ React10.createElement(
160
265
  TabsPrimitive.Trigger,
161
266
  {
162
- ref,
267
+ ref: tabTriggerRef,
163
268
  className: cn(
164
269
  tabsTriggerVariant({ variant, orientation }),
165
270
  "hawa-relative",
@@ -168,11 +273,20 @@ var TabsTrigger = React2.forwardRef(({ className, chipProps, ...props }, ref) =>
168
273
  ...props
169
274
  },
170
275
  props.children,
171
- chipProps && /* @__PURE__ */ React2.createElement(Chip, { ...chipProps }),
172
- /* @__PURE__ */ React2.createElement(FloatBox, { open: props.showPopover }, props.popoverContent)
276
+ chipProps && /* @__PURE__ */ React10.createElement(Chip, { ...chipProps }),
277
+ /* @__PURE__ */ React10.createElement(
278
+ FloatBox,
279
+ {
280
+ align: orientation === "vertical" ? "start" : "start",
281
+ side: orientation === "vertical" ? "right" : "bottom",
282
+ sideOffset: orientation === "vertical" ? width + 30 : 45,
283
+ open: props.showPopover
284
+ },
285
+ props.popoverContent
286
+ )
173
287
  );
174
288
  });
175
- var TabsContent = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
289
+ var TabsContent = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
176
290
  TabsPrimitive.Content,
177
291
  {
178
292
  ref,
@@ -190,7 +304,7 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
190
304
 
191
305
  // blocks/misc/LegalTexts.tsx
192
306
  var LegalTexts = ({ tabs, ...props }) => {
193
- return /* @__PURE__ */ React3.createElement(
307
+ return /* @__PURE__ */ React11.createElement(
194
308
  Tabs,
195
309
  {
196
310
  value: props.activeTab,
@@ -198,8 +312,8 @@ var LegalTexts = ({ tabs, ...props }) => {
198
312
  defaultValue: props.defaultTab || tabs[0].value,
199
313
  dir: props.direction
200
314
  },
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(
315
+ /* @__PURE__ */ React11.createElement(TabsList, { className: "hawa-w-full" }, tabs.map((tab, index) => /* @__PURE__ */ React11.createElement(TabsTrigger, { key: index, value: tab.value }, tab.title))),
316
+ tabs.map((tab, index) => /* @__PURE__ */ React11.createElement(TabsContent, { key: index, value: tab.value }, /* @__PURE__ */ React11.createElement(
203
317
  ScrollArea,
204
318
  {
205
319
  className: cn(
@@ -213,9 +327,9 @@ var LegalTexts = ({ tabs, ...props }) => {
213
327
  };
214
328
 
215
329
  // blocks/misc/EmptyState.tsx
216
- import React4 from "react";
330
+ import React12 from "react";
217
331
  var EmptyState = ({ texts, onActionClick }) => {
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(
332
+ 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(
219
333
  "svg",
220
334
  {
221
335
  stroke: "currentColor",
@@ -225,30 +339,30 @@ var EmptyState = ({ texts, onActionClick }) => {
225
339
  height: "0.35em",
226
340
  width: "0.35em"
227
341
  },
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")));
342
+ /* @__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" })
343
+ )), /* @__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")));
230
344
  };
231
345
 
232
346
  // blocks/misc/Testimonial.tsx
233
- import React5 from "react";
347
+ import React13 from "react";
234
348
  var Testimonial = () => {
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(
349
+ 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(
236
350
  "path",
237
351
  {
238
352
  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",
239
353
  fill: "#FFFFFF"
240
354
  }
241
- ), /* @__PURE__ */ React5.createElement(
355
+ ), /* @__PURE__ */ React13.createElement(
242
356
  "path",
243
357
  {
244
358
  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",
245
359
  fill: "#FFFFFF"
246
360
  }
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")))));
361
+ )), /* @__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")))));
248
362
  };
249
363
 
250
364
  // blocks/misc/LeadGenerator.tsx
251
- import React6 from "react";
365
+ import React14 from "react";
252
366
  import { useForm, Controller } from "react-hook-form";
253
367
  var LeadGenerator = ({ texts, submitHandler }) => {
254
368
  var _a;
@@ -260,14 +374,14 @@ var LeadGenerator = ({ texts, submitHandler }) => {
260
374
  console.log("handleNewsletterSub props was not provided");
261
375
  }
262
376
  };
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(
377
+ 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(
264
378
  "form",
265
379
  {
266
380
  noValidate: true,
267
381
  className: "hawa-flex hawa-flex-row hawa-gap-2",
268
382
  onSubmit: handleSubmit(onSubmit)
269
383
  },
270
- /* @__PURE__ */ React6.createElement(
384
+ /* @__PURE__ */ React14.createElement(
271
385
  Controller,
272
386
  {
273
387
  name: "email",
@@ -280,27 +394,27 @@ var LeadGenerator = ({ texts, submitHandler }) => {
280
394
  }
281
395
  },
282
396
  defaultValue: "",
283
- render: ({ field }) => /* @__PURE__ */ React6.createElement(Input, { ...field, type: "email", placeholder: "example@sikka.io" })
397
+ render: ({ field }) => /* @__PURE__ */ React14.createElement(Input, { ...field, type: "email", placeholder: "example@sikka.io" })
284
398
  }
285
399
  ),
286
- /* @__PURE__ */ React6.createElement(Button, { type: "submit", disabled: !formState.isValid }, (_a = texts == null ? void 0 : texts.submit) != null ? _a : "Submit")
400
+ /* @__PURE__ */ React14.createElement(Button, { type: "submit", disabled: !formState.isValid }, (_a = texts == null ? void 0 : texts.submit) != null ? _a : "Submit")
287
401
  )));
288
402
  };
289
403
 
290
404
  // blocks/misc/Announcement.tsx
291
- import React7 from "react";
405
+ import React15 from "react";
292
406
  var Announcement = ({
293
407
  onActionClick,
294
408
  ...props
295
409
  }) => {
296
- return /* @__PURE__ */ React7.createElement(Card, null, /* @__PURE__ */ React7.createElement(
410
+ return /* @__PURE__ */ React15.createElement(Card, null, /* @__PURE__ */ React15.createElement(
297
411
  CardContent,
298
412
  {
299
413
  headless: true,
300
414
  className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-between"
301
415
  },
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(
416
+ /* @__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)),
417
+ /* @__PURE__ */ React15.createElement(
304
418
  Button,
305
419
  {
306
420
  onClick: () => onActionClick(),
@@ -312,15 +426,15 @@ var Announcement = ({
312
426
  };
313
427
 
314
428
  // blocks/misc/NotFound.tsx
315
- import React8 from "react";
429
+ import React16 from "react";
316
430
  var NotFound = ({ texts }) => {
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"))));
431
+ 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"))));
318
432
  };
319
433
 
320
434
  // blocks/misc/NoPermission.tsx
321
- import React9 from "react";
435
+ import React17 from "react";
322
436
  var NoPermission = ({ texts }) => {
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(
437
+ 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(
324
438
  "svg",
325
439
  {
326
440
  stroke: "currentColor",
@@ -330,12 +444,12 @@ var NoPermission = ({ texts }) => {
330
444
  height: "0.35em",
331
445
  width: "0.35em"
332
446
  },
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"))));
447
+ /* @__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" })
448
+ )), /* @__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"))));
335
449
  };
336
450
 
337
451
  // blocks/misc/ContactForm.tsx
338
- import React10 from "react";
452
+ import React18 from "react";
339
453
  import { useForm as useForm2, Controller as Controller2 } from "react-hook-form";
340
454
  import { zodResolver } from "@hookform/resolvers/zod";
341
455
  import * as z from "zod";
@@ -407,7 +521,7 @@ var ContactForm = ({
407
521
  console.log("Form is submitted but onSubmit prop is missing");
408
522
  }
409
523
  };
410
- return /* @__PURE__ */ React10.createElement(
524
+ return /* @__PURE__ */ React18.createElement(
411
525
  Card,
412
526
  {
413
527
  className: cn(
@@ -416,7 +530,7 @@ var ContactForm = ({
416
530
  ),
417
531
  style: cardless ? { boxShadow: "none" } : void 0
418
532
  },
419
- /* @__PURE__ */ React10.createElement(CardContent, { headless: true, className: cardless ? "!hawa-p-0" : "" }, /* @__PURE__ */ React10.createElement(
533
+ /* @__PURE__ */ React18.createElement(CardContent, { headless: true, className: cardless ? "!hawa-p-0" : "" }, /* @__PURE__ */ React18.createElement(
420
534
  "form",
421
535
  {
422
536
  noValidate: true,
@@ -425,7 +539,7 @@ var ContactForm = ({
425
539
  id: formId,
426
540
  autoComplete: formAutoComplete
427
541
  },
428
- /* @__PURE__ */ React10.createElement(
542
+ /* @__PURE__ */ React18.createElement(
429
543
  "div",
430
544
  {
431
545
  className: cn(
@@ -436,14 +550,14 @@ var ContactForm = ({
436
550
  }
437
551
  )
438
552
  },
439
- /* @__PURE__ */ React10.createElement(
553
+ /* @__PURE__ */ React18.createElement(
440
554
  Controller2,
441
555
  {
442
556
  control,
443
557
  name: "name",
444
558
  render: ({ field }) => {
445
559
  var _a2;
446
- return /* @__PURE__ */ React10.createElement(
560
+ return /* @__PURE__ */ React18.createElement(
447
561
  Input,
448
562
  {
449
563
  label: (texts == null ? void 0 : texts.name.label) || "Name",
@@ -456,14 +570,14 @@ var ContactForm = ({
456
570
  }
457
571
  }
458
572
  ),
459
- /* @__PURE__ */ React10.createElement(
573
+ /* @__PURE__ */ React18.createElement(
460
574
  Controller2,
461
575
  {
462
576
  control,
463
577
  name: "email",
464
578
  render: ({ field }) => {
465
579
  var _a2;
466
- return /* @__PURE__ */ React10.createElement(
580
+ return /* @__PURE__ */ React18.createElement(
467
581
  Input,
468
582
  {
469
583
  label: (texts == null ? void 0 : texts.email.label) || "Email",
@@ -479,7 +593,7 @@ var ContactForm = ({
479
593
  ),
480
594
  customFields && customFields.map((customField) => {
481
595
  console.log("custom", customField);
482
- return /* @__PURE__ */ React10.createElement(
596
+ return /* @__PURE__ */ React18.createElement(
483
597
  Controller2,
484
598
  {
485
599
  control,
@@ -489,7 +603,7 @@ var ContactForm = ({
489
603
  switch (type) {
490
604
  case "text":
491
605
  case "number":
492
- return /* @__PURE__ */ React10.createElement(
606
+ return /* @__PURE__ */ React18.createElement(
493
607
  Input,
494
608
  {
495
609
  id: customField.name,
@@ -500,7 +614,7 @@ var ContactForm = ({
500
614
  }
501
615
  );
502
616
  case "select":
503
- return /* @__PURE__ */ React10.createElement(
617
+ return /* @__PURE__ */ React18.createElement(
504
618
  Select,
505
619
  {
506
620
  label,
@@ -510,20 +624,20 @@ var ContactForm = ({
510
624
  }
511
625
  );
512
626
  default:
513
- return /* @__PURE__ */ React10.createElement("div", null, "Unknown type");
627
+ return /* @__PURE__ */ React18.createElement("div", null, "Unknown type");
514
628
  }
515
629
  }
516
630
  }
517
631
  );
518
632
  }),
519
- /* @__PURE__ */ React10.createElement(
633
+ /* @__PURE__ */ React18.createElement(
520
634
  Controller2,
521
635
  {
522
636
  control,
523
637
  name: "message",
524
638
  render: ({ field }) => {
525
639
  var _a2;
526
- return /* @__PURE__ */ React10.createElement(
640
+ return /* @__PURE__ */ React18.createElement(
527
641
  Textarea,
528
642
  {
529
643
  label: (texts == null ? void 0 : texts.message.label) || "Message",
@@ -540,7 +654,7 @@ var ContactForm = ({
540
654
  }
541
655
  }
542
656
  ),
543
- /* @__PURE__ */ React10.createElement(Button, { type: "submit", className: "hawa-w-full" }, (texts == null ? void 0 : texts.submit) || "Submit")
657
+ /* @__PURE__ */ React18.createElement(Button, { type: "submit", className: "hawa-w-full" }, (texts == null ? void 0 : texts.submit) || "Submit")
544
658
  ))
545
659
  );
546
660
  };
@@ -1,4 +1,7 @@
1
1
  "use client";
2
+ import {
3
+ useMeasureDirty
4
+ } from "./chunk-R2SKHHDK.mjs";
2
5
  import {
3
6
  Button,
4
7
  Chip,
@@ -2866,31 +2869,51 @@ var FloatBox = ({
2866
2869
  open,
2867
2870
  side = "bottom",
2868
2871
  sideOffset = 40,
2872
+ align = "center",
2873
+ arrow = true,
2869
2874
  ...props
2870
2875
  }) => {
2871
- let widthStyles = {
2872
- trigger: "var(--radix-popover-trigger-width)",
2873
- default: "auto"
2876
+ let stylesMap = {
2877
+ bottom: {
2878
+ start: { top: sideOffset, insetInlineStart: 0 },
2879
+ center: { top: sideOffset },
2880
+ end: { top: sideOffset, insetInlineEnd: 0 }
2881
+ },
2882
+ top: {
2883
+ start: { bottom: sideOffset, insetInlineStart: 0 },
2884
+ center: { bottom: sideOffset },
2885
+ end: { bottom: sideOffset, insetInlineEnd: 0 }
2886
+ },
2887
+ right: {
2888
+ start: { left: sideOffset, top: -5 },
2889
+ center: { left: sideOffset },
2890
+ end: { left: sideOffset, bottom: 0 }
2891
+ },
2892
+ left: {
2893
+ start: { right: sideOffset, top: 0 },
2894
+ center: { right: sideOffset },
2895
+ end: { right: sideOffset, bottom: 0 }
2896
+ }
2874
2897
  };
2875
- let sideOffsetStyles = {
2876
- bottom: { top: sideOffset },
2877
- top: { bottom: sideOffset },
2878
- right: { left: sideOffset },
2879
- left: { right: sideOffset }
2898
+ const arrowDirection = {
2899
+ top: "hawa-arrow-default-bottom",
2900
+ bottom: "hawa-arrow-default-top",
2901
+ right: "hawa-arrow-default-left",
2902
+ left: "hawa-arrow-default-right"
2880
2903
  };
2881
2904
  return /* @__PURE__ */ React13.createElement(
2882
2905
  "div",
2883
2906
  {
2884
2907
  className: cn(
2885
- "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",
2886
- sideOffsetStyles[side],
2908
+ "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-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 hawa-bg-popover",
2887
2909
  className
2888
2910
  ),
2889
- style: { ...sideOffsetStyles[side] },
2911
+ style: { ...stylesMap[side][align] },
2890
2912
  "data-side": side,
2891
2913
  "data-floatbox-state": open ? "open" : "closed"
2892
2914
  },
2893
- props.children
2915
+ arrow && /* @__PURE__ */ React13.createElement("div", { className: cn("hawa-bg-red-500", arrowDirection[side]) }),
2916
+ /* @__PURE__ */ React13.createElement("span", null, props.children)
2894
2917
  );
2895
2918
  };
2896
2919
 
@@ -2984,10 +3007,12 @@ var TabsList = React14.forwardRef(({ className, ...props }, ref) => {
2984
3007
  });
2985
3008
  var TabsTrigger = React14.forwardRef(({ className, chipProps, ...props }, ref) => {
2986
3009
  const { orientation, variant } = React14.useContext(TabsContext);
3010
+ const tabTriggerRef = React14.useRef(null);
3011
+ const { width } = useMeasureDirty(tabTriggerRef);
2987
3012
  return /* @__PURE__ */ React14.createElement(
2988
3013
  TabsPrimitive.Trigger,
2989
3014
  {
2990
- ref,
3015
+ ref: tabTriggerRef,
2991
3016
  className: cn(
2992
3017
  tabsTriggerVariant({ variant, orientation }),
2993
3018
  "hawa-relative",
@@ -2997,7 +3022,16 @@ var TabsTrigger = React14.forwardRef(({ className, chipProps, ...props }, ref) =
2997
3022
  },
2998
3023
  props.children,
2999
3024
  chipProps && /* @__PURE__ */ React14.createElement(Chip, { ...chipProps }),
3000
- /* @__PURE__ */ React14.createElement(FloatBox, { open: props.showPopover }, props.popoverContent)
3025
+ /* @__PURE__ */ React14.createElement(
3026
+ FloatBox,
3027
+ {
3028
+ align: orientation === "vertical" ? "start" : "start",
3029
+ side: orientation === "vertical" ? "right" : "bottom",
3030
+ sideOffset: orientation === "vertical" ? width + 30 : 45,
3031
+ open: props.showPopover
3032
+ },
3033
+ props.popoverContent
3034
+ )
3001
3035
  );
3002
3036
  });
3003
3037
  var TabsContent = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React14.createElement(