@sikka/hawa 0.29.14-next → 0.30.1-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/alert/index.d.mts +5 -4
- package/dist/alert/index.d.ts +5 -4
- package/dist/alert/index.js +10 -6
- package/dist/alert/index.js.map +1 -1
- package/dist/alert/index.mjs +10 -6
- package/dist/alert/index.mjs.map +1 -1
- package/dist/blocks/auth/index.d.mts +2 -0
- package/dist/blocks/auth/index.d.ts +2 -0
- package/dist/blocks/auth/index.js +17 -7
- package/dist/blocks/auth/index.mjs +17 -7
- package/dist/blocks/feedback/index.js +15 -13
- package/dist/blocks/feedback/index.mjs +15 -13
- package/dist/blocks/index.d.mts +2 -0
- package/dist/blocks/index.d.ts +2 -0
- package/dist/blocks/index.js +32 -20
- package/dist/blocks/index.mjs +8 -2
- package/dist/{chunk-XKVSLAKW.mjs → chunk-Q754X27Z.mjs} +25 -19
- package/dist/combobox/index.d.mts +1 -0
- package/dist/combobox/index.d.ts +1 -0
- package/dist/combobox/index.js +224 -218
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs +224 -218
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/command/index.js +1 -1
- package/dist/command/index.js.map +1 -1
- package/dist/command/index.mjs +1 -1
- package/dist/command/index.mjs.map +1 -1
- package/dist/dataTable/index.d.mts +1 -1
- package/dist/dataTable/index.d.ts +1 -1
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/dialog/index.d.mts +1 -0
- package/dist/dialog/index.d.ts +1 -0
- package/dist/dialog/index.js +1 -1
- package/dist/dialog/index.js.map +1 -1
- package/dist/dialog/index.mjs +1 -1
- package/dist/dialog/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +14 -8
- package/dist/elements/index.d.ts +14 -8
- package/dist/elements/index.js +97 -87
- package/dist/elements/index.mjs +15 -11
- package/dist/fileDropzone/index.js +10 -6
- package/dist/fileDropzone/index.js.map +1 -1
- package/dist/fileDropzone/index.mjs +10 -6
- package/dist/fileDropzone/index.mjs.map +1 -1
- package/dist/index.d.mts +16 -8
- package/dist/index.d.ts +16 -8
- package/dist/index.js +104 -88
- package/dist/index.mjs +130 -114
- package/dist/passwordInput/index.js +15 -13
- package/dist/passwordInput/index.js.map +1 -1
- package/dist/passwordInput/index.mjs +15 -13
- package/dist/passwordInput/index.mjs.map +1 -1
- package/dist/popover/index.d.mts +3 -1
- package/dist/popover/index.d.ts +3 -1
- package/dist/popover/index.js +15 -13
- package/dist/popover/index.js.map +1 -1
- package/dist/popover/index.mjs +15 -13
- package/dist/popover/index.mjs.map +1 -1
- package/dist/simpleTable/index.d.mts +4 -3
- package/dist/simpleTable/index.d.ts +4 -3
- package/dist/simpleTable/index.js.map +1 -1
- package/dist/simpleTable/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -343,6 +343,7 @@ declare const DialogPortal: {
|
|
343
343
|
declare const DialogContent: React$1.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
344
344
|
persist?: boolean | undefined;
|
345
345
|
hideCloseButton?: boolean | undefined;
|
346
|
+
container?: HTMLElement | undefined;
|
346
347
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
347
348
|
declare const DialogCarouselContent: React$1.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
348
349
|
hideCloseButton?: boolean | undefined;
|
@@ -389,9 +390,9 @@ declare const DialogBody: React$1.FC<DialogBodyProps>;
|
|
389
390
|
type AlertTypes = {
|
390
391
|
severity?: SeverityType | "hyper" | "oceanic";
|
391
392
|
/** The title of the alert placed above the text of the alert. Can be used alone */
|
392
|
-
title?:
|
393
|
+
title?: React__default.ReactNode;
|
393
394
|
/** The text of the alert placed below the title of the alert. Can be used alone */
|
394
|
-
text:
|
395
|
+
text: React__default.ReactNode;
|
395
396
|
/** The duration for the alert to stay on the screen */
|
396
397
|
duration?: number;
|
397
398
|
direction?: DirectionType;
|
@@ -405,8 +406,9 @@ type AlertTypes = {
|
|
405
406
|
/** Removes the close button */
|
406
407
|
persistent?: boolean;
|
407
408
|
icon?: any;
|
408
|
-
className?:
|
409
|
-
onAlertClosed?:
|
409
|
+
className?: string;
|
410
|
+
onAlertClosed?: () => void;
|
411
|
+
noDestroy?: boolean;
|
410
412
|
};
|
411
413
|
declare const Alert: React__default.FunctionComponent<AlertTypes>;
|
412
414
|
|
@@ -559,6 +561,7 @@ type ComboboxTypes<T> = {
|
|
559
561
|
/** If true, it will show a red asterisk next to the label*/
|
560
562
|
isRequired?: boolean;
|
561
563
|
onChange?: (e: any) => void;
|
564
|
+
renderOption?: (item: T) => React$1.ReactNode;
|
562
565
|
};
|
563
566
|
declare const Combobox: React$1.ForwardRefExoticComponent<ComboboxTypes<any> & React$1.RefAttributes<HTMLDivElement>>;
|
564
567
|
|
@@ -723,7 +726,9 @@ declare const CommandShortcut: {
|
|
723
726
|
displayName: string;
|
724
727
|
};
|
725
728
|
|
726
|
-
declare const PopoverContent: React$1.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> &
|
729
|
+
declare const PopoverContent: React$1.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
730
|
+
container?: HTMLElement | null | undefined;
|
731
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
727
732
|
interface PopoverProps {
|
728
733
|
side?: PositionType;
|
729
734
|
align?: "start" | "center" | "end";
|
@@ -918,8 +923,7 @@ declare const PasswordInput: React__default.FC<PasswordInputType$1>;
|
|
918
923
|
|
919
924
|
declare const Slider: React$1.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
920
925
|
|
921
|
-
type DataProps = {}
|
922
|
-
type SimpleTableProps = {
|
926
|
+
type SimpleTableProps<DataProps = {}> = {
|
923
927
|
direction?: DirectionType;
|
924
928
|
columns: ColumnDef<DataProps>[];
|
925
929
|
data: DataProps[];
|
@@ -939,9 +943,11 @@ type SimpleTableProps = {
|
|
939
943
|
declare module "@tanstack/table-core" {
|
940
944
|
interface ColumnMeta<TData extends RowData, TValue> {
|
941
945
|
padding?: "condensed" | "default" | "noPadding";
|
946
|
+
sortable?: boolean;
|
947
|
+
hidden?: boolean;
|
942
948
|
}
|
943
949
|
}
|
944
|
-
declare const SimpleTable: React$1.
|
950
|
+
declare const SimpleTable: <DataProps extends {}>({ columns, data, classNames, ...props }: SimpleTableProps<DataProps>) => React$1.JSX.Element;
|
945
951
|
|
946
952
|
type SeparatorProps = {
|
947
953
|
className?: string;
|
@@ -1558,6 +1564,8 @@ type RegisterFormTypes = {
|
|
1558
1564
|
onRouteToTOS?: () => void;
|
1559
1565
|
/** Determines whether to show an error alert. */
|
1560
1566
|
showError?: boolean;
|
1567
|
+
/** Callback function triggered when the error alert is dismissed. */
|
1568
|
+
onErrorDismissed?: () => void;
|
1561
1569
|
/** Title for the error alert. */
|
1562
1570
|
errorTitle?: any;
|
1563
1571
|
/** Text for the error alert. */
|
package/dist/index.js
CHANGED
@@ -1900,7 +1900,7 @@ var DialogOverlay = React14.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
1900
1900
|
...props
|
1901
1901
|
}
|
1902
1902
|
));
|
1903
|
-
var DialogContent = React14.forwardRef(({ className, children, persist, hideCloseButton, ...props }, ref) => /* @__PURE__ */ React14.createElement(DialogPortal,
|
1903
|
+
var DialogContent = React14.forwardRef(({ className, children, persist, hideCloseButton, ...props }, ref) => /* @__PURE__ */ React14.createElement(DialogPortal, { container: props.container }, /* @__PURE__ */ React14.createElement(DialogOverlay, null), /* @__PURE__ */ React14.createElement(
|
1904
1904
|
DialogPrimitive.Content,
|
1905
1905
|
{
|
1906
1906
|
onPointerDownOutside: (e) => {
|
@@ -2364,12 +2364,16 @@ var Alert = ({
|
|
2364
2364
|
if (props.onAlertClosed) {
|
2365
2365
|
props.onAlertClosed();
|
2366
2366
|
}
|
2367
|
-
|
2368
|
-
|
2369
|
-
|
2370
|
-
|
2371
|
-
|
2372
|
-
|
2367
|
+
if (!props.noDestroy) {
|
2368
|
+
setClosed(true);
|
2369
|
+
setTimeout(() => {
|
2370
|
+
if (alertRef == null ? void 0 : alertRef.current) {
|
2371
|
+
alertRef == null ? void 0 : alertRef.current.removeChild(
|
2372
|
+
alertRef == null ? void 0 : alertRef.current.children[0]
|
2373
|
+
);
|
2374
|
+
}
|
2375
|
+
}, 200);
|
2376
|
+
}
|
2373
2377
|
}
|
2374
2378
|
},
|
2375
2379
|
/* @__PURE__ */ import_react6.default.createElement("span", { className: "hawa-sr-only" }, "Close"),
|
@@ -3423,72 +3427,10 @@ var Radio = ({
|
|
3423
3427
|
var React27 = __toESM(require("react"));
|
3424
3428
|
var PopoverPrimitive2 = __toESM(require("@radix-ui/react-popover"));
|
3425
3429
|
|
3426
|
-
// elements/popover/Popover.tsx
|
3427
|
-
var React25 = __toESM(require("react"));
|
3428
|
-
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
3429
|
-
var PopoverContent = React25.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React25.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React25.createElement(
|
3430
|
-
PopoverPrimitive.Content,
|
3431
|
-
{
|
3432
|
-
ref,
|
3433
|
-
align,
|
3434
|
-
sideOffset,
|
3435
|
-
className: cn(
|
3436
|
-
"dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
|
3437
|
-
className
|
3438
|
-
),
|
3439
|
-
...props
|
3440
|
-
}
|
3441
|
-
)));
|
3442
|
-
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
3443
|
-
var Popover = ({
|
3444
|
-
trigger,
|
3445
|
-
children,
|
3446
|
-
className,
|
3447
|
-
align = "center",
|
3448
|
-
side,
|
3449
|
-
sideOffset = 4,
|
3450
|
-
open,
|
3451
|
-
width = "default",
|
3452
|
-
disableTrigger,
|
3453
|
-
contentProps,
|
3454
|
-
triggerProps,
|
3455
|
-
...props
|
3456
|
-
}) => {
|
3457
|
-
let widthStyles = {
|
3458
|
-
trigger: "var(--radix-popover-trigger-width)",
|
3459
|
-
default: "auto"
|
3460
|
-
};
|
3461
|
-
return /* @__PURE__ */ React25.createElement(PopoverPrimitive.Root, { open, ...props }, /* @__PURE__ */ React25.createElement(
|
3462
|
-
PopoverPrimitive.Trigger,
|
3463
|
-
{
|
3464
|
-
className: "hawa-w-full",
|
3465
|
-
disabled: disableTrigger,
|
3466
|
-
...triggerProps
|
3467
|
-
},
|
3468
|
-
trigger
|
3469
|
-
), /* @__PURE__ */ React25.createElement(
|
3470
|
-
PopoverContent,
|
3471
|
-
{
|
3472
|
-
side,
|
3473
|
-
className,
|
3474
|
-
align,
|
3475
|
-
sideOffset,
|
3476
|
-
style: {
|
3477
|
-
width: widthStyles[width],
|
3478
|
-
maxWidth: "var(--radix-popover-content-available-width)",
|
3479
|
-
maxHeight: "var(--radix-popover-content-available-height)"
|
3480
|
-
},
|
3481
|
-
...contentProps
|
3482
|
-
},
|
3483
|
-
children
|
3484
|
-
));
|
3485
|
-
};
|
3486
|
-
var PopoverTrigger = PopoverPrimitive.Trigger;
|
3487
|
-
|
3488
3430
|
// elements/command/Command.tsx
|
3489
|
-
var
|
3431
|
+
var React25 = __toESM(require("react"));
|
3490
3432
|
var import_cmdk = require("cmdk");
|
3491
|
-
var Command =
|
3433
|
+
var Command = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React25.createElement(
|
3492
3434
|
import_cmdk.Command,
|
3493
3435
|
{
|
3494
3436
|
ref,
|
@@ -3501,15 +3443,15 @@ var Command = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
3501
3443
|
));
|
3502
3444
|
Command.displayName = import_cmdk.Command.displayName;
|
3503
3445
|
var CommandDialog = ({ children, ...props }) => {
|
3504
|
-
return /* @__PURE__ */
|
3446
|
+
return /* @__PURE__ */ React25.createElement(Dialog, { ...props }, /* @__PURE__ */ React25.createElement(DialogContent, { className: "hawa-overflow-hidden hawa-p-0 hawa-shadow-lg" }, /* @__PURE__ */ React25.createElement(Command, { className: "[&_[cmdk-group-heading]]:hawa-px-2 [&_[cmdk-group-heading]]:hawa-font-medium [&_[cmdk-group-heading]]:hawa-text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:hawa-pt-0 [&_[cmdk-group]]:hawa-px-2 [&_[cmdk-input-wrapper]_svg]:hawa-h-5 [&_[cmdk-input-wrapper]_svg]:hawa-w-5 [&_[cmdk-input]]:hawa-h-12 [&_[cmdk-item]]:hawa-px-2 [&_[cmdk-item]]:hawa-py-3 [&_[cmdk-item]_svg]:hawa-h-5 [&_[cmdk-item]_svg]:hawa-w-5" }, children)));
|
3505
3447
|
};
|
3506
|
-
var CommandInput =
|
3448
|
+
var CommandInput = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React25.createElement(
|
3507
3449
|
"div",
|
3508
3450
|
{
|
3509
3451
|
className: "hawa-flex hawa-items-center hawa-border-b hawa-px-3",
|
3510
3452
|
"cmdk-input-wrapper": ""
|
3511
3453
|
},
|
3512
|
-
/* @__PURE__ */
|
3454
|
+
/* @__PURE__ */ React25.createElement(
|
3513
3455
|
"svg",
|
3514
3456
|
{
|
3515
3457
|
"aria-label": "Search Icon",
|
@@ -3524,10 +3466,10 @@ var CommandInput = React26.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
3524
3466
|
strokeLinejoin: "round",
|
3525
3467
|
className: "hawa-icon hawa-me-2 hawa-shrink-0 hawa-opacity-50"
|
3526
3468
|
},
|
3527
|
-
/* @__PURE__ */
|
3528
|
-
/* @__PURE__ */
|
3469
|
+
/* @__PURE__ */ React25.createElement("circle", { cx: "11", cy: "11", r: "8" }),
|
3470
|
+
/* @__PURE__ */ React25.createElement("path", { d: "m21 21-4.3-4.3" })
|
3529
3471
|
),
|
3530
|
-
/* @__PURE__ */
|
3472
|
+
/* @__PURE__ */ React25.createElement(
|
3531
3473
|
import_cmdk.Command.Input,
|
3532
3474
|
{
|
3533
3475
|
ref,
|
@@ -3540,7 +3482,7 @@ var CommandInput = React26.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
3540
3482
|
)
|
3541
3483
|
));
|
3542
3484
|
CommandInput.displayName = import_cmdk.Command.Input.displayName;
|
3543
|
-
var CommandList =
|
3485
|
+
var CommandList = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React25.createElement(
|
3544
3486
|
import_cmdk.Command.List,
|
3545
3487
|
{
|
3546
3488
|
ref,
|
@@ -3552,7 +3494,7 @@ var CommandList = React26.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
3552
3494
|
}
|
3553
3495
|
));
|
3554
3496
|
CommandList.displayName = import_cmdk.Command.List.displayName;
|
3555
|
-
var CommandEmpty =
|
3497
|
+
var CommandEmpty = React25.forwardRef((props, ref) => /* @__PURE__ */ React25.createElement(
|
3556
3498
|
import_cmdk.Command.Empty,
|
3557
3499
|
{
|
3558
3500
|
ref,
|
@@ -3561,7 +3503,7 @@ var CommandEmpty = React26.forwardRef((props, ref) => /* @__PURE__ */ React26.cr
|
|
3561
3503
|
}
|
3562
3504
|
));
|
3563
3505
|
CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
|
3564
|
-
var CommandGroup =
|
3506
|
+
var CommandGroup = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React25.createElement(
|
3565
3507
|
import_cmdk.Command.Group,
|
3566
3508
|
{
|
3567
3509
|
ref,
|
@@ -3573,7 +3515,7 @@ var CommandGroup = React26.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
3573
3515
|
}
|
3574
3516
|
));
|
3575
3517
|
CommandGroup.displayName = import_cmdk.Command.Group.displayName;
|
3576
|
-
var CommandSeparator =
|
3518
|
+
var CommandSeparator = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React25.createElement(
|
3577
3519
|
import_cmdk.Command.Separator,
|
3578
3520
|
{
|
3579
3521
|
ref,
|
@@ -3582,7 +3524,7 @@ var CommandSeparator = React26.forwardRef(({ className, ...props }, ref) => /* @
|
|
3582
3524
|
}
|
3583
3525
|
));
|
3584
3526
|
CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
|
3585
|
-
var CommandItem =
|
3527
|
+
var CommandItem = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React25.createElement(
|
3586
3528
|
import_cmdk.Command.Item,
|
3587
3529
|
{
|
3588
3530
|
ref,
|
@@ -3598,7 +3540,7 @@ var CommandShortcut = ({
|
|
3598
3540
|
className,
|
3599
3541
|
...props
|
3600
3542
|
}) => {
|
3601
|
-
return /* @__PURE__ */
|
3543
|
+
return /* @__PURE__ */ React25.createElement(
|
3602
3544
|
"span",
|
3603
3545
|
{
|
3604
3546
|
className: cn(
|
@@ -3611,6 +3553,70 @@ var CommandShortcut = ({
|
|
3611
3553
|
};
|
3612
3554
|
CommandShortcut.displayName = "CommandShortcut";
|
3613
3555
|
|
3556
|
+
// elements/popover/Popover.tsx
|
3557
|
+
var React26 = __toESM(require("react"));
|
3558
|
+
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
3559
|
+
var PopoverContent = React26.forwardRef(
|
3560
|
+
({ className, align = "center", sideOffset = 4, container, ...props }, ref) => /* @__PURE__ */ React26.createElement(PopoverPrimitive.Portal, { container }, /* @__PURE__ */ React26.createElement(
|
3561
|
+
PopoverPrimitive.Content,
|
3562
|
+
{
|
3563
|
+
ref,
|
3564
|
+
align,
|
3565
|
+
sideOffset,
|
3566
|
+
className: cn(
|
3567
|
+
"dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
|
3568
|
+
className
|
3569
|
+
),
|
3570
|
+
...props
|
3571
|
+
}
|
3572
|
+
))
|
3573
|
+
);
|
3574
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
3575
|
+
var Popover = ({
|
3576
|
+
trigger,
|
3577
|
+
children,
|
3578
|
+
className,
|
3579
|
+
align = "center",
|
3580
|
+
side,
|
3581
|
+
sideOffset = 4,
|
3582
|
+
open,
|
3583
|
+
width = "default",
|
3584
|
+
disableTrigger,
|
3585
|
+
contentProps,
|
3586
|
+
triggerProps,
|
3587
|
+
...props
|
3588
|
+
}) => {
|
3589
|
+
let widthStyles = {
|
3590
|
+
trigger: "var(--radix-popover-trigger-width)",
|
3591
|
+
default: "auto"
|
3592
|
+
};
|
3593
|
+
return /* @__PURE__ */ React26.createElement(PopoverPrimitive.Root, { open, ...props }, /* @__PURE__ */ React26.createElement(
|
3594
|
+
PopoverPrimitive.Trigger,
|
3595
|
+
{
|
3596
|
+
className: "hawa-w-full",
|
3597
|
+
disabled: disableTrigger,
|
3598
|
+
...triggerProps
|
3599
|
+
},
|
3600
|
+
trigger
|
3601
|
+
), /* @__PURE__ */ React26.createElement(
|
3602
|
+
PopoverContent,
|
3603
|
+
{
|
3604
|
+
side,
|
3605
|
+
className,
|
3606
|
+
align,
|
3607
|
+
sideOffset,
|
3608
|
+
style: {
|
3609
|
+
width: widthStyles[width],
|
3610
|
+
maxWidth: "var(--radix-popover-content-available-width)",
|
3611
|
+
maxHeight: "var(--radix-popover-content-available-height)"
|
3612
|
+
},
|
3613
|
+
...contentProps
|
3614
|
+
},
|
3615
|
+
children
|
3616
|
+
));
|
3617
|
+
};
|
3618
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
3619
|
+
|
3614
3620
|
// elements/combobox/Combobox.tsx
|
3615
3621
|
var Combobox = React27.forwardRef(
|
3616
3622
|
({
|
@@ -3621,11 +3627,13 @@ var Combobox = React27.forwardRef(
|
|
3621
3627
|
direction,
|
3622
3628
|
labelProps,
|
3623
3629
|
data,
|
3630
|
+
renderOption,
|
3624
3631
|
...props
|
3625
3632
|
}, ref) => {
|
3626
3633
|
var _a, _b, _c;
|
3627
3634
|
const [open, setOpen] = React27.useState(false);
|
3628
3635
|
const [value, setValue] = React27.useState(defaultValue);
|
3636
|
+
const containerRef = React27.useRef(null);
|
3629
3637
|
function getProperty(obj, key) {
|
3630
3638
|
return obj[key];
|
3631
3639
|
}
|
@@ -3640,7 +3648,8 @@ var Combobox = React27.forwardRef(
|
|
3640
3648
|
className: cn(
|
3641
3649
|
"hawa-relative hawa-flex hawa-h-fit hawa-flex-col hawa-gap-2",
|
3642
3650
|
props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
|
3643
|
-
)
|
3651
|
+
),
|
3652
|
+
ref: containerRef
|
3644
3653
|
},
|
3645
3654
|
props.label && /* @__PURE__ */ React27.createElement(Label2, { ...labelProps }, props.label),
|
3646
3655
|
/* @__PURE__ */ React27.createElement(PopoverPrimitive2.Root, { open, onOpenChange: handleOpenChange }, /* @__PURE__ */ React27.createElement(PopoverTrigger, { asChild: true }, props.isLoading ? /* @__PURE__ */ React27.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React27.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React27.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-start hawa-gap-2 " }, /* @__PURE__ */ React27.createElement(
|
@@ -3698,7 +3707,8 @@ var Combobox = React27.forwardRef(
|
|
3698
3707
|
{
|
3699
3708
|
sideOffset: 0,
|
3700
3709
|
className: cn("popover-w-parent", props.helperText && "-hawa-mt-4"),
|
3701
|
-
dir: direction
|
3710
|
+
dir: direction,
|
3711
|
+
container: containerRef.current
|
3702
3712
|
},
|
3703
3713
|
/* @__PURE__ */ React27.createElement(Command, null, !props.hideInput && /* @__PURE__ */ React27.createElement(
|
3704
3714
|
CommandInput,
|
@@ -3706,7 +3716,7 @@ var Combobox = React27.forwardRef(
|
|
3706
3716
|
dir: direction,
|
3707
3717
|
placeholder: ((_b = props.texts) == null ? void 0 : _b.searchPlaceholder) || "Search"
|
3708
3718
|
}
|
3709
|
-
), /* @__PURE__ */ React27.createElement(CommandEmpty, null, ((_c = props.texts) == null ? void 0 : _c.noItems) || "No items found."), /* @__PURE__ */ React27.createElement(CommandGroup, { className: "hawa-max-h-[200px] hawa-overflow-y-
|
3719
|
+
), /* @__PURE__ */ React27.createElement(CommandEmpty, null, ((_c = props.texts) == null ? void 0 : _c.noItems) || "No items found."), /* @__PURE__ */ React27.createElement(CommandGroup, { className: "hawa-max-h-[200px] hawa-overflow-y-scroll" }, data.map((item, i) => /* @__PURE__ */ React27.createElement(
|
3710
3720
|
CommandItem,
|
3711
3721
|
{
|
3712
3722
|
key: i,
|
@@ -3742,7 +3752,7 @@ var Combobox = React27.forwardRef(
|
|
3742
3752
|
},
|
3743
3753
|
/* @__PURE__ */ React27.createElement("polyline", { points: "20 6 9 17 4 12" })
|
3744
3754
|
),
|
3745
|
-
getProperty(item, labelKey)
|
3755
|
+
renderOption ? renderOption(item) : getProperty(item, labelKey)
|
3746
3756
|
))))
|
3747
3757
|
))
|
3748
3758
|
);
|
@@ -9932,7 +9942,13 @@ var RegisterForm = ({
|
|
9932
9942
|
{
|
9933
9943
|
title: props.errorTitle,
|
9934
9944
|
text: props.errorText,
|
9935
|
-
severity: "error"
|
9945
|
+
severity: "error",
|
9946
|
+
noDestroy: true,
|
9947
|
+
onAlertClosed: () => {
|
9948
|
+
if (props.onErrorDismissed) {
|
9949
|
+
props.onErrorDismissed();
|
9950
|
+
}
|
9951
|
+
}
|
9936
9952
|
}
|
9937
9953
|
), /* @__PURE__ */ import_react48.default.createElement(import_react_hook_form2.FormProvider, { ...methods }, /* @__PURE__ */ import_react48.default.createElement(
|
9938
9954
|
"form",
|