@sikka/hawa 0.30.16-next → 0.30.17-next
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dataTable/index.js +11 -10
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +11 -10
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/elements/index.js +11 -10
- package/dist/elements/index.mjs +28 -27
- package/dist/index.css +0 -3
- package/dist/index.js +11 -10
- package/dist/index.mjs +69 -68
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -2622,15 +2622,9 @@ var DataTable = ({
|
|
2622
2622
|
const [expanded, setExpanded] = React22.useState({});
|
2623
2623
|
const [columnVisibility, setColumnVisibility] = React22.useState({});
|
2624
2624
|
const [rowSelection, setRowSelection] = React22.useState({});
|
2625
|
-
const visibleColumns = columns.filter(
|
2626
|
-
(column) => {
|
2627
|
-
var _a2;
|
2628
|
-
return ((_a2 = column.meta) == null ? void 0 : _a2.hidden) !== true;
|
2629
|
-
}
|
2630
|
-
);
|
2631
2625
|
const table = useReactTable({
|
2632
2626
|
data,
|
2633
|
-
columns
|
2627
|
+
columns,
|
2634
2628
|
onExpandedChange: setExpanded,
|
2635
2629
|
getExpandedRowModel: getExpandedRowModel(),
|
2636
2630
|
onGlobalFilterChange: setGlobalFilter,
|
@@ -2650,15 +2644,22 @@ var DataTable = ({
|
|
2650
2644
|
rowSelection,
|
2651
2645
|
expanded
|
2652
2646
|
}
|
2653
|
-
// defaultColumn: {
|
2654
|
-
// maxSize: 200
|
2655
|
-
// }
|
2656
2647
|
});
|
2657
2648
|
const pageText = ((_a = props.texts) == null ? void 0 : _a.page) || "page";
|
2658
2649
|
const itemsPerPageOptions = (_b = props.itemsPerPage) == null ? void 0 : _b.map((item) => ({
|
2659
2650
|
label: `${item} / ${pageText}`,
|
2660
2651
|
value: item
|
2661
2652
|
}));
|
2653
|
+
React22.useEffect(() => {
|
2654
|
+
setColumnVisibility((prev) => {
|
2655
|
+
let newColumnVisibility = {};
|
2656
|
+
columns.forEach((column) => {
|
2657
|
+
var _a2;
|
2658
|
+
newColumnVisibility[column.accessorKey] = !((_a2 = column.meta) == null ? void 0 : _a2.hidden);
|
2659
|
+
});
|
2660
|
+
return newColumnVisibility;
|
2661
|
+
});
|
2662
|
+
}, [columns]);
|
2662
2663
|
return /* @__PURE__ */ React22.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-col hawa-gap-4" }, (enableSearch || enableHideColumns) && /* @__PURE__ */ React22.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-4" }, enableSearch && /* @__PURE__ */ React22.createElement(
|
2663
2664
|
Input,
|
2664
2665
|
{
|
@@ -2935,7 +2936,7 @@ var DataTable = ({
|
|
2935
2936
|
};
|
2936
2937
|
|
2937
2938
|
// elements/backToTop/BackToTop.tsx
|
2938
|
-
import React23, { useState as useState4, useEffect as
|
2939
|
+
import React23, { useState as useState4, useEffect as useEffect4, useRef as useRef3 } from "react";
|
2939
2940
|
var BackToTop = ({ ...props }) => {
|
2940
2941
|
const [visible, setVisible] = useState4(false);
|
2941
2942
|
const [rect, _setRect] = useState4(null);
|
@@ -2965,7 +2966,7 @@ var BackToTop = ({ ...props }) => {
|
|
2965
2966
|
props.anchor.current.scrollTo({ top: 0, behavior: "smooth" });
|
2966
2967
|
}
|
2967
2968
|
};
|
2968
|
-
|
2969
|
+
useEffect4(() => {
|
2969
2970
|
if (!props.anchor.current)
|
2970
2971
|
return;
|
2971
2972
|
props.anchor.current.addEventListener("scroll", onScroll);
|
@@ -3032,7 +3033,7 @@ var BackToTop = ({ ...props }) => {
|
|
3032
3033
|
};
|
3033
3034
|
|
3034
3035
|
// elements/radio/Radio.tsx
|
3035
|
-
import React24, { useState as useState5, useRef as useRef4, useEffect as
|
3036
|
+
import React24, { useState as useState5, useRef as useRef4, useEffect as useEffect5, forwardRef as forwardRef14 } from "react";
|
3036
3037
|
var Radio = forwardRef14(
|
3037
3038
|
({
|
3038
3039
|
design = "default",
|
@@ -3072,7 +3073,7 @@ var Radio = forwardRef14(
|
|
3072
3073
|
null
|
3073
3074
|
);
|
3074
3075
|
const parentRef = useRef4(null);
|
3075
|
-
|
3076
|
+
useEffect5(() => {
|
3076
3077
|
var _a2;
|
3077
3078
|
const parentNode = (_a2 = parentRef.current) == null ? void 0 : _a2.parentNode;
|
3078
3079
|
if (parentNode) {
|
@@ -3632,7 +3633,7 @@ var Textarea = React28.forwardRef(
|
|
3632
3633
|
Textarea.displayName = "Textarea";
|
3633
3634
|
|
3634
3635
|
// elements/fileDropzone/FileDropzone.tsx
|
3635
|
-
import React29, { useEffect as
|
3636
|
+
import React29, { useEffect as useEffect6, useState as useState7 } from "react";
|
3636
3637
|
import { useDropzone } from "react-dropzone";
|
3637
3638
|
import clsx2 from "clsx";
|
3638
3639
|
var FileDropzone = ({
|
@@ -3677,7 +3678,7 @@ var FileDropzone = ({
|
|
3677
3678
|
);
|
3678
3679
|
}
|
3679
3680
|
});
|
3680
|
-
|
3681
|
+
useEffect6(
|
3681
3682
|
() => () => {
|
3682
3683
|
files == null ? void 0 : files.forEach((file) => {
|
3683
3684
|
URL.revokeObjectURL(file.preview);
|
@@ -3685,7 +3686,7 @@ var FileDropzone = ({
|
|
3685
3686
|
},
|
3686
3687
|
[files]
|
3687
3688
|
);
|
3688
|
-
|
3689
|
+
useEffect6(() => {
|
3689
3690
|
setFiles(acceptedFiles);
|
3690
3691
|
}, [acceptedFiles, cmp, setFiles]);
|
3691
3692
|
onClearFiles = () => {
|
@@ -3697,7 +3698,7 @@ var FileDropzone = ({
|
|
3697
3698
|
acceptedFiles.length = 0;
|
3698
3699
|
setFiles([]);
|
3699
3700
|
};
|
3700
|
-
|
3701
|
+
useEffect6(() => {
|
3701
3702
|
if (maxSize > 0) {
|
3702
3703
|
const k = 1024;
|
3703
3704
|
const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
@@ -4470,7 +4471,7 @@ var AppStores = (props) => {
|
|
4470
4471
|
};
|
4471
4472
|
|
4472
4473
|
// elements/badge/Badge.tsx
|
4473
|
-
import React38, { useEffect as
|
4474
|
+
import React38, { useEffect as useEffect8, useState as useState9, useRef as useRef7 } from "react";
|
4474
4475
|
var Badge = ({
|
4475
4476
|
anchor,
|
4476
4477
|
position = "right",
|
@@ -4485,7 +4486,7 @@ var Badge = ({
|
|
4485
4486
|
default: { top: 4, left: 7, right: 5, classes: "hawa-w-3 hawa-h-3" },
|
4486
4487
|
large: { top: 6, left: 12, right: 7, classes: "hawa-w-6 hawa-h-6" }
|
4487
4488
|
};
|
4488
|
-
|
4489
|
+
useEffect8(() => {
|
4489
4490
|
const handlePositioning = () => {
|
4490
4491
|
var _a;
|
4491
4492
|
if (anchor.current && indicatorRef.current) {
|
@@ -4547,7 +4548,7 @@ var BadgedComponent = ({
|
|
4547
4548
|
};
|
4548
4549
|
|
4549
4550
|
// elements/phoneInput/PhoneInput.tsx
|
4550
|
-
import React39, { useState as useState10, useRef as useRef8, useEffect as
|
4551
|
+
import React39, { useState as useState10, useRef as useRef8, useEffect as useEffect9 } from "react";
|
4551
4552
|
|
4552
4553
|
// countries.ts
|
4553
4554
|
var countries = [
|
@@ -6247,7 +6248,7 @@ var PhoneInput = ({ labelProps, ...props }) => {
|
|
6247
6248
|
const [phoneNumber, setPhoneNumber] = useState10("");
|
6248
6249
|
const [countryCode, setCountryCode] = useState10(props.preferredCountry);
|
6249
6250
|
const inputRef = useRef8(null);
|
6250
|
-
|
6251
|
+
useEffect9(() => {
|
6251
6252
|
var _a;
|
6252
6253
|
if (inputRef.current) {
|
6253
6254
|
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
@@ -6307,7 +6308,7 @@ var PhoneInput = ({ labelProps, ...props }) => {
|
|
6307
6308
|
};
|
6308
6309
|
|
6309
6310
|
// elements/pinInput/PinInput.tsx
|
6310
|
-
import React40, { useEffect as
|
6311
|
+
import React40, { useEffect as useEffect10, useState as useState11 } from "react";
|
6311
6312
|
var PinInput = ({
|
6312
6313
|
label,
|
6313
6314
|
icon,
|
@@ -6326,7 +6327,7 @@ var PinInput = ({
|
|
6326
6327
|
previousInput == null ? void 0 : previousInput.focus();
|
6327
6328
|
}
|
6328
6329
|
};
|
6329
|
-
|
6330
|
+
useEffect10(() => {
|
6330
6331
|
let unfilled = pin.includes(void 0);
|
6331
6332
|
if (!unfilled && getPins) {
|
6332
6333
|
getPins(pin);
|
@@ -6441,7 +6442,7 @@ ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
6441
6442
|
// elements/colorPicker/ColorPicker.tsx
|
6442
6443
|
import React43, {
|
6443
6444
|
useState as useState12,
|
6444
|
-
useEffect as
|
6445
|
+
useEffect as useEffect11
|
6445
6446
|
} from "react";
|
6446
6447
|
var ColorPicker = ({
|
6447
6448
|
containerProps,
|
@@ -6454,7 +6455,7 @@ var ColorPicker = ({
|
|
6454
6455
|
...props
|
6455
6456
|
}) => {
|
6456
6457
|
const [selectedColor, setSelectedColor] = useState12(props.color);
|
6457
|
-
|
6458
|
+
useEffect11(() => {
|
6458
6459
|
if (selectedColor && selectedColor[0] !== "#") {
|
6459
6460
|
setSelectedColor(`#${selectedColor}`);
|
6460
6461
|
}
|
@@ -6736,7 +6737,7 @@ var Pagination = ({
|
|
6736
6737
|
};
|
6737
6738
|
|
6738
6739
|
// elements/passwordInput/PasswordInput.tsx
|
6739
|
-
import React49, { useEffect as
|
6740
|
+
import React49, { useEffect as useEffect12, useState as useState13 } from "react";
|
6740
6741
|
|
6741
6742
|
// icons/Emojis.tsx
|
6742
6743
|
import React46 from "react";
|
@@ -6961,7 +6962,7 @@ var PasswordInput = ({
|
|
6961
6962
|
const [specialCharCriteriaMet, setSpecialCharCriteriaMet] = useState13(false);
|
6962
6963
|
const [lowercaseCriteriaMet, setLowercaseCriteriaMet] = useState13(false);
|
6963
6964
|
const [uppercaseCriteriaMet, setUppercaseCriteriaMet] = useState13(false);
|
6964
|
-
|
6965
|
+
useEffect12(() => {
|
6965
6966
|
const calculateStrength = () => {
|
6966
6967
|
let strengthScore = 0;
|
6967
6968
|
if (lengthCriteriaMet)
|
@@ -7162,7 +7163,7 @@ var Separator2 = ({
|
|
7162
7163
|
);
|
7163
7164
|
|
7164
7165
|
// elements/scrollIndicator/ScrollIndicator.tsx
|
7165
|
-
import React53, { useState as useState14, useEffect as
|
7166
|
+
import React53, { useState as useState14, useEffect as useEffect13 } from "react";
|
7166
7167
|
var ScrollIndicator = ({
|
7167
7168
|
anchor,
|
7168
7169
|
inContainer = false
|
@@ -7178,7 +7179,7 @@ var ScrollIndicator = ({
|
|
7178
7179
|
setScrollPercentage(percentageScrolled);
|
7179
7180
|
}
|
7180
7181
|
};
|
7181
|
-
|
7182
|
+
useEffect13(() => {
|
7182
7183
|
if (!anchor.current)
|
7183
7184
|
return;
|
7184
7185
|
anchor.current.addEventListener("scroll", onScroll);
|
@@ -7391,7 +7392,7 @@ var CodeBlock = ({
|
|
7391
7392
|
};
|
7392
7393
|
|
7393
7394
|
// elements/carousel/Carousel.tsx
|
7394
|
-
import React55, { useEffect as
|
7395
|
+
import React55, { useEffect as useEffect14, useState as useState17 } from "react";
|
7395
7396
|
import useEmblaCarousel from "embla-carousel-react";
|
7396
7397
|
var Carousel = ({
|
7397
7398
|
items,
|
@@ -7408,7 +7409,7 @@ var Carousel = ({
|
|
7408
7409
|
loop: autoplay ? true : (options == null ? void 0 : options.loop) || false
|
7409
7410
|
});
|
7410
7411
|
const [selectedIndex, setSelectedIndex] = useState17(0);
|
7411
|
-
|
7412
|
+
useEffect14(() => {
|
7412
7413
|
function selectHandler() {
|
7413
7414
|
const index = emblaApi == null ? void 0 : emblaApi.selectedScrollSnap();
|
7414
7415
|
setSelectedIndex(index || 0);
|
@@ -7418,7 +7419,7 @@ var Carousel = ({
|
|
7418
7419
|
emblaApi == null ? void 0 : emblaApi.off("select", selectHandler);
|
7419
7420
|
};
|
7420
7421
|
}, [emblaApi]);
|
7421
|
-
|
7422
|
+
useEffect14(() => {
|
7422
7423
|
let autoplayTimer;
|
7423
7424
|
if (autoplay && emblaApi) {
|
7424
7425
|
autoplayTimer = setInterval(() => {
|
@@ -8266,7 +8267,7 @@ var Navbar = ({
|
|
8266
8267
|
};
|
8267
8268
|
|
8268
8269
|
// layout/appLayout/AppLayout.tsx
|
8269
|
-
import React66, { useEffect as
|
8270
|
+
import React66, { useEffect as useEffect15, useRef as useRef10, useState as useState21 } from "react";
|
8270
8271
|
var AppLayout = ({
|
8271
8272
|
profileMenuWidth = "default",
|
8272
8273
|
DrawerFooterActions,
|
@@ -8299,7 +8300,7 @@ var AppLayout = ({
|
|
8299
8300
|
const [size, setSize] = useState21(1200);
|
8300
8301
|
const [openSideMenu, setOpenSideMenu] = useState21(true);
|
8301
8302
|
const drawerSizeCondition = size > 600 ? drawerSizeStyle[keepOpen ? "opened" : "closed"][drawerSize] : 0;
|
8302
|
-
|
8303
|
+
useEffect15(() => {
|
8303
8304
|
if (typeof window !== "undefined") {
|
8304
8305
|
const resize = () => {
|
8305
8306
|
setSize(window.innerWidth);
|
@@ -8311,14 +8312,14 @@ var AppLayout = ({
|
|
8311
8312
|
};
|
8312
8313
|
}
|
8313
8314
|
}, []);
|
8314
|
-
|
8315
|
+
useEffect15(() => {
|
8315
8316
|
if (size > 600) {
|
8316
8317
|
setOpenSideMenu(keepOpen);
|
8317
8318
|
} else {
|
8318
8319
|
setOpenSideMenu(false);
|
8319
8320
|
}
|
8320
8321
|
}, [size]);
|
8321
|
-
|
8322
|
+
useEffect15(() => {
|
8322
8323
|
const handleClickOutside = (event) => {
|
8323
8324
|
if (ref.current && !ref.current.contains(event.target) && !keepOpen) {
|
8324
8325
|
setOpenSideMenu(false);
|
@@ -8977,13 +8978,13 @@ var AppTabs = ({ tabs, className }) => {
|
|
8977
8978
|
};
|
8978
8979
|
|
8979
8980
|
// layout/docsLayout/DocsLayout.tsx
|
8980
|
-
import React72, { useEffect as
|
8981
|
+
import React72, { useEffect as useEffect17, useRef as useRef11, useState as useState24 } from "react";
|
8981
8982
|
|
8982
8983
|
// hooks/useBreakpoint.ts
|
8983
|
-
import { useState as useState23, useEffect as
|
8984
|
+
import { useState as useState23, useEffect as useEffect16 } from "react";
|
8984
8985
|
var useBreakpoint = () => {
|
8985
8986
|
const [breakpoint, setBreakpoint] = useState23(null);
|
8986
|
-
|
8987
|
+
useEffect16(() => {
|
8987
8988
|
if (typeof window !== "undefined") {
|
8988
8989
|
const resize = () => {
|
8989
8990
|
setBreakpoint(window.innerWidth);
|
@@ -9094,7 +9095,7 @@ var DocsLayout = ({
|
|
9094
9095
|
}
|
9095
9096
|
const [currentPage, setCurrentPage] = useState24("Introduction");
|
9096
9097
|
const [openSideMenu, setOpenSideMenu] = useState24(true);
|
9097
|
-
|
9098
|
+
useEffect17(() => {
|
9098
9099
|
const handleClickOutside = (event) => {
|
9099
9100
|
if (ref.current && !ref.current.contains(event.target) && !openSideMenu) {
|
9100
9101
|
setOpenSideMenu(false);
|
@@ -9105,7 +9106,7 @@ var DocsLayout = ({
|
|
9105
9106
|
document.removeEventListener("click", handleClickOutside, true);
|
9106
9107
|
};
|
9107
9108
|
}, [openSideMenu]);
|
9108
|
-
|
9109
|
+
useEffect17(() => {
|
9109
9110
|
const handleResize = () => {
|
9110
9111
|
setOpenSideMenu(window.innerWidth > 600 ? true : false);
|
9111
9112
|
};
|
@@ -9122,7 +9123,7 @@ var DocsLayout = ({
|
|
9122
9123
|
setCurrentPage(entry.target.id);
|
9123
9124
|
}
|
9124
9125
|
};
|
9125
|
-
|
9126
|
+
useEffect17(() => {
|
9126
9127
|
observerRef.current = new IntersectionObserver(handleIntersection, {
|
9127
9128
|
threshold: 0.5
|
9128
9129
|
// Adjust threshold as needed to determine when a section is in view
|
@@ -10287,7 +10288,7 @@ var ResetPasswordForm = ({
|
|
10287
10288
|
};
|
10288
10289
|
|
10289
10290
|
// blocks/auth/CodeConfirmation.tsx
|
10290
|
-
import React80, { useEffect as
|
10291
|
+
import React80, { useEffect as useEffect18, useState as useState28 } from "react";
|
10291
10292
|
import { Controller as Controller5, useForm as useForm5 } from "react-hook-form";
|
10292
10293
|
import { zodResolver as zodResolver5 } from "@hookform/resolvers/zod";
|
10293
10294
|
import * as z5 from "zod";
|
@@ -10323,7 +10324,7 @@ var CodeConfirmation = (props) => {
|
|
10323
10324
|
}, 1e3);
|
10324
10325
|
setResendTimer(newTimer);
|
10325
10326
|
};
|
10326
|
-
|
10327
|
+
useEffect18(() => {
|
10327
10328
|
return () => {
|
10328
10329
|
if (resendTimer !== null) {
|
10329
10330
|
clearInterval(resendTimer);
|
@@ -10544,7 +10545,7 @@ var UserReferralSource = ({
|
|
10544
10545
|
};
|
10545
10546
|
|
10546
10547
|
// blocks/feedback/FeedbackRating.tsx
|
10547
|
-
import React82, { useEffect as
|
10548
|
+
import React82, { useEffect as useEffect19, useRef as useRef13, useState as useState30 } from "react";
|
10548
10549
|
var FeedbackRating = ({
|
10549
10550
|
position = "bottom-right",
|
10550
10551
|
...props
|
@@ -10558,7 +10559,7 @@ var FeedbackRating = ({
|
|
10558
10559
|
"bottom-right": "hawa-right-4",
|
10559
10560
|
"bottom-left": "hawa-left-4"
|
10560
10561
|
};
|
10561
|
-
|
10562
|
+
useEffect19(() => {
|
10562
10563
|
const timeoutHide = setTimeout(() => {
|
10563
10564
|
if (closingTimer >= 0) {
|
10564
10565
|
setClosingTimer(closingTimer - 1);
|
@@ -11265,7 +11266,7 @@ var ActionCard = (props) => {
|
|
11265
11266
|
};
|
11266
11267
|
|
11267
11268
|
// blocks/cards/AdCard.tsx
|
11268
|
-
import React94, { useState as useState33, useEffect as
|
11269
|
+
import React94, { useState as useState33, useEffect as useEffect20, useRef as useRef14 } from "react";
|
11269
11270
|
var AdCard = ({
|
11270
11271
|
orientation = "vertical",
|
11271
11272
|
...props
|
@@ -11273,7 +11274,7 @@ var AdCard = ({
|
|
11273
11274
|
const adRef = useRef14(null);
|
11274
11275
|
const [closed, setClosed] = useState33(false);
|
11275
11276
|
let duration = 0;
|
11276
|
-
|
11277
|
+
useEffect20(() => {
|
11277
11278
|
if (duration) {
|
11278
11279
|
const timeoutHide = setTimeout(() => {
|
11279
11280
|
setClosed(true);
|
@@ -11461,7 +11462,7 @@ var PricingCard = ({
|
|
11461
11462
|
};
|
11462
11463
|
|
11463
11464
|
// blocks/cards/ItemCard.tsx
|
11464
|
-
import React96, { useEffect as
|
11465
|
+
import React96, { useEffect as useEffect21, useState as useState34 } from "react";
|
11465
11466
|
var ItemCard = ({
|
11466
11467
|
actions,
|
11467
11468
|
counts,
|
@@ -11495,7 +11496,7 @@ var ItemCard = ({
|
|
11495
11496
|
e.stopPropagation();
|
11496
11497
|
setOpenActionHeader(!openActionHeader);
|
11497
11498
|
}
|
11498
|
-
|
11499
|
+
useEffect21(() => {
|
11499
11500
|
window.onclick = () => {
|
11500
11501
|
if (openActionHeader) {
|
11501
11502
|
setOpenActionHeader(false);
|
@@ -11938,14 +11939,14 @@ var Usage = (props) => {
|
|
11938
11939
|
};
|
11939
11940
|
|
11940
11941
|
// hooks/useIsomorphicEffect.ts
|
11941
|
-
import { useEffect as
|
11942
|
-
var useIsomorphicEffect = typeof document !== "undefined" ? useLayoutEffect :
|
11942
|
+
import { useEffect as useEffect22, useLayoutEffect } from "react";
|
11943
|
+
var useIsomorphicEffect = typeof document !== "undefined" ? useLayoutEffect : useEffect22;
|
11943
11944
|
|
11944
11945
|
// hooks/useDiscloser.ts
|
11945
11946
|
import { useState as useState36 } from "react";
|
11946
11947
|
|
11947
11948
|
// hooks/useHover.ts
|
11948
|
-
import { useEffect as
|
11949
|
+
import { useEffect as useEffect23, useRef as useRef15, useState as useState37 } from "react";
|
11949
11950
|
|
11950
11951
|
// hooks/useToast.ts
|
11951
11952
|
import * as React104 from "react";
|
@@ -12055,7 +12056,7 @@ function useToast() {
|
|
12055
12056
|
import { useState as useState39, useRef as useRef16 } from "react";
|
12056
12057
|
|
12057
12058
|
// hooks/useDialogCarousel.ts
|
12058
|
-
import { useEffect as
|
12059
|
+
import { useEffect as useEffect25, useState as useState40 } from "react";
|
12059
12060
|
import AutoHeight from "embla-carousel-auto-height";
|
12060
12061
|
import useEmblaCarousel2 from "embla-carousel-react";
|
12061
12062
|
var useDialogCarousel = (options) => {
|
@@ -12081,7 +12082,7 @@ var useDialogCarousel = (options) => {
|
|
12081
12082
|
emblaApi.scrollPrev();
|
12082
12083
|
}
|
12083
12084
|
};
|
12084
|
-
|
12085
|
+
useEffect25(() => {
|
12085
12086
|
checkCanScrollPrev();
|
12086
12087
|
emblaApi && emblaApi.on("select", checkCanScrollPrev);
|
12087
12088
|
return () => {
|
@@ -12098,12 +12099,12 @@ var useDialogCarousel = (options) => {
|
|
12098
12099
|
};
|
12099
12100
|
|
12100
12101
|
// hooks/useDialogSteps.ts
|
12101
|
-
import { useState as useState41, useEffect as
|
12102
|
+
import { useState as useState41, useEffect as useEffect26, useRef as useRef17 } from "react";
|
12102
12103
|
var useMultiStepDialog = (initialStep, stepIds, setOpenDialog) => {
|
12103
12104
|
const [currentStep, setCurrentStep] = useState41(initialStep);
|
12104
12105
|
const [dialogHeight, setDialogHeight] = useState41(null);
|
12105
12106
|
const visibleStepRef = useRef17(null);
|
12106
|
-
|
12107
|
+
useEffect26(() => {
|
12107
12108
|
if (visibleStepRef.current) {
|
12108
12109
|
setDialogHeight(visibleStepRef.current.offsetHeight);
|
12109
12110
|
}
|
@@ -12134,13 +12135,13 @@ var useMultiStepDialog = (initialStep, stepIds, setOpenDialog) => {
|
|
12134
12135
|
};
|
12135
12136
|
|
12136
12137
|
// hooks/useWindowSize.ts
|
12137
|
-
import { useEffect as
|
12138
|
+
import { useEffect as useEffect27, useState as useState42 } from "react";
|
12138
12139
|
var useWindowSize = () => {
|
12139
12140
|
const [windowSize, setWindowSize] = useState42({
|
12140
12141
|
width: void 0,
|
12141
12142
|
height: void 0
|
12142
12143
|
});
|
12143
|
-
|
12144
|
+
useEffect27(() => {
|
12144
12145
|
function handleResize() {
|
12145
12146
|
setWindowSize({
|
12146
12147
|
width: window.innerWidth,
|
@@ -12155,7 +12156,7 @@ var useWindowSize = () => {
|
|
12155
12156
|
};
|
12156
12157
|
|
12157
12158
|
// hooks/useFocusWithin.ts
|
12158
|
-
import { useRef as useRef18, useState as useState43, useEffect as
|
12159
|
+
import { useRef as useRef18, useState as useState43, useEffect as useEffect28 } from "react";
|
12159
12160
|
function containsRelatedTarget(event) {
|
12160
12161
|
if (event.currentTarget instanceof HTMLElement && event.relatedTarget instanceof HTMLElement) {
|
12161
12162
|
return event.currentTarget.contains(event.relatedTarget);
|
@@ -12185,7 +12186,7 @@ function useFocusWithin({
|
|
12185
12186
|
onBlur == null ? void 0 : onBlur(event);
|
12186
12187
|
}
|
12187
12188
|
};
|
12188
|
-
|
12189
|
+
useEffect28(() => {
|
12189
12190
|
if (ref.current) {
|
12190
12191
|
ref.current.addEventListener("focusin", handleFocusIn);
|
12191
12192
|
ref.current.addEventListener("focusout", handleFocusOut);
|
@@ -12201,7 +12202,7 @@ function useFocusWithin({
|
|
12201
12202
|
}
|
12202
12203
|
|
12203
12204
|
// hooks/useMediaQuery.ts
|
12204
|
-
import { useState as useState44, useEffect as
|
12205
|
+
import { useState as useState44, useEffect as useEffect29, useRef as useRef19 } from "react";
|
12205
12206
|
function attachMediaListener(query, callback) {
|
12206
12207
|
try {
|
12207
12208
|
query.addEventListener("change", callback);
|
@@ -12227,7 +12228,7 @@ function useMediaQuery(query, initialValue, { getInitialValueInEffect } = {
|
|
12227
12228
|
getInitialValueInEffect ? initialValue : getInitialValue(query, initialValue)
|
12228
12229
|
);
|
12229
12230
|
const queryRef = useRef19();
|
12230
|
-
|
12231
|
+
useEffect29(() => {
|
12231
12232
|
if ("matchMedia" in window) {
|
12232
12233
|
queryRef.current = window.matchMedia(query);
|
12233
12234
|
setMatches(queryRef.current.matches);
|
@@ -12242,16 +12243,16 @@ function useMediaQuery(query, initialValue, { getInitialValueInEffect } = {
|
|
12242
12243
|
}
|
12243
12244
|
|
12244
12245
|
// hooks/useScrollPosition.ts
|
12245
|
-
import { useState as useState45, useEffect as
|
12246
|
+
import { useState as useState45, useEffect as useEffect30 } from "react";
|
12246
12247
|
|
12247
12248
|
// hooks/useTable.ts
|
12248
|
-
import { useState as useState46, useEffect as
|
12249
|
+
import { useState as useState46, useEffect as useEffect31 } from "react";
|
12249
12250
|
|
12250
12251
|
// hooks/useTabs.ts
|
12251
|
-
import { useEffect as
|
12252
|
+
import { useEffect as useEffect32, useState as useState47 } from "react";
|
12252
12253
|
function useTabs(initialTab = "") {
|
12253
12254
|
const [activeTab, setActiveTab] = useState47(initialTab);
|
12254
|
-
|
12255
|
+
useEffect32(() => {
|
12255
12256
|
const handleHashChange = () => {
|
12256
12257
|
const hash = window.location.hash.substring(1);
|
12257
12258
|
setActiveTab(hash || initialTab);
|