@sikka/hawa 0.1.85 → 0.1.87
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 -1
- package/dist/index.d.mts +22 -2
- package/dist/index.d.ts +22 -2
- package/dist/index.js +814 -743
- package/dist/index.mjs +600 -531
- package/dist/styles.css +31 -65
- package/package.json +1 -1
- package/src/blocks/AuthForms/AppLanding.tsx +17 -7
- package/src/blocks/AuthForms/SignInForm.tsx +1 -1
- package/src/blocks/AuthForms/SignUpForm.tsx +1 -1
- package/src/blocks/Payment/CreditCardForm.tsx +20 -19
- package/src/elements/ActionCard.tsx +64 -0
- package/src/elements/Carousel.tsx +5 -155
- package/src/elements/DropdownMenu.tsx +5 -0
- package/src/elements/index.ts +2 -0
- package/src/layout/Footer.tsx +50 -13
- package/src/styles.css +31 -65
package/dist/index.js
CHANGED
|
@@ -214,6 +214,9 @@ var __toCommonJS = function(mod) {
|
|
|
214
214
|
// src/index.ts
|
|
215
215
|
var src_exports = {};
|
|
216
216
|
__export(src_exports, {
|
|
217
|
+
ActionCard: function() {
|
|
218
|
+
return ActionCard;
|
|
219
|
+
},
|
|
217
220
|
Announcement: function() {
|
|
218
221
|
return Announcement;
|
|
219
222
|
},
|
|
@@ -1501,6 +1504,7 @@ var DropdownMenuItem = React19.forwardRef(function(_param, ref) /* @__PURE__ */
|
|
|
1501
1504
|
"inset"
|
|
1502
1505
|
]);
|
|
1503
1506
|
return React19.createElement(DropdownMenuPrimitive.Item, _object_spread({
|
|
1507
|
+
disabled: props.disabled,
|
|
1504
1508
|
ref: ref,
|
|
1505
1509
|
className: cn("relative flex cursor-pointer select-none items-center justify-between rounded-sm px-2 py-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", className)
|
|
1506
1510
|
}, props), /* @__PURE__ */ React19.createElement("div", {
|
|
@@ -1617,6 +1621,7 @@ var DropdownMenu = function(param) {
|
|
|
1617
1621
|
dir: direction
|
|
1618
1622
|
}, item.icon && item.icon, item.label), /* @__PURE__ */ React19.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React19.createElement(DropdownMenuSubContent, null, item.subitems.map(function(subitem, subIndex) {
|
|
1619
1623
|
return /* @__PURE__ */ React19.createElement(DropdownMenuItem, {
|
|
1624
|
+
disabled: subitem.disabled,
|
|
1620
1625
|
className: "flex flex-row gap-2",
|
|
1621
1626
|
onSelect: function() {
|
|
1622
1627
|
return subitem.action();
|
|
@@ -1624,6 +1629,7 @@ var DropdownMenu = function(param) {
|
|
|
1624
1629
|
key: subIndex
|
|
1625
1630
|
}, subitem.icon && subitem.icon, subitem.label);
|
|
1626
1631
|
})))) : /* @__PURE__ */ React19.createElement(DropdownMenuItem, {
|
|
1632
|
+
disabled: item.disabled,
|
|
1627
1633
|
className: "flex flex-row gap-2",
|
|
1628
1634
|
key: index,
|
|
1629
1635
|
onSelect: function(e) {
|
|
@@ -6599,15 +6605,59 @@ var HawaStoreButtons = function(props) {
|
|
|
6599
6605
|
className: "font-sans -mt-1 text-xl font-semibold"
|
|
6600
6606
|
}, "Google Play")))));
|
|
6601
6607
|
};
|
|
6608
|
+
// src/elements/ActionCard.tsx
|
|
6609
|
+
var import_react52 = __toESM(require("react"));
|
|
6610
|
+
var ActionCard = function(props) {
|
|
6611
|
+
var _ref = _sliced_to_array((0, import_react52.useState)(false), 2), hovered = _ref[0], setHovered = _ref[1];
|
|
6612
|
+
return /* @__PURE__ */ import_react52.default.createElement("div", {
|
|
6613
|
+
className: "flex h-full w-full flex-col gap-1 "
|
|
6614
|
+
}, /* @__PURE__ */ import_react52.default.createElement("div", {
|
|
6615
|
+
className: "group relative h-full w-full rounded border bg-background bg-cover bg-center transition-all duration-500 hover:drop-shadow-2xl",
|
|
6616
|
+
style: {
|
|
6617
|
+
backgroundImage: "url(".concat(props.blank ? "" : props.cardImage, ")")
|
|
6618
|
+
},
|
|
6619
|
+
onMouseEnter: function() {
|
|
6620
|
+
return setHovered(true);
|
|
6621
|
+
},
|
|
6622
|
+
onMouseLeave: function() {
|
|
6623
|
+
return setHovered(false);
|
|
6624
|
+
}
|
|
6625
|
+
}, props.blank ? /* @__PURE__ */ import_react52.default.createElement("div", {
|
|
6626
|
+
className: "flex h-full flex-col items-center justify-center "
|
|
6627
|
+
}, /* @__PURE__ */ import_react52.default.createElement("svg", {
|
|
6628
|
+
className: "h-10 w-10 text-foreground",
|
|
6629
|
+
stroke: "currentColor",
|
|
6630
|
+
fill: "currentColor",
|
|
6631
|
+
"stroke-width": "0",
|
|
6632
|
+
viewBox: "0 0 24 24",
|
|
6633
|
+
height: "1em",
|
|
6634
|
+
width: "1em",
|
|
6635
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
6636
|
+
}, /* @__PURE__ */ import_react52.default.createElement("path", {
|
|
6637
|
+
d: "M19 11h-6V5h-2v6H5v2h6v6h2v-6h6z"
|
|
6638
|
+
}))) : /* @__PURE__ */ import_react52.default.createElement("div", {
|
|
6639
|
+
className: "absolute inset-0 rounded bg-black opacity-50"
|
|
6640
|
+
}), /* @__PURE__ */ import_react52.default.createElement("div", {
|
|
6641
|
+
className: "absolute bottom-2 right-2 z-10 opacity-0 transition-all duration-200 group-hover:opacity-100"
|
|
6642
|
+
}, props.inCardActions), !props.blank && /* @__PURE__ */ import_react52.default.createElement("div", {
|
|
6643
|
+
className: "relative p-4"
|
|
6644
|
+
}, /* @__PURE__ */ import_react52.default.createElement("h1", {
|
|
6645
|
+
className: "text-white"
|
|
6646
|
+
}, props.title), /* @__PURE__ */ import_react52.default.createElement("p", {
|
|
6647
|
+
className: "text-white"
|
|
6648
|
+
}, props.subtitle))), /* @__PURE__ */ import_react52.default.createElement("div", {
|
|
6649
|
+
className: "flex flex-row justify-between text-sm transition-all duration-200 ".concat(hovered ? "opacity-100" : "opacity-0")
|
|
6650
|
+
}, props.bottomElement));
|
|
6651
|
+
};
|
|
6602
6652
|
// src/elements/Carousel.tsx
|
|
6603
|
-
var
|
|
6653
|
+
var import_react54 = __toESM(require("react"));
|
|
6604
6654
|
// src/hooks/useCarousel.ts
|
|
6605
|
-
var
|
|
6655
|
+
var import_react53 = require("react");
|
|
6606
6656
|
var useCarousel = function(imageWidth) {
|
|
6607
|
-
var _ref = _sliced_to_array((0,
|
|
6608
|
-
var _ref1 = _sliced_to_array((0,
|
|
6609
|
-
var _ref2 = _sliced_to_array((0,
|
|
6610
|
-
var containerRef = (0,
|
|
6657
|
+
var _ref = _sliced_to_array((0, import_react53.useState)(false), 2), isDragging = _ref[0], setIsDragging = _ref[1];
|
|
6658
|
+
var _ref1 = _sliced_to_array((0, import_react53.useState)(0), 2), startDragX = _ref1[0], setStartDragX = _ref1[1];
|
|
6659
|
+
var _ref2 = _sliced_to_array((0, import_react53.useState)(0), 2), scrollLeft = _ref2[0], setScrollLeft = _ref2[1];
|
|
6660
|
+
var containerRef = (0, import_react53.useRef)(null);
|
|
6611
6661
|
var findClosestSnapPoint = function(scrollLeft2) {
|
|
6612
6662
|
return Math.round(scrollLeft2 / imageWidth) * imageWidth;
|
|
6613
6663
|
};
|
|
@@ -6653,35 +6703,36 @@ var useCarousel_default = useCarousel;
|
|
|
6653
6703
|
// src/elements/Carousel.tsx
|
|
6654
6704
|
var Carousel = function(param) {
|
|
6655
6705
|
var images = param.images;
|
|
6656
|
-
var imageWidth =
|
|
6706
|
+
var imageWidth = 1e3 + 16;
|
|
6657
6707
|
var _useCarousel_default = useCarousel_default(imageWidth), containerRef = _useCarousel_default.containerRef, handleMouseDown = _useCarousel_default.handleMouseDown, handleMouseLeave = _useCarousel_default.handleMouseLeave, handleMouseUp = _useCarousel_default.handleMouseUp, handleMouseMove = _useCarousel_default.handleMouseMove;
|
|
6658
|
-
return /* @__PURE__ */
|
|
6659
|
-
className: "flex cursor-pointer snap-x gap-4 overflow-x-
|
|
6708
|
+
return /* @__PURE__ */ import_react54.default.createElement("div", {
|
|
6709
|
+
className: "flex cursor-pointer snap-x gap-4 overflow-x-hidden justify-center items-center",
|
|
6660
6710
|
onMouseDown: handleMouseDown,
|
|
6661
6711
|
onMouseLeave: handleMouseLeave,
|
|
6662
6712
|
onMouseUp: handleMouseUp,
|
|
6663
6713
|
onMouseMove: handleMouseMove,
|
|
6664
6714
|
ref: containerRef
|
|
6665
6715
|
}, images.map(function(image, index) {
|
|
6666
|
-
return /* @__PURE__ */
|
|
6716
|
+
return /* @__PURE__ */ import_react54.default.createElement("div", {
|
|
6667
6717
|
key: index,
|
|
6668
|
-
className: "
|
|
6669
|
-
}, /* @__PURE__ */
|
|
6718
|
+
className: "w-[1000px] h-96 flex-shrink-0"
|
|
6719
|
+
}, /* @__PURE__ */ import_react54.default.createElement("img", {
|
|
6670
6720
|
src: image,
|
|
6671
6721
|
alt: "Carousel Image ".concat(index),
|
|
6722
|
+
width: imageWidth,
|
|
6672
6723
|
className: "h-full w-full rounded-lg object-cover"
|
|
6673
6724
|
}));
|
|
6674
6725
|
}));
|
|
6675
6726
|
};
|
|
6676
6727
|
// src/elements/Input.tsx
|
|
6677
|
-
var
|
|
6678
|
-
var Input =
|
|
6728
|
+
var React60 = __toESM(require("react"));
|
|
6729
|
+
var Input = React60.forwardRef(function(_param, ref) {
|
|
6679
6730
|
var className = _param.className, preview = _param.preview, type = _param.type, props = _object_without_properties(_param, [
|
|
6680
6731
|
"className",
|
|
6681
6732
|
"preview",
|
|
6682
6733
|
"type"
|
|
6683
6734
|
]);
|
|
6684
|
-
return /* @__PURE__ */
|
|
6735
|
+
return /* @__PURE__ */ React60.createElement("input", _object_spread({
|
|
6685
6736
|
type: type,
|
|
6686
6737
|
className: cn("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", className, preview && " disabled:cursor-default disabled:opacity-100 border-opacity-25 "),
|
|
6687
6738
|
disabled: preview,
|
|
@@ -6690,21 +6741,21 @@ var Input = React59.forwardRef(function(_param, ref) {
|
|
|
6690
6741
|
});
|
|
6691
6742
|
Input.displayName = "Input";
|
|
6692
6743
|
// src/elements/InterfaceSettings.tsx
|
|
6693
|
-
var
|
|
6744
|
+
var import_react55 = __toESM(require("react"));
|
|
6694
6745
|
var InterfaceSettings = function(_param) {
|
|
6695
6746
|
var _param_orientation = _param.orientation, orientation = _param_orientation === void 0 ? "horizontal" : _param_orientation, _param_width = _param.width, width = _param_width === void 0 ? "default" : _param_width, props = _object_without_properties(_param, [
|
|
6696
6747
|
"orientation",
|
|
6697
6748
|
"width"
|
|
6698
6749
|
]);
|
|
6699
|
-
var _ref = _sliced_to_array((0,
|
|
6700
|
-
var _ref1 = _sliced_to_array((0,
|
|
6750
|
+
var _ref = _sliced_to_array((0, import_react55.useState)(props.currentColorMode), 2), color = _ref[0], setColor = _ref[1];
|
|
6751
|
+
var _ref1 = _sliced_to_array((0, import_react55.useState)(props.currentLanguage), 2), language = _ref1[0], setLanguage = _ref1[1];
|
|
6701
6752
|
var orientationStyle = {
|
|
6702
6753
|
horizontal: "flex flex-row justify-between",
|
|
6703
6754
|
vertical: "flex flex-col items-center gap-2"
|
|
6704
6755
|
};
|
|
6705
|
-
return /* @__PURE__ */
|
|
6756
|
+
return /* @__PURE__ */ import_react55.default.createElement("div", {
|
|
6706
6757
|
className: cn(orientationStyle[orientation])
|
|
6707
|
-
}, /* @__PURE__ */
|
|
6758
|
+
}, /* @__PURE__ */ import_react55.default.createElement(HawaRadio, {
|
|
6708
6759
|
width: width,
|
|
6709
6760
|
defaultValue: language,
|
|
6710
6761
|
onChangeTab: function(e) {
|
|
@@ -6722,7 +6773,7 @@ var InterfaceSettings = function(_param) {
|
|
|
6722
6773
|
label: "English"
|
|
6723
6774
|
}
|
|
6724
6775
|
]
|
|
6725
|
-
}), /* @__PURE__ */
|
|
6776
|
+
}), /* @__PURE__ */ import_react55.default.createElement(HawaRadio, {
|
|
6726
6777
|
width: width,
|
|
6727
6778
|
defaultValue: color,
|
|
6728
6779
|
onChangeTab: function(e) {
|
|
@@ -6733,21 +6784,21 @@ var InterfaceSettings = function(_param) {
|
|
|
6733
6784
|
options: [
|
|
6734
6785
|
{
|
|
6735
6786
|
value: "light",
|
|
6736
|
-
label: /* @__PURE__ */
|
|
6787
|
+
label: /* @__PURE__ */ import_react55.default.createElement("svg", {
|
|
6737
6788
|
width: "15",
|
|
6738
6789
|
height: "15",
|
|
6739
6790
|
viewBox: "0 0 15 15",
|
|
6740
6791
|
fill: "none",
|
|
6741
6792
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6742
6793
|
className: "h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90"
|
|
6743
|
-
}, /* @__PURE__ */
|
|
6794
|
+
}, /* @__PURE__ */ import_react55.default.createElement("path", {
|
|
6744
6795
|
d: "M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z",
|
|
6745
6796
|
fill: "currentColor"
|
|
6746
6797
|
}))
|
|
6747
6798
|
},
|
|
6748
6799
|
{
|
|
6749
6800
|
value: "dark",
|
|
6750
|
-
label: /* @__PURE__ */
|
|
6801
|
+
label: /* @__PURE__ */ import_react55.default.createElement("svg", {
|
|
6751
6802
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6752
6803
|
width: "24",
|
|
6753
6804
|
height: "24",
|
|
@@ -6755,7 +6806,7 @@ var InterfaceSettings = function(_param) {
|
|
|
6755
6806
|
fill: "none",
|
|
6756
6807
|
stroke: "currentColor",
|
|
6757
6808
|
className: "h-[1.2rem] w-[1.2rem] transition-all dark:rotate-0 dark:scale-100"
|
|
6758
|
-
}, /* @__PURE__ */
|
|
6809
|
+
}, /* @__PURE__ */ import_react55.default.createElement("path", {
|
|
6759
6810
|
d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"
|
|
6760
6811
|
}))
|
|
6761
6812
|
}
|
|
@@ -6763,15 +6814,15 @@ var InterfaceSettings = function(_param) {
|
|
|
6763
6814
|
}));
|
|
6764
6815
|
};
|
|
6765
6816
|
// src/elements/Popover.tsx
|
|
6766
|
-
var
|
|
6817
|
+
var React62 = __toESM(require("react"));
|
|
6767
6818
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
|
6768
|
-
var PopoverContent =
|
|
6819
|
+
var PopoverContent = React62.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
6769
6820
|
var className = _param.className, _param_align = _param.align, align = _param_align === void 0 ? "center" : _param_align, _param_sideOffset = _param.sideOffset, sideOffset = _param_sideOffset === void 0 ? 4 : _param_sideOffset, props = _object_without_properties(_param, [
|
|
6770
6821
|
"className",
|
|
6771
6822
|
"align",
|
|
6772
6823
|
"sideOffset"
|
|
6773
6824
|
]);
|
|
6774
|
-
return
|
|
6825
|
+
return React62.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React62.createElement(PopoverPrimitive.Content, _object_spread({
|
|
6775
6826
|
ref: ref,
|
|
6776
6827
|
align: align,
|
|
6777
6828
|
sideOffset: sideOffset,
|
|
@@ -6781,7 +6832,7 @@ var PopoverContent = React61.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
|
6781
6832
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
6782
6833
|
var Popover = function(param) {
|
|
6783
6834
|
var trigger = param.trigger, children = param.children, className = param.className, _param_align = param.align, align = _param_align === void 0 ? "center" : _param_align, side = param.side, _param_sideOffset = param.sideOffset, sideOffset = _param_sideOffset === void 0 ? 4 : _param_sideOffset;
|
|
6784
|
-
return /* @__PURE__ */
|
|
6835
|
+
return /* @__PURE__ */ React62.createElement(PopoverPrimitive.Root, null, /* @__PURE__ */ React62.createElement(PopoverPrimitive.Trigger, null, trigger), /* @__PURE__ */ React62.createElement(PopoverContent, {
|
|
6785
6836
|
side: side,
|
|
6786
6837
|
className: className,
|
|
6787
6838
|
align: align,
|
|
@@ -6789,82 +6840,82 @@ var Popover = function(param) {
|
|
|
6789
6840
|
}, children));
|
|
6790
6841
|
};
|
|
6791
6842
|
// src/elements/Tabs.tsx
|
|
6792
|
-
var
|
|
6843
|
+
var React63 = __toESM(require("react"));
|
|
6793
6844
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"));
|
|
6794
|
-
var TabsContext =
|
|
6845
|
+
var TabsContext = React63.createContext({
|
|
6795
6846
|
orientation: "vertical"
|
|
6796
6847
|
});
|
|
6797
|
-
var Tabs =
|
|
6848
|
+
var Tabs = React63.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
6798
6849
|
var className = _param.className, orientation = _param.orientation, props = _object_without_properties(_param, [
|
|
6799
6850
|
"className",
|
|
6800
6851
|
"orientation"
|
|
6801
6852
|
]);
|
|
6802
|
-
return
|
|
6853
|
+
return React63.createElement(TabsPrimitive.Root, _object_spread({
|
|
6803
6854
|
ref: ref,
|
|
6804
6855
|
className: cn("flex gap-2", orientation === "horizontal" ? "flex-row" : "flex-col", className)
|
|
6805
|
-
}, props), /* @__PURE__ */
|
|
6856
|
+
}, props), /* @__PURE__ */ React63.createElement(TabsContext.Provider, {
|
|
6806
6857
|
value: {
|
|
6807
6858
|
orientation: orientation
|
|
6808
6859
|
}
|
|
6809
6860
|
}, props.children));
|
|
6810
6861
|
});
|
|
6811
6862
|
Tabs.displayName = TabsPrimitive.Root.displayName;
|
|
6812
|
-
var TabsList =
|
|
6863
|
+
var TabsList = React63.forwardRef(function(_param, ref) {
|
|
6813
6864
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
6814
6865
|
"className"
|
|
6815
6866
|
]);
|
|
6816
|
-
var orientation =
|
|
6817
|
-
return /* @__PURE__ */
|
|
6867
|
+
var orientation = React63.useContext(TabsContext).orientation;
|
|
6868
|
+
return /* @__PURE__ */ React63.createElement(TabsPrimitive.List, _object_spread({
|
|
6818
6869
|
ref: ref,
|
|
6819
6870
|
className: cn("flex w-fit flex-wrap items-center justify-start gap-1 rounded border bg-muted p-1 text-muted-foreground dark:border-primary/10 ", orientation === "horizontal" ? "flex-col" : "flex-row", className)
|
|
6820
6871
|
}, props));
|
|
6821
6872
|
});
|
|
6822
6873
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
6823
|
-
var TabsTrigger =
|
|
6874
|
+
var TabsTrigger = React63.forwardRef(function(_param, ref) {
|
|
6824
6875
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
6825
6876
|
"className"
|
|
6826
6877
|
]);
|
|
6827
|
-
return /* @__PURE__ */
|
|
6878
|
+
return /* @__PURE__ */ React63.createElement(TabsPrimitive.Trigger, _object_spread({
|
|
6828
6879
|
ref: ref,
|
|
6829
6880
|
className: cn("inline-flex w-full flex-1 select-none items-center justify-center whitespace-nowrap rounded border px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow-sm dark:border-primary/10", className)
|
|
6830
6881
|
}, props));
|
|
6831
6882
|
});
|
|
6832
6883
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
6833
|
-
var TabsContent =
|
|
6884
|
+
var TabsContent = React63.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
6834
6885
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
6835
6886
|
"className"
|
|
6836
6887
|
]);
|
|
6837
|
-
return
|
|
6888
|
+
return React63.createElement(TabsPrimitive.Content, _object_spread({
|
|
6838
6889
|
ref: ref,
|
|
6839
6890
|
className: cn("w-full ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", className)
|
|
6840
6891
|
}, props));
|
|
6841
6892
|
});
|
|
6842
6893
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
6843
6894
|
// src/elements/Textarea.tsx
|
|
6844
|
-
var
|
|
6845
|
-
var Textarea =
|
|
6895
|
+
var React64 = __toESM(require("react"));
|
|
6896
|
+
var Textarea = React64.forwardRef(function(_param, ref) {
|
|
6846
6897
|
var className = _param.className, label = _param.label, props = _object_without_properties(_param, [
|
|
6847
6898
|
"className",
|
|
6848
6899
|
"label"
|
|
6849
6900
|
]);
|
|
6850
|
-
return /* @__PURE__ */
|
|
6901
|
+
return /* @__PURE__ */ React64.createElement(React64.Fragment, null, label && /* @__PURE__ */ React64.createElement(Label, {
|
|
6851
6902
|
htmlFor: props.id
|
|
6852
|
-
}, label), /* @__PURE__ */
|
|
6903
|
+
}, label), /* @__PURE__ */ React64.createElement("textarea", _object_spread({
|
|
6853
6904
|
className: cn("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
6854
6905
|
ref: ref
|
|
6855
6906
|
}, props)));
|
|
6856
6907
|
});
|
|
6857
6908
|
Textarea.displayName = "Textarea";
|
|
6858
6909
|
// src/elements/Separator.tsx
|
|
6859
|
-
var
|
|
6910
|
+
var React65 = __toESM(require("react"));
|
|
6860
6911
|
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"));
|
|
6861
|
-
var Separator3 =
|
|
6912
|
+
var Separator3 = React65.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
6862
6913
|
var className = _param.className, _param_orientation = _param.orientation, orientation = _param_orientation === void 0 ? "horizontal" : _param_orientation, _param_decorative = _param.decorative, decorative = _param_decorative === void 0 ? true : _param_decorative, props = _object_without_properties(_param, [
|
|
6863
6914
|
"className",
|
|
6864
6915
|
"orientation",
|
|
6865
6916
|
"decorative"
|
|
6866
6917
|
]);
|
|
6867
|
-
return
|
|
6918
|
+
return React65.createElement(SeparatorPrimitive.Root, _object_spread({
|
|
6868
6919
|
ref: ref,
|
|
6869
6920
|
decorative: decorative,
|
|
6870
6921
|
orientation: orientation,
|
|
@@ -6873,7 +6924,7 @@ var Separator3 = React64.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
|
6873
6924
|
});
|
|
6874
6925
|
Separator3.displayName = SeparatorPrimitive.Root.displayName;
|
|
6875
6926
|
// src/elements/Toast.tsx
|
|
6876
|
-
var
|
|
6927
|
+
var React66 = __toESM(require("react"));
|
|
6877
6928
|
var ToastPrimitives = __toESM(require("@radix-ui/react-toast"));
|
|
6878
6929
|
var import_class_variance_authority3 = require("class-variance-authority");
|
|
6879
6930
|
var toastVariants = (0, import_class_variance_authority3.cva)("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full", {
|
|
@@ -6895,24 +6946,24 @@ var toastVariants = (0, import_class_variance_authority3.cva)("group pointer-eve
|
|
|
6895
6946
|
}
|
|
6896
6947
|
});
|
|
6897
6948
|
var ToastProvider = ToastPrimitives.Provider;
|
|
6898
|
-
var ToastViewport =
|
|
6949
|
+
var ToastViewport = React66.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
6899
6950
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
6900
6951
|
"className"
|
|
6901
6952
|
]);
|
|
6902
|
-
return
|
|
6953
|
+
return React66.createElement(ToastPrimitives.Viewport, _object_spread({
|
|
6903
6954
|
ref: ref,
|
|
6904
6955
|
className: cn("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]", className)
|
|
6905
6956
|
}, props));
|
|
6906
6957
|
});
|
|
6907
6958
|
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
6908
|
-
var Toast =
|
|
6959
|
+
var Toast = React66.forwardRef(function(_param, ref) {
|
|
6909
6960
|
var className = _param.className, variant = _param.variant, _param_severity = _param.severity, severity = _param_severity === void 0 ? "none" : _param_severity, direction = _param.direction, props = _object_without_properties(_param, [
|
|
6910
6961
|
"className",
|
|
6911
6962
|
"variant",
|
|
6912
6963
|
"severity",
|
|
6913
6964
|
"direction"
|
|
6914
6965
|
]);
|
|
6915
|
-
return /* @__PURE__ */
|
|
6966
|
+
return /* @__PURE__ */ React66.createElement(ToastPrimitives.Root, _object_spread({
|
|
6916
6967
|
ref: ref,
|
|
6917
6968
|
className: cn(toastVariants({
|
|
6918
6969
|
variant: variant,
|
|
@@ -6922,61 +6973,61 @@ var Toast = React65.forwardRef(function(_param, ref) {
|
|
|
6922
6973
|
}, props));
|
|
6923
6974
|
});
|
|
6924
6975
|
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
6925
|
-
var ToastAction =
|
|
6976
|
+
var ToastAction = React66.forwardRef(function(_param, ref) {
|
|
6926
6977
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
6927
6978
|
"className"
|
|
6928
6979
|
]);
|
|
6929
|
-
return /* @__PURE__ */
|
|
6980
|
+
return /* @__PURE__ */ React66.createElement(ToastPrimitives.Action, _object_spread({
|
|
6930
6981
|
ref: ref,
|
|
6931
6982
|
className: cn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", "group-[.info]:border-muted/40 group-[.info]:hover:border-info/30 group-[.info]:hover:bg-info group-[.info]:hover:text-info-foreground group-[.info]:focus:ring-info", "group-[.error]:border-muted/40 group-[.error]:hover:border-error/30 group-[.error]:hover:bg-error group-[.error]:hover:text-error-foreground group-[.error]:focus:ring-error", "group-[.success]:border-muted/40 group-[.success]:hover:border-success/30 group-[.success]:hover:bg-success group-[.success]:hover:text-success-foreground group-[.success]:focus:ring-success", "group-[.warning]:border-muted/40 group-[.warning]:hover:border-warning/30 group-[.warning]:hover:bg-warning group-[.warning]:hover:text-warning-foreground group-[.warning]:focus:ring-warning", className)
|
|
6932
6983
|
}, props));
|
|
6933
6984
|
});
|
|
6934
6985
|
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
6935
|
-
var ToastClose =
|
|
6986
|
+
var ToastClose = React66.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
6936
6987
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
6937
6988
|
"className"
|
|
6938
6989
|
]);
|
|
6939
|
-
return
|
|
6990
|
+
return React66.createElement(ToastPrimitives.Close, _object_spread({
|
|
6940
6991
|
ref: ref,
|
|
6941
6992
|
className: cn("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600", className),
|
|
6942
6993
|
"toast-close": ""
|
|
6943
|
-
}, props), /* @__PURE__ */
|
|
6994
|
+
}, props), /* @__PURE__ */ React66.createElement("svg", {
|
|
6944
6995
|
"aria-label": "Close Icon",
|
|
6945
6996
|
"aria-hidden": "true",
|
|
6946
6997
|
className: "h-4 w-4",
|
|
6947
6998
|
fill: "currentColor",
|
|
6948
6999
|
viewBox: "0 0 20 20"
|
|
6949
|
-
}, /* @__PURE__ */
|
|
7000
|
+
}, /* @__PURE__ */ React66.createElement("path", {
|
|
6950
7001
|
fillRule: "evenodd",
|
|
6951
7002
|
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
6952
7003
|
clipRule: "evenodd"
|
|
6953
7004
|
})));
|
|
6954
7005
|
});
|
|
6955
7006
|
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
6956
|
-
var ToastTitle =
|
|
7007
|
+
var ToastTitle = React66.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
6957
7008
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
6958
7009
|
"className"
|
|
6959
7010
|
]);
|
|
6960
|
-
return
|
|
7011
|
+
return React66.createElement(ToastPrimitives.Title, _object_spread({
|
|
6961
7012
|
ref: ref,
|
|
6962
7013
|
className: cn("text-sm font-semibold", className)
|
|
6963
7014
|
}, props));
|
|
6964
7015
|
});
|
|
6965
7016
|
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
6966
|
-
var ToastDescription =
|
|
7017
|
+
var ToastDescription = React66.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
6967
7018
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
6968
7019
|
"className"
|
|
6969
7020
|
]);
|
|
6970
|
-
return
|
|
7021
|
+
return React66.createElement(ToastPrimitives.Description, _object_spread({
|
|
6971
7022
|
ref: ref,
|
|
6972
7023
|
className: cn("text-sm opacity-90", className)
|
|
6973
7024
|
}, props));
|
|
6974
7025
|
});
|
|
6975
7026
|
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
6976
7027
|
// src/elements/Toaster.tsx
|
|
6977
|
-
var
|
|
7028
|
+
var import_react56 = __toESM(require("react"));
|
|
6978
7029
|
// src/hooks/useToast.ts
|
|
6979
|
-
var
|
|
7030
|
+
var React67 = __toESM(require("react"));
|
|
6980
7031
|
var TOAST_LIMIT = 5;
|
|
6981
7032
|
var TOAST_REMOVE_DELAY = 1e5;
|
|
6982
7033
|
var count = 0;
|
|
@@ -7087,8 +7138,8 @@ function toast(_param) {
|
|
|
7087
7138
|
};
|
|
7088
7139
|
}
|
|
7089
7140
|
function useToast() {
|
|
7090
|
-
var
|
|
7091
|
-
|
|
7141
|
+
var _React67_useState = _sliced_to_array(React67.useState(memoryState), 2), state = _React67_useState[0], setState = _React67_useState[1];
|
|
7142
|
+
React67.useEffect(function() {
|
|
7092
7143
|
listeners.push(setState);
|
|
7093
7144
|
return function() {
|
|
7094
7145
|
var index = listeners.indexOf(setState);
|
|
@@ -7113,7 +7164,7 @@ function useToast() {
|
|
|
7113
7164
|
function Toaster(props) {
|
|
7114
7165
|
var toasts = useToast().toasts;
|
|
7115
7166
|
var isRTL = props.direction === "rtl";
|
|
7116
|
-
return /* @__PURE__ */
|
|
7167
|
+
return /* @__PURE__ */ import_react56.default.createElement(ToastProvider, {
|
|
7117
7168
|
swipeDirection: isRTL ? "left" : "right"
|
|
7118
7169
|
}, toasts.map(function(_param) {
|
|
7119
7170
|
var id = _param.id, title = _param.title, description = _param.description, action = _param.action, toastProps = _object_without_properties(_param, [
|
|
@@ -7122,18 +7173,18 @@ function Toaster(props) {
|
|
|
7122
7173
|
"description",
|
|
7123
7174
|
"action"
|
|
7124
7175
|
]);
|
|
7125
|
-
return /* @__PURE__ */
|
|
7176
|
+
return /* @__PURE__ */ import_react56.default.createElement(Toast, _object_spread({
|
|
7126
7177
|
direction: props.direction,
|
|
7127
7178
|
key: id
|
|
7128
|
-
}, toastProps), /* @__PURE__ */
|
|
7179
|
+
}, toastProps), /* @__PURE__ */ import_react56.default.createElement("div", {
|
|
7129
7180
|
className: cn("grid gap-1", isRTL ? "text-right" : "text-left")
|
|
7130
|
-
}, title && /* @__PURE__ */
|
|
7131
|
-
}), /* @__PURE__ */
|
|
7181
|
+
}, title && /* @__PURE__ */ import_react56.default.createElement(ToastTitle, null, title), description && /* @__PURE__ */ import_react56.default.createElement(ToastDescription, null, description)), action, /* @__PURE__ */ import_react56.default.createElement(ToastClose, null));
|
|
7182
|
+
}), /* @__PURE__ */ import_react56.default.createElement(ToastViewport, {
|
|
7132
7183
|
className: cn("gap-2", isRTL && "fixed left-0")
|
|
7133
7184
|
}));
|
|
7134
7185
|
}
|
|
7135
7186
|
// src/elements/Dialog.tsx
|
|
7136
|
-
var
|
|
7187
|
+
var React69 = __toESM(require("react"));
|
|
7137
7188
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
7138
7189
|
var Dialog = DialogPrimitive.Root;
|
|
7139
7190
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
@@ -7141,42 +7192,42 @@ var DialogPortal = function(_param) /* @__PURE__ */ {
|
|
|
7141
7192
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
7142
7193
|
"className"
|
|
7143
7194
|
]);
|
|
7144
|
-
return
|
|
7195
|
+
return React69.createElement(DialogPrimitive.Portal, _object_spread({
|
|
7145
7196
|
className: cn(className)
|
|
7146
7197
|
}, props));
|
|
7147
7198
|
};
|
|
7148
7199
|
DialogPortal.displayName = DialogPrimitive.Portal.displayName;
|
|
7149
|
-
var DialogOverlay =
|
|
7200
|
+
var DialogOverlay = React69.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
7150
7201
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
7151
7202
|
"className"
|
|
7152
7203
|
]);
|
|
7153
|
-
return
|
|
7204
|
+
return React69.createElement(DialogPrimitive.Overlay, _object_spread({
|
|
7154
7205
|
ref: ref,
|
|
7155
7206
|
className: cn("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className)
|
|
7156
7207
|
}, props));
|
|
7157
7208
|
});
|
|
7158
7209
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
7159
|
-
var DialogContent =
|
|
7210
|
+
var DialogContent = React69.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
7160
7211
|
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
7161
7212
|
"className",
|
|
7162
7213
|
"children"
|
|
7163
7214
|
]);
|
|
7164
|
-
return
|
|
7215
|
+
return React69.createElement(DialogPortal, null, /* @__PURE__ */ React69.createElement(DialogOverlay, null), /* @__PURE__ */ React69.createElement(DialogPrimitive.Content, _object_spread({
|
|
7165
7216
|
ref: ref,
|
|
7166
7217
|
className: cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full", className)
|
|
7167
|
-
}, props), children, /* @__PURE__ */
|
|
7218
|
+
}, props), children, /* @__PURE__ */ React69.createElement(DialogPrimitive.Close, {
|
|
7168
7219
|
className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"
|
|
7169
|
-
}, /* @__PURE__ */
|
|
7220
|
+
}, /* @__PURE__ */ React69.createElement("svg", {
|
|
7170
7221
|
"aria-label": "Close Icon",
|
|
7171
7222
|
"aria-hidden": "true",
|
|
7172
7223
|
className: "h-5 w-5",
|
|
7173
7224
|
fill: "currentColor",
|
|
7174
7225
|
viewBox: "0 0 20 20"
|
|
7175
|
-
}, /* @__PURE__ */
|
|
7226
|
+
}, /* @__PURE__ */ React69.createElement("path", {
|
|
7176
7227
|
fillRule: "evenodd",
|
|
7177
7228
|
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
7178
7229
|
clipRule: "evenodd"
|
|
7179
|
-
})), /* @__PURE__ */
|
|
7230
|
+
})), /* @__PURE__ */ React69.createElement("span", {
|
|
7180
7231
|
className: "sr-only"
|
|
7181
7232
|
}, "Close"))));
|
|
7182
7233
|
});
|
|
@@ -7185,7 +7236,7 @@ var DialogHeader = function(_param) /* @__PURE__ */ {
|
|
|
7185
7236
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
7186
7237
|
"className"
|
|
7187
7238
|
]);
|
|
7188
|
-
return
|
|
7239
|
+
return React69.createElement("div", _object_spread({
|
|
7189
7240
|
className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className)
|
|
7190
7241
|
}, props));
|
|
7191
7242
|
};
|
|
@@ -7194,61 +7245,61 @@ var DialogFooter = function(_param) /* @__PURE__ */ {
|
|
|
7194
7245
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
7195
7246
|
"className"
|
|
7196
7247
|
]);
|
|
7197
|
-
return
|
|
7248
|
+
return React69.createElement("div", _object_spread({
|
|
7198
7249
|
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)
|
|
7199
7250
|
}, props));
|
|
7200
7251
|
};
|
|
7201
7252
|
DialogFooter.displayName = "DialogFooter";
|
|
7202
|
-
var DialogTitle =
|
|
7253
|
+
var DialogTitle = React69.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
7203
7254
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
7204
7255
|
"className"
|
|
7205
7256
|
]);
|
|
7206
|
-
return
|
|
7257
|
+
return React69.createElement(DialogPrimitive.Title, _object_spread({
|
|
7207
7258
|
ref: ref,
|
|
7208
7259
|
className: cn("text-lg font-semibold leading-none tracking-tight", className)
|
|
7209
7260
|
}, props));
|
|
7210
7261
|
});
|
|
7211
7262
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
7212
|
-
var DialogDescription =
|
|
7263
|
+
var DialogDescription = React69.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
7213
7264
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
7214
7265
|
"className"
|
|
7215
7266
|
]);
|
|
7216
|
-
return
|
|
7267
|
+
return React69.createElement(DialogPrimitive.Description, _object_spread({
|
|
7217
7268
|
ref: ref,
|
|
7218
7269
|
className: cn("text-sm text-muted-foreground", className)
|
|
7219
7270
|
}, props));
|
|
7220
7271
|
});
|
|
7221
7272
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
7222
7273
|
// src/layout/Box.tsx
|
|
7223
|
-
var
|
|
7274
|
+
var import_react57 = __toESM(require("react"));
|
|
7224
7275
|
var Box = function(props) {
|
|
7225
|
-
return /* @__PURE__ */
|
|
7276
|
+
return /* @__PURE__ */ import_react57.default.createElement("div", null, props.children);
|
|
7226
7277
|
};
|
|
7227
7278
|
// src/layout/HawaBottomAppBar.tsx
|
|
7228
|
-
var
|
|
7279
|
+
var import_react58 = __toESM(require("react"));
|
|
7229
7280
|
var HawaBottomAppBar = function(props) {
|
|
7230
|
-
return /* @__PURE__ */
|
|
7281
|
+
return /* @__PURE__ */ import_react58.default.createElement("div", {
|
|
7231
7282
|
className: "fixed bottom-0 top-auto left-0 m-0 w-full max-w-full p-1"
|
|
7232
|
-
}, /* @__PURE__ */
|
|
7283
|
+
}, /* @__PURE__ */ import_react58.default.createElement("div", {
|
|
7233
7284
|
className: "flex w-full flex-row items-center justify-evenly rounded bg-gray-200"
|
|
7234
7285
|
}, props.appBarContent.map(function(singleContent, i) {
|
|
7235
|
-
return /* @__PURE__ */
|
|
7286
|
+
return /* @__PURE__ */ import_react58.default.createElement("div", {
|
|
7236
7287
|
key: i,
|
|
7237
7288
|
className: "m-1 flex h-full w-full flex-col items-center justify-center rounded p-2 transition-all hover:cursor-pointer hover:bg-buttonPrimary-700 hover:text-white",
|
|
7238
7289
|
onClick: singleContent.action
|
|
7239
|
-
}, /* @__PURE__ */
|
|
7290
|
+
}, /* @__PURE__ */ import_react58.default.createElement("div", null, singleContent.icon), /* @__PURE__ */ import_react58.default.createElement("div", {
|
|
7240
7291
|
className: "mt-2 text-sm"
|
|
7241
7292
|
}, singleContent.label));
|
|
7242
7293
|
})));
|
|
7243
7294
|
};
|
|
7244
7295
|
// src/layout/HawaSiteLayout.tsx
|
|
7245
|
-
var
|
|
7296
|
+
var import_react61 = __toESM(require("react"));
|
|
7246
7297
|
var import_clsx27 = __toESM(require("clsx"));
|
|
7247
7298
|
// src/hooks/useDiscloser.ts
|
|
7248
|
-
var
|
|
7299
|
+
var import_react59 = require("react");
|
|
7249
7300
|
var useDiscloser = function() {
|
|
7250
7301
|
var value = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
7251
|
-
var _ref = _sliced_to_array((0,
|
|
7302
|
+
var _ref = _sliced_to_array((0, import_react59.useState)(value), 2), open = _ref[0], setOpen = _ref[1];
|
|
7252
7303
|
var onOpen = function() {
|
|
7253
7304
|
return setOpen(true);
|
|
7254
7305
|
};
|
|
@@ -7263,15 +7314,15 @@ var useDiscloser = function() {
|
|
|
7263
7314
|
};
|
|
7264
7315
|
var useDiscloser_default = useDiscloser;
|
|
7265
7316
|
// src/hooks/useBreakpoint.ts
|
|
7266
|
-
var
|
|
7317
|
+
var import_react60 = require("react");
|
|
7267
7318
|
var useBreakpoint = function() {
|
|
7268
7319
|
var _window;
|
|
7269
|
-
var _ref = _sliced_to_array((0,
|
|
7320
|
+
var _ref = _sliced_to_array((0, import_react60.useState)((_window = window) === null || _window === void 0 ? void 0 : _window.innerWidth), 2), breakpoint = _ref[0], setBreakpoint = _ref[1];
|
|
7270
7321
|
var resize = function() {
|
|
7271
7322
|
var _window;
|
|
7272
7323
|
setBreakpoint((_window = window) === null || _window === void 0 ? void 0 : _window.innerWidth);
|
|
7273
7324
|
};
|
|
7274
|
-
(0,
|
|
7325
|
+
(0, import_react60.useEffect)(function() {
|
|
7275
7326
|
if (typeof window !== "undefined") {
|
|
7276
7327
|
var _window;
|
|
7277
7328
|
(_window = window) === null || _window === void 0 ? void 0 : _window.addEventListener("resize", resize);
|
|
@@ -7291,19 +7342,19 @@ var HawaSiteLayout = function(_param) {
|
|
|
7291
7342
|
"navigationSize"
|
|
7292
7343
|
]);
|
|
7293
7344
|
var _props_navItems;
|
|
7294
|
-
var _ref = _sliced_to_array((0,
|
|
7295
|
-
var _ref1 = _sliced_to_array((0,
|
|
7345
|
+
var _ref = _sliced_to_array((0, import_react61.useState)(false), 2), openSideMenu = _ref[0], setOpenSideMenu = _ref[1];
|
|
7346
|
+
var _ref1 = _sliced_to_array((0, import_react61.useState)(false), 2), openSubItem = _ref1[0], setOpenSubItem = _ref1[1];
|
|
7296
7347
|
var _useDiscloser_default = useDiscloser_default(false), isOpen = _useDiscloser_default.isOpen, onClose = _useDiscloser_default.onClose, onOpen = _useDiscloser_default.onOpen;
|
|
7297
|
-
var ref = (0,
|
|
7298
|
-
var drawerItemRef = (0,
|
|
7348
|
+
var ref = (0, import_react61.useRef)(null);
|
|
7349
|
+
var drawerItemRef = (0, import_react61.useRef)(null);
|
|
7299
7350
|
var size;
|
|
7300
7351
|
if (typeof window !== "undefined") {
|
|
7301
7352
|
size = useBreakpoint_default();
|
|
7302
7353
|
} else {
|
|
7303
7354
|
size = 1200;
|
|
7304
7355
|
}
|
|
7305
|
-
var _ref2 = _sliced_to_array((0,
|
|
7306
|
-
(0,
|
|
7356
|
+
var _ref2 = _sliced_to_array((0, import_react61.useState)(false), 2), keepOpen = _ref2[0], setKeepOpen = _ref2[1];
|
|
7357
|
+
(0, import_react61.useEffect)(function() {
|
|
7307
7358
|
var handleClickOutside = function(event) {
|
|
7308
7359
|
if (ref.current && !ref.current.contains(event.target) && !keepOpen) {
|
|
7309
7360
|
setOpenSideMenu(false);
|
|
@@ -7333,30 +7384,30 @@ var HawaSiteLayout = function(_param) {
|
|
|
7333
7384
|
};
|
|
7334
7385
|
var ltrChildrenStyle = [];
|
|
7335
7386
|
var rtlChildrenStyle = [];
|
|
7336
|
-
return /* @__PURE__ */
|
|
7387
|
+
return /* @__PURE__ */ import_react61.default.createElement("div", {
|
|
7337
7388
|
className: "h-full w-full"
|
|
7338
|
-
}, /* @__PURE__ */
|
|
7389
|
+
}, /* @__PURE__ */ import_react61.default.createElement("div", {
|
|
7339
7390
|
className: (0, import_clsx27.default)("z-30 flex w-auto select-none flex-row items-start justify-between bg-layoutPrimary-500 transition-all", navigationSizeStyles[navigationSize], "rounded p-3 ", openSideMenu ? "h-44" : "h-14", // props.floating ? "rounded-[30px]" : "rounded",
|
|
7340
7391
|
props.stickyNav ? "fixed left-4 right-4 top-4" : "", direction === "rtl" ? "flex-row" : "flex-row-reverse")
|
|
7341
|
-
}, size > 600 ? /* @__PURE__ */
|
|
7392
|
+
}, size > 600 ? /* @__PURE__ */ import_react61.default.createElement("div", {
|
|
7342
7393
|
className: "flex flex-row h-8 items-center gap-4 px-3"
|
|
7343
7394
|
}, (_props_navItems = props.navItems) === null || _props_navItems === void 0 ? void 0 : _props_navItems.map(function(param, i) {
|
|
7344
7395
|
var label = param.label;
|
|
7345
|
-
return /* @__PURE__ */
|
|
7396
|
+
return /* @__PURE__ */ import_react61.default.createElement("div", {
|
|
7346
7397
|
onClick: function() {
|
|
7347
7398
|
return setOpenSideMenu(!openSideMenu);
|
|
7348
7399
|
},
|
|
7349
7400
|
key: i,
|
|
7350
7401
|
className: "cursor-pointer rounded bg-none text-gray-600 transition-all hover:text-black"
|
|
7351
7402
|
}, label);
|
|
7352
|
-
})) : /* @__PURE__ */
|
|
7403
|
+
})) : /* @__PURE__ */ import_react61.default.createElement("div", {
|
|
7353
7404
|
className: "flex items-center justify-center"
|
|
7354
|
-
}, /* @__PURE__ */
|
|
7405
|
+
}, /* @__PURE__ */ import_react61.default.createElement("div", {
|
|
7355
7406
|
onClick: function() {
|
|
7356
7407
|
return setOpenSideMenu(!openSideMenu);
|
|
7357
7408
|
},
|
|
7358
7409
|
className: "cursor-pointer rounded p-1 transition-all hover:bg-gray-100"
|
|
7359
|
-
}, /* @__PURE__ */
|
|
7410
|
+
}, /* @__PURE__ */ import_react61.default.createElement("svg", {
|
|
7360
7411
|
stroke: "currentColor",
|
|
7361
7412
|
fill: "currentColor",
|
|
7362
7413
|
strokeWidth: "0",
|
|
@@ -7364,49 +7415,49 @@ var HawaSiteLayout = function(_param) {
|
|
|
7364
7415
|
"aria-hidden": "true",
|
|
7365
7416
|
height: "1.6em",
|
|
7366
7417
|
width: "1.6em"
|
|
7367
|
-
}, /* @__PURE__ */
|
|
7418
|
+
}, /* @__PURE__ */ import_react61.default.createElement("path", {
|
|
7368
7419
|
fillRule: "evenodd",
|
|
7369
7420
|
d: "M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",
|
|
7370
7421
|
clipRule: "evenodd"
|
|
7371
|
-
})), " "), props.pageTitle ? /* @__PURE__ */
|
|
7422
|
+
})), " "), props.pageTitle ? /* @__PURE__ */ import_react61.default.createElement("div", null, props.pageTitle) : /* @__PURE__ */ import_react61.default.createElement("div", null)), /* @__PURE__ */ import_react61.default.createElement("div", {
|
|
7372
7423
|
className: "h-full"
|
|
7373
|
-
}, /* @__PURE__ */
|
|
7424
|
+
}, /* @__PURE__ */ import_react61.default.createElement("img", {
|
|
7374
7425
|
className: "h-full max-h-8 ",
|
|
7375
7426
|
src: "https://sikka-images.s3.ap-southeast-1.amazonaws.com/seera/seera-horizontal-wordmark-".concat(direction === "rtl" ? "ar" : "en", "-white.svg")
|
|
7376
|
-
}))), /* @__PURE__ */
|
|
7427
|
+
}))), /* @__PURE__ */ import_react61.default.createElement("div", {
|
|
7377
7428
|
className: (0, import_clsx27.default)(" relative top-14")
|
|
7378
7429
|
}, props.children));
|
|
7379
7430
|
};
|
|
7380
7431
|
// src/layout/AppLayout.tsx
|
|
7381
|
-
var
|
|
7432
|
+
var import_react62 = __toESM(require("react"));
|
|
7382
7433
|
var import_clsx28 = __toESM(require("clsx"));
|
|
7383
7434
|
// src/layout/Sidebar.tsx
|
|
7384
|
-
var
|
|
7435
|
+
var React75 = __toESM(require("react"));
|
|
7385
7436
|
var AccordionPrimitive = __toESM(require("@radix-ui/react-accordion"));
|
|
7386
7437
|
var Accordion = AccordionPrimitive.Root;
|
|
7387
7438
|
var triggerStyles = "flex flex-1 items-center select-none cursor-pointer bg-primary-foreground rounded justify-between p-2 px-3 font-medium transition-all [&[data-state=open]>svg]:-rotate-90";
|
|
7388
|
-
var AccordionItem =
|
|
7439
|
+
var AccordionItem = React75.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
7389
7440
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
7390
7441
|
"className"
|
|
7391
7442
|
]);
|
|
7392
|
-
return
|
|
7443
|
+
return React75.createElement(AccordionPrimitive.Item, _object_spread({
|
|
7393
7444
|
ref: ref,
|
|
7394
7445
|
className: cn(className)
|
|
7395
7446
|
}, props));
|
|
7396
7447
|
});
|
|
7397
7448
|
AccordionItem.displayName = "AccordionItem";
|
|
7398
|
-
var AccordionTrigger =
|
|
7449
|
+
var AccordionTrigger = React75.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
7399
7450
|
var className = _param.className, showArrow = _param.showArrow, children = _param.children, props = _object_without_properties(_param, [
|
|
7400
7451
|
"className",
|
|
7401
7452
|
"showArrow",
|
|
7402
7453
|
"children"
|
|
7403
7454
|
]);
|
|
7404
|
-
return
|
|
7455
|
+
return React75.createElement(AccordionPrimitive.Header, {
|
|
7405
7456
|
className: "flex"
|
|
7406
|
-
}, /* @__PURE__ */
|
|
7457
|
+
}, /* @__PURE__ */ React75.createElement(AccordionPrimitive.Trigger, _object_spread({
|
|
7407
7458
|
ref: ref,
|
|
7408
7459
|
className: cn(triggerStyles, className)
|
|
7409
|
-
}, props), children, showArrow && /* @__PURE__ */
|
|
7460
|
+
}, props), children, showArrow && /* @__PURE__ */ React75.createElement("svg", {
|
|
7410
7461
|
"aria-label": "Chevron Right Icon",
|
|
7411
7462
|
stroke: "currentColor",
|
|
7412
7463
|
fill: "currentColor",
|
|
@@ -7414,29 +7465,29 @@ var AccordionTrigger = React74.forwardRef(function(_param, ref) /* @__PURE__ */
|
|
|
7414
7465
|
height: "1em",
|
|
7415
7466
|
width: "1em",
|
|
7416
7467
|
className: "h-4 w-4 shrink-0 rotate-90 transition-transform duration-200"
|
|
7417
|
-
}, /* @__PURE__ */
|
|
7468
|
+
}, /* @__PURE__ */ React75.createElement("path", {
|
|
7418
7469
|
d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"
|
|
7419
7470
|
}))));
|
|
7420
7471
|
});
|
|
7421
7472
|
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
7422
|
-
var AccordionContent =
|
|
7473
|
+
var AccordionContent = React75.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
7423
7474
|
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
7424
7475
|
"className",
|
|
7425
7476
|
"children"
|
|
7426
7477
|
]);
|
|
7427
|
-
return
|
|
7478
|
+
return React75.createElement(AccordionPrimitive.Content, _object_spread({
|
|
7428
7479
|
ref: ref,
|
|
7429
7480
|
className: cn("overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down", className)
|
|
7430
|
-
}, props), /* @__PURE__ */
|
|
7481
|
+
}, props), /* @__PURE__ */ React75.createElement("div", null, children));
|
|
7431
7482
|
});
|
|
7432
7483
|
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
7433
7484
|
var SidebarGroup = function(param) {
|
|
7434
7485
|
var title = param.title, items = param.items, selectedItem = param.selectedItem, openedItem = param.openedItem, setOpenedItem = param.setOpenedItem, onItemClick = param.onItemClick, onSubItemClick = param.onSubItemClick, direction = param.direction, isOpen = param.isOpen;
|
|
7435
|
-
return /* @__PURE__ */
|
|
7486
|
+
return /* @__PURE__ */ React75.createElement("div", null, title && /* @__PURE__ */ React75.createElement("h3", {
|
|
7436
7487
|
className: "mb-1 font-bold"
|
|
7437
|
-
}, title), /* @__PURE__ */
|
|
7488
|
+
}, title), /* @__PURE__ */ React75.createElement("ul", {
|
|
7438
7489
|
className: "flex flex-col gap-2"
|
|
7439
|
-
}, /* @__PURE__ */
|
|
7490
|
+
}, /* @__PURE__ */ React75.createElement(Accordion, {
|
|
7440
7491
|
value: openedItem,
|
|
7441
7492
|
type: "single",
|
|
7442
7493
|
onValueChange: function(e) {
|
|
@@ -7445,7 +7496,7 @@ var SidebarGroup = function(param) {
|
|
|
7445
7496
|
collapsible: true,
|
|
7446
7497
|
className: "flex flex-col gap-1"
|
|
7447
7498
|
}, items.map(function(item, idx) {
|
|
7448
|
-
return /* @__PURE__ */
|
|
7499
|
+
return /* @__PURE__ */ React75.createElement(SidebarItem, {
|
|
7449
7500
|
isOpen: isOpen,
|
|
7450
7501
|
isSelected: selectedItem,
|
|
7451
7502
|
key: idx,
|
|
@@ -7462,23 +7513,23 @@ var SidebarItem = function(param) {
|
|
|
7462
7513
|
return isSelected && isSelected[index] === value ? "bg-primary text-primary-foreground cursor-default" : "hover:bg-primary/10";
|
|
7463
7514
|
};
|
|
7464
7515
|
if (item.subitems) {
|
|
7465
|
-
return /* @__PURE__ */
|
|
7516
|
+
return /* @__PURE__ */ React75.createElement(AccordionItem, {
|
|
7466
7517
|
value: item.value,
|
|
7467
7518
|
className: "overflow-x-clip",
|
|
7468
7519
|
dir: direction
|
|
7469
|
-
}, /* @__PURE__ */
|
|
7520
|
+
}, /* @__PURE__ */ React75.createElement(AccordionTrigger, {
|
|
7470
7521
|
className: cn(getSelectedStyle(item.value, 0)),
|
|
7471
7522
|
showArrow: isOpen
|
|
7472
|
-
}, /* @__PURE__ */
|
|
7523
|
+
}, /* @__PURE__ */ React75.createElement("div", {
|
|
7473
7524
|
className: cn(!isOpen && "py-1", "flex w-fit flex-row items-center gap-2")
|
|
7474
|
-
}, item.icon, isOpen && /* @__PURE__ */
|
|
7525
|
+
}, item.icon, isOpen && /* @__PURE__ */ React75.createElement("span", {
|
|
7475
7526
|
className: cn("transition-all ", isOpen ? "opacity-100" : "opacity-0")
|
|
7476
|
-
}, item.label))), item.subitems && /* @__PURE__ */
|
|
7527
|
+
}, item.label))), item.subitems && /* @__PURE__ */ React75.createElement(AccordionContent, {
|
|
7477
7528
|
className: " mt-1 h-full rounded "
|
|
7478
|
-
}, /* @__PURE__ */
|
|
7529
|
+
}, /* @__PURE__ */ React75.createElement("div", {
|
|
7479
7530
|
className: cn("flex h-full flex-col gap-2 bg-foreground/5 p-1")
|
|
7480
7531
|
}, item.subitems.map(function(subitem, idx) {
|
|
7481
|
-
return /* @__PURE__ */
|
|
7532
|
+
return /* @__PURE__ */ React75.createElement("li", {
|
|
7482
7533
|
key: idx,
|
|
7483
7534
|
onClick: function(e) {
|
|
7484
7535
|
e.stopPropagation();
|
|
@@ -7493,7 +7544,7 @@ var SidebarItem = function(param) {
|
|
|
7493
7544
|
}, subitem.icon, subitem.label);
|
|
7494
7545
|
}))));
|
|
7495
7546
|
} else {
|
|
7496
|
-
return /* @__PURE__ */
|
|
7547
|
+
return /* @__PURE__ */ React75.createElement("div", {
|
|
7497
7548
|
dir: direction,
|
|
7498
7549
|
onClick: function() {
|
|
7499
7550
|
if (onItemClick) {
|
|
@@ -7503,9 +7554,9 @@ var SidebarItem = function(param) {
|
|
|
7503
7554
|
}
|
|
7504
7555
|
},
|
|
7505
7556
|
className: cn(triggerStyles, getSelectedStyle(item.value, 0), "overflow-x-clip ")
|
|
7506
|
-
}, /* @__PURE__ */
|
|
7557
|
+
}, /* @__PURE__ */ React75.createElement("div", {
|
|
7507
7558
|
className: "flex flex-row items-center gap-2 "
|
|
7508
|
-
}, item.icon, /* @__PURE__ */
|
|
7559
|
+
}, item.icon, /* @__PURE__ */ React75.createElement("span", {
|
|
7509
7560
|
className: cn("whitespace-nowrap transition-all", isOpen ? "opacity-100" : "opacity-0")
|
|
7510
7561
|
}, item.label)));
|
|
7511
7562
|
}
|
|
@@ -7536,20 +7587,20 @@ var AppLayout = function(_param) {
|
|
|
7536
7587
|
lg: closeDrawerWidth
|
|
7537
7588
|
}
|
|
7538
7589
|
};
|
|
7539
|
-
var ref = (0,
|
|
7590
|
+
var ref = (0, import_react62.useRef)(null);
|
|
7540
7591
|
var isRTL = direction === "rtl";
|
|
7541
|
-
var _ref = _sliced_to_array((0,
|
|
7542
|
-
var _ref1 = _sliced_to_array((0,
|
|
7592
|
+
var _ref = _sliced_to_array((0, import_react62.useState)(""), 2), openedSidebarItem = _ref[0], setOpenedSidebarItem = _ref[1];
|
|
7593
|
+
var _ref1 = _sliced_to_array((0, import_react62.useState)(currentPage ? currentPage : []), 2), selectedItem = _ref1[0], setSelectedItem = _ref1[1];
|
|
7543
7594
|
var size;
|
|
7544
7595
|
if (typeof window !== "undefined") {
|
|
7545
7596
|
size = useBreakpoint_default();
|
|
7546
7597
|
} else {
|
|
7547
7598
|
size = 1200;
|
|
7548
7599
|
}
|
|
7549
|
-
var _ref2 = _sliced_to_array((0,
|
|
7550
|
-
var _ref3 = _sliced_to_array((0,
|
|
7600
|
+
var _ref2 = _sliced_to_array((0, import_react62.useState)(size > 600 ? true : false), 2), keepOpen = _ref2[0], setKeepOpen = _ref2[1];
|
|
7601
|
+
var _ref3 = _sliced_to_array((0, import_react62.useState)(size > 600 ? true : false), 2), openSideMenu = _ref3[0], setOpenSideMenu = _ref3[1];
|
|
7551
7602
|
var drawerSizeCondition = size > 600 ? drawerSizeStyle[keepOpen ? "opened" : "closed"][drawerSize] : 0;
|
|
7552
|
-
(0,
|
|
7603
|
+
(0, import_react62.useEffect)(function() {
|
|
7553
7604
|
var handleClickOutside = function(event) {
|
|
7554
7605
|
if (ref.current && !ref.current.contains(event.target) && !keepOpen) {
|
|
7555
7606
|
setOpenSideMenu(false);
|
|
@@ -7562,11 +7613,11 @@ var AppLayout = function(_param) {
|
|
|
7562
7613
|
}, [
|
|
7563
7614
|
keepOpen
|
|
7564
7615
|
]);
|
|
7565
|
-
return /* @__PURE__ */
|
|
7616
|
+
return /* @__PURE__ */ import_react62.default.createElement("div", {
|
|
7566
7617
|
className: "fixed left-0"
|
|
7567
|
-
}, props.topBar && /* @__PURE__ */
|
|
7618
|
+
}, props.topBar && /* @__PURE__ */ import_react62.default.createElement("div", {
|
|
7568
7619
|
className: (0, import_clsx28.default)("fixed left-0 right-0 top-0 z-30 flex h-14 w-full items-center justify-between bg-primary-foreground p-2", isRTL ? "flex-row-reverse" : "flex-row")
|
|
7569
|
-
}, size > 600 ? /* @__PURE__ */
|
|
7620
|
+
}, size > 600 ? /* @__PURE__ */ import_react62.default.createElement("div", {
|
|
7570
7621
|
className: (0, import_clsx28.default)("dark:text-white", isRTL ? [
|
|
7571
7622
|
size > 600 ? "mr-14" : "mr-2",
|
|
7572
7623
|
keepOpen ? "mr-40" : ""
|
|
@@ -7580,15 +7631,15 @@ var AppLayout = function(_param) {
|
|
|
7580
7631
|
marginLeft: "".concat(drawerSizeStyle[keepOpen ? "opened" : "closed"][drawerSize], "px")
|
|
7581
7632
|
}
|
|
7582
7633
|
}, props.pageTitle) : // Mobile Drawer Menu Button
|
|
7583
|
-
/* @__PURE__ */
|
|
7634
|
+
/* @__PURE__ */ import_react62.default.createElement("div", {
|
|
7584
7635
|
dir: direction,
|
|
7585
7636
|
className: "flex items-center justify-center gap-0.5"
|
|
7586
|
-
}, /* @__PURE__ */
|
|
7637
|
+
}, /* @__PURE__ */ import_react62.default.createElement("div", {
|
|
7587
7638
|
onClick: function() {
|
|
7588
7639
|
return setOpenSideMenu(true);
|
|
7589
7640
|
},
|
|
7590
7641
|
className: "z-40 mx-1 cursor-pointer rounded p-2 transition-all hover:bg-gray-100"
|
|
7591
|
-
}, /* @__PURE__ */
|
|
7642
|
+
}, /* @__PURE__ */ import_react62.default.createElement("svg", {
|
|
7592
7643
|
stroke: "currentColor",
|
|
7593
7644
|
fill: "currentColor",
|
|
7594
7645
|
strokeWidth: 0,
|
|
@@ -7596,36 +7647,36 @@ var AppLayout = function(_param) {
|
|
|
7596
7647
|
"aria-hidden": "true",
|
|
7597
7648
|
height: "1.6em",
|
|
7598
7649
|
width: "1.6em"
|
|
7599
|
-
}, /* @__PURE__ */
|
|
7650
|
+
}, /* @__PURE__ */ import_react62.default.createElement("path", {
|
|
7600
7651
|
fillRule: "evenodd",
|
|
7601
7652
|
clipRule: "evenodd",
|
|
7602
7653
|
d: "M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
|
|
7603
|
-
}))), props.pageTitle ? /* @__PURE__ */
|
|
7654
|
+
}))), props.pageTitle ? /* @__PURE__ */ import_react62.default.createElement("div", {
|
|
7604
7655
|
className: "text-sm"
|
|
7605
|
-
}, props.pageTitle) : /* @__PURE__ */
|
|
7656
|
+
}, props.pageTitle) : /* @__PURE__ */ import_react62.default.createElement("div", null)), /* @__PURE__ */ import_react62.default.createElement("div", {
|
|
7606
7657
|
className: (0, import_clsx28.default)("flex gap-2 dark:text-white", isRTL ? "flex-row-reverse" : "flex-row")
|
|
7607
|
-
}, size > 600 ? /* @__PURE__ */
|
|
7658
|
+
}, size > 600 ? /* @__PURE__ */ import_react62.default.createElement("div", {
|
|
7608
7659
|
className: isRTL ? "text-left text-xs" : "text-right text-xs"
|
|
7609
|
-
}, /* @__PURE__ */
|
|
7660
|
+
}, /* @__PURE__ */ import_react62.default.createElement("div", {
|
|
7610
7661
|
className: "font-bold"
|
|
7611
|
-
}, props.username), " ", /* @__PURE__ */
|
|
7662
|
+
}, props.username), " ", /* @__PURE__ */ import_react62.default.createElement("div", null, props.email)) : null, /* @__PURE__ */ import_react62.default.createElement(DropdownMenu, {
|
|
7612
7663
|
triggerClassname: "mx-2",
|
|
7613
7664
|
align: "end",
|
|
7614
7665
|
alignOffset: 8,
|
|
7615
7666
|
side: "bottom",
|
|
7616
7667
|
sideOffset: 5,
|
|
7617
7668
|
direction: isRTL ? "rtl" : "ltr",
|
|
7618
|
-
trigger: /* @__PURE__ */
|
|
7669
|
+
trigger: /* @__PURE__ */ import_react62.default.createElement("div", {
|
|
7619
7670
|
className: "relative h-8 w-8 cursor-pointer overflow-clip rounded ring-1 ring-primary/30 dark:bg-gray-600"
|
|
7620
|
-
}, props.avatarImage ? /* @__PURE__ */
|
|
7671
|
+
}, props.avatarImage ? /* @__PURE__ */ import_react62.default.createElement("img", {
|
|
7621
7672
|
src: props.avatarImage,
|
|
7622
7673
|
alt: "User Avatar"
|
|
7623
|
-
}) : /* @__PURE__ */
|
|
7674
|
+
}) : /* @__PURE__ */ import_react62.default.createElement("svg", {
|
|
7624
7675
|
"aria-label": "Avatar Icon",
|
|
7625
7676
|
className: "absolute -left-1 h-10 w-10 text-gray-400",
|
|
7626
7677
|
fill: "currentColor",
|
|
7627
7678
|
viewBox: "0 0 20 20"
|
|
7628
|
-
}, /* @__PURE__ */
|
|
7679
|
+
}, /* @__PURE__ */ import_react62.default.createElement("path", {
|
|
7629
7680
|
fillRule: "evenodd",
|
|
7630
7681
|
d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
|
|
7631
7682
|
clipRule: "evenodd"
|
|
@@ -7634,7 +7685,7 @@ var AppLayout = function(_param) {
|
|
|
7634
7685
|
onItemSelect: function(e) {
|
|
7635
7686
|
return console.log("selecting item ", e);
|
|
7636
7687
|
}
|
|
7637
|
-
}))), /* @__PURE__ */
|
|
7688
|
+
}))), /* @__PURE__ */ import_react62.default.createElement("div", {
|
|
7638
7689
|
className: (0, import_clsx28.default)("fixed z-40 flex flex-col justify-between overflow-x-clip transition-all", design === "floating" ? isRTL ? "right-5 top-5" : "bottom-5 left-5 top-5" : isRTL ? "right-0 top-0 h-full" : "left-0 top-0 h-full"),
|
|
7639
7690
|
style: {
|
|
7640
7691
|
width: size > 600 ? openSideMenu ? "".concat(drawerSizeStyle["opened"][drawerSize], "px") : "".concat(drawerSizeStyle["closed"][drawerSize], "px") : openSideMenu ? "".concat(drawerSizeStyle["opened"][drawerSize], "px") : "0px"
|
|
@@ -7651,26 +7702,26 @@ var AppLayout = function(_param) {
|
|
|
7651
7702
|
}
|
|
7652
7703
|
},
|
|
7653
7704
|
ref: ref
|
|
7654
|
-
}, /* @__PURE__ */
|
|
7705
|
+
}, /* @__PURE__ */ import_react62.default.createElement("div", {
|
|
7655
7706
|
dir: direction,
|
|
7656
7707
|
className: (0, import_clsx28.default)("fixed z-50 mb-2 flex h-14 w-full flex-row items-center justify-center transition-all", "bg-primary-foreground"),
|
|
7657
7708
|
style: {
|
|
7658
7709
|
width: size > 600 ? "".concat(openSideMenu ? openDrawerWidth : 56, "px") : "".concat(openSideMenu ? openDrawerWidth : 0, "px")
|
|
7659
7710
|
}
|
|
7660
|
-
}, /* @__PURE__ */
|
|
7711
|
+
}, /* @__PURE__ */ import_react62.default.createElement("img", {
|
|
7661
7712
|
className: (0, import_clsx28.default)("h-9 opacity-0 transition-all", !openSideMenu ? "invisible opacity-0" : "visible opacity-100"),
|
|
7662
7713
|
src: props.logoLink
|
|
7663
|
-
}), size > 600 ? /* @__PURE__ */
|
|
7714
|
+
}), size > 600 ? /* @__PURE__ */ import_react62.default.createElement("img", {
|
|
7664
7715
|
className: (0, import_clsx28.default)("fixed h-9 transition-all", // isRTL ? "right-2.5" : "left-2.5",
|
|
7665
7716
|
design === "floating" ? isRTL ? "right-7.5 top-7" : "left-7.5 top-7" : isRTL ? "right-2.5 top-2.5" : "left-2.5 top-2.5", openSideMenu ? "invisible opacity-0" : "visible opacity-100"),
|
|
7666
7717
|
src: props.logoSymbol
|
|
7667
|
-
}) : null), /* @__PURE__ */
|
|
7718
|
+
}) : null), /* @__PURE__ */ import_react62.default.createElement("div", {
|
|
7668
7719
|
className: (0, import_clsx28.default)("fixed bottom-14 bg-primary-foreground p-2 py-2 transition-all", design === "floating" ? "top-[76px]" : "top-14", openSideMenu ? "overflow-auto" : "overflow-hidden"),
|
|
7669
7720
|
style: {
|
|
7670
7721
|
height: design === "floating" ? "calc(100% - 152px)" : "calc(100% - 112px)",
|
|
7671
7722
|
width: size > 600 ? "".concat(openSideMenu ? openDrawerWidth : 56, "px") : "".concat(openSideMenu ? openDrawerWidth : 0, "px")
|
|
7672
7723
|
}
|
|
7673
|
-
}, /* @__PURE__ */
|
|
7724
|
+
}, /* @__PURE__ */ import_react62.default.createElement(SidebarGroup, {
|
|
7674
7725
|
direction: direction,
|
|
7675
7726
|
onItemClick: function(values) {
|
|
7676
7727
|
setSelectedItem(values);
|
|
@@ -7687,30 +7738,30 @@ var AppLayout = function(_param) {
|
|
|
7687
7738
|
},
|
|
7688
7739
|
isOpen: openSideMenu,
|
|
7689
7740
|
items: props.drawerItems
|
|
7690
|
-
})), /* @__PURE__ */
|
|
7741
|
+
})), /* @__PURE__ */ import_react62.default.createElement("div", {
|
|
7691
7742
|
className: (0, import_clsx28.default)("fixed flex h-14 w-full items-center justify-center gap-2 overflow-clip bg-primary-foreground transition-all", direction === "rtl" ? "flex-row-reverse" : "flex-row", design === "floating" ? "bottom-5" : "bottom-0"),
|
|
7692
7743
|
style: {
|
|
7693
7744
|
width: size > 600 ? "".concat(openSideMenu ? openDrawerWidth : 56, "px") : "".concat(openSideMenu ? openDrawerWidth : 0, "px")
|
|
7694
7745
|
}
|
|
7695
|
-
}, DrawerFooterActions && openSideMenu ? /* @__PURE__ */
|
|
7746
|
+
}, DrawerFooterActions && openSideMenu ? /* @__PURE__ */ import_react62.default.createElement(import_react62.default.Fragment, null, DrawerFooterActions) : null, size > 600 && openSideMenu ? /* @__PURE__ */ import_react62.default.createElement(Tooltip, {
|
|
7696
7747
|
side: "left",
|
|
7697
7748
|
delayDuration: 500,
|
|
7698
7749
|
content: keepOpen ? ((_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.collapseSidebar) || "Collapse Sidebar" : ((_props_texts1 = props.texts) === null || _props_texts1 === void 0 ? void 0 : _props_texts1.expandSidebar) || "Expand Sidebar"
|
|
7699
|
-
}, /* @__PURE__ */
|
|
7750
|
+
}, /* @__PURE__ */ import_react62.default.createElement(Button, {
|
|
7700
7751
|
variant: "light",
|
|
7701
7752
|
onClick: function() {
|
|
7702
7753
|
return setKeepOpen(!keepOpen);
|
|
7703
7754
|
},
|
|
7704
7755
|
size: "smallIcon"
|
|
7705
|
-
}, /* @__PURE__ */
|
|
7756
|
+
}, /* @__PURE__ */ import_react62.default.createElement("svg", {
|
|
7706
7757
|
className: (0, import_clsx28.default)("h-6 w-6 shrink-0 text-primary transition-all disabled:bg-gray-200 ", keepOpen ? isRTL ? "-rotate-90" : "rotate-90" : isRTL ? "rotate-90" : "-rotate-90"),
|
|
7707
7758
|
fill: "currentColor",
|
|
7708
7759
|
viewBox: "0 0 20 20"
|
|
7709
|
-
}, /* @__PURE__ */
|
|
7760
|
+
}, /* @__PURE__ */ import_react62.default.createElement("path", {
|
|
7710
7761
|
fillRule: "evenodd",
|
|
7711
7762
|
d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",
|
|
7712
7763
|
clipRule: "evenodd"
|
|
7713
|
-
})))) : null)), /* @__PURE__ */
|
|
7764
|
+
})))) : null)), /* @__PURE__ */ import_react62.default.createElement("div", {
|
|
7714
7765
|
className: "fixed overflow-y-auto transition-all",
|
|
7715
7766
|
style: design === "floating" ? isRTL ? {
|
|
7716
7767
|
height: "calc(100% - ".concat(props.topBar ? "56" : "0", "px)"),
|
|
@@ -7736,7 +7787,7 @@ var AppLayout = function(_param) {
|
|
|
7736
7787
|
}, props.children));
|
|
7737
7788
|
};
|
|
7738
7789
|
// src/layout/HawaAppLayout.tsx
|
|
7739
|
-
var
|
|
7790
|
+
var import_react63 = __toESM(require("react"));
|
|
7740
7791
|
var import_clsx29 = __toESM(require("clsx"));
|
|
7741
7792
|
var import_fa = require("react-icons/fa");
|
|
7742
7793
|
var HawaAppLayout = function(_param) {
|
|
@@ -7746,11 +7797,11 @@ var HawaAppLayout = function(_param) {
|
|
|
7746
7797
|
"onSettingsClick"
|
|
7747
7798
|
]);
|
|
7748
7799
|
var _props_drawerItems;
|
|
7749
|
-
var _ref = _sliced_to_array((0,
|
|
7750
|
-
var _ref1 = _sliced_to_array((0,
|
|
7800
|
+
var _ref = _sliced_to_array((0, import_react63.useState)(false), 2), openSideMenu = _ref[0], setOpenSideMenu = _ref[1];
|
|
7801
|
+
var _ref1 = _sliced_to_array((0, import_react63.useState)(""), 2), openSubItem = _ref1[0], setOpenSubitem = _ref1[1];
|
|
7751
7802
|
var _useDiscloser_default = useDiscloser_default(false), isOpen = _useDiscloser_default.isOpen, onClose = _useDiscloser_default.onClose, onOpen = _useDiscloser_default.onOpen;
|
|
7752
|
-
var _ref2 = _sliced_to_array((0,
|
|
7753
|
-
var ref = (0,
|
|
7803
|
+
var _ref2 = _sliced_to_array((0, import_react63.useState)(false), 2), keepOpen = _ref2[0], setKeepOpen = _ref2[1];
|
|
7804
|
+
var ref = (0, import_react63.useRef)(null);
|
|
7754
7805
|
var isRTL = direction === "rtl";
|
|
7755
7806
|
var size;
|
|
7756
7807
|
if (typeof window !== "undefined") {
|
|
@@ -7758,7 +7809,7 @@ var HawaAppLayout = function(_param) {
|
|
|
7758
7809
|
} else {
|
|
7759
7810
|
size = 1200;
|
|
7760
7811
|
}
|
|
7761
|
-
(0,
|
|
7812
|
+
(0, import_react63.useEffect)(function() {
|
|
7762
7813
|
var handleClickOutside = function(event) {
|
|
7763
7814
|
if (ref.current && !ref.current.contains(event.target) && !keepOpen) {
|
|
7764
7815
|
setOpenSideMenu(false);
|
|
@@ -7785,12 +7836,12 @@ var HawaAppLayout = function(_param) {
|
|
|
7785
7836
|
}
|
|
7786
7837
|
};
|
|
7787
7838
|
var drawerSizeCondition = size > 600 ? drawerSizeStyle[keepOpen ? "opened" : "closed"][drawerSize] : 0;
|
|
7788
|
-
return /* @__PURE__ */
|
|
7839
|
+
return /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7789
7840
|
className: "fixed"
|
|
7790
|
-
}, props.topBar && /* @__PURE__ */
|
|
7841
|
+
}, props.topBar && /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7791
7842
|
className: (0, import_clsx29.default)("fixed left-0 right-0 top-0 z-30 flex h-14 w-full items-center justify-between bg-layoutPrimary-500 p-2", isRTL ? "flex-row-reverse" : "flex-row")
|
|
7792
7843
|
}, size > 600 ? props.pageTitle ? // Title of the page
|
|
7793
|
-
/* @__PURE__ */
|
|
7844
|
+
/* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7794
7845
|
className: (0, import_clsx29.default)(isRTL ? [
|
|
7795
7846
|
size > 600 ? "mr-14" : "mr-2",
|
|
7796
7847
|
keepOpen ? "mr-40" : ""
|
|
@@ -7804,15 +7855,15 @@ var HawaAppLayout = function(_param) {
|
|
|
7804
7855
|
marginLeft: "".concat(drawerSizeStyle[keepOpen ? "opened" : "closed"][drawerSize], "px")
|
|
7805
7856
|
}
|
|
7806
7857
|
}, props.pageTitle) : null : // Mobile Drawer Menu Button
|
|
7807
|
-
/* @__PURE__ */
|
|
7858
|
+
/* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7808
7859
|
dir: direction,
|
|
7809
7860
|
className: "flex items-center justify-center gap-0.5 "
|
|
7810
|
-
}, /* @__PURE__ */
|
|
7861
|
+
}, /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7811
7862
|
onClick: function() {
|
|
7812
7863
|
return setOpenSideMenu(true);
|
|
7813
7864
|
},
|
|
7814
7865
|
className: "z-40 mx-1 cursor-pointer rounded p-2 transition-all hover:bg-gray-100"
|
|
7815
|
-
}, /* @__PURE__ */
|
|
7866
|
+
}, /* @__PURE__ */ import_react63.default.createElement("svg", {
|
|
7816
7867
|
stroke: "currentColor",
|
|
7817
7868
|
fill: "currentColor",
|
|
7818
7869
|
strokeWidth: "0",
|
|
@@ -7820,36 +7871,36 @@ var HawaAppLayout = function(_param) {
|
|
|
7820
7871
|
"aria-hidden": "true",
|
|
7821
7872
|
height: "1.6em",
|
|
7822
7873
|
width: "1.6em"
|
|
7823
|
-
}, /* @__PURE__ */
|
|
7874
|
+
}, /* @__PURE__ */ import_react63.default.createElement("path", {
|
|
7824
7875
|
fillRule: "evenodd",
|
|
7825
7876
|
d: "M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",
|
|
7826
7877
|
clipRule: "evenodd"
|
|
7827
|
-
})), " "), props.pageTitle ? /* @__PURE__ */
|
|
7878
|
+
})), " "), props.pageTitle ? /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7828
7879
|
className: "text-sm"
|
|
7829
|
-
}, props.pageTitle) : /* @__PURE__ */
|
|
7880
|
+
}, props.pageTitle) : /* @__PURE__ */ import_react63.default.createElement("div", null)), /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7830
7881
|
className: (0, import_clsx29.default)("flex gap-2", isRTL ? "flex-row-reverse" : "flex-row")
|
|
7831
|
-
}, size > 600 ? /* @__PURE__ */
|
|
7882
|
+
}, size > 600 ? /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7832
7883
|
className: (0, import_clsx29.default)(isRTL ? "text-left text-xs" : "text-right text-xs")
|
|
7833
|
-
}, /* @__PURE__ */
|
|
7884
|
+
}, /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7834
7885
|
className: "font-bold"
|
|
7835
|
-
}, props.username), " ", /* @__PURE__ */
|
|
7886
|
+
}, props.username), " ", /* @__PURE__ */ import_react63.default.createElement("div", null, props.email)) : null, /* @__PURE__ */ import_react63.default.createElement(HawaMenu, {
|
|
7836
7887
|
direction: direction,
|
|
7837
7888
|
withHeader: size > 600 ? false : true,
|
|
7838
7889
|
headerTitle: size > 600 ? "" : props.username,
|
|
7839
7890
|
headerSubtitle: size > 600 ? "" : props.email,
|
|
7840
7891
|
menuItems: props.profileMenuItems,
|
|
7841
7892
|
position: "bottom-left"
|
|
7842
|
-
}, /* @__PURE__ */
|
|
7893
|
+
}, /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7843
7894
|
className: "relative h-8 w-8 cursor-pointer overflow-hidden rounded-full ring-1 ring-buttonPrimary-500 dark:bg-gray-600"
|
|
7844
|
-
}, /* @__PURE__ */
|
|
7895
|
+
}, /* @__PURE__ */ import_react63.default.createElement("svg", {
|
|
7845
7896
|
className: "absolute -left-1 h-10 w-10 text-gray-400",
|
|
7846
7897
|
fill: "currentColor",
|
|
7847
7898
|
viewBox: "0 0 20 20"
|
|
7848
|
-
}, /* @__PURE__ */
|
|
7899
|
+
}, /* @__PURE__ */ import_react63.default.createElement("path", {
|
|
7849
7900
|
fillRule: "evenodd",
|
|
7850
7901
|
d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
|
|
7851
7902
|
clipRule: "evenodd"
|
|
7852
|
-
})))))), /* @__PURE__ */
|
|
7903
|
+
})))))), /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7853
7904
|
onMouseEnter: function() {
|
|
7854
7905
|
setOpenSideMenu(true);
|
|
7855
7906
|
},
|
|
@@ -7861,34 +7912,34 @@ var HawaAppLayout = function(_param) {
|
|
|
7861
7912
|
style: {
|
|
7862
7913
|
width: size > 600 ? openSideMenu ? "".concat(drawerSizeStyle["opened"][drawerSize], "px") : "".concat(drawerSizeStyle["closed"][drawerSize], "px") : openSideMenu ? "".concat(drawerSizeStyle["opened"][drawerSize], "px") : "0px"
|
|
7863
7914
|
}
|
|
7864
|
-
}, /* @__PURE__ */
|
|
7915
|
+
}, /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7865
7916
|
className: (0, import_clsx29.default)("no-scrollbar", props.topBar ? "" : "mt-2", openSideMenu ? "overflow-auto" : "overflow-hidden")
|
|
7866
|
-
}, /* @__PURE__ */
|
|
7917
|
+
}, /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7867
7918
|
dir: direction,
|
|
7868
7919
|
className: (0, import_clsx29.default)("fixed z-50 mb-2 flex h-14 flex-row items-center transition-all ", size > 600 || openSideMenu ? "bg-layoutPrimary-500" : "w-0 bg-transparent"),
|
|
7869
7920
|
style: {
|
|
7870
7921
|
width: size > 600 ? "".concat(drawerSizeStyle[openSideMenu ? "opened" : "closed"][drawerSize] - 16, "px") : "full"
|
|
7871
7922
|
}
|
|
7872
|
-
}, /* @__PURE__ */
|
|
7923
|
+
}, /* @__PURE__ */ import_react63.default.createElement("img", {
|
|
7873
7924
|
className: (0, import_clsx29.default)("fixed top-2.5 h-9 opacity-0 transition-all", isRTL ? "right-2.5" : "left-2.5", !openSideMenu ? "invisible opacity-0" : "visible opacity-100"),
|
|
7874
7925
|
src: props.logoLink
|
|
7875
|
-
}), size > 600 ? /* @__PURE__ */
|
|
7926
|
+
}), size > 600 ? /* @__PURE__ */ import_react63.default.createElement("img", {
|
|
7876
7927
|
className: (0, import_clsx29.default)("fixed top-2.5 h-9 transition-all", isRTL ? "right-2.5" : "left-2.5", openSideMenu ? "invisible opacity-0" : "visible opacity-100"),
|
|
7877
7928
|
src: props.logoSymbol
|
|
7878
|
-
}) : null), /* @__PURE__ */
|
|
7929
|
+
}) : null), /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7879
7930
|
className: "mb-10 mt-14"
|
|
7880
7931
|
}, (_props_drawerItems = props.drawerItems) === null || _props_drawerItems === void 0 ? void 0 : _props_drawerItems.map(function(dSection, dIndex) {
|
|
7881
7932
|
var _dSection;
|
|
7882
|
-
return /* @__PURE__ */
|
|
7933
|
+
return /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7883
7934
|
key: dIndex,
|
|
7884
7935
|
className: (0, import_clsx29.default)("flex flex-col items-stretch justify-center")
|
|
7885
7936
|
}, (_dSection = dSection) === null || _dSection === void 0 ? void 0 : _dSection.map(function(dItem, i) {
|
|
7886
7937
|
var _dItem_subItems, _dItem_subItems1, _dItem_subItems2;
|
|
7887
|
-
return /* @__PURE__ */
|
|
7938
|
+
return /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7888
7939
|
key: i,
|
|
7889
7940
|
id: "test",
|
|
7890
7941
|
className: "flex flex-col"
|
|
7891
|
-
}, /* @__PURE__ */
|
|
7942
|
+
}, /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7892
7943
|
onClick: function() {
|
|
7893
7944
|
dItem.subItems ? openSubItem === dItem.slug ? // ||
|
|
7894
7945
|
// dItem.subItems.find(
|
|
@@ -7899,50 +7950,50 @@ var HawaAppLayout = function(_param) {
|
|
|
7899
7950
|
className: (0, import_clsx29.default)(props.currentPage === dItem.slug || ((_dItem_subItems = dItem.subItems) === null || _dItem_subItems === void 0 ? void 0 : _dItem_subItems.find(function(e) {
|
|
7900
7951
|
return e.slug === props.currentPage;
|
|
7901
7952
|
})) ? "bg-buttonPrimary-500 text-white" : "hover:bg-layoutPrimary-300", "m-2 my-1 flex cursor-pointer flex-row items-center justify-between overflow-x-clip rounded p-2 pl-3 transition-all ", isRTL ? "flex-row-reverse pr-3" : "")
|
|
7902
|
-
}, /* @__PURE__ */
|
|
7953
|
+
}, /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7903
7954
|
className: "flex flex-row",
|
|
7904
7955
|
dir: direction
|
|
7905
|
-
}, /* @__PURE__ */
|
|
7956
|
+
}, /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7906
7957
|
className: "flex items-center justify-center"
|
|
7907
|
-
}, dItem.icon), /* @__PURE__ */
|
|
7958
|
+
}, dItem.icon), /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7908
7959
|
className: (0, import_clsx29.default)("mx-2 whitespace-nowrap text-sm transition-all", openSideMenu ? "opacity-100" : "opacity-0")
|
|
7909
|
-
}, dItem.label)), dItem.subItems && /* @__PURE__ */
|
|
7960
|
+
}, dItem.label)), dItem.subItems && /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7910
7961
|
className: (0, import_clsx29.default)(openSubItem && dItem.slug === openSubItem ? "-rotate-90" : "rotate-90")
|
|
7911
|
-
}, /* @__PURE__ */
|
|
7962
|
+
}, /* @__PURE__ */ import_react63.default.createElement(import_fa.FaChevronRight, {
|
|
7912
7963
|
fontSize: 11
|
|
7913
|
-
}))), dItem.subItems && /* @__PURE__ */
|
|
7964
|
+
}))), dItem.subItems && /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7914
7965
|
className: (0, import_clsx29.default)("m-1 flex cursor-pointer flex-col gap-0 overflow-clip whitespace-nowrap rounded bg-layoutPrimary-300 p-1 transition-all", openSubItem == dItem.slug && openSideMenu ? "" : "my-0 py-0", isRTL ? "text-right" : "text-left"),
|
|
7915
7966
|
style: {
|
|
7916
7967
|
height: openSubItem == dItem.slug && openSideMenu ? 6 + 33 * ((_dItem_subItems1 = dItem.subItems) === null || _dItem_subItems1 === void 0 ? void 0 : _dItem_subItems1.length) : 0
|
|
7917
7968
|
}
|
|
7918
7969
|
}, (_dItem_subItems2 = dItem.subItems) === null || _dItem_subItems2 === void 0 ? void 0 : _dItem_subItems2.map(function(subIt, s) {
|
|
7919
|
-
return /* @__PURE__ */
|
|
7970
|
+
return /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7920
7971
|
key: s,
|
|
7921
7972
|
className: (0, import_clsx29.default)("flex flex-row gap-2 overflow-x-clip rounded p-2 px-2 text-xs", isRTL ? "text-right" : "text-left", props.currentPage === subIt.slug ? "bg-buttonPrimary-500 text-white hover:bg-buttonPrimary-500" : "hover:bg-layoutPrimary-500"),
|
|
7922
7973
|
dir: direction,
|
|
7923
7974
|
onClick: function() {
|
|
7924
7975
|
subIt.action();
|
|
7925
7976
|
}
|
|
7926
|
-
}, /* @__PURE__ */
|
|
7977
|
+
}, /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7927
7978
|
className: "flex items-center justify-center"
|
|
7928
|
-
}, subIt.icon), /* @__PURE__ */
|
|
7979
|
+
}, subIt.icon), /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7929
7980
|
className: "flex flex-row justify-between"
|
|
7930
7981
|
}, subIt.label));
|
|
7931
7982
|
})));
|
|
7932
|
-
}), dIndex !== props.drawerItems.length - 1 && /* @__PURE__ */
|
|
7983
|
+
}), dIndex !== props.drawerItems.length - 1 && /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7933
7984
|
className: "my-2 h-[1px] w-10/12 self-center bg-buttonPrimary-500 text-center "
|
|
7934
7985
|
}));
|
|
7935
|
-
})), openSideMenu && /* @__PURE__ */
|
|
7986
|
+
})), openSideMenu && /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7936
7987
|
className: (0, import_clsx29.default)("fixed bottom-0 flex flex-row items-center bg-layoutPrimary-500 p-4 transition-all", openSideMenu ? "bg-layoutPrimary-500 " : "bg-red-500", onSettingsClick ? "justify-between" : "justify-end", direction === "rtl" ? "right-0" : "left-0"),
|
|
7937
7988
|
style: {
|
|
7938
7989
|
width: "".concat(drawerSizeStyle[openSideMenu ? "opened" : "closed"][drawerSize] - 16, "px")
|
|
7939
7990
|
}
|
|
7940
|
-
}, onSettingsClick && /* @__PURE__ */
|
|
7991
|
+
}, onSettingsClick && /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7941
7992
|
className: " cursor-pointer rounded p-2 transition-all hover:bg-layoutPrimary-700",
|
|
7942
7993
|
onClick: function() {
|
|
7943
7994
|
return onSettingsClick();
|
|
7944
7995
|
}
|
|
7945
|
-
}, /* @__PURE__ */
|
|
7996
|
+
}, /* @__PURE__ */ import_react63.default.createElement("svg", {
|
|
7946
7997
|
"aria-label": "Settings Icon",
|
|
7947
7998
|
stroke: "currentColor",
|
|
7948
7999
|
fill: "none",
|
|
@@ -7952,31 +8003,31 @@ var HawaAppLayout = function(_param) {
|
|
|
7952
8003
|
strokeLinejoin: "round",
|
|
7953
8004
|
height: "1em",
|
|
7954
8005
|
width: "1em"
|
|
7955
|
-
}, /* @__PURE__ */
|
|
8006
|
+
}, /* @__PURE__ */ import_react63.default.createElement("circle", {
|
|
7956
8007
|
cx: "12",
|
|
7957
8008
|
cy: "12",
|
|
7958
8009
|
r: "3"
|
|
7959
|
-
}), /* @__PURE__ */
|
|
8010
|
+
}), /* @__PURE__ */ import_react63.default.createElement("path", {
|
|
7960
8011
|
d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"
|
|
7961
|
-
}))), size > 600 ? /* @__PURE__ */
|
|
8012
|
+
}))), size > 600 ? /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7962
8013
|
className: (0, import_clsx29.default)("w-fit transition-all"),
|
|
7963
8014
|
style: isRTL ? {
|
|
7964
8015
|
right: "".concat(drawerSizeStyle[openSideMenu ? "opened" : "closed"][drawerSize] - 35, "px")
|
|
7965
8016
|
} : {
|
|
7966
8017
|
left: "".concat(drawerSizeStyle[openSideMenu ? "opened" : "closed"][drawerSize] - 35, "px")
|
|
7967
8018
|
}
|
|
7968
|
-
}, /* @__PURE__ */
|
|
8019
|
+
}, /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7969
8020
|
dir: direction,
|
|
7970
8021
|
className: (0, import_clsx29.default)("relative left-0 top-0 transition-all", openSideMenu ? " opacity-100" : " opacity-0")
|
|
7971
|
-
}, /* @__PURE__ */
|
|
8022
|
+
}, /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7972
8023
|
onClick: function() {
|
|
7973
8024
|
return setKeepOpen(!keepOpen);
|
|
7974
8025
|
},
|
|
7975
8026
|
className: "w-fit cursor-pointer rounded bg-gray-300 p-2 transition-all hover:bg-gray-400"
|
|
7976
|
-
}, /* @__PURE__ */
|
|
8027
|
+
}, /* @__PURE__ */ import_react63.default.createElement(import_fa.FaChevronRight, {
|
|
7977
8028
|
fontSize: 14,
|
|
7978
8029
|
className: (0, import_clsx29.default)("transition-all", isRTL ? keepOpen ? "rotate-0" : "rotate-180" : keepOpen ? "rotate-180" : "rotate-0")
|
|
7979
|
-
})))) : null))), /* @__PURE__ */
|
|
8030
|
+
})))) : null))), /* @__PURE__ */ import_react63.default.createElement("div", {
|
|
7980
8031
|
className: "fixed overflow-y-auto",
|
|
7981
8032
|
style: isRTL ? {
|
|
7982
8033
|
height: "calc(100% - ".concat(props.topBar ? "56" : "0", "px)"),
|
|
@@ -7992,7 +8043,7 @@ var HawaAppLayout = function(_param) {
|
|
|
7992
8043
|
}, props.children));
|
|
7993
8044
|
};
|
|
7994
8045
|
// src/layout/HawaAppLayoutSimplified.tsx
|
|
7995
|
-
var
|
|
8046
|
+
var import_react64 = __toESM(require("react"));
|
|
7996
8047
|
var import_clsx30 = __toESM(require("clsx"));
|
|
7997
8048
|
var HawaAppLayoutSimplified = function(_param) {
|
|
7998
8049
|
var _param_direction = _param.direction, direction = _param_direction === void 0 ? "rtl" : _param_direction, _param_drawerSize = _param.drawerSize, drawerSize = _param_drawerSize === void 0 ? "md" : _param_drawerSize, onSettingsClick = _param.onSettingsClick, DrawerFooterActions = _param.DrawerFooterActions, props = _object_without_properties(_param, [
|
|
@@ -8002,11 +8053,11 @@ var HawaAppLayoutSimplified = function(_param) {
|
|
|
8002
8053
|
"DrawerFooterActions"
|
|
8003
8054
|
]);
|
|
8004
8055
|
var _props_drawerItems, _props_texts, _props_texts1;
|
|
8005
|
-
var _ref = _sliced_to_array((0,
|
|
8006
|
-
var _ref1 = _sliced_to_array((0,
|
|
8056
|
+
var _ref = _sliced_to_array((0, import_react64.useState)(false), 2), openSideMenu = _ref[0], setOpenSideMenu = _ref[1];
|
|
8057
|
+
var _ref1 = _sliced_to_array((0, import_react64.useState)(""), 2), openSubItem = _ref1[0], setOpenSubitem = _ref1[1];
|
|
8007
8058
|
var _useDiscloser_default = useDiscloser_default(false), isOpen = _useDiscloser_default.isOpen, onClose = _useDiscloser_default.onClose, onOpen = _useDiscloser_default.onOpen;
|
|
8008
|
-
var _ref2 = _sliced_to_array((0,
|
|
8009
|
-
var ref = (0,
|
|
8059
|
+
var _ref2 = _sliced_to_array((0, import_react64.useState)(false), 2), keepOpen = _ref2[0], setKeepOpen = _ref2[1];
|
|
8060
|
+
var ref = (0, import_react64.useRef)(null);
|
|
8010
8061
|
var isRTL = direction === "rtl";
|
|
8011
8062
|
var size;
|
|
8012
8063
|
if (typeof window !== "undefined") {
|
|
@@ -8014,7 +8065,7 @@ var HawaAppLayoutSimplified = function(_param) {
|
|
|
8014
8065
|
} else {
|
|
8015
8066
|
size = 1200;
|
|
8016
8067
|
}
|
|
8017
|
-
(0,
|
|
8068
|
+
(0, import_react64.useEffect)(function() {
|
|
8018
8069
|
var handleClickOutside = function(event) {
|
|
8019
8070
|
if (ref.current && !ref.current.contains(event.target) && !keepOpen) {
|
|
8020
8071
|
setOpenSideMenu(false);
|
|
@@ -8043,11 +8094,11 @@ var HawaAppLayoutSimplified = function(_param) {
|
|
|
8043
8094
|
}
|
|
8044
8095
|
};
|
|
8045
8096
|
var drawerSizeCondition = size > 600 ? drawerSizeStyle[keepOpen ? "opened" : "closed"][drawerSize] : 0;
|
|
8046
|
-
return /* @__PURE__ */
|
|
8097
|
+
return /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8047
8098
|
className: "fixed left-0"
|
|
8048
|
-
}, props.topBar && /* @__PURE__ */
|
|
8099
|
+
}, props.topBar && /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8049
8100
|
className: (0, import_clsx30.default)("fixed left-0 right-0 top-0 z-30 flex h-14 w-full items-center justify-between bg-primary-foreground p-2", isRTL ? "flex-row-reverse" : "flex-row")
|
|
8050
|
-
}, size > 600 ? /* @__PURE__ */
|
|
8101
|
+
}, size > 600 ? /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8051
8102
|
className: (0, import_clsx30.default)("dark:text-white", isRTL ? [
|
|
8052
8103
|
size > 600 ? "mr-14" : "mr-2",
|
|
8053
8104
|
keepOpen ? "mr-40" : ""
|
|
@@ -8061,15 +8112,15 @@ var HawaAppLayoutSimplified = function(_param) {
|
|
|
8061
8112
|
marginLeft: "".concat(drawerSizeStyle[keepOpen ? "opened" : "closed"][drawerSize], "px")
|
|
8062
8113
|
}
|
|
8063
8114
|
}, props.pageTitle) : // Mobile Drawer Menu Button
|
|
8064
|
-
/* @__PURE__ */
|
|
8115
|
+
/* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8065
8116
|
dir: direction,
|
|
8066
8117
|
className: "flex items-center justify-center gap-0.5"
|
|
8067
|
-
}, /* @__PURE__ */
|
|
8118
|
+
}, /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8068
8119
|
onClick: function() {
|
|
8069
8120
|
return setOpenSideMenu(true);
|
|
8070
8121
|
},
|
|
8071
8122
|
className: "z-40 mx-1 cursor-pointer rounded p-2 transition-all hover:bg-gray-100"
|
|
8072
|
-
}, /* @__PURE__ */
|
|
8123
|
+
}, /* @__PURE__ */ import_react64.default.createElement("svg", {
|
|
8073
8124
|
stroke: "currentColor",
|
|
8074
8125
|
fill: "currentColor",
|
|
8075
8126
|
strokeWidth: "0",
|
|
@@ -8077,33 +8128,33 @@ var HawaAppLayoutSimplified = function(_param) {
|
|
|
8077
8128
|
"aria-hidden": "true",
|
|
8078
8129
|
height: "1.6em",
|
|
8079
8130
|
width: "1.6em"
|
|
8080
|
-
}, /* @__PURE__ */
|
|
8131
|
+
}, /* @__PURE__ */ import_react64.default.createElement("path", {
|
|
8081
8132
|
fillRule: "evenodd",
|
|
8082
8133
|
d: "M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",
|
|
8083
8134
|
clipRule: "evenodd"
|
|
8084
|
-
}))), props.pageTitle ? /* @__PURE__ */
|
|
8135
|
+
}))), props.pageTitle ? /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8085
8136
|
className: "text-sm"
|
|
8086
|
-
}, props.pageTitle) : /* @__PURE__ */
|
|
8137
|
+
}, props.pageTitle) : /* @__PURE__ */ import_react64.default.createElement("div", null)), /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8087
8138
|
className: (0, import_clsx30.default)("flex gap-2 dark:text-white", isRTL ? "flex-row-reverse" : "flex-row")
|
|
8088
|
-
}, size > 600 ? /* @__PURE__ */
|
|
8139
|
+
}, size > 600 ? /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8089
8140
|
className: isRTL ? "text-left text-xs" : "text-right text-xs"
|
|
8090
|
-
}, /* @__PURE__ */
|
|
8141
|
+
}, /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8091
8142
|
className: "font-bold"
|
|
8092
|
-
}, props.username), " ", /* @__PURE__ */
|
|
8143
|
+
}, props.username), " ", /* @__PURE__ */ import_react64.default.createElement("div", null, props.email)) : null, /* @__PURE__ */ import_react64.default.createElement(DropdownMenu, {
|
|
8093
8144
|
triggerClassname: "mx-2",
|
|
8094
8145
|
align: "end",
|
|
8095
8146
|
alignOffset: 8,
|
|
8096
8147
|
side: "bottom",
|
|
8097
8148
|
sideOffset: 5,
|
|
8098
8149
|
direction: isRTL ? "rtl" : "ltr",
|
|
8099
|
-
trigger: /* @__PURE__ */
|
|
8150
|
+
trigger: /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8100
8151
|
className: "relative h-8 w-8 cursor-pointer overflow-clip rounded ring-1 ring-primary/30 dark:bg-gray-600"
|
|
8101
|
-
}, /* @__PURE__ */
|
|
8152
|
+
}, /* @__PURE__ */ import_react64.default.createElement(AvatarIcon, null)),
|
|
8102
8153
|
items: props.profileMenuItems,
|
|
8103
8154
|
onItemSelect: function(e) {
|
|
8104
8155
|
return console.log("selecting item ", e);
|
|
8105
8156
|
}
|
|
8106
|
-
}))), /* @__PURE__ */
|
|
8157
|
+
}))), /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8107
8158
|
className: (0, import_clsx30.default)("fixed top-0 z-40 flex h-full flex-col justify-between overflow-x-clip transition-all", isRTL ? "right-0" : "left-0"),
|
|
8108
8159
|
style: {
|
|
8109
8160
|
width: size > 600 ? openSideMenu ? "".concat(drawerSizeStyle["opened"][drawerSize], "px") : "".concat(drawerSizeStyle["closed"][drawerSize], "px") : openSideMenu ? "".concat(drawerSizeStyle["opened"][drawerSize], "px") : "0px"
|
|
@@ -8115,20 +8166,20 @@ var HawaAppLayoutSimplified = function(_param) {
|
|
|
8115
8166
|
return keepOpen ? setOpenSideMenu(true) : setOpenSideMenu(false);
|
|
8116
8167
|
},
|
|
8117
8168
|
ref: ref
|
|
8118
|
-
}, /* @__PURE__ */
|
|
8169
|
+
}, /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8119
8170
|
dir: direction,
|
|
8120
8171
|
className: (0, import_clsx30.default)("fixed z-50 mb-2 flex h-14 w-full flex-row items-center justify-center bg-primary-foreground transition-all"),
|
|
8121
8172
|
style: {
|
|
8122
8173
|
width: size > 600 ? "".concat(openSideMenu ? openDrawerWidth : 56, "px") : "".concat(openSideMenu ? openDrawerWidth : 0, "px")
|
|
8123
8174
|
}
|
|
8124
|
-
}, /* @__PURE__ */
|
|
8175
|
+
}, /* @__PURE__ */ import_react64.default.createElement("img", {
|
|
8125
8176
|
className: (0, import_clsx30.default)("h-9 opacity-0 transition-all", // isRTL ? "right-2.5" : "left-2.5",
|
|
8126
8177
|
!openSideMenu ? "invisible opacity-0" : "visible opacity-100"),
|
|
8127
8178
|
src: props.logoLink
|
|
8128
|
-
}), size > 600 ? /* @__PURE__ */
|
|
8179
|
+
}), size > 600 ? /* @__PURE__ */ import_react64.default.createElement("img", {
|
|
8129
8180
|
className: (0, import_clsx30.default)("fixed top-2.5 h-9 transition-all", isRTL ? "right-2.5" : "left-2.5", openSideMenu ? "invisible opacity-0" : "visible opacity-100"),
|
|
8130
8181
|
src: props.logoSymbol
|
|
8131
|
-
}) : null), /* @__PURE__ */
|
|
8182
|
+
}) : null), /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8132
8183
|
className: (0, import_clsx30.default)(// "no-scrollbar", TODO: make this optional to hide scrollbar or not
|
|
8133
8184
|
"fixed bottom-14 top-14 bg-primary-foreground py-2 transition-all", // bg-yellow-400
|
|
8134
8185
|
openSideMenu ? "overflow-auto" : "overflow-hidden"),
|
|
@@ -8138,16 +8189,16 @@ var HawaAppLayoutSimplified = function(_param) {
|
|
|
8138
8189
|
}
|
|
8139
8190
|
}, (_props_drawerItems = props.drawerItems) === null || _props_drawerItems === void 0 ? void 0 : _props_drawerItems.map(function(dSection, dIndex) {
|
|
8140
8191
|
var _dSection;
|
|
8141
|
-
return /* @__PURE__ */
|
|
8192
|
+
return /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8142
8193
|
key: dIndex,
|
|
8143
8194
|
className: (0, import_clsx30.default)("flex select-none flex-col items-stretch justify-center transition-all")
|
|
8144
8195
|
}, (_dSection = dSection) === null || _dSection === void 0 ? void 0 : _dSection.map(function(dItem, i) {
|
|
8145
8196
|
var _dItem_subItems, _dItem_subItems1, _dItem_subItems2;
|
|
8146
|
-
return /* @__PURE__ */
|
|
8197
|
+
return /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8147
8198
|
key: i,
|
|
8148
8199
|
id: "test",
|
|
8149
8200
|
className: "flex flex-col"
|
|
8150
|
-
}, /* @__PURE__ */
|
|
8201
|
+
}, /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8151
8202
|
onClick: function() {
|
|
8152
8203
|
dItem.subItems ? openSubItem === dItem.slug ? // ||
|
|
8153
8204
|
// dItem.subItems.find(
|
|
@@ -8158,61 +8209,61 @@ var HawaAppLayoutSimplified = function(_param) {
|
|
|
8158
8209
|
className: (0, import_clsx30.default)(props.currentPage === dItem.slug || ((_dItem_subItems = dItem.subItems) === null || _dItem_subItems === void 0 ? void 0 : _dItem_subItems.find(function(e) {
|
|
8159
8210
|
return e.slug === props.currentPage;
|
|
8160
8211
|
})) ? "bg-primary text-primary-foreground " : "hover:bg-primary/20", "my-1 flex cursor-pointer flex-row items-center justify-between overflow-x-clip rounded p-2 pl-3 transition-all ", isRTL ? "flex-row-reverse pr-3" : "", openSideMenu ? "m-2" : "m-2")
|
|
8161
|
-
}, /* @__PURE__ */
|
|
8212
|
+
}, /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8162
8213
|
className: "flex flex-row",
|
|
8163
8214
|
dir: direction
|
|
8164
|
-
}, /* @__PURE__ */
|
|
8215
|
+
}, /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8165
8216
|
className: "flex items-center justify-center "
|
|
8166
|
-
}, dItem.icon), /* @__PURE__ */
|
|
8217
|
+
}, dItem.icon), /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8167
8218
|
className: (0, import_clsx30.default)("mx-2 whitespace-nowrap text-sm transition-all", openSideMenu ? "opacity-100" : "opacity-0")
|
|
8168
|
-
}, dItem.label)), dItem.subItems && /* @__PURE__ */
|
|
8219
|
+
}, dItem.label)), dItem.subItems && /* @__PURE__ */ import_react64.default.createElement(ArrowIcon, {
|
|
8169
8220
|
pointing: openSubItem && dItem.slug === openSubItem ? "up" : "down"
|
|
8170
|
-
})), dItem.subItems && /* @__PURE__ */
|
|
8221
|
+
})), dItem.subItems && /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8171
8222
|
className: (0, import_clsx30.default)("m-1 mx-2 flex cursor-pointer flex-col gap-[2px] overflow-clip whitespace-nowrap rounded bg-primary/10 p-1 transition-all", openSubItem == dItem.slug && openSideMenu ? "" : "my-0 py-0", isRTL ? "text-right" : "text-left"),
|
|
8172
8223
|
style: {
|
|
8173
8224
|
height: openSubItem == dItem.slug && openSideMenu ? 6 + 35 * ((_dItem_subItems1 = dItem.subItems) === null || _dItem_subItems1 === void 0 ? void 0 : _dItem_subItems1.length) : 0
|
|
8174
8225
|
}
|
|
8175
8226
|
}, (_dItem_subItems2 = dItem.subItems) === null || _dItem_subItems2 === void 0 ? void 0 : _dItem_subItems2.map(function(subIt, s) {
|
|
8176
|
-
return /* @__PURE__ */
|
|
8227
|
+
return /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8177
8228
|
key: s,
|
|
8178
8229
|
className: (0, import_clsx30.default)("flex flex-row gap-2 overflow-x-clip rounded-inner p-2 px-2 text-xs", isRTL ? "text-right" : "text-left", props.currentPage === subIt.slug ? "bg-primary text-white" : "hover:bg-primary-foreground hover:text-primary "),
|
|
8179
8230
|
dir: direction,
|
|
8180
8231
|
onClick: function() {
|
|
8181
8232
|
subIt.action();
|
|
8182
8233
|
}
|
|
8183
|
-
}, /* @__PURE__ */
|
|
8234
|
+
}, /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8184
8235
|
className: "flex items-center justify-center"
|
|
8185
|
-
}, subIt.icon), /* @__PURE__ */
|
|
8236
|
+
}, subIt.icon), /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8186
8237
|
className: "flex flex-row justify-between"
|
|
8187
8238
|
}, subIt.label));
|
|
8188
8239
|
})));
|
|
8189
|
-
}), dIndex !== props.drawerItems.length - 1 && /* @__PURE__ */
|
|
8240
|
+
}), dIndex !== props.drawerItems.length - 1 && /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8190
8241
|
className: "my-2 h-[1px] w-10/12 self-center bg-buttonPrimary-500 bg-red-500 text-center "
|
|
8191
8242
|
}));
|
|
8192
|
-
})), /* @__PURE__ */
|
|
8243
|
+
})), /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8193
8244
|
className: (0, import_clsx30.default)("fixed bottom-0 flex h-14 w-full items-center justify-center gap-2 overflow-clip bg-primary-foreground transition-all", direction === "rtl" ? "flex-row-reverse" : "flex-row"),
|
|
8194
8245
|
style: {
|
|
8195
8246
|
width: size > 600 ? "".concat(openSideMenu ? openDrawerWidth : 56, "px") : "".concat(openSideMenu ? openDrawerWidth : 0, "px")
|
|
8196
8247
|
}
|
|
8197
|
-
}, DrawerFooterActions && openSideMenu ? /* @__PURE__ */
|
|
8248
|
+
}, DrawerFooterActions && openSideMenu ? /* @__PURE__ */ import_react64.default.createElement(import_react64.default.Fragment, null, DrawerFooterActions) : null, size > 600 && openSideMenu ? /* @__PURE__ */ import_react64.default.createElement(Tooltip, {
|
|
8198
8249
|
side: "left",
|
|
8199
8250
|
delayDuration: 500,
|
|
8200
8251
|
content: keepOpen ? ((_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.collapseSidebar) || "Collapse Sidebar" : ((_props_texts1 = props.texts) === null || _props_texts1 === void 0 ? void 0 : _props_texts1.expandSidebar) || "Expand Sidebar"
|
|
8201
|
-
}, /* @__PURE__ */
|
|
8252
|
+
}, /* @__PURE__ */ import_react64.default.createElement(Button, {
|
|
8202
8253
|
variant: "light",
|
|
8203
8254
|
onClick: function() {
|
|
8204
8255
|
return setKeepOpen(!keepOpen);
|
|
8205
8256
|
},
|
|
8206
8257
|
size: "smallIcon"
|
|
8207
|
-
}, /* @__PURE__ */
|
|
8258
|
+
}, /* @__PURE__ */ import_react64.default.createElement("svg", {
|
|
8208
8259
|
className: (0, import_clsx30.default)("h-6 w-6 shrink-0 text-primary transition-all disabled:bg-gray-200 ", keepOpen ? isRTL ? "-rotate-90" : "rotate-90" : isRTL ? "rotate-90" : "-rotate-90"),
|
|
8209
8260
|
fill: "currentColor",
|
|
8210
8261
|
viewBox: "0 0 20 20"
|
|
8211
|
-
}, /* @__PURE__ */
|
|
8262
|
+
}, /* @__PURE__ */ import_react64.default.createElement("path", {
|
|
8212
8263
|
fillRule: "evenodd",
|
|
8213
8264
|
d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",
|
|
8214
8265
|
clipRule: "evenodd"
|
|
8215
|
-
})))) : null)), /* @__PURE__ */
|
|
8266
|
+
})))) : null)), /* @__PURE__ */ import_react64.default.createElement("div", {
|
|
8216
8267
|
className: "fixed overflow-y-auto",
|
|
8217
8268
|
style: isRTL ? {
|
|
8218
8269
|
height: "calc(100% - ".concat(props.topBar ? "56" : "0", "px)"),
|
|
@@ -8228,11 +8279,11 @@ var HawaAppLayoutSimplified = function(_param) {
|
|
|
8228
8279
|
}, props.children));
|
|
8229
8280
|
};
|
|
8230
8281
|
var AvatarIcon = function() {
|
|
8231
|
-
return /* @__PURE__ */
|
|
8282
|
+
return /* @__PURE__ */ import_react64.default.createElement("svg", {
|
|
8232
8283
|
className: "absolute -left-1 h-10 w-10 text-gray-400",
|
|
8233
8284
|
fill: "currentColor",
|
|
8234
8285
|
viewBox: "0 0 20 20"
|
|
8235
|
-
}, /* @__PURE__ */
|
|
8286
|
+
}, /* @__PURE__ */ import_react64.default.createElement("path", {
|
|
8236
8287
|
fillRule: "evenodd",
|
|
8237
8288
|
d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
|
|
8238
8289
|
clipRule: "evenodd"
|
|
@@ -8257,18 +8308,18 @@ var ArrowIcon = function(param) {
|
|
|
8257
8308
|
default:
|
|
8258
8309
|
break;
|
|
8259
8310
|
}
|
|
8260
|
-
return /* @__PURE__ */
|
|
8311
|
+
return /* @__PURE__ */ import_react64.default.createElement("svg", {
|
|
8261
8312
|
className: (0, import_clsx30.default)("h-6 w-6 shrink-0 text-primary-foreground transition-all disabled:bg-gray-200 ", directionStyle),
|
|
8262
8313
|
fill: "currentColor",
|
|
8263
8314
|
viewBox: "0 0 20 20"
|
|
8264
|
-
}, /* @__PURE__ */
|
|
8315
|
+
}, /* @__PURE__ */ import_react64.default.createElement("path", {
|
|
8265
8316
|
fillRule: "evenodd",
|
|
8266
8317
|
d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",
|
|
8267
8318
|
clipRule: "evenodd"
|
|
8268
8319
|
}));
|
|
8269
8320
|
};
|
|
8270
8321
|
// src/layout/HawaContainer.tsx
|
|
8271
|
-
var
|
|
8322
|
+
var import_react65 = __toESM(require("react"));
|
|
8272
8323
|
var import_clsx31 = __toESM(require("clsx"));
|
|
8273
8324
|
var HawaContainer = function(_param) {
|
|
8274
8325
|
var _param_maxWidth = _param.maxWidth, maxWidth = _param_maxWidth === void 0 ? "normal" : _param_maxWidth, _param_variant = _param.variant, variant = _param_variant === void 0 ? "contained" : _param_variant, _param_centered = _param.centered, centered = _param_centered === void 0 ? false : _param_centered, _param_direction = _param.direction, direction = _param_direction === void 0 ? "ltr" : _param_direction, props = _object_without_properties(_param, [
|
|
@@ -8288,41 +8339,41 @@ var HawaContainer = function(_param) {
|
|
|
8288
8339
|
outlined: "bg-transparent border border-black w-fit",
|
|
8289
8340
|
neobrutalism: "shadow-neobrutalism border-4 border-black bg-white"
|
|
8290
8341
|
};
|
|
8291
|
-
return /* @__PURE__ */
|
|
8342
|
+
return /* @__PURE__ */ import_react65.default.createElement("div", {
|
|
8292
8343
|
className: (0, import_clsx31.default)(defaultStyle, maxWidthStyles[maxWidth], variantStyles2[variant], centered ? "flex items-center text-center" : ""),
|
|
8293
8344
|
dir: direction
|
|
8294
8345
|
}, props.children);
|
|
8295
8346
|
};
|
|
8296
8347
|
// src/layout/HawaGrid.tsx
|
|
8297
|
-
var
|
|
8348
|
+
var import_react66 = __toESM(require("react"));
|
|
8298
8349
|
var HawaGrid = function(props) {
|
|
8299
8350
|
return(// [&>*:not(:first-child)]:mt-8
|
|
8300
|
-
/* @__PURE__ */
|
|
8351
|
+
/* @__PURE__ */ import_react66.default.createElement("div", {
|
|
8301
8352
|
className: " columns-1 gap-5 sm:columns-2 sm:gap-8 md:columns-3 lg:columns-4 [&>*:not(:first-child)]:mt-8"
|
|
8302
8353
|
}, props.children));
|
|
8303
8354
|
};
|
|
8304
8355
|
// src/layout/AppSidebar.tsx
|
|
8305
|
-
var
|
|
8356
|
+
var import_react67 = __toESM(require("react"));
|
|
8306
8357
|
var AppSidebar = function(param) {
|
|
8307
8358
|
var isOpen = param.isOpen, onClose = param.onClose, items = param.items;
|
|
8308
8359
|
if (!isOpen) {
|
|
8309
8360
|
return null;
|
|
8310
8361
|
}
|
|
8311
|
-
return /* @__PURE__ */
|
|
8362
|
+
return /* @__PURE__ */ import_react67.default.createElement("div", {
|
|
8312
8363
|
className: "fixed inset-0 z-40 flex bg-gray-600 bg-opacity-75"
|
|
8313
|
-
}, /* @__PURE__ */
|
|
8364
|
+
}, /* @__PURE__ */ import_react67.default.createElement("div", {
|
|
8314
8365
|
className: "w-1/3 rounded-l-lg bg-gray-800 shadow-2xl"
|
|
8315
|
-
}, /* @__PURE__ */
|
|
8366
|
+
}, /* @__PURE__ */ import_react67.default.createElement("button", {
|
|
8316
8367
|
onClick: onClose,
|
|
8317
8368
|
className: "p-4 text-gray-400 hover:text-white focus:text-white focus:outline-none"
|
|
8318
|
-
}, "Close"), /* @__PURE__ */
|
|
8319
|
-
return /* @__PURE__ */
|
|
8369
|
+
}, "Close"), /* @__PURE__ */ import_react67.default.createElement("nav", null, items.map(function(item, i) {
|
|
8370
|
+
return /* @__PURE__ */ import_react67.default.createElement("a", {
|
|
8320
8371
|
key: i,
|
|
8321
8372
|
href: "#",
|
|
8322
8373
|
onClick: item.onClick,
|
|
8323
8374
|
className: "block p-4 font-bold text-white hover:bg-gray-700 hover:text-gray-400"
|
|
8324
8375
|
}, item.label);
|
|
8325
|
-
}))), /* @__PURE__ */
|
|
8376
|
+
}))), /* @__PURE__ */ import_react67.default.createElement("div", {
|
|
8326
8377
|
className: "w-2/3 bg-gray-50"
|
|
8327
8378
|
}));
|
|
8328
8379
|
};
|
|
@@ -8330,13 +8381,30 @@ var AppSidebar = function(param) {
|
|
|
8330
8381
|
var import_bs = require("react-icons/bs");
|
|
8331
8382
|
var import_fa2 = require("react-icons/fa");
|
|
8332
8383
|
var Footer = function(_param) {
|
|
8333
|
-
var props =
|
|
8384
|
+
var _param_variation = _param.variation, variation = _param_variation === void 0 ? "default" : _param_variation, props = _object_without_properties(_param, [
|
|
8385
|
+
"variation"
|
|
8386
|
+
]);
|
|
8334
8387
|
var _props_footerLinks;
|
|
8388
|
+
var variationStyles = {
|
|
8389
|
+
default: "rounded border",
|
|
8390
|
+
minimal: "border-t"
|
|
8391
|
+
};
|
|
8335
8392
|
return /* @__PURE__ */ React.createElement("div", {
|
|
8336
|
-
className: "
|
|
8337
|
-
},
|
|
8338
|
-
className: "
|
|
8339
|
-
},
|
|
8393
|
+
className: cn("flex w-full flex-row items-center justify-between gap-8 rounded bg-background p-4", variationStyles[variation])
|
|
8394
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
8395
|
+
className: "flex flex-col items-center gap-2"
|
|
8396
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
8397
|
+
className: "flex flex-row items-center gap-2"
|
|
8398
|
+
}, props.logoURL && /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("img", {
|
|
8399
|
+
className: "h-8",
|
|
8400
|
+
src: props.logoURL
|
|
8401
|
+
})), props.logoText && /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("div", {
|
|
8402
|
+
className: "text-2xl font-bold text-primary"
|
|
8403
|
+
}, props.logoText))), props.copyRights && props.footerLinks && /* @__PURE__ */ React.createElement("div", {
|
|
8404
|
+
className: "text-xs text-muted-foreground"
|
|
8405
|
+
}, "\xa9 ", props.copyRights, " ", /* @__PURE__ */ new Date().getFullYear())), props.copyRights && !props.footerLinks && /* @__PURE__ */ React.createElement("div", {
|
|
8406
|
+
className: "text-xs text-muted-foreground"
|
|
8407
|
+
}, "\xa9 ", props.copyRights, " ", /* @__PURE__ */ new Date().getFullYear()), (_props_footerLinks = props.footerLinks) === null || _props_footerLinks === void 0 ? void 0 : _props_footerLinks.map(function(pagesSection) {
|
|
8340
8408
|
return /* @__PURE__ */ React.createElement("div", {
|
|
8341
8409
|
className: "flex w-32 flex-col gap-2"
|
|
8342
8410
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
@@ -8351,51 +8419,55 @@ var Footer = function(_param) {
|
|
|
8351
8419
|
})));
|
|
8352
8420
|
}), props.socialLinks && /* @__PURE__ */ React.createElement("div", {
|
|
8353
8421
|
className: "flex flex-row gap-2"
|
|
8354
|
-
}, props.socialLinks.twitter && /* @__PURE__ */ React.createElement(
|
|
8355
|
-
|
|
8356
|
-
|
|
8357
|
-
|
|
8358
|
-
|
|
8359
|
-
|
|
8360
|
-
}, /* @__PURE__ */ React.createElement(
|
|
8361
|
-
|
|
8422
|
+
}, props.socialLinks.twitter && /* @__PURE__ */ React.createElement(Button, {
|
|
8423
|
+
size: "smallIcon",
|
|
8424
|
+
variant: "ghost"
|
|
8425
|
+
}, /* @__PURE__ */ React.createElement(import_bs.BsTwitter, null)), props.socialLinks.instagram && /* @__PURE__ */ React.createElement(Button, {
|
|
8426
|
+
size: "smallIcon",
|
|
8427
|
+
variant: "ghost"
|
|
8428
|
+
}, /* @__PURE__ */ React.createElement(import_bs.BsInstagram, null)), props.socialLinks.tiktok && /* @__PURE__ */ React.createElement(Button, {
|
|
8429
|
+
size: "smallIcon",
|
|
8430
|
+
variant: "ghost"
|
|
8431
|
+
}, /* @__PURE__ */ React.createElement(import_fa2.FaTiktok, null)), props.socialLinks.snapchat && /* @__PURE__ */ React.createElement(Button, {
|
|
8432
|
+
size: "smallIcon",
|
|
8433
|
+
variant: "ghost"
|
|
8362
8434
|
}, /* @__PURE__ */ React.createElement(import_fa2.FaSnapchatGhost, null))));
|
|
8363
8435
|
};
|
|
8364
8436
|
// src/layout/Banner.tsx
|
|
8365
|
-
var
|
|
8437
|
+
var import_react68 = __toESM(require("react"));
|
|
8366
8438
|
var import_clsx32 = __toESM(require("clsx"));
|
|
8367
8439
|
var HawaBanner = function(_param) {
|
|
8368
8440
|
var _param_design = _param.design, design = _param_design === void 0 ? "floating" : _param_design, props = _object_without_properties(_param, [
|
|
8369
8441
|
"design"
|
|
8370
8442
|
]);
|
|
8371
|
-
var bannerRef = (0,
|
|
8372
|
-
var _ref = _sliced_to_array((0,
|
|
8443
|
+
var bannerRef = (0, import_react68.useRef)(null);
|
|
8444
|
+
var _ref = _sliced_to_array((0, import_react68.useState)(false), 2), closed = _ref[0], setClosed = _ref[1];
|
|
8373
8445
|
var bannerStyle = {
|
|
8374
8446
|
floating: "left-1/2 z-50 w-[calc(100%-2rem)] -translate-x-1/2 lg:max-w-7xl p-4 rounded",
|
|
8375
8447
|
default: "w-[calc(100%)] left-0 z-50 right-0 rounded-none p-2"
|
|
8376
8448
|
};
|
|
8377
|
-
return /* @__PURE__ */
|
|
8449
|
+
return /* @__PURE__ */ import_react68.default.createElement("div", {
|
|
8378
8450
|
ref: bannerRef
|
|
8379
|
-
}, /* @__PURE__ */
|
|
8451
|
+
}, /* @__PURE__ */ import_react68.default.createElement("div", {
|
|
8380
8452
|
dir: props.direction,
|
|
8381
8453
|
className: (0, import_clsx32.default)(bannerStyle[design], "fixed flex flex-col justify-between border border-gray-100 bg-white shadow-sm transition-all dark:border-gray-600 dark:bg-gray-700 md:flex-row md:gap-4 ", props.position === "top" ? design === "floating" ? "top-6" : "top-0" : design === "floating" ? "bottom-6" : "bottom-0", closed ? "opacity-0" : "opacity-100")
|
|
8382
|
-
}, /* @__PURE__ */
|
|
8454
|
+
}, /* @__PURE__ */ import_react68.default.createElement("div", {
|
|
8383
8455
|
className: "mb-3 flex w-full flex-col items-center justify-start md:mb-0 md:flex-row md:items-center"
|
|
8384
|
-
}, /* @__PURE__ */
|
|
8456
|
+
}, /* @__PURE__ */ import_react68.default.createElement("div", {
|
|
8385
8457
|
className: (0, import_clsx32.default)(props.direction === "rtl" ? "md:ml-4 md:border-l md:pl-4" : "md:mr-4 md:border-r md:pr-4", "mb-2 flex items-center border-gray-200 dark:border-gray-600 md:mb-0 md:mr-4 md:pr-4")
|
|
8386
|
-
}, props.logoURL && /* @__PURE__ */
|
|
8458
|
+
}, props.logoURL && /* @__PURE__ */ import_react68.default.createElement("img", {
|
|
8387
8459
|
src: props.logoURL,
|
|
8388
8460
|
className: "mr-2 h-6",
|
|
8389
8461
|
alt: "Flowbite Logo"
|
|
8390
|
-
}), props.title && /* @__PURE__ */
|
|
8462
|
+
}), props.title && /* @__PURE__ */ import_react68.default.createElement("span", {
|
|
8391
8463
|
className: "self-center whitespace-nowrap text-lg font-semibold dark:text-white"
|
|
8392
|
-
}, props.title)), props.text && /* @__PURE__ */
|
|
8464
|
+
}, props.title)), props.text && /* @__PURE__ */ import_react68.default.createElement("p", {
|
|
8393
8465
|
className: (0, import_clsx32.default)("m-0 flex items-center text-center text-sm font-normal text-gray-500 dark:text-gray-400 ", props.direction === "rtl" ? "md:text-right" : "md:text-left")
|
|
8394
|
-
}, props.text)), props.actionText && /* @__PURE__ */
|
|
8466
|
+
}, props.text)), props.actionText && /* @__PURE__ */ import_react68.default.createElement("div", {
|
|
8395
8467
|
className: (0, import_clsx32.default)("flex flex-shrink-0 items-center justify-center ", props.direction === "rtl" ? "ml-0 md:ml-10" : "mr-0 md:mr-10")
|
|
8396
|
-
}, /* @__PURE__ */
|
|
8468
|
+
}, /* @__PURE__ */ import_react68.default.createElement(HawaButton, {
|
|
8397
8469
|
onClick: props.onActionClick
|
|
8398
|
-
}, props.actionText)), /* @__PURE__ */
|
|
8470
|
+
}, props.actionText)), /* @__PURE__ */ import_react68.default.createElement("button", {
|
|
8399
8471
|
type: "button",
|
|
8400
8472
|
className: (0, import_clsx32.default)("absolute top-2 inline-flex h-9 w-9 items-center justify-center rounded-inner p-1.5 text-gray-400 transition-all hover:text-gray-900 focus:ring-2 focus:ring-gray-300 dark:bg-gray-800 dark:text-gray-500 dark:hover:bg-gray-700 dark:hover:text-white", props.direction === "rtl" ? "left-2" : "right-2"),
|
|
8401
8473
|
"data-dismiss-target": "#alert-default",
|
|
@@ -8406,40 +8478,40 @@ var HawaBanner = function(_param) {
|
|
|
8406
8478
|
bannerRef.current.removeChild(bannerRef.current.children[0]);
|
|
8407
8479
|
}, 200);
|
|
8408
8480
|
}
|
|
8409
|
-
}, /* @__PURE__ */
|
|
8481
|
+
}, /* @__PURE__ */ import_react68.default.createElement("span", {
|
|
8410
8482
|
className: "sr-only"
|
|
8411
|
-
}, "Close"), /* @__PURE__ */
|
|
8483
|
+
}, "Close"), /* @__PURE__ */ import_react68.default.createElement("svg", {
|
|
8412
8484
|
"aria-hidden": "true",
|
|
8413
8485
|
className: "h-5 w-5",
|
|
8414
8486
|
fill: "currentColor",
|
|
8415
8487
|
viewBox: "0 0 20 20"
|
|
8416
|
-
}, /* @__PURE__ */
|
|
8488
|
+
}, /* @__PURE__ */ import_react68.default.createElement("path", {
|
|
8417
8489
|
fillRule: "evenodd",
|
|
8418
8490
|
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
8419
8491
|
clipRule: "evenodd"
|
|
8420
8492
|
})))));
|
|
8421
8493
|
};
|
|
8422
8494
|
// src/blocks/Account/UserProfileForm.tsx
|
|
8423
|
-
var
|
|
8495
|
+
var import_react69 = __toESM(require("react"));
|
|
8424
8496
|
var import_react_hook_form = require("react-hook-form");
|
|
8425
8497
|
var UserProfileForm = function(props) {
|
|
8426
8498
|
var methods = (0, import_react_hook_form.useForm)();
|
|
8427
8499
|
var inputs = props.inputs;
|
|
8428
8500
|
var errors = methods.formState.errors, handleSubmit = methods.handleSubmit, control = methods.control;
|
|
8429
8501
|
var _field_value, _field_value1, _field_value2, _field_value3;
|
|
8430
|
-
return /* @__PURE__ */
|
|
8502
|
+
return /* @__PURE__ */ import_react69.default.createElement(Card, null, /* @__PURE__ */ import_react69.default.createElement("form", {
|
|
8431
8503
|
onSubmit: handleSubmit(function(e) {
|
|
8432
8504
|
return props.handleUpdateProfile(e);
|
|
8433
8505
|
})
|
|
8434
|
-
}, /* @__PURE__ */
|
|
8506
|
+
}, /* @__PURE__ */ import_react69.default.createElement(CardContent, {
|
|
8435
8507
|
headless: true
|
|
8436
|
-
}, /* @__PURE__ */
|
|
8508
|
+
}, /* @__PURE__ */ import_react69.default.createElement(import_react_hook_form.FormProvider, _object_spread({}, methods), /* @__PURE__ */ import_react69.default.createElement(import_react_hook_form.Controller, {
|
|
8437
8509
|
control: control,
|
|
8438
8510
|
name: "fullName",
|
|
8439
8511
|
render: function(param) {
|
|
8440
8512
|
var field = param.field;
|
|
8441
8513
|
var _errors_fullName;
|
|
8442
|
-
return /* @__PURE__ */
|
|
8514
|
+
return /* @__PURE__ */ import_react69.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
8443
8515
|
width: "full",
|
|
8444
8516
|
type: "text",
|
|
8445
8517
|
label: props.texts.fullNameLabel,
|
|
@@ -8449,22 +8521,22 @@ var UserProfileForm = function(props) {
|
|
|
8449
8521
|
value: (_field_value = field.value) !== null && _field_value !== void 0 ? _field_value : ""
|
|
8450
8522
|
}));
|
|
8451
8523
|
}
|
|
8452
|
-
}), /* @__PURE__ */
|
|
8524
|
+
}), /* @__PURE__ */ import_react69.default.createElement(import_react_hook_form.Controller, {
|
|
8453
8525
|
control: control,
|
|
8454
8526
|
name: "phoneNumber",
|
|
8455
8527
|
render: function(param) {
|
|
8456
8528
|
var field = param.field;
|
|
8457
|
-
return /* @__PURE__ */
|
|
8529
|
+
return /* @__PURE__ */ import_react69.default.createElement(HawaPhoneInput, {
|
|
8458
8530
|
label: "Phone number"
|
|
8459
8531
|
});
|
|
8460
8532
|
}
|
|
8461
|
-
}), /* @__PURE__ */
|
|
8533
|
+
}), /* @__PURE__ */ import_react69.default.createElement(import_react_hook_form.Controller, {
|
|
8462
8534
|
control: control,
|
|
8463
8535
|
name: "email",
|
|
8464
8536
|
render: function(param) {
|
|
8465
8537
|
var field = param.field;
|
|
8466
8538
|
var _errors_email;
|
|
8467
|
-
return /* @__PURE__ */
|
|
8539
|
+
return /* @__PURE__ */ import_react69.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
8468
8540
|
width: "full",
|
|
8469
8541
|
type: "text",
|
|
8470
8542
|
label: props.texts.emailLabel,
|
|
@@ -8481,13 +8553,13 @@ var UserProfileForm = function(props) {
|
|
|
8481
8553
|
message: props.texts.emailInvalidText
|
|
8482
8554
|
}
|
|
8483
8555
|
}
|
|
8484
|
-
}), /* @__PURE__ */
|
|
8556
|
+
}), /* @__PURE__ */ import_react69.default.createElement(import_react_hook_form.Controller, {
|
|
8485
8557
|
control: control,
|
|
8486
8558
|
name: "password",
|
|
8487
8559
|
render: function(param) {
|
|
8488
8560
|
var field = param.field;
|
|
8489
8561
|
var _errors_password;
|
|
8490
|
-
return /* @__PURE__ */
|
|
8562
|
+
return /* @__PURE__ */ import_react69.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
8491
8563
|
width: "full",
|
|
8492
8564
|
type: "password",
|
|
8493
8565
|
label: props.texts.passwordLabel,
|
|
@@ -8500,13 +8572,13 @@ var UserProfileForm = function(props) {
|
|
|
8500
8572
|
rules: {
|
|
8501
8573
|
required: props.texts.passwordRequiredText
|
|
8502
8574
|
}
|
|
8503
|
-
}), /* @__PURE__ */
|
|
8575
|
+
}), /* @__PURE__ */ import_react69.default.createElement(import_react_hook_form.Controller, {
|
|
8504
8576
|
control: control,
|
|
8505
8577
|
name: "confirmPassword",
|
|
8506
8578
|
render: function(param) {
|
|
8507
8579
|
var field = param.field;
|
|
8508
8580
|
var _errors_confirmPassword;
|
|
8509
|
-
return /* @__PURE__ */
|
|
8581
|
+
return /* @__PURE__ */ import_react69.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
8510
8582
|
width: "full",
|
|
8511
8583
|
type: "password",
|
|
8512
8584
|
label: props.texts.confirmPasswordLabel,
|
|
@@ -8519,24 +8591,24 @@ var UserProfileForm = function(props) {
|
|
|
8519
8591
|
rules: {
|
|
8520
8592
|
required: props.texts.confirmPasswordRequiredText
|
|
8521
8593
|
}
|
|
8522
|
-
}))), /* @__PURE__ */
|
|
8594
|
+
}))), /* @__PURE__ */ import_react69.default.createElement(CardFooter, null, /* @__PURE__ */ import_react69.default.createElement(Button, {
|
|
8523
8595
|
className: "w-full",
|
|
8524
8596
|
type: "submit"
|
|
8525
8597
|
}, props.texts.updateProfile))));
|
|
8526
8598
|
};
|
|
8527
8599
|
// src/blocks/Account/UserSettingsForm.tsx
|
|
8528
|
-
var
|
|
8600
|
+
var import_react70 = __toESM(require("react"));
|
|
8529
8601
|
var UserSettingsForm = function(props) {
|
|
8530
|
-
return /* @__PURE__ */
|
|
8602
|
+
return /* @__PURE__ */ import_react70.default.createElement(Card, null, /* @__PURE__ */ import_react70.default.createElement(CardContent, {
|
|
8531
8603
|
headless: true
|
|
8532
|
-
}, /* @__PURE__ */
|
|
8604
|
+
}, /* @__PURE__ */ import_react70.default.createElement("div", {
|
|
8533
8605
|
className: "mb-2 text-sm font-bold"
|
|
8534
|
-
}, props.blockTitle), /* @__PURE__ */
|
|
8606
|
+
}, props.blockTitle), /* @__PURE__ */ import_react70.default.createElement("div", {
|
|
8535
8607
|
className: "flex flex-col gap-4 rounded p-2"
|
|
8536
8608
|
}, props.children)));
|
|
8537
8609
|
};
|
|
8538
8610
|
// src/blocks/AuthForms/AppLanding.tsx
|
|
8539
|
-
var
|
|
8611
|
+
var import_react71 = __toESM(require("react"));
|
|
8540
8612
|
// src/elements/Icons.tsx
|
|
8541
8613
|
var Icons = {
|
|
8542
8614
|
logo: function(props) {
|
|
@@ -8712,38 +8784,37 @@ var Icons = {
|
|
|
8712
8784
|
};
|
|
8713
8785
|
// src/blocks/AuthForms/AppLanding.tsx
|
|
8714
8786
|
var AppLanding = function(props) {
|
|
8715
|
-
return /* @__PURE__ */
|
|
8787
|
+
return /* @__PURE__ */ import_react71.default.createElement("div", null, /* @__PURE__ */ import_react71.default.createElement(Card, null, /* @__PURE__ */ import_react71.default.createElement(CardContent, {
|
|
8716
8788
|
headless: true,
|
|
8717
8789
|
className: "flex flex-col gap-6"
|
|
8718
|
-
}, /* @__PURE__ */
|
|
8790
|
+
}, /* @__PURE__ */ import_react71.default.createElement(Button, {
|
|
8719
8791
|
className: "flex flex-row items-center gap-2",
|
|
8720
8792
|
variant: "outline"
|
|
8721
|
-
}, /* @__PURE__ */
|
|
8793
|
+
}, /* @__PURE__ */ import_react71.default.createElement(Icons.google, {
|
|
8722
8794
|
className: "h-4 w-4"
|
|
8723
|
-
}), "Continue With Google"), /* @__PURE__ */
|
|
8795
|
+
}), "Continue With Google"), /* @__PURE__ */ import_react71.default.createElement(Button, {
|
|
8724
8796
|
className: "flex flex-row items-center gap-2",
|
|
8725
8797
|
variant: "outline"
|
|
8726
|
-
}, /* @__PURE__ */
|
|
8798
|
+
}, /* @__PURE__ */ import_react71.default.createElement(Icons.twitter, {
|
|
8727
8799
|
className: "h-4 w-4"
|
|
8728
|
-
}), "Continue With Twitter"), /* @__PURE__ */
|
|
8800
|
+
}), "Continue With Twitter"), /* @__PURE__ */ import_react71.default.createElement(Button, {
|
|
8729
8801
|
className: "flex flex-row items-center gap-2",
|
|
8730
8802
|
variant: "outline"
|
|
8731
|
-
}, /* @__PURE__ */
|
|
8803
|
+
}, /* @__PURE__ */ import_react71.default.createElement(Icons.apple, {
|
|
8732
8804
|
className: "h-4 w-4"
|
|
8733
|
-
}), "Continue With Apple"), /* @__PURE__ */
|
|
8805
|
+
}), "Continue With Apple"), /* @__PURE__ */ import_react71.default.createElement(Button, {
|
|
8734
8806
|
className: "flex flex-row items-center gap-2",
|
|
8735
8807
|
variant: "outline"
|
|
8736
|
-
}, /* @__PURE__ */
|
|
8808
|
+
}, /* @__PURE__ */ import_react71.default.createElement(Icons.mail, {
|
|
8737
8809
|
className: "h-4 w-4"
|
|
8738
|
-
}), "Continue With Email"), /* @__PURE__ */
|
|
8739
|
-
|
|
8740
|
-
|
|
8741
|
-
|
|
8742
|
-
href: "#",
|
|
8810
|
+
}), "Continue With Email"), !props.withoutSignUp && /* @__PURE__ */ import_react71.default.createElement("div", {
|
|
8811
|
+
className: "p-3 text-center text-sm font-normal dark:text-gray-300"
|
|
8812
|
+
}, props.texts.newUserText, " ", /* @__PURE__ */ import_react71.default.createElement("span", {
|
|
8813
|
+
onClick: props.handleRouteToSignUp,
|
|
8743
8814
|
className: "clickable-link"
|
|
8744
|
-
},
|
|
8815
|
+
}, props.texts.createAccount)))), /* @__PURE__ */ import_react71.default.createElement("div", {
|
|
8745
8816
|
className: "mt-6 flex flex-row justify-between"
|
|
8746
|
-
}, /* @__PURE__ */
|
|
8817
|
+
}, /* @__PURE__ */ import_react71.default.createElement(HawaRadio, {
|
|
8747
8818
|
onChangeTab: props.handleLanguage,
|
|
8748
8819
|
design: "tabs",
|
|
8749
8820
|
options: [
|
|
@@ -8756,20 +8827,20 @@ var AppLanding = function(props) {
|
|
|
8756
8827
|
label: "English"
|
|
8757
8828
|
}
|
|
8758
8829
|
]
|
|
8759
|
-
}), /* @__PURE__ */
|
|
8830
|
+
}), /* @__PURE__ */ import_react71.default.createElement(HawaRadio, {
|
|
8760
8831
|
onChangeTab: props.handleColorMode,
|
|
8761
8832
|
design: "tabs",
|
|
8762
8833
|
options: [
|
|
8763
8834
|
{
|
|
8764
8835
|
value: "light",
|
|
8765
|
-
label: /* @__PURE__ */
|
|
8836
|
+
label: /* @__PURE__ */ import_react71.default.createElement("svg", {
|
|
8766
8837
|
width: "15",
|
|
8767
8838
|
height: "15",
|
|
8768
8839
|
viewBox: "0 0 15 15",
|
|
8769
8840
|
fill: "none",
|
|
8770
8841
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8771
8842
|
className: "h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90"
|
|
8772
|
-
}, /* @__PURE__ */
|
|
8843
|
+
}, /* @__PURE__ */ import_react71.default.createElement("path", {
|
|
8773
8844
|
d: "M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z",
|
|
8774
8845
|
fill: "currentColor",
|
|
8775
8846
|
fillRule: "evenodd",
|
|
@@ -8778,7 +8849,7 @@ var AppLanding = function(props) {
|
|
|
8778
8849
|
},
|
|
8779
8850
|
{
|
|
8780
8851
|
value: "dark",
|
|
8781
|
-
label: /* @__PURE__ */
|
|
8852
|
+
label: /* @__PURE__ */ import_react71.default.createElement("svg", {
|
|
8782
8853
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8783
8854
|
width: "24",
|
|
8784
8855
|
height: "24",
|
|
@@ -8789,7 +8860,7 @@ var AppLanding = function(props) {
|
|
|
8789
8860
|
strokeLinecap: "round",
|
|
8790
8861
|
strokeLinejoin: "round",
|
|
8791
8862
|
className: "h-[1.2rem] w-[1.2rem] transition-all dark:rotate-0 dark:scale-100"
|
|
8792
|
-
}, /* @__PURE__ */
|
|
8863
|
+
}, /* @__PURE__ */ import_react71.default.createElement("path", {
|
|
8793
8864
|
d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"
|
|
8794
8865
|
}))
|
|
8795
8866
|
}
|
|
@@ -8797,26 +8868,26 @@ var AppLanding = function(props) {
|
|
|
8797
8868
|
})));
|
|
8798
8869
|
};
|
|
8799
8870
|
// src/blocks/AuthForms/SignInPhone.tsx
|
|
8800
|
-
var
|
|
8871
|
+
var import_react72 = __toESM(require("react"));
|
|
8801
8872
|
var import_react_hook_form2 = require("react-hook-form");
|
|
8802
8873
|
var SignInPhone = function(props) {
|
|
8803
8874
|
var methods = (0, import_react_hook_form2.useForm)();
|
|
8804
8875
|
var errors = methods.formState.errors, handleSubmit = methods.handleSubmit, control = methods.control;
|
|
8805
|
-
var _ref = _sliced_to_array((0,
|
|
8876
|
+
var _ref = _sliced_to_array((0, import_react72.useState)(""), 2), userPhone = _ref[0], setUserPhone = _ref[1];
|
|
8806
8877
|
var _props_country, _props_label;
|
|
8807
|
-
return /* @__PURE__ */
|
|
8878
|
+
return /* @__PURE__ */ import_react72.default.createElement(Card, null, /* @__PURE__ */ import_react72.default.createElement(CardContent, {
|
|
8808
8879
|
headless: true
|
|
8809
|
-
}, /* @__PURE__ */
|
|
8880
|
+
}, /* @__PURE__ */ import_react72.default.createElement("form", {
|
|
8810
8881
|
onSubmit: function(e) {
|
|
8811
8882
|
e.preventDefault();
|
|
8812
8883
|
props.handleSignIn(userPhone);
|
|
8813
8884
|
}
|
|
8814
|
-
}, /* @__PURE__ */
|
|
8885
|
+
}, /* @__PURE__ */ import_react72.default.createElement(import_react_hook_form2.Controller, {
|
|
8815
8886
|
control: control,
|
|
8816
8887
|
name: "phone",
|
|
8817
8888
|
render: function(param) {
|
|
8818
8889
|
var field = param.field;
|
|
8819
|
-
return /* @__PURE__ */
|
|
8890
|
+
return /* @__PURE__ */ import_react72.default.createElement(HawaPhoneInput, _object_spread({
|
|
8820
8891
|
country: (_props_country = props.country) !== null && _props_country !== void 0 ? _props_country : "",
|
|
8821
8892
|
label: (_props_label = props.label) !== null && _props_label !== void 0 ? _props_label : "",
|
|
8822
8893
|
handleChange: function(e) {
|
|
@@ -8827,39 +8898,39 @@ var SignInPhone = function(props) {
|
|
|
8827
8898
|
rules: {
|
|
8828
8899
|
required: props.phoneRequiredText
|
|
8829
8900
|
}
|
|
8830
|
-
}), /* @__PURE__ */
|
|
8901
|
+
}), /* @__PURE__ */ import_react72.default.createElement("div", {
|
|
8831
8902
|
className: "mt-2"
|
|
8832
|
-
}), /* @__PURE__ */
|
|
8903
|
+
}), /* @__PURE__ */ import_react72.default.createElement(Button, {
|
|
8833
8904
|
className: "w-full"
|
|
8834
8905
|
}, props.SignInButtonText))));
|
|
8835
8906
|
};
|
|
8836
8907
|
// src/blocks/AuthForms/SignInForm.tsx
|
|
8837
|
-
var
|
|
8908
|
+
var import_react73 = __toESM(require("react"));
|
|
8838
8909
|
var import_react_hook_form3 = require("react-hook-form");
|
|
8839
8910
|
var SignInForm = function(props) {
|
|
8840
8911
|
var _ref = (0, import_react_hook_form3.useForm)(), errors = _ref.formState.errors, handleSubmit = _ref.handleSubmit, control = _ref.control;
|
|
8841
8912
|
var _field_value, _field_value1;
|
|
8842
|
-
return /* @__PURE__ */
|
|
8913
|
+
return /* @__PURE__ */ import_react73.default.createElement("div", {
|
|
8843
8914
|
className: "flex flex-col gap-4"
|
|
8844
|
-
}, /* @__PURE__ */
|
|
8915
|
+
}, /* @__PURE__ */ import_react73.default.createElement(Card, {
|
|
8845
8916
|
dir: props.direction
|
|
8846
|
-
}, /* @__PURE__ */
|
|
8917
|
+
}, /* @__PURE__ */ import_react73.default.createElement(CardContent, {
|
|
8847
8918
|
headless: true
|
|
8848
|
-
}, /* @__PURE__ */
|
|
8919
|
+
}, /* @__PURE__ */ import_react73.default.createElement("form", {
|
|
8849
8920
|
onSubmit: handleSubmit(function(e) {
|
|
8850
8921
|
return props.handleSignIn(e);
|
|
8851
8922
|
})
|
|
8852
|
-
}, props.showError && /* @__PURE__ */
|
|
8923
|
+
}, props.showError && /* @__PURE__ */ import_react73.default.createElement(HawaAlert, {
|
|
8853
8924
|
title: props.errorTitle,
|
|
8854
8925
|
text: props.errorText,
|
|
8855
8926
|
severity: "error"
|
|
8856
|
-
}), props.signInType === "email" ? /* @__PURE__ */
|
|
8927
|
+
}), props.signInType === "email" ? /* @__PURE__ */ import_react73.default.createElement(import_react_hook_form3.Controller, {
|
|
8857
8928
|
control: control,
|
|
8858
8929
|
name: "email",
|
|
8859
8930
|
render: function(param) {
|
|
8860
8931
|
var field = param.field;
|
|
8861
8932
|
var _errors_email;
|
|
8862
|
-
return /* @__PURE__ */
|
|
8933
|
+
return /* @__PURE__ */ import_react73.default.createElement(HawaTextField, {
|
|
8863
8934
|
width: "full",
|
|
8864
8935
|
type: "text",
|
|
8865
8936
|
autoComplete: "email",
|
|
@@ -8877,14 +8948,14 @@ var SignInForm = function(props) {
|
|
|
8877
8948
|
message: props.texts.emailInvalidText
|
|
8878
8949
|
}
|
|
8879
8950
|
}
|
|
8880
|
-
}) : props.signInType === "username" ? /* @__PURE__ */
|
|
8951
|
+
}) : props.signInType === "username" ? /* @__PURE__ */ import_react73.default.createElement(import_react_hook_form3.Controller, {
|
|
8881
8952
|
control: control,
|
|
8882
8953
|
name: "username",
|
|
8883
8954
|
render: function(param) {
|
|
8884
8955
|
var field = param.field;
|
|
8885
8956
|
var _errors_username;
|
|
8886
8957
|
var _field_value;
|
|
8887
|
-
return /* @__PURE__ */
|
|
8958
|
+
return /* @__PURE__ */ import_react73.default.createElement(HawaTextField, {
|
|
8888
8959
|
width: "full",
|
|
8889
8960
|
type: "text",
|
|
8890
8961
|
autoComplete: "username",
|
|
@@ -8898,25 +8969,25 @@ var SignInForm = function(props) {
|
|
|
8898
8969
|
rules: {
|
|
8899
8970
|
required: props.texts.usernameRequired
|
|
8900
8971
|
}
|
|
8901
|
-
}) : /* @__PURE__ */
|
|
8972
|
+
}) : /* @__PURE__ */ import_react73.default.createElement(import_react_hook_form3.Controller, {
|
|
8902
8973
|
control: control,
|
|
8903
8974
|
name: "phone",
|
|
8904
8975
|
render: function(param) {
|
|
8905
8976
|
var field = param.field;
|
|
8906
|
-
return /* @__PURE__ */
|
|
8977
|
+
return /* @__PURE__ */ import_react73.default.createElement(HawaPhoneInput, {
|
|
8907
8978
|
label: "Phone number"
|
|
8908
8979
|
});
|
|
8909
8980
|
},
|
|
8910
8981
|
rules: {
|
|
8911
8982
|
required: props.texts.phoneRequiredText
|
|
8912
8983
|
}
|
|
8913
|
-
}), props.signInType !== "phone" && /* @__PURE__ */
|
|
8984
|
+
}), props.signInType !== "phone" && /* @__PURE__ */ import_react73.default.createElement(import_react73.default.Fragment, null, /* @__PURE__ */ import_react73.default.createElement(import_react_hook_form3.Controller, {
|
|
8914
8985
|
control: control,
|
|
8915
8986
|
name: "password",
|
|
8916
8987
|
render: function(param) {
|
|
8917
8988
|
var field = param.field;
|
|
8918
8989
|
var _errors_password;
|
|
8919
|
-
return /* @__PURE__ */
|
|
8990
|
+
return /* @__PURE__ */ import_react73.default.createElement(HawaTextField, {
|
|
8920
8991
|
width: "full",
|
|
8921
8992
|
autoComplete: "current-password",
|
|
8922
8993
|
type: "password",
|
|
@@ -8931,38 +9002,38 @@ var SignInForm = function(props) {
|
|
|
8931
9002
|
required: props.texts.passwordRequiredText,
|
|
8932
9003
|
minLength: 5
|
|
8933
9004
|
}
|
|
8934
|
-
}), !props.withoutResetPassword && /* @__PURE__ */
|
|
9005
|
+
}), !props.withoutResetPassword && /* @__PURE__ */ import_react73.default.createElement("div", {
|
|
8935
9006
|
onClick: props.handleForgotPassword,
|
|
8936
9007
|
className: "mb-3 w-fit cursor-pointer text-xs dark:text-gray-300"
|
|
8937
|
-
}, props.texts.forgotPasswordText)), /* @__PURE__ */
|
|
9008
|
+
}, props.texts.forgotPasswordText)), /* @__PURE__ */ import_react73.default.createElement(Button, {
|
|
8938
9009
|
className: "mt-4 w-full",
|
|
8939
9010
|
isLoading: props.isLoading
|
|
8940
|
-
}, props.texts.signInText), !props.withoutSignUp && /* @__PURE__ */
|
|
8941
|
-
className: "p-3 text-center text-sm font-
|
|
8942
|
-
}, props.texts.newUserText, " ", /* @__PURE__ */
|
|
9011
|
+
}, props.texts.signInText), !props.withoutSignUp && /* @__PURE__ */ import_react73.default.createElement("div", {
|
|
9012
|
+
className: "p-3 text-center text-sm font-normal dark:text-gray-300"
|
|
9013
|
+
}, props.texts.newUserText, " ", /* @__PURE__ */ import_react73.default.createElement("span", {
|
|
8943
9014
|
onClick: props.handleRouteToSignUp,
|
|
8944
9015
|
className: "clickable-link"
|
|
8945
|
-
}, props.texts.createAccount)))), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */
|
|
9016
|
+
}, props.texts.createAccount)))), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ import_react73.default.createElement(CardFooter, {
|
|
8946
9017
|
className: cn(props.logosOnly ? "flex flex-row gap-2 justify-center" : "grid grid-cols-1 gap-2")
|
|
8947
|
-
}, props.viaGoogle && /* @__PURE__ */
|
|
9018
|
+
}, props.viaGoogle && /* @__PURE__ */ import_react73.default.createElement(Button, {
|
|
8948
9019
|
className: "flex flex-row items-center gap-2",
|
|
8949
9020
|
variant: "outline",
|
|
8950
9021
|
onClick: props.handleGoogleSignIn
|
|
8951
|
-
}, /* @__PURE__ */
|
|
9022
|
+
}, /* @__PURE__ */ import_react73.default.createElement(Icons.google, {
|
|
8952
9023
|
className: "h-4 w-4"
|
|
8953
|
-
}), !props.logosOnly && props.texts.signInViaGoogleLabel), props.viaGithub && /* @__PURE__ */
|
|
9024
|
+
}), !props.logosOnly && props.texts.signInViaGoogleLabel), props.viaGithub && /* @__PURE__ */ import_react73.default.createElement(Button, {
|
|
8954
9025
|
className: "flex flex-row items-center gap-2",
|
|
8955
9026
|
variant: "outline",
|
|
8956
9027
|
onClick: props.handleGithubSignIn
|
|
8957
|
-
}, /* @__PURE__ */
|
|
9028
|
+
}, /* @__PURE__ */ import_react73.default.createElement(Icons.gitHub, {
|
|
8958
9029
|
className: "h-4 w-4"
|
|
8959
|
-
}), !props.logosOnly && props.texts.signInViaGithubLabel), props.viaTwitter && /* @__PURE__ */
|
|
9030
|
+
}), !props.logosOnly && props.texts.signInViaGithubLabel), props.viaTwitter && /* @__PURE__ */ import_react73.default.createElement(Button, {
|
|
8960
9031
|
className: "flex flex-row items-center gap-2",
|
|
8961
9032
|
variant: "outline",
|
|
8962
9033
|
onClick: props.handleTwitterSignIn
|
|
8963
|
-
}, /* @__PURE__ */
|
|
9034
|
+
}, /* @__PURE__ */ import_react73.default.createElement(Icons.twitter, {
|
|
8964
9035
|
className: "h-4 w-4"
|
|
8965
|
-
}), !props.logosOnly && props.texts.signInViaTwitterLabel)) : null), /* @__PURE__ */
|
|
9036
|
+
}), !props.logosOnly && props.texts.signInViaTwitterLabel)) : null), /* @__PURE__ */ import_react73.default.createElement(InterfaceSettings, {
|
|
8966
9037
|
currentColorMode: props.currentColorMode,
|
|
8967
9038
|
currentLanguage: props.currentLanguage,
|
|
8968
9039
|
handleColorMode: props.handleColorMode,
|
|
@@ -9017,37 +9088,37 @@ function SignInBlock() {
|
|
|
9017
9088
|
}, "Create account")));
|
|
9018
9089
|
}
|
|
9019
9090
|
// src/blocks/AuthForms/SignUpForm.tsx
|
|
9020
|
-
var
|
|
9091
|
+
var import_react74 = __toESM(require("react"));
|
|
9021
9092
|
var import_react_hook_form4 = require("react-hook-form");
|
|
9022
9093
|
var SignUpForm = function(props) {
|
|
9023
9094
|
var methods = (0, import_react_hook_form4.useForm)();
|
|
9024
9095
|
var errors = methods.formState.errors, handleSubmit = methods.handleSubmit, control = methods.control;
|
|
9025
9096
|
var _field_value, _field_value1, _field_value2;
|
|
9026
|
-
return /* @__PURE__ */
|
|
9097
|
+
return /* @__PURE__ */ import_react74.default.createElement("div", {
|
|
9027
9098
|
className: "flex flex-col gap-4"
|
|
9028
|
-
}, /* @__PURE__ */
|
|
9099
|
+
}, /* @__PURE__ */ import_react74.default.createElement(Card, {
|
|
9029
9100
|
dir: props.direction
|
|
9030
|
-
}, /* @__PURE__ */
|
|
9101
|
+
}, /* @__PURE__ */ import_react74.default.createElement(CardContent, {
|
|
9031
9102
|
headless: true
|
|
9032
|
-
}, /* @__PURE__ */
|
|
9103
|
+
}, /* @__PURE__ */ import_react74.default.createElement("div", null, props.showError && /* @__PURE__ */ import_react74.default.createElement(HawaAlert, {
|
|
9033
9104
|
title: props.errorTitle,
|
|
9034
9105
|
text: props.errorText,
|
|
9035
9106
|
severity: "error"
|
|
9036
|
-
}), /* @__PURE__ */
|
|
9107
|
+
}), /* @__PURE__ */ import_react74.default.createElement(import_react_hook_form4.FormProvider, _object_spread({}, methods), /* @__PURE__ */ import_react74.default.createElement("form", {
|
|
9037
9108
|
onSubmit: handleSubmit(function(e) {
|
|
9038
9109
|
return props.handleSignUp(e);
|
|
9039
9110
|
})
|
|
9040
|
-
}, /* @__PURE__ */
|
|
9111
|
+
}, /* @__PURE__ */ import_react74.default.createElement("div", null, props.signUpFields.map(function(fld, i) {
|
|
9041
9112
|
if (fld === "fullname") {
|
|
9042
9113
|
var _field_value;
|
|
9043
|
-
return /* @__PURE__ */
|
|
9114
|
+
return /* @__PURE__ */ import_react74.default.createElement(import_react_hook_form4.Controller, {
|
|
9044
9115
|
key: i,
|
|
9045
9116
|
control: control,
|
|
9046
9117
|
name: "fullName",
|
|
9047
9118
|
render: function(param) {
|
|
9048
9119
|
var field = param.field;
|
|
9049
9120
|
var _errors_fullName;
|
|
9050
|
-
return /* @__PURE__ */
|
|
9121
|
+
return /* @__PURE__ */ import_react74.default.createElement(HawaTextField, {
|
|
9051
9122
|
width: "full",
|
|
9052
9123
|
type: "text",
|
|
9053
9124
|
label: props.texts.fullNameLabel,
|
|
@@ -9064,14 +9135,14 @@ var SignUpForm = function(props) {
|
|
|
9064
9135
|
}
|
|
9065
9136
|
if (fld === "email") {
|
|
9066
9137
|
var _field_value1;
|
|
9067
|
-
return /* @__PURE__ */
|
|
9138
|
+
return /* @__PURE__ */ import_react74.default.createElement(import_react_hook_form4.Controller, {
|
|
9068
9139
|
key: i,
|
|
9069
9140
|
control: control,
|
|
9070
9141
|
name: "email",
|
|
9071
9142
|
render: function(param) {
|
|
9072
9143
|
var field = param.field;
|
|
9073
9144
|
var _errors_email;
|
|
9074
|
-
return /* @__PURE__ */
|
|
9145
|
+
return /* @__PURE__ */ import_react74.default.createElement(HawaTextField, {
|
|
9075
9146
|
width: "full",
|
|
9076
9147
|
type: "text",
|
|
9077
9148
|
autoComplete: "email",
|
|
@@ -9093,14 +9164,14 @@ var SignUpForm = function(props) {
|
|
|
9093
9164
|
}
|
|
9094
9165
|
if (fld === "username") {
|
|
9095
9166
|
var _field_value2;
|
|
9096
|
-
return /* @__PURE__ */
|
|
9167
|
+
return /* @__PURE__ */ import_react74.default.createElement(import_react_hook_form4.Controller, {
|
|
9097
9168
|
key: i,
|
|
9098
9169
|
control: control,
|
|
9099
9170
|
name: "username",
|
|
9100
9171
|
render: function(param) {
|
|
9101
9172
|
var field = param.field;
|
|
9102
9173
|
var _errors_username;
|
|
9103
|
-
return /* @__PURE__ */
|
|
9174
|
+
return /* @__PURE__ */ import_react74.default.createElement(HawaTextField, {
|
|
9104
9175
|
width: "full",
|
|
9105
9176
|
type: "text",
|
|
9106
9177
|
autoComplete: "username",
|
|
@@ -9116,13 +9187,13 @@ var SignUpForm = function(props) {
|
|
|
9116
9187
|
}
|
|
9117
9188
|
});
|
|
9118
9189
|
}
|
|
9119
|
-
})), /* @__PURE__ */
|
|
9190
|
+
})), /* @__PURE__ */ import_react74.default.createElement(import_react_hook_form4.Controller, {
|
|
9120
9191
|
control: control,
|
|
9121
9192
|
name: "password",
|
|
9122
9193
|
render: function(param) {
|
|
9123
9194
|
var field = param.field;
|
|
9124
9195
|
var _errors_password;
|
|
9125
|
-
return /* @__PURE__ */
|
|
9196
|
+
return /* @__PURE__ */ import_react74.default.createElement(HawaTextField, {
|
|
9126
9197
|
width: "full",
|
|
9127
9198
|
type: "password",
|
|
9128
9199
|
autoComplete: "new-password",
|
|
@@ -9136,13 +9207,13 @@ var SignUpForm = function(props) {
|
|
|
9136
9207
|
rules: {
|
|
9137
9208
|
required: props.texts.passwordRequiredText
|
|
9138
9209
|
}
|
|
9139
|
-
}), /* @__PURE__ */
|
|
9210
|
+
}), /* @__PURE__ */ import_react74.default.createElement(import_react_hook_form4.Controller, {
|
|
9140
9211
|
control: control,
|
|
9141
9212
|
name: "confirm_password",
|
|
9142
9213
|
render: function(param) {
|
|
9143
9214
|
var field = param.field;
|
|
9144
9215
|
var _errors_confirm_password;
|
|
9145
|
-
return /* @__PURE__ */
|
|
9216
|
+
return /* @__PURE__ */ import_react74.default.createElement(HawaTextField, {
|
|
9146
9217
|
width: "full",
|
|
9147
9218
|
type: "password",
|
|
9148
9219
|
autoComplete: "new-password",
|
|
@@ -9156,13 +9227,13 @@ var SignUpForm = function(props) {
|
|
|
9156
9227
|
rules: {
|
|
9157
9228
|
required: props.texts.passwordRequiredText
|
|
9158
9229
|
}
|
|
9159
|
-
}), props.showRefCode && /* @__PURE__ */
|
|
9230
|
+
}), props.showRefCode && /* @__PURE__ */ import_react74.default.createElement(import_react_hook_form4.Controller, {
|
|
9160
9231
|
control: control,
|
|
9161
9232
|
name: "refCode",
|
|
9162
9233
|
render: function(param) {
|
|
9163
9234
|
var field = param.field;
|
|
9164
9235
|
var _errors_password;
|
|
9165
|
-
return /* @__PURE__ */
|
|
9236
|
+
return /* @__PURE__ */ import_react74.default.createElement(HawaTextField, {
|
|
9166
9237
|
width: "full",
|
|
9167
9238
|
type: "text",
|
|
9168
9239
|
label: props.texts.refCode,
|
|
@@ -9172,12 +9243,12 @@ var SignUpForm = function(props) {
|
|
|
9172
9243
|
onChange: field.onChange
|
|
9173
9244
|
});
|
|
9174
9245
|
}
|
|
9175
|
-
}), props.showUserSource && /* @__PURE__ */
|
|
9246
|
+
}), props.showUserSource && /* @__PURE__ */ import_react74.default.createElement("div", null, /* @__PURE__ */ import_react74.default.createElement(import_react_hook_form4.Controller, {
|
|
9176
9247
|
control: control,
|
|
9177
9248
|
name: "reference",
|
|
9178
9249
|
render: function(param) {
|
|
9179
9250
|
var field = param.field;
|
|
9180
|
-
return /* @__PURE__ */
|
|
9251
|
+
return /* @__PURE__ */ import_react74.default.createElement(HawaSelect, {
|
|
9181
9252
|
label: "How did you learn about us?",
|
|
9182
9253
|
isCreatable: false,
|
|
9183
9254
|
isMulti: false,
|
|
@@ -9202,19 +9273,19 @@ var SignUpForm = function(props) {
|
|
|
9202
9273
|
}
|
|
9203
9274
|
});
|
|
9204
9275
|
}
|
|
9205
|
-
})), props.showTermsOption && /* @__PURE__ */
|
|
9276
|
+
})), props.showTermsOption && /* @__PURE__ */ import_react74.default.createElement(import_react_hook_form4.Controller, {
|
|
9206
9277
|
control: control,
|
|
9207
9278
|
name: "terms_accepted",
|
|
9208
9279
|
render: function(param) {
|
|
9209
9280
|
var field = param.field;
|
|
9210
9281
|
var _errors_terms_accepted;
|
|
9211
|
-
return /* @__PURE__ */
|
|
9282
|
+
return /* @__PURE__ */ import_react74.default.createElement(HawaCheckbox, {
|
|
9212
9283
|
id: "terms_accepted",
|
|
9213
9284
|
helperText: (_errors_terms_accepted = errors.terms_accepted) === null || _errors_terms_accepted === void 0 ? void 0 : _errors_terms_accepted.message,
|
|
9214
9285
|
onChange: function(e) {
|
|
9215
9286
|
return field.onChange(e);
|
|
9216
9287
|
},
|
|
9217
|
-
label: /* @__PURE__ */
|
|
9288
|
+
label: /* @__PURE__ */ import_react74.default.createElement("span", null, props.texts.iAcceptText, " ", /* @__PURE__ */ import_react74.default.createElement("a", {
|
|
9218
9289
|
onClick: props.handleRouteToTOS,
|
|
9219
9290
|
className: "clickable-link"
|
|
9220
9291
|
}, props.texts.termsText))
|
|
@@ -9223,46 +9294,46 @@ var SignUpForm = function(props) {
|
|
|
9223
9294
|
rules: {
|
|
9224
9295
|
required: props.texts.termsRequiredText
|
|
9225
9296
|
}
|
|
9226
|
-
}), props.showNewsletterOption && /* @__PURE__ */
|
|
9297
|
+
}), props.showNewsletterOption && /* @__PURE__ */ import_react74.default.createElement(import_react_hook_form4.Controller, {
|
|
9227
9298
|
control: control,
|
|
9228
9299
|
name: "newsletter_accepted",
|
|
9229
9300
|
render: function(param) {
|
|
9230
9301
|
var field = param.field;
|
|
9231
|
-
return /* @__PURE__ */
|
|
9302
|
+
return /* @__PURE__ */ import_react74.default.createElement(HawaCheckbox, {
|
|
9232
9303
|
id: "newsletter_accepted",
|
|
9233
9304
|
label: props.texts.subscribeToNewsletter,
|
|
9234
9305
|
onChange: field.onChange
|
|
9235
9306
|
});
|
|
9236
9307
|
}
|
|
9237
|
-
}), /* @__PURE__ */
|
|
9308
|
+
}), /* @__PURE__ */ import_react74.default.createElement(Button, {
|
|
9238
9309
|
className: "w-full",
|
|
9239
9310
|
isLoading: props.isLoading
|
|
9240
|
-
}, props.texts.signUpText))), /* @__PURE__ */
|
|
9241
|
-
className: "flex flex-row items-center justify-center gap-1 p-3 text-center text-sm font-
|
|
9242
|
-
}, /* @__PURE__ */
|
|
9311
|
+
}, props.texts.signUpText))), /* @__PURE__ */ import_react74.default.createElement("div", {
|
|
9312
|
+
className: "flex flex-row items-center justify-center gap-1 p-3 text-center text-sm font-normal dark:text-white"
|
|
9313
|
+
}, /* @__PURE__ */ import_react74.default.createElement("span", null, props.texts.existingUserText), /* @__PURE__ */ import_react74.default.createElement("span", {
|
|
9243
9314
|
onClick: props.handleRouteToSignIn,
|
|
9244
9315
|
className: "clickable-link"
|
|
9245
|
-
}, props.texts.signInText)))), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */
|
|
9316
|
+
}, props.texts.signInText)))), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ import_react74.default.createElement(CardFooter, {
|
|
9246
9317
|
className: cn(props.logosOnly ? "flex flex-row justify-center gap-2" : "grid grid-cols-1 gap-2")
|
|
9247
|
-
}, props.viaGoogle && /* @__PURE__ */
|
|
9318
|
+
}, props.viaGoogle && /* @__PURE__ */ import_react74.default.createElement(Button, {
|
|
9248
9319
|
className: "flex flex-row items-center gap-2",
|
|
9249
9320
|
variant: "outline",
|
|
9250
9321
|
onClick: props.handleGoogleSignUp
|
|
9251
|
-
}, /* @__PURE__ */
|
|
9322
|
+
}, /* @__PURE__ */ import_react74.default.createElement(Icons.google, {
|
|
9252
9323
|
className: "h-4 w-4"
|
|
9253
|
-
}), !props.logosOnly && props.texts.signUpViaGoogleLabel), props.viaGithub && /* @__PURE__ */
|
|
9324
|
+
}), !props.logosOnly && props.texts.signUpViaGoogleLabel), props.viaGithub && /* @__PURE__ */ import_react74.default.createElement(Button, {
|
|
9254
9325
|
className: "flex flex-row items-center gap-2",
|
|
9255
9326
|
variant: "outline",
|
|
9256
9327
|
onClick: props.handleGithubSignUp
|
|
9257
|
-
}, /* @__PURE__ */
|
|
9328
|
+
}, /* @__PURE__ */ import_react74.default.createElement(Icons.gitHub, {
|
|
9258
9329
|
className: "h-4 w-4"
|
|
9259
|
-
}), !props.logosOnly && props.texts.signUpViaGithubLabel), props.viaTwitter && /* @__PURE__ */
|
|
9330
|
+
}), !props.logosOnly && props.texts.signUpViaGithubLabel), props.viaTwitter && /* @__PURE__ */ import_react74.default.createElement(Button, {
|
|
9260
9331
|
className: "flex flex-row items-center gap-2",
|
|
9261
9332
|
variant: "outline",
|
|
9262
9333
|
onClick: props.handleTwitterSignUp
|
|
9263
|
-
}, /* @__PURE__ */
|
|
9334
|
+
}, /* @__PURE__ */ import_react74.default.createElement(Icons.twitter, {
|
|
9264
9335
|
className: "h-4 w-4"
|
|
9265
|
-
}), !props.logosOnly && props.texts.signUpViaTwitterLabel)) : null), /* @__PURE__ */
|
|
9336
|
+
}), !props.logosOnly && props.texts.signUpViaTwitterLabel)) : null), /* @__PURE__ */ import_react74.default.createElement(InterfaceSettings, {
|
|
9266
9337
|
currentColorMode: props.currentColorMode,
|
|
9267
9338
|
currentLanguage: props.currentLanguage,
|
|
9268
9339
|
handleColorMode: props.handleColorMode,
|
|
@@ -9270,10 +9341,10 @@ var SignUpForm = function(props) {
|
|
|
9270
9341
|
}));
|
|
9271
9342
|
};
|
|
9272
9343
|
// src/blocks/AuthForms/NewPasswordForm.tsx
|
|
9273
|
-
var
|
|
9344
|
+
var import_react75 = __toESM(require("react"));
|
|
9274
9345
|
var import_react_hook_form5 = require("react-hook-form");
|
|
9275
9346
|
var NewPasswordForm = function(props) {
|
|
9276
|
-
var _ref = _sliced_to_array((0,
|
|
9347
|
+
var _ref = _sliced_to_array((0, import_react75.useState)(false), 2), matchError = _ref[0], setMatchError = _ref[1];
|
|
9277
9348
|
var methods = (0, import_react_hook_form5.useForm)();
|
|
9278
9349
|
var errors = methods.formState.errors, handleSubmit = methods.handleSubmit, control = methods.control;
|
|
9279
9350
|
var handleSubmission = function(e) {
|
|
@@ -9284,22 +9355,22 @@ var NewPasswordForm = function(props) {
|
|
|
9284
9355
|
}
|
|
9285
9356
|
};
|
|
9286
9357
|
var _field_value, _field_value1;
|
|
9287
|
-
return /* @__PURE__ */
|
|
9358
|
+
return /* @__PURE__ */ import_react75.default.createElement(Card, null, matchError && /* @__PURE__ */ import_react75.default.createElement(HawaAlert, {
|
|
9288
9359
|
text: props.texts.passwordMatchError,
|
|
9289
9360
|
severity: "error"
|
|
9290
|
-
}), props.passwordChanged ? /* @__PURE__ */
|
|
9361
|
+
}), props.passwordChanged ? /* @__PURE__ */ import_react75.default.createElement(CardContent, {
|
|
9291
9362
|
headless: true
|
|
9292
|
-
}, /* @__PURE__ */
|
|
9363
|
+
}, /* @__PURE__ */ import_react75.default.createElement("div", {
|
|
9293
9364
|
className: "text-center"
|
|
9294
|
-
}, props.texts.passwordChanged)) : /* @__PURE__ */
|
|
9365
|
+
}, props.texts.passwordChanged)) : /* @__PURE__ */ import_react75.default.createElement(import_react_hook_form5.FormProvider, _object_spread({}, methods), /* @__PURE__ */ import_react75.default.createElement("form", {
|
|
9295
9366
|
onSubmit: handleSubmit(handleSubmission)
|
|
9296
|
-
}, /* @__PURE__ */
|
|
9367
|
+
}, /* @__PURE__ */ import_react75.default.createElement(CardHeader, null, /* @__PURE__ */ import_react75.default.createElement(CardTitle, null, "Create Password"), /* @__PURE__ */ import_react75.default.createElement(CardDescription, null, "Set a new password for your account")), /* @__PURE__ */ import_react75.default.createElement(CardContent, null, /* @__PURE__ */ import_react75.default.createElement(import_react_hook_form5.Controller, {
|
|
9297
9368
|
control: control,
|
|
9298
9369
|
name: "password",
|
|
9299
9370
|
render: function(param) {
|
|
9300
9371
|
var field = param.field;
|
|
9301
9372
|
var _errors_password;
|
|
9302
|
-
return /* @__PURE__ */
|
|
9373
|
+
return /* @__PURE__ */ import_react75.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
9303
9374
|
width: "full",
|
|
9304
9375
|
type: "password",
|
|
9305
9376
|
autoComplete: "new-password",
|
|
@@ -9313,13 +9384,13 @@ var NewPasswordForm = function(props) {
|
|
|
9313
9384
|
rules: {
|
|
9314
9385
|
required: props.texts.passwordRequiredText
|
|
9315
9386
|
}
|
|
9316
|
-
}), /* @__PURE__ */
|
|
9387
|
+
}), /* @__PURE__ */ import_react75.default.createElement(import_react_hook_form5.Controller, {
|
|
9317
9388
|
control: control,
|
|
9318
9389
|
name: "confirmPassword",
|
|
9319
9390
|
render: function(param) {
|
|
9320
9391
|
var field = param.field;
|
|
9321
9392
|
var _errors_confirmPassword;
|
|
9322
|
-
return /* @__PURE__ */
|
|
9393
|
+
return /* @__PURE__ */ import_react75.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
9323
9394
|
width: "full",
|
|
9324
9395
|
type: "password",
|
|
9325
9396
|
autoComplete: "new-password",
|
|
@@ -9333,27 +9404,27 @@ var NewPasswordForm = function(props) {
|
|
|
9333
9404
|
rules: {
|
|
9334
9405
|
required: props.texts.confirmPasswordRequiredText
|
|
9335
9406
|
}
|
|
9336
|
-
})), /* @__PURE__ */
|
|
9407
|
+
})), /* @__PURE__ */ import_react75.default.createElement(CardFooter, null, /* @__PURE__ */ import_react75.default.createElement(Button, {
|
|
9337
9408
|
className: "w-full",
|
|
9338
9409
|
type: "submit"
|
|
9339
9410
|
}, props.texts.updatePassword)))));
|
|
9340
9411
|
};
|
|
9341
9412
|
// src/blocks/AuthForms/ResetPasswordForm.tsx
|
|
9342
|
-
var
|
|
9413
|
+
var import_react76 = __toESM(require("react"));
|
|
9343
9414
|
var import_react_hook_form6 = require("react-hook-form");
|
|
9344
9415
|
var ResetPasswordForm = function(props) {
|
|
9345
9416
|
var methods = (0, import_react_hook_form6.useForm)();
|
|
9346
9417
|
var errors = methods.formState.errors, handleSubmit = methods.handleSubmit, register = methods.register, control = methods.control;
|
|
9347
9418
|
var _field_value, _props_texts_dontHaveAccount, _props_texts_signUpText;
|
|
9348
|
-
return /* @__PURE__ */
|
|
9419
|
+
return /* @__PURE__ */ import_react76.default.createElement(Card, null, !props.sent ? /* @__PURE__ */ import_react76.default.createElement(import_react76.default.Fragment, null, /* @__PURE__ */ import_react76.default.createElement(CardHeader, null, /* @__PURE__ */ import_react76.default.createElement(CardTitle, null, "Reset Password"), /* @__PURE__ */ import_react76.default.createElement(CardDescription, null, "Enter your email to reset your account password")), /* @__PURE__ */ import_react76.default.createElement("form", {
|
|
9349
9420
|
onSubmit: handleSubmit(props.handleResetPassword)
|
|
9350
|
-
}, /* @__PURE__ */
|
|
9421
|
+
}, /* @__PURE__ */ import_react76.default.createElement(CardContent, null, /* @__PURE__ */ import_react76.default.createElement(import_react_hook_form6.Controller, {
|
|
9351
9422
|
control: control,
|
|
9352
9423
|
name: "email",
|
|
9353
9424
|
render: function(param) {
|
|
9354
9425
|
var field = param.field;
|
|
9355
9426
|
var _errors_email;
|
|
9356
|
-
return /* @__PURE__ */
|
|
9427
|
+
return /* @__PURE__ */ import_react76.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
9357
9428
|
width: "full",
|
|
9358
9429
|
type: "text",
|
|
9359
9430
|
label: props.texts.emailLabel,
|
|
@@ -9370,67 +9441,67 @@ var ResetPasswordForm = function(props) {
|
|
|
9370
9441
|
message: props.texts.emailInvalidText
|
|
9371
9442
|
}
|
|
9372
9443
|
}
|
|
9373
|
-
}), /* @__PURE__ */
|
|
9444
|
+
}), /* @__PURE__ */ import_react76.default.createElement("div", {
|
|
9374
9445
|
className: " pb-2 text-left text-sm dark:text-gray-300"
|
|
9375
|
-
}, (_props_texts_dontHaveAccount = props.texts.dontHaveAccount) !== null && _props_texts_dontHaveAccount !== void 0 ? _props_texts_dontHaveAccount : "Don't have an account? ", /* @__PURE__ */
|
|
9446
|
+
}, (_props_texts_dontHaveAccount = props.texts.dontHaveAccount) !== null && _props_texts_dontHaveAccount !== void 0 ? _props_texts_dontHaveAccount : "Don't have an account? ", /* @__PURE__ */ import_react76.default.createElement("span", {
|
|
9376
9447
|
onClick: props.handleRouteToSignUp,
|
|
9377
9448
|
className: "clickable-link"
|
|
9378
|
-
}, (_props_texts_signUpText = props.texts.signUpText) !== null && _props_texts_signUpText !== void 0 ? _props_texts_signUpText : "Sign Up"))), /* @__PURE__ */
|
|
9449
|
+
}, (_props_texts_signUpText = props.texts.signUpText) !== null && _props_texts_signUpText !== void 0 ? _props_texts_signUpText : "Sign Up"))), /* @__PURE__ */ import_react76.default.createElement(CardFooter, null, /* @__PURE__ */ import_react76.default.createElement(Button, {
|
|
9379
9450
|
type: "submit",
|
|
9380
9451
|
className: "w-full"
|
|
9381
|
-
}, props.texts.resetPassword)))) : /* @__PURE__ */
|
|
9452
|
+
}, props.texts.resetPassword)))) : /* @__PURE__ */ import_react76.default.createElement(CardContent, {
|
|
9382
9453
|
headless: true
|
|
9383
|
-
}, /* @__PURE__ */
|
|
9454
|
+
}, /* @__PURE__ */ import_react76.default.createElement("div", {
|
|
9384
9455
|
className: "text-center"
|
|
9385
9456
|
}, props.texts.emailSentText)));
|
|
9386
9457
|
};
|
|
9387
9458
|
// src/blocks/AuthForms/CodeConfirmation.tsx
|
|
9388
|
-
var
|
|
9459
|
+
var import_react77 = __toESM(require("react"));
|
|
9389
9460
|
var CodeConfirmation = function(props) {
|
|
9390
|
-
var _ref = _sliced_to_array((0,
|
|
9461
|
+
var _ref = _sliced_to_array((0, import_react77.useState)(null), 2), pins = _ref[0], setPins = _ref[1];
|
|
9391
9462
|
var _props_texts_checkYourPhone, _props_texts_weSentCode, _props_texts_didntGetCode, _props_texts_resendCode, _props_texts_cancel, _props_texts_confirm;
|
|
9392
|
-
return /* @__PURE__ */
|
|
9463
|
+
return /* @__PURE__ */ import_react77.default.createElement(Card, null, /* @__PURE__ */ import_react77.default.createElement(CardContent, {
|
|
9393
9464
|
headless: true
|
|
9394
|
-
}, props.showError && /* @__PURE__ */
|
|
9465
|
+
}, props.showError && /* @__PURE__ */ import_react77.default.createElement(HawaAlert, {
|
|
9395
9466
|
title: props.errorTitle,
|
|
9396
9467
|
text: props.errorText,
|
|
9397
9468
|
severity: "error"
|
|
9398
|
-
}), /* @__PURE__ */
|
|
9469
|
+
}), /* @__PURE__ */ import_react77.default.createElement("div", {
|
|
9399
9470
|
className: "mb-4 dark:text-white"
|
|
9400
|
-
}, /* @__PURE__ */
|
|
9471
|
+
}, /* @__PURE__ */ import_react77.default.createElement("div", {
|
|
9401
9472
|
className: "text-lg font-bold"
|
|
9402
|
-
}, (_props_texts_checkYourPhone = props.texts.checkYourPhone) !== null && _props_texts_checkYourPhone !== void 0 ? _props_texts_checkYourPhone : "Please check your phone"), /* @__PURE__ */
|
|
9473
|
+
}, (_props_texts_checkYourPhone = props.texts.checkYourPhone) !== null && _props_texts_checkYourPhone !== void 0 ? _props_texts_checkYourPhone : "Please check your phone"), /* @__PURE__ */ import_react77.default.createElement("div", {
|
|
9403
9474
|
className: "text-muted-foreground"
|
|
9404
|
-
}, /* @__PURE__ */
|
|
9475
|
+
}, /* @__PURE__ */ import_react77.default.createElement("span", null, (_props_texts_weSentCode = props.texts.weSentCode) !== null && _props_texts_weSentCode !== void 0 ? _props_texts_weSentCode : "We've sent a code to "), /* @__PURE__ */ import_react77.default.createElement("span", null, props.phoneNumber)), " "), /* @__PURE__ */ import_react77.default.createElement("form", {
|
|
9405
9476
|
onSubmit: function(e) {
|
|
9406
9477
|
e.preventDefault();
|
|
9407
9478
|
if (pins) {
|
|
9408
9479
|
props.submitConfirmation(pins);
|
|
9409
9480
|
}
|
|
9410
9481
|
}
|
|
9411
|
-
}, /* @__PURE__ */
|
|
9482
|
+
}, /* @__PURE__ */ import_react77.default.createElement(HawaPinInput, {
|
|
9412
9483
|
width: "full",
|
|
9413
9484
|
digits: 6,
|
|
9414
9485
|
getPins: function(e) {
|
|
9415
9486
|
return setPins(e);
|
|
9416
9487
|
}
|
|
9417
|
-
}), /* @__PURE__ */
|
|
9488
|
+
}), /* @__PURE__ */ import_react77.default.createElement("div", {
|
|
9418
9489
|
className: " py-2 text-center text-xs text-muted-foreground"
|
|
9419
|
-
}, /* @__PURE__ */
|
|
9490
|
+
}, /* @__PURE__ */ import_react77.default.createElement("span", null, (_props_texts_didntGetCode = props.texts.didntGetCode) !== null && _props_texts_didntGetCode !== void 0 ? _props_texts_didntGetCode : "Didn't get the code?"), " ", /* @__PURE__ */ import_react77.default.createElement("span", {
|
|
9420
9491
|
className: "clickable-link"
|
|
9421
|
-
}, (_props_texts_resendCode = props.texts.resendCode) !== null && _props_texts_resendCode !== void 0 ? _props_texts_resendCode : "Click to resend")), /* @__PURE__ */
|
|
9492
|
+
}, (_props_texts_resendCode = props.texts.resendCode) !== null && _props_texts_resendCode !== void 0 ? _props_texts_resendCode : "Click to resend")), /* @__PURE__ */ import_react77.default.createElement("div", {
|
|
9422
9493
|
className: "mt-4 grid grid-cols-2 gap-2"
|
|
9423
|
-
}, /* @__PURE__ */
|
|
9494
|
+
}, /* @__PURE__ */ import_react77.default.createElement(Button, {
|
|
9424
9495
|
variant: "secondary"
|
|
9425
|
-
}, (_props_texts_cancel = props.texts.cancel) !== null && _props_texts_cancel !== void 0 ? _props_texts_cancel : "Cancel"), /* @__PURE__ */
|
|
9496
|
+
}, (_props_texts_cancel = props.texts.cancel) !== null && _props_texts_cancel !== void 0 ? _props_texts_cancel : "Cancel"), /* @__PURE__ */ import_react77.default.createElement(Button, null, (_props_texts_confirm = props.texts.confirm) !== null && _props_texts_confirm !== void 0 ? _props_texts_confirm : "Confirm")))));
|
|
9426
9497
|
};
|
|
9427
9498
|
// src/blocks/Payment/SelectPayment.tsx
|
|
9428
|
-
var
|
|
9499
|
+
var import_react78 = __toESM(require("react"));
|
|
9429
9500
|
var SelectPayment = function(props) {
|
|
9430
|
-
var _ref = _sliced_to_array((0,
|
|
9431
|
-
return /* @__PURE__ */
|
|
9501
|
+
var _ref = _sliced_to_array((0, import_react78.useState)(""), 2), selectedMethod = _ref[0], setSelectedMethod = _ref[1];
|
|
9502
|
+
return /* @__PURE__ */ import_react78.default.createElement(Card, null, /* @__PURE__ */ import_react78.default.createElement(CardHeader, null, /* @__PURE__ */ import_react78.default.createElement(CardTitle, null, "Choose Payment Method"), /* @__PURE__ */ import_react78.default.createElement(CardDescription, null, "And you'll be directed to the next step to complete the payment")), /* @__PURE__ */ import_react78.default.createElement(CardContent, {
|
|
9432
9503
|
className: "grid grid-cols-2 gap-4"
|
|
9433
|
-
}, /* @__PURE__ */
|
|
9504
|
+
}, /* @__PURE__ */ import_react78.default.createElement(Button, {
|
|
9434
9505
|
className: cn("flex w-full flex-col gap-2 pt-6", selectedMethod === "mada" && "outline outline-4 outline-primary"),
|
|
9435
9506
|
variant: "outline",
|
|
9436
9507
|
size: "heightless",
|
|
@@ -9438,10 +9509,10 @@ var SelectPayment = function(props) {
|
|
|
9438
9509
|
onClick: function() {
|
|
9439
9510
|
return setSelectedMethod("mada");
|
|
9440
9511
|
}
|
|
9441
|
-
}, /* @__PURE__ */
|
|
9512
|
+
}, /* @__PURE__ */ import_react78.default.createElement("img", {
|
|
9442
9513
|
src: "https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png",
|
|
9443
9514
|
className: "h-6"
|
|
9444
|
-
}), /* @__PURE__ */
|
|
9515
|
+
}), /* @__PURE__ */ import_react78.default.createElement("span", null, props.madaLabel)), /* @__PURE__ */ import_react78.default.createElement(Button, {
|
|
9445
9516
|
className: cn("flex w-full flex-col gap-2", selectedMethod === "apple-pay" && "outline outline-4 outline-primary"),
|
|
9446
9517
|
variant: "outline",
|
|
9447
9518
|
size: "heightless",
|
|
@@ -9449,10 +9520,10 @@ var SelectPayment = function(props) {
|
|
|
9449
9520
|
onClick: function() {
|
|
9450
9521
|
return setSelectedMethod("apple-pay");
|
|
9451
9522
|
}
|
|
9452
|
-
}, /* @__PURE__ */
|
|
9523
|
+
}, /* @__PURE__ */ import_react78.default.createElement("img", {
|
|
9453
9524
|
src: "https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png",
|
|
9454
9525
|
className: "h-11"
|
|
9455
|
-
}), /* @__PURE__ */
|
|
9526
|
+
}), /* @__PURE__ */ import_react78.default.createElement("span", null, props.applePayLabel)), /* @__PURE__ */ import_react78.default.createElement(Button, {
|
|
9456
9527
|
className: cn("flex w-full flex-col gap-2", selectedMethod === "visa-master" && "outline outline-4 outline-primary"),
|
|
9457
9528
|
variant: "outline",
|
|
9458
9529
|
size: "heightless",
|
|
@@ -9460,10 +9531,10 @@ var SelectPayment = function(props) {
|
|
|
9460
9531
|
onClick: function() {
|
|
9461
9532
|
return setSelectedMethod("visa-master");
|
|
9462
9533
|
}
|
|
9463
|
-
}, /* @__PURE__ */
|
|
9534
|
+
}, /* @__PURE__ */ import_react78.default.createElement("img", {
|
|
9464
9535
|
src: "https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png",
|
|
9465
9536
|
className: "h-6"
|
|
9466
|
-
}), /* @__PURE__ */
|
|
9537
|
+
}), /* @__PURE__ */ import_react78.default.createElement("span", null, props.visaMasterLabel)), /* @__PURE__ */ import_react78.default.createElement(Button, {
|
|
9467
9538
|
variant: "outline",
|
|
9468
9539
|
size: "heightless",
|
|
9469
9540
|
className: cn("flex w-full flex-col gap-2", selectedMethod === "wallet" && "outline outline-4 outline-primary"),
|
|
@@ -9471,16 +9542,16 @@ var SelectPayment = function(props) {
|
|
|
9471
9542
|
onClick: function() {
|
|
9472
9543
|
return setSelectedMethod("wallet");
|
|
9473
9544
|
}
|
|
9474
|
-
}, /* @__PURE__ */
|
|
9545
|
+
}, /* @__PURE__ */ import_react78.default.createElement("svg", {
|
|
9475
9546
|
version: "1.1",
|
|
9476
9547
|
fill: "currentColor",
|
|
9477
9548
|
viewBox: "0 0 223 223",
|
|
9478
9549
|
className: "h-6 w-6"
|
|
9479
|
-
}, /* @__PURE__ */
|
|
9550
|
+
}, /* @__PURE__ */ import_react78.default.createElement("g", null, /* @__PURE__ */ import_react78.default.createElement("path", {
|
|
9480
9551
|
d: "M223,94.5c0-6.075-4.925-11-11-11h-63c-6.075,0-11,4.925-11,11v33c0,6.075,4.925,11,11,11h63c6.075,0,11-4.925,11-11V94.5z\n M169.515,123.967c-7.082,0-12.823-5.741-12.823-12.823c0-7.082,5.741-12.823,12.823-12.823c7.082,0,12.823,5.741,12.823,12.823\n C182.338,118.225,176.597,123.967,169.515,123.967z"
|
|
9481
|
-
}), /* @__PURE__ */
|
|
9552
|
+
}), /* @__PURE__ */ import_react78.default.createElement("path", {
|
|
9482
9553
|
d: "M123.509,68.5H205v-33c0-8.271-6.395-15-14.667-15h-175C7.062,20.5,0,27.229,0,35.5v152c0,8.271,7.062,15,15.333,15h175\n c8.271,0,14.667-6.729,14.667-15v-34h-81.342L123.509,68.5z"
|
|
9483
|
-
}))), /* @__PURE__ */
|
|
9554
|
+
}))), /* @__PURE__ */ import_react78.default.createElement("span", null, props.walletLabel)), /* @__PURE__ */ import_react78.default.createElement(Button, {
|
|
9484
9555
|
variant: "outline",
|
|
9485
9556
|
size: "heightless",
|
|
9486
9557
|
className: cn("flex w-full flex-col gap-2", selectedMethod === "stc-pay" && "outline outline-4 outline-primary"),
|
|
@@ -9488,10 +9559,10 @@ var SelectPayment = function(props) {
|
|
|
9488
9559
|
onClick: function() {
|
|
9489
9560
|
return setSelectedMethod("stc-pay");
|
|
9490
9561
|
}
|
|
9491
|
-
}, /* @__PURE__ */
|
|
9562
|
+
}, /* @__PURE__ */ import_react78.default.createElement("img", {
|
|
9492
9563
|
src: "https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/stc-pay.png",
|
|
9493
9564
|
className: "h-6"
|
|
9494
|
-
}), /* @__PURE__ */
|
|
9565
|
+
}), /* @__PURE__ */ import_react78.default.createElement("span", null, props.stcPayLabel)), /* @__PURE__ */ import_react78.default.createElement(Button, {
|
|
9495
9566
|
variant: "outline",
|
|
9496
9567
|
size: "heightless",
|
|
9497
9568
|
className: cn("flex w-full flex-col gap-2", selectedMethod === "google-pay" && "outline outline-4 outline-primary"),
|
|
@@ -9499,10 +9570,10 @@ var SelectPayment = function(props) {
|
|
|
9499
9570
|
onClick: function() {
|
|
9500
9571
|
return setSelectedMethod("google-pay");
|
|
9501
9572
|
}
|
|
9502
|
-
}, /* @__PURE__ */
|
|
9573
|
+
}, /* @__PURE__ */ import_react78.default.createElement("img", {
|
|
9503
9574
|
src: "https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png",
|
|
9504
9575
|
className: "h-6"
|
|
9505
|
-
}), /* @__PURE__ */
|
|
9576
|
+
}), /* @__PURE__ */ import_react78.default.createElement("span", null, props.googlePayLabel)), /* @__PURE__ */ import_react78.default.createElement(Button, {
|
|
9506
9577
|
variant: "outline",
|
|
9507
9578
|
size: "heightless",
|
|
9508
9579
|
className: cn("col-span-2 flex w-full flex-col gap-2", selectedMethod === "paypal" && "outline outline-4 outline-primary"),
|
|
@@ -9510,10 +9581,10 @@ var SelectPayment = function(props) {
|
|
|
9510
9581
|
onClick: function() {
|
|
9511
9582
|
return setSelectedMethod("paypal");
|
|
9512
9583
|
}
|
|
9513
|
-
}, /* @__PURE__ */
|
|
9584
|
+
}, /* @__PURE__ */ import_react78.default.createElement("img", {
|
|
9514
9585
|
src: "https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/paypal.png",
|
|
9515
9586
|
className: "h-6"
|
|
9516
|
-
}), /* @__PURE__ */
|
|
9587
|
+
}), /* @__PURE__ */ import_react78.default.createElement("span", null, props.paypalLabel))), /* @__PURE__ */ import_react78.default.createElement(CardFooter, null, /* @__PURE__ */ import_react78.default.createElement(Button, {
|
|
9517
9588
|
onClick: function() {
|
|
9518
9589
|
return props.handleContinue(selectedMethod);
|
|
9519
9590
|
},
|
|
@@ -9522,147 +9593,146 @@ var SelectPayment = function(props) {
|
|
|
9522
9593
|
}, "Continue")));
|
|
9523
9594
|
};
|
|
9524
9595
|
// src/blocks/Payment/CreditCardForm.tsx
|
|
9525
|
-
var
|
|
9596
|
+
var import_react79 = __toESM(require("react"));
|
|
9526
9597
|
var import_react_hook_form7 = require("react-hook-form");
|
|
9527
9598
|
var CreditCardForm = function(props) {
|
|
9528
9599
|
var methods = (0, import_react_hook_form7.useForm)();
|
|
9529
9600
|
var errors = methods.formState.errors, handleSubmit = methods.handleSubmit, control = methods.control;
|
|
9530
|
-
return /* @__PURE__ */
|
|
9601
|
+
return /* @__PURE__ */ import_react79.default.createElement(Card, null, /* @__PURE__ */ import_react79.default.createElement("form", {
|
|
9531
9602
|
onSubmit: handleSubmit(props.handle)
|
|
9532
|
-
}, /* @__PURE__ */
|
|
9603
|
+
}, /* @__PURE__ */ import_react79.default.createElement(CardContent, {
|
|
9533
9604
|
headless: true
|
|
9534
|
-
}, /* @__PURE__ */
|
|
9605
|
+
}, /* @__PURE__ */ import_react79.default.createElement("div", {
|
|
9535
9606
|
className: "flex flex-row gap-4"
|
|
9536
|
-
}, /* @__PURE__ */
|
|
9607
|
+
}, /* @__PURE__ */ import_react79.default.createElement(import_react_hook_form7.Controller, {
|
|
9537
9608
|
control: control,
|
|
9538
9609
|
name: "cardName",
|
|
9539
9610
|
render: function(param) {
|
|
9540
9611
|
var field = param.field;
|
|
9541
9612
|
var _errors_password;
|
|
9542
|
-
return /* @__PURE__ */
|
|
9613
|
+
return /* @__PURE__ */ import_react79.default.createElement(HawaTextField, {
|
|
9543
9614
|
width: "full",
|
|
9544
|
-
name: "
|
|
9545
|
-
placeholder: "
|
|
9546
|
-
type: "
|
|
9615
|
+
name: "cardNumber",
|
|
9616
|
+
placeholder: "1234 1234 1234 1234",
|
|
9617
|
+
type: "number",
|
|
9547
9618
|
label: "Card Number",
|
|
9548
9619
|
helpertext: (_errors_password = errors.password) === null || _errors_password === void 0 ? void 0 : _errors_password.message
|
|
9549
9620
|
});
|
|
9550
9621
|
},
|
|
9551
9622
|
rules: {
|
|
9552
|
-
required: "
|
|
9623
|
+
required: "Card Number is rquired"
|
|
9553
9624
|
}
|
|
9554
|
-
}), /* @__PURE__ */
|
|
9625
|
+
}), /* @__PURE__ */ import_react79.default.createElement("div", {
|
|
9555
9626
|
className: "w-1/4"
|
|
9556
|
-
}, /* @__PURE__ */
|
|
9627
|
+
}, /* @__PURE__ */ import_react79.default.createElement(import_react_hook_form7.Controller, {
|
|
9557
9628
|
control: control,
|
|
9558
|
-
name: "
|
|
9629
|
+
name: "cardCVC",
|
|
9559
9630
|
render: function(param) {
|
|
9560
9631
|
var field = param.field;
|
|
9561
9632
|
var _errors_password;
|
|
9562
|
-
return /* @__PURE__ */
|
|
9633
|
+
return /* @__PURE__ */ import_react79.default.createElement(HawaTextField, {
|
|
9563
9634
|
width: "full",
|
|
9564
|
-
name: "
|
|
9635
|
+
name: "cardCVC",
|
|
9565
9636
|
maxLength: "3",
|
|
9566
9637
|
autoComplete: "cc-number",
|
|
9567
|
-
placeholder: "",
|
|
9568
|
-
type: "
|
|
9569
|
-
label: "
|
|
9638
|
+
placeholder: "CVC",
|
|
9639
|
+
type: "number",
|
|
9640
|
+
label: "CVC",
|
|
9570
9641
|
helpertext: (_errors_password = errors.password) === null || _errors_password === void 0 ? void 0 : _errors_password.message
|
|
9571
9642
|
});
|
|
9572
9643
|
},
|
|
9573
9644
|
rules: {
|
|
9574
9645
|
required: "Password is rquired"
|
|
9575
9646
|
}
|
|
9576
|
-
}))), /* @__PURE__ */
|
|
9647
|
+
}))), /* @__PURE__ */ import_react79.default.createElement(import_react_hook_form7.Controller, {
|
|
9577
9648
|
control: control,
|
|
9578
|
-
name: "
|
|
9649
|
+
name: "cardExpiry",
|
|
9579
9650
|
render: function(param) {
|
|
9580
9651
|
var field = param.field;
|
|
9581
9652
|
var _errors_password;
|
|
9582
|
-
return /* @__PURE__ */
|
|
9653
|
+
return /* @__PURE__ */ import_react79.default.createElement(HawaTextField, {
|
|
9583
9654
|
width: "full",
|
|
9584
|
-
name: "
|
|
9585
|
-
placeholder: "
|
|
9586
|
-
type: "
|
|
9587
|
-
label: "
|
|
9655
|
+
name: "cardExpiry",
|
|
9656
|
+
placeholder: "MM / YY",
|
|
9657
|
+
type: "password",
|
|
9658
|
+
label: "Expiry Date",
|
|
9588
9659
|
helpertext: (_errors_password = errors.password) === null || _errors_password === void 0 ? void 0 : _errors_password.message
|
|
9589
9660
|
});
|
|
9590
9661
|
},
|
|
9591
9662
|
rules: {
|
|
9592
9663
|
required: "Password is rquired"
|
|
9593
9664
|
}
|
|
9594
|
-
}), /* @__PURE__ */
|
|
9665
|
+
}), /* @__PURE__ */ import_react79.default.createElement(import_react_hook_form7.Controller, {
|
|
9595
9666
|
control: control,
|
|
9596
9667
|
name: "cardName",
|
|
9597
9668
|
render: function(param) {
|
|
9598
9669
|
var field = param.field;
|
|
9599
9670
|
var _errors_password;
|
|
9600
|
-
return /* @__PURE__ */
|
|
9671
|
+
return /* @__PURE__ */ import_react79.default.createElement(HawaTextField, {
|
|
9601
9672
|
width: "full",
|
|
9602
|
-
name: "
|
|
9603
|
-
|
|
9604
|
-
|
|
9605
|
-
label: "Expiry Date",
|
|
9673
|
+
name: "cardName",
|
|
9674
|
+
type: "text",
|
|
9675
|
+
label: "Name on card",
|
|
9606
9676
|
helpertext: (_errors_password = errors.password) === null || _errors_password === void 0 ? void 0 : _errors_password.message
|
|
9607
9677
|
});
|
|
9608
9678
|
},
|
|
9609
9679
|
rules: {
|
|
9610
|
-
required: "
|
|
9680
|
+
required: "Card holder name is rquired"
|
|
9611
9681
|
}
|
|
9612
|
-
})), /* @__PURE__ */
|
|
9682
|
+
})), /* @__PURE__ */ import_react79.default.createElement(CardFooter, null, /* @__PURE__ */ import_react79.default.createElement(Button, {
|
|
9613
9683
|
className: "w-full",
|
|
9614
9684
|
onClick: props.handlePayWithCreditCard
|
|
9615
9685
|
}, "Pay with Credit Card"))));
|
|
9616
9686
|
};
|
|
9617
9687
|
// src/blocks/Payment/ChargeWalletForm.tsx
|
|
9618
|
-
var
|
|
9688
|
+
var import_react80 = __toESM(require("react"));
|
|
9619
9689
|
var ChargeWalletForm = function(props) {
|
|
9620
|
-
var _ref = _sliced_to_array((0,
|
|
9621
|
-
return /* @__PURE__ */
|
|
9690
|
+
var _ref = _sliced_to_array((0, import_react80.useState)(0), 2), walletAmount = _ref[0], setWalletAmount = _ref[1];
|
|
9691
|
+
return /* @__PURE__ */ import_react80.default.createElement(Card, null, /* @__PURE__ */ import_react80.default.createElement(CardContent, {
|
|
9622
9692
|
headless: true
|
|
9623
|
-
}, /* @__PURE__ */
|
|
9693
|
+
}, /* @__PURE__ */ import_react80.default.createElement("div", {
|
|
9624
9694
|
className: "p-4 text-center"
|
|
9625
|
-
}, /* @__PURE__ */
|
|
9695
|
+
}, /* @__PURE__ */ import_react80.default.createElement("div", {
|
|
9626
9696
|
className: " text-5xl font-extrabold"
|
|
9627
|
-
}, Number(walletAmount).toLocaleString("en") || "0"), /* @__PURE__ */
|
|
9697
|
+
}, Number(walletAmount).toLocaleString("en") || "0"), /* @__PURE__ */ import_react80.default.createElement("div", {
|
|
9628
9698
|
className: "text-sm font-normal"
|
|
9629
|
-
}, props.currency || "SAR")), /* @__PURE__ */
|
|
9699
|
+
}, props.currency || "SAR")), /* @__PURE__ */ import_react80.default.createElement("div", {
|
|
9630
9700
|
className: "mb-2 flex w-full flex-col gap-4 text-center"
|
|
9631
|
-
}, /* @__PURE__ */
|
|
9701
|
+
}, /* @__PURE__ */ import_react80.default.createElement("div", {
|
|
9632
9702
|
className: "mb-2 flex w-full flex-row gap-4 text-center"
|
|
9633
|
-
}, /* @__PURE__ */
|
|
9703
|
+
}, /* @__PURE__ */ import_react80.default.createElement(Button, {
|
|
9634
9704
|
variant: "outline",
|
|
9635
9705
|
className: "h-full w-full"
|
|
9636
|
-
}, "10 SAR"), /* @__PURE__ */
|
|
9706
|
+
}, "10 SAR"), /* @__PURE__ */ import_react80.default.createElement(Button, {
|
|
9637
9707
|
variant: "outline",
|
|
9638
9708
|
className: "h-full w-full"
|
|
9639
|
-
}, "50 SAR"), /* @__PURE__ */
|
|
9709
|
+
}, "50 SAR"), /* @__PURE__ */ import_react80.default.createElement(Button, {
|
|
9640
9710
|
variant: "outline",
|
|
9641
9711
|
className: "h-full w-full"
|
|
9642
|
-
}, "100 SAR")), /* @__PURE__ */
|
|
9712
|
+
}, "100 SAR")), /* @__PURE__ */ import_react80.default.createElement(Input, {
|
|
9643
9713
|
placeholder: "Custom Amount",
|
|
9644
9714
|
type: "number",
|
|
9645
9715
|
name: "amount"
|
|
9646
|
-
})), /* @__PURE__ */
|
|
9716
|
+
})), /* @__PURE__ */ import_react80.default.createElement(Button, {
|
|
9647
9717
|
className: "mt-6 w-full"
|
|
9648
9718
|
}, props.texts.chargeWallet)));
|
|
9649
9719
|
};
|
|
9650
9720
|
// src/blocks/Payment/PayWithWallet.tsx
|
|
9651
|
-
var
|
|
9721
|
+
var import_react81 = __toESM(require("react"));
|
|
9652
9722
|
var PayWithWallet = function(props) {
|
|
9653
|
-
return /* @__PURE__ */
|
|
9723
|
+
return /* @__PURE__ */ import_react81.default.createElement(Card, null, /* @__PURE__ */ import_react81.default.createElement(CardContent, {
|
|
9654
9724
|
headless: true
|
|
9655
|
-
}, /* @__PURE__ */
|
|
9725
|
+
}, /* @__PURE__ */ import_react81.default.createElement("div", {
|
|
9656
9726
|
className: "text-center text-5xl font-extrabold"
|
|
9657
|
-
}, props.walletBalance || "0", /* @__PURE__ */
|
|
9727
|
+
}, props.walletBalance || "0", /* @__PURE__ */ import_react81.default.createElement("div", {
|
|
9658
9728
|
className: "text-sm font-normal"
|
|
9659
|
-
}, props.currency || "SAR")), /* @__PURE__ */
|
|
9729
|
+
}, props.currency || "SAR")), /* @__PURE__ */ import_react81.default.createElement(Button, {
|
|
9660
9730
|
className: "mt-6 w-full",
|
|
9661
9731
|
onClick: props.handlePayWithWallet
|
|
9662
9732
|
}, "Pay Now")));
|
|
9663
9733
|
};
|
|
9664
9734
|
// src/blocks/Payment/CheckoutForm.tsx
|
|
9665
|
-
var
|
|
9735
|
+
var import_react82 = __toESM(require("react"));
|
|
9666
9736
|
var import_react_hook_form8 = require("react-hook-form");
|
|
9667
9737
|
var CheckoutForm = function(props) {
|
|
9668
9738
|
var _props_texts, _props_texts1, _props_texts2, _props_texts3, _props_texts4, _props_texts5, _props_texts6, _props_texts7, _props_texts8, _props_texts9;
|
|
@@ -9683,9 +9753,9 @@ var CheckoutForm = function(props) {
|
|
|
9683
9753
|
}
|
|
9684
9754
|
};
|
|
9685
9755
|
var _field_value, _field_value1, _field_value2, _field_value3, _field_value4, _field_value5, _field_value6, _field_value7, _field_value8;
|
|
9686
|
-
return /* @__PURE__ */
|
|
9756
|
+
return /* @__PURE__ */ import_react82.default.createElement(Card, null, /* @__PURE__ */ import_react82.default.createElement(CardHeader, null, /* @__PURE__ */ import_react82.default.createElement(CardTitle, null, props.texts.orderDetails)), /* @__PURE__ */ import_react82.default.createElement(CardContent, null, /* @__PURE__ */ import_react82.default.createElement("div", null, /* @__PURE__ */ import_react82.default.createElement("div", {
|
|
9687
9757
|
className: "rounded border border-gray-300"
|
|
9688
|
-
}, /* @__PURE__ */
|
|
9758
|
+
}, /* @__PURE__ */ import_react82.default.createElement(HawaTable, {
|
|
9689
9759
|
pagination: false,
|
|
9690
9760
|
direction: isArabic ? "rtl" : "ltr",
|
|
9691
9761
|
columns: [
|
|
@@ -9705,9 +9775,9 @@ var CheckoutForm = function(props) {
|
|
|
9705
9775
|
borders: "inner",
|
|
9706
9776
|
rows: props.products,
|
|
9707
9777
|
bordersWidth: "1"
|
|
9708
|
-
})))), /* @__PURE__ */
|
|
9778
|
+
})))), /* @__PURE__ */ import_react82.default.createElement(CardHeader, null, /* @__PURE__ */ import_react82.default.createElement(CardTitle, null, props.texts.billingAddress)), /* @__PURE__ */ import_react82.default.createElement("form", {
|
|
9709
9779
|
onSubmit: handleSubmit(props.handlePayNow)
|
|
9710
|
-
}, /* @__PURE__ */
|
|
9780
|
+
}, /* @__PURE__ */ import_react82.default.createElement(CardContent, null, /* @__PURE__ */ import_react82.default.createElement("div", null, /* @__PURE__ */ import_react82.default.createElement(import_react_hook_form8.FormProvider, _object_spread({}, methods), /* @__PURE__ */ import_react82.default.createElement("div", null, /* @__PURE__ */ import_react82.default.createElement(import_react_hook_form8.Controller, {
|
|
9711
9781
|
control: control,
|
|
9712
9782
|
name: "firstName",
|
|
9713
9783
|
rules: {
|
|
@@ -9716,7 +9786,7 @@ var CheckoutForm = function(props) {
|
|
|
9716
9786
|
render: function(param) {
|
|
9717
9787
|
var field = param.field;
|
|
9718
9788
|
var _props_texts, _errors_firstName;
|
|
9719
|
-
return /* @__PURE__ */
|
|
9789
|
+
return /* @__PURE__ */ import_react82.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
9720
9790
|
type: "text",
|
|
9721
9791
|
label: ((_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.firstNameLabel) + " *",
|
|
9722
9792
|
helpertext: (_errors_firstName = errors.firstName) === null || _errors_firstName === void 0 ? void 0 : _errors_firstName.message
|
|
@@ -9724,11 +9794,11 @@ var CheckoutForm = function(props) {
|
|
|
9724
9794
|
value: (_field_value = field.value) !== null && _field_value !== void 0 ? _field_value : ""
|
|
9725
9795
|
}));
|
|
9726
9796
|
}
|
|
9727
|
-
}), /* @__PURE__ */
|
|
9797
|
+
}), /* @__PURE__ */ import_react82.default.createElement("div", {
|
|
9728
9798
|
style: {
|
|
9729
9799
|
width: 20
|
|
9730
9800
|
}
|
|
9731
|
-
}), /* @__PURE__ */
|
|
9801
|
+
}), /* @__PURE__ */ import_react82.default.createElement(import_react_hook_form8.Controller, {
|
|
9732
9802
|
control: control,
|
|
9733
9803
|
name: "lastName",
|
|
9734
9804
|
rules: {
|
|
@@ -9737,7 +9807,7 @@ var CheckoutForm = function(props) {
|
|
|
9737
9807
|
render: function(param) {
|
|
9738
9808
|
var field = param.field;
|
|
9739
9809
|
var _props_texts, _errors_lastName;
|
|
9740
|
-
return /* @__PURE__ */
|
|
9810
|
+
return /* @__PURE__ */ import_react82.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
9741
9811
|
width: "full",
|
|
9742
9812
|
type: "text",
|
|
9743
9813
|
label: ((_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.lastNameLabel) + " *",
|
|
@@ -9746,13 +9816,13 @@ var CheckoutForm = function(props) {
|
|
|
9746
9816
|
value: (_field_value1 = field.value) !== null && _field_value1 !== void 0 ? _field_value1 : ""
|
|
9747
9817
|
}));
|
|
9748
9818
|
}
|
|
9749
|
-
})), /* @__PURE__ */
|
|
9819
|
+
})), /* @__PURE__ */ import_react82.default.createElement(import_react_hook_form8.Controller, {
|
|
9750
9820
|
control: control,
|
|
9751
9821
|
name: "email",
|
|
9752
9822
|
render: function(param) {
|
|
9753
9823
|
var field = param.field;
|
|
9754
9824
|
var _props_texts, _errors_email;
|
|
9755
|
-
return /* @__PURE__ */
|
|
9825
|
+
return /* @__PURE__ */ import_react82.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
9756
9826
|
width: "full",
|
|
9757
9827
|
type: "text",
|
|
9758
9828
|
label: ((_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.emailLabel) + " *",
|
|
@@ -9768,9 +9838,9 @@ var CheckoutForm = function(props) {
|
|
|
9768
9838
|
message: (_props_texts3 = props.texts) === null || _props_texts3 === void 0 ? void 0 : _props_texts3.emailInvalidText
|
|
9769
9839
|
}
|
|
9770
9840
|
}
|
|
9771
|
-
}), /* @__PURE__ */
|
|
9841
|
+
}), /* @__PURE__ */ import_react82.default.createElement("div", {
|
|
9772
9842
|
className: "flex flex-col md:flex-row"
|
|
9773
|
-
}, /* @__PURE__ */
|
|
9843
|
+
}, /* @__PURE__ */ import_react82.default.createElement(import_react_hook_form8.Controller, {
|
|
9774
9844
|
control: control,
|
|
9775
9845
|
name: "streetAddress",
|
|
9776
9846
|
rules: {
|
|
@@ -9779,7 +9849,7 @@ var CheckoutForm = function(props) {
|
|
|
9779
9849
|
render: function(param) {
|
|
9780
9850
|
var field = param.field;
|
|
9781
9851
|
var _props_texts, _errors_streetAddress;
|
|
9782
|
-
return /* @__PURE__ */
|
|
9852
|
+
return /* @__PURE__ */ import_react82.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
9783
9853
|
width: "full",
|
|
9784
9854
|
type: "text",
|
|
9785
9855
|
label: ((_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.streetAddressLabel) + " *",
|
|
@@ -9788,9 +9858,9 @@ var CheckoutForm = function(props) {
|
|
|
9788
9858
|
value: (_field_value3 = field.value) !== null && _field_value3 !== void 0 ? _field_value3 : ""
|
|
9789
9859
|
}));
|
|
9790
9860
|
}
|
|
9791
|
-
})), /* @__PURE__ */
|
|
9861
|
+
})), /* @__PURE__ */ import_react82.default.createElement("div", {
|
|
9792
9862
|
className: "flex flex-col md:flex-row"
|
|
9793
|
-
}, /* @__PURE__ */
|
|
9863
|
+
}, /* @__PURE__ */ import_react82.default.createElement(import_react_hook_form8.Controller, {
|
|
9794
9864
|
control: control,
|
|
9795
9865
|
name: "province",
|
|
9796
9866
|
rules: {
|
|
@@ -9799,7 +9869,7 @@ var CheckoutForm = function(props) {
|
|
|
9799
9869
|
render: function(param) {
|
|
9800
9870
|
var field = param.field;
|
|
9801
9871
|
var _props_texts, _errors_province;
|
|
9802
|
-
return /* @__PURE__ */
|
|
9872
|
+
return /* @__PURE__ */ import_react82.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
9803
9873
|
width: "full",
|
|
9804
9874
|
type: "text",
|
|
9805
9875
|
label: ((_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.stateLabel) + " *",
|
|
@@ -9808,11 +9878,11 @@ var CheckoutForm = function(props) {
|
|
|
9808
9878
|
value: (_field_value4 = field.value) !== null && _field_value4 !== void 0 ? _field_value4 : ""
|
|
9809
9879
|
}));
|
|
9810
9880
|
}
|
|
9811
|
-
}), /* @__PURE__ */
|
|
9881
|
+
}), /* @__PURE__ */ import_react82.default.createElement("div", {
|
|
9812
9882
|
style: {
|
|
9813
9883
|
width: 20
|
|
9814
9884
|
}
|
|
9815
|
-
}), /* @__PURE__ */
|
|
9885
|
+
}), /* @__PURE__ */ import_react82.default.createElement(import_react_hook_form8.Controller, {
|
|
9816
9886
|
control: control,
|
|
9817
9887
|
name: "city",
|
|
9818
9888
|
rules: {
|
|
@@ -9821,7 +9891,7 @@ var CheckoutForm = function(props) {
|
|
|
9821
9891
|
render: function(param) {
|
|
9822
9892
|
var field = param.field;
|
|
9823
9893
|
var _props_texts, _errors_city;
|
|
9824
|
-
return /* @__PURE__ */
|
|
9894
|
+
return /* @__PURE__ */ import_react82.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
9825
9895
|
width: "full",
|
|
9826
9896
|
type: "text",
|
|
9827
9897
|
label: ((_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.cityLabel) + " *",
|
|
@@ -9830,9 +9900,9 @@ var CheckoutForm = function(props) {
|
|
|
9830
9900
|
value: (_field_value5 = field.value) !== null && _field_value5 !== void 0 ? _field_value5 : ""
|
|
9831
9901
|
}));
|
|
9832
9902
|
}
|
|
9833
|
-
})), /* @__PURE__ */
|
|
9903
|
+
})), /* @__PURE__ */ import_react82.default.createElement("div", {
|
|
9834
9904
|
className: "flex flex-col md:flex-row"
|
|
9835
|
-
}, /* @__PURE__ */
|
|
9905
|
+
}, /* @__PURE__ */ import_react82.default.createElement(import_react_hook_form8.Controller, {
|
|
9836
9906
|
control: control,
|
|
9837
9907
|
name: "buildingNumber",
|
|
9838
9908
|
rules: {
|
|
@@ -9841,7 +9911,7 @@ var CheckoutForm = function(props) {
|
|
|
9841
9911
|
render: function(param) {
|
|
9842
9912
|
var field = param.field;
|
|
9843
9913
|
var _props_texts, _errors_buildingNumber;
|
|
9844
|
-
return /* @__PURE__ */
|
|
9914
|
+
return /* @__PURE__ */ import_react82.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
9845
9915
|
width: "full",
|
|
9846
9916
|
type: "text",
|
|
9847
9917
|
label: ((_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.buildingNumberLabel) + " *",
|
|
@@ -9850,11 +9920,11 @@ var CheckoutForm = function(props) {
|
|
|
9850
9920
|
value: (_field_value6 = field.value) !== null && _field_value6 !== void 0 ? _field_value6 : ""
|
|
9851
9921
|
}));
|
|
9852
9922
|
}
|
|
9853
|
-
}), /* @__PURE__ */
|
|
9923
|
+
}), /* @__PURE__ */ import_react82.default.createElement("div", {
|
|
9854
9924
|
style: {
|
|
9855
9925
|
width: 20
|
|
9856
9926
|
}
|
|
9857
|
-
}), /* @__PURE__ */
|
|
9927
|
+
}), /* @__PURE__ */ import_react82.default.createElement(import_react_hook_form8.Controller, {
|
|
9858
9928
|
control: control,
|
|
9859
9929
|
name: "zipCode",
|
|
9860
9930
|
rules: {
|
|
@@ -9863,7 +9933,7 @@ var CheckoutForm = function(props) {
|
|
|
9863
9933
|
render: function(param) {
|
|
9864
9934
|
var field = param.field;
|
|
9865
9935
|
var _props_texts, _errors_zipCode;
|
|
9866
|
-
return /* @__PURE__ */
|
|
9936
|
+
return /* @__PURE__ */ import_react82.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
9867
9937
|
width: "full",
|
|
9868
9938
|
type: "number",
|
|
9869
9939
|
label: ((_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.zipCodeLabel) + " *",
|
|
@@ -9872,9 +9942,9 @@ var CheckoutForm = function(props) {
|
|
|
9872
9942
|
value: (_field_value7 = field.value) !== null && _field_value7 !== void 0 ? _field_value7 : ""
|
|
9873
9943
|
}));
|
|
9874
9944
|
}
|
|
9875
|
-
})), /* @__PURE__ */
|
|
9945
|
+
})), /* @__PURE__ */ import_react82.default.createElement("div", {
|
|
9876
9946
|
className: "mb-3"
|
|
9877
|
-
}, /* @__PURE__ */
|
|
9947
|
+
}, /* @__PURE__ */ import_react82.default.createElement(import_react_hook_form8.Controller, {
|
|
9878
9948
|
control: control,
|
|
9879
9949
|
name: "country",
|
|
9880
9950
|
rules: {
|
|
@@ -9883,7 +9953,7 @@ var CheckoutForm = function(props) {
|
|
|
9883
9953
|
render: function(param) {
|
|
9884
9954
|
var field = param.field;
|
|
9885
9955
|
var _props_texts, _errors_country;
|
|
9886
|
-
return /* @__PURE__ */
|
|
9956
|
+
return /* @__PURE__ */ import_react82.default.createElement(HawaSelect, {
|
|
9887
9957
|
native: true,
|
|
9888
9958
|
label: ((_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.countryLabel) + " *",
|
|
9889
9959
|
helperText: (_errors_country = errors.country) === null || _errors_country === void 0 ? void 0 : _errors_country.message,
|
|
@@ -9895,73 +9965,73 @@ var CheckoutForm = function(props) {
|
|
|
9895
9965
|
return field.onChange(e.country_label);
|
|
9896
9966
|
},
|
|
9897
9967
|
value: (_field_value8 = field.value) !== null && _field_value8 !== void 0 ? _field_value8 : ""
|
|
9898
|
-
}, /* @__PURE__ */
|
|
9899
|
-
return /* @__PURE__ */
|
|
9968
|
+
}, /* @__PURE__ */ import_react82.default.createElement("option", null), props.countriesList.map(function(country, i) {
|
|
9969
|
+
return /* @__PURE__ */ import_react82.default.createElement("option", {
|
|
9900
9970
|
key: i
|
|
9901
9971
|
}, country);
|
|
9902
9972
|
}));
|
|
9903
9973
|
}
|
|
9904
|
-
}))))), /* @__PURE__ */
|
|
9974
|
+
}))))), /* @__PURE__ */ import_react82.default.createElement(CardFooter, null, /* @__PURE__ */ import_react82.default.createElement(Button, {
|
|
9905
9975
|
className: "w-full"
|
|
9906
9976
|
}, props.texts.payNow)), " "));
|
|
9907
9977
|
};
|
|
9908
9978
|
// src/blocks/Payment/Confirmation.tsx
|
|
9909
|
-
var
|
|
9979
|
+
var import_react83 = __toESM(require("react"));
|
|
9910
9980
|
var ConfirmationPage = function(props) {
|
|
9911
9981
|
var isArabic = props.lang === "ar";
|
|
9912
|
-
return /* @__PURE__ */
|
|
9982
|
+
return /* @__PURE__ */ import_react83.default.createElement(Card, null, /* @__PURE__ */ import_react83.default.createElement(CardContent, {
|
|
9913
9983
|
headless: true
|
|
9914
|
-
}, " ", /* @__PURE__ */
|
|
9984
|
+
}, " ", /* @__PURE__ */ import_react83.default.createElement("div", {
|
|
9915
9985
|
className: "py-5 text-center text-3xl font-bold dark:text-white"
|
|
9916
|
-
}, props.confirmationTitle), /* @__PURE__ */
|
|
9986
|
+
}, props.confirmationTitle), /* @__PURE__ */ import_react83.default.createElement("div", {
|
|
9917
9987
|
className: "py-5 dark:text-white"
|
|
9918
|
-
}, /* @__PURE__ */
|
|
9988
|
+
}, /* @__PURE__ */ import_react83.default.createElement("div", {
|
|
9919
9989
|
className: "mb-2 text-center"
|
|
9920
|
-
}, props.texts.successMessage, " ", /* @__PURE__ */
|
|
9990
|
+
}, props.texts.successMessage, " ", /* @__PURE__ */ import_react83.default.createElement("strong", null, props.userEmail)), /* @__PURE__ */ import_react83.default.createElement("div", {
|
|
9921
9991
|
className: "text-center"
|
|
9922
|
-
}, props.texts.yourOrderNumber), /* @__PURE__ */
|
|
9992
|
+
}, props.texts.yourOrderNumber), /* @__PURE__ */ import_react83.default.createElement("div", {
|
|
9923
9993
|
className: "text-center font-bold"
|
|
9924
|
-
}, props.orderNumber)), /* @__PURE__ */
|
|
9994
|
+
}, props.orderNumber)), /* @__PURE__ */ import_react83.default.createElement("div", {
|
|
9925
9995
|
className: "flex flex-col items-center justify-center gap-4 py-5 pt-0"
|
|
9926
|
-
}, /* @__PURE__ */
|
|
9996
|
+
}, /* @__PURE__ */ import_react83.default.createElement(Button, {
|
|
9927
9997
|
className: "w-full",
|
|
9928
9998
|
onClick: props.handlePrint
|
|
9929
|
-
}, props.texts.print), /* @__PURE__ */
|
|
9999
|
+
}, props.texts.print), /* @__PURE__ */ import_react83.default.createElement(Button, {
|
|
9930
10000
|
className: "w-full",
|
|
9931
10001
|
onClick: props.handleHistory
|
|
9932
|
-
}, props.texts.history), /* @__PURE__ */
|
|
10002
|
+
}, props.texts.history), /* @__PURE__ */ import_react83.default.createElement(Button, {
|
|
9933
10003
|
className: "w-full",
|
|
9934
10004
|
onClick: props.handleHome
|
|
9935
|
-
}, props.texts.homePage), /* @__PURE__ */
|
|
10005
|
+
}, props.texts.homePage), /* @__PURE__ */ import_react83.default.createElement("div", {
|
|
9936
10006
|
className: " text-center text-sm dark:text-white"
|
|
9937
|
-
}, props.texts.fasterPaymentNote), /* @__PURE__ */
|
|
10007
|
+
}, props.texts.fasterPaymentNote), /* @__PURE__ */ import_react83.default.createElement("a", {
|
|
9938
10008
|
className: "clickable-link text-xs",
|
|
9939
10009
|
onClick: props.handleRefundPolicyLink
|
|
9940
10010
|
}, props.texts.refundPolicy))));
|
|
9941
10011
|
};
|
|
9942
10012
|
// src/blocks/Pricing/PricingPlans.tsx
|
|
9943
|
-
var
|
|
10013
|
+
var import_react84 = __toESM(require("react"));
|
|
9944
10014
|
var PricingPlans = function(props) {
|
|
9945
|
-
return /* @__PURE__ */
|
|
10015
|
+
return /* @__PURE__ */ import_react84.default.createElement("div", null, /* @__PURE__ */ import_react84.default.createElement("div", {
|
|
9946
10016
|
className: "mb-2 flex w-full justify-between"
|
|
9947
|
-
}, /* @__PURE__ */
|
|
10017
|
+
}, /* @__PURE__ */ import_react84.default.createElement(HawaRadio, {
|
|
9948
10018
|
design: "tabs",
|
|
9949
10019
|
defaultValue: props.currentCycle,
|
|
9950
10020
|
options: props.billingCycles,
|
|
9951
10021
|
onChangeTab: function(e) {
|
|
9952
10022
|
return props.onCycleChange(e);
|
|
9953
10023
|
}
|
|
9954
|
-
}), /* @__PURE__ */
|
|
10024
|
+
}), /* @__PURE__ */ import_react84.default.createElement(HawaRadio, {
|
|
9955
10025
|
design: "tabs",
|
|
9956
10026
|
defaultValue: props.currentCurrency,
|
|
9957
10027
|
options: props.currencies,
|
|
9958
10028
|
onChangeTab: function(e) {
|
|
9959
10029
|
return props.onCurrencyChange(e);
|
|
9960
10030
|
}
|
|
9961
|
-
})), /* @__PURE__ */
|
|
10031
|
+
})), /* @__PURE__ */ import_react84.default.createElement("div", {
|
|
9962
10032
|
className: "flex flex-row justify-between"
|
|
9963
10033
|
}, props.plans.map(function(plan, index) {
|
|
9964
|
-
return /* @__PURE__ */
|
|
10034
|
+
return /* @__PURE__ */ import_react84.default.createElement(HawaPricingCard, _object_spread_props(_object_spread({
|
|
9965
10035
|
key: index,
|
|
9966
10036
|
onPlanClicked: function() {
|
|
9967
10037
|
return props.onPlanClicked(plan);
|
|
@@ -9975,26 +10045,26 @@ var PricingPlans = function(props) {
|
|
|
9975
10045
|
})));
|
|
9976
10046
|
};
|
|
9977
10047
|
// src/blocks/Pricing/ComparingPlans.tsx
|
|
9978
|
-
var
|
|
10048
|
+
var import_react85 = __toESM(require("react"));
|
|
9979
10049
|
var CheckMark = function() {
|
|
9980
|
-
return /* @__PURE__ */
|
|
10050
|
+
return /* @__PURE__ */ import_react85.default.createElement("svg", {
|
|
9981
10051
|
className: "h-5 w-5 text-green-500",
|
|
9982
10052
|
"aria-hidden": "true",
|
|
9983
10053
|
fill: "currentColor",
|
|
9984
10054
|
viewBox: "0 0 20 20"
|
|
9985
|
-
}, /* @__PURE__ */
|
|
10055
|
+
}, /* @__PURE__ */ import_react85.default.createElement("path", {
|
|
9986
10056
|
fillRule: "evenodd",
|
|
9987
10057
|
d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
|
|
9988
10058
|
clipRule: "evenodd"
|
|
9989
10059
|
}));
|
|
9990
10060
|
};
|
|
9991
10061
|
var UncheckMark = function() {
|
|
9992
|
-
return /* @__PURE__ */
|
|
10062
|
+
return /* @__PURE__ */ import_react85.default.createElement("svg", {
|
|
9993
10063
|
className: "h-5 w-5 text-red-500",
|
|
9994
10064
|
"aria-hidden": "true",
|
|
9995
10065
|
fill: "currentColor",
|
|
9996
10066
|
viewBox: "0 0 20 20"
|
|
9997
|
-
}, /* @__PURE__ */
|
|
10067
|
+
}, /* @__PURE__ */ import_react85.default.createElement("path", {
|
|
9998
10068
|
fillRule: "evenodd",
|
|
9999
10069
|
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
10000
10070
|
clipRule: "evenodd"
|
|
@@ -10002,74 +10072,74 @@ var UncheckMark = function() {
|
|
|
10002
10072
|
};
|
|
10003
10073
|
var ComparingPlans = function(props) {
|
|
10004
10074
|
var _props_plans;
|
|
10005
|
-
var _ref = _sliced_to_array((0,
|
|
10006
|
-
var _ref1 = _sliced_to_array((0,
|
|
10007
|
-
return /* @__PURE__ */
|
|
10075
|
+
var _ref = _sliced_to_array((0, import_react85.useState)("sar"), 2), currentCurrency = _ref[0], setCurrentCurrency = _ref[1];
|
|
10076
|
+
var _ref1 = _sliced_to_array((0, import_react85.useState)("month"), 2), currentCycle = _ref1[0], setCurrentCycle = _ref1[1];
|
|
10077
|
+
return /* @__PURE__ */ import_react85.default.createElement("div", {
|
|
10008
10078
|
id: "detailed-pricing",
|
|
10009
10079
|
className: "w-full overflow-x-auto"
|
|
10010
|
-
}, /* @__PURE__ */
|
|
10080
|
+
}, /* @__PURE__ */ import_react85.default.createElement("div", {
|
|
10011
10081
|
className: "mb-2 flex w-full justify-between"
|
|
10012
|
-
}, /* @__PURE__ */
|
|
10082
|
+
}, /* @__PURE__ */ import_react85.default.createElement(HawaRadio, {
|
|
10013
10083
|
design: "tabs",
|
|
10014
10084
|
defaultValue: currentCycle,
|
|
10015
10085
|
options: props.billingCycles,
|
|
10016
10086
|
onChangeTab: function(e) {
|
|
10017
10087
|
return props.onCycleChange(e);
|
|
10018
10088
|
}
|
|
10019
|
-
}), /* @__PURE__ */
|
|
10089
|
+
}), /* @__PURE__ */ import_react85.default.createElement(HawaRadio, {
|
|
10020
10090
|
design: "tabs",
|
|
10021
10091
|
defaultValue: currentCurrency,
|
|
10022
10092
|
options: props.currencies,
|
|
10023
10093
|
onChangeTab: function(e) {
|
|
10024
10094
|
return props.onCurrencyChange(e);
|
|
10025
10095
|
}
|
|
10026
|
-
})), /* @__PURE__ */
|
|
10096
|
+
})), /* @__PURE__ */ import_react85.default.createElement("div", {
|
|
10027
10097
|
className: " overflow-hidden rounded"
|
|
10028
|
-
}, /* @__PURE__ */
|
|
10098
|
+
}, /* @__PURE__ */ import_react85.default.createElement("div", {
|
|
10029
10099
|
className: "grid grid-cols-4 gap-x-2 border-b border-t border-gray-200 bg-gray-100 p-4 text-sm font-medium text-gray-900 dark:border-gray-700 dark:bg-gray-800 dark:text-white"
|
|
10030
|
-
}, /* @__PURE__ */
|
|
10100
|
+
}, /* @__PURE__ */ import_react85.default.createElement("div", {
|
|
10031
10101
|
className: "flex items-center"
|
|
10032
10102
|
}), props.plans.map(function(plan) {
|
|
10033
|
-
return /* @__PURE__ */
|
|
10103
|
+
return /* @__PURE__ */ import_react85.default.createElement("div", null, /* @__PURE__ */ import_react85.default.createElement("h5", {
|
|
10034
10104
|
className: "text-md 0 font-bold text-gray-500 dark:text-gray-400"
|
|
10035
|
-
}, plan.texts.title), /* @__PURE__ */
|
|
10105
|
+
}, plan.texts.title), /* @__PURE__ */ import_react85.default.createElement("div", {
|
|
10036
10106
|
className: " flex items-baseline text-gray-900 dark:text-white"
|
|
10037
|
-
}, /* @__PURE__ */
|
|
10107
|
+
}, /* @__PURE__ */ import_react85.default.createElement(import_react85.default.Fragment, null, /* @__PURE__ */ import_react85.default.createElement("span", {
|
|
10038
10108
|
className: "text-5xl font-extrabold tracking-tight"
|
|
10039
|
-
}, plan.price), /* @__PURE__ */
|
|
10109
|
+
}, plan.price), /* @__PURE__ */ import_react85.default.createElement("span", {
|
|
10040
10110
|
className: "mx-1 text-sm font-semibold"
|
|
10041
|
-
}, plan.texts.currencyText)), /* @__PURE__ */
|
|
10111
|
+
}, plan.texts.currencyText)), /* @__PURE__ */ import_react85.default.createElement("span", {
|
|
10042
10112
|
className: "ml-1 text-xl font-normal text-gray-500 dark:text-gray-400"
|
|
10043
|
-
}, "/ ", plan.texts.cycleText)), /* @__PURE__ */
|
|
10113
|
+
}, "/ ", plan.texts.cycleText)), /* @__PURE__ */ import_react85.default.createElement("h5", {
|
|
10044
10114
|
className: "text-md font-normal text-gray-500 dark:text-gray-400"
|
|
10045
10115
|
}, plan.texts.subtitle));
|
|
10046
10116
|
})), (_props_plans = props.plans) === null || _props_plans === void 0 ? void 0 : _props_plans.map(function(plan) {
|
|
10047
10117
|
return plan.features.map(function(feature) {
|
|
10048
|
-
return /* @__PURE__ */
|
|
10118
|
+
return /* @__PURE__ */ import_react85.default.createElement("div", {
|
|
10049
10119
|
className: "grid grid-cols-4 gap-x-16 border-b border-gray-200 px-4 py-5 text-sm text-gray-700 dark:border-gray-700"
|
|
10050
|
-
}, /* @__PURE__ */
|
|
10120
|
+
}, /* @__PURE__ */ import_react85.default.createElement("div", {
|
|
10051
10121
|
className: " flex flex-row items-center gap-2 text-gray-500 dark:text-gray-400"
|
|
10052
|
-
}, feature.text, feature.description && /* @__PURE__ */
|
|
10122
|
+
}, feature.text, feature.description && /* @__PURE__ */ import_react85.default.createElement(Tooltip, {
|
|
10053
10123
|
side: "right",
|
|
10054
10124
|
content: feature.description
|
|
10055
|
-
}, /* @__PURE__ */
|
|
10125
|
+
}, /* @__PURE__ */ import_react85.default.createElement("svg", {
|
|
10056
10126
|
stroke: "currentColor",
|
|
10057
10127
|
fill: "currentColor",
|
|
10058
10128
|
strokeWidth: "0",
|
|
10059
10129
|
viewBox: "0 0 16 16",
|
|
10060
10130
|
height: "1em",
|
|
10061
10131
|
width: "1em"
|
|
10062
|
-
}, /* @__PURE__ */
|
|
10132
|
+
}, /* @__PURE__ */ import_react85.default.createElement("path", {
|
|
10063
10133
|
d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"
|
|
10064
|
-
})))), /* @__PURE__ */
|
|
10134
|
+
})))), /* @__PURE__ */ import_react85.default.createElement(UncheckMark, null), /* @__PURE__ */ import_react85.default.createElement(CheckMark, null), /* @__PURE__ */ import_react85.default.createElement(UncheckMark, null));
|
|
10065
10135
|
});
|
|
10066
10136
|
})));
|
|
10067
10137
|
};
|
|
10068
10138
|
// src/blocks/Pricing/HorizontalPricing.tsx
|
|
10069
|
-
var
|
|
10139
|
+
var import_react86 = __toESM(require("react"));
|
|
10070
10140
|
var import_clsx33 = __toESM(require("clsx"));
|
|
10071
10141
|
var HorizontalPricing = function(props) {
|
|
10072
|
-
var _ref = _sliced_to_array((0,
|
|
10142
|
+
var _ref = _sliced_to_array((0, import_react86.useState)(null), 2), selectedCard = _ref[0], setSelectedCard = _ref[1];
|
|
10073
10143
|
var data = [
|
|
10074
10144
|
{
|
|
10075
10145
|
title: "basic",
|
|
@@ -10087,155 +10157,155 @@ var HorizontalPricing = function(props) {
|
|
|
10087
10157
|
cycle: "/mo"
|
|
10088
10158
|
}
|
|
10089
10159
|
];
|
|
10090
|
-
return /* @__PURE__ */
|
|
10160
|
+
return /* @__PURE__ */ import_react86.default.createElement("div", {
|
|
10091
10161
|
className: "z-10 w-full max-w-screen-sm"
|
|
10092
|
-
}, /* @__PURE__ */
|
|
10162
|
+
}, /* @__PURE__ */ import_react86.default.createElement("div", {
|
|
10093
10163
|
className: "max-w-2xl "
|
|
10094
|
-
}, /* @__PURE__ */
|
|
10164
|
+
}, /* @__PURE__ */ import_react86.default.createElement("div", {
|
|
10095
10165
|
className: "flex flex-row justify-between"
|
|
10096
|
-
}, /* @__PURE__ */
|
|
10166
|
+
}, /* @__PURE__ */ import_react86.default.createElement(HawaRadio, {
|
|
10097
10167
|
design: "tabs",
|
|
10098
10168
|
options: props.currencies,
|
|
10099
10169
|
defaultValue: props.currentCurrency
|
|
10100
|
-
}), /* @__PURE__ */
|
|
10170
|
+
}), /* @__PURE__ */ import_react86.default.createElement(HawaRadio, {
|
|
10101
10171
|
design: "tabs",
|
|
10102
10172
|
options: props.billingCycles,
|
|
10103
10173
|
defaultValue: props.currentCycle
|
|
10104
10174
|
})), data.map(function(d) {
|
|
10105
|
-
return /* @__PURE__ */
|
|
10175
|
+
return /* @__PURE__ */ import_react86.default.createElement("label", {
|
|
10106
10176
|
htmlFor: d.title,
|
|
10107
10177
|
className: "",
|
|
10108
10178
|
onClick: function() {
|
|
10109
10179
|
return setSelectedCard(d.title);
|
|
10110
10180
|
}
|
|
10111
|
-
}, /* @__PURE__ */
|
|
10181
|
+
}, /* @__PURE__ */ import_react86.default.createElement("input", {
|
|
10112
10182
|
type: "radio",
|
|
10113
10183
|
name: "radio",
|
|
10114
10184
|
id: d.title,
|
|
10115
10185
|
className: "peer appearance-none"
|
|
10116
|
-
}), /* @__PURE__ */
|
|
10186
|
+
}), /* @__PURE__ */ import_react86.default.createElement("div", {
|
|
10117
10187
|
className: (0, import_clsx33.default)(selectedCard === d.title ? "peer-checked:border-blue-500" : "", "peer flex cursor-pointer items-center justify-between rounded-xl border bg-background px-5 py-4 shadow dark:text-white peer-checked:[&_.active]:block peer-checked:[&_.default]:hidden")
|
|
10118
|
-
}, /* @__PURE__ */
|
|
10188
|
+
}, /* @__PURE__ */ import_react86.default.createElement("div", {
|
|
10119
10189
|
className: "peer flex items-center gap-4"
|
|
10120
|
-
}, /* @__PURE__ */
|
|
10190
|
+
}, /* @__PURE__ */ import_react86.default.createElement(CheckIcons, null), /* @__PURE__ */ import_react86.default.createElement(CardText, {
|
|
10121
10191
|
title: "Enterprise",
|
|
10122
10192
|
subtitle: "For startups and new businesses"
|
|
10123
|
-
})), /* @__PURE__ */
|
|
10193
|
+
})), /* @__PURE__ */ import_react86.default.createElement(CardPrice, {
|
|
10124
10194
|
amount: d.price,
|
|
10125
10195
|
cycle: d.cycle
|
|
10126
10196
|
})));
|
|
10127
10197
|
})));
|
|
10128
10198
|
};
|
|
10129
10199
|
var CheckIcons = function() {
|
|
10130
|
-
return /* @__PURE__ */
|
|
10200
|
+
return /* @__PURE__ */ import_react86.default.createElement(import_react86.default.Fragment, null, /* @__PURE__ */ import_react86.default.createElement("svg", {
|
|
10131
10201
|
fill: "none",
|
|
10132
10202
|
viewBox: "0 0 24 24",
|
|
10133
10203
|
strokeWidth: "1.5",
|
|
10134
10204
|
stroke: "currentColor",
|
|
10135
10205
|
className: "default h-8 w-8 text-neutral-500"
|
|
10136
|
-
}, /* @__PURE__ */
|
|
10206
|
+
}, /* @__PURE__ */ import_react86.default.createElement("path", {
|
|
10137
10207
|
strokeLinecap: "round",
|
|
10138
10208
|
strokeLinejoin: "round",
|
|
10139
10209
|
d: "M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
10140
|
-
})), /* @__PURE__ */
|
|
10210
|
+
})), /* @__PURE__ */ import_react86.default.createElement("svg", {
|
|
10141
10211
|
viewBox: "0 0 24 24",
|
|
10142
10212
|
fill: "currentColor",
|
|
10143
10213
|
className: "active hidden h-8 w-8 text-blue-500"
|
|
10144
|
-
}, /* @__PURE__ */
|
|
10214
|
+
}, /* @__PURE__ */ import_react86.default.createElement("path", {
|
|
10145
10215
|
fillRule: "evenodd",
|
|
10146
10216
|
clipRule: "evenodd",
|
|
10147
10217
|
d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z"
|
|
10148
10218
|
})));
|
|
10149
10219
|
};
|
|
10150
10220
|
var CardText = function(props) {
|
|
10151
|
-
return /* @__PURE__ */
|
|
10221
|
+
return /* @__PURE__ */ import_react86.default.createElement("div", {
|
|
10152
10222
|
className: "peer flex flex-col items-start "
|
|
10153
|
-
}, /* @__PURE__ */
|
|
10223
|
+
}, /* @__PURE__ */ import_react86.default.createElement("h2", {
|
|
10154
10224
|
className: "font-medium text-neutral-700 dark:text-gray-100 sm:text-xl"
|
|
10155
|
-
}, props.title), /* @__PURE__ */
|
|
10225
|
+
}, props.title), /* @__PURE__ */ import_react86.default.createElement("p", {
|
|
10156
10226
|
className: "text-sm text-neutral-500 dark:text-gray-300"
|
|
10157
10227
|
}, props.subtitle, " "));
|
|
10158
10228
|
};
|
|
10159
10229
|
var CardPrice = function(props) {
|
|
10160
|
-
return /* @__PURE__ */
|
|
10230
|
+
return /* @__PURE__ */ import_react86.default.createElement("h2", {
|
|
10161
10231
|
className: "peer text-xl font-semibold text-neutral-900 dark:text-white sm:text-2xl"
|
|
10162
|
-
}, props.amount, /* @__PURE__ */
|
|
10232
|
+
}, props.amount, /* @__PURE__ */ import_react86.default.createElement("span", {
|
|
10163
10233
|
className: "text-base font-medium text-neutral-400"
|
|
10164
10234
|
}, props.cycle));
|
|
10165
10235
|
};
|
|
10166
10236
|
// src/blocks/Referral/ReferralAccount.tsx
|
|
10167
|
-
var
|
|
10237
|
+
var import_react87 = __toESM(require("react"));
|
|
10168
10238
|
var ReferralAccount = function(param) {
|
|
10169
10239
|
var referralLink = param.referralLink, referralCode = param.referralCode;
|
|
10170
|
-
return /* @__PURE__ */
|
|
10240
|
+
return /* @__PURE__ */ import_react87.default.createElement(Card, null, /* @__PURE__ */ import_react87.default.createElement(CardContent, {
|
|
10171
10241
|
headless: true
|
|
10172
|
-
}, /* @__PURE__ */
|
|
10242
|
+
}, /* @__PURE__ */ import_react87.default.createElement("div", {
|
|
10173
10243
|
className: "my-2 mt-0"
|
|
10174
|
-
}, /* @__PURE__ */
|
|
10244
|
+
}, /* @__PURE__ */ import_react87.default.createElement("div", {
|
|
10175
10245
|
className: "mb-1"
|
|
10176
|
-
}, "Referral Code"), /* @__PURE__ */
|
|
10246
|
+
}, "Referral Code"), /* @__PURE__ */ import_react87.default.createElement("div", {
|
|
10177
10247
|
className: "flex flex-row items-center justify-between rounded border bg-background"
|
|
10178
|
-
}, /* @__PURE__ */
|
|
10248
|
+
}, /* @__PURE__ */ import_react87.default.createElement("span", {
|
|
10179
10249
|
className: "ml-3 font-bold"
|
|
10180
|
-
}, referralCode), /* @__PURE__ */
|
|
10250
|
+
}, referralCode), /* @__PURE__ */ import_react87.default.createElement(Button, {
|
|
10181
10251
|
onClick: function() {
|
|
10182
10252
|
return navigator.clipboard.writeText(referralCode);
|
|
10183
10253
|
}
|
|
10184
|
-
}, /* @__PURE__ */
|
|
10254
|
+
}, /* @__PURE__ */ import_react87.default.createElement("span", {
|
|
10185
10255
|
className: "bg-red flex items-center justify-center"
|
|
10186
|
-
}, /* @__PURE__ */
|
|
10256
|
+
}, /* @__PURE__ */ import_react87.default.createElement("svg", {
|
|
10187
10257
|
stroke: "currentColor",
|
|
10188
10258
|
fill: "currentColor",
|
|
10189
10259
|
strokeWidth: "0",
|
|
10190
10260
|
viewBox: "0 0 512 512",
|
|
10191
10261
|
height: "1em",
|
|
10192
10262
|
width: "1em"
|
|
10193
|
-
}, /* @__PURE__ */
|
|
10263
|
+
}, /* @__PURE__ */ import_react87.default.createElement("path", {
|
|
10194
10264
|
d: "M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z"
|
|
10195
|
-
})), " ")))), /* @__PURE__ */
|
|
10265
|
+
})), " ")))), /* @__PURE__ */ import_react87.default.createElement("div", {
|
|
10196
10266
|
className: "my-2 mt-0"
|
|
10197
|
-
}, /* @__PURE__ */
|
|
10267
|
+
}, /* @__PURE__ */ import_react87.default.createElement("div", {
|
|
10198
10268
|
className: "mb-1"
|
|
10199
|
-
}, "Referral Link"), /* @__PURE__ */
|
|
10269
|
+
}, "Referral Link"), /* @__PURE__ */ import_react87.default.createElement("div", {
|
|
10200
10270
|
className: "flex flex-row items-center justify-between rounded border bg-background"
|
|
10201
|
-
}, /* @__PURE__ */
|
|
10271
|
+
}, /* @__PURE__ */ import_react87.default.createElement("span", {
|
|
10202
10272
|
className: "ml-3 font-bold"
|
|
10203
|
-
}, referralLink), /* @__PURE__ */
|
|
10273
|
+
}, referralLink), /* @__PURE__ */ import_react87.default.createElement(Button, {
|
|
10204
10274
|
onClick: function() {
|
|
10205
10275
|
return navigator.clipboard.writeText(referralLink);
|
|
10206
10276
|
}
|
|
10207
|
-
}, /* @__PURE__ */
|
|
10277
|
+
}, /* @__PURE__ */ import_react87.default.createElement("span", {
|
|
10208
10278
|
className: "bg-red flex items-center justify-center"
|
|
10209
|
-
}, /* @__PURE__ */
|
|
10279
|
+
}, /* @__PURE__ */ import_react87.default.createElement("svg", {
|
|
10210
10280
|
stroke: "currentColor",
|
|
10211
10281
|
fill: "currentColor",
|
|
10212
10282
|
strokeWidth: "0",
|
|
10213
10283
|
viewBox: "0 0 512 512",
|
|
10214
10284
|
height: "1em",
|
|
10215
10285
|
width: "1em"
|
|
10216
|
-
}, /* @__PURE__ */
|
|
10286
|
+
}, /* @__PURE__ */ import_react87.default.createElement("path", {
|
|
10217
10287
|
d: "M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z"
|
|
10218
10288
|
})), " "))))));
|
|
10219
10289
|
};
|
|
10220
10290
|
// src/blocks/Referral/ReferralSettlement.tsx
|
|
10221
|
-
var
|
|
10291
|
+
var import_react88 = __toESM(require("react"));
|
|
10222
10292
|
var import_react_hook_form9 = require("react-hook-form");
|
|
10223
10293
|
var ReferralSettlement = function(param) {
|
|
10224
10294
|
var referralLink = param.referralLink, referralCode = param.referralCode, withdrawError = param.withdrawError;
|
|
10225
10295
|
var methods = (0, import_react_hook_form9.useForm)();
|
|
10226
10296
|
var errors = methods.formState.errors, handleSubmit = methods.handleSubmit, control = methods.control;
|
|
10227
|
-
return /* @__PURE__ */
|
|
10297
|
+
return /* @__PURE__ */ import_react88.default.createElement(Card, null, /* @__PURE__ */ import_react88.default.createElement(CardContent, {
|
|
10228
10298
|
headless: true
|
|
10229
|
-
}, /* @__PURE__ */
|
|
10299
|
+
}, /* @__PURE__ */ import_react88.default.createElement("div", null, /* @__PURE__ */ import_react88.default.createElement(import_react_hook_form9.FormProvider, _object_spread({}, methods), /* @__PURE__ */ import_react88.default.createElement(HawaTextField, {
|
|
10230
10300
|
label: "IBAN"
|
|
10231
|
-
}), /* @__PURE__ */
|
|
10301
|
+
}), /* @__PURE__ */ import_react88.default.createElement(HawaTextField, {
|
|
10232
10302
|
label: "Holder Name"
|
|
10233
|
-
}), /* @__PURE__ */
|
|
10303
|
+
}), /* @__PURE__ */ import_react88.default.createElement(import_react_hook_form9.Controller, {
|
|
10234
10304
|
control: control,
|
|
10235
10305
|
name: "bank",
|
|
10236
10306
|
render: function(param) {
|
|
10237
10307
|
var field = param.field;
|
|
10238
|
-
return /* @__PURE__ */
|
|
10308
|
+
return /* @__PURE__ */ import_react88.default.createElement(HawaSelect, _object_spread_props(_object_spread({
|
|
10239
10309
|
label: "Bank",
|
|
10240
10310
|
isCreatable: false,
|
|
10241
10311
|
isMulti: false,
|
|
@@ -10264,47 +10334,47 @@ var ReferralSettlement = function(param) {
|
|
|
10264
10334
|
}
|
|
10265
10335
|
}));
|
|
10266
10336
|
}
|
|
10267
|
-
}))), /* @__PURE__ */
|
|
10337
|
+
}))), /* @__PURE__ */ import_react88.default.createElement("div", null, /* @__PURE__ */ import_react88.default.createElement(Button, {
|
|
10268
10338
|
className: "mt-6 w-full"
|
|
10269
|
-
}, "Add Bank Account")), withdrawError && /* @__PURE__ */
|
|
10339
|
+
}, "Add Bank Account")), withdrawError && /* @__PURE__ */ import_react88.default.createElement("div", null, /* @__PURE__ */ import_react88.default.createElement(HawaAlert, {
|
|
10270
10340
|
text: "Sorry can't withdraw the money at the moment. Please try again in 2022/11/20",
|
|
10271
10341
|
severity: "warning"
|
|
10272
|
-
})), /* @__PURE__ */
|
|
10342
|
+
})), /* @__PURE__ */ import_react88.default.createElement("div", {
|
|
10273
10343
|
className: "mt-3"
|
|
10274
|
-
}, /* @__PURE__ */
|
|
10344
|
+
}, /* @__PURE__ */ import_react88.default.createElement("div", {
|
|
10275
10345
|
className: "mb-1"
|
|
10276
|
-
}, "Settlement Accounts"), /* @__PURE__ */
|
|
10346
|
+
}, "Settlement Accounts"), /* @__PURE__ */ import_react88.default.createElement("div", {
|
|
10277
10347
|
className: "rounded"
|
|
10278
|
-
}, /* @__PURE__ */
|
|
10348
|
+
}, /* @__PURE__ */ import_react88.default.createElement(SettlementAccountCard, {
|
|
10279
10349
|
bank: "Al Inma Bank",
|
|
10280
10350
|
iban: "SA10228094028098329119",
|
|
10281
10351
|
accountHolder: "Zakher Masri",
|
|
10282
10352
|
default: true
|
|
10283
|
-
}), /* @__PURE__ */
|
|
10353
|
+
}), /* @__PURE__ */ import_react88.default.createElement(SettlementAccountCard, {
|
|
10284
10354
|
bank: "Al Rajihi Bank",
|
|
10285
10355
|
iban: "SA10228094028098329119",
|
|
10286
10356
|
accountHolder: "Zakher Masri"
|
|
10287
|
-
}), /* @__PURE__ */
|
|
10357
|
+
}), /* @__PURE__ */ import_react88.default.createElement(SettlementAccountCard, {
|
|
10288
10358
|
bank: "Al Inma Bank",
|
|
10289
10359
|
iban: "SA10228094028098329119",
|
|
10290
10360
|
accountHolder: "Zakher Masri"
|
|
10291
10361
|
})))));
|
|
10292
10362
|
};
|
|
10293
10363
|
var SettlementAccountCard = function(props) {
|
|
10294
|
-
return /* @__PURE__ */
|
|
10364
|
+
return /* @__PURE__ */ import_react88.default.createElement("div", {
|
|
10295
10365
|
className: "mb-3 flex flex-row items-center justify-between rounded border bg-background p-3"
|
|
10296
|
-
}, /* @__PURE__ */
|
|
10366
|
+
}, /* @__PURE__ */ import_react88.default.createElement("div", {
|
|
10297
10367
|
className: "flex flex-col justify-between"
|
|
10298
|
-
}, /* @__PURE__ */
|
|
10368
|
+
}, /* @__PURE__ */ import_react88.default.createElement("div", {
|
|
10299
10369
|
className: "text-xs"
|
|
10300
|
-
}, props.bank), /* @__PURE__ */
|
|
10370
|
+
}, props.bank), /* @__PURE__ */ import_react88.default.createElement("div", null, props.accountHolder), /* @__PURE__ */ import_react88.default.createElement("div", {
|
|
10301
10371
|
className: "text-xs"
|
|
10302
|
-
}, props.iban)), /* @__PURE__ */
|
|
10372
|
+
}, props.iban)), /* @__PURE__ */ import_react88.default.createElement("div", {
|
|
10303
10373
|
className: "flex flex-row items-center justify-center gap-2"
|
|
10304
|
-
}, props.default && /* @__PURE__ */
|
|
10374
|
+
}, props.default && /* @__PURE__ */ import_react88.default.createElement(HawaChip, {
|
|
10305
10375
|
label: "Default",
|
|
10306
10376
|
size: "small"
|
|
10307
|
-
}), /* @__PURE__ */
|
|
10377
|
+
}), /* @__PURE__ */ import_react88.default.createElement(HawaMenu, {
|
|
10308
10378
|
size: "small",
|
|
10309
10379
|
menuItems: [
|
|
10310
10380
|
[
|
|
@@ -10320,10 +10390,10 @@ var SettlementAccountCard = function(props) {
|
|
|
10320
10390
|
}
|
|
10321
10391
|
]
|
|
10322
10392
|
]
|
|
10323
|
-
}, /* @__PURE__ */
|
|
10393
|
+
}, /* @__PURE__ */ import_react88.default.createElement(Button, {
|
|
10324
10394
|
variant: "outline",
|
|
10325
10395
|
size: "icon"
|
|
10326
|
-
}, /* @__PURE__ */
|
|
10396
|
+
}, /* @__PURE__ */ import_react88.default.createElement("svg", {
|
|
10327
10397
|
"aria-label": "Vertical Three Dots Menu Icon",
|
|
10328
10398
|
className: "rotate-90",
|
|
10329
10399
|
stroke: "currentColor",
|
|
@@ -10332,126 +10402,126 @@ var SettlementAccountCard = function(props) {
|
|
|
10332
10402
|
viewBox: "0 0 16 16",
|
|
10333
10403
|
height: "1em",
|
|
10334
10404
|
width: "1em"
|
|
10335
|
-
}, /* @__PURE__ */
|
|
10405
|
+
}, /* @__PURE__ */ import_react88.default.createElement("path", {
|
|
10336
10406
|
d: "M3 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"
|
|
10337
10407
|
}))))));
|
|
10338
10408
|
};
|
|
10339
10409
|
// src/blocks/Referral/ReferralStats.tsx
|
|
10340
|
-
var
|
|
10410
|
+
var import_react89 = __toESM(require("react"));
|
|
10341
10411
|
var ReferralStats = function(param) {
|
|
10342
10412
|
var referralLink = param.referralLink, referralCode = param.referralCode, withdrawError = param.withdrawError;
|
|
10343
|
-
return /* @__PURE__ */
|
|
10413
|
+
return /* @__PURE__ */ import_react89.default.createElement(Card, null, /* @__PURE__ */ import_react89.default.createElement(CardContent, {
|
|
10344
10414
|
headless: true
|
|
10345
|
-
}, /* @__PURE__ */
|
|
10415
|
+
}, /* @__PURE__ */ import_react89.default.createElement("div", {
|
|
10346
10416
|
className: "mb-1"
|
|
10347
|
-
}, "Stats"), /* @__PURE__ */
|
|
10417
|
+
}, "Stats"), /* @__PURE__ */ import_react89.default.createElement("div", {
|
|
10348
10418
|
className: "justi flex flex-row gap-1"
|
|
10349
|
-
}, /* @__PURE__ */
|
|
10419
|
+
}, /* @__PURE__ */ import_react89.default.createElement(NumberCard, {
|
|
10350
10420
|
title: "Clicks",
|
|
10351
10421
|
number: 22
|
|
10352
|
-
}), /* @__PURE__ */
|
|
10422
|
+
}), /* @__PURE__ */ import_react89.default.createElement(NumberCard, {
|
|
10353
10423
|
title: "Sign-ups",
|
|
10354
10424
|
number: 32
|
|
10355
|
-
}), /* @__PURE__ */
|
|
10425
|
+
}), /* @__PURE__ */ import_react89.default.createElement(NumberCard, {
|
|
10356
10426
|
title: "Commission",
|
|
10357
10427
|
number: "213.22 SAR"
|
|
10358
|
-
})), /* @__PURE__ */
|
|
10428
|
+
})), /* @__PURE__ */ import_react89.default.createElement(Button, {
|
|
10359
10429
|
className: "mt-6 w-full"
|
|
10360
|
-
}, "Withdraw Money"), withdrawError && /* @__PURE__ */
|
|
10430
|
+
}, "Withdraw Money"), withdrawError && /* @__PURE__ */ import_react89.default.createElement("div", null, /* @__PURE__ */ import_react89.default.createElement(HawaAlert, {
|
|
10361
10431
|
text: "Sorry can't withdraw the money at the moment. Please try again in 2022/11/20",
|
|
10362
10432
|
severity: "warning"
|
|
10363
|
-
})), /* @__PURE__ */
|
|
10433
|
+
})), /* @__PURE__ */ import_react89.default.createElement("div", {
|
|
10364
10434
|
className: "mt-3"
|
|
10365
|
-
}, /* @__PURE__ */
|
|
10435
|
+
}, /* @__PURE__ */ import_react89.default.createElement("div", {
|
|
10366
10436
|
className: "mb-1"
|
|
10367
|
-
}, "Sign ups"), /* @__PURE__ */
|
|
10437
|
+
}, "Sign ups"), /* @__PURE__ */ import_react89.default.createElement("div", {
|
|
10368
10438
|
className: "rounded"
|
|
10369
|
-
}, /* @__PURE__ */
|
|
10439
|
+
}, /* @__PURE__ */ import_react89.default.createElement(ReferralSignUpCard, {
|
|
10370
10440
|
date: "2020/10/11 @ 9:45 pm",
|
|
10371
10441
|
email: "zakher@sikka.io",
|
|
10372
10442
|
amount: "3.4 SAR / Month"
|
|
10373
|
-
}), /* @__PURE__ */
|
|
10443
|
+
}), /* @__PURE__ */ import_react89.default.createElement(ReferralSignUpCard, {
|
|
10374
10444
|
date: "2022/10/11 @ 9:45 pm",
|
|
10375
10445
|
email: "zakher@sikka.io",
|
|
10376
10446
|
amount: "3.4 SAR / Month"
|
|
10377
|
-
}), /* @__PURE__ */
|
|
10447
|
+
}), /* @__PURE__ */ import_react89.default.createElement(ReferralSignUpCard, {
|
|
10378
10448
|
date: "2022/10/11 @ 9:45 pm",
|
|
10379
10449
|
email: "zakher@sikka.io",
|
|
10380
10450
|
amount: "3.4 SAR / Month"
|
|
10381
|
-
}), /* @__PURE__ */
|
|
10451
|
+
}), /* @__PURE__ */ import_react89.default.createElement(ReferralSignUpCard, {
|
|
10382
10452
|
date: "2022/10/11 @ 9:45 pm",
|
|
10383
10453
|
email: "zakher@sikka.io",
|
|
10384
10454
|
amount: "3.4 SAR / Month"
|
|
10385
|
-
}), /* @__PURE__ */
|
|
10455
|
+
}), /* @__PURE__ */ import_react89.default.createElement(ReferralSignUpCard, {
|
|
10386
10456
|
date: "2022/10/11 @ 9:45 pm",
|
|
10387
10457
|
email: "zakher@sikka.io",
|
|
10388
10458
|
amount: "3.4 SAR / Month"
|
|
10389
10459
|
})))));
|
|
10390
10460
|
};
|
|
10391
10461
|
var NumberCard = function(props) {
|
|
10392
|
-
return /* @__PURE__ */
|
|
10462
|
+
return /* @__PURE__ */ import_react89.default.createElement("div", {
|
|
10393
10463
|
className: "w-full rounded border bg-background p-2"
|
|
10394
|
-
}, /* @__PURE__ */
|
|
10464
|
+
}, /* @__PURE__ */ import_react89.default.createElement("div", {
|
|
10395
10465
|
className: "text-sm"
|
|
10396
|
-
}, props.title), /* @__PURE__ */
|
|
10466
|
+
}, props.title), /* @__PURE__ */ import_react89.default.createElement("div", {
|
|
10397
10467
|
className: "font-bold"
|
|
10398
10468
|
}, props.number));
|
|
10399
10469
|
};
|
|
10400
10470
|
var ReferralSignUpCard = function(props) {
|
|
10401
|
-
return /* @__PURE__ */
|
|
10471
|
+
return /* @__PURE__ */ import_react89.default.createElement("div", {
|
|
10402
10472
|
className: "mb-3 rounded border-b bg-background p-2"
|
|
10403
|
-
}, /* @__PURE__ */
|
|
10473
|
+
}, /* @__PURE__ */ import_react89.default.createElement("div", {
|
|
10404
10474
|
className: "text-xs"
|
|
10405
|
-
}, props.date), /* @__PURE__ */
|
|
10475
|
+
}, props.date), /* @__PURE__ */ import_react89.default.createElement("div", {
|
|
10406
10476
|
className: "flex flex-row justify-between"
|
|
10407
|
-
}, /* @__PURE__ */
|
|
10477
|
+
}, /* @__PURE__ */ import_react89.default.createElement("div", null, props.email), /* @__PURE__ */ import_react89.default.createElement("div", null, props.amount)));
|
|
10408
10478
|
};
|
|
10409
10479
|
// src/blocks/Misc/NotFound.tsx
|
|
10410
|
-
var
|
|
10480
|
+
var import_react90 = __toESM(require("react"));
|
|
10411
10481
|
var NotFound = function(param) {
|
|
10412
10482
|
var _param_variant = param.variant, variant = _param_variant === void 0 ? "contained" : _param_variant, texts = param.texts;
|
|
10413
10483
|
var _texts, _texts1, _texts2;
|
|
10414
10484
|
var _texts_pageNotFound, _texts_ifLost, _texts_home;
|
|
10415
|
-
return /* @__PURE__ */
|
|
10485
|
+
return /* @__PURE__ */ import_react90.default.createElement(Card, null, /* @__PURE__ */ import_react90.default.createElement(CardContent, {
|
|
10416
10486
|
headless: true
|
|
10417
|
-
}, /* @__PURE__ */
|
|
10487
|
+
}, /* @__PURE__ */ import_react90.default.createElement("div", {
|
|
10418
10488
|
className: "flex flex-col items-center dark:text-white"
|
|
10419
|
-
}, /* @__PURE__ */
|
|
10489
|
+
}, /* @__PURE__ */ import_react90.default.createElement("div", {
|
|
10420
10490
|
className: "text-center text-6xl font-bold "
|
|
10421
|
-
}, "404"), /* @__PURE__ */
|
|
10491
|
+
}, "404"), /* @__PURE__ */ import_react90.default.createElement("div", {
|
|
10422
10492
|
className: "m-2 text-center text-xl font-bold "
|
|
10423
|
-
}, (_texts_pageNotFound = (_texts = texts) === null || _texts === void 0 ? void 0 : _texts.pageNotFound) !== null && _texts_pageNotFound !== void 0 ? _texts_pageNotFound : "Page Not Found"), /* @__PURE__ */
|
|
10493
|
+
}, (_texts_pageNotFound = (_texts = texts) === null || _texts === void 0 ? void 0 : _texts.pageNotFound) !== null && _texts_pageNotFound !== void 0 ? _texts_pageNotFound : "Page Not Found"), /* @__PURE__ */ import_react90.default.createElement("div", {
|
|
10424
10494
|
className: "mb-4 text-center"
|
|
10425
|
-
}, (_texts_ifLost = (_texts1 = texts) === null || _texts1 === void 0 ? void 0 : _texts1.ifLost) !== null && _texts_ifLost !== void 0 ? _texts_ifLost : /* @__PURE__ */
|
|
10495
|
+
}, (_texts_ifLost = (_texts1 = texts) === null || _texts1 === void 0 ? void 0 : _texts1.ifLost) !== null && _texts_ifLost !== void 0 ? _texts_ifLost : /* @__PURE__ */ import_react90.default.createElement(import_react90.default.Fragment, null, "If you're lost please contact us", " ", /* @__PURE__ */ import_react90.default.createElement("span", {
|
|
10426
10496
|
className: "clickable-link"
|
|
10427
|
-
}, "help@sikka.io"))), /* @__PURE__ */
|
|
10497
|
+
}, "help@sikka.io"))), /* @__PURE__ */ import_react90.default.createElement(Button, {
|
|
10428
10498
|
className: "w-full"
|
|
10429
10499
|
}, (_texts_home = (_texts2 = texts) === null || _texts2 === void 0 ? void 0 : _texts2.home) !== null && _texts_home !== void 0 ? _texts_home : "Home"))));
|
|
10430
10500
|
};
|
|
10431
10501
|
// src/blocks/Misc/EmptyState.tsx
|
|
10432
|
-
var
|
|
10502
|
+
var import_react91 = __toESM(require("react"));
|
|
10433
10503
|
var EmptyState = function(param) {
|
|
10434
10504
|
var _param_variant = param.variant, variant = _param_variant === void 0 ? "contained" : _param_variant, texts = param.texts, onActionClick = param.onActionClick;
|
|
10435
10505
|
var _texts, _texts1;
|
|
10436
10506
|
var _texts_youreCaughtUp, _texts_actionText;
|
|
10437
|
-
return /* @__PURE__ */
|
|
10507
|
+
return /* @__PURE__ */ import_react91.default.createElement(Card, null, /* @__PURE__ */ import_react91.default.createElement(CardContent, {
|
|
10438
10508
|
headless: true
|
|
10439
|
-
}, /* @__PURE__ */
|
|
10509
|
+
}, /* @__PURE__ */ import_react91.default.createElement("div", {
|
|
10440
10510
|
className: "flex flex-col items-center justify-center text-center "
|
|
10441
|
-
}, /* @__PURE__ */
|
|
10511
|
+
}, /* @__PURE__ */ import_react91.default.createElement("div", {
|
|
10442
10512
|
className: "flex h-10 w-10 flex-col items-center justify-center rounded-3xl bg-primary text-6xl font-bold text-primary-foreground"
|
|
10443
|
-
}, /* @__PURE__ */
|
|
10513
|
+
}, /* @__PURE__ */ import_react91.default.createElement("svg", {
|
|
10444
10514
|
stroke: "currentColor",
|
|
10445
10515
|
fill: "currentColor",
|
|
10446
10516
|
strokeWidth: "0",
|
|
10447
10517
|
viewBox: "0 0 512 512",
|
|
10448
10518
|
height: "0.35em",
|
|
10449
10519
|
width: "0.35em"
|
|
10450
|
-
}, /* @__PURE__ */
|
|
10520
|
+
}, /* @__PURE__ */ import_react91.default.createElement("path", {
|
|
10451
10521
|
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"
|
|
10452
|
-
}))), /* @__PURE__ */
|
|
10522
|
+
}))), /* @__PURE__ */ import_react91.default.createElement("div", {
|
|
10453
10523
|
className: "m-2 text-xl font-bold"
|
|
10454
|
-
}, (_texts_youreCaughtUp = (_texts = texts) === null || _texts === void 0 ? void 0 : _texts.youreCaughtUp) !== null && _texts_youreCaughtUp !== void 0 ? _texts_youreCaughtUp : "You're all caught up"))), /* @__PURE__ */
|
|
10524
|
+
}, (_texts_youreCaughtUp = (_texts = texts) === null || _texts === void 0 ? void 0 : _texts.youreCaughtUp) !== null && _texts_youreCaughtUp !== void 0 ? _texts_youreCaughtUp : "You're all caught up"))), /* @__PURE__ */ import_react91.default.createElement(CardFooter, null, /* @__PURE__ */ import_react91.default.createElement(Button, {
|
|
10455
10525
|
className: "w-full",
|
|
10456
10526
|
onClick: function() {
|
|
10457
10527
|
return onActionClick();
|
|
@@ -10459,103 +10529,104 @@ var EmptyState = function(param) {
|
|
|
10459
10529
|
}, (_texts_actionText = (_texts1 = texts) === null || _texts1 === void 0 ? void 0 : _texts1.actionText) !== null && _texts_actionText !== void 0 ? _texts_actionText : "Go Home")));
|
|
10460
10530
|
};
|
|
10461
10531
|
// src/blocks/Misc/Testimonial.tsx
|
|
10462
|
-
var
|
|
10532
|
+
var import_react92 = __toESM(require("react"));
|
|
10463
10533
|
var Testimonial = function(props) {
|
|
10464
|
-
return /* @__PURE__ */
|
|
10534
|
+
return /* @__PURE__ */ import_react92.default.createElement(Card, null, /* @__PURE__ */ import_react92.default.createElement(CardContent, {
|
|
10465
10535
|
headless: true
|
|
10466
|
-
}, /* @__PURE__ */
|
|
10536
|
+
}, /* @__PURE__ */ import_react92.default.createElement("div", null, /* @__PURE__ */ import_react92.default.createElement("p", {
|
|
10467
10537
|
className: "mb-4 max-w-sm"
|
|
10468
|
-
}, "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__ */
|
|
10538
|
+
}, "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_react92.default.createElement("div", {
|
|
10469
10539
|
className: "flex flex-row gap-4"
|
|
10470
|
-
}, /* @__PURE__ */
|
|
10540
|
+
}, /* @__PURE__ */ import_react92.default.createElement("svg", {
|
|
10471
10541
|
width: "48",
|
|
10472
10542
|
height: "48",
|
|
10473
10543
|
viewBox: "0 0 48 48",
|
|
10474
10544
|
fill: "none"
|
|
10475
|
-
}, /* @__PURE__ */
|
|
10545
|
+
}, /* @__PURE__ */ import_react92.default.createElement("rect", {
|
|
10476
10546
|
width: "48",
|
|
10477
10547
|
height: "48",
|
|
10478
10548
|
rx: "24",
|
|
10479
10549
|
fill: "#45BE8B"
|
|
10480
|
-
}), /* @__PURE__ */
|
|
10550
|
+
}), /* @__PURE__ */ import_react92.default.createElement("path", {
|
|
10481
10551
|
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",
|
|
10482
10552
|
fill: "#FFFFFF"
|
|
10483
|
-
}), /* @__PURE__ */
|
|
10553
|
+
}), /* @__PURE__ */ import_react92.default.createElement("path", {
|
|
10484
10554
|
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",
|
|
10485
10555
|
fill: "#FFFFFF"
|
|
10486
|
-
})), /* @__PURE__ */
|
|
10556
|
+
})), /* @__PURE__ */ import_react92.default.createElement("span", {
|
|
10487
10557
|
className: "border border-l "
|
|
10488
|
-
}), " ", /* @__PURE__ */
|
|
10558
|
+
}), " ", /* @__PURE__ */ import_react92.default.createElement("div", null, /* @__PURE__ */ import_react92.default.createElement("strong", null, "Brent Lassi"), /* @__PURE__ */ import_react92.default.createElement("div", null, " Chief Information Security Officer")))));
|
|
10489
10559
|
};
|
|
10490
10560
|
// src/blocks/Misc/LeadGenerator.tsx
|
|
10491
|
-
var
|
|
10561
|
+
var import_react93 = __toESM(require("react"));
|
|
10492
10562
|
var LeadGenerator = function(param) {
|
|
10493
10563
|
var _param_variant = param.variant, variant = _param_variant === void 0 ? "contained" : _param_variant, texts = param.texts, handleNewsletterSub = param.handleNewsletterSub;
|
|
10494
10564
|
var _texts, _texts1, _texts2;
|
|
10495
10565
|
var _texts_submit;
|
|
10496
|
-
return /* @__PURE__ */
|
|
10566
|
+
return /* @__PURE__ */ import_react93.default.createElement(Card, null, /* @__PURE__ */ import_react93.default.createElement(CardHeader, null, /* @__PURE__ */ import_react93.default.createElement(CardTitle, null, (_texts = texts) === null || _texts === void 0 ? void 0 : _texts.title), /* @__PURE__ */ import_react93.default.createElement(CardDescription, null, (_texts1 = texts) === null || _texts1 === void 0 ? void 0 : _texts1.subtitle)), /* @__PURE__ */ import_react93.default.createElement(CardContent, null, /* @__PURE__ */ import_react93.default.createElement("form", {
|
|
10497
10567
|
className: "flex flex-row gap-2",
|
|
10498
10568
|
onSubmit: function(e) {
|
|
10499
10569
|
e.preventDefault();
|
|
10500
10570
|
handleNewsletterSub(e.target[0].value);
|
|
10501
10571
|
}
|
|
10502
|
-
}, /* @__PURE__ */
|
|
10572
|
+
}, /* @__PURE__ */ import_react93.default.createElement(Input, {
|
|
10503
10573
|
type: "email",
|
|
10504
10574
|
name: "email",
|
|
10505
10575
|
placeholder: "example@sikka.io"
|
|
10506
|
-
}), /* @__PURE__ */
|
|
10576
|
+
}), /* @__PURE__ */ import_react93.default.createElement(Button, null, (_texts_submit = (_texts2 = texts) === null || _texts2 === void 0 ? void 0 : _texts2.submit) !== null && _texts_submit !== void 0 ? _texts_submit : "Submit"))));
|
|
10507
10577
|
};
|
|
10508
10578
|
// src/blocks/Misc/Announcement.tsx
|
|
10509
|
-
var
|
|
10579
|
+
var import_react94 = __toESM(require("react"));
|
|
10510
10580
|
var Announcement = function(_param) {
|
|
10511
10581
|
var _param_variant = _param.variant, variant = _param_variant === void 0 ? "contained" : _param_variant, onActionClick = _param.onActionClick, props = _object_without_properties(_param, [
|
|
10512
10582
|
"variant",
|
|
10513
10583
|
"onActionClick"
|
|
10514
10584
|
]);
|
|
10515
|
-
return /* @__PURE__ */
|
|
10585
|
+
return /* @__PURE__ */ import_react94.default.createElement(Card, null, /* @__PURE__ */ import_react94.default.createElement(CardContent, {
|
|
10516
10586
|
headless: true,
|
|
10517
10587
|
className: "flex flex-row items-center justify-between"
|
|
10518
|
-
}, /* @__PURE__ */
|
|
10588
|
+
}, /* @__PURE__ */ import_react94.default.createElement("div", {
|
|
10519
10589
|
className: "flex flex-col items-start justify-center "
|
|
10520
|
-
}, /* @__PURE__ */
|
|
10590
|
+
}, /* @__PURE__ */ import_react94.default.createElement("span", {
|
|
10521
10591
|
className: "text-lg font-bold"
|
|
10522
|
-
}, props.title), /* @__PURE__ */
|
|
10592
|
+
}, props.title), /* @__PURE__ */ import_react94.default.createElement("span", {
|
|
10523
10593
|
className: "text-sm"
|
|
10524
|
-
}, props.subtitle)), /* @__PURE__ */
|
|
10594
|
+
}, props.subtitle)), /* @__PURE__ */ import_react94.default.createElement(Button, {
|
|
10525
10595
|
onClick: function() {
|
|
10526
10596
|
return onActionClick();
|
|
10527
10597
|
}
|
|
10528
10598
|
}, props.actionText)));
|
|
10529
10599
|
};
|
|
10530
10600
|
// src/blocks/Misc/NoPermission.tsx
|
|
10531
|
-
var
|
|
10601
|
+
var import_react95 = __toESM(require("react"));
|
|
10532
10602
|
var NoPermission = function(param) {
|
|
10533
10603
|
var _param_variant = param.variant, variant = _param_variant === void 0 ? "contained" : _param_variant, texts = param.texts;
|
|
10534
10604
|
var _texts, _texts1;
|
|
10535
10605
|
var _texts_title, _texts_subtitle;
|
|
10536
|
-
return /* @__PURE__ */
|
|
10606
|
+
return /* @__PURE__ */ import_react95.default.createElement(Card, null, /* @__PURE__ */ import_react95.default.createElement(CardContent, {
|
|
10537
10607
|
headless: true
|
|
10538
|
-
}, /* @__PURE__ */
|
|
10608
|
+
}, /* @__PURE__ */ import_react95.default.createElement("div", {
|
|
10539
10609
|
className: "flex flex-col items-center justify-center text-center"
|
|
10540
|
-
}, /* @__PURE__ */
|
|
10610
|
+
}, /* @__PURE__ */ import_react95.default.createElement("div", {
|
|
10541
10611
|
className: "flex h-10 w-10 flex-col items-center justify-center rounded-3xl bg-primary text-6xl font-bold text-primary-foreground"
|
|
10542
|
-
}, /* @__PURE__ */
|
|
10612
|
+
}, /* @__PURE__ */ import_react95.default.createElement("svg", {
|
|
10543
10613
|
stroke: "currentColor",
|
|
10544
10614
|
fill: "currentColor",
|
|
10545
10615
|
strokeWidth: "0",
|
|
10546
10616
|
viewBox: "0 0 448 512",
|
|
10547
10617
|
height: "0.35em",
|
|
10548
10618
|
width: "0.35em"
|
|
10549
|
-
}, /* @__PURE__ */
|
|
10619
|
+
}, /* @__PURE__ */ import_react95.default.createElement("path", {
|
|
10550
10620
|
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"
|
|
10551
|
-
})), " "), /* @__PURE__ */
|
|
10621
|
+
})), " "), /* @__PURE__ */ import_react95.default.createElement("div", {
|
|
10552
10622
|
className: "m-2 text-xl font-bold"
|
|
10553
|
-
}, (_texts_title = (_texts = texts) === null || _texts === void 0 ? void 0 : _texts.title) !== null && _texts_title !== void 0 ? _texts_title : "You don't have permission"), /* @__PURE__ */
|
|
10623
|
+
}, (_texts_title = (_texts = texts) === null || _texts === void 0 ? void 0 : _texts.title) !== null && _texts_title !== void 0 ? _texts_title : "You don't have permission"), /* @__PURE__ */ import_react95.default.createElement("div", null, (_texts_subtitle = (_texts1 = texts) === null || _texts1 === void 0 ? void 0 : _texts1.subtitle) !== null && _texts_subtitle !== void 0 ? _texts_subtitle : "If you think this is a problem please contact your administrator or our customer support"))));
|
|
10554
10624
|
};
|
|
10555
10625
|
// src/hooks/useHover.ts
|
|
10556
|
-
var
|
|
10626
|
+
var import_react96 = require("react");
|
|
10557
10627
|
// Annotate the CommonJS export names for ESM import in node:
|
|
10558
10628
|
0 && (module.exports = {
|
|
10629
|
+
ActionCard: ActionCard,
|
|
10559
10630
|
Announcement: Announcement,
|
|
10560
10631
|
AppLanding: AppLanding,
|
|
10561
10632
|
AppLayout: AppLayout,
|