@availity/mui-progress 0.3.0 → 0.4.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,25 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.4.0](https://github.com/Availity/element/compare/@availity/mui-progress@0.3.1...@availity/mui-progress@0.4.0) (2024-10-31)
6
+
7
+ ### Dependency Updates
8
+
9
+ * `mui-icon` updated to version `0.3.1`
10
+ * `mui-typography` updated to version `0.3.1`
11
+ * `mui-layout` updated to version `0.3.1`
12
+
13
+ ### Features
14
+
15
+ * add FileSelector ([7ad1f7b](https://github.com/Availity/element/commit/7ad1f7bb364bbeb2048d2ff4c9b0a2b1a1e33777))
16
+
17
+ ## [0.3.1](https://github.com/Availity/element/compare/@availity/mui-progress@0.3.0...@availity/mui-progress@0.3.1) (2024-09-09)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * resolve accessibility issues in stories ([7e22419](https://github.com/Availity/element/commit/7e2241913f8ad10f467493b605fc0234e6eab5e2))
23
+
5
24
  ## [0.3.0](https://github.com/Availity/element/compare/@availity/mui-progress@0.2.2...@availity/mui-progress@0.3.0) (2024-09-03)
6
25
 
7
26
 
package/dist/index.d.mts CHANGED
@@ -1,4 +1,6 @@
1
1
  import { CircularProgressProps as CircularProgressProps$1 } from '@mui/material/CircularProgress';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
+ import { LinearProgressProps as LinearProgressProps$1 } from '@mui/material/LinearProgress';
2
4
 
3
5
  interface CircularProgressProps extends Omit<CircularProgressProps$1, 'disableShrink' | 'thickness' | 'variant'> {
4
6
  /**@default 'primary' */
@@ -26,4 +28,7 @@ type StatusIconProps = {
26
28
  };
27
29
  declare const CircularProgress: ({ loadingCaption, error, success, size, ...props }: CircularProgressProps) => JSX.Element;
28
30
 
29
- export { CircularProgress, type CircularProgressProps, type StatusIconProps };
31
+ type LinearProgressProps = Omit<LinearProgressProps$1, 'color'>;
32
+ declare const LinearProgress: ({ variant, value, sx, ...props }: LinearProgressProps) => react_jsx_runtime.JSX.Element;
33
+
34
+ export { CircularProgress, type CircularProgressProps, LinearProgress, type LinearProgressProps, type StatusIconProps };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  import { CircularProgressProps as CircularProgressProps$1 } from '@mui/material/CircularProgress';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
+ import { LinearProgressProps as LinearProgressProps$1 } from '@mui/material/LinearProgress';
2
4
 
3
5
  interface CircularProgressProps extends Omit<CircularProgressProps$1, 'disableShrink' | 'thickness' | 'variant'> {
4
6
  /**@default 'primary' */
@@ -26,4 +28,7 @@ type StatusIconProps = {
26
28
  };
27
29
  declare const CircularProgress: ({ loadingCaption, error, success, size, ...props }: CircularProgressProps) => JSX.Element;
28
30
 
29
- export { CircularProgress, type CircularProgressProps, type StatusIconProps };
31
+ type LinearProgressProps = Omit<LinearProgressProps$1, 'color'>;
32
+ declare const LinearProgress: ({ variant, value, sx, ...props }: LinearProgressProps) => react_jsx_runtime.JSX.Element;
33
+
34
+ export { CircularProgress, type CircularProgressProps, LinearProgress, type LinearProgressProps, type StatusIconProps };
package/dist/index.js CHANGED
@@ -59,7 +59,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
59
59
  // src/index.ts
60
60
  var src_exports = {};
61
61
  __export(src_exports, {
62
- CircularProgress: () => CircularProgress
62
+ CircularProgress: () => CircularProgress,
63
+ LinearProgress: () => LinearProgress
63
64
  });
64
65
  module.exports = __toCommonJS(src_exports);
65
66
 
@@ -121,7 +122,48 @@ var CircularProgress = (_a) => {
121
122
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_typography.Typography, { marginTop: "8px", variant: "caption", children: loadingCaption || error || success ? getCaptionText(status) : null })
122
123
  ] });
123
124
  };
125
+
126
+ // src/lib/LinearProgress.tsx
127
+ var import_mui_icon2 = require("@availity/mui-icon");
128
+
129
+ // ../layout/src/lib/Box.tsx
130
+ var import_react2 = require("react");
131
+ var import_Box = __toESM(require("@mui/material/Box"));
132
+ var import_jsx_runtime2 = require("react/jsx-runtime");
133
+ var Box = (0, import_react2.forwardRef)((props, ref) => {
134
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_Box.default, __spreadProps(__spreadValues({}, props), { ref }));
135
+ });
136
+
137
+ // ../layout/src/lib/Container.tsx
138
+ var import_Container = __toESM(require("@mui/material/Container"));
139
+ var import_jsx_runtime3 = require("react/jsx-runtime");
140
+
141
+ // ../layout/src/lib/Grid.tsx
142
+ var import_Unstable_Grid2 = __toESM(require("@mui/material/Unstable_Grid2"));
143
+ var import_jsx_runtime4 = require("react/jsx-runtime");
144
+
145
+ // ../layout/src/lib/Stack.tsx
146
+ var import_Stack2 = __toESM(require("@mui/material/Stack"));
147
+ var import_jsx_runtime5 = require("react/jsx-runtime");
148
+ var Stack2 = (_a) => {
149
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
150
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_Stack2.default, __spreadProps(__spreadValues({}, rest), { children }));
151
+ };
152
+
153
+ // src/lib/LinearProgress.tsx
154
+ var import_mui_typography2 = require("@availity/mui-typography");
155
+ var import_LinearProgress = __toESM(require("@mui/material/LinearProgress"));
156
+ var import_jsx_runtime6 = require("react/jsx-runtime");
157
+ var LinearProgress = (_a) => {
158
+ var _b = _a, { variant = "determinate", value = 0, sx } = _b, props = __objRest(_b, ["variant", "value", "sx"]);
159
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Stack2, { direction: "row", alignItems: "center", children: [
160
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box, { sx: { width: "100%", mr: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_LinearProgress.default, __spreadProps(__spreadValues({ variant }, props), { value, color: "success", sx: __spreadValues({ width: "100%" }, sx) })) }),
161
+ value === 100 && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_mui_icon2.SuccessCircleIcon, { color: "success", "data-icon": "complete" }),
162
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_mui_typography2.Typography, { variant: "body2", sx: { color: "text.secondary", ml: 1 }, children: `${Math.round(value)}%` })
163
+ ] });
164
+ };
124
165
  // Annotate the CommonJS export names for ESM import in node:
125
166
  0 && (module.exports = {
126
- CircularProgress
167
+ CircularProgress,
168
+ LinearProgress
127
169
  });
package/dist/index.mjs CHANGED
@@ -90,6 +90,47 @@ var CircularProgress = (_a) => {
90
90
  /* @__PURE__ */ jsx(Typography, { marginTop: "8px", variant: "caption", children: loadingCaption || error || success ? getCaptionText(status) : null })
91
91
  ] });
92
92
  };
93
+
94
+ // src/lib/LinearProgress.tsx
95
+ import { SuccessCircleIcon as SuccessCircleIcon2 } from "@availity/mui-icon";
96
+
97
+ // ../layout/src/lib/Box.tsx
98
+ import { forwardRef } from "react";
99
+ import MuiBox from "@mui/material/Box";
100
+ import { jsx as jsx2 } from "react/jsx-runtime";
101
+ var Box = forwardRef((props, ref) => {
102
+ return /* @__PURE__ */ jsx2(MuiBox, __spreadProps(__spreadValues({}, props), { ref }));
103
+ });
104
+
105
+ // ../layout/src/lib/Container.tsx
106
+ import MuiContainer from "@mui/material/Container";
107
+ import { jsx as jsx3 } from "react/jsx-runtime";
108
+
109
+ // ../layout/src/lib/Grid.tsx
110
+ import MuiGrid2 from "@mui/material/Unstable_Grid2";
111
+ import { jsx as jsx4 } from "react/jsx-runtime";
112
+
113
+ // ../layout/src/lib/Stack.tsx
114
+ import MuiStack from "@mui/material/Stack";
115
+ import { jsx as jsx5 } from "react/jsx-runtime";
116
+ var Stack2 = (_a) => {
117
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
118
+ return /* @__PURE__ */ jsx5(MuiStack, __spreadProps(__spreadValues({}, rest), { children }));
119
+ };
120
+
121
+ // src/lib/LinearProgress.tsx
122
+ import { Typography as Typography2 } from "@availity/mui-typography";
123
+ import MuiLinearProgress from "@mui/material/LinearProgress";
124
+ import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
125
+ var LinearProgress = (_a) => {
126
+ var _b = _a, { variant = "determinate", value = 0, sx } = _b, props = __objRest(_b, ["variant", "value", "sx"]);
127
+ return /* @__PURE__ */ jsxs2(Stack2, { direction: "row", alignItems: "center", children: [
128
+ /* @__PURE__ */ jsx6(Box, { sx: { width: "100%", mr: 0.5 }, children: /* @__PURE__ */ jsx6(MuiLinearProgress, __spreadProps(__spreadValues({ variant }, props), { value, color: "success", sx: __spreadValues({ width: "100%" }, sx) })) }),
129
+ value === 100 && /* @__PURE__ */ jsx6(SuccessCircleIcon2, { color: "success", "data-icon": "complete" }),
130
+ /* @__PURE__ */ jsx6(Typography2, { variant: "body2", sx: { color: "text.secondary", ml: 1 }, children: `${Math.round(value)}%` })
131
+ ] });
132
+ };
93
133
  export {
94
- CircularProgress
134
+ CircularProgress,
135
+ LinearProgress
95
136
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@availity/mui-progress",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Availity MUI Progress Component - part of the @availity/element design system",
5
5
  "keywords": [
6
6
  "react",
@@ -46,7 +46,7 @@
46
46
  "access": "public"
47
47
  },
48
48
  "dependencies": {
49
- "@availity/mui-icon": "^0.10.1",
50
- "@availity/mui-typography": "^0.2.0"
49
+ "@availity/mui-icon": "^0.11.0",
50
+ "@availity/mui-typography": "^0.2.1"
51
51
  }
52
52
  }
package/src/index.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from './lib/CircularProgress';
2
+ export * from './lib/LinearProgress';
@@ -13,5 +13,6 @@ export const _LinearProgress: StoryObj<typeof LinearProgress> = {
13
13
  render: (args: LinearProgressProps) => <LinearProgress {...args} />,
14
14
  args: {
15
15
  value: 50,
16
+ 'aria-label': 'example-progress-bar',
16
17
  },
17
18
  };