@pie-element/extended-text-entry 15.1.2-next.4 → 15.1.2-next.6

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,11 @@
1
1
  import e from "react";
2
2
  import t from "prop-types";
3
3
  import { styled as n } from "@mui/material/styles";
4
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
- import { Popover as a, TextField as o } from "@mui/material";
4
+ import { color as r } from "@pie-lib/render-ui";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
+ import { Popover as o, TextField as s } from "@mui/material";
6
7
  //#region src/delivery/annotation/freeform-editor.tsx
7
- var s = n(a)(({ theme: e, annotationType: t }) => ({ "& .MuiPaper-root": {
8
+ var c = n(o)(({ annotationType: e }) => ({ "& .MuiPaper-root": {
8
9
  overflowX: "unset",
9
10
  overflowY: "unset",
10
11
  marginLeft: "16px",
@@ -18,41 +19,41 @@ var s = n(a)(({ theme: e, annotationType: t }) => ({ "& .MuiPaper-root": {
18
19
  width: 0,
19
20
  pointerEvents: "none",
20
21
  borderWidth: "7px",
21
- borderRightColor: e.palette.grey[100]
22
+ borderRightColor: r.border()
22
23
  },
23
- ...t === "negative" && { "&::before": { borderRightColor: "rgb(255, 204, 238) !important" } },
24
- ...t === "positive" && { "&::before": { borderRightColor: "rgb(153, 255, 153) !important" } }
25
- } })), c = n("div")(({ theme: e, annotationType: t }) => ({
24
+ ...e === "negative" && { "&::before": { borderRightColor: "rgb(255, 204, 238) !important" } },
25
+ ...e === "positive" && { "&::before": { borderRightColor: "rgb(153, 255, 153) !important" } }
26
+ } })), l = n("div")(({ annotationType: e }) => ({
26
27
  width: "200px",
27
28
  overflow: "hidden",
28
29
  borderRadius: "4px",
29
- backgroundColor: "#ffffff",
30
- border: `4px solid ${e.palette.grey[100]}`,
31
- ...t === "negative" && { borderColor: "rgb(255, 204, 238) !important" },
32
- ...t === "positive" && { borderColor: "rgb(153, 255, 153) !important" }
33
- })), l = n("div")(({ theme: e }) => ({
30
+ backgroundColor: r.white(),
31
+ border: `4px solid ${r.border()}`,
32
+ ...e === "negative" && { borderColor: "rgb(255, 204, 238) !important" },
33
+ ...e === "positive" && { borderColor: "rgb(153, 255, 153) !important" }
34
+ })), u = n("div")(() => ({
34
35
  display: "flex",
35
36
  flexWrap: "wrap",
36
- borderTop: `2px solid ${e.palette.grey[100]}`
37
- })), u = n("div")(({ theme: e, variant: t, annotationType: n }) => ({
37
+ borderTop: `2px solid ${r.border()}`
38
+ })), d = n("div")(({ variant: e, annotationType: t }) => ({
38
39
  flexGrow: 1,
39
40
  width: "28%",
40
41
  textAlign: "center",
41
42
  padding: "4px",
42
43
  cursor: "pointer",
43
- "&:not(:nth-child(3n))": { borderRight: `1px solid ${e.palette.grey[100]}` },
44
- "&:hover": { backgroundColor: e.palette.grey[100] },
45
- ...t === "positive" && {
44
+ "&:not(:nth-child(3n))": { borderRight: `1px solid ${r.border()}` },
45
+ "&:hover": { backgroundColor: r.backgroundDark() },
46
+ ...e === "positive" && {
46
47
  backgroundColor: "rgb(153, 255, 153) !important",
47
48
  "&:hover": { filter: "brightness(85%)" }
48
49
  },
49
- ...t === "negative" && {
50
+ ...e === "negative" && {
50
51
  backgroundColor: "rgb(255, 204, 238) !important",
51
52
  "&:hover": { filter: "brightness(85%)" }
52
53
  },
53
- ...t === "typeChange" && n === "negative" && { "&:hover": { backgroundColor: "rgb(153, 255, 153) !important" } },
54
- ...t === "typeChange" && n === "positive" && { "&:hover": { backgroundColor: "rgb(255, 204, 238) !important" } }
55
- })), d = class extends e.Component {
54
+ ...e === "typeChange" && t === "negative" && { "&:hover": { backgroundColor: "rgb(153, 255, 153) !important" } },
55
+ ...e === "typeChange" && t === "positive" && { "&:hover": { backgroundColor: "rgb(255, 204, 238) !important" } }
56
+ })), f = class extends e.Component {
56
57
  static propTypes = {
57
58
  anchorEl: t.object,
58
59
  open: t.bool,
@@ -81,13 +82,13 @@ var s = n(a)(({ theme: e, annotationType: t }) => ({ "& .MuiPaper-root": {
81
82
  n === "" ? t() : e(n), this.setState({ value: "" });
82
83
  };
83
84
  render() {
84
- let { anchorEl: e, offset: t, onDelete: n, open: a, type: d } = this.props, { value: f } = this.state;
85
- return /* @__PURE__ */ r(s, {
85
+ let { anchorEl: e, offset: t, onDelete: n, open: r, type: o } = this.props, { value: f } = this.state;
86
+ return /* @__PURE__ */ i(c, {
86
87
  anchorEl: e,
87
88
  elevation: 2,
88
- open: a,
89
+ open: r,
89
90
  onClose: this.handleSave,
90
- annotationType: d,
91
+ annotationType: o,
91
92
  style: {
92
93
  marginTop: `${t}px`,
93
94
  transition: "margin-top 2s ease-out"
@@ -104,9 +105,9 @@ var s = n(a)(({ theme: e, annotationType: t }) => ({ "& .MuiPaper-root": {
104
105
  vertical: "top",
105
106
  horizontal: "left"
106
107
  },
107
- children: /* @__PURE__ */ i(c, {
108
- annotationType: d,
109
- children: [/* @__PURE__ */ r(o, {
108
+ children: /* @__PURE__ */ a(l, {
109
+ annotationType: o,
110
+ children: [/* @__PURE__ */ i(s, {
110
111
  id: "annotation-editor",
111
112
  style: {
112
113
  padding: "2px 5px",
@@ -119,18 +120,18 @@ var s = n(a)(({ theme: e, annotationType: t }) => ({ "& .MuiPaper-root": {
119
120
  value: f,
120
121
  onChange: this.onValueChange,
121
122
  InputProps: { disableUnderline: !0 }
122
- }), /* @__PURE__ */ i(l, { children: [
123
- /* @__PURE__ */ r(u, {
123
+ }), /* @__PURE__ */ a(u, { children: [
124
+ /* @__PURE__ */ i(d, {
124
125
  onClick: n,
125
126
  children: "Delete"
126
127
  }),
127
- /* @__PURE__ */ r(u, {
128
+ /* @__PURE__ */ i(d, {
128
129
  variant: "typeChange",
129
- annotationType: d,
130
+ annotationType: o,
130
131
  onClick: this.handleTypeChange,
131
- children: d === "negative" ? "Green" : "Pink"
132
+ children: o === "negative" ? "Green" : "Pink"
132
133
  }),
133
- /* @__PURE__ */ r(u, {
134
+ /* @__PURE__ */ i(d, {
134
135
  onClick: this.handleSave,
135
136
  children: "Save"
136
137
  })
@@ -140,4 +141,4 @@ var s = n(a)(({ theme: e, annotationType: t }) => ({ "& .MuiPaper-root": {
140
141
  }
141
142
  };
142
143
  //#endregion
143
- export { d as default };
144
+ export { f as default };
@@ -1,4 +1,4 @@
1
- import e from "./main.js";
1
+ import { Main as e } from "./main.js";
2
2
  import t from "react";
3
3
  import n from "debug";
4
4
  import { createRoot as r } from "react-dom/client";
@@ -61,7 +61,7 @@ var d = class extends HTMLElement {
61
61
  }
62
62
  }
63
63
  disconnectedCallback() {
64
- this._root && this._root.unmount();
64
+ this._root &&= (this._root.unmount(), null);
65
65
  }
66
66
  };
67
67
  //#endregion
@@ -23,7 +23,8 @@ var v = _(f, "UiLayout") || _(w.UiLayout, "UiLayout"), y = _(d, "PreviewPrompt")
23
23
  width: "100%",
24
24
  color: p.text(),
25
25
  marginBottom: e.spacing(2),
26
- fontSize: "inherit"
26
+ fontSize: "inherit",
27
+ display: "block"
27
28
  })), O = o("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), k = o(s)(({ theme: e }) => ({
28
29
  marginBottom: e.spacing(2),
29
30
  borderRadius: "4px"
@@ -131,4 +132,4 @@ var v = _(f, "UiLayout") || _(w.UiLayout, "UiLayout"), y = _(d, "PreviewPrompt")
131
132
  }
132
133
  };
133
134
  //#endregion
134
- export { j as default };
135
+ export { j as Main, j as default };