@sikka/hawa 0.30.26-next → 0.30.27-next
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blocks/index.js +310 -204
- package/dist/blocks/index.mjs +3 -2
- package/dist/blocks/misc/index.js +254 -148
- package/dist/blocks/misc/index.mjs +175 -69
- package/dist/chunk-R2SKHHDK.mjs +411 -0
- package/dist/{chunk-QDRFTC7W.mjs → chunk-SW7UK35T.mjs} +39 -13
- package/dist/{chunk-H7ZADF2Z.mjs → chunk-UDCDD66A.mjs} +8 -0
- package/dist/elements/index.js +389 -288
- package/dist/elements/index.mjs +5 -5
- package/dist/floatBox/index.d.mts +2 -0
- package/dist/floatBox/index.d.ts +2 -0
- package/dist/floatBox/index.js +23 -11
- package/dist/floatBox/index.js.map +1 -1
- package/dist/floatBox/index.mjs +23 -11
- package/dist/floatBox/index.mjs.map +1 -1
- package/dist/hooks/index.d.mts +12 -2
- package/dist/hooks/index.d.ts +12 -2
- package/dist/hooks/index.js +36 -0
- package/dist/hooks/index.mjs +16 -340
- package/dist/index.d.mts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +4233 -4174
- package/dist/index.mjs +1481 -1423
- package/dist/layout/index.mjs +3 -4
- package/dist/tabs/index.js +137 -31
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +137 -31
- package/dist/tabs/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-4OOSUQZG.mjs +0 -12
- package/dist/chunk-57SB6MBG.mjs +0 -31
@@ -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_react17 = __toESM(require("react"));
|
47
47
|
|
48
48
|
// elements/scrollArea/ScrollArea.tsx
|
49
49
|
var React = __toESM(require("react"));
|
@@ -95,13 +95,96 @@ var ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...prop
|
|
95
95
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
96
96
|
|
97
97
|
// elements/tabs/Tabs.tsx
|
98
|
+
var React12 = __toESM(require("react"));
|
99
|
+
|
100
|
+
// hooks/useIsomorphicEffect.ts
|
101
|
+
var import_react = require("react");
|
102
|
+
|
103
|
+
// hooks/useDiscloser.ts
|
104
|
+
var import_react2 = require("react");
|
105
|
+
|
106
|
+
// hooks/useHover.ts
|
107
|
+
var import_react3 = require("react");
|
108
|
+
|
109
|
+
// hooks/useToast.ts
|
98
110
|
var React4 = __toESM(require("react"));
|
111
|
+
|
112
|
+
// hooks/useCarousel.ts
|
113
|
+
var import_react4 = require("react");
|
114
|
+
|
115
|
+
// hooks/useDialogCarousel.ts
|
116
|
+
var import_react5 = require("react");
|
117
|
+
var import_embla_carousel_auto_height = __toESM(require("embla-carousel-auto-height"));
|
118
|
+
var import_embla_carousel_react = __toESM(require("embla-carousel-react"));
|
119
|
+
|
120
|
+
// hooks/useDialogSteps.ts
|
121
|
+
var import_react6 = require("react");
|
122
|
+
|
123
|
+
// hooks/useClipboard.ts
|
124
|
+
var import_react7 = require("react");
|
125
|
+
|
126
|
+
// hooks/useBreakpoint.ts
|
127
|
+
var import_react8 = require("react");
|
128
|
+
|
129
|
+
// hooks/useWindowSize.ts
|
130
|
+
var import_react9 = require("react");
|
131
|
+
|
132
|
+
// hooks/useFocusWithin.ts
|
133
|
+
var import_react10 = require("react");
|
134
|
+
|
135
|
+
// hooks/useMediaQuery.ts
|
136
|
+
var import_react11 = require("react");
|
137
|
+
|
138
|
+
// hooks/useScrollPosition.ts
|
139
|
+
var import_react12 = require("react");
|
140
|
+
|
141
|
+
// hooks/useTable.ts
|
142
|
+
var import_react13 = require("react");
|
143
|
+
|
144
|
+
// hooks/useTabs.ts
|
145
|
+
var import_react14 = require("react");
|
146
|
+
|
147
|
+
// hooks/useMeasureDirty.ts
|
148
|
+
var import_react15 = require("react");
|
149
|
+
var useMeasureDirty = (ref) => {
|
150
|
+
const frame = (0, import_react15.useRef)(0);
|
151
|
+
const [rect, set] = (0, import_react15.useState)({
|
152
|
+
width: 0,
|
153
|
+
height: 0,
|
154
|
+
top: 0,
|
155
|
+
left: 0,
|
156
|
+
bottom: 0,
|
157
|
+
right: 0
|
158
|
+
});
|
159
|
+
const [observer] = (0, import_react15.useState)(
|
160
|
+
() => new ResizeObserver((entries) => {
|
161
|
+
const entry = entries[0];
|
162
|
+
if (entry) {
|
163
|
+
cancelAnimationFrame(frame.current);
|
164
|
+
frame.current = requestAnimationFrame(() => {
|
165
|
+
if (ref.current) {
|
166
|
+
set(entry.contentRect);
|
167
|
+
}
|
168
|
+
});
|
169
|
+
}
|
170
|
+
})
|
171
|
+
);
|
172
|
+
(0, import_react15.useEffect)(() => {
|
173
|
+
observer.disconnect();
|
174
|
+
if (ref.current) {
|
175
|
+
observer.observe(ref.current);
|
176
|
+
}
|
177
|
+
}, [ref]);
|
178
|
+
return rect;
|
179
|
+
};
|
180
|
+
|
181
|
+
// elements/tabs/Tabs.tsx
|
99
182
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"));
|
100
183
|
var import_tailwind_variants = require("tailwind-variants");
|
101
184
|
|
102
185
|
// elements/chip/Chip.tsx
|
103
|
-
var
|
104
|
-
var Chip =
|
186
|
+
var import_react16 = __toESM(require("react"));
|
187
|
+
var Chip = import_react16.default.forwardRef(
|
105
188
|
({
|
106
189
|
label,
|
107
190
|
size = "normal",
|
@@ -143,7 +226,7 @@ var Chip = import_react.default.forwardRef(
|
|
143
226
|
oceanic: "hawa-text-white hawa-bg-gradient-to-bl hawa-from-green-300 hawa-via-blue-500 hawa-to-purple-600"
|
144
227
|
};
|
145
228
|
if (label) {
|
146
|
-
return /* @__PURE__ */
|
229
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
147
230
|
"span",
|
148
231
|
{
|
149
232
|
...rest,
|
@@ -155,7 +238,7 @@ var Chip = import_react.default.forwardRef(
|
|
155
238
|
color ? colorStyles[color] : "hawa-border hawa-bg-none"
|
156
239
|
)
|
157
240
|
},
|
158
|
-
dotType && /* @__PURE__ */
|
241
|
+
dotType && /* @__PURE__ */ import_react16.default.createElement(
|
159
242
|
"span",
|
160
243
|
{
|
161
244
|
className: cn(dotStyles[size], dotTypeStyles[dotType])
|
@@ -165,7 +248,7 @@ var Chip = import_react.default.forwardRef(
|
|
165
248
|
label
|
166
249
|
);
|
167
250
|
} else {
|
168
|
-
return /* @__PURE__ */
|
251
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
169
252
|
"span",
|
170
253
|
{
|
171
254
|
...rest,
|
@@ -181,33 +264,45 @@ var Chip = import_react.default.forwardRef(
|
|
181
264
|
);
|
182
265
|
|
183
266
|
// elements/floatBox/FloatBox.tsx
|
184
|
-
var
|
267
|
+
var React11 = __toESM(require("react"));
|
185
268
|
var FloatBox = ({
|
186
269
|
className,
|
187
270
|
open,
|
188
271
|
side = "bottom",
|
189
272
|
sideOffset = 40,
|
273
|
+
align = "center",
|
190
274
|
...props
|
191
275
|
}) => {
|
192
|
-
let
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
top: {
|
199
|
-
|
200
|
-
|
276
|
+
let stylesMap = {
|
277
|
+
bottom: {
|
278
|
+
start: { top: sideOffset, insetInlineStart: 0 },
|
279
|
+
center: { top: sideOffset },
|
280
|
+
end: { top: sideOffset, insetInlineEnd: 0 }
|
281
|
+
},
|
282
|
+
top: {
|
283
|
+
start: { bottom: sideOffset, insetInlineStart: 0 },
|
284
|
+
center: { bottom: sideOffset },
|
285
|
+
end: { bottom: sideOffset, insetInlineEnd: 0 }
|
286
|
+
},
|
287
|
+
right: {
|
288
|
+
start: { left: sideOffset, top: -5 },
|
289
|
+
center: { left: sideOffset },
|
290
|
+
end: { left: sideOffset, bottom: 0 }
|
291
|
+
},
|
292
|
+
left: {
|
293
|
+
start: { right: sideOffset, top: 0 },
|
294
|
+
center: { right: sideOffset },
|
295
|
+
end: { right: sideOffset, bottom: 0 }
|
296
|
+
}
|
201
297
|
};
|
202
|
-
return /* @__PURE__ */
|
298
|
+
return /* @__PURE__ */ React11.createElement(
|
203
299
|
"div",
|
204
300
|
{
|
205
301
|
className: cn(
|
206
302
|
"data-[floatbox-state=closed]:hawa-invisible data-[floatbox-state=open]:hawa-visible hawa-absolute dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[floatbox-state=open]:hawa-animate-in data-[floatbox-state=closed]:hawa-animate-out data-[floatbox-state=closed]:hawa-fade-out-0 data-[floatbox-state=open]:hawa-fade-in-0 data-[floatbox-state=closed]:hawa-zoom-out-95 data-[floatbox-state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
|
207
|
-
sideOffsetStyles[side],
|
208
303
|
className
|
209
304
|
),
|
210
|
-
style: { ...
|
305
|
+
style: { ...stylesMap[side][align] },
|
211
306
|
"data-side": side,
|
212
307
|
"data-floatbox-state": open ? "open" : "closed"
|
213
308
|
},
|
@@ -274,8 +369,8 @@ var tabsTriggerVariant = (0, import_tailwind_variants.tv)({
|
|
274
369
|
],
|
275
370
|
defaultVariants: { variant: "default", orientation: "horizontal" }
|
276
371
|
});
|
277
|
-
var TabsContext =
|
278
|
-
var Tabs =
|
372
|
+
var TabsContext = React12.createContext({ orientation: "horizontal", variant: "default" });
|
373
|
+
var Tabs = React12.forwardRef(({ className, orientation, variant = "default", ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
279
374
|
TabsPrimitive.Root,
|
280
375
|
{
|
281
376
|
ref,
|
@@ -286,11 +381,11 @@ var Tabs = React4.forwardRef(({ className, orientation, variant = "default", ...
|
|
286
381
|
),
|
287
382
|
...props
|
288
383
|
},
|
289
|
-
/* @__PURE__ */
|
384
|
+
/* @__PURE__ */ React12.createElement(TabsContext.Provider, { value: { orientation, variant } }, props.children)
|
290
385
|
));
|
291
|
-
var TabsList =
|
292
|
-
const { orientation, variant } =
|
293
|
-
return /* @__PURE__ */
|
386
|
+
var TabsList = React12.forwardRef(({ className, ...props }, ref) => {
|
387
|
+
const { orientation, variant } = React12.useContext(TabsContext);
|
388
|
+
return /* @__PURE__ */ React12.createElement(
|
294
389
|
TabsPrimitive.List,
|
295
390
|
{
|
296
391
|
ref,
|
@@ -303,12 +398,14 @@ var TabsList = React4.forwardRef(({ className, ...props }, ref) => {
|
|
303
398
|
}
|
304
399
|
);
|
305
400
|
});
|
306
|
-
var TabsTrigger =
|
307
|
-
const { orientation, variant } =
|
308
|
-
|
401
|
+
var TabsTrigger = React12.forwardRef(({ className, chipProps, ...props }, ref) => {
|
402
|
+
const { orientation, variant } = React12.useContext(TabsContext);
|
403
|
+
const tabTriggerRef = React12.useRef(null);
|
404
|
+
const { width } = useMeasureDirty(tabTriggerRef);
|
405
|
+
return /* @__PURE__ */ React12.createElement(
|
309
406
|
TabsPrimitive.Trigger,
|
310
407
|
{
|
311
|
-
ref,
|
408
|
+
ref: tabTriggerRef,
|
312
409
|
className: cn(
|
313
410
|
tabsTriggerVariant({ variant, orientation }),
|
314
411
|
"hawa-relative",
|
@@ -317,11 +414,20 @@ var TabsTrigger = React4.forwardRef(({ className, chipProps, ...props }, ref) =>
|
|
317
414
|
...props
|
318
415
|
},
|
319
416
|
props.children,
|
320
|
-
chipProps && /* @__PURE__ */
|
321
|
-
/* @__PURE__ */
|
417
|
+
chipProps && /* @__PURE__ */ React12.createElement(Chip, { ...chipProps }),
|
418
|
+
/* @__PURE__ */ React12.createElement(
|
419
|
+
FloatBox,
|
420
|
+
{
|
421
|
+
align: orientation === "vertical" ? "start" : "start",
|
422
|
+
side: orientation === "vertical" ? "right" : "bottom",
|
423
|
+
sideOffset: orientation === "vertical" ? width + 30 : 45,
|
424
|
+
open: props.showPopover
|
425
|
+
},
|
426
|
+
props.popoverContent
|
427
|
+
)
|
322
428
|
);
|
323
429
|
});
|
324
|
-
var TabsContent =
|
430
|
+
var TabsContent = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
325
431
|
TabsPrimitive.Content,
|
326
432
|
{
|
327
433
|
ref,
|
@@ -339,7 +445,7 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
339
445
|
|
340
446
|
// blocks/misc/LegalTexts.tsx
|
341
447
|
var LegalTexts = ({ tabs, ...props }) => {
|
342
|
-
return /* @__PURE__ */
|
448
|
+
return /* @__PURE__ */ import_react17.default.createElement(
|
343
449
|
Tabs,
|
344
450
|
{
|
345
451
|
value: props.activeTab,
|
@@ -347,8 +453,8 @@ var LegalTexts = ({ tabs, ...props }) => {
|
|
347
453
|
defaultValue: props.defaultTab || tabs[0].value,
|
348
454
|
dir: props.direction
|
349
455
|
},
|
350
|
-
/* @__PURE__ */
|
351
|
-
tabs.map((tab, index) => /* @__PURE__ */
|
456
|
+
/* @__PURE__ */ import_react17.default.createElement(TabsList, { className: "hawa-w-full" }, tabs.map((tab, index) => /* @__PURE__ */ import_react17.default.createElement(TabsTrigger, { key: index, value: tab.value }, tab.title))),
|
457
|
+
tabs.map((tab, index) => /* @__PURE__ */ import_react17.default.createElement(TabsContent, { key: index, value: tab.value }, /* @__PURE__ */ import_react17.default.createElement(
|
352
458
|
ScrollArea,
|
353
459
|
{
|
354
460
|
className: cn(
|
@@ -362,14 +468,14 @@ var LegalTexts = ({ tabs, ...props }) => {
|
|
362
468
|
};
|
363
469
|
|
364
470
|
// blocks/misc/EmptyState.tsx
|
365
|
-
var
|
471
|
+
var import_react19 = __toESM(require("react"));
|
366
472
|
|
367
473
|
// elements/button/Button.tsx
|
368
|
-
var
|
474
|
+
var React15 = __toESM(require("react"));
|
369
475
|
var import_class_variance_authority = require("class-variance-authority");
|
370
476
|
|
371
477
|
// elements/loading/Loading.tsx
|
372
|
-
var
|
478
|
+
var import_react18 = __toESM(require("react"));
|
373
479
|
var Loading = ({
|
374
480
|
design = "spinner",
|
375
481
|
size = "normal",
|
@@ -400,7 +506,7 @@ var Loading = ({
|
|
400
506
|
};
|
401
507
|
switch (design.split("-")[0]) {
|
402
508
|
case "dots":
|
403
|
-
return /* @__PURE__ */
|
509
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
404
510
|
"div",
|
405
511
|
{
|
406
512
|
className: cn(
|
@@ -408,7 +514,7 @@ var Loading = ({
|
|
408
514
|
classNames == null ? void 0 : classNames.container
|
409
515
|
)
|
410
516
|
},
|
411
|
-
/* @__PURE__ */
|
517
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
412
518
|
"div",
|
413
519
|
{
|
414
520
|
className: cn(
|
@@ -419,7 +525,7 @@ var Loading = ({
|
|
419
525
|
)
|
420
526
|
}
|
421
527
|
),
|
422
|
-
/* @__PURE__ */
|
528
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
423
529
|
"div",
|
424
530
|
{
|
425
531
|
className: cn(
|
@@ -430,7 +536,7 @@ var Loading = ({
|
|
430
536
|
)
|
431
537
|
}
|
432
538
|
),
|
433
|
-
/* @__PURE__ */
|
539
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
434
540
|
"div",
|
435
541
|
{
|
436
542
|
className: cn(
|
@@ -443,7 +549,7 @@ var Loading = ({
|
|
443
549
|
)
|
444
550
|
);
|
445
551
|
case "square":
|
446
|
-
return /* @__PURE__ */
|
552
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
447
553
|
"svg",
|
448
554
|
{
|
449
555
|
className: cn(
|
@@ -455,7 +561,7 @@ var Loading = ({
|
|
455
561
|
height: "35",
|
456
562
|
width: "35"
|
457
563
|
},
|
458
|
-
/* @__PURE__ */
|
564
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
459
565
|
"rect",
|
460
566
|
{
|
461
567
|
className: "squircle-track",
|
@@ -467,7 +573,7 @@ var Loading = ({
|
|
467
573
|
height: "32.5"
|
468
574
|
}
|
469
575
|
),
|
470
|
-
/* @__PURE__ */
|
576
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
471
577
|
"rect",
|
472
578
|
{
|
473
579
|
className: "square-car",
|
@@ -482,7 +588,7 @@ var Loading = ({
|
|
482
588
|
)
|
483
589
|
);
|
484
590
|
case "squircle":
|
485
|
-
return /* @__PURE__ */
|
591
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
486
592
|
"svg",
|
487
593
|
{
|
488
594
|
x: "0px",
|
@@ -497,7 +603,7 @@ var Loading = ({
|
|
497
603
|
classNames == null ? void 0 : classNames.container
|
498
604
|
)
|
499
605
|
},
|
500
|
-
/* @__PURE__ */
|
606
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
501
607
|
"path",
|
502
608
|
{
|
503
609
|
className: cn("squircle-track", classNames == null ? void 0 : classNames.track),
|
@@ -507,7 +613,7 @@ var Loading = ({
|
|
507
613
|
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"
|
508
614
|
}
|
509
615
|
),
|
510
|
-
/* @__PURE__ */
|
616
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
511
617
|
"path",
|
512
618
|
{
|
513
619
|
className: cn("squircle-car", classNames == null ? void 0 : classNames.car),
|
@@ -519,7 +625,7 @@ var Loading = ({
|
|
519
625
|
)
|
520
626
|
);
|
521
627
|
case "progress":
|
522
|
-
return /* @__PURE__ */
|
628
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
523
629
|
"div",
|
524
630
|
{
|
525
631
|
className: cn(
|
@@ -530,9 +636,9 @@ var Loading = ({
|
|
530
636
|
}
|
531
637
|
);
|
532
638
|
case "orbit":
|
533
|
-
return /* @__PURE__ */
|
639
|
+
return /* @__PURE__ */ import_react18.default.createElement("div", { className: cn("orbit-container", classNames == null ? void 0 : classNames.container) });
|
534
640
|
default:
|
535
|
-
return /* @__PURE__ */
|
641
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
536
642
|
"svg",
|
537
643
|
{
|
538
644
|
viewBox: "0 0 40 40",
|
@@ -544,7 +650,7 @@ var Loading = ({
|
|
544
650
|
classNames == null ? void 0 : classNames.container
|
545
651
|
)
|
546
652
|
},
|
547
|
-
/* @__PURE__ */
|
653
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
548
654
|
"circle",
|
549
655
|
{
|
550
656
|
className: cn(
|
@@ -563,7 +669,7 @@ var Loading = ({
|
|
563
669
|
pathLength: "100"
|
564
670
|
}
|
565
671
|
),
|
566
|
-
/* @__PURE__ */
|
672
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
567
673
|
"circle",
|
568
674
|
{
|
569
675
|
className: cn(
|
@@ -620,7 +726,7 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
620
726
|
}
|
621
727
|
}
|
622
728
|
);
|
623
|
-
var Button =
|
729
|
+
var Button = React15.forwardRef(
|
624
730
|
({
|
625
731
|
className,
|
626
732
|
variant,
|
@@ -633,7 +739,7 @@ var Button = React7.forwardRef(
|
|
633
739
|
}, ref) => {
|
634
740
|
const Comp = "button";
|
635
741
|
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
636
|
-
return /* @__PURE__ */
|
742
|
+
return /* @__PURE__ */ React15.createElement(
|
637
743
|
Comp,
|
638
744
|
{
|
639
745
|
className: cn(
|
@@ -644,7 +750,7 @@ var Button = React7.forwardRef(
|
|
644
750
|
ref,
|
645
751
|
...props
|
646
752
|
},
|
647
|
-
isLoading ? /* @__PURE__ */
|
753
|
+
isLoading ? /* @__PURE__ */ React15.createElement(
|
648
754
|
Loading,
|
649
755
|
{
|
650
756
|
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
@@ -659,8 +765,8 @@ var Button = React7.forwardRef(
|
|
659
765
|
Button.displayName = "Button";
|
660
766
|
|
661
767
|
// elements/card/Card.tsx
|
662
|
-
var
|
663
|
-
var Card =
|
768
|
+
var React16 = __toESM(require("react"));
|
769
|
+
var Card = React16.forwardRef(
|
664
770
|
({ className, variant = "default", clickable = false, ...props }, ref) => {
|
665
771
|
let variantStyles = {
|
666
772
|
default: cn(
|
@@ -673,7 +779,7 @@ var Card = React8.forwardRef(
|
|
673
779
|
clickable && "hawa-cursor-pointer active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active active:translate-x-0.5 active:translate-y-0.5 active:shadow-color-primary-active"
|
674
780
|
)
|
675
781
|
};
|
676
|
-
return /* @__PURE__ */
|
782
|
+
return /* @__PURE__ */ React16.createElement(
|
677
783
|
"div",
|
678
784
|
{
|
679
785
|
ref,
|
@@ -683,7 +789,7 @@ var Card = React8.forwardRef(
|
|
683
789
|
);
|
684
790
|
}
|
685
791
|
);
|
686
|
-
var CardHeader =
|
792
|
+
var CardHeader = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React16.createElement(
|
687
793
|
"div",
|
688
794
|
{
|
689
795
|
ref,
|
@@ -694,7 +800,7 @@ var CardHeader = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
694
800
|
...props
|
695
801
|
}
|
696
802
|
));
|
697
|
-
var CardTitle =
|
803
|
+
var CardTitle = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React16.createElement(
|
698
804
|
"h3",
|
699
805
|
{
|
700
806
|
ref,
|
@@ -702,7 +808,7 @@ var CardTitle = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
702
808
|
...props
|
703
809
|
}
|
704
810
|
));
|
705
|
-
var CardDescription =
|
811
|
+
var CardDescription = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React16.createElement(
|
706
812
|
"p",
|
707
813
|
{
|
708
814
|
ref,
|
@@ -710,8 +816,8 @@ var CardDescription = React8.forwardRef(({ className, ...props }, ref) => /* @__
|
|
710
816
|
...props
|
711
817
|
}
|
712
818
|
));
|
713
|
-
var CardContent =
|
714
|
-
({ headless, noPadding, className, ...props }, ref) => /* @__PURE__ */
|
819
|
+
var CardContent = React16.forwardRef(
|
820
|
+
({ headless, noPadding, className, ...props }, ref) => /* @__PURE__ */ React16.createElement(
|
715
821
|
"div",
|
716
822
|
{
|
717
823
|
ref,
|
@@ -724,7 +830,7 @@ var CardContent = React8.forwardRef(
|
|
724
830
|
}
|
725
831
|
)
|
726
832
|
);
|
727
|
-
var CardFooter =
|
833
|
+
var CardFooter = React16.forwardRef(({ className, noPadding, ...props }, ref) => /* @__PURE__ */ React16.createElement(
|
728
834
|
"div",
|
729
835
|
{
|
730
836
|
ref,
|
@@ -745,7 +851,7 @@ Card.displayName = "Card";
|
|
745
851
|
|
746
852
|
// blocks/misc/EmptyState.tsx
|
747
853
|
var EmptyState = ({ texts, onActionClick }) => {
|
748
|
-
return /* @__PURE__ */
|
854
|
+
return /* @__PURE__ */ import_react19.default.createElement(Card, null, /* @__PURE__ */ import_react19.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react19.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-text-center " }, /* @__PURE__ */ import_react19.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_react19.default.createElement(
|
749
855
|
"svg",
|
750
856
|
{
|
751
857
|
stroke: "currentColor",
|
@@ -755,42 +861,42 @@ var EmptyState = ({ texts, onActionClick }) => {
|
|
755
861
|
height: "0.35em",
|
756
862
|
width: "0.35em"
|
757
863
|
},
|
758
|
-
/* @__PURE__ */
|
759
|
-
)), /* @__PURE__ */
|
864
|
+
/* @__PURE__ */ import_react19.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" })
|
865
|
+
)), /* @__PURE__ */ import_react19.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_react19.default.createElement(CardFooter, null, /* @__PURE__ */ import_react19.default.createElement(Button, { className: "hawa-w-full", onClick: () => onActionClick() }, (texts == null ? void 0 : texts.actionText) || "Go Home")));
|
760
866
|
};
|
761
867
|
|
762
868
|
// blocks/misc/Testimonial.tsx
|
763
|
-
var
|
869
|
+
var import_react20 = __toESM(require("react"));
|
764
870
|
var Testimonial = () => {
|
765
|
-
return /* @__PURE__ */
|
871
|
+
return /* @__PURE__ */ import_react20.default.createElement(Card, null, /* @__PURE__ */ import_react20.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react20.default.createElement("div", null, /* @__PURE__ */ import_react20.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_react20.default.createElement("div", { className: "flex flex-row gap-4" }, /* @__PURE__ */ import_react20.default.createElement("svg", { width: "48", height: "48", viewBox: "0 0 48 48", fill: "none" }, /* @__PURE__ */ import_react20.default.createElement("rect", { width: "48", height: "48", rx: "24", fill: "#45BE8B" }), /* @__PURE__ */ import_react20.default.createElement(
|
766
872
|
"path",
|
767
873
|
{
|
768
874
|
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",
|
769
875
|
fill: "#FFFFFF"
|
770
876
|
}
|
771
|
-
), /* @__PURE__ */
|
877
|
+
), /* @__PURE__ */ import_react20.default.createElement(
|
772
878
|
"path",
|
773
879
|
{
|
774
880
|
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",
|
775
881
|
fill: "#FFFFFF"
|
776
882
|
}
|
777
|
-
)), /* @__PURE__ */
|
883
|
+
)), /* @__PURE__ */ import_react20.default.createElement("span", { className: "border border-l " }), " ", /* @__PURE__ */ import_react20.default.createElement("div", null, /* @__PURE__ */ import_react20.default.createElement("strong", null, "Brent Lassi"), /* @__PURE__ */ import_react20.default.createElement("div", null, " Chief Information Security Officer")))));
|
778
884
|
};
|
779
885
|
|
780
886
|
// blocks/misc/LeadGenerator.tsx
|
781
|
-
var
|
887
|
+
var import_react24 = __toESM(require("react"));
|
782
888
|
var import_react_hook_form = require("react-hook-form");
|
783
889
|
|
784
890
|
// elements/input/Input.tsx
|
785
|
-
var
|
891
|
+
var import_react23 = __toESM(require("react"));
|
786
892
|
|
787
893
|
// elements/label/Label.tsx
|
788
|
-
var
|
894
|
+
var React20 = __toESM(require("react"));
|
789
895
|
|
790
896
|
// elements/tooltip/Tooltip.tsx
|
791
|
-
var
|
897
|
+
var import_react21 = __toESM(require("react"));
|
792
898
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
793
|
-
var TooltipContent =
|
899
|
+
var TooltipContent = import_react21.default.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ import_react21.default.createElement(
|
794
900
|
TooltipPrimitive.Content,
|
795
901
|
{
|
796
902
|
ref,
|
@@ -807,7 +913,7 @@ var TooltipContent = import_react6.default.forwardRef(({ className, sideOffset =
|
|
807
913
|
}
|
808
914
|
));
|
809
915
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
810
|
-
var TooltipArrow =
|
916
|
+
var TooltipArrow = import_react21.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ import_react21.default.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
811
917
|
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
812
918
|
var Tooltip = ({
|
813
919
|
side,
|
@@ -824,13 +930,13 @@ var Tooltip = ({
|
|
824
930
|
delayDuration = 300,
|
825
931
|
...props
|
826
932
|
}) => {
|
827
|
-
return /* @__PURE__ */
|
933
|
+
return /* @__PURE__ */ import_react21.default.createElement(
|
828
934
|
TooltipPrimitive.TooltipProvider,
|
829
935
|
{
|
830
936
|
delayDuration,
|
831
937
|
...providerProps
|
832
938
|
},
|
833
|
-
/* @__PURE__ */
|
939
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
834
940
|
TooltipPrimitive.Root,
|
835
941
|
{
|
836
942
|
open: !disabled && open,
|
@@ -838,8 +944,8 @@ var Tooltip = ({
|
|
838
944
|
onOpenChange,
|
839
945
|
...props
|
840
946
|
},
|
841
|
-
/* @__PURE__ */
|
842
|
-
/* @__PURE__ */
|
947
|
+
/* @__PURE__ */ import_react21.default.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
948
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
843
949
|
TooltipContent,
|
844
950
|
{
|
845
951
|
size,
|
@@ -859,7 +965,7 @@ var Tooltip = ({
|
|
859
965
|
};
|
860
966
|
|
861
967
|
// elements/label/Label.tsx
|
862
|
-
var Label =
|
968
|
+
var Label = React20.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React20.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React20.createElement(
|
863
969
|
"label",
|
864
970
|
{
|
865
971
|
ref,
|
@@ -870,8 +976,8 @@ var Label = React12.forwardRef(({ className, hint, hintSide, required, children,
|
|
870
976
|
...props
|
871
977
|
},
|
872
978
|
children,
|
873
|
-
required && /* @__PURE__ */
|
874
|
-
), hint && /* @__PURE__ */
|
979
|
+
required && /* @__PURE__ */ React20.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
980
|
+
), hint && /* @__PURE__ */ React20.createElement(
|
875
981
|
Tooltip,
|
876
982
|
{
|
877
983
|
content: hint,
|
@@ -881,7 +987,7 @@ var Label = React12.forwardRef(({ className, hint, hintSide, required, children,
|
|
881
987
|
onClick: (event) => event.preventDefault()
|
882
988
|
}
|
883
989
|
},
|
884
|
-
/* @__PURE__ */
|
990
|
+
/* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement(
|
885
991
|
"svg",
|
886
992
|
{
|
887
993
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -893,15 +999,15 @@ var Label = React12.forwardRef(({ className, hint, hintSide, required, children,
|
|
893
999
|
strokeLinecap: "round",
|
894
1000
|
strokeLinejoin: "round"
|
895
1001
|
},
|
896
|
-
/* @__PURE__ */
|
897
|
-
/* @__PURE__ */
|
898
|
-
/* @__PURE__ */
|
1002
|
+
/* @__PURE__ */ React20.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
1003
|
+
/* @__PURE__ */ React20.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
1004
|
+
/* @__PURE__ */ React20.createElement("path", { d: "M12 17h.01" })
|
899
1005
|
))
|
900
1006
|
)));
|
901
1007
|
Label.displayName = "Label";
|
902
1008
|
|
903
1009
|
// elements/skeleton/Skeleton.tsx
|
904
|
-
var
|
1010
|
+
var import_react22 = __toESM(require("react"));
|
905
1011
|
function Skeleton({
|
906
1012
|
className,
|
907
1013
|
content,
|
@@ -920,7 +1026,7 @@ function Skeleton({
|
|
920
1026
|
right: "hawa-mask-fade-right",
|
921
1027
|
left: "hawa-mask-fade-left "
|
922
1028
|
};
|
923
|
-
return /* @__PURE__ */
|
1029
|
+
return /* @__PURE__ */ import_react22.default.createElement(
|
924
1030
|
"div",
|
925
1031
|
{
|
926
1032
|
className: cn(
|
@@ -936,7 +1042,7 @@ function Skeleton({
|
|
936
1042
|
}
|
937
1043
|
|
938
1044
|
// elements/input/Input.tsx
|
939
|
-
var Input = (0,
|
1045
|
+
var Input = (0, import_react23.forwardRef)(
|
940
1046
|
({
|
941
1047
|
margin = "none",
|
942
1048
|
width = "full",
|
@@ -980,7 +1086,7 @@ var Input = (0, import_react8.forwardRef)(
|
|
980
1086
|
props.onChange(newEvent);
|
981
1087
|
}
|
982
1088
|
};
|
983
|
-
return /* @__PURE__ */
|
1089
|
+
return /* @__PURE__ */ import_react23.default.createElement(
|
984
1090
|
"div",
|
985
1091
|
{
|
986
1092
|
className: cn(
|
@@ -991,8 +1097,8 @@ var Input = (0, import_react8.forwardRef)(
|
|
991
1097
|
"hawa-w-full hawa-gap-2"
|
992
1098
|
)
|
993
1099
|
},
|
994
|
-
props.label && /* @__PURE__ */
|
995
|
-
/* @__PURE__ */
|
1100
|
+
props.label && /* @__PURE__ */ import_react23.default.createElement(Label, { ...labelProps }, props.label),
|
1101
|
+
/* @__PURE__ */ import_react23.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center " }, props.outsidePrefix && /* @__PURE__ */ import_react23.default.createElement(
|
996
1102
|
"span",
|
997
1103
|
{
|
998
1104
|
className: cn(
|
@@ -1001,7 +1107,7 @@ var Input = (0, import_react8.forwardRef)(
|
|
1001
1107
|
)
|
1002
1108
|
},
|
1003
1109
|
props.outsidePrefix
|
1004
|
-
), props.isLoading ? /* @__PURE__ */
|
1110
|
+
), props.isLoading ? /* @__PURE__ */ import_react23.default.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ import_react23.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ import_react23.default.createElement(import_react23.default.Fragment, null, !props.hideSeparator && /* @__PURE__ */ import_react23.default.createElement(
|
1005
1111
|
"div",
|
1006
1112
|
{
|
1007
1113
|
className: cn(
|
@@ -1009,7 +1115,7 @@ var Input = (0, import_react8.forwardRef)(
|
|
1009
1115
|
preview ? "hawa-opacity-100" : "hawa-opacity-0"
|
1010
1116
|
)
|
1011
1117
|
}
|
1012
|
-
), /* @__PURE__ */
|
1118
|
+
), /* @__PURE__ */ import_react23.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-w-full hawa-gap-2" }, /* @__PURE__ */ import_react23.default.createElement("div", { className: "hawa-relative" }, props.startIcon && /* @__PURE__ */ import_react23.default.createElement("div", { className: "hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.startIcon), props.endIcon && /* @__PURE__ */ import_react23.default.createElement(
|
1013
1119
|
"div",
|
1014
1120
|
{
|
1015
1121
|
className: cn(
|
@@ -1018,7 +1124,7 @@ var Input = (0, import_react8.forwardRef)(
|
|
1018
1124
|
)
|
1019
1125
|
},
|
1020
1126
|
props.endIcon
|
1021
|
-
), /* @__PURE__ */
|
1127
|
+
), /* @__PURE__ */ import_react23.default.createElement(
|
1022
1128
|
"input",
|
1023
1129
|
{
|
1024
1130
|
required: true,
|
@@ -1044,7 +1150,7 @@ var Input = (0, import_react8.forwardRef)(
|
|
1044
1150
|
inputProps == null ? void 0 : inputProps.className
|
1045
1151
|
)
|
1046
1152
|
}
|
1047
|
-
)), !forceHideHelperText && /* @__PURE__ */
|
1153
|
+
)), !forceHideHelperText && /* @__PURE__ */ import_react23.default.createElement(
|
1048
1154
|
"p",
|
1049
1155
|
{
|
1050
1156
|
className: cn(
|
@@ -1053,7 +1159,7 @@ var Input = (0, import_react8.forwardRef)(
|
|
1053
1159
|
)
|
1054
1160
|
},
|
1055
1161
|
props.helperText
|
1056
|
-
), !props.disabled && forceHideHelperText && /* @__PURE__ */
|
1162
|
+
), !props.disabled && forceHideHelperText && /* @__PURE__ */ import_react23.default.createElement(
|
1057
1163
|
"div",
|
1058
1164
|
{
|
1059
1165
|
className: cn(
|
@@ -1062,7 +1168,7 @@ var Input = (0, import_react8.forwardRef)(
|
|
1062
1168
|
)
|
1063
1169
|
},
|
1064
1170
|
props.helperText
|
1065
|
-
), showCount && /* @__PURE__ */
|
1171
|
+
), showCount && /* @__PURE__ */ import_react23.default.createElement(
|
1066
1172
|
"div",
|
1067
1173
|
{
|
1068
1174
|
className: cn(
|
@@ -1093,14 +1199,14 @@ var LeadGenerator = ({ texts, submitHandler }) => {
|
|
1093
1199
|
console.log("handleNewsletterSub props was not provided");
|
1094
1200
|
}
|
1095
1201
|
};
|
1096
|
-
return /* @__PURE__ */
|
1202
|
+
return /* @__PURE__ */ import_react24.default.createElement(Card, null, /* @__PURE__ */ import_react24.default.createElement(CardHeader, null, /* @__PURE__ */ import_react24.default.createElement(CardTitle, null, texts == null ? void 0 : texts.title), /* @__PURE__ */ import_react24.default.createElement(CardDescription, null, texts == null ? void 0 : texts.subtitle)), /* @__PURE__ */ import_react24.default.createElement(CardContent, null, /* @__PURE__ */ import_react24.default.createElement(
|
1097
1203
|
"form",
|
1098
1204
|
{
|
1099
1205
|
noValidate: true,
|
1100
1206
|
className: "hawa-flex hawa-flex-row hawa-gap-2",
|
1101
1207
|
onSubmit: handleSubmit(onSubmit)
|
1102
1208
|
},
|
1103
|
-
/* @__PURE__ */
|
1209
|
+
/* @__PURE__ */ import_react24.default.createElement(
|
1104
1210
|
import_react_hook_form.Controller,
|
1105
1211
|
{
|
1106
1212
|
name: "email",
|
@@ -1113,27 +1219,27 @@ var LeadGenerator = ({ texts, submitHandler }) => {
|
|
1113
1219
|
}
|
1114
1220
|
},
|
1115
1221
|
defaultValue: "",
|
1116
|
-
render: ({ field }) => /* @__PURE__ */
|
1222
|
+
render: ({ field }) => /* @__PURE__ */ import_react24.default.createElement(Input, { ...field, type: "email", placeholder: "example@sikka.io" })
|
1117
1223
|
}
|
1118
1224
|
),
|
1119
|
-
/* @__PURE__ */
|
1225
|
+
/* @__PURE__ */ import_react24.default.createElement(Button, { type: "submit", disabled: !formState.isValid }, (_a = texts == null ? void 0 : texts.submit) != null ? _a : "Submit")
|
1120
1226
|
)));
|
1121
1227
|
};
|
1122
1228
|
|
1123
1229
|
// blocks/misc/Announcement.tsx
|
1124
|
-
var
|
1230
|
+
var import_react25 = __toESM(require("react"));
|
1125
1231
|
var Announcement = ({
|
1126
1232
|
onActionClick,
|
1127
1233
|
...props
|
1128
1234
|
}) => {
|
1129
|
-
return /* @__PURE__ */
|
1235
|
+
return /* @__PURE__ */ import_react25.default.createElement(Card, null, /* @__PURE__ */ import_react25.default.createElement(
|
1130
1236
|
CardContent,
|
1131
1237
|
{
|
1132
1238
|
headless: true,
|
1133
1239
|
className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-between"
|
1134
1240
|
},
|
1135
|
-
/* @__PURE__ */
|
1136
|
-
/* @__PURE__ */
|
1241
|
+
/* @__PURE__ */ import_react25.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-start hawa-justify-center " }, /* @__PURE__ */ import_react25.default.createElement("span", { className: "hawa-text-lg hawa-font-bold" }, props.title), /* @__PURE__ */ import_react25.default.createElement("span", { className: "hawa-text-sm" }, props.subtitle)),
|
1242
|
+
/* @__PURE__ */ import_react25.default.createElement(
|
1137
1243
|
Button,
|
1138
1244
|
{
|
1139
1245
|
onClick: () => onActionClick(),
|
@@ -1145,15 +1251,15 @@ var Announcement = ({
|
|
1145
1251
|
};
|
1146
1252
|
|
1147
1253
|
// blocks/misc/NotFound.tsx
|
1148
|
-
var
|
1254
|
+
var import_react26 = __toESM(require("react"));
|
1149
1255
|
var NotFound = ({ texts }) => {
|
1150
|
-
return /* @__PURE__ */
|
1256
|
+
return /* @__PURE__ */ import_react26.default.createElement(Card, null, /* @__PURE__ */ import_react26.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react26.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center dark:hawa-text-white" }, /* @__PURE__ */ import_react26.default.createElement("div", { className: "hawa-text-center hawa-text-6xl hawa-font-bold " }, "404"), /* @__PURE__ */ import_react26.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_react26.default.createElement("div", { className: "hawa-mb-4 hawa-text-center" }, (texts == null ? void 0 : texts.ifLost) || /* @__PURE__ */ import_react26.default.createElement(import_react26.default.Fragment, null, "If you're lost please contact us ", /* @__PURE__ */ import_react26.default.createElement("span", { className: "clickable-link" }, "help@sikka.io"))), /* @__PURE__ */ import_react26.default.createElement(Button, { className: "hawa-w-full" }, (texts == null ? void 0 : texts.home) || "Home"))));
|
1151
1257
|
};
|
1152
1258
|
|
1153
1259
|
// blocks/misc/NoPermission.tsx
|
1154
|
-
var
|
1260
|
+
var import_react27 = __toESM(require("react"));
|
1155
1261
|
var NoPermission = ({ texts }) => {
|
1156
|
-
return /* @__PURE__ */
|
1262
|
+
return /* @__PURE__ */ import_react27.default.createElement(Card, null, /* @__PURE__ */ import_react27.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react27.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-text-center" }, /* @__PURE__ */ import_react27.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_react27.default.createElement(
|
1157
1263
|
"svg",
|
1158
1264
|
{
|
1159
1265
|
stroke: "currentColor",
|
@@ -1163,18 +1269,18 @@ var NoPermission = ({ texts }) => {
|
|
1163
1269
|
height: "0.35em",
|
1164
1270
|
width: "0.35em"
|
1165
1271
|
},
|
1166
|
-
/* @__PURE__ */
|
1167
|
-
)), /* @__PURE__ */
|
1272
|
+
/* @__PURE__ */ import_react27.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" })
|
1273
|
+
)), /* @__PURE__ */ import_react27.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_react27.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"))));
|
1168
1274
|
};
|
1169
1275
|
|
1170
1276
|
// blocks/misc/ContactForm.tsx
|
1171
|
-
var
|
1277
|
+
var import_react29 = __toESM(require("react"));
|
1172
1278
|
var import_react_hook_form2 = require("react-hook-form");
|
1173
1279
|
var import_zod = require("@hookform/resolvers/zod");
|
1174
1280
|
var z = __toESM(require("zod"));
|
1175
1281
|
|
1176
1282
|
// elements/select/Select.tsx
|
1177
|
-
var
|
1283
|
+
var import_react28 = __toESM(require("react"));
|
1178
1284
|
var import_react_select = __toESM(require("react-select"));
|
1179
1285
|
var import_creatable = __toESM(require("react-select/creatable"));
|
1180
1286
|
var import_clsx2 = __toESM(require("clsx"));
|
@@ -1185,10 +1291,10 @@ var Select = ({
|
|
1185
1291
|
}) => {
|
1186
1292
|
const NoOption = () => {
|
1187
1293
|
var _a, _b;
|
1188
|
-
return /* @__PURE__ */
|
1294
|
+
return /* @__PURE__ */ import_react28.default.createElement("div", null, (_b = (_a = props.texts) == null ? void 0 : _a.noOptions) != null ? _b : "No Items Found");
|
1189
1295
|
};
|
1190
1296
|
const Control = ({ children, innerProps, innerRef }) => {
|
1191
|
-
return /* @__PURE__ */
|
1297
|
+
return /* @__PURE__ */ import_react28.default.createElement(
|
1192
1298
|
"div",
|
1193
1299
|
{
|
1194
1300
|
ref: innerRef,
|
@@ -1201,7 +1307,7 @@ var Select = ({
|
|
1201
1307
|
);
|
1202
1308
|
};
|
1203
1309
|
const Option = ({ children, innerProps, innerRef }) => {
|
1204
|
-
return /* @__PURE__ */
|
1310
|
+
return /* @__PURE__ */ import_react28.default.createElement(
|
1205
1311
|
"div",
|
1206
1312
|
{
|
1207
1313
|
ref: innerRef,
|
@@ -1222,7 +1328,7 @@ var Select = ({
|
|
1222
1328
|
...menuProps
|
1223
1329
|
}) => {
|
1224
1330
|
const menuOpen = menuProps.selectProps.menuIsOpen;
|
1225
|
-
return /* @__PURE__ */
|
1331
|
+
return /* @__PURE__ */ import_react28.default.createElement(
|
1226
1332
|
"div",
|
1227
1333
|
{
|
1228
1334
|
className: cn(
|
@@ -1236,7 +1342,7 @@ var Select = ({
|
|
1236
1342
|
children
|
1237
1343
|
);
|
1238
1344
|
};
|
1239
|
-
return /* @__PURE__ */
|
1345
|
+
return /* @__PURE__ */ import_react28.default.createElement(
|
1240
1346
|
"div",
|
1241
1347
|
{
|
1242
1348
|
className: cn(
|
@@ -1244,10 +1350,10 @@ var Select = ({
|
|
1244
1350
|
props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
|
1245
1351
|
)
|
1246
1352
|
},
|
1247
|
-
props.label && /* @__PURE__ */
|
1248
|
-
props.isLoading ? /* @__PURE__ */
|
1353
|
+
props.label && /* @__PURE__ */ import_react28.default.createElement(Label, { ...labelProps }, props.label),
|
1354
|
+
props.isLoading ? /* @__PURE__ */ import_react28.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? (
|
1249
1355
|
// TODO: enable keyboard to go to the next item in the list
|
1250
|
-
/* @__PURE__ */
|
1356
|
+
/* @__PURE__ */ import_react28.default.createElement(
|
1251
1357
|
import_react_select.default,
|
1252
1358
|
{
|
1253
1359
|
noOptionsMessage: NoOption,
|
@@ -1284,7 +1390,7 @@ var Select = ({
|
|
1284
1390
|
isSearchable: props.isSearchable
|
1285
1391
|
}
|
1286
1392
|
)
|
1287
|
-
) : /* @__PURE__ */
|
1393
|
+
) : /* @__PURE__ */ import_react28.default.createElement(
|
1288
1394
|
import_creatable.default,
|
1289
1395
|
{
|
1290
1396
|
formatCreateLabel: (inputValue) => {
|
@@ -1314,7 +1420,7 @@ var Select = ({
|
|
1314
1420
|
onInputChange: (newValue, action) => props.onInputChange(newValue, action)
|
1315
1421
|
}
|
1316
1422
|
),
|
1317
|
-
!props.hideHelperText && /* @__PURE__ */
|
1423
|
+
!props.hideHelperText && /* @__PURE__ */ import_react28.default.createElement(
|
1318
1424
|
"p",
|
1319
1425
|
{
|
1320
1426
|
className: cn(
|
@@ -1328,8 +1434,8 @@ var Select = ({
|
|
1328
1434
|
};
|
1329
1435
|
|
1330
1436
|
// elements/textarea/Textarea.tsx
|
1331
|
-
var
|
1332
|
-
var Textarea =
|
1437
|
+
var React28 = __toESM(require("react"));
|
1438
|
+
var Textarea = React28.forwardRef(
|
1333
1439
|
({
|
1334
1440
|
className,
|
1335
1441
|
classNames,
|
@@ -1341,7 +1447,7 @@ var Textarea = React20.forwardRef(
|
|
1341
1447
|
isLoading,
|
1342
1448
|
...props
|
1343
1449
|
}, ref) => {
|
1344
|
-
return /* @__PURE__ */
|
1450
|
+
return /* @__PURE__ */ React28.createElement(
|
1345
1451
|
"div",
|
1346
1452
|
{
|
1347
1453
|
className: cn(
|
@@ -1350,7 +1456,7 @@ var Textarea = React20.forwardRef(
|
|
1350
1456
|
className
|
1351
1457
|
)
|
1352
1458
|
},
|
1353
|
-
/* @__PURE__ */
|
1459
|
+
/* @__PURE__ */ React28.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, props.label && /* @__PURE__ */ React28.createElement(Label, { ...labelProps }, props.label), showCount && countPosition === "top" && /* @__PURE__ */ React28.createElement(
|
1354
1460
|
"div",
|
1355
1461
|
{
|
1356
1462
|
className: "hawa-text-start hawa-text-xs hawa-transition-all hawa-leading-none"
|
@@ -1359,7 +1465,7 @@ var Textarea = React20.forwardRef(
|
|
1359
1465
|
"/",
|
1360
1466
|
textareaProps == null ? void 0 : textareaProps.maxLength
|
1361
1467
|
)),
|
1362
|
-
isLoading ? /* @__PURE__ */
|
1468
|
+
isLoading ? /* @__PURE__ */ React28.createElement(Skeleton, { style: { height: 40 } }) : /* @__PURE__ */ React28.createElement(
|
1363
1469
|
"textarea",
|
1364
1470
|
{
|
1365
1471
|
...textareaProps,
|
@@ -1370,7 +1476,7 @@ var Textarea = React20.forwardRef(
|
|
1370
1476
|
ref
|
1371
1477
|
}
|
1372
1478
|
),
|
1373
|
-
/* @__PURE__ */
|
1479
|
+
/* @__PURE__ */ React28.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, !forceHideHelperText && /* @__PURE__ */ React28.createElement(
|
1374
1480
|
"p",
|
1375
1481
|
{
|
1376
1482
|
className: cn(
|
@@ -1379,7 +1485,7 @@ var Textarea = React20.forwardRef(
|
|
1379
1485
|
)
|
1380
1486
|
},
|
1381
1487
|
props.helperText
|
1382
|
-
), showCount && countPosition === "bottom" && /* @__PURE__ */
|
1488
|
+
), showCount && countPosition === "bottom" && /* @__PURE__ */ React28.createElement("div", { className: "hawa-text-start hawa-text-xs hawa-transition-all" }, (textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0, "/", textareaProps == null ? void 0 : textareaProps.maxLength))
|
1383
1489
|
);
|
1384
1490
|
}
|
1385
1491
|
);
|
@@ -1454,7 +1560,7 @@ var ContactForm = ({
|
|
1454
1560
|
console.log("Form is submitted but onSubmit prop is missing");
|
1455
1561
|
}
|
1456
1562
|
};
|
1457
|
-
return /* @__PURE__ */
|
1563
|
+
return /* @__PURE__ */ import_react29.default.createElement(
|
1458
1564
|
Card,
|
1459
1565
|
{
|
1460
1566
|
className: cn(
|
@@ -1463,7 +1569,7 @@ var ContactForm = ({
|
|
1463
1569
|
),
|
1464
1570
|
style: cardless ? { boxShadow: "none" } : void 0
|
1465
1571
|
},
|
1466
|
-
/* @__PURE__ */
|
1572
|
+
/* @__PURE__ */ import_react29.default.createElement(CardContent, { headless: true, className: cardless ? "!hawa-p-0" : "" }, /* @__PURE__ */ import_react29.default.createElement(
|
1467
1573
|
"form",
|
1468
1574
|
{
|
1469
1575
|
noValidate: true,
|
@@ -1472,7 +1578,7 @@ var ContactForm = ({
|
|
1472
1578
|
id: formId,
|
1473
1579
|
autoComplete: formAutoComplete
|
1474
1580
|
},
|
1475
|
-
/* @__PURE__ */
|
1581
|
+
/* @__PURE__ */ import_react29.default.createElement(
|
1476
1582
|
"div",
|
1477
1583
|
{
|
1478
1584
|
className: cn(
|
@@ -1483,14 +1589,14 @@ var ContactForm = ({
|
|
1483
1589
|
}
|
1484
1590
|
)
|
1485
1591
|
},
|
1486
|
-
/* @__PURE__ */
|
1592
|
+
/* @__PURE__ */ import_react29.default.createElement(
|
1487
1593
|
import_react_hook_form2.Controller,
|
1488
1594
|
{
|
1489
1595
|
control,
|
1490
1596
|
name: "name",
|
1491
1597
|
render: ({ field }) => {
|
1492
1598
|
var _a2;
|
1493
|
-
return /* @__PURE__ */
|
1599
|
+
return /* @__PURE__ */ import_react29.default.createElement(
|
1494
1600
|
Input,
|
1495
1601
|
{
|
1496
1602
|
label: (texts == null ? void 0 : texts.name.label) || "Name",
|
@@ -1503,14 +1609,14 @@ var ContactForm = ({
|
|
1503
1609
|
}
|
1504
1610
|
}
|
1505
1611
|
),
|
1506
|
-
/* @__PURE__ */
|
1612
|
+
/* @__PURE__ */ import_react29.default.createElement(
|
1507
1613
|
import_react_hook_form2.Controller,
|
1508
1614
|
{
|
1509
1615
|
control,
|
1510
1616
|
name: "email",
|
1511
1617
|
render: ({ field }) => {
|
1512
1618
|
var _a2;
|
1513
|
-
return /* @__PURE__ */
|
1619
|
+
return /* @__PURE__ */ import_react29.default.createElement(
|
1514
1620
|
Input,
|
1515
1621
|
{
|
1516
1622
|
label: (texts == null ? void 0 : texts.email.label) || "Email",
|
@@ -1526,7 +1632,7 @@ var ContactForm = ({
|
|
1526
1632
|
),
|
1527
1633
|
customFields && customFields.map((customField) => {
|
1528
1634
|
console.log("custom", customField);
|
1529
|
-
return /* @__PURE__ */
|
1635
|
+
return /* @__PURE__ */ import_react29.default.createElement(
|
1530
1636
|
import_react_hook_form2.Controller,
|
1531
1637
|
{
|
1532
1638
|
control,
|
@@ -1536,7 +1642,7 @@ var ContactForm = ({
|
|
1536
1642
|
switch (type) {
|
1537
1643
|
case "text":
|
1538
1644
|
case "number":
|
1539
|
-
return /* @__PURE__ */
|
1645
|
+
return /* @__PURE__ */ import_react29.default.createElement(
|
1540
1646
|
Input,
|
1541
1647
|
{
|
1542
1648
|
id: customField.name,
|
@@ -1547,7 +1653,7 @@ var ContactForm = ({
|
|
1547
1653
|
}
|
1548
1654
|
);
|
1549
1655
|
case "select":
|
1550
|
-
return /* @__PURE__ */
|
1656
|
+
return /* @__PURE__ */ import_react29.default.createElement(
|
1551
1657
|
Select,
|
1552
1658
|
{
|
1553
1659
|
label,
|
@@ -1557,20 +1663,20 @@ var ContactForm = ({
|
|
1557
1663
|
}
|
1558
1664
|
);
|
1559
1665
|
default:
|
1560
|
-
return /* @__PURE__ */
|
1666
|
+
return /* @__PURE__ */ import_react29.default.createElement("div", null, "Unknown type");
|
1561
1667
|
}
|
1562
1668
|
}
|
1563
1669
|
}
|
1564
1670
|
);
|
1565
1671
|
}),
|
1566
|
-
/* @__PURE__ */
|
1672
|
+
/* @__PURE__ */ import_react29.default.createElement(
|
1567
1673
|
import_react_hook_form2.Controller,
|
1568
1674
|
{
|
1569
1675
|
control,
|
1570
1676
|
name: "message",
|
1571
1677
|
render: ({ field }) => {
|
1572
1678
|
var _a2;
|
1573
|
-
return /* @__PURE__ */
|
1679
|
+
return /* @__PURE__ */ import_react29.default.createElement(
|
1574
1680
|
Textarea,
|
1575
1681
|
{
|
1576
1682
|
label: (texts == null ? void 0 : texts.message.label) || "Message",
|
@@ -1587,7 +1693,7 @@ var ContactForm = ({
|
|
1587
1693
|
}
|
1588
1694
|
}
|
1589
1695
|
),
|
1590
|
-
/* @__PURE__ */
|
1696
|
+
/* @__PURE__ */ import_react29.default.createElement(Button, { type: "submit", className: "hawa-w-full" }, (texts == null ? void 0 : texts.submit) || "Submit")
|
1591
1697
|
))
|
1592
1698
|
);
|
1593
1699
|
};
|