@apexcura/ui-components 0.0.16-Beta32 → 0.0.16-Beta34

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
@@ -617,7 +617,7 @@ var icons = {
617
617
  fill: "#D9363E"
618
618
  }
619
619
  )),
620
- profile: /* @__PURE__ */ import_react13.default.createElement("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react13.default.createElement("path", { d: "M17 19.5C18.3411 19.5 19.5979 18.3735 19.2664 16.9062C19.1476 16.3806 18.9841 15.8647 18.7769 15.3645C18.2994 14.2119 17.5997 13.1646 16.7175 12.2825C15.8354 11.4003 14.7881 10.7006 13.6355 10.2231C12.4829 9.74572 11.2476 9.5 10 9.5C8.75244 9.5 7.5171 9.74572 6.36451 10.2231C5.21191 10.7006 4.16464 11.4003 3.28249 12.2825C2.40033 13.1646 1.70056 14.2119 1.22314 15.3645C1.01594 15.8647 0.852378 16.3806 0.733607 16.9062C0.402069 18.3735 1.65891 19.5 3 19.5L10 19.5H17Z", fill: "#505050", stroke: "white" }), /* @__PURE__ */ import_react13.default.createElement("circle", { cx: "10", cy: "6", r: "5.5", fill: "#505050", stroke: "white" }))
620
+ profile: /* @__PURE__ */ import_react13.default.createElement("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react13.default.createElement("path", { d: "M17 19.5C18.3411 19.5 19.5979 18.3735 19.2664 16.9062C19.1476 16.3806 18.9841 15.8647 18.7769 15.3645C18.2994 14.2119 17.5997 13.1646 16.7175 12.2825C15.8354 11.4003 14.7881 10.7006 13.6355 10.2231C12.4829 9.74572 11.2476 9.5 10 9.5C8.75244 9.5 7.5171 9.74572 6.36451 10.2231C5.21191 10.7006 4.16464 11.4003 3.28249 12.2825C2.40033 13.1646 1.70056 14.2119 1.22314 15.3645C1.01594 15.8647 0.852378 16.3806 0.733607 16.9062C0.402069 18.3735 1.65891 19.5 3 19.5L10 19.5H17Z", fill: "#505050" }), /* @__PURE__ */ import_react13.default.createElement("circle", { cx: "10", cy: "6", r: "5.5", fill: "#505050" }))
621
621
  };
622
622
 
623
623
  // src/Components/Button.tsx
@@ -777,22 +777,30 @@ var import_antd11 = require("antd");
777
777
  var { Sider } = import_antd11.Layout;
778
778
  var Sidebar = (props) => {
779
779
  const [collapsed, setCollapsed] = (0, import_react16.useState)(false);
780
- function getItem(label, key, icon, children) {
780
+ const handleChange = (item) => {
781
+ if (props.onChange) {
782
+ props.onChange(item);
783
+ }
784
+ };
785
+ function getItem(label, key, icon, children, onClick) {
781
786
  return {
782
787
  key,
783
788
  icon: icon ? /* @__PURE__ */ import_react16.default.createElement("span", { className: props.iconsClassName }, icon) : null,
784
789
  children,
785
- label
790
+ label,
791
+ onClick
786
792
  };
787
793
  }
788
794
  const items = props.items?.map((eachItem, index) => {
795
+ const itemOnClick = () => handleChange(eachItem);
789
796
  return getItem(
790
797
  eachItem.label,
791
798
  index.toString(),
792
799
  icons[eachItem.icon],
793
800
  eachItem.children?.map(
794
- (child, childIndex) => getItem(child.label, `${index}-${childIndex}`, icons[child.icon])
795
- )
801
+ (child, childIndex) => getItem(child.label, `${index}-${childIndex}`, icons[child.icon], void 0, () => handleChange(child))
802
+ ),
803
+ itemOnClick
796
804
  );
797
805
  });
798
806
  return /* @__PURE__ */ import_react16.default.createElement(import_antd11.Layout, { style: { minHeight: "100vh" } }, /* @__PURE__ */ import_react16.default.createElement(
@@ -803,15 +811,7 @@ var Sidebar = (props) => {
803
811
  onCollapse: (value) => setCollapsed(value)
804
812
  },
805
813
  /* @__PURE__ */ import_react16.default.createElement("div", { className: "demo-logo-vertical" }),
806
- /* @__PURE__ */ import_react16.default.createElement(
807
- import_antd11.Menu,
808
- {
809
- theme: "dark",
810
- defaultSelectedKeys: ["1"],
811
- mode: "inline",
812
- items
813
- }
814
- )
814
+ /* @__PURE__ */ import_react16.default.createElement(import_antd11.Menu, { theme: "dark", defaultSelectedKeys: ["1"], mode: "inline", items })
815
815
  ));
816
816
  };
817
817
 
package/dist/index.mjs CHANGED
@@ -546,7 +546,7 @@ var icons = {
546
546
  fill: "#D9363E"
547
547
  }
548
548
  )),
549
- profile: /* @__PURE__ */ React12.createElement("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React12.createElement("path", { d: "M17 19.5C18.3411 19.5 19.5979 18.3735 19.2664 16.9062C19.1476 16.3806 18.9841 15.8647 18.7769 15.3645C18.2994 14.2119 17.5997 13.1646 16.7175 12.2825C15.8354 11.4003 14.7881 10.7006 13.6355 10.2231C12.4829 9.74572 11.2476 9.5 10 9.5C8.75244 9.5 7.5171 9.74572 6.36451 10.2231C5.21191 10.7006 4.16464 11.4003 3.28249 12.2825C2.40033 13.1646 1.70056 14.2119 1.22314 15.3645C1.01594 15.8647 0.852378 16.3806 0.733607 16.9062C0.402069 18.3735 1.65891 19.5 3 19.5L10 19.5H17Z", fill: "#505050", stroke: "white" }), /* @__PURE__ */ React12.createElement("circle", { cx: "10", cy: "6", r: "5.5", fill: "#505050", stroke: "white" }))
549
+ profile: /* @__PURE__ */ React12.createElement("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React12.createElement("path", { d: "M17 19.5C18.3411 19.5 19.5979 18.3735 19.2664 16.9062C19.1476 16.3806 18.9841 15.8647 18.7769 15.3645C18.2994 14.2119 17.5997 13.1646 16.7175 12.2825C15.8354 11.4003 14.7881 10.7006 13.6355 10.2231C12.4829 9.74572 11.2476 9.5 10 9.5C8.75244 9.5 7.5171 9.74572 6.36451 10.2231C5.21191 10.7006 4.16464 11.4003 3.28249 12.2825C2.40033 13.1646 1.70056 14.2119 1.22314 15.3645C1.01594 15.8647 0.852378 16.3806 0.733607 16.9062C0.402069 18.3735 1.65891 19.5 3 19.5L10 19.5H17Z", fill: "#505050" }), /* @__PURE__ */ React12.createElement("circle", { cx: "10", cy: "6", r: "5.5", fill: "#505050" }))
550
550
  };
551
551
 
552
552
  // src/Components/Button.tsx
@@ -706,22 +706,30 @@ import { Layout, Menu } from "antd";
706
706
  var { Sider } = Layout;
707
707
  var Sidebar = (props) => {
708
708
  const [collapsed, setCollapsed] = useState5(false);
709
- function getItem(label, key, icon, children) {
709
+ const handleChange = (item) => {
710
+ if (props.onChange) {
711
+ props.onChange(item);
712
+ }
713
+ };
714
+ function getItem(label, key, icon, children, onClick) {
710
715
  return {
711
716
  key,
712
717
  icon: icon ? /* @__PURE__ */ React15.createElement("span", { className: props.iconsClassName }, icon) : null,
713
718
  children,
714
- label
719
+ label,
720
+ onClick
715
721
  };
716
722
  }
717
723
  const items = props.items?.map((eachItem, index) => {
724
+ const itemOnClick = () => handleChange(eachItem);
718
725
  return getItem(
719
726
  eachItem.label,
720
727
  index.toString(),
721
728
  icons[eachItem.icon],
722
729
  eachItem.children?.map(
723
- (child, childIndex) => getItem(child.label, `${index}-${childIndex}`, icons[child.icon])
724
- )
730
+ (child, childIndex) => getItem(child.label, `${index}-${childIndex}`, icons[child.icon], void 0, () => handleChange(child))
731
+ ),
732
+ itemOnClick
725
733
  );
726
734
  });
727
735
  return /* @__PURE__ */ React15.createElement(Layout, { style: { minHeight: "100vh" } }, /* @__PURE__ */ React15.createElement(
@@ -732,15 +740,7 @@ var Sidebar = (props) => {
732
740
  onCollapse: (value) => setCollapsed(value)
733
741
  },
734
742
  /* @__PURE__ */ React15.createElement("div", { className: "demo-logo-vertical" }),
735
- /* @__PURE__ */ React15.createElement(
736
- Menu,
737
- {
738
- theme: "dark",
739
- defaultSelectedKeys: ["1"],
740
- mode: "inline",
741
- items
742
- }
743
- )
743
+ /* @__PURE__ */ React15.createElement(Menu, { theme: "dark", defaultSelectedKeys: ["1"], mode: "inline", items })
744
744
  ));
745
745
  };
746
746
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.16-Beta32",
3
+ "version": "0.0.16-Beta34",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",