@sikka/hawa 0.1.85 → 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 +751 -703
- package/dist/index.mjs +543 -503
- package/dist/styles.css +22 -0
- package/package.json +1 -1
- package/src/elements/ActionCard.tsx +64 -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) {
|
|
@@ -8712,38 +8759,38 @@ var Icons = {
|
|
|
8712
8759
|
};
|
|
8713
8760
|
// src/blocks/AuthForms/AppLanding.tsx
|
|
8714
8761
|
var AppLanding = function(props) {
|
|
8715
|
-
return /* @__PURE__ */
|
|
8762
|
+
return /* @__PURE__ */ import_react71.default.createElement("div", null, /* @__PURE__ */ import_react71.default.createElement(Card, null, /* @__PURE__ */ import_react71.default.createElement(CardContent, {
|
|
8716
8763
|
headless: true,
|
|
8717
8764
|
className: "flex flex-col gap-6"
|
|
8718
|
-
}, /* @__PURE__ */
|
|
8765
|
+
}, /* @__PURE__ */ import_react71.default.createElement(Button, {
|
|
8719
8766
|
className: "flex flex-row items-center gap-2",
|
|
8720
8767
|
variant: "outline"
|
|
8721
|
-
}, /* @__PURE__ */
|
|
8768
|
+
}, /* @__PURE__ */ import_react71.default.createElement(Icons.google, {
|
|
8722
8769
|
className: "h-4 w-4"
|
|
8723
|
-
}), "Continue With Google"), /* @__PURE__ */
|
|
8770
|
+
}), "Continue With Google"), /* @__PURE__ */ import_react71.default.createElement(Button, {
|
|
8724
8771
|
className: "flex flex-row items-center gap-2",
|
|
8725
8772
|
variant: "outline"
|
|
8726
|
-
}, /* @__PURE__ */
|
|
8773
|
+
}, /* @__PURE__ */ import_react71.default.createElement(Icons.twitter, {
|
|
8727
8774
|
className: "h-4 w-4"
|
|
8728
|
-
}), "Continue With Twitter"), /* @__PURE__ */
|
|
8775
|
+
}), "Continue With Twitter"), /* @__PURE__ */ import_react71.default.createElement(Button, {
|
|
8729
8776
|
className: "flex flex-row items-center gap-2",
|
|
8730
8777
|
variant: "outline"
|
|
8731
|
-
}, /* @__PURE__ */
|
|
8778
|
+
}, /* @__PURE__ */ import_react71.default.createElement(Icons.apple, {
|
|
8732
8779
|
className: "h-4 w-4"
|
|
8733
|
-
}), "Continue With Apple"), /* @__PURE__ */
|
|
8780
|
+
}), "Continue With Apple"), /* @__PURE__ */ import_react71.default.createElement(Button, {
|
|
8734
8781
|
className: "flex flex-row items-center gap-2",
|
|
8735
8782
|
variant: "outline"
|
|
8736
|
-
}, /* @__PURE__ */
|
|
8783
|
+
}, /* @__PURE__ */ import_react71.default.createElement(Icons.mail, {
|
|
8737
8784
|
className: "h-4 w-4"
|
|
8738
|
-
}), "Continue With Email"), /* @__PURE__ */
|
|
8785
|
+
}), "Continue With Email"), /* @__PURE__ */ import_react71.default.createElement("a", {
|
|
8739
8786
|
href: "#",
|
|
8740
8787
|
className: "text-center text-sm"
|
|
8741
|
-
}, "Don't have an account?", " ", /* @__PURE__ */
|
|
8788
|
+
}, "Don't have an account?", " ", /* @__PURE__ */ import_react71.default.createElement("a", {
|
|
8742
8789
|
href: "#",
|
|
8743
8790
|
className: "clickable-link"
|
|
8744
|
-
}, "Sign Up")))), /* @__PURE__ */
|
|
8791
|
+
}, "Sign Up")))), /* @__PURE__ */ import_react71.default.createElement("div", {
|
|
8745
8792
|
className: "mt-6 flex flex-row justify-between"
|
|
8746
|
-
}, /* @__PURE__ */
|
|
8793
|
+
}, /* @__PURE__ */ import_react71.default.createElement(HawaRadio, {
|
|
8747
8794
|
onChangeTab: props.handleLanguage,
|
|
8748
8795
|
design: "tabs",
|
|
8749
8796
|
options: [
|
|
@@ -8756,20 +8803,20 @@ var AppLanding = function(props) {
|
|
|
8756
8803
|
label: "English"
|
|
8757
8804
|
}
|
|
8758
8805
|
]
|
|
8759
|
-
}), /* @__PURE__ */
|
|
8806
|
+
}), /* @__PURE__ */ import_react71.default.createElement(HawaRadio, {
|
|
8760
8807
|
onChangeTab: props.handleColorMode,
|
|
8761
8808
|
design: "tabs",
|
|
8762
8809
|
options: [
|
|
8763
8810
|
{
|
|
8764
8811
|
value: "light",
|
|
8765
|
-
label: /* @__PURE__ */
|
|
8812
|
+
label: /* @__PURE__ */ import_react71.default.createElement("svg", {
|
|
8766
8813
|
width: "15",
|
|
8767
8814
|
height: "15",
|
|
8768
8815
|
viewBox: "0 0 15 15",
|
|
8769
8816
|
fill: "none",
|
|
8770
8817
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8771
8818
|
className: "h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90"
|
|
8772
|
-
}, /* @__PURE__ */
|
|
8819
|
+
}, /* @__PURE__ */ import_react71.default.createElement("path", {
|
|
8773
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",
|
|
8774
8821
|
fill: "currentColor",
|
|
8775
8822
|
fillRule: "evenodd",
|
|
@@ -8778,7 +8825,7 @@ var AppLanding = function(props) {
|
|
|
8778
8825
|
},
|
|
8779
8826
|
{
|
|
8780
8827
|
value: "dark",
|
|
8781
|
-
label: /* @__PURE__ */
|
|
8828
|
+
label: /* @__PURE__ */ import_react71.default.createElement("svg", {
|
|
8782
8829
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8783
8830
|
width: "24",
|
|
8784
8831
|
height: "24",
|
|
@@ -8789,7 +8836,7 @@ var AppLanding = function(props) {
|
|
|
8789
8836
|
strokeLinecap: "round",
|
|
8790
8837
|
strokeLinejoin: "round",
|
|
8791
8838
|
className: "h-[1.2rem] w-[1.2rem] transition-all dark:rotate-0 dark:scale-100"
|
|
8792
|
-
}, /* @__PURE__ */
|
|
8839
|
+
}, /* @__PURE__ */ import_react71.default.createElement("path", {
|
|
8793
8840
|
d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"
|
|
8794
8841
|
}))
|
|
8795
8842
|
}
|
|
@@ -8797,26 +8844,26 @@ var AppLanding = function(props) {
|
|
|
8797
8844
|
})));
|
|
8798
8845
|
};
|
|
8799
8846
|
// src/blocks/AuthForms/SignInPhone.tsx
|
|
8800
|
-
var
|
|
8847
|
+
var import_react72 = __toESM(require("react"));
|
|
8801
8848
|
var import_react_hook_form2 = require("react-hook-form");
|
|
8802
8849
|
var SignInPhone = function(props) {
|
|
8803
8850
|
var methods = (0, import_react_hook_form2.useForm)();
|
|
8804
8851
|
var errors = methods.formState.errors, handleSubmit = methods.handleSubmit, control = methods.control;
|
|
8805
|
-
var _ref = _sliced_to_array((0,
|
|
8852
|
+
var _ref = _sliced_to_array((0, import_react72.useState)(""), 2), userPhone = _ref[0], setUserPhone = _ref[1];
|
|
8806
8853
|
var _props_country, _props_label;
|
|
8807
|
-
return /* @__PURE__ */
|
|
8854
|
+
return /* @__PURE__ */ import_react72.default.createElement(Card, null, /* @__PURE__ */ import_react72.default.createElement(CardContent, {
|
|
8808
8855
|
headless: true
|
|
8809
|
-
}, /* @__PURE__ */
|
|
8856
|
+
}, /* @__PURE__ */ import_react72.default.createElement("form", {
|
|
8810
8857
|
onSubmit: function(e) {
|
|
8811
8858
|
e.preventDefault();
|
|
8812
8859
|
props.handleSignIn(userPhone);
|
|
8813
8860
|
}
|
|
8814
|
-
}, /* @__PURE__ */
|
|
8861
|
+
}, /* @__PURE__ */ import_react72.default.createElement(import_react_hook_form2.Controller, {
|
|
8815
8862
|
control: control,
|
|
8816
8863
|
name: "phone",
|
|
8817
8864
|
render: function(param) {
|
|
8818
8865
|
var field = param.field;
|
|
8819
|
-
return /* @__PURE__ */
|
|
8866
|
+
return /* @__PURE__ */ import_react72.default.createElement(HawaPhoneInput, _object_spread({
|
|
8820
8867
|
country: (_props_country = props.country) !== null && _props_country !== void 0 ? _props_country : "",
|
|
8821
8868
|
label: (_props_label = props.label) !== null && _props_label !== void 0 ? _props_label : "",
|
|
8822
8869
|
handleChange: function(e) {
|
|
@@ -8827,39 +8874,39 @@ var SignInPhone = function(props) {
|
|
|
8827
8874
|
rules: {
|
|
8828
8875
|
required: props.phoneRequiredText
|
|
8829
8876
|
}
|
|
8830
|
-
}), /* @__PURE__ */
|
|
8877
|
+
}), /* @__PURE__ */ import_react72.default.createElement("div", {
|
|
8831
8878
|
className: "mt-2"
|
|
8832
|
-
}), /* @__PURE__ */
|
|
8879
|
+
}), /* @__PURE__ */ import_react72.default.createElement(Button, {
|
|
8833
8880
|
className: "w-full"
|
|
8834
8881
|
}, props.SignInButtonText))));
|
|
8835
8882
|
};
|
|
8836
8883
|
// src/blocks/AuthForms/SignInForm.tsx
|
|
8837
|
-
var
|
|
8884
|
+
var import_react73 = __toESM(require("react"));
|
|
8838
8885
|
var import_react_hook_form3 = require("react-hook-form");
|
|
8839
8886
|
var SignInForm = function(props) {
|
|
8840
8887
|
var _ref = (0, import_react_hook_form3.useForm)(), errors = _ref.formState.errors, handleSubmit = _ref.handleSubmit, control = _ref.control;
|
|
8841
8888
|
var _field_value, _field_value1;
|
|
8842
|
-
return /* @__PURE__ */
|
|
8889
|
+
return /* @__PURE__ */ import_react73.default.createElement("div", {
|
|
8843
8890
|
className: "flex flex-col gap-4"
|
|
8844
|
-
}, /* @__PURE__ */
|
|
8891
|
+
}, /* @__PURE__ */ import_react73.default.createElement(Card, {
|
|
8845
8892
|
dir: props.direction
|
|
8846
|
-
}, /* @__PURE__ */
|
|
8893
|
+
}, /* @__PURE__ */ import_react73.default.createElement(CardContent, {
|
|
8847
8894
|
headless: true
|
|
8848
|
-
}, /* @__PURE__ */
|
|
8895
|
+
}, /* @__PURE__ */ import_react73.default.createElement("form", {
|
|
8849
8896
|
onSubmit: handleSubmit(function(e) {
|
|
8850
8897
|
return props.handleSignIn(e);
|
|
8851
8898
|
})
|
|
8852
|
-
}, props.showError && /* @__PURE__ */
|
|
8899
|
+
}, props.showError && /* @__PURE__ */ import_react73.default.createElement(HawaAlert, {
|
|
8853
8900
|
title: props.errorTitle,
|
|
8854
8901
|
text: props.errorText,
|
|
8855
8902
|
severity: "error"
|
|
8856
|
-
}), props.signInType === "email" ? /* @__PURE__ */
|
|
8903
|
+
}), props.signInType === "email" ? /* @__PURE__ */ import_react73.default.createElement(import_react_hook_form3.Controller, {
|
|
8857
8904
|
control: control,
|
|
8858
8905
|
name: "email",
|
|
8859
8906
|
render: function(param) {
|
|
8860
8907
|
var field = param.field;
|
|
8861
8908
|
var _errors_email;
|
|
8862
|
-
return /* @__PURE__ */
|
|
8909
|
+
return /* @__PURE__ */ import_react73.default.createElement(HawaTextField, {
|
|
8863
8910
|
width: "full",
|
|
8864
8911
|
type: "text",
|
|
8865
8912
|
autoComplete: "email",
|
|
@@ -8877,14 +8924,14 @@ var SignInForm = function(props) {
|
|
|
8877
8924
|
message: props.texts.emailInvalidText
|
|
8878
8925
|
}
|
|
8879
8926
|
}
|
|
8880
|
-
}) : props.signInType === "username" ? /* @__PURE__ */
|
|
8927
|
+
}) : props.signInType === "username" ? /* @__PURE__ */ import_react73.default.createElement(import_react_hook_form3.Controller, {
|
|
8881
8928
|
control: control,
|
|
8882
8929
|
name: "username",
|
|
8883
8930
|
render: function(param) {
|
|
8884
8931
|
var field = param.field;
|
|
8885
8932
|
var _errors_username;
|
|
8886
8933
|
var _field_value;
|
|
8887
|
-
return /* @__PURE__ */
|
|
8934
|
+
return /* @__PURE__ */ import_react73.default.createElement(HawaTextField, {
|
|
8888
8935
|
width: "full",
|
|
8889
8936
|
type: "text",
|
|
8890
8937
|
autoComplete: "username",
|
|
@@ -8898,25 +8945,25 @@ var SignInForm = function(props) {
|
|
|
8898
8945
|
rules: {
|
|
8899
8946
|
required: props.texts.usernameRequired
|
|
8900
8947
|
}
|
|
8901
|
-
}) : /* @__PURE__ */
|
|
8948
|
+
}) : /* @__PURE__ */ import_react73.default.createElement(import_react_hook_form3.Controller, {
|
|
8902
8949
|
control: control,
|
|
8903
8950
|
name: "phone",
|
|
8904
8951
|
render: function(param) {
|
|
8905
8952
|
var field = param.field;
|
|
8906
|
-
return /* @__PURE__ */
|
|
8953
|
+
return /* @__PURE__ */ import_react73.default.createElement(HawaPhoneInput, {
|
|
8907
8954
|
label: "Phone number"
|
|
8908
8955
|
});
|
|
8909
8956
|
},
|
|
8910
8957
|
rules: {
|
|
8911
8958
|
required: props.texts.phoneRequiredText
|
|
8912
8959
|
}
|
|
8913
|
-
}), 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, {
|
|
8914
8961
|
control: control,
|
|
8915
8962
|
name: "password",
|
|
8916
8963
|
render: function(param) {
|
|
8917
8964
|
var field = param.field;
|
|
8918
8965
|
var _errors_password;
|
|
8919
|
-
return /* @__PURE__ */
|
|
8966
|
+
return /* @__PURE__ */ import_react73.default.createElement(HawaTextField, {
|
|
8920
8967
|
width: "full",
|
|
8921
8968
|
autoComplete: "current-password",
|
|
8922
8969
|
type: "password",
|
|
@@ -8931,38 +8978,38 @@ var SignInForm = function(props) {
|
|
|
8931
8978
|
required: props.texts.passwordRequiredText,
|
|
8932
8979
|
minLength: 5
|
|
8933
8980
|
}
|
|
8934
|
-
}), !props.withoutResetPassword && /* @__PURE__ */
|
|
8981
|
+
}), !props.withoutResetPassword && /* @__PURE__ */ import_react73.default.createElement("div", {
|
|
8935
8982
|
onClick: props.handleForgotPassword,
|
|
8936
8983
|
className: "mb-3 w-fit cursor-pointer text-xs dark:text-gray-300"
|
|
8937
|
-
}, props.texts.forgotPasswordText)), /* @__PURE__ */
|
|
8984
|
+
}, props.texts.forgotPasswordText)), /* @__PURE__ */ import_react73.default.createElement(Button, {
|
|
8938
8985
|
className: "mt-4 w-full",
|
|
8939
8986
|
isLoading: props.isLoading
|
|
8940
|
-
}, props.texts.signInText), !props.withoutSignUp && /* @__PURE__ */
|
|
8987
|
+
}, props.texts.signInText), !props.withoutSignUp && /* @__PURE__ */ import_react73.default.createElement("div", {
|
|
8941
8988
|
className: "p-3 text-center text-sm font-semibold dark:text-gray-300"
|
|
8942
|
-
}, props.texts.newUserText, " ", /* @__PURE__ */
|
|
8989
|
+
}, props.texts.newUserText, " ", /* @__PURE__ */ import_react73.default.createElement("span", {
|
|
8943
8990
|
onClick: props.handleRouteToSignUp,
|
|
8944
8991
|
className: "clickable-link"
|
|
8945
|
-
}, 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, {
|
|
8946
8993
|
className: cn(props.logosOnly ? "flex flex-row gap-2 justify-center" : "grid grid-cols-1 gap-2")
|
|
8947
|
-
}, props.viaGoogle && /* @__PURE__ */
|
|
8994
|
+
}, props.viaGoogle && /* @__PURE__ */ import_react73.default.createElement(Button, {
|
|
8948
8995
|
className: "flex flex-row items-center gap-2",
|
|
8949
8996
|
variant: "outline",
|
|
8950
8997
|
onClick: props.handleGoogleSignIn
|
|
8951
|
-
}, /* @__PURE__ */
|
|
8998
|
+
}, /* @__PURE__ */ import_react73.default.createElement(Icons.google, {
|
|
8952
8999
|
className: "h-4 w-4"
|
|
8953
|
-
}), !props.logosOnly && props.texts.signInViaGoogleLabel), props.viaGithub && /* @__PURE__ */
|
|
9000
|
+
}), !props.logosOnly && props.texts.signInViaGoogleLabel), props.viaGithub && /* @__PURE__ */ import_react73.default.createElement(Button, {
|
|
8954
9001
|
className: "flex flex-row items-center gap-2",
|
|
8955
9002
|
variant: "outline",
|
|
8956
9003
|
onClick: props.handleGithubSignIn
|
|
8957
|
-
}, /* @__PURE__ */
|
|
9004
|
+
}, /* @__PURE__ */ import_react73.default.createElement(Icons.gitHub, {
|
|
8958
9005
|
className: "h-4 w-4"
|
|
8959
|
-
}), !props.logosOnly && props.texts.signInViaGithubLabel), props.viaTwitter && /* @__PURE__ */
|
|
9006
|
+
}), !props.logosOnly && props.texts.signInViaGithubLabel), props.viaTwitter && /* @__PURE__ */ import_react73.default.createElement(Button, {
|
|
8960
9007
|
className: "flex flex-row items-center gap-2",
|
|
8961
9008
|
variant: "outline",
|
|
8962
9009
|
onClick: props.handleTwitterSignIn
|
|
8963
|
-
}, /* @__PURE__ */
|
|
9010
|
+
}, /* @__PURE__ */ import_react73.default.createElement(Icons.twitter, {
|
|
8964
9011
|
className: "h-4 w-4"
|
|
8965
|
-
}), !props.logosOnly && props.texts.signInViaTwitterLabel)) : null), /* @__PURE__ */
|
|
9012
|
+
}), !props.logosOnly && props.texts.signInViaTwitterLabel)) : null), /* @__PURE__ */ import_react73.default.createElement(InterfaceSettings, {
|
|
8966
9013
|
currentColorMode: props.currentColorMode,
|
|
8967
9014
|
currentLanguage: props.currentLanguage,
|
|
8968
9015
|
handleColorMode: props.handleColorMode,
|
|
@@ -9017,37 +9064,37 @@ function SignInBlock() {
|
|
|
9017
9064
|
}, "Create account")));
|
|
9018
9065
|
}
|
|
9019
9066
|
// src/blocks/AuthForms/SignUpForm.tsx
|
|
9020
|
-
var
|
|
9067
|
+
var import_react74 = __toESM(require("react"));
|
|
9021
9068
|
var import_react_hook_form4 = require("react-hook-form");
|
|
9022
9069
|
var SignUpForm = function(props) {
|
|
9023
9070
|
var methods = (0, import_react_hook_form4.useForm)();
|
|
9024
9071
|
var errors = methods.formState.errors, handleSubmit = methods.handleSubmit, control = methods.control;
|
|
9025
9072
|
var _field_value, _field_value1, _field_value2;
|
|
9026
|
-
return /* @__PURE__ */
|
|
9073
|
+
return /* @__PURE__ */ import_react74.default.createElement("div", {
|
|
9027
9074
|
className: "flex flex-col gap-4"
|
|
9028
|
-
}, /* @__PURE__ */
|
|
9075
|
+
}, /* @__PURE__ */ import_react74.default.createElement(Card, {
|
|
9029
9076
|
dir: props.direction
|
|
9030
|
-
}, /* @__PURE__ */
|
|
9077
|
+
}, /* @__PURE__ */ import_react74.default.createElement(CardContent, {
|
|
9031
9078
|
headless: true
|
|
9032
|
-
}, /* @__PURE__ */
|
|
9079
|
+
}, /* @__PURE__ */ import_react74.default.createElement("div", null, props.showError && /* @__PURE__ */ import_react74.default.createElement(HawaAlert, {
|
|
9033
9080
|
title: props.errorTitle,
|
|
9034
9081
|
text: props.errorText,
|
|
9035
9082
|
severity: "error"
|
|
9036
|
-
}), /* @__PURE__ */
|
|
9083
|
+
}), /* @__PURE__ */ import_react74.default.createElement(import_react_hook_form4.FormProvider, _object_spread({}, methods), /* @__PURE__ */ import_react74.default.createElement("form", {
|
|
9037
9084
|
onSubmit: handleSubmit(function(e) {
|
|
9038
9085
|
return props.handleSignUp(e);
|
|
9039
9086
|
})
|
|
9040
|
-
}, /* @__PURE__ */
|
|
9087
|
+
}, /* @__PURE__ */ import_react74.default.createElement("div", null, props.signUpFields.map(function(fld, i) {
|
|
9041
9088
|
if (fld === "fullname") {
|
|
9042
9089
|
var _field_value;
|
|
9043
|
-
return /* @__PURE__ */
|
|
9090
|
+
return /* @__PURE__ */ import_react74.default.createElement(import_react_hook_form4.Controller, {
|
|
9044
9091
|
key: i,
|
|
9045
9092
|
control: control,
|
|
9046
9093
|
name: "fullName",
|
|
9047
9094
|
render: function(param) {
|
|
9048
9095
|
var field = param.field;
|
|
9049
9096
|
var _errors_fullName;
|
|
9050
|
-
return /* @__PURE__ */
|
|
9097
|
+
return /* @__PURE__ */ import_react74.default.createElement(HawaTextField, {
|
|
9051
9098
|
width: "full",
|
|
9052
9099
|
type: "text",
|
|
9053
9100
|
label: props.texts.fullNameLabel,
|
|
@@ -9064,14 +9111,14 @@ var SignUpForm = function(props) {
|
|
|
9064
9111
|
}
|
|
9065
9112
|
if (fld === "email") {
|
|
9066
9113
|
var _field_value1;
|
|
9067
|
-
return /* @__PURE__ */
|
|
9114
|
+
return /* @__PURE__ */ import_react74.default.createElement(import_react_hook_form4.Controller, {
|
|
9068
9115
|
key: i,
|
|
9069
9116
|
control: control,
|
|
9070
9117
|
name: "email",
|
|
9071
9118
|
render: function(param) {
|
|
9072
9119
|
var field = param.field;
|
|
9073
9120
|
var _errors_email;
|
|
9074
|
-
return /* @__PURE__ */
|
|
9121
|
+
return /* @__PURE__ */ import_react74.default.createElement(HawaTextField, {
|
|
9075
9122
|
width: "full",
|
|
9076
9123
|
type: "text",
|
|
9077
9124
|
autoComplete: "email",
|
|
@@ -9093,14 +9140,14 @@ var SignUpForm = function(props) {
|
|
|
9093
9140
|
}
|
|
9094
9141
|
if (fld === "username") {
|
|
9095
9142
|
var _field_value2;
|
|
9096
|
-
return /* @__PURE__ */
|
|
9143
|
+
return /* @__PURE__ */ import_react74.default.createElement(import_react_hook_form4.Controller, {
|
|
9097
9144
|
key: i,
|
|
9098
9145
|
control: control,
|
|
9099
9146
|
name: "username",
|
|
9100
9147
|
render: function(param) {
|
|
9101
9148
|
var field = param.field;
|
|
9102
9149
|
var _errors_username;
|
|
9103
|
-
return /* @__PURE__ */
|
|
9150
|
+
return /* @__PURE__ */ import_react74.default.createElement(HawaTextField, {
|
|
9104
9151
|
width: "full",
|
|
9105
9152
|
type: "text",
|
|
9106
9153
|
autoComplete: "username",
|
|
@@ -9116,13 +9163,13 @@ var SignUpForm = function(props) {
|
|
|
9116
9163
|
}
|
|
9117
9164
|
});
|
|
9118
9165
|
}
|
|
9119
|
-
})), /* @__PURE__ */
|
|
9166
|
+
})), /* @__PURE__ */ import_react74.default.createElement(import_react_hook_form4.Controller, {
|
|
9120
9167
|
control: control,
|
|
9121
9168
|
name: "password",
|
|
9122
9169
|
render: function(param) {
|
|
9123
9170
|
var field = param.field;
|
|
9124
9171
|
var _errors_password;
|
|
9125
|
-
return /* @__PURE__ */
|
|
9172
|
+
return /* @__PURE__ */ import_react74.default.createElement(HawaTextField, {
|
|
9126
9173
|
width: "full",
|
|
9127
9174
|
type: "password",
|
|
9128
9175
|
autoComplete: "new-password",
|
|
@@ -9136,13 +9183,13 @@ var SignUpForm = function(props) {
|
|
|
9136
9183
|
rules: {
|
|
9137
9184
|
required: props.texts.passwordRequiredText
|
|
9138
9185
|
}
|
|
9139
|
-
}), /* @__PURE__ */
|
|
9186
|
+
}), /* @__PURE__ */ import_react74.default.createElement(import_react_hook_form4.Controller, {
|
|
9140
9187
|
control: control,
|
|
9141
9188
|
name: "confirm_password",
|
|
9142
9189
|
render: function(param) {
|
|
9143
9190
|
var field = param.field;
|
|
9144
9191
|
var _errors_confirm_password;
|
|
9145
|
-
return /* @__PURE__ */
|
|
9192
|
+
return /* @__PURE__ */ import_react74.default.createElement(HawaTextField, {
|
|
9146
9193
|
width: "full",
|
|
9147
9194
|
type: "password",
|
|
9148
9195
|
autoComplete: "new-password",
|
|
@@ -9156,13 +9203,13 @@ var SignUpForm = function(props) {
|
|
|
9156
9203
|
rules: {
|
|
9157
9204
|
required: props.texts.passwordRequiredText
|
|
9158
9205
|
}
|
|
9159
|
-
}), props.showRefCode && /* @__PURE__ */
|
|
9206
|
+
}), props.showRefCode && /* @__PURE__ */ import_react74.default.createElement(import_react_hook_form4.Controller, {
|
|
9160
9207
|
control: control,
|
|
9161
9208
|
name: "refCode",
|
|
9162
9209
|
render: function(param) {
|
|
9163
9210
|
var field = param.field;
|
|
9164
9211
|
var _errors_password;
|
|
9165
|
-
return /* @__PURE__ */
|
|
9212
|
+
return /* @__PURE__ */ import_react74.default.createElement(HawaTextField, {
|
|
9166
9213
|
width: "full",
|
|
9167
9214
|
type: "text",
|
|
9168
9215
|
label: props.texts.refCode,
|
|
@@ -9172,12 +9219,12 @@ var SignUpForm = function(props) {
|
|
|
9172
9219
|
onChange: field.onChange
|
|
9173
9220
|
});
|
|
9174
9221
|
}
|
|
9175
|
-
}), props.showUserSource && /* @__PURE__ */
|
|
9222
|
+
}), props.showUserSource && /* @__PURE__ */ import_react74.default.createElement("div", null, /* @__PURE__ */ import_react74.default.createElement(import_react_hook_form4.Controller, {
|
|
9176
9223
|
control: control,
|
|
9177
9224
|
name: "reference",
|
|
9178
9225
|
render: function(param) {
|
|
9179
9226
|
var field = param.field;
|
|
9180
|
-
return /* @__PURE__ */
|
|
9227
|
+
return /* @__PURE__ */ import_react74.default.createElement(HawaSelect, {
|
|
9181
9228
|
label: "How did you learn about us?",
|
|
9182
9229
|
isCreatable: false,
|
|
9183
9230
|
isMulti: false,
|
|
@@ -9202,19 +9249,19 @@ var SignUpForm = function(props) {
|
|
|
9202
9249
|
}
|
|
9203
9250
|
});
|
|
9204
9251
|
}
|
|
9205
|
-
})), props.showTermsOption && /* @__PURE__ */
|
|
9252
|
+
})), props.showTermsOption && /* @__PURE__ */ import_react74.default.createElement(import_react_hook_form4.Controller, {
|
|
9206
9253
|
control: control,
|
|
9207
9254
|
name: "terms_accepted",
|
|
9208
9255
|
render: function(param) {
|
|
9209
9256
|
var field = param.field;
|
|
9210
9257
|
var _errors_terms_accepted;
|
|
9211
|
-
return /* @__PURE__ */
|
|
9258
|
+
return /* @__PURE__ */ import_react74.default.createElement(HawaCheckbox, {
|
|
9212
9259
|
id: "terms_accepted",
|
|
9213
9260
|
helperText: (_errors_terms_accepted = errors.terms_accepted) === null || _errors_terms_accepted === void 0 ? void 0 : _errors_terms_accepted.message,
|
|
9214
9261
|
onChange: function(e) {
|
|
9215
9262
|
return field.onChange(e);
|
|
9216
9263
|
},
|
|
9217
|
-
label: /* @__PURE__ */
|
|
9264
|
+
label: /* @__PURE__ */ import_react74.default.createElement("span", null, props.texts.iAcceptText, " ", /* @__PURE__ */ import_react74.default.createElement("a", {
|
|
9218
9265
|
onClick: props.handleRouteToTOS,
|
|
9219
9266
|
className: "clickable-link"
|
|
9220
9267
|
}, props.texts.termsText))
|
|
@@ -9223,46 +9270,46 @@ var SignUpForm = function(props) {
|
|
|
9223
9270
|
rules: {
|
|
9224
9271
|
required: props.texts.termsRequiredText
|
|
9225
9272
|
}
|
|
9226
|
-
}), props.showNewsletterOption && /* @__PURE__ */
|
|
9273
|
+
}), props.showNewsletterOption && /* @__PURE__ */ import_react74.default.createElement(import_react_hook_form4.Controller, {
|
|
9227
9274
|
control: control,
|
|
9228
9275
|
name: "newsletter_accepted",
|
|
9229
9276
|
render: function(param) {
|
|
9230
9277
|
var field = param.field;
|
|
9231
|
-
return /* @__PURE__ */
|
|
9278
|
+
return /* @__PURE__ */ import_react74.default.createElement(HawaCheckbox, {
|
|
9232
9279
|
id: "newsletter_accepted",
|
|
9233
9280
|
label: props.texts.subscribeToNewsletter,
|
|
9234
9281
|
onChange: field.onChange
|
|
9235
9282
|
});
|
|
9236
9283
|
}
|
|
9237
|
-
}), /* @__PURE__ */
|
|
9284
|
+
}), /* @__PURE__ */ import_react74.default.createElement(Button, {
|
|
9238
9285
|
className: "w-full",
|
|
9239
9286
|
isLoading: props.isLoading
|
|
9240
|
-
}, props.texts.signUpText))), /* @__PURE__ */
|
|
9287
|
+
}, props.texts.signUpText))), /* @__PURE__ */ import_react74.default.createElement("div", {
|
|
9241
9288
|
className: "flex flex-row items-center justify-center gap-1 p-3 text-center text-sm font-semibold dark:text-white"
|
|
9242
|
-
}, /* @__PURE__ */
|
|
9289
|
+
}, /* @__PURE__ */ import_react74.default.createElement("span", null, props.texts.existingUserText), /* @__PURE__ */ import_react74.default.createElement("span", {
|
|
9243
9290
|
onClick: props.handleRouteToSignIn,
|
|
9244
9291
|
className: "clickable-link"
|
|
9245
|
-
}, 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, {
|
|
9246
9293
|
className: cn(props.logosOnly ? "flex flex-row justify-center gap-2" : "grid grid-cols-1 gap-2")
|
|
9247
|
-
}, props.viaGoogle && /* @__PURE__ */
|
|
9294
|
+
}, props.viaGoogle && /* @__PURE__ */ import_react74.default.createElement(Button, {
|
|
9248
9295
|
className: "flex flex-row items-center gap-2",
|
|
9249
9296
|
variant: "outline",
|
|
9250
9297
|
onClick: props.handleGoogleSignUp
|
|
9251
|
-
}, /* @__PURE__ */
|
|
9298
|
+
}, /* @__PURE__ */ import_react74.default.createElement(Icons.google, {
|
|
9252
9299
|
className: "h-4 w-4"
|
|
9253
|
-
}), !props.logosOnly && props.texts.signUpViaGoogleLabel), props.viaGithub && /* @__PURE__ */
|
|
9300
|
+
}), !props.logosOnly && props.texts.signUpViaGoogleLabel), props.viaGithub && /* @__PURE__ */ import_react74.default.createElement(Button, {
|
|
9254
9301
|
className: "flex flex-row items-center gap-2",
|
|
9255
9302
|
variant: "outline",
|
|
9256
9303
|
onClick: props.handleGithubSignUp
|
|
9257
|
-
}, /* @__PURE__ */
|
|
9304
|
+
}, /* @__PURE__ */ import_react74.default.createElement(Icons.gitHub, {
|
|
9258
9305
|
className: "h-4 w-4"
|
|
9259
|
-
}), !props.logosOnly && props.texts.signUpViaGithubLabel), props.viaTwitter && /* @__PURE__ */
|
|
9306
|
+
}), !props.logosOnly && props.texts.signUpViaGithubLabel), props.viaTwitter && /* @__PURE__ */ import_react74.default.createElement(Button, {
|
|
9260
9307
|
className: "flex flex-row items-center gap-2",
|
|
9261
9308
|
variant: "outline",
|
|
9262
9309
|
onClick: props.handleTwitterSignUp
|
|
9263
|
-
}, /* @__PURE__ */
|
|
9310
|
+
}, /* @__PURE__ */ import_react74.default.createElement(Icons.twitter, {
|
|
9264
9311
|
className: "h-4 w-4"
|
|
9265
|
-
}), !props.logosOnly && props.texts.signUpViaTwitterLabel)) : null), /* @__PURE__ */
|
|
9312
|
+
}), !props.logosOnly && props.texts.signUpViaTwitterLabel)) : null), /* @__PURE__ */ import_react74.default.createElement(InterfaceSettings, {
|
|
9266
9313
|
currentColorMode: props.currentColorMode,
|
|
9267
9314
|
currentLanguage: props.currentLanguage,
|
|
9268
9315
|
handleColorMode: props.handleColorMode,
|
|
@@ -9270,10 +9317,10 @@ var SignUpForm = function(props) {
|
|
|
9270
9317
|
}));
|
|
9271
9318
|
};
|
|
9272
9319
|
// src/blocks/AuthForms/NewPasswordForm.tsx
|
|
9273
|
-
var
|
|
9320
|
+
var import_react75 = __toESM(require("react"));
|
|
9274
9321
|
var import_react_hook_form5 = require("react-hook-form");
|
|
9275
9322
|
var NewPasswordForm = function(props) {
|
|
9276
|
-
var _ref = _sliced_to_array((0,
|
|
9323
|
+
var _ref = _sliced_to_array((0, import_react75.useState)(false), 2), matchError = _ref[0], setMatchError = _ref[1];
|
|
9277
9324
|
var methods = (0, import_react_hook_form5.useForm)();
|
|
9278
9325
|
var errors = methods.formState.errors, handleSubmit = methods.handleSubmit, control = methods.control;
|
|
9279
9326
|
var handleSubmission = function(e) {
|
|
@@ -9284,22 +9331,22 @@ var NewPasswordForm = function(props) {
|
|
|
9284
9331
|
}
|
|
9285
9332
|
};
|
|
9286
9333
|
var _field_value, _field_value1;
|
|
9287
|
-
return /* @__PURE__ */
|
|
9334
|
+
return /* @__PURE__ */ import_react75.default.createElement(Card, null, matchError && /* @__PURE__ */ import_react75.default.createElement(HawaAlert, {
|
|
9288
9335
|
text: props.texts.passwordMatchError,
|
|
9289
9336
|
severity: "error"
|
|
9290
|
-
}), props.passwordChanged ? /* @__PURE__ */
|
|
9337
|
+
}), props.passwordChanged ? /* @__PURE__ */ import_react75.default.createElement(CardContent, {
|
|
9291
9338
|
headless: true
|
|
9292
|
-
}, /* @__PURE__ */
|
|
9339
|
+
}, /* @__PURE__ */ import_react75.default.createElement("div", {
|
|
9293
9340
|
className: "text-center"
|
|
9294
|
-
}, 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", {
|
|
9295
9342
|
onSubmit: handleSubmit(handleSubmission)
|
|
9296
|
-
}, /* @__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, {
|
|
9297
9344
|
control: control,
|
|
9298
9345
|
name: "password",
|
|
9299
9346
|
render: function(param) {
|
|
9300
9347
|
var field = param.field;
|
|
9301
9348
|
var _errors_password;
|
|
9302
|
-
return /* @__PURE__ */
|
|
9349
|
+
return /* @__PURE__ */ import_react75.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
9303
9350
|
width: "full",
|
|
9304
9351
|
type: "password",
|
|
9305
9352
|
autoComplete: "new-password",
|
|
@@ -9313,13 +9360,13 @@ var NewPasswordForm = function(props) {
|
|
|
9313
9360
|
rules: {
|
|
9314
9361
|
required: props.texts.passwordRequiredText
|
|
9315
9362
|
}
|
|
9316
|
-
}), /* @__PURE__ */
|
|
9363
|
+
}), /* @__PURE__ */ import_react75.default.createElement(import_react_hook_form5.Controller, {
|
|
9317
9364
|
control: control,
|
|
9318
9365
|
name: "confirmPassword",
|
|
9319
9366
|
render: function(param) {
|
|
9320
9367
|
var field = param.field;
|
|
9321
9368
|
var _errors_confirmPassword;
|
|
9322
|
-
return /* @__PURE__ */
|
|
9369
|
+
return /* @__PURE__ */ import_react75.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
9323
9370
|
width: "full",
|
|
9324
9371
|
type: "password",
|
|
9325
9372
|
autoComplete: "new-password",
|
|
@@ -9333,27 +9380,27 @@ var NewPasswordForm = function(props) {
|
|
|
9333
9380
|
rules: {
|
|
9334
9381
|
required: props.texts.confirmPasswordRequiredText
|
|
9335
9382
|
}
|
|
9336
|
-
})), /* @__PURE__ */
|
|
9383
|
+
})), /* @__PURE__ */ import_react75.default.createElement(CardFooter, null, /* @__PURE__ */ import_react75.default.createElement(Button, {
|
|
9337
9384
|
className: "w-full",
|
|
9338
9385
|
type: "submit"
|
|
9339
9386
|
}, props.texts.updatePassword)))));
|
|
9340
9387
|
};
|
|
9341
9388
|
// src/blocks/AuthForms/ResetPasswordForm.tsx
|
|
9342
|
-
var
|
|
9389
|
+
var import_react76 = __toESM(require("react"));
|
|
9343
9390
|
var import_react_hook_form6 = require("react-hook-form");
|
|
9344
9391
|
var ResetPasswordForm = function(props) {
|
|
9345
9392
|
var methods = (0, import_react_hook_form6.useForm)();
|
|
9346
9393
|
var errors = methods.formState.errors, handleSubmit = methods.handleSubmit, register = methods.register, control = methods.control;
|
|
9347
9394
|
var _field_value, _props_texts_dontHaveAccount, _props_texts_signUpText;
|
|
9348
|
-
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", {
|
|
9349
9396
|
onSubmit: handleSubmit(props.handleResetPassword)
|
|
9350
|
-
}, /* @__PURE__ */
|
|
9397
|
+
}, /* @__PURE__ */ import_react76.default.createElement(CardContent, null, /* @__PURE__ */ import_react76.default.createElement(import_react_hook_form6.Controller, {
|
|
9351
9398
|
control: control,
|
|
9352
9399
|
name: "email",
|
|
9353
9400
|
render: function(param) {
|
|
9354
9401
|
var field = param.field;
|
|
9355
9402
|
var _errors_email;
|
|
9356
|
-
return /* @__PURE__ */
|
|
9403
|
+
return /* @__PURE__ */ import_react76.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
9357
9404
|
width: "full",
|
|
9358
9405
|
type: "text",
|
|
9359
9406
|
label: props.texts.emailLabel,
|
|
@@ -9370,67 +9417,67 @@ var ResetPasswordForm = function(props) {
|
|
|
9370
9417
|
message: props.texts.emailInvalidText
|
|
9371
9418
|
}
|
|
9372
9419
|
}
|
|
9373
|
-
}), /* @__PURE__ */
|
|
9420
|
+
}), /* @__PURE__ */ import_react76.default.createElement("div", {
|
|
9374
9421
|
className: " pb-2 text-left text-sm dark:text-gray-300"
|
|
9375
|
-
}, (_props_texts_dontHaveAccount = props.texts.dontHaveAccount) !== null && _props_texts_dontHaveAccount !== void 0 ? _props_texts_dontHaveAccount : "Don't have an account? ", /* @__PURE__ */
|
|
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", {
|
|
9376
9423
|
onClick: props.handleRouteToSignUp,
|
|
9377
9424
|
className: "clickable-link"
|
|
9378
|
-
}, (_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, {
|
|
9379
9426
|
type: "submit",
|
|
9380
9427
|
className: "w-full"
|
|
9381
|
-
}, props.texts.resetPassword)))) : /* @__PURE__ */
|
|
9428
|
+
}, props.texts.resetPassword)))) : /* @__PURE__ */ import_react76.default.createElement(CardContent, {
|
|
9382
9429
|
headless: true
|
|
9383
|
-
}, /* @__PURE__ */
|
|
9430
|
+
}, /* @__PURE__ */ import_react76.default.createElement("div", {
|
|
9384
9431
|
className: "text-center"
|
|
9385
9432
|
}, props.texts.emailSentText)));
|
|
9386
9433
|
};
|
|
9387
9434
|
// src/blocks/AuthForms/CodeConfirmation.tsx
|
|
9388
|
-
var
|
|
9435
|
+
var import_react77 = __toESM(require("react"));
|
|
9389
9436
|
var CodeConfirmation = function(props) {
|
|
9390
|
-
var _ref = _sliced_to_array((0,
|
|
9437
|
+
var _ref = _sliced_to_array((0, import_react77.useState)(null), 2), pins = _ref[0], setPins = _ref[1];
|
|
9391
9438
|
var _props_texts_checkYourPhone, _props_texts_weSentCode, _props_texts_didntGetCode, _props_texts_resendCode, _props_texts_cancel, _props_texts_confirm;
|
|
9392
|
-
return /* @__PURE__ */
|
|
9439
|
+
return /* @__PURE__ */ import_react77.default.createElement(Card, null, /* @__PURE__ */ import_react77.default.createElement(CardContent, {
|
|
9393
9440
|
headless: true
|
|
9394
|
-
}, props.showError && /* @__PURE__ */
|
|
9441
|
+
}, props.showError && /* @__PURE__ */ import_react77.default.createElement(HawaAlert, {
|
|
9395
9442
|
title: props.errorTitle,
|
|
9396
9443
|
text: props.errorText,
|
|
9397
9444
|
severity: "error"
|
|
9398
|
-
}), /* @__PURE__ */
|
|
9445
|
+
}), /* @__PURE__ */ import_react77.default.createElement("div", {
|
|
9399
9446
|
className: "mb-4 dark:text-white"
|
|
9400
|
-
}, /* @__PURE__ */
|
|
9447
|
+
}, /* @__PURE__ */ import_react77.default.createElement("div", {
|
|
9401
9448
|
className: "text-lg font-bold"
|
|
9402
|
-
}, (_props_texts_checkYourPhone = props.texts.checkYourPhone) !== null && _props_texts_checkYourPhone !== void 0 ? _props_texts_checkYourPhone : "Please check your phone"), /* @__PURE__ */
|
|
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", {
|
|
9403
9450
|
className: "text-muted-foreground"
|
|
9404
|
-
}, /* @__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", {
|
|
9405
9452
|
onSubmit: function(e) {
|
|
9406
9453
|
e.preventDefault();
|
|
9407
9454
|
if (pins) {
|
|
9408
9455
|
props.submitConfirmation(pins);
|
|
9409
9456
|
}
|
|
9410
9457
|
}
|
|
9411
|
-
}, /* @__PURE__ */
|
|
9458
|
+
}, /* @__PURE__ */ import_react77.default.createElement(HawaPinInput, {
|
|
9412
9459
|
width: "full",
|
|
9413
9460
|
digits: 6,
|
|
9414
9461
|
getPins: function(e) {
|
|
9415
9462
|
return setPins(e);
|
|
9416
9463
|
}
|
|
9417
|
-
}), /* @__PURE__ */
|
|
9464
|
+
}), /* @__PURE__ */ import_react77.default.createElement("div", {
|
|
9418
9465
|
className: " py-2 text-center text-xs text-muted-foreground"
|
|
9419
|
-
}, /* @__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", {
|
|
9420
9467
|
className: "clickable-link"
|
|
9421
|
-
}, (_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", {
|
|
9422
9469
|
className: "mt-4 grid grid-cols-2 gap-2"
|
|
9423
|
-
}, /* @__PURE__ */
|
|
9470
|
+
}, /* @__PURE__ */ import_react77.default.createElement(Button, {
|
|
9424
9471
|
variant: "secondary"
|
|
9425
|
-
}, (_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")))));
|
|
9426
9473
|
};
|
|
9427
9474
|
// src/blocks/Payment/SelectPayment.tsx
|
|
9428
|
-
var
|
|
9475
|
+
var import_react78 = __toESM(require("react"));
|
|
9429
9476
|
var SelectPayment = function(props) {
|
|
9430
|
-
var _ref = _sliced_to_array((0,
|
|
9431
|
-
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, {
|
|
9432
9479
|
className: "grid grid-cols-2 gap-4"
|
|
9433
|
-
}, /* @__PURE__ */
|
|
9480
|
+
}, /* @__PURE__ */ import_react78.default.createElement(Button, {
|
|
9434
9481
|
className: cn("flex w-full flex-col gap-2 pt-6", selectedMethod === "mada" && "outline outline-4 outline-primary"),
|
|
9435
9482
|
variant: "outline",
|
|
9436
9483
|
size: "heightless",
|
|
@@ -9438,10 +9485,10 @@ var SelectPayment = function(props) {
|
|
|
9438
9485
|
onClick: function() {
|
|
9439
9486
|
return setSelectedMethod("mada");
|
|
9440
9487
|
}
|
|
9441
|
-
}, /* @__PURE__ */
|
|
9488
|
+
}, /* @__PURE__ */ import_react78.default.createElement("img", {
|
|
9442
9489
|
src: "https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png",
|
|
9443
9490
|
className: "h-6"
|
|
9444
|
-
}), /* @__PURE__ */
|
|
9491
|
+
}), /* @__PURE__ */ import_react78.default.createElement("span", null, props.madaLabel)), /* @__PURE__ */ import_react78.default.createElement(Button, {
|
|
9445
9492
|
className: cn("flex w-full flex-col gap-2", selectedMethod === "apple-pay" && "outline outline-4 outline-primary"),
|
|
9446
9493
|
variant: "outline",
|
|
9447
9494
|
size: "heightless",
|
|
@@ -9449,10 +9496,10 @@ var SelectPayment = function(props) {
|
|
|
9449
9496
|
onClick: function() {
|
|
9450
9497
|
return setSelectedMethod("apple-pay");
|
|
9451
9498
|
}
|
|
9452
|
-
}, /* @__PURE__ */
|
|
9499
|
+
}, /* @__PURE__ */ import_react78.default.createElement("img", {
|
|
9453
9500
|
src: "https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png",
|
|
9454
9501
|
className: "h-11"
|
|
9455
|
-
}), /* @__PURE__ */
|
|
9502
|
+
}), /* @__PURE__ */ import_react78.default.createElement("span", null, props.applePayLabel)), /* @__PURE__ */ import_react78.default.createElement(Button, {
|
|
9456
9503
|
className: cn("flex w-full flex-col gap-2", selectedMethod === "visa-master" && "outline outline-4 outline-primary"),
|
|
9457
9504
|
variant: "outline",
|
|
9458
9505
|
size: "heightless",
|
|
@@ -9460,10 +9507,10 @@ var SelectPayment = function(props) {
|
|
|
9460
9507
|
onClick: function() {
|
|
9461
9508
|
return setSelectedMethod("visa-master");
|
|
9462
9509
|
}
|
|
9463
|
-
}, /* @__PURE__ */
|
|
9510
|
+
}, /* @__PURE__ */ import_react78.default.createElement("img", {
|
|
9464
9511
|
src: "https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png",
|
|
9465
9512
|
className: "h-6"
|
|
9466
|
-
}), /* @__PURE__ */
|
|
9513
|
+
}), /* @__PURE__ */ import_react78.default.createElement("span", null, props.visaMasterLabel)), /* @__PURE__ */ import_react78.default.createElement(Button, {
|
|
9467
9514
|
variant: "outline",
|
|
9468
9515
|
size: "heightless",
|
|
9469
9516
|
className: cn("flex w-full flex-col gap-2", selectedMethod === "wallet" && "outline outline-4 outline-primary"),
|
|
@@ -9471,16 +9518,16 @@ var SelectPayment = function(props) {
|
|
|
9471
9518
|
onClick: function() {
|
|
9472
9519
|
return setSelectedMethod("wallet");
|
|
9473
9520
|
}
|
|
9474
|
-
}, /* @__PURE__ */
|
|
9521
|
+
}, /* @__PURE__ */ import_react78.default.createElement("svg", {
|
|
9475
9522
|
version: "1.1",
|
|
9476
9523
|
fill: "currentColor",
|
|
9477
9524
|
viewBox: "0 0 223 223",
|
|
9478
9525
|
className: "h-6 w-6"
|
|
9479
|
-
}, /* @__PURE__ */
|
|
9526
|
+
}, /* @__PURE__ */ import_react78.default.createElement("g", null, /* @__PURE__ */ import_react78.default.createElement("path", {
|
|
9480
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"
|
|
9481
|
-
}), /* @__PURE__ */
|
|
9528
|
+
}), /* @__PURE__ */ import_react78.default.createElement("path", {
|
|
9482
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"
|
|
9483
|
-
}))), /* @__PURE__ */
|
|
9530
|
+
}))), /* @__PURE__ */ import_react78.default.createElement("span", null, props.walletLabel)), /* @__PURE__ */ import_react78.default.createElement(Button, {
|
|
9484
9531
|
variant: "outline",
|
|
9485
9532
|
size: "heightless",
|
|
9486
9533
|
className: cn("flex w-full flex-col gap-2", selectedMethod === "stc-pay" && "outline outline-4 outline-primary"),
|
|
@@ -9488,10 +9535,10 @@ var SelectPayment = function(props) {
|
|
|
9488
9535
|
onClick: function() {
|
|
9489
9536
|
return setSelectedMethod("stc-pay");
|
|
9490
9537
|
}
|
|
9491
|
-
}, /* @__PURE__ */
|
|
9538
|
+
}, /* @__PURE__ */ import_react78.default.createElement("img", {
|
|
9492
9539
|
src: "https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/stc-pay.png",
|
|
9493
9540
|
className: "h-6"
|
|
9494
|
-
}), /* @__PURE__ */
|
|
9541
|
+
}), /* @__PURE__ */ import_react78.default.createElement("span", null, props.stcPayLabel)), /* @__PURE__ */ import_react78.default.createElement(Button, {
|
|
9495
9542
|
variant: "outline",
|
|
9496
9543
|
size: "heightless",
|
|
9497
9544
|
className: cn("flex w-full flex-col gap-2", selectedMethod === "google-pay" && "outline outline-4 outline-primary"),
|
|
@@ -9499,10 +9546,10 @@ var SelectPayment = function(props) {
|
|
|
9499
9546
|
onClick: function() {
|
|
9500
9547
|
return setSelectedMethod("google-pay");
|
|
9501
9548
|
}
|
|
9502
|
-
}, /* @__PURE__ */
|
|
9549
|
+
}, /* @__PURE__ */ import_react78.default.createElement("img", {
|
|
9503
9550
|
src: "https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png",
|
|
9504
9551
|
className: "h-6"
|
|
9505
|
-
}), /* @__PURE__ */
|
|
9552
|
+
}), /* @__PURE__ */ import_react78.default.createElement("span", null, props.googlePayLabel)), /* @__PURE__ */ import_react78.default.createElement(Button, {
|
|
9506
9553
|
variant: "outline",
|
|
9507
9554
|
size: "heightless",
|
|
9508
9555
|
className: cn("col-span-2 flex w-full flex-col gap-2", selectedMethod === "paypal" && "outline outline-4 outline-primary"),
|
|
@@ -9510,10 +9557,10 @@ var SelectPayment = function(props) {
|
|
|
9510
9557
|
onClick: function() {
|
|
9511
9558
|
return setSelectedMethod("paypal");
|
|
9512
9559
|
}
|
|
9513
|
-
}, /* @__PURE__ */
|
|
9560
|
+
}, /* @__PURE__ */ import_react78.default.createElement("img", {
|
|
9514
9561
|
src: "https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/paypal.png",
|
|
9515
9562
|
className: "h-6"
|
|
9516
|
-
}), /* @__PURE__ */
|
|
9563
|
+
}), /* @__PURE__ */ import_react78.default.createElement("span", null, props.paypalLabel))), /* @__PURE__ */ import_react78.default.createElement(CardFooter, null, /* @__PURE__ */ import_react78.default.createElement(Button, {
|
|
9517
9564
|
onClick: function() {
|
|
9518
9565
|
return props.handleContinue(selectedMethod);
|
|
9519
9566
|
},
|
|
@@ -9522,24 +9569,24 @@ var SelectPayment = function(props) {
|
|
|
9522
9569
|
}, "Continue")));
|
|
9523
9570
|
};
|
|
9524
9571
|
// src/blocks/Payment/CreditCardForm.tsx
|
|
9525
|
-
var
|
|
9572
|
+
var import_react79 = __toESM(require("react"));
|
|
9526
9573
|
var import_react_hook_form7 = require("react-hook-form");
|
|
9527
9574
|
var CreditCardForm = function(props) {
|
|
9528
9575
|
var methods = (0, import_react_hook_form7.useForm)();
|
|
9529
9576
|
var errors = methods.formState.errors, handleSubmit = methods.handleSubmit, control = methods.control;
|
|
9530
|
-
return /* @__PURE__ */
|
|
9577
|
+
return /* @__PURE__ */ import_react79.default.createElement(Card, null, /* @__PURE__ */ import_react79.default.createElement("form", {
|
|
9531
9578
|
onSubmit: handleSubmit(props.handle)
|
|
9532
|
-
}, /* @__PURE__ */
|
|
9579
|
+
}, /* @__PURE__ */ import_react79.default.createElement(CardContent, {
|
|
9533
9580
|
headless: true
|
|
9534
|
-
}, /* @__PURE__ */
|
|
9581
|
+
}, /* @__PURE__ */ import_react79.default.createElement("div", {
|
|
9535
9582
|
className: "flex flex-row gap-4"
|
|
9536
|
-
}, /* @__PURE__ */
|
|
9583
|
+
}, /* @__PURE__ */ import_react79.default.createElement(import_react_hook_form7.Controller, {
|
|
9537
9584
|
control: control,
|
|
9538
9585
|
name: "cardName",
|
|
9539
9586
|
render: function(param) {
|
|
9540
9587
|
var field = param.field;
|
|
9541
9588
|
var _errors_password;
|
|
9542
|
-
return /* @__PURE__ */
|
|
9589
|
+
return /* @__PURE__ */ import_react79.default.createElement(HawaTextField, {
|
|
9543
9590
|
width: "full",
|
|
9544
9591
|
name: "password",
|
|
9545
9592
|
placeholder: "Enter password",
|
|
@@ -9551,15 +9598,15 @@ var CreditCardForm = function(props) {
|
|
|
9551
9598
|
rules: {
|
|
9552
9599
|
required: "Password is rquired"
|
|
9553
9600
|
}
|
|
9554
|
-
}), /* @__PURE__ */
|
|
9601
|
+
}), /* @__PURE__ */ import_react79.default.createElement("div", {
|
|
9555
9602
|
className: "w-1/4"
|
|
9556
|
-
}, /* @__PURE__ */
|
|
9603
|
+
}, /* @__PURE__ */ import_react79.default.createElement(import_react_hook_form7.Controller, {
|
|
9557
9604
|
control: control,
|
|
9558
9605
|
name: "cardName",
|
|
9559
9606
|
render: function(param) {
|
|
9560
9607
|
var field = param.field;
|
|
9561
9608
|
var _errors_password;
|
|
9562
|
-
return /* @__PURE__ */
|
|
9609
|
+
return /* @__PURE__ */ import_react79.default.createElement(HawaTextField, {
|
|
9563
9610
|
width: "full",
|
|
9564
9611
|
name: "password",
|
|
9565
9612
|
maxLength: "3",
|
|
@@ -9573,13 +9620,13 @@ var CreditCardForm = function(props) {
|
|
|
9573
9620
|
rules: {
|
|
9574
9621
|
required: "Password is rquired"
|
|
9575
9622
|
}
|
|
9576
|
-
}))), /* @__PURE__ */
|
|
9623
|
+
}))), /* @__PURE__ */ import_react79.default.createElement(import_react_hook_form7.Controller, {
|
|
9577
9624
|
control: control,
|
|
9578
9625
|
name: "cardName",
|
|
9579
9626
|
render: function(param) {
|
|
9580
9627
|
var field = param.field;
|
|
9581
9628
|
var _errors_password;
|
|
9582
|
-
return /* @__PURE__ */
|
|
9629
|
+
return /* @__PURE__ */ import_react79.default.createElement(HawaTextField, {
|
|
9583
9630
|
width: "full",
|
|
9584
9631
|
name: "password",
|
|
9585
9632
|
placeholder: "Enter password",
|
|
@@ -9591,13 +9638,13 @@ var CreditCardForm = function(props) {
|
|
|
9591
9638
|
rules: {
|
|
9592
9639
|
required: "Password is rquired"
|
|
9593
9640
|
}
|
|
9594
|
-
}), /* @__PURE__ */
|
|
9641
|
+
}), /* @__PURE__ */ import_react79.default.createElement(import_react_hook_form7.Controller, {
|
|
9595
9642
|
control: control,
|
|
9596
9643
|
name: "cardName",
|
|
9597
9644
|
render: function(param) {
|
|
9598
9645
|
var field = param.field;
|
|
9599
9646
|
var _errors_password;
|
|
9600
|
-
return /* @__PURE__ */
|
|
9647
|
+
return /* @__PURE__ */ import_react79.default.createElement(HawaTextField, {
|
|
9601
9648
|
width: "full",
|
|
9602
9649
|
name: "password",
|
|
9603
9650
|
placeholder: "Enter password",
|
|
@@ -9609,60 +9656,60 @@ var CreditCardForm = function(props) {
|
|
|
9609
9656
|
rules: {
|
|
9610
9657
|
required: "Password is rquired"
|
|
9611
9658
|
}
|
|
9612
|
-
})), /* @__PURE__ */
|
|
9659
|
+
})), /* @__PURE__ */ import_react79.default.createElement(CardFooter, null, /* @__PURE__ */ import_react79.default.createElement(Button, {
|
|
9613
9660
|
className: "w-full",
|
|
9614
9661
|
onClick: props.handlePayWithCreditCard
|
|
9615
9662
|
}, "Pay with Credit Card"))));
|
|
9616
9663
|
};
|
|
9617
9664
|
// src/blocks/Payment/ChargeWalletForm.tsx
|
|
9618
|
-
var
|
|
9665
|
+
var import_react80 = __toESM(require("react"));
|
|
9619
9666
|
var ChargeWalletForm = function(props) {
|
|
9620
|
-
var _ref = _sliced_to_array((0,
|
|
9621
|
-
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, {
|
|
9622
9669
|
headless: true
|
|
9623
|
-
}, /* @__PURE__ */
|
|
9670
|
+
}, /* @__PURE__ */ import_react80.default.createElement("div", {
|
|
9624
9671
|
className: "p-4 text-center"
|
|
9625
|
-
}, /* @__PURE__ */
|
|
9672
|
+
}, /* @__PURE__ */ import_react80.default.createElement("div", {
|
|
9626
9673
|
className: " text-5xl font-extrabold"
|
|
9627
|
-
}, Number(walletAmount).toLocaleString("en") || "0"), /* @__PURE__ */
|
|
9674
|
+
}, Number(walletAmount).toLocaleString("en") || "0"), /* @__PURE__ */ import_react80.default.createElement("div", {
|
|
9628
9675
|
className: "text-sm font-normal"
|
|
9629
|
-
}, props.currency || "SAR")), /* @__PURE__ */
|
|
9676
|
+
}, props.currency || "SAR")), /* @__PURE__ */ import_react80.default.createElement("div", {
|
|
9630
9677
|
className: "mb-2 flex w-full flex-col gap-4 text-center"
|
|
9631
|
-
}, /* @__PURE__ */
|
|
9678
|
+
}, /* @__PURE__ */ import_react80.default.createElement("div", {
|
|
9632
9679
|
className: "mb-2 flex w-full flex-row gap-4 text-center"
|
|
9633
|
-
}, /* @__PURE__ */
|
|
9680
|
+
}, /* @__PURE__ */ import_react80.default.createElement(Button, {
|
|
9634
9681
|
variant: "outline",
|
|
9635
9682
|
className: "h-full w-full"
|
|
9636
|
-
}, "10 SAR"), /* @__PURE__ */
|
|
9683
|
+
}, "10 SAR"), /* @__PURE__ */ import_react80.default.createElement(Button, {
|
|
9637
9684
|
variant: "outline",
|
|
9638
9685
|
className: "h-full w-full"
|
|
9639
|
-
}, "50 SAR"), /* @__PURE__ */
|
|
9686
|
+
}, "50 SAR"), /* @__PURE__ */ import_react80.default.createElement(Button, {
|
|
9640
9687
|
variant: "outline",
|
|
9641
9688
|
className: "h-full w-full"
|
|
9642
|
-
}, "100 SAR")), /* @__PURE__ */
|
|
9689
|
+
}, "100 SAR")), /* @__PURE__ */ import_react80.default.createElement(Input, {
|
|
9643
9690
|
placeholder: "Custom Amount",
|
|
9644
9691
|
type: "number",
|
|
9645
9692
|
name: "amount"
|
|
9646
|
-
})), /* @__PURE__ */
|
|
9693
|
+
})), /* @__PURE__ */ import_react80.default.createElement(Button, {
|
|
9647
9694
|
className: "mt-6 w-full"
|
|
9648
9695
|
}, props.texts.chargeWallet)));
|
|
9649
9696
|
};
|
|
9650
9697
|
// src/blocks/Payment/PayWithWallet.tsx
|
|
9651
|
-
var
|
|
9698
|
+
var import_react81 = __toESM(require("react"));
|
|
9652
9699
|
var PayWithWallet = function(props) {
|
|
9653
|
-
return /* @__PURE__ */
|
|
9700
|
+
return /* @__PURE__ */ import_react81.default.createElement(Card, null, /* @__PURE__ */ import_react81.default.createElement(CardContent, {
|
|
9654
9701
|
headless: true
|
|
9655
|
-
}, /* @__PURE__ */
|
|
9702
|
+
}, /* @__PURE__ */ import_react81.default.createElement("div", {
|
|
9656
9703
|
className: "text-center text-5xl font-extrabold"
|
|
9657
|
-
}, props.walletBalance || "0", /* @__PURE__ */
|
|
9704
|
+
}, props.walletBalance || "0", /* @__PURE__ */ import_react81.default.createElement("div", {
|
|
9658
9705
|
className: "text-sm font-normal"
|
|
9659
|
-
}, props.currency || "SAR")), /* @__PURE__ */
|
|
9706
|
+
}, props.currency || "SAR")), /* @__PURE__ */ import_react81.default.createElement(Button, {
|
|
9660
9707
|
className: "mt-6 w-full",
|
|
9661
9708
|
onClick: props.handlePayWithWallet
|
|
9662
9709
|
}, "Pay Now")));
|
|
9663
9710
|
};
|
|
9664
9711
|
// src/blocks/Payment/CheckoutForm.tsx
|
|
9665
|
-
var
|
|
9712
|
+
var import_react82 = __toESM(require("react"));
|
|
9666
9713
|
var import_react_hook_form8 = require("react-hook-form");
|
|
9667
9714
|
var CheckoutForm = function(props) {
|
|
9668
9715
|
var _props_texts, _props_texts1, _props_texts2, _props_texts3, _props_texts4, _props_texts5, _props_texts6, _props_texts7, _props_texts8, _props_texts9;
|
|
@@ -9683,9 +9730,9 @@ var CheckoutForm = function(props) {
|
|
|
9683
9730
|
}
|
|
9684
9731
|
};
|
|
9685
9732
|
var _field_value, _field_value1, _field_value2, _field_value3, _field_value4, _field_value5, _field_value6, _field_value7, _field_value8;
|
|
9686
|
-
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", {
|
|
9687
9734
|
className: "rounded border border-gray-300"
|
|
9688
|
-
}, /* @__PURE__ */
|
|
9735
|
+
}, /* @__PURE__ */ import_react82.default.createElement(HawaTable, {
|
|
9689
9736
|
pagination: false,
|
|
9690
9737
|
direction: isArabic ? "rtl" : "ltr",
|
|
9691
9738
|
columns: [
|
|
@@ -9705,9 +9752,9 @@ var CheckoutForm = function(props) {
|
|
|
9705
9752
|
borders: "inner",
|
|
9706
9753
|
rows: props.products,
|
|
9707
9754
|
bordersWidth: "1"
|
|
9708
|
-
})))), /* @__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", {
|
|
9709
9756
|
onSubmit: handleSubmit(props.handlePayNow)
|
|
9710
|
-
}, /* @__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, {
|
|
9711
9758
|
control: control,
|
|
9712
9759
|
name: "firstName",
|
|
9713
9760
|
rules: {
|
|
@@ -9716,7 +9763,7 @@ var CheckoutForm = function(props) {
|
|
|
9716
9763
|
render: function(param) {
|
|
9717
9764
|
var field = param.field;
|
|
9718
9765
|
var _props_texts, _errors_firstName;
|
|
9719
|
-
return /* @__PURE__ */
|
|
9766
|
+
return /* @__PURE__ */ import_react82.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
9720
9767
|
type: "text",
|
|
9721
9768
|
label: ((_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.firstNameLabel) + " *",
|
|
9722
9769
|
helpertext: (_errors_firstName = errors.firstName) === null || _errors_firstName === void 0 ? void 0 : _errors_firstName.message
|
|
@@ -9724,11 +9771,11 @@ var CheckoutForm = function(props) {
|
|
|
9724
9771
|
value: (_field_value = field.value) !== null && _field_value !== void 0 ? _field_value : ""
|
|
9725
9772
|
}));
|
|
9726
9773
|
}
|
|
9727
|
-
}), /* @__PURE__ */
|
|
9774
|
+
}), /* @__PURE__ */ import_react82.default.createElement("div", {
|
|
9728
9775
|
style: {
|
|
9729
9776
|
width: 20
|
|
9730
9777
|
}
|
|
9731
|
-
}), /* @__PURE__ */
|
|
9778
|
+
}), /* @__PURE__ */ import_react82.default.createElement(import_react_hook_form8.Controller, {
|
|
9732
9779
|
control: control,
|
|
9733
9780
|
name: "lastName",
|
|
9734
9781
|
rules: {
|
|
@@ -9737,7 +9784,7 @@ var CheckoutForm = function(props) {
|
|
|
9737
9784
|
render: function(param) {
|
|
9738
9785
|
var field = param.field;
|
|
9739
9786
|
var _props_texts, _errors_lastName;
|
|
9740
|
-
return /* @__PURE__ */
|
|
9787
|
+
return /* @__PURE__ */ import_react82.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
9741
9788
|
width: "full",
|
|
9742
9789
|
type: "text",
|
|
9743
9790
|
label: ((_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.lastNameLabel) + " *",
|
|
@@ -9746,13 +9793,13 @@ var CheckoutForm = function(props) {
|
|
|
9746
9793
|
value: (_field_value1 = field.value) !== null && _field_value1 !== void 0 ? _field_value1 : ""
|
|
9747
9794
|
}));
|
|
9748
9795
|
}
|
|
9749
|
-
})), /* @__PURE__ */
|
|
9796
|
+
})), /* @__PURE__ */ import_react82.default.createElement(import_react_hook_form8.Controller, {
|
|
9750
9797
|
control: control,
|
|
9751
9798
|
name: "email",
|
|
9752
9799
|
render: function(param) {
|
|
9753
9800
|
var field = param.field;
|
|
9754
9801
|
var _props_texts, _errors_email;
|
|
9755
|
-
return /* @__PURE__ */
|
|
9802
|
+
return /* @__PURE__ */ import_react82.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
9756
9803
|
width: "full",
|
|
9757
9804
|
type: "text",
|
|
9758
9805
|
label: ((_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.emailLabel) + " *",
|
|
@@ -9768,9 +9815,9 @@ var CheckoutForm = function(props) {
|
|
|
9768
9815
|
message: (_props_texts3 = props.texts) === null || _props_texts3 === void 0 ? void 0 : _props_texts3.emailInvalidText
|
|
9769
9816
|
}
|
|
9770
9817
|
}
|
|
9771
|
-
}), /* @__PURE__ */
|
|
9818
|
+
}), /* @__PURE__ */ import_react82.default.createElement("div", {
|
|
9772
9819
|
className: "flex flex-col md:flex-row"
|
|
9773
|
-
}, /* @__PURE__ */
|
|
9820
|
+
}, /* @__PURE__ */ import_react82.default.createElement(import_react_hook_form8.Controller, {
|
|
9774
9821
|
control: control,
|
|
9775
9822
|
name: "streetAddress",
|
|
9776
9823
|
rules: {
|
|
@@ -9779,7 +9826,7 @@ var CheckoutForm = function(props) {
|
|
|
9779
9826
|
render: function(param) {
|
|
9780
9827
|
var field = param.field;
|
|
9781
9828
|
var _props_texts, _errors_streetAddress;
|
|
9782
|
-
return /* @__PURE__ */
|
|
9829
|
+
return /* @__PURE__ */ import_react82.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
9783
9830
|
width: "full",
|
|
9784
9831
|
type: "text",
|
|
9785
9832
|
label: ((_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.streetAddressLabel) + " *",
|
|
@@ -9788,9 +9835,9 @@ var CheckoutForm = function(props) {
|
|
|
9788
9835
|
value: (_field_value3 = field.value) !== null && _field_value3 !== void 0 ? _field_value3 : ""
|
|
9789
9836
|
}));
|
|
9790
9837
|
}
|
|
9791
|
-
})), /* @__PURE__ */
|
|
9838
|
+
})), /* @__PURE__ */ import_react82.default.createElement("div", {
|
|
9792
9839
|
className: "flex flex-col md:flex-row"
|
|
9793
|
-
}, /* @__PURE__ */
|
|
9840
|
+
}, /* @__PURE__ */ import_react82.default.createElement(import_react_hook_form8.Controller, {
|
|
9794
9841
|
control: control,
|
|
9795
9842
|
name: "province",
|
|
9796
9843
|
rules: {
|
|
@@ -9799,7 +9846,7 @@ var CheckoutForm = function(props) {
|
|
|
9799
9846
|
render: function(param) {
|
|
9800
9847
|
var field = param.field;
|
|
9801
9848
|
var _props_texts, _errors_province;
|
|
9802
|
-
return /* @__PURE__ */
|
|
9849
|
+
return /* @__PURE__ */ import_react82.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
9803
9850
|
width: "full",
|
|
9804
9851
|
type: "text",
|
|
9805
9852
|
label: ((_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.stateLabel) + " *",
|
|
@@ -9808,11 +9855,11 @@ var CheckoutForm = function(props) {
|
|
|
9808
9855
|
value: (_field_value4 = field.value) !== null && _field_value4 !== void 0 ? _field_value4 : ""
|
|
9809
9856
|
}));
|
|
9810
9857
|
}
|
|
9811
|
-
}), /* @__PURE__ */
|
|
9858
|
+
}), /* @__PURE__ */ import_react82.default.createElement("div", {
|
|
9812
9859
|
style: {
|
|
9813
9860
|
width: 20
|
|
9814
9861
|
}
|
|
9815
|
-
}), /* @__PURE__ */
|
|
9862
|
+
}), /* @__PURE__ */ import_react82.default.createElement(import_react_hook_form8.Controller, {
|
|
9816
9863
|
control: control,
|
|
9817
9864
|
name: "city",
|
|
9818
9865
|
rules: {
|
|
@@ -9821,7 +9868,7 @@ var CheckoutForm = function(props) {
|
|
|
9821
9868
|
render: function(param) {
|
|
9822
9869
|
var field = param.field;
|
|
9823
9870
|
var _props_texts, _errors_city;
|
|
9824
|
-
return /* @__PURE__ */
|
|
9871
|
+
return /* @__PURE__ */ import_react82.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
9825
9872
|
width: "full",
|
|
9826
9873
|
type: "text",
|
|
9827
9874
|
label: ((_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.cityLabel) + " *",
|
|
@@ -9830,9 +9877,9 @@ var CheckoutForm = function(props) {
|
|
|
9830
9877
|
value: (_field_value5 = field.value) !== null && _field_value5 !== void 0 ? _field_value5 : ""
|
|
9831
9878
|
}));
|
|
9832
9879
|
}
|
|
9833
|
-
})), /* @__PURE__ */
|
|
9880
|
+
})), /* @__PURE__ */ import_react82.default.createElement("div", {
|
|
9834
9881
|
className: "flex flex-col md:flex-row"
|
|
9835
|
-
}, /* @__PURE__ */
|
|
9882
|
+
}, /* @__PURE__ */ import_react82.default.createElement(import_react_hook_form8.Controller, {
|
|
9836
9883
|
control: control,
|
|
9837
9884
|
name: "buildingNumber",
|
|
9838
9885
|
rules: {
|
|
@@ -9841,7 +9888,7 @@ var CheckoutForm = function(props) {
|
|
|
9841
9888
|
render: function(param) {
|
|
9842
9889
|
var field = param.field;
|
|
9843
9890
|
var _props_texts, _errors_buildingNumber;
|
|
9844
|
-
return /* @__PURE__ */
|
|
9891
|
+
return /* @__PURE__ */ import_react82.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
9845
9892
|
width: "full",
|
|
9846
9893
|
type: "text",
|
|
9847
9894
|
label: ((_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.buildingNumberLabel) + " *",
|
|
@@ -9850,11 +9897,11 @@ var CheckoutForm = function(props) {
|
|
|
9850
9897
|
value: (_field_value6 = field.value) !== null && _field_value6 !== void 0 ? _field_value6 : ""
|
|
9851
9898
|
}));
|
|
9852
9899
|
}
|
|
9853
|
-
}), /* @__PURE__ */
|
|
9900
|
+
}), /* @__PURE__ */ import_react82.default.createElement("div", {
|
|
9854
9901
|
style: {
|
|
9855
9902
|
width: 20
|
|
9856
9903
|
}
|
|
9857
|
-
}), /* @__PURE__ */
|
|
9904
|
+
}), /* @__PURE__ */ import_react82.default.createElement(import_react_hook_form8.Controller, {
|
|
9858
9905
|
control: control,
|
|
9859
9906
|
name: "zipCode",
|
|
9860
9907
|
rules: {
|
|
@@ -9863,7 +9910,7 @@ var CheckoutForm = function(props) {
|
|
|
9863
9910
|
render: function(param) {
|
|
9864
9911
|
var field = param.field;
|
|
9865
9912
|
var _props_texts, _errors_zipCode;
|
|
9866
|
-
return /* @__PURE__ */
|
|
9913
|
+
return /* @__PURE__ */ import_react82.default.createElement(HawaTextField, _object_spread_props(_object_spread({
|
|
9867
9914
|
width: "full",
|
|
9868
9915
|
type: "number",
|
|
9869
9916
|
label: ((_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.zipCodeLabel) + " *",
|
|
@@ -9872,9 +9919,9 @@ var CheckoutForm = function(props) {
|
|
|
9872
9919
|
value: (_field_value7 = field.value) !== null && _field_value7 !== void 0 ? _field_value7 : ""
|
|
9873
9920
|
}));
|
|
9874
9921
|
}
|
|
9875
|
-
})), /* @__PURE__ */
|
|
9922
|
+
})), /* @__PURE__ */ import_react82.default.createElement("div", {
|
|
9876
9923
|
className: "mb-3"
|
|
9877
|
-
}, /* @__PURE__ */
|
|
9924
|
+
}, /* @__PURE__ */ import_react82.default.createElement(import_react_hook_form8.Controller, {
|
|
9878
9925
|
control: control,
|
|
9879
9926
|
name: "country",
|
|
9880
9927
|
rules: {
|
|
@@ -9883,7 +9930,7 @@ var CheckoutForm = function(props) {
|
|
|
9883
9930
|
render: function(param) {
|
|
9884
9931
|
var field = param.field;
|
|
9885
9932
|
var _props_texts, _errors_country;
|
|
9886
|
-
return /* @__PURE__ */
|
|
9933
|
+
return /* @__PURE__ */ import_react82.default.createElement(HawaSelect, {
|
|
9887
9934
|
native: true,
|
|
9888
9935
|
label: ((_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.countryLabel) + " *",
|
|
9889
9936
|
helperText: (_errors_country = errors.country) === null || _errors_country === void 0 ? void 0 : _errors_country.message,
|
|
@@ -9895,73 +9942,73 @@ var CheckoutForm = function(props) {
|
|
|
9895
9942
|
return field.onChange(e.country_label);
|
|
9896
9943
|
},
|
|
9897
9944
|
value: (_field_value8 = field.value) !== null && _field_value8 !== void 0 ? _field_value8 : ""
|
|
9898
|
-
}, /* @__PURE__ */
|
|
9899
|
-
return /* @__PURE__ */
|
|
9945
|
+
}, /* @__PURE__ */ import_react82.default.createElement("option", null), props.countriesList.map(function(country, i) {
|
|
9946
|
+
return /* @__PURE__ */ import_react82.default.createElement("option", {
|
|
9900
9947
|
key: i
|
|
9901
9948
|
}, country);
|
|
9902
9949
|
}));
|
|
9903
9950
|
}
|
|
9904
|
-
}))))), /* @__PURE__ */
|
|
9951
|
+
}))))), /* @__PURE__ */ import_react82.default.createElement(CardFooter, null, /* @__PURE__ */ import_react82.default.createElement(Button, {
|
|
9905
9952
|
className: "w-full"
|
|
9906
9953
|
}, props.texts.payNow)), " "));
|
|
9907
9954
|
};
|
|
9908
9955
|
// src/blocks/Payment/Confirmation.tsx
|
|
9909
|
-
var
|
|
9956
|
+
var import_react83 = __toESM(require("react"));
|
|
9910
9957
|
var ConfirmationPage = function(props) {
|
|
9911
9958
|
var isArabic = props.lang === "ar";
|
|
9912
|
-
return /* @__PURE__ */
|
|
9959
|
+
return /* @__PURE__ */ import_react83.default.createElement(Card, null, /* @__PURE__ */ import_react83.default.createElement(CardContent, {
|
|
9913
9960
|
headless: true
|
|
9914
|
-
}, " ", /* @__PURE__ */
|
|
9961
|
+
}, " ", /* @__PURE__ */ import_react83.default.createElement("div", {
|
|
9915
9962
|
className: "py-5 text-center text-3xl font-bold dark:text-white"
|
|
9916
|
-
}, props.confirmationTitle), /* @__PURE__ */
|
|
9963
|
+
}, props.confirmationTitle), /* @__PURE__ */ import_react83.default.createElement("div", {
|
|
9917
9964
|
className: "py-5 dark:text-white"
|
|
9918
|
-
}, /* @__PURE__ */
|
|
9965
|
+
}, /* @__PURE__ */ import_react83.default.createElement("div", {
|
|
9919
9966
|
className: "mb-2 text-center"
|
|
9920
|
-
}, props.texts.successMessage, " ", /* @__PURE__ */
|
|
9967
|
+
}, props.texts.successMessage, " ", /* @__PURE__ */ import_react83.default.createElement("strong", null, props.userEmail)), /* @__PURE__ */ import_react83.default.createElement("div", {
|
|
9921
9968
|
className: "text-center"
|
|
9922
|
-
}, props.texts.yourOrderNumber), /* @__PURE__ */
|
|
9969
|
+
}, props.texts.yourOrderNumber), /* @__PURE__ */ import_react83.default.createElement("div", {
|
|
9923
9970
|
className: "text-center font-bold"
|
|
9924
|
-
}, props.orderNumber)), /* @__PURE__ */
|
|
9971
|
+
}, props.orderNumber)), /* @__PURE__ */ import_react83.default.createElement("div", {
|
|
9925
9972
|
className: "flex flex-col items-center justify-center gap-4 py-5 pt-0"
|
|
9926
|
-
}, /* @__PURE__ */
|
|
9973
|
+
}, /* @__PURE__ */ import_react83.default.createElement(Button, {
|
|
9927
9974
|
className: "w-full",
|
|
9928
9975
|
onClick: props.handlePrint
|
|
9929
|
-
}, props.texts.print), /* @__PURE__ */
|
|
9976
|
+
}, props.texts.print), /* @__PURE__ */ import_react83.default.createElement(Button, {
|
|
9930
9977
|
className: "w-full",
|
|
9931
9978
|
onClick: props.handleHistory
|
|
9932
|
-
}, props.texts.history), /* @__PURE__ */
|
|
9979
|
+
}, props.texts.history), /* @__PURE__ */ import_react83.default.createElement(Button, {
|
|
9933
9980
|
className: "w-full",
|
|
9934
9981
|
onClick: props.handleHome
|
|
9935
|
-
}, props.texts.homePage), /* @__PURE__ */
|
|
9982
|
+
}, props.texts.homePage), /* @__PURE__ */ import_react83.default.createElement("div", {
|
|
9936
9983
|
className: " text-center text-sm dark:text-white"
|
|
9937
|
-
}, props.texts.fasterPaymentNote), /* @__PURE__ */
|
|
9984
|
+
}, props.texts.fasterPaymentNote), /* @__PURE__ */ import_react83.default.createElement("a", {
|
|
9938
9985
|
className: "clickable-link text-xs",
|
|
9939
9986
|
onClick: props.handleRefundPolicyLink
|
|
9940
9987
|
}, props.texts.refundPolicy))));
|
|
9941
9988
|
};
|
|
9942
9989
|
// src/blocks/Pricing/PricingPlans.tsx
|
|
9943
|
-
var
|
|
9990
|
+
var import_react84 = __toESM(require("react"));
|
|
9944
9991
|
var PricingPlans = function(props) {
|
|
9945
|
-
return /* @__PURE__ */
|
|
9992
|
+
return /* @__PURE__ */ import_react84.default.createElement("div", null, /* @__PURE__ */ import_react84.default.createElement("div", {
|
|
9946
9993
|
className: "mb-2 flex w-full justify-between"
|
|
9947
|
-
}, /* @__PURE__ */
|
|
9994
|
+
}, /* @__PURE__ */ import_react84.default.createElement(HawaRadio, {
|
|
9948
9995
|
design: "tabs",
|
|
9949
9996
|
defaultValue: props.currentCycle,
|
|
9950
9997
|
options: props.billingCycles,
|
|
9951
9998
|
onChangeTab: function(e) {
|
|
9952
9999
|
return props.onCycleChange(e);
|
|
9953
10000
|
}
|
|
9954
|
-
}), /* @__PURE__ */
|
|
10001
|
+
}), /* @__PURE__ */ import_react84.default.createElement(HawaRadio, {
|
|
9955
10002
|
design: "tabs",
|
|
9956
10003
|
defaultValue: props.currentCurrency,
|
|
9957
10004
|
options: props.currencies,
|
|
9958
10005
|
onChangeTab: function(e) {
|
|
9959
10006
|
return props.onCurrencyChange(e);
|
|
9960
10007
|
}
|
|
9961
|
-
})), /* @__PURE__ */
|
|
10008
|
+
})), /* @__PURE__ */ import_react84.default.createElement("div", {
|
|
9962
10009
|
className: "flex flex-row justify-between"
|
|
9963
10010
|
}, props.plans.map(function(plan, index) {
|
|
9964
|
-
return /* @__PURE__ */
|
|
10011
|
+
return /* @__PURE__ */ import_react84.default.createElement(HawaPricingCard, _object_spread_props(_object_spread({
|
|
9965
10012
|
key: index,
|
|
9966
10013
|
onPlanClicked: function() {
|
|
9967
10014
|
return props.onPlanClicked(plan);
|
|
@@ -9975,26 +10022,26 @@ var PricingPlans = function(props) {
|
|
|
9975
10022
|
})));
|
|
9976
10023
|
};
|
|
9977
10024
|
// src/blocks/Pricing/ComparingPlans.tsx
|
|
9978
|
-
var
|
|
10025
|
+
var import_react85 = __toESM(require("react"));
|
|
9979
10026
|
var CheckMark = function() {
|
|
9980
|
-
return /* @__PURE__ */
|
|
10027
|
+
return /* @__PURE__ */ import_react85.default.createElement("svg", {
|
|
9981
10028
|
className: "h-5 w-5 text-green-500",
|
|
9982
10029
|
"aria-hidden": "true",
|
|
9983
10030
|
fill: "currentColor",
|
|
9984
10031
|
viewBox: "0 0 20 20"
|
|
9985
|
-
}, /* @__PURE__ */
|
|
10032
|
+
}, /* @__PURE__ */ import_react85.default.createElement("path", {
|
|
9986
10033
|
fillRule: "evenodd",
|
|
9987
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",
|
|
9988
10035
|
clipRule: "evenodd"
|
|
9989
10036
|
}));
|
|
9990
10037
|
};
|
|
9991
10038
|
var UncheckMark = function() {
|
|
9992
|
-
return /* @__PURE__ */
|
|
10039
|
+
return /* @__PURE__ */ import_react85.default.createElement("svg", {
|
|
9993
10040
|
className: "h-5 w-5 text-red-500",
|
|
9994
10041
|
"aria-hidden": "true",
|
|
9995
10042
|
fill: "currentColor",
|
|
9996
10043
|
viewBox: "0 0 20 20"
|
|
9997
|
-
}, /* @__PURE__ */
|
|
10044
|
+
}, /* @__PURE__ */ import_react85.default.createElement("path", {
|
|
9998
10045
|
fillRule: "evenodd",
|
|
9999
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",
|
|
10000
10047
|
clipRule: "evenodd"
|
|
@@ -10002,74 +10049,74 @@ var UncheckMark = function() {
|
|
|
10002
10049
|
};
|
|
10003
10050
|
var ComparingPlans = function(props) {
|
|
10004
10051
|
var _props_plans;
|
|
10005
|
-
var _ref = _sliced_to_array((0,
|
|
10006
|
-
var _ref1 = _sliced_to_array((0,
|
|
10007
|
-
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", {
|
|
10008
10055
|
id: "detailed-pricing",
|
|
10009
10056
|
className: "w-full overflow-x-auto"
|
|
10010
|
-
}, /* @__PURE__ */
|
|
10057
|
+
}, /* @__PURE__ */ import_react85.default.createElement("div", {
|
|
10011
10058
|
className: "mb-2 flex w-full justify-between"
|
|
10012
|
-
}, /* @__PURE__ */
|
|
10059
|
+
}, /* @__PURE__ */ import_react85.default.createElement(HawaRadio, {
|
|
10013
10060
|
design: "tabs",
|
|
10014
10061
|
defaultValue: currentCycle,
|
|
10015
10062
|
options: props.billingCycles,
|
|
10016
10063
|
onChangeTab: function(e) {
|
|
10017
10064
|
return props.onCycleChange(e);
|
|
10018
10065
|
}
|
|
10019
|
-
}), /* @__PURE__ */
|
|
10066
|
+
}), /* @__PURE__ */ import_react85.default.createElement(HawaRadio, {
|
|
10020
10067
|
design: "tabs",
|
|
10021
10068
|
defaultValue: currentCurrency,
|
|
10022
10069
|
options: props.currencies,
|
|
10023
10070
|
onChangeTab: function(e) {
|
|
10024
10071
|
return props.onCurrencyChange(e);
|
|
10025
10072
|
}
|
|
10026
|
-
})), /* @__PURE__ */
|
|
10073
|
+
})), /* @__PURE__ */ import_react85.default.createElement("div", {
|
|
10027
10074
|
className: " overflow-hidden rounded"
|
|
10028
|
-
}, /* @__PURE__ */
|
|
10075
|
+
}, /* @__PURE__ */ import_react85.default.createElement("div", {
|
|
10029
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"
|
|
10030
|
-
}, /* @__PURE__ */
|
|
10077
|
+
}, /* @__PURE__ */ import_react85.default.createElement("div", {
|
|
10031
10078
|
className: "flex items-center"
|
|
10032
10079
|
}), props.plans.map(function(plan) {
|
|
10033
|
-
return /* @__PURE__ */
|
|
10080
|
+
return /* @__PURE__ */ import_react85.default.createElement("div", null, /* @__PURE__ */ import_react85.default.createElement("h5", {
|
|
10034
10081
|
className: "text-md 0 font-bold text-gray-500 dark:text-gray-400"
|
|
10035
|
-
}, plan.texts.title), /* @__PURE__ */
|
|
10082
|
+
}, plan.texts.title), /* @__PURE__ */ import_react85.default.createElement("div", {
|
|
10036
10083
|
className: " flex items-baseline text-gray-900 dark:text-white"
|
|
10037
|
-
}, /* @__PURE__ */
|
|
10084
|
+
}, /* @__PURE__ */ import_react85.default.createElement(import_react85.default.Fragment, null, /* @__PURE__ */ import_react85.default.createElement("span", {
|
|
10038
10085
|
className: "text-5xl font-extrabold tracking-tight"
|
|
10039
|
-
}, plan.price), /* @__PURE__ */
|
|
10086
|
+
}, plan.price), /* @__PURE__ */ import_react85.default.createElement("span", {
|
|
10040
10087
|
className: "mx-1 text-sm font-semibold"
|
|
10041
|
-
}, plan.texts.currencyText)), /* @__PURE__ */
|
|
10088
|
+
}, plan.texts.currencyText)), /* @__PURE__ */ import_react85.default.createElement("span", {
|
|
10042
10089
|
className: "ml-1 text-xl font-normal text-gray-500 dark:text-gray-400"
|
|
10043
|
-
}, "/ ", plan.texts.cycleText)), /* @__PURE__ */
|
|
10090
|
+
}, "/ ", plan.texts.cycleText)), /* @__PURE__ */ import_react85.default.createElement("h5", {
|
|
10044
10091
|
className: "text-md font-normal text-gray-500 dark:text-gray-400"
|
|
10045
10092
|
}, plan.texts.subtitle));
|
|
10046
10093
|
})), (_props_plans = props.plans) === null || _props_plans === void 0 ? void 0 : _props_plans.map(function(plan) {
|
|
10047
10094
|
return plan.features.map(function(feature) {
|
|
10048
|
-
return /* @__PURE__ */
|
|
10095
|
+
return /* @__PURE__ */ import_react85.default.createElement("div", {
|
|
10049
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"
|
|
10050
|
-
}, /* @__PURE__ */
|
|
10097
|
+
}, /* @__PURE__ */ import_react85.default.createElement("div", {
|
|
10051
10098
|
className: " flex flex-row items-center gap-2 text-gray-500 dark:text-gray-400"
|
|
10052
|
-
}, feature.text, feature.description && /* @__PURE__ */
|
|
10099
|
+
}, feature.text, feature.description && /* @__PURE__ */ import_react85.default.createElement(Tooltip, {
|
|
10053
10100
|
side: "right",
|
|
10054
10101
|
content: feature.description
|
|
10055
|
-
}, /* @__PURE__ */
|
|
10102
|
+
}, /* @__PURE__ */ import_react85.default.createElement("svg", {
|
|
10056
10103
|
stroke: "currentColor",
|
|
10057
10104
|
fill: "currentColor",
|
|
10058
10105
|
strokeWidth: "0",
|
|
10059
10106
|
viewBox: "0 0 16 16",
|
|
10060
10107
|
height: "1em",
|
|
10061
10108
|
width: "1em"
|
|
10062
|
-
}, /* @__PURE__ */
|
|
10109
|
+
}, /* @__PURE__ */ import_react85.default.createElement("path", {
|
|
10063
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"
|
|
10064
|
-
})))), /* @__PURE__ */
|
|
10111
|
+
})))), /* @__PURE__ */ import_react85.default.createElement(UncheckMark, null), /* @__PURE__ */ import_react85.default.createElement(CheckMark, null), /* @__PURE__ */ import_react85.default.createElement(UncheckMark, null));
|
|
10065
10112
|
});
|
|
10066
10113
|
})));
|
|
10067
10114
|
};
|
|
10068
10115
|
// src/blocks/Pricing/HorizontalPricing.tsx
|
|
10069
|
-
var
|
|
10116
|
+
var import_react86 = __toESM(require("react"));
|
|
10070
10117
|
var import_clsx33 = __toESM(require("clsx"));
|
|
10071
10118
|
var HorizontalPricing = function(props) {
|
|
10072
|
-
var _ref = _sliced_to_array((0,
|
|
10119
|
+
var _ref = _sliced_to_array((0, import_react86.useState)(null), 2), selectedCard = _ref[0], setSelectedCard = _ref[1];
|
|
10073
10120
|
var data = [
|
|
10074
10121
|
{
|
|
10075
10122
|
title: "basic",
|
|
@@ -10087,155 +10134,155 @@ var HorizontalPricing = function(props) {
|
|
|
10087
10134
|
cycle: "/mo"
|
|
10088
10135
|
}
|
|
10089
10136
|
];
|
|
10090
|
-
return /* @__PURE__ */
|
|
10137
|
+
return /* @__PURE__ */ import_react86.default.createElement("div", {
|
|
10091
10138
|
className: "z-10 w-full max-w-screen-sm"
|
|
10092
|
-
}, /* @__PURE__ */
|
|
10139
|
+
}, /* @__PURE__ */ import_react86.default.createElement("div", {
|
|
10093
10140
|
className: "max-w-2xl "
|
|
10094
|
-
}, /* @__PURE__ */
|
|
10141
|
+
}, /* @__PURE__ */ import_react86.default.createElement("div", {
|
|
10095
10142
|
className: "flex flex-row justify-between"
|
|
10096
|
-
}, /* @__PURE__ */
|
|
10143
|
+
}, /* @__PURE__ */ import_react86.default.createElement(HawaRadio, {
|
|
10097
10144
|
design: "tabs",
|
|
10098
10145
|
options: props.currencies,
|
|
10099
10146
|
defaultValue: props.currentCurrency
|
|
10100
|
-
}), /* @__PURE__ */
|
|
10147
|
+
}), /* @__PURE__ */ import_react86.default.createElement(HawaRadio, {
|
|
10101
10148
|
design: "tabs",
|
|
10102
10149
|
options: props.billingCycles,
|
|
10103
10150
|
defaultValue: props.currentCycle
|
|
10104
10151
|
})), data.map(function(d) {
|
|
10105
|
-
return /* @__PURE__ */
|
|
10152
|
+
return /* @__PURE__ */ import_react86.default.createElement("label", {
|
|
10106
10153
|
htmlFor: d.title,
|
|
10107
10154
|
className: "",
|
|
10108
10155
|
onClick: function() {
|
|
10109
10156
|
return setSelectedCard(d.title);
|
|
10110
10157
|
}
|
|
10111
|
-
}, /* @__PURE__ */
|
|
10158
|
+
}, /* @__PURE__ */ import_react86.default.createElement("input", {
|
|
10112
10159
|
type: "radio",
|
|
10113
10160
|
name: "radio",
|
|
10114
10161
|
id: d.title,
|
|
10115
10162
|
className: "peer appearance-none"
|
|
10116
|
-
}), /* @__PURE__ */
|
|
10163
|
+
}), /* @__PURE__ */ import_react86.default.createElement("div", {
|
|
10117
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")
|
|
10118
|
-
}, /* @__PURE__ */
|
|
10165
|
+
}, /* @__PURE__ */ import_react86.default.createElement("div", {
|
|
10119
10166
|
className: "peer flex items-center gap-4"
|
|
10120
|
-
}, /* @__PURE__ */
|
|
10167
|
+
}, /* @__PURE__ */ import_react86.default.createElement(CheckIcons, null), /* @__PURE__ */ import_react86.default.createElement(CardText, {
|
|
10121
10168
|
title: "Enterprise",
|
|
10122
10169
|
subtitle: "For startups and new businesses"
|
|
10123
|
-
})), /* @__PURE__ */
|
|
10170
|
+
})), /* @__PURE__ */ import_react86.default.createElement(CardPrice, {
|
|
10124
10171
|
amount: d.price,
|
|
10125
10172
|
cycle: d.cycle
|
|
10126
10173
|
})));
|
|
10127
10174
|
})));
|
|
10128
10175
|
};
|
|
10129
10176
|
var CheckIcons = function() {
|
|
10130
|
-
return /* @__PURE__ */
|
|
10177
|
+
return /* @__PURE__ */ import_react86.default.createElement(import_react86.default.Fragment, null, /* @__PURE__ */ import_react86.default.createElement("svg", {
|
|
10131
10178
|
fill: "none",
|
|
10132
10179
|
viewBox: "0 0 24 24",
|
|
10133
10180
|
strokeWidth: "1.5",
|
|
10134
10181
|
stroke: "currentColor",
|
|
10135
10182
|
className: "default h-8 w-8 text-neutral-500"
|
|
10136
|
-
}, /* @__PURE__ */
|
|
10183
|
+
}, /* @__PURE__ */ import_react86.default.createElement("path", {
|
|
10137
10184
|
strokeLinecap: "round",
|
|
10138
10185
|
strokeLinejoin: "round",
|
|
10139
10186
|
d: "M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
10140
|
-
})), /* @__PURE__ */
|
|
10187
|
+
})), /* @__PURE__ */ import_react86.default.createElement("svg", {
|
|
10141
10188
|
viewBox: "0 0 24 24",
|
|
10142
10189
|
fill: "currentColor",
|
|
10143
10190
|
className: "active hidden h-8 w-8 text-blue-500"
|
|
10144
|
-
}, /* @__PURE__ */
|
|
10191
|
+
}, /* @__PURE__ */ import_react86.default.createElement("path", {
|
|
10145
10192
|
fillRule: "evenodd",
|
|
10146
10193
|
clipRule: "evenodd",
|
|
10147
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"
|
|
10148
10195
|
})));
|
|
10149
10196
|
};
|
|
10150
10197
|
var CardText = function(props) {
|
|
10151
|
-
return /* @__PURE__ */
|
|
10198
|
+
return /* @__PURE__ */ import_react86.default.createElement("div", {
|
|
10152
10199
|
className: "peer flex flex-col items-start "
|
|
10153
|
-
}, /* @__PURE__ */
|
|
10200
|
+
}, /* @__PURE__ */ import_react86.default.createElement("h2", {
|
|
10154
10201
|
className: "font-medium text-neutral-700 dark:text-gray-100 sm:text-xl"
|
|
10155
|
-
}, props.title), /* @__PURE__ */
|
|
10202
|
+
}, props.title), /* @__PURE__ */ import_react86.default.createElement("p", {
|
|
10156
10203
|
className: "text-sm text-neutral-500 dark:text-gray-300"
|
|
10157
10204
|
}, props.subtitle, " "));
|
|
10158
10205
|
};
|
|
10159
10206
|
var CardPrice = function(props) {
|
|
10160
|
-
return /* @__PURE__ */
|
|
10207
|
+
return /* @__PURE__ */ import_react86.default.createElement("h2", {
|
|
10161
10208
|
className: "peer text-xl font-semibold text-neutral-900 dark:text-white sm:text-2xl"
|
|
10162
|
-
}, props.amount, /* @__PURE__ */
|
|
10209
|
+
}, props.amount, /* @__PURE__ */ import_react86.default.createElement("span", {
|
|
10163
10210
|
className: "text-base font-medium text-neutral-400"
|
|
10164
10211
|
}, props.cycle));
|
|
10165
10212
|
};
|
|
10166
10213
|
// src/blocks/Referral/ReferralAccount.tsx
|
|
10167
|
-
var
|
|
10214
|
+
var import_react87 = __toESM(require("react"));
|
|
10168
10215
|
var ReferralAccount = function(param) {
|
|
10169
10216
|
var referralLink = param.referralLink, referralCode = param.referralCode;
|
|
10170
|
-
return /* @__PURE__ */
|
|
10217
|
+
return /* @__PURE__ */ import_react87.default.createElement(Card, null, /* @__PURE__ */ import_react87.default.createElement(CardContent, {
|
|
10171
10218
|
headless: true
|
|
10172
|
-
}, /* @__PURE__ */
|
|
10219
|
+
}, /* @__PURE__ */ import_react87.default.createElement("div", {
|
|
10173
10220
|
className: "my-2 mt-0"
|
|
10174
|
-
}, /* @__PURE__ */
|
|
10221
|
+
}, /* @__PURE__ */ import_react87.default.createElement("div", {
|
|
10175
10222
|
className: "mb-1"
|
|
10176
|
-
}, "Referral Code"), /* @__PURE__ */
|
|
10223
|
+
}, "Referral Code"), /* @__PURE__ */ import_react87.default.createElement("div", {
|
|
10177
10224
|
className: "flex flex-row items-center justify-between rounded border bg-background"
|
|
10178
|
-
}, /* @__PURE__ */
|
|
10225
|
+
}, /* @__PURE__ */ import_react87.default.createElement("span", {
|
|
10179
10226
|
className: "ml-3 font-bold"
|
|
10180
|
-
}, referralCode), /* @__PURE__ */
|
|
10227
|
+
}, referralCode), /* @__PURE__ */ import_react87.default.createElement(Button, {
|
|
10181
10228
|
onClick: function() {
|
|
10182
10229
|
return navigator.clipboard.writeText(referralCode);
|
|
10183
10230
|
}
|
|
10184
|
-
}, /* @__PURE__ */
|
|
10231
|
+
}, /* @__PURE__ */ import_react87.default.createElement("span", {
|
|
10185
10232
|
className: "bg-red flex items-center justify-center"
|
|
10186
|
-
}, /* @__PURE__ */
|
|
10233
|
+
}, /* @__PURE__ */ import_react87.default.createElement("svg", {
|
|
10187
10234
|
stroke: "currentColor",
|
|
10188
10235
|
fill: "currentColor",
|
|
10189
10236
|
strokeWidth: "0",
|
|
10190
10237
|
viewBox: "0 0 512 512",
|
|
10191
10238
|
height: "1em",
|
|
10192
10239
|
width: "1em"
|
|
10193
|
-
}, /* @__PURE__ */
|
|
10240
|
+
}, /* @__PURE__ */ import_react87.default.createElement("path", {
|
|
10194
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"
|
|
10195
|
-
})), " ")))), /* @__PURE__ */
|
|
10242
|
+
})), " ")))), /* @__PURE__ */ import_react87.default.createElement("div", {
|
|
10196
10243
|
className: "my-2 mt-0"
|
|
10197
|
-
}, /* @__PURE__ */
|
|
10244
|
+
}, /* @__PURE__ */ import_react87.default.createElement("div", {
|
|
10198
10245
|
className: "mb-1"
|
|
10199
|
-
}, "Referral Link"), /* @__PURE__ */
|
|
10246
|
+
}, "Referral Link"), /* @__PURE__ */ import_react87.default.createElement("div", {
|
|
10200
10247
|
className: "flex flex-row items-center justify-between rounded border bg-background"
|
|
10201
|
-
}, /* @__PURE__ */
|
|
10248
|
+
}, /* @__PURE__ */ import_react87.default.createElement("span", {
|
|
10202
10249
|
className: "ml-3 font-bold"
|
|
10203
|
-
}, referralLink), /* @__PURE__ */
|
|
10250
|
+
}, referralLink), /* @__PURE__ */ import_react87.default.createElement(Button, {
|
|
10204
10251
|
onClick: function() {
|
|
10205
10252
|
return navigator.clipboard.writeText(referralLink);
|
|
10206
10253
|
}
|
|
10207
|
-
}, /* @__PURE__ */
|
|
10254
|
+
}, /* @__PURE__ */ import_react87.default.createElement("span", {
|
|
10208
10255
|
className: "bg-red flex items-center justify-center"
|
|
10209
|
-
}, /* @__PURE__ */
|
|
10256
|
+
}, /* @__PURE__ */ import_react87.default.createElement("svg", {
|
|
10210
10257
|
stroke: "currentColor",
|
|
10211
10258
|
fill: "currentColor",
|
|
10212
10259
|
strokeWidth: "0",
|
|
10213
10260
|
viewBox: "0 0 512 512",
|
|
10214
10261
|
height: "1em",
|
|
10215
10262
|
width: "1em"
|
|
10216
|
-
}, /* @__PURE__ */
|
|
10263
|
+
}, /* @__PURE__ */ import_react87.default.createElement("path", {
|
|
10217
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"
|
|
10218
10265
|
})), " "))))));
|
|
10219
10266
|
};
|
|
10220
10267
|
// src/blocks/Referral/ReferralSettlement.tsx
|
|
10221
|
-
var
|
|
10268
|
+
var import_react88 = __toESM(require("react"));
|
|
10222
10269
|
var import_react_hook_form9 = require("react-hook-form");
|
|
10223
10270
|
var ReferralSettlement = function(param) {
|
|
10224
10271
|
var referralLink = param.referralLink, referralCode = param.referralCode, withdrawError = param.withdrawError;
|
|
10225
10272
|
var methods = (0, import_react_hook_form9.useForm)();
|
|
10226
10273
|
var errors = methods.formState.errors, handleSubmit = methods.handleSubmit, control = methods.control;
|
|
10227
|
-
return /* @__PURE__ */
|
|
10274
|
+
return /* @__PURE__ */ import_react88.default.createElement(Card, null, /* @__PURE__ */ import_react88.default.createElement(CardContent, {
|
|
10228
10275
|
headless: true
|
|
10229
|
-
}, /* @__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, {
|
|
10230
10277
|
label: "IBAN"
|
|
10231
|
-
}), /* @__PURE__ */
|
|
10278
|
+
}), /* @__PURE__ */ import_react88.default.createElement(HawaTextField, {
|
|
10232
10279
|
label: "Holder Name"
|
|
10233
|
-
}), /* @__PURE__ */
|
|
10280
|
+
}), /* @__PURE__ */ import_react88.default.createElement(import_react_hook_form9.Controller, {
|
|
10234
10281
|
control: control,
|
|
10235
10282
|
name: "bank",
|
|
10236
10283
|
render: function(param) {
|
|
10237
10284
|
var field = param.field;
|
|
10238
|
-
return /* @__PURE__ */
|
|
10285
|
+
return /* @__PURE__ */ import_react88.default.createElement(HawaSelect, _object_spread_props(_object_spread({
|
|
10239
10286
|
label: "Bank",
|
|
10240
10287
|
isCreatable: false,
|
|
10241
10288
|
isMulti: false,
|
|
@@ -10264,47 +10311,47 @@ var ReferralSettlement = function(param) {
|
|
|
10264
10311
|
}
|
|
10265
10312
|
}));
|
|
10266
10313
|
}
|
|
10267
|
-
}))), /* @__PURE__ */
|
|
10314
|
+
}))), /* @__PURE__ */ import_react88.default.createElement("div", null, /* @__PURE__ */ import_react88.default.createElement(Button, {
|
|
10268
10315
|
className: "mt-6 w-full"
|
|
10269
|
-
}, "Add Bank Account")), withdrawError && /* @__PURE__ */
|
|
10316
|
+
}, "Add Bank Account")), withdrawError && /* @__PURE__ */ import_react88.default.createElement("div", null, /* @__PURE__ */ import_react88.default.createElement(HawaAlert, {
|
|
10270
10317
|
text: "Sorry can't withdraw the money at the moment. Please try again in 2022/11/20",
|
|
10271
10318
|
severity: "warning"
|
|
10272
|
-
})), /* @__PURE__ */
|
|
10319
|
+
})), /* @__PURE__ */ import_react88.default.createElement("div", {
|
|
10273
10320
|
className: "mt-3"
|
|
10274
|
-
}, /* @__PURE__ */
|
|
10321
|
+
}, /* @__PURE__ */ import_react88.default.createElement("div", {
|
|
10275
10322
|
className: "mb-1"
|
|
10276
|
-
}, "Settlement Accounts"), /* @__PURE__ */
|
|
10323
|
+
}, "Settlement Accounts"), /* @__PURE__ */ import_react88.default.createElement("div", {
|
|
10277
10324
|
className: "rounded"
|
|
10278
|
-
}, /* @__PURE__ */
|
|
10325
|
+
}, /* @__PURE__ */ import_react88.default.createElement(SettlementAccountCard, {
|
|
10279
10326
|
bank: "Al Inma Bank",
|
|
10280
10327
|
iban: "SA10228094028098329119",
|
|
10281
10328
|
accountHolder: "Zakher Masri",
|
|
10282
10329
|
default: true
|
|
10283
|
-
}), /* @__PURE__ */
|
|
10330
|
+
}), /* @__PURE__ */ import_react88.default.createElement(SettlementAccountCard, {
|
|
10284
10331
|
bank: "Al Rajihi Bank",
|
|
10285
10332
|
iban: "SA10228094028098329119",
|
|
10286
10333
|
accountHolder: "Zakher Masri"
|
|
10287
|
-
}), /* @__PURE__ */
|
|
10334
|
+
}), /* @__PURE__ */ import_react88.default.createElement(SettlementAccountCard, {
|
|
10288
10335
|
bank: "Al Inma Bank",
|
|
10289
10336
|
iban: "SA10228094028098329119",
|
|
10290
10337
|
accountHolder: "Zakher Masri"
|
|
10291
10338
|
})))));
|
|
10292
10339
|
};
|
|
10293
10340
|
var SettlementAccountCard = function(props) {
|
|
10294
|
-
return /* @__PURE__ */
|
|
10341
|
+
return /* @__PURE__ */ import_react88.default.createElement("div", {
|
|
10295
10342
|
className: "mb-3 flex flex-row items-center justify-between rounded border bg-background p-3"
|
|
10296
|
-
}, /* @__PURE__ */
|
|
10343
|
+
}, /* @__PURE__ */ import_react88.default.createElement("div", {
|
|
10297
10344
|
className: "flex flex-col justify-between"
|
|
10298
|
-
}, /* @__PURE__ */
|
|
10345
|
+
}, /* @__PURE__ */ import_react88.default.createElement("div", {
|
|
10299
10346
|
className: "text-xs"
|
|
10300
|
-
}, props.bank), /* @__PURE__ */
|
|
10347
|
+
}, props.bank), /* @__PURE__ */ import_react88.default.createElement("div", null, props.accountHolder), /* @__PURE__ */ import_react88.default.createElement("div", {
|
|
10301
10348
|
className: "text-xs"
|
|
10302
|
-
}, props.iban)), /* @__PURE__ */
|
|
10349
|
+
}, props.iban)), /* @__PURE__ */ import_react88.default.createElement("div", {
|
|
10303
10350
|
className: "flex flex-row items-center justify-center gap-2"
|
|
10304
|
-
}, props.default && /* @__PURE__ */
|
|
10351
|
+
}, props.default && /* @__PURE__ */ import_react88.default.createElement(HawaChip, {
|
|
10305
10352
|
label: "Default",
|
|
10306
10353
|
size: "small"
|
|
10307
|
-
}), /* @__PURE__ */
|
|
10354
|
+
}), /* @__PURE__ */ import_react88.default.createElement(HawaMenu, {
|
|
10308
10355
|
size: "small",
|
|
10309
10356
|
menuItems: [
|
|
10310
10357
|
[
|
|
@@ -10320,10 +10367,10 @@ var SettlementAccountCard = function(props) {
|
|
|
10320
10367
|
}
|
|
10321
10368
|
]
|
|
10322
10369
|
]
|
|
10323
|
-
}, /* @__PURE__ */
|
|
10370
|
+
}, /* @__PURE__ */ import_react88.default.createElement(Button, {
|
|
10324
10371
|
variant: "outline",
|
|
10325
10372
|
size: "icon"
|
|
10326
|
-
}, /* @__PURE__ */
|
|
10373
|
+
}, /* @__PURE__ */ import_react88.default.createElement("svg", {
|
|
10327
10374
|
"aria-label": "Vertical Three Dots Menu Icon",
|
|
10328
10375
|
className: "rotate-90",
|
|
10329
10376
|
stroke: "currentColor",
|
|
@@ -10332,126 +10379,126 @@ var SettlementAccountCard = function(props) {
|
|
|
10332
10379
|
viewBox: "0 0 16 16",
|
|
10333
10380
|
height: "1em",
|
|
10334
10381
|
width: "1em"
|
|
10335
|
-
}, /* @__PURE__ */
|
|
10382
|
+
}, /* @__PURE__ */ import_react88.default.createElement("path", {
|
|
10336
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"
|
|
10337
10384
|
}))))));
|
|
10338
10385
|
};
|
|
10339
10386
|
// src/blocks/Referral/ReferralStats.tsx
|
|
10340
|
-
var
|
|
10387
|
+
var import_react89 = __toESM(require("react"));
|
|
10341
10388
|
var ReferralStats = function(param) {
|
|
10342
10389
|
var referralLink = param.referralLink, referralCode = param.referralCode, withdrawError = param.withdrawError;
|
|
10343
|
-
return /* @__PURE__ */
|
|
10390
|
+
return /* @__PURE__ */ import_react89.default.createElement(Card, null, /* @__PURE__ */ import_react89.default.createElement(CardContent, {
|
|
10344
10391
|
headless: true
|
|
10345
|
-
}, /* @__PURE__ */
|
|
10392
|
+
}, /* @__PURE__ */ import_react89.default.createElement("div", {
|
|
10346
10393
|
className: "mb-1"
|
|
10347
|
-
}, "Stats"), /* @__PURE__ */
|
|
10394
|
+
}, "Stats"), /* @__PURE__ */ import_react89.default.createElement("div", {
|
|
10348
10395
|
className: "justi flex flex-row gap-1"
|
|
10349
|
-
}, /* @__PURE__ */
|
|
10396
|
+
}, /* @__PURE__ */ import_react89.default.createElement(NumberCard, {
|
|
10350
10397
|
title: "Clicks",
|
|
10351
10398
|
number: 22
|
|
10352
|
-
}), /* @__PURE__ */
|
|
10399
|
+
}), /* @__PURE__ */ import_react89.default.createElement(NumberCard, {
|
|
10353
10400
|
title: "Sign-ups",
|
|
10354
10401
|
number: 32
|
|
10355
|
-
}), /* @__PURE__ */
|
|
10402
|
+
}), /* @__PURE__ */ import_react89.default.createElement(NumberCard, {
|
|
10356
10403
|
title: "Commission",
|
|
10357
10404
|
number: "213.22 SAR"
|
|
10358
|
-
})), /* @__PURE__ */
|
|
10405
|
+
})), /* @__PURE__ */ import_react89.default.createElement(Button, {
|
|
10359
10406
|
className: "mt-6 w-full"
|
|
10360
|
-
}, "Withdraw Money"), withdrawError && /* @__PURE__ */
|
|
10407
|
+
}, "Withdraw Money"), withdrawError && /* @__PURE__ */ import_react89.default.createElement("div", null, /* @__PURE__ */ import_react89.default.createElement(HawaAlert, {
|
|
10361
10408
|
text: "Sorry can't withdraw the money at the moment. Please try again in 2022/11/20",
|
|
10362
10409
|
severity: "warning"
|
|
10363
|
-
})), /* @__PURE__ */
|
|
10410
|
+
})), /* @__PURE__ */ import_react89.default.createElement("div", {
|
|
10364
10411
|
className: "mt-3"
|
|
10365
|
-
}, /* @__PURE__ */
|
|
10412
|
+
}, /* @__PURE__ */ import_react89.default.createElement("div", {
|
|
10366
10413
|
className: "mb-1"
|
|
10367
|
-
}, "Sign ups"), /* @__PURE__ */
|
|
10414
|
+
}, "Sign ups"), /* @__PURE__ */ import_react89.default.createElement("div", {
|
|
10368
10415
|
className: "rounded"
|
|
10369
|
-
}, /* @__PURE__ */
|
|
10416
|
+
}, /* @__PURE__ */ import_react89.default.createElement(ReferralSignUpCard, {
|
|
10370
10417
|
date: "2020/10/11 @ 9:45 pm",
|
|
10371
10418
|
email: "zakher@sikka.io",
|
|
10372
10419
|
amount: "3.4 SAR / Month"
|
|
10373
|
-
}), /* @__PURE__ */
|
|
10420
|
+
}), /* @__PURE__ */ import_react89.default.createElement(ReferralSignUpCard, {
|
|
10374
10421
|
date: "2022/10/11 @ 9:45 pm",
|
|
10375
10422
|
email: "zakher@sikka.io",
|
|
10376
10423
|
amount: "3.4 SAR / Month"
|
|
10377
|
-
}), /* @__PURE__ */
|
|
10424
|
+
}), /* @__PURE__ */ import_react89.default.createElement(ReferralSignUpCard, {
|
|
10378
10425
|
date: "2022/10/11 @ 9:45 pm",
|
|
10379
10426
|
email: "zakher@sikka.io",
|
|
10380
10427
|
amount: "3.4 SAR / Month"
|
|
10381
|
-
}), /* @__PURE__ */
|
|
10428
|
+
}), /* @__PURE__ */ import_react89.default.createElement(ReferralSignUpCard, {
|
|
10382
10429
|
date: "2022/10/11 @ 9:45 pm",
|
|
10383
10430
|
email: "zakher@sikka.io",
|
|
10384
10431
|
amount: "3.4 SAR / Month"
|
|
10385
|
-
}), /* @__PURE__ */
|
|
10432
|
+
}), /* @__PURE__ */ import_react89.default.createElement(ReferralSignUpCard, {
|
|
10386
10433
|
date: "2022/10/11 @ 9:45 pm",
|
|
10387
10434
|
email: "zakher@sikka.io",
|
|
10388
10435
|
amount: "3.4 SAR / Month"
|
|
10389
10436
|
})))));
|
|
10390
10437
|
};
|
|
10391
10438
|
var NumberCard = function(props) {
|
|
10392
|
-
return /* @__PURE__ */
|
|
10439
|
+
return /* @__PURE__ */ import_react89.default.createElement("div", {
|
|
10393
10440
|
className: "w-full rounded border bg-background p-2"
|
|
10394
|
-
}, /* @__PURE__ */
|
|
10441
|
+
}, /* @__PURE__ */ import_react89.default.createElement("div", {
|
|
10395
10442
|
className: "text-sm"
|
|
10396
|
-
}, props.title), /* @__PURE__ */
|
|
10443
|
+
}, props.title), /* @__PURE__ */ import_react89.default.createElement("div", {
|
|
10397
10444
|
className: "font-bold"
|
|
10398
10445
|
}, props.number));
|
|
10399
10446
|
};
|
|
10400
10447
|
var ReferralSignUpCard = function(props) {
|
|
10401
|
-
return /* @__PURE__ */
|
|
10448
|
+
return /* @__PURE__ */ import_react89.default.createElement("div", {
|
|
10402
10449
|
className: "mb-3 rounded border-b bg-background p-2"
|
|
10403
|
-
}, /* @__PURE__ */
|
|
10450
|
+
}, /* @__PURE__ */ import_react89.default.createElement("div", {
|
|
10404
10451
|
className: "text-xs"
|
|
10405
|
-
}, props.date), /* @__PURE__ */
|
|
10452
|
+
}, props.date), /* @__PURE__ */ import_react89.default.createElement("div", {
|
|
10406
10453
|
className: "flex flex-row justify-between"
|
|
10407
|
-
}, /* @__PURE__ */
|
|
10454
|
+
}, /* @__PURE__ */ import_react89.default.createElement("div", null, props.email), /* @__PURE__ */ import_react89.default.createElement("div", null, props.amount)));
|
|
10408
10455
|
};
|
|
10409
10456
|
// src/blocks/Misc/NotFound.tsx
|
|
10410
|
-
var
|
|
10457
|
+
var import_react90 = __toESM(require("react"));
|
|
10411
10458
|
var NotFound = function(param) {
|
|
10412
10459
|
var _param_variant = param.variant, variant = _param_variant === void 0 ? "contained" : _param_variant, texts = param.texts;
|
|
10413
10460
|
var _texts, _texts1, _texts2;
|
|
10414
10461
|
var _texts_pageNotFound, _texts_ifLost, _texts_home;
|
|
10415
|
-
return /* @__PURE__ */
|
|
10462
|
+
return /* @__PURE__ */ import_react90.default.createElement(Card, null, /* @__PURE__ */ import_react90.default.createElement(CardContent, {
|
|
10416
10463
|
headless: true
|
|
10417
|
-
}, /* @__PURE__ */
|
|
10464
|
+
}, /* @__PURE__ */ import_react90.default.createElement("div", {
|
|
10418
10465
|
className: "flex flex-col items-center dark:text-white"
|
|
10419
|
-
}, /* @__PURE__ */
|
|
10466
|
+
}, /* @__PURE__ */ import_react90.default.createElement("div", {
|
|
10420
10467
|
className: "text-center text-6xl font-bold "
|
|
10421
|
-
}, "404"), /* @__PURE__ */
|
|
10468
|
+
}, "404"), /* @__PURE__ */ import_react90.default.createElement("div", {
|
|
10422
10469
|
className: "m-2 text-center text-xl font-bold "
|
|
10423
|
-
}, (_texts_pageNotFound = (_texts = texts) === null || _texts === void 0 ? void 0 : _texts.pageNotFound) !== null && _texts_pageNotFound !== void 0 ? _texts_pageNotFound : "Page Not Found"), /* @__PURE__ */
|
|
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", {
|
|
10424
10471
|
className: "mb-4 text-center"
|
|
10425
|
-
}, (_texts_ifLost = (_texts1 = texts) === null || _texts1 === void 0 ? void 0 : _texts1.ifLost) !== null && _texts_ifLost !== void 0 ? _texts_ifLost : /* @__PURE__ */
|
|
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", {
|
|
10426
10473
|
className: "clickable-link"
|
|
10427
|
-
}, "help@sikka.io"))), /* @__PURE__ */
|
|
10474
|
+
}, "help@sikka.io"))), /* @__PURE__ */ import_react90.default.createElement(Button, {
|
|
10428
10475
|
className: "w-full"
|
|
10429
10476
|
}, (_texts_home = (_texts2 = texts) === null || _texts2 === void 0 ? void 0 : _texts2.home) !== null && _texts_home !== void 0 ? _texts_home : "Home"))));
|
|
10430
10477
|
};
|
|
10431
10478
|
// src/blocks/Misc/EmptyState.tsx
|
|
10432
|
-
var
|
|
10479
|
+
var import_react91 = __toESM(require("react"));
|
|
10433
10480
|
var EmptyState = function(param) {
|
|
10434
10481
|
var _param_variant = param.variant, variant = _param_variant === void 0 ? "contained" : _param_variant, texts = param.texts, onActionClick = param.onActionClick;
|
|
10435
10482
|
var _texts, _texts1;
|
|
10436
10483
|
var _texts_youreCaughtUp, _texts_actionText;
|
|
10437
|
-
return /* @__PURE__ */
|
|
10484
|
+
return /* @__PURE__ */ import_react91.default.createElement(Card, null, /* @__PURE__ */ import_react91.default.createElement(CardContent, {
|
|
10438
10485
|
headless: true
|
|
10439
|
-
}, /* @__PURE__ */
|
|
10486
|
+
}, /* @__PURE__ */ import_react91.default.createElement("div", {
|
|
10440
10487
|
className: "flex flex-col items-center justify-center text-center "
|
|
10441
|
-
}, /* @__PURE__ */
|
|
10488
|
+
}, /* @__PURE__ */ import_react91.default.createElement("div", {
|
|
10442
10489
|
className: "flex h-10 w-10 flex-col items-center justify-center rounded-3xl bg-primary text-6xl font-bold text-primary-foreground"
|
|
10443
|
-
}, /* @__PURE__ */
|
|
10490
|
+
}, /* @__PURE__ */ import_react91.default.createElement("svg", {
|
|
10444
10491
|
stroke: "currentColor",
|
|
10445
10492
|
fill: "currentColor",
|
|
10446
10493
|
strokeWidth: "0",
|
|
10447
10494
|
viewBox: "0 0 512 512",
|
|
10448
10495
|
height: "0.35em",
|
|
10449
10496
|
width: "0.35em"
|
|
10450
|
-
}, /* @__PURE__ */
|
|
10497
|
+
}, /* @__PURE__ */ import_react91.default.createElement("path", {
|
|
10451
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"
|
|
10452
|
-
}))), /* @__PURE__ */
|
|
10499
|
+
}))), /* @__PURE__ */ import_react91.default.createElement("div", {
|
|
10453
10500
|
className: "m-2 text-xl font-bold"
|
|
10454
|
-
}, (_texts_youreCaughtUp = (_texts = texts) === null || _texts === void 0 ? void 0 : _texts.youreCaughtUp) !== null && _texts_youreCaughtUp !== void 0 ? _texts_youreCaughtUp : "You're all caught up"))), /* @__PURE__ */
|
|
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, {
|
|
10455
10502
|
className: "w-full",
|
|
10456
10503
|
onClick: function() {
|
|
10457
10504
|
return onActionClick();
|
|
@@ -10459,103 +10506,104 @@ var EmptyState = function(param) {
|
|
|
10459
10506
|
}, (_texts_actionText = (_texts1 = texts) === null || _texts1 === void 0 ? void 0 : _texts1.actionText) !== null && _texts_actionText !== void 0 ? _texts_actionText : "Go Home")));
|
|
10460
10507
|
};
|
|
10461
10508
|
// src/blocks/Misc/Testimonial.tsx
|
|
10462
|
-
var
|
|
10509
|
+
var import_react92 = __toESM(require("react"));
|
|
10463
10510
|
var Testimonial = function(props) {
|
|
10464
|
-
return /* @__PURE__ */
|
|
10511
|
+
return /* @__PURE__ */ import_react92.default.createElement(Card, null, /* @__PURE__ */ import_react92.default.createElement(CardContent, {
|
|
10465
10512
|
headless: true
|
|
10466
|
-
}, /* @__PURE__ */
|
|
10513
|
+
}, /* @__PURE__ */ import_react92.default.createElement("div", null, /* @__PURE__ */ import_react92.default.createElement("p", {
|
|
10467
10514
|
className: "mb-4 max-w-sm"
|
|
10468
|
-
}, "The team at Sikka Software is simply amazing. The tech is easy to follow, easy to work with, and infinitely flexible. The solution opportunities created by Tines are endless.")), /* @__PURE__ */
|
|
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", {
|
|
10469
10516
|
className: "flex flex-row gap-4"
|
|
10470
|
-
}, /* @__PURE__ */
|
|
10517
|
+
}, /* @__PURE__ */ import_react92.default.createElement("svg", {
|
|
10471
10518
|
width: "48",
|
|
10472
10519
|
height: "48",
|
|
10473
10520
|
viewBox: "0 0 48 48",
|
|
10474
10521
|
fill: "none"
|
|
10475
|
-
}, /* @__PURE__ */
|
|
10522
|
+
}, /* @__PURE__ */ import_react92.default.createElement("rect", {
|
|
10476
10523
|
width: "48",
|
|
10477
10524
|
height: "48",
|
|
10478
10525
|
rx: "24",
|
|
10479
10526
|
fill: "#45BE8B"
|
|
10480
|
-
}), /* @__PURE__ */
|
|
10527
|
+
}), /* @__PURE__ */ import_react92.default.createElement("path", {
|
|
10481
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",
|
|
10482
10529
|
fill: "#FFFFFF"
|
|
10483
|
-
}), /* @__PURE__ */
|
|
10530
|
+
}), /* @__PURE__ */ import_react92.default.createElement("path", {
|
|
10484
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",
|
|
10485
10532
|
fill: "#FFFFFF"
|
|
10486
|
-
})), /* @__PURE__ */
|
|
10533
|
+
})), /* @__PURE__ */ import_react92.default.createElement("span", {
|
|
10487
10534
|
className: "border border-l "
|
|
10488
|
-
}), " ", /* @__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")))));
|
|
10489
10536
|
};
|
|
10490
10537
|
// src/blocks/Misc/LeadGenerator.tsx
|
|
10491
|
-
var
|
|
10538
|
+
var import_react93 = __toESM(require("react"));
|
|
10492
10539
|
var LeadGenerator = function(param) {
|
|
10493
10540
|
var _param_variant = param.variant, variant = _param_variant === void 0 ? "contained" : _param_variant, texts = param.texts, handleNewsletterSub = param.handleNewsletterSub;
|
|
10494
10541
|
var _texts, _texts1, _texts2;
|
|
10495
10542
|
var _texts_submit;
|
|
10496
|
-
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", {
|
|
10497
10544
|
className: "flex flex-row gap-2",
|
|
10498
10545
|
onSubmit: function(e) {
|
|
10499
10546
|
e.preventDefault();
|
|
10500
10547
|
handleNewsletterSub(e.target[0].value);
|
|
10501
10548
|
}
|
|
10502
|
-
}, /* @__PURE__ */
|
|
10549
|
+
}, /* @__PURE__ */ import_react93.default.createElement(Input, {
|
|
10503
10550
|
type: "email",
|
|
10504
10551
|
name: "email",
|
|
10505
10552
|
placeholder: "example@sikka.io"
|
|
10506
|
-
}), /* @__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"))));
|
|
10507
10554
|
};
|
|
10508
10555
|
// src/blocks/Misc/Announcement.tsx
|
|
10509
|
-
var
|
|
10556
|
+
var import_react94 = __toESM(require("react"));
|
|
10510
10557
|
var Announcement = function(_param) {
|
|
10511
10558
|
var _param_variant = _param.variant, variant = _param_variant === void 0 ? "contained" : _param_variant, onActionClick = _param.onActionClick, props = _object_without_properties(_param, [
|
|
10512
10559
|
"variant",
|
|
10513
10560
|
"onActionClick"
|
|
10514
10561
|
]);
|
|
10515
|
-
return /* @__PURE__ */
|
|
10562
|
+
return /* @__PURE__ */ import_react94.default.createElement(Card, null, /* @__PURE__ */ import_react94.default.createElement(CardContent, {
|
|
10516
10563
|
headless: true,
|
|
10517
10564
|
className: "flex flex-row items-center justify-between"
|
|
10518
|
-
}, /* @__PURE__ */
|
|
10565
|
+
}, /* @__PURE__ */ import_react94.default.createElement("div", {
|
|
10519
10566
|
className: "flex flex-col items-start justify-center "
|
|
10520
|
-
}, /* @__PURE__ */
|
|
10567
|
+
}, /* @__PURE__ */ import_react94.default.createElement("span", {
|
|
10521
10568
|
className: "text-lg font-bold"
|
|
10522
|
-
}, props.title), /* @__PURE__ */
|
|
10569
|
+
}, props.title), /* @__PURE__ */ import_react94.default.createElement("span", {
|
|
10523
10570
|
className: "text-sm"
|
|
10524
|
-
}, props.subtitle)), /* @__PURE__ */
|
|
10571
|
+
}, props.subtitle)), /* @__PURE__ */ import_react94.default.createElement(Button, {
|
|
10525
10572
|
onClick: function() {
|
|
10526
10573
|
return onActionClick();
|
|
10527
10574
|
}
|
|
10528
10575
|
}, props.actionText)));
|
|
10529
10576
|
};
|
|
10530
10577
|
// src/blocks/Misc/NoPermission.tsx
|
|
10531
|
-
var
|
|
10578
|
+
var import_react95 = __toESM(require("react"));
|
|
10532
10579
|
var NoPermission = function(param) {
|
|
10533
10580
|
var _param_variant = param.variant, variant = _param_variant === void 0 ? "contained" : _param_variant, texts = param.texts;
|
|
10534
10581
|
var _texts, _texts1;
|
|
10535
10582
|
var _texts_title, _texts_subtitle;
|
|
10536
|
-
return /* @__PURE__ */
|
|
10583
|
+
return /* @__PURE__ */ import_react95.default.createElement(Card, null, /* @__PURE__ */ import_react95.default.createElement(CardContent, {
|
|
10537
10584
|
headless: true
|
|
10538
|
-
}, /* @__PURE__ */
|
|
10585
|
+
}, /* @__PURE__ */ import_react95.default.createElement("div", {
|
|
10539
10586
|
className: "flex flex-col items-center justify-center text-center"
|
|
10540
|
-
}, /* @__PURE__ */
|
|
10587
|
+
}, /* @__PURE__ */ import_react95.default.createElement("div", {
|
|
10541
10588
|
className: "flex h-10 w-10 flex-col items-center justify-center rounded-3xl bg-primary text-6xl font-bold text-primary-foreground"
|
|
10542
|
-
}, /* @__PURE__ */
|
|
10589
|
+
}, /* @__PURE__ */ import_react95.default.createElement("svg", {
|
|
10543
10590
|
stroke: "currentColor",
|
|
10544
10591
|
fill: "currentColor",
|
|
10545
10592
|
strokeWidth: "0",
|
|
10546
10593
|
viewBox: "0 0 448 512",
|
|
10547
10594
|
height: "0.35em",
|
|
10548
10595
|
width: "0.35em"
|
|
10549
|
-
}, /* @__PURE__ */
|
|
10596
|
+
}, /* @__PURE__ */ import_react95.default.createElement("path", {
|
|
10550
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"
|
|
10551
|
-
})), " "), /* @__PURE__ */
|
|
10598
|
+
})), " "), /* @__PURE__ */ import_react95.default.createElement("div", {
|
|
10552
10599
|
className: "m-2 text-xl font-bold"
|
|
10553
|
-
}, (_texts_title = (_texts = texts) === null || _texts === void 0 ? void 0 : _texts.title) !== null && _texts_title !== void 0 ? _texts_title : "You don't have permission"), /* @__PURE__ */
|
|
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"))));
|
|
10554
10601
|
};
|
|
10555
10602
|
// src/hooks/useHover.ts
|
|
10556
|
-
var
|
|
10603
|
+
var import_react96 = require("react");
|
|
10557
10604
|
// Annotate the CommonJS export names for ESM import in node:
|
|
10558
10605
|
0 && (module.exports = {
|
|
10606
|
+
ActionCard: ActionCard,
|
|
10559
10607
|
Announcement: Announcement,
|
|
10560
10608
|
AppLanding: AppLanding,
|
|
10561
10609
|
AppLayout: AppLayout,
|