@msqd/lydia 0.0.0-stage → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. package/LICENSE +373 -0
  2. package/README.md +151 -2
  3. package/THIRD_PARTY_NOTICES.md +29 -0
  4. package/dist/Components/Badges/Badge.d.ts +20 -0
  5. package/dist/Components/Badges/Badge.js +33 -0
  6. package/dist/Components/Badges/index.d.ts +1 -0
  7. package/dist/Components/Badges/index.js +4 -0
  8. package/dist/Components/Buttons/Button.d.ts +8 -0
  9. package/dist/Components/Buttons/Button.js +30 -0
  10. package/dist/Components/Buttons/ButtonGroup.d.ts +13 -0
  11. package/dist/Components/Buttons/ButtonGroup.js +61 -0
  12. package/dist/Components/Buttons/index.d.ts +2 -0
  13. package/dist/Components/Buttons/index.js +6 -0
  14. package/dist/Components/Cards/Card.d.ts +38 -0
  15. package/dist/Components/Cards/Card.js +31 -0
  16. package/dist/Components/Cards/StatCard.d.ts +14 -0
  17. package/dist/Components/Cards/StatCard.js +27 -0
  18. package/dist/Components/Cards/index.d.ts +2 -0
  19. package/dist/Components/Cards/index.js +7 -0
  20. package/dist/Components/Charts/Components/ThinBarChart.d.ts +35 -0
  21. package/dist/Components/Charts/Components/ThinBarChart.js +41 -0
  22. package/dist/Components/Charts/Components/WideBarChart.d.ts +48 -0
  23. package/dist/Components/Charts/Components/WideBarChart.js +50 -0
  24. package/dist/Components/Charts/Components/index.d.ts +2 -0
  25. package/dist/Components/Charts/Components/index.js +6 -0
  26. package/dist/Components/Charts/Hooks/index.d.ts +2 -0
  27. package/dist/Components/Charts/Hooks/index.js +7 -0
  28. package/dist/Components/Charts/Hooks/useChartDimensions.d.ts +24 -0
  29. package/dist/Components/Charts/Hooks/useChartDimensions.js +42 -0
  30. package/dist/Components/Charts/Hooks/useThemeColors.d.ts +10 -0
  31. package/dist/Components/Charts/Hooks/useThemeColors.js +51 -0
  32. package/dist/Components/Charts/SummaryPerformancesChart.d.ts +7 -0
  33. package/dist/Components/Charts/SummaryPerformancesChart.js +93 -0
  34. package/dist/Components/Charts/SummaryRateChart.d.ts +9 -0
  35. package/dist/Components/Charts/SummaryRateChart.js +81 -0
  36. package/dist/Components/Charts/TransactionsChart.d.ts +6 -0
  37. package/dist/Components/Charts/TransactionsChart.js +70 -0
  38. package/dist/Components/Charts/Utils/ChartBarCalculator.d.ts +48 -0
  39. package/dist/Components/Charts/Utils/ChartBarCalculator.js +66 -0
  40. package/dist/Components/Charts/Utils/ChartColors.d.ts +13 -0
  41. package/dist/Components/Charts/Utils/ChartColors.js +10 -0
  42. package/dist/Components/Charts/Utils/ChartTooltipFormatter.d.ts +43 -0
  43. package/dist/Components/Charts/Utils/ChartTooltipFormatter.js +57 -0
  44. package/dist/Components/Charts/Utils/ReactEChartsCore.d.ts +4 -0
  45. package/dist/Components/Charts/Utils/ReactEChartsCore.js +5 -0
  46. package/dist/Components/Charts/Utils/ThemeColor.d.ts +21 -0
  47. package/dist/Components/Charts/Utils/ThemeColor.js +54 -0
  48. package/dist/Components/Charts/Utils/TimeFormatter.d.ts +9 -0
  49. package/dist/Components/Charts/Utils/TimeFormatter.js +25 -0
  50. package/dist/Components/Charts/Utils/escapeTooltipHtml.d.ts +6 -0
  51. package/dist/Components/Charts/Utils/escapeTooltipHtml.js +5 -0
  52. package/dist/Components/Charts/Utils/index.d.ts +5 -0
  53. package/dist/Components/Charts/Utils/index.js +14 -0
  54. package/dist/Components/Charts/index.d.ts +6 -0
  55. package/dist/Components/Charts/index.js +29 -0
  56. package/dist/Components/Colors/Colors.d.ts +19 -0
  57. package/dist/Components/Colors/Colors.js +154 -0
  58. package/dist/Components/Colors/index.d.ts +1 -0
  59. package/dist/Components/Colors/index.js +4 -0
  60. package/dist/Components/DataTable/DataTable.d.ts +86 -0
  61. package/dist/Components/DataTable/DataTable.js +122 -0
  62. package/dist/Components/DataTable/Paginator.d.ts +41 -0
  63. package/dist/Components/DataTable/Paginator.js +122 -0
  64. package/dist/Components/DataTable/ProportionBar.d.ts +48 -0
  65. package/dist/Components/DataTable/ProportionBar.js +20 -0
  66. package/dist/Components/DataTable/index.d.ts +3 -0
  67. package/dist/Components/DataTable/index.js +9 -0
  68. package/dist/Components/Dialog/Dialog.d.ts +49 -0
  69. package/dist/Components/Dialog/Dialog.js +83 -0
  70. package/dist/Components/Dialog/Drawer.d.ts +45 -0
  71. package/dist/Components/Dialog/Drawer.js +120 -0
  72. package/dist/Components/Dialog/index.d.ts +3 -0
  73. package/dist/Components/Dialog/index.js +12 -0
  74. package/dist/Components/Dialog/modal.types.d.ts +47 -0
  75. package/dist/Components/Dialog/modal.types.js +8 -0
  76. package/dist/Components/Facets/FacetCount.d.ts +11 -0
  77. package/dist/Components/Facets/FacetCount.js +8 -0
  78. package/dist/Components/Facets/FacetCountsCaption.d.ts +16 -0
  79. package/dist/Components/Facets/FacetCountsCaption.js +14 -0
  80. package/dist/Components/Facets/FacetInnerLightButton.d.ts +10 -0
  81. package/dist/Components/Facets/FacetInnerLightButton.js +17 -0
  82. package/dist/Components/Facets/FacetLabel.d.ts +13 -0
  83. package/dist/Components/Facets/FacetLabel.js +15 -0
  84. package/dist/Components/Facets/FacetList.d.ts +40 -0
  85. package/dist/Components/Facets/FacetList.js +37 -0
  86. package/dist/Components/Facets/FacetListCard.d.ts +38 -0
  87. package/dist/Components/Facets/FacetListCard.js +47 -0
  88. package/dist/Components/Facets/FacetResetLink.d.ts +13 -0
  89. package/dist/Components/Facets/FacetResetLink.js +23 -0
  90. package/dist/Components/Facets/Variants/DateRangeFacet.d.ts +47 -0
  91. package/dist/Components/Facets/Variants/DateRangeFacet.js +51 -0
  92. package/dist/Components/Facets/Variants/MultipleChoiceFacet.d.ts +67 -0
  93. package/dist/Components/Facets/Variants/MultipleChoiceFacet.js +200 -0
  94. package/dist/Components/Facets/Variants/PerformanceFacet.d.ts +61 -0
  95. package/dist/Components/Facets/Variants/PerformanceFacet.js +77 -0
  96. package/dist/Components/Facets/Variants/SingleChoiceFacet.d.ts +56 -0
  97. package/dist/Components/Facets/Variants/SingleChoiceFacet.js +54 -0
  98. package/dist/Components/Facets/Variants/index.d.ts +8 -0
  99. package/dist/Components/Facets/Variants/index.js +10 -0
  100. package/dist/Components/Facets/Variants/nestedValues.d.ts +33 -0
  101. package/dist/Components/Facets/Variants/nestedValues.js +87 -0
  102. package/dist/Components/Facets/index.d.ts +15 -0
  103. package/dist/Components/Facets/index.js +27 -0
  104. package/dist/Components/Formatter/BodyNotice.d.ts +9 -0
  105. package/dist/Components/Formatter/BodyNotice.js +21 -0
  106. package/dist/Components/Formatter/CodeFormatter.d.ts +47 -0
  107. package/dist/Components/Formatter/CodeFormatter.js +47 -0
  108. package/dist/Components/Formatter/HeadersDisplay.d.ts +9 -0
  109. package/dist/Components/Formatter/HeadersDisplay.js +18 -0
  110. package/dist/Components/Formatter/JsonTreeView.d.ts +27 -0
  111. package/dist/Components/Formatter/JsonTreeView.js +145 -0
  112. package/dist/Components/Formatter/PerformanceMetrics.d.ts +27 -0
  113. package/dist/Components/Formatter/PerformanceMetrics.js +29 -0
  114. package/dist/Components/Formatter/SyntaxHighlighter.d.ts +11 -0
  115. package/dist/Components/Formatter/SyntaxHighlighter.js +16 -0
  116. package/dist/Components/Formatter/VirtualizedCodeView.d.ts +24 -0
  117. package/dist/Components/Formatter/VirtualizedCodeView.js +47 -0
  118. package/dist/Components/Formatter/bodyLimits.d.ts +6 -0
  119. package/dist/Components/Formatter/bodyLimits.js +6 -0
  120. package/dist/Components/Formatter/index.d.ts +8 -0
  121. package/dist/Components/Formatter/index.js +16 -0
  122. package/dist/Components/Formatter/syntaxTheme.d.ts +8 -0
  123. package/dist/Components/Formatter/syntaxTheme.js +15 -0
  124. package/dist/Components/Formatter/useCodeHighlighting.d.ts +15 -0
  125. package/dist/Components/Formatter/useCodeHighlighting.js +47 -0
  126. package/dist/Components/Formatter/useVirtualization.d.ts +29 -0
  127. package/dist/Components/Formatter/useVirtualization.js +18 -0
  128. package/dist/Components/Inputs/Checkbox/Checkbox.d.ts +6 -0
  129. package/dist/Components/Inputs/Checkbox/Checkbox.js +75 -0
  130. package/dist/Components/Inputs/Checkbox/index.d.ts +1 -0
  131. package/dist/Components/Inputs/Checkbox/index.js +4 -0
  132. package/dist/Components/Inputs/DateRangeSelector/DateRangeSelector.d.ts +48 -0
  133. package/dist/Components/Inputs/DateRangeSelector/DateRangeSelector.js +71 -0
  134. package/dist/Components/Inputs/DateRangeSelector/index.d.ts +1 -0
  135. package/dist/Components/Inputs/DateRangeSelector/index.js +4 -0
  136. package/dist/Components/Inputs/Field/Field.d.ts +19 -0
  137. package/dist/Components/Inputs/Field/Field.js +35 -0
  138. package/dist/Components/Inputs/Field/index.d.ts +2 -0
  139. package/dist/Components/Inputs/Field/index.js +7 -0
  140. package/dist/Components/Inputs/Field/useField.d.ts +33 -0
  141. package/dist/Components/Inputs/Field/useField.js +36 -0
  142. package/dist/Components/Inputs/Input/Input.d.ts +85 -0
  143. package/dist/Components/Inputs/Input/Input.js +146 -0
  144. package/dist/Components/Inputs/Input/index.d.ts +1 -0
  145. package/dist/Components/Inputs/Input/index.js +4 -0
  146. package/dist/Components/Inputs/InputAddon/InputAddon.d.ts +21 -0
  147. package/dist/Components/Inputs/InputAddon/InputAddon.js +18 -0
  148. package/dist/Components/Inputs/InputAddon/index.d.ts +1 -0
  149. package/dist/Components/Inputs/InputAddon/index.js +4 -0
  150. package/dist/Components/Inputs/InputButton/InputButton.d.ts +21 -0
  151. package/dist/Components/Inputs/InputButton/InputButton.js +29 -0
  152. package/dist/Components/Inputs/InputButton/index.d.ts +1 -0
  153. package/dist/Components/Inputs/InputButton/index.js +4 -0
  154. package/dist/Components/Inputs/InputIcon/InputIcon.d.ts +20 -0
  155. package/dist/Components/Inputs/InputIcon/InputIcon.js +16 -0
  156. package/dist/Components/Inputs/InputIcon/index.d.ts +1 -0
  157. package/dist/Components/Inputs/InputIcon/index.js +4 -0
  158. package/dist/Components/Inputs/KeyboardShortcut/KeyboardShortcut.d.ts +12 -0
  159. package/dist/Components/Inputs/KeyboardShortcut/KeyboardShortcut.js +18 -0
  160. package/dist/Components/Inputs/KeyboardShortcut/index.d.ts +1 -0
  161. package/dist/Components/Inputs/KeyboardShortcut/index.js +4 -0
  162. package/dist/Components/Inputs/Radio/Radio.d.ts +3 -0
  163. package/dist/Components/Inputs/Radio/Radio.js +59 -0
  164. package/dist/Components/Inputs/Radio/index.d.ts +1 -0
  165. package/dist/Components/Inputs/Radio/index.js +4 -0
  166. package/dist/Components/Inputs/SearchInput/SearchInput.d.ts +9 -0
  167. package/dist/Components/Inputs/SearchInput/SearchInput.js +48 -0
  168. package/dist/Components/Inputs/SearchInput/index.d.ts +2 -0
  169. package/dist/Components/Inputs/SearchInput/index.js +4 -0
  170. package/dist/Components/Inputs/Sliders/RangeSlider.d.ts +40 -0
  171. package/dist/Components/Inputs/Sliders/RangeSlider.js +160 -0
  172. package/dist/Components/Inputs/Sliders/index.d.ts +2 -0
  173. package/dist/Components/Inputs/Sliders/index.js +4 -0
  174. package/dist/Components/Inputs/Textarea/Textarea.d.ts +56 -0
  175. package/dist/Components/Inputs/Textarea/Textarea.js +79 -0
  176. package/dist/Components/Inputs/Textarea/index.d.ts +1 -0
  177. package/dist/Components/Inputs/Textarea/index.js +4 -0
  178. package/dist/Components/Inputs/choiceInput.d.ts +12 -0
  179. package/dist/Components/Inputs/choiceInput.js +8 -0
  180. package/dist/Components/Inputs/index.d.ts +11 -0
  181. package/dist/Components/Inputs/index.js +24 -0
  182. package/dist/Components/Layouts/DefaultLayout.d.ts +30 -0
  183. package/dist/Components/Layouts/DefaultLayout.js +25 -0
  184. package/dist/Components/Layouts/index.d.ts +2 -0
  185. package/dist/Components/Layouts/index.js +4 -0
  186. package/dist/Components/NavBar/Assets/defaultAvatar.d.ts +4 -0
  187. package/dist/Components/NavBar/Assets/defaultAvatar.js +28 -0
  188. package/dist/Components/NavBar/Assets/index.d.ts +2 -0
  189. package/dist/Components/NavBar/Assets/index.js +4 -0
  190. package/dist/Components/NavBar/NavBar.d.ts +58 -0
  191. package/dist/Components/NavBar/NavBar.js +141 -0
  192. package/dist/Components/NavBar/index.d.ts +1 -0
  193. package/dist/Components/NavBar/index.js +5 -0
  194. package/dist/Components/Tabs/Tabs.d.ts +24 -0
  195. package/dist/Components/Tabs/Tabs.js +69 -0
  196. package/dist/Components/Tabs/index.d.ts +2 -0
  197. package/dist/Components/Tabs/index.js +5 -0
  198. package/dist/Components/Toast/Toast.d.ts +28 -0
  199. package/dist/Components/Toast/Toast.js +128 -0
  200. package/dist/Components/Toast/ToastContainer.d.ts +29 -0
  201. package/dist/Components/Toast/ToastContainer.js +28 -0
  202. package/dist/Components/Toast/ToastContext.d.ts +103 -0
  203. package/dist/Components/Toast/ToastContext.js +124 -0
  204. package/dist/Components/Toast/index.d.ts +3 -0
  205. package/dist/Components/Toast/index.js +13 -0
  206. package/dist/Components/Typography/HeadingLevel.d.ts +28 -0
  207. package/dist/Components/Typography/HeadingLevel.js +20 -0
  208. package/dist/Components/Typography/Paragraphs.d.ts +8 -0
  209. package/dist/Components/Typography/Paragraphs.js +6 -0
  210. package/dist/Components/Typography/Section.d.ts +8 -0
  211. package/dist/Components/Typography/Section.js +6 -0
  212. package/dist/Components/Typography/Titles.d.ts +31 -0
  213. package/dist/Components/Typography/Titles.js +14 -0
  214. package/dist/Components/Typography/index.d.ts +4 -0
  215. package/dist/Components/Typography/index.js +17 -0
  216. package/dist/Components/Utilities/Foldable.d.ts +42 -0
  217. package/dist/Components/Utilities/Foldable.js +39 -0
  218. package/dist/Components/Utilities/index.d.ts +2 -0
  219. package/dist/Components/Utilities/index.js +6 -0
  220. package/dist/Components/Utilities/useClickOutside.d.ts +21 -0
  221. package/dist/Components/Utilities/useClickOutside.js +23 -0
  222. package/dist/Components/index.d.ts +16 -0
  223. package/dist/Components/index.js +158 -0
  224. package/dist/Elements/Http/CacheBadge.d.ts +13 -0
  225. package/dist/Elements/Http/CacheBadge.js +34 -0
  226. package/dist/Elements/Http/CacheIndicator.d.ts +17 -0
  227. package/dist/Elements/Http/CacheIndicator.js +47 -0
  228. package/dist/Elements/Http/RequestMethodBadge.d.ts +5 -0
  229. package/dist/Elements/Http/RequestMethodBadge.js +13 -0
  230. package/dist/Elements/Http/ResponseStatusBadge.d.ts +19 -0
  231. package/dist/Elements/Http/ResponseStatusBadge.js +20 -0
  232. package/dist/Elements/Http/index.d.ts +4 -0
  233. package/dist/Elements/Http/index.js +10 -0
  234. package/dist/Elements/System/CircuitBreakerStatus.d.ts +11 -0
  235. package/dist/Elements/System/CircuitBreakerStatus.js +98 -0
  236. package/dist/Elements/System/EndpointNode.d.ts +10 -0
  237. package/dist/Elements/System/EndpointNode.js +19 -0
  238. package/dist/Elements/System/EntrypointNode.d.ts +9 -0
  239. package/dist/Elements/System/EntrypointNode.js +17 -0
  240. package/dist/Elements/System/NetworkEdges.d.ts +37 -0
  241. package/dist/Elements/System/NetworkEdges.js +52 -0
  242. package/dist/Elements/System/NetworkMap.d.ts +33 -0
  243. package/dist/Elements/System/NetworkMap.js +121 -0
  244. package/dist/Elements/System/NetworkNode.d.ts +29 -0
  245. package/dist/Elements/System/NetworkNode.js +31 -0
  246. package/dist/Elements/System/ProxyNode.d.ts +8 -0
  247. package/dist/Elements/System/ProxyNode.js +10 -0
  248. package/dist/Elements/System/index.d.ts +9 -0
  249. package/dist/Elements/System/index.js +17 -0
  250. package/dist/Elements/Tpdex/TpdexBadge.d.ts +26 -0
  251. package/dist/Elements/Tpdex/TpdexBadge.js +36 -0
  252. package/dist/Elements/Tpdex/index.d.ts +4 -0
  253. package/dist/Elements/Tpdex/index.js +8 -0
  254. package/dist/Elements/Transactions/TransactionFiltersCard.d.ts +41 -0
  255. package/dist/Elements/Transactions/TransactionFiltersCard.js +121 -0
  256. package/dist/Elements/Transactions/TransactionsExplorerSidebar.d.ts +37 -0
  257. package/dist/Elements/Transactions/TransactionsExplorerSidebar.js +154 -0
  258. package/dist/Elements/Transactions/TransactionsFiltersSidebar.d.ts +22 -0
  259. package/dist/Elements/Transactions/TransactionsFiltersSidebar.js +39 -0
  260. package/dist/Elements/Transactions/index.d.ts +13 -0
  261. package/dist/Elements/Transactions/index.js +9 -0
  262. package/dist/Elements/index.d.ts +18 -0
  263. package/dist/Elements/index.js +38 -0
  264. package/dist/Models/Filters/active.d.ts +12 -0
  265. package/dist/Models/Filters/active.js +10 -0
  266. package/dist/Models/Filters/dates.d.ts +8 -0
  267. package/dist/Models/Filters/dates.js +16 -0
  268. package/dist/Models/Filters/index.d.ts +4 -0
  269. package/dist/Models/Filters/index.js +13 -0
  270. package/dist/Models/Filters/read.d.ts +9 -0
  271. package/dist/Models/Filters/read.js +22 -0
  272. package/dist/Models/Filters/types.d.ts +50 -0
  273. package/dist/Models/Filters/types.js +1 -0
  274. package/dist/Models/Http/body.d.ts +7 -0
  275. package/dist/Models/Http/body.js +6 -0
  276. package/dist/Models/Http/contentDisposition.d.ts +7 -0
  277. package/dist/Models/Http/contentDisposition.js +51 -0
  278. package/dist/Models/Http/dataUrl.d.ts +12 -0
  279. package/dist/Models/Http/dataUrl.js +21 -0
  280. package/dist/Models/Http/headers.d.ts +18 -0
  281. package/dist/Models/Http/headers.js +7 -0
  282. package/dist/Models/Http/index.d.ts +2 -0
  283. package/dist/Models/Http/index.js +6 -0
  284. package/dist/Models/Http/percent.d.ts +5 -0
  285. package/dist/Models/Http/percent.js +17 -0
  286. package/dist/Models/Http/requestTarget.d.ts +11 -0
  287. package/dist/Models/Http/requestTarget.js +7 -0
  288. package/dist/Models/System/index.d.ts +1 -0
  289. package/dist/Models/System/index.js +7 -0
  290. package/dist/Models/System/types.d.ts +20 -0
  291. package/dist/Models/System/types.js +48 -0
  292. package/dist/Models/Tpdex.d.ts +36 -0
  293. package/dist/Models/Tpdex.js +38 -0
  294. package/dist/Models/Transactions/Overview.d.ts +19 -0
  295. package/dist/Models/Transactions/Overview.js +1 -0
  296. package/dist/Models/Transactions/encoding.d.ts +49 -0
  297. package/dist/Models/Transactions/encoding.js +26 -0
  298. package/dist/Models/Transactions/endpoints.d.ts +15 -0
  299. package/dist/Models/Transactions/endpoints.js +21 -0
  300. package/dist/Models/Transactions/facets.d.ts +25 -0
  301. package/dist/Models/Transactions/facets.js +40 -0
  302. package/dist/Models/Transactions/filtering.d.ts +20 -0
  303. package/dist/Models/Transactions/filtering.js +34 -0
  304. package/dist/Models/Transactions/treeDepth.d.ts +2 -0
  305. package/dist/Models/Transactions/treeDepth.js +4 -0
  306. package/dist/Models/Transactions/types.d.ts +58 -0
  307. package/dist/Models/Transactions/types.js +1 -0
  308. package/dist/Models/index.d.ts +10 -0
  309. package/dist/Models/index.js +46 -0
  310. package/dist/Pages/Alerts/AlertsPage.d.ts +18 -0
  311. package/dist/Pages/Alerts/AlertsPage.js +104 -0
  312. package/dist/Pages/Alerts/index.d.ts +1 -0
  313. package/dist/Pages/Alerts/index.js +4 -0
  314. package/dist/Pages/Explorer/ExplorerPage.d.ts +6 -0
  315. package/dist/Pages/Explorer/ExplorerPage.js +55 -0
  316. package/dist/Pages/Explorer/index.d.ts +1 -0
  317. package/dist/Pages/Explorer/index.js +4 -0
  318. package/dist/Pages/Overview/OverviewPage.d.ts +11 -0
  319. package/dist/Pages/Overview/OverviewPage.js +10 -0
  320. package/dist/Pages/Overview/Sections/Components/TransactionsHistoryView.d.ts +7 -0
  321. package/dist/Pages/Overview/Sections/Components/TransactionsHistoryView.js +32 -0
  322. package/dist/Pages/Overview/Sections/Components/index.d.ts +1 -0
  323. package/dist/Pages/Overview/Sections/Components/index.js +4 -0
  324. package/dist/Pages/Overview/Sections/HistorySection.d.ts +18 -0
  325. package/dist/Pages/Overview/Sections/HistorySection.js +21 -0
  326. package/dist/Pages/Overview/Sections/SummarySection.d.ts +44 -0
  327. package/dist/Pages/Overview/Sections/SummarySection.js +127 -0
  328. package/dist/Pages/Overview/index.d.ts +4 -0
  329. package/dist/Pages/Overview/index.js +8 -0
  330. package/dist/Pages/SystemPage/SystemPage.d.ts +8 -0
  331. package/dist/Pages/SystemPage/SystemPage.js +16 -0
  332. package/dist/Pages/SystemPage/index.d.ts +1 -0
  333. package/dist/Pages/SystemPage/index.js +4 -0
  334. package/dist/Pages/Transactions/Detail/Components/DownloadButton.d.ts +33 -0
  335. package/dist/Pages/Transactions/Detail/Components/DownloadButton.js +62 -0
  336. package/dist/Pages/Transactions/Detail/Components/TransactionMessage.d.ts +16 -0
  337. package/dist/Pages/Transactions/Detail/Components/TransactionMessage.js +44 -0
  338. package/dist/Pages/Transactions/Detail/Components/TransactionMetadata.d.ts +21 -0
  339. package/dist/Pages/Transactions/Detail/Components/TransactionMetadata.js +127 -0
  340. package/dist/Pages/Transactions/Detail/Components/index.d.ts +6 -0
  341. package/dist/Pages/Transactions/Detail/Components/index.js +8 -0
  342. package/dist/Pages/Transactions/Detail/TransactionsDetailPage.d.ts +8 -0
  343. package/dist/Pages/Transactions/Detail/TransactionsDetailPage.js +15 -0
  344. package/dist/Pages/Transactions/Detail/Utils/BodyPreview.d.ts +15 -0
  345. package/dist/Pages/Transactions/Detail/Utils/BodyPreview.js +30 -0
  346. package/dist/Pages/Transactions/Detail/Utils/ContentRenderer.d.ts +28 -0
  347. package/dist/Pages/Transactions/Detail/Utils/ContentRenderer.js +115 -0
  348. package/dist/Pages/Transactions/Detail/Utils/index.d.ts +4 -0
  349. package/dist/Pages/Transactions/Detail/Utils/index.js +9 -0
  350. package/dist/Pages/Transactions/Detail/index.d.ts +4 -0
  351. package/dist/Pages/Transactions/Detail/index.js +8 -0
  352. package/dist/Pages/Transactions/List/TransactionsListPage.d.ts +80 -0
  353. package/dist/Pages/Transactions/List/TransactionsListPage.js +220 -0
  354. package/dist/Pages/Transactions/List/index.d.ts +4 -0
  355. package/dist/Pages/Transactions/List/index.js +6 -0
  356. package/dist/Pages/Transactions/List/useClientSideTransactions.d.ts +38 -0
  357. package/dist/Pages/Transactions/List/useClientSideTransactions.js +32 -0
  358. package/dist/Pages/Transactions/index.d.ts +4 -0
  359. package/dist/Pages/Transactions/index.js +6 -0
  360. package/dist/Pages/index.d.ts +5 -0
  361. package/dist/Pages/index.js +18 -0
  362. package/dist/Settings.d.ts +13 -0
  363. package/dist/Settings.js +16 -0
  364. package/dist/css/Components/Formatter/prism.css +79 -0
  365. package/dist/css/Components/Inputs/Input/Input.css +73 -0
  366. package/dist/css/Components/Inputs/Sliders/RangeSliderStyles.css +92 -0
  367. package/dist/css/components.css +6 -0
  368. package/dist/css/fonts/Lato-Bold.woff2 +0 -0
  369. package/dist/css/fonts/Lato-BoldItalic.woff2 +0 -0
  370. package/dist/css/fonts/Lato-Italic.woff2 +0 -0
  371. package/dist/css/fonts/Lato-Regular.woff2 +0 -0
  372. package/dist/css/fonts/OFL.txt +93 -0
  373. package/dist/css/theme.css +109 -0
  374. package/dist/index.d.ts +4 -0
  375. package/dist/index.js +250 -0
  376. package/dist/logo.svg +1 -0
  377. package/dist/styles/styles.css +1 -0
  378. package/package.json +367 -3
@@ -0,0 +1,154 @@
1
+ import { jsx as g, jsxs as l } from "react/jsx-runtime";
2
+ import { useRef as i, useState as m, useEffect as C } from "react";
3
+ import { twMerge as o } from "tailwind-merge";
4
+ import { toEchartsColor as u } from "../Charts/Utils/ThemeColor.js";
5
+ const d = (s) => s.toString(16).padStart(2, "0"), c = (s, a, e) => `#${d(s)}${d(a)}${d(e)}`, y = (s) => {
6
+ const a = document.createElement("canvas").getContext("2d");
7
+ if (!a) return;
8
+ a.fillStyle = s, a.fillRect(0, 0, 1, 1);
9
+ const [e, t, b] = a.getImageData(0, 0, 1, 1).data;
10
+ return c(e, t, b);
11
+ }, p = (s) => {
12
+ const a = u(s) ?? s, e = a.startsWith("rgb") ? a.match(/\d+/g) : null;
13
+ return e && e.length >= 3 ? c(Number(e[0]), Number(e[1]), Number(e[2])) : y(s) ?? s;
14
+ }, x = ({ name: s, bgClass: a, onCopy: e, className: t, ...b }) => {
15
+ const r = i(null), [n, h] = m("");
16
+ return C(() => {
17
+ r.current && h(p(window.getComputedStyle(r.current).backgroundColor));
18
+ }, [a]), /* @__PURE__ */ g("td", { className: o("p-2 text-center border border-gray-200", t), ...b, children: /* @__PURE__ */ l(
19
+ "button",
20
+ {
21
+ type: "button",
22
+ onClick: () => e?.(n),
23
+ className: "flex w-full flex-col items-center gap-1 cursor-pointer transition-all hover:bg-gray-50 rounded",
24
+ children: [
25
+ /* @__PURE__ */ g(
26
+ "div",
27
+ {
28
+ ref: r,
29
+ "aria-hidden": "true",
30
+ className: o("w-12 h-12 rounded border border-gray-300", a)
31
+ }
32
+ ),
33
+ /* @__PURE__ */ g(
34
+ "span",
35
+ {
36
+ "data-hex": !0,
37
+ className: "text-xs text-gray-600",
38
+ style: { fontFamily: 'ui-monospace, SFMono-Regular, "SF Mono", monospace' },
39
+ children: n
40
+ }
41
+ ),
42
+ /* @__PURE__ */ l("span", { className: "sr-only", children: [
43
+ ", copy ",
44
+ s
45
+ ] })
46
+ ]
47
+ }
48
+ ) });
49
+ }, f = [
50
+ {
51
+ name: "Primary",
52
+ variants: [
53
+ { shade: "900", bgClass: "bg-primary-900" },
54
+ { shade: "800", bgClass: "bg-primary-800" },
55
+ { shade: "700", bgClass: "bg-primary-700" },
56
+ { shade: "600", bgClass: "bg-primary-600" },
57
+ { shade: "500", bgClass: "bg-primary-500" },
58
+ { shade: "400", bgClass: "bg-primary-400" },
59
+ { shade: "300", bgClass: "bg-primary-300" },
60
+ { shade: "200", bgClass: "bg-primary-200" },
61
+ { shade: "100", bgClass: "bg-primary-100" },
62
+ { shade: "50", bgClass: "bg-primary-50" }
63
+ ]
64
+ },
65
+ {
66
+ name: "Success",
67
+ variants: [
68
+ { shade: "900", bgClass: "bg-success-900" },
69
+ { shade: "800", bgClass: "bg-success-800" },
70
+ { shade: "700", bgClass: "bg-success-700" },
71
+ { shade: "600", bgClass: "bg-success-600" },
72
+ { shade: "500", bgClass: "bg-success-500" },
73
+ { shade: "400", bgClass: "bg-success-400" },
74
+ { shade: "300", bgClass: "bg-success-300" },
75
+ { shade: "200", bgClass: "bg-success-200" },
76
+ { shade: "100", bgClass: "bg-success-100" },
77
+ { shade: "50", bgClass: "bg-success-50" }
78
+ ]
79
+ },
80
+ {
81
+ name: "Warning",
82
+ variants: [
83
+ { shade: "900", bgClass: "bg-warning-900" },
84
+ { shade: "800", bgClass: "bg-warning-800" },
85
+ { shade: "700", bgClass: "bg-warning-700" },
86
+ { shade: "600", bgClass: "bg-warning-600" },
87
+ { shade: "500", bgClass: "bg-warning-500" },
88
+ { shade: "400", bgClass: "bg-warning-400" },
89
+ { shade: "300", bgClass: "bg-warning-300" },
90
+ { shade: "200", bgClass: "bg-warning-200" },
91
+ { shade: "100", bgClass: "bg-warning-100" },
92
+ { shade: "50", bgClass: "bg-warning-50" }
93
+ ]
94
+ },
95
+ {
96
+ name: "Danger",
97
+ variants: [
98
+ { shade: "900", bgClass: "bg-danger-900" },
99
+ { shade: "800", bgClass: "bg-danger-800" },
100
+ { shade: "700", bgClass: "bg-danger-700" },
101
+ { shade: "600", bgClass: "bg-danger-600" },
102
+ { shade: "500", bgClass: "bg-danger-500" },
103
+ { shade: "400", bgClass: "bg-danger-400" },
104
+ { shade: "300", bgClass: "bg-danger-300" },
105
+ { shade: "200", bgClass: "bg-danger-200" },
106
+ { shade: "100", bgClass: "bg-danger-100" },
107
+ { shade: "50", bgClass: "bg-danger-50" }
108
+ ]
109
+ }
110
+ ], H = ({
111
+ palettes: s = f,
112
+ onCopy: a,
113
+ className: e,
114
+ ...t
115
+ }) => {
116
+ const b = s[0]?.variants.map((r) => r.shade) || [];
117
+ return /* @__PURE__ */ g("div", { className: "overflow-x-auto", children: /* @__PURE__ */ l(
118
+ "table",
119
+ {
120
+ className: o("min-w-full border-collapse bg-white shadow-sm rounded-lg", e),
121
+ role: "table",
122
+ "aria-label": "Color palette table",
123
+ ...t,
124
+ children: [
125
+ /* @__PURE__ */ g("thead", { children: /* @__PURE__ */ l("tr", { className: "bg-gray-50", children: [
126
+ /* @__PURE__ */ g("th", { className: "px-3 py-2 text-left text-sm font-medium text-gray-700 border border-gray-200", children: "Color" }),
127
+ b.map((r) => /* @__PURE__ */ g(
128
+ "th",
129
+ {
130
+ className: "px-2 py-2 text-center text-sm font-medium text-gray-700 border border-gray-200",
131
+ children: r
132
+ },
133
+ r
134
+ ))
135
+ ] }) }),
136
+ /* @__PURE__ */ g("tbody", { children: s.map((r) => /* @__PURE__ */ l("tr", { className: "hover:bg-gray-25", children: [
137
+ /* @__PURE__ */ g("td", { className: "px-3 py-2 text-sm font-medium text-gray-900 border border-gray-200 bg-gray-50", children: r.name }),
138
+ r.variants.map((n) => /* @__PURE__ */ g(
139
+ x,
140
+ {
141
+ name: `${r.name} ${n.shade}`,
142
+ bgClass: n.bgClass,
143
+ onCopy: a
144
+ },
145
+ n.bgClass
146
+ ))
147
+ ] }, r.name)) })
148
+ ]
149
+ }
150
+ ) });
151
+ };
152
+ export {
153
+ H as Colors
154
+ };
@@ -0,0 +1 @@
1
+ export * from "./Colors.js";
@@ -0,0 +1,4 @@
1
+ import { Colors as e } from "./Colors.js";
2
+ export {
3
+ e as Colors
4
+ };
@@ -0,0 +1,86 @@
1
+ import type { ComponentProps, ReactNode } from "react";
2
+ export interface Column<TRow = unknown, TValue = unknown> {
3
+ label: string;
4
+ /** Method syntax on purpose: its parameter is then checked bivariantly, so `Column<TRow, number>` fits `Column<TRow, unknown>`. */
5
+ format?(value: TValue): ReactNode;
6
+ get?: (row: TRow) => TValue;
7
+ onClick?: (row: TRow) => unknown;
8
+ className?: string;
9
+ headerClassName?: string;
10
+ /**
11
+ * Keep the label as the header's name but draw no text, for a column whose
12
+ * cells explain themselves (a star, a checkbox). An empty header names
13
+ * nothing for a screen reader.
14
+ */
15
+ labelHidden?: boolean;
16
+ /**
17
+ * Draw this column's cell as the row's header, `<th scope="row">`, so a
18
+ * screen reader announces it with every other cell of the row. Give it to
19
+ * the one column that names a row, the way a reader would: a path, a name.
20
+ */
21
+ rowHeader?: boolean;
22
+ }
23
+ export interface TypedColumn<TRow, TValue> extends Column<TRow, TValue> {
24
+ get: (row: TRow) => TValue;
25
+ format?(value: TValue): ReactNode;
26
+ }
27
+ export interface SimpleColumn<TRow, K extends keyof TRow> extends Column<TRow, TRow[K]> {
28
+ get?: never;
29
+ format?(value: TRow[K]): ReactNode;
30
+ }
31
+ /**
32
+ * Columns for one row type, with `format` seeing exactly what `get` returned.
33
+ *
34
+ * `types` is keyed by string and typed `Column<TRow, unknown>`, because a table's
35
+ * columns hold different kinds of value and one map has to carry them all.
36
+ * Written directly, that `any` reaches `format`: a column reading a number and
37
+ * formatting it as a string type-checks, and the mistake arrives as
38
+ * `undefined is not a function` in a browser. `TypedColumn` says the right
39
+ * thing and nothing was in a position to apply it, since inference cannot run
40
+ * through the map's own annotation.
41
+ *
42
+ * Call this once per row type and build each column through what it returns:
43
+ *
44
+ * ```tsx
45
+ * const column = columnsFor<Transaction>();
46
+ *
47
+ * const types: Record<string, Column<Transaction, unknown>> = {
48
+ * status: column({
49
+ * label: "Status",
50
+ * get: (row) => row.statusCode, // row is Transaction
51
+ * format: (status) => <StatusBadge code={status} />, // status is number
52
+ * }),
53
+ * };
54
+ * ```
55
+ *
56
+ * The row type is fixed once so it is not repeated on every `get`, and the
57
+ * value type is inferred per column. It is the shape TanStack Table settled on
58
+ * with `createColumnHelper<Row>()`, and for the same reason: TypeScript can
59
+ * infer a value type from a function it is given, and cannot infer one from
60
+ * the type of the map that function's result lands in.
61
+ *
62
+ * **Nothing that already passes a `types` map has to change.** The prop's type
63
+ * is untouched, and what this returns is an ordinary `Column`.
64
+ *
65
+ * This is for a column that computes its value. One that reads a row property
66
+ * straight has no `get` for a value type to be inferred from, and is already
67
+ * served by `SimpleColumn<TRow, K>`.
68
+ */
69
+ export declare function columnsFor<TRow>(): <TValue>(column: TypedColumn<TRow, TValue>) => TypedColumn<TRow, TValue>;
70
+ export type BaseRow = Record<string, unknown>;
71
+ /**
72
+ * `children` is the one table attribute a caller cannot pass: the rows and the
73
+ * header are built from `rows`, `types` and `columns`, so anything handed in
74
+ * here could only be dropped or fight them. `role` is accepted by the type and
75
+ * then overruled — see the comment on the element itself.
76
+ */
77
+ export interface DataTableProps<TRow extends object, TComputed extends object = BaseRow> extends Omit<ComponentProps<"table">, "children"> {
78
+ rows: TRow[];
79
+ types: Record<string, Column<TRow, unknown>>;
80
+ columns?: Array<keyof (TRow & TComputed)>;
81
+ onRowClick?: (row: TRow) => unknown;
82
+ selected?: TRow;
83
+ rowKey?: keyof TRow;
84
+ }
85
+ export declare function DataTable<TRow extends object, TComputed extends object = BaseRow>({ columns, onRowClick, rows, types, selected, rowKey, // rows without an `id` must pass `rowKey`
86
+ className, ...table }: DataTableProps<TRow, TComputed>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,122 @@
1
+ import { jsxs as j, jsx as i } from "react/jsx-runtime";
2
+ import { useRef as H, useEffect as T, isValidElement as C } from "react";
3
+ import { twMerge as I } from "tailwind-merge";
4
+ function F() {
5
+ return (o) => o;
6
+ }
7
+ const J = "min-w-full divide-y divide-gray-300 text-left", M = "whitespace-nowrap px-2 py-3.5 text-left text-sm font-semibold text-gray-900", O = "whitespace-nowrap px-2 py-2 text-sm font-medium text-gray-900";
8
+ function A(o, n, a) {
9
+ try {
10
+ let t;
11
+ return o.get ? t = o.get(n) : t = n[String(a)], o.format ? o.format(t) : t == null || t === "" ? "-" : typeof t == "boolean" ? String(t) : typeof t == "object" && !C(t) ? JSON.stringify(t) : t;
12
+ } catch (t) {
13
+ return console.error(`Error while rendering value of ${String(a)}:
14
+ `, t), "n/a";
15
+ }
16
+ }
17
+ function U({
18
+ columns: o,
19
+ onRowClick: n,
20
+ rows: a,
21
+ types: t,
22
+ selected: f = void 0,
23
+ rowKey: l = "id",
24
+ // rows without an `id` must pass `rowKey`
25
+ className: y,
26
+ ...N
27
+ }) {
28
+ const m = H(null), p = (e) => t[String(e)] !== void 0, g = o?.filter(p), h = JSON.stringify(o?.filter((e) => !p(e)).map(String) ?? []);
29
+ T(() => {
30
+ for (const e of JSON.parse(h))
31
+ console.error(`DataTable: column "${e}" has no entry in \`types\`, it is skipped.`);
32
+ }, [h]);
33
+ const u = (e) => f !== void 0 && e[l] !== void 0 && f[l] !== void 0 && f[l] === e[l], b = a.findIndex(u), S = b === -1 ? 0 : b, d = (e) => {
34
+ const s = m.current?.rows;
35
+ s?.length && s[Math.max(0, Math.min(e, s.length - 1))].focus();
36
+ }, x = (e, s, r) => {
37
+ if (n)
38
+ switch (e.key) {
39
+ case "Enter":
40
+ case " ":
41
+ e.preventDefault(), n(s);
42
+ break;
43
+ case "ArrowDown":
44
+ e.preventDefault(), d(r + 1);
45
+ break;
46
+ case "ArrowUp":
47
+ e.preventDefault(), d(r - 1);
48
+ break;
49
+ case "Home":
50
+ e.preventDefault(), d(0);
51
+ break;
52
+ case "End":
53
+ e.preventDefault(), d(a.length - 1);
54
+ break;
55
+ }
56
+ };
57
+ return (
58
+ /*
59
+ The caller's attributes first, then the two this component owns.
60
+
61
+ `className` is merged rather than replaced, so a caller adding a margin
62
+ does not silently drop the table's own layout.
63
+
64
+ `role` is last, which makes it the component's rather than the caller's.
65
+ A grid only once its rows can be chosen: `aria-selected` on a row means
66
+ nothing on a plain table, and announcing an interactive grid for a table
67
+ nobody can operate is a promise it does not keep. Both halves come from
68
+ the same answer, so a caller setting `role="table"` on a selectable table
69
+ would leave `aria-selected` on rows that are not in a grid. That is the
70
+ lie this component stopped telling, and it is not worth reintroducing
71
+ through a prop.
72
+ */
73
+ /* @__PURE__ */ j("table", { ...N, className: I(J, y), role: n ? "grid" : void 0, children: [
74
+ /* @__PURE__ */ i("thead", { children: /* @__PURE__ */ i("tr", { children: g?.map((e) => {
75
+ const s = String(e), r = t[s];
76
+ return /* @__PURE__ */ i("th", { scope: "col", className: `${M} ${r.headerClassName ?? ""}`, children: r.labelHidden ? /* @__PURE__ */ i("span", { className: "sr-only", children: r.label ?? e }) : r.label ?? e }, s);
77
+ }) }) }),
78
+ /* @__PURE__ */ i("tbody", { ref: m, className: "divide-y divide-gray-200 bg-white", children: a.map((e, s) => /* @__PURE__ */ i(
79
+ "tr",
80
+ {
81
+ onClick: n ? (r) => {
82
+ r.preventDefault(), r.stopPropagation(), n(e);
83
+ } : void 0,
84
+ tabIndex: n ? s === S ? 0 : -1 : void 0,
85
+ "aria-selected": n ? u(e) : void 0,
86
+ onKeyDown: n ? (r) => x(r, e, s) : void 0,
87
+ className: [
88
+ "hover:bg-slate-50",
89
+ // A pointer over a row nothing happens on was a lie the table
90
+ // told before it could be operated at all. And a tab stop with
91
+ // no visible focus is one nobody can follow -- WCAG 2.4.7.
92
+ n ? "cursor-pointer focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-primary-600" : "",
93
+ u(e) ? "bg-slate-100" : ""
94
+ ].filter(Boolean).join(" "),
95
+ children: g?.map((r, D) => {
96
+ const $ = String(r), c = t[$], v = {};
97
+ if (c.onClick !== void 0) {
98
+ const E = c.onClick;
99
+ v.onClick = () => E(e);
100
+ }
101
+ const k = c.rowHeader ? "th" : "td";
102
+ return /* @__PURE__ */ i(
103
+ k,
104
+ {
105
+ scope: c.rowHeader ? "row" : void 0,
106
+ className: `${O} ${c.className ?? ""}`,
107
+ ...v,
108
+ children: A(c, e, r)
109
+ },
110
+ D
111
+ );
112
+ })
113
+ },
114
+ e[l] === void 0 ? s : String(e[l])
115
+ )) })
116
+ ] })
117
+ );
118
+ }
119
+ export {
120
+ U as DataTable,
121
+ F as columnsFor
122
+ };
@@ -0,0 +1,41 @@
1
+ export type PaginatorProps = {
2
+ /**
3
+ * Total number of pages
4
+ */
5
+ pages?: number;
6
+ /**
7
+ * Current page
8
+ */
9
+ current?: number;
10
+ /**
11
+ * Number of items per page
12
+ */
13
+ perPage?: number;
14
+ /**
15
+ * Total number of items
16
+ */
17
+ total?: number;
18
+ /**
19
+ * Additional className to apply
20
+ */
21
+ className?: string;
22
+ /**
23
+ * Function to set the current page
24
+ */
25
+ setPage?: (page: number) => void;
26
+ /**
27
+ * Whether to show the summary of items
28
+ */
29
+ showSummary?: boolean;
30
+ /**
31
+ * The name of its navigation landmark. A page drawing two paginators names
32
+ * them apart, or a screen reader lists one landmark twice.
33
+ */
34
+ label?: string;
35
+ /**
36
+ * Ids of the elements whose text leads the landmark's name, ahead of `label`,
37
+ * for a name that lives in the document rather than in a string.
38
+ */
39
+ labelledBy?: string;
40
+ };
41
+ export declare function Paginator({ pages, current, perPage, total, className, setPage, showSummary, label, labelledBy, }: PaginatorProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,122 @@
1
+ import { jsxs as n, jsx as e, Fragment as N } from "react/jsx-runtime";
2
+ import { generate as w } from "@bramus/pagination-sequence";
3
+ import { ChevronLeftIcon as C, ChevronRightIcon as j } from "@heroicons/react/20/solid";
4
+ import { useId as k } from "react";
5
+ import { twMerge as z } from "tailwind-merge";
6
+ function L({
7
+ pages: h = 1,
8
+ current: s = 1,
9
+ perPage: a = 20,
10
+ total: r = void 0,
11
+ className: p = void 0,
12
+ setPage: i = void 0,
13
+ showSummary: g = !0,
14
+ label: x = "Pagination",
15
+ labelledBy: l = void 0
16
+ }) {
17
+ const c = k(), d = Math.max(1, h), t = Math.max(1, Math.min(s, d)), m = !i || t <= 1, b = !i || t >= d, y = r === 0 ? 0 : (s - 1) * a + 1, v = r === void 0 ? s * a : Math.min(s * a, r);
18
+ return /* @__PURE__ */ n("div", { className: z("flex items-center justify-between border-gray-200 bg-white px-4 py-3 sm:px-6", p), children: [
19
+ /* @__PURE__ */ n("div", { className: "flex flex-1 justify-between sm:hidden", children: [
20
+ /* @__PURE__ */ e(
21
+ "button",
22
+ {
23
+ type: "button",
24
+ disabled: m,
25
+ className: "relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-white",
26
+ onClick: () => i?.(t - 1),
27
+ children: "Previous"
28
+ }
29
+ ),
30
+ /* @__PURE__ */ e(
31
+ "button",
32
+ {
33
+ type: "button",
34
+ disabled: b,
35
+ className: "relative ml-3 inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-white",
36
+ onClick: () => i?.(t + 1),
37
+ children: "Next"
38
+ }
39
+ )
40
+ ] }),
41
+ /* @__PURE__ */ n("div", { className: "hidden sm:flex sm:flex-1 sm:items-center sm:justify-between", children: [
42
+ /* @__PURE__ */ e("div", { className: g ? "" : "invisible", children: /* @__PURE__ */ n("p", { className: "text-sm text-gray-700", children: [
43
+ "Showing ",
44
+ /* @__PURE__ */ e("span", { className: "font-medium", children: y }),
45
+ " to ",
46
+ /* @__PURE__ */ e("span", { className: "font-medium", children: v }),
47
+ r !== void 0 ? /* @__PURE__ */ n(N, { children: [
48
+ " ",
49
+ "of ",
50
+ /* @__PURE__ */ e("span", { className: "font-medium", children: r }),
51
+ " results"
52
+ ] }) : ""
53
+ ] }) }),
54
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ n(
55
+ "nav",
56
+ {
57
+ id: l && c,
58
+ className: "isolate inline-flex -space-x-px rounded-md shadow-sm",
59
+ "aria-label": x,
60
+ "aria-labelledby": l && `${l} ${c}`,
61
+ children: [
62
+ /* @__PURE__ */ n(
63
+ "button",
64
+ {
65
+ type: "button",
66
+ disabled: m,
67
+ className: "relative inline-flex items-center rounded-l-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent",
68
+ onClick: () => i?.(t - 1),
69
+ children: [
70
+ /* @__PURE__ */ e("span", { className: "sr-only", children: "Previous" }),
71
+ /* @__PURE__ */ e(C, { className: "h-5 w-5", "aria-hidden": "true" })
72
+ ]
73
+ }
74
+ ),
75
+ w(t, d, 1, 1, "…").map((o, u) => {
76
+ if (typeof o == "string")
77
+ return /* @__PURE__ */ e(
78
+ "span",
79
+ {
80
+ className: "relative inline-flex items-center px-4 py-2 text-sm font-semibold text-gray-700 ring-1 ring-inset ring-gray-300 focus:outline-offset-0",
81
+ children: "..."
82
+ },
83
+ u
84
+ );
85
+ {
86
+ const f = o === t;
87
+ return /* @__PURE__ */ e(
88
+ "button",
89
+ {
90
+ type: "button",
91
+ disabled: !i,
92
+ "aria-current": f ? "page" : void 0,
93
+ className: f ? "relative z-10 inline-flex items-center bg-primary-600 px-4 py-2 text-sm font-semibold text-white focus:z-20 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600" : "relative inline-flex items-center px-4 py-2 text-sm font-semibold text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:cursor-not-allowed disabled:hover:bg-transparent",
94
+ onClick: () => i?.(o),
95
+ children: o
96
+ },
97
+ u
98
+ );
99
+ }
100
+ }),
101
+ /* @__PURE__ */ n(
102
+ "button",
103
+ {
104
+ type: "button",
105
+ disabled: b,
106
+ className: "relative inline-flex items-center rounded-r-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent",
107
+ onClick: () => i?.(t + 1),
108
+ children: [
109
+ /* @__PURE__ */ e("span", { className: "sr-only", children: "Next" }),
110
+ /* @__PURE__ */ e(j, { className: "h-5 w-5", "aria-hidden": "true" })
111
+ ]
112
+ }
113
+ )
114
+ ]
115
+ }
116
+ ) })
117
+ ] })
118
+ ] });
119
+ }
120
+ export {
121
+ L as Paginator
122
+ };
@@ -0,0 +1,48 @@
1
+ import type { ComponentProps } from "react";
2
+ export interface ProportionBarProps extends Omit<ComponentProps<"div">, "children" | "aria-hidden"> {
3
+ /** What this row measures. */
4
+ value: number;
5
+ /** What the largest bar drawn beside it measures. */
6
+ max: number;
7
+ /**
8
+ * Whether this is the one the others are being measured against.
9
+ *
10
+ * Drawn in a second colour, so the scale has a visible top. Without it a
11
+ * reader has to find the longest bar to know what "long" means here.
12
+ */
13
+ peak?: boolean;
14
+ }
15
+ /**
16
+ * A value drawn against the largest one beside it, for a dense column of them.
17
+ *
18
+ * `1.2 s` means nothing until something else on the page is `3 ms`. This is the
19
+ * comparison, drawn: a thin track per row and a fill scaled to the largest
20
+ * value in view, so a column of numbers reads as a distribution at a glance
21
+ * rather than one number at a time.
22
+ *
23
+ * **Scaled to what is on screen rather than to a fixed ceiling.** What counts
24
+ * as large is a property of the data being looked at, and a fixed scale is
25
+ * wrong for every dataset but one. The caller computes the maximum, because
26
+ * only the caller knows what "beside it" means -- the visible page, the whole
27
+ * result set, or a window.
28
+ *
29
+ * **It is decorative, and hidden from assistive technology.** It says nothing
30
+ * the number beside it does not, so announcing it reads the row twice. That is
31
+ * the whole of its accessibility contract and it is not configurable: a
32
+ * consumer with no number to put beside it wants a labelled `meter`, which is
33
+ * a different component and not this one.
34
+ *
35
+ * **The two colours are the component's own**, rather than the theme's status
36
+ * presets. A peak is not a verdict -- the longest bar is not a failure, a
37
+ * warning or a success -- so `warning` would be saying something untrue about
38
+ * it. These two clear the 3:1 a mark carrying meaning owes, measured against
39
+ * the `gray-100` track rather than the page, since the fill never touches the
40
+ * page: `amber-700` 4.57:1, `gray-500` 4.39:1. `amber-600` is 2.91:1 there.
41
+ *
42
+ * ```tsx
43
+ * const largest = Math.max(...rows.map((row) => row.elapsedMs));
44
+ *
45
+ * <ProportionBar value={row.elapsedMs} max={rows.length > 1 ? largest : 0} peak={row.elapsedMs === largest} />
46
+ * ```
47
+ */
48
+ export declare function ProportionBar({ value, max, peak, className, ...rest }: ProportionBarProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { twMerge as l } from "tailwind-merge";
3
+ function o(t, r) {
4
+ return r <= 0 ? 0 : Math.min(100, Math.max(2, Math.round(t / r * 100)));
5
+ }
6
+ function f({ value: t, max: r, peak: e = !1, className: i, ...n }) {
7
+ return (
8
+ /*
9
+ The caller's attributes first, then what this component owns.
10
+
11
+ `aria-hidden` is last and is refused by the type, for the reason above:
12
+ un-hiding it produces an unnamed graphic that repeats the number beside
13
+ it, which is the failure this component exists to have already decided.
14
+ */
15
+ /* @__PURE__ */ a("div", { ...n, className: l("h-0.5 w-full bg-gray-100", i), "aria-hidden": "true", children: /* @__PURE__ */ a("div", { className: e ? "h-full bg-amber-700" : "h-full bg-gray-500", style: { width: `${o(t, r)}%` } }) })
16
+ );
17
+ }
18
+ export {
19
+ f as ProportionBar
20
+ };
@@ -0,0 +1,3 @@
1
+ export { DataTable, columnsFor, type DataTableProps, type Column, type TypedColumn, type SimpleColumn, type BaseRow, } from "./DataTable.js";
2
+ export { ProportionBar, type ProportionBarProps } from "./ProportionBar.js";
3
+ export { Paginator, type PaginatorProps } from "./Paginator.js";
@@ -0,0 +1,9 @@
1
+ import { DataTable as a, columnsFor as t } from "./DataTable.js";
2
+ import { ProportionBar as m } from "./ProportionBar.js";
3
+ import { Paginator as f } from "./Paginator.js";
4
+ export {
5
+ a as DataTable,
6
+ f as Paginator,
7
+ m as ProportionBar,
8
+ t as columnsFor
9
+ };
@@ -0,0 +1,49 @@
1
+ import { DialogDescription as HeadlessDialogDescription, DialogTitle as HeadlessDialogTitle } from "@headlessui/react";
2
+ import type { ComponentProps } from "react";
3
+ import { type BaseModalProps, type ModalSize } from "./modal.types.js";
4
+ export type DialogSize = ModalSize;
5
+ export interface DialogProps extends BaseModalProps {
6
+ size?: DialogSize;
7
+ }
8
+ /**
9
+ * Dialog component for displaying modal dialogs and popovers.
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * const [isOpen, setIsOpen] = useState(false);
14
+ *
15
+ * <Button onClick={() => setIsOpen(true)}>Open Dialog</Button>
16
+ *
17
+ * <Dialog
18
+ * isOpen={isOpen}
19
+ * onClose={() => setIsOpen(false)}
20
+ * title="Confirmation"
21
+ * description="Are you sure you want to continue with this action?"
22
+ * >
23
+ * <div className="mt-4 flex justify-end space-x-2">
24
+ * <Button variant="secondary" onClick={() => setIsOpen(false)}>
25
+ * Cancel
26
+ * </Button>
27
+ * <Button onClick={() => {
28
+ * // Perform action
29
+ * setIsOpen(false);
30
+ * }}>
31
+ * Confirm
32
+ * </Button>
33
+ * </div>
34
+ * </Dialog>
35
+ * ```
36
+ */
37
+ export declare function Dialog({ isOpen, onClose, title, description, children, size, className, contentClassName, titleClassName, descriptionClassName, showCloseButton, initialFocus, backdrop, ...props }: DialogProps): import("react/jsx-runtime").JSX.Element;
38
+ /**
39
+ * Dialog.Title component for creating accessible dialog titles.
40
+ * Use this when you need more customization than the basic title prop.
41
+ */
42
+ export type DialogTitleProps = ComponentProps<typeof HeadlessDialogTitle>;
43
+ export declare function DialogTitle({ className, ...props }: DialogTitleProps): import("react/jsx-runtime").JSX.Element;
44
+ /**
45
+ * Dialog.Description component for creating accessible dialog descriptions.
46
+ * Use this when you need more customization than the basic description prop.
47
+ */
48
+ export type DialogDescriptionProps = ComponentProps<typeof HeadlessDialogDescription>;
49
+ export declare function DialogDescription({ className, ...props }: DialogDescriptionProps): import("react/jsx-runtime").JSX.Element;