@superdispatch/ui 0.15.0 → 0.18.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,14 +1,14 @@
1
1
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
- import { ResizeObserver } from '@juggle/resize-observer';
4
- import { Button as Button$1, CircularProgress, Toolbar, Grid, Typography, Menu, MenuItem, ButtonBase, Avatar, FormControl, FormControlLabel, Checkbox, FormHelperText, FormLabel, FormGroup, useMediaQuery, Tooltip, SvgIcon, AppBar, List, Card, CardContent, Radio, RadioGroup, SnackbarContent as SnackbarContent$1, IconButton, 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, FormControl, FormControlLabel, Checkbox, FormHelperText, FormLabel, FormGroup, useMediaQuery, Tooltip, SvgIcon, AppBar, List, Card, CardContent, Radio, RadioGroup, SnackbarContent as SnackbarContent$1, IconButton, Portal, Snackbar as Snackbar$1, Slide, CssBaseline, createTheme, createGenerateClassName } from '@material-ui/core';
5
4
  import { MoreHoriz, Close, Warning, CheckCircle } from '@material-ui/icons';
6
5
  import { makeStyles, StylesProvider, ThemeProvider as ThemeProvider$1 } from '@material-ui/styles';
7
- import { useEventHandler, useDeepEqualValue, useValueObserver, useDeepEqualMemo, useConstant } from '@superdispatch/hooks';
8
- import { forwardRef, useRef, useState, useLayoutEffect, useMemo, useContext, createContext, Children, useCallback } from 'react';
6
+ import { forwardRef, useState, useRef, useLayoutEffect, cloneElement, useMemo, useContext, createContext, Children, useCallback } from 'react';
9
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
10
- import clsx from 'clsx';
11
8
  import styled, { css, ThemeProvider as ThemeProvider$2 } from 'styled-components';
9
+ import { ResizeObserver } from '@juggle/resize-observer';
10
+ import { useEventHandler, useDeepEqualValue, useValueObserver, useDeepEqualMemo, useConstant } from '@superdispatch/hooks';
11
+ import clsx from 'clsx';
12
12
  import flattenChildren from 'react-keyed-flatten-children';
13
13
  import createBreakpoints from '@material-ui/core/styles/createBreakpoints';
14
14
 
@@ -42,7 +42,108 @@ var Button = /*#__PURE__*/forwardRef((_ref, ref) => {
42
42
  });
43
43
  if (process.env.NODE_ENV !== "production") Button.displayName = "Button";
44
44
 
45
- var _excluded$1 = ["items"];
45
+ var _excluded$1 = ["MenuListProps", "ButtonGroupProps", "children", "isLoading", "onClick", "label"];
46
+
47
+ function CaretDownIcon() {
48
+ return /*#__PURE__*/jsx("svg", {
49
+ viewBox: "0 0 8 4",
50
+ children: /*#__PURE__*/jsx("path", {
51
+ fill: "currentColor",
52
+ d: "M0.666687 0.666656L4.00002 3.99999L7.33335 0.666656H0.666687Z"
53
+ })
54
+ });
55
+ }
56
+
57
+ var CaretButton = /*#__PURE__*/styled(Button).withConfig({
58
+ displayName: "DropdownButton__CaretButton",
59
+ componentId: "SD__sc-8l84jm-0"
60
+ })(["width:auto;", ";"], _ref => {
61
+ var {
62
+ variant
63
+ } = _ref;
64
+ return variant === 'contained' && "border-left: 1px solid ".concat(Color.Blue500);
65
+ });
66
+ var DropdownButton = /*#__PURE__*/forwardRef((_ref2, ref) => {
67
+ var _anchorRef$current2;
68
+
69
+ var {
70
+ MenuListProps,
71
+ ButtonGroupProps,
72
+ children,
73
+ isLoading,
74
+ onClick,
75
+ label
76
+ } = _ref2,
77
+ buttonProps = _objectWithoutProperties(_ref2, _excluded$1);
78
+
79
+ var uid = useUID();
80
+ var [open, setOpen] = useState(false);
81
+ var anchorRef = useRef(null);
82
+
83
+ function handleClick(event) {
84
+ setOpen(false);
85
+ onClick === null || onClick === void 0 ? void 0 : onClick(event);
86
+ }
87
+
88
+ function handleToggle() {
89
+ setOpen(prevOpen => !prevOpen);
90
+ }
91
+
92
+ function handleClose(event) {
93
+ var _anchorRef$current;
94
+
95
+ if ((_anchorRef$current = anchorRef.current) !== null && _anchorRef$current !== void 0 && _anchorRef$current.contains(event.currentTarget)) {
96
+ return;
97
+ }
98
+
99
+ setOpen(false);
100
+ }
101
+
102
+ return /*#__PURE__*/jsxs(Fragment, {
103
+ children: [/*#__PURE__*/jsxs(ButtonGroup, _objectSpread(_objectSpread({}, ButtonGroupProps), {}, {
104
+ ref: mergeRefs(ButtonGroupProps === null || ButtonGroupProps === void 0 ? void 0 : ButtonGroupProps.ref, anchorRef),
105
+ fullWidth: (ButtonGroupProps === null || ButtonGroupProps === void 0 ? void 0 : ButtonGroupProps.fullWidth) || buttonProps.fullWidth,
106
+ children: [/*#__PURE__*/jsx(Button, _objectSpread(_objectSpread({
107
+ ref: ref,
108
+ onClick: handleClick,
109
+ disabled: isLoading,
110
+ isLoading: isLoading
111
+ }, buttonProps), {}, {
112
+ children: label
113
+ })), /*#__PURE__*/jsx(CaretButton, {
114
+ onClick: handleToggle,
115
+ disabled: isLoading,
116
+ color: buttonProps.color,
117
+ variant: buttonProps.variant,
118
+ "aria-haspopup": "menu",
119
+ "aria-controls": open ? uid : undefined,
120
+ "aria-expanded": open ? 'true' : undefined,
121
+ children: /*#__PURE__*/jsx(CaretDownIcon, {})
122
+ })]
123
+ })), /*#__PURE__*/jsx(Popover, {
124
+ open: open,
125
+ onClose: handleClose,
126
+ anchorEl: anchorRef.current,
127
+ anchorOrigin: {
128
+ vertical: 'bottom',
129
+ horizontal: 'left'
130
+ },
131
+ children: /*#__PURE__*/jsx("div", {
132
+ style: {
133
+ minWidth: (_anchorRef$current2 = anchorRef.current) === null || _anchorRef$current2 === void 0 ? void 0 : _anchorRef$current2.clientWidth
134
+ },
135
+ children: /*#__PURE__*/jsx(MenuList, _objectSpread(_objectSpread({}, MenuListProps), {}, {
136
+ id: uid,
137
+ onClick: () => {
138
+ setOpen(false);
139
+ },
140
+ children: children
141
+ }))
142
+ })
143
+ })]
144
+ });
145
+ });
146
+ if (process.env.NODE_ENV !== "production") DropdownButton.displayName = "DropdownButton";
46
147
 
47
148
  function useResizeObserver(node, observer) {
48
149
  var handler = useEventHandler(observer);
@@ -62,6 +163,7 @@ function useResizeObserver(node, observer) {
62
163
  }, [node, handler]);
63
164
  }
64
165
 
166
+ var _excluded$2 = ["items"];
65
167
  var useStyles = /*#__PURE__*/makeStyles({
66
168
  actions: {
67
169
  overflow: 'hidden'
@@ -73,7 +175,7 @@ var AdaptiveToolbar = /*#__PURE__*/forwardRef((_ref, ref) => {
73
175
  var {
74
176
  items
75
177
  } = _ref,
76
- props = _objectWithoutProperties(_ref, _excluded$1);
178
+ props = _objectWithoutProperties(_ref, _excluded$2);
77
179
 
78
180
  var styles = useStyles();
79
181
  var itemNodes = useRef([]);
@@ -116,7 +218,6 @@ var AdaptiveToolbar = /*#__PURE__*/forwardRef((_ref, ref) => {
116
218
  children: /*#__PURE__*/jsxs(Grid, {
117
219
  container: true,
118
220
  spacing: 1,
119
- wrap: "nowrap",
120
221
  ref: setRootNode,
121
222
  children: [/*#__PURE__*/jsx(Grid, {
122
223
  item: true,
@@ -131,7 +232,16 @@ var AdaptiveToolbar = /*#__PURE__*/forwardRef((_ref, ref) => {
131
232
  ref: node => {
132
233
  itemNodes.current[idx] = node;
133
234
  },
134
- children: /*#__PURE__*/jsx(Button, _objectSpread(_objectSpread({
235
+ children: item.dropdown ? /*#__PURE__*/jsx(DropdownButton, _objectSpread(_objectSpread({
236
+ type: "button",
237
+ onClick: item.onClick,
238
+ label: item.label
239
+ }, item.ButtonProps), {}, {
240
+ children: item.dropdown.map(dropdownItem => /*#__PURE__*/jsx(MenuItem, {
241
+ onClick: dropdownItem.onClick,
242
+ children: dropdownItem.label
243
+ }, dropdownItem.key))
244
+ })) : /*#__PURE__*/jsx(Button, _objectSpread(_objectSpread({
135
245
  type: "button",
136
246
  onClick: item.onClick
137
247
  }, item.ButtonProps), {}, {
@@ -162,21 +272,164 @@ var AdaptiveToolbar = /*#__PURE__*/forwardRef((_ref, ref) => {
162
272
  onClose: () => {
163
273
  setMenuButtonRef(undefined);
164
274
  },
165
- children: menuItems.map(item => /*#__PURE__*/jsx(MenuItem, {
275
+ children: menuItems.map((item, index, arr) => {
276
+ var _item$dropdown;
277
+
278
+ var next = arr[index + 1];
279
+ return /*#__PURE__*/jsxs(Fragment, {
280
+ children: [/*#__PURE__*/jsx(MenuItem, {
281
+ onClick: event => {
282
+ var _item$onClick;
283
+
284
+ (_item$onClick = item.onClick) === null || _item$onClick === void 0 ? void 0 : _item$onClick.call(item, event);
285
+ setMenuButtonRef(undefined);
286
+ },
287
+ children: item.label
288
+ }, item.key), (_item$dropdown = item.dropdown) === null || _item$dropdown === void 0 ? void 0 : _item$dropdown.map(dropdownItem => /*#__PURE__*/jsx(MenuItem, {
289
+ onClick: event => {
290
+ var _dropdownItem$onClick;
291
+
292
+ (_dropdownItem$onClick = dropdownItem.onClick) === null || _dropdownItem$onClick === void 0 ? void 0 : _dropdownItem$onClick.call(dropdownItem, event);
293
+ setMenuButtonRef(undefined);
294
+ },
295
+ children: dropdownItem.label
296
+ }, dropdownItem.key)), next && item.groupKey !== next.groupKey && /*#__PURE__*/jsx(Divider, {})]
297
+ });
298
+ })
299
+ })]
300
+ })]
301
+ })
302
+ }));
303
+ });
304
+ if (process.env.NODE_ENV !== "production") AdaptiveToolbar.displayName = "AdaptiveToolbar";
305
+
306
+ function mergeRefs() {
307
+ for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
308
+ refs[_key] = arguments[_key];
309
+ }
310
+
311
+ return node => {
312
+ refs.forEach(ref => {
313
+ assignRef(ref, node);
314
+ });
315
+ };
316
+ }
317
+ function assignRef(ref, value) {
318
+ if (ref) {
319
+ if (typeof ref === 'function') {
320
+ ref(value);
321
+ } else {
322
+ ref.current = value;
323
+ }
324
+ }
325
+ }
326
+
327
+ var useStyles$1 = /*#__PURE__*/makeStyles({
328
+ root: {
329
+ overflow: 'hidden',
330
+ height: '100%'
331
+ }
332
+ }, {
333
+ name: 'SD-AdaptiveVerticalToolbar'
334
+ });
335
+
336
+ var defaultMoreElement = /*#__PURE__*/jsx(Button, {
337
+ type: "button",
338
+ children: /*#__PURE__*/jsx(MoreHoriz, {})
339
+ });
340
+
341
+ var AdaptiveVerticalToolbar = /*#__PURE__*/forwardRef((_ref, ref) => {
342
+ var {
343
+ items,
344
+ disableGutters,
345
+ moreElement = defaultMoreElement,
346
+ renderItem = item => item.label,
347
+ renderMenuItem = item => item.label
348
+ } = _ref;
349
+ var styles = useStyles$1();
350
+ var itemNodes = useRef([]);
351
+ var optionsButtonRef = useRef(null);
352
+ var [firstHiddenIdx, setFirstHiddenIdx] = useState(-1);
353
+ var menuItems = firstHiddenIdx === -1 ? [] : items.slice(firstHiddenIdx);
354
+ var [menuButtonNode, setMenuButtonRef] = useState();
355
+ var [rootNode, setRootNode] = useState(null);
356
+ useResizeObserver(rootNode, node => {
357
+ var _optionsButtonRef$cur;
358
+
359
+ var rootRect = node.getBoundingClientRect();
360
+ var rootHeight = rootRect.bottom;
361
+ var optionsButtonRect = (_optionsButtonRef$cur = optionsButtonRef.current) === null || _optionsButtonRef$cur === void 0 ? void 0 : _optionsButtonRef$cur.getBoundingClientRect();
362
+ var optionsButtonWidth = (optionsButtonRect === null || optionsButtonRect === void 0 ? void 0 : optionsButtonRect.height) || 0;
363
+ var maxBottomPosition = rootHeight - optionsButtonWidth;
364
+ var mountedNodes = itemNodes.current.filter(x => x != null);
365
+ var hiddenIdx = mountedNodes.findIndex((itemNode, idx) => {
366
+ itemNode.removeAttribute('hidden');
367
+ var itemRect = itemNode.getBoundingClientRect(); // Ignore options button height when checking last item.
368
+
369
+ if (idx === mountedNodes.length - 1) {
370
+ return itemRect.bottom > rootHeight;
371
+ }
372
+
373
+ return itemRect.bottom > maxBottomPosition;
374
+ });
375
+
376
+ if (hiddenIdx !== -1) {
377
+ mountedNodes.slice(hiddenIdx).forEach(itemNode => {
378
+ itemNode.setAttribute('hidden', 'true');
379
+ });
380
+ }
381
+
382
+ setFirstHiddenIdx(hiddenIdx);
383
+ });
384
+ return /*#__PURE__*/jsxs(Grid, {
385
+ direction: "column",
386
+ container: true,
387
+ wrap: "nowrap",
388
+ className: styles.root,
389
+ spacing: disableGutters ? undefined : 1,
390
+ ref: mergeRefs(ref, node => {
391
+ setRootNode(node);
392
+ }),
393
+ children: [items.map((item, idx) => /*#__PURE__*/jsx(Grid, {
394
+ item: true,
395
+ ref: node => {
396
+ itemNodes.current[idx] = node;
397
+ },
398
+ children: renderItem(item)
399
+ }, item.key)), menuItems.length > 0 && /*#__PURE__*/jsxs(Grid, {
400
+ item: true,
401
+ ref: optionsButtonRef,
402
+ component: "div",
403
+ children: [/*#__PURE__*/cloneElement(moreElement, {
404
+ onClick: _ref2 => {
405
+ var {
406
+ currentTarget
407
+ } = _ref2;
408
+ setMenuButtonRef(currentTarget);
409
+ }
410
+ }), /*#__PURE__*/jsx(Menu, {
411
+ open: !!menuButtonNode,
412
+ anchorEl: menuButtonNode,
413
+ onClose: () => {
414
+ setMenuButtonRef(undefined);
415
+ },
416
+ children: menuItems.flatMap((item, index, arr) => {
417
+ var next = arr[index + 1];
418
+ return [/*#__PURE__*/jsx(MenuItem, {
166
419
  onClick: event => {
167
420
  var _item$onClick;
168
421
 
169
422
  (_item$onClick = item.onClick) === null || _item$onClick === void 0 ? void 0 : _item$onClick.call(item, event);
170
423
  setMenuButtonRef(undefined);
171
424
  },
172
- children: item.label
173
- }, item.key))
174
- })]
425
+ children: renderMenuItem(item)
426
+ }, item.key), next && next.menuGroupKey !== item.menuGroupKey && /*#__PURE__*/jsx(Divider, {}, "".concat(item.key, "-divider"))];
427
+ })
175
428
  })]
176
- })
177
- }));
429
+ })]
430
+ });
178
431
  });
179
- if (process.env.NODE_ENV !== "production") AdaptiveToolbar.displayName = "AdaptiveToolbar";
432
+ if (process.env.NODE_ENV !== "production") AdaptiveVerticalToolbar.displayName = "AdaptiveVerticalToolbar";
180
433
 
181
434
  var Color;
182
435
 
@@ -256,9 +509,9 @@ function isColorProp(name) {
256
509
  return typeof name == 'string' && Object.prototype.hasOwnProperty.call(Color, name);
257
510
  }
258
511
 
259
- var _excluded$2 = ["size", "icon", "isLoading", "classes", "disabled", "avatarRef", "className", "alt", "imgProps", "sizes", "src", "srcSet", "variant", "children"],
512
+ var _excluded$3 = ["size", "icon", "isLoading", "classes", "disabled", "avatarRef", "className", "alt", "imgProps", "sizes", "src", "srcSet", "variant", "children"],
260
513
  _excluded2 = ["button", "overlay", "progress", "withIcon", "sizeLarge"];
261
- var useStyles$1 = /*#__PURE__*/makeStyles(theme => {
514
+ var useStyles$2 = /*#__PURE__*/makeStyles(theme => {
262
515
  var sm = theme.breakpoints.up('sm');
263
516
  return {
264
517
  button: {
@@ -366,9 +619,9 @@ var AvatarButton = /*#__PURE__*/forwardRef((_ref, ref) => {
366
619
  variant,
367
620
  children
368
621
  } = _ref,
369
- props = _objectWithoutProperties(_ref, _excluded$2);
622
+ props = _objectWithoutProperties(_ref, _excluded$3);
370
623
 
371
- var _useStyles = useStyles$1({
624
+ var _useStyles = useStyles$2({
372
625
  classes
373
626
  }),
374
627
  {
@@ -408,8 +661,8 @@ var AvatarButton = /*#__PURE__*/forwardRef((_ref, ref) => {
408
661
  });
409
662
  if (process.env.NODE_ENV !== "production") AvatarButton.displayName = "AvatarButton";
410
663
 
411
- var _excluded$3 = ["hint", "size", "error", "classes", "className", "children", "endIcon", "startIcon", "disabled"];
412
- var useStyles$2 = /*#__PURE__*/makeStyles(theme => ({
664
+ var _excluded$4 = ["hint", "size", "error", "classes", "className", "children", "endIcon", "startIcon", "disabled"];
665
+ var useStyles$3 = /*#__PURE__*/makeStyles(theme => ({
413
666
  root: {
414
667
  width: '100%',
415
668
  display: 'flex',
@@ -492,9 +745,9 @@ var CardButton = /*#__PURE__*/forwardRef((_ref, ref) => {
492
745
  startIcon,
493
746
  disabled
494
747
  } = _ref,
495
- props = _objectWithoutProperties(_ref, _excluded$3);
748
+ props = _objectWithoutProperties(_ref, _excluded$4);
496
749
 
497
- var styles = useStyles$2({
750
+ var styles = useStyles$3({
498
751
  classes
499
752
  });
500
753
  return /*#__PURE__*/jsx(ButtonBase, _objectSpread(_objectSpread({}, props), {}, {
@@ -531,7 +784,7 @@ var CardButton = /*#__PURE__*/forwardRef((_ref, ref) => {
531
784
  });
532
785
  if (process.env.NODE_ENV !== "production") CardButton.displayName = "CardButton";
533
786
 
534
- var _excluded$4 = ["label", "error", "checked", "onBlur", "onChange", "helperText", "FormControlLabelProps"];
787
+ var _excluded$5 = ["label", "error", "checked", "onBlur", "onChange", "helperText", "FormControlLabelProps"];
535
788
  var CheckboxField = /*#__PURE__*/forwardRef((_ref, ref) => {
536
789
  var {
537
790
  label,
@@ -542,7 +795,7 @@ var CheckboxField = /*#__PURE__*/forwardRef((_ref, ref) => {
542
795
  helperText,
543
796
  FormControlLabelProps: formControlLabelProps
544
797
  } = _ref,
545
- props = _objectWithoutProperties(_ref, _excluded$4);
798
+ props = _objectWithoutProperties(_ref, _excluded$5);
546
799
 
547
800
  return /*#__PURE__*/jsxs(FormControl, {
548
801
  error: error,
@@ -563,7 +816,7 @@ var CheckboxField = /*#__PURE__*/forwardRef((_ref, ref) => {
563
816
  });
564
817
  if (process.env.NODE_ENV !== "production") CheckboxField.displayName = "CheckboxField";
565
818
 
566
- var _excluded$5 = ["FormGroupProps", "label", "FormLabelProps", "helperText", "FormHelperTextProps", "children"];
819
+ var _excluded$6 = ["FormGroupProps", "label", "FormLabelProps", "helperText", "FormHelperTextProps", "children"];
567
820
  var CheckboxGroupField = /*#__PURE__*/forwardRef((_ref, ref) => {
568
821
  var {
569
822
  FormGroupProps: formGroupProps,
@@ -573,7 +826,7 @@ var CheckboxGroupField = /*#__PURE__*/forwardRef((_ref, ref) => {
573
826
  FormHelperTextProps: formHelperTextProps,
574
827
  children
575
828
  } = _ref,
576
- formControlProps = _objectWithoutProperties(_ref, _excluded$5);
829
+ formControlProps = _objectWithoutProperties(_ref, _excluded$6);
577
830
 
578
831
  return /*#__PURE__*/jsxs(FormControl, _objectSpread(_objectSpread({}, formControlProps), {}, {
579
832
  hiddenLabel: !label,
@@ -812,7 +1065,7 @@ function renderChildren(node) {
812
1065
  return node;
813
1066
  }
814
1067
 
815
- var _excluded$6 = ["render", "onChange"];
1068
+ var _excluded$7 = ["render", "onChange"];
816
1069
  function useVisibilityObserver(node) {
817
1070
  var {
818
1071
  threshold = 0,
@@ -848,7 +1101,7 @@ function VisibilityObserver(_ref2) {
848
1101
  render,
849
1102
  onChange
850
1103
  } = _ref2,
851
- options = _objectWithoutProperties(_ref2, _excluded$6);
1104
+ options = _objectWithoutProperties(_ref2, _excluded$7);
852
1105
 
853
1106
  var [node, setNode] = useState(null);
854
1107
  var visibility = useVisibilityObserver(node, options);
@@ -862,9 +1115,9 @@ function VisibilityObserver(_ref2) {
862
1115
  return renderChildren(children);
863
1116
  }
864
1117
 
865
- var _excluded$7 = ["title", "enterDelay"],
1118
+ var _excluded$8 = ["title", "enterDelay"],
866
1119
  _excluded2$1 = ["onClick", "children", "className", "disableUnderline", "TooltipProps"];
867
- var useStyles$3 = /*#__PURE__*/makeStyles(theme => ({
1120
+ var useStyles$4 = /*#__PURE__*/makeStyles(theme => ({
868
1121
  root: {
869
1122
  marginBottom: -1,
870
1123
  borderBottom: '1px dashed transparent',
@@ -894,11 +1147,11 @@ var OverflowText = /*#__PURE__*/forwardRef((_ref, rootRef) => {
894
1147
  enterDelay = 1000
895
1148
  } = {}
896
1149
  } = _ref,
897
- tooltipProps = _objectWithoutProperties(_ref.TooltipProps, _excluded$7),
1150
+ tooltipProps = _objectWithoutProperties(_ref.TooltipProps, _excluded$8),
898
1151
  props = _objectWithoutProperties(_ref, _excluded2$1);
899
1152
 
900
1153
  var [isOpen, setIsOpen] = useState(false);
901
- var styles = useStyles$3();
1154
+ var styles = useStyles$4();
902
1155
  return /*#__PURE__*/jsx(VisibilityObserver, {
903
1156
  render: _ref2 => {
904
1157
  var {
@@ -946,7 +1199,7 @@ function useUID(defaultID) {
946
1199
  return defaultID || uid;
947
1200
  }
948
1201
 
949
- var _excluded$8 = ["size"];
1202
+ var _excluded$9 = ["size"];
950
1203
 
951
1204
  function sizeVariant(theme, mobileSpacing, desktopSpacing) {
952
1205
  return {
@@ -961,7 +1214,7 @@ function sizeVariant(theme, mobileSpacing, desktopSpacing) {
961
1214
  };
962
1215
  }
963
1216
 
964
- var useStyles$4 = /*#__PURE__*/makeStyles(theme => ({
1217
+ var useStyles$5 = /*#__PURE__*/makeStyles(theme => ({
965
1218
  list: sizeVariant(theme, 2, 1),
966
1219
  listSmall: sizeVariant(theme, 1, 0.5),
967
1220
  listLarge: sizeVariant(theme, 3, 2),
@@ -990,9 +1243,9 @@ var DescriptionList = /*#__PURE__*/forwardRef((_ref, ref) => {
990
1243
  var {
991
1244
  size
992
1245
  } = _ref,
993
- props = _objectWithoutProperties(_ref, _excluded$8);
1246
+ props = _objectWithoutProperties(_ref, _excluded$9);
994
1247
 
995
- var styles = useStyles$4();
1248
+ var styles = useStyles$5();
996
1249
  return /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({}, props), {}, {
997
1250
  ref: ref,
998
1251
  "data-size": size,
@@ -1018,7 +1271,7 @@ var DescriptionListItem = /*#__PURE__*/forwardRef((_ref2, ref) => {
1018
1271
  contentTypographyProps,
1019
1272
  fallback
1020
1273
  } = _ref2;
1021
- var styles = useStyles$4();
1274
+ var styles = useStyles$5();
1022
1275
  var labelID = useUID(labelTypographyProps === null || labelTypographyProps === void 0 ? void 0 : labelTypographyProps.id);
1023
1276
  var shouldRenderFallback = isEmptyReactNode(content);
1024
1277
  return /*#__PURE__*/jsxs("div", {
@@ -1046,8 +1299,8 @@ var DescriptionListItem = /*#__PURE__*/forwardRef((_ref2, ref) => {
1046
1299
  });
1047
1300
  if (process.env.NODE_ENV !== "production") DescriptionListItem.displayName = "DescriptionListItem";
1048
1301
 
1049
- var _excluded$9 = ["children", "className"];
1050
- var useStyles$5 = /*#__PURE__*/makeStyles(theme => ({
1302
+ var _excluded$a = ["children", "className"];
1303
+ var useStyles$6 = /*#__PURE__*/makeStyles(theme => ({
1051
1304
  appBar: {
1052
1305
  '&&': {
1053
1306
  bottom: 0,
@@ -1080,9 +1333,9 @@ var DrawerActions = /*#__PURE__*/forwardRef((_ref, appBarRef) => {
1080
1333
  children,
1081
1334
  className
1082
1335
  } = _ref,
1083
- props = _objectWithoutProperties(_ref, _excluded$9);
1336
+ props = _objectWithoutProperties(_ref, _excluded$a);
1084
1337
 
1085
- var styles = useStyles$5();
1338
+ var styles = useStyles$6();
1086
1339
  return /*#__PURE__*/jsx(VisibilityObserver, {
1087
1340
  render: _ref2 => {
1088
1341
  var {
@@ -1107,8 +1360,8 @@ var DrawerActions = /*#__PURE__*/forwardRef((_ref, appBarRef) => {
1107
1360
  });
1108
1361
  if (process.env.NODE_ENV !== "production") DrawerActions.displayName = "DrawerActions";
1109
1362
 
1110
- var _excluded$a = ["className"];
1111
- var useStyles$6 = /*#__PURE__*/makeStyles(theme => ({
1363
+ var _excluded$b = ["className"];
1364
+ var useStyles$7 = /*#__PURE__*/makeStyles(theme => ({
1112
1365
  root: {
1113
1366
  maxWidth: '100%',
1114
1367
  padding: theme.spacing(2, 3),
@@ -1123,9 +1376,9 @@ var DrawerContent = /*#__PURE__*/forwardRef((_ref, ref) => {
1123
1376
  var {
1124
1377
  className
1125
1378
  } = _ref,
1126
- props = _objectWithoutProperties(_ref, _excluded$a);
1379
+ props = _objectWithoutProperties(_ref, _excluded$b);
1127
1380
 
1128
- var styles = useStyles$6();
1381
+ var styles = useStyles$7();
1129
1382
  return /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({}, props), {}, {
1130
1383
  ref: ref,
1131
1384
  className: clsx(styles.root, className)
@@ -1133,7 +1386,7 @@ var DrawerContent = /*#__PURE__*/forwardRef((_ref, ref) => {
1133
1386
  });
1134
1387
  if (process.env.NODE_ENV !== "production") DrawerContent.displayName = "DrawerContent";
1135
1388
 
1136
- var _excluded$b = ["className"];
1389
+ var _excluded$c = ["className"];
1137
1390
 
1138
1391
  function listItemMixins(theme, space) {
1139
1392
  return {
@@ -1153,7 +1406,7 @@ function listItemMixins(theme, space) {
1153
1406
  };
1154
1407
  }
1155
1408
 
1156
- var useStyles$7 = /*#__PURE__*/makeStyles(theme => ({
1409
+ var useStyles$8 = /*#__PURE__*/makeStyles(theme => ({
1157
1410
  root: _objectSpread(_objectSpread({
1158
1411
  maxWidth: '100%'
1159
1412
  }, listItemMixins(theme, 3)), {}, {
@@ -1166,9 +1419,9 @@ var DrawerList = /*#__PURE__*/forwardRef((_ref, ref) => {
1166
1419
  var {
1167
1420
  className
1168
1421
  } = _ref,
1169
- props = _objectWithoutProperties(_ref, _excluded$b);
1422
+ props = _objectWithoutProperties(_ref, _excluded$c);
1170
1423
 
1171
- var styles = useStyles$7();
1424
+ var styles = useStyles$8();
1172
1425
  return /*#__PURE__*/jsx(List, _objectSpread(_objectSpread({}, props), {}, {
1173
1426
  ref: ref,
1174
1427
  component: "div",
@@ -1177,8 +1430,8 @@ var DrawerList = /*#__PURE__*/forwardRef((_ref, ref) => {
1177
1430
  });
1178
1431
  if (process.env.NODE_ENV !== "production") DrawerList.displayName = "DrawerList";
1179
1432
 
1180
- var _excluded$c = ["title", "titleTypographyProps", "subtitle", "subtitleTypographyProps", "startAction", "endAction", "className"];
1181
- var useStyles$8 = /*#__PURE__*/makeStyles(theme => ({
1433
+ var _excluded$d = ["title", "titleTypographyProps", "subtitle", "subtitleTypographyProps", "startAction", "endAction", "className"];
1434
+ var useStyles$9 = /*#__PURE__*/makeStyles(theme => ({
1182
1435
  appBar: {
1183
1436
  '&&': {
1184
1437
  borderTop: 'none',
@@ -1226,9 +1479,9 @@ var DrawerTitle = /*#__PURE__*/forwardRef((_ref, appBarRef) => {
1226
1479
  endAction,
1227
1480
  className
1228
1481
  } = _ref,
1229
- props = _objectWithoutProperties(_ref, _excluded$c);
1482
+ props = _objectWithoutProperties(_ref, _excluded$d);
1230
1483
 
1231
- var styles = useStyles$8();
1484
+ var styles = useStyles$9();
1232
1485
  return /*#__PURE__*/jsx(VisibilityObserver, {
1233
1486
  render: _ref2 => {
1234
1487
  var {
@@ -1280,7 +1533,7 @@ var DrawerTitle = /*#__PURE__*/forwardRef((_ref, appBarRef) => {
1280
1533
  });
1281
1534
  if (process.env.NODE_ENV !== "production") DrawerTitle.displayName = "DrawerTitle";
1282
1535
 
1283
- var _excluded$d = ["children", "alignItems"];
1536
+ var _excluded$e = ["children", "alignItems"];
1284
1537
 
1285
1538
  /**
1286
1539
  * @deprecated in favor of `Stack`.
@@ -1290,7 +1543,7 @@ var GridStack = /*#__PURE__*/forwardRef((_ref, ref) => {
1290
1543
  children,
1291
1544
  alignItems = 'stretch'
1292
1545
  } = _ref,
1293
- props = _objectWithoutProperties(_ref, _excluded$d);
1546
+ props = _objectWithoutProperties(_ref, _excluded$e);
1294
1547
 
1295
1548
  var items = Children.toArray(children);
1296
1549
  return /*#__PURE__*/jsx(Grid, _objectSpread(_objectSpread({}, props), {}, {
@@ -1309,7 +1562,7 @@ var GridStack = /*#__PURE__*/forwardRef((_ref, ref) => {
1309
1562
  });
1310
1563
  if (process.env.NODE_ENV !== "production") GridStack.displayName = "GridStack";
1311
1564
 
1312
- var _excluded$e = ["children", "wrap", "justify", "alignItems"];
1565
+ var _excluded$f = ["children", "wrap", "justify", "alignItems"];
1313
1566
 
1314
1567
  /**
1315
1568
  * @deprecated in favor of `Inline` component.
@@ -1321,7 +1574,7 @@ var InlineGrid = /*#__PURE__*/forwardRef((_ref, ref) => {
1321
1574
  justify = 'flex-start',
1322
1575
  alignItems = 'flex-start'
1323
1576
  } = _ref,
1324
- props = _objectWithoutProperties(_ref, _excluded$e);
1577
+ props = _objectWithoutProperties(_ref, _excluded$f);
1325
1578
 
1326
1579
  var items = Children.toArray(children);
1327
1580
  return /*#__PURE__*/jsx(Grid, _objectSpread(_objectSpread({}, props), {}, {
@@ -1339,30 +1592,9 @@ var InlineGrid = /*#__PURE__*/forwardRef((_ref, ref) => {
1339
1592
  });
1340
1593
  if (process.env.NODE_ENV !== "production") InlineGrid.displayName = "InlineGrid";
1341
1594
 
1342
- function mergeRefs() {
1343
- for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
1344
- refs[_key] = arguments[_key];
1345
- }
1346
-
1347
- return node => {
1348
- refs.forEach(ref => {
1349
- assignRef(ref, node);
1350
- });
1351
- };
1352
- }
1353
- function assignRef(ref, value) {
1354
- if (ref) {
1355
- if (typeof ref === 'function') {
1356
- ref(value);
1357
- } else {
1358
- ref.current = value;
1359
- }
1360
- }
1361
- }
1362
-
1363
- var _excluded$f = ["size", "square", "classes", "children", "className", "CardContentProps"],
1595
+ var _excluded$g = ["size", "square", "classes", "children", "className", "CardContentProps"],
1364
1596
  _excluded2$2 = ["content", "sizeLarge", "fullWidth"];
1365
- var useStyles$9 = /*#__PURE__*/makeStyles(theme => ({
1597
+ var useStyles$a = /*#__PURE__*/makeStyles(theme => ({
1366
1598
  root: {
1367
1599
  '&$fullWidth': {
1368
1600
  borderRadius: 0,
@@ -1392,9 +1624,9 @@ var InfoCard = /*#__PURE__*/forwardRef((_ref, _ref2) => {
1392
1624
  className,
1393
1625
  CardContentProps: cardContentProps = {}
1394
1626
  } = _ref,
1395
- props = _objectWithoutProperties(_ref, _excluded$f);
1627
+ props = _objectWithoutProperties(_ref, _excluded$g);
1396
1628
 
1397
- var _useStyles = useStyles$9({
1629
+ var _useStyles = useStyles$a({
1398
1630
  classes
1399
1631
  }),
1400
1632
  {
@@ -1471,7 +1703,7 @@ var Inline = /*#__PURE__*/forwardRef((_ref2, ref) => {
1471
1703
  });
1472
1704
  if (process.env.NODE_ENV !== "production") Inline.displayName = "Inline";
1473
1705
 
1474
- var _excluded$g = ["label", "error", "checked", "onBlur", "onChange", "helperText", "FormControlLabelProps"];
1706
+ var _excluded$h = ["label", "error", "checked", "onBlur", "onChange", "helperText", "FormControlLabelProps"];
1475
1707
  var RadioField = /*#__PURE__*/forwardRef((_ref, ref) => {
1476
1708
  var {
1477
1709
  label,
@@ -1482,7 +1714,7 @@ var RadioField = /*#__PURE__*/forwardRef((_ref, ref) => {
1482
1714
  helperText,
1483
1715
  FormControlLabelProps: formControlLabelProps
1484
1716
  } = _ref,
1485
- props = _objectWithoutProperties(_ref, _excluded$g);
1717
+ props = _objectWithoutProperties(_ref, _excluded$h);
1486
1718
 
1487
1719
  return /*#__PURE__*/jsxs(FormControl, {
1488
1720
  error: error,
@@ -1502,7 +1734,7 @@ var RadioField = /*#__PURE__*/forwardRef((_ref, ref) => {
1502
1734
  });
1503
1735
  if (process.env.NODE_ENV !== "production") RadioField.displayName = "RadioField";
1504
1736
 
1505
- var _excluded$h = ["name", "value", "onChange", "RadioGroupProps", "label", "FormLabelProps", "helperText", "FormHelperTextProps", "children"];
1737
+ var _excluded$i = ["name", "value", "onChange", "RadioGroupProps", "label", "FormLabelProps", "helperText", "FormHelperTextProps", "children"];
1506
1738
  var RadioGroupField = /*#__PURE__*/forwardRef((_ref, ref) => {
1507
1739
  var {
1508
1740
  name,
@@ -1515,7 +1747,7 @@ var RadioGroupField = /*#__PURE__*/forwardRef((_ref, ref) => {
1515
1747
  FormHelperTextProps: formHelperTextProps,
1516
1748
  children
1517
1749
  } = _ref,
1518
- formControlProps = _objectWithoutProperties(_ref, _excluded$h);
1750
+ formControlProps = _objectWithoutProperties(_ref, _excluded$i);
1519
1751
 
1520
1752
  return /*#__PURE__*/jsxs(FormControl, _objectSpread(_objectSpread({}, formControlProps), {}, {
1521
1753
  hiddenLabel: !label,
@@ -1550,9 +1782,9 @@ function useCollapseBreakpoint(collapseBreakpoint) {
1550
1782
  return breakpointIDX < collapseBreakpointIDX;
1551
1783
  }
1552
1784
 
1553
- var _excluded$i = ["action", "children", "onClose", "className", "classes", "variant"],
1785
+ var _excluded$j = ["action", "children", "onClose", "className", "classes", "variant"],
1554
1786
  _excluded2$3 = ["icon", "closeButton", "variantError", "variantSuccess"];
1555
- var useStyles$a = /*#__PURE__*/makeStyles(theme => ({
1787
+ var useStyles$b = /*#__PURE__*/makeStyles(theme => ({
1556
1788
  root: {
1557
1789
  color: Color.White,
1558
1790
  backgroundColor: Color.Dark500,
@@ -1595,9 +1827,9 @@ var SnackbarContent = /*#__PURE__*/forwardRef((_ref, ref) => {
1595
1827
  classes,
1596
1828
  variant = 'default'
1597
1829
  } = _ref,
1598
- props = _objectWithoutProperties(_ref, _excluded$i);
1830
+ props = _objectWithoutProperties(_ref, _excluded$j);
1599
1831
 
1600
- var _useStyles = useStyles$a({
1832
+ var _useStyles = useStyles$b({
1601
1833
  classes
1602
1834
  }),
1603
1835
  {
@@ -1645,7 +1877,7 @@ var SnackbarContent = /*#__PURE__*/forwardRef((_ref, ref) => {
1645
1877
  });
1646
1878
  if (process.env.NODE_ENV !== "production") SnackbarContent.displayName = "SnackbarContent";
1647
1879
 
1648
- var _excluded$j = ["open", "action", "variant", "onClose", "children", "ContentProps", "hasCloseButton", "TransitionComponent"];
1880
+ var _excluded$k = ["open", "action", "variant", "onClose", "children", "ContentProps", "hasCloseButton", "TransitionComponent"];
1649
1881
 
1650
1882
  function SlideTransition(props) {
1651
1883
  return /*#__PURE__*/jsx(Slide, _objectSpread(_objectSpread({}, props), {}, {
@@ -1664,7 +1896,7 @@ var Snackbar = /*#__PURE__*/forwardRef((_ref, ref) => {
1664
1896
  hasCloseButton = onClose != null,
1665
1897
  TransitionComponent = SlideTransition
1666
1898
  } = _ref,
1667
- props = _objectWithoutProperties(_ref, _excluded$j);
1899
+ props = _objectWithoutProperties(_ref, _excluded$k);
1668
1900
 
1669
1901
  function handleClose(reason) {
1670
1902
  if (reason !== 'clickaway') {
@@ -1693,7 +1925,7 @@ var Snackbar = /*#__PURE__*/forwardRef((_ref, ref) => {
1693
1925
  });
1694
1926
  if (process.env.NODE_ENV !== "production") Snackbar.displayName = "Snackbar";
1695
1927
 
1696
- var _excluded$k = ["onClose", "variant", "key", "id", "autoHideDuration"];
1928
+ var _excluded$l = ["onClose", "variant", "key", "id", "autoHideDuration"];
1697
1929
 
1698
1930
  function warnContext() {
1699
1931
  // eslint-disable-next-line no-console
@@ -1739,7 +1971,7 @@ function SnackbarStackProvider(_ref2) {
1739
1971
  id = String(key),
1740
1972
  autoHideDuration = 5000
1741
1973
  } = _ref3,
1742
- props = _objectWithoutProperties(_ref3, _excluded$k);
1974
+ props = _objectWithoutProperties(_ref3, _excluded$l);
1743
1975
 
1744
1976
  function removeSnackbar() {
1745
1977
  setStack(prev => {
@@ -1836,8 +2068,8 @@ var Stack = /*#__PURE__*/forwardRef((_ref2, ref) => {
1836
2068
  });
1837
2069
  if (process.env.NODE_ENV !== "production") Stack.displayName = "Stack";
1838
2070
 
1839
- var _excluded$l = ["color", "variant", "children", "classes", "className", "noWrap", "fontWeight", "component"];
1840
- var useStyles$b = /*#__PURE__*/makeStyles(theme => ({
2071
+ var _excluded$m = ["color", "variant", "children", "classes", "className", "noWrap", "fontWeight", "component"];
2072
+ var useStyles$c = /*#__PURE__*/makeStyles(theme => ({
1841
2073
  root: {
1842
2074
  maxWidth: '100%',
1843
2075
  alignItems: 'center',
@@ -1920,9 +2152,9 @@ var Tag = /*#__PURE__*/forwardRef((_ref, ref) => {
1920
2152
  fontWeight = 'bold',
1921
2153
  component = 'div'
1922
2154
  } = _ref,
1923
- props = _objectWithoutProperties(_ref, _excluded$l);
2155
+ props = _objectWithoutProperties(_ref, _excluded$m);
1924
2156
 
1925
- var styles = useStyles$b({
2157
+ var styles = useStyles$c({
1926
2158
  classes
1927
2159
  });
1928
2160
  return /*#__PURE__*/jsx(Typography, _objectSpread(_objectSpread({}, props), {}, {
@@ -3369,7 +3601,7 @@ function columnVariant(columns) {
3369
3601
  };
3370
3602
  }
3371
3603
 
3372
- var useStyles$c = /*#__PURE__*/makeStyles(theme => ({
3604
+ var useStyles$d = /*#__PURE__*/makeStyles(theme => ({
3373
3605
  root: {
3374
3606
  paddingTop: PREVENT_COLLAPSE,
3375
3607
  '&:before': {
@@ -3413,7 +3645,7 @@ var Tiles = /*#__PURE__*/forwardRef((_ref, ref) => {
3413
3645
  space: spaceProp = 1,
3414
3646
  columns: columnsProp = 1
3415
3647
  } = _ref;
3416
- var styles = useStyles$c({});
3648
+ var styles = useStyles$d({});
3417
3649
  var space = useResponsivePropRecord(spaceProp);
3418
3650
  var columns = useResponsivePropRecord(columnsProp);
3419
3651
  return /*#__PURE__*/jsx("div", {
@@ -3433,5 +3665,5 @@ var Tiles = /*#__PURE__*/forwardRef((_ref, ref) => {
3433
3665
  });
3434
3666
  if (process.env.NODE_ENV !== "production") Tiles.displayName = "Tiles";
3435
3667
 
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 };
3668
+ export { AdaptiveToolbar, AdaptiveVerticalToolbar, AvatarButton, Button, CardButton, CheckboxField, CheckboxGroupField, Color, Column, Columns, DescriptionList, DescriptionListItem, DrawerActions, DrawerContent, DrawerList, DrawerTitle, DropdownButton, 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, useResizeObserver, useResponsiveContext, useResponsiveProp, useResponsivePropRecord, useResponsiveValue, useSnackbarStack, useUID, useVisibilityObserver };
3437
3669
  //# sourceMappingURL=index.js.map