@pie-element/match 12.1.2-next.1 → 12.1.2-next.3

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.
@@ -1,10 +1,10 @@
1
1
  import { a as e } from "../browser-kkT1XVKw.js";
2
- import { Nt as t, O as n, a as r, d as i, dt as a, f as o, ft as s, ht as c, k as l, n as u, p as d, pt as f, r as p, t as m, u as h, x as g } from "../Typography-CbSskKxx.js";
2
+ import { A as t, Nt as n, O as r, a as i, d as a, dt as o, f as s, ft as c, ht as l, n as u, p as d, pt as f, r as p, t as m, u as h, x as g } from "../Typography-BRnAIZOH.js";
3
3
  import _, { useRef as v } from "react";
4
4
  import { createRoot as y } from "react-dom/client";
5
5
  import { jsx as b, jsxs as x } from "react/jsx-runtime";
6
6
  //#region ../../lib-react/correct-answer-toggle/dist/expander.js
7
- var S = /* @__PURE__ */ e(t(), 1), C = "height ease-in 300ms, opacity ease-in 300ms", w = c("div")(() => ({
7
+ var S = /* @__PURE__ */ e(n(), 1), C = "height ease-in 300ms, opacity ease-in 300ms", w = l("div")(() => ({
8
8
  position: "relative",
9
9
  height: 0,
10
10
  overflow: "hidden",
@@ -137,7 +137,7 @@ D.propTypes = {
137
137
  fgFill: S.default.string.isRequired,
138
138
  borderFill: S.default.string.isRequired
139
139
  };
140
- var ee = c("div")(({ size: e }) => ({
140
+ var ee = l("div")(({ size: e }) => ({
141
141
  width: e || "25px",
142
142
  height: e || "25px"
143
143
  })), O = ({ open: e, size: t }) => /* @__PURE__ */ b(ee, {
@@ -1586,29 +1586,29 @@ function G(e) {
1586
1586
  function Ue(e, t) {
1587
1587
  return !e || G(e) ? e : G(e.default) ? e.default : t && G(e[t]) ? e[t] : t && G(e[t]?.default) ? e[t].default : e;
1588
1588
  }
1589
- var We = Ue(o, "Readable") || Ue(Ke.Readable, "Readable"), Ge = r, K = Ge.default, Ke = K && typeof K == "object" ? K : Ge, { translator: q } = He, qe = {
1589
+ var We = Ue(s, "Readable") || Ue(Ke.Readable, "Readable"), Ge = i, K = Ge.default, Ke = K && typeof K == "object" ? K : Ge, { translator: q } = He, qe = {
1590
1590
  WebkitTouchCallout: "none",
1591
1591
  WebkitUserSelect: "none",
1592
1592
  KhtmlUserSelect: "none",
1593
1593
  MozUserSelect: "none",
1594
1594
  msUserSelect: "none",
1595
1595
  userSelect: "none"
1596
- }, Je = c("div")(() => ({
1596
+ }, Je = l("div")(() => ({
1597
1597
  width: "100%",
1598
1598
  cursor: "pointer"
1599
- })), Ye = c("div")(() => ({
1599
+ })), Ye = l("div")(() => ({
1600
1600
  margin: "0 auto",
1601
1601
  textAlign: "center",
1602
1602
  display: "flex"
1603
- })), Xe = c("div")(() => ({
1603
+ })), Xe = l("div")(() => ({
1604
1604
  width: "fit-content",
1605
1605
  minWidth: "140px",
1606
1606
  alignSelf: "center",
1607
1607
  verticalAlign: "middle",
1608
- color: `var(--correct-answer-toggle-label-color, ${s.text()})`,
1608
+ color: `var(--correct-answer-toggle-label-color, ${c.text()})`,
1609
1609
  fontWeight: "normal",
1610
1610
  ...qe
1611
- })), Ze = c("div")(() => ({
1611
+ })), Ze = l("div")(() => ({
1612
1612
  position: "absolute",
1613
1613
  width: "25px",
1614
1614
  "&.enter": { opacity: "0" },
@@ -1621,7 +1621,7 @@ var We = Ue(o, "Readable") || Ue(Ke.Readable, "Readable"), Ge = r, K = Ge.defaul
1621
1621
  opacity: "0",
1622
1622
  transition: "opacity 0.3s ease-in"
1623
1623
  }
1624
- })), Qe = c("div")(() => ({
1624
+ })), Qe = l("div")(() => ({
1625
1625
  width: "25px",
1626
1626
  marginRight: "5px",
1627
1627
  display: "flex",
@@ -1712,21 +1712,21 @@ var We = Ue(o, "Readable") || Ue(Ke.Readable, "Readable"), Ge = r, K = Ge.defaul
1712
1712
  })
1713
1713
  });
1714
1714
  }
1715
- }, et = c("div")(({ theme: e }) => ({
1715
+ }, et = l("div")(({ theme: e }) => ({
1716
1716
  marginLeft: "auto",
1717
1717
  marginRight: "auto",
1718
1718
  marginTop: e.spacing(1),
1719
1719
  marginBottom: e.spacing(1)
1720
- })), tt = c("td")({ padding: "5px 0" }), nt = c(m)(({ theme: e }) => ({ margin: e.spacing(2) })), rt = c("th")({ padding: 0 }), J = c("div")(({ theme: e, isQuestionText: t }) => ({
1720
+ })), tt = l("td")({ padding: "5px 0" }), nt = l(m)(({ theme: e }) => ({ margin: e.spacing(2) })), rt = l("th")({ padding: 0 }), J = l("div")(({ theme: e, isQuestionText: t }) => ({
1721
1721
  padding: e.spacing(1.5),
1722
1722
  textAlign: t ? "left" : "center"
1723
- })), it = c("tr")({
1723
+ })), it = l("tr")({
1724
1724
  border: 0,
1725
- borderTop: `2.5px solid ${s.primaryLight()}`,
1725
+ borderTop: `2.5px solid ${c.primaryLight()}`,
1726
1726
  width: "100%"
1727
- }), at = c("table")({
1728
- color: s.text(),
1729
- backgroundColor: s.background(),
1727
+ }), at = l("table")({
1728
+ color: c.text(),
1729
+ backgroundColor: c.background(),
1730
1730
  borderCollapse: "collapse",
1731
1731
  borderSpacing: 0,
1732
1732
  marginBottom: 0
@@ -1756,7 +1756,7 @@ var We = Ue(o, "Readable") || Ue(Ke.Readable, "Readable"), Ge = r, K = Ge.defaul
1756
1756
  return r[e][n] === !0 && t === !1 || r[e][n] === !1 && t === !0;
1757
1757
  };
1758
1758
  render() {
1759
- let { showCorrect: e, headers: t, rows: n, choiceMode: r, answers: i, disabled: a, view: o } = this.props, c = r === "radio" ? p : u, l = a && !o;
1759
+ let { showCorrect: e, headers: t, rows: n, choiceMode: r, answers: i, disabled: a, view: o } = this.props, s = r === "radio" ? p : u, l = a && !o;
1760
1760
  return !n || n.length === 0 ? /* @__PURE__ */ b(et, { children: /* @__PURE__ */ b(nt, {
1761
1761
  component: "div",
1762
1762
  children: "There are currently no questions to show."
@@ -1780,16 +1780,16 @@ var We = Ue(o, "Readable") || Ue(Ke.Readable, "Readable"), Ge = r, K = Ge.defaul
1780
1780
  })
1781
1781
  }, `td-title-${n}`), (i[t.id] || []).map((r, i) => /* @__PURE__ */ b(tt, {
1782
1782
  "data-colno": `${i + 1}`,
1783
- children: /* @__PURE__ */ b(J, { children: /* @__PURE__ */ b(c, {
1783
+ children: /* @__PURE__ */ b(J, { children: /* @__PURE__ */ b(s, {
1784
1784
  sx: {
1785
1785
  padding: "6px",
1786
- color: e && r === !0 || l && this.answerIsCorrect(t.id, r, i) ? s.correct() : l && this.answerIsIncorrect(t.id, r, i) ? s.incorrect() : r === !0 && !l ? s.primary() : a ? s.disabled() : s.text(),
1786
+ color: e && r === !0 || l && this.answerIsCorrect(t.id, r, i) ? c.correct() : l && this.answerIsIncorrect(t.id, r, i) ? c.incorrect() : r === !0 && !l ? c.primary() : a ? c.disabled() : c.text(),
1787
1787
  cursor: a ? "not-allowed" : "pointer",
1788
1788
  pointerEvents: a ? "initial" : "auto",
1789
1789
  opacity: a ? .7 : 1,
1790
1790
  "& input": { width: "100% !important" },
1791
- "&:hover": { color: a ? s.disabled() : s.primaryLight() },
1792
- "&.Mui-disabled": { color: `${e && r === !0 || l && this.answerIsCorrect(t.id, r, i) ? s.correct() : l && this.answerIsIncorrect(t.id, r, i) ? s.incorrect() : r === !0 && !l ? s.primary() : s.disabled()}` }
1791
+ "&:hover": { color: a ? c.disabled() : c.primaryLight() },
1792
+ "&.Mui-disabled": { color: `${e && r === !0 || l && this.answerIsCorrect(t.id, r, i) ? c.correct() : l && this.answerIsIncorrect(t.id, r, i) ? c.incorrect() : r === !0 && !l ? c.primary() : c.disabled()}` }
1793
1793
  },
1794
1794
  disabled: a,
1795
1795
  onChange: this.onRowValueChange(t.id, i),
@@ -1808,7 +1808,7 @@ function Y(e) {
1808
1808
  function X(e, t) {
1809
1809
  return !e || Y(e) ? e : Y(e.default) ? e.default : t && Y(e[t]) ? e[t] : t && Y(e[t]?.default) ? e[t].default : e;
1810
1810
  }
1811
- var st = X(g, "UiLayout") || X($.UiLayout, "UiLayout"), Z = X(d, "PreviewPrompt") || X($.PreviewPrompt, "PreviewPrompt"), ct = X(a, "Feedback") || X($.Feedback, "Feedback"), lt = X(n, "Collapsible") || X($.Collapsible, "Collapsible"), ut = r, Q = ut.default, $ = Q && typeof Q == "object" ? Q : ut, dt = c("div")({ verticalAlign: "middle" }), ft = c(lt)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), pt = class extends _.Component {
1811
+ var st = X(g, "UiLayout") || X($.UiLayout, "UiLayout"), Z = X(d, "PreviewPrompt") || X($.PreviewPrompt, "PreviewPrompt"), ct = X(o, "Feedback") || X($.Feedback, "Feedback"), lt = X(r, "Collapsible") || X($.Collapsible, "Collapsible"), ut = i, Q = ut.default, $ = Q && typeof Q == "object" ? Q : ut, dt = l("div")({ verticalAlign: "middle" }), ft = l(lt)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), pt = class extends _.Component {
1812
1812
  static propTypes = {
1813
1813
  session: S.default.object.isRequired,
1814
1814
  onSessionChange: S.default.func,
@@ -1859,11 +1859,11 @@ var st = X(g, "UiLayout") || X($.UiLayout, "UiLayout"), Z = X(d, "PreviewPrompt"
1859
1859
  } }), this.callOnSessionChange);
1860
1860
  };
1861
1861
  render() {
1862
- let { model: e } = this.props, { showCorrect: t, session: n } = this.state, { correctness: r = {}, extraCSSRules: a, language: o } = e, s = r.correctness && r.correctness !== "correct", c = e.rationale && (i(e.rationale) || h(e.rationale));
1862
+ let { model: e } = this.props, { showCorrect: t, session: n } = this.state, { correctness: r = {}, extraCSSRules: i, language: o } = e, s = r.correctness && r.correctness !== "correct", c = e.rationale && (a(e.rationale) || h(e.rationale));
1863
1863
  return /* @__PURE__ */ x(st, {
1864
- extraCSSRules: a,
1864
+ extraCSSRules: i,
1865
1865
  children: [
1866
- e.teacherInstructions && (i(e.teacherInstructions) || h(e.teacherInstructions)) && /* @__PURE__ */ b(ft, {
1866
+ e.teacherInstructions && (a(e.teacherInstructions) || h(e.teacherInstructions)) && /* @__PURE__ */ b(ft, {
1867
1867
  labels: {
1868
1868
  hidden: "Show Teacher Instructions",
1869
1869
  visible: "Hide Teacher Instructions"
@@ -1971,7 +1971,7 @@ var mt = class e extends CustomEvent {
1971
1971
  onSessionChange: this.sessionChanged.bind(this)
1972
1972
  });
1973
1973
  this._root ||= y(this), this._root.render(e), queueMicrotask(() => {
1974
- l(this);
1974
+ t(this);
1975
1975
  });
1976
1976
  }
1977
1977
  disconnectedCallback() {