@upstep/js 0.6.0 → 0.7.0

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/react.js CHANGED
@@ -1,10 +1,10 @@
1
- import { jsxs as s, Fragment as U, jsx as e } from "react/jsx-runtime";
2
- import { createContext as G, useState as f, useEffect as S, useCallback as F, useContext as O, useRef as j } from "react";
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 k, useCallback as F, useContext as O, useRef as j } from "react";
3
3
  import { U as V } from "./api-C1UV7Szw.mjs";
4
- const _ = "#D97757", Y = {
4
+ const _ = "#5B7168", Y = {
5
5
  bg: "#ffffff",
6
- bgSoft: "#f6f5f2",
7
- bgHover: "#efede8",
6
+ bgSoft: "#f4f6f4",
7
+ bgHover: "#eaf0eb",
8
8
  text: "#1a1915",
9
9
  textSoft: "#56544d",
10
10
  textFaint: "#9b9890",
@@ -12,32 +12,32 @@ const _ = "#D97757", Y = {
12
12
  overlay: "rgba(26,25,21,.45)"
13
13
  }, q = {
14
14
  bg: "#000000",
15
- bgSoft: "#262522",
16
- bgHover: "#302e2a",
15
+ bgSoft: "#191d1b",
16
+ bgHover: "#252d28",
17
17
  text: "#f5f4f0",
18
18
  textSoft: "#b4b1a8",
19
19
  textFaint: "#7d7a72",
20
20
  border: "#33312c",
21
21
  overlay: "rgba(0,0,0,.6)"
22
22
  };
23
- function T() {
23
+ function E() {
24
24
  if (typeof document > "u") return !1;
25
25
  const o = document.documentElement;
26
26
  return o.classList.contains("dark") || o.getAttribute("data-theme") === "dark";
27
27
  }
28
28
  function K(o) {
29
- const [n, t] = f(() => o === "dark");
30
- return S(() => {
29
+ const [n, t] = h(() => o === "dark");
30
+ return k(() => {
31
31
  if (o !== "auto") {
32
32
  t(o === "dark");
33
33
  return;
34
34
  }
35
- if (t(T()), typeof MutationObserver > "u") return;
36
- const u = new MutationObserver(() => t(T()));
37
- return u.observe(document.documentElement, {
35
+ if (t(E()), typeof MutationObserver > "u") return;
36
+ const g = new MutationObserver(() => t(E()));
37
+ return g.observe(document.documentElement, {
38
38
  attributes: !0,
39
39
  attributeFilter: ["class", "data-theme"]
40
- }), () => u.disconnect();
40
+ }), () => g.disconnect();
41
41
  }, [o]), n ? q : Y;
42
42
  }
43
43
  const R = G(null);
@@ -45,51 +45,68 @@ function de({
45
45
  children: o,
46
46
  ...n
47
47
  }) {
48
- const [t] = f(() => new V(n)), [u, h] = f([]), [i, r] = f(!1), [l, y] = f(!0);
49
- S(() => {
48
+ const [t] = h(() => new V(n)), [g, a] = h([]), [i, r] = h(!1), [l, x] = h(!0);
49
+ k(() => {
50
50
  t.setUserId(n.userId);
51
- }, [t, n.userId]), S(() => {
52
- t.supportIdentityToken = n.supportIdentityToken, document.querySelectorAll("iframe[data-upstep-support]").forEach((c) => {
53
- var x;
54
- return (x = c.contentWindow) == null ? void 0 : x.postMessage({ type: "upstep:support:identity", token: n.supportIdentityToken }, new URL(t.baseUrl).origin);
55
- });
51
+ }, [t, n.userId]), k(() => {
52
+ t.supportIdentityToken = n.supportIdentityToken, document.querySelectorAll("iframe[data-upstep-support]").forEach(
53
+ (p) => {
54
+ var y;
55
+ return (y = p.contentWindow) == null ? void 0 : y.postMessage(
56
+ {
57
+ type: "upstep:support:identity",
58
+ token: n.supportIdentityToken
59
+ },
60
+ new URL(t.baseUrl).origin
61
+ );
62
+ }
63
+ );
56
64
  }, [t, n.supportIdentityToken]);
57
- const a = F(async () => {
65
+ const c = F(async () => {
58
66
  try {
59
- const c = await t.listFeedback({ sort: "votes", limit: 20 });
60
- h(c.items), y(c.showBranding ?? !0);
67
+ const p = await t.listFeedback({ sort: "votes", limit: 20 });
68
+ a(p.items), x(p.showBranding ?? !0);
61
69
  } catch {
62
70
  }
63
71
  }, [t]);
64
- S(() => {
65
- a();
66
- }, [a]);
67
- const v = F(async (c, x, k) => {
68
- const p = { content: x };
69
- c.trim() && (p.title = c.trim()), k !== void 0 && (p.type = k), await t.submitFeedback(p), await a();
70
- }, [t, a]), m = F(async (c, x) => {
71
- try {
72
- await t.vote(c, x), await a();
73
- } catch {
74
- }
75
- }, [t, a]), d = F(
76
- (c) => t.getItem(c),
72
+ k(() => {
73
+ c();
74
+ }, [c]);
75
+ const w = F(
76
+ async (p, y, v) => {
77
+ const u = { content: y };
78
+ p.trim() && (u.title = p.trim()), v !== void 0 && (u.type = v), await t.submitFeedback(u), await c();
79
+ },
80
+ [t, c]
81
+ ), m = F(
82
+ async (p, y) => {
83
+ try {
84
+ await t.vote(p, y), await c();
85
+ } catch {
86
+ }
87
+ },
88
+ [t, c]
89
+ ), s = F(
90
+ (p) => t.getItem(p),
91
+ [t]
92
+ ), b = F(() => r(!0), []), S = F(() => r(!1), []), C = F(
93
+ (p) => t.setUserId(p),
77
94
  [t]
78
- ), b = F(() => r(!0), []), z = F(() => r(!1), []), w = F((c) => t.setUserId(c), [t]);
95
+ );
79
96
  return /* @__PURE__ */ e(
80
97
  R.Provider,
81
98
  {
82
99
  value: {
83
100
  client: t,
84
- feedItems: u,
85
- loadFeed: a,
86
- submit: v,
101
+ feedItems: g,
102
+ loadFeed: c,
103
+ submit: w,
87
104
  vote: m,
88
- getItem: d,
105
+ getItem: s,
89
106
  isOpen: i,
90
107
  open: b,
91
- close: z,
92
- identify: w,
108
+ close: S,
109
+ identify: C,
93
110
  accentColor: n.accentColor ?? _,
94
111
  theme: n.theme ?? "auto",
95
112
  showBranding: l,
@@ -99,7 +116,7 @@ function de({
99
116
  }
100
117
  );
101
118
  }
102
- function B() {
119
+ function I() {
103
120
  const o = O(R);
104
121
  if (!o) throw new Error("useUpstep must be used inside <UpstepProvider>");
105
122
  return o;
@@ -108,45 +125,55 @@ function ae({
108
125
  position: o = "bottom-right",
109
126
  accentColor: n,
110
127
  theme: t,
111
- hideLauncher: u = !1,
112
- chat: h = !0
128
+ hideLauncher: g = !1,
129
+ chat: a = !0
113
130
  }) {
114
- const i = B(), r = n ?? i.accentColor, l = K(t ?? i.theme), { isOpen: y, open: a, close: v, showBranding: m } = i, [d, b] = f("list"), [z, w] = f(!1);
115
- S(() => {
116
- let g = !0;
117
- if (i.client.chat = i.chat, !i.chat || !h) {
118
- w(!1);
131
+ const i = I(), r = n ?? i.accentColor, l = K(t ?? i.theme), {
132
+ isOpen: x,
133
+ open: c,
134
+ close: w,
135
+ showBranding: m
136
+ } = i, [s, b] = h("list"), [S, C] = h(!1);
137
+ k(() => {
138
+ let f = !0;
139
+ if (i.client.chat = i.chat, !i.chat || !a) {
140
+ C(!1);
119
141
  return;
120
142
  }
121
- return i.client.supportEnabled().then((C) => {
122
- g && w(C);
143
+ return i.client.supportEnabled().then((z) => {
144
+ f && C(z);
123
145
  }), () => {
124
- g = !1;
146
+ f = !1;
125
147
  };
126
- }, [i.client, i.chat, h]), S(() => {
127
- (!i.chat || !h) && d === "support" && b("list");
128
- }, [i.chat, h, d]);
129
- const [c, x] = f(null), [k, p] = f(!1);
130
- S(() => {
131
- const g = window.matchMedia("(max-width: 639px)");
132
- p(g.matches);
133
- const C = ($) => p($.matches);
134
- return g.addEventListener("change", C), () => g.removeEventListener("change", C);
148
+ }, [i.client, i.chat, a]), k(() => {
149
+ (!i.chat || !a) && s === "support" && b("list");
150
+ }, [i.chat, a, s]), k(() => {
151
+ x && b(S && a && i.chat ? "support" : "list");
152
+ }, [x, S, a, i.chat]);
153
+ const [p, y] = h(null), [v, u] = h(!1);
154
+ k(() => {
155
+ const f = window.matchMedia("(max-width: 639px)");
156
+ u(f.matches);
157
+ const z = ($) => u($.matches);
158
+ return f.addEventListener("change", z), () => f.removeEventListener("change", z);
135
159
  }, []);
136
- const H = o === "bottom-left" ? { position: "fixed", bottom: 24, left: 24 } : { position: "fixed", bottom: 24, right: 24 }, I = '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif';
160
+ const H = {
161
+ position: "fixed",
162
+ bottom: 24,
163
+ right: 24
164
+ }, B = '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif';
137
165
  function W() {
138
- v(), setTimeout(() => {
139
- b("list"), x(null);
140
- }, 300);
166
+ w(), y(null);
141
167
  }
142
- function N(g) {
143
- x(g), b("detail");
168
+ function N(f) {
169
+ y(f), b("detail");
144
170
  }
145
- return /* @__PURE__ */ s(U, { children: [
146
- !u && /* @__PURE__ */ s(
171
+ return /* @__PURE__ */ d(T, { children: [
172
+ !g && /* @__PURE__ */ d(
147
173
  "button",
148
174
  {
149
- onClick: a,
175
+ "aria-label": "Open help and feedback",
176
+ onClick: c,
150
177
  style: {
151
178
  ...H,
152
179
  zIndex: 9998,
@@ -157,36 +184,35 @@ function ae({
157
184
  color: "#fff",
158
185
  border: "none",
159
186
  borderRadius: 9999,
160
- padding: k ? "12px" : "12px 18px",
187
+ padding: v ? "12px" : "12px 18px",
161
188
  fontSize: 14,
162
189
  fontWeight: 600,
163
190
  cursor: "pointer",
164
- fontFamily: I,
191
+ fontFamily: B,
165
192
  boxShadow: "0 6px 20px rgba(26,25,21,.18)"
166
193
  },
167
194
  children: [
168
195
  /* @__PURE__ */ e(re, { size: 16 }),
169
- !k && "Feedback"
196
+ !v && (S && a && i.chat ? "Help & feedback" : "Feedback")
170
197
  ]
171
198
  }
172
199
  ),
173
- y && /* @__PURE__ */ e(
200
+ x && /* @__PURE__ */ e(
174
201
  "div",
175
202
  {
176
- onClick: (g) => g.target === g.currentTarget && W(),
203
+ onClick: (f) => f.target === f.currentTarget && W(),
177
204
  style: {
178
205
  position: "fixed",
179
206
  inset: 0,
180
- background: l.overlay,
181
- backdropFilter: "blur(3px)",
207
+ background: "transparent",
182
208
  zIndex: 9999,
183
209
  display: "flex",
184
- alignItems: "center",
185
- justifyContent: "center",
186
- padding: 16,
187
- fontFamily: I
210
+ alignItems: "flex-end",
211
+ justifyContent: "flex-end",
212
+ padding: v ? "0 12px 80px" : "0 24px 88px",
213
+ fontFamily: B
188
214
  },
189
- children: /* @__PURE__ */ s(
215
+ children: /* @__PURE__ */ d(
190
216
  "div",
191
217
  {
192
218
  style: {
@@ -194,69 +220,251 @@ function ae({
194
220
  border: `1px solid ${l.border}`,
195
221
  borderRadius: 20,
196
222
  width: "100%",
197
- maxWidth: 440,
198
- maxHeight: "88vh",
223
+ maxWidth: S && a && i.chat ? 460 : 440,
224
+ maxHeight: "calc(100dvh - 112px)",
199
225
  display: "flex",
200
226
  flexDirection: "column",
201
227
  overflow: "hidden",
202
228
  boxShadow: "0 24px 64px rgba(0,0,0,.28)"
203
229
  },
204
230
  children: [
205
- /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", padding: "16px 20px", borderBottom: `1px solid ${l.border}`, flexShrink: 0 }, children: [
206
- /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
207
- d !== "list" && /* @__PURE__ */ e(
208
- "button",
209
- {
210
- onClick: () => b("list"),
211
- style: { background: "none", border: "none", cursor: "pointer", color: r, fontSize: 13, fontWeight: 600, padding: 0 },
212
- children: "← Back"
213
- }
214
- ),
215
- d === "list" && /* @__PURE__ */ e("span", { style: { fontWeight: 700, fontSize: 16, color: l.text, letterSpacing: "-.01em" }, children: "Feedback" }),
216
- d === "create" && /* @__PURE__ */ e("span", { style: { fontWeight: 700, fontSize: 16, color: l.text, letterSpacing: "-.01em" }, children: "New feedback" })
217
- ] }),
218
- /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
219
- d === "list" && /* @__PURE__ */ e(
220
- "button",
221
- {
222
- onClick: () => b("create"),
223
- style: { background: r, color: "#fff", border: "none", borderRadius: 20, padding: "6px 14px", fontSize: 13, fontWeight: 700, cursor: "pointer" },
224
- children: "+ New"
225
- }
226
- ),
227
- /* @__PURE__ */ e(
228
- "button",
229
- {
230
- onClick: W,
231
- 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" },
232
- children: "✕"
233
- }
234
- )
235
- ] })
236
- ] }),
237
- z && h && i.chat && /* @__PURE__ */ e("div", { style: { display: "flex", gap: 4, padding: "12px 20px 0" }, children: [["list", "Feedback"], ["support", "Support"]].map(([g, C]) => /* @__PURE__ */ e("button", { onClick: () => b(g), style: { flex: 1, padding: 8, border: `1px solid ${l.border}`, borderRadius: 9, background: d === g ? l.bgSoft : l.bg, color: l.text, cursor: "pointer", fontSize: 12 }, children: C }, g)) }),
238
- /* @__PURE__ */ s("div", { style: { flex: 1, overflowY: "auto", padding: "16px 20px 24px" }, children: [
239
- d === "support" && h && i.chat && /* @__PURE__ */ e(J, { client: i.client, theme: l.bg === "#000000" ? "dark" : "light" }),
240
- d === "list" && /* @__PURE__ */ e(
241
- Q,
242
- {
243
- onSelect: N,
244
- accent: r,
245
- p: l
246
- }
247
- ),
248
- d === "detail" && c && /* @__PURE__ */ e(X, { feedbackId: c, accent: r, p: l, font: I }),
249
- d === "create" && /* @__PURE__ */ e(
250
- ee,
251
- {
252
- accent: r,
253
- p: l,
254
- font: I,
255
- onDone: () => b("list")
256
- }
257
- )
258
- ] }),
259
- m && /* @__PURE__ */ s(
231
+ S && a && i.chat ? /* @__PURE__ */ d(
232
+ "div",
233
+ {
234
+ style: {
235
+ display: "flex",
236
+ alignItems: "center",
237
+ gap: 14,
238
+ padding: "10px 14px",
239
+ borderBottom: `1px solid ${l.border}`,
240
+ flexShrink: 0
241
+ },
242
+ children: [
243
+ /* @__PURE__ */ e("div", { style: { display: "flex", flex: 1, gap: 4 }, children: [
244
+ ["support", "Support"],
245
+ ["list", "Feedback"]
246
+ ].map(([f, z]) => /* @__PURE__ */ e(
247
+ "button",
248
+ {
249
+ onClick: () => b(f),
250
+ style: {
251
+ flex: 1,
252
+ border: 0,
253
+ borderRadius: 8,
254
+ padding: "9px 12px",
255
+ background: (s === "support" ? f === "support" : f === "list") ? l.bgSoft : "transparent",
256
+ color: (s === "support" ? f === "support" : f === "list") ? l.text : l.textSoft,
257
+ fontSize: 14,
258
+ fontWeight: 600,
259
+ cursor: "pointer"
260
+ },
261
+ children: z
262
+ },
263
+ f
264
+ )) }),
265
+ /* @__PURE__ */ e(
266
+ "button",
267
+ {
268
+ "aria-label": "Close",
269
+ onClick: W,
270
+ style: {
271
+ border: 0,
272
+ background: "transparent",
273
+ color: l.textSoft,
274
+ padding: 6,
275
+ cursor: "pointer",
276
+ fontSize: 14
277
+ },
278
+ children: "✕"
279
+ }
280
+ )
281
+ ]
282
+ }
283
+ ) : /* @__PURE__ */ d(
284
+ "div",
285
+ {
286
+ style: {
287
+ display: "flex",
288
+ alignItems: "center",
289
+ justifyContent: "space-between",
290
+ padding: "16px 20px",
291
+ borderBottom: `1px solid ${l.border}`,
292
+ flexShrink: 0
293
+ },
294
+ children: [
295
+ /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
296
+ s !== "list" && /* @__PURE__ */ e(
297
+ "button",
298
+ {
299
+ onClick: () => b("list"),
300
+ style: {
301
+ background: "none",
302
+ border: "none",
303
+ cursor: "pointer",
304
+ color: r,
305
+ fontSize: 14,
306
+ fontWeight: 600,
307
+ padding: 0
308
+ },
309
+ children: "← Back"
310
+ }
311
+ ),
312
+ s === "list" && /* @__PURE__ */ e(
313
+ "span",
314
+ {
315
+ style: {
316
+ fontWeight: 700,
317
+ fontSize: 16,
318
+ color: l.text,
319
+ letterSpacing: "-.01em"
320
+ },
321
+ children: "Feedback"
322
+ }
323
+ ),
324
+ s === "create" && /* @__PURE__ */ e(
325
+ "span",
326
+ {
327
+ style: {
328
+ fontWeight: 700,
329
+ fontSize: 16,
330
+ color: l.text,
331
+ letterSpacing: "-.01em"
332
+ },
333
+ children: "New feedback"
334
+ }
335
+ )
336
+ ] }),
337
+ /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
338
+ s === "list" && /* @__PURE__ */ e(
339
+ "button",
340
+ {
341
+ onClick: () => b("create"),
342
+ style: {
343
+ background: r,
344
+ color: "#fff",
345
+ border: "none",
346
+ borderRadius: 20,
347
+ padding: "6px 14px",
348
+ fontSize: 14,
349
+ fontWeight: 700,
350
+ cursor: "pointer"
351
+ },
352
+ children: "+ New"
353
+ }
354
+ ),
355
+ /* @__PURE__ */ e(
356
+ "button",
357
+ {
358
+ onClick: W,
359
+ style: {
360
+ background: l.bgSoft,
361
+ border: "none",
362
+ width: 28,
363
+ height: 28,
364
+ borderRadius: 8,
365
+ fontSize: 14,
366
+ cursor: "pointer",
367
+ color: l.textSoft,
368
+ display: "flex",
369
+ alignItems: "center",
370
+ justifyContent: "center"
371
+ },
372
+ children: "✕"
373
+ }
374
+ )
375
+ ] })
376
+ ]
377
+ }
378
+ ),
379
+ /* @__PURE__ */ d(
380
+ "div",
381
+ {
382
+ style: {
383
+ flex: 1,
384
+ overflowY: "auto",
385
+ padding: s === "support" ? 0 : "16px 20px 24px"
386
+ },
387
+ children: [
388
+ s === "support" && a && i.chat && /* @__PURE__ */ e(
389
+ J,
390
+ {
391
+ client: i.client,
392
+ theme: l.bg === "#000000" ? "dark" : "light"
393
+ }
394
+ ),
395
+ S && a && i.chat && s !== "support" && /* @__PURE__ */ e(
396
+ "div",
397
+ {
398
+ style: {
399
+ display: "flex",
400
+ alignItems: "center",
401
+ justifyContent: "space-between",
402
+ marginBottom: 16
403
+ },
404
+ children: s === "list" ? /* @__PURE__ */ d(T, { children: [
405
+ /* @__PURE__ */ e(
406
+ "span",
407
+ {
408
+ style: { fontSize: 14, fontWeight: 600, color: l.text },
409
+ children: "Feedback & ideas"
410
+ }
411
+ ),
412
+ /* @__PURE__ */ e(
413
+ "button",
414
+ {
415
+ onClick: () => b("create"),
416
+ style: {
417
+ border: 0,
418
+ borderRadius: 8,
419
+ background: r,
420
+ color: "white",
421
+ fontSize: 14,
422
+ padding: "7px 10px",
423
+ cursor: "pointer"
424
+ },
425
+ children: "+ New"
426
+ }
427
+ )
428
+ ] }) : /* @__PURE__ */ e(
429
+ "button",
430
+ {
431
+ onClick: () => b("list"),
432
+ style: {
433
+ border: 0,
434
+ background: "none",
435
+ padding: 0,
436
+ color: l.textSoft,
437
+ fontSize: 14,
438
+ cursor: "pointer"
439
+ },
440
+ children: "← Back to feedback"
441
+ }
442
+ )
443
+ }
444
+ ),
445
+ s === "list" && /* @__PURE__ */ e(Q, { onSelect: N, accent: r, p: l }),
446
+ s === "detail" && p && /* @__PURE__ */ e(
447
+ X,
448
+ {
449
+ feedbackId: p,
450
+ accent: r,
451
+ p: l,
452
+ font: B
453
+ }
454
+ ),
455
+ s === "create" && /* @__PURE__ */ e(
456
+ ee,
457
+ {
458
+ accent: r,
459
+ p: l,
460
+ font: B,
461
+ onDone: () => b("list")
462
+ }
463
+ )
464
+ ]
465
+ }
466
+ ),
467
+ m && s !== "support" && /* @__PURE__ */ d(
260
468
  "a",
261
469
  {
262
470
  href: "https://upstep.dev",
@@ -273,7 +481,8 @@ function ae({
273
481
  flexShrink: 0
274
482
  },
275
483
  children: [
276
- "Powered by ",
484
+ "Powered by",
485
+ " ",
277
486
  /* @__PURE__ */ e("strong", { style: { fontWeight: 700 }, children: "Upstep.dev" })
278
487
  ]
279
488
  }
@@ -285,21 +494,39 @@ function ae({
285
494
  )
286
495
  ] });
287
496
  }
288
- function J({ client: o, theme: n }) {
497
+ function J({
498
+ client: o,
499
+ theme: n
500
+ }) {
289
501
  const t = j(null);
290
- return S(() => {
502
+ return k(() => {
291
503
  if (t.current) return o.connectSupportFrame(t.current);
292
- }, [o]), /* @__PURE__ */ e("iframe", { ref: t, "data-upstep-support": !0, title: "Customer support", src: o.supportFrameUrl(n), style: { width: "100%", height: 480, border: 0, display: "block", borderRadius: 12 } });
504
+ }, [o]), /* @__PURE__ */ e(
505
+ "iframe",
506
+ {
507
+ ref: t,
508
+ "data-upstep-support": !0,
509
+ title: "Customer support",
510
+ src: o.supportFrameUrl(n),
511
+ style: {
512
+ width: "100%",
513
+ height: "min(560px, calc(100dvh - 168px))",
514
+ minHeight: 300,
515
+ border: 0,
516
+ display: "block"
517
+ }
518
+ }
519
+ );
293
520
  }
294
521
  function Q({
295
522
  onSelect: o,
296
523
  accent: n,
297
524
  p: t
298
525
  }) {
299
- const { feedItems: u, vote: h } = B(), i = u.filter((r) => r.status !== "CLOSED");
300
- return i.length ? /* @__PURE__ */ e(U, { children: i.map((r) => {
301
- const l = r.userVote === "UP", y = r.title ?? r.content;
302
- return /* @__PURE__ */ s(
526
+ const { feedItems: g, vote: a } = I(), i = g.filter((r) => r.status !== "CLOSED");
527
+ return i.length ? /* @__PURE__ */ e(T, { children: i.map((r) => {
528
+ const l = r.userVote === "UP", x = r.title ?? r.content;
529
+ return /* @__PURE__ */ d(
303
530
  "div",
304
531
  {
305
532
  onClick: () => o(r.id),
@@ -314,11 +541,11 @@ function Q({
314
541
  cursor: "pointer"
315
542
  },
316
543
  children: [
317
- /* @__PURE__ */ s(
544
+ /* @__PURE__ */ d(
318
545
  "button",
319
546
  {
320
- onClick: (a) => {
321
- a.stopPropagation(), h(r.id, "UP");
547
+ onClick: (c) => {
548
+ c.stopPropagation(), a(r.id, "UP");
322
549
  },
323
550
  style: {
324
551
  display: "flex",
@@ -336,67 +563,187 @@ function Q({
336
563
  },
337
564
  children: [
338
565
  /* @__PURE__ */ e(D, { color: n }),
339
- /* @__PURE__ */ e("span", { style: { fontSize: 14, fontWeight: 700, color: t.text, lineHeight: 1.1 }, children: r.upvotes })
566
+ /* @__PURE__ */ e(
567
+ "span",
568
+ {
569
+ style: {
570
+ fontSize: 14,
571
+ fontWeight: 700,
572
+ color: t.text,
573
+ lineHeight: 1.1
574
+ },
575
+ children: r.upvotes
576
+ }
577
+ )
340
578
  ]
341
579
  }
342
580
  ),
343
- /* @__PURE__ */ s("div", { style: { flex: 1, minWidth: 0 }, children: [
344
- /* @__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 }),
345
- /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", gap: 6, flexWrap: "wrap" }, children: [
346
- /* @__PURE__ */ e(L, { type: r.type, p: t }),
347
- r.status === "PENDING" ? /* @__PURE__ */ e(M, {}) : /* @__PURE__ */ e(A, { status: r.status, boardStatus: r.boardStatus, p: t }),
348
- /* @__PURE__ */ e("span", { style: { fontSize: 11, color: t.textFaint }, children: P(r.createdAt) })
349
- ] })
581
+ /* @__PURE__ */ d("div", { style: { flex: 1, minWidth: 0 }, children: [
582
+ /* @__PURE__ */ e(
583
+ "p",
584
+ {
585
+ style: {
586
+ fontSize: 14,
587
+ fontWeight: 600,
588
+ lineHeight: 1.4,
589
+ color: t.text,
590
+ margin: "0 0 6px",
591
+ overflow: "hidden",
592
+ display: "-webkit-box",
593
+ WebkitLineClamp: 2,
594
+ WebkitBoxOrient: "vertical"
595
+ },
596
+ children: x
597
+ }
598
+ ),
599
+ /* @__PURE__ */ d(
600
+ "div",
601
+ {
602
+ style: {
603
+ display: "flex",
604
+ alignItems: "center",
605
+ gap: 6,
606
+ flexWrap: "wrap"
607
+ },
608
+ children: [
609
+ /* @__PURE__ */ e(L, { type: r.type, p: t }),
610
+ r.status === "PENDING" ? /* @__PURE__ */ e(M, {}) : /* @__PURE__ */ e(
611
+ A,
612
+ {
613
+ status: r.status,
614
+ boardStatus: r.boardStatus,
615
+ p: t
616
+ }
617
+ ),
618
+ /* @__PURE__ */ e("span", { style: { fontSize: 11, color: t.textFaint }, children: P(r.createdAt) })
619
+ ]
620
+ }
621
+ )
350
622
  ] }),
351
- /* @__PURE__ */ e("span", { style: { color: t.textFaint, fontSize: 18, alignSelf: "center", flexShrink: 0 }, children: "›" })
623
+ /* @__PURE__ */ e(
624
+ "span",
625
+ {
626
+ style: {
627
+ color: t.textFaint,
628
+ fontSize: 18,
629
+ alignSelf: "center",
630
+ flexShrink: 0
631
+ },
632
+ children: "›"
633
+ }
634
+ )
352
635
  ]
353
636
  },
354
637
  r.id
355
638
  );
356
- }) }) : /* @__PURE__ */ s("div", { style: { textAlign: "center", padding: "40px 0" }, children: [
357
- /* @__PURE__ */ e("div", { style: { color: t.textSoft, fontSize: 15, fontWeight: 600, marginBottom: 4 }, children: "No open feedback yet" }),
639
+ }) }) : /* @__PURE__ */ d("div", { style: { textAlign: "center", padding: "40px 0" }, children: [
640
+ /* @__PURE__ */ e(
641
+ "div",
642
+ {
643
+ style: {
644
+ color: t.textSoft,
645
+ fontSize: 15,
646
+ fontWeight: 600,
647
+ marginBottom: 4
648
+ },
649
+ children: "No open feedback yet"
650
+ }
651
+ ),
358
652
  /* @__PURE__ */ e("div", { style: { color: t.textFaint, fontSize: 14 }, children: "Be the first to share one." })
359
653
  ] });
360
654
  }
361
- function X({ feedbackId: o, accent: n, p: t, font: u }) {
362
- const { vote: h, getItem: i } = B(), [r, l] = f(null), [y, a] = f(!1);
363
- S(() => {
364
- let d = !1;
655
+ function X({
656
+ feedbackId: o,
657
+ accent: n,
658
+ p: t,
659
+ font: g
660
+ }) {
661
+ const { vote: a, getItem: i } = I(), [r, l] = h(null), [x, c] = h(!1);
662
+ k(() => {
663
+ let s = !1;
365
664
  return i(o).then((b) => {
366
- d || l(b);
665
+ s || l(b);
367
666
  }).catch(() => {
368
667
  }), () => {
369
- d = !0;
668
+ s = !0;
370
669
  };
371
670
  }, [o, i]);
372
- async function v() {
373
- if (!(!r || y)) {
374
- a(!0);
671
+ async function w() {
672
+ if (!(!r || x)) {
673
+ c(!0);
375
674
  try {
376
- await h(r.id, "UP");
377
- const d = await i(o);
378
- l(d);
675
+ await a(r.id, "UP");
676
+ const s = await i(o);
677
+ l(s);
379
678
  } catch {
380
679
  } finally {
381
- a(!1);
680
+ c(!1);
382
681
  }
383
682
  }
384
683
  }
385
684
  if (!r)
386
- return /* @__PURE__ */ e("div", { style: { textAlign: "center", padding: "40px 0", color: t.textFaint, fontSize: 14 }, children: "Loading…" });
685
+ return /* @__PURE__ */ e(
686
+ "div",
687
+ {
688
+ style: {
689
+ textAlign: "center",
690
+ padding: "40px 0",
691
+ color: t.textFaint,
692
+ fontSize: 14
693
+ },
694
+ children: "Loading…"
695
+ }
696
+ );
387
697
  const m = r.title;
388
- return /* @__PURE__ */ s("div", { children: [
389
- m && /* @__PURE__ */ e("div", { style: { fontSize: 20, fontWeight: 700, color: t.text, letterSpacing: "-.02em", marginBottom: 10, lineHeight: 1.3 }, children: m }),
390
- /* @__PURE__ */ s("div", { style: { display: "flex", gap: 6, marginBottom: 14, flexWrap: "wrap" }, children: [
391
- /* @__PURE__ */ e(L, { type: r.type, p: t }),
392
- r.status === "PENDING" ? /* @__PURE__ */ e(M, {}) : /* @__PURE__ */ e(A, { status: r.status, boardStatus: r.boardStatus, p: t })
393
- ] }),
394
- /* @__PURE__ */ e("p", { style: { fontSize: 15, lineHeight: 1.6, color: t.textSoft, marginBottom: 20 }, children: r.content }),
395
- /* @__PURE__ */ s(
698
+ return /* @__PURE__ */ d("div", { children: [
699
+ m && /* @__PURE__ */ e(
700
+ "div",
701
+ {
702
+ style: {
703
+ fontSize: 20,
704
+ fontWeight: 700,
705
+ color: t.text,
706
+ letterSpacing: "-.02em",
707
+ marginBottom: 10,
708
+ lineHeight: 1.3
709
+ },
710
+ children: m
711
+ }
712
+ ),
713
+ /* @__PURE__ */ d(
714
+ "div",
715
+ {
716
+ style: { display: "flex", gap: 6, marginBottom: 14, flexWrap: "wrap" },
717
+ children: [
718
+ /* @__PURE__ */ e(L, { type: r.type, p: t }),
719
+ r.status === "PENDING" ? /* @__PURE__ */ e(M, {}) : /* @__PURE__ */ e(
720
+ A,
721
+ {
722
+ status: r.status,
723
+ boardStatus: r.boardStatus,
724
+ p: t
725
+ }
726
+ )
727
+ ]
728
+ }
729
+ ),
730
+ /* @__PURE__ */ e(
731
+ "p",
732
+ {
733
+ style: {
734
+ fontSize: 15,
735
+ lineHeight: 1.6,
736
+ color: t.textSoft,
737
+ marginBottom: 20
738
+ },
739
+ children: r.content
740
+ }
741
+ ),
742
+ /* @__PURE__ */ d(
396
743
  "button",
397
744
  {
398
- onClick: v,
399
- disabled: y,
745
+ onClick: w,
746
+ disabled: x,
400
747
  style: {
401
748
  display: "inline-flex",
402
749
  alignItems: "center",
@@ -406,69 +753,167 @@ function X({ feedbackId: o, accent: n, p: t, font: u }) {
406
753
  borderRadius: 12,
407
754
  padding: "10px 16px",
408
755
  cursor: "pointer",
409
- fontFamily: u
756
+ fontFamily: g
410
757
  },
411
758
  children: [
412
759
  /* @__PURE__ */ e(D, { color: n, size: 13 }),
413
760
  /* @__PURE__ */ e("span", { style: { fontSize: 18, fontWeight: 700, color: t.text }, children: r.upvotes }),
414
- /* @__PURE__ */ e("span", { style: { fontSize: 13, color: t.textFaint }, children: r.userVote === "UP" ? "Upvoted" : "Upvote" })
761
+ /* @__PURE__ */ e("span", { style: { fontSize: 14, color: t.textFaint }, children: r.userVote === "UP" ? "Upvoted" : "Upvote" })
415
762
  ]
416
763
  }
417
764
  ),
418
- r.comments.length > 0 && /* @__PURE__ */ s("div", { style: { marginTop: 28, borderTop: `1px solid ${t.border}`, paddingTop: 20 }, children: [
419
- /* @__PURE__ */ e("div", { style: { fontSize: 10, fontWeight: 700, letterSpacing: ".08em", color: t.textFaint, marginBottom: 12, textTransform: "uppercase" }, children: "Comments" }),
420
- r.comments.map((d) => /* @__PURE__ */ e(Z, { comment: d, p: t, accent: n }, d.id))
421
- ] })
765
+ r.comments.length > 0 && /* @__PURE__ */ d(
766
+ "div",
767
+ {
768
+ style: {
769
+ marginTop: 28,
770
+ borderTop: `1px solid ${t.border}`,
771
+ paddingTop: 20
772
+ },
773
+ children: [
774
+ /* @__PURE__ */ e(
775
+ "div",
776
+ {
777
+ style: {
778
+ fontSize: 10,
779
+ fontWeight: 700,
780
+ letterSpacing: ".08em",
781
+ color: t.textFaint,
782
+ marginBottom: 12,
783
+ textTransform: "uppercase"
784
+ },
785
+ children: "Comments"
786
+ }
787
+ ),
788
+ r.comments.map((s) => /* @__PURE__ */ e(Z, { comment: s, p: t, accent: n }, s.id))
789
+ ]
790
+ }
791
+ )
422
792
  ] });
423
793
  }
424
- function Z({ comment: o, p: n, accent: t }) {
425
- var u;
426
- return /* @__PURE__ */ s("div", { style: { background: n.bgSoft, border: `1px solid ${n.border}`, borderRadius: 12, padding: 14, marginBottom: 10 }, children: [
427
- /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 8 }, children: [
428
- /* @__PURE__ */ e("span", { style: { background: `${t}20`, color: t, fontSize: 11, fontWeight: 700, borderRadius: 20, padding: "2px 8px" }, children: ((u = o.authorName) == null ? void 0 : u.trim()) || "UpStep Team" }),
429
- /* @__PURE__ */ e("span", { style: { fontSize: 11, color: n.textFaint }, children: P(o.createdAt) })
430
- ] }),
431
- /* @__PURE__ */ e("p", { style: { fontSize: 14, lineHeight: 1.5, color: n.textSoft, margin: 0 }, children: o.content })
432
- ] });
794
+ function Z({
795
+ comment: o,
796
+ p: n,
797
+ accent: t
798
+ }) {
799
+ var g;
800
+ return /* @__PURE__ */ d(
801
+ "div",
802
+ {
803
+ style: {
804
+ background: n.bgSoft,
805
+ border: `1px solid ${n.border}`,
806
+ borderRadius: 12,
807
+ padding: 14,
808
+ marginBottom: 10
809
+ },
810
+ children: [
811
+ /* @__PURE__ */ d(
812
+ "div",
813
+ {
814
+ style: {
815
+ display: "flex",
816
+ alignItems: "center",
817
+ gap: 8,
818
+ marginBottom: 8
819
+ },
820
+ children: [
821
+ /* @__PURE__ */ e(
822
+ "span",
823
+ {
824
+ style: {
825
+ background: `${t}20`,
826
+ color: t,
827
+ fontSize: 11,
828
+ fontWeight: 700,
829
+ borderRadius: 20,
830
+ padding: "2px 8px"
831
+ },
832
+ children: ((g = o.authorName) == null ? void 0 : g.trim()) || "UpStep Team"
833
+ }
834
+ ),
835
+ /* @__PURE__ */ e("span", { style: { fontSize: 11, color: n.textFaint }, children: P(o.createdAt) })
836
+ ]
837
+ }
838
+ ),
839
+ /* @__PURE__ */ e(
840
+ "p",
841
+ {
842
+ style: { fontSize: 16, lineHeight: 1.6, color: n.textSoft, margin: 0 },
843
+ children: o.content
844
+ }
845
+ )
846
+ ]
847
+ }
848
+ );
433
849
  }
434
- function ee({ accent: o, p: n, font: t, onDone: u }) {
435
- const { submit: h } = B(), [i, r] = f(""), [l, y] = f(""), [a, v] = f("GENERAL"), [m, d] = f(!1), [b, z] = f(!1), [w, c] = f("");
436
- async function x() {
850
+ function ee({
851
+ accent: o,
852
+ p: n,
853
+ font: t,
854
+ onDone: g
855
+ }) {
856
+ const { submit: a } = I(), [i, r] = h(""), [l, x] = h(""), [c, w] = h("GENERAL"), [m, s] = h(!1), [b, S] = h(!1), [C, p] = h("");
857
+ async function y() {
437
858
  if (!(!i.trim() || m)) {
438
- d(!0), c("");
859
+ s(!0), p("");
439
860
  try {
440
- await h(i.trim(), l.trim() || i.trim(), a), z(!0), setTimeout(u, 1200);
861
+ await a(i.trim(), l.trim() || i.trim(), c), S(!0), setTimeout(g, 1200);
441
862
  } catch {
442
- c("Something went wrong. Please try again.");
863
+ p("Something went wrong. Please try again.");
443
864
  } finally {
444
- d(!1);
865
+ s(!1);
445
866
  }
446
867
  }
447
868
  }
448
869
  if (b)
449
- return /* @__PURE__ */ s("div", { style: { textAlign: "center", paddingTop: 40 }, children: [
450
- /* @__PURE__ */ e("div", { style: { fontSize: 18, fontWeight: 700, color: n.text, marginBottom: 6 }, children: "Submitted" }),
870
+ return /* @__PURE__ */ d("div", { style: { textAlign: "center", paddingTop: 40 }, children: [
871
+ /* @__PURE__ */ e(
872
+ "div",
873
+ {
874
+ style: {
875
+ fontSize: 18,
876
+ fontWeight: 700,
877
+ color: n.text,
878
+ marginBottom: 6
879
+ },
880
+ children: "Submitted"
881
+ }
882
+ ),
451
883
  /* @__PURE__ */ e("div", { style: { fontSize: 14, color: n.textFaint }, children: "Feedback received. Thank you." })
452
884
  ] });
453
- const k = {
885
+ const v = {
454
886
  width: "100%",
455
887
  border: `1px solid ${n.border}`,
456
888
  borderRadius: 12,
457
889
  padding: "10px 12px",
458
- fontSize: 14,
459
- lineHeight: 1.5,
890
+ fontSize: 16,
891
+ lineHeight: 1.6,
460
892
  outline: "none",
461
893
  background: n.bgSoft,
462
894
  color: n.text,
463
895
  fontFamily: t,
464
896
  boxSizing: "border-box"
465
897
  };
466
- return /* @__PURE__ */ s("div", { children: [
467
- /* @__PURE__ */ e("div", { style: { fontSize: 10, fontWeight: 700, letterSpacing: ".08em", color: n.textFaint, marginBottom: 8, textTransform: "uppercase" }, children: "Type" }),
468
- /* @__PURE__ */ e("div", { style: { display: "flex", gap: 7, marginBottom: 16 }, children: ["BUG", "FEATURE", "GENERAL"].map((p) => /* @__PURE__ */ s(
898
+ return /* @__PURE__ */ d("div", { children: [
899
+ /* @__PURE__ */ e(
900
+ "div",
901
+ {
902
+ style: {
903
+ fontSize: 10,
904
+ fontWeight: 700,
905
+ letterSpacing: ".08em",
906
+ color: n.textFaint,
907
+ marginBottom: 8,
908
+ textTransform: "uppercase"
909
+ },
910
+ children: "Type"
911
+ }
912
+ ),
913
+ /* @__PURE__ */ e("div", { style: { display: "flex", gap: 7, marginBottom: 16 }, children: ["BUG", "FEATURE", "GENERAL"].map((u) => /* @__PURE__ */ d(
469
914
  "button",
470
915
  {
471
- onClick: () => v(p),
916
+ onClick: () => w(u),
472
917
  style: {
473
918
  flex: 1,
474
919
  display: "flex",
@@ -477,52 +922,85 @@ function ee({ accent: o, p: n, font: t, onDone: u }) {
477
922
  gap: 5,
478
923
  padding: "8px 10px",
479
924
  borderRadius: 9,
480
- fontSize: 12.5,
925
+ fontSize: 14,
481
926
  fontWeight: 600,
482
927
  cursor: "pointer",
483
- background: a === p ? o : n.bg,
484
- color: a === p ? "#fff" : n.textSoft,
485
- border: `1px solid ${a === p ? o : n.border}`,
928
+ background: c === u ? o : n.bg,
929
+ color: c === u ? "#fff" : n.textSoft,
930
+ border: `1px solid ${c === u ? o : n.border}`,
486
931
  fontFamily: t
487
932
  },
488
933
  children: [
489
- E[p].icon,
490
- E[p].label
934
+ U[u].icon,
935
+ U[u].label
491
936
  ]
492
937
  },
493
- p
938
+ u
494
939
  )) }),
495
- /* @__PURE__ */ e("div", { style: { fontSize: 10, fontWeight: 700, letterSpacing: ".08em", color: n.textFaint, marginBottom: 8, textTransform: "uppercase" }, children: "Title" }),
940
+ /* @__PURE__ */ e(
941
+ "div",
942
+ {
943
+ style: {
944
+ fontSize: 10,
945
+ fontWeight: 700,
946
+ letterSpacing: ".08em",
947
+ color: n.textFaint,
948
+ marginBottom: 8,
949
+ textTransform: "uppercase"
950
+ },
951
+ children: "Title"
952
+ }
953
+ ),
496
954
  /* @__PURE__ */ e(
497
955
  "input",
498
956
  {
499
957
  value: i,
500
- onChange: (p) => r(p.target.value),
958
+ onChange: (u) => r(u.target.value),
501
959
  placeholder: "Short summary of the issue or idea",
502
960
  maxLength: 200,
503
- style: { ...k, marginBottom: 16, display: "block" }
961
+ style: { ...v, marginBottom: 16, display: "block" }
962
+ }
963
+ ),
964
+ /* @__PURE__ */ d(
965
+ "div",
966
+ {
967
+ style: {
968
+ fontSize: 10,
969
+ fontWeight: 700,
970
+ letterSpacing: ".08em",
971
+ color: n.textFaint,
972
+ marginBottom: 8,
973
+ textTransform: "uppercase"
974
+ },
975
+ children: [
976
+ "Description",
977
+ " ",
978
+ /* @__PURE__ */ e(
979
+ "span",
980
+ {
981
+ style: { fontWeight: 400, textTransform: "none", letterSpacing: 0 },
982
+ children: "(optional)"
983
+ }
984
+ )
985
+ ]
504
986
  }
505
987
  ),
506
- /* @__PURE__ */ s("div", { style: { fontSize: 10, fontWeight: 700, letterSpacing: ".08em", color: n.textFaint, marginBottom: 8, textTransform: "uppercase" }, children: [
507
- "Description ",
508
- /* @__PURE__ */ e("span", { style: { fontWeight: 400, textTransform: "none", letterSpacing: 0 }, children: "(optional)" })
509
- ] }),
510
988
  /* @__PURE__ */ e(
511
989
  "textarea",
512
990
  {
513
991
  value: l,
514
- onChange: (p) => y(p.target.value),
992
+ onChange: (u) => x(u.target.value),
515
993
  placeholder: "Steps to reproduce, expected behaviour, or more context",
516
994
  maxLength: 2e3,
517
995
  rows: 4,
518
- style: { ...k, resize: "vertical", marginBottom: 16 }
996
+ style: { ...v, resize: "vertical", marginBottom: 16 }
519
997
  }
520
998
  ),
521
- w && /* @__PURE__ */ e("p", { style: { fontSize: 13, color: "#d6453d", marginBottom: 12 }, children: w }),
999
+ C && /* @__PURE__ */ e("p", { style: { fontSize: 14, color: "#d6453d", marginBottom: 12 }, children: C }),
522
1000
  /* @__PURE__ */ e(
523
1001
  "button",
524
1002
  {
525
- onClick: x,
1003
+ onClick: y,
526
1004
  disabled: m || !i.trim(),
527
1005
  style: {
528
1006
  width: "100%",
@@ -542,36 +1020,81 @@ function ee({ accent: o, p: n, font: t, onDone: u }) {
542
1020
  )
543
1021
  ] });
544
1022
  }
545
- const E = {
1023
+ const U = {
546
1024
  BUG: {
547
1025
  label: "Bug",
548
- icon: /* @__PURE__ */ s("svg", { width: 12, height: 12, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: 1.8, strokeLinecap: "round", strokeLinejoin: "round", children: [
549
- /* @__PURE__ */ e("ellipse", { cx: "8", cy: "10", rx: "3.5", ry: "4.5" }),
550
- /* @__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" })
551
- ] })
1026
+ icon: /* @__PURE__ */ d(
1027
+ "svg",
1028
+ {
1029
+ width: 12,
1030
+ height: 12,
1031
+ viewBox: "0 0 16 16",
1032
+ fill: "none",
1033
+ stroke: "currentColor",
1034
+ strokeWidth: 1.8,
1035
+ strokeLinecap: "round",
1036
+ strokeLinejoin: "round",
1037
+ children: [
1038
+ /* @__PURE__ */ e("ellipse", { cx: "8", cy: "10", rx: "3.5", ry: "4.5" }),
1039
+ /* @__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" })
1040
+ ]
1041
+ }
1042
+ )
552
1043
  },
553
1044
  FEATURE: {
554
1045
  label: "Feature",
555
- icon: /* @__PURE__ */ s("svg", { width: 12, height: 12, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: 1.8, strokeLinecap: "round", strokeLinejoin: "round", children: [
556
- /* @__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" }),
557
- /* @__PURE__ */ e("circle", { cx: "8", cy: "8", r: "2.5" })
558
- ] })
1046
+ icon: /* @__PURE__ */ d(
1047
+ "svg",
1048
+ {
1049
+ width: 12,
1050
+ height: 12,
1051
+ viewBox: "0 0 16 16",
1052
+ fill: "none",
1053
+ stroke: "currentColor",
1054
+ strokeWidth: 1.8,
1055
+ strokeLinecap: "round",
1056
+ strokeLinejoin: "round",
1057
+ children: [
1058
+ /* @__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" }),
1059
+ /* @__PURE__ */ e("circle", { cx: "8", cy: "8", r: "2.5" })
1060
+ ]
1061
+ }
1062
+ )
559
1063
  },
560
1064
  GENERAL: {
561
1065
  label: "General",
562
- 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" }) })
1066
+ icon: /* @__PURE__ */ e(
1067
+ "svg",
1068
+ {
1069
+ width: 12,
1070
+ height: 12,
1071
+ viewBox: "0 0 16 16",
1072
+ fill: "none",
1073
+ stroke: "currentColor",
1074
+ strokeWidth: 1.8,
1075
+ strokeLinecap: "round",
1076
+ strokeLinejoin: "round",
1077
+ 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" })
1078
+ }
1079
+ )
563
1080
  }
564
1081
  }, te = { BUG: "#fdecec", FEATURE: "#e9f0fd" }, ne = { BUG: "#d6453d", FEATURE: "#3b76d6" };
565
1082
  function L({ type: o, p: n }) {
566
- return /* @__PURE__ */ e("span", { style: {
567
- padding: "2px 8px",
568
- borderRadius: 9999,
569
- fontSize: 10.5,
570
- fontWeight: 700,
571
- letterSpacing: ".02em",
572
- background: te[o] ?? n.bgSoft,
573
- color: ne[o] ?? n.textSoft
574
- }, children: o });
1083
+ return /* @__PURE__ */ e(
1084
+ "span",
1085
+ {
1086
+ style: {
1087
+ padding: "2px 8px",
1088
+ borderRadius: 9999,
1089
+ fontSize: 10.5,
1090
+ fontWeight: 700,
1091
+ letterSpacing: ".02em",
1092
+ background: te[o] ?? n.bgSoft,
1093
+ color: ne[o] ?? n.textSoft
1094
+ },
1095
+ children: o
1096
+ }
1097
+ );
575
1098
  }
576
1099
  const oe = {
577
1100
  OPEN: "#b45309",
@@ -580,33 +1103,125 @@ const oe = {
580
1103
  CLOSED: "#6b7280"
581
1104
  };
582
1105
  function M() {
583
- return /* @__PURE__ */ s("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: [
584
- /* @__PURE__ */ e("span", { style: { width: 5, height: 5, borderRadius: "50%", background: "#ea580c", display: "inline-block" } }),
585
- "Pending review"
586
- ] });
1106
+ return /* @__PURE__ */ d(
1107
+ "span",
1108
+ {
1109
+ style: {
1110
+ display: "inline-flex",
1111
+ alignItems: "center",
1112
+ gap: 4,
1113
+ background: "#fff7ed",
1114
+ border: "1px solid #fed7aa",
1115
+ borderRadius: 6,
1116
+ padding: "1px 6px",
1117
+ fontSize: 10,
1118
+ fontWeight: 700,
1119
+ color: "#ea580c"
1120
+ },
1121
+ children: [
1122
+ /* @__PURE__ */ e(
1123
+ "span",
1124
+ {
1125
+ style: {
1126
+ width: 5,
1127
+ height: 5,
1128
+ borderRadius: "50%",
1129
+ background: "#ea580c",
1130
+ display: "inline-block"
1131
+ }
1132
+ }
1133
+ ),
1134
+ "Pending review"
1135
+ ]
1136
+ }
1137
+ );
587
1138
  }
588
1139
  function A({
589
1140
  status: o,
590
1141
  boardStatus: n,
591
1142
  p: t
592
1143
  }) {
593
- const u = (n == null ? void 0 : n.color) ?? oe[o] ?? "#9ca3af";
594
- return /* @__PURE__ */ s("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: [
595
- /* @__PURE__ */ e("span", { style: { width: 6, height: 6, borderRadius: "50%", background: u, display: "inline-block", flexShrink: 0 } }),
596
- (n == null ? void 0 : n.name) ?? o.replace("_", " ")
597
- ] });
1144
+ const g = (n == null ? void 0 : n.color) ?? oe[o] ?? "#9ca3af";
1145
+ return /* @__PURE__ */ d(
1146
+ "span",
1147
+ {
1148
+ style: {
1149
+ display: "inline-flex",
1150
+ alignItems: "center",
1151
+ gap: 5,
1152
+ background: t.bgSoft,
1153
+ border: `1px solid ${t.border}`,
1154
+ borderRadius: 6,
1155
+ padding: "2px 8px",
1156
+ fontSize: 10,
1157
+ fontWeight: 600,
1158
+ color: t.textSoft
1159
+ },
1160
+ children: [
1161
+ /* @__PURE__ */ e(
1162
+ "span",
1163
+ {
1164
+ style: {
1165
+ width: 6,
1166
+ height: 6,
1167
+ borderRadius: "50%",
1168
+ background: g,
1169
+ display: "inline-block",
1170
+ flexShrink: 0
1171
+ }
1172
+ }
1173
+ ),
1174
+ (n == null ? void 0 : n.name) ?? o.replace("_", " ")
1175
+ ]
1176
+ }
1177
+ );
598
1178
  }
599
- function re({ size: o = 16, color: n = "currentColor" }) {
600
- return /* @__PURE__ */ e("svg", { width: o, height: o, viewBox: "0 0 24 24", fill: "none", stroke: n, 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" }) });
1179
+ function re({
1180
+ size: o = 16,
1181
+ color: n = "currentColor"
1182
+ }) {
1183
+ return /* @__PURE__ */ e(
1184
+ "svg",
1185
+ {
1186
+ width: o,
1187
+ height: o,
1188
+ viewBox: "0 0 24 24",
1189
+ fill: "none",
1190
+ stroke: n,
1191
+ strokeWidth: 2,
1192
+ strokeLinecap: "round",
1193
+ strokeLinejoin: "round",
1194
+ 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" })
1195
+ }
1196
+ );
601
1197
  }
602
- function D({ color: o = "currentColor", size: n = 11 }) {
603
- return /* @__PURE__ */ e("svg", { width: n, height: n, viewBox: "0 0 16 16", fill: "none", stroke: o, strokeWidth: 2.2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "M8 13V3M3 8l5-5 5 5" }) });
1198
+ function D({
1199
+ color: o = "currentColor",
1200
+ size: n = 11
1201
+ }) {
1202
+ return /* @__PURE__ */ e(
1203
+ "svg",
1204
+ {
1205
+ width: n,
1206
+ height: n,
1207
+ viewBox: "0 0 16 16",
1208
+ fill: "none",
1209
+ stroke: o,
1210
+ strokeWidth: 2.2,
1211
+ strokeLinecap: "round",
1212
+ strokeLinejoin: "round",
1213
+ children: /* @__PURE__ */ e("path", { d: "M8 13V3M3 8l5-5 5 5" })
1214
+ }
1215
+ );
604
1216
  }
605
1217
  function P(o) {
606
- return new Date(o).toLocaleDateString(void 0, { month: "short", day: "numeric" });
1218
+ return new Date(o).toLocaleDateString(void 0, {
1219
+ month: "short",
1220
+ day: "numeric"
1221
+ });
607
1222
  }
608
1223
  export {
609
1224
  ae as FeedbackWidget,
610
1225
  de as UpstepProvider,
611
- B as useUpstep
1226
+ I as useUpstep
612
1227
  };