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