@sikka/hawa 0.18.18-next → 0.18.20-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 +13 -0
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +28 -15
- package/dist/index.mjs +28 -15
- package/package.json +2 -1
package/dist/index.css
CHANGED
|
@@ -991,9 +991,15 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
991
991
|
.hawa-bottom-4 {
|
|
992
992
|
bottom: 1rem;
|
|
993
993
|
}
|
|
994
|
+
.hawa-bottom-\[60px\] {
|
|
995
|
+
bottom: 60px;
|
|
996
|
+
}
|
|
994
997
|
.hawa-end-0 {
|
|
995
998
|
inset-inline-end: 0px;
|
|
996
999
|
}
|
|
1000
|
+
.hawa-end-2 {
|
|
1001
|
+
inset-inline-end: 0.5rem;
|
|
1002
|
+
}
|
|
997
1003
|
.hawa-end-3 {
|
|
998
1004
|
inset-inline-end: 0.75rem;
|
|
999
1005
|
}
|
|
@@ -1465,6 +1471,10 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
1465
1471
|
.hawa-min-h-\[80px\] {
|
|
1466
1472
|
min-height: 80px;
|
|
1467
1473
|
}
|
|
1474
|
+
.hawa-min-h-fit {
|
|
1475
|
+
min-height: -moz-fit-content;
|
|
1476
|
+
min-height: fit-content;
|
|
1477
|
+
}
|
|
1468
1478
|
.hawa-min-h-screen {
|
|
1469
1479
|
min-height: 100vh;
|
|
1470
1480
|
}
|
|
@@ -2622,6 +2632,9 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
2622
2632
|
.hawa-pe-9 {
|
|
2623
2633
|
padding-inline-end: 2.25rem;
|
|
2624
2634
|
}
|
|
2635
|
+
.hawa-pe-\[60px\] {
|
|
2636
|
+
padding-inline-end: 60px;
|
|
2637
|
+
}
|
|
2625
2638
|
.hawa-pl-0 {
|
|
2626
2639
|
padding-left: 0px;
|
|
2627
2640
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -298,6 +298,9 @@ declare const Input: React__default.ForwardRefExoticComponent<React__default.Inp
|
|
|
298
298
|
placeholder?: React__default.ReactNode;
|
|
299
299
|
/** Show the count of characters left in the input field. Works along with maxLength prop. */
|
|
300
300
|
showCount?: boolean | undefined;
|
|
301
|
+
countPosition?: "center" | "top" | "bottom" | undefined;
|
|
302
|
+
popup?: boolean | undefined;
|
|
303
|
+
popupContent?: React__default.ReactNode;
|
|
301
304
|
} & React__default.RefAttributes<HTMLInputElement>>;
|
|
302
305
|
|
|
303
306
|
type ComboboxTypes<T> = {
|
|
@@ -1539,6 +1542,7 @@ declare const FeedbackEmoji: FC<ComponentTypes>;
|
|
|
1539
1542
|
|
|
1540
1543
|
type FeedbackFormRequestTypeInputProps = BaseInputType & {
|
|
1541
1544
|
required?: string;
|
|
1545
|
+
noOptions?: string;
|
|
1542
1546
|
};
|
|
1543
1547
|
type FeedbackFormDescriptionInputProps = BaseInputType & {
|
|
1544
1548
|
required?: string;
|
|
@@ -1847,4 +1851,4 @@ declare function useTabs(initialTab?: string): {
|
|
|
1847
1851
|
handleTabChange: (index: any) => void;
|
|
1848
1852
|
};
|
|
1849
1853
|
|
|
1850
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionRoot, AccordionTrigger, ActionCard, AdCard, Alert, Announcement, AppLanding, AppLayout,
|
|
1854
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -298,6 +298,9 @@ declare const Input: React__default.ForwardRefExoticComponent<React__default.Inp
|
|
|
298
298
|
placeholder?: React__default.ReactNode;
|
|
299
299
|
/** Show the count of characters left in the input field. Works along with maxLength prop. */
|
|
300
300
|
showCount?: boolean | undefined;
|
|
301
|
+
countPosition?: "center" | "top" | "bottom" | undefined;
|
|
302
|
+
popup?: boolean | undefined;
|
|
303
|
+
popupContent?: React__default.ReactNode;
|
|
301
304
|
} & React__default.RefAttributes<HTMLInputElement>>;
|
|
302
305
|
|
|
303
306
|
type ComboboxTypes<T> = {
|
|
@@ -1539,6 +1542,7 @@ declare const FeedbackEmoji: FC<ComponentTypes>;
|
|
|
1539
1542
|
|
|
1540
1543
|
type FeedbackFormRequestTypeInputProps = BaseInputType & {
|
|
1541
1544
|
required?: string;
|
|
1545
|
+
noOptions?: string;
|
|
1542
1546
|
};
|
|
1543
1547
|
type FeedbackFormDescriptionInputProps = BaseInputType & {
|
|
1544
1548
|
required?: string;
|
|
@@ -1847,4 +1851,4 @@ declare function useTabs(initialTab?: string): {
|
|
|
1847
1851
|
handleTabChange: (index: any) => void;
|
|
1848
1852
|
};
|
|
1849
1853
|
|
|
1850
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionRoot, AccordionTrigger, ActionCard, AdCard, Alert, Announcement, AppLanding, AppLayout,
|
|
1854
|
+
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 };
|
package/dist/index.js
CHANGED
|
@@ -3788,6 +3788,7 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3788
3788
|
labelProps,
|
|
3789
3789
|
placeholder,
|
|
3790
3790
|
showCount,
|
|
3791
|
+
countPosition = "bottom",
|
|
3791
3792
|
...props
|
|
3792
3793
|
}, ref) => {
|
|
3793
3794
|
var _a, _b;
|
|
@@ -3850,8 +3851,11 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3850
3851
|
className: cn(
|
|
3851
3852
|
defaultInputStyle,
|
|
3852
3853
|
" dark:hawa-text-white focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0",
|
|
3853
|
-
|
|
3854
|
-
|
|
3854
|
+
{
|
|
3855
|
+
"hawa-pe-9": props.endIcon,
|
|
3856
|
+
"hawa-ps-9": props.startIcon,
|
|
3857
|
+
"hawa-pe-[60px]": countPosition === "center"
|
|
3858
|
+
},
|
|
3855
3859
|
preview && "hawa-border-transparent hawa-bg-transparent hawa-px-0",
|
|
3856
3860
|
(_b = props.inputProps) == null ? void 0 : _b.className
|
|
3857
3861
|
)
|
|
@@ -3869,8 +3873,8 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3869
3873
|
"div",
|
|
3870
3874
|
{
|
|
3871
3875
|
className: cn(
|
|
3872
|
-
"hawa-absolute hawa-top-[47px] hawa-text-
|
|
3873
|
-
props.helperText ? "hawa-border hawa-p-1" : "
|
|
3876
|
+
"hawa-absolute hawa-top-[47px] hawa-text-xs 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",
|
|
3877
|
+
props.helperText ? "hawa-border hawa-p-1" : "hawa-border-none hawa-p-0"
|
|
3874
3878
|
)
|
|
3875
3879
|
},
|
|
3876
3880
|
props.helperText
|
|
@@ -3878,7 +3882,12 @@ var Input = (0, import_react15.forwardRef)(
|
|
|
3878
3882
|
"div",
|
|
3879
3883
|
{
|
|
3880
3884
|
className: cn(
|
|
3881
|
-
"hawa-absolute hawa-
|
|
3885
|
+
"hawa-absolute hawa-text-xs hawa-transition-all hawa-text-start hawa-translate-y-1/2",
|
|
3886
|
+
{
|
|
3887
|
+
"hawa-end-0 hawa-top-[60px]": countPosition === "bottom",
|
|
3888
|
+
"hawa-end-0 hawa-bottom-[60px]": countPosition === "top",
|
|
3889
|
+
"hawa-end-2": countPosition === "center"
|
|
3890
|
+
}
|
|
3882
3891
|
)
|
|
3883
3892
|
},
|
|
3884
3893
|
props.value ? String(props.value).length : 0,
|
|
@@ -10600,10 +10609,10 @@ var import_react_hook_form7 = require("react-hook-form");
|
|
|
10600
10609
|
var import_zod7 = require("@hookform/resolvers/zod");
|
|
10601
10610
|
var z7 = __toESM(require("zod"));
|
|
10602
10611
|
var FeedbackForm = (props) => {
|
|
10603
|
-
var _a, _b;
|
|
10612
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
10604
10613
|
const formSchema = z7.object({
|
|
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 })
|
|
10614
|
+
requestType: z7.string({ required_error: (_b = (_a = props.texts) == null ? void 0 : _a.requestType) == null ? void 0 : _b.required }).min(1, { message: (_d = (_c = props.texts) == null ? void 0 : _c.requestType) == null ? void 0 : _d.required }),
|
|
10615
|
+
description: z7.string({ required_error: (_f = (_e = props.texts) == null ? void 0 : _e.description) == null ? void 0 : _f.required }).min(10, { message: (_h = (_g = props.texts) == null ? void 0 : _g.description) == null ? void 0 : _h.tooShort })
|
|
10607
10616
|
});
|
|
10608
10617
|
const { handleSubmit, control, formState } = (0, import_react_hook_form7.useForm)({
|
|
10609
10618
|
resolver: (0, import_zod7.zodResolver)(formSchema)
|
|
@@ -10628,14 +10637,14 @@ var FeedbackForm = (props) => {
|
|
|
10628
10637
|
}),
|
|
10629
10638
|
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
|
10630
10639
|
},
|
|
10631
|
-
/* @__PURE__ */ import_react59.default.createElement(Label2, null, (
|
|
10640
|
+
/* @__PURE__ */ import_react59.default.createElement(Label2, null, (_j = (_i = props.texts) == null ? void 0 : _i.requestType) == null ? void 0 : _j.label),
|
|
10632
10641
|
/* @__PURE__ */ import_react59.default.createElement(
|
|
10633
10642
|
import_react_hook_form7.Controller,
|
|
10634
10643
|
{
|
|
10635
10644
|
name: "requestType",
|
|
10636
10645
|
control,
|
|
10637
10646
|
render: ({ field }) => {
|
|
10638
|
-
var _a2, _b2,
|
|
10647
|
+
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
10639
10648
|
return /* @__PURE__ */ import_react59.default.createElement(
|
|
10640
10649
|
Select,
|
|
10641
10650
|
{
|
|
@@ -10644,31 +10653,35 @@ var FeedbackForm = (props) => {
|
|
|
10644
10653
|
onChange: (option) => field.onChange(option.value),
|
|
10645
10654
|
options: props.requestTypes,
|
|
10646
10655
|
helperText: (_b2 = (_a2 = formState.errors.requestType) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString(),
|
|
10647
|
-
placeholder: (
|
|
10656
|
+
placeholder: (_d2 = (_c2 = props.texts) == null ? void 0 : _c2.requestType) == null ? void 0 : _d2.placeholder,
|
|
10657
|
+
texts: {
|
|
10658
|
+
noOptions: (_f2 = (_e2 = props.texts) == null ? void 0 : _e2.requestType) == null ? void 0 : _f2.noOptions
|
|
10659
|
+
}
|
|
10648
10660
|
}
|
|
10649
10661
|
);
|
|
10650
10662
|
}
|
|
10651
10663
|
}
|
|
10652
10664
|
),
|
|
10653
|
-
/* @__PURE__ */ import_react59.default.createElement(Label2, null, props.texts.description.label),
|
|
10665
|
+
/* @__PURE__ */ import_react59.default.createElement(Label2, null, (_l = (_k = props.texts) == null ? void 0 : _k.description) == null ? void 0 : _l.label),
|
|
10654
10666
|
/* @__PURE__ */ import_react59.default.createElement(
|
|
10655
10667
|
import_react_hook_form7.Controller,
|
|
10656
10668
|
{
|
|
10657
10669
|
name: "description",
|
|
10658
10670
|
control,
|
|
10659
10671
|
render: ({ field }) => {
|
|
10660
|
-
var _a2, _b2;
|
|
10672
|
+
var _a2, _b2, _c2, _d2;
|
|
10661
10673
|
return /* @__PURE__ */ import_react59.default.createElement(
|
|
10662
10674
|
Textarea,
|
|
10663
10675
|
{
|
|
10664
10676
|
...field,
|
|
10665
|
-
helperText: formState.errors.description && ((_b2 = (_a2 = formState.errors.description) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString())
|
|
10677
|
+
helperText: formState.errors.description && ((_b2 = (_a2 = formState.errors.description) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()),
|
|
10678
|
+
placeholder: (_d2 = (_c2 = props.texts) == null ? void 0 : _c2.description) == null ? void 0 : _d2.placeholder
|
|
10666
10679
|
}
|
|
10667
10680
|
);
|
|
10668
10681
|
}
|
|
10669
10682
|
}
|
|
10670
10683
|
),
|
|
10671
|
-
/* @__PURE__ */ import_react59.default.createElement(Button, { type: "submit" }, (
|
|
10684
|
+
/* @__PURE__ */ import_react59.default.createElement(Button, { type: "submit" }, (_m = props.texts) == null ? void 0 : _m.submit)
|
|
10672
10685
|
))
|
|
10673
10686
|
);
|
|
10674
10687
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -3566,6 +3566,7 @@ var Input = forwardRef9(
|
|
|
3566
3566
|
labelProps,
|
|
3567
3567
|
placeholder,
|
|
3568
3568
|
showCount,
|
|
3569
|
+
countPosition = "bottom",
|
|
3569
3570
|
...props
|
|
3570
3571
|
}, ref) => {
|
|
3571
3572
|
var _a, _b;
|
|
@@ -3628,8 +3629,11 @@ var Input = forwardRef9(
|
|
|
3628
3629
|
className: cn(
|
|
3629
3630
|
defaultInputStyle,
|
|
3630
3631
|
" dark:hawa-text-white focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0",
|
|
3631
|
-
|
|
3632
|
-
|
|
3632
|
+
{
|
|
3633
|
+
"hawa-pe-9": props.endIcon,
|
|
3634
|
+
"hawa-ps-9": props.startIcon,
|
|
3635
|
+
"hawa-pe-[60px]": countPosition === "center"
|
|
3636
|
+
},
|
|
3633
3637
|
preview && "hawa-border-transparent hawa-bg-transparent hawa-px-0",
|
|
3634
3638
|
(_b = props.inputProps) == null ? void 0 : _b.className
|
|
3635
3639
|
)
|
|
@@ -3647,8 +3651,8 @@ var Input = forwardRef9(
|
|
|
3647
3651
|
"div",
|
|
3648
3652
|
{
|
|
3649
3653
|
className: cn(
|
|
3650
|
-
"hawa-absolute hawa-top-[47px] hawa-text-
|
|
3651
|
-
props.helperText ? "hawa-border hawa-p-1" : "
|
|
3654
|
+
"hawa-absolute hawa-top-[47px] hawa-text-xs 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",
|
|
3655
|
+
props.helperText ? "hawa-border hawa-p-1" : "hawa-border-none hawa-p-0"
|
|
3652
3656
|
)
|
|
3653
3657
|
},
|
|
3654
3658
|
props.helperText
|
|
@@ -3656,7 +3660,12 @@ var Input = forwardRef9(
|
|
|
3656
3660
|
"div",
|
|
3657
3661
|
{
|
|
3658
3662
|
className: cn(
|
|
3659
|
-
"hawa-absolute hawa-
|
|
3663
|
+
"hawa-absolute hawa-text-xs hawa-transition-all hawa-text-start hawa-translate-y-1/2",
|
|
3664
|
+
{
|
|
3665
|
+
"hawa-end-0 hawa-top-[60px]": countPosition === "bottom",
|
|
3666
|
+
"hawa-end-0 hawa-bottom-[60px]": countPosition === "top",
|
|
3667
|
+
"hawa-end-2": countPosition === "center"
|
|
3668
|
+
}
|
|
3660
3669
|
)
|
|
3661
3670
|
},
|
|
3662
3671
|
props.value ? String(props.value).length : 0,
|
|
@@ -10392,10 +10401,10 @@ import { useForm as useForm7, Controller as Controller7 } from "react-hook-form"
|
|
|
10392
10401
|
import { zodResolver as zodResolver7 } from "@hookform/resolvers/zod";
|
|
10393
10402
|
import * as z7 from "zod";
|
|
10394
10403
|
var FeedbackForm = (props) => {
|
|
10395
|
-
var _a, _b;
|
|
10404
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
10396
10405
|
const formSchema = z7.object({
|
|
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 })
|
|
10406
|
+
requestType: z7.string({ required_error: (_b = (_a = props.texts) == null ? void 0 : _a.requestType) == null ? void 0 : _b.required }).min(1, { message: (_d = (_c = props.texts) == null ? void 0 : _c.requestType) == null ? void 0 : _d.required }),
|
|
10407
|
+
description: z7.string({ required_error: (_f = (_e = props.texts) == null ? void 0 : _e.description) == null ? void 0 : _f.required }).min(10, { message: (_h = (_g = props.texts) == null ? void 0 : _g.description) == null ? void 0 : _h.tooShort })
|
|
10399
10408
|
});
|
|
10400
10409
|
const { handleSubmit, control, formState } = useForm7({
|
|
10401
10410
|
resolver: zodResolver7(formSchema)
|
|
@@ -10420,14 +10429,14 @@ var FeedbackForm = (props) => {
|
|
|
10420
10429
|
}),
|
|
10421
10430
|
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
|
10422
10431
|
},
|
|
10423
|
-
/* @__PURE__ */ React86.createElement(Label2, null, (
|
|
10432
|
+
/* @__PURE__ */ React86.createElement(Label2, null, (_j = (_i = props.texts) == null ? void 0 : _i.requestType) == null ? void 0 : _j.label),
|
|
10424
10433
|
/* @__PURE__ */ React86.createElement(
|
|
10425
10434
|
Controller7,
|
|
10426
10435
|
{
|
|
10427
10436
|
name: "requestType",
|
|
10428
10437
|
control,
|
|
10429
10438
|
render: ({ field }) => {
|
|
10430
|
-
var _a2, _b2,
|
|
10439
|
+
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
10431
10440
|
return /* @__PURE__ */ React86.createElement(
|
|
10432
10441
|
Select,
|
|
10433
10442
|
{
|
|
@@ -10436,31 +10445,35 @@ var FeedbackForm = (props) => {
|
|
|
10436
10445
|
onChange: (option) => field.onChange(option.value),
|
|
10437
10446
|
options: props.requestTypes,
|
|
10438
10447
|
helperText: (_b2 = (_a2 = formState.errors.requestType) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString(),
|
|
10439
|
-
placeholder: (
|
|
10448
|
+
placeholder: (_d2 = (_c2 = props.texts) == null ? void 0 : _c2.requestType) == null ? void 0 : _d2.placeholder,
|
|
10449
|
+
texts: {
|
|
10450
|
+
noOptions: (_f2 = (_e2 = props.texts) == null ? void 0 : _e2.requestType) == null ? void 0 : _f2.noOptions
|
|
10451
|
+
}
|
|
10440
10452
|
}
|
|
10441
10453
|
);
|
|
10442
10454
|
}
|
|
10443
10455
|
}
|
|
10444
10456
|
),
|
|
10445
|
-
/* @__PURE__ */ React86.createElement(Label2, null, props.texts.description.label),
|
|
10457
|
+
/* @__PURE__ */ React86.createElement(Label2, null, (_l = (_k = props.texts) == null ? void 0 : _k.description) == null ? void 0 : _l.label),
|
|
10446
10458
|
/* @__PURE__ */ React86.createElement(
|
|
10447
10459
|
Controller7,
|
|
10448
10460
|
{
|
|
10449
10461
|
name: "description",
|
|
10450
10462
|
control,
|
|
10451
10463
|
render: ({ field }) => {
|
|
10452
|
-
var _a2, _b2;
|
|
10464
|
+
var _a2, _b2, _c2, _d2;
|
|
10453
10465
|
return /* @__PURE__ */ React86.createElement(
|
|
10454
10466
|
Textarea,
|
|
10455
10467
|
{
|
|
10456
10468
|
...field,
|
|
10457
|
-
helperText: formState.errors.description && ((_b2 = (_a2 = formState.errors.description) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString())
|
|
10469
|
+
helperText: formState.errors.description && ((_b2 = (_a2 = formState.errors.description) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()),
|
|
10470
|
+
placeholder: (_d2 = (_c2 = props.texts) == null ? void 0 : _c2.description) == null ? void 0 : _d2.placeholder
|
|
10458
10471
|
}
|
|
10459
10472
|
);
|
|
10460
10473
|
}
|
|
10461
10474
|
}
|
|
10462
10475
|
),
|
|
10463
|
-
/* @__PURE__ */ React86.createElement(Button, { type: "submit" }, (
|
|
10476
|
+
/* @__PURE__ */ React86.createElement(Button, { type: "submit" }, (_m = props.texts) == null ? void 0 : _m.submit)
|
|
10464
10477
|
))
|
|
10465
10478
|
);
|
|
10466
10479
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sikka/hawa",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.20-next",
|
|
4
4
|
"description": "Modern UI Kit made with Tailwind",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Sikka Software",
|
|
@@ -96,6 +96,7 @@
|
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
98
|
"@babel/preset-react": "^7.23.3",
|
|
99
|
+
"@sikka/alam": "^0.0.2",
|
|
99
100
|
"@storybook/addon-essentials": "^7.5.3",
|
|
100
101
|
"@storybook/addon-interactions": "^7.5.3",
|
|
101
102
|
"@storybook/addon-links": "^7.5.3",
|