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

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
@@ -779,19 +779,31 @@ var Sidebar = (props) => {
779
779
  const [collapsed, setCollapsed] = (0, import_react16.useState)(false);
780
780
  function getItem(label, key, icon, children) {
781
781
  return {
782
+ onClick: () => {
783
+ handleChange(items);
784
+ },
782
785
  key,
783
786
  icon: icon ? /* @__PURE__ */ import_react16.default.createElement("span", { className: props.iconsClassName }, icon) : null,
784
787
  children,
785
788
  label
786
789
  };
787
790
  }
791
+ const handleChange = (item) => {
792
+ if (props.onChange) {
793
+ props.onChange(item);
794
+ }
795
+ };
788
796
  const items = props.items?.map((eachItem, index) => {
789
797
  return getItem(
790
798
  eachItem.label,
791
799
  index.toString(),
792
800
  icons[eachItem.icon],
793
801
  eachItem.children?.map(
794
- (child, childIndex) => getItem(child.label, `${index}-${childIndex}`, icons[child.icon])
802
+ (child, childIndex) => getItem(
803
+ child.label,
804
+ `${index}-${childIndex}`,
805
+ icons[child.icon]
806
+ )
795
807
  )
796
808
  );
797
809
  });
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
@@ -708,19 +708,31 @@ var Sidebar = (props) => {
708
708
  const [collapsed, setCollapsed] = useState5(false);
709
709
  function getItem(label, key, icon, children) {
710
710
  return {
711
+ onClick: () => {
712
+ handleChange(items);
713
+ },
711
714
  key,
712
715
  icon: icon ? /* @__PURE__ */ React15.createElement("span", { className: props.iconsClassName }, icon) : null,
713
716
  children,
714
717
  label
715
718
  };
716
719
  }
720
+ const handleChange = (item) => {
721
+ if (props.onChange) {
722
+ props.onChange(item);
723
+ }
724
+ };
717
725
  const items = props.items?.map((eachItem, index) => {
718
726
  return getItem(
719
727
  eachItem.label,
720
728
  index.toString(),
721
729
  icons[eachItem.icon],
722
730
  eachItem.children?.map(
723
- (child, childIndex) => getItem(child.label, `${index}-${childIndex}`, icons[child.icon])
731
+ (child, childIndex) => getItem(
732
+ child.label,
733
+ `${index}-${childIndex}`,
734
+ icons[child.icon]
735
+ )
724
736
  )
725
737
  );
726
738
  });
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-Beta33",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",