@availity/mui-feedback 0.4.0 → 1.0.0-alpha.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,31 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [1.0.0-alpha.0](https://github.com/Availity/element/compare/@availity/mui-feedback@0.4.1...@availity/mui-feedback@1.0.0-alpha.0) (2025-02-24)
6
+
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ * upgraded to @mui/material v6
11
+ * **element:** upgraded to @mui/material v6
12
+
13
+ ### Features
14
+
15
+ * **element:** upgrade to @mui/material v6 ([cb958bb](https://github.com/Availity/element/commit/cb958bba99a4f1ee6dab323f0ff54b69e6fd3493))
16
+ * upgrade @mui/material ([571453a](https://github.com/Availity/element/commit/571453a34b21c344594ab4c03bc497d19aba942b))
17
+ * upgrade to MUI v6 ([7febd6f](https://github.com/Availity/element/commit/7febd6fd4fd58e87e1c97a832cea3b4595a35d58))
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **mui-feedback:** cleanup FormButton styling ([2245012](https://github.com/Availity/element/commit/224501284abf5d5120ce14a34bd11e608af5ad62))
23
+
24
+ ## [0.4.1](https://github.com/Availity/element/compare/@availity/mui-feedback@0.4.0...@availity/mui-feedback@0.4.1) (2025-02-18)
25
+
26
+ ### Dependency Updates
27
+
28
+ * `mui-form-utils` updated to version `0.4.0`
29
+ * `mui-textfield` updated to version `0.4.0`
5
30
  ## [0.4.0](https://github.com/Availity/element/compare/@availity/mui-feedback@0.3.8...@availity/mui-feedback@0.4.0) (2025-02-04)
6
31
 
7
32
  ### Dependency Updates
package/dist/index.js CHANGED
@@ -77,11 +77,11 @@ var __async = (__this, __arguments, generator) => {
77
77
  };
78
78
 
79
79
  // src/index.ts
80
- var src_exports = {};
81
- __export(src_exports, {
80
+ var index_exports = {};
81
+ __export(index_exports, {
82
82
  Feedback: () => Feedback
83
83
  });
84
- module.exports = __toCommonJS(src_exports);
84
+ module.exports = __toCommonJS(index_exports);
85
85
 
86
86
  // src/lib/Feedback.tsx
87
87
  var import_react2 = require("react");
@@ -96,7 +96,7 @@ var import_react = require("react");
96
96
  var import_mui_textfield = require("@availity/mui-textfield");
97
97
  var import_mui_button = require("@availity/mui-button");
98
98
  var import_mui_toggle_button = require("@availity/mui-toggle-button");
99
- var import_Grid = __toESM(require("@mui/material/Grid"));
99
+ var import_mui_layout = require("@availity/mui-layout");
100
100
  var import_styles = require("@mui/material/styles");
101
101
  var import_mui_icon = require("@availity/mui-icon");
102
102
  var import_mui_form_utils = require("@availity/mui-form-utils");
@@ -104,7 +104,7 @@ var import_api_axios = require("@availity/api-axios");
104
104
  var import_react_hook_form = require("react-hook-form");
105
105
  var import_jsx_runtime = require("react/jsx-runtime");
106
106
  var SmileButtons = (0, import_styles.styled)(import_mui_toggle_button.ToggleButtonGroup, { name: "AvFeedbackContainer", slot: "SmileButtons" })({});
107
- var FormActions = (0, import_styles.styled)(import_Grid.default, { name: "AvFeedbackContainer", slot: "FormActions" })({});
107
+ var FormActions = (0, import_styles.styled)(import_mui_layout.Grid, { name: "AvFeedbackContainer", slot: "FormActions" })({});
108
108
  var SmileButton = (_a) => {
109
109
  var _b = _a, { disabled, Icon, label, value } = _b, props = __objRest(_b, ["disabled", "Icon", "label", "value"]);
110
110
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -188,11 +188,11 @@ var FeedbackForm = ({
188
188
  };
189
189
  if (!sent) {
190
190
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
191
- import_Grid.default,
191
+ import_mui_layout.Grid,
192
192
  {
193
193
  component: "form",
194
194
  container: true,
195
- justifyContent: "center",
195
+ sx: { justifyContent: "center" },
196
196
  onSubmit: handleSubmit(onSubmit),
197
197
  "aria-label": "Feedback Form",
198
198
  "aria-describedby": "feedback-form-header",
@@ -230,29 +230,19 @@ var FeedbackForm = ({
230
230
  minRows: 3,
231
231
  maxRows: 3,
232
232
  label: getFeedbackLabel(),
233
- inputProps: { "aria-required": "true" },
234
233
  InputLabelProps: {
235
234
  component: import_mui_form_utils.FormLabel,
236
235
  required: true
237
236
  },
237
+ inputProps: { "aria-required": "true" },
238
238
  helperText: ((_c = errors.feedback) == null ? void 0 : _c.message) || "Max 200 characters",
239
239
  error: !!errors.feedback,
240
240
  disabled: loading || !smileFieldValue
241
241
  })
242
242
  ),
243
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(FormActions, { container: true, direction: "row", children: [
244
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Grid.default, { item: true, flex: 1, minWidth: "147px", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_button.Button, { color: "secondary", disabled: loading, onClick: handleClose, children: "Close" }) }),
245
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Grid.default, { item: true, flex: 1, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
246
- import_mui_button.LoadingButton,
247
- {
248
- disabled: !smileFieldValue,
249
- loading,
250
- type: "submit",
251
- variant: "contained",
252
- sx: { paddingLeft: 0, paddingRight: 0 },
253
- children: "Send Feedback"
254
- }
255
- ) })
243
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(FormActions, { container: true, direction: "row", width: "100%", spacing: 1, wrap: "wrap", children: [
244
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_layout.Grid, { sx: { flex: 1, minWidth: "147px" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_button.Button, { color: "secondary", disabled: loading, onClick: handleClose, children: "Close" }) }),
245
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_layout.Grid, { sx: { flex: 1, minWidth: "147px" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_button.LoadingButton, { disabled: !smileFieldValue, loading, type: "submit", variant: "contained", children: "Send Feedback" }) })
256
246
  ] })
257
247
  ]
258
248
  }
@@ -266,10 +256,10 @@ var FeedbackForm = ({
266
256
  var import_mui_button2 = require("@availity/mui-button");
267
257
  var import_mui_icon2 = require("@availity/mui-icon");
268
258
  var import_mui_typography = require("@availity/mui-typography");
269
- var import_Grid2 = __toESM(require("@mui/material/Grid"));
259
+ var import_mui_layout2 = require("@availity/mui-layout");
270
260
  var import_styles2 = require("@mui/material/styles");
271
261
  var import_jsx_runtime2 = require("react/jsx-runtime");
272
- var FeedbackHeaderContainer = (0, import_styles2.styled)(import_Grid2.default, { name: "AvFeedbackContainer", slot: "FeedbackHeaderContainer" })({});
262
+ var FeedbackHeaderContainer = (0, import_styles2.styled)(import_mui_layout2.Grid, { name: "AvFeedbackContainer", slot: "FeedbackHeaderContainer" })({});
273
263
  var FeedbackHeader = ({ appName, handleClose, loading, sent }) => {
274
264
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
275
265
  FeedbackHeaderContainer,
@@ -281,8 +271,8 @@ var FeedbackHeader = ({ appName, handleClose, loading, sent }) => {
281
271
  flexWrap: "nowrap",
282
272
  id: "feedback-form-header",
283
273
  children: [
284
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_Grid2.default, { item: true, whiteSpace: "normal", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_mui_typography.Typography, { component: "h2", variant: "h5", children: sent ? "Thank you for your feedback." : `Tell us what you think about ${appName}` }) }),
285
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_Grid2.default, { item: true, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_mui_button2.IconButton, { disabled: loading, title: "Close", onClick: handleClose, size: "medium", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_mui_icon2.CloseIcon, { fontSize: "xsmall" }) }) })
274
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_mui_layout2.Grid, { sx: { whiteSpace: "normal" }, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_mui_typography.Typography, { component: "h2", variant: "h5", children: sent ? "Thank you for your feedback." : `Tell us what you think about ${appName}` }) }),
275
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_mui_layout2.Grid, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_mui_button2.IconButton, { disabled: loading, title: "Close", onClick: handleClose, size: "medium", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_mui_icon2.CloseIcon, { fontSize: "xsmall" }) }) })
286
276
  ]
287
277
  }
288
278
  );
package/dist/index.mjs CHANGED
@@ -63,7 +63,7 @@ import { useEffect } from "react";
63
63
  import { TextField } from "@availity/mui-textfield";
64
64
  import { LoadingButton, Button, IconButton } from "@availity/mui-button";
65
65
  import { ToggleButtonGroup, ToggleButton } from "@availity/mui-toggle-button";
66
- import Grid from "@mui/material/Grid";
66
+ import { Grid } from "@availity/mui-layout";
67
67
  import { styled } from "@mui/material/styles";
68
68
  import { FaceFrownIcon, FaceNeutralIcon, FaceSmileIcon } from "@availity/mui-icon";
69
69
  import { FormLabel } from "@availity/mui-form-utils";
@@ -159,7 +159,7 @@ var FeedbackForm = ({
159
159
  {
160
160
  component: "form",
161
161
  container: true,
162
- justifyContent: "center",
162
+ sx: { justifyContent: "center" },
163
163
  onSubmit: handleSubmit(onSubmit),
164
164
  "aria-label": "Feedback Form",
165
165
  "aria-describedby": "feedback-form-header",
@@ -197,29 +197,19 @@ var FeedbackForm = ({
197
197
  minRows: 3,
198
198
  maxRows: 3,
199
199
  label: getFeedbackLabel(),
200
- inputProps: { "aria-required": "true" },
201
200
  InputLabelProps: {
202
201
  component: FormLabel,
203
202
  required: true
204
203
  },
204
+ inputProps: { "aria-required": "true" },
205
205
  helperText: ((_c = errors.feedback) == null ? void 0 : _c.message) || "Max 200 characters",
206
206
  error: !!errors.feedback,
207
207
  disabled: loading || !smileFieldValue
208
208
  })
209
209
  ),
210
- /* @__PURE__ */ jsxs(FormActions, { container: true, direction: "row", children: [
211
- /* @__PURE__ */ jsx(Grid, { item: true, flex: 1, minWidth: "147px", children: /* @__PURE__ */ jsx(Button, { color: "secondary", disabled: loading, onClick: handleClose, children: "Close" }) }),
212
- /* @__PURE__ */ jsx(Grid, { item: true, flex: 1, children: /* @__PURE__ */ jsx(
213
- LoadingButton,
214
- {
215
- disabled: !smileFieldValue,
216
- loading,
217
- type: "submit",
218
- variant: "contained",
219
- sx: { paddingLeft: 0, paddingRight: 0 },
220
- children: "Send Feedback"
221
- }
222
- ) })
210
+ /* @__PURE__ */ jsxs(FormActions, { container: true, direction: "row", width: "100%", spacing: 1, wrap: "wrap", children: [
211
+ /* @__PURE__ */ jsx(Grid, { sx: { flex: 1, minWidth: "147px" }, children: /* @__PURE__ */ jsx(Button, { color: "secondary", disabled: loading, onClick: handleClose, children: "Close" }) }),
212
+ /* @__PURE__ */ jsx(Grid, { sx: { flex: 1, minWidth: "147px" }, children: /* @__PURE__ */ jsx(LoadingButton, { disabled: !smileFieldValue, loading, type: "submit", variant: "contained", children: "Send Feedback" }) })
223
213
  ] })
224
214
  ]
225
215
  }
@@ -233,7 +223,7 @@ var FeedbackForm = ({
233
223
  import { IconButton as IconButton2 } from "@availity/mui-button";
234
224
  import { CloseIcon } from "@availity/mui-icon";
235
225
  import { Typography } from "@availity/mui-typography";
236
- import Grid2 from "@mui/material/Grid";
226
+ import { Grid as Grid2 } from "@availity/mui-layout";
237
227
  import { styled as styled2 } from "@mui/material/styles";
238
228
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
239
229
  var FeedbackHeaderContainer = styled2(Grid2, { name: "AvFeedbackContainer", slot: "FeedbackHeaderContainer" })({});
@@ -248,8 +238,8 @@ var FeedbackHeader = ({ appName, handleClose, loading, sent }) => {
248
238
  flexWrap: "nowrap",
249
239
  id: "feedback-form-header",
250
240
  children: [
251
- /* @__PURE__ */ jsx2(Grid2, { item: true, whiteSpace: "normal", children: /* @__PURE__ */ jsx2(Typography, { component: "h2", variant: "h5", children: sent ? "Thank you for your feedback." : `Tell us what you think about ${appName}` }) }),
252
- /* @__PURE__ */ jsx2(Grid2, { item: true, children: /* @__PURE__ */ jsx2(IconButton2, { disabled: loading, title: "Close", onClick: handleClose, size: "medium", children: /* @__PURE__ */ jsx2(CloseIcon, { fontSize: "xsmall" }) }) })
241
+ /* @__PURE__ */ jsx2(Grid2, { sx: { whiteSpace: "normal" }, children: /* @__PURE__ */ jsx2(Typography, { component: "h2", variant: "h5", children: sent ? "Thank you for your feedback." : `Tell us what you think about ${appName}` }) }),
242
+ /* @__PURE__ */ jsx2(Grid2, { children: /* @__PURE__ */ jsx2(IconButton2, { disabled: loading, title: "Close", onClick: handleClose, size: "medium", children: /* @__PURE__ */ jsx2(CloseIcon, { fontSize: "xsmall" }) }) })
253
243
  ]
254
244
  }
255
245
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@availity/mui-feedback",
3
- "version": "0.4.0",
3
+ "version": "1.0.0-alpha.0",
4
4
  "description": "Availity MUI Feedback Component - part of the @availity/element design system",
5
5
  "keywords": [
6
6
  "react",
@@ -40,28 +40,29 @@
40
40
  "publish:canary": "yarn npm publish --access public --tag canary"
41
41
  },
42
42
  "devDependencies": {
43
- "@mui/material": "^5.15.15",
43
+ "@mui/material": "^6.4.5",
44
44
  "react": "18.2.0",
45
45
  "react-dom": "18.2.0",
46
- "tsup": "^8.0.2",
46
+ "tsup": "^8.3.6",
47
47
  "typescript": "^5.4.5"
48
48
  },
49
49
  "peerDependencies": {
50
- "@mui/material": "^5.11.9",
50
+ "@mui/material": "^6.4.5",
51
51
  "react": ">=16.3.0"
52
52
  },
53
53
  "publishConfig": {
54
54
  "access": "public"
55
55
  },
56
56
  "dependencies": {
57
- "@availity/api-axios": "^9.0.6",
58
- "@availity/mui-button": "^0.7.0",
59
- "@availity/mui-form-utils": "^0.17.0",
60
- "@availity/mui-icon": "^0.14.0",
61
- "@availity/mui-popover": "^0.2.0",
62
- "@availity/mui-textfield": "^0.7.0",
63
- "@availity/mui-toggle-button": "^0.2.0",
64
- "@availity/mui-typography": "^0.3.0",
65
- "react-hook-form": "^7.51.3"
57
+ "@availity/api-axios": "^10.0.0",
58
+ "@availity/mui-button": "^1.0.0-alpha.0",
59
+ "@availity/mui-form-utils": "^1.0.0-alpha.0",
60
+ "@availity/mui-icon": "^1.0.0-alpha.0",
61
+ "@availity/mui-layout": "^1.0.0-alpha.0",
62
+ "@availity/mui-popover": "^1.0.0-alpha.0",
63
+ "@availity/mui-textfield": "^1.0.0-alpha.0",
64
+ "@availity/mui-toggle-button": "^1.0.0-alpha.0",
65
+ "@availity/mui-typography": "^1.0.0-alpha.0",
66
+ "react-hook-form": "^7.54.2"
66
67
  }
67
68
  }
@@ -2,7 +2,7 @@ import React, { useEffect } from 'react';
2
2
  import { TextField } from '@availity/mui-textfield';
3
3
  import { LoadingButton, Button, IconButton } from '@availity/mui-button';
4
4
  import { ToggleButtonGroup, ToggleButton } from '@availity/mui-toggle-button';
5
- import Grid from '@mui/material/Grid';
5
+ import { Grid } from '@availity/mui-layout';
6
6
  import { SvgIconProps } from '@mui/material/SvgIcon';
7
7
  import { ToggleButtonProps } from '@mui/material/ToggleButton';
8
8
  import { styled } from '@mui/material/styles';
@@ -132,7 +132,7 @@ export const FeedbackForm = ({
132
132
  <Grid
133
133
  component="form"
134
134
  container
135
- justifyContent="center"
135
+ sx={{ justifyContent: 'center' }}
136
136
  onSubmit={handleSubmit(onSubmit)}
137
137
  aria-label="Feedback Form"
138
138
  aria-describedby="feedback-form-header"
@@ -167,29 +167,23 @@ export const FeedbackForm = ({
167
167
  minRows={3}
168
168
  maxRows={3}
169
169
  label={getFeedbackLabel()}
170
- inputProps={{ 'aria-required': 'true' }}
171
170
  InputLabelProps={{
172
171
  component: FormLabel,
173
172
  required: true,
174
173
  }}
174
+ inputProps={{ 'aria-required': 'true' }}
175
175
  helperText={errors.feedback?.message || 'Max 200 characters'}
176
176
  error={!!errors.feedback}
177
177
  disabled={loading || !smileFieldValue}
178
178
  />
179
- <FormActions container direction="row">
180
- <Grid item flex={1} minWidth="147px">
179
+ <FormActions container direction="row" width="100%" spacing={1} wrap="wrap">
180
+ <Grid sx={{ flex: 1, minWidth: '147px' }}>
181
181
  <Button color="secondary" disabled={loading} onClick={handleClose}>
182
182
  Close
183
183
  </Button>
184
184
  </Grid>
185
- <Grid item flex={1}>
186
- <LoadingButton
187
- disabled={!smileFieldValue}
188
- loading={loading}
189
- type="submit"
190
- variant="contained"
191
- sx={{ paddingLeft: 0, paddingRight: 0 }}
192
- >
185
+ <Grid sx={{ flex: 1, minWidth: '147px' }}>
186
+ <LoadingButton disabled={!smileFieldValue} loading={loading} type="submit" variant="contained">
193
187
  Send Feedback
194
188
  </LoadingButton>
195
189
  </Grid>
@@ -1,7 +1,7 @@
1
1
  import { IconButton } from '@availity/mui-button';
2
2
  import { CloseIcon } from '@availity/mui-icon';
3
3
  import { Typography } from '@availity/mui-typography';
4
- import Grid from '@mui/material/Grid';
4
+ import { Grid } from '@availity/mui-layout';
5
5
  import { styled } from '@mui/material/styles';
6
6
 
7
7
  interface FeedbackHeaderProps {
@@ -23,12 +23,12 @@ export const FeedbackHeader = ({ appName, handleClose, loading, sent }: Feedback
23
23
  flexWrap="nowrap"
24
24
  id="feedback-form-header"
25
25
  >
26
- <Grid item whiteSpace="normal">
26
+ <Grid sx={{ whiteSpace: 'normal' }}>
27
27
  <Typography component="h2" variant="h5">
28
28
  {sent ? 'Thank you for your feedback.' : `Tell us what you think about ${appName}`}
29
29
  </Typography>
30
30
  </Grid>
31
- <Grid item>
31
+ <Grid>
32
32
  <IconButton disabled={loading} title="Close" onClick={handleClose} size="medium">
33
33
  <CloseIcon fontSize="xsmall" />
34
34
  </IconButton>
File without changes