@bundle-stats/ui 4.4.0-beta.0 → 4.4.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/globals.d.ts +4 -0
- package/lib/app/app.js +26 -8
- package/lib/app/app.js.map +1 -1
- package/lib/app/app.module.css +8 -5
- package/lib/assets/icons.svg +17 -1
- package/lib/assets/icons.svg.js +12 -0
- package/lib/assets/icons.svg.js.map +1 -1
- package/lib/components/asset-info/asset-info.js +48 -44
- package/lib/components/asset-info/asset-info.js.map +1 -1
- package/lib/components/asset-info/asset-info.module.css +28 -6
- package/lib/components/asset-info/index.js.map +1 -1
- package/lib/components/asset-not-predictive/asset-not-predictive.js +28 -0
- package/lib/components/asset-not-predictive/asset-not-predictive.js.map +1 -0
- package/lib/components/asset-not-predictive/asset-not-predictive.module.css +3 -0
- package/lib/components/{duplicate-packages-insight → asset-not-predictive}/index.js +1 -1
- package/lib/components/asset-not-predictive/index.js.map +1 -0
- package/lib/components/bundle-assets/bundle-assets.js +31 -44
- package/lib/components/bundle-assets/bundle-assets.js.map +1 -1
- package/lib/components/bundle-assets/bundle-assets.module.css +11 -22
- package/lib/components/bundle-assets/bundle-assets.utils.js +3 -1
- package/lib/components/bundle-assets/bundle-assets.utils.js.map +1 -1
- package/lib/components/bundle-assets/index.js +4 -1
- package/lib/components/bundle-assets/index.js.map +1 -1
- package/lib/components/bundle-assets-totals-chart-bars/bundle-assets-totals-chart-bars.js +11 -7
- package/lib/components/bundle-assets-totals-chart-bars/bundle-assets-totals-chart-bars.js.map +1 -1
- package/lib/components/bundle-assets-totals-chart-bars/bundle-assets-totals-chart-bars.module.css +1 -1
- package/lib/components/bundle-modules/bundle-modules.js +30 -39
- package/lib/components/bundle-modules/bundle-modules.js.map +1 -1
- package/lib/components/bundle-modules/bundle-modules.module.css +3 -2
- package/lib/components/bundle-modules/bundle-modules.utils.js +5 -5
- package/lib/components/bundle-modules/bundle-modules.utils.js.map +1 -1
- package/lib/components/bundle-modules/index.js +5 -2
- package/lib/components/bundle-modules/index.js.map +1 -1
- package/lib/components/bundle-packages/bundle-packages.js +36 -61
- package/lib/components/bundle-packages/bundle-packages.js.map +1 -1
- package/lib/components/bundle-packages/bundle-packages.module.css +4 -0
- package/lib/components/bundle-packages/index.js +4 -1
- package/lib/components/bundle-packages/index.js.map +1 -1
- package/lib/components/delta/delta.module.css +2 -1
- package/lib/components/entry-info/entry-info.js +56 -0
- package/lib/components/entry-info/entry-info.js.map +1 -0
- package/lib/components/entry-info/entry-info.module.css +92 -0
- package/lib/components/{summary-item → entry-info}/index.js +1 -1
- package/lib/components/entry-info/index.js.map +1 -0
- package/lib/components/index.js +9 -7
- package/lib/components/index.js.map +1 -1
- package/lib/components/insight-icon/index.js +18 -0
- package/lib/components/insight-icon/index.js.map +1 -0
- package/lib/components/insight-icon/insight-icon.js +25 -0
- package/lib/components/insight-icon/insight-icon.js.map +1 -0
- package/lib/components/insight-icon/insight-icon.module.css +24 -0
- package/lib/components/{job-meta → insights}/index.js +1 -1
- package/lib/components/insights/index.js.map +1 -0
- package/lib/components/insights/insights.js +25 -0
- package/lib/components/insights/insights.js.map +1 -0
- package/lib/components/insights/insights.module.css +14 -0
- package/lib/components/job-header/job-header.js +12 -11
- package/lib/components/job-header/job-header.js.map +1 -1
- package/lib/components/jobs-header/index.js.map +1 -1
- package/lib/components/jobs-header/jobs-header.js +21 -14
- package/lib/components/jobs-header/jobs-header.js.map +1 -1
- package/lib/components/jobs-header/jobs-header.module.css +51 -4
- package/lib/components/metric/index.js.map +1 -1
- package/lib/components/metric/metric.js +7 -64
- package/lib/components/metric/metric.js.map +1 -1
- package/lib/components/metric/metric.module.css +3 -3
- package/lib/components/metric-run-info/index.js +18 -0
- package/lib/components/metric-run-info/index.js.map +1 -0
- package/lib/components/metric-run-info/metric-run-info.js +64 -0
- package/lib/components/metric-run-info/metric-run-info.js.map +1 -0
- package/lib/components/metric-run-info/metric-run-info.module.css +18 -0
- 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-search/metrics-table-search.module.css +0 -6
- package/lib/components/metrics-table-title/metrics-table-title.module.css +1 -0
- package/lib/components/module-info/index.js.map +1 -1
- package/lib/components/module-info/module-info.js +47 -47
- package/lib/components/module-info/module-info.js.map +1 -1
- package/lib/components/module-info/module-info.module.css +8 -33
- package/lib/components/package-info/index.js +18 -0
- package/lib/components/package-info/index.js.map +1 -0
- package/lib/components/package-info/package-info.js +77 -0
- package/lib/components/package-info/package-info.js.map +1 -0
- package/lib/components/package-info/package-info.module.css +13 -0
- package/lib/components/run-info/index.js +18 -0
- package/lib/components/run-info/index.js.map +1 -0
- package/lib/components/run-info/run-info.js +70 -0
- package/lib/components/run-info/run-info.js.map +1 -0
- package/lib/components/run-info/run-info.module.css +76 -0
- package/lib/components/summary/index.js.map +1 -1
- package/lib/components/summary/summary.js +10 -31
- package/lib/components/summary/summary.js.map +1 -1
- package/lib/components/summary/summary.module.css +27 -7
- package/lib/constants.js +1 -23
- package/lib/constants.js.map +1 -1
- package/lib/css/variables.css +18 -13
- package/lib/layout/box/box.js +3 -23
- package/lib/layout/box/box.js.map +1 -1
- package/lib/layout/box/box.module.css +11 -0
- package/lib/layout/box/index.js +15 -3
- package/lib/layout/box/index.js.map +1 -1
- package/lib/layout/flex-stack/flex-stack.js +3 -19
- package/lib/layout/flex-stack/flex-stack.js.map +1 -1
- package/lib/layout/flex-stack/index.js.map +1 -1
- package/lib/layout/stack/index.js.map +1 -1
- package/lib/layout/stack/stack.js +3 -16
- package/lib/layout/stack/stack.js.map +1 -1
- package/lib/tokens.js +38 -0
- package/lib/tokens.js.map +1 -0
- package/lib/ui/alert/alert.js +2 -12
- package/lib/ui/alert/alert.js.map +1 -1
- package/lib/ui/alert/index.js.map +1 -1
- package/lib/ui/container/container.js +1 -10
- package/lib/ui/container/container.js.map +1 -1
- package/lib/ui/container/index.js +15 -3
- package/lib/ui/container/index.js.map +1 -1
- package/lib/ui/dropdown/dropdown.module.css +1 -2
- package/lib/ui/file-name/file-name.js +1 -1
- package/lib/ui/file-name/file-name.js.map +1 -1
- package/lib/ui/filters/filters.module.css +1 -5
- package/lib/ui/horizontal-bar-chart/horizontal-bar-chart.module.css +2 -0
- package/lib/ui/hover-card/hover-card.js +3 -21
- package/lib/ui/hover-card/hover-card.js.map +1 -1
- package/lib/ui/hover-card/index.js.map +1 -1
- package/lib/ui/icon/icon.js +4 -0
- package/lib/ui/icon/icon.js.map +1 -1
- package/lib/ui/index.js +1 -3
- package/lib/ui/index.js.map +1 -1
- package/lib/ui/input/input.module.css +3 -4
- package/lib/ui/table/index.js.map +1 -1
- package/lib/ui/table/table.js +3 -17
- package/lib/ui/table/table.js.map +1 -1
- package/lib/ui/tag/index.js.map +1 -1
- package/lib/ui/tag/tag.js +5 -29
- package/lib/ui/tag/tag.js.map +1 -1
- package/lib/ui/tag/tag.module.css +15 -1
- package/lib/ui/tooltip/index.js.map +1 -1
- package/lib/ui/tooltip/tooltip.js +3 -23
- package/lib/ui/tooltip/tooltip.js.map +1 -1
- package/lib/ui/tooltip/tooltip.module.css +3 -4
- package/lib-esm/app/app.js +27 -9
- package/lib-esm/app/app.js.map +1 -1
- package/lib-esm/app/app.module.css +8 -5
- package/lib-esm/assets/icons.svg +17 -1
- package/lib-esm/assets/icons.svg.js +12 -0
- package/lib-esm/assets/icons.svg.js.map +1 -1
- package/lib-esm/components/asset-info/asset-info.js +27 -45
- package/lib-esm/components/asset-info/asset-info.js.map +1 -1
- package/lib-esm/components/asset-info/asset-info.module.css +28 -6
- package/lib-esm/components/asset-info/index.js.map +1 -1
- package/lib-esm/components/asset-not-predictive/asset-not-predictive.js +21 -0
- package/lib-esm/components/asset-not-predictive/asset-not-predictive.js.map +1 -0
- package/lib-esm/components/asset-not-predictive/asset-not-predictive.module.css +3 -0
- package/lib-esm/components/asset-not-predictive/index.js +2 -0
- package/lib-esm/components/asset-not-predictive/index.js.map +1 -0
- package/lib-esm/components/bundle-assets/bundle-assets.js +34 -49
- package/lib-esm/components/bundle-assets/bundle-assets.js.map +1 -1
- package/lib-esm/components/bundle-assets/bundle-assets.module.css +11 -22
- package/lib-esm/components/bundle-assets/bundle-assets.utils.js +3 -1
- package/lib-esm/components/bundle-assets/bundle-assets.utils.js.map +1 -1
- package/lib-esm/components/bundle-assets/index.js +5 -2
- package/lib-esm/components/bundle-assets/index.js.map +1 -1
- package/lib-esm/components/bundle-assets-totals-chart-bars/bundle-assets-totals-chart-bars.js +10 -8
- package/lib-esm/components/bundle-assets-totals-chart-bars/bundle-assets-totals-chart-bars.js.map +1 -1
- package/lib-esm/components/bundle-assets-totals-chart-bars/bundle-assets-totals-chart-bars.module.css +1 -1
- package/lib-esm/components/bundle-modules/bundle-modules.js +32 -41
- package/lib-esm/components/bundle-modules/bundle-modules.js.map +1 -1
- package/lib-esm/components/bundle-modules/bundle-modules.module.css +3 -2
- package/lib-esm/components/bundle-modules/bundle-modules.utils.js +3 -3
- package/lib-esm/components/bundle-modules/bundle-modules.utils.js.map +1 -1
- package/lib-esm/components/bundle-modules/index.js +7 -4
- package/lib-esm/components/bundle-modules/index.js.map +1 -1
- package/lib-esm/components/bundle-packages/bundle-packages.js +37 -62
- package/lib-esm/components/bundle-packages/bundle-packages.js.map +1 -1
- package/lib-esm/components/bundle-packages/bundle-packages.module.css +4 -0
- package/lib-esm/components/bundle-packages/index.js +5 -2
- package/lib-esm/components/bundle-packages/index.js.map +1 -1
- package/lib-esm/components/delta/delta.module.css +2 -1
- package/lib-esm/components/entry-info/entry-info.js +50 -0
- package/lib-esm/components/entry-info/entry-info.js.map +1 -0
- package/lib-esm/components/entry-info/entry-info.module.css +92 -0
- package/lib-esm/components/entry-info/index.js +2 -0
- package/lib-esm/components/entry-info/index.js.map +1 -0
- package/lib-esm/components/index.js +4 -3
- package/lib-esm/components/index.js.map +1 -1
- package/lib-esm/components/insight-icon/index.js +2 -0
- package/lib-esm/components/insight-icon/index.js.map +1 -0
- package/lib-esm/components/insight-icon/insight-icon.js +18 -0
- package/lib-esm/components/insight-icon/insight-icon.js.map +1 -0
- package/lib-esm/components/insight-icon/insight-icon.module.css +24 -0
- package/lib-esm/components/insights/index.js +2 -0
- package/lib-esm/components/insights/index.js.map +1 -0
- package/lib-esm/components/insights/insights.js +18 -0
- package/lib-esm/components/insights/insights.js.map +1 -0
- package/lib-esm/components/insights/insights.module.css +14 -0
- package/lib-esm/components/job-header/job-header.js +12 -11
- package/lib-esm/components/job-header/job-header.js.map +1 -1
- package/lib-esm/components/jobs-header/index.js.map +1 -1
- package/lib-esm/components/jobs-header/jobs-header.js +20 -13
- package/lib-esm/components/jobs-header/jobs-header.js.map +1 -1
- package/lib-esm/components/jobs-header/jobs-header.module.css +51 -4
- package/lib-esm/components/metric/index.js.map +1 -1
- package/lib-esm/components/metric/metric.js +7 -41
- package/lib-esm/components/metric/metric.js.map +1 -1
- package/lib-esm/components/metric/metric.module.css +3 -3
- package/lib-esm/components/metric-run-info/index.js +2 -0
- package/lib-esm/components/metric-run-info/index.js.map +1 -0
- package/lib-esm/components/metric-run-info/metric-run-info.js +34 -0
- package/lib-esm/components/metric-run-info/metric-run-info.js.map +1 -0
- package/lib-esm/components/metric-run-info/metric-run-info.module.css +18 -0
- 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-search/metrics-table-search.module.css +0 -6
- package/lib-esm/components/metrics-table-title/metrics-table-title.module.css +1 -0
- package/lib-esm/components/module-info/index.js.map +1 -1
- package/lib-esm/components/module-info/module-info.js +26 -48
- package/lib-esm/components/module-info/module-info.js.map +1 -1
- package/lib-esm/components/module-info/module-info.module.css +8 -33
- package/lib-esm/components/package-info/index.js +2 -0
- package/lib-esm/components/package-info/index.js.map +1 -0
- package/lib-esm/components/package-info/package-info.js +48 -0
- package/lib-esm/components/package-info/package-info.js.map +1 -0
- package/lib-esm/components/package-info/package-info.module.css +13 -0
- package/lib-esm/components/run-info/index.js +2 -0
- package/lib-esm/components/run-info/index.js.map +1 -0
- package/lib-esm/components/run-info/run-info.js +40 -0
- package/lib-esm/components/run-info/run-info.js.map +1 -0
- package/lib-esm/components/run-info/run-info.module.css +76 -0
- package/lib-esm/components/summary/index.js.map +1 -1
- package/lib-esm/components/summary/summary.js +9 -30
- package/lib-esm/components/summary/summary.js.map +1 -1
- package/lib-esm/components/summary/summary.module.css +27 -7
- package/lib-esm/constants.js +0 -22
- package/lib-esm/constants.js.map +1 -1
- package/lib-esm/css/variables.css +18 -13
- package/lib-esm/layout/box/box.js +3 -23
- package/lib-esm/layout/box/box.js.map +1 -1
- package/lib-esm/layout/box/box.module.css +11 -0
- package/lib-esm/layout/box/index.js +1 -1
- package/lib-esm/layout/box/index.js.map +1 -1
- package/lib-esm/layout/flex-stack/flex-stack.js +3 -19
- package/lib-esm/layout/flex-stack/flex-stack.js.map +1 -1
- package/lib-esm/layout/flex-stack/index.js.map +1 -1
- package/lib-esm/layout/stack/index.js.map +1 -1
- package/lib-esm/layout/stack/stack.js +3 -16
- package/lib-esm/layout/stack/stack.js.map +1 -1
- package/lib-esm/tokens.js +35 -0
- package/lib-esm/tokens.js.map +1 -0
- package/lib-esm/ui/alert/alert.js +2 -12
- package/lib-esm/ui/alert/alert.js.map +1 -1
- package/lib-esm/ui/alert/index.js.map +1 -1
- package/lib-esm/ui/container/container.js +1 -10
- package/lib-esm/ui/container/container.js.map +1 -1
- package/lib-esm/ui/container/index.js +1 -1
- package/lib-esm/ui/container/index.js.map +1 -1
- package/lib-esm/ui/dropdown/dropdown.module.css +1 -2
- package/lib-esm/ui/file-name/file-name.js +1 -1
- package/lib-esm/ui/file-name/file-name.js.map +1 -1
- package/lib-esm/ui/filters/filters.module.css +1 -5
- package/lib-esm/ui/horizontal-bar-chart/horizontal-bar-chart.module.css +2 -0
- package/lib-esm/ui/hover-card/hover-card.js +3 -21
- package/lib-esm/ui/hover-card/hover-card.js.map +1 -1
- package/lib-esm/ui/hover-card/index.js.map +1 -1
- package/lib-esm/ui/icon/icon.js +4 -0
- package/lib-esm/ui/icon/icon.js.map +1 -1
- package/lib-esm/ui/index.js +0 -1
- package/lib-esm/ui/index.js.map +1 -1
- package/lib-esm/ui/input/input.module.css +3 -4
- package/lib-esm/ui/table/index.js.map +1 -1
- package/lib-esm/ui/table/table.js +3 -17
- package/lib-esm/ui/table/table.js.map +1 -1
- package/lib-esm/ui/tag/index.js.map +1 -1
- package/lib-esm/ui/tag/tag.js +4 -28
- package/lib-esm/ui/tag/tag.js.map +1 -1
- package/lib-esm/ui/tag/tag.module.css +15 -1
- package/lib-esm/ui/tooltip/index.js.map +1 -1
- package/lib-esm/ui/tooltip/tooltip.js +4 -23
- package/lib-esm/ui/tooltip/tooltip.js.map +1 -1
- package/lib-esm/ui/tooltip/tooltip.module.css +3 -4
- package/package.json +23 -29
- package/src/app/app.jsx +34 -9
- package/src/app/app.module.css +8 -5
- package/src/assets/icons/error.svg +6 -0
- package/src/assets/icons/external-link.svg +1 -0
- package/src/assets/icons/info.svg +6 -0
- package/src/assets/icons/more-vertical.svg +5 -0
- package/src/assets/icons.svg +17 -1
- package/src/assets/icons.svg.jsx +53 -0
- package/src/components/asset-info/asset-info.module.css +28 -6
- package/src/components/asset-info/asset-info.stories.tsx +74 -0
- package/src/components/asset-info/asset-info.tsx +159 -0
- package/src/components/asset-not-predictive/asset-not-predictive.module.css +3 -0
- package/src/components/asset-not-predictive/asset-not-predictive.stories.tsx +23 -0
- package/src/components/asset-not-predictive/asset-not-predictive.tsx +44 -0
- package/src/components/asset-not-predictive/index.ts +1 -0
- package/src/components/bundle-assets/bundle-assets.jsx +94 -107
- package/src/components/bundle-assets/bundle-assets.module.css +11 -22
- package/src/components/bundle-assets/bundle-assets.utils.js +3 -2
- package/src/components/bundle-assets/index.jsx +7 -1
- package/src/components/bundle-assets-totals-chart-bars/bundle-assets-totals-chart-bars.jsx +21 -17
- package/src/components/bundle-assets-totals-chart-bars/bundle-assets-totals-chart-bars.module.css +1 -1
- package/src/components/bundle-modules/bundle-modules.jsx +91 -100
- package/src/components/bundle-modules/bundle-modules.module.css +3 -2
- package/src/components/bundle-modules/bundle-modules.utils.js +5 -3
- package/src/components/bundle-modules/index.jsx +9 -3
- package/src/components/bundle-packages/bundle-packages.jsx +116 -179
- package/src/components/bundle-packages/bundle-packages.module.css +4 -0
- package/src/components/bundle-packages/index.jsx +7 -1
- package/src/components/delta/delta.module.css +2 -1
- package/src/components/entry-info/entry-info.module.css +92 -0
- package/src/components/entry-info/entry-info.stories.tsx +75 -0
- package/src/components/entry-info/entry-info.tsx +134 -0
- package/src/components/entry-info/index.ts +1 -0
- package/src/components/index.js +4 -3
- package/src/components/insight-icon/index.ts +1 -0
- package/src/components/insight-icon/insight-icon.module.css +24 -0
- package/src/components/insight-icon/insight-icon.tsx +25 -0
- package/src/components/insights/index.ts +1 -0
- package/src/components/insights/insights.module.css +14 -0
- package/src/components/insights/insights.stories.tsx +54 -0
- package/src/components/insights/insights.tsx +44 -0
- package/src/components/job-header/job-header.jsx +16 -13
- package/src/components/jobs-header/jobs-header.module.css +51 -4
- package/src/components/jobs-header/jobs-header.stories.tsx +51 -0
- package/src/components/jobs-header/jobs-header.tsx +90 -0
- package/src/components/metric/metric.module.css +3 -3
- package/src/components/metric/metric.stories.tsx +41 -0
- package/src/components/metric/metric.tsx +42 -0
- package/src/components/metric-run-info/index.ts +1 -0
- package/src/components/metric-run-info/metric-run-info.module.css +18 -0
- package/src/components/metric-run-info/metric-run-info.stories.tsx +34 -0
- package/src/components/metric-run-info/metric-run-info.tsx +85 -0
- package/src/components/metrics-table-options/metrics-table-options.jsx +1 -1
- package/src/components/metrics-table-search/metrics-table-search.module.css +0 -6
- package/src/components/metrics-table-title/metrics-table-title.module.css +1 -0
- package/src/components/module-info/module-info.module.css +8 -33
- package/src/components/module-info/module-info.stories.tsx +44 -0
- package/src/components/module-info/module-info.tsx +116 -0
- package/src/components/package-info/index.ts +1 -0
- package/src/components/package-info/package-info.module.css +13 -0
- package/src/components/package-info/package-info.stories.tsx +36 -0
- package/src/components/package-info/package-info.tsx +135 -0
- package/src/components/run-info/index.ts +1 -0
- package/src/components/run-info/run-info.module.css +76 -0
- package/src/components/run-info/run-info.stories.tsx +58 -0
- package/src/components/run-info/run-info.tsx +111 -0
- package/src/components/summary/summary.module.css +27 -7
- package/src/components/summary/summary.stories.tsx +57 -0
- package/src/components/summary/summary.tsx +103 -0
- package/src/constants.js +0 -24
- package/src/css/variables.css +18 -13
- package/src/layout/box/box.module.css +11 -0
- package/src/layout/box/box.stories.tsx +49 -0
- package/src/layout/box/box.tsx +49 -0
- package/src/layout/box/index.ts +1 -0
- package/src/layout/flex-stack/flex-stack.stories.tsx +59 -0
- package/src/layout/flex-stack/flex-stack.tsx +43 -0
- package/src/layout/stack/stack.stories.tsx +53 -0
- package/src/layout/stack/stack.tsx +22 -0
- package/src/tokens.ts +37 -0
- package/src/ui/alert/alert.stories.tsx +39 -0
- package/src/ui/alert/alert.tsx +23 -0
- package/src/ui/container/container.stories.tsx +29 -0
- package/src/ui/container/container.tsx +18 -0
- package/src/ui/container/index.ts +1 -0
- package/src/ui/dropdown/dropdown.module.css +1 -2
- package/src/ui/file-name/file-name.jsx +1 -1
- package/src/ui/filters/filters.module.css +1 -5
- package/src/ui/horizontal-bar-chart/horizontal-bar-chart.module.css +2 -0
- package/src/ui/hover-card/hover-card.stories.tsx +41 -0
- package/src/ui/hover-card/{hover-card.jsx → hover-card.tsx} +22 -30
- package/src/ui/icon/icon.jsx +4 -0
- package/src/ui/index.js +0 -1
- package/src/ui/input/input.module.css +3 -4
- package/src/ui/table/table.stories.tsx +238 -0
- package/src/ui/table/table.tsx +38 -0
- package/src/ui/tag/tag.module.css +15 -1
- package/src/ui/tag/tag.stories.tsx +32 -0
- package/src/ui/tag/tag.tsx +28 -0
- package/src/ui/tooltip/tooltip.module.css +3 -4
- package/src/ui/tooltip/tooltip.stories.tsx +30 -0
- package/src/ui/tooltip/tooltip.tsx +57 -0
- package/types/app/header/header.d.ts +5 -5
- package/types/components/asset-info/asset-info.d.ts +20 -23
- package/types/components/asset-info/index.d.ts +1 -1
- package/types/components/asset-not-predictive/asset-not-predictive.d.ts +8 -0
- package/types/components/asset-not-predictive/index.d.ts +1 -0
- package/types/components/browsertime-table/browsertime-table.d.ts +5 -5
- package/types/components/bundle-assets/bundle-assets.constants.d.ts +6 -6
- package/types/components/bundle-assets/bundle-assets.d.ts +28 -20
- package/types/components/bundle-assets/index.d.ts +11 -11
- package/types/components/bundle-assets-totals-chart-bars/bundle-assets-totals-chart-bars.d.ts +6 -6
- package/types/components/bundle-assets-totals-table/bundle-assets-totals-table.d.ts +7 -7
- package/types/components/bundle-modules/bundle-modules.constants.d.ts +6 -6
- package/types/components/bundle-modules/bundle-modules.d.ts +28 -24
- package/types/components/bundle-modules/bundle-modules.utils.d.ts +1 -1
- package/types/components/bundle-modules/index.d.ts +11 -11
- package/types/components/bundle-packages/bundle-packages.constants.d.ts +6 -6
- package/types/components/bundle-packages/bundle-packages.d.ts +24 -20
- package/types/components/bundle-packages/index.d.ts +11 -11
- package/types/components/component-link.d.ts +6 -6
- package/types/components/delta/delta.d.ts +7 -7
- package/types/components/entry-info/entry-info.d.ts +25 -0
- package/types/components/entry-info/index.d.ts +1 -0
- package/types/components/index.d.ts +4 -3
- package/types/components/insight-icon/index.d.ts +1 -0
- package/types/components/insight-icon/insight-icon.d.ts +7 -0
- package/types/components/insights/index.d.ts +1 -0
- package/types/components/insights/insights.d.ts +8 -0
- package/types/components/job-header/job-header.d.ts +9 -9
- package/types/components/job-name/job-name.d.ts +9 -9
- package/types/components/jobs-header/index.d.ts +1 -1
- package/types/components/jobs-header/jobs-header.d.ts +18 -15
- package/types/components/lighthouse-table/lighthouse-table.d.ts +5 -5
- package/types/components/metric/index.d.ts +1 -1
- package/types/components/metric/metric.d.ts +6 -32
- package/types/components/metric-run-info/index.d.ts +1 -0
- package/types/components/metric-run-info/metric-run-info.d.ts +13 -0
- package/types/components/metrics-table/metrics-table.d.ts +14 -14
- package/types/components/metrics-table-options/metrics-table-options.d.ts +7 -7
- package/types/components/metrics-table-search/metrics-table-search.d.ts +7 -7
- package/types/components/metrics-table-title/metrics-table-title.d.ts +10 -10
- package/types/components/module-info/index.d.ts +1 -1
- package/types/components/module-info/module-info.d.ts +19 -34
- package/types/components/package-info/index.d.ts +1 -0
- package/types/components/package-info/package-info.d.ts +15 -0
- package/types/components/run-info/index.d.ts +1 -0
- package/types/components/run-info/run-info.d.ts +16 -0
- package/types/components/summary/index.d.ts +1 -1
- package/types/components/summary/summary.d.ts +25 -36
- package/types/components/total-size-type-title/total-size-type-title.d.ts +3 -3
- package/types/constants.d.ts +4 -15
- package/types/i18n.d.ts +15 -15
- package/types/layout/box/box.d.ts +12 -25
- package/types/layout/box/index.d.ts +1 -1
- package/types/layout/flex-stack/flex-stack.d.ts +10 -33
- package/types/layout/flex-stack/index.d.ts +1 -1
- package/types/layout/footer/footer.d.ts +5 -5
- package/types/layout/separator.d.ts +4 -4
- package/types/layout/stack/index.d.ts +1 -1
- package/types/layout/stack/stack.d.ts +7 -20
- package/types/tokens.d.ts +23 -0
- package/types/ui/alert/alert.d.ts +7 -14
- package/types/ui/alert/index.d.ts +1 -1
- package/types/ui/container/container.d.ts +5 -17
- package/types/ui/container/index.d.ts +1 -1
- package/types/ui/dropdown/dropdown.d.ts +16 -16
- package/types/ui/empty-set/empty-set.d.ts +7 -7
- package/types/ui/file-name/file-name.d.ts +7 -7
- package/types/ui/filters/filters.d.ts +6 -6
- package/types/ui/filters/filters.utils.d.ts +2 -2
- package/types/ui/filters/index.d.ts +4 -4
- package/types/ui/horizontal-bar-chart/horizontal-bar-chart.d.ts +6 -6
- package/types/ui/hover-card/hover-card.d.ts +12 -26
- package/types/ui/hover-card/index.d.ts +1 -1
- package/types/ui/icon/icon.d.ts +26 -22
- package/types/ui/index.d.ts +0 -1
- package/types/ui/input/input.d.ts +5 -5
- package/types/ui/loader/loader.d.ts +8 -8
- package/types/ui/skeleton/skeleton.d.ts +7 -7
- package/types/ui/sort-dropdown/sort-dropdown.d.ts +11 -11
- package/types/ui/table/index.d.ts +1 -1
- package/types/ui/table/table.d.ts +14 -33
- package/types/ui/tabs/tabs.d.ts +10 -10
- package/types/ui/tag/index.d.ts +1 -1
- package/types/ui/tag/tag.d.ts +22 -33
- package/types/ui/toolbar/toolbar.d.ts +6 -6
- package/types/ui/tooltip/index.d.ts +1 -1
- package/types/ui/tooltip/tooltip.d.ts +10 -28
- package/lib/components/duplicate-packages-insight/duplicate-packages-insight.js +0 -31
- package/lib/components/duplicate-packages-insight/duplicate-packages-insight.js.map +0 -1
- package/lib/components/duplicate-packages-insight/duplicate-packages-insight.module.css +0 -18
- package/lib/components/duplicate-packages-insight/index.js.map +0 -1
- package/lib/components/job-meta/index.js.map +0 -1
- package/lib/components/job-meta/job-meta.js +0 -34
- package/lib/components/job-meta/job-meta.js.map +0 -1
- package/lib/components/job-meta/job-meta.module.css +0 -19
- package/lib/components/summary-item/index.js.map +0 -1
- package/lib/components/summary-item/summary-item.js +0 -97
- package/lib/components/summary-item/summary-item.js.map +0 -1
- package/lib/components/summary-item/summary-item.module.css +0 -58
- package/lib/ui/panels/index.js +0 -6
- package/lib/ui/panels/index.js.map +0 -1
- package/lib/ui/panels/panels.js +0 -28
- package/lib/ui/panels/panels.js.map +0 -1
- package/lib/ui/panels/panels.module.css +0 -23
- package/lib-esm/components/duplicate-packages-insight/duplicate-packages-insight.js +0 -24
- package/lib-esm/components/duplicate-packages-insight/duplicate-packages-insight.js.map +0 -1
- package/lib-esm/components/duplicate-packages-insight/duplicate-packages-insight.module.css +0 -18
- package/lib-esm/components/duplicate-packages-insight/index.js +0 -2
- package/lib-esm/components/duplicate-packages-insight/index.js.map +0 -1
- package/lib-esm/components/job-meta/index.js +0 -2
- package/lib-esm/components/job-meta/index.js.map +0 -1
- package/lib-esm/components/job-meta/job-meta.js +0 -27
- package/lib-esm/components/job-meta/job-meta.js.map +0 -1
- package/lib-esm/components/job-meta/job-meta.module.css +0 -19
- package/lib-esm/components/summary-item/index.js +0 -2
- package/lib-esm/components/summary-item/index.js.map +0 -1
- package/lib-esm/components/summary-item/summary-item.js +0 -67
- package/lib-esm/components/summary-item/summary-item.js.map +0 -1
- package/lib-esm/components/summary-item/summary-item.module.css +0 -58
- package/lib-esm/ui/panels/index.js +0 -2
- package/lib-esm/ui/panels/index.js.map +0 -1
- package/lib-esm/ui/panels/panels.js +0 -21
- package/lib-esm/ui/panels/panels.js.map +0 -1
- package/lib-esm/ui/panels/panels.module.css +0 -23
- package/src/components/asset-info/asset-info.jsx +0 -96
- package/src/components/duplicate-packages-insight/duplicate-packages-insight.module.css +0 -18
- package/src/components/duplicate-packages-insight/duplicate-packages-insight.stories.tsx +0 -66
- package/src/components/duplicate-packages-insight/duplicate-packages-insight.tsx +0 -81
- package/src/components/duplicate-packages-insight/index.ts +0 -1
- package/src/components/job-meta/index.js +0 -1
- package/src/components/job-meta/job-meta.jsx +0 -47
- package/src/components/job-meta/job-meta.module.css +0 -19
- package/src/components/jobs-header/jobs-header.jsx +0 -43
- package/src/components/metric/metric.jsx +0 -63
- package/src/components/module-info/module-info.jsx +0 -123
- package/src/components/summary/summary.jsx +0 -73
- package/src/components/summary-item/index.js +0 -1
- package/src/components/summary-item/summary-item.jsx +0 -142
- package/src/components/summary-item/summary-item.module.css +0 -58
- package/src/layout/box/box.jsx +0 -67
- package/src/layout/box/index.js +0 -1
- package/src/layout/flex-stack/flex-stack.jsx +0 -49
- package/src/layout/stack/stack.jsx +0 -32
- package/src/ui/alert/alert.jsx +0 -27
- package/src/ui/container/container.jsx +0 -24
- package/src/ui/container/index.js +0 -1
- package/src/ui/panels/index.js +0 -1
- package/src/ui/panels/panels.jsx +0 -39
- package/src/ui/panels/panels.module.css +0 -23
- package/src/ui/table/table.jsx +0 -37
- package/src/ui/tag/tag.jsx +0 -49
- package/src/ui/tooltip/tooltip.jsx +0 -67
- package/tsconfig.esm.json +0 -13
- package/tsconfig.json +0 -7
- package/tsconfig.lib.json +0 -9
- package/types/components/duplicate-packages-insight/duplicate-packages-insight.d.ts +0 -11
- package/types/components/duplicate-packages-insight/index.d.ts +0 -1
- package/types/components/job-meta/index.d.ts +0 -1
- package/types/components/job-meta/job-meta.d.ts +0 -18
- package/types/components/summary-item/index.d.ts +0 -1
- package/types/components/summary-item/summary-item.d.ts +0 -40
- package/types/ui/panels/index.d.ts +0 -1
- package/types/ui/panels/panels.d.ts +0 -18
- /package/src/components/asset-info/{index.js → index.ts} +0 -0
- /package/src/components/jobs-header/{index.js → index.ts} +0 -0
- /package/src/components/metric/{index.js → index.ts} +0 -0
- /package/src/components/module-info/{index.js → index.ts} +0 -0
- /package/src/components/summary/{index.js → index.ts} +0 -0
- /package/src/layout/flex-stack/{index.js → index.ts} +0 -0
- /package/src/layout/stack/{index.js → index.ts} +0 -0
- /package/src/ui/alert/{index.js → index.ts} +0 -0
- /package/src/ui/hover-card/{index.js → index.ts} +0 -0
- /package/src/ui/table/{index.js → index.ts} +0 -0
- /package/src/ui/tag/{index.js → index.ts} +0 -0
- /package/src/ui/tooltip/{index.js → index.ts} +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Meta } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
import { getWrapperDecorator } from '../../stories';
|
|
5
|
+
import { Box } from '../box';
|
|
6
|
+
import { Stack } from '.';
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
title: 'Layout/Stack',
|
|
10
|
+
component: Stack,
|
|
11
|
+
decorators: [getWrapperDecorator()],
|
|
12
|
+
} as Meta<typeof Stack>;
|
|
13
|
+
|
|
14
|
+
export const Default = () => (
|
|
15
|
+
<Stack>
|
|
16
|
+
<Box outline>Lorem ipsum 1</Box>
|
|
17
|
+
<Box outline>Lorem ipsum 2</Box>
|
|
18
|
+
{null}
|
|
19
|
+
Lorem ipsum 3
|
|
20
|
+
</Stack>
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
export const WithCustomWrapper = () => (
|
|
24
|
+
<Stack as="main" className="wrapper">
|
|
25
|
+
<Box outline>Lorem ipsum 1</Box>
|
|
26
|
+
<Box outline>Lorem ipsum 2</Box>
|
|
27
|
+
</Stack>
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
export const WithSpace = () => (
|
|
31
|
+
<Stack space="large">
|
|
32
|
+
<Box outline>Lorem ipsum 1</Box>
|
|
33
|
+
<Box outline>Lorem ipsum 2</Box>
|
|
34
|
+
<Box outline>Lorem ipsum 3</Box>
|
|
35
|
+
</Stack>
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
export const WithNestedStacks = () => (
|
|
39
|
+
<Stack space="large">
|
|
40
|
+
<Box outline>Lorem ipsum 1</Box>
|
|
41
|
+
<Box outline>Lorem ipsum 2</Box>
|
|
42
|
+
<Stack space="small">
|
|
43
|
+
<Box outline>Lorem ipsum 3.1</Box>
|
|
44
|
+
<Box outline>Lorem ipsum 3.2</Box>
|
|
45
|
+
</Stack>
|
|
46
|
+
</Stack>
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
export const WithSingleItem = () => (
|
|
50
|
+
<Stack>
|
|
51
|
+
<Box outline>Lorem ipsum</Box>
|
|
52
|
+
</Stack>
|
|
53
|
+
);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
|
|
4
|
+
import { NO_SPACE, SPACES } from '../../tokens';
|
|
5
|
+
import { getRenderChildWithClassName } from '../../utils';
|
|
6
|
+
import css from './stack.module.css';
|
|
7
|
+
|
|
8
|
+
export type StackProps = {
|
|
9
|
+
as?: React.ElementType;
|
|
10
|
+
space?: (typeof SPACES)[number];
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const Stack = (props: StackProps & React.ComponentProps<'div'>) => {
|
|
14
|
+
const { className = '', as: Component = 'div', space = NO_SPACE, children, ...restProps } = props;
|
|
15
|
+
const rootClassName = cx(css.root, className, css[`space--${space}`]);
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<Component {...restProps} className={rootClassName}>
|
|
19
|
+
{React.Children.map(children, getRenderChildWithClassName(css.item))}
|
|
20
|
+
</Component>
|
|
21
|
+
);
|
|
22
|
+
};
|
package/src/tokens.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export const NO_SPACE = 'no-space';
|
|
2
|
+
export const SPACE_XXXSMALL = 'xxxsmall';
|
|
3
|
+
export const SPACE_XXSMALL = 'xxsmall';
|
|
4
|
+
export const SPACE_XSMALL = 'xsmall';
|
|
5
|
+
export const SPACE_SMALL = 'small';
|
|
6
|
+
export const SPACE_MEDIUM = 'medium';
|
|
7
|
+
export const SPACE_LARGE = 'large';
|
|
8
|
+
export const SPACE_XLARGE = 'xlarge';
|
|
9
|
+
export const SPACE_XXLARGE = 'xxlarge';
|
|
10
|
+
export const SPACE_XXXLARGE = 'xxxlarge';
|
|
11
|
+
|
|
12
|
+
export const SPACES = [
|
|
13
|
+
NO_SPACE,
|
|
14
|
+
SPACE_XXXSMALL,
|
|
15
|
+
SPACE_XXSMALL,
|
|
16
|
+
SPACE_XSMALL,
|
|
17
|
+
SPACE_SMALL,
|
|
18
|
+
SPACE_MEDIUM,
|
|
19
|
+
SPACE_LARGE,
|
|
20
|
+
SPACE_XLARGE,
|
|
21
|
+
SPACE_XXLARGE,
|
|
22
|
+
SPACE_XXXLARGE,
|
|
23
|
+
] as const;
|
|
24
|
+
|
|
25
|
+
export const KIND = {
|
|
26
|
+
DEFAULT: 'default',
|
|
27
|
+
SUCCESS: 'success',
|
|
28
|
+
INFO: 'info',
|
|
29
|
+
WARNING: 'warning',
|
|
30
|
+
DANGER: 'danger',
|
|
31
|
+
} as const;
|
|
32
|
+
|
|
33
|
+
export const SIZE = {
|
|
34
|
+
SMALL: 'small',
|
|
35
|
+
MEDIUM: 'medium',
|
|
36
|
+
LARGE: 'large',
|
|
37
|
+
} as const;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Meta, Story } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
import { getWrapperDecorator } from '../../stories';
|
|
5
|
+
import { Alert } from '.';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'UI/Alert',
|
|
9
|
+
component: Alert,
|
|
10
|
+
decorators: [getWrapperDecorator()],
|
|
11
|
+
} as Meta<typeof Alert>;
|
|
12
|
+
|
|
13
|
+
const Template: Story = (args) => <Alert {...args}>Lorem ipsum</Alert>;
|
|
14
|
+
|
|
15
|
+
export const Default = Template.bind({});
|
|
16
|
+
|
|
17
|
+
export const WithKindSuccess = Template.bind({});
|
|
18
|
+
|
|
19
|
+
WithKindSuccess.args = {
|
|
20
|
+
kind: 'success',
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const WithKindInfo = Template.bind({});
|
|
24
|
+
|
|
25
|
+
WithKindInfo.args = {
|
|
26
|
+
kind: 'info',
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const WithKindWarning = Template.bind({});
|
|
30
|
+
|
|
31
|
+
WithKindWarning.args = {
|
|
32
|
+
kind: 'warning',
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const WithKindDanger = Template.bind({});
|
|
36
|
+
|
|
37
|
+
WithKindDanger.args = {
|
|
38
|
+
kind: 'danger',
|
|
39
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
|
|
4
|
+
import { KIND } from '../../tokens';
|
|
5
|
+
import { Box } from '../../layout/box';
|
|
6
|
+
import css from './alert.module.css';
|
|
7
|
+
|
|
8
|
+
interface AlertProps {
|
|
9
|
+
kind?: (typeof KIND)[keyof typeof KIND];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const Alert = (props: AlertProps & React.ComponentProps<typeof Box>) => {
|
|
13
|
+
const { className = '', kind = 'default', ...restProps } = props;
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<Box
|
|
17
|
+
padding={['xsmall', 'small']}
|
|
18
|
+
outline
|
|
19
|
+
className={cx(css.root, className, css[kind])}
|
|
20
|
+
{...restProps}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { Container } from '.';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'UI/Container',
|
|
7
|
+
component: Container,
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const Default = () => (
|
|
11
|
+
<Container style={{ background: 'white' }}>
|
|
12
|
+
<div
|
|
13
|
+
style={{
|
|
14
|
+
background: 'white',
|
|
15
|
+
padding: '24px',
|
|
16
|
+
}}
|
|
17
|
+
>
|
|
18
|
+
Content
|
|
19
|
+
</div>
|
|
20
|
+
</Container>
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
Default.decorators = [
|
|
24
|
+
(Story: React.FunctionComponent) => (
|
|
25
|
+
<div style={{ background: 'hotpink' }}>
|
|
26
|
+
<Story />
|
|
27
|
+
</div>
|
|
28
|
+
),
|
|
29
|
+
];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
|
|
4
|
+
import css from './container.module.css';
|
|
5
|
+
|
|
6
|
+
interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
as?: React.ElementType;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const Container = ({
|
|
11
|
+
as: Component = 'div',
|
|
12
|
+
className = '',
|
|
13
|
+
...restProps
|
|
14
|
+
}: ContainerProps) => (
|
|
15
|
+
<Component className={cx(css.root, className)}>
|
|
16
|
+
<div className={css.inner} {...restProps} />
|
|
17
|
+
</Component>
|
|
18
|
+
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './container';
|
|
@@ -83,11 +83,7 @@
|
|
|
83
83
|
.filterStandalone:active .filterCheckbox,
|
|
84
84
|
.filterStandalone:focus .filterCheckbox {
|
|
85
85
|
z-index: var(--layout-xlow); /* show collapsed border */
|
|
86
|
-
box-shadow: var(--
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.filterStandalone:hover .filterCheckbox {
|
|
90
|
-
border-color: var(--color-outline-dark);
|
|
86
|
+
box-shadow: var(--outline-hover);
|
|
91
87
|
color: var(--color-text);
|
|
92
88
|
}
|
|
93
89
|
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Meta, Story } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
import { HoverCard, HoverCardProps } from '.';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'UI/HoverCard',
|
|
8
|
+
component: HoverCard,
|
|
9
|
+
} as Meta;
|
|
10
|
+
|
|
11
|
+
const Template: Story<HoverCardProps> = (props) => (
|
|
12
|
+
<>
|
|
13
|
+
<HoverCard {...props} />
|
|
14
|
+
<p style={{ position: 'relative', zIndex: 1, maxWidth: 360 }}>
|
|
15
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras in neque ante. Curabitur
|
|
16
|
+
vehicula, lorem sit amet fringilla dapibus, justo mauris varius elit, ut fermentum leo velit
|
|
17
|
+
eget risus
|
|
18
|
+
</p>
|
|
19
|
+
</>
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
export const Default = () => (
|
|
23
|
+
<Template label="main.js">
|
|
24
|
+
<h1>main.js</h1>
|
|
25
|
+
<p>info</p>
|
|
26
|
+
</Template>
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
export const WithRenderFn = () => (
|
|
30
|
+
<Template label="main.js">
|
|
31
|
+
{({ close }) => (
|
|
32
|
+
<div>
|
|
33
|
+
<h1>main.js</h1>
|
|
34
|
+
<p>info</p>
|
|
35
|
+
<button type="button" onClick={close}>
|
|
36
|
+
close
|
|
37
|
+
</button>
|
|
38
|
+
</div>
|
|
39
|
+
)}
|
|
40
|
+
</Template>
|
|
41
|
+
);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import cx from 'classnames';
|
|
4
3
|
import {
|
|
5
4
|
Hovercard,
|
|
@@ -11,10 +10,28 @@ import {
|
|
|
11
10
|
|
|
12
11
|
import css from './hover-card.module.css';
|
|
13
12
|
|
|
14
|
-
export
|
|
15
|
-
|
|
13
|
+
export interface HoverCardProps {
|
|
14
|
+
className?: string;
|
|
15
|
+
anchorClassName?: string;
|
|
16
|
+
hoverCardClassName?: string;
|
|
17
|
+
href?: string;
|
|
18
|
+
as?: React.ElementType;
|
|
19
|
+
label: React.ReactNode;
|
|
20
|
+
children?: React.ReactNode | (({ close }: { close: () => void }) => React.ReactNode);
|
|
21
|
+
}
|
|
16
22
|
|
|
17
|
-
|
|
23
|
+
export const HoverCard = (props: HoverCardProps) => {
|
|
24
|
+
const {
|
|
25
|
+
className = '',
|
|
26
|
+
anchorClassName = '',
|
|
27
|
+
hoverCardClassName = '',
|
|
28
|
+
href = '',
|
|
29
|
+
as = null,
|
|
30
|
+
label,
|
|
31
|
+
children,
|
|
32
|
+
} = props;
|
|
33
|
+
|
|
34
|
+
const state = useHovercardState({ gutter: 8, timeout: 800 });
|
|
18
35
|
const hovercardProps = useHovercard({ state, portal: true });
|
|
19
36
|
|
|
20
37
|
// Fallback to span if no href
|
|
@@ -37,6 +54,7 @@ export const HoverCard = (props) => {
|
|
|
37
54
|
href={href}
|
|
38
55
|
className={cx(css.anchor, anchorClassName)}
|
|
39
56
|
as={Component}
|
|
57
|
+
aria-controls={state.open ? hovercardProps.id : ''}
|
|
40
58
|
>
|
|
41
59
|
{label}
|
|
42
60
|
</HovercardAnchor>
|
|
@@ -52,29 +70,3 @@ export const HoverCard = (props) => {
|
|
|
52
70
|
</div>
|
|
53
71
|
);
|
|
54
72
|
};
|
|
55
|
-
|
|
56
|
-
HoverCard.propTypes = {
|
|
57
|
-
/** Adopted child class name */
|
|
58
|
-
className: PropTypes.string,
|
|
59
|
-
/** Adopted child class name for hover card */
|
|
60
|
-
hoverCardClassName: PropTypes.string,
|
|
61
|
-
/** Adopted child class name for anchor */
|
|
62
|
-
anchorClassName: PropTypes.string,
|
|
63
|
-
/** Anchor label */
|
|
64
|
-
label: PropTypes.node,
|
|
65
|
-
/** Anchor href */
|
|
66
|
-
href: PropTypes.string,
|
|
67
|
-
/** Anchor component */
|
|
68
|
-
as: PropTypes.elementType,
|
|
69
|
-
/** Hover card component */
|
|
70
|
-
children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
HoverCard.defaultProps = {
|
|
74
|
-
className: '',
|
|
75
|
-
hoverCardClassName: '',
|
|
76
|
-
anchorClassName: '',
|
|
77
|
-
label: '',
|
|
78
|
-
as: '',
|
|
79
|
-
href: '',
|
|
80
|
-
};
|
package/src/ui/icon/icon.jsx
CHANGED
|
@@ -11,9 +11,13 @@ const ICONS = {
|
|
|
11
11
|
CLOSE: 'close',
|
|
12
12
|
CLOCK: 'clock',
|
|
13
13
|
COMMIT: 'commit',
|
|
14
|
+
ERROR: 'error',
|
|
15
|
+
EXTERNAL_LINK: 'external-link',
|
|
14
16
|
FILTER: 'filter',
|
|
17
|
+
INFO: 'info',
|
|
15
18
|
HELP: 'help',
|
|
16
19
|
MENU: 'menu',
|
|
20
|
+
MORE_VERTICAL: 'more-vertical',
|
|
17
21
|
SORT: 'sort',
|
|
18
22
|
WARNING: 'warning',
|
|
19
23
|
};
|
package/src/ui/index.js
CHANGED
|
@@ -9,7 +9,6 @@ export { HoverCard } from './hover-card';
|
|
|
9
9
|
export { Icon } from './icon';
|
|
10
10
|
export { Input } from './input';
|
|
11
11
|
export { Loader } from './loader';
|
|
12
|
-
export { Panels } from './panels';
|
|
13
12
|
export { Skeleton } from './skeleton';
|
|
14
13
|
export { SortDropdown } from './sort-dropdown';
|
|
15
14
|
export { Table } from './table';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.root {
|
|
2
|
-
border: 1px solid var(--color-outline)
|
|
3
|
-
border-radius:
|
|
2
|
+
border: 1px solid var(--color-outline);
|
|
3
|
+
border-radius: var(--radius-small);
|
|
4
4
|
color: var(--color-text-light);
|
|
5
5
|
width: 100%;
|
|
6
6
|
transition: var(--transition-in);
|
|
@@ -25,8 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
.root:focus {
|
|
28
|
-
|
|
29
|
-
box-shadow: var(--shadow-layer);
|
|
28
|
+
box-shadow: var(--outline-hover);
|
|
30
29
|
color: inherit;
|
|
31
30
|
transition: var(--transition-out);
|
|
32
31
|
}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { getWrapperDecorator } from '../../stories';
|
|
4
|
+
import { Table } from '.';
|
|
5
|
+
|
|
6
|
+
const { THead, TBody, Td, Tr, Th } = Table;
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
title: 'UI/Table',
|
|
10
|
+
component: Table,
|
|
11
|
+
decorators: [getWrapperDecorator()],
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const Default = () => (
|
|
15
|
+
<Table>
|
|
16
|
+
<TBody>
|
|
17
|
+
<Tr>
|
|
18
|
+
<Td>a1</Td>
|
|
19
|
+
<Td>b1</Td>
|
|
20
|
+
<Td>c1</Td>
|
|
21
|
+
</Tr>
|
|
22
|
+
<Tr>
|
|
23
|
+
<Td>a2</Td>
|
|
24
|
+
<Td>b2</Td>
|
|
25
|
+
<Td>c2</Td>
|
|
26
|
+
</Tr>
|
|
27
|
+
<Tr>
|
|
28
|
+
<Td>a3</Td>
|
|
29
|
+
<Td>b3</Td>
|
|
30
|
+
<Td>c3</Td>
|
|
31
|
+
</Tr>
|
|
32
|
+
</TBody>
|
|
33
|
+
</Table>
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
export const Compact = () => (
|
|
37
|
+
<Table compact>
|
|
38
|
+
<TBody>
|
|
39
|
+
<Tr>
|
|
40
|
+
<Td>a1</Td>
|
|
41
|
+
<Td>b1</Td>
|
|
42
|
+
<Td>c1</Td>
|
|
43
|
+
</Tr>
|
|
44
|
+
<Tr>
|
|
45
|
+
<Td>a2</Td>
|
|
46
|
+
<Td>b2</Td>
|
|
47
|
+
<Td>c2</Td>
|
|
48
|
+
</Tr>
|
|
49
|
+
<Tr>
|
|
50
|
+
<Td>a3</Td>
|
|
51
|
+
<Td>b3</Td>
|
|
52
|
+
<Td>c3</Td>
|
|
53
|
+
</Tr>
|
|
54
|
+
</TBody>
|
|
55
|
+
</Table>
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
export const Outline = () => (
|
|
59
|
+
<Table outline>
|
|
60
|
+
<TBody>
|
|
61
|
+
<Tr>
|
|
62
|
+
<Td>a1</Td>
|
|
63
|
+
<Td>b1</Td>
|
|
64
|
+
<Td>c1</Td>
|
|
65
|
+
</Tr>
|
|
66
|
+
<Tr>
|
|
67
|
+
<Td>a2</Td>
|
|
68
|
+
<Td>b2</Td>
|
|
69
|
+
<Td>c2</Td>
|
|
70
|
+
</Tr>
|
|
71
|
+
<Tr>
|
|
72
|
+
<Td>a3</Td>
|
|
73
|
+
<Td>b3</Td>
|
|
74
|
+
<Td>c3</Td>
|
|
75
|
+
</Tr>
|
|
76
|
+
</TBody>
|
|
77
|
+
</Table>
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
export const Empty = () => <Table />;
|
|
81
|
+
export const EmptyWithCustomElement = () => (
|
|
82
|
+
<Table emptyMessage={<p style={{ outline: '1px solid lightgray' }}>No items available</p>} />
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
export const WithHeaders = () => (
|
|
86
|
+
<Table>
|
|
87
|
+
<THead>
|
|
88
|
+
<Tr>
|
|
89
|
+
<Th>Col A</Th>
|
|
90
|
+
<Th>Col B</Th>
|
|
91
|
+
<Th>Col C</Th>
|
|
92
|
+
</Tr>
|
|
93
|
+
</THead>
|
|
94
|
+
<TBody>
|
|
95
|
+
<Tr>
|
|
96
|
+
<Td>a1</Td>
|
|
97
|
+
<Td>b1</Td>
|
|
98
|
+
<Td>c1</Td>
|
|
99
|
+
</Tr>
|
|
100
|
+
<Tr>
|
|
101
|
+
<Td>a2</Td>
|
|
102
|
+
<Td>b2</Td>
|
|
103
|
+
<Td>c2</Td>
|
|
104
|
+
</Tr>
|
|
105
|
+
<Tr>
|
|
106
|
+
<Td>a3</Td>
|
|
107
|
+
<Td>b3</Td>
|
|
108
|
+
<Td>c3</Td>
|
|
109
|
+
</Tr>
|
|
110
|
+
</TBody>
|
|
111
|
+
</Table>
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
export const WithHeadersAndOutline = () => (
|
|
115
|
+
<Table outline>
|
|
116
|
+
<THead>
|
|
117
|
+
<Tr>
|
|
118
|
+
<Th>Col A</Th>
|
|
119
|
+
<Th>Col B</Th>
|
|
120
|
+
<Th>Col C</Th>
|
|
121
|
+
</Tr>
|
|
122
|
+
</THead>
|
|
123
|
+
<TBody>
|
|
124
|
+
<Tr>
|
|
125
|
+
<Td>a1</Td>
|
|
126
|
+
<Td>b1</Td>
|
|
127
|
+
<Td>c1</Td>
|
|
128
|
+
</Tr>
|
|
129
|
+
<Tr>
|
|
130
|
+
<Td>a2</Td>
|
|
131
|
+
<Td>b2</Td>
|
|
132
|
+
<Td>c2</Td>
|
|
133
|
+
</Tr>
|
|
134
|
+
<Tr>
|
|
135
|
+
<Td>a3</Td>
|
|
136
|
+
<Td>b3</Td>
|
|
137
|
+
<Td>c3</Td>
|
|
138
|
+
</Tr>
|
|
139
|
+
</TBody>
|
|
140
|
+
</Table>
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
export const WithMultipleRowsHeader = () => (
|
|
144
|
+
<Table>
|
|
145
|
+
<THead>
|
|
146
|
+
<Tr>
|
|
147
|
+
<Th> </Th>
|
|
148
|
+
<Th colSpan={2}>Colspan</Th>
|
|
149
|
+
</Tr>
|
|
150
|
+
<Tr>
|
|
151
|
+
<Th>Col A</Th>
|
|
152
|
+
<Th>Col B</Th>
|
|
153
|
+
<Th>Col C</Th>
|
|
154
|
+
</Tr>
|
|
155
|
+
</THead>
|
|
156
|
+
<TBody>
|
|
157
|
+
<Tr>
|
|
158
|
+
<Td>a1</Td>
|
|
159
|
+
<Td>b1</Td>
|
|
160
|
+
<Td>c1</Td>
|
|
161
|
+
</Tr>
|
|
162
|
+
<Tr>
|
|
163
|
+
<Td>a2</Td>
|
|
164
|
+
<Td>b2</Td>
|
|
165
|
+
<Td>c2</Td>
|
|
166
|
+
</Tr>
|
|
167
|
+
<Tr>
|
|
168
|
+
<Td>a3</Td>
|
|
169
|
+
<Td>b3</Td>
|
|
170
|
+
<Td>c3</Td>
|
|
171
|
+
</Tr>
|
|
172
|
+
</TBody>
|
|
173
|
+
</Table>
|
|
174
|
+
);
|
|
175
|
+
|
|
176
|
+
export const WithRowHeaders = () => (
|
|
177
|
+
<Table>
|
|
178
|
+
<TBody>
|
|
179
|
+
<Tr>
|
|
180
|
+
<Th>row 1</Th>
|
|
181
|
+
<Td>a1</Td>
|
|
182
|
+
<Td>b1</Td>
|
|
183
|
+
<Td>c1</Td>
|
|
184
|
+
</Tr>
|
|
185
|
+
<Tr>
|
|
186
|
+
<Th>row 2</Th>
|
|
187
|
+
<Td>a2</Td>
|
|
188
|
+
<Td>b2</Td>
|
|
189
|
+
<Td>c2</Td>
|
|
190
|
+
</Tr>
|
|
191
|
+
<Tr>
|
|
192
|
+
<Th>row 3</Th>
|
|
193
|
+
<Td>a3</Td>
|
|
194
|
+
<Td>b3</Td>
|
|
195
|
+
<Td>c3</Td>
|
|
196
|
+
</Tr>
|
|
197
|
+
</TBody>
|
|
198
|
+
</Table>
|
|
199
|
+
);
|
|
200
|
+
|
|
201
|
+
export const WithCustomContentAndAttributes = () => (
|
|
202
|
+
<Table>
|
|
203
|
+
<THead>
|
|
204
|
+
<Tr>
|
|
205
|
+
<Th> </Th>
|
|
206
|
+
<Th style={{ textAlign: 'right' }}>Col A (right)</Th>
|
|
207
|
+
<Th style={{ textAlign: 'center' }}>Col B (center)</Th>
|
|
208
|
+
<Th style={{ textDecoration: 'underline' }}>Col C(underline)</Th>
|
|
209
|
+
</Tr>
|
|
210
|
+
</THead>
|
|
211
|
+
<TBody>
|
|
212
|
+
<Tr>
|
|
213
|
+
<Th>
|
|
214
|
+
<strong>row 1</strong>
|
|
215
|
+
</Th>
|
|
216
|
+
<Td style={{ textAlign: 'right' }}>a1</Td>
|
|
217
|
+
<Td style={{ textAlign: 'center', color: 'red' }}>b1</Td>
|
|
218
|
+
<Td style={{ textDecoration: 'underline' }}>c1</Td>
|
|
219
|
+
</Tr>
|
|
220
|
+
<Tr style={{ color: 'blue', fontSize: '1.5em' }}>
|
|
221
|
+
<Th>
|
|
222
|
+
<strong>row 2</strong>
|
|
223
|
+
</Th>
|
|
224
|
+
<Td style={{ textAlign: 'right' }}>a2</Td>
|
|
225
|
+
<Td style={{ textAlign: 'center' }}>b2</Td>
|
|
226
|
+
<Td style={{ textDecoration: 'underline' }}>c2</Td>
|
|
227
|
+
</Tr>
|
|
228
|
+
<Tr>
|
|
229
|
+
<Th>
|
|
230
|
+
<strong>row 3</strong>
|
|
231
|
+
</Th>
|
|
232
|
+
<Td style={{ textAlign: 'right' }}>a3</Td>
|
|
233
|
+
<Td style={{ textAlign: 'center' }}>b3</Td>
|
|
234
|
+
<Td style={{ textDecoration: 'underline' }}>c3</Td>
|
|
235
|
+
</Tr>
|
|
236
|
+
</TBody>
|
|
237
|
+
</Table>
|
|
238
|
+
);
|