From 5ff01386f952ab85329b148b8f359f6d489fba4a Mon Sep 17 00:00:00 2001 From: Sean Fong Date: Thu, 31 Aug 2023 16:39:33 +0930 Subject: [PATCH] Reduce bundle size --- .../src/components/Alert.styles.ts | 3 ++- .../BackToTopButton/BackToTopButton.tsx | 4 ++- .../src/components/Box.styles.ts | 3 ++- .../BooleanItem/BooleanField.tsx | 3 ++- .../BooleanItem/BooleanItem.tsx | 2 +- .../DateTimeItem/DateTimeField.tsx | 2 +- .../DecimalItem/DecimalField.tsx | 2 +- .../DisplayItem/DisplayInstructions.styles.ts | 3 ++- .../DisplayItem/DisplayInstructions.tsx | 2 +- .../FormComponents/GridGroup/GridGroup.tsx | 5 +++- .../FormComponents/GridGroup/GridRow.tsx | 2 +- .../FormComponents/GridGroup/GridTable.tsx | 6 ++++- .../FormComponents/GroupItem/GroupHeading.tsx | 3 ++- .../GroupItem/GroupItem.styles.ts | 3 ++- .../GroupItem/NextTabButton.tsx | 2 +- .../GroupItem/NextTabButtonWrapper.tsx | 2 +- .../IntegerItem/IntegerField.tsx | 2 +- .../components/FormComponents/Item.styles.ts | 5 +++- .../ItemParts/FadingCheckIcon.tsx | 2 +- .../ItemParts/ItemFieldGrid.tsx | 2 +- .../ItemParts/ItemLabelText.tsx | 2 +- .../ItemParts/ItemLabelWrapper.tsx | 2 +- .../ItemParts/QItemCheckboxSingle.tsx | 3 ++- .../QItemCheckboxSingleWithOpenLabel.tsx | 4 ++- .../QItemRadioButtonWithOpenLabel.tsx | 2 +- .../components/FormComponents/Lists.styles.ts | 4 +-- .../QItemChoiceCheckboxAnswerOption.tsx | 2 +- .../QItemChoiceCheckboxAnswerValueSet.tsx | 3 ++- .../QItemChoiceRadioAnswerOption.tsx | 2 +- .../QItemChoiceRadioAnswerValueSet.tsx | 3 ++- .../QItemChoice/QItemChoiceRadioSingle.tsx | 3 ++- .../QItemChoiceSelectAnswerOption.tsx | 7 ++++-- .../QItemChoiceSelectAnswerValueSet.tsx | 4 ++- .../QItemOpenChoiceAutocomplete.tsx | 8 +++++- .../QItemOpenChoiceCheckboxAnswerOption.tsx | 2 +- .../QItemOpenChoiceRadioAnswerOption.tsx | 2 +- .../QItemOpenChoiceSelectAnswerOption.tsx | 4 +-- .../QItemOpenChoiceSelectAnswerValueSet.tsx | 5 ++-- .../RepeatGroup/AddItemButton.tsx | 3 ++- .../RepeatGroup/DeleteItemButton.tsx | 2 +- .../RepeatGroup/RepeatGroup.tsx | 5 +++- .../RepeatGroup/RepeatGroupItem.tsx | 2 +- .../RepeatItem/AddItemButton.tsx | 3 ++- .../RepeatItem/DeleteItemButton.tsx | 2 +- .../FormComponents/RepeatItem/RepeatField.tsx | 2 +- .../RepeatItem/RepeatItem.styles.tsx | 4 ++- .../FormComponents/RepeatItem/RepeatItem.tsx | 2 +- .../SingleItem/SingleItemSwitcher.tsx | 2 +- .../FormComponents/StringItem/StringField.tsx | 2 +- .../FormComponents/Tables/DeleteRowButton.tsx | 4 ++- .../FormComponents/Tables/QItemGroupTable.tsx | 25 +++++++++---------- .../FormComponents/Tables/Table.styles.tsx | 3 ++- .../FormComponents/Textfield.styles.ts | 3 ++- .../FormComponents/Typography.styles.ts | 3 ++- .../FormComponents/UrlItem/UrlField.tsx | 2 +- .../components/FormRenderer/BaseRenderer.tsx | 3 ++- .../FormRenderer/FormBodyCollapsible.tsx | 2 +- .../FormBodySingleCollapsible.tsx | 14 +++++------ .../FormRenderer/FormBodyTabbed.tsx | 2 +- .../src/components/FormRenderer/FormTitle.tsx | 2 +- .../FormRenderer/SmartFormsRenderer.tsx | 5 +++- .../src/components/Iconify/Iconify.tsx | 4 +-- .../src/components/Lists.styles.ts | 4 +-- .../src/components/Tabs/CompleteTabButton.tsx | 3 ++- .../src/components/Tabs/FormBodySingleTab.tsx | 6 ++++- .../src/components/Tabs/FormBodyTabList.tsx | 4 ++- .../src/hooks/useTerminologyServerQuery.ts | 2 +- .../smart-forms-renderer/src/theme/Theme.tsx | 4 +-- .../src/theme/overrides/Accordion.ts | 2 +- .../src/theme/overrides/Autocomplete.ts | 2 +- .../src/theme/overrides/Backdrop.ts | 2 +- .../src/theme/overrides/Button.ts | 2 +- .../src/theme/overrides/Card.ts | 2 +- .../src/theme/overrides/Input.ts | 2 +- .../src/theme/overrides/Overrides.ts | 2 +- .../src/theme/overrides/SpeedDial.ts | 2 +- .../src/theme/overrides/Typography.ts | 2 +- .../smart-forms-renderer/src/theme/palette.ts | 3 +-- 78 files changed, 160 insertions(+), 105 deletions(-) diff --git a/packages/smart-forms-renderer/src/components/Alert.styles.ts b/packages/smart-forms-renderer/src/components/Alert.styles.ts index e843d0966..eb2bb741b 100644 --- a/packages/smart-forms-renderer/src/components/Alert.styles.ts +++ b/packages/smart-forms-renderer/src/components/Alert.styles.ts @@ -16,7 +16,8 @@ */ import { alpha, styled } from '@mui/material/styles'; -import { Box, ListItemIcon } from '@mui/material'; +import Box from '@mui/material/Box'; +import ListItemIcon from '@mui/material/ListItemIcon'; export const StyledAlert = styled(Box, { shouldForwardProp: (prop) => prop !== 'color' diff --git a/packages/smart-forms-renderer/src/components/BackToTopButton/BackToTopButton.tsx b/packages/smart-forms-renderer/src/components/BackToTopButton/BackToTopButton.tsx index d35af315d..9afc03c41 100644 --- a/packages/smart-forms-renderer/src/components/BackToTopButton/BackToTopButton.tsx +++ b/packages/smart-forms-renderer/src/components/BackToTopButton/BackToTopButton.tsx @@ -17,7 +17,9 @@ import type { ReactElement } from 'react'; import React from 'react'; -import { Box, Fade, useScrollTrigger } from '@mui/material'; +import Box from '@mui/material/Box'; +import Fade from '@mui/material/Fade'; +import useScrollTrigger from '@mui/material/useScrollTrigger'; interface Props { children: ReactElement; diff --git a/packages/smart-forms-renderer/src/components/Box.styles.ts b/packages/smart-forms-renderer/src/components/Box.styles.ts index 7dcfda4e1..1e000bca8 100644 --- a/packages/smart-forms-renderer/src/components/Box.styles.ts +++ b/packages/smart-forms-renderer/src/components/Box.styles.ts @@ -15,7 +15,8 @@ * limitations under the License. */ -import { Box, styled } from '@mui/material'; +import Box from '@mui/material/Box'; +import { styled } from '@mui/material/styles'; export const QGroupContainerBox = styled(Box, { shouldForwardProp: (prop) => prop !== 'cardElevation' && prop !== 'isRepeated' diff --git a/packages/smart-forms-renderer/src/components/FormComponents/BooleanItem/BooleanField.tsx b/packages/smart-forms-renderer/src/components/FormComponents/BooleanItem/BooleanField.tsx index 84839eea3..f2a79d675 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/BooleanItem/BooleanField.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/BooleanItem/BooleanField.tsx @@ -16,7 +16,8 @@ */ import React, { memo } from 'react'; -import { Checkbox, FormControlLabel } from '@mui/material'; +import Checkbox from '@mui/material/Checkbox'; +import FormControlLabel from '@mui/material/FormControlLabel'; interface BooleanFieldProps { checked: boolean; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/BooleanItem/BooleanItem.tsx b/packages/smart-forms-renderer/src/components/FormComponents/BooleanItem/BooleanItem.tsx index d729e9679..57fd82885 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/BooleanItem/BooleanItem.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/BooleanItem/BooleanItem.tsx @@ -27,7 +27,7 @@ import { createEmptyQrItem } from '../../../utils/qrItem'; import { FullWidthFormComponentBox } from '../../Box.styles'; import ItemFieldGrid from '../ItemParts/ItemFieldGrid'; import BooleanField from './BooleanField'; -import { Box } from '@mui/material'; +import Box from '@mui/material/Box'; interface BooleanItemProps extends PropsWithQrItemChangeHandler, diff --git a/packages/smart-forms-renderer/src/components/FormComponents/DateTimeItem/DateTimeField.tsx b/packages/smart-forms-renderer/src/components/FormComponents/DateTimeItem/DateTimeField.tsx index d07d57828..014c98e1f 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/DateTimeItem/DateTimeField.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/DateTimeItem/DateTimeField.tsx @@ -20,7 +20,7 @@ import type { PropsWithIsTabledAttribute } from '../../../interfaces/renderProps import type { Dayjs } from 'dayjs'; import { DateTimePicker as MuiDateTimePicker, LocalizationProvider } from '@mui/x-date-pickers'; import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'; -import { Box } from '@mui/material'; +import Box from '@mui/material/Box'; interface DateTimeFieldProps extends PropsWithIsTabledAttribute { value: Dayjs | null; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/DecimalItem/DecimalField.tsx b/packages/smart-forms-renderer/src/components/FormComponents/DecimalItem/DecimalField.tsx index 3e3aef172..5bd96a738 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/DecimalItem/DecimalField.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/DecimalItem/DecimalField.tsx @@ -16,7 +16,7 @@ */ import React from 'react'; -import { InputAdornment } from '@mui/material'; +import InputAdornment from '@mui/material/InputAdornment'; import FadingCheckIcon from '../ItemParts/FadingCheckIcon'; import { StandardTextField } from '../Textfield.styles'; import type { PropsWithIsTabledAttribute } from '../../../interfaces/renderProps.interface'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/DisplayItem/DisplayInstructions.styles.ts b/packages/smart-forms-renderer/src/components/FormComponents/DisplayItem/DisplayInstructions.styles.ts index 703060147..01dd45b14 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/DisplayItem/DisplayInstructions.styles.ts +++ b/packages/smart-forms-renderer/src/components/FormComponents/DisplayItem/DisplayInstructions.styles.ts @@ -15,7 +15,8 @@ * limitations under the License. */ -import { Box, styled } from '@mui/material'; +import Box from '@mui/material/Box'; +import { styled } from '@mui/material/styles'; export const DisplayInstructionsWrapper = styled(Box)(({ theme }) => ({ color: theme.palette.text.secondary, diff --git a/packages/smart-forms-renderer/src/components/FormComponents/DisplayItem/DisplayInstructions.tsx b/packages/smart-forms-renderer/src/components/FormComponents/DisplayItem/DisplayInstructions.tsx index 1fdc10a84..c08876c8d 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/DisplayItem/DisplayInstructions.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/DisplayItem/DisplayInstructions.tsx @@ -16,7 +16,7 @@ */ import React, { memo } from 'react'; -import { Typography } from '@mui/material'; +import Typography from '@mui/material/Typography'; import { DisplayInstructionsWrapper } from './DisplayInstructions.styles'; interface DisplayInstructionsProps { diff --git a/packages/smart-forms-renderer/src/components/FormComponents/GridGroup/GridGroup.tsx b/packages/smart-forms-renderer/src/components/FormComponents/GridGroup/GridGroup.tsx index e8caa9e24..bfb413a94 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/GridGroup/GridGroup.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/GridGroup/GridGroup.tsx @@ -21,7 +21,10 @@ import type { PropsWithQrItemChangeHandler } from '../../../interfaces/renderPro import { createQrGroup, updateQrGroup } from '../../../utils/qrItem'; import useHidden from '../../../hooks/useHidden'; import { QGroupContainerBox } from '../../Box.styles'; -import { Divider, Paper, TableContainer, Typography } from '@mui/material'; +import Divider from '@mui/material/Divider'; +import Paper from '@mui/material/Paper'; +import TableContainer from '@mui/material/TableContainer'; +import Typography from '@mui/material/Typography'; import { mapQItemsIndex } from '../../../utils/mapItem'; import GridTable from './GridTable'; import LabelWrapper from '../ItemParts/ItemLabelWrapper'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/GridGroup/GridRow.tsx b/packages/smart-forms-renderer/src/components/FormComponents/GridGroup/GridRow.tsx index 21caf16ab..caeb0609f 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/GridGroup/GridRow.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/GridGroup/GridRow.tsx @@ -22,7 +22,7 @@ import { createQrGroup, updateQrGroup } from '../../../utils/qrItem'; import { GridAnswerTableCell, GridTextTableCell } from '../Tables/Table.styles'; import SingleItem from '../SingleItem/SingleItem'; import { getQrItemsIndex, mapQItemsIndex } from '../../../utils/mapItem'; -import { Typography } from '@mui/material'; +import Typography from '@mui/material/Typography'; interface GridRowProps extends PropsWithQrItemChangeHandler { qItem: QuestionnaireItem; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/GridGroup/GridTable.tsx b/packages/smart-forms-renderer/src/components/FormComponents/GridGroup/GridTable.tsx index 64ffc7bc9..16ddaa664 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/GridGroup/GridTable.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/GridGroup/GridTable.tsx @@ -16,7 +16,11 @@ */ import React from 'react'; -import { Table, TableBody, TableCell, TableHead, TableRow } from '@mui/material'; +import Table from '@mui/material/Table'; +import TableBody from '@mui/material/TableBody'; +import TableCell from '@mui/material/TableCell'; +import TableHead from '@mui/material/TableHead'; +import TableRow from '@mui/material/TableRow'; import { HeaderTableCell } from '../Tables/Table.styles'; import GridRow from './GridRow'; import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/GroupHeading.tsx b/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/GroupHeading.tsx index 68b4ef68b..1af0d7363 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/GroupHeading.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/GroupHeading.tsx @@ -16,7 +16,8 @@ */ import React, { memo } from 'react'; -import { Box, Divider } from '@mui/material'; +import Box from '@mui/material/Box'; +import Divider from '@mui/material/Divider'; import { QGroupHeadingTypography } from '../Typography.styles'; import type { PropsWithIsRepeatedAttribute } from '../../../interfaces/renderProps.interface'; import type { QuestionnaireItem } from 'fhir/r4'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/GroupItem.styles.ts b/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/GroupItem.styles.ts index af1855852..7c168322b 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/GroupItem.styles.ts +++ b/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/GroupItem.styles.ts @@ -15,7 +15,8 @@ * limitations under the License. */ -import { Card, styled } from '@mui/material'; +import Card from '@mui/material/Card'; +import { styled } from '@mui/material/styles'; export const GroupCard = styled(Card, { shouldForwardProp: (prop) => prop !== 'elevation' && prop !== 'isRepeated' diff --git a/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/NextTabButton.tsx b/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/NextTabButton.tsx index 99678964b..873d740b5 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/NextTabButton.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/NextTabButton.tsx @@ -16,7 +16,7 @@ */ import React from 'react'; -import { Button } from '@mui/material'; +import Button from '@mui/material/Button'; import Iconify from '../../Iconify/Iconify'; interface NextTabButtonProps { diff --git a/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/NextTabButtonWrapper.tsx b/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/NextTabButtonWrapper.tsx index 3a86f89f7..21ae73660 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/NextTabButtonWrapper.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/GroupItem/NextTabButtonWrapper.tsx @@ -16,7 +16,7 @@ */ import React, { memo } from 'react'; -import { Box } from '@mui/material'; +import Box from '@mui/material/Box'; import { findNumOfVisibleTabs, getNextVisibleTabIndex } from '../../../utils/tabs'; import type { Tabs } from '../../../interfaces/tab.interface'; import useQuestionnaireStore from '../../../stores/useQuestionnaireStore'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/IntegerItem/IntegerField.tsx b/packages/smart-forms-renderer/src/components/FormComponents/IntegerItem/IntegerField.tsx index 4b8d192fd..b2759f00a 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/IntegerItem/IntegerField.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/IntegerItem/IntegerField.tsx @@ -16,7 +16,7 @@ */ import React from 'react'; -import { InputAdornment } from '@mui/material'; +import InputAdornment from '@mui/material/InputAdornment'; import { StandardTextField } from '../Textfield.styles'; import type { PropsWithIsTabledAttribute } from '../../../interfaces/renderProps.interface'; import FadingCheckIcon from '../ItemParts/FadingCheckIcon'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/Item.styles.ts b/packages/smart-forms-renderer/src/components/FormComponents/Item.styles.ts index 1895b954a..75d7d5821 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/Item.styles.ts +++ b/packages/smart-forms-renderer/src/components/FormComponents/Item.styles.ts @@ -15,7 +15,10 @@ * limitations under the License. */ -import { FormGroup, RadioGroup, styled, Typography } from '@mui/material'; +import FormGroup from '@mui/material/FormGroup'; +import RadioGroup from '@mui/material/RadioGroup'; +import Typography from '@mui/material/Typography'; +import { styled } from '@mui/material/styles'; export const QFormGroup = styled(FormGroup)(() => ({ marginBottom: 4 diff --git a/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/FadingCheckIcon.tsx b/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/FadingCheckIcon.tsx index d3e0f13c1..ffdad5c06 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/FadingCheckIcon.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/FadingCheckIcon.tsx @@ -16,7 +16,7 @@ */ import React from 'react'; -import { Fade } from '@mui/material'; +import Fade from '@mui/material/Fade'; import CheckIcon from '@mui/icons-material/Check'; interface FadingCheckIconProps { diff --git a/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/ItemFieldGrid.tsx b/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/ItemFieldGrid.tsx index bb6d495b2..d8d92f094 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/ItemFieldGrid.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/ItemFieldGrid.tsx @@ -17,7 +17,7 @@ import type { ReactNode } from 'react'; import React from 'react'; -import { Grid } from '@mui/material'; +import Grid from '@mui/material/Grid'; import type { QuestionnaireItem } from 'fhir/r4'; import DisplayInstructions from '../DisplayItem/DisplayInstructions'; import LabelWrapper from './ItemLabelWrapper'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/ItemLabelText.tsx b/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/ItemLabelText.tsx index 4f4dd19fd..b2bcf2861 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/ItemLabelText.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/ItemLabelText.tsx @@ -20,7 +20,7 @@ import type { QuestionnaireItem } from 'fhir/r4'; import { getMarkdownString, getXHtmlString } from '../../../utils/itemControl'; import { QItemTypography } from '../Item.styles'; import parse from 'html-react-parser'; -import { Box } from '@mui/material'; +import Box from '@mui/material/Box'; import ReactMarkdown from 'react-markdown'; interface ItemLabelTextProps { diff --git a/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/ItemLabelWrapper.tsx b/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/ItemLabelWrapper.tsx index c9d72099e..83475caca 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/ItemLabelWrapper.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/ItemLabelWrapper.tsx @@ -16,7 +16,7 @@ */ import React from 'react'; -import { Box } from '@mui/material'; +import Box from '@mui/material/Box'; import ContextDisplayItem from './ContextDisplayItem'; import type { QuestionnaireItem } from 'fhir/r4'; import { getContextDisplays } from '../../../utils/tabs'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/QItemCheckboxSingle.tsx b/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/QItemCheckboxSingle.tsx index a00c37544..22232bd7d 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/QItemCheckboxSingle.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/QItemCheckboxSingle.tsx @@ -16,7 +16,8 @@ */ import React from 'react'; -import { Checkbox, FormControlLabel } from '@mui/material'; +import Checkbox from '@mui/material/Checkbox'; +import FormControlLabel from '@mui/material/FormControlLabel'; interface Props { value: string; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/QItemCheckboxSingleWithOpenLabel.tsx b/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/QItemCheckboxSingleWithOpenLabel.tsx index f287065c3..f791f41b4 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/QItemCheckboxSingleWithOpenLabel.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/QItemCheckboxSingleWithOpenLabel.tsx @@ -17,7 +17,9 @@ import type { ChangeEvent } from 'react'; import React from 'react'; -import { Box, Checkbox, FormControlLabel } from '@mui/material'; +import Box from '@mui/material/Box'; +import Checkbox from '@mui/material/Checkbox'; +import FormControlLabel from '@mui/material/FormControlLabel'; import { StandardTextField } from '../Textfield.styles'; interface Props { diff --git a/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/QItemRadioButtonWithOpenLabel.tsx b/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/QItemRadioButtonWithOpenLabel.tsx index 564b55beb..aae439d7f 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/QItemRadioButtonWithOpenLabel.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/ItemParts/QItemRadioButtonWithOpenLabel.tsx @@ -17,7 +17,7 @@ import type { ChangeEvent } from 'react'; import React from 'react'; -import { Box } from '@mui/material'; +import Box from '@mui/material/Box'; import { StandardTextField } from '../Textfield.styles'; import QItemChoiceRadioSingle from '../QItemChoice/QItemChoiceRadioSingle'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/Lists.styles.ts b/packages/smart-forms-renderer/src/components/FormComponents/Lists.styles.ts index 7836bc0d4..fe1a80b1c 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/Lists.styles.ts +++ b/packages/smart-forms-renderer/src/components/FormComponents/Lists.styles.ts @@ -15,8 +15,8 @@ * limitations under the License. */ -import { List, styled } from '@mui/material'; -import { alpha } from '@mui/material/styles'; +import List from '@mui/material/List'; +import { alpha, styled } from '@mui/material/styles'; export const PrimarySelectableList = styled(List)(({ theme }) => ({ '&& .Mui-selected': { diff --git a/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceCheckboxAnswerOption.tsx b/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceCheckboxAnswerOption.tsx index e7fb81027..fb1338577 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceCheckboxAnswerOption.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceCheckboxAnswerOption.tsx @@ -16,7 +16,7 @@ */ import React from 'react'; -import { Grid } from '@mui/material'; +import Grid from '@mui/material/Grid'; import { QItemChoiceOrientation } from '../../../interfaces/choice.enum'; import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; import QItemChoiceCheckboxSingle from '../ItemParts/QItemCheckboxSingle'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceCheckboxAnswerValueSet.tsx b/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceCheckboxAnswerValueSet.tsx index b47283d29..0143553c5 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceCheckboxAnswerValueSet.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceCheckboxAnswerValueSet.tsx @@ -16,7 +16,8 @@ */ import React from 'react'; -import { Grid, Typography } from '@mui/material'; +import Grid from '@mui/material/Grid'; +import Typography from '@mui/material/Typography'; import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; import { createEmptyQrItem } from '../../../utils/qrItem'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceRadioAnswerOption.tsx b/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceRadioAnswerOption.tsx index 741e4c928..73e1296c4 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceRadioAnswerOption.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceRadioAnswerOption.tsx @@ -17,7 +17,7 @@ import type { ChangeEvent } from 'react'; import React from 'react'; -import { Grid } from '@mui/material'; +import Grid from '@mui/material/Grid'; import { QItemChoiceOrientation } from '../../../interfaces/choice.enum'; import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; import { findInAnswerOptions, getQrChoiceValue } from '../../../utils/choice'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceRadioAnswerValueSet.tsx b/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceRadioAnswerValueSet.tsx index 71428d75f..422bf5724 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceRadioAnswerValueSet.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceRadioAnswerValueSet.tsx @@ -17,7 +17,8 @@ import type { ChangeEvent } from 'react'; import React from 'react'; -import { Grid, Typography } from '@mui/material'; +import Grid from '@mui/material/Grid'; +import Typography from '@mui/material/Typography'; import { QItemChoiceOrientation } from '../../../interfaces/choice.enum'; import type { Coding, QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; import { findInAnswerValueSetCodings } from '../../../utils/choice'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceRadioSingle.tsx b/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceRadioSingle.tsx index 853928cbc..f3584a513 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceRadioSingle.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceRadioSingle.tsx @@ -16,7 +16,8 @@ */ import React from 'react'; -import { FormControlLabel, Radio } from '@mui/material'; +import FormControlLabel from '@mui/material/FormControlLabel'; +import Radio from '@mui/material/Radio'; interface Props { value: string; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceSelectAnswerOption.tsx b/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceSelectAnswerOption.tsx index a486382fb..b4b37702e 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceSelectAnswerOption.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceSelectAnswerOption.tsx @@ -16,8 +16,11 @@ */ import React, { Fragment } from 'react'; -import type { SelectChangeEvent } from '@mui/material'; -import { Grid, InputAdornment, MenuItem, Select } from '@mui/material'; +import Grid from '@mui/material/Grid'; +import InputAdornment from '@mui/material/InputAdornment'; +import MenuItem from '@mui/material/MenuItem'; +import type { SelectChangeEvent } from '@mui/material/Select'; +import Select from '@mui/material/Select'; import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; import { findInAnswerOptions, getQrChoiceValue } from '../../../utils/choice'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceSelectAnswerValueSet.tsx b/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceSelectAnswerValueSet.tsx index 7c8435cf0..23f132ca8 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceSelectAnswerValueSet.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/QItemChoice/QItemChoiceSelectAnswerValueSet.tsx @@ -17,7 +17,9 @@ import type { SyntheticEvent } from 'react'; import React, { useEffect, useMemo } from 'react'; -import { Autocomplete, Grid, Typography } from '@mui/material'; +import Autocomplete from '@mui/material/Autocomplete'; +import Grid from '@mui/material/Grid'; +import Typography from '@mui/material/Typography'; import type { Coding, QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; import { createEmptyQrItem } from '../../../utils/qrItem'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceAutocomplete.tsx b/packages/smart-forms-renderer/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceAutocomplete.tsx index 46e454547..63f23492b 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceAutocomplete.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceAutocomplete.tsx @@ -17,7 +17,13 @@ import type { ChangeEvent, SyntheticEvent } from 'react'; import React, { useState } from 'react'; -import { Autocomplete, Box, CircularProgress, Fade, Grid, Tooltip } from '@mui/material'; +import Autocomplete from '@mui/material/Autocomplete'; +import Box from '@mui/material/Box'; +import CircularProgress from '@mui/material/CircularProgress'; +import Fade from '@mui/material/Fade'; +import Grid from '@mui/material/Grid'; +import Tooltip from '@mui/material/Tooltip'; + import type { Coding, QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; import { createEmptyQrItem } from '../../../utils/qrItem'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceCheckboxAnswerOption.tsx b/packages/smart-forms-renderer/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceCheckboxAnswerOption.tsx index c72207931..8a89602e5 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceCheckboxAnswerOption.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceCheckboxAnswerOption.tsx @@ -16,7 +16,7 @@ */ import React, { useCallback, useMemo, useState } from 'react'; -import { Grid } from '@mui/material'; +import Grid from '@mui/material/Grid'; import { CheckBoxOptionType, QItemChoiceOrientation } from '../../../interfaces/choice.enum'; import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; import { createEmptyQrItem } from '../../../utils/qrItem'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceRadioAnswerOption.tsx b/packages/smart-forms-renderer/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceRadioAnswerOption.tsx index 9f1a82ec5..40911ff38 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceRadioAnswerOption.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceRadioAnswerOption.tsx @@ -17,7 +17,7 @@ import type { ChangeEvent } from 'react'; import React, { useState } from 'react'; -import { Grid } from '@mui/material'; +import Grid from '@mui/material/Grid'; import { QItemChoiceOrientation } from '../../../interfaces/choice.enum'; import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; import { createEmptyQrItem } from '../../../utils/qrItem'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceSelectAnswerOption.tsx b/packages/smart-forms-renderer/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceSelectAnswerOption.tsx index 8b9110791..d5e81f2d0 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceSelectAnswerOption.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceSelectAnswerOption.tsx @@ -17,8 +17,8 @@ import type { SyntheticEvent } from 'react'; import React from 'react'; -import { Autocomplete, Grid } from '@mui/material'; - +import Autocomplete from '@mui/material/Autocomplete'; +import Grid from '@mui/material/Grid'; import type { QuestionnaireItem, QuestionnaireItemAnswerOption, diff --git a/packages/smart-forms-renderer/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceSelectAnswerValueSet.tsx b/packages/smart-forms-renderer/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceSelectAnswerValueSet.tsx index 9e9959bf5..f6fe464f0 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceSelectAnswerValueSet.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/QItemOpenChoice/QItemOpenChoiceSelectAnswerValueSet.tsx @@ -17,8 +17,9 @@ import type { SyntheticEvent } from 'react'; import React from 'react'; -import { Autocomplete, Grid, Typography } from '@mui/material'; - +import Autocomplete from '@mui/material/Autocomplete'; +import Grid from '@mui/material/Grid'; +import Typography from '@mui/material/Typography'; import type { Coding, QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; import { createEmptyQrItem } from '../../../utils/qrItem'; import { StandardTextField } from '../Textfield.styles'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/RepeatGroup/AddItemButton.tsx b/packages/smart-forms-renderer/src/components/FormComponents/RepeatGroup/AddItemButton.tsx index ec19a9e87..ef7cfbe1c 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/RepeatGroup/AddItemButton.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/RepeatGroup/AddItemButton.tsx @@ -16,7 +16,8 @@ */ import React from 'react'; -import { Box, Button } from '@mui/material'; +import Box from '@mui/material/Box'; +import Button from '@mui/material/Button'; import AddIcon from '@mui/icons-material/Add'; import type { RepeatGroupSingle } from '../../../interfaces/repeatGroup.interface'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/RepeatGroup/DeleteItemButton.tsx b/packages/smart-forms-renderer/src/components/FormComponents/RepeatGroup/DeleteItemButton.tsx index a0527b6c5..da567b881 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/RepeatGroup/DeleteItemButton.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/RepeatGroup/DeleteItemButton.tsx @@ -17,7 +17,7 @@ import React from 'react'; import { RepeatDeleteTooltip } from '../RepeatItem/RepeatItem.styles'; -import { IconButton } from '@mui/material'; +import IconButton from '@mui/material/IconButton'; import RemoveCircleOutlineIcon from '@mui/icons-material/RemoveCircleOutline'; import type { QuestionnaireResponseItem } from 'fhir/r4'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/RepeatGroup/RepeatGroup.tsx b/packages/smart-forms-renderer/src/components/FormComponents/RepeatGroup/RepeatGroup.tsx index 3b409b20b..06f387731 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/RepeatGroup/RepeatGroup.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/RepeatGroup/RepeatGroup.tsx @@ -20,7 +20,10 @@ import type { PropsWithQrRepeatGroupChangeHandler } from '../../../interfaces/re import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; import useInitialiseRepeatGroups from '../../../hooks/useInitialiseRepeatGroups'; import { QGroupContainerBox } from '../../Box.styles'; -import { Card, Collapse, Divider } from '@mui/material'; +import Card from '@mui/material/Card'; +import Collapse from '@mui/material/Collapse'; +import Divider from '@mui/material/Divider'; + import { QGroupHeadingTypography } from '../Typography.styles'; import { TransitionGroup } from 'react-transition-group'; import { createEmptyQrItem } from '../../../utils/qrItem'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/RepeatGroup/RepeatGroupItem.tsx b/packages/smart-forms-renderer/src/components/FormComponents/RepeatGroup/RepeatGroupItem.tsx index d3046fe81..fdc2f36ce 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/RepeatGroup/RepeatGroupItem.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/RepeatGroup/RepeatGroupItem.tsx @@ -17,7 +17,7 @@ import React from 'react'; import { RepeatGroupContainerStack } from '../RepeatItem/RepeatItem.styles'; -import { Box } from '@mui/material'; +import Box from '@mui/material/Box'; import GroupItem from '../GroupItem/GroupItem'; import type { PropsWithQrItemChangeHandler } from '../../../interfaces/renderProps.interface'; import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/AddItemButton.tsx b/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/AddItemButton.tsx index 3e66b0360..8607bd342 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/AddItemButton.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/AddItemButton.tsx @@ -16,7 +16,8 @@ */ import React from 'react'; -import { Box, Button } from '@mui/material'; +import Box from '@mui/material/Box'; +import Button from '@mui/material/Button'; import AddIcon from '@mui/icons-material/Add'; import type { RepeatAnswer } from '../../../interfaces/repeatItem.interface'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/DeleteItemButton.tsx b/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/DeleteItemButton.tsx index 1dd148465..9599dd158 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/DeleteItemButton.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/DeleteItemButton.tsx @@ -17,7 +17,7 @@ import React from 'react'; import { RepeatDeleteTooltip } from './RepeatItem.styles'; -import { IconButton } from '@mui/material'; +import IconButton from '@mui/material/IconButton'; import RemoveCircleOutlineIcon from '@mui/icons-material/RemoveCircleOutline'; import type { QuestionnaireResponseItemAnswer } from 'fhir/r4'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/RepeatField.tsx b/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/RepeatField.tsx index b85c6207c..fe8726881 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/RepeatField.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/RepeatField.tsx @@ -16,7 +16,7 @@ */ import React from 'react'; -import { Box } from '@mui/material'; +import Box from '@mui/material/Box'; import { RepeatItemContainerStack } from './RepeatItem.styles'; import SingleItem from '../SingleItem/SingleItem'; import type { diff --git a/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/RepeatItem.styles.tsx b/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/RepeatItem.styles.tsx index a3cc4471f..47c1be234 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/RepeatItem.styles.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/RepeatItem.styles.tsx @@ -15,7 +15,9 @@ * limitations under the License. */ -import { Stack, styled, Tooltip } from '@mui/material'; +import Stack from '@mui/material/Stack'; +import { styled } from '@mui/material/styles'; +import Tooltip from '@mui/material/Tooltip'; export const RepeatDeleteTooltip = styled(Tooltip)(() => ({ marginLeft: 8 diff --git a/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/RepeatItem.tsx b/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/RepeatItem.tsx index ded7398b2..506e41d84 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/RepeatItem.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/RepeatItem/RepeatItem.tsx @@ -25,7 +25,7 @@ import { FullWidthFormComponentBox } from '../../Box.styles'; import AddItemButton from './AddItemButton'; import { TransitionGroup } from 'react-transition-group'; import RepeatField from './RepeatField'; -import { Collapse } from '@mui/material'; +import Collapse from '@mui/material/Collapse'; import useInitialiseRepeatAnswers from '../../../hooks/useInitialiseRepeatAnswers'; import ItemFieldGrid from '../ItemParts/ItemFieldGrid'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/SingleItem/SingleItemSwitcher.tsx b/packages/smart-forms-renderer/src/components/FormComponents/SingleItem/SingleItemSwitcher.tsx index 7f551f769..7f05b9204 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/SingleItem/SingleItemSwitcher.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/SingleItem/SingleItemSwitcher.tsx @@ -19,7 +19,7 @@ import React from 'react'; import QItemChoice from '../QItemChoice/QItemChoice'; import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; import QItemOpenChoice from '../QItemOpenChoice/QItemOpenChoice'; -import { Typography } from '@mui/material'; +import Typography from '@mui/material/Typography'; import type { PropsWithIsRepeatedAttribute, PropsWithIsTabledAttribute, diff --git a/packages/smart-forms-renderer/src/components/FormComponents/StringItem/StringField.tsx b/packages/smart-forms-renderer/src/components/FormComponents/StringItem/StringField.tsx index 1416a6099..7e1493020 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/StringItem/StringField.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/StringItem/StringField.tsx @@ -17,7 +17,7 @@ import React from 'react'; import type { PropsWithIsTabledAttribute } from '../../../interfaces/renderProps.interface'; -import { InputAdornment } from '@mui/material'; +import InputAdornment from '@mui/material/InputAdornment'; import { StandardTextField } from '../Textfield.styles'; import FadingCheckIcon from '../ItemParts/FadingCheckIcon'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/Tables/DeleteRowButton.tsx b/packages/smart-forms-renderer/src/components/FormComponents/Tables/DeleteRowButton.tsx index b9e11d586..113a77cca 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/Tables/DeleteRowButton.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/Tables/DeleteRowButton.tsx @@ -17,7 +17,9 @@ import React from 'react'; import { DeleteButtonTableCell } from './Table.styles'; -import { IconButton, Tooltip } from '@mui/material'; +import IconButton from '@mui/material/IconButton'; +import Tooltip from '@mui/material/Tooltip'; + import RemoveCircleOutlineIcon from '@mui/icons-material/RemoveCircleOutline'; import type { QuestionnaireResponseItem } from 'fhir/r4'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/Tables/QItemGroupTable.tsx b/packages/smart-forms-renderer/src/components/FormComponents/Tables/QItemGroupTable.tsx index 2fbf3bd61..32b5c9bfb 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/Tables/QItemGroupTable.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/Tables/QItemGroupTable.tsx @@ -18,19 +18,18 @@ import React, { useMemo, useState } from 'react'; import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; -import { - Button, - Divider, - Paper, - Stack, - Table, - TableBody, - TableCell, - TableContainer, - TableHead, - TableRow, - Typography -} from '@mui/material'; +import Button from '@mui/material/Button'; +import Divider from '@mui/material/Divider'; +import Paper from '@mui/material/Paper'; +import Stack from '@mui/material/Stack'; +import Table from '@mui/material/Table'; +import TableBody from '@mui/material/TableBody'; +import TableCell from '@mui/material/TableCell'; +import TableContainer from '@mui/material/TableContainer'; +import TableHead from '@mui/material/TableHead'; +import TableRow from '@mui/material/TableRow'; +import Typography from '@mui/material/Typography'; + import AddIcon from '@mui/icons-material/Add'; import QItemGroupTableRow from './QItemGroupTableRow'; import { HeaderTableCell } from './Table.styles'; diff --git a/packages/smart-forms-renderer/src/components/FormComponents/Tables/Table.styles.tsx b/packages/smart-forms-renderer/src/components/FormComponents/Tables/Table.styles.tsx index dd4b3fdd0..5f53fa0a1 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/Tables/Table.styles.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/Tables/Table.styles.tsx @@ -15,7 +15,8 @@ * limitations under the License. */ -import { styled, TableCell } from '@mui/material'; +import { styled } from '@mui/material/styles'; +import TableCell from '@mui/material/TableCell'; export const HeaderTableCell = styled(TableCell)(() => ({ fontSize: 13, diff --git a/packages/smart-forms-renderer/src/components/FormComponents/Textfield.styles.ts b/packages/smart-forms-renderer/src/components/FormComponents/Textfield.styles.ts index debf2c4ef..a9414e52c 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/Textfield.styles.ts +++ b/packages/smart-forms-renderer/src/components/FormComponents/Textfield.styles.ts @@ -15,7 +15,8 @@ * limitations under the License. */ -import { styled, TextField } from '@mui/material'; +import { styled } from '@mui/material/styles'; +import TextField from '@mui/material/TextField'; // Always use this accompanied by the TextField prop fullWidth export const StandardTextField = styled(TextField, { diff --git a/packages/smart-forms-renderer/src/components/FormComponents/Typography.styles.ts b/packages/smart-forms-renderer/src/components/FormComponents/Typography.styles.ts index 8c3afc6f3..287344b9d 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/Typography.styles.ts +++ b/packages/smart-forms-renderer/src/components/FormComponents/Typography.styles.ts @@ -15,7 +15,8 @@ * limitations under the License. */ -import { styled, Typography } from '@mui/material'; +import { styled } from '@mui/material/styles'; +import Typography from '@mui/material/Typography'; export const QGroupHeadingTypography = styled(Typography, { shouldForwardProp: (prop) => prop !== 'isTabHeading' diff --git a/packages/smart-forms-renderer/src/components/FormComponents/UrlItem/UrlField.tsx b/packages/smart-forms-renderer/src/components/FormComponents/UrlItem/UrlField.tsx index c7421bb39..3e54c6d91 100644 --- a/packages/smart-forms-renderer/src/components/FormComponents/UrlItem/UrlField.tsx +++ b/packages/smart-forms-renderer/src/components/FormComponents/UrlItem/UrlField.tsx @@ -17,7 +17,7 @@ import React from 'react'; import type { PropsWithIsTabledAttribute } from '../../../interfaces/renderProps.interface'; -import { InputAdornment } from '@mui/material'; +import InputAdornment from '@mui/material/InputAdornment'; import { StandardTextField } from '../Textfield.styles'; interface UrlFieldProps extends PropsWithIsTabledAttribute { diff --git a/packages/smart-forms-renderer/src/components/FormRenderer/BaseRenderer.tsx b/packages/smart-forms-renderer/src/components/FormRenderer/BaseRenderer.tsx index d8a22eedb..2744d3aee 100644 --- a/packages/smart-forms-renderer/src/components/FormRenderer/BaseRenderer.tsx +++ b/packages/smart-forms-renderer/src/components/FormRenderer/BaseRenderer.tsx @@ -16,7 +16,8 @@ */ import React from 'react'; -import { Container, Fade } from '@mui/material'; +import Container from '@mui/material/Container'; +import Fade from '@mui/material/Fade'; import FormTopLevelItem from '../FormRenderer/FormTopLevelItem'; import type { QuestionnaireResponse, QuestionnaireResponseItem } from 'fhir/r4'; import useQuestionnaireStore from '../../stores/useQuestionnaireStore'; diff --git a/packages/smart-forms-renderer/src/components/FormRenderer/FormBodyCollapsible.tsx b/packages/smart-forms-renderer/src/components/FormRenderer/FormBodyCollapsible.tsx index 9e774acb6..331148b49 100644 --- a/packages/smart-forms-renderer/src/components/FormRenderer/FormBodyCollapsible.tsx +++ b/packages/smart-forms-renderer/src/components/FormRenderer/FormBodyCollapsible.tsx @@ -16,7 +16,7 @@ */ import React, { useMemo } from 'react'; -import { Stack } from '@mui/material'; +import Stack from '@mui/material/Stack'; import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; import { getQrItemsIndex, mapQItemsIndex } from '../../utils/mapItem'; import { updateQrGroup } from '../../utils/qrItem'; diff --git a/packages/smart-forms-renderer/src/components/FormRenderer/FormBodySingleCollapsible.tsx b/packages/smart-forms-renderer/src/components/FormRenderer/FormBodySingleCollapsible.tsx index a09a50be6..a5e9d77cc 100644 --- a/packages/smart-forms-renderer/src/components/FormRenderer/FormBodySingleCollapsible.tsx +++ b/packages/smart-forms-renderer/src/components/FormRenderer/FormBodySingleCollapsible.tsx @@ -17,14 +17,12 @@ import type { ReactNode } from 'react'; import React, { memo } from 'react'; -import { - Accordion, - AccordionDetails, - AccordionSummary, - Box, - Tooltip, - Typography -} from '@mui/material'; +import Accordion from '@mui/material/Accordion'; +import AccordionDetails from '@mui/material/AccordionDetails'; +import AccordionSummary from '@mui/material/AccordionSummary'; +import Box from '@mui/material/Box'; +import Tooltip from '@mui/material/Tooltip'; +import Typography from '@mui/material/Typography'; import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import { getContextDisplays } from '../../utils/tabs'; import type { QuestionnaireItem } from 'fhir/r4'; diff --git a/packages/smart-forms-renderer/src/components/FormRenderer/FormBodyTabbed.tsx b/packages/smart-forms-renderer/src/components/FormRenderer/FormBodyTabbed.tsx index 4eedf805a..d822481a1 100644 --- a/packages/smart-forms-renderer/src/components/FormRenderer/FormBodyTabbed.tsx +++ b/packages/smart-forms-renderer/src/components/FormRenderer/FormBodyTabbed.tsx @@ -16,7 +16,7 @@ */ import React, { useMemo } from 'react'; -import { Grid } from '@mui/material'; +import Grid from '@mui/material/Grid'; import type { QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; import { TabContext, TabPanel } from '@mui/lab'; import { getQrItemsIndex, mapQItemsIndex } from '../../utils/mapItem'; diff --git a/packages/smart-forms-renderer/src/components/FormRenderer/FormTitle.tsx b/packages/smart-forms-renderer/src/components/FormRenderer/FormTitle.tsx index d1c3bceac..d05055d96 100644 --- a/packages/smart-forms-renderer/src/components/FormRenderer/FormTitle.tsx +++ b/packages/smart-forms-renderer/src/components/FormRenderer/FormTitle.tsx @@ -20,7 +20,7 @@ import type { Questionnaire } from 'fhir/r4'; import parse from 'html-react-parser'; import { getXHtmlStringFromQuestionnaire } from '../../utils/qItem'; import { FormTitleWrapper } from '../Box.styles'; -import { Typography } from '@mui/material'; +import Typography from '@mui/material/Typography'; interface FormTitleProps { questionnaire: Questionnaire; diff --git a/packages/smart-forms-renderer/src/components/FormRenderer/SmartFormsRenderer.tsx b/packages/smart-forms-renderer/src/components/FormRenderer/SmartFormsRenderer.tsx index 4a6637d5c..8a64bbf27 100644 --- a/packages/smart-forms-renderer/src/components/FormRenderer/SmartFormsRenderer.tsx +++ b/packages/smart-forms-renderer/src/components/FormRenderer/SmartFormsRenderer.tsx @@ -18,7 +18,10 @@ import React from 'react'; import type { Questionnaire, QuestionnaireResponse } from 'fhir/r4'; import useInitialiseRenderer from '../../hooks/useInitialiseRenderer'; -import { Box, CircularProgress, Typography } from '@mui/material'; +import Box from '@mui/material/Box'; +import CircularProgress from '@mui/material/CircularProgress'; +import Typography from '@mui/material/Typography'; + import { QueryClientProvider } from '@tanstack/react-query'; import useQueryClient from '../../hooks/useQueryClient'; import BaseRenderer from './BaseRenderer'; diff --git a/packages/smart-forms-renderer/src/components/Iconify/Iconify.tsx b/packages/smart-forms-renderer/src/components/Iconify/Iconify.tsx index 613b019b7..299d3484a 100644 --- a/packages/smart-forms-renderer/src/components/Iconify/Iconify.tsx +++ b/packages/smart-forms-renderer/src/components/Iconify/Iconify.tsx @@ -17,8 +17,8 @@ import React, { forwardRef, memo } from 'react'; import { Icon } from '@iconify/react'; -import type { SxProps, Theme } from '@mui/material'; -import { Box } from '@mui/material'; +import type { SxProps, Theme } from '@mui/material/styles'; +import Box from '@mui/material/Box'; interface IconifyProps { icon: string; diff --git a/packages/smart-forms-renderer/src/components/Lists.styles.ts b/packages/smart-forms-renderer/src/components/Lists.styles.ts index 7836bc0d4..fe1a80b1c 100644 --- a/packages/smart-forms-renderer/src/components/Lists.styles.ts +++ b/packages/smart-forms-renderer/src/components/Lists.styles.ts @@ -15,8 +15,8 @@ * limitations under the License. */ -import { List, styled } from '@mui/material'; -import { alpha } from '@mui/material/styles'; +import List from '@mui/material/List'; +import { alpha, styled } from '@mui/material/styles'; export const PrimarySelectableList = styled(List)(({ theme }) => ({ '&& .Mui-selected': { diff --git a/packages/smart-forms-renderer/src/components/Tabs/CompleteTabButton.tsx b/packages/smart-forms-renderer/src/components/Tabs/CompleteTabButton.tsx index 56558da21..9933b9706 100644 --- a/packages/smart-forms-renderer/src/components/Tabs/CompleteTabButton.tsx +++ b/packages/smart-forms-renderer/src/components/Tabs/CompleteTabButton.tsx @@ -16,7 +16,8 @@ */ import React, { memo } from 'react'; -import { IconButton, Tooltip } from '@mui/material'; +import IconButton from '@mui/material/IconButton'; +import Tooltip from '@mui/material/Tooltip'; import CheckCircleIcon from '@mui/icons-material/CheckCircle'; import useQuestionnaireStore from '../../stores/useQuestionnaireStore'; diff --git a/packages/smart-forms-renderer/src/components/Tabs/FormBodySingleTab.tsx b/packages/smart-forms-renderer/src/components/Tabs/FormBodySingleTab.tsx index 95a06bae0..84a43d24c 100644 --- a/packages/smart-forms-renderer/src/components/Tabs/FormBodySingleTab.tsx +++ b/packages/smart-forms-renderer/src/components/Tabs/FormBodySingleTab.tsx @@ -16,7 +16,11 @@ */ import React, { memo } from 'react'; -import { Box, ListItemButton, ListItemText, Typography } from '@mui/material'; +import Box from '@mui/material/Box'; +import ListItemButton from '@mui/material/ListItemButton'; +import ListItemText from '@mui/material/ListItemText'; +import Typography from '@mui/material/Typography'; + import useQuestionnaireStore from '../../stores/useQuestionnaireStore'; import type { QuestionnaireItem } from 'fhir/r4'; import { getContextDisplays } from '../../utils/tabs'; diff --git a/packages/smart-forms-renderer/src/components/Tabs/FormBodyTabList.tsx b/packages/smart-forms-renderer/src/components/Tabs/FormBodyTabList.tsx index 234943d8e..ec42ed5eb 100644 --- a/packages/smart-forms-renderer/src/components/Tabs/FormBodyTabList.tsx +++ b/packages/smart-forms-renderer/src/components/Tabs/FormBodyTabList.tsx @@ -16,7 +16,9 @@ */ import React, { memo } from 'react'; -import { Box, Card, Collapse } from '@mui/material'; +import Box from '@mui/material/Box'; +import Card from '@mui/material/Card'; +import Collapse from '@mui/material/Collapse'; import { PrimarySelectableList } from '../Lists.styles'; import { TransitionGroup } from 'react-transition-group'; import { isHidden } from '../../utils/qItem'; diff --git a/packages/smart-forms-renderer/src/hooks/useTerminologyServerQuery.ts b/packages/smart-forms-renderer/src/hooks/useTerminologyServerQuery.ts index a3377883c..8d3e5b896 100644 --- a/packages/smart-forms-renderer/src/hooks/useTerminologyServerQuery.ts +++ b/packages/smart-forms-renderer/src/hooks/useTerminologyServerQuery.ts @@ -19,7 +19,7 @@ import { useQuery } from '@tanstack/react-query'; import type { Coding, ValueSet } from 'fhir/r4'; import { getValueSetCodings, getValueSetPromise } from '../utils/valueSet'; -import type { AlertColor } from '@mui/material'; +import type { AlertColor } from '@mui/material/Alert'; import useQuestionnaireStore from '../stores/useQuestionnaireStore'; function useTerminologyServerQuery( diff --git a/packages/smart-forms-renderer/src/theme/Theme.tsx b/packages/smart-forms-renderer/src/theme/Theme.tsx index 49ca48ae7..0b451728f 100644 --- a/packages/smart-forms-renderer/src/theme/Theme.tsx +++ b/packages/smart-forms-renderer/src/theme/Theme.tsx @@ -16,14 +16,14 @@ */ import type { ReactNode } from 'react'; import React from 'react'; -import type { ThemeOptions } from '@mui/material'; -import { CssBaseline } from '@mui/material'; +import type { ThemeOptions } from '@mui/material/styles'; import { alpha, createTheme, StyledEngineProvider, ThemeProvider as MUIThemeProvider } from '@mui/material/styles'; +import CssBaseline from '@mui/material/CssBaseline'; import palette from './palette'; import typography from './typography'; import GlobalStyles from './globalStyles'; diff --git a/packages/smart-forms-renderer/src/theme/overrides/Accordion.ts b/packages/smart-forms-renderer/src/theme/overrides/Accordion.ts index d040d4907..1f8662a7f 100644 --- a/packages/smart-forms-renderer/src/theme/overrides/Accordion.ts +++ b/packages/smart-forms-renderer/src/theme/overrides/Accordion.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import type { Theme } from '@mui/material'; +import type { Theme } from '@mui/material/styles'; export default function Accordion(theme: Theme) { return { diff --git a/packages/smart-forms-renderer/src/theme/overrides/Autocomplete.ts b/packages/smart-forms-renderer/src/theme/overrides/Autocomplete.ts index 4bf3087a8..63fb8347c 100644 --- a/packages/smart-forms-renderer/src/theme/overrides/Autocomplete.ts +++ b/packages/smart-forms-renderer/src/theme/overrides/Autocomplete.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import type { Theme } from '@mui/material'; +import type { Theme } from '@mui/material/styles'; export default function Autocomplete(theme: Theme) { return { diff --git a/packages/smart-forms-renderer/src/theme/overrides/Backdrop.ts b/packages/smart-forms-renderer/src/theme/overrides/Backdrop.ts index 9aca37402..94afaaa1b 100644 --- a/packages/smart-forms-renderer/src/theme/overrides/Backdrop.ts +++ b/packages/smart-forms-renderer/src/theme/overrides/Backdrop.ts @@ -15,8 +15,8 @@ * limitations under the License. */ +import type { Theme } from '@mui/material/styles'; import { alpha } from '@mui/material/styles'; -import type { Theme } from '@mui/material'; export default function Backdrop(theme: Theme) { return { diff --git a/packages/smart-forms-renderer/src/theme/overrides/Button.ts b/packages/smart-forms-renderer/src/theme/overrides/Button.ts index 130df1a0e..1ab31c154 100644 --- a/packages/smart-forms-renderer/src/theme/overrides/Button.ts +++ b/packages/smart-forms-renderer/src/theme/overrides/Button.ts @@ -15,8 +15,8 @@ * limitations under the License. */ +import type { Theme } from '@mui/material/styles'; import { alpha } from '@mui/material/styles'; -import type { Theme } from '@mui/material'; export default function Button(theme: Theme) { return { diff --git a/packages/smart-forms-renderer/src/theme/overrides/Card.ts b/packages/smart-forms-renderer/src/theme/overrides/Card.ts index 4a620bfb3..25f169aed 100644 --- a/packages/smart-forms-renderer/src/theme/overrides/Card.ts +++ b/packages/smart-forms-renderer/src/theme/overrides/Card.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import type { Theme } from '@mui/material'; +import type { Theme } from '@mui/material/styles'; export default function Card(theme: Theme) { return { diff --git a/packages/smart-forms-renderer/src/theme/overrides/Input.ts b/packages/smart-forms-renderer/src/theme/overrides/Input.ts index ea2ef1c15..99f25fe1e 100644 --- a/packages/smart-forms-renderer/src/theme/overrides/Input.ts +++ b/packages/smart-forms-renderer/src/theme/overrides/Input.ts @@ -15,8 +15,8 @@ * limitations under the License. */ +import type { Theme } from '@mui/material/styles'; import { alpha } from '@mui/material/styles'; -import type { Theme } from '@mui/material'; export default function Input(theme: Theme) { return { diff --git a/packages/smart-forms-renderer/src/theme/overrides/Overrides.ts b/packages/smart-forms-renderer/src/theme/overrides/Overrides.ts index 2c11b74c3..6a842e9ad 100644 --- a/packages/smart-forms-renderer/src/theme/overrides/Overrides.ts +++ b/packages/smart-forms-renderer/src/theme/overrides/Overrides.ts @@ -25,7 +25,7 @@ import Typography from './Typography'; import Autocomplete from './Autocomplete'; import Accordion from './Accordion'; import SpeedDial from './SpeedDial'; -import type { Theme } from '@mui/material'; +import type { Theme } from '@mui/material/styles'; function ComponentsOverrides(theme: Theme) { return Object.assign( diff --git a/packages/smart-forms-renderer/src/theme/overrides/SpeedDial.ts b/packages/smart-forms-renderer/src/theme/overrides/SpeedDial.ts index 19b9ce1f8..68191fb1d 100644 --- a/packages/smart-forms-renderer/src/theme/overrides/SpeedDial.ts +++ b/packages/smart-forms-renderer/src/theme/overrides/SpeedDial.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import type { Theme } from '@mui/material'; +import type { Theme } from '@mui/material/styles'; export default function SpeedDial(theme: Theme) { return { diff --git a/packages/smart-forms-renderer/src/theme/overrides/Typography.ts b/packages/smart-forms-renderer/src/theme/overrides/Typography.ts index d7997e990..35636f2a2 100644 --- a/packages/smart-forms-renderer/src/theme/overrides/Typography.ts +++ b/packages/smart-forms-renderer/src/theme/overrides/Typography.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import type { Theme } from '@mui/material'; +import type { Theme } from '@mui/material/styles'; export default function Typography(theme: Theme) { return { diff --git a/packages/smart-forms-renderer/src/theme/palette.ts b/packages/smart-forms-renderer/src/theme/palette.ts index 0fc33dabc..7c9770e19 100644 --- a/packages/smart-forms-renderer/src/theme/palette.ts +++ b/packages/smart-forms-renderer/src/theme/palette.ts @@ -15,9 +15,8 @@ * limitations under the License. */ -import type { PaletteOptions } from '@mui/material/styles'; +import type { PaletteColor, PaletteColorOptions, PaletteOptions } from '@mui/material/styles'; import { alpha } from '@mui/material/styles'; -import type { PaletteColor, PaletteColorOptions } from '@mui/material'; import { grey } from '@mui/material/colors'; declare module '@mui/material/styles' {