@geowiki/design-system 0.16.19 → 0.16.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +127 -58
- package/dist/index.mjs +364 -295
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -341,7 +341,11 @@ declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivE
|
|
|
341
341
|
|
|
342
342
|
declare const Slider: React$1.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
343
343
|
|
|
344
|
-
|
|
344
|
+
interface SwitchProps extends React$1.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root> {
|
|
345
|
+
labels?: string[];
|
|
346
|
+
activeLabel?: string;
|
|
347
|
+
}
|
|
348
|
+
declare const Switch: React$1.ForwardRefExoticComponent<SwitchProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
345
349
|
|
|
346
350
|
declare const Table: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableElement> & React$1.RefAttributes<HTMLTableElement>>;
|
|
347
351
|
declare const TableHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -1081,6 +1085,7 @@ interface AppItemProps {
|
|
|
1081
1085
|
description?: string;
|
|
1082
1086
|
logoUrl: string;
|
|
1083
1087
|
locationType: string;
|
|
1088
|
+
activeAppText?: string;
|
|
1084
1089
|
dataDownloadLinks?: string[];
|
|
1085
1090
|
externalWebsiteLink?: string;
|
|
1086
1091
|
totalImages?: number;
|
|
@@ -1094,6 +1099,9 @@ interface AppItemListProps {
|
|
|
1094
1099
|
id: string;
|
|
1095
1100
|
name: string;
|
|
1096
1101
|
title: string;
|
|
1102
|
+
toggleLabels?: string[];
|
|
1103
|
+
currentToggleLabel?: string;
|
|
1104
|
+
onToggleChange?: (checked: boolean) => void;
|
|
1097
1105
|
allItems: {
|
|
1098
1106
|
id: string;
|
|
1099
1107
|
name: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -341,7 +341,11 @@ declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivE
|
|
|
341
341
|
|
|
342
342
|
declare const Slider: React$1.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
343
343
|
|
|
344
|
-
|
|
344
|
+
interface SwitchProps extends React$1.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root> {
|
|
345
|
+
labels?: string[];
|
|
346
|
+
activeLabel?: string;
|
|
347
|
+
}
|
|
348
|
+
declare const Switch: React$1.ForwardRefExoticComponent<SwitchProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
345
349
|
|
|
346
350
|
declare const Table: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableElement> & React$1.RefAttributes<HTMLTableElement>>;
|
|
347
351
|
declare const TableHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLTableSectionElement> & React$1.RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -1081,6 +1085,7 @@ interface AppItemProps {
|
|
|
1081
1085
|
description?: string;
|
|
1082
1086
|
logoUrl: string;
|
|
1083
1087
|
locationType: string;
|
|
1088
|
+
activeAppText?: string;
|
|
1084
1089
|
dataDownloadLinks?: string[];
|
|
1085
1090
|
externalWebsiteLink?: string;
|
|
1086
1091
|
totalImages?: number;
|
|
@@ -1094,6 +1099,9 @@ interface AppItemListProps {
|
|
|
1094
1099
|
id: string;
|
|
1095
1100
|
name: string;
|
|
1096
1101
|
title: string;
|
|
1102
|
+
toggleLabels?: string[];
|
|
1103
|
+
currentToggleLabel?: string;
|
|
1104
|
+
onToggleChange?: (checked: boolean) => void;
|
|
1097
1105
|
allItems: {
|
|
1098
1106
|
id: string;
|
|
1099
1107
|
name: string;
|
package/dist/index.js
CHANGED
|
@@ -2481,24 +2481,31 @@ var React26 = __toESM(require("react"));
|
|
|
2481
2481
|
var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"));
|
|
2482
2482
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2483
2483
|
var Switch = React26.forwardRef((_a, ref) => {
|
|
2484
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2485
|
-
return /* @__PURE__ */ (0, import_jsx_runtime29.
|
|
2484
|
+
var _b = _a, { className, activeLabel, labels } = _b, props = __objRest(_b, ["className", "activeLabel", "labels"]);
|
|
2485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
2486
2486
|
SwitchPrimitives.Root,
|
|
2487
2487
|
__spreadProps(__spreadValues({
|
|
2488
2488
|
className: cn(
|
|
2489
|
-
|
|
2489
|
+
`group relative peer inline-flex ${labels && labels.length > 0 ? `h-12 w-48` : `h-[24px] w-[44px]`} shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 ${activeLabel || labels && labels.length > 1 ? "bg-primary" : "data-[state=checked]:bg-primary data-[state=unchecked]:bg-input"}`,
|
|
2490
2490
|
className
|
|
2491
2491
|
)
|
|
2492
2492
|
}, props), {
|
|
2493
2493
|
ref,
|
|
2494
|
-
children:
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
className:
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2494
|
+
children: [
|
|
2495
|
+
activeLabel && labels && labels.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "absolute inset-0 flex items-center justify-between px-4 z-10 pointer-events-none", children: [
|
|
2496
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "w-16 text-center text-[15px] select-none transition-colors duration-200\n group-data-[state=checked]:text-primary group-data-[state=unchecked]:text-secondary\n group-data-[state=checked]:font-semibold group-data-[state=unchecked]:font-normal", children: labels[0] }),
|
|
2497
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "w-16 text-center text-[15px] select-none transition-colors duration-200\n group-data-[state=unchecked]:text-primary group-data-[state=checked]:text-secondary\n group-data-[state=unchecked]:font-semibold group-data-[state=checked]:font-normal", children: labels[1] })
|
|
2498
|
+
] }) : null,
|
|
2499
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2500
|
+
SwitchPrimitives.Thumb,
|
|
2501
|
+
{
|
|
2502
|
+
className: cn(
|
|
2503
|
+
`pointer-events-none relative block z-0 ${activeLabel && labels && labels.length > 1 ? `h-10 w-24 translate-x-[92px] group-data-[state=checked]:translate-x-1
|
|
2504
|
+
bg-secondary` : `h-5 w-5 bg-background data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0`} rounded-full shadow-lg ring-0 transition-transform duration-300`
|
|
2505
|
+
)
|
|
2506
|
+
}
|
|
2507
|
+
)
|
|
2508
|
+
]
|
|
2502
2509
|
})
|
|
2503
2510
|
);
|
|
2504
2511
|
});
|
|
@@ -7491,7 +7498,13 @@ var AppItem = (props) => {
|
|
|
7491
7498
|
/* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "w-full h-64 relative overflow-hidden rounded-xl", children: [
|
|
7492
7499
|
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("img", { className: "absolute w-full h-64 rounded-xl object-cover", src: props.item.logoUrl }),
|
|
7493
7500
|
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { className: "inset-0 absolute bg-black/20 rounded-xl" }),
|
|
7494
|
-
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { className: "left-4 md:left-6 top-44 absolute justify-start text-white text-base font-medium leading-5", children:
|
|
7501
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { className: "left-4 md:left-6 top-44 absolute justify-start text-white text-base font-medium leading-5", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "flex flex-row ", children: [
|
|
7502
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { children: props.item.locationType }),
|
|
7503
|
+
props.item.activeAppText && /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "flex flex-row items-center ml-2", children: [
|
|
7504
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { className: "w-2 h-2 mr-1 bg-primary rounded-full" }),
|
|
7505
|
+
props.item.activeAppText
|
|
7506
|
+
] })
|
|
7507
|
+
] }) }),
|
|
7495
7508
|
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { className: "w-80 left-4 md:left-6 top-48 mt-2 absolute justify-start text-white text-xl font-semibold leading-7", children: (_a = props.item) == null ? void 0 : _a.name }),
|
|
7496
7509
|
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
7497
7510
|
"button",
|
|
@@ -7519,13 +7532,61 @@ var AppItem = (props) => {
|
|
|
7519
7532
|
};
|
|
7520
7533
|
|
|
7521
7534
|
// src/components/DesignElements/AppItemsList.tsx
|
|
7535
|
+
var import_react23 = require("react");
|
|
7536
|
+
var import_lucide_react20 = require("lucide-react");
|
|
7522
7537
|
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
7523
7538
|
var AppItemsList = (props) => {
|
|
7524
|
-
|
|
7539
|
+
const [toggle, setToggle] = (0, import_react23.useState)(true);
|
|
7540
|
+
const [currentPage, setCurrentPage] = (0, import_react23.useState)(1);
|
|
7541
|
+
const itemsPerPage = 6;
|
|
7542
|
+
const totalPages = Math.ceil(props.allItems.length / itemsPerPage);
|
|
7543
|
+
const currentItems = props.allItems.slice((currentPage - 1) * itemsPerPage, currentPage * itemsPerPage);
|
|
7525
7544
|
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "w-full relative mt-10 pt-5", id: props.id, children: [
|
|
7526
7545
|
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "justify-start text-black text-lg font-normal leading-6 mb-2", children: props.name }),
|
|
7527
|
-
/* @__PURE__ */ (0, import_jsx_runtime130.
|
|
7528
|
-
|
|
7546
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "flex flex-row justify-between items-center", children: [
|
|
7547
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: " text-gray-900 text-3xl md:text-5xl font-light", children: props.title }),
|
|
7548
|
+
props.toggleLabels && props.onToggleChange && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "flex flex-row space-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "hidden lg:block", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
7549
|
+
Switch,
|
|
7550
|
+
{
|
|
7551
|
+
className: "border-2 border-primary rounded-full",
|
|
7552
|
+
checked: toggle,
|
|
7553
|
+
onCheckedChange: (checked) => {
|
|
7554
|
+
setToggle(checked);
|
|
7555
|
+
props.onToggleChange && props.onToggleChange(checked);
|
|
7556
|
+
},
|
|
7557
|
+
labels: props.toggleLabels,
|
|
7558
|
+
activeLabel: props.currentToggleLabel
|
|
7559
|
+
}
|
|
7560
|
+
) }) })
|
|
7561
|
+
] }),
|
|
7562
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "md:grid md:grid-cols-3 gap-4 md:mt-12 mt-5", children: currentItems.map((x, index) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(AppItem, { item: __spreadProps(__spreadValues({}, x), { activeAppText: props.currentToggleLabel }) }, index)) }),
|
|
7563
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "flex justify-center mt-8 items-center", children: [
|
|
7564
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
7565
|
+
"button",
|
|
7566
|
+
{
|
|
7567
|
+
className: "disabled:text-[#DCDCDF] disabled:bg-gray-100 transition-colors text-[#686873] flex items-center justify-center w-10 h-10 rounded-full bg-[#F3F3F4] hover:bg-gray-300 disabled:cursor-not-allowed",
|
|
7568
|
+
onClick: () => setCurrentPage((prev) => Math.max(prev - 1, 1)),
|
|
7569
|
+
disabled: currentPage === 1,
|
|
7570
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_lucide_react20.ChevronLeft, {})
|
|
7571
|
+
}
|
|
7572
|
+
),
|
|
7573
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("span", { className: "mx-5 text-gray-700 font-semibold flex-row flex", children: [
|
|
7574
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "text-primary w-3", children: currentPage }),
|
|
7575
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "text-[#DCDCDF]", children: [
|
|
7576
|
+
" / ",
|
|
7577
|
+
totalPages
|
|
7578
|
+
] })
|
|
7579
|
+
] }),
|
|
7580
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
7581
|
+
"button",
|
|
7582
|
+
{
|
|
7583
|
+
className: "disabled:text-[#DCDCDF] disabled:bg-gray-100 transition-colors text-[#686873] flex items-center justify-center w-10 h-10 rounded-full bg-[#F3F3F4] hover:bg-gray-300 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
7584
|
+
onClick: () => setCurrentPage((prev) => Math.min(prev + 1, totalPages)),
|
|
7585
|
+
disabled: currentPage === totalPages,
|
|
7586
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_lucide_react20.ChevronRight, {})
|
|
7587
|
+
}
|
|
7588
|
+
)
|
|
7589
|
+
] })
|
|
7529
7590
|
] });
|
|
7530
7591
|
};
|
|
7531
7592
|
|
|
@@ -7595,11 +7656,11 @@ var CarouselGalleryItem = ({ text, url, id }) => {
|
|
|
7595
7656
|
};
|
|
7596
7657
|
|
|
7597
7658
|
// src/components/DesignElements/Carousel/CarouselOpen.tsx
|
|
7598
|
-
var
|
|
7599
|
-
var
|
|
7659
|
+
var import_react24 = require("react");
|
|
7660
|
+
var import_react25 = require("@headlessui/react");
|
|
7600
7661
|
var import_outline5 = require("@heroicons/react/24/outline");
|
|
7601
|
-
var
|
|
7602
|
-
var
|
|
7662
|
+
var import_react26 = require("react");
|
|
7663
|
+
var import_lucide_react21 = require("lucide-react");
|
|
7603
7664
|
var import_react_zoom_pan_pinch = require("react-zoom-pan-pinch");
|
|
7604
7665
|
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
7605
7666
|
var GalleryCarouselOpen = ({
|
|
@@ -7613,21 +7674,25 @@ var GalleryCarouselOpen = ({
|
|
|
7613
7674
|
selectImageText,
|
|
7614
7675
|
imageRotation
|
|
7615
7676
|
}) => {
|
|
7616
|
-
const [defaultPhoto, setDefaultPhoto] = (0,
|
|
7617
|
-
const [text, setDefaultText] = (0,
|
|
7618
|
-
const [id, setDefaultId] = (0,
|
|
7619
|
-
const [rotation, setRotation] = (0,
|
|
7620
|
-
(0,
|
|
7621
|
-
|
|
7622
|
-
|
|
7677
|
+
const [defaultPhoto, setDefaultPhoto] = (0, import_react26.useState)(currentPhoto);
|
|
7678
|
+
const [text, setDefaultText] = (0, import_react26.useState)("");
|
|
7679
|
+
const [id, setDefaultId] = (0, import_react26.useState)("");
|
|
7680
|
+
const [rotation, setRotation] = (0, import_react26.useState)(imageRotation);
|
|
7681
|
+
const imageRef = (0, import_react26.useRef)(null);
|
|
7682
|
+
const currentPhotoUrl = currentPhoto.imageUrl;
|
|
7683
|
+
const currentPhotoId = currentPhoto.id;
|
|
7684
|
+
(0, import_react26.useEffect)(() => {
|
|
7685
|
+
setDefaultPhoto({ imageUrl: currentPhotoUrl, id: currentPhotoId });
|
|
7686
|
+
setRotation(imageRotation);
|
|
7687
|
+
}, [currentPhotoUrl, currentPhotoId, imageRotation]);
|
|
7623
7688
|
const handlePrevious = () => {
|
|
7624
7689
|
const currentIndex = list.findIndex(
|
|
7625
7690
|
(item) => item.url === defaultPhoto.imageUrl
|
|
7626
7691
|
);
|
|
7627
7692
|
if (currentIndex > 0) {
|
|
7628
7693
|
const previousIndex = currentIndex - 1;
|
|
7629
|
-
setDefaultPhoto({ imageUrl: list[previousIndex].url });
|
|
7630
|
-
|
|
7694
|
+
setDefaultPhoto({ imageUrl: list[previousIndex].url, id: list[previousIndex].id });
|
|
7695
|
+
setRotation(0);
|
|
7631
7696
|
}
|
|
7632
7697
|
};
|
|
7633
7698
|
const handleNext = () => {
|
|
@@ -7636,13 +7701,13 @@ var GalleryCarouselOpen = ({
|
|
|
7636
7701
|
);
|
|
7637
7702
|
if (currentIndex < list.length - 1) {
|
|
7638
7703
|
const nextIndex = currentIndex + 1;
|
|
7639
|
-
setDefaultPhoto({ imageUrl: list[nextIndex].url });
|
|
7640
|
-
|
|
7704
|
+
setDefaultPhoto({ imageUrl: list[nextIndex].url, id: list[nextIndex].id });
|
|
7705
|
+
setRotation(0);
|
|
7641
7706
|
}
|
|
7642
7707
|
};
|
|
7643
7708
|
const generateBase64ofImage = () => {
|
|
7644
|
-
const img =
|
|
7645
|
-
|
|
7709
|
+
const img = imageRef.current;
|
|
7710
|
+
if (!img || !img.complete || img.naturalWidth === 0) return null;
|
|
7646
7711
|
const canvas = document.createElement("canvas");
|
|
7647
7712
|
const ctx = canvas.getContext("2d");
|
|
7648
7713
|
if (!ctx) return null;
|
|
@@ -7654,21 +7719,20 @@ var GalleryCarouselOpen = ({
|
|
|
7654
7719
|
ctx.translate(canvas.width / 2, canvas.height / 2);
|
|
7655
7720
|
ctx.rotate(radians);
|
|
7656
7721
|
ctx.drawImage(img, -img.naturalWidth / 2, -img.naturalHeight / 2);
|
|
7657
|
-
|
|
7658
|
-
return base64;
|
|
7722
|
+
return canvas.toDataURL("image/jpeg");
|
|
7659
7723
|
};
|
|
7660
|
-
(0,
|
|
7724
|
+
(0, import_react26.useEffect)(() => {
|
|
7661
7725
|
const foundPhoto = list.find((list2) => list2.url === defaultPhoto.imageUrl);
|
|
7662
7726
|
if (foundPhoto) {
|
|
7663
7727
|
setDefaultText(foundPhoto.text);
|
|
7664
7728
|
setDefaultId(foundPhoto.id);
|
|
7665
7729
|
}
|
|
7666
7730
|
}, [defaultPhoto, list]);
|
|
7667
|
-
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
7731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_react25.Transition.Root, { show: open, as: import_react24.Fragment, "data-component": "ResourceView", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_react25.Dialog, { as: "div", className: "relative z-10", onClose: setOpen, children: [
|
|
7668
7732
|
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
7669
|
-
|
|
7733
|
+
import_react25.Transition.Child,
|
|
7670
7734
|
{
|
|
7671
|
-
as:
|
|
7735
|
+
as: import_react24.Fragment,
|
|
7672
7736
|
enter: "ease-out duration-300",
|
|
7673
7737
|
enterFrom: "opacity-0",
|
|
7674
7738
|
enterTo: "opacity-100",
|
|
@@ -7678,7 +7742,7 @@ var GalleryCarouselOpen = ({
|
|
|
7678
7742
|
children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "fixed inset-0 bg-black bg-opacity-90 transition-opacity" })
|
|
7679
7743
|
}
|
|
7680
7744
|
),
|
|
7681
|
-
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
7745
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_react25.Dialog.Panel, { className: "relative ", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "fixed inset-0 flex items-center justify-between", children: [
|
|
7682
7746
|
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "absolute top-0 right-0 pt-4 pr-4 z-40", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
|
|
7683
7747
|
"button",
|
|
7684
7748
|
{
|
|
@@ -7705,7 +7769,7 @@ var GalleryCarouselOpen = ({
|
|
|
7705
7769
|
type: "button",
|
|
7706
7770
|
className: " rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 z-40 ",
|
|
7707
7771
|
onClick: handlePrevious,
|
|
7708
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
7772
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_lucide_react21.ChevronLeft, { className: "h-8 w-8 disabled:pointer-events-none disabled:opacity-60 text-white" })
|
|
7709
7773
|
}
|
|
7710
7774
|
),
|
|
7711
7775
|
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
@@ -7754,6 +7818,7 @@ var GalleryCarouselOpen = ({
|
|
|
7754
7818
|
!defaultPhoto.imageUrl.includes(".mp4") && !defaultPhoto.imageUrl.includes(".mov") && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
7755
7819
|
"img",
|
|
7756
7820
|
{
|
|
7821
|
+
ref: imageRef,
|
|
7757
7822
|
id,
|
|
7758
7823
|
src: defaultPhoto.imageUrl,
|
|
7759
7824
|
crossOrigin: "anonymous",
|
|
@@ -7786,16 +7851,16 @@ var GalleryCarouselOpen = ({
|
|
|
7786
7851
|
type: "button",
|
|
7787
7852
|
className: " rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 z-40",
|
|
7788
7853
|
onClick: handleNext,
|
|
7789
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
7854
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_lucide_react21.ChevronRight, { className: "h-8 w-8 disabled:pointer-events-none disabled:opacity-60 text-white" })
|
|
7790
7855
|
}
|
|
7791
7856
|
)
|
|
7792
7857
|
] }),
|
|
7793
7858
|
/* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "justify-between flex flex-row mb-5", children: [
|
|
7794
7859
|
/* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "gap-2 flex flex-row", children: [
|
|
7795
|
-
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
7860
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_lucide_react21.RotateCcw, { className: "h-6 w-6 text-white cursor-pointer", onClick: () => {
|
|
7796
7861
|
setRotation(rotation - 90);
|
|
7797
7862
|
} }),
|
|
7798
|
-
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
7863
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_lucide_react21.RotateCw, { className: "h-6 w-6 text-white cursor-pointer", onClick: () => {
|
|
7799
7864
|
setRotation(rotation + 90);
|
|
7800
7865
|
} })
|
|
7801
7866
|
] }),
|
|
@@ -7804,7 +7869,11 @@ var GalleryCarouselOpen = ({
|
|
|
7804
7869
|
{
|
|
7805
7870
|
className: "z-40 text-white hover:cursor-pointer",
|
|
7806
7871
|
onClick: () => {
|
|
7807
|
-
|
|
7872
|
+
const base64 = generateBase64ofImage();
|
|
7873
|
+
saveRotationChanges(base64, id);
|
|
7874
|
+
if (base64) {
|
|
7875
|
+
setDefaultPhoto({ imageUrl: base64, id });
|
|
7876
|
+
}
|
|
7808
7877
|
setRotation(0);
|
|
7809
7878
|
},
|
|
7810
7879
|
children: "Save rotation changes"
|
|
@@ -7825,12 +7894,12 @@ var GalleryCarouselOpen = ({
|
|
|
7825
7894
|
};
|
|
7826
7895
|
|
|
7827
7896
|
// src/components/DesignElements/Carousel/CarouselGalleryItemList.tsx
|
|
7828
|
-
var
|
|
7897
|
+
var import_react27 = require("react");
|
|
7829
7898
|
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
7830
7899
|
var CarouselItemList = (props) => {
|
|
7831
|
-
const [open, setOpen] = (0,
|
|
7832
|
-
const [selectedItemId, setSelectedItemId] = (0,
|
|
7833
|
-
const [selectedImageId, setSelectedImageId] = (0,
|
|
7900
|
+
const [open, setOpen] = (0, import_react27.useState)(false);
|
|
7901
|
+
const [selectedItemId, setSelectedItemId] = (0, import_react27.useState)("");
|
|
7902
|
+
const [selectedImageId, setSelectedImageId] = (0, import_react27.useState)(null);
|
|
7834
7903
|
const handleOpenGallery = (id, imageId) => {
|
|
7835
7904
|
setOpen(true);
|
|
7836
7905
|
setSelectedItemId(id);
|
|
@@ -8007,11 +8076,11 @@ var FeatureDisabled = () => {
|
|
|
8007
8076
|
};
|
|
8008
8077
|
|
|
8009
8078
|
// src/components/Elements/IframeViewer.tsx
|
|
8010
|
-
var
|
|
8079
|
+
var import_react28 = require("react");
|
|
8011
8080
|
var import_jsx_runtime140 = require("react/jsx-runtime");
|
|
8012
8081
|
var IframeViewer = ({ html, className }) => {
|
|
8013
|
-
const containerRef = (0,
|
|
8014
|
-
(0,
|
|
8082
|
+
const containerRef = (0, import_react28.useRef)(null);
|
|
8083
|
+
(0, import_react28.useEffect)(() => {
|
|
8015
8084
|
if (containerRef.current) {
|
|
8016
8085
|
containerRef.current.innerHTML = "";
|
|
8017
8086
|
const tempDiv = document.createElement("div");
|
|
@@ -8217,12 +8286,12 @@ var FeaturedItemWithBannerImage = (props) => {
|
|
|
8217
8286
|
};
|
|
8218
8287
|
|
|
8219
8288
|
// src/components/Elements/NewsLetter.tsx
|
|
8220
|
-
var
|
|
8289
|
+
var import_react29 = require("react");
|
|
8221
8290
|
var import_jsx_runtime150 = require("react/jsx-runtime");
|
|
8222
8291
|
var NewsLetter = (props) => {
|
|
8223
|
-
const [loading, setLoading] = (0,
|
|
8224
|
-
const [isAccepted, setIsAccepted] = (0,
|
|
8225
|
-
const [email, setEmail] = (0,
|
|
8292
|
+
const [loading, setLoading] = (0, import_react29.useState)(false);
|
|
8293
|
+
const [isAccepted, setIsAccepted] = (0, import_react29.useState)(false);
|
|
8294
|
+
const [email, setEmail] = (0, import_react29.useState)("");
|
|
8226
8295
|
const isEmailValid = (email2) => {
|
|
8227
8296
|
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email2);
|
|
8228
8297
|
};
|
|
@@ -8381,7 +8450,7 @@ var HeroImage = ({ path, cmsUrl }) => {
|
|
|
8381
8450
|
};
|
|
8382
8451
|
|
|
8383
8452
|
// src/components/Hero/HeroImageRightWithAppButtons.tsx
|
|
8384
|
-
var
|
|
8453
|
+
var import_react30 = require("react");
|
|
8385
8454
|
|
|
8386
8455
|
// src/components/HeadingTextBlocks/H1BodyButton.tsx
|
|
8387
8456
|
var import_core6 = require("@geowiki/core");
|
|
@@ -8574,8 +8643,8 @@ var H1BodyButtonWithApp = (props) => {
|
|
|
8574
8643
|
// src/components/Hero/HeroImageRightWithAppButtons.tsx
|
|
8575
8644
|
var import_jsx_runtime153 = require("react/jsx-runtime");
|
|
8576
8645
|
var HeroImageRightWithAppButtons = (props) => {
|
|
8577
|
-
const [description, setDescription] = (0,
|
|
8578
|
-
(0,
|
|
8646
|
+
const [description, setDescription] = (0, import_react30.useState)(props.description);
|
|
8647
|
+
(0, import_react30.useEffect)(() => {
|
|
8579
8648
|
var _a;
|
|
8580
8649
|
if (typeof window !== "undefined") {
|
|
8581
8650
|
const desc = window.innerWidth < 700 ? (_a = props.description) == null ? void 0 : _a.replaceAll("<br>", "") : props.description;
|