this.gui 1.3.54 → 1.3.55

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.
@@ -9021,26 +9021,39 @@ const O8 = ({
9021
9021
  icon: e,
9022
9022
  iconColor: n,
9023
9023
  onClick: f,
9024
- active: t = !1,
9025
- className: r,
9026
- style: s,
9027
- view: v
9024
+ element: t,
9025
+ active: r = !1,
9026
+ className: s,
9027
+ style: v,
9028
+ view: z
9028
9029
  }) => {
9029
- const z = /* @__PURE__ */ g(
9030
+ const u = !!t, b = u ? /* @__PURE__ */ a(
9031
+ G,
9032
+ {
9033
+ sx: {
9034
+ display: "flex",
9035
+ justifyContent: z === "rail" ? "center" : "flex-start",
9036
+ alignItems: "center",
9037
+ width: "100%",
9038
+ px: z === "rail" ? 0 : 1.23
9039
+ },
9040
+ children: t
9041
+ }
9042
+ ) : /* @__PURE__ */ g(
9030
9043
  G,
9031
9044
  {
9032
9045
  sx: {
9033
9046
  display: "flex",
9034
9047
  gap: 1.123,
9035
- justifyContent: v === "rail" ? "center" : "flex-start",
9048
+ justifyContent: z === "rail" ? "center" : "flex-start",
9036
9049
  alignItems: "center",
9037
9050
  width: "100%",
9038
- textAlign: v === "rail" ? "center" : "left",
9039
- px: v === "rail" ? 0 : 1.23
9051
+ textAlign: z === "rail" ? "center" : "left",
9052
+ px: z === "rail" ? 0 : 1.23
9040
9053
  },
9041
9054
  children: [
9042
- /* @__PURE__ */ a($, { name: e ?? "", iconColor: n || (t ? "primary.main" : void 0) }),
9043
- v !== "rail" && /* @__PURE__ */ a(
9055
+ /* @__PURE__ */ a($, { name: e ?? "", iconColor: n || (r ? "primary.main" : void 0) }),
9056
+ z !== "rail" && /* @__PURE__ */ a(
9044
9057
  Q,
9045
9058
  {
9046
9059
  variant: "body2",
@@ -9048,53 +9061,53 @@ const O8 = ({
9048
9061
  whiteSpace: "nowrap",
9049
9062
  overflow: "hidden",
9050
9063
  textOverflow: "ellipsis",
9051
- color: t ? "primary.main" : "text.primary"
9064
+ color: r ? "primary.main" : "text.primary"
9052
9065
  },
9053
9066
  children: A
9054
9067
  }
9055
9068
  )
9056
9069
  ]
9057
9070
  }
9058
- );
9071
+ ), P = z === "rail" && A ? /* @__PURE__ */ a(
9072
+ qA,
9073
+ {
9074
+ title: A,
9075
+ placement: "left",
9076
+ arrow: !0,
9077
+ slotProps: { tooltip: { sx: { fontSize: "0.9rem", py: 0.5, px: 1 } } },
9078
+ children: b
9079
+ }
9080
+ ) : b;
9059
9081
  return /* @__PURE__ */ a(
9060
9082
  G,
9061
9083
  {
9062
- component: "button",
9084
+ component: u ? "div" : "button",
9063
9085
  onClick: f,
9064
- className: PA("RightSidebarAction", r),
9065
- style: s,
9086
+ className: PA("RightSidebarAction", s),
9087
+ style: v,
9066
9088
  sx: {
9067
9089
  p: 1.123,
9068
9090
  display: "flex",
9069
9091
  flexDirection: "column",
9070
- alignItems: v === "rail" ? "center" : "flex-start",
9092
+ alignItems: z === "rail" ? "center" : "flex-start",
9071
9093
  borderRight: 2,
9072
- borderRightColor: t ? "primary.main" : "transparent",
9094
+ borderRightColor: r ? "primary.main" : "transparent",
9073
9095
  borderRightStyle: "solid",
9074
- cursor: "pointer",
9075
- backgroundColor: t ? "action.selected" : "transparent",
9096
+ backgroundColor: r ? "action.selected" : "transparent",
9076
9097
  "&:hover": {
9077
9098
  backgroundColor: "action.hover",
9078
9099
  borderRightColor: "primary.main"
9079
9100
  },
9080
- color: t ? "primary.main" : "text.primary",
9101
+ color: r ? "primary.main" : "text.primary",
9102
+ cursor: u && !f ? "default" : "pointer",
9081
9103
  width: "100%",
9082
- textAlign: v === "rail" ? "center" : "left",
9104
+ textAlign: z === "rail" ? "center" : "left",
9083
9105
  outline: "none",
9084
9106
  border: "none"
9085
9107
  },
9086
- "aria-pressed": t,
9087
- type: "button",
9088
- children: v === "rail" ? /* @__PURE__ */ a(
9089
- qA,
9090
- {
9091
- title: A,
9092
- placement: "left",
9093
- arrow: !0,
9094
- slotProps: { tooltip: { sx: { fontSize: "0.9rem", py: 0.5, px: 1 } } },
9095
- children: z
9096
- }
9097
- ) : z
9108
+ "aria-pressed": u ? void 0 : r,
9109
+ type: u ? void 0 : "button",
9110
+ children: P
9098
9111
  }
9099
9112
  );
9100
9113
  }, mn = ({ expanded: A, onToggle: e }) => /* @__PURE__ */ a(
@@ -5,6 +5,7 @@ export type RightSidebarActionProps = {
5
5
  icon?: string;
6
6
  iconColor?: string;
7
7
  onClick?: () => void;
8
+ element?: React.ReactNode;
8
9
  active?: boolean;
9
10
  className?: string;
10
11
  style?: React.CSSProperties;
@@ -1 +1 @@
1
- {"version":3,"file":"RightSidebarAction.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/gui/Layout/Sidebars/RightSidebar/components/RightSidebarAction/RightSidebarAction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,IAAI,EAAE,gBAAgB,CAAC;CACxB,CAAC;AAEF,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAkFzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"RightSidebarAction.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/gui/Layout/Sidebars/RightSidebar/components/RightSidebarAction/RightSidebarAction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,IAAI,EAAE,gBAAgB,CAAC;CACxB,CAAC;AAEF,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAmGzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "this.gui",
3
3
  "private": false,
4
- "version": "1.3.54",
4
+ "version": "1.3.55",
5
5
  "type": "module",
6
6
  "main": "./dist/this.gui.cjs",
7
7
  "module": "./dist/this.gui.es.js",