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