@pie-lib/render-ui 8.0.1-next.20261005184705 → 8.0.1-next.20261006003311

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/feedback.js CHANGED
@@ -1,28 +1,28 @@
1
- import { correct as e, disabled as t, incorrect as n } from "./color.js";
2
- import r from "react";
3
- import i from "prop-types";
4
- import { styled as a } from "@mui/material/styles";
5
- import { CSSTransition as o, TransitionGroup as s } from "react-transition-group";
6
- import { jsx as c } from "react/jsx-runtime";
1
+ import { backgroundDark as e, correctSecondary as t, incorrectSecondary as n, text as r } from "./color.js";
2
+ import i from "react";
3
+ import a from "prop-types";
4
+ import { styled as o } from "@mui/material/styles";
5
+ import { CSSTransition as s, TransitionGroup as c } from "react-transition-group";
6
+ import { jsx as l } from "react/jsx-runtime";
7
7
  //#region src/feedback.tsx
8
- var l = a("div")({
8
+ var u = o("div")({
9
9
  transformOrigin: "0% 0px 0px",
10
10
  width: "100%",
11
11
  display: "block",
12
12
  overflow: "hidden",
13
13
  "&.incorrect": { color: "#946202" }
14
- }), u = a("div")({
14
+ }), d = o("div")({
15
15
  WebkitFontSmoothing: "antialiased",
16
- backgroundColor: `var(--feedback-bg-color, ${t()})`,
16
+ backgroundColor: `var(--feedback-bg-color, ${e()})`,
17
17
  borderRadius: "4px",
18
18
  lineHeight: "25px",
19
19
  margin: "0px",
20
20
  padding: "10px",
21
21
  verticalAlign: "middle",
22
- color: "var(--feedback-color, white)",
23
- "&.correct": { backgroundColor: `var(--feedback-correct-bg-color, ${e()})` },
22
+ color: `var(--feedback-color, ${r()})`,
23
+ "&.correct": { backgroundColor: `var(--feedback-correct-bg-color, ${t()})` },
24
24
  "&.incorrect": { backgroundColor: `var(--feedback-incorrect-bg-color, ${n()})` }
25
- }), d = a("div")({
25
+ }), f = o("div")({
26
26
  "&.feedback-enter": { height: "1px" },
27
27
  "&.feedback-enter-active": {
28
28
  height: "45px",
@@ -33,24 +33,24 @@ var l = a("div")({
33
33
  height: "1px",
34
34
  transition: "height 200ms"
35
35
  }
36
- }), f = class extends r.Component {
36
+ }), p = class extends i.Component {
37
37
  static propTypes = {
38
- correctness: i.string,
39
- feedback: i.string
38
+ correctness: a.string,
39
+ feedback: a.string
40
40
  };
41
- nodeRef = r.createRef();
41
+ nodeRef = i.createRef();
42
42
  renderFeedback() {
43
43
  let { correctness: e, feedback: t } = this.props;
44
- return !e || !t ? null : /* @__PURE__ */ c(o, {
44
+ return !e || !t ? null : /* @__PURE__ */ l(s, {
45
45
  nodeRef: this.nodeRef,
46
46
  timeout: {
47
47
  enter: 500,
48
48
  exit: 200
49
49
  },
50
50
  classNames: "feedback",
51
- children: /* @__PURE__ */ c(d, {
51
+ children: /* @__PURE__ */ l(f, {
52
52
  ref: this.nodeRef,
53
- children: /* @__PURE__ */ c(l, { children: /* @__PURE__ */ c(u, {
53
+ children: /* @__PURE__ */ l(u, { children: /* @__PURE__ */ l(d, {
54
54
  className: e,
55
55
  dangerouslySetInnerHTML: { __html: t }
56
56
  }) })
@@ -58,8 +58,8 @@ var l = a("div")({
58
58
  }, "hasFeedback");
59
59
  }
60
60
  render() {
61
- return /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(s, { children: this.renderFeedback() }) });
61
+ return /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(c, { children: this.renderFeedback() }) });
62
62
  }
63
63
  };
64
64
  //#endregion
65
- export { f as Feedback, f as default };
65
+ export { p as Feedback, p as default };
@@ -1,20 +1,20 @@
1
1
  /**
2
2
  * InlineMenu - A wrapper around MUI's Menu component for inline contexts
3
3
  *
4
- * This component fixes the issue where MUI's Menu creates a modal overlay
5
- * that covers the entire screen with a white background. It's designed for
6
- * use in inline contexts like dropdowns within text or other UI elements.
4
+ * MUI's Menu renders inside a modal root that covers the viewport, and
5
+ * `styled(Menu)` puts its class on that root, so a background styled onto the
6
+ * menu paints over the whole page. InlineMenu keeps the page visible under an
7
+ * open menu. It's designed for use in inline contexts like dropdowns within
8
+ * text or other UI elements.
7
9
  *
8
10
  * Key differences from standard MUI Menu:
9
- * - No backdrop (hideBackdrop)
10
- * - Transparent modal root (doesn't block UI)
11
+ * - Transparent modal root, whatever background the menu is styled with
11
12
  * - No scroll locking (disableScrollLock)
12
- * - Menu itself remains interactive
13
13
  */
14
14
  import React from 'react';
15
15
  import { MenuProps } from '@mui/material/Menu';
16
16
  /**
17
- * InlineMenu component that wraps MUI Menu without the blocking backdrop
17
+ * InlineMenu component that wraps MUI Menu without painting over the page
18
18
  *
19
19
  * @example
20
20
  * ```tsx
@@ -5,23 +5,18 @@ import t from "@mui/material/Menu";
5
5
  var n = ({ slotProps: n, ...r }) => /* @__PURE__ */ e(t, {
6
6
  ...r,
7
7
  disableScrollLock: !0,
8
- hideBackdrop: !0,
9
8
  slotProps: {
10
9
  ...n,
11
10
  root: {
12
11
  ...n?.root,
13
12
  style: {
14
13
  backgroundColor: "transparent",
15
- pointerEvents: "none",
16
14
  ...n?.root?.style
17
15
  }
18
16
  },
19
- paper: {
20
- ...n?.paper,
21
- style: {
22
- pointerEvents: "auto",
23
- ...n?.paper?.style
24
- }
17
+ backdrop: {
18
+ invisible: !0,
19
+ ...n?.backdrop
25
20
  }
26
21
  }
27
22
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-lib/render-ui",
3
- "version": "8.0.1-next.20261005184705",
3
+ "version": "8.0.1-next.20261006003311",
4
4
  "description": "Some shared ui elements when rendering - but not worthy of their own package yet.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,7 +18,7 @@
18
18
  "prop-types": "^15.7.2",
19
19
  "react-transition-group": "^4.4.5",
20
20
  "@pie-element/shared-math-rendering-mathjax": "0.1.2-next.20261003161149",
21
- "@pie-element/shared-lodash": "0.1.2-next.20261005182602"
21
+ "@pie-element/shared-lodash": "0.1.2-next.20261005190856"
22
22
  },
23
23
  "type": "module",
24
24
  "main": "./dist/index.js",