@pie-lib/render-ui 8.0.1-next.20261005190856 → 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 +21 -21
- package/package.json +1 -1
package/dist/feedback.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { styled as
|
|
5
|
-
import { CSSTransition as
|
|
6
|
-
import { jsx as
|
|
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
|
|
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
|
-
}),
|
|
14
|
+
}), d = o("div")({
|
|
15
15
|
WebkitFontSmoothing: "antialiased",
|
|
16
|
-
backgroundColor: `var(--feedback-bg-color, ${
|
|
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:
|
|
23
|
-
"&.correct": { backgroundColor: `var(--feedback-correct-bg-color, ${
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
36
|
+
}), p = class extends i.Component {
|
|
37
37
|
static propTypes = {
|
|
38
|
-
correctness:
|
|
39
|
-
feedback:
|
|
38
|
+
correctness: a.string,
|
|
39
|
+
feedback: a.string
|
|
40
40
|
};
|
|
41
|
-
nodeRef =
|
|
41
|
+
nodeRef = i.createRef();
|
|
42
42
|
renderFeedback() {
|
|
43
43
|
let { correctness: e, feedback: t } = this.props;
|
|
44
|
-
return !e || !t ? null : /* @__PURE__ */
|
|
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__ */
|
|
51
|
+
children: /* @__PURE__ */ l(f, {
|
|
52
52
|
ref: this.nodeRef,
|
|
53
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
61
|
+
return /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(c, { children: this.renderFeedback() }) });
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
//#endregion
|
|
65
|
-
export {
|
|
65
|
+
export { p as Feedback, p as default };
|
package/package.json
CHANGED