@sikka/hawa 0.29.13-next → 0.30.0-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/{Radio-aAiNsg4d.d.ts → Radio-MHGhfbpA.d.ts} +3 -2
- package/dist/{Radio-H5-wIs2r.d.mts → Radio-ZM5l4CwH.d.mts} +3 -2
- package/dist/appLayout/index.js +2 -10
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +2 -10
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/blocks/feedback/index.js +24 -17
- package/dist/blocks/feedback/index.mjs +16 -14
- package/dist/blocks/index.d.mts +1 -1
- package/dist/blocks/index.d.ts +1 -1
- package/dist/blocks/index.js +24 -17
- package/dist/blocks/index.mjs +1 -1
- package/dist/blocks/pricing/index.js +9 -4
- package/dist/blocks/pricing/index.mjs +1 -1
- package/dist/{chunk-JESKKO3W.mjs → chunk-JMBRP2WR.mjs} +9 -4
- package/dist/{chunk-W2RAWZAF.mjs → chunk-TGB72TYK.mjs} +24 -17
- 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 +11 -6
- package/dist/elements/index.d.ts +11 -6
- package/dist/elements/index.js +96 -85
- package/dist/elements/index.mjs +15 -11
- package/dist/index.css +0 -3
- package/dist/index.d.mts +12 -6
- package/dist/index.d.ts +12 -6
- package/dist/index.js +98 -95
- package/dist/index.mjs +124 -121
- package/dist/interfaceSettings/index.js +9 -4
- package/dist/interfaceSettings/index.js.map +1 -1
- package/dist/interfaceSettings/index.mjs +9 -4
- package/dist/interfaceSettings/index.mjs.map +1 -1
- package/dist/layout/index.js +2 -10
- package/dist/layout/index.mjs +2 -10
- 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/radio/index.d.mts +3 -2
- package/dist/radio/index.d.ts +3 -2
- package/dist/radio/index.js +9 -4
- package/dist/radio/index.js.map +1 -1
- package/dist/radio/index.mjs +9 -4
- package/dist/radio/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/elements/index.js
CHANGED
@@ -1833,7 +1833,7 @@ var DialogOverlay = React14.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
1833
1833
|
...props
|
1834
1834
|
}
|
1835
1835
|
));
|
1836
|
-
var DialogContent = React14.forwardRef(({ className, children, persist, hideCloseButton, ...props }, ref) => /* @__PURE__ */ React14.createElement(DialogPortal,
|
1836
|
+
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(
|
1837
1837
|
DialogPrimitive.Content,
|
1838
1838
|
{
|
1839
1839
|
onPointerDownOutside: (e) => {
|
@@ -3167,7 +3167,8 @@ var Radio = ({
|
|
3167
3167
|
props.defaultValue || props.value
|
3168
3168
|
);
|
3169
3169
|
let activeTabStyle = "hawa-inline-block hawa-w-full hawa-text-primary-foreground hawa-bg-primary hawa-active dark:hawa-bg-primary";
|
3170
|
-
let inactiveTabStyle =
|
3170
|
+
let inactiveTabStyle = `hawa-inline-block hawa-w-full hawa-transition-all hawa-bg-primary-foreground dark:hover:hawa-text-white
|
3171
|
+
${props.disabled ? "" : "hover:hawa-bg-muted"}`;
|
3171
3172
|
let orientationStyle = {
|
3172
3173
|
horizontal: "hawa-flex hawa-flex-row",
|
3173
3174
|
vertical: "hawa-flex hawa-flex-col"
|
@@ -3221,14 +3222,18 @@ var Radio = ({
|
|
3221
3222
|
"li",
|
3222
3223
|
{
|
3223
3224
|
"aria-current": "page",
|
3224
|
-
onClick: () =>
|
3225
|
+
onClick: () => {
|
3226
|
+
if (props.disabled)
|
3227
|
+
return;
|
3228
|
+
handleChange(opt);
|
3229
|
+
},
|
3225
3230
|
className: cn(
|
3226
|
-
"hawa-w-full hawa-
|
3231
|
+
"hawa-w-full hawa-last hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 ",
|
3232
|
+
!props.disabled && "hawa-cursor-pointer",
|
3227
3233
|
orientation === "horizontal" && parentDirection === "ltr" && "hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r",
|
3228
3234
|
orientation === "horizontal" && parentDirection === "rtl" && "hawa-rounded-none first:hawa-rounded-r last:hawa-rounded-l",
|
3229
3235
|
orientation === "vertical" && "hawa-rounded-none first:hawa-rounded-t last:hawa-rounded-b",
|
3230
3236
|
tabSizeStyle[size],
|
3231
|
-
"hawa-last hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 ",
|
3232
3237
|
selectedOption === opt.value ? activeTabStyle : inactiveTabStyle
|
3233
3238
|
),
|
3234
3239
|
key: o
|
@@ -3351,72 +3356,10 @@ var Radio = ({
|
|
3351
3356
|
var React27 = __toESM(require("react"));
|
3352
3357
|
var PopoverPrimitive2 = __toESM(require("@radix-ui/react-popover"));
|
3353
3358
|
|
3354
|
-
// elements/popover/Popover.tsx
|
3355
|
-
var React25 = __toESM(require("react"));
|
3356
|
-
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
3357
|
-
var PopoverContent = React25.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React25.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React25.createElement(
|
3358
|
-
PopoverPrimitive.Content,
|
3359
|
-
{
|
3360
|
-
ref,
|
3361
|
-
align,
|
3362
|
-
sideOffset,
|
3363
|
-
className: cn(
|
3364
|
-
"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",
|
3365
|
-
className
|
3366
|
-
),
|
3367
|
-
...props
|
3368
|
-
}
|
3369
|
-
)));
|
3370
|
-
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
3371
|
-
var Popover = ({
|
3372
|
-
trigger,
|
3373
|
-
children,
|
3374
|
-
className,
|
3375
|
-
align = "center",
|
3376
|
-
side,
|
3377
|
-
sideOffset = 4,
|
3378
|
-
open,
|
3379
|
-
width = "default",
|
3380
|
-
disableTrigger,
|
3381
|
-
contentProps,
|
3382
|
-
triggerProps,
|
3383
|
-
...props
|
3384
|
-
}) => {
|
3385
|
-
let widthStyles = {
|
3386
|
-
trigger: "var(--radix-popover-trigger-width)",
|
3387
|
-
default: "auto"
|
3388
|
-
};
|
3389
|
-
return /* @__PURE__ */ React25.createElement(PopoverPrimitive.Root, { open, ...props }, /* @__PURE__ */ React25.createElement(
|
3390
|
-
PopoverPrimitive.Trigger,
|
3391
|
-
{
|
3392
|
-
className: "hawa-w-full",
|
3393
|
-
disabled: disableTrigger,
|
3394
|
-
...triggerProps
|
3395
|
-
},
|
3396
|
-
trigger
|
3397
|
-
), /* @__PURE__ */ React25.createElement(
|
3398
|
-
PopoverContent,
|
3399
|
-
{
|
3400
|
-
side,
|
3401
|
-
className,
|
3402
|
-
align,
|
3403
|
-
sideOffset,
|
3404
|
-
style: {
|
3405
|
-
width: widthStyles[width],
|
3406
|
-
maxWidth: "var(--radix-popover-content-available-width)",
|
3407
|
-
maxHeight: "var(--radix-popover-content-available-height)"
|
3408
|
-
},
|
3409
|
-
...contentProps
|
3410
|
-
},
|
3411
|
-
children
|
3412
|
-
));
|
3413
|
-
};
|
3414
|
-
var PopoverTrigger = PopoverPrimitive.Trigger;
|
3415
|
-
|
3416
3359
|
// elements/command/Command.tsx
|
3417
|
-
var
|
3360
|
+
var React25 = __toESM(require("react"));
|
3418
3361
|
var import_cmdk = require("cmdk");
|
3419
|
-
var Command =
|
3362
|
+
var Command = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React25.createElement(
|
3420
3363
|
import_cmdk.Command,
|
3421
3364
|
{
|
3422
3365
|
ref,
|
@@ -3429,15 +3372,15 @@ var Command = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
3429
3372
|
));
|
3430
3373
|
Command.displayName = import_cmdk.Command.displayName;
|
3431
3374
|
var CommandDialog = ({ children, ...props }) => {
|
3432
|
-
return /* @__PURE__ */
|
3375
|
+
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)));
|
3433
3376
|
};
|
3434
|
-
var CommandInput =
|
3377
|
+
var CommandInput = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React25.createElement(
|
3435
3378
|
"div",
|
3436
3379
|
{
|
3437
3380
|
className: "hawa-flex hawa-items-center hawa-border-b hawa-px-3",
|
3438
3381
|
"cmdk-input-wrapper": ""
|
3439
3382
|
},
|
3440
|
-
/* @__PURE__ */
|
3383
|
+
/* @__PURE__ */ React25.createElement(
|
3441
3384
|
"svg",
|
3442
3385
|
{
|
3443
3386
|
"aria-label": "Search Icon",
|
@@ -3452,10 +3395,10 @@ var CommandInput = React26.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
3452
3395
|
strokeLinejoin: "round",
|
3453
3396
|
className: "hawa-icon hawa-me-2 hawa-shrink-0 hawa-opacity-50"
|
3454
3397
|
},
|
3455
|
-
/* @__PURE__ */
|
3456
|
-
/* @__PURE__ */
|
3398
|
+
/* @__PURE__ */ React25.createElement("circle", { cx: "11", cy: "11", r: "8" }),
|
3399
|
+
/* @__PURE__ */ React25.createElement("path", { d: "m21 21-4.3-4.3" })
|
3457
3400
|
),
|
3458
|
-
/* @__PURE__ */
|
3401
|
+
/* @__PURE__ */ React25.createElement(
|
3459
3402
|
import_cmdk.Command.Input,
|
3460
3403
|
{
|
3461
3404
|
ref,
|
@@ -3468,7 +3411,7 @@ var CommandInput = React26.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
3468
3411
|
)
|
3469
3412
|
));
|
3470
3413
|
CommandInput.displayName = import_cmdk.Command.Input.displayName;
|
3471
|
-
var CommandList =
|
3414
|
+
var CommandList = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React25.createElement(
|
3472
3415
|
import_cmdk.Command.List,
|
3473
3416
|
{
|
3474
3417
|
ref,
|
@@ -3480,7 +3423,7 @@ var CommandList = React26.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
3480
3423
|
}
|
3481
3424
|
));
|
3482
3425
|
CommandList.displayName = import_cmdk.Command.List.displayName;
|
3483
|
-
var CommandEmpty =
|
3426
|
+
var CommandEmpty = React25.forwardRef((props, ref) => /* @__PURE__ */ React25.createElement(
|
3484
3427
|
import_cmdk.Command.Empty,
|
3485
3428
|
{
|
3486
3429
|
ref,
|
@@ -3489,7 +3432,7 @@ var CommandEmpty = React26.forwardRef((props, ref) => /* @__PURE__ */ React26.cr
|
|
3489
3432
|
}
|
3490
3433
|
));
|
3491
3434
|
CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
|
3492
|
-
var CommandGroup =
|
3435
|
+
var CommandGroup = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React25.createElement(
|
3493
3436
|
import_cmdk.Command.Group,
|
3494
3437
|
{
|
3495
3438
|
ref,
|
@@ -3501,7 +3444,7 @@ var CommandGroup = React26.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
3501
3444
|
}
|
3502
3445
|
));
|
3503
3446
|
CommandGroup.displayName = import_cmdk.Command.Group.displayName;
|
3504
|
-
var CommandSeparator =
|
3447
|
+
var CommandSeparator = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React25.createElement(
|
3505
3448
|
import_cmdk.Command.Separator,
|
3506
3449
|
{
|
3507
3450
|
ref,
|
@@ -3510,7 +3453,7 @@ var CommandSeparator = React26.forwardRef(({ className, ...props }, ref) => /* @
|
|
3510
3453
|
}
|
3511
3454
|
));
|
3512
3455
|
CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
|
3513
|
-
var CommandItem =
|
3456
|
+
var CommandItem = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React25.createElement(
|
3514
3457
|
import_cmdk.Command.Item,
|
3515
3458
|
{
|
3516
3459
|
ref,
|
@@ -3526,7 +3469,7 @@ var CommandShortcut = ({
|
|
3526
3469
|
className,
|
3527
3470
|
...props
|
3528
3471
|
}) => {
|
3529
|
-
return /* @__PURE__ */
|
3472
|
+
return /* @__PURE__ */ React25.createElement(
|
3530
3473
|
"span",
|
3531
3474
|
{
|
3532
3475
|
className: cn(
|
@@ -3539,6 +3482,70 @@ var CommandShortcut = ({
|
|
3539
3482
|
};
|
3540
3483
|
CommandShortcut.displayName = "CommandShortcut";
|
3541
3484
|
|
3485
|
+
// elements/popover/Popover.tsx
|
3486
|
+
var React26 = __toESM(require("react"));
|
3487
|
+
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
3488
|
+
var PopoverContent = React26.forwardRef(
|
3489
|
+
({ className, align = "center", sideOffset = 4, container, ...props }, ref) => /* @__PURE__ */ React26.createElement(PopoverPrimitive.Portal, { container }, /* @__PURE__ */ React26.createElement(
|
3490
|
+
PopoverPrimitive.Content,
|
3491
|
+
{
|
3492
|
+
ref,
|
3493
|
+
align,
|
3494
|
+
sideOffset,
|
3495
|
+
className: cn(
|
3496
|
+
"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",
|
3497
|
+
className
|
3498
|
+
),
|
3499
|
+
...props
|
3500
|
+
}
|
3501
|
+
))
|
3502
|
+
);
|
3503
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
3504
|
+
var Popover = ({
|
3505
|
+
trigger,
|
3506
|
+
children,
|
3507
|
+
className,
|
3508
|
+
align = "center",
|
3509
|
+
side,
|
3510
|
+
sideOffset = 4,
|
3511
|
+
open,
|
3512
|
+
width = "default",
|
3513
|
+
disableTrigger,
|
3514
|
+
contentProps,
|
3515
|
+
triggerProps,
|
3516
|
+
...props
|
3517
|
+
}) => {
|
3518
|
+
let widthStyles = {
|
3519
|
+
trigger: "var(--radix-popover-trigger-width)",
|
3520
|
+
default: "auto"
|
3521
|
+
};
|
3522
|
+
return /* @__PURE__ */ React26.createElement(PopoverPrimitive.Root, { open, ...props }, /* @__PURE__ */ React26.createElement(
|
3523
|
+
PopoverPrimitive.Trigger,
|
3524
|
+
{
|
3525
|
+
className: "hawa-w-full",
|
3526
|
+
disabled: disableTrigger,
|
3527
|
+
...triggerProps
|
3528
|
+
},
|
3529
|
+
trigger
|
3530
|
+
), /* @__PURE__ */ React26.createElement(
|
3531
|
+
PopoverContent,
|
3532
|
+
{
|
3533
|
+
side,
|
3534
|
+
className,
|
3535
|
+
align,
|
3536
|
+
sideOffset,
|
3537
|
+
style: {
|
3538
|
+
width: widthStyles[width],
|
3539
|
+
maxWidth: "var(--radix-popover-content-available-width)",
|
3540
|
+
maxHeight: "var(--radix-popover-content-available-height)"
|
3541
|
+
},
|
3542
|
+
...contentProps
|
3543
|
+
},
|
3544
|
+
children
|
3545
|
+
));
|
3546
|
+
};
|
3547
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
3548
|
+
|
3542
3549
|
// elements/combobox/Combobox.tsx
|
3543
3550
|
var Combobox = React27.forwardRef(
|
3544
3551
|
({
|
@@ -3549,11 +3556,13 @@ var Combobox = React27.forwardRef(
|
|
3549
3556
|
direction,
|
3550
3557
|
labelProps,
|
3551
3558
|
data,
|
3559
|
+
renderOption,
|
3552
3560
|
...props
|
3553
3561
|
}, ref) => {
|
3554
3562
|
var _a, _b, _c;
|
3555
3563
|
const [open, setOpen] = React27.useState(false);
|
3556
3564
|
const [value, setValue] = React27.useState(defaultValue);
|
3565
|
+
const containerRef = React27.useRef(null);
|
3557
3566
|
function getProperty(obj, key) {
|
3558
3567
|
return obj[key];
|
3559
3568
|
}
|
@@ -3568,7 +3577,8 @@ var Combobox = React27.forwardRef(
|
|
3568
3577
|
className: cn(
|
3569
3578
|
"hawa-relative hawa-flex hawa-h-fit hawa-flex-col hawa-gap-2",
|
3570
3579
|
props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
|
3571
|
-
)
|
3580
|
+
),
|
3581
|
+
ref: containerRef
|
3572
3582
|
},
|
3573
3583
|
props.label && /* @__PURE__ */ React27.createElement(Label2, { ...labelProps }, props.label),
|
3574
3584
|
/* @__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(
|
@@ -3626,7 +3636,8 @@ var Combobox = React27.forwardRef(
|
|
3626
3636
|
{
|
3627
3637
|
sideOffset: 0,
|
3628
3638
|
className: cn("popover-w-parent", props.helperText && "-hawa-mt-4"),
|
3629
|
-
dir: direction
|
3639
|
+
dir: direction,
|
3640
|
+
container: containerRef.current
|
3630
3641
|
},
|
3631
3642
|
/* @__PURE__ */ React27.createElement(Command, null, !props.hideInput && /* @__PURE__ */ React27.createElement(
|
3632
3643
|
CommandInput,
|
@@ -3634,7 +3645,7 @@ var Combobox = React27.forwardRef(
|
|
3634
3645
|
dir: direction,
|
3635
3646
|
placeholder: ((_b = props.texts) == null ? void 0 : _b.searchPlaceholder) || "Search"
|
3636
3647
|
}
|
3637
|
-
), /* @__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-
|
3648
|
+
), /* @__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(
|
3638
3649
|
CommandItem,
|
3639
3650
|
{
|
3640
3651
|
key: i,
|
@@ -3670,7 +3681,7 @@ var Combobox = React27.forwardRef(
|
|
3670
3681
|
},
|
3671
3682
|
/* @__PURE__ */ React27.createElement("polyline", { points: "20 6 9 17 4 12" })
|
3672
3683
|
),
|
3673
|
-
getProperty(item, labelKey)
|
3684
|
+
renderOption ? renderOption(item) : getProperty(item, labelKey)
|
3674
3685
|
))))
|
3675
3686
|
))
|
3676
3687
|
);
|
package/dist/elements/index.mjs
CHANGED
@@ -28,7 +28,7 @@ import {
|
|
28
28
|
TabsTrigger,
|
29
29
|
Textarea,
|
30
30
|
UncheckMark
|
31
|
-
} from "../chunk-
|
31
|
+
} from "../chunk-TGB72TYK.mjs";
|
32
32
|
import {
|
33
33
|
Sheet,
|
34
34
|
SheetClose,
|
@@ -385,7 +385,7 @@ var DialogOverlay = React6.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
385
385
|
...props
|
386
386
|
}
|
387
387
|
));
|
388
|
-
var DialogContent = React6.forwardRef(({ className, children, persist, hideCloseButton, ...props }, ref) => /* @__PURE__ */ React6.createElement(DialogPortal,
|
388
|
+
var DialogContent = React6.forwardRef(({ className, children, persist, hideCloseButton, ...props }, ref) => /* @__PURE__ */ React6.createElement(DialogPortal, { container: props.container }, /* @__PURE__ */ React6.createElement(DialogOverlay, null), /* @__PURE__ */ React6.createElement(
|
389
389
|
DialogPrimitive.Content,
|
390
390
|
{
|
391
391
|
onPointerDownOutside: (e) => {
|
@@ -1465,11 +1465,13 @@ var Combobox = React13.forwardRef(
|
|
1465
1465
|
direction,
|
1466
1466
|
labelProps,
|
1467
1467
|
data,
|
1468
|
+
renderOption,
|
1468
1469
|
...props
|
1469
1470
|
}, ref) => {
|
1470
1471
|
var _a, _b, _c;
|
1471
1472
|
const [open, setOpen] = React13.useState(false);
|
1472
1473
|
const [value, setValue] = React13.useState(defaultValue);
|
1474
|
+
const containerRef = React13.useRef(null);
|
1473
1475
|
function getProperty(obj, key) {
|
1474
1476
|
return obj[key];
|
1475
1477
|
}
|
@@ -1484,7 +1486,8 @@ var Combobox = React13.forwardRef(
|
|
1484
1486
|
className: cn(
|
1485
1487
|
"hawa-relative hawa-flex hawa-h-fit hawa-flex-col hawa-gap-2",
|
1486
1488
|
props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
|
1487
|
-
)
|
1489
|
+
),
|
1490
|
+
ref: containerRef
|
1488
1491
|
},
|
1489
1492
|
props.label && /* @__PURE__ */ React13.createElement(Label, { ...labelProps }, props.label),
|
1490
1493
|
/* @__PURE__ */ React13.createElement(PopoverPrimitive.Root, { open, onOpenChange: handleOpenChange }, /* @__PURE__ */ React13.createElement(PopoverTrigger, { asChild: true }, props.isLoading ? /* @__PURE__ */ React13.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React13.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React13.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-start hawa-gap-2 " }, /* @__PURE__ */ React13.createElement(
|
@@ -1542,7 +1545,8 @@ var Combobox = React13.forwardRef(
|
|
1542
1545
|
{
|
1543
1546
|
sideOffset: 0,
|
1544
1547
|
className: cn("popover-w-parent", props.helperText && "-hawa-mt-4"),
|
1545
|
-
dir: direction
|
1548
|
+
dir: direction,
|
1549
|
+
container: containerRef.current
|
1546
1550
|
},
|
1547
1551
|
/* @__PURE__ */ React13.createElement(Command, null, !props.hideInput && /* @__PURE__ */ React13.createElement(
|
1548
1552
|
CommandInput,
|
@@ -1550,7 +1554,7 @@ var Combobox = React13.forwardRef(
|
|
1550
1554
|
dir: direction,
|
1551
1555
|
placeholder: ((_b = props.texts) == null ? void 0 : _b.searchPlaceholder) || "Search"
|
1552
1556
|
}
|
1553
|
-
), /* @__PURE__ */ React13.createElement(CommandEmpty, null, ((_c = props.texts) == null ? void 0 : _c.noItems) || "No items found."), /* @__PURE__ */ React13.createElement(CommandGroup, { className: "hawa-max-h-[200px] hawa-overflow-y-
|
1557
|
+
), /* @__PURE__ */ React13.createElement(CommandEmpty, null, ((_c = props.texts) == null ? void 0 : _c.noItems) || "No items found."), /* @__PURE__ */ React13.createElement(CommandGroup, { className: "hawa-max-h-[200px] hawa-overflow-y-scroll" }, data.map((item, i) => /* @__PURE__ */ React13.createElement(
|
1554
1558
|
CommandItem,
|
1555
1559
|
{
|
1556
1560
|
key: i,
|
@@ -1586,7 +1590,7 @@ var Combobox = React13.forwardRef(
|
|
1586
1590
|
},
|
1587
1591
|
/* @__PURE__ */ React13.createElement("polyline", { points: "20 6 9 17 4 12" })
|
1588
1592
|
),
|
1589
|
-
getProperty(item, labelKey)
|
1593
|
+
renderOption ? renderOption(item) : getProperty(item, labelKey)
|
1590
1594
|
))))
|
1591
1595
|
))
|
1592
1596
|
);
|
@@ -1987,7 +1991,7 @@ var AppStores = (props) => {
|
|
1987
1991
|
};
|
1988
1992
|
|
1989
1993
|
// elements/badge/Badge.tsx
|
1990
|
-
import React19, { useEffect as useEffect5, useState as useState7, useRef as
|
1994
|
+
import React19, { useEffect as useEffect5, useState as useState7, useRef as useRef5 } from "react";
|
1991
1995
|
var Badge = ({
|
1992
1996
|
anchor,
|
1993
1997
|
position = "right",
|
@@ -1996,7 +2000,7 @@ var Badge = ({
|
|
1996
2000
|
className
|
1997
2001
|
}) => {
|
1998
2002
|
const [badgePosition, setBadgePosition] = useState7(null);
|
1999
|
-
const indicatorRef =
|
2003
|
+
const indicatorRef = useRef5(null);
|
2000
2004
|
const sizeStyles2 = {
|
2001
2005
|
small: { top: 4, left: 6, right: 7, classes: "hawa-w-3 hawa-h-3" },
|
2002
2006
|
default: { top: 4, left: 7, right: 5, classes: "hawa-w-3 hawa-h-3" },
|
@@ -2050,7 +2054,7 @@ var BadgedComponent = ({
|
|
2050
2054
|
size,
|
2051
2055
|
text
|
2052
2056
|
}) => {
|
2053
|
-
const ref =
|
2057
|
+
const ref = useRef5(null);
|
2054
2058
|
return /* @__PURE__ */ React19.createElement("div", { className: cn("hawa-relative hawa-w-fit", className), ref }, !hideBadge && /* @__PURE__ */ React19.createElement(
|
2055
2059
|
Badge,
|
2056
2060
|
{
|
@@ -3132,7 +3136,7 @@ function Toaster(props) {
|
|
3132
3136
|
}
|
3133
3137
|
|
3134
3138
|
// elements/destroyableCard/DestroyableCard.tsx
|
3135
|
-
import React32, { useRef as
|
3139
|
+
import React32, { useRef as useRef6, useState as useState13 } from "react";
|
3136
3140
|
var DestroyableCard = ({
|
3137
3141
|
position = "bottom-right",
|
3138
3142
|
fixed,
|
@@ -3140,7 +3144,7 @@ var DestroyableCard = ({
|
|
3140
3144
|
...props
|
3141
3145
|
}) => {
|
3142
3146
|
const [closed, setClosed] = useState13(false);
|
3143
|
-
const popUpRef =
|
3147
|
+
const popUpRef = useRef6(null);
|
3144
3148
|
const boxPosition = {
|
3145
3149
|
"bottom-right": "hawa-right-4 hawa-bottom-4",
|
3146
3150
|
"bottom-left": "hawa-left-4 hawa-bottom-4"
|
package/dist/index.css
CHANGED
@@ -2365,9 +2365,6 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
2365
2365
|
.hawa-bg-primary\/20 {
|
2366
2366
|
background-color: hsl(var(--primary) / 0.2);
|
2367
2367
|
}
|
2368
|
-
.hawa-bg-primary\/5 {
|
2369
|
-
background-color: hsl(var(--primary) / 0.05);
|
2370
|
-
}
|
2371
2368
|
.hawa-bg-primary\/50 {
|
2372
2369
|
background-color: hsl(var(--primary) / 0.5);
|
2373
2370
|
}
|
package/dist/index.d.mts
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;
|
@@ -496,12 +497,13 @@ type RadioOptionsTypes = {
|
|
496
497
|
icon?: any;
|
497
498
|
};
|
498
499
|
type RadioTypes = {
|
500
|
+
/** Required to enable selection and differentiate between different Radio instances. */
|
501
|
+
name: string;
|
502
|
+
disabled?: boolean;
|
499
503
|
orientation?: OrientationType;
|
500
504
|
design?: "default" | "tabs" | "cards" | "bordered";
|
501
505
|
width?: "default" | "full" | "none";
|
502
506
|
size?: "default" | "lg" | "sm" | "xs";
|
503
|
-
/** Required to enable selection and differentiate between different Radio instances. */
|
504
|
-
name: string;
|
505
507
|
options: RadioOptionsTypes[];
|
506
508
|
onChange?: any;
|
507
509
|
defaultValue?: any;
|
@@ -558,6 +560,7 @@ type ComboboxTypes<T> = {
|
|
558
560
|
/** If true, it will show a red asterisk next to the label*/
|
559
561
|
isRequired?: boolean;
|
560
562
|
onChange?: (e: any) => void;
|
563
|
+
renderOption?: (item: T) => React$1.ReactNode;
|
561
564
|
};
|
562
565
|
declare const Combobox: React$1.ForwardRefExoticComponent<ComboboxTypes<any> & React$1.RefAttributes<HTMLDivElement>>;
|
563
566
|
|
@@ -722,7 +725,9 @@ declare const CommandShortcut: {
|
|
722
725
|
displayName: string;
|
723
726
|
};
|
724
727
|
|
725
|
-
declare const PopoverContent: React$1.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> &
|
728
|
+
declare const PopoverContent: React$1.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
729
|
+
container?: HTMLElement | null | undefined;
|
730
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
726
731
|
interface PopoverProps {
|
727
732
|
side?: PositionType;
|
728
733
|
align?: "start" | "center" | "end";
|
@@ -917,8 +922,7 @@ declare const PasswordInput: React__default.FC<PasswordInputType$1>;
|
|
917
922
|
|
918
923
|
declare const Slider: React$1.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
919
924
|
|
920
|
-
type DataProps = {}
|
921
|
-
type SimpleTableProps = {
|
925
|
+
type SimpleTableProps<DataProps = {}> = {
|
922
926
|
direction?: DirectionType;
|
923
927
|
columns: ColumnDef<DataProps>[];
|
924
928
|
data: DataProps[];
|
@@ -938,9 +942,11 @@ type SimpleTableProps = {
|
|
938
942
|
declare module "@tanstack/table-core" {
|
939
943
|
interface ColumnMeta<TData extends RowData, TValue> {
|
940
944
|
padding?: "condensed" | "default" | "noPadding";
|
945
|
+
sortable?: boolean;
|
946
|
+
hidden?: boolean;
|
941
947
|
}
|
942
948
|
}
|
943
|
-
declare const SimpleTable: React$1.
|
949
|
+
declare const SimpleTable: <DataProps extends {}>({ columns, data, classNames, ...props }: SimpleTableProps<DataProps>) => React$1.JSX.Element;
|
944
950
|
|
945
951
|
type SeparatorProps = {
|
946
952
|
className?: string;
|
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;
|
@@ -496,12 +497,13 @@ type RadioOptionsTypes = {
|
|
496
497
|
icon?: any;
|
497
498
|
};
|
498
499
|
type RadioTypes = {
|
500
|
+
/** Required to enable selection and differentiate between different Radio instances. */
|
501
|
+
name: string;
|
502
|
+
disabled?: boolean;
|
499
503
|
orientation?: OrientationType;
|
500
504
|
design?: "default" | "tabs" | "cards" | "bordered";
|
501
505
|
width?: "default" | "full" | "none";
|
502
506
|
size?: "default" | "lg" | "sm" | "xs";
|
503
|
-
/** Required to enable selection and differentiate between different Radio instances. */
|
504
|
-
name: string;
|
505
507
|
options: RadioOptionsTypes[];
|
506
508
|
onChange?: any;
|
507
509
|
defaultValue?: any;
|
@@ -558,6 +560,7 @@ type ComboboxTypes<T> = {
|
|
558
560
|
/** If true, it will show a red asterisk next to the label*/
|
559
561
|
isRequired?: boolean;
|
560
562
|
onChange?: (e: any) => void;
|
563
|
+
renderOption?: (item: T) => React$1.ReactNode;
|
561
564
|
};
|
562
565
|
declare const Combobox: React$1.ForwardRefExoticComponent<ComboboxTypes<any> & React$1.RefAttributes<HTMLDivElement>>;
|
563
566
|
|
@@ -722,7 +725,9 @@ declare const CommandShortcut: {
|
|
722
725
|
displayName: string;
|
723
726
|
};
|
724
727
|
|
725
|
-
declare const PopoverContent: React$1.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> &
|
728
|
+
declare const PopoverContent: React$1.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
729
|
+
container?: HTMLElement | null | undefined;
|
730
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
726
731
|
interface PopoverProps {
|
727
732
|
side?: PositionType;
|
728
733
|
align?: "start" | "center" | "end";
|
@@ -917,8 +922,7 @@ declare const PasswordInput: React__default.FC<PasswordInputType$1>;
|
|
917
922
|
|
918
923
|
declare const Slider: React$1.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
919
924
|
|
920
|
-
type DataProps = {}
|
921
|
-
type SimpleTableProps = {
|
925
|
+
type SimpleTableProps<DataProps = {}> = {
|
922
926
|
direction?: DirectionType;
|
923
927
|
columns: ColumnDef<DataProps>[];
|
924
928
|
data: DataProps[];
|
@@ -938,9 +942,11 @@ type SimpleTableProps = {
|
|
938
942
|
declare module "@tanstack/table-core" {
|
939
943
|
interface ColumnMeta<TData extends RowData, TValue> {
|
940
944
|
padding?: "condensed" | "default" | "noPadding";
|
945
|
+
sortable?: boolean;
|
946
|
+
hidden?: boolean;
|
941
947
|
}
|
942
948
|
}
|
943
|
-
declare const SimpleTable: React$1.
|
949
|
+
declare const SimpleTable: <DataProps extends {}>({ columns, data, classNames, ...props }: SimpleTableProps<DataProps>) => React$1.JSX.Element;
|
944
950
|
|
945
951
|
type SeparatorProps = {
|
946
952
|
className?: string;
|