@sikka/hawa 0.19.5-next → 0.19.8-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.css CHANGED
@@ -995,8 +995,11 @@ input[type="number"]::-webkit-inner-spin-button,
995
995
  .hawa-bottom-4 {
996
996
  bottom: 1rem;
997
997
  }
998
- .hawa-bottom-\[60px\] {
999
- bottom: 60px;
998
+ .hawa-bottom-\[62px\] {
999
+ bottom: 62px;
1000
+ }
1001
+ .hawa-bottom-\[80px\] {
1002
+ bottom: 80px;
1000
1003
  }
1001
1004
  .hawa-end-0 {
1002
1005
  inset-inline-end: 0px;
@@ -1076,6 +1079,9 @@ input[type="number"]::-webkit-inner-spin-button,
1076
1079
  .hawa-top-\[60px\] {
1077
1080
  top: 60px;
1078
1081
  }
1082
+ .hawa-top-\[62px\] {
1083
+ top: 62px;
1084
+ }
1079
1085
  .hawa-top-\[72px\] {
1080
1086
  top: 72px;
1081
1087
  }
@@ -1478,6 +1484,9 @@ input[type="number"]::-webkit-inner-spin-button,
1478
1484
  .hawa-min-h-\[37\.75px\] {
1479
1485
  min-height: 37.75px;
1480
1486
  }
1487
+ .hawa-min-h-\[40px\] {
1488
+ min-height: 40px;
1489
+ }
1481
1490
  .hawa-min-h-fit {
1482
1491
  min-height: -moz-fit-content;
1483
1492
  min-height: fit-content;
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { FC, ChangeEvent, InputHTMLAttributes, ReactNode, PropsWithChildren, RefObject, useEffect } from 'react';
2
+ import React__default, { FC, ChangeEvent, FormEvent, InputHTMLAttributes, ReactNode, PropsWithChildren, RefObject, useEffect } from 'react';
3
3
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
4
4
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
5
5
  import * as SwitchPrimitives from '@radix-ui/react-switch';
@@ -48,6 +48,7 @@ type AdCardTypes = {
48
48
  handleCantHide?: () => void;
49
49
  handleClick?: (e: React__default.MouseEvent) => void;
50
50
  canHide: boolean;
51
+ className?: string;
51
52
  };
52
53
  declare const AdCard: FC<AdCardTypes>;
53
54
 
@@ -186,6 +187,7 @@ interface ItemCardTypes {
186
187
  clickableImageActionText?: string;
187
188
  /** The icon of the action button on the image of the card */
188
189
  clickableImageActionIcon?: any;
190
+ className?: string;
189
191
  }
190
192
  declare const ItemCard: FC<ItemCardTypes>;
191
193
 
@@ -210,6 +212,7 @@ type PinInputTypes = {
210
212
  getPins?: (pins: string[]) => void;
211
213
  /** The small red text under the input field to show validation or a hint. */
212
214
  helperText?: any;
215
+ inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
213
216
  };
214
217
  declare const PinInput: FC<PinInputTypes>;
215
218
 
@@ -277,6 +280,8 @@ interface TextareaProps extends React$1.TextareaHTMLAttributes<HTMLTextAreaEleme
277
280
  labelProps?: LabelProps;
278
281
  forceHideHelperText?: boolean;
279
282
  textareaProps?: React$1.TextareaHTMLAttributes<HTMLTextAreaElement>;
283
+ showCount?: boolean;
284
+ countPosition?: "top" | "bottom";
280
285
  }
281
286
  declare const Textarea: React$1.ForwardRefExoticComponent<TextareaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
282
287
 
@@ -290,7 +295,7 @@ type ColorPickerTypes = {
290
295
  /** The hex code for the color */
291
296
  color?: any;
292
297
  /** Fires everytime the color changes */
293
- handleChange?: (e: ChangeEvent<HTMLInputElement>) => void;
298
+ handleChange?: (e: ChangeEvent<HTMLInputElement> | FormEvent<HTMLInputElement>) => void;
294
299
  colorPickerClassNames?: string;
295
300
  colorTextClassNames?: string;
296
301
  colorPickerProps?: InputHTMLAttributes<HTMLInputElement>;
@@ -435,6 +440,7 @@ declare const DialogContent: React$1.ForwardRefExoticComponent<Omit<SheetPrimiti
435
440
  } & React$1.RefAttributes<HTMLDivElement>>;
436
441
  declare const DialogCarouselContent: React$1.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
437
442
  hideCloseButton?: boolean | undefined;
443
+ hidePrevButton?: boolean | undefined;
438
444
  persist?: boolean | undefined;
439
445
  onPrev?: (() => void) | undefined;
440
446
  } & React$1.RefAttributes<HTMLDivElement>>;
@@ -1838,6 +1844,7 @@ declare const useDialogCarousel: (options?: any) => {
1838
1844
  emblaApi: embla_carousel_react.EmblaCarouselType | undefined;
1839
1845
  nextStep: () => void;
1840
1846
  prevStep: () => void;
1847
+ canScrollPrev: boolean;
1841
1848
  };
1842
1849
 
1843
1850
  declare const useMultiStepDialog: (initialStep: any, stepIds: any[], setOpenDialog: any) => {
@@ -1884,4 +1891,4 @@ declare function useTabs(initialTab?: string): {
1884
1891
  handleTabChange: (index: any) => void;
1885
1892
  };
1886
1893
 
1887
- export { Accordion, AccordionContent, AccordionItem, AccordionRoot, AccordionTrigger, ActionCard, AdCard, Alert, Announcement, AppLanding, AppLayout, AppSidebarItemProps, AppStores, AppTabs, AppTopbar, Avatar, BackToTop, Badge, BadgedComponent, Breadcrumb, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CheckEmail, Checkbox, Chip, ChipColors, ChipTypes, CodeBlock, CodeConfirmation, ColorPicker, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ComparingPlans, Copyrights, Count, DataTable, DestroyableCard, Dialog, DialogBody, DialogCarousel, DialogCarouselContent, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogStep, DialogSteps, DialogTitle, DialogTrigger, DocsLayout, DocsSidebar, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadio, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FeedbackEmoji, FeedbackForm, FeedbackRating, FileDropzone, FileUploader, HorizontalPricing, Input, InterfaceSettings, ItemCard, Label, LabelProps, LandingCard, LeadGenerator, LegalTexts, Loading, LoginForm, Logos, MenuItemType, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavMenuItem, Navbar, NavigationMenu, NavigationMenuLink, NewPasswordForm, NoPermission, NotFound, Pagination, PasswordInput, PasswordStrengthIndicator, PhoneInput, PinInput, Popover, PopoverContent, PopoverTrigger, PricingCard, PricingPlans, Progress, ProgressCircle, Radio, RadioOptionsTypes, RegisterForm, ResetPasswordForm, ScrollArea, ScrollBar, ScrollIndicator, Select, SelectOptionProps, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarGroup, SidebarItem, SimpleTable, Skeleton, Slider, SortButton, SplitButton, Stats, StopPropagationWrapper, SubItem$1 as SubItem, Switch, 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, useDialogCarousel, useFocusWithin, useIsomorphicEffect, useMediaQuery, useMultiStepDialog, useTabs, useToast, useWindowSize };
1894
+ export { Accordion, AccordionContent, AccordionItem, AccordionRoot, AccordionTrigger, ActionCard, AdCard, Alert, Announcement, AppLanding, AppLayout, type AppSidebarItemProps, AppStores, AppTabs, AppTopbar, Avatar, BackToTop, Badge, BadgedComponent, Breadcrumb, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CheckEmail, Checkbox, Chip, type ChipColors, type ChipTypes, CodeBlock, CodeConfirmation, ColorPicker, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ComparingPlans, Copyrights, Count, DataTable, DestroyableCard, Dialog, DialogBody, DialogCarousel, DialogCarouselContent, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogStep, DialogSteps, DialogTitle, DialogTrigger, DocsLayout, DocsSidebar, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadio, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FeedbackEmoji, FeedbackForm, FeedbackRating, FileDropzone, FileUploader, HorizontalPricing, Input, InterfaceSettings, ItemCard, Label, type LabelProps, LandingCard, LeadGenerator, LegalTexts, Loading, LoginForm, Logos, type MenuItemType, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavMenuItem, Navbar, NavigationMenu, NavigationMenuLink, NewPasswordForm, NoPermission, NotFound, Pagination, PasswordInput, PasswordStrengthIndicator, PhoneInput, PinInput, Popover, PopoverContent, PopoverTrigger, PricingCard, PricingPlans, Progress, ProgressCircle, Radio, type RadioOptionsTypes, RegisterForm, ResetPasswordForm, ScrollArea, ScrollBar, ScrollIndicator, Select, type SelectOptionProps, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarGroup, SidebarItem, SimpleTable, Skeleton, Slider, SortButton, SplitButton, Stats, StopPropagationWrapper, type SubItem$1 as SubItem, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Testimonial, Textarea, type TextareaProps, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, Usage, type UseFocusWithinOptions, type UseMediaQueryOptions, UserReferralSource, buttonVariants, reducer, toast, useBreakpoint, useClipboard, useDialogCarousel, useFocusWithin, useIsomorphicEffect, useMediaQuery, useMultiStepDialog, useTabs, useToast, useWindowSize };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { FC, ChangeEvent, InputHTMLAttributes, ReactNode, PropsWithChildren, RefObject, useEffect } from 'react';
2
+ import React__default, { FC, ChangeEvent, FormEvent, InputHTMLAttributes, ReactNode, PropsWithChildren, RefObject, useEffect } from 'react';
3
3
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
4
4
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
5
5
  import * as SwitchPrimitives from '@radix-ui/react-switch';
@@ -48,6 +48,7 @@ type AdCardTypes = {
48
48
  handleCantHide?: () => void;
49
49
  handleClick?: (e: React__default.MouseEvent) => void;
50
50
  canHide: boolean;
51
+ className?: string;
51
52
  };
52
53
  declare const AdCard: FC<AdCardTypes>;
53
54
 
@@ -186,6 +187,7 @@ interface ItemCardTypes {
186
187
  clickableImageActionText?: string;
187
188
  /** The icon of the action button on the image of the card */
188
189
  clickableImageActionIcon?: any;
190
+ className?: string;
189
191
  }
190
192
  declare const ItemCard: FC<ItemCardTypes>;
191
193
 
@@ -210,6 +212,7 @@ type PinInputTypes = {
210
212
  getPins?: (pins: string[]) => void;
211
213
  /** The small red text under the input field to show validation or a hint. */
212
214
  helperText?: any;
215
+ inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
213
216
  };
214
217
  declare const PinInput: FC<PinInputTypes>;
215
218
 
@@ -277,6 +280,8 @@ interface TextareaProps extends React$1.TextareaHTMLAttributes<HTMLTextAreaEleme
277
280
  labelProps?: LabelProps;
278
281
  forceHideHelperText?: boolean;
279
282
  textareaProps?: React$1.TextareaHTMLAttributes<HTMLTextAreaElement>;
283
+ showCount?: boolean;
284
+ countPosition?: "top" | "bottom";
280
285
  }
281
286
  declare const Textarea: React$1.ForwardRefExoticComponent<TextareaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
282
287
 
@@ -290,7 +295,7 @@ type ColorPickerTypes = {
290
295
  /** The hex code for the color */
291
296
  color?: any;
292
297
  /** Fires everytime the color changes */
293
- handleChange?: (e: ChangeEvent<HTMLInputElement>) => void;
298
+ handleChange?: (e: ChangeEvent<HTMLInputElement> | FormEvent<HTMLInputElement>) => void;
294
299
  colorPickerClassNames?: string;
295
300
  colorTextClassNames?: string;
296
301
  colorPickerProps?: InputHTMLAttributes<HTMLInputElement>;
@@ -435,6 +440,7 @@ declare const DialogContent: React$1.ForwardRefExoticComponent<Omit<SheetPrimiti
435
440
  } & React$1.RefAttributes<HTMLDivElement>>;
436
441
  declare const DialogCarouselContent: React$1.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
437
442
  hideCloseButton?: boolean | undefined;
443
+ hidePrevButton?: boolean | undefined;
438
444
  persist?: boolean | undefined;
439
445
  onPrev?: (() => void) | undefined;
440
446
  } & React$1.RefAttributes<HTMLDivElement>>;
@@ -1838,6 +1844,7 @@ declare const useDialogCarousel: (options?: any) => {
1838
1844
  emblaApi: embla_carousel_react.EmblaCarouselType | undefined;
1839
1845
  nextStep: () => void;
1840
1846
  prevStep: () => void;
1847
+ canScrollPrev: boolean;
1841
1848
  };
1842
1849
 
1843
1850
  declare const useMultiStepDialog: (initialStep: any, stepIds: any[], setOpenDialog: any) => {
@@ -1884,4 +1891,4 @@ declare function useTabs(initialTab?: string): {
1884
1891
  handleTabChange: (index: any) => void;
1885
1892
  };
1886
1893
 
1887
- export { Accordion, AccordionContent, AccordionItem, AccordionRoot, AccordionTrigger, ActionCard, AdCard, Alert, Announcement, AppLanding, AppLayout, AppSidebarItemProps, AppStores, AppTabs, AppTopbar, Avatar, BackToTop, Badge, BadgedComponent, Breadcrumb, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CheckEmail, Checkbox, Chip, ChipColors, ChipTypes, CodeBlock, CodeConfirmation, ColorPicker, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ComparingPlans, Copyrights, Count, DataTable, DestroyableCard, Dialog, DialogBody, DialogCarousel, DialogCarouselContent, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogStep, DialogSteps, DialogTitle, DialogTrigger, DocsLayout, DocsSidebar, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadio, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FeedbackEmoji, FeedbackForm, FeedbackRating, FileDropzone, FileUploader, HorizontalPricing, Input, InterfaceSettings, ItemCard, Label, LabelProps, LandingCard, LeadGenerator, LegalTexts, Loading, LoginForm, Logos, MenuItemType, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavMenuItem, Navbar, NavigationMenu, NavigationMenuLink, NewPasswordForm, NoPermission, NotFound, Pagination, PasswordInput, PasswordStrengthIndicator, PhoneInput, PinInput, Popover, PopoverContent, PopoverTrigger, PricingCard, PricingPlans, Progress, ProgressCircle, Radio, RadioOptionsTypes, RegisterForm, ResetPasswordForm, ScrollArea, ScrollBar, ScrollIndicator, Select, SelectOptionProps, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarGroup, SidebarItem, SimpleTable, Skeleton, Slider, SortButton, SplitButton, Stats, StopPropagationWrapper, SubItem$1 as SubItem, Switch, 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, useDialogCarousel, useFocusWithin, useIsomorphicEffect, useMediaQuery, useMultiStepDialog, useTabs, useToast, useWindowSize };
1894
+ export { Accordion, AccordionContent, AccordionItem, AccordionRoot, AccordionTrigger, ActionCard, AdCard, Alert, Announcement, AppLanding, AppLayout, type AppSidebarItemProps, AppStores, AppTabs, AppTopbar, Avatar, BackToTop, Badge, BadgedComponent, Breadcrumb, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CheckEmail, Checkbox, Chip, type ChipColors, type ChipTypes, CodeBlock, CodeConfirmation, ColorPicker, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ComparingPlans, Copyrights, Count, DataTable, DestroyableCard, Dialog, DialogBody, DialogCarousel, DialogCarouselContent, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogStep, DialogSteps, DialogTitle, DialogTrigger, DocsLayout, DocsSidebar, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadio, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FeedbackEmoji, FeedbackForm, FeedbackRating, FileDropzone, FileUploader, HorizontalPricing, Input, InterfaceSettings, ItemCard, Label, type LabelProps, LandingCard, LeadGenerator, LegalTexts, Loading, LoginForm, Logos, type MenuItemType, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavMenuItem, Navbar, NavigationMenu, NavigationMenuLink, NewPasswordForm, NoPermission, NotFound, Pagination, PasswordInput, PasswordStrengthIndicator, PhoneInput, PinInput, Popover, PopoverContent, PopoverTrigger, PricingCard, PricingPlans, Progress, ProgressCircle, Radio, type RadioOptionsTypes, RegisterForm, ResetPasswordForm, ScrollArea, ScrollBar, ScrollIndicator, Select, type SelectOptionProps, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarGroup, SidebarItem, SimpleTable, Skeleton, Slider, SortButton, SplitButton, Stats, StopPropagationWrapper, type SubItem$1 as SubItem, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Testimonial, Textarea, type TextareaProps, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Tooltip, Usage, type UseFocusWithinOptions, type UseMediaQueryOptions, UserReferralSource, buttonVariants, reducer, toast, useBreakpoint, useClipboard, useDialogCarousel, useFocusWithin, useIsomorphicEffect, useMediaQuery, useMultiStepDialog, useTabs, useToast, useWindowSize };
package/dist/index.js CHANGED
@@ -279,7 +279,10 @@ function cn(...inputs) {
279
279
 
280
280
  // components/elements/cards/AdCard.tsx
281
281
  var import_react2 = __toESM(require("react"));
282
- var AdCard = ({ orientation, ...props }) => {
282
+ var AdCard = ({
283
+ orientation = "vertical",
284
+ ...props
285
+ }) => {
283
286
  const adRef = (0, import_react2.useRef)(null);
284
287
  const [closed, setClosed] = (0, import_react2.useState)(false);
285
288
  let duration = 0;
@@ -311,8 +314,7 @@ var AdCard = ({ orientation, ...props }) => {
311
314
  return /* @__PURE__ */ import_react2.default.createElement("div", { ref: adRef }, /* @__PURE__ */ import_react2.default.createElement(
312
315
  "div",
313
316
  {
314
- className: cn(cardStyles[orientation], ""),
315
- ...props,
317
+ className: cn(cardStyles[orientation], props.className),
316
318
  onClick: props.handleClick
317
319
  },
318
320
  /* @__PURE__ */ import_react2.default.createElement("div", { className: "hawa-flex hawa-aspect-square hawa-w-full hawa-max-w-fit hawa-items-start " }, /* @__PURE__ */ import_react2.default.createElement(
@@ -935,7 +937,7 @@ var DropdownMenuContent = React10.forwardRef(({ className, sideOffset = 4, ...pr
935
937
  }
936
938
  )));
937
939
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
938
- var DropdownMenuItem = React10.forwardRef(({ className, inset, slug, ...props }, ref) => {
940
+ var DropdownMenuItem = React10.forwardRef(({ className, inset, badged, slug, ...props }, ref) => {
939
941
  return /* @__PURE__ */ React10.createElement("a", { href: slug }, /* @__PURE__ */ React10.createElement(
940
942
  DropdownMenuPrimitive.Item,
941
943
  {
@@ -952,7 +954,7 @@ var DropdownMenuItem = React10.forwardRef(({ className, inset, slug, ...props },
952
954
  /* @__PURE__ */ React10.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 " }, props.children),
953
955
  props.end && props.end,
954
956
  !props.end && props.shortcut && /* @__PURE__ */ React10.createElement(DropdownMenuShortcut, null, props.shortcut),
955
- !props.end && props.badged && /* @__PURE__ */ React10.createElement("div", { className: "hawa-h-3 hawa-w-3 hawa-bg-red-500 hawa-rounded-full" })
957
+ !props.end && badged && /* @__PURE__ */ React10.createElement("div", { className: "hawa-h-3 hawa-w-3 hawa-bg-red-500 hawa-rounded-full" })
956
958
  ));
957
959
  });
958
960
  DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
@@ -1202,7 +1204,7 @@ var DropdownMenuRadio = (props) => {
1202
1204
  value: props.value,
1203
1205
  onValueChange: props.onValueChange
1204
1206
  },
1205
- props.options.map((opt) => /* @__PURE__ */ React10.createElement(DropdownMenuRadioItem, { value: opt.value }, opt.label))
1207
+ props.options.map((opt, i) => /* @__PURE__ */ React10.createElement(DropdownMenuRadioItem, { key: i, value: opt.value }, opt.label))
1206
1208
  )));
1207
1209
  };
1208
1210
 
@@ -1263,15 +1265,15 @@ var ItemCard = ({
1263
1265
  className: cn(
1264
1266
  defaultStyle,
1265
1267
  props.onCardClick && " hover:hawa-shadow-lg hawa-cursor-pointer",
1266
- orientationStyles[orientation]
1268
+ orientationStyles[orientation],
1269
+ props.className
1267
1270
  ),
1268
1271
  onClick: (e) => {
1269
1272
  e.stopPropagation();
1270
1273
  if (props.onCardClick) {
1271
1274
  props.onCardClick(e);
1272
1275
  }
1273
- },
1274
- ...props
1276
+ }
1275
1277
  },
1276
1278
  cardImage && /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-group hawa-relative hawa-overflow-clip" }, /* @__PURE__ */ import_react8.default.createElement(
1277
1279
  "img",
@@ -1344,6 +1346,7 @@ var PinInput = ({
1344
1346
  digits,
1345
1347
  width = "normal",
1346
1348
  getPins,
1349
+ inputProps,
1347
1350
  ...props
1348
1351
  }) => {
1349
1352
  const [pin, setPin] = (0, import_react10.useState)(Array.from(Array(digits)));
@@ -1402,7 +1405,7 @@ var PinInput = ({
1402
1405
  onChange: (e) => handleChange(e, index),
1403
1406
  onKeyDown: (e) => handleKeyDown(e, index),
1404
1407
  onFocus: (e) => e.target.select(),
1405
- ...props
1408
+ ...inputProps
1406
1409
  }
1407
1410
  ))
1408
1411
  ), /* @__PURE__ */ import_react10.default.createElement(
@@ -3762,18 +3765,26 @@ Switch.displayName = SwitchPrimitives.Root.displayName;
3762
3765
  // components/elements/Textarea.tsx
3763
3766
  var React22 = __toESM(require("react"));
3764
3767
  var Textarea = React22.forwardRef(
3765
- ({ className, labelProps, forceHideHelperText, textareaProps, ...props }, ref) => {
3766
- return /* @__PURE__ */ React22.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2 hawa-h-full" }, props.label && /* @__PURE__ */ React22.createElement(Label2, { ...labelProps }, props.label), /* @__PURE__ */ React22.createElement(
3768
+ ({
3769
+ className,
3770
+ labelProps,
3771
+ showCount,
3772
+ forceHideHelperText,
3773
+ textareaProps,
3774
+ countPosition = "bottom",
3775
+ ...props
3776
+ }, ref) => {
3777
+ return /* @__PURE__ */ React22.createElement("div", { className: "hawa-relative hawa-flex hawa-w-full hawa-flex-col hawa-gap-2 hawa-h-full" }, props.label && /* @__PURE__ */ React22.createElement(Label2, { ...labelProps }, props.label), /* @__PURE__ */ React22.createElement(
3767
3778
  "textarea",
3768
3779
  {
3769
3780
  className: cn(
3770
- "hawa-flex hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
3781
+ "hawa-min-h-[40px] hawa-flex hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
3771
3782
  className
3772
3783
  ),
3773
3784
  ref,
3774
3785
  ...textareaProps
3775
3786
  }
3776
- ), !forceHideHelperText && /* @__PURE__ */ React22.createElement(
3787
+ ), /* @__PURE__ */ React22.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, !forceHideHelperText && /* @__PURE__ */ React22.createElement(
3777
3788
  "p",
3778
3789
  {
3779
3790
  className: cn(
@@ -3782,7 +3793,20 @@ var Textarea = React22.forwardRef(
3782
3793
  )
3783
3794
  },
3784
3795
  props.helperText
3785
- ));
3796
+ ), showCount && /* @__PURE__ */ React22.createElement(
3797
+ "div",
3798
+ {
3799
+ className: cn(
3800
+ " hawa-text-xs hawa-transition-all hawa-text-start ",
3801
+ {
3802
+ "hawa-end-0 hawa-bottom-[80px] hawa-absolute hawa-translate-y-1/2": countPosition === "top"
3803
+ }
3804
+ )
3805
+ },
3806
+ (textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
3807
+ "/",
3808
+ textareaProps == null ? void 0 : textareaProps.maxLength
3809
+ )));
3786
3810
  }
3787
3811
  );
3788
3812
  Textarea.displayName = "Textarea";
@@ -3825,16 +3849,11 @@ var ColorPicker = ({
3825
3849
  let inputColor = inputElement.value;
3826
3850
  if (inputColor[0] !== "#") {
3827
3851
  inputColor = `#${inputColor}`;
3828
- inputElement.value = inputColor;
3829
3852
  }
3830
3853
  const sanitizedInput = inputColor.replace(/[^a-fA-F0-9#]/g, "");
3831
- if (sanitizedInput !== inputColor) {
3832
- inputElement.value = sanitizedInput;
3833
- }
3834
3854
  setSelectedColor(sanitizedInput);
3835
3855
  if (props.handleChange) {
3836
- const event = new Event("input", { bubbles: true });
3837
- inputElement.dispatchEvent(event);
3856
+ props.handleChange(e);
3838
3857
  }
3839
3858
  };
3840
3859
  return /* @__PURE__ */ import_react15.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-w-full hawa-gap-2" }, props.label && /* @__PURE__ */ import_react15.default.createElement(Label2, { ...labelProps }, props.label), /* @__PURE__ */ import_react15.default.createElement("div", { dir: "ltr", className: "hawa-flex hawa-flex-row hawa-w-full" }, /* @__PURE__ */ import_react15.default.createElement(
@@ -3866,7 +3885,6 @@ var ColorPicker = ({
3866
3885
  {
3867
3886
  maxLength: 7,
3868
3887
  type: "text",
3869
- defaultValue: selectedColor || "#",
3870
3888
  onInput: handleTextInputChange,
3871
3889
  value: selectedColor,
3872
3890
  className: cn(
@@ -3935,7 +3953,7 @@ var Input = (0, import_react16.forwardRef)(
3935
3953
  preview ? "hawa-opacity-100" : "hawa-opacity-0"
3936
3954
  )
3937
3955
  }
3938
- ), /* @__PURE__ */ import_react16.default.createElement(import_react16.default.Fragment, null, /* @__PURE__ */ import_react16.default.createElement("div", { className: cn("hawa-relative") }, props.startIcon && /* @__PURE__ */ import_react16.default.createElement("div", { className: "hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.startIcon), props.endIcon && /* @__PURE__ */ import_react16.default.createElement(
3956
+ ), /* @__PURE__ */ import_react16.default.createElement(import_react16.default.Fragment, null, /* @__PURE__ */ import_react16.default.createElement("div", { className: "hawa-relative" }, props.startIcon && /* @__PURE__ */ import_react16.default.createElement("div", { className: "hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.startIcon), props.endIcon && /* @__PURE__ */ import_react16.default.createElement(
3939
3957
  "div",
3940
3958
  {
3941
3959
  className: cn(
@@ -3994,8 +4012,8 @@ var Input = (0, import_react16.forwardRef)(
3994
4012
  className: cn(
3995
4013
  "hawa-absolute hawa-text-xs hawa-transition-all hawa-text-start hawa-translate-y-1/2",
3996
4014
  {
3997
- "hawa-end-0 hawa-top-[60px]": countPosition === "bottom",
3998
- "hawa-end-0 hawa-bottom-[60px]": countPosition === "top",
4015
+ "hawa-end-0 hawa-top-[62px]": countPosition === "bottom",
4016
+ "hawa-end-0 hawa-bottom-[62px]": countPosition === "top",
3999
4017
  "hawa-end-2": countPosition === "center"
4000
4018
  }
4001
4019
  )
@@ -4079,7 +4097,15 @@ var DialogContent = React26.forwardRef(({ className, children, persist, hideClos
4079
4097
  )
4080
4098
  )));
4081
4099
  var DialogCarouselContent = React26.forwardRef(
4082
- ({ className, children, onPrev, persist, hideCloseButton, ...props }, ref) => /* @__PURE__ */ React26.createElement(DialogPortal, null, /* @__PURE__ */ React26.createElement(DialogOverlay, null), /* @__PURE__ */ React26.createElement(
4100
+ ({
4101
+ className,
4102
+ children,
4103
+ onPrev,
4104
+ persist,
4105
+ hideCloseButton,
4106
+ hidePrevButton,
4107
+ ...props
4108
+ }, ref) => /* @__PURE__ */ React26.createElement(DialogPortal, null, /* @__PURE__ */ React26.createElement(DialogOverlay, null), /* @__PURE__ */ React26.createElement(
4083
4109
  DialogPrimitive.Content,
4084
4110
  {
4085
4111
  onPointerDownOutside: (e) => {
@@ -4103,7 +4129,7 @@ var DialogCarouselContent = React26.forwardRef(
4103
4129
  onPrev ? "hawa-justify-between" : "hawa-justify-end"
4104
4130
  )
4105
4131
  },
4106
- onPrev && /* @__PURE__ */ React26.createElement(
4132
+ hidePrevButton ? /* @__PURE__ */ React26.createElement("div", null) : /* @__PURE__ */ React26.createElement(
4107
4133
  "div",
4108
4134
  {
4109
4135
  onClick: onPrev,
@@ -4635,7 +4661,7 @@ var FileUploader = ({ handleFile, className }) => {
4635
4661
  const fileUploaded = event.target.files[0];
4636
4662
  handleFile(fileUploaded);
4637
4663
  };
4638
- return /* @__PURE__ */ import_react17.default.createElement("div", { className }, /* @__PURE__ */ import_react17.default.createElement("button", { className: "hawa-h-full hawa-w-full", onClick: handleClick }), /* @__PURE__ */ import_react17.default.createElement(
4664
+ return /* @__PURE__ */ import_react17.default.createElement("div", { className }, /* @__PURE__ */ import_react17.default.createElement("div", { className: "hawa-h-full hawa-w-full", onClick: handleClick }), /* @__PURE__ */ import_react17.default.createElement(
4639
4665
  "input",
4640
4666
  {
4641
4667
  type: "file",
@@ -4950,7 +4976,10 @@ var CodeBlock = ({
4950
4976
  {
4951
4977
  open: clipboard.copied,
4952
4978
  side: "left",
4953
- content: /* @__PURE__ */ import_react21.default.createElement("div", null, "Copied!")
4979
+ content: /* @__PURE__ */ import_react21.default.createElement("div", null, "Copied!"),
4980
+ triggerProps: {
4981
+ asChild: true
4982
+ }
4954
4983
  },
4955
4984
  /* @__PURE__ */ import_react21.default.createElement(
4956
4985
  Button,
@@ -5715,7 +5744,14 @@ var Carousel = (props) => {
5715
5744
  const length = import_react26.default.Children.count(items);
5716
5745
  const canScrollNext = !!(emblaApi == null ? void 0 : emblaApi.canScrollNext());
5717
5746
  const canScrollPrev = !!(emblaApi == null ? void 0 : emblaApi.canScrollPrev());
5718
- return /* @__PURE__ */ import_react26.default.createElement("div", { className: " hawa-relative hawa-h-full" }, /* @__PURE__ */ import_react26.default.createElement("div", { className: "hawa-h-full hawa-overflow-hidden" }, /* @__PURE__ */ import_react26.default.createElement("div", { className: "hawa-h-full", ref: emblaRef }, /* @__PURE__ */ import_react26.default.createElement("div", { className: "hawa-h-full hawa-flex" }, items == null ? void 0 : items.map((item) => /* @__PURE__ */ import_react26.default.createElement("div", { className: "hawa-h-full hawa-justify-center hawa-flex hawa-items-center hawa-min-w-0 hawa-flex-[0_0_100%]" }, item))))), /* @__PURE__ */ import_react26.default.createElement(
5747
+ return /* @__PURE__ */ import_react26.default.createElement("div", { className: " hawa-relative hawa-h-full" }, /* @__PURE__ */ import_react26.default.createElement("div", { className: "hawa-h-full hawa-overflow-hidden" }, /* @__PURE__ */ import_react26.default.createElement("div", { className: "hawa-h-full", ref: emblaRef }, /* @__PURE__ */ import_react26.default.createElement("div", { className: "hawa-h-full hawa-flex" }, items == null ? void 0 : items.map((item, i) => /* @__PURE__ */ import_react26.default.createElement(
5748
+ "div",
5749
+ {
5750
+ key: i,
5751
+ className: "hawa-h-full hawa-justify-center hawa-flex hawa-items-center hawa-min-w-0 hawa-flex-[0_0_100%]"
5752
+ },
5753
+ item
5754
+ ))))), /* @__PURE__ */ import_react26.default.createElement(
5719
5755
  Dots,
5720
5756
  {
5721
5757
  itemsLength: length,
@@ -7345,7 +7381,7 @@ ProgressCircle.displayName = "ProgressCircle";
7345
7381
  var React60 = __toESM(require("react"));
7346
7382
  var NavigationMenuPrimitive = __toESM(require("@radix-ui/react-navigation-menu"));
7347
7383
  var import_class_variance_authority4 = require("class-variance-authority");
7348
- var NavigationMenuRoot = React60.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React60.createElement(
7384
+ var NavigationMenuRoot = React60.forwardRef(({ className, children, viewportClassNames, ...props }, ref) => /* @__PURE__ */ React60.createElement(
7349
7385
  NavigationMenuPrimitive.Root,
7350
7386
  {
7351
7387
  ref,
@@ -7357,7 +7393,7 @@ var NavigationMenuRoot = React60.forwardRef(({ className, children, ...props },
7357
7393
  ...props
7358
7394
  },
7359
7395
  children,
7360
- /* @__PURE__ */ React60.createElement(NavigationMenuViewport, { className: props.viewportClassNames })
7396
+ /* @__PURE__ */ React60.createElement(NavigationMenuViewport, { className: viewportClassNames })
7361
7397
  ));
7362
7398
  NavigationMenuRoot.displayName = NavigationMenuPrimitive.Root.displayName;
7363
7399
  var NavigationMenuList = React60.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React60.createElement(
@@ -7456,14 +7492,17 @@ var NavigationMenuIndicator = React60.forwardRef(({ className, ...props }, ref)
7456
7492
  /* @__PURE__ */ React60.createElement("div", { className: "hawa-relative hawa-top-[60%] hawa-h-2 hawa-w-2 hawa-rotate-45 hawa-rounded-tl-sm hawa-bg-border hawa-shadow-md" })
7457
7493
  ));
7458
7494
  NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;
7459
- var NavigationMenu = (props) => {
7495
+ var NavigationMenu = ({
7496
+ viewportClassNames,
7497
+ ...props
7498
+ }) => {
7460
7499
  return /* @__PURE__ */ React60.createElement(
7461
7500
  NavigationMenuRoot,
7462
7501
  {
7463
7502
  dir: props.direction,
7464
7503
  delayDuration: 0,
7465
7504
  className: props.rootClassNames,
7466
- viewportClassNames: props.viewportClassNames
7505
+ viewportClassNames
7467
7506
  },
7468
7507
  /* @__PURE__ */ React60.createElement(NavigationMenuList, null, props.items.map((item, i) => /* @__PURE__ */ React60.createElement(NavigationMenuItem, { key: i }, item.content ? /* @__PURE__ */ React60.createElement(React60.Fragment, null, /* @__PURE__ */ React60.createElement(NavigationMenuTrigger, null, item.trigger), /* @__PURE__ */ React60.createElement(NavigationMenuContent, null, item.content)) : /* @__PURE__ */ React60.createElement(
7469
7508
  NavigationMenuLink,
@@ -7924,7 +7963,7 @@ var Stats = ({
7924
7963
  muted: "hawa-text-muted-foreground"
7925
7964
  };
7926
7965
  return /* @__PURE__ */ import_react39.default.createElement(Card, { ...props, clickable: Boolean(props.onClick) }, /* @__PURE__ */ import_react39.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between hawa-p-4 hawa-items-center" }, /* @__PURE__ */ import_react39.default.createElement(CardTitle, { className: "hawa-text-sm hawa-font-medium" }, label), icon && /* @__PURE__ */ import_react39.default.createElement("span", null, icon)), /* @__PURE__ */ import_react39.default.createElement(CardContent, { className: "hawa-transition-all" }, isLoading ? /* @__PURE__ */ import_react39.default.createElement(Skeleton, { className: "hawa-h-8 hawa-w-3/4" }) : /* @__PURE__ */ import_react39.default.createElement("div", { className: "hawa-text-2xl hawa-font-bold" }, number), helperText && /* @__PURE__ */ import_react39.default.createElement(
7927
- "p",
7966
+ "div",
7928
7967
  {
7929
7968
  className: cn(
7930
7969
  "hawa-my-0 hawa-text-xs hawa-transition-all hawa-text-start",
@@ -8185,9 +8224,10 @@ var Navbar = ({
8185
8224
  }
8186
8225
  },
8187
8226
  logo
8188
- )), /* @__PURE__ */ import_react41.default.createElement("div", { className: "hawa-hidden md:hawa-flex " }, (_a = props.menuItems) == null ? void 0 : _a.map((item) => /* @__PURE__ */ import_react41.default.createElement(
8227
+ )), /* @__PURE__ */ import_react41.default.createElement("div", { className: "hawa-hidden md:hawa-flex " }, (_a = props.menuItems) == null ? void 0 : _a.map((item, i) => /* @__PURE__ */ import_react41.default.createElement(
8189
8228
  "div",
8190
8229
  {
8230
+ key: i,
8191
8231
  onClick: item.action,
8192
8232
  className: "hawa-p-1.5 hawa-px-2 hawa-text-sm hawa-text-center hawa-rounded hawa-text-white hover:hawa-text-black hover:hawa-bg-gray-300 hawa-transition-all hawa-cursor-pointer"
8193
8233
  },
@@ -8256,9 +8296,10 @@ var Navbar = ({
8256
8296
  zIndex: -100
8257
8297
  }
8258
8298
  },
8259
- (_b = props.menuItems) == null ? void 0 : _b.map((item) => /* @__PURE__ */ import_react41.default.createElement(
8299
+ (_b = props.menuItems) == null ? void 0 : _b.map((item, i) => /* @__PURE__ */ import_react41.default.createElement(
8260
8300
  "div",
8261
8301
  {
8302
+ key: i,
8262
8303
  onClick: item.action,
8263
8304
  className: "hawa-text-black hawa-p-2 hawa-px-10 hawa-text-center hawa-rounded hover:hawa-bg-gray-300 hawa-transition-all hawa-cursor-pointer"
8264
8305
  },
@@ -8544,7 +8585,8 @@ var AppLayout = ({
8544
8585
  {
8545
8586
  side: "left",
8546
8587
  delayDuration: 500,
8547
- content: keepOpen ? ((_a = props.texts) == null ? void 0 : _a.collapseSidebar) || "Collapse Sidebar" : ((_b = props.texts) == null ? void 0 : _b.expandSidebar) || "Expand Sidebar"
8588
+ content: keepOpen ? ((_a = props.texts) == null ? void 0 : _a.collapseSidebar) || "Collapse Sidebar" : ((_b = props.texts) == null ? void 0 : _b.expandSidebar) || "Expand Sidebar",
8589
+ triggerProps: { asChild: true }
8548
8590
  },
8549
8591
  /* @__PURE__ */ import_react42.default.createElement(
8550
8592
  Button,
@@ -8939,6 +8981,7 @@ var AppTabs = ({ tabs, ...props }) => {
8939
8981
  return /* @__PURE__ */ import_react44.default.createElement(
8940
8982
  AppSingleTab,
8941
8983
  {
8984
+ key: index,
8942
8985
  tab,
8943
8986
  onClick: () => setSelectedIndex(index),
8944
8987
  isSelected: selected
@@ -8950,6 +8993,7 @@ var AppSingleTab = ({ tab, ...props }) => {
8950
8993
  return /* @__PURE__ */ import_react44.default.createElement(
8951
8994
  "div",
8952
8995
  {
8996
+ key: props.key,
8953
8997
  onClick: props.onClick,
8954
8998
  className: cn(
8955
8999
  "hawa-p-4 hawa-py-2 hawa-flex hawa-flex-row hawa-gap-2 hawa-translate-y-[1.1px] hawa-text-sm hawa-rounded-t hawa-transition-all hawa-select-none hawa-z-10 ",
@@ -11115,6 +11159,7 @@ var import_react73 = require("react");
11115
11159
  var import_react74 = require("react");
11116
11160
 
11117
11161
  // components/hooks/useDialogCarousel.ts
11162
+ var import_react75 = require("react");
11118
11163
  var import_embla_carousel_react2 = __toESM(require("embla-carousel-react"));
11119
11164
  var import_embla_carousel_auto_height = __toESM(require("embla-carousel-auto-height"));
11120
11165
  var useDialogCarousel = (options) => {
@@ -11122,6 +11167,12 @@ var useDialogCarousel = (options) => {
11122
11167
  { loop: false, watchDrag: false, startIndex: 0, ...options },
11123
11168
  [(0, import_embla_carousel_auto_height.default)({ destroyHeight: "fit", active: true })]
11124
11169
  );
11170
+ const [canScrollPrev, setCanScrollPrev] = (0, import_react75.useState)(false);
11171
+ const checkCanScrollPrev = () => {
11172
+ if (emblaApi) {
11173
+ setCanScrollPrev(emblaApi.canScrollPrev());
11174
+ }
11175
+ };
11125
11176
  const nextStep = () => {
11126
11177
  if (emblaApi) {
11127
11178
  console.log("going to NEXT \u{1F449}");
@@ -11134,22 +11185,29 @@ var useDialogCarousel = (options) => {
11134
11185
  emblaApi.scrollPrev();
11135
11186
  }
11136
11187
  };
11188
+ (0, import_react75.useEffect)(() => {
11189
+ checkCanScrollPrev();
11190
+ emblaApi && emblaApi.on("select", checkCanScrollPrev);
11191
+ return () => {
11192
+ emblaApi && emblaApi.off("select", checkCanScrollPrev);
11193
+ };
11194
+ }, [emblaApi]);
11137
11195
  return {
11138
11196
  emblaRef,
11139
11197
  emblaApi,
11140
- // currentStep,
11141
11198
  nextStep,
11142
- prevStep
11199
+ prevStep,
11200
+ canScrollPrev
11143
11201
  };
11144
11202
  };
11145
11203
 
11146
11204
  // components/hooks/useDialogSteps.ts
11147
- var import_react75 = require("react");
11205
+ var import_react76 = require("react");
11148
11206
  var useMultiStepDialog = (initialStep, stepIds, setOpenDialog) => {
11149
- const [currentStep, setCurrentStep] = (0, import_react75.useState)(initialStep);
11150
- const [dialogHeight, setDialogHeight] = (0, import_react75.useState)(null);
11151
- const visibleStepRef = (0, import_react75.useRef)(null);
11152
- (0, import_react75.useEffect)(() => {
11207
+ const [currentStep, setCurrentStep] = (0, import_react76.useState)(initialStep);
11208
+ const [dialogHeight, setDialogHeight] = (0, import_react76.useState)(null);
11209
+ const visibleStepRef = (0, import_react76.useRef)(null);
11210
+ (0, import_react76.useEffect)(() => {
11153
11211
  if (visibleStepRef.current) {
11154
11212
  setDialogHeight(visibleStepRef.current.offsetHeight);
11155
11213
  }
@@ -11180,13 +11238,13 @@ var useMultiStepDialog = (initialStep, stepIds, setOpenDialog) => {
11180
11238
  };
11181
11239
 
11182
11240
  // components/hooks/useWindowSize.ts
11183
- var import_react76 = require("react");
11241
+ var import_react77 = require("react");
11184
11242
  var useWindowSize = () => {
11185
- const [windowSize, setWindowSize] = (0, import_react76.useState)({
11243
+ const [windowSize, setWindowSize] = (0, import_react77.useState)({
11186
11244
  width: void 0,
11187
11245
  height: void 0
11188
11246
  });
11189
- (0, import_react76.useEffect)(() => {
11247
+ (0, import_react77.useEffect)(() => {
11190
11248
  function handleResize() {
11191
11249
  setWindowSize({
11192
11250
  width: window.innerWidth,
@@ -11201,7 +11259,7 @@ var useWindowSize = () => {
11201
11259
  };
11202
11260
 
11203
11261
  // components/hooks/useFocusWithin.ts
11204
- var import_react77 = require("react");
11262
+ var import_react78 = require("react");
11205
11263
  function containsRelatedTarget(event) {
11206
11264
  if (event.currentTarget instanceof HTMLElement && event.relatedTarget instanceof HTMLElement) {
11207
11265
  return event.currentTarget.contains(event.relatedTarget);
@@ -11212,9 +11270,9 @@ function useFocusWithin({
11212
11270
  onBlur,
11213
11271
  onFocus
11214
11272
  } = {}) {
11215
- const ref = (0, import_react77.useRef)(null);
11216
- const [focused, _setFocused] = (0, import_react77.useState)(false);
11217
- const focusedRef = (0, import_react77.useRef)(false);
11273
+ const ref = (0, import_react78.useRef)(null);
11274
+ const [focused, _setFocused] = (0, import_react78.useState)(false);
11275
+ const focusedRef = (0, import_react78.useRef)(false);
11218
11276
  const setFocused = (value) => {
11219
11277
  _setFocused(value);
11220
11278
  focusedRef.current = value;
@@ -11231,7 +11289,7 @@ function useFocusWithin({
11231
11289
  onBlur == null ? void 0 : onBlur(event);
11232
11290
  }
11233
11291
  };
11234
- (0, import_react77.useEffect)(() => {
11292
+ (0, import_react78.useEffect)(() => {
11235
11293
  if (ref.current) {
11236
11294
  ref.current.addEventListener("focusin", handleFocusIn);
11237
11295
  ref.current.addEventListener("focusout", handleFocusOut);
@@ -11247,7 +11305,7 @@ function useFocusWithin({
11247
11305
  }
11248
11306
 
11249
11307
  // components/hooks/useMediaQuery.ts
11250
- var import_react78 = require("react");
11308
+ var import_react79 = require("react");
11251
11309
  function attachMediaListener(query, callback) {
11252
11310
  try {
11253
11311
  query.addEventListener("change", callback);
@@ -11269,11 +11327,11 @@ function getInitialValue(query, initialValue) {
11269
11327
  function useMediaQuery(query, initialValue, { getInitialValueInEffect } = {
11270
11328
  getInitialValueInEffect: true
11271
11329
  }) {
11272
- const [matches, setMatches] = (0, import_react78.useState)(
11330
+ const [matches, setMatches] = (0, import_react79.useState)(
11273
11331
  getInitialValueInEffect ? initialValue : getInitialValue(query, initialValue)
11274
11332
  );
11275
- const queryRef = (0, import_react78.useRef)();
11276
- (0, import_react78.useEffect)(() => {
11333
+ const queryRef = (0, import_react79.useRef)();
11334
+ (0, import_react79.useEffect)(() => {
11277
11335
  if ("matchMedia" in window) {
11278
11336
  queryRef.current = window.matchMedia(query);
11279
11337
  setMatches(queryRef.current.matches);
@@ -11288,16 +11346,16 @@ function useMediaQuery(query, initialValue, { getInitialValueInEffect } = {
11288
11346
  }
11289
11347
 
11290
11348
  // components/hooks/useScrollPosition.ts
11291
- var import_react79 = require("react");
11349
+ var import_react80 = require("react");
11292
11350
 
11293
11351
  // components/hooks/useTable.ts
11294
- var import_react80 = require("react");
11352
+ var import_react81 = require("react");
11295
11353
 
11296
11354
  // components/hooks/useTabs.ts
11297
- var import_react81 = require("react");
11355
+ var import_react82 = require("react");
11298
11356
  function useTabs(initialTab = "") {
11299
- const [activeTab, setActiveTab] = (0, import_react81.useState)(initialTab);
11300
- (0, import_react81.useEffect)(() => {
11357
+ const [activeTab, setActiveTab] = (0, import_react82.useState)(initialTab);
11358
+ (0, import_react82.useEffect)(() => {
11301
11359
  const handleHashChange = () => {
11302
11360
  const hash = window.location.hash.substring(1);
11303
11361
  setActiveTab(hash || initialTab);
package/dist/index.mjs CHANGED
@@ -46,7 +46,10 @@ function cn(...inputs) {
46
46
 
47
47
  // components/elements/cards/AdCard.tsx
48
48
  import React3, { useState as useState2, useEffect, useRef } from "react";
49
- var AdCard = ({ orientation, ...props }) => {
49
+ var AdCard = ({
50
+ orientation = "vertical",
51
+ ...props
52
+ }) => {
50
53
  const adRef = useRef(null);
51
54
  const [closed, setClosed] = useState2(false);
52
55
  let duration = 0;
@@ -78,8 +81,7 @@ var AdCard = ({ orientation, ...props }) => {
78
81
  return /* @__PURE__ */ React3.createElement("div", { ref: adRef }, /* @__PURE__ */ React3.createElement(
79
82
  "div",
80
83
  {
81
- className: cn(cardStyles[orientation], ""),
82
- ...props,
84
+ className: cn(cardStyles[orientation], props.className),
83
85
  onClick: props.handleClick
84
86
  },
85
87
  /* @__PURE__ */ React3.createElement("div", { className: "hawa-flex hawa-aspect-square hawa-w-full hawa-max-w-fit hawa-items-start " }, /* @__PURE__ */ React3.createElement(
@@ -702,7 +704,7 @@ var DropdownMenuContent = React10.forwardRef(({ className, sideOffset = 4, ...pr
702
704
  }
703
705
  )));
704
706
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
705
- var DropdownMenuItem = React10.forwardRef(({ className, inset, slug, ...props }, ref) => {
707
+ var DropdownMenuItem = React10.forwardRef(({ className, inset, badged, slug, ...props }, ref) => {
706
708
  return /* @__PURE__ */ React10.createElement("a", { href: slug }, /* @__PURE__ */ React10.createElement(
707
709
  DropdownMenuPrimitive.Item,
708
710
  {
@@ -719,7 +721,7 @@ var DropdownMenuItem = React10.forwardRef(({ className, inset, slug, ...props },
719
721
  /* @__PURE__ */ React10.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 " }, props.children),
720
722
  props.end && props.end,
721
723
  !props.end && props.shortcut && /* @__PURE__ */ React10.createElement(DropdownMenuShortcut, null, props.shortcut),
722
- !props.end && props.badged && /* @__PURE__ */ React10.createElement("div", { className: "hawa-h-3 hawa-w-3 hawa-bg-red-500 hawa-rounded-full" })
724
+ !props.end && badged && /* @__PURE__ */ React10.createElement("div", { className: "hawa-h-3 hawa-w-3 hawa-bg-red-500 hawa-rounded-full" })
723
725
  ));
724
726
  });
725
727
  DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
@@ -969,7 +971,7 @@ var DropdownMenuRadio = (props) => {
969
971
  value: props.value,
970
972
  onValueChange: props.onValueChange
971
973
  },
972
- props.options.map((opt) => /* @__PURE__ */ React10.createElement(DropdownMenuRadioItem, { value: opt.value }, opt.label))
974
+ props.options.map((opt, i) => /* @__PURE__ */ React10.createElement(DropdownMenuRadioItem, { key: i, value: opt.value }, opt.label))
973
975
  )));
974
976
  };
975
977
 
@@ -1030,15 +1032,15 @@ var ItemCard = ({
1030
1032
  className: cn(
1031
1033
  defaultStyle,
1032
1034
  props.onCardClick && " hover:hawa-shadow-lg hawa-cursor-pointer",
1033
- orientationStyles[orientation]
1035
+ orientationStyles[orientation],
1036
+ props.className
1034
1037
  ),
1035
1038
  onClick: (e) => {
1036
1039
  e.stopPropagation();
1037
1040
  if (props.onCardClick) {
1038
1041
  props.onCardClick(e);
1039
1042
  }
1040
- },
1041
- ...props
1043
+ }
1042
1044
  },
1043
1045
  cardImage && /* @__PURE__ */ React12.createElement("div", { className: "hawa-group hawa-relative hawa-overflow-clip" }, /* @__PURE__ */ React12.createElement(
1044
1046
  "img",
@@ -1111,6 +1113,7 @@ var PinInput = ({
1111
1113
  digits,
1112
1114
  width = "normal",
1113
1115
  getPins,
1116
+ inputProps,
1114
1117
  ...props
1115
1118
  }) => {
1116
1119
  const [pin, setPin] = useState4(Array.from(Array(digits)));
@@ -1169,7 +1172,7 @@ var PinInput = ({
1169
1172
  onChange: (e) => handleChange(e, index),
1170
1173
  onKeyDown: (e) => handleKeyDown(e, index),
1171
1174
  onFocus: (e) => e.target.select(),
1172
- ...props
1175
+ ...inputProps
1173
1176
  }
1174
1177
  ))
1175
1178
  ), /* @__PURE__ */ React14.createElement(
@@ -3529,18 +3532,26 @@ Switch.displayName = SwitchPrimitives.Root.displayName;
3529
3532
  // components/elements/Textarea.tsx
3530
3533
  import * as React22 from "react";
3531
3534
  var Textarea = React22.forwardRef(
3532
- ({ className, labelProps, forceHideHelperText, textareaProps, ...props }, ref) => {
3533
- return /* @__PURE__ */ React22.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2 hawa-h-full" }, props.label && /* @__PURE__ */ React22.createElement(Label2, { ...labelProps }, props.label), /* @__PURE__ */ React22.createElement(
3535
+ ({
3536
+ className,
3537
+ labelProps,
3538
+ showCount,
3539
+ forceHideHelperText,
3540
+ textareaProps,
3541
+ countPosition = "bottom",
3542
+ ...props
3543
+ }, ref) => {
3544
+ return /* @__PURE__ */ React22.createElement("div", { className: "hawa-relative hawa-flex hawa-w-full hawa-flex-col hawa-gap-2 hawa-h-full" }, props.label && /* @__PURE__ */ React22.createElement(Label2, { ...labelProps }, props.label), /* @__PURE__ */ React22.createElement(
3534
3545
  "textarea",
3535
3546
  {
3536
3547
  className: cn(
3537
- "hawa-flex hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
3548
+ "hawa-min-h-[40px] hawa-flex hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50",
3538
3549
  className
3539
3550
  ),
3540
3551
  ref,
3541
3552
  ...textareaProps
3542
3553
  }
3543
- ), !forceHideHelperText && /* @__PURE__ */ React22.createElement(
3554
+ ), /* @__PURE__ */ React22.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, !forceHideHelperText && /* @__PURE__ */ React22.createElement(
3544
3555
  "p",
3545
3556
  {
3546
3557
  className: cn(
@@ -3549,7 +3560,20 @@ var Textarea = React22.forwardRef(
3549
3560
  )
3550
3561
  },
3551
3562
  props.helperText
3552
- ));
3563
+ ), showCount && /* @__PURE__ */ React22.createElement(
3564
+ "div",
3565
+ {
3566
+ className: cn(
3567
+ " hawa-text-xs hawa-transition-all hawa-text-start ",
3568
+ {
3569
+ "hawa-end-0 hawa-bottom-[80px] hawa-absolute hawa-translate-y-1/2": countPosition === "top"
3570
+ }
3571
+ )
3572
+ },
3573
+ (textareaProps == null ? void 0 : textareaProps.value) ? String(textareaProps == null ? void 0 : textareaProps.value).length : 0,
3574
+ "/",
3575
+ textareaProps == null ? void 0 : textareaProps.maxLength
3576
+ )));
3553
3577
  }
3554
3578
  );
3555
3579
  Textarea.displayName = "Textarea";
@@ -3595,16 +3619,11 @@ var ColorPicker = ({
3595
3619
  let inputColor = inputElement.value;
3596
3620
  if (inputColor[0] !== "#") {
3597
3621
  inputColor = `#${inputColor}`;
3598
- inputElement.value = inputColor;
3599
3622
  }
3600
3623
  const sanitizedInput = inputColor.replace(/[^a-fA-F0-9#]/g, "");
3601
- if (sanitizedInput !== inputColor) {
3602
- inputElement.value = sanitizedInput;
3603
- }
3604
3624
  setSelectedColor(sanitizedInput);
3605
3625
  if (props.handleChange) {
3606
- const event = new Event("input", { bubbles: true });
3607
- inputElement.dispatchEvent(event);
3626
+ props.handleChange(e);
3608
3627
  }
3609
3628
  };
3610
3629
  return /* @__PURE__ */ React24.createElement("div", { className: "hawa-flex hawa-flex-col hawa-w-full hawa-gap-2" }, props.label && /* @__PURE__ */ React24.createElement(Label2, { ...labelProps }, props.label), /* @__PURE__ */ React24.createElement("div", { dir: "ltr", className: "hawa-flex hawa-flex-row hawa-w-full" }, /* @__PURE__ */ React24.createElement(
@@ -3636,7 +3655,6 @@ var ColorPicker = ({
3636
3655
  {
3637
3656
  maxLength: 7,
3638
3657
  type: "text",
3639
- defaultValue: selectedColor || "#",
3640
3658
  onInput: handleTextInputChange,
3641
3659
  value: selectedColor,
3642
3660
  className: cn(
@@ -3705,7 +3723,7 @@ var Input = forwardRef9(
3705
3723
  preview ? "hawa-opacity-100" : "hawa-opacity-0"
3706
3724
  )
3707
3725
  }
3708
- ), /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement("div", { className: cn("hawa-relative") }, props.startIcon && /* @__PURE__ */ React25.createElement("div", { className: "hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.startIcon), props.endIcon && /* @__PURE__ */ React25.createElement(
3726
+ ), /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement("div", { className: "hawa-relative" }, props.startIcon && /* @__PURE__ */ React25.createElement("div", { className: "hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.startIcon), props.endIcon && /* @__PURE__ */ React25.createElement(
3709
3727
  "div",
3710
3728
  {
3711
3729
  className: cn(
@@ -3764,8 +3782,8 @@ var Input = forwardRef9(
3764
3782
  className: cn(
3765
3783
  "hawa-absolute hawa-text-xs hawa-transition-all hawa-text-start hawa-translate-y-1/2",
3766
3784
  {
3767
- "hawa-end-0 hawa-top-[60px]": countPosition === "bottom",
3768
- "hawa-end-0 hawa-bottom-[60px]": countPosition === "top",
3785
+ "hawa-end-0 hawa-top-[62px]": countPosition === "bottom",
3786
+ "hawa-end-0 hawa-bottom-[62px]": countPosition === "top",
3769
3787
  "hawa-end-2": countPosition === "center"
3770
3788
  }
3771
3789
  )
@@ -3849,7 +3867,15 @@ var DialogContent = React26.forwardRef(({ className, children, persist, hideClos
3849
3867
  )
3850
3868
  )));
3851
3869
  var DialogCarouselContent = React26.forwardRef(
3852
- ({ className, children, onPrev, persist, hideCloseButton, ...props }, ref) => /* @__PURE__ */ React26.createElement(DialogPortal, null, /* @__PURE__ */ React26.createElement(DialogOverlay, null), /* @__PURE__ */ React26.createElement(
3870
+ ({
3871
+ className,
3872
+ children,
3873
+ onPrev,
3874
+ persist,
3875
+ hideCloseButton,
3876
+ hidePrevButton,
3877
+ ...props
3878
+ }, ref) => /* @__PURE__ */ React26.createElement(DialogPortal, null, /* @__PURE__ */ React26.createElement(DialogOverlay, null), /* @__PURE__ */ React26.createElement(
3853
3879
  DialogPrimitive.Content,
3854
3880
  {
3855
3881
  onPointerDownOutside: (e) => {
@@ -3873,7 +3899,7 @@ var DialogCarouselContent = React26.forwardRef(
3873
3899
  onPrev ? "hawa-justify-between" : "hawa-justify-end"
3874
3900
  )
3875
3901
  },
3876
- onPrev && /* @__PURE__ */ React26.createElement(
3902
+ hidePrevButton ? /* @__PURE__ */ React26.createElement("div", null) : /* @__PURE__ */ React26.createElement(
3877
3903
  "div",
3878
3904
  {
3879
3905
  onClick: onPrev,
@@ -4405,7 +4431,7 @@ var FileUploader = ({ handleFile, className }) => {
4405
4431
  const fileUploaded = event.target.files[0];
4406
4432
  handleFile(fileUploaded);
4407
4433
  };
4408
- return /* @__PURE__ */ React30.createElement("div", { className }, /* @__PURE__ */ React30.createElement("button", { className: "hawa-h-full hawa-w-full", onClick: handleClick }), /* @__PURE__ */ React30.createElement(
4434
+ return /* @__PURE__ */ React30.createElement("div", { className }, /* @__PURE__ */ React30.createElement("div", { className: "hawa-h-full hawa-w-full", onClick: handleClick }), /* @__PURE__ */ React30.createElement(
4409
4435
  "input",
4410
4436
  {
4411
4437
  type: "file",
@@ -4720,7 +4746,10 @@ var CodeBlock = ({
4720
4746
  {
4721
4747
  open: clipboard.copied,
4722
4748
  side: "left",
4723
- content: /* @__PURE__ */ React34.createElement("div", null, "Copied!")
4749
+ content: /* @__PURE__ */ React34.createElement("div", null, "Copied!"),
4750
+ triggerProps: {
4751
+ asChild: true
4752
+ }
4724
4753
  },
4725
4754
  /* @__PURE__ */ React34.createElement(
4726
4755
  Button,
@@ -5485,7 +5514,14 @@ var Carousel = (props) => {
5485
5514
  const length = React41.Children.count(items);
5486
5515
  const canScrollNext = !!(emblaApi == null ? void 0 : emblaApi.canScrollNext());
5487
5516
  const canScrollPrev = !!(emblaApi == null ? void 0 : emblaApi.canScrollPrev());
5488
- return /* @__PURE__ */ React41.createElement("div", { className: " hawa-relative hawa-h-full" }, /* @__PURE__ */ React41.createElement("div", { className: "hawa-h-full hawa-overflow-hidden" }, /* @__PURE__ */ React41.createElement("div", { className: "hawa-h-full", ref: emblaRef }, /* @__PURE__ */ React41.createElement("div", { className: "hawa-h-full hawa-flex" }, items == null ? void 0 : items.map((item) => /* @__PURE__ */ React41.createElement("div", { className: "hawa-h-full hawa-justify-center hawa-flex hawa-items-center hawa-min-w-0 hawa-flex-[0_0_100%]" }, item))))), /* @__PURE__ */ React41.createElement(
5517
+ return /* @__PURE__ */ React41.createElement("div", { className: " hawa-relative hawa-h-full" }, /* @__PURE__ */ React41.createElement("div", { className: "hawa-h-full hawa-overflow-hidden" }, /* @__PURE__ */ React41.createElement("div", { className: "hawa-h-full", ref: emblaRef }, /* @__PURE__ */ React41.createElement("div", { className: "hawa-h-full hawa-flex" }, items == null ? void 0 : items.map((item, i) => /* @__PURE__ */ React41.createElement(
5518
+ "div",
5519
+ {
5520
+ key: i,
5521
+ className: "hawa-h-full hawa-justify-center hawa-flex hawa-items-center hawa-min-w-0 hawa-flex-[0_0_100%]"
5522
+ },
5523
+ item
5524
+ ))))), /* @__PURE__ */ React41.createElement(
5489
5525
  Dots,
5490
5526
  {
5491
5527
  itemsLength: length,
@@ -7127,7 +7163,7 @@ ProgressCircle.displayName = "ProgressCircle";
7127
7163
  import * as React60 from "react";
7128
7164
  import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
7129
7165
  import { cva as cva4 } from "class-variance-authority";
7130
- var NavigationMenuRoot = React60.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React60.createElement(
7166
+ var NavigationMenuRoot = React60.forwardRef(({ className, children, viewportClassNames, ...props }, ref) => /* @__PURE__ */ React60.createElement(
7131
7167
  NavigationMenuPrimitive.Root,
7132
7168
  {
7133
7169
  ref,
@@ -7139,7 +7175,7 @@ var NavigationMenuRoot = React60.forwardRef(({ className, children, ...props },
7139
7175
  ...props
7140
7176
  },
7141
7177
  children,
7142
- /* @__PURE__ */ React60.createElement(NavigationMenuViewport, { className: props.viewportClassNames })
7178
+ /* @__PURE__ */ React60.createElement(NavigationMenuViewport, { className: viewportClassNames })
7143
7179
  ));
7144
7180
  NavigationMenuRoot.displayName = NavigationMenuPrimitive.Root.displayName;
7145
7181
  var NavigationMenuList = React60.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React60.createElement(
@@ -7238,14 +7274,17 @@ var NavigationMenuIndicator = React60.forwardRef(({ className, ...props }, ref)
7238
7274
  /* @__PURE__ */ React60.createElement("div", { className: "hawa-relative hawa-top-[60%] hawa-h-2 hawa-w-2 hawa-rotate-45 hawa-rounded-tl-sm hawa-bg-border hawa-shadow-md" })
7239
7275
  ));
7240
7276
  NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;
7241
- var NavigationMenu = (props) => {
7277
+ var NavigationMenu = ({
7278
+ viewportClassNames,
7279
+ ...props
7280
+ }) => {
7242
7281
  return /* @__PURE__ */ React60.createElement(
7243
7282
  NavigationMenuRoot,
7244
7283
  {
7245
7284
  dir: props.direction,
7246
7285
  delayDuration: 0,
7247
7286
  className: props.rootClassNames,
7248
- viewportClassNames: props.viewportClassNames
7287
+ viewportClassNames
7249
7288
  },
7250
7289
  /* @__PURE__ */ React60.createElement(NavigationMenuList, null, props.items.map((item, i) => /* @__PURE__ */ React60.createElement(NavigationMenuItem, { key: i }, item.content ? /* @__PURE__ */ React60.createElement(React60.Fragment, null, /* @__PURE__ */ React60.createElement(NavigationMenuTrigger, null, item.trigger), /* @__PURE__ */ React60.createElement(NavigationMenuContent, null, item.content)) : /* @__PURE__ */ React60.createElement(
7251
7290
  NavigationMenuLink,
@@ -7708,7 +7747,7 @@ var Stats = ({
7708
7747
  muted: "hawa-text-muted-foreground"
7709
7748
  };
7710
7749
  return /* @__PURE__ */ React64.createElement(Card, { ...props, clickable: Boolean(props.onClick) }, /* @__PURE__ */ React64.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between hawa-p-4 hawa-items-center" }, /* @__PURE__ */ React64.createElement(CardTitle, { className: "hawa-text-sm hawa-font-medium" }, label), icon && /* @__PURE__ */ React64.createElement("span", null, icon)), /* @__PURE__ */ React64.createElement(CardContent, { className: "hawa-transition-all" }, isLoading ? /* @__PURE__ */ React64.createElement(Skeleton, { className: "hawa-h-8 hawa-w-3/4" }) : /* @__PURE__ */ React64.createElement("div", { className: "hawa-text-2xl hawa-font-bold" }, number), helperText && /* @__PURE__ */ React64.createElement(
7711
- "p",
7750
+ "div",
7712
7751
  {
7713
7752
  className: cn(
7714
7753
  "hawa-my-0 hawa-text-xs hawa-transition-all hawa-text-start",
@@ -7969,9 +8008,10 @@ var Navbar = ({
7969
8008
  }
7970
8009
  },
7971
8010
  logo
7972
- )), /* @__PURE__ */ React67.createElement("div", { className: "hawa-hidden md:hawa-flex " }, (_a = props.menuItems) == null ? void 0 : _a.map((item) => /* @__PURE__ */ React67.createElement(
8011
+ )), /* @__PURE__ */ React67.createElement("div", { className: "hawa-hidden md:hawa-flex " }, (_a = props.menuItems) == null ? void 0 : _a.map((item, i) => /* @__PURE__ */ React67.createElement(
7973
8012
  "div",
7974
8013
  {
8014
+ key: i,
7975
8015
  onClick: item.action,
7976
8016
  className: "hawa-p-1.5 hawa-px-2 hawa-text-sm hawa-text-center hawa-rounded hawa-text-white hover:hawa-text-black hover:hawa-bg-gray-300 hawa-transition-all hawa-cursor-pointer"
7977
8017
  },
@@ -8040,9 +8080,10 @@ var Navbar = ({
8040
8080
  zIndex: -100
8041
8081
  }
8042
8082
  },
8043
- (_b = props.menuItems) == null ? void 0 : _b.map((item) => /* @__PURE__ */ React67.createElement(
8083
+ (_b = props.menuItems) == null ? void 0 : _b.map((item, i) => /* @__PURE__ */ React67.createElement(
8044
8084
  "div",
8045
8085
  {
8086
+ key: i,
8046
8087
  onClick: item.action,
8047
8088
  className: "hawa-text-black hawa-p-2 hawa-px-10 hawa-text-center hawa-rounded hover:hawa-bg-gray-300 hawa-transition-all hawa-cursor-pointer"
8048
8089
  },
@@ -8328,7 +8369,8 @@ var AppLayout = ({
8328
8369
  {
8329
8370
  side: "left",
8330
8371
  delayDuration: 500,
8331
- content: keepOpen ? ((_a = props.texts) == null ? void 0 : _a.collapseSidebar) || "Collapse Sidebar" : ((_b = props.texts) == null ? void 0 : _b.expandSidebar) || "Expand Sidebar"
8372
+ content: keepOpen ? ((_a = props.texts) == null ? void 0 : _a.collapseSidebar) || "Collapse Sidebar" : ((_b = props.texts) == null ? void 0 : _b.expandSidebar) || "Expand Sidebar",
8373
+ triggerProps: { asChild: true }
8332
8374
  },
8333
8375
  /* @__PURE__ */ React68.createElement(
8334
8376
  Button,
@@ -8723,6 +8765,7 @@ var AppTabs = ({ tabs, ...props }) => {
8723
8765
  return /* @__PURE__ */ React71.createElement(
8724
8766
  AppSingleTab,
8725
8767
  {
8768
+ key: index,
8726
8769
  tab,
8727
8770
  onClick: () => setSelectedIndex(index),
8728
8771
  isSelected: selected
@@ -8734,6 +8777,7 @@ var AppSingleTab = ({ tab, ...props }) => {
8734
8777
  return /* @__PURE__ */ React71.createElement(
8735
8778
  "div",
8736
8779
  {
8780
+ key: props.key,
8737
8781
  onClick: props.onClick,
8738
8782
  className: cn(
8739
8783
  "hawa-p-4 hawa-py-2 hawa-flex hawa-flex-row hawa-gap-2 hawa-translate-y-[1.1px] hawa-text-sm hawa-rounded-t hawa-transition-all hawa-select-none hawa-z-10 ",
@@ -10899,6 +10943,7 @@ import { useEffect as useEffect25, useRef as useRef14, useState as useState39 }
10899
10943
  import { useState as useState40, useRef as useRef15 } from "react";
10900
10944
 
10901
10945
  // components/hooks/useDialogCarousel.ts
10946
+ import { useEffect as useEffect26, useState as useState41 } from "react";
10902
10947
  import useEmblaCarousel2 from "embla-carousel-react";
10903
10948
  import AutoHeight from "embla-carousel-auto-height";
10904
10949
  var useDialogCarousel = (options) => {
@@ -10906,6 +10951,12 @@ var useDialogCarousel = (options) => {
10906
10951
  { loop: false, watchDrag: false, startIndex: 0, ...options },
10907
10952
  [AutoHeight({ destroyHeight: "fit", active: true })]
10908
10953
  );
10954
+ const [canScrollPrev, setCanScrollPrev] = useState41(false);
10955
+ const checkCanScrollPrev = () => {
10956
+ if (emblaApi) {
10957
+ setCanScrollPrev(emblaApi.canScrollPrev());
10958
+ }
10959
+ };
10909
10960
  const nextStep = () => {
10910
10961
  if (emblaApi) {
10911
10962
  console.log("going to NEXT \u{1F449}");
@@ -10918,22 +10969,29 @@ var useDialogCarousel = (options) => {
10918
10969
  emblaApi.scrollPrev();
10919
10970
  }
10920
10971
  };
10972
+ useEffect26(() => {
10973
+ checkCanScrollPrev();
10974
+ emblaApi && emblaApi.on("select", checkCanScrollPrev);
10975
+ return () => {
10976
+ emblaApi && emblaApi.off("select", checkCanScrollPrev);
10977
+ };
10978
+ }, [emblaApi]);
10921
10979
  return {
10922
10980
  emblaRef,
10923
10981
  emblaApi,
10924
- // currentStep,
10925
10982
  nextStep,
10926
- prevStep
10983
+ prevStep,
10984
+ canScrollPrev
10927
10985
  };
10928
10986
  };
10929
10987
 
10930
10988
  // components/hooks/useDialogSteps.ts
10931
- import { useState as useState41, useEffect as useEffect26, useRef as useRef16 } from "react";
10989
+ import { useState as useState42, useEffect as useEffect27, useRef as useRef16 } from "react";
10932
10990
  var useMultiStepDialog = (initialStep, stepIds, setOpenDialog) => {
10933
- const [currentStep, setCurrentStep] = useState41(initialStep);
10934
- const [dialogHeight, setDialogHeight] = useState41(null);
10991
+ const [currentStep, setCurrentStep] = useState42(initialStep);
10992
+ const [dialogHeight, setDialogHeight] = useState42(null);
10935
10993
  const visibleStepRef = useRef16(null);
10936
- useEffect26(() => {
10994
+ useEffect27(() => {
10937
10995
  if (visibleStepRef.current) {
10938
10996
  setDialogHeight(visibleStepRef.current.offsetHeight);
10939
10997
  }
@@ -10964,13 +11022,13 @@ var useMultiStepDialog = (initialStep, stepIds, setOpenDialog) => {
10964
11022
  };
10965
11023
 
10966
11024
  // components/hooks/useWindowSize.ts
10967
- import { useEffect as useEffect27, useState as useState42 } from "react";
11025
+ import { useEffect as useEffect28, useState as useState43 } from "react";
10968
11026
  var useWindowSize = () => {
10969
- const [windowSize, setWindowSize] = useState42({
11027
+ const [windowSize, setWindowSize] = useState43({
10970
11028
  width: void 0,
10971
11029
  height: void 0
10972
11030
  });
10973
- useEffect27(() => {
11031
+ useEffect28(() => {
10974
11032
  function handleResize() {
10975
11033
  setWindowSize({
10976
11034
  width: window.innerWidth,
@@ -10985,7 +11043,7 @@ var useWindowSize = () => {
10985
11043
  };
10986
11044
 
10987
11045
  // components/hooks/useFocusWithin.ts
10988
- import { useRef as useRef17, useState as useState43, useEffect as useEffect28 } from "react";
11046
+ import { useRef as useRef17, useState as useState44, useEffect as useEffect29 } from "react";
10989
11047
  function containsRelatedTarget(event) {
10990
11048
  if (event.currentTarget instanceof HTMLElement && event.relatedTarget instanceof HTMLElement) {
10991
11049
  return event.currentTarget.contains(event.relatedTarget);
@@ -10997,7 +11055,7 @@ function useFocusWithin({
10997
11055
  onFocus
10998
11056
  } = {}) {
10999
11057
  const ref = useRef17(null);
11000
- const [focused, _setFocused] = useState43(false);
11058
+ const [focused, _setFocused] = useState44(false);
11001
11059
  const focusedRef = useRef17(false);
11002
11060
  const setFocused = (value) => {
11003
11061
  _setFocused(value);
@@ -11015,7 +11073,7 @@ function useFocusWithin({
11015
11073
  onBlur == null ? void 0 : onBlur(event);
11016
11074
  }
11017
11075
  };
11018
- useEffect28(() => {
11076
+ useEffect29(() => {
11019
11077
  if (ref.current) {
11020
11078
  ref.current.addEventListener("focusin", handleFocusIn);
11021
11079
  ref.current.addEventListener("focusout", handleFocusOut);
@@ -11031,7 +11089,7 @@ function useFocusWithin({
11031
11089
  }
11032
11090
 
11033
11091
  // components/hooks/useMediaQuery.ts
11034
- import { useState as useState44, useEffect as useEffect29, useRef as useRef18 } from "react";
11092
+ import { useState as useState45, useEffect as useEffect30, useRef as useRef18 } from "react";
11035
11093
  function attachMediaListener(query, callback) {
11036
11094
  try {
11037
11095
  query.addEventListener("change", callback);
@@ -11053,11 +11111,11 @@ function getInitialValue(query, initialValue) {
11053
11111
  function useMediaQuery(query, initialValue, { getInitialValueInEffect } = {
11054
11112
  getInitialValueInEffect: true
11055
11113
  }) {
11056
- const [matches, setMatches] = useState44(
11114
+ const [matches, setMatches] = useState45(
11057
11115
  getInitialValueInEffect ? initialValue : getInitialValue(query, initialValue)
11058
11116
  );
11059
11117
  const queryRef = useRef18();
11060
- useEffect29(() => {
11118
+ useEffect30(() => {
11061
11119
  if ("matchMedia" in window) {
11062
11120
  queryRef.current = window.matchMedia(query);
11063
11121
  setMatches(queryRef.current.matches);
@@ -11072,16 +11130,16 @@ function useMediaQuery(query, initialValue, { getInitialValueInEffect } = {
11072
11130
  }
11073
11131
 
11074
11132
  // components/hooks/useScrollPosition.ts
11075
- import { useState as useState45, useEffect as useEffect30 } from "react";
11133
+ import { useState as useState46, useEffect as useEffect31 } from "react";
11076
11134
 
11077
11135
  // components/hooks/useTable.ts
11078
- import { useState as useState46, useEffect as useEffect31 } from "react";
11136
+ import { useState as useState47, useEffect as useEffect32 } from "react";
11079
11137
 
11080
11138
  // components/hooks/useTabs.ts
11081
- import { useEffect as useEffect32, useState as useState47 } from "react";
11139
+ import { useEffect as useEffect33, useState as useState48 } from "react";
11082
11140
  function useTabs(initialTab = "") {
11083
- const [activeTab, setActiveTab] = useState47(initialTab);
11084
- useEffect32(() => {
11141
+ const [activeTab, setActiveTab] = useState48(initialTab);
11142
+ useEffect33(() => {
11085
11143
  const handleHashChange = () => {
11086
11144
  const hash = window.location.hash.substring(1);
11087
11145
  setActiveTab(hash || initialTab);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.19.5-next",
3
+ "version": "0.19.8-next",
4
4
  "description": "Modern UI Kit made with Tailwind",
5
5
  "author": {
6
6
  "name": "Sikka Software",
@@ -71,20 +71,20 @@
71
71
  "@radix-ui/react-toast": "^1.1.5",
72
72
  "@radix-ui/react-tooltip": "^1.0.7",
73
73
  "@tanstack/react-table": "^8.10.7",
74
- "@types/node": "^20.9.0",
75
- "@types/react": "^18.2.37",
76
- "@types/react-dom": "^18.2.15",
74
+ "@types/node": "^20.9.4",
75
+ "@types/react": "^18.2.38",
76
+ "@types/react-dom": "^18.2.17",
77
77
  "class-variance-authority": "^0.7.0",
78
78
  "clsx": "^2.0.0",
79
79
  "cmdk": "^0.2.0",
80
80
  "embla-carousel-auto-height": "^8.0.0-rc14",
81
81
  "embla-carousel-react": "^8.0.0-rc14",
82
- "eslint": "^8.53.0",
83
- "eslint-config-next": "^14.0.2",
84
- "libphonenumber-js": "^1.10.49",
85
- "next": "^14.0.2",
82
+ "eslint": "^8.54.0",
83
+ "eslint-config-next": "^14.0.3",
84
+ "libphonenumber-js": "^1.10.50",
85
+ "next": "^14.0.3",
86
86
  "next-themes": "^0.2.1",
87
- "prism-react-renderer": "^2.1.0",
87
+ "prism-react-renderer": "^2.3.0",
88
88
  "react": "18.2.0",
89
89
  "react-dom": "18.2.0",
90
90
  "react-dropzone": "^14.2.3",
@@ -96,7 +96,7 @@
96
96
  },
97
97
  "devDependencies": {
98
98
  "@babel/preset-react": "^7.23.3",
99
- "@sikka/alam": "^0.0.2",
99
+ "@sikka/alam": "^0.0.3",
100
100
  "@storybook/addon-essentials": "^7.5.3",
101
101
  "@storybook/addon-interactions": "^7.5.3",
102
102
  "@storybook/addon-links": "^7.5.3",
@@ -108,8 +108,8 @@
108
108
  "@storybook/testing-library": "^0.2.2",
109
109
  "@storybook/theming": "^7.5.3",
110
110
  "@testing-library/jest-dom": "^6.1.4",
111
- "@testing-library/react": "^14.1.0",
112
- "@types/jest": "^29.5.8",
111
+ "@testing-library/react": "^14.1.2",
112
+ "@types/jest": "^29.5.10",
113
113
  "autoprefixer": "^10.4.16",
114
114
  "eslint-plugin-storybook": "^0.6.15",
115
115
  "jest": "^29.7.0",
@@ -118,12 +118,12 @@
118
118
  "postcss": "^8.4.31",
119
119
  "postcss-cli": "^10.1.0",
120
120
  "postcss-import": "^15.1.0",
121
- "recharts": "^2.9.3",
121
+ "recharts": "^2.10.1",
122
122
  "storybook": "^7.5.3",
123
123
  "storybook-dark-mode": "^3.0.1",
124
124
  "tailwindcss": "^3.3.5",
125
125
  "tailwindcss-animate": "^1.0.7",
126
- "tsup": "^7.2.0",
127
- "typescript": "^5.2.2"
126
+ "tsup": "^8.0.1",
127
+ "typescript": "^5.3.2"
128
128
  }
129
129
  }