@sikka/hawa 0.36.2-next → 0.37.1-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/appLayout/index.js +1 -1
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +1 -1
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/blocks/auth/index.js +24 -25
- package/dist/blocks/auth/index.mjs +4 -4
- package/dist/blocks/feedback/index.js +24 -25
- package/dist/blocks/feedback/index.mjs +5 -5
- package/dist/blocks/index.js +308 -192
- package/dist/blocks/index.mjs +3 -3
- package/dist/blocks/misc/index.js +270 -154
- package/dist/blocks/misc/index.mjs +53 -19
- package/dist/blocks/pricing/index.js +107 -22
- package/dist/blocks/pricing/index.mjs +4 -4
- package/dist/card/index.d.mts +3 -1
- package/dist/card/index.d.ts +3 -1
- package/dist/card/index.js +13 -11
- package/dist/card/index.js.map +1 -1
- package/dist/card/index.mjs +13 -11
- package/dist/card/index.mjs.map +1 -1
- package/dist/{chunk-WABHQMUI.mjs → chunk-BPHQFAWM.mjs} +1 -1
- package/dist/{chunk-MVKP55SZ.mjs → chunk-BTDR3VAG.mjs} +1 -1
- package/dist/{chunk-7L2JUNG2.mjs → chunk-DS3AACQJ.mjs} +1 -1
- package/dist/{chunk-BXBSZD5X.mjs → chunk-MDHDHEPZ.mjs} +1 -1
- package/dist/{chunk-6QIOEUE2.mjs → chunk-ODOCZAWC.mjs} +1 -1
- package/dist/{chunk-YP2CCKZG.mjs → chunk-PXGL7ZXQ.mjs} +13 -11
- package/dist/{chunk-HLYAX77R.mjs → chunk-QXH7ZDMN.mjs} +12 -15
- package/dist/{chunk-T33FXOHA.mjs → chunk-QYWOI3DO.mjs} +152 -41
- package/dist/{chunk-NNPNQK6F.mjs → chunk-RNFJAEEU.mjs} +13 -11
- package/dist/{chunk-OPYDG34F.mjs → chunk-ZBUBNKF6.mjs} +93 -1
- package/dist/{chunk-CJ57JBYA.mjs → chunk-ZTUWU652.mjs} +95 -12
- package/dist/combobox/index.d.mts +1 -4
- package/dist/combobox/index.d.ts +1 -4
- package/dist/combobox/index.js +2 -1
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs +2 -1
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/command/index.d.mts +4 -36
- package/dist/command/index.d.ts +4 -36
- package/dist/command/index.js +43 -5
- package/dist/command/index.js.map +1 -1
- package/dist/command/index.mjs +39 -3
- package/dist/command/index.mjs.map +1 -1
- package/dist/destroyableCard/index.js +13 -11
- package/dist/destroyableCard/index.js.map +1 -1
- package/dist/destroyableCard/index.mjs +13 -11
- package/dist/destroyableCard/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +31 -3
- package/dist/elements/index.d.ts +31 -3
- package/dist/elements/index.js +450 -295
- package/dist/elements/index.mjs +43 -6
- package/dist/hooks/index.d.mts +25 -1
- package/dist/hooks/index.d.ts +25 -1
- package/dist/hooks/index.js +96 -0
- package/dist/hooks/index.mjs +9 -1
- package/dist/index-e_Ob_SnB.d.mts +63 -0
- package/dist/index-e_Ob_SnB.d.ts +63 -0
- package/dist/index.css +20 -3
- package/dist/index.d.mts +55 -3
- package/dist/index.d.ts +55 -3
- package/dist/index.js +966 -718
- package/dist/index.mjs +494 -252
- package/dist/layout/index.js +14 -12
- package/dist/layout/index.mjs +3 -3
- package/dist/phoneInput/index.js +11 -14
- package/dist/phoneInput/index.js.map +1 -1
- package/dist/phoneInput/index.mjs +11 -14
- package/dist/phoneInput/index.mjs.map +1 -1
- package/dist/scrollArea/index.js +94 -11
- package/dist/scrollArea/index.js.map +1 -1
- package/dist/scrollArea/index.mjs +94 -11
- package/dist/scrollArea/index.mjs.map +1 -1
- package/dist/select/index.js +11 -14
- package/dist/select/index.js.map +1 -1
- package/dist/select/index.mjs +11 -14
- package/dist/select/index.mjs.map +1 -1
- package/dist/stats/index.js +13 -11
- package/dist/stats/index.js.map +1 -1
- package/dist/stats/index.mjs +13 -11
- package/dist/stats/index.mjs.map +1 -1
- package/dist/tabs/index.d.mts +3 -1
- package/dist/tabs/index.d.ts +3 -1
- package/dist/tabs/index.js +189 -32
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +184 -27
- package/dist/tabs/index.mjs.map +1 -1
- package/package.json +1 -1
@@ -43,7 +43,7 @@ __export(misc_exports, {
|
|
43
43
|
module.exports = __toCommonJS(misc_exports);
|
44
44
|
|
45
45
|
// blocks/misc/LegalTexts.tsx
|
46
|
-
var
|
46
|
+
var import_react19 = __toESM(require("react"));
|
47
47
|
|
48
48
|
// elements/scrollArea/ScrollArea.tsx
|
49
49
|
var React = __toESM(require("react"));
|
@@ -57,17 +57,100 @@ function cn(...inputs) {
|
|
57
57
|
}
|
58
58
|
|
59
59
|
// elements/scrollArea/ScrollArea.tsx
|
60
|
-
var ScrollArea = React.forwardRef(({ className, children, orientation = "vertical", ...props }, ref) =>
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
)
|
60
|
+
var ScrollArea = React.forwardRef(({ className, children, orientation = "vertical", ...props }, ref) => {
|
61
|
+
const scrollAreaRef = React.useRef(null);
|
62
|
+
const isDragging = React.useRef(false);
|
63
|
+
const startPos = React.useRef({ x: 0, y: 0 });
|
64
|
+
const scrollPos = React.useRef({ top: 0, left: 0 });
|
65
|
+
const [showLeftFade, setShowLeftFade] = React.useState(false);
|
66
|
+
const [showRightFade, setShowRightFade] = React.useState(false);
|
67
|
+
const checkOverflow = () => {
|
68
|
+
if (scrollAreaRef.current) {
|
69
|
+
const { scrollLeft, scrollWidth, clientWidth } = scrollAreaRef.current;
|
70
|
+
setShowLeftFade(scrollLeft > 0);
|
71
|
+
setShowRightFade(scrollLeft + clientWidth < scrollWidth);
|
72
|
+
}
|
73
|
+
};
|
74
|
+
const onMouseDown = (e) => {
|
75
|
+
isDragging.current = true;
|
76
|
+
startPos.current = { x: e.clientX, y: e.clientY };
|
77
|
+
if (scrollAreaRef.current) {
|
78
|
+
scrollPos.current = {
|
79
|
+
top: scrollAreaRef.current.scrollTop,
|
80
|
+
left: scrollAreaRef.current.scrollLeft
|
81
|
+
};
|
82
|
+
}
|
83
|
+
document.addEventListener("mousemove", onMouseMove);
|
84
|
+
document.addEventListener("mouseup", onMouseUp);
|
85
|
+
};
|
86
|
+
const onMouseMove = (e) => {
|
87
|
+
if (!isDragging.current || !scrollAreaRef.current)
|
88
|
+
return;
|
89
|
+
const dx = e.clientX - startPos.current.x;
|
90
|
+
const dy = e.clientY - startPos.current.y;
|
91
|
+
if (orientation === "vertical") {
|
92
|
+
scrollAreaRef.current.scrollTop = scrollPos.current.top - dy;
|
93
|
+
} else {
|
94
|
+
scrollAreaRef.current.scrollLeft = scrollPos.current.left - dx;
|
95
|
+
checkOverflow();
|
96
|
+
}
|
97
|
+
};
|
98
|
+
const onMouseUp = () => {
|
99
|
+
isDragging.current = false;
|
100
|
+
document.removeEventListener("mousemove", onMouseMove);
|
101
|
+
document.removeEventListener("mouseup", onMouseUp);
|
102
|
+
};
|
103
|
+
React.useEffect(() => {
|
104
|
+
checkOverflow();
|
105
|
+
if (scrollAreaRef.current) {
|
106
|
+
scrollAreaRef.current.addEventListener("scroll", checkOverflow);
|
107
|
+
window.addEventListener("resize", checkOverflow);
|
108
|
+
}
|
109
|
+
return () => {
|
110
|
+
if (scrollAreaRef.current) {
|
111
|
+
scrollAreaRef.current.removeEventListener("scroll", checkOverflow);
|
112
|
+
}
|
113
|
+
window.removeEventListener("resize", checkOverflow);
|
114
|
+
};
|
115
|
+
}, []);
|
116
|
+
return /* @__PURE__ */ React.createElement(
|
117
|
+
ScrollAreaPrimitive.Root,
|
118
|
+
{
|
119
|
+
ref,
|
120
|
+
className: cn("hawa-relative hawa-overflow-hidden", className),
|
121
|
+
...props
|
122
|
+
},
|
123
|
+
/* @__PURE__ */ React.createElement(
|
124
|
+
"div",
|
125
|
+
{
|
126
|
+
className: cn(
|
127
|
+
"hawa-pointer-events-none hawa-absolute hawa-bg-background/ hawa-h-full hawa-w-[50px] hawa-z-10 hawa-start-0 hawa-mask-fade-right",
|
128
|
+
showLeftFade ? "hawa-block" : "hawa-hidden"
|
129
|
+
)
|
130
|
+
}
|
131
|
+
),
|
132
|
+
/* @__PURE__ */ React.createElement(
|
133
|
+
"div",
|
134
|
+
{
|
135
|
+
className: cn(
|
136
|
+
"hawa-pointer-events-none hawa-absolute hawa-bg-background/ hawa-mask-fade-left hawa-end-0 hawa-h-full hawa-w-[50px] hawa-z-10 ",
|
137
|
+
showRightFade ? "hawa-block" : "hawa-hidden"
|
138
|
+
)
|
139
|
+
}
|
140
|
+
),
|
141
|
+
/* @__PURE__ */ React.createElement(
|
142
|
+
ScrollAreaPrimitive.Viewport,
|
143
|
+
{
|
144
|
+
ref: scrollAreaRef,
|
145
|
+
className: "hawa-h-full hawa-w-full hawa-rounded-[inherit]",
|
146
|
+
onMouseDown
|
147
|
+
},
|
148
|
+
children
|
149
|
+
),
|
150
|
+
/* @__PURE__ */ React.createElement(ScrollBar, { orientation }),
|
151
|
+
/* @__PURE__ */ React.createElement(ScrollAreaPrimitive.Corner, null)
|
152
|
+
);
|
153
|
+
});
|
71
154
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
72
155
|
var ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React.createElement(
|
73
156
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
@@ -181,13 +264,16 @@ var useMeasureDirty = (ref) => {
|
|
181
264
|
// hooks/useClickOutside.ts
|
182
265
|
var import_react16 = require("react");
|
183
266
|
|
267
|
+
// hooks/useShortcuts.ts
|
268
|
+
var import_react17 = require("react");
|
269
|
+
|
184
270
|
// elements/tabs/Tabs.tsx
|
185
271
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"));
|
186
272
|
var import_tailwind_variants = require("tailwind-variants");
|
187
273
|
|
188
274
|
// elements/chip/Chip.tsx
|
189
|
-
var
|
190
|
-
var Chip =
|
275
|
+
var import_react18 = __toESM(require("react"));
|
276
|
+
var Chip = import_react18.default.forwardRef(
|
191
277
|
({
|
192
278
|
label,
|
193
279
|
size = "normal",
|
@@ -231,7 +317,7 @@ var Chip = import_react17.default.forwardRef(
|
|
231
317
|
oceanic: "hawa-text-white dark:hawa-text-black hawa-bg-gradient-to-bl hawa-from-green-300 hawa-via-blue-500 hawa-to-purple-600"
|
232
318
|
};
|
233
319
|
if (label) {
|
234
|
-
return /* @__PURE__ */
|
320
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
235
321
|
"span",
|
236
322
|
{
|
237
323
|
...rest,
|
@@ -243,7 +329,7 @@ var Chip = import_react17.default.forwardRef(
|
|
243
329
|
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
244
330
|
)
|
245
331
|
},
|
246
|
-
dot && /* @__PURE__ */
|
332
|
+
dot && /* @__PURE__ */ import_react18.default.createElement(
|
247
333
|
"span",
|
248
334
|
{
|
249
335
|
className: cn(dotStyles[size], dotStatusStyles[dotStatus])
|
@@ -253,7 +339,7 @@ var Chip = import_react17.default.forwardRef(
|
|
253
339
|
label
|
254
340
|
);
|
255
341
|
} else {
|
256
|
-
return /* @__PURE__ */
|
342
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
257
343
|
"span",
|
258
344
|
{
|
259
345
|
...rest,
|
@@ -328,9 +414,9 @@ var tabsListVariant = (0, import_tailwind_variants.tv)({
|
|
328
414
|
base: "",
|
329
415
|
variants: {
|
330
416
|
variant: {
|
331
|
-
default: "hawa-flex hawa-w-fit hawa-
|
332
|
-
underlined: "hawa-flex hawa-w-fit hawa-
|
333
|
-
underlined_tabs: "hawa-flex hawa-w-fit hawa-
|
417
|
+
default: "hawa-flex hawa-w-fit hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-border hawa-bg-muted hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10",
|
418
|
+
underlined: "hawa-flex hawa-w-fit hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10",
|
419
|
+
underlined_tabs: "hawa-flex hawa-w-fit hawa-items-center hawa-justify-start hawa-gap-1 hawa-text-muted-foreground"
|
334
420
|
},
|
335
421
|
orientation: { horizontal: "", vertical: "" }
|
336
422
|
},
|
@@ -398,18 +484,49 @@ var Tabs = React12.forwardRef(({ className, orientation, variant = "default", ..
|
|
398
484
|
));
|
399
485
|
var TabsList = React12.forwardRef(({ className, ...props }, ref) => {
|
400
486
|
const { orientation, variant } = React12.useContext(TabsContext);
|
401
|
-
|
402
|
-
|
403
|
-
{
|
404
|
-
ref,
|
405
|
-
className: cn(
|
406
|
-
tabsListVariant({ variant, orientation }),
|
407
|
-
orientation === "vertical" ? "hawa-flex-col" : "hawa-flex-row",
|
408
|
-
className
|
409
|
-
),
|
410
|
-
...props
|
411
|
-
}
|
487
|
+
const [size, setSize] = React12.useState(
|
488
|
+
typeof window !== "undefined" && window.innerWidth || 1200
|
412
489
|
);
|
490
|
+
React12.useEffect(() => {
|
491
|
+
if (typeof window !== "undefined") {
|
492
|
+
const resize = () => {
|
493
|
+
setSize(window.innerWidth);
|
494
|
+
};
|
495
|
+
resize();
|
496
|
+
window.addEventListener("resize", resize);
|
497
|
+
return () => {
|
498
|
+
window.removeEventListener("resize", resize);
|
499
|
+
};
|
500
|
+
}
|
501
|
+
}, []);
|
502
|
+
if ((props.scrollable || size < 768) && orientation === "horizontal") {
|
503
|
+
return /* @__PURE__ */ React12.createElement(ScrollArea, { orientation: "horizontal" }, /* @__PURE__ */ React12.createElement(
|
504
|
+
TabsPrimitive.List,
|
505
|
+
{
|
506
|
+
ref,
|
507
|
+
className: cn(
|
508
|
+
tabsListVariant({ variant, orientation }),
|
509
|
+
"hawa-flex-row hawa-flex-nowrap",
|
510
|
+
className
|
511
|
+
),
|
512
|
+
...props
|
513
|
+
}
|
514
|
+
));
|
515
|
+
} else {
|
516
|
+
return /* @__PURE__ */ React12.createElement(
|
517
|
+
TabsPrimitive.List,
|
518
|
+
{
|
519
|
+
ref,
|
520
|
+
className: cn(
|
521
|
+
tabsListVariant({ variant, orientation }),
|
522
|
+
orientation === "vertical" ? "hawa-flex-col" : "hawa-flex-row",
|
523
|
+
"hawa-flex-wrap",
|
524
|
+
className
|
525
|
+
),
|
526
|
+
...props
|
527
|
+
}
|
528
|
+
);
|
529
|
+
}
|
413
530
|
});
|
414
531
|
var TabsTrigger = React12.forwardRef(({ className, chipProps, ...props }, ref) => {
|
415
532
|
const { orientation, variant } = React12.useContext(TabsContext);
|
@@ -459,7 +576,7 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
459
576
|
|
460
577
|
// blocks/misc/LegalTexts.tsx
|
461
578
|
var LegalTexts = ({ tabs, ...props }) => {
|
462
|
-
return /* @__PURE__ */
|
579
|
+
return /* @__PURE__ */ import_react19.default.createElement(
|
463
580
|
Tabs,
|
464
581
|
{
|
465
582
|
value: props.activeTab,
|
@@ -467,8 +584,8 @@ var LegalTexts = ({ tabs, ...props }) => {
|
|
467
584
|
defaultValue: props.defaultTab || tabs[0].value,
|
468
585
|
dir: props.direction
|
469
586
|
},
|
470
|
-
/* @__PURE__ */
|
471
|
-
tabs.map((tab, index) => /* @__PURE__ */
|
587
|
+
/* @__PURE__ */ import_react19.default.createElement(TabsList, { className: "hawa-w-full" }, tabs.map((tab, index) => /* @__PURE__ */ import_react19.default.createElement(TabsTrigger, { key: index, value: tab.value }, tab.title))),
|
588
|
+
tabs.map((tab, index) => /* @__PURE__ */ import_react19.default.createElement(TabsContent, { key: index, value: tab.value }, /* @__PURE__ */ import_react19.default.createElement(
|
472
589
|
ScrollArea,
|
473
590
|
{
|
474
591
|
className: cn(
|
@@ -482,15 +599,15 @@ var LegalTexts = ({ tabs, ...props }) => {
|
|
482
599
|
};
|
483
600
|
|
484
601
|
// blocks/misc/EmptyState.tsx
|
485
|
-
var
|
602
|
+
var import_react23 = __toESM(require("react"));
|
486
603
|
|
487
604
|
// elements/button/Button.tsx
|
488
605
|
var React18 = __toESM(require("react"));
|
489
606
|
var import_class_variance_authority = require("class-variance-authority");
|
490
607
|
|
491
608
|
// elements/helperText/HelperText.tsx
|
492
|
-
var
|
493
|
-
var HelperText = ({ helperText }) => /* @__PURE__ */
|
609
|
+
var import_react20 = __toESM(require("react"));
|
610
|
+
var HelperText = ({ helperText }) => /* @__PURE__ */ import_react20.default.createElement(
|
494
611
|
"p",
|
495
612
|
{
|
496
613
|
className: cn(
|
@@ -505,9 +622,9 @@ var HelperText = ({ helperText }) => /* @__PURE__ */ import_react19.default.crea
|
|
505
622
|
var React16 = __toESM(require("react"));
|
506
623
|
|
507
624
|
// elements/tooltip/Tooltip.tsx
|
508
|
-
var
|
625
|
+
var import_react21 = __toESM(require("react"));
|
509
626
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
510
|
-
var TooltipContent =
|
627
|
+
var TooltipContent = import_react21.default.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ import_react21.default.createElement(
|
511
628
|
TooltipPrimitive.Content,
|
512
629
|
{
|
513
630
|
ref,
|
@@ -524,7 +641,7 @@ var TooltipContent = import_react20.default.forwardRef(({ className, sideOffset
|
|
524
641
|
}
|
525
642
|
));
|
526
643
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
527
|
-
var TooltipArrow =
|
644
|
+
var TooltipArrow = import_react21.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ import_react21.default.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
528
645
|
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
529
646
|
var Tooltip = ({
|
530
647
|
side,
|
@@ -541,13 +658,13 @@ var Tooltip = ({
|
|
541
658
|
delayDuration = 300,
|
542
659
|
...props
|
543
660
|
}) => {
|
544
|
-
return /* @__PURE__ */
|
661
|
+
return /* @__PURE__ */ import_react21.default.createElement(
|
545
662
|
TooltipPrimitive.TooltipProvider,
|
546
663
|
{
|
547
664
|
delayDuration,
|
548
665
|
...providerProps
|
549
666
|
},
|
550
|
-
/* @__PURE__ */
|
667
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
551
668
|
TooltipPrimitive.Root,
|
552
669
|
{
|
553
670
|
open: !disabled && open,
|
@@ -555,8 +672,8 @@ var Tooltip = ({
|
|
555
672
|
onOpenChange,
|
556
673
|
...props
|
557
674
|
},
|
558
|
-
/* @__PURE__ */
|
559
|
-
/* @__PURE__ */
|
675
|
+
/* @__PURE__ */ import_react21.default.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
676
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
560
677
|
TooltipContent,
|
561
678
|
{
|
562
679
|
size,
|
@@ -618,7 +735,7 @@ var Label = React16.forwardRef(({ className, hint, hintSide, required, children,
|
|
618
735
|
Label.displayName = "Label";
|
619
736
|
|
620
737
|
// elements/loading/Loading.tsx
|
621
|
-
var
|
738
|
+
var import_react22 = __toESM(require("react"));
|
622
739
|
var Loading = ({
|
623
740
|
design = "spinner",
|
624
741
|
size = "normal",
|
@@ -649,7 +766,7 @@ var Loading = ({
|
|
649
766
|
};
|
650
767
|
switch (design.split("-")[0]) {
|
651
768
|
case "dots":
|
652
|
-
return /* @__PURE__ */
|
769
|
+
return /* @__PURE__ */ import_react22.default.createElement(
|
653
770
|
"div",
|
654
771
|
{
|
655
772
|
className: cn(
|
@@ -657,7 +774,7 @@ var Loading = ({
|
|
657
774
|
classNames == null ? void 0 : classNames.container
|
658
775
|
)
|
659
776
|
},
|
660
|
-
/* @__PURE__ */
|
777
|
+
/* @__PURE__ */ import_react22.default.createElement(
|
661
778
|
"div",
|
662
779
|
{
|
663
780
|
className: cn(
|
@@ -668,7 +785,7 @@ var Loading = ({
|
|
668
785
|
)
|
669
786
|
}
|
670
787
|
),
|
671
|
-
/* @__PURE__ */
|
788
|
+
/* @__PURE__ */ import_react22.default.createElement(
|
672
789
|
"div",
|
673
790
|
{
|
674
791
|
className: cn(
|
@@ -679,7 +796,7 @@ var Loading = ({
|
|
679
796
|
)
|
680
797
|
}
|
681
798
|
),
|
682
|
-
/* @__PURE__ */
|
799
|
+
/* @__PURE__ */ import_react22.default.createElement(
|
683
800
|
"div",
|
684
801
|
{
|
685
802
|
className: cn(
|
@@ -692,7 +809,7 @@ var Loading = ({
|
|
692
809
|
)
|
693
810
|
);
|
694
811
|
case "square":
|
695
|
-
return /* @__PURE__ */
|
812
|
+
return /* @__PURE__ */ import_react22.default.createElement(
|
696
813
|
"svg",
|
697
814
|
{
|
698
815
|
className: cn(
|
@@ -704,7 +821,7 @@ var Loading = ({
|
|
704
821
|
height: "35",
|
705
822
|
width: "35"
|
706
823
|
},
|
707
|
-
/* @__PURE__ */
|
824
|
+
/* @__PURE__ */ import_react22.default.createElement(
|
708
825
|
"rect",
|
709
826
|
{
|
710
827
|
className: "squircle-track",
|
@@ -716,7 +833,7 @@ var Loading = ({
|
|
716
833
|
height: "32.5"
|
717
834
|
}
|
718
835
|
),
|
719
|
-
/* @__PURE__ */
|
836
|
+
/* @__PURE__ */ import_react22.default.createElement(
|
720
837
|
"rect",
|
721
838
|
{
|
722
839
|
className: "square-car",
|
@@ -731,7 +848,7 @@ var Loading = ({
|
|
731
848
|
)
|
732
849
|
);
|
733
850
|
case "squircle":
|
734
|
-
return /* @__PURE__ */
|
851
|
+
return /* @__PURE__ */ import_react22.default.createElement(
|
735
852
|
"svg",
|
736
853
|
{
|
737
854
|
x: "0px",
|
@@ -746,7 +863,7 @@ var Loading = ({
|
|
746
863
|
classNames == null ? void 0 : classNames.container
|
747
864
|
)
|
748
865
|
},
|
749
|
-
/* @__PURE__ */
|
866
|
+
/* @__PURE__ */ import_react22.default.createElement(
|
750
867
|
"path",
|
751
868
|
{
|
752
869
|
className: cn("squircle-track", classNames == null ? void 0 : classNames.track),
|
@@ -756,7 +873,7 @@ var Loading = ({
|
|
756
873
|
d: "M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5"
|
757
874
|
}
|
758
875
|
),
|
759
|
-
/* @__PURE__ */
|
876
|
+
/* @__PURE__ */ import_react22.default.createElement(
|
760
877
|
"path",
|
761
878
|
{
|
762
879
|
className: cn("squircle-car", classNames == null ? void 0 : classNames.car),
|
@@ -768,7 +885,7 @@ var Loading = ({
|
|
768
885
|
)
|
769
886
|
);
|
770
887
|
case "progress":
|
771
|
-
return /* @__PURE__ */
|
888
|
+
return /* @__PURE__ */ import_react22.default.createElement(
|
772
889
|
"div",
|
773
890
|
{
|
774
891
|
className: cn(
|
@@ -779,9 +896,9 @@ var Loading = ({
|
|
779
896
|
}
|
780
897
|
);
|
781
898
|
case "orbit":
|
782
|
-
return /* @__PURE__ */
|
899
|
+
return /* @__PURE__ */ import_react22.default.createElement("div", { className: cn("orbit-container", classNames == null ? void 0 : classNames.container) });
|
783
900
|
default:
|
784
|
-
return /* @__PURE__ */
|
901
|
+
return /* @__PURE__ */ import_react22.default.createElement(
|
785
902
|
"svg",
|
786
903
|
{
|
787
904
|
viewBox: "0 0 40 40",
|
@@ -793,7 +910,7 @@ var Loading = ({
|
|
793
910
|
classNames == null ? void 0 : classNames.container
|
794
911
|
)
|
795
912
|
},
|
796
|
-
/* @__PURE__ */
|
913
|
+
/* @__PURE__ */ import_react22.default.createElement(
|
797
914
|
"circle",
|
798
915
|
{
|
799
916
|
className: cn(
|
@@ -812,7 +929,7 @@ var Loading = ({
|
|
812
929
|
pathLength: "100"
|
813
930
|
}
|
814
931
|
),
|
815
|
-
/* @__PURE__ */
|
932
|
+
/* @__PURE__ */ import_react22.default.createElement(
|
816
933
|
"circle",
|
817
934
|
{
|
818
935
|
className: cn(
|
@@ -937,17 +1054,19 @@ var Card = React19.forwardRef(
|
|
937
1054
|
);
|
938
1055
|
}
|
939
1056
|
);
|
940
|
-
var CardHeader = React19.forwardRef(
|
941
|
-
"div",
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
1057
|
+
var CardHeader = React19.forwardRef(
|
1058
|
+
({ className, ...props }, ref) => /* @__PURE__ */ React19.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, /* @__PURE__ */ React19.createElement(
|
1059
|
+
"div",
|
1060
|
+
{
|
1061
|
+
ref,
|
1062
|
+
className: cn(
|
1063
|
+
"hawa-flex hawa-flex-col hawa-space-y-1.5 hawa-p-6",
|
1064
|
+
className
|
1065
|
+
),
|
1066
|
+
...props
|
1067
|
+
}
|
1068
|
+
), props.actions && /* @__PURE__ */ React19.createElement("div", { className: "hawa-p-6" }, props.actions))
|
1069
|
+
);
|
951
1070
|
var CardTitle = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React19.createElement(
|
952
1071
|
"h3",
|
953
1072
|
{
|
@@ -999,7 +1118,7 @@ Card.displayName = "Card";
|
|
999
1118
|
|
1000
1119
|
// blocks/misc/EmptyState.tsx
|
1001
1120
|
var EmptyState = ({ texts, onActionClick }) => {
|
1002
|
-
return /* @__PURE__ */
|
1121
|
+
return /* @__PURE__ */ import_react23.default.createElement(Card, null, /* @__PURE__ */ import_react23.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react23.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-text-center " }, /* @__PURE__ */ import_react23.default.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__ */ import_react23.default.createElement(
|
1003
1122
|
"svg",
|
1004
1123
|
{
|
1005
1124
|
stroke: "currentColor",
|
@@ -1009,37 +1128,37 @@ var EmptyState = ({ texts, onActionClick }) => {
|
|
1009
1128
|
height: "0.35em",
|
1010
1129
|
width: "0.35em"
|
1011
1130
|
},
|
1012
|
-
/* @__PURE__ */
|
1013
|
-
)), /* @__PURE__ */
|
1131
|
+
/* @__PURE__ */ import_react23.default.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" })
|
1132
|
+
)), /* @__PURE__ */ import_react23.default.createElement("div", { className: "hawa-m-2 hawa-text-xl hawa-font-bold" }, (texts == null ? void 0 : texts.youreCaughtUp) || "You're all caught up"))), /* @__PURE__ */ import_react23.default.createElement(CardFooter, null, /* @__PURE__ */ import_react23.default.createElement(Button, { className: "hawa-w-full", onClick: () => onActionClick() }, (texts == null ? void 0 : texts.actionText) || "Go Home")));
|
1014
1133
|
};
|
1015
1134
|
|
1016
1135
|
// blocks/misc/Testimonial.tsx
|
1017
|
-
var
|
1136
|
+
var import_react24 = __toESM(require("react"));
|
1018
1137
|
var Testimonial = () => {
|
1019
|
-
return /* @__PURE__ */
|
1138
|
+
return /* @__PURE__ */ import_react24.default.createElement(Card, null, /* @__PURE__ */ import_react24.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react24.default.createElement("div", null, /* @__PURE__ */ import_react24.default.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__ */ import_react24.default.createElement("div", { className: "flex flex-row gap-4" }, /* @__PURE__ */ import_react24.default.createElement("svg", { width: "48", height: "48", viewBox: "0 0 48 48", fill: "none" }, /* @__PURE__ */ import_react24.default.createElement("rect", { width: "48", height: "48", rx: "24", fill: "#45BE8B" }), /* @__PURE__ */ import_react24.default.createElement(
|
1020
1139
|
"path",
|
1021
1140
|
{
|
1022
1141
|
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",
|
1023
1142
|
fill: "#FFFFFF"
|
1024
1143
|
}
|
1025
|
-
), /* @__PURE__ */
|
1144
|
+
), /* @__PURE__ */ import_react24.default.createElement(
|
1026
1145
|
"path",
|
1027
1146
|
{
|
1028
1147
|
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",
|
1029
1148
|
fill: "#FFFFFF"
|
1030
1149
|
}
|
1031
|
-
)), /* @__PURE__ */
|
1150
|
+
)), /* @__PURE__ */ import_react24.default.createElement("span", { className: "border border-l " }), " ", /* @__PURE__ */ import_react24.default.createElement("div", null, /* @__PURE__ */ import_react24.default.createElement("strong", null, "Brent Lassi"), /* @__PURE__ */ import_react24.default.createElement("div", null, " Chief Information Security Officer")))));
|
1032
1151
|
};
|
1033
1152
|
|
1034
1153
|
// blocks/misc/LeadGenerator.tsx
|
1035
|
-
var
|
1154
|
+
var import_react27 = __toESM(require("react"));
|
1036
1155
|
var import_react_hook_form = require("react-hook-form");
|
1037
1156
|
|
1038
1157
|
// elements/input/Input.tsx
|
1039
|
-
var
|
1158
|
+
var import_react26 = __toESM(require("react"));
|
1040
1159
|
|
1041
1160
|
// elements/skeleton/Skeleton.tsx
|
1042
|
-
var
|
1161
|
+
var import_react25 = __toESM(require("react"));
|
1043
1162
|
function Skeleton({
|
1044
1163
|
className,
|
1045
1164
|
content,
|
@@ -1058,7 +1177,7 @@ function Skeleton({
|
|
1058
1177
|
right: "hawa-mask-fade-right",
|
1059
1178
|
left: "hawa-mask-fade-left "
|
1060
1179
|
};
|
1061
|
-
return /* @__PURE__ */
|
1180
|
+
return /* @__PURE__ */ import_react25.default.createElement(
|
1062
1181
|
"div",
|
1063
1182
|
{
|
1064
1183
|
className: cn(
|
@@ -1074,7 +1193,7 @@ function Skeleton({
|
|
1074
1193
|
}
|
1075
1194
|
|
1076
1195
|
// elements/input/Input.tsx
|
1077
|
-
var Input = (0,
|
1196
|
+
var Input = (0, import_react26.forwardRef)(
|
1078
1197
|
({
|
1079
1198
|
margin = "none",
|
1080
1199
|
width = "full",
|
@@ -1118,7 +1237,7 @@ var Input = (0, import_react25.forwardRef)(
|
|
1118
1237
|
props.onChange(newEvent);
|
1119
1238
|
}
|
1120
1239
|
};
|
1121
|
-
return /* @__PURE__ */
|
1240
|
+
return /* @__PURE__ */ import_react26.default.createElement(
|
1122
1241
|
"div",
|
1123
1242
|
{
|
1124
1243
|
className: cn(
|
@@ -1129,8 +1248,8 @@ var Input = (0, import_react25.forwardRef)(
|
|
1129
1248
|
"hawa-w-full hawa-gap-2"
|
1130
1249
|
)
|
1131
1250
|
},
|
1132
|
-
props.label && /* @__PURE__ */
|
1133
|
-
/* @__PURE__ */
|
1251
|
+
props.label && /* @__PURE__ */ import_react26.default.createElement(Label, { ...labelProps }, props.label),
|
1252
|
+
/* @__PURE__ */ import_react26.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.outsidePrefix && /* @__PURE__ */ import_react26.default.createElement(
|
1134
1253
|
"span",
|
1135
1254
|
{
|
1136
1255
|
className: cn(
|
@@ -1139,12 +1258,12 @@ var Input = (0, import_react25.forwardRef)(
|
|
1139
1258
|
)
|
1140
1259
|
},
|
1141
1260
|
props.outsidePrefix
|
1142
|
-
), props.isLoading ? /* @__PURE__ */
|
1261
|
+
), props.isLoading ? /* @__PURE__ */ import_react26.default.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ import_react26.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : props.isLoadingError ? /* @__PURE__ */ import_react26.default.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ import_react26.default.createElement(
|
1143
1262
|
Skeleton,
|
1144
1263
|
{
|
1145
1264
|
animation: "none",
|
1146
1265
|
className: "hawa-h-[40px] hawa-w-full !hawa-bg-destructive/[0.3]",
|
1147
|
-
content: /* @__PURE__ */
|
1266
|
+
content: /* @__PURE__ */ import_react26.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-2" }, /* @__PURE__ */ import_react26.default.createElement(
|
1148
1267
|
"svg",
|
1149
1268
|
{
|
1150
1269
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -1158,12 +1277,12 @@ var Input = (0, import_react25.forwardRef)(
|
|
1158
1277
|
strokeLinejoin: "round",
|
1159
1278
|
className: "hawa-text-destructive"
|
1160
1279
|
},
|
1161
|
-
/* @__PURE__ */
|
1162
|
-
/* @__PURE__ */
|
1163
|
-
/* @__PURE__ */
|
1164
|
-
), /* @__PURE__ */
|
1280
|
+
/* @__PURE__ */ import_react26.default.createElement("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
|
1281
|
+
/* @__PURE__ */ import_react26.default.createElement("path", { d: "M12 9v4" }),
|
1282
|
+
/* @__PURE__ */ import_react26.default.createElement("path", { d: "M12 17h.01" })
|
1283
|
+
), /* @__PURE__ */ import_react26.default.createElement("span", null, /* @__PURE__ */ import_react26.default.createElement("span", { className: "hawa-text-destructive" }, props.loadingErrorMesssage || "Error loading data")))
|
1165
1284
|
}
|
1166
|
-
)) : /* @__PURE__ */
|
1285
|
+
)) : /* @__PURE__ */ import_react26.default.createElement(import_react26.default.Fragment, null, !props.hideSeparator && /* @__PURE__ */ import_react26.default.createElement(
|
1167
1286
|
"div",
|
1168
1287
|
{
|
1169
1288
|
className: cn(
|
@@ -1171,7 +1290,7 @@ var Input = (0, import_react25.forwardRef)(
|
|
1171
1290
|
preview ? "hawa-opacity-100" : "hawa-opacity-0"
|
1172
1291
|
)
|
1173
1292
|
}
|
1174
|
-
), /* @__PURE__ */
|
1293
|
+
), /* @__PURE__ */ import_react26.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-w-full hawa-gap-2" }, /* @__PURE__ */ import_react26.default.createElement("div", { className: "hawa-relative" }, props.startIcon && /* @__PURE__ */ import_react26.default.createElement("div", { className: "hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.startIcon), props.endIcon && /* @__PURE__ */ import_react26.default.createElement(
|
1175
1294
|
"div",
|
1176
1295
|
{
|
1177
1296
|
className: cn(
|
@@ -1180,7 +1299,7 @@ var Input = (0, import_react25.forwardRef)(
|
|
1180
1299
|
)
|
1181
1300
|
},
|
1182
1301
|
props.endIcon
|
1183
|
-
), /* @__PURE__ */
|
1302
|
+
), /* @__PURE__ */ import_react26.default.createElement(
|
1184
1303
|
"input",
|
1185
1304
|
{
|
1186
1305
|
required: true,
|
@@ -1206,7 +1325,7 @@ var Input = (0, import_react25.forwardRef)(
|
|
1206
1325
|
inputProps == null ? void 0 : inputProps.className
|
1207
1326
|
)
|
1208
1327
|
}
|
1209
|
-
)), !forceHideHelperText && /* @__PURE__ */
|
1328
|
+
)), !forceHideHelperText && /* @__PURE__ */ import_react26.default.createElement(
|
1210
1329
|
"p",
|
1211
1330
|
{
|
1212
1331
|
className: cn(
|
@@ -1215,7 +1334,7 @@ var Input = (0, import_react25.forwardRef)(
|
|
1215
1334
|
)
|
1216
1335
|
},
|
1217
1336
|
props.helperText
|
1218
|
-
), !props.disabled && forceHideHelperText && /* @__PURE__ */
|
1337
|
+
), !props.disabled && forceHideHelperText && /* @__PURE__ */ import_react26.default.createElement(
|
1219
1338
|
"div",
|
1220
1339
|
{
|
1221
1340
|
className: cn(
|
@@ -1224,7 +1343,7 @@ var Input = (0, import_react25.forwardRef)(
|
|
1224
1343
|
)
|
1225
1344
|
},
|
1226
1345
|
props.helperText
|
1227
|
-
), showCount && /* @__PURE__ */
|
1346
|
+
), showCount && /* @__PURE__ */ import_react26.default.createElement(
|
1228
1347
|
"div",
|
1229
1348
|
{
|
1230
1349
|
className: cn(
|
@@ -1255,14 +1374,14 @@ var LeadGenerator = ({ texts, submitHandler }) => {
|
|
1255
1374
|
console.log("handleNewsletterSub props was not provided");
|
1256
1375
|
}
|
1257
1376
|
};
|
1258
|
-
return /* @__PURE__ */
|
1377
|
+
return /* @__PURE__ */ import_react27.default.createElement(Card, null, /* @__PURE__ */ import_react27.default.createElement(CardHeader, null, /* @__PURE__ */ import_react27.default.createElement(CardTitle, null, texts == null ? void 0 : texts.title), /* @__PURE__ */ import_react27.default.createElement(CardDescription, null, texts == null ? void 0 : texts.subtitle)), /* @__PURE__ */ import_react27.default.createElement(CardContent, null, /* @__PURE__ */ import_react27.default.createElement(
|
1259
1378
|
"form",
|
1260
1379
|
{
|
1261
1380
|
noValidate: true,
|
1262
1381
|
className: "hawa-flex hawa-flex-row hawa-gap-2",
|
1263
1382
|
onSubmit: handleSubmit(onSubmit)
|
1264
1383
|
},
|
1265
|
-
/* @__PURE__ */
|
1384
|
+
/* @__PURE__ */ import_react27.default.createElement(
|
1266
1385
|
import_react_hook_form.Controller,
|
1267
1386
|
{
|
1268
1387
|
name: "email",
|
@@ -1275,27 +1394,27 @@ var LeadGenerator = ({ texts, submitHandler }) => {
|
|
1275
1394
|
}
|
1276
1395
|
},
|
1277
1396
|
defaultValue: "",
|
1278
|
-
render: ({ field }) => /* @__PURE__ */
|
1397
|
+
render: ({ field }) => /* @__PURE__ */ import_react27.default.createElement(Input, { ...field, type: "email", placeholder: "example@sikka.io" })
|
1279
1398
|
}
|
1280
1399
|
),
|
1281
|
-
/* @__PURE__ */
|
1400
|
+
/* @__PURE__ */ import_react27.default.createElement(Button, { type: "submit", disabled: !formState.isValid }, (_a = texts == null ? void 0 : texts.submit) != null ? _a : "Submit")
|
1282
1401
|
)));
|
1283
1402
|
};
|
1284
1403
|
|
1285
1404
|
// blocks/misc/Announcement.tsx
|
1286
|
-
var
|
1405
|
+
var import_react28 = __toESM(require("react"));
|
1287
1406
|
var Announcement = ({
|
1288
1407
|
onActionClick,
|
1289
1408
|
...props
|
1290
1409
|
}) => {
|
1291
|
-
return /* @__PURE__ */
|
1410
|
+
return /* @__PURE__ */ import_react28.default.createElement(Card, null, /* @__PURE__ */ import_react28.default.createElement(
|
1292
1411
|
CardContent,
|
1293
1412
|
{
|
1294
1413
|
headless: true,
|
1295
1414
|
className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-between"
|
1296
1415
|
},
|
1297
|
-
/* @__PURE__ */
|
1298
|
-
/* @__PURE__ */
|
1416
|
+
/* @__PURE__ */ import_react28.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-start hawa-justify-center " }, /* @__PURE__ */ import_react28.default.createElement("span", { className: "hawa-text-lg hawa-font-bold" }, props.title), /* @__PURE__ */ import_react28.default.createElement("span", { className: "hawa-text-sm" }, props.subtitle)),
|
1417
|
+
/* @__PURE__ */ import_react28.default.createElement(
|
1299
1418
|
Button,
|
1300
1419
|
{
|
1301
1420
|
onClick: () => onActionClick(),
|
@@ -1307,15 +1426,15 @@ var Announcement = ({
|
|
1307
1426
|
};
|
1308
1427
|
|
1309
1428
|
// blocks/misc/NotFound.tsx
|
1310
|
-
var
|
1429
|
+
var import_react29 = __toESM(require("react"));
|
1311
1430
|
var NotFound = ({ texts }) => {
|
1312
|
-
return /* @__PURE__ */
|
1431
|
+
return /* @__PURE__ */ import_react29.default.createElement(Card, null, /* @__PURE__ */ import_react29.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react29.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center dark:hawa-text-white" }, /* @__PURE__ */ import_react29.default.createElement("div", { className: "hawa-text-center hawa-text-6xl hawa-font-bold " }, "404"), /* @__PURE__ */ import_react29.default.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__ */ import_react29.default.createElement("div", { className: "hawa-mb-4 hawa-text-center" }, (texts == null ? void 0 : texts.ifLost) || /* @__PURE__ */ import_react29.default.createElement(import_react29.default.Fragment, null, "If you're lost please contact us ", /* @__PURE__ */ import_react29.default.createElement("span", { className: "clickable-link" }, "help@sikka.io"))), /* @__PURE__ */ import_react29.default.createElement(Button, { className: "hawa-w-full" }, (texts == null ? void 0 : texts.home) || "Home"))));
|
1313
1432
|
};
|
1314
1433
|
|
1315
1434
|
// blocks/misc/NoPermission.tsx
|
1316
|
-
var
|
1435
|
+
var import_react30 = __toESM(require("react"));
|
1317
1436
|
var NoPermission = ({ texts }) => {
|
1318
|
-
return /* @__PURE__ */
|
1437
|
+
return /* @__PURE__ */ import_react30.default.createElement(Card, null, /* @__PURE__ */ import_react30.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react30.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-text-center" }, /* @__PURE__ */ import_react30.default.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__ */ import_react30.default.createElement(
|
1319
1438
|
"svg",
|
1320
1439
|
{
|
1321
1440
|
stroke: "currentColor",
|
@@ -1325,18 +1444,18 @@ var NoPermission = ({ texts }) => {
|
|
1325
1444
|
height: "0.35em",
|
1326
1445
|
width: "0.35em"
|
1327
1446
|
},
|
1328
|
-
/* @__PURE__ */
|
1329
|
-
)), /* @__PURE__ */
|
1447
|
+
/* @__PURE__ */ import_react30.default.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" })
|
1448
|
+
)), /* @__PURE__ */ import_react30.default.createElement("div", { className: "hawa-m-2 hawa-text-xl hawa-font-bold" }, (texts == null ? void 0 : texts.title) || "You don't have permission"), /* @__PURE__ */ import_react30.default.createElement("div", null, (texts == null ? void 0 : texts.subtitle) || "If you think this is a problem please contact your administrator or our customer support"))));
|
1330
1449
|
};
|
1331
1450
|
|
1332
1451
|
// blocks/misc/ContactForm.tsx
|
1333
|
-
var
|
1452
|
+
var import_react32 = __toESM(require("react"));
|
1334
1453
|
var import_react_hook_form2 = require("react-hook-form");
|
1335
1454
|
var import_zod = require("@hookform/resolvers/zod");
|
1336
1455
|
var z = __toESM(require("zod"));
|
1337
1456
|
|
1338
1457
|
// elements/select/Select.tsx
|
1339
|
-
var
|
1458
|
+
var import_react31 = __toESM(require("react"));
|
1340
1459
|
var import_react_select = __toESM(require("react-select"));
|
1341
1460
|
var import_creatable = __toESM(require("react-select/creatable"));
|
1342
1461
|
var import_clsx2 = __toESM(require("clsx"));
|
@@ -1347,10 +1466,10 @@ var Select = ({
|
|
1347
1466
|
}) => {
|
1348
1467
|
const NoOption = () => {
|
1349
1468
|
var _a, _b;
|
1350
|
-
return /* @__PURE__ */
|
1469
|
+
return /* @__PURE__ */ import_react31.default.createElement("div", null, (_b = (_a = props.texts) == null ? void 0 : _a.noOptions) != null ? _b : "No Items Found");
|
1351
1470
|
};
|
1352
1471
|
const Control = ({ children, innerProps, innerRef }) => {
|
1353
|
-
return /* @__PURE__ */
|
1472
|
+
return /* @__PURE__ */ import_react31.default.createElement(
|
1354
1473
|
"div",
|
1355
1474
|
{
|
1356
1475
|
ref: innerRef,
|
@@ -1363,7 +1482,7 @@ var Select = ({
|
|
1363
1482
|
);
|
1364
1483
|
};
|
1365
1484
|
const Option = ({ children, innerProps, innerRef }) => {
|
1366
|
-
return /* @__PURE__ */
|
1485
|
+
return /* @__PURE__ */ import_react31.default.createElement(
|
1367
1486
|
"div",
|
1368
1487
|
{
|
1369
1488
|
ref: innerRef,
|
@@ -1384,7 +1503,7 @@ var Select = ({
|
|
1384
1503
|
...menuProps
|
1385
1504
|
}) => {
|
1386
1505
|
const menuOpen = menuProps.selectProps.menuIsOpen;
|
1387
|
-
return /* @__PURE__ */
|
1506
|
+
return /* @__PURE__ */ import_react31.default.createElement(
|
1388
1507
|
"div",
|
1389
1508
|
{
|
1390
1509
|
className: cn(
|
@@ -1398,7 +1517,11 @@ var Select = ({
|
|
1398
1517
|
children
|
1399
1518
|
);
|
1400
1519
|
};
|
1401
|
-
|
1520
|
+
let phoneCodeStyles = "hawa-min-w-[65px] hawa-text-right hawa-w-[100px] hawa-p-0 hawa-rounded-r-none hawa-h-[40px]";
|
1521
|
+
let selectContainerStyles = "hawa-rounded hawa-block hawa-w-full hawa-border hawa-transition-all hawa-bg-background hawa-p-0 hawa-px-1 hawa-text-sm";
|
1522
|
+
let selectPlaceholderStyles = "hawa-text-muted-foreground hawa-cursor-pointer hawa-px-1";
|
1523
|
+
let selectIndicatorContainerStyles = "hawa-cursor-pointer hawa-text-muted-foreground hawa-absolute hawa-end-0 hawa-top-[50%] hawa-bottom-[50%] ";
|
1524
|
+
return /* @__PURE__ */ import_react31.default.createElement(
|
1402
1525
|
"div",
|
1403
1526
|
{
|
1404
1527
|
className: cn(
|
@@ -1406,10 +1529,10 @@ var Select = ({
|
|
1406
1529
|
props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
|
1407
1530
|
)
|
1408
1531
|
},
|
1409
|
-
props.label && /* @__PURE__ */
|
1410
|
-
props.isLoading ? /* @__PURE__ */
|
1532
|
+
props.label && /* @__PURE__ */ import_react31.default.createElement(Label, { ...labelProps }, props.label),
|
1533
|
+
props.isLoading ? /* @__PURE__ */ import_react31.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? (
|
1411
1534
|
// TODO: enable keyboard to go to the next item in the list
|
1412
|
-
/* @__PURE__ */
|
1535
|
+
/* @__PURE__ */ import_react31.default.createElement(
|
1413
1536
|
import_react_select.default,
|
1414
1537
|
{
|
1415
1538
|
noOptionsMessage: NoOption,
|
@@ -1419,26 +1542,22 @@ var Select = ({
|
|
1419
1542
|
props.controlClassNames
|
1420
1543
|
),
|
1421
1544
|
container: () => cn(
|
1422
|
-
|
1423
|
-
props.phoneCode &&
|
1424
|
-
"hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-0 hawa-px-1 hawa-text-sm",
|
1545
|
+
selectContainerStyles,
|
1546
|
+
props.phoneCode && phoneCodeStyles,
|
1425
1547
|
props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer",
|
1426
1548
|
props.isMulti && "hawa-ps-0 "
|
1427
1549
|
),
|
1428
|
-
placeholder: () =>
|
1550
|
+
placeholder: () => selectPlaceholderStyles,
|
1429
1551
|
valueContainer: () => "hawa-text-foreground hawa-px-1 ",
|
1430
1552
|
singleValue: () => "hawa-text-foreground",
|
1431
1553
|
indicatorsContainer: () => cn(
|
1432
|
-
|
1554
|
+
selectIndicatorContainerStyles,
|
1433
1555
|
props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
|
1434
1556
|
)
|
1435
1557
|
},
|
1436
1558
|
unstyled: true,
|
1437
|
-
|
1438
|
-
|
1439
|
-
Menu,
|
1440
|
-
IndicatorsContainer: () => null
|
1441
|
-
} : {
|
1559
|
+
autoFocus: false,
|
1560
|
+
components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : {
|
1442
1561
|
Option,
|
1443
1562
|
Menu,
|
1444
1563
|
// Control: (e) => (
|
@@ -1447,7 +1566,7 @@ var Select = ({
|
|
1447
1566
|
// {...e}
|
1448
1567
|
// />
|
1449
1568
|
// ),
|
1450
|
-
ValueContainer: (e) => /* @__PURE__ */
|
1569
|
+
ValueContainer: (e) => /* @__PURE__ */ import_react31.default.createElement(
|
1451
1570
|
"div",
|
1452
1571
|
{
|
1453
1572
|
className: cn(
|
@@ -1457,13 +1576,10 @@ var Select = ({
|
|
1457
1576
|
...e
|
1458
1577
|
}
|
1459
1578
|
),
|
1460
|
-
MultiValueContainer: (e) => /* @__PURE__ */
|
1579
|
+
MultiValueContainer: (e) => /* @__PURE__ */ import_react31.default.createElement(
|
1461
1580
|
"div",
|
1462
1581
|
{
|
1463
|
-
className:
|
1464
|
-
// e.className,
|
1465
|
-
"hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row"
|
1466
|
-
),
|
1582
|
+
className: "hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row",
|
1467
1583
|
...e
|
1468
1584
|
}
|
1469
1585
|
)
|
@@ -1479,7 +1595,7 @@ var Select = ({
|
|
1479
1595
|
isSearchable: props.isSearchable
|
1480
1596
|
}
|
1481
1597
|
)
|
1482
|
-
) : /* @__PURE__ */
|
1598
|
+
) : /* @__PURE__ */ import_react31.default.createElement(
|
1483
1599
|
import_creatable.default,
|
1484
1600
|
{
|
1485
1601
|
formatCreateLabel: (inputValue) => {
|
@@ -1509,7 +1625,7 @@ var Select = ({
|
|
1509
1625
|
onInputChange: (newValue, action) => props.onInputChange(newValue, action)
|
1510
1626
|
}
|
1511
1627
|
),
|
1512
|
-
!props.hideHelperText && /* @__PURE__ */
|
1628
|
+
!props.hideHelperText && /* @__PURE__ */ import_react31.default.createElement(
|
1513
1629
|
"p",
|
1514
1630
|
{
|
1515
1631
|
className: cn(
|
@@ -1650,7 +1766,7 @@ var ContactForm = ({
|
|
1650
1766
|
console.log("Form is submitted but onSubmit prop is missing");
|
1651
1767
|
}
|
1652
1768
|
};
|
1653
|
-
return /* @__PURE__ */
|
1769
|
+
return /* @__PURE__ */ import_react32.default.createElement(
|
1654
1770
|
Card,
|
1655
1771
|
{
|
1656
1772
|
className: cn(
|
@@ -1659,7 +1775,7 @@ var ContactForm = ({
|
|
1659
1775
|
),
|
1660
1776
|
style: cardless ? { boxShadow: "none" } : void 0
|
1661
1777
|
},
|
1662
|
-
/* @__PURE__ */
|
1778
|
+
/* @__PURE__ */ import_react32.default.createElement(CardContent, { headless: true, className: cardless ? "!hawa-p-0" : "" }, props.showSuccess ? /* @__PURE__ */ import_react32.default.createElement(CardHeader, null, /* @__PURE__ */ import_react32.default.createElement(CardTitle, null, ((_d = texts == null ? void 0 : texts.success) == null ? void 0 : _d.title) || "Message Sent! \u{1F389}"), /* @__PURE__ */ import_react32.default.createElement(CardDescription, null, ((_e = texts == null ? void 0 : texts.success) == null ? void 0 : _e.description) || "Thank you for your submission, we will get back to you as soon as possible.")) : /* @__PURE__ */ import_react32.default.createElement(
|
1663
1779
|
"form",
|
1664
1780
|
{
|
1665
1781
|
noValidate: true,
|
@@ -1668,7 +1784,7 @@ var ContactForm = ({
|
|
1668
1784
|
id: formId,
|
1669
1785
|
autoComplete: formAutoComplete
|
1670
1786
|
},
|
1671
|
-
/* @__PURE__ */
|
1787
|
+
/* @__PURE__ */ import_react32.default.createElement(
|
1672
1788
|
"div",
|
1673
1789
|
{
|
1674
1790
|
className: cn(
|
@@ -1679,14 +1795,14 @@ var ContactForm = ({
|
|
1679
1795
|
}
|
1680
1796
|
)
|
1681
1797
|
},
|
1682
|
-
/* @__PURE__ */
|
1798
|
+
/* @__PURE__ */ import_react32.default.createElement(
|
1683
1799
|
import_react_hook_form2.Controller,
|
1684
1800
|
{
|
1685
1801
|
control,
|
1686
1802
|
name: "name",
|
1687
1803
|
render: ({ field }) => {
|
1688
1804
|
var _a2;
|
1689
|
-
return /* @__PURE__ */
|
1805
|
+
return /* @__PURE__ */ import_react32.default.createElement(
|
1690
1806
|
Input,
|
1691
1807
|
{
|
1692
1808
|
label: (texts == null ? void 0 : texts.name.label) || "Name",
|
@@ -1699,14 +1815,14 @@ var ContactForm = ({
|
|
1699
1815
|
}
|
1700
1816
|
}
|
1701
1817
|
),
|
1702
|
-
/* @__PURE__ */
|
1818
|
+
/* @__PURE__ */ import_react32.default.createElement(
|
1703
1819
|
import_react_hook_form2.Controller,
|
1704
1820
|
{
|
1705
1821
|
control,
|
1706
1822
|
name: "email",
|
1707
1823
|
render: ({ field }) => {
|
1708
1824
|
var _a2;
|
1709
|
-
return /* @__PURE__ */
|
1825
|
+
return /* @__PURE__ */ import_react32.default.createElement(
|
1710
1826
|
Input,
|
1711
1827
|
{
|
1712
1828
|
label: (texts == null ? void 0 : texts.email.label) || "Email",
|
@@ -1722,7 +1838,7 @@ var ContactForm = ({
|
|
1722
1838
|
),
|
1723
1839
|
customFields && customFields.map((customField) => {
|
1724
1840
|
console.log("custom", customField);
|
1725
|
-
return /* @__PURE__ */
|
1841
|
+
return /* @__PURE__ */ import_react32.default.createElement(
|
1726
1842
|
import_react_hook_form2.Controller,
|
1727
1843
|
{
|
1728
1844
|
control,
|
@@ -1732,7 +1848,7 @@ var ContactForm = ({
|
|
1732
1848
|
switch (type) {
|
1733
1849
|
case "text":
|
1734
1850
|
case "number":
|
1735
|
-
return /* @__PURE__ */
|
1851
|
+
return /* @__PURE__ */ import_react32.default.createElement(
|
1736
1852
|
Input,
|
1737
1853
|
{
|
1738
1854
|
id: customField.name,
|
@@ -1743,7 +1859,7 @@ var ContactForm = ({
|
|
1743
1859
|
}
|
1744
1860
|
);
|
1745
1861
|
case "select":
|
1746
|
-
return /* @__PURE__ */
|
1862
|
+
return /* @__PURE__ */ import_react32.default.createElement(
|
1747
1863
|
Select,
|
1748
1864
|
{
|
1749
1865
|
label,
|
@@ -1753,20 +1869,20 @@ var ContactForm = ({
|
|
1753
1869
|
}
|
1754
1870
|
);
|
1755
1871
|
default:
|
1756
|
-
return /* @__PURE__ */
|
1872
|
+
return /* @__PURE__ */ import_react32.default.createElement("div", null, "Unknown type");
|
1757
1873
|
}
|
1758
1874
|
}
|
1759
1875
|
}
|
1760
1876
|
);
|
1761
1877
|
}),
|
1762
|
-
/* @__PURE__ */
|
1878
|
+
/* @__PURE__ */ import_react32.default.createElement(
|
1763
1879
|
import_react_hook_form2.Controller,
|
1764
1880
|
{
|
1765
1881
|
control,
|
1766
1882
|
name: "message",
|
1767
1883
|
render: ({ field }) => {
|
1768
1884
|
var _a2;
|
1769
|
-
return /* @__PURE__ */
|
1885
|
+
return /* @__PURE__ */ import_react32.default.createElement(
|
1770
1886
|
Textarea,
|
1771
1887
|
{
|
1772
1888
|
label: (texts == null ? void 0 : texts.message.label) || "Message",
|
@@ -1783,7 +1899,7 @@ var ContactForm = ({
|
|
1783
1899
|
}
|
1784
1900
|
}
|
1785
1901
|
),
|
1786
|
-
/* @__PURE__ */
|
1902
|
+
/* @__PURE__ */ import_react32.default.createElement(Button, { type: "submit", className: "hawa-w-full" }, (texts == null ? void 0 : texts.submit) || "Submit")
|
1787
1903
|
))
|
1788
1904
|
);
|
1789
1905
|
};
|