grommet 2.44.0 → 2.45.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.
Files changed (283) hide show
  1. package/all/stories/AllComponents.js +1 -1
  2. package/components/Accordion/Accordion.js +1 -1
  3. package/components/Accordion/stories/CustomThemed/Custom.js +1 -1
  4. package/components/Accordion/stories/Simple.js +1 -1
  5. package/components/AccordionPanel/AccordionPanel.js +1 -1
  6. package/components/Anchor/Anchor.js +3 -2
  7. package/components/Avatar/Avatar.js +1 -1
  8. package/components/Box/Box.js +1 -1
  9. package/components/Button/Button.js +1 -1
  10. package/components/Calendar/Calendar.js +1 -1
  11. package/components/Card/stories/CustomThemed/Clickable.js +1 -1
  12. package/components/Card/stories/CustomThemed/Themed.js +1 -1
  13. package/components/Cards/Cards.js +1 -1
  14. package/components/Carousel/Carousel.js +1 -1
  15. package/components/Carousel/stories/CustomThemed/Custom.js +1 -1
  16. package/components/Chart/Chart.js +1 -1
  17. package/components/CheckBox/CheckBox.js +1 -1
  18. package/components/CheckBox/stories/NoLabel.js +1 -1
  19. package/components/CheckBox/stories/Simple.js +1 -1
  20. package/components/CheckBoxGroup/CheckBoxGroup.js +1 -1
  21. package/components/Clock/Analog.js +1 -1
  22. package/components/Clock/Clock.js +1 -1
  23. package/components/Clock/Digital.js +1 -1
  24. package/components/Collapsible/stories/Nested.js +1 -1
  25. package/components/Data/Data.js +1 -1
  26. package/components/Data/DataForm.js +1 -1
  27. package/components/Data/stories/Inline.js +1 -1
  28. package/components/DataChart/DataChart.js +1 -1
  29. package/components/DataChart/XAxis.js +1 -1
  30. package/components/DataClearFilters/DataClearFilters.js +1 -1
  31. package/components/DataFilter/DataFilter.js +1 -1
  32. package/components/DataFilters/DataFilters.js +1 -1
  33. package/components/DataSearch/DataSearch.js +1 -1
  34. package/components/DataSort/DataSort.js +1 -1
  35. package/components/DataSummary/DataSummary.js +1 -1
  36. package/components/DataTable/Body.js +1 -1
  37. package/components/DataTable/Cell.js +1 -1
  38. package/components/DataTable/DataTable.js +1 -1
  39. package/components/DataTable/ExpanderCell.js +1 -1
  40. package/components/DataTable/Footer.js +1 -1
  41. package/components/DataTable/GroupedBody.js +1 -1
  42. package/components/DataTable/Header.js +2 -2
  43. package/components/DataTable/StyledDataTable.js +20 -12
  44. package/components/DataTable/stories/CustomThemed/Custom.js +8 -0
  45. package/components/DataTableColumns/DataTableColumns.js +1 -1
  46. package/components/DataTableGroupBy/DataTableGroupBy.js +1 -1
  47. package/components/DataView/DataView.js +1 -1
  48. package/components/DateInput/DateInput.js +1 -1
  49. package/components/Diagram/Diagram.js +1 -1
  50. package/components/Diagram/stories/Progressing.js +1 -1
  51. package/components/Distribution/Distribution.js +1 -1
  52. package/components/Drop/Drop.js +1 -1
  53. package/components/Drop/DropContainer.js +1 -1
  54. package/components/DropButton/DropButton.js +1 -1
  55. package/components/FileInput/FileInput.js +1 -1
  56. package/components/FocusedContainer.js +1 -1
  57. package/components/Form/Form.js +1 -1
  58. package/components/FormField/FormField.js +73 -18
  59. package/components/Grid/Grid.js +1 -1
  60. package/components/Grid/stories/CustomThemed/Responsive.js +1 -1
  61. package/components/Grommet/Grommet.js +1 -1
  62. package/components/Header/Header.js +1 -1
  63. package/components/Heading/Heading.js +1 -1
  64. package/components/Image/Image.js +1 -1
  65. package/components/Keyboard/Keyboard.js +1 -1
  66. package/components/Layer/LayerContainer.js +1 -1
  67. package/components/Layer/StyledLayer.js +2 -1
  68. package/components/List/List.js +1 -1
  69. package/components/Markdown/Markdown.js +1 -1
  70. package/components/MaskedInput/MaskedInput.js +1 -1
  71. package/components/Menu/Menu.js +6 -5
  72. package/components/Menu/stories/CustomThemed/Themed.tsx +4 -0
  73. package/components/Meter/Bar.js +1 -1
  74. package/components/Meter/Circle.js +1 -1
  75. package/components/Meter/Meter.js +1 -1
  76. package/components/Meter/StyledMeter.js +2 -1
  77. package/components/NameValueList/NameValueList.js +1 -1
  78. package/components/Nav/stories/CustomThemed/JustifySidebar.js +1 -1
  79. package/components/Nav/stories/Sidebar.js +1 -1
  80. package/components/Notification/Notification.js +38 -27
  81. package/components/Page/Page.js +1 -1
  82. package/components/PageContent/PageContent.js +1 -1
  83. package/components/PageHeader/PageHeader.js +1 -1
  84. package/components/Pagination/PageControl.js +1 -1
  85. package/components/Pagination/Pagination.js +1 -1
  86. package/components/Pagination/PaginationStep.js +1 -1
  87. package/components/Pagination/PaginationSummary.js +1 -1
  88. package/components/Paragraph/Paragraph.js +1 -1
  89. package/components/RadioButton/RadioButton.js +1 -1
  90. package/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
  91. package/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +1 -1
  92. package/components/RadioButtonGroup/stories/Disabled.js +1 -1
  93. package/components/RangeInput/RangeInput.js +1 -1
  94. package/components/RangeSelector/EdgeControl.js +1 -1
  95. package/components/RangeSelector/RangeSelector.js +1 -1
  96. package/components/RangeSelector/stories/CustomThemed/Custom.js +1 -1
  97. package/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +1 -1
  98. package/components/RangeSelector/stories/Step.js +1 -1
  99. package/components/RangeSelector/stories/Vertical.js +1 -1
  100. package/components/RoutedAnchor/RoutedAnchor.js +1 -1
  101. package/components/RoutedButton/RoutedButton.js +1 -1
  102. package/components/Select/DefaultSelectTextInput.js +1 -1
  103. package/components/Select/Select.js +1 -1
  104. package/components/Select/SelectContainer.js +2 -1
  105. package/components/Select/StyledSelect.js +4 -1
  106. package/components/Select/stories/components/SearchBorderBox.js +1 -1
  107. package/components/Select/stories/components/SearchInput.js +1 -1
  108. package/components/SelectMultiple/SelectMultiple.js +1 -1
  109. package/components/SelectMultiple/SelectMultipleContainer.js +2 -1
  110. package/components/Sidebar/Sidebar.js +1 -1
  111. package/components/Sidebar/stories/Labels.js +1 -1
  112. package/components/Skeleton/Skeleton.js +1 -1
  113. package/components/Skeleton/stories/GridContainer.js +1 -1
  114. package/components/Skeleton/stories/Individual.js +1 -1
  115. package/components/SkipLink/SkipLink.js +1 -1
  116. package/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
  117. package/components/Spinner/Spinner.js +1 -1
  118. package/components/Stack/Stack.js +1 -1
  119. package/components/StarRating/StarRating.js +1 -1
  120. package/components/Tab/Tab.js +1 -1
  121. package/components/Table/Table.js +1 -1
  122. package/components/TableCell/TableCell.js +1 -1
  123. package/components/Tabs/Tabs.js +1 -1
  124. package/components/Tag/Tag.js +1 -1
  125. package/components/Text/Text.js +1 -1
  126. package/components/Text/TextSkeleton.js +1 -1
  127. package/components/TextArea/TextArea.js +1 -1
  128. package/components/TextInput/TextInput.js +1 -1
  129. package/components/TextInput/stories/WithTags.js +1 -1
  130. package/components/ToggleGroup/StyledToggleGroup.js +9 -1
  131. package/components/ToggleGroup/ToggleGroup.js +2 -2
  132. package/components/Toolbar/Toolbar.js +1 -1
  133. package/components/Video/Video.js +1 -1
  134. package/components/WorldMap/WorldMap.js +1 -1
  135. package/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
  136. package/es6/all/stories/AllComponents.js +1 -1
  137. package/es6/components/Accordion/Accordion.js +1 -1
  138. package/es6/components/Accordion/stories/CustomThemed/Custom.js +1 -1
  139. package/es6/components/Accordion/stories/Simple.js +1 -1
  140. package/es6/components/AccordionPanel/AccordionPanel.js +1 -1
  141. package/es6/components/Anchor/Anchor.js +3 -2
  142. package/es6/components/Avatar/Avatar.js +1 -1
  143. package/es6/components/Box/Box.js +1 -1
  144. package/es6/components/Button/Button.js +1 -1
  145. package/es6/components/Calendar/Calendar.js +1 -1
  146. package/es6/components/Card/stories/CustomThemed/Clickable.js +1 -1
  147. package/es6/components/Card/stories/CustomThemed/Themed.js +1 -1
  148. package/es6/components/Cards/Cards.js +1 -1
  149. package/es6/components/Carousel/Carousel.js +1 -1
  150. package/es6/components/Carousel/stories/CustomThemed/Custom.js +1 -1
  151. package/es6/components/Chart/Chart.js +1 -1
  152. package/es6/components/CheckBox/CheckBox.js +1 -1
  153. package/es6/components/CheckBox/stories/NoLabel.js +1 -1
  154. package/es6/components/CheckBox/stories/Simple.js +1 -1
  155. package/es6/components/CheckBoxGroup/CheckBoxGroup.js +1 -1
  156. package/es6/components/Clock/Analog.js +1 -1
  157. package/es6/components/Clock/Clock.js +1 -1
  158. package/es6/components/Clock/Digital.js +1 -1
  159. package/es6/components/Collapsible/stories/Nested.js +1 -1
  160. package/es6/components/Data/Data.js +1 -1
  161. package/es6/components/Data/DataForm.js +1 -1
  162. package/es6/components/Data/stories/Inline.js +1 -1
  163. package/es6/components/DataChart/DataChart.js +1 -1
  164. package/es6/components/DataChart/XAxis.js +1 -1
  165. package/es6/components/DataClearFilters/DataClearFilters.js +1 -1
  166. package/es6/components/DataFilter/DataFilter.js +1 -1
  167. package/es6/components/DataFilters/DataFilters.js +1 -1
  168. package/es6/components/DataSearch/DataSearch.js +1 -1
  169. package/es6/components/DataSort/DataSort.js +1 -1
  170. package/es6/components/DataSummary/DataSummary.js +1 -1
  171. package/es6/components/DataTable/Body.js +1 -1
  172. package/es6/components/DataTable/Cell.js +1 -1
  173. package/es6/components/DataTable/DataTable.js +1 -1
  174. package/es6/components/DataTable/ExpanderCell.js +1 -1
  175. package/es6/components/DataTable/Footer.js +1 -1
  176. package/es6/components/DataTable/GroupedBody.js +1 -1
  177. package/es6/components/DataTable/Header.js +3 -3
  178. package/es6/components/DataTable/StyledDataTable.js +20 -12
  179. package/es6/components/DataTable/stories/CustomThemed/Custom.js +8 -0
  180. package/es6/components/DataTableColumns/DataTableColumns.js +1 -1
  181. package/es6/components/DataTableGroupBy/DataTableGroupBy.js +1 -1
  182. package/es6/components/DataView/DataView.js +1 -1
  183. package/es6/components/DateInput/DateInput.js +1 -1
  184. package/es6/components/Diagram/Diagram.js +1 -1
  185. package/es6/components/Diagram/stories/Progressing.js +1 -1
  186. package/es6/components/Distribution/Distribution.js +1 -1
  187. package/es6/components/Drop/Drop.js +1 -1
  188. package/es6/components/Drop/DropContainer.js +1 -1
  189. package/es6/components/DropButton/DropButton.js +1 -1
  190. package/es6/components/FileInput/FileInput.js +1 -1
  191. package/es6/components/FocusedContainer.js +1 -1
  192. package/es6/components/Form/Form.js +1 -1
  193. package/es6/components/FormField/FormField.js +73 -18
  194. package/es6/components/Grid/Grid.js +1 -1
  195. package/es6/components/Grid/stories/CustomThemed/Responsive.js +1 -1
  196. package/es6/components/Grommet/Grommet.js +1 -1
  197. package/es6/components/Header/Header.js +1 -1
  198. package/es6/components/Heading/Heading.js +1 -1
  199. package/es6/components/Image/Image.js +1 -1
  200. package/es6/components/Keyboard/Keyboard.js +1 -1
  201. package/es6/components/Layer/LayerContainer.js +1 -1
  202. package/es6/components/Layer/StyledLayer.js +2 -1
  203. package/es6/components/List/List.js +1 -1
  204. package/es6/components/Markdown/Markdown.js +1 -1
  205. package/es6/components/MaskedInput/MaskedInput.js +1 -1
  206. package/es6/components/Menu/Menu.js +6 -5
  207. package/es6/components/Menu/stories/CustomThemed/Themed.tsx +4 -0
  208. package/es6/components/Meter/Bar.js +1 -1
  209. package/es6/components/Meter/Circle.js +1 -1
  210. package/es6/components/Meter/Meter.js +1 -1
  211. package/es6/components/Meter/StyledMeter.js +3 -1
  212. package/es6/components/NameValueList/NameValueList.js +1 -1
  213. package/es6/components/Nav/stories/CustomThemed/JustifySidebar.js +1 -1
  214. package/es6/components/Nav/stories/Sidebar.js +1 -1
  215. package/es6/components/Notification/Notification.js +38 -27
  216. package/es6/components/Page/Page.js +1 -1
  217. package/es6/components/PageContent/PageContent.js +1 -1
  218. package/es6/components/PageHeader/PageHeader.js +1 -1
  219. package/es6/components/Pagination/PageControl.js +1 -1
  220. package/es6/components/Pagination/Pagination.js +1 -1
  221. package/es6/components/Pagination/PaginationStep.js +1 -1
  222. package/es6/components/Pagination/PaginationSummary.js +1 -1
  223. package/es6/components/Paragraph/Paragraph.js +1 -1
  224. package/es6/components/RadioButton/RadioButton.js +1 -1
  225. package/es6/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
  226. package/es6/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +1 -1
  227. package/es6/components/RadioButtonGroup/stories/Disabled.js +1 -1
  228. package/es6/components/RangeInput/RangeInput.js +1 -1
  229. package/es6/components/RangeSelector/EdgeControl.js +1 -1
  230. package/es6/components/RangeSelector/RangeSelector.js +1 -1
  231. package/es6/components/RangeSelector/stories/CustomThemed/Custom.js +1 -1
  232. package/es6/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +1 -1
  233. package/es6/components/RangeSelector/stories/Step.js +1 -1
  234. package/es6/components/RangeSelector/stories/Vertical.js +1 -1
  235. package/es6/components/RoutedAnchor/RoutedAnchor.js +1 -1
  236. package/es6/components/RoutedButton/RoutedButton.js +1 -1
  237. package/es6/components/Select/DefaultSelectTextInput.js +1 -1
  238. package/es6/components/Select/Select.js +1 -1
  239. package/es6/components/Select/SelectContainer.js +2 -1
  240. package/es6/components/Select/StyledSelect.js +4 -1
  241. package/es6/components/Select/stories/components/SearchBorderBox.js +1 -1
  242. package/es6/components/Select/stories/components/SearchInput.js +1 -1
  243. package/es6/components/SelectMultiple/SelectMultiple.js +1 -1
  244. package/es6/components/SelectMultiple/SelectMultipleContainer.js +2 -1
  245. package/es6/components/Sidebar/Sidebar.js +1 -1
  246. package/es6/components/Sidebar/stories/Labels.js +1 -1
  247. package/es6/components/Skeleton/Skeleton.js +1 -1
  248. package/es6/components/Skeleton/stories/GridContainer.js +1 -1
  249. package/es6/components/Skeleton/stories/Individual.js +1 -1
  250. package/es6/components/SkipLink/SkipLink.js +1 -1
  251. package/es6/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
  252. package/es6/components/Spinner/Spinner.js +1 -1
  253. package/es6/components/Stack/Stack.js +1 -1
  254. package/es6/components/StarRating/StarRating.js +1 -1
  255. package/es6/components/Tab/Tab.js +1 -1
  256. package/es6/components/Table/Table.js +1 -1
  257. package/es6/components/TableCell/TableCell.js +1 -1
  258. package/es6/components/Tabs/Tabs.js +1 -1
  259. package/es6/components/Tag/Tag.js +1 -1
  260. package/es6/components/Text/Text.js +1 -1
  261. package/es6/components/Text/TextSkeleton.js +1 -1
  262. package/es6/components/TextArea/TextArea.js +1 -1
  263. package/es6/components/TextInput/TextInput.js +1 -1
  264. package/es6/components/TextInput/stories/WithTags.js +1 -1
  265. package/es6/components/ToggleGroup/StyledToggleGroup.js +8 -0
  266. package/es6/components/ToggleGroup/ToggleGroup.js +3 -3
  267. package/es6/components/Toolbar/Toolbar.js +1 -1
  268. package/es6/components/Video/Video.js +1 -1
  269. package/es6/components/WorldMap/WorldMap.js +1 -1
  270. package/es6/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
  271. package/es6/themes/base.d.ts +49 -5
  272. package/es6/themes/base.js +39 -9
  273. package/es6/utils/pagination.js +1 -1
  274. package/es6/utils/responsive.js +1 -0
  275. package/es6/utils/styles.js +49 -14
  276. package/grommet.min.js +1 -1
  277. package/grommet.min.js.map +1 -1
  278. package/package.json +25 -25
  279. package/themes/base.d.ts +49 -5
  280. package/themes/base.js +39 -9
  281. package/utils/pagination.js +1 -1
  282. package/utils/responsive.js +1 -0
  283. package/utils/styles.js +49 -14
@@ -2,7 +2,7 @@ var _excluded = ["error", "info", "message", "type"],
2
2
  _excluded2 = ["component", "disabled", "invalid", "name", "onChange"],
3
3
  _excluded3 = ["children", "className", "component", "contentProps", "disabled", "error", "help", "htmlFor", "info", "label", "margin", "name", "onBlur", "onChange", "onFocus", "pad", "required", "style", "validate", "validateOn"];
4
4
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
5
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
5
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
6
6
  import React, { Children, cloneElement, forwardRef, useContext, useEffect, useMemo, useState } from 'react';
7
7
  import styled from 'styled-components';
8
8
  import { containsFocus, shouldKeepFocus, withinDropPortal, PortalContext } from '../../utils';
@@ -20,42 +20,59 @@ import { FormContext } from '../Form/FormContext';
20
20
  import { FormFieldPropTypes } from './propTypes';
21
21
  import { useThemeValue } from '../../utils/useThemeValue';
22
22
  import { AnnounceContext } from '../../contexts/AnnounceContext';
23
+ var grommetInputFocusNames = ['CheckBox', 'CheckBoxGroup', 'RadioButton', 'RadioButtonGroup', 'RangeInput', 'RangeSelector', 'StarRating', 'ThumbsRating'];
23
24
  var grommetInputNames = ['CheckBox', 'CheckBoxGroup', 'TextInput', 'Select', 'MaskedInput', 'SelectMultiple', 'TextArea', 'DateInput', 'FileInput', 'RadioButton', 'RadioButtonGroup', 'RangeInput', 'RangeSelector', 'StarRating', 'ThumbsRating'];
24
25
  var grommetInputPadNames = ['CheckBox', 'CheckBoxGroup', 'RadioButton', 'RadioButtonGroup', 'RangeInput', 'RangeSelector'];
25
26
  var isGrommetInput = function isGrommetInput(comp) {
26
27
  return comp && (grommetInputNames.indexOf(comp.displayName) !== -1 || grommetInputPadNames.indexOf(comp.displayName) !== -1);
27
28
  };
29
+ var getFocusStyle = function getFocusStyle(props) {
30
+ var _props$theme$formFiel;
31
+ if (props.focus && props.containerFocus === false && ((_props$theme$formFiel = props.theme.formField) == null || (_props$theme$formFiel = _props$theme$formFiel.focus) == null ? void 0 : _props$theme$formFiel.containerFocus) === false) {
32
+ return null;
33
+ }
34
+ return props.focus ? focusStyle({
35
+ justBorder: true
36
+ }) : undefined;
37
+ };
28
38
  var FormFieldBox = styled(Box).withConfig({
29
39
  displayName: "FormField__FormFieldBox",
30
40
  componentId: "sc-m9hood-0"
31
41
  })(["", " ", ""], function (props) {
32
- return props.focus && focusStyle({
33
- justBorder: true
34
- });
42
+ return getFocusStyle(props);
35
43
  }, function (props) {
36
- return props.theme.formField && props.theme.formField.extend;
44
+ var _props$theme$formFiel2;
45
+ return (_props$theme$formFiel2 = props.theme.formField) == null ? void 0 : _props$theme$formFiel2.extend;
37
46
  });
38
47
  var FormFieldContentBox = styled(Box).withConfig({
39
48
  displayName: "FormField__FormFieldContentBox",
40
49
  componentId: "sc-m9hood-1"
50
+ })(["", " ", ""], function (props) {
51
+ return getFocusStyle(props);
52
+ }, function (props) {
53
+ var _props$theme$formFiel3;
54
+ return props.theme.formField && ((_props$theme$formFiel3 = props.theme.formField[props == null ? void 0 : props.componentName]) == null || (_props$theme$formFiel3 = _props$theme$formFiel3.container) == null ? void 0 : _props$theme$formFiel3.extend);
55
+ });
56
+ var StyledContentsBox = styled(Box).withConfig({
57
+ displayName: "FormField__StyledContentsBox",
58
+ componentId: "sc-m9hood-2"
41
59
  })(["", ""], function (props) {
42
- return props.focus && focusStyle({
43
- justBorder: true
44
- });
60
+ var _props$theme$formFiel4;
61
+ return props.theme.formField && ((_props$theme$formFiel4 = props.theme.formField[props == null ? void 0 : props.componentName]) == null || (_props$theme$formFiel4 = _props$theme$formFiel4.container) == null ? void 0 : _props$theme$formFiel4.extend);
45
62
  });
46
63
  var StyledMessageContainer = styled(Box).withConfig({
47
64
  displayName: "FormField__StyledMessageContainer",
48
- componentId: "sc-m9hood-2"
65
+ componentId: "sc-m9hood-3"
49
66
  })(["", ""], function (props) {
50
67
  return props.messageType && props.theme.formField[props.messageType].container && props.theme.formField[props.messageType].container.extend;
51
68
  });
52
69
  var RequiredText = styled(Text).withConfig({
53
70
  displayName: "FormField__RequiredText",
54
- componentId: "sc-m9hood-3"
71
+ componentId: "sc-m9hood-4"
55
72
  })(["color:inherit;font-weight:inherit;line-height:inherit;"]);
56
73
  var ScreenReaderOnly = styled(Text).withConfig({
57
74
  displayName: "FormField__ScreenReaderOnly",
58
- componentId: "sc-m9hood-4"
75
+ componentId: "sc-m9hood-5"
59
76
  })(["position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0;"]);
60
77
  var Message = function Message(_ref) {
61
78
  var error = _ref.error,
@@ -122,7 +139,7 @@ var Input = function Input(_ref2) {
122
139
  }, rest, extraProps));
123
140
  };
124
141
  var FormField = /*#__PURE__*/forwardRef(function (_ref3, ref) {
125
- var _theme$global$input;
142
+ var _theme$formField2, _theme$global$input, _formFieldTheme$disab, _formFieldTheme$disab2;
126
143
  var children = _ref3.children,
127
144
  className = _ref3.className,
128
145
  component = _ref3.component,
@@ -189,6 +206,16 @@ var FormField = /*#__PURE__*/forwardRef(function (_ref3, ref) {
189
206
  }
190
207
  return readOnly;
191
208
  }, [children]);
209
+ var containerFocus = useMemo(function () {
210
+ var focusIndicatorFlag = true;
211
+ Children.forEach(children, function (child) {
212
+ var _theme$formField;
213
+ if (child && child.type && grommetInputFocusNames.includes(child.type.displayName) && ((_theme$formField = theme.formField) == null || (_theme$formField = _theme$formField.focus) == null ? void 0 : _theme$formField.containerFocus) !== true) {
214
+ focusIndicatorFlag = false;
215
+ }
216
+ });
217
+ return focusIndicatorFlag;
218
+ }, [children, (_theme$formField2 = theme.formField) == null || (_theme$formField2 = _theme$formField2.focus) == null ? void 0 : _theme$formField2.containerFocus]);
192
219
 
193
220
  // This is here for backwards compatibility. In case the child is a grommet
194
221
  // input component, set plain and focusIndicator props, if they aren't
@@ -198,11 +225,12 @@ var FormField = /*#__PURE__*/forwardRef(function (_ref3, ref) {
198
225
  if (child && child.type && grommetInputPadNames.indexOf(child.type.displayName) !== -1) {
199
226
  wantContentPad = true;
200
227
  }
201
- if (child && child.type && grommetInputNames.indexOf(child.type.displayName) !== -1 && child.props.plain === undefined && child.props.focusIndicator === undefined) {
228
+ var isInputComponent = child && child.type && grommetInputNames.indexOf(child.type.displayName) !== -1;
229
+ if (isInputComponent && child.props.plain === undefined && child.props.focusIndicator === undefined) {
202
230
  var _formFieldTheme$check;
203
231
  return /*#__PURE__*/cloneElement(child, {
204
232
  plain: true,
205
- focusIndicator: false,
233
+ focusIndicator: !containerFocus,
206
234
  pad: 'CheckBox'.indexOf(child.type.displayName) !== -1 ? formFieldTheme == null || (_formFieldTheme$check = formFieldTheme.checkBox) == null ? void 0 : _formFieldTheme$check.pad : undefined
207
235
  });
208
236
  }
@@ -245,8 +273,21 @@ var FormField = /*#__PURE__*/forwardRef(function (_ref3, ref) {
245
273
  if (component && component.displayName === 'FileInput' && !isFileInputComponent) {
246
274
  isFileInputComponent = true;
247
275
  }
276
+ var childName;
277
+ Children.forEach(children, function (child) {
278
+ if (child && child.type) {
279
+ var _childName;
280
+ childName = child.type.displayName;
281
+ // camelCase component name to match theme object key
282
+ if (((_childName = childName) == null ? void 0 : _childName.length) > 0) childName = childName.charAt(0).toLowerCase() + childName.slice(1);
283
+ }
284
+ });
248
285
  if (!themeBorder) {
249
- contents = /*#__PURE__*/React.createElement(Box, _extends({}, themeContentProps, contentProps), contents);
286
+ contents = /*#__PURE__*/React.createElement(StyledContentsBox, _extends({
287
+ disabledProp: disabled,
288
+ error: error,
289
+ componentName: childName
290
+ }, themeContentProps, contentProps), contents);
250
291
  }
251
292
  var borderColor;
252
293
  if (disabled && formFieldTheme.disabled.border && formFieldTheme.disabled.border.color) {
@@ -274,6 +315,12 @@ var FormField = /*#__PURE__*/forwardRef(function (_ref3, ref) {
274
315
  if (disabled) {
275
316
  labelStyle.color = formFieldTheme.disabled && formFieldTheme.disabled.label ? formFieldTheme.disabled.label.color : labelStyle.color;
276
317
  }
318
+ var themeHelpProps = _extends({}, formFieldTheme.help, disabled && {
319
+ color: formFieldTheme == null || (_formFieldTheme$disab = formFieldTheme.disabled) == null || (_formFieldTheme$disab = _formFieldTheme$disab.help) == null ? void 0 : _formFieldTheme$disab.color
320
+ });
321
+ var themeInfoProps = _extends({}, formFieldTheme.info, disabled && {
322
+ color: formFieldTheme == null || (_formFieldTheme$disab2 = formFieldTheme.disabled) == null || (_formFieldTheme$disab2 = _formFieldTheme$disab2.info) == null ? void 0 : _formFieldTheme$disab2.color
323
+ });
277
324
  var abut;
278
325
  var abutMargin;
279
326
  var outerStyle = style;
@@ -294,7 +341,13 @@ var FormField = /*#__PURE__*/forwardRef(function (_ref3, ref) {
294
341
  round: formFieldTheme.round,
295
342
  focus: isFileInputComponent ? undefined : focus
296
343
  } : {};
297
- contents = /*#__PURE__*/React.createElement(FormFieldContentBox, _extends({}, themeContentProps, innerProps, contentProps, passThemeFlag), contents);
344
+ contents = /*#__PURE__*/React.createElement(FormFieldContentBox, _extends({
345
+ disabledProp: disabled,
346
+ error: error,
347
+ componentName: childName
348
+ }, themeContentProps, innerProps, contentProps, {
349
+ containerFocus: containerFocus // internal prop
350
+ }, passThemeFlag), contents);
298
351
  var mergedMargin = margin || formFieldTheme.margin;
299
352
  abut = themeBorder.position === 'outer' && (themeBorder.side === 'all' || themeBorder.side === 'horizontal' || !themeBorder.side) && !(mergedMargin && (typeof mergedMargin === 'string' && mergedMargin !== 'none' || mergedMargin.bottom && mergedMargin.bottom !== 'none' || mergedMargin.horizontal && mergedMargin.horizontal !== 'none'));
300
353
  if (abut) {
@@ -353,6 +406,8 @@ var FormField = /*#__PURE__*/forwardRef(function (_ref3, ref) {
353
406
  margin: abut ? abutMargin : margin || _extends({}, formFieldTheme.margin)
354
407
  }, outerProps, {
355
408
  style: outerStyle,
409
+ containerFocus: containerFocus // internal prop
410
+ ,
356
411
  onFocus: function onFocus(event) {
357
412
  var _formFieldRef$current;
358
413
  var root = (_formFieldRef$current = formFieldRef.current) == null ? void 0 : _formFieldRef$current.getRootNode();
@@ -386,13 +441,13 @@ var FormField = /*#__PURE__*/forwardRef(function (_ref3, ref) {
386
441
  htmlFor: htmlFor
387
442
  }, labelStyle), label, showRequiredIndicator ? requiredIndicator : undefined), /*#__PURE__*/React.createElement(Message, _extends({
388
443
  message: help
389
- }, formFieldTheme.help))) : undefined, contents, /*#__PURE__*/React.createElement(Message, _extends({
444
+ }, themeHelpProps))) : undefined, contents, /*#__PURE__*/React.createElement(Message, _extends({
390
445
  type: "error",
391
446
  message: error
392
447
  }, formFieldTheme.error)), /*#__PURE__*/React.createElement(Message, _extends({
393
448
  type: "info",
394
449
  message: info
395
- }, formFieldTheme.info)));
450
+ }, themeInfoProps)));
396
451
  });
397
452
  FormField.displayName = 'FormField';
398
453
  FormField.propTypes = FormFieldPropTypes;
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["a11yTitle", "aria-label", "border", "fill", "height", "responsive", "rows", "tag", "as", "width"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { forwardRef } from 'react';
5
5
  import { StyledGrid } from './StyledGrid';
6
6
  import { GridPropTypes } from './propTypes';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["children", "overrideColumns", "overrideRows", "areas"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React from 'react';
5
5
  import { Grommet, Box, Grid, Heading, ResponsiveContext } from 'grommet';
6
6
  import { grommet } from 'grommet/themes';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["children", "full", "containerTarget", "theme", "options", "messages", "onAnalytics"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { forwardRef, useEffect, useMemo, useRef, useState } from 'react';
5
5
  import { createGlobalStyle } from 'styled-components';
6
6
  import { ContainerTargetContext, ResponsiveContext, ThemeContext } from '../../contexts';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["sticky"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { useEffect } from 'react';
5
5
  import { findScrollParent, useForwardedRef } from '../../utils';
6
6
  import { Box } from '../Box';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["children", "color", "fill", "level", "overflowWrap", "responsive", "weight"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { forwardRef, useState } from 'react';
5
5
  import { useLayoutEffect } from '../../utils/use-isomorphic-layout-effect';
6
6
  import { StyledHeading } from './StyledHeading';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["a11yTitle", "fallback", "onError", "onLoad", "opacity", "fill", "src"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { forwardRef, useState } from 'react';
5
5
  import { StyledImage } from './StyledImage';
6
6
  import { ImagePropTypes } from './propTypes';
@@ -1,5 +1,5 @@
1
1
  var _excluded = ["capture", "target", "children", "onKeyDown"];
2
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
2
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
3
3
  import { Children, cloneElement, useCallback, useEffect } from 'react';
4
4
  import { KeyboardPropTypes } from './propTypes';
5
5
  var KEYS = {
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["background", "children", "full", "id", "margin", "modal", "onClickOutside", "onEsc", "plain", "position", "responsive", "target"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { forwardRef, useContext, useEffect, useMemo, useRef } from 'react';
5
5
  import { ThemeContext } from 'styled-components';
6
6
  import { FocusedContainer } from '../FocusedContainer';
@@ -374,7 +374,8 @@ var POSITIONS = {
374
374
  var roundStyle = function roundStyle(data, theme, position, margin) {
375
375
  var styles = [];
376
376
  var size = data === true ? 'medium' : data;
377
- var round = theme.global.edgeSize[size] || size;
377
+ // fallback to edgeSize for backwards compatibility
378
+ var round = theme.global[theme.global.radius ? 'radius' : 'edgeSize'][size] || size;
378
379
  // if user provides CSS string such as '50px 12px', apply that always
379
380
  var customCSS = round.split(' ').length > 1;
380
381
  if (margin === 'none' && !customCSS && theme.layer.border.intelligentRounding === true) {
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["a11yTitle", "aria-label", "action", "as", "background", "border", "children", "data", "defaultItemProps", "disabled", "focus", "itemKey", "itemProps", "onActive", "onClickItem", "onKeyDown", "onMore", "onOrder", "showIndex", "pad", "paginate", "pinned", "primaryKey", "secondaryKey", "show", "step"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { Fragment, cloneElement, useContext, useMemo, useRef, useState } from 'react';
5
5
  import styled from 'styled-components';
6
6
  import { DataContext } from '../../contexts/DataContext';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["children", "components", "options", "theme"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { forwardRef, Fragment } from 'react';
5
5
  import Markdown from 'markdown-to-jsx';
6
6
  import { deepMerge } from '../../utils';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["a11yTitle", "dropHeight", "dropProps", "focus", "focusIndicator", "icon", "id", "mask", "name", "onBlur", "onChange", "onFocus", "onKeyDown", "placeholder", "plain", "reverse", "textAlign", "value"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
5
5
  import styled from 'styled-components';
6
6
  import { Box } from '../Box';
@@ -1,7 +1,7 @@
1
1
  var _excluded = ["a11yTitle", "aria-label", "children", "disabled", "dropAlign", "dropBackground", "dropProps", "dropTarget", "justifyContent", "icon", "items", "label", "messages", "onKeyDown", "open", "plain", "size"],
2
2
  _excluded2 = ["align"];
3
3
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
5
5
  import React, { useRef, forwardRef, useCallback, useContext, useMemo, useState, useEffect } from 'react';
6
6
  import styled from 'styled-components';
7
7
  import { Box } from '../Box';
@@ -324,7 +324,8 @@ var Menu = /*#__PURE__*/forwardRef(function (props, ref) {
324
324
  );
325
325
  };
326
326
  var menuContent;
327
- if (itemCount && Array.isArray(items[0])) {
327
+ var grouped = itemCount && Array.isArray(items[0]);
328
+ if (grouped) {
328
329
  var index = 0;
329
330
  menuContent = items.map(function (group, groupIndex) {
330
331
  var _theme$menu$group, _theme$menu$group2, _theme$menu$group3;
@@ -344,7 +345,7 @@ var Menu = /*#__PURE__*/forwardRef(function (props, ref) {
344
345
  color: (_theme$menu$group = theme.menu.group) == null || (_theme$menu$group = _theme$menu$group.separator) == null ? void 0 : _theme$menu$group.color,
345
346
  size: (_theme$menu$group2 = theme.menu.group) == null || (_theme$menu$group2 = _theme$menu$group2.separator) == null ? void 0 : _theme$menu$group2.size
346
347
  }
347
- })), /*#__PURE__*/React.createElement(Box, (_theme$menu$group3 = theme.menu.group) == null ? void 0 : _theme$menu$group3.container, group.map(function (item) {
348
+ })), /*#__PURE__*/React.createElement(Box, _extends({}, theme.menu.container, (_theme$menu$group3 = theme.menu.group) == null ? void 0 : _theme$menu$group3.container), group.map(function (item) {
348
349
  // item index needs to be its index in the entire menu as if
349
350
  // it were a flat array
350
351
  var currentIndex = index;
@@ -390,11 +391,11 @@ var Menu = /*#__PURE__*/forwardRef(function (props, ref) {
390
391
  ref: dropContainerRef,
391
392
  tabIndex: -1,
392
393
  background: dropBackground || theme.menu.background
393
- }, passThemeFlag), alignControlMirror === 'top' && align.bottom !== 'top' && align.top !== 'bottom' ? controlMirror : undefined, /*#__PURE__*/React.createElement(Box, {
394
+ }, passThemeFlag), alignControlMirror === 'top' && align.bottom !== 'top' && align.top !== 'bottom' ? controlMirror : undefined, /*#__PURE__*/React.createElement(Box, _extends({
394
395
  overflow: "auto",
395
396
  role: "menu",
396
397
  a11yTitle: a11y
397
- }, menuContent), !initialAlignTop &&
398
+ }, !grouped ? theme.menu.container : {}), menuContent), !initialAlignTop &&
398
399
  // don't show controlMirror if caller is using
399
400
  // align.bottom === 'top'
400
401
  alignControlMirror === 'bottom' && align.bottom !== 'top' && align.top !== 'bottom' ? controlMirror : undefined))
@@ -61,6 +61,10 @@ const customBreakpoints: ThemeType = {
61
61
  },
62
62
  menu: {
63
63
  background: 'light-3',
64
+ container: {
65
+ pad: 'xsmall',
66
+ gap: 'xsmall',
67
+ },
64
68
  icons: {
65
69
  down: FormDown,
66
70
  up: FormUp,
@@ -1,7 +1,7 @@
1
1
  var _excluded = ["background", "max", "round", "size", "thickness", "direction", "values", "reverse"],
2
2
  _excluded2 = ["color", "highlight", "label", "onHover", "value"];
3
3
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
5
5
  import React, { forwardRef } from 'react';
6
6
  import { parseMetricToNum } from '../../utils';
7
7
  import { StyledMeter } from './StyledMeter';
@@ -1,7 +1,7 @@
1
1
  var _excluded = ["background", "max", "round", "size", "thickness", "type", "values"],
2
2
  _excluded2 = ["color", "highlight", "label", "onHover", "value"];
3
3
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
5
5
  import React, { forwardRef } from 'react';
6
6
  import { arcCommands, parseMetricToNum, translateEndAngle } from '../../utils';
7
7
  import { StyledMeter } from './StyledMeter';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["aria-label", "background", "color", "direction", "max", "messages", "size", "thickness", "type", "reverse", "value", "values"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { forwardRef, useContext, useMemo } from 'react';
5
5
  import { Bar } from './Bar';
6
6
  import { Circle } from './Circle';
@@ -1,7 +1,9 @@
1
1
  import styled, { css } from 'styled-components';
2
2
  import { genericStyles, styledComponentsConfig } from '../../utils';
3
+
4
+ // fallback to edgeSize for backwards compatibility
3
5
  var roundStyle = css(["border-radius:", ";"], function (props) {
4
- return props.theme.global.edgeSize[props.round.size];
6
+ return props.theme.global[props.theme.global.radius ? 'radius' : 'edgeSize'][props.round.size];
5
7
  });
6
8
 
7
9
  // overflow: hidden is needed for ie11
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["align", "layout", "nameProps", "pairProps", "valueProps"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { forwardRef, useContext, useMemo } from 'react';
5
5
  import { Grid } from '../Grid';
6
6
  import { ResponsiveContext } from '../../contexts/ResponsiveContext';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["label"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { useState } from 'react';
5
5
  import { Box, Button, Grommet, Nav } from 'grommet';
6
6
  import { Dashboard } from "grommet-icons/es6/icons/Dashboard";
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["label"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { useState } from 'react';
5
5
  import { Box, Button, Nav, Text } from 'grommet';
6
6
  var SidebarButton = function SidebarButton(_ref) {
@@ -1,6 +1,7 @@
1
- var _excluded = ["actions", "message", "onClose", "id", "global", "status", "title", "toast", "icon", "time"];
1
+ var _excluded = ["fill", "direction"],
2
+ _excluded2 = ["actions", "message", "onClose", "id", "global", "status", "title", "toast", "icon", "time"];
2
3
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
5
  import React, { useCallback, useEffect, useState, useMemo, Fragment } from 'react';
5
6
  import styled from 'styled-components';
6
7
  import { Anchor } from '../Anchor';
@@ -11,6 +12,14 @@ import { Paragraph } from '../Paragraph';
11
12
  import { Text } from '../Text';
12
13
  import { NotificationType } from './propTypes';
13
14
  import { useThemeValue } from '../../utils/useThemeValue';
15
+ var Message = function Message(_ref) {
16
+ var fill = _ref.fill,
17
+ direction = _ref.direction,
18
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
19
+ return direction === 'row' ? /*#__PURE__*/React.createElement(Text, rest) : /*#__PURE__*/React.createElement(Paragraph, _extends({}, rest, {
20
+ fill: fill || false
21
+ }));
22
+ };
14
23
  var adaptThemeStyle = function adaptThemeStyle(value, theme) {
15
24
  var textStyle = value;
16
25
  var closeButtonStyle = value;
@@ -55,21 +64,21 @@ var NotificationAnchor = styled(Anchor).withConfig({
55
64
  displayName: "Notification__NotificationAnchor",
56
65
  componentId: "sc-1yq09yz-0"
57
66
  })(["white-space:nowrap;"]);
58
- var Notification = function Notification(_ref) {
67
+ var Notification = function Notification(_ref2) {
59
68
  var _theme$notification6, _theme$notification7, _theme$notification8, _theme$notification9, _theme$notification10;
60
- var actionsProp = _ref.actions,
61
- messageProp = _ref.message,
62
- onClose = _ref.onClose,
63
- id = _ref.id,
64
- global = _ref.global,
65
- _ref$status = _ref.status,
66
- status = _ref$status === void 0 ? 'unknown' : _ref$status,
67
- title = _ref.title,
68
- _ref$toast = _ref.toast,
69
- toast = _ref$toast === void 0 ? false : _ref$toast,
70
- icon = _ref.icon,
71
- time = _ref.time,
72
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
69
+ var actionsProp = _ref2.actions,
70
+ messageProp = _ref2.message,
71
+ onClose = _ref2.onClose,
72
+ id = _ref2.id,
73
+ global = _ref2.global,
74
+ _ref2$status = _ref2.status,
75
+ status = _ref2$status === void 0 ? 'unknown' : _ref2$status,
76
+ title = _ref2.title,
77
+ _ref2$toast = _ref2.toast,
78
+ toast = _ref2$toast === void 0 ? false : _ref2$toast,
79
+ icon = _ref2.icon,
80
+ time = _ref2.time,
81
+ rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
73
82
  var autoClose = toast && (toast == null ? void 0 : toast.autoClose) === undefined ? true : toast.autoClose;
74
83
  var _useThemeValue = useThemeValue(),
75
84
  theme = _useThemeValue.theme;
@@ -93,9 +102,9 @@ var Notification = function Notification(_ref) {
93
102
  return undefined;
94
103
  }, [autoClose, close, theme.notification.toast.time, theme.notification.time, time]);
95
104
  var CloseIcon = theme.notification.close.icon;
96
- var _ref2 = ((_theme$notification6 = theme.notification) == null ? void 0 : _theme$notification6[status]) || theme.notification.unknown,
97
- StatusIcon = _ref2.icon,
98
- color = _ref2.color;
105
+ var _ref3 = ((_theme$notification6 = theme.notification) == null ? void 0 : _theme$notification6[status]) || theme.notification.unknown,
106
+ StatusIcon = _ref3.icon,
107
+ color = _ref3.color;
99
108
  var closeIconColor = theme.notification.close.color;
100
109
  var kind = useMemo(function () {
101
110
  if (toast) return 'toast';
@@ -138,14 +147,16 @@ var Notification = function Notification(_ref) {
138
147
  }
139
148
  }, action, theme.notification.actions)), ' ');
140
149
  });
141
- var Message = direction !== 'row' ? Paragraph : Text;
142
- if (message || actions) message = typeof message === 'string' ? /*#__PURE__*/React.createElement(Message, _extends({}, theme.notification.message, {
143
- color: messageColor
144
- }), /*#__PURE__*/React.createElement(Text, {
145
- margin: {
146
- right: 'xsmall'
147
- }
148
- }, message), actions) : message;
150
+ if (message || actions) {
151
+ message = typeof message === 'string' ? /*#__PURE__*/React.createElement(Message, _extends({}, theme.notification.message, {
152
+ color: messageColor,
153
+ direction: direction
154
+ }), /*#__PURE__*/React.createElement(Text, {
155
+ margin: {
156
+ right: 'xsmall'
157
+ }
158
+ }, message), actions) : message;
159
+ }
149
160
  var iconDimension = ((_theme$notification10 = theme.notification) == null || (_theme$notification10 = _theme$notification10.message) == null ? void 0 : _theme$notification10.size) || 'medium';
150
161
  var content = /*#__PURE__*/React.createElement(Box, _extends({}, theme.notification.container, global ? _extends({}, theme.notification.global.container) : {}, toast ? _extends({}, theme.notification.toast.container) : {}, {
151
162
  background: background
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["kind"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { useContext, useMemo } from 'react';
5
5
  import { Box } from '../Box';
6
6
  import { PageContext } from './PageContext';
@@ -1,7 +1,7 @@
1
1
  var _excluded = ["children", "background"];
2
2
  function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
3
3
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
4
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
5
5
  import React, { useContext } from 'react';
6
6
  import { Box } from '../Box';
7
7
  import { PageContext } from '../Page';
@@ -1,5 +1,5 @@
1
1
  var _excluded = ["actions", "gridProps", "parent", "responsive", "size", "subtitle", "title", "level"];
2
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
2
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
3
3
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
4
  import React, { forwardRef, useContext } from 'react';
5
5
  import { Box } from '../Box';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["control", "separator", "size"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React from 'react';
5
5
  import { StyledContainer, StyledPaginationButton, StyledSeparator } from './StyledPageControl';
6
6
  import { useThemeValue } from '../../utils/useThemeValue';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["a11yTitle", "aria-label", "numberItems", "numberEdgePages", "numberMiddlePages", "onChange", "messages", "page", "size", "step", "stepOptions", "summary"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { forwardRef, useContext, useEffect, useState } from 'react';
5
5
  import styled from 'styled-components';
6
6
  import { DataContext } from '../../contexts/DataContext';
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["messages", "onChange", "options", "step"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
3
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { useContext } from 'react';
5
5
  import { Box } from '../Box';
6
6
  import { Select } from '../Select';