@sikka/hawa 0.30.26-next → 0.30.27-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.
- package/dist/blocks/index.js +310 -204
- package/dist/blocks/index.mjs +3 -2
- package/dist/blocks/misc/index.js +254 -148
- package/dist/blocks/misc/index.mjs +175 -69
- package/dist/chunk-R2SKHHDK.mjs +411 -0
- package/dist/{chunk-QDRFTC7W.mjs → chunk-SW7UK35T.mjs} +39 -13
- package/dist/{chunk-H7ZADF2Z.mjs → chunk-UDCDD66A.mjs} +8 -0
- package/dist/elements/index.js +389 -288
- package/dist/elements/index.mjs +5 -5
- package/dist/floatBox/index.d.mts +2 -0
- package/dist/floatBox/index.d.ts +2 -0
- package/dist/floatBox/index.js +23 -11
- package/dist/floatBox/index.js.map +1 -1
- package/dist/floatBox/index.mjs +23 -11
- package/dist/floatBox/index.mjs.map +1 -1
- package/dist/hooks/index.d.mts +12 -2
- package/dist/hooks/index.d.ts +12 -2
- package/dist/hooks/index.js +36 -0
- package/dist/hooks/index.mjs +16 -340
- package/dist/index.d.mts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +4233 -4174
- package/dist/index.mjs +1481 -1423
- package/dist/layout/index.mjs +3 -4
- package/dist/tabs/index.js +137 -31
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +137 -31
- package/dist/tabs/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-4OOSUQZG.mjs +0 -12
- package/dist/chunk-57SB6MBG.mjs +0 -31
@@ -24,41 +24,136 @@ import {
|
|
24
24
|
} from "../../chunk-ZGNBKYX7.mjs";
|
25
25
|
|
26
26
|
// blocks/misc/LegalTexts.tsx
|
27
|
-
import
|
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
|
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",
|
41
125
|
...props
|
42
126
|
}) => {
|
43
|
-
let
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
top: {
|
50
|
-
|
51
|
-
|
127
|
+
let stylesMap = {
|
128
|
+
bottom: {
|
129
|
+
start: { top: sideOffset, insetInlineStart: 0 },
|
130
|
+
center: { top: sideOffset },
|
131
|
+
end: { top: sideOffset, insetInlineEnd: 0 }
|
132
|
+
},
|
133
|
+
top: {
|
134
|
+
start: { bottom: sideOffset, insetInlineStart: 0 },
|
135
|
+
center: { bottom: sideOffset },
|
136
|
+
end: { bottom: sideOffset, insetInlineEnd: 0 }
|
137
|
+
},
|
138
|
+
right: {
|
139
|
+
start: { left: sideOffset, top: -5 },
|
140
|
+
center: { left: sideOffset },
|
141
|
+
end: { left: sideOffset, bottom: 0 }
|
142
|
+
},
|
143
|
+
left: {
|
144
|
+
start: { right: sideOffset, top: 0 },
|
145
|
+
center: { right: sideOffset },
|
146
|
+
end: { right: sideOffset, bottom: 0 }
|
147
|
+
}
|
52
148
|
};
|
53
|
-
return /* @__PURE__ */
|
149
|
+
return /* @__PURE__ */ React9.createElement(
|
54
150
|
"div",
|
55
151
|
{
|
56
152
|
className: cn(
|
57
153
|
"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
154
|
className
|
60
155
|
),
|
61
|
-
style: { ...
|
156
|
+
style: { ...stylesMap[side][align] },
|
62
157
|
"data-side": side,
|
63
158
|
"data-floatbox-state": open ? "open" : "closed"
|
64
159
|
},
|
@@ -125,8 +220,8 @@ var tabsTriggerVariant = tv({
|
|
125
220
|
],
|
126
221
|
defaultVariants: { variant: "default", orientation: "horizontal" }
|
127
222
|
});
|
128
|
-
var TabsContext =
|
129
|
-
var Tabs =
|
223
|
+
var TabsContext = React10.createContext({ orientation: "horizontal", variant: "default" });
|
224
|
+
var Tabs = React10.forwardRef(({ className, orientation, variant = "default", ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
130
225
|
TabsPrimitive.Root,
|
131
226
|
{
|
132
227
|
ref,
|
@@ -137,11 +232,11 @@ var Tabs = React2.forwardRef(({ className, orientation, variant = "default", ...
|
|
137
232
|
),
|
138
233
|
...props
|
139
234
|
},
|
140
|
-
/* @__PURE__ */
|
235
|
+
/* @__PURE__ */ React10.createElement(TabsContext.Provider, { value: { orientation, variant } }, props.children)
|
141
236
|
));
|
142
|
-
var TabsList =
|
143
|
-
const { orientation, variant } =
|
144
|
-
return /* @__PURE__ */
|
237
|
+
var TabsList = React10.forwardRef(({ className, ...props }, ref) => {
|
238
|
+
const { orientation, variant } = React10.useContext(TabsContext);
|
239
|
+
return /* @__PURE__ */ React10.createElement(
|
145
240
|
TabsPrimitive.List,
|
146
241
|
{
|
147
242
|
ref,
|
@@ -154,12 +249,14 @@ var TabsList = React2.forwardRef(({ className, ...props }, ref) => {
|
|
154
249
|
}
|
155
250
|
);
|
156
251
|
});
|
157
|
-
var TabsTrigger =
|
158
|
-
const { orientation, variant } =
|
159
|
-
|
252
|
+
var TabsTrigger = React10.forwardRef(({ className, chipProps, ...props }, ref) => {
|
253
|
+
const { orientation, variant } = React10.useContext(TabsContext);
|
254
|
+
const tabTriggerRef = React10.useRef(null);
|
255
|
+
const { width } = useMeasureDirty(tabTriggerRef);
|
256
|
+
return /* @__PURE__ */ React10.createElement(
|
160
257
|
TabsPrimitive.Trigger,
|
161
258
|
{
|
162
|
-
ref,
|
259
|
+
ref: tabTriggerRef,
|
163
260
|
className: cn(
|
164
261
|
tabsTriggerVariant({ variant, orientation }),
|
165
262
|
"hawa-relative",
|
@@ -168,11 +265,20 @@ var TabsTrigger = React2.forwardRef(({ className, chipProps, ...props }, ref) =>
|
|
168
265
|
...props
|
169
266
|
},
|
170
267
|
props.children,
|
171
|
-
chipProps && /* @__PURE__ */
|
172
|
-
/* @__PURE__ */
|
268
|
+
chipProps && /* @__PURE__ */ React10.createElement(Chip, { ...chipProps }),
|
269
|
+
/* @__PURE__ */ React10.createElement(
|
270
|
+
FloatBox,
|
271
|
+
{
|
272
|
+
align: orientation === "vertical" ? "start" : "start",
|
273
|
+
side: orientation === "vertical" ? "right" : "bottom",
|
274
|
+
sideOffset: orientation === "vertical" ? width + 30 : 45,
|
275
|
+
open: props.showPopover
|
276
|
+
},
|
277
|
+
props.popoverContent
|
278
|
+
)
|
173
279
|
);
|
174
280
|
});
|
175
|
-
var TabsContent =
|
281
|
+
var TabsContent = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
176
282
|
TabsPrimitive.Content,
|
177
283
|
{
|
178
284
|
ref,
|
@@ -190,7 +296,7 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
190
296
|
|
191
297
|
// blocks/misc/LegalTexts.tsx
|
192
298
|
var LegalTexts = ({ tabs, ...props }) => {
|
193
|
-
return /* @__PURE__ */
|
299
|
+
return /* @__PURE__ */ React11.createElement(
|
194
300
|
Tabs,
|
195
301
|
{
|
196
302
|
value: props.activeTab,
|
@@ -198,8 +304,8 @@ var LegalTexts = ({ tabs, ...props }) => {
|
|
198
304
|
defaultValue: props.defaultTab || tabs[0].value,
|
199
305
|
dir: props.direction
|
200
306
|
},
|
201
|
-
/* @__PURE__ */
|
202
|
-
tabs.map((tab, index) => /* @__PURE__ */
|
307
|
+
/* @__PURE__ */ React11.createElement(TabsList, { className: "hawa-w-full" }, tabs.map((tab, index) => /* @__PURE__ */ React11.createElement(TabsTrigger, { key: index, value: tab.value }, tab.title))),
|
308
|
+
tabs.map((tab, index) => /* @__PURE__ */ React11.createElement(TabsContent, { key: index, value: tab.value }, /* @__PURE__ */ React11.createElement(
|
203
309
|
ScrollArea,
|
204
310
|
{
|
205
311
|
className: cn(
|
@@ -213,9 +319,9 @@ var LegalTexts = ({ tabs, ...props }) => {
|
|
213
319
|
};
|
214
320
|
|
215
321
|
// blocks/misc/EmptyState.tsx
|
216
|
-
import
|
322
|
+
import React12 from "react";
|
217
323
|
var EmptyState = ({ texts, onActionClick }) => {
|
218
|
-
return /* @__PURE__ */
|
324
|
+
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
325
|
"svg",
|
220
326
|
{
|
221
327
|
stroke: "currentColor",
|
@@ -225,30 +331,30 @@ var EmptyState = ({ texts, onActionClick }) => {
|
|
225
331
|
height: "0.35em",
|
226
332
|
width: "0.35em"
|
227
333
|
},
|
228
|
-
/* @__PURE__ */
|
229
|
-
)), /* @__PURE__ */
|
334
|
+
/* @__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" })
|
335
|
+
)), /* @__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
336
|
};
|
231
337
|
|
232
338
|
// blocks/misc/Testimonial.tsx
|
233
|
-
import
|
339
|
+
import React13 from "react";
|
234
340
|
var Testimonial = () => {
|
235
|
-
return /* @__PURE__ */
|
341
|
+
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
342
|
"path",
|
237
343
|
{
|
238
344
|
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
345
|
fill: "#FFFFFF"
|
240
346
|
}
|
241
|
-
), /* @__PURE__ */
|
347
|
+
), /* @__PURE__ */ React13.createElement(
|
242
348
|
"path",
|
243
349
|
{
|
244
350
|
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
351
|
fill: "#FFFFFF"
|
246
352
|
}
|
247
|
-
)), /* @__PURE__ */
|
353
|
+
)), /* @__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
354
|
};
|
249
355
|
|
250
356
|
// blocks/misc/LeadGenerator.tsx
|
251
|
-
import
|
357
|
+
import React14 from "react";
|
252
358
|
import { useForm, Controller } from "react-hook-form";
|
253
359
|
var LeadGenerator = ({ texts, submitHandler }) => {
|
254
360
|
var _a;
|
@@ -260,14 +366,14 @@ var LeadGenerator = ({ texts, submitHandler }) => {
|
|
260
366
|
console.log("handleNewsletterSub props was not provided");
|
261
367
|
}
|
262
368
|
};
|
263
|
-
return /* @__PURE__ */
|
369
|
+
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
370
|
"form",
|
265
371
|
{
|
266
372
|
noValidate: true,
|
267
373
|
className: "hawa-flex hawa-flex-row hawa-gap-2",
|
268
374
|
onSubmit: handleSubmit(onSubmit)
|
269
375
|
},
|
270
|
-
/* @__PURE__ */
|
376
|
+
/* @__PURE__ */ React14.createElement(
|
271
377
|
Controller,
|
272
378
|
{
|
273
379
|
name: "email",
|
@@ -280,27 +386,27 @@ var LeadGenerator = ({ texts, submitHandler }) => {
|
|
280
386
|
}
|
281
387
|
},
|
282
388
|
defaultValue: "",
|
283
|
-
render: ({ field }) => /* @__PURE__ */
|
389
|
+
render: ({ field }) => /* @__PURE__ */ React14.createElement(Input, { ...field, type: "email", placeholder: "example@sikka.io" })
|
284
390
|
}
|
285
391
|
),
|
286
|
-
/* @__PURE__ */
|
392
|
+
/* @__PURE__ */ React14.createElement(Button, { type: "submit", disabled: !formState.isValid }, (_a = texts == null ? void 0 : texts.submit) != null ? _a : "Submit")
|
287
393
|
)));
|
288
394
|
};
|
289
395
|
|
290
396
|
// blocks/misc/Announcement.tsx
|
291
|
-
import
|
397
|
+
import React15 from "react";
|
292
398
|
var Announcement = ({
|
293
399
|
onActionClick,
|
294
400
|
...props
|
295
401
|
}) => {
|
296
|
-
return /* @__PURE__ */
|
402
|
+
return /* @__PURE__ */ React15.createElement(Card, null, /* @__PURE__ */ React15.createElement(
|
297
403
|
CardContent,
|
298
404
|
{
|
299
405
|
headless: true,
|
300
406
|
className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-between"
|
301
407
|
},
|
302
|
-
/* @__PURE__ */
|
303
|
-
/* @__PURE__ */
|
408
|
+
/* @__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)),
|
409
|
+
/* @__PURE__ */ React15.createElement(
|
304
410
|
Button,
|
305
411
|
{
|
306
412
|
onClick: () => onActionClick(),
|
@@ -312,15 +418,15 @@ var Announcement = ({
|
|
312
418
|
};
|
313
419
|
|
314
420
|
// blocks/misc/NotFound.tsx
|
315
|
-
import
|
421
|
+
import React16 from "react";
|
316
422
|
var NotFound = ({ texts }) => {
|
317
|
-
return /* @__PURE__ */
|
423
|
+
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
424
|
};
|
319
425
|
|
320
426
|
// blocks/misc/NoPermission.tsx
|
321
|
-
import
|
427
|
+
import React17 from "react";
|
322
428
|
var NoPermission = ({ texts }) => {
|
323
|
-
return /* @__PURE__ */
|
429
|
+
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
430
|
"svg",
|
325
431
|
{
|
326
432
|
stroke: "currentColor",
|
@@ -330,12 +436,12 @@ var NoPermission = ({ texts }) => {
|
|
330
436
|
height: "0.35em",
|
331
437
|
width: "0.35em"
|
332
438
|
},
|
333
|
-
/* @__PURE__ */
|
334
|
-
)), /* @__PURE__ */
|
439
|
+
/* @__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" })
|
440
|
+
)), /* @__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
441
|
};
|
336
442
|
|
337
443
|
// blocks/misc/ContactForm.tsx
|
338
|
-
import
|
444
|
+
import React18 from "react";
|
339
445
|
import { useForm as useForm2, Controller as Controller2 } from "react-hook-form";
|
340
446
|
import { zodResolver } from "@hookform/resolvers/zod";
|
341
447
|
import * as z from "zod";
|
@@ -407,7 +513,7 @@ var ContactForm = ({
|
|
407
513
|
console.log("Form is submitted but onSubmit prop is missing");
|
408
514
|
}
|
409
515
|
};
|
410
|
-
return /* @__PURE__ */
|
516
|
+
return /* @__PURE__ */ React18.createElement(
|
411
517
|
Card,
|
412
518
|
{
|
413
519
|
className: cn(
|
@@ -416,7 +522,7 @@ var ContactForm = ({
|
|
416
522
|
),
|
417
523
|
style: cardless ? { boxShadow: "none" } : void 0
|
418
524
|
},
|
419
|
-
/* @__PURE__ */
|
525
|
+
/* @__PURE__ */ React18.createElement(CardContent, { headless: true, className: cardless ? "!hawa-p-0" : "" }, /* @__PURE__ */ React18.createElement(
|
420
526
|
"form",
|
421
527
|
{
|
422
528
|
noValidate: true,
|
@@ -425,7 +531,7 @@ var ContactForm = ({
|
|
425
531
|
id: formId,
|
426
532
|
autoComplete: formAutoComplete
|
427
533
|
},
|
428
|
-
/* @__PURE__ */
|
534
|
+
/* @__PURE__ */ React18.createElement(
|
429
535
|
"div",
|
430
536
|
{
|
431
537
|
className: cn(
|
@@ -436,14 +542,14 @@ var ContactForm = ({
|
|
436
542
|
}
|
437
543
|
)
|
438
544
|
},
|
439
|
-
/* @__PURE__ */
|
545
|
+
/* @__PURE__ */ React18.createElement(
|
440
546
|
Controller2,
|
441
547
|
{
|
442
548
|
control,
|
443
549
|
name: "name",
|
444
550
|
render: ({ field }) => {
|
445
551
|
var _a2;
|
446
|
-
return /* @__PURE__ */
|
552
|
+
return /* @__PURE__ */ React18.createElement(
|
447
553
|
Input,
|
448
554
|
{
|
449
555
|
label: (texts == null ? void 0 : texts.name.label) || "Name",
|
@@ -456,14 +562,14 @@ var ContactForm = ({
|
|
456
562
|
}
|
457
563
|
}
|
458
564
|
),
|
459
|
-
/* @__PURE__ */
|
565
|
+
/* @__PURE__ */ React18.createElement(
|
460
566
|
Controller2,
|
461
567
|
{
|
462
568
|
control,
|
463
569
|
name: "email",
|
464
570
|
render: ({ field }) => {
|
465
571
|
var _a2;
|
466
|
-
return /* @__PURE__ */
|
572
|
+
return /* @__PURE__ */ React18.createElement(
|
467
573
|
Input,
|
468
574
|
{
|
469
575
|
label: (texts == null ? void 0 : texts.email.label) || "Email",
|
@@ -479,7 +585,7 @@ var ContactForm = ({
|
|
479
585
|
),
|
480
586
|
customFields && customFields.map((customField) => {
|
481
587
|
console.log("custom", customField);
|
482
|
-
return /* @__PURE__ */
|
588
|
+
return /* @__PURE__ */ React18.createElement(
|
483
589
|
Controller2,
|
484
590
|
{
|
485
591
|
control,
|
@@ -489,7 +595,7 @@ var ContactForm = ({
|
|
489
595
|
switch (type) {
|
490
596
|
case "text":
|
491
597
|
case "number":
|
492
|
-
return /* @__PURE__ */
|
598
|
+
return /* @__PURE__ */ React18.createElement(
|
493
599
|
Input,
|
494
600
|
{
|
495
601
|
id: customField.name,
|
@@ -500,7 +606,7 @@ var ContactForm = ({
|
|
500
606
|
}
|
501
607
|
);
|
502
608
|
case "select":
|
503
|
-
return /* @__PURE__ */
|
609
|
+
return /* @__PURE__ */ React18.createElement(
|
504
610
|
Select,
|
505
611
|
{
|
506
612
|
label,
|
@@ -510,20 +616,20 @@ var ContactForm = ({
|
|
510
616
|
}
|
511
617
|
);
|
512
618
|
default:
|
513
|
-
return /* @__PURE__ */
|
619
|
+
return /* @__PURE__ */ React18.createElement("div", null, "Unknown type");
|
514
620
|
}
|
515
621
|
}
|
516
622
|
}
|
517
623
|
);
|
518
624
|
}),
|
519
|
-
/* @__PURE__ */
|
625
|
+
/* @__PURE__ */ React18.createElement(
|
520
626
|
Controller2,
|
521
627
|
{
|
522
628
|
control,
|
523
629
|
name: "message",
|
524
630
|
render: ({ field }) => {
|
525
631
|
var _a2;
|
526
|
-
return /* @__PURE__ */
|
632
|
+
return /* @__PURE__ */ React18.createElement(
|
527
633
|
Textarea,
|
528
634
|
{
|
529
635
|
label: (texts == null ? void 0 : texts.message.label) || "Message",
|
@@ -540,7 +646,7 @@ var ContactForm = ({
|
|
540
646
|
}
|
541
647
|
}
|
542
648
|
),
|
543
|
-
/* @__PURE__ */
|
649
|
+
/* @__PURE__ */ React18.createElement(Button, { type: "submit", className: "hawa-w-full" }, (texts == null ? void 0 : texts.submit) || "Submit")
|
544
650
|
))
|
545
651
|
);
|
546
652
|
};
|