@sikka/hawa 0.30.26-next → 0.30.28-next
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blocks/index.js +319 -205
- package/dist/blocks/index.mjs +3 -2
- package/dist/blocks/misc/index.js +263 -149
- package/dist/blocks/misc/index.mjs +184 -70
- package/dist/{chunk-QDRFTC7W.mjs → chunk-MNK7PSNG.mjs} +48 -14
- package/dist/chunk-R2SKHHDK.mjs +411 -0
- package/dist/{chunk-H7ZADF2Z.mjs → chunk-UDCDD66A.mjs} +8 -0
- package/dist/elements/index.js +398 -289
- package/dist/elements/index.mjs +5 -5
- package/dist/floatBox/index.d.mts +3 -0
- package/dist/floatBox/index.d.ts +3 -0
- package/dist/floatBox/index.js +32 -12
- package/dist/floatBox/index.js.map +1 -1
- package/dist/floatBox/index.mjs +32 -12
- 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.css +68 -0
- package/dist/index.d.mts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +4243 -4176
- package/dist/index.mjs +1490 -1424
- package/dist/layout/index.mjs +3 -4
- package/dist/tabs/index.js +146 -32
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +146 -32
- 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,37 +264,57 @@ 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",
|
274
|
+
arrow = true,
|
190
275
|
...props
|
191
276
|
}) => {
|
192
|
-
let
|
193
|
-
|
194
|
-
|
277
|
+
let stylesMap = {
|
278
|
+
bottom: {
|
279
|
+
start: { top: sideOffset, insetInlineStart: 0 },
|
280
|
+
center: { top: sideOffset },
|
281
|
+
end: { top: sideOffset, insetInlineEnd: 0 }
|
282
|
+
},
|
283
|
+
top: {
|
284
|
+
start: { bottom: sideOffset, insetInlineStart: 0 },
|
285
|
+
center: { bottom: sideOffset },
|
286
|
+
end: { bottom: sideOffset, insetInlineEnd: 0 }
|
287
|
+
},
|
288
|
+
right: {
|
289
|
+
start: { left: sideOffset, top: -5 },
|
290
|
+
center: { left: sideOffset },
|
291
|
+
end: { left: sideOffset, bottom: 0 }
|
292
|
+
},
|
293
|
+
left: {
|
294
|
+
start: { right: sideOffset, top: 0 },
|
295
|
+
center: { right: sideOffset },
|
296
|
+
end: { right: sideOffset, bottom: 0 }
|
297
|
+
}
|
195
298
|
};
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
right:
|
200
|
-
left:
|
299
|
+
const arrowDirection = {
|
300
|
+
top: "hawa-arrow-default-bottom",
|
301
|
+
bottom: "hawa-arrow-default-top",
|
302
|
+
right: "hawa-arrow-default-left",
|
303
|
+
left: "hawa-arrow-default-right"
|
201
304
|
};
|
202
|
-
return /* @__PURE__ */
|
305
|
+
return /* @__PURE__ */ React11.createElement(
|
203
306
|
"div",
|
204
307
|
{
|
205
308
|
className: cn(
|
206
|
-
"data-[floatbox-state=closed]:hawa-invisible data-[floatbox-state=open]:hawa-visible hawa-absolute dark:dark-shadow hawa-z-50 hawa-rounded hawa-border
|
207
|
-
sideOffsetStyles[side],
|
309
|
+
"data-[floatbox-state=closed]:hawa-invisible data-[floatbox-state=open]:hawa-visible hawa-absolute dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[floatbox-state=open]:hawa-animate-in data-[floatbox-state=closed]:hawa-animate-out data-[floatbox-state=closed]:hawa-fade-out-0 data-[floatbox-state=open]:hawa-fade-in-0 data-[floatbox-state=closed]:hawa-zoom-out-95 data-[floatbox-state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2 hawa-bg-popover",
|
208
310
|
className
|
209
311
|
),
|
210
|
-
style: { ...
|
312
|
+
style: { ...stylesMap[side][align] },
|
211
313
|
"data-side": side,
|
212
314
|
"data-floatbox-state": open ? "open" : "closed"
|
213
315
|
},
|
214
|
-
|
316
|
+
arrow && /* @__PURE__ */ React11.createElement("div", { className: cn("hawa-bg-red-500", arrowDirection[side]) }),
|
317
|
+
/* @__PURE__ */ React11.createElement("span", null, props.children)
|
215
318
|
);
|
216
319
|
};
|
217
320
|
|
@@ -274,8 +377,8 @@ var tabsTriggerVariant = (0, import_tailwind_variants.tv)({
|
|
274
377
|
],
|
275
378
|
defaultVariants: { variant: "default", orientation: "horizontal" }
|
276
379
|
});
|
277
|
-
var TabsContext =
|
278
|
-
var Tabs =
|
380
|
+
var TabsContext = React12.createContext({ orientation: "horizontal", variant: "default" });
|
381
|
+
var Tabs = React12.forwardRef(({ className, orientation, variant = "default", ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
279
382
|
TabsPrimitive.Root,
|
280
383
|
{
|
281
384
|
ref,
|
@@ -286,11 +389,11 @@ var Tabs = React4.forwardRef(({ className, orientation, variant = "default", ...
|
|
286
389
|
),
|
287
390
|
...props
|
288
391
|
},
|
289
|
-
/* @__PURE__ */
|
392
|
+
/* @__PURE__ */ React12.createElement(TabsContext.Provider, { value: { orientation, variant } }, props.children)
|
290
393
|
));
|
291
|
-
var TabsList =
|
292
|
-
const { orientation, variant } =
|
293
|
-
return /* @__PURE__ */
|
394
|
+
var TabsList = React12.forwardRef(({ className, ...props }, ref) => {
|
395
|
+
const { orientation, variant } = React12.useContext(TabsContext);
|
396
|
+
return /* @__PURE__ */ React12.createElement(
|
294
397
|
TabsPrimitive.List,
|
295
398
|
{
|
296
399
|
ref,
|
@@ -303,12 +406,14 @@ var TabsList = React4.forwardRef(({ className, ...props }, ref) => {
|
|
303
406
|
}
|
304
407
|
);
|
305
408
|
});
|
306
|
-
var TabsTrigger =
|
307
|
-
const { orientation, variant } =
|
308
|
-
|
409
|
+
var TabsTrigger = React12.forwardRef(({ className, chipProps, ...props }, ref) => {
|
410
|
+
const { orientation, variant } = React12.useContext(TabsContext);
|
411
|
+
const tabTriggerRef = React12.useRef(null);
|
412
|
+
const { width } = useMeasureDirty(tabTriggerRef);
|
413
|
+
return /* @__PURE__ */ React12.createElement(
|
309
414
|
TabsPrimitive.Trigger,
|
310
415
|
{
|
311
|
-
ref,
|
416
|
+
ref: tabTriggerRef,
|
312
417
|
className: cn(
|
313
418
|
tabsTriggerVariant({ variant, orientation }),
|
314
419
|
"hawa-relative",
|
@@ -317,11 +422,20 @@ var TabsTrigger = React4.forwardRef(({ className, chipProps, ...props }, ref) =>
|
|
317
422
|
...props
|
318
423
|
},
|
319
424
|
props.children,
|
320
|
-
chipProps && /* @__PURE__ */
|
321
|
-
/* @__PURE__ */
|
425
|
+
chipProps && /* @__PURE__ */ React12.createElement(Chip, { ...chipProps }),
|
426
|
+
/* @__PURE__ */ React12.createElement(
|
427
|
+
FloatBox,
|
428
|
+
{
|
429
|
+
align: orientation === "vertical" ? "start" : "start",
|
430
|
+
side: orientation === "vertical" ? "right" : "bottom",
|
431
|
+
sideOffset: orientation === "vertical" ? width + 30 : 45,
|
432
|
+
open: props.showPopover
|
433
|
+
},
|
434
|
+
props.popoverContent
|
435
|
+
)
|
322
436
|
);
|
323
437
|
});
|
324
|
-
var TabsContent =
|
438
|
+
var TabsContent = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(
|
325
439
|
TabsPrimitive.Content,
|
326
440
|
{
|
327
441
|
ref,
|
@@ -339,7 +453,7 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
339
453
|
|
340
454
|
// blocks/misc/LegalTexts.tsx
|
341
455
|
var LegalTexts = ({ tabs, ...props }) => {
|
342
|
-
return /* @__PURE__ */
|
456
|
+
return /* @__PURE__ */ import_react17.default.createElement(
|
343
457
|
Tabs,
|
344
458
|
{
|
345
459
|
value: props.activeTab,
|
@@ -347,8 +461,8 @@ var LegalTexts = ({ tabs, ...props }) => {
|
|
347
461
|
defaultValue: props.defaultTab || tabs[0].value,
|
348
462
|
dir: props.direction
|
349
463
|
},
|
350
|
-
/* @__PURE__ */
|
351
|
-
tabs.map((tab, index) => /* @__PURE__ */
|
464
|
+
/* @__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))),
|
465
|
+
tabs.map((tab, index) => /* @__PURE__ */ import_react17.default.createElement(TabsContent, { key: index, value: tab.value }, /* @__PURE__ */ import_react17.default.createElement(
|
352
466
|
ScrollArea,
|
353
467
|
{
|
354
468
|
className: cn(
|
@@ -362,14 +476,14 @@ var LegalTexts = ({ tabs, ...props }) => {
|
|
362
476
|
};
|
363
477
|
|
364
478
|
// blocks/misc/EmptyState.tsx
|
365
|
-
var
|
479
|
+
var import_react19 = __toESM(require("react"));
|
366
480
|
|
367
481
|
// elements/button/Button.tsx
|
368
|
-
var
|
482
|
+
var React15 = __toESM(require("react"));
|
369
483
|
var import_class_variance_authority = require("class-variance-authority");
|
370
484
|
|
371
485
|
// elements/loading/Loading.tsx
|
372
|
-
var
|
486
|
+
var import_react18 = __toESM(require("react"));
|
373
487
|
var Loading = ({
|
374
488
|
design = "spinner",
|
375
489
|
size = "normal",
|
@@ -400,7 +514,7 @@ var Loading = ({
|
|
400
514
|
};
|
401
515
|
switch (design.split("-")[0]) {
|
402
516
|
case "dots":
|
403
|
-
return /* @__PURE__ */
|
517
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
404
518
|
"div",
|
405
519
|
{
|
406
520
|
className: cn(
|
@@ -408,7 +522,7 @@ var Loading = ({
|
|
408
522
|
classNames == null ? void 0 : classNames.container
|
409
523
|
)
|
410
524
|
},
|
411
|
-
/* @__PURE__ */
|
525
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
412
526
|
"div",
|
413
527
|
{
|
414
528
|
className: cn(
|
@@ -419,7 +533,7 @@ var Loading = ({
|
|
419
533
|
)
|
420
534
|
}
|
421
535
|
),
|
422
|
-
/* @__PURE__ */
|
536
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
423
537
|
"div",
|
424
538
|
{
|
425
539
|
className: cn(
|
@@ -430,7 +544,7 @@ var Loading = ({
|
|
430
544
|
)
|
431
545
|
}
|
432
546
|
),
|
433
|
-
/* @__PURE__ */
|
547
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
434
548
|
"div",
|
435
549
|
{
|
436
550
|
className: cn(
|
@@ -443,7 +557,7 @@ var Loading = ({
|
|
443
557
|
)
|
444
558
|
);
|
445
559
|
case "square":
|
446
|
-
return /* @__PURE__ */
|
560
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
447
561
|
"svg",
|
448
562
|
{
|
449
563
|
className: cn(
|
@@ -455,7 +569,7 @@ var Loading = ({
|
|
455
569
|
height: "35",
|
456
570
|
width: "35"
|
457
571
|
},
|
458
|
-
/* @__PURE__ */
|
572
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
459
573
|
"rect",
|
460
574
|
{
|
461
575
|
className: "squircle-track",
|
@@ -467,7 +581,7 @@ var Loading = ({
|
|
467
581
|
height: "32.5"
|
468
582
|
}
|
469
583
|
),
|
470
|
-
/* @__PURE__ */
|
584
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
471
585
|
"rect",
|
472
586
|
{
|
473
587
|
className: "square-car",
|
@@ -482,7 +596,7 @@ var Loading = ({
|
|
482
596
|
)
|
483
597
|
);
|
484
598
|
case "squircle":
|
485
|
-
return /* @__PURE__ */
|
599
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
486
600
|
"svg",
|
487
601
|
{
|
488
602
|
x: "0px",
|
@@ -497,7 +611,7 @@ var Loading = ({
|
|
497
611
|
classNames == null ? void 0 : classNames.container
|
498
612
|
)
|
499
613
|
},
|
500
|
-
/* @__PURE__ */
|
614
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
501
615
|
"path",
|
502
616
|
{
|
503
617
|
className: cn("squircle-track", classNames == null ? void 0 : classNames.track),
|
@@ -507,7 +621,7 @@ var Loading = ({
|
|
507
621
|
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
622
|
}
|
509
623
|
),
|
510
|
-
/* @__PURE__ */
|
624
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
511
625
|
"path",
|
512
626
|
{
|
513
627
|
className: cn("squircle-car", classNames == null ? void 0 : classNames.car),
|
@@ -519,7 +633,7 @@ var Loading = ({
|
|
519
633
|
)
|
520
634
|
);
|
521
635
|
case "progress":
|
522
|
-
return /* @__PURE__ */
|
636
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
523
637
|
"div",
|
524
638
|
{
|
525
639
|
className: cn(
|
@@ -530,9 +644,9 @@ var Loading = ({
|
|
530
644
|
}
|
531
645
|
);
|
532
646
|
case "orbit":
|
533
|
-
return /* @__PURE__ */
|
647
|
+
return /* @__PURE__ */ import_react18.default.createElement("div", { className: cn("orbit-container", classNames == null ? void 0 : classNames.container) });
|
534
648
|
default:
|
535
|
-
return /* @__PURE__ */
|
649
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
536
650
|
"svg",
|
537
651
|
{
|
538
652
|
viewBox: "0 0 40 40",
|
@@ -544,7 +658,7 @@ var Loading = ({
|
|
544
658
|
classNames == null ? void 0 : classNames.container
|
545
659
|
)
|
546
660
|
},
|
547
|
-
/* @__PURE__ */
|
661
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
548
662
|
"circle",
|
549
663
|
{
|
550
664
|
className: cn(
|
@@ -563,7 +677,7 @@ var Loading = ({
|
|
563
677
|
pathLength: "100"
|
564
678
|
}
|
565
679
|
),
|
566
|
-
/* @__PURE__ */
|
680
|
+
/* @__PURE__ */ import_react18.default.createElement(
|
567
681
|
"circle",
|
568
682
|
{
|
569
683
|
className: cn(
|
@@ -620,7 +734,7 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
620
734
|
}
|
621
735
|
}
|
622
736
|
);
|
623
|
-
var Button =
|
737
|
+
var Button = React15.forwardRef(
|
624
738
|
({
|
625
739
|
className,
|
626
740
|
variant,
|
@@ -633,7 +747,7 @@ var Button = React7.forwardRef(
|
|
633
747
|
}, ref) => {
|
634
748
|
const Comp = "button";
|
635
749
|
const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground";
|
636
|
-
return /* @__PURE__ */
|
750
|
+
return /* @__PURE__ */ React15.createElement(
|
637
751
|
Comp,
|
638
752
|
{
|
639
753
|
className: cn(
|
@@ -644,7 +758,7 @@ var Button = React7.forwardRef(
|
|
644
758
|
ref,
|
645
759
|
...props
|
646
760
|
},
|
647
|
-
isLoading ? /* @__PURE__ */
|
761
|
+
isLoading ? /* @__PURE__ */ React15.createElement(
|
648
762
|
Loading,
|
649
763
|
{
|
650
764
|
design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse",
|
@@ -659,8 +773,8 @@ var Button = React7.forwardRef(
|
|
659
773
|
Button.displayName = "Button";
|
660
774
|
|
661
775
|
// elements/card/Card.tsx
|
662
|
-
var
|
663
|
-
var Card =
|
776
|
+
var React16 = __toESM(require("react"));
|
777
|
+
var Card = React16.forwardRef(
|
664
778
|
({ className, variant = "default", clickable = false, ...props }, ref) => {
|
665
779
|
let variantStyles = {
|
666
780
|
default: cn(
|
@@ -673,7 +787,7 @@ var Card = React8.forwardRef(
|
|
673
787
|
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
788
|
)
|
675
789
|
};
|
676
|
-
return /* @__PURE__ */
|
790
|
+
return /* @__PURE__ */ React16.createElement(
|
677
791
|
"div",
|
678
792
|
{
|
679
793
|
ref,
|
@@ -683,7 +797,7 @@ var Card = React8.forwardRef(
|
|
683
797
|
);
|
684
798
|
}
|
685
799
|
);
|
686
|
-
var CardHeader =
|
800
|
+
var CardHeader = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React16.createElement(
|
687
801
|
"div",
|
688
802
|
{
|
689
803
|
ref,
|
@@ -694,7 +808,7 @@ var CardHeader = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
694
808
|
...props
|
695
809
|
}
|
696
810
|
));
|
697
|
-
var CardTitle =
|
811
|
+
var CardTitle = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React16.createElement(
|
698
812
|
"h3",
|
699
813
|
{
|
700
814
|
ref,
|
@@ -702,7 +816,7 @@ var CardTitle = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
702
816
|
...props
|
703
817
|
}
|
704
818
|
));
|
705
|
-
var CardDescription =
|
819
|
+
var CardDescription = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React16.createElement(
|
706
820
|
"p",
|
707
821
|
{
|
708
822
|
ref,
|
@@ -710,8 +824,8 @@ var CardDescription = React8.forwardRef(({ className, ...props }, ref) => /* @__
|
|
710
824
|
...props
|
711
825
|
}
|
712
826
|
));
|
713
|
-
var CardContent =
|
714
|
-
({ headless, noPadding, className, ...props }, ref) => /* @__PURE__ */
|
827
|
+
var CardContent = React16.forwardRef(
|
828
|
+
({ headless, noPadding, className, ...props }, ref) => /* @__PURE__ */ React16.createElement(
|
715
829
|
"div",
|
716
830
|
{
|
717
831
|
ref,
|
@@ -724,7 +838,7 @@ var CardContent = React8.forwardRef(
|
|
724
838
|
}
|
725
839
|
)
|
726
840
|
);
|
727
|
-
var CardFooter =
|
841
|
+
var CardFooter = React16.forwardRef(({ className, noPadding, ...props }, ref) => /* @__PURE__ */ React16.createElement(
|
728
842
|
"div",
|
729
843
|
{
|
730
844
|
ref,
|
@@ -745,7 +859,7 @@ Card.displayName = "Card";
|
|
745
859
|
|
746
860
|
// blocks/misc/EmptyState.tsx
|
747
861
|
var EmptyState = ({ texts, onActionClick }) => {
|
748
|
-
return /* @__PURE__ */
|
862
|
+
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
863
|
"svg",
|
750
864
|
{
|
751
865
|
stroke: "currentColor",
|
@@ -755,42 +869,42 @@ var EmptyState = ({ texts, onActionClick }) => {
|
|
755
869
|
height: "0.35em",
|
756
870
|
width: "0.35em"
|
757
871
|
},
|
758
|
-
/* @__PURE__ */
|
759
|
-
)), /* @__PURE__ */
|
872
|
+
/* @__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" })
|
873
|
+
)), /* @__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
874
|
};
|
761
875
|
|
762
876
|
// blocks/misc/Testimonial.tsx
|
763
|
-
var
|
877
|
+
var import_react20 = __toESM(require("react"));
|
764
878
|
var Testimonial = () => {
|
765
|
-
return /* @__PURE__ */
|
879
|
+
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
880
|
"path",
|
767
881
|
{
|
768
882
|
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
883
|
fill: "#FFFFFF"
|
770
884
|
}
|
771
|
-
), /* @__PURE__ */
|
885
|
+
), /* @__PURE__ */ import_react20.default.createElement(
|
772
886
|
"path",
|
773
887
|
{
|
774
888
|
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
889
|
fill: "#FFFFFF"
|
776
890
|
}
|
777
|
-
)), /* @__PURE__ */
|
891
|
+
)), /* @__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
892
|
};
|
779
893
|
|
780
894
|
// blocks/misc/LeadGenerator.tsx
|
781
|
-
var
|
895
|
+
var import_react24 = __toESM(require("react"));
|
782
896
|
var import_react_hook_form = require("react-hook-form");
|
783
897
|
|
784
898
|
// elements/input/Input.tsx
|
785
|
-
var
|
899
|
+
var import_react23 = __toESM(require("react"));
|
786
900
|
|
787
901
|
// elements/label/Label.tsx
|
788
|
-
var
|
902
|
+
var React20 = __toESM(require("react"));
|
789
903
|
|
790
904
|
// elements/tooltip/Tooltip.tsx
|
791
|
-
var
|
905
|
+
var import_react21 = __toESM(require("react"));
|
792
906
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
793
|
-
var TooltipContent =
|
907
|
+
var TooltipContent = import_react21.default.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ import_react21.default.createElement(
|
794
908
|
TooltipPrimitive.Content,
|
795
909
|
{
|
796
910
|
ref,
|
@@ -807,7 +921,7 @@ var TooltipContent = import_react6.default.forwardRef(({ className, sideOffset =
|
|
807
921
|
}
|
808
922
|
));
|
809
923
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
810
|
-
var TooltipArrow =
|
924
|
+
var TooltipArrow = import_react21.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ import_react21.default.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
811
925
|
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
812
926
|
var Tooltip = ({
|
813
927
|
side,
|
@@ -824,13 +938,13 @@ var Tooltip = ({
|
|
824
938
|
delayDuration = 300,
|
825
939
|
...props
|
826
940
|
}) => {
|
827
|
-
return /* @__PURE__ */
|
941
|
+
return /* @__PURE__ */ import_react21.default.createElement(
|
828
942
|
TooltipPrimitive.TooltipProvider,
|
829
943
|
{
|
830
944
|
delayDuration,
|
831
945
|
...providerProps
|
832
946
|
},
|
833
|
-
/* @__PURE__ */
|
947
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
834
948
|
TooltipPrimitive.Root,
|
835
949
|
{
|
836
950
|
open: !disabled && open,
|
@@ -838,8 +952,8 @@ var Tooltip = ({
|
|
838
952
|
onOpenChange,
|
839
953
|
...props
|
840
954
|
},
|
841
|
-
/* @__PURE__ */
|
842
|
-
/* @__PURE__ */
|
955
|
+
/* @__PURE__ */ import_react21.default.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
956
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
843
957
|
TooltipContent,
|
844
958
|
{
|
845
959
|
size,
|
@@ -859,7 +973,7 @@ var Tooltip = ({
|
|
859
973
|
};
|
860
974
|
|
861
975
|
// elements/label/Label.tsx
|
862
|
-
var Label =
|
976
|
+
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
977
|
"label",
|
864
978
|
{
|
865
979
|
ref,
|
@@ -870,8 +984,8 @@ var Label = React12.forwardRef(({ className, hint, hintSide, required, children,
|
|
870
984
|
...props
|
871
985
|
},
|
872
986
|
children,
|
873
|
-
required && /* @__PURE__ */
|
874
|
-
), hint && /* @__PURE__ */
|
987
|
+
required && /* @__PURE__ */ React20.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
988
|
+
), hint && /* @__PURE__ */ React20.createElement(
|
875
989
|
Tooltip,
|
876
990
|
{
|
877
991
|
content: hint,
|
@@ -881,7 +995,7 @@ var Label = React12.forwardRef(({ className, hint, hintSide, required, children,
|
|
881
995
|
onClick: (event) => event.preventDefault()
|
882
996
|
}
|
883
997
|
},
|
884
|
-
/* @__PURE__ */
|
998
|
+
/* @__PURE__ */ React20.createElement("div", null, /* @__PURE__ */ React20.createElement(
|
885
999
|
"svg",
|
886
1000
|
{
|
887
1001
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -893,15 +1007,15 @@ var Label = React12.forwardRef(({ className, hint, hintSide, required, children,
|
|
893
1007
|
strokeLinecap: "round",
|
894
1008
|
strokeLinejoin: "round"
|
895
1009
|
},
|
896
|
-
/* @__PURE__ */
|
897
|
-
/* @__PURE__ */
|
898
|
-
/* @__PURE__ */
|
1010
|
+
/* @__PURE__ */ React20.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
1011
|
+
/* @__PURE__ */ React20.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
1012
|
+
/* @__PURE__ */ React20.createElement("path", { d: "M12 17h.01" })
|
899
1013
|
))
|
900
1014
|
)));
|
901
1015
|
Label.displayName = "Label";
|
902
1016
|
|
903
1017
|
// elements/skeleton/Skeleton.tsx
|
904
|
-
var
|
1018
|
+
var import_react22 = __toESM(require("react"));
|
905
1019
|
function Skeleton({
|
906
1020
|
className,
|
907
1021
|
content,
|
@@ -920,7 +1034,7 @@ function Skeleton({
|
|
920
1034
|
right: "hawa-mask-fade-right",
|
921
1035
|
left: "hawa-mask-fade-left "
|
922
1036
|
};
|
923
|
-
return /* @__PURE__ */
|
1037
|
+
return /* @__PURE__ */ import_react22.default.createElement(
|
924
1038
|
"div",
|
925
1039
|
{
|
926
1040
|
className: cn(
|
@@ -936,7 +1050,7 @@ function Skeleton({
|
|
936
1050
|
}
|
937
1051
|
|
938
1052
|
// elements/input/Input.tsx
|
939
|
-
var Input = (0,
|
1053
|
+
var Input = (0, import_react23.forwardRef)(
|
940
1054
|
({
|
941
1055
|
margin = "none",
|
942
1056
|
width = "full",
|
@@ -980,7 +1094,7 @@ var Input = (0, import_react8.forwardRef)(
|
|
980
1094
|
props.onChange(newEvent);
|
981
1095
|
}
|
982
1096
|
};
|
983
|
-
return /* @__PURE__ */
|
1097
|
+
return /* @__PURE__ */ import_react23.default.createElement(
|
984
1098
|
"div",
|
985
1099
|
{
|
986
1100
|
className: cn(
|
@@ -991,8 +1105,8 @@ var Input = (0, import_react8.forwardRef)(
|
|
991
1105
|
"hawa-w-full hawa-gap-2"
|
992
1106
|
)
|
993
1107
|
},
|
994
|
-
props.label && /* @__PURE__ */
|
995
|
-
/* @__PURE__ */
|
1108
|
+
props.label && /* @__PURE__ */ import_react23.default.createElement(Label, { ...labelProps }, props.label),
|
1109
|
+
/* @__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
1110
|
"span",
|
997
1111
|
{
|
998
1112
|
className: cn(
|
@@ -1001,7 +1115,7 @@ var Input = (0, import_react8.forwardRef)(
|
|
1001
1115
|
)
|
1002
1116
|
},
|
1003
1117
|
props.outsidePrefix
|
1004
|
-
), props.isLoading ? /* @__PURE__ */
|
1118
|
+
), 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
1119
|
"div",
|
1006
1120
|
{
|
1007
1121
|
className: cn(
|
@@ -1009,7 +1123,7 @@ var Input = (0, import_react8.forwardRef)(
|
|
1009
1123
|
preview ? "hawa-opacity-100" : "hawa-opacity-0"
|
1010
1124
|
)
|
1011
1125
|
}
|
1012
|
-
), /* @__PURE__ */
|
1126
|
+
), /* @__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
1127
|
"div",
|
1014
1128
|
{
|
1015
1129
|
className: cn(
|
@@ -1018,7 +1132,7 @@ var Input = (0, import_react8.forwardRef)(
|
|
1018
1132
|
)
|
1019
1133
|
},
|
1020
1134
|
props.endIcon
|
1021
|
-
), /* @__PURE__ */
|
1135
|
+
), /* @__PURE__ */ import_react23.default.createElement(
|
1022
1136
|
"input",
|
1023
1137
|
{
|
1024
1138
|
required: true,
|
@@ -1044,7 +1158,7 @@ var Input = (0, import_react8.forwardRef)(
|
|
1044
1158
|
inputProps == null ? void 0 : inputProps.className
|
1045
1159
|
)
|
1046
1160
|
}
|
1047
|
-
)), !forceHideHelperText && /* @__PURE__ */
|
1161
|
+
)), !forceHideHelperText && /* @__PURE__ */ import_react23.default.createElement(
|
1048
1162
|
"p",
|
1049
1163
|
{
|
1050
1164
|
className: cn(
|
@@ -1053,7 +1167,7 @@ var Input = (0, import_react8.forwardRef)(
|
|
1053
1167
|
)
|
1054
1168
|
},
|
1055
1169
|
props.helperText
|
1056
|
-
), !props.disabled && forceHideHelperText && /* @__PURE__ */
|
1170
|
+
), !props.disabled && forceHideHelperText && /* @__PURE__ */ import_react23.default.createElement(
|
1057
1171
|
"div",
|
1058
1172
|
{
|
1059
1173
|
className: cn(
|
@@ -1062,7 +1176,7 @@ var Input = (0, import_react8.forwardRef)(
|
|
1062
1176
|
)
|
1063
1177
|
},
|
1064
1178
|
props.helperText
|
1065
|
-
), showCount && /* @__PURE__ */
|
1179
|
+
), showCount && /* @__PURE__ */ import_react23.default.createElement(
|
1066
1180
|
"div",
|
1067
1181
|
{
|
1068
1182
|
className: cn(
|
@@ -1093,14 +1207,14 @@ var LeadGenerator = ({ texts, submitHandler }) => {
|
|
1093
1207
|
console.log("handleNewsletterSub props was not provided");
|
1094
1208
|
}
|
1095
1209
|
};
|
1096
|
-
return /* @__PURE__ */
|
1210
|
+
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
1211
|
"form",
|
1098
1212
|
{
|
1099
1213
|
noValidate: true,
|
1100
1214
|
className: "hawa-flex hawa-flex-row hawa-gap-2",
|
1101
1215
|
onSubmit: handleSubmit(onSubmit)
|
1102
1216
|
},
|
1103
|
-
/* @__PURE__ */
|
1217
|
+
/* @__PURE__ */ import_react24.default.createElement(
|
1104
1218
|
import_react_hook_form.Controller,
|
1105
1219
|
{
|
1106
1220
|
name: "email",
|
@@ -1113,27 +1227,27 @@ var LeadGenerator = ({ texts, submitHandler }) => {
|
|
1113
1227
|
}
|
1114
1228
|
},
|
1115
1229
|
defaultValue: "",
|
1116
|
-
render: ({ field }) => /* @__PURE__ */
|
1230
|
+
render: ({ field }) => /* @__PURE__ */ import_react24.default.createElement(Input, { ...field, type: "email", placeholder: "example@sikka.io" })
|
1117
1231
|
}
|
1118
1232
|
),
|
1119
|
-
/* @__PURE__ */
|
1233
|
+
/* @__PURE__ */ import_react24.default.createElement(Button, { type: "submit", disabled: !formState.isValid }, (_a = texts == null ? void 0 : texts.submit) != null ? _a : "Submit")
|
1120
1234
|
)));
|
1121
1235
|
};
|
1122
1236
|
|
1123
1237
|
// blocks/misc/Announcement.tsx
|
1124
|
-
var
|
1238
|
+
var import_react25 = __toESM(require("react"));
|
1125
1239
|
var Announcement = ({
|
1126
1240
|
onActionClick,
|
1127
1241
|
...props
|
1128
1242
|
}) => {
|
1129
|
-
return /* @__PURE__ */
|
1243
|
+
return /* @__PURE__ */ import_react25.default.createElement(Card, null, /* @__PURE__ */ import_react25.default.createElement(
|
1130
1244
|
CardContent,
|
1131
1245
|
{
|
1132
1246
|
headless: true,
|
1133
1247
|
className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-between"
|
1134
1248
|
},
|
1135
|
-
/* @__PURE__ */
|
1136
|
-
/* @__PURE__ */
|
1249
|
+
/* @__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)),
|
1250
|
+
/* @__PURE__ */ import_react25.default.createElement(
|
1137
1251
|
Button,
|
1138
1252
|
{
|
1139
1253
|
onClick: () => onActionClick(),
|
@@ -1145,15 +1259,15 @@ var Announcement = ({
|
|
1145
1259
|
};
|
1146
1260
|
|
1147
1261
|
// blocks/misc/NotFound.tsx
|
1148
|
-
var
|
1262
|
+
var import_react26 = __toESM(require("react"));
|
1149
1263
|
var NotFound = ({ texts }) => {
|
1150
|
-
return /* @__PURE__ */
|
1264
|
+
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
1265
|
};
|
1152
1266
|
|
1153
1267
|
// blocks/misc/NoPermission.tsx
|
1154
|
-
var
|
1268
|
+
var import_react27 = __toESM(require("react"));
|
1155
1269
|
var NoPermission = ({ texts }) => {
|
1156
|
-
return /* @__PURE__ */
|
1270
|
+
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
1271
|
"svg",
|
1158
1272
|
{
|
1159
1273
|
stroke: "currentColor",
|
@@ -1163,18 +1277,18 @@ var NoPermission = ({ texts }) => {
|
|
1163
1277
|
height: "0.35em",
|
1164
1278
|
width: "0.35em"
|
1165
1279
|
},
|
1166
|
-
/* @__PURE__ */
|
1167
|
-
)), /* @__PURE__ */
|
1280
|
+
/* @__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" })
|
1281
|
+
)), /* @__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
1282
|
};
|
1169
1283
|
|
1170
1284
|
// blocks/misc/ContactForm.tsx
|
1171
|
-
var
|
1285
|
+
var import_react29 = __toESM(require("react"));
|
1172
1286
|
var import_react_hook_form2 = require("react-hook-form");
|
1173
1287
|
var import_zod = require("@hookform/resolvers/zod");
|
1174
1288
|
var z = __toESM(require("zod"));
|
1175
1289
|
|
1176
1290
|
// elements/select/Select.tsx
|
1177
|
-
var
|
1291
|
+
var import_react28 = __toESM(require("react"));
|
1178
1292
|
var import_react_select = __toESM(require("react-select"));
|
1179
1293
|
var import_creatable = __toESM(require("react-select/creatable"));
|
1180
1294
|
var import_clsx2 = __toESM(require("clsx"));
|
@@ -1185,10 +1299,10 @@ var Select = ({
|
|
1185
1299
|
}) => {
|
1186
1300
|
const NoOption = () => {
|
1187
1301
|
var _a, _b;
|
1188
|
-
return /* @__PURE__ */
|
1302
|
+
return /* @__PURE__ */ import_react28.default.createElement("div", null, (_b = (_a = props.texts) == null ? void 0 : _a.noOptions) != null ? _b : "No Items Found");
|
1189
1303
|
};
|
1190
1304
|
const Control = ({ children, innerProps, innerRef }) => {
|
1191
|
-
return /* @__PURE__ */
|
1305
|
+
return /* @__PURE__ */ import_react28.default.createElement(
|
1192
1306
|
"div",
|
1193
1307
|
{
|
1194
1308
|
ref: innerRef,
|
@@ -1201,7 +1315,7 @@ var Select = ({
|
|
1201
1315
|
);
|
1202
1316
|
};
|
1203
1317
|
const Option = ({ children, innerProps, innerRef }) => {
|
1204
|
-
return /* @__PURE__ */
|
1318
|
+
return /* @__PURE__ */ import_react28.default.createElement(
|
1205
1319
|
"div",
|
1206
1320
|
{
|
1207
1321
|
ref: innerRef,
|
@@ -1222,7 +1336,7 @@ var Select = ({
|
|
1222
1336
|
...menuProps
|
1223
1337
|
}) => {
|
1224
1338
|
const menuOpen = menuProps.selectProps.menuIsOpen;
|
1225
|
-
return /* @__PURE__ */
|
1339
|
+
return /* @__PURE__ */ import_react28.default.createElement(
|
1226
1340
|
"div",
|
1227
1341
|
{
|
1228
1342
|
className: cn(
|
@@ -1236,7 +1350,7 @@ var Select = ({
|
|
1236
1350
|
children
|
1237
1351
|
);
|
1238
1352
|
};
|
1239
|
-
return /* @__PURE__ */
|
1353
|
+
return /* @__PURE__ */ import_react28.default.createElement(
|
1240
1354
|
"div",
|
1241
1355
|
{
|
1242
1356
|
className: cn(
|
@@ -1244,10 +1358,10 @@ var Select = ({
|
|
1244
1358
|
props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
|
1245
1359
|
)
|
1246
1360
|
},
|
1247
|
-
props.label && /* @__PURE__ */
|
1248
|
-
props.isLoading ? /* @__PURE__ */
|
1361
|
+
props.label && /* @__PURE__ */ import_react28.default.createElement(Label, { ...labelProps }, props.label),
|
1362
|
+
props.isLoading ? /* @__PURE__ */ import_react28.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? (
|
1249
1363
|
// TODO: enable keyboard to go to the next item in the list
|
1250
|
-
/* @__PURE__ */
|
1364
|
+
/* @__PURE__ */ import_react28.default.createElement(
|
1251
1365
|
import_react_select.default,
|
1252
1366
|
{
|
1253
1367
|
noOptionsMessage: NoOption,
|
@@ -1284,7 +1398,7 @@ var Select = ({
|
|
1284
1398
|
isSearchable: props.isSearchable
|
1285
1399
|
}
|
1286
1400
|
)
|
1287
|
-
) : /* @__PURE__ */
|
1401
|
+
) : /* @__PURE__ */ import_react28.default.createElement(
|
1288
1402
|
import_creatable.default,
|
1289
1403
|
{
|
1290
1404
|
formatCreateLabel: (inputValue) => {
|
@@ -1314,7 +1428,7 @@ var Select = ({
|
|
1314
1428
|
onInputChange: (newValue, action) => props.onInputChange(newValue, action)
|
1315
1429
|
}
|
1316
1430
|
),
|
1317
|
-
!props.hideHelperText && /* @__PURE__ */
|
1431
|
+
!props.hideHelperText && /* @__PURE__ */ import_react28.default.createElement(
|
1318
1432
|
"p",
|
1319
1433
|
{
|
1320
1434
|
className: cn(
|
@@ -1328,8 +1442,8 @@ var Select = ({
|
|
1328
1442
|
};
|
1329
1443
|
|
1330
1444
|
// elements/textarea/Textarea.tsx
|
1331
|
-
var
|
1332
|
-
var Textarea =
|
1445
|
+
var React28 = __toESM(require("react"));
|
1446
|
+
var Textarea = React28.forwardRef(
|
1333
1447
|
({
|
1334
1448
|
className,
|
1335
1449
|
classNames,
|
@@ -1341,7 +1455,7 @@ var Textarea = React20.forwardRef(
|
|
1341
1455
|
isLoading,
|
1342
1456
|
...props
|
1343
1457
|
}, ref) => {
|
1344
|
-
return /* @__PURE__ */
|
1458
|
+
return /* @__PURE__ */ React28.createElement(
|
1345
1459
|
"div",
|
1346
1460
|
{
|
1347
1461
|
className: cn(
|
@@ -1350,7 +1464,7 @@ var Textarea = React20.forwardRef(
|
|
1350
1464
|
className
|
1351
1465
|
)
|
1352
1466
|
},
|
1353
|
-
/* @__PURE__ */
|
1467
|
+
/* @__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
1468
|
"div",
|
1355
1469
|
{
|
1356
1470
|
className: "hawa-text-start hawa-text-xs hawa-transition-all hawa-leading-none"
|
@@ -1359,7 +1473,7 @@ var Textarea = React20.forwardRef(
|
|
1359
1473
|
"/",
|
1360
1474
|
textareaProps == null ? void 0 : textareaProps.maxLength
|
1361
1475
|
)),
|
1362
|
-
isLoading ? /* @__PURE__ */
|
1476
|
+
isLoading ? /* @__PURE__ */ React28.createElement(Skeleton, { style: { height: 40 } }) : /* @__PURE__ */ React28.createElement(
|
1363
1477
|
"textarea",
|
1364
1478
|
{
|
1365
1479
|
...textareaProps,
|
@@ -1370,7 +1484,7 @@ var Textarea = React20.forwardRef(
|
|
1370
1484
|
ref
|
1371
1485
|
}
|
1372
1486
|
),
|
1373
|
-
/* @__PURE__ */
|
1487
|
+
/* @__PURE__ */ React28.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, !forceHideHelperText && /* @__PURE__ */ React28.createElement(
|
1374
1488
|
"p",
|
1375
1489
|
{
|
1376
1490
|
className: cn(
|
@@ -1379,7 +1493,7 @@ var Textarea = React20.forwardRef(
|
|
1379
1493
|
)
|
1380
1494
|
},
|
1381
1495
|
props.helperText
|
1382
|
-
), showCount && countPosition === "bottom" && /* @__PURE__ */
|
1496
|
+
), 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
1497
|
);
|
1384
1498
|
}
|
1385
1499
|
);
|
@@ -1454,7 +1568,7 @@ var ContactForm = ({
|
|
1454
1568
|
console.log("Form is submitted but onSubmit prop is missing");
|
1455
1569
|
}
|
1456
1570
|
};
|
1457
|
-
return /* @__PURE__ */
|
1571
|
+
return /* @__PURE__ */ import_react29.default.createElement(
|
1458
1572
|
Card,
|
1459
1573
|
{
|
1460
1574
|
className: cn(
|
@@ -1463,7 +1577,7 @@ var ContactForm = ({
|
|
1463
1577
|
),
|
1464
1578
|
style: cardless ? { boxShadow: "none" } : void 0
|
1465
1579
|
},
|
1466
|
-
/* @__PURE__ */
|
1580
|
+
/* @__PURE__ */ import_react29.default.createElement(CardContent, { headless: true, className: cardless ? "!hawa-p-0" : "" }, /* @__PURE__ */ import_react29.default.createElement(
|
1467
1581
|
"form",
|
1468
1582
|
{
|
1469
1583
|
noValidate: true,
|
@@ -1472,7 +1586,7 @@ var ContactForm = ({
|
|
1472
1586
|
id: formId,
|
1473
1587
|
autoComplete: formAutoComplete
|
1474
1588
|
},
|
1475
|
-
/* @__PURE__ */
|
1589
|
+
/* @__PURE__ */ import_react29.default.createElement(
|
1476
1590
|
"div",
|
1477
1591
|
{
|
1478
1592
|
className: cn(
|
@@ -1483,14 +1597,14 @@ var ContactForm = ({
|
|
1483
1597
|
}
|
1484
1598
|
)
|
1485
1599
|
},
|
1486
|
-
/* @__PURE__ */
|
1600
|
+
/* @__PURE__ */ import_react29.default.createElement(
|
1487
1601
|
import_react_hook_form2.Controller,
|
1488
1602
|
{
|
1489
1603
|
control,
|
1490
1604
|
name: "name",
|
1491
1605
|
render: ({ field }) => {
|
1492
1606
|
var _a2;
|
1493
|
-
return /* @__PURE__ */
|
1607
|
+
return /* @__PURE__ */ import_react29.default.createElement(
|
1494
1608
|
Input,
|
1495
1609
|
{
|
1496
1610
|
label: (texts == null ? void 0 : texts.name.label) || "Name",
|
@@ -1503,14 +1617,14 @@ var ContactForm = ({
|
|
1503
1617
|
}
|
1504
1618
|
}
|
1505
1619
|
),
|
1506
|
-
/* @__PURE__ */
|
1620
|
+
/* @__PURE__ */ import_react29.default.createElement(
|
1507
1621
|
import_react_hook_form2.Controller,
|
1508
1622
|
{
|
1509
1623
|
control,
|
1510
1624
|
name: "email",
|
1511
1625
|
render: ({ field }) => {
|
1512
1626
|
var _a2;
|
1513
|
-
return /* @__PURE__ */
|
1627
|
+
return /* @__PURE__ */ import_react29.default.createElement(
|
1514
1628
|
Input,
|
1515
1629
|
{
|
1516
1630
|
label: (texts == null ? void 0 : texts.email.label) || "Email",
|
@@ -1526,7 +1640,7 @@ var ContactForm = ({
|
|
1526
1640
|
),
|
1527
1641
|
customFields && customFields.map((customField) => {
|
1528
1642
|
console.log("custom", customField);
|
1529
|
-
return /* @__PURE__ */
|
1643
|
+
return /* @__PURE__ */ import_react29.default.createElement(
|
1530
1644
|
import_react_hook_form2.Controller,
|
1531
1645
|
{
|
1532
1646
|
control,
|
@@ -1536,7 +1650,7 @@ var ContactForm = ({
|
|
1536
1650
|
switch (type) {
|
1537
1651
|
case "text":
|
1538
1652
|
case "number":
|
1539
|
-
return /* @__PURE__ */
|
1653
|
+
return /* @__PURE__ */ import_react29.default.createElement(
|
1540
1654
|
Input,
|
1541
1655
|
{
|
1542
1656
|
id: customField.name,
|
@@ -1547,7 +1661,7 @@ var ContactForm = ({
|
|
1547
1661
|
}
|
1548
1662
|
);
|
1549
1663
|
case "select":
|
1550
|
-
return /* @__PURE__ */
|
1664
|
+
return /* @__PURE__ */ import_react29.default.createElement(
|
1551
1665
|
Select,
|
1552
1666
|
{
|
1553
1667
|
label,
|
@@ -1557,20 +1671,20 @@ var ContactForm = ({
|
|
1557
1671
|
}
|
1558
1672
|
);
|
1559
1673
|
default:
|
1560
|
-
return /* @__PURE__ */
|
1674
|
+
return /* @__PURE__ */ import_react29.default.createElement("div", null, "Unknown type");
|
1561
1675
|
}
|
1562
1676
|
}
|
1563
1677
|
}
|
1564
1678
|
);
|
1565
1679
|
}),
|
1566
|
-
/* @__PURE__ */
|
1680
|
+
/* @__PURE__ */ import_react29.default.createElement(
|
1567
1681
|
import_react_hook_form2.Controller,
|
1568
1682
|
{
|
1569
1683
|
control,
|
1570
1684
|
name: "message",
|
1571
1685
|
render: ({ field }) => {
|
1572
1686
|
var _a2;
|
1573
|
-
return /* @__PURE__ */
|
1687
|
+
return /* @__PURE__ */ import_react29.default.createElement(
|
1574
1688
|
Textarea,
|
1575
1689
|
{
|
1576
1690
|
label: (texts == null ? void 0 : texts.message.label) || "Message",
|
@@ -1587,7 +1701,7 @@ var ContactForm = ({
|
|
1587
1701
|
}
|
1588
1702
|
}
|
1589
1703
|
),
|
1590
|
-
/* @__PURE__ */
|
1704
|
+
/* @__PURE__ */ import_react29.default.createElement(Button, { type: "submit", className: "hawa-w-full" }, (texts == null ? void 0 : texts.submit) || "Submit")
|
1591
1705
|
))
|
1592
1706
|
);
|
1593
1707
|
};
|