@apexcura/ui-components 0.0.16-Beta40 → 0.0.16-Beta41

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 CHANGED
@@ -786,26 +786,28 @@ var Sidebar = (props) => {
786
786
  function getItem(label, key, icon, children, item) {
787
787
  return {
788
788
  key,
789
- icon: icon ? /* @__PURE__ */ import_react16.default.createElement("span", { className: props.iconsClassName }, icon) : null,
789
+ icon: icon ? /* @__PURE__ */ import_react16.default.createElement("span", { className: props.iconsClassName, style: { filter: "brightness(0) invert(1)" } }, icon) : null,
790
790
  children,
791
791
  label,
792
- onClick: () => handleChange(item || { label, key })
792
+ onClick: () => handleChange(item)
793
793
  };
794
794
  }
795
- const items = (props.items || []).map((eachItem, index) => {
795
+ const items = props.items?.map((eachItem, index) => {
796
796
  return getItem(
797
797
  eachItem.label,
798
798
  index.toString(),
799
- eachItem.icon ? icons[eachItem.icon] || /* @__PURE__ */ import_react16.default.createElement("img", { src: eachItem.icon }) : "",
800
- eachItem.items ? eachItem.items.map(
799
+ eachItem.icon ? icons[eachItem.icon] || /* @__PURE__ */ import_react16.default.createElement("img", { src: eachItem.icon, alt: "", style: { filter: "brightness(0) invert(1)" } }) : null,
800
+ eachItem.items?.map(
801
801
  (child, childIndex) => getItem(
802
802
  child.label,
803
803
  `${index}-${childIndex}`,
804
- child.icon ? icons[child.icon] || /* @__PURE__ */ import_react16.default.createElement("img", { src: child.icon }) : "",
804
+ child.icon ? icons[child.icon] || /* @__PURE__ */ import_react16.default.createElement("img", { src: child.icon, alt: "", style: { filter: "brightness(0) invert(1)" } }) : null,
805
805
  void 0,
806
806
  child
807
807
  )
808
- ) : void 0
808
+ ),
809
+ eachItem
810
+ // Pass the parent item directly to getItem
809
811
  );
810
812
  });
811
813
  return /* @__PURE__ */ import_react16.default.createElement(import_antd11.Layout, { style: { minHeight: "100vh" } }, /* @__PURE__ */ import_react16.default.createElement(
@@ -820,7 +822,7 @@ var Sidebar = (props) => {
820
822
  import_antd11.Menu,
821
823
  {
822
824
  theme: "dark",
823
- defaultSelectedKeys: ["1"],
825
+ defaultSelectedKeys: ["0"],
824
826
  mode: "inline",
825
827
  items
826
828
  }
package/dist/index.mjs CHANGED
@@ -715,26 +715,28 @@ var Sidebar = (props) => {
715
715
  function getItem(label, key, icon, children, item) {
716
716
  return {
717
717
  key,
718
- icon: icon ? /* @__PURE__ */ React15.createElement("span", { className: props.iconsClassName }, icon) : null,
718
+ icon: icon ? /* @__PURE__ */ React15.createElement("span", { className: props.iconsClassName, style: { filter: "brightness(0) invert(1)" } }, icon) : null,
719
719
  children,
720
720
  label,
721
- onClick: () => handleChange(item || { label, key })
721
+ onClick: () => handleChange(item)
722
722
  };
723
723
  }
724
- const items = (props.items || []).map((eachItem, index) => {
724
+ const items = props.items?.map((eachItem, index) => {
725
725
  return getItem(
726
726
  eachItem.label,
727
727
  index.toString(),
728
- eachItem.icon ? icons[eachItem.icon] || /* @__PURE__ */ React15.createElement("img", { src: eachItem.icon }) : "",
729
- eachItem.items ? eachItem.items.map(
728
+ eachItem.icon ? icons[eachItem.icon] || /* @__PURE__ */ React15.createElement("img", { src: eachItem.icon, alt: "", style: { filter: "brightness(0) invert(1)" } }) : null,
729
+ eachItem.items?.map(
730
730
  (child, childIndex) => getItem(
731
731
  child.label,
732
732
  `${index}-${childIndex}`,
733
- child.icon ? icons[child.icon] || /* @__PURE__ */ React15.createElement("img", { src: child.icon }) : "",
733
+ child.icon ? icons[child.icon] || /* @__PURE__ */ React15.createElement("img", { src: child.icon, alt: "", style: { filter: "brightness(0) invert(1)" } }) : null,
734
734
  void 0,
735
735
  child
736
736
  )
737
- ) : void 0
737
+ ),
738
+ eachItem
739
+ // Pass the parent item directly to getItem
738
740
  );
739
741
  });
740
742
  return /* @__PURE__ */ React15.createElement(Layout, { style: { minHeight: "100vh" } }, /* @__PURE__ */ React15.createElement(
@@ -749,7 +751,7 @@ var Sidebar = (props) => {
749
751
  Menu,
750
752
  {
751
753
  theme: "dark",
752
- defaultSelectedKeys: ["1"],
754
+ defaultSelectedKeys: ["0"],
753
755
  mode: "inline",
754
756
  items
755
757
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.16-Beta40",
3
+ "version": "0.0.16-Beta41",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",