@sikka/hawa 0.36.2-next → 0.37.0-next
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +11 -14
- package/dist/blocks/auth/index.mjs +1 -1
- package/dist/blocks/feedback/index.js +11 -14
- package/dist/blocks/feedback/index.mjs +1 -1
- package/dist/blocks/index.js +295 -181
- package/dist/blocks/index.mjs +2 -2
- package/dist/blocks/misc/index.js +257 -143
- package/dist/blocks/misc/index.mjs +50 -16
- package/dist/blocks/pricing/index.js +94 -11
- package/dist/blocks/pricing/index.mjs +1 -1
- package/dist/{chunk-CJ57JBYA.mjs → chunk-I5YX7N76.mjs} +94 -11
- package/dist/{chunk-T33FXOHA.mjs → chunk-PO5OW6SQ.mjs} +151 -40
- package/dist/{chunk-HLYAX77R.mjs → chunk-SE5A4R76.mjs} +11 -14
- package/dist/{chunk-OPYDG34F.mjs → chunk-ZBUBNKF6.mjs} +93 -1
- 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/elements/index.d.mts +28 -2
- package/dist/elements/index.d.ts +28 -2
- package/dist/elements/index.js +437 -284
- package/dist/elements/index.mjs +41 -4
- 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-CoPyqTu8.d.mts +63 -0
- package/dist/index-CoPyqTu8.d.ts +63 -0
- package/dist/index.css +20 -3
- package/dist/index.d.mts +52 -2
- package/dist/index.d.ts +52 -2
- package/dist/index.js +953 -707
- package/dist/index.mjs +481 -241
- package/dist/layout/index.js +1 -1
- package/dist/layout/index.mjs +1 -1
- 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/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(
|
@@ -999,7 +1116,7 @@ Card.displayName = "Card";
|
|
999
1116
|
|
1000
1117
|
// blocks/misc/EmptyState.tsx
|
1001
1118
|
var EmptyState = ({ texts, onActionClick }) => {
|
1002
|
-
return /* @__PURE__ */
|
1119
|
+
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
1120
|
"svg",
|
1004
1121
|
{
|
1005
1122
|
stroke: "currentColor",
|
@@ -1009,37 +1126,37 @@ var EmptyState = ({ texts, onActionClick }) => {
|
|
1009
1126
|
height: "0.35em",
|
1010
1127
|
width: "0.35em"
|
1011
1128
|
},
|
1012
|
-
/* @__PURE__ */
|
1013
|
-
)), /* @__PURE__ */
|
1129
|
+
/* @__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" })
|
1130
|
+
)), /* @__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
1131
|
};
|
1015
1132
|
|
1016
1133
|
// blocks/misc/Testimonial.tsx
|
1017
|
-
var
|
1134
|
+
var import_react24 = __toESM(require("react"));
|
1018
1135
|
var Testimonial = () => {
|
1019
|
-
return /* @__PURE__ */
|
1136
|
+
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
1137
|
"path",
|
1021
1138
|
{
|
1022
1139
|
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
1140
|
fill: "#FFFFFF"
|
1024
1141
|
}
|
1025
|
-
), /* @__PURE__ */
|
1142
|
+
), /* @__PURE__ */ import_react24.default.createElement(
|
1026
1143
|
"path",
|
1027
1144
|
{
|
1028
1145
|
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
1146
|
fill: "#FFFFFF"
|
1030
1147
|
}
|
1031
|
-
)), /* @__PURE__ */
|
1148
|
+
)), /* @__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
1149
|
};
|
1033
1150
|
|
1034
1151
|
// blocks/misc/LeadGenerator.tsx
|
1035
|
-
var
|
1152
|
+
var import_react27 = __toESM(require("react"));
|
1036
1153
|
var import_react_hook_form = require("react-hook-form");
|
1037
1154
|
|
1038
1155
|
// elements/input/Input.tsx
|
1039
|
-
var
|
1156
|
+
var import_react26 = __toESM(require("react"));
|
1040
1157
|
|
1041
1158
|
// elements/skeleton/Skeleton.tsx
|
1042
|
-
var
|
1159
|
+
var import_react25 = __toESM(require("react"));
|
1043
1160
|
function Skeleton({
|
1044
1161
|
className,
|
1045
1162
|
content,
|
@@ -1058,7 +1175,7 @@ function Skeleton({
|
|
1058
1175
|
right: "hawa-mask-fade-right",
|
1059
1176
|
left: "hawa-mask-fade-left "
|
1060
1177
|
};
|
1061
|
-
return /* @__PURE__ */
|
1178
|
+
return /* @__PURE__ */ import_react25.default.createElement(
|
1062
1179
|
"div",
|
1063
1180
|
{
|
1064
1181
|
className: cn(
|
@@ -1074,7 +1191,7 @@ function Skeleton({
|
|
1074
1191
|
}
|
1075
1192
|
|
1076
1193
|
// elements/input/Input.tsx
|
1077
|
-
var Input = (0,
|
1194
|
+
var Input = (0, import_react26.forwardRef)(
|
1078
1195
|
({
|
1079
1196
|
margin = "none",
|
1080
1197
|
width = "full",
|
@@ -1118,7 +1235,7 @@ var Input = (0, import_react25.forwardRef)(
|
|
1118
1235
|
props.onChange(newEvent);
|
1119
1236
|
}
|
1120
1237
|
};
|
1121
|
-
return /* @__PURE__ */
|
1238
|
+
return /* @__PURE__ */ import_react26.default.createElement(
|
1122
1239
|
"div",
|
1123
1240
|
{
|
1124
1241
|
className: cn(
|
@@ -1129,8 +1246,8 @@ var Input = (0, import_react25.forwardRef)(
|
|
1129
1246
|
"hawa-w-full hawa-gap-2"
|
1130
1247
|
)
|
1131
1248
|
},
|
1132
|
-
props.label && /* @__PURE__ */
|
1133
|
-
/* @__PURE__ */
|
1249
|
+
props.label && /* @__PURE__ */ import_react26.default.createElement(Label, { ...labelProps }, props.label),
|
1250
|
+
/* @__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
1251
|
"span",
|
1135
1252
|
{
|
1136
1253
|
className: cn(
|
@@ -1139,12 +1256,12 @@ var Input = (0, import_react25.forwardRef)(
|
|
1139
1256
|
)
|
1140
1257
|
},
|
1141
1258
|
props.outsidePrefix
|
1142
|
-
), props.isLoading ? /* @__PURE__ */
|
1259
|
+
), 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
1260
|
Skeleton,
|
1144
1261
|
{
|
1145
1262
|
animation: "none",
|
1146
1263
|
className: "hawa-h-[40px] hawa-w-full !hawa-bg-destructive/[0.3]",
|
1147
|
-
content: /* @__PURE__ */
|
1264
|
+
content: /* @__PURE__ */ import_react26.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-2" }, /* @__PURE__ */ import_react26.default.createElement(
|
1148
1265
|
"svg",
|
1149
1266
|
{
|
1150
1267
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -1158,12 +1275,12 @@ var Input = (0, import_react25.forwardRef)(
|
|
1158
1275
|
strokeLinejoin: "round",
|
1159
1276
|
className: "hawa-text-destructive"
|
1160
1277
|
},
|
1161
|
-
/* @__PURE__ */
|
1162
|
-
/* @__PURE__ */
|
1163
|
-
/* @__PURE__ */
|
1164
|
-
), /* @__PURE__ */
|
1278
|
+
/* @__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" }),
|
1279
|
+
/* @__PURE__ */ import_react26.default.createElement("path", { d: "M12 9v4" }),
|
1280
|
+
/* @__PURE__ */ import_react26.default.createElement("path", { d: "M12 17h.01" })
|
1281
|
+
), /* @__PURE__ */ import_react26.default.createElement("span", null, /* @__PURE__ */ import_react26.default.createElement("span", { className: "hawa-text-destructive" }, props.loadingErrorMesssage || "Error loading data")))
|
1165
1282
|
}
|
1166
|
-
)) : /* @__PURE__ */
|
1283
|
+
)) : /* @__PURE__ */ import_react26.default.createElement(import_react26.default.Fragment, null, !props.hideSeparator && /* @__PURE__ */ import_react26.default.createElement(
|
1167
1284
|
"div",
|
1168
1285
|
{
|
1169
1286
|
className: cn(
|
@@ -1171,7 +1288,7 @@ var Input = (0, import_react25.forwardRef)(
|
|
1171
1288
|
preview ? "hawa-opacity-100" : "hawa-opacity-0"
|
1172
1289
|
)
|
1173
1290
|
}
|
1174
|
-
), /* @__PURE__ */
|
1291
|
+
), /* @__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
1292
|
"div",
|
1176
1293
|
{
|
1177
1294
|
className: cn(
|
@@ -1180,7 +1297,7 @@ var Input = (0, import_react25.forwardRef)(
|
|
1180
1297
|
)
|
1181
1298
|
},
|
1182
1299
|
props.endIcon
|
1183
|
-
), /* @__PURE__ */
|
1300
|
+
), /* @__PURE__ */ import_react26.default.createElement(
|
1184
1301
|
"input",
|
1185
1302
|
{
|
1186
1303
|
required: true,
|
@@ -1206,7 +1323,7 @@ var Input = (0, import_react25.forwardRef)(
|
|
1206
1323
|
inputProps == null ? void 0 : inputProps.className
|
1207
1324
|
)
|
1208
1325
|
}
|
1209
|
-
)), !forceHideHelperText && /* @__PURE__ */
|
1326
|
+
)), !forceHideHelperText && /* @__PURE__ */ import_react26.default.createElement(
|
1210
1327
|
"p",
|
1211
1328
|
{
|
1212
1329
|
className: cn(
|
@@ -1215,7 +1332,7 @@ var Input = (0, import_react25.forwardRef)(
|
|
1215
1332
|
)
|
1216
1333
|
},
|
1217
1334
|
props.helperText
|
1218
|
-
), !props.disabled && forceHideHelperText && /* @__PURE__ */
|
1335
|
+
), !props.disabled && forceHideHelperText && /* @__PURE__ */ import_react26.default.createElement(
|
1219
1336
|
"div",
|
1220
1337
|
{
|
1221
1338
|
className: cn(
|
@@ -1224,7 +1341,7 @@ var Input = (0, import_react25.forwardRef)(
|
|
1224
1341
|
)
|
1225
1342
|
},
|
1226
1343
|
props.helperText
|
1227
|
-
), showCount && /* @__PURE__ */
|
1344
|
+
), showCount && /* @__PURE__ */ import_react26.default.createElement(
|
1228
1345
|
"div",
|
1229
1346
|
{
|
1230
1347
|
className: cn(
|
@@ -1255,14 +1372,14 @@ var LeadGenerator = ({ texts, submitHandler }) => {
|
|
1255
1372
|
console.log("handleNewsletterSub props was not provided");
|
1256
1373
|
}
|
1257
1374
|
};
|
1258
|
-
return /* @__PURE__ */
|
1375
|
+
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
1376
|
"form",
|
1260
1377
|
{
|
1261
1378
|
noValidate: true,
|
1262
1379
|
className: "hawa-flex hawa-flex-row hawa-gap-2",
|
1263
1380
|
onSubmit: handleSubmit(onSubmit)
|
1264
1381
|
},
|
1265
|
-
/* @__PURE__ */
|
1382
|
+
/* @__PURE__ */ import_react27.default.createElement(
|
1266
1383
|
import_react_hook_form.Controller,
|
1267
1384
|
{
|
1268
1385
|
name: "email",
|
@@ -1275,27 +1392,27 @@ var LeadGenerator = ({ texts, submitHandler }) => {
|
|
1275
1392
|
}
|
1276
1393
|
},
|
1277
1394
|
defaultValue: "",
|
1278
|
-
render: ({ field }) => /* @__PURE__ */
|
1395
|
+
render: ({ field }) => /* @__PURE__ */ import_react27.default.createElement(Input, { ...field, type: "email", placeholder: "example@sikka.io" })
|
1279
1396
|
}
|
1280
1397
|
),
|
1281
|
-
/* @__PURE__ */
|
1398
|
+
/* @__PURE__ */ import_react27.default.createElement(Button, { type: "submit", disabled: !formState.isValid }, (_a = texts == null ? void 0 : texts.submit) != null ? _a : "Submit")
|
1282
1399
|
)));
|
1283
1400
|
};
|
1284
1401
|
|
1285
1402
|
// blocks/misc/Announcement.tsx
|
1286
|
-
var
|
1403
|
+
var import_react28 = __toESM(require("react"));
|
1287
1404
|
var Announcement = ({
|
1288
1405
|
onActionClick,
|
1289
1406
|
...props
|
1290
1407
|
}) => {
|
1291
|
-
return /* @__PURE__ */
|
1408
|
+
return /* @__PURE__ */ import_react28.default.createElement(Card, null, /* @__PURE__ */ import_react28.default.createElement(
|
1292
1409
|
CardContent,
|
1293
1410
|
{
|
1294
1411
|
headless: true,
|
1295
1412
|
className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-between"
|
1296
1413
|
},
|
1297
|
-
/* @__PURE__ */
|
1298
|
-
/* @__PURE__ */
|
1414
|
+
/* @__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)),
|
1415
|
+
/* @__PURE__ */ import_react28.default.createElement(
|
1299
1416
|
Button,
|
1300
1417
|
{
|
1301
1418
|
onClick: () => onActionClick(),
|
@@ -1307,15 +1424,15 @@ var Announcement = ({
|
|
1307
1424
|
};
|
1308
1425
|
|
1309
1426
|
// blocks/misc/NotFound.tsx
|
1310
|
-
var
|
1427
|
+
var import_react29 = __toESM(require("react"));
|
1311
1428
|
var NotFound = ({ texts }) => {
|
1312
|
-
return /* @__PURE__ */
|
1429
|
+
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
1430
|
};
|
1314
1431
|
|
1315
1432
|
// blocks/misc/NoPermission.tsx
|
1316
|
-
var
|
1433
|
+
var import_react30 = __toESM(require("react"));
|
1317
1434
|
var NoPermission = ({ texts }) => {
|
1318
|
-
return /* @__PURE__ */
|
1435
|
+
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
1436
|
"svg",
|
1320
1437
|
{
|
1321
1438
|
stroke: "currentColor",
|
@@ -1325,18 +1442,18 @@ var NoPermission = ({ texts }) => {
|
|
1325
1442
|
height: "0.35em",
|
1326
1443
|
width: "0.35em"
|
1327
1444
|
},
|
1328
|
-
/* @__PURE__ */
|
1329
|
-
)), /* @__PURE__ */
|
1445
|
+
/* @__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" })
|
1446
|
+
)), /* @__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
1447
|
};
|
1331
1448
|
|
1332
1449
|
// blocks/misc/ContactForm.tsx
|
1333
|
-
var
|
1450
|
+
var import_react32 = __toESM(require("react"));
|
1334
1451
|
var import_react_hook_form2 = require("react-hook-form");
|
1335
1452
|
var import_zod = require("@hookform/resolvers/zod");
|
1336
1453
|
var z = __toESM(require("zod"));
|
1337
1454
|
|
1338
1455
|
// elements/select/Select.tsx
|
1339
|
-
var
|
1456
|
+
var import_react31 = __toESM(require("react"));
|
1340
1457
|
var import_react_select = __toESM(require("react-select"));
|
1341
1458
|
var import_creatable = __toESM(require("react-select/creatable"));
|
1342
1459
|
var import_clsx2 = __toESM(require("clsx"));
|
@@ -1347,10 +1464,10 @@ var Select = ({
|
|
1347
1464
|
}) => {
|
1348
1465
|
const NoOption = () => {
|
1349
1466
|
var _a, _b;
|
1350
|
-
return /* @__PURE__ */
|
1467
|
+
return /* @__PURE__ */ import_react31.default.createElement("div", null, (_b = (_a = props.texts) == null ? void 0 : _a.noOptions) != null ? _b : "No Items Found");
|
1351
1468
|
};
|
1352
1469
|
const Control = ({ children, innerProps, innerRef }) => {
|
1353
|
-
return /* @__PURE__ */
|
1470
|
+
return /* @__PURE__ */ import_react31.default.createElement(
|
1354
1471
|
"div",
|
1355
1472
|
{
|
1356
1473
|
ref: innerRef,
|
@@ -1363,7 +1480,7 @@ var Select = ({
|
|
1363
1480
|
);
|
1364
1481
|
};
|
1365
1482
|
const Option = ({ children, innerProps, innerRef }) => {
|
1366
|
-
return /* @__PURE__ */
|
1483
|
+
return /* @__PURE__ */ import_react31.default.createElement(
|
1367
1484
|
"div",
|
1368
1485
|
{
|
1369
1486
|
ref: innerRef,
|
@@ -1384,7 +1501,7 @@ var Select = ({
|
|
1384
1501
|
...menuProps
|
1385
1502
|
}) => {
|
1386
1503
|
const menuOpen = menuProps.selectProps.menuIsOpen;
|
1387
|
-
return /* @__PURE__ */
|
1504
|
+
return /* @__PURE__ */ import_react31.default.createElement(
|
1388
1505
|
"div",
|
1389
1506
|
{
|
1390
1507
|
className: cn(
|
@@ -1398,7 +1515,11 @@ var Select = ({
|
|
1398
1515
|
children
|
1399
1516
|
);
|
1400
1517
|
};
|
1401
|
-
|
1518
|
+
let phoneCodeStyles = "hawa-min-w-[65px] hawa-text-right hawa-w-[100px] hawa-p-0 hawa-rounded-r-none hawa-h-[40px]";
|
1519
|
+
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";
|
1520
|
+
let selectPlaceholderStyles = "hawa-text-muted-foreground hawa-cursor-pointer hawa-px-1";
|
1521
|
+
let selectIndicatorContainerStyles = "hawa-cursor-pointer hawa-text-muted-foreground hawa-absolute hawa-end-0 hawa-top-[50%] hawa-bottom-[50%] ";
|
1522
|
+
return /* @__PURE__ */ import_react31.default.createElement(
|
1402
1523
|
"div",
|
1403
1524
|
{
|
1404
1525
|
className: cn(
|
@@ -1406,10 +1527,10 @@ var Select = ({
|
|
1406
1527
|
props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
|
1407
1528
|
)
|
1408
1529
|
},
|
1409
|
-
props.label && /* @__PURE__ */
|
1410
|
-
props.isLoading ? /* @__PURE__ */
|
1530
|
+
props.label && /* @__PURE__ */ import_react31.default.createElement(Label, { ...labelProps }, props.label),
|
1531
|
+
props.isLoading ? /* @__PURE__ */ import_react31.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? (
|
1411
1532
|
// TODO: enable keyboard to go to the next item in the list
|
1412
|
-
/* @__PURE__ */
|
1533
|
+
/* @__PURE__ */ import_react31.default.createElement(
|
1413
1534
|
import_react_select.default,
|
1414
1535
|
{
|
1415
1536
|
noOptionsMessage: NoOption,
|
@@ -1419,26 +1540,22 @@ var Select = ({
|
|
1419
1540
|
props.controlClassNames
|
1420
1541
|
),
|
1421
1542
|
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",
|
1543
|
+
selectContainerStyles,
|
1544
|
+
props.phoneCode && phoneCodeStyles,
|
1425
1545
|
props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer",
|
1426
1546
|
props.isMulti && "hawa-ps-0 "
|
1427
1547
|
),
|
1428
|
-
placeholder: () =>
|
1548
|
+
placeholder: () => selectPlaceholderStyles,
|
1429
1549
|
valueContainer: () => "hawa-text-foreground hawa-px-1 ",
|
1430
1550
|
singleValue: () => "hawa-text-foreground",
|
1431
1551
|
indicatorsContainer: () => cn(
|
1432
|
-
|
1552
|
+
selectIndicatorContainerStyles,
|
1433
1553
|
props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
|
1434
1554
|
)
|
1435
1555
|
},
|
1436
1556
|
unstyled: true,
|
1437
|
-
|
1438
|
-
|
1439
|
-
Menu,
|
1440
|
-
IndicatorsContainer: () => null
|
1441
|
-
} : {
|
1557
|
+
autoFocus: false,
|
1558
|
+
components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : {
|
1442
1559
|
Option,
|
1443
1560
|
Menu,
|
1444
1561
|
// Control: (e) => (
|
@@ -1447,7 +1564,7 @@ var Select = ({
|
|
1447
1564
|
// {...e}
|
1448
1565
|
// />
|
1449
1566
|
// ),
|
1450
|
-
ValueContainer: (e) => /* @__PURE__ */
|
1567
|
+
ValueContainer: (e) => /* @__PURE__ */ import_react31.default.createElement(
|
1451
1568
|
"div",
|
1452
1569
|
{
|
1453
1570
|
className: cn(
|
@@ -1457,13 +1574,10 @@ var Select = ({
|
|
1457
1574
|
...e
|
1458
1575
|
}
|
1459
1576
|
),
|
1460
|
-
MultiValueContainer: (e) => /* @__PURE__ */
|
1577
|
+
MultiValueContainer: (e) => /* @__PURE__ */ import_react31.default.createElement(
|
1461
1578
|
"div",
|
1462
1579
|
{
|
1463
|
-
className:
|
1464
|
-
// e.className,
|
1465
|
-
"hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row"
|
1466
|
-
),
|
1580
|
+
className: "hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row",
|
1467
1581
|
...e
|
1468
1582
|
}
|
1469
1583
|
)
|
@@ -1479,7 +1593,7 @@ var Select = ({
|
|
1479
1593
|
isSearchable: props.isSearchable
|
1480
1594
|
}
|
1481
1595
|
)
|
1482
|
-
) : /* @__PURE__ */
|
1596
|
+
) : /* @__PURE__ */ import_react31.default.createElement(
|
1483
1597
|
import_creatable.default,
|
1484
1598
|
{
|
1485
1599
|
formatCreateLabel: (inputValue) => {
|
@@ -1509,7 +1623,7 @@ var Select = ({
|
|
1509
1623
|
onInputChange: (newValue, action) => props.onInputChange(newValue, action)
|
1510
1624
|
}
|
1511
1625
|
),
|
1512
|
-
!props.hideHelperText && /* @__PURE__ */
|
1626
|
+
!props.hideHelperText && /* @__PURE__ */ import_react31.default.createElement(
|
1513
1627
|
"p",
|
1514
1628
|
{
|
1515
1629
|
className: cn(
|
@@ -1650,7 +1764,7 @@ var ContactForm = ({
|
|
1650
1764
|
console.log("Form is submitted but onSubmit prop is missing");
|
1651
1765
|
}
|
1652
1766
|
};
|
1653
|
-
return /* @__PURE__ */
|
1767
|
+
return /* @__PURE__ */ import_react32.default.createElement(
|
1654
1768
|
Card,
|
1655
1769
|
{
|
1656
1770
|
className: cn(
|
@@ -1659,7 +1773,7 @@ var ContactForm = ({
|
|
1659
1773
|
),
|
1660
1774
|
style: cardless ? { boxShadow: "none" } : void 0
|
1661
1775
|
},
|
1662
|
-
/* @__PURE__ */
|
1776
|
+
/* @__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
1777
|
"form",
|
1664
1778
|
{
|
1665
1779
|
noValidate: true,
|
@@ -1668,7 +1782,7 @@ var ContactForm = ({
|
|
1668
1782
|
id: formId,
|
1669
1783
|
autoComplete: formAutoComplete
|
1670
1784
|
},
|
1671
|
-
/* @__PURE__ */
|
1785
|
+
/* @__PURE__ */ import_react32.default.createElement(
|
1672
1786
|
"div",
|
1673
1787
|
{
|
1674
1788
|
className: cn(
|
@@ -1679,14 +1793,14 @@ var ContactForm = ({
|
|
1679
1793
|
}
|
1680
1794
|
)
|
1681
1795
|
},
|
1682
|
-
/* @__PURE__ */
|
1796
|
+
/* @__PURE__ */ import_react32.default.createElement(
|
1683
1797
|
import_react_hook_form2.Controller,
|
1684
1798
|
{
|
1685
1799
|
control,
|
1686
1800
|
name: "name",
|
1687
1801
|
render: ({ field }) => {
|
1688
1802
|
var _a2;
|
1689
|
-
return /* @__PURE__ */
|
1803
|
+
return /* @__PURE__ */ import_react32.default.createElement(
|
1690
1804
|
Input,
|
1691
1805
|
{
|
1692
1806
|
label: (texts == null ? void 0 : texts.name.label) || "Name",
|
@@ -1699,14 +1813,14 @@ var ContactForm = ({
|
|
1699
1813
|
}
|
1700
1814
|
}
|
1701
1815
|
),
|
1702
|
-
/* @__PURE__ */
|
1816
|
+
/* @__PURE__ */ import_react32.default.createElement(
|
1703
1817
|
import_react_hook_form2.Controller,
|
1704
1818
|
{
|
1705
1819
|
control,
|
1706
1820
|
name: "email",
|
1707
1821
|
render: ({ field }) => {
|
1708
1822
|
var _a2;
|
1709
|
-
return /* @__PURE__ */
|
1823
|
+
return /* @__PURE__ */ import_react32.default.createElement(
|
1710
1824
|
Input,
|
1711
1825
|
{
|
1712
1826
|
label: (texts == null ? void 0 : texts.email.label) || "Email",
|
@@ -1722,7 +1836,7 @@ var ContactForm = ({
|
|
1722
1836
|
),
|
1723
1837
|
customFields && customFields.map((customField) => {
|
1724
1838
|
console.log("custom", customField);
|
1725
|
-
return /* @__PURE__ */
|
1839
|
+
return /* @__PURE__ */ import_react32.default.createElement(
|
1726
1840
|
import_react_hook_form2.Controller,
|
1727
1841
|
{
|
1728
1842
|
control,
|
@@ -1732,7 +1846,7 @@ var ContactForm = ({
|
|
1732
1846
|
switch (type) {
|
1733
1847
|
case "text":
|
1734
1848
|
case "number":
|
1735
|
-
return /* @__PURE__ */
|
1849
|
+
return /* @__PURE__ */ import_react32.default.createElement(
|
1736
1850
|
Input,
|
1737
1851
|
{
|
1738
1852
|
id: customField.name,
|
@@ -1743,7 +1857,7 @@ var ContactForm = ({
|
|
1743
1857
|
}
|
1744
1858
|
);
|
1745
1859
|
case "select":
|
1746
|
-
return /* @__PURE__ */
|
1860
|
+
return /* @__PURE__ */ import_react32.default.createElement(
|
1747
1861
|
Select,
|
1748
1862
|
{
|
1749
1863
|
label,
|
@@ -1753,20 +1867,20 @@ var ContactForm = ({
|
|
1753
1867
|
}
|
1754
1868
|
);
|
1755
1869
|
default:
|
1756
|
-
return /* @__PURE__ */
|
1870
|
+
return /* @__PURE__ */ import_react32.default.createElement("div", null, "Unknown type");
|
1757
1871
|
}
|
1758
1872
|
}
|
1759
1873
|
}
|
1760
1874
|
);
|
1761
1875
|
}),
|
1762
|
-
/* @__PURE__ */
|
1876
|
+
/* @__PURE__ */ import_react32.default.createElement(
|
1763
1877
|
import_react_hook_form2.Controller,
|
1764
1878
|
{
|
1765
1879
|
control,
|
1766
1880
|
name: "message",
|
1767
1881
|
render: ({ field }) => {
|
1768
1882
|
var _a2;
|
1769
|
-
return /* @__PURE__ */
|
1883
|
+
return /* @__PURE__ */ import_react32.default.createElement(
|
1770
1884
|
Textarea,
|
1771
1885
|
{
|
1772
1886
|
label: (texts == null ? void 0 : texts.message.label) || "Message",
|
@@ -1783,7 +1897,7 @@ var ContactForm = ({
|
|
1783
1897
|
}
|
1784
1898
|
}
|
1785
1899
|
),
|
1786
|
-
/* @__PURE__ */
|
1900
|
+
/* @__PURE__ */ import_react32.default.createElement(Button, { type: "submit", className: "hawa-w-full" }, (texts == null ? void 0 : texts.submit) || "Submit")
|
1787
1901
|
))
|
1788
1902
|
);
|
1789
1903
|
};
|