@pie-lib/text-select 4.0.1-next.20261004165705 → 4.0.1-next.20261004173930
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/__tests__/legend.test.d.ts +1 -0
- package/dist/legend.js +20 -20
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/legend.js
CHANGED
|
@@ -6,27 +6,27 @@ import i from "@mui/icons-material/Check";
|
|
|
6
6
|
import a from "@mui/icons-material/Close";
|
|
7
7
|
import o from "@pie-lib/translator";
|
|
8
8
|
//#region src/legend.tsx
|
|
9
|
-
var { translator: s } = o, c = e("div")(({ theme: e }) => ({
|
|
9
|
+
var { translator: s } = o, c = `1px solid ${t.v("pie")("border-light", "lightgrey")}`, l = e("div")(({ theme: e }) => ({
|
|
10
10
|
display: "flex",
|
|
11
11
|
flexDirection: "row",
|
|
12
12
|
alignItems: "center",
|
|
13
13
|
gap: e.spacing(2),
|
|
14
|
-
borderBottom:
|
|
15
|
-
borderTop:
|
|
14
|
+
borderBottom: c,
|
|
15
|
+
borderTop: c,
|
|
16
16
|
paddingBottom: e.spacing(1),
|
|
17
17
|
paddingTop: e.spacing(1),
|
|
18
18
|
marginBottom: e.spacing(1)
|
|
19
|
-
})),
|
|
19
|
+
})), u = e("span")(({ theme: e }) => ({
|
|
20
20
|
fontSize: "14px",
|
|
21
21
|
fontWeight: "bold",
|
|
22
|
-
color: t.
|
|
22
|
+
color: t.text(),
|
|
23
23
|
marginLeft: e.spacing(1)
|
|
24
|
-
})),
|
|
24
|
+
})), d = e("div")(() => ({
|
|
25
25
|
position: "relative",
|
|
26
26
|
padding: "4px",
|
|
27
27
|
fontSize: "14px",
|
|
28
28
|
borderRadius: "4px"
|
|
29
|
-
})),
|
|
29
|
+
})), f = e(d)(() => ({ border: `${t.correctTertiary()} solid 2px` })), p = e(d)(() => ({ border: `${t.incorrectWithIcon()} solid 2px` })), m = e(d)(() => ({ border: `${t.incorrectWithIcon()} dashed 2px` })), h = {
|
|
30
30
|
color: t.white(),
|
|
31
31
|
position: "absolute",
|
|
32
32
|
top: "-8px",
|
|
@@ -34,31 +34,31 @@ var { translator: s } = o, c = e("div")(({ theme: e }) => ({
|
|
|
34
34
|
borderRadius: "50%",
|
|
35
35
|
fontSize: "12px",
|
|
36
36
|
padding: "2px"
|
|
37
|
-
},
|
|
38
|
-
...
|
|
37
|
+
}, g = e(i)(() => ({
|
|
38
|
+
...h,
|
|
39
39
|
backgroundColor: t.correctTertiary()
|
|
40
|
-
})),
|
|
41
|
-
...
|
|
40
|
+
})), _ = e(a)(() => ({
|
|
41
|
+
...h,
|
|
42
42
|
backgroundColor: t.incorrectWithIcon()
|
|
43
|
-
})),
|
|
43
|
+
})), v = ({ language: e, showOnlyCorrect: t }) => {
|
|
44
44
|
let i = [
|
|
45
45
|
{
|
|
46
|
-
Icon:
|
|
46
|
+
Icon: g,
|
|
47
47
|
label: s.t("selectText.correctAnswerSelected", { lng: e }),
|
|
48
|
-
Container:
|
|
48
|
+
Container: f
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
|
-
Icon:
|
|
51
|
+
Icon: _,
|
|
52
52
|
label: s.t("selectText.incorrectSelection", { lng: e }),
|
|
53
|
-
Container:
|
|
53
|
+
Container: p
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
|
-
Icon:
|
|
56
|
+
Icon: _,
|
|
57
57
|
label: s.t("selectText.correctAnswerNotSelected", { lng: e }),
|
|
58
|
-
Container:
|
|
58
|
+
Container: m
|
|
59
59
|
}
|
|
60
60
|
];
|
|
61
|
-
return t && i.splice(1, 2), /* @__PURE__ */ r(
|
|
61
|
+
return t && i.splice(1, 2), /* @__PURE__ */ r(l, { children: [/* @__PURE__ */ n(u, { children: s.t("selectText.key", { lng: e }) }), i.map(({ Icon: e, label: t, Container: i }, a) => /* @__PURE__ */ r(i, { children: [/* @__PURE__ */ n(e, {}), /* @__PURE__ */ n("span", { children: t })] }, a))] });
|
|
62
62
|
};
|
|
63
63
|
//#endregion
|
|
64
|
-
export {
|
|
64
|
+
export { v as Legend };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/text-select",
|
|
3
|
-
"version": "4.0.1-next.
|
|
3
|
+
"version": "4.0.1-next.20261004173930",
|
|
4
4
|
"description": "Some react components for text selection",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"@pie-framework/parse-english": "^1.0.0",
|
|
16
16
|
"@pie-lib/render-ui": "8.0.1-next.20261004165705",
|
|
17
17
|
"@pie-lib/style-utils": "3.0.1-next.20261002233132",
|
|
18
|
-
"@pie-lib/translator": "5.0.1-next.
|
|
18
|
+
"@pie-lib/translator": "5.0.1-next.20261004173930",
|
|
19
19
|
"debug": "^4.1.1",
|
|
20
20
|
"prop-types": "^15.6.2",
|
|
21
21
|
"@pie-element/shared-lodash": "0.1.2-next.20261002215153",
|