@availity/mui-feedback 0.1.17 → 0.1.19
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 +8 -0
- package/dist/index.js +6 -9
- package/dist/index.mjs +9 -12
- package/package.json +3 -3
- package/src/lib/Feedback.tsx +4 -2
- package/src/lib/FeedbackForm.tsx +8 -6
- package/src/lib/FeedbackHeader.tsx +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.1.19](https://github.com/Availity/element/compare/@availity/mui-feedback@0.1.18...@availity/mui-feedback@0.1.19) (2024-02-06)
|
|
6
|
+
|
|
7
|
+
## [0.1.18](https://github.com/Availity/element/compare/@availity/mui-feedback@0.1.17...@availity/mui-feedback@0.1.18) (2024-01-31)
|
|
8
|
+
|
|
9
|
+
### Dependency Updates
|
|
10
|
+
|
|
11
|
+
* `mui-form-utils` updated to version `0.9.5`
|
|
12
|
+
* `mui-textfield` updated to version `0.5.10`
|
|
5
13
|
## [0.1.17](https://github.com/Availity/element/compare/@availity/mui-feedback@0.1.16...@availity/mui-feedback@0.1.17) (2024-01-25)
|
|
6
14
|
|
|
7
15
|
### Dependency Updates
|
package/dist/index.js
CHANGED
|
@@ -43,6 +43,7 @@ var import_api_axios = require("@availity/api-axios");
|
|
|
43
43
|
var import_react_hook_form = require("react-hook-form");
|
|
44
44
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
45
|
var SmileButtons = (0, import_material.styled)(import_mui_toggle_button.ToggleButtonGroup, { name: "AvFeedbackContainer", slot: "SmileButtons" })({});
|
|
46
|
+
var FormActions = (0, import_material.styled)(import_material.Grid, { name: "AvFeedbackContainer", slot: "FormActions" })({});
|
|
46
47
|
var SmileButton = ({ disabled, Icon, label, value, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
47
48
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_toggle_button.ToggleButton, {
|
|
48
49
|
"aria-label": value,
|
|
@@ -166,29 +167,24 @@ var FeedbackForm = ({
|
|
|
166
167
|
error: !!errors.feedback,
|
|
167
168
|
disabled: loading
|
|
168
169
|
}),
|
|
169
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
170
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(FormActions, {
|
|
170
171
|
container: true,
|
|
171
172
|
direction: "row",
|
|
172
|
-
marginTop: "16px",
|
|
173
173
|
spacing: 1,
|
|
174
174
|
children: [
|
|
175
175
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Grid, {
|
|
176
176
|
item: true,
|
|
177
|
-
xs: 6,
|
|
178
177
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_button.Button, {
|
|
179
178
|
color: "secondary",
|
|
180
179
|
disabled: loading,
|
|
181
|
-
fullWidth: true,
|
|
182
180
|
onClick: handleClose,
|
|
183
181
|
children: "Cancel"
|
|
184
182
|
})
|
|
185
183
|
}),
|
|
186
184
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Grid, {
|
|
187
185
|
item: true,
|
|
188
|
-
xs: 6,
|
|
189
186
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_button.LoadingButton, {
|
|
190
187
|
disabled: !smileFieldValue,
|
|
191
|
-
fullWidth: true,
|
|
192
188
|
loading,
|
|
193
189
|
type: "submit",
|
|
194
190
|
variant: "contained",
|
|
@@ -210,8 +206,9 @@ var import_mui_icon2 = require("@availity/mui-icon");
|
|
|
210
206
|
var import_mui_typography = require("@availity/mui-typography");
|
|
211
207
|
var import_material2 = require("@mui/material");
|
|
212
208
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
209
|
+
var FeedbackHeaderContainer = (0, import_material2.styled)(import_material2.Grid, { name: "AvFeedbackContainer", slot: "FeedbackHeaderContainer" })({});
|
|
213
210
|
var FeedbackHeader = ({ appName, handleClose, loading, sent }) => {
|
|
214
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(FeedbackHeaderContainer, {
|
|
215
212
|
alignItems: "center",
|
|
216
213
|
container: true,
|
|
217
214
|
direction: "row",
|
|
@@ -246,6 +243,7 @@ var FeedbackHeader = ({ appName, handleClose, loading, sent }) => {
|
|
|
246
243
|
// src/lib/Feedback.tsx
|
|
247
244
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
248
245
|
var FeedbackContainer = (0, import_material3.styled)(import_material3.Container, { name: "AvFeedbackContainer", slot: "root" })({});
|
|
246
|
+
var GiveFeedbackButton = (0, import_material3.styled)(import_mui_button3.Button, { name: "AvGiveFeedbackButton", slot: "root" })({});
|
|
249
247
|
var Feedback = ({ analytics = import_api_axios2.avLogMessagesApi, appName }) => {
|
|
250
248
|
const [anchorEl, setAnchorEl] = (0, import_react2.useState)(null);
|
|
251
249
|
const [sent, setSent] = (0, import_react2.useState)(false);
|
|
@@ -260,10 +258,9 @@ var Feedback = ({ analytics = import_api_axios2.avLogMessagesApi, appName }) =>
|
|
|
260
258
|
const open = Boolean(anchorEl);
|
|
261
259
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
262
260
|
children: [
|
|
263
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
261
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GiveFeedbackButton, {
|
|
264
262
|
onClick: handlePopoverOpen,
|
|
265
263
|
color: "secondary",
|
|
266
|
-
size: "large",
|
|
267
264
|
children: "Give Feedback"
|
|
268
265
|
}),
|
|
269
266
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_popover.Popover, {
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { Popover } from "@availity/mui-popover";
|
|
4
4
|
import { Button as Button2 } from "@availity/mui-button";
|
|
5
|
-
import { Container, styled as
|
|
5
|
+
import { Container, styled as styled3 } from "@mui/material";
|
|
6
6
|
import { avLogMessagesApi } from "@availity/api-axios";
|
|
7
7
|
|
|
8
8
|
// src/lib/FeedbackForm.tsx
|
|
@@ -17,6 +17,7 @@ import { avRegionsApi } from "@availity/api-axios";
|
|
|
17
17
|
import { useForm, Controller } from "react-hook-form";
|
|
18
18
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
19
|
var SmileButtons = styled(ToggleButtonGroup, { name: "AvFeedbackContainer", slot: "SmileButtons" })({});
|
|
20
|
+
var FormActions = styled(Grid, { name: "AvFeedbackContainer", slot: "FormActions" })({});
|
|
20
21
|
var SmileButton = ({ disabled, Icon, label, value, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
21
22
|
children: /* @__PURE__ */ jsx(ToggleButton, {
|
|
22
23
|
"aria-label": value,
|
|
@@ -140,29 +141,24 @@ var FeedbackForm = ({
|
|
|
140
141
|
error: !!errors.feedback,
|
|
141
142
|
disabled: loading
|
|
142
143
|
}),
|
|
143
|
-
/* @__PURE__ */ jsxs(
|
|
144
|
+
/* @__PURE__ */ jsxs(FormActions, {
|
|
144
145
|
container: true,
|
|
145
146
|
direction: "row",
|
|
146
|
-
marginTop: "16px",
|
|
147
147
|
spacing: 1,
|
|
148
148
|
children: [
|
|
149
149
|
/* @__PURE__ */ jsx(Grid, {
|
|
150
150
|
item: true,
|
|
151
|
-
xs: 6,
|
|
152
151
|
children: /* @__PURE__ */ jsx(Button, {
|
|
153
152
|
color: "secondary",
|
|
154
153
|
disabled: loading,
|
|
155
|
-
fullWidth: true,
|
|
156
154
|
onClick: handleClose,
|
|
157
155
|
children: "Cancel"
|
|
158
156
|
})
|
|
159
157
|
}),
|
|
160
158
|
/* @__PURE__ */ jsx(Grid, {
|
|
161
159
|
item: true,
|
|
162
|
-
xs: 6,
|
|
163
160
|
children: /* @__PURE__ */ jsx(LoadingButton, {
|
|
164
161
|
disabled: !smileFieldValue,
|
|
165
|
-
fullWidth: true,
|
|
166
162
|
loading,
|
|
167
163
|
type: "submit",
|
|
168
164
|
variant: "contained",
|
|
@@ -182,10 +178,11 @@ var FeedbackForm = ({
|
|
|
182
178
|
import { IconButton } from "@availity/mui-button";
|
|
183
179
|
import { CloseIcon } from "@availity/mui-icon";
|
|
184
180
|
import { Typography } from "@availity/mui-typography";
|
|
185
|
-
import { Grid as Grid2 } from "@mui/material";
|
|
181
|
+
import { Grid as Grid2, styled as styled2 } from "@mui/material";
|
|
186
182
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
183
|
+
var FeedbackHeaderContainer = styled2(Grid2, { name: "AvFeedbackContainer", slot: "FeedbackHeaderContainer" })({});
|
|
187
184
|
var FeedbackHeader = ({ appName, handleClose, loading, sent }) => {
|
|
188
|
-
return /* @__PURE__ */ jsxs2(
|
|
185
|
+
return /* @__PURE__ */ jsxs2(FeedbackHeaderContainer, {
|
|
189
186
|
alignItems: "center",
|
|
190
187
|
container: true,
|
|
191
188
|
direction: "row",
|
|
@@ -219,7 +216,8 @@ var FeedbackHeader = ({ appName, handleClose, loading, sent }) => {
|
|
|
219
216
|
|
|
220
217
|
// src/lib/Feedback.tsx
|
|
221
218
|
import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
222
|
-
var FeedbackContainer =
|
|
219
|
+
var FeedbackContainer = styled3(Container, { name: "AvFeedbackContainer", slot: "root" })({});
|
|
220
|
+
var GiveFeedbackButton = styled3(Button2, { name: "AvGiveFeedbackButton", slot: "root" })({});
|
|
223
221
|
var Feedback = ({ analytics = avLogMessagesApi, appName }) => {
|
|
224
222
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
225
223
|
const [sent, setSent] = useState(false);
|
|
@@ -234,10 +232,9 @@ var Feedback = ({ analytics = avLogMessagesApi, appName }) => {
|
|
|
234
232
|
const open = Boolean(anchorEl);
|
|
235
233
|
return /* @__PURE__ */ jsxs3(Fragment, {
|
|
236
234
|
children: [
|
|
237
|
-
/* @__PURE__ */ jsx3(
|
|
235
|
+
/* @__PURE__ */ jsx3(GiveFeedbackButton, {
|
|
238
236
|
onClick: handlePopoverOpen,
|
|
239
237
|
color: "secondary",
|
|
240
|
-
size: "large",
|
|
241
238
|
children: "Give Feedback"
|
|
242
239
|
}),
|
|
243
240
|
/* @__PURE__ */ jsx3(Popover, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@availity/mui-feedback",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "Availity MUI Feedback Component - part of the @availity/element design system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@availity/api-axios": "^8.0.3",
|
|
50
50
|
"@availity/mui-button": "^0.6.1",
|
|
51
|
-
"@availity/mui-form-utils": "^0.9.
|
|
51
|
+
"@availity/mui-form-utils": "^0.9.5",
|
|
52
52
|
"@availity/mui-icon": "^0.7.3",
|
|
53
53
|
"@availity/mui-popover": "^0.1.1",
|
|
54
|
-
"@availity/mui-textfield": "^0.5.
|
|
54
|
+
"@availity/mui-textfield": "^0.5.10",
|
|
55
55
|
"@availity/mui-toggle-button": "^0.1.7",
|
|
56
56
|
"@availity/mui-typography": "^0.1.5",
|
|
57
57
|
"react-hook-form": "^7.48.2"
|
package/src/lib/Feedback.tsx
CHANGED
|
@@ -14,6 +14,8 @@ export interface FeedbackProps {
|
|
|
14
14
|
|
|
15
15
|
const FeedbackContainer = styled(Container, { name: 'AvFeedbackContainer', slot: 'root' })({});
|
|
16
16
|
|
|
17
|
+
const GiveFeedbackButton = styled(Button, { name: 'AvGiveFeedbackButton', slot: 'root' })({});
|
|
18
|
+
|
|
17
19
|
export const Feedback = ({ analytics = avLogMessagesApi, appName }: FeedbackProps): JSX.Element => {
|
|
18
20
|
const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null);
|
|
19
21
|
const [sent, setSent] = useState<boolean>(false);
|
|
@@ -32,9 +34,9 @@ export const Feedback = ({ analytics = avLogMessagesApi, appName }: FeedbackProp
|
|
|
32
34
|
|
|
33
35
|
return (
|
|
34
36
|
<>
|
|
35
|
-
<
|
|
37
|
+
<GiveFeedbackButton onClick={handlePopoverOpen} color="secondary">
|
|
36
38
|
Give Feedback
|
|
37
|
-
</
|
|
39
|
+
</GiveFeedbackButton>
|
|
38
40
|
<Popover
|
|
39
41
|
anchorEl={anchorEl}
|
|
40
42
|
anchorOrigin={{
|
package/src/lib/FeedbackForm.tsx
CHANGED
|
@@ -33,6 +33,8 @@ interface FeedbackFormProps {
|
|
|
33
33
|
|
|
34
34
|
const SmileButtons = styled(ToggleButtonGroup, { name: 'AvFeedbackContainer', slot: 'SmileButtons' })({});
|
|
35
35
|
|
|
36
|
+
const FormActions = styled(Grid, { name: 'AvFeedbackContainer', slot: 'FormActions' })({});
|
|
37
|
+
|
|
36
38
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
37
39
|
const SmileButton = ({ disabled, Icon, label, value, ...props }: SmileButtonProps) => (
|
|
38
40
|
<div>
|
|
@@ -164,18 +166,18 @@ export const FeedbackForm = ({
|
|
|
164
166
|
disabled={loading}
|
|
165
167
|
/>
|
|
166
168
|
)}
|
|
167
|
-
<
|
|
168
|
-
<Grid item
|
|
169
|
-
<Button color="secondary" disabled={loading}
|
|
169
|
+
<FormActions container direction="row" spacing={1}>
|
|
170
|
+
<Grid item>
|
|
171
|
+
<Button color="secondary" disabled={loading} onClick={handleClose}>
|
|
170
172
|
Cancel
|
|
171
173
|
</Button>
|
|
172
174
|
</Grid>
|
|
173
|
-
<Grid item
|
|
174
|
-
<LoadingButton disabled={!smileFieldValue}
|
|
175
|
+
<Grid item>
|
|
176
|
+
<LoadingButton disabled={!smileFieldValue} loading={loading} type="submit" variant="contained">
|
|
175
177
|
Send Feedback
|
|
176
178
|
</LoadingButton>
|
|
177
179
|
</Grid>
|
|
178
|
-
</
|
|
180
|
+
</FormActions>
|
|
179
181
|
</Grid>
|
|
180
182
|
);
|
|
181
183
|
} else {
|
|
@@ -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';
|
|
4
|
+
import { Grid, styled } from '@mui/material';
|
|
5
5
|
|
|
6
6
|
interface FeedbackHeaderProps {
|
|
7
7
|
appName: string;
|
|
@@ -10,9 +10,11 @@ interface FeedbackHeaderProps {
|
|
|
10
10
|
sent: boolean;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
const FeedbackHeaderContainer = styled(Grid, { name: 'AvFeedbackContainer', slot: 'FeedbackHeaderContainer' })({});
|
|
14
|
+
|
|
13
15
|
export const FeedbackHeader = ({ appName, handleClose, loading, sent }: FeedbackHeaderProps): JSX.Element => {
|
|
14
16
|
return (
|
|
15
|
-
<
|
|
17
|
+
<FeedbackHeaderContainer
|
|
16
18
|
alignItems="center"
|
|
17
19
|
container
|
|
18
20
|
direction="row"
|
|
@@ -31,6 +33,6 @@ export const FeedbackHeader = ({ appName, handleClose, loading, sent }: Feedback
|
|
|
31
33
|
<CloseIcon />
|
|
32
34
|
</IconButton>
|
|
33
35
|
</Grid>
|
|
34
|
-
</
|
|
36
|
+
</FeedbackHeaderContainer>
|
|
35
37
|
);
|
|
36
38
|
};
|