├── .husky ├── commit-msg └── pre-commit ├── lint-staged.config.js ├── package ├── nativeComponents │ ├── inputs │ │ ├── custom │ │ │ ├── NativeSpeechToText.js │ │ │ ├── NativeReactSelectInput.js │ │ │ ├── NativeGithubAuthComponent.js │ │ │ ├── NativeLinkedInAuthComponent.js │ │ │ ├── NativeGoogleButton.js │ │ │ ├── NativeFacebookAuthComponent.js │ │ │ ├── NativeMedicineSelector.js │ │ │ └── NativeRichTextEditor.js │ │ ├── NativePhone.js │ │ ├── NativeTextButton.js │ │ ├── NativeFab.js │ │ ├── NativeMenuItem.js │ │ ├── NativeContainedButton.js │ │ ├── NativeFormGroup.js │ │ ├── NativeOutlinedButton.js │ │ ├── NativeInputLabel.js │ │ ├── NativeRating.js │ │ ├── NativeSwitch.js │ │ ├── NativeInputAdornment.js │ │ ├── NativeListItemButton.js │ │ ├── NativeFormControlLabel.js │ │ ├── NativeAutocomplete.js │ │ ├── NativeTextField.js │ │ ├── NativeTextarea.js │ │ ├── NativeFormControl.js │ │ ├── NativeIconButton.js │ │ ├── NativeFormErrorText.js │ │ ├── NativeButton.js │ │ ├── NativeConfirmPasswordField.js │ │ ├── NativeColorInput.js │ │ ├── NativeFormHelperText.js │ │ ├── NativeInputPassword.js │ │ ├── NativeConfirmPassword.js │ │ ├── NativeSelect.js │ │ ├── NativeJSONInput.js │ │ ├── NativeDateTimePicker.js │ │ ├── NativeCheckbox.js │ │ ├── NativeDatepicker.js │ │ ├── NativeJSONEditor.js │ │ ├── NativeInput.js │ │ └── NativeFilePicker.js │ ├── helper │ │ ├── storeHelper.js │ │ └── routerHelper.js │ ├── dataTable │ │ ├── DevNativeDataTable.js │ │ ├── NativeDataTableDetailsPaneContainer.js │ │ ├── NativeDataTableToolPopover.js │ │ └── NativeDataTableToolbar.js │ ├── forms │ │ ├── NativeFormContainer.js │ │ └── coreFormConstants.js │ ├── dataDisplay │ │ ├── NativeChip.js │ │ ├── NativeImage.js │ │ ├── NativeTableHeadRow.js │ │ ├── NativeDivider.js │ │ ├── NativeListItemIcon.js │ │ ├── NativeListItemText.js │ │ ├── NativeListSubheader.js │ │ ├── NativeTableRow.js │ │ ├── NativeListItemAvatar.js │ │ ├── NativeTableBody.js │ │ ├── NativeTableHead.js │ │ ├── NativeTooltip.js │ │ ├── heading │ │ │ ├── NativeH1.js │ │ │ ├── NativeH2.js │ │ │ ├── NativeH3.js │ │ │ ├── NativeH4.js │ │ │ ├── NativeH5.js │ │ │ ├── NativeH6.js │ │ │ └── NativeH.js │ │ ├── NativeTableFooter.js │ │ ├── paragraph │ │ │ ├── NativeLabel.js │ │ │ ├── NativeTypographyButton.js │ │ │ ├── NativeTypographyOverline.js │ │ │ ├── NativeTypographySubtitle1.js │ │ │ ├── NativeTypographySubtitle2.js │ │ │ ├── NativeTypographyBody1.js │ │ │ ├── NativeTypographyBody2.js │ │ │ └── NativeTypographyCaption.js │ │ ├── NativeTableContainer.js │ │ ├── NativeTableSortLabel.js │ │ ├── NativeBadge.js │ │ ├── NativeListItemSecondaryAction.js │ │ ├── NativeTableCell.js │ │ ├── NativeTableHeadCell.js │ │ ├── NativeAvatarGroup.js │ │ ├── NativeTablePagination.js │ │ ├── NativeAvatar.js │ │ ├── NativeTableBodyCell.js │ │ ├── NativeTable.js │ │ ├── NativeFlatList.js │ │ ├── custom │ │ │ └── NativeMarkdownViewer.js │ │ ├── NativeTypography.js │ │ └── NativeIcon.js │ ├── layouts │ │ ├── NativePageContainer.js │ │ ├── NativeAppDiv.js │ │ ├── NativeGridItem.js │ │ ├── NativeListItem.js │ │ ├── NativeContainer.js │ │ ├── NativeSpan.js │ │ ├── NativeBox.js │ │ ├── NativeStack.js │ │ ├── NativeImageBackground.js │ │ ├── NativeAppContainer.js │ │ ├── NativeSection.js │ │ ├── NativeGrid.js │ │ └── NativeList.js │ ├── utils │ │ ├── NativeFade.js │ │ ├── NativePopover.js │ │ └── NativeModal.js │ ├── feedback │ │ ├── NativeAlert.js │ │ ├── NativeBackdrop.js │ │ ├── NativeSkeleton.js │ │ ├── NativeSnackbar.js │ │ ├── NativeAlertTitle.js │ │ ├── NativeCircularProgress.js │ │ └── NativeLinearProgress.js │ ├── navigation │ │ ├── NativeTabs.js │ │ ├── NativeMenuList.js │ │ ├── NativeNavigation.js │ │ ├── NativeTab.js │ │ ├── NativeMenuItem.js │ │ ├── NativeTabPanel.js │ │ ├── NativeTabHead.js │ │ ├── NativeLink.js │ │ ├── NativeScrollTop.js │ │ └── NativeCustomTabs.js │ ├── surfaces │ │ ├── NativePaper.js │ │ ├── NativeAppBar.js │ │ ├── NativeToolbar.js │ │ ├── NativeCollapse.js │ │ ├── NativeAccordion.js │ │ ├── NativeCardMedia.js │ │ ├── NativeCardHeader.js │ │ ├── NativeCardActions.js │ │ ├── NativeCardContent.js │ │ ├── NativeCardActionArea.js │ │ ├── NativeAccordionDetail.js │ │ ├── NativeAccordionSummary.js │ │ ├── NativeRightDrawer.js │ │ ├── NativeCard.js │ │ ├── NativeDrawer.js │ │ └── NativeFooter.js │ └── NativeClickAwayListner.js ├── theme │ ├── NativeCssBaseline.js │ └── NativeThemeProvider.js ├── form │ └── nativeFormConstants.js ├── utils │ ├── app.utils.js │ └── network.utils.js ├── styledComponents │ ├── inputs │ │ ├── SCOtpInput.js │ │ ├── SCFab.js │ │ ├── SCButton.js │ │ ├── SCRating.js │ │ ├── SCSelect.js │ │ ├── SCSwitch.js │ │ ├── custom │ │ │ └── SCRichTextEditor.js │ │ ├── SCCheckbox.js │ │ ├── SCFormGroup.js │ │ ├── SCMenuItem.js │ │ ├── SCTextField.js │ │ ├── SCColorInput.js │ │ ├── SCIconButton.js │ │ ├── SCInputLabel.js │ │ ├── SCFormControl.js │ │ ├── SCTimePicker.js │ │ ├── SCAutocomplete.js │ │ ├── SCListItemButton.js │ │ ├── SCFormHelperText.js │ │ ├── SCInputAdornment.js │ │ ├── SCFormControlLabel.js │ │ ├── SCDateTimePicker.js │ │ ├── SCInput.js │ │ └── SCDatePicker.js │ ├── surfaces │ │ ├── SCCollapse.js │ │ ├── SCPaper.js │ │ ├── SCToolbar.js │ │ ├── SCAccordion.js │ │ ├── SCCardMedia.js │ │ ├── SCCard.js │ │ ├── SCCardHeader.js │ │ ├── SCCardActions.js │ │ ├── SCCardContent.js │ │ ├── SCAppBar.js │ │ ├── SCCardActionArea.js │ │ ├── SCAccordionDetail.js │ │ ├── SCToolbox.js │ │ └── SCAccordionSummery.js │ ├── layouts │ │ ├── SCImageBackground.js │ │ ├── SCAppDiv.js │ │ ├── SCBox.js │ │ ├── SCList.js │ │ ├── SCGrid.js │ │ ├── SCStack.js │ │ ├── SCGridItem.js │ │ ├── SCListItem.js │ │ └── SCContainer.js │ ├── dataDisplay │ │ ├── SCImage.js │ │ ├── SCIcon.js │ │ ├── SCChip.js │ │ ├── SCTable.js │ │ ├── SCAvatar.js │ │ ├── SCBadge.js │ │ ├── SCDivider.js │ │ ├── SCTooltip.js │ │ ├── SCTableRow.js │ │ ├── SCTableBody.js │ │ ├── SCTableCell.js │ │ ├── SCTableHead.js │ │ ├── SCTypography.js │ │ ├── SCAvatarGroup.js │ │ ├── SCTableFooter.js │ │ ├── SCListItemIcon.js │ │ ├── SCListItemText.js │ │ ├── SCListItemAvatar.js │ │ ├── SCListSubheader.js │ │ ├── SCTableContainer.js │ │ ├── SCTablePagination.js │ │ ├── SCTableSortLabel.js │ │ └── SCListItemSecondaryAction.js │ ├── utils │ │ ├── SCFade.js │ │ ├── SCModal.js │ │ └── SCPopover.js │ ├── navigation │ │ ├── SCTab.js │ │ ├── SCLink.js │ │ ├── SCTabs.js │ │ ├── SCMenuItem.js │ │ ├── SCMenuList.js │ │ ├── SCRightDrawer.js │ │ └── SCDrawer.js │ └── feedback │ │ ├── SCAlert.js │ │ ├── SCDialog.js │ │ ├── SCBackdrop.js │ │ ├── SCSkeleton.js │ │ ├── SCSnackbar.js │ │ ├── SCAlertTitle.js │ │ ├── SCDialogTitle.js │ │ ├── SCDialogActions.js │ │ ├── SCDialogContent.js │ │ ├── SCLinearProgress.js │ │ ├── SCCircularProgress.js │ │ └── SCDialogContentText.js ├── helper │ ├── appUtils.js │ ├── helper.js │ └── componentUtil.js ├── NativeDimension.js └── package.json ├── CONTRIBUTING.md ├── babel.config.json ├── .github ├── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── scripts │ ├── get_latest_package_details.sh │ ├── version_revert.sh │ └── version_bump.sh ├── workflows │ ├── publish-package.yml │ ├── create-release.yml │ └── create-tag.yml └── pull_request_template.md ├── README.md ├── LICENSE ├── commitlint.config.js ├── .gitignore ├── package.json └── scripts └── attributions.gen.js /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npx --no -- commitlint --edit ${1} 5 | -------------------------------------------------------------------------------- /lint-staged.config.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-undef 2 | module.exports = { "**/*.{js,jsx,ts,tsx}": ["npm run code:lint"] }; -------------------------------------------------------------------------------- /package/nativeComponents/inputs/custom/NativeSpeechToText.js: -------------------------------------------------------------------------------- 1 | 2 | export default function NativeSpeechToText() { 3 | return null; 4 | } 5 | -------------------------------------------------------------------------------- /package/theme/NativeCssBaseline.js: -------------------------------------------------------------------------------- 1 | import { CssBaseline as NativeCssBaseline } from "@mui/material"; 2 | 3 | export default NativeCssBaseline; 4 | -------------------------------------------------------------------------------- /package/nativeComponents/helper/storeHelper.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line import/no-unresolved 2 | import storage from "redux-persist/lib/storage"; 3 | 4 | export { storage as nativeStorage }; 5 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## CONTRIBUTING 2 | All Wrappid repositories follow the same contributing guidelines available in the following link: 3 | https://github.com/wrappid/.github/blob/main/profile/CONTRIBUTING.md -------------------------------------------------------------------------------- /package/form/nativeFormConstants.js: -------------------------------------------------------------------------------- 1 | export const FORM_XS_DEFAULT_GRID_SIZE = 12; 2 | export const FORM_SM_DEFAULT_GRID_SIZE = 6; 3 | export const FORM_MD_DEFAULT_GRID_SIZE = 4; 4 | export const FORM_LG_DEFAULT_GRID_SIZE = 3; 5 | export const FORM_XL_DEFAULT_GRID_SIZE = 3; 6 | -------------------------------------------------------------------------------- /package/nativeComponents/dataTable/DevNativeDataTable.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | export default function DevNativeDataTable() { 5 | return
NativeDataTable_Dev
; 6 | } 7 | -------------------------------------------------------------------------------- /package/nativeComponents/forms/NativeFormContainer.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | export default function NativeFormContainer(props) { 5 | return
{props.children}
; 6 | } 7 | -------------------------------------------------------------------------------- /package/nativeComponents/dataTable/NativeDataTableDetailsPaneContainer.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | export default function NativeDataTableDetailsPaneContainer(props) { 5 | return props.children; 6 | } 7 | -------------------------------------------------------------------------------- /babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/env", 5 | { 6 | "targets": { 7 | "chrome": "110" 8 | }, 9 | "useBuiltIns": "usage", 10 | "corejs": "3.6.5" 11 | } 12 | ], 13 | "@babel/preset-react" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativePhone.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import NativeInput from "./NativeInput"; 5 | 6 | export default function NativePhone(props) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeChip.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCChip } from "../../styledComponents/dataDisplay/SCChip"; 5 | 6 | export default function NativeChip(props) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeTextButton.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import NativeButton from "./NativeButton"; 5 | 6 | export default function NativeTextButton(props) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeImage.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCImage } from "../../styledComponents/dataDisplay/SCImage"; 5 | 6 | export default function NativeImage(props) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeFab.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCFab } from "../../styledComponents/inputs/SCFab"; 5 | 6 | export default function NativeFab(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeMenuItem.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCMenuItem } from "../../styledComponents/inputs/SCMenuItem"; 5 | 6 | export default function NativeMenuItem(props) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/layouts/NativePageContainer.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | 3 | export default function NativePageContainer(props) { 4 | // eslint-disable-next-line etc/no-commented-out-code 5 | const { /* authenticated, */ children } = props; 6 | 7 | return children; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/utils/NativeFade.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCFade } from "../../styledComponents/utils/SCFade"; 5 | 6 | export default function NativeFade(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeContainedButton.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import NativeButton from "./NativeButton"; 5 | 6 | export default function NativeContainedButton(props) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeFormGroup.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCFormGroup } from "../../styledComponents/inputs/SCFormGroup"; 5 | 6 | export default function NativeFormGroup(props) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeOutlinedButton.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import NativeButton from "./NativeButton"; 5 | 6 | export default function NativeOutlinedButton(props) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/feedback/NativeAlert.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCAlert } from "../../styledComponents/feedback/SCAlert"; 5 | 6 | export default function NativeAlert(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeInputLabel.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCInputLabel } from "../../styledComponents/inputs/SCInputLabel"; 5 | 6 | export default function NativeInputLabel(props) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/navigation/NativeTabs.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCTabs } from "../../styledComponents/navigation/SCTabs"; 5 | 6 | export default function NativeTabs(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/surfaces/NativePaper.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCPaper } from "../../styledComponents/surfaces/SCPaper"; 5 | 6 | export default function NativePaper(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/utils/app.utils.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copy text to clipboard 3 | * 4 | * @param {*} text 5 | * @returns boolean 6 | */ 7 | export async function native_copyToClipboard(text) { 8 | navigator.clipboard.writeText(text) 9 | .then(() => { 10 | return true; 11 | }) 12 | .catch(err => { 13 | throw err; 14 | }); 15 | } -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeRating.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCRating } from "../../styledComponents/inputs/SCRating"; 5 | 6 | export default function NativeRating(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeSwitch.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCSwitch } from "../../styledComponents/inputs/SCSwitch"; 5 | 6 | export default function NativeSwitch(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/layouts/NativeAppDiv.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCAppDiv } from "../../styledComponents/layouts/SCAppDiv"; 5 | 6 | export default function NativeAppDiv(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeTableHeadRow.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import NativeTableRow from "./NativeTableRow"; 5 | 6 | export default function NativeTableHeadRow(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/layouts/NativeGridItem.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCGridItem } from "../../styledComponents/layouts/SCGridItem"; 5 | 6 | export default function NativeGridItem(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/layouts/NativeListItem.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCListItem } from "../../styledComponents/layouts/SCListItem"; 5 | 6 | export default function NativeListItem(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/surfaces/NativeAppBar.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCAppBar } from "../../styledComponents/surfaces/SCAppBar"; 5 | 6 | export default function NativeAppBar(props) { 7 | 8 | return ( 9 | 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /package/nativeComponents/surfaces/NativeToolbar.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCToolbar } from "../../styledComponents/surfaces/SCToolbar"; 5 | 6 | export default function NativeToolBar(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeDivider.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCDivider } from "../../styledComponents/dataDisplay/SCDivider"; 5 | 6 | export default function NativeDivider(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeListItemIcon.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCListItemIcon } from "../../styledComponents/dataDisplay/SCListItemIcon"; 5 | 6 | export default function NativeListItemIcon(props) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeListItemText.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCListItemText } from "../../styledComponents/dataDisplay/SCListItemText"; 5 | 6 | export default function NativeListItemText(props) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/feedback/NativeBackdrop.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCBackdrop } from "../../styledComponents/feedback/SCBackdrop"; 5 | 6 | export default function NativeBackdrop(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/feedback/NativeSkeleton.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCSkeleton } from "../../styledComponents/feedback/SCSkeleton"; 5 | 6 | export default function NativeSkeleton(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/feedback/NativeSnackbar.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCSnackbar } from "../../styledComponents/feedback/SCSnackbar"; 5 | 6 | export default function NativeSnackbar(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeInputAdornment.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCInputAdornment } from "../../styledComponents/inputs/SCInputAdornment"; 5 | 6 | export default function NativeInputAdornment(props) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeListItemButton.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCListItemButton } from "../../styledComponents/inputs/SCListItemButton"; 5 | 6 | export default function NativeListItemButton(props) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/custom/NativeReactSelectInput.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { components } from "react-select"; 5 | 6 | export default function NativeReactSelectInput(props) { 7 | return ( 8 | 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /package/nativeComponents/surfaces/NativeCollapse.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCCollapse } from "../../styledComponents/surfaces/SCCollapse"; 5 | 6 | export default function NativeCollapse(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeListSubheader.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCListSubheader } from "../../styledComponents/dataDisplay/SCListSubheader"; 5 | 6 | export default function NativeListSubheader(props) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeTableRow.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCTableRow } from "../../styledComponents/dataDisplay/SCTableRow"; 5 | 6 | export default function NativeTableRow(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/feedback/NativeAlertTitle.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCAlertTitle } from "../../styledComponents/feedback/SCAlertTitle"; 5 | 6 | export default function NativeAlert(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/forms/coreFormConstants.js: -------------------------------------------------------------------------------- 1 | export const FORM_EDIT_MODE = "edit"; 2 | export const FORM_VIEW_MODE = "view"; 3 | 4 | export const FORM_XS_DEFAULT_GRID_SIZE = 12; 5 | export const FORM_SM_DEFAULT_GRID_SIZE = 6; 6 | export const FORM_MD_DEFAULT_GRID_SIZE = 4; 7 | export const FORM_LG_DEFAULT_GRID_SIZE = 3; 8 | export const FORM_XL_DEFAULT_GRID_SIZE = 3; 9 | -------------------------------------------------------------------------------- /package/nativeComponents/layouts/NativeContainer.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCContainer } from "../../styledComponents/layouts/SCContainer"; 5 | 6 | export default function NativeContainer(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/navigation/NativeMenuList.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCMenuList } from "../../styledComponents/navigation/SCMenuList"; 5 | 6 | export default function NativeMenuList(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/surfaces/NativeAccordion.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCAccordion } from "../../styledComponents/surfaces/SCAccordion"; 5 | 6 | export default function NativeAccordion(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/surfaces/NativeCardMedia.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCCardMedia } from "../../styledComponents/surfaces/SCCardMedia"; 5 | 6 | export default function NativeCardMedia(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeListItemAvatar.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCListItemAvatar } from "../../styledComponents/dataDisplay/SCListItemAvatar"; 5 | 6 | export default function NativeListItemAvatar(props) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeTableBody.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCTableBody } from "../../styledComponents/dataDisplay/SCTableBody"; 5 | 6 | export default function NativeTableBody(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeTableHead.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCTableHead } from "../../styledComponents/dataDisplay/SCTableHead"; 5 | 6 | export default function NativeTableHead(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeTooltip.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCTooltip } from "../../styledComponents/dataDisplay/SCTooltip"; 5 | 6 | export default function NativeTooltip(props) { 7 | return
{props.children}
; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeFormControlLabel.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCFormControlLabel } from "../../styledComponents/inputs/SCFormControlLabel"; 5 | 6 | export default function NativeFormControlLabel(props) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/surfaces/NativeCardHeader.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCCardHeader } from "../../styledComponents/surfaces/SCCardHeader"; 5 | 6 | export default function NativeCardHeader(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/heading/NativeH1.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import NativeH from "./NativeH"; 5 | 6 | export default function NativeH1(props) { 7 | return ( 8 | 9 | {props.children} 10 | 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/heading/NativeH2.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import NativeH from "./NativeH"; 5 | 6 | export default function NativeH2(props) { 7 | return ( 8 | 9 | {props.children} 10 | 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/heading/NativeH3.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import NativeH from "./NativeH"; 5 | 6 | export default function NativeH3(props) { 7 | return ( 8 | 9 | {props.children} 10 | 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/heading/NativeH4.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import NativeH from "./NativeH"; 5 | 6 | export default function NativeH4(props) { 7 | return ( 8 | 9 | {props.children} 10 | 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/heading/NativeH5.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import NativeH from "./NativeH"; 5 | 6 | export default function NativeH5(props) { 7 | return ( 8 | 9 | {props.children} 10 | 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/heading/NativeH6.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import NativeH from "./NativeH"; 5 | 6 | export default function NativeH6(props) { 7 | return ( 8 | 9 | {props.children} 10 | 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /package/nativeComponents/surfaces/NativeCardActions.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCCardActions } from "../../styledComponents/surfaces/SCCardActions"; 5 | 6 | export default function NativeCardActions(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/surfaces/NativeCardContent.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCCardContent } from "../../styledComponents/surfaces/SCCardContent"; 5 | 6 | export default function NativeCardContent(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeAutocomplete.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCAutocomplete } from "../../styledComponents/inputs/SCAutocomplete"; 5 | 6 | export default function NativeAutocomplete(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/navigation/NativeNavigation.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { BrowserRouter } from "react-router-dom"; 5 | 6 | export default function NativeNavigation(props) { 7 | const { children } = props; 8 | 9 | return {children}; 10 | } 11 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeTableFooter.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCTableFooter } from "../../styledComponents/dataDisplay/SCTableFooter"; 5 | 6 | export default function NativeTableFooter(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/paragraph/NativeLabel.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCTypography } from "../../../styledComponents/dataDisplay/SCTypography"; 5 | 6 | export default function NativeLabel(props) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/navigation/NativeTab.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCTab } from "../../styledComponents/navigation/SCTab"; 5 | 6 | export default function NativeTab(props) { 7 | return ( 8 | 9 | {props.children} 10 | 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /package/nativeComponents/layouts/NativeSpan.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCBox } from "../../styledComponents/layouts/SCBox"; 5 | 6 | export default function NativeSpan(props) { 7 | return ( 8 | 9 | {props.children} 10 | 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /package/nativeComponents/surfaces/NativeCardActionArea.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCCardActionArea } from "../../styledComponents/surfaces/SCCardActionArea"; 5 | 6 | export default function NativeCardActionArea(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeTableContainer.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCTableContainer } from "../../styledComponents/dataDisplay/SCTableContainer"; 5 | 6 | export default function NativeTableContainer(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeTableSortLabel.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCTableSortLabel } from "../../styledComponents/dataDisplay/SCTableSortLabel"; 5 | 6 | export default function NativeTableSortLabel(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/surfaces/NativeAccordionDetail.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCAccordionDetail } from "../../styledComponents/surfaces/SCAccordionDetail"; 5 | 6 | export default function NativeAccordionDetail(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/feedback/NativeCircularProgress.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCCircularProgress } from "../../styledComponents/feedback/SCCircularProgress"; 5 | 6 | export default function NativeCircularProgress(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/surfaces/NativeAccordionSummary.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCAccordionSummery } from "../../styledComponents/surfaces/SCAccordionSummery"; 5 | 6 | export default function NativeAccordionSummary(props) { 7 | return {props.children}; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeBadge.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCBadge } from "../../styledComponents/dataDisplay/SCBadge"; 5 | 6 | export default function NativeBadge(props) { 7 | const { children, ...restProps } = props; 8 | 9 | return {children}; 10 | } 11 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeListItemSecondaryAction.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCListItemSecondaryAction } from "../../styledComponents/dataDisplay/SCListItemSecondaryAction"; 5 | 6 | export default function NativeListItemSecondaryAction(props) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /package/theme/NativeThemeProvider.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { ThemeProvider, createTheme } from "@mui/material"; 5 | 6 | export default function NativeThemeProvider(props) { 7 | return ( 8 | 9 | {props.children} 10 | 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /package/nativeComponents/layouts/NativeBox.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCBox } from "../../styledComponents/layouts/SCBox"; 5 | 6 | const NativeBox = React.forwardRef((props, ref) => { 7 | return ; 8 | }); 9 | 10 | NativeBox.displayName = "NativeBox"; 11 | 12 | export default NativeBox; 13 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeTableCell.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCTableCell } from "../../styledComponents/dataDisplay/SCTableCell"; 5 | 6 | export default function NativeTableCell(props) { 7 | const { ...restProps } = props; 8 | 9 | return {props.children}; 10 | } 11 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeTableHeadCell.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import NativeTableCell from "./NativeTableCell"; 5 | 6 | export default function NativeTableHeadCell(props) { 7 | return ( 8 | 11 | {props.children} 12 | 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeTextField.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCTextField } from "../../styledComponents/inputs/SCTextField"; 5 | //do not use this component directly this is used for datepicker only internally 6 | export default function NativeTextField(props) { 7 | return ; 8 | } 9 | -------------------------------------------------------------------------------- /package/nativeComponents/navigation/NativeMenuItem.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCMenuItem } from "../../styledComponents/navigation/SCMenuItem"; 5 | 6 | export default function NativeMenuItem(props) { 7 | return ( 8 | 9 | {props.children} 10 | 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeAvatarGroup.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCAvatarGroup } from "../../styledComponents/dataDisplay/SCAvatarGroup"; 5 | 6 | export default function NativeAvatarGroup(props) { 7 | const { children, ...restProps } = props; 8 | 9 | return {children}; 10 | } 11 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/paragraph/NativeTypographyButton.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import NativeTypography from "../NativeTypography"; 5 | 6 | export default function NativeTypographyButton(props) { 7 | return ( 8 | 9 | {props.children} 10 | 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/paragraph/NativeTypographyOverline.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import NativeTypography from "../NativeTypography"; 5 | 6 | export default function NativeTypographyOverline(props) { 7 | return ( 8 | 9 | {props.children} 10 | 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/paragraph/NativeTypographySubtitle1.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import NativeTypography from "../NativeTypography"; 5 | 6 | export default function NativeTypographySubtitle1(props) { 7 | return ( 8 | 9 | {props.children} 10 | 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/paragraph/NativeTypographySubtitle2.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import NativeTypography from "../NativeTypography"; 5 | 6 | export default function NativeTypographySubtitle2(props) { 7 | return ( 8 | 9 | {props.children} 10 | 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /package/nativeComponents/NativeClickAwayListner.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { ClickAwayListener } from "@mui/material"; 5 | 6 | export default function NativeClickAwayListner(props) { 7 | const { children, ...restProps } = props; 8 | 9 | return ( 10 |
11 | {children} 12 |
13 |
); 14 | } 15 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeTextarea.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import NativeInput from "./NativeInput"; 5 | 6 | export default function NativeTextarea(props) { 7 | return ( 8 | 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeTablePagination.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCTablePagination } from "../../styledComponents/dataDisplay/SCTablePagination"; 5 | 6 | export default function NativeTablePagination(props) { 7 | return ( 8 | 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeAvatar.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCAvatar } from "../../styledComponents/dataDisplay/SCAvatar"; 5 | 6 | export default function NativeAvatar(props) { 7 | const { src, label, children, ...restProps } = props; 8 | 9 | return (label || children) ? ({label || children}) : ( ); 10 | } 11 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeTableBodyCell.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import NativeTableCell from "./NativeTableCell"; 5 | 6 | /** 7 | * @todo 8 | * after ellipsis support review 9 | * 10 | * @param {*} props 11 | * @returns 12 | */ 13 | export default function NativeTableBodyCell(props) { 14 | return ( 15 | 16 | {props.children} 17 | 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /package/styledComponents/inputs/SCOtpInput.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line import/no-unresolved 2 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 3 | import { MuiOtpInput } from "mui-one-time-password-input"; 4 | import styled from "styled-components"; 5 | 6 | const defaultStyleClasses = [StyledComponentsClasses.INPUTS.INPUT]; 7 | 8 | export const SCOtpInput = styled( 9 | MuiOtpInput, 10 | {} 11 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 12 | -------------------------------------------------------------------------------- /package/nativeComponents/navigation/NativeTabPanel.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | export default function NativeTabPanel(props) { 5 | const { children, value, index, ...other } = props; 6 | 7 | return ( 8 | 17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /package/styledComponents/surfaces/SCCollapse.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Collapse } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = []; 10 | 11 | export const SCCollapse = styled( 12 | Collapse, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/layouts/SCImageBackground.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Box } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = []; 10 | 11 | export const SCImageBackground = styled( 12 | Box, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/layouts/SCAppDiv.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | // eslint-disable-next-line import/no-unresolved 5 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 6 | import styled from "styled-components"; 7 | 8 | const defaultStyleClasses = [StyledComponentsClasses.LAYOUTS.APP_DIV]; 9 | 10 | export const SCAppDiv = styled( 11 | "div", 12 | {} 13 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 14 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/heading/NativeH.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import NativeTypography from "../NativeTypography"; 5 | 6 | export default function NativeH(props) { 7 | //DONT use this directly instead use NativeH1 to NativeH6 8 | return ( 9 | 14 | {props.children} 15 | 16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /package/nativeComponents/surfaces/NativeRightDrawer.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { useSelector } from "react-redux"; 5 | 6 | import { SCRightDrawer } from "../../styledComponents/navigation/SCRightDrawer"; 7 | 8 | export default function NativeRightDrawer(props) { 9 | const rightMenuOpen = useSelector((state) => state?.menu?.rightMenuOpen); 10 | 11 | return ( 12 | 13 | {props.children} 14 | 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeTable.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { getUUID } from "../../helper/appUtils"; 5 | import { SCTable } from "../../styledComponents/dataDisplay/SCTable"; 6 | 7 | export default function NativeTable(props) { 8 | let _uuid = getUUID(); 9 | let containerId = props?.NativeId ? "tc_" + props.NativeId : "tc_" + _uuid; 10 | 11 | return ( 12 | 13 | {props.children} 14 | 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /package/styledComponents/dataDisplay/SCImage.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line import/no-unresolved 2 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 3 | import styled from "styled-components"; 4 | 5 | const defaultStyleClasses = [StyledComponentsClasses.DATA_DISPLAY.IMAGE]; 6 | 7 | function getEffectiveStyleNative(styleClasses) { 8 | return getEffectiveStyle(styleClasses, "mobile", "paper"); 9 | } 10 | 11 | export const SCImage = styled( 12 | "img", 13 | {} 14 | )((props) => ({ ...getEffectiveStyleNative([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/inputs/SCFab.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Fab } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.INPUTS.FAB]; 10 | 11 | export const SCFab = styled( 12 | Fab, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/layouts/SCBox.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Box } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.LAYOUTS.BOX]; 10 | 11 | export const SCBox = styled( 12 | Box, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/utils/SCFade.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Fade } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.UTILS.FADE]; 10 | 11 | export const SCFade = styled( 12 | Fade, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/helper/appUtils.js: -------------------------------------------------------------------------------- 1 | export const getUUID = () => { 2 | let date = new Date().getTime(); 3 | let uuid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace( 4 | /[xy]/g, 5 | function (positionalCharValue) { 6 | let random = (date + Math.random() * 16) % 16 | 0; 7 | 8 | date = Math.floor(date / 16); 9 | return (positionalCharValue === "x" ? random : (random & 0x3) | 0x8).toString(16); 10 | } 11 | ); 12 | 13 | return uuid; 14 | // return window.self.crypto.randomUUID(); 15 | }; 16 | 17 | export const getTimestamp = () => { 18 | return new Date().getTime(); 19 | }; 20 | 21 | -------------------------------------------------------------------------------- /package/styledComponents/layouts/SCList.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { List } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.LAYOUTS.LIST]; 10 | 11 | export const SCList = styled( 12 | List, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/navigation/SCTab.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Tab } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.NAVIGATION.TAB]; 10 | 11 | export const SCTab = styled( 12 | Tab, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/utils/SCModal.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Modal } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.UTILS.MODAL]; 10 | 11 | export const SCModal = styled( 12 | Modal, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeFlatList.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | export default function NativeFlatList(props) { 5 | const { tableData, query, renderItem } = props; 6 | 7 | return query ? tableData 8 | ?.slice( 9 | query?.page * query?.maxRowInPage, 10 | query?.page * query?.maxRowInPage + query?.maxRowInPage 11 | ) 12 | ?.map((rowData, rowIndex) => renderItem(rowData, rowIndex)) 13 | : 14 | tableData 15 | ?.map((rowData, rowIndex) => renderItem(rowData, rowIndex)); 16 | } 17 | -------------------------------------------------------------------------------- /package/styledComponents/feedback/SCAlert.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Alert } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.FEEDBACK.ALERT]; 10 | 11 | export const SCAlert = styled( 12 | Alert, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/layouts/SCGrid.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Grid } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.LAYOUTS.GRID]; 10 | 11 | export const SCGrid = styled( 12 | Grid, 13 | {} 14 | )(({ styleClasses }) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/layouts/SCStack.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Stack } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.LAYOUTS.STACK]; 10 | 11 | export const SCStack = styled( 12 | Stack, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/navigation/SCLink.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Link } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.NAVIGATION.LINK]; 10 | 11 | export const SCLink = styled( 12 | Link, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/navigation/SCTabs.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Tabs } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.NAVIGATION.TABS]; 10 | 11 | export const SCTabs = styled( 12 | Tabs, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/surfaces/SCPaper.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Paper } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.SURFACES.PAPER]; 10 | 11 | export const SCPaper = styled( 12 | Paper, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/nativeComponents/surfaces/NativeCard.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { ButtonBase } from "@mui/material"; 5 | 6 | import { SCCard } from "../../styledComponents/surfaces/SCCard"; 7 | 8 | export default function NativeCard(props) { 9 | return props?.onClick ? ( 10 | 11 | 12 | {props.children} 13 | 14 | 15 | ) : ( 16 | { props.children } 17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /package/styledComponents/dataDisplay/SCIcon.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Icon } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.DATA_DISPLAY.ICON]; 10 | 11 | export const SCIcon = styled( 12 | Icon, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/feedback/SCDialog.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Dialog } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.FEEDBACK.DIALOG]; 10 | 11 | export const SCDialog = styled( 12 | Dialog, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/inputs/SCButton.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Button } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.INPUTS.BUTTON]; 10 | 11 | export const SCButton = styled( 12 | Button, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/inputs/SCRating.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Rating } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.INPUTS.Rating]; 10 | 11 | export const SCRating = styled( 12 | Rating, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/inputs/SCSelect.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Select } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.INPUTS.SELECT]; 10 | 11 | export const SCSelect = styled( 12 | Select, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/inputs/SCSwitch.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Switch } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.INPUTS.SWITCH]; 10 | 11 | export const SCSwitch = styled( 12 | Switch, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/layouts/SCGridItem.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Paper } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.LAYOUTS.GRID_ITEM]; 10 | 11 | export const SCGridItem = styled(Paper)(({ theme }) => ({ 12 | padding: theme.spacing(1), 13 | ...getEffectiveStyle([...defaultStyleClasses]), 14 | })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/utils/SCPopover.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Popover } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.UTILS.POPOVER]; 10 | 11 | export const SCPopover = styled( 12 | Popover, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/nativeComponents/dataTable/NativeDataTableToolPopover.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import NativePopover from "../utils/NativePopover"; 5 | 6 | export default function NativeDataTableToolPopover(props) { 7 | const { id, open, anchorEl, onClose, anchorOrigin } = props; 8 | 9 | return ( 10 | 17 | {props.children} 18 | 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /package/styledComponents/dataDisplay/SCChip.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Chip } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.DATA_DISPLAY.CHIP]; 10 | 11 | export const SCChip = styled( 12 | Chip, 13 | {} 14 | )(({ props }) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/dataDisplay/SCTable.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Table } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.DATA_DISPLAY.TABLE]; 10 | 11 | export const SCTable = styled( 12 | Table, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/inputs/custom/SCRichTextEditor.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line import/no-unresolved 2 | import { StyledComponentsClasses, getEffectiveStyle } from "@wrappid/styles"; 3 | import JoditEditor from "jodit-react"; 4 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 5 | import styled from "styled-components"; 6 | 7 | const defaultStyleClasses = [StyledComponentsClasses.INPUTS.CUSTOM.RICH_TEXT_EDITOR]; 8 | 9 | export const SCRichTextEditor = styled( 10 | JoditEditor, 11 | {} 12 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 13 | -------------------------------------------------------------------------------- /package/styledComponents/surfaces/SCToolbar.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Toolbar } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.SURFACES.TOOLBAR]; 10 | 11 | export const SCToolbar = styled( 12 | Toolbar, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/dataDisplay/SCAvatar.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Avatar } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.DATA_DISPLAY.AVATAR]; 10 | 11 | export const SCAvatar = styled( 12 | Avatar, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/dataDisplay/SCBadge.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Badge } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.DATA_DISPLAY.BADGE]; 10 | 11 | export const SCBadge = styled( 12 | Badge, 13 | {} 14 | )(({ props }) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/feedback/SCBackdrop.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Backdrop } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.FEEDBACK.BACKDROP]; 10 | 11 | export const SCBackdrop = styled( 12 | Backdrop, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/feedback/SCSkeleton.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Skeleton } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.FEEDBACK.SKELETON]; 10 | 11 | export const SCSkeleton = styled( 12 | Skeleton, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/feedback/SCSnackbar.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Snackbar } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.FEEDBACK.SNACKBAR]; 10 | 11 | export const SCSnackbar = styled( 12 | Snackbar, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/inputs/SCCheckbox.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Checkbox } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.INPUTS.CHECKBOX]; 10 | 11 | export const SCCheckbox = styled( 12 | Checkbox, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/inputs/SCFormGroup.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { FormGroup } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.FORM.FORM_GROUP]; 10 | 11 | export const SCFormGroup = styled( 12 | FormGroup, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/inputs/SCMenuItem.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { MenuItem } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.INPUTS.MENU_ITEM]; 10 | 11 | export const SCMenuItem = styled( 12 | MenuItem, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/layouts/SCListItem.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { ListItem } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.LAYOUTS.LIST_ITEM]; 10 | 11 | export const SCListItem = styled( 12 | ListItem, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/custom/NativeMarkdownViewer.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import ReactMarkdown from "react-markdown"; 5 | 6 | export default function NativeMarkdownViewer() { 7 | const markdown = `A paragraph with *emphasis* and **strong importance**. 8 | 9 | > A block quote with ~strikethrough~ and a URL: https://reactjs.org. 10 | 11 | * Lists 12 | * [ ] todo 13 | * [x] done 14 | 15 | A table: 16 | 17 | | a | b | 18 | | - | - | 19 | `; 20 | 21 | return ( 22 | {markdown} 23 | ); 24 | } 25 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeFormControl.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCFormControl } from "../../styledComponents/inputs/SCFormControl"; 5 | /** 6 | * @todo 7 | * added default fullWidth, set it to true as default 8 | * removed variant=standard. 9 | * need to handle impact. 10 | * @param {*} props 11 | * @returns 12 | */ 13 | export default function NativeFormControl(props) { 14 | const { fullWidth, ...restProps } = props; 15 | 16 | return ; 17 | } 18 | -------------------------------------------------------------------------------- /package/styledComponents/dataDisplay/SCDivider.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Divider } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.DATA_DISPLAY.DIVIDER]; 10 | 11 | export const SCDivider = styled( 12 | Divider, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/dataDisplay/SCTooltip.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Tooltip } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.DATA_DISPLAY.TOOLTIP]; 10 | 11 | export const SCTooltip = styled( 12 | Tooltip, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/feedback/SCAlertTitle.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { AlertTitle } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.FEEDBACK.ALERT]; 10 | 11 | export const SCAlertTitle = styled( 12 | AlertTitle, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/inputs/SCTextField.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { TextField } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.INPUTS.TEXT_FIELD]; 10 | 11 | export const SCTextField = styled( 12 | TextField, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/layouts/SCContainer.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Container } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.LAYOUTS.CONTAINER]; 10 | 11 | export const SCContainer = styled( 12 | Container, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/surfaces/SCAccordion.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Accordion } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.SURFACES.ACCORDION]; 10 | 11 | export const SCAccordion = styled( 12 | Accordion, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/dataDisplay/SCTableRow.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { TableRow } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.DATA_DISPLAY.TABLE_ROW]; 10 | 11 | export const SCTableRow = styled( 12 | TableRow, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/inputs/SCColorInput.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | // eslint-disable-next-line import/no-unresolved 5 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 6 | import { MuiColorInput } from "mui-color-input"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.INPUTS.INPUT]; 10 | 11 | export const SCColorInput = styled( 12 | MuiColorInput, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/inputs/SCIconButton.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { IconButton } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.INPUTS.ICON_BUTTON]; 10 | 11 | export const SCIconButton = styled( 12 | IconButton, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/inputs/SCInputLabel.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { InputLabel } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.INPUTS.INPUT_LABEL]; 10 | 11 | export const SCInputLabel = styled( 12 | InputLabel, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/surfaces/SCCardMedia.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { CardMedia } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.SURFACES.CARD_MEDIA]; 10 | 11 | export const SCCardMedia = styled( 12 | CardMedia, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/nativeComponents/helper/routerHelper.js: -------------------------------------------------------------------------------- 1 | import { 2 | Routes as NativeDomRoutes, 3 | Route as NativeDomRoute, 4 | Navigate as NativeDomNavigate, 5 | useNavigate as nativeUseNavigate, 6 | useLocation as nativeUseLocation, 7 | useParams as nativeUseParams, 8 | useSearchParams as nativeUseSearchParams 9 | } from "react-router-dom"; 10 | 11 | async function nativeOpenUrl(url){ 12 | window.open(url); 13 | } 14 | 15 | export { 16 | NativeDomRoutes, 17 | NativeDomRoute, 18 | NativeDomNavigate, 19 | nativeUseNavigate, 20 | nativeUseLocation, 21 | nativeUseParams, 22 | nativeUseSearchParams, 23 | nativeOpenUrl 24 | }; 25 | -------------------------------------------------------------------------------- /package/styledComponents/dataDisplay/SCTableBody.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { TableBody } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.DATA_DISPLAY.TABLE_BODY]; 10 | 11 | export const SCTableBody = styled( 12 | TableBody, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/dataDisplay/SCTableCell.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { TableCell } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.DATA_DISPLAY.TABLE_CELL]; 10 | 11 | export const SCTableCell = styled( 12 | TableCell, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/dataDisplay/SCTableHead.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { TableHead } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.DATA_DISPLAY.TABLE_HEAD]; 10 | 11 | export const SCTableHead = styled( 12 | TableHead, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/inputs/SCFormControl.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { FormControl } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.INPUTS.FORM_CONTROL]; 10 | 11 | export const SCFormControl = styled( 12 | FormControl, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/inputs/SCTimePicker.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { TimePicker } from "@mui/x-date-pickers"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.INPUTS.TIME_PICKER]; 10 | 11 | export const SCTimePicker = styled( 12 | TimePicker, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/surfaces/SCCard.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Card } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.SURFACES.CARD]; 10 | 11 | export const SCCard = styled( 12 | Card, 13 | {} 14 | )((props) => ({ 15 | width: "100%", 16 | ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]), 17 | })); 18 | -------------------------------------------------------------------------------- /package/styledComponents/surfaces/SCCardHeader.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { CardHeader } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.SURFACES.CARD_HEADER]; 10 | 11 | export const SCCardHeader = styled( 12 | CardHeader, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/dataDisplay/SCTypography.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Typography } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.DATA_DISPLAY.TYPOGRAPHY]; 10 | 11 | export const SCTypography = styled( 12 | Typography, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/feedback/SCDialogTitle.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { DialogTitle } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.FEEDBACK.DIALOG_TITLE]; 10 | 11 | export const SCDialogTitle = styled( 12 | DialogTitle, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/inputs/SCAutocomplete.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Autocomplete } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.INPUTS.AUTO_COMPLETE]; 10 | 11 | export const SCAutocomplete = styled( 12 | Autocomplete, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/surfaces/SCCardActions.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { CardActions } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.SURFACES.CARD_ACTIONS]; 10 | 11 | export const SCCardActions = styled( 12 | CardActions, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/surfaces/SCCardContent.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { CardContent } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.SURFACES.CARD_CONTENT]; 10 | 11 | export const SCCardContent = styled( 12 | CardContent, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/dataDisplay/SCAvatarGroup.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { AvatarGroup } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.DATA_DISPLAY.AVATAR_GROUP]; 10 | 11 | export const SCAvatarGroup = styled( 12 | AvatarGroup, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/dataDisplay/SCTableFooter.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { TableFooter } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.DATA_DISPLAY.TABLE_FOOTER]; 10 | 11 | export const SCTableFooter = styled( 12 | TableFooter, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/inputs/SCListItemButton.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { ListItemButton } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.INPUTS.ITEM_BUTTON]; 10 | 11 | export const SCListItemButton = styled( 12 | ListItemButton, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/dataDisplay/SCListItemIcon.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { ListItemIcon } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.DATA_DISPLAY.LIST_ITEM_ICON]; 10 | 11 | export const SCListItemIcon = styled( 12 | ListItemIcon, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/dataDisplay/SCListItemText.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { ListItemText } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.DATA_DISPLAY.LIST_ITEM_TEXT]; 10 | 11 | export const SCListItemText = styled( 12 | ListItemText, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/feedback/SCDialogActions.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { DialogActions } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.FEEDBACK.DIALOG_ACTIONS]; 10 | 11 | export const SCDialogActions = styled( 12 | DialogActions, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/feedback/SCDialogContent.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { DialogContent } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.FEEDBACK.DIALOG_CONTENT]; 10 | 11 | export const SCDialogContent = styled( 12 | DialogContent, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/inputs/SCFormHelperText.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { FormHelperText } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.INPUTS.FORM_HELPER_TEXT]; 10 | 11 | export const SCFormHelperText = styled( 12 | FormHelperText, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/inputs/SCInputAdornment.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { InputAdornment } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.INPUTS.INPUT_ADORNMENT]; 10 | 11 | export const SCInputAdornment = styled( 12 | InputAdornment, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/surfaces/SCAppBar.js: -------------------------------------------------------------------------------- 1 | // import { styled } from "@mui/material"; 2 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 3 | import React from "react"; 4 | 5 | import MuiAppBar from "@mui/material/AppBar"; 6 | // eslint-disable-next-line import/no-unresolved 7 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 8 | import styled from "styled-components"; 9 | 10 | const defaultStyleClasses = [StyledComponentsClasses.SURFACES.APP_BAR]; 11 | 12 | export const SCAppBar = styled(MuiAppBar, {})((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 13 | -------------------------------------------------------------------------------- /package/styledComponents/feedback/SCLinearProgress.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { LinearProgress } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.FEEDBACK.LINEAR_PROGRESS]; 10 | 11 | export const SCLinearProgress = styled( 12 | LinearProgress, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/surfaces/SCCardActionArea.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { CardActionArea } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.SURFACES.CARD_ACTION_AREA]; 10 | 11 | export const SCCardActionArea = styled( 12 | CardActionArea, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/dataDisplay/SCListItemAvatar.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { ListItemAvatar } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.DATA_DISPLAY.LIST_ITEM_AVATAR]; 10 | 11 | export const SCListItemAvatar = styled( 12 | ListItemAvatar, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/dataDisplay/SCListSubheader.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { ListSubheader } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.DATA_DISPLAY.LIST_ITEM_SUBHEADER]; 10 | 11 | export const SCListSubheader = styled( 12 | ListSubheader, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/dataDisplay/SCTableContainer.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { TableContainer } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.DATA_DISPLAY.TABLE_CONTAINER]; 10 | 11 | export const SCTableContainer = styled( 12 | TableContainer, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/inputs/SCFormControlLabel.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { FormControlLabel } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.INPUTS.FORM_CONTROL_LABEL]; 10 | 11 | export const SCFormControlLabel = styled( 12 | FormControlLabel, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/surfaces/SCAccordionDetail.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { AccordionDetails } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.SURFACES.ACCORDION_DETAILS]; 10 | 11 | export const SCAccordionDetail = styled( 12 | AccordionDetails, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/dataDisplay/SCTablePagination.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { TablePagination } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.DATA_DISPLAY.TABLE_PAGINATION]; 10 | 11 | export const SCTablePagination = styled( 12 | TablePagination, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/feedback/SCCircularProgress.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { CircularProgress } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.FEEDBACK.CIRCULAR_PROGRESS]; 10 | 11 | export const SCCircularProgress = styled( 12 | CircularProgress, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for native-web package 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /package/styledComponents/feedback/SCDialogContentText.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { DialogContentText } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.FEEDBACK.DIALOG_CONTENT_TEXT]; 10 | 11 | export const SCDialogContentText = styled( 12 | DialogContentText, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/inputs/SCDateTimePicker.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { DesktopDateTimePicker } from "@mui/x-date-pickers"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.INPUTS.DATE_TIME_PICKER]; 10 | 11 | export const SCDateTimePicker = styled( 12 | DesktopDateTimePicker, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/styledComponents/navigation/SCMenuItem.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { MenuItem } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.NAVIGATION.MENU_ITEM]; 10 | 11 | export const SCMenuItem = styled( 12 | MenuItem, 13 | {} 14 | )((props) => ({ 15 | backgroundColor: "#fff", 16 | ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]), 17 | })); 18 | -------------------------------------------------------------------------------- /package/styledComponents/navigation/SCMenuList.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { MenuList } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.NAVIGATION.MENU_LIST]; 10 | 11 | export const SCMenuList = styled( 12 | MenuList, 13 | {} 14 | )((props) => ({ 15 | backgroundColor: "#fff", 16 | ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]), 17 | })); 18 | -------------------------------------------------------------------------------- /package/styledComponents/surfaces/SCToolbox.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Box } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.SURFACES.TOOLBOX]; 10 | const NONE = "none"; 11 | 12 | export const SCToolbox = styled(Box, {})((props) => ({ 13 | 14 | ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]), 15 | resize: props.resize || NONE 16 | })); 17 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeTypography.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCTypography } from "../../styledComponents/dataDisplay/SCTypography"; 5 | 6 | const NativeTypography = React.forwardRef((props, ref) => { 7 | //Do not use this directly use NativeParagraph 8 | return ( 9 | 13 | {props?.code ?
{props.children}
: <>{props.children}} 14 |
15 | ); 16 | }); 17 | 18 | NativeTypography.displayName = "NativeTypography"; 19 | 20 | export default NativeTypography; 21 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/custom/NativeGithubAuthComponent.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-unused-vars */ 2 | // eslint-disable-next-line unused-imports/no-unused-imports 3 | import React from "react"; 4 | 5 | // eslint-disable-next-line import/no-unresolved 6 | import { UtilityClasses } from "@wrappid/styles"; 7 | 8 | import NativeImage from "../../dataDisplay/NativeImage"; 9 | 10 | export default function NativeGithubAuthComponent(props) { 11 | 12 | return ( 13 | 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /package/styledComponents/dataDisplay/SCTableSortLabel.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { TableSortLabel } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.DATA_DISPLAY.TABLE_SORT_LABEL]; 10 | 11 | export const SCTableSortLabel = styled( 12 | TableSortLabel, 13 | {} 14 | )((props) => ({ 15 | padding: 2, 16 | ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]), 17 | })); 18 | -------------------------------------------------------------------------------- /package/utils/network.utils.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export const useNetworkStatus = () => { 4 | const [isOnline, setIsOnline] = React.useState(navigator.onLine); 5 | 6 | React.useEffect(() => { 7 | function handleOnline() { 8 | setIsOnline(true); 9 | } 10 | 11 | function handleOffline() { 12 | setIsOnline(false); 13 | } 14 | 15 | window.addEventListener("online", handleOnline); 16 | window.addEventListener("offline", handleOffline); 17 | 18 | return () => { 19 | window.removeEventListener("online", handleOnline); 20 | window.removeEventListener("offline", handleOffline); 21 | }; 22 | }, []); 23 | 24 | return isOnline; 25 | }; 26 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/custom/NativeLinkedInAuthComponent.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | // eslint-disable-next-line import/no-unresolved 5 | import { UtilityClasses } from "@wrappid/styles"; 6 | 7 | import NativeImage from "../../dataDisplay/NativeImage"; 8 | 9 | export default function NativeLinkedInAuthComponent(props){ 10 | return ( 11 | <> 12 | 18 | 19 | 20 | ); 21 | } -------------------------------------------------------------------------------- /package/styledComponents/dataDisplay/SCListItemSecondaryAction.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { ListItemSecondaryAction } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.DATA_DISPLAY.LIST_ITEM_SECONDARY_ACTION]; 10 | 11 | export const SCListItemSecondaryAction = styled( 12 | ListItemSecondaryAction, 13 | {} 14 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 15 | -------------------------------------------------------------------------------- /package/NativeDimension.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | export default function NativeDimension(props) { 4 | const { children, setDimensions } = props; 5 | 6 | React.useEffect(() => { 7 | setDimensions({ 8 | screenFontScale: 1, // Default for web, #todo can be improve 9 | screenHeight : window.screen.height, 10 | screenScale : window.devicePixelRatio, 11 | screenWidth : window.screen.width, 12 | windowFontScale: 1, // Default for web, #todo can be improve 13 | windowHeight : window.innerHeight, 14 | windowScale : window.devicePixelRatio, 15 | windowWidth : window.innerWidth, 16 | }); 17 | }, []); 18 | 19 | return <>{children}; 20 | } -------------------------------------------------------------------------------- /package/styledComponents/inputs/SCInput.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { Input } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.INPUTS.INPUT]; 10 | 11 | export const SCInput = styled( 12 | Input, 13 | {} 14 | )((props) => ({ 15 | "&.MuiInputBase-root": { ":before": { borderBottomColor: props?.theme?.palette?.text?.primary } }, 16 | ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]), 17 | })); 18 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | valid_branch_names_regex="^WRPD-(feature|bugfix|release|ci|enhancement|hotfix|refactor|deps|docs|experimental|security)?-[0-9]+$|^main$|^development$" 5 | branch="$(git rev-parse --abbrev-ref HEAD)" 6 | 7 | if [ "$branch" = "main" ] || [ "$branch" = "development" ]; then 8 | echo "Committing on the $branch branch is not allowed." 9 | exit 1 10 | fi 11 | 12 | if ! [[ $branch =~ $valid_branch_n$branames_regex ]]; then 13 | echo "Invalid branch name: $branch; commit rejected" 14 | echo "Please rename your branch to conform to $valid_branch_names_regex pattern." 15 | exit 1 16 | fi 17 | # anable after linting config is created. 18 | # npx lint-staged 19 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/custom/NativeGoogleButton.js: -------------------------------------------------------------------------------- 1 | import { useEffect } from "react"; 2 | 3 | import NativeBox from "../../layouts/NativeBox"; 4 | 5 | export default function NativeGoogleButton() { 6 | 7 | useEffect(() => { 8 | // eslint-disable-next-line etc/no-commented-out-code 9 | {/*google.accounts.id.initialize({ 10 | callback: handleCallbackResponse, 11 | client_id: 12 | "426471191334-634bndbk8912ktqhopf6hqropojgsoc2.apps.googleusercontent.com", 13 | }); 14 | 15 | google.accounts.id.renderButton(document.getElementById("signInDiv"), { 16 | size : "large", 17 | theme: "outline", 18 | }); 19 | */}}, []); 20 | 21 | return ; 22 | } 23 | -------------------------------------------------------------------------------- /package/styledComponents/inputs/SCDatePicker.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { DesktopDatePicker } from "@mui/x-date-pickers/DesktopDatePicker"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.INPUTS.DATE_PICKER]; 10 | 11 | export const SCDatePicker = styled( 12 | /** 13 | * @todo review required by @sumanta-m 14 | */ 15 | DesktopDatePicker, 16 | {} 17 | )((props) => ({ ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]) })); 18 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/custom/NativeFacebookAuthComponent.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | // eslint-disable-next-line import/no-unresolved 5 | import { UtilityClasses } from "@wrappid/styles"; 6 | 7 | import NativeImage from "../../dataDisplay/NativeImage"; 8 | 9 | const NativeFacebookAuthComponent = (props) => { 10 | return ( 11 | 17 | ); 18 | }; 19 | 20 | export default NativeFacebookAuthComponent; -------------------------------------------------------------------------------- /package/nativeComponents/layouts/NativeStack.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCStack } from "../../styledComponents/layouts/SCStack"; 5 | import NativeDivider from "../dataDisplay/NativeDivider"; 6 | 7 | export default function NativeStack(props) { 8 | const { divider, direction, children, ...restProps } = props; 9 | 10 | let dividerComp = null; 11 | 12 | if(typeof divider === "boolean"){ 13 | dividerComp = ; 14 | } 15 | else{ 16 | dividerComp = divider; 17 | } 18 | 19 | return {children}; 20 | } 21 | -------------------------------------------------------------------------------- /package/nativeComponents/utils/NativePopover.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { getUUID } from "../../helper/appUtils"; 5 | import { SCPopover } from "../../styledComponents/utils/SCPopover"; 6 | 7 | export default function NativePopover(props) { 8 | const { 9 | // popover property 10 | id = getUUID(), 11 | // content 12 | // eslint-disable-next-line no-unused-vars 13 | headerComponent, 14 | children, 15 | // eslint-disable-next-line no-unused-vars 16 | footerComponent, 17 | ...restProps 18 | } = props; 19 | 20 | return ( 21 | 25 | {children} 26 | 27 | ); 28 | } 29 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeIconButton.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCIconButton } from "../../styledComponents/inputs/SCIconButton"; 5 | import NativeTooltip from "../dataDisplay/NativeTooltip"; 6 | 7 | export default function NativeIconButton(props) { 8 | const { 9 | title, 10 | titlePlacement = "bottom", 11 | size = "small", 12 | ...restProps 13 | } = props; 14 | 15 | return ( 16 | <> 17 | {title ? ( 18 | 19 | 20 | 21 | ) : ( 22 | 23 | )} 24 | 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /package/nativeComponents/layouts/NativeImageBackground.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars 2 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 3 | import React from "react"; 4 | 5 | // eslint-disable-next-line no-unused-vars 6 | 7 | import { SCImageBackground } from "../../styledComponents/layouts/SCImageBackground"; 8 | 9 | export default function NativeImageBackground(props) { 10 | const { source, resizeMode = "cover" } = props; 11 | 12 | return ( 13 | 21 | {props.children} 22 | 23 | ); 24 | } 25 | -------------------------------------------------------------------------------- /package/styledComponents/navigation/SCRightDrawer.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | 3 | import MuiDrawer from "@mui/material/Drawer"; 4 | // eslint-disable-next-line import/no-unresolved 5 | import { StyledComponentsClasses, WrappidData, getEffectiveStyle } from "@wrappid/styles"; 6 | import styled from "styled-components"; 7 | 8 | import { DEFAULT_DRAWER_WIDTH } from "./SCDrawer"; 9 | const { config } = WrappidData; 10 | 11 | export const SCRightDrawer = styled( 12 | MuiDrawer, 13 | {} 14 | )((props) => ({ 15 | "& .MuiDrawer-paper": { width: config?.drawerWidth || DEFAULT_DRAWER_WIDTH }, 16 | width : props?.open ? config?.drawerWidth || DEFAULT_DRAWER_WIDTH : 0, 17 | ...getEffectiveStyle([StyledComponentsClasses.APPBAR_HEIGHT, ...(props?.styleClasses || [])]), 18 | })); 19 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeFormErrorText.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | // eslint-disable-next-line import/no-unresolved 5 | import { UtilityClasses } from "@wrappid/styles"; 6 | 7 | import NativeFormHelperText from "./NativeFormHelperText"; 8 | import NativeIcon, { __IconTypes } from "../dataDisplay/NativeIcon"; 9 | 10 | export default function NativeFormErrorText(props) { 11 | return ( 12 | 17 | 23 | 24 | {props.children} 25 | 26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /package/nativeComponents/surfaces/NativeDrawer.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { useTheme } from "@mui/material/styles"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { StyledComponentsClasses, WrappidDataContext, getEffectiveStyle } from "@wrappid/styles"; 7 | 8 | import { SCDrawer } from "../../styledComponents/navigation/SCDrawer"; 9 | 10 | export default function NativeDrawer(props) { 11 | const { config } = React.useContext(WrappidDataContext); 12 | const materialTheme = useTheme(); 13 | 14 | return ( 15 | 21 | {props.children} 22 | 23 | ); 24 | } 25 | -------------------------------------------------------------------------------- /package/styledComponents/surfaces/SCAccordionSummery.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { AccordionSummary } from "@mui/material"; 5 | // eslint-disable-next-line import/no-unresolved 6 | import { getEffectiveStyle, StyledComponentsClasses } from "@wrappid/styles"; 7 | import styled from "styled-components"; 8 | 9 | const defaultStyleClasses = [StyledComponentsClasses.SURFACES.ACCORDION_SUMMERY]; 10 | 11 | export const SCAccordionSummery = styled( 12 | AccordionSummary, 13 | {} 14 | )((props) => ({ 15 | ...getEffectiveStyle([...defaultStyleClasses, ...(props?.styleClasses || [])]), 16 | "& .MuiAccordionSummary-content": { margin: "8px 0 !important" }, // Removes default top and bottom 12px margin to 8px of summary content 17 | minHeight : "unset !important", // Remove default min-height of 48px 18 | })); 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Wrappid native-web package [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/wrappid/native-web/blob/main/LICENSE) ![Dynamic JSON Badge](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.github.com%2Frepos%2Fwrappid%2Fnative-web%2Freleases%2Flatest&query=tag_name&label=%40wrappid%2Fnative-web) [![Release - CI](https://github.com/wrappid/native-web/actions/workflows/create-release.yml/badge.svg?branch=development)](https://github.com/wrappid/native-web/actions/workflows/create-release.yml) 2 | This package is a part of wrappid framework for wrappid-app projects, made for [wrappid/wrappid-app](https://github.com/wrappid/wrappid-app) projects initialised by wrappid/toolkit. 3 | 4 | This package contains react components, styled using [wrappid/styles](https://github.com/wrappid/styles) package, this package is used by [wrappid/core](https://github.com/wrappid/core) package. -------------------------------------------------------------------------------- /package/nativeComponents/navigation/NativeTabHead.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | // eslint-disable-next-line import/no-unresolved 5 | import { StyledComponentsClasses } from "@wrappid/styles"; 6 | 7 | import NativeTab from "./NativeTab"; 8 | import NativeTabs from "./NativeTabs"; 9 | 10 | export default function NativeTabHead(props) { 11 | const { tabsContent, handleChange, tabValue, styleClasses } = props; 12 | 13 | return 18 | { 19 | tabsContent?.map((tabContent, tabIndex) => 20 | 25 | ) 26 | } 27 | ; 28 | } 29 | -------------------------------------------------------------------------------- /package/nativeComponents/layouts/NativeAppContainer.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | // eslint-disable-next-line import/no-unresolved 5 | import { UtilityClasses } from "@wrappid/styles"; 6 | 7 | import NativeBox from "./NativeBox"; 8 | import NativeCssBaseline from "../../theme/NativeCssBaseline"; 9 | 10 | export default function NativeAppContainer(props) { 11 | const { appBar, leftDrawer, rightDrawer, footer, coreClasses } = props; 12 | 13 | return ( 14 | 17 | 18 | 19 | {appBar()} 20 | 21 | {leftDrawer()} 22 | 23 | 27 | {props.children} 28 | 29 | {footer()} 30 | 31 | 32 | {rightDrawer()} 33 | 34 | ); 35 | } 36 | 37 | -------------------------------------------------------------------------------- /package/nativeComponents/layouts/NativeSection.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | // eslint-disable-next-line import/no-unresolved 5 | import { UtilityClasses } from "@wrappid/styles"; 6 | 7 | import NativeH5 from "../dataDisplay/heading/NativeH5"; 8 | import NativeCard from "../surfaces/NativeCard"; 9 | import NativeCardContent from "../surfaces/NativeCardContent"; 10 | import NativeCardHeader from "../surfaces/NativeCardHeader"; 11 | 12 | export default function NativeSection(props) { 13 | const { styleClasses = [] } = props; 14 | 15 | return ( 16 | 19 | {props?.heading}} 22 | /> 23 | 24 | {props?.children} 25 | 26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Stack Trace** 24 | The stack trace of the bug if any. 25 | 26 | **Screenshots** 27 | If applicable, add screenshots to help explain your problem. 28 | 29 | **Desktop (please complete the following information):** 30 | - OS: [e.g. iOS] 31 | - Browser [e.g. chrome, safari] 32 | - Version [e.g. 22] 33 | 34 | **Smartphone (please complete the following information):** 35 | - Device: [e.g. iPhone6] 36 | - OS: [e.g. iOS8.1] 37 | - Browser [e.g. stock browser, safari] 38 | - Version [e.g. 22] 39 | 40 | **Additional context** 41 | Add any other context about the problem here. 42 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeButton.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCButton } from "../../styledComponents/inputs/SCButton"; 5 | 6 | export default function NativeButton(props) { 7 | const { 8 | label, 9 | startIcon, 10 | onClick, 11 | variant, 12 | innerRef, 13 | type, 14 | children, 15 | size = "small", 16 | ...restProps 17 | } = props; 18 | 19 | const UserActionLogging = () => { 20 | }; 21 | 22 | return ( 23 | { 30 | UserActionLogging(); 31 | if (onClick && typeof onClick === "function") { 32 | onClick(ele); 33 | } 34 | }} 35 | {...restProps} 36 | > 37 | {label ? label : children ? children : "LABEL NOT PROVIDED"} 38 | 39 | ); 40 | } 41 | -------------------------------------------------------------------------------- /package/nativeComponents/surfaces/NativeFooter.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | // eslint-disable-next-line import/no-unresolved 5 | import { UtilityClasses } from "@wrappid/styles"; 6 | 7 | import NativeDivider from "../dataDisplay/NativeDivider"; 8 | import NativeTypographyBody1 from "../dataDisplay/paragraph/NativeTypographyBody1"; 9 | import NativeBox from "../layouts/NativeBox"; 10 | import NativeGrid from "../layouts/NativeGrid"; 11 | 12 | export default function NativeFooter(props) { 13 | return ( 14 | 15 | 16 | 17 | 18 | 19 | {props?.footerText || "Wrappid Default Footer @ 2023 "} 20 | 21 | 22 | {/* eslint-disable-next-line etc/no-commented-out-code */} 23 | {/* */} 24 | 25 | 26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 wrappid 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * List of commit types allowed in commit messages. 3 | * 4 | * @author Ananta Kumar Ghosh 5 | */ 6 | const types = [ 7 | "build", 8 | "chore", 9 | "ci", 10 | "docs", 11 | "feat", 12 | "fix", 13 | "perf", 14 | "refactor", 15 | "revert", 16 | "style", 17 | "test" 18 | ]; 19 | 20 | /** 21 | * List of commit scopes allowed in commit messages. 22 | */ 23 | const scopes = ["config", "core", "global", "utils"]; 24 | 25 | // eslint-disable-next-line no-undef 26 | module.exports = { 27 | extends: ["@commitlint/config-conventional"], 28 | 29 | parserPreset: { parserOpts: { issuePrefixes: ["#"] } }, 30 | 31 | rules: { 32 | "body-leading-blank" : [2, "always"], 33 | "body-max-line-length": [2, "always", 250], 34 | "footer-empty" : [2, "never"], 35 | "footer-leading-blank": [2, "always"], 36 | "references-empty" : [2, "never"], 37 | "scope-case" : [2, "always", "camel-case"], 38 | "scope-empty" : [0, "always"], 39 | "scope-enum" : [2, "always", scopes], 40 | "type-enum" : [2, "always", types], 41 | }, 42 | }; 43 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeConfirmPasswordField.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCTextField } from "../../styledComponents/inputs/SCTextField"; 5 | 6 | export default function NativeConfirmPasswordField(props) { 7 | return ( 8 | 35 | ); 36 | } 37 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeColorInput.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | import NativeFormControl from "./NativeFormControl"; 4 | import NativeInputLabel from "./NativeInputLabel"; 5 | import { getUUID } from "../../helper/appUtils"; 6 | import { SCColorInput } from "../../styledComponents/inputs/SCColorInput"; 7 | 8 | export default function NativeColorInput(props) { 9 | const { 10 | NativeId = getUUID(), id, label, touched, error, value, onChange, ...restProps 11 | } = props; 12 | const [color, setColor] = React.useState(value || "#ffffff"); 13 | 14 | const handleChange = (newValue) => { 15 | setColor(newValue); 16 | onChange && onChange(newValue); 17 | }; 18 | 19 | return ( 20 | 21 | 0 ? true : false 25 | } 26 | htmlFor={id} 27 | > 28 | {label} 29 | 30 | 31 | 36 | 37 | ); 38 | } 39 | -------------------------------------------------------------------------------- /.github/scripts/get_latest_package_details.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TOKEN=$1 4 | 5 | # Set variables 6 | ORG="wrappid" 7 | PACKAGE_TYPE="npm" 8 | PACKAGE_NAME="native-web" 9 | OUTPUT_FILE="package_details.json" 10 | 11 | # Set API endpoint 12 | API_ENDPOINT="https://api.github.com/orgs/$ORG/packages/$PACKAGE_TYPE/$PACKAGE_NAME/versions" 13 | 14 | # Make API request and save response to file 15 | curl -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer $TOKEN" -H "X-GitHub-Api-Version: 2022-11-28" $API_ENDPOINT > $OUTPUT_FILE 16 | 17 | # -X DELETE # deletes all versions 18 | 19 | 20 | is_array=$(jq 'if type == "array" then true else false end' package_details.json) 21 | 22 | if [ "$is_array" == "true" ]; then 23 | # If the JSON file contains an array, extract the id and name of the first object 24 | id=$(jq '.[0].id' package_details.json) 25 | name=$(jq -r '.[0].name' package_details.json) 26 | else 27 | # If the JSON file contains a direct object, extract its id and name 28 | id=$(jq '.id' package_details.json) 29 | name=$(jq -r '.name' package_details.json) 30 | fi 31 | 32 | # Print the extracted id and name 33 | echo $id > id.txt 34 | echo "id: $id" 35 | echo $name > name.txt 36 | echo "name: $name" 37 | -------------------------------------------------------------------------------- /package/nativeComponents/navigation/NativeLink.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCLink } from "../../styledComponents/navigation/SCLink"; 5 | import NativeTooltip from "../dataDisplay/NativeTooltip"; 6 | 7 | export default function NativeLink(props) { 8 | // eslint-disable-next-line no-unused-vars 9 | const { title, titlePlacement = "top", size = "small", underline, ...restProps } = props; 10 | const newTabFlag = restProps?.href?.includes("http") ? true : false; 11 | 12 | return ( 13 | <> 14 | {title ? ( 15 | 16 | 22 | 23 | ) : ( 24 | 30 | )} 31 | 32 | ); 33 | } 34 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/custom/NativeMedicineSelector.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | import AsyncSelect from "react-select/async"; 4 | 5 | export default function NativeMedicineSelector(props) { 6 | const { 7 | components, 8 | customStyle, 9 | placeholder, 10 | onChange, 11 | isMulti, 12 | loadOptions, 13 | onKeyDown, 14 | defaultOptions, 15 | value, 16 | inputValue, 17 | onInputChange, 18 | } = props; 19 | 20 | const [defOptions, setDefaultOptions] = React.useState([]); 21 | 22 | React.useEffect(()=>{ 23 | setMountOptions(); 24 | }, [value]); 25 | 26 | const setMountOptions = async ()=>{ 27 | let ops = await loadOptions(); 28 | 29 | setDefaultOptions(ops); 30 | }; 31 | 32 | return ( 33 | 0 ? defOptions : defaultOptions} 42 | value={value} 43 | inputValue={inputValue} 44 | onInputChange={onInputChange} 45 | /> 46 | ); 47 | } 48 | -------------------------------------------------------------------------------- /.github/workflows/publish-package.yml: -------------------------------------------------------------------------------- 1 | name: Publish - CD 2 | 3 | on: 4 | workflow_dispatch: 5 | workflow_run: 6 | workflows: ["Release - CI"] 7 | types: 8 | - completed 9 | jobs: 10 | call-publish-package: 11 | # runs-on: ubuntu-latest 12 | permissions: write-all 13 | if: github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' 14 | uses: wrappid/workflows/.github/workflows/util-package-publish.yml@main 15 | with: 16 | EMAIL_NOTIFY: ${{ vars.EMAIL_NOTIFY }} 17 | EMAIL_SENDER_NAME: ${{ vars.EMAIL_SENDER_NAME }} 18 | secrets: 19 | WRAPPID_PUBLISH_TOKEN: ${{ secrets.WRAPPID_PUBLISH_TOKEN }} 20 | PAT: ${{ secrets.PAT }} 21 | EMAIL_SERVER_ADDRESS: ${{ secrets.EMAIL_SERVER_ADDRESS }} 22 | EMAIL_SERVER_PORT: ${{ secrets.EMAIL_SERVER_PORT }} 23 | EMAIL_USER_ID: ${{ secrets.EMAIL_USER_ID }} 24 | EMAIL_USER_PASSWORD: ${{ secrets.EMAIL_USER_PASSWORD }} 25 | EMAIL_TO: ${{ secrets.EMAIL_TO }} 26 | EMAIL_CC: ${{ secrets.EMAIL_CC }} ## Optional 27 | EMAIL_BCC: ${{ secrets.EMAIL_BCC }} ## Optional 28 | 29 | 30 | -------------------------------------------------------------------------------- /package/nativeComponents/feedback/NativeLinearProgress.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | // eslint-disable-next-line import/no-unresolved 5 | import { UtilityClasses } from "@wrappid/styles"; 6 | 7 | import { SCLinearProgress } from "../../styledComponents/feedback/SCLinearProgress"; 8 | import NativeTypography from "../dataDisplay/NativeTypography"; 9 | import NativeBox from "../layouts/NativeBox"; 10 | 11 | export default function NativeLinearProgress(props) { 12 | const { showLabel, ...restProps } = props; 13 | 14 | if (!showLabel) { 15 | return ; 16 | } else { 17 | return ( 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | {`${Math.round(restProps.value)}%`} 26 | 27 | 28 | 29 | ); 30 | } 31 | } -------------------------------------------------------------------------------- /.github/workflows/create-release.yml: -------------------------------------------------------------------------------- 1 | name: Release - CI 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | tag-name: 7 | type: string 8 | description: Enter tag 9 | schedule: 10 | - cron: "30 16 * * *" 11 | branches: 12 | - 'development' 13 | repository_dispatch: 14 | 15 | jobs: 16 | call-create-app-release: 17 | permissions: write-all 18 | uses: wrappid/workflows/.github/workflows/util-create-package-release.yml@main 19 | with: 20 | GIT_USER_NAME: ${{ vars.GIT_USER_NAME }} 21 | EMAIL_NOTIFY: ${{ vars.EMAIL_NOTIFY }} 22 | EMAIL_SENDER_NAME: ${{ vars.EMAIL_SENDER_NAME }} 23 | TOOLKIT_VERSION: ${{ vars.TOOLKIT_VERSION }} 24 | secrets: 25 | PAT: ${{ secrets.PAT }} 26 | GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }} 27 | WRAPPID_REGISTRY_TOKEN: ${{ secrets.WRAPPID_REGISTRY_TOKEN }} 28 | EMAIL_SERVER_ADDRESS: ${{ secrets.EMAIL_SERVER_ADDRESS }} 29 | EMAIL_SERVER_PORT: ${{ secrets.EMAIL_SERVER_PORT }} 30 | EMAIL_USER_ID: ${{ secrets.EMAIL_USER_ID }} 31 | EMAIL_USER_PASSWORD: ${{ secrets.EMAIL_USER_PASSWORD }} 32 | EMAIL_TO: ${{ secrets.EMAIL_TO }} 33 | EMAIL_CC: ${{ secrets.EMAIL_CC }} ## Optional 34 | EMAIL_BCC: ${{ secrets.EMAIL_BCC }} ## Optional 35 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeFormHelperText.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | // eslint-disable-next-line import/no-unresolved 5 | import { UtilityClasses } from "@wrappid/styles"; 6 | import { useSelector } from "react-redux"; 7 | 8 | import { SCFormHelperText } from "../../styledComponents/inputs/SCFormHelperText"; 9 | import NativeIcon, { __IconTypes } from "../dataDisplay/NativeIcon"; 10 | 11 | export default function NativeFormHelperText(props) { 12 | const { showHelperText = true } = useSelector((state) => state.forms); 13 | 14 | const disableIcon = props.disabledIcon === true ? true : true; 15 | 16 | return ( 17 | 21 | {showHelperText && ( 22 | <> 23 | {disableIcon === true ? null : } 29 | 30 | {props.children} 31 | 32 | )} 33 | 34 | ); 35 | } 36 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/custom/NativeRichTextEditor.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React, { useRef } from "react"; 3 | 4 | import { SCRichTextEditor } from "../../../styledComponents/inputs/custom/SCRichTextEditor"; 5 | import NativeInputLabel from "../NativeInputLabel"; 6 | 7 | export default function NativeRichTextEditor(props) { 8 | const ref = useRef(null); 9 | 10 | return ( 11 | <> 12 | 0 ? true : false 16 | } 17 | htmlFor={props.id} 18 | > 19 | {props.label} 20 | 21 | 22 | { 38 | props.formik?.setFieldValue(props.id, val); 39 | } 40 | } 41 | /> 42 | 43 | ); 44 | } 45 | -------------------------------------------------------------------------------- /.github/scripts/version_revert.sh: -------------------------------------------------------------------------------- 1 | # Specify the dependency to revert 2 | DEPENDENCY="version" 3 | VERSION_TYPE=patch 4 | # Specify the paths to the package.json files 5 | PACKAGE_JSON_PATHS=("package.json" "package/package.json") 6 | 7 | for PACKAGE_JSON_PATH in "${PACKAGE_JSON_PATHS[@]}"; do 8 | 9 | # Get the current version of the dependency 10 | CURRENT_VERSION=$(cat "$PACKAGE_JSON_PATH" | grep $DEPENDENCY | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]') 11 | 12 | # Decrement the specified version type 13 | if [ "$VERSION_TYPE" == "major" ]; then 14 | NEW_VERSION=$(echo $CURRENT_VERSION | awk -F. '{$1 = $1 - 1; $2 = 0; $3 = 0;} 1' | sed 's/ /./g') 15 | elif [ "$VERSION_TYPE" == "minor" ]; then 16 | NEW_VERSION=$(echo $CURRENT_VERSION | awk -F. '{$2 = $2 - 1; $3 = 0;} 1' | sed 's/ /./g') 17 | else 18 | NEW_VERSION=$(echo $CURRENT_VERSION | awk -F. '{$NF = $NF - 1;} 1' | sed 's/ /./g') 19 | fi 20 | 21 | # Check if the new version is valid (not negative) 22 | # if [[ "$NEW_VERSION" == *-* ]]; then 23 | # #echo "Error: Cannot revert version below 0" 24 | # break 25 | # else 26 | # continue 27 | # fi 28 | 29 | # Update the version in package.json 30 | sed -i "s|\"$DEPENDENCY\": \"$CURRENT_VERSION\"|\"$DEPENDENCY\": \"$NEW_VERSION\"|" "$PACKAGE_JSON_PATH" 31 | 32 | done 33 | echo "$VERSION_TYPE version reverted $DEPENDENCY from $CURRENT_VERSION to $NEW_VERSION" -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeInputPassword.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React, { useState } from "react"; 3 | 4 | import Visibility from "@mui/icons-material/Visibility"; 5 | import VisibilityOff from "@mui/icons-material/VisibilityOff"; 6 | 7 | import NativeIconButton from "./NativeIconButton"; 8 | import NativeInput from "./NativeInput"; 9 | import NativeInputAdornment from "./NativeInputAdornment"; 10 | 11 | export default function NativeInputPassword(props) { 12 | const [showPassword, togglePasswordView] = useState(false); 13 | 14 | const handleClickShowPassword = () => { 15 | togglePasswordView(!showPassword); 16 | }; 17 | 18 | const handleMouseDownPassword = (event) => { 19 | event.preventDefault(); 20 | }; 21 | 22 | return ( 23 | 29 | 35 | {showPassword ? : } 36 | 37 | 38 | } 39 | /> 40 | ); 41 | } 42 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeConfirmPassword.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React, { useState } from "react"; 3 | 4 | import Visibility from "@mui/icons-material/Visibility"; 5 | import VisibilityOff from "@mui/icons-material/VisibilityOff"; 6 | 7 | import NativeIconButton from "./NativeIconButton"; 8 | import NativeInput from "./NativeInput"; 9 | import NativeInputAdornment from "./NativeInputAdornment"; 10 | 11 | export default function NativeConfirmPassword(props) { 12 | const [showPassword, togglePasswordView] = useState(false); 13 | 14 | const handleClickShowPassword = () => { 15 | togglePasswordView(!showPassword); 16 | }; 17 | 18 | const handleMouseDownPassword = (event) => { 19 | event.preventDefault(); 20 | }; 21 | 22 | return ( 23 | 29 | 35 | {showPassword ? : } 36 | 37 | 38 | } 39 | /> 40 | ); 41 | } 42 | -------------------------------------------------------------------------------- /.github/scripts/version_bump.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Get the argument 4 | #echo Enter repo name: 5 | #repo=test1 6 | #echo Specify type- patch, minor. 7 | VERSION_TYPE=patch 8 | 9 | 10 | # Specify the dependency to bump 11 | DEPENDENCY="version" 12 | 13 | # Specify the paths to the package.json files 14 | PACKAGE_JSON_PATHS=("package.json" "package/package.json") 15 | 16 | for PACKAGE_JSON_PATH in "${PACKAGE_JSON_PATHS[@]}"; do 17 | # Get the current version of the dependency 18 | CURRENT_VERSION=$(cat "$PACKAGE_JSON_PATH" | grep $DEPENDENCY | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]') 19 | 20 | # Increment the specified version type 21 | if [ "$VERSION_TYPE" == "major" ]; then 22 | NEW_VERSION=$(echo $CURRENT_VERSION | awk -F. '{$1 = $1 + 1; $2 = 0; $3 = 0;} 1' | sed 's/ /./g') 23 | elif [ "$VERSION_TYPE" == "minor" ]; then 24 | NEW_VERSION=$(echo $CURRENT_VERSION | awk -F. '{$2 = $2 + 1; $3 = 0;} 1' | sed 's/ /./g') 25 | else 26 | NEW_VERSION=$(echo $CURRENT_VERSION | awk -F. '{$NF = $NF + 1;} 1' | sed 's/ /./g') 27 | fi 28 | 29 | # Update the version in package.json 30 | sed -i "s|\"$DEPENDENCY\": \"$CURRENT_VERSION\"|\"$DEPENDENCY\": \"$NEW_VERSION\"|" "$PACKAGE_JSON_PATH" 31 | 32 | #echo "$VERSION_TYPE bumped $DEPENDENCY from $CURRENT_VERSION to $NEW_VERSION in $PACKAGE_JSON_PATH" 33 | done 34 | echo "$VERSION_TYPE bumped $DEPENDENCY from $CURRENT_VERSION to $NEW_VERSION" 35 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Description 2 | 3 | Clearly describe the changes you've made in this pull request. Explain the purpose and reasoning behind the changes. Reference any relevant issues or discussions using keywords like "Fixes #" or "Resolves #". 4 | 5 | ## Related Issues 6 | 7 | 8 | 9 | ## Testing 10 | 11 | 12 | ## Checklist 13 | 14 | - [ ] I have performed a thorough self-review of my code. 15 | - [ ] I have added or updated relevant tests for my changes. 16 | - [ ] My code follows the project's style guidelines and best practices. 17 | - [ ] I have updated the documentation if necessary. 18 | - [ ] I have added or updated relevant comments in my code. 19 | - [ ] I have resolved any merge conflicts of my branch. 20 | 21 | 22 | ## Screenshots (if applicable) 23 | 24 | 25 | ## Additional Notes 26 | 27 | 28 | 29 | ## Reviewers 30 | 31 | 34 | 35 | --- 36 | 37 | ## Maintainer Notes 38 | 39 | - [ ] Has this change been tested in a staging environment? 40 | - [ ] Does this change introduce any breaking changes or deprecations? 41 | -------------------------------------------------------------------------------- /package/nativeComponents/navigation/NativeScrollTop.js: -------------------------------------------------------------------------------- 1 | import useScrollTrigger from "@mui/material/useScrollTrigger"; 2 | import PropTypes from "prop-types"; 3 | 4 | import NativeBox from "../layouts/NativeBox"; 5 | import NativeFade from "../utils/NativeFade"; 6 | 7 | export default function NativeScrollTop(props) { 8 | const { children, window } = props; 9 | // Note that you normally won't need to set the window ref as useScrollTrigger 10 | // will default to window. 11 | // This is only being set here because the demo is in an iframe. 12 | const trigger = useScrollTrigger({ 13 | disableHysteresis: true, 14 | target : window ? window() : undefined, 15 | threshold : 100, 16 | }); 17 | 18 | const handleClick = (event) => { 19 | const anchor = (event.target.ownerDocument || document).querySelector( 20 | "#back-to-top-anchor" 21 | ); 22 | 23 | if (anchor) { 24 | anchor.scrollIntoView({ block: "center" }); 25 | } 26 | }; 27 | 28 | return ( 29 | 30 | 35 | {children} 36 | 37 | 38 | ); 39 | } 40 | 41 | NativeScrollTop.propTypes = { 42 | children: PropTypes.element.isRequired, 43 | /** 44 | * Injected by the documentation to work in an iframe. 45 | * You won't need it on your project. 46 | */ 47 | window : PropTypes.func, 48 | }; 49 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/paragraph/NativeTypographyBody1.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React, { useState } from "react"; 3 | 4 | // eslint-disable-next-line import/no-unresolved 5 | import { UtilityClasses } from "@wrappid/styles"; 6 | 7 | import NativeSpan from "../../layouts/NativeSpan"; 8 | import NativeLink from "../../navigation/NativeLink"; 9 | import NativeTypography from "../NativeTypography"; 10 | 11 | export default function NativeTypographyBody1(props) { 12 | const { hideSeeMore = false, limitChars } = props; 13 | const [seeMore, setSeeMore] = useState(true); 14 | const toggleSeeMore = () => { 15 | setSeeMore(!seeMore); 16 | }; 17 | 18 | return props?.limitChars ? ( 19 | 20 | 21 | {typeof props?.children === "string" && seeMore 22 | ? limitChars > props?.children?.length 23 | ? props?.children 24 | : props?.children.slice(0, limitChars) + "..." 25 | : props?.children} 26 | 27 | 28 | {!hideSeeMore && limitChars < props?.children?.length && ( 29 | 33 | {seeMore ? "See more" : "See less"} 34 | 35 | )} 36 | 37 | ) : ( 38 | 39 | {props?.children} 40 | 41 | ); 42 | } -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeSelect.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import NativeFormControl from "./NativeFormControl"; 5 | import NativeFormHelperText from "./NativeFormHelperText"; 6 | import NativeInputLabel from "./NativeInputLabel"; 7 | import NativeMenuItem from "./NativeMenuItem"; 8 | import { getUUID } from "../../helper/appUtils"; 9 | import { SCSelect } from "../../styledComponents/inputs/SCSelect"; 10 | 11 | export default function NativeSelect(props) { 12 | const { 13 | id, label, selectID, value, handleChange, options, children 14 | } = props; 15 | 16 | return ( 17 | 18 | {label} 19 | 20 | 28 | {children ? children : options.map((option, index) => { 29 | return ( 30 | 34 | {option?.label || `Option ${index}`} 35 | 36 | ); 37 | })} 38 | 39 | 40 | {props?.helperText && {props?.helperText} } 41 | 42 | ); 43 | } 44 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/paragraph/NativeTypographyBody2.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React, { useState } from "react"; 3 | 4 | // eslint-disable-next-line import/no-unresolved 5 | import { UtilityClasses } from "@wrappid/styles"; 6 | 7 | import NativeSpan from "../../layouts/NativeSpan"; 8 | import NativeLink from "../../navigation/NativeLink"; 9 | import NativeTypography from "../NativeTypography"; 10 | 11 | export default function NativeTypographyBody2(props) { 12 | const { hideSeeMore = false, limitChars } = props; 13 | 14 | const [seeMore, setSeeMore] = useState(true); 15 | const toggleSeeMore = () => { 16 | setSeeMore(!seeMore); 17 | }; 18 | 19 | return limitChars ? ( 20 | 21 | 22 | {typeof props?.children === "string" && seeMore 23 | ? limitChars > props?.children?.length 24 | ? props?.children 25 | : props?.children.slice(0, limitChars) + "..." 26 | : props?.children} 27 | 28 | 29 | {!hideSeeMore && limitChars < props?.children?.length && ( 30 | 34 | {seeMore ? "See more" : "See less"} 35 | 36 | )} 37 | 38 | ) : ( 39 | 40 | {props?.children} 41 | 42 | ); 43 | } 44 | -------------------------------------------------------------------------------- /package/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@wrappid/native-web", 3 | "version": "0.0.364", 4 | "description": "This repository is combined packages of all the Styled Components for react web project.", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "test" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/wrappid/native-web.git" 12 | }, 13 | "publishConfig": { 14 | "registry": "https://npm.pkg.github.com/" 15 | }, 16 | "keywords": [ 17 | "react", 18 | "material-ui", 19 | "styled-components" 20 | ], 21 | "license": "MIT", 22 | "author": { 23 | "name": "Wrappid", 24 | "email": "wrappid.framework@gmail.com", 25 | "url": "https://github.com/wrappid/" 26 | }, 27 | "homepage": "https://github.com/wrappid/native-web", 28 | "bugs": { 29 | "url": "https://github.com/wrappid/native-web/issues" 30 | }, 31 | "peerDependencies": { 32 | "@mui/icons-material": "5.15.20", 33 | "@mui/material": "5.15.20", 34 | "@mui/x-date-pickers": "5.0.8", 35 | "jodit-react": "1.3.39", 36 | "jsoneditor": "9.10.0", 37 | "moment": "2.29.4", 38 | "mui-color-input": "2.0.3", 39 | "mui-one-time-password-input": "1.1.0", 40 | "react-markdown": "8.0.7", 41 | "react-otp-input": "3.0.2", 42 | "react-redux": "8.0.2", 43 | "react-router-dom": "6.3.0", 44 | "react-select": "5.7.3", 45 | "styled-components": "5.3.9" 46 | }, 47 | "peerDependenciesMeta": { 48 | "react": { 49 | "optional": true 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/paragraph/NativeTypographyCaption.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React, { useState } from "react"; 3 | 4 | // eslint-disable-next-line import/no-unresolved 5 | import { UtilityClasses } from "@wrappid/styles"; 6 | 7 | import NativeSpan from "../../layouts/NativeSpan"; 8 | import NativeLink from "../../navigation/NativeLink"; 9 | import NativeTypography from "../NativeTypography"; 10 | 11 | export default function NativeTypographyCaption(props) { 12 | const { hideSeeMore = false, limitChars } = props; 13 | 14 | const [seeMore, setSeeMore] = useState(true); 15 | const toggleSeeMore = () => { 16 | setSeeMore(!seeMore); 17 | }; 18 | 19 | return limitChars ? ( 20 | 21 | 22 | {typeof props?.children === "string" && seeMore 23 | ? limitChars > props?.children?.length 24 | ? props?.children 25 | : props?.children.slice(0, limitChars) + "..." 26 | : props?.children} 27 | 28 | 29 | {!hideSeeMore && limitChars < props?.children?.length && ( 30 | 34 | {seeMore ? "See more" : "See less"} 35 | 36 | )} 37 | 38 | ) : ( 39 | 40 | {props?.children} 41 | 42 | ); 43 | } 44 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeJSONInput.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import NativeInput from "./NativeInput"; 5 | 6 | export default function NativeJSONInput(props) { 7 | const { id, value = {}, formik, onChange } = props; 8 | const [JSONValue, setJSONValue] = React.useState(value); 9 | 10 | React.useEffect(() => { 11 | let tmpValue = value 12 | ? typeof value === "object" 13 | ? JSON.stringify(value, null, 4) 14 | : value 15 | : "{}"; 16 | 17 | setJSONValue(value); 18 | formik?.setFieldValue(id, tmpValue); 19 | }, []); 20 | 21 | React.useEffect(() => { 22 | setJSONValue(value); 23 | }, [value]); 24 | 25 | const handleChange = (event) => { 26 | let finalValue = event.target.value; 27 | 28 | try { 29 | finalValue = JSON.parse(finalValue); 30 | finalValue = JSON.stringify(finalValue, null, 4); 31 | } catch (err) { 32 | // eslint-disable-next-line no-console 33 | console.error("Not a valid json", err); 34 | } 35 | if (formik) { 36 | formik.setFieldValue(id, finalValue); 37 | } 38 | setJSONValue(finalValue); 39 | 40 | // on change as props 41 | if (onChange) { 42 | onChange(event); 43 | } 44 | }; 45 | 46 | return ( 47 | 58 | ); 59 | } 60 | -------------------------------------------------------------------------------- /package/nativeComponents/dataDisplay/NativeIcon.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { SCIcon } from "../../styledComponents/dataDisplay/SCIcon"; 5 | 6 | /** 7 | * - important notice 8 | * - children > props > options(local/db) > default 9 | * 10 | * @param {*} props 11 | * @returns 12 | */ 13 | 14 | export const __IconTypes = { 15 | FONTAWESOME_V5_REGULAR_ICON: "far", 16 | FONTAWESOME_V5_SOLID_ICON : "fas", 17 | 18 | MATERIAL_ICON : "material-icons", 19 | // Default support of MUI 20 | MATERIAL_OUTLINED_ICON: "material-icons-outlined", 21 | RXICON_V1_REGULAR_ICON: "rxi", 22 | }; 23 | 24 | export default function NativeIcon(props) { 25 | const { 26 | type, name, styleClasses, sx, size, fontSize, color 27 | } = props; 28 | 29 | return props.childrenFlag ? ( 30 | 40 | {name} 41 | 42 | ) : ( 43 | 53 | ); 54 | } 55 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeDateTimePicker.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { LocalizationProvider } from "@mui/x-date-pickers"; 5 | import { AdapterMoment } from "@mui/x-date-pickers/AdapterMoment"; 6 | // eslint-disable-next-line import/no-unresolved 7 | 8 | import NativeTextField from "./NativeTextField"; 9 | import { SCDateTimePicker } from "../../styledComponents/inputs/SCDateTimePicker"; 10 | 11 | export default function NativeDateTimePicker(props) { 12 | const { id, label, formik, value: propsValue, onChange: propsOnChange } = props; 13 | 14 | const handleChange = (newValue) => { 15 | const formattedValue = newValue ? newValue.format("YYYY-MM-DD hh:mm a") : null; 16 | 17 | if (formik) { 18 | formik.setFieldValue(id, formattedValue); 19 | } 20 | if (propsOnChange) { 21 | propsOnChange(formattedValue); 22 | } 23 | }; 24 | 25 | const value = formik ? formik.values[id] : propsValue; 26 | 27 | return ( 28 | 29 | 0 ? true : false 38 | } 39 | renderInput={(params) => ( 40 | 45 | )} 46 | /> 47 | 48 | ); 49 | } 50 | 51 | -------------------------------------------------------------------------------- /package/helper/helper.js: -------------------------------------------------------------------------------- 1 | import { createFilterOptions as nativeFilterOptions } from "@mui/material/Autocomplete"; 2 | import moment from "moment"; 3 | function getValidDateTime(dateTimeString){ 4 | try{ 5 | return moment(dateTimeString); 6 | } 7 | catch(err){ 8 | return ""; 9 | } 10 | } 11 | function queryBuilder(url, query) { 12 | let newUrl = url; 13 | 14 | if ( 15 | query && 16 | Object.keys(query).length > 0 /* && 17 | Object.values(query).find((v) => v && v !== "") */ 18 | ) { 19 | newUrl += "?"; 20 | let keys = Object.keys(query); 21 | 22 | for (let index = 0; index < keys.length; index++) { 23 | let qKey = keys[index]; 24 | 25 | // not needed below if statement, 26 | // because it is not considering the value 0 i.e.treated as false 27 | // although 0 should be as a parameter value for api query params 28 | 29 | if (index > 0 && newUrl.charAt(newUrl.length - 1) !== "?") { 30 | newUrl += 31 | "&" + 32 | qKey + 33 | "=" + 34 | (typeof query[qKey] === "object" ? JSON.stringify(query[qKey]) : query[qKey]); 35 | } else { 36 | newUrl += qKey + "=" + query[qKey]; 37 | } 38 | } 39 | } 40 | return newUrl; 41 | } 42 | export const getNativeDeviceDetails = () => { 43 | let device = null; 44 | let deviceBrand = null; 45 | let deviceOS = null; 46 | let deviceOSVersion = null; 47 | let browser = null; 48 | let browserVersion = null; 49 | 50 | return { 51 | brand : deviceBrand, 52 | browser : browser, 53 | browserVersion: browserVersion, 54 | name : device, 55 | os : deviceOS, 56 | osVersion : deviceOSVersion 57 | }; 58 | }; 59 | 60 | export { nativeFilterOptions, queryBuilder, getValidDateTime }; -------------------------------------------------------------------------------- /.github/workflows/create-tag.yml: -------------------------------------------------------------------------------- 1 | name: Create-Tag 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | version_type: 7 | type: choice 8 | description: Choose version bump type 9 | options: 10 | - -r major 11 | - -r minor 12 | - -r patch 13 | - -p alpha 14 | - -p beta 15 | - -p build 16 | - -p hotfix 17 | - -p dev 18 | required: true 19 | default: "-r patch" 20 | pull_request: 21 | types: 22 | - closed 23 | branches: 24 | - 'development' 25 | 26 | jobs: 27 | call-create-tag: 28 | # runs-on: ubuntu-latest 29 | permissions: write-all 30 | if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'development') 31 | uses: wrappid/workflows/.github/workflows/util-create-tag.yml@main 32 | with: 33 | GIT_USER_NAME: ${{ vars.GIT_USER_NAME }} 34 | VERSION_TYPE_REPOSITORY_DEFAULT: ${{ vars.VERSION_TYPE_REPOSITORY_DEFAULT }} 35 | EMAIL_NOTIFY: ${{ vars.EMAIL_NOTIFY }} 36 | EMAIL_SENDER_NAME: ${{ vars.EMAIL_SENDER_NAME }} 37 | secrets: 38 | PAT: ${{ secrets.PAT }} 39 | GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }} 40 | WRAPPID_REGISTRY_TOKEN: ${{ secrets.WRAPPID_REGISTRY_TOKEN }} 41 | EMAIL_SERVER_ADDRESS: ${{ secrets.EMAIL_SERVER_ADDRESS }} 42 | EMAIL_SERVER_PORT: ${{ secrets.EMAIL_SERVER_PORT }} 43 | EMAIL_USER_ID: ${{ secrets.EMAIL_USER_ID }} 44 | EMAIL_USER_PASSWORD: ${{ secrets.EMAIL_USER_PASSWORD }} 45 | EMAIL_TO: ${{ secrets.EMAIL_TO }} 46 | EMAIL_CC: ${{ secrets.EMAIL_CC }} ## Optional 47 | EMAIL_BCC: ${{ secrets.EMAIL_BCC }} ## Optional 48 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeCheckbox.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | // eslint-disable-next-line import/no-unresolved 5 | import { UtilityClasses } from "@wrappid/styles"; 6 | 7 | import NativeFormControlLabel from "./NativeFormControlLabel"; 8 | import { SCCheckbox } from "../../styledComponents/inputs/SCCheckbox"; 9 | 10 | export default function NativeCheckbox(props) { 11 | const { 12 | id, 13 | styleClasses = [], 14 | formik, 15 | // children, 16 | onChange, 17 | label, 18 | value, 19 | ...restProps 20 | } = props; 21 | 22 | return ( 23 | <> 24 | {label ? ( 25 | { 38 | formik?.setFieldValue(id, event.target.checked); 39 | } 40 | } 41 | /> 42 | } 43 | /> 44 | ) : ( 45 | { 54 | formik?.setFieldValue(id, event.target.checked); 55 | } 56 | } 57 | /> 58 | )} 59 | 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeDatepicker.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import { LocalizationProvider } from "@mui/x-date-pickers"; 5 | import { AdapterMoment } from "@mui/x-date-pickers/AdapterMoment"; 6 | 7 | import NativeTextField from "./NativeTextField"; 8 | import { getValidDateTime } from "../../helper/helper"; 9 | import { SCDatePicker } from "../../styledComponents/inputs/SCDatePicker"; 10 | 11 | export default function NativeDatePicker(props) { 12 | const { 13 | id, 14 | name, 15 | label, 16 | onChange, 17 | value, 18 | disablePast, 19 | disableFuture, 20 | formik, 21 | shouldDisableDate, 22 | minDate, 23 | maxDate, 24 | } = props; 25 | 26 | return ( 27 | 28 | { 37 | onChange && !formik 38 | ? onChange(value) 39 | : formik?.setFieldValue( 40 | id, 41 | value ? value?.format("YYYY-MM-DD") : null 42 | ); 43 | }} 44 | fullWidth={true} 45 | disablePast={disablePast} 46 | disableFuture={disableFuture} 47 | shouldDisableDate={shouldDisableDate} 48 | renderInput={(params) => ( 49 | 54 | )} 55 | /> 56 | 57 | ); 58 | } -------------------------------------------------------------------------------- /package/styledComponents/navigation/SCDrawer.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | 3 | import MuiDrawer from "@mui/material/Drawer"; 4 | // eslint-disable-next-line import/no-unresolved 5 | import { StyledComponentsClasses, getEffectiveStyle } from "@wrappid/styles"; 6 | import styled from "styled-components"; 7 | 8 | const defaultStyleClasses = [StyledComponentsClasses.NAVIGATION.DRAWER]; 9 | 10 | export const DEFAULT_DRAWER_WIDTH = 240; 11 | 12 | export const DEFAULT_MINI_DRAWER_WIDTH = 56; 13 | 14 | const openedMixin = (config, theme) => ({ 15 | ...getEffectiveStyle(StyledComponentsClasses.APP_BAR.HEIGHT), 16 | transition: theme.transitions.create("width", { 17 | duration: theme.transitions.duration.enteringScreen, 18 | easing : theme.transitions.easing.sharp, 19 | }), 20 | width: `${config?.drawerWidth || DEFAULT_DRAWER_WIDTH}px`, 21 | }); 22 | 23 | const closedMixin = (config, theme) => ({ 24 | ...getEffectiveStyle(StyledComponentsClasses.APP_BAR.HEIGHT), 25 | transition: theme.transitions.create("width", { 26 | duration: theme.transitions.duration.leavingScreen, 27 | easing : theme.transitions.easing.sharp, 28 | }), 29 | width : 0, 30 | [theme.breakpoints.up("sm")]: { width: `${config?.miniDrawerWidth || DEFAULT_MINI_DRAWER_WIDTH}px` }, 31 | }); 32 | 33 | export const SCDrawer = styled(MuiDrawer, { shouldForwardProp: (prop) => prop !== "open" })(({ config, open, theme }) => ({ 34 | /** 35 | * @todo 36 | * Must support external styleClasses through props 37 | */ 38 | ...getEffectiveStyle([...defaultStyleClasses]), 39 | ...(open && { 40 | ...openedMixin(config, theme), 41 | "& .MuiDrawer-paper": openedMixin(config, theme), 42 | }), 43 | ...(!open && { 44 | ...closedMixin(config, theme), 45 | "& .MuiDrawer-paper": closedMixin(config, theme), 46 | }), 47 | })); 48 | -------------------------------------------------------------------------------- /package/nativeComponents/layouts/NativeGrid.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React, { useState, useEffect, Children } from "react"; 3 | 4 | import { getUUID } from "../../helper/appUtils"; 5 | import { getGridSizeProps } from "../../helper/componentUtil"; 6 | import { SCGrid } from "../../styledComponents/layouts/SCGrid"; 7 | export default function NativeGrid(props) { 8 | const [_uuid, setUuid] = useState(null); 9 | const [containerId, setContainerId] = useState(null); 10 | 11 | useEffect(()=>{ 12 | setUuid(getUUID()); 13 | setContainerId(props?.NativeId ? "gc_" + props.NativeId : "gc_" + _uuid); 14 | }, []); 15 | 16 | return ( 17 | 25 | {props?.item 26 | ? props.children 27 | : Children.toArray(props.children).map((child, index) => { 28 | let itemId = child.props?.NativeId 29 | ? containerId + "-gi-" + index + "_" + child.props.NativeId 30 | : containerId + "-gi-" + index; 31 | 32 | return ( 33 | 44 | {child} 45 | 46 | ); 47 | })} 48 | 49 | ); 50 | } 51 | -------------------------------------------------------------------------------- /package/nativeComponents/dataTable/NativeDataTableToolbar.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | // eslint-disable-next-line import/no-unresolved 5 | import { UtilityClasses } from "@wrappid/styles"; 6 | 7 | import NativeGrid from "../layouts/NativeGrid"; 8 | import NativeStack from "../layouts/NativeStack"; 9 | 10 | export default function NativeDataTableToolbar(props) { 11 | const { allTools } = props; 12 | 13 | const formPanel = (panel)=>{ 14 | return 19 | {panel?.stacks && 20 | panel?.stacks?.map((stack, index) => ( 21 | 26 | {stack?.map((element) => 27 | element?.comp 28 | ? typeof element?.comp === "function" 29 | ? element.comp() 30 | : element.comp 31 | : null 32 | )} 33 | 34 | ))} 35 | ; 36 | }; 37 | 38 | return allTools?.map((row, index) => ( 39 | 44 | {formPanel(row?.leftPanel)} 45 | 46 | {formPanel(row?.rightPanel)} 47 | 48 | )); 49 | } 50 | -------------------------------------------------------------------------------- /package/helper/componentUtil.js: -------------------------------------------------------------------------------- 1 | import useScrollTrigger from "@mui/material/useScrollTrigger"; 2 | 3 | import { 4 | FORM_LG_DEFAULT_GRID_SIZE, 5 | FORM_MD_DEFAULT_GRID_SIZE, 6 | FORM_SM_DEFAULT_GRID_SIZE, 7 | FORM_XL_DEFAULT_GRID_SIZE, 8 | FORM_XS_DEFAULT_GRID_SIZE 9 | } from "../form/nativeFormConstants"; 10 | 11 | const XS_DEFAULT_GRID_SIZE = 12; 12 | const SM_DEFAULT_GRID_SIZE = 12; 13 | const MD_DEFAULT_GRID_SIZE = 12; 14 | const LG_DEFAULT_GRID_SIZE = 12; 15 | const XL_DEFAULT_GRID_SIZE = 12; 16 | 17 | export function getGridSizeProps(gridSize, formFlag) { 18 | let finalProps = { 19 | lg: formFlag ? FORM_LG_DEFAULT_GRID_SIZE : LG_DEFAULT_GRID_SIZE, 20 | md: formFlag ? FORM_MD_DEFAULT_GRID_SIZE : MD_DEFAULT_GRID_SIZE, 21 | sm: formFlag ? FORM_SM_DEFAULT_GRID_SIZE : SM_DEFAULT_GRID_SIZE, 22 | xl: formFlag ? FORM_XL_DEFAULT_GRID_SIZE : XL_DEFAULT_GRID_SIZE, 23 | xs: formFlag ? FORM_XS_DEFAULT_GRID_SIZE : XS_DEFAULT_GRID_SIZE, 24 | }; 25 | 26 | if (gridSize && !isNaN(gridSize)) { 27 | finalProps = { 28 | lg: gridSize, 29 | md: gridSize, 30 | sm: gridSize, 31 | xl: gridSize, 32 | xs: gridSize, 33 | }; 34 | } else if (gridSize) { 35 | if (gridSize.xs) { 36 | finalProps = { 37 | lg: gridSize.xs, 38 | md: gridSize.xs, 39 | sm: gridSize.xs, 40 | xl: gridSize.xs, 41 | xs: gridSize.xs, 42 | }; 43 | } 44 | if (gridSize.sm) { 45 | finalProps = { 46 | ...finalProps, 47 | lg: gridSize.sm, 48 | md: gridSize.sm, 49 | sm: gridSize.sm, 50 | xl: gridSize.sm, 51 | }; 52 | } 53 | if (gridSize.md) { 54 | finalProps = { 55 | ...finalProps, 56 | lg: gridSize.md, 57 | md: gridSize.md, 58 | xl: gridSize.md, 59 | }; 60 | } 61 | if (gridSize.lg) { 62 | finalProps = { 63 | ...finalProps, 64 | lg: gridSize.lg, 65 | xl: gridSize.lg, 66 | }; 67 | } 68 | if (gridSize.xl) { 69 | finalProps = { 70 | ...finalProps, 71 | xl: gridSize.xl, 72 | }; 73 | } 74 | } 75 | 76 | return finalProps; 77 | } 78 | 79 | export { useScrollTrigger as nativeUseScrollTrigger }; 80 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | 106 | # test package folder 107 | src/package/* 108 | 109 | # Dependency Files 110 | package.json 111 | package-lock.json 112 | ./package/package.json 113 | ./package/package-lock.json -------------------------------------------------------------------------------- /package/nativeComponents/navigation/NativeCustomTabs.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | import NativeTab from "./NativeTab"; 5 | import NativeTabPanel from "./NativeTabPanel"; 6 | import NativeTabs from "./NativeTabs"; 7 | import { nativeUseLocation } from "../helper/routerHelper"; 8 | 9 | export default function NativeCustomTabs(props) { 10 | const location = nativeUseLocation(); 11 | 12 | {/* the below code is the real mui code that will be shifted to "NativeCustomTabs" for web -->saif */ } 13 | // return ; -->this is used in Manageappointment.js exporting the props i.e tabsContent. 14 | 15 | const { tabsContent, preHandleChangeHook, postHandleChangeHook } = props; 16 | const [tabValue, setTabValue] = React.useState(tabsContent && tabsContent.length > 0 ? tabsContent[0]?.id : 0); 17 | 18 | React.useEffect(() => { 19 | if ( 20 | location?.hash && 21 | tabsContent?.filter((tabContent) => { 22 | return tabContent?.id === location?.hash?.replace("#", ""); 23 | })?.length > 0 24 | ) { 25 | setTabValue(location.hash?.replace("#", "")); 26 | } else { 27 | setTabValue(tabsContent[0]?.id); 28 | } 29 | }, [tabsContent, location]); 30 | 31 | const handleChange = (ele, value) => { 32 | preHandleChangeHook && preHandleChangeHook(ele, value); 33 | setTabValue(value); 34 | postHandleChangeHook && postHandleChangeHook(ele, value); 35 | }; 36 | 37 | return ( 38 | <> 39 | 44 | {tabsContent?.map((tabContent, index) => { 45 | return ; 46 | })} 47 | 48 | 49 | {tabsContent?.map((tabContent, tabIndex) => { 50 | return ( 51 | 57 | {React.createElement( 58 | props.componentRegistry[tabContent.comp]?.comp 59 | )} 60 | 61 | ); 62 | })} 63 | 64 | ); 65 | } -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeJSONEditor.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React, { Component } from "react"; 3 | 4 | import JSONEditor from "jsoneditor"; 5 | 6 | import "jsoneditor/dist/jsoneditor.css"; 7 | import NativeLabel from "../dataDisplay/paragraph/NativeLabel"; 8 | 9 | export default class NativeJSONEditor extends Component { 10 | componentDidMount() { 11 | let mode = "code"; 12 | 13 | if (this.props.readOnly) { 14 | mode = "view"; 15 | } 16 | const options = { 17 | mode : mode, 18 | onChangeText: this.handelChange, 19 | schema : this.props.schema || {}, 20 | }; 21 | 22 | this.jsoneditor = new JSONEditor(this.container, options); 23 | 24 | this.jsoneditor.set(this.props.value); 25 | } 26 | 27 | componentWillUnmount() { 28 | if (this.jsoneditor) { 29 | this.jsoneditor.destroy(); 30 | } 31 | } 32 | 33 | componentDidUpdate() { 34 | if (this.props.readOnly) { 35 | this.jsoneditor.setMode("view"); 36 | } else { 37 | this.jsoneditor.setMode("code"); 38 | } 39 | 40 | this.jsonEditorValueUpdate(this.props.value); 41 | } 42 | 43 | jsonEditorValueUpdate = (value = {}) => { 44 | if (this.jsoneditor) { 45 | let finalValue = value; 46 | 47 | try { 48 | if (typeof finalValue === "string") { 49 | finalValue = JSON.parse(finalValue); 50 | this.jsoneditor.update(finalValue); 51 | } else { 52 | this.jsoneditor.update(finalValue); 53 | } 54 | } catch (err) { 55 | // eslint-disable-next-line no-console 56 | console.warn("Not a valid json", finalValue, err); 57 | // eslint-disable-next-line etc/no-commented-out-code 58 | // this.jsoneditor.update({}); 59 | } 60 | } 61 | }; 62 | 63 | handelChange = (value) => { 64 | let finalValue = value; 65 | 66 | if (typeof finalValue === "string") { 67 | try{ 68 | finalValue = JSON.parse(finalValue); 69 | } 70 | catch(err){ 71 | // eslint-disable-next-line no-console 72 | console.log("JSON NOT CORRECT"); 73 | return; 74 | } 75 | if (this.props.formik) { 76 | this.props.formik.setFieldValue(this.props.id, finalValue); 77 | } 78 | this.props.onChange(finalValue); 79 | } 80 | 81 | }; 82 | 83 | render() { 84 | return ( 85 | <> 86 | {this.props.label || "No Label Provided"} 87 | 88 |
(this.container = elem)} /> 89 | 90 | ); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@wrappid/native-web", 3 | "version": "0.0.364", 4 | "description": "This repository is combined packages of all the Styled Components for react web project.", 5 | "main": "index.js", 6 | "scripts": { 7 | "prepare": "husky install", 8 | "attributions:gen": "node ./scripts/attributions.gen.js", 9 | "test": "echo testing not yet implemented", 10 | "build": "npx babel package --out-dir dist --copy-files", 11 | "code:lint": "eslint --ignore-path .gitignore ./package", 12 | "code:format": "npm run code:lint -- --fix", 13 | "release": "standard-version --bumpFiles ./package.json ./package/package.json ./package-lock.json ./package/package-lock.json", 14 | "publish": "npm publish *.tgz --registry=https://npm.pkg.github.com --scope=@wrappid" 15 | }, 16 | "repository": { 17 | "type": "git", 18 | "url": "git+https://github.com/wrappid/native-web.git" 19 | }, 20 | "keywords": [ 21 | "css-in-js", 22 | "react", 23 | "react-native" 24 | ], 25 | "license": "MIT", 26 | "author": { 27 | "name": "Wrappid", 28 | "email": "wrappid.framework@gmail.com", 29 | "url": "https://github.com/wrappid/" 30 | }, 31 | "homepage": "https://github.com/wrappid/native-web", 32 | "bugs": { 33 | "url": "https://github.com/wrappid/native-web/issues" 34 | }, 35 | "babel": { 36 | "presets": [ 37 | "@babel/preset-react" 38 | ] 39 | }, 40 | "devDependencies": { 41 | "@babel/cli": "7.21.0", 42 | "@babel/core": "7.21.0", 43 | "@babel/polyfill": "7.12.1", 44 | "@babel/preset-env": "7.20.2", 45 | "@babel/preset-react": "7.18.6", 46 | "@commitlint/cli": "17.5.0", 47 | "@commitlint/config-conventional": "17.4.4", 48 | "@commitlint/prompt-cli": "17.5.0", 49 | "@mui/icons-material": "5.15.20", 50 | "@mui/material": "5.15.20", 51 | "@mui/x-date-pickers": "5.0.8", 52 | "eslint": "8.40.0", 53 | "eslint-plugin-etc": "2.0.2", 54 | "eslint-plugin-import": "2.27.5", 55 | "eslint-plugin-react": "7.32.2", 56 | "eslint-plugin-sort-keys-fix": "1.1.2", 57 | "eslint-plugin-unused-imports": "2.0.0", 58 | "husky": "8.0.3", 59 | "jodit-react": "1.3.39", 60 | "jsoneditor": "9.10.0", 61 | "license-checker": "25.0.1", 62 | "moment": "2.29.4", 63 | "mui-color-input": "2.0.3", 64 | "mui-one-time-password-input": "1.1.0", 65 | "react-markdown": "8.0.7", 66 | "react-otp-input": "3.0.2", 67 | "react-redux": "8.0.2", 68 | "react-router-dom": "6.3.0", 69 | "react-select": "5.7.3", 70 | "standard-version": "9.5.0", 71 | "styled-components": "5.3.9" 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /package/nativeComponents/layouts/NativeList.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports, import/order 2 | import React from "react"; 3 | // eslint-disable-next-line import/no-unresolved 4 | import { UtilityClasses } from "@wrappid/styles"; 5 | 6 | import NativeGrid from "./NativeGrid"; 7 | import { SCList } from "../../styledComponents/layouts/SCList"; 8 | 9 | const defaultItemGridProps = { gridSize: { default: 6, md: 3, sm: 4 }, styleClasses: [UtilityClasses.BORDER.BORDER] }; 10 | 11 | export default function NativeList(props) { 12 | 13 | const { children, itemGridProps, variant, itemStylesProps, ...restProps } = props; 14 | 15 | const listStyleClasses = () => { 16 | let styleClasses = []; 17 | 18 | if (variant == NativeList.variantConstants.HTML) { 19 | if (props.listType) { 20 | styleClasses.push(UtilityClasses.PADDING.PL5, UtilityClasses.LIST_STYLE[props.listType]); 21 | } 22 | } 23 | return [...styleClasses, ...(props?.styleClasses || [])]; 24 | }; 25 | 26 | const listItemStyleClasses = (childProps) => { 27 | let styleClasses = []; 28 | 29 | if (props.listType) { 30 | styleClasses.push(UtilityClasses.DISPLAY.LIST_ITEM, UtilityClasses.PADDING.P0); 31 | } 32 | if (itemStylesProps) { 33 | itemStylesProps.forEach((item) => { 34 | styleClasses.push(item); 35 | }); 36 | } 37 | return [...styleClasses, ...(childProps?.styleClasses || [])]; 38 | }; 39 | 40 | return 43 | {variant == NativeList.variantConstants.grid ? ( 44 | { 45 | React.Children.map(children, child => { 46 | if (React.isValidElement(child)) { 47 | const updatedProps = { 48 | ...child.props, 49 | gridProps : itemGridProps || defaultItemGridProps, 50 | styleClasses: listItemStyleClasses(child.props) 51 | }; 52 | 53 | return React.cloneElement(child, updatedProps); // Pass both props 54 | } else { 55 | return child; 56 | } 57 | })}) : 58 | (React.Children.map(children, child => { 59 | if (React.isValidElement(child)) { 60 | const updatedProps = { 61 | ...child.props, // Spread existing props 62 | styleClasses: listItemStyleClasses(child.props) 63 | }; 64 | 65 | return React.cloneElement(child, updatedProps); // Pass both props 66 | } else { 67 | return child; 68 | } 69 | }))} 70 | ; 71 | } 72 | 73 | NativeList.variantConstants = { 74 | DEFAULT: "DEFAULT", 75 | HTML : "HTML", 76 | grid : "grid" 77 | }; 78 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeInput.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | import { useTheme } from "@mui/material"; 4 | 5 | import NativeFormControl from "./NativeFormControl"; 6 | import NativeInputLabel from "./NativeInputLabel"; 7 | import { getUUID } from "../../helper/appUtils"; 8 | import { SCInput } from "../../styledComponents/inputs/SCInput"; 9 | 10 | export default function NativeInput(props) { 11 | const { NativeId = getUUID() } = props; 12 | const theme = useTheme(); 13 | 14 | const defStyle = { transition: "color 5000s ease-in-out 0s, background-color 5000s ease-in-out 0s" }; /* This stops browser autofill suggestions from changing the background and text color in input field. Also I think that's a bad fix which needs to improve in future. */ 15 | 16 | const [inputText, setInputText] = React.useState(props?.value || null); 17 | 18 | const onChange = (event) => { 19 | props?.onChange && props.onChange(event); 20 | setInputText(event?.target?.value); 21 | }; 22 | 23 | return ( 24 | 25 | 0} 27 | htmlFor={props.id} 28 | > 29 | {props.label} 30 | 31 | 32 | { 62 | // eslint-disable-next-line no-console 63 | console.log("CLICKED"); 64 | props.onFormFocus(props.editId); 65 | } 66 | : () => { 67 | // eslint-disable-next-line no-console 68 | console.log("CLICKED else"); 69 | } 70 | } 71 | theme={theme} 72 | /> 73 | 74 | ); 75 | } 76 | -------------------------------------------------------------------------------- /package/nativeComponents/inputs/NativeFilePicker.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React, { useRef } from "react"; 3 | 4 | // eslint-disable-next-line import/no-unresolved 5 | import { UtilityClasses, StyledComponentsClasses } from "@wrappid/styles"; 6 | 7 | import NativeIconButton from "./NativeIconButton"; 8 | import { SCInput } from "../../styledComponents/inputs/SCInput"; 9 | import NativeIcon, { __IconTypes } from "../dataDisplay/NativeIcon"; 10 | import NativeTypographyBody1 from "../dataDisplay/paragraph/NativeTypographyBody1"; 11 | import NativeBox from "../layouts/NativeBox"; 12 | import NativeGrid from "../layouts/NativeGrid"; 13 | 14 | export default function NativeFilePicker(props) { 15 | const inputRef = useRef(null); 16 | const handleFileOpen = () => { 17 | inputRef.current.click(); 18 | }; 19 | 20 | return ( 21 | <> 22 | { 32 | // eslint-disable-next-line no-console 33 | console.log("FIle Change", event.target.files[0], props.formik); 34 | props.formik.setFieldValue(props.id, event.target.files[0]); 35 | }} 36 | required={props.formik ? false : props.required} 37 | placeholder={props.placeholder} 38 | disabled={props.disabled} 39 | max={props.max} 40 | min={props.min} 41 | readOnly={props.readOnly} 42 | error={ 43 | props.touched && props.error && props.error.length > 0 ? true : false 44 | } 45 | /> 46 | 47 | {!props.readOnly && ( 48 | 54 | 55 | 56 | {props.value ? props?.value?.name : "Upload file"} 57 | 58 | 59 | {props?.value?.name ? 63 | {props?.formik?.setFieldValue(props.id, null);}}> 64 | 65 | 66 | : 67 | 68 | } 69 | 70 | 71 | 72 | )} 73 | 74 | ); 75 | } 76 | -------------------------------------------------------------------------------- /package/nativeComponents/utils/NativeModal.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-unused-vars, unused-imports/no-unused-imports 2 | import React from "react"; 3 | 4 | // eslint-disable-next-line import/no-unresolved 5 | import { UtilityClasses, StyledComponentsClasses } from "@wrappid/styles"; 6 | import { useDispatch, useSelector } from "react-redux"; 7 | 8 | import { SCModal } from "../../styledComponents/utils/SCModal"; 9 | import NativeH6 from "../dataDisplay/heading/NativeH6"; 10 | import NativeIcon, { __IconTypes } from "../dataDisplay/NativeIcon"; 11 | import NativeIconButton from "../inputs/NativeIconButton"; 12 | import NativeBox from "../layouts/NativeBox"; 13 | 14 | export default function NativeModal(props) { 15 | const dispatch = useDispatch(); 16 | const open = useSelector((state) => state.modal.modalOpen); 17 | const modalData = useSelector((state) => state.modal.modalData); 18 | const modalStyle = useSelector((state) => state.modal.modalStyle); 19 | const modalClose = useSelector((state) => state.modal.modalClose); 20 | const HandleModalClose = () => { 21 | dispatch(props.toggleModalState(null)); 22 | }; 23 | 24 | return ( 25 | 32 | 40 | 48 | 49 | {{modalData?.heading ? modalData.heading : ""}} 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 65 | {React.isValidElement(modalData?.comp) ? modalData?.comp : null} 66 | 67 | 68 | 69 | ); 70 | } 71 | -------------------------------------------------------------------------------- /scripts/attributions.gen.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | /* eslint-disable import/order */ 3 | /* eslint-disable no-console */ 4 | // eslint-disable-next-line no-undef 5 | const path = require("path"); 6 | // eslint-disable-next-line no-undef 7 | const licenseChecker = require("license-checker"); 8 | // eslint-disable-next-line no-undef, id-length 9 | const fs = require("fs"); 10 | 11 | // eslint-disable-next-line no-undef 12 | const packageJson = require("../package.json"); 13 | 14 | /** 15 | * Generate ATTRIBUTIONS.md file listing third-party dependencies and their licenses. 16 | */ 17 | 18 | try { 19 | // eslint-disable-next-line no-undef 20 | const packagePath = path.join(__dirname, "./../"); 21 | // eslint-disable-next-line no-undef 22 | const attributionMdPath = path.join(__dirname, "./../ATTRIBUTIONS.md"); 23 | 24 | // Attribution header 25 | const attributionHeader = ` 26 | ## ATTRIBUTIONS 27 | 28 | This file lists the third-party libraries, frameworks, and other components used in the ${packageJson?.name} repository, 29 | along with their respective licenses. 30 | It is important to comply with the licensing terms of these components when using the code 31 | \n`; 32 | 33 | licenseChecker.init({ start: packagePath }, function(err, packages) { 34 | if (err) { 35 | throw err; 36 | } else { 37 | let markdownContent = attributionHeader + generateMarkdown(packages); 38 | 39 | fs.writeFileSync(attributionMdPath, markdownContent); 40 | console.log("ATTRIBUTIONS.md file generated successfully."); 41 | } 42 | }); 43 | } catch (error) { 44 | console.error("An error occurred while generating ATTRIBUTIONS.md file."); 45 | console.error(error); 46 | } 47 | 48 | /** 49 | * Convert JSON data to markdown format. 50 | * @param {object} packages - JSON object containing package information. 51 | * @returns {string} Markdown content. 52 | */ 53 | function generateMarkdown(packages) { 54 | let markdownContent = ""; 55 | 56 | Object.keys(packages).forEach(packageName => { 57 | markdownContent += convertJsonToMDFormat(packageName, packages[packageName]); 58 | }); 59 | 60 | return markdownContent; 61 | } 62 | 63 | /** 64 | * Convert package information to markdown format. 65 | * @param {string} packageName - Name of the package. 66 | * @param {object} packageInfo - Information about the package. 67 | * @returns {string} Markdown content. 68 | */ 69 | function convertJsonToMDFormat(packageName, packageInfo) { 70 | const { 71 | licenses, repository, publisher, url, licenseFile, email 72 | } = packageInfo; 73 | 74 | const packageVersion = packageName.match(/[0-9.]+/g)?.join("") || "NA"; 75 | 76 | const extractPackageName = packageName => packageName.substring(0, packageName.lastIndexOf("@")).replace("@", ""); 77 | 78 | return ` 79 |
80 | ${packageName} 81 | 82 | #### Basic details about the package 83 | >| Key | Value | 84 | >| --- | --- | 85 | >| **Name** | ${extractPackageName(packageName) || "NA"} | 86 | >| **Version** | ${packageVersion} | 87 | >| **Repository** | ${repository || "NA"} | 88 | >| **Licenses** | [${licenses || "NA"}](${licenseFile}) | 89 | >| **Publisher** | ${publisher || "NA"} | 90 | >| **Contact** | ${email || "NA"} | 91 | >| **Homepage** | ${url || "NA"} | 92 | 93 | #### Use this package in your project 94 | \`\`\`bash 95 | npm i ${packageName} 96 | \`\`\` 97 |
98 | `; 99 | } --------------------------------------------------------------------------------