@upstep/js 0.5.12 → 0.6.1
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/README.md +36 -1
- package/dist/api-BuSqdsZp.js +1 -0
- package/dist/{api-DIQt-yuC.mjs → api-C1UV7Szw.mjs} +31 -7
- package/dist/api.d.ts +7 -2
- package/dist/api.d.ts.map +1 -1
- package/dist/embed.d.ts +2 -0
- package/dist/embed.d.ts.map +1 -0
- package/dist/index.cjs +10 -19
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +126 -120
- package/dist/react.cjs +1 -1
- package/dist/react.d.ts +4 -1
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +284 -247
- package/dist/upstep.global.js +81 -0
- package/dist/widget.d.ts +2 -0
- package/dist/widget.d.ts.map +1 -1
- package/package.json +7 -4
- package/dist/api-DLrEC5_l.js +0 -1
package/dist/react.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { U as
|
|
4
|
-
const
|
|
1
|
+
import { jsxs as d, Fragment as T, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as G, useState as h, useEffect as S, useCallback as F, useContext as j, useRef as O } from "react";
|
|
3
|
+
import { U as V } from "./api-C1UV7Szw.mjs";
|
|
4
|
+
const _ = "#D97757", Y = {
|
|
5
5
|
bg: "#ffffff",
|
|
6
6
|
bgSoft: "#f6f5f2",
|
|
7
7
|
bgHover: "#efede8",
|
|
@@ -10,8 +10,8 @@ const $ = "#D97757", O = {
|
|
|
10
10
|
textFaint: "#9b9890",
|
|
11
11
|
border: "#e8e6df",
|
|
12
12
|
overlay: "rgba(26,25,21,.45)"
|
|
13
|
-
},
|
|
14
|
-
bg: "#
|
|
13
|
+
}, q = {
|
|
14
|
+
bg: "#000000",
|
|
15
15
|
bgSoft: "#262522",
|
|
16
16
|
bgHover: "#302e2a",
|
|
17
17
|
text: "#f5f4f0",
|
|
@@ -20,118 +20,140 @@ const $ = "#D97757", O = {
|
|
|
20
20
|
border: "#33312c",
|
|
21
21
|
overlay: "rgba(0,0,0,.6)"
|
|
22
22
|
};
|
|
23
|
-
function
|
|
23
|
+
function E() {
|
|
24
24
|
if (typeof document > "u") return !1;
|
|
25
|
-
const
|
|
26
|
-
return
|
|
25
|
+
const n = document.documentElement;
|
|
26
|
+
return n.classList.contains("dark") || n.getAttribute("data-theme") === "dark";
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
const [
|
|
30
|
-
return
|
|
31
|
-
if (
|
|
32
|
-
t(
|
|
28
|
+
function K(n) {
|
|
29
|
+
const [o, t] = h(() => n === "dark");
|
|
30
|
+
return S(() => {
|
|
31
|
+
if (n !== "auto") {
|
|
32
|
+
t(n === "dark");
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
-
if (t(
|
|
36
|
-
const
|
|
37
|
-
return
|
|
35
|
+
if (t(E()), typeof MutationObserver > "u") return;
|
|
36
|
+
const f = new MutationObserver(() => t(E()));
|
|
37
|
+
return f.observe(document.documentElement, {
|
|
38
38
|
attributes: !0,
|
|
39
39
|
attributeFilter: ["class", "data-theme"]
|
|
40
|
-
}), () =>
|
|
41
|
-
}, [
|
|
40
|
+
}), () => f.disconnect();
|
|
41
|
+
}, [n]), o ? q : Y;
|
|
42
42
|
}
|
|
43
|
-
const
|
|
44
|
-
function
|
|
45
|
-
children:
|
|
46
|
-
...
|
|
43
|
+
const R = G(null);
|
|
44
|
+
function de({
|
|
45
|
+
children: n,
|
|
46
|
+
...o
|
|
47
47
|
}) {
|
|
48
|
-
const [t] =
|
|
49
|
-
|
|
50
|
-
t.setUserId(
|
|
51
|
-
}, [t,
|
|
52
|
-
|
|
48
|
+
const [t] = h(() => new V(o)), [f, g] = h([]), [i, r] = h(!1), [l, y] = h(!0);
|
|
49
|
+
S(() => {
|
|
50
|
+
t.setUserId(o.userId);
|
|
51
|
+
}, [t, o.userId]), S(() => {
|
|
52
|
+
t.supportIdentityToken = o.supportIdentityToken, document.querySelectorAll("iframe[data-upstep-support]").forEach((c) => {
|
|
53
|
+
var m;
|
|
54
|
+
return (m = c.contentWindow) == null ? void 0 : m.postMessage({ type: "upstep:support:identity", token: o.supportIdentityToken }, new URL(t.baseUrl).origin);
|
|
55
|
+
});
|
|
56
|
+
}, [t, o.supportIdentityToken]);
|
|
57
|
+
const a = F(async () => {
|
|
53
58
|
try {
|
|
54
|
-
const
|
|
55
|
-
|
|
59
|
+
const c = await t.listFeedback({ sort: "votes", limit: 20 });
|
|
60
|
+
g(c.items), y(c.showBranding ?? !0);
|
|
56
61
|
} catch {
|
|
57
62
|
}
|
|
58
63
|
}, [t]);
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}, [
|
|
62
|
-
const
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
}, [t,
|
|
64
|
+
S(() => {
|
|
65
|
+
a();
|
|
66
|
+
}, [a]);
|
|
67
|
+
const w = F(async (c, m, v) => {
|
|
68
|
+
const p = { content: m };
|
|
69
|
+
c.trim() && (p.title = c.trim()), v !== void 0 && (p.type = v), await t.submitFeedback(p), await a();
|
|
70
|
+
}, [t, a]), x = F(async (c, m) => {
|
|
66
71
|
try {
|
|
67
|
-
await t.vote(
|
|
72
|
+
await t.vote(c, m), await a();
|
|
68
73
|
} catch {
|
|
69
74
|
}
|
|
70
|
-
}, [t,
|
|
71
|
-
(
|
|
75
|
+
}, [t, a]), s = F(
|
|
76
|
+
(c) => t.getItem(c),
|
|
72
77
|
[t]
|
|
73
|
-
),
|
|
78
|
+
), b = F(() => r(!0), []), k = F(() => r(!1), []), C = F((c) => t.setUserId(c), [t]);
|
|
74
79
|
return /* @__PURE__ */ e(
|
|
75
|
-
|
|
80
|
+
R.Provider,
|
|
76
81
|
{
|
|
77
82
|
value: {
|
|
78
83
|
client: t,
|
|
79
|
-
feedItems:
|
|
80
|
-
loadFeed:
|
|
81
|
-
submit:
|
|
82
|
-
vote:
|
|
84
|
+
feedItems: f,
|
|
85
|
+
loadFeed: a,
|
|
86
|
+
submit: w,
|
|
87
|
+
vote: x,
|
|
83
88
|
getItem: s,
|
|
84
|
-
isOpen:
|
|
85
|
-
open:
|
|
86
|
-
close:
|
|
87
|
-
identify:
|
|
88
|
-
accentColor:
|
|
89
|
-
theme:
|
|
90
|
-
showBranding:
|
|
89
|
+
isOpen: i,
|
|
90
|
+
open: b,
|
|
91
|
+
close: k,
|
|
92
|
+
identify: C,
|
|
93
|
+
accentColor: o.accentColor ?? _,
|
|
94
|
+
theme: o.theme ?? "auto",
|
|
95
|
+
showBranding: l,
|
|
96
|
+
chat: o.chat !== !1
|
|
91
97
|
},
|
|
92
|
-
children:
|
|
98
|
+
children: n
|
|
93
99
|
}
|
|
94
100
|
);
|
|
95
101
|
}
|
|
96
|
-
function
|
|
97
|
-
const
|
|
98
|
-
if (!
|
|
99
|
-
return
|
|
102
|
+
function I() {
|
|
103
|
+
const n = j(R);
|
|
104
|
+
if (!n) throw new Error("useUpstep must be used inside <UpstepProvider>");
|
|
105
|
+
return n;
|
|
100
106
|
}
|
|
101
|
-
function
|
|
102
|
-
position:
|
|
103
|
-
accentColor:
|
|
107
|
+
function ae({
|
|
108
|
+
position: n = "bottom-right",
|
|
109
|
+
accentColor: o,
|
|
104
110
|
theme: t,
|
|
105
|
-
hideLauncher:
|
|
111
|
+
hideLauncher: f = !1,
|
|
112
|
+
chat: g = !0
|
|
106
113
|
}) {
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
114
|
+
const i = I(), r = o ?? i.accentColor, l = K(t ?? i.theme), { isOpen: y, open: a, close: w, showBranding: x } = i, [s, b] = h("list"), [k, C] = h(!1);
|
|
115
|
+
S(() => {
|
|
116
|
+
let u = !0;
|
|
117
|
+
if (i.client.chat = i.chat, !i.chat || !g) {
|
|
118
|
+
C(!1);
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
return i.client.supportEnabled().then((z) => {
|
|
122
|
+
u && C(z);
|
|
123
|
+
}), () => {
|
|
124
|
+
u = !1;
|
|
125
|
+
};
|
|
126
|
+
}, [i.client, i.chat, g]), S(() => {
|
|
127
|
+
(!i.chat || !g) && s === "support" && b("list");
|
|
128
|
+
}, [i.chat, g, s]);
|
|
129
|
+
const [c, m] = h(null), [v, p] = h(!1);
|
|
130
|
+
S(() => {
|
|
131
|
+
const u = window.matchMedia("(max-width: 639px)");
|
|
132
|
+
p(u.matches);
|
|
133
|
+
const z = ($) => p($.matches);
|
|
134
|
+
return u.addEventListener("change", z), () => u.removeEventListener("change", z);
|
|
113
135
|
}, []);
|
|
114
|
-
const
|
|
115
|
-
function
|
|
116
|
-
|
|
117
|
-
|
|
136
|
+
const H = n === "bottom-left" ? { position: "fixed", bottom: 24, left: 24 } : { position: "fixed", bottom: 24, right: 24 }, B = '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif';
|
|
137
|
+
function W() {
|
|
138
|
+
w(), setTimeout(() => {
|
|
139
|
+
b("list"), m(null);
|
|
118
140
|
}, 300);
|
|
119
141
|
}
|
|
120
|
-
function
|
|
121
|
-
|
|
142
|
+
function N(u) {
|
|
143
|
+
m(u), b("detail");
|
|
122
144
|
}
|
|
123
|
-
return /* @__PURE__ */
|
|
124
|
-
!
|
|
145
|
+
return /* @__PURE__ */ d(T, { children: [
|
|
146
|
+
!f && /* @__PURE__ */ d(
|
|
125
147
|
"button",
|
|
126
148
|
{
|
|
127
|
-
onClick:
|
|
149
|
+
onClick: a,
|
|
128
150
|
style: {
|
|
129
|
-
...
|
|
151
|
+
...H,
|
|
130
152
|
zIndex: 9998,
|
|
131
153
|
display: "inline-flex",
|
|
132
154
|
alignItems: "center",
|
|
133
155
|
gap: 7,
|
|
134
|
-
background:
|
|
156
|
+
background: r,
|
|
135
157
|
color: "#fff",
|
|
136
158
|
border: "none",
|
|
137
159
|
borderRadius: 9999,
|
|
@@ -139,40 +161,40 @@ function ie({
|
|
|
139
161
|
fontSize: 14,
|
|
140
162
|
fontWeight: 600,
|
|
141
163
|
cursor: "pointer",
|
|
142
|
-
fontFamily:
|
|
164
|
+
fontFamily: B,
|
|
143
165
|
boxShadow: "0 6px 20px rgba(26,25,21,.18)"
|
|
144
166
|
},
|
|
145
167
|
children: [
|
|
146
|
-
/* @__PURE__ */ e(
|
|
147
|
-
!v && "Feedback"
|
|
168
|
+
/* @__PURE__ */ e(re, { size: 16 }),
|
|
169
|
+
!v && (k && g && i.chat ? "Help & feedback" : "Feedback")
|
|
148
170
|
]
|
|
149
171
|
}
|
|
150
172
|
),
|
|
151
|
-
|
|
173
|
+
y && /* @__PURE__ */ e(
|
|
152
174
|
"div",
|
|
153
175
|
{
|
|
154
|
-
onClick: (
|
|
176
|
+
onClick: (u) => u.target === u.currentTarget && W(),
|
|
155
177
|
style: {
|
|
156
178
|
position: "fixed",
|
|
157
179
|
inset: 0,
|
|
158
|
-
background:
|
|
180
|
+
background: l.overlay,
|
|
159
181
|
backdropFilter: "blur(3px)",
|
|
160
182
|
zIndex: 9999,
|
|
161
183
|
display: "flex",
|
|
162
184
|
alignItems: "center",
|
|
163
185
|
justifyContent: "center",
|
|
164
186
|
padding: 16,
|
|
165
|
-
fontFamily:
|
|
187
|
+
fontFamily: B
|
|
166
188
|
},
|
|
167
|
-
children: /* @__PURE__ */
|
|
189
|
+
children: /* @__PURE__ */ d(
|
|
168
190
|
"div",
|
|
169
191
|
{
|
|
170
192
|
style: {
|
|
171
|
-
background:
|
|
172
|
-
border: `1px solid ${
|
|
193
|
+
background: l.bg,
|
|
194
|
+
border: `1px solid ${l.border}`,
|
|
173
195
|
borderRadius: 20,
|
|
174
196
|
width: "100%",
|
|
175
|
-
maxWidth: 440,
|
|
197
|
+
maxWidth: k && g && i.chat ? 460 : 440,
|
|
176
198
|
maxHeight: "88vh",
|
|
177
199
|
display: "flex",
|
|
178
200
|
flexDirection: "column",
|
|
@@ -180,59 +202,67 @@ function ie({
|
|
|
180
202
|
boxShadow: "0 24px 64px rgba(0,0,0,.28)"
|
|
181
203
|
},
|
|
182
204
|
children: [
|
|
183
|
-
/* @__PURE__ */
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
|
|
205
|
+
k && g && i.chat ? /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 14, padding: "10px 14px", borderBottom: `1px solid ${l.border}`, flexShrink: 0 }, children: [
|
|
206
|
+
/* @__PURE__ */ e("div", { style: { display: "flex", flex: 1, gap: 4 }, children: [["support", "Support"], ["list", "Feedback"]].map(([u, z]) => /* @__PURE__ */ e("button", { onClick: () => b(u), style: { flex: 1, border: 0, borderRadius: 8, padding: "9px 12px", background: (s === "support" ? u === "support" : u === "list") ? l.bgSoft : "transparent", color: (s === "support" ? u === "support" : u === "list") ? l.text : l.textSoft, fontSize: 12, fontWeight: 600, cursor: "pointer" }, children: z }, u)) }),
|
|
207
|
+
/* @__PURE__ */ e("button", { "aria-label": "Close", onClick: W, style: { border: 0, background: "transparent", color: l.textSoft, padding: 6, cursor: "pointer", fontSize: 14 }, children: "✕" })
|
|
208
|
+
] }) : /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", padding: "16px 20px", borderBottom: `1px solid ${l.border}`, flexShrink: 0 }, children: [
|
|
209
|
+
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
210
|
+
s !== "list" && /* @__PURE__ */ e(
|
|
186
211
|
"button",
|
|
187
212
|
{
|
|
188
|
-
onClick: () =>
|
|
189
|
-
style: { background: "none", border: "none", cursor: "pointer", color:
|
|
213
|
+
onClick: () => b("list"),
|
|
214
|
+
style: { background: "none", border: "none", cursor: "pointer", color: r, fontSize: 13, fontWeight: 600, padding: 0 },
|
|
190
215
|
children: "← Back"
|
|
191
216
|
}
|
|
192
217
|
),
|
|
193
|
-
|
|
194
|
-
|
|
218
|
+
s === "list" && /* @__PURE__ */ e("span", { style: { fontWeight: 700, fontSize: 16, color: l.text, letterSpacing: "-.01em" }, children: "Feedback" }),
|
|
219
|
+
s === "create" && /* @__PURE__ */ e("span", { style: { fontWeight: 700, fontSize: 16, color: l.text, letterSpacing: "-.01em" }, children: "New feedback" })
|
|
195
220
|
] }),
|
|
196
|
-
/* @__PURE__ */
|
|
197
|
-
|
|
221
|
+
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
222
|
+
s === "list" && /* @__PURE__ */ e(
|
|
198
223
|
"button",
|
|
199
224
|
{
|
|
200
|
-
onClick: () =>
|
|
201
|
-
style: { background:
|
|
225
|
+
onClick: () => b("create"),
|
|
226
|
+
style: { background: r, color: "#fff", border: "none", borderRadius: 20, padding: "6px 14px", fontSize: 13, fontWeight: 700, cursor: "pointer" },
|
|
202
227
|
children: "+ New"
|
|
203
228
|
}
|
|
204
229
|
),
|
|
205
230
|
/* @__PURE__ */ e(
|
|
206
231
|
"button",
|
|
207
232
|
{
|
|
208
|
-
onClick:
|
|
209
|
-
style: { background:
|
|
233
|
+
onClick: W,
|
|
234
|
+
style: { background: l.bgSoft, border: "none", width: 28, height: 28, borderRadius: 8, fontSize: 14, cursor: "pointer", color: l.textSoft, display: "flex", alignItems: "center", justifyContent: "center" },
|
|
210
235
|
children: "✕"
|
|
211
236
|
}
|
|
212
237
|
)
|
|
213
238
|
] })
|
|
214
239
|
] }),
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
-
|
|
217
|
-
|
|
240
|
+
/* @__PURE__ */ d("div", { style: { flex: 1, overflowY: "auto", padding: s === "support" ? 0 : "16px 20px 24px" }, children: [
|
|
241
|
+
s === "support" && g && i.chat && /* @__PURE__ */ e(J, { client: i.client, theme: l.bg === "#000000" ? "dark" : "light" }),
|
|
242
|
+
k && g && i.chat && s !== "support" && /* @__PURE__ */ e("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: 16 }, children: s === "list" ? /* @__PURE__ */ d(T, { children: [
|
|
243
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 14, fontWeight: 600, color: l.text }, children: "Feedback & ideas" }),
|
|
244
|
+
/* @__PURE__ */ e("button", { onClick: () => b("create"), style: { border: 0, borderRadius: 8, background: r, color: "white", fontSize: 12, padding: "7px 10px", cursor: "pointer" }, children: "+ New" })
|
|
245
|
+
] }) : /* @__PURE__ */ e("button", { onClick: () => b("list"), style: { border: 0, background: "none", padding: 0, color: l.textSoft, fontSize: 12, cursor: "pointer" }, children: "← Back to feedback" }) }),
|
|
246
|
+
s === "list" && /* @__PURE__ */ e(
|
|
247
|
+
Q,
|
|
218
248
|
{
|
|
219
|
-
onSelect:
|
|
220
|
-
accent:
|
|
221
|
-
p:
|
|
249
|
+
onSelect: N,
|
|
250
|
+
accent: r,
|
|
251
|
+
p: l
|
|
222
252
|
}
|
|
223
253
|
),
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
254
|
+
s === "detail" && c && /* @__PURE__ */ e(X, { feedbackId: c, accent: r, p: l, font: B }),
|
|
255
|
+
s === "create" && /* @__PURE__ */ e(
|
|
256
|
+
ee,
|
|
227
257
|
{
|
|
228
|
-
accent:
|
|
229
|
-
p:
|
|
230
|
-
font:
|
|
231
|
-
onDone: () =>
|
|
258
|
+
accent: r,
|
|
259
|
+
p: l,
|
|
260
|
+
font: B,
|
|
261
|
+
onDone: () => b("list")
|
|
232
262
|
}
|
|
233
263
|
)
|
|
234
264
|
] }),
|
|
235
|
-
|
|
265
|
+
x && s !== "support" && /* @__PURE__ */ d(
|
|
236
266
|
"a",
|
|
237
267
|
{
|
|
238
268
|
href: "https://upstep.dev",
|
|
@@ -242,9 +272,9 @@ function ie({
|
|
|
242
272
|
display: "block",
|
|
243
273
|
textAlign: "center",
|
|
244
274
|
padding: "8px 0",
|
|
245
|
-
borderTop: `1px solid ${
|
|
275
|
+
borderTop: `1px solid ${l.border}`,
|
|
246
276
|
fontSize: 11,
|
|
247
|
-
color:
|
|
277
|
+
color: l.textFaint,
|
|
248
278
|
textDecoration: "none",
|
|
249
279
|
flexShrink: 0
|
|
250
280
|
},
|
|
@@ -261,18 +291,24 @@ function ie({
|
|
|
261
291
|
)
|
|
262
292
|
] });
|
|
263
293
|
}
|
|
264
|
-
function
|
|
265
|
-
|
|
266
|
-
|
|
294
|
+
function J({ client: n, theme: o }) {
|
|
295
|
+
const t = O(null);
|
|
296
|
+
return S(() => {
|
|
297
|
+
if (t.current) return n.connectSupportFrame(t.current);
|
|
298
|
+
}, [n]), /* @__PURE__ */ e("iframe", { ref: t, "data-upstep-support": !0, title: "Customer support", src: n.supportFrameUrl(o), style: { width: "100%", height: "min(560px, calc(88dvh - 56px))", minHeight: 300, border: 0, display: "block" } });
|
|
299
|
+
}
|
|
300
|
+
function Q({
|
|
301
|
+
onSelect: n,
|
|
302
|
+
accent: o,
|
|
267
303
|
p: t
|
|
268
304
|
}) {
|
|
269
|
-
const { feedItems:
|
|
270
|
-
return
|
|
271
|
-
const
|
|
272
|
-
return /* @__PURE__ */
|
|
305
|
+
const { feedItems: f, vote: g } = I(), i = f.filter((r) => r.status !== "CLOSED");
|
|
306
|
+
return i.length ? /* @__PURE__ */ e(T, { children: i.map((r) => {
|
|
307
|
+
const l = r.userVote === "UP", y = r.title ?? r.content;
|
|
308
|
+
return /* @__PURE__ */ d(
|
|
273
309
|
"div",
|
|
274
310
|
{
|
|
275
|
-
onClick: () =>
|
|
311
|
+
onClick: () => n(r.id),
|
|
276
312
|
style: {
|
|
277
313
|
display: "flex",
|
|
278
314
|
gap: 12,
|
|
@@ -284,11 +320,11 @@ function _({
|
|
|
284
320
|
cursor: "pointer"
|
|
285
321
|
},
|
|
286
322
|
children: [
|
|
287
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ d(
|
|
288
324
|
"button",
|
|
289
325
|
{
|
|
290
|
-
onClick: (
|
|
291
|
-
|
|
326
|
+
onClick: (a) => {
|
|
327
|
+
a.stopPropagation(), g(r.id, "UP");
|
|
292
328
|
},
|
|
293
329
|
style: {
|
|
294
330
|
display: "flex",
|
|
@@ -301,143 +337,144 @@ function _({
|
|
|
301
337
|
borderRadius: 11,
|
|
302
338
|
cursor: "pointer",
|
|
303
339
|
flexShrink: 0,
|
|
304
|
-
border: `1px solid ${
|
|
305
|
-
background:
|
|
340
|
+
border: `1px solid ${l ? o : t.border}`,
|
|
341
|
+
background: l ? `${o}1a` : t.bgSoft
|
|
306
342
|
},
|
|
307
343
|
children: [
|
|
308
|
-
/* @__PURE__ */ e(D, { color:
|
|
309
|
-
/* @__PURE__ */ e("span", { style: { fontSize: 14, fontWeight: 700, color: t.text, lineHeight: 1.1 }, children:
|
|
344
|
+
/* @__PURE__ */ e(D, { color: o }),
|
|
345
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 14, fontWeight: 700, color: t.text, lineHeight: 1.1 }, children: r.upvotes })
|
|
310
346
|
]
|
|
311
347
|
}
|
|
312
348
|
),
|
|
313
|
-
/* @__PURE__ */
|
|
314
|
-
/* @__PURE__ */ e("p", { style: { fontSize: 13.5, fontWeight: 600, lineHeight: 1.4, color: t.text, margin: "0 0 6px", overflow: "hidden", display: "-webkit-box", WebkitLineClamp: 2, WebkitBoxOrient: "vertical" }, children:
|
|
315
|
-
/* @__PURE__ */
|
|
316
|
-
/* @__PURE__ */ e(
|
|
317
|
-
|
|
318
|
-
/* @__PURE__ */ e("span", { style: { fontSize: 11, color: t.textFaint }, children:
|
|
349
|
+
/* @__PURE__ */ d("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
350
|
+
/* @__PURE__ */ e("p", { style: { fontSize: 13.5, fontWeight: 600, lineHeight: 1.4, color: t.text, margin: "0 0 6px", overflow: "hidden", display: "-webkit-box", WebkitLineClamp: 2, WebkitBoxOrient: "vertical" }, children: y }),
|
|
351
|
+
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 6, flexWrap: "wrap" }, children: [
|
|
352
|
+
/* @__PURE__ */ e(L, { type: r.type, p: t }),
|
|
353
|
+
r.status === "PENDING" ? /* @__PURE__ */ e(M, {}) : /* @__PURE__ */ e(A, { status: r.status, boardStatus: r.boardStatus, p: t }),
|
|
354
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 11, color: t.textFaint }, children: P(r.createdAt) })
|
|
319
355
|
] })
|
|
320
356
|
] }),
|
|
321
357
|
/* @__PURE__ */ e("span", { style: { color: t.textFaint, fontSize: 18, alignSelf: "center", flexShrink: 0 }, children: "›" })
|
|
322
358
|
]
|
|
323
359
|
},
|
|
324
|
-
|
|
360
|
+
r.id
|
|
325
361
|
);
|
|
326
|
-
}) }) : /* @__PURE__ */
|
|
362
|
+
}) }) : /* @__PURE__ */ d("div", { style: { textAlign: "center", padding: "40px 0" }, children: [
|
|
327
363
|
/* @__PURE__ */ e("div", { style: { color: t.textSoft, fontSize: 15, fontWeight: 600, marginBottom: 4 }, children: "No open feedback yet" }),
|
|
328
364
|
/* @__PURE__ */ e("div", { style: { color: t.textFaint, fontSize: 14 }, children: "Be the first to share one." })
|
|
329
365
|
] });
|
|
330
366
|
}
|
|
331
|
-
function
|
|
332
|
-
const { vote:
|
|
333
|
-
|
|
367
|
+
function X({ feedbackId: n, accent: o, p: t, font: f }) {
|
|
368
|
+
const { vote: g, getItem: i } = I(), [r, l] = h(null), [y, a] = h(!1);
|
|
369
|
+
S(() => {
|
|
334
370
|
let s = !1;
|
|
335
|
-
return
|
|
336
|
-
s ||
|
|
371
|
+
return i(n).then((b) => {
|
|
372
|
+
s || l(b);
|
|
337
373
|
}).catch(() => {
|
|
338
374
|
}), () => {
|
|
339
375
|
s = !0;
|
|
340
376
|
};
|
|
341
|
-
}, [
|
|
342
|
-
async function
|
|
343
|
-
if (!(!
|
|
344
|
-
|
|
377
|
+
}, [n, i]);
|
|
378
|
+
async function w() {
|
|
379
|
+
if (!(!r || y)) {
|
|
380
|
+
a(!0);
|
|
345
381
|
try {
|
|
346
|
-
await
|
|
347
|
-
const s = await
|
|
348
|
-
|
|
382
|
+
await g(r.id, "UP");
|
|
383
|
+
const s = await i(n);
|
|
384
|
+
l(s);
|
|
349
385
|
} catch {
|
|
350
386
|
} finally {
|
|
351
|
-
|
|
387
|
+
a(!1);
|
|
352
388
|
}
|
|
353
389
|
}
|
|
354
390
|
}
|
|
355
|
-
if (!
|
|
391
|
+
if (!r)
|
|
356
392
|
return /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: "40px 0", color: t.textFaint, fontSize: 14 }, children: "Loading…" });
|
|
357
|
-
const
|
|
358
|
-
return /* @__PURE__ */
|
|
359
|
-
|
|
360
|
-
/* @__PURE__ */
|
|
361
|
-
/* @__PURE__ */ e(
|
|
362
|
-
|
|
393
|
+
const x = r.title;
|
|
394
|
+
return /* @__PURE__ */ d("div", { children: [
|
|
395
|
+
x && /* @__PURE__ */ e("div", { style: { fontSize: 20, fontWeight: 700, color: t.text, letterSpacing: "-.02em", marginBottom: 10, lineHeight: 1.3 }, children: x }),
|
|
396
|
+
/* @__PURE__ */ d("div", { style: { display: "flex", gap: 6, marginBottom: 14, flexWrap: "wrap" }, children: [
|
|
397
|
+
/* @__PURE__ */ e(L, { type: r.type, p: t }),
|
|
398
|
+
r.status === "PENDING" ? /* @__PURE__ */ e(M, {}) : /* @__PURE__ */ e(A, { status: r.status, boardStatus: r.boardStatus, p: t })
|
|
363
399
|
] }),
|
|
364
|
-
/* @__PURE__ */ e("p", { style: { fontSize: 15, lineHeight: 1.6, color: t.textSoft, marginBottom: 20 }, children:
|
|
365
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ e("p", { style: { fontSize: 15, lineHeight: 1.6, color: t.textSoft, marginBottom: 20 }, children: r.content }),
|
|
401
|
+
/* @__PURE__ */ d(
|
|
366
402
|
"button",
|
|
367
403
|
{
|
|
368
|
-
onClick:
|
|
369
|
-
disabled:
|
|
404
|
+
onClick: w,
|
|
405
|
+
disabled: y,
|
|
370
406
|
style: {
|
|
371
407
|
display: "inline-flex",
|
|
372
408
|
alignItems: "center",
|
|
373
409
|
gap: 8,
|
|
374
|
-
border: `1px solid ${
|
|
375
|
-
background:
|
|
410
|
+
border: `1px solid ${r.userVote === "UP" ? o : t.border}`,
|
|
411
|
+
background: r.userVote === "UP" ? `${o}15` : t.bgSoft,
|
|
376
412
|
borderRadius: 12,
|
|
377
413
|
padding: "10px 16px",
|
|
378
414
|
cursor: "pointer",
|
|
379
|
-
fontFamily:
|
|
415
|
+
fontFamily: f
|
|
380
416
|
},
|
|
381
417
|
children: [
|
|
382
|
-
/* @__PURE__ */ e(D, { color:
|
|
383
|
-
/* @__PURE__ */ e("span", { style: { fontSize: 18, fontWeight: 700, color: t.text }, children:
|
|
384
|
-
/* @__PURE__ */ e("span", { style: { fontSize: 13, color: t.textFaint }, children:
|
|
418
|
+
/* @__PURE__ */ e(D, { color: o, size: 13 }),
|
|
419
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 18, fontWeight: 700, color: t.text }, children: r.upvotes }),
|
|
420
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 13, color: t.textFaint }, children: r.userVote === "UP" ? "Upvoted" : "Upvote" })
|
|
385
421
|
]
|
|
386
422
|
}
|
|
387
423
|
),
|
|
388
|
-
|
|
389
|
-
/* @__PURE__ */ e("div", { style: { fontSize: 10, fontWeight: 700, letterSpacing: ".08em", color: t.textFaint, marginBottom: 12, textTransform: "uppercase" }, children: "
|
|
390
|
-
|
|
424
|
+
r.comments.length > 0 && /* @__PURE__ */ d("div", { style: { marginTop: 28, borderTop: `1px solid ${t.border}`, paddingTop: 20 }, children: [
|
|
425
|
+
/* @__PURE__ */ e("div", { style: { fontSize: 10, fontWeight: 700, letterSpacing: ".08em", color: t.textFaint, marginBottom: 12, textTransform: "uppercase" }, children: "Comments" }),
|
|
426
|
+
r.comments.map((s) => /* @__PURE__ */ e(Z, { comment: s, p: t, accent: o }, s.id))
|
|
391
427
|
] })
|
|
392
428
|
] });
|
|
393
429
|
}
|
|
394
|
-
function
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
/* @__PURE__ */ e("span", { style: { fontSize: 11,
|
|
430
|
+
function Z({ comment: n, p: o, accent: t }) {
|
|
431
|
+
var f;
|
|
432
|
+
return /* @__PURE__ */ d("div", { style: { background: o.bgSoft, border: `1px solid ${o.border}`, borderRadius: 12, padding: 14, marginBottom: 10 }, children: [
|
|
433
|
+
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 8 }, children: [
|
|
434
|
+
/* @__PURE__ */ e("span", { style: { background: `${t}20`, color: t, fontSize: 11, fontWeight: 700, borderRadius: 20, padding: "2px 8px" }, children: ((f = n.authorName) == null ? void 0 : f.trim()) || "UpStep Team" }),
|
|
435
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 11, color: o.textFaint }, children: P(n.createdAt) })
|
|
399
436
|
] }),
|
|
400
|
-
/* @__PURE__ */ e("p", { style: { fontSize: 14, lineHeight: 1.5, color:
|
|
437
|
+
/* @__PURE__ */ e("p", { style: { fontSize: 14, lineHeight: 1.5, color: o.textSoft, margin: 0 }, children: n.content })
|
|
401
438
|
] });
|
|
402
439
|
}
|
|
403
|
-
function
|
|
404
|
-
const { submit:
|
|
405
|
-
async function
|
|
406
|
-
if (!(!
|
|
407
|
-
s(!0),
|
|
440
|
+
function ee({ accent: n, p: o, font: t, onDone: f }) {
|
|
441
|
+
const { submit: g } = I(), [i, r] = h(""), [l, y] = h(""), [a, w] = h("GENERAL"), [x, s] = h(!1), [b, k] = h(!1), [C, c] = h("");
|
|
442
|
+
async function m() {
|
|
443
|
+
if (!(!i.trim() || x)) {
|
|
444
|
+
s(!0), c("");
|
|
408
445
|
try {
|
|
409
|
-
await
|
|
446
|
+
await g(i.trim(), l.trim() || i.trim(), a), k(!0), setTimeout(f, 1200);
|
|
410
447
|
} catch {
|
|
411
|
-
|
|
448
|
+
c("Something went wrong. Please try again.");
|
|
412
449
|
} finally {
|
|
413
450
|
s(!1);
|
|
414
451
|
}
|
|
415
452
|
}
|
|
416
453
|
}
|
|
417
|
-
if (
|
|
418
|
-
return /* @__PURE__ */
|
|
419
|
-
/* @__PURE__ */ e("div", { style: { fontSize: 18, fontWeight: 700, color:
|
|
420
|
-
/* @__PURE__ */ e("div", { style: { fontSize: 14, color:
|
|
454
|
+
if (b)
|
|
455
|
+
return /* @__PURE__ */ d("div", { style: { textAlign: "center", paddingTop: 40 }, children: [
|
|
456
|
+
/* @__PURE__ */ e("div", { style: { fontSize: 18, fontWeight: 700, color: o.text, marginBottom: 6 }, children: "Submitted" }),
|
|
457
|
+
/* @__PURE__ */ e("div", { style: { fontSize: 14, color: o.textFaint }, children: "Feedback received. Thank you." })
|
|
421
458
|
] });
|
|
422
|
-
const
|
|
459
|
+
const v = {
|
|
423
460
|
width: "100%",
|
|
424
|
-
border: `1px solid ${
|
|
461
|
+
border: `1px solid ${o.border}`,
|
|
425
462
|
borderRadius: 12,
|
|
426
463
|
padding: "10px 12px",
|
|
427
464
|
fontSize: 14,
|
|
428
465
|
lineHeight: 1.5,
|
|
429
466
|
outline: "none",
|
|
430
|
-
background:
|
|
431
|
-
color:
|
|
467
|
+
background: o.bgSoft,
|
|
468
|
+
color: o.text,
|
|
432
469
|
fontFamily: t,
|
|
433
470
|
boxSizing: "border-box"
|
|
434
471
|
};
|
|
435
|
-
return /* @__PURE__ */
|
|
436
|
-
/* @__PURE__ */ e("div", { style: { fontSize: 10, fontWeight: 700, letterSpacing: ".08em", color:
|
|
437
|
-
/* @__PURE__ */ e("div", { style: { display: "flex", gap: 7, marginBottom: 16 }, children: ["BUG", "FEATURE", "GENERAL"].map((
|
|
472
|
+
return /* @__PURE__ */ d("div", { children: [
|
|
473
|
+
/* @__PURE__ */ e("div", { style: { fontSize: 10, fontWeight: 700, letterSpacing: ".08em", color: o.textFaint, marginBottom: 8, textTransform: "uppercase" }, children: "Type" }),
|
|
474
|
+
/* @__PURE__ */ e("div", { style: { display: "flex", gap: 7, marginBottom: 16 }, children: ["BUG", "FEATURE", "GENERAL"].map((p) => /* @__PURE__ */ d(
|
|
438
475
|
"button",
|
|
439
476
|
{
|
|
440
|
-
onClick: () =>
|
|
477
|
+
onClick: () => w(p),
|
|
441
478
|
style: {
|
|
442
479
|
flex: 1,
|
|
443
480
|
display: "flex",
|
|
@@ -449,79 +486,79 @@ function K({ accent: i, p: n, font: t, onDone: g }) {
|
|
|
449
486
|
fontSize: 12.5,
|
|
450
487
|
fontWeight: 600,
|
|
451
488
|
cursor: "pointer",
|
|
452
|
-
background:
|
|
453
|
-
color:
|
|
454
|
-
border: `1px solid ${
|
|
489
|
+
background: a === p ? n : o.bg,
|
|
490
|
+
color: a === p ? "#fff" : o.textSoft,
|
|
491
|
+
border: `1px solid ${a === p ? n : o.border}`,
|
|
455
492
|
fontFamily: t
|
|
456
493
|
},
|
|
457
494
|
children: [
|
|
458
|
-
|
|
459
|
-
|
|
495
|
+
U[p].icon,
|
|
496
|
+
U[p].label
|
|
460
497
|
]
|
|
461
498
|
},
|
|
462
|
-
|
|
499
|
+
p
|
|
463
500
|
)) }),
|
|
464
|
-
/* @__PURE__ */ e("div", { style: { fontSize: 10, fontWeight: 700, letterSpacing: ".08em", color:
|
|
501
|
+
/* @__PURE__ */ e("div", { style: { fontSize: 10, fontWeight: 700, letterSpacing: ".08em", color: o.textFaint, marginBottom: 8, textTransform: "uppercase" }, children: "Title" }),
|
|
465
502
|
/* @__PURE__ */ e(
|
|
466
503
|
"input",
|
|
467
504
|
{
|
|
468
|
-
value:
|
|
469
|
-
onChange: (
|
|
505
|
+
value: i,
|
|
506
|
+
onChange: (p) => r(p.target.value),
|
|
470
507
|
placeholder: "Short summary of the issue or idea",
|
|
471
508
|
maxLength: 200,
|
|
472
|
-
style: { ...
|
|
509
|
+
style: { ...v, marginBottom: 16, display: "block" }
|
|
473
510
|
}
|
|
474
511
|
),
|
|
475
|
-
/* @__PURE__ */
|
|
512
|
+
/* @__PURE__ */ d("div", { style: { fontSize: 10, fontWeight: 700, letterSpacing: ".08em", color: o.textFaint, marginBottom: 8, textTransform: "uppercase" }, children: [
|
|
476
513
|
"Description ",
|
|
477
514
|
/* @__PURE__ */ e("span", { style: { fontWeight: 400, textTransform: "none", letterSpacing: 0 }, children: "(optional)" })
|
|
478
515
|
] }),
|
|
479
516
|
/* @__PURE__ */ e(
|
|
480
517
|
"textarea",
|
|
481
518
|
{
|
|
482
|
-
value:
|
|
483
|
-
onChange: (
|
|
519
|
+
value: l,
|
|
520
|
+
onChange: (p) => y(p.target.value),
|
|
484
521
|
placeholder: "Steps to reproduce, expected behaviour, or more context",
|
|
485
522
|
maxLength: 2e3,
|
|
486
523
|
rows: 4,
|
|
487
|
-
style: { ...
|
|
524
|
+
style: { ...v, resize: "vertical", marginBottom: 16 }
|
|
488
525
|
}
|
|
489
526
|
),
|
|
490
|
-
|
|
527
|
+
C && /* @__PURE__ */ e("p", { style: { fontSize: 13, color: "#d6453d", marginBottom: 12 }, children: C }),
|
|
491
528
|
/* @__PURE__ */ e(
|
|
492
529
|
"button",
|
|
493
530
|
{
|
|
494
|
-
onClick:
|
|
495
|
-
disabled:
|
|
531
|
+
onClick: m,
|
|
532
|
+
disabled: x || !i.trim(),
|
|
496
533
|
style: {
|
|
497
534
|
width: "100%",
|
|
498
535
|
padding: 12,
|
|
499
|
-
background:
|
|
536
|
+
background: n,
|
|
500
537
|
color: "#fff",
|
|
501
538
|
border: "none",
|
|
502
539
|
borderRadius: 11,
|
|
503
540
|
fontSize: 14,
|
|
504
541
|
fontWeight: 600,
|
|
505
542
|
cursor: "pointer",
|
|
506
|
-
opacity:
|
|
543
|
+
opacity: x || !i.trim() ? 0.5 : 1,
|
|
507
544
|
fontFamily: t
|
|
508
545
|
},
|
|
509
|
-
children:
|
|
546
|
+
children: x ? "Submitting…" : "Submit feedback"
|
|
510
547
|
}
|
|
511
548
|
)
|
|
512
549
|
] });
|
|
513
550
|
}
|
|
514
|
-
const
|
|
551
|
+
const U = {
|
|
515
552
|
BUG: {
|
|
516
553
|
label: "Bug",
|
|
517
|
-
icon: /* @__PURE__ */
|
|
554
|
+
icon: /* @__PURE__ */ d("svg", { width: 12, height: 12, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: 1.8, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
518
555
|
/* @__PURE__ */ e("ellipse", { cx: "8", cy: "10", rx: "3.5", ry: "4.5" }),
|
|
519
556
|
/* @__PURE__ */ e("path", { d: "M8 5.5V4M5.5 6.5 3.5 5M10.5 6.5 12.5 5M4.5 10.5 2.5 10M11.5 10.5 13.5 10" })
|
|
520
557
|
] })
|
|
521
558
|
},
|
|
522
559
|
FEATURE: {
|
|
523
560
|
label: "Feature",
|
|
524
|
-
icon: /* @__PURE__ */
|
|
561
|
+
icon: /* @__PURE__ */ d("svg", { width: 12, height: 12, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: 1.8, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
525
562
|
/* @__PURE__ */ e("path", { d: "M8 2v1.5M8 12.5V14M2 8h1.5M12.5 8H14M4.1 4.1l1 1M10.9 10.9l1 1M11.9 4.1l-1 1M5.1 10.9l-1 1" }),
|
|
526
563
|
/* @__PURE__ */ e("circle", { cx: "8", cy: "8", r: "2.5" })
|
|
527
564
|
] })
|
|
@@ -530,52 +567,52 @@ const I = {
|
|
|
530
567
|
label: "General",
|
|
531
568
|
icon: /* @__PURE__ */ e("svg", { width: 12, height: 12, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: 1.8, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "M14 9a2 2 0 0 1-2 2H5L2 14V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v5z" }) })
|
|
532
569
|
}
|
|
533
|
-
},
|
|
534
|
-
function
|
|
570
|
+
}, te = { BUG: "#fdecec", FEATURE: "#e9f0fd" }, oe = { BUG: "#d6453d", FEATURE: "#3b76d6" };
|
|
571
|
+
function L({ type: n, p: o }) {
|
|
535
572
|
return /* @__PURE__ */ e("span", { style: {
|
|
536
573
|
padding: "2px 8px",
|
|
537
574
|
borderRadius: 9999,
|
|
538
575
|
fontSize: 10.5,
|
|
539
576
|
fontWeight: 700,
|
|
540
577
|
letterSpacing: ".02em",
|
|
541
|
-
background:
|
|
542
|
-
color:
|
|
543
|
-
}, children:
|
|
578
|
+
background: te[n] ?? o.bgSoft,
|
|
579
|
+
color: oe[n] ?? o.textSoft
|
|
580
|
+
}, children: n });
|
|
544
581
|
}
|
|
545
|
-
const
|
|
582
|
+
const ne = {
|
|
546
583
|
OPEN: "#b45309",
|
|
547
584
|
IN_PROGRESS: "#1d4ed8",
|
|
548
585
|
DONE: "#15803d",
|
|
549
586
|
CLOSED: "#6b7280"
|
|
550
587
|
};
|
|
551
|
-
function
|
|
552
|
-
return /* @__PURE__ */
|
|
588
|
+
function M() {
|
|
589
|
+
return /* @__PURE__ */ d("span", { style: { display: "inline-flex", alignItems: "center", gap: 4, background: "#fff7ed", border: "1px solid #fed7aa", borderRadius: 6, padding: "1px 6px", fontSize: 10, fontWeight: 700, color: "#ea580c" }, children: [
|
|
553
590
|
/* @__PURE__ */ e("span", { style: { width: 5, height: 5, borderRadius: "50%", background: "#ea580c", display: "inline-block" } }),
|
|
554
591
|
"Pending review"
|
|
555
592
|
] });
|
|
556
593
|
}
|
|
557
|
-
function
|
|
558
|
-
status:
|
|
559
|
-
boardStatus:
|
|
594
|
+
function A({
|
|
595
|
+
status: n,
|
|
596
|
+
boardStatus: o,
|
|
560
597
|
p: t
|
|
561
598
|
}) {
|
|
562
|
-
const
|
|
563
|
-
return /* @__PURE__ */
|
|
564
|
-
/* @__PURE__ */ e("span", { style: { width: 6, height: 6, borderRadius: "50%", background:
|
|
565
|
-
(
|
|
599
|
+
const f = (o == null ? void 0 : o.color) ?? ne[n] ?? "#9ca3af";
|
|
600
|
+
return /* @__PURE__ */ d("span", { style: { display: "inline-flex", alignItems: "center", gap: 5, background: t.bgSoft, border: `1px solid ${t.border}`, borderRadius: 6, padding: "2px 8px", fontSize: 10, fontWeight: 600, color: t.textSoft }, children: [
|
|
601
|
+
/* @__PURE__ */ e("span", { style: { width: 6, height: 6, borderRadius: "50%", background: f, display: "inline-block", flexShrink: 0 } }),
|
|
602
|
+
(o == null ? void 0 : o.name) ?? n.replace("_", " ")
|
|
566
603
|
] });
|
|
567
604
|
}
|
|
568
|
-
function
|
|
569
|
-
return /* @__PURE__ */ e("svg", { width:
|
|
605
|
+
function re({ size: n = 16, color: o = "currentColor" }) {
|
|
606
|
+
return /* @__PURE__ */ e("svg", { width: n, height: n, viewBox: "0 0 24 24", fill: "none", stroke: o, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }) });
|
|
570
607
|
}
|
|
571
|
-
function D({ color:
|
|
572
|
-
return /* @__PURE__ */ e("svg", { width:
|
|
608
|
+
function D({ color: n = "currentColor", size: o = 11 }) {
|
|
609
|
+
return /* @__PURE__ */ e("svg", { width: o, height: o, viewBox: "0 0 16 16", fill: "none", stroke: n, strokeWidth: 2.2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "M8 13V3M3 8l5-5 5 5" }) });
|
|
573
610
|
}
|
|
574
|
-
function
|
|
575
|
-
return new Date(
|
|
611
|
+
function P(n) {
|
|
612
|
+
return new Date(n).toLocaleDateString(void 0, { month: "short", day: "numeric" });
|
|
576
613
|
}
|
|
577
614
|
export {
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
615
|
+
ae as FeedbackWidget,
|
|
616
|
+
de as UpstepProvider,
|
|
617
|
+
I as useUpstep
|
|
581
618
|
};
|