grommet 2.23.0 → 2.25.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 (489) hide show
  1. package/all/stories/AllComponents.js +2 -7
  2. package/components/Accordion/Accordion.js +1 -1
  3. package/components/Accordion/propTypes.js +1 -1
  4. package/components/Accordion/stories/CustomThemed/Custom.js +3 -2
  5. package/components/AccordionPanel/AccordionPanel.js +2 -1
  6. package/components/Anchor/Anchor.js +3 -4
  7. package/components/Anchor/propTypes.js +1 -1
  8. package/components/Avatar/Avatar.js +1 -1
  9. package/components/Box/Box.js +1 -1
  10. package/components/Box/StyledBox.js +1 -1
  11. package/components/Box/propTypes.js +1 -1
  12. package/components/Button/Button.js +1 -1
  13. package/components/Button/propTypes.js +2 -2
  14. package/components/Button/stories/Basic.js +1 -1
  15. package/components/Button/stories/Fill.js +1 -1
  16. package/components/Button/stories/Kind.js +1 -1
  17. package/components/Calendar/Calendar.js +233 -293
  18. package/components/Calendar/index.d.ts +2 -2
  19. package/components/Calendar/propTypes.js +1 -1
  20. package/components/Calendar/stories/ShowAdjacentDays.js +1 -1
  21. package/components/Calendar/utils.js +16 -129
  22. package/components/Card/Card.js +1 -1
  23. package/components/Card/stories/CustomThemed/Clickable.js +1 -1
  24. package/components/Card/stories/CustomThemed/RichFooter.js +1 -1
  25. package/components/Card/stories/CustomThemed/Themed.js +1 -1
  26. package/components/CardBody/CardBody.js +1 -1
  27. package/components/CardFooter/CardFooter.js +1 -1
  28. package/components/CardHeader/CardHeader.js +1 -1
  29. package/components/Carousel/Carousel.js +1 -1
  30. package/components/Carousel/propTypes.js +1 -1
  31. package/components/Carousel/stories/CustomThemed/Custom.js +1 -1
  32. package/components/Chart/Chart.js +1 -1
  33. package/components/Chart/calcs.js +44 -27
  34. package/components/Chart/index.d.ts +28 -2
  35. package/components/Chart/propTypes.js +1 -1
  36. package/components/Chart/stories/Rich.js +1 -1
  37. package/components/Chart/stories/Scan.js +11 -9
  38. package/components/Chart/stories/Window.js +1 -1
  39. package/components/Chart/stories/data.js +16 -17
  40. package/components/CheckBox/CheckBox.js +4 -3
  41. package/components/CheckBox/stories/CustomThemed/Custom.js +1 -1
  42. package/components/CheckBox/stories/CustomThemed/CustomToggle.js +1 -1
  43. package/components/CheckBox/stories/NoLabel.js +1 -1
  44. package/components/CheckBox/stories/Simple.js +1 -1
  45. package/components/CheckBoxGroup/CheckBoxGroup.js +1 -1
  46. package/components/CheckBoxGroup/index.d.ts +1 -3
  47. package/components/Clock/Analog.js +1 -1
  48. package/components/Clock/Clock.js +1 -1
  49. package/components/Clock/Digital.js +1 -1
  50. package/components/Clock/propTypes.js +1 -1
  51. package/components/Collapsible/stories/Nested.js +1 -1
  52. package/components/Collapsible/stories/Simple.js +1 -1
  53. package/components/DataChart/DataChart.js +11 -42
  54. package/components/DataChart/Detail.js +18 -11
  55. package/components/DataChart/Legend.js +1 -1
  56. package/components/DataChart/Swatch.js +64 -23
  57. package/components/DataChart/XAxis.js +1 -1
  58. package/components/DataChart/YGuide.js +1 -1
  59. package/components/DataChart/propTypes.js +1 -1
  60. package/components/DataChart/stories/Legend.js +6 -2
  61. package/components/DataChart/stories/Pad.js +54 -0
  62. package/components/DataChart/utils.js +11 -1
  63. package/components/DataTable/Body.js +11 -5
  64. package/components/DataTable/Cell.js +1 -1
  65. package/components/DataTable/DataTable.js +1 -1
  66. package/components/DataTable/ExpanderCell.js +1 -1
  67. package/components/DataTable/Footer.js +1 -1
  68. package/components/DataTable/GroupedBody.js +1 -1
  69. package/components/DataTable/Header.js +1 -1
  70. package/components/DataTable/Resizer.js +1 -1
  71. package/components/DataTable/Sorter.js +1 -1
  72. package/components/DataTable/propTypes.js +1 -1
  73. package/components/DataTable/stories/Controlled.js +1 -1
  74. package/components/DataTable/stories/ControlledGrouped.js +1 -1
  75. package/components/DataTable/stories/CustomThemed/Fill.js +1 -1
  76. package/components/DataTable/stories/GroupedOnSelect.js +1 -1
  77. package/components/DataTable/stories/OnUpdate.js +1 -1
  78. package/components/DataTable/stories/Served.js +1 -1
  79. package/components/DataTable/stories/Sort.js +1 -1
  80. package/components/DataTable/stories/SpaceX.js +6 -4
  81. package/components/DataTable/stories/SpaceXUngrouped.js +4 -2
  82. package/components/DataTable/stories/Tunable.js +1 -1
  83. package/components/DataTable/stories/data.js +1 -1
  84. package/components/DataTable/stories/rowDetails.js +1 -1
  85. package/components/DateInput/DateInput.js +89 -92
  86. package/components/DateInput/index.d.ts +1 -0
  87. package/components/DateInput/propTypes.js +1 -0
  88. package/components/DateInput/stories/Format.js +14 -1
  89. package/components/DateInput/utils.js +31 -6
  90. package/components/Diagram/Diagram.js +1 -1
  91. package/components/Diagram/stories/Animated.js +1 -1
  92. package/components/Diagram/stories/Progressing.js +1 -1
  93. package/components/Distribution/Distribution.js +1 -1
  94. package/components/Distribution/propTypes.js +1 -1
  95. package/components/Drop/Drop.js +1 -1
  96. package/components/Drop/DropContainer.js +7 -3
  97. package/components/DropButton/DropButton.js +1 -1
  98. package/components/DropButton/propTypes.js +1 -1
  99. package/components/FileInput/FileInput.js +28 -9
  100. package/components/FileInput/StyledFileInput.js +1 -1
  101. package/components/FileInput/index.d.ts +6 -1
  102. package/components/FileInput/stories/Multiple.js +1 -0
  103. package/components/FocusedContainer.js +1 -1
  104. package/components/Footer/Footer.js +1 -1
  105. package/components/Footer/stories/DoubleFooter.js +1 -1
  106. package/components/Footer/stories/Sitemap.js +1 -1
  107. package/components/Form/Form.js +7 -2
  108. package/components/Form/stories/ArrayOfFormFields.js +1 -1
  109. package/components/Form/stories/CustomThemed/FieldSpacingOptions.js +1 -1
  110. package/components/Form/stories/HelpAndError.js +1 -1
  111. package/components/FormField/FormField.js +26 -29
  112. package/components/Grid/Grid.js +5 -3
  113. package/components/Grid/README.md +0 -2
  114. package/components/Grid/index.d.ts +9 -3
  115. package/components/Grid/propTypes.js +1 -1
  116. package/components/Grid/stories/CustomThemed/Responsive.js +1 -1
  117. package/components/Grid/stories/typescript/App.tsx +42 -48
  118. package/components/Grommet/Grommet.js +1 -1
  119. package/components/Header/Header.js +1 -1
  120. package/components/Heading/Heading.js +1 -1
  121. package/components/Heading/propTypes.js +1 -1
  122. package/components/Image/Image.js +5 -3
  123. package/components/Image/propTypes.js +1 -1
  124. package/components/InfiniteScroll/stories/Basics.js +1 -1
  125. package/components/InfiniteScroll/stories/ClassChildren.js +1 -1
  126. package/components/InfiniteScroll/stories/Marker.js +1 -1
  127. package/components/InfiniteScroll/stories/Show.js +1 -1
  128. package/components/InfiniteScroll/stories/ShowAfter.js +1 -1
  129. package/components/InfiniteScroll/stories/ShowBefore.js +1 -1
  130. package/components/Layer/Layer.js +2 -2
  131. package/components/Layer/LayerContainer.js +7 -3
  132. package/components/List/List.js +104 -41
  133. package/components/List/index.d.ts +3 -1
  134. package/components/List/propTypes.js +4 -2
  135. package/components/List/stories/Disabled.js +33 -0
  136. package/components/Main/Main.js +1 -1
  137. package/components/Markdown/Markdown.js +1 -1
  138. package/components/MaskedInput/MaskedInput.js +37 -28
  139. package/components/Menu/Menu.js +105 -61
  140. package/components/Menu/index.d.ts +2 -2
  141. package/components/Menu/propTypes.js +2 -2
  142. package/components/Menu/stories/Grouped.js +52 -0
  143. package/components/Meter/Bar.js +1 -1
  144. package/components/Meter/Circle.js +5 -3
  145. package/components/Meter/Meter.js +1 -1
  146. package/components/Meter/propTypes.js +1 -1
  147. package/components/NameValueList/NameValueList.js +1 -1
  148. package/components/NameValuePair/NameValuePair.js +1 -1
  149. package/components/Nav/Nav.js +1 -1
  150. package/components/Nav/stories/CustomThemed/JustifySidebar.js +1 -1
  151. package/components/Nav/stories/Sidebar.js +1 -1
  152. package/components/Notification/Notification.js +18 -9
  153. package/components/Notification/index.d.ts +2 -1
  154. package/components/Notification/propTypes.js +2 -1
  155. package/components/Page/Page.js +1 -1
  156. package/components/PageContent/PageContent.js +1 -1
  157. package/components/PageHeader/PageHeader.js +80 -0
  158. package/components/PageHeader/index.d.ts +26 -0
  159. package/components/PageHeader/index.js +8 -0
  160. package/components/PageHeader/propTypes.js +30 -0
  161. package/components/PageHeader/stories/Custom.js +47 -0
  162. package/components/PageHeader/stories/MultipleActions.js +79 -0
  163. package/components/PageHeader/stories/Responsive.js +37 -0
  164. package/components/PageHeader/stories/Simple.js +36 -0
  165. package/components/Pagination/PageControl.js +1 -1
  166. package/components/Pagination/Pagination.js +1 -1
  167. package/components/Pagination/propTypes.js +1 -1
  168. package/components/Paragraph/Paragraph.js +1 -1
  169. package/components/Paragraph/StyledParagraph.js +7 -1
  170. package/components/Paragraph/index.d.ts +1 -0
  171. package/components/Paragraph/propTypes.js +2 -1
  172. package/components/Paragraph/stories/MaxLines.js +37 -0
  173. package/components/RadioButton/RadioButton.js +1 -1
  174. package/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
  175. package/components/RadioButtonGroup/index.d.ts +2 -1
  176. package/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +1 -1
  177. package/components/RadioButtonGroup/stories/Disabled.js +1 -1
  178. package/components/RangeInput/RangeInput.js +1 -1
  179. package/components/RangeSelector/EdgeControl.js +1 -1
  180. package/components/RangeSelector/RangeSelector.js +1 -1
  181. package/components/RangeSelector/stories/CustomThemed/Custom.js +1 -1
  182. package/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +1 -1
  183. package/components/RangeSelector/stories/Step.js +1 -1
  184. package/components/RangeSelector/stories/Vertical.js +1 -1
  185. package/components/RoutedAnchor/RoutedAnchor.js +2 -2
  186. package/components/RoutedButton/RoutedButton.js +2 -2
  187. package/components/Select/Select.js +11 -32
  188. package/components/Select/SelectContainer.js +34 -37
  189. package/components/Select/propTypes.js +1 -1
  190. package/components/Select/stories/components/SearchBorderBox.js +1 -1
  191. package/components/Select/stories/components/SearchInput.js +1 -1
  192. package/components/Sidebar/Sidebar.js +1 -1
  193. package/components/Sidebar/stories/Labels.js +1 -1
  194. package/components/SkipLink/SkipLink.js +1 -1
  195. package/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
  196. package/components/Spinner/Spinner.js +1 -1
  197. package/components/Stack/Stack.js +1 -1
  198. package/components/Stack/propTypes.js +1 -1
  199. package/components/Tab/StyledTab.js +2 -2
  200. package/components/Tab/Tab.js +35 -17
  201. package/components/Table/StyledTable.js +1 -1
  202. package/components/Table/propTypes.js +1 -1
  203. package/components/TableBody/TableBody.js +1 -1
  204. package/components/TableCell/TableCell.js +1 -1
  205. package/components/TableFooter/TableFooter.js +1 -1
  206. package/components/TableHeader/TableHeader.js +1 -1
  207. package/components/TableRow/TableRow.js +1 -1
  208. package/components/Tabs/Tabs.js +233 -11
  209. package/components/Tabs/propTypes.js +1 -1
  210. package/components/Tabs/stories/Responsive.js +18 -0
  211. package/components/Tag/Tag.js +1 -1
  212. package/components/Tag/propTypes.js +1 -1
  213. package/components/Text/Text.js +1 -1
  214. package/components/Text/propTypes.js +1 -1
  215. package/components/TextArea/TextArea.js +1 -1
  216. package/components/TextArea/stories/NonResizable.js +1 -1
  217. package/components/TextArea/stories/Simple.js +1 -1
  218. package/components/TextInput/TextInput.js +33 -4
  219. package/components/TextInput/stories/DefaultSuggestion.js +1 -0
  220. package/components/TextInput/stories/InsideFormField.js +1 -1
  221. package/components/TextInput/stories/Suggestions.js +1 -0
  222. package/components/TextInput/stories/WithTags.js +1 -1
  223. package/components/Tip/Tip.js +22 -29
  224. package/components/Video/StyledVideo.js +2 -2
  225. package/components/Video/Video.js +101 -47
  226. package/components/Video/index.d.ts +1 -0
  227. package/components/Video/propTypes.js +2 -2
  228. package/components/Video/stories/typescript/ControlsBelow.tsx +6 -2
  229. package/components/WorldMap/WorldMap.js +1 -1
  230. package/components/WorldMap/propTypes.js +1 -1
  231. package/components/WorldMap/stories/Places.js +1 -1
  232. package/components/index.d.ts +1 -0
  233. package/components/index.js +8 -0
  234. package/contexts/AnnounceContext/stories/Assertive.js +1 -1
  235. package/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
  236. package/es6/all/stories/AllComponents.js +2 -7
  237. package/es6/components/Accordion/Accordion.js +1 -1
  238. package/es6/components/Accordion/propTypes.js +1 -1
  239. package/es6/components/Accordion/stories/CustomThemed/Custom.js +3 -2
  240. package/es6/components/AccordionPanel/AccordionPanel.js +2 -1
  241. package/es6/components/Anchor/Anchor.js +3 -4
  242. package/es6/components/Anchor/propTypes.js +1 -1
  243. package/es6/components/Avatar/Avatar.js +1 -1
  244. package/es6/components/Box/Box.js +1 -1
  245. package/es6/components/Box/StyledBox.js +1 -1
  246. package/es6/components/Box/propTypes.js +1 -1
  247. package/es6/components/Button/Button.js +1 -1
  248. package/es6/components/Button/propTypes.js +2 -2
  249. package/es6/components/Button/stories/Basic.js +1 -1
  250. package/es6/components/Button/stories/Fill.js +1 -1
  251. package/es6/components/Button/stories/Kind.js +1 -1
  252. package/es6/components/Calendar/Calendar.js +231 -293
  253. package/es6/components/Calendar/index.d.ts +2 -2
  254. package/es6/components/Calendar/propTypes.js +1 -1
  255. package/es6/components/Calendar/stories/ShowAdjacentDays.js +1 -1
  256. package/es6/components/Calendar/utils.js +13 -114
  257. package/es6/components/Card/Card.js +1 -1
  258. package/es6/components/Card/stories/CustomThemed/Clickable.js +1 -1
  259. package/es6/components/Card/stories/CustomThemed/RichFooter.js +1 -1
  260. package/es6/components/Card/stories/CustomThemed/Themed.js +1 -1
  261. package/es6/components/CardBody/CardBody.js +1 -1
  262. package/es6/components/CardFooter/CardFooter.js +1 -1
  263. package/es6/components/CardHeader/CardHeader.js +1 -1
  264. package/es6/components/Carousel/Carousel.js +1 -1
  265. package/es6/components/Carousel/propTypes.js +1 -1
  266. package/es6/components/Carousel/stories/CustomThemed/Custom.js +1 -1
  267. package/es6/components/Chart/Chart.js +1 -1
  268. package/es6/components/Chart/calcs.js +44 -27
  269. package/es6/components/Chart/index.d.ts +28 -2
  270. package/es6/components/Chart/propTypes.js +1 -1
  271. package/es6/components/Chart/stories/Rich.js +1 -1
  272. package/es6/components/Chart/stories/Scan.js +10 -9
  273. package/es6/components/Chart/stories/Window.js +1 -1
  274. package/es6/components/Chart/stories/data.js +16 -17
  275. package/es6/components/CheckBox/CheckBox.js +4 -3
  276. package/es6/components/CheckBox/stories/CustomThemed/Custom.js +1 -1
  277. package/es6/components/CheckBox/stories/CustomThemed/CustomToggle.js +1 -1
  278. package/es6/components/CheckBox/stories/NoLabel.js +1 -1
  279. package/es6/components/CheckBox/stories/Simple.js +1 -1
  280. package/es6/components/CheckBoxGroup/CheckBoxGroup.js +1 -1
  281. package/es6/components/CheckBoxGroup/index.d.ts +1 -3
  282. package/es6/components/Clock/Analog.js +1 -1
  283. package/es6/components/Clock/Clock.js +1 -1
  284. package/es6/components/Clock/Digital.js +1 -1
  285. package/es6/components/Clock/propTypes.js +1 -1
  286. package/es6/components/Collapsible/stories/Nested.js +1 -1
  287. package/es6/components/Collapsible/stories/Simple.js +1 -1
  288. package/es6/components/DataChart/DataChart.js +13 -44
  289. package/es6/components/DataChart/Detail.js +20 -10
  290. package/es6/components/DataChart/Legend.js +1 -1
  291. package/es6/components/DataChart/Swatch.js +64 -23
  292. package/es6/components/DataChart/XAxis.js +1 -1
  293. package/es6/components/DataChart/YGuide.js +1 -1
  294. package/es6/components/DataChart/propTypes.js +1 -1
  295. package/es6/components/DataChart/stories/Legend.js +6 -2
  296. package/es6/components/DataChart/stories/Pad.js +42 -0
  297. package/es6/components/DataChart/utils.js +7 -0
  298. package/es6/components/DataTable/Body.js +10 -5
  299. package/es6/components/DataTable/Cell.js +1 -1
  300. package/es6/components/DataTable/DataTable.js +1 -1
  301. package/es6/components/DataTable/ExpanderCell.js +1 -1
  302. package/es6/components/DataTable/Footer.js +1 -1
  303. package/es6/components/DataTable/GroupedBody.js +1 -1
  304. package/es6/components/DataTable/Header.js +1 -1
  305. package/es6/components/DataTable/Resizer.js +1 -1
  306. package/es6/components/DataTable/Sorter.js +1 -1
  307. package/es6/components/DataTable/propTypes.js +1 -1
  308. package/es6/components/DataTable/stories/Controlled.js +1 -1
  309. package/es6/components/DataTable/stories/ControlledGrouped.js +1 -1
  310. package/es6/components/DataTable/stories/CustomThemed/Fill.js +1 -1
  311. package/es6/components/DataTable/stories/GroupedOnSelect.js +1 -1
  312. package/es6/components/DataTable/stories/OnUpdate.js +1 -1
  313. package/es6/components/DataTable/stories/Served.js +1 -1
  314. package/es6/components/DataTable/stories/Sort.js +1 -1
  315. package/es6/components/DataTable/stories/SpaceX.js +6 -4
  316. package/es6/components/DataTable/stories/SpaceXUngrouped.js +4 -2
  317. package/es6/components/DataTable/stories/Tunable.js +1 -1
  318. package/es6/components/DataTable/stories/data.js +1 -1
  319. package/es6/components/DataTable/stories/rowDetails.js +1 -1
  320. package/es6/components/DateInput/DateInput.js +85 -88
  321. package/es6/components/DateInput/index.d.ts +1 -0
  322. package/es6/components/DateInput/propTypes.js +1 -0
  323. package/es6/components/DateInput/stories/Format.js +14 -1
  324. package/es6/components/DateInput/utils.js +30 -8
  325. package/es6/components/Diagram/Diagram.js +1 -1
  326. package/es6/components/Diagram/stories/Animated.js +1 -1
  327. package/es6/components/Diagram/stories/Progressing.js +1 -1
  328. package/es6/components/Distribution/Distribution.js +1 -1
  329. package/es6/components/Distribution/propTypes.js +1 -1
  330. package/es6/components/Drop/Drop.js +1 -1
  331. package/es6/components/Drop/DropContainer.js +5 -3
  332. package/es6/components/DropButton/DropButton.js +1 -1
  333. package/es6/components/DropButton/propTypes.js +1 -1
  334. package/es6/components/FileInput/FileInput.js +28 -9
  335. package/es6/components/FileInput/StyledFileInput.js +1 -1
  336. package/es6/components/FileInput/index.d.ts +6 -1
  337. package/es6/components/FileInput/stories/Multiple.js +1 -0
  338. package/es6/components/FocusedContainer.js +1 -1
  339. package/es6/components/Footer/Footer.js +1 -1
  340. package/es6/components/Footer/stories/DoubleFooter.js +1 -1
  341. package/es6/components/Footer/stories/Sitemap.js +1 -1
  342. package/es6/components/Form/Form.js +7 -2
  343. package/es6/components/Form/stories/ArrayOfFormFields.js +1 -1
  344. package/es6/components/Form/stories/CustomThemed/FieldSpacingOptions.js +1 -1
  345. package/es6/components/Form/stories/HelpAndError.js +1 -1
  346. package/es6/components/FormField/FormField.js +26 -30
  347. package/es6/components/Grid/Grid.js +5 -3
  348. package/es6/components/Grid/README.md +0 -2
  349. package/es6/components/Grid/index.d.ts +9 -3
  350. package/es6/components/Grid/propTypes.js +1 -1
  351. package/es6/components/Grid/stories/CustomThemed/Responsive.js +1 -1
  352. package/es6/components/Grid/stories/typescript/App.tsx +42 -48
  353. package/es6/components/Grommet/Grommet.js +1 -1
  354. package/es6/components/Header/Header.js +1 -1
  355. package/es6/components/Heading/Heading.js +1 -1
  356. package/es6/components/Heading/propTypes.js +1 -1
  357. package/es6/components/Image/Image.js +5 -3
  358. package/es6/components/Image/propTypes.js +1 -1
  359. package/es6/components/InfiniteScroll/stories/Basics.js +1 -1
  360. package/es6/components/InfiniteScroll/stories/ClassChildren.js +1 -1
  361. package/es6/components/InfiniteScroll/stories/Marker.js +1 -1
  362. package/es6/components/InfiniteScroll/stories/Show.js +1 -1
  363. package/es6/components/InfiniteScroll/stories/ShowAfter.js +1 -1
  364. package/es6/components/InfiniteScroll/stories/ShowBefore.js +1 -1
  365. package/es6/components/Layer/Layer.js +2 -2
  366. package/es6/components/Layer/LayerContainer.js +5 -3
  367. package/es6/components/List/List.js +105 -42
  368. package/es6/components/List/index.d.ts +3 -1
  369. package/es6/components/List/propTypes.js +4 -2
  370. package/es6/components/List/stories/Disabled.js +20 -0
  371. package/es6/components/Main/Main.js +1 -1
  372. package/es6/components/Markdown/Markdown.js +1 -1
  373. package/es6/components/MaskedInput/MaskedInput.js +38 -29
  374. package/es6/components/Menu/Menu.js +106 -61
  375. package/es6/components/Menu/index.d.ts +2 -2
  376. package/es6/components/Menu/propTypes.js +2 -2
  377. package/es6/components/Menu/stories/Grouped.js +40 -0
  378. package/es6/components/Meter/Bar.js +1 -1
  379. package/es6/components/Meter/Circle.js +5 -3
  380. package/es6/components/Meter/Meter.js +1 -1
  381. package/es6/components/Meter/propTypes.js +1 -1
  382. package/es6/components/NameValueList/NameValueList.js +1 -1
  383. package/es6/components/NameValuePair/NameValuePair.js +1 -1
  384. package/es6/components/Nav/Nav.js +1 -1
  385. package/es6/components/Nav/stories/CustomThemed/JustifySidebar.js +1 -1
  386. package/es6/components/Nav/stories/Sidebar.js +1 -1
  387. package/es6/components/Notification/Notification.js +18 -9
  388. package/es6/components/Notification/index.d.ts +2 -1
  389. package/es6/components/Notification/propTypes.js +2 -1
  390. package/es6/components/Page/Page.js +1 -1
  391. package/es6/components/PageContent/PageContent.js +1 -1
  392. package/es6/components/PageHeader/PageHeader.js +63 -0
  393. package/es6/components/PageHeader/index.d.ts +26 -0
  394. package/es6/components/PageHeader/index.js +1 -0
  395. package/es6/components/PageHeader/propTypes.js +19 -0
  396. package/es6/components/PageHeader/stories/Custom.js +32 -0
  397. package/es6/components/PageHeader/stories/MultipleActions.js +63 -0
  398. package/es6/components/PageHeader/stories/Responsive.js +25 -0
  399. package/es6/components/PageHeader/stories/Simple.js +24 -0
  400. package/es6/components/Pagination/PageControl.js +1 -1
  401. package/es6/components/Pagination/Pagination.js +1 -1
  402. package/es6/components/Pagination/propTypes.js +1 -1
  403. package/es6/components/Paragraph/Paragraph.js +1 -1
  404. package/es6/components/Paragraph/StyledParagraph.js +8 -1
  405. package/es6/components/Paragraph/index.d.ts +1 -0
  406. package/es6/components/Paragraph/propTypes.js +2 -1
  407. package/es6/components/Paragraph/stories/MaxLines.js +24 -0
  408. package/es6/components/RadioButton/RadioButton.js +1 -1
  409. package/es6/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
  410. package/es6/components/RadioButtonGroup/index.d.ts +2 -1
  411. package/es6/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +1 -1
  412. package/es6/components/RadioButtonGroup/stories/Disabled.js +1 -1
  413. package/es6/components/RangeInput/RangeInput.js +1 -1
  414. package/es6/components/RangeSelector/EdgeControl.js +1 -1
  415. package/es6/components/RangeSelector/RangeSelector.js +1 -1
  416. package/es6/components/RangeSelector/stories/CustomThemed/Custom.js +1 -1
  417. package/es6/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +1 -1
  418. package/es6/components/RangeSelector/stories/Step.js +1 -1
  419. package/es6/components/RangeSelector/stories/Vertical.js +1 -1
  420. package/es6/components/RoutedAnchor/RoutedAnchor.js +2 -2
  421. package/es6/components/RoutedButton/RoutedButton.js +2 -2
  422. package/es6/components/Select/Select.js +12 -33
  423. package/es6/components/Select/SelectContainer.js +35 -38
  424. package/es6/components/Select/propTypes.js +1 -1
  425. package/es6/components/Select/stories/components/SearchBorderBox.js +1 -1
  426. package/es6/components/Select/stories/components/SearchInput.js +1 -1
  427. package/es6/components/Sidebar/Sidebar.js +1 -1
  428. package/es6/components/Sidebar/stories/Labels.js +1 -1
  429. package/es6/components/SkipLink/SkipLink.js +1 -1
  430. package/es6/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
  431. package/es6/components/Spinner/Spinner.js +1 -1
  432. package/es6/components/Stack/Stack.js +1 -1
  433. package/es6/components/Stack/propTypes.js +1 -1
  434. package/es6/components/Tab/StyledTab.js +2 -2
  435. package/es6/components/Tab/Tab.js +35 -18
  436. package/es6/components/Table/StyledTable.js +1 -1
  437. package/es6/components/Table/propTypes.js +1 -1
  438. package/es6/components/TableBody/TableBody.js +1 -1
  439. package/es6/components/TableCell/TableCell.js +1 -1
  440. package/es6/components/TableFooter/TableFooter.js +1 -1
  441. package/es6/components/TableHeader/TableHeader.js +1 -1
  442. package/es6/components/TableRow/TableRow.js +1 -1
  443. package/es6/components/Tabs/Tabs.js +229 -12
  444. package/es6/components/Tabs/propTypes.js +1 -1
  445. package/es6/components/Tabs/stories/Responsive.js +18 -0
  446. package/es6/components/Tag/Tag.js +1 -1
  447. package/es6/components/Tag/propTypes.js +1 -1
  448. package/es6/components/Text/Text.js +1 -1
  449. package/es6/components/Text/propTypes.js +1 -1
  450. package/es6/components/TextArea/TextArea.js +1 -1
  451. package/es6/components/TextArea/stories/NonResizable.js +1 -1
  452. package/es6/components/TextArea/stories/Simple.js +1 -1
  453. package/es6/components/TextInput/TextInput.js +33 -4
  454. package/es6/components/TextInput/stories/DefaultSuggestion.js +1 -0
  455. package/es6/components/TextInput/stories/InsideFormField.js +1 -1
  456. package/es6/components/TextInput/stories/Suggestions.js +1 -0
  457. package/es6/components/TextInput/stories/WithTags.js +1 -1
  458. package/es6/components/Tip/Tip.js +22 -29
  459. package/es6/components/Video/StyledVideo.js +2 -2
  460. package/es6/components/Video/Video.js +100 -47
  461. package/es6/components/Video/index.d.ts +1 -0
  462. package/es6/components/Video/propTypes.js +2 -2
  463. package/es6/components/Video/stories/typescript/ControlsBelow.tsx +6 -2
  464. package/es6/components/WorldMap/WorldMap.js +1 -1
  465. package/es6/components/WorldMap/propTypes.js +1 -1
  466. package/es6/components/WorldMap/stories/Places.js +1 -1
  467. package/es6/components/index.d.ts +1 -0
  468. package/es6/components/index.js +1 -0
  469. package/es6/contexts/AnnounceContext/stories/Assertive.js +1 -1
  470. package/es6/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
  471. package/es6/index.d.ts +1 -0
  472. package/es6/languages/default.json +4 -1
  473. package/es6/themes/base.d.ts +74 -34
  474. package/es6/themes/base.js +99 -3
  475. package/es6/utils/index.js +2 -1
  476. package/es6/utils/object.js +1 -1
  477. package/es6/utils/pagination.js +1 -1
  478. package/es6/utils/use-keyboard.js +25 -0
  479. package/grommet.min.js +1 -1
  480. package/grommet.min.js.map +1 -1
  481. package/index.d.ts +1 -0
  482. package/languages/default.json +4 -1
  483. package/package.json +65 -59
  484. package/themes/base.d.ts +74 -34
  485. package/themes/base.js +100 -3
  486. package/utils/index.js +8 -0
  487. package/utils/object.js +1 -1
  488. package/utils/pagination.js +1 -1
  489. package/utils/use-keyboard.js +34 -0
@@ -14,7 +14,7 @@ export interface RenderProps {
14
14
  isSelected: boolean;
15
15
  }
16
16
 
17
- export interface HeaderProps {
17
+ export interface CalendarHeaderProps {
18
18
  date: Date;
19
19
  locale?: string;
20
20
  onPreviousMonth: () => void;
@@ -38,7 +38,7 @@ export interface CalendarProps {
38
38
  disabled?: (string | string[])[];
39
39
  fill?: boolean;
40
40
  firstDayOfWeek?: 0 | 1;
41
- header?: (args: HeaderProps) => React.ReactNode;
41
+ header?: (args: CalendarHeaderProps) => React.ReactNode;
42
42
  locale?: string;
43
43
  messages?: {
44
44
  previous?: string;
@@ -9,7 +9,7 @@ var _generalPropTypes = require("../../utils/general-prop-types");
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
11
 
12
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
12
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
13
 
14
14
  var PropType = {};
15
15
 
@@ -13,7 +13,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
13
13
 
14
14
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
15
 
16
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
17
 
18
18
  var Container = function Container(_ref) {
19
19
  var rest = _extends({}, _ref);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.withinDates = exports.subtractMonths = exports.subtractDays = exports.startOfMonth = exports.sameDayOrBefore = exports.sameDayOrAfter = exports.sameDay = exports.normalizeForTimezone = exports.getTimestamp = exports.getFormattedDate = exports.formatToLocalYYYYMMDD = exports.formatDateToPropStructure = exports.endOfMonth = exports.daysApart = exports.betweenDates = exports.addMonths = exports.addDays = void 0;
4
+ exports.withinDates = exports.subtractMonths = exports.subtractDays = exports.startOfMonth = exports.sameDayOrBefore = exports.sameDayOrAfter = exports.sameDay = exports.handleOffset = exports.endOfMonth = exports.daysApart = exports.betweenDates = exports.addMonths = exports.addDays = void 0;
5
5
  // Utility functions for the Calendar.
6
6
  // Just what's needed to avoid having to include a dependency like momentjs.
7
7
  var DAY_MILLISECONDS = 24 * 60 * 60 * 1000;
@@ -87,30 +87,22 @@ exports.sameDayOrBefore = sameDayOrBefore;
87
87
 
88
88
  var daysApart = function daysApart(date1, date2) {
89
89
  return Math.floor((date1.getTime() - date2.getTime()) / DAY_MILLISECONDS);
90
- };
91
-
92
- exports.daysApart = daysApart;
93
-
94
- var formatToLocalYYYYMMDD = function formatToLocalYYYYMMDD(date, normalize) {
95
- var adjustedDate = new Date(date);
96
- var nextDate = normalize ? new Date(adjustedDate.getTime() - adjustedDate.getTimezoneOffset() * 60000) : new Date(adjustedDate.getTime());
97
- return nextDate.toISOString().split('T')[0];
98
90
  }; // betweenDates takes an array of two elements and checks if the
99
91
  // supplied date lies between them, inclusive.
100
92
  // returns 2 if exact match to one end, 1 if between, undefined otherwise
101
93
 
102
94
 
103
- exports.formatToLocalYYYYMMDD = formatToLocalYYYYMMDD;
95
+ exports.daysApart = daysApart;
104
96
 
105
97
  var betweenDates = function betweenDates(date, dates) {
106
98
  var result;
107
99
 
108
100
  if (dates) {
109
- var _dates$map = dates.map(function (d) {
101
+ var _ref = Array.isArray(dates) ? dates.map(function (d) {
110
102
  return d ? new Date(d) : undefined;
111
- }),
112
- from = _dates$map[0],
113
- to = _dates$map[1];
103
+ }) : [dates, undefined],
104
+ from = _ref[0],
105
+ to = _ref[1];
114
106
 
115
107
  if (from && sameDay(date, from) || to && sameDay(date, to)) {
116
108
  result = 2;
@@ -136,8 +128,8 @@ var withinDates = function withinDates(date, dates) {
136
128
  if (dates) {
137
129
  if (Array.isArray(dates)) {
138
130
  dates.some(function (d) {
139
- if (typeof d === 'string') {
140
- if (sameDay(date, new Date(d))) {
131
+ if (d instanceof Date) {
132
+ if (sameDay(date, d)) {
141
133
  result = 2;
142
134
  }
143
135
  } else {
@@ -146,7 +138,7 @@ var withinDates = function withinDates(date, dates) {
146
138
 
147
139
  return result;
148
140
  });
149
- } else if (sameDay(date, new Date(dates))) {
141
+ } else if (sameDay(date, dates)) {
150
142
  result = 2;
151
143
  }
152
144
  }
@@ -156,118 +148,13 @@ var withinDates = function withinDates(date, dates) {
156
148
 
157
149
  exports.withinDates = withinDates;
158
150
 
159
- var getTimestamp = function getTimestamp(date) {
160
- return /T.*/.test(date) ? new Date(date).toISOString().split('T')[1] : // for Calendar, explicitly mark that caller has provided
161
- // value with no timestamp
162
- false;
163
- }; // Checks if daylight savings is in effect for a timezone and date
164
- // Reference: https://stackoverflow.com/questions/11887934/how-to-check-if-dst-daylight-saving-time-is-in-effect-and-if-so-the-offset
165
-
166
-
167
- exports.getTimestamp = getTimestamp;
168
-
169
- var inDaylightSavings = function inDaylightSavings(day) {
170
- var jan = new Date(day.getFullYear(), 0, 1).getTimezoneOffset();
171
- var july = new Date(day.getFullYear(), 6, 1).getTimezoneOffset();
172
- return Math.max(jan, july) !== day.getTimezoneOffset();
173
- }; // Adjust for differences between timestamp on value and
174
- // local timezone of user. Internal Calendar logic relies
175
- // on Javascript date contructor which translates the provided
176
- // date into the equivalent moment for the user's timezone, which
177
- // can create undesired results. The standardizes the input value
178
- // for internal calculations
179
- // Reference: https://www.ursahealth.com/new-insights/dates-and-timezones-in-javascript
180
- // If normalize is false just convert the value toISOString(),
181
- // valueOffset/localOffset will be 0.
182
-
183
-
184
- var normalizeForTimezone = function normalizeForTimezone(value, timestamp, normalize) {
185
- if (normalize === void 0) {
186
- normalize = true;
187
- }
188
-
189
- var adjustedDate;
190
- var hourDelta = 0;
191
- var valueOffset = 0;
192
- var localOffset = 0;
193
-
194
- if (normalize) {
195
- if (timestamp && typeof timestamp === 'string') {
196
- hourDelta = parseInt(timestamp == null ? void 0 : timestamp.split(':')[0], 10);
197
- }
198
-
199
- var today = new Date();
200
- adjustedDate = value && (Array.isArray(value) ? value : [value]).map(function (v) {
201
- var day = new Date(v); // If one of the days either day or today is in daylight savings and the
202
- // other is not the timezoneOffset will be different. If they are both
203
- // in or out of daylight savings the timezoneOffset will be the same.
204
-
205
- if (day && !inDaylightSavings(day) && day.getTimezoneOffset() > today.getTimezoneOffset()) {
206
- // today is in daylight savings but the selected day is not
207
- hourDelta -= 1;
208
- } else if (day && inDaylightSavings(day) && day.getTimezoneOffset() < today.getTimezoneOffset()) {
209
- // the selected day is in daylight savings but today is not
210
- hourDelta += 1;
211
- }
212
-
213
- valueOffset = hourDelta === 0 ? 0 : hourDelta * 60 * 60 * 1000;
214
- localOffset = new Date().getTimezoneOffset() * 60 * 1000;
215
- return new Date(new Date(v).getTime() - valueOffset + localOffset).toISOString();
216
- });
217
- } else {
218
- adjustedDate = value && (Array.isArray(value) ? value : [value]).map(function (v) {
219
- return new Date(new Date(v).getTime()).toISOString();
220
- });
221
- }
222
-
223
- if (typeof value === 'string') {
224
- var _adjustedDate = adjustedDate;
225
- adjustedDate = _adjustedDate[0];
226
- }
227
-
228
- return adjustedDate;
229
- }; // format the date to align with date format caller passed in
230
-
231
-
232
- exports.normalizeForTimezone = normalizeForTimezone;
233
-
234
- var formatDateToPropStructure = function formatDateToPropStructure(date, timestamp, normalize) {
235
- var adjustedDate;
236
-
237
- if (date) {
238
- if (timestamp) {
239
- adjustedDate = formatToLocalYYYYMMDD(date, normalize).split('T')[0] + "T" + timestamp;
240
- } else if (timestamp === false) {
241
- var _formatToLocalYYYYMMD = formatToLocalYYYYMMDD(date, normalize).split('T');
242
-
243
- adjustedDate = _formatToLocalYYYYMMD[0];
244
- } else adjustedDate = date;
245
- }
246
-
247
- return adjustedDate;
248
- };
249
-
250
- exports.formatDateToPropStructure = formatDateToPropStructure;
251
-
252
- var getFormattedDate = function getFormattedDate(nextDate, nextDates, normalize, range, timestamp) {
253
- var adjustedDate;
254
- var adjustedDates;
255
-
256
- if (nextDates && Array.isArray(nextDates[0]) && (!nextDates[0][0] || !nextDates[0][1]) && range === true) {
257
- // return string for backwards compatibility
258
- var _nextDates$0$filter = nextDates[0].filter(function (d) {
259
- return d;
260
- });
261
-
262
- adjustedDates = _nextDates$0$filter[0];
263
- adjustedDates = formatDateToPropStructure(adjustedDates, timestamp, normalize);
264
- } else if (nextDates) {
265
- adjustedDates = [[formatDateToPropStructure(nextDates[0][0], timestamp, normalize), formatDateToPropStructure(nextDates[0][1], timestamp, normalize)]];
266
- } else {
267
- adjustedDate = formatDateToPropStructure(nextDate, timestamp, normalize);
268
- }
151
+ var handleOffset = function handleOffset(date) {
152
+ var normalizedDate = new Date(date);
153
+ var offset = normalizedDate.getTimezoneOffset();
154
+ var hour = normalizedDate.getHours(); // add back offset
269
155
 
270
- return adjustedDates || adjustedDate;
156
+ normalizedDate.setHours(hour, offset < 0 ? -offset : offset);
157
+ return normalizedDate;
271
158
  };
272
159
 
273
- exports.getFormattedDate = getFormattedDate;
160
+ exports.handleOffset = handleOffset;
@@ -15,7 +15,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
15
15
 
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
17
 
18
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
18
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
19
 
20
20
  var Card = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
21
21
  var _theme$card$hover;
@@ -13,7 +13,7 @@ var _excluded = ["children", "title", "subTitle", "size"];
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
15
 
16
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
17
 
18
18
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
19
19
 
@@ -11,7 +11,7 @@ var _grommetIcons = require("grommet-icons");
11
11
 
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
13
 
14
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
14
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
15
 
16
16
  var theme = {
17
17
  global: {
@@ -13,7 +13,7 @@ var _excluded = ["children", "title", "subTitle", "size"];
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
15
 
16
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
17
 
18
18
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
19
19
 
@@ -15,7 +15,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
15
15
 
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
17
 
18
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
18
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
19
 
20
20
  var CardBody = function CardBody(_ref) {
21
21
  var rest = _extends({}, _ref);
@@ -15,7 +15,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
15
15
 
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
17
 
18
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
18
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
19
 
20
20
  // Needs to have a CardBody or a flex container when Card uses a fixed height.
21
21
  var CardFooter = function CardFooter(_ref) {
@@ -15,7 +15,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
15
15
 
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
17
 
18
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
18
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
19
 
20
20
  var CardHeader = function CardHeader(_ref) {
21
21
  var rest = _extends({}, _ref);
@@ -31,7 +31,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
31
31
 
32
32
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
33
33
 
34
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
34
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
35
35
 
36
36
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
37
37
 
@@ -9,7 +9,7 @@ var _generalPropTypes = require("../../utils/general-prop-types");
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
11
 
12
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
12
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
13
 
14
14
  var CarouselPropType;
15
15
 
@@ -13,7 +13,7 @@ var _excluded = ["controls"];
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
15
 
16
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
17
 
18
18
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
19
19
 
@@ -27,7 +27,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
27
27
 
28
28
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
29
 
30
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
30
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
31
31
 
32
32
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
33
33
 
@@ -39,9 +39,12 @@ var calcBounds = function calcBounds(values, options) {
39
39
  // coarseness influences the rounding of the bounds, the smaller the
40
40
  // number, the more the bounds will be rounded. e.g. 111 -> 110 -> 100
41
41
  // Normalize to an array. Backwards compatible has no coarseness for x-axis
42
- var coarseness = Array.isArray(options.coarseness) && options.coarseness || options.coarseness && [undefined, options.coarseness] || [undefined, 5]; // the number of steps is one less than the number of labels
42
+ var coarseness = Array.isArray(options.coarseness) && options.coarseness || options.coarseness && [undefined, options.coarseness] || [undefined, 5];
43
+ var coarseX = coarseness[0],
44
+ coarseY = coarseness[1]; // the number of steps is one less than the number of labels
43
45
 
44
46
  var steps = options.steps || [1, 1];
47
+ var stepsY = steps[1];
45
48
  var calcValues = (0, _utils.normalizeValues)(values || []); // min and max values
46
49
 
47
50
  var minX;
@@ -88,19 +91,16 @@ var calcBounds = function calcBounds(values, options) {
88
91
  // graph axis labels.
89
92
 
90
93
 
91
- var cX = coarseness[0],
92
- cY = coarseness[1];
93
-
94
- if (cX) {
94
+ if (coarseX) {
95
95
  var deltaX = maxX - minX;
96
- var intervalX = Number.parseFloat((deltaX / cX).toPrecision(1));
96
+ var intervalX = Number.parseFloat((deltaX / coarseX).toPrecision(1));
97
97
  minX = alignMin(minX, intervalX);
98
98
  maxX = alignMax(maxX, intervalX);
99
99
  }
100
100
 
101
- if (cY) {
101
+ if (coarseY) {
102
102
  var deltaY = maxY - minY;
103
- var intervalY = Number.parseFloat((deltaY / cY).toPrecision(1));
103
+ var intervalY = Number.parseFloat((deltaY / coarseY).toPrecision(1));
104
104
  minY = alignMin(minY, intervalY);
105
105
  maxY = alignMax(maxY, intervalY);
106
106
  }
@@ -108,19 +108,26 @@ var calcBounds = function calcBounds(values, options) {
108
108
  if (minY < 0 && maxY > 0 && Math.abs(minY) !== Math.abs(maxY)) {
109
109
  // Adjust min and max when crossing 0 to ensure 0 will be shown on
110
110
  // the Y axis based on the number of steps.
111
- // const ratio = Math.abs(max) / Math.abs(min);
112
- var stepInterval = (maxY - minY) / steps[1];
113
- var minSteps = minY / stepInterval;
114
- var maxSteps = maxY / stepInterval;
115
-
116
- if (Math.abs(minSteps) < Math.abs(maxSteps)) {
117
- stepInterval = maxY / Math.floor(maxSteps);
118
- maxY = stepInterval * Math.floor(maxSteps);
119
- minY = stepInterval * Math.floor(minSteps);
111
+ if (stepsY === 1) {
112
+ var largest = Math.max(Math.abs(minY), Math.abs(maxY));
113
+ minY = -largest;
114
+ maxY = largest;
120
115
  } else {
121
- stepInterval = Math.abs(minY / Math.ceil(minSteps));
122
- minY = stepInterval * Math.ceil(minSteps);
123
- maxY = stepInterval * Math.ceil(maxSteps);
116
+ var stepInterval = (maxY - minY) / stepsY;
117
+ var minSteps = minY / stepInterval;
118
+ var maxSteps = maxY / stepInterval;
119
+
120
+ if (Math.abs(minSteps) < Math.abs(maxSteps)) {
121
+ // more above than below
122
+ stepInterval = maxY / Math.floor(maxSteps);
123
+ maxY = stepInterval * Math.floor(maxSteps);
124
+ minY = stepInterval * Math.floor(minSteps);
125
+ } else {
126
+ // more below than above
127
+ stepInterval = Math.abs(minY / Math.ceil(minSteps));
128
+ minY = stepInterval * Math.ceil(minSteps);
129
+ maxY = stepInterval * Math.ceil(maxSteps);
130
+ }
124
131
  }
125
132
  }
126
133
  }
@@ -143,27 +150,37 @@ var calcs = function calcs(values, options) {
143
150
 
144
151
  // the number of steps is one less than the number of labels
145
152
  var steps = options.steps || [1, 1];
153
+ var stepsX = steps[0],
154
+ stepsY = steps[1];
146
155
  var bounds = options.bounds || calcBounds(values, options);
147
156
  if (options.min !== undefined) bounds[1][0] = options.min;
148
157
  if (options.max !== undefined) bounds[1][1] = options.max;
149
- var dimensions = [round(bounds[0][1] - bounds[0][0], 2), round(bounds[1][1] - bounds[1][0], 2)]; // Calculate x and y axis values across the specfied number of steps.
158
+ var boundsX = bounds[0],
159
+ boundsY = bounds[1];
160
+ var boundsXmin = boundsX[0],
161
+ boundsXmax = boundsX[1];
162
+ var boundsYmin = boundsY[0],
163
+ boundsYmax = boundsY[1];
164
+ var dimensions = [round(boundsXmax - boundsXmin, 2), round(boundsYmax - boundsYmin, 2)];
165
+ var dimensionsX = dimensions[0],
166
+ dimensionsY = dimensions[1]; // Calculate x and y axis values across the specfied number of steps.
150
167
 
151
168
  var yAxis = [];
152
- var y = bounds[1][1]; // To deal with javascript math limitations, round the step with 4 decimal
169
+ var y = boundsYmax; // To deal with javascript math limitations, round the step with 4 decimal
153
170
  // places and then push the values with 2 decimal places
154
171
 
155
- var yStepInterval = round(dimensions[1] / steps[1], 4);
172
+ var yStepInterval = round(dimensionsY / stepsY, 4);
156
173
 
157
- while (round(y, 2) >= bounds[1][0]) {
174
+ while (round(y, 2) >= boundsYmin) {
158
175
  yAxis.push(round(y, 2));
159
176
  y -= yStepInterval;
160
177
  }
161
178
 
162
179
  var xAxis = [];
163
- var x = bounds[0][0];
164
- var xStepInterval = round(dimensions[0] / steps[0], 4);
180
+ var x = boundsXmin;
181
+ var xStepInterval = round(dimensionsX / stepsX, 4);
165
182
 
166
- while (round(x, 2) <= bounds[0][1]) {
183
+ while (round(x, 2) <= boundsXmax) {
167
184
  xAxis.push(round(x, 2));
168
185
  x += xStepInterval;
169
186
  }
@@ -96,6 +96,32 @@ export interface ChartProps {
96
96
  )[];
97
97
  }
98
98
 
99
- declare const Chart: React.FC<ChartProps>;
99
+ export interface ChartExtendedProps
100
+ extends ChartProps,
101
+ Omit<JSX.IntrinsicElements['svg'], keyof ChartProps> {}
100
102
 
101
- export { Chart };
103
+ declare const Chart: React.FC<ChartExtendedProps>;
104
+
105
+ type Bounds = [[number, number], [number, number]] | [[], []];
106
+
107
+ interface CalcsResult {
108
+ axis: [number[], number[]];
109
+ bounds: Bounds;
110
+ dimensions: [number, number];
111
+ pad: string;
112
+ thickness: string;
113
+ }
114
+
115
+ interface CalcsOptions {
116
+ min?: number;
117
+ max?: number;
118
+ bounds?: Bounds;
119
+ thickness?: string;
120
+ }
121
+
122
+ declare const calcs: (
123
+ values: number[] | number[][],
124
+ options?: CalcsOptions,
125
+ ) => CalcsResult;
126
+
127
+ export { Chart, calcs };
@@ -9,7 +9,7 @@ var _generalPropTypes = require("../../utils/general-prop-types");
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
11
 
12
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
12
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
13
 
14
14
  var thicknessType = _propTypes["default"].oneOfType([_propTypes["default"].oneOf(['hair', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'none']), _propTypes["default"].string, _propTypes["default"].number]);
15
15
 
@@ -13,7 +13,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
13
13
 
14
14
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
15
 
16
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
17
 
18
18
  var Rich = function Rich() {
19
19
  var _useState = (0, _react.useState)({
@@ -15,23 +15,28 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
15
15
 
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
17
 
18
- var ScanChart = function ScanChart(props) {
18
+ var count = 30,
19
+ max = 100,
20
+ min = 0;
21
+
22
+ var ScanChart = function ScanChart() {
19
23
  var _useState = (0, _react.useState)(undefined),
20
24
  active = _useState[0],
21
25
  setActive = _useState[1];
22
26
 
23
- var data = props.data,
24
- max = props.max;
27
+ var data = (0, _react.useMemo)(function () {
28
+ return (0, _data.generateData)(count, max, min);
29
+ }, []);
25
30
  var values = data.map(function (d) {
26
31
  return [d.time, d.value];
27
32
  });
28
33
 
29
34
  var _useMemo = (0, _react.useMemo)(function () {
30
35
  return (0, _calcs.calcs)(values, {
31
- min: 0,
36
+ min: min,
32
37
  max: max
33
38
  });
34
- }, [values, max]),
39
+ }, [values]),
35
40
  axis = _useMemo.axis,
36
41
  bounds = _useMemo.bounds,
37
42
  pad = _useMemo.pad,
@@ -157,10 +162,7 @@ var ScanChart = function ScanChart(props) {
157
162
  };
158
163
 
159
164
  var Scan = function Scan() {
160
- return /*#__PURE__*/_react["default"].createElement(ScanChart, {
161
- data: (0, _data.generateData)(30, 100),
162
- max: 100
163
- });
165
+ return /*#__PURE__*/_react["default"].createElement(ScanChart, null);
164
166
  };
165
167
 
166
168
  exports.Scan = Scan;
@@ -15,7 +15,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
15
15
 
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
17
 
18
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
18
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
19
 
20
20
  // compress data for outer control chart
21
21
  var compressData = function compressData(data, max, count) {