@superdispatch/ui 0.11.0 → 0.15.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
@@ -197,6 +197,12 @@ var Color;
197
197
  Color["Grey400"] = "#323C4E";
198
198
  Color["Grey450"] = "#222F44";
199
199
  Color["Grey500"] = "#192334";
200
+ Color["Dark100"] = "#8F949E";
201
+ Color["Dark200"] = "#6A707C";
202
+ Color["Dark300"] = "#5B6371";
203
+ Color["Dark400"] = "#323C4E";
204
+ Color["Dark450"] = "#222F44";
205
+ Color["Dark500"] = "#192334";
200
206
  Color["Silver100"] = "#F6F7F8";
201
207
  Color["Silver200"] = "#F3F5F8";
202
208
  Color["Silver300"] = "#E8ECF0";
@@ -418,7 +424,7 @@ var useStyles$2 = /*#__PURE__*/makeStyles(theme => ({
418
424
  transition: theme.transitions.create(['color', 'box-shadow', 'border-color', 'background-color'])
419
425
  },
420
426
  disabled: {
421
- color: Color.Grey200,
427
+ color: Color.Dark200,
422
428
  borderColor: Color.Silver500,
423
429
  backgroundColor: Color.Silver100
424
430
  },
@@ -967,7 +973,7 @@ var useStyles$4 = /*#__PURE__*/makeStyles(theme => ({
967
973
  display: 'inline-flex',
968
974
  marginRight: theme.spacing(1),
969
975
  '& > .MuiSvgIcon-root': {
970
- color: Color.Grey100,
976
+ color: Color.Dark100,
971
977
  fontSize: theme.spacing(3),
972
978
  [theme.breakpoints.up('sm')]: {
973
979
  fontSize: theme.spacing(2)
@@ -1333,19 +1339,29 @@ var InlineGrid = /*#__PURE__*/forwardRef((_ref, ref) => {
1333
1339
  });
1334
1340
  if (process.env.NODE_ENV !== "production") InlineGrid.displayName = "InlineGrid";
1335
1341
 
1336
- var _excluded$f = ["size", "square", "classes", "children", "className", "CardContentProps"],
1337
- _excluded2$2 = ["content", "sizeLarge", "fullWidth"];
1342
+ function mergeRefs() {
1343
+ for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
1344
+ refs[_key] = arguments[_key];
1345
+ }
1338
1346
 
1347
+ return node => {
1348
+ refs.forEach(ref => {
1349
+ assignRef(ref, node);
1350
+ });
1351
+ };
1352
+ }
1339
1353
  function assignRef(ref, value) {
1340
1354
  if (ref) {
1341
- if (typeof ref === 'object') {
1342
- ref.current = value;
1343
- } else {
1355
+ if (typeof ref === 'function') {
1344
1356
  ref(value);
1357
+ } else {
1358
+ ref.current = value;
1345
1359
  }
1346
1360
  }
1347
1361
  }
1348
1362
 
1363
+ var _excluded$f = ["size", "square", "classes", "children", "className", "CardContentProps"],
1364
+ _excluded2$2 = ["content", "sizeLarge", "fullWidth"];
1349
1365
  var useStyles$9 = /*#__PURE__*/makeStyles(theme => ({
1350
1366
  root: {
1351
1367
  '&$fullWidth': {
@@ -1539,7 +1555,7 @@ var _excluded$i = ["action", "children", "onClose", "className", "classes", "var
1539
1555
  var useStyles$a = /*#__PURE__*/makeStyles(theme => ({
1540
1556
  root: {
1541
1557
  color: Color.White,
1542
- backgroundColor: Color.Grey500,
1558
+ backgroundColor: Color.Dark500,
1543
1559
  '&$variantError': {
1544
1560
  color: Color.White,
1545
1561
  backgroundColor: Color.Red500
@@ -1820,7 +1836,7 @@ var Stack = /*#__PURE__*/forwardRef((_ref2, ref) => {
1820
1836
  });
1821
1837
  if (process.env.NODE_ENV !== "production") Stack.displayName = "Stack";
1822
1838
 
1823
- var _excluded$l = ["color", "variant", "children", "classes", "className", "noWrap", "component"];
1839
+ var _excluded$l = ["color", "variant", "children", "classes", "className", "noWrap", "fontWeight", "component"];
1824
1840
  var useStyles$b = /*#__PURE__*/makeStyles(theme => ({
1825
1841
  root: {
1826
1842
  maxWidth: '100%',
@@ -1831,7 +1847,7 @@ var useStyles$b = /*#__PURE__*/makeStyles(theme => ({
1831
1847
  },
1832
1848
  variantSubtle: {
1833
1849
  '&$colorGrey': {
1834
- color: Color.Grey300,
1850
+ color: Color.Dark300,
1835
1851
  backgroundColor: Color.Silver200
1836
1852
  },
1837
1853
  '&$colorBlue': {
@@ -1862,7 +1878,7 @@ var useStyles$b = /*#__PURE__*/makeStyles(theme => ({
1862
1878
  variantBold: {
1863
1879
  color: Color.White,
1864
1880
  '&$colorGrey': {
1865
- backgroundColor: Color.Grey300
1881
+ backgroundColor: Color.Dark300
1866
1882
  },
1867
1883
  '&$colorBlue': {
1868
1884
  backgroundColor: Color.Blue500
@@ -1901,6 +1917,7 @@ var Tag = /*#__PURE__*/forwardRef((_ref, ref) => {
1901
1917
  classes,
1902
1918
  className,
1903
1919
  noWrap = true,
1920
+ fontWeight = 'bold',
1904
1921
  component = 'div'
1905
1922
  } = _ref,
1906
1923
  props = _objectWithoutProperties(_ref, _excluded$l);
@@ -1910,9 +1927,9 @@ var Tag = /*#__PURE__*/forwardRef((_ref, ref) => {
1910
1927
  });
1911
1928
  return /*#__PURE__*/jsx(Typography, _objectSpread(_objectSpread({}, props), {}, {
1912
1929
  ref: ref,
1913
- variant: "body1",
1914
1930
  noWrap: noWrap,
1915
1931
  component: component,
1932
+ variant: fontWeight === 'bold' ? 'body1' : 'body2',
1916
1933
  className: clsx(styles.root, className, {
1917
1934
  'grey': styles.colorGrey,
1918
1935
  'blue': styles.colorBlue,
@@ -2014,7 +2031,7 @@ function overrideAvatar(theme) {
2014
2031
  }
2015
2032
  }),
2016
2033
  colorDefault: {
2017
- color: Color.Grey300,
2034
+ color: Color.Dark300,
2018
2035
  backgroundColor: Color.Silver300
2019
2036
  }
2020
2037
  };
@@ -2209,7 +2226,7 @@ function overrideButton(theme) {
2209
2226
  '&[data-color="success"]': outlinedVariant(Color.Green300, Color.Green300, Color.Green100, Color.Green100, Color.Green300, Color.Green300, Color.Green100, Color.Green50, Color.Green300, Color.White),
2210
2227
  '&[data-color="white"]': outlinedVariant(Color.White, Color.White50, Color.White50, Color.White40, Color.White, Color.White50, Color.White40, Color.White10, Color.White50, Color.Transparent)
2211
2228
  },
2212
- outlinedPrimary: outlinedVariant(Color.Grey500, Color.Silver500, Color.Silver500, Color.Silver400, Color.Blue300, Color.Blue300, Color.Blue100, Color.Blue50, Color.Grey200, Color.White),
2229
+ outlinedPrimary: outlinedVariant(Color.Dark500, Color.Silver500, Color.Silver500, Color.Silver400, Color.Blue300, Color.Blue300, Color.Blue100, Color.Blue50, Color.Dark200, Color.White),
2213
2230
  outlinedSizeSmall: {
2214
2231
  padding: undefined,
2215
2232
  fontSize: undefined
@@ -2315,7 +2332,7 @@ function overrideCheckbox(theme) {
2315
2332
  };
2316
2333
  theme.overrides.MuiCheckbox = {
2317
2334
  root: {
2318
- color: Color.Grey100,
2335
+ color: Color.Dark100,
2319
2336
  marginTop: theme.spacing(-0.625),
2320
2337
  marginBottom: theme.spacing(-0.625)
2321
2338
  },
@@ -2324,7 +2341,7 @@ function overrideCheckbox(theme) {
2324
2341
  color: Color.Silver500
2325
2342
  },
2326
2343
  '&:hover:not($checked)': {
2327
- color: Color.Grey100
2344
+ color: Color.Dark100
2328
2345
  }
2329
2346
  }
2330
2347
  };
@@ -2353,7 +2370,7 @@ function overrideChip(theme) {
2353
2370
  backgroundColor: Color.Silver200,
2354
2371
  '&$disabled': {
2355
2372
  opacity: undefined,
2356
- color: Color.Grey100
2373
+ color: Color.Dark100
2357
2374
  }
2358
2375
  }),
2359
2376
  sizeSmall: {
@@ -2399,7 +2416,7 @@ function overrideChip(theme) {
2399
2416
  },
2400
2417
  '& > svg': {
2401
2418
  borderRadius: '50%',
2402
- color: Color.Grey200,
2419
+ color: Color.Dark200,
2403
2420
  fontSize: '1em'
2404
2421
  }
2405
2422
  },
@@ -2414,7 +2431,7 @@ function overrideChip(theme) {
2414
2431
  }
2415
2432
  },
2416
2433
  icon: {
2417
- color: Color.Grey100,
2434
+ color: Color.Dark100,
2418
2435
  fontSize: '1em',
2419
2436
  marginRight: undefined
2420
2437
  },
@@ -2437,6 +2454,14 @@ function overrideDialog(theme) {
2437
2454
  theme.overrides.MuiDialog = {
2438
2455
  paper: {
2439
2456
  margin: theme.spacing(3)
2457
+ },
2458
+ paperWidthXs: {
2459
+ maxWidth: Math.max(theme.breakpoints.values.xs, 360),
2460
+ '&$paperScrollBody': {
2461
+ [theme.breakpoints.down(Math.max(theme.breakpoints.values.xs, 360) + 32 * 2)]: {
2462
+ maxWidth: 'calc(100% - 64px)'
2463
+ }
2464
+ }
2440
2465
  }
2441
2466
  };
2442
2467
  theme.overrides.MuiDialogTitle = {
@@ -2478,7 +2503,7 @@ function overrideDrawer(theme) {
2478
2503
  function overrideIconButton(theme) {
2479
2504
  theme.overrides.MuiIconButton = {
2480
2505
  root: {
2481
- color: Color.Grey100,
2506
+ color: Color.Dark100,
2482
2507
  backgroundColor: Color.Transparent,
2483
2508
  transition: theme.transitions.create(['color', 'background-color'], {
2484
2509
  duration: theme.transitions.duration.short
@@ -2487,10 +2512,10 @@ function overrideIconButton(theme) {
2487
2512
  backgroundColor: Color.Transparent
2488
2513
  },
2489
2514
  '&:active': {
2490
- color: Color.Grey500
2515
+ color: Color.Dark500
2491
2516
  },
2492
2517
  '&:hover ': {
2493
- color: Color.Grey300
2518
+ color: Color.Dark300
2494
2519
  },
2495
2520
  '&:focus': {
2496
2521
  backgroundColor: Color.Silver400
@@ -2598,7 +2623,7 @@ function overridePagination(theme) {
2598
2623
  var props = {};
2599
2624
  var overrides = {
2600
2625
  root: {
2601
- color: Color.Grey400
2626
+ color: Color.Dark400
2602
2627
  },
2603
2628
  page: {
2604
2629
  '&:hover': {
@@ -2615,13 +2640,13 @@ function overridePagination(theme) {
2615
2640
  backgroundColor: Color.Silver400
2616
2641
  },
2617
2642
  '&$disabled': {
2618
- color: Color.Grey100,
2643
+ color: Color.Dark100,
2619
2644
  backgroundColor: Color.Silver400
2620
2645
  }
2621
2646
  },
2622
2647
  '&$disabled': {
2623
2648
  opacity: undefined,
2624
- color: Color.Grey100
2649
+ color: Color.Dark100
2625
2650
  }
2626
2651
  }
2627
2652
  }; // Remove `Object.assign` after official release of `PaginationItem`.
@@ -2674,7 +2699,7 @@ function overrideRadio(theme) {
2674
2699
  };
2675
2700
  theme.overrides.MuiRadio = {
2676
2701
  root: {
2677
- color: Color.Grey100,
2702
+ color: Color.Dark100,
2678
2703
  marginTop: theme.spacing(-0.625),
2679
2704
  marginBottom: theme.spacing(-0.625)
2680
2705
  },
@@ -2683,7 +2708,7 @@ function overrideRadio(theme) {
2683
2708
  color: Color.Silver500
2684
2709
  },
2685
2710
  '&:hover:not($checked)': {
2686
- color: Color.Grey100
2711
+ color: Color.Dark100
2687
2712
  }
2688
2713
  }
2689
2714
  };
@@ -2735,7 +2760,7 @@ function overrideSvgIcon(theme) {
2735
2760
  fontSize: 'var(--mui-svg-icon-size, 32px)'
2736
2761
  },
2737
2762
  colorAction: {
2738
- color: Color.Grey100
2763
+ color: Color.Dark100
2739
2764
  }
2740
2765
  };
2741
2766
  }
@@ -2818,7 +2843,7 @@ function overrideSwitch(theme) {
2818
2843
  backgroundColor: Color.Blue100
2819
2844
  },
2820
2845
  '&:hover + $track': {
2821
- backgroundColor: Color.Grey100
2846
+ backgroundColor: Color.Dark100
2822
2847
  },
2823
2848
  '&.Mui-focusVisible + $track': {
2824
2849
  boxShadow: "0 0 0 3px ".concat(Color.Blue100)
@@ -2839,7 +2864,7 @@ function overrideTabs(theme) {
2839
2864
  },
2840
2865
  scrollButtons: {
2841
2866
  opacity: 1,
2842
- color: Color.Grey100,
2867
+ color: Color.Dark100,
2843
2868
  width: theme.spacing(4),
2844
2869
  transition: theme.transitions.create('opacity', {
2845
2870
  duration: theme.transitions.duration.short
@@ -2859,7 +2884,7 @@ function overrideTabs(theme) {
2859
2884
  }
2860
2885
  }),
2861
2886
  textColorPrimary: {
2862
- color: Color.Grey500,
2887
+ color: Color.Dark500,
2863
2888
  '&:hover, &:focus': {
2864
2889
  color: Color.Blue300
2865
2890
  }
@@ -2885,7 +2910,7 @@ function overrideTextField(theme) {
2885
2910
  };
2886
2911
  theme.overrides.MuiFormLabel = {
2887
2912
  root: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
2888
- color: Color.Grey400,
2913
+ color: Color.Dark400,
2889
2914
  '&$error': {
2890
2915
  color: undefined
2891
2916
  },
@@ -2980,7 +3005,7 @@ function overrideTextField(theme) {
2980
3005
  icon: {
2981
3006
  top: 'calc(50% - 0.5em)',
2982
3007
  '$disabled &': {
2983
- color: Color.Grey100
3008
+ color: Color.Dark100
2984
3009
  },
2985
3010
  fontSize: theme.spacing(3),
2986
3011
  [sm]: {
@@ -3068,7 +3093,7 @@ function overrideTooltip(theme) {
3068
3093
  theme.overrides.MuiTooltip = {
3069
3094
  tooltip: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
3070
3095
  padding: theme.spacing(1, 1.5),
3071
- backgroundColor: Color.Grey400
3096
+ backgroundColor: Color.Dark400
3072
3097
  }),
3073
3098
  popperArrow: {
3074
3099
  '&[x-placement*="top"] $arrow': {
@@ -3093,7 +3118,7 @@ function overrideTooltip(theme) {
3093
3118
  }
3094
3119
  },
3095
3120
  arrow: {
3096
- color: Color.Grey400,
3121
+ color: Color.Dark400,
3097
3122
  fontSize: theme.spacing(1)
3098
3123
  }
3099
3124
  };
@@ -3226,10 +3251,10 @@ function createSuperDispatchTheme() {
3226
3251
  disabled: Color.Silver400
3227
3252
  },
3228
3253
  text: {
3229
- primary: Color.Grey500,
3230
- secondary: Color.Grey200,
3231
- hint: Color.Grey100,
3232
- disabled: Color.Grey100
3254
+ primary: Color.Dark500,
3255
+ secondary: Color.Dark200,
3256
+ hint: Color.Dark100,
3257
+ disabled: Color.Dark100
3233
3258
  },
3234
3259
  divider: Color.Silver400
3235
3260
  },
@@ -3408,23 +3433,5 @@ var Tiles = /*#__PURE__*/forwardRef((_ref, ref) => {
3408
3433
  });
3409
3434
  if (process.env.NODE_ENV !== "production") Tiles.displayName = "Tiles";
3410
3435
 
3411
- function mergeRefs() {
3412
- for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
3413
- refs[_key] = arguments[_key];
3414
- }
3415
-
3416
- return node => {
3417
- refs.forEach(ref => {
3418
- if (ref) {
3419
- if (typeof ref === 'function') {
3420
- ref(node);
3421
- } else {
3422
- ref.current = node;
3423
- }
3424
- }
3425
- });
3426
- };
3427
- }
3428
-
3429
- export { AdaptiveToolbar, AvatarButton, Button, CardButton, CheckboxField, CheckboxGroupField, Color, Column, Columns, DescriptionList, DescriptionListItem, DrawerActions, DrawerContent, DrawerList, DrawerTitle, GridStack, InfoCard, Inline, InlineGrid, OverflowText, RadioField, RadioGroupField, ResponsiveContextProvider, Snackbar, SnackbarContent, SnackbarStackConsumer, SnackbarStackProvider, Stack, Tag, ThemeProvider, Tiles, VisibilityObserver, isColorProp, isEmptyReactNode, mergeRefs, parseAlignProp, parseCollapsedBelow, parseResponsiveProp, parseSpaceProp, renderChildren, useCollapseBreakpoint, useResponsiveContext, useResponsiveProp, useResponsivePropRecord, useResponsiveValue, useSnackbarStack, useUID, useVisibilityObserver };
3436
+ export { AdaptiveToolbar, AvatarButton, Button, CardButton, CheckboxField, CheckboxGroupField, Color, Column, Columns, DescriptionList, DescriptionListItem, DrawerActions, DrawerContent, DrawerList, DrawerTitle, GridStack, InfoCard, Inline, InlineGrid, OverflowText, RadioField, RadioGroupField, ResponsiveContextProvider, Snackbar, SnackbarContent, SnackbarStackConsumer, SnackbarStackProvider, Stack, Tag, ThemeProvider, Tiles, VisibilityObserver, assignRef, isColorProp, isEmptyReactNode, mergeRefs, parseAlignProp, parseCollapsedBelow, parseResponsiveProp, parseSpaceProp, renderChildren, useCollapseBreakpoint, useResponsiveContext, useResponsiveProp, useResponsivePropRecord, useResponsiveValue, useSnackbarStack, useUID, useVisibilityObserver };
3430
3437
  //# sourceMappingURL=index.js.map