@burdenoff/microfe-theglobalfuel 2026.528.1 → 2026.704.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/dist/dev/main.d.ts +2 -0
  2. package/dist/dev/main.d.ts.map +1 -0
  3. package/dist/index.d.ts +2 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +6 -4
  6. package/dist/node_modules/{clsx → .bun/clsx@2.1.1/node_modules/clsx}/dist/clsx.js +1 -1
  7. package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js.map +1 -0
  8. package/dist/node_modules/{tailwind-merge → .bun/tailwind-merge@3.5.0/node_modules/tailwind-merge}/dist/bundle-mjs.js +170 -212
  9. package/dist/node_modules/.bun/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
  10. package/dist/theglobalfuel/TheGlobalFuelRoot.d.ts +5 -0
  11. package/dist/theglobalfuel/TheGlobalFuelRoot.d.ts.map +1 -0
  12. package/dist/theglobalfuel/TheGlobalFuelRoot.js +109 -161
  13. package/dist/theglobalfuel/TheGlobalFuelRoot.js.map +1 -1
  14. package/dist/theglobalfuel/TheGlobalFuelRoutes.d.ts +4 -0
  15. package/dist/theglobalfuel/TheGlobalFuelRoutes.d.ts.map +1 -0
  16. package/dist/theglobalfuel/TheGlobalFuelRoutes.js +70 -85
  17. package/dist/theglobalfuel/TheGlobalFuelRoutes.js.map +1 -1
  18. package/dist/theglobalfuel/components/DataTable.d.ts +28 -0
  19. package/dist/theglobalfuel/components/DataTable.d.ts.map +1 -0
  20. package/dist/theglobalfuel/components/DataTable.js +71 -0
  21. package/dist/theglobalfuel/components/DataTable.js.map +1 -0
  22. package/dist/theglobalfuel/components/EmptyState.d.ts +18 -0
  23. package/dist/theglobalfuel/components/EmptyState.d.ts.map +1 -0
  24. package/dist/theglobalfuel/components/EmptyState.js +35 -0
  25. package/dist/theglobalfuel/components/EmptyState.js.map +1 -0
  26. package/dist/theglobalfuel/components/EvidenceUpload.d.ts +14 -0
  27. package/dist/theglobalfuel/components/EvidenceUpload.d.ts.map +1 -0
  28. package/dist/theglobalfuel/components/EvidenceUpload.js +93 -0
  29. package/dist/theglobalfuel/components/EvidenceUpload.js.map +1 -0
  30. package/dist/theglobalfuel/components/FileLink.d.ts +15 -0
  31. package/dist/theglobalfuel/components/FileLink.d.ts.map +1 -0
  32. package/dist/theglobalfuel/components/FileLink.js +36 -0
  33. package/dist/theglobalfuel/components/FileLink.js.map +1 -0
  34. package/dist/theglobalfuel/components/FilterTabs.d.ts +18 -0
  35. package/dist/theglobalfuel/components/FilterTabs.d.ts.map +1 -0
  36. package/dist/theglobalfuel/components/FilterTabs.js +27 -0
  37. package/dist/theglobalfuel/components/FilterTabs.js.map +1 -0
  38. package/dist/theglobalfuel/components/MetricsCard.d.ts +23 -0
  39. package/dist/theglobalfuel/components/MetricsCard.d.ts.map +1 -0
  40. package/dist/theglobalfuel/components/MetricsCard.js +64 -0
  41. package/dist/theglobalfuel/components/MetricsCard.js.map +1 -0
  42. package/dist/theglobalfuel/components/MiniBar.d.ts +16 -0
  43. package/dist/theglobalfuel/components/MiniBar.d.ts.map +1 -0
  44. package/dist/theglobalfuel/components/MiniBar.js +22 -0
  45. package/dist/theglobalfuel/components/MiniBar.js.map +1 -0
  46. package/dist/theglobalfuel/components/PageLayout.d.ts +16 -0
  47. package/dist/theglobalfuel/components/PageLayout.d.ts.map +1 -0
  48. package/dist/theglobalfuel/components/PageLayout.js +38 -0
  49. package/dist/theglobalfuel/components/PageLayout.js.map +1 -0
  50. package/dist/theglobalfuel/components/Pagination.d.ts +22 -0
  51. package/dist/theglobalfuel/components/Pagination.d.ts.map +1 -0
  52. package/dist/theglobalfuel/components/Pagination.js +50 -0
  53. package/dist/theglobalfuel/components/Pagination.js.map +1 -0
  54. package/dist/theglobalfuel/components/StateViews.d.ts +24 -0
  55. package/dist/theglobalfuel/components/StateViews.d.ts.map +1 -0
  56. package/dist/theglobalfuel/components/StateViews.js +49 -0
  57. package/dist/theglobalfuel/components/StateViews.js.map +1 -0
  58. package/dist/theglobalfuel/components/StatusBadge.d.ts +9 -0
  59. package/dist/theglobalfuel/components/StatusBadge.d.ts.map +1 -0
  60. package/dist/theglobalfuel/components/StatusBadge.js +73 -0
  61. package/dist/theglobalfuel/components/StatusBadge.js.map +1 -0
  62. package/dist/theglobalfuel/components/Tabs.d.ts +17 -0
  63. package/dist/theglobalfuel/components/Tabs.d.ts.map +1 -0
  64. package/dist/theglobalfuel/components/Tabs.js +31 -0
  65. package/dist/theglobalfuel/components/Tabs.js.map +1 -0
  66. package/dist/theglobalfuel/components/TheDiscussion.d.ts +18 -0
  67. package/dist/theglobalfuel/components/TheDiscussion.d.ts.map +1 -0
  68. package/dist/theglobalfuel/components/TheDiscussion.js +109 -0
  69. package/dist/theglobalfuel/components/TheDiscussion.js.map +1 -0
  70. package/dist/theglobalfuel/components/TheTags.d.ts +17 -0
  71. package/dist/theglobalfuel/components/TheTags.d.ts.map +1 -0
  72. package/dist/theglobalfuel/components/TheTags.js +149 -0
  73. package/dist/theglobalfuel/components/TheTags.js.map +1 -0
  74. package/dist/theglobalfuel/components/index.d.ts +19 -0
  75. package/dist/theglobalfuel/components/index.d.ts.map +1 -0
  76. package/dist/theglobalfuel/components/index.js +14 -0
  77. package/dist/theglobalfuel/context/TheGlobalFuelContext.d.ts +16 -0
  78. package/dist/theglobalfuel/context/TheGlobalFuelContext.d.ts.map +1 -0
  79. package/dist/theglobalfuel/context/TheGlobalFuelContext.js +85 -0
  80. package/dist/theglobalfuel/context/TheGlobalFuelContext.js.map +1 -0
  81. package/dist/theglobalfuel/context/index.d.ts +6 -0
  82. package/dist/theglobalfuel/context/index.d.ts.map +1 -0
  83. package/dist/theglobalfuel/context/index.js +1 -0
  84. package/dist/theglobalfuel/hooks/index.d.ts +10 -0
  85. package/dist/theglobalfuel/hooks/index.d.ts.map +1 -0
  86. package/dist/theglobalfuel/hooks/index.js +5 -0
  87. package/dist/theglobalfuel/hooks/useCursorPager.d.ts +33 -0
  88. package/dist/theglobalfuel/hooks/useCursorPager.d.ts.map +1 -0
  89. package/dist/theglobalfuel/hooks/useCursorPager.js +25 -0
  90. package/dist/theglobalfuel/hooks/useCursorPager.js.map +1 -0
  91. package/dist/theglobalfuel/hooks/useTheComments.d.ts +36 -0
  92. package/dist/theglobalfuel/hooks/useTheComments.d.ts.map +1 -0
  93. package/dist/theglobalfuel/hooks/useTheComments.js +45 -0
  94. package/dist/theglobalfuel/hooks/useTheComments.js.map +1 -0
  95. package/dist/theglobalfuel/hooks/useTheFiles.d.ts +47 -0
  96. package/dist/theglobalfuel/hooks/useTheFiles.d.ts.map +1 -0
  97. package/dist/theglobalfuel/hooks/useTheFiles.js +81 -0
  98. package/dist/theglobalfuel/hooks/useTheFiles.js.map +1 -0
  99. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts +75 -0
  100. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts.map +1 -0
  101. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js +353 -0
  102. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js.map +1 -0
  103. package/dist/theglobalfuel/hooks/useTheTags.d.ts +44 -0
  104. package/dist/theglobalfuel/hooks/useTheTags.d.ts.map +1 -0
  105. package/dist/theglobalfuel/hooks/useTheTags.js +89 -0
  106. package/dist/theglobalfuel/hooks/useTheTags.js.map +1 -0
  107. package/dist/theglobalfuel/index.d.ts +9 -0
  108. package/dist/theglobalfuel/index.d.ts.map +1 -0
  109. package/dist/theglobalfuel/index.js +5 -2
  110. package/dist/theglobalfuel/pages/assets/AssetDetailPage.d.ts +13 -0
  111. package/dist/theglobalfuel/pages/assets/AssetDetailPage.d.ts.map +1 -0
  112. package/dist/theglobalfuel/pages/assets/AssetDetailPage.js +869 -0
  113. package/dist/theglobalfuel/pages/assets/AssetDetailPage.js.map +1 -0
  114. package/dist/theglobalfuel/pages/assets/AssetsPage.d.ts +10 -0
  115. package/dist/theglobalfuel/pages/assets/AssetsPage.d.ts.map +1 -0
  116. package/dist/theglobalfuel/pages/assets/AssetsPage.js +547 -0
  117. package/dist/theglobalfuel/pages/assets/AssetsPage.js.map +1 -0
  118. package/dist/theglobalfuel/pages/compliance/CompliancePage.d.ts +11 -0
  119. package/dist/theglobalfuel/pages/compliance/CompliancePage.d.ts.map +1 -0
  120. package/dist/theglobalfuel/pages/compliance/CompliancePage.js +511 -0
  121. package/dist/theglobalfuel/pages/compliance/CompliancePage.js.map +1 -0
  122. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.d.ts +9 -0
  123. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.d.ts.map +1 -0
  124. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.js +878 -0
  125. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.js.map +1 -0
  126. package/dist/theglobalfuel/pages/contracts/ContractsPage.d.ts +8 -0
  127. package/dist/theglobalfuel/pages/contracts/ContractsPage.d.ts.map +1 -0
  128. package/dist/theglobalfuel/pages/contracts/ContractsPage.js +588 -0
  129. package/dist/theglobalfuel/pages/contracts/ContractsPage.js.map +1 -0
  130. package/dist/theglobalfuel/pages/dashboard/DashboardPage.d.ts +13 -0
  131. package/dist/theglobalfuel/pages/dashboard/DashboardPage.d.ts.map +1 -0
  132. package/dist/theglobalfuel/pages/dashboard/DashboardPage.js +507 -0
  133. package/dist/theglobalfuel/pages/dashboard/DashboardPage.js.map +1 -0
  134. package/dist/theglobalfuel/pages/emissions/EmissionsPage.d.ts +12 -0
  135. package/dist/theglobalfuel/pages/emissions/EmissionsPage.d.ts.map +1 -0
  136. package/dist/theglobalfuel/pages/emissions/EmissionsPage.js +479 -0
  137. package/dist/theglobalfuel/pages/emissions/EmissionsPage.js.map +1 -0
  138. package/dist/theglobalfuel/pages/inventory/InventoryPage.d.ts +11 -0
  139. package/dist/theglobalfuel/pages/inventory/InventoryPage.d.ts.map +1 -0
  140. package/dist/theglobalfuel/pages/inventory/InventoryPage.js +592 -0
  141. package/dist/theglobalfuel/pages/inventory/InventoryPage.js.map +1 -0
  142. package/dist/theglobalfuel/pages/production/ProductionPage.d.ts +11 -0
  143. package/dist/theglobalfuel/pages/production/ProductionPage.d.ts.map +1 -0
  144. package/dist/theglobalfuel/pages/production/ProductionPage.js +421 -0
  145. package/dist/theglobalfuel/pages/production/ProductionPage.js.map +1 -0
  146. package/dist/theglobalfuel/pages/reserves/ReservesPage.d.ts +10 -0
  147. package/dist/theglobalfuel/pages/reserves/ReservesPage.d.ts.map +1 -0
  148. package/dist/theglobalfuel/pages/reserves/ReservesPage.js +439 -0
  149. package/dist/theglobalfuel/pages/reserves/ReservesPage.js.map +1 -0
  150. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.d.ts +10 -0
  151. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.d.ts.map +1 -0
  152. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js +550 -0
  153. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js.map +1 -0
  154. package/dist/theglobalfuel/types/index.d.ts +376 -0
  155. package/dist/theglobalfuel/types/index.d.ts.map +1 -0
  156. package/dist/theglobalfuel/utils/cn.d.ts +4 -0
  157. package/dist/theglobalfuel/utils/cn.d.ts.map +1 -0
  158. package/dist/theglobalfuel/utils/cn.js +2 -2
  159. package/dist/theglobalfuel/utils/formatters.d.ts +36 -0
  160. package/dist/theglobalfuel/utils/formatters.d.ts.map +1 -0
  161. package/dist/theglobalfuel/utils/formatters.js +94 -0
  162. package/dist/theglobalfuel/utils/formatters.js.map +1 -0
  163. package/dist/theglobalfuel/utils/i18n.d.ts +6 -0
  164. package/dist/theglobalfuel/utils/i18n.d.ts.map +1 -0
  165. package/dist/theglobalfuel/utils/index.d.ts +9 -0
  166. package/dist/theglobalfuel/utils/index.d.ts.map +1 -0
  167. package/dist/theglobalfuel/utils/navigation.d.ts +14 -0
  168. package/dist/theglobalfuel/utils/navigation.d.ts.map +1 -0
  169. package/dist/theglobalfuel/utils/navigation.js +2 -1
  170. package/dist/theglobalfuel/utils/navigation.js.map +1 -1
  171. package/package.json +3 -3
  172. package/dist/node_modules/clsx/dist/clsx.js.map +0 -1
  173. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +0 -1
  174. package/dist/theglobalfuel/pages/AiIntelligencePage.js +0 -190
  175. package/dist/theglobalfuel/pages/AiIntelligencePage.js.map +0 -1
  176. package/dist/theglobalfuel/pages/AnalyticsPage.js +0 -241
  177. package/dist/theglobalfuel/pages/AnalyticsPage.js.map +0 -1
  178. package/dist/theglobalfuel/pages/CompliancePage.js +0 -173
  179. package/dist/theglobalfuel/pages/CompliancePage.js.map +0 -1
  180. package/dist/theglobalfuel/pages/DashboardPage.js +0 -145
  181. package/dist/theglobalfuel/pages/DashboardPage.js.map +0 -1
  182. package/dist/theglobalfuel/pages/FinancialPage.js +0 -204
  183. package/dist/theglobalfuel/pages/FinancialPage.js.map +0 -1
  184. package/dist/theglobalfuel/pages/FleetManagementPage.js +0 -244
  185. package/dist/theglobalfuel/pages/FleetManagementPage.js.map +0 -1
  186. package/dist/theglobalfuel/pages/MarketplacePage.js +0 -260
  187. package/dist/theglobalfuel/pages/MarketplacePage.js.map +0 -1
  188. package/dist/theglobalfuel/pages/OperationsPage.js +0 -190
  189. package/dist/theglobalfuel/pages/OperationsPage.js.map +0 -1
  190. package/dist/theglobalfuel/pages/QualityControlPage.js +0 -215
  191. package/dist/theglobalfuel/pages/QualityControlPage.js.map +0 -1
  192. package/dist/theglobalfuel/pages/ReportsPage.js +0 -247
  193. package/dist/theglobalfuel/pages/ReportsPage.js.map +0 -1
  194. package/dist/theglobalfuel/pages/ResourcesPage.js +0 -225
  195. package/dist/theglobalfuel/pages/ResourcesPage.js.map +0 -1
  196. package/dist/theglobalfuel/pages/RiskManagementPage.js +0 -230
  197. package/dist/theglobalfuel/pages/RiskManagementPage.js.map +0 -1
  198. package/dist/theglobalfuel/pages/SupplyChainPage.js +0 -214
  199. package/dist/theglobalfuel/pages/SupplyChainPage.js.map +0 -1
  200. package/dist/theglobalfuel/pages/SustainabilityPage.js +0 -261
  201. package/dist/theglobalfuel/pages/SustainabilityPage.js.map +0 -1
  202. package/dist/theglobalfuel/pages/TrainingPage.js +0 -253
  203. package/dist/theglobalfuel/pages/TrainingPage.js.map +0 -1
  204. package/dist/theglobalfuel/providers/TheGlobalFuelProvider.js +0 -27
  205. package/dist/theglobalfuel/providers/TheGlobalFuelProvider.js.map +0 -1
  206. package/dist/theglobalfuel/store/theglobalfuelStore.js +0 -712
  207. package/dist/theglobalfuel/store/theglobalfuelStore.js.map +0 -1
  208. package/dist/theglobalfuel/utils/i18n.js +0 -15
  209. package/dist/theglobalfuel/utils/i18n.js.map +0 -1
@@ -0,0 +1,71 @@
1
+ import { cn as e } from "../utils/cn.js";
2
+ import { useMemo as t, useState as n } from "react";
3
+ import { ChevronDown as r, ChevronUp as i, ChevronsUpDown as a } from "lucide-react";
4
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
5
+ import { GlassCard as c } from "@burdenoff/fe-libs/ui";
6
+ //#region src/theglobalfuel/components/DataTable.tsx
7
+ var l = {
8
+ left: "text-left",
9
+ right: "text-right",
10
+ center: "text-center"
11
+ };
12
+ function u({ columns: u, rows: d, rowKey: f, onRowClick: p, className: m, defaultSort: h }) {
13
+ let [g, _] = n(h ?? null), v = t(() => {
14
+ if (!g) return d;
15
+ let e = u.find((e) => e.key === g.key);
16
+ if (!e?.sortValue) return d;
17
+ let t = g.dir === "asc" ? 1 : -1;
18
+ return [...d].sort((n, r) => {
19
+ let i = e.sortValue(n), a = e.sortValue(r);
20
+ return i < a ? -1 * t : i > a ? 1 * t : 0;
21
+ });
22
+ }, [
23
+ d,
24
+ g,
25
+ u
26
+ ]), y = (e) => {
27
+ _((t) => t?.key === e ? {
28
+ key: e,
29
+ dir: t.dir === "asc" ? "desc" : "asc"
30
+ } : {
31
+ key: e,
32
+ dir: "asc"
33
+ });
34
+ };
35
+ return /* @__PURE__ */ o(c, {
36
+ treatment: "plain",
37
+ className: e("overflow-hidden", m),
38
+ children: /* @__PURE__ */ o("div", {
39
+ className: "overflow-x-auto",
40
+ children: /* @__PURE__ */ s("table", {
41
+ className: "w-full border-collapse text-sm",
42
+ children: [/* @__PURE__ */ o("thead", { children: /* @__PURE__ */ o("tr", {
43
+ className: "border-b border-border-seam",
44
+ children: u.map((t) => {
45
+ let n = !!t.sortValue, c = g?.key === t.key;
46
+ return /* @__PURE__ */ o("th", {
47
+ onClick: n ? () => y(t.key) : void 0,
48
+ "aria-sort": c ? g?.dir === "asc" ? "ascending" : "descending" : void 0,
49
+ className: e("px-4 py-3 font-medium text-text-secondary whitespace-nowrap", l[t.align ?? "left"], t.hideOnMobile && "hidden md:table-cell", n && "cursor-pointer select-none hover:text-text-primary"),
50
+ children: /* @__PURE__ */ s("span", {
51
+ className: e("inline-flex items-center gap-1", t.align === "right" && "flex-row-reverse"),
52
+ children: [t.header, n && (c ? g?.dir === "asc" ? /* @__PURE__ */ o(i, { className: "h-3.5 w-3.5 text-accent" }) : /* @__PURE__ */ o(r, { className: "h-3.5 w-3.5 text-accent" }) : /* @__PURE__ */ o(a, { className: "h-3.5 w-3.5 opacity-40" }))]
53
+ })
54
+ }, t.key);
55
+ })
56
+ }) }), /* @__PURE__ */ o("tbody", { children: v.map((t) => /* @__PURE__ */ o("tr", {
57
+ onClick: p ? () => p(t) : void 0,
58
+ className: e("group border-b border-border-seam/60 last:border-0", p && "cursor-pointer transition-colors hover:bg-bg-sunken/60"),
59
+ children: u.map((n) => /* @__PURE__ */ o("td", {
60
+ className: e("px-4 py-3 text-text-primary align-middle", l[n.align ?? "left"], n.hideOnMobile && "hidden md:table-cell", n.className),
61
+ children: n.render(t)
62
+ }, n.key))
63
+ }, f(t))) })]
64
+ })
65
+ })
66
+ });
67
+ }
68
+ //#endregion
69
+ export { u as DataTable };
70
+
71
+ //# sourceMappingURL=DataTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTable.js","names":[],"sources":["../../../src/theglobalfuel/components/DataTable.tsx"],"sourcesContent":["/**\n * DataTable — a lightweight, semantic-token table for list pages.\n * @module theglobalfuel/components\n *\n * Deliberately minimal (no external table lib). Renders a responsive,\n * horizontally-scrollable table wrapped in a GlassCard. Columns declare a\n * header, a render fn, optional alignment, and optionally a `sortValue` to make\n * the column click-sortable.\n */\n\nimport { useMemo, useState, type ReactNode } from 'react';\nimport { ChevronUp, ChevronDown, ChevronsUpDown } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\n\nexport interface Column<T> {\n key: string;\n header: ReactNode;\n render: (row: T) => ReactNode;\n align?: 'left' | 'right' | 'center';\n className?: string;\n /** Hide below the `md` breakpoint for a mobile-friendly layout. */\n hideOnMobile?: boolean;\n /** Provide to make this column click-sortable (returns a comparable value). */\n sortValue?: (row: T) => string | number;\n}\n\ninterface DataTableProps<T> {\n columns: Column<T>[];\n rows: T[];\n rowKey: (row: T) => string;\n onRowClick?: (row: T) => void;\n className?: string;\n /** Default sort: a column key + direction. */\n defaultSort?: { key: string; dir: 'asc' | 'desc' };\n}\n\nconst alignClass = {\n left: 'text-left',\n right: 'text-right',\n center: 'text-center',\n} as const;\n\nexport function DataTable<T>({\n columns,\n rows,\n rowKey,\n onRowClick,\n className,\n defaultSort,\n}: DataTableProps<T>) {\n const [sort, setSort] = useState<{ key: string; dir: 'asc' | 'desc' } | null>(\n defaultSort ?? null\n );\n\n const sortedRows = useMemo(() => {\n if (!sort) return rows;\n const col = columns.find((c) => c.key === sort.key);\n if (!col?.sortValue) return rows;\n const dir = sort.dir === 'asc' ? 1 : -1;\n return [...rows].sort((a, b) => {\n const va = col.sortValue!(a);\n const vb = col.sortValue!(b);\n if (va < vb) return -1 * dir;\n if (va > vb) return 1 * dir;\n return 0;\n });\n }, [rows, sort, columns]);\n\n const toggleSort = (key: string) => {\n setSort((prev) =>\n prev?.key === key ? { key, dir: prev.dir === 'asc' ? 'desc' : 'asc' } : { key, dir: 'asc' }\n );\n };\n\n return (\n <GlassCard treatment=\"plain\" className={cn('overflow-hidden', className)}>\n <div className=\"overflow-x-auto\">\n <table className=\"w-full border-collapse text-sm\">\n <thead>\n <tr className=\"border-b border-border-seam\">\n {columns.map((col) => {\n const sortable = Boolean(col.sortValue);\n const active = sort?.key === col.key;\n return (\n <th\n key={col.key}\n onClick={sortable ? () => toggleSort(col.key) : undefined}\n aria-sort={\n active ? (sort?.dir === 'asc' ? 'ascending' : 'descending') : undefined\n }\n className={cn(\n 'px-4 py-3 font-medium text-text-secondary whitespace-nowrap',\n alignClass[col.align ?? 'left'],\n col.hideOnMobile && 'hidden md:table-cell',\n sortable && 'cursor-pointer select-none hover:text-text-primary'\n )}\n >\n <span\n className={cn(\n 'inline-flex items-center gap-1',\n col.align === 'right' && 'flex-row-reverse'\n )}\n >\n {col.header}\n {sortable &&\n (active ? (\n sort?.dir === 'asc' ? (\n <ChevronUp className=\"h-3.5 w-3.5 text-accent\" />\n ) : (\n <ChevronDown className=\"h-3.5 w-3.5 text-accent\" />\n )\n ) : (\n <ChevronsUpDown className=\"h-3.5 w-3.5 opacity-40\" />\n ))}\n </span>\n </th>\n );\n })}\n </tr>\n </thead>\n <tbody>\n {sortedRows.map((row) => (\n <tr\n key={rowKey(row)}\n onClick={onRowClick ? () => onRowClick(row) : undefined}\n className={cn(\n 'group border-b border-border-seam/60 last:border-0',\n onRowClick && 'cursor-pointer transition-colors hover:bg-bg-sunken/60'\n )}\n >\n {columns.map((col) => (\n <td\n key={col.key}\n className={cn(\n 'px-4 py-3 text-text-primary align-middle',\n alignClass[col.align ?? 'left'],\n col.hideOnMobile && 'hidden md:table-cell',\n col.className\n )}\n >\n {col.render(row)}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n </GlassCard>\n );\n}\n"],"mappings":";;;;;;AAqCA,IAAM,IAAa;CACjB,MAAM;CACN,OAAO;CACP,QAAQ;CACT;AAED,SAAgB,EAAa,EAC3B,YACA,SACA,WACA,eACA,cACA,kBACoB;CACpB,IAAM,CAAC,GAAM,KAAW,EACtB,KAAe,KAChB,EAEK,IAAa,QAAc;AAC/B,MAAI,CAAC,EAAM,QAAO;EAClB,IAAM,IAAM,EAAQ,MAAM,MAAM,EAAE,QAAQ,EAAK,IAAI;AACnD,MAAI,CAAC,GAAK,UAAW,QAAO;EAC5B,IAAM,IAAM,EAAK,QAAQ,QAAQ,IAAI;AACrC,SAAO,CAAC,GAAG,EAAK,CAAC,MAAM,GAAG,MAAM;GAC9B,IAAM,IAAK,EAAI,UAAW,EAAE,EACtB,IAAK,EAAI,UAAW,EAAE;AAG5B,UAFI,IAAK,IAAW,KAAK,IACrB,IAAK,IAAW,IAAI,IACjB;IACP;IACD;EAAC;EAAM;EAAM;EAAQ,CAAC,EAEnB,KAAc,MAAgB;AAClC,KAAS,MACP,GAAM,QAAQ,IAAM;GAAE;GAAK,KAAK,EAAK,QAAQ,QAAQ,SAAS;GAAO,GAAG;GAAE;GAAK,KAAK;GAAO,CAC5F;;AAGH,QACE,kBAAC,GAAD;EAAW,WAAU;EAAQ,WAAW,EAAG,mBAAmB,EAAU;YACtE,kBAAC,OAAD;GAAK,WAAU;aACb,kBAAC,SAAD;IAAO,WAAU;cAAjB,CACE,kBAAC,SAAD,EAAA,UACE,kBAAC,MAAD;KAAI,WAAU;eACX,EAAQ,KAAK,MAAQ;MACpB,IAAM,IAAW,EAAQ,EAAI,WACvB,IAAS,GAAM,QAAQ,EAAI;AACjC,aACE,kBAAC,MAAD;OAEE,SAAS,UAAiB,EAAW,EAAI,IAAI,GAAG,KAAA;OAChD,aACE,IAAU,GAAM,QAAQ,QAAQ,cAAc,eAAgB,KAAA;OAEhE,WAAW,EACT,+DACA,EAAW,EAAI,SAAS,SACxB,EAAI,gBAAgB,wBACpB,KAAY,qDACb;iBAED,kBAAC,QAAD;QACE,WAAW,EACT,kCACA,EAAI,UAAU,WAAW,mBAC1B;kBAJH,CAMG,EAAI,QACJ,MACE,IACC,GAAM,QAAQ,QACZ,kBAAC,GAAD,EAAW,WAAU,2BAA4B,CAAA,GAEjD,kBAAC,GAAD,EAAa,WAAU,2BAA4B,CAAA,GAGrD,kBAAC,GAAD,EAAgB,WAAU,0BAA2B,CAAA,EAEpD;;OACJ,EA9BE,EAAI,IA8BN;OAEP;KACC,CAAA,EACC,CAAA,EACR,kBAAC,SAAD,EAAA,UACG,EAAW,KAAK,MACf,kBAAC,MAAD;KAEE,SAAS,UAAmB,EAAW,EAAI,GAAG,KAAA;KAC9C,WAAW,EACT,sDACA,KAAc,yDACf;eAEA,EAAQ,KAAK,MACZ,kBAAC,MAAD;MAEE,WAAW,EACT,4CACA,EAAW,EAAI,SAAS,SACxB,EAAI,gBAAgB,wBACpB,EAAI,UACL;gBAEA,EAAI,OAAO,EAAI;MACb,EATE,EAAI,IASN,CACL;KACC,EApBE,EAAO,EAAI,CAoBb,CACL,EACI,CAAA,CACF;;GACJ,CAAA;EACI,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { FC, ReactNode } from 'react';
2
+
3
+ interface EmptyStateProps {
4
+ icon?: ReactNode;
5
+ /**
6
+ * On-brand illustration name → `/illustrations/<name>.webp`. Standard names:
7
+ * empty-data, empty-search, empty-files, empty-people, empty-notifications,
8
+ * onboarding, empty-generic.
9
+ */
10
+ illustration?: string;
11
+ title: string;
12
+ description?: string;
13
+ action?: ReactNode;
14
+ className?: string;
15
+ }
16
+ export declare const EmptyState: FC<EmptyStateProps>;
17
+ export {};
18
+ //# sourceMappingURL=EmptyState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/components/EmptyState.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3C,UAAU,eAAe;IACvB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA8B1C,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { cn as e } from "../utils/cn.js";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ import { IllustratedEmptyState as r } from "@burdenoff/fe-libs/ui";
4
+ //#region src/theglobalfuel/components/EmptyState.tsx
5
+ var i = ({ icon: i, illustration: a, title: o, description: s, action: c, className: l }) => a ? /* @__PURE__ */ t(r, {
6
+ illustration: a,
7
+ title: o,
8
+ description: s,
9
+ action: c,
10
+ className: l
11
+ }) : /* @__PURE__ */ n("div", {
12
+ className: e("flex flex-col items-center justify-center py-12 px-4 text-center", l),
13
+ children: [
14
+ i && /* @__PURE__ */ t("div", {
15
+ className: "mb-4 text-text-secondary opacity-50",
16
+ children: i
17
+ }),
18
+ /* @__PURE__ */ t("h3", {
19
+ className: "text-lg font-medium text-text-primary",
20
+ children: o
21
+ }),
22
+ s && /* @__PURE__ */ t("p", {
23
+ className: "mt-2 text-sm text-text-secondary max-w-sm",
24
+ children: s
25
+ }),
26
+ c && /* @__PURE__ */ t("div", {
27
+ className: "mt-6",
28
+ children: c
29
+ })
30
+ ]
31
+ });
32
+ //#endregion
33
+ export { i as EmptyState };
34
+
35
+ //# sourceMappingURL=EmptyState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmptyState.js","names":[],"sources":["../../../src/theglobalfuel/components/EmptyState.tsx"],"sourcesContent":["/**\n * Empty State Component\n * @module theglobalfuel/components\n *\n * Boff UI 2.0 zero-state. When an `illustration` name is provided it renders the\n * fe-libs {@link IllustratedEmptyState} (on-brand glass illustration); otherwise\n * it falls back to the icon-based layout.\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\n\ninterface EmptyStateProps {\n icon?: ReactNode;\n /**\n * On-brand illustration name → `/illustrations/<name>.webp`. Standard names:\n * empty-data, empty-search, empty-files, empty-people, empty-notifications,\n * onboarding, empty-generic.\n */\n illustration?: string;\n title: string;\n description?: string;\n action?: ReactNode;\n className?: string;\n}\n\nexport const EmptyState: FC<EmptyStateProps> = ({\n icon,\n illustration,\n title,\n description,\n action,\n className,\n}) => {\n if (illustration) {\n return (\n <IllustratedEmptyState\n illustration={illustration}\n title={title}\n description={description}\n action={action}\n className={className}\n />\n );\n }\n\n return (\n <div\n className={cn('flex flex-col items-center justify-center py-12 px-4 text-center', className)}\n >\n {icon && <div className=\"mb-4 text-text-secondary opacity-50\">{icon}</div>}\n <h3 className=\"text-lg font-medium text-text-primary\">{title}</h3>\n {description && <p className=\"mt-2 text-sm text-text-secondary max-w-sm\">{description}</p>}\n {action && <div className=\"mt-6\">{action}</div>}\n </div>\n );\n};\n"],"mappings":";;;;AA2BA,IAAa,KAAmC,EAC9C,SACA,iBACA,UACA,gBACA,WACA,mBAEI,IAEA,kBAAC,GAAD;CACgB;CACP;CACM;CACL;CACG;CACX,CAAA,GAKJ,kBAAC,OAAD;CACE,WAAW,EAAG,oEAAoE,EAAU;WAD9F;EAGG,KAAQ,kBAAC,OAAD;GAAK,WAAU;aAAuC;GAAW,CAAA;EAC1E,kBAAC,MAAD;GAAI,WAAU;aAAyC;GAAW,CAAA;EACjE,KAAe,kBAAC,KAAD;GAAG,WAAU;aAA6C;GAAgB,CAAA;EACzF,KAAU,kBAAC,OAAD;GAAK,WAAU;aAAQ;GAAa,CAAA;EAC3C"}
@@ -0,0 +1,14 @@
1
+ import { UploadedTheFile } from '../hooks';
2
+
3
+ interface EvidenceUploadProps {
4
+ id: string;
5
+ label: string;
6
+ value: UploadedTheFile | null;
7
+ onChange: (value: UploadedTheFile | null) => void;
8
+ accept?: string;
9
+ disabled?: boolean;
10
+ hint?: string;
11
+ }
12
+ export declare function EvidenceUpload({ id, label, value, onChange, accept, disabled, hint, }: EvidenceUploadProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
14
+ //# sourceMappingURL=EvidenceUpload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EvidenceUpload.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/components/EvidenceUpload.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAElE,UAAU,mBAAmB;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,eAAe,GAAG,IAAI,CAAC;IAC9B,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,CAAC;IAClD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,cAAc,CAAC,EAC7B,EAAE,EACF,KAAK,EACL,KAAK,EACL,QAAQ,EACR,MAA0C,EAC1C,QAAgB,EAChB,IAAI,GACL,EAAE,mBAAmB,2CAkFrB"}
@@ -0,0 +1,93 @@
1
+ import { useTheFileUpload as e } from "../hooks/useTheFiles.js";
2
+ import "../hooks/index.js";
3
+ import { useRef as t } from "react";
4
+ import { Paperclip as n, Upload as r, X as i } from "lucide-react";
5
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
+ import { Button as s, Label as c, Spinner as l } from "@burdenoff/fe-libs/ui";
7
+ //#region src/theglobalfuel/components/EvidenceUpload.tsx
8
+ function u({ id: u, label: d, value: f, onChange: p, accept: m = "image/*,application/pdf,audio/*", disabled: h = !1, hint: g }) {
9
+ let _ = t(null), { upload: v, isUploading: y, progress: b, error: x, reset: S } = e();
10
+ return /* @__PURE__ */ o("div", {
11
+ className: "grid gap-1.5",
12
+ children: [
13
+ /* @__PURE__ */ a(c, {
14
+ htmlFor: u,
15
+ children: d
16
+ }),
17
+ /* @__PURE__ */ a("input", {
18
+ ref: _,
19
+ id: u,
20
+ type: "file",
21
+ accept: m,
22
+ className: "hidden",
23
+ disabled: h || y,
24
+ onChange: async (e) => {
25
+ let t = e.target.files?.[0];
26
+ if (e.target.value = "", t) try {
27
+ p(await v(t));
28
+ } catch {}
29
+ }
30
+ }),
31
+ f ? /* @__PURE__ */ o("div", {
32
+ className: "flex items-center gap-2 rounded-lg border border-border-seam bg-bg-sunken/60 px-3 py-2",
33
+ children: [
34
+ /* @__PURE__ */ a(n, { className: "h-4 w-4 shrink-0 text-text-tertiary" }),
35
+ /* @__PURE__ */ a("span", {
36
+ className: "min-w-0 flex-1 truncate text-sm text-text-primary",
37
+ title: f.fileName,
38
+ children: f.fileName
39
+ }),
40
+ /* @__PURE__ */ a("button", {
41
+ type: "button",
42
+ onClick: () => {
43
+ S(), p(null);
44
+ },
45
+ disabled: h,
46
+ "aria-label": "Remove attachment",
47
+ className: "rounded-md p-1 text-text-tertiary hover:bg-bg-sunken hover:text-text-primary",
48
+ children: /* @__PURE__ */ a(i, { className: "h-4 w-4" })
49
+ })
50
+ ]
51
+ }) : y ? /* @__PURE__ */ o("div", {
52
+ className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-sunken/60 px-3 py-2",
53
+ children: [
54
+ /* @__PURE__ */ a(l, { size: "sm" }),
55
+ /* @__PURE__ */ o("span", {
56
+ className: "text-sm text-text-secondary",
57
+ children: [
58
+ "Uploading… ",
59
+ b,
60
+ "%"
61
+ ]
62
+ }),
63
+ /* @__PURE__ */ a("div", {
64
+ className: "ml-auto h-1.5 w-24 overflow-hidden rounded-full bg-bg-sunken",
65
+ children: /* @__PURE__ */ a("div", {
66
+ className: "h-full rounded-full bg-action-primary-bg transition-[width] duration-150",
67
+ style: { width: `${b}%` }
68
+ })
69
+ })
70
+ ]
71
+ }) : /* @__PURE__ */ o(s, {
72
+ type: "button",
73
+ variant: "outline",
74
+ disabled: h,
75
+ onClick: () => _.current?.click(),
76
+ className: "justify-start",
77
+ children: [/* @__PURE__ */ a(r, { className: "mr-1.5 h-4 w-4" }), " Choose file"]
78
+ }),
79
+ g && !x && /* @__PURE__ */ a("p", {
80
+ className: "text-xs text-text-tertiary",
81
+ children: g
82
+ }),
83
+ x && /* @__PURE__ */ a("p", {
84
+ className: "text-xs text-status-error-text",
85
+ children: x
86
+ })
87
+ ]
88
+ });
89
+ }
90
+ //#endregion
91
+ export { u as EvidenceUpload };
92
+
93
+ //# sourceMappingURL=EvidenceUpload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EvidenceUpload.js","names":[],"sources":["../../../src/theglobalfuel/components/EvidenceUpload.tsx"],"sourcesContent":["/**\n * EvidenceUpload — a controlled file-attach control (Integration A).\n * @module theglobalfuel/components/EvidenceUpload\n *\n * Wraps `useTheFileUpload` (the wspace-files 3-step flow). On file select it\n * uploads, shows byte-progress + the filename, and emits `{ fileId, fileName }`\n * via `onChange`. The parent stores `fileId` and passes it to the eco mutation\n * (`ecoRecordObservation.evidenceFileId`, `ecoPublishReport.fileId`).\n */\n\nimport { useRef, type ChangeEvent } from 'react';\nimport { Paperclip, Upload, X } from 'lucide-react';\nimport { Button, Label, Spinner } from '@burdenoff/fe-libs/ui';\nimport { useTheFileUpload, type UploadedTheFile } from '../hooks';\n\ninterface EvidenceUploadProps {\n id: string;\n label: string;\n value: UploadedTheFile | null;\n onChange: (value: UploadedTheFile | null) => void;\n accept?: string;\n disabled?: boolean;\n hint?: string;\n}\n\nexport function EvidenceUpload({\n id,\n label,\n value,\n onChange,\n accept = 'image/*,application/pdf,audio/*',\n disabled = false,\n hint,\n}: EvidenceUploadProps) {\n const inputRef = useRef<HTMLInputElement>(null);\n const { upload, isUploading, progress, error, reset } = useTheFileUpload();\n\n const handleSelect = async (event: ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files?.[0];\n // Clear the native input so the same file can be re-selected after a remove.\n event.target.value = '';\n if (!file) return;\n try {\n const uploaded = await upload(file);\n onChange(uploaded);\n } catch {\n // Error surfaced inline via `error`; keep the form usable.\n }\n };\n\n const handleRemove = () => {\n reset();\n onChange(null);\n };\n\n return (\n <div className=\"grid gap-1.5\">\n <Label htmlFor={id}>{label}</Label>\n\n <input\n ref={inputRef}\n id={id}\n type=\"file\"\n accept={accept}\n className=\"hidden\"\n disabled={disabled || isUploading}\n onChange={handleSelect}\n />\n\n {value ? (\n <div className=\"flex items-center gap-2 rounded-lg border border-border-seam bg-bg-sunken/60 px-3 py-2\">\n <Paperclip className=\"h-4 w-4 shrink-0 text-text-tertiary\" />\n <span\n className=\"min-w-0 flex-1 truncate text-sm text-text-primary\"\n title={value.fileName}\n >\n {value.fileName}\n </span>\n <button\n type=\"button\"\n onClick={handleRemove}\n disabled={disabled}\n aria-label=\"Remove attachment\"\n className=\"rounded-md p-1 text-text-tertiary hover:bg-bg-sunken hover:text-text-primary\"\n >\n <X className=\"h-4 w-4\" />\n </button>\n </div>\n ) : isUploading ? (\n <div className=\"flex items-center gap-3 rounded-lg border border-border-seam bg-bg-sunken/60 px-3 py-2\">\n <Spinner size=\"sm\" />\n <span className=\"text-sm text-text-secondary\">Uploading… {progress}%</span>\n <div className=\"ml-auto h-1.5 w-24 overflow-hidden rounded-full bg-bg-sunken\">\n <div\n className=\"h-full rounded-full bg-action-primary-bg transition-[width] duration-150\"\n style={{ width: `${progress}%` }}\n />\n </div>\n </div>\n ) : (\n <Button\n type=\"button\"\n variant=\"outline\"\n disabled={disabled}\n onClick={() => inputRef.current?.click()}\n className=\"justify-start\"\n >\n <Upload className=\"mr-1.5 h-4 w-4\" /> Choose file\n </Button>\n )}\n\n {hint && !error && <p className=\"text-xs text-text-tertiary\">{hint}</p>}\n {error && <p className=\"text-xs text-status-error-text\">{error}</p>}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAyBA,SAAgB,EAAe,EAC7B,OACA,UACA,UACA,aACA,YAAS,mCACT,cAAW,IACX,WACsB;CACtB,IAAM,IAAW,EAAyB,KAAK,EACzC,EAAE,WAAQ,gBAAa,aAAU,UAAO,aAAU,GAAkB;AAoB1E,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,GAAD;IAAO,SAAS;cAAK;IAAc,CAAA;GAEnC,kBAAC,SAAD;IACE,KAAK;IACD;IACJ,MAAK;IACG;IACR,WAAU;IACV,UAAU,KAAY;IACtB,UA7Be,OAAO,MAAyC;KACnE,IAAM,IAAO,EAAM,OAAO,QAAQ;AAElC,WAAM,OAAO,QAAQ,IAChB,EACL,KAAI;AAEF,QADiB,MAAM,EAAO,EAAK,CACjB;aACZ;;IAsBJ,CAAA;GAED,IACC,kBAAC,OAAD;IAAK,WAAU;cAAf;KACE,kBAAC,GAAD,EAAW,WAAU,uCAAwC,CAAA;KAC7D,kBAAC,QAAD;MACE,WAAU;MACV,OAAO,EAAM;gBAEZ,EAAM;MACF,CAAA;KACP,kBAAC,UAAD;MACE,MAAK;MACL,eA9BiB;AAEzB,OADA,GAAO,EACP,EAAS,KAAK;;MA6BI;MACV,cAAW;MACX,WAAU;gBAEV,kBAAC,GAAD,EAAG,WAAU,WAAY,CAAA;MAClB,CAAA;KACL;QACJ,IACF,kBAAC,OAAD;IAAK,WAAU;cAAf;KACE,kBAAC,GAAD,EAAS,MAAK,MAAO,CAAA;KACrB,kBAAC,QAAD;MAAM,WAAU;gBAAhB;OAA8C;OAAY;OAAS;OAAQ;;KAC3E,kBAAC,OAAD;MAAK,WAAU;gBACb,kBAAC,OAAD;OACE,WAAU;OACV,OAAO,EAAE,OAAO,GAAG,EAAS,IAAI;OAChC,CAAA;MACE,CAAA;KACF;QAEN,kBAAC,GAAD;IACE,MAAK;IACL,SAAQ;IACE;IACV,eAAe,EAAS,SAAS,OAAO;IACxC,WAAU;cALZ,CAOE,kBAAC,GAAD,EAAQ,WAAU,kBAAmB,CAAA,EAAA,eAC9B;;GAGV,KAAQ,CAAC,KAAS,kBAAC,KAAD;IAAG,WAAU;cAA8B;IAAS,CAAA;GACtE,KAAS,kBAAC,KAAD;IAAG,WAAU;cAAkC;IAAU,CAAA;GAC/D"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * FileLink — resolves a federated File id to a download link (Integration A).
3
+ * @module theglobalfuel/components/FileLink
4
+ *
5
+ * The eco queries select `evidence { id }` / `file { id }` (just the id). This
6
+ * resolves the platform File via `getFile(id)` for its name + signed
7
+ * `downloadUrl` so evidence/report artifacts render as a real link.
8
+ */
9
+ interface FileLinkProps {
10
+ fileId: string | null | undefined;
11
+ className?: string;
12
+ }
13
+ export declare function FileLink({ fileId, className }: FileLinkProps): import("react/jsx-runtime").JSX.Element | null;
14
+ export {};
15
+ //# sourceMappingURL=FileLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileLink.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/components/FileLink.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,UAAU,aAAa;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,QAAQ,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,aAAa,kDA0C5D"}
@@ -0,0 +1,36 @@
1
+ import { useTheFile as e } from "../hooks/useTheFiles.js";
2
+ import "../hooks/index.js";
3
+ import { FileText as t, Loader2 as n } from "lucide-react";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ //#region src/theglobalfuel/components/FileLink.tsx
6
+ function a({ fileId: a, className: o }) {
7
+ let { data: s, isLoading: c, isError: l } = e(a);
8
+ return a ? c ? /* @__PURE__ */ i("span", {
9
+ className: "inline-flex items-center gap-1.5 text-sm text-text-tertiary",
10
+ children: [/* @__PURE__ */ r(n, { className: "h-3.5 w-3.5 animate-spin" }), " Loading attachment…"]
11
+ }) : l || !s ? /* @__PURE__ */ i("span", {
12
+ className: "inline-flex items-center gap-1.5 text-sm text-text-tertiary",
13
+ children: [/* @__PURE__ */ r(t, { className: "h-3.5 w-3.5" }), " Attachment unavailable"]
14
+ }) : s.downloadUrl ? /* @__PURE__ */ i("a", {
15
+ href: s.downloadUrl,
16
+ target: "_blank",
17
+ rel: "noopener noreferrer",
18
+ className: o ?? "inline-flex items-center gap-1.5 text-sm font-medium text-action-primary-bg hover:underline",
19
+ children: [
20
+ /* @__PURE__ */ r(t, { className: "h-3.5 w-3.5" }),
21
+ " ",
22
+ s.name
23
+ ]
24
+ }) : /* @__PURE__ */ i("span", {
25
+ className: o ?? "inline-flex items-center gap-1.5 text-sm text-text-secondary",
26
+ children: [
27
+ /* @__PURE__ */ r(t, { className: "h-3.5 w-3.5" }),
28
+ " ",
29
+ s.name
30
+ ]
31
+ }) : null;
32
+ }
33
+ //#endregion
34
+ export { a as FileLink };
35
+
36
+ //# sourceMappingURL=FileLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileLink.js","names":[],"sources":["../../../src/theglobalfuel/components/FileLink.tsx"],"sourcesContent":["/**\n * FileLink — resolves a federated File id to a download link (Integration A).\n * @module theglobalfuel/components/FileLink\n *\n * The eco queries select `evidence { id }` / `file { id }` (just the id). This\n * resolves the platform File via `getFile(id)` for its name + signed\n * `downloadUrl` so evidence/report artifacts render as a real link.\n */\n\nimport { FileText, Loader2 } from 'lucide-react';\nimport { useTheFile } from '../hooks';\n\ninterface FileLinkProps {\n fileId: string | null | undefined;\n className?: string;\n}\n\nexport function FileLink({ fileId, className }: FileLinkProps) {\n const { data, isLoading, isError } = useTheFile(fileId);\n\n if (!fileId) return null;\n\n if (isLoading) {\n return (\n <span className=\"inline-flex items-center gap-1.5 text-sm text-text-tertiary\">\n <Loader2 className=\"h-3.5 w-3.5 animate-spin\" /> Loading attachment…\n </span>\n );\n }\n\n if (isError || !data) {\n return (\n <span className=\"inline-flex items-center gap-1.5 text-sm text-text-tertiary\">\n <FileText className=\"h-3.5 w-3.5\" /> Attachment unavailable\n </span>\n );\n }\n\n const base =\n 'inline-flex items-center gap-1.5 text-sm font-medium text-action-primary-bg hover:underline';\n\n if (!data.downloadUrl) {\n return (\n <span className={className ?? 'inline-flex items-center gap-1.5 text-sm text-text-secondary'}>\n <FileText className=\"h-3.5 w-3.5\" /> {data.name}\n </span>\n );\n }\n\n return (\n <a\n href={data.downloadUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={className ?? base}\n >\n <FileText className=\"h-3.5 w-3.5\" /> {data.name}\n </a>\n );\n}\n"],"mappings":";;;;;AAiBA,SAAgB,EAAS,EAAE,WAAQ,gBAA4B;CAC7D,IAAM,EAAE,SAAM,cAAW,eAAY,EAAW,EAAO;AA+BvD,QA7BK,IAED,IAEA,kBAAC,QAAD;EAAM,WAAU;YAAhB,CACE,kBAAC,GAAD,EAAS,WAAU,4BAA6B,CAAA,EAAA,uBAC3C;MAIP,KAAW,CAAC,IAEZ,kBAAC,QAAD;EAAM,WAAU;YAAhB,CACE,kBAAC,GAAD,EAAU,WAAU,eAAgB,CAAA,EAAA,0BAC/B;MAON,EAAK,cASR,kBAAC,KAAD;EACE,MAAM,EAAK;EACX,QAAO;EACP,KAAI;EACJ,WAAW,KAAa;YAJ1B;GAME,kBAAC,GAAD,EAAU,WAAU,eAAgB,CAAA;;GAAE,EAAK;GACzC;MAdF,kBAAC,QAAD;EAAM,WAAW,KAAa;YAA9B;GACE,kBAAC,GAAD,EAAU,WAAU,eAAgB,CAAA;;GAAE,EAAK;GACtC;MAzBS"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * FilterTabs — a segmented status/enum filter control.
3
+ * @module theglobalfuel/components
4
+ */
5
+ export interface FilterOption<V extends string> {
6
+ value: V;
7
+ label: string;
8
+ count?: number;
9
+ }
10
+ interface FilterTabsProps<V extends string> {
11
+ options: FilterOption<V>[];
12
+ value: V;
13
+ onChange: (value: V) => void;
14
+ className?: string;
15
+ }
16
+ export declare function FilterTabs<V extends string>({ options, value, onChange, className, }: FilterTabsProps<V>): import("react/jsx-runtime").JSX.Element;
17
+ export {};
18
+ //# sourceMappingURL=FilterTabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilterTabs.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/components/FilterTabs.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,MAAM;IAC5C,KAAK,EAAE,CAAC,CAAC;IACT,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,eAAe,CAAC,CAAC,SAAS,MAAM;IACxC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3B,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,EAC3C,OAAO,EACP,KAAK,EACL,QAAQ,EACR,SAAS,GACV,EAAE,eAAe,CAAC,CAAC,CAAC,2CAyCpB"}
@@ -0,0 +1,27 @@
1
+ import { cn as e } from "../utils/cn.js";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ //#region src/theglobalfuel/components/FilterTabs.tsx
4
+ function r({ options: r, value: i, onChange: a, className: o }) {
5
+ return /* @__PURE__ */ t("div", {
6
+ role: "tablist",
7
+ className: e("inline-flex flex-wrap items-center gap-1 rounded-xl border border-border-seam bg-bg-surface p-1", o),
8
+ children: r.map((r) => {
9
+ let o = r.value === i;
10
+ return /* @__PURE__ */ n("button", {
11
+ type: "button",
12
+ role: "tab",
13
+ "aria-selected": o,
14
+ onClick: () => a(r.value),
15
+ className: e("rounded-lg px-3 py-1.5 text-sm font-medium transition-colors", o ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
16
+ children: [r.label, typeof r.count == "number" && /* @__PURE__ */ t("span", {
17
+ className: e("ml-1.5 rounded-full px-1.5 py-0.5 text-xs tabular-nums", o ? "bg-black/10 dark:bg-white/15" : "bg-bg-sunken"),
18
+ children: r.count
19
+ })]
20
+ }, r.value);
21
+ })
22
+ });
23
+ }
24
+ //#endregion
25
+ export { r as FilterTabs };
26
+
27
+ //# sourceMappingURL=FilterTabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilterTabs.js","names":[],"sources":["../../../src/theglobalfuel/components/FilterTabs.tsx"],"sourcesContent":["/**\n * FilterTabs — a segmented status/enum filter control.\n * @module theglobalfuel/components\n */\n\nimport { cn } from '../utils/cn';\n\nexport interface FilterOption<V extends string> {\n value: V;\n label: string;\n count?: number;\n}\n\ninterface FilterTabsProps<V extends string> {\n options: FilterOption<V>[];\n value: V;\n onChange: (value: V) => void;\n className?: string;\n}\n\nexport function FilterTabs<V extends string>({\n options,\n value,\n onChange,\n className,\n}: FilterTabsProps<V>) {\n return (\n <div\n role=\"tablist\"\n className={cn(\n 'inline-flex flex-wrap items-center gap-1 rounded-xl border border-border-seam bg-bg-surface p-1',\n className\n )}\n >\n {options.map((opt) => {\n const active = opt.value === value;\n return (\n <button\n key={opt.value}\n type=\"button\"\n role=\"tab\"\n aria-selected={active}\n onClick={() => onChange(opt.value)}\n className={cn(\n 'rounded-lg px-3 py-1.5 text-sm font-medium transition-colors',\n active\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'text-text-secondary hover:bg-bg-sunken hover:text-text-primary'\n )}\n >\n {opt.label}\n {typeof opt.count === 'number' && (\n <span\n className={cn(\n 'ml-1.5 rounded-full px-1.5 py-0.5 text-xs tabular-nums',\n active ? 'bg-black/10 dark:bg-white/15' : 'bg-bg-sunken'\n )}\n >\n {opt.count}\n </span>\n )}\n </button>\n );\n })}\n </div>\n );\n}\n"],"mappings":";;;AAoBA,SAAgB,EAA6B,EAC3C,YACA,UACA,aACA,gBACqB;AACrB,QACE,kBAAC,OAAD;EACE,MAAK;EACL,WAAW,EACT,mGACA,EACD;YAEA,EAAQ,KAAK,MAAQ;GACpB,IAAM,IAAS,EAAI,UAAU;AAC7B,UACE,kBAAC,UAAD;IAEE,MAAK;IACL,MAAK;IACL,iBAAe;IACf,eAAe,EAAS,EAAI,MAAM;IAClC,WAAW,EACT,gEACA,IACI,kDACA,iEACL;cAXH,CAaG,EAAI,OACJ,OAAO,EAAI,SAAU,YACpB,kBAAC,QAAD;KACE,WAAW,EACT,0DACA,IAAS,iCAAiC,eAC3C;eAEA,EAAI;KACA,CAAA,CAEF;MAvBF,EAAI,MAuBF;IAEX;EACE,CAAA"}
@@ -0,0 +1,23 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { TrendDirection } from '../types';
3
+
4
+ type Accent = 'success' | 'warning' | 'error';
5
+ interface MetricsCardProps {
6
+ icon: ReactNode;
7
+ value: string | number;
8
+ label: string;
9
+ trend?: TrendDirection;
10
+ trendValue?: string;
11
+ className?: string;
12
+ /** Render as the page's hero metric (glass treatment + accent glow). */
13
+ featured?: boolean;
14
+ /** Severity accent — tints the icon and adds a soft top-edge glow. */
15
+ accent?: Accent;
16
+ /** Optional pill shown in the top-right (e.g. "Critical"). */
17
+ pill?: ReactNode;
18
+ /** Optional slot under the value (e.g. a MiniBar or sub-label). */
19
+ footer?: ReactNode;
20
+ }
21
+ export declare const MetricsCard: FC<MetricsCardProps>;
22
+ export {};
23
+ //# sourceMappingURL=MetricsCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MetricsCard.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/components/MetricsCard.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,KAAK,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAE9C,UAAU,gBAAgB;IACxB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sEAAsE;IACtE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8DAA8D;IAC9D,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,mEAAmE;IACnE,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAoBD,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAsC5C,CAAC"}
@@ -0,0 +1,64 @@
1
+ import { cn as e } from "../utils/cn.js";
2
+ import { Minus as t, TrendingDown as n, TrendingUp as r } from "lucide-react";
3
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
4
+ import { GlassCard as o } from "@burdenoff/fe-libs/ui";
5
+ //#region src/theglobalfuel/components/MetricsCard.tsx
6
+ var s = {
7
+ up: {
8
+ icon: r,
9
+ color: "text-status-success-text"
10
+ },
11
+ down: {
12
+ icon: n,
13
+ color: "text-status-error-text"
14
+ },
15
+ neutral: {
16
+ icon: t,
17
+ color: "text-text-secondary"
18
+ }
19
+ }, c = {
20
+ success: "text-status-success-text",
21
+ warning: "text-status-warning-text",
22
+ error: "text-status-error-text"
23
+ }, l = {
24
+ success: "shadow-[inset_0_1px_0_0_var(--color-status-success-text)]",
25
+ warning: "shadow-[inset_0_1px_0_0_var(--color-status-warning-text)]",
26
+ error: "shadow-[inset_0_1px_0_0_var(--color-status-error-text)]"
27
+ }, u = ({ icon: t, value: n, label: r, trend: u, trendValue: d, className: f, featured: p = !1, accent: m, pill: h, footer: g }) => {
28
+ let _ = u ? s[u] : null, v = _?.icon;
29
+ return /* @__PURE__ */ a(o, {
30
+ treatment: p ? "glass" : "metric",
31
+ glow: p,
32
+ className: e("p-6", m && l[m], f),
33
+ children: [/* @__PURE__ */ a("div", {
34
+ className: "flex items-center justify-between",
35
+ children: [/* @__PURE__ */ i("div", {
36
+ className: e("text-text-secondary", m && c[m]),
37
+ children: t
38
+ }), h ?? (u && _ && v ? /* @__PURE__ */ a("div", {
39
+ className: e("flex items-center gap-1 text-xs font-medium", _.color),
40
+ children: [/* @__PURE__ */ i(v, { className: "h-3.5 w-3.5" }), d && /* @__PURE__ */ i("span", { children: d })]
41
+ }) : null)]
42
+ }), /* @__PURE__ */ a("div", {
43
+ className: "mt-3",
44
+ children: [
45
+ /* @__PURE__ */ i("p", {
46
+ className: "text-2xl font-bold text-text-primary tabular-nums",
47
+ children: n
48
+ }),
49
+ /* @__PURE__ */ i("p", {
50
+ className: "mt-1 text-sm text-text-secondary",
51
+ children: r
52
+ }),
53
+ g && /* @__PURE__ */ i("div", {
54
+ className: "mt-3",
55
+ children: g
56
+ })
57
+ ]
58
+ })]
59
+ });
60
+ };
61
+ //#endregion
62
+ export { u as MetricsCard };
63
+
64
+ //# sourceMappingURL=MetricsCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MetricsCard.js","names":[],"sources":["../../../src/theglobalfuel/components/MetricsCard.tsx"],"sourcesContent":["/**\n * Metrics Card Component\n * @module theglobalfuel/components\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { TrendingUp, TrendingDown, Minus } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\nimport type { TrendDirection } from '../types';\n\ntype Accent = 'success' | 'warning' | 'error';\n\ninterface MetricsCardProps {\n icon: ReactNode;\n value: string | number;\n label: string;\n trend?: TrendDirection;\n trendValue?: string;\n className?: string;\n /** Render as the page's hero metric (glass treatment + accent glow). */\n featured?: boolean;\n /** Severity accent — tints the icon and adds a soft top-edge glow. */\n accent?: Accent;\n /** Optional pill shown in the top-right (e.g. \"Critical\"). */\n pill?: ReactNode;\n /** Optional slot under the value (e.g. a MiniBar or sub-label). */\n footer?: ReactNode;\n}\n\nconst trendConfig: Record<TrendDirection, { icon: typeof TrendingUp; color: string }> = {\n up: { icon: TrendingUp, color: 'text-status-success-text' },\n down: { icon: TrendingDown, color: 'text-status-error-text' },\n neutral: { icon: Minus, color: 'text-text-secondary' },\n};\n\nconst accentIcon: Record<Accent, string> = {\n success: 'text-status-success-text',\n warning: 'text-status-warning-text',\n error: 'text-status-error-text',\n};\n\nconst accentGlow: Record<Accent, string> = {\n success: 'shadow-[inset_0_1px_0_0_var(--color-status-success-text)]',\n warning: 'shadow-[inset_0_1px_0_0_var(--color-status-warning-text)]',\n error: 'shadow-[inset_0_1px_0_0_var(--color-status-error-text)]',\n};\n\nexport const MetricsCard: FC<MetricsCardProps> = ({\n icon,\n value,\n label,\n trend,\n trendValue,\n className,\n featured = false,\n accent,\n pill,\n footer,\n}) => {\n const trendInfo = trend ? trendConfig[trend] : null;\n const TrendIcon = trendInfo?.icon;\n\n return (\n <GlassCard\n treatment={featured ? 'glass' : 'metric'}\n glow={featured}\n className={cn('p-6', accent && accentGlow[accent], className)}\n >\n <div className=\"flex items-center justify-between\">\n <div className={cn('text-text-secondary', accent && accentIcon[accent])}>{icon}</div>\n {pill ??\n (trend && trendInfo && TrendIcon ? (\n <div className={cn('flex items-center gap-1 text-xs font-medium', trendInfo.color)}>\n <TrendIcon className=\"h-3.5 w-3.5\" />\n {trendValue && <span>{trendValue}</span>}\n </div>\n ) : null)}\n </div>\n <div className=\"mt-3\">\n <p className=\"text-2xl font-bold text-text-primary tabular-nums\">{value}</p>\n <p className=\"mt-1 text-sm text-text-secondary\">{label}</p>\n {footer && <div className=\"mt-3\">{footer}</div>}\n </div>\n </GlassCard>\n );\n};\n"],"mappings":";;;;;AA8BA,IAAM,IAAkF;CACtF,IAAI;EAAE,MAAM;EAAY,OAAO;EAA4B;CAC3D,MAAM;EAAE,MAAM;EAAc,OAAO;EAA0B;CAC7D,SAAS;EAAE,MAAM;EAAO,OAAO;EAAuB;CACvD,EAEK,IAAqC;CACzC,SAAS;CACT,SAAS;CACT,OAAO;CACR,EAEK,IAAqC;CACzC,SAAS;CACT,SAAS;CACT,OAAO;CACR,EAEY,KAAqC,EAChD,SACA,UACA,UACA,UACA,eACA,cACA,cAAW,IACX,WACA,SACA,gBACI;CACJ,IAAM,IAAY,IAAQ,EAAY,KAAS,MACzC,IAAY,GAAW;AAE7B,QACE,kBAAC,GAAD;EACE,WAAW,IAAW,UAAU;EAChC,MAAM;EACN,WAAW,EAAG,OAAO,KAAU,EAAW,IAAS,EAAU;YAH/D,CAKE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,OAAD;IAAK,WAAW,EAAG,uBAAuB,KAAU,EAAW,GAAQ;cAAG;IAAW,CAAA,EACpF,MACE,KAAS,KAAa,IACrB,kBAAC,OAAD;IAAK,WAAW,EAAG,+CAA+C,EAAU,MAAM;cAAlF,CACE,kBAAC,GAAD,EAAW,WAAU,eAAgB,CAAA,EACpC,KAAc,kBAAC,QAAD,EAAA,UAAO,GAAkB,CAAA,CACpC;QACJ,MACF;MACN,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,KAAD;KAAG,WAAU;eAAqD;KAAU,CAAA;IAC5E,kBAAC,KAAD;KAAG,WAAU;eAAoC;KAAU,CAAA;IAC1D,KAAU,kBAAC,OAAD;KAAK,WAAU;eAAQ;KAAa,CAAA;IAC3C;KACI"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * MiniBar — a thin inline progress bar (target progress, completion, breach %).
3
+ * @module theglobalfuel/components
4
+ */
5
+ interface MiniBarProps {
6
+ /** 0–100. */
7
+ value: number;
8
+ className?: string;
9
+ /** Bar fill token class (defaults to accent). */
10
+ barClassName?: string;
11
+ /** Height in px. */
12
+ height?: number;
13
+ }
14
+ export declare function MiniBar({ value, className, barClassName, height, }: MiniBarProps): import("react/jsx-runtime").JSX.Element;
15
+ export {};
16
+ //# sourceMappingURL=MiniBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MiniBar.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/components/MiniBar.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,UAAU,YAAY;IACpB,aAAa;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,SAAS,EACT,YAA0B,EAC1B,MAAU,GACX,EAAE,YAAY,2CAiBd"}
@@ -0,0 +1,22 @@
1
+ import { cn as e } from "../utils/cn.js";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ //#region src/theglobalfuel/components/MiniBar.tsx
4
+ function n({ value: n, className: r, barClassName: i = "bg-accent", height: a = 6 }) {
5
+ let o = Math.max(0, Math.min(100, n));
6
+ return /* @__PURE__ */ t("div", {
7
+ className: e("w-full overflow-hidden rounded-full bg-bg-sunken", r),
8
+ style: { height: a },
9
+ role: "progressbar",
10
+ "aria-valuenow": Math.round(o),
11
+ "aria-valuemin": 0,
12
+ "aria-valuemax": 100,
13
+ children: /* @__PURE__ */ t("div", {
14
+ className: e("h-full rounded-full transition-[width] duration-700 ease-out", i),
15
+ style: { width: `${o}%` }
16
+ })
17
+ });
18
+ }
19
+ //#endregion
20
+ export { n as MiniBar };
21
+
22
+ //# sourceMappingURL=MiniBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MiniBar.js","names":[],"sources":["../../../src/theglobalfuel/components/MiniBar.tsx"],"sourcesContent":["/**\n * MiniBar — a thin inline progress bar (target progress, completion, breach %).\n * @module theglobalfuel/components\n */\n\nimport { cn } from '../utils/cn';\n\ninterface MiniBarProps {\n /** 0–100. */\n value: number;\n className?: string;\n /** Bar fill token class (defaults to accent). */\n barClassName?: string;\n /** Height in px. */\n height?: number;\n}\n\nexport function MiniBar({\n value,\n className,\n barClassName = 'bg-accent',\n height = 6,\n}: MiniBarProps) {\n const clamped = Math.max(0, Math.min(100, value));\n return (\n <div\n className={cn('w-full overflow-hidden rounded-full bg-bg-sunken', className)}\n style={{ height }}\n role=\"progressbar\"\n aria-valuenow={Math.round(clamped)}\n aria-valuemin={0}\n aria-valuemax={100}\n >\n <div\n className={cn('h-full rounded-full transition-[width] duration-700 ease-out', barClassName)}\n style={{ width: `${clamped}%` }}\n />\n </div>\n );\n}\n"],"mappings":";;;AAiBA,SAAgB,EAAQ,EACtB,UACA,cACA,kBAAe,aACf,YAAS,KACM;CACf,IAAM,IAAU,KAAK,IAAI,GAAG,KAAK,IAAI,KAAK,EAAM,CAAC;AACjD,QACE,kBAAC,OAAD;EACE,WAAW,EAAG,oDAAoD,EAAU;EAC5E,OAAO,EAAE,WAAQ;EACjB,MAAK;EACL,iBAAe,KAAK,MAAM,EAAQ;EAClC,iBAAe;EACf,iBAAe;YAEf,kBAAC,OAAD;GACE,WAAW,EAAG,gEAAgE,EAAa;GAC3F,OAAO,EAAE,OAAO,GAAG,EAAQ,IAAI;GAC/B,CAAA;EACE,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { FC, ReactNode } from 'react';
2
+
3
+ interface PageLayoutProps {
4
+ title: ReactNode;
5
+ description?: string;
6
+ actions?: ReactNode;
7
+ children: ReactNode;
8
+ className?: string;
9
+ /** Render the title as a gradient hero heading (reserve for the ONE primary page). */
10
+ titleGradient?: boolean;
11
+ /** Drop a subtle living-glass aurora behind the header (primary page only). */
12
+ aurora?: boolean;
13
+ }
14
+ export declare const PageLayout: FC<PageLayoutProps>;
15
+ export {};
16
+ //# sourceMappingURL=PageLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageLayout.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/components/PageLayout.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3C,UAAU,eAAe;IACvB,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sFAAsF;IACtF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,+EAA+E;IAC/E,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAoC1C,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { cn as e } from "../utils/cn.js";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ import { AuroraBackground as r, GradientText as i } from "@burdenoff/fe-libs/ui";
4
+ //#region src/theglobalfuel/components/PageLayout.tsx
5
+ var a = ({ title: a, description: o, actions: s, children: c, className: l, titleGradient: u = !1, aurora: d = !1 }) => /* @__PURE__ */ n("div", {
6
+ className: e("flex flex-col h-full", l),
7
+ children: [/* @__PURE__ */ n("div", {
8
+ className: e("relative flex flex-col gap-3 px-6 py-4 border-b border-border-seam sm:flex-row sm:items-center sm:justify-between sm:gap-4", d ? "overflow-hidden bg-gloss-card" : "bg-bg-surface"),
9
+ children: [
10
+ d && /* @__PURE__ */ t(r, { intensity: "subtle" }),
11
+ /* @__PURE__ */ n("div", {
12
+ className: "min-w-0",
13
+ children: [u && typeof a == "string" ? /* @__PURE__ */ t(i, {
14
+ as: "h1",
15
+ className: "text-2xl font-semibold tracking-tight",
16
+ children: a
17
+ }) : /* @__PURE__ */ t("h1", {
18
+ className: "text-2xl font-semibold text-text-primary",
19
+ children: a
20
+ }), o && /* @__PURE__ */ t("p", {
21
+ className: "mt-1 text-sm text-text-secondary",
22
+ children: o
23
+ })]
24
+ }),
25
+ s && /* @__PURE__ */ t("div", {
26
+ className: "flex flex-wrap items-center gap-3 shrink-0 max-sm:w-full",
27
+ children: s
28
+ })
29
+ ]
30
+ }), /* @__PURE__ */ t("div", {
31
+ className: "flex-1 overflow-auto p-6",
32
+ children: c
33
+ })]
34
+ });
35
+ //#endregion
36
+ export { a as PageLayout };
37
+
38
+ //# sourceMappingURL=PageLayout.js.map