@superdispatch/ui 0.23.4 → 0.24.0

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/dist-web/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
- import { Button as Button$1, CircularProgress, ButtonGroup, Popover, MenuList, Toolbar, Grid, MenuItem, Typography, Menu, Divider, ButtonBase, Avatar, FormControl, FormControlLabel as FormControlLabel$1, Checkbox, FormHelperText, FormLabel, FormGroup, useMediaQuery, Tooltip, SvgIcon, AppBar, List, Card as Card$1, CardContent, IconButton, TextField, Radio, RadioGroup, SnackbarContent as SnackbarContent$1, Portal, Snackbar as Snackbar$1, Slide, CssBaseline, createTheme, createGenerateClassName } from '@material-ui/core';
3
+ import { Button as Button$1, CircularProgress, ButtonGroup, Popover, MenuList, Toolbar, Grid, MenuItem, Typography, Menu, Divider, ButtonBase, Avatar, FormHelperText as FormHelperText$4, FormControlLabel as FormControlLabel$1, Checkbox, FormControl as FormControl$2, FormLabel as FormLabel$2, FormGroup, useMediaQuery, Tooltip, SvgIcon, AppBar, List, Card as Card$1, CardContent, IconButton, TextField, Radio, RadioGroup, SnackbarContent as SnackbarContent$1, Portal, Snackbar as Snackbar$1, Slide, CssBaseline, createTheme, createGenerateClassName } from '@material-ui/core';
4
4
  import { MoreHoriz, Info, Close, Warning, CheckCircle } from '@material-ui/icons';
5
5
  import { makeStyles, StylesProvider, ThemeProvider as ThemeProvider$1 } from '@material-ui/styles';
6
6
  import { forwardRef, useState, useRef, useLayoutEffect, cloneElement, useMemo, useContext, createContext, Children, useCallback, useEffect } from 'react';
@@ -445,64 +445,70 @@ var Color;
445
445
  Color["Black"] = "#000";
446
446
  Color["Black50"] = "rgba(0, 0, 0, 0.5)";
447
447
  Color["Black20"] = "rgba(0, 0, 0, 0.2)";
448
+ Color["Dark30"] = "rgba(143, 148, 158, 0.3)";
449
+ Color["Blue30"] = "rgba(0, 112, 245, 0.3)";
450
+ Color["Green30"] = "rgba(3, 135, 47, 0.3)";
451
+ Color["Red30"] = "rgba(229, 35, 13, 0.3)";
452
+ Color["Silver30"] = "rgba(225, 229, 234, 0.3)";
453
+ Color["Blue10"] = "rgba(0, 112, 245, 0.1)";
448
454
  Color["Grey100"] = "#8F949E";
449
455
  Color["Grey200"] = "#6A707C";
450
456
  Color["Grey300"] = "#5B6371";
451
457
  Color["Grey400"] = "#323C4E";
452
458
  Color["Grey450"] = "#222F44";
453
459
  Color["Grey500"] = "#192334";
454
- Color["Dark100"] = "#8F949E";
455
460
  Color["Dark200"] = "#6A707C";
456
- Color["Dark300"] = "#5B6371";
457
461
  Color["Dark400"] = "#323C4E";
458
462
  Color["Dark450"] = "#222F44";
459
- Color["Dark500"] = "#192334";
460
463
  Color["Silver100"] = "#F6F7F8";
461
- Color["Silver200"] = "#F3F5F8";
462
464
  Color["Silver300"] = "#E8ECF0";
463
- Color["Silver400"] = "#E1E5EA";
464
- Color["Silver500"] = "#C4CDD5";
465
- Color["Blue50"] = "#EBF4FF";
466
465
  Color["Blue75"] = "#CCE5FF";
467
466
  Color["Blue100"] = "#A8D1FF";
468
467
  Color["Blue200"] = "#66ADFF";
469
- Color["Blue300"] = "#0070F5";
470
468
  Color["Blue400"] = "#0063DB";
471
- Color["Blue500"] = "#0063DB";
472
- Color["Green50"] = "#ECF9EF";
473
469
  Color["Green75"] = "#C8F4D1";
474
470
  Color["Green100"] = "#90EAAE";
475
471
  Color["Green200"] = "#5DDA87";
476
- Color["Green300"] = "#03872F";
477
472
  Color["Green400"] = "#1E8F46";
478
- Color["Green500"] = "#007A29";
479
- Color["Purple50"] = "#EFEEFC";
480
473
  Color["Purple75"] = "#DCDBF5";
481
474
  Color["Purple100"] = "#CBC8EE";
482
475
  Color["Purple200"] = "#A7A1E8";
483
- Color["Purple300"] = "#6559CF";
484
476
  Color["Purple400"] = "#473ABB";
485
- Color["Purple500"] = "#473ABB";
486
- Color["Red50"] = "#FFEDEB";
487
477
  Color["Red75"] = "#FDD9D3";
488
478
  Color["Red100"] = "#FDC2BA";
489
479
  Color["Red200"] = "#FE988B";
490
- Color["Red300"] = "#E5230D";
491
480
  Color["Red400"] = "#D9210D";
492
- Color["Red500"] = "#C31909";
493
- Color["Teal50"] = "#E3F6FC";
494
481
  Color["Teal75"] = "#BEEDF9";
495
482
  Color["Teal100"] = "#91E3F8";
496
483
  Color["Teal200"] = "#61D3EF";
497
- Color["Teal300"] = "#007EAB";
498
484
  Color["Teal400"] = "#008DB8";
499
- Color["Teal500"] = "#00678A";
500
- Color["Yellow50"] = "#FFF7DC";
501
485
  Color["Yellow75"] = "#FFF1C2";
502
486
  Color["Yellow100"] = "#FFE494";
503
487
  Color["Yellow200"] = "#FFDC6B";
504
- Color["Yellow300"] = "#E8671C";
505
488
  Color["Yellow400"] = "#FFA91F";
489
+ Color["Dark100"] = "#8F949E";
490
+ Color["Dark300"] = "#5B6371";
491
+ Color["Dark500"] = "#192334";
492
+ Color["Silver200"] = "#F3F5F8";
493
+ Color["Silver400"] = "#E1E5EA";
494
+ Color["Silver500"] = "#C4CDD5";
495
+ Color["Blue50"] = "#EBF4FF";
496
+ Color["Blue300"] = "#0070F5";
497
+ Color["Blue500"] = "#0063DB";
498
+ Color["Green50"] = "#ECF9EF";
499
+ Color["Green300"] = "#03872F";
500
+ Color["Green500"] = "#007A29";
501
+ Color["Purple50"] = "#EFEEFC";
502
+ Color["Purple300"] = "#6559CF";
503
+ Color["Purple500"] = "#473ABB";
504
+ Color["Red50"] = "#FFEDEB";
505
+ Color["Red300"] = "#E5230D";
506
+ Color["Red500"] = "#C31909";
507
+ Color["Teal50"] = "#E3F6FC";
508
+ Color["Teal300"] = "#007EAB";
509
+ Color["Teal500"] = "#00678A";
510
+ Color["Yellow50"] = "#FFF7DC";
511
+ Color["Yellow300"] = "#E8671C";
506
512
  Color["Yellow500"] = "#B84807";
507
513
  })(Color || (Color = {}));
508
514
 
@@ -786,6 +792,14 @@ var CardButton = /*#__PURE__*/forwardRef((_ref, ref) => {
786
792
  if (process.env.NODE_ENV !== "production") CardButton.displayName = "CardButton";
787
793
 
788
794
  var _excluded$5 = ["label", "error", "checked", "onBlur", "onChange", "helperText", "FormControlLabelProps"];
795
+ var FormControl = /*#__PURE__*/styled(FormControl$2).withConfig({
796
+ displayName: "CheckboxField__FormControl",
797
+ componentId: "SD__sc-1wxu0g6-0"
798
+ })(["justify-content:center;"]);
799
+ var FormHelperText = /*#__PURE__*/styled(FormHelperText$4).withConfig({
800
+ displayName: "CheckboxField__FormHelperText",
801
+ componentId: "SD__sc-1wxu0g6-1"
802
+ })(["color:", ";font-size:12px;line-height:16px;font-weight:400;margin-left:30px;margin-top:0;margin-bottom:4px;&.Mui-error{color:", ";}"], Color.Dark300, Color.Red500);
789
803
  var CheckboxField = /*#__PURE__*/forwardRef((_ref, ref) => {
790
804
  var {
791
805
  label,
@@ -818,6 +832,14 @@ var CheckboxField = /*#__PURE__*/forwardRef((_ref, ref) => {
818
832
  if (process.env.NODE_ENV !== "production") CheckboxField.displayName = "CheckboxField";
819
833
 
820
834
  var _excluded$6 = ["FormGroupProps", "label", "FormLabelProps", "helperText", "FormHelperTextProps", "children"];
835
+ var FormLabel = /*#__PURE__*/styled(FormLabel$2).withConfig({
836
+ displayName: "CheckboxGroudField__FormLabel",
837
+ componentId: "SD__sc-1lihyfy-0"
838
+ })(["margin-bottom:8px;color:", ";font-weight:600;"], Color.Dark300);
839
+ var FormHelperText$1 = /*#__PURE__*/styled(FormHelperText$4).withConfig({
840
+ displayName: "CheckboxGroudField__FormHelperText",
841
+ componentId: "SD__sc-1lihyfy-1"
842
+ })(["margin-top:8px;color:", ";&.Mui-error{color:", ";}"], Color.Dark300, Color.Red500);
821
843
  var CheckboxGroupField = /*#__PURE__*/forwardRef((_ref, ref) => {
822
844
  var {
823
845
  FormGroupProps: formGroupProps,
@@ -829,7 +851,7 @@ var CheckboxGroupField = /*#__PURE__*/forwardRef((_ref, ref) => {
829
851
  } = _ref,
830
852
  formControlProps = _objectWithoutProperties(_ref, _excluded$6);
831
853
 
832
- return /*#__PURE__*/jsxs(FormControl, _objectSpread(_objectSpread({}, formControlProps), {}, {
854
+ return /*#__PURE__*/jsxs(FormControl$2, _objectSpread(_objectSpread({}, formControlProps), {}, {
833
855
  hiddenLabel: !label,
834
856
  children: [!!label && /*#__PURE__*/jsx(FormLabel, _objectSpread(_objectSpread({}, formLabelProps), {}, {
835
857
  children: label
@@ -837,7 +859,7 @@ var CheckboxGroupField = /*#__PURE__*/forwardRef((_ref, ref) => {
837
859
  ref: ref
838
860
  }, formGroupProps), {}, {
839
861
  children: children
840
- })), !!helperText && /*#__PURE__*/jsx(FormHelperText, _objectSpread(_objectSpread({}, formHelperTextProps), {}, {
862
+ })), !!helperText && /*#__PURE__*/jsx(FormHelperText$1, _objectSpread(_objectSpread({}, formHelperTextProps), {}, {
841
863
  children: helperText
842
864
  }))]
843
865
  }));
@@ -1804,6 +1826,14 @@ if (process.env.NODE_ENV !== "production") NumberField.displayName = "NumberFiel
1804
1826
  NumberField.displayName = 'NumberField';
1805
1827
 
1806
1828
  var _excluded$j = ["label", "error", "checked", "onBlur", "onChange", "helperText", "FormControlLabelProps"];
1829
+ var FormControl$1 = /*#__PURE__*/styled(FormControl$2).withConfig({
1830
+ displayName: "RadioField__FormControl",
1831
+ componentId: "SD__sc-6ey4qt-0"
1832
+ })(["justify-content:center;"]);
1833
+ var FormHelperText$2 = /*#__PURE__*/styled(FormHelperText$4).withConfig({
1834
+ displayName: "RadioField__FormHelperText",
1835
+ componentId: "SD__sc-6ey4qt-1"
1836
+ })(["color:", ";font-size:12px;line-height:16px;font-weight:400;margin-left:30px;margin-top:0;margin-bottom:4px;&.Mui-error{color:", ";}"], Color.Dark300, Color.Red500);
1807
1837
  var RadioField = /*#__PURE__*/forwardRef((_ref, ref) => {
1808
1838
  var {
1809
1839
  label,
@@ -1816,7 +1846,7 @@ var RadioField = /*#__PURE__*/forwardRef((_ref, ref) => {
1816
1846
  } = _ref,
1817
1847
  props = _objectWithoutProperties(_ref, _excluded$j);
1818
1848
 
1819
- return /*#__PURE__*/jsxs(FormControl, {
1849
+ return /*#__PURE__*/jsxs(FormControl$1, {
1820
1850
  error: error,
1821
1851
  children: [/*#__PURE__*/jsx(FormControlLabel$1, _objectSpread(_objectSpread({}, formControlLabelProps), {}, {
1822
1852
  label: label,
@@ -1827,7 +1857,7 @@ var RadioField = /*#__PURE__*/forwardRef((_ref, ref) => {
1827
1857
  ref: ref,
1828
1858
  color: "primary"
1829
1859
  }, props))
1830
- })), helperText && /*#__PURE__*/jsx(FormHelperText, {
1860
+ })), helperText && /*#__PURE__*/jsx(FormHelperText$2, {
1831
1861
  children: helperText
1832
1862
  })]
1833
1863
  });
@@ -1859,7 +1889,7 @@ var Content = /*#__PURE__*/styled.div.withConfig({
1859
1889
  var Caption = /*#__PURE__*/styled.div.withConfig({
1860
1890
  displayName: "RadioFieldCard__Caption",
1861
1891
  componentId: "SD__sc-5etge2-4"
1862
- })(["padding-left:32px;"]);
1892
+ })(["padding-left:30px;"]);
1863
1893
  var RadioFieldCard = /*#__PURE__*/forwardRef((_ref2, ref) => {
1864
1894
  var {
1865
1895
  name,
@@ -1914,6 +1944,14 @@ var RadioFieldCard = /*#__PURE__*/forwardRef((_ref2, ref) => {
1914
1944
  if (process.env.NODE_ENV !== "production") RadioFieldCard.displayName = "RadioFieldCard";
1915
1945
 
1916
1946
  var _excluded$l = ["name", "value", "onChange", "RadioGroupProps", "label", "FormLabelProps", "helperText", "FormHelperTextProps", "children"];
1947
+ var FormLabel$1 = /*#__PURE__*/styled(FormLabel$2).withConfig({
1948
+ displayName: "RadioGroupField__FormLabel",
1949
+ componentId: "SD__sc-1udxviq-0"
1950
+ })(["margin-bottom:8px;color:", ";font-weight:600;"], Color.Dark300);
1951
+ var FormHelperText$3 = /*#__PURE__*/styled(FormHelperText$4).withConfig({
1952
+ displayName: "RadioGroupField__FormHelperText",
1953
+ componentId: "SD__sc-1udxviq-1"
1954
+ })(["margin-top:8px;color:", ";&.Mui-error{color:", ";}"], Color.Dark300, Color.Red500);
1917
1955
  var RadioGroupField = /*#__PURE__*/forwardRef((_ref, ref) => {
1918
1956
  var {
1919
1957
  name,
@@ -1928,9 +1966,9 @@ var RadioGroupField = /*#__PURE__*/forwardRef((_ref, ref) => {
1928
1966
  } = _ref,
1929
1967
  formControlProps = _objectWithoutProperties(_ref, _excluded$l);
1930
1968
 
1931
- return /*#__PURE__*/jsxs(FormControl, _objectSpread(_objectSpread({}, formControlProps), {}, {
1969
+ return /*#__PURE__*/jsxs(FormControl$2, _objectSpread(_objectSpread({}, formControlProps), {}, {
1932
1970
  hiddenLabel: !label,
1933
- children: [!!label && /*#__PURE__*/jsx(FormLabel, _objectSpread(_objectSpread({}, formLabelProps), {}, {
1971
+ children: [!!label && /*#__PURE__*/jsx(FormLabel$1, _objectSpread(_objectSpread({}, formLabelProps), {}, {
1934
1972
  children: label
1935
1973
  })), /*#__PURE__*/jsx(RadioGroup, _objectSpread(_objectSpread({
1936
1974
  ref: ref
@@ -1939,7 +1977,7 @@ var RadioGroupField = /*#__PURE__*/forwardRef((_ref, ref) => {
1939
1977
  value: value,
1940
1978
  onChange: onChange,
1941
1979
  children: children
1942
- })), !!helperText && /*#__PURE__*/jsx(FormHelperText, _objectSpread(_objectSpread({}, formHelperTextProps), {}, {
1980
+ })), !!helperText && /*#__PURE__*/jsx(FormHelperText$3, _objectSpread(_objectSpread({}, formHelperTextProps), {}, {
1943
1981
  children: helperText
1944
1982
  }))]
1945
1983
  }));
@@ -2759,15 +2797,27 @@ function overrideCheckbox(theme) {
2759
2797
  theme.overrides.MuiCheckbox = {
2760
2798
  root: {
2761
2799
  color: Color.Dark100,
2762
- marginTop: theme.spacing(-0.625),
2763
- marginBottom: theme.spacing(-0.625)
2800
+ width: theme.spacing(3),
2801
+ height: theme.spacing(3),
2802
+ marginRight: theme.spacing(1),
2803
+ marginLeft: theme.spacing(1),
2804
+ marginTop: theme.spacing(0.5),
2805
+ marginBottom: theme.spacing(0.5),
2806
+ padding: 0,
2807
+ '&:hover': {
2808
+ backgroundColor: Color.Blue10
2809
+ },
2810
+ '&.MuiButtonBase-root': {
2811
+ borderRadius: theme.spacing(0.5)
2812
+ }
2764
2813
  },
2765
2814
  colorPrimary: {
2766
2815
  '&$checked$disabled': {
2767
2816
  color: Color.Silver500
2768
2817
  },
2769
2818
  '&:hover:not($checked)': {
2770
- color: Color.Dark100
2819
+ color: Color.Dark100,
2820
+ backgroundColor: Color.Blue10
2771
2821
  }
2772
2822
  }
2773
2823
  };
@@ -2818,16 +2868,16 @@ function overrideChip(theme) {
2818
2868
  boxShadow: undefined
2819
2869
  },
2820
2870
  '&:focus': {
2821
- boxShadow: "0 0 0 2px ".concat(Color.Silver300)
2871
+ boxShadow: "0 0 0 2px ".concat(Color.Dark30)
2822
2872
  },
2823
2873
  '&:active, &:hover': {
2824
- backgroundColor: Color.Silver300
2874
+ backgroundColor: Color.Silver400
2825
2875
  }
2826
2876
  },
2827
2877
  deletable: {
2828
2878
  '&:focus': {
2829
2879
  backgroundColor: undefined,
2830
- boxShadow: "0 0 0 2px ".concat(Color.Silver300)
2880
+ boxShadow: "0 0 0 2px ".concat(Color.Silver400)
2831
2881
  }
2832
2882
  },
2833
2883
  deleteIcon: {
@@ -2842,7 +2892,7 @@ function overrideChip(theme) {
2842
2892
  },
2843
2893
  '& > svg': {
2844
2894
  borderRadius: '50%',
2845
- color: Color.Dark200,
2895
+ color: Color.Dark100,
2846
2896
  fontSize: '1em'
2847
2897
  }
2848
2898
  },
@@ -2994,8 +3044,25 @@ function overrideLink(theme) {
2994
3044
  '&.MuiTypography-colorTextPrimary': {
2995
3045
  backgroundImage: line(Color.Silver500),
2996
3046
  '&:focus, &:hover, &:active': {
2997
- color: Color.Blue300,
2998
- backgroundImage: line(Color.Blue300)
3047
+ color: Color.Blue500,
3048
+ backgroundImage: line(Color.Blue500)
3049
+ }
3050
+ },
3051
+ '&.MuiTypography-colorError': {
3052
+ color: Color.Red500,
3053
+ backgroundImage: line(Color.Silver500),
3054
+ '&:focus, &:hover, &:active': {
3055
+ color: Color.Red500,
3056
+ backgroundImage: line(Color.Red500)
3057
+ }
3058
+ },
3059
+ '&.MuiTypography-colorTextSecondary': {
3060
+ cursor: 'not-allowed',
3061
+ color: Color.Dark100,
3062
+ backgroundImage: line(Color.Silver500),
3063
+ '&:focus, &:hover, &:active': {
3064
+ color: Color.Dark100,
3065
+ backgroundImage: line(Color.Silver500)
2999
3066
  }
3000
3067
  }
3001
3068
  },
@@ -3103,7 +3170,7 @@ function overrideRadio(theme) {
3103
3170
  children: /*#__PURE__*/jsx("circle", {
3104
3171
  cx: "12",
3105
3172
  cy: "12",
3106
- r: "8.5",
3173
+ r: "9",
3107
3174
  fill: Color.White,
3108
3175
  stroke: "currentColor"
3109
3176
  })
@@ -3112,7 +3179,7 @@ function overrideRadio(theme) {
3112
3179
  children: [/*#__PURE__*/jsx("circle", {
3113
3180
  cx: "12",
3114
3181
  cy: "12",
3115
- r: "8.5",
3182
+ r: "9",
3116
3183
  fill: "currentColor",
3117
3184
  stroke: "currentColor"
3118
3185
  }), /*#__PURE__*/jsx("circle", {
@@ -3126,8 +3193,13 @@ function overrideRadio(theme) {
3126
3193
  theme.overrides.MuiRadio = {
3127
3194
  root: {
3128
3195
  color: Color.Dark100,
3129
- marginTop: theme.spacing(-0.625),
3130
- marginBottom: theme.spacing(-0.625)
3196
+ width: theme.spacing(3),
3197
+ height: theme.spacing(3),
3198
+ marginRight: theme.spacing(1),
3199
+ marginLeft: theme.spacing(1),
3200
+ marginTop: theme.spacing(0.5),
3201
+ marginBottom: theme.spacing(0.5),
3202
+ padding: 0
3131
3203
  },
3132
3204
  colorPrimary: {
3133
3205
  '&$checked$disabled': {
@@ -3519,7 +3591,7 @@ function overrideTooltip(theme) {
3519
3591
  theme.overrides.MuiTooltip = {
3520
3592
  tooltip: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
3521
3593
  padding: theme.spacing(1, 1.5),
3522
- backgroundColor: Color.Dark400
3594
+ backgroundColor: Color.Dark500
3523
3595
  }),
3524
3596
  popperArrow: {
3525
3597
  '&[x-placement*="top"] $arrow': {
@@ -3544,7 +3616,7 @@ function overrideTooltip(theme) {
3544
3616
  }
3545
3617
  },
3546
3618
  arrow: {
3547
- color: Color.Dark400,
3619
+ color: Color.Dark500,
3548
3620
  fontSize: theme.spacing(1)
3549
3621
  }
3550
3622
  };