next-recomponents 2.0.53 → 2.0.55
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.js +7 -5
- package/dist/index.mjs +7 -5
- package/package.json +1 -1
- package/src/container/index.tsx +4 -4
- package/src/select/index.tsx +3 -2
package/dist/index.js
CHANGED
|
@@ -3745,11 +3745,11 @@ function Container({
|
|
|
3745
3745
|
{
|
|
3746
3746
|
href: (itemMenu == null ? void 0 : itemMenu.location) || "#",
|
|
3747
3747
|
children: [
|
|
3748
|
-
isSidebarOpen && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "text-sm flex items-center hover:bg-gray-200 hover:text-black rounded p-1 h-[30px]", children: [
|
|
3749
|
-
icon,
|
|
3748
|
+
isSidebarOpen && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "text-sm flex items-center hover:bg-gray-200 hover:text-black rounded p-1 h-[30px] gap-1", children: [
|
|
3749
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "text-md", children: icon }),
|
|
3750
3750
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: " truncate", children: itemMenu == null ? void 0 : itemMenu.name })
|
|
3751
3751
|
] }),
|
|
3752
|
-
!isSidebarOpen && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "text-
|
|
3752
|
+
!isSidebarOpen && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "text-md flex hover:bg-gray-200 hover:text-black rounded p-1 h-[30px]", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "text-md", children: icon }) })
|
|
3753
3753
|
]
|
|
3754
3754
|
}
|
|
3755
3755
|
) }, k);
|
|
@@ -36786,9 +36786,11 @@ function Select({
|
|
|
36786
36786
|
const parsedOptions = import_react9.default.Children.toArray(children).filter((child) => {
|
|
36787
36787
|
return child.type === "option";
|
|
36788
36788
|
}).map((child) => {
|
|
36789
|
+
var _a2;
|
|
36790
|
+
const label2 = import_react9.default.Children.toArray(child.props.children).join("");
|
|
36789
36791
|
return {
|
|
36790
|
-
value: child.props.value,
|
|
36791
|
-
label:
|
|
36792
|
+
value: ((_a2 = child.props) == null ? void 0 : _a2.value) || label2,
|
|
36793
|
+
label: label2
|
|
36792
36794
|
};
|
|
36793
36795
|
});
|
|
36794
36796
|
setOptions(parsedOptions);
|
package/dist/index.mjs
CHANGED
|
@@ -3719,11 +3719,11 @@ function Container({
|
|
|
3719
3719
|
{
|
|
3720
3720
|
href: (itemMenu == null ? void 0 : itemMenu.location) || "#",
|
|
3721
3721
|
children: [
|
|
3722
|
-
isSidebarOpen && /* @__PURE__ */ jsxs2("div", { className: "text-sm flex items-center hover:bg-gray-200 hover:text-black rounded p-1 h-[30px]", children: [
|
|
3723
|
-
icon,
|
|
3722
|
+
isSidebarOpen && /* @__PURE__ */ jsxs2("div", { className: "text-sm flex items-center hover:bg-gray-200 hover:text-black rounded p-1 h-[30px] gap-1", children: [
|
|
3723
|
+
/* @__PURE__ */ jsx3("div", { className: "text-md", children: icon }),
|
|
3724
3724
|
/* @__PURE__ */ jsx3("div", { className: " truncate", children: itemMenu == null ? void 0 : itemMenu.name })
|
|
3725
3725
|
] }),
|
|
3726
|
-
!isSidebarOpen && /* @__PURE__ */ jsx3("div", { className: "text-
|
|
3726
|
+
!isSidebarOpen && /* @__PURE__ */ jsx3("div", { className: "text-md flex hover:bg-gray-200 hover:text-black rounded p-1 h-[30px]", children: /* @__PURE__ */ jsx3("div", { className: "text-md", children: icon }) })
|
|
3727
3727
|
]
|
|
3728
3728
|
}
|
|
3729
3729
|
) }, k);
|
|
@@ -36771,9 +36771,11 @@ function Select({
|
|
|
36771
36771
|
const parsedOptions = React5.Children.toArray(children).filter((child) => {
|
|
36772
36772
|
return child.type === "option";
|
|
36773
36773
|
}).map((child) => {
|
|
36774
|
+
var _a2;
|
|
36775
|
+
const label2 = React5.Children.toArray(child.props.children).join("");
|
|
36774
36776
|
return {
|
|
36775
|
-
value: child.props.value,
|
|
36776
|
-
label:
|
|
36777
|
+
value: ((_a2 = child.props) == null ? void 0 : _a2.value) || label2,
|
|
36778
|
+
label: label2
|
|
36777
36779
|
};
|
|
36778
36780
|
});
|
|
36779
36781
|
setOptions(parsedOptions);
|
package/package.json
CHANGED
package/src/container/index.tsx
CHANGED
|
@@ -130,14 +130,14 @@ export default function Container({
|
|
|
130
130
|
// onClick={() => setIsSidebarOpen(false)}
|
|
131
131
|
>
|
|
132
132
|
{isSidebarOpen && (
|
|
133
|
-
<div className="text-sm flex items-center hover:bg-gray-200 hover:text-black rounded p-1 h-[30px]">
|
|
134
|
-
{icon}
|
|
133
|
+
<div className="text-sm flex items-center hover:bg-gray-200 hover:text-black rounded p-1 h-[30px] gap-1">
|
|
134
|
+
<div className="text-md">{icon}</div>
|
|
135
135
|
<div className=" truncate">{itemMenu?.name}</div>
|
|
136
136
|
</div>
|
|
137
137
|
)}
|
|
138
138
|
{!isSidebarOpen && (
|
|
139
|
-
<div className="text-
|
|
140
|
-
{icon}
|
|
139
|
+
<div className="text-md flex hover:bg-gray-200 hover:text-black rounded p-1 h-[30px]">
|
|
140
|
+
<div className="text-md">{icon}</div>
|
|
141
141
|
</div>
|
|
142
142
|
)}
|
|
143
143
|
</Link>
|
package/src/select/index.tsx
CHANGED
|
@@ -85,9 +85,10 @@ export default function Select({
|
|
|
85
85
|
return (child as ReactElement).type === "option";
|
|
86
86
|
})
|
|
87
87
|
.map((child: any) => {
|
|
88
|
+
const label = React.Children.toArray(child.props.children).join("");
|
|
88
89
|
return {
|
|
89
|
-
value: child.props
|
|
90
|
-
label
|
|
90
|
+
value: child.props?.value || label,
|
|
91
|
+
label,
|
|
91
92
|
};
|
|
92
93
|
});
|
|
93
94
|
setOptions(parsedOptions);
|