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
@@ -15,11 +15,11 @@ var _propTypes = require("./propTypes");
15
15
  var _StyledCalendar = require("./StyledCalendar");
16
16
  var _utils = require("./utils");
17
17
  var _dates = require("../../utils/dates");
18
- var _useThemeValue = require("../../utils/useThemeValue");
18
+ var _useThemeValue3 = require("../../utils/useThemeValue");
19
19
  var _excluded = ["activeDate", "animate", "bounds", "children", "date", "dates", "daysOfWeek", "disabled", "initialFocus", "fill", "firstDayOfWeek", "header", "locale", "messages", "onReference", "onSelect", "range", "reference", "showAdjacentDays", "size", "timestamp"];
20
20
  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); }
21
21
  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; }
22
- 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; }
22
+ 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; }
23
23
  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); }
24
24
  var headingPadMap = {
25
25
  small: 'xsmall',
@@ -57,7 +57,7 @@ var currentlySelectedString = function currentlySelectedString(value, locale) {
57
57
 
58
58
  // calendar value may be a single date, multiple dates, a range of dates
59
59
  // supplied as ISOstrings.
60
- var normalizeInput = function normalizeInput(dateValue) {
60
+ var _normalizeInput = function normalizeInput(dateValue) {
61
61
  var result;
62
62
  if (dateValue instanceof Date) {
63
63
  result = dateValue;
@@ -67,12 +67,12 @@ var normalizeInput = function normalizeInput(dateValue) {
67
67
  result = (0, _dates.setHoursWithOffset)(dateValue);
68
68
  } else if (Array.isArray(dateValue)) {
69
69
  result = dateValue.map(function (d) {
70
- return normalizeInput(d);
70
+ return _normalizeInput(d);
71
71
  });
72
72
  }
73
73
  return result;
74
74
  };
75
- var normalizeOutput = function normalizeOutput(dateValue, outputFormat) {
75
+ var _normalizeOutput = function normalizeOutput(dateValue, outputFormat) {
76
76
  var result;
77
77
  var normalize = function normalize(value) {
78
78
  var normalizedValue = value.toISOString();
@@ -88,7 +88,7 @@ var normalizeOutput = function normalizeOutput(dateValue, outputFormat) {
88
88
  result = undefined;
89
89
  } else {
90
90
  result = dateValue.map(function (d) {
91
- return normalizeOutput(d, outputFormat);
91
+ return _normalizeOutput(d, outputFormat);
92
92
  });
93
93
  }
94
94
  return result;
@@ -144,12 +144,12 @@ var disabledCalendarNextMonthButton = function disabledCalendarNextMonthButton(d
144
144
  var firstBound = new Date(bounds[0]);
145
145
  return !(0, _utils.sameDayOrAfter)(firstBound, reference) && !(0, _utils.betweenDates)(date, bounds);
146
146
  };
147
- var getOutputFormat = exports.getOutputFormat = function getOutputFormat(dates) {
147
+ var _getOutputFormat = exports.getOutputFormat = function getOutputFormat(dates) {
148
148
  if (typeof dates === 'string' && (dates == null ? void 0 : dates.indexOf('T')) === -1) {
149
149
  return 'no timezone';
150
150
  }
151
151
  if (Array.isArray(dates)) {
152
- return getOutputFormat(dates[0]);
152
+ return _getOutputFormat(dates[0]);
153
153
  }
154
154
  return 'date timezone';
155
155
  };
@@ -169,20 +169,22 @@ var CalendarDay = function CalendarDay(_ref) {
169
169
  otherMonth = _ref.otherMonth,
170
170
  _ref$buttonProps = _ref.buttonProps,
171
171
  buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps;
172
+ var _useThemeValue = (0, _useThemeValue3.useThemeValue)(),
173
+ passThemeFlag = _useThemeValue.passThemeFlag;
172
174
  return /*#__PURE__*/_react["default"].createElement(_StyledCalendar.StyledDayContainer, {
173
175
  role: "gridcell",
174
176
  sizeProp: size,
175
177
  fillContainer: fill
176
178
  }, /*#__PURE__*/_react["default"].createElement(CalendarDayButton, _extends({
177
179
  fill: fill
178
- }, buttonProps), /*#__PURE__*/_react["default"].createElement(_StyledCalendar.StyledDay, {
180
+ }, buttonProps), /*#__PURE__*/_react["default"].createElement(_StyledCalendar.StyledDay, _extends({
179
181
  disabledProp: buttonProps.disabled,
180
182
  inRange: isInRange,
181
183
  otherMonth: otherMonth,
182
184
  isSelected: isSelected,
183
185
  sizeProp: size,
184
186
  fillContainer: fill
185
- }, children)));
187
+ }, passThemeFlag), children)));
186
188
  };
187
189
  var CalendarCustomDay = function CalendarCustomDay(_ref2) {
188
190
  var children = _ref2.children,
@@ -232,7 +234,9 @@ var Calendar = exports.Calendar = /*#__PURE__*/(0, _react.forwardRef)(function (
232
234
  size = _ref3$size === void 0 ? 'medium' : _ref3$size,
233
235
  timestampProp = _ref3.timestamp,
234
236
  rest = _objectWithoutPropertiesLoose(_ref3, _excluded);
235
- var theme = (0, _useThemeValue.useThemeValue)();
237
+ var _useThemeValue2 = (0, _useThemeValue3.useThemeValue)(),
238
+ theme = _useThemeValue2.theme,
239
+ passThemeFlag = _useThemeValue2.passThemeFlag;
236
240
  var announce = (0, _react.useContext)(_AnnounceContext.AnnounceContext);
237
241
  var _useContext = (0, _react.useContext)(_MessageContext.MessageContext),
238
242
  format = _useContext.format;
@@ -265,26 +269,26 @@ var Calendar = exports.Calendar = /*#__PURE__*/(0, _react.forwardRef)(function (
265
269
  (0, _react.useEffect)(function () {
266
270
  if (activeDateProp) setActiveDate(activeDateProp);
267
271
  }, [activeDateProp]);
268
- var _useState3 = (0, _react.useState)(normalizeInput(dateProp || datesProp)),
272
+ var _useState3 = (0, _react.useState)(_normalizeInput(dateProp || datesProp)),
269
273
  value = _useState3[0],
270
274
  setValue = _useState3[1];
271
275
  (0, _react.useEffect)(function () {
272
276
  var val = dateProp || datesProp;
273
- setValue(normalizeInput(val));
277
+ setValue(_normalizeInput(val));
274
278
  }, [dateProp, datesProp]);
275
- var _useState4 = (0, _react.useState)(getReference(normalizeInput(referenceProp), value)),
279
+ var _useState4 = (0, _react.useState)(getReference(_normalizeInput(referenceProp), value)),
276
280
  reference = _useState4[0],
277
281
  setReference = _useState4[1];
278
282
  (0, _react.useEffect)(function () {
279
283
  if (value) {
280
- setReference(getReference(normalizeInput(referenceProp), value));
284
+ setReference(getReference(_normalizeInput(referenceProp), value));
281
285
  }
282
286
  }, [referenceProp, value]);
283
- var _useState5 = (0, _react.useState)(getOutputFormat(dateProp || datesProp)),
287
+ var _useState5 = (0, _react.useState)(_getOutputFormat(dateProp || datesProp)),
284
288
  outputFormat = _useState5[0],
285
289
  setOutputFormat = _useState5[1];
286
290
  (0, _react.useEffect)(function () {
287
- setOutputFormat(getOutputFormat(dateProp || datesProp));
291
+ setOutputFormat(_getOutputFormat(dateProp || datesProp));
288
292
  }, [dateProp, datesProp]);
289
293
 
290
294
  // normalize bounds
@@ -488,7 +492,7 @@ var Calendar = exports.Calendar = /*#__PURE__*/(0, _react.forwardRef)(function (
488
492
  nextValue = selectedDate;
489
493
  }
490
494
  if (onSelect) {
491
- nextValue = normalizeOutput(nextValue, outputFormat);
495
+ nextValue = _normalizeOutput(nextValue, outputFormat);
492
496
  onSelect(nextValue);
493
497
  }
494
498
  }, [handleRange, onSelect, outputFormat, range, value]);
@@ -649,7 +653,7 @@ var Calendar = exports.Calendar = /*#__PURE__*/(0, _react.forwardRef)(function (
649
653
  } else if (selectedState === 1) {
650
654
  inRange = true;
651
655
  }
652
- var dayDisabled = (0, _utils.withinDates)(day, normalizeInput(disabled)) || bounds && !(0, _utils.betweenDates)(day, normalizeInput(bounds));
656
+ var dayDisabled = (0, _utils.withinDates)(day, _normalizeInput(disabled)) || bounds && !(0, _utils.betweenDates)(day, _normalizeInput(bounds));
653
657
  if (!firstDayInMonth && !dayDisabled && day.getMonth() === reference.getMonth()) {
654
658
  firstDayInMonth = dateObject;
655
659
  }
@@ -720,7 +724,7 @@ var Calendar = exports.Calendar = /*#__PURE__*/(0, _react.forwardRef)(function (
720
724
  ref: ref,
721
725
  sizeProp: size,
722
726
  fillContainer: fill
723
- }, rest), /*#__PURE__*/_react["default"].createElement(_Box.Box, {
727
+ }, passThemeFlag, rest), /*#__PURE__*/_react["default"].createElement(_Box.Box, {
724
728
  fill: fill
725
729
  }, header ? header({
726
730
  date: reference,
@@ -785,7 +789,7 @@ var Calendar = exports.Calendar = /*#__PURE__*/(0, _react.forwardRef)(function (
785
789
  changeReference(active);
786
790
  }
787
791
  }
788
- }, /*#__PURE__*/_react["default"].createElement(_StyledCalendar.StyledWeeksContainer, {
792
+ }, /*#__PURE__*/_react["default"].createElement(_StyledCalendar.StyledWeeksContainer, _extends({
789
793
  tabIndex: 0,
790
794
  role: "grid",
791
795
  "aria-label": reference.toLocaleDateString(locale, {
@@ -807,11 +811,11 @@ var Calendar = exports.Calendar = /*#__PURE__*/(0, _react.forwardRef)(function (
807
811
  setFocus(false);
808
812
  setActive(undefined);
809
813
  }
810
- }, /*#__PURE__*/_react["default"].createElement(_StyledCalendar.StyledWeeks, {
814
+ }, passThemeFlag), /*#__PURE__*/_react["default"].createElement(_StyledCalendar.StyledWeeks, _extends({
811
815
  slide: slide,
812
816
  sizeProp: size,
813
817
  fillContainer: fill
814
- }, weeks)))));
818
+ }, passThemeFlag), weeks)))));
815
819
  });
816
820
  Calendar.displayName = 'Calendar';
817
821
  Calendar.propTypes = _propTypes.CalendarPropTypes;
@@ -4,7 +4,6 @@ exports.__esModule = true;
4
4
  exports.StyledWeeksContainer = exports.StyledWeeks = exports.StyledWeek = exports.StyledDayContainer = exports.StyledDay = exports.StyledCalendar = 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 sizeStyle = function sizeStyle(props) {
@@ -14,7 +13,7 @@ var sizeStyle = function sizeStyle(props) {
14
13
  return p.fillContainer && 'height: 100%;';
15
14
  });
16
15
  };
17
- var StyledCalendar = exports.StyledCalendar = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).attrs(_defaultProps.withTheme).withConfig({
16
+ var StyledCalendar = exports.StyledCalendar = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).withConfig({
18
17
  displayName: "StyledCalendar",
19
18
  componentId: "sc-1y4xhmp-0"
20
19
  })(["", " ", " ", ""], _utils.genericStyles, function (props) {
@@ -26,7 +25,7 @@ var weeksContainerSizeStyle = function weeksContainerSizeStyle(props) {
26
25
  var height = props.fillContainer ? '100%' : (0, _utils.parseMetricToNum)(props.theme.calendar[props.sizeProp].daySize) * 6 + "px";
27
26
  return "\n height: " + height + ";\n\n ";
28
27
  };
29
- var StyledWeeksContainer = exports.StyledWeeksContainer = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).attrs(_defaultProps.withTheme).withConfig({
28
+ var StyledWeeksContainer = exports.StyledWeeksContainer = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).withConfig({
30
29
  displayName: "StyledCalendar__StyledWeeksContainer",
31
30
  componentId: "sc-1y4xhmp-1"
32
31
  })(["overflow:hidden;", " ", ";"], function (props) {
@@ -52,7 +51,7 @@ var slideStyle = function slideStyle(props) {
52
51
  var weeksSizeStyle = function weeksSizeStyle() {
53
52
  return (0, _styledComponents.css)(["display:flex;flex-direction:column;height:100%;"]);
54
53
  };
55
- var StyledWeeks = exports.StyledWeeks = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).attrs(_defaultProps.withTheme).withConfig({
54
+ var StyledWeeks = exports.StyledWeeks = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).withConfig({
56
55
  displayName: "StyledCalendar__StyledWeeks",
57
56
  componentId: "sc-1y4xhmp-2"
58
57
  })(["position:relative;", " ", ";"], function (props) {
@@ -79,7 +78,7 @@ var daySizeStyle = function daySizeStyle(props) {
79
78
  var data = props.theme.calendar[props.sizeProp];
80
79
  return (0, _styledComponents.css)(["width:", ";height:", ";"], props.fillContainer ? '100%' : data.daySize, props.fillContainer ? '100%' : data.daySize);
81
80
  };
82
- var StyledDay = exports.StyledDay = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).attrs(_defaultProps.withTheme).withConfig({
81
+ var StyledDay = exports.StyledDay = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).withConfig({
83
82
  displayName: "StyledCalendar__StyledDay",
84
83
  componentId: "sc-1y4xhmp-5"
85
84
  })(["display:flex;justify-content:center;align-items:center;", " ", " ", " ", " ", " ", ""], function (props) {
@@ -4,7 +4,7 @@ exports.__esModule = true;
4
4
  exports.Card = void 0;
5
5
  var _react = _interopRequireWildcard(require("react"));
6
6
  var _Box = require("../Box");
7
- var _useThemeValue = require("../../utils/useThemeValue");
7
+ var _useThemeValue2 = require("../../utils/useThemeValue");
8
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); }
9
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; }
10
10
  function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
@@ -12,7 +12,8 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
12
12
  var Card = exports.Card = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
13
13
  var _theme$card$hover;
14
14
  var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
15
- var theme = (0, _useThemeValue.useThemeValue)();
15
+ var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
16
+ theme = _useThemeValue.theme;
16
17
  return /*#__PURE__*/_react["default"].createElement(_Box.Box, _extends({
17
18
  overflow: "hidden",
18
19
  kind: _extends({
@@ -8,7 +8,7 @@ var _grommet = require("grommet");
8
8
  var _excluded = ["children", "title", "subTitle", "size"];
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 theme = {
13
13
  themeMode: 'dark',
14
14
  global: {
@@ -8,7 +8,7 @@ var _grommet = require("grommet");
8
8
  var _excluded = ["children", "title", "subTitle", "size"];
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 data = [{
13
13
  color: 'blue',
14
14
  icon: /*#__PURE__*/_react["default"].createElement(_grommetIcons.Wifi, {
@@ -4,13 +4,14 @@ exports.__esModule = true;
4
4
  exports.CardBody = void 0;
5
5
  var _react = _interopRequireDefault(require("react"));
6
6
  var _Box = require("../Box");
7
- var _useThemeValue = require("../../utils/useThemeValue");
7
+ var _useThemeValue2 = require("../../utils/useThemeValue");
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
9
  function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
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
11
  var CardBody = exports.CardBody = function CardBody(_ref) {
12
12
  var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
13
- var theme = (0, _useThemeValue.useThemeValue)();
13
+ var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
14
+ theme = _useThemeValue.theme;
14
15
  return /*#__PURE__*/_react["default"].createElement(_Box.Box, _extends({
15
16
  flex: true
16
17
  }, theme.card.body, rest));
@@ -4,13 +4,14 @@ exports.__esModule = true;
4
4
  exports.CardFooter = void 0;
5
5
  var _react = _interopRequireDefault(require("react"));
6
6
  var _Footer = require("../Footer");
7
- var _useThemeValue = require("../../utils/useThemeValue");
7
+ var _useThemeValue2 = require("../../utils/useThemeValue");
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
9
  function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
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
11
  // Needs to have a CardBody or a flex container when Card uses a fixed height.
12
12
  var CardFooter = exports.CardFooter = function CardFooter(_ref) {
13
13
  var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
14
- var theme = (0, _useThemeValue.useThemeValue)();
14
+ var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
15
+ theme = _useThemeValue.theme;
15
16
  return /*#__PURE__*/_react["default"].createElement(_Footer.Footer, _extends({}, theme.card.footer, rest));
16
17
  };
@@ -4,12 +4,13 @@ exports.__esModule = true;
4
4
  exports.CardHeader = void 0;
5
5
  var _react = _interopRequireDefault(require("react"));
6
6
  var _Header = require("../Header");
7
- var _useThemeValue = require("../../utils/useThemeValue");
7
+ var _useThemeValue2 = require("../../utils/useThemeValue");
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
9
  function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
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
11
  var CardHeader = exports.CardHeader = function CardHeader(_ref) {
12
12
  var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
13
- var theme = (0, _useThemeValue.useThemeValue)();
13
+ var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
14
+ theme = _useThemeValue.theme;
14
15
  return /*#__PURE__*/_react["default"].createElement(_Header.Header, _extends({}, theme.card.header, rest));
15
16
  };
@@ -12,12 +12,12 @@ var _InfiniteScroll = require("../InfiniteScroll");
12
12
  var _Pagination = require("../Pagination");
13
13
  var _utils = require("../../utils");
14
14
  var _propTypes = require("./propTypes");
15
- var _useThemeValue = require("../../utils/useThemeValue");
15
+ var _useThemeValue2 = require("../../utils/useThemeValue");
16
16
  var _excluded = ["as", "children", "data", "margin", "onMore", "pad", "paginate", "show", "size", "step"];
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 emptyData = [];
22
22
  var Cards = exports.Cards = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
23
23
  var _ref$as = _ref.as,
@@ -34,7 +34,8 @@ var Cards = exports.Cards = /*#__PURE__*/_react["default"].forwardRef(function (
34
34
  _ref$step = _ref.step,
35
35
  step = _ref$step === void 0 ? paginate ? 50 : undefined : _ref$step,
36
36
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
37
- var theme = (0, _useThemeValue.useThemeValue)();
37
+ var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
38
+ theme = _useThemeValue.theme;
38
39
  var _useContext = (0, _react.useContext)(_DataContext.DataContext),
39
40
  contextData = _useContext.data;
40
41
  var data = dataProp || contextData || emptyData;
@@ -11,12 +11,12 @@ var _Keyboard = require("../Keyboard");
11
11
  var _StyledCarousel = require("./StyledCarousel");
12
12
  var _CarouselChild = require("./CarouselChild");
13
13
  var _propTypes = require("./propTypes");
14
- var _useThemeValue = require("../../utils/useThemeValue");
14
+ var _useThemeValue2 = require("../../utils/useThemeValue");
15
15
  var _excluded = ["activeChild", "initialChild", "onChild", "play", "children", "controls", "height", "fill", "width", "onFocus", "onBlur", "wrap"];
16
16
  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); }
17
17
  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; }
18
18
  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); }
19
- 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; }
19
+ 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; }
20
20
  var Carousel = exports.Carousel = function Carousel(_ref) {
21
21
  var activeChild = _ref.activeChild,
22
22
  _ref$initialChild = _ref.initialChild,
@@ -33,7 +33,8 @@ var Carousel = exports.Carousel = function Carousel(_ref) {
33
33
  onBlur = _ref.onBlur,
34
34
  wrap = _ref.wrap,
35
35
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
36
- var theme = (0, _useThemeValue.useThemeValue)();
36
+ var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
37
+ theme = _useThemeValue.theme;
37
38
  var _useContext = (0, _react.useContext)(_MessageContext.MessageContext),
38
39
  format = _useContext.format;
39
40
  var timerRef = (0, _react.useRef)();
@@ -8,7 +8,7 @@ var _grommet = require("grommet");
8
8
  var _excluded = ["controls"];
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 customTheme = {
13
13
  carousel: {
14
14
  animation: {
@@ -8,14 +8,14 @@ var _utils = require("../../utils");
8
8
  var _StyledChart = require("./StyledChart");
9
9
  var _utils2 = require("./utils");
10
10
  var _propTypes = require("./propTypes");
11
- var _useThemeValue = require("../../utils/useThemeValue");
11
+ var _useThemeValue2 = require("../../utils/useThemeValue");
12
12
  var _excluded = ["a11yTitle", "bounds", "color", "dash", "direction", "gap", "id", "onClick", "onHover", "opacity", "overflow", "pad", "pattern", "point", "round", "size", "thickness", "type", "values"],
13
13
  _excluded2 = ["color", "label", "onHover", "opacity", "thickness", "value"],
14
14
  _excluded3 = ["color", "label", "onHover", "opacity", "thickness", "value"];
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 gradientMaskColor = '#ffffff';
20
20
 
21
21
  // use constants so re-renders don't re-trigger effects
@@ -51,7 +51,9 @@ var Chart = exports.Chart = /*#__PURE__*/_react["default"].forwardRef(function (
51
51
  valuesProp = _ref$values === void 0 ? defaultValues : _ref$values,
52
52
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
53
53
  var containerRef = (0, _utils.useForwardedRef)(ref);
54
- var theme = (0, _useThemeValue.useThemeValue)();
54
+ var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
55
+ theme = _useThemeValue.theme,
56
+ passThemeFlag = _useThemeValue.passThemeFlag;
55
57
  var values = (0, _react.useMemo)(function () {
56
58
  return (0, _utils2.normalizeValues)(valuesProp);
57
59
  }, [valuesProp]);
@@ -573,7 +575,7 @@ var Chart = exports.Chart = /*#__PURE__*/_react["default"].forwardRef(function (
573
575
  width: size === 'full' ? '100%' : size.width,
574
576
  height: size === 'full' ? '100%' : size.height,
575
577
  typeProp: type // prevent adding to DOM
576
- }, rest), defs.length && /*#__PURE__*/_react["default"].createElement("defs", null, defs), useGradient ? gradientRect : drawing);
578
+ }, passThemeFlag, rest), defs.length && /*#__PURE__*/_react["default"].createElement("defs", null, defs), useGradient ? gradientRect : drawing);
577
579
  });
578
580
  Chart.displayName = 'Chart';
579
581
  Chart.propTypes = _propTypes.ChartPropTypes;
@@ -4,7 +4,6 @@ exports.__esModule = true;
4
4
  exports.StyledChart = 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 animateStyle = function animateStyle(_ref) {
@@ -16,7 +15,7 @@ var animateStyle = function animateStyle(_ref) {
16
15
  animateBounds = ['stroke-dashoffset: 200%;', 'stroke-dashoffset: 0%;'];else if (typeProp === 'point') animateBounds = ['opacity: 0;', 'opacity: 1;'];else animateBounds = ['transform: scaleY(0);', 'transform: scaleY(1);'];
17
16
  return (0, _styledComponents.css)(["", " animation:", " ", " forwards;", ""], typeProp === 'line' && 'stroke-dasharray: 200%;', (0, _styledComponents.keyframes)(["from{", "}to{", "}"], animateBounds[0], animateBounds[1]), theme.global.animation.duration, (typeProp === 'bar' || typeProp === 'area') && 'transform-origin: center bottom 0;');
18
17
  };
19
- var StyledChart = exports.StyledChart = _styledComponents["default"].svg.withConfig(_utils.styledComponentsConfig).attrs(_defaultProps.withTheme).withConfig({
18
+ var StyledChart = exports.StyledChart = _styledComponents["default"].svg.withConfig(_utils.styledComponentsConfig).withConfig({
20
19
  displayName: "StyledChart",
21
20
  componentId: "sc-1nae0gf-0"
22
21
  })(["display:block;max-width:100%;overflow:visible;", " ", " ", ";"], _utils.genericStyles, function (props) {
@@ -8,12 +8,12 @@ var _FormContext = require("../Form/FormContext");
8
8
  var _propTypes = require("./propTypes");
9
9
  var _StyledCheckBox = require("./StyledCheckBox");
10
10
  var _utils = require("../../utils");
11
- var _useThemeValue = require("../../utils/useThemeValue");
11
+ var _useThemeValue2 = require("../../utils/useThemeValue");
12
12
  var _excluded = ["a11yTitle", "aria-label", "checked", "children", "defaultChecked", "disabled", "fill", "focus", "focusIndicator", "id", "label", "name", "onBlur", "onChange", "onFocus", "onMouseEnter", "onMouseLeave", "onMouseOut", "onMouseOver", "pad", "reverse", "toggle", "indeterminate"];
13
13
  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); }
14
14
  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; }
15
15
  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); }
16
- 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; }
16
+ 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; }
17
17
  var stopLabelClick = function stopLabelClick(event) {
18
18
  // prevents clicking on the label trigging the event twice
19
19
  // https://stackoverflow.com/questions/24501497/why-the-onclick-element-will-trigger-twice-for-label-element
@@ -49,7 +49,9 @@ var CheckBox = exports.CheckBox = /*#__PURE__*/(0, _react.forwardRef)(function (
49
49
  toggle = _ref.toggle,
50
50
  indeterminate = _ref.indeterminate,
51
51
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
52
- var theme = (0, _useThemeValue.useThemeValue)();
52
+ var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
53
+ theme = _useThemeValue.theme,
54
+ passThemeFlag = _useThemeValue.passThemeFlag;
53
55
  var formContext = (0, _react.useContext)(_FormContext.FormContext);
54
56
  var _formContext$useFormI = formContext.useFormInput({
55
57
  name: name,
@@ -102,7 +104,7 @@ var CheckBox = exports.CheckBox = /*#__PURE__*/(0, _react.forwardRef)(function (
102
104
  if (checked) {
103
105
  borderColor = (0, _utils.normalizeColor)(theme.checkBox.color || 'control', theme);
104
106
  }
105
- var visual = toggle ? /*#__PURE__*/_react["default"].createElement(_StyledCheckBox.StyledCheckBoxToggle, themeableProps, /*#__PURE__*/_react["default"].createElement(_StyledCheckBox.StyledCheckBoxKnob, themeableProps)) : /*#__PURE__*/_react["default"].createElement(_StyledCheckBox.StyledCheckBoxBox, _extends({
107
+ var visual = toggle ? /*#__PURE__*/_react["default"].createElement(_StyledCheckBox.StyledCheckBoxToggle, _extends({}, passThemeFlag, themeableProps), /*#__PURE__*/_react["default"].createElement(_StyledCheckBox.StyledCheckBoxKnob, _extends({}, passThemeFlag, themeableProps))) : /*#__PURE__*/_react["default"].createElement(_StyledCheckBox.StyledCheckBoxBox, _extends({
106
108
  align: "center",
107
109
  justify: "center",
108
110
  width: theme.checkBox.size,
@@ -112,7 +114,7 @@ var CheckBox = exports.CheckBox = /*#__PURE__*/(0, _react.forwardRef)(function (
112
114
  color: borderColor
113
115
  },
114
116
  round: theme.checkBox.check.radius
115
- }, themeableProps), !indeterminate && checked && (CheckedIcon ? /*#__PURE__*/_react["default"].createElement(CheckedIcon, {
117
+ }, passThemeFlag, themeableProps), !indeterminate && checked && (CheckedIcon ? /*#__PURE__*/_react["default"].createElement(CheckedIcon, {
116
118
  theme: theme,
117
119
  as: _StyledCheckBox.StyledCheckBoxIcon
118
120
  }) : /*#__PURE__*/_react["default"].createElement(_StyledCheckBox.StyledCheckBoxIcon, _extends({
@@ -140,7 +142,7 @@ var CheckBox = exports.CheckBox = /*#__PURE__*/(0, _react.forwardRef)(function (
140
142
  margin: label && (_ref2 = {}, _ref2[side] = theme.checkBox.gap || 'small', _ref2)
141
143
  }, themeableProps), /*#__PURE__*/_react["default"].createElement(_StyledCheckBox.StyledCheckBoxInput, _extends({
142
144
  "aria-label": ariaLabel || a11yTitle
143
- }, rest, {
145
+ }, passThemeFlag, rest, {
144
146
  ref: ref,
145
147
  type: "checkbox"
146
148
  }, (0, _object.removeUndefined)({
@@ -191,7 +193,7 @@ var CheckBox = exports.CheckBox = /*#__PURE__*/(0, _react.forwardRef)(function (
191
193
  onMouseOut: function onMouseOut(event) {
192
194
  return _onMouseOut == null ? void 0 : _onMouseOut(event);
193
195
  }
194
- }, themeableProps), first, second);
196
+ }, passThemeFlag, themeableProps), first, second);
195
197
  });
196
198
  CheckBox.displayName = 'CheckBox';
197
199
  CheckBox.propTypes = _propTypes.CheckBoxPropTypes;
@@ -4,7 +4,6 @@ exports.__esModule = true;
4
4
  exports.StyledCheckBoxToggle = exports.StyledCheckBoxKnob = exports.StyledCheckBoxInput = exports.StyledCheckBoxIcon = exports.StyledCheckBoxContainer = exports.StyledCheckBoxBox = exports.StyledCheckBox = 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 _Box = require("../Box");
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; }
@@ -25,7 +24,7 @@ var hoverStyle = (0, _styledComponents.css)(["&:hover input:not([disabled]) + di
25
24
  var _props$theme$checkBox3;
26
25
  return (0, _utils.normalizeColor)(!props.disabled && ((_props$theme$checkBox3 = props.theme.checkBox.hover) == null || (_props$theme$checkBox3 = _props$theme$checkBox3.background) == null ? void 0 : _props$theme$checkBox3.color), props.theme);
27
26
  });
28
- var StyledCheckBoxIcon = exports.StyledCheckBoxIcon = _styledComponents["default"].svg.withConfig(_utils.styledComponentsConfig).attrs(_defaultProps.withTheme).withConfig({
27
+ var StyledCheckBoxIcon = exports.StyledCheckBoxIcon = _styledComponents["default"].svg.withConfig(_utils.styledComponentsConfig).withConfig({
29
28
  displayName: "StyledCheckBox__StyledCheckBoxIcon",
30
29
  componentId: "sc-1dbk5ju-0"
31
30
  })(["box-sizing:border-box;stroke-width:", ";stroke:", ";width:", ";height:", ";", ";"], function (props) {
@@ -39,7 +38,7 @@ var StyledCheckBoxIcon = exports.StyledCheckBoxIcon = _styledComponents["default
39
38
  }, function (props) {
40
39
  return props.theme.checkBox.icon.extend;
41
40
  });
42
- var StyledCheckBoxContainer = exports.StyledCheckBoxContainer = _styledComponents["default"].label.withConfig(_utils.styledComponentsConfig).attrs(_defaultProps.withTheme).withConfig({
41
+ var StyledCheckBoxContainer = exports.StyledCheckBoxContainer = _styledComponents["default"].label.withConfig(_utils.styledComponentsConfig).withConfig({
43
42
  displayName: "StyledCheckBox__StyledCheckBoxContainer",
44
43
  componentId: "sc-1dbk5ju-1"
45
44
  })(["display:flex;flex-direction:row;align-items:", ";user-select:none;-webkit-user-select:none;", " ", " ", " ", " ", " ", " ", ""], function (props) {
@@ -58,7 +57,7 @@ var StyledCheckBoxContainer = exports.StyledCheckBoxContainer = _styledComponent
58
57
  }, function (props) {
59
58
  return props.theme.checkBox.extend;
60
59
  });
61
- var StyledCheckBoxInput = exports.StyledCheckBoxInput = _styledComponents["default"].input.withConfig(_utils.styledComponentsConfig).attrs(_defaultProps.withTheme).withConfig({
60
+ var StyledCheckBoxInput = exports.StyledCheckBoxInput = _styledComponents["default"].input.withConfig(_utils.styledComponentsConfig).withConfig({
62
61
  displayName: "StyledCheckBox__StyledCheckBoxInput",
63
62
  componentId: "sc-1dbk5ju-2"
64
63
  })(["opacity:0;-moz-appearance:none;width:0;height:0;margin:0;", " &:checked + span > span{", ":calc( ", " - ", " );background:", ";}"], function (props) {
@@ -72,7 +71,7 @@ var StyledCheckBoxInput = exports.StyledCheckBoxInput = _styledComponents["defau
72
71
  }, function (props) {
73
72
  return (0, _utils.normalizeColor)(props.theme.checkBox.color || 'control', props.theme);
74
73
  });
75
- var StyledCheckBoxBox = exports.StyledCheckBoxBox = (0, _styledComponents["default"])(_Box.Box).attrs(_defaultProps.withTheme).withConfig({
74
+ var StyledCheckBoxBox = exports.StyledCheckBoxBox = (0, _styledComponents["default"])(_Box.Box).withConfig({
76
75
  displayName: "StyledCheckBox__StyledCheckBoxBox",
77
76
  componentId: "sc-1dbk5ju-3"
78
77
  })(["", ";", ";"], function (props) {
@@ -80,7 +79,7 @@ var StyledCheckBoxBox = exports.StyledCheckBoxBox = (0, _styledComponents["defau
80
79
  }, function (props) {
81
80
  return props.theme.checkBox.check.extend;
82
81
  });
83
- var StyledCheckBoxToggle = exports.StyledCheckBoxToggle = _styledComponents["default"].span.withConfig(_utils.styledComponentsConfig).attrs(_defaultProps.withTheme).withConfig({
82
+ var StyledCheckBoxToggle = exports.StyledCheckBoxToggle = _styledComponents["default"].span.withConfig(_utils.styledComponentsConfig).withConfig({
84
83
  displayName: "StyledCheckBox__StyledCheckBoxToggle",
85
84
  componentId: "sc-1dbk5ju-4"
86
85
  })(["box-sizing:border-box;vertical-align:middle;display:inline-block;width:", ";height:", ";border:", " solid;border-color:", ";border-radius:", ";background-color:", ";", ";", ";"], function (props) {
@@ -100,7 +99,7 @@ var StyledCheckBoxToggle = exports.StyledCheckBoxToggle = _styledComponents["def
100
99
  }, function (props) {
101
100
  return props.theme.checkBox.toggle.extend;
102
101
  });
103
- var StyledCheckBoxKnob = exports.StyledCheckBoxKnob = _styledComponents["default"].span.withConfig(_utils.styledComponentsConfig).attrs(_defaultProps.withTheme).withConfig({
102
+ var StyledCheckBoxKnob = exports.StyledCheckBoxKnob = _styledComponents["default"].span.withConfig(_utils.styledComponentsConfig).withConfig({
104
103
  displayName: "StyledCheckBox__StyledCheckBoxKnob",
105
104
  componentId: "sc-1dbk5ju-5"
106
105
  })(["box-sizing:border-box;position:relative;display:inherit;top:-", ";", ":-", ";transition:all 0.3s;width:", ";height:", ";background:", ";border-radius:", ";", ";"], function (props) {
@@ -8,7 +8,7 @@ var _excluded = ["checked"];
8
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); }
9
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; }
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 SimpleCheckBox = function SimpleCheckBox(_ref) {
13
13
  var checkedProp = _ref.checked,
14
14
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
@@ -8,7 +8,7 @@ var _excluded = ["checked"];
8
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); }
9
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; }
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 SimpleCheckBox = function SimpleCheckBox(_ref) {
13
13
  var checkedProp = _ref.checked,
14
14
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);