@sikka/hawa 0.15.16-next → 0.15.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.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +7 -3
- package/dist/index.mjs +7 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -80,6 +80,8 @@ declare const DropdownMenuContent: React$1.ForwardRefExoticComponent<Omit<Dropdo
|
|
|
80
80
|
declare const DropdownMenuItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
81
81
|
inset?: boolean | undefined;
|
|
82
82
|
end?: any;
|
|
83
|
+
shortcut?: React$1.ReactNode;
|
|
84
|
+
badged?: boolean | undefined;
|
|
83
85
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
84
86
|
declare const DropdownMenuCheckboxItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
85
87
|
declare const DropdownMenuLabel: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
@@ -97,8 +99,10 @@ type SubItem$1 = {
|
|
|
97
99
|
disabled?: boolean;
|
|
98
100
|
};
|
|
99
101
|
type MenuItemType = {
|
|
100
|
-
icon?:
|
|
102
|
+
icon?: React$1.ReactNode;
|
|
101
103
|
label?: string;
|
|
104
|
+
shortcut?: React$1.ReactNode;
|
|
105
|
+
badged?: boolean;
|
|
102
106
|
value?: any;
|
|
103
107
|
content?: any;
|
|
104
108
|
end?: any;
|
package/dist/index.d.ts
CHANGED
|
@@ -80,6 +80,8 @@ declare const DropdownMenuContent: React$1.ForwardRefExoticComponent<Omit<Dropdo
|
|
|
80
80
|
declare const DropdownMenuItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
81
81
|
inset?: boolean | undefined;
|
|
82
82
|
end?: any;
|
|
83
|
+
shortcut?: React$1.ReactNode;
|
|
84
|
+
badged?: boolean | undefined;
|
|
83
85
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
84
86
|
declare const DropdownMenuCheckboxItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
85
87
|
declare const DropdownMenuLabel: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
@@ -97,8 +99,10 @@ type SubItem$1 = {
|
|
|
97
99
|
disabled?: boolean;
|
|
98
100
|
};
|
|
99
101
|
type MenuItemType = {
|
|
100
|
-
icon?:
|
|
102
|
+
icon?: React$1.ReactNode;
|
|
101
103
|
label?: string;
|
|
104
|
+
shortcut?: React$1.ReactNode;
|
|
105
|
+
badged?: boolean;
|
|
102
106
|
value?: any;
|
|
103
107
|
content?: any;
|
|
104
108
|
end?: any;
|
package/dist/index.js
CHANGED
|
@@ -1322,7 +1322,9 @@ var DropdownMenuItem = React8.forwardRef(function(_param, ref) {
|
|
|
1322
1322
|
className: cn("hawa-relative hawa-flex hawa-cursor-pointer hawa-select-none hawa-items-center hawa-justify-between hawa-rounded-sm hawa-text-sm hawa-outline-none hawa-transition-colors focus:hawa-text-accent-foreground data-[disabled]:hawa-pointer-events-none data-[disabled]:hawa-opacity-50", inset && "hawa-pl-8", props.end && Array.isArray(props.children) && props.children[1] && "hawa-gap-6", className)
|
|
1323
1323
|
}, props), /* @__PURE__ */ React8.createElement("div", {
|
|
1324
1324
|
className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 "
|
|
1325
|
-
}, props.children), props.end && props.end)
|
|
1325
|
+
}, props.children), props.end && props.end, !props.end && props.shortcut && /* @__PURE__ */ React8.createElement(DropdownMenuShortcut, null, props.shortcut), !props.end && props.badged && /* @__PURE__ */ React8.createElement("div", {
|
|
1326
|
+
className: "hawa-h-3 hawa-w-3 hawa-bg-red-500 hawa-rounded-full"
|
|
1327
|
+
}));
|
|
1326
1328
|
});
|
|
1327
1329
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1328
1330
|
var DropdownMenuCheckboxItem = React8.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
@@ -1405,7 +1407,7 @@ var DropdownMenuShortcut = function(_param) {
|
|
|
1405
1407
|
"className"
|
|
1406
1408
|
]);
|
|
1407
1409
|
return /* @__PURE__ */ React8.createElement("span", _object_spread({
|
|
1408
|
-
className: cn("hawa-
|
|
1410
|
+
className: cn("hawa-text-xs hawa-tracking-widest hawa-opacity-60", className)
|
|
1409
1411
|
}, props));
|
|
1410
1412
|
};
|
|
1411
1413
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
@@ -1498,6 +1500,8 @@ var DropdownMenu = function(param) {
|
|
|
1498
1500
|
}
|
|
1499
1501
|
},
|
|
1500
1502
|
end: item.end,
|
|
1503
|
+
shortcut: item.shortcut,
|
|
1504
|
+
badged: item.badged,
|
|
1501
1505
|
className: cn(sizeStyles[size], !item.icon && !item.label ? "hawa-px-0 hawa-py-0 focus:hawa-bg-transparent " : "focus:hawa-bg-accent ", item.presist && "focus:hawa-bg-transparent")
|
|
1502
1506
|
}, item.icon && item.icon, item.label && item.label);
|
|
1503
1507
|
}
|
|
@@ -4432,7 +4436,7 @@ var import_react16 = __toESM(require("react"));
|
|
|
4432
4436
|
var FileUploader = function(param) {
|
|
4433
4437
|
var handleFile = param.handleFile, className = param.className;
|
|
4434
4438
|
var hiddenFileInput = (0, import_react16.useRef)(null);
|
|
4435
|
-
var handleClick = function(
|
|
4439
|
+
var handleClick = function() {
|
|
4436
4440
|
var _hiddenFileInput_current;
|
|
4437
4441
|
(_hiddenFileInput_current = hiddenFileInput.current) === null || _hiddenFileInput_current === void 0 ? void 0 : _hiddenFileInput_current.click();
|
|
4438
4442
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -504,7 +504,9 @@ var DropdownMenuItem = React8.forwardRef(({ className, inset, ...props }, ref) =
|
|
|
504
504
|
...props
|
|
505
505
|
},
|
|
506
506
|
/* @__PURE__ */ React8.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 " }, props.children),
|
|
507
|
-
props.end && props.end
|
|
507
|
+
props.end && props.end,
|
|
508
|
+
!props.end && props.shortcut && /* @__PURE__ */ React8.createElement(DropdownMenuShortcut, null, props.shortcut),
|
|
509
|
+
!props.end && props.badged && /* @__PURE__ */ React8.createElement("div", { className: "hawa-h-3 hawa-w-3 hawa-bg-red-500 hawa-rounded-full" })
|
|
508
510
|
);
|
|
509
511
|
});
|
|
510
512
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
@@ -595,7 +597,7 @@ var DropdownMenuShortcut = ({
|
|
|
595
597
|
"span",
|
|
596
598
|
{
|
|
597
599
|
className: cn(
|
|
598
|
-
"hawa-
|
|
600
|
+
"hawa-text-xs hawa-tracking-widest hawa-opacity-60",
|
|
599
601
|
className
|
|
600
602
|
),
|
|
601
603
|
...props
|
|
@@ -721,6 +723,8 @@ var DropdownMenu = ({
|
|
|
721
723
|
}
|
|
722
724
|
},
|
|
723
725
|
end: item.end,
|
|
726
|
+
shortcut: item.shortcut,
|
|
727
|
+
badged: item.badged,
|
|
724
728
|
className: cn(
|
|
725
729
|
sizeStyles[size],
|
|
726
730
|
!item.icon && !item.label ? "hawa-px-0 hawa-py-0 focus:hawa-bg-transparent " : "focus:hawa-bg-accent ",
|
|
@@ -3943,7 +3947,7 @@ import React30 from "react";
|
|
|
3943
3947
|
import React29, { useRef as useRef5 } from "react";
|
|
3944
3948
|
var FileUploader = ({ handleFile, className }) => {
|
|
3945
3949
|
const hiddenFileInput = useRef5(null);
|
|
3946
|
-
const handleClick = (
|
|
3950
|
+
const handleClick = () => {
|
|
3947
3951
|
hiddenFileInput.current?.click();
|
|
3948
3952
|
};
|
|
3949
3953
|
const handleChange = (event) => {
|