grommet 2.39.0 → 2.40.1

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 (419) 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 +8 -4
  6. package/components/Anchor/Anchor.js +6 -4
  7. package/components/Anchor/StyledAnchor.js +1 -2
  8. package/components/Avatar/Avatar.js +8 -6
  9. package/components/Avatar/StyledAvatar.js +2 -3
  10. package/components/Box/Box.js +8 -6
  11. package/components/Box/StyledBox.js +5 -6
  12. package/components/Box/stories/BackgroundThemed.js +3 -2
  13. package/components/Button/Badge.js +8 -6
  14. package/components/Button/Button.js +7 -5
  15. package/components/Button/StyledButton.js +1 -2
  16. package/components/Button/StyledButtonKind.js +1 -2
  17. package/components/Calendar/Calendar.js +27 -23
  18. package/components/Calendar/StyledCalendar.js +4 -5
  19. package/components/Card/Card.js +3 -2
  20. package/components/Card/stories/CustomThemed/Clickable.js +1 -1
  21. package/components/Card/stories/CustomThemed/Themed.js +1 -1
  22. package/components/CardBody/CardBody.js +3 -2
  23. package/components/CardFooter/CardFooter.js +3 -2
  24. package/components/CardHeader/CardHeader.js +3 -2
  25. package/components/Cards/Cards.js +4 -3
  26. package/components/Carousel/Carousel.js +4 -3
  27. package/components/Carousel/stories/CustomThemed/Custom.js +1 -1
  28. package/components/Chart/Chart.js +6 -4
  29. package/components/Chart/StyledChart.js +1 -2
  30. package/components/CheckBox/CheckBox.js +9 -7
  31. package/components/CheckBox/StyledCheckBox.js +6 -7
  32. package/components/CheckBox/stories/NoLabel.js +1 -1
  33. package/components/CheckBox/stories/Simple.js +1 -1
  34. package/components/CheckBoxGroup/CheckBoxGroup.js +6 -4
  35. package/components/CheckBoxGroup/StyledCheckBoxGroup.js +1 -2
  36. package/components/Clock/Analog.js +11 -9
  37. package/components/Clock/Clock.js +1 -1
  38. package/components/Clock/Digital.js +12 -7
  39. package/components/Clock/StyledClock.js +5 -6
  40. package/components/Collapsible/Collapsible.js +3 -2
  41. package/components/Collapsible/stories/Nested.js +1 -1
  42. package/components/Data/Data.js +1 -1
  43. package/components/Data/DataForm.js +5 -5
  44. package/components/Data/filter.js +6 -6
  45. package/components/Data/index.d.ts +1 -3
  46. package/components/Data/propTypes.js +2 -1
  47. package/components/Data/stories/ComposedToolbar.js +2 -1
  48. package/components/Data/stories/Inline.js +1 -1
  49. package/components/Data/stories/Views.js +3 -0
  50. package/components/DataChart/DataChart.js +4 -3
  51. package/components/DataChart/Detail.js +3 -2
  52. package/components/DataChart/Swatch.js +3 -2
  53. package/components/DataChart/XAxis.js +1 -1
  54. package/components/DataClearFilters/DataClearFilters.js +4 -3
  55. package/components/DataFilter/DataFilter.js +4 -4
  56. package/components/DataFilters/DataFilters.js +4 -3
  57. package/components/DataSearch/DataSearch.js +4 -3
  58. package/components/DataSort/DataSort.js +4 -3
  59. package/components/DataSummary/DataSummary.js +1 -1
  60. package/components/DataTable/Body.js +6 -4
  61. package/components/DataTable/Cell.js +6 -4
  62. package/components/DataTable/DataTable.js +7 -5
  63. package/components/DataTable/ExpanderCell.js +4 -3
  64. package/components/DataTable/Footer.js +6 -3
  65. package/components/DataTable/GroupedBody.js +5 -2
  66. package/components/DataTable/Header.js +12 -11
  67. package/components/DataTable/Resizer.js +3 -2
  68. package/components/DataTable/Searcher.js +3 -2
  69. package/components/DataTable/Sorter.js +3 -2
  70. package/components/DataTable/StyledDataTable.js +4 -5
  71. package/components/DataTable/buildState.js +10 -10
  72. package/components/DataTableColumns/DataTableColumns.js +4 -3
  73. package/components/DataTableColumns/stories/DefaultValue.js +49 -0
  74. package/components/DataTableGroupBy/DataTableGroupBy.js +1 -1
  75. package/components/DataView/DataView.js +1 -1
  76. package/components/DateInput/DateInput.js +8 -7
  77. package/components/Diagram/Diagram.js +6 -4
  78. package/components/Diagram/StyledDiagram.js +1 -2
  79. package/components/Diagram/stories/Progressing.js +1 -1
  80. package/components/Distribution/Distribution.js +5 -5
  81. package/components/Drop/Drop.js +4 -3
  82. package/components/Drop/DropContainer.js +10 -6
  83. package/components/Drop/StyledDrop.js +1 -2
  84. package/components/DropButton/DropButton.js +1 -1
  85. package/components/FileInput/FileInput.js +15 -14
  86. package/components/FileInput/StyledFileInput.js +1 -2
  87. package/components/FocusedContainer.js +1 -1
  88. package/components/Form/Form.js +7 -7
  89. package/components/FormField/FormField.js +14 -11
  90. package/components/Grid/Grid.js +6 -3
  91. package/components/Grid/StyledGrid.js +1 -7
  92. package/components/Grid/stories/CustomThemed/Responsive.js +1 -1
  93. package/components/Grommet/Grommet.js +1 -1
  94. package/components/Grommet/StyledGrommet.js +1 -2
  95. package/components/Header/Header.js +4 -3
  96. package/components/Heading/Heading.js +5 -2
  97. package/components/Heading/HeadingSkeleton.js +3 -2
  98. package/components/Heading/StyledHeading.js +1 -2
  99. package/components/Image/Image.js +5 -2
  100. package/components/Image/StyledImage.js +1 -2
  101. package/components/InfiniteScroll/InfiniteScroll.js +1 -0
  102. package/components/Keyboard/Keyboard.js +1 -1
  103. package/components/Layer/LayerContainer.js +9 -7
  104. package/components/Layer/StyledLayer.js +3 -4
  105. package/components/List/List.js +14 -11
  106. package/components/List/index.d.ts +1 -0
  107. package/components/List/propTypes.js +1 -0
  108. package/components/Markdown/Markdown.js +1 -1
  109. package/components/MaskedInput/MaskedInput.js +10 -9
  110. package/components/MaskedInput/StyledMaskedInput.js +3 -4
  111. package/components/Menu/Menu.js +8 -7
  112. package/components/Meter/Bar.js +6 -4
  113. package/components/Meter/Circle.js +6 -4
  114. package/components/Meter/Meter.js +4 -3
  115. package/components/Meter/StyledMeter.js +1 -2
  116. package/components/NameValueList/NameValueList.js +4 -3
  117. package/components/NameValuePair/NameValuePair.js +3 -2
  118. package/components/Nav/stories/CustomThemed/JustifySidebar.js +1 -1
  119. package/components/Nav/stories/Sidebar.js +1 -1
  120. package/components/Notification/Notification.js +4 -3
  121. package/components/Page/Page.js +4 -3
  122. package/components/PageContent/PageContent.js +1 -1
  123. package/components/PageHeader/PageHeader.js +4 -3
  124. package/components/Pagination/PageControl.js +9 -7
  125. package/components/Pagination/Pagination.js +8 -7
  126. package/components/Pagination/PaginationStep.js +4 -3
  127. package/components/Pagination/PaginationSummary.js +1 -1
  128. package/components/Pagination/StyledPageControl.js +3 -4
  129. package/components/Paragraph/Paragraph.js +5 -2
  130. package/components/Paragraph/ParagraphSkeleton.js +3 -2
  131. package/components/Paragraph/StyledParagraph.js +1 -2
  132. package/components/RadioButton/RadioButton.js +12 -10
  133. package/components/RadioButton/StyledRadioButton.js +5 -6
  134. package/components/RadioButtonGroup/RadioButtonGroup.js +4 -3
  135. package/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +1 -1
  136. package/components/RadioButtonGroup/stories/Disabled.js +1 -1
  137. package/components/RangeInput/RangeInput.js +6 -4
  138. package/components/RangeInput/StyledRangeInput.js +1 -2
  139. package/components/RangeSelector/EdgeControl.js +4 -3
  140. package/components/RangeSelector/RangeSelector.js +4 -3
  141. package/components/RangeSelector/stories/CustomThemed/Custom.js +1 -1
  142. package/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +1 -1
  143. package/components/RangeSelector/stories/Step.js +1 -1
  144. package/components/RangeSelector/stories/Vertical.js +1 -1
  145. package/components/RoutedAnchor/RoutedAnchor.js +1 -1
  146. package/components/RoutedButton/RoutedButton.js +1 -1
  147. package/components/Select/DefaultSelectTextInput.js +1 -1
  148. package/components/Select/Select.js +4 -3
  149. package/components/Select/SelectContainer.js +13 -10
  150. package/components/Select/StyledSelect.js +3 -4
  151. package/components/Select/stories/components/SearchBorderBox.js +1 -1
  152. package/components/Select/stories/components/SearchInput.js +1 -1
  153. package/components/Select/utils.js +10 -10
  154. package/components/SelectMultiple/SelectMultiple.js +8 -7
  155. package/components/SelectMultiple/SelectMultipleContainer.js +3 -2
  156. package/components/Sidebar/Sidebar.js +1 -1
  157. package/components/Sidebar/stories/Labels.js +1 -1
  158. package/components/Skeleton/Skeleton.js +6 -4
  159. package/components/Skeleton/StyledSkeleton.js +1 -2
  160. package/components/Skeleton/stories/GridContainer.js +1 -1
  161. package/components/Skeleton/stories/Group.js +3 -2
  162. package/components/Skeleton/stories/Individual.js +4 -3
  163. package/components/SkipLink/SkipLink.js +1 -1
  164. package/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
  165. package/components/SkipLinks/SkipLinks.js +3 -2
  166. package/components/Spinner/Spinner.js +4 -3
  167. package/components/Stack/Stack.js +5 -2
  168. package/components/Stack/StyledStack.js +1 -2
  169. package/components/StarRating/StarRating.js +4 -3
  170. package/components/Tab/StyledTab.js +1 -2
  171. package/components/Tab/Tab.js +6 -4
  172. package/components/Table/StyledTable.js +3 -4
  173. package/components/Table/Table.js +5 -2
  174. package/components/TableCell/TableCell.js +6 -4
  175. package/components/Tabs/StyledTabs.js +3 -4
  176. package/components/Tabs/Tabs.js +10 -8
  177. package/components/Tag/StyledTag.js +2 -3
  178. package/components/Tag/Tag.js +7 -5
  179. package/components/Text/StyledText.js +1 -2
  180. package/components/Text/Text.js +5 -2
  181. package/components/Text/TextSkeleton.js +4 -3
  182. package/components/TextArea/StyledTextArea.js +1 -2
  183. package/components/TextArea/TextArea.js +5 -2
  184. package/components/TextInput/CopyButton.js +8 -6
  185. package/components/TextInput/StyledTextInput.js +5 -6
  186. package/components/TextInput/TextInput.js +12 -11
  187. package/components/TextInput/stories/WithTags.js +1 -1
  188. package/components/ThumbsRating/ThumbsRating.js +3 -2
  189. package/components/Tip/Tip.js +8 -2
  190. package/components/Tip/index.d.ts +1 -0
  191. package/components/Tip/propTypes.js +2 -1
  192. package/components/ToggleGroup/StyledToggleGroup.js +1 -2
  193. package/components/ToggleGroup/ToggleGroup.js +7 -5
  194. package/components/Toolbar/Toolbar.js +1 -1
  195. package/components/Video/StyledVideo.js +4 -5
  196. package/components/Video/Video.js +8 -6
  197. package/components/WorldMap/StyledWorldMap.js +1 -2
  198. package/components/WorldMap/WorldMap.js +6 -4
  199. package/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
  200. package/es6/all/stories/AllComponents.js +1 -1
  201. package/es6/components/Accordion/Accordion.js +1 -1
  202. package/es6/components/Accordion/stories/CustomThemed/Custom.js +1 -1
  203. package/es6/components/Accordion/stories/Simple.js +1 -1
  204. package/es6/components/AccordionPanel/AccordionPanel.js +8 -4
  205. package/es6/components/Anchor/Anchor.js +5 -3
  206. package/es6/components/Anchor/StyledAnchor.js +1 -2
  207. package/es6/components/Avatar/Avatar.js +7 -5
  208. package/es6/components/Avatar/StyledAvatar.js +2 -3
  209. package/es6/components/Box/Box.js +7 -5
  210. package/es6/components/Box/StyledBox.js +5 -6
  211. package/es6/components/Box/stories/BackgroundThemed.js +2 -1
  212. package/es6/components/Button/Badge.js +7 -5
  213. package/es6/components/Button/Button.js +6 -4
  214. package/es6/components/Button/StyledButton.js +1 -2
  215. package/es6/components/Button/StyledButtonKind.js +1 -2
  216. package/es6/components/Calendar/Calendar.js +27 -22
  217. package/es6/components/Calendar/StyledCalendar.js +4 -5
  218. package/es6/components/Card/Card.js +2 -1
  219. package/es6/components/Card/stories/CustomThemed/Clickable.js +1 -1
  220. package/es6/components/Card/stories/CustomThemed/Themed.js +1 -1
  221. package/es6/components/CardBody/CardBody.js +2 -1
  222. package/es6/components/CardFooter/CardFooter.js +2 -1
  223. package/es6/components/CardHeader/CardHeader.js +2 -1
  224. package/es6/components/Cards/Cards.js +3 -2
  225. package/es6/components/Carousel/Carousel.js +3 -2
  226. package/es6/components/Carousel/stories/CustomThemed/Custom.js +1 -1
  227. package/es6/components/Chart/Chart.js +5 -3
  228. package/es6/components/Chart/StyledChart.js +1 -2
  229. package/es6/components/CheckBox/CheckBox.js +8 -6
  230. package/es6/components/CheckBox/StyledCheckBox.js +6 -7
  231. package/es6/components/CheckBox/stories/NoLabel.js +1 -1
  232. package/es6/components/CheckBox/stories/Simple.js +1 -1
  233. package/es6/components/CheckBoxGroup/CheckBoxGroup.js +5 -3
  234. package/es6/components/CheckBoxGroup/StyledCheckBoxGroup.js +1 -2
  235. package/es6/components/Clock/Analog.js +10 -8
  236. package/es6/components/Clock/Clock.js +1 -1
  237. package/es6/components/Clock/Digital.js +12 -7
  238. package/es6/components/Clock/StyledClock.js +5 -6
  239. package/es6/components/Collapsible/Collapsible.js +2 -1
  240. package/es6/components/Collapsible/stories/Nested.js +1 -1
  241. package/es6/components/Data/Data.js +1 -1
  242. package/es6/components/Data/DataForm.js +5 -5
  243. package/es6/components/Data/filter.js +6 -6
  244. package/es6/components/Data/index.d.ts +1 -3
  245. package/es6/components/Data/propTypes.js +2 -1
  246. package/es6/components/Data/stories/ComposedToolbar.js +2 -1
  247. package/es6/components/Data/stories/Inline.js +1 -1
  248. package/es6/components/Data/stories/Views.js +3 -0
  249. package/es6/components/DataChart/DataChart.js +3 -2
  250. package/es6/components/DataChart/Detail.js +2 -1
  251. package/es6/components/DataChart/Swatch.js +2 -1
  252. package/es6/components/DataChart/XAxis.js +1 -1
  253. package/es6/components/DataClearFilters/DataClearFilters.js +3 -2
  254. package/es6/components/DataFilter/DataFilter.js +4 -4
  255. package/es6/components/DataFilters/DataFilters.js +3 -2
  256. package/es6/components/DataSearch/DataSearch.js +3 -2
  257. package/es6/components/DataSort/DataSort.js +3 -2
  258. package/es6/components/DataSummary/DataSummary.js +1 -1
  259. package/es6/components/DataTable/Body.js +5 -3
  260. package/es6/components/DataTable/Cell.js +5 -3
  261. package/es6/components/DataTable/DataTable.js +6 -4
  262. package/es6/components/DataTable/ExpanderCell.js +3 -2
  263. package/es6/components/DataTable/Footer.js +6 -3
  264. package/es6/components/DataTable/GroupedBody.js +5 -2
  265. package/es6/components/DataTable/Header.js +11 -10
  266. package/es6/components/DataTable/Resizer.js +2 -1
  267. package/es6/components/DataTable/Searcher.js +2 -1
  268. package/es6/components/DataTable/Sorter.js +2 -1
  269. package/es6/components/DataTable/StyledDataTable.js +4 -5
  270. package/es6/components/DataTable/buildState.js +11 -10
  271. package/es6/components/DataTableColumns/DataTableColumns.js +3 -2
  272. package/es6/components/DataTableColumns/stories/DefaultValue.js +45 -0
  273. package/es6/components/DataTableGroupBy/DataTableGroupBy.js +1 -1
  274. package/es6/components/DataView/DataView.js +1 -1
  275. package/es6/components/DateInput/DateInput.js +7 -6
  276. package/es6/components/Diagram/Diagram.js +5 -3
  277. package/es6/components/Diagram/StyledDiagram.js +1 -2
  278. package/es6/components/Diagram/stories/Progressing.js +1 -1
  279. package/es6/components/Distribution/Distribution.js +6 -6
  280. package/es6/components/Drop/Drop.js +3 -2
  281. package/es6/components/Drop/DropContainer.js +9 -5
  282. package/es6/components/Drop/StyledDrop.js +1 -2
  283. package/es6/components/DropButton/DropButton.js +1 -1
  284. package/es6/components/FileInput/FileInput.js +14 -13
  285. package/es6/components/FileInput/StyledFileInput.js +1 -2
  286. package/es6/components/FocusedContainer.js +1 -1
  287. package/es6/components/Form/Form.js +7 -7
  288. package/es6/components/FormField/FormField.js +13 -10
  289. package/es6/components/Grid/Grid.js +6 -3
  290. package/es6/components/Grid/StyledGrid.js +1 -7
  291. package/es6/components/Grid/stories/CustomThemed/Responsive.js +1 -1
  292. package/es6/components/Grommet/Grommet.js +1 -1
  293. package/es6/components/Grommet/StyledGrommet.js +1 -2
  294. package/es6/components/Header/Header.js +3 -2
  295. package/es6/components/Heading/Heading.js +5 -2
  296. package/es6/components/Heading/HeadingSkeleton.js +2 -1
  297. package/es6/components/Heading/StyledHeading.js +1 -2
  298. package/es6/components/Image/Image.js +5 -2
  299. package/es6/components/Image/StyledImage.js +1 -2
  300. package/es6/components/InfiniteScroll/InfiniteScroll.js +1 -0
  301. package/es6/components/Keyboard/Keyboard.js +1 -1
  302. package/es6/components/Layer/LayerContainer.js +8 -6
  303. package/es6/components/Layer/StyledLayer.js +3 -4
  304. package/es6/components/List/List.js +13 -10
  305. package/es6/components/List/index.d.ts +1 -0
  306. package/es6/components/List/propTypes.js +1 -0
  307. package/es6/components/Markdown/Markdown.js +1 -1
  308. package/es6/components/MaskedInput/MaskedInput.js +9 -8
  309. package/es6/components/MaskedInput/StyledMaskedInput.js +3 -4
  310. package/es6/components/Menu/Menu.js +7 -6
  311. package/es6/components/Meter/Bar.js +5 -3
  312. package/es6/components/Meter/Circle.js +5 -3
  313. package/es6/components/Meter/Meter.js +3 -2
  314. package/es6/components/Meter/StyledMeter.js +1 -2
  315. package/es6/components/NameValueList/NameValueList.js +3 -2
  316. package/es6/components/NameValuePair/NameValuePair.js +2 -1
  317. package/es6/components/Nav/stories/CustomThemed/JustifySidebar.js +1 -1
  318. package/es6/components/Nav/stories/Sidebar.js +1 -1
  319. package/es6/components/Notification/Notification.js +3 -2
  320. package/es6/components/Page/Page.js +3 -2
  321. package/es6/components/PageContent/PageContent.js +1 -1
  322. package/es6/components/PageHeader/PageHeader.js +3 -2
  323. package/es6/components/Pagination/PageControl.js +8 -6
  324. package/es6/components/Pagination/Pagination.js +7 -6
  325. package/es6/components/Pagination/PaginationStep.js +3 -2
  326. package/es6/components/Pagination/PaginationSummary.js +1 -1
  327. package/es6/components/Pagination/StyledPageControl.js +3 -4
  328. package/es6/components/Paragraph/Paragraph.js +5 -2
  329. package/es6/components/Paragraph/ParagraphSkeleton.js +2 -1
  330. package/es6/components/Paragraph/StyledParagraph.js +1 -2
  331. package/es6/components/RadioButton/RadioButton.js +11 -9
  332. package/es6/components/RadioButton/StyledRadioButton.js +5 -6
  333. package/es6/components/RadioButtonGroup/RadioButtonGroup.js +3 -2
  334. package/es6/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +1 -1
  335. package/es6/components/RadioButtonGroup/stories/Disabled.js +1 -1
  336. package/es6/components/RangeInput/RangeInput.js +5 -3
  337. package/es6/components/RangeInput/StyledRangeInput.js +1 -2
  338. package/es6/components/RangeSelector/EdgeControl.js +3 -2
  339. package/es6/components/RangeSelector/RangeSelector.js +3 -2
  340. package/es6/components/RangeSelector/stories/CustomThemed/Custom.js +1 -1
  341. package/es6/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +1 -1
  342. package/es6/components/RangeSelector/stories/Step.js +1 -1
  343. package/es6/components/RangeSelector/stories/Vertical.js +1 -1
  344. package/es6/components/RoutedAnchor/RoutedAnchor.js +1 -1
  345. package/es6/components/RoutedButton/RoutedButton.js +1 -1
  346. package/es6/components/Select/DefaultSelectTextInput.js +1 -1
  347. package/es6/components/Select/Select.js +3 -2
  348. package/es6/components/Select/SelectContainer.js +12 -9
  349. package/es6/components/Select/StyledSelect.js +3 -4
  350. package/es6/components/Select/stories/components/SearchBorderBox.js +1 -1
  351. package/es6/components/Select/stories/components/SearchInput.js +1 -1
  352. package/es6/components/Select/utils.js +11 -10
  353. package/es6/components/SelectMultiple/SelectMultiple.js +7 -6
  354. package/es6/components/SelectMultiple/SelectMultipleContainer.js +2 -1
  355. package/es6/components/Sidebar/Sidebar.js +1 -1
  356. package/es6/components/Sidebar/stories/Labels.js +1 -1
  357. package/es6/components/Skeleton/Skeleton.js +5 -3
  358. package/es6/components/Skeleton/StyledSkeleton.js +1 -2
  359. package/es6/components/Skeleton/stories/GridContainer.js +1 -1
  360. package/es6/components/Skeleton/stories/Group.js +2 -1
  361. package/es6/components/Skeleton/stories/Individual.js +3 -2
  362. package/es6/components/SkipLink/SkipLink.js +1 -1
  363. package/es6/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
  364. package/es6/components/SkipLinks/SkipLinks.js +2 -1
  365. package/es6/components/Spinner/Spinner.js +3 -2
  366. package/es6/components/Stack/Stack.js +5 -2
  367. package/es6/components/Stack/StyledStack.js +1 -2
  368. package/es6/components/StarRating/StarRating.js +3 -2
  369. package/es6/components/Tab/StyledTab.js +1 -2
  370. package/es6/components/Tab/Tab.js +5 -3
  371. package/es6/components/Table/StyledTable.js +3 -4
  372. package/es6/components/Table/Table.js +5 -2
  373. package/es6/components/TableCell/TableCell.js +5 -3
  374. package/es6/components/Tabs/StyledTabs.js +3 -4
  375. package/es6/components/Tabs/Tabs.js +9 -7
  376. package/es6/components/Tag/StyledTag.js +2 -3
  377. package/es6/components/Tag/Tag.js +6 -4
  378. package/es6/components/Text/StyledText.js +1 -2
  379. package/es6/components/Text/Text.js +5 -2
  380. package/es6/components/Text/TextSkeleton.js +3 -2
  381. package/es6/components/TextArea/StyledTextArea.js +1 -2
  382. package/es6/components/TextArea/TextArea.js +5 -2
  383. package/es6/components/TextInput/CopyButton.js +7 -5
  384. package/es6/components/TextInput/StyledTextInput.js +5 -6
  385. package/es6/components/TextInput/TextInput.js +11 -10
  386. package/es6/components/TextInput/stories/WithTags.js +1 -1
  387. package/es6/components/ThumbsRating/ThumbsRating.js +2 -1
  388. package/es6/components/Tip/Tip.js +8 -2
  389. package/es6/components/Tip/index.d.ts +1 -0
  390. package/es6/components/Tip/propTypes.js +2 -1
  391. package/es6/components/ToggleGroup/StyledToggleGroup.js +1 -2
  392. package/es6/components/ToggleGroup/ToggleGroup.js +6 -4
  393. package/es6/components/Toolbar/Toolbar.js +1 -1
  394. package/es6/components/Video/StyledVideo.js +4 -5
  395. package/es6/components/Video/Video.js +7 -5
  396. package/es6/components/WorldMap/StyledWorldMap.js +1 -2
  397. package/es6/components/WorldMap/WorldMap.js +5 -3
  398. package/es6/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
  399. package/es6/utils/DOM.js +7 -5
  400. package/es6/utils/background.js +4 -4
  401. package/es6/utils/colors.js +3 -2
  402. package/es6/utils/mixins.js +3 -2
  403. package/es6/utils/object.js +3 -2
  404. package/es6/utils/pagination.js +1 -1
  405. package/es6/utils/styles.js +1 -1
  406. package/es6/utils/use-debounce.js +2 -1
  407. package/es6/utils/useThemeValue.js +15 -6
  408. package/grommet.min.js +1 -1
  409. package/grommet.min.js.map +1 -1
  410. package/package.json +37 -37
  411. package/utils/DOM.js +4 -4
  412. package/utils/background.js +4 -4
  413. package/utils/colors.js +2 -2
  414. package/utils/mixins.js +2 -2
  415. package/utils/object.js +2 -2
  416. package/utils/pagination.js +1 -1
  417. package/utils/styles.js +1 -1
  418. package/utils/use-debounce.js +3 -2
  419. package/utils/useThemeValue.js +12 -3
@@ -10,7 +10,7 @@ var _excluded = ["id"],
10
10
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
11
11
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
12
12
  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); }
13
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
13
+ 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; }
14
14
  var Node = function Node(_ref) {
15
15
  var id = _ref.id,
16
16
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
@@ -10,7 +10,7 @@ var _excluded = ["activeIndex", "animate", "children", "level", "multiple", "onA
10
10
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
11
11
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
12
12
  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); }
13
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
13
+ 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; }
14
14
  var activeAsArray = function activeAsArray(active) {
15
15
  return typeof active === 'number' ? [active] : active;
16
16
  };
@@ -8,7 +8,7 @@ var _grommet = require("grommet");
8
8
  var _excluded = ["animate", "multiple"];
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
10
  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); }
11
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
11
+ 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; }
12
12
  var customAccordionTheme = {
13
13
  global: {
14
14
  font: {
@@ -6,7 +6,7 @@ var _react = _interopRequireDefault(require("react"));
6
6
  var _grommet = require("grommet");
7
7
  var _excluded = ["animate", "multiple"];
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
9
+ 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; }
10
10
  var Simple = exports.Simple = function Simple(props) {
11
11
  var animate = props.animate,
12
12
  multiple = props.multiple,
@@ -10,12 +10,12 @@ var _Collapsible = require("../Collapsible");
10
10
  var _Heading = require("../Heading");
11
11
  var _AccordionContext = require("../Accordion/AccordionContext");
12
12
  var _propTypes = require("./propTypes");
13
- var _useThemeValue = require("../../utils/useThemeValue");
13
+ var _useThemeValue2 = require("../../utils/useThemeValue");
14
14
  var _excluded = ["children", "header", "label", "onClick", "onMouseOut", "onMouseOver", "onFocus", "onBlur"];
15
15
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
16
16
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
17
17
  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); }
18
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
18
+ 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; }
19
19
  var AccordionPanel = exports.AccordionPanel = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
20
20
  var children = _ref.children,
21
21
  header = _ref.header,
@@ -26,7 +26,9 @@ var AccordionPanel = exports.AccordionPanel = /*#__PURE__*/(0, _react.forwardRef
26
26
  _onFocus = _ref.onFocus,
27
27
  _onBlur = _ref.onBlur,
28
28
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
29
- var theme = (0, _useThemeValue.useThemeValue)();
29
+ var uniqueId = (0, _react.useId)();
30
+ var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
31
+ theme = _useThemeValue.theme;
30
32
  var _useContext = (0, _react.useContext)(_AccordionContext.AccordionContext),
31
33
  active = _useContext.active,
32
34
  animate = _useContext.animate,
@@ -76,6 +78,7 @@ var AccordionPanel = exports.AccordionPanel = /*#__PURE__*/(0, _react.forwardRef
76
78
  border: panelBorder,
77
79
  margin: abutMargin
78
80
  }, /*#__PURE__*/_react["default"].createElement(_Button.Button, {
81
+ id: uniqueId,
79
82
  "aria-expanded": active,
80
83
  plain: theme.button["default"] ? true : undefined,
81
84
  onClick: onPanelChange,
@@ -124,7 +127,8 @@ var AccordionPanel = exports.AccordionPanel = /*#__PURE__*/(0, _react.forwardRef
124
127
  color: iconColor
125
128
  })))), /*#__PURE__*/_react["default"].createElement(_Box.Box, {
126
129
  role: "region",
127
- border: contentBorder
130
+ border: contentBorder,
131
+ "aria-labelledby": uniqueId
128
132
  }, animate ? /*#__PURE__*/_react["default"].createElement(_Collapsible.Collapsible, {
129
133
  open: active
130
134
  }, children) : active && children));
@@ -9,12 +9,12 @@ var _StyledAnchor = require("./StyledAnchor");
9
9
  var _propTypes = require("./propTypes");
10
10
  var _AnalyticsContext = require("../../contexts/AnalyticsContext");
11
11
  var _TextContext = require("../Text/TextContext");
12
- var _useThemeValue = require("../../utils/useThemeValue");
12
+ var _useThemeValue2 = require("../../utils/useThemeValue");
13
13
  var _excluded = ["a11yTitle", "aria-label", "children", "color", "disabled", "gap", "href", "icon", "label", "onBlur", "onClick", "onFocus", "reverse", "size"];
14
14
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
15
15
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
16
16
  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); }
17
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
17
+ 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; }
18
18
  var Anchor = exports.Anchor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
19
19
  var a11yTitle = _ref.a11yTitle,
20
20
  ariaLabel = _ref['aria-label'],
@@ -31,7 +31,9 @@ var Anchor = exports.Anchor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref
31
31
  reverse = _ref.reverse,
32
32
  sizeProp = _ref.size,
33
33
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
34
- var theme = (0, _useThemeValue.useThemeValue)();
34
+ var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
35
+ theme = _useThemeValue.theme,
36
+ passThemeFlag = _useThemeValue.passThemeFlag;
35
37
  var _useState = (0, _react.useState)(),
36
38
  focus = _useState[0],
37
39
  setFocus = _useState[1];
@@ -83,7 +85,7 @@ var Anchor = exports.Anchor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref
83
85
  if (_onBlur) _onBlur(event);
84
86
  },
85
87
  size: sizeProp || size
86
- }), first && second ? /*#__PURE__*/_react["default"].createElement(_Box.Box, {
88
+ }, passThemeFlag), first && second ? /*#__PURE__*/_react["default"].createElement(_Box.Box, {
87
89
  as: "span",
88
90
  direction: "row",
89
91
  align: "center",
@@ -4,7 +4,6 @@ exports.__esModule = true;
4
4
  exports.StyledAnchor = void 0;
5
5
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
6
6
  var _utils = require("../../utils");
7
- var _defaultProps = require("../../default-props");
8
7
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
9
8
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
10
9
  var disabledStyle = "\n opacity: 0.3;\n cursor: default;\n text-decoration: none;\n";
@@ -16,7 +15,7 @@ var sizeStyle = function sizeStyle(props) {
16
15
  }
17
16
  return (0, _styledComponents.css)(["font-size:inherit;line-height:inherit;"]);
18
17
  };
19
- var StyledAnchor = exports.StyledAnchor = _styledComponents["default"].a.withConfig(_utils.styledComponentsConfig).attrs(_defaultProps.withTheme).withConfig({
18
+ var StyledAnchor = exports.StyledAnchor = _styledComponents["default"].a.withConfig(_utils.styledComponentsConfig).withConfig({
20
19
  displayName: "StyledAnchor",
21
20
  componentId: "sc-1rp7lwl-0"
22
21
  })(["box-sizing:border-box;display:inline-flex;", " color:", ";", " text-decoration:", ";cursor:pointer;", " ", " ", " ", " ", " ", ""], function (props) {
@@ -6,12 +6,12 @@ var _react = _interopRequireWildcard(require("react"));
6
6
  var _Image = require("../Image");
7
7
  var _StyledAvatar = require("./StyledAvatar");
8
8
  var _propTypes = require("./propTypes");
9
- var _useThemeValue = require("../../utils/useThemeValue");
9
+ var _useThemeValue2 = require("../../utils/useThemeValue");
10
10
  var _excluded = ["a11yTitle", "aria-label", "align", "children", "height", "justify", "round", "size", "src", "width"];
11
11
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
12
12
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
13
13
  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); }
14
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
14
+ 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; }
15
15
  var Avatar = exports.Avatar = function Avatar(_ref) {
16
16
  var a11yTitle = _ref.a11yTitle,
17
17
  ariaLabel = _ref['aria-label'],
@@ -28,7 +28,9 @@ var Avatar = exports.Avatar = function Avatar(_ref) {
28
28
  src = _ref.src,
29
29
  width = _ref.width,
30
30
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
31
- var theme = (0, _useThemeValue.useThemeValue)();
31
+ var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
32
+ theme = _useThemeValue.theme,
33
+ passThemeFlag = _useThemeValue.passThemeFlag;
32
34
  var avatarSize = theme.avatar.size[size] || size;
33
35
  var avatarTextSize = theme.avatar.text.size[size] || 'large';
34
36
  var avatarProps = (0, _react.useMemo)(function () {
@@ -49,10 +51,10 @@ var Avatar = exports.Avatar = function Avatar(_ref) {
49
51
  }
50
52
  var content;
51
53
  if (typeof children === 'string') {
52
- content = /*#__PURE__*/_react["default"].createElement(_StyledAvatar.StyledAvatarText, {
54
+ content = /*#__PURE__*/_react["default"].createElement(_StyledAvatar.StyledAvatarText, _extends({
53
55
  alignSelf: "center",
54
56
  size: avatarTextSize
55
- }, children);
57
+ }, passThemeFlag), children);
56
58
  } else if (typeof src === 'string') {
57
59
  content = /*#__PURE__*/_react["default"].createElement(_Image.Image, {
58
60
  role: "presentation",
@@ -64,7 +66,7 @@ var Avatar = exports.Avatar = function Avatar(_ref) {
64
66
  return /*#__PURE__*/_react["default"].createElement(_StyledAvatar.StyledAvatar, _extends({
65
67
  role: typeof src === 'string' ? 'figure' : undefined,
66
68
  a11yTitle: a11yTitle || ariaLabel
67
- }, avatarProps, rest), content);
69
+ }, avatarProps, passThemeFlag, rest), content);
68
70
  }
69
71
  return /*#__PURE__*/_react["default"].createElement(AvatarChildren, null);
70
72
  };
@@ -5,9 +5,8 @@ exports.StyledAvatarText = exports.StyledAvatar = void 0;
5
5
  var _styledComponents = _interopRequireDefault(require("styled-components"));
6
6
  var _Box = require("../Box");
7
7
  var _Text = require("../Text");
8
- var _defaultProps = require("../../default-props");
9
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
- var StyledAvatarText = exports.StyledAvatarText = (0, _styledComponents["default"])(_Text.Text).attrs(_defaultProps.withTheme).withConfig({
9
+ var StyledAvatarText = exports.StyledAvatarText = (0, _styledComponents["default"])(_Text.Text).withConfig({
11
10
  displayName: "StyledAvatar__StyledAvatarText",
12
11
  componentId: "sc-1suyamb-0"
13
12
  })(["", " ", ""], function (props) {
@@ -15,7 +14,7 @@ var StyledAvatarText = exports.StyledAvatarText = (0, _styledComponents["default
15
14
  }, function (props) {
16
15
  return props.theme.avatar.text && props.theme.avatar.text.extend;
17
16
  });
18
- var StyledAvatar = exports.StyledAvatar = (0, _styledComponents["default"])(_Box.Box).attrs(_defaultProps.withTheme).withConfig({
17
+ var StyledAvatar = exports.StyledAvatar = (0, _styledComponents["default"])(_Box.Box).withConfig({
19
18
  displayName: "StyledAvatar",
20
19
  componentId: "sc-1suyamb-1"
21
20
  })(["", ""], function (props) {
@@ -11,13 +11,13 @@ var _propTypes = require("./propTypes");
11
11
  var _Skeleton = require("../Skeleton");
12
12
  var _AnnounceContext = require("../../contexts/AnnounceContext");
13
13
  var _OptionsContext = require("../../contexts/OptionsContext");
14
- var _useThemeValue = require("../../utils/useThemeValue");
14
+ var _useThemeValue2 = require("../../utils/useThemeValue");
15
15
  var _excluded = ["a11yTitle", "background", "border", "children", "cssGap", "direction", "elevation", "fill", "gap", "kind", "onBlur", "onClick", "onFocus", "overflow", "responsive", "tag", "as", "wrap", "width", "height", "tabIndex", "skeleton"],
16
16
  _excluded2 = ["colors", "size"];
17
17
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
18
18
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
19
19
  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); }
20
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
20
+ 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; }
21
21
  var Box = exports.Box = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
22
22
  var a11yTitle = _ref.a11yTitle,
23
23
  backgroundProp = _ref.background,
@@ -44,7 +44,9 @@ var Box = exports.Box = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
44
44
  tabIndex = _ref.tabIndex,
45
45
  skeletonProp = _ref.skeleton,
46
46
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
47
- var theme = (0, _useThemeValue.useThemeValue)();
47
+ var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
48
+ theme = _useThemeValue.theme,
49
+ passThemeFlag = _useThemeValue.passThemeFlag;
48
50
  // boxOptions was created to preserve backwards compatibility but
49
51
  // should not be supported in v3
50
52
  var _useContext = (0, _react.useContext)(_OptionsContext.OptionsContext),
@@ -116,14 +118,14 @@ var Box = exports.Box = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
116
118
  } else {
117
119
  contents.push( /*#__PURE__*/_react["default"].createElement(_StyledBox.StyledBoxGap
118
120
  // eslint-disable-next-line react/no-array-index-key
119
- , {
121
+ , _extends({
120
122
  key: "gap-" + index,
121
123
  as: boxAs === 'span' ? boxAs : 'div',
122
124
  gap: gap,
123
125
  directionProp: direction,
124
126
  responsive: responsive,
125
127
  border: styledBoxGapBorder
126
- }));
128
+ }, passThemeFlag)));
127
129
  }
128
130
  }
129
131
  contents.push(child);
@@ -201,7 +203,7 @@ var Box = exports.Box = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
201
203
  heightProp: height,
202
204
  responsive: responsive,
203
205
  tabIndex: adjustedTabIndex
204
- }, clickProps, rest, skeletonProps), /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeContext.Provider, {
206
+ }, clickProps, passThemeFlag, rest, skeletonProps), /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeContext.Provider, {
205
207
  value: nextTheme
206
208
  }, contents));
207
209
  if (onClick) {
@@ -6,7 +6,6 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
6
6
  var _utils = require("../../utils");
7
7
  var _styles = require("../../utils/styles");
8
8
  var _animation = require("../../utils/animation");
9
- var _defaultProps = require("../../default-props");
10
9
  var _FLEX_MAP;
11
10
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
12
11
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
@@ -72,7 +71,7 @@ var WRAP_MAP = {
72
71
  var wrapStyle = (0, _styledComponents.css)(["flex-wrap:", ";"], function (props) {
73
72
  return WRAP_MAP[props.wrapProp];
74
73
  });
75
- var animationItemStyle = function animationItemStyle(item, theme) {
74
+ var _animationItemStyle = function animationItemStyle(item, theme) {
76
75
  if (typeof item === 'string') {
77
76
  return (0, _animation.animationObjectStyle)({
78
77
  type: item
@@ -80,7 +79,7 @@ var animationItemStyle = function animationItemStyle(item, theme) {
80
79
  }
81
80
  if (Array.isArray(item)) {
82
81
  return item.reduce(function (style, a, index) {
83
- return (0, _styledComponents.css)(["", "", " ", ""], style, index > 0 ? ',' : '', animationItemStyle(a, theme));
82
+ return (0, _styledComponents.css)(["", "", " ", ""], style, index > 0 ? ',' : '', _animationItemStyle(a, theme));
84
83
  }, '');
85
84
  }
86
85
  if (typeof item === 'object') {
@@ -120,7 +119,7 @@ var animationInitialStyle = function animationInitialStyle(item) {
120
119
  return '';
121
120
  };
122
121
  var animationStyle = (0, _styledComponents.css)(["", ";"], function (props) {
123
- return (0, _styledComponents.css)(["", " animation:", ";"], animationInitialStyle(props.animation), animationItemStyle(props.animation, props.theme));
122
+ return (0, _styledComponents.css)(["", " animation:", ";"], animationInitialStyle(props.animation), _animationItemStyle(props.animation, props.theme));
124
123
  });
125
124
  var interactiveStyle = (0, _styledComponents.css)(["cursor:pointer;&:hover{", " ", "}"], function (props) {
126
125
  var _props$kindProp;
@@ -170,7 +169,7 @@ var gapStyle = function gapStyle(directionProp, gap, responsive, wrap, theme) {
170
169
  };
171
170
 
172
171
  // NOTE: basis must be after flex! Otherwise, flex overrides basis
173
- var StyledBox = exports.StyledBox = _styledComponents["default"].div.withConfig(_styles.styledComponentsConfig).attrs(_defaultProps.withTheme).withConfig({
172
+ var StyledBox = exports.StyledBox = _styledComponents["default"].div.withConfig(_styles.styledComponentsConfig).withConfig({
174
173
  displayName: "StyledBox",
175
174
  componentId: "sc-13pk1d4-0"
176
175
  })(["display:flex;box-sizing:border-box;", ";", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", ""], function (props) {
@@ -273,7 +272,7 @@ var gapGapStyle = function gapGapStyle(directionProp, gap, responsive, border, t
273
272
  }
274
273
  return styles;
275
274
  };
276
- var StyledBoxGap = exports.StyledBoxGap = _styledComponents["default"].div.withConfig(_styles.styledComponentsConfig).attrs(_defaultProps.withTheme).withConfig({
275
+ var StyledBoxGap = exports.StyledBoxGap = _styledComponents["default"].div.withConfig(_styles.styledComponentsConfig).withConfig({
277
276
  displayName: "StyledBox__StyledBoxGap",
278
277
  componentId: "sc-13pk1d4-1"
279
278
  })(["flex:0 0 auto;align-self:stretch;", ";"], function (props) {
@@ -5,10 +5,11 @@ exports["default"] = exports.BackgroundThemed = void 0;
5
5
  var _react = _interopRequireDefault(require("react"));
6
6
  var _grommet = require("grommet");
7
7
  var _Grid = require("../../Grid");
8
- var _useThemeValue = require("../../../utils/useThemeValue");
8
+ var _useThemeValue2 = require("../../../utils/useThemeValue");
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
10
  var BackgroundThemed = exports.BackgroundThemed = function BackgroundThemed() {
11
- var theme = (0, _useThemeValue.useThemeValue)();
11
+ var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
12
+ theme = _useThemeValue.theme;
12
13
  var backgrounds = theme.global.backgrounds;
13
14
  return (
14
15
  // Uncomment <Grommet> lines when using outside of storybook
@@ -9,12 +9,12 @@ var _useIsomorphicLayoutEffect = require("../../utils/use-isomorphic-layout-effe
9
9
  var _Box = require("../Box");
10
10
  var _Stack = require("../Stack");
11
11
  var _Text = require("../Text");
12
- var _defaultProps = require("../../default-props");
13
- var _useThemeValue = require("../../utils/useThemeValue");
12
+ var _useThemeValue2 = require("../../utils/useThemeValue");
14
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
15
14
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
16
15
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
17
- var StyledBadgeContainer = (0, _styledComponents["default"])(_Box.Box).attrs(_defaultProps.withTheme).withConfig({
16
+ 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); }
17
+ var StyledBadgeContainer = (0, _styledComponents["default"])(_Box.Box).withConfig({
18
18
  displayName: "Badge__StyledBadgeContainer",
19
19
  componentId: "sc-1es4ws1-0"
20
20
  })(["", ""], function (props) {
@@ -23,7 +23,9 @@ var StyledBadgeContainer = (0, _styledComponents["default"])(_Box.Box).attrs(_de
23
23
  var Badge = exports.Badge = function Badge(_ref) {
24
24
  var children = _ref.children,
25
25
  content = _ref.content;
26
- var theme = (0, _useThemeValue.useThemeValue)();
26
+ var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
27
+ theme = _useThemeValue.theme,
28
+ passThemeFlag = _useThemeValue.passThemeFlag;
27
29
  var containerRef = (0, _react.useRef)();
28
30
  var contentRef = (0, _react.useRef)();
29
31
  var stackRef = (0, _react.useRef)();
@@ -111,7 +113,7 @@ var Badge = exports.Badge = function Badge(_ref) {
111
113
  ref: contentRef
112
114
  }, value > max ? max + "+" : value);
113
115
  }
114
- badge = /*#__PURE__*/_react["default"].createElement(StyledBadgeContainer, {
116
+ badge = /*#__PURE__*/_react["default"].createElement(StyledBadgeContainer, _extends({
115
117
  ref: containerRef,
116
118
  align: "center",
117
119
  background: content.background || theme.button.badge.container.background,
@@ -119,7 +121,7 @@ var Badge = exports.Badge = function Badge(_ref) {
119
121
  justify: "center",
120
122
  round: true,
121
123
  pad: !(typeof value === 'boolean' || typeof content === 'boolean') ? theme.button.badge.container.pad : undefined
122
- }, badge);
124
+ }, passThemeFlag), badge);
123
125
  // caller has provided their own JSX and we will just render that
124
126
  } else badge = /*#__PURE__*/_react["default"].createElement(_Box.Box, {
125
127
  ref: contentRef
@@ -16,13 +16,13 @@ var _StyledButtonKind = require("./StyledButtonKind");
16
16
  var _AnalyticsContext = require("../../contexts/AnalyticsContext");
17
17
  var _Skeleton = require("../Skeleton");
18
18
  var _BusyAnimation = require("./BusyAnimation");
19
- var _useThemeValue = require("../../utils/useThemeValue");
19
+ var _useThemeValue2 = require("../../utils/useThemeValue");
20
20
  var _excluded = ["active", "align", "aria-label", "badge", "busy", "color", "children", "disabled", "icon", "focusIndicator", "gap", "fill", "href", "justify", "kind", "label", "messages", "onBlur", "onClick", "onFocus", "onMouseOut", "onMouseOver", "pad", "plain", "primary", "reverse", "secondary", "selected", "size", "success", "tip", "type", "a11yTitle", "as"];
21
21
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
22
22
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
23
23
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
24
24
  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); }
25
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
25
+ 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; }
26
26
  var RelativeBox = (0, _styledComponents["default"])(_Box.Box).withConfig({
27
27
  displayName: "Button__RelativeBox",
28
28
  componentId: "sc-zuqsuw-0"
@@ -186,7 +186,9 @@ var Button = exports.Button = /*#__PURE__*/(0, _react.forwardRef)(function (_ref
186
186
  a11yTitle = _ref$a11yTitle === void 0 ? typeof tip === 'string' ? tip : undefined : _ref$a11yTitle,
187
187
  as = _ref.as,
188
188
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
189
- var theme = (0, _useThemeValue.useThemeValue)();
189
+ var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
190
+ theme = _useThemeValue.theme,
191
+ passThemeFlag = _useThemeValue.passThemeFlag;
190
192
  var _useState = (0, _react.useState)(),
191
193
  focus = _useState[0],
192
194
  setFocus = _useState[1];
@@ -434,7 +436,7 @@ var Button = exports.Button = /*#__PURE__*/(0, _react.forwardRef)(function (_ref
434
436
  sizeProp: size,
435
437
  success: success,
436
438
  type: !href ? type : undefined
437
- }), contents);
439
+ }, passThemeFlag), contents);
438
440
  } else {
439
441
  styledButtonResult = /*#__PURE__*/_react["default"].createElement(_StyledButton.StyledButton, _extends({}, rest, {
440
442
  as: domTag,
@@ -471,7 +473,7 @@ var Button = exports.Button = /*#__PURE__*/(0, _react.forwardRef)(function (_ref
471
473
  sizeProp: size,
472
474
  success: success,
473
475
  type: !href ? type : undefined
474
- }), contents);
476
+ }, passThemeFlag), contents);
475
477
  }
476
478
  if (tip) {
477
479
  if (typeof tip === 'string') {
@@ -4,7 +4,6 @@ exports.__esModule = true;
4
4
  exports.StyledButton = void 0;
5
5
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
6
6
  var _utils = require("../../utils");
7
- var _defaultProps = require("../../default-props");
8
7
  var _styles = require("../../utils/styles");
9
8
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
10
9
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
@@ -75,7 +74,7 @@ var disabledButtonStyle = function disabledButtonStyle(props) {
75
74
  };
76
75
 
77
76
  // Deprecate props.theme.button.disabled.opacity in V3
78
- var StyledButton = exports.StyledButton = _styledComponents["default"].button.withConfig(_styles.styledComponentsConfig).attrs(_defaultProps.withTheme).withConfig({
77
+ var StyledButton = exports.StyledButton = _styledComponents["default"].button.withConfig(_styles.styledComponentsConfig).withConfig({
79
78
  displayName: "StyledButton",
80
79
  componentId: "sc-323bzc-0"
81
80
  })(["display:inline-block;box-sizing:border-box;cursor:pointer;font:inherit;text-decoration:none;margin:0;background:transparent;overflow:visible;text-transform:none;", " ", " ", " ", " ", " ", " ", " &:focus{", "}&:focus:not(:focus-visible){", "}", " ", " ", " ", " ", " ", " ", ""], _utils.genericStyles, function (props) {
@@ -5,7 +5,6 @@ exports.StyledButtonKind = void 0;
5
5
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
6
6
  var _isPropValid = _interopRequireDefault(require("@emotion/is-prop-valid"));
7
7
  var _utils = require("../../utils");
8
- var _defaultProps = require("../../default-props");
9
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
9
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
11
10
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
@@ -172,7 +171,7 @@ var fillStyle = function fillStyle(fillContainer) {
172
171
  var plainStyle = function plainStyle(props) {
173
172
  return (0, _styledComponents.css)(["outline:none;border:none;padding:0;text-align:inherit;color:inherit;", " ", ""], props.icon && "\n > svg {\n display: flex;\n align-self: center;\n vertical-align: middle;\n }\n ", props.hasIcon && !props.hasLabel && "line-height: 0;");
174
173
  };
175
- var StyledButtonKind = exports.StyledButtonKind = _styledComponents["default"].button.attrs(_defaultProps.withTheme).withConfig({
174
+ var StyledButtonKind = exports.StyledButtonKind = _styledComponents["default"].button.withConfig({
176
175
  shouldForwardProp: function shouldForwardProp(prop) {
177
176
  return (0, _isPropValid["default"])(prop) && !['kind'].includes(prop);
178
177
  }