@sikka/hawa 0.7.12-next → 0.7.14-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/index.d.mts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +46 -17
- package/dist/index.mjs +36 -14
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1376,6 +1376,14 @@ declare function useClipboard({ timeout }?: {
|
|
|
1376
1376
|
copied: boolean;
|
|
1377
1377
|
};
|
|
1378
1378
|
|
|
1379
|
+
declare const useBreakpoint: () => number;
|
|
1380
|
+
|
|
1381
|
+
interface WindowSize {
|
|
1382
|
+
width: number | undefined;
|
|
1383
|
+
height: number | undefined;
|
|
1384
|
+
}
|
|
1385
|
+
declare const useWindowSize: () => WindowSize;
|
|
1386
|
+
|
|
1379
1387
|
interface UseFocusWithinOptions {
|
|
1380
1388
|
onFocus?(event: FocusEvent): void;
|
|
1381
1389
|
onBlur?(event: FocusEvent): void;
|
|
@@ -1395,4 +1403,4 @@ declare function useTabs(initialTab?: string): {
|
|
|
1395
1403
|
handleTabChange: (index: any) => void;
|
|
1396
1404
|
};
|
|
1397
1405
|
|
|
1398
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionCard, AdCard, Alert, Announcement, AppLanding, AppLayout, AppStores, BackToTop, Breadcrumb, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CheckEmail, Checkbox, Chip, CodeBlock, CodeConfirmation, ColorPicker, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ComparingPlans, Copyrights, DataTable, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, EmptyState, FeedbackEmoji, FeedbackForm, FeedbackRating, FileDropzone, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HorizontalPricing, Input, InterfaceSettings, Label, LeadGenerator, LegalTexts, Loading, LoginForm, Logos, MenuItemType, NavigationMenu, NewPasswordForm, NoPermission, NotFound, PhoneInput, PinInput, Popover, PopoverContent, PopoverTrigger, PricingCard, PricingPlans, Progress, Radio, RadioOptionsTypes, RegisterForm, ResetPasswordForm, ScrollArea, ScrollBar, Select, Separator, SidebarGroup, SidebarItem, SimpleTable, Skeleton, Slider, SortButton, Stats, SubItem$2 as SubItem, Switch, TChipTypes, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Testimonial, Textarea, TextareaProps, Toast$1 as Toast, ToastAction, ToastActionElement, ToastClose, ToastDescription, ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, Usage, UseFocusWithinOptions, UseMediaQueryOptions, UserReferralSource, buttonVariants, reducer, toast, useClipboard, useFocusWithin, useFormField, useMediaQuery, useTabs, useToast };
|
|
1406
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionCard, AdCard, Alert, Announcement, AppLanding, AppLayout, AppStores, BackToTop, Breadcrumb, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CheckEmail, Checkbox, Chip, CodeBlock, CodeConfirmation, ColorPicker, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ComparingPlans, Copyrights, DataTable, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, EmptyState, FeedbackEmoji, FeedbackForm, FeedbackRating, FileDropzone, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HorizontalPricing, Input, InterfaceSettings, Label, LeadGenerator, LegalTexts, Loading, LoginForm, Logos, MenuItemType, NavigationMenu, NewPasswordForm, NoPermission, NotFound, PhoneInput, PinInput, Popover, PopoverContent, PopoverTrigger, PricingCard, PricingPlans, Progress, Radio, RadioOptionsTypes, RegisterForm, ResetPasswordForm, ScrollArea, ScrollBar, Select, Separator, SidebarGroup, SidebarItem, SimpleTable, Skeleton, Slider, SortButton, Stats, SubItem$2 as SubItem, Switch, TChipTypes, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Testimonial, Textarea, TextareaProps, Toast$1 as Toast, ToastAction, ToastActionElement, ToastClose, ToastDescription, ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, Usage, UseFocusWithinOptions, UseMediaQueryOptions, UserReferralSource, buttonVariants, reducer, toast, useBreakpoint, useClipboard, useFocusWithin, useFormField, useMediaQuery, useTabs, useToast, useWindowSize };
|
package/dist/index.d.ts
CHANGED
|
@@ -1376,6 +1376,14 @@ declare function useClipboard({ timeout }?: {
|
|
|
1376
1376
|
copied: boolean;
|
|
1377
1377
|
};
|
|
1378
1378
|
|
|
1379
|
+
declare const useBreakpoint: () => number;
|
|
1380
|
+
|
|
1381
|
+
interface WindowSize {
|
|
1382
|
+
width: number | undefined;
|
|
1383
|
+
height: number | undefined;
|
|
1384
|
+
}
|
|
1385
|
+
declare const useWindowSize: () => WindowSize;
|
|
1386
|
+
|
|
1379
1387
|
interface UseFocusWithinOptions {
|
|
1380
1388
|
onFocus?(event: FocusEvent): void;
|
|
1381
1389
|
onBlur?(event: FocusEvent): void;
|
|
@@ -1395,4 +1403,4 @@ declare function useTabs(initialTab?: string): {
|
|
|
1395
1403
|
handleTabChange: (index: any) => void;
|
|
1396
1404
|
};
|
|
1397
1405
|
|
|
1398
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionCard, AdCard, Alert, Announcement, AppLanding, AppLayout, AppStores, BackToTop, Breadcrumb, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CheckEmail, Checkbox, Chip, CodeBlock, CodeConfirmation, ColorPicker, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ComparingPlans, Copyrights, DataTable, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, EmptyState, FeedbackEmoji, FeedbackForm, FeedbackRating, FileDropzone, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HorizontalPricing, Input, InterfaceSettings, Label, LeadGenerator, LegalTexts, Loading, LoginForm, Logos, MenuItemType, NavigationMenu, NewPasswordForm, NoPermission, NotFound, PhoneInput, PinInput, Popover, PopoverContent, PopoverTrigger, PricingCard, PricingPlans, Progress, Radio, RadioOptionsTypes, RegisterForm, ResetPasswordForm, ScrollArea, ScrollBar, Select, Separator, SidebarGroup, SidebarItem, SimpleTable, Skeleton, Slider, SortButton, Stats, SubItem$2 as SubItem, Switch, TChipTypes, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Testimonial, Textarea, TextareaProps, Toast$1 as Toast, ToastAction, ToastActionElement, ToastClose, ToastDescription, ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, Usage, UseFocusWithinOptions, UseMediaQueryOptions, UserReferralSource, buttonVariants, reducer, toast, useClipboard, useFocusWithin, useFormField, useMediaQuery, useTabs, useToast };
|
|
1406
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionCard, AdCard, Alert, Announcement, AppLanding, AppLayout, AppStores, BackToTop, Breadcrumb, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CheckEmail, Checkbox, Chip, CodeBlock, CodeConfirmation, ColorPicker, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ComparingPlans, Copyrights, DataTable, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, EmptyState, FeedbackEmoji, FeedbackForm, FeedbackRating, FileDropzone, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HorizontalPricing, Input, InterfaceSettings, Label, LeadGenerator, LegalTexts, Loading, LoginForm, Logos, MenuItemType, NavigationMenu, NewPasswordForm, NoPermission, NotFound, PhoneInput, PinInput, Popover, PopoverContent, PopoverTrigger, PricingCard, PricingPlans, Progress, Radio, RadioOptionsTypes, RegisterForm, ResetPasswordForm, ScrollArea, ScrollBar, Select, Separator, SidebarGroup, SidebarItem, SimpleTable, Skeleton, Slider, SortButton, Stats, SubItem$2 as SubItem, Switch, TChipTypes, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Testimonial, Textarea, TextareaProps, Toast$1 as Toast, ToastAction, ToastActionElement, ToastClose, ToastDescription, ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, Usage, UseFocusWithinOptions, UseMediaQueryOptions, UserReferralSource, buttonVariants, reducer, toast, useBreakpoint, useClipboard, useFocusWithin, useFormField, useMediaQuery, useTabs, useToast, useWindowSize };
|
package/dist/index.js
CHANGED
|
@@ -715,6 +715,9 @@ __export(components_exports, {
|
|
|
715
715
|
toast: function() {
|
|
716
716
|
return toast;
|
|
717
717
|
},
|
|
718
|
+
useBreakpoint: function() {
|
|
719
|
+
return useBreakpoint;
|
|
720
|
+
},
|
|
718
721
|
useClipboard: function() {
|
|
719
722
|
return useClipboard;
|
|
720
723
|
},
|
|
@@ -732,6 +735,9 @@ __export(components_exports, {
|
|
|
732
735
|
},
|
|
733
736
|
useToast: function() {
|
|
734
737
|
return useToast;
|
|
738
|
+
},
|
|
739
|
+
useWindowSize: function() {
|
|
740
|
+
return useWindowSize;
|
|
735
741
|
}
|
|
736
742
|
});
|
|
737
743
|
module.exports = __toCommonJS(components_exports);
|
|
@@ -6294,7 +6300,6 @@ var useBreakpoint = function() {
|
|
|
6294
6300
|
}, []);
|
|
6295
6301
|
return breakpoint;
|
|
6296
6302
|
};
|
|
6297
|
-
var useBreakpoint_default = useBreakpoint;
|
|
6298
6303
|
// components/layout/AppLayout.tsx
|
|
6299
6304
|
var AppLayout = function(_param) {
|
|
6300
6305
|
var _param_direction = _param.direction, direction = _param_direction === void 0 ? "ltr" : _param_direction, _param_drawerSize = _param.drawerSize, drawerSize = _param_drawerSize === void 0 ? "md" : _param_drawerSize, onSettingsClick = _param.onSettingsClick, DrawerFooterActions = _param.DrawerFooterActions, currentPage = _param.currentPage, clickedItem = _param.clickedItem, _param_design = _param.design, design = _param_design === void 0 ? "default" : _param_design, props = _object_without_properties(_param, [
|
|
@@ -6325,7 +6330,7 @@ var AppLayout = function(_param) {
|
|
|
6325
6330
|
var isRTL = direction === "rtl";
|
|
6326
6331
|
var _ref = _sliced_to_array((0, import_react31.useState)(""), 2), openedSidebarItem = _ref[0], setOpenedSidebarItem = _ref[1];
|
|
6327
6332
|
var _ref1 = _sliced_to_array((0, import_react31.useState)(currentPage), 2), selectedItem = _ref1[0], setSelectedItem = _ref1[1];
|
|
6328
|
-
var size =
|
|
6333
|
+
var size = useBreakpoint();
|
|
6329
6334
|
if (typeof window == "undefined") {
|
|
6330
6335
|
size = 1200;
|
|
6331
6336
|
}
|
|
@@ -8352,8 +8357,30 @@ var import_react55 = require("react");
|
|
|
8352
8357
|
var import_react56 = require("react");
|
|
8353
8358
|
// components/hooks/useCarousel.ts
|
|
8354
8359
|
var import_react57 = require("react");
|
|
8355
|
-
// components/hooks/
|
|
8360
|
+
// components/hooks/useWindowSize.ts
|
|
8356
8361
|
var import_react58 = require("react");
|
|
8362
|
+
var useWindowSize = function() {
|
|
8363
|
+
var _ref = _sliced_to_array((0, import_react58.useState)({
|
|
8364
|
+
width: void 0,
|
|
8365
|
+
height: void 0
|
|
8366
|
+
}), 2), windowSize = _ref[0], setWindowSize = _ref[1];
|
|
8367
|
+
(0, import_react58.useEffect)(function() {
|
|
8368
|
+
var handleResize = function handleResize() {
|
|
8369
|
+
setWindowSize({
|
|
8370
|
+
width: window.innerWidth,
|
|
8371
|
+
height: window.innerHeight
|
|
8372
|
+
});
|
|
8373
|
+
};
|
|
8374
|
+
window.addEventListener("resize", handleResize);
|
|
8375
|
+
handleResize();
|
|
8376
|
+
return function() {
|
|
8377
|
+
return window.removeEventListener("resize", handleResize);
|
|
8378
|
+
};
|
|
8379
|
+
}, []);
|
|
8380
|
+
return windowSize;
|
|
8381
|
+
};
|
|
8382
|
+
// components/hooks/useFocusWithin.ts
|
|
8383
|
+
var import_react59 = require("react");
|
|
8357
8384
|
function containsRelatedTarget(event) {
|
|
8358
8385
|
if (_instanceof(event.currentTarget, HTMLElement) && _instanceof(event.relatedTarget, HTMLElement)) {
|
|
8359
8386
|
return event.currentTarget.contains(event.relatedTarget);
|
|
@@ -8362,9 +8389,9 @@ function containsRelatedTarget(event) {
|
|
|
8362
8389
|
}
|
|
8363
8390
|
function useFocusWithin() {
|
|
8364
8391
|
var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, onBlur = _ref.onBlur, onFocus = _ref.onFocus;
|
|
8365
|
-
var ref = (0,
|
|
8366
|
-
var _ref1 = _sliced_to_array((0,
|
|
8367
|
-
var focusedRef = (0,
|
|
8392
|
+
var ref = (0, import_react59.useRef)(null);
|
|
8393
|
+
var _ref1 = _sliced_to_array((0, import_react59.useState)(false), 2), focused = _ref1[0], _setFocused = _ref1[1];
|
|
8394
|
+
var focusedRef = (0, import_react59.useRef)(false);
|
|
8368
8395
|
var setFocused = function(value) {
|
|
8369
8396
|
_setFocused(value);
|
|
8370
8397
|
focusedRef.current = value;
|
|
@@ -8381,7 +8408,7 @@ function useFocusWithin() {
|
|
|
8381
8408
|
onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
|
|
8382
8409
|
}
|
|
8383
8410
|
};
|
|
8384
|
-
(0,
|
|
8411
|
+
(0, import_react59.useEffect)(function() {
|
|
8385
8412
|
if (ref.current) {
|
|
8386
8413
|
ref.current.addEventListener("focusin", handleFocusIn);
|
|
8387
8414
|
ref.current.addEventListener("focusout", handleFocusOut);
|
|
@@ -8402,7 +8429,7 @@ function useFocusWithin() {
|
|
|
8402
8429
|
};
|
|
8403
8430
|
}
|
|
8404
8431
|
// components/hooks/useMediaQuery.ts
|
|
8405
|
-
var
|
|
8432
|
+
var import_react60 = require("react");
|
|
8406
8433
|
function attachMediaListener(query, callback) {
|
|
8407
8434
|
try {
|
|
8408
8435
|
query.addEventListener("change", callback);
|
|
@@ -8429,9 +8456,9 @@ function useMediaQuery(query, initialValue) {
|
|
|
8429
8456
|
var getInitialValueInEffect = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
|
|
8430
8457
|
getInitialValueInEffect: true
|
|
8431
8458
|
}).getInitialValueInEffect;
|
|
8432
|
-
var _ref = _sliced_to_array((0,
|
|
8433
|
-
var queryRef = (0,
|
|
8434
|
-
(0,
|
|
8459
|
+
var _ref = _sliced_to_array((0, import_react60.useState)(getInitialValueInEffect ? initialValue : getInitialValue(query, initialValue)), 2), matches = _ref[0], setMatches = _ref[1];
|
|
8460
|
+
var queryRef = (0, import_react60.useRef)();
|
|
8461
|
+
(0, import_react60.useEffect)(function() {
|
|
8435
8462
|
if ("matchMedia" in window) {
|
|
8436
8463
|
queryRef.current = window.matchMedia(query);
|
|
8437
8464
|
setMatches(queryRef.current.matches);
|
|
@@ -8446,15 +8473,15 @@ function useMediaQuery(query, initialValue) {
|
|
|
8446
8473
|
return matches;
|
|
8447
8474
|
}
|
|
8448
8475
|
// components/hooks/useScrollPosition.ts
|
|
8449
|
-
var import_react60 = require("react");
|
|
8450
|
-
// components/hooks/useTable.ts
|
|
8451
8476
|
var import_react61 = require("react");
|
|
8452
|
-
// components/hooks/
|
|
8477
|
+
// components/hooks/useTable.ts
|
|
8453
8478
|
var import_react62 = require("react");
|
|
8479
|
+
// components/hooks/useTabs.ts
|
|
8480
|
+
var import_react63 = require("react");
|
|
8454
8481
|
function useTabs() {
|
|
8455
8482
|
var initialTab = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
8456
|
-
var _ref = _sliced_to_array((0,
|
|
8457
|
-
(0,
|
|
8483
|
+
var _ref = _sliced_to_array((0, import_react63.useState)(initialTab), 2), activeTab = _ref[0], setActiveTab = _ref[1];
|
|
8484
|
+
(0, import_react63.useEffect)(function() {
|
|
8458
8485
|
var handleHashChange = function() {
|
|
8459
8486
|
var hash = window.location.hash.substring(1);
|
|
8460
8487
|
setActiveTab(hash || initialTab);
|
|
@@ -8601,10 +8628,12 @@ function useTabs() {
|
|
|
8601
8628
|
buttonVariants: buttonVariants,
|
|
8602
8629
|
reducer: reducer,
|
|
8603
8630
|
toast: toast,
|
|
8631
|
+
useBreakpoint: useBreakpoint,
|
|
8604
8632
|
useClipboard: useClipboard,
|
|
8605
8633
|
useFocusWithin: useFocusWithin,
|
|
8606
8634
|
useFormField: useFormField,
|
|
8607
8635
|
useMediaQuery: useMediaQuery,
|
|
8608
8636
|
useTabs: useTabs,
|
|
8609
|
-
useToast: useToast
|
|
8637
|
+
useToast: useToast,
|
|
8638
|
+
useWindowSize: useWindowSize
|
|
8610
8639
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -6028,7 +6028,6 @@ var useBreakpoint = () => {
|
|
|
6028
6028
|
}, []);
|
|
6029
6029
|
return breakpoint;
|
|
6030
6030
|
};
|
|
6031
|
-
var useBreakpoint_default = useBreakpoint;
|
|
6032
6031
|
|
|
6033
6032
|
// components/layout/AppLayout.tsx
|
|
6034
6033
|
var AppLayout = ({
|
|
@@ -6059,7 +6058,7 @@ var AppLayout = ({
|
|
|
6059
6058
|
const isRTL = direction === "rtl";
|
|
6060
6059
|
const [openedSidebarItem, setOpenedSidebarItem] = useState18("");
|
|
6061
6060
|
const [selectedItem, setSelectedItem] = useState18(currentPage);
|
|
6062
|
-
let size =
|
|
6061
|
+
let size = useBreakpoint();
|
|
6063
6062
|
if (typeof window == "undefined") {
|
|
6064
6063
|
size = 1200;
|
|
6065
6064
|
}
|
|
@@ -8161,8 +8160,29 @@ import { useEffect as useEffect14, useRef as useRef9, useState as useState28 } f
|
|
|
8161
8160
|
// components/hooks/useCarousel.ts
|
|
8162
8161
|
import { useState as useState29, useRef as useRef10 } from "react";
|
|
8163
8162
|
|
|
8163
|
+
// components/hooks/useWindowSize.ts
|
|
8164
|
+
import { useEffect as useEffect15, useState as useState30 } from "react";
|
|
8165
|
+
var useWindowSize = () => {
|
|
8166
|
+
const [windowSize, setWindowSize] = useState30({
|
|
8167
|
+
width: void 0,
|
|
8168
|
+
height: void 0
|
|
8169
|
+
});
|
|
8170
|
+
useEffect15(() => {
|
|
8171
|
+
function handleResize() {
|
|
8172
|
+
setWindowSize({
|
|
8173
|
+
width: window.innerWidth,
|
|
8174
|
+
height: window.innerHeight
|
|
8175
|
+
});
|
|
8176
|
+
}
|
|
8177
|
+
window.addEventListener("resize", handleResize);
|
|
8178
|
+
handleResize();
|
|
8179
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
8180
|
+
}, []);
|
|
8181
|
+
return windowSize;
|
|
8182
|
+
};
|
|
8183
|
+
|
|
8164
8184
|
// components/hooks/useFocusWithin.ts
|
|
8165
|
-
import { useRef as useRef11, useState as
|
|
8185
|
+
import { useRef as useRef11, useState as useState31, useEffect as useEffect16 } from "react";
|
|
8166
8186
|
function containsRelatedTarget(event) {
|
|
8167
8187
|
if (event.currentTarget instanceof HTMLElement && event.relatedTarget instanceof HTMLElement) {
|
|
8168
8188
|
return event.currentTarget.contains(event.relatedTarget);
|
|
@@ -8174,7 +8194,7 @@ function useFocusWithin({
|
|
|
8174
8194
|
onFocus
|
|
8175
8195
|
} = {}) {
|
|
8176
8196
|
const ref = useRef11(null);
|
|
8177
|
-
const [focused, _setFocused] =
|
|
8197
|
+
const [focused, _setFocused] = useState31(false);
|
|
8178
8198
|
const focusedRef = useRef11(false);
|
|
8179
8199
|
const setFocused = (value) => {
|
|
8180
8200
|
_setFocused(value);
|
|
@@ -8192,7 +8212,7 @@ function useFocusWithin({
|
|
|
8192
8212
|
onBlur?.(event);
|
|
8193
8213
|
}
|
|
8194
8214
|
};
|
|
8195
|
-
|
|
8215
|
+
useEffect16(() => {
|
|
8196
8216
|
if (ref.current) {
|
|
8197
8217
|
ref.current.addEventListener("focusin", handleFocusIn);
|
|
8198
8218
|
ref.current.addEventListener("focusout", handleFocusOut);
|
|
@@ -8207,7 +8227,7 @@ function useFocusWithin({
|
|
|
8207
8227
|
}
|
|
8208
8228
|
|
|
8209
8229
|
// components/hooks/useMediaQuery.ts
|
|
8210
|
-
import { useState as
|
|
8230
|
+
import { useState as useState32, useEffect as useEffect17, useRef as useRef12 } from "react";
|
|
8211
8231
|
function attachMediaListener(query, callback) {
|
|
8212
8232
|
try {
|
|
8213
8233
|
query.addEventListener("change", callback);
|
|
@@ -8229,11 +8249,11 @@ function getInitialValue(query, initialValue) {
|
|
|
8229
8249
|
function useMediaQuery(query, initialValue, { getInitialValueInEffect } = {
|
|
8230
8250
|
getInitialValueInEffect: true
|
|
8231
8251
|
}) {
|
|
8232
|
-
const [matches, setMatches] =
|
|
8252
|
+
const [matches, setMatches] = useState32(
|
|
8233
8253
|
getInitialValueInEffect ? initialValue : getInitialValue(query, initialValue)
|
|
8234
8254
|
);
|
|
8235
8255
|
const queryRef = useRef12();
|
|
8236
|
-
|
|
8256
|
+
useEffect17(() => {
|
|
8237
8257
|
if ("matchMedia" in window) {
|
|
8238
8258
|
queryRef.current = window.matchMedia(query);
|
|
8239
8259
|
setMatches(queryRef.current.matches);
|
|
@@ -8248,16 +8268,16 @@ function useMediaQuery(query, initialValue, { getInitialValueInEffect } = {
|
|
|
8248
8268
|
}
|
|
8249
8269
|
|
|
8250
8270
|
// components/hooks/useScrollPosition.ts
|
|
8251
|
-
import { useState as
|
|
8271
|
+
import { useState as useState33, useEffect as useEffect18 } from "react";
|
|
8252
8272
|
|
|
8253
8273
|
// components/hooks/useTable.ts
|
|
8254
|
-
import { useState as
|
|
8274
|
+
import { useState as useState34, useEffect as useEffect19 } from "react";
|
|
8255
8275
|
|
|
8256
8276
|
// components/hooks/useTabs.ts
|
|
8257
|
-
import { useEffect as
|
|
8277
|
+
import { useEffect as useEffect20, useState as useState35 } from "react";
|
|
8258
8278
|
function useTabs(initialTab = "") {
|
|
8259
|
-
const [activeTab, setActiveTab] =
|
|
8260
|
-
|
|
8279
|
+
const [activeTab, setActiveTab] = useState35(initialTab);
|
|
8280
|
+
useEffect20(() => {
|
|
8261
8281
|
const handleHashChange = () => {
|
|
8262
8282
|
const hash = window.location.hash.substring(1);
|
|
8263
8283
|
setActiveTab(hash || initialTab);
|
|
@@ -8401,10 +8421,12 @@ export {
|
|
|
8401
8421
|
buttonVariants,
|
|
8402
8422
|
reducer,
|
|
8403
8423
|
toast,
|
|
8424
|
+
useBreakpoint,
|
|
8404
8425
|
useClipboard,
|
|
8405
8426
|
useFocusWithin,
|
|
8406
8427
|
useFormField,
|
|
8407
8428
|
useMediaQuery,
|
|
8408
8429
|
useTabs,
|
|
8409
|
-
useToast
|
|
8430
|
+
useToast,
|
|
8431
|
+
useWindowSize
|
|
8410
8432
|
};
|