@balena/ui-shared-components 5.3.0 → 5.4.0-build-circularprogresswithlabel-50aae600415e3d33d4a154ccdf4354d5e48ec815-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.
@@ -0,0 +1,5 @@
1
+ import { CircularProgressProps } from '@mui/material/CircularProgress';
2
+ export interface CircularProgressWithLabelProps extends CircularProgressProps {
3
+ value: number;
4
+ }
5
+ export declare const CircularProgressWithLabel: (props: CircularProgressWithLabelProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import CircularProgress from '@mui/material/CircularProgress';
3
+ import Typography from '@mui/material/Typography';
4
+ import Box from '@mui/material/Box';
5
+ // From: https://mui.com/material-ui/react-progress/#circular-with-label
6
+ export const CircularProgressWithLabel = (props) => {
7
+ return (_jsxs(Box, Object.assign({ sx: { position: 'relative', display: 'inline-flex' } }, { children: [_jsx(CircularProgress, Object.assign({ variant: "determinate" }, props)), _jsx(Box, Object.assign({ sx: {
8
+ top: 0,
9
+ left: 0,
10
+ bottom: 0,
11
+ right: 0,
12
+ position: 'absolute',
13
+ display: 'flex',
14
+ alignItems: 'center',
15
+ justifyContent: 'center',
16
+ } }, { children: _jsx(Typography, Object.assign({ variant: "caption", component: "div", color: "text.secondary" }, { children: `${Math.round(props.value)}%` })) }))] })));
17
+ };
package/dist/index.d.ts CHANGED
@@ -36,6 +36,8 @@ export { RouterLinkWithTracking } from './components/RouterLinkWithTracking';
36
36
  export { SnackbarProviderBase as SnackbarProvider } from './components/SnackbarProvider';
37
37
  export type { SpinnerProps } from './components/Spinner';
38
38
  export { Spinner } from './components/Spinner';
39
+ export type { CircularProgressWithLabelProps } from './components/CircularProgressWithLabel';
40
+ export { CircularProgressWithLabel } from './components/CircularProgressWithLabel';
39
41
  export { SurroundingOverlay } from './components/SurroundingOverlay';
40
42
  export type { SurroundingOverlayProps } from './components/SurroundingOverlay';
41
43
  export type { TooltipProps } from './components/Tooltip';
package/dist/index.js CHANGED
@@ -16,6 +16,7 @@ export { OrderedListItem } from './components/OrderedListItem';
16
16
  export { RouterLinkWithTracking } from './components/RouterLinkWithTracking';
17
17
  export { SnackbarProviderBase as SnackbarProvider } from './components/SnackbarProvider';
18
18
  export { Spinner } from './components/Spinner';
19
+ export { CircularProgressWithLabel } from './components/CircularProgressWithLabel';
19
20
  export { SurroundingOverlay } from './components/SurroundingOverlay';
20
21
  export { Tooltip } from './components/Tooltip';
21
22
  export { Tabs } from './components/Tabs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@balena/ui-shared-components",
3
- "version": "5.3.0",
3
+ "version": "5.4.0-build-circularprogresswithlabel-50aae600415e3d33d4a154ccdf4354d5e48ec815-1",
4
4
  "main": "./dist/index.js",
5
5
  "sideEffects": false,
6
6
  "files": [
@@ -110,6 +110,6 @@
110
110
  },
111
111
  "homepage": "https://github.com/balena-io/ui-shared-components#readme",
112
112
  "versionist": {
113
- "publishedAt": "2024-04-16T15:22:54.356Z"
113
+ "publishedAt": "2024-04-16T17:25:10.373Z"
114
114
  }
115
115
  }