@bundle-stats/ui 4.13.0-beta.9 → 4.13.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/app/app.js +4 -8
- package/lib/app/app.js.map +1 -1
- package/lib/app/app.module.css +2 -2
- package/lib/assets/icons.svg +70 -67
- package/lib/assets/icons.svg.js +14 -12
- package/lib/assets/icons.svg.js.map +1 -1
- package/lib/components/bundle-assets/bundle-assets.js +61 -26
- package/lib/components/bundle-assets/bundle-assets.js.map +1 -1
- package/lib/components/bundle-assets/bundle-assets.module.css +0 -5
- package/lib/components/bundle-assets/index.js +3 -1
- package/lib/components/bundle-assets/index.js.map +1 -1
- package/lib/components/bundle-assets-totals/bundle-assets-totals.js +14 -12
- package/lib/components/bundle-assets-totals/bundle-assets-totals.js.map +1 -1
- package/lib/components/bundle-modules/bundle-modules.i18n.js +1 -1
- package/lib/components/bundle-modules/bundle-modules.js +42 -15
- package/lib/components/bundle-modules/bundle-modules.js.map +1 -1
- package/lib/components/bundle-modules/bundle-modules.module.css +0 -5
- package/lib/components/bundle-modules/bundle-modules.utils.js +2 -13
- package/lib/components/bundle-modules/bundle-modules.utils.js.map +1 -1
- package/lib/components/bundle-modules/index.js +2 -1
- package/lib/components/bundle-modules/index.js.map +1 -1
- package/lib/components/bundle-packages/bundle-packages.js +48 -9
- package/lib/components/bundle-packages/bundle-packages.js.map +1 -1
- package/lib/components/bundle-packages/bundle-packages.module.css +0 -5
- package/lib/components/delta/delta.js +1 -1
- package/lib/components/delta/delta.js.map +1 -1
- package/lib/components/delta/delta.module.css +10 -1
- package/lib/components/jobs-header/jobs-header.module.css +0 -4
- package/lib/components/metrics-display-selector/metrics-display-selector.js +41 -4
- package/lib/components/metrics-display-selector/metrics-display-selector.js.map +1 -1
- package/lib/components/metrics-display-selector/metrics-display-selector.module.css +15 -7
- package/lib/components/metrics-treemap/index.js +4 -0
- package/lib/components/metrics-treemap/index.js.map +1 -1
- package/lib/components/metrics-treemap/metrics-treemap.constants.js +10 -0
- package/lib/components/metrics-treemap/metrics-treemap.constants.js.map +1 -0
- package/lib/components/metrics-treemap/metrics-treemap.i18n.js +6 -0
- package/lib/components/metrics-treemap/metrics-treemap.i18n.js.map +1 -0
- package/lib/components/metrics-treemap/metrics-treemap.js +131 -95
- package/lib/components/metrics-treemap/metrics-treemap.js.map +1 -1
- package/lib/components/metrics-treemap/metrics-treemap.module.css +179 -54
- package/lib/components/metrics-treemap/metrics-treemap.utils.js +168 -0
- package/lib/components/metrics-treemap/metrics-treemap.utils.js.map +1 -0
- package/lib/components/module-info/module-info.js +1 -2
- package/lib/components/module-info/module-info.js.map +1 -1
- package/lib/components/run-info/run-info.module.css +7 -7
- package/lib/css/variables.css +14 -13
- package/lib/hooks/metrics-display-type.js +45 -24
- package/lib/hooks/metrics-display-type.js.map +1 -1
- package/lib/hooks/search-params.js +1 -0
- package/lib/hooks/search-params.js.map +1 -1
- package/lib/layout/box/box.module.css +4 -2
- package/lib/layout/flex-stack/flex-stack.js +3 -4
- package/lib/layout/flex-stack/flex-stack.js.map +1 -1
- package/lib/layout/flex-stack/flex-stack.module.css +19 -23
- package/lib/ui/button/button.js +5 -4
- package/lib/ui/button/button.js.map +1 -1
- package/lib/ui/button/button.module.css +55 -53
- package/lib/ui/dropdown/dropdown.js +2 -2
- package/lib/ui/dropdown/dropdown.js.map +1 -1
- package/lib/ui/filters/filters.js +2 -2
- package/lib/ui/filters/filters.js.map +1 -1
- package/lib/ui/filters/filters.module.css +8 -1
- package/lib/ui/hover-card/hover-card.js +1 -1
- package/lib/ui/hover-card/hover-card.js.map +1 -1
- package/lib/ui/icon/icon.js +2 -1
- package/lib/ui/icon/icon.js.map +1 -1
- package/lib/ui/input-search/input-search.js +1 -1
- package/lib/ui/input-search/input-search.js.map +1 -1
- package/lib/ui/loader/loader.js +1 -1
- package/lib/ui/loader/loader.js.map +1 -1
- package/lib/ui/table/table.module.css +30 -0
- package/lib/ui/tag/tag.module.css +3 -3
- package/lib/ui/toolbar/toolbar.module.css +1 -3
- package/lib/utils/colors.js +22 -0
- package/lib/utils/colors.js.map +1 -0
- package/lib/{utils.js → utils/components.js} +2 -17
- package/lib/utils/components.js.map +1 -0
- package/lib/utils/index.js +20 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/jobs.js +18 -0
- package/lib/utils/jobs.js.map +1 -0
- package/lib-esm/app/app.js +4 -8
- package/lib-esm/app/app.js.map +1 -1
- package/lib-esm/app/app.module.css +2 -2
- package/lib-esm/assets/icons.svg +70 -67
- package/lib-esm/assets/icons.svg.js +14 -12
- package/lib-esm/assets/icons.svg.js.map +1 -1
- package/lib-esm/components/bundle-assets/bundle-assets.js +62 -28
- package/lib-esm/components/bundle-assets/bundle-assets.js.map +1 -1
- package/lib-esm/components/bundle-assets/bundle-assets.module.css +0 -5
- package/lib-esm/components/bundle-assets/index.js +3 -1
- package/lib-esm/components/bundle-assets/index.js.map +1 -1
- package/lib-esm/components/bundle-assets-totals/bundle-assets-totals.js +15 -13
- package/lib-esm/components/bundle-assets-totals/bundle-assets-totals.js.map +1 -1
- package/lib-esm/components/bundle-modules/bundle-modules.i18n.js +1 -1
- package/lib-esm/components/bundle-modules/bundle-modules.js +43 -16
- package/lib-esm/components/bundle-modules/bundle-modules.js.map +1 -1
- package/lib-esm/components/bundle-modules/bundle-modules.module.css +0 -5
- package/lib-esm/components/bundle-modules/bundle-modules.utils.js +1 -11
- package/lib-esm/components/bundle-modules/bundle-modules.utils.js.map +1 -1
- package/lib-esm/components/bundle-modules/index.js +3 -2
- package/lib-esm/components/bundle-modules/index.js.map +1 -1
- package/lib-esm/components/bundle-packages/bundle-packages.js +49 -10
- package/lib-esm/components/bundle-packages/bundle-packages.js.map +1 -1
- package/lib-esm/components/bundle-packages/bundle-packages.module.css +0 -5
- package/lib-esm/components/delta/delta.js +1 -1
- package/lib-esm/components/delta/delta.js.map +1 -1
- package/lib-esm/components/delta/delta.module.css +10 -1
- package/lib-esm/components/jobs-header/jobs-header.module.css +0 -4
- package/lib-esm/components/metrics-display-selector/metrics-display-selector.js +41 -4
- package/lib-esm/components/metrics-display-selector/metrics-display-selector.js.map +1 -1
- package/lib-esm/components/metrics-display-selector/metrics-display-selector.module.css +15 -7
- package/lib-esm/components/metrics-treemap/index.js +1 -0
- package/lib-esm/components/metrics-treemap/index.js.map +1 -1
- package/lib-esm/components/metrics-treemap/metrics-treemap.constants.js +7 -0
- package/lib-esm/components/metrics-treemap/metrics-treemap.constants.js.map +1 -0
- package/lib-esm/components/metrics-treemap/metrics-treemap.i18n.js +3 -0
- package/lib-esm/components/metrics-treemap/metrics-treemap.i18n.js.map +1 -0
- package/lib-esm/components/metrics-treemap/metrics-treemap.js +134 -98
- package/lib-esm/components/metrics-treemap/metrics-treemap.js.map +1 -1
- package/lib-esm/components/metrics-treemap/metrics-treemap.module.css +179 -54
- package/lib-esm/components/metrics-treemap/metrics-treemap.utils.js +162 -0
- package/lib-esm/components/metrics-treemap/metrics-treemap.utils.js.map +1 -0
- package/lib-esm/components/module-info/module-info.js +1 -2
- package/lib-esm/components/module-info/module-info.js.map +1 -1
- package/lib-esm/components/run-info/run-info.module.css +7 -7
- package/lib-esm/css/variables.css +14 -13
- package/lib-esm/hooks/metrics-display-type.js +46 -24
- package/lib-esm/hooks/metrics-display-type.js.map +1 -1
- package/lib-esm/hooks/search-params.js +1 -0
- package/lib-esm/hooks/search-params.js.map +1 -1
- package/lib-esm/layout/box/box.module.css +4 -2
- package/lib-esm/layout/flex-stack/flex-stack.js +3 -4
- package/lib-esm/layout/flex-stack/flex-stack.js.map +1 -1
- package/lib-esm/layout/flex-stack/flex-stack.module.css +19 -23
- package/lib-esm/ui/button/button.js +5 -4
- package/lib-esm/ui/button/button.js.map +1 -1
- package/lib-esm/ui/button/button.module.css +55 -53
- package/lib-esm/ui/dropdown/dropdown.js +2 -2
- package/lib-esm/ui/dropdown/dropdown.js.map +1 -1
- package/lib-esm/ui/filters/filters.js +2 -2
- package/lib-esm/ui/filters/filters.js.map +1 -1
- package/lib-esm/ui/filters/filters.module.css +8 -1
- package/lib-esm/ui/hover-card/hover-card.js +1 -1
- package/lib-esm/ui/hover-card/hover-card.js.map +1 -1
- package/lib-esm/ui/icon/icon.js +2 -1
- package/lib-esm/ui/icon/icon.js.map +1 -1
- package/lib-esm/ui/input-search/input-search.js +1 -1
- package/lib-esm/ui/input-search/input-search.js.map +1 -1
- package/lib-esm/ui/loader/loader.js +1 -1
- package/lib-esm/ui/loader/loader.js.map +1 -1
- package/lib-esm/ui/table/table.module.css +30 -0
- package/lib-esm/ui/tag/tag.module.css +3 -3
- package/lib-esm/ui/toolbar/toolbar.module.css +1 -3
- package/lib-esm/utils/colors.js +15 -0
- package/lib-esm/utils/colors.js.map +1 -0
- package/lib-esm/utils/components.js +16 -0
- package/lib-esm/utils/components.js.map +1 -0
- package/lib-esm/utils/index.js +4 -0
- package/lib-esm/utils/index.js.map +1 -0
- package/lib-esm/utils/jobs.js +11 -0
- package/lib-esm/utils/jobs.js.map +1 -0
- package/package.json +9 -9
- package/src/app/app.jsx +4 -12
- package/src/app/app.module.css +2 -2
- package/src/assets/icons/check.svg +4 -0
- package/src/assets/icons.svg +70 -67
- package/src/assets/icons.svg.jsx +12 -12
- package/src/components/bundle-assets/bundle-assets.jsx +147 -66
- package/src/components/bundle-assets/bundle-assets.module.css +0 -5
- package/src/components/bundle-assets/index.jsx +4 -0
- package/src/components/bundle-assets-totals/bundle-assets-totals.jsx +53 -46
- package/src/components/bundle-modules/bundle-modules.i18n.ts +1 -1
- package/src/components/bundle-modules/bundle-modules.module.css +0 -5
- package/src/components/bundle-modules/bundle-modules.tsx +140 -56
- package/src/components/bundle-modules/bundle-modules.types.d.ts +2 -17
- package/src/components/bundle-modules/bundle-modules.utils.ts +7 -18
- package/src/components/bundle-modules/index.tsx +4 -3
- package/src/components/bundle-packages/bundle-packages.jsx +89 -20
- package/src/components/bundle-packages/bundle-packages.module.css +0 -5
- package/src/components/delta/delta.jsx +1 -1
- package/src/components/delta/delta.module.css +10 -1
- package/src/components/jobs-header/jobs-header.module.css +0 -4
- package/src/components/metrics-display-selector/metrics-display-selector.module.css +15 -7
- package/src/components/metrics-display-selector/metrics-display-selector.stories.tsx +33 -0
- package/src/components/metrics-display-selector/metrics-display-selector.tsx +83 -25
- package/src/components/metrics-treemap/__tests__/metrics-treemap.utils.ts +188 -0
- package/src/components/metrics-treemap/index.ts +1 -0
- package/src/components/metrics-treemap/metrics-treemap.constants.ts +63 -0
- package/src/components/metrics-treemap/metrics-treemap.i18n.ts +2 -0
- package/src/components/metrics-treemap/metrics-treemap.module.css +179 -54
- package/src/components/metrics-treemap/metrics-treemap.stories.tsx +44 -10
- package/src/components/metrics-treemap/metrics-treemap.tsx +453 -184
- package/src/components/metrics-treemap/metrics-treemap.utils.ts +268 -0
- package/src/components/module-info/module-info.tsx +1 -1
- package/src/components/run-info/run-info.module.css +7 -7
- package/src/css/variables.css +14 -13
- package/src/hooks/metrics-display-type.ts +79 -29
- package/src/hooks/search-params.js +1 -0
- package/src/layout/box/box.module.css +4 -2
- package/src/layout/flex-stack/flex-stack.module.css +19 -23
- package/src/layout/flex-stack/flex-stack.tsx +2 -8
- package/src/ui/button/button.module.css +55 -53
- package/src/ui/button/button.stories.tsx +16 -9
- package/src/ui/button/button.tsx +8 -7
- package/src/ui/dropdown/dropdown.tsx +2 -3
- package/src/ui/filters/filters.module.css +8 -1
- package/src/ui/filters/filters.tsx +2 -3
- package/src/ui/hover-card/hover-card.tsx +1 -1
- package/src/ui/icon/icon.tsx +2 -1
- package/src/ui/input-search/input-search.tsx +1 -0
- package/src/ui/loader/loader.jsx +1 -1
- package/src/ui/table/table.module.css +30 -0
- package/src/ui/tag/tag.module.css +3 -3
- package/src/ui/toolbar/toolbar.module.css +1 -3
- package/src/utils/colors.ts +19 -0
- package/src/utils/components.tsx +19 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/jobs.ts +22 -0
- package/types/components/bundle-assets/bundle-assets.d.ts +1 -5
- package/types/components/bundle-modules/bundle-modules.d.ts +4 -2
- package/types/components/bundle-modules/bundle-modules.i18n.d.ts +1 -1
- package/types/components/bundle-modules/bundle-modules.utils.d.ts +3 -7
- package/types/components/bundle-modules/index.d.ts +2 -2
- package/types/components/delta/delta.d.ts +2 -2
- package/types/components/metrics-display-selector/metrics-display-selector.d.ts +3 -1
- package/types/components/metrics-treemap/index.d.ts +1 -0
- package/types/components/metrics-treemap/metrics-treemap.constants.d.ts +28 -0
- package/types/components/metrics-treemap/metrics-treemap.d.ts +7 -5
- package/types/components/metrics-treemap/metrics-treemap.i18n.d.ts +2 -0
- package/types/components/metrics-treemap/metrics-treemap.utils.d.ts +15 -0
- package/types/hooks/metrics-display-type.d.ts +8 -2
- package/types/ui/dropdown/dropdown.d.ts +0 -1
- package/types/ui/icon/icon.d.ts +4 -2
- package/types/ui/loader/loader.d.ts +2 -2
- package/types/utils/colors.d.ts +1 -0
- package/types/utils/components.d.ts +2 -0
- package/types/utils/index.d.ts +3 -0
- package/types/utils/jobs.d.ts +7 -0
- package/lib/components/bundle-assets-totals/bundle-assets-totals.module.css +0 -7
- package/lib/utils.js.map +0 -1
- package/lib-esm/components/bundle-assets-totals/bundle-assets-totals.module.css +0 -7
- package/lib-esm/utils.js +0 -30
- package/lib-esm/utils.js.map +0 -1
- package/src/components/bundle-assets-totals/bundle-assets-totals.module.css +0 -7
- package/src/utils.jsx +0 -38
- package/types/utils.d.ts +0 -3
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
.root {
|
|
2
|
+
/* use for vertical padding and to compute gap and horizontal spacing */
|
|
3
|
+
--button-space: 0px;
|
|
4
|
+
/* button border width */
|
|
5
|
+
--border-width: 0px;
|
|
6
|
+
|
|
2
7
|
display: inline-flex;
|
|
3
8
|
align-items: center;
|
|
4
|
-
|
|
9
|
+
justify-content: center;
|
|
10
|
+
gap: calc(max(var(--button-space), var(--space-xxsmall)) * 0.66);
|
|
5
11
|
appearance: none;
|
|
6
12
|
padding: 0;
|
|
7
|
-
border:
|
|
13
|
+
border: var(--border-width) solid transparent;
|
|
8
14
|
background: none;
|
|
9
15
|
transition: var(--transition-out);
|
|
10
16
|
color: var(--color-text-ultra-light);
|
|
11
17
|
font-family: var(--font-family);
|
|
18
|
+
white-space: nowrap;
|
|
12
19
|
}
|
|
13
20
|
|
|
14
21
|
a.root {
|
|
@@ -18,6 +25,7 @@ a.root {
|
|
|
18
25
|
.root:hover,
|
|
19
26
|
.root:active,
|
|
20
27
|
.root:focus {
|
|
28
|
+
outline: none;
|
|
21
29
|
color: var(--color-text-light);
|
|
22
30
|
transition: var(--transition-in);
|
|
23
31
|
}
|
|
@@ -98,7 +106,7 @@ a.root {
|
|
|
98
106
|
* Solid Kind variation
|
|
99
107
|
*/
|
|
100
108
|
.solid {
|
|
101
|
-
background: var(--color-text-light);
|
|
109
|
+
background: var(--color-text-ultra-light);
|
|
102
110
|
color: var(--color-background);
|
|
103
111
|
}
|
|
104
112
|
|
|
@@ -106,7 +114,7 @@ a.root {
|
|
|
106
114
|
.solid:active,
|
|
107
115
|
.solid:focus {
|
|
108
116
|
box-shadow: var(--outline-hover);
|
|
109
|
-
background: var(--color-text);
|
|
117
|
+
background: var(--color-text-light);
|
|
110
118
|
color: var(--color-background);
|
|
111
119
|
}
|
|
112
120
|
|
|
@@ -170,11 +178,51 @@ a.root {
|
|
|
170
178
|
background: var(--color-success-dark);
|
|
171
179
|
}
|
|
172
180
|
|
|
181
|
+
/**
|
|
182
|
+
* Size variation
|
|
183
|
+
*/
|
|
184
|
+
.small {
|
|
185
|
+
--button-space: var(--space-xxsmall);
|
|
186
|
+
|
|
187
|
+
font-size: var(--size-small);
|
|
188
|
+
line-height: var(--space-small);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.small .glyph {
|
|
192
|
+
width: var(--space-small);
|
|
193
|
+
height: var(--space-small);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.medium {
|
|
197
|
+
--button-space: var(--space-xsmall);
|
|
198
|
+
|
|
199
|
+
font-size: var(--size-medium);
|
|
200
|
+
line-height: calc(var(--space-small) + var(--space-xxxsmall));
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.medium .glyph {
|
|
204
|
+
width: calc(var(--space-small) + var(--space-xxxsmall));
|
|
205
|
+
height: calc(var(--space-small) + var(--space-xxxsmall));
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.large {
|
|
209
|
+
--button-space: var(--space-small);
|
|
210
|
+
|
|
211
|
+
font-size: var(--size-large);
|
|
212
|
+
line-height: var(--space-medium);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.large .glyph {
|
|
216
|
+
width: var(--space-medium);
|
|
217
|
+
height: var(--space-medium);
|
|
218
|
+
}
|
|
219
|
+
|
|
173
220
|
/**
|
|
174
221
|
* Outline variation
|
|
175
222
|
*/
|
|
176
223
|
.outline {
|
|
177
|
-
border: 1px
|
|
224
|
+
--border-width: 1px;
|
|
225
|
+
border-color: var(--color-outline);
|
|
178
226
|
}
|
|
179
227
|
|
|
180
228
|
.outline:hover,
|
|
@@ -244,58 +292,12 @@ a.root {
|
|
|
244
292
|
border-color: var(--color-outline-success-dark);
|
|
245
293
|
}
|
|
246
294
|
|
|
247
|
-
/**
|
|
248
|
-
* Size variation
|
|
249
|
-
*/
|
|
250
|
-
.small {
|
|
251
|
-
font-size: var(--size-small);
|
|
252
|
-
gap: var(--space-xxxsmall);
|
|
253
|
-
line-height: var(--space-small);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.small .glyph {
|
|
257
|
-
width: calc(var(--space-xsmall) + 2px);
|
|
258
|
-
height: calc(var(--space-xsmall) + 2px);
|
|
259
|
-
margin: 1px; /* compensate to keep the same height when the text is not provided */
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.medium {
|
|
263
|
-
font-size: var(--size-medium);
|
|
264
|
-
gap: var(--space-xxsmall);
|
|
265
|
-
line-height: var(--space-small);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.large {
|
|
269
|
-
font-size: var(--size-large);
|
|
270
|
-
gap: var(--space-xxsmall);
|
|
271
|
-
line-height: var(--space-small);
|
|
272
|
-
}
|
|
273
295
|
|
|
274
296
|
/**
|
|
275
297
|
* Padding variation
|
|
276
298
|
*/
|
|
277
|
-
.padding
|
|
278
|
-
padding: var(--space-
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.outline--padding--small {
|
|
282
|
-
padding: calc(var(--space-xxsmall) - 1px);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
.padding--medium {
|
|
286
|
-
padding: var(--space-xsmall);
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.outline--padding--medium {
|
|
290
|
-
padding: calc(var(--space-xsmall) - 1px);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.padding--large {
|
|
294
|
-
padding: var(--space-small);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.outline--padding--large {
|
|
298
|
-
padding: calc(var(--space-small) - 1px);
|
|
299
|
+
.padding {
|
|
300
|
+
padding: calc(var(--button-space) - var(--border-width));
|
|
299
301
|
}
|
|
300
302
|
|
|
301
303
|
/**
|
|
@@ -62,7 +62,14 @@ export const All = () => (
|
|
|
62
62
|
<h3>With icon</h3>
|
|
63
63
|
<Items>
|
|
64
64
|
{Object.values(BUTTON_KIND).map((kind) => (
|
|
65
|
-
<Button glyph={Icon.ICONS.
|
|
65
|
+
<Button glyph={Icon.ICONS.ARROW_RIGHT_CIRCLE} kind={kind} key={kind}>
|
|
66
|
+
Action {kind}
|
|
67
|
+
</Button>
|
|
68
|
+
))}
|
|
69
|
+
</Items>
|
|
70
|
+
<Items>
|
|
71
|
+
{Object.values(BUTTON_KIND).map((kind) => (
|
|
72
|
+
<Button rightGlyph={Icon.ICONS.ARROW_RIGHT_CIRCLE} kind={kind} key={kind}>
|
|
66
73
|
Action {kind}
|
|
67
74
|
</Button>
|
|
68
75
|
))}
|
|
@@ -106,12 +113,12 @@ export const All = () => (
|
|
|
106
113
|
<h3>With icon</h3>
|
|
107
114
|
{Object.values(BUTTON_SIZE).map((size) => (
|
|
108
115
|
<Items key={size}>
|
|
109
|
-
<Button glyph={Icon.ICONS.
|
|
116
|
+
<Button glyph={Icon.ICONS.ARROW_RIGHT_CIRCLE} outline size={size}>
|
|
110
117
|
Action default
|
|
111
118
|
</Button>
|
|
112
119
|
{Object.values(BUTTON_KIND).map((kind) => (
|
|
113
120
|
<Button
|
|
114
|
-
glyph={Icon.ICONS.
|
|
121
|
+
glyph={Icon.ICONS.ARROW_RIGHT_CIRCLE}
|
|
115
122
|
outline
|
|
116
123
|
kind={kind}
|
|
117
124
|
size={size}
|
|
@@ -125,10 +132,10 @@ export const All = () => (
|
|
|
125
132
|
<h3>Only icon</h3>
|
|
126
133
|
{Object.values(BUTTON_SIZE).map((size) => (
|
|
127
134
|
<Items key={size}>
|
|
128
|
-
<Button glyph={Icon.ICONS.
|
|
135
|
+
<Button glyph={Icon.ICONS.ARROW_RIGHT_CIRCLE} outline size={size} />
|
|
129
136
|
{Object.values(BUTTON_KIND).map((kind) => (
|
|
130
137
|
<Button
|
|
131
|
-
glyph={Icon.ICONS.
|
|
138
|
+
glyph={Icon.ICONS.ARROW_RIGHT_CIRCLE}
|
|
132
139
|
outline
|
|
133
140
|
kind={kind}
|
|
134
141
|
size={size}
|
|
@@ -179,12 +186,12 @@ export const All = () => (
|
|
|
179
186
|
<h3>With icon</h3>
|
|
180
187
|
{Object.values(BUTTON_SIZE).map((size) => (
|
|
181
188
|
<Items key={size}>
|
|
182
|
-
<Button glyph={Icon.ICONS.
|
|
189
|
+
<Button glyph={Icon.ICONS.ARROW_RIGHT_CIRCLE} solid size={size}>
|
|
183
190
|
Action default
|
|
184
191
|
</Button>
|
|
185
192
|
{Object.values(BUTTON_KIND).map((kind) => (
|
|
186
193
|
<Button
|
|
187
|
-
glyph={Icon.ICONS.
|
|
194
|
+
glyph={Icon.ICONS.ARROW_RIGHT_CIRCLE}
|
|
188
195
|
solid
|
|
189
196
|
kind={kind}
|
|
190
197
|
size={size}
|
|
@@ -198,10 +205,10 @@ export const All = () => (
|
|
|
198
205
|
<h3>Only icon</h3>
|
|
199
206
|
{Object.values(BUTTON_SIZE).map((size) => (
|
|
200
207
|
<Items key={size}>
|
|
201
|
-
<Button glyph={Icon.ICONS.
|
|
208
|
+
<Button glyph={Icon.ICONS.ARROW_RIGHT_CIRCLE} solid size={size} />
|
|
202
209
|
{Object.values(BUTTON_KIND).map((kind) => (
|
|
203
210
|
<Button
|
|
204
|
-
glyph={Icon.ICONS.
|
|
211
|
+
glyph={Icon.ICONS.ARROW_RIGHT_CIRCLE}
|
|
205
212
|
solid
|
|
206
213
|
kind={kind}
|
|
207
214
|
size={size}
|
package/src/ui/button/button.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
|
|
2
3
|
import cx from 'classnames';
|
|
3
4
|
import { Button as ButtonBaseComponent } from 'ariakit/button';
|
|
4
5
|
|
|
@@ -50,7 +51,7 @@ const ButtonComponent = <T extends React.ElementType = 'button'>(
|
|
|
50
51
|
radius = '',
|
|
51
52
|
padding = '',
|
|
52
53
|
as: Component = ButtonBaseComponent,
|
|
53
|
-
children,
|
|
54
|
+
children = null,
|
|
54
55
|
Icon = BaseIcon,
|
|
55
56
|
glyph,
|
|
56
57
|
rightGlyph,
|
|
@@ -61,10 +62,12 @@ const ButtonComponent = <T extends React.ElementType = 'button'>(
|
|
|
61
62
|
const resolvedPadding = padding || ((outline || solid) && size);
|
|
62
63
|
const resolvedRadius = radius || ((outline || solid) && size);
|
|
63
64
|
|
|
65
|
+
const resolvedSize = Object.values(BUTTON_SIZE).includes(size) ? size : BUTTON_SIZE.MEDIUM;
|
|
66
|
+
|
|
64
67
|
const rootClassName = cx(
|
|
65
68
|
css.root,
|
|
66
|
-
css[size],
|
|
67
69
|
kind && css[kind],
|
|
70
|
+
css[resolvedSize],
|
|
68
71
|
|
|
69
72
|
outline && css.outline,
|
|
70
73
|
outline && css[`outline--${kind}`],
|
|
@@ -72,22 +75,20 @@ const ButtonComponent = <T extends React.ElementType = 'button'>(
|
|
|
72
75
|
solid && css.solid,
|
|
73
76
|
solid && css[`solid--${kind}`],
|
|
74
77
|
|
|
75
|
-
resolvedPadding && css
|
|
76
|
-
resolvedPadding && outline && css[`outline--padding--${resolvedPadding}`],
|
|
78
|
+
resolvedPadding && css.padding,
|
|
77
79
|
resolvedRadius && css[`radius--${resolvedRadius}`],
|
|
78
80
|
|
|
79
81
|
active && css.active,
|
|
80
82
|
active && outline && css[`active-outline-${kind}`],
|
|
81
83
|
|
|
82
|
-
css[size],
|
|
83
84
|
className,
|
|
84
85
|
);
|
|
85
86
|
|
|
86
87
|
return (
|
|
87
88
|
<Component {...restProps} className={rootClassName}>
|
|
88
|
-
{glyph && <Icon glyph={glyph}
|
|
89
|
+
{glyph && <Icon glyph={glyph} className={css.glyph} />}
|
|
89
90
|
{children && <span className={css.content}>{children}</span>}
|
|
90
|
-
{rightGlyph && <Icon glyph={
|
|
91
|
+
{rightGlyph && <Icon glyph={rightGlyph} className={css.glyph} />}
|
|
91
92
|
</Component>
|
|
92
93
|
);
|
|
93
94
|
};
|
|
@@ -18,7 +18,6 @@ export const DropdownItem = (props: DropdownItemProps & React.ComponentProps<typ
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
interface DropdownProps {
|
|
21
|
-
buttonClassName?: string;
|
|
22
21
|
dropdownClassName?: string;
|
|
23
22
|
label?: React.ReactNode;
|
|
24
23
|
ariaLabel?: string;
|
|
@@ -28,7 +27,7 @@ interface DropdownProps {
|
|
|
28
27
|
|
|
29
28
|
export const Dropdown = (props: DropdownProps & React.ComponentProps<'div'>) => {
|
|
30
29
|
const {
|
|
31
|
-
|
|
30
|
+
className = '',
|
|
32
31
|
dropdownClassName = '',
|
|
33
32
|
label = null,
|
|
34
33
|
ariaLabel = '',
|
|
@@ -50,7 +49,7 @@ export const Dropdown = (props: DropdownProps & React.ComponentProps<'div'>) =>
|
|
|
50
49
|
disabled={disabled}
|
|
51
50
|
state={menuState}
|
|
52
51
|
tabIndex={null}
|
|
53
|
-
className={cx(css.button,
|
|
52
|
+
className={cx(css.button, className)}
|
|
54
53
|
>
|
|
55
54
|
{label}
|
|
56
55
|
</MenuButton>
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.filterControl {
|
|
16
|
+
margin: 0;
|
|
16
17
|
flex: 0 0 auto;
|
|
17
18
|
height: 1em;
|
|
18
19
|
}
|
|
@@ -41,12 +42,14 @@
|
|
|
41
42
|
font-size: var(--size-small);
|
|
42
43
|
line-height: var(--space-small);
|
|
43
44
|
color: var(--color-text-ultra-light);
|
|
45
|
+
transition: var(--transition-out);
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
.filterSingle:hover,
|
|
47
49
|
.filterSingle:active,
|
|
48
50
|
.filterSingle:focus {
|
|
49
51
|
border-color: var(--color-outline-dark);
|
|
52
|
+
transition: var(--transition-in);
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
/** Filter group */
|
|
@@ -57,7 +60,10 @@
|
|
|
57
60
|
|
|
58
61
|
.filterGroupItem {
|
|
59
62
|
position: relative;
|
|
60
|
-
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.filterGroupItemFilter {
|
|
66
|
+
padding-right: 24px; /* space for only button */
|
|
61
67
|
}
|
|
62
68
|
|
|
63
69
|
.filterGroupOnlyButton {
|
|
@@ -76,6 +82,7 @@
|
|
|
76
82
|
content: ' ';
|
|
77
83
|
display: block;
|
|
78
84
|
position: absolute;
|
|
85
|
+
pointer-events: none;
|
|
79
86
|
top: 0;
|
|
80
87
|
right: 100%;
|
|
81
88
|
bottom: 0;
|
|
@@ -50,11 +50,10 @@ interface FilterGroupProps extends React.ComponentProps<'div'> {
|
|
|
50
50
|
|
|
51
51
|
const FilterGroup = (props: FilterGroupProps) => {
|
|
52
52
|
const { className = '', groupKey, data, values, onCheckboxChange, toggleFilters } = props;
|
|
53
|
+
const { label: groupLabel, children: groupItems } = data;
|
|
53
54
|
|
|
54
55
|
const [search, setSearch] = useState('');
|
|
55
56
|
|
|
56
|
-
const { label: groupLabel, children: groupItems } = data;
|
|
57
|
-
|
|
58
57
|
const areAllGroupItemsChecked = groupItems
|
|
59
58
|
.map(({ key: itemKey }) => values?.[`${groupKey}.${itemKey}`])
|
|
60
59
|
.reduce((agg, val) => agg && val, true);
|
|
@@ -98,7 +97,7 @@ const FilterGroup = (props: FilterGroupProps) => {
|
|
|
98
97
|
|
|
99
98
|
return (
|
|
100
99
|
<Dropdown
|
|
101
|
-
|
|
100
|
+
className={className}
|
|
102
101
|
label={dropdownLabel}
|
|
103
102
|
ariaLabel={`${groupLabel}: ${filterSuffix}`}
|
|
104
103
|
>
|
|
@@ -31,7 +31,7 @@ export const HoverCard = (props: HoverCardProps) => {
|
|
|
31
31
|
children,
|
|
32
32
|
} = props;
|
|
33
33
|
|
|
34
|
-
const state = useHovercardState({ gutter: 8, timeout: 300 });
|
|
34
|
+
const state = useHovercardState({ gutter: 8, timeout: 300, placement: 'top' });
|
|
35
35
|
const hovercardProps = useHovercard({ state, portal: true });
|
|
36
36
|
|
|
37
37
|
// Fallback to span if no href
|
package/src/ui/icon/icon.tsx
CHANGED
|
@@ -5,10 +5,11 @@ import css from './icon.module.css';
|
|
|
5
5
|
|
|
6
6
|
const ICONS = {
|
|
7
7
|
ARROW: 'arrow',
|
|
8
|
-
|
|
8
|
+
ARROW_RIGHT_CIRCLE: 'arrow-right-circle',
|
|
9
9
|
CANCEL: 'close',
|
|
10
10
|
CHEVRON_DOWN: 'chevron-down',
|
|
11
11
|
CHEVRON_UP: 'chevron-up',
|
|
12
|
+
CHECK: 'check',
|
|
12
13
|
CLOSE: 'close',
|
|
13
14
|
CLOCK: 'clock',
|
|
14
15
|
COMMIT: 'commit',
|
package/src/ui/loader/loader.jsx
CHANGED
|
@@ -4,7 +4,7 @@ import cx from 'classnames';
|
|
|
4
4
|
|
|
5
5
|
import css from './loader.module.css';
|
|
6
6
|
|
|
7
|
-
export const Loader = ({ className, size, ...restProps }) => (
|
|
7
|
+
export const Loader = ({ className = '', size = 'medium', ...restProps }) => (
|
|
8
8
|
<span className={cx(css.root, className, css[size])} {...restProps} />
|
|
9
9
|
);
|
|
10
10
|
|
|
@@ -89,6 +89,36 @@
|
|
|
89
89
|
border-width: 1px;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
/** cascade border radius */
|
|
93
|
+
.root thead,
|
|
94
|
+
.root thead tr:first-child {
|
|
95
|
+
border-top-left-radius: inherit;
|
|
96
|
+
border-top-right-radius: inherit;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.root thead tr:first-child th:first-child {
|
|
100
|
+
border-top-left-radius: inherit;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.root thead tr:first-child th:last-child {
|
|
104
|
+
border-top-right-radius: inherit;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.root tbody:last-child,
|
|
108
|
+
.root tbody:last-child tr:last-child {
|
|
109
|
+
border-bottom-left-radius: inherit;
|
|
110
|
+
border-bottom-right-radius: inherit;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.root tbody:last-child tr:last-child th:first-child,
|
|
114
|
+
.root tbody:last-child tr:last-child td:first-child {
|
|
115
|
+
border-bottom-left-radius: inherit;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.root tbody:last-child tr:last-child td:last-child {
|
|
119
|
+
border-bottom-right-radius: inherit;
|
|
120
|
+
}
|
|
121
|
+
|
|
92
122
|
/* compact variation */
|
|
93
123
|
.compact td,
|
|
94
124
|
.compact th {
|
|
@@ -42,7 +42,7 @@ a.root:active {
|
|
|
42
42
|
/** Size variation */
|
|
43
43
|
/** default: medium */
|
|
44
44
|
.root {
|
|
45
|
-
border-radius: var(--radius-
|
|
45
|
+
border-radius: var(--radius-small);
|
|
46
46
|
padding: calc(var(--space-xxxsmall) / 2) var(--space-xxxsmall);
|
|
47
47
|
min-width: var(--space-small);
|
|
48
48
|
height: var(--space-small);
|
|
@@ -51,7 +51,7 @@ a.root:active {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.small {
|
|
54
|
-
border-radius: var(--radius-
|
|
54
|
+
border-radius: var(--radius-xsmall);
|
|
55
55
|
padding: calc(var(--space-xxxsmall) / 2);
|
|
56
56
|
height: var(--space-xsmall);
|
|
57
57
|
min-width: var(--space-xsmall);
|
|
@@ -60,7 +60,7 @@ a.root:active {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.large {
|
|
63
|
-
border-radius: var(--radius-
|
|
63
|
+
border-radius: var(--radius-medium);
|
|
64
64
|
padding: var(--space-xxxsmall) var(--space-xxsmall);
|
|
65
65
|
min-width: var(--space-medium);
|
|
66
66
|
height: var(--space-medium);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import chunk from 'lodash/chunk';
|
|
2
|
+
|
|
3
|
+
import COLORS from '../chart-colors.json';
|
|
4
|
+
|
|
5
|
+
export function getColors(count = 2) {
|
|
6
|
+
const chunks = chunk(COLORS, Math.round(COLORS.length / count));
|
|
7
|
+
|
|
8
|
+
return chunks.map((chunkColors, index) => {
|
|
9
|
+
if (index === 0) {
|
|
10
|
+
return chunkColors[0];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
if (index === chunks.length - 1) {
|
|
14
|
+
return chunkColors[chunkColors.length - 1];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return chunkColors[Math.floor(chunkColors.length / 2)];
|
|
18
|
+
});
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
|
|
4
|
+
export const getRenderChildWithClassName = (className: string) => (child: any) => {
|
|
5
|
+
if (child === null || child === '') {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const { props } = child;
|
|
10
|
+
|
|
11
|
+
if (!props) {
|
|
12
|
+
return <div className={className}>{child}</div>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return React.cloneElement(child, {
|
|
16
|
+
...props,
|
|
17
|
+
className: cx(className, props.className), // eslint-disable-line react/prop-types
|
|
18
|
+
});
|
|
19
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import uniqBy from 'lodash/uniqBy';
|
|
2
|
+
|
|
3
|
+
import type { Job, WebpackChunk } from '@bundle-stats/utils';
|
|
4
|
+
|
|
5
|
+
interface GetJobsChunksData {
|
|
6
|
+
chunks: Array<WebpackChunk>;
|
|
7
|
+
chunkIds: Array<string>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Get chunks data from all jobs
|
|
12
|
+
*/
|
|
13
|
+
export function getJobsChunksData(jobs: Array<Job>): GetJobsChunksData {
|
|
14
|
+
const jobChunks = jobs.map((job) => job?.meta?.webpack?.chunks || []);
|
|
15
|
+
const chunks = uniqBy(jobChunks.flat(), ({ id }) => id);
|
|
16
|
+
const chunkIds = chunks?.map(({ id }) => id);
|
|
17
|
+
|
|
18
|
+
return {
|
|
19
|
+
chunks,
|
|
20
|
+
chunkIds,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -13,12 +13,8 @@ export namespace BundleAssets {
|
|
|
13
13
|
export let jobs: PropTypes.Validator<(PropTypes.InferProps<{
|
|
14
14
|
internalBuildNumber: PropTypes.Requireable<number>;
|
|
15
15
|
label: PropTypes.Requireable<string>;
|
|
16
|
-
meta: PropTypes.Requireable<PropTypes.InferProps<{
|
|
17
|
-
webpack: PropTypes.Requireable<PropTypes.InferProps<{
|
|
18
|
-
chunks: PropTypes.Requireable<any[]>;
|
|
19
|
-
}>>;
|
|
20
|
-
}>>;
|
|
21
16
|
}> | null | undefined)[]>;
|
|
17
|
+
export let chunks: PropTypes.Validator<any[]>;
|
|
22
18
|
export let items: PropTypes.Validator<(PropTypes.InferProps<{
|
|
23
19
|
key: PropTypes.Requireable<string>;
|
|
24
20
|
label: PropTypes.Requireable<string>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type Job } from '@bundle-stats/utils';
|
|
3
|
+
import { WebpackChunk } from '@bundle-stats/utils';
|
|
2
4
|
import { SortAction } from '../../types';
|
|
3
5
|
import { ModuleMetric } from './bundle-modules.constants';
|
|
4
|
-
import type {
|
|
6
|
+
import type { ReportMetricModuleRow } from './bundle-modules.types';
|
|
5
7
|
interface BundleModulesProps extends React.ComponentProps<'div'> {
|
|
6
8
|
jobs?: Array<Job>;
|
|
7
9
|
items?: Array<ReportMetricModuleRow>;
|
|
8
10
|
allItems?: Array<ReportMetricModuleRow>;
|
|
9
|
-
chunks?: Array<
|
|
11
|
+
chunks?: Array<WebpackChunk>;
|
|
10
12
|
totalRowCount: number;
|
|
11
13
|
updateFilters: () => void;
|
|
12
14
|
resetFilters: () => void;
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type WebpackChunk, type ReportMetricRow } from '@bundle-stats/utils';
|
|
2
2
|
import { type Module } from '@bundle-stats/utils/lib-esm/webpack';
|
|
3
3
|
import type { FilterFieldsData } from '../../types';
|
|
4
|
-
import type {
|
|
4
|
+
import type { ReportMetricModuleRow } from './bundle-modules.types';
|
|
5
5
|
export declare const addRowFlags: (row: Module & ReportMetricRow) => ReportMetricModuleRow;
|
|
6
6
|
export declare const getCustomSort: (item: ReportMetricRow) => (string | boolean)[];
|
|
7
7
|
export declare const generateGetRowFilter: ({ chunkIds }: {
|
|
8
8
|
chunkIds: Array<string>;
|
|
9
9
|
}) => (filters: Record<string, unknown>) => (row: ReportMetricModuleRow) => boolean;
|
|
10
|
-
export declare const extractChunkData: (jobs: Array<Job>) => {
|
|
11
|
-
chunks: Chunk[];
|
|
12
|
-
chunkIds: string[];
|
|
13
|
-
};
|
|
14
10
|
export declare const generateFilters: (chunkIds: Array<string>, multipleJobs: boolean) => {
|
|
15
11
|
defaultFilters: {
|
|
16
12
|
[x: string]: boolean;
|
|
@@ -21,7 +17,7 @@ export declare const generateFilters: (chunkIds: Array<string>, multipleJobs: bo
|
|
|
21
17
|
};
|
|
22
18
|
interface GetFiltersFormDataParams {
|
|
23
19
|
filters: Record<string, boolean>;
|
|
24
|
-
chunks: Array<
|
|
20
|
+
chunks: Array<WebpackChunk>;
|
|
25
21
|
compareMode: boolean;
|
|
26
22
|
}
|
|
27
23
|
export declare const generateFilterFieldsData: (params: GetFiltersFormDataParams) => FilterFieldsData;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { Job } from '@bundle-stats/utils';
|
|
2
3
|
import type { SortAction } from '../../types';
|
|
3
4
|
import { BundleModules as BaseComponent } from './bundle-modules';
|
|
4
|
-
import * as types from './bundle-modules.types';
|
|
5
5
|
interface BundleModulesProps extends Omit<React.ComponentProps<typeof BaseComponent>, 'jobs' | 'items' | 'chunks' | 'updateFilters' | 'resetFilters' | 'resetAllFilters' | 'filters' | 'sort' | 'updateSort' | 'search' | 'updateSearch' | 'allItems' | 'totalRowCount' | 'hideEntryInfo' | 'showEntryInfo'> {
|
|
6
|
-
jobs: Array<
|
|
6
|
+
jobs: Array<Job>;
|
|
7
7
|
filters: Record<string, boolean>;
|
|
8
8
|
search?: string;
|
|
9
9
|
metric?: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export function Delta({ className, displayValue, deltaType, inverted }: {
|
|
2
|
-
className
|
|
2
|
+
className?: string | undefined;
|
|
3
3
|
displayValue: any;
|
|
4
4
|
deltaType: any;
|
|
5
|
-
inverted
|
|
5
|
+
inverted?: boolean | undefined;
|
|
6
6
|
}): React.JSX.Element;
|
|
7
7
|
export namespace Delta {
|
|
8
8
|
namespace defaultProps {
|
|
@@ -3,7 +3,9 @@ import { MetricsDisplayType } from '../../constants';
|
|
|
3
3
|
import { ControlGroup } from '../../ui/control-group';
|
|
4
4
|
interface MetricsDisplaySelectorProps {
|
|
5
5
|
value: MetricsDisplayType;
|
|
6
|
-
|
|
6
|
+
groupBy?: string;
|
|
7
|
+
groups?: Partial<Record<MetricsDisplayType, Array<string>>>;
|
|
8
|
+
onSelect: (newValue: MetricsDisplayType, groupBy?: string) => void;
|
|
7
9
|
}
|
|
8
10
|
export declare const MetricsDisplaySelector: (props: MetricsDisplaySelectorProps & Omit<React.ComponentProps<typeof ControlGroup>, 'onSelect' | 'value'>) => React.JSX.Element;
|
|
9
11
|
export {};
|