@bundle-stats/ui 4.23.0-beta.4 → 4.23.0-beta.6

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 (149) hide show
  1. package/lib/app/app.js +2 -1
  2. package/lib/app/app.js.map +1 -1
  3. package/lib/app/app.module.css +0 -5
  4. package/lib/components/asset-name/asset-name.js +8 -7
  5. package/lib/components/asset-name/asset-name.js.map +1 -1
  6. package/lib/components/asset-name/asset-name.module.css +11 -10
  7. package/lib/components/bundle-assets/bundle-assets.js +4 -2
  8. package/lib/components/bundle-assets/bundle-assets.js.map +1 -1
  9. package/lib/components/bundle-assets/bundle-assets.module.css +0 -12
  10. package/lib/components/bundle-assets-totals/bundle-assets-totals.js +4 -2
  11. package/lib/components/bundle-assets-totals/bundle-assets-totals.js.map +1 -1
  12. package/lib/components/bundle-modules/bundle-modules.js +5 -3
  13. package/lib/components/bundle-modules/bundle-modules.js.map +1 -1
  14. package/lib/components/bundle-modules/bundle-modules.module.css +2 -16
  15. package/lib/components/bundle-packages/bundle-packages.js +5 -3
  16. package/lib/components/bundle-packages/bundle-packages.js.map +1 -1
  17. package/lib/components/bundle-packages/bundle-packages.module.css +18 -22
  18. package/lib/components/jobs-header/jobs-header.js +1 -1
  19. package/lib/components/jobs-header/jobs-header.js.map +1 -1
  20. package/lib/components/jobs-header/jobs-header.module.css +0 -1
  21. package/lib/components/metrics-table/metrics-table.js +31 -20
  22. package/lib/components/metrics-table/metrics-table.js.map +1 -1
  23. package/lib/components/metrics-table/metrics-table.module.css +4 -12
  24. package/lib/components/metrics-table-options/metrics-table-options.js +4 -4
  25. package/lib/components/metrics-table-options/metrics-table-options.js.map +1 -1
  26. package/lib/components/metrics-table-row-count/index.js +18 -0
  27. package/lib/components/metrics-table-row-count/index.js.map +1 -0
  28. package/lib/components/metrics-table-row-count/metrics-table-row-count.js +17 -0
  29. package/lib/components/metrics-table-row-count/metrics-table-row-count.js.map +1 -0
  30. package/lib/components/metrics-table-row-count/metrics-table-row-count.module.css +5 -0
  31. package/lib/components/metrics-treemap/metrics-treemap.js +6 -4
  32. package/lib/components/metrics-treemap/metrics-treemap.js.map +1 -1
  33. package/lib/components/metrics-treemap/metrics-treemap.module.css +0 -7
  34. package/lib/components/summary/summary.js +5 -4
  35. package/lib/components/summary/summary.js.map +1 -1
  36. package/lib/components/summary/summary.module.css +0 -11
  37. package/lib/css/variables.css +3 -3
  38. package/lib/layout/flex-stack/flex-stack.js +2 -2
  39. package/lib/layout/flex-stack/flex-stack.js.map +1 -1
  40. package/lib/layout/flex-stack/flex-stack.module.css +65 -10
  41. package/lib/ui/button/button.js +1 -0
  42. package/lib/ui/button/button.js.map +1 -1
  43. package/lib/ui/button/button.module.css +15 -4
  44. package/lib/ui/control-group/control-group.js +1 -1
  45. package/lib/ui/control-group/control-group.js.map +1 -1
  46. package/lib/ui/filters/filters.js +7 -6
  47. package/lib/ui/filters/filters.js.map +1 -1
  48. package/lib/ui/filters/filters.module.css +1 -3
  49. package/lib/ui/table/table.module.css +11 -4
  50. package/lib/ui/tabs/tabs.module.css +1 -1
  51. package/lib/ui/toolbar/toolbar.js +2 -1
  52. package/lib/ui/toolbar/toolbar.js.map +1 -1
  53. package/lib/ui/toolbar/toolbar.module.css +0 -6
  54. package/lib-esm/app/app.js +2 -1
  55. package/lib-esm/app/app.js.map +1 -1
  56. package/lib-esm/app/app.module.css +0 -5
  57. package/lib-esm/components/asset-name/asset-name.js +8 -7
  58. package/lib-esm/components/asset-name/asset-name.js.map +1 -1
  59. package/lib-esm/components/asset-name/asset-name.module.css +11 -10
  60. package/lib-esm/components/bundle-assets/bundle-assets.js +4 -2
  61. package/lib-esm/components/bundle-assets/bundle-assets.js.map +1 -1
  62. package/lib-esm/components/bundle-assets/bundle-assets.module.css +0 -12
  63. package/lib-esm/components/bundle-assets-totals/bundle-assets-totals.js +4 -2
  64. package/lib-esm/components/bundle-assets-totals/bundle-assets-totals.js.map +1 -1
  65. package/lib-esm/components/bundle-modules/bundle-modules.js +5 -3
  66. package/lib-esm/components/bundle-modules/bundle-modules.js.map +1 -1
  67. package/lib-esm/components/bundle-modules/bundle-modules.module.css +2 -16
  68. package/lib-esm/components/bundle-packages/bundle-packages.js +5 -3
  69. package/lib-esm/components/bundle-packages/bundle-packages.js.map +1 -1
  70. package/lib-esm/components/bundle-packages/bundle-packages.module.css +18 -22
  71. package/lib-esm/components/jobs-header/jobs-header.js +1 -1
  72. package/lib-esm/components/jobs-header/jobs-header.js.map +1 -1
  73. package/lib-esm/components/jobs-header/jobs-header.module.css +0 -1
  74. package/lib-esm/components/metrics-table/metrics-table.js +32 -20
  75. package/lib-esm/components/metrics-table/metrics-table.js.map +1 -1
  76. package/lib-esm/components/metrics-table/metrics-table.module.css +4 -12
  77. package/lib-esm/components/metrics-table-options/metrics-table-options.js +4 -4
  78. package/lib-esm/components/metrics-table-options/metrics-table-options.js.map +1 -1
  79. package/lib-esm/components/metrics-table-row-count/index.js +2 -0
  80. package/lib-esm/components/metrics-table-row-count/index.js.map +1 -0
  81. package/lib-esm/components/metrics-table-row-count/metrics-table-row-count.js +10 -0
  82. package/lib-esm/components/metrics-table-row-count/metrics-table-row-count.js.map +1 -0
  83. package/lib-esm/components/metrics-table-row-count/metrics-table-row-count.module.css +5 -0
  84. package/lib-esm/components/metrics-treemap/metrics-treemap.js +6 -4
  85. package/lib-esm/components/metrics-treemap/metrics-treemap.js.map +1 -1
  86. package/lib-esm/components/metrics-treemap/metrics-treemap.module.css +0 -7
  87. package/lib-esm/components/summary/summary.js +5 -4
  88. package/lib-esm/components/summary/summary.js.map +1 -1
  89. package/lib-esm/components/summary/summary.module.css +0 -11
  90. package/lib-esm/css/variables.css +3 -3
  91. package/lib-esm/layout/flex-stack/flex-stack.js +3 -2
  92. package/lib-esm/layout/flex-stack/flex-stack.js.map +1 -1
  93. package/lib-esm/layout/flex-stack/flex-stack.module.css +65 -10
  94. package/lib-esm/ui/button/button.js +1 -0
  95. package/lib-esm/ui/button/button.js.map +1 -1
  96. package/lib-esm/ui/button/button.module.css +15 -4
  97. package/lib-esm/ui/control-group/control-group.js +1 -1
  98. package/lib-esm/ui/control-group/control-group.js.map +1 -1
  99. package/lib-esm/ui/filters/filters.js +7 -6
  100. package/lib-esm/ui/filters/filters.js.map +1 -1
  101. package/lib-esm/ui/filters/filters.module.css +1 -3
  102. package/lib-esm/ui/table/table.module.css +11 -4
  103. package/lib-esm/ui/tabs/tabs.module.css +1 -1
  104. package/lib-esm/ui/toolbar/toolbar.js +2 -1
  105. package/lib-esm/ui/toolbar/toolbar.js.map +1 -1
  106. package/lib-esm/ui/toolbar/toolbar.module.css +0 -6
  107. package/package.json +3 -3
  108. package/src/app/app.jsx +3 -2
  109. package/src/app/app.module.css +0 -5
  110. package/src/components/asset-name/asset-name.module.css +11 -10
  111. package/src/components/asset-name/asset-name.tsx +17 -14
  112. package/src/components/bundle-assets/bundle-assets.module.css +0 -12
  113. package/src/components/bundle-assets/bundle-assets.tsx +8 -1
  114. package/src/components/bundle-assets-totals/bundle-assets-totals.jsx +6 -4
  115. package/src/components/bundle-modules/bundle-modules.module.css +2 -16
  116. package/src/components/bundle-modules/bundle-modules.tsx +10 -3
  117. package/src/components/bundle-packages/bundle-packages.jsx +14 -3
  118. package/src/components/bundle-packages/bundle-packages.module.css +18 -22
  119. package/src/components/jobs-header/jobs-header.module.css +0 -1
  120. package/src/components/jobs-header/jobs-header.tsx +2 -2
  121. package/src/components/metrics-table/metrics-table.module.css +4 -12
  122. package/src/components/metrics-table/metrics-table.tsx +70 -39
  123. package/src/components/metrics-table-options/metrics-table-options.tsx +12 -12
  124. package/src/components/metrics-table-row-count/index.ts +1 -0
  125. package/src/components/metrics-table-row-count/metrics-table-row-count.module.css +5 -0
  126. package/src/components/metrics-table-row-count/metrics-table-row-count.tsx +21 -0
  127. package/src/components/metrics-treemap/metrics-treemap.module.css +0 -7
  128. package/src/components/metrics-treemap/metrics-treemap.tsx +18 -7
  129. package/src/components/summary/summary.module.css +0 -11
  130. package/src/components/summary/summary.tsx +9 -8
  131. package/src/css/variables.css +3 -3
  132. package/src/layout/flex-stack/flex-stack.module.css +65 -10
  133. package/src/layout/flex-stack/flex-stack.stories.tsx +68 -9
  134. package/src/layout/flex-stack/flex-stack.tsx +24 -4
  135. package/src/ui/button/button.module.css +15 -4
  136. package/src/ui/button/button.stories.tsx +1 -1
  137. package/src/ui/button/button.tsx +1 -0
  138. package/src/ui/control-group/control-group.tsx +1 -1
  139. package/src/ui/filters/filters.module.css +1 -3
  140. package/src/ui/filters/filters.tsx +22 -22
  141. package/src/ui/table/table.module.css +11 -4
  142. package/src/ui/tabs/tabs.module.css +1 -1
  143. package/src/ui/toolbar/toolbar.jsx +4 -1
  144. package/src/ui/toolbar/toolbar.module.css +0 -6
  145. package/types/components/metrics-table/metrics-table.d.ts +2 -1
  146. package/types/components/metrics-table-row-count/index.d.ts +1 -0
  147. package/types/components/metrics-table-row-count/metrics-table-row-count.d.ts +7 -0
  148. package/types/layout/flex-stack/flex-stack.d.ts +6 -2
  149. package/types/ui/button/button.d.ts +1 -0
@@ -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
  );
@@ -146,9 +146,9 @@ body {
146
146
  --color-text-ultra-dark: var(--color-gray-ultra-dark);
147
147
  --color-heading: var(--color-gray-ultra-dark);
148
148
 
149
- --color-accent-light: var(--color-gray);
150
- --color-accent: var(--color-gray-dark);
151
- --color-accent-dark: var(--color-gray-ultra-dark);
149
+ --color-accent-light: var(--color-branding-light);
150
+ --color-accent: var(--color-branding);
151
+ --color-accent-dark: var(--color-branding-dark);
152
152
 
153
153
  --color-success-light: var(--color-green-light);
154
154
  --color-success: var(--color-green);
@@ -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
  );
@@ -49,13 +49,13 @@ a.root {
49
49
  * Kind variation
50
50
  */
51
51
  .primary {
52
- color: var(--color-primary);
52
+ color: var(--color-accent);
53
53
  }
54
54
 
55
55
  .primary:hover,
56
56
  .primary:active,
57
57
  .primary:focus {
58
- color: var(--color-primary-dark);
58
+ color: var(--color-accent-dark);
59
59
  }
60
60
 
61
61
  .secondary {
@@ -112,14 +112,14 @@ a.root {
112
112
  * Solid Kind variation
113
113
  */
114
114
  .solid {
115
- background: var(--color-text-ultra-light);
115
+ background: var(--color-accent);
116
116
  color: var(--color-background);
117
117
  }
118
118
 
119
119
  .solid:hover,
120
120
  .solid:active,
121
121
  .solid:focus {
122
- background: var(--color-text-light);
122
+ background: var(--color-accent-dark);
123
123
  color: var(--color-background);
124
124
  }
125
125
 
@@ -186,6 +186,13 @@ a.root {
186
186
  /**
187
187
  * Size variation
188
188
  */
189
+ .xsmall {
190
+ --button-space: var(--space-xxxsmall);
191
+ --line-height: var(--space-xsmall);
192
+
193
+ font-size: var(--size-xsmall);
194
+ }
195
+
189
196
  .small {
190
197
  --button-space: var(--space-xxsmall);
191
198
  --line-height: var(--space-small);
@@ -289,6 +296,10 @@ a.root {
289
296
  /**
290
297
  * Radius variation
291
298
  */
299
+ .radius--xsmall {
300
+ border-radius: var(--radius-xsmall);
301
+ }
302
+
292
303
  .radius--small {
293
304
  border-radius: var(--radius-small);
294
305
  }
@@ -19,7 +19,7 @@ export default meta;
19
19
  type Story = StoryObj<typeof meta>;
20
20
 
21
21
  const Items = (props: React.ComponentProps<typeof FlexStack>) => (
22
- <FlexStack alignItems="top" style={{ flexWrap: 'wrap', gap: '12px' }} {...props} />
22
+ <FlexStack alignItems="top" wrap="wrap" gap="xsmall" {...props} />
23
23
  );
24
24
 
25
25
  export const Default: Story = {};
@@ -6,6 +6,7 @@ import { Icon as BaseIcon } from '../icon';
6
6
  import css from './button.module.css';
7
7
 
8
8
  export const BUTTON_SIZE = {
9
+ XSMALL: 'xsmall',
9
10
  SMALL: 'small',
10
11
  MEDIUM: 'medium',
11
12
  LARGE: 'large',
@@ -9,7 +9,7 @@ export const ControlGroup = (props: React.ComponentProps<typeof FlexStack>) => {
9
9
  return (
10
10
  <FlexStack
11
11
  className={cx(css.root, className)}
12
- space="no-space"
12
+ gap="no-space"
13
13
  alignItems="center"
14
14
  {...restProps}
15
15
  />
@@ -72,8 +72,6 @@
72
72
  right: 2px;
73
73
  top: 50%;
74
74
  transform: translateY(-50%);
75
- padding: var(--space-xxxsmall);
76
- font-size: var(--size-xsmall);
77
75
  line-height: 1.1;
78
76
  }
79
77
 
@@ -102,8 +100,8 @@
102
100
  }
103
101
 
104
102
  .filterGroupSearchNotFound {
105
- padding: var(--space-xxsmall) 0;
106
103
  text-align: center;
104
+ min-height: calc(10 * (var(--space-small) + 2 * var(--space-xxxsmall)));
107
105
  font-size: var(--size-small);
108
106
  color: var(--color-text-light);
109
107
  }
@@ -20,12 +20,7 @@ const Filter = (props: FilterBooleanProps) => {
20
20
  const { className = '', label, name, ...inputProps } = props;
21
21
 
22
22
  return (
23
- <FlexStack
24
- space="xxxsmall"
25
- alignItems="center"
26
- as="label"
27
- className={cx(css.filter, className)}
28
- >
23
+ <FlexStack gap="xxxsmall" alignItems="center" as="label" className={cx(css.filter, className)}>
29
24
  <input
30
25
  type="checkbox"
31
26
  id={`filter-${name}`}
@@ -100,9 +95,8 @@ const FilterDropdownItem = (props: FilterDropdownItemProps) => {
100
95
  className={css.filterGroupItemFilter}
101
96
  />
102
97
  <Button
103
- kind="info"
104
98
  solid
105
- size="small"
99
+ size="xsmall"
106
100
  type="button"
107
101
  onClick={onOnlyClick}
108
102
  disabled={disabled}
@@ -189,20 +183,26 @@ const FilterGroup = (props: FilterGroupProps) => {
189
183
  )}
190
184
  <DropdownGroup className={css.filterGroupItems}>
191
185
  {filteredGroupItems.length === 0 && (
192
- <Stack className={css.filterGroupSearchNotFound}>
193
- <p>{I18N.GROUP_NOT_FOUND}</p>
194
- <div>
195
- <Button
196
- size="small"
197
- kind="primary"
198
- type="button"
199
- onClick={() => setSearch('')}
200
- className={css.filterGroupSearchNotFoundClear}
201
- >
202
- {I18N.GROUP_SEARCH_CLEAR}
203
- </Button>
204
- </div>
205
- </Stack>
186
+ <FlexStack
187
+ alignItems="center"
188
+ justifyContent="center"
189
+ className={css.filterGroupSearchNotFound}
190
+ >
191
+ <Stack space="xxxsmall">
192
+ <p>{I18N.GROUP_NOT_FOUND}</p>
193
+ <div>
194
+ <Button
195
+ solid
196
+ size="xsmall"
197
+ type="button"
198
+ onClick={() => setSearch('')}
199
+ className={css.filterGroupSearchNotFoundClear}
200
+ >
201
+ {I18N.GROUP_SEARCH_CLEAR}
202
+ </Button>
203
+ </div>
204
+ </Stack>
205
+ </FlexStack>
206
206
  )}
207
207
  {filteredGroupItems.map(({ key: itemKey, ...itemData }) => {
208
208
  const id = getGroupItemKey(groupKey, itemKey);
@@ -33,21 +33,28 @@
33
33
  border-top: 0;
34
34
  }
35
35
 
36
- .root tbody td a {
36
+ .root tbody a {
37
37
  color: inherit;
38
38
  text-decoration: none;
39
39
  }
40
40
 
41
- .root tbody td a:focus,
42
- .root tbody td a:active,
43
- .root tbody td a:hover {
41
+ .root tbody a:focus,
42
+ .root tbody a:active,
43
+ .root tbody a:hover {
44
44
  color: var(--color-accent);
45
45
  text-decoration: underline;
46
46
  }
47
47
 
48
+ /* hover current row */
49
+ .root tbody tr th,
50
+ .root tbody tr td {
51
+ transition: var(--transition-out);
52
+ }
53
+
48
54
  .root tbody tr:hover th,
49
55
  .root tbody tr:hover td {
50
56
  background-color: var(--color-highlight-warning);
57
+ transition: var(--transition-in);
51
58
  }
52
59
 
53
60
  .empty {
@@ -39,7 +39,7 @@
39
39
  .item:hover::after,
40
40
  .item:active::after,
41
41
  .item:focus::after {
42
- background: currentColor;
42
+ opacity: 1;
43
43
  transition: var(--transition-in);
44
44
  }
45
45
 
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import cx from 'classnames';
3
3
  import PropTypes from 'prop-types';
4
4
 
5
+ import { FlexStack } from '../../layout/flex-stack';
5
6
  import css from './toolbar.module.css';
6
7
 
7
8
  export const Toolbar = (props) => {
@@ -12,7 +13,9 @@ export const Toolbar = (props) => {
12
13
  <div className={rootClassName}>
13
14
  <div className={css.content}>{children}</div>
14
15
  {renderActions && (
15
- <div className={css.actions}>{renderActions({ actionClassName: css.action })}</div>
16
+ <FlexStack gap="xsmall" alignItems="center" className={css.actions}>
17
+ {renderActions({ actionClassName: css.action })}
18
+ </FlexStack>
16
19
  )}
17
20
  </div>
18
21
  );
@@ -6,18 +6,12 @@
6
6
 
7
7
  .actions {
8
8
  margin-top: var(--space-xsmall);
9
- display: flex;
10
- align-items: center;
11
9
  }
12
10
 
13
11
  .action {
14
12
  flex: 0 0 auto;
15
13
  }
16
14
 
17
- .action + .action {
18
- margin-left: var(--space-xsmall);
19
- }
20
-
21
15
  @media (min-width: 768px) {
22
16
  .root {
23
17
  display: flex;
@@ -13,9 +13,10 @@ interface MetricsTableProps extends Omit<React.ComponentProps<typeof Table>, 'ti
13
13
  sort?: MetricsTableHeaderProps['sort'];
14
14
  updateSort?: MetricsTableHeaderProps['updateSort'];
15
15
  renderRowHeader?: (item: ReportMetricRow) => React.ReactNode;
16
+ onRowClick?: (item: ReportMetricRow) => void;
16
17
  emptyMessage?: React.ReactNode;
17
18
  showAllItems: boolean;
18
19
  setShowAllItems: (value: boolean) => void;
19
20
  }
20
- export declare const MetricsTable: ({ className, runs, items, showHeaderSum, title, sort, updateSort, renderRowHeader, emptyMessage, showAllItems, setShowAllItems, ...restProps }: MetricsTableProps) => React.JSX.Element;
21
+ export declare const MetricsTable: ({ className, runs, items, showHeaderSum, title, sort, updateSort, renderRowHeader, onRowClick, emptyMessage, showAllItems, setShowAllItems, ...restProps }: MetricsTableProps) => React.JSX.Element;
21
22
  export {};
@@ -0,0 +1 @@
1
+ export * from './metrics-table-row-count';
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { FlexStackProps } from '../../layout/flex-stack';
3
+ export type MetricsTableRowCountProps = {
4
+ count: number;
5
+ total: number;
6
+ } & FlexStackProps<'span'>;
7
+ export declare const MetricsTableRowCount: (props: MetricsTableRowCountProps) => React.JSX.Element;
@@ -1,11 +1,15 @@
1
1
  import React from 'react';
2
2
  import { SPACES } from '../../tokens';
3
3
  type SpaceValue = (typeof SPACES)[number];
4
- interface FlexStackProps<T extends React.ElementType> {
4
+ export type FlexStackProps<T extends React.ElementType> = {
5
5
  as?: T;
6
+ gap?: SpaceValue;
6
7
  space?: SpaceValue;
7
8
  inline?: boolean;
9
+ direction?: 'row' | 'row-reverse' | 'column' | 'column-reverse';
10
+ wrap?: 'nowrap' | 'wrap' | 'wrap-reverse';
8
11
  alignItems?: 'top' | 'center' | 'bottom';
9
- }
12
+ justifyContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
13
+ };
10
14
  export declare const FlexStack: <T extends React.ElementType = "div">(props: FlexStackProps<T> & Omit<React.ComponentProps<T>, keyof FlexStackProps<T>>) => React.JSX.Element;
11
15
  export {};
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Icon as BaseIcon } from '../icon';
3
3
  export declare const BUTTON_SIZE: {
4
+ readonly XSMALL: "xsmall";
4
5
  readonly SMALL: "small";
5
6
  readonly MEDIUM: "medium";
6
7
  readonly LARGE: "large";