grommet 2.33.1 → 2.33.2

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.
Files changed (89) hide show
  1. package/components/Anchor/Anchor.js +2 -2
  2. package/components/Anchor/StyledAnchor.js +6 -6
  3. package/components/Box/Box.js +1 -1
  4. package/components/Button/Button.js +8 -8
  5. package/components/Button/StyledButtonKind.js +5 -5
  6. package/components/Calendar/Calendar.js +3 -3
  7. package/components/CheckBox/StyledCheckBox.js +8 -8
  8. package/components/Data/DataForm.js +15 -10
  9. package/components/Data/stories/Infinite.js +2 -2
  10. package/components/Data/stories/SpaceX.js +1 -1
  11. package/components/Data/stories/StarWars.js +1 -1
  12. package/components/DataChart/DataChart.js +4 -4
  13. package/components/DataChart/Detail.js +1 -1
  14. package/components/DataFilter/DataFilter.js +3 -3
  15. package/components/DataTable/Header.js +1 -1
  16. package/components/DataTable/buildState.js +8 -8
  17. package/components/DateInput/DateInput.js +1 -1
  18. package/components/DateInput/utils.js +2 -2
  19. package/components/Drop/DropContainer.js +2 -2
  20. package/components/FileInput/utils/formatBytes.js +2 -2
  21. package/components/FormField/FormField.js +1 -1
  22. package/components/Header/Header.js +4 -4
  23. package/components/Layer/Layer.js +4 -2
  24. package/components/List/List.js +5 -5
  25. package/components/MaskedInput/MaskedInput.js +2 -1
  26. package/components/Menu/Menu.js +7 -3
  27. package/components/NameValueList/NameValueList.js +2 -2
  28. package/components/NameValuePair/NameValuePair.js +2 -2
  29. package/components/Notification/Notification.js +3 -3
  30. package/components/RangeInput/StyledRangeInput.js +4 -4
  31. package/components/Select/EmptySearchOption.js +3 -3
  32. package/components/Select/StyledSelect.js +4 -4
  33. package/components/SelectMultiple/SelectMultiple.js +4 -4
  34. package/components/SelectMultiple/SelectMultipleContainer.js +1 -1
  35. package/components/Skeleton/Skeleton.js +1 -1
  36. package/components/Skeleton/StyledSkeleton.js +2 -2
  37. package/components/Tag/Tag.js +5 -5
  38. package/components/TextArea/StyledTextArea.js +1 -1
  39. package/components/ThumbsRating/ThumbsRating.js +6 -6
  40. package/components/Video/Video.js +2 -2
  41. package/contexts/AnalyticsContext/AnalyticsContext.js +2 -2
  42. package/es6/components/Anchor/Anchor.js +2 -2
  43. package/es6/components/Anchor/StyledAnchor.js +6 -6
  44. package/es6/components/Box/Box.js +1 -1
  45. package/es6/components/Button/Button.js +8 -8
  46. package/es6/components/Button/StyledButtonKind.js +5 -5
  47. package/es6/components/Calendar/Calendar.js +3 -3
  48. package/es6/components/CheckBox/StyledCheckBox.js +8 -8
  49. package/es6/components/Data/DataForm.js +15 -10
  50. package/es6/components/Data/stories/Infinite.js +2 -2
  51. package/es6/components/Data/stories/SpaceX.js +1 -1
  52. package/es6/components/Data/stories/StarWars.js +1 -1
  53. package/es6/components/DataChart/DataChart.js +4 -4
  54. package/es6/components/DataChart/Detail.js +1 -1
  55. package/es6/components/DataFilter/DataFilter.js +3 -3
  56. package/es6/components/DataTable/Header.js +1 -1
  57. package/es6/components/DataTable/buildState.js +8 -8
  58. package/es6/components/DateInput/DateInput.js +1 -1
  59. package/es6/components/DateInput/utils.js +2 -2
  60. package/es6/components/Drop/DropContainer.js +2 -2
  61. package/es6/components/FileInput/utils/formatBytes.js +2 -2
  62. package/es6/components/FormField/FormField.js +1 -1
  63. package/es6/components/Header/Header.js +4 -4
  64. package/es6/components/Layer/Layer.js +4 -2
  65. package/es6/components/List/List.js +5 -5
  66. package/es6/components/MaskedInput/MaskedInput.js +2 -1
  67. package/es6/components/Menu/Menu.js +7 -3
  68. package/es6/components/NameValueList/NameValueList.js +2 -2
  69. package/es6/components/NameValuePair/NameValuePair.js +2 -2
  70. package/es6/components/Notification/Notification.js +3 -3
  71. package/es6/components/RangeInput/StyledRangeInput.js +4 -4
  72. package/es6/components/Select/EmptySearchOption.js +3 -3
  73. package/es6/components/Select/StyledSelect.js +4 -4
  74. package/es6/components/SelectMultiple/SelectMultiple.js +4 -4
  75. package/es6/components/SelectMultiple/SelectMultipleContainer.js +1 -1
  76. package/es6/components/Skeleton/Skeleton.js +1 -1
  77. package/es6/components/Skeleton/StyledSkeleton.js +2 -2
  78. package/es6/components/Tag/Tag.js +5 -5
  79. package/es6/components/TextArea/StyledTextArea.js +1 -1
  80. package/es6/components/ThumbsRating/ThumbsRating.js +6 -6
  81. package/es6/components/Video/Video.js +2 -2
  82. package/es6/contexts/AnalyticsContext/AnalyticsContext.js +2 -2
  83. package/es6/utils/background.js +4 -4
  84. package/es6/utils/styles.js +2 -2
  85. package/grommet.min.js +1 -1
  86. package/grommet.min.js.map +1 -1
  87. package/package.json +22 -22
  88. package/utils/background.js +4 -4
  89. package/utils/styles.js +2 -2
@@ -56,9 +56,9 @@ var Anchor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
56
56
  }, [children, icon, label]);
57
57
  var coloredIcon = icon;
58
58
  if (icon && !icon.props.color) {
59
- var _theme$anchor, _theme$anchor$size, _theme$anchor$size2;
59
+ var _theme$anchor;
60
60
  coloredIcon = /*#__PURE__*/(0, _react.cloneElement)(icon, {
61
- color: (0, _utils.normalizeColor)(color || ((_theme$anchor = theme.anchor) == null ? void 0 : (_theme$anchor$size = _theme$anchor.size) == null ? void 0 : (_theme$anchor$size2 = _theme$anchor$size[sizeProp || size]) == null ? void 0 : _theme$anchor$size2.color) || theme.anchor.color, theme)
61
+ color: (0, _utils.normalizeColor)(color || ((_theme$anchor = theme.anchor) == null || (_theme$anchor = _theme$anchor.size) == null || (_theme$anchor = _theme$anchor[sizeProp || size]) == null ? void 0 : _theme$anchor.color) || theme.anchor.color, theme)
62
62
  });
63
63
  }
64
64
  var anchorIcon = (0, _utils.useSizedIcon)(coloredIcon, sizeProp || size, theme);
@@ -28,14 +28,14 @@ var StyledAnchor = _styledComponents["default"].a.withConfig({
28
28
  })(["box-sizing:border-box;", " color:", ";", " text-decoration:", ";cursor:pointer;", " ", " ", " ", " ", " ", ""], function (props) {
29
29
  return sizeStyle(props);
30
30
  }, function (props) {
31
- var _props$theme$anchor, _props$theme$anchor$s, _props$theme$anchor$s2;
32
- return (0, _utils.normalizeColor)(props.colorProp || ((_props$theme$anchor = props.theme.anchor) == null ? void 0 : (_props$theme$anchor$s = _props$theme$anchor.size) == null ? void 0 : (_props$theme$anchor$s2 = _props$theme$anchor$s[props.size]) == null ? void 0 : _props$theme$anchor$s2.color) || props.theme.anchor.color, props.theme);
31
+ var _props$theme$anchor;
32
+ return (0, _utils.normalizeColor)(props.colorProp || ((_props$theme$anchor = props.theme.anchor) == null || (_props$theme$anchor = _props$theme$anchor.size) == null || (_props$theme$anchor = _props$theme$anchor[props.size]) == null ? void 0 : _props$theme$anchor.color) || props.theme.anchor.color, props.theme);
33
33
  }, function (props) {
34
- var _props$theme$anchor2, _props$theme$anchor2$, _props$theme$anchor2$2, _props$theme$anchor3, _props$theme$anchor3$, _props$theme$anchor3$2;
35
- return props.weight ? "font-weight: " + props.weight + ";" : (((_props$theme$anchor2 = props.theme.anchor) == null ? void 0 : (_props$theme$anchor2$ = _props$theme$anchor2.size) == null ? void 0 : (_props$theme$anchor2$2 = _props$theme$anchor2$[props.size]) == null ? void 0 : _props$theme$anchor2$2.fontWeight) || props.theme.anchor.fontWeight) && "font-weight: " + (((_props$theme$anchor3 = props.theme.anchor) == null ? void 0 : (_props$theme$anchor3$ = _props$theme$anchor3.size) == null ? void 0 : (_props$theme$anchor3$2 = _props$theme$anchor3$[props.size]) == null ? void 0 : _props$theme$anchor3$2.fontWeight) || props.theme.anchor.fontWeight) + ";";
34
+ var _props$theme$anchor2, _props$theme$anchor3;
35
+ return props.weight ? "font-weight: " + props.weight + ";" : (((_props$theme$anchor2 = props.theme.anchor) == null || (_props$theme$anchor2 = _props$theme$anchor2.size) == null || (_props$theme$anchor2 = _props$theme$anchor2[props.size]) == null ? void 0 : _props$theme$anchor2.fontWeight) || props.theme.anchor.fontWeight) && "font-weight: " + (((_props$theme$anchor3 = props.theme.anchor) == null || (_props$theme$anchor3 = _props$theme$anchor3.size) == null || (_props$theme$anchor3 = _props$theme$anchor3[props.size]) == null ? void 0 : _props$theme$anchor3.fontWeight) || props.theme.anchor.fontWeight) + ";";
36
36
  }, function (props) {
37
- var _props$theme$anchor4, _props$theme$anchor4$, _props$theme$anchor4$2;
38
- return props.hasIcon ? 'none' : ((_props$theme$anchor4 = props.theme.anchor) == null ? void 0 : (_props$theme$anchor4$ = _props$theme$anchor4.size) == null ? void 0 : (_props$theme$anchor4$2 = _props$theme$anchor4$[props.size]) == null ? void 0 : _props$theme$anchor4$2.textDecoration) || props.theme.anchor.textDecoration;
37
+ var _props$theme$anchor4;
38
+ return props.hasIcon ? 'none' : ((_props$theme$anchor4 = props.theme.anchor) == null || (_props$theme$anchor4 = _props$theme$anchor4.size) == null || (_props$theme$anchor4 = _props$theme$anchor4[props.size]) == null ? void 0 : _props$theme$anchor4.textDecoration) || props.theme.anchor.textDecoration;
39
39
  }, _utils.genericStyles, function (props) {
40
40
  return !props.disabled && props.theme.anchor.hover && (0, _styledComponents.css)(["&:hover{", " ", " ", "}"], props.theme.anchor.hover.textDecoration && "text-decoration: " + props.theme.anchor.hover.textDecoration + ";", props.theme.anchor.hover.fontWeight && "font-weight: " + props.theme.anchor.hover.fontWeight + ";", props.theme.anchor.hover.extend);
41
41
  }, function (props) {
@@ -57,7 +57,7 @@ var Box = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
57
57
  if (skeletonProp != null && (_skeletonProp$message = skeletonProp.message) != null && _skeletonProp$message.start) announce(skeletonProp.message.start);else if (typeof (skeletonProp == null ? void 0 : skeletonProp.message) === 'string') announce(skeletonProp.message);
58
58
  return function () {
59
59
  var _skeletonProp$message2;
60
- return (skeletonProp == null ? void 0 : (_skeletonProp$message2 = skeletonProp.message) == null ? void 0 : _skeletonProp$message2.end) && announce(skeletonProp.message.end);
60
+ return (skeletonProp == null || (_skeletonProp$message2 = skeletonProp.message) == null ? void 0 : _skeletonProp$message2.end) && announce(skeletonProp.message.end);
61
61
  };
62
62
  }, [announce, skeletonProp]);
63
63
  var focusable = (0, _react.useMemo)(function () {
@@ -70,7 +70,7 @@ var getIconColor = function getIconColor(paths, theme, colorProp, kind) {
70
70
  while (obj && parts.length) obj = obj[parts.shift()];
71
71
  }
72
72
  if (obj) {
73
- var _obj, _obj$icon, _obj$icon$props;
73
+ var _obj;
74
74
  // use passed in color for background if the theme has a background color
75
75
  var background = colorProp && obj.background && obj.background.color ? colorProp : obj.background;
76
76
 
@@ -78,14 +78,14 @@ var getIconColor = function getIconColor(paths, theme, colorProp, kind) {
78
78
  // to indicate that the theme doesn't want any text color
79
79
  var objColor = obj.color || (Object.prototype.hasOwnProperty.call(obj, 'color') && obj.color === undefined ? false : undefined);
80
80
  var color = void 0;
81
- if ((_obj = obj) != null && (_obj$icon = _obj.icon) != null && (_obj$icon$props = _obj$icon.props) != null && _obj$icon$props.color) color = obj.icon.props.color;
81
+ if ((_obj = obj) != null && (_obj = _obj.icon) != null && (_obj = _obj.props) != null && _obj.color) color = obj.icon.props.color;
82
82
  // if no icon defined for this state, see if there is an icon
83
83
  // with color defined at one higher level
84
84
  else if (paths[index + 1]) {
85
- var _obj2, _obj2$icon, _obj2$icon$props;
85
+ var _obj2;
86
86
  var _parts = paths[index + 1].split('.');
87
87
  while (baseObj && _parts.length) obj = baseObj[_parts.shift()];
88
- if ((_obj2 = obj) != null && (_obj2$icon = _obj2.icon) != null && (_obj2$icon$props = _obj2$icon.props) != null && _obj2$icon$props.color) color = obj.icon.props.color;
88
+ if ((_obj2 = obj) != null && (_obj2 = _obj2.icon) != null && (_obj2 = _obj2.props) != null && _obj2.color) color = obj.icon.props.color;
89
89
  }
90
90
  // use passed in color for text if the theme doesn't have
91
91
  // background or border color
@@ -145,7 +145,7 @@ var getPropertyColor = function getPropertyColor(property, paths, theme, kind, p
145
145
  return result;
146
146
  };
147
147
  var Button = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
148
- var _theme$button$kind, _theme$button2, _theme$button2$badge;
148
+ var _theme$button$kind, _theme$button2;
149
149
  var active = _ref.active,
150
150
  _ref$align = _ref.align,
151
151
  align = _ref$align === void 0 ? 'center' : _ref$align,
@@ -333,9 +333,9 @@ var Button = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
333
333
  var second = reverse ? buttonIcon : label;
334
334
  var contents;
335
335
  if (first && second) {
336
- var _theme$button, _theme$button$kind2;
336
+ var _theme$button;
337
337
  contents = /*#__PURE__*/_react["default"].createElement(_Box.Box, {
338
- direction: ((_theme$button = theme.button) == null ? void 0 : (_theme$button$kind2 = _theme$button[kind]) == null ? void 0 : _theme$button$kind2.direction) || 'row',
338
+ direction: ((_theme$button = theme.button) == null || (_theme$button = _theme$button[kind]) == null ? void 0 : _theme$button.direction) || 'row',
339
339
  align: "center",
340
340
  justify: justify || (align === 'center' ? 'center' : 'between'),
341
341
  gap: gap || theme.button.gap,
@@ -357,7 +357,7 @@ var Button = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
357
357
  // (!kind && icon && !label) is necessary because for old button logic,
358
358
  // if button has icon but not label, it will be considered "plain",
359
359
  // so no border or background will be applied
360
- var innerBadge = ((_theme$button2 = theme.button) == null ? void 0 : (_theme$button2$badge = _theme$button2.badge) == null ? void 0 : _theme$button2$badge.align) !== 'container' && (!background && !border || !kind && icon && !label);
360
+ var innerBadge = ((_theme$button2 = theme.button) == null || (_theme$button2 = _theme$button2.badge) == null ? void 0 : _theme$button2.align) !== 'container' && (!background && !border || !kind && icon && !label);
361
361
  if (badgeProp && innerBadge) {
362
362
  contents = /*#__PURE__*/_react["default"].createElement(_Badge.Badge, {
363
363
  content: badgeProp
@@ -22,19 +22,19 @@ var fontStyle = function fontStyle(props) {
22
22
  return (0, _styledComponents.css)(["font-size:", ";line-height:", ";"], data.size, props.hasIcon && !props.hasLabel ? 0 : data.height);
23
23
  };
24
24
  var padFromTheme = function padFromTheme(size, theme, themeObj, kind, iconOnly) {
25
- var _themeObj$size, _themeObj$size$size, _themeObj$size$size$i, _themeObj$size3, _themeObj$size3$size, _themeObj$size3$size$;
25
+ var _themeObj$size, _themeObj$size3;
26
26
  if (size === void 0) {
27
27
  size = 'medium';
28
28
  }
29
- if (size && iconOnly && themeObj != null && (_themeObj$size = themeObj.size) != null && (_themeObj$size$size = _themeObj$size[size]) != null && (_themeObj$size$size$i = _themeObj$size$size.iconOnly) != null && _themeObj$size$size$i.pad) {
30
- var _themeObj$size2, _themeObj$size2$size, _themeObj$size2$size$;
31
- var pad = themeObj == null ? void 0 : (_themeObj$size2 = themeObj.size) == null ? void 0 : (_themeObj$size2$size = _themeObj$size2[size]) == null ? void 0 : (_themeObj$size2$size$ = _themeObj$size2$size.iconOnly) == null ? void 0 : _themeObj$size2$size$.pad;
29
+ if (size && iconOnly && themeObj != null && (_themeObj$size = themeObj.size) != null && (_themeObj$size = _themeObj$size[size]) != null && (_themeObj$size = _themeObj$size.iconOnly) != null && _themeObj$size.pad) {
30
+ var _themeObj$size2;
31
+ var pad = themeObj == null || (_themeObj$size2 = themeObj.size) == null || (_themeObj$size2 = _themeObj$size2[size]) == null || (_themeObj$size2 = _themeObj$size2.iconOnly) == null ? void 0 : _themeObj$size2.pad;
32
32
  return {
33
33
  vertical: typeof pad === 'string' ? pad : pad.vertical,
34
34
  horizontal: typeof pad === 'string' ? pad : pad.horizontal
35
35
  };
36
36
  }
37
- if (size && themeObj != null && (_themeObj$size3 = themeObj.size) != null && (_themeObj$size3$size = _themeObj$size3[size]) != null && (_themeObj$size3$size$ = _themeObj$size3$size[kind]) != null && _themeObj$size3$size$.pad) {
37
+ if (size && themeObj != null && (_themeObj$size3 = themeObj.size) != null && (_themeObj$size3 = _themeObj$size3[size]) != null && (_themeObj$size3 = _themeObj$size3[kind]) != null && _themeObj$size3.pad) {
38
38
  return themeObj.size[size][kind].pad;
39
39
  }
40
40
  if (size && themeObj.size && themeObj.size[size] && themeObj.size[size].pad) {
@@ -433,14 +433,14 @@ var Calendar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref3, ref) {
433
433
  }));
434
434
  };
435
435
  var handleRange = (0, _react.useCallback)(function (selectedDate) {
436
- var _priorRange$, _priorRange$$, _priorRange$2, _priorRange$2$;
436
+ var _priorRange$, _priorRange$2;
437
437
  var result;
438
438
  var priorRange = normalizeRange(value, activeDate);
439
439
  // deselect when date clicked was the start/end of the range
440
- if (selectedDate.getTime() === (priorRange == null ? void 0 : (_priorRange$ = priorRange[0]) == null ? void 0 : (_priorRange$$ = _priorRange$[0]) == null ? void 0 : _priorRange$$.getTime())) {
440
+ if (selectedDate.getTime() === (priorRange == null || (_priorRange$ = priorRange[0]) == null || (_priorRange$ = _priorRange$[0]) == null ? void 0 : _priorRange$.getTime())) {
441
441
  result = [[undefined, priorRange[0][1]]];
442
442
  setActiveDate('start');
443
- } else if (selectedDate.getTime() === (priorRange == null ? void 0 : (_priorRange$2 = priorRange[0]) == null ? void 0 : (_priorRange$2$ = _priorRange$2[1]) == null ? void 0 : _priorRange$2$.getTime())) {
443
+ } else if (selectedDate.getTime() === (priorRange == null || (_priorRange$2 = priorRange[0]) == null || (_priorRange$2 = _priorRange$2[1]) == null ? void 0 : _priorRange$2.getTime())) {
444
444
  result = [[priorRange[0][0], undefined]];
445
445
  setActiveDate('end');
446
446
  }
@@ -15,14 +15,14 @@ var fillStyle = function fillStyle() {
15
15
  };
16
16
  var disabledStyle = "\n opacity: 0.5;\n cursor: default;\n";
17
17
  var hoverStyle = (0, _styledComponents.css)([":hover input:not([disabled]) + div,:hover input:not([disabled]) + span{border-color:", ";", "}:hover{background-color:", ";}"], function (props) {
18
- var _props$theme$checkBox, _props$theme$checkBox2;
19
- return (0, _utils.normalizeColor)((_props$theme$checkBox = props.theme.checkBox.hover) == null ? void 0 : (_props$theme$checkBox2 = _props$theme$checkBox.border) == null ? void 0 : _props$theme$checkBox2.color, props.theme);
18
+ var _props$theme$checkBox;
19
+ return (0, _utils.normalizeColor)((_props$theme$checkBox = props.theme.checkBox.hover) == null || (_props$theme$checkBox = _props$theme$checkBox.border) == null ? void 0 : _props$theme$checkBox.color, props.theme);
20
20
  }, function (props) {
21
- var _props$theme$checkBox3;
22
- return (_props$theme$checkBox3 = props.theme.checkBox.hover) == null ? void 0 : _props$theme$checkBox3.extend;
21
+ var _props$theme$checkBox2;
22
+ return (_props$theme$checkBox2 = props.theme.checkBox.hover) == null ? void 0 : _props$theme$checkBox2.extend;
23
23
  }, function (props) {
24
- var _props$theme$checkBox4, _props$theme$checkBox5;
25
- return (0, _utils.normalizeColor)(!props.disabled && ((_props$theme$checkBox4 = props.theme.checkBox.hover) == null ? void 0 : (_props$theme$checkBox5 = _props$theme$checkBox4.background) == null ? void 0 : _props$theme$checkBox5.color), props.theme);
24
+ var _props$theme$checkBox3;
25
+ return (0, _utils.normalizeColor)(!props.disabled && ((_props$theme$checkBox3 = props.theme.checkBox.hover) == null || (_props$theme$checkBox3 = _props$theme$checkBox3.background) == null ? void 0 : _props$theme$checkBox3.color), props.theme);
26
26
  });
27
27
  var StyledCheckBoxIcon = _styledComponents["default"].svg.withConfig({
28
28
  displayName: "StyledCheckBox__StyledCheckBoxIcon",
@@ -55,8 +55,8 @@ var StyledCheckBoxContainer = _styledComponents["default"].label.withConfig({
55
55
  }, function (props) {
56
56
  return !props.disabled && 'cursor: pointer;';
57
57
  }, hoverStyle, function (props) {
58
- var _props$theme$checkBox6, _props$theme$checkBox7, _props$theme$checkBox8, _props$theme$checkBox9;
59
- return props.focus && !props.focusIndicator && "\n input:not([disabled]) + div,\n input:not([disabled]) + span {\n border-color: " + (0, _utils.normalizeColor)((_props$theme$checkBox6 = props.theme.checkBox.hover) == null ? void 0 : (_props$theme$checkBox7 = _props$theme$checkBox6.border) == null ? void 0 : _props$theme$checkBox7.color, props.theme) + ";\n }\n\n background-color: " + (0, _utils.normalizeColor)(!props.disabled && ((_props$theme$checkBox8 = props.theme.checkBox.hover) == null ? void 0 : (_props$theme$checkBox9 = _props$theme$checkBox8.background) == null ? void 0 : _props$theme$checkBox9.color), props.theme) + ";";
58
+ var _props$theme$checkBox4, _props$theme$checkBox5;
59
+ return props.focus && !props.focusIndicator && "\n input:not([disabled]) + div,\n input:not([disabled]) + span {\n border-color: " + (0, _utils.normalizeColor)((_props$theme$checkBox4 = props.theme.checkBox.hover) == null || (_props$theme$checkBox4 = _props$theme$checkBox4.border) == null ? void 0 : _props$theme$checkBox4.color, props.theme) + ";\n }\n\n background-color: " + (0, _utils.normalizeColor)(!props.disabled && ((_props$theme$checkBox5 = props.theme.checkBox.hover) == null || (_props$theme$checkBox5 = _props$theme$checkBox5.background) == null ? void 0 : _props$theme$checkBox5.color), props.theme) + ";";
60
60
  }, function (props) {
61
61
  return props.theme.checkBox.extend;
62
62
  });
@@ -63,18 +63,23 @@ var viewFormKeyMap = {
63
63
  view: formViewNameKey
64
64
  };
65
65
 
66
- // flatten nested objects. For example: { a: { b: v } } -> { 'a.b': v }
66
+ // flatten nested objects.
67
+ // For example: { a: { b: v, c: z } } -> { 'a.b': v, 'a.c': z }
67
68
  var flatten = function flatten(formValue, options) {
68
69
  var result = JSON.parse(JSON.stringify(formValue));
69
- Object.keys(result).forEach(function (k) {
70
- var name = k;
71
- // flatten one level at a time, ignore _range situations
72
- while (typeof result[name] === 'object' && !Array.isArray(result[name]) && (options != null && options.full || !result[name][formRangeKey])) {
73
- var subPath = Object.keys(result[name])[0];
74
- var path = name + "." + subPath;
75
- result[path] = result[name][subPath];
76
- delete result[name];
77
- name = path;
70
+ Object.keys(result).forEach(function (i) {
71
+ // We check the type of the i using
72
+ // typeof() function and recursively
73
+ // call the function again
74
+ // ignore _range situations
75
+ if (typeof result[i] === 'object' && !Array.isArray(result[i]) && (options != null && options.full || !result[i][formRangeKey])) {
76
+ var temp = flatten(result[i]);
77
+ Object.keys(temp).forEach(function (j) {
78
+ // Store temp in result
79
+ // ignore empty arrays
80
+ if (!Array.isArray(temp[j]) || Array.isArray(temp[j]) && temp[j].length) result[i + "." + j] = temp[j];
81
+ });
82
+ delete result[i];
78
83
  }
79
84
  });
80
85
  return result;
@@ -43,7 +43,7 @@ var fetchLaunches = /*#__PURE__*/function () {
43
43
  while (1) switch (_context.prev = _context.next) {
44
44
  case 0:
45
45
  query = buildQuery(view);
46
- sort = (_sort = {}, _sort[(view == null ? void 0 : (_view$sort = view.sort) == null ? void 0 : _view$sort.property) || 'name'] = (view == null ? void 0 : (_view$sort2 = view.sort) == null ? void 0 : _view$sort2.direction) || 'asc', _sort);
46
+ sort = (_sort = {}, _sort[(view == null || (_view$sort = view.sort) == null ? void 0 : _view$sort.property) || 'name'] = (view == null || (_view$sort2 = view.sort) == null ? void 0 : _view$sort2.direction) || 'asc', _sort);
47
47
  body = {
48
48
  options: {
49
49
  populate: [{
@@ -194,7 +194,7 @@ var Table = function Table() {
194
194
  });
195
195
  }, [search, limit, sort, view.properties]);
196
196
  var numberItems = (data == null ? void 0 : data.totalDocs) || 0;
197
- var rocketOptions = (rockets == null ? void 0 : (_rockets$docs = rockets.docs) == null ? void 0 : _rockets$docs.map(function (_ref4) {
197
+ var rocketOptions = (rockets == null || (_rockets$docs = rockets.docs) == null ? void 0 : _rockets$docs.map(function (_ref4) {
198
198
  var name = _ref4.name,
199
199
  id = _ref4.id;
200
200
  return {
@@ -42,7 +42,7 @@ var fetchLaunches = /*#__PURE__*/function () {
42
42
  while (1) switch (_context.prev = _context.next) {
43
43
  case 0:
44
44
  query = buildQuery(view);
45
- sort = (_sort = {}, _sort[(view == null ? void 0 : (_view$sort = view.sort) == null ? void 0 : _view$sort.property) || 'name'] = (view == null ? void 0 : (_view$sort2 = view.sort) == null ? void 0 : _view$sort2.direction) || 'asc', _sort);
45
+ sort = (_sort = {}, _sort[(view == null || (_view$sort = view.sort) == null ? void 0 : _view$sort.property) || 'name'] = (view == null || (_view$sort2 = view.sort) == null ? void 0 : _view$sort2.direction) || 'asc', _sort);
46
46
  body = {
47
47
  options: {
48
48
  populate: [{
@@ -64,7 +64,7 @@ var StarWars = function StarWars() {
64
64
  (0, _react.useEffect)(function () {
65
65
  var _abortRef$current;
66
66
  // This API is a bit slow, abort any uncompleted requests.
67
- abortRef == null ? void 0 : (_abortRef$current = abortRef.current) == null ? void 0 : _abortRef$current.abort();
67
+ abortRef == null || (_abortRef$current = abortRef.current) == null ? void 0 : _abortRef$current.abort();
68
68
  abortRef.current = new AbortController();
69
69
  fetchData(view, abortRef.current.signal).then(function (_ref2) {
70
70
  var count = _ref2.count,
@@ -305,9 +305,9 @@ var DataChart = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
305
305
  var chartBounds = chartValues.map(function (_, index) {
306
306
  var type = charts[index].type;
307
307
  if (stackedChartType[type]) {
308
- var _chartValues$index, _chartValues$index$;
308
+ var _chartValues$index;
309
309
  // merge values for bars, areas, and lines cases
310
- var mergedValues = ((_chartValues$index = chartValues[index]) == null ? void 0 : (_chartValues$index$ = _chartValues$index[0]) == null ? void 0 : _chartValues$index$.slice(0)) || [];
310
+ var mergedValues = ((_chartValues$index = chartValues[index]) == null || (_chartValues$index = _chartValues$index[0]) == null ? void 0 : _chartValues$index.slice(0)) || [];
311
311
  chartValues[index].slice(1) // skip first index as that is the x value
312
312
  .filter(function (values) {
313
313
  return values;
@@ -555,7 +555,7 @@ var DataChart = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
555
555
 
556
556
  var xAxisElement = axis && axis.x && (chartProps.length || boundsProp != null && boundsProp.x) ? /*#__PURE__*/_react["default"].createElement(_XAxis.XAxis, {
557
557
  axis: axis,
558
- values: (boundsProp == null ? void 0 : (_boundsProp$x = boundsProp.x) == null ? void 0 : _boundsProp$x.slice(0)) || (Array.isArray(chartProps[0]) ? chartProps[0][0] : chartProps[0]).axis.x,
558
+ values: (boundsProp == null || (_boundsProp$x = boundsProp.x) == null ? void 0 : _boundsProp$x.slice(0)) || (Array.isArray(chartProps[0]) ? chartProps[0][0] : chartProps[0]).axis.x,
559
559
  pad: !horizontal && offsetPad ? _extends({}, pad, {
560
560
  end: offsetPad
561
561
  }) : pad,
@@ -569,7 +569,7 @@ var DataChart = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
569
569
  }) : null;
570
570
  var yAxisElement = axis && axis.y && (chartProps.length || boundsProp != null && boundsProp.y) ? /*#__PURE__*/_react["default"].createElement(_YAxis.YAxis, {
571
571
  axis: axis,
572
- values: (boundsProp == null ? void 0 : (_boundsProp$y = boundsProp.y) == null ? void 0 : _boundsProp$y.slice(0).reverse()) || (Array.isArray(chartProps[0]) ? chartProps[0][0] : chartProps[0]).axis.y,
572
+ values: (boundsProp == null || (_boundsProp$y = boundsProp.y) == null ? void 0 : _boundsProp$y.slice(0).reverse()) || (Array.isArray(chartProps[0]) ? chartProps[0][0] : chartProps[0]).axis.y,
573
573
  pad: horizontal && offsetPad ? _extends({}, pad, {
574
574
  bottom: offsetPad
575
575
  }) : pad,
@@ -154,7 +154,7 @@ var Detail = function Detail(_ref) {
154
154
  }, series.filter(function (_ref2) {
155
155
  var _data$detailIndex;
156
156
  var property = _ref2.property;
157
- return (!activeProperty || activeProperty === property) && (data == null ? void 0 : (_data$detailIndex = data[detailIndex]) == null ? void 0 : _data$detailIndex[property]) !== undefined || axis && axis.x && axis.x.property === property;
157
+ return (!activeProperty || activeProperty === property) && (data == null || (_data$detailIndex = data[detailIndex]) == null ? void 0 : _data$detailIndex[property]) !== undefined || axis && axis.x && axis.x.property === property;
158
158
  }).map(function (serie) {
159
159
  var propertyStyle = seriesStyles[serie.property];
160
160
  var axisValue = horizontalProp ? data[detailIndex][serie.property] : detailIndex;
@@ -70,8 +70,8 @@ var DataFilter = function DataFilter(_ref) {
70
70
  var _properties$property, _properties$property2;
71
71
  if (children) return [undefined, undefined]; // caller driving
72
72
 
73
- var optionsIn = optionsProp || (properties == null ? void 0 : (_properties$property = properties[property]) == null ? void 0 : _properties$property.options);
74
- var rangeIn = rangeProp || (properties == null ? void 0 : (_properties$property2 = properties[property]) == null ? void 0 : _properties$property2.range);
73
+ var optionsIn = optionsProp || (properties == null || (_properties$property = properties[property]) == null ? void 0 : _properties$property.options);
74
+ var rangeIn = rangeProp || (properties == null || (_properties$property2 = properties[property]) == null ? void 0 : _properties$property2.range);
75
75
  if (optionsIn) return [optionsIn, undefined];
76
76
  if (rangeIn) return [undefined, [rangeIn.min, rangeIn.max]];
77
77
 
@@ -158,7 +158,7 @@ var DataFilter = function DataFilter(_ref) {
158
158
  }, content);else content = /*#__PURE__*/_react["default"].createElement(_FormField.FormField, _extends({
159
159
  htmlFor: id,
160
160
  name: property,
161
- label: (properties == null ? void 0 : (_properties$property3 = properties[property]) == null ? void 0 : _properties$property3.label) || property
161
+ label: (properties == null || (_properties$property3 = properties[property]) == null ? void 0 : _properties$property3.label) || property
162
162
  }, rest), content);
163
163
  return content;
164
164
  };
@@ -180,7 +180,7 @@ var Header = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
180
180
  return !disabled.includes(v) || selected.includes(v);
181
181
  }) : primaryValues;
182
182
  nextGroupSelected[''] = 'all';
183
- groupBy == null ? void 0 : (_groupBy$expandable = groupBy.expandable) == null ? void 0 : _groupBy$expandable.forEach(function (key) {
183
+ groupBy == null || (_groupBy$expandable = groupBy.expandable) == null ? void 0 : _groupBy$expandable.forEach(function (key) {
184
184
  nextGroupSelected[key] = 'all';
185
185
  });
186
186
  }
@@ -281,20 +281,20 @@ var normalizeCellProps = function normalizeCellProps(props, theme) {
281
281
  pinned: {}
282
282
  };
283
283
  cellPropertyNames.forEach(function (propName) {
284
- var _props$propName, _theme$dataTable, _theme$dataTable$cont, _theme$table, _theme$table$context, _props$propName3, _props$propName3$pinn, _props$propName5, _theme$dataTable2, _theme$dataTable2$pin, _theme$dataTable2$pin2;
285
- var value = (props == null ? void 0 : (_props$propName = props[propName]) == null ? void 0 : _props$propName[context]) ||
284
+ var _props$propName, _theme$dataTable, _theme$table, _props$propName3, _props$propName5, _theme$dataTable2;
285
+ var value = (props == null || (_props$propName = props[propName]) == null ? void 0 : _props$propName[context]) ||
286
286
  // if the propName is used without context, it applies to all contexts
287
287
  tableContextNames.every(function (n) {
288
288
  var _props$propName2;
289
289
  return !(props != null && (_props$propName2 = props[propName]) != null && _props$propName2[n]);
290
- }) && (props == null ? void 0 : props[propName]) || (theme == null ? void 0 : (_theme$dataTable = theme.dataTable) == null ? void 0 : (_theme$dataTable$cont = _theme$dataTable[context]) == null ? void 0 : _theme$dataTable$cont[propName]) || (theme == null ? void 0 : (_theme$table = theme.table) == null ? void 0 : (_theme$table$context = _theme$table[context]) == null ? void 0 : _theme$table$context[propName]);
290
+ }) && (props == null ? void 0 : props[propName]) || (theme == null || (_theme$dataTable = theme.dataTable) == null || (_theme$dataTable = _theme$dataTable[context]) == null ? void 0 : _theme$dataTable[propName]) || (theme == null || (_theme$table = theme.table) == null || (_theme$table = _theme$table[context]) == null ? void 0 : _theme$table[propName]);
291
291
  if (value !== undefined) result[context][propName] = value;
292
292
 
293
293
  // pinned case
294
- value = (props == null ? void 0 : (_props$propName3 = props[propName]) == null ? void 0 : (_props$propName3$pinn = _props$propName3.pinned) == null ? void 0 : _props$propName3$pinn[context]) || context === 'body' && tableContextNames.every(function (n) {
295
- var _props$propName4, _props$propName4$pinn;
296
- return !(props != null && (_props$propName4 = props[propName]) != null && (_props$propName4$pinn = _props$propName4.pinned) != null && _props$propName4$pinn[n]);
297
- }) && (props == null ? void 0 : (_props$propName5 = props[propName]) == null ? void 0 : _props$propName5.pinned) || (theme == null ? void 0 : (_theme$dataTable2 = theme.dataTable) == null ? void 0 : (_theme$dataTable2$pin = _theme$dataTable2.pinned) == null ? void 0 : (_theme$dataTable2$pin2 = _theme$dataTable2$pin[context]) == null ? void 0 : _theme$dataTable2$pin2[propName]);
294
+ value = (props == null || (_props$propName3 = props[propName]) == null || (_props$propName3 = _props$propName3.pinned) == null ? void 0 : _props$propName3[context]) || context === 'body' && tableContextNames.every(function (n) {
295
+ var _props$propName4;
296
+ return !(props != null && (_props$propName4 = props[propName]) != null && (_props$propName4 = _props$propName4.pinned) != null && _props$propName4[n]);
297
+ }) && (props == null || (_props$propName5 = props[propName]) == null ? void 0 : _props$propName5.pinned) || (theme == null || (_theme$dataTable2 = theme.dataTable) == null || (_theme$dataTable2 = _theme$dataTable2.pinned) == null || (_theme$dataTable2 = _theme$dataTable2[context]) == null ? void 0 : _theme$dataTable2[propName]);
298
298
  if (value !== undefined) {
299
299
  if (propName === 'background' && theme.background && value.opacity && !value.color)
300
300
  // theme context has an active background color but the
@@ -319,7 +319,7 @@ var normalizeRowCellProps = function normalizeRowCellProps(rowProps, cellProps,
319
319
  };
320
320
  ['background', 'border', 'pad'].forEach(function (propName) {
321
321
  var _rowProps$primaryKey;
322
- var row = primaryKey && rowProps && (rowProps == null ? void 0 : (_rowProps$primaryKey = rowProps[primaryKey]) == null ? void 0 : _rowProps$primaryKey[propName]);
322
+ var row = primaryKey && rowProps && (rowProps == null || (_rowProps$primaryKey = rowProps[primaryKey]) == null ? void 0 : _rowProps$primaryKey[propName]);
323
323
  var cell = cellProps[propName];
324
324
  var value = row && (Array.isArray(row) ? row[index % row.length] : row) || (Array.isArray(cell) ? cell[index % cell.length] : cell);
325
325
  if (value !== undefined) result[propName] = value;
@@ -147,7 +147,7 @@ var DateInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, refArg) {
147
147
  // resets the textValue
148
148
  (0, _react.useEffect)(function () {
149
149
  var _ref$current;
150
- var form = ref == null ? void 0 : (_ref$current = ref.current) == null ? void 0 : _ref$current.form;
150
+ var form = ref == null || (_ref$current = ref.current) == null ? void 0 : _ref$current.form;
151
151
  var handleFormReset = function handleFormReset(e) {
152
152
  if (schema && ref.current && e.target.contains(ref.current)) {
153
153
  setTextValue('');
@@ -178,14 +178,14 @@ var textToValue = function textToValue(text, schema, range, reference, outputFor
178
178
  parts.m = pullDigits(text, index);
179
179
  index += parts.m.length;
180
180
  } else if (_char3 === 'd') {
181
- var _parts, _parts$d;
181
+ var _parts;
182
182
  parts.d = pullDigits(text, index);
183
183
  // when format is something like yyyy/mm/dd,
184
184
  // '0' as incomplete day can cause date to be
185
185
  // prematurely calculated.
186
186
  // ex: 2022/01/0 would reutrn 2021/12/31 in addDate()
187
187
  if (parts.d === '0') delete parts.d;
188
- index += ((_parts = parts) == null ? void 0 : (_parts$d = _parts.d) == null ? void 0 : _parts$d.length) || 0;
188
+ index += ((_parts = parts) == null || (_parts = _parts.d) == null ? void 0 : _parts.length) || 0;
189
189
  } else if (_char3 === 'y') {
190
190
  parts.y = pullDigits(text, index);
191
191
  index += parts.y.length;
@@ -87,7 +87,7 @@ var DropContainer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
87
87
  (0, _react.useEffect)(function () {
88
88
  var notifyAlign = function notifyAlign() {
89
89
  var _dropRef$current;
90
- var styleCurrent = dropRef == null ? void 0 : (_dropRef$current = dropRef.current) == null ? void 0 : _dropRef$current.style;
90
+ var styleCurrent = dropRef == null || (_dropRef$current = dropRef.current) == null ? void 0 : _dropRef$current.style;
91
91
  var alignControl = (styleCurrent == null ? void 0 : styleCurrent.top) !== '' ? 'top' : 'bottom';
92
92
  onAlign(alignControl);
93
93
  };
@@ -198,7 +198,7 @@ var DropContainer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
198
198
  };
199
199
  var scrollParents;
200
200
  var addScrollListeners = function addScrollListeners() {
201
- scrollParents = (0, _utils.findScrollParents)(dropTarget);
201
+ scrollParents = (0, _utils.findScrollParents)((dropTarget == null ? void 0 : dropTarget.current) || dropTarget);
202
202
  scrollParents.forEach(function (scrollParent) {
203
203
  return scrollParent.addEventListener('scroll', place);
204
204
  });
@@ -6,8 +6,8 @@ var SI_CONVERSION_FACTOR = 1000;
6
6
  var IEC_CONVERSION_FACTOR = 1024;
7
7
  var getCurrentOS = function getCurrentOS() {
8
8
  var currentOS = ['Win', 'Linux', 'Mac'].find(function (v) {
9
- var _window, _window$navigator, _window$navigator$use;
10
- if (typeof window !== 'undefined') return ((_window = window) == null ? void 0 : (_window$navigator = _window.navigator) == null ? void 0 : (_window$navigator$use = _window$navigator.userAgent) == null ? void 0 : _window$navigator$use.indexOf(v)) >= 0;
9
+ var _window;
10
+ if (typeof window !== 'undefined') return ((_window = window) == null || (_window = _window.navigator) == null || (_window = _window.userAgent) == null ? void 0 : _window.indexOf(v)) >= 0;
11
11
  return undefined;
12
12
  });
13
13
  return currentOS;
@@ -200,7 +200,7 @@ var FormField = /*#__PURE__*/(0, _react.forwardRef)(function (_ref3, ref) {
200
200
  return /*#__PURE__*/(0, _react.cloneElement)(child, {
201
201
  plain: true,
202
202
  focusIndicator: false,
203
- pad: 'CheckBox'.indexOf(child.type.displayName) !== -1 ? formFieldTheme == null ? void 0 : (_formFieldTheme$check = formFieldTheme.checkBox) == null ? void 0 : _formFieldTheme$check.pad : undefined
203
+ pad: 'CheckBox'.indexOf(child.type.displayName) !== -1 ? formFieldTheme == null || (_formFieldTheme$check = formFieldTheme.checkBox) == null ? void 0 : _formFieldTheme$check.pad : undefined
204
204
  });
205
205
  }
206
206
  return child;
@@ -12,7 +12,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
12
12
  function _extends() { _extends = Object.assign ? Object.assign.bind() : 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.apply(this, arguments); }
13
13
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
14
14
  var Header = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
15
- var _theme$header2, _theme$header2$sticky;
15
+ var _theme$header2;
16
16
  var sticky = _ref.sticky,
17
17
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
18
18
  var theme = (0, _react.useContext)(_styledComponents.ThemeContext);
@@ -29,11 +29,11 @@ var Header = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
29
29
  header.style.top = "-" + header.getBoundingClientRect().height + "px";
30
30
  header.style.zIndex = '';
31
31
  } else if (scrollTop - nextScrollTop > 0) {
32
- var _theme$header, _theme$header$sticky;
32
+ var _theme$header;
33
33
  // ensure that header moves with the target
34
34
  header.style.position = 'sticky';
35
35
  header.style.top = '0px';
36
- header.style.zIndex = "" + ((_theme$header = theme.header) == null ? void 0 : (_theme$header$sticky = _theme$header.sticky) == null ? void 0 : _theme$header$sticky.zIndex);
36
+ header.style.zIndex = "" + ((_theme$header = theme.header) == null || (_theme$header = _theme$header.sticky) == null ? void 0 : _theme$header.zIndex);
37
37
  header.style.transition = 'top 0.6s';
38
38
  }
39
39
  scrollTop = nextScrollTop;
@@ -50,7 +50,7 @@ var Header = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
50
50
  window.removeEventListener('scroll', updateScrollDir, true);
51
51
  }
52
52
  };
53
- }, [headerRef, sticky, (_theme$header2 = theme.header) == null ? void 0 : (_theme$header2$sticky = _theme$header2.sticky) == null ? void 0 : _theme$header2$sticky.zIndex]);
53
+ }, [headerRef, sticky, (_theme$header2 = theme.header) == null || (_theme$header2 = _theme$header2.sticky) == null ? void 0 : _theme$header2.zIndex]);
54
54
  return /*#__PURE__*/_react["default"].createElement(_Box.Box, _extends({
55
55
  align: "center",
56
56
  as: "header",
@@ -62,11 +62,13 @@ var Layer = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
62
62
  // we add the id and query here so the unit tests work
63
63
  var clone = containerTarget.getRootNode().getElementById('layerClone');
64
64
  if (clone) {
65
- containerTarget.removeChild(clone);
65
+ if (containerTarget.contains(clone)) {
66
+ containerTarget.removeChild(clone);
67
+ }
66
68
  layerContainer.remove();
67
69
  }
68
70
  }, _StyledLayer.animationDuration);
69
- } else {
71
+ } else if (containerTarget.contains(layerContainer)) {
70
72
  containerTarget.removeChild(layerContainer);
71
73
  }
72
74
  }
@@ -49,12 +49,12 @@ var StyledItem = (0, _styledComponents["default"])(_Box.Box).withConfig({
49
49
  forceOutline: true,
50
50
  skipSvgChildren: true
51
51
  }), function (props) {
52
- var _props$theme$list, _props$theme$list$ite;
52
+ var _props$theme$list;
53
53
  var disabledStyle;
54
- if (props.isDisabled && (_props$theme$list = props.theme.list) != null && (_props$theme$list$ite = _props$theme$list.item) != null && _props$theme$list$ite.disabled) {
55
- var _props$theme$list$ite2 = props.theme.list.item.disabled,
56
- color = _props$theme$list$ite2.color,
57
- cursor = _props$theme$list$ite2.cursor;
54
+ if (props.isDisabled && (_props$theme$list = props.theme.list) != null && (_props$theme$list = _props$theme$list.item) != null && _props$theme$list.disabled) {
55
+ var _props$theme$list$ite = props.theme.list.item.disabled,
56
+ color = _props$theme$list$ite.color,
57
+ cursor = _props$theme$list$ite.cursor;
58
58
  disabledStyle = {
59
59
  color: (0, _utils.normalizeColor)(color, props.theme),
60
60
  cursor: cursor
@@ -154,7 +154,8 @@ var MaskedInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
154
154
  var formContext = (0, _react.useContext)(_FormContext.FormContext);
155
155
  var _formContext$useFormI = formContext.useFormInput({
156
156
  name: name,
157
- value: valueProp
157
+ value: valueProp,
158
+ initialValue: ''
158
159
  }),
159
160
  value = _formContext$useFormI[0],
160
161
  setValue = _formContext$useFormI[1];
@@ -328,18 +328,22 @@ var Menu = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
328
328
  if (itemCount && Array.isArray(items[0])) {
329
329
  var index = 0;
330
330
  menuContent = items.map(function (group, groupIndex) {
331
- var _theme$menu$group, _theme$menu$group$sep, _theme$menu$group2, _theme$menu$group2$se, _theme$menu$group3;
331
+ var _theme$menu$group, _theme$menu$group2, _theme$menu$group3;
332
332
  return /*#__PURE__*/_react["default"].createElement(_Box.Box
333
333
  // eslint-disable-next-line react/no-array-index-key
334
334
  , {
335
335
  key: groupIndex
336
+ // ensure menu groups don't collapse if vertical space on screen
337
+ // causes scrolling within the menu
338
+ ,
339
+ flex: false
336
340
  }, groupIndex > 0 && /*#__PURE__*/_react["default"].createElement(_Box.Box, {
337
341
  pad: theme.menu.group.separator.pad
338
342
  }, /*#__PURE__*/_react["default"].createElement(_Box.Box, {
339
343
  border: {
340
344
  side: 'top',
341
- color: (_theme$menu$group = theme.menu.group) == null ? void 0 : (_theme$menu$group$sep = _theme$menu$group.separator) == null ? void 0 : _theme$menu$group$sep.color,
342
- size: (_theme$menu$group2 = theme.menu.group) == null ? void 0 : (_theme$menu$group2$se = _theme$menu$group2.separator) == null ? void 0 : _theme$menu$group2$se.size
345
+ color: (_theme$menu$group = theme.menu.group) == null || (_theme$menu$group = _theme$menu$group.separator) == null ? void 0 : _theme$menu$group.color,
346
+ size: (_theme$menu$group2 = theme.menu.group) == null || (_theme$menu$group2 = _theme$menu$group2.separator) == null ? void 0 : _theme$menu$group2.size
343
347
  }
344
348
  })), /*#__PURE__*/_react["default"].createElement(_Box.Box, (_theme$menu$group3 = theme.menu.group) == null ? void 0 : _theme$menu$group3.container, group.map(function (item) {
345
349
  // item index needs to be its index in the entire menu as if
@@ -13,7 +13,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
13
13
  function _extends() { _extends = Object.assign ? Object.assign.bind() : 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.apply(this, arguments); }
14
14
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
15
15
  var NameValueList = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
16
- var _theme$nameValueList$, _theme$nameValueList$2;
16
+ var _theme$nameValueList$;
17
17
  var align = _ref.align,
18
18
  _ref$layout = _ref.layout,
19
19
  layout = _ref$layout === void 0 ? 'column' : _ref$layout,
@@ -38,7 +38,7 @@ var NameValueList = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
38
38
  size: !Array.isArray(valueWidth) ? ['auto', valueWidth] : valueWidth
39
39
  };else if (layout === 'column' && pairProps.direction === 'row') columns = [nameWidth, !Array.isArray(valueWidth) ? ['auto', valueWidth] : valueWidth];else columns = [valueWidth];
40
40
  var gap = theme.nameValueList.gap;
41
- if ((pairProps.direction === 'column' || size === 'small') && (_theme$nameValueList$ = theme.nameValueList.pair) != null && (_theme$nameValueList$2 = _theme$nameValueList$.column) != null && _theme$nameValueList$2.gap) {
41
+ if ((pairProps.direction === 'column' || size === 'small') && (_theme$nameValueList$ = theme.nameValueList.pair) != null && (_theme$nameValueList$ = _theme$nameValueList$.column) != null && _theme$nameValueList$.gap) {
42
42
  gap = theme.nameValueList.pair.column.gap;
43
43
  }
44
44
  var listContextValue = (0, _react.useMemo)(function () {
@@ -12,7 +12,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
12
12
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
13
  function _extends() { _extends = Object.assign ? Object.assign.bind() : 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.apply(this, arguments); }
14
14
  var NameValuePair = function NameValuePair(_ref) {
15
- var _theme$nameValuePair, _theme$nameValuePair$;
15
+ var _theme$nameValuePair;
16
16
  var children = _ref.children,
17
17
  nameProp = _ref.name;
18
18
  var _useContext = (0, _react.useContext)(_NameValueListContext.NameValueListContext),
@@ -30,7 +30,7 @@ var NameValuePair = function NameValuePair(_ref) {
30
30
  // <dl> elements must only directly contain
31
31
  // properly-ordered <dt> and <dd> groups
32
32
  var valueGap;
33
- if (column && (_theme$nameValuePair = theme.nameValuePair) != null && (_theme$nameValuePair$ = _theme$nameValuePair.column) != null && _theme$nameValuePair$.gap) valueGap = {
33
+ if (column && (_theme$nameValuePair = theme.nameValuePair) != null && (_theme$nameValuePair = _theme$nameValuePair.column) != null && _theme$nameValuePair.gap) valueGap = {
34
34
  bottom: theme.nameValuePair.column.gap
35
35
  };
36
36
  var name;