@burdenoff/microfe-govcitizenhub 2026.720.3 → 2026.720.5

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 (26) hide show
  1. package/dist/govcitizenhub/components/DynamicFormFields.d.ts +17 -0
  2. package/dist/govcitizenhub/components/DynamicFormFields.d.ts.map +1 -0
  3. package/dist/govcitizenhub/components/DynamicFormFields.js +101 -0
  4. package/dist/govcitizenhub/components/DynamicFormFields.js.map +1 -0
  5. package/dist/govcitizenhub/components/mobile/BottomTabNav.d.ts.map +1 -1
  6. package/dist/govcitizenhub/components/mobile/BottomTabNav.js +11 -8
  7. package/dist/govcitizenhub/components/mobile/BottomTabNav.js.map +1 -1
  8. package/dist/govcitizenhub/pages/applications/ApplicationsPage.d.ts.map +1 -1
  9. package/dist/govcitizenhub/pages/applications/ApplicationsPage.js +170 -150
  10. package/dist/govcitizenhub/pages/applications/ApplicationsPage.js.map +1 -1
  11. package/dist/govcitizenhub/pages/applications/NewApplicationPage.d.ts +9 -5
  12. package/dist/govcitizenhub/pages/applications/NewApplicationPage.d.ts.map +1 -1
  13. package/dist/govcitizenhub/pages/applications/NewApplicationPage.js +148 -244
  14. package/dist/govcitizenhub/pages/applications/NewApplicationPage.js.map +1 -1
  15. package/dist/govcitizenhub/pages/services/FormFieldBuilder.d.ts +7 -28
  16. package/dist/govcitizenhub/pages/services/FormFieldBuilder.d.ts.map +1 -1
  17. package/dist/govcitizenhub/pages/services/FormFieldBuilder.js +203 -136
  18. package/dist/govcitizenhub/pages/services/FormFieldBuilder.js.map +1 -1
  19. package/dist/govcitizenhub/pages/services/ServiceFormDialog.d.ts.map +1 -1
  20. package/dist/govcitizenhub/pages/services/ServiceFormDialog.js +156 -114
  21. package/dist/govcitizenhub/pages/services/ServiceFormDialog.js.map +1 -1
  22. package/dist/govcitizenhub/utils/dynamicForm.d.ts +46 -0
  23. package/dist/govcitizenhub/utils/dynamicForm.d.ts.map +1 -0
  24. package/dist/govcitizenhub/utils/dynamicForm.js +59 -0
  25. package/dist/govcitizenhub/utils/dynamicForm.js.map +1 -0
  26. package/package.json +1 -1
@@ -0,0 +1,17 @@
1
+ import { DynamicFormField } from '../utils/dynamicForm';
2
+
3
+ export interface DynamicFormFieldsProps {
4
+ fields: DynamicFormField[];
5
+ values: Record<string, string>;
6
+ onChange: (key: string, value: string) => void;
7
+ /** For `file` fields: the human filename to display (the value itself holds the file id). */
8
+ fileNames?: Record<string, string>;
9
+ uploadingKey?: string | null;
10
+ onFileSelect?: (key: string, files: FileList | null) => void;
11
+ disabled?: boolean;
12
+ /** Preview mode (inside the builder): file uploads are shown but inert. */
13
+ previewMode?: boolean;
14
+ idPrefix?: string;
15
+ }
16
+ export declare function DynamicFormFields({ fields, values, onChange, fileNames, uploadingKey, onFileSelect, disabled, previewMode, idPrefix, }: DynamicFormFieldsProps): import("react/jsx-runtime").JSX.Element | null;
17
+ //# sourceMappingURL=DynamicFormFields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DynamicFormFields.d.ts","sourceRoot":"","sources":["../../../src/govcitizenhub/components/DynamicFormFields.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAcH,OAAO,EAAkB,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG7E,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,6FAA6F;IAC7F,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,2EAA2E;IAC3E,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,MAAM,EACN,QAAQ,EACR,SAAc,EACd,YAAmB,EACnB,YAAY,EACZ,QAAgB,EAChB,WAAmB,EACnB,QAAc,GACf,EAAE,sBAAsB,kDAgExB"}
@@ -0,0 +1,101 @@
1
+ import { cn as e } from "../utils/cn.js";
2
+ import { isFieldVisible as t } from "../utils/dynamicForm.js";
3
+ import { CheckCircle2 as n, Loader2 as r, UploadCloud as i } from "lucide-react";
4
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
+ import { Input as s, Label as c, Select as l, SelectContent as u, SelectItem as d, SelectTrigger as f, SelectValue as p, Textarea as m } from "@burdenoff/fe-libs/ui";
6
+ //#region src/govcitizenhub/components/DynamicFormFields.tsx
7
+ function h({ fields: n, values: r, onChange: i, fileNames: h = {}, uploadingKey: _ = null, onFileSelect: v, disabled: y = !1, previewMode: b = !1, idPrefix: x = "f" }) {
8
+ let S = n.filter((e) => t(e, r, n));
9
+ return S.length === 0 ? null : /* @__PURE__ */ a("div", {
10
+ className: "grid gap-4 sm:grid-cols-2",
11
+ children: S.map((t) => {
12
+ let n = t.type === "textarea" || t.type === "file" ? "sm:col-span-2" : "", S = `${x}-${t.key}`;
13
+ return /* @__PURE__ */ o("div", {
14
+ className: e("grid gap-1.5", n),
15
+ children: [/* @__PURE__ */ o(c, {
16
+ htmlFor: S,
17
+ children: [t.label, t.required && /* @__PURE__ */ a("span", {
18
+ className: "text-status-error-text",
19
+ children: " *"
20
+ })]
21
+ }), t.type === "textarea" ? /* @__PURE__ */ a(m, {
22
+ id: S,
23
+ value: r[t.key] ?? "",
24
+ onChange: (e) => i(t.key, e.target.value),
25
+ disabled: y,
26
+ rows: 3
27
+ }) : t.type === "select" ? /* @__PURE__ */ o(l, {
28
+ value: r[t.key] ?? "",
29
+ onValueChange: (e) => i(t.key, e),
30
+ disabled: y,
31
+ children: [/* @__PURE__ */ a(f, {
32
+ id: S,
33
+ "aria-label": t.label,
34
+ children: /* @__PURE__ */ a(p, { placeholder: "Select…" })
35
+ }), /* @__PURE__ */ a(u, { children: (t.options ?? []).map((e) => /* @__PURE__ */ a(d, {
36
+ value: e,
37
+ children: e
38
+ }, e)) })]
39
+ }) : t.type === "file" ? /* @__PURE__ */ a(g, {
40
+ id: S,
41
+ label: t.label,
42
+ fileName: h[t.key],
43
+ uploading: _ === t.key,
44
+ disabled: y || b,
45
+ onSelect: (e) => v?.(t.key, e)
46
+ }) : /* @__PURE__ */ a(s, {
47
+ id: S,
48
+ type: t.type === "number" ? "number" : t.type === "date" ? "date" : "text",
49
+ value: r[t.key] ?? "",
50
+ onChange: (e) => i(t.key, e.target.value),
51
+ disabled: y
52
+ })]
53
+ }, t.key);
54
+ })
55
+ });
56
+ }
57
+ function g({ id: t, label: s, fileName: c, uploading: l, disabled: u, onSelect: d }) {
58
+ return /* @__PURE__ */ o("label", {
59
+ htmlFor: t,
60
+ className: e("flex items-center gap-3 rounded-xl border-2 border-dashed border-border-seam bg-bg-sunken/40 px-4 py-4 transition-colors", u ? "cursor-not-allowed opacity-70" : "cursor-pointer hover:border-border-strong", l && "cursor-wait opacity-70"),
61
+ children: [
62
+ /* @__PURE__ */ a("span", {
63
+ className: "inline-flex size-9 shrink-0 items-center justify-center rounded-full bg-[var(--color-accent-soft)] text-action-primary-text",
64
+ children: l ? /* @__PURE__ */ a(r, {
65
+ className: "size-5 animate-spin",
66
+ "aria-hidden": "true"
67
+ }) : c ? /* @__PURE__ */ a(n, {
68
+ className: "size-5 text-status-success-text",
69
+ "aria-hidden": "true"
70
+ }) : /* @__PURE__ */ a(i, {
71
+ className: "size-5",
72
+ "aria-hidden": "true"
73
+ })
74
+ }),
75
+ /* @__PURE__ */ o("span", {
76
+ className: "min-w-0 flex-1",
77
+ children: [/* @__PURE__ */ a("span", {
78
+ className: "block truncate text-sm font-medium text-text-primary",
79
+ children: l ? "Uploading…" : c || "Click to upload or drag & drop"
80
+ }), /* @__PURE__ */ a("span", {
81
+ className: "mt-0.5 block text-xs text-text-muted",
82
+ children: c ? "Uploaded · click to replace" : "PDF, JPG or PNG"
83
+ })]
84
+ }),
85
+ /* @__PURE__ */ a("input", {
86
+ id: t,
87
+ type: "file",
88
+ className: "sr-only",
89
+ "aria-label": `Upload ${s}`,
90
+ disabled: u || l,
91
+ onChange: (e) => {
92
+ d(e.target.files), e.target.value = "";
93
+ }
94
+ })
95
+ ]
96
+ });
97
+ }
98
+ //#endregion
99
+ export { h as DynamicFormFields };
100
+
101
+ //# sourceMappingURL=DynamicFormFields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DynamicFormFields.js","names":[],"sources":["../../../src/govcitizenhub/components/DynamicFormFields.tsx"],"sourcesContent":["/**\n * DynamicFormFields — renders a service's dynamic `formSchema` fields.\n * @module govcitizenhub/components\n *\n * The single renderer shared by the citizen-facing `NewApplicationPage` and the\n * no-code service builder's live preview (`ServiceFormDialog`) so a field an\n * agency author sees in preview is pixel-for-pixel what a citizen fills in —\n * including conditional (`showIf`) visibility (BOFF-4540).\n */\n\nimport {\n Input,\n Label,\n Textarea,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@burdenoff/fe-libs/ui';\nimport { CheckCircle2, Loader2, UploadCloud } from 'lucide-react';\n\nimport { isFieldVisible, type DynamicFormField } from '../utils/dynamicForm';\nimport { cn } from '../utils/cn';\n\nexport interface DynamicFormFieldsProps {\n fields: DynamicFormField[];\n values: Record<string, string>;\n onChange: (key: string, value: string) => void;\n /** For `file` fields: the human filename to display (the value itself holds the file id). */\n fileNames?: Record<string, string>;\n uploadingKey?: string | null;\n onFileSelect?: (key: string, files: FileList | null) => void;\n disabled?: boolean;\n /** Preview mode (inside the builder): file uploads are shown but inert. */\n previewMode?: boolean;\n idPrefix?: string;\n}\n\nexport function DynamicFormFields({\n fields,\n values,\n onChange,\n fileNames = {},\n uploadingKey = null,\n onFileSelect,\n disabled = false,\n previewMode = false,\n idPrefix = 'f',\n}: DynamicFormFieldsProps) {\n const visibleFields = fields.filter((f) => isFieldVisible(f, values, fields));\n\n if (visibleFields.length === 0) return null;\n\n return (\n <div className=\"grid gap-4 sm:grid-cols-2\">\n {visibleFields.map((field) => {\n const spanFull = field.type === 'textarea' || field.type === 'file' ? 'sm:col-span-2' : '';\n const fieldId = `${idPrefix}-${field.key}`;\n return (\n <div key={field.key} className={cn('grid gap-1.5', spanFull)}>\n <Label htmlFor={fieldId}>\n {field.label}\n {field.required && <span className=\"text-status-error-text\"> *</span>}\n </Label>\n {field.type === 'textarea' ? (\n <Textarea\n id={fieldId}\n value={values[field.key] ?? ''}\n onChange={(e) => onChange(field.key, e.target.value)}\n disabled={disabled}\n rows={3}\n />\n ) : field.type === 'select' ? (\n <Select\n value={values[field.key] ?? ''}\n onValueChange={(v) => onChange(field.key, v)}\n disabled={disabled}\n >\n <SelectTrigger id={fieldId} aria-label={field.label}>\n <SelectValue placeholder=\"Select…\" />\n </SelectTrigger>\n <SelectContent>\n {(field.options ?? []).map((opt) => (\n <SelectItem key={opt} value={opt}>\n {opt}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n ) : field.type === 'file' ? (\n <FileFieldControl\n id={fieldId}\n label={field.label}\n fileName={fileNames[field.key]}\n uploading={uploadingKey === field.key}\n disabled={disabled || previewMode}\n onSelect={(list) => onFileSelect?.(field.key, list)}\n />\n ) : (\n <Input\n id={fieldId}\n type={field.type === 'number' ? 'number' : field.type === 'date' ? 'date' : 'text'}\n value={values[field.key] ?? ''}\n onChange={(e) => onChange(field.key, e.target.value)}\n disabled={disabled}\n />\n )}\n </div>\n );\n })}\n </div>\n );\n}\n\n/** A click/drag upload control for a dynamic `file` form field. */\nfunction FileFieldControl({\n id,\n label,\n fileName,\n uploading,\n disabled,\n onSelect,\n}: {\n id: string;\n label: string;\n fileName?: string;\n uploading: boolean;\n disabled?: boolean;\n onSelect: (files: FileList | null) => void;\n}) {\n return (\n <label\n htmlFor={id}\n className={cn(\n 'flex items-center gap-3 rounded-xl border-2 border-dashed border-border-seam bg-bg-sunken/40 px-4 py-4 transition-colors',\n disabled ? 'cursor-not-allowed opacity-70' : 'cursor-pointer hover:border-border-strong',\n uploading && 'cursor-wait opacity-70'\n )}\n >\n <span className=\"inline-flex size-9 shrink-0 items-center justify-center rounded-full bg-[var(--color-accent-soft)] text-action-primary-text\">\n {uploading ? (\n <Loader2 className=\"size-5 animate-spin\" aria-hidden=\"true\" />\n ) : fileName ? (\n <CheckCircle2 className=\"size-5 text-status-success-text\" aria-hidden=\"true\" />\n ) : (\n <UploadCloud className=\"size-5\" aria-hidden=\"true\" />\n )}\n </span>\n <span className=\"min-w-0 flex-1\">\n <span className=\"block truncate text-sm font-medium text-text-primary\">\n {uploading ? 'Uploading…' : fileName ? fileName : 'Click to upload or drag & drop'}\n </span>\n <span className=\"mt-0.5 block text-xs text-text-muted\">\n {fileName ? 'Uploaded · click to replace' : 'PDF, JPG or PNG'}\n </span>\n </span>\n <input\n id={id}\n type=\"file\"\n className=\"sr-only\"\n aria-label={`Upload ${label}`}\n disabled={disabled || uploading}\n onChange={(e) => {\n onSelect(e.target.files);\n e.target.value = '';\n }}\n />\n </label>\n );\n}\n"],"mappings":";;;;;;AAuCA,SAAgB,EAAkB,EAChC,WACA,WACA,aACA,eAAY,CAAC,GACb,kBAAe,MACf,iBACA,cAAW,IACX,iBAAc,IACd,cAAW,OACc;CACzB,IAAM,IAAgB,EAAO,QAAQ,MAAM,EAAe,GAAG,GAAQ,CAAM,CAAC;CAI5E,OAFI,EAAc,WAAW,IAAU,OAGrC,kBAAC,OAAD;EAAK,WAAU;YACZ,EAAc,KAAK,MAAU;GAC5B,IAAM,IAAW,EAAM,SAAS,cAAc,EAAM,SAAS,SAAS,kBAAkB,IAClF,IAAU,GAAG,EAAS,GAAG,EAAM;GACrC,OACE,kBAAC,OAAD;IAAqB,WAAW,EAAG,gBAAgB,CAAQ;cAA3D,CACE,kBAAC,GAAD;KAAO,SAAS;eAAhB,CACG,EAAM,OACN,EAAM,YAAY,kBAAC,QAAD;MAAM,WAAU;gBAAyB;KAAQ,CAAA,CAC/D;QACN,EAAM,SAAS,aACd,kBAAC,GAAD;KACE,IAAI;KACJ,OAAO,EAAO,EAAM,QAAQ;KAC5B,WAAW,MAAM,EAAS,EAAM,KAAK,EAAE,OAAO,KAAK;KACzC;KACV,MAAM;IACP,CAAA,IACC,EAAM,SAAS,WACjB,kBAAC,GAAD;KACE,OAAO,EAAO,EAAM,QAAQ;KAC5B,gBAAgB,MAAM,EAAS,EAAM,KAAK,CAAC;KACjC;eAHZ,CAKE,kBAAC,GAAD;MAAe,IAAI;MAAS,cAAY,EAAM;gBAC5C,kBAAC,GAAD,EAAa,aAAY,UAAW,CAAA;KACvB,CAAA,GACf,kBAAC,GAAD,EAAA,WACI,EAAM,WAAW,CAAC,GAAG,KAAK,MAC1B,kBAAC,GAAD;MAAsB,OAAO;gBAC1B;KACS,GAFK,CAEL,CACb,EACY,CAAA,CACT;SACN,EAAM,SAAS,SACjB,kBAAC,GAAD;KACE,IAAI;KACJ,OAAO,EAAM;KACb,UAAU,EAAU,EAAM;KAC1B,WAAW,MAAiB,EAAM;KAClC,UAAU,KAAY;KACtB,WAAW,MAAS,IAAe,EAAM,KAAK,CAAI;IACnD,CAAA,IAED,kBAAC,GAAD;KACE,IAAI;KACJ,MAAM,EAAM,SAAS,WAAW,WAAW,EAAM,SAAS,SAAS,SAAS;KAC5E,OAAO,EAAO,EAAM,QAAQ;KAC5B,WAAW,MAAM,EAAS,EAAM,KAAK,EAAE,OAAO,KAAK;KACzC;IACX,CAAA,CAEA;MAhDK,EAAM,GAgDX;EAET,CAAC;CACE,CAAA;AAET;AAGA,SAAS,EAAiB,EACxB,OACA,UACA,aACA,cACA,aACA,eAQC;CACD,OACE,kBAAC,SAAD;EACE,SAAS;EACT,WAAW,EACT,4HACA,IAAW,kCAAkC,6CAC7C,KAAa,wBACf;YANF;GAQE,kBAAC,QAAD;IAAM,WAAU;cACb,IACC,kBAAC,GAAD;KAAS,WAAU;KAAsB,eAAY;IAAQ,CAAA,IAC3D,IACF,kBAAC,GAAD;KAAc,WAAU;KAAkC,eAAY;IAAQ,CAAA,IAE9E,kBAAC,GAAD;KAAa,WAAU;KAAS,eAAY;IAAQ,CAAA;GAElD,CAAA;GACN,kBAAC,QAAD;IAAM,WAAU;cAAhB,CACE,kBAAC,QAAD;KAAM,WAAU;eACb,IAAY,eAAe,KAAsB;IAC9C,CAAA,GACN,kBAAC,QAAD;KAAM,WAAU;eACb,IAAW,gCAAgC;IACxC,CAAA,CACF;;GACN,kBAAC,SAAD;IACM;IACJ,MAAK;IACL,WAAU;IACV,cAAY,UAAU;IACtB,UAAU,KAAY;IACtB,WAAW,MAAM;KAEf,AADA,EAAS,EAAE,OAAO,KAAK,GACvB,EAAE,OAAO,QAAQ;IACnB;GACD,CAAA;EACI;;AAEX"}
@@ -1 +1 @@
1
- {"version":3,"file":"BottomTabNav.d.ts","sourceRoot":"","sources":["../../../../src/govcitizenhub/components/mobile/BottomTabNav.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAqBhC,eAAO,MAAM,YAAY,EAAE,EA2C1B,CAAC"}
1
+ {"version":3,"file":"BottomTabNav.d.ts","sourceRoot":"","sources":["../../../../src/govcitizenhub/components/mobile/BottomTabNav.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAqBhC,eAAO,MAAM,YAAY,EAAE,EA2C1B,CAAC"}
@@ -36,16 +36,19 @@ var l = [
36
36
  "aria-label": "Citizen mobile navigation",
37
37
  className: t("fixed inset-x-0 bottom-0 z-40 md:hidden", "border-t border-border-seam bg-bg-surface/95 backdrop-blur-sm", "pb-[max(env(safe-area-inset-bottom),0px)]"),
38
38
  children: /* @__PURE__ */ s("ul", {
39
- className: "grid grid-cols-4",
39
+ className: "flex",
40
40
  children: l.map((e) => {
41
41
  let n = e.path ? `${a}/${e.path}` : a, o = i.pathname === n || e.path === "" && i.pathname === `${a}/`, l = e.icon;
42
- return /* @__PURE__ */ s("li", { children: /* @__PURE__ */ c("button", {
43
- type: "button",
44
- "aria-current": o ? "page" : void 0,
45
- onClick: () => r(e.path ? `m/${e.path}` : "m"),
46
- className: t("flex w-full flex-col items-center gap-1 py-2.5 text-[11px] font-medium transition-colors", o ? "text-action-primary-text" : "text-text-muted hover:text-text-secondary"),
47
- children: [/* @__PURE__ */ s(l, { className: t("size-5", o && "text-action-primary-text") }), e.label]
48
- }) }, e.id);
42
+ return /* @__PURE__ */ s("li", {
43
+ className: "flex-1",
44
+ children: /* @__PURE__ */ c("button", {
45
+ type: "button",
46
+ "aria-current": o ? "page" : void 0,
47
+ onClick: () => r(e.path ? `m/${e.path}` : "m"),
48
+ className: t("flex w-full flex-col items-center gap-1 py-2.5 text-[11px] font-medium transition-colors", o ? "text-action-primary-text" : "text-text-muted hover:text-text-secondary"),
49
+ children: [/* @__PURE__ */ s(l, { className: t("size-5", o && "text-action-primary-text") }), e.label]
50
+ })
51
+ }, e.id);
49
52
  })
50
53
  })
51
54
  });
@@ -1 +1 @@
1
- {"version":3,"file":"BottomTabNav.js","names":[],"sources":["../../../../src/govcitizenhub/components/mobile/BottomTabNav.tsx"],"sourcesContent":["/**\n * BottomTabNav — citizen mobile tab bar (BOFF-4088)\n * @module govcitizenhub/components/mobile\n *\n * A fixed bottom navigation bar for the citizen mobile surface, mounted only\n * inside the `m/*` route subtree so it never appears on the officer/desktop\n * pages. Hidden at and above the `md` breakpoint via `md:hidden` (desktop\n * users reach the same four destinations through the shell's registered\n * side-nav, unaffected by this component).\n *\n * Safe-area aware: pads for the iOS/Android home indicator via\n * `env(safe-area-inset-bottom)` so it does not collide with system gesture\n * chrome inside the Capacitor shell.\n */\n\nimport type { FC } from 'react';\nimport { Home, ClipboardList, ScanLine, UserRound } from 'lucide-react';\nimport { useLocation } from 'react-router-dom';\nimport { useGovCitizenHub } from '../../context';\nimport { cn } from '../../utils/cn';\n\ninterface TabDef {\n id: string;\n label: string;\n /** Path relative to the `m` mobile subtree, e.g. '' for the home tab. */\n path: string;\n icon: FC<{ className?: string }>;\n}\n\nconst TABS: TabDef[] = [\n { id: 'home', label: 'Home', path: '', icon: Home },\n { id: 'requests', label: 'Requests', path: 'requests', icon: ClipboardList },\n { id: 'scan', label: 'Scan', path: 'scan', icon: ScanLine },\n { id: 'profile', label: 'Profile', path: 'profile', icon: UserRound },\n];\n\nexport const BottomTabNav: FC = () => {\n const { getPath, navigateTo } = useGovCitizenHub();\n const location = useLocation();\n const mobileRoot = getPath('m');\n\n return (\n <nav\n aria-label=\"Citizen mobile navigation\"\n className={cn(\n 'fixed inset-x-0 bottom-0 z-40 md:hidden',\n 'border-t border-border-seam bg-bg-surface/95 backdrop-blur-sm',\n 'pb-[max(env(safe-area-inset-bottom),0px)]'\n )}\n >\n <ul className=\"grid grid-cols-4\">\n {TABS.map((tab) => {\n const target = tab.path ? `${mobileRoot}/${tab.path}` : mobileRoot;\n const isActive =\n location.pathname === target ||\n (tab.path === '' && location.pathname === `${mobileRoot}/`);\n const Icon = tab.icon;\n return (\n <li key={tab.id}>\n <button\n type=\"button\"\n aria-current={isActive ? 'page' : undefined}\n onClick={() => navigateTo(tab.path ? `m/${tab.path}` : 'm')}\n className={cn(\n 'flex w-full flex-col items-center gap-1 py-2.5 text-[11px] font-medium transition-colors',\n isActive\n ? 'text-action-primary-text'\n : 'text-text-muted hover:text-text-secondary'\n )}\n >\n <Icon className={cn('size-5', isActive && 'text-action-primary-text')} />\n {tab.label}\n </button>\n </li>\n );\n })}\n </ul>\n </nav>\n );\n};\n"],"mappings":";;;;;;;AA6BA,IAAM,IAAiB;CACrB;EAAE,IAAI;EAAQ,OAAO;EAAQ,MAAM;EAAI,MAAM;CAAK;CAClD;EAAE,IAAI;EAAY,OAAO;EAAY,MAAM;EAAY,MAAM;CAAc;CAC3E;EAAE,IAAI;EAAQ,OAAO;EAAQ,MAAM;EAAQ,MAAM;CAAS;CAC1D;EAAE,IAAI;EAAW,OAAO;EAAW,MAAM;EAAW,MAAM;CAAU;AACtE,GAEa,UAAyB;CACpC,IAAM,EAAE,YAAS,kBAAe,EAAiB,GAC3C,IAAW,EAAY,GACvB,IAAa,EAAQ,GAAG;CAE9B,OACE,kBAAC,OAAD;EACE,cAAW;EACX,WAAW,EACT,2CACA,iEACA,2CACF;YAEA,kBAAC,MAAD;GAAI,WAAU;aACX,EAAK,KAAK,MAAQ;IACjB,IAAM,IAAS,EAAI,OAAO,GAAG,EAAW,GAAG,EAAI,SAAS,GAClD,IACJ,EAAS,aAAa,KACrB,EAAI,SAAS,MAAM,EAAS,aAAa,GAAG,EAAW,IACpD,IAAO,EAAI;IACjB,OACE,kBAAC,MAAD,EAAA,UACE,kBAAC,UAAD;KACE,MAAK;KACL,gBAAc,IAAW,SAAS,KAAA;KAClC,eAAe,EAAW,EAAI,OAAO,KAAK,EAAI,SAAS,GAAG;KAC1D,WAAW,EACT,4FACA,IACI,6BACA,2CACN;eATF,CAWE,kBAAC,GAAD,EAAM,WAAW,EAAG,UAAU,KAAY,0BAA0B,EAAI,CAAA,GACvE,EAAI,KACC;OACN,GAfK,EAAI,EAeT;GAER,CAAC;EACC,CAAA;CACD,CAAA;AAET"}
1
+ {"version":3,"file":"BottomTabNav.js","names":[],"sources":["../../../../src/govcitizenhub/components/mobile/BottomTabNav.tsx"],"sourcesContent":["/**\n * BottomTabNav — citizen mobile tab bar (BOFF-4088)\n * @module govcitizenhub/components/mobile\n *\n * A fixed bottom navigation bar for the citizen mobile surface, mounted only\n * inside the `m/*` route subtree so it never appears on the officer/desktop\n * pages. Hidden at and above the `md` breakpoint via `md:hidden` (desktop\n * users reach the same four destinations through the shell's registered\n * side-nav, unaffected by this component).\n *\n * Safe-area aware: pads for the iOS/Android home indicator via\n * `env(safe-area-inset-bottom)` so it does not collide with system gesture\n * chrome inside the Capacitor shell.\n *\n * Layout uses `flex` (each tab `flex-1`), not `grid`/`grid-cols-4`: build-time\n * MFE composition means only the utility classes the host shell's own Tailwind\n * build already emits reach this MFE at runtime, and `grid` is one of the\n * classes that does not survive — verified live on app.govcitizenhub.com,\n * where an earlier `grid grid-cols-4` build rendered the four tabs stacked\n * full-width instead of a compact bar (same class of issue documented next to\n * the `md:table`/`md:grid` note in ApplicationsPage.tsx's QueueTableRow).\n */\n\nimport type { FC } from 'react';\nimport { Home, ClipboardList, ScanLine, UserRound } from 'lucide-react';\nimport { useLocation } from 'react-router-dom';\nimport { useGovCitizenHub } from '../../context';\nimport { cn } from '../../utils/cn';\n\ninterface TabDef {\n id: string;\n label: string;\n /** Path relative to the `m` mobile subtree, e.g. '' for the home tab. */\n path: string;\n icon: FC<{ className?: string }>;\n}\n\nconst TABS: TabDef[] = [\n { id: 'home', label: 'Home', path: '', icon: Home },\n { id: 'requests', label: 'Requests', path: 'requests', icon: ClipboardList },\n { id: 'scan', label: 'Scan', path: 'scan', icon: ScanLine },\n { id: 'profile', label: 'Profile', path: 'profile', icon: UserRound },\n];\n\nexport const BottomTabNav: FC = () => {\n const { getPath, navigateTo } = useGovCitizenHub();\n const location = useLocation();\n const mobileRoot = getPath('m');\n\n return (\n <nav\n aria-label=\"Citizen mobile navigation\"\n className={cn(\n 'fixed inset-x-0 bottom-0 z-40 md:hidden',\n 'border-t border-border-seam bg-bg-surface/95 backdrop-blur-sm',\n 'pb-[max(env(safe-area-inset-bottom),0px)]'\n )}\n >\n <ul className=\"flex\">\n {TABS.map((tab) => {\n const target = tab.path ? `${mobileRoot}/${tab.path}` : mobileRoot;\n const isActive =\n location.pathname === target ||\n (tab.path === '' && location.pathname === `${mobileRoot}/`);\n const Icon = tab.icon;\n return (\n <li key={tab.id} className=\"flex-1\">\n <button\n type=\"button\"\n aria-current={isActive ? 'page' : undefined}\n onClick={() => navigateTo(tab.path ? `m/${tab.path}` : 'm')}\n className={cn(\n 'flex w-full flex-col items-center gap-1 py-2.5 text-[11px] font-medium transition-colors',\n isActive\n ? 'text-action-primary-text'\n : 'text-text-muted hover:text-text-secondary'\n )}\n >\n <Icon className={cn('size-5', isActive && 'text-action-primary-text')} />\n {tab.label}\n </button>\n </li>\n );\n })}\n </ul>\n </nav>\n );\n};\n"],"mappings":";;;;;;;AAqCA,IAAM,IAAiB;CACrB;EAAE,IAAI;EAAQ,OAAO;EAAQ,MAAM;EAAI,MAAM;CAAK;CAClD;EAAE,IAAI;EAAY,OAAO;EAAY,MAAM;EAAY,MAAM;CAAc;CAC3E;EAAE,IAAI;EAAQ,OAAO;EAAQ,MAAM;EAAQ,MAAM;CAAS;CAC1D;EAAE,IAAI;EAAW,OAAO;EAAW,MAAM;EAAW,MAAM;CAAU;AACtE,GAEa,UAAyB;CACpC,IAAM,EAAE,YAAS,kBAAe,EAAiB,GAC3C,IAAW,EAAY,GACvB,IAAa,EAAQ,GAAG;CAE9B,OACE,kBAAC,OAAD;EACE,cAAW;EACX,WAAW,EACT,2CACA,iEACA,2CACF;YAEA,kBAAC,MAAD;GAAI,WAAU;aACX,EAAK,KAAK,MAAQ;IACjB,IAAM,IAAS,EAAI,OAAO,GAAG,EAAW,GAAG,EAAI,SAAS,GAClD,IACJ,EAAS,aAAa,KACrB,EAAI,SAAS,MAAM,EAAS,aAAa,GAAG,EAAW,IACpD,IAAO,EAAI;IACjB,OACE,kBAAC,MAAD;KAAiB,WAAU;eACzB,kBAAC,UAAD;MACE,MAAK;MACL,gBAAc,IAAW,SAAS,KAAA;MAClC,eAAe,EAAW,EAAI,OAAO,KAAK,EAAI,SAAS,GAAG;MAC1D,WAAW,EACT,4FACA,IACI,6BACA,2CACN;gBATF,CAWE,kBAAC,GAAD,EAAM,WAAW,EAAG,UAAU,KAAY,0BAA0B,EAAI,CAAA,GACvE,EAAI,KACC;;IACN,GAfK,EAAI,EAeT;GAER,CAAC;EACC,CAAA;CACD,CAAA;AAET"}
@@ -1 +1 @@
1
- {"version":3,"file":"ApplicationsPage.d.ts","sourceRoot":"","sources":["../../../../src/govcitizenhub/pages/applications/ApplicationsPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AA4NH,wBAAgB,gBAAgB,4CA6Q/B"}
1
+ {"version":3,"file":"ApplicationsPage.d.ts","sourceRoot":"","sources":["../../../../src/govcitizenhub/pages/applications/ApplicationsPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAwPH,wBAAgB,gBAAgB,4CA8R/B"}