@wandelbots/wandelbots-js-react-components 2.49.0 → 2.50.0

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
@@ -744,12 +744,19 @@ const z0 = ({
744
744
  }
745
745
  ) }), qk = Ge(
746
746
  Ce((e) => {
747
- const { appIcon: t, appName: r, apps: n = [], onAppSelect: a, sx: o } = e, [s, i] = De(null), l = !!s, c = (h) => {
748
- i(h.currentTarget);
749
- }, u = () => {
750
- i(null);
751
- }, d = (h) => {
752
- u(), h.onClick ? h.onClick() : h.href && (window.location.href = h.href), a == null || a(h);
747
+ const {
748
+ appIcon: t,
749
+ appName: r,
750
+ apps: n = [],
751
+ onAppSelect: a,
752
+ disabled: o = !1,
753
+ sx: s
754
+ } = e, [i, l] = De(null), c = !!i, u = (p) => {
755
+ l(p.currentTarget);
756
+ }, d = () => {
757
+ l(null);
758
+ }, h = (p) => {
759
+ d(), p.onClick ? p.onClick() : p.href && (window.location.href = p.href), a == null || a(p);
753
760
  };
754
761
  return /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
755
762
  /* @__PURE__ */ g.jsx(
@@ -758,26 +765,25 @@ const z0 = ({
758
765
  position: "static",
759
766
  sx: {
760
767
  boxShadow: "none",
761
- backgroundImage: "none",
762
- "& .MuiAppBar-root": {
763
- backgroundImage: "none",
764
- backgroundColor: "transparent"
768
+ background: (p) => {
769
+ var f;
770
+ return (f = p.palette.backgroundPaperElevation) == null ? void 0 : f[1];
771
+ },
772
+ "& label, a, span": {
773
+ textWrap: "nowrap"
765
774
  },
766
- ...o
775
+ ...s
767
776
  },
768
777
  children: /* @__PURE__ */ g.jsxs($g, { sx: { minHeight: "62px !important" }, children: [
769
- /* @__PURE__ */ g.jsx(re, { sx: { mr: 2, display: "flex", alignItems: "center" }, children: t }),
778
+ /* @__PURE__ */ g.jsx(re, { sx: { mr: 1, display: "flex", alignItems: "center" }, children: t }),
770
779
  /* @__PURE__ */ g.jsxs(re, { sx: { display: "flex", alignItems: "center", flexGrow: 1 }, children: [
771
780
  /* @__PURE__ */ g.jsx(
772
781
  he,
773
782
  {
774
- variant: "h6",
775
- component: "div",
783
+ component: "h1",
776
784
  sx: {
777
- fontWeight: 700,
778
- fontSize: "20px",
779
- lineHeight: "24px",
780
- letterSpacing: 0
785
+ fontWeight: "bold",
786
+ fontSize: "1rem"
781
787
  },
782
788
  children: r
783
789
  }
@@ -789,22 +795,23 @@ const z0 = ({
789
795
  "aria-label": "switch app",
790
796
  "aria-controls": "app-menu",
791
797
  "aria-haspopup": "true",
792
- onClick: c,
798
+ onClick: u,
799
+ disabled: o,
793
800
  sx: {
794
- ml: 2,
795
- width: 30,
796
- height: 30,
797
- borderRadius: "8px",
798
- padding: "5px",
799
- backgroundColor: (h) => zc(h.palette.common.white, 0.1),
801
+ ml: 1,
802
+ width: 28,
803
+ height: 28,
804
+ borderRadius: "6px",
805
+ padding: 0,
806
+ backgroundColor: (p) => zc(p.palette.common.white, 0.1),
800
807
  opacity: 1,
801
808
  "&:hover": {
802
- backgroundColor: (h) => zc(h.palette.common.white, 0.16)
809
+ backgroundColor: (p) => zc(p.palette.common.white, 0.16)
803
810
  },
804
811
  "& .MuiSvgIcon-root": {
805
- fontSize: "10px",
806
- width: "10px",
807
- height: "8px"
812
+ fontSize: "8px",
813
+ width: "8px",
814
+ height: "6px"
808
815
  }
809
816
  },
810
817
  children: /* @__PURE__ */ g.jsx(G0, {})
@@ -817,12 +824,12 @@ const z0 = ({
817
824
  /* @__PURE__ */ g.jsx(
818
825
  Ug,
819
826
  {
820
- open: l,
821
- onClick: u,
827
+ open: c,
828
+ onClick: d,
822
829
  sx: {
823
830
  backdropFilter: "blur(4px)",
824
831
  backgroundColor: "rgba(0, 0, 0, 0.3)",
825
- zIndex: (h) => h.zIndex.modal - 1
832
+ zIndex: (p) => p.zIndex.modal - 1
826
833
  }
827
834
  }
828
835
  ),
@@ -830,9 +837,9 @@ const z0 = ({
830
837
  Dg,
831
838
  {
832
839
  id: "app-menu",
833
- anchorEl: s,
834
- open: l,
835
- onClose: u,
840
+ anchorEl: i,
841
+ open: c,
842
+ onClose: d,
836
843
  anchorOrigin: {
837
844
  vertical: "bottom",
838
845
  horizontal: "left"
@@ -842,30 +849,16 @@ const z0 = ({
842
849
  horizontal: "left"
843
850
  },
844
851
  sx: {
845
- zIndex: (h) => h.zIndex.modal,
852
+ zIndex: (p) => p.zIndex.modal,
846
853
  "& .MuiPaper-root": {
847
854
  minWidth: 200,
848
855
  mt: 1
849
856
  }
850
857
  },
851
- children: n.map((h) => /* @__PURE__ */ g.jsxs(
852
- gn,
853
- {
854
- onClick: () => d(h),
855
- sx: {
856
- display: "flex",
857
- alignItems: "center",
858
- gap: 2,
859
- py: 1.5,
860
- px: 2
861
- },
862
- children: [
863
- /* @__PURE__ */ g.jsx(re, { sx: { display: "flex", alignItems: "center" }, children: h.icon }),
864
- /* @__PURE__ */ g.jsx(he, { variant: "body1", children: h.name })
865
- ]
866
- },
867
- h.id
868
- ))
858
+ children: n.map((p) => /* @__PURE__ */ g.jsxs(gn, { onClick: () => h(p), children: [
859
+ /* @__PURE__ */ g.jsx(re, { sx: { display: "flex", alignItems: "center" }, children: p.icon }),
860
+ /* @__PURE__ */ g.jsx(he, { variant: "body1", sx: { ml: 2 }, children: p.name })
861
+ ] }, p.id))
869
862
  }
870
863
  )
871
864
  ] });