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

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,8 @@ 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" }), /* @__PURE__ */ import_react13.default.createElement("circle", { cx: "10", cy: "6", r: "5.5", fill: "#505050" }))
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
+ call: /* @__PURE__ */ import_react13.default.createElement("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react13.default.createElement("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M0 2.57143C0 1.15127 1.15127 0 2.57143 0H3.74711C4.48457 0 5.1274 0.501906 5.30627 1.21735L6.25409 5.00865C6.41092 5.63597 6.17652 6.29618 5.65922 6.68416L4.5504 7.51577C4.43526 7.60213 4.41023 7.72858 4.44257 7.81687C5.41587 10.4738 7.52615 12.5841 10.1831 13.5574C10.2714 13.5898 10.3979 13.5647 10.4842 13.4496L11.3158 12.3408C11.7038 11.8235 12.364 11.5891 12.9913 11.7459L16.7826 12.6937C17.4981 12.8726 18 13.5154 18 14.2529V15.4286C18 16.8487 16.8487 18 15.4286 18H13.5C6.04416 18 0 11.9558 0 4.5V2.57143Z", fill: "#505050" }))
621
622
  };
622
623
 
623
624
  // src/Components/Button.tsx
@@ -782,25 +783,32 @@ var Sidebar = (props) => {
782
783
  props.onChange(item);
783
784
  }
784
785
  };
785
- function getItem(label, key, icon, children, onClick) {
786
+ function getItem(label, key, icon, children, item) {
786
787
  return {
787
788
  key,
788
789
  icon: icon ? /* @__PURE__ */ import_react16.default.createElement("span", { className: props.iconsClassName }, icon) : null,
789
790
  children,
790
791
  label,
791
- onClick
792
+ onClick: () => handleChange(item || { label, key })
792
793
  };
793
794
  }
794
795
  const items = props.items?.map((eachItem, index) => {
795
- const itemOnClick = () => handleChange(eachItem);
796
796
  return getItem(
797
797
  eachItem.label,
798
798
  index.toString(),
799
- icons[eachItem.icon],
800
- eachItem.children?.map(
801
- (child, childIndex) => getItem(child.label, `${index}-${childIndex}`, icons[child.icon], void 0, () => handleChange(child))
799
+ icons[eachItem.icon] || eachItem.icon,
800
+ // Handle icon URLs
801
+ eachItem.items?.map(
802
+ (child, childIndex) => getItem(
803
+ child.label,
804
+ `${index}-${childIndex}`,
805
+ icons[child.icon] || child.icon,
806
+ // Handle icon URLs
807
+ void 0,
808
+ child
809
+ )
802
810
  ),
803
- itemOnClick
811
+ eachItem
804
812
  );
805
813
  });
806
814
  return /* @__PURE__ */ import_react16.default.createElement(import_antd11.Layout, { style: { minHeight: "100vh" } }, /* @__PURE__ */ import_react16.default.createElement(
package/dist/index.mjs CHANGED
@@ -546,7 +546,8 @@ 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" }), /* @__PURE__ */ React12.createElement("circle", { cx: "10", cy: "6", r: "5.5", fill: "#505050" }))
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
+ call: /* @__PURE__ */ React12.createElement("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React12.createElement("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M0 2.57143C0 1.15127 1.15127 0 2.57143 0H3.74711C4.48457 0 5.1274 0.501906 5.30627 1.21735L6.25409 5.00865C6.41092 5.63597 6.17652 6.29618 5.65922 6.68416L4.5504 7.51577C4.43526 7.60213 4.41023 7.72858 4.44257 7.81687C5.41587 10.4738 7.52615 12.5841 10.1831 13.5574C10.2714 13.5898 10.3979 13.5647 10.4842 13.4496L11.3158 12.3408C11.7038 11.8235 12.364 11.5891 12.9913 11.7459L16.7826 12.6937C17.4981 12.8726 18 13.5154 18 14.2529V15.4286C18 16.8487 16.8487 18 15.4286 18H13.5C6.04416 18 0 11.9558 0 4.5V2.57143Z", fill: "#505050" }))
550
551
  };
551
552
 
552
553
  // src/Components/Button.tsx
@@ -711,25 +712,32 @@ var Sidebar = (props) => {
711
712
  props.onChange(item);
712
713
  }
713
714
  };
714
- function getItem(label, key, icon, children, onClick) {
715
+ function getItem(label, key, icon, children, item) {
715
716
  return {
716
717
  key,
717
718
  icon: icon ? /* @__PURE__ */ React15.createElement("span", { className: props.iconsClassName }, icon) : null,
718
719
  children,
719
720
  label,
720
- onClick
721
+ onClick: () => handleChange(item || { label, key })
721
722
  };
722
723
  }
723
724
  const items = props.items?.map((eachItem, index) => {
724
- const itemOnClick = () => handleChange(eachItem);
725
725
  return getItem(
726
726
  eachItem.label,
727
727
  index.toString(),
728
- icons[eachItem.icon],
729
- eachItem.children?.map(
730
- (child, childIndex) => getItem(child.label, `${index}-${childIndex}`, icons[child.icon], void 0, () => handleChange(child))
728
+ icons[eachItem.icon] || eachItem.icon,
729
+ // Handle icon URLs
730
+ eachItem.items?.map(
731
+ (child, childIndex) => getItem(
732
+ child.label,
733
+ `${index}-${childIndex}`,
734
+ icons[child.icon] || child.icon,
735
+ // Handle icon URLs
736
+ void 0,
737
+ child
738
+ )
731
739
  ),
732
- itemOnClick
740
+ eachItem
733
741
  );
734
742
  });
735
743
  return /* @__PURE__ */ React15.createElement(Layout, { style: { minHeight: "100vh" } }, /* @__PURE__ */ React15.createElement(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.16-Beta34",
3
+ "version": "0.0.16-Beta36",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",