@bundle-stats/ui 3.2.6-beta.4 → 3.2.7-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/CHANGELOG.md +20 -3
  2. package/lib/app/app.module.css +1 -1
  3. package/lib/app/header/header.js +1 -10
  4. package/lib/components/bundle-assets/bundle-assets.js +4 -2
  5. package/lib/components/bundle-modules/bundle-modules.js +3 -1
  6. package/lib/components/bundle-packages/bundle-packages.js +3 -1
  7. package/lib/components/job-header/job-header.js +3 -1
  8. package/lib/components/job-header/job-header.module.css +6 -8
  9. package/lib/components/jobs-header/jobs-header.module.css +5 -0
  10. package/lib/components/metrics-table-search/metrics-table-search.module.css +1 -1
  11. package/lib/components/summary-item/summary-item.js +1 -1
  12. package/lib/css/variables.css +1 -1
  13. package/lib/layout/footer/footer.module.css +1 -1
  14. package/lib/ui/dropdown/dropdown.js +6 -1
  15. package/lib/ui/filters/filters.js +13 -3
  16. package/lib/ui/filters/filters.module.css +2 -12
  17. package/lib/ui/hover-card/hover-card.js +12 -2
  18. package/lib/ui/hover-card/hover-card.module.css +1 -1
  19. package/lib/ui/table/table.module.css +25 -9
  20. package/lib-esm/app/app.module.css +1 -1
  21. package/lib-esm/app/header/header.js +1 -9
  22. package/lib-esm/components/bundle-assets/bundle-assets.js +4 -2
  23. package/lib-esm/components/bundle-modules/bundle-modules.js +3 -1
  24. package/lib-esm/components/bundle-packages/bundle-packages.js +3 -1
  25. package/lib-esm/components/job-header/job-header.js +2 -1
  26. package/lib-esm/components/job-header/job-header.module.css +6 -8
  27. package/lib-esm/components/jobs-header/jobs-header.module.css +5 -0
  28. package/lib-esm/components/metrics-table-search/metrics-table-search.module.css +1 -1
  29. package/lib-esm/components/summary-item/summary-item.js +1 -1
  30. package/lib-esm/css/variables.css +1 -1
  31. package/lib-esm/layout/footer/footer.module.css +1 -1
  32. package/lib-esm/ui/dropdown/dropdown.js +6 -1
  33. package/lib-esm/ui/filters/filters.js +12 -2
  34. package/lib-esm/ui/filters/filters.module.css +2 -12
  35. package/lib-esm/ui/hover-card/hover-card.js +6 -2
  36. package/lib-esm/ui/hover-card/hover-card.module.css +1 -1
  37. package/lib-esm/ui/table/table.module.css +25 -9
  38. package/package.json +10 -10
  39. package/src/app/app.module.css +1 -1
  40. package/src/app/header/header.jsx +0 -10
  41. package/src/components/bundle-assets/bundle-assets.jsx +2 -2
  42. package/src/components/bundle-modules/bundle-modules.jsx +1 -1
  43. package/src/components/bundle-packages/bundle-packages.jsx +1 -1
  44. package/src/components/job-header/job-header.jsx +2 -1
  45. package/src/components/job-header/job-header.module.css +6 -8
  46. package/src/components/jobs-header/jobs-header.module.css +5 -0
  47. package/src/components/metrics-table-search/metrics-table-search.module.css +1 -1
  48. package/src/components/summary-item/summary-item.jsx +1 -1
  49. package/src/css/variables.css +1 -1
  50. package/src/layout/footer/footer.module.css +1 -1
  51. package/src/ui/dropdown/dropdown.jsx +6 -2
  52. package/src/ui/filters/filters.jsx +12 -4
  53. package/src/ui/filters/filters.module.css +2 -12
  54. package/src/ui/hover-card/hover-card.jsx +10 -2
  55. package/src/ui/hover-card/hover-card.module.css +1 -1
  56. package/src/ui/table/table.module.css +25 -9
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { useCallback } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import cx from 'classnames';
4
4
  import {
@@ -32,6 +32,14 @@ export const HoverCard = (props) => {
32
32
  // Fallback to span if no href
33
33
  const Component = resolveComponent(as, href);
34
34
 
35
+ const handleOnClose = useCallback(
36
+ (event) => {
37
+ state.hide();
38
+ event.preventDefault();
39
+ },
40
+ [state],
41
+ );
42
+
35
43
  return (
36
44
  <div className={cx(css.root, className)}>
37
45
  <HovercardAnchor state={state} href={href} className={css.anchor} as={Component}>
@@ -51,7 +59,7 @@ export const HoverCard = (props) => {
51
59
  as="button"
52
60
  type="button"
53
61
  className={css.closeBtn}
54
- onClick={state.hide}
62
+ onClick={handleOnClose}
55
63
  />
56
64
  </Hovercard>
57
65
  </div>
@@ -32,7 +32,7 @@ button.anchor:hover {
32
32
 
33
33
  .closeBtn {
34
34
  position: absolute;
35
- right: 0;
35
+ right: var(--space-xxxsmall);
36
36
  top: var(--space-xxxsmall);
37
37
  width: var(--space-large);
38
38
  height: var(--space-large);
@@ -1,7 +1,7 @@
1
1
  .root {
2
2
  border-width: 0;
3
3
  width: 100%;
4
- border-collapse: collapse;
4
+ border-spacing: 0;
5
5
  empty-cells: show;
6
6
  background: var(--color-background);
7
7
  }
@@ -14,9 +14,10 @@
14
14
  }
15
15
 
16
16
  .root thead .cell {
17
- border-width: 0 0 2px;
17
+ border-width: 0 0 1px;
18
18
  text-transform: uppercase;
19
19
  vertical-align: top;
20
+ background: var(--color-highlight);
20
21
  }
21
22
 
22
23
  .root thead .cell:empty {
@@ -27,6 +28,10 @@
27
28
  font-weight: normal;
28
29
  }
29
30
 
31
+ .root tbody tr:first-child .cell {
32
+ border-top: 0;
33
+ }
34
+
30
35
  .root tbody .cell a {
31
36
  color: inherit;
32
37
  text-decoration: none;
@@ -40,10 +45,6 @@
40
45
  text-decoration: underline;
41
46
  }
42
47
 
43
- .root tbody tr:nth-child(odd) .cell {
44
- background-color: var(--color-highlight);
45
- }
46
-
47
48
  .root tbody tr:hover .cell {
48
49
  background-color: var(--color-highlight-warning);
49
50
  }
@@ -58,12 +59,27 @@
58
59
 
59
60
  /* outline variation */
60
61
  .outline {
62
+ --table-radius: var(--radius-medium);
61
63
  border: 1px solid var(--color-outline);
62
- border-width: 0 1px;
64
+ border-radius: var(--table-radius);
65
+ }
66
+
67
+ .outline thead tr:first-child .cell:first-child,
68
+ .outline tbody:first-child tr:first-child .cell:first-child {
69
+ border-top-left-radius: var(--table-radius);
70
+ }
71
+
72
+ .outline thead tr:first-child .cell:last-child,
73
+ .outline tbody:first-child tr:first-child .cell:last-child {
74
+ border-top-right-radius: var(--table-radius);
75
+ }
76
+
77
+ .outline tbody:last-child tr:last-child .cell:first-child {
78
+ border-bottom-left-radius: var(--table-radius);
63
79
  }
64
80
 
65
- .outline thead tr:first-child .cell {
66
- border-top-width: 1px;
81
+ .outline tbody:last-child tr:last-child .cell:last-child {
82
+ border-bottom-right-radius: var(--table-radius);
67
83
  }
68
84
 
69
85
  .outline.empty {