@bundle-stats/ui 4.23.0-beta.1 → 4.23.0-beta.11

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 (330) hide show
  1. package/lib/app/app.js +16 -5
  2. package/lib/app/app.js.map +1 -1
  3. package/lib/app/app.module.css +13 -9
  4. package/lib/app/header/header.module.css +1 -3
  5. package/lib/components/asset-name/asset-name.js +8 -7
  6. package/lib/components/asset-name/asset-name.js.map +1 -1
  7. package/lib/components/asset-name/asset-name.module.css +11 -10
  8. package/lib/components/bundle-assets/bundle-assets.js +4 -2
  9. package/lib/components/bundle-assets/bundle-assets.js.map +1 -1
  10. package/lib/components/bundle-assets/bundle-assets.module.css +0 -12
  11. package/lib/components/bundle-assets/index.js +2 -1
  12. package/lib/components/bundle-assets/index.js.map +1 -1
  13. package/lib/components/bundle-assets-totals/bundle-assets-totals.js +4 -2
  14. package/lib/components/bundle-assets-totals/bundle-assets-totals.js.map +1 -1
  15. package/lib/components/bundle-modules/bundle-modules.js +5 -3
  16. package/lib/components/bundle-modules/bundle-modules.js.map +1 -1
  17. package/lib/components/bundle-modules/bundle-modules.module.css +2 -16
  18. package/lib/components/bundle-modules/index.js +2 -1
  19. package/lib/components/bundle-modules/index.js.map +1 -1
  20. package/lib/components/bundle-packages/bundle-packages.js +5 -3
  21. package/lib/components/bundle-packages/bundle-packages.js.map +1 -1
  22. package/lib/components/bundle-packages/bundle-packages.module.css +18 -22
  23. package/lib/components/entry-info/entry-info.js +4 -2
  24. package/lib/components/entry-info/entry-info.js.map +1 -1
  25. package/lib/components/entry-info/entry-info.module.css +8 -2
  26. package/lib/components/jobs-header/jobs-header.js +1 -1
  27. package/lib/components/jobs-header/jobs-header.js.map +1 -1
  28. package/lib/components/jobs-header/jobs-header.module.css +0 -1
  29. package/lib/components/metric-change-legend/metric-change-legend.js +2 -2
  30. package/lib/components/metric-change-legend/metric-change-legend.js.map +1 -1
  31. package/lib/components/metric-change-legend/metric-change-legend.module.css +11 -0
  32. package/lib/components/metric-run-info/metric-run-info.js +4 -11
  33. package/lib/components/metric-run-info/metric-run-info.js.map +1 -1
  34. package/lib/components/metrics-display-selector/metrics-display-selector.module.css +4 -4
  35. package/lib/components/metrics-table/metrics-table.js +31 -20
  36. package/lib/components/metrics-table/metrics-table.js.map +1 -1
  37. package/lib/components/metrics-table/metrics-table.module.css +4 -12
  38. package/lib/components/metrics-table-options/metrics-table-options.js +5 -6
  39. package/lib/components/metrics-table-options/metrics-table-options.js.map +1 -1
  40. package/lib/components/metrics-table-row-count/index.js +18 -0
  41. package/lib/components/metrics-table-row-count/index.js.map +1 -0
  42. package/lib/components/metrics-table-row-count/metrics-table-row-count.js +17 -0
  43. package/lib/components/metrics-table-row-count/metrics-table-row-count.js.map +1 -0
  44. package/lib/components/metrics-table-row-count/metrics-table-row-count.module.css +5 -0
  45. package/lib/components/metrics-treemap/metrics-treemap.constants.js +3 -1
  46. package/lib/components/metrics-treemap/metrics-treemap.constants.js.map +1 -1
  47. package/lib/components/metrics-treemap/metrics-treemap.js +46 -113
  48. package/lib/components/metrics-treemap/metrics-treemap.js.map +1 -1
  49. package/lib/components/metrics-treemap/metrics-treemap.module.css +3 -274
  50. package/lib/components/metrics-treemap/metrics-treemap.utils.js +81 -16
  51. package/lib/components/metrics-treemap/metrics-treemap.utils.js.map +1 -1
  52. package/lib/components/metrics-treemap/tile/index.js +18 -0
  53. package/lib/components/metrics-treemap/tile/index.js.map +1 -0
  54. package/lib/components/metrics-treemap/tile/tile.js +79 -0
  55. package/lib/components/metrics-treemap/tile/tile.js.map +1 -0
  56. package/lib/components/metrics-treemap/tile/tile.module.css +146 -0
  57. package/lib/components/metrics-treemap/tile-group/index.js +18 -0
  58. package/lib/components/metrics-treemap/tile-group/index.js.map +1 -0
  59. package/lib/components/metrics-treemap/tile-group/tile-group.js +75 -0
  60. package/lib/components/metrics-treemap/tile-group/tile-group.js.map +1 -0
  61. package/lib/components/metrics-treemap/tile-group/tile-group.module.css +59 -0
  62. package/lib/components/metrics-treemap/tile-group-title/index.js +18 -0
  63. package/lib/components/metrics-treemap/tile-group-title/index.js.map +1 -0
  64. package/lib/components/metrics-treemap/tile-group-title/tile-group-title.js +24 -0
  65. package/lib/components/metrics-treemap/tile-group-title/tile-group-title.js.map +1 -0
  66. package/lib/components/metrics-treemap/tile-group-title/tile-group-title.module.css +44 -0
  67. package/lib/components/run-info/run-info.module.css +6 -6
  68. package/lib/components/sort-button/sort-button.module.css +5 -4
  69. package/lib/components/summary/summary.js +5 -4
  70. package/lib/components/summary/summary.js.map +1 -1
  71. package/lib/components/summary/summary.module.css +18 -18
  72. package/lib/css/default.css +9 -4
  73. package/lib/css/variables.css +42 -28
  74. package/lib/layout/box/box.module.css +4 -2
  75. package/lib/layout/flex-stack/flex-stack.js +2 -2
  76. package/lib/layout/flex-stack/flex-stack.js.map +1 -1
  77. package/lib/layout/flex-stack/flex-stack.module.css +65 -10
  78. package/lib/query-state.js +6 -3
  79. package/lib/query-state.js.map +1 -1
  80. package/lib/ui/button/button.js +3 -2
  81. package/lib/ui/button/button.js.map +1 -1
  82. package/lib/ui/button/button.module.css +41 -28
  83. package/lib/ui/control-group/control-group.js +1 -1
  84. package/lib/ui/control-group/control-group.js.map +1 -1
  85. package/lib/ui/copy-to-clipboard/copy-to-clipboard.module.css +4 -2
  86. package/lib/ui/dialog/dialog.js +3 -1
  87. package/lib/ui/dialog/dialog.js.map +1 -1
  88. package/lib/ui/dialog/dialog.module.css +16 -5
  89. package/lib/ui/dropdown/dropdown.js +11 -3
  90. package/lib/ui/dropdown/dropdown.js.map +1 -1
  91. package/lib/ui/dropdown/dropdown.module.css +56 -9
  92. package/lib/ui/filters/filters.js +28 -16
  93. package/lib/ui/filters/filters.js.map +1 -1
  94. package/lib/ui/filters/filters.module.css +7 -21
  95. package/lib/ui/hover-card/hover-card.js +7 -1
  96. package/lib/ui/hover-card/hover-card.js.map +1 -1
  97. package/lib/ui/hover-card/hover-card.module.css +14 -10
  98. package/lib/ui/input/input.module.css +4 -2
  99. package/lib/ui/table/table.module.css +14 -5
  100. package/lib/ui/tabs/tabs.module.css +17 -9
  101. package/lib/ui/tag/tag.module.css +0 -2
  102. package/lib/ui/textarea/textarea.module.css +4 -2
  103. package/lib/ui/toolbar/toolbar.js +2 -1
  104. package/lib/ui/toolbar/toolbar.js.map +1 -1
  105. package/lib/ui/toolbar/toolbar.module.css +0 -6
  106. package/lib/ui/tooltip/tooltip.js +6 -1
  107. package/lib/ui/tooltip/tooltip.js.map +1 -1
  108. package/lib/ui/tooltip/tooltip.module.css +5 -3
  109. package/lib/utils/index.js +1 -0
  110. package/lib/utils/index.js.map +1 -1
  111. package/lib/utils/portal.js +26 -0
  112. package/lib/utils/portal.js.map +1 -0
  113. package/lib-esm/app/app.js +16 -5
  114. package/lib-esm/app/app.js.map +1 -1
  115. package/lib-esm/app/app.module.css +13 -9
  116. package/lib-esm/app/header/header.module.css +1 -3
  117. package/lib-esm/components/asset-name/asset-name.js +8 -7
  118. package/lib-esm/components/asset-name/asset-name.js.map +1 -1
  119. package/lib-esm/components/asset-name/asset-name.module.css +11 -10
  120. package/lib-esm/components/bundle-assets/bundle-assets.js +4 -2
  121. package/lib-esm/components/bundle-assets/bundle-assets.js.map +1 -1
  122. package/lib-esm/components/bundle-assets/bundle-assets.module.css +0 -12
  123. package/lib-esm/components/bundle-assets/index.js +2 -1
  124. package/lib-esm/components/bundle-assets/index.js.map +1 -1
  125. package/lib-esm/components/bundle-assets-totals/bundle-assets-totals.js +4 -2
  126. package/lib-esm/components/bundle-assets-totals/bundle-assets-totals.js.map +1 -1
  127. package/lib-esm/components/bundle-modules/bundle-modules.js +5 -3
  128. package/lib-esm/components/bundle-modules/bundle-modules.js.map +1 -1
  129. package/lib-esm/components/bundle-modules/bundle-modules.module.css +2 -16
  130. package/lib-esm/components/bundle-modules/index.js +2 -1
  131. package/lib-esm/components/bundle-modules/index.js.map +1 -1
  132. package/lib-esm/components/bundle-packages/bundle-packages.js +5 -3
  133. package/lib-esm/components/bundle-packages/bundle-packages.js.map +1 -1
  134. package/lib-esm/components/bundle-packages/bundle-packages.module.css +18 -22
  135. package/lib-esm/components/entry-info/entry-info.js +4 -2
  136. package/lib-esm/components/entry-info/entry-info.js.map +1 -1
  137. package/lib-esm/components/entry-info/entry-info.module.css +8 -2
  138. package/lib-esm/components/jobs-header/jobs-header.js +1 -1
  139. package/lib-esm/components/jobs-header/jobs-header.js.map +1 -1
  140. package/lib-esm/components/jobs-header/jobs-header.module.css +0 -1
  141. package/lib-esm/components/metric-change-legend/metric-change-legend.js +2 -2
  142. package/lib-esm/components/metric-change-legend/metric-change-legend.js.map +1 -1
  143. package/lib-esm/components/metric-change-legend/metric-change-legend.module.css +11 -0
  144. package/lib-esm/components/metric-run-info/metric-run-info.js +5 -12
  145. package/lib-esm/components/metric-run-info/metric-run-info.js.map +1 -1
  146. package/lib-esm/components/metrics-display-selector/metrics-display-selector.module.css +4 -4
  147. package/lib-esm/components/metrics-table/metrics-table.js +32 -20
  148. package/lib-esm/components/metrics-table/metrics-table.js.map +1 -1
  149. package/lib-esm/components/metrics-table/metrics-table.module.css +4 -12
  150. package/lib-esm/components/metrics-table-options/metrics-table-options.js +6 -7
  151. package/lib-esm/components/metrics-table-options/metrics-table-options.js.map +1 -1
  152. package/lib-esm/components/metrics-table-row-count/index.js +2 -0
  153. package/lib-esm/components/metrics-table-row-count/index.js.map +1 -0
  154. package/lib-esm/components/metrics-table-row-count/metrics-table-row-count.js +10 -0
  155. package/lib-esm/components/metrics-table-row-count/metrics-table-row-count.js.map +1 -0
  156. package/lib-esm/components/metrics-table-row-count/metrics-table-row-count.module.css +5 -0
  157. package/lib-esm/components/metrics-treemap/metrics-treemap.constants.js +2 -0
  158. package/lib-esm/components/metrics-treemap/metrics-treemap.constants.js.map +1 -1
  159. package/lib-esm/components/metrics-treemap/metrics-treemap.js +52 -120
  160. package/lib-esm/components/metrics-treemap/metrics-treemap.js.map +1 -1
  161. package/lib-esm/components/metrics-treemap/metrics-treemap.module.css +3 -274
  162. package/lib-esm/components/metrics-treemap/metrics-treemap.utils.js +80 -18
  163. package/lib-esm/components/metrics-treemap/metrics-treemap.utils.js.map +1 -1
  164. package/lib-esm/components/metrics-treemap/tile/index.js +2 -0
  165. package/lib-esm/components/metrics-treemap/tile/index.js.map +1 -0
  166. package/lib-esm/components/metrics-treemap/tile/tile.js +40 -0
  167. package/lib-esm/components/metrics-treemap/tile/tile.js.map +1 -0
  168. package/lib-esm/components/metrics-treemap/tile/tile.module.css +146 -0
  169. package/lib-esm/components/metrics-treemap/tile-group/index.js +2 -0
  170. package/lib-esm/components/metrics-treemap/tile-group/index.js.map +1 -0
  171. package/lib-esm/components/metrics-treemap/tile-group/tile-group.js +35 -0
  172. package/lib-esm/components/metrics-treemap/tile-group/tile-group.js.map +1 -0
  173. package/lib-esm/components/metrics-treemap/tile-group/tile-group.module.css +59 -0
  174. package/lib-esm/components/metrics-treemap/tile-group-title/index.js +2 -0
  175. package/lib-esm/components/metrics-treemap/tile-group-title/index.js.map +1 -0
  176. package/lib-esm/components/metrics-treemap/tile-group-title/tile-group-title.js +17 -0
  177. package/lib-esm/components/metrics-treemap/tile-group-title/tile-group-title.js.map +1 -0
  178. package/lib-esm/components/metrics-treemap/tile-group-title/tile-group-title.module.css +44 -0
  179. package/lib-esm/components/run-info/run-info.module.css +6 -6
  180. package/lib-esm/components/sort-button/sort-button.module.css +5 -4
  181. package/lib-esm/components/summary/summary.js +5 -4
  182. package/lib-esm/components/summary/summary.js.map +1 -1
  183. package/lib-esm/components/summary/summary.module.css +18 -18
  184. package/lib-esm/css/default.css +9 -4
  185. package/lib-esm/css/variables.css +42 -28
  186. package/lib-esm/layout/box/box.module.css +4 -2
  187. package/lib-esm/layout/flex-stack/flex-stack.js +3 -2
  188. package/lib-esm/layout/flex-stack/flex-stack.js.map +1 -1
  189. package/lib-esm/layout/flex-stack/flex-stack.module.css +65 -10
  190. package/lib-esm/query-state.js +7 -4
  191. package/lib-esm/query-state.js.map +1 -1
  192. package/lib-esm/ui/button/button.js +3 -2
  193. package/lib-esm/ui/button/button.js.map +1 -1
  194. package/lib-esm/ui/button/button.module.css +41 -28
  195. package/lib-esm/ui/control-group/control-group.js +1 -1
  196. package/lib-esm/ui/control-group/control-group.js.map +1 -1
  197. package/lib-esm/ui/copy-to-clipboard/copy-to-clipboard.module.css +4 -2
  198. package/lib-esm/ui/dialog/dialog.js +3 -1
  199. package/lib-esm/ui/dialog/dialog.js.map +1 -1
  200. package/lib-esm/ui/dialog/dialog.module.css +16 -5
  201. package/lib-esm/ui/dropdown/dropdown.js +9 -2
  202. package/lib-esm/ui/dropdown/dropdown.js.map +1 -1
  203. package/lib-esm/ui/dropdown/dropdown.module.css +56 -9
  204. package/lib-esm/ui/filters/filters.js +29 -17
  205. package/lib-esm/ui/filters/filters.js.map +1 -1
  206. package/lib-esm/ui/filters/filters.module.css +7 -21
  207. package/lib-esm/ui/hover-card/hover-card.js +7 -1
  208. package/lib-esm/ui/hover-card/hover-card.js.map +1 -1
  209. package/lib-esm/ui/hover-card/hover-card.module.css +14 -10
  210. package/lib-esm/ui/input/input.module.css +4 -2
  211. package/lib-esm/ui/table/table.module.css +14 -5
  212. package/lib-esm/ui/tabs/tabs.module.css +17 -9
  213. package/lib-esm/ui/tag/tag.module.css +0 -2
  214. package/lib-esm/ui/textarea/textarea.module.css +4 -2
  215. package/lib-esm/ui/toolbar/toolbar.js +2 -1
  216. package/lib-esm/ui/toolbar/toolbar.js.map +1 -1
  217. package/lib-esm/ui/toolbar/toolbar.module.css +0 -6
  218. package/lib-esm/ui/tooltip/tooltip.js +6 -1
  219. package/lib-esm/ui/tooltip/tooltip.js.map +1 -1
  220. package/lib-esm/ui/tooltip/tooltip.module.css +5 -3
  221. package/lib-esm/utils/index.js +1 -0
  222. package/lib-esm/utils/index.js.map +1 -1
  223. package/lib-esm/utils/portal.js +21 -0
  224. package/lib-esm/utils/portal.js.map +1 -0
  225. package/package.json +17 -17
  226. package/src/app/app.jsx +31 -12
  227. package/src/app/app.module.css +13 -9
  228. package/src/app/header/header.module.css +1 -3
  229. package/src/components/asset-name/asset-name.module.css +11 -10
  230. package/src/components/asset-name/asset-name.tsx +17 -14
  231. package/src/components/bundle-assets/bundle-assets.module.css +0 -12
  232. package/src/components/bundle-assets/bundle-assets.tsx +8 -1
  233. package/src/components/bundle-assets/index.tsx +3 -1
  234. package/src/components/bundle-assets-totals/bundle-assets-totals.jsx +6 -4
  235. package/src/components/bundle-modules/bundle-modules.module.css +2 -16
  236. package/src/components/bundle-modules/bundle-modules.tsx +10 -3
  237. package/src/components/bundle-modules/index.tsx +3 -1
  238. package/src/components/bundle-packages/bundle-packages.jsx +14 -3
  239. package/src/components/bundle-packages/bundle-packages.module.css +18 -22
  240. package/src/components/entry-info/entry-info.module.css +8 -2
  241. package/src/components/entry-info/entry-info.tsx +9 -3
  242. package/src/components/jobs-header/jobs-header.module.css +0 -1
  243. package/src/components/jobs-header/jobs-header.tsx +2 -2
  244. package/src/components/metric-change-legend/metric-change-legend.module.css +11 -0
  245. package/src/components/metric-change-legend/metric-change-legend.tsx +2 -2
  246. package/src/components/metric-run-info/metric-run-info.stories.tsx +9 -0
  247. package/src/components/metric-run-info/metric-run-info.tsx +10 -12
  248. package/src/components/metrics-display-selector/metrics-display-selector.module.css +4 -4
  249. package/src/components/metrics-table/metrics-table.module.css +4 -12
  250. package/src/components/metrics-table/metrics-table.tsx +70 -39
  251. package/src/components/metrics-table-options/metrics-table-options.tsx +14 -15
  252. package/src/components/metrics-table-row-count/index.ts +1 -0
  253. package/src/components/metrics-table-row-count/metrics-table-row-count.module.css +5 -0
  254. package/src/components/metrics-table-row-count/metrics-table-row-count.tsx +21 -0
  255. package/src/components/metrics-treemap/metrics-treemap.constants.ts +9 -0
  256. package/src/components/metrics-treemap/metrics-treemap.module.css +3 -274
  257. package/src/components/metrics-treemap/metrics-treemap.stories.utils.ts +46 -0
  258. package/src/components/metrics-treemap/metrics-treemap.tsx +123 -428
  259. package/src/components/metrics-treemap/metrics-treemap.utils.ts +161 -27
  260. package/src/components/metrics-treemap/tile/index.ts +1 -0
  261. package/src/components/metrics-treemap/tile/tile.module.css +146 -0
  262. package/src/components/metrics-treemap/tile/tile.stories.tsx +139 -0
  263. package/src/components/metrics-treemap/tile/tile.tsx +121 -0
  264. package/src/components/metrics-treemap/tile-group/index.ts +1 -0
  265. package/src/components/metrics-treemap/tile-group/tile-group.module.css +59 -0
  266. package/src/components/metrics-treemap/tile-group/tile-group.stories.tsx +163 -0
  267. package/src/components/metrics-treemap/tile-group/tile-group.tsx +177 -0
  268. package/src/components/metrics-treemap/tile-group-title/index.ts +1 -0
  269. package/src/components/metrics-treemap/tile-group-title/tile-group-title.module.css +44 -0
  270. package/src/components/metrics-treemap/tile-group-title/tile-group-title.stories.tsx +88 -0
  271. package/src/components/metrics-treemap/tile-group-title/tile-group-title.tsx +51 -0
  272. package/src/components/run-info/run-info.module.css +6 -6
  273. package/src/components/sort-button/sort-button.module.css +5 -4
  274. package/src/components/summary/summary.module.css +18 -18
  275. package/src/components/summary/summary.tsx +9 -8
  276. package/src/css/default.css +9 -4
  277. package/src/css/variables.css +42 -28
  278. package/src/layout/box/box.module.css +4 -2
  279. package/src/layout/flex-stack/flex-stack.module.css +65 -10
  280. package/src/layout/flex-stack/flex-stack.stories.tsx +68 -9
  281. package/src/layout/flex-stack/flex-stack.tsx +24 -4
  282. package/src/query-state.tsx +9 -4
  283. package/src/ui/button/button.module.css +41 -28
  284. package/src/ui/button/button.stories.tsx +1 -1
  285. package/src/ui/button/button.tsx +3 -1
  286. package/src/ui/control-group/control-group.tsx +1 -1
  287. package/src/ui/copy-to-clipboard/copy-to-clipboard.module.css +4 -2
  288. package/src/ui/dialog/dialog.module.css +16 -5
  289. package/src/ui/dialog/dialog.stories.tsx +8 -0
  290. package/src/ui/dialog/dialog.tsx +7 -0
  291. package/src/ui/dropdown/dropdown.module.css +56 -9
  292. package/src/ui/dropdown/dropdown.stories.tsx +6 -0
  293. package/src/ui/dropdown/dropdown.tsx +13 -2
  294. package/src/ui/filters/filters.module.css +7 -21
  295. package/src/ui/filters/filters.tsx +131 -67
  296. package/src/ui/hover-card/hover-card.module.css +14 -10
  297. package/src/ui/hover-card/hover-card.tsx +7 -1
  298. package/src/ui/input/input.module.css +4 -2
  299. package/src/ui/table/table.module.css +14 -5
  300. package/src/ui/tabs/tabs.module.css +17 -9
  301. package/src/ui/tag/tag.module.css +0 -2
  302. package/src/ui/textarea/textarea.module.css +4 -2
  303. package/src/ui/toolbar/toolbar.jsx +4 -1
  304. package/src/ui/toolbar/toolbar.module.css +0 -6
  305. package/src/ui/tooltip/tooltip.module.css +5 -3
  306. package/src/ui/tooltip/tooltip.tsx +6 -1
  307. package/src/utils/index.ts +1 -0
  308. package/src/utils/portal.ts +34 -0
  309. package/types/components/metric-run-info/metric-run-info.d.ts +1 -0
  310. package/types/components/metrics-table/metrics-table.d.ts +2 -1
  311. package/types/components/metrics-table-row-count/index.d.ts +1 -0
  312. package/types/components/metrics-table-row-count/metrics-table-row-count.d.ts +7 -0
  313. package/types/components/metrics-treemap/metrics-treemap.constants.d.ts +2 -0
  314. package/types/components/metrics-treemap/metrics-treemap.utils.d.ts +16 -5
  315. package/types/components/metrics-treemap/tile/index.d.ts +1 -0
  316. package/types/components/metrics-treemap/tile/tile.d.ts +11 -0
  317. package/types/components/metrics-treemap/tile-group/index.d.ts +1 -0
  318. package/types/components/metrics-treemap/tile-group/tile-group.d.ts +20 -0
  319. package/types/components/metrics-treemap/tile-group-title/index.d.ts +1 -0
  320. package/types/components/metrics-treemap/tile-group-title/tile-group-title.d.ts +12 -0
  321. package/types/layout/flex-stack/flex-stack.d.ts +6 -2
  322. package/types/ui/button/button.d.ts +1 -0
  323. package/types/ui/dropdown/dropdown.d.ts +3 -1
  324. package/types/ui/filters/filters.d.ts +2 -1
  325. package/types/utils/index.d.ts +1 -0
  326. package/types/utils/portal.d.ts +2 -0
  327. package/vitest.config.ts +4 -0
  328. package/lib/components/metrics-table-options/metrics-table-options.module.css +0 -15
  329. package/lib-esm/components/metrics-table-options/metrics-table-options.module.css +0 -15
  330. package/src/components/metrics-table-options/metrics-table-options.module.css +0 -15
@@ -10,6 +10,7 @@ import {
10
10
  METRICS_WEBPACK_GENERAL,
11
11
  } from '../../constants';
12
12
  import { Box } from '../../layout/box';
13
+ import { FlexStack } from '../../layout/flex-stack';
13
14
  import { ComponentLink } from '../component-link';
14
15
  import { MetricRunInfo, MetricRunInfoProps } from '../metric-run-info';
15
16
  import css from './summary.module.css';
@@ -77,9 +78,9 @@ export const Summary = ({
77
78
  summaryItemLink = ComponentLink,
78
79
  }: SummaryProps & React.ComponentProps<'div'>) => (
79
80
  <Box className={cx(css.root, className)}>
80
- <div className={css.row}>
81
+ <FlexStack wrap="wrap" gap="small" className={css.row}>
81
82
  <Box outline padding="small" className={css.rowGroup}>
82
- <div className={css.items}>
83
+ <FlexStack wrap="wrap" gap="medium">
83
84
  {METRICS_WEBPACK_GENERAL.map((metricId) => (
84
85
  <SummaryItem
85
86
  key={metricId}
@@ -93,15 +94,15 @@ export const Summary = ({
93
94
  showBaseline={showSummaryItemBaseline}
94
95
  />
95
96
  ))}
96
- </div>
97
+ </FlexStack>
97
98
  </Box>
98
- </div>
99
- <div className={css.row}>
99
+ </FlexStack>
100
+ <FlexStack wrap="wrap" gap="small" className={css.row}>
100
101
  {[METRICS_GROUP_ASSETS, METRICS_GROUP_MODULES, METRICS_GROUP_PACKAGES].map((metricGroup) => (
101
102
  <Stack className={css.rowGroup} key={metricGroup.title}>
102
103
  <h3 className={css.rowGroupTitle}>{metricGroup.title}</h3>
103
104
  <Box outline padding="small">
104
- <div className={css.items}>
105
+ <FlexStack wrap="wrap" gap="medium">
105
106
  {metricGroup.metrics.map((metricId) => (
106
107
  <SummaryItem
107
108
  key={metricId}
@@ -115,10 +116,10 @@ export const Summary = ({
115
116
  showBaseline={showSummaryItemBaseline}
116
117
  />
117
118
  ))}
118
- </div>
119
+ </FlexStack>
119
120
  </Box>
120
121
  </Stack>
121
122
  ))}
122
- </div>
123
+ </FlexStack>
123
124
  </Box>
124
125
  );
@@ -15,6 +15,7 @@ html {
15
15
 
16
16
  body {
17
17
  background: var(--color-background);
18
+ accent-color: var(--color-accent);
18
19
  color: var(--color-text);
19
20
  line-height: var(--line-height);
20
21
  }
@@ -59,12 +60,16 @@ code {
59
60
  }
60
61
 
61
62
  a {
62
- color: var(--color-primary);
63
+ color: var(--color-accent);
64
+ transition-property: color;
65
+ transition-duration: var(--transition-duration-out);
66
+ transition-timing-function: var(--transition-timing-function);
63
67
  }
64
68
 
65
- a:hover,
69
+ a:focus,
66
70
  a:active,
67
- a:focus {
68
- color: var(--color-primary-dark);
71
+ a:hover {
72
+ color: var(--color-accent-dark);
69
73
  outline: none;
74
+ transition-duration: var(--transition-duration-in);
70
75
  }
@@ -35,18 +35,18 @@
35
35
  * Color scheme: https://coolors.co/287acc-da444e-55b950-e5c110-192339-353538
36
36
  */
37
37
 
38
- --color-gray-25: #f9f9f9;
39
- /** https://hihayk.github.io/scale/#4/5/60/90/0/-0/0/0/3F3F47/63/63/71/white */
40
- --color-gray-50: #ececed;
41
- --color-gray-100: #c9c9cc;
42
- --color-gray-200: #a7a7aa;
43
- --color-gray-300: #848489;
44
- --color-gray-400: #626268;
45
- --color-gray-500: #3f3f47;
46
- --color-gray-600: #36363c;
47
- --color-gray-700: #2c2c32;
48
- --color-gray-800: #232327;
49
- --color-gray-900: #19191c;
38
+ --color-gray-25: #f9f9f9;
39
+ /** https://hihayk.github.io/scale/#4/5/60/90/0/-0/0/0/3F3F47/63/63/71/white */
40
+ --color-gray-50: #ececed;
41
+ --color-gray-100: #c9c9cc;
42
+ --color-gray-200: #a7a7aa;
43
+ --color-gray-300: #848489;
44
+ --color-gray-400: #626268;
45
+ --color-gray-500: #3f3f47;
46
+ --color-gray-600: #36363c;
47
+ --color-gray-700: #2c2c32;
48
+ --color-gray-800: #232327;
49
+ --color-gray-900: #19191c;
50
50
 
51
51
  --color-gray-ultra-light: var(--color-gray-200);
52
52
  --color-gray-light: var(--color-gray-300);
@@ -98,7 +98,7 @@
98
98
  --color-green-200: #b1dfaf;
99
99
  --color-green-300: #92d28f;
100
100
  --color-green-400: #74c670;
101
- --color-green-500: #55B950;
101
+ --color-green-500: #55b950;
102
102
  --color-green-600: #3ea839;
103
103
  --color-green-700: #2b9426;
104
104
  --color-green-800: #1b7b16;
@@ -111,30 +111,31 @@
111
111
  --color-green-ultra-dark: var(--color-green-900);
112
112
 
113
113
  --color-yellow-25: #fffdf2;
114
- /* https://hihayk.github.io/scale/#4/5/40/80/0/-0/0/0/E5C110/229/193/16/white */
115
- --color-yellow-50: #faf3cf;
114
+ /* https://hihayk.github.io/scale/#4/5/20/80/0/-0/0/0/E5C110/229/193/16/white */
115
+ --color-yellow-50: #faf3cf;
116
116
  --color-yellow-100: #f6e9a9;
117
117
  --color-yellow-200: #f2df83;
118
118
  --color-yellow-300: #edd55d;
119
119
  --color-yellow-400: #e9cb36;
120
120
  --color-yellow-500: #e5c110;
121
- --color-yellow-600: #ceae0e;
122
- --color-yellow-700: #b79a0d;
123
- --color-yellow-800: #a0870b;
124
- --color-yellow-900: #89740a;
121
+ --color-yellow-600: #dab70f;
122
+ --color-yellow-700: #ceae0e;
123
+ --color-yellow-800: #c3a40e;
124
+ --color-yellow-900: #b79a0d;
125
125
 
126
126
  --color-yellow-ultra-light: var(--color-yellow-100);
127
127
  --color-yellow-light: var(--color-yellow-300);
128
128
  --color-yellow: var(--color-yellow-500);
129
- --color-yellow-ultra-dark: var(--color-yellow-700);
130
- --color-yellow-dark: var(--color-yellow-900);
129
+ --color-yellow-dark: var(--color-yellow-700);
130
+ --color-yellow-ultra-dark: var(--color-yellow-900);
131
131
 
132
132
  --color-dark: #111;
133
133
  --color-light: #fff;
134
134
 
135
- --color-branding-light: #2b76d4;
135
+ /* https://hihayk.github.io/scale/#4/4/40/40/0/-0/0/0/1a477f/26/71/127/white */
136
+ --color-branding-light: #31598c;
136
137
  --color-branding: #1a477f;
137
- --color-branding-dark: #09182a;
138
+ --color-branding-dark: #102b4c;
138
139
  }
139
140
 
140
141
  body {
@@ -146,6 +147,10 @@ body {
146
147
  --color-text-ultra-dark: var(--color-gray-ultra-dark);
147
148
  --color-heading: var(--color-gray-ultra-dark);
148
149
 
150
+ --color-accent-light: var(--color-branding-light);
151
+ --color-accent: var(--color-branding);
152
+ --color-accent-dark: var(--color-branding-dark);
153
+
149
154
  --color-success-light: var(--color-green-light);
150
155
  --color-success: var(--color-green);
151
156
  --color-success-dark: var(--color-green-dark);
@@ -185,21 +190,30 @@ body {
185
190
  --color-outline-danger: var(--color-red-100);
186
191
 
187
192
  --color-backdrop: rgba(0, 0, 0, 0.05);
188
- --color-shadow: rgba(0, 0, 0, 0.25);
193
+ --color-shadow: rgba(0, 0, 0, 0.1);
189
194
 
190
- --transition-duration-in: 0.16s;
191
- --transition-duration-out: 0.10s;
192
- --transition-in: all var(--transition-duration-in) ease-in;
193
- --transition-out: all var(--transition-duration-out) ease-out;
195
+ /**
196
+ * Transitions: set `transition-property` explicitly on the base rule, use the `out` duration
197
+ * on the base rule and switch only `transition-duration` to `in` on the active/hover rule
198
+ */
199
+ --transition-duration-in: 120ms;
200
+ --transition-duration-out: 80ms;
201
+ --transition-timing-function: ease-out;
194
202
 
195
203
  --layer-xlow: 1;
196
204
  --layer-low: 10;
197
205
  --layer: 100;
198
206
  /** for components with overlays (tooltips, hovercards) */
199
207
  --layer-high: 1000;
208
+ /** for the sticky header, tabs and side panels */
200
209
  --layer-xhigh: 10000;
201
210
  /** for dialogs/modals */
202
211
  --layer-xxhigh: 100000;
212
+ /**
213
+ * z-index used by overlays (tooltips, hovercards, dropdowns)
214
+ * overridden by the dialog portal to place nested overlays above the dialog
215
+ */
216
+ --layer-overlay: var(--layer-high);
203
217
 
204
218
  --shadow-layer: 0 0 var(--space-xxxsmall) var(--color-shadow);
205
219
  --shadow-layer-high: 0 0 var(--space-xxsmall) var(--color-shadow);
@@ -18,14 +18,16 @@
18
18
  }
19
19
 
20
20
  .outlineHover {
21
- transition: var(--transition-out);
21
+ transition-property: border-color;
22
+ transition-duration: var(--transition-duration-out);
23
+ transition-timing-function: var(--transition-timing-function);
22
24
  }
23
25
 
24
26
  .outlineHover:focus,
25
27
  .outlineHover:active,
26
28
  .outlineHover:hover {
27
29
  border-color: var(--color-outline-dark);
28
- transition: var(--transition-in);
30
+ transition-duration: var(--transition-duration-in);
29
31
  }
30
32
 
31
33
  .padding-xxxsmall {
@@ -4,43 +4,73 @@
4
4
  gap: 0;
5
5
  }
6
6
 
7
- /** Space variation */
8
- .space--xxxsmall {
7
+ /** Gap variation */
8
+ .gap--xxxsmall {
9
9
  gap: var(--space-xxxsmall);
10
10
  }
11
11
 
12
- .space--xxsmall {
12
+ .gap--xxsmall {
13
13
  gap: var(--space-xxsmall);
14
14
  }
15
15
 
16
- .space--xsmall {
16
+ .gap--xsmall {
17
17
  gap: var(--space-xsmall);
18
18
  }
19
19
 
20
- .space--small {
20
+ .gap--small {
21
21
  gap: var(--space-small);
22
22
  }
23
23
 
24
- .space--medium {
24
+ .gap--medium {
25
25
  gap: var(--space-medium);
26
26
  }
27
27
 
28
- .space--large {
28
+ .gap--large {
29
29
  gap: var(--space-large);
30
30
  }
31
31
 
32
- .space--xlarge {
32
+ .gap--xlarge {
33
33
  gap: var(--space-xlarge);
34
34
  }
35
35
 
36
- .space--xxlarge {
36
+ .gap--xxlarge {
37
37
  gap: var(--space-xxlarge);
38
38
  }
39
39
 
40
- .space--xxxlarge {
40
+ .gap--xxxlarge {
41
41
  gap: var(--space-xxxlarge);
42
42
  }
43
43
 
44
+ /** Direction variation */
45
+ .direction--row {
46
+ flex-direction: row;
47
+ }
48
+
49
+ .direction--row-reverse {
50
+ flex-direction: row-reverse;
51
+ }
52
+
53
+ .direction--column {
54
+ flex-direction: column;
55
+ }
56
+
57
+ .direction--column-reverse {
58
+ flex-direction: column-reverse;
59
+ }
60
+
61
+ /** Wrap variation */
62
+ .wrap--nowrap {
63
+ flex-wrap: nowrap;
64
+ }
65
+
66
+ .wrap--wrap {
67
+ flex-wrap: wrap;
68
+ }
69
+
70
+ .wrap--wrap-reverse {
71
+ flex-wrap: wrap-reverse;
72
+ }
73
+
44
74
  /** Align items variation */
45
75
  .root {
46
76
  align-items: stretch;
@@ -62,6 +92,31 @@
62
92
  align-items: baseline;
63
93
  }
64
94
 
95
+ /** Justify content variation */
96
+ .justify-content--flex-start {
97
+ justify-content: flex-start;
98
+ }
99
+
100
+ .justify-content--flex-end {
101
+ justify-content: flex-end;
102
+ }
103
+
104
+ .justify-content--center {
105
+ justify-content: center;
106
+ }
107
+
108
+ .justify-content--space-between {
109
+ justify-content: space-between;
110
+ }
111
+
112
+ .justify-content--space-around {
113
+ justify-content: space-around;
114
+ }
115
+
116
+ .justify-content--space-evenly {
117
+ justify-content: space-evenly;
118
+ }
119
+
65
120
  /** Inline variation */
66
121
  .inline {
67
122
  display: inline-flex;
@@ -28,7 +28,7 @@ export const Default: Story = {
28
28
  },
29
29
  };
30
30
 
31
- export const withCustomWrapper: Story = {
31
+ export const WithCustomWrapper: Story = {
32
32
  args: {
33
33
  as: 'main',
34
34
  className: 'wrapper',
@@ -41,9 +41,9 @@ export const withCustomWrapper: Story = {
41
41
  },
42
42
  };
43
43
 
44
- export const withLargeSpace: Story = {
44
+ export const WithLargeGap: Story = {
45
45
  args: {
46
- space: 'large',
46
+ gap: 'large',
47
47
  children: (
48
48
  <>
49
49
  <Box outline>Lorem ipsum 1</Box>
@@ -54,14 +54,14 @@ export const withLargeSpace: Story = {
54
54
  },
55
55
  };
56
56
 
57
- export const withNestedStack: Story = {
57
+ export const WithNestedStack: Story = {
58
58
  args: {
59
- space: 'large',
59
+ gap: 'large',
60
60
  children: (
61
61
  <>
62
62
  <Box outline>Lorem ipsum 1</Box>
63
63
  <Box outline>Lorem ipsum 2</Box>
64
- <FlexStack space="small">
64
+ <FlexStack gap="small">
65
65
  <Box outline>Lorem ipsum 3.1</Box>
66
66
  <Box outline>Lorem ipsum 3.2</Box>
67
67
  </FlexStack>
@@ -70,16 +70,61 @@ export const withNestedStack: Story = {
70
70
  },
71
71
  };
72
72
 
73
- export const singleItem: Story = {
73
+ export const SingleItem: Story = {
74
74
  args: {
75
75
  children: <Box outline>Lorem ipsum</Box>,
76
76
  },
77
77
  };
78
78
 
79
- export const withAlignItems: Story = {
79
+ export const WithDirectionColumn: Story = {
80
+ args: {
81
+ direction: 'column',
82
+ gap: 'medium',
83
+ children: (
84
+ <>
85
+ <Box outline>Lorem ipsum 1</Box>
86
+ <Box outline>Lorem ipsum 2</Box>
87
+ <Box outline>Lorem ipsum 3</Box>
88
+ </>
89
+ ),
90
+ },
91
+ };
92
+
93
+ export const WithDirectionRowReverse: Story = {
94
+ args: {
95
+ direction: 'row-reverse',
96
+ gap: 'medium',
97
+ children: (
98
+ <>
99
+ <Box outline>Lorem ipsum 1</Box>
100
+ <Box outline>Lorem ipsum 2</Box>
101
+ <Box outline>Lorem ipsum 3</Box>
102
+ </>
103
+ ),
104
+ },
105
+ };
106
+
107
+ export const WithWrap: Story = {
108
+ args: {
109
+ wrap: 'wrap',
110
+ gap: 'medium',
111
+ style: { maxWidth: '320px' },
112
+ children: (
113
+ <>
114
+ <Box outline>Lorem ipsum 1</Box>
115
+ <Box outline>Lorem ipsum 2</Box>
116
+ <Box outline>Lorem ipsum 3</Box>
117
+ <Box outline>Lorem ipsum 4</Box>
118
+ <Box outline>Lorem ipsum 5</Box>
119
+ </>
120
+ ),
121
+ },
122
+ };
123
+
124
+ export const WithAlignItems: Story = {
80
125
  args: {
81
126
  alignItems: 'center',
82
- space: 'medium',
127
+ gap: 'medium',
83
128
  children: (
84
129
  <>
85
130
  <h1>Title</h1>
@@ -88,3 +133,17 @@ export const withAlignItems: Story = {
88
133
  ),
89
134
  },
90
135
  };
136
+
137
+ export const WithJustifyContent: Story = {
138
+ args: {
139
+ justifyContent: 'space-between',
140
+ gap: 'medium',
141
+ children: (
142
+ <>
143
+ <Box outline>Lorem ipsum 1</Box>
144
+ <Box outline>Lorem ipsum 2</Box>
145
+ <Box outline>Lorem ipsum 3</Box>
146
+ </>
147
+ ),
148
+ },
149
+ };
@@ -6,12 +6,25 @@ import css from './flex-stack.module.css';
6
6
 
7
7
  type SpaceValue = (typeof SPACES)[number];
8
8
 
9
- interface FlexStackProps<T extends React.ElementType> {
9
+ export type FlexStackProps<T extends React.ElementType> = {
10
10
  as?: T;
11
+ gap?: SpaceValue;
12
+ /**
13
+ * @deprecated Use `gap` instead.
14
+ */
11
15
  space?: SpaceValue;
12
16
  inline?: boolean;
17
+ direction?: 'row' | 'row-reverse' | 'column' | 'column-reverse';
18
+ wrap?: 'nowrap' | 'wrap' | 'wrap-reverse';
13
19
  alignItems?: 'top' | 'center' | 'bottom';
14
- }
20
+ justifyContent?:
21
+ | 'flex-start'
22
+ | 'flex-end'
23
+ | 'center'
24
+ | 'space-between'
25
+ | 'space-around'
26
+ | 'space-evenly';
27
+ };
15
28
 
16
29
  export const FlexStack = <T extends React.ElementType = 'div'>(
17
30
  props: FlexStackProps<T> & Omit<React.ComponentProps<T>, keyof FlexStackProps<T>>,
@@ -19,16 +32,23 @@ export const FlexStack = <T extends React.ElementType = 'div'>(
19
32
  const {
20
33
  as: Component = 'div',
21
34
  className = '',
22
- space = NO_SPACE,
35
+ gap,
36
+ space,
23
37
  inline = false,
38
+ direction = '',
39
+ wrap = '',
24
40
  alignItems = '',
41
+ justifyContent = '',
25
42
  ...restProps
26
43
  } = props;
27
44
 
28
45
  const rootClassName = cx(
29
46
  css.root,
30
- css[`space--${space}`],
47
+ css[`gap--${gap ?? space ?? NO_SPACE}`],
48
+ css[`direction--${direction}`],
49
+ css[`wrap--${wrap}`],
31
50
  css[`align-items--${alignItems}`],
51
+ css[`justify-content--${justifyContent}`],
32
52
  inline && css.inline,
33
53
  className,
34
54
  );
@@ -1,4 +1,4 @@
1
- import React, { useCallback } from 'react';
1
+ import React, { useCallback, useRef } from 'react';
2
2
  import isEqual from 'lodash/isEqual';
3
3
  import { QueryParamProvider, useQueryParams } from 'use-query-params';
4
4
  import { ReactRouter5Adapter } from 'use-query-params/adapters/react-router-5';
@@ -19,18 +19,23 @@ export const useComponentQueryState = (componentName: string) => {
19
19
 
20
20
  const componentState = queryState[componentName];
21
21
 
22
+ // Read the latest state from a ref to keep `setState` stable across state changes
23
+ const componentStateRef = useRef(componentState);
24
+ componentStateRef.current = componentState;
25
+
22
26
  const setState = useCallback(
23
27
  (updates: Record<string, unknown>) => {
24
- const newState = { ...componentState, ...updates };
28
+ const currentState = componentStateRef.current;
29
+ const newState = { ...currentState, ...updates };
25
30
 
26
31
  // Deep check to prevent unnecessary state changes
27
- if (isEqual(componentState, newState)) {
32
+ if (isEqual(currentState, newState)) {
28
33
  return;
29
34
  }
30
35
 
31
36
  setQueryState({ [componentName]: newState });
32
37
  },
33
- [componentState, setQueryState],
38
+ [componentName, setQueryState],
34
39
  );
35
40
 
36
41
  return [componentState, setState];