@spothero/ui 15.10.9 → 16.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/.eslintignore +2 -1
  2. package/dex.config.js +1 -1
  3. package/jest.config.json +1 -2
  4. package/package.json +8 -24
  5. package/styles/{v2/components → components}/Accordion/Accordion.stories.js +2 -2
  6. package/styles/{v2/components → components}/Accordion/styles/button.js +1 -1
  7. package/styles/{v2/components → components}/Alert/Alert.jsx +2 -2
  8. package/styles/{v2/components → components}/AutoSuggestSelect/AutoSuggestSelect.jsx +7 -0
  9. package/styles/{v2/components → components}/Button/stories/button.js +1 -1
  10. package/styles/{v2/components → components}/Button/stories/overview.js +1 -1
  11. package/styles/{v2/components → components}/FormControl/FormControl.jsx +2 -0
  12. package/styles/{v2/components → components}/Grid/Grid.stories.js +1 -1
  13. package/styles/{v2/components → components}/Heading/Heading.styles.js +1 -1
  14. package/styles/{v2/components → components}/Image/Image.jsx +23 -2
  15. package/styles/{v2/components → components}/Link/Link.stories.js +2 -2
  16. package/styles/{v2/components → components}/List/List.stories.js +2 -2
  17. package/styles/{v2/components → components}/Modal/Modal.jsx +0 -1
  18. package/styles/{v2/components → components}/Modal/Modal.stories.js +4 -4
  19. package/styles/{v2/components → components}/Popover/Popover.stories.js +1 -1
  20. package/styles/{v2/components → components}/Skeleton/index.js +1 -1
  21. package/styles/{v2/components → components}/Spinner/Spinner.stories.js +1 -1
  22. package/styles/{v2/components → components}/Table/Table.styles.js +1 -1
  23. package/styles/{v2/components → components}/Tabs/Tabs.jsx +2 -3
  24. package/styles/{v2/components → components}/Tabs/combineSizeWithVariant.js +5 -3
  25. package/styles/{v2/components → components}/Text/Text.styles.js +1 -1
  26. package/styles/{v2/components → components}/Text/combineAsWithVariant.js +1 -1
  27. package/styles/{v2/components → components}/ThemeProvider/ThemeProvider.jsx +2 -2
  28. package/styles/{v2/components → components}/ThemeProvider/ThemeProvider.stories.js +2 -2
  29. package/v2/index.js +1 -1
  30. package/v2/index.js.map +1 -1
  31. package/backlog/Alert/Alert.js +0 -37
  32. package/backlog/AutoSuggestInput/AutoSuggestInput.js +0 -474
  33. package/backlog/AutoSuggestInput/AutoSuggestItem.js +0 -99
  34. package/backlog/AutoSuggestInput/AutoSuggestList.js +0 -126
  35. package/backlog/Badge/Badge.js +0 -28
  36. package/backlog/Chart/Chart.js +0 -211
  37. package/backlog/Checkbox/Checkbox.js +0 -167
  38. package/backlog/DateTime/DatePicker.js +0 -279
  39. package/backlog/DateTime/DatePickerCalendar.js +0 -199
  40. package/backlog/DateTime/DatePickerCalendarNavigation.js +0 -102
  41. package/backlog/DateTime/DatePickerCalendarWithRange.js +0 -241
  42. package/backlog/DateTime/DateTimePicker.js +0 -216
  43. package/backlog/DateTime/DateTimeRangePicker.js +0 -530
  44. package/backlog/DateTime/TimePicker.js +0 -180
  45. package/backlog/DateTime/date-time-assertions.js +0 -66
  46. package/backlog/DateTime/index.js +0 -55
  47. package/backlog/ErrorBoundary/ErrorBoundary.js +0 -125
  48. package/backlog/Flyout/Flyout.js +0 -198
  49. package/backlog/Form/Form.js +0 -193
  50. package/backlog/Form/FormElementError.js +0 -24
  51. package/backlog/Form/FormGroup.js +0 -30
  52. package/backlog/Form/FormGroupError.js +0 -28
  53. package/backlog/Form/index.js +0 -39
  54. package/backlog/GooglePlacesSearchInput/GooglePlacesSearchInput.js +0 -253
  55. package/backlog/GooglePlacesSearchInput/PoweredByGoogle.js +0 -38
  56. package/backlog/GooglePlacesSearchInput/index.js +0 -23
  57. package/backlog/HorizontalRule/HorizontalRule.js +0 -30
  58. package/backlog/Label/Label.js +0 -31
  59. package/backlog/Notification/Notification.js +0 -178
  60. package/backlog/Notification/NotificationContainer.js +0 -131
  61. package/backlog/Notification/NotificationPropTypes.js +0 -37
  62. package/backlog/Notification/index.js +0 -23
  63. package/backlog/PasswordControl/PasswordControl.js +0 -201
  64. package/backlog/Portal/Portal.js +0 -110
  65. package/backlog/PulseLoader/PulseLoader.js +0 -62
  66. package/backlog/Radio/Radio.js +0 -135
  67. package/backlog/Radio/RadioGroup.js +0 -123
  68. package/backlog/Radio/index.js +0 -23
  69. package/backlog/RenderInBody/RenderInBody.js +0 -103
  70. package/backlog/Select/Select.js +0 -275
  71. package/backlog/Select/SelectItemPropTypes.js +0 -32
  72. package/backlog/Select/index.js +0 -23
  73. package/backlog/SelectControlled/SelectControlled.js +0 -270
  74. package/backlog/SelectControlled/index.js +0 -15
  75. package/backlog/Sprite/Sprite.js +0 -24
  76. package/backlog/Tabs/Tab.js +0 -94
  77. package/backlog/Tabs/TabContent.js +0 -56
  78. package/backlog/Tabs/TabNavigation.js +0 -108
  79. package/backlog/Tabs/TabPanel.js +0 -29
  80. package/backlog/Tabs/Tabs.js +0 -126
  81. package/backlog/Tabs/index.js +0 -47
  82. package/backlog/TextArea/TextArea.js +0 -155
  83. package/backlog/TextInput/TextInput.js +0 -230
  84. package/backlog/TextInput/TextInputPropTypes.js +0 -114
  85. package/backlog/TextInput/index.js +0 -23
  86. package/backlog/Tooltip/Tooltip.js +0 -249
  87. package/backlog/index.js +0 -393
  88. package/backlog/v1/components/Button/Button.js +0 -64
  89. package/backlog/v1/components/Button/button-props.js +0 -48
  90. package/backlog/v1/components/Image/Image.js +0 -193
  91. package/backlog/v1/components/Loader/Loader.js +0 -51
  92. package/backlog/v1/components/Modal/Modal.js +0 -325
  93. package/backlog/v1/components/Modal/ModalContent.js +0 -154
  94. package/backlog/v1/components/Modal/ModalFooter.js +0 -89
  95. package/backlog/v1/components/Modal/index.js +0 -31
  96. package/backlog/v1/components/Panel/Panel.js +0 -209
  97. package/backlog/v1/components/Table/Table.js +0 -336
  98. package/backlog/v1/components/Table/TableCell.js +0 -28
  99. package/backlog/v1/components/Table/TableCellPropTypes.js +0 -22
  100. package/backlog/v1/components/Table/TableControls.js +0 -56
  101. package/backlog/v1/components/Table/TableFooter.js +0 -63
  102. package/backlog/v1/components/Table/TableHeading.js +0 -126
  103. package/backlog/v1/components/Table/TableHeadingPropTypes.js +0 -35
  104. package/backlog/v1/components/Table/TableSortSelector.js +0 -125
  105. package/backlog/v1/components/Table/TableSortType.js +0 -11
  106. package/backlog/v1/components/Table/index.js +0 -47
  107. package/backlog/v1/components/TextButton/TextButton.js +0 -74
  108. package/backlog/v1/components/index.js +0 -75
  109. package/backlog/v1/utils/deprecate.js +0 -61
  110. package/styles/Alert/_Alert.scss +0 -51
  111. package/styles/AutoSuggestInput/_AutoSuggestInput.scss +0 -116
  112. package/styles/Badge/_Badge.scss +0 -33
  113. package/styles/Chart/_Chart.scss +0 -105
  114. package/styles/Chart/_chartist-settings.scss +0 -131
  115. package/styles/Chart/_chartist.scss +0 -295
  116. package/styles/Checkbox/_Checkbox.scss +0 -173
  117. package/styles/DateTime/_DatePicker.scss +0 -61
  118. package/styles/DateTime/_DatePickerCalendar.scss +0 -159
  119. package/styles/DateTime/_DateTime.scss +0 -4
  120. package/styles/DateTime/_DateTimePicker.scss +0 -46
  121. package/styles/DateTime/_TimePicker.scss +0 -30
  122. package/styles/ErrorBoundary/_ErrorBoundary.scss +0 -18
  123. package/styles/Flyout/_Flyout.scss +0 -73
  124. package/styles/Form/_Form.scss +0 -53
  125. package/styles/GooglePlacesSearchInput/_GooglePlacesSearchInput.scss +0 -3
  126. package/styles/GooglePlacesSearchInput/_PoweredByGoogle.scss +0 -21
  127. package/styles/HorizontalRule/_HorizontalRule.scss +0 -48
  128. package/styles/Label/_Label.scss +0 -6
  129. package/styles/Notification/_Notification.scss +0 -113
  130. package/styles/PasswordControl/_PasswordControl.scss +0 -86
  131. package/styles/PulseLoader/_PulseLoader.scss +0 -60
  132. package/styles/Radio/_Radio.scss +0 -93
  133. package/styles/Select/_Select.scss +0 -94
  134. package/styles/Tabs/_Tabs.scss +0 -57
  135. package/styles/TextArea/_TextArea.scss +0 -26
  136. package/styles/TextInput/_TextInput.scss +0 -43
  137. package/styles/Tooltip/_Tooltip.scss +0 -108
  138. package/styles/_index.scss +0 -34
  139. package/styles/common/sass/_control-sizing.scss +0 -5
  140. package/styles/common/sass/_disable-scrolling.scss +0 -7
  141. package/styles/common/sass/_forms.scss +0 -72
  142. package/styles/index.js +0 -50
  143. package/styles/v1/components/Button/Button.jsx +0 -48
  144. package/styles/v1/components/Button/Button.spec.js +0 -76
  145. package/styles/v1/components/Button/_Button.scss +0 -178
  146. package/styles/v1/components/Button/button-props.js +0 -30
  147. package/styles/v1/components/Button/stories/button.js +0 -20
  148. package/styles/v1/components/Button/stories/index.stories.js +0 -92
  149. package/styles/v1/components/Button/stories/overview.js +0 -87
  150. package/styles/v1/components/Button/stories/types.js +0 -31
  151. package/styles/v1/components/Image/Image.jsx +0 -175
  152. package/styles/v1/components/Image/Image.spec.js +0 -113
  153. package/styles/v1/components/Image/_Image.scss +0 -24
  154. package/styles/v1/components/Image/stories/Cloudinary.stories.js +0 -39
  155. package/styles/v1/components/Image/stories/Display.stories.js +0 -92
  156. package/styles/v1/components/Loader/Loader.jsx +0 -54
  157. package/styles/v1/components/Loader/Loader.spec.js +0 -67
  158. package/styles/v1/components/Loader/_Loader.scss +0 -18
  159. package/styles/v1/components/Loader/stories/Display.stories.js +0 -55
  160. package/styles/v1/components/Modal/Modal.jsx +0 -315
  161. package/styles/v1/components/Modal/Modal.spec.js +0 -293
  162. package/styles/v1/components/Modal/ModalContent.jsx +0 -126
  163. package/styles/v1/components/Modal/ModalFooter.jsx +0 -53
  164. package/styles/v1/components/Modal/_Modal.scss +0 -262
  165. package/styles/v1/components/Modal/index.js +0 -3
  166. package/styles/v1/components/Modal/stories/Content.stories.js +0 -314
  167. package/styles/v1/components/Modal/stories/Display.stories.js +0 -208
  168. package/styles/v1/components/Modal/stories/Methods.stories.js +0 -44
  169. package/styles/v1/components/Modal/stories/Width.stories.js +0 -82
  170. package/styles/v1/components/Modal/stories/helpers/ReduxConsumer.jsx +0 -21
  171. package/styles/v1/components/Panel/Panel.jsx +0 -202
  172. package/styles/v1/components/Panel/Panel.spec.js +0 -196
  173. package/styles/v1/components/Panel/_Panel.scss +0 -55
  174. package/styles/v1/components/Panel/stories/Display.stories.js +0 -82
  175. package/styles/v1/components/Panel/stories/Methods.stories.js +0 -76
  176. package/styles/v1/components/Table/Table.jsx +0 -367
  177. package/styles/v1/components/Table/Table.spec.js +0 -526
  178. package/styles/v1/components/Table/TableCell.jsx +0 -17
  179. package/styles/v1/components/Table/TableCellPropTypes.js +0 -10
  180. package/styles/v1/components/Table/TableControls.jsx +0 -61
  181. package/styles/v1/components/Table/TableFooter.jsx +0 -72
  182. package/styles/v1/components/Table/TableHeading.jsx +0 -58
  183. package/styles/v1/components/Table/TableHeadingPropTypes.js +0 -20
  184. package/styles/v1/components/Table/TableSortSelector.jsx +0 -63
  185. package/styles/v1/components/Table/TableSortType.js +0 -4
  186. package/styles/v1/components/Table/_Table.scss +0 -263
  187. package/styles/v1/components/Table/index.js +0 -5
  188. package/styles/v1/components/Table/stories/Display.stories.js +0 -194
  189. package/styles/v1/components/Table/stories/Methods.stories.js +0 -141
  190. package/styles/v1/components/Table/stories/helpers/TableCellEmail.jsx +0 -25
  191. package/styles/v1/components/Table/stories/helpers/TableCustomRow.jsx +0 -35
  192. package/styles/v1/components/Table/stories/helpers/TableHeadingEmail.jsx +0 -20
  193. package/styles/v1/components/Table/stories/helpers/table-data.js +0 -26
  194. package/styles/v1/components/Table/stories/helpers/table-headers.js +0 -14
  195. package/styles/v1/components/TextButton/TextButton.jsx +0 -78
  196. package/styles/v1/components/TextButton/TextButton.spec.js +0 -95
  197. package/styles/v1/components/TextButton/_TextButton.scss +0 -114
  198. package/styles/v1/components/TextButton/stories/Display.stories.js +0 -46
  199. package/styles/v1/components/index.js +0 -7
  200. package/styles/v1/utils/deprecate.js +0 -45
  201. package/styles/v2/components/index.js +0 -70
  202. package/styles/v2/components/styles.js +0 -21
  203. package/styles/v2/theme/global.js +0 -118
  204. package/styles/v2/theme/index.js +0 -27
  205. package/styles/v2/utils/Spaces.js +0 -16
  206. package/v1/assets-manifest.json +0 -5
  207. package/v1/index.html +0 -1
  208. package/v1/index.js +0 -3
  209. package/v1/index.js.LICENSE.txt +0 -23
  210. package/v1/index.js.map +0 -1
  211. /package/styles/{v2/components → components}/Accordion/Accordion.jsx +0 -0
  212. /package/styles/{v2/components → components}/Accordion/index.js +0 -0
  213. /package/styles/{v2/components → components}/Accordion/styles/container.js +0 -0
  214. /package/styles/{v2/components → components}/Accordion/styles/index.js +0 -0
  215. /package/styles/{v2/components → components}/Accordion/styles/panel.js +0 -0
  216. /package/styles/{v2/components → components}/Alert/Alert.stories.js +0 -0
  217. /package/styles/{v2/components → components}/Alert/index.js +0 -0
  218. /package/styles/{v2/components → components}/Alert/styles/index.js +0 -0
  219. /package/styles/{v2/components → components}/AutoSuggestSelect/index.js +0 -0
  220. /package/styles/{v2/components → components}/Badge/Badge.jsx +0 -0
  221. /package/styles/{v2/components → components}/Badge/Badge.stories.js +0 -0
  222. /package/styles/{v2/components → components}/Badge/styles/index.js +0 -0
  223. /package/styles/{v2/components → components}/Button/Button.jsx +0 -0
  224. /package/styles/{v2/components → components}/Button/Button.spec.js +0 -0
  225. /package/styles/{v2/components → components}/Button/Button.styles.js +0 -0
  226. /package/styles/{v2/components → components}/Button/button-props.js +0 -0
  227. /package/styles/{v2/components → components}/Button/index.js +0 -0
  228. /package/styles/{v2/components → components}/Button/stories/index.stories.js +0 -0
  229. /package/styles/{v2/components → components}/Card/Card.jsx +0 -0
  230. /package/styles/{v2/components → components}/Card/Card.stories.js +0 -0
  231. /package/styles/{v2/components → components}/Checkbox/Checkbox.jsx +0 -0
  232. /package/styles/{v2/components → components}/Checkbox/Checkbox.stories.js +0 -0
  233. /package/styles/{v2/components → components}/Checkbox/index.js +0 -0
  234. /package/styles/{v2/components → components}/Checkbox/styles/index.js +0 -0
  235. /package/styles/{v2/components → components}/Container/Container.jsx +0 -0
  236. /package/styles/{v2/components → components}/Container/Container.stories.js +0 -0
  237. /package/styles/{v2/components → components}/Container/Container.styles.js +0 -0
  238. /package/styles/{v2/components → components}/Divider/Divider.jsx +0 -0
  239. /package/styles/{v2/components → components}/Divider/Divider.stories.js +0 -0
  240. /package/styles/{v2/components → components}/Divider/Divider.styles.js +0 -0
  241. /package/styles/{v2/components → components}/Grid/Grid.jsx +0 -0
  242. /package/styles/{v2/components → components}/Grid/Grid.styles.js +0 -0
  243. /package/styles/{v2/components → components}/Grid/GridItem.jsx +0 -0
  244. /package/styles/{v2/components → components}/Grid/GridItem.styles.js +0 -0
  245. /package/styles/{v2/components → components}/Grid/index.js +0 -0
  246. /package/styles/{v2/components → components}/Heading/Heading.jsx +0 -0
  247. /package/styles/{v2/components → components}/Heading/Heading.stories.js +0 -0
  248. /package/styles/{v2/components → components}/Icon/Icon.jsx +0 -0
  249. /package/styles/{v2/components → components}/Icon/Icon.stories.js +0 -0
  250. /package/styles/{v2/components → components}/Image/Image.spec.js +0 -0
  251. /package/styles/{v2/components → components}/Image/Image.stories.js +0 -0
  252. /package/styles/{v2/components → components}/Input/Input.jsx +0 -0
  253. /package/styles/{v2/components → components}/Input/Input.stories.js +0 -0
  254. /package/styles/{v2/components → components}/Input/index.js +0 -0
  255. /package/styles/{v2/components → components}/Input/styles/index.js +0 -0
  256. /package/styles/{v2/components → components}/Link/Link.jsx +0 -0
  257. /package/styles/{v2/components → components}/Link/Link.styles.js +0 -0
  258. /package/styles/{v2/components → components}/List/List.jsx +0 -0
  259. /package/styles/{v2/components → components}/List/index.js +0 -0
  260. /package/styles/{v2/components → components}/List/styles/index.js +0 -0
  261. /package/styles/{v2/components → components}/List/styles/item.styles.js +0 -0
  262. /package/styles/{v2/components → components}/Loader/Loader.jsx +0 -0
  263. /package/styles/{v2/components → components}/Loader/Loader.stories.js +0 -0
  264. /package/styles/{v2/components → components}/Modal/index.js +0 -0
  265. /package/styles/{v2/components → components}/Modal/styles/body.js +0 -0
  266. /package/styles/{v2/components → components}/Modal/styles/closeButton.js +0 -0
  267. /package/styles/{v2/components → components}/Modal/styles/dialog.js +0 -0
  268. /package/styles/{v2/components → components}/Modal/styles/dialogContainer.js +0 -0
  269. /package/styles/{v2/components → components}/Modal/styles/footer.js +0 -0
  270. /package/styles/{v2/components → components}/Modal/styles/header.js +0 -0
  271. /package/styles/{v2/components → components}/Modal/styles/index.js +0 -0
  272. /package/styles/{v2/components → components}/Modal/styles/overlay.js +0 -0
  273. /package/styles/{v2/components → components}/Popover/Popover.jsx +0 -0
  274. /package/styles/{v2/components → components}/Popover/PopoverArrow.jsx +0 -0
  275. /package/styles/{v2/components → components}/Popover/PopoverCloseButton.jsx +0 -0
  276. /package/styles/{v2/components → components}/Popover/PopoverContent.jsx +0 -0
  277. /package/styles/{v2/components → components}/Popover/index.js +0 -0
  278. /package/styles/{v2/components → components}/Popover/styles/index.js +0 -0
  279. /package/styles/{v2/components → components}/Popover/styles/popover-arrow.js +0 -0
  280. /package/styles/{v2/components → components}/Popover/styles/popover-body.js +0 -0
  281. /package/styles/{v2/components → components}/Popover/styles/popover-close-button.js +0 -0
  282. /package/styles/{v2/components → components}/Popover/styles/popover-content.js +0 -0
  283. /package/styles/{v2/components → components}/Popover/styles/popover-header.js +0 -0
  284. /package/styles/{v2/components → components}/Popover/styles/popper.js +0 -0
  285. /package/styles/{v2/components → components}/Radio/Radio.jsx +0 -0
  286. /package/styles/{v2/components → components}/Radio/Radio.stories.js +0 -0
  287. /package/styles/{v2/components → components}/Radio/RadioGroup.jsx +0 -0
  288. /package/styles/{v2/components → components}/Radio/index.js +0 -0
  289. /package/styles/{v2/components → components}/Radio/styles/index.js +0 -0
  290. /package/styles/{v2/components → components}/Select/Select.jsx +0 -0
  291. /package/styles/{v2/components → components}/Select/Select.stories.js +0 -0
  292. /package/styles/{v2/components → components}/Select/index.js +0 -0
  293. /package/styles/{v2/components → components}/Select/styles/index.js +0 -0
  294. /package/styles/{v2/components → components}/Skeleton/Skeleton.stories.jsx +0 -0
  295. /package/styles/{v2/components → components}/Skeleton/Skeleton.styles.js +0 -0
  296. /package/styles/{v2/components → components}/Spinner/Spinner.jsx +0 -0
  297. /package/styles/{v2/components → components}/Spinner/Spinner.styles.js +0 -0
  298. /package/styles/{v2/components → components}/Switch/Switch.jsx +0 -0
  299. /package/styles/{v2/components → components}/Switch/Switch.stories.js +0 -0
  300. /package/styles/{v2/components → components}/Switch/index.js +0 -0
  301. /package/styles/{v2/components → components}/Switch/styles/index.js +0 -0
  302. /package/styles/{v2/components → components}/Table/Table.jsx +0 -0
  303. /package/styles/{v2/components → components}/Table/Table.stories.js +0 -0
  304. /package/styles/{v2/components → components}/Table/index.js +0 -0
  305. /package/styles/{v2/components → components}/Tabs/Tabs.stories.js +0 -0
  306. /package/styles/{v2/components → components}/Tabs/index.js +0 -0
  307. /package/styles/{v2/components → components}/Tabs/styles/index.js +0 -0
  308. /package/styles/{v2/components → components}/Text/Text.jsx +0 -0
  309. /package/styles/{v2/components → components}/Text/Text.stories.js +0 -0
  310. /package/styles/{v2/components → components}/Text/options.js +0 -0
  311. /package/styles/{v2/theme → theme}/base/breakpoints.js +0 -0
  312. /package/styles/{v2/theme → theme}/base/colors.js +0 -0
  313. /package/styles/{v2/theme → theme}/base/index.js +0 -0
  314. /package/styles/{v2/theme → theme}/base/sizes.js +0 -0
  315. /package/styles/{v2/theme → theme}/base/typography.js +0 -0
  316. /package/styles/{v2/theme → theme}/base/zindices.js +0 -0
@@ -1,230 +0,0 @@
1
- "use strict";
2
-
3
- var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
4
-
5
- var _Reflect$construct = require("@babel/runtime-corejs3/core-js-stable/reflect/construct");
6
-
7
- var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
8
-
9
- var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
10
-
11
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
12
-
13
- Object.defineProperty(exports, "__esModule", {
14
- value: true
15
- });
16
- exports.default = void 0;
17
-
18
- var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
19
-
20
- var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
21
-
22
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
23
-
24
- var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
25
-
26
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/assertThisInitialized"));
27
-
28
- var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
29
-
30
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
31
-
32
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
33
-
34
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
35
-
36
- var _react = _interopRequireWildcard(require("react"));
37
-
38
- var _classnames = _interopRequireDefault(require("classnames"));
39
-
40
- var _reactInputMask = _interopRequireDefault(require("react-input-mask"));
41
-
42
- var _Loader = _interopRequireDefault(require("../v1/components/Loader/Loader"));
43
-
44
- var _TextInputPropTypes = _interopRequireDefault(require("./TextInputPropTypes"));
45
-
46
- function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
47
-
48
- 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; }
49
-
50
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
51
-
52
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
53
-
54
- var TextInput = /*#__PURE__*/function (_Component) {
55
- (0, _inherits2.default)(TextInput, _Component);
56
-
57
- var _super = _createSuper(TextInput);
58
-
59
- function TextInput() {
60
- var _context;
61
-
62
- var _this;
63
-
64
- (0, _classCallCheck2.default)(this, TextInput);
65
-
66
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
67
- args[_key] = arguments[_key];
68
- }
69
-
70
- _this = _super.call.apply(_super, (0, _concat.default)(_context = [this]).call(_context, args));
71
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
72
- validationState: null
73
- });
74
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_onInvalid", function (evt) {
75
- evt.preventDefault();
76
- var onInvalid = _this.props.onInvalid;
77
- var validationState = evt.currentTarget.validity;
78
-
79
- _this.setState({
80
- validationState: validationState
81
- });
82
-
83
- if (onInvalid) {
84
- onInvalid(validationState);
85
- }
86
- });
87
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_onChange", function (evt) {
88
- var onChange = _this.props.onChange;
89
-
90
- _this.setState({
91
- validationState: null
92
- });
93
-
94
- if (onChange) {
95
- onChange(evt);
96
- }
97
- });
98
- return _this;
99
- }
100
-
101
- (0, _createClass2.default)(TextInput, [{
102
- key: "componentDidMount",
103
- value: function componentDidMount() {
104
- var _this$_input, _this$_input$getInput;
105
-
106
- (_this$_input = this._input) === null || _this$_input === void 0 ? void 0 : (_this$_input$getInput = _this$_input.getInputDOMNode()) === null || _this$_input$getInput === void 0 ? void 0 : _this$_input$getInput.addEventListener('invalid', this._onInvalid);
107
- }
108
- }, {
109
- key: "componentDidUpdate",
110
- value: function componentDidUpdate(prevProps, prevState) {
111
- if (prevProps.focus !== this.props.focus) {
112
- this._checkFocus();
113
- }
114
- }
115
- }, {
116
- key: "componentWillUnmount",
117
- value: function componentWillUnmount() {
118
- var _this$_input2, _this$_input2$getInpu;
119
-
120
- (_this$_input2 = this._input) === null || _this$_input2 === void 0 ? void 0 : (_this$_input2$getInpu = _this$_input2.getInputDOMNode()) === null || _this$_input2$getInpu === void 0 ? void 0 : _this$_input2$getInpu.removeEventListener('invalid', this._onInvalid);
121
- }
122
- }, {
123
- key: "_checkFocus",
124
- value: function _checkFocus() {
125
- if (this.props.focus) {
126
- var _this$_input3, _this$_input3$getInpu;
127
-
128
- (_this$_input3 = this._input) === null || _this$_input3 === void 0 ? void 0 : (_this$_input3$getInpu = _this$_input3.getInputDOMNode()) === null || _this$_input3$getInpu === void 0 ? void 0 : _this$_input3$getInpu.focus();
129
- }
130
- }
131
- /**
132
- * Getter for the input DOM element.
133
- *
134
- * @public
135
- * @returns {Element} - The input element.
136
- */
137
-
138
- }, {
139
- key: "node",
140
- get: function get() {
141
- var _this$_input4;
142
-
143
- return (_this$_input4 = this._input) === null || _this$_input4 === void 0 ? void 0 : _this$_input4.getInputDOMNode();
144
- }
145
- }, {
146
- key: "render",
147
- value: function render() {
148
- var _this2 = this;
149
-
150
- var _this$props = this.props,
151
- className = _this$props.className,
152
- name = _this$props.name,
153
- type = _this$props.type,
154
- label = _this$props.label,
155
- placeholder = _this$props.placeholder,
156
- pattern = _this$props.pattern,
157
- required = _this$props.required,
158
- disabled = _this$props.disabled,
159
- loading = _this$props.loading,
160
- autoFocus = _this$props.autoFocus,
161
- error = _this$props.error,
162
- defaultValue = _this$props.defaultValue,
163
- icon = _this$props.icon,
164
- iconPosition = _this$props.iconPosition,
165
- helpNode = _this$props.helpNode,
166
- inline = _this$props.inline,
167
- readOnly = _this$props.readOnly,
168
- maxLength = _this$props.maxLength,
169
- min = _this$props.min,
170
- max = _this$props.max,
171
- mask = _this$props.mask,
172
- maskChar = _this$props.maskChar,
173
- additionalInputProps = _this$props.additionalInputProps,
174
- onFocus = _this$props.onFocus,
175
- onBlur = _this$props.onBlur;
176
- var validationState = this.state.validationState;
177
- var isValid = validationState ? validationState.valid : true;
178
- var classes = (0, _classnames.default)('TextInput', 'FormElement', {
179
- 'FormElement-inline': inline
180
- }, {
181
- 'FormElement-with-icon': icon
182
- }, {
183
- 'FormElement-loading': loading
184
- }, (0, _defineProperty2.default)({}, "FormElement-with-icon-".concat(iconPosition), icon), {
185
- 'FormElement-contains-error': !isValid
186
- }, className);
187
- return /*#__PURE__*/_react.default.createElement("div", {
188
- className: classes
189
- }, label, /*#__PURE__*/_react.default.createElement("div", {
190
- className: "FormElement-control"
191
- }, /*#__PURE__*/_react.default.createElement(_reactInputMask.default, (0, _extends2.default)({
192
- ref: function ref(node) {
193
- _this2._input = node;
194
- },
195
- className: "FormElement-item",
196
- name: name,
197
- type: type,
198
- placeholder: placeholder,
199
- disabled: disabled,
200
- autoFocus: autoFocus,
201
- required: required,
202
- pattern: pattern,
203
- maxLength: maxLength,
204
- min: min,
205
- max: max,
206
- onChange: this._onChange,
207
- onFocus: onFocus,
208
- onBlur: onBlur,
209
- mask: mask,
210
- maskChar: maskChar,
211
- alwaysShowMask: false,
212
- readOnly: readOnly,
213
- defaultValue: defaultValue
214
- }, additionalInputProps)), icon, loading && /*#__PURE__*/_react.default.createElement(_Loader.default, {
215
- size: 16,
216
- borderWidth: 2
217
- })), helpNode && /*#__PURE__*/_react.default.createElement("div", {
218
- className: "FormElement-help-text"
219
- }, helpNode), !isValid && error);
220
- }
221
- }]);
222
- return TextInput;
223
- }(_react.Component);
224
-
225
- exports.default = TextInput;
226
- (0, _defineProperty2.default)(TextInput, "defaultProps", {
227
- type: 'text',
228
- maskChar: null,
229
- iconPosition: 'left'
230
- });
@@ -1,114 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
- var TextInputPropTypes = {
13
- /** Additional class(es) to add to the component. */
14
- className: _propTypes.default.string,
15
-
16
- /** A unique name which is used to identify this element. If belonging to a form this is used as the key for serialization and is required. */
17
- name: _propTypes.default.string,
18
-
19
- /** What HTML input type the underlying input should be set to. */
20
- type: _propTypes.default.oneOf(['text', 'password', 'date', 'email', 'time', 'tel', 'search', 'number', 'hidden']),
21
-
22
- /** Text to display in the field before a user starts to type in the input. */
23
- placeholder: _propTypes.default.string,
24
-
25
- /** A custom label (typically a Label component) to display above the input. */
26
- label: _propTypes.default.element,
27
-
28
- /** A regular expression that the input value is checked against for validation. */
29
- pattern: _propTypes.default.string,
30
-
31
- /** Whether this field is required during validation. */
32
- required: _propTypes.default.bool,
33
-
34
- /** Disallows user interaction. */
35
- disabled: _propTypes.default.bool,
36
-
37
- /** Whether to show a loading animation inside of the component. */
38
- loading: _propTypes.default.bool,
39
-
40
- /** Whether the field should be auto focused when mounted. */
41
- autoFocus: _propTypes.default.bool,
42
-
43
- /** Whether the field should be focused when the component receives new props. */
44
- focus: _propTypes.default.bool,
45
-
46
- /** A custom validation error (typically a FormElementError component) to display when this component is part of a form and is invalid. */
47
- error: _propTypes.default.element,
48
-
49
- /** The default value to display in the input when mounted. */
50
- defaultValue: _propTypes.default.string,
51
-
52
- /** A custom icon (typically an Icon component) to show in the input field. */
53
- icon: _propTypes.default.element,
54
-
55
- /** If an icon is provided, whether it should appear on the left or right side of the input field. */
56
- iconPosition: _propTypes.default.oneOf(['left', 'right']),
57
-
58
- /** A custom help element to place below the input. */
59
- helpNode: _propTypes.default.node,
60
-
61
- /** Applies proper styling to display this field inline in a form. */
62
- inline: _propTypes.default.bool,
63
-
64
- /** Specifies that the input field is read-only. */
65
- readOnly: _propTypes.default.bool,
66
-
67
- /** Specifies the maximum number of characters allowed. */
68
- maxLength: _propTypes.default.number,
69
-
70
- /** Specifies the minimum value when type is `date` or `number`. */
71
- min: _propTypes.default.number,
72
-
73
- /** Specifies the maximum value when type is `date` or `number`. */
74
- max: _propTypes.default.number,
75
-
76
- /** A string to use as a mask. See <a href="https://github.com/sanniassin/react-input-mask#mask--string" target="_blank">react-input-mask</a>. */
77
- mask: _propTypes.default.string,
78
-
79
- /** Character to cover unfilled editable parts of mask. See <a href="https://github.com/sanniassin/react-input-mask#maskchar--string" target="_blank">react-input-mask</a>. */
80
- maskChar: _propTypes.default.string,
81
-
82
- /** Additional props to pass to the input element */
83
- additionalInputProps: _propTypes.default.object,
84
-
85
- /**
86
- * Function to execute when the input changes.
87
- *
88
- * @param {SyntheticEvent} evt - The React `SyntheticEvent`.
89
- */
90
- onChange: _propTypes.default.func,
91
-
92
- /**
93
- * Function to execute when the input is focused.
94
- *
95
- * @param {SyntheticEvent} evt - The React `SyntheticEvent`.
96
- */
97
- onFocus: _propTypes.default.func,
98
-
99
- /**
100
- * Function to execute when the input loses focused.
101
- *
102
- * @param {SyntheticEvent} evt - The React `SyntheticEvent`.
103
- */
104
- onBlur: _propTypes.default.func,
105
-
106
- /**
107
- * Function to execute when the element is marked as invalid by a validation check.
108
- *
109
- * @param {ValidityState} validationState - ValidityState object for more fine grained control over error handling in a parent component if desired.
110
- */
111
- onInvalid: _propTypes.default.func
112
- };
113
- var _default = TextInputPropTypes;
114
- exports.default = _default;
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- Object.defineProperty(exports, "TextInput", {
9
- enumerable: true,
10
- get: function get() {
11
- return _TextInput.default;
12
- }
13
- });
14
- Object.defineProperty(exports, "TextInputPropTypes", {
15
- enumerable: true,
16
- get: function get() {
17
- return _TextInputPropTypes.default;
18
- }
19
- });
20
-
21
- var _TextInput = _interopRequireDefault(require("./TextInput"));
22
-
23
- var _TextInputPropTypes = _interopRequireDefault(require("./TextInputPropTypes"));
@@ -1,249 +0,0 @@
1
- "use strict";
2
-
3
- var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
4
-
5
- var _Reflect$construct = require("@babel/runtime-corejs3/core-js-stable/reflect/construct");
6
-
7
- var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
8
-
9
- var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
10
-
11
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
12
-
13
- Object.defineProperty(exports, "__esModule", {
14
- value: true
15
- });
16
- exports.default = void 0;
17
-
18
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
19
-
20
- var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
21
-
22
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/assertThisInitialized"));
23
-
24
- var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
25
-
26
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
27
-
28
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
29
-
30
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
31
-
32
- var _bind = _interopRequireDefault(require("lodash/bind"));
33
-
34
- var _react = _interopRequireWildcard(require("react"));
35
-
36
- var _classnames = _interopRequireDefault(require("classnames"));
37
-
38
- var _times = _interopRequireDefault(require("@spothero/icons/times"));
39
-
40
- var _dom = _interopRequireDefault(require("@spothero/utils/dom"));
41
-
42
- var _Button = _interopRequireDefault(require("../v1/components/Button/Button"));
43
-
44
- var _Portal = _interopRequireDefault(require("../Portal/Portal"));
45
-
46
- function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
47
-
48
- 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; }
49
-
50
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
51
-
52
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
53
-
54
- var Tooltip = /*#__PURE__*/function (_Component) {
55
- (0, _inherits2.default)(Tooltip, _Component);
56
-
57
- var _super = _createSuper(Tooltip);
58
-
59
- function Tooltip(props) {
60
- var _this;
61
-
62
- (0, _classCallCheck2.default)(this, Tooltip);
63
- _this = _super.call(this, props);
64
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_onCloseClick", function (evt) {
65
- _this.hide();
66
- });
67
- _this._isArrowAdjusted = false;
68
- return _this;
69
- }
70
-
71
- (0, _createClass2.default)(Tooltip, [{
72
- key: "componentDidMount",
73
- value: function componentDidMount() {
74
- var _this$props = this.props,
75
- triggerSelector = _this$props.triggerSelector,
76
- updateOnMove = _this$props.updateOnMove,
77
- closeOnBodyClick = _this$props.closeOnBodyClick;
78
- this._trigger = _dom.default.el(triggerSelector);
79
-
80
- this._positionTooltip();
81
-
82
- _dom.default.addClass(this._container, 'Tooltip-showing');
83
-
84
- if (updateOnMove) {
85
- this._container.style.position = 'fixed';
86
- this._scrollInterval = setInterval((0, _bind.default)(this._positionTooltip, this), 100);
87
- }
88
-
89
- if (closeOnBodyClick) {
90
- document.addEventListener('click', this._onCloseClick, {
91
- capture: true
92
- });
93
- }
94
- }
95
- }, {
96
- key: "componentWillUnmount",
97
- value: function componentWillUnmount() {
98
- var _this$props2 = this.props,
99
- updateOnMove = _this$props2.updateOnMove,
100
- closeOnBodyClick = _this$props2.closeOnBodyClick;
101
-
102
- if (updateOnMove) {
103
- clearInterval(this._scrollInterval);
104
- }
105
-
106
- if (closeOnBodyClick) {
107
- document.removeEventListener('click', this._onCloseClick);
108
- }
109
- }
110
- }, {
111
- key: "_positionTooltip",
112
- value: function _positionTooltip() {
113
- if (!this._trigger) {
114
- return;
115
- }
116
-
117
- var _this$props3 = this.props,
118
- position = _this$props3.position,
119
- tipOffset = _this$props3.tipOffset,
120
- updateOnMove = _this$props3.updateOnMove,
121
- adjustArrow = _this$props3.adjustArrow;
122
-
123
- var _this$_trigger$getBou = this._trigger.getBoundingClientRect(),
124
- clientTop = _this$_trigger$getBou.top,
125
- clientLeft = _this$_trigger$getBou.left,
126
- clientRight = _this$_trigger$getBou.right,
127
- clientBottom = _this$_trigger$getBou.bottom,
128
- width = _this$_trigger$getBou.width,
129
- height = _this$_trigger$getBou.height;
130
-
131
- var tooltipWidth = this._container.offsetWidth;
132
- var tooltipHeight = this._container.offsetHeight;
133
-
134
- var _DOMUtils$getDocument = _dom.default.getDocumentOffset(this._trigger),
135
- documentTop = _DOMUtils$getDocument.top,
136
- documentLeft = _DOMUtils$getDocument.left;
137
-
138
- var top = updateOnMove ? clientTop : documentTop;
139
- var right = updateOnMove ? clientRight : documentLeft + width;
140
- var bottom = updateOnMove ? clientBottom : documentTop + height;
141
- var left = updateOnMove ? clientLeft : documentLeft;
142
- var containerMid = position === 'top' || position === 'bottom' ? tooltipWidth / 2 : tooltipHeight / 2;
143
- var bodyWidth = document.body.clientWidth;
144
- var adjuster = 5;
145
- var newTop = 0;
146
- var newLeft = 0;
147
-
148
- switch (position) {
149
- case 'top':
150
- newTop = top - tooltipHeight - tipOffset;
151
- newLeft = left + width / 2 - containerMid;
152
- break;
153
-
154
- case 'right':
155
- newTop = top + height / 2 - containerMid;
156
- newLeft = right + tipOffset;
157
- break;
158
-
159
- case 'bottom':
160
- newTop = bottom + tipOffset;
161
- newLeft = left + width / 2 - containerMid;
162
- break;
163
-
164
- case 'left':
165
- newTop = top + height / 2 - containerMid;
166
- newLeft = left - tooltipWidth - tipOffset;
167
- break;
168
- } // adjust tooltip position if off the left side of the screen
169
-
170
-
171
- var adjustedLeft = newLeft < 0 ? adjuster : newLeft; // adjust tooltip position if off the right side of the screen
172
-
173
- if (tooltipWidth > bodyWidth - adjustedLeft) {
174
- adjustedLeft = bodyWidth - tooltipWidth - adjuster;
175
- }
176
-
177
- this._container.style.top = "".concat(newTop, "px");
178
- this._container.style.left = "".concat(adjustedLeft, "px");
179
-
180
- if (adjustArrow && !this._isArrowAdjusted && adjustedLeft !== newLeft && (position === 'top' || position === 'bottom')) {
181
- this._arrow.style.left = "".concat(this._arrow.getBoundingClientRect().left + (newLeft - adjustedLeft), "px");
182
- this._isArrowAdjusted = true;
183
- }
184
- }
185
- /**
186
- * Hides the Tooltip programmatically and fires the `onHidden` callback when done.
187
- *
188
- * @public
189
- * @returns {void}
190
- */
191
-
192
- }, {
193
- key: "hide",
194
- value: function hide() {
195
- var _this2 = this;
196
-
197
- if (_dom.default.hasClass(this._container, 'Tooltip-showing')) {
198
- _dom.default.removeClass(this._container, 'Tooltip-showing');
199
-
200
- setTimeout(function () {
201
- _this2.props.onHidden();
202
- }, 250);
203
- }
204
- }
205
- }, {
206
- key: "render",
207
- value: function render() {
208
- var _this3 = this;
209
-
210
- var _this$props4 = this.props,
211
- className = _this$props4.className,
212
- containerClassName = _this$props4.containerClassName,
213
- position = _this$props4.position,
214
- showClose = _this$props4.showClose,
215
- children = _this$props4.children;
216
- var classes = (0, _classnames.default)('Tooltip', "Tooltip-".concat(position), {
217
- 'Tooltip-no-close': !showClose
218
- }, className);
219
- return /*#__PURE__*/_react.default.createElement(_Portal.default, {
220
- className: containerClassName
221
- }, /*#__PURE__*/_react.default.createElement("div", {
222
- ref: function ref(node) {
223
- _this3._container = node;
224
- },
225
- className: classes,
226
- role: "tooltip"
227
- }, /*#__PURE__*/_react.default.createElement("div", {
228
- ref: function ref(node) {
229
- _this3._arrow = node;
230
- },
231
- className: "Tooltip-arrow"
232
- }), /*#__PURE__*/_react.default.createElement("div", {
233
- className: "Tooltip-content"
234
- }, children, showClose && /*#__PURE__*/_react.default.createElement(_Button.default, {
235
- className: "Tooltip-close",
236
- onClick: this._onCloseClick
237
- }, /*#__PURE__*/_react.default.createElement(_times.default, null)))));
238
- }
239
- }]);
240
- return Tooltip;
241
- }(_react.Component);
242
-
243
- exports.default = Tooltip;
244
- (0, _defineProperty2.default)(Tooltip, "defaultProps", {
245
- position: 'top',
246
- showClose: true,
247
- tipOffset: 0,
248
- adjustArrow: true
249
- });