@aehrc/smart-forms-renderer 1.2.8 → 1.2.10
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/lib/components/FormComponents/ItemParts/AccessibleFeedback.d.ts +7 -0
- package/lib/components/FormComponents/ItemParts/AccessibleFeedback.js +7 -0
- package/lib/components/FormComponents/ItemParts/AccessibleFeedback.js.map +1 -0
- package/lib/components/FormComponents/ItemParts/ClearButtonAdornment.js +12 -12
- package/lib/components/FormComponents/ItemParts/ClearButtonAdornment.js.map +1 -1
- package/package.json +4 -4
- package/src/components/FormComponents/ItemParts/ClearButtonAdornment.tsx +22 -23
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
interface AccessibleFeedbackProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
id?: string;
|
|
5
|
+
}
|
|
6
|
+
declare function AccessibleFeedback(props: AccessibleFeedbackProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default AccessibleFeedback;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
function AccessibleFeedback(props) {
|
|
3
|
+
const { children, id } = props;
|
|
4
|
+
return (_jsx("span", { id: id, role: "alert", "aria-live": "assertive", children: children }));
|
|
5
|
+
}
|
|
6
|
+
export default AccessibleFeedback;
|
|
7
|
+
//# sourceMappingURL=AccessibleFeedback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccessibleFeedback.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ItemParts/AccessibleFeedback.tsx"],"names":[],"mappings":";AAwBA,SAAS,kBAAkB,CAAC,KAA8B;IACxD,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;IAE/B,OAAO,CACL,eAAM,EAAE,EAAE,EAAE,EAAE,IAAI,EAAC,OAAO,eAAW,WAAW,YAC7C,QAAQ,GACJ,CACR,CAAC;AACJ,CAAC;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -6,17 +6,17 @@ export function ClearButtonAdornment(props) {
|
|
|
6
6
|
if (readOnly) {
|
|
7
7
|
return null;
|
|
8
8
|
}
|
|
9
|
-
return (_jsx(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
return (_jsx(IconButton, { "aria-hidden": "true", tabIndex: -1, size: "small", title: "Clear", onClick: (e) => {
|
|
10
|
+
onClear();
|
|
11
|
+
// Manually re-focus the input field
|
|
12
|
+
const input = e.currentTarget.closest('.MuiOutlinedInput-root')?.querySelector('input');
|
|
13
|
+
if (input) {
|
|
14
|
+
input.focus();
|
|
15
|
+
}
|
|
16
|
+
}, onMouseDown: (e) => {
|
|
17
|
+
e.preventDefault(); // Prevent the button from stealing focus
|
|
18
|
+
}, className: "StandardTextField-clearIndicator", sx: {
|
|
19
|
+
p: 0.5
|
|
20
|
+
}, children: _jsx(ClearIcon, { fontSize: "small" }) }));
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=ClearButtonAdornment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClearButtonAdornment.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ItemParts/ClearButtonAdornment.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAOlD,MAAM,UAAU,oBAAoB,CAAC,KAAgC;IACnE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAEpC,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,
|
|
1
|
+
{"version":3,"file":"ClearButtonAdornment.js","sourceRoot":"","sources":["../../../../src/components/FormComponents/ItemParts/ClearButtonAdornment.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAOlD,MAAM,UAAU,oBAAoB,CAAC,KAAgC;IACnE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAEpC,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,KAAC,UAAU,mBACG,MAAM,EAClB,QAAQ,EAAE,CAAC,CAAC,EACZ,IAAI,EAAC,OAAO,EACZ,KAAK,EAAC,OAAO,EACb,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;YACb,OAAO,EAAE,CAAC;YAEV,oCAAoC;YACpC,MAAM,KAAK,GAAG,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,wBAAwB,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;YACxF,IAAI,KAAK,EAAE,CAAC;gBACV,KAAK,CAAC,KAAK,EAAE,CAAC;YAChB,CAAC;QACH,CAAC,EACD,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;YACjB,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC,yCAAyC;QAC/D,CAAC,EACD,SAAS,EAAC,kCAAkC,EAC5C,EAAE,EAAE;YACF,CAAC,EAAE,GAAG;SACP,YACD,KAAC,SAAS,IAAC,QAAQ,EAAC,OAAO,GAAG,GACnB,CACd,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aehrc/smart-forms-renderer",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.10",
|
|
4
4
|
"description": "FHIR Structured Data Captured (SDC) rendering engine for Smart Forms",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@mui/lab": "^7.0.0-beta.13",
|
|
40
40
|
"@mui/material": "^7.1.1",
|
|
41
41
|
"@mui/x-date-pickers": "^7.28.3",
|
|
42
|
-
"@tanstack/react-query": "^5.90.
|
|
42
|
+
"@tanstack/react-query": "^5.90.5",
|
|
43
43
|
"dayjs": "^1.11.18",
|
|
44
44
|
"deep-diff": "^1.0.2",
|
|
45
45
|
"fast-equals": "^5.2.2",
|
|
@@ -66,14 +66,14 @@
|
|
|
66
66
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@babel/core": "^7.
|
|
69
|
+
"@babel/core": "^7.28.5",
|
|
70
70
|
"@chromatic-com/storybook": "^4.1.1",
|
|
71
71
|
"@storybook/addon-docs": "^9.1.13",
|
|
72
72
|
"@storybook/addon-links": "^9.1.13",
|
|
73
73
|
"@storybook/addon-onboarding": "^9.1.13",
|
|
74
74
|
"@storybook/addon-themes": "^9.1.13",
|
|
75
75
|
"@storybook/react-vite": "^9.1.13",
|
|
76
|
-
"@storybook/test-runner": "^0.
|
|
76
|
+
"@storybook/test-runner": "^0.24.0",
|
|
77
77
|
"@testing-library/jest-dom": "^6.9.1",
|
|
78
78
|
"@testing-library/react": "^16.3.0",
|
|
79
79
|
"@types/deep-diff": "^1.0.5",
|
|
@@ -14,29 +14,28 @@ export function ClearButtonAdornment(props: ClearButtonAdornmentProps) {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
<IconButton
|
|
18
|
+
aria-hidden="true"
|
|
19
|
+
tabIndex={-1}
|
|
20
|
+
size="small"
|
|
21
|
+
title="Clear"
|
|
22
|
+
onClick={(e) => {
|
|
23
|
+
onClear();
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
</span>
|
|
25
|
+
// Manually re-focus the input field
|
|
26
|
+
const input = e.currentTarget.closest('.MuiOutlinedInput-root')?.querySelector('input');
|
|
27
|
+
if (input) {
|
|
28
|
+
input.focus();
|
|
29
|
+
}
|
|
30
|
+
}}
|
|
31
|
+
onMouseDown={(e) => {
|
|
32
|
+
e.preventDefault(); // Prevent the button from stealing focus
|
|
33
|
+
}}
|
|
34
|
+
className="StandardTextField-clearIndicator"
|
|
35
|
+
sx={{
|
|
36
|
+
p: 0.5
|
|
37
|
+
}}>
|
|
38
|
+
<ClearIcon fontSize="small" />
|
|
39
|
+
</IconButton>
|
|
41
40
|
);
|
|
42
41
|
}
|