@sikka/hawa 0.18.14-next → 0.18.18-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 +31 -6
- package/dist/index.d.mts +17 -9
- package/dist/index.d.ts +17 -9
- package/dist/index.js +116 -58
- package/dist/index.mjs +116 -58
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1054,6 +1054,9 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
1054
1054
|
.hawa-top-\[22px\] {
|
|
1055
1055
|
top: 22px;
|
|
1056
1056
|
}
|
|
1057
|
+
.hawa-top-\[47px\] {
|
|
1058
|
+
top: 47px;
|
|
1059
|
+
}
|
|
1057
1060
|
.hawa-top-\[50\%\] {
|
|
1058
1061
|
top: 50%;
|
|
1059
1062
|
}
|
|
@@ -1081,6 +1084,9 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
1081
1084
|
.hawa-z-10 {
|
|
1082
1085
|
z-index: 10;
|
|
1083
1086
|
}
|
|
1087
|
+
.hawa-z-20 {
|
|
1088
|
+
z-index: 20;
|
|
1089
|
+
}
|
|
1084
1090
|
.hawa-z-30 {
|
|
1085
1091
|
z-index: 30;
|
|
1086
1092
|
}
|
|
@@ -1310,9 +1316,6 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
1310
1316
|
.hawa-h-24 {
|
|
1311
1317
|
height: 6rem;
|
|
1312
1318
|
}
|
|
1313
|
-
.hawa-h-28 {
|
|
1314
|
-
height: 7rem;
|
|
1315
|
-
}
|
|
1316
1319
|
.hawa-h-3 {
|
|
1317
1320
|
height: 0.75rem;
|
|
1318
1321
|
}
|
|
@@ -1403,6 +1406,12 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
1403
1406
|
.hawa-h-\[44px\] {
|
|
1404
1407
|
height: 44px;
|
|
1405
1408
|
}
|
|
1409
|
+
.hawa-h-\[72px\] {
|
|
1410
|
+
height: 72px;
|
|
1411
|
+
}
|
|
1412
|
+
.hawa-h-\[88px\] {
|
|
1413
|
+
height: 88px;
|
|
1414
|
+
}
|
|
1406
1415
|
.hawa-h-\[calc\(100dvh\)\] {
|
|
1407
1416
|
height: calc(100dvh);
|
|
1408
1417
|
}
|
|
@@ -1492,9 +1501,6 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
1492
1501
|
.hawa-w-24 {
|
|
1493
1502
|
width: 6rem;
|
|
1494
1503
|
}
|
|
1495
|
-
.hawa-w-28 {
|
|
1496
|
-
width: 7rem;
|
|
1497
|
-
}
|
|
1498
1504
|
.hawa-w-3 {
|
|
1499
1505
|
width: 0.75rem;
|
|
1500
1506
|
}
|
|
@@ -1573,6 +1579,12 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
1573
1579
|
.hawa-w-\[47px\] {
|
|
1574
1580
|
width: 47px;
|
|
1575
1581
|
}
|
|
1582
|
+
.hawa-w-\[72px\] {
|
|
1583
|
+
width: 72px;
|
|
1584
|
+
}
|
|
1585
|
+
.hawa-w-\[88px\] {
|
|
1586
|
+
width: 88px;
|
|
1587
|
+
}
|
|
1576
1588
|
.hawa-w-auto {
|
|
1577
1589
|
width: auto;
|
|
1578
1590
|
}
|
|
@@ -1713,6 +1725,10 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
1713
1725
|
--tw-translate-x: -50%;
|
|
1714
1726
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
1715
1727
|
}
|
|
1728
|
+
.hawa-translate-y-1\/2 {
|
|
1729
|
+
--tw-translate-y: 50%;
|
|
1730
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
1731
|
+
}
|
|
1716
1732
|
.hawa-translate-y-\[-50\%\] {
|
|
1717
1733
|
--tw-translate-y: -50%;
|
|
1718
1734
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
@@ -2952,6 +2968,11 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
2952
2968
|
--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
|
|
2953
2969
|
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
2954
2970
|
}
|
|
2971
|
+
.hawa-shadow-none {
|
|
2972
|
+
--tw-shadow: 0 0 #0000;
|
|
2973
|
+
--tw-shadow-colored: 0 0 #0000;
|
|
2974
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
2975
|
+
}
|
|
2955
2976
|
.hawa-shadow-sm {
|
|
2956
2977
|
--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
2957
2978
|
--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
|
|
@@ -2972,6 +2993,10 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
2972
2993
|
.hawa-ring-offset-background {
|
|
2973
2994
|
--tw-ring-offset-color: hsl(var(--background));
|
|
2974
2995
|
}
|
|
2996
|
+
.hawa-drop-shadow-md {
|
|
2997
|
+
--tw-drop-shadow: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06));
|
|
2998
|
+
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
2999
|
+
}
|
|
2975
3000
|
.hawa-drop-shadow-xl {
|
|
2976
3001
|
--tw-drop-shadow: drop-shadow(0 20px 13px rgb(0 0 0 / 0.03)) drop-shadow(0 8px 5px rgb(0 0 0 / 0.08));
|
|
2977
3002
|
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
package/dist/index.d.mts
CHANGED
|
@@ -296,6 +296,8 @@ declare const Input: React__default.ForwardRefExoticComponent<React__default.Inp
|
|
|
296
296
|
} | undefined;
|
|
297
297
|
startIcon?: React__default.ReactNode;
|
|
298
298
|
placeholder?: React__default.ReactNode;
|
|
299
|
+
/** Show the count of characters left in the input field. Works along with maxLength prop. */
|
|
300
|
+
showCount?: boolean | undefined;
|
|
299
301
|
} & React__default.RefAttributes<HTMLInputElement>>;
|
|
300
302
|
|
|
301
303
|
type ComboboxTypes<T> = {
|
|
@@ -367,7 +369,7 @@ interface AvatarProps {
|
|
|
367
369
|
isUploadable?: boolean;
|
|
368
370
|
src?: string;
|
|
369
371
|
alt?: string;
|
|
370
|
-
size?: "xs" | "sm" | "default" | "lg" | "xl" | "2xl" | "3xl" | "4xl";
|
|
372
|
+
size?: "2xs" | "xs" | "sm" | "default" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl";
|
|
371
373
|
radius?: RadiusType;
|
|
372
374
|
className?: string;
|
|
373
375
|
}
|
|
@@ -611,8 +613,8 @@ interface PopoverProps {
|
|
|
611
613
|
disableTrigger?: any;
|
|
612
614
|
width?: "trigger" | "default";
|
|
613
615
|
open?: boolean;
|
|
614
|
-
contentProps?:
|
|
615
|
-
triggerProps?:
|
|
616
|
+
contentProps?: PopoverPrimitive.PopoverContentProps;
|
|
617
|
+
triggerProps?: PopoverPrimitive.PopoverTriggerProps;
|
|
616
618
|
}
|
|
617
619
|
type HawaPopoverTypes = PopoverProps & React$1.ComponentProps<typeof PopoverPrimitive.Root>;
|
|
618
620
|
declare const Popover: React$1.FC<HawaPopoverTypes>;
|
|
@@ -1535,18 +1537,24 @@ type ComponentTypes = {
|
|
|
1535
1537
|
};
|
|
1536
1538
|
declare const FeedbackEmoji: FC<ComponentTypes>;
|
|
1537
1539
|
|
|
1540
|
+
type FeedbackFormRequestTypeInputProps = BaseInputType & {
|
|
1541
|
+
required?: string;
|
|
1542
|
+
};
|
|
1543
|
+
type FeedbackFormDescriptionInputProps = BaseInputType & {
|
|
1544
|
+
required?: string;
|
|
1545
|
+
tooShort?: string;
|
|
1546
|
+
};
|
|
1538
1547
|
type FeedbackFormType = {
|
|
1539
1548
|
onSubmit: (e: any) => void;
|
|
1540
1549
|
requestTypes?: {
|
|
1541
1550
|
label: string;
|
|
1542
1551
|
value: any;
|
|
1543
1552
|
}[];
|
|
1553
|
+
selectProps?: any;
|
|
1554
|
+
cardless?: boolean;
|
|
1544
1555
|
texts: {
|
|
1545
|
-
requestType
|
|
1546
|
-
|
|
1547
|
-
description?: string;
|
|
1548
|
-
descriptionRequired?: string;
|
|
1549
|
-
descriptionTooShort?: string;
|
|
1556
|
+
requestType: FeedbackFormRequestTypeInputProps;
|
|
1557
|
+
description: FeedbackFormDescriptionInputProps;
|
|
1550
1558
|
submit?: string;
|
|
1551
1559
|
};
|
|
1552
1560
|
};
|
|
@@ -1839,4 +1847,4 @@ declare function useTabs(initialTab?: string): {
|
|
|
1839
1847
|
handleTabChange: (index: any) => void;
|
|
1840
1848
|
};
|
|
1841
1849
|
|
|
1842
|
-
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, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRoot, DropdownMenuSeparator, 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 };
|
|
1850
|
+
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, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRoot, DropdownMenuSeparator, 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
|
@@ -296,6 +296,8 @@ declare const Input: React__default.ForwardRefExoticComponent<React__default.Inp
|
|
|
296
296
|
} | undefined;
|
|
297
297
|
startIcon?: React__default.ReactNode;
|
|
298
298
|
placeholder?: React__default.ReactNode;
|
|
299
|
+
/** Show the count of characters left in the input field. Works along with maxLength prop. */
|
|
300
|
+
showCount?: boolean | undefined;
|
|
299
301
|
} & React__default.RefAttributes<HTMLInputElement>>;
|
|
300
302
|
|
|
301
303
|
type ComboboxTypes<T> = {
|
|
@@ -367,7 +369,7 @@ interface AvatarProps {
|
|
|
367
369
|
isUploadable?: boolean;
|
|
368
370
|
src?: string;
|
|
369
371
|
alt?: string;
|
|
370
|
-
size?: "xs" | "sm" | "default" | "lg" | "xl" | "2xl" | "3xl" | "4xl";
|
|
372
|
+
size?: "2xs" | "xs" | "sm" | "default" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl";
|
|
371
373
|
radius?: RadiusType;
|
|
372
374
|
className?: string;
|
|
373
375
|
}
|
|
@@ -611,8 +613,8 @@ interface PopoverProps {
|
|
|
611
613
|
disableTrigger?: any;
|
|
612
614
|
width?: "trigger" | "default";
|
|
613
615
|
open?: boolean;
|
|
614
|
-
contentProps?:
|
|
615
|
-
triggerProps?:
|
|
616
|
+
contentProps?: PopoverPrimitive.PopoverContentProps;
|
|
617
|
+
triggerProps?: PopoverPrimitive.PopoverTriggerProps;
|
|
616
618
|
}
|
|
617
619
|
type HawaPopoverTypes = PopoverProps & React$1.ComponentProps<typeof PopoverPrimitive.Root>;
|
|
618
620
|
declare const Popover: React$1.FC<HawaPopoverTypes>;
|
|
@@ -1535,18 +1537,24 @@ type ComponentTypes = {
|
|
|
1535
1537
|
};
|
|
1536
1538
|
declare const FeedbackEmoji: FC<ComponentTypes>;
|
|
1537
1539
|
|
|
1540
|
+
type FeedbackFormRequestTypeInputProps = BaseInputType & {
|
|
1541
|
+
required?: string;
|
|
1542
|
+
};
|
|
1543
|
+
type FeedbackFormDescriptionInputProps = BaseInputType & {
|
|
1544
|
+
required?: string;
|
|
1545
|
+
tooShort?: string;
|
|
1546
|
+
};
|
|
1538
1547
|
type FeedbackFormType = {
|
|
1539
1548
|
onSubmit: (e: any) => void;
|
|
1540
1549
|
requestTypes?: {
|
|
1541
1550
|
label: string;
|
|
1542
1551
|
value: any;
|
|
1543
1552
|
}[];
|
|
1553
|
+
selectProps?: any;
|
|
1554
|
+
cardless?: boolean;
|
|
1544
1555
|
texts: {
|
|
1545
|
-
requestType
|
|
1546
|
-
|
|
1547
|
-
description?: string;
|
|
1548
|
-
descriptionRequired?: string;
|
|
1549
|
-
descriptionTooShort?: string;
|
|
1556
|
+
requestType: FeedbackFormRequestTypeInputProps;
|
|
1557
|
+
description: FeedbackFormDescriptionInputProps;
|
|
1550
1558
|
submit?: string;
|
|
1551
1559
|
};
|
|
1552
1560
|
};
|
|
@@ -1839,4 +1847,4 @@ declare function useTabs(initialTab?: string): {
|
|
|
1839
1847
|
handleTabChange: (index: any) => void;
|
|
1840
1848
|
};
|
|
1841
1849
|
|
|
1842
|
-
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, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRoot, DropdownMenuSeparator, 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 };
|
|
1850
|
+
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, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRoot, DropdownMenuSeparator, 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
|
@@ -3787,6 +3787,7 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3787
3787
|
forceHideHelperText = false,
|
|
3788
3788
|
labelProps,
|
|
3789
3789
|
placeholder,
|
|
3790
|
+
showCount,
|
|
3790
3791
|
...props
|
|
3791
3792
|
}, ref) => {
|
|
3792
3793
|
var _a, _b;
|
|
@@ -3835,6 +3836,7 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3835
3836
|
), /* @__PURE__ */ import_react15.default.createElement(
|
|
3836
3837
|
"input",
|
|
3837
3838
|
{
|
|
3839
|
+
...props,
|
|
3838
3840
|
required: true,
|
|
3839
3841
|
dir: props.dir,
|
|
3840
3842
|
type: props.type,
|
|
@@ -3863,6 +3865,25 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3863
3865
|
)
|
|
3864
3866
|
},
|
|
3865
3867
|
props.helperText
|
|
3868
|
+
), !props.disabled && forceHideHelperText && /* @__PURE__ */ import_react15.default.createElement(
|
|
3869
|
+
"div",
|
|
3870
|
+
{
|
|
3871
|
+
className: cn(
|
|
3872
|
+
"hawa-absolute hawa-top-[47px] hawa-text-sm hawa-text-helper-color hawa-transition-all hawa-text-start hawa-rounded hawa-end-0 hawa-z-20 hawa-drop-shadow-md hawa-bg-background hawa-translate-y-1/2",
|
|
3873
|
+
props.helperText ? "hawa-border hawa-p-1" : " hawa-border-none hawa-p-0"
|
|
3874
|
+
)
|
|
3875
|
+
},
|
|
3876
|
+
props.helperText
|
|
3877
|
+
), showCount && /* @__PURE__ */ import_react15.default.createElement(
|
|
3878
|
+
"div",
|
|
3879
|
+
{
|
|
3880
|
+
className: cn(
|
|
3881
|
+
"hawa-absolute hawa-top-[60px] hawa-text-sm hawa-transition-all hawa-text-start hawa-end-0 hawa-translate-y-1/2"
|
|
3882
|
+
)
|
|
3883
|
+
},
|
|
3884
|
+
props.value ? String(props.value).length : 0,
|
|
3885
|
+
"/",
|
|
3886
|
+
props.maxLength
|
|
3866
3887
|
)))
|
|
3867
3888
|
);
|
|
3868
3889
|
}
|
|
@@ -4515,14 +4536,17 @@ var Avatar = ({
|
|
|
4515
4536
|
...props
|
|
4516
4537
|
}) => {
|
|
4517
4538
|
let sizeStyles = {
|
|
4518
|
-
|
|
4539
|
+
"2xs": "hawa-h-4 hawa-w-4",
|
|
4540
|
+
xs: "hawa-h-6 hawa-w-6",
|
|
4519
4541
|
sm: "hawa-h-8 hawa-w-8",
|
|
4520
|
-
default: "hawa-h-
|
|
4521
|
-
lg: "hawa-h-
|
|
4522
|
-
xl: "hawa-h-
|
|
4523
|
-
"2xl": "hawa-h-
|
|
4524
|
-
"3xl": "hawa-h-
|
|
4525
|
-
"4xl": "hawa-h-
|
|
4542
|
+
default: "hawa-h-10 hawa-w-10",
|
|
4543
|
+
lg: "hawa-h-12 hawa-w-12",
|
|
4544
|
+
xl: "hawa-h-14 hawa-w-14",
|
|
4545
|
+
"2xl": "hawa-h-16 hawa-w-16",
|
|
4546
|
+
"3xl": "hawa-h-[72px] hawa-w-[72px]",
|
|
4547
|
+
"4xl": "hawa-h-20 hawa-w-20",
|
|
4548
|
+
"5xl": "hawa-h-[88px] hawa-w-[88px]",
|
|
4549
|
+
"6xl": "hawa-h-24 hawa-w-24"
|
|
4526
4550
|
};
|
|
4527
4551
|
let radiusStyles = {
|
|
4528
4552
|
full: "hawa-rounded-full",
|
|
@@ -4543,7 +4567,7 @@ var Avatar = ({
|
|
|
4543
4567
|
FileUploader,
|
|
4544
4568
|
{
|
|
4545
4569
|
className: cn(
|
|
4546
|
-
"hawa-bg-red-400 hawa-absolute hawa-top-0 hawa-left-0 hawa-opacity-0",
|
|
4570
|
+
"hawa-bg-red-400 hawa-absolute hawa-w- hawa-top-0 hawa-left-0 hawa-opacity-0",
|
|
4547
4571
|
sizeStyles[size],
|
|
4548
4572
|
radiusStyles[radius],
|
|
4549
4573
|
(!isUploadable || !!src) && "hawa-hidden"
|
|
@@ -4562,6 +4586,30 @@ var Avatar = ({
|
|
|
4562
4586
|
src,
|
|
4563
4587
|
alt
|
|
4564
4588
|
}
|
|
4589
|
+
),
|
|
4590
|
+
!src && !isUploadable && /* @__PURE__ */ import_react17.default.createElement(
|
|
4591
|
+
"div",
|
|
4592
|
+
{
|
|
4593
|
+
className: cn(
|
|
4594
|
+
sizeStyles[size],
|
|
4595
|
+
"hawa-justify-center hawa-items-center hawa-flex hawa-flex-col"
|
|
4596
|
+
)
|
|
4597
|
+
},
|
|
4598
|
+
/* @__PURE__ */ import_react17.default.createElement(
|
|
4599
|
+
"svg",
|
|
4600
|
+
{
|
|
4601
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4602
|
+
style: { width: "50%", opacity: 0.35 },
|
|
4603
|
+
viewBox: "0 0 24 24",
|
|
4604
|
+
fill: "none",
|
|
4605
|
+
stroke: "currentColor",
|
|
4606
|
+
strokeWidth: "2",
|
|
4607
|
+
strokeLinecap: "round",
|
|
4608
|
+
strokeLinejoin: "round"
|
|
4609
|
+
},
|
|
4610
|
+
/* @__PURE__ */ import_react17.default.createElement("circle", { cx: "12", cy: "8", r: "5" }),
|
|
4611
|
+
/* @__PURE__ */ import_react17.default.createElement("path", { d: "M20 21a8 8 0 1 0-16 0" })
|
|
4612
|
+
)
|
|
4565
4613
|
)
|
|
4566
4614
|
);
|
|
4567
4615
|
};
|
|
@@ -10554,65 +10602,75 @@ var z7 = __toESM(require("zod"));
|
|
|
10554
10602
|
var FeedbackForm = (props) => {
|
|
10555
10603
|
var _a, _b;
|
|
10556
10604
|
const formSchema = z7.object({
|
|
10557
|
-
requestType: z7.string({ required_error: props.texts.
|
|
10558
|
-
description: z7.string({ required_error: props.texts.
|
|
10605
|
+
requestType: z7.string({ required_error: props.texts.requestType.required }).min(1, { message: props.texts.requestType.required }),
|
|
10606
|
+
description: z7.string({ required_error: props.texts.description.required }).min(10, { message: props.texts.description.tooShort })
|
|
10559
10607
|
});
|
|
10560
10608
|
const { handleSubmit, control, formState } = (0, import_react_hook_form7.useForm)({
|
|
10561
10609
|
resolver: (0, import_zod7.zodResolver)(formSchema)
|
|
10562
10610
|
});
|
|
10563
|
-
return /* @__PURE__ */ import_react59.default.createElement(
|
|
10564
|
-
|
|
10611
|
+
return /* @__PURE__ */ import_react59.default.createElement(
|
|
10612
|
+
Card,
|
|
10565
10613
|
{
|
|
10566
|
-
|
|
10567
|
-
|
|
10568
|
-
|
|
10569
|
-
return props.onSubmit(e);
|
|
10570
|
-
} else {
|
|
10571
|
-
console.log("Form is submitted but onSubmit prop is missing");
|
|
10572
|
-
}
|
|
10573
|
-
}),
|
|
10574
|
-
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
|
10614
|
+
className: cn(
|
|
10615
|
+
props.cardless ? "hawa-bg-transparent hawa-border-none hawa-shadow-none" : ""
|
|
10616
|
+
)
|
|
10575
10617
|
},
|
|
10576
|
-
/* @__PURE__ */ import_react59.default.createElement(
|
|
10577
|
-
|
|
10578
|
-
import_react_hook_form7.Controller,
|
|
10618
|
+
/* @__PURE__ */ import_react59.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react59.default.createElement(
|
|
10619
|
+
"form",
|
|
10579
10620
|
{
|
|
10580
|
-
|
|
10581
|
-
|
|
10582
|
-
|
|
10583
|
-
|
|
10584
|
-
|
|
10585
|
-
|
|
10586
|
-
|
|
10587
|
-
|
|
10588
|
-
|
|
10589
|
-
|
|
10590
|
-
|
|
10591
|
-
|
|
10592
|
-
|
|
10621
|
+
noValidate: true,
|
|
10622
|
+
onSubmit: handleSubmit((e) => {
|
|
10623
|
+
if (props.onSubmit) {
|
|
10624
|
+
return props.onSubmit(e);
|
|
10625
|
+
} else {
|
|
10626
|
+
console.log("Form is submitted but onSubmit prop is missing");
|
|
10627
|
+
}
|
|
10628
|
+
}),
|
|
10629
|
+
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
|
10630
|
+
},
|
|
10631
|
+
/* @__PURE__ */ import_react59.default.createElement(Label2, null, (_a = props.texts) == null ? void 0 : _a.requestType.label),
|
|
10632
|
+
/* @__PURE__ */ import_react59.default.createElement(
|
|
10633
|
+
import_react_hook_form7.Controller,
|
|
10634
|
+
{
|
|
10635
|
+
name: "requestType",
|
|
10636
|
+
control,
|
|
10637
|
+
render: ({ field }) => {
|
|
10638
|
+
var _a2, _b2, _c;
|
|
10639
|
+
return /* @__PURE__ */ import_react59.default.createElement(
|
|
10640
|
+
Select,
|
|
10641
|
+
{
|
|
10642
|
+
...field,
|
|
10643
|
+
...props.selectProps,
|
|
10644
|
+
onChange: (option) => field.onChange(option.value),
|
|
10645
|
+
options: props.requestTypes,
|
|
10646
|
+
helperText: (_b2 = (_a2 = formState.errors.requestType) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString(),
|
|
10647
|
+
placeholder: (_c = props.texts) == null ? void 0 : _c.requestType.placeholder
|
|
10648
|
+
}
|
|
10649
|
+
);
|
|
10650
|
+
}
|
|
10593
10651
|
}
|
|
10594
|
-
|
|
10595
|
-
|
|
10596
|
-
|
|
10597
|
-
|
|
10598
|
-
|
|
10599
|
-
|
|
10600
|
-
|
|
10601
|
-
|
|
10602
|
-
|
|
10603
|
-
|
|
10604
|
-
|
|
10605
|
-
|
|
10606
|
-
|
|
10607
|
-
|
|
10608
|
-
|
|
10609
|
-
|
|
10610
|
-
|
|
10652
|
+
),
|
|
10653
|
+
/* @__PURE__ */ import_react59.default.createElement(Label2, null, props.texts.description.label),
|
|
10654
|
+
/* @__PURE__ */ import_react59.default.createElement(
|
|
10655
|
+
import_react_hook_form7.Controller,
|
|
10656
|
+
{
|
|
10657
|
+
name: "description",
|
|
10658
|
+
control,
|
|
10659
|
+
render: ({ field }) => {
|
|
10660
|
+
var _a2, _b2;
|
|
10661
|
+
return /* @__PURE__ */ import_react59.default.createElement(
|
|
10662
|
+
Textarea,
|
|
10663
|
+
{
|
|
10664
|
+
...field,
|
|
10665
|
+
helperText: formState.errors.description && ((_b2 = (_a2 = formState.errors.description) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString())
|
|
10666
|
+
}
|
|
10667
|
+
);
|
|
10668
|
+
}
|
|
10611
10669
|
}
|
|
10612
|
-
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
)
|
|
10670
|
+
),
|
|
10671
|
+
/* @__PURE__ */ import_react59.default.createElement(Button, { type: "submit" }, (_b = props.texts) == null ? void 0 : _b.submit)
|
|
10672
|
+
))
|
|
10673
|
+
);
|
|
10616
10674
|
};
|
|
10617
10675
|
|
|
10618
10676
|
// components/blocks/misc/LegalTexts.tsx
|
package/dist/index.mjs
CHANGED
|
@@ -3565,6 +3565,7 @@ var Input = forwardRef9(
|
|
|
3565
3565
|
forceHideHelperText = false,
|
|
3566
3566
|
labelProps,
|
|
3567
3567
|
placeholder,
|
|
3568
|
+
showCount,
|
|
3568
3569
|
...props
|
|
3569
3570
|
}, ref) => {
|
|
3570
3571
|
var _a, _b;
|
|
@@ -3613,6 +3614,7 @@ var Input = forwardRef9(
|
|
|
3613
3614
|
), /* @__PURE__ */ React24.createElement(
|
|
3614
3615
|
"input",
|
|
3615
3616
|
{
|
|
3617
|
+
...props,
|
|
3616
3618
|
required: true,
|
|
3617
3619
|
dir: props.dir,
|
|
3618
3620
|
type: props.type,
|
|
@@ -3641,6 +3643,25 @@ var Input = forwardRef9(
|
|
|
3641
3643
|
)
|
|
3642
3644
|
},
|
|
3643
3645
|
props.helperText
|
|
3646
|
+
), !props.disabled && forceHideHelperText && /* @__PURE__ */ React24.createElement(
|
|
3647
|
+
"div",
|
|
3648
|
+
{
|
|
3649
|
+
className: cn(
|
|
3650
|
+
"hawa-absolute hawa-top-[47px] hawa-text-sm hawa-text-helper-color hawa-transition-all hawa-text-start hawa-rounded hawa-end-0 hawa-z-20 hawa-drop-shadow-md hawa-bg-background hawa-translate-y-1/2",
|
|
3651
|
+
props.helperText ? "hawa-border hawa-p-1" : " hawa-border-none hawa-p-0"
|
|
3652
|
+
)
|
|
3653
|
+
},
|
|
3654
|
+
props.helperText
|
|
3655
|
+
), showCount && /* @__PURE__ */ React24.createElement(
|
|
3656
|
+
"div",
|
|
3657
|
+
{
|
|
3658
|
+
className: cn(
|
|
3659
|
+
"hawa-absolute hawa-top-[60px] hawa-text-sm hawa-transition-all hawa-text-start hawa-end-0 hawa-translate-y-1/2"
|
|
3660
|
+
)
|
|
3661
|
+
},
|
|
3662
|
+
props.value ? String(props.value).length : 0,
|
|
3663
|
+
"/",
|
|
3664
|
+
props.maxLength
|
|
3644
3665
|
)))
|
|
3645
3666
|
);
|
|
3646
3667
|
}
|
|
@@ -4293,14 +4314,17 @@ var Avatar = ({
|
|
|
4293
4314
|
...props
|
|
4294
4315
|
}) => {
|
|
4295
4316
|
let sizeStyles = {
|
|
4296
|
-
|
|
4317
|
+
"2xs": "hawa-h-4 hawa-w-4",
|
|
4318
|
+
xs: "hawa-h-6 hawa-w-6",
|
|
4297
4319
|
sm: "hawa-h-8 hawa-w-8",
|
|
4298
|
-
default: "hawa-h-
|
|
4299
|
-
lg: "hawa-h-
|
|
4300
|
-
xl: "hawa-h-
|
|
4301
|
-
"2xl": "hawa-h-
|
|
4302
|
-
"3xl": "hawa-h-
|
|
4303
|
-
"4xl": "hawa-h-
|
|
4320
|
+
default: "hawa-h-10 hawa-w-10",
|
|
4321
|
+
lg: "hawa-h-12 hawa-w-12",
|
|
4322
|
+
xl: "hawa-h-14 hawa-w-14",
|
|
4323
|
+
"2xl": "hawa-h-16 hawa-w-16",
|
|
4324
|
+
"3xl": "hawa-h-[72px] hawa-w-[72px]",
|
|
4325
|
+
"4xl": "hawa-h-20 hawa-w-20",
|
|
4326
|
+
"5xl": "hawa-h-[88px] hawa-w-[88px]",
|
|
4327
|
+
"6xl": "hawa-h-24 hawa-w-24"
|
|
4304
4328
|
};
|
|
4305
4329
|
let radiusStyles = {
|
|
4306
4330
|
full: "hawa-rounded-full",
|
|
@@ -4321,7 +4345,7 @@ var Avatar = ({
|
|
|
4321
4345
|
FileUploader,
|
|
4322
4346
|
{
|
|
4323
4347
|
className: cn(
|
|
4324
|
-
"hawa-bg-red-400 hawa-absolute hawa-top-0 hawa-left-0 hawa-opacity-0",
|
|
4348
|
+
"hawa-bg-red-400 hawa-absolute hawa-w- hawa-top-0 hawa-left-0 hawa-opacity-0",
|
|
4325
4349
|
sizeStyles[size],
|
|
4326
4350
|
radiusStyles[radius],
|
|
4327
4351
|
(!isUploadable || !!src) && "hawa-hidden"
|
|
@@ -4340,6 +4364,30 @@ var Avatar = ({
|
|
|
4340
4364
|
src,
|
|
4341
4365
|
alt
|
|
4342
4366
|
}
|
|
4367
|
+
),
|
|
4368
|
+
!src && !isUploadable && /* @__PURE__ */ React30.createElement(
|
|
4369
|
+
"div",
|
|
4370
|
+
{
|
|
4371
|
+
className: cn(
|
|
4372
|
+
sizeStyles[size],
|
|
4373
|
+
"hawa-justify-center hawa-items-center hawa-flex hawa-flex-col"
|
|
4374
|
+
)
|
|
4375
|
+
},
|
|
4376
|
+
/* @__PURE__ */ React30.createElement(
|
|
4377
|
+
"svg",
|
|
4378
|
+
{
|
|
4379
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4380
|
+
style: { width: "50%", opacity: 0.35 },
|
|
4381
|
+
viewBox: "0 0 24 24",
|
|
4382
|
+
fill: "none",
|
|
4383
|
+
stroke: "currentColor",
|
|
4384
|
+
strokeWidth: "2",
|
|
4385
|
+
strokeLinecap: "round",
|
|
4386
|
+
strokeLinejoin: "round"
|
|
4387
|
+
},
|
|
4388
|
+
/* @__PURE__ */ React30.createElement("circle", { cx: "12", cy: "8", r: "5" }),
|
|
4389
|
+
/* @__PURE__ */ React30.createElement("path", { d: "M20 21a8 8 0 1 0-16 0" })
|
|
4390
|
+
)
|
|
4343
4391
|
)
|
|
4344
4392
|
);
|
|
4345
4393
|
};
|
|
@@ -10346,65 +10394,75 @@ import * as z7 from "zod";
|
|
|
10346
10394
|
var FeedbackForm = (props) => {
|
|
10347
10395
|
var _a, _b;
|
|
10348
10396
|
const formSchema = z7.object({
|
|
10349
|
-
requestType: z7.string({ required_error: props.texts.
|
|
10350
|
-
description: z7.string({ required_error: props.texts.
|
|
10397
|
+
requestType: z7.string({ required_error: props.texts.requestType.required }).min(1, { message: props.texts.requestType.required }),
|
|
10398
|
+
description: z7.string({ required_error: props.texts.description.required }).min(10, { message: props.texts.description.tooShort })
|
|
10351
10399
|
});
|
|
10352
10400
|
const { handleSubmit, control, formState } = useForm7({
|
|
10353
10401
|
resolver: zodResolver7(formSchema)
|
|
10354
10402
|
});
|
|
10355
|
-
return /* @__PURE__ */ React86.createElement(
|
|
10356
|
-
|
|
10403
|
+
return /* @__PURE__ */ React86.createElement(
|
|
10404
|
+
Card,
|
|
10357
10405
|
{
|
|
10358
|
-
|
|
10359
|
-
|
|
10360
|
-
|
|
10361
|
-
return props.onSubmit(e);
|
|
10362
|
-
} else {
|
|
10363
|
-
console.log("Form is submitted but onSubmit prop is missing");
|
|
10364
|
-
}
|
|
10365
|
-
}),
|
|
10366
|
-
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
|
10406
|
+
className: cn(
|
|
10407
|
+
props.cardless ? "hawa-bg-transparent hawa-border-none hawa-shadow-none" : ""
|
|
10408
|
+
)
|
|
10367
10409
|
},
|
|
10368
|
-
/* @__PURE__ */ React86.createElement(
|
|
10369
|
-
|
|
10370
|
-
Controller7,
|
|
10410
|
+
/* @__PURE__ */ React86.createElement(CardContent, { headless: true }, /* @__PURE__ */ React86.createElement(
|
|
10411
|
+
"form",
|
|
10371
10412
|
{
|
|
10372
|
-
|
|
10373
|
-
|
|
10374
|
-
|
|
10375
|
-
|
|
10376
|
-
|
|
10377
|
-
|
|
10378
|
-
|
|
10379
|
-
|
|
10380
|
-
|
|
10381
|
-
|
|
10382
|
-
|
|
10383
|
-
|
|
10384
|
-
|
|
10413
|
+
noValidate: true,
|
|
10414
|
+
onSubmit: handleSubmit((e) => {
|
|
10415
|
+
if (props.onSubmit) {
|
|
10416
|
+
return props.onSubmit(e);
|
|
10417
|
+
} else {
|
|
10418
|
+
console.log("Form is submitted but onSubmit prop is missing");
|
|
10419
|
+
}
|
|
10420
|
+
}),
|
|
10421
|
+
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
|
10422
|
+
},
|
|
10423
|
+
/* @__PURE__ */ React86.createElement(Label2, null, (_a = props.texts) == null ? void 0 : _a.requestType.label),
|
|
10424
|
+
/* @__PURE__ */ React86.createElement(
|
|
10425
|
+
Controller7,
|
|
10426
|
+
{
|
|
10427
|
+
name: "requestType",
|
|
10428
|
+
control,
|
|
10429
|
+
render: ({ field }) => {
|
|
10430
|
+
var _a2, _b2, _c;
|
|
10431
|
+
return /* @__PURE__ */ React86.createElement(
|
|
10432
|
+
Select,
|
|
10433
|
+
{
|
|
10434
|
+
...field,
|
|
10435
|
+
...props.selectProps,
|
|
10436
|
+
onChange: (option) => field.onChange(option.value),
|
|
10437
|
+
options: props.requestTypes,
|
|
10438
|
+
helperText: (_b2 = (_a2 = formState.errors.requestType) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString(),
|
|
10439
|
+
placeholder: (_c = props.texts) == null ? void 0 : _c.requestType.placeholder
|
|
10440
|
+
}
|
|
10441
|
+
);
|
|
10442
|
+
}
|
|
10385
10443
|
}
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
|
|
10389
|
-
|
|
10390
|
-
|
|
10391
|
-
|
|
10392
|
-
|
|
10393
|
-
|
|
10394
|
-
|
|
10395
|
-
|
|
10396
|
-
|
|
10397
|
-
|
|
10398
|
-
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
|
|
10444
|
+
),
|
|
10445
|
+
/* @__PURE__ */ React86.createElement(Label2, null, props.texts.description.label),
|
|
10446
|
+
/* @__PURE__ */ React86.createElement(
|
|
10447
|
+
Controller7,
|
|
10448
|
+
{
|
|
10449
|
+
name: "description",
|
|
10450
|
+
control,
|
|
10451
|
+
render: ({ field }) => {
|
|
10452
|
+
var _a2, _b2;
|
|
10453
|
+
return /* @__PURE__ */ React86.createElement(
|
|
10454
|
+
Textarea,
|
|
10455
|
+
{
|
|
10456
|
+
...field,
|
|
10457
|
+
helperText: formState.errors.description && ((_b2 = (_a2 = formState.errors.description) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString())
|
|
10458
|
+
}
|
|
10459
|
+
);
|
|
10460
|
+
}
|
|
10403
10461
|
}
|
|
10404
|
-
|
|
10405
|
-
|
|
10406
|
-
|
|
10407
|
-
)
|
|
10462
|
+
),
|
|
10463
|
+
/* @__PURE__ */ React86.createElement(Button, { type: "submit" }, (_b = props.texts) == null ? void 0 : _b.submit)
|
|
10464
|
+
))
|
|
10465
|
+
);
|
|
10408
10466
|
};
|
|
10409
10467
|
|
|
10410
10468
|
// components/blocks/misc/LegalTexts.tsx
|