@popmenu/admin-ui 0.125.0 → 0.126.1
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/build/esm/components/Alert/Alert.d.ts +3 -0
- package/build/esm/components/Alert/Alert.js +41 -0
- package/build/esm/components/Alert/Alert.js.map +1 -0
- package/build/{components → esm/components}/Alert/AlertProps.d.ts +14 -14
- package/build/{components → esm/components}/Alert/AlertStyles.d.ts +2 -2
- package/build/esm/components/Alert/AlertStyles.js +21 -0
- package/build/esm/components/Alert/AlertStyles.js.map +1 -0
- package/build/{components → esm/components}/Alert/index.d.ts +2 -2
- package/build/esm/components/AlertDialog/AlertDialog.d.ts +3 -0
- package/build/esm/components/AlertDialog/AlertDialog.js +32 -0
- package/build/esm/components/AlertDialog/AlertDialog.js.map +1 -0
- package/build/{components → esm/components}/AlertDialog/AlertDialogProps.d.ts +26 -26
- package/build/esm/components/AlertDialog/AlertDialogStyles.d.ts +2 -0
- package/build/esm/components/AlertDialog/AlertDialogStyles.js +29 -0
- package/build/esm/components/AlertDialog/AlertDialogStyles.js.map +1 -0
- package/build/{components → esm/components}/AlertDialog/index.d.ts +2 -2
- package/build/{components → esm/components}/AlertDialogHeader/AlertDialogHeader.d.ts +3 -3
- package/build/esm/components/AlertDialogHeader/AlertDialogHeader.js +13 -0
- package/build/esm/components/AlertDialogHeader/AlertDialogHeader.js.map +1 -0
- package/build/{components → esm/components}/AlertDialogHeader/index.d.ts +1 -1
- package/build/{components → esm/components}/AlertTitle/AlertTitle.d.ts +3 -3
- package/build/esm/components/AlertTitle/AlertTitle.js +17 -0
- package/build/esm/components/AlertTitle/AlertTitle.js.map +1 -0
- package/build/{components → esm/components}/AlertTitle/index.d.ts +2 -2
- package/build/{components → esm/components}/Button/Button.d.ts +11 -11
- package/build/esm/components/Button/Button.js +22 -0
- package/build/esm/components/Button/Button.js.map +1 -0
- package/build/{components → esm/components}/Button/ButtonProps.d.ts +8 -8
- package/build/{components → esm/components}/Button/ButtonStyles.d.ts +7 -7
- package/build/esm/components/Button/ButtonStyles.js +123 -0
- package/build/esm/components/Button/ButtonStyles.js.map +1 -0
- package/build/{components → esm/components}/Button/index.d.ts +2 -2
- package/build/{components → esm/components}/Button/util/deriveButtonProps.d.ts +5 -5
- package/build/esm/components/Button/util/deriveButtonProps.js +42 -0
- package/build/esm/components/Button/util/deriveButtonProps.js.map +1 -0
- package/build/esm/components/ButtonGroup/ButtonGroup.d.ts +3 -0
- package/build/esm/components/ButtonGroup/ButtonGroup.js +28 -0
- package/build/esm/components/ButtonGroup/ButtonGroup.js.map +1 -0
- package/build/{components → esm/components}/ButtonGroup/ButtonGroupProps.d.ts +8 -8
- package/build/{components → esm/components}/ButtonGroup/ButtonGroupStyles.d.ts +2 -2
- package/build/esm/components/ButtonGroup/ButtonGroupStyles.js +28 -0
- package/build/esm/components/ButtonGroup/ButtonGroupStyles.js.map +1 -0
- package/build/{components → esm/components}/ButtonGroup/index.d.ts +2 -2
- package/build/{components → esm/components}/Dialog/index.d.ts +1 -1
- package/build/{components → esm/components}/DialogActions/DialogActions.d.ts +3 -3
- package/build/esm/components/DialogActions/DialogActions.js +20 -0
- package/build/esm/components/DialogActions/DialogActions.js.map +1 -0
- package/build/{components → esm/components}/DialogActions/index.d.ts +2 -2
- package/build/{components → esm/components}/DialogContent/index.d.ts +1 -1
- package/build/{components → esm/components}/DialogTitle/index.d.ts +1 -1
- package/build/{components → esm/components}/FeatureIntro/FeatureIntro.d.ts +3 -3
- package/build/esm/components/FeatureIntro/FeatureIntro.js +27 -0
- package/build/esm/components/FeatureIntro/FeatureIntro.js.map +1 -0
- package/build/{components → esm/components}/FeatureIntro/FeatureIntroProps.d.ts +22 -22
- package/build/{components → esm/components}/FeatureIntro/FeatureIntroStyles.d.ts +2 -2
- package/build/esm/components/FeatureIntro/FeatureIntroStyles.js +20 -0
- package/build/esm/components/FeatureIntro/FeatureIntroStyles.js.map +1 -0
- package/build/{components → esm/components}/FeatureIntro/index.d.ts +2 -2
- package/build/{components → esm/components}/FullScreenStepper/FullScreenStepper.d.ts +8 -8
- package/build/esm/components/FullScreenStepper/FullScreenStepper.js +105 -0
- package/build/esm/components/FullScreenStepper/FullScreenStepper.js.map +1 -0
- package/build/{components → esm/components}/FullScreenStepper/FullScreenStepperContext.d.ts +6 -6
- package/build/esm/components/FullScreenStepper/FullScreenStepperContext.js +6 -0
- package/build/esm/components/FullScreenStepper/FullScreenStepperContext.js.map +1 -0
- package/build/{components → esm/components}/FullScreenStepper/FullScreenStepperProps.d.ts +68 -68
- package/build/{components → esm/components}/FullScreenStepper/index.d.ts +3 -3
- package/build/{components → esm/components}/FullScreenStepper/types/index.d.ts +25 -25
- package/build/{components → esm/components}/FullScreenStepperActions/FullScreenStepperActions.d.ts +3 -3
- package/build/esm/components/FullScreenStepperActions/FullScreenStepperActions.js +26 -0
- package/build/esm/components/FullScreenStepperActions/FullScreenStepperActions.js.map +1 -0
- package/build/{components → esm/components}/FullScreenStepperActions/FullScreenStepperActionsProps.d.ts +22 -22
- package/build/{components → esm/components}/FullScreenStepperActions/FullScreenStepperActionsStyles.d.ts +2 -2
- package/build/esm/components/FullScreenStepperActions/FullScreenStepperActionsStyles.js +29 -0
- package/build/esm/components/FullScreenStepperActions/FullScreenStepperActionsStyles.js.map +1 -0
- package/build/{components → esm/components}/FullScreenStepperActions/index.d.ts +2 -2
- package/build/{components → esm/components}/FullScreenStepperActions/util/StepperActionsCancelButton.d.ts +11 -11
- package/build/esm/components/FullScreenStepperActions/util/StepperActionsCancelButton.js +13 -0
- package/build/esm/components/FullScreenStepperActions/util/StepperActionsCancelButton.js.map +1 -0
- package/build/{components → esm/components}/FullScreenStepperActions/util/StepperActionsNextButton.d.ts +12 -12
- package/build/esm/components/FullScreenStepperActions/util/StepperActionsNextButton.js +17 -0
- package/build/esm/components/FullScreenStepperActions/util/StepperActionsNextButton.js.map +1 -0
- package/build/{components → esm/components}/FullScreenStepperActions/util/StepperActionsPreviousButton.d.ts +11 -11
- package/build/esm/components/FullScreenStepperActions/util/StepperActionsPreviousButton.js +13 -0
- package/build/esm/components/FullScreenStepperActions/util/StepperActionsPreviousButton.js.map +1 -0
- package/build/{components → esm/components}/FullScreenStepperActions/util/StepperActionsStatusText.d.ts +4 -4
- package/build/esm/components/FullScreenStepperActions/util/StepperActionsStatusText.js +17 -0
- package/build/esm/components/FullScreenStepperActions/util/StepperActionsStatusText.js.map +1 -0
- package/build/{components → esm/components}/FullScreenStepperActions/util/augmentButtonProps.d.ts +5 -5
- package/build/esm/components/FullScreenStepperActions/util/augmentButtonProps.js +29 -0
- package/build/esm/components/FullScreenStepperActions/util/augmentButtonProps.js.map +1 -0
- package/build/{components → esm/components}/FullScreenStepperContent/FullScreenStepperContent.d.ts +5 -5
- package/build/esm/components/FullScreenStepperContent/FullScreenStepperContent.js +11 -0
- package/build/esm/components/FullScreenStepperContent/FullScreenStepperContent.js.map +1 -0
- package/build/{components → esm/components}/FullScreenStepperContent/index.d.ts +1 -1
- package/build/{components → esm/components}/FullScreenStepperHeader/FullScreenStepperHeader.d.ts +3 -3
- package/build/esm/components/FullScreenStepperHeader/FullScreenStepperHeader.js +22 -0
- package/build/esm/components/FullScreenStepperHeader/FullScreenStepperHeader.js.map +1 -0
- package/build/{components → esm/components}/FullScreenStepperHeader/FullScreenStepperHeaderProps.d.ts +8 -8
- package/build/{components → esm/components}/FullScreenStepperHeader/FullScreenStepperHeaderStyles.d.ts +2 -2
- package/build/esm/components/FullScreenStepperHeader/FullScreenStepperHeaderStyles.js +26 -0
- package/build/esm/components/FullScreenStepperHeader/FullScreenStepperHeaderStyles.js.map +1 -0
- package/build/{components → esm/components}/FullScreenStepperHeader/index.d.ts +1 -1
- package/build/{components → esm/components}/FullScreenStepperProgress/FullScreenStepperProgress.d.ts +3 -3
- package/build/esm/components/FullScreenStepperProgress/FullScreenStepperProgress.js +12 -0
- package/build/esm/components/FullScreenStepperProgress/FullScreenStepperProgress.js.map +1 -0
- package/build/{components → esm/components}/FullScreenStepperProgress/FullScreenStepperProgressProps.d.ts +5 -5
- package/build/{components → esm/components}/FullScreenStepperProgress/FullScreenStepperProgressStyles.d.ts +2 -2
- package/build/esm/components/FullScreenStepperProgress/FullScreenStepperProgressStyles.js +36 -0
- package/build/esm/components/FullScreenStepperProgress/FullScreenStepperProgressStyles.js.map +1 -0
- package/build/{components → esm/components}/FullScreenStepperProgress/index.d.ts +1 -1
- package/build/{components → esm/components}/List/List.d.ts +3 -3
- package/build/esm/components/List/List.js +15 -0
- package/build/esm/components/List/List.js.map +1 -0
- package/build/{components → esm/components}/List/ListProps.d.ts +4 -4
- package/build/{components → esm/components}/List/index.d.ts +2 -2
- package/build/{components → esm/components}/List/styles.d.ts +2 -2
- package/build/esm/components/List/styles.js +24 -0
- package/build/esm/components/List/styles.js.map +1 -0
- package/build/{components → esm/components}/Page/Page.d.ts +2 -2
- package/build/esm/components/Page/Page.js +11 -0
- package/build/esm/components/Page/Page.js.map +1 -0
- package/build/{components → esm/components}/Page/index.d.ts +1 -1
- package/build/{components → esm/components}/PageBody/PageBody.d.ts +2 -2
- package/build/esm/components/PageBody/PageBody.js +11 -0
- package/build/esm/components/PageBody/PageBody.js.map +1 -0
- package/build/{components → esm/components}/PageBody/index.d.ts +1 -1
- package/build/{components → esm/components}/PageSection/PageSection.d.ts +3 -3
- package/build/esm/components/PageSection/PageSection.js +15 -0
- package/build/esm/components/PageSection/PageSection.js.map +1 -0
- package/build/{components → esm/components}/PageSection/PageSectionProps.d.ts +5 -5
- package/build/{components → esm/components}/PageSection/PageSectionStyles.d.ts +2 -2
- package/build/esm/components/PageSection/PageSectionStyles.js +19 -0
- package/build/esm/components/PageSection/PageSectionStyles.js.map +1 -0
- package/build/{components → esm/components}/PageSection/index.d.ts +1 -1
- package/build/{components → esm/components}/PageSectionHead/PageSectionHead.d.ts +2 -2
- package/build/esm/components/PageSectionHead/PageSectionHead.js +13 -0
- package/build/esm/components/PageSectionHead/PageSectionHead.js.map +1 -0
- package/build/{components → esm/components}/PageSectionHead/index.d.ts +1 -1
- package/build/{components → esm/components}/PageSectionTitle/PageSectionTitle.d.ts +3 -3
- package/build/esm/components/PageSectionTitle/PageSectionTitle.js +13 -0
- package/build/esm/components/PageSectionTitle/PageSectionTitle.js.map +1 -0
- package/build/{components → esm/components}/PageSectionTitle/index.d.ts +1 -1
- package/build/{components → esm/components}/PageSectionTitle/styles.d.ts +1 -1
- package/build/esm/components/PageSectionTitle/styles.js +10 -0
- package/build/esm/components/PageSectionTitle/styles.js.map +1 -0
- package/build/{components → esm/components}/PageSections/PageSections.d.ts +2 -2
- package/build/esm/components/PageSections/PageSections.js +11 -0
- package/build/esm/components/PageSections/PageSections.js.map +1 -0
- package/build/{components → esm/components}/PageSections/index.d.ts +1 -1
- package/build/{components → esm/components}/SelectableCard/SelectableCard.d.ts +3 -3
- package/build/esm/components/SelectableCard/SelectableCard.js +22 -0
- package/build/esm/components/SelectableCard/SelectableCard.js.map +1 -0
- package/build/{components → esm/components}/SelectableCard/SelectableCardProps.d.ts +18 -18
- package/build/{components → esm/components}/SelectableCard/SelectableCardStyles.d.ts +2 -2
- package/build/esm/components/SelectableCard/SelectableCardStyles.js +47 -0
- package/build/esm/components/SelectableCard/SelectableCardStyles.js.map +1 -0
- package/build/{components → esm/components}/SelectableCard/index.d.ts +2 -2
- package/build/{components → esm/components}/SettingsIndexCard/SettingsIndexCard.d.ts +11 -11
- package/build/esm/components/SettingsIndexCard/SettingsIndexCard.js +24 -0
- package/build/esm/components/SettingsIndexCard/SettingsIndexCard.js.map +1 -0
- package/build/{components → esm/components}/SettingsIndexCard/SettingsIndexCardProps.d.ts +20 -20
- package/build/{components → esm/components}/SettingsIndexCard/SettingsIndexCardStyles.d.ts +2 -2
- package/build/esm/components/SettingsIndexCard/SettingsIndexCardStyles.js +21 -0
- package/build/esm/components/SettingsIndexCard/SettingsIndexCardStyles.js.map +1 -0
- package/build/{components → esm/components}/SettingsIndexCard/index.d.ts +2 -2
- package/build/{components → esm/components}/SettingsIndexCardGroup/SettingsIndexCardGroup.d.ts +3 -3
- package/build/esm/components/SettingsIndexCardGroup/SettingsIndexCardGroup.js +11 -0
- package/build/esm/components/SettingsIndexCardGroup/SettingsIndexCardGroup.js.map +1 -0
- package/build/{components → esm/components}/SettingsIndexCardGroup/index.d.ts +1 -1
- package/build/{components → esm/components}/StandardListItem/StandardListItem.d.ts +9 -9
- package/build/esm/components/StandardListItem/StandardListItem.js +40 -0
- package/build/esm/components/StandardListItem/StandardListItem.js.map +1 -0
- package/build/{components → esm/components}/StandardListItem/StandardListItemProps.d.ts +25 -25
- package/build/{components → esm/components}/StandardListItem/index.d.ts +2 -2
- package/build/{components → esm/components}/Toast/Toast.d.ts +3 -3
- package/build/esm/components/Toast/Toast.js +20 -0
- package/build/esm/components/Toast/Toast.js.map +1 -0
- package/build/{components → esm/components}/Toast/ToastProps.d.ts +10 -10
- package/build/{components → esm/components}/Toast/ToastStyles.d.ts +2 -2
- package/build/esm/components/Toast/ToastStyles.js +16 -0
- package/build/esm/components/Toast/ToastStyles.js.map +1 -0
- package/build/{components → esm/components}/Toast/index.d.ts +2 -2
- package/build/{components → esm/components}/index.d.ts +27 -27
- package/build/{hooks → esm/hooks}/index.d.ts +3 -3
- package/build/{hooks → esm/hooks}/useDialog.d.ts +12 -12
- package/build/esm/hooks/useDialog.js +13 -0
- package/build/esm/hooks/useDialog.js.map +1 -0
- package/build/{hooks → esm/hooks}/useFullScreenStepperContext.d.ts +2 -2
- package/build/esm/hooks/useFullScreenStepperContext.js +8 -0
- package/build/esm/hooks/useFullScreenStepperContext.js.map +1 -0
- package/build/{hooks → esm/hooks}/useSelectableCard.d.ts +24 -24
- package/build/esm/hooks/useSelectableCard.js +50 -0
- package/build/esm/hooks/useSelectableCard.js.map +1 -0
- package/build/{index.d.ts → esm/index.d.ts} +3 -3
- package/build/esm/index.js +32 -0
- package/build/esm/index.js.map +1 -0
- package/build/{theme → esm/theme}/adminDarkTheme.d.ts +252 -227
- package/build/esm/theme/adminDarkTheme.js +13 -0
- package/build/esm/theme/adminDarkTheme.js.map +1 -0
- package/build/{theme → esm/theme}/adminLightTheme.d.ts +253 -228
- package/build/esm/theme/adminLightTheme.js +13 -0
- package/build/esm/theme/adminLightTheme.js.map +1 -0
- package/build/{theme → esm/theme}/breakpoints.d.ts +9 -9
- package/build/esm/theme/breakpoints.js +12 -0
- package/build/esm/theme/breakpoints.js.map +1 -0
- package/build/{theme → esm/theme}/customThemeProperties.d.ts +63 -63
- package/build/esm/theme/customThemeProperties.js +54 -0
- package/build/esm/theme/customThemeProperties.js.map +1 -0
- package/build/{theme → esm/theme}/index.d.ts +2 -2
- package/build/{theme → esm/theme}/overrides.d.ts +30 -30
- package/build/esm/theme/overrides.js +35 -0
- package/build/esm/theme/overrides.js.map +1 -0
- package/build/{theme → esm/theme}/palette.d.ts +128 -128
- package/build/esm/theme/palette.js +131 -0
- package/build/esm/theme/palette.js.map +1 -0
- package/build/{theme → esm/theme}/props.d.ts +8 -8
- package/build/esm/theme/props.js +11 -0
- package/build/esm/theme/props.js.map +1 -0
- package/build/{theme → esm/theme}/typography.d.ts +61 -61
- package/build/esm/theme/typography.js +65 -0
- package/build/esm/theme/typography.js.map +1 -0
- package/build/index.js +1143 -2327
- package/build/index.js.map +1 -1
- package/package.json +8 -8
- package/build/components/Alert/Alert.d.ts +0 -3
- package/build/components/AlertDialog/AlertDialog.d.ts +0 -3
- package/build/components/AlertDialog/AlertDialogStyles.d.ts +0 -2
- package/build/components/ButtonGroup/ButtonGroup.d.ts +0 -3
- package/build/index.es.js +0 -2375
- package/build/index.es.js.map +0 -1
package/build/index.es.js
DELETED
|
@@ -1,2375 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import React__default, { createElement, forwardRef, createContext, useState, useContext } from 'react';
|
|
3
|
-
import CommonAlert from '@material-ui/lab/Alert';
|
|
4
|
-
import { makeStyles, Typography as Typography$1, Link as Link$1, Paper as Paper$1, Box, useTheme as useTheme$1, ButtonBase, List as List$1, ListItem, ListItemAvatar, ListItemText, Chip, ListItemSecondaryAction, IconButton as IconButton$1 } from '@material-ui/core';
|
|
5
|
-
export { CircularProgress, MenuItem, Switch, TextField } from '@material-ui/core';
|
|
6
|
-
import '@material-ui/core/AppBar';
|
|
7
|
-
import MuiAvatar from '@material-ui/core/Avatar';
|
|
8
|
-
import { makeStyles as makeStyles$1, useTheme, lighten } from '@material-ui/core/styles';
|
|
9
|
-
import '@material-ui/core/Badge';
|
|
10
|
-
import MuiButton from '@material-ui/core/Button';
|
|
11
|
-
import CircularProgress from '@material-ui/core/CircularProgress';
|
|
12
|
-
import CommonButtonGroup from '@material-ui/core/ButtonGroup';
|
|
13
|
-
import Card from '@material-ui/core/Card';
|
|
14
|
-
import CardActionArea from '@material-ui/core/CardActionArea';
|
|
15
|
-
import CardActions from '@material-ui/core/CardActions';
|
|
16
|
-
import CardContent from '@material-ui/core/CardContent';
|
|
17
|
-
import '@material-ui/core/CardHeader';
|
|
18
|
-
import '@material-ui/core/CardMedia';
|
|
19
|
-
import MuiCheckbox from '@material-ui/core/Checkbox';
|
|
20
|
-
import FormControlLabel from '@material-ui/core/FormControlLabel';
|
|
21
|
-
import '@material-ui/core/Chip';
|
|
22
|
-
import '@material-ui/core/Collapse';
|
|
23
|
-
import Dialog from '@material-ui/core/Dialog';
|
|
24
|
-
export { default as Dialog } from '@material-ui/core/Dialog';
|
|
25
|
-
import CommonDialogActions from '@material-ui/core/DialogActions';
|
|
26
|
-
export { default as DialogContent } from '@material-ui/core/DialogContent';
|
|
27
|
-
export { default as DialogTitle } from '@material-ui/core/DialogTitle';
|
|
28
|
-
import '@material-ui/core/Drawer';
|
|
29
|
-
import '@material-ui/core/FormControl';
|
|
30
|
-
import '@material-ui/core/Grid';
|
|
31
|
-
import MuiIconButton from '@material-ui/core/IconButton';
|
|
32
|
-
import '@material-ui/core/InputAdornment';
|
|
33
|
-
import '@material-ui/core/LinearProgress';
|
|
34
|
-
import '@material-ui/core/List';
|
|
35
|
-
import '@material-ui/core/ListItem';
|
|
36
|
-
import '@material-ui/core/ListItemAvatar';
|
|
37
|
-
import '@material-ui/core/ListItemIcon';
|
|
38
|
-
import '@material-ui/core/ListItemSecondaryAction';
|
|
39
|
-
import '@material-ui/core/ListItemText';
|
|
40
|
-
import '@material-ui/core/Menu';
|
|
41
|
-
import '@material-ui/core/MenuItem';
|
|
42
|
-
import '@material-ui/core/MenuList';
|
|
43
|
-
import MuiRadio from '@material-ui/core/Radio';
|
|
44
|
-
import '@material-ui/core/TextField';
|
|
45
|
-
import MuiSwitch from '@material-ui/core/Switch';
|
|
46
|
-
import '@material-ui/core/Tab';
|
|
47
|
-
import '@material-ui/core/Tabs';
|
|
48
|
-
import MuiToggleButton from '@material-ui/lab/ToggleButton';
|
|
49
|
-
import MuiToggleButtonGroup from '@material-ui/lab/ToggleButtonGroup';
|
|
50
|
-
import MuiTooltip from '@material-ui/core/Tooltip';
|
|
51
|
-
import MuiAlertTitle from '@material-ui/lab/AlertTitle';
|
|
52
|
-
import Box$1 from '@material-ui/core/Box';
|
|
53
|
-
import MuiSnackbar from '@material-ui/core/Snackbar';
|
|
54
|
-
import createTheme from '@material-ui/core/styles/createTheme';
|
|
55
|
-
|
|
56
|
-
/*! *****************************************************************************
|
|
57
|
-
Copyright (c) Microsoft Corporation.
|
|
58
|
-
|
|
59
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
60
|
-
purpose with or without fee is hereby granted.
|
|
61
|
-
|
|
62
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
63
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
64
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
65
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
66
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
67
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
68
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
69
|
-
***************************************************************************** */
|
|
70
|
-
|
|
71
|
-
var __assign$1 = function() {
|
|
72
|
-
__assign$1 = Object.assign || function __assign(t) {
|
|
73
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
74
|
-
s = arguments[i];
|
|
75
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
76
|
-
}
|
|
77
|
-
return t;
|
|
78
|
-
};
|
|
79
|
-
return __assign$1.apply(this, arguments);
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
function __rest$1(s, e) {
|
|
83
|
-
var t = {};
|
|
84
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
85
|
-
t[p] = s[p];
|
|
86
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
87
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
88
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
89
|
-
t[p[i]] = s[p[i]];
|
|
90
|
-
}
|
|
91
|
-
return t;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
95
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
96
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
97
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
98
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
99
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
100
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function __generator(thisArg, body) {
|
|
105
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
106
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
107
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
108
|
-
function step(op) {
|
|
109
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
110
|
-
while (_) try {
|
|
111
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
112
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
113
|
-
switch (op[0]) {
|
|
114
|
-
case 0: case 1: t = op; break;
|
|
115
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
116
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
117
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
118
|
-
default:
|
|
119
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
120
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
121
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
122
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
123
|
-
if (t[2]) _.ops.pop();
|
|
124
|
-
_.trys.pop(); continue;
|
|
125
|
-
}
|
|
126
|
-
op = body.call(thisArg, _);
|
|
127
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
128
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
function __spreadArray(to, from, pack) {
|
|
133
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
134
|
-
if (ar || !(i in from)) {
|
|
135
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
136
|
-
ar[i] = from[i];
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
return to.concat(ar || from);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/*! *****************************************************************************
|
|
143
|
-
Copyright (c) Microsoft Corporation.
|
|
144
|
-
|
|
145
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
146
|
-
purpose with or without fee is hereby granted.
|
|
147
|
-
|
|
148
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
149
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
150
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
151
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
152
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
153
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
154
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
155
|
-
***************************************************************************** */
|
|
156
|
-
|
|
157
|
-
var __assign = function() {
|
|
158
|
-
__assign = Object.assign || function __assign(t) {
|
|
159
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
160
|
-
s = arguments[i];
|
|
161
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
162
|
-
}
|
|
163
|
-
return t;
|
|
164
|
-
};
|
|
165
|
-
return __assign.apply(this, arguments);
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
function __rest(s, e) {
|
|
169
|
-
var t = {};
|
|
170
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
171
|
-
t[p] = s[p];
|
|
172
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
173
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
174
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
175
|
-
t[p[i]] = s[p[i]];
|
|
176
|
-
}
|
|
177
|
-
return t;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
var _path$1D;
|
|
181
|
-
|
|
182
|
-
function _extends$3H() { _extends$3H = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3H.apply(this, arguments); }
|
|
183
|
-
|
|
184
|
-
function SvgUser(props) {
|
|
185
|
-
return /*#__PURE__*/React.createElement("svg", _extends$3H({
|
|
186
|
-
viewBox: "0 0 16 16",
|
|
187
|
-
fill: "none",
|
|
188
|
-
strokeLinecap: "round",
|
|
189
|
-
strokeLinejoin: "round",
|
|
190
|
-
width: "1em",
|
|
191
|
-
height: "1em"
|
|
192
|
-
}, props), _path$1D || (_path$1D = /*#__PURE__*/React.createElement("path", {
|
|
193
|
-
d: "M13.333 14v-1.333A2.667 2.667 0 0010.667 10H5.333a2.667 2.667 0 00-2.666 2.667V14M8 7.333A2.667 2.667 0 108 2a2.667 2.667 0 000 5.333z",
|
|
194
|
-
stroke: "currentColor"
|
|
195
|
-
})));
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
var useIconStyles = makeStyles(function (_a) {
|
|
199
|
-
var spacing = _a.spacing, palette = _a.palette;
|
|
200
|
-
var getFontSize = function (_a) {
|
|
201
|
-
var size = _a.size;
|
|
202
|
-
var sizes = {
|
|
203
|
-
inherit: 'inherit',
|
|
204
|
-
small: spacing(1.5),
|
|
205
|
-
medium: spacing(2),
|
|
206
|
-
large: spacing(2.5),
|
|
207
|
-
'extra-large': spacing(3),
|
|
208
|
-
};
|
|
209
|
-
return size ? sizes[size] : 'inherit';
|
|
210
|
-
};
|
|
211
|
-
var getColor = function (props) {
|
|
212
|
-
var semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
|
|
213
|
-
var value = 'inherit';
|
|
214
|
-
if (props.color) {
|
|
215
|
-
if (semanticColors.includes(props.color.split('.')[0])) {
|
|
216
|
-
var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
217
|
-
// @ts-expect-error - todo.
|
|
218
|
-
value = palette[color][variant];
|
|
219
|
-
}
|
|
220
|
-
else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
|
|
221
|
-
value = props.color;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
return value;
|
|
225
|
-
};
|
|
226
|
-
return {
|
|
227
|
-
root: {
|
|
228
|
-
color: getColor,
|
|
229
|
-
fontSize: getFontSize,
|
|
230
|
-
strokeWidth: '1.3px',
|
|
231
|
-
},
|
|
232
|
-
};
|
|
233
|
-
});
|
|
234
|
-
|
|
235
|
-
var classnames$1 = {exports: {}};
|
|
236
|
-
|
|
237
|
-
/*!
|
|
238
|
-
Copyright (c) 2018 Jed Watson.
|
|
239
|
-
Licensed under the MIT License (MIT), see
|
|
240
|
-
http://jedwatson.github.io/classnames
|
|
241
|
-
*/
|
|
242
|
-
|
|
243
|
-
(function (module) {
|
|
244
|
-
/* global define */
|
|
245
|
-
|
|
246
|
-
(function () {
|
|
247
|
-
|
|
248
|
-
var hasOwn = {}.hasOwnProperty;
|
|
249
|
-
|
|
250
|
-
function classNames() {
|
|
251
|
-
var classes = [];
|
|
252
|
-
|
|
253
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
254
|
-
var arg = arguments[i];
|
|
255
|
-
if (!arg) continue;
|
|
256
|
-
|
|
257
|
-
var argType = typeof arg;
|
|
258
|
-
|
|
259
|
-
if (argType === 'string' || argType === 'number') {
|
|
260
|
-
classes.push(arg);
|
|
261
|
-
} else if (Array.isArray(arg)) {
|
|
262
|
-
if (arg.length) {
|
|
263
|
-
var inner = classNames.apply(null, arg);
|
|
264
|
-
if (inner) {
|
|
265
|
-
classes.push(inner);
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
} else if (argType === 'object') {
|
|
269
|
-
if (arg.toString === Object.prototype.toString) {
|
|
270
|
-
for (var key in arg) {
|
|
271
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
272
|
-
classes.push(key);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
} else {
|
|
276
|
-
classes.push(arg.toString());
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
return classes.join(' ');
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
if (module.exports) {
|
|
285
|
-
classNames.default = classNames;
|
|
286
|
-
module.exports = classNames;
|
|
287
|
-
} else {
|
|
288
|
-
window.classNames = classNames;
|
|
289
|
-
}
|
|
290
|
-
}());
|
|
291
|
-
}(classnames$1));
|
|
292
|
-
|
|
293
|
-
var classNames$1 = classnames$1.exports;
|
|
294
|
-
|
|
295
|
-
var iconStaticClassName = 'pop-icon';
|
|
296
|
-
var Icon = function (props) {
|
|
297
|
-
var icon = props.icon, className = props.className, restProps = __rest(props, ["icon", "className"]);
|
|
298
|
-
var hasAccessibleAttr = Boolean(restProps['aria-describedby'] || restProps['aria-label']);
|
|
299
|
-
if (!hasAccessibleAttr && restProps['aria-hidden'] === undefined) {
|
|
300
|
-
restProps['aria-hidden'] = true;
|
|
301
|
-
}
|
|
302
|
-
var classes = useIconStyles(props);
|
|
303
|
-
var isValid = true;
|
|
304
|
-
if (!icon || (typeof icon === 'function' && icon({}) === undefined)) {
|
|
305
|
-
isValid = false;
|
|
306
|
-
}
|
|
307
|
-
return isValid
|
|
308
|
-
? createElement(icon, __assign({ className: classNames$1([classes.root, iconStaticClassName, className]) }, restProps))
|
|
309
|
-
: null;
|
|
310
|
-
};
|
|
311
|
-
Icon.defaultProps = {
|
|
312
|
-
size: 'inherit',
|
|
313
|
-
color: 'inherit',
|
|
314
|
-
};
|
|
315
|
-
Icon.displayName = 'Icon';
|
|
316
|
-
|
|
317
|
-
var LoadingStatus;
|
|
318
|
-
(function (LoadingStatus) {
|
|
319
|
-
LoadingStatus["ERROR"] = "ERROR";
|
|
320
|
-
LoadingStatus["LOADED"] = "LOADED";
|
|
321
|
-
LoadingStatus["PENDING"] = "PENDING";
|
|
322
|
-
})(LoadingStatus || (LoadingStatus = {}));
|
|
323
|
-
var useImgProps = function (avatarProps) {
|
|
324
|
-
var _a = React__default.useState(LoadingStatus.PENDING), loaded = _a[0], setLoaded = _a[1];
|
|
325
|
-
var imgProps = __assign(__assign({}, avatarProps.imgProps), { onLoad: function (event) {
|
|
326
|
-
var _a, _b;
|
|
327
|
-
setLoaded(LoadingStatus.LOADED);
|
|
328
|
-
(_b = (_a = avatarProps.imgProps) === null || _a === void 0 ? void 0 : _a.onLoad) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
329
|
-
} });
|
|
330
|
-
return { imgProps: imgProps, loaded: loaded };
|
|
331
|
-
};
|
|
332
|
-
|
|
333
|
-
var getAvatarDimensions = function (theme, props) {
|
|
334
|
-
var factors = {
|
|
335
|
-
'extra-small': 3,
|
|
336
|
-
small: 4,
|
|
337
|
-
medium: 5,
|
|
338
|
-
large: 6,
|
|
339
|
-
'extra-large': 12.5,
|
|
340
|
-
};
|
|
341
|
-
var sizeFactor = factors[props.size || 'medium'];
|
|
342
|
-
return theme.spacing(sizeFactor);
|
|
343
|
-
};
|
|
344
|
-
var getAvatarFontSize = function (props) {
|
|
345
|
-
var fontSizes = {
|
|
346
|
-
'extra-small': '0.75rem',
|
|
347
|
-
small: '1rem',
|
|
348
|
-
medium: '1rem',
|
|
349
|
-
large: '1.25rem',
|
|
350
|
-
'extra-large': '3.5rem',
|
|
351
|
-
};
|
|
352
|
-
return fontSizes[props.size];
|
|
353
|
-
};
|
|
354
|
-
var useAvatarStyles = makeStyles$1(function (theme) { return ({
|
|
355
|
-
root: function (props) { return ({
|
|
356
|
-
width: getAvatarDimensions(theme, props),
|
|
357
|
-
height: getAvatarDimensions(theme, props),
|
|
358
|
-
fontSize: getAvatarFontSize(props),
|
|
359
|
-
backgroundColor: props.loaded === LoadingStatus.LOADED ? 'transparent' : props.background,
|
|
360
|
-
color: theme.palette.getContrastText(props.background),
|
|
361
|
-
objectFit: props.fit,
|
|
362
|
-
}); },
|
|
363
|
-
fallback: function (props) { return ({
|
|
364
|
-
fontSize: getAvatarDimensions(theme, props),
|
|
365
|
-
strokeWidth: 1,
|
|
366
|
-
}); },
|
|
367
|
-
}); });
|
|
368
|
-
|
|
369
|
-
var Avatar = forwardRef(function (props, ref) {
|
|
370
|
-
var children = props.children, src = props.src, alt = props.alt, fallback = props.fallback, muiProps = __rest(props, ["children", "src", "alt", "fallback"]);
|
|
371
|
-
var _a = useImgProps(props), imgProps = _a.imgProps, loaded = _a.loaded;
|
|
372
|
-
var classes = useAvatarStyles(__assign(__assign({}, props), { loaded: loaded }));
|
|
373
|
-
var displayAltTextFallback = src && alt;
|
|
374
|
-
var displayNoFallback = fallback === 'none';
|
|
375
|
-
var displayCustomFallback = fallback !== 'none' && typeof fallback !== 'undefined';
|
|
376
|
-
var Fallback;
|
|
377
|
-
if (displayAltTextFallback) {
|
|
378
|
-
Fallback = null;
|
|
379
|
-
}
|
|
380
|
-
else if (displayNoFallback) {
|
|
381
|
-
Fallback = ' ';
|
|
382
|
-
}
|
|
383
|
-
else if (displayCustomFallback) {
|
|
384
|
-
Fallback = fallback;
|
|
385
|
-
}
|
|
386
|
-
else {
|
|
387
|
-
Fallback = React__default.createElement(Icon, { icon: SvgUser, className: classes.fallback });
|
|
388
|
-
}
|
|
389
|
-
return (React__default.createElement(MuiAvatar, __assign({ ref: ref, classes: { root: classes.root }, src: src, alt: alt }, muiProps, { imgProps: imgProps }), children || Fallback));
|
|
390
|
-
});
|
|
391
|
-
Avatar.defaultProps = {
|
|
392
|
-
size: 'medium',
|
|
393
|
-
fit: 'cover',
|
|
394
|
-
background: '#E0E0E0',
|
|
395
|
-
};
|
|
396
|
-
Avatar.displayName = 'Avatar';
|
|
397
|
-
|
|
398
|
-
makeStyles$1(function (theme) { return ({
|
|
399
|
-
circle: {
|
|
400
|
-
backgroundColor: theme.palette.grey[300],
|
|
401
|
-
borderRadius: '50%',
|
|
402
|
-
height: theme.spacing(0.65),
|
|
403
|
-
width: theme.spacing(0.65),
|
|
404
|
-
margin: theme.spacing(1) + "px 0 " + theme.spacing(1) + "px " + theme.spacing(1) + "px",
|
|
405
|
-
},
|
|
406
|
-
container: {
|
|
407
|
-
border: "1px solid " + theme.palette.secondary.light,
|
|
408
|
-
borderRadius: theme.spacing(0.5),
|
|
409
|
-
flexGrow: 1,
|
|
410
|
-
},
|
|
411
|
-
titleBar: {
|
|
412
|
-
display: 'flex',
|
|
413
|
-
flexDirection: 'row',
|
|
414
|
-
borderBottom: "1px solid " + theme.palette.secondary.light,
|
|
415
|
-
width: '100%',
|
|
416
|
-
},
|
|
417
|
-
}); });
|
|
418
|
-
|
|
419
|
-
var useButtonStyles$1 = makeStyles$1(function () { return ({
|
|
420
|
-
root: {
|
|
421
|
-
minWidth: 'unset',
|
|
422
|
-
},
|
|
423
|
-
label: {
|
|
424
|
-
textTransform: function (_a) {
|
|
425
|
-
var textTransform = _a.textTransform;
|
|
426
|
-
return textTransform;
|
|
427
|
-
},
|
|
428
|
-
},
|
|
429
|
-
}); });
|
|
430
|
-
|
|
431
|
-
var Button$1 = function (props) {
|
|
432
|
-
props.textTransform; var loading = props.loading, classesOverride = props.classes, className = props.className, ButtonRef = props.ButtonRef, muiProps = __rest(props, ["textTransform", "loading", "classes", "className", "ButtonRef"]);
|
|
433
|
-
props.classes; var styleProps = __rest(props, ["classes"]);
|
|
434
|
-
var classes = useButtonStyles$1(styleProps);
|
|
435
|
-
var typography = useTheme().typography;
|
|
436
|
-
var loadingIndicator = {
|
|
437
|
-
startIcon: React__default.createElement(CircularProgress, { color: "inherit", size: typography.button.fontSize }),
|
|
438
|
-
disabled: true,
|
|
439
|
-
};
|
|
440
|
-
return (React__default.createElement(MuiButton, __assign({ ref: ButtonRef, classes: __assign(__assign({}, classes), classesOverride), className: classNames$1([className, 'pm-button']) }, muiProps, (loading && loadingIndicator))));
|
|
441
|
-
};
|
|
442
|
-
Button$1.displayName = 'Button';
|
|
443
|
-
|
|
444
|
-
var Checkbox = forwardRef(function (props, ref) {
|
|
445
|
-
var label = props.label, disabled = props.disabled, LabelProps = props.LabelProps, muiProps = __rest(props, ["label", "disabled", "LabelProps"]);
|
|
446
|
-
var control = React__default.createElement(MuiCheckbox, __assign({ disabled: label ? undefined : disabled }, muiProps));
|
|
447
|
-
return label ? (React__default.createElement(FormControlLabel, __assign({ disabled: disabled, inputRef: ref, control: control, label: label }, LabelProps))) : (control);
|
|
448
|
-
});
|
|
449
|
-
Checkbox.displayName = 'Checkbox';
|
|
450
|
-
|
|
451
|
-
var getBackground$1 = function (theme) { return function (props) {
|
|
452
|
-
var variant = props.variant, severity = props.severity;
|
|
453
|
-
var background = theme.palette.grey[100];
|
|
454
|
-
var backgrounds = {
|
|
455
|
-
outlined: 'none',
|
|
456
|
-
error: 'error.main',
|
|
457
|
-
warning: 'warning.main',
|
|
458
|
-
info: 'info.light',
|
|
459
|
-
success: 'success.light',
|
|
460
|
-
};
|
|
461
|
-
if (variant === 'outlined') {
|
|
462
|
-
background = backgrounds[variant];
|
|
463
|
-
}
|
|
464
|
-
else if (severity) {
|
|
465
|
-
var _a = backgrounds[severity].split('.'), color = _a[0], colorVariant = _a[1];
|
|
466
|
-
// @ts-expect-error - todo.
|
|
467
|
-
background = theme.palette[color][colorVariant];
|
|
468
|
-
}
|
|
469
|
-
return background;
|
|
470
|
-
}; };
|
|
471
|
-
var getColor$1 = function (theme) { return function (props) {
|
|
472
|
-
var variant = props.variant, severity = props.severity;
|
|
473
|
-
var textColor;
|
|
474
|
-
if (variant === 'outlined' && severity) {
|
|
475
|
-
var textColors = {
|
|
476
|
-
error: theme.palette.error.main,
|
|
477
|
-
info: theme.palette.info.main,
|
|
478
|
-
warning: theme.palette.warning.dark,
|
|
479
|
-
success: theme.palette.success.dark,
|
|
480
|
-
};
|
|
481
|
-
textColor = textColors[severity];
|
|
482
|
-
}
|
|
483
|
-
else if (variant === 'outlined' && !severity) {
|
|
484
|
-
textColor = theme.palette.grey[700];
|
|
485
|
-
}
|
|
486
|
-
else if ((variant === 'default' || variant === undefined) && severity) {
|
|
487
|
-
var textColors = {
|
|
488
|
-
error: theme.palette.common.white,
|
|
489
|
-
info: theme.palette.secondary.main,
|
|
490
|
-
warning: theme.palette.secondary.main,
|
|
491
|
-
success: theme.palette.secondary.main,
|
|
492
|
-
};
|
|
493
|
-
textColor = textColors[severity];
|
|
494
|
-
}
|
|
495
|
-
return textColor;
|
|
496
|
-
}; };
|
|
497
|
-
var getBorder = function (theme) { return function (props) {
|
|
498
|
-
var variant = props.variant, severity = props.severity;
|
|
499
|
-
var borderColor;
|
|
500
|
-
if (variant === 'outlined' && severity) {
|
|
501
|
-
var borderColors = {
|
|
502
|
-
error: theme.palette.error.main,
|
|
503
|
-
info: theme.palette.info.main,
|
|
504
|
-
warning: theme.palette.warning.dark,
|
|
505
|
-
success: theme.palette.success.dark,
|
|
506
|
-
};
|
|
507
|
-
borderColor = borderColors[severity];
|
|
508
|
-
}
|
|
509
|
-
return borderColor;
|
|
510
|
-
}; };
|
|
511
|
-
// using `any` here is a bit of cheating but it doesn't matter since this doesn't depend on
|
|
512
|
-
// any component-specific props
|
|
513
|
-
makeStyles$1(function (theme) { return ({
|
|
514
|
-
root: {
|
|
515
|
-
background: getBackground$1(theme),
|
|
516
|
-
color: getColor$1(theme),
|
|
517
|
-
borderColor: getBorder(theme),
|
|
518
|
-
borderRadius: theme.spacing(0.5),
|
|
519
|
-
},
|
|
520
|
-
icon: {
|
|
521
|
-
color: 'inherit',
|
|
522
|
-
height: theme.spacing(2),
|
|
523
|
-
width: theme.spacing(2),
|
|
524
|
-
},
|
|
525
|
-
deleteIcon: {
|
|
526
|
-
color: theme.palette.grey[500],
|
|
527
|
-
},
|
|
528
|
-
}); });
|
|
529
|
-
|
|
530
|
-
var defaultTypographyProps = {
|
|
531
|
-
variant: 'body1',
|
|
532
|
-
};
|
|
533
|
-
|
|
534
|
-
var weights = {
|
|
535
|
-
regular: 400,
|
|
536
|
-
medium: 500,
|
|
537
|
-
'semi-bold': 600,
|
|
538
|
-
bold: 700,
|
|
539
|
-
};
|
|
540
|
-
var getCustomColor = function (theme, color) {
|
|
541
|
-
var isCommonColor = color && ['white', 'black'].includes(color);
|
|
542
|
-
var isGreyColor = color && color.match(/^grey\.\d{3}/);
|
|
543
|
-
var isSemanticColor = color && color.match(/(primary|secondary|info|success|error|warning).?(light|dark)?/);
|
|
544
|
-
var isTextColor = color && ['textPrimary', 'textSecondary'].includes(color);
|
|
545
|
-
switch (true) {
|
|
546
|
-
case isCommonColor:
|
|
547
|
-
// @ts-expect-error - todo.
|
|
548
|
-
return theme.palette.common[color];
|
|
549
|
-
case Boolean(isGreyColor):
|
|
550
|
-
var scale = color.split('.')[1];
|
|
551
|
-
// @ts-expect-error - todo.
|
|
552
|
-
return theme.palette.grey[scale] || theme.palette.grey[900];
|
|
553
|
-
case Boolean(isSemanticColor):
|
|
554
|
-
var _a = color.split('.'), paletteKey = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
555
|
-
// @ts-expect-error - todo.
|
|
556
|
-
return theme.palette[paletteKey][variant];
|
|
557
|
-
case isTextColor:
|
|
558
|
-
// @ts-expect-error - todo.
|
|
559
|
-
return theme.palette.text[color.slice(4).toLowerCase()];
|
|
560
|
-
default:
|
|
561
|
-
return undefined;
|
|
562
|
-
}
|
|
563
|
-
};
|
|
564
|
-
var useTypographyStyles = makeStyles$1(function (theme) {
|
|
565
|
-
var _a;
|
|
566
|
-
return ({
|
|
567
|
-
root: (_a = {},
|
|
568
|
-
_a["& ." + iconStaticClassName] = {
|
|
569
|
-
position: 'relative',
|
|
570
|
-
top: '0.125em',
|
|
571
|
-
padding: '0 0.125em',
|
|
572
|
-
boxSizing: 'content-box',
|
|
573
|
-
},
|
|
574
|
-
_a.fontFamily = theme.typography.fontFamily,
|
|
575
|
-
_a.fontWeight = function (_a) {
|
|
576
|
-
var variant = _a.variant, weight = _a.weight;
|
|
577
|
-
return (weight ? weights[weight] : theme.typography[variant].fontWeight);
|
|
578
|
-
},
|
|
579
|
-
_a.fontSize = function (_a) {
|
|
580
|
-
var variant = _a.variant;
|
|
581
|
-
return theme.typography[variant].fontSize;
|
|
582
|
-
},
|
|
583
|
-
_a.lineHeight = function (_a) {
|
|
584
|
-
var variant = _a.variant;
|
|
585
|
-
return theme.typography[variant].lineHeight;
|
|
586
|
-
},
|
|
587
|
-
_a.textTransform = function (_a) {
|
|
588
|
-
var variant = _a.variant;
|
|
589
|
-
return theme.typography[variant].textTransform;
|
|
590
|
-
},
|
|
591
|
-
_a.color = function (_a) {
|
|
592
|
-
var color = _a.color, variant = _a.variant;
|
|
593
|
-
return (color && getCustomColor(theme, color)) || theme.typography[variant].color;
|
|
594
|
-
},
|
|
595
|
-
_a),
|
|
596
|
-
caption: {
|
|
597
|
-
display: 'inline',
|
|
598
|
-
},
|
|
599
|
-
overline: {
|
|
600
|
-
display: 'inline',
|
|
601
|
-
},
|
|
602
|
-
});
|
|
603
|
-
});
|
|
604
|
-
|
|
605
|
-
var Typography = function (props) {
|
|
606
|
-
props.weight; props.color; var TypographyRef = props.TypographyRef, restProps = __rest(props, ["weight", "color", "TypographyRef"]);
|
|
607
|
-
var classes = useTypographyStyles(__assign({}, props));
|
|
608
|
-
var variantMapping = { subtitle1: 'p' };
|
|
609
|
-
return React__default.createElement(Typography$1, __assign({ classes: classes, variantMapping: variantMapping, ref: TypographyRef }, restProps));
|
|
610
|
-
};
|
|
611
|
-
Typography.displayName = 'Typography';
|
|
612
|
-
Typography.defaultProps = defaultTypographyProps;
|
|
613
|
-
|
|
614
|
-
var getFadeStop = function (_a, typographyVariant) {
|
|
615
|
-
var typography = _a.typography;
|
|
616
|
-
// @ts-expect-error - todo.
|
|
617
|
-
return !isNaN(Number(typography[typographyVariant].lineHeight))
|
|
618
|
-
? // @ts-expect-error - todo.
|
|
619
|
-
typography[typographyVariant].lineHeight + "rem"
|
|
620
|
-
: // @ts-expect-error - todo.
|
|
621
|
-
typography[typographyVariant].lineHeight;
|
|
622
|
-
};
|
|
623
|
-
makeStyles(function (theme) { return ({
|
|
624
|
-
overlay: {
|
|
625
|
-
position: 'absolute',
|
|
626
|
-
top: 0,
|
|
627
|
-
left: 0,
|
|
628
|
-
height: '100%',
|
|
629
|
-
width: '100%',
|
|
630
|
-
background: function (props) { return "linear-gradient(to top, white, #FFF0 " + getFadeStop(theme, props.typographyVariant) + ")"; },
|
|
631
|
-
},
|
|
632
|
-
}); });
|
|
633
|
-
|
|
634
|
-
var SemanticColors;
|
|
635
|
-
(function (SemanticColors) {
|
|
636
|
-
SemanticColors["PRIMARY_MAIN"] = "primary.main";
|
|
637
|
-
SemanticColors["PRIMARY_DARK"] = "primary.dark";
|
|
638
|
-
SemanticColors["PRIMARY_LIGHT"] = "primary.light";
|
|
639
|
-
SemanticColors["SECONDARY_MAIN"] = "secondary.main";
|
|
640
|
-
SemanticColors["SECONDARY_DARK"] = "secondary.dark";
|
|
641
|
-
SemanticColors["SECONDARY_LIGHT"] = "secondary.light";
|
|
642
|
-
})(SemanticColors || (SemanticColors = {}));
|
|
643
|
-
makeStyles(function (theme) { return ({
|
|
644
|
-
dividerRoot: {
|
|
645
|
-
gap: theme.spacing(2),
|
|
646
|
-
},
|
|
647
|
-
textRoot: {
|
|
648
|
-
color: function (props) {
|
|
649
|
-
var textColor = props.textColor;
|
|
650
|
-
if (Object.values(SemanticColors).includes(textColor)) {
|
|
651
|
-
var _a = textColor.split('.'), semanticColor = _a[0], shade = _a[1];
|
|
652
|
-
// @ts-expect-error - todo.
|
|
653
|
-
return theme.palette[semanticColor][shade];
|
|
654
|
-
}
|
|
655
|
-
else if (textColor) {
|
|
656
|
-
return textColor;
|
|
657
|
-
}
|
|
658
|
-
else {
|
|
659
|
-
return 'black';
|
|
660
|
-
}
|
|
661
|
-
},
|
|
662
|
-
textTransform: function (props) { return props.textTransform; },
|
|
663
|
-
},
|
|
664
|
-
dividerLine: {
|
|
665
|
-
backgroundColor: function (props) {
|
|
666
|
-
var dividerColor = props.dividerColor;
|
|
667
|
-
if (Object.values(SemanticColors).includes(dividerColor)) {
|
|
668
|
-
var _a = dividerColor.split('.'), semanticColor = _a[0], shade = _a[1];
|
|
669
|
-
// @ts-expect-error - todo.
|
|
670
|
-
return theme.palette[semanticColor][shade];
|
|
671
|
-
}
|
|
672
|
-
else if (dividerColor) {
|
|
673
|
-
return dividerColor;
|
|
674
|
-
}
|
|
675
|
-
else {
|
|
676
|
-
return theme.palette.grey[500];
|
|
677
|
-
}
|
|
678
|
-
},
|
|
679
|
-
},
|
|
680
|
-
}); });
|
|
681
|
-
|
|
682
|
-
var IconButton = forwardRef(function (props, ref) {
|
|
683
|
-
return React__default.createElement(MuiIconButton, __assign({ ref: ref }, props));
|
|
684
|
-
});
|
|
685
|
-
IconButton.displayName = 'IconButton';
|
|
686
|
-
IconButton.defaultProps = {
|
|
687
|
-
color: 'secondary',
|
|
688
|
-
};
|
|
689
|
-
|
|
690
|
-
var useLinkStyles = makeStyles$1(function (theme) { return ({
|
|
691
|
-
root: function (props) {
|
|
692
|
-
var _a;
|
|
693
|
-
return (__assign(__assign({ display: 'flex' }, (props.color === undefined && { color: theme.palette.info.main })), (_a = {}, _a["& ." + iconStaticClassName] = {
|
|
694
|
-
alignSelf: 'center',
|
|
695
|
-
}, _a)));
|
|
696
|
-
},
|
|
697
|
-
}); });
|
|
698
|
-
|
|
699
|
-
// eslint-disable-next-line react/display-name -- false positive
|
|
700
|
-
var Link = forwardRef(function (props, ref) {
|
|
701
|
-
var children = props.children, muiProps = __rest(props, ["children"]);
|
|
702
|
-
var classes = useLinkStyles(props);
|
|
703
|
-
return (React__default.createElement(Link$1, __assign({ ref: ref, classes: { root: classes.root } }, muiProps), children));
|
|
704
|
-
});
|
|
705
|
-
Link.defaultProps = {
|
|
706
|
-
variant: 'body1',
|
|
707
|
-
};
|
|
708
|
-
Link.displayName = 'Link';
|
|
709
|
-
|
|
710
|
-
var useStyles$4$1 = makeStyles(function (_a) {
|
|
711
|
-
var spacing = _a.spacing;
|
|
712
|
-
return ({
|
|
713
|
-
root: {
|
|
714
|
-
'&:last-child': {
|
|
715
|
-
marginBottom: 0,
|
|
716
|
-
},
|
|
717
|
-
marginBottom: spacing(4),
|
|
718
|
-
padding: spacing(4),
|
|
719
|
-
},
|
|
720
|
-
});
|
|
721
|
-
});
|
|
722
|
-
var Paper = forwardRef(function (props, ref) {
|
|
723
|
-
var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
|
|
724
|
-
var classes = useStyles$4$1(props);
|
|
725
|
-
return React__default.createElement(Paper$1, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
|
|
726
|
-
});
|
|
727
|
-
Paper.displayName = 'Paper';
|
|
728
|
-
Paper.defaultProps = {
|
|
729
|
-
legacyStyles: false,
|
|
730
|
-
};
|
|
731
|
-
|
|
732
|
-
var Radio = forwardRef(function (props, ref) {
|
|
733
|
-
var label = props.label, disabled = props.disabled, LabelProps = props.LabelProps, muiProps = __rest(props, ["label", "disabled", "LabelProps"]);
|
|
734
|
-
var control = React__default.createElement(MuiRadio, __assign({ disabled: label ? undefined : disabled }, muiProps));
|
|
735
|
-
return label ? (React__default.createElement(FormControlLabel, __assign({ disabled: disabled, inputRef: ref, control: control, label: label }, LabelProps))) : (control);
|
|
736
|
-
});
|
|
737
|
-
Radio.displayName = 'Radio';
|
|
738
|
-
|
|
739
|
-
makeStyles$1(function () { return ({
|
|
740
|
-
textfield: {
|
|
741
|
-
background: function (props) { return (props.backgroundTransparency ? '#FFFFFF44' : 'none'); },
|
|
742
|
-
borderTopLeftRadius: 4,
|
|
743
|
-
borderBottomLeftRadius: 4,
|
|
744
|
-
'& fieldset': {
|
|
745
|
-
borderRight: 'none',
|
|
746
|
-
borderTopRightRadius: 0,
|
|
747
|
-
borderBottomRightRadius: 0,
|
|
748
|
-
},
|
|
749
|
-
},
|
|
750
|
-
button: {
|
|
751
|
-
borderTopLeftRadius: 0,
|
|
752
|
-
borderBottomLeftRadius: 0,
|
|
753
|
-
alignSelf: 'stretch',
|
|
754
|
-
},
|
|
755
|
-
input: {
|
|
756
|
-
color: function (props) { return props.inputTextColor || 'inherit'; },
|
|
757
|
-
'&$focused fieldset': {
|
|
758
|
-
top: -4,
|
|
759
|
-
},
|
|
760
|
-
},
|
|
761
|
-
focused: {},
|
|
762
|
-
}); });
|
|
763
|
-
|
|
764
|
-
var useSwitchStyles = makeStyles$1(function (theme) { return ({
|
|
765
|
-
checked: {
|
|
766
|
-
'& $thumb': {
|
|
767
|
-
background: theme.palette.success.main,
|
|
768
|
-
},
|
|
769
|
-
'&& + $track': {
|
|
770
|
-
backgroundColor: theme.palette.success.main,
|
|
771
|
-
},
|
|
772
|
-
},
|
|
773
|
-
thumb: {},
|
|
774
|
-
track: {},
|
|
775
|
-
}); });
|
|
776
|
-
|
|
777
|
-
var Switch = forwardRef(function (props, ref) {
|
|
778
|
-
var label = props.label, disabled = props.disabled, LabelProps = props.LabelProps, muiProps = __rest(props, ["label", "disabled", "LabelProps"]);
|
|
779
|
-
var classes = useSwitchStyles(props);
|
|
780
|
-
var control = React__default.createElement(MuiSwitch, __assign({ classes: classes, disabled: label ? undefined : disabled }, muiProps));
|
|
781
|
-
return label ? (React__default.createElement(FormControlLabel, __assign({ disabled: disabled, inputRef: ref, control: control, label: label }, LabelProps))) : (control);
|
|
782
|
-
});
|
|
783
|
-
Switch.displayName = 'Switch';
|
|
784
|
-
|
|
785
|
-
var useToggleButtonStyles = makeStyles$1(function (theme) { return ({
|
|
786
|
-
root: {
|
|
787
|
-
color: theme.palette.text.primary,
|
|
788
|
-
},
|
|
789
|
-
selected: {
|
|
790
|
-
'&&': {
|
|
791
|
-
'&:hover': {
|
|
792
|
-
backgroundColor: function (props) { return theme.palette[props.color || 'primary'].dark; },
|
|
793
|
-
},
|
|
794
|
-
backgroundColor: function (props) { return theme.palette[props.color || 'primary'].main; },
|
|
795
|
-
color: 'white',
|
|
796
|
-
},
|
|
797
|
-
},
|
|
798
|
-
}); });
|
|
799
|
-
|
|
800
|
-
var ToggleButton = forwardRef(function (props, ref) {
|
|
801
|
-
var children = props.children, muiProps = __rest(props, ["children"]);
|
|
802
|
-
var classes = useToggleButtonStyles(props);
|
|
803
|
-
return (React__default.createElement(MuiToggleButton, __assign({ ref: ref, classes: {
|
|
804
|
-
root: classes.root,
|
|
805
|
-
selected: classes.selected,
|
|
806
|
-
} }, muiProps), children));
|
|
807
|
-
});
|
|
808
|
-
ToggleButton.defaultProps = {
|
|
809
|
-
color: 'primary',
|
|
810
|
-
};
|
|
811
|
-
ToggleButton.displayName = 'ToggleButton';
|
|
812
|
-
|
|
813
|
-
var useToggleButtonGroupStyles = makeStyles$1(function (theme) { return ({
|
|
814
|
-
root: {
|
|
815
|
-
'&&': {
|
|
816
|
-
backgroundColor: theme.palette.grey[300],
|
|
817
|
-
},
|
|
818
|
-
},
|
|
819
|
-
}); });
|
|
820
|
-
|
|
821
|
-
var ToggleButtonGroup = forwardRef(function (props, ref) {
|
|
822
|
-
var children = props.children, _a = props.color, color = _a === void 0 ? 'primary' : _a, muiProps = __rest(props, ["children", "color"]);
|
|
823
|
-
var classes = useToggleButtonGroupStyles(props);
|
|
824
|
-
var childrenWithProps = React__default.Children.map(children, function (child) {
|
|
825
|
-
if (!React__default.isValidElement(child)) {
|
|
826
|
-
return null;
|
|
827
|
-
}
|
|
828
|
-
return React__default.cloneElement(child, { color: color });
|
|
829
|
-
});
|
|
830
|
-
return (React__default.createElement(MuiToggleButtonGroup, __assign({ ref: ref, classes: { root: classes.root } }, muiProps), childrenWithProps));
|
|
831
|
-
});
|
|
832
|
-
ToggleButtonGroup.displayName = 'ToggleButtonGroup';
|
|
833
|
-
|
|
834
|
-
var useTooltipStyles = makeStyles$1(function (_a) {
|
|
835
|
-
var typography = _a.typography;
|
|
836
|
-
return ({
|
|
837
|
-
tooltip: {
|
|
838
|
-
fontSize: typography.pxToRem(16),
|
|
839
|
-
},
|
|
840
|
-
});
|
|
841
|
-
});
|
|
842
|
-
|
|
843
|
-
var Tooltip = forwardRef(function (props, ref) {
|
|
844
|
-
var classes = useTooltipStyles(props);
|
|
845
|
-
return React__default.createElement(MuiTooltip, __assign({ ref: ref, classes: classes }, props));
|
|
846
|
-
});
|
|
847
|
-
Tooltip.displayName = 'Tooltip';
|
|
848
|
-
|
|
849
|
-
makeStyles(function () { return ({
|
|
850
|
-
root: {
|
|
851
|
-
height: 56,
|
|
852
|
-
},
|
|
853
|
-
}); });
|
|
854
|
-
makeStyles(function (theme) { return ({
|
|
855
|
-
root: {
|
|
856
|
-
height: '100%',
|
|
857
|
-
width: 'min-content',
|
|
858
|
-
borderRadius: theme.spacing(1),
|
|
859
|
-
},
|
|
860
|
-
input: {
|
|
861
|
-
'&::-webkit-clear-button, &::-webkit-outer-spin-button, &::-webkit-inner-spin-button': {
|
|
862
|
-
display: 'none',
|
|
863
|
-
},
|
|
864
|
-
'-moz-appearance': 'textfield',
|
|
865
|
-
minWidth: 40,
|
|
866
|
-
padding: 0,
|
|
867
|
-
textAlign: 'center',
|
|
868
|
-
},
|
|
869
|
-
adornedStart: {
|
|
870
|
-
padding: 0,
|
|
871
|
-
},
|
|
872
|
-
adornedEnd: {
|
|
873
|
-
padding: 0,
|
|
874
|
-
},
|
|
875
|
-
}); });
|
|
876
|
-
|
|
877
|
-
makeStyles(function () { return ({
|
|
878
|
-
root: {
|
|
879
|
-
display: 'flex',
|
|
880
|
-
flexDirection: 'column',
|
|
881
|
-
alignItems: 'center',
|
|
882
|
-
gridGap: 16,
|
|
883
|
-
},
|
|
884
|
-
}); });
|
|
885
|
-
|
|
886
|
-
var FollowerAuthenticationDialogContext = createContext(null);
|
|
887
|
-
FollowerAuthenticationDialogContext.Provider;
|
|
888
|
-
|
|
889
|
-
makeStyles(function () { return ({
|
|
890
|
-
form: {
|
|
891
|
-
display: 'flex',
|
|
892
|
-
flexDirection: 'column',
|
|
893
|
-
alignItems: 'center',
|
|
894
|
-
width: '100%',
|
|
895
|
-
gridGap: 16,
|
|
896
|
-
},
|
|
897
|
-
}); });
|
|
898
|
-
|
|
899
|
-
makeStyles(function () { return ({
|
|
900
|
-
main: {
|
|
901
|
-
width: '100%',
|
|
902
|
-
display: 'flex',
|
|
903
|
-
flexDirection: 'column',
|
|
904
|
-
gridGap: 16,
|
|
905
|
-
},
|
|
906
|
-
}); });
|
|
907
|
-
|
|
908
|
-
makeStyles(function () { return ({
|
|
909
|
-
root: {
|
|
910
|
-
position: 'absolute',
|
|
911
|
-
top: 0,
|
|
912
|
-
right: 0,
|
|
913
|
-
},
|
|
914
|
-
}); });
|
|
915
|
-
|
|
916
|
-
var _g$2C;
|
|
917
|
-
|
|
918
|
-
function _extends$4K() { _extends$4K = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4K.apply(this, arguments); }
|
|
919
|
-
|
|
920
|
-
function SvgCheckCircle(props) {
|
|
921
|
-
return /*#__PURE__*/React.createElement("svg", _extends$4K({
|
|
922
|
-
viewBox: "0 0 16 16",
|
|
923
|
-
fill: "none",
|
|
924
|
-
strokeLinecap: "round",
|
|
925
|
-
strokeLinejoin: "round",
|
|
926
|
-
width: "1em",
|
|
927
|
-
height: "1em"
|
|
928
|
-
}, props), _g$2C || (_g$2C = /*#__PURE__*/React.createElement("g", {
|
|
929
|
-
stroke: "currentColor"
|
|
930
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
931
|
-
d: "M14.667 7.387V8a6.667 6.667 0 11-3.954-6.093"
|
|
932
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
933
|
-
d: "M14.667 2.667L8 9.34l-2-2"
|
|
934
|
-
}))));
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
var _path$26;
|
|
938
|
-
|
|
939
|
-
function _extends$4H() { _extends$4H = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4H.apply(this, arguments); }
|
|
940
|
-
|
|
941
|
-
function SvgX(props) {
|
|
942
|
-
return /*#__PURE__*/React.createElement("svg", _extends$4H({
|
|
943
|
-
viewBox: "0 0 16 16",
|
|
944
|
-
fill: "none",
|
|
945
|
-
strokeLinecap: "round",
|
|
946
|
-
strokeLinejoin: "round",
|
|
947
|
-
width: "1em",
|
|
948
|
-
height: "1em"
|
|
949
|
-
}, props), _path$26 || (_path$26 = /*#__PURE__*/React.createElement("path", {
|
|
950
|
-
d: "M12 4l-8 8m0-8l8 8",
|
|
951
|
-
stroke: "currentColor"
|
|
952
|
-
})));
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
var _g$2p, _defs$1u;
|
|
956
|
-
|
|
957
|
-
function _extends$4p() { _extends$4p = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4p.apply(this, arguments); }
|
|
958
|
-
|
|
959
|
-
function SvgHelp(props) {
|
|
960
|
-
return /*#__PURE__*/React.createElement("svg", _extends$4p({
|
|
961
|
-
viewBox: "0 0 16 16",
|
|
962
|
-
fill: "none",
|
|
963
|
-
strokeLinecap: "round",
|
|
964
|
-
strokeLinejoin: "round",
|
|
965
|
-
width: "1em",
|
|
966
|
-
height: "1em"
|
|
967
|
-
}, props), _g$2p || (_g$2p = /*#__PURE__*/React.createElement("g", {
|
|
968
|
-
clipPath: "url(#help_svg__clip0_8_5446)",
|
|
969
|
-
stroke: "currentColor"
|
|
970
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
971
|
-
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333z"
|
|
972
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
973
|
-
d: "M6.06 6a2 2 0 013.887.667c0 1.333-2 2-2 2M8 11.334h.007"
|
|
974
|
-
}))), _defs$1u || (_defs$1u = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
975
|
-
id: "help_svg__clip0_8_5446"
|
|
976
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
977
|
-
fill: "currentColor",
|
|
978
|
-
d: "M0 0h16v16H0z"
|
|
979
|
-
})))));
|
|
980
|
-
}
|
|
981
|
-
|
|
982
|
-
var _g$2m, _defs$1t;
|
|
983
|
-
|
|
984
|
-
function _extends$4m() { _extends$4m = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4m.apply(this, arguments); }
|
|
985
|
-
|
|
986
|
-
function SvgInfo(props) {
|
|
987
|
-
return /*#__PURE__*/React.createElement("svg", _extends$4m({
|
|
988
|
-
viewBox: "0 0 16 16",
|
|
989
|
-
fill: "none",
|
|
990
|
-
strokeLinecap: "round",
|
|
991
|
-
strokeLinejoin: "round",
|
|
992
|
-
width: "1em",
|
|
993
|
-
height: "1em"
|
|
994
|
-
}, props), _g$2m || (_g$2m = /*#__PURE__*/React.createElement("g", {
|
|
995
|
-
clipPath: "url(#info_svg__clip0_8_5377)",
|
|
996
|
-
stroke: "currentColor"
|
|
997
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
998
|
-
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zm0-4V8m0-2.667h.007"
|
|
999
|
-
}))), _defs$1t || (_defs$1t = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
1000
|
-
id: "info_svg__clip0_8_5377"
|
|
1001
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
1002
|
-
fill: "currentColor",
|
|
1003
|
-
d: "M0 0h16v16H0z"
|
|
1004
|
-
})))));
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
|
-
var _g$20, _defs$1f;
|
|
1008
|
-
|
|
1009
|
-
function _extends$3w() { _extends$3w = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3w.apply(this, arguments); }
|
|
1010
|
-
|
|
1011
|
-
function SvgError(props) {
|
|
1012
|
-
return /*#__PURE__*/React.createElement("svg", _extends$3w({
|
|
1013
|
-
viewBox: "0 0 16 16",
|
|
1014
|
-
fill: "none",
|
|
1015
|
-
strokeLinecap: "round",
|
|
1016
|
-
strokeLinejoin: "round",
|
|
1017
|
-
width: "1em",
|
|
1018
|
-
height: "1em"
|
|
1019
|
-
}, props), _g$20 || (_g$20 = /*#__PURE__*/React.createElement("g", {
|
|
1020
|
-
clipPath: "url(#error_svg__clip0_8_5411)",
|
|
1021
|
-
stroke: "currentColor"
|
|
1022
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
1023
|
-
d: "M5.24 1.333h5.52l3.907 3.907v5.52l-3.907 3.907H5.24L1.333 10.76V5.24L5.24 1.333zm2.76 4V8m0 2.666h.008"
|
|
1024
|
-
}))), _defs$1f || (_defs$1f = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
1025
|
-
id: "error_svg__clip0_8_5411"
|
|
1026
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
1027
|
-
fill: "currentColor",
|
|
1028
|
-
d: "M0 0h16v16H0z"
|
|
1029
|
-
})))));
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
var _path$1u;
|
|
1033
|
-
|
|
1034
|
-
function _extends$3v() { _extends$3v = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3v.apply(this, arguments); }
|
|
1035
|
-
|
|
1036
|
-
function SvgWarning(props) {
|
|
1037
|
-
return /*#__PURE__*/React.createElement("svg", _extends$3v({
|
|
1038
|
-
viewBox: "0 0 16 16",
|
|
1039
|
-
fill: "none",
|
|
1040
|
-
strokeLinecap: "round",
|
|
1041
|
-
strokeLinejoin: "round",
|
|
1042
|
-
width: "1em",
|
|
1043
|
-
height: "1em"
|
|
1044
|
-
}, props), _path$1u || (_path$1u = /*#__PURE__*/React.createElement("path", {
|
|
1045
|
-
d: "M6.86 2.573L1.213 12a1.334 1.334 0 001.14 2h11.294a1.332 1.332 0 001.14-2L9.14 2.573a1.333 1.333 0 00-2.28 0v0zM8 6v2.667m0 2.667h.007",
|
|
1046
|
-
stroke: "currentColor"
|
|
1047
|
-
})));
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
|
-
var _g$X, _defs$C;
|
|
1051
|
-
|
|
1052
|
-
function _extends$1y() { _extends$1y = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1y.apply(this, arguments); }
|
|
1053
|
-
|
|
1054
|
-
function SvgCircle(props) {
|
|
1055
|
-
return /*#__PURE__*/React.createElement("svg", _extends$1y({
|
|
1056
|
-
viewBox: "0 0 16 16",
|
|
1057
|
-
fill: "none",
|
|
1058
|
-
strokeLinecap: "round",
|
|
1059
|
-
strokeLinejoin: "round",
|
|
1060
|
-
width: "1em",
|
|
1061
|
-
height: "1em"
|
|
1062
|
-
}, props), _g$X || (_g$X = /*#__PURE__*/React.createElement("g", {
|
|
1063
|
-
clipPath: "url(#circle_svg__clip0_8_2293)"
|
|
1064
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
1065
|
-
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333z",
|
|
1066
|
-
stroke: "currentColor"
|
|
1067
|
-
}))), _defs$C || (_defs$C = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
1068
|
-
id: "circle_svg__clip0_8_2293"
|
|
1069
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
1070
|
-
fill: "currentColor",
|
|
1071
|
-
d: "M0 0h16v16H0z"
|
|
1072
|
-
})))));
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
var useAlertStyles = makeStyles$1(function (theme) { return ({
|
|
1076
|
-
root: {
|
|
1077
|
-
alignItems: 'center',
|
|
1078
|
-
width: function (_a) {
|
|
1079
|
-
var fullWidth = _a.fullWidth;
|
|
1080
|
-
return (fullWidth ? '100%' : 'unset');
|
|
1081
|
-
},
|
|
1082
|
-
background: 'white',
|
|
1083
|
-
borderColor: function (props) { return theme.palette[props.severity || 'error'].main; },
|
|
1084
|
-
borderLeft: theme.spacing(1) + "px solid",
|
|
1085
|
-
color: theme.palette.text.primary,
|
|
1086
|
-
},
|
|
1087
|
-
icon: {
|
|
1088
|
-
alignSelf: 'start',
|
|
1089
|
-
},
|
|
1090
|
-
}); });
|
|
1091
|
-
|
|
1092
|
-
var severityIcons$1 = {
|
|
1093
|
-
info: SvgInfo,
|
|
1094
|
-
error: SvgError,
|
|
1095
|
-
warning: SvgWarning,
|
|
1096
|
-
success: SvgCheckCircle,
|
|
1097
|
-
};
|
|
1098
|
-
var getLinkProps = function (link) {
|
|
1099
|
-
if (!link)
|
|
1100
|
-
return null;
|
|
1101
|
-
var href = link.href, onClick = link.onClick, text = link.text;
|
|
1102
|
-
if (!text)
|
|
1103
|
-
return null;
|
|
1104
|
-
var props = { children: text };
|
|
1105
|
-
if (href)
|
|
1106
|
-
return __assign$1(__assign$1({}, props), { href: href });
|
|
1107
|
-
if (onClick)
|
|
1108
|
-
return __assign$1(__assign$1({}, props), { onClick: onClick });
|
|
1109
|
-
return null;
|
|
1110
|
-
};
|
|
1111
|
-
var Alert = forwardRef(function (props, ref) {
|
|
1112
|
-
var children = props.children, link = props.link, _a = props.severity, severity = _a === void 0 ? 'error' : _a, _b = props.variant, variant = _b === void 0 ? 'outlined' : _b, onClose = props.onClose, muiProps = __rest$1(props, ["children", "link", "severity", "variant", "onClose"]);
|
|
1113
|
-
var classes = useAlertStyles(props);
|
|
1114
|
-
var validLink = link && getLinkProps(link);
|
|
1115
|
-
var Action = (React__default.createElement(React__default.Fragment, null,
|
|
1116
|
-
validLink && React__default.createElement(Link, __assign$1({}, validLink)),
|
|
1117
|
-
onClose && (React__default.createElement(IconButton, { onClick: onClose },
|
|
1118
|
-
React__default.createElement(Icon, { icon: SvgX })))));
|
|
1119
|
-
return (React__default.createElement(CommonAlert, __assign$1({ ref: ref, classes: classes,
|
|
1120
|
-
// @ts-expect-error - todo.
|
|
1121
|
-
icon: React__default.createElement(Icon, { icon: severityIcons$1[severity], size: "extra-large" }), action: Action, variant: variant, severity: severity }, muiProps), children));
|
|
1122
|
-
});
|
|
1123
|
-
Alert.displayName = 'Alert';
|
|
1124
|
-
|
|
1125
|
-
var borderWidth = 1;
|
|
1126
|
-
var getColor = function (palette, props) {
|
|
1127
|
-
var variant = props.variant;
|
|
1128
|
-
var color = 'inherit';
|
|
1129
|
-
if (['primary', 'info', 'success', 'warning', 'error'].includes(variant)) {
|
|
1130
|
-
// @ts-expect-error - todo.
|
|
1131
|
-
color = palette[variant].contrastText;
|
|
1132
|
-
}
|
|
1133
|
-
if (variant === 'secondary') {
|
|
1134
|
-
color = palette[variant].main;
|
|
1135
|
-
/**
|
|
1136
|
-
* Temporary fix for dark theme buttons.
|
|
1137
|
-
* Dark theme will be addressed in ch-11596 and the following if block should be removed
|
|
1138
|
-
*/
|
|
1139
|
-
if (palette.type === 'dark') {
|
|
1140
|
-
color = 'black';
|
|
1141
|
-
}
|
|
1142
|
-
}
|
|
1143
|
-
if (variant === 'tertiary') {
|
|
1144
|
-
color = palette.secondary.contrastText;
|
|
1145
|
-
}
|
|
1146
|
-
if (variant === 'text') {
|
|
1147
|
-
color = palette.info.main;
|
|
1148
|
-
}
|
|
1149
|
-
return color;
|
|
1150
|
-
};
|
|
1151
|
-
var getColorHover = function (palette, props) {
|
|
1152
|
-
var color;
|
|
1153
|
-
if (props.variant === 'secondary') {
|
|
1154
|
-
color = palette.secondary.contrastText;
|
|
1155
|
-
}
|
|
1156
|
-
return color;
|
|
1157
|
-
};
|
|
1158
|
-
var getBackground = function (palette, props) {
|
|
1159
|
-
var backgroundColor = 'inherit';
|
|
1160
|
-
if (['info', 'success', 'warning', 'error'].includes(props.variant)) {
|
|
1161
|
-
// @ts-expect-error - todo.
|
|
1162
|
-
backgroundColor = palette[props.variant].main;
|
|
1163
|
-
}
|
|
1164
|
-
if (props.variant === 'primary') {
|
|
1165
|
-
// @ts-expect-error gradient colors are included in the extended palette.
|
|
1166
|
-
backgroundColor = "linear-gradient(97.36deg, " + palette.primary.gradientStart + " 17.03%, " + palette.primary.gradientEnd + " 72.96%)";
|
|
1167
|
-
}
|
|
1168
|
-
if (props.variant === 'secondary') {
|
|
1169
|
-
backgroundColor = 'white';
|
|
1170
|
-
}
|
|
1171
|
-
if (props.variant === 'tertiary') {
|
|
1172
|
-
backgroundColor = palette.secondary.main;
|
|
1173
|
-
}
|
|
1174
|
-
return backgroundColor;
|
|
1175
|
-
};
|
|
1176
|
-
var getBackgroundHover = function (palette, props) {
|
|
1177
|
-
var backgroundHoverColor = 'inherit';
|
|
1178
|
-
if (['primary', 'info', 'success', 'warning', 'error'].includes(props.variant)) {
|
|
1179
|
-
// @ts-expect-error - todo.
|
|
1180
|
-
backgroundHoverColor = palette[props.variant].dark;
|
|
1181
|
-
}
|
|
1182
|
-
if (props.variant === 'secondary') {
|
|
1183
|
-
backgroundHoverColor = palette.secondary.main;
|
|
1184
|
-
}
|
|
1185
|
-
if (props.variant === 'tertiary') {
|
|
1186
|
-
backgroundHoverColor = palette.secondary.light;
|
|
1187
|
-
}
|
|
1188
|
-
if (props.variant === 'text' || props.variant === 'ghost') {
|
|
1189
|
-
backgroundHoverColor = palette.action.hover;
|
|
1190
|
-
}
|
|
1191
|
-
return backgroundHoverColor;
|
|
1192
|
-
};
|
|
1193
|
-
var buttonTypography = {
|
|
1194
|
-
fontWeight: 500,
|
|
1195
|
-
fontSize: '0.875rem',
|
|
1196
|
-
lineHeight: '1.25rem',
|
|
1197
|
-
};
|
|
1198
|
-
var useButtonStyles = makeStyles(function (_a) {
|
|
1199
|
-
var palette = _a.palette, spacing = _a.spacing;
|
|
1200
|
-
return ({
|
|
1201
|
-
root: function (props) { return ({
|
|
1202
|
-
minWidth: 'unset',
|
|
1203
|
-
color: getColor(palette, props),
|
|
1204
|
-
background: getBackground(palette, props),
|
|
1205
|
-
backgroundColor: props.variant === 'primary' ? palette.primary.dark : getBackground(palette, props),
|
|
1206
|
-
borderRadius: spacing(6),
|
|
1207
|
-
transition: 'all 200ms ease-in-out',
|
|
1208
|
-
'&:hover': {
|
|
1209
|
-
color: getColorHover(palette, props),
|
|
1210
|
-
background: getBackgroundHover(palette, props),
|
|
1211
|
-
},
|
|
1212
|
-
}); },
|
|
1213
|
-
disabled: {
|
|
1214
|
-
'&$root': {
|
|
1215
|
-
background: palette.action.disabled,
|
|
1216
|
-
},
|
|
1217
|
-
},
|
|
1218
|
-
contained: {
|
|
1219
|
-
padding: spacing(1, 2),
|
|
1220
|
-
},
|
|
1221
|
-
outlined: {
|
|
1222
|
-
padding: "calc(" + spacing(1) + "px - " + borderWidth + "px) calc(" + spacing(2) + "px - " + borderWidth + "px)",
|
|
1223
|
-
'&$sizeSmall': {
|
|
1224
|
-
padding: "calc(" + spacing(0.5) + "px - " + borderWidth + "px) calc(" + spacing(2) + "px - " + borderWidth + "px)",
|
|
1225
|
-
},
|
|
1226
|
-
'&$sizeLarge': {
|
|
1227
|
-
padding: "calc(" + spacing(1.5) + "px - " + borderWidth + "px) calc(" + spacing(2) + "px - " + borderWidth + "px)",
|
|
1228
|
-
},
|
|
1229
|
-
},
|
|
1230
|
-
text: {
|
|
1231
|
-
padding: spacing(1, 2),
|
|
1232
|
-
},
|
|
1233
|
-
label: __assign$1(__assign$1({}, buttonTypography), { textTransform: function (props) { return props.textTransform; } }),
|
|
1234
|
-
sizeSmall: {
|
|
1235
|
-
padding: spacing(0.5, 2),
|
|
1236
|
-
},
|
|
1237
|
-
sizeLarge: {
|
|
1238
|
-
padding: spacing(1.5, 2),
|
|
1239
|
-
},
|
|
1240
|
-
});
|
|
1241
|
-
});
|
|
1242
|
-
|
|
1243
|
-
var deriveButtonProps = function (buttonProps) {
|
|
1244
|
-
var variant = buttonProps.variant;
|
|
1245
|
-
var derived = {};
|
|
1246
|
-
switch (variant) {
|
|
1247
|
-
case 'primary':
|
|
1248
|
-
derived.variant = 'contained';
|
|
1249
|
-
derived.color = 'primary';
|
|
1250
|
-
break;
|
|
1251
|
-
case 'secondary':
|
|
1252
|
-
derived.variant = 'outlined';
|
|
1253
|
-
derived.color = 'secondary';
|
|
1254
|
-
break;
|
|
1255
|
-
case 'tertiary':
|
|
1256
|
-
derived.variant = 'contained';
|
|
1257
|
-
derived.color = 'secondary';
|
|
1258
|
-
break;
|
|
1259
|
-
case 'text':
|
|
1260
|
-
derived.variant = 'text';
|
|
1261
|
-
case 'ghost':
|
|
1262
|
-
derived.variant = 'text';
|
|
1263
|
-
break;
|
|
1264
|
-
case 'success':
|
|
1265
|
-
derived.variant = 'contained';
|
|
1266
|
-
break;
|
|
1267
|
-
case 'info':
|
|
1268
|
-
derived.variant = 'contained';
|
|
1269
|
-
break;
|
|
1270
|
-
case 'warning':
|
|
1271
|
-
derived.variant = 'contained';
|
|
1272
|
-
break;
|
|
1273
|
-
case 'error':
|
|
1274
|
-
derived.variant = 'contained';
|
|
1275
|
-
break;
|
|
1276
|
-
default:
|
|
1277
|
-
derived.variant = variant;
|
|
1278
|
-
break;
|
|
1279
|
-
}
|
|
1280
|
-
return derived;
|
|
1281
|
-
};
|
|
1282
|
-
|
|
1283
|
-
// eslint-disable-next-line react/display-name -- false positive
|
|
1284
|
-
var Button = forwardRef(function (props, ref) {
|
|
1285
|
-
var children = props.children; props.variant; var classesOverride = props.classes, commonProps = __rest$1(props, ["children", "variant", "classes"]);
|
|
1286
|
-
var classes = useButtonStyles(props);
|
|
1287
|
-
var derivedProps = deriveButtonProps(props);
|
|
1288
|
-
var mergedProps = __assign$1(__assign$1({}, derivedProps), commonProps);
|
|
1289
|
-
return (React__default.createElement(Button$1, __assign$1({ ref: ref, classes: __assign$1(__assign$1({}, classes), classesOverride), disableElevation: true }, mergedProps), children));
|
|
1290
|
-
});
|
|
1291
|
-
Button.defaultProps = {
|
|
1292
|
-
textTransform: 'uppercase',
|
|
1293
|
-
variant: 'primary',
|
|
1294
|
-
};
|
|
1295
|
-
Button.displayName = 'Button';
|
|
1296
|
-
|
|
1297
|
-
var useAlertDialogStyles = makeStyles$1(function (theme) { return ({
|
|
1298
|
-
cancelButton: {
|
|
1299
|
-
color: theme.palette.grey[700],
|
|
1300
|
-
},
|
|
1301
|
-
cancelIcon: {
|
|
1302
|
-
position: 'absolute',
|
|
1303
|
-
right: theme.spacing(1),
|
|
1304
|
-
top: theme.spacing(2),
|
|
1305
|
-
},
|
|
1306
|
-
card: {
|
|
1307
|
-
borderRadius: theme.spacing(0.75),
|
|
1308
|
-
borderTop: function (props) { return theme.spacing(1.25) + "px solid " + theme.palette[props.severity || 'info'].main; },
|
|
1309
|
-
},
|
|
1310
|
-
cardActions: {
|
|
1311
|
-
background: theme.palette.grey[100],
|
|
1312
|
-
justifyContent: 'flex-end',
|
|
1313
|
-
},
|
|
1314
|
-
icon: {
|
|
1315
|
-
fontSize: theme.spacing(5),
|
|
1316
|
-
},
|
|
1317
|
-
root: {
|
|
1318
|
-
borderRadius: theme.spacing(0.75),
|
|
1319
|
-
},
|
|
1320
|
-
}); });
|
|
1321
|
-
|
|
1322
|
-
var severityIcons = {
|
|
1323
|
-
info: SvgInfo,
|
|
1324
|
-
error: SvgError,
|
|
1325
|
-
warning: SvgWarning,
|
|
1326
|
-
success: SvgCheckCircle,
|
|
1327
|
-
};
|
|
1328
|
-
var AlertDialog = forwardRef(function (props, ref) {
|
|
1329
|
-
var _a = props.cancelButtonText, cancelButtonText = _a === void 0 ? 'cancel' : _a, _b = props.hideCancelButton, hideCancelButton = _b === void 0 ? false : _b, children = props.children, labelId = props.labelId, descriptionId = props.descriptionId, _c = props.severity, severity = _c === void 0 ? 'info' : _c, _d = props.proceedButtonText, proceedButtonText = _d === void 0 ? 'proceed' : _d, _e = props.disabled, disabled = _e === void 0 ? false : _e, onClose = props.onClose, onCancel = props.onCancel, onProceed = props.onProceed, DialogProps = __rest$1(props, ["cancelButtonText", "hideCancelButton", "children", "labelId", "descriptionId", "severity", "proceedButtonText", "disabled", "onClose", "onCancel", "onProceed"]);
|
|
1330
|
-
var classes = useAlertDialogStyles(props);
|
|
1331
|
-
return (React__default.createElement(Dialog, __assign$1({ ref: ref, classes: { paper: classes.root }, maxWidth: "sm", fullWidth: true }, DialogProps),
|
|
1332
|
-
React__default.createElement(Card, { classes: { root: classes.card }, role: "alertdialog", "aria-modal": "true", "aria-labelledby": labelId, "aria-describedby": descriptionId },
|
|
1333
|
-
React__default.createElement(IconButton, { className: classes.cancelIcon, onClick: onClose, disabled: disabled },
|
|
1334
|
-
React__default.createElement(Icon, { icon: SvgX })),
|
|
1335
|
-
React__default.createElement(CardContent, null,
|
|
1336
|
-
React__default.createElement(Box, { display: "flex" },
|
|
1337
|
-
React__default.createElement(Icon, { className: classes.icon, color: severity, icon: severityIcons[severity] }),
|
|
1338
|
-
React__default.createElement(Box, { pl: 2, pr: 3 }, children))),
|
|
1339
|
-
React__default.createElement(CardActions, { classes: { root: classes.cardActions } },
|
|
1340
|
-
!hideCancelButton && (React__default.createElement(Button, { onClick: onCancel, disabled: disabled, variant: "ghost" }, cancelButtonText)),
|
|
1341
|
-
React__default.createElement(Button, { onClick: onProceed, loading: disabled, variant: severity }, proceedButtonText)))));
|
|
1342
|
-
});
|
|
1343
|
-
AlertDialog.displayName = 'AlertDialog';
|
|
1344
|
-
|
|
1345
|
-
var AlertDialogHeader = function (props) {
|
|
1346
|
-
var children = props.children, muiProps = __rest$1(props, ["children"]);
|
|
1347
|
-
return (React__default.createElement(Box, __assign$1({ display: "flex", height: 40, alignItems: "center" }, muiProps),
|
|
1348
|
-
React__default.createElement(Typography, { variant: "h6" }, children)));
|
|
1349
|
-
};
|
|
1350
|
-
AlertDialogHeader.displayName = 'AlertDialogHeader';
|
|
1351
|
-
|
|
1352
|
-
var AlertTitle = function (props) {
|
|
1353
|
-
var children = props.children, muiProps = __rest$1(props, ["children"]);
|
|
1354
|
-
return (React__default.createElement(MuiAlertTitle, __assign$1({}, muiProps),
|
|
1355
|
-
React__default.createElement(Typography, { variant: "h6" },
|
|
1356
|
-
" ",
|
|
1357
|
-
children,
|
|
1358
|
-
" ")));
|
|
1359
|
-
};
|
|
1360
|
-
AlertTitle.displayName = 'AlertTitle';
|
|
1361
|
-
|
|
1362
|
-
var getBorderColor = function (palette, variant) {
|
|
1363
|
-
var borderColor = 'inherit';
|
|
1364
|
-
if (['primary', 'secondary', 'info', 'success', 'warning', 'error'].includes(variant)) {
|
|
1365
|
-
// @ts-expect-error - todo.
|
|
1366
|
-
borderColor = palette[variant].light;
|
|
1367
|
-
}
|
|
1368
|
-
return borderColor;
|
|
1369
|
-
};
|
|
1370
|
-
var useButtonGroupStyles = makeStyles$1(function (theme) { return ({
|
|
1371
|
-
root: {
|
|
1372
|
-
boxShadow: 'none',
|
|
1373
|
-
},
|
|
1374
|
-
groupedContained: {
|
|
1375
|
-
'&&': {
|
|
1376
|
-
borderColor: function (props) { return getBorderColor(theme.palette, props.variant); },
|
|
1377
|
-
},
|
|
1378
|
-
},
|
|
1379
|
-
groupedText: {
|
|
1380
|
-
'&&': {
|
|
1381
|
-
borderColor: theme.palette.info.main,
|
|
1382
|
-
},
|
|
1383
|
-
},
|
|
1384
|
-
}); });
|
|
1385
|
-
|
|
1386
|
-
var ButtonGroup = forwardRef(function (props, ref) {
|
|
1387
|
-
var children = props.children, _a = props.variant, variant = _a === void 0 ? 'primary' : _a, muiProps = __rest$1(props, ["children", "variant"]);
|
|
1388
|
-
var classes = useButtonGroupStyles(props);
|
|
1389
|
-
var derivedProps = deriveButtonProps({ variant: variant });
|
|
1390
|
-
var spacing = useTheme().spacing;
|
|
1391
|
-
var childrenWithProps = React__default.Children.map(children, function (child, i) {
|
|
1392
|
-
var isFirst = i === 0 && props.orientation === 'vertical';
|
|
1393
|
-
var isLast = i === React__default.Children.toArray(children).length - 1 && props.orientation === 'vertical';
|
|
1394
|
-
var firstStyles = { style: { borderTopLeftRadius: spacing(2), borderTopRightRadius: spacing(2) } };
|
|
1395
|
-
var lastStyles = { style: { borderBottomLeftRadius: spacing(2), borderBottomRightRadius: spacing(2) } };
|
|
1396
|
-
if (!React__default.isValidElement(child)) {
|
|
1397
|
-
return null;
|
|
1398
|
-
}
|
|
1399
|
-
return React__default.cloneElement(child, __assign$1(__assign$1({ variant: variant }, (isFirst && firstStyles)), (isLast && lastStyles)));
|
|
1400
|
-
});
|
|
1401
|
-
return (React__default.createElement(CommonButtonGroup, __assign$1({ ref: ref, classes: classes }, derivedProps, muiProps), childrenWithProps));
|
|
1402
|
-
});
|
|
1403
|
-
ButtonGroup.displayName = 'ButtonGroup';
|
|
1404
|
-
|
|
1405
|
-
var useFeatureIntroStyles = makeStyles$1(function (_a) {
|
|
1406
|
-
var spacing = _a.spacing;
|
|
1407
|
-
return ({
|
|
1408
|
-
root: {
|
|
1409
|
-
gap: spacing(3),
|
|
1410
|
-
},
|
|
1411
|
-
actions: {
|
|
1412
|
-
gap: spacing(3),
|
|
1413
|
-
},
|
|
1414
|
-
image: {
|
|
1415
|
-
width: '100%',
|
|
1416
|
-
objectFit: 'contain',
|
|
1417
|
-
},
|
|
1418
|
-
});
|
|
1419
|
-
});
|
|
1420
|
-
|
|
1421
|
-
var FeatureIntro = function (props) {
|
|
1422
|
-
var title = props.title, body = props.body, primaryAction = props.primaryAction, secondaryAction = props.secondaryAction, image = props.image;
|
|
1423
|
-
var primaryActionLabel = primaryAction.label, primaryActionProps = __rest$1(primaryAction, ["label"]);
|
|
1424
|
-
var _a = secondaryAction || {}, secondaryActionLabel = _a.label, secondaryActionProps = __rest$1(_a, ["label"]);
|
|
1425
|
-
var classes = useFeatureIntroStyles(props);
|
|
1426
|
-
var validImage = (image === null || image === void 0 ? void 0 : image.src) && (image === null || image === void 0 ? void 0 : image.alt);
|
|
1427
|
-
return (React__default.createElement(Box, { className: classes.root, padding: { xs: 4, sm: 8 }, flexDirection: { xs: 'column-reverse', sm: 'row' }, display: "flex", justifyContent: "center", alignItems: "center" },
|
|
1428
|
-
React__default.createElement(Box, { display: "flex", flexDirection: "column", width: { xs: '100%', sm: '50%' }, alignItems: { xs: 'center', sm: 'unset' } },
|
|
1429
|
-
React__default.createElement(Box, { textAlign: { xs: 'center', sm: 'start' }, marginBottom: 2 },
|
|
1430
|
-
React__default.createElement(Typography, { align: "inherit", variant: "h4" }, title)),
|
|
1431
|
-
React__default.createElement(Box, { textAlign: { xs: 'center', sm: 'start' }, marginBottom: 6 }, body),
|
|
1432
|
-
React__default.createElement(Box, { className: classes.actions, display: "flex", flexDirection: "column", width: "fit-content" },
|
|
1433
|
-
primaryAction && React__default.createElement(Button, __assign$1({}, primaryActionProps), primaryActionLabel),
|
|
1434
|
-
secondaryAction && (React__default.createElement(Button, __assign$1({ variant: "tertiary" }, secondaryActionProps), secondaryActionLabel)))),
|
|
1435
|
-
React__default.createElement(Box, { display: "flex", width: { xs: '100%', sm: '50%' }, alignItems: "center", justifyContent: "center" },
|
|
1436
|
-
React__default.createElement(Box, { display: "flex", maxWidth: 450, maxHeight: 450 }, validImage && React__default.createElement("img", { src: image.src, alt: image.alt, className: classes.image })))));
|
|
1437
|
-
};
|
|
1438
|
-
FeatureIntro.displayName = 'FeatureIntro';
|
|
1439
|
-
|
|
1440
|
-
var useFullScreenStepperActionsStyles = makeStyles$1(function (theme) { return ({
|
|
1441
|
-
root: {
|
|
1442
|
-
position: 'sticky',
|
|
1443
|
-
background: 'white',
|
|
1444
|
-
bottom: 0,
|
|
1445
|
-
display: 'flex',
|
|
1446
|
-
justifyContent: 'space-between',
|
|
1447
|
-
padding: theme.spacing(1.5) + "px " + theme.spacing(3) + "px",
|
|
1448
|
-
borderTop: theme.spacing(0.5) + "px solid " + theme.palette.grey[100],
|
|
1449
|
-
zIndex: 3,
|
|
1450
|
-
},
|
|
1451
|
-
inlineEndActions: {
|
|
1452
|
-
'& > *': {
|
|
1453
|
-
marginInlineStart: theme.spacing(2),
|
|
1454
|
-
},
|
|
1455
|
-
},
|
|
1456
|
-
inlineStartActions: {
|
|
1457
|
-
display: 'flex',
|
|
1458
|
-
alignItems: 'center',
|
|
1459
|
-
'& > *': {
|
|
1460
|
-
marginInlineEnd: theme.spacing(2),
|
|
1461
|
-
},
|
|
1462
|
-
},
|
|
1463
|
-
}); });
|
|
1464
|
-
|
|
1465
|
-
var augmentButtonProps = function (internalProps, externalProps, setStepCursor, stepCursor, incrementor) {
|
|
1466
|
-
if (externalProps === void 0) { externalProps = {}; }
|
|
1467
|
-
var mergedProps = __assign$1(__assign$1({}, internalProps), externalProps);
|
|
1468
|
-
mergedProps.onClick = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
1469
|
-
return __generator(this, function (_a) {
|
|
1470
|
-
switch (_a.label) {
|
|
1471
|
-
case 0:
|
|
1472
|
-
if (!(typeof externalProps.onClick === 'function')) return [3 /*break*/, 2];
|
|
1473
|
-
return [4 /*yield*/, externalProps.onClick({})];
|
|
1474
|
-
case 1:
|
|
1475
|
-
_a.sent();
|
|
1476
|
-
setStepCursor(stepCursor + incrementor);
|
|
1477
|
-
return [3 /*break*/, 3];
|
|
1478
|
-
case 2:
|
|
1479
|
-
if (typeof internalProps.onClick === 'function') {
|
|
1480
|
-
internalProps.onClick();
|
|
1481
|
-
}
|
|
1482
|
-
_a.label = 3;
|
|
1483
|
-
case 3: return [2 /*return*/];
|
|
1484
|
-
}
|
|
1485
|
-
});
|
|
1486
|
-
}); };
|
|
1487
|
-
return mergedProps;
|
|
1488
|
-
};
|
|
1489
|
-
|
|
1490
|
-
var StepperActionsPreviousButton = function (props) {
|
|
1491
|
-
var previousButtonText = props.previousButtonText, stepCursor = props.stepCursor, handlePreviousClick = props.handlePreviousClick, previousButtonProps = props.previousButtonProps, setStepCursor = props.setStepCursor, displayPreviousButton = props.displayPreviousButton;
|
|
1492
|
-
var augmentedPreviousButtonProps = augmentButtonProps({ onClick: handlePreviousClick }, previousButtonProps, setStepCursor, stepCursor, -1);
|
|
1493
|
-
return displayPreviousButton ? (React__default.createElement(Button, __assign$1({ variant: "tertiary", disabled: stepCursor === 1 }, augmentedPreviousButtonProps), previousButtonText || 'previous')) : null;
|
|
1494
|
-
};
|
|
1495
|
-
|
|
1496
|
-
var useStyles$4 = makeStyles$1({
|
|
1497
|
-
root: {
|
|
1498
|
-
fontStyle: 'italic',
|
|
1499
|
-
},
|
|
1500
|
-
});
|
|
1501
|
-
var StepperActionsStatusText = function (props) {
|
|
1502
|
-
var statusText = props.statusText;
|
|
1503
|
-
var classes = useStyles$4(props);
|
|
1504
|
-
return statusText ? (React__default.createElement(Typography, { classes: { root: classes.root }, variant: "body2" }, statusText)) : null;
|
|
1505
|
-
};
|
|
1506
|
-
|
|
1507
|
-
var StepperActionsNextButton = function (props) {
|
|
1508
|
-
var handleNextClick = props.handleNextClick, nextButtonProps = props.nextButtonProps, setStepCursor = props.setStepCursor, stepCursor = props.stepCursor, stepCount = props.stepCount, finishButtonText = props.finishButtonText, nextButtonText = props.nextButtonText;
|
|
1509
|
-
var augmentedNextButtonProps = augmentButtonProps({ onClick: handleNextClick }, nextButtonProps, setStepCursor, stepCursor, 1);
|
|
1510
|
-
var finalStep = stepCursor / stepCount === 1;
|
|
1511
|
-
var finishText = finishButtonText || 'finish';
|
|
1512
|
-
var nextText = nextButtonText || 'next';
|
|
1513
|
-
var buttonText = finalStep ? finishText : nextText;
|
|
1514
|
-
return React__default.createElement(Button, __assign$1({}, augmentedNextButtonProps), buttonText);
|
|
1515
|
-
};
|
|
1516
|
-
|
|
1517
|
-
var StepperActionsCancelButton = function (props) {
|
|
1518
|
-
var setStepCursor = props.setStepCursor, stepCursor = props.stepCursor, cancelButtonText = props.cancelButtonText, cancelButtonProps = props.cancelButtonProps, handleCancelClick = props.handleCancelClick, displayCancelButton = props.displayCancelButton;
|
|
1519
|
-
var augmentedCancelButtonProps = augmentButtonProps({ onClick: handleCancelClick }, cancelButtonProps, setStepCursor, stepCursor, 0);
|
|
1520
|
-
return displayCancelButton ? (React__default.createElement(Button, __assign$1({ variant: "ghost" }, augmentedCancelButtonProps), cancelButtonText || 'cancel')) : null;
|
|
1521
|
-
};
|
|
1522
|
-
|
|
1523
|
-
var FullScreenStepperActions = function (props) {
|
|
1524
|
-
var stepCount = props.stepCount, stepCursor = props.stepCursor, setStepCursor = props.setStepCursor, handleNextClick = props.handleNextClick, handlePreviousClick = props.handlePreviousClick, handleCancelClick = props.handleCancelClick, actions = props.actions, callbackArgs = props.callbackArgs, cancelButtonText = props.cancelButtonText, nextButtonText = props.nextButtonText, finishButtonText = props.finishButtonText, nextButtonProps = props.nextButtonProps, previousButtonText = props.previousButtonText, previousButtonProps = props.previousButtonProps, cancelButtonProps = props.cancelButtonProps, statusText = props.statusText, displayPreviousButton = props.displayPreviousButton, displayCancelButton = props.displayCancelButton;
|
|
1525
|
-
var classes = useFullScreenStepperActionsStyles(props);
|
|
1526
|
-
return (React__default.createElement(Box, { className: classes.root },
|
|
1527
|
-
React__default.createElement(Box, { className: classes.inlineStartActions },
|
|
1528
|
-
React__default.createElement(StepperActionsPreviousButton, { displayPreviousButton: displayPreviousButton, previousButtonText: previousButtonText, handlePreviousClick: handlePreviousClick, previousButtonProps: previousButtonProps, stepCursor: stepCursor, setStepCursor: setStepCursor }),
|
|
1529
|
-
React__default.createElement(StepperActionsStatusText, { statusText: statusText })),
|
|
1530
|
-
React__default.createElement(Box, { className: classes.inlineEndActions },
|
|
1531
|
-
actions &&
|
|
1532
|
-
actions.map(function (action, i) { return (React__default.createElement(Button, __assign$1({ key: "custom-action-" + stepCursor + "-" + i, variant: "ghost", onClick: function (event) { return action.onClick(event, callbackArgs); } }, action.props), action.text)); }),
|
|
1533
|
-
React__default.createElement(StepperActionsCancelButton, { setStepCursor: setStepCursor, stepCursor: stepCursor, cancelButtonText: cancelButtonText, cancelButtonProps: cancelButtonProps, handleCancelClick: handleCancelClick, displayCancelButton: displayCancelButton }),
|
|
1534
|
-
React__default.createElement(StepperActionsNextButton, { handleNextClick: handleNextClick, nextButtonProps: nextButtonProps, setStepCursor: setStepCursor, stepCursor: stepCursor, stepCount: stepCount, finishButtonText: finishButtonText, nextButtonText: nextButtonText }))));
|
|
1535
|
-
};
|
|
1536
|
-
|
|
1537
|
-
var getBorderRadius = function (theme, props) {
|
|
1538
|
-
var stepCursor = props.stepCursor, stepCount = props.stepCount;
|
|
1539
|
-
var isFinalStep = stepCursor / stepCount === 1;
|
|
1540
|
-
if (isFinalStep) {
|
|
1541
|
-
return 0;
|
|
1542
|
-
}
|
|
1543
|
-
else {
|
|
1544
|
-
return theme.spacing(0.5);
|
|
1545
|
-
}
|
|
1546
|
-
};
|
|
1547
|
-
var useFullScreenStepperProgressStyles = makeStyles$1(function (theme) { return ({
|
|
1548
|
-
progress: {
|
|
1549
|
-
width: function (props) { return (props.stepCursor / props.stepCount) * 100 + "%"; },
|
|
1550
|
-
transition: 'all 500ms',
|
|
1551
|
-
height: theme.spacing(1),
|
|
1552
|
-
// @ts-expect-error: Theme includes extended properties
|
|
1553
|
-
background: "linear-gradient(45deg, " + theme.palette.primary.gradientStart + ", " + theme.palette.primary.gradientEnd + ")",
|
|
1554
|
-
borderEndEndRadius: function (props) { return getBorderRadius(theme, props); },
|
|
1555
|
-
borderStartEndRadius: function (props) { return getBorderRadius(theme, props); },
|
|
1556
|
-
},
|
|
1557
|
-
track: {
|
|
1558
|
-
position: 'absolute',
|
|
1559
|
-
bottom: 0,
|
|
1560
|
-
display: 'flex',
|
|
1561
|
-
alignItems: 'center',
|
|
1562
|
-
width: '100%',
|
|
1563
|
-
height: theme.spacing(0.5),
|
|
1564
|
-
background: theme.palette.grey[100],
|
|
1565
|
-
zIndex: 2,
|
|
1566
|
-
},
|
|
1567
|
-
}); });
|
|
1568
|
-
|
|
1569
|
-
var FullScreenStepperProgress = function (props) {
|
|
1570
|
-
var classes = useFullScreenStepperProgressStyles(props);
|
|
1571
|
-
return (React__default.createElement(Box, { className: classes.track },
|
|
1572
|
-
React__default.createElement(Box, { className: classes.progress })));
|
|
1573
|
-
};
|
|
1574
|
-
|
|
1575
|
-
var useFullScreenStepperHeaderStyles = makeStyles$1(function (_a) {
|
|
1576
|
-
var spacing = _a.spacing;
|
|
1577
|
-
return ({
|
|
1578
|
-
closeButton: {
|
|
1579
|
-
position: 'absolute',
|
|
1580
|
-
right: 0,
|
|
1581
|
-
top: 0,
|
|
1582
|
-
},
|
|
1583
|
-
root: {
|
|
1584
|
-
alignItems: 'center',
|
|
1585
|
-
background: 'white',
|
|
1586
|
-
display: 'flex',
|
|
1587
|
-
flexDirection: 'column',
|
|
1588
|
-
justifyContent: 'center',
|
|
1589
|
-
padding: spacing(1.5, 0),
|
|
1590
|
-
position: 'sticky',
|
|
1591
|
-
top: 0,
|
|
1592
|
-
zIndex: 3,
|
|
1593
|
-
},
|
|
1594
|
-
});
|
|
1595
|
-
});
|
|
1596
|
-
|
|
1597
|
-
var FullScreenStepperHeader = function (props) {
|
|
1598
|
-
var stepCount = props.stepCount, stepCursor = props.stepCursor, step = props.step, onClose = props.onClose;
|
|
1599
|
-
var classes = useFullScreenStepperHeaderStyles(props);
|
|
1600
|
-
return (React__default.createElement(Box, { className: classes.root },
|
|
1601
|
-
React__default.createElement(Typography, { variant: "h6" }, step.title),
|
|
1602
|
-
React__default.createElement(Typography, null,
|
|
1603
|
-
stepCursor,
|
|
1604
|
-
" of ",
|
|
1605
|
-
stepCount),
|
|
1606
|
-
React__default.createElement(IconButton, { className: classes.closeButton, onClick: onClose },
|
|
1607
|
-
React__default.createElement(Icon, { icon: SvgX })),
|
|
1608
|
-
React__default.createElement(FullScreenStepperProgress, { stepCount: stepCount, stepCursor: stepCursor })));
|
|
1609
|
-
};
|
|
1610
|
-
|
|
1611
|
-
var FullScreenStepperContext = createContext({});
|
|
1612
|
-
|
|
1613
|
-
/**
|
|
1614
|
-
* TODO
|
|
1615
|
-
* - i18n?
|
|
1616
|
-
* - loading?
|
|
1617
|
-
*/
|
|
1618
|
-
var FullScreenStepper = function (props) {
|
|
1619
|
-
var children = props.children, _a = props.context, context = _a === void 0 ? {} : _a, _b = props.defaultStepCursor, defaultStepCursor = _b === void 0 ? 1 : _b, _c = props.displayActionBar, displayActionBar = _c === void 0 ? true : _c, _d = props.displayCancelButton, displayCancelButton = _d === void 0 ? true : _d, _e = props.displayPreviousButton, displayPreviousButton = _e === void 0 ? true : _e, _f = props.resetStepCursorOnCancel, resetStepCursorOnCancel = _f === void 0 ? true : _f, _g = props.resetStepCursorOnClose, resetStepCursorOnClose = _g === void 0 ? true : _g, steps = props.steps, onClose = props.onClose, onFinish = props.onFinish, onNext = props.onNext, onCancel = props.onCancel, onPrevious = props.onPrevious, DialogProps = __rest$1(props, ["children", "context", "defaultStepCursor", "displayActionBar", "displayCancelButton", "displayPreviousButton", "resetStepCursorOnCancel", "resetStepCursorOnClose", "steps", "onClose", "onFinish", "onNext", "onCancel", "onPrevious"]);
|
|
1620
|
-
var _h = useState(defaultStepCursor), stepCursor = _h[0], setStepCursor = _h[1];
|
|
1621
|
-
var stepCount = steps.length;
|
|
1622
|
-
var stepIndex = stepCursor - 1;
|
|
1623
|
-
var step = steps[stepIndex];
|
|
1624
|
-
var _j = step.displayActionBar, displayStepActionBar = _j === void 0 ? true : _j;
|
|
1625
|
-
var isFinalStep = stepCursor / stepCount === 1;
|
|
1626
|
-
var callbackArgs = { setStepCursor: setStepCursor, step: step, stepCount: stepCount, stepIndex: stepIndex, steps: steps };
|
|
1627
|
-
var mergedContext = __assign$1(__assign$1({}, context), callbackArgs);
|
|
1628
|
-
var resetStepCursor = function () { return setTimeout(function () { return setStepCursor(1); }, 600); };
|
|
1629
|
-
var handleClose = function () {
|
|
1630
|
-
if (typeof onClose === 'function') {
|
|
1631
|
-
onClose(callbackArgs);
|
|
1632
|
-
}
|
|
1633
|
-
if (resetStepCursorOnClose) {
|
|
1634
|
-
resetStepCursor();
|
|
1635
|
-
}
|
|
1636
|
-
};
|
|
1637
|
-
var handleNextClick = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
1638
|
-
return __generator(this, function (_a) {
|
|
1639
|
-
switch (_a.label) {
|
|
1640
|
-
case 0:
|
|
1641
|
-
if (!isFinalStep) return [3 /*break*/, 3];
|
|
1642
|
-
if (!(typeof onFinish === 'function')) return [3 /*break*/, 2];
|
|
1643
|
-
return [4 /*yield*/, onFinish(callbackArgs)];
|
|
1644
|
-
case 1:
|
|
1645
|
-
_a.sent();
|
|
1646
|
-
_a.label = 2;
|
|
1647
|
-
case 2:
|
|
1648
|
-
if (typeof onClose === 'function') {
|
|
1649
|
-
onClose(callbackArgs);
|
|
1650
|
-
}
|
|
1651
|
-
resetStepCursor();
|
|
1652
|
-
return [3 /*break*/, 6];
|
|
1653
|
-
case 3:
|
|
1654
|
-
if (!(typeof onNext === 'function')) return [3 /*break*/, 5];
|
|
1655
|
-
return [4 /*yield*/, onNext(callbackArgs)];
|
|
1656
|
-
case 4:
|
|
1657
|
-
_a.sent();
|
|
1658
|
-
_a.label = 5;
|
|
1659
|
-
case 5:
|
|
1660
|
-
setStepCursor(stepCursor + 1);
|
|
1661
|
-
_a.label = 6;
|
|
1662
|
-
case 6: return [2 /*return*/];
|
|
1663
|
-
}
|
|
1664
|
-
});
|
|
1665
|
-
}); };
|
|
1666
|
-
var handlePreviousClick = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
1667
|
-
return __generator(this, function (_a) {
|
|
1668
|
-
switch (_a.label) {
|
|
1669
|
-
case 0:
|
|
1670
|
-
if (!(typeof onPrevious === 'function')) return [3 /*break*/, 2];
|
|
1671
|
-
return [4 /*yield*/, onPrevious(callbackArgs)];
|
|
1672
|
-
case 1:
|
|
1673
|
-
_a.sent();
|
|
1674
|
-
_a.label = 2;
|
|
1675
|
-
case 2:
|
|
1676
|
-
setStepCursor(stepCursor - 1);
|
|
1677
|
-
return [2 /*return*/];
|
|
1678
|
-
}
|
|
1679
|
-
});
|
|
1680
|
-
}); };
|
|
1681
|
-
var handleCancelClick = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
1682
|
-
return __generator(this, function (_a) {
|
|
1683
|
-
switch (_a.label) {
|
|
1684
|
-
case 0:
|
|
1685
|
-
if (!(typeof onCancel === 'function')) return [3 /*break*/, 2];
|
|
1686
|
-
return [4 /*yield*/, onCancel(callbackArgs)];
|
|
1687
|
-
case 1:
|
|
1688
|
-
_a.sent();
|
|
1689
|
-
_a.label = 2;
|
|
1690
|
-
case 2:
|
|
1691
|
-
if (resetStepCursorOnCancel) {
|
|
1692
|
-
resetStepCursor();
|
|
1693
|
-
}
|
|
1694
|
-
return [2 /*return*/];
|
|
1695
|
-
}
|
|
1696
|
-
});
|
|
1697
|
-
}); };
|
|
1698
|
-
var content = React__default.Children.toArray(children).find(function (child) { return React__default.isValidElement(child) && child.props.name === step.name; });
|
|
1699
|
-
return (React__default.createElement(Dialog, __assign$1({ fullScreen: true }, DialogProps),
|
|
1700
|
-
React__default.createElement(FullScreenStepperContext.Provider, { value: mergedContext },
|
|
1701
|
-
React__default.createElement(Box$1, { display: "flex", flexDirection: "column", flexGrow: 1 },
|
|
1702
|
-
React__default.createElement(FullScreenStepperHeader, { stepCount: stepCount, stepCursor: stepCursor, onClose: handleClose, step: step }),
|
|
1703
|
-
React__default.createElement(Box$1, { display: "flex", mx: 6, flexGrow: 1, alignItems: "center", flexDirection: "column" }, content),
|
|
1704
|
-
displayActionBar && displayStepActionBar && (React__default.createElement(FullScreenStepperActions, __assign$1({}, step.actionBar, { callbackArgs: callbackArgs, displayCancelButton: displayCancelButton, displayPreviousButton: displayPreviousButton, stepCount: stepCount, stepCursor: stepCursor, setStepCursor: setStepCursor, handleCancelClick: handleCancelClick, handleNextClick: handleNextClick, handlePreviousClick: handlePreviousClick })))))));
|
|
1705
|
-
};
|
|
1706
|
-
FullScreenStepper.displayName = 'FullScreenStepper';
|
|
1707
|
-
|
|
1708
|
-
var FullScreenStepperContent = function (props) {
|
|
1709
|
-
props.name; var boxProps = __rest$1(props, ["name"]);
|
|
1710
|
-
return (React__default.createElement(Box, __assign$1({ py: 8 }, boxProps), props.children));
|
|
1711
|
-
};
|
|
1712
|
-
|
|
1713
|
-
var useSelectableCardStyles = makeStyles$1(function (theme) {
|
|
1714
|
-
var _a = theme.palette, info = _a.info, grey = _a.grey, getContrastText = _a.getContrastText, spacing = theme.spacing;
|
|
1715
|
-
var selectedBackgroundColor = lighten(theme.palette.info.light, 0.9);
|
|
1716
|
-
var backgroundColor = theme.palette.surface.light;
|
|
1717
|
-
return {
|
|
1718
|
-
root: {
|
|
1719
|
-
position: 'relative',
|
|
1720
|
-
border: function (_a) {
|
|
1721
|
-
var selected = _a.selected;
|
|
1722
|
-
return (selected ? "1px solid " + info.light : "1px solid " + grey[700]);
|
|
1723
|
-
},
|
|
1724
|
-
backgroundColor: function (_a) {
|
|
1725
|
-
var selected = _a.selected;
|
|
1726
|
-
return (selected ? selectedBackgroundColor : backgroundColor);
|
|
1727
|
-
},
|
|
1728
|
-
color: function (_a) {
|
|
1729
|
-
var selected = _a.selected;
|
|
1730
|
-
return (selected ? getContrastText(selectedBackgroundColor) : getContrastText(backgroundColor));
|
|
1731
|
-
},
|
|
1732
|
-
transition: 'none',
|
|
1733
|
-
},
|
|
1734
|
-
cardContent: {
|
|
1735
|
-
display: 'flex',
|
|
1736
|
-
flexDirection: 'column',
|
|
1737
|
-
alignItems: 'center',
|
|
1738
|
-
justifyContent: 'center',
|
|
1739
|
-
marginTop: spacing(2.5),
|
|
1740
|
-
},
|
|
1741
|
-
icon: {
|
|
1742
|
-
position: 'absolute',
|
|
1743
|
-
top: spacing(2),
|
|
1744
|
-
left: spacing(2),
|
|
1745
|
-
color: function (_a) {
|
|
1746
|
-
var selected = _a.selected;
|
|
1747
|
-
return (selected ? info.main : grey[700]);
|
|
1748
|
-
},
|
|
1749
|
-
},
|
|
1750
|
-
focusHighlight: {
|
|
1751
|
-
backgroundColor: 'inherit',
|
|
1752
|
-
},
|
|
1753
|
-
};
|
|
1754
|
-
});
|
|
1755
|
-
|
|
1756
|
-
var SelectableCard = function (props) {
|
|
1757
|
-
var children = props.children, selectedProp = props.selected, _a = props.selection, selection = _a === void 0 ? [] : _a, onClick = props.onClick, value = props.value, labelId = props.labelId, CardActionAreaProps = props.CardActionAreaProps, muiProps = __rest$1(props, ["children", "selected", "selection", "onClick", "value", "labelId", "CardActionAreaProps"]);
|
|
1758
|
-
var selected = typeof selectedProp === 'boolean' ? selectedProp : selection.includes(value);
|
|
1759
|
-
var classes = useSelectableCardStyles(__assign$1(__assign$1({}, props), { selected: selected }));
|
|
1760
|
-
var handleClick = function () {
|
|
1761
|
-
onClick(value);
|
|
1762
|
-
};
|
|
1763
|
-
return (React__default.createElement(Card, __assign$1({ classes: { root: classes.root } }, muiProps),
|
|
1764
|
-
React__default.createElement(CardActionArea, __assign$1({ onClick: handleClick, classes: { focusHighlight: classes.focusHighlight }, role: "checkbox", "aria-checked": selected, "aria-labelledby": labelId }, CardActionAreaProps),
|
|
1765
|
-
React__default.createElement(Icon, { className: classes.icon, icon: selected ? SvgCheckCircle : SvgCircle, size: "medium" }),
|
|
1766
|
-
React__default.createElement(CardContent, { classes: { root: classes.cardContent } }, children))));
|
|
1767
|
-
};
|
|
1768
|
-
SelectableCard.displayName = 'SelectableCard';
|
|
1769
|
-
|
|
1770
|
-
var useToastStyles = makeStyles$1(function (theme) { return ({
|
|
1771
|
-
root: {
|
|
1772
|
-
boxSizing: 'border-box',
|
|
1773
|
-
padding: theme.spacing(0, 1.5),
|
|
1774
|
-
/** TODO: design to define responsive width value. */
|
|
1775
|
-
width: '350px',
|
|
1776
|
-
'& > div:first-child': {
|
|
1777
|
-
alignItems: 'center',
|
|
1778
|
-
},
|
|
1779
|
-
},
|
|
1780
|
-
}); });
|
|
1781
|
-
|
|
1782
|
-
var Toast = function (props) {
|
|
1783
|
-
var children = props.children, AlertProps = props.AlertProps, severity = props.severity, muiProps = __rest$1(props, ["children", "AlertProps", "severity"]);
|
|
1784
|
-
var classes = useToastStyles(props);
|
|
1785
|
-
return (React__default.createElement(MuiSnackbar, __assign$1({ ClickAwayListenerProps: { mouseEvent: false } }, muiProps),
|
|
1786
|
-
React__default.createElement(Alert, __assign$1({ className: classes.root, action: null, severity: severity }, AlertProps), children)));
|
|
1787
|
-
};
|
|
1788
|
-
Toast.defaultProps = {
|
|
1789
|
-
AlertProps: {},
|
|
1790
|
-
autoHideDuration: 5000,
|
|
1791
|
-
};
|
|
1792
|
-
Toast.displayName = 'Toast';
|
|
1793
|
-
|
|
1794
|
-
var useStyles$3 = makeStyles(function (_a) {
|
|
1795
|
-
var palette = _a.palette;
|
|
1796
|
-
return ({
|
|
1797
|
-
root: {
|
|
1798
|
-
background: palette.grey['100'],
|
|
1799
|
-
},
|
|
1800
|
-
});
|
|
1801
|
-
});
|
|
1802
|
-
var DialogActions = function (props) {
|
|
1803
|
-
var classes = useStyles$3(props);
|
|
1804
|
-
return React__default.createElement(CommonDialogActions, __assign$1({ classes: classes }, props));
|
|
1805
|
-
};
|
|
1806
|
-
|
|
1807
|
-
var Page = function (props) {
|
|
1808
|
-
var children = props.children, restProps = __rest$1(props, ["children"]);
|
|
1809
|
-
return (React__default.createElement(Box, __assign$1({ marginTop: 8, display: "flex", alignItems: "center", flexDirection: "column" }, restProps), children));
|
|
1810
|
-
};
|
|
1811
|
-
|
|
1812
|
-
var PageBody = function (props) {
|
|
1813
|
-
var children = props.children, restProps = __rest$1(props, ["children"]);
|
|
1814
|
-
return (React__default.createElement(Box, __assign$1({ py: 2, px: 5.5, maxWidth: 1100, width: "100%" }, restProps), children));
|
|
1815
|
-
};
|
|
1816
|
-
|
|
1817
|
-
var usePageSectionStyles = makeStyles(function (_a) {
|
|
1818
|
-
var spacing = _a.spacing;
|
|
1819
|
-
return ({
|
|
1820
|
-
root: {
|
|
1821
|
-
background: function (_a) {
|
|
1822
|
-
var uncontained = _a.uncontained;
|
|
1823
|
-
return (uncontained ? 'transparent' : undefined);
|
|
1824
|
-
},
|
|
1825
|
-
},
|
|
1826
|
-
cardContent: {
|
|
1827
|
-
padding: spacing(4),
|
|
1828
|
-
},
|
|
1829
|
-
});
|
|
1830
|
-
});
|
|
1831
|
-
|
|
1832
|
-
var PageSection = forwardRef(function (props, ref) {
|
|
1833
|
-
var children = props.children; props.uncontained; var restProps = __rest$1(props, ["children", "uncontained"]);
|
|
1834
|
-
var classes = usePageSectionStyles(props);
|
|
1835
|
-
return (React__default.createElement(Card, __assign$1({ classes: { root: classes.root }, ref: ref }, restProps),
|
|
1836
|
-
React__default.createElement(CardContent, { classes: { root: classes.cardContent } }, children)));
|
|
1837
|
-
});
|
|
1838
|
-
PageSection.displayName = 'PageSection';
|
|
1839
|
-
|
|
1840
|
-
var PageSections = function (props) {
|
|
1841
|
-
var children = props.children, restProps = __rest$1(props, ["children"]);
|
|
1842
|
-
return (React__default.createElement(Box, __assign$1({ display: "flex", flexDirection: "column", gridGap: 16 }, restProps), children));
|
|
1843
|
-
};
|
|
1844
|
-
|
|
1845
|
-
var PageSectionHead = function (props) {
|
|
1846
|
-
var children = props.children, restProps = __rest$1(props, ["children"]);
|
|
1847
|
-
var theme = useTheme$1();
|
|
1848
|
-
return (React__default.createElement(Box, __assign$1({ fontSize: theme.typography.h5.fontSize, mb: "1em", display: "flex", justifyContent: "space-between" }, restProps), children));
|
|
1849
|
-
};
|
|
1850
|
-
|
|
1851
|
-
var useStyles$2 = makeStyles(function () { return ({
|
|
1852
|
-
gutterBottom: {
|
|
1853
|
-
marginBottom: '1em',
|
|
1854
|
-
},
|
|
1855
|
-
}); });
|
|
1856
|
-
|
|
1857
|
-
var PageSectionTitle = function (props) {
|
|
1858
|
-
var children = props.children, restProps = __rest$1(props, ["children"]);
|
|
1859
|
-
var classes = useStyles$2();
|
|
1860
|
-
return (React__default.createElement(Typography, __assign$1({ classes: classes, gutterBottom: true, variant: "h5" }, restProps), children));
|
|
1861
|
-
};
|
|
1862
|
-
|
|
1863
|
-
var SettingsIndexCardGroup = function (props) {
|
|
1864
|
-
var children = props.children, restProps = __rest$1(props, ["children"]);
|
|
1865
|
-
return (React__default.createElement(Box, __assign$1({ display: "grid", gridGap: 16, gridTemplateColumns: "repeat(auto-fill, minmax(250px, 1fr))" }, restProps), children));
|
|
1866
|
-
};
|
|
1867
|
-
|
|
1868
|
-
var useSettingsIndexCardStyles = makeStyles$1(function (theme) { return ({
|
|
1869
|
-
cardRoot: {
|
|
1870
|
-
border: "1px solid " + theme.palette.grey[300],
|
|
1871
|
-
alignSelf: 'stretch',
|
|
1872
|
-
flexGrow: 1,
|
|
1873
|
-
'&:hover': {
|
|
1874
|
-
backgroundColor: '#52B7FF1A',
|
|
1875
|
-
},
|
|
1876
|
-
},
|
|
1877
|
-
cardContentRoot: {
|
|
1878
|
-
padding: theme.spacing(4),
|
|
1879
|
-
'&:last-child': {
|
|
1880
|
-
paddingBottom: theme.spacing(4),
|
|
1881
|
-
},
|
|
1882
|
-
},
|
|
1883
|
-
}); });
|
|
1884
|
-
|
|
1885
|
-
// eslint-disable-next-line react/display-name -- false positive
|
|
1886
|
-
var SettingsIndexCard = forwardRef(function (props, ref) {
|
|
1887
|
-
var title = props.title, description = props.description, Icon$1 = props.Icon, onClick = props.onClick, statusLabel = props.statusLabel, restProps = __rest$1(props, ["title", "description", "Icon", "onClick", "statusLabel"]);
|
|
1888
|
-
var classes = useSettingsIndexCardStyles(props);
|
|
1889
|
-
var showStatusLabel = (statusLabel === null || statusLabel === void 0 ? void 0 : statusLabel.text) && (statusLabel === null || statusLabel === void 0 ? void 0 : statusLabel.color);
|
|
1890
|
-
return (React__default.createElement(ButtonBase, __assign$1({ onClick: onClick, ref: ref }, restProps),
|
|
1891
|
-
React__default.createElement(Card, { classes: { root: classes.cardRoot } },
|
|
1892
|
-
React__default.createElement(CardContent, { classes: { root: classes.cardContentRoot } },
|
|
1893
|
-
React__default.createElement(Box, { fontSize: "32px", display: "flex", justifyContent: 'space-between', alignItems: "center", paddingBottom: 2 },
|
|
1894
|
-
React__default.createElement(Icon, { icon: Icon$1 || SvgHelp, size: "inherit" }),
|
|
1895
|
-
showStatusLabel && (React__default.createElement(Typography, { weight: "semi-bold", variant: "body2", color: statusLabel === null || statusLabel === void 0 ? void 0 : statusLabel.color }, statusLabel === null || statusLabel === void 0 ? void 0 : statusLabel.text))),
|
|
1896
|
-
React__default.createElement(Typography, { align: "left", variant: "h6", gutterBottom: true }, title),
|
|
1897
|
-
description && (React__default.createElement(Typography, { align: "left", variant: "body2", color: "grey.700" }, description))))));
|
|
1898
|
-
});
|
|
1899
|
-
SettingsIndexCard.displayName = 'SettingsIndexCard';
|
|
1900
|
-
|
|
1901
|
-
var classnames = {exports: {}};
|
|
1902
|
-
|
|
1903
|
-
/*!
|
|
1904
|
-
Copyright (c) 2018 Jed Watson.
|
|
1905
|
-
Licensed under the MIT License (MIT), see
|
|
1906
|
-
http://jedwatson.github.io/classnames
|
|
1907
|
-
*/
|
|
1908
|
-
|
|
1909
|
-
(function (module) {
|
|
1910
|
-
/* global define */
|
|
1911
|
-
|
|
1912
|
-
(function () {
|
|
1913
|
-
|
|
1914
|
-
var hasOwn = {}.hasOwnProperty;
|
|
1915
|
-
|
|
1916
|
-
function classNames() {
|
|
1917
|
-
var classes = [];
|
|
1918
|
-
|
|
1919
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
1920
|
-
var arg = arguments[i];
|
|
1921
|
-
if (!arg) continue;
|
|
1922
|
-
|
|
1923
|
-
var argType = typeof arg;
|
|
1924
|
-
|
|
1925
|
-
if (argType === 'string' || argType === 'number') {
|
|
1926
|
-
classes.push(arg);
|
|
1927
|
-
} else if (Array.isArray(arg)) {
|
|
1928
|
-
if (arg.length) {
|
|
1929
|
-
var inner = classNames.apply(null, arg);
|
|
1930
|
-
if (inner) {
|
|
1931
|
-
classes.push(inner);
|
|
1932
|
-
}
|
|
1933
|
-
}
|
|
1934
|
-
} else if (argType === 'object') {
|
|
1935
|
-
if (arg.toString === Object.prototype.toString) {
|
|
1936
|
-
for (var key in arg) {
|
|
1937
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
1938
|
-
classes.push(key);
|
|
1939
|
-
}
|
|
1940
|
-
}
|
|
1941
|
-
} else {
|
|
1942
|
-
classes.push(arg.toString());
|
|
1943
|
-
}
|
|
1944
|
-
}
|
|
1945
|
-
}
|
|
1946
|
-
|
|
1947
|
-
return classes.join(' ');
|
|
1948
|
-
}
|
|
1949
|
-
|
|
1950
|
-
if (module.exports) {
|
|
1951
|
-
classNames.default = classNames;
|
|
1952
|
-
module.exports = classNames;
|
|
1953
|
-
} else {
|
|
1954
|
-
window.classNames = classNames;
|
|
1955
|
-
}
|
|
1956
|
-
}());
|
|
1957
|
-
}(classnames));
|
|
1958
|
-
|
|
1959
|
-
var classNames = classnames.exports;
|
|
1960
|
-
|
|
1961
|
-
var useStyles$1 = makeStyles(function (theme) { return ({
|
|
1962
|
-
root: {
|
|
1963
|
-
'&$uncontained > li > *:first-child': {
|
|
1964
|
-
background: theme.palette.background.paper,
|
|
1965
|
-
borderRadius: theme.spacing(1),
|
|
1966
|
-
},
|
|
1967
|
-
'& > li > *:first-child': {
|
|
1968
|
-
borderBottom: "1px solid " + theme.palette.grey[300],
|
|
1969
|
-
},
|
|
1970
|
-
'& > li:last-child > *:first-child': {
|
|
1971
|
-
borderBottom: 'none',
|
|
1972
|
-
},
|
|
1973
|
-
},
|
|
1974
|
-
uncontained: {
|
|
1975
|
-
display: 'flex',
|
|
1976
|
-
flexDirection: 'column',
|
|
1977
|
-
gap: 16,
|
|
1978
|
-
},
|
|
1979
|
-
}); });
|
|
1980
|
-
|
|
1981
|
-
var List = function (props) {
|
|
1982
|
-
var _a;
|
|
1983
|
-
var children = props.children, uncontained = props.uncontained, className = props.className, restProps = __rest$1(props, ["children", "uncontained", "className"]);
|
|
1984
|
-
var classes = useStyles$1(props);
|
|
1985
|
-
return (React__default.createElement(List$1, __assign$1({ classes: classes, className: classNames((_a = {}, _a[classes.uncontained] = uncontained, _a), className) }, restProps), children));
|
|
1986
|
-
};
|
|
1987
|
-
|
|
1988
|
-
var useStyles = makeStyles(function (theme) { return ({
|
|
1989
|
-
chipRoot: {
|
|
1990
|
-
marginRight: theme.spacing(4),
|
|
1991
|
-
cursor: 'pointer',
|
|
1992
|
-
},
|
|
1993
|
-
body: {
|
|
1994
|
-
paddingTop: '4px',
|
|
1995
|
-
},
|
|
1996
|
-
listItemText: {
|
|
1997
|
-
marginRight: '32px',
|
|
1998
|
-
},
|
|
1999
|
-
}); });
|
|
2000
|
-
/**
|
|
2001
|
-
* TODO
|
|
2002
|
-
* - clean props util
|
|
2003
|
-
* - Avatar size and shape
|
|
2004
|
-
*/
|
|
2005
|
-
var StandardListItem = function (props) {
|
|
2006
|
-
props.itemId; var title = props.title, meta = props.meta, body = props.body, image = props.image, status = props.status, secondaryAction = props.secondaryAction, onClick = props.onClick, restProps = __rest$1(props, ["itemId", "title", "meta", "body", "image", "status", "secondaryAction", "onClick"]);
|
|
2007
|
-
var classes = useStyles(props);
|
|
2008
|
-
return (React__default.createElement(ListItem, __assign$1({ button: Boolean(onClick), onClick: function (e) { return onClick && onClick(e, props); } }, restProps),
|
|
2009
|
-
image && (React__default.createElement(ListItemAvatar, null,
|
|
2010
|
-
React__default.createElement(Avatar, { src: image.src, alt: image.alt }, image.Icon && React__default.createElement(Icon, { icon: image.Icon })))),
|
|
2011
|
-
React__default.createElement(ListItemText, { disableTypography: true, className: classes.listItemText },
|
|
2012
|
-
React__default.createElement(Typography, { variant: "h6" }, title),
|
|
2013
|
-
meta && (React__default.createElement(Typography, { variant: "body2", color: "secondary.light" }, meta)),
|
|
2014
|
-
body && (React__default.createElement(Typography, { variant: "body2", color: "grey.700", className: classes.body }, body))),
|
|
2015
|
-
status && (React__default.createElement(Chip, { classes: { root: classes.chipRoot }, icon: status.Icon && React__default.createElement(Icon, { icon: status.Icon }), label: status.text })),
|
|
2016
|
-
secondaryAction && (React__default.createElement(ListItemSecondaryAction, null,
|
|
2017
|
-
React__default.createElement(IconButton$1, { style: { color: 'black' }, "aria-label": secondaryAction['aria-label'], onClick: function (e) { return secondaryAction.onClick(e, props); } },
|
|
2018
|
-
React__default.createElement(Icon, { icon: secondaryAction.Icon }))))));
|
|
2019
|
-
};
|
|
2020
|
-
|
|
2021
|
-
var useFullScreenStepperContext = function () { return useContext(FullScreenStepperContext); };
|
|
2022
|
-
|
|
2023
|
-
/**
|
|
2024
|
-
* Manages state for SelectableCards.
|
|
2025
|
-
* @param {Config} config - Configures the hook behavior.
|
|
2026
|
-
* @param {string|string[]} [config.defaultSelected = []] - Initializes state with the provided value.
|
|
2027
|
-
* @param {string} [config.selectionMode = 'single'] - Determines selection behavior. 'single' provides radio style
|
|
2028
|
-
* selection. 'multi' provides checkbox style selection.
|
|
2029
|
-
* @param {number} [config.maxSelectionCount] - A number to determine the maximum amount of cards to be selected.
|
|
2030
|
-
* @returns {HookResult} An object with click handler and current state. Spread into a SelectableCard to use.
|
|
2031
|
-
*/
|
|
2032
|
-
var useSelectableCard = function (config) {
|
|
2033
|
-
if (config === void 0) { config = {}; }
|
|
2034
|
-
var _a = config.defaultSelected, defaultSelected = _a === void 0 ? [] : _a, _b = config.selectionMode, selectionMode = _b === void 0 ? 'single' : _b, maxSelectionCount = config.maxSelectionCount;
|
|
2035
|
-
var initialState = Array.isArray(defaultSelected) ? defaultSelected : [defaultSelected];
|
|
2036
|
-
var _c = useState(initialState), selection = _c[0], setSelection = _c[1];
|
|
2037
|
-
var onClick;
|
|
2038
|
-
var handleSingleSelectionMode = function (value) {
|
|
2039
|
-
setSelection([value]);
|
|
2040
|
-
};
|
|
2041
|
-
var handleMultiSelectionMode = function (value) {
|
|
2042
|
-
var newSelection = __spreadArray([], selection);
|
|
2043
|
-
if (!selection.includes(value)) {
|
|
2044
|
-
if (selection.length === maxSelectionCount) {
|
|
2045
|
-
newSelection.shift();
|
|
2046
|
-
}
|
|
2047
|
-
newSelection = __spreadArray(__spreadArray([], newSelection), [value]);
|
|
2048
|
-
setSelection(newSelection);
|
|
2049
|
-
}
|
|
2050
|
-
else {
|
|
2051
|
-
newSelection = newSelection.filter(function (selected) { return selected !== value; });
|
|
2052
|
-
setSelection(newSelection);
|
|
2053
|
-
}
|
|
2054
|
-
};
|
|
2055
|
-
switch (selectionMode) {
|
|
2056
|
-
case 'single':
|
|
2057
|
-
onClick = handleSingleSelectionMode;
|
|
2058
|
-
break;
|
|
2059
|
-
case 'multi':
|
|
2060
|
-
onClick = handleMultiSelectionMode;
|
|
2061
|
-
break;
|
|
2062
|
-
default:
|
|
2063
|
-
onClick = handleSingleSelectionMode;
|
|
2064
|
-
}
|
|
2065
|
-
return { card: { onClick: onClick, selection: selection }, selection: selection, setSelection: setSelection };
|
|
2066
|
-
};
|
|
2067
|
-
|
|
2068
|
-
var useDialog = function () {
|
|
2069
|
-
var _a = useState(false), open = _a[0], setOpen = _a[1];
|
|
2070
|
-
var toggle = function () { return setOpen(function (current) { return !current; }); };
|
|
2071
|
-
var close = function () { return setOpen(false); };
|
|
2072
|
-
var triggerProps = { onClick: toggle };
|
|
2073
|
-
var dialogProps = { open: open, onClose: close };
|
|
2074
|
-
return [triggerProps, dialogProps, { open: open, setOpen: setOpen, toggle: toggle, close: close }];
|
|
2075
|
-
};
|
|
2076
|
-
|
|
2077
|
-
var fonts = ['"Poppins"', '"sans-serif"'];
|
|
2078
|
-
var adminThemeTypography = {
|
|
2079
|
-
htmlFontSize: 16,
|
|
2080
|
-
fontFamily: fonts.join(', '),
|
|
2081
|
-
h1: {
|
|
2082
|
-
fontWeight: 400,
|
|
2083
|
-
fontSize: '6rem',
|
|
2084
|
-
lineHeight: '9rem',
|
|
2085
|
-
},
|
|
2086
|
-
h2: {
|
|
2087
|
-
fontWeight: 400,
|
|
2088
|
-
fontSize: '3.75rem',
|
|
2089
|
-
lineHeight: '5.625rem',
|
|
2090
|
-
},
|
|
2091
|
-
h3: {
|
|
2092
|
-
fontWeight: 400,
|
|
2093
|
-
fontSize: '3rem',
|
|
2094
|
-
lineHeight: '4.5rem',
|
|
2095
|
-
},
|
|
2096
|
-
h4: {
|
|
2097
|
-
fontWeight: 400,
|
|
2098
|
-
fontSize: '2.125rem',
|
|
2099
|
-
lineHeight: '3.25rem',
|
|
2100
|
-
},
|
|
2101
|
-
h5: {
|
|
2102
|
-
fontWeight: 500,
|
|
2103
|
-
fontSize: '1.5rem',
|
|
2104
|
-
lineHeight: '2.25rem',
|
|
2105
|
-
},
|
|
2106
|
-
h6: {
|
|
2107
|
-
fontWeight: 500,
|
|
2108
|
-
fontSize: '1.25rem',
|
|
2109
|
-
lineHeight: '1.875rem',
|
|
2110
|
-
},
|
|
2111
|
-
h7: {
|
|
2112
|
-
fontWeight: 400,
|
|
2113
|
-
fontSize: '1.125rem',
|
|
2114
|
-
lineHeight: '1.75rem',
|
|
2115
|
-
},
|
|
2116
|
-
body1: {
|
|
2117
|
-
fontWeight: 400,
|
|
2118
|
-
fontSize: '1rem',
|
|
2119
|
-
lineHeight: '1.5rem',
|
|
2120
|
-
},
|
|
2121
|
-
body2: {
|
|
2122
|
-
fontWeight: 400,
|
|
2123
|
-
fontSize: '0.875rem',
|
|
2124
|
-
lineHeight: '1.25rem',
|
|
2125
|
-
},
|
|
2126
|
-
subtitle1: {
|
|
2127
|
-
fontWeight: 400,
|
|
2128
|
-
fontSize: '0.75rem',
|
|
2129
|
-
lineHeight: '1.125rem',
|
|
2130
|
-
color: '#9E9E9E',
|
|
2131
|
-
},
|
|
2132
|
-
button: {
|
|
2133
|
-
fontWeight: 500,
|
|
2134
|
-
fontSize: '0.875rem',
|
|
2135
|
-
lineHeight: '1.25rem',
|
|
2136
|
-
textTransform: 'capitalize',
|
|
2137
|
-
},
|
|
2138
|
-
};
|
|
2139
|
-
|
|
2140
|
-
var adminThemeBreakpoints = {
|
|
2141
|
-
values: {
|
|
2142
|
-
xs: 0,
|
|
2143
|
-
sm: 768,
|
|
2144
|
-
md: 992,
|
|
2145
|
-
lg: 1200,
|
|
2146
|
-
xl: 1900,
|
|
2147
|
-
},
|
|
2148
|
-
};
|
|
2149
|
-
|
|
2150
|
-
var basePalette = {
|
|
2151
|
-
/** Semantic Colors */
|
|
2152
|
-
primary: {
|
|
2153
|
-
light: '#DA777E',
|
|
2154
|
-
main: '#F04649',
|
|
2155
|
-
dark: '#B3212B',
|
|
2156
|
-
contrastText: '#FFFFFF',
|
|
2157
|
-
gradientStart: '#ED4A67',
|
|
2158
|
-
gradientEnd: '#F04649',
|
|
2159
|
-
},
|
|
2160
|
-
info: {
|
|
2161
|
-
light: '#52B7FF',
|
|
2162
|
-
main: '#0076CB',
|
|
2163
|
-
dark: '#164B54',
|
|
2164
|
-
},
|
|
2165
|
-
success: {
|
|
2166
|
-
light: '#48D3AB',
|
|
2167
|
-
main: '#00B485',
|
|
2168
|
-
dark: '#00663E',
|
|
2169
|
-
contrastText: '#FFFFFF',
|
|
2170
|
-
},
|
|
2171
|
-
error: {
|
|
2172
|
-
light: '#DA777E',
|
|
2173
|
-
main: '#E52021',
|
|
2174
|
-
dark: '#A80005',
|
|
2175
|
-
},
|
|
2176
|
-
warning: {
|
|
2177
|
-
light: '#F0DFBA',
|
|
2178
|
-
main: '#F5C364',
|
|
2179
|
-
dark: '#E57E45',
|
|
2180
|
-
},
|
|
2181
|
-
/** Colors */
|
|
2182
|
-
blue: {
|
|
2183
|
-
light: '#52B7FF',
|
|
2184
|
-
main: '#0076CB',
|
|
2185
|
-
dark: '#164B54',
|
|
2186
|
-
darker: '#002E6C',
|
|
2187
|
-
},
|
|
2188
|
-
green: {
|
|
2189
|
-
light: '#48D3AB',
|
|
2190
|
-
main: '#00B485',
|
|
2191
|
-
dark: '#00663E',
|
|
2192
|
-
},
|
|
2193
|
-
purple: {
|
|
2194
|
-
light: '#7B7FA3',
|
|
2195
|
-
main: '#2E3042',
|
|
2196
|
-
dark: '#1A1D20',
|
|
2197
|
-
},
|
|
2198
|
-
red: {
|
|
2199
|
-
light: '#DA777E',
|
|
2200
|
-
main: '#F04649',
|
|
2201
|
-
dark: '#B3212B',
|
|
2202
|
-
},
|
|
2203
|
-
yellow: {
|
|
2204
|
-
light: '#F0DFBA',
|
|
2205
|
-
main: '#F5C364',
|
|
2206
|
-
dark: '#E57E45',
|
|
2207
|
-
},
|
|
2208
|
-
gray: {
|
|
2209
|
-
light: '#E9E9E9',
|
|
2210
|
-
main: '#D9D9D9',
|
|
2211
|
-
dark: '#9D9D9D',
|
|
2212
|
-
},
|
|
2213
|
-
white: {
|
|
2214
|
-
main: '#FFFFFF',
|
|
2215
|
-
},
|
|
2216
|
-
};
|
|
2217
|
-
var adminLightPalette = {
|
|
2218
|
-
type: 'light',
|
|
2219
|
-
/** Semantic Colors */
|
|
2220
|
-
secondary: {
|
|
2221
|
-
light: '#7B7FA3',
|
|
2222
|
-
main: '#2E3042',
|
|
2223
|
-
dark: '#1A1D20',
|
|
2224
|
-
},
|
|
2225
|
-
surface: {
|
|
2226
|
-
light: '#FEFEFE',
|
|
2227
|
-
main: '#ECF0F1',
|
|
2228
|
-
dark: '#2E3042',
|
|
2229
|
-
},
|
|
2230
|
-
};
|
|
2231
|
-
var adminDarkPalette = {
|
|
2232
|
-
type: 'dark',
|
|
2233
|
-
/** Semantic Colors */
|
|
2234
|
-
secondary: {
|
|
2235
|
-
light: '#7B7FA3',
|
|
2236
|
-
main: '#FFFFFF',
|
|
2237
|
-
},
|
|
2238
|
-
surface: {
|
|
2239
|
-
light: '#141414',
|
|
2240
|
-
main: '#222222',
|
|
2241
|
-
dark: '#333333',
|
|
2242
|
-
},
|
|
2243
|
-
};
|
|
2244
|
-
var dataVizPalette = {
|
|
2245
|
-
data: {
|
|
2246
|
-
blue: {
|
|
2247
|
-
light: '#A5BBFF',
|
|
2248
|
-
main: '#6B82FE',
|
|
2249
|
-
dark: '#5F6FE6',
|
|
2250
|
-
},
|
|
2251
|
-
peach: {
|
|
2252
|
-
light: '#E69999',
|
|
2253
|
-
main: '#FF7061',
|
|
2254
|
-
dark: '#DC5D56',
|
|
2255
|
-
},
|
|
2256
|
-
pink: {
|
|
2257
|
-
light: '#D08CB2',
|
|
2258
|
-
main: '#BC5090',
|
|
2259
|
-
dark: '#A04383',
|
|
2260
|
-
},
|
|
2261
|
-
purple: {
|
|
2262
|
-
light: '#978CCE',
|
|
2263
|
-
main: '#58508D',
|
|
2264
|
-
dark: '#1B1B51',
|
|
2265
|
-
},
|
|
2266
|
-
marigold: {
|
|
2267
|
-
light: '#ECBE70',
|
|
2268
|
-
main: '#ECA33A',
|
|
2269
|
-
dark: '#E28A30',
|
|
2270
|
-
},
|
|
2271
|
-
teal: {
|
|
2272
|
-
light: '#5FCFD2',
|
|
2273
|
-
main: '#1AB0AF',
|
|
2274
|
-
dark: '#1E938F',
|
|
2275
|
-
},
|
|
2276
|
-
},
|
|
2277
|
-
};
|
|
2278
|
-
|
|
2279
|
-
var props = {
|
|
2280
|
-
MuiSwitch: {
|
|
2281
|
-
color: 'default',
|
|
2282
|
-
},
|
|
2283
|
-
MuiTextField: {
|
|
2284
|
-
variant: 'outlined',
|
|
2285
|
-
},
|
|
2286
|
-
};
|
|
2287
|
-
|
|
2288
|
-
/**
|
|
2289
|
-
* These theme properties should be considered legacy. Make efforts to avoid new usage as well as refactor out existing
|
|
2290
|
-
* usage.
|
|
2291
|
-
*/
|
|
2292
|
-
var adminLightPlaceholder = { placeholder: 'rgba(0, 0, 0, 1)' };
|
|
2293
|
-
var adminDarkPlaceholder = { placeholder: 'rgba(255, 255, 255, 0.37)' };
|
|
2294
|
-
var adminThemeStatus = {
|
|
2295
|
-
status: {
|
|
2296
|
-
disabled: {
|
|
2297
|
-
opacity: 0.55,
|
|
2298
|
-
},
|
|
2299
|
-
},
|
|
2300
|
-
};
|
|
2301
|
-
var BASE_Z_INDEX = 1100000;
|
|
2302
|
-
var adminThemeZIndex = {
|
|
2303
|
-
zIndex: {
|
|
2304
|
-
mobileStepper: BASE_Z_INDEX + 1000,
|
|
2305
|
-
appBar: BASE_Z_INDEX + 1100,
|
|
2306
|
-
drawer: BASE_Z_INDEX + 1200,
|
|
2307
|
-
modal: BASE_Z_INDEX + 1300,
|
|
2308
|
-
snackbar: BASE_Z_INDEX + 1400,
|
|
2309
|
-
tooltip: BASE_Z_INDEX + 9100,
|
|
2310
|
-
},
|
|
2311
|
-
};
|
|
2312
|
-
/** The defaults for MuiInputBase and MuiInputLabel can be removed once the BasicForm & 'shared' inputs have either:
|
|
2313
|
-
* 1. been refactored to use secondary color.
|
|
2314
|
-
* 2. been replaced with new common components.
|
|
2315
|
-
*
|
|
2316
|
-
* props as imported from './props' are part updated design system.
|
|
2317
|
-
*/
|
|
2318
|
-
var adminThemeDefaultProps = {
|
|
2319
|
-
props: __assign$1(__assign$1({}, props), {
|
|
2320
|
-
// Legacy below
|
|
2321
|
-
MuiCard: {
|
|
2322
|
-
elevation: 0,
|
|
2323
|
-
}, MuiTooltip: {
|
|
2324
|
-
title: '',
|
|
2325
|
-
placement: 'right',
|
|
2326
|
-
}, MuiPaper: {
|
|
2327
|
-
elevation: 0,
|
|
2328
|
-
}, MuiAppBar: {
|
|
2329
|
-
position: 'static',
|
|
2330
|
-
}, MuiInputBase: {
|
|
2331
|
-
color: 'secondary',
|
|
2332
|
-
}, MuiInputLabel: {
|
|
2333
|
-
color: 'secondary',
|
|
2334
|
-
} }),
|
|
2335
|
-
};
|
|
2336
|
-
|
|
2337
|
-
var overrides = {
|
|
2338
|
-
MuiCssBaseline: {
|
|
2339
|
-
'@global': {
|
|
2340
|
-
'*::-webkit-scrollbar': {
|
|
2341
|
-
width: '12px',
|
|
2342
|
-
},
|
|
2343
|
-
'*::-webkit-scrollbar-thumb': {
|
|
2344
|
-
backgroundColor: 'rgba(167,167,167,1)',
|
|
2345
|
-
border: '2px solid rgba(245, 245, 245, 1)',
|
|
2346
|
-
borderRadius: '8px',
|
|
2347
|
-
},
|
|
2348
|
-
'*::-webkit-scrollbar-track': {
|
|
2349
|
-
backgroundColor: 'rgba(245, 245, 245, 1)',
|
|
2350
|
-
borderRadius: '0px',
|
|
2351
|
-
},
|
|
2352
|
-
},
|
|
2353
|
-
},
|
|
2354
|
-
MuiSwitch: {
|
|
2355
|
-
checked: {},
|
|
2356
|
-
track: {},
|
|
2357
|
-
switchBase: {
|
|
2358
|
-
'&$checked': {
|
|
2359
|
-
color: basePalette.success.main,
|
|
2360
|
-
'& + $track': {
|
|
2361
|
-
background: basePalette.success.light,
|
|
2362
|
-
},
|
|
2363
|
-
},
|
|
2364
|
-
},
|
|
2365
|
-
},
|
|
2366
|
-
};
|
|
2367
|
-
|
|
2368
|
-
var adminLightOptions = __assign$1(__assign$1(__assign$1(__assign$1({ themeName: 'Admin Light', palette: __assign$1(__assign$1(__assign$1({}, basePalette), adminLightPalette), dataVizPalette), breakpoints: adminThemeBreakpoints, typography: adminThemeTypography, overrides: overrides }, adminLightPlaceholder), adminThemeZIndex), adminThemeStatus), adminThemeDefaultProps);
|
|
2369
|
-
var adminLight = createTheme(adminLightOptions);
|
|
2370
|
-
|
|
2371
|
-
var adminDarkOptions = __assign$1(__assign$1(__assign$1(__assign$1({ themeName: 'Admin Dark', palette: __assign$1(__assign$1(__assign$1({}, basePalette), adminDarkPalette), dataVizPalette), breakpoints: adminThemeBreakpoints, typography: adminThemeTypography, overrides: overrides }, adminDarkPlaceholder), adminThemeZIndex), adminThemeStatus), adminThemeDefaultProps);
|
|
2372
|
-
var adminDark = createTheme(adminDarkOptions);
|
|
2373
|
-
|
|
2374
|
-
export { Alert, AlertDialog, AlertDialogHeader, AlertTitle, Button, ButtonGroup, DialogActions, FeatureIntro, FullScreenStepper, FullScreenStepperActions, FullScreenStepperContent, FullScreenStepperContext, List, Page, PageBody, PageSection, PageSectionHead, PageSectionTitle, PageSections, SelectableCard, SettingsIndexCard, SettingsIndexCardGroup, StandardListItem, Toast, adminDark, adminDarkOptions, adminLight, adminLightOptions, useDialog, useFullScreenStepperContext, useSelectableCard };
|
|
2375
|
-
//# sourceMappingURL=index.es.js.map
|