@evoke-platform/ui-components 1.0.0-dev.1.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/dist/published/components/Test/Test.d.ts +3 -0
- package/dist/published/components/Test/Test.js +8 -0
- package/dist/published/components/Test/Test.test.d.ts +1 -0
- package/dist/published/components/Test/Test.test.js +11 -0
- package/dist/published/components/Test/index.d.ts +3 -0
- package/dist/published/components/Test/index.js +3 -0
- package/dist/published/components/core/Accordion/Accordion.d.ts +4 -0
- package/dist/published/components/core/Accordion/Accordion.js +8 -0
- package/dist/published/components/core/Accordion/AccordionActions/AccordionActions.d.ts +4 -0
- package/dist/published/components/core/Accordion/AccordionActions/AccordionActions.js +8 -0
- package/dist/published/components/core/Accordion/AccordionActions/index.d.ts +2 -0
- package/dist/published/components/core/Accordion/AccordionActions/index.js +2 -0
- package/dist/published/components/core/Accordion/AccordionDetails/AccordionDetails.d.ts +4 -0
- package/dist/published/components/core/Accordion/AccordionDetails/AccordionDetails.js +8 -0
- package/dist/published/components/core/Accordion/AccordionDetails/index.d.ts +2 -0
- package/dist/published/components/core/Accordion/AccordionDetails/index.js +2 -0
- package/dist/published/components/core/Accordion/AccordionSummary/AccordionSummary.d.ts +4 -0
- package/dist/published/components/core/Accordion/AccordionSummary/AccordionSummary.js +8 -0
- package/dist/published/components/core/Accordion/AccordionSummary/index.d.ts +2 -0
- package/dist/published/components/core/Accordion/AccordionSummary/index.js +2 -0
- package/dist/published/components/core/Accordion/index.d.ts +5 -0
- package/dist/published/components/core/Accordion/index.js +5 -0
- package/dist/published/components/core/Alert/Alert.d.ts +4 -0
- package/dist/published/components/core/Alert/Alert.js +8 -0
- package/dist/published/components/core/Alert/index.d.ts +2 -0
- package/dist/published/components/core/Alert/index.js +2 -0
- package/dist/published/components/core/AppBar/AppBar.d.ts +4 -0
- package/dist/published/components/core/AppBar/AppBar.js +8 -0
- package/dist/published/components/core/AppBar/index.d.ts +2 -0
- package/dist/published/components/core/AppBar/index.js +2 -0
- package/dist/published/components/core/Autocomplete/Autocomplete.d.ts +19 -0
- package/dist/published/components/core/Autocomplete/Autocomplete.js +48 -0
- package/dist/published/components/core/Autocomplete/index.d.ts +3 -0
- package/dist/published/components/core/Autocomplete/index.js +3 -0
- package/dist/published/components/core/Avatar/Avatar.d.ts +8 -0
- package/dist/published/components/core/Avatar/Avatar.js +12 -0
- package/dist/published/components/core/Avatar/index.d.ts +3 -0
- package/dist/published/components/core/Avatar/index.js +3 -0
- package/dist/published/components/core/Backdrop/Backdrop.d.ts +4 -0
- package/dist/published/components/core/Backdrop/Backdrop.js +8 -0
- package/dist/published/components/core/Backdrop/index.d.ts +3 -0
- package/dist/published/components/core/Backdrop/index.js +3 -0
- package/dist/published/components/core/Badge/Badge.d.ts +4 -0
- package/dist/published/components/core/Badge/Badge.js +8 -0
- package/dist/published/components/core/Badge/index.d.ts +3 -0
- package/dist/published/components/core/Badge/index.js +3 -0
- package/dist/published/components/core/Breadcrumbs/Breadcrumbs.d.ts +4 -0
- package/dist/published/components/core/Breadcrumbs/Breadcrumbs.js +8 -0
- package/dist/published/components/core/Breadcrumbs/index.d.ts +3 -0
- package/dist/published/components/core/Breadcrumbs/index.js +3 -0
- package/dist/published/components/core/Button/Button.d.ts +4 -0
- package/dist/published/components/core/Button/Button.js +8 -0
- package/dist/published/components/core/Button/index.d.ts +3 -0
- package/dist/published/components/core/Button/index.js +3 -0
- package/dist/published/components/core/ButtonGroup/ButtonGroup.d.ts +4 -0
- package/dist/published/components/core/ButtonGroup/ButtonGroup.js +8 -0
- package/dist/published/components/core/ButtonGroup/index.d.ts +3 -0
- package/dist/published/components/core/ButtonGroup/index.js +3 -0
- package/dist/published/components/core/Card/Card.d.ts +4 -0
- package/dist/published/components/core/Card/Card.js +8 -0
- package/dist/published/components/core/Card/index.d.ts +3 -0
- package/dist/published/components/core/Card/index.js +3 -0
- package/dist/published/components/core/Checkbox/Checkbox.d.ts +4 -0
- package/dist/published/components/core/Checkbox/Checkbox.js +8 -0
- package/dist/published/components/core/Checkbox/index.d.ts +3 -0
- package/dist/published/components/core/Checkbox/index.js +3 -0
- package/dist/published/components/core/Chip/Chip.d.ts +4 -0
- package/dist/published/components/core/Chip/Chip.js +8 -0
- package/dist/published/components/core/Chip/index.d.ts +3 -0
- package/dist/published/components/core/Chip/index.js +3 -0
- package/dist/published/components/core/CircularProgress/CircularProgress.d.ts +4 -0
- package/dist/published/components/core/CircularProgress/CircularProgress.js +8 -0
- package/dist/published/components/core/CircularProgress/index.d.ts +3 -0
- package/dist/published/components/core/CircularProgress/index.js +3 -0
- package/dist/published/components/core/Collapse/Collapse.d.ts +4 -0
- package/dist/published/components/core/Collapse/Collapse.js +8 -0
- package/dist/published/components/core/Collapse/index.d.ts +3 -0
- package/dist/published/components/core/Collapse/index.js +3 -0
- package/dist/published/components/core/DatePicker/DatePicker.d.ts +8 -0
- package/dist/published/components/core/DatePicker/DatePicker.js +41 -0
- package/dist/published/components/core/DatePicker/index.d.ts +2 -0
- package/dist/published/components/core/DatePicker/index.js +2 -0
- package/dist/published/components/core/Dialog/Dialog.d.ts +4 -0
- package/dist/published/components/core/Dialog/Dialog.js +8 -0
- package/dist/published/components/core/Dialog/DialogActions/DialogActions.d.ts +12 -0
- package/dist/published/components/core/Dialog/DialogActions/DialogActions.js +38 -0
- package/dist/published/components/core/Dialog/DialogActions/index.d.ts +2 -0
- package/dist/published/components/core/Dialog/DialogActions/index.js +2 -0
- package/dist/published/components/core/Dialog/DialogContent/DialogContent.d.ts +4 -0
- package/dist/published/components/core/Dialog/DialogContent/DialogContent.js +8 -0
- package/dist/published/components/core/Dialog/DialogContent/index.d.ts +2 -0
- package/dist/published/components/core/Dialog/DialogContent/index.js +2 -0
- package/dist/published/components/core/Dialog/DialogContentText/DialogContentText.d.ts +4 -0
- package/dist/published/components/core/Dialog/DialogContentText/DialogContentText.js +8 -0
- package/dist/published/components/core/Dialog/DialogContentText/index.d.ts +2 -0
- package/dist/published/components/core/Dialog/DialogContentText/index.js +2 -0
- package/dist/published/components/core/Dialog/DialogTitle/DialogTitle.d.ts +4 -0
- package/dist/published/components/core/Dialog/DialogTitle/DialogTitle.js +8 -0
- package/dist/published/components/core/Dialog/DialogTitle/index.d.ts +2 -0
- package/dist/published/components/core/Dialog/DialogTitle/index.js +2 -0
- package/dist/published/components/core/Dialog/index.d.ts +6 -0
- package/dist/published/components/core/Dialog/index.js +6 -0
- package/dist/published/components/core/Divider/Divider.d.ts +4 -0
- package/dist/published/components/core/Divider/Divider.js +8 -0
- package/dist/published/components/core/Divider/index.d.ts +3 -0
- package/dist/published/components/core/Divider/index.js +3 -0
- package/dist/published/components/core/Drawer/Drawer.d.ts +4 -0
- package/dist/published/components/core/Drawer/Drawer.js +8 -0
- package/dist/published/components/core/Drawer/index.d.ts +3 -0
- package/dist/published/components/core/Drawer/index.js +3 -0
- package/dist/published/components/core/FieldError/FieldError.d.ts +7 -0
- package/dist/published/components/core/FieldError/FieldError.js +11 -0
- package/dist/published/components/core/FieldError/index.d.ts +3 -0
- package/dist/published/components/core/FieldError/index.js +3 -0
- package/dist/published/components/core/FormElements/FormControl/FormControl.d.ts +4 -0
- package/dist/published/components/core/FormElements/FormControl/FormControl.js +8 -0
- package/dist/published/components/core/FormElements/FormControl/index.d.ts +2 -0
- package/dist/published/components/core/FormElements/FormControl/index.js +2 -0
- package/dist/published/components/core/FormElements/FormControlLabel/FormControlLabel.d.ts +4 -0
- package/dist/published/components/core/FormElements/FormControlLabel/FormControlLabel.js +8 -0
- package/dist/published/components/core/FormElements/FormControlLabel/index.d.ts +2 -0
- package/dist/published/components/core/FormElements/FormControlLabel/index.js +2 -0
- package/dist/published/components/core/FormElements/FormGroup/FormGroup.d.ts +4 -0
- package/dist/published/components/core/FormElements/FormGroup/FormGroup.js +8 -0
- package/dist/published/components/core/FormElements/FormGroup/index.d.ts +2 -0
- package/dist/published/components/core/FormElements/FormGroup/index.js +2 -0
- package/dist/published/components/core/FormElements/FormHelperText/FormHelperText.d.ts +4 -0
- package/dist/published/components/core/FormElements/FormHelperText/FormHelperText.js +8 -0
- package/dist/published/components/core/FormElements/FormHelperText/index.d.ts +2 -0
- package/dist/published/components/core/FormElements/FormHelperText/index.js +2 -0
- package/dist/published/components/core/FormElements/FormLabel/FormLabel.d.ts +4 -0
- package/dist/published/components/core/FormElements/FormLabel/FormLabel.js +8 -0
- package/dist/published/components/core/FormElements/FormLabel/index.d.ts +2 -0
- package/dist/published/components/core/FormElements/FormLabel/index.js +2 -0
- package/dist/published/components/core/FormElements/index.d.ts +6 -0
- package/dist/published/components/core/FormElements/index.js +6 -0
- package/dist/published/components/core/IconButton/IconButton.d.ts +4 -0
- package/dist/published/components/core/IconButton/IconButton.js +8 -0
- package/dist/published/components/core/IconButton/index.d.ts +3 -0
- package/dist/published/components/core/IconButton/index.js +3 -0
- package/dist/published/components/core/LinearProgress/LinearProgress.d.ts +4 -0
- package/dist/published/components/core/LinearProgress/LinearProgress.js +8 -0
- package/dist/published/components/core/LinearProgress/index.d.ts +3 -0
- package/dist/published/components/core/LinearProgress/index.js +3 -0
- package/dist/published/components/core/Link/Link.d.ts +4 -0
- package/dist/published/components/core/Link/Link.js +8 -0
- package/dist/published/components/core/Link/index.d.ts +3 -0
- package/dist/published/components/core/Link/index.js +3 -0
- package/dist/published/components/core/List/List.d.ts +4 -0
- package/dist/published/components/core/List/List.js +8 -0
- package/dist/published/components/core/List/ListItemText/ListItemText.d.ts +4 -0
- package/dist/published/components/core/List/ListItemText/ListItemText.js +8 -0
- package/dist/published/components/core/List/ListItemText/index.d.ts +3 -0
- package/dist/published/components/core/List/ListItemText/index.js +3 -0
- package/dist/published/components/core/List/index.d.ts +3 -0
- package/dist/published/components/core/List/index.js +3 -0
- package/dist/published/components/core/LocalizationProvider/LocalizationProvider.d.ts +5 -0
- package/dist/published/components/core/LocalizationProvider/LocalizationProvider.js +115 -0
- package/dist/published/components/core/LocalizationProvider/index.d.ts +2 -0
- package/dist/published/components/core/LocalizationProvider/index.js +2 -0
- package/dist/published/components/core/Menu/Menu.d.ts +4 -0
- package/dist/published/components/core/Menu/Menu.js +8 -0
- package/dist/published/components/core/Menu/MenuItem/MenuItem.d.ts +4 -0
- package/dist/published/components/core/Menu/MenuItem/MenuItem.js +8 -0
- package/dist/published/components/core/Menu/MenuItem/index.d.ts +3 -0
- package/dist/published/components/core/Menu/MenuItem/index.js +3 -0
- package/dist/published/components/core/Menu/index.d.ts +4 -0
- package/dist/published/components/core/Menu/index.js +4 -0
- package/dist/published/components/core/Paper/Paper.d.ts +4 -0
- package/dist/published/components/core/Paper/Paper.js +8 -0
- package/dist/published/components/core/Paper/index.d.ts +3 -0
- package/dist/published/components/core/Paper/index.js +3 -0
- package/dist/published/components/core/Popover/Popover.d.ts +4 -0
- package/dist/published/components/core/Popover/Popover.js +8 -0
- package/dist/published/components/core/Popover/index.d.ts +3 -0
- package/dist/published/components/core/Popover/index.js +3 -0
- package/dist/published/components/core/RadioGroup/Radio.d.ts +4 -0
- package/dist/published/components/core/RadioGroup/Radio.js +8 -0
- package/dist/published/components/core/RadioGroup/RadioGroup.d.ts +4 -0
- package/dist/published/components/core/RadioGroup/RadioGroup.js +8 -0
- package/dist/published/components/core/RadioGroup/index.d.ts +4 -0
- package/dist/published/components/core/RadioGroup/index.js +4 -0
- package/dist/published/components/core/Select/Select.d.ts +5 -0
- package/dist/published/components/core/Select/Select.js +10 -0
- package/dist/published/components/core/Select/index.d.ts +3 -0
- package/dist/published/components/core/Select/index.js +3 -0
- package/dist/published/components/core/Skeleton/Skeleton.d.ts +4 -0
- package/dist/published/components/core/Skeleton/Skeleton.js +8 -0
- package/dist/published/components/core/Skeleton/index.d.ts +3 -0
- package/dist/published/components/core/Skeleton/index.js +3 -0
- package/dist/published/components/core/Snackbar/Snackbar.d.ts +8 -0
- package/dist/published/components/core/Snackbar/Snackbar.js +40 -0
- package/dist/published/components/core/Snackbar/index.d.ts +3 -0
- package/dist/published/components/core/Snackbar/index.js +3 -0
- package/dist/published/components/core/StaticDatePicker/StaticDatePicker.d.ts +8 -0
- package/dist/published/components/core/StaticDatePicker/StaticDatePicker.js +41 -0
- package/dist/published/components/core/StaticDatePicker/index.d.ts +2 -0
- package/dist/published/components/core/StaticDatePicker/index.js +2 -0
- package/dist/published/components/core/Stepper/Step/Step.d.ts +4 -0
- package/dist/published/components/core/Stepper/Step/Step.js +8 -0
- package/dist/published/components/core/Stepper/Step/index.d.ts +2 -0
- package/dist/published/components/core/Stepper/Step/index.js +2 -0
- package/dist/published/components/core/Stepper/StepButton/StepButton.d.ts +4 -0
- package/dist/published/components/core/Stepper/StepButton/StepButton.js +8 -0
- package/dist/published/components/core/Stepper/StepButton/index.d.ts +2 -0
- package/dist/published/components/core/Stepper/StepButton/index.js +2 -0
- package/dist/published/components/core/Stepper/StepConnector/StepConnector.d.ts +4 -0
- package/dist/published/components/core/Stepper/StepConnector/StepConnector.js +8 -0
- package/dist/published/components/core/Stepper/StepConnector/index.d.ts +2 -0
- package/dist/published/components/core/Stepper/StepConnector/index.js +2 -0
- package/dist/published/components/core/Stepper/StepContent/StepContent.d.ts +4 -0
- package/dist/published/components/core/Stepper/StepContent/StepContent.js +8 -0
- package/dist/published/components/core/Stepper/StepContent/index.d.ts +2 -0
- package/dist/published/components/core/Stepper/StepContent/index.js +2 -0
- package/dist/published/components/core/Stepper/StepIcon/StepIcon.d.ts +4 -0
- package/dist/published/components/core/Stepper/StepIcon/StepIcon.js +8 -0
- package/dist/published/components/core/Stepper/StepIcon/index.d.ts +2 -0
- package/dist/published/components/core/Stepper/StepIcon/index.js +2 -0
- package/dist/published/components/core/Stepper/StepLabel/StepLabel.d.ts +4 -0
- package/dist/published/components/core/Stepper/StepLabel/StepLabel.js +8 -0
- package/dist/published/components/core/Stepper/StepLabel/index.d.ts +2 -0
- package/dist/published/components/core/Stepper/StepLabel/index.js +2 -0
- package/dist/published/components/core/Stepper/Stepper.d.ts +4 -0
- package/dist/published/components/core/Stepper/Stepper.js +8 -0
- package/dist/published/components/core/Stepper/index.d.ts +8 -0
- package/dist/published/components/core/Stepper/index.js +8 -0
- package/dist/published/components/core/Switch/Switch.d.ts +4 -0
- package/dist/published/components/core/Switch/Switch.js +8 -0
- package/dist/published/components/core/Switch/index.d.ts +3 -0
- package/dist/published/components/core/Switch/index.js +3 -0
- package/dist/published/components/core/Table/Table.d.ts +4 -0
- package/dist/published/components/core/Table/Table.js +8 -0
- package/dist/published/components/core/Table/index.d.ts +3 -0
- package/dist/published/components/core/Table/index.js +3 -0
- package/dist/published/components/core/Tabs/Tab/Tab.d.ts +4 -0
- package/dist/published/components/core/Tabs/Tab/Tab.js +8 -0
- package/dist/published/components/core/Tabs/Tab/index.d.ts +2 -0
- package/dist/published/components/core/Tabs/Tab/index.js +2 -0
- package/dist/published/components/core/Tabs/Tabs.d.ts +4 -0
- package/dist/published/components/core/Tabs/Tabs.js +8 -0
- package/dist/published/components/core/Tabs/index.d.ts +3 -0
- package/dist/published/components/core/Tabs/index.js +3 -0
- package/dist/published/components/core/TextField/TextField.d.ts +10 -0
- package/dist/published/components/core/TextField/TextField.js +36 -0
- package/dist/published/components/core/TextField/TextField.test.d.ts +1 -0
- package/dist/published/components/core/TextField/TextField.test.js +20 -0
- package/dist/published/components/core/TextField/index.d.ts +3 -0
- package/dist/published/components/core/TextField/index.js +3 -0
- package/dist/published/components/core/ToggleButton/ToggleButton.d.ts +4 -0
- package/dist/published/components/core/ToggleButton/ToggleButton.js +8 -0
- package/dist/published/components/core/ToggleButton/index.d.ts +3 -0
- package/dist/published/components/core/ToggleButton/index.js +3 -0
- package/dist/published/components/core/ToggleButtonGroup/ToggleButtonGroup.d.ts +4 -0
- package/dist/published/components/core/ToggleButtonGroup/ToggleButtonGroup.js +8 -0
- package/dist/published/components/core/ToggleButtonGroup/index.d.ts +3 -0
- package/dist/published/components/core/ToggleButtonGroup/index.js +3 -0
- package/dist/published/components/core/Tooltip/Tooltip.d.ts +4 -0
- package/dist/published/components/core/Tooltip/Tooltip.js +8 -0
- package/dist/published/components/core/Tooltip/index.d.ts +3 -0
- package/dist/published/components/core/Tooltip/index.js +3 -0
- package/dist/published/components/core/Typography/index.d.ts +4 -0
- package/dist/published/components/core/Typography/index.js +9 -0
- package/dist/published/components/core/index.d.ts +45 -0
- package/dist/published/components/core/index.js +46 -0
- package/dist/published/components/custom/CriteriaBuilder/CriteriaBuilder.d.ts +27 -0
- package/dist/published/components/custom/CriteriaBuilder/CriteriaBuilder.js +232 -0
- package/dist/published/components/custom/CriteriaBuilder/index.d.ts +3 -0
- package/dist/published/components/custom/CriteriaBuilder/index.js +3 -0
- package/dist/published/components/custom/FormField/BooleanSelect/BooleanSelect.d.ts +4 -0
- package/dist/published/components/custom/FormField/BooleanSelect/BooleanSelect.js +27 -0
- package/dist/published/components/custom/FormField/BooleanSelect/index.d.ts +1 -0
- package/dist/published/components/custom/FormField/BooleanSelect/index.js +1 -0
- package/dist/published/components/custom/FormField/DatePickerSelect/DatePickerSelect.d.ts +4 -0
- package/dist/published/components/custom/FormField/DatePickerSelect/DatePickerSelect.js +42 -0
- package/dist/published/components/custom/FormField/DatePickerSelect/index.d.ts +1 -0
- package/dist/published/components/custom/FormField/DatePickerSelect/index.js +1 -0
- package/dist/published/components/custom/FormField/FileUpload/FileUpload.d.ts +4 -0
- package/dist/published/components/custom/FormField/FileUpload/FileUpload.js +65 -0
- package/dist/published/components/custom/FormField/FileUpload/index.d.ts +1 -0
- package/dist/published/components/custom/FormField/FileUpload/index.js +1 -0
- package/dist/published/components/custom/FormField/FormField.d.ts +24 -0
- package/dist/published/components/custom/FormField/FormField.js +45 -0
- package/dist/published/components/custom/FormField/InputFieldComponent/InputFieldComponent.d.ts +4 -0
- package/dist/published/components/custom/FormField/InputFieldComponent/InputFieldComponent.js +76 -0
- package/dist/published/components/custom/FormField/InputFieldComponent/index.d.ts +1 -0
- package/dist/published/components/custom/FormField/InputFieldComponent/index.js +1 -0
- package/dist/published/components/custom/FormField/Select/Select.d.ts +4 -0
- package/dist/published/components/custom/FormField/Select/Select.js +32 -0
- package/dist/published/components/custom/FormField/Select/index.d.ts +1 -0
- package/dist/published/components/custom/FormField/Select/index.js +1 -0
- package/dist/published/components/custom/FormField/index.d.ts +3 -0
- package/dist/published/components/custom/FormField/index.js +3 -0
- package/dist/published/components/custom/Menubar/Menubar.d.ts +12 -0
- package/dist/published/components/custom/Menubar/Menubar.js +25 -0
- package/dist/published/components/custom/Menubar/Menubar.test.d.ts +1 -0
- package/dist/published/components/custom/Menubar/Menubar.test.js +12 -0
- package/dist/published/components/custom/Menubar/index.d.ts +3 -0
- package/dist/published/components/custom/Menubar/index.js +3 -0
- package/dist/published/components/custom/MultiSelect/MultiSelect.d.ts +14 -0
- package/dist/published/components/custom/MultiSelect/MultiSelect.js +144 -0
- package/dist/published/components/custom/MultiSelect/SortableItem.d.ts +2 -0
- package/dist/published/components/custom/MultiSelect/SortableItem.js +13 -0
- package/dist/published/components/custom/MultiSelect/index.d.ts +3 -0
- package/dist/published/components/custom/MultiSelect/index.js +3 -0
- package/dist/published/components/custom/RepeatableField/RepeatableField.d.ts +15 -0
- package/dist/published/components/custom/RepeatableField/RepeatableField.js +111 -0
- package/dist/published/components/custom/RepeatableField/index.d.ts +3 -0
- package/dist/published/components/custom/RepeatableField/index.js +3 -0
- package/dist/published/components/custom/index.d.ts +5 -0
- package/dist/published/components/custom/index.js +5 -0
- package/dist/published/components/layout/Box/Box.d.ts +8 -0
- package/dist/published/components/layout/Box/Box.js +8 -0
- package/dist/published/components/layout/Box/index.d.ts +3 -0
- package/dist/published/components/layout/Box/index.js +3 -0
- package/dist/published/components/layout/Container/Container.d.ts +4 -0
- package/dist/published/components/layout/Container/Container.js +8 -0
- package/dist/published/components/layout/Container/index.d.ts +3 -0
- package/dist/published/components/layout/Container/index.js +3 -0
- package/dist/published/components/layout/Grid/Grid.d.ts +4 -0
- package/dist/published/components/layout/Grid/Grid.js +8 -0
- package/dist/published/components/layout/Grid/index.d.ts +3 -0
- package/dist/published/components/layout/Grid/index.js +3 -0
- package/dist/published/components/layout/Stack/Stack.d.ts +4 -0
- package/dist/published/components/layout/Stack/Stack.js +8 -0
- package/dist/published/components/layout/Stack/index.d.ts +3 -0
- package/dist/published/components/layout/Stack/index.js +3 -0
- package/dist/published/components/layout/index.d.ts +4 -0
- package/dist/published/components/layout/index.js +4 -0
- package/dist/published/icons/index.d.ts +1 -0
- package/dist/published/icons/index.js +1 -0
- package/dist/published/index.d.ts +6 -0
- package/dist/published/index.js +6 -0
- package/dist/published/stories/Accordion.stories.d.ts +5 -0
- package/dist/published/stories/Accordion.stories.js +21 -0
- package/dist/published/stories/Alert.stories.d.ts +5 -0
- package/dist/published/stories/Alert.stories.js +8 -0
- package/dist/published/stories/Appbar.stories.d.ts +5 -0
- package/dist/published/stories/Appbar.stories.js +15 -0
- package/dist/published/stories/Autocomplete.stories.d.ts +23 -0
- package/dist/published/stories/Autocomplete.stories.js +413 -0
- package/dist/published/stories/Avatar.stories.d.ts +39 -0
- package/dist/published/stories/Avatar.stories.js +8 -0
- package/dist/published/stories/Backdrop.stories.d.ts +5 -0
- package/dist/published/stories/Backdrop.stories.js +20 -0
- package/dist/published/stories/Badge.stories.d.ts +5 -0
- package/dist/published/stories/Badge.stories.js +10 -0
- package/dist/published/stories/Box.stories.d.ts +25 -0
- package/dist/published/stories/Box.stories.js +18 -0
- package/dist/published/stories/Breadcrumbs.stories.d.ts +5 -0
- package/dist/published/stories/Breadcrumbs.stories.js +11 -0
- package/dist/published/stories/Button.stories.d.ts +5 -0
- package/dist/published/stories/Button.stories.js +8 -0
- package/dist/published/stories/ButtonGroup.stories.d.ts +5 -0
- package/dist/published/stories/ButtonGroup.stories.js +11 -0
- package/dist/published/stories/Card.stories.d.ts +5 -0
- package/dist/published/stories/Card.stories.js +15 -0
- package/dist/published/stories/Checkbox.stories.d.ts +5 -0
- package/dist/published/stories/Checkbox.stories.js +8 -0
- package/dist/published/stories/Chip.stories.d.ts +5 -0
- package/dist/published/stories/Chip.stories.js +8 -0
- package/dist/published/stories/CircularProgress.stories.d.ts +5 -0
- package/dist/published/stories/CircularProgress.stories.js +8 -0
- package/dist/published/stories/Collapse.stories.d.ts +5 -0
- package/dist/published/stories/Collapse.stories.js +26 -0
- package/dist/published/stories/Container.stories.d.ts +5 -0
- package/dist/published/stories/Container.stories.js +12 -0
- package/dist/published/stories/CriteriaBuilder.stories.d.ts +21 -0
- package/dist/published/stories/CriteriaBuilder.stories.js +206 -0
- package/dist/published/stories/DatePicker.stories.d.ts +6 -0
- package/dist/published/stories/DatePicker.stories.js +35 -0
- package/dist/published/stories/Dialog.stories.d.ts +5 -0
- package/dist/published/stories/Dialog.stories.js +24 -0
- package/dist/published/stories/Divider.stories.d.ts +5 -0
- package/dist/published/stories/Divider.stories.js +8 -0
- package/dist/published/stories/Drawer.stories.d.ts +5 -0
- package/dist/published/stories/Drawer.stories.js +27 -0
- package/dist/published/stories/FormControl.stories.d.ts +5 -0
- package/dist/published/stories/FormControl.stories.js +14 -0
- package/dist/published/stories/FormControlLabel.stories.d.ts +5 -0
- package/dist/published/stories/FormControlLabel.stories.js +8 -0
- package/dist/published/stories/FormField.stories.d.ts +9 -0
- package/dist/published/stories/FormField.stories.js +128 -0
- package/dist/published/stories/FormGroup.stories.d.ts +5 -0
- package/dist/published/stories/FormGroup.stories.js +10 -0
- package/dist/published/stories/FormHelperText.stories.d.ts +5 -0
- package/dist/published/stories/FormHelperText.stories.js +10 -0
- package/dist/published/stories/FormLabel.stories.d.ts +5 -0
- package/dist/published/stories/FormLabel.stories.js +13 -0
- package/dist/published/stories/Grid.stories.d.ts +5 -0
- package/dist/published/stories/Grid.stories.js +8 -0
- package/dist/published/stories/IconButton.stories.d.ts +5 -0
- package/dist/published/stories/IconButton.stories.js +17 -0
- package/dist/published/stories/LinearProgress.stories.d.ts +5 -0
- package/dist/published/stories/LinearProgress.stories.js +8 -0
- package/dist/published/stories/Link.stories.d.ts +5 -0
- package/dist/published/stories/Link.stories.js +16 -0
- package/dist/published/stories/List.stories.d.ts +5 -0
- package/dist/published/stories/List.stories.js +31 -0
- package/dist/published/stories/Menu.stories.d.ts +5 -0
- package/dist/published/stories/Menu.stories.js +25 -0
- package/dist/published/stories/MenuBar.stories.d.ts +5 -0
- package/dist/published/stories/MenuBar.stories.js +24 -0
- package/dist/published/stories/MultiSelect.stories.d.ts +5 -0
- package/dist/published/stories/MultiSelect.stories.js +26 -0
- package/dist/published/stories/Palette.stories.d.ts +25 -0
- package/dist/published/stories/Palette.stories.js +89 -0
- package/dist/published/stories/Paper.stories.d.ts +5 -0
- package/dist/published/stories/Paper.stories.js +15 -0
- package/dist/published/stories/RadioGroup.stories.d.ts +5 -0
- package/dist/published/stories/RadioGroup.stories.js +13 -0
- package/dist/published/stories/RepeatableField.stories.d.ts +5 -0
- package/dist/published/stories/RepeatableField.stories.js +36 -0
- package/dist/published/stories/Skeleton.stories.d.ts +5 -0
- package/dist/published/stories/Skeleton.stories.js +8 -0
- package/dist/published/stories/Snackbar.stories.d.ts +5 -0
- package/dist/published/stories/Snackbar.stories.js +22 -0
- package/dist/published/stories/Stack.stories.d.ts +5 -0
- package/dist/published/stories/Stack.stories.js +40 -0
- package/dist/published/stories/StaticDatePicker.stories.d.ts +7 -0
- package/dist/published/stories/StaticDatePicker.stories.js +42 -0
- package/dist/published/stories/Stepper.stories.d.ts +9 -0
- package/dist/published/stories/Stepper.stories.js +72 -0
- package/dist/published/stories/Switch.stories.d.ts +5 -0
- package/dist/published/stories/Switch.stories.js +8 -0
- package/dist/published/stories/Table.stories.d.ts +5 -0
- package/dist/published/stories/Table.stories.js +51 -0
- package/dist/published/stories/Tabs.stories.d.ts +5 -0
- package/dist/published/stories/Tabs.stories.js +45 -0
- package/dist/published/stories/TextField.stories.d.ts +21 -0
- package/dist/published/stories/TextField.stories.js +80 -0
- package/dist/published/stories/TimePicker.stories.d.ts +9 -0
- package/dist/published/stories/TimePicker.stories.js +34 -0
- package/dist/published/stories/ToggleButton.stories.d.ts +5 -0
- package/dist/published/stories/ToggleButton.stories.js +23 -0
- package/dist/published/stories/Typogrpahy.stories.d.ts +5 -0
- package/dist/published/stories/Typogrpahy.stories.js +21 -0
- package/dist/published/theme/UIThemeProvider.d.ts +7 -0
- package/dist/published/theme/UIThemeProvider.js +10 -0
- package/dist/published/theme/defaultTheme.d.ts +1 -0
- package/dist/published/theme/defaultTheme.js +104 -0
- package/dist/published/theme/index.d.ts +2 -0
- package/dist/published/theme/index.js +2 -0
- package/dist/published/util/date.d.ts +23 -0
- package/dist/published/util/date.js +47 -0
- package/dist/published/util/index.d.ts +1 -0
- package/dist/published/util/index.js +1 -0
- package/icons.ts +1 -0
- package/package.json +85 -0
@@ -0,0 +1,12 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { ReactJSXElement } from '@emotion/react/types/jsx-namespace';
|
3
|
+
declare type MenuBarProps = {
|
4
|
+
showNotifications: boolean;
|
5
|
+
logo: any;
|
6
|
+
logoAltText?: string;
|
7
|
+
notificationProps?: any;
|
8
|
+
navItems?: ReactJSXElement;
|
9
|
+
envName?: string;
|
10
|
+
};
|
11
|
+
export default function MenuBar(props: MenuBarProps): JSX.Element;
|
12
|
+
export {};
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { AppBar, Toolbar, Box, Typography } from '@mui/material';
|
3
|
+
import { Notifications as NotificationIcon } from '@mui/icons-material';
|
4
|
+
import UIThemeProvider from '../../../theme';
|
5
|
+
const classes = {
|
6
|
+
title: {
|
7
|
+
flexGrow: 1,
|
8
|
+
height: 70,
|
9
|
+
},
|
10
|
+
logo: {
|
11
|
+
paddingRight: '16px',
|
12
|
+
},
|
13
|
+
};
|
14
|
+
export default function MenuBar(props) {
|
15
|
+
var _a;
|
16
|
+
return (React.createElement(UIThemeProvider, null,
|
17
|
+
React.createElement(AppBar, { color: "inherit", position: "fixed", elevation: 0, sx: { zIndex: (theme) => theme.zIndex.drawer + 1, borderBottom: '1px solid #919EAB3D' } },
|
18
|
+
React.createElement(Toolbar, { sx: { justifyContent: 'space-between' } },
|
19
|
+
React.createElement(Box, { sx: classes.title }, !props.envName ? (React.createElement("img", { src: props.logo, alt: props.logoAltText, height: "70px", width: "inherit", style: classes.logo })) : (React.createElement(Box, { mt: 2 },
|
20
|
+
React.createElement(Typography, { variant: "h5" }, props === null || props === void 0 ? void 0 :
|
21
|
+
props.envName,
|
22
|
+
" ")))),
|
23
|
+
props.navItems,
|
24
|
+
props.showNotifications && (React.createElement(NotificationIcon, Object.assign({ color: "action", fontSize: "small" }, props.notificationProps, { sx: Object.assign({ marginLeft: '10px' }, (_a = props.notificationProps) === null || _a === void 0 ? void 0 : _a.sx) })))))));
|
25
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { render, screen } from '@testing-library/react';
|
3
|
+
import Menubar from './index';
|
4
|
+
import { Link } from '../../core';
|
5
|
+
test('render Menubar component without crashing', () => {
|
6
|
+
const navItems = (React.createElement(React.Fragment, null,
|
7
|
+
React.createElement(Link, { href: "#" }, "Object1"),
|
8
|
+
React.createElement(Link, { href: "#" }, "Object2"),
|
9
|
+
React.createElement(Link, { href: "#" }, "Object3")));
|
10
|
+
render(React.createElement(Menubar, { showNotifications: true, navItems: navItems, logo: "" }));
|
11
|
+
expect(screen.getAllByRole('link')).toHaveLength(3);
|
12
|
+
});
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
export declare type DropdownOptions = {
|
3
|
+
id?: string;
|
4
|
+
label: string;
|
5
|
+
value: boolean;
|
6
|
+
};
|
7
|
+
declare type MultiSelectProps = {
|
8
|
+
options: DropdownOptions[];
|
9
|
+
onChange: Function;
|
10
|
+
maxHeight?: number;
|
11
|
+
isSortable?: Boolean;
|
12
|
+
};
|
13
|
+
export default function MultiSelect(props: MultiSelectProps): JSX.Element;
|
14
|
+
export {};
|
@@ -0,0 +1,144 @@
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
2
|
+
import { Box, FormControlLabel, Grid, InputAdornment, Switch, TextField, Typography } from '@mui/material';
|
3
|
+
import DragHandleIcon from '@mui/icons-material/DragHandle';
|
4
|
+
import { Search } from '@mui/icons-material';
|
5
|
+
import UIThemeProvider from '../../../theme';
|
6
|
+
import { sortBy } from 'lodash';
|
7
|
+
import { DndContext, closestCenter, KeyboardSensor, PointerSensor, useSensor, useSensors } from '@dnd-kit/core';
|
8
|
+
import { SortableContext, sortableKeyboardCoordinates, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
9
|
+
import { restrictToVerticalAxis, restrictToWindowEdges } from '@dnd-kit/modifiers';
|
10
|
+
import { SortableItem } from './SortableItem';
|
11
|
+
const styles = {
|
12
|
+
textField: {
|
13
|
+
borderRadius: '8px',
|
14
|
+
border: '1px solid rgba(145, 158, 171, 0.32)',
|
15
|
+
},
|
16
|
+
listItem: {
|
17
|
+
borderRadius: '4px',
|
18
|
+
background: '#F4F6F8',
|
19
|
+
},
|
20
|
+
list: {
|
21
|
+
height: 'auto',
|
22
|
+
overflow: 'auto',
|
23
|
+
},
|
24
|
+
switch: {
|
25
|
+
padding: '1px 8px',
|
26
|
+
},
|
27
|
+
};
|
28
|
+
export default function MultiSelect(props) {
|
29
|
+
const { options, onChange, maxHeight, isSortable } = props;
|
30
|
+
const [optionsArray, setOptions] = useState(options);
|
31
|
+
const [selectAll, setSelectAll] = useState(false);
|
32
|
+
const [searchText, setSearchText] = useState('');
|
33
|
+
const sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, {
|
34
|
+
coordinateGetter: sortableKeyboardCoordinates,
|
35
|
+
}), useSensor(PointerSensor, {
|
36
|
+
activationConstraint: {
|
37
|
+
distance: 8,
|
38
|
+
},
|
39
|
+
}));
|
40
|
+
useEffect(() => {
|
41
|
+
if (optionsArray === null || optionsArray === void 0 ? void 0 : optionsArray.every((option) => option.value === true)) {
|
42
|
+
setSelectAll(true);
|
43
|
+
}
|
44
|
+
else {
|
45
|
+
setSelectAll(false);
|
46
|
+
}
|
47
|
+
}, [optionsArray]);
|
48
|
+
const handleFlagChange = (event, idOrLabel) => {
|
49
|
+
const newOptions = optionsArray.map((option) => {
|
50
|
+
var _a;
|
51
|
+
if ((_a = idOrLabel === option.id) !== null && _a !== void 0 ? _a : option.label) {
|
52
|
+
option.value = event.target.checked;
|
53
|
+
}
|
54
|
+
return option;
|
55
|
+
});
|
56
|
+
const allOptions = options === null || options === void 0 ? void 0 : options.map((option) => optionsArray.find((o) => o.id === option.id) || option);
|
57
|
+
onChange(allOptions);
|
58
|
+
setOptions(newOptions);
|
59
|
+
};
|
60
|
+
const handleSelectAllChange = (event) => {
|
61
|
+
setSelectAll(event.target.checked);
|
62
|
+
const newOptions = optionsArray.map((option) => {
|
63
|
+
option.value = event.target.checked;
|
64
|
+
return option;
|
65
|
+
});
|
66
|
+
onChange(newOptions);
|
67
|
+
setOptions(newOptions);
|
68
|
+
};
|
69
|
+
const filterItems = (event) => {
|
70
|
+
setSearchText(event.target.value);
|
71
|
+
const keyword = event.target.value.toLowerCase();
|
72
|
+
let searchResults = [];
|
73
|
+
if (keyword) {
|
74
|
+
searchResults = optionsArray.filter((option) => option.label.toLowerCase().indexOf(keyword) !== -1);
|
75
|
+
}
|
76
|
+
else {
|
77
|
+
searchResults = options;
|
78
|
+
}
|
79
|
+
setOptions(searchResults);
|
80
|
+
};
|
81
|
+
const handleDragEnd = (event) => {
|
82
|
+
const { active, over } = event;
|
83
|
+
const items = [...optionsArray];
|
84
|
+
let reOrderedItems = [];
|
85
|
+
if (active.id !== over.id) {
|
86
|
+
const oldIndex = items.findIndex((item) => item.id === active.id);
|
87
|
+
const newIndex = items.findIndex((item) => item.id === over.id);
|
88
|
+
reOrderedItems = arrayMove(items, oldIndex, newIndex);
|
89
|
+
setOptions(reOrderedItems);
|
90
|
+
onChange(reOrderedItems);
|
91
|
+
}
|
92
|
+
};
|
93
|
+
const arrayMove = (items, fromIndex, toIndex) => {
|
94
|
+
const element = items[fromIndex];
|
95
|
+
items.splice(fromIndex, 1);
|
96
|
+
items.splice(toIndex, 0, element);
|
97
|
+
return items;
|
98
|
+
};
|
99
|
+
return (React.createElement(UIThemeProvider, null,
|
100
|
+
React.createElement(Grid, { container: true, direction: "column", sx: { paddingTop: '10px' } },
|
101
|
+
options.length > 4 && (React.createElement(Grid, { item: true, p: 1 },
|
102
|
+
React.createElement(TextField, { placeholder: "Search Properties", size: "small", InputProps: {
|
103
|
+
startAdornment: (React.createElement(InputAdornment, { position: "start" },
|
104
|
+
React.createElement(Search, null))),
|
105
|
+
}, fullWidth: true, sx: styles.textField, value: searchText, onChange: filterItems }))),
|
106
|
+
(optionsArray === null || optionsArray === void 0 ? void 0 : optionsArray.length) > 1 && (React.createElement(Grid, { item: true, sx: styles.switch },
|
107
|
+
React.createElement(FormControlLabel, { control: React.createElement(Switch, { checked: selectAll, onChange: handleSelectAllChange }), label: "Select all fields" }))),
|
108
|
+
React.createElement(Box, { sx: Object.assign(Object.assign({}, styles.list), { maxHeight: maxHeight !== null && maxHeight !== void 0 ? maxHeight : 'auto' }) }, !!isSortable ? (React.createElement(DndContext, { sensors: sensors, collisionDetection: closestCenter, onDragEnd: handleDragEnd, modifiers: [restrictToVerticalAxis, restrictToWindowEdges] },
|
109
|
+
React.createElement(SortableContext, { items: optionsArray, strategy: verticalListSortingStrategy }, optionsArray.map((option) => {
|
110
|
+
var _a, _b;
|
111
|
+
return (React.createElement(SortableItem, { Item: () => {
|
112
|
+
var _a, _b;
|
113
|
+
return (React.createElement(Grid, { item: true, m: 1, sx: styles.listItem, key: (_a = option === null || option === void 0 ? void 0 : option.id) !== null && _a !== void 0 ? _a : option === null || option === void 0 ? void 0 : option.label },
|
114
|
+
React.createElement(Grid, { container: true, justifyContent: "space-between", wrap: "nowrap" },
|
115
|
+
React.createElement(Grid, { alignSelf: "center", pl: 1, display: "flex", item: true },
|
116
|
+
React.createElement(Box, { sx: {
|
117
|
+
display: 'flex',
|
118
|
+
alignItems: 'center',
|
119
|
+
cursor: 'pointer',
|
120
|
+
}, pr: 1 },
|
121
|
+
React.createElement(DragHandleIcon, { fontSize: "small" })),
|
122
|
+
React.createElement(Typography, null,
|
123
|
+
" ", option === null || option === void 0 ? void 0 :
|
124
|
+
option.label,
|
125
|
+
" ")),
|
126
|
+
React.createElement(Grid, { item: true },
|
127
|
+
React.createElement(Switch, { id: (_b = option === null || option === void 0 ? void 0 : option.id) !== null && _b !== void 0 ? _b : option === null || option === void 0 ? void 0 : option.label, checked: option.value, onChange: (event) => {
|
128
|
+
var _a;
|
129
|
+
handleFlagChange(event, (_a = option === null || option === void 0 ? void 0 : option.id) !== null && _a !== void 0 ? _a : option === null || option === void 0 ? void 0 : option.label);
|
130
|
+
} })))));
|
131
|
+
}, key: (_a = option === null || option === void 0 ? void 0 : option.id) !== null && _a !== void 0 ? _a : option === null || option === void 0 ? void 0 : option.label, id: (_b = option === null || option === void 0 ? void 0 : option.id) !== null && _b !== void 0 ? _b : option === null || option === void 0 ? void 0 : option.label }));
|
132
|
+
})))) : (React.createElement(React.Fragment, null, sortBy(optionsArray, 'label').map((option) => {
|
133
|
+
var _a, _b;
|
134
|
+
return (React.createElement(Grid, { item: true, m: 1, sx: styles.listItem, key: (_a = option === null || option === void 0 ? void 0 : option.id) !== null && _a !== void 0 ? _a : option === null || option === void 0 ? void 0 : option.label },
|
135
|
+
React.createElement(Grid, { container: true, justifyContent: "space-between" },
|
136
|
+
React.createElement(Grid, { alignSelf: "center", pl: 1 },
|
137
|
+
React.createElement(Typography, null,
|
138
|
+
" ", option === null || option === void 0 ? void 0 :
|
139
|
+
option.label,
|
140
|
+
" ")),
|
141
|
+
React.createElement(Grid, null,
|
142
|
+
React.createElement(Switch, { id: (_b = option === null || option === void 0 ? void 0 : option.id) !== null && _b !== void 0 ? _b : option === null || option === void 0 ? void 0 : option.label, checked: option.value, onChange: (event) => { var _a; return handleFlagChange(event, (_a = option === null || option === void 0 ? void 0 : option.id) !== null && _a !== void 0 ? _a : option === null || option === void 0 ? void 0 : option.label); } })))));
|
143
|
+
})))))));
|
144
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { useSortable } from '@dnd-kit/sortable';
|
3
|
+
import { CSS } from '@dnd-kit/utilities';
|
4
|
+
export const SortableItem = (props) => {
|
5
|
+
const { Item } = props;
|
6
|
+
const { attributes, listeners, setNodeRef, transform, transition } = useSortable({ id: props.id });
|
7
|
+
const style = {
|
8
|
+
transform: CSS.Transform.toString(transform),
|
9
|
+
transition,
|
10
|
+
};
|
11
|
+
return (React.createElement("div", Object.assign({ ref: setNodeRef, style: style }, attributes, listeners),
|
12
|
+
React.createElement(Item, null)));
|
13
|
+
};
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
export declare type DynamicHeaders = {
|
3
|
+
field: string;
|
4
|
+
displayTitle: string;
|
5
|
+
mapping: string;
|
6
|
+
};
|
7
|
+
declare type RepeatableFieldProps = {
|
8
|
+
children: Function;
|
9
|
+
onChange: Function;
|
10
|
+
dynamicHeaders?: DynamicHeaders;
|
11
|
+
value?: object[];
|
12
|
+
noInitialItem?: boolean;
|
13
|
+
};
|
14
|
+
export default function RepeatableField(props: RepeatableFieldProps): JSX.Element;
|
15
|
+
export {};
|
@@ -0,0 +1,111 @@
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
2
|
+
import { cloneDeep } from 'lodash-es';
|
3
|
+
import { Accordion, Typography, AccordionSummary, AccordionDetails, Button } from '@mui/material';
|
4
|
+
import UIThemeProvider from '../../../theme';
|
5
|
+
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
6
|
+
import AddIcon from '@mui/icons-material/Add';
|
7
|
+
const styles = {
|
8
|
+
accordion: {
|
9
|
+
borderRadius: '8px',
|
10
|
+
margin: '8px 0',
|
11
|
+
'&:before': {
|
12
|
+
display: 'none',
|
13
|
+
},
|
14
|
+
'& .Mui-expanded': {
|
15
|
+
borderRadius: '8px 8px 0 0'
|
16
|
+
}
|
17
|
+
},
|
18
|
+
accordionSummary: {
|
19
|
+
background: '#F4F6F8',
|
20
|
+
borderRadius: '8px',
|
21
|
+
maxHeight: '30px'
|
22
|
+
},
|
23
|
+
accordionDetails: {
|
24
|
+
display: 'flex',
|
25
|
+
flexDirection: 'column',
|
26
|
+
justifyContent: 'start',
|
27
|
+
borderRadius: '0 0 8px 8px',
|
28
|
+
border: '3px solid #F4F6F8',
|
29
|
+
},
|
30
|
+
};
|
31
|
+
export default function RepeatableField(props) {
|
32
|
+
const { children, onChange, dynamicHeaders, value, noInitialItem } = props;
|
33
|
+
const [selectedField, setSelectField] = useState([{}]);
|
34
|
+
useEffect(() => {
|
35
|
+
if (noInitialItem) {
|
36
|
+
setSelectField([]);
|
37
|
+
}
|
38
|
+
else {
|
39
|
+
setSelectField([{}]);
|
40
|
+
}
|
41
|
+
}, [noInitialItem]);
|
42
|
+
const handler = (event, index) => {
|
43
|
+
const updatedFields = cloneDeep(selectedField);
|
44
|
+
if (event.target.type === 'checkbox') {
|
45
|
+
updatedFields[index] = Object.assign(Object.assign({}, updatedFields[index]), { [event.target.name]: event.target.checked });
|
46
|
+
}
|
47
|
+
else {
|
48
|
+
updatedFields[index] = Object.assign(Object.assign({}, updatedFields[index]), { [event.target.name]: event.target.value });
|
49
|
+
}
|
50
|
+
onChange(updatedFields);
|
51
|
+
setSelectField(updatedFields);
|
52
|
+
};
|
53
|
+
const createInitialStateForFields = (index) => {
|
54
|
+
var _a, _b;
|
55
|
+
if (children) {
|
56
|
+
const childNodes = children(handler, 0, selectedField);
|
57
|
+
if ((_a = childNodes === null || childNodes === void 0 ? void 0 : childNodes.props) === null || _a === void 0 ? void 0 : _a.children.length) {
|
58
|
+
const fieldNames = (_b = childNodes === null || childNodes === void 0 ? void 0 : childNodes.props) === null || _b === void 0 ? void 0 : _b.children.map((item) => { var _a; return (_a = item === null || item === void 0 ? void 0 : item.props) === null || _a === void 0 ? void 0 : _a.name; });
|
59
|
+
const initialState = {};
|
60
|
+
fieldNames.map((name) => {
|
61
|
+
if (name === 'checkbox') {
|
62
|
+
initialState[name] = false;
|
63
|
+
}
|
64
|
+
else {
|
65
|
+
initialState[name] = '';
|
66
|
+
}
|
67
|
+
});
|
68
|
+
let newFields = cloneDeep(selectedField);
|
69
|
+
newFields[index] = initialState;
|
70
|
+
setSelectField(newFields);
|
71
|
+
onChange(newFields);
|
72
|
+
}
|
73
|
+
}
|
74
|
+
};
|
75
|
+
useEffect(() => {
|
76
|
+
if (value === null || value === void 0 ? void 0 : value.length) {
|
77
|
+
onChange(value);
|
78
|
+
setSelectField(value);
|
79
|
+
}
|
80
|
+
else {
|
81
|
+
if (!noInitialItem) {
|
82
|
+
createInitialStateForFields(0);
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}, []);
|
86
|
+
const handleRemoveSelectField = (selectedIndex) => {
|
87
|
+
const filteredResults = selectedField.filter((value, index) => index !== selectedIndex);
|
88
|
+
onChange(filteredResults);
|
89
|
+
setSelectField(filteredResults);
|
90
|
+
};
|
91
|
+
const handleAddSelectedField = () => {
|
92
|
+
createInitialStateForFields(selectedField.length);
|
93
|
+
};
|
94
|
+
return (React.createElement(UIThemeProvider, null,
|
95
|
+
React.createElement("div", null, selectedField === null || selectedField === void 0 ? void 0 :
|
96
|
+
selectedField.map((field, index) => {
|
97
|
+
var _a;
|
98
|
+
return (React.createElement(Accordion, { key: index, elevation: 0, sx: styles.accordion },
|
99
|
+
React.createElement(AccordionSummary, { expandIcon: React.createElement(ExpandMoreIcon, null), "aria-controls": "panel1a-content", id: "panel1a-header", sx: styles.accordionSummary, color: '#F4F6F8' },
|
100
|
+
React.createElement(Typography, { sx: { padding: '4px' } }, (dynamicHeaders === null || dynamicHeaders === void 0 ? void 0 : dynamicHeaders.displayTitle) ? (((_a = selectedField[index][dynamicHeaders === null || dynamicHeaders === void 0 ? void 0 : dynamicHeaders.field]) === null || _a === void 0 ? void 0 : _a['value']) ||
|
101
|
+
dynamicHeaders.displayTitle) : `Item ${index + 1}`)),
|
102
|
+
React.createElement(AccordionDetails, { sx: styles.accordionDetails },
|
103
|
+
React.createElement(React.Fragment, null, children(handler, index, selectedField)),
|
104
|
+
React.createElement(Button, { variant: "outlined", color: "error", size: "small", sx: { margin: '15px 0 0 0', borderRadius: '8px', width: 'max-content' }, onClick: () => handleRemoveSelectField(index) },
|
105
|
+
"Delete ",
|
106
|
+
(dynamicHeaders === null || dynamicHeaders === void 0 ? void 0 : dynamicHeaders.displayTitle) || 'Item'))));
|
107
|
+
}),
|
108
|
+
React.createElement(Button, { variant: "outlined", color: "primary", size: "large", startIcon: React.createElement(AddIcon, null), fullWidth: true, sx: { margin: '15px 0px', borderRadius: '8px' }, onClick: () => handleAddSelectedField() },
|
109
|
+
"Add ",
|
110
|
+
(dynamicHeaders === null || dynamicHeaders === void 0 ? void 0 : dynamicHeaders.displayTitle) || 'Item'))));
|
111
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { Box as MUIBox } from '@mui/material';
|
3
|
+
import UIThemeProvider from '../../../theme';
|
4
|
+
const Box = (props) => {
|
5
|
+
return (React.createElement(UIThemeProvider, null,
|
6
|
+
React.createElement(MUIBox, Object.assign({}, props))));
|
7
|
+
};
|
8
|
+
export default Box;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { Container as MUIContainer } from '@mui/material';
|
3
|
+
import UIThemeProvider from '../../../theme';
|
4
|
+
const Container = (props) => {
|
5
|
+
return (React.createElement(UIThemeProvider, null,
|
6
|
+
React.createElement(MUIContainer, Object.assign({}, props), props === null || props === void 0 ? void 0 : props.children)));
|
7
|
+
};
|
8
|
+
export default Container;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { Grid as MUIGrid } from '@mui/material';
|
3
|
+
import UIThemeProvider from '../../../theme';
|
4
|
+
const Grid = (props) => {
|
5
|
+
return (React.createElement(UIThemeProvider, null,
|
6
|
+
React.createElement(MUIGrid, Object.assign({}, props), props === null || props === void 0 ? void 0 : props.children)));
|
7
|
+
};
|
8
|
+
export default Grid;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { Stack as MUIStack } from '@mui/material';
|
3
|
+
import UIThemeProvider from '../../../theme';
|
4
|
+
const Grid = (props) => {
|
5
|
+
return (React.createElement(UIThemeProvider, null,
|
6
|
+
React.createElement(MUIStack, Object.assign({}, props))));
|
7
|
+
};
|
8
|
+
export default Grid;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from '@mui/icons-material';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from '@mui/icons-material';
|
@@ -0,0 +1,6 @@
|
|
1
|
+
export { ClickAwayListener, FormControlProps, FormHelperTextProps, GridSize, Toolbar } from '@mui/material';
|
2
|
+
export { CalendarPicker, DateTimePicker, MonthPicker, PickersDay, StaticDateTimePicker, StaticTimePicker, TimePicker, YearPicker, } from '@mui/x-date-pickers';
|
3
|
+
export * from './components/core';
|
4
|
+
export { CriteriaBuilder, FormField, MenuBar, MultiSelect, RepeatableField } from './components/custom';
|
5
|
+
export { Box, Container, Grid, Stack } from './components/layout';
|
6
|
+
export * from './util';
|
@@ -0,0 +1,6 @@
|
|
1
|
+
export { ClickAwayListener, Toolbar } from '@mui/material';
|
2
|
+
export { CalendarPicker, DateTimePicker, MonthPicker, PickersDay, StaticDateTimePicker, StaticTimePicker, TimePicker, YearPicker, } from '@mui/x-date-pickers';
|
3
|
+
export * from './components/core';
|
4
|
+
export { CriteriaBuilder, FormField, MenuBar, MultiSelect, RepeatableField } from './components/custom';
|
5
|
+
export { Box, Container, Grid, Stack } from './components/layout';
|
6
|
+
export * from './util';
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
3
|
+
declare const _default: ComponentMeta<(props: import("@mui/material").AccordionProps) => JSX.Element>;
|
4
|
+
export default _default;
|
5
|
+
export declare const Accordion: ComponentStory<(props: import("@mui/material").AccordionProps) => JSX.Element>;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Typography } from '@mui/material';
|
3
|
+
import { Accordion as CustomAccordion, AccordionSummary, AccordionDetails } from '../index';
|
4
|
+
export default {
|
5
|
+
title: 'Data Display/Accordion',
|
6
|
+
component: CustomAccordion,
|
7
|
+
};
|
8
|
+
const AccordionTemplate = (args) => {
|
9
|
+
return (React.createElement("div", null,
|
10
|
+
React.createElement(CustomAccordion, Object.assign({}, args),
|
11
|
+
React.createElement(AccordionSummary, { "aria-controls": "panel1a-content", id: "panel1a-header" },
|
12
|
+
React.createElement(Typography, null, "Accordion 1")),
|
13
|
+
React.createElement(AccordionDetails, null,
|
14
|
+
React.createElement(Typography, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget."))),
|
15
|
+
React.createElement(CustomAccordion, Object.assign({}, args),
|
16
|
+
React.createElement(AccordionSummary, { "aria-controls": "panel2a-content", id: "panel2a-header" },
|
17
|
+
React.createElement(Typography, null, "Accordion 2")),
|
18
|
+
React.createElement(AccordionDetails, null,
|
19
|
+
React.createElement(Typography, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget.")))));
|
20
|
+
};
|
21
|
+
export const Accordion = AccordionTemplate.bind({});
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
3
|
+
declare const _default: ComponentMeta<(props: import("@mui/material").AlertProps) => JSX.Element>;
|
4
|
+
export default _default;
|
5
|
+
export declare const Alert: ComponentStory<(props: import("@mui/material").AlertProps) => JSX.Element>;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Alert as CustomAlert } from '../index';
|
3
|
+
export default {
|
4
|
+
title: 'Data Display/Alert',
|
5
|
+
component: CustomAlert,
|
6
|
+
};
|
7
|
+
const AlertTemplate = (args) => (React.createElement(CustomAlert, Object.assign({ severity: "error" }, args), "This is an error alert \u2014 check it out!"));
|
8
|
+
export const Alert = AlertTemplate.bind({});
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
3
|
+
declare const _default: ComponentMeta<(props: import("@mui/material").AppBarProps<"header", {}>) => JSX.Element>;
|
4
|
+
export default _default;
|
5
|
+
export declare const AppBar: ComponentStory<(props: import("@mui/material").AppBarProps<"header", {}>) => JSX.Element>;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { AppBar as CustomAppBar, Toolbar, Typography, Box, Button, IconButton } from '../index';
|
3
|
+
import { Menu } from '@mui/icons-material';
|
4
|
+
export default {
|
5
|
+
title: 'Data Display/AppBar',
|
6
|
+
component: CustomAppBar,
|
7
|
+
};
|
8
|
+
const Template = (props) => (React.createElement(Box, { sx: { flexGrow: 1 } },
|
9
|
+
React.createElement(CustomAppBar, { position: "static" },
|
10
|
+
React.createElement(Toolbar, null,
|
11
|
+
React.createElement(IconButton, { size: "large", edge: "start", color: "inherit", "aria-label": "menu", sx: { mr: 2 } },
|
12
|
+
React.createElement(Menu, null)),
|
13
|
+
React.createElement(Typography, { variant: "h6", component: "div", sx: { flexGrow: 1 } }, "News"),
|
14
|
+
React.createElement(Button, { color: "inherit" }, "Login")))));
|
15
|
+
export const AppBar = Template.bind({});
|