@bundle-stats/ui 4.22.2 → 4.23.0-beta.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/.babelrc.js +65 -24
- package/globals.d.ts +13 -0
- package/lib/app/app.js +3 -0
- package/lib/app/app.js.map +1 -1
- package/lib/app/app.module.css +11 -1
- package/lib/components/bundle-modules/index.js.map +1 -1
- package/lib/components/delta/delta.js +3 -13
- package/lib/components/delta/delta.js.map +1 -1
- package/lib/components/delta/delta.module.css +13 -12
- package/lib/components/delta/index.js.map +1 -1
- package/lib/components/index.js +3 -1
- package/lib/components/index.js.map +1 -1
- package/lib/components/insight-icon/insight-icon.module.css +6 -6
- package/lib/components/job-name/job-name.js +1 -2
- package/lib/components/job-name/job-name.js.map +1 -1
- package/lib/components/metric-change-legend/index.js +18 -0
- package/lib/components/metric-change-legend/index.js.map +1 -0
- package/lib/components/metric-change-legend/metric-change-legend.js +91 -0
- package/lib/components/metric-change-legend/metric-change-legend.js.map +1 -0
- package/lib/components/metric-change-legend/metric-change-legend.module.css +69 -0
- package/lib/components/metric-run-info/metric-run-info.js +30 -7
- package/lib/components/metric-run-info/metric-run-info.js.map +1 -1
- package/lib/components/metrics-display-selector/metrics-display-selector.js +7 -9
- package/lib/components/metrics-display-selector/metrics-display-selector.js.map +1 -1
- package/lib/components/metrics-display-selector/metrics-display-selector.module.css +0 -25
- package/lib/components/metrics-table-header/metrics-table-header.js +8 -8
- package/lib/components/metrics-table-header/metrics-table-header.js.map +1 -1
- package/lib/components/metrics-table-header/metrics-table-header.module.css +8 -12
- package/lib/components/metrics-table-options/metrics-table-options.js +1 -1
- package/lib/components/metrics-table-options/metrics-table-options.js.map +1 -1
- package/lib/components/metrics-table-title/metrics-table-title.js +1 -1
- package/lib/components/metrics-table-title/metrics-table-title.js.map +1 -1
- package/lib/components/run-info/run-info.js +26 -14
- package/lib/components/run-info/run-info.js.map +1 -1
- package/lib/components/run-info/run-info.module.css +35 -26
- package/lib/components/summary/summary.js +9 -10
- package/lib/components/summary/summary.js.map +1 -1
- package/lib/components/summary/summary.module.css +60 -10
- package/lib/constants.js +13 -1
- package/lib/constants.js.map +1 -1
- package/lib/css/default.css +1 -1
- package/lib/css/variables.css +71 -58
- package/lib/hooks/rows-sort.js +13 -12
- package/lib/hooks/rows-sort.js.map +1 -1
- package/lib/ui/button/button.js.map +1 -1
- package/lib/ui/dialog/dialog.js +4 -2
- package/lib/ui/dialog/dialog.js.map +1 -1
- package/lib/ui/dialog/dialog.module.css +22 -0
- package/lib/ui/dropdown/dropdown.js +4 -3
- package/lib/ui/dropdown/dropdown.js.map +1 -1
- package/lib/ui/dropdown/dropdown.module.css +11 -0
- package/lib/ui/empty-set/empty-set.js +3 -3
- package/lib/ui/empty-set/empty-set.js.map +1 -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/hover-card/hover-card.module.css +14 -0
- package/lib/ui/table/table.module.css +0 -1
- package/lib/ui/tooltip/tooltip.js +1 -1
- package/lib/ui/tooltip/tooltip.js.map +1 -1
- package/lib/ui/tooltip/tooltip.module.css +11 -0
- package/lib-esm/app/app.js +4 -1
- package/lib-esm/app/app.js.map +1 -1
- package/lib-esm/app/app.module.css +11 -1
- package/lib-esm/components/bundle-modules/index.js.map +1 -1
- package/lib-esm/components/delta/delta.js +3 -13
- package/lib-esm/components/delta/delta.js.map +1 -1
- package/lib-esm/components/delta/delta.module.css +13 -12
- package/lib-esm/components/delta/index.js.map +1 -1
- package/lib-esm/components/index.js +1 -0
- package/lib-esm/components/index.js.map +1 -1
- package/lib-esm/components/insight-icon/insight-icon.module.css +6 -6
- package/lib-esm/components/job-name/job-name.js +1 -2
- package/lib-esm/components/job-name/job-name.js.map +1 -1
- package/lib-esm/components/metric-change-legend/index.js +2 -0
- package/lib-esm/components/metric-change-legend/index.js.map +1 -0
- package/lib-esm/components/metric-change-legend/metric-change-legend.js +84 -0
- package/lib-esm/components/metric-change-legend/metric-change-legend.js.map +1 -0
- package/lib-esm/components/metric-change-legend/metric-change-legend.module.css +69 -0
- package/lib-esm/components/metric-run-info/metric-run-info.js +31 -8
- package/lib-esm/components/metric-run-info/metric-run-info.js.map +1 -1
- package/lib-esm/components/metrics-display-selector/metrics-display-selector.js +7 -9
- 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 +0 -25
- package/lib-esm/components/metrics-table-header/metrics-table-header.js +8 -8
- package/lib-esm/components/metrics-table-header/metrics-table-header.js.map +1 -1
- package/lib-esm/components/metrics-table-header/metrics-table-header.module.css +8 -12
- package/lib-esm/components/metrics-table-options/metrics-table-options.js +1 -1
- package/lib-esm/components/metrics-table-options/metrics-table-options.js.map +1 -1
- package/lib-esm/components/metrics-table-title/metrics-table-title.js +1 -1
- package/lib-esm/components/metrics-table-title/metrics-table-title.js.map +1 -1
- package/lib-esm/components/run-info/run-info.js +26 -14
- package/lib-esm/components/run-info/run-info.js.map +1 -1
- package/lib-esm/components/run-info/run-info.module.css +35 -26
- package/lib-esm/components/summary/summary.js +10 -11
- package/lib-esm/components/summary/summary.js.map +1 -1
- package/lib-esm/components/summary/summary.module.css +60 -10
- package/lib-esm/constants.js +12 -0
- package/lib-esm/constants.js.map +1 -1
- package/lib-esm/css/default.css +1 -1
- package/lib-esm/css/variables.css +71 -58
- package/lib-esm/hooks/rows-sort.js +10 -8
- package/lib-esm/hooks/rows-sort.js.map +1 -1
- package/lib-esm/ui/button/button.js.map +1 -1
- package/lib-esm/ui/dialog/dialog.js +4 -2
- package/lib-esm/ui/dialog/dialog.js.map +1 -1
- package/lib-esm/ui/dialog/dialog.module.css +22 -0
- package/lib-esm/ui/dropdown/dropdown.js +4 -3
- package/lib-esm/ui/dropdown/dropdown.js.map +1 -1
- package/lib-esm/ui/dropdown/dropdown.module.css +11 -0
- package/lib-esm/ui/empty-set/empty-set.js +3 -3
- package/lib-esm/ui/empty-set/empty-set.js.map +1 -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/hover-card/hover-card.module.css +14 -0
- package/lib-esm/ui/table/table.module.css +0 -1
- package/lib-esm/ui/tooltip/tooltip.js +1 -1
- package/lib-esm/ui/tooltip/tooltip.js.map +1 -1
- package/lib-esm/ui/tooltip/tooltip.module.css +11 -0
- package/package.json +26 -15
- package/src/app/app.jsx +6 -1
- package/src/app/app.module.css +11 -1
- package/src/app/app.stories.tsx +2 -2
- package/src/components/asset-info/asset-info.stories.tsx +47 -39
- package/src/components/asset-name/asset-name.stories.tsx +1 -3
- package/src/components/asset-not-predictive/asset-not-predictive.stories.tsx +22 -15
- package/src/components/browsertime-table/browsertime-table.stories.tsx +45 -0
- package/src/components/bundle-assets-totals/bundle-assets-totals.stories.tsx +47 -0
- package/src/components/bundle-modules/bundle-modules.stories.tsx +191 -0
- package/src/components/bundle-modules/bundle-modules.tsx +1 -1
- package/src/components/bundle-modules/index.tsx +4 -0
- package/src/components/bundle-packages/bundle-packages.stories.tsx +87 -0
- package/src/components/delta/delta.module.css +13 -12
- package/src/components/delta/delta.stories.tsx +57 -0
- package/src/components/delta/delta.tsx +32 -0
- package/src/components/entry-info/entry-info.stories.tsx +49 -54
- package/src/components/{index.js → index.ts} +7 -2
- package/src/components/insight-icon/insight-icon.module.css +6 -6
- package/src/components/insights/insights.stories.tsx +36 -33
- package/src/components/job-name/job-name.jsx +2 -3
- package/src/components/job-name/job-name.stories.tsx +46 -0
- package/src/components/jobs-header/jobs-header.stories.tsx +19 -15
- package/src/components/lighthouse-table/lighthouse-table.stories.tsx +30 -0
- package/src/components/metric/metric.stories.tsx +24 -22
- package/src/components/metric-change-legend/index.ts +1 -0
- package/src/components/metric-change-legend/metric-change-legend.module.css +69 -0
- package/src/components/metric-change-legend/metric-change-legend.stories.tsx +13 -0
- package/src/components/metric-change-legend/metric-change-legend.tsx +148 -0
- package/src/components/metric-run-info/metric-run-info.stories.tsx +45 -41
- package/src/components/metric-run-info/metric-run-info.tsx +41 -17
- package/src/components/metrics-display-selector/metrics-display-selector.module.css +0 -25
- package/src/components/metrics-display-selector/metrics-display-selector.tsx +25 -37
- package/src/components/metrics-table/metrics-table.stories.tsx +33 -13
- package/src/components/metrics-table/metrics-table.tsx +1 -1
- package/src/components/metrics-table-header/metrics-table-header.module.css +8 -12
- package/src/components/metrics-table-header/metrics-table-header.tsx +14 -10
- package/src/components/metrics-table-options/metrics-table-options.tsx +1 -1
- package/src/components/metrics-table-title/metrics-table-title.jsx +1 -1
- package/src/components/module-info/module-info.stories.tsx +41 -30
- package/src/components/package-info/package-info.stories.tsx +20 -15
- package/src/components/run-info/run-info.module.css +35 -26
- package/src/components/run-info/run-info.stories.tsx +47 -39
- package/src/components/run-info/run-info.tsx +132 -73
- package/src/components/summary/summary.module.css +60 -10
- package/src/components/summary/summary.stories.tsx +26 -32
- package/src/components/summary/summary.tsx +47 -50
- package/src/constants.ts +13 -0
- package/src/css/default.css +1 -1
- package/src/css/variables.css +71 -58
- package/src/hooks/rows-sort.ts +9 -6
- package/src/layout/box/box.stories.tsx +35 -28
- package/src/layout/flex-stack/flex-stack.stories.tsx +79 -48
- package/src/layout/footer/footer.stories.tsx +30 -0
- package/src/layout/stack/stack.stories.tsx +68 -44
- package/src/ui/alert/alert.stories.tsx +25 -21
- package/src/ui/button/button.stories.tsx +181 -176
- package/src/ui/button/button.tsx +8 -1
- package/src/ui/container/container.stories.tsx +28 -21
- package/src/ui/control-group/control-group.stories.tsx +23 -16
- package/src/ui/dialog/dialog.module.css +22 -0
- package/src/ui/dialog/dialog.tsx +9 -2
- package/src/ui/dropdown/dropdown.module.css +11 -0
- package/src/ui/dropdown/dropdown.stories.tsx +23 -15
- package/src/ui/dropdown/dropdown.tsx +5 -1
- package/src/ui/empty-set/empty-set.jsx +16 -4
- package/src/ui/empty-set/empty-set.stories.tsx +41 -0
- package/src/ui/file-name/file-name.stories.tsx +45 -0
- package/src/ui/filters/filters.stories.tsx +29 -26
- package/src/ui/hover-card/hover-card.module.css +14 -0
- package/src/ui/hover-card/hover-card.stories.tsx +35 -26
- package/src/ui/hover-card/hover-card.tsx +1 -1
- package/src/ui/icon/icon.stories.tsx +36 -28
- package/src/ui/input/input.stories.tsx +17 -5
- package/src/ui/input-search/input-search.stories.tsx +31 -0
- package/src/ui/loader/loader.stories.tsx +22 -0
- package/src/ui/skeleton/skeleton.stories.tsx +42 -0
- package/src/ui/table/table.module.css +0 -1
- package/src/ui/table/table.stories.tsx +244 -218
- package/src/ui/tag/tag.stories.tsx +11 -10
- package/src/ui/toolbar/toolbar.stories.tsx +41 -0
- package/src/ui/tooltip/tooltip.module.css +11 -0
- package/src/ui/tooltip/tooltip.tsx +1 -1
- package/types/components/bundle-modules/bundle-modules.d.ts +1 -1
- package/types/components/bundle-modules/index.d.ts +2 -1
- package/types/components/delta/delta.d.ts +7 -21
- package/types/components/delta/index.d.ts +1 -1
- package/types/components/index.d.ts +25 -20
- package/types/components/metric-change-legend/index.d.ts +1 -0
- package/types/components/metric-change-legend/metric-change-legend.d.ts +4 -0
- package/types/components/metric-run-info/metric-run-info.d.ts +2 -6
- package/types/components/metrics-table/metrics-table.d.ts +1 -1
- package/types/components/metrics-table-header/metrics-table-header.d.ts +1 -1
- package/types/components/run-info/run-info.d.ts +16 -7
- package/types/constants.d.ts +12 -0
- package/types/hooks/rows-sort.d.ts +2 -2
- package/types/ui/button/button.d.ts +1 -1
- package/types/ui/dialog/dialog.d.ts +3 -2
- package/types/ui/dropdown/dropdown.d.ts +1 -0
- package/vitest.config.ts +47 -0
- package/vitest.setup.ts +26 -0
- package/lib/assets/icons.svg.js +0 -100
- package/lib/assets/icons.svg.js.map +0 -1
- package/lib-esm/assets/icons.svg.js +0 -63
- package/lib-esm/assets/icons.svg.js.map +0 -1
- package/src/assets/icons.svg.jsx +0 -279
- package/src/components/delta/delta.jsx +0 -22
- package/types/assets/icons.svg.d.ts +0 -2
- /package/src/components/delta/{index.js → index.ts} +0 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cx from 'classnames';
|
|
3
|
-
import { Dialog as AriakitDialog, DialogDismiss as AriakitDialogDismiss } from 'ariakit/dialog';
|
|
3
|
+
import { Dialog as AriakitDialog, DialogDismiss as AriakitDialogDismiss, useDialogState as useAriakitDialogState, } from 'ariakit/dialog';
|
|
4
4
|
import { Stack } from '../../layout/stack';
|
|
5
5
|
import { BUTTON_GLYPHS, Button } from '../button';
|
|
6
6
|
import css from './dialog.module.css';
|
|
7
|
-
export
|
|
7
|
+
export const useDialogState = (options = {}) => {
|
|
8
|
+
return useAriakitDialogState({ animated: true, ...options });
|
|
9
|
+
};
|
|
8
10
|
export const Dialog = (props) => {
|
|
9
11
|
const { state, className = '', title = '', width = 'medium', center = false, modal = false, children, } = props;
|
|
10
12
|
const rootClassName = cx(css.dialog, width && css[`width--${width}`], center && css.center);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../../src/ui/dialog/dialog.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,
|
|
1
|
+
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../../src/ui/dialog/dialog.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EACL,MAAM,IAAI,aAAa,EACvB,aAAa,IAAI,oBAAoB,EACrC,cAAc,IAAI,qBAAqB,GAExC,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,GAAG,MAAM,qBAAqB,CAAC;AAE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CAAC,IAAG,QAAQ,CAAO,CACtD,CACM,CACjB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
5
5
|
z-index: var(--layer-xxhigh);
|
|
6
|
+
opacity: 0;
|
|
7
|
+
transition: var(--transition-out);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.backdrop[data-enter] {
|
|
11
|
+
opacity: 1;
|
|
12
|
+
transition: var(--transition-in);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.backdrop[data-leave] {
|
|
16
|
+
pointer-events: none;
|
|
6
17
|
}
|
|
7
18
|
|
|
8
19
|
.backdrop::before {
|
|
@@ -27,6 +38,17 @@
|
|
|
27
38
|
background: var(--color-background);
|
|
28
39
|
box-shadow: 0 0 var(--space-medium) var(--color-shadow);
|
|
29
40
|
z-index: var(--layer-xxhigh);
|
|
41
|
+
opacity: 0;
|
|
42
|
+
transition: var(--transition-out);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.dialog[data-enter] {
|
|
46
|
+
opacity: 1;
|
|
47
|
+
transition: var(--transition-in);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.digalog[data-leave] {
|
|
51
|
+
pointer-events: none;
|
|
30
52
|
}
|
|
31
53
|
|
|
32
54
|
.header {
|
|
@@ -3,16 +3,17 @@ import cx from 'classnames';
|
|
|
3
3
|
import { Menu, MenuButton, MenuItem, useMenuState } from 'ariakit/menu';
|
|
4
4
|
import { Button, BUTTON_SIZE } from '../button';
|
|
5
5
|
import css from './dropdown.module.css';
|
|
6
|
+
import { Icon } from '../icon';
|
|
6
7
|
export const DropdownItem = (props) => {
|
|
7
8
|
const { className = '', isActive = false, ...restProps } = props;
|
|
8
9
|
return (React.createElement(MenuItem, { className: cx(css.item, className, isActive && css.itemActive), ...restProps }));
|
|
9
10
|
};
|
|
10
11
|
export const Dropdown = (props) => {
|
|
11
|
-
const { className = '', dropdownClassName = '', label = null, ariaLabel = '', glyph = '', disabled = false, placement, gutter = 4, shift, children, } = props;
|
|
12
|
+
const { className = '', dropdownClassName = '', label = null, ariaLabel = '', glyph = '', showChevron = true, disabled = false, placement, gutter = 4, shift, children, } = props;
|
|
12
13
|
const dropdownAriaLabel = ariaLabel || (typeof label === 'string' ? label : '');
|
|
13
|
-
const menuState = useMenuState({ placement, gutter, shift });
|
|
14
|
+
const menuState = useMenuState({ animated: true, placement, gutter, shift });
|
|
14
15
|
return (React.createElement(React.Fragment, null,
|
|
15
|
-
React.createElement(MenuButton, { as: Button, outline: true, size: BUTTON_SIZE.SMALL, glyph: glyph, disabled: disabled, state: menuState, tabIndex: null, className: cx(css.button, className) }, label),
|
|
16
|
+
React.createElement(MenuButton, { as: Button, outline: true, size: BUTTON_SIZE.SMALL, glyph: glyph, rightGlyph: showChevron ? Icon.ICONS.CHEVRON_DOWN : undefined, disabled: disabled, state: menuState, tabIndex: null, className: cx(css.button, className) }, label),
|
|
16
17
|
React.createElement(Menu, { portal: true, state: menuState, "aria-label": dropdownAriaLabel, className: cx(css.dropdown, dropdownClassName) }, children)));
|
|
17
18
|
};
|
|
18
19
|
//# sourceMappingURL=dropdown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.js","sourceRoot":"","sources":["../../../src/ui/dropdown/dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAkB,YAAY,EAAE,MAAM,cAAc,CAAC;AAExF,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,GAAG,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"dropdown.js","sourceRoot":"","sources":["../../../src/ui/dropdown/dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK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QACE,oBAAC,UAAU,IACT,EAAE,EAAE,MAAM,EACV,OAAO,QACP,IAAI,EAAE,WAAW,CAAC,KAAK,EACvB,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,EAC7D,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,IAAI,EACd,SAAS,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,IAEnC,KAAK,CACK;QACb,oBAAC,IAAI,IACH,MAAM,QACN,KAAK,EAAE,SAAS,gBACJ,iBAAiB,EAC7B,SAAS,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,EAAE,iBAAiB,CAAC,IAE7C,QAAQ,CACJ,CACN,CACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -16,6 +16,17 @@
|
|
|
16
16
|
min-width: 12em;
|
|
17
17
|
z-index: var(--layer-high);
|
|
18
18
|
padding: calc(var(--space-xxxsmall) / 2);
|
|
19
|
+
opacity: 0;
|
|
20
|
+
transition: var(--transition-out);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.dropdown[data-enter] {
|
|
24
|
+
opacity: 1;
|
|
25
|
+
transition: var(--transition-in);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.dropdown[data-leave] {
|
|
29
|
+
pointer-events: none;
|
|
19
30
|
}
|
|
20
31
|
|
|
21
32
|
.dropdown:focus {
|
|
@@ -10,19 +10,19 @@ export const EmptySet = (props) => {
|
|
|
10
10
|
const actions = [
|
|
11
11
|
...(handleResetFilters
|
|
12
12
|
? [
|
|
13
|
-
React.createElement(Button, { kind: "primary", type: "button", onClick: handleResetFilters, className: css.action }, I18N.RESET_FILTERS),
|
|
13
|
+
React.createElement(Button, { key: "reset-filters", kind: "primary", type: "button", onClick: handleResetFilters, className: css.action }, I18N.RESET_FILTERS),
|
|
14
14
|
]
|
|
15
15
|
: []),
|
|
16
16
|
...(handleViewAll
|
|
17
17
|
? [
|
|
18
|
-
React.createElement(Button, { kind: "primary", type: "button", onClick: handleViewAll, className: css.action }, I18N.VIEW_ALL),
|
|
18
|
+
React.createElement(Button, { key: "view-all", kind: "primary", type: "button", onClick: handleViewAll, className: css.action }, I18N.VIEW_ALL),
|
|
19
19
|
]
|
|
20
20
|
: []),
|
|
21
21
|
];
|
|
22
22
|
return (React.createElement(Stack, { space: "xxxsmall", className: css.root },
|
|
23
23
|
React.createElement("p", null, message),
|
|
24
24
|
filtered &&
|
|
25
|
-
actions.map((action, index) => (React.createElement(React.Fragment,
|
|
25
|
+
actions.map((action, index) => (React.createElement(React.Fragment, { key: action.key },
|
|
26
26
|
index > 0 && ' or ',
|
|
27
27
|
action)))));
|
|
28
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty-set.js","sourceRoot":"","sources":["../../../src/ui/empty-set/empty-set.jsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,IAAI,MAAM,YAAY,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,GAAG,MAAM,wBAAwB,CAAC;AAEzC,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAK,EAAE,EAAE;IAChC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,kBAAkB,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IAEzE,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,SAAS,SAAS,CAAC,CAAC,CAAC,MAAM,SAAS,aAAa,CAAC;IACnF,MAAM,OAAO,GAAG;QACd,GAAG,CAAC,kBAAkB;YACpB,CAAC,CAAC;gBACE,oBAAC,MAAM,
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,IAAI;QACzC,+BAAI,OAAO,CAAK;QACf,QAAQ;YACP,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAC7B,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,MAAM,CAAC,GAAG;gBAC5B,KAAK,GAAG,CAAC,IAAI,MAAM;gBACnB,MAAM,CACQ,CAClB,CAAC,CACE,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,QAAQ,CAAC,SAAS,GAAG;IACnB,SAAS,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;IACtC,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,kBAAkB,EAAE,SAAS,CAAC,IAAI;IAClC,aAAa,EAAE,SAAS,CAAC,IAAI;CAC9B,CAAC;AAEF,QAAQ,CAAC,YAAY,GAAG;IACtB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,IAAI;CACpB,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { Hovercard, HovercardAnchor, HovercardArrow, useHovercard, useHovercardS
|
|
|
4
4
|
import css from './hover-card.module.css';
|
|
5
5
|
export const HoverCard = (props) => {
|
|
6
6
|
const { className = '', anchorClassName = '', hoverCardClassName = '', href = '', as = null, label, children, } = props;
|
|
7
|
-
const state = useHovercardState({ gutter: 8, timeout: 300, placement: 'top' });
|
|
7
|
+
const state = useHovercardState({ animated: true, gutter: 8, timeout: 300, placement: 'top' });
|
|
8
8
|
const hovercardProps = useHovercard({ state, portal: true });
|
|
9
9
|
const Component = useMemo(() => {
|
|
10
10
|
if (as) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hover-card.js","sourceRoot":"","sources":["../../../src/ui/hover-card/hover-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EACL,SAAS,EACT,eA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AC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAG7D,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE;QAC7B,IAAI,EAAE,EAAE,CAAC;YACP,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,IAAI,IAAI,EAAE,CAAC;YACT,OAAO,GAAG,CAAC;QACb,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;IAEf,OAAO,CACL,6BAAK,SAAS,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC;QACrC,oBAAC,eAAe,IACd,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,EAC1C,EAAE,EAAE,SAAS,mBACE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAEjD,KAAK,CACU;QAClB,oBAAC,SAAS,OACJ,cAAc,EAClB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,EAAE,CAAC,GAAG,CAAC,SAAS,EAAE,kBAAkB,CAAC;YAEhD,oBAAC,cAAc,IAAC,IAAI,EAAE,EAAE,GAAI;YAC3B,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAClE,CACR,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -5,11 +5,14 @@
|
|
|
5
5
|
.anchor {
|
|
6
6
|
display: inline-block;
|
|
7
7
|
color: inherit;
|
|
8
|
+
cursor: default;
|
|
8
9
|
text-decoration: none;
|
|
10
|
+
transition: var(--transition-out);
|
|
9
11
|
}
|
|
10
12
|
|
|
11
13
|
.anchor:hover {
|
|
12
14
|
color: var(--color-primary);
|
|
15
|
+
transition: var(--transition-in);
|
|
13
16
|
}
|
|
14
17
|
|
|
15
18
|
.anchor:focus {
|
|
@@ -27,4 +30,15 @@
|
|
|
27
30
|
will-change: filter;
|
|
28
31
|
background: var(--color-light);
|
|
29
32
|
font-size: var(--size-small);
|
|
33
|
+
opacity: 0;
|
|
34
|
+
transition: var(--transition-out);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.hoverCard[data-enter] {
|
|
38
|
+
opacity: 1;
|
|
39
|
+
transition: var(--transition-in);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.hoverCard[data-leave] {
|
|
43
|
+
pointer-events: none;
|
|
30
44
|
}
|
|
@@ -5,7 +5,7 @@ import css from './tooltip.module.css';
|
|
|
5
5
|
export const Tooltip = (props) => {
|
|
6
6
|
var _a;
|
|
7
7
|
const { className = '', tooltipClassName = '', title = '', as: Component = 'span', containerRef: ref, ...restProps } = props;
|
|
8
|
-
const tooltip = useTooltipState({ placement: 'top', timeout: 300 });
|
|
8
|
+
const tooltip = useTooltipState({ animated: true, placement: 'top', timeout: 300 });
|
|
9
9
|
return (React.createElement(React.Fragment, null,
|
|
10
10
|
React.createElement(UITooltipAnchor, { as: Component, className: cx(css.root, className), state: tooltip, "aria-controls": tooltip.open ? (_a = tooltip.contentElement) === null || _a === void 0 ? void 0 : _a.id : '', ...(ref ? { ref } : {}), ...restProps }),
|
|
11
11
|
title && (React.createElement(UITooltip, { state: tooltip, className: cx(css.tooltip, tooltipClassName) },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../src/ui/tooltip/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EACL,OAAO,IAAI,SAAS,EACpB,aAAa,IAAI,eAAe,EAChC,YAAY,IAAI,cAAc,EAC9B,eAAe,GACh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SAAS,CAAC,EAClC,KAAK,EAAE,OAAO,mBACC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,MAAA,OAAO,CAAC,cAAc,0CAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KACzD,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KACpB,SAAS,GACb;QACD,KAAK,IAAI,CACR,oBAAC,SAAS,IAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,gBAAgB,CAAC;YACrE,oBAAC,cAAc,IAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,GAAI;YACjE,KAAK,CACI,CACb,CACA,CACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -21,6 +21,17 @@
|
|
|
21
21
|
text-align: center;
|
|
22
22
|
filter: drop-shadow(var(--shadow-layer));
|
|
23
23
|
will-change: filter;
|
|
24
|
+
opacity: 0;
|
|
25
|
+
transition: var(--transition-out);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.tooltip[data-enter] {
|
|
29
|
+
opacity: 1;
|
|
30
|
+
transition: var(--transition-in);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.tooltip[data-leave] {
|
|
34
|
+
pointer-events: none;
|
|
24
35
|
}
|
|
25
36
|
|
|
26
37
|
.arrow svg {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bundle-stats/ui",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.23.0-beta.1",
|
|
4
4
|
"description": "UI components for BundleStats projects.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-esm/index.js",
|
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
"generate-svg-sprite": "npx svg-sprite -s --si --no-svg-namespace-classnames src/assets/icons/*.svg && mv symbol/svg/sprite.css.svg src/assets/icons.svg",
|
|
19
19
|
"lint": "eslint .",
|
|
20
20
|
"start": "cross-env NODE_ENV=development storybook dev -c ./build/storybook -p 8080",
|
|
21
|
-
"
|
|
21
|
+
"serve-storybook": "vite preview --outDir storybook-static --port 8080",
|
|
22
|
+
"test": "jest src --passWithNoTests",
|
|
23
|
+
"test-storybook": "vitest run"
|
|
22
24
|
},
|
|
23
25
|
"repository": {
|
|
24
26
|
"type": "git",
|
|
@@ -36,32 +38,41 @@
|
|
|
36
38
|
},
|
|
37
39
|
"homepage": "https://github.com/relative-ci/bundle-stats/blob/master/packages/ui#readme",
|
|
38
40
|
"devDependencies": {
|
|
39
|
-
"@babel/preset-env": "
|
|
40
|
-
"@babel/preset-react": "
|
|
41
|
-
"@babel/preset-typescript": "
|
|
42
|
-
"@storybook/addon-
|
|
43
|
-
"@storybook/react": "
|
|
44
|
-
"@storybook/react-
|
|
41
|
+
"@babel/preset-env": "8.0.5",
|
|
42
|
+
"@babel/preset-react": "8.0.1",
|
|
43
|
+
"@babel/preset-typescript": "8.0.1",
|
|
44
|
+
"@storybook/addon-vitest": "10.5.10",
|
|
45
|
+
"@storybook/react": "10.5.10",
|
|
46
|
+
"@storybook/react-vite": "10.5.10",
|
|
45
47
|
"@types/d3": "7.4.3",
|
|
46
48
|
"@types/react": "18.3.13",
|
|
47
49
|
"@types/react-router-dom": "5.3.3",
|
|
50
|
+
"@vitejs/plugin-react": "6.1.1",
|
|
51
|
+
"@vitest/browser": "5.0.0",
|
|
52
|
+
"@vitest/browser-playwright": "5.0.0",
|
|
53
|
+
"babel-plugin-polyfill-corejs3": "1.0.0",
|
|
48
54
|
"babel-plugin-require-context-hook": "1.0.0",
|
|
49
55
|
"classnames": "2.5.1",
|
|
50
56
|
"colormap": "2.3.2",
|
|
57
|
+
"core-js": "3.50.0",
|
|
51
58
|
"cross-env": "10.1.0",
|
|
52
59
|
"hex-rgb": "5.0.0",
|
|
53
60
|
"identity-obj-proxy": "3.0.0",
|
|
54
|
-
"jest": "
|
|
61
|
+
"jest": "^30.5.0",
|
|
55
62
|
"jest-date-mock": "1.0.10",
|
|
56
|
-
"jest-environment-jsdom": "
|
|
63
|
+
"jest-environment-jsdom": "30.5.1",
|
|
57
64
|
"lodash": "4.18.1",
|
|
65
|
+
"playwright": "1.63.0",
|
|
58
66
|
"prop-types": "15.8.1",
|
|
59
67
|
"react": "18.3.1",
|
|
60
68
|
"react-dom": "18.3.1",
|
|
61
69
|
"react-router-dom": "5.3.4",
|
|
62
70
|
"rimraf": "6.1.3",
|
|
63
|
-
"storybook": "
|
|
64
|
-
"typescript": "5.9.3"
|
|
71
|
+
"storybook": "10.5.10",
|
|
72
|
+
"typescript": "5.9.3",
|
|
73
|
+
"vite": "8.3.0",
|
|
74
|
+
"vite-plugin-svgr": "5.2.0",
|
|
75
|
+
"vitest": "5.0.0"
|
|
65
76
|
},
|
|
66
77
|
"peerDependencies": {
|
|
67
78
|
"classnames": "^2.0.0",
|
|
@@ -72,13 +83,13 @@
|
|
|
72
83
|
"react-router-dom": "^5.0.0"
|
|
73
84
|
},
|
|
74
85
|
"dependencies": {
|
|
75
|
-
"@bundle-stats/utils": "^4.
|
|
86
|
+
"@bundle-stats/utils": "^4.23.0-beta.1",
|
|
76
87
|
"ariakit": "2.0.0-next.44",
|
|
77
88
|
"d3": "7.9.0",
|
|
78
89
|
"modern-css-reset": "1.4.0",
|
|
79
|
-
"react-use": "17.6.
|
|
90
|
+
"react-use": "17.6.1",
|
|
80
91
|
"snarkdown": "2.0.0",
|
|
81
92
|
"use-query-params": "2.2.2"
|
|
82
93
|
},
|
|
83
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "5ed30de2bfdfe488b8a5f3490b11d1429d89b6ad"
|
|
84
95
|
}
|
package/src/app/app.jsx
CHANGED
|
@@ -10,7 +10,7 @@ import { BundleAssetsTotals } from '../components/bundle-assets-totals';
|
|
|
10
10
|
import { BundleModules } from '../components/bundle-modules';
|
|
11
11
|
import { BundlePackages } from '../components/bundle-packages';
|
|
12
12
|
import { Insights } from '../components/insights';
|
|
13
|
-
import { MetricsTableTitle } from '../components';
|
|
13
|
+
import { MetricChangeLegend, MetricsTableTitle } from '../components';
|
|
14
14
|
import { Summary } from '../components/summary';
|
|
15
15
|
import { Box } from '../layout/box';
|
|
16
16
|
import { Footer } from '../layout/footer';
|
|
@@ -150,6 +150,11 @@ const AppComponent = ({ version, jobs }) => {
|
|
|
150
150
|
return (
|
|
151
151
|
<JobsProvider jobs={jobs}>
|
|
152
152
|
<Layout jobs={jobs} version={version}>
|
|
153
|
+
<Container className={css.metricChangeLegendContainer}>
|
|
154
|
+
<div className={css.metricChangeLegendContainerInner}>
|
|
155
|
+
<MetricChangeLegend />
|
|
156
|
+
</div>
|
|
157
|
+
</Container>
|
|
153
158
|
<Container className={css.summaryContainer}>
|
|
154
159
|
<Summary
|
|
155
160
|
data={jobs[0].summary}
|
package/src/app/app.module.css
CHANGED
|
@@ -17,11 +17,21 @@
|
|
|
17
17
|
border-bottom: 1px solid var(--color-outline);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
.
|
|
20
|
+
.metricChangeLegendContainer {
|
|
21
21
|
padding-top: var(--space-small);
|
|
22
22
|
padding-bottom: var(--space-xxsmall);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
.metricChangeLegendContainerInner {
|
|
26
|
+
display: flex;
|
|
27
|
+
justify-content: flex-end;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.summaryContainer {
|
|
31
|
+
padding-top: var(--space-xxsmall);
|
|
32
|
+
padding-bottom: var(--space-xxsmall);
|
|
33
|
+
}
|
|
34
|
+
|
|
25
35
|
.tabsContainer {
|
|
26
36
|
border-bottom: 1px solid var(--color-outline);
|
|
27
37
|
background: var(--color-light);
|
package/src/app/app.stories.tsx
CHANGED
|
@@ -13,7 +13,7 @@ const CURRENT_SOURCE = {
|
|
|
13
13
|
webpack: {
|
|
14
14
|
...currentData.rawData.webpack,
|
|
15
15
|
builtAt: currentData.createdAt,
|
|
16
|
-
hash: currentData.commit,
|
|
16
|
+
hash: currentData.rawData.webpack.hash || currentData.commit,
|
|
17
17
|
},
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -21,7 +21,7 @@ const BASELINE_SOURCE = {
|
|
|
21
21
|
webpack: {
|
|
22
22
|
...baselineData.rawData.webpack,
|
|
23
23
|
builtAt: baselineData.createdAt,
|
|
24
|
-
hash: baselineData.commit,
|
|
24
|
+
hash: baselineData.rawData.webpack.hash || baselineData.commit,
|
|
25
25
|
},
|
|
26
26
|
};
|
|
27
27
|
|
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Meta, Story } from '@storybook/react';
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
2
|
import { action } from 'storybook/actions';
|
|
4
3
|
|
|
5
4
|
import { getWrapperDecorator } from '../../stories';
|
|
6
5
|
import { AssetInfo } from '.';
|
|
7
6
|
|
|
8
|
-
export default {
|
|
9
|
-
title: 'Components/AssetInfo',
|
|
10
|
-
component: AssetInfo,
|
|
11
|
-
decorators: [getWrapperDecorator()],
|
|
12
|
-
} as Meta;
|
|
13
|
-
|
|
14
7
|
const ITEM = {
|
|
8
|
+
key: 'static/vendor.js',
|
|
15
9
|
label: 'static/vendor.js',
|
|
10
|
+
biggerIsBetter: false,
|
|
16
11
|
changed: true,
|
|
12
|
+
isAsset: true,
|
|
17
13
|
isChunk: true,
|
|
18
14
|
isEntry: true,
|
|
19
15
|
isInitial: true,
|
|
20
16
|
isNotPredictive: false,
|
|
17
|
+
fileType: '',
|
|
21
18
|
runs: [
|
|
22
19
|
{
|
|
23
20
|
name: 'static/vendor.abcd1234.js',
|
|
@@ -33,42 +30,53 @@ const ITEM = {
|
|
|
33
30
|
],
|
|
34
31
|
};
|
|
35
32
|
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
const meta = {
|
|
34
|
+
title: 'Components/AssetInfo',
|
|
35
|
+
component: AssetInfo,
|
|
36
|
+
decorators: [getWrapperDecorator()],
|
|
37
|
+
args: {
|
|
38
|
+
item: ITEM,
|
|
39
|
+
labels: ['Job #2', 'Job #1'],
|
|
40
|
+
onClose: action('CLOSE'),
|
|
41
|
+
},
|
|
42
|
+
} satisfies Meta<typeof AssetInfo>;
|
|
39
43
|
|
|
40
|
-
export
|
|
44
|
+
export default meta;
|
|
41
45
|
|
|
42
|
-
|
|
46
|
+
type Story = StoryObj<typeof meta>;
|
|
43
47
|
|
|
44
|
-
|
|
45
|
-
chunks: [
|
|
46
|
-
{
|
|
47
|
-
id: '1',
|
|
48
|
-
name: 'vendor',
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
id: '2',
|
|
52
|
-
name: 'app~common~utils~shared',
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
};
|
|
48
|
+
export const Default: Story = {};
|
|
56
49
|
|
|
57
|
-
export const
|
|
50
|
+
export const WithChunks: Story = {
|
|
51
|
+
args: {
|
|
52
|
+
chunks: [
|
|
53
|
+
{
|
|
54
|
+
id: '1',
|
|
55
|
+
name: 'vendor',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
id: '2',
|
|
59
|
+
name: 'app~common~utils~shared',
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
};
|
|
58
64
|
|
|
59
|
-
WithFileType
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
export const WithFileType: Story = {
|
|
66
|
+
args: {
|
|
67
|
+
chunks: [
|
|
68
|
+
{
|
|
69
|
+
id: '1',
|
|
70
|
+
name: 'vendor',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: '2',
|
|
74
|
+
name: 'app~common~utils~shared',
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
item: {
|
|
78
|
+
...ITEM,
|
|
79
|
+
fileType: 'JS',
|
|
64
80
|
},
|
|
65
|
-
{
|
|
66
|
-
id: '2',
|
|
67
|
-
name: 'app~common~utils~shared',
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
item: {
|
|
71
|
-
...ITEM,
|
|
72
|
-
fileType: 'JS',
|
|
73
81
|
},
|
|
74
82
|
};
|
|
@@ -1,23 +1,30 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
|
|
3
3
|
import { AssetNotPredictive } from '.';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const meta = {
|
|
6
6
|
title: 'Components/AssetNotPredictive',
|
|
7
7
|
component: AssetNotPredictive,
|
|
8
|
-
}
|
|
8
|
+
} satisfies Meta<typeof AssetNotPredictive>;
|
|
9
9
|
|
|
10
|
-
export
|
|
10
|
+
export default meta;
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
{
|
|
14
|
-
name: 'static/vendor.abcd1234.js',
|
|
15
|
-
value: 1024 * 1024 - 1,
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
name: 'static/vendor.abcd1234.js',
|
|
19
|
-
value: 1024 * 1024,
|
|
20
|
-
},
|
|
21
|
-
] as any;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
22
13
|
|
|
23
|
-
export const
|
|
14
|
+
export const Default: Story = {};
|
|
15
|
+
|
|
16
|
+
export const WithRuns: Story = {
|
|
17
|
+
args: {
|
|
18
|
+
runs: [
|
|
19
|
+
{
|
|
20
|
+
name: 'static/vendor.abcd1234.js',
|
|
21
|
+
value: 1024 * 1024 - 1,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'static/vendor.abcd1234.js',
|
|
25
|
+
value: 1024 * 1024,
|
|
26
|
+
},
|
|
27
|
+
] as any,
|
|
28
|
+
labels: ['Job 2', 'Job 1'],
|
|
29
|
+
},
|
|
30
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { createJobs, Job } from '@bundle-stats/utils';
|
|
4
|
+
import * as browsertime from '@bundle-stats/utils/lib-esm/browsertime';
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line import/no-relative-packages
|
|
7
|
+
import browsertimeSourceFixtures from '../../../../../fixtures/browsertime.json';
|
|
8
|
+
import { getWrapperDecorator } from '../../stories';
|
|
9
|
+
import { BrowsertimeTable } from '.';
|
|
10
|
+
|
|
11
|
+
const browsertimeFixtures = browsertime.filter(browsertimeSourceFixtures);
|
|
12
|
+
|
|
13
|
+
const JOBS = createJobs([
|
|
14
|
+
{ browsertime: browsertimeFixtures },
|
|
15
|
+
{ browsertime: browsertimeFixtures },
|
|
16
|
+
]);
|
|
17
|
+
|
|
18
|
+
// BrowsertimeTable is a plain .jsx component with defaultProps instead of
|
|
19
|
+
// inline destructuring defaults, so TS can't infer its props as optional on its own.
|
|
20
|
+
const TypedBrowsertimeTable = BrowsertimeTable as unknown as React.ComponentType<{
|
|
21
|
+
className?: string;
|
|
22
|
+
jobs?: Array<Job>;
|
|
23
|
+
}>;
|
|
24
|
+
|
|
25
|
+
const meta = {
|
|
26
|
+
title: 'Components/BrowsertimeTable',
|
|
27
|
+
component: TypedBrowsertimeTable,
|
|
28
|
+
decorators: [getWrapperDecorator()],
|
|
29
|
+
} satisfies Meta<typeof TypedBrowsertimeTable>;
|
|
30
|
+
|
|
31
|
+
export default meta;
|
|
32
|
+
|
|
33
|
+
type Story = StoryObj<typeof meta>;
|
|
34
|
+
|
|
35
|
+
export const Default: Story = {
|
|
36
|
+
args: {
|
|
37
|
+
jobs: JOBS,
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const NoBaseline: Story = {
|
|
42
|
+
args: {
|
|
43
|
+
jobs: [JOBS[1]],
|
|
44
|
+
},
|
|
45
|
+
};
|