grommet 2.33.0 → 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 (93) 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/DataTableColumns/DataTableColumns.js +2 -2
  18. package/components/DateInput/DateInput.js +1 -1
  19. package/components/DateInput/utils.js +2 -2
  20. package/components/Drop/DropContainer.js +2 -2
  21. package/components/FileInput/utils/formatBytes.js +2 -2
  22. package/components/FormField/FormField.js +1 -1
  23. package/components/Header/Header.js +4 -4
  24. package/components/Layer/Layer.js +4 -2
  25. package/components/List/List.js +5 -5
  26. package/components/MaskedInput/MaskedInput.js +2 -1
  27. package/components/Menu/Menu.js +7 -3
  28. package/components/NameValueList/NameValueList.js +2 -2
  29. package/components/NameValuePair/NameValuePair.js +2 -2
  30. package/components/Notification/Notification.js +3 -3
  31. package/components/RangeInput/StyledRangeInput.js +4 -4
  32. package/components/Select/EmptySearchOption.js +3 -3
  33. package/components/Select/StyledSelect.js +4 -4
  34. package/components/SelectMultiple/SelectMultiple.js +4 -4
  35. package/components/SelectMultiple/SelectMultipleContainer.js +6 -6
  36. package/components/Skeleton/Skeleton.js +1 -1
  37. package/components/Skeleton/StyledSkeleton.js +2 -2
  38. package/components/Tabs/Tabs.js +2 -1
  39. package/components/Tag/Tag.js +5 -5
  40. package/components/TextArea/StyledTextArea.js +1 -1
  41. package/components/ThumbsRating/ThumbsRating.js +6 -6
  42. package/components/Video/Video.js +2 -2
  43. package/contexts/AnalyticsContext/AnalyticsContext.js +2 -2
  44. package/es6/components/Anchor/Anchor.js +2 -2
  45. package/es6/components/Anchor/StyledAnchor.js +6 -6
  46. package/es6/components/Box/Box.js +1 -1
  47. package/es6/components/Button/Button.js +8 -8
  48. package/es6/components/Button/StyledButtonKind.js +5 -5
  49. package/es6/components/Calendar/Calendar.js +3 -3
  50. package/es6/components/CheckBox/StyledCheckBox.js +8 -8
  51. package/es6/components/Data/DataForm.js +15 -10
  52. package/es6/components/Data/stories/Infinite.js +2 -2
  53. package/es6/components/Data/stories/SpaceX.js +1 -1
  54. package/es6/components/Data/stories/StarWars.js +1 -1
  55. package/es6/components/DataChart/DataChart.js +4 -4
  56. package/es6/components/DataChart/Detail.js +1 -1
  57. package/es6/components/DataFilter/DataFilter.js +3 -3
  58. package/es6/components/DataTable/Header.js +1 -1
  59. package/es6/components/DataTable/buildState.js +8 -8
  60. package/es6/components/DataTableColumns/DataTableColumns.js +2 -2
  61. package/es6/components/DateInput/DateInput.js +1 -1
  62. package/es6/components/DateInput/utils.js +2 -2
  63. package/es6/components/Drop/DropContainer.js +2 -2
  64. package/es6/components/FileInput/utils/formatBytes.js +2 -2
  65. package/es6/components/FormField/FormField.js +1 -1
  66. package/es6/components/Header/Header.js +4 -4
  67. package/es6/components/Layer/Layer.js +4 -2
  68. package/es6/components/List/List.js +5 -5
  69. package/es6/components/MaskedInput/MaskedInput.js +2 -1
  70. package/es6/components/Menu/Menu.js +7 -3
  71. package/es6/components/NameValueList/NameValueList.js +2 -2
  72. package/es6/components/NameValuePair/NameValuePair.js +2 -2
  73. package/es6/components/Notification/Notification.js +3 -3
  74. package/es6/components/RangeInput/StyledRangeInput.js +4 -4
  75. package/es6/components/Select/EmptySearchOption.js +3 -3
  76. package/es6/components/Select/StyledSelect.js +4 -4
  77. package/es6/components/SelectMultiple/SelectMultiple.js +4 -4
  78. package/es6/components/SelectMultiple/SelectMultipleContainer.js +6 -6
  79. package/es6/components/Skeleton/Skeleton.js +1 -1
  80. package/es6/components/Skeleton/StyledSkeleton.js +2 -2
  81. package/es6/components/Tabs/Tabs.js +2 -1
  82. package/es6/components/Tag/Tag.js +5 -5
  83. package/es6/components/TextArea/StyledTextArea.js +1 -1
  84. package/es6/components/ThumbsRating/ThumbsRating.js +6 -6
  85. package/es6/components/Video/Video.js +2 -2
  86. package/es6/contexts/AnalyticsContext/AnalyticsContext.js +2 -2
  87. package/es6/utils/background.js +4 -4
  88. package/es6/utils/styles.js +2 -2
  89. package/grommet.min.js +1 -1
  90. package/grommet.min.js.map +1 -1
  91. package/package.json +22 -25
  92. package/utils/background.js +4 -4
  93. package/utils/styles.js +2 -2
@@ -14,20 +14,20 @@ var ThumbsRating = function ThumbsRating(_ref) {
14
14
  direction: "row",
15
15
  options: ['like', 'dislike']
16
16
  }, rest), function (option, _ref2) {
17
- var _theme$thumbsRating3, _theme$thumbsRating3$, _theme$thumbsRating4, _theme$thumbsRating4$;
17
+ var _theme$thumbsRating3, _theme$thumbsRating4;
18
18
  var checked = _ref2.checked;
19
19
  if (option === 'like') {
20
- var _theme$thumbsRating, _theme$thumbsRating$l, _theme$thumbsRating2, _theme$thumbsRating2$;
20
+ var _theme$thumbsRating, _theme$thumbsRating2;
21
21
  return checked ? /*#__PURE__*/React.createElement(LikeFill, {
22
- color: (_theme$thumbsRating = theme.thumbsRating) == null ? void 0 : (_theme$thumbsRating$l = _theme$thumbsRating.like) == null ? void 0 : _theme$thumbsRating$l.color
22
+ color: (_theme$thumbsRating = theme.thumbsRating) == null || (_theme$thumbsRating = _theme$thumbsRating.like) == null ? void 0 : _theme$thumbsRating.color
23
23
  }) : /*#__PURE__*/React.createElement(Like, {
24
- color: (_theme$thumbsRating2 = theme.thumbsRating) == null ? void 0 : (_theme$thumbsRating2$ = _theme$thumbsRating2.like) == null ? void 0 : _theme$thumbsRating2$.color
24
+ color: (_theme$thumbsRating2 = theme.thumbsRating) == null || (_theme$thumbsRating2 = _theme$thumbsRating2.like) == null ? void 0 : _theme$thumbsRating2.color
25
25
  });
26
26
  }
27
27
  return checked ? /*#__PURE__*/React.createElement(DislikeFill, {
28
- color: (_theme$thumbsRating3 = theme.thumbsRating) == null ? void 0 : (_theme$thumbsRating3$ = _theme$thumbsRating3.dislike) == null ? void 0 : _theme$thumbsRating3$.color
28
+ color: (_theme$thumbsRating3 = theme.thumbsRating) == null || (_theme$thumbsRating3 = _theme$thumbsRating3.dislike) == null ? void 0 : _theme$thumbsRating3.color
29
29
  }) : /*#__PURE__*/React.createElement(Dislike, {
30
- color: (_theme$thumbsRating4 = theme.thumbsRating) == null ? void 0 : (_theme$thumbsRating4$ = _theme$thumbsRating4.dislike) == null ? void 0 : _theme$thumbsRating4$.color
30
+ color: (_theme$thumbsRating4 = theme.thumbsRating) == null || (_theme$thumbsRating4 = _theme$thumbsRating4.dislike) == null ? void 0 : _theme$thumbsRating4.color
31
31
  });
32
32
  });
33
33
  };
@@ -180,9 +180,9 @@ var Video = /*#__PURE__*/forwardRef(function (_ref, ref) {
180
180
  var nextActiveTrack;
181
181
  for (var j = 0; j < track.cues.length; j += 1) {
182
182
  var _track$cues$j, _track$cues$j2;
183
- if (currentVideoTime > (track == null ? void 0 : (_track$cues$j = track.cues[j]) == null ? void 0 : _track$cues$j.startTime) && currentVideoTime < (track == null ? void 0 : (_track$cues$j2 = track.cues[j]) == null ? void 0 : _track$cues$j2.endTime)) {
183
+ if (currentVideoTime > (track == null || (_track$cues$j = track.cues[j]) == null ? void 0 : _track$cues$j.startTime) && currentVideoTime < (track == null || (_track$cues$j2 = track.cues[j]) == null ? void 0 : _track$cues$j2.endTime)) {
184
184
  var _track$cues$j3;
185
- nextActiveTrack = track == null ? void 0 : (_track$cues$j3 = track.cues[j]) == null ? void 0 : _track$cues$j3.text;
185
+ nextActiveTrack = track == null || (_track$cues$j3 = track.cues[j]) == null ? void 0 : _track$cues$j3.text;
186
186
  }
187
187
  }
188
188
  return nextActiveTrack;
@@ -14,8 +14,8 @@ export var AnalyticsProvider = function AnalyticsProvider(_ref) {
14
14
  var observer;
15
15
  if (onAnalytics) {
16
16
  observer = new window.MutationObserver(function () {
17
- var _window, _window$location;
18
- var url = (_window = window) == null ? void 0 : (_window$location = _window.location) == null ? void 0 : _window$location.href;
17
+ var _window;
18
+ var url = (_window = window) == null || (_window = _window.location) == null ? void 0 : _window.href;
19
19
  var previousUrl = lastUrlRef.current;
20
20
  if (url !== previousUrl) {
21
21
  lastUrlRef.current = url;
@@ -37,11 +37,11 @@ var normalizeBackgroundColor = function normalizeBackgroundColor(backgroundArg,
37
37
  var normalizeBackgroundImage = function normalizeBackgroundImage(background, theme) {
38
38
  var result;
39
39
  if (background.image) {
40
- var _theme$global$backgro3, _theme$global$backgro4, _theme$global$backgro5;
41
- result = normalizeBackground(background.dark ? (_theme$global$backgro3 = theme.global.backgrounds) == null ? void 0 : (_theme$global$backgro4 = _theme$global$backgro3[background.image]) == null ? void 0 : _theme$global$backgro4.dark : (_theme$global$backgro5 = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro5[background.image], theme) || background.image;
40
+ var _theme$global$backgro3, _theme$global$backgro4;
41
+ result = normalizeBackground(background.dark ? (_theme$global$backgro3 = theme.global.backgrounds) == null || (_theme$global$backgro3 = _theme$global$backgro3[background.image]) == null ? void 0 : _theme$global$backgro3.dark : (_theme$global$backgro4 = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro4[background.image], theme) || background.image;
42
42
  } else {
43
- var _theme$global$backgro6;
44
- var normalized = normalizeBackground((_theme$global$backgro6 = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro6[background], theme);
43
+ var _theme$global$backgro5;
44
+ var normalized = normalizeBackground((_theme$global$backgro5 = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro5[background], theme);
45
45
  result = typeof normalized === 'object' ? normalizeBackgroundImage(normalized, theme) : normalized;
46
46
  }
47
47
  return result;
@@ -251,8 +251,8 @@ export var inputStyle = css(["box-sizing:border-box;", " font-family:inherit;bor
251
251
  // icon should equal the icon dimension + 12px (edgeSize.medium)
252
252
  // to ensure there is reasonable space between the icon and value or placeholder
253
253
  export var inputPadForIcon = css(["", ""], function (props) {
254
- var _props$theme, _props$theme$icon, _props$theme$icon2, _props$theme$icon2$si;
255
- var pad = (_props$theme = props.theme) != null && (_props$theme$icon = _props$theme.icon) != null && _props$theme$icon.matchSize ? parseMetricToNum((_props$theme$icon2 = props.theme.icon) == null ? void 0 : (_props$theme$icon2$si = _props$theme$icon2.size) == null ? void 0 : _props$theme$icon2$si[(props == null ? void 0 : props.size) || 'medium']) + parseMetricToNum(props.theme.global.edgeSize.medium) + "px" : props.theme.global.edgeSize.large;
254
+ var _props$theme, _props$theme$icon;
255
+ var pad = (_props$theme = props.theme) != null && (_props$theme = _props$theme.icon) != null && _props$theme.matchSize ? parseMetricToNum((_props$theme$icon = props.theme.icon) == null || (_props$theme$icon = _props$theme$icon.size) == null ? void 0 : _props$theme$icon[(props == null ? void 0 : props.size) || 'medium']) + parseMetricToNum(props.theme.global.edgeSize.medium) + "px" : props.theme.global.edgeSize.large;
256
256
  return props.reverse ? "padding-right: " + pad + ";" : "padding-left: " + pad + ";";
257
257
  });
258
258
  export var overflowStyle = function overflowStyle(overflowProp) {