@apexcura/ui-components 0.0.16-Beta31 → 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
@@ -774,27 +774,36 @@ var AddMoreTable = (props) => {
774
774
  // src/Components/Sidebar.tsx
775
775
  var import_react16 = __toESM(require("react"));
776
776
  var import_antd11 = require("antd");
777
- var { Header, Content, Footer, Sider } = import_antd11.Layout;
778
- function getItem(label, key, icon, children) {
779
- return {
780
- key,
781
- icon,
782
- children,
783
- label
784
- };
785
- }
777
+ var { Sider } = import_antd11.Layout;
786
778
  var Sidebar = (props) => {
787
779
  const [collapsed, setCollapsed] = (0, import_react16.useState)(false);
788
- const {
789
- token: { colorBgContainer, borderRadiusLG }
790
- } = import_antd11.theme.useToken();
780
+ function getItem(label, key, icon, children) {
781
+ return {
782
+ onClick: () => {
783
+ handleChange(items);
784
+ },
785
+ key,
786
+ icon: icon ? /* @__PURE__ */ import_react16.default.createElement("span", { className: props.iconsClassName }, icon) : null,
787
+ children,
788
+ label
789
+ };
790
+ }
791
+ const handleChange = (item) => {
792
+ if (props.onChange) {
793
+ props.onChange(item);
794
+ }
795
+ };
791
796
  const items = props.items?.map((eachItem, index) => {
792
797
  return getItem(
793
798
  eachItem.label,
794
799
  index.toString(),
795
800
  icons[eachItem.icon],
796
801
  eachItem.children?.map(
797
- (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
+ )
798
807
  )
799
808
  );
800
809
  });
@@ -815,18 +824,7 @@ var Sidebar = (props) => {
815
824
  items
816
825
  }
817
826
  )
818
- ), /* @__PURE__ */ import_react16.default.createElement(import_antd11.Layout, null, /* @__PURE__ */ import_react16.default.createElement(Header, { style: { padding: 0, background: colorBgContainer } }), /* @__PURE__ */ import_react16.default.createElement(Content, { style: { margin: "0 16px" } }, /* @__PURE__ */ import_react16.default.createElement(import_antd11.Breadcrumb, { style: { margin: "16px 0" } }, /* @__PURE__ */ import_react16.default.createElement(import_antd11.Breadcrumb.Item, null, "User"), /* @__PURE__ */ import_react16.default.createElement(import_antd11.Breadcrumb.Item, null, "Bill")), /* @__PURE__ */ import_react16.default.createElement(
819
- "div",
820
- {
821
- style: {
822
- padding: 24,
823
- minHeight: 360,
824
- background: colorBgContainer,
825
- borderRadius: borderRadiusLG
826
- }
827
- },
828
- "Bill is a cat."
829
- )), /* @__PURE__ */ import_react16.default.createElement(Footer, { style: { textAlign: "center" } }, "Ant Design \xA9", (/* @__PURE__ */ new Date()).getFullYear(), " Created by Ant UED")));
827
+ ));
830
828
  };
831
829
 
832
830
  // src/Components/Navbar.tsx
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
@@ -702,28 +702,37 @@ var AddMoreTable = (props) => {
702
702
 
703
703
  // src/Components/Sidebar.tsx
704
704
  import React15, { useState as useState5 } from "react";
705
- import { Breadcrumb, Layout, Menu, theme } from "antd";
706
- var { Header, Content, Footer, Sider } = Layout;
707
- function getItem(label, key, icon, children) {
708
- return {
709
- key,
710
- icon,
711
- children,
712
- label
713
- };
714
- }
705
+ import { Layout, Menu } from "antd";
706
+ var { Sider } = Layout;
715
707
  var Sidebar = (props) => {
716
708
  const [collapsed, setCollapsed] = useState5(false);
717
- const {
718
- token: { colorBgContainer, borderRadiusLG }
719
- } = theme.useToken();
709
+ function getItem(label, key, icon, children) {
710
+ return {
711
+ onClick: () => {
712
+ handleChange(items);
713
+ },
714
+ key,
715
+ icon: icon ? /* @__PURE__ */ React15.createElement("span", { className: props.iconsClassName }, icon) : null,
716
+ children,
717
+ label
718
+ };
719
+ }
720
+ const handleChange = (item) => {
721
+ if (props.onChange) {
722
+ props.onChange(item);
723
+ }
724
+ };
720
725
  const items = props.items?.map((eachItem, index) => {
721
726
  return getItem(
722
727
  eachItem.label,
723
728
  index.toString(),
724
729
  icons[eachItem.icon],
725
730
  eachItem.children?.map(
726
- (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
+ )
727
736
  )
728
737
  );
729
738
  });
@@ -744,18 +753,7 @@ var Sidebar = (props) => {
744
753
  items
745
754
  }
746
755
  )
747
- ), /* @__PURE__ */ React15.createElement(Layout, null, /* @__PURE__ */ React15.createElement(Header, { style: { padding: 0, background: colorBgContainer } }), /* @__PURE__ */ React15.createElement(Content, { style: { margin: "0 16px" } }, /* @__PURE__ */ React15.createElement(Breadcrumb, { style: { margin: "16px 0" } }, /* @__PURE__ */ React15.createElement(Breadcrumb.Item, null, "User"), /* @__PURE__ */ React15.createElement(Breadcrumb.Item, null, "Bill")), /* @__PURE__ */ React15.createElement(
748
- "div",
749
- {
750
- style: {
751
- padding: 24,
752
- minHeight: 360,
753
- background: colorBgContainer,
754
- borderRadius: borderRadiusLG
755
- }
756
- },
757
- "Bill is a cat."
758
- )), /* @__PURE__ */ React15.createElement(Footer, { style: { textAlign: "center" } }, "Ant Design \xA9", (/* @__PURE__ */ new Date()).getFullYear(), " Created by Ant UED")));
756
+ ));
759
757
  };
760
758
 
761
759
  // src/Components/Navbar.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.16-Beta31",
3
+ "version": "0.0.16-Beta33",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",