@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.
@@ -202,6 +202,12 @@ if (process.env.NODE_ENV !== "production") AdaptiveToolbar.displayName = "Adapti
202
202
  Color["Grey400"] = "#323C4E";
203
203
  Color["Grey450"] = "#222F44";
204
204
  Color["Grey500"] = "#192334";
205
+ Color["Dark100"] = "#8F949E";
206
+ Color["Dark200"] = "#6A707C";
207
+ Color["Dark300"] = "#5B6371";
208
+ Color["Dark400"] = "#323C4E";
209
+ Color["Dark450"] = "#222F44";
210
+ Color["Dark500"] = "#192334";
205
211
  Color["Silver100"] = "#F6F7F8";
206
212
  Color["Silver200"] = "#F3F5F8";
207
213
  Color["Silver300"] = "#E8ECF0";
@@ -423,7 +429,7 @@ var useStyles$2 = /*#__PURE__*/styles.makeStyles(theme => ({
423
429
  transition: theme.transitions.create(['color', 'box-shadow', 'border-color', 'background-color'])
424
430
  },
425
431
  disabled: {
426
- color: exports.Color.Grey200,
432
+ color: exports.Color.Dark200,
427
433
  borderColor: exports.Color.Silver500,
428
434
  backgroundColor: exports.Color.Silver100
429
435
  },
@@ -972,7 +978,7 @@ var useStyles$4 = /*#__PURE__*/styles.makeStyles(theme => ({
972
978
  display: 'inline-flex',
973
979
  marginRight: theme.spacing(1),
974
980
  '& > .MuiSvgIcon-root': {
975
- color: exports.Color.Grey100,
981
+ color: exports.Color.Dark100,
976
982
  fontSize: theme.spacing(3),
977
983
  [theme.breakpoints.up('sm')]: {
978
984
  fontSize: theme.spacing(2)
@@ -1338,19 +1344,29 @@ var InlineGrid = /*#__PURE__*/react.forwardRef((_ref, ref) => {
1338
1344
  });
1339
1345
  if (process.env.NODE_ENV !== "production") InlineGrid.displayName = "InlineGrid";
1340
1346
 
1341
- var _excluded$f = ["size", "square", "classes", "children", "className", "CardContentProps"],
1342
- _excluded2$2 = ["content", "sizeLarge", "fullWidth"];
1347
+ function mergeRefs() {
1348
+ for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
1349
+ refs[_key] = arguments[_key];
1350
+ }
1343
1351
 
1352
+ return node => {
1353
+ refs.forEach(ref => {
1354
+ assignRef(ref, node);
1355
+ });
1356
+ };
1357
+ }
1344
1358
  function assignRef(ref, value) {
1345
1359
  if (ref) {
1346
- if (typeof ref === 'object') {
1347
- ref.current = value;
1348
- } else {
1360
+ if (typeof ref === 'function') {
1349
1361
  ref(value);
1362
+ } else {
1363
+ ref.current = value;
1350
1364
  }
1351
1365
  }
1352
1366
  }
1353
1367
 
1368
+ var _excluded$f = ["size", "square", "classes", "children", "className", "CardContentProps"],
1369
+ _excluded2$2 = ["content", "sizeLarge", "fullWidth"];
1354
1370
  var useStyles$9 = /*#__PURE__*/styles.makeStyles(theme => ({
1355
1371
  root: {
1356
1372
  '&$fullWidth': {
@@ -1544,7 +1560,7 @@ var _excluded$i = ["action", "children", "onClose", "className", "classes", "var
1544
1560
  var useStyles$a = /*#__PURE__*/styles.makeStyles(theme => ({
1545
1561
  root: {
1546
1562
  color: exports.Color.White,
1547
- backgroundColor: exports.Color.Grey500,
1563
+ backgroundColor: exports.Color.Dark500,
1548
1564
  '&$variantError': {
1549
1565
  color: exports.Color.White,
1550
1566
  backgroundColor: exports.Color.Red500
@@ -1825,7 +1841,7 @@ var Stack = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
1825
1841
  });
1826
1842
  if (process.env.NODE_ENV !== "production") Stack.displayName = "Stack";
1827
1843
 
1828
- var _excluded$l = ["color", "variant", "children", "classes", "className", "noWrap", "component"];
1844
+ var _excluded$l = ["color", "variant", "children", "classes", "className", "noWrap", "fontWeight", "component"];
1829
1845
  var useStyles$b = /*#__PURE__*/styles.makeStyles(theme => ({
1830
1846
  root: {
1831
1847
  maxWidth: '100%',
@@ -1836,7 +1852,7 @@ var useStyles$b = /*#__PURE__*/styles.makeStyles(theme => ({
1836
1852
  },
1837
1853
  variantSubtle: {
1838
1854
  '&$colorGrey': {
1839
- color: exports.Color.Grey300,
1855
+ color: exports.Color.Dark300,
1840
1856
  backgroundColor: exports.Color.Silver200
1841
1857
  },
1842
1858
  '&$colorBlue': {
@@ -1867,7 +1883,7 @@ var useStyles$b = /*#__PURE__*/styles.makeStyles(theme => ({
1867
1883
  variantBold: {
1868
1884
  color: exports.Color.White,
1869
1885
  '&$colorGrey': {
1870
- backgroundColor: exports.Color.Grey300
1886
+ backgroundColor: exports.Color.Dark300
1871
1887
  },
1872
1888
  '&$colorBlue': {
1873
1889
  backgroundColor: exports.Color.Blue500
@@ -1906,6 +1922,7 @@ var Tag = /*#__PURE__*/react.forwardRef((_ref, ref) => {
1906
1922
  classes,
1907
1923
  className,
1908
1924
  noWrap = true,
1925
+ fontWeight = 'bold',
1909
1926
  component = 'div'
1910
1927
  } = _ref,
1911
1928
  props = _objectWithoutProperties(_ref, _excluded$l);
@@ -1915,9 +1932,9 @@ var Tag = /*#__PURE__*/react.forwardRef((_ref, ref) => {
1915
1932
  });
1916
1933
  return /*#__PURE__*/jsxRuntime.jsx(core.Typography, _objectSpread(_objectSpread({}, props), {}, {
1917
1934
  ref: ref,
1918
- variant: "body1",
1919
1935
  noWrap: noWrap,
1920
1936
  component: component,
1937
+ variant: fontWeight === 'bold' ? 'body1' : 'body2',
1921
1938
  className: clsx(styles.root, className, {
1922
1939
  'grey': styles.colorGrey,
1923
1940
  'blue': styles.colorBlue,
@@ -2019,7 +2036,7 @@ function overrideAvatar(theme) {
2019
2036
  }
2020
2037
  }),
2021
2038
  colorDefault: {
2022
- color: exports.Color.Grey300,
2039
+ color: exports.Color.Dark300,
2023
2040
  backgroundColor: exports.Color.Silver300
2024
2041
  }
2025
2042
  };
@@ -2214,7 +2231,7 @@ function overrideButton(theme) {
2214
2231
  '&[data-color="success"]': outlinedVariant(exports.Color.Green300, exports.Color.Green300, exports.Color.Green100, exports.Color.Green100, exports.Color.Green300, exports.Color.Green300, exports.Color.Green100, exports.Color.Green50, exports.Color.Green300, exports.Color.White),
2215
2232
  '&[data-color="white"]': outlinedVariant(exports.Color.White, exports.Color.White50, exports.Color.White50, exports.Color.White40, exports.Color.White, exports.Color.White50, exports.Color.White40, exports.Color.White10, exports.Color.White50, exports.Color.Transparent)
2216
2233
  },
2217
- outlinedPrimary: outlinedVariant(exports.Color.Grey500, exports.Color.Silver500, exports.Color.Silver500, exports.Color.Silver400, exports.Color.Blue300, exports.Color.Blue300, exports.Color.Blue100, exports.Color.Blue50, exports.Color.Grey200, exports.Color.White),
2234
+ outlinedPrimary: outlinedVariant(exports.Color.Dark500, exports.Color.Silver500, exports.Color.Silver500, exports.Color.Silver400, exports.Color.Blue300, exports.Color.Blue300, exports.Color.Blue100, exports.Color.Blue50, exports.Color.Dark200, exports.Color.White),
2218
2235
  outlinedSizeSmall: {
2219
2236
  padding: undefined,
2220
2237
  fontSize: undefined
@@ -2320,7 +2337,7 @@ function overrideCheckbox(theme) {
2320
2337
  };
2321
2338
  theme.overrides.MuiCheckbox = {
2322
2339
  root: {
2323
- color: exports.Color.Grey100,
2340
+ color: exports.Color.Dark100,
2324
2341
  marginTop: theme.spacing(-0.625),
2325
2342
  marginBottom: theme.spacing(-0.625)
2326
2343
  },
@@ -2329,7 +2346,7 @@ function overrideCheckbox(theme) {
2329
2346
  color: exports.Color.Silver500
2330
2347
  },
2331
2348
  '&:hover:not($checked)': {
2332
- color: exports.Color.Grey100
2349
+ color: exports.Color.Dark100
2333
2350
  }
2334
2351
  }
2335
2352
  };
@@ -2358,7 +2375,7 @@ function overrideChip(theme) {
2358
2375
  backgroundColor: exports.Color.Silver200,
2359
2376
  '&$disabled': {
2360
2377
  opacity: undefined,
2361
- color: exports.Color.Grey100
2378
+ color: exports.Color.Dark100
2362
2379
  }
2363
2380
  }),
2364
2381
  sizeSmall: {
@@ -2404,7 +2421,7 @@ function overrideChip(theme) {
2404
2421
  },
2405
2422
  '& > svg': {
2406
2423
  borderRadius: '50%',
2407
- color: exports.Color.Grey200,
2424
+ color: exports.Color.Dark200,
2408
2425
  fontSize: '1em'
2409
2426
  }
2410
2427
  },
@@ -2419,7 +2436,7 @@ function overrideChip(theme) {
2419
2436
  }
2420
2437
  },
2421
2438
  icon: {
2422
- color: exports.Color.Grey100,
2439
+ color: exports.Color.Dark100,
2423
2440
  fontSize: '1em',
2424
2441
  marginRight: undefined
2425
2442
  },
@@ -2442,6 +2459,14 @@ function overrideDialog(theme) {
2442
2459
  theme.overrides.MuiDialog = {
2443
2460
  paper: {
2444
2461
  margin: theme.spacing(3)
2462
+ },
2463
+ paperWidthXs: {
2464
+ maxWidth: Math.max(theme.breakpoints.values.xs, 360),
2465
+ '&$paperScrollBody': {
2466
+ [theme.breakpoints.down(Math.max(theme.breakpoints.values.xs, 360) + 32 * 2)]: {
2467
+ maxWidth: 'calc(100% - 64px)'
2468
+ }
2469
+ }
2445
2470
  }
2446
2471
  };
2447
2472
  theme.overrides.MuiDialogTitle = {
@@ -2483,7 +2508,7 @@ function overrideDrawer(theme) {
2483
2508
  function overrideIconButton(theme) {
2484
2509
  theme.overrides.MuiIconButton = {
2485
2510
  root: {
2486
- color: exports.Color.Grey100,
2511
+ color: exports.Color.Dark100,
2487
2512
  backgroundColor: exports.Color.Transparent,
2488
2513
  transition: theme.transitions.create(['color', 'background-color'], {
2489
2514
  duration: theme.transitions.duration.short
@@ -2492,10 +2517,10 @@ function overrideIconButton(theme) {
2492
2517
  backgroundColor: exports.Color.Transparent
2493
2518
  },
2494
2519
  '&:active': {
2495
- color: exports.Color.Grey500
2520
+ color: exports.Color.Dark500
2496
2521
  },
2497
2522
  '&:hover ': {
2498
- color: exports.Color.Grey300
2523
+ color: exports.Color.Dark300
2499
2524
  },
2500
2525
  '&:focus': {
2501
2526
  backgroundColor: exports.Color.Silver400
@@ -2603,7 +2628,7 @@ function overridePagination(theme) {
2603
2628
  var props = {};
2604
2629
  var overrides = {
2605
2630
  root: {
2606
- color: exports.Color.Grey400
2631
+ color: exports.Color.Dark400
2607
2632
  },
2608
2633
  page: {
2609
2634
  '&:hover': {
@@ -2620,13 +2645,13 @@ function overridePagination(theme) {
2620
2645
  backgroundColor: exports.Color.Silver400
2621
2646
  },
2622
2647
  '&$disabled': {
2623
- color: exports.Color.Grey100,
2648
+ color: exports.Color.Dark100,
2624
2649
  backgroundColor: exports.Color.Silver400
2625
2650
  }
2626
2651
  },
2627
2652
  '&$disabled': {
2628
2653
  opacity: undefined,
2629
- color: exports.Color.Grey100
2654
+ color: exports.Color.Dark100
2630
2655
  }
2631
2656
  }
2632
2657
  }; // Remove `Object.assign` after official release of `PaginationItem`.
@@ -2679,7 +2704,7 @@ function overrideRadio(theme) {
2679
2704
  };
2680
2705
  theme.overrides.MuiRadio = {
2681
2706
  root: {
2682
- color: exports.Color.Grey100,
2707
+ color: exports.Color.Dark100,
2683
2708
  marginTop: theme.spacing(-0.625),
2684
2709
  marginBottom: theme.spacing(-0.625)
2685
2710
  },
@@ -2688,7 +2713,7 @@ function overrideRadio(theme) {
2688
2713
  color: exports.Color.Silver500
2689
2714
  },
2690
2715
  '&:hover:not($checked)': {
2691
- color: exports.Color.Grey100
2716
+ color: exports.Color.Dark100
2692
2717
  }
2693
2718
  }
2694
2719
  };
@@ -2740,7 +2765,7 @@ function overrideSvgIcon(theme) {
2740
2765
  fontSize: 'var(--mui-svg-icon-size, 32px)'
2741
2766
  },
2742
2767
  colorAction: {
2743
- color: exports.Color.Grey100
2768
+ color: exports.Color.Dark100
2744
2769
  }
2745
2770
  };
2746
2771
  }
@@ -2823,7 +2848,7 @@ function overrideSwitch(theme) {
2823
2848
  backgroundColor: exports.Color.Blue100
2824
2849
  },
2825
2850
  '&:hover + $track': {
2826
- backgroundColor: exports.Color.Grey100
2851
+ backgroundColor: exports.Color.Dark100
2827
2852
  },
2828
2853
  '&.Mui-focusVisible + $track': {
2829
2854
  boxShadow: "0 0 0 3px ".concat(exports.Color.Blue100)
@@ -2844,7 +2869,7 @@ function overrideTabs(theme) {
2844
2869
  },
2845
2870
  scrollButtons: {
2846
2871
  opacity: 1,
2847
- color: exports.Color.Grey100,
2872
+ color: exports.Color.Dark100,
2848
2873
  width: theme.spacing(4),
2849
2874
  transition: theme.transitions.create('opacity', {
2850
2875
  duration: theme.transitions.duration.short
@@ -2864,7 +2889,7 @@ function overrideTabs(theme) {
2864
2889
  }
2865
2890
  }),
2866
2891
  textColorPrimary: {
2867
- color: exports.Color.Grey500,
2892
+ color: exports.Color.Dark500,
2868
2893
  '&:hover, &:focus': {
2869
2894
  color: exports.Color.Blue300
2870
2895
  }
@@ -2890,7 +2915,7 @@ function overrideTextField(theme) {
2890
2915
  };
2891
2916
  theme.overrides.MuiFormLabel = {
2892
2917
  root: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
2893
- color: exports.Color.Grey400,
2918
+ color: exports.Color.Dark400,
2894
2919
  '&$error': {
2895
2920
  color: undefined
2896
2921
  },
@@ -2985,7 +3010,7 @@ function overrideTextField(theme) {
2985
3010
  icon: {
2986
3011
  top: 'calc(50% - 0.5em)',
2987
3012
  '$disabled &': {
2988
- color: exports.Color.Grey100
3013
+ color: exports.Color.Dark100
2989
3014
  },
2990
3015
  fontSize: theme.spacing(3),
2991
3016
  [sm]: {
@@ -3073,7 +3098,7 @@ function overrideTooltip(theme) {
3073
3098
  theme.overrides.MuiTooltip = {
3074
3099
  tooltip: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
3075
3100
  padding: theme.spacing(1, 1.5),
3076
- backgroundColor: exports.Color.Grey400
3101
+ backgroundColor: exports.Color.Dark400
3077
3102
  }),
3078
3103
  popperArrow: {
3079
3104
  '&[x-placement*="top"] $arrow': {
@@ -3098,7 +3123,7 @@ function overrideTooltip(theme) {
3098
3123
  }
3099
3124
  },
3100
3125
  arrow: {
3101
- color: exports.Color.Grey400,
3126
+ color: exports.Color.Dark400,
3102
3127
  fontSize: theme.spacing(1)
3103
3128
  }
3104
3129
  };
@@ -3231,10 +3256,10 @@ function createSuperDispatchTheme() {
3231
3256
  disabled: exports.Color.Silver400
3232
3257
  },
3233
3258
  text: {
3234
- primary: exports.Color.Grey500,
3235
- secondary: exports.Color.Grey200,
3236
- hint: exports.Color.Grey100,
3237
- disabled: exports.Color.Grey100
3259
+ primary: exports.Color.Dark500,
3260
+ secondary: exports.Color.Dark200,
3261
+ hint: exports.Color.Dark100,
3262
+ disabled: exports.Color.Dark100
3238
3263
  },
3239
3264
  divider: exports.Color.Silver400
3240
3265
  },
@@ -3413,24 +3438,6 @@ var Tiles = /*#__PURE__*/react.forwardRef((_ref, ref) => {
3413
3438
  });
3414
3439
  if (process.env.NODE_ENV !== "production") Tiles.displayName = "Tiles";
3415
3440
 
3416
- function mergeRefs() {
3417
- for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
3418
- refs[_key] = arguments[_key];
3419
- }
3420
-
3421
- return node => {
3422
- refs.forEach(ref => {
3423
- if (ref) {
3424
- if (typeof ref === 'function') {
3425
- ref(node);
3426
- } else {
3427
- ref.current = node;
3428
- }
3429
- }
3430
- });
3431
- };
3432
- }
3433
-
3434
3441
  exports.AdaptiveToolbar = AdaptiveToolbar;
3435
3442
  exports.AvatarButton = AvatarButton;
3436
3443
  exports.Button = Button;
@@ -3462,6 +3469,7 @@ exports.Tag = Tag;
3462
3469
  exports.ThemeProvider = ThemeProvider;
3463
3470
  exports.Tiles = Tiles;
3464
3471
  exports.VisibilityObserver = VisibilityObserver;
3472
+ exports.assignRef = assignRef;
3465
3473
  exports.isColorProp = isColorProp;
3466
3474
  exports.isEmptyReactNode = isEmptyReactNode;
3467
3475
  exports.mergeRefs = mergeRefs;