@sikka/hawa 0.36.1-next → 0.37.0-next
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -5
- package/dist/appLayout/index.d.mts +0 -2
- package/dist/appLayout/index.d.ts +0 -2
- package/dist/appLayout/index.js +20 -7
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +21 -8
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/blocks/auth/index.js +11 -14
- package/dist/blocks/auth/index.mjs +1 -1
- package/dist/blocks/feedback/index.js +11 -14
- package/dist/blocks/feedback/index.mjs +1 -1
- package/dist/blocks/index.js +295 -181
- package/dist/blocks/index.mjs +2 -2
- package/dist/blocks/misc/index.js +257 -143
- package/dist/blocks/misc/index.mjs +50 -16
- package/dist/blocks/pricing/index.js +94 -11
- package/dist/blocks/pricing/index.mjs +1 -1
- package/dist/{chunk-CJ57JBYA.mjs → chunk-I5YX7N76.mjs} +94 -11
- package/dist/{chunk-T33FXOHA.mjs → chunk-PO5OW6SQ.mjs} +151 -40
- package/dist/{chunk-HLYAX77R.mjs → chunk-SE5A4R76.mjs} +11 -14
- package/dist/{chunk-OPYDG34F.mjs → chunk-ZBUBNKF6.mjs} +93 -1
- package/dist/combobox/index.d.mts +1 -4
- package/dist/combobox/index.d.ts +1 -4
- package/dist/combobox/index.js +3 -2
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs +3 -2
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/command/index.d.mts +4 -36
- package/dist/command/index.d.ts +4 -36
- package/dist/command/index.js +44 -6
- package/dist/command/index.js.map +1 -1
- package/dist/command/index.mjs +40 -4
- package/dist/command/index.mjs.map +1 -1
- package/dist/dialog/index.js +1 -1
- package/dist/dialog/index.js.map +1 -1
- package/dist/dialog/index.mjs +1 -1
- package/dist/dialog/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +28 -2
- package/dist/elements/index.d.ts +28 -2
- package/dist/elements/index.js +438 -285
- package/dist/elements/index.mjs +42 -5
- package/dist/hooks/index.d.mts +25 -1
- package/dist/hooks/index.d.ts +25 -1
- package/dist/hooks/index.js +96 -0
- package/dist/hooks/index.mjs +9 -1
- package/dist/index-CoPyqTu8.d.mts +63 -0
- package/dist/index-CoPyqTu8.d.ts +63 -0
- package/dist/index.css +23 -0
- package/dist/index.d.mts +52 -4
- package/dist/index.d.ts +52 -4
- package/dist/index.js +965 -708
- package/dist/index.mjs +496 -245
- package/dist/layout/index.d.mts +0 -2
- package/dist/layout/index.d.ts +0 -2
- package/dist/layout/index.js +20 -7
- package/dist/layout/index.mjs +19 -8
- package/dist/phoneInput/index.js +11 -14
- package/dist/phoneInput/index.js.map +1 -1
- package/dist/phoneInput/index.mjs +11 -14
- package/dist/phoneInput/index.mjs.map +1 -1
- package/dist/scrollArea/index.js +94 -11
- package/dist/scrollArea/index.js.map +1 -1
- package/dist/scrollArea/index.mjs +94 -11
- package/dist/scrollArea/index.mjs.map +1 -1
- package/dist/select/index.js +11 -14
- package/dist/select/index.js.map +1 -1
- package/dist/select/index.mjs +11 -14
- package/dist/select/index.mjs.map +1 -1
- package/dist/tabs/index.d.mts +3 -1
- package/dist/tabs/index.d.ts +3 -1
- package/dist/tabs/index.js +189 -32
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +184 -27
- package/dist/tabs/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -1727,7 +1727,7 @@ var DialogContent = React14.forwardRef(({ className, children, persist, hideClos
|
|
1727
1727
|
},
|
1728
1728
|
ref,
|
1729
1729
|
className: cn(
|
1730
|
-
"hawa-fixed hawa-left-[50%] hawa-top-[50%] hawa-z-50 hawa-grid hawa-w-
|
1730
|
+
"hawa-fixed hawa-left-[50%] hawa-top-[50%] hawa-z-50 hawa-grid hawa-w-[90%] hawa-max-w-lg hawa-translate-x-[-50%] hawa-translate-y-[-50%] hawa-gap-4 hawa-border hawa-bg-background hawa-p-6 hawa-shadow-lg hawa-transition-all hawa-duration-200 data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[state=closed]:hawa-slide-out-to-left-1/2 data-[state=closed]:hawa-slide-out-to-top-[48%] data-[state=open]:hawa-slide-in-from-left-1/2 data-[state=open]:hawa-slide-in-from-top-[48%] hawa-rounded md:hawa-w-full",
|
1731
1731
|
className
|
1732
1732
|
),
|
1733
1733
|
...props
|
@@ -3478,6 +3478,7 @@ import * as PopoverPrimitive2 from "@radix-ui/react-popover";
|
|
3478
3478
|
|
3479
3479
|
// elements/command/Command.tsx
|
3480
3480
|
import * as React27 from "react";
|
3481
|
+
import { Dialog as Dialog2 } from "@radix-ui/react-dialog";
|
3481
3482
|
import { Command as CommandPrimitive } from "cmdk";
|
3482
3483
|
var Command = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
3483
3484
|
CommandPrimitive,
|
@@ -3491,7 +3492,7 @@ var Command = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
3491
3492
|
}
|
3492
3493
|
));
|
3493
3494
|
var CommandDialog = ({ children, ...props }) => {
|
3494
|
-
return /* @__PURE__ */ React27.createElement(
|
3495
|
+
return /* @__PURE__ */ React27.createElement(Dialog2, { ...props }, /* @__PURE__ */ React27.createElement(DialogContent, { className: "hawa-overflow-hidden hawa-p-0 hawa-shadow-lg" }, /* @__PURE__ */ React27.createElement(Command, { className: "[&_[cmdk-group-heading]]:hawa-px-2 [&_[cmdk-group-heading]]:hawa-font-medium [&_[cmdk-group-heading]]:hawa-text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:hawa-pt-0 [&_[cmdk-group]]:hawa-px-2 [&_[cmdk-input-wrapper]_svg]:hawa-h-5 [&_[cmdk-input-wrapper]_svg]:hawa-w-5 [&_[cmdk-input]]:hawa-h-12 [&_[cmdk-item]]:hawa-px-2 [&_[cmdk-item]]:hawa-py-3 [&_[cmdk-item]_svg]:hawa-h-5 [&_[cmdk-item]_svg]:hawa-w-5" }, children)));
|
3495
3496
|
};
|
3496
3497
|
var CommandInput = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
3497
3498
|
"div",
|
@@ -3586,13 +3587,47 @@ var CommandShortcut = ({
|
|
3586
3587
|
"span",
|
3587
3588
|
{
|
3588
3589
|
className: cn(
|
3589
|
-
"hawa-
|
3590
|
+
"hawa-ms-auto hawa-text-xs hawa-tracking-widest hawa-text-muted-foreground",
|
3590
3591
|
className
|
3591
3592
|
),
|
3592
3593
|
...props
|
3593
3594
|
}
|
3594
3595
|
);
|
3595
3596
|
};
|
3597
|
+
var FullCommand = ({ items, direction = "ltr", texts }) => {
|
3598
|
+
return /* @__PURE__ */ React27.createElement(
|
3599
|
+
Command,
|
3600
|
+
{
|
3601
|
+
dir: direction,
|
3602
|
+
className: "hawa-rounded-lg hawa-border hawa-shadow-md !hawa-h-full"
|
3603
|
+
},
|
3604
|
+
/* @__PURE__ */ React27.createElement(
|
3605
|
+
CommandInput,
|
3606
|
+
{
|
3607
|
+
placeholder: (texts == null ? void 0 : texts.searchPlaceholder) || "Type a command or search..."
|
3608
|
+
}
|
3609
|
+
),
|
3610
|
+
/* @__PURE__ */ React27.createElement(CommandList, null, /* @__PURE__ */ React27.createElement(CommandEmpty, null, (texts == null ? void 0 : texts.emptyText) || "No results found."), items.map((item, index) => {
|
3611
|
+
var _a;
|
3612
|
+
if (item.type === "group") {
|
3613
|
+
return /* @__PURE__ */ React27.createElement(CommandGroup, { heading: item.heading, key: index }, (_a = item.items) == null ? void 0 : _a.map((subItem, subIndex) => /* @__PURE__ */ React27.createElement(CommandItem, { key: subIndex, onSelect: subItem.action }, /* @__PURE__ */ React27.createElement(subItem.icon, { className: "hawa-icon hawa-me-2" }), /* @__PURE__ */ React27.createElement("span", null, subItem.text), subItem.shortcut && /* @__PURE__ */ React27.createElement(CommandShortcut, null, subItem.shortcut))));
|
3614
|
+
} else if (item.type === "separator") {
|
3615
|
+
return /* @__PURE__ */ React27.createElement(CommandSeparator, { key: index });
|
3616
|
+
}
|
3617
|
+
return null;
|
3618
|
+
}))
|
3619
|
+
);
|
3620
|
+
};
|
3621
|
+
var AppCommand = ({ commandProps, dialogProps }) => {
|
3622
|
+
return /* @__PURE__ */ React27.createElement(Dialog2, { ...dialogProps }, /* @__PURE__ */ React27.createElement(
|
3623
|
+
DialogContent,
|
3624
|
+
{
|
3625
|
+
hideCloseButton: true,
|
3626
|
+
className: "hawa-overflow-hidden !hawa-p-0 hawa-shadow-lg !hawa-min-h-[50%]"
|
3627
|
+
},
|
3628
|
+
/* @__PURE__ */ React27.createElement(FullCommand, { ...commandProps })
|
3629
|
+
));
|
3630
|
+
};
|
3596
3631
|
CommandShortcut.displayName = "CommandShortcut";
|
3597
3632
|
CommandItem.displayName = CommandPrimitive.Item.displayName;
|
3598
3633
|
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
@@ -4085,7 +4120,7 @@ var SortButton = (props) => {
|
|
4085
4120
|
};
|
4086
4121
|
|
4087
4122
|
// elements/tabs/Tabs.tsx
|
4088
|
-
import * as
|
4123
|
+
import * as React42 from "react";
|
4089
4124
|
|
4090
4125
|
// hooks/useIsomorphicEffect.ts
|
4091
4126
|
import { useEffect as useEffect7, useLayoutEffect } from "react";
|
@@ -4531,6 +4566,94 @@ function useClickOutside(handler, events, nodes) {
|
|
4531
4566
|
return ref;
|
4532
4567
|
}
|
4533
4568
|
|
4569
|
+
// hooks/useShortcuts.ts
|
4570
|
+
import { useEffect as useEffect21 } from "react";
|
4571
|
+
function parseHotkey(hotkey) {
|
4572
|
+
const keys = hotkey.toLowerCase().split("+").map((part) => part.trim());
|
4573
|
+
const modifiers = {
|
4574
|
+
alt: keys.includes("alt"),
|
4575
|
+
ctrl: keys.includes("ctrl"),
|
4576
|
+
meta: keys.includes("meta"),
|
4577
|
+
mod: keys.includes("mod"),
|
4578
|
+
shift: keys.includes("shift")
|
4579
|
+
};
|
4580
|
+
const reservedKeys = ["alt", "ctrl", "meta", "shift", "mod"];
|
4581
|
+
const freeKey = keys.find((key) => !reservedKeys.includes(key));
|
4582
|
+
return {
|
4583
|
+
...modifiers,
|
4584
|
+
key: freeKey
|
4585
|
+
};
|
4586
|
+
}
|
4587
|
+
function isExactHotkey(hotkey, event) {
|
4588
|
+
const { alt, ctrl, meta, mod, shift, key } = hotkey;
|
4589
|
+
const { altKey, ctrlKey, metaKey, shiftKey, key: pressedKey } = event;
|
4590
|
+
if (alt !== altKey) {
|
4591
|
+
return false;
|
4592
|
+
}
|
4593
|
+
if (mod) {
|
4594
|
+
if (!ctrlKey && !metaKey) {
|
4595
|
+
return false;
|
4596
|
+
}
|
4597
|
+
} else {
|
4598
|
+
if (ctrl !== ctrlKey) {
|
4599
|
+
return false;
|
4600
|
+
}
|
4601
|
+
if (meta !== metaKey) {
|
4602
|
+
return false;
|
4603
|
+
}
|
4604
|
+
}
|
4605
|
+
if (shift !== shiftKey) {
|
4606
|
+
return false;
|
4607
|
+
}
|
4608
|
+
if (key && (pressedKey.toLowerCase() === key.toLowerCase() || event.code.replace("Key", "").toLowerCase() === key.toLowerCase())) {
|
4609
|
+
return true;
|
4610
|
+
}
|
4611
|
+
return false;
|
4612
|
+
}
|
4613
|
+
function getHotkeyMatcher(hotkey) {
|
4614
|
+
return (event) => isExactHotkey(parseHotkey(hotkey), event);
|
4615
|
+
}
|
4616
|
+
function getHotkeyHandler(hotkeys) {
|
4617
|
+
return (event) => {
|
4618
|
+
const _event = "nativeEvent" in event ? event.nativeEvent : event;
|
4619
|
+
hotkeys.forEach(([hotkey, handler, options = { preventDefault: true }]) => {
|
4620
|
+
if (getHotkeyMatcher(hotkey)(_event)) {
|
4621
|
+
if (options.preventDefault) {
|
4622
|
+
event.preventDefault();
|
4623
|
+
}
|
4624
|
+
handler(_event);
|
4625
|
+
}
|
4626
|
+
});
|
4627
|
+
};
|
4628
|
+
}
|
4629
|
+
function shouldFireEvent(event, tagsToIgnore, triggerOnContentEditable = false) {
|
4630
|
+
if (event.target instanceof HTMLElement) {
|
4631
|
+
if (triggerOnContentEditable) {
|
4632
|
+
return !tagsToIgnore.includes(event.target.tagName);
|
4633
|
+
}
|
4634
|
+
return !event.target.isContentEditable && !tagsToIgnore.includes(event.target.tagName);
|
4635
|
+
}
|
4636
|
+
return true;
|
4637
|
+
}
|
4638
|
+
function useShortcuts(hotkeys, tagsToIgnore = ["INPUT", "TEXTAREA", "SELECT"], triggerOnContentEditable = false) {
|
4639
|
+
useEffect21(() => {
|
4640
|
+
const keydownListener = (event) => {
|
4641
|
+
hotkeys.forEach(
|
4642
|
+
([hotkey, handler, options = { preventDefault: true }]) => {
|
4643
|
+
if (getHotkeyMatcher(hotkey)(event) && shouldFireEvent(event, tagsToIgnore, triggerOnContentEditable)) {
|
4644
|
+
if (options.preventDefault) {
|
4645
|
+
event.preventDefault();
|
4646
|
+
}
|
4647
|
+
handler(event);
|
4648
|
+
}
|
4649
|
+
}
|
4650
|
+
);
|
4651
|
+
};
|
4652
|
+
document.documentElement.addEventListener("keydown", keydownListener);
|
4653
|
+
return () => document.documentElement.removeEventListener("keydown", keydownListener);
|
4654
|
+
}, [hotkeys]);
|
4655
|
+
}
|
4656
|
+
|
4534
4657
|
// elements/tabs/Tabs.tsx
|
4535
4658
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
4536
4659
|
import { tv } from "tailwind-variants";
|
@@ -4590,14 +4713,137 @@ var FloatBox = ({
|
|
4590
4713
|
);
|
4591
4714
|
};
|
4592
4715
|
|
4716
|
+
// elements/scrollArea/ScrollArea.tsx
|
4717
|
+
import * as React41 from "react";
|
4718
|
+
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
4719
|
+
var ScrollArea = React41.forwardRef(({ className, children, orientation = "vertical", ...props }, ref) => {
|
4720
|
+
const scrollAreaRef = React41.useRef(null);
|
4721
|
+
const isDragging = React41.useRef(false);
|
4722
|
+
const startPos = React41.useRef({ x: 0, y: 0 });
|
4723
|
+
const scrollPos = React41.useRef({ top: 0, left: 0 });
|
4724
|
+
const [showLeftFade, setShowLeftFade] = React41.useState(false);
|
4725
|
+
const [showRightFade, setShowRightFade] = React41.useState(false);
|
4726
|
+
const checkOverflow = () => {
|
4727
|
+
if (scrollAreaRef.current) {
|
4728
|
+
const { scrollLeft, scrollWidth, clientWidth } = scrollAreaRef.current;
|
4729
|
+
setShowLeftFade(scrollLeft > 0);
|
4730
|
+
setShowRightFade(scrollLeft + clientWidth < scrollWidth);
|
4731
|
+
}
|
4732
|
+
};
|
4733
|
+
const onMouseDown = (e) => {
|
4734
|
+
isDragging.current = true;
|
4735
|
+
startPos.current = { x: e.clientX, y: e.clientY };
|
4736
|
+
if (scrollAreaRef.current) {
|
4737
|
+
scrollPos.current = {
|
4738
|
+
top: scrollAreaRef.current.scrollTop,
|
4739
|
+
left: scrollAreaRef.current.scrollLeft
|
4740
|
+
};
|
4741
|
+
}
|
4742
|
+
document.addEventListener("mousemove", onMouseMove);
|
4743
|
+
document.addEventListener("mouseup", onMouseUp);
|
4744
|
+
};
|
4745
|
+
const onMouseMove = (e) => {
|
4746
|
+
if (!isDragging.current || !scrollAreaRef.current)
|
4747
|
+
return;
|
4748
|
+
const dx = e.clientX - startPos.current.x;
|
4749
|
+
const dy = e.clientY - startPos.current.y;
|
4750
|
+
if (orientation === "vertical") {
|
4751
|
+
scrollAreaRef.current.scrollTop = scrollPos.current.top - dy;
|
4752
|
+
} else {
|
4753
|
+
scrollAreaRef.current.scrollLeft = scrollPos.current.left - dx;
|
4754
|
+
checkOverflow();
|
4755
|
+
}
|
4756
|
+
};
|
4757
|
+
const onMouseUp = () => {
|
4758
|
+
isDragging.current = false;
|
4759
|
+
document.removeEventListener("mousemove", onMouseMove);
|
4760
|
+
document.removeEventListener("mouseup", onMouseUp);
|
4761
|
+
};
|
4762
|
+
React41.useEffect(() => {
|
4763
|
+
checkOverflow();
|
4764
|
+
if (scrollAreaRef.current) {
|
4765
|
+
scrollAreaRef.current.addEventListener("scroll", checkOverflow);
|
4766
|
+
window.addEventListener("resize", checkOverflow);
|
4767
|
+
}
|
4768
|
+
return () => {
|
4769
|
+
if (scrollAreaRef.current) {
|
4770
|
+
scrollAreaRef.current.removeEventListener("scroll", checkOverflow);
|
4771
|
+
}
|
4772
|
+
window.removeEventListener("resize", checkOverflow);
|
4773
|
+
};
|
4774
|
+
}, []);
|
4775
|
+
return /* @__PURE__ */ React41.createElement(
|
4776
|
+
ScrollAreaPrimitive.Root,
|
4777
|
+
{
|
4778
|
+
ref,
|
4779
|
+
className: cn("hawa-relative hawa-overflow-hidden", className),
|
4780
|
+
...props
|
4781
|
+
},
|
4782
|
+
/* @__PURE__ */ React41.createElement(
|
4783
|
+
"div",
|
4784
|
+
{
|
4785
|
+
className: cn(
|
4786
|
+
"hawa-pointer-events-none hawa-absolute hawa-bg-background/ hawa-h-full hawa-w-[50px] hawa-z-10 hawa-start-0 hawa-mask-fade-right",
|
4787
|
+
showLeftFade ? "hawa-block" : "hawa-hidden"
|
4788
|
+
)
|
4789
|
+
}
|
4790
|
+
),
|
4791
|
+
/* @__PURE__ */ React41.createElement(
|
4792
|
+
"div",
|
4793
|
+
{
|
4794
|
+
className: cn(
|
4795
|
+
"hawa-pointer-events-none hawa-absolute hawa-bg-background/ hawa-mask-fade-left hawa-end-0 hawa-h-full hawa-w-[50px] hawa-z-10 ",
|
4796
|
+
showRightFade ? "hawa-block" : "hawa-hidden"
|
4797
|
+
)
|
4798
|
+
}
|
4799
|
+
),
|
4800
|
+
/* @__PURE__ */ React41.createElement(
|
4801
|
+
ScrollAreaPrimitive.Viewport,
|
4802
|
+
{
|
4803
|
+
ref: scrollAreaRef,
|
4804
|
+
className: "hawa-h-full hawa-w-full hawa-rounded-[inherit]",
|
4805
|
+
onMouseDown
|
4806
|
+
},
|
4807
|
+
children
|
4808
|
+
),
|
4809
|
+
/* @__PURE__ */ React41.createElement(ScrollBar, { orientation }),
|
4810
|
+
/* @__PURE__ */ React41.createElement(ScrollAreaPrimitive.Corner, null)
|
4811
|
+
);
|
4812
|
+
});
|
4813
|
+
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
4814
|
+
var ScrollBar = React41.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React41.createElement(
|
4815
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
4816
|
+
{
|
4817
|
+
ref,
|
4818
|
+
orientation,
|
4819
|
+
className: cn(
|
4820
|
+
"hawa-flex hawa-touch-none hawa-select-none hawa-transition-colors",
|
4821
|
+
orientation === "vertical" && "hawa-h-full hawa-w-2.5 hawa-border-l hawa-border-l-transparent hawa-p-[1px]",
|
4822
|
+
orientation === "horizontal" && "hawa-h-2.5 hawa-border-t hawa-border-t-transparent hawa-p-[1px]",
|
4823
|
+
className
|
4824
|
+
),
|
4825
|
+
...props
|
4826
|
+
},
|
4827
|
+
/* @__PURE__ */ React41.createElement(
|
4828
|
+
ScrollAreaPrimitive.ScrollAreaThumb,
|
4829
|
+
{
|
4830
|
+
className: cn(
|
4831
|
+
"hawa-relative hawa-rounded-full hawa-bg-border",
|
4832
|
+
orientation === "vertical" && "hawa-flex-1"
|
4833
|
+
)
|
4834
|
+
}
|
4835
|
+
)
|
4836
|
+
));
|
4837
|
+
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
4838
|
+
|
4593
4839
|
// elements/tabs/Tabs.tsx
|
4594
4840
|
var tabsListVariant = tv({
|
4595
4841
|
base: "",
|
4596
4842
|
variants: {
|
4597
4843
|
variant: {
|
4598
|
-
default: "hawa-flex hawa-w-fit hawa-
|
4599
|
-
underlined: "hawa-flex hawa-w-fit hawa-
|
4600
|
-
underlined_tabs: "hawa-flex hawa-w-fit hawa-
|
4844
|
+
default: "hawa-flex hawa-w-fit hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-border hawa-bg-muted hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10",
|
4845
|
+
underlined: "hawa-flex hawa-w-fit hawa-items-center hawa-justify-start hawa-gap-1 hawa-rounded hawa-p-1 hawa-text-muted-foreground dark:hawa-border-primary/10",
|
4846
|
+
underlined_tabs: "hawa-flex hawa-w-fit hawa-items-center hawa-justify-start hawa-gap-1 hawa-text-muted-foreground"
|
4601
4847
|
},
|
4602
4848
|
orientation: { horizontal: "", vertical: "" }
|
4603
4849
|
},
|
@@ -4649,8 +4895,8 @@ var tabsTriggerVariant = tv({
|
|
4649
4895
|
],
|
4650
4896
|
defaultVariants: { variant: "default", orientation: "horizontal" }
|
4651
4897
|
});
|
4652
|
-
var TabsContext =
|
4653
|
-
var Tabs =
|
4898
|
+
var TabsContext = React42.createContext({ orientation: "horizontal", variant: "default" });
|
4899
|
+
var Tabs = React42.forwardRef(({ className, orientation, variant = "default", ...props }, ref) => /* @__PURE__ */ React42.createElement(
|
4654
4900
|
TabsPrimitive.Root,
|
4655
4901
|
{
|
4656
4902
|
ref,
|
@@ -4661,28 +4907,59 @@ var Tabs = React41.forwardRef(({ className, orientation, variant = "default", ..
|
|
4661
4907
|
),
|
4662
4908
|
...props
|
4663
4909
|
},
|
4664
|
-
/* @__PURE__ */
|
4910
|
+
/* @__PURE__ */ React42.createElement(TabsContext.Provider, { value: { orientation, variant } }, props.children)
|
4665
4911
|
));
|
4666
|
-
var TabsList =
|
4667
|
-
const { orientation, variant } =
|
4668
|
-
|
4669
|
-
|
4670
|
-
{
|
4671
|
-
ref,
|
4672
|
-
className: cn(
|
4673
|
-
tabsListVariant({ variant, orientation }),
|
4674
|
-
orientation === "vertical" ? "hawa-flex-col" : "hawa-flex-row",
|
4675
|
-
className
|
4676
|
-
),
|
4677
|
-
...props
|
4678
|
-
}
|
4912
|
+
var TabsList = React42.forwardRef(({ className, ...props }, ref) => {
|
4913
|
+
const { orientation, variant } = React42.useContext(TabsContext);
|
4914
|
+
const [size, setSize] = React42.useState(
|
4915
|
+
typeof window !== "undefined" && window.innerWidth || 1200
|
4679
4916
|
);
|
4917
|
+
React42.useEffect(() => {
|
4918
|
+
if (typeof window !== "undefined") {
|
4919
|
+
const resize = () => {
|
4920
|
+
setSize(window.innerWidth);
|
4921
|
+
};
|
4922
|
+
resize();
|
4923
|
+
window.addEventListener("resize", resize);
|
4924
|
+
return () => {
|
4925
|
+
window.removeEventListener("resize", resize);
|
4926
|
+
};
|
4927
|
+
}
|
4928
|
+
}, []);
|
4929
|
+
if ((props.scrollable || size < 768) && orientation === "horizontal") {
|
4930
|
+
return /* @__PURE__ */ React42.createElement(ScrollArea, { orientation: "horizontal" }, /* @__PURE__ */ React42.createElement(
|
4931
|
+
TabsPrimitive.List,
|
4932
|
+
{
|
4933
|
+
ref,
|
4934
|
+
className: cn(
|
4935
|
+
tabsListVariant({ variant, orientation }),
|
4936
|
+
"hawa-flex-row hawa-flex-nowrap",
|
4937
|
+
className
|
4938
|
+
),
|
4939
|
+
...props
|
4940
|
+
}
|
4941
|
+
));
|
4942
|
+
} else {
|
4943
|
+
return /* @__PURE__ */ React42.createElement(
|
4944
|
+
TabsPrimitive.List,
|
4945
|
+
{
|
4946
|
+
ref,
|
4947
|
+
className: cn(
|
4948
|
+
tabsListVariant({ variant, orientation }),
|
4949
|
+
orientation === "vertical" ? "hawa-flex-col" : "hawa-flex-row",
|
4950
|
+
"hawa-flex-wrap",
|
4951
|
+
className
|
4952
|
+
),
|
4953
|
+
...props
|
4954
|
+
}
|
4955
|
+
);
|
4956
|
+
}
|
4680
4957
|
});
|
4681
|
-
var TabsTrigger =
|
4682
|
-
const { orientation, variant } =
|
4683
|
-
const tabTriggerRef =
|
4958
|
+
var TabsTrigger = React42.forwardRef(({ className, chipProps, ...props }, ref) => {
|
4959
|
+
const { orientation, variant } = React42.useContext(TabsContext);
|
4960
|
+
const tabTriggerRef = React42.useRef(null);
|
4684
4961
|
const { width } = useMeasureDirty(tabTriggerRef);
|
4685
|
-
return /* @__PURE__ */
|
4962
|
+
return /* @__PURE__ */ React42.createElement(
|
4686
4963
|
TabsPrimitive.Trigger,
|
4687
4964
|
{
|
4688
4965
|
ref: tabTriggerRef,
|
@@ -4694,8 +4971,8 @@ var TabsTrigger = React41.forwardRef(({ className, chipProps, ...props }, ref) =
|
|
4694
4971
|
...props
|
4695
4972
|
},
|
4696
4973
|
props.children,
|
4697
|
-
chipProps && /* @__PURE__ */
|
4698
|
-
/* @__PURE__ */
|
4974
|
+
chipProps && /* @__PURE__ */ React42.createElement(Chip, { ...chipProps }),
|
4975
|
+
/* @__PURE__ */ React42.createElement(
|
4699
4976
|
FloatBox,
|
4700
4977
|
{
|
4701
4978
|
withArrow: true,
|
@@ -4708,7 +4985,7 @@ var TabsTrigger = React41.forwardRef(({ className, chipProps, ...props }, ref) =
|
|
4708
4985
|
)
|
4709
4986
|
);
|
4710
4987
|
});
|
4711
|
-
var TabsContent =
|
4988
|
+
var TabsContent = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React42.createElement(
|
4712
4989
|
TabsPrimitive.Content,
|
4713
4990
|
{
|
4714
4991
|
ref,
|
@@ -4725,7 +5002,7 @@ TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
4725
5002
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
4726
5003
|
|
4727
5004
|
// elements/select/Select.tsx
|
4728
|
-
import
|
5005
|
+
import React43 from "react";
|
4729
5006
|
import ReactSelect from "react-select";
|
4730
5007
|
import CreatableSelect from "react-select/creatable";
|
4731
5008
|
import clsx3 from "clsx";
|
@@ -4736,10 +5013,10 @@ var Select = ({
|
|
4736
5013
|
}) => {
|
4737
5014
|
const NoOption = () => {
|
4738
5015
|
var _a, _b;
|
4739
|
-
return /* @__PURE__ */
|
5016
|
+
return /* @__PURE__ */ React43.createElement("div", null, (_b = (_a = props.texts) == null ? void 0 : _a.noOptions) != null ? _b : "No Items Found");
|
4740
5017
|
};
|
4741
5018
|
const Control = ({ children, innerProps, innerRef }) => {
|
4742
|
-
return /* @__PURE__ */
|
5019
|
+
return /* @__PURE__ */ React43.createElement(
|
4743
5020
|
"div",
|
4744
5021
|
{
|
4745
5022
|
ref: innerRef,
|
@@ -4752,7 +5029,7 @@ var Select = ({
|
|
4752
5029
|
);
|
4753
5030
|
};
|
4754
5031
|
const Option = ({ children, innerProps, innerRef }) => {
|
4755
|
-
return /* @__PURE__ */
|
5032
|
+
return /* @__PURE__ */ React43.createElement(
|
4756
5033
|
"div",
|
4757
5034
|
{
|
4758
5035
|
ref: innerRef,
|
@@ -4773,7 +5050,7 @@ var Select = ({
|
|
4773
5050
|
...menuProps
|
4774
5051
|
}) => {
|
4775
5052
|
const menuOpen = menuProps.selectProps.menuIsOpen;
|
4776
|
-
return /* @__PURE__ */
|
5053
|
+
return /* @__PURE__ */ React43.createElement(
|
4777
5054
|
"div",
|
4778
5055
|
{
|
4779
5056
|
className: cn(
|
@@ -4787,7 +5064,11 @@ var Select = ({
|
|
4787
5064
|
children
|
4788
5065
|
);
|
4789
5066
|
};
|
4790
|
-
|
5067
|
+
let phoneCodeStyles = "hawa-min-w-[65px] hawa-text-right hawa-w-[100px] hawa-p-0 hawa-rounded-r-none hawa-h-[40px]";
|
5068
|
+
let selectContainerStyles = "hawa-rounded hawa-block hawa-w-full hawa-border hawa-transition-all hawa-bg-background hawa-p-0 hawa-px-1 hawa-text-sm";
|
5069
|
+
let selectPlaceholderStyles = "hawa-text-muted-foreground hawa-cursor-pointer hawa-px-1";
|
5070
|
+
let selectIndicatorContainerStyles = "hawa-cursor-pointer hawa-text-muted-foreground hawa-absolute hawa-end-0 hawa-top-[50%] hawa-bottom-[50%] ";
|
5071
|
+
return /* @__PURE__ */ React43.createElement(
|
4791
5072
|
"div",
|
4792
5073
|
{
|
4793
5074
|
className: cn(
|
@@ -4795,10 +5076,10 @@ var Select = ({
|
|
4795
5076
|
props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
|
4796
5077
|
)
|
4797
5078
|
},
|
4798
|
-
props.label && /* @__PURE__ */
|
4799
|
-
props.isLoading ? /* @__PURE__ */
|
5079
|
+
props.label && /* @__PURE__ */ React43.createElement(Label2, { ...labelProps }, props.label),
|
5080
|
+
props.isLoading ? /* @__PURE__ */ React43.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? (
|
4800
5081
|
// TODO: enable keyboard to go to the next item in the list
|
4801
|
-
/* @__PURE__ */
|
5082
|
+
/* @__PURE__ */ React43.createElement(
|
4802
5083
|
ReactSelect,
|
4803
5084
|
{
|
4804
5085
|
noOptionsMessage: NoOption,
|
@@ -4808,26 +5089,22 @@ var Select = ({
|
|
4808
5089
|
props.controlClassNames
|
4809
5090
|
),
|
4810
5091
|
container: () => cn(
|
4811
|
-
|
4812
|
-
props.phoneCode &&
|
4813
|
-
"hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-0 hawa-px-1 hawa-text-sm",
|
5092
|
+
selectContainerStyles,
|
5093
|
+
props.phoneCode && phoneCodeStyles,
|
4814
5094
|
props.disabled ? "hawa-cursor-not-allowed" : "hawa-cursor-pointer",
|
4815
5095
|
props.isMulti && "hawa-ps-0 "
|
4816
5096
|
),
|
4817
|
-
placeholder: () =>
|
5097
|
+
placeholder: () => selectPlaceholderStyles,
|
4818
5098
|
valueContainer: () => "hawa-text-foreground hawa-px-1 ",
|
4819
5099
|
singleValue: () => "hawa-text-foreground",
|
4820
5100
|
indicatorsContainer: () => cn(
|
4821
|
-
|
5101
|
+
selectIndicatorContainerStyles,
|
4822
5102
|
props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
|
4823
5103
|
)
|
4824
5104
|
},
|
4825
5105
|
unstyled: true,
|
4826
|
-
|
4827
|
-
|
4828
|
-
Menu: Menu2,
|
4829
|
-
IndicatorsContainer: () => null
|
4830
|
-
} : {
|
5106
|
+
autoFocus: false,
|
5107
|
+
components: props.hideIndicator ? { Option, Menu: Menu2, IndicatorsContainer: () => null } : {
|
4831
5108
|
Option,
|
4832
5109
|
Menu: Menu2,
|
4833
5110
|
// Control: (e) => (
|
@@ -4836,7 +5113,7 @@ var Select = ({
|
|
4836
5113
|
// {...e}
|
4837
5114
|
// />
|
4838
5115
|
// ),
|
4839
|
-
ValueContainer: (e) => /* @__PURE__ */
|
5116
|
+
ValueContainer: (e) => /* @__PURE__ */ React43.createElement(
|
4840
5117
|
"div",
|
4841
5118
|
{
|
4842
5119
|
className: cn(
|
@@ -4846,13 +5123,10 @@ var Select = ({
|
|
4846
5123
|
...e
|
4847
5124
|
}
|
4848
5125
|
),
|
4849
|
-
MultiValueContainer: (e) => /* @__PURE__ */
|
5126
|
+
MultiValueContainer: (e) => /* @__PURE__ */ React43.createElement(
|
4850
5127
|
"div",
|
4851
5128
|
{
|
4852
|
-
className:
|
4853
|
-
// e.className,
|
4854
|
-
"hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row"
|
4855
|
-
),
|
5129
|
+
className: "hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row",
|
4856
5130
|
...e
|
4857
5131
|
}
|
4858
5132
|
)
|
@@ -4868,7 +5142,7 @@ var Select = ({
|
|
4868
5142
|
isSearchable: props.isSearchable
|
4869
5143
|
}
|
4870
5144
|
)
|
4871
|
-
) : /* @__PURE__ */
|
5145
|
+
) : /* @__PURE__ */ React43.createElement(
|
4872
5146
|
CreatableSelect,
|
4873
5147
|
{
|
4874
5148
|
formatCreateLabel: (inputValue) => {
|
@@ -4898,7 +5172,7 @@ var Select = ({
|
|
4898
5172
|
onInputChange: (newValue, action) => props.onInputChange(newValue, action)
|
4899
5173
|
}
|
4900
5174
|
),
|
4901
|
-
!props.hideHelperText && /* @__PURE__ */
|
5175
|
+
!props.hideHelperText && /* @__PURE__ */ React43.createElement(
|
4902
5176
|
"p",
|
4903
5177
|
{
|
4904
5178
|
className: cn(
|
@@ -4912,15 +5186,15 @@ var Select = ({
|
|
4912
5186
|
};
|
4913
5187
|
|
4914
5188
|
// elements/switch/Switch.tsx
|
4915
|
-
import * as
|
5189
|
+
import * as React44 from "react";
|
4916
5190
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
4917
|
-
var Switch =
|
5191
|
+
var Switch = React44.forwardRef(
|
4918
5192
|
({ className, size = "default", roundedness = "inherit", label, ...props }, ref) => {
|
4919
|
-
const [parentDirection, setParentDirection] =
|
5193
|
+
const [parentDirection, setParentDirection] = React44.useState(
|
4920
5194
|
null
|
4921
5195
|
);
|
4922
|
-
const parentRef =
|
4923
|
-
|
5196
|
+
const parentRef = React44.useRef(null);
|
5197
|
+
React44.useEffect(() => {
|
4924
5198
|
var _a;
|
4925
5199
|
const parentNode = (_a = parentRef.current) == null ? void 0 : _a.parentNode;
|
4926
5200
|
if (parentNode) {
|
@@ -4948,13 +5222,13 @@ var Switch = React43.forwardRef(
|
|
4948
5222
|
full: "hawa-rounded-full",
|
4949
5223
|
inherit: "hawa-rounded-inner"
|
4950
5224
|
};
|
4951
|
-
return /* @__PURE__ */
|
5225
|
+
return /* @__PURE__ */ React44.createElement(
|
4952
5226
|
"div",
|
4953
5227
|
{
|
4954
5228
|
className: "hawa-flex hawa-flex-row hawa-items-center",
|
4955
5229
|
ref: parentRef
|
4956
5230
|
},
|
4957
|
-
/* @__PURE__ */
|
5231
|
+
/* @__PURE__ */ React44.createElement(
|
4958
5232
|
SwitchPrimitives.Root,
|
4959
5233
|
{
|
4960
5234
|
className: cn(
|
@@ -4968,7 +5242,7 @@ var Switch = React43.forwardRef(
|
|
4968
5242
|
...props,
|
4969
5243
|
ref
|
4970
5244
|
},
|
4971
|
-
/* @__PURE__ */
|
5245
|
+
/* @__PURE__ */ React44.createElement(
|
4972
5246
|
SwitchPrimitives.Thumb,
|
4973
5247
|
{
|
4974
5248
|
className: cn(
|
@@ -4982,14 +5256,14 @@ var Switch = React43.forwardRef(
|
|
4982
5256
|
}
|
4983
5257
|
)
|
4984
5258
|
),
|
4985
|
-
label && /* @__PURE__ */
|
5259
|
+
label && /* @__PURE__ */ React44.createElement("span", { className: "hawa-mx-2 hawa-text-sm hawa-font-medium hawa-text-gray-900 dark:hawa-text-gray-300" }, label)
|
4986
5260
|
);
|
4987
5261
|
}
|
4988
5262
|
);
|
4989
5263
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
4990
5264
|
|
4991
5265
|
// elements/checkbox/Checkbox.tsx
|
4992
|
-
import * as
|
5266
|
+
import * as React45 from "react";
|
4993
5267
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
4994
5268
|
var Checkbox = ({
|
4995
5269
|
id,
|
@@ -5009,7 +5283,7 @@ var Checkbox = ({
|
|
5009
5283
|
lg: 0.9,
|
5010
5284
|
xl: 1
|
5011
5285
|
};
|
5012
|
-
return /* @__PURE__ */
|
5286
|
+
return /* @__PURE__ */ React45.createElement(
|
5013
5287
|
"div",
|
5014
5288
|
{
|
5015
5289
|
className: cn(
|
@@ -5017,7 +5291,7 @@ var Checkbox = ({
|
|
5017
5291
|
size === "default" ? "hawa-items-top" : "hawa-items-center"
|
5018
5292
|
)
|
5019
5293
|
},
|
5020
|
-
/* @__PURE__ */
|
5294
|
+
/* @__PURE__ */ React45.createElement(
|
5021
5295
|
CheckboxElement,
|
5022
5296
|
{
|
5023
5297
|
...props,
|
@@ -5027,7 +5301,7 @@ var Checkbox = ({
|
|
5027
5301
|
id
|
5028
5302
|
}
|
5029
5303
|
),
|
5030
|
-
(label || helperText) && /* @__PURE__ */
|
5304
|
+
(label || helperText) && /* @__PURE__ */ React45.createElement("div", { className: "hawa-grid hawa-gap-1.5" }, label && /* @__PURE__ */ React45.createElement(
|
5031
5305
|
"label",
|
5032
5306
|
{
|
5033
5307
|
htmlFor: id,
|
@@ -5041,7 +5315,7 @@ var Checkbox = ({
|
|
5041
5315
|
}
|
5042
5316
|
},
|
5043
5317
|
label
|
5044
|
-
), sublabel && /* @__PURE__ */
|
5318
|
+
), sublabel && /* @__PURE__ */ React45.createElement(
|
5045
5319
|
"label",
|
5046
5320
|
{
|
5047
5321
|
htmlFor: id,
|
@@ -5051,7 +5325,7 @@ var Checkbox = ({
|
|
5051
5325
|
)
|
5052
5326
|
},
|
5053
5327
|
sublabel
|
5054
|
-
), helperText && !disabled && /* @__PURE__ */
|
5328
|
+
), helperText && !disabled && /* @__PURE__ */ React45.createElement(
|
5055
5329
|
"label",
|
5056
5330
|
{
|
5057
5331
|
htmlFor: id,
|
@@ -5064,7 +5338,7 @@ var Checkbox = ({
|
|
5064
5338
|
))
|
5065
5339
|
);
|
5066
5340
|
};
|
5067
|
-
var CheckboxElement =
|
5341
|
+
var CheckboxElement = React45.forwardRef(({ radius = "inherit", size = "default", className, ...props }, ref) => {
|
5068
5342
|
let checkboxRadius = {
|
5069
5343
|
none: "hawa-rounded-none",
|
5070
5344
|
inherit: "hawa-rounded-sm",
|
@@ -5086,7 +5360,7 @@ var CheckboxElement = React44.forwardRef(({ radius = "inherit", size = "default"
|
|
5086
5360
|
lg: "1em",
|
5087
5361
|
xl: "1.25em"
|
5088
5362
|
};
|
5089
|
-
return /* @__PURE__ */
|
5363
|
+
return /* @__PURE__ */ React45.createElement(
|
5090
5364
|
CheckboxPrimitive.Root,
|
5091
5365
|
{
|
5092
5366
|
ref,
|
@@ -5098,14 +5372,14 @@ var CheckboxElement = React44.forwardRef(({ radius = "inherit", size = "default"
|
|
5098
5372
|
),
|
5099
5373
|
...props
|
5100
5374
|
},
|
5101
|
-
/* @__PURE__ */
|
5375
|
+
/* @__PURE__ */ React45.createElement(
|
5102
5376
|
CheckboxPrimitive.Indicator,
|
5103
5377
|
{
|
5104
5378
|
className: cn(
|
5105
5379
|
"hawa-flex hawa-items-center hawa-justify-center hawa-text-current"
|
5106
5380
|
)
|
5107
5381
|
},
|
5108
|
-
/* @__PURE__ */
|
5382
|
+
/* @__PURE__ */ React45.createElement(
|
5109
5383
|
"svg",
|
5110
5384
|
{
|
5111
5385
|
"aria-label": "Check Mark",
|
@@ -5116,7 +5390,7 @@ var CheckboxElement = React44.forwardRef(({ radius = "inherit", size = "default"
|
|
5116
5390
|
height: checkboxIndicatorSizes[size],
|
5117
5391
|
width: checkboxIndicatorSizes[size]
|
5118
5392
|
},
|
5119
|
-
/* @__PURE__ */
|
5393
|
+
/* @__PURE__ */ React45.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" })
|
5120
5394
|
),
|
5121
5395
|
" "
|
5122
5396
|
)
|
@@ -5125,9 +5399,9 @@ var CheckboxElement = React44.forwardRef(({ radius = "inherit", size = "default"
|
|
5125
5399
|
CheckboxElement.displayName = CheckboxPrimitive.Root.displayName;
|
5126
5400
|
|
5127
5401
|
// elements/progress/Progress.tsx
|
5128
|
-
import * as
|
5402
|
+
import * as React46 from "react";
|
5129
5403
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
5130
|
-
var Progress =
|
5404
|
+
var Progress = React46.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ React46.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React46.createElement(Label2, { ...props.labelProps }, props.label), /* @__PURE__ */ React46.createElement(
|
5131
5405
|
ProgressPrimitive.Root,
|
5132
5406
|
{
|
5133
5407
|
ref,
|
@@ -5137,7 +5411,7 @@ var Progress = React45.forwardRef(({ className, value, ...props }, ref) => /* @_
|
|
5137
5411
|
),
|
5138
5412
|
...props
|
5139
5413
|
},
|
5140
|
-
/* @__PURE__ */
|
5414
|
+
/* @__PURE__ */ React46.createElement(
|
5141
5415
|
ProgressPrimitive.Indicator,
|
5142
5416
|
{
|
5143
5417
|
className: "hawa-h-full hawa-w-full hawa-flex-1 hawa-bg-primary hawa-transition-all",
|
@@ -5148,7 +5422,7 @@ var Progress = React45.forwardRef(({ className, value, ...props }, ref) => /* @_
|
|
5148
5422
|
Progress.displayName = ProgressPrimitive.Root.displayName;
|
5149
5423
|
|
5150
5424
|
// elements/breadcrumb/Breadcrumb.tsx
|
5151
|
-
import
|
5425
|
+
import React47 from "react";
|
5152
5426
|
var Breadcrumb = ({
|
5153
5427
|
breadcrumbLinks,
|
5154
5428
|
separator = ">",
|
@@ -5159,7 +5433,7 @@ var Breadcrumb = ({
|
|
5159
5433
|
small: "hawa-text-sm",
|
5160
5434
|
xs: "hawa-text-xs"
|
5161
5435
|
};
|
5162
|
-
return /* @__PURE__ */
|
5436
|
+
return /* @__PURE__ */ React47.createElement(
|
5163
5437
|
"div",
|
5164
5438
|
{
|
5165
5439
|
className: cn(
|
@@ -5167,13 +5441,13 @@ var Breadcrumb = ({
|
|
5167
5441
|
textStyles[size]
|
5168
5442
|
)
|
5169
5443
|
},
|
5170
|
-
breadcrumbLinks.map((singleBreadcrumbLink, index) => /* @__PURE__ */
|
5444
|
+
breadcrumbLinks.map((singleBreadcrumbLink, index) => /* @__PURE__ */ React47.createElement(
|
5171
5445
|
"div",
|
5172
5446
|
{
|
5173
5447
|
key: index,
|
5174
5448
|
className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2"
|
5175
5449
|
},
|
5176
|
-
/* @__PURE__ */
|
5450
|
+
/* @__PURE__ */ React47.createElement(
|
5177
5451
|
"a",
|
5178
5452
|
{
|
5179
5453
|
href: singleBreadcrumbLink.href,
|
@@ -5181,49 +5455,49 @@ var Breadcrumb = ({
|
|
5181
5455
|
},
|
5182
5456
|
singleBreadcrumbLink.label
|
5183
5457
|
),
|
5184
|
-
index != breadcrumbLinks.length - 1 ? typeof separator == "string" ? /* @__PURE__ */
|
5458
|
+
index != breadcrumbLinks.length - 1 ? typeof separator == "string" ? /* @__PURE__ */ React47.createElement("div", null, separator) : /* @__PURE__ */ React47.createElement("div", null, separator) : null
|
5185
5459
|
))
|
5186
5460
|
);
|
5187
5461
|
};
|
5188
5462
|
|
5189
5463
|
// elements/appStores/AppStores.tsx
|
5190
|
-
import
|
5464
|
+
import React48 from "react";
|
5191
5465
|
var AppStores = (props) => {
|
5192
|
-
return /* @__PURE__ */
|
5466
|
+
return /* @__PURE__ */ React48.createElement("div", { className: "hawa-flex hawa-justify-center" }, /* @__PURE__ */ React48.createElement("div", null, props.store === "apple" ? /* @__PURE__ */ React48.createElement("div", { className: "hawa-mt-3 hawa-flex hawa-h-14 hawa-w-48 hawa-items-center hawa-justify-center hawa-rounded-lg hawa-bg-black hawa-text-white dark:hawa-bg-white dark:hawa-text-black" }, /* @__PURE__ */ React48.createElement("div", { className: "hawa-mr-3" }, /* @__PURE__ */ React48.createElement("svg", { viewBox: "0 0 384 512", width: "30" }, /* @__PURE__ */ React48.createElement(
|
5193
5467
|
"path",
|
5194
5468
|
{
|
5195
5469
|
fill: "currentColor",
|
5196
5470
|
d: "M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"
|
5197
5471
|
}
|
5198
|
-
))), /* @__PURE__ */
|
5472
|
+
))), /* @__PURE__ */ React48.createElement("div", null, /* @__PURE__ */ React48.createElement("div", { className: "hawa-text-xs" }, "Download on the"), /* @__PURE__ */ React48.createElement("div", { className: "hawa--mt-1 hawa-font-sans hawa-text-2xl hawa-font-semibold" }, "App Store"))) : /* @__PURE__ */ React48.createElement("div", { className: "hawa-mt-3 hawa-flex hawa-h-14 hawa-w-48 hawa-items-center hawa-justify-center hawa-rounded-lg hawa-border hawa-border-black hawa-bg-black hawa-text-white dark:hawa-bg-white dark:hawa-text-black" }, /* @__PURE__ */ React48.createElement("div", { className: "hawa-mr-3" }, /* @__PURE__ */ React48.createElement("svg", { viewBox: "30 336.7 120.9 129.2", width: "30" }, /* @__PURE__ */ React48.createElement(
|
5199
5473
|
"path",
|
5200
5474
|
{
|
5201
5475
|
fill: "#FFD400",
|
5202
5476
|
d: "M119.2,421.2c15.3-8.4,27-14.8,28-15.3c3.2-1.7,6.5-6.2,0-9.7 c-2.1-1.1-13.4-7.3-28-15.3l-20.1,20.2L119.2,421.2z"
|
5203
5477
|
}
|
5204
|
-
), /* @__PURE__ */
|
5478
|
+
), /* @__PURE__ */ React48.createElement(
|
5205
5479
|
"path",
|
5206
5480
|
{
|
5207
5481
|
fill: "#FF3333",
|
5208
5482
|
d: "M99.1,401.1l-64.2,64.7c1.5,0.2,3.2-0.2,5.2-1.3 c4.2-2.3,48.8-26.7,79.1-43.3L99.1,401.1L99.1,401.1z"
|
5209
5483
|
}
|
5210
|
-
), /* @__PURE__ */
|
5484
|
+
), /* @__PURE__ */ React48.createElement(
|
5211
5485
|
"path",
|
5212
5486
|
{
|
5213
5487
|
fill: "#48FF48",
|
5214
5488
|
d: "M99.1,401.1l20.1-20.2c0,0-74.6-40.7-79.1-43.1 c-1.7-1-3.6-1.3-5.3-1L99.1,401.1z"
|
5215
5489
|
}
|
5216
|
-
), /* @__PURE__ */
|
5490
|
+
), /* @__PURE__ */ React48.createElement(
|
5217
5491
|
"path",
|
5218
5492
|
{
|
5219
5493
|
fill: "#3BCCFF",
|
5220
5494
|
d: "M99.1,401.1l-64.3-64.3c-2.6,0.6-4.8,2.9-4.8,7.6 c0,7.5,0,107.5,0,113.8c0,4.3,1.7,7.4,4.9,7.7L99.1,401.1z"
|
5221
5495
|
}
|
5222
|
-
))), /* @__PURE__ */
|
5496
|
+
))), /* @__PURE__ */ React48.createElement("div", null, /* @__PURE__ */ React48.createElement("div", { className: "hawa-text-xs" }, "GET IT ON"), /* @__PURE__ */ React48.createElement("div", { className: "hawa--mt-1 hawa-font-sans hawa-text-xl hawa-font-semibold" }, "Google Play")))));
|
5223
5497
|
};
|
5224
5498
|
|
5225
5499
|
// elements/badge/Badge.tsx
|
5226
|
-
import
|
5500
|
+
import React49, { useEffect as useEffect25, useState as useState27, useRef as useRef17 } from "react";
|
5227
5501
|
var Badge = ({
|
5228
5502
|
anchor,
|
5229
5503
|
position = "right",
|
@@ -5231,14 +5505,14 @@ var Badge = ({
|
|
5231
5505
|
text,
|
5232
5506
|
className
|
5233
5507
|
}) => {
|
5234
|
-
const [badgePosition, setBadgePosition] =
|
5235
|
-
const indicatorRef =
|
5508
|
+
const [badgePosition, setBadgePosition] = useState27(null);
|
5509
|
+
const indicatorRef = useRef17(null);
|
5236
5510
|
const sizeStyles2 = {
|
5237
5511
|
small: { top: 4, left: 6, right: 7, classes: "hawa-w-3 hawa-h-3" },
|
5238
5512
|
default: { top: 4, left: 7, right: 5, classes: "hawa-w-3 hawa-h-3" },
|
5239
5513
|
large: { top: 6, left: 12, right: 7, classes: "hawa-w-6 hawa-h-6" }
|
5240
5514
|
};
|
5241
|
-
|
5515
|
+
useEffect25(() => {
|
5242
5516
|
const handlePositioning = () => {
|
5243
5517
|
var _a;
|
5244
5518
|
if (anchor.current && indicatorRef.current) {
|
@@ -5261,7 +5535,7 @@ var Badge = ({
|
|
5261
5535
|
window.removeEventListener("resize", handlePositioning);
|
5262
5536
|
};
|
5263
5537
|
}, [anchor]);
|
5264
|
-
return /* @__PURE__ */
|
5538
|
+
return /* @__PURE__ */ React49.createElement("div", { ref: indicatorRef, className: cn("hawa-relative", className) }, badgePosition && /* @__PURE__ */ React49.createElement(
|
5265
5539
|
"div",
|
5266
5540
|
{
|
5267
5541
|
style: {
|
@@ -5286,8 +5560,8 @@ var BadgedComponent = ({
|
|
5286
5560
|
size,
|
5287
5561
|
text
|
5288
5562
|
}) => {
|
5289
|
-
const ref =
|
5290
|
-
return /* @__PURE__ */
|
5563
|
+
const ref = useRef17(null);
|
5564
|
+
return /* @__PURE__ */ React49.createElement("div", { className: cn("hawa-relative hawa-w-fit", className), ref }, !hideBadge && /* @__PURE__ */ React49.createElement(
|
5291
5565
|
Badge,
|
5292
5566
|
{
|
5293
5567
|
size,
|
@@ -5300,7 +5574,7 @@ var BadgedComponent = ({
|
|
5300
5574
|
};
|
5301
5575
|
|
5302
5576
|
// elements/phoneInput/PhoneInput.tsx
|
5303
|
-
import
|
5577
|
+
import React50, { useState as useState28, useRef as useRef18 } from "react";
|
5304
5578
|
|
5305
5579
|
// countries.ts
|
5306
5580
|
var countries = [
|
@@ -7002,9 +7276,9 @@ var PhoneInput = ({
|
|
7002
7276
|
countryCodes,
|
7003
7277
|
...props
|
7004
7278
|
}) => {
|
7005
|
-
const [phoneNumber, setPhoneNumber] =
|
7006
|
-
const [countryCode, setCountryCode] =
|
7007
|
-
const inputRef =
|
7279
|
+
const [phoneNumber, setPhoneNumber] = useState28("");
|
7280
|
+
const [countryCode, setCountryCode] = useState28(props.preferredCountry);
|
7281
|
+
const inputRef = useRef18(null);
|
7008
7282
|
const handleInputChange = (e) => {
|
7009
7283
|
console.log("test e ", e.target.value);
|
7010
7284
|
const validChars = /^[0-9-()]+$/;
|
@@ -7018,7 +7292,7 @@ var PhoneInput = ({
|
|
7018
7292
|
console.log("handleChange prop was not provided in <PhoneInput/>");
|
7019
7293
|
}
|
7020
7294
|
};
|
7021
|
-
return /* @__PURE__ */
|
7295
|
+
return /* @__PURE__ */ React50.createElement("div", { className: "hawa-flex hawa-h-fit hawa-w-full hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React50.createElement(Label2, { ...labelProps }, props.label), /* @__PURE__ */ React50.createElement("div", { dir: "ltr", className: "hawa-flex hawa-w-full hawa-flex-row" }, /* @__PURE__ */ React50.createElement(
|
7022
7296
|
Select,
|
7023
7297
|
{
|
7024
7298
|
phoneCode: true,
|
@@ -7034,7 +7308,7 @@ var PhoneInput = ({
|
|
7034
7308
|
value: countryCode == null ? void 0 : countryCode.label,
|
7035
7309
|
defaultValue: props.preferredCountry
|
7036
7310
|
}
|
7037
|
-
), /* @__PURE__ */
|
7311
|
+
), /* @__PURE__ */ React50.createElement("div", { className: "hawa-relative hawa-flex hawa-h-fit hawa-w-full hawa-flex-col hawa-justify-center hawa-gap-0" }, /* @__PURE__ */ React50.createElement(
|
7038
7312
|
"input",
|
7039
7313
|
{
|
7040
7314
|
type: "tel",
|
@@ -7048,7 +7322,7 @@ var PhoneInput = ({
|
|
7048
7322
|
),
|
7049
7323
|
...inputProps
|
7050
7324
|
}
|
7051
|
-
))), /* @__PURE__ */
|
7325
|
+
))), /* @__PURE__ */ React50.createElement(
|
7052
7326
|
"p",
|
7053
7327
|
{
|
7054
7328
|
className: cn(
|
@@ -7061,7 +7335,7 @@ var PhoneInput = ({
|
|
7061
7335
|
};
|
7062
7336
|
|
7063
7337
|
// elements/pinInput/PinInput.tsx
|
7064
|
-
import
|
7338
|
+
import React51, { useEffect as useEffect27, useState as useState29 } from "react";
|
7065
7339
|
var PinInput = ({
|
7066
7340
|
label,
|
7067
7341
|
icon,
|
@@ -7071,7 +7345,7 @@ var PinInput = ({
|
|
7071
7345
|
inputProps,
|
7072
7346
|
...props
|
7073
7347
|
}) => {
|
7074
|
-
const [pin, setPin] =
|
7348
|
+
const [pin, setPin] = useState29(Array.from(Array(digits)));
|
7075
7349
|
const handleKeyDown = (e, index) => {
|
7076
7350
|
let backTo = 0;
|
7077
7351
|
if (e.key === "Backspace") {
|
@@ -7080,7 +7354,7 @@ var PinInput = ({
|
|
7080
7354
|
previousInput == null ? void 0 : previousInput.focus();
|
7081
7355
|
}
|
7082
7356
|
};
|
7083
|
-
|
7357
|
+
useEffect27(() => {
|
7084
7358
|
let unfilled = pin.includes(void 0);
|
7085
7359
|
if (!unfilled && getPins) {
|
7086
7360
|
getPins(pin);
|
@@ -7105,13 +7379,13 @@ var PinInput = ({
|
|
7105
7379
|
}
|
7106
7380
|
}
|
7107
7381
|
};
|
7108
|
-
return /* @__PURE__ */
|
7382
|
+
return /* @__PURE__ */ React51.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React51.createElement(
|
7109
7383
|
"div",
|
7110
7384
|
{
|
7111
7385
|
className: "hawa-flex hawa-w-full hawa-flex-row hawa-justify-center hawa-gap-2",
|
7112
7386
|
dir: "ltr"
|
7113
7387
|
},
|
7114
|
-
pin.map((value, index) => /* @__PURE__ */
|
7388
|
+
pin.map((value, index) => /* @__PURE__ */ React51.createElement(
|
7115
7389
|
"input",
|
7116
7390
|
{
|
7117
7391
|
key: index,
|
@@ -7131,7 +7405,7 @@ var PinInput = ({
|
|
7131
7405
|
...inputProps
|
7132
7406
|
}
|
7133
7407
|
))
|
7134
|
-
), /* @__PURE__ */
|
7408
|
+
), /* @__PURE__ */ React51.createElement(
|
7135
7409
|
"p",
|
7136
7410
|
{
|
7137
7411
|
className: cn(
|
@@ -7144,58 +7418,18 @@ var PinInput = ({
|
|
7144
7418
|
};
|
7145
7419
|
|
7146
7420
|
// elements/stopPropagationWrapper/StopPropagationWrapper.tsx
|
7147
|
-
import
|
7421
|
+
import React52 from "react";
|
7148
7422
|
var StopPropagationWrapper = (props) => {
|
7149
7423
|
const handleClick = (e) => {
|
7150
7424
|
e.stopPropagation();
|
7151
7425
|
};
|
7152
|
-
return /* @__PURE__ */
|
7426
|
+
return /* @__PURE__ */ React52.createElement("div", { onClick: handleClick }, props.children);
|
7153
7427
|
};
|
7154
7428
|
|
7155
|
-
// elements/scrollArea/ScrollArea.tsx
|
7156
|
-
import * as React52 from "react";
|
7157
|
-
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
7158
|
-
var ScrollArea = React52.forwardRef(({ className, children, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React52.createElement(
|
7159
|
-
ScrollAreaPrimitive.Root,
|
7160
|
-
{
|
7161
|
-
ref,
|
7162
|
-
className: cn("hawa-relative hawa-overflow-hidden", className),
|
7163
|
-
...props
|
7164
|
-
},
|
7165
|
-
/* @__PURE__ */ React52.createElement(ScrollAreaPrimitive.Viewport, { className: "hawa-h-full hawa-w-full hawa-rounded-[inherit]" }, children),
|
7166
|
-
/* @__PURE__ */ React52.createElement(ScrollBar, { orientation }),
|
7167
|
-
/* @__PURE__ */ React52.createElement(ScrollAreaPrimitive.Corner, null)
|
7168
|
-
));
|
7169
|
-
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
7170
|
-
var ScrollBar = React52.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React52.createElement(
|
7171
|
-
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
7172
|
-
{
|
7173
|
-
ref,
|
7174
|
-
orientation,
|
7175
|
-
className: cn(
|
7176
|
-
"hawa-flex hawa-touch-none hawa-select-none hawa-transition-colors",
|
7177
|
-
orientation === "vertical" && "hawa-h-full hawa-w-2.5 hawa-border-l hawa-border-l-transparent hawa-p-[1px]",
|
7178
|
-
orientation === "horizontal" && "hawa-h-2.5 hawa-border-t hawa-border-t-transparent hawa-p-[1px]",
|
7179
|
-
className
|
7180
|
-
),
|
7181
|
-
...props
|
7182
|
-
},
|
7183
|
-
/* @__PURE__ */ React52.createElement(
|
7184
|
-
ScrollAreaPrimitive.ScrollAreaThumb,
|
7185
|
-
{
|
7186
|
-
className: cn(
|
7187
|
-
"hawa-relative hawa-rounded-full hawa-bg-border",
|
7188
|
-
orientation === "vertical" && "hawa-flex-1"
|
7189
|
-
)
|
7190
|
-
}
|
7191
|
-
)
|
7192
|
-
));
|
7193
|
-
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
7194
|
-
|
7195
7429
|
// elements/colorPicker/ColorPicker.tsx
|
7196
7430
|
import React53, {
|
7197
|
-
useState as
|
7198
|
-
useEffect as
|
7431
|
+
useState as useState30,
|
7432
|
+
useEffect as useEffect28
|
7199
7433
|
} from "react";
|
7200
7434
|
var ColorPicker = ({
|
7201
7435
|
containerProps,
|
@@ -7207,8 +7441,8 @@ var ColorPicker = ({
|
|
7207
7441
|
preview = false,
|
7208
7442
|
...props
|
7209
7443
|
}) => {
|
7210
|
-
const [selectedColor, setSelectedColor] =
|
7211
|
-
|
7444
|
+
const [selectedColor, setSelectedColor] = useState30(props.color);
|
7445
|
+
useEffect28(() => {
|
7212
7446
|
if (selectedColor && selectedColor[0] !== "#") {
|
7213
7447
|
setSelectedColor(`#${selectedColor}`);
|
7214
7448
|
}
|
@@ -7490,7 +7724,7 @@ var Pagination = ({
|
|
7490
7724
|
};
|
7491
7725
|
|
7492
7726
|
// elements/passwordInput/PasswordInput.tsx
|
7493
|
-
import React59, { useEffect as
|
7727
|
+
import React59, { useEffect as useEffect29, useState as useState31 } from "react";
|
7494
7728
|
|
7495
7729
|
// icons/Emojis.tsx
|
7496
7730
|
import React56 from "react";
|
@@ -7727,16 +7961,16 @@ var PasswordInput = ({
|
|
7727
7961
|
hidePopover,
|
7728
7962
|
...props
|
7729
7963
|
}) => {
|
7730
|
-
const [inputValue, setInputValue] =
|
7731
|
-
const [isInputFocused, setIsInputFocused] =
|
7732
|
-
const [currentStr, setCurrentStr] =
|
7733
|
-
const [passwordVisible, setPasswordVisible] =
|
7734
|
-
const [lengthCriteriaMet, setLengthCriteriaMet] =
|
7735
|
-
const [numberCriteriaMet, setNumberCriteriaMet] =
|
7736
|
-
const [specialCharCriteriaMet, setSpecialCharCriteriaMet] =
|
7737
|
-
const [lowercaseCriteriaMet, setLowercaseCriteriaMet] =
|
7738
|
-
const [uppercaseCriteriaMet, setUppercaseCriteriaMet] =
|
7739
|
-
|
7964
|
+
const [inputValue, setInputValue] = useState31("");
|
7965
|
+
const [isInputFocused, setIsInputFocused] = useState31(false);
|
7966
|
+
const [currentStr, setCurrentStr] = useState31(0);
|
7967
|
+
const [passwordVisible, setPasswordVisible] = useState31(false);
|
7968
|
+
const [lengthCriteriaMet, setLengthCriteriaMet] = useState31(false);
|
7969
|
+
const [numberCriteriaMet, setNumberCriteriaMet] = useState31(false);
|
7970
|
+
const [specialCharCriteriaMet, setSpecialCharCriteriaMet] = useState31(false);
|
7971
|
+
const [lowercaseCriteriaMet, setLowercaseCriteriaMet] = useState31(false);
|
7972
|
+
const [uppercaseCriteriaMet, setUppercaseCriteriaMet] = useState31(false);
|
7973
|
+
useEffect29(() => {
|
7740
7974
|
const calculateStrength = () => {
|
7741
7975
|
let strengthScore = 0;
|
7742
7976
|
if (lengthCriteriaMet)
|
@@ -7937,12 +8171,12 @@ var Separator2 = ({
|
|
7937
8171
|
);
|
7938
8172
|
|
7939
8173
|
// elements/scrollIndicator/ScrollIndicator.tsx
|
7940
|
-
import React63, { useState as
|
8174
|
+
import React63, { useState as useState32, useEffect as useEffect30 } from "react";
|
7941
8175
|
var ScrollIndicator = ({
|
7942
8176
|
anchor,
|
7943
8177
|
inContainer = false
|
7944
8178
|
}) => {
|
7945
|
-
const [scrollPercentage, setScrollPercentage] =
|
8179
|
+
const [scrollPercentage, setScrollPercentage] = useState32(0);
|
7946
8180
|
const onScroll = () => {
|
7947
8181
|
const scrollElement = anchor.current;
|
7948
8182
|
if (scrollElement) {
|
@@ -7953,7 +8187,7 @@ var ScrollIndicator = ({
|
|
7953
8187
|
setScrollPercentage(percentageScrolled);
|
7954
8188
|
}
|
7955
8189
|
};
|
7956
|
-
|
8190
|
+
useEffect30(() => {
|
7957
8191
|
if (!anchor.current)
|
7958
8192
|
return;
|
7959
8193
|
anchor.current.addEventListener("scroll", onScroll);
|
@@ -7978,7 +8212,7 @@ var ScrollIndicator = ({
|
|
7978
8212
|
};
|
7979
8213
|
|
7980
8214
|
// elements/codeBlock/CodeBlock.tsx
|
7981
|
-
import React64, { useState as
|
8215
|
+
import React64, { useState as useState33 } from "react";
|
7982
8216
|
import { Highlight, themes, Prism } from "prism-react-renderer";
|
7983
8217
|
(typeof global !== "undefined" ? global : window).Prism = Prism;
|
7984
8218
|
__require("prismjs/components/prism-bash");
|
@@ -8010,7 +8244,7 @@ var CodeBlock = ({
|
|
8010
8244
|
...props
|
8011
8245
|
}) => {
|
8012
8246
|
const clipboard = useClipboard();
|
8013
|
-
const [selectedTab, setSelectedTab] =
|
8247
|
+
const [selectedTab, setSelectedTab] = useState33(0);
|
8014
8248
|
const theme = themes.oceanicNext;
|
8015
8249
|
let widthStyles = {
|
8016
8250
|
full: "hawa-w-full",
|
@@ -8138,7 +8372,7 @@ var CodeBlock = ({
|
|
8138
8372
|
};
|
8139
8373
|
|
8140
8374
|
// elements/carousel/Carousel.tsx
|
8141
|
-
import React65, { useEffect as
|
8375
|
+
import React65, { useEffect as useEffect31, useState as useState34 } from "react";
|
8142
8376
|
import useEmblaCarousel2 from "embla-carousel-react";
|
8143
8377
|
var Carousel = ({
|
8144
8378
|
items,
|
@@ -8154,8 +8388,8 @@ var Carousel = ({
|
|
8154
8388
|
direction,
|
8155
8389
|
loop: autoplay ? true : (options == null ? void 0 : options.loop) || false
|
8156
8390
|
});
|
8157
|
-
const [selectedIndex, setSelectedIndex] =
|
8158
|
-
|
8391
|
+
const [selectedIndex, setSelectedIndex] = useState34(0);
|
8392
|
+
useEffect31(() => {
|
8159
8393
|
function selectHandler() {
|
8160
8394
|
const index = emblaApi == null ? void 0 : emblaApi.selectedScrollSnap();
|
8161
8395
|
setSelectedIndex(index || 0);
|
@@ -8165,7 +8399,7 @@ var Carousel = ({
|
|
8165
8399
|
emblaApi == null ? void 0 : emblaApi.off("select", selectHandler);
|
8166
8400
|
};
|
8167
8401
|
}, [emblaApi]);
|
8168
|
-
|
8402
|
+
useEffect31(() => {
|
8169
8403
|
let autoplayTimer;
|
8170
8404
|
if (autoplay && emblaApi) {
|
8171
8405
|
autoplayTimer = setInterval(() => {
|
@@ -8469,15 +8703,15 @@ function Toaster(props) {
|
|
8469
8703
|
}
|
8470
8704
|
|
8471
8705
|
// elements/destroyableCard/DestroyableCard.tsx
|
8472
|
-
import React69, { useRef as
|
8706
|
+
import React69, { useRef as useRef19, useState as useState35 } from "react";
|
8473
8707
|
var DestroyableCard = ({
|
8474
8708
|
position = "bottom-right",
|
8475
8709
|
fixed,
|
8476
8710
|
direction,
|
8477
8711
|
...props
|
8478
8712
|
}) => {
|
8479
|
-
const [closed, setClosed] =
|
8480
|
-
const popUpRef =
|
8713
|
+
const [closed, setClosed] = useState35(false);
|
8714
|
+
const popUpRef = useRef19(null);
|
8481
8715
|
const boxPosition = {
|
8482
8716
|
"bottom-right": "hawa-right-4 hawa-bottom-4",
|
8483
8717
|
"bottom-left": "hawa-left-4 hawa-bottom-4"
|
@@ -8543,7 +8777,7 @@ var DestroyableCard = ({
|
|
8543
8777
|
};
|
8544
8778
|
|
8545
8779
|
// elements/interfaceSettings/InterfaceSettings.tsx
|
8546
|
-
import React70, { useState as
|
8780
|
+
import React70, { useState as useState36 } from "react";
|
8547
8781
|
var InterfaceSettings = ({
|
8548
8782
|
orientation = "horizontal",
|
8549
8783
|
width = "default",
|
@@ -8551,8 +8785,8 @@ var InterfaceSettings = ({
|
|
8551
8785
|
handleLanguage,
|
8552
8786
|
...props
|
8553
8787
|
}) => {
|
8554
|
-
const [color, setColor] =
|
8555
|
-
const [language, setLanguage] =
|
8788
|
+
const [color, setColor] = useState36(props.currentColorMode);
|
8789
|
+
const [language, setLanguage] = useState36(props.currentLanguage);
|
8556
8790
|
let orientationStyle = {
|
8557
8791
|
horizontal: "hawa-flex hawa-flex-row hawa-justify-between",
|
8558
8792
|
vertical: "hawa-flex hawa-flex-col hawa-items-center hawa-gap-2"
|
@@ -8893,7 +9127,7 @@ var Copyrights = (props) => {
|
|
8893
9127
|
};
|
8894
9128
|
|
8895
9129
|
// layout/navbar/Navbar.tsx
|
8896
|
-
import React75, { useState as
|
9130
|
+
import React75, { useState as useState37 } from "react";
|
8897
9131
|
|
8898
9132
|
// elements/collapsible/Collapsible.tsx
|
8899
9133
|
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
@@ -8909,7 +9143,7 @@ var Navbar = ({
|
|
8909
9143
|
...props
|
8910
9144
|
}) => {
|
8911
9145
|
var _a, _b;
|
8912
|
-
const [isOpen, setIsOpen] =
|
9146
|
+
const [isOpen, setIsOpen] = useState37(false);
|
8913
9147
|
return /* @__PURE__ */ React75.createElement("nav", { className: " hawa-sticky hawa-top-2 hawa-transition-all" }, /* @__PURE__ */ React75.createElement(
|
8914
9148
|
Collapsible,
|
8915
9149
|
{
|
@@ -9013,7 +9247,8 @@ var Navbar = ({
|
|
9013
9247
|
};
|
9014
9248
|
|
9015
9249
|
// layout/appLayout/AppLayout.tsx
|
9016
|
-
import React76, { useEffect as
|
9250
|
+
import React76, { useEffect as useEffect32, useState as useState38 } from "react";
|
9251
|
+
import * as Dialog3 from "@radix-ui/react-dialog";
|
9017
9252
|
var LOCAL_STORAGE_KEY2 = "@sikka/hawa/keep-drawer-open";
|
9018
9253
|
var AppLayout = ({
|
9019
9254
|
profileMenuWidth = "default",
|
@@ -9031,7 +9266,7 @@ var AppLayout = ({
|
|
9031
9266
|
...props
|
9032
9267
|
}) => {
|
9033
9268
|
var _a, _b;
|
9034
|
-
|
9269
|
+
useEffect32(() => {
|
9035
9270
|
let isDrawerOpen = localStorage.getItem(LOCAL_STORAGE_KEY2);
|
9036
9271
|
if (isDrawerOpen === null) {
|
9037
9272
|
localStorage.setItem(LOCAL_STORAGE_KEY2, JSON.stringify(false));
|
@@ -9048,15 +9283,16 @@ var AppLayout = ({
|
|
9048
9283
|
}
|
9049
9284
|
};
|
9050
9285
|
const isRTL = direction === "rtl";
|
9051
|
-
const [openedSidebarItem, setOpenedSidebarItem] =
|
9052
|
-
const [size, setSize] =
|
9286
|
+
const [openedSidebarItem, setOpenedSidebarItem] = useState38("");
|
9287
|
+
const [size, setSize] = useState38(
|
9053
9288
|
typeof window !== "undefined" && window.innerWidth || 1200
|
9054
9289
|
);
|
9055
|
-
const [openSideMenu, setOpenSideMenu] =
|
9290
|
+
const [openSideMenu, setOpenSideMenu] = useState38(() => {
|
9056
9291
|
const savedState = localStorage.getItem(LOCAL_STORAGE_KEY2);
|
9057
9292
|
return savedState ? JSON.parse(savedState) : false;
|
9058
9293
|
});
|
9059
|
-
const [
|
9294
|
+
const [container, setContainer] = React76.useState(null);
|
9295
|
+
const [keepDrawerOpen, setKeepDrawerOpen] = useState38(() => {
|
9060
9296
|
const savedState = localStorage.getItem(LOCAL_STORAGE_KEY2);
|
9061
9297
|
return savedState ? JSON.parse(savedState) : false;
|
9062
9298
|
});
|
@@ -9069,12 +9305,14 @@ var AppLayout = ({
|
|
9069
9305
|
}
|
9070
9306
|
};
|
9071
9307
|
const ref = useClickOutside(handleClickOutside);
|
9072
|
-
|
9308
|
+
useEffect32(() => {
|
9073
9309
|
if (typeof window !== "undefined") {
|
9074
9310
|
const resize = () => {
|
9075
9311
|
setSize(window.innerWidth);
|
9076
9312
|
if (window.innerWidth > 600) {
|
9077
9313
|
setKeepDrawerOpen(false);
|
9314
|
+
} else {
|
9315
|
+
localStorage.setItem(LOCAL_STORAGE_KEY2, JSON.stringify(false));
|
9078
9316
|
}
|
9079
9317
|
};
|
9080
9318
|
resize();
|
@@ -9084,13 +9322,13 @@ var AppLayout = ({
|
|
9084
9322
|
};
|
9085
9323
|
}
|
9086
9324
|
}, []);
|
9087
|
-
|
9325
|
+
useEffect32(() => {
|
9088
9326
|
setKeepDrawerOpen(() => {
|
9089
9327
|
const savedState = localStorage.getItem(LOCAL_STORAGE_KEY2);
|
9090
9328
|
return savedState ? JSON.parse(savedState) : true;
|
9091
9329
|
});
|
9092
9330
|
}, [setKeepDrawerOpen]);
|
9093
|
-
|
9331
|
+
useEffect32(() => {
|
9094
9332
|
if (size > 600) {
|
9095
9333
|
setOpenSideMenu(keepDrawerOpen);
|
9096
9334
|
} else {
|
@@ -9104,7 +9342,7 @@ var AppLayout = ({
|
|
9104
9342
|
{
|
9105
9343
|
dir: direction,
|
9106
9344
|
className: cn(
|
9107
|
-
"hawa-fixed hawa-end-0 hawa-start-0 hawa-top-0 hawa-z-
|
9345
|
+
"hawa-fixed hawa-end-0 hawa-start-0 hawa-top-0 hawa-z-10 hawa-flex hawa-h-14 hawa-w-full hawa-items-center hawa-justify-between hawa-bg-primary-foreground hawa-p-2",
|
9108
9346
|
bordered && "hawa-border-b-[1px]"
|
9109
9347
|
)
|
9110
9348
|
},
|
@@ -9132,7 +9370,7 @@ var AppLayout = ({
|
|
9132
9370
|
"div",
|
9133
9371
|
{
|
9134
9372
|
onClick: () => setOpenSideMenu(true),
|
9135
|
-
className: "hawa-z-40 hawa-mx-1 hawa-cursor-pointer
|
9373
|
+
className: "hawa-z-40 hawa-mx-1 hawa-cursor-pointer hawa-rounded hawa-p-2 hawa-transition-all "
|
9136
9374
|
},
|
9137
9375
|
/* @__PURE__ */ React76.createElement(MenuIcon, null)
|
9138
9376
|
),
|
@@ -9177,13 +9415,13 @@ var AppLayout = ({
|
|
9177
9415
|
)
|
9178
9416
|
}
|
9179
9417
|
))
|
9180
|
-
), /* @__PURE__ */ React76.createElement(
|
9418
|
+
), /* @__PURE__ */ React76.createElement("div", { ref: setContainer }, /* @__PURE__ */ React76.createElement(
|
9181
9419
|
"div",
|
9182
9420
|
{
|
9183
9421
|
className: cn(
|
9184
|
-
"hawa-fixed hawa-z-
|
9422
|
+
"hawa-fixed hawa-z-40 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all hawa-top-0 hawa-h-[calc(100dvh)] hawa-bg-primary-foreground",
|
9185
9423
|
isRTL ? "hawa-right-0" : "hawa-left-0",
|
9186
|
-
bordered ? direction === "rtl" ? "hawa-border-s-[1px]" : "hawa-border-e-[1px]" : ""
|
9424
|
+
bordered ? size > 600 ? direction === "rtl" ? "hawa-border-s-[1px]" : "hawa-border-e-[1px]" : "" : ""
|
9187
9425
|
),
|
9188
9426
|
style: {
|
9189
9427
|
width: size > 600 ? openSideMenu ? `${drawerSizeStyle["opened"][drawerSize]}px` : `${drawerSizeStyle["closed"][drawerSize]}px` : openSideMenu ? `${drawerSizeStyle["opened"][drawerSize]}px` : "0px"
|
@@ -9323,10 +9561,17 @@ var AppLayout = ({
|
|
9323
9561
|
)
|
9324
9562
|
) : null
|
9325
9563
|
)
|
9564
|
+
)), /* @__PURE__ */ React76.createElement(
|
9565
|
+
Dialog3.Root,
|
9566
|
+
{
|
9567
|
+
open: size < 600 && openSideMenu,
|
9568
|
+
onOpenChange: setOpenSideMenu
|
9569
|
+
},
|
9570
|
+
/* @__PURE__ */ React76.createElement(Dialog3.Portal, { container }, /* @__PURE__ */ React76.createElement(Dialog3.Overlay, { className: "hawa-fixed hawa-inset-0 hawa-bg-foreground/20 hawa-backdrop-blur-[2px] data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out hawa-z-10 data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0" }))
|
9326
9571
|
), /* @__PURE__ */ React76.createElement(
|
9327
9572
|
"div",
|
9328
9573
|
{
|
9329
|
-
className: "hawa-fixed
|
9574
|
+
className: "hawa-fixed hawa-overflow-y-auto hawa-transition-all hawa-z-0",
|
9330
9575
|
style: isRTL ? {
|
9331
9576
|
left: "0px",
|
9332
9577
|
top: props.topBar ? "56px" : "0px",
|
@@ -9652,9 +9897,9 @@ var MenubarShortcut = ({
|
|
9652
9897
|
MenubarShortcut.displayname = "MenubarShortcut";
|
9653
9898
|
|
9654
9899
|
// layout/appTabs/AppTabs.tsx
|
9655
|
-
import React79, { useState as
|
9900
|
+
import React79, { useState as useState39 } from "react";
|
9656
9901
|
var AppTabs = ({ tabs, className }) => {
|
9657
|
-
const [selectedIndex, setSelectedIndex] =
|
9902
|
+
const [selectedIndex, setSelectedIndex] = useState39(0);
|
9658
9903
|
return /* @__PURE__ */ React79.createElement(
|
9659
9904
|
"div",
|
9660
9905
|
{
|
@@ -9696,7 +9941,7 @@ var AppTabs = ({ tabs, className }) => {
|
|
9696
9941
|
};
|
9697
9942
|
|
9698
9943
|
// layout/docsLayout/DocsLayout.tsx
|
9699
|
-
import React81, { useEffect as
|
9944
|
+
import React81, { useEffect as useEffect33, useRef as useRef21, useState as useState40 } from "react";
|
9700
9945
|
|
9701
9946
|
// layout/docsSidebar/DocsSidebar.tsx
|
9702
9947
|
import React80 from "react";
|
@@ -9786,15 +10031,15 @@ var DocsLayout = ({
|
|
9786
10031
|
lg: closeDrawerWidth
|
9787
10032
|
}
|
9788
10033
|
};
|
9789
|
-
const ref =
|
10034
|
+
const ref = useRef21(null);
|
9790
10035
|
const isRTL = direction === "rtl";
|
9791
10036
|
let size = useBreakpoint();
|
9792
10037
|
if (typeof window == "undefined") {
|
9793
10038
|
size = 1200;
|
9794
10039
|
}
|
9795
|
-
const [currentPage, setCurrentPage] =
|
9796
|
-
const [openSideMenu, setOpenSideMenu] =
|
9797
|
-
|
10040
|
+
const [currentPage, setCurrentPage] = useState40("Introduction");
|
10041
|
+
const [openSideMenu, setOpenSideMenu] = useState40(true);
|
10042
|
+
useEffect33(() => {
|
9798
10043
|
const handleClickOutside = (event) => {
|
9799
10044
|
if (ref.current && !ref.current.contains(event.target) && !openSideMenu) {
|
9800
10045
|
setOpenSideMenu(false);
|
@@ -9805,7 +10050,7 @@ var DocsLayout = ({
|
|
9805
10050
|
document.removeEventListener("click", handleClickOutside, true);
|
9806
10051
|
};
|
9807
10052
|
}, [openSideMenu]);
|
9808
|
-
|
10053
|
+
useEffect33(() => {
|
9809
10054
|
const handleResize = () => {
|
9810
10055
|
setOpenSideMenu(window.innerWidth > 600 ? true : false);
|
9811
10056
|
};
|
@@ -9822,7 +10067,7 @@ var DocsLayout = ({
|
|
9822
10067
|
setCurrentPage(entry.target.id);
|
9823
10068
|
}
|
9824
10069
|
};
|
9825
|
-
|
10070
|
+
useEffect33(() => {
|
9826
10071
|
observerRef.current = new IntersectionObserver(handleIntersection, {
|
9827
10072
|
threshold: 0.5
|
9828
10073
|
// Adjust threshold as needed to determine when a section is in view
|
@@ -10064,7 +10309,7 @@ var AuthButtons = (props) => {
|
|
10064
10309
|
|
10065
10310
|
// blocks/auth/LoginForm.tsx
|
10066
10311
|
import React83 from "react";
|
10067
|
-
import { useState as
|
10312
|
+
import { useState as useState41 } from "react";
|
10068
10313
|
import { Controller, useForm } from "react-hook-form";
|
10069
10314
|
import { zodResolver } from "@hookform/resolvers/zod";
|
10070
10315
|
import {
|
@@ -10081,7 +10326,7 @@ var LoginForm = ({
|
|
10081
10326
|
...props
|
10082
10327
|
}) => {
|
10083
10328
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
10084
|
-
const [passwordVisible, setPasswordVisible] =
|
10329
|
+
const [passwordVisible, setPasswordVisible] = useState41(false);
|
10085
10330
|
const thirdPartyAuthTexts = {
|
10086
10331
|
continueWithGoogle: texts == null ? void 0 : texts.continueWithGoogle,
|
10087
10332
|
continueWithTwitter: texts == null ? void 0 : texts.continueWithTwitter,
|
@@ -10400,7 +10645,7 @@ var LoginForm = ({
|
|
10400
10645
|
};
|
10401
10646
|
|
10402
10647
|
// blocks/auth/RegisterForm.tsx
|
10403
|
-
import React84, { useState as
|
10648
|
+
import React84, { useState as useState42 } from "react";
|
10404
10649
|
import { Controller as Controller2, FormProvider, useForm as useForm2 } from "react-hook-form";
|
10405
10650
|
import { zodResolver as zodResolver2 } from "@hookform/resolvers/zod";
|
10406
10651
|
import * as z2 from "zod";
|
@@ -10412,7 +10657,7 @@ var RegisterForm = ({
|
|
10412
10657
|
...props
|
10413
10658
|
}) => {
|
10414
10659
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
10415
|
-
const [passwordVisible, setPasswordVisible] =
|
10660
|
+
const [passwordVisible, setPasswordVisible] = useState42(false);
|
10416
10661
|
const thirdPartyAuthTexts = {
|
10417
10662
|
continueWithGoogle: texts == null ? void 0 : texts.continueWithGoogle,
|
10418
10663
|
continueWithTwitter: texts == null ? void 0 : texts.continueWithTwitter,
|
@@ -11033,7 +11278,7 @@ var ResetPasswordForm = ({
|
|
11033
11278
|
};
|
11034
11279
|
|
11035
11280
|
// blocks/auth/CodeConfirmation.tsx
|
11036
|
-
import React89, { useEffect as
|
11281
|
+
import React89, { useEffect as useEffect34, useState as useState43 } from "react";
|
11037
11282
|
import { Controller as Controller5, useForm as useForm5 } from "react-hook-form";
|
11038
11283
|
import { zodResolver as zodResolver5 } from "@hookform/resolvers/zod";
|
11039
11284
|
import * as z5 from "zod";
|
@@ -11045,9 +11290,9 @@ var CodeConfirmation = (props) => {
|
|
11045
11290
|
const { handleSubmit, control, formState, setValue } = useForm5({
|
11046
11291
|
resolver: zodResolver5(formSchema)
|
11047
11292
|
});
|
11048
|
-
const [resendTimer, setResendTimer] =
|
11049
|
-
const [remainingTime, setRemainingTime] =
|
11050
|
-
const [showResendTimer, setShowResendTimer] =
|
11293
|
+
const [resendTimer, setResendTimer] = useState43(null);
|
11294
|
+
const [remainingTime, setRemainingTime] = useState43(0);
|
11295
|
+
const [showResendTimer, setShowResendTimer] = useState43(false);
|
11051
11296
|
const startResendTimer = () => {
|
11052
11297
|
if (resendTimer !== null) {
|
11053
11298
|
clearInterval(resendTimer);
|
@@ -11069,7 +11314,7 @@ var CodeConfirmation = (props) => {
|
|
11069
11314
|
}, 1e3);
|
11070
11315
|
setResendTimer(newTimer);
|
11071
11316
|
};
|
11072
|
-
|
11317
|
+
useEffect34(() => {
|
11073
11318
|
return () => {
|
11074
11319
|
if (resendTimer !== null) {
|
11075
11320
|
clearInterval(resendTimer);
|
@@ -11132,7 +11377,7 @@ var CodeConfirmation = (props) => {
|
|
11132
11377
|
};
|
11133
11378
|
|
11134
11379
|
// blocks/feedback/UserReferralSource.tsx
|
11135
|
-
import React90, { useRef as
|
11380
|
+
import React90, { useRef as useRef22, useState as useState44 } from "react";
|
11136
11381
|
import { Controller as Controller6, useForm as useForm6 } from "react-hook-form";
|
11137
11382
|
import { zodResolver as zodResolver6 } from "@hookform/resolvers/zod";
|
11138
11383
|
import * as z6 from "zod";
|
@@ -11142,8 +11387,8 @@ var UserReferralSource = ({
|
|
11142
11387
|
...props
|
11143
11388
|
}) => {
|
11144
11389
|
var _a, _b;
|
11145
|
-
const [closed, setClosed] =
|
11146
|
-
const popUpRef =
|
11390
|
+
const [closed, setClosed] = useState44(false);
|
11391
|
+
const popUpRef = useRef22(null);
|
11147
11392
|
const formSchema = z6.object({
|
11148
11393
|
source: z6.string({ required_error: (_a = props.texts) == null ? void 0 : _a.pleaseSelectOption }),
|
11149
11394
|
feedback: z6.string().optional()
|
@@ -11290,21 +11535,21 @@ var UserReferralSource = ({
|
|
11290
11535
|
};
|
11291
11536
|
|
11292
11537
|
// blocks/feedback/FeedbackRating.tsx
|
11293
|
-
import React91, { useEffect as
|
11538
|
+
import React91, { useEffect as useEffect35, useRef as useRef23, useState as useState45 } from "react";
|
11294
11539
|
var FeedbackRating = ({
|
11295
11540
|
position = "bottom-right",
|
11296
11541
|
...props
|
11297
11542
|
}) => {
|
11298
|
-
const [closed, setClosed] =
|
11299
|
-
const [answered, setAnswered] =
|
11300
|
-
const [clickedOption, setClickedOption] =
|
11301
|
-
const [closingTimer, setClosingTimer] =
|
11302
|
-
const popUpRef =
|
11543
|
+
const [closed, setClosed] = useState45(false);
|
11544
|
+
const [answered, setAnswered] = useState45(false);
|
11545
|
+
const [clickedOption, setClickedOption] = useState45(null);
|
11546
|
+
const [closingTimer, setClosingTimer] = useState45(5);
|
11547
|
+
const popUpRef = useRef23(null);
|
11303
11548
|
const boxPosition = {
|
11304
11549
|
"bottom-right": "hawa-right-4",
|
11305
11550
|
"bottom-left": "hawa-left-4"
|
11306
11551
|
};
|
11307
|
-
|
11552
|
+
useEffect35(() => {
|
11308
11553
|
const timeoutHide = setTimeout(() => {
|
11309
11554
|
if (closingTimer >= 0) {
|
11310
11555
|
setClosingTimer(closingTimer - 1);
|
@@ -11404,12 +11649,12 @@ var FeedbackRating = ({
|
|
11404
11649
|
};
|
11405
11650
|
|
11406
11651
|
// blocks/feedback/FeedbackEmoji.tsx
|
11407
|
-
import React92, { useState as
|
11652
|
+
import React92, { useState as useState46 } from "react";
|
11408
11653
|
var FeedbackEmoji = (props) => {
|
11409
|
-
const [selectedEmoji, setSelectedEmoji] =
|
11410
|
-
const [loadingSubmit, setLoadingSubmit] =
|
11411
|
-
const [feedbackText, setFeedbackText] =
|
11412
|
-
const [helperText, setHelperText] =
|
11654
|
+
const [selectedEmoji, setSelectedEmoji] = useState46(null);
|
11655
|
+
const [loadingSubmit, setLoadingSubmit] = useState46(false);
|
11656
|
+
const [feedbackText, setFeedbackText] = useState46("");
|
11657
|
+
const [helperText, setHelperText] = useState46(false);
|
11413
11658
|
let emojis = [
|
11414
11659
|
{ icon: /* @__PURE__ */ React92.createElement(VeryGoodEmoji, null), value: "very-good" },
|
11415
11660
|
{ icon: /* @__PURE__ */ React92.createElement(GoodEmoji, null), value: "good" },
|
@@ -11973,9 +12218,9 @@ var ContactForm = ({
|
|
11973
12218
|
import React107 from "react";
|
11974
12219
|
|
11975
12220
|
// blocks/cards/ActionCard.tsx
|
11976
|
-
import React102, { useState as
|
12221
|
+
import React102, { useState as useState47 } from "react";
|
11977
12222
|
var ActionCard = (props) => {
|
11978
|
-
const [hovered, setHovered] =
|
12223
|
+
const [hovered, setHovered] = useState47(false);
|
11979
12224
|
return /* @__PURE__ */ React102.createElement("div", { className: "hawa-flex hawa-h-full hawa-w-full hawa-flex-col hawa-gap-1" }, /* @__PURE__ */ React102.createElement(
|
11980
12225
|
"div",
|
11981
12226
|
{
|
@@ -12012,15 +12257,15 @@ var ActionCard = (props) => {
|
|
12012
12257
|
};
|
12013
12258
|
|
12014
12259
|
// blocks/cards/AdCard.tsx
|
12015
|
-
import React103, { useState as
|
12260
|
+
import React103, { useState as useState48, useEffect as useEffect36, useRef as useRef24 } from "react";
|
12016
12261
|
var AdCard = ({
|
12017
12262
|
orientation = "vertical",
|
12018
12263
|
...props
|
12019
12264
|
}) => {
|
12020
|
-
const adRef =
|
12021
|
-
const [closed, setClosed] =
|
12265
|
+
const adRef = useRef24(null);
|
12266
|
+
const [closed, setClosed] = useState48(false);
|
12022
12267
|
let duration = 0;
|
12023
|
-
|
12268
|
+
useEffect36(() => {
|
12024
12269
|
if (duration) {
|
12025
12270
|
const timeoutHide = setTimeout(() => {
|
12026
12271
|
setClosed(true);
|
@@ -12208,7 +12453,7 @@ var PricingCard = ({
|
|
12208
12453
|
};
|
12209
12454
|
|
12210
12455
|
// blocks/cards/ItemCard.tsx
|
12211
|
-
import React105, { useEffect as
|
12456
|
+
import React105, { useEffect as useEffect37, useState as useState49 } from "react";
|
12212
12457
|
var ItemCard = ({
|
12213
12458
|
actions,
|
12214
12459
|
counts,
|
@@ -12237,12 +12482,12 @@ var ItemCard = ({
|
|
12237
12482
|
)
|
12238
12483
|
};
|
12239
12484
|
let headerActionsButtonStyle = "hawa-inline-block hawa-rounded hawa-p-1 hawa-text-sm hawa-text-gray-500 hover:hawa-bg-gray-100 focus:hawa-outline-none focus:hawa-ring-4 focus:hawa-ring-gray-200 dark:hawa-text-gray-400 dark:hover:hawa-bg-gray-700 dark:focus:hawa-ring-gray-700";
|
12240
|
-
const [openActionHeader, setOpenActionHeader] =
|
12485
|
+
const [openActionHeader, setOpenActionHeader] = useState49(false);
|
12241
12486
|
function handleOpenActionHeader(e) {
|
12242
12487
|
e.stopPropagation();
|
12243
12488
|
setOpenActionHeader(!openActionHeader);
|
12244
12489
|
}
|
12245
|
-
|
12490
|
+
useEffect37(() => {
|
12246
12491
|
window.onclick = () => {
|
12247
12492
|
if (openActionHeader) {
|
12248
12493
|
setOpenActionHeader(false);
|
@@ -12569,9 +12814,9 @@ var ComparingPlans = (props) => {
|
|
12569
12814
|
};
|
12570
12815
|
|
12571
12816
|
// blocks/pricing/HorizontalPricing.tsx
|
12572
|
-
import React109, { useState as
|
12817
|
+
import React109, { useState as useState50 } from "react";
|
12573
12818
|
var HorizontalPricing = (props) => {
|
12574
|
-
const [selectedCard, setSelectedCard] =
|
12819
|
+
const [selectedCard, setSelectedCard] = useState50("");
|
12575
12820
|
let data = [
|
12576
12821
|
{ title: "basic", price: "$49", cycle: "/mo" },
|
12577
12822
|
{ title: "business", price: "$99", cycle: "/mo" },
|
@@ -12693,6 +12938,7 @@ export {
|
|
12693
12938
|
AdCard,
|
12694
12939
|
Alert,
|
12695
12940
|
Announcement,
|
12941
|
+
AppCommand,
|
12696
12942
|
AppLanding,
|
12697
12943
|
AppLayout,
|
12698
12944
|
AppStores,
|
@@ -12772,6 +13018,7 @@ export {
|
|
12772
13018
|
FeedbackRating,
|
12773
13019
|
FileDropzone,
|
12774
13020
|
FileUploader,
|
13021
|
+
FullCommand,
|
12775
13022
|
HorizontalPricing,
|
12776
13023
|
Input,
|
12777
13024
|
InterfaceSettings,
|
@@ -12881,7 +13128,10 @@ export {
|
|
12881
13128
|
Usage,
|
12882
13129
|
UserReferralSource,
|
12883
13130
|
buttonVariants,
|
13131
|
+
getHotkeyHandler,
|
13132
|
+
getHotkeyMatcher,
|
12884
13133
|
navigationMenuTriggerStyle,
|
13134
|
+
parseHotkey,
|
12885
13135
|
reducer,
|
12886
13136
|
toast,
|
12887
13137
|
useBreakpoint,
|
@@ -12893,6 +13143,7 @@ export {
|
|
12893
13143
|
useMeasureDirty,
|
12894
13144
|
useMediaQuery,
|
12895
13145
|
useMultiStepDialog,
|
13146
|
+
useShortcuts,
|
12896
13147
|
useTabs,
|
12897
13148
|
useToast,
|
12898
13149
|
useWindowSize
|