@pie-element/match-list 7.1.2-next.8 → 7.1.2-next.9

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.
@@ -60,16 +60,16 @@ var m = l("div")(({ isDragging: e, isSelected: t, isOver: n, disabled: r, outcom
60
60
  outcome: s,
61
61
  dangerouslySetInnerHTML: { __html: i }
62
62
  });
63
- }, g = l("div")(({ correct: e, theme: t }) => ({
63
+ }, g = l("div")(({ correct: e, isSelected: t, isDragging: n, theme: r }) => ({
64
64
  boxSizing: "border-box",
65
65
  minHeight: 40,
66
66
  minWidth: "200px",
67
67
  overflow: "hidden",
68
- margin: t.spacing(.5),
68
+ margin: r.spacing(.5),
69
69
  padding: "0px",
70
70
  textAlign: "center",
71
71
  height: "initial",
72
- border: e === !0 ? `1px solid var(--feedback-correct-bg-color, ${s.correct()})` : e === !1 ? `1px solid var(--feedback-incorrect-bg-color, ${s.incorrect()})` : "none"
72
+ border: e === !0 ? `1px solid var(--feedback-correct-bg-color, ${s.correct()})` : e === !1 ? `1px solid var(--feedback-incorrect-bg-color, ${s.incorrect()})` : t && !n ? `2px solid ${s.buttonFocusOutline()}` : "none"
73
73
  })), _ = class extends e.Component {
74
74
  static propTypes = {
75
75
  className: r.string,
@@ -94,6 +94,8 @@ var m = l("div")(({ isDragging: e, isSelected: t, isOver: n, disabled: r, outcom
94
94
  let { id: e, title: t, isDragging: n = !1, isSelected: r = !1, className: i, disabled: a, isOver: o = !1, type: s, correct: l } = this.props;
95
95
  return d("[render], props: ", this.props), /* @__PURE__ */ c(g, {
96
96
  correct: l,
97
+ isSelected: r,
98
+ isDragging: n,
97
99
  className: i,
98
100
  ref: (e) => this.ref = e,
99
101
  children: /* @__PURE__ */ c(h, {
@@ -150,7 +152,7 @@ function y(e) {
150
152
  onMouseLeave: () => A(!1),
151
153
  style: {
152
154
  flex: 1,
153
- opacity: T || N ? .5 : 1,
155
+ opacity: T ? .5 : 1,
154
156
  backgroundColor: T || N || M ? "rgba(0,0,0,0.05)" : "transparent",
155
157
  cursor: j && !l ? "pointer" : void 0
156
158
  },
@@ -183,7 +185,7 @@ function y(e) {
183
185
  transform: P,
184
186
  transition: w,
185
187
  cursor: l ? "not-allowed" : "grab",
186
- opacity: T || N ? .5 : 1,
188
+ opacity: T ? .5 : 1,
187
189
  touchAction: s && !l ? "none" : "auto"
188
190
  },
189
191
  children: /* @__PURE__ */ c(_, {
@@ -27,19 +27,19 @@ var t = 25, n = (n, { active: i, context: a, currentCoordinates: o }) => {
27
27
  let p = i?.data?.current, m = p?.promptId == null ? void 0 : `drop-${p.promptId}`, h = [];
28
28
  for (let [e, t] of d) {
29
29
  if (t?.disabled || e === m) continue;
30
- let n = u.get(e);
30
+ let n = t?.node?.current?.getBoundingClientRect() ?? u.get(e);
31
31
  if (!n) continue;
32
32
  let r = {
33
33
  x: n.left + n.width / 2,
34
34
  y: n.top + n.height / 2
35
- }, i = {
35
+ }, i = f?.height ?? 0, a = {
36
36
  x: n.left,
37
- y: n.top + n.height / 2
37
+ y: n.top + n.height / 2 - i / 2
38
38
  };
39
39
  h.push({
40
40
  id: e,
41
41
  rect: n,
42
- dropPosition: i,
42
+ dropPosition: a,
43
43
  center: r
44
44
  });
45
45
  }