@burdenoff/microfe-govcitizenhub 2026.705.1 → 2026.705.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.
Files changed (69) hide show
  1. package/dist/govcitizenhub/components/Avatar.js +55 -0
  2. package/dist/govcitizenhub/components/Avatar.js.map +1 -0
  3. package/dist/govcitizenhub/components/DocumentUploadField.js +95 -45
  4. package/dist/govcitizenhub/components/DocumentUploadField.js.map +1 -1
  5. package/dist/govcitizenhub/components/FilterTabs.js +5 -4
  6. package/dist/govcitizenhub/components/FilterTabs.js.map +1 -1
  7. package/dist/govcitizenhub/components/KeyValueList.js +23 -0
  8. package/dist/govcitizenhub/components/KeyValueList.js.map +1 -0
  9. package/dist/govcitizenhub/components/MetricsCard.js +51 -26
  10. package/dist/govcitizenhub/components/MetricsCard.js.map +1 -1
  11. package/dist/govcitizenhub/components/PageLayout.js +81 -51
  12. package/dist/govcitizenhub/components/PageLayout.js.map +1 -1
  13. package/dist/govcitizenhub/components/Pagination.js +41 -19
  14. package/dist/govcitizenhub/components/Pagination.js.map +1 -1
  15. package/dist/govcitizenhub/components/SectionCard.js +31 -0
  16. package/dist/govcitizenhub/components/SectionCard.js.map +1 -0
  17. package/dist/govcitizenhub/components/SlaBadge.js +71 -0
  18. package/dist/govcitizenhub/components/SlaBadge.js.map +1 -0
  19. package/dist/govcitizenhub/components/StateViews.js +1 -16
  20. package/dist/govcitizenhub/components/StateViews.js.map +1 -1
  21. package/dist/govcitizenhub/components/StatusBadge.js +23 -10
  22. package/dist/govcitizenhub/components/StatusBadge.js.map +1 -1
  23. package/dist/govcitizenhub/components/StatusStepper.js +55 -0
  24. package/dist/govcitizenhub/components/StatusStepper.js.map +1 -0
  25. package/dist/govcitizenhub/components/SummaryStrip.js +54 -0
  26. package/dist/govcitizenhub/components/SummaryStrip.js.map +1 -0
  27. package/dist/govcitizenhub/components/TagInput.js +2 -2
  28. package/dist/govcitizenhub/components/TagInput.js.map +1 -1
  29. package/dist/govcitizenhub/components/Timeline.js +61 -0
  30. package/dist/govcitizenhub/components/Timeline.js.map +1 -0
  31. package/dist/govcitizenhub/hooks/useFiles.js +50 -22
  32. package/dist/govcitizenhub/hooks/useFiles.js.map +1 -1
  33. package/dist/govcitizenhub/hooks/useGovApi.js +44 -34
  34. package/dist/govcitizenhub/hooks/useGovApi.js.map +1 -1
  35. package/dist/govcitizenhub/pages/DashboardPage.js +118 -50
  36. package/dist/govcitizenhub/pages/DashboardPage.js.map +1 -1
  37. package/dist/govcitizenhub/pages/agencies/AgenciesPage.js +258 -137
  38. package/dist/govcitizenhub/pages/agencies/AgenciesPage.js.map +1 -1
  39. package/dist/govcitizenhub/pages/agencies/AgencyFormDialog.js +103 -90
  40. package/dist/govcitizenhub/pages/agencies/AgencyFormDialog.js.map +1 -1
  41. package/dist/govcitizenhub/pages/applications/ApplicationDetailPage.js +493 -397
  42. package/dist/govcitizenhub/pages/applications/ApplicationDetailPage.js.map +1 -1
  43. package/dist/govcitizenhub/pages/applications/ApplicationsPage.js +268 -80
  44. package/dist/govcitizenhub/pages/applications/ApplicationsPage.js.map +1 -1
  45. package/dist/govcitizenhub/pages/applications/NewApplicationPage.js +412 -174
  46. package/dist/govcitizenhub/pages/applications/NewApplicationPage.js.map +1 -1
  47. package/dist/govcitizenhub/pages/documents/DocumentsPage.js +313 -115
  48. package/dist/govcitizenhub/pages/documents/DocumentsPage.js.map +1 -1
  49. package/dist/govcitizenhub/pages/grievances/GrievanceDetailPage.js +379 -176
  50. package/dist/govcitizenhub/pages/grievances/GrievanceDetailPage.js.map +1 -1
  51. package/dist/govcitizenhub/pages/grievances/GrievancesPage.js +275 -184
  52. package/dist/govcitizenhub/pages/grievances/GrievancesPage.js.map +1 -1
  53. package/dist/govcitizenhub/pages/payments/PaymentsPage.js +251 -133
  54. package/dist/govcitizenhub/pages/payments/PaymentsPage.js.map +1 -1
  55. package/dist/govcitizenhub/pages/permits/IssuePermitDialog.js +175 -105
  56. package/dist/govcitizenhub/pages/permits/IssuePermitDialog.js.map +1 -1
  57. package/dist/govcitizenhub/pages/permits/PermitsPage.js +204 -110
  58. package/dist/govcitizenhub/pages/permits/PermitsPage.js.map +1 -1
  59. package/dist/govcitizenhub/pages/permits/VerifyPermitPage.js +290 -113
  60. package/dist/govcitizenhub/pages/permits/VerifyPermitPage.js.map +1 -1
  61. package/dist/govcitizenhub/pages/services/FormFieldBuilder.js +301 -0
  62. package/dist/govcitizenhub/pages/services/FormFieldBuilder.js.map +1 -0
  63. package/dist/govcitizenhub/pages/services/ServiceDetailPage.js +248 -163
  64. package/dist/govcitizenhub/pages/services/ServiceDetailPage.js.map +1 -1
  65. package/dist/govcitizenhub/pages/services/ServiceFormDialog.js +182 -148
  66. package/dist/govcitizenhub/pages/services/ServiceFormDialog.js.map +1 -1
  67. package/dist/govcitizenhub/pages/services/ServicesPage.js +228 -137
  68. package/dist/govcitizenhub/pages/services/ServicesPage.js.map +1 -1
  69. package/package.json +1 -1
@@ -1,23 +1,24 @@
1
1
  import { useGovCitizenHub as e } from "../../context/GovCitizenHubContext.js";
2
- import { PageLayout as t } from "../../components/PageLayout.js";
3
- import { formatEnumLabel as n, formatRelativeTime as r } from "../../utils/formatters.js";
4
- import { StatusBadge as i } from "../../components/StatusBadge.js";
5
- import { EmptyState as a } from "../../components/EmptyState.js";
2
+ import { cn as t } from "../../utils/cn.js";
3
+ import { PageLayout as n } from "../../components/PageLayout.js";
4
+ import { formatEnumLabel as r, formatRelativeTime as i } from "../../utils/formatters.js";
5
+ import { StatusBadge as a } from "../../components/StatusBadge.js";
6
+ import { EmptyState as o } from "../../components/EmptyState.js";
6
7
  import "../../context/index.js";
7
- import { useGovAgencies as o, useGovGrievances as s, useGovReportGrievance as c } from "../../hooks/useGovApi.js";
8
- import { useCursorPager as l } from "../../hooks/useCursorPager.js";
9
- import { FILE_FOLDERS as u, uploadFileToFiles as d } from "../../hooks/useFiles.js";
8
+ import { useGovAgencies as s, useGovGrievances as c, useGovReportGrievance as l } from "../../hooks/useGovApi.js";
9
+ import { useCursorPager as u } from "../../hooks/useCursorPager.js";
10
+ import { FILE_FOLDERS as d, uploadFileToFiles as f } from "../../hooks/useFiles.js";
10
11
  import "../../hooks/index.js";
11
- import { FilterTabs as f } from "../../components/FilterTabs.js";
12
- import { ErrorView as p } from "../../components/StateViews.js";
13
- import { describeError as m, notify as h } from "../../lib/toast.js";
14
- import { Pagination as g } from "../../components/Pagination.js";
15
- import { useEffect as _, useState as v } from "react";
16
- import { ChevronRight as y, ImagePlus as b, Loader2 as x, MapPin as S, Plus as C } from "lucide-react";
17
- import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
18
- import { Button as D, GlassCard as O, Input as k, Label as A, ResponsiveDialog as ee, ResponsiveDialogContent as j, ResponsiveDialogDescription as M, ResponsiveDialogFooter as N, ResponsiveDialogHeader as P, ResponsiveDialogTitle as F, Select as I, SelectContent as L, SelectItem as R, SelectTrigger as z, SelectValue as B, Skeleton as V, Textarea as H } from "@burdenoff/fe-libs/ui";
12
+ import { FilterTabs as p } from "../../components/FilterTabs.js";
13
+ import { ErrorView as m } from "../../components/StateViews.js";
14
+ import { describeError as h, notify as g } from "../../lib/toast.js";
15
+ import { Pagination as _ } from "../../components/Pagination.js";
16
+ import { useEffect as v, useState as y } from "react";
17
+ import { BadgeCheck as b, Camera as x, ChevronRight as S, CircleHelp as C, GraduationCap as w, HandHeart as T, HeartPulse as E, Loader2 as ee, MapPin as D, Megaphone as O, Plus as k, Receipt as A, ScrollText as j, Wrench as M, X as te } from "lucide-react";
18
+ import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
19
+ import { Button as I, GlassCard as L, Input as R, Label as z, ResponsiveDialog as ne, ResponsiveDialogContent as re, ResponsiveDialogDescription as B, ResponsiveDialogFooter as V, ResponsiveDialogHeader as ie, ResponsiveDialogTitle as ae, Select as H, SelectContent as U, SelectItem as W, SelectTrigger as G, SelectValue as K, Skeleton as q, Textarea as oe } from "@burdenoff/fe-libs/ui";
19
20
  //#region src/govcitizenhub/pages/grievances/GrievancesPage.tsx
20
- var U = 15, W = [
21
+ var J = 15, Y = 5, X = 1e3, Z = [
21
22
  {
22
23
  value: "ALL",
23
24
  label: "All"
@@ -42,7 +43,7 @@ var U = 15, W = [
42
43
  value: "CLOSED",
43
44
  label: "Closed"
44
45
  }
45
- ], G = [
46
+ ], se = [
46
47
  "GRIEVANCES",
47
48
  "HEALTH",
48
49
  "UTILITIES",
@@ -52,275 +53,365 @@ var U = 15, W = [
52
53
  "LICENCES_AND_PERMITS",
53
54
  "TAXES_AND_PAYMENTS",
54
55
  "OTHER"
55
- ], K = [
56
+ ], ce = [
56
57
  "LOW",
57
58
  "NORMAL",
58
59
  "HIGH",
59
60
  "URGENT"
60
- ];
61
- function q() {
62
- let { navigateTo: o } = e(), c = l(), [u, d] = v("ALL"), [m, h] = v(!1), { data: _, isLoading: b, isError: x, refetch: k } = s({
63
- status: u === "ALL" ? void 0 : u,
61
+ ], Q = {
62
+ CERTIFICATES: j,
63
+ EDUCATION: w,
64
+ GRIEVANCES: O,
65
+ HEALTH: E,
66
+ LICENCES_AND_PERMITS: b,
67
+ OTHER: C,
68
+ SOCIAL_WELFARE: T,
69
+ TAXES_AND_PAYMENTS: A,
70
+ UTILITIES: M
71
+ };
72
+ function $() {
73
+ let { navigateTo: t } = e(), s = u(), [l, d] = y("ALL"), [f, h] = y(!1), { data: g, isLoading: v, isError: b, refetch: w } = c({
74
+ status: l === "ALL" ? void 0 : l,
64
75
  pagination: {
65
- limit: U,
66
- cursor: c.cursor
76
+ limit: J,
77
+ cursor: s.cursor
67
78
  }
68
- }), A = _?.items ?? [];
69
- return /* @__PURE__ */ E(t, {
79
+ }), T = g?.items ?? [];
80
+ return /* @__PURE__ */ F(n, {
70
81
  title: "Grievances",
71
82
  titleGradient: !0,
72
83
  description: "Civic complaints reported by citizens, triaged through to resolution.",
73
- actions: /* @__PURE__ */ E(D, {
84
+ actions: /* @__PURE__ */ F(I, {
74
85
  onClick: () => h(!0),
75
- children: [/* @__PURE__ */ T(C, { className: "mr-1.5 h-4 w-4" }), " Report grievance"]
86
+ children: [/* @__PURE__ */ P(k, { className: "mr-1.5 h-4 w-4" }), " Report grievance"]
76
87
  }),
77
88
  children: [
78
- /* @__PURE__ */ T("div", {
89
+ /* @__PURE__ */ P("div", {
79
90
  className: "mb-5",
80
- children: /* @__PURE__ */ T(f, {
81
- options: W,
82
- value: u,
91
+ children: /* @__PURE__ */ P(p, {
92
+ options: Z,
93
+ value: l,
83
94
  onChange: (e) => {
84
- d(e), c.reset();
95
+ d(e), s.reset();
85
96
  }
86
97
  })
87
98
  }),
88
- b ? /* @__PURE__ */ T("div", {
99
+ v ? /* @__PURE__ */ P("div", {
89
100
  className: "space-y-3",
90
- children: Array.from({ length: 6 }, (e, t) => /* @__PURE__ */ T(V, { className: "h-16 w-full rounded-card" }, t))
91
- }) : x ? /* @__PURE__ */ T(p, {
101
+ children: Array.from({ length: 6 }, (e, t) => /* @__PURE__ */ P(q, { className: "h-[72px] w-full rounded-card" }, t))
102
+ }) : b ? /* @__PURE__ */ P(m, {
92
103
  message: "We couldn't load grievances.",
93
- onRetry: () => k()
94
- }) : A.length === 0 && c.page === 0 ? /* @__PURE__ */ T(a, {
104
+ onRetry: () => w()
105
+ }) : T.length === 0 && s.page === 0 ? /* @__PURE__ */ P(o, {
95
106
  illustration: "empty-data",
96
107
  title: "No grievances found",
97
- description: u === "ALL" ? "Report the first civic grievance." : "No grievances match this status.",
98
- action: /* @__PURE__ */ E(D, {
108
+ description: l === "ALL" ? "Report the first civic grievance." : "No grievances match this status.",
109
+ action: /* @__PURE__ */ F(I, {
99
110
  onClick: () => h(!0),
100
- children: [/* @__PURE__ */ T(C, { className: "mr-1.5 h-4 w-4" }), " Report grievance"]
111
+ children: [/* @__PURE__ */ P(k, { className: "mr-1.5 h-4 w-4" }), " Report grievance"]
101
112
  })
102
- }) : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(O, {
113
+ }) : /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(L, {
103
114
  treatment: "plain",
104
115
  className: "divide-y divide-border-subtle border-border-seam p-0",
105
- children: A.map((e) => /* @__PURE__ */ E("button", {
116
+ children: T.map((e) => /* @__PURE__ */ F("button", {
106
117
  type: "button",
107
- onClick: () => o(`grievances/${e.id}`),
108
- className: "group flex w-full items-center gap-4 px-5 py-4 text-left outline-none transition-colors hover:bg-bg-sunken focus-visible:bg-bg-sunken",
118
+ onClick: () => t(`grievances/${e.id}`),
119
+ className: "group flex w-full items-center gap-3 px-4 py-4 text-left outline-none transition-colors hover:bg-bg-sunken focus-visible:bg-bg-sunken sm:px-5",
109
120
  children: [
110
- /* @__PURE__ */ E("div", {
121
+ /* @__PURE__ */ P("span", {
122
+ className: "inline-flex size-10 shrink-0 items-center justify-center rounded-xl bg-bg-sunken text-text-secondary group-hover:bg-bg-surface",
123
+ children: /* @__PURE__ */ P(Q[e.category] ?? C, { className: "size-5" })
124
+ }),
125
+ /* @__PURE__ */ F("div", {
111
126
  className: "min-w-0 flex-1",
112
- children: [/* @__PURE__ */ E("div", {
113
- className: "flex items-center gap-2",
114
- children: [/* @__PURE__ */ T("span", {
127
+ children: [/* @__PURE__ */ F("div", {
128
+ className: "flex flex-wrap items-center gap-x-2 gap-y-1",
129
+ children: [/* @__PURE__ */ P("span", {
115
130
  className: "truncate font-medium text-text-primary",
116
131
  children: e.title
117
- }), /* @__PURE__ */ T(i, { status: e.priority })]
118
- }), /* @__PURE__ */ E("p", {
132
+ }), /* @__PURE__ */ P(a, { status: e.priority })]
133
+ }), /* @__PURE__ */ F("p", {
119
134
  className: "mt-0.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-text-muted",
120
135
  children: [
121
- /* @__PURE__ */ T("span", { children: n(e.category) }),
122
- e.location && /* @__PURE__ */ E("span", {
136
+ /* @__PURE__ */ P("span", { children: r(e.category) }),
137
+ e.location && /* @__PURE__ */ F("span", {
123
138
  className: "flex items-center gap-1",
124
139
  children: [
125
- /* @__PURE__ */ T(S, { className: "h-3 w-3" }),
140
+ /* @__PURE__ */ P(D, { className: "size-3" }),
126
141
  " ",
127
142
  e.location
128
143
  ]
129
144
  }),
130
- /* @__PURE__ */ E("span", { children: ["Reported ", r(e.createdAt)] })
145
+ e.photoFileIds.length > 0 && /* @__PURE__ */ F("span", {
146
+ className: "flex items-center gap-1",
147
+ children: [
148
+ /* @__PURE__ */ P(x, { className: "size-3" }),
149
+ " ",
150
+ e.photoFileIds.length
151
+ ]
152
+ }),
153
+ /* @__PURE__ */ F("span", { children: ["Reported ", i(e.createdAt)] })
131
154
  ]
132
155
  })]
133
156
  }),
134
- /* @__PURE__ */ T(i, { status: e.status }),
135
- /* @__PURE__ */ T(y, { className: "h-4 w-4 shrink-0 text-text-muted transition-transform group-hover:translate-x-0.5" })
157
+ /* @__PURE__ */ P(a, {
158
+ status: e.status,
159
+ className: "hidden sm:inline-flex"
160
+ }),
161
+ /* @__PURE__ */ P(S, { className: "size-4 shrink-0 text-text-muted transition-transform group-hover:translate-x-0.5" })
136
162
  ]
137
163
  }, e.id))
138
- }), /* @__PURE__ */ T(g, {
139
- page: c.page,
140
- pageSize: U,
141
- itemCount: A.length,
142
- hasMore: _?.pageInfo.hasMore ?? !1,
143
- onPageChange: (e) => c.onPageChange(e, _?.pageInfo.cursor)
164
+ }), /* @__PURE__ */ P(_, {
165
+ page: s.page,
166
+ pageSize: J,
167
+ itemCount: T.length,
168
+ hasMore: g?.pageInfo.hasMore ?? !1,
169
+ onPageChange: (e) => s.onPageChange(e, g?.pageInfo.cursor)
144
170
  })] }),
145
- /* @__PURE__ */ T(J, {
146
- open: m,
171
+ /* @__PURE__ */ P(le, {
172
+ open: f,
147
173
  onOpenChange: h,
148
- onReported: (e) => o(`grievances/${e}`)
174
+ onReported: (e) => t(`grievances/${e}`)
149
175
  })
150
176
  ]
151
177
  });
152
178
  }
153
- function J({ open: e, onOpenChange: t, onReported: r }) {
154
- let i = c(), { data: a } = o({ isActive: !0 }), [s, l] = v(""), [f, p] = v(""), [g, y] = v("GRIEVANCES"), [S, C] = v("NORMAL"), [w, O] = v(""), [V, U] = v(""), [W, q] = v([]), [J, Y] = v(!1), [X, Z] = v(null);
155
- _(() => {
156
- e && (l(""), p(""), y("GRIEVANCES"), C("NORMAL"), O(""), U(""), q([]), Z(null));
179
+ function le({ open: e, onOpenChange: n, onReported: i }) {
180
+ let a = l(), { data: o } = s({ isActive: !0 }), [c, u] = y(""), [p, m] = y(""), [_, b] = y("GRIEVANCES"), [S, C] = y("NORMAL"), [w, T] = y(""), [E, O] = y(""), [A, j] = y([]), [M, N] = y(!1), [L, q] = y(null);
181
+ v(() => {
182
+ e && (u(""), m(""), b("GRIEVANCES"), C("NORMAL"), T(""), O(""), j([]), q(null));
157
183
  }, [e]);
158
- let Q = async (e) => {
184
+ let J = async (e) => {
159
185
  let t = e.target.files?.[0];
160
- if (e.target.value = "", t) {
161
- Y(!0);
186
+ if (e.target.value = "", !(!t || A.length >= Y)) {
187
+ N(!0);
162
188
  try {
163
- let e = await d(t, u.grievances);
164
- q((t) => [...t, e.id]), h.success("Photo attached", e.name);
189
+ let e = await f(t, d.grievances);
190
+ j((t) => [...t, e]), g.success("Photo attached", e.name);
165
191
  } catch (e) {
166
- h.error("Could not attach photo", m(e));
192
+ g.error("Could not attach photo", h(e));
167
193
  } finally {
168
- Y(!1);
194
+ N(!1);
169
195
  }
170
196
  }
171
- }, te = async () => {
172
- if (!s.trim()) {
173
- Z("A title is required.");
197
+ }, Z = (e) => j((t) => t.filter((t) => t.id !== e)), Q = async () => {
198
+ if (!c.trim()) {
199
+ q("A title is required.");
174
200
  return;
175
201
  }
176
- if (!f.trim()) {
177
- Z("Please describe the grievance.");
202
+ if (!p.trim()) {
203
+ q("Please describe the grievance.");
178
204
  return;
179
205
  }
180
206
  try {
181
- let e = await i.mutateAsync({
182
- title: s.trim(),
183
- description: f.trim(),
184
- category: g,
207
+ let e = await a.mutateAsync({
208
+ title: c.trim(),
209
+ description: p.trim(),
210
+ category: _,
185
211
  priority: S,
186
212
  location: w.trim() || null,
187
- agencyId: V || null,
188
- photoFileIds: W.length ? W : null
213
+ agencyId: E || null,
214
+ photoFileIds: A.length ? A.map((e) => e.id) : null
189
215
  });
190
- h.success("Grievance reported", e.title), r(e.id), t(!1);
216
+ g.success("Grievance reported", e.title), i(e.id), n(!1);
191
217
  } catch (e) {
192
- Z(m(e));
218
+ q(h(e));
193
219
  }
194
- }, $ = i.isPending;
195
- return /* @__PURE__ */ T(ee, {
220
+ }, $ = a.isPending;
221
+ return /* @__PURE__ */ P(ne, {
196
222
  open: e,
197
- onOpenChange: (e) => $ ? void 0 : t(e),
198
- children: /* @__PURE__ */ E(j, {
199
- className: "max-h-[90vh] overflow-y-auto sm:max-w-lg",
223
+ onOpenChange: (e) => $ ? void 0 : n(e),
224
+ children: /* @__PURE__ */ F(re, {
225
+ className: "max-h-[92vh] overflow-y-auto sm:max-w-2xl",
200
226
  children: [
201
- /* @__PURE__ */ E(P, { children: [/* @__PURE__ */ T(F, { children: "Report a grievance" }), /* @__PURE__ */ T(M, { children: "Tell us what went wrong. We will route it to the right agency and track it to resolution." })] }),
202
- /* @__PURE__ */ E("div", {
227
+ /* @__PURE__ */ F(ie, { children: [/* @__PURE__ */ P(ae, { children: "Report a grievance" }), /* @__PURE__ */ P(B, { children: "Tell us what went wrong. We will route it to the right agency and track it to resolution." })] }),
228
+ /* @__PURE__ */ F("div", {
203
229
  className: "flex flex-col gap-4 py-2",
204
230
  children: [
205
- /* @__PURE__ */ E("div", {
206
- className: "grid gap-1.5",
207
- children: [/* @__PURE__ */ T(A, {
208
- htmlFor: "g-title",
209
- children: "Title"
210
- }), /* @__PURE__ */ T(k, {
211
- id: "g-title",
212
- value: s,
213
- onChange: (e) => l(e.target.value),
214
- placeholder: "e.g. Broken street light on Main Road"
215
- })]
216
- }),
217
- /* @__PURE__ */ E("div", {
218
- className: "grid gap-1.5",
219
- children: [/* @__PURE__ */ T(A, {
220
- htmlFor: "g-desc",
221
- children: "Description"
222
- }), /* @__PURE__ */ T(H, {
223
- id: "g-desc",
224
- value: f,
225
- onChange: (e) => p(e.target.value),
226
- placeholder: "Describe the issue, when it started, and any impact.",
227
- rows: 4
228
- })]
229
- }),
230
- /* @__PURE__ */ E("div", {
231
+ /* @__PURE__ */ F("div", {
231
232
  className: "grid gap-4 sm:grid-cols-2",
232
- children: [/* @__PURE__ */ E("div", {
233
+ children: [/* @__PURE__ */ F("div", {
233
234
  className: "grid gap-1.5",
234
- children: [/* @__PURE__ */ T(A, { children: "Category" }), /* @__PURE__ */ E(I, {
235
- value: g,
236
- onValueChange: (e) => y(e),
237
- children: [/* @__PURE__ */ T(z, {
238
- "aria-label": "Category",
239
- children: /* @__PURE__ */ T(B, {})
240
- }), /* @__PURE__ */ T(L, { children: G.map((e) => /* @__PURE__ */ T(R, {
241
- value: e,
242
- children: n(e)
243
- }, e)) })]
235
+ children: [/* @__PURE__ */ F(z, {
236
+ htmlFor: "g-title",
237
+ children: ["Title ", /* @__PURE__ */ P("span", {
238
+ className: "text-status-error-text",
239
+ children: "*"
240
+ })]
241
+ }), /* @__PURE__ */ P(R, {
242
+ id: "g-title",
243
+ value: c,
244
+ onChange: (e) => u(e.target.value),
245
+ placeholder: "e.g. Broken street light on Main Road"
244
246
  })]
245
- }), /* @__PURE__ */ E("div", {
247
+ }), /* @__PURE__ */ F("div", {
246
248
  className: "grid gap-1.5",
247
- children: [/* @__PURE__ */ T(A, { children: "Priority" }), /* @__PURE__ */ E(I, {
248
- value: S,
249
- onValueChange: (e) => C(e),
250
- children: [/* @__PURE__ */ T(z, {
251
- "aria-label": "Priority",
252
- children: /* @__PURE__ */ T(B, {})
253
- }), /* @__PURE__ */ T(L, { children: K.map((e) => /* @__PURE__ */ T(R, {
249
+ children: [/* @__PURE__ */ F(z, { children: ["Category ", /* @__PURE__ */ P("span", {
250
+ className: "text-status-error-text",
251
+ children: "*"
252
+ })] }), /* @__PURE__ */ F(H, {
253
+ value: _,
254
+ onValueChange: (e) => b(e),
255
+ children: [/* @__PURE__ */ P(G, {
256
+ "aria-label": "Category",
257
+ children: /* @__PURE__ */ P(K, {})
258
+ }), /* @__PURE__ */ P(U, { children: se.map((e) => /* @__PURE__ */ P(W, {
254
259
  value: e,
255
- children: n(e)
260
+ children: r(e)
256
261
  }, e)) })]
257
262
  })]
258
263
  })]
259
264
  }),
260
- /* @__PURE__ */ E("div", {
261
- className: "grid gap-1.5",
262
- children: [/* @__PURE__ */ T(A, {
263
- htmlFor: "g-loc",
264
- children: "Location (optional)"
265
- }), /* @__PURE__ */ T(k, {
266
- id: "g-loc",
267
- value: w,
268
- onChange: (e) => O(e.target.value),
269
- placeholder: "Street, area, landmark"
265
+ /* @__PURE__ */ F("div", {
266
+ className: "grid gap-4 sm:grid-cols-2",
267
+ children: [/* @__PURE__ */ F("div", {
268
+ className: "grid gap-1.5",
269
+ children: [
270
+ /* @__PURE__ */ F(z, {
271
+ htmlFor: "g-desc",
272
+ children: ["Description ", /* @__PURE__ */ P("span", {
273
+ className: "text-status-error-text",
274
+ children: "*"
275
+ })]
276
+ }),
277
+ /* @__PURE__ */ P(oe, {
278
+ id: "g-desc",
279
+ value: p,
280
+ onChange: (e) => m(e.target.value.slice(0, X)),
281
+ placeholder: "Provide details about the issue. Include when it happened, how often, and any other relevant information.",
282
+ rows: 5
283
+ }),
284
+ /* @__PURE__ */ F("p", {
285
+ className: "text-right text-xs text-text-muted tabular-nums",
286
+ children: [
287
+ p.length,
288
+ " / ",
289
+ X
290
+ ]
291
+ })
292
+ ]
293
+ }), /* @__PURE__ */ F("div", {
294
+ className: "flex flex-col gap-4",
295
+ children: [/* @__PURE__ */ F("div", {
296
+ className: "grid gap-1.5",
297
+ children: [/* @__PURE__ */ F(z, { children: ["Priority ", /* @__PURE__ */ P("span", {
298
+ className: "text-status-error-text",
299
+ children: "*"
300
+ })] }), /* @__PURE__ */ F(H, {
301
+ value: S,
302
+ onValueChange: (e) => C(e),
303
+ children: [/* @__PURE__ */ P(G, {
304
+ "aria-label": "Priority",
305
+ children: /* @__PURE__ */ P(K, {})
306
+ }), /* @__PURE__ */ P(U, { children: ce.map((e) => /* @__PURE__ */ P(W, {
307
+ value: e,
308
+ children: r(e)
309
+ }, e)) })]
310
+ })]
311
+ }), /* @__PURE__ */ F("div", {
312
+ className: "grid gap-1.5",
313
+ children: [/* @__PURE__ */ P(z, {
314
+ htmlFor: "g-loc",
315
+ children: "Location"
316
+ }), /* @__PURE__ */ F("div", {
317
+ className: "relative",
318
+ children: [/* @__PURE__ */ P(D, { className: "pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-text-muted" }), /* @__PURE__ */ P(R, {
319
+ id: "g-loc",
320
+ value: w,
321
+ onChange: (e) => T(e.target.value),
322
+ placeholder: "Street, area, landmark",
323
+ className: "pl-9"
324
+ })]
325
+ })]
326
+ })]
270
327
  })]
271
328
  }),
272
- /* @__PURE__ */ E("div", {
329
+ /* @__PURE__ */ F("div", {
273
330
  className: "grid gap-1.5",
274
- children: [/* @__PURE__ */ T(A, { children: "Route to agency (optional)" }), /* @__PURE__ */ E(I, {
275
- value: V,
276
- onValueChange: U,
277
- children: [/* @__PURE__ */ T(z, {
331
+ children: [/* @__PURE__ */ P(z, { children: "Route to agency" }), /* @__PURE__ */ F(H, {
332
+ value: E,
333
+ onValueChange: O,
334
+ children: [/* @__PURE__ */ P(G, {
278
335
  "aria-label": "Agency",
279
- children: /* @__PURE__ */ T(B, { placeholder: "Auto-route" })
280
- }), /* @__PURE__ */ T(L, { children: (a ?? []).map((e) => /* @__PURE__ */ T(R, {
336
+ children: /* @__PURE__ */ P(K, { placeholder: "Auto-route to the right agency" })
337
+ }), /* @__PURE__ */ P(U, { children: (o ?? []).map((e) => /* @__PURE__ */ P(W, {
281
338
  value: e.id,
282
339
  children: e.name
283
340
  }, e.id)) })]
284
341
  })]
285
342
  }),
286
- /* @__PURE__ */ E("div", {
343
+ /* @__PURE__ */ F("div", {
287
344
  className: "grid gap-1.5",
288
- children: [/* @__PURE__ */ T(A, { children: "Photos (optional)" }), /* @__PURE__ */ E("label", {
289
- className: "flex w-fit cursor-pointer items-center gap-2 rounded-lg border border-dashed border-border-default px-3 py-2 text-sm text-text-secondary hover:bg-bg-sunken",
290
- children: [
291
- J ? /* @__PURE__ */ T(x, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ T(b, { className: "h-4 w-4" }),
292
- J ? "Uploading…" : W.length ? `${W.length} attached — add more` : "Attach a photo",
293
- /* @__PURE__ */ T("input", {
294
- type: "file",
295
- accept: "image/*",
296
- className: "sr-only",
297
- onChange: (e) => void Q(e),
298
- disabled: J
299
- })
300
- ]
301
- })]
345
+ children: [
346
+ /* @__PURE__ */ P(z, { children: "Photos" }),
347
+ /* @__PURE__ */ F("div", {
348
+ className: "flex flex-wrap gap-3",
349
+ children: [A.map((e) => /* @__PURE__ */ F("div", {
350
+ className: "group relative size-24 overflow-hidden rounded-xl border border-border-seam bg-bg-sunken",
351
+ children: [e.url ? /* @__PURE__ */ P("img", {
352
+ src: e.url,
353
+ alt: e.name,
354
+ className: "size-full object-cover",
355
+ loading: "lazy"
356
+ }) : /* @__PURE__ */ P("span", {
357
+ className: "flex size-full items-center justify-center",
358
+ children: /* @__PURE__ */ P(x, { className: "size-6 text-text-muted" })
359
+ }), /* @__PURE__ */ P("button", {
360
+ type: "button",
361
+ onClick: () => Z(e.id),
362
+ "aria-label": `Remove ${e.name}`,
363
+ className: "absolute right-1 top-1 inline-flex size-6 items-center justify-center rounded-full bg-bg-canvas/80 text-text-primary backdrop-blur transition-colors hover:bg-bg-canvas focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
364
+ children: /* @__PURE__ */ P(te, { className: "size-3.5" })
365
+ })]
366
+ }, e.id)), A.length < Y && /* @__PURE__ */ F("label", {
367
+ className: t("flex size-24 cursor-pointer flex-col items-center justify-center gap-1 rounded-xl border-2 border-dashed border-border-default text-text-secondary transition-colors hover:border-action-primary-bg hover:bg-[var(--color-accent-soft)]", M && "pointer-events-none opacity-60"),
368
+ children: [
369
+ M ? /* @__PURE__ */ P(ee, { className: "size-5 animate-spin" }) : /* @__PURE__ */ P(x, { className: "size-5" }),
370
+ /* @__PURE__ */ P("span", {
371
+ className: "text-xs font-medium",
372
+ children: M ? "Uploading…" : "Add photo"
373
+ }),
374
+ /* @__PURE__ */ P("input", {
375
+ type: "file",
376
+ accept: "image/*",
377
+ className: "sr-only",
378
+ onChange: (e) => void J(e),
379
+ disabled: M
380
+ })
381
+ ]
382
+ })]
383
+ }),
384
+ /* @__PURE__ */ F("p", {
385
+ className: "text-xs text-text-muted",
386
+ children: [
387
+ "JPG or PNG. You can attach up to ",
388
+ Y,
389
+ " photos."
390
+ ]
391
+ })
392
+ ]
302
393
  }),
303
- X && /* @__PURE__ */ T("p", {
394
+ L && /* @__PURE__ */ P("p", {
304
395
  className: "text-sm text-status-error-text",
305
- children: X
396
+ children: L
306
397
  })
307
398
  ]
308
399
  }),
309
- /* @__PURE__ */ E(N, { children: [/* @__PURE__ */ T(D, {
400
+ /* @__PURE__ */ F(V, { children: [/* @__PURE__ */ P(I, {
310
401
  variant: "outline",
311
- onClick: () => t(!1),
402
+ onClick: () => n(!1),
312
403
  disabled: $,
313
404
  children: "Cancel"
314
- }), /* @__PURE__ */ T(D, {
315
- onClick: te,
316
- disabled: $ || J,
317
- children: "Report grievance"
405
+ }), /* @__PURE__ */ F(I, {
406
+ onClick: Q,
407
+ disabled: $ || M,
408
+ children: [/* @__PURE__ */ P(k, { className: "mr-1.5 h-4 w-4" }), " Submit grievance"]
318
409
  })] })
319
410
  ]
320
411
  })
321
412
  });
322
413
  }
323
414
  //#endregion
324
- export { q as GrievancesPage };
415
+ export { Q as CATEGORY_ICON, $ as GrievancesPage };
325
416
 
326
417
  //# sourceMappingURL=GrievancesPage.js.map