@spothero/ui 15.10.8 → 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 (317) 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}/Popover/styles/index.js +1 -1
  21. package/styles/{v2/components/Popover/styles/popper.js → components/Popover/styles/popover-content.js} +8 -5
  22. package/styles/components/Popover/styles/popper.js +5 -0
  23. package/styles/{v2/components → components}/Skeleton/index.js +1 -1
  24. package/styles/{v2/components → components}/Spinner/Spinner.stories.js +1 -1
  25. package/styles/{v2/components → components}/Table/Table.styles.js +1 -1
  26. package/styles/{v2/components → components}/Tabs/Tabs.jsx +2 -3
  27. package/styles/{v2/components → components}/Tabs/combineSizeWithVariant.js +5 -3
  28. package/styles/{v2/components → components}/Text/Text.styles.js +1 -1
  29. package/styles/{v2/components → components}/Text/combineAsWithVariant.js +1 -1
  30. package/styles/{v2/components → components}/ThemeProvider/ThemeProvider.jsx +2 -2
  31. package/styles/{v2/components → components}/ThemeProvider/ThemeProvider.stories.js +2 -2
  32. package/v2/index.js +1 -1
  33. package/v2/index.js.map +1 -1
  34. package/backlog/Alert/Alert.js +0 -37
  35. package/backlog/AutoSuggestInput/AutoSuggestInput.js +0 -474
  36. package/backlog/AutoSuggestInput/AutoSuggestItem.js +0 -99
  37. package/backlog/AutoSuggestInput/AutoSuggestList.js +0 -126
  38. package/backlog/Badge/Badge.js +0 -28
  39. package/backlog/Chart/Chart.js +0 -211
  40. package/backlog/Checkbox/Checkbox.js +0 -167
  41. package/backlog/DateTime/DatePicker.js +0 -279
  42. package/backlog/DateTime/DatePickerCalendar.js +0 -199
  43. package/backlog/DateTime/DatePickerCalendarNavigation.js +0 -102
  44. package/backlog/DateTime/DatePickerCalendarWithRange.js +0 -241
  45. package/backlog/DateTime/DateTimePicker.js +0 -216
  46. package/backlog/DateTime/DateTimeRangePicker.js +0 -530
  47. package/backlog/DateTime/TimePicker.js +0 -180
  48. package/backlog/DateTime/date-time-assertions.js +0 -66
  49. package/backlog/DateTime/index.js +0 -55
  50. package/backlog/ErrorBoundary/ErrorBoundary.js +0 -125
  51. package/backlog/Flyout/Flyout.js +0 -198
  52. package/backlog/Form/Form.js +0 -193
  53. package/backlog/Form/FormElementError.js +0 -24
  54. package/backlog/Form/FormGroup.js +0 -30
  55. package/backlog/Form/FormGroupError.js +0 -28
  56. package/backlog/Form/index.js +0 -39
  57. package/backlog/GooglePlacesSearchInput/GooglePlacesSearchInput.js +0 -253
  58. package/backlog/GooglePlacesSearchInput/PoweredByGoogle.js +0 -38
  59. package/backlog/GooglePlacesSearchInput/index.js +0 -23
  60. package/backlog/HorizontalRule/HorizontalRule.js +0 -30
  61. package/backlog/Label/Label.js +0 -31
  62. package/backlog/Notification/Notification.js +0 -178
  63. package/backlog/Notification/NotificationContainer.js +0 -131
  64. package/backlog/Notification/NotificationPropTypes.js +0 -37
  65. package/backlog/Notification/index.js +0 -23
  66. package/backlog/PasswordControl/PasswordControl.js +0 -201
  67. package/backlog/Portal/Portal.js +0 -110
  68. package/backlog/PulseLoader/PulseLoader.js +0 -62
  69. package/backlog/Radio/Radio.js +0 -135
  70. package/backlog/Radio/RadioGroup.js +0 -123
  71. package/backlog/Radio/index.js +0 -23
  72. package/backlog/RenderInBody/RenderInBody.js +0 -103
  73. package/backlog/Select/Select.js +0 -275
  74. package/backlog/Select/SelectItemPropTypes.js +0 -32
  75. package/backlog/Select/index.js +0 -23
  76. package/backlog/SelectControlled/SelectControlled.js +0 -270
  77. package/backlog/SelectControlled/index.js +0 -15
  78. package/backlog/Sprite/Sprite.js +0 -24
  79. package/backlog/Tabs/Tab.js +0 -94
  80. package/backlog/Tabs/TabContent.js +0 -56
  81. package/backlog/Tabs/TabNavigation.js +0 -108
  82. package/backlog/Tabs/TabPanel.js +0 -29
  83. package/backlog/Tabs/Tabs.js +0 -126
  84. package/backlog/Tabs/index.js +0 -47
  85. package/backlog/TextArea/TextArea.js +0 -155
  86. package/backlog/TextInput/TextInput.js +0 -230
  87. package/backlog/TextInput/TextInputPropTypes.js +0 -114
  88. package/backlog/TextInput/index.js +0 -23
  89. package/backlog/Tooltip/Tooltip.js +0 -249
  90. package/backlog/index.js +0 -393
  91. package/backlog/v1/components/Button/Button.js +0 -64
  92. package/backlog/v1/components/Button/button-props.js +0 -48
  93. package/backlog/v1/components/Image/Image.js +0 -193
  94. package/backlog/v1/components/Loader/Loader.js +0 -51
  95. package/backlog/v1/components/Modal/Modal.js +0 -325
  96. package/backlog/v1/components/Modal/ModalContent.js +0 -154
  97. package/backlog/v1/components/Modal/ModalFooter.js +0 -89
  98. package/backlog/v1/components/Modal/index.js +0 -31
  99. package/backlog/v1/components/Panel/Panel.js +0 -209
  100. package/backlog/v1/components/Table/Table.js +0 -336
  101. package/backlog/v1/components/Table/TableCell.js +0 -28
  102. package/backlog/v1/components/Table/TableCellPropTypes.js +0 -22
  103. package/backlog/v1/components/Table/TableControls.js +0 -56
  104. package/backlog/v1/components/Table/TableFooter.js +0 -63
  105. package/backlog/v1/components/Table/TableHeading.js +0 -126
  106. package/backlog/v1/components/Table/TableHeadingPropTypes.js +0 -35
  107. package/backlog/v1/components/Table/TableSortSelector.js +0 -125
  108. package/backlog/v1/components/Table/TableSortType.js +0 -11
  109. package/backlog/v1/components/Table/index.js +0 -47
  110. package/backlog/v1/components/TextButton/TextButton.js +0 -74
  111. package/backlog/v1/components/index.js +0 -75
  112. package/backlog/v1/utils/deprecate.js +0 -61
  113. package/styles/Alert/_Alert.scss +0 -51
  114. package/styles/AutoSuggestInput/_AutoSuggestInput.scss +0 -116
  115. package/styles/Badge/_Badge.scss +0 -33
  116. package/styles/Chart/_Chart.scss +0 -105
  117. package/styles/Chart/_chartist-settings.scss +0 -131
  118. package/styles/Chart/_chartist.scss +0 -295
  119. package/styles/Checkbox/_Checkbox.scss +0 -173
  120. package/styles/DateTime/_DatePicker.scss +0 -61
  121. package/styles/DateTime/_DatePickerCalendar.scss +0 -159
  122. package/styles/DateTime/_DateTime.scss +0 -4
  123. package/styles/DateTime/_DateTimePicker.scss +0 -46
  124. package/styles/DateTime/_TimePicker.scss +0 -30
  125. package/styles/ErrorBoundary/_ErrorBoundary.scss +0 -18
  126. package/styles/Flyout/_Flyout.scss +0 -73
  127. package/styles/Form/_Form.scss +0 -53
  128. package/styles/GooglePlacesSearchInput/_GooglePlacesSearchInput.scss +0 -3
  129. package/styles/GooglePlacesSearchInput/_PoweredByGoogle.scss +0 -21
  130. package/styles/HorizontalRule/_HorizontalRule.scss +0 -48
  131. package/styles/Label/_Label.scss +0 -6
  132. package/styles/Notification/_Notification.scss +0 -113
  133. package/styles/PasswordControl/_PasswordControl.scss +0 -86
  134. package/styles/PulseLoader/_PulseLoader.scss +0 -60
  135. package/styles/Radio/_Radio.scss +0 -93
  136. package/styles/Select/_Select.scss +0 -94
  137. package/styles/Tabs/_Tabs.scss +0 -57
  138. package/styles/TextArea/_TextArea.scss +0 -26
  139. package/styles/TextInput/_TextInput.scss +0 -43
  140. package/styles/Tooltip/_Tooltip.scss +0 -108
  141. package/styles/_index.scss +0 -34
  142. package/styles/common/sass/_control-sizing.scss +0 -5
  143. package/styles/common/sass/_disable-scrolling.scss +0 -7
  144. package/styles/common/sass/_forms.scss +0 -72
  145. package/styles/index.js +0 -50
  146. package/styles/v1/components/Button/Button.jsx +0 -48
  147. package/styles/v1/components/Button/Button.spec.js +0 -76
  148. package/styles/v1/components/Button/_Button.scss +0 -178
  149. package/styles/v1/components/Button/button-props.js +0 -30
  150. package/styles/v1/components/Button/stories/button.js +0 -20
  151. package/styles/v1/components/Button/stories/index.stories.js +0 -92
  152. package/styles/v1/components/Button/stories/overview.js +0 -87
  153. package/styles/v1/components/Button/stories/types.js +0 -31
  154. package/styles/v1/components/Image/Image.jsx +0 -175
  155. package/styles/v1/components/Image/Image.spec.js +0 -113
  156. package/styles/v1/components/Image/_Image.scss +0 -24
  157. package/styles/v1/components/Image/stories/Cloudinary.stories.js +0 -39
  158. package/styles/v1/components/Image/stories/Display.stories.js +0 -92
  159. package/styles/v1/components/Loader/Loader.jsx +0 -54
  160. package/styles/v1/components/Loader/Loader.spec.js +0 -67
  161. package/styles/v1/components/Loader/_Loader.scss +0 -18
  162. package/styles/v1/components/Loader/stories/Display.stories.js +0 -55
  163. package/styles/v1/components/Modal/Modal.jsx +0 -315
  164. package/styles/v1/components/Modal/Modal.spec.js +0 -293
  165. package/styles/v1/components/Modal/ModalContent.jsx +0 -126
  166. package/styles/v1/components/Modal/ModalFooter.jsx +0 -53
  167. package/styles/v1/components/Modal/_Modal.scss +0 -262
  168. package/styles/v1/components/Modal/index.js +0 -3
  169. package/styles/v1/components/Modal/stories/Content.stories.js +0 -314
  170. package/styles/v1/components/Modal/stories/Display.stories.js +0 -208
  171. package/styles/v1/components/Modal/stories/Methods.stories.js +0 -44
  172. package/styles/v1/components/Modal/stories/Width.stories.js +0 -82
  173. package/styles/v1/components/Modal/stories/helpers/ReduxConsumer.jsx +0 -21
  174. package/styles/v1/components/Panel/Panel.jsx +0 -202
  175. package/styles/v1/components/Panel/Panel.spec.js +0 -196
  176. package/styles/v1/components/Panel/_Panel.scss +0 -55
  177. package/styles/v1/components/Panel/stories/Display.stories.js +0 -82
  178. package/styles/v1/components/Panel/stories/Methods.stories.js +0 -76
  179. package/styles/v1/components/Table/Table.jsx +0 -367
  180. package/styles/v1/components/Table/Table.spec.js +0 -526
  181. package/styles/v1/components/Table/TableCell.jsx +0 -17
  182. package/styles/v1/components/Table/TableCellPropTypes.js +0 -10
  183. package/styles/v1/components/Table/TableControls.jsx +0 -61
  184. package/styles/v1/components/Table/TableFooter.jsx +0 -72
  185. package/styles/v1/components/Table/TableHeading.jsx +0 -58
  186. package/styles/v1/components/Table/TableHeadingPropTypes.js +0 -20
  187. package/styles/v1/components/Table/TableSortSelector.jsx +0 -63
  188. package/styles/v1/components/Table/TableSortType.js +0 -4
  189. package/styles/v1/components/Table/_Table.scss +0 -263
  190. package/styles/v1/components/Table/index.js +0 -5
  191. package/styles/v1/components/Table/stories/Display.stories.js +0 -194
  192. package/styles/v1/components/Table/stories/Methods.stories.js +0 -141
  193. package/styles/v1/components/Table/stories/helpers/TableCellEmail.jsx +0 -25
  194. package/styles/v1/components/Table/stories/helpers/TableCustomRow.jsx +0 -35
  195. package/styles/v1/components/Table/stories/helpers/TableHeadingEmail.jsx +0 -20
  196. package/styles/v1/components/Table/stories/helpers/table-data.js +0 -26
  197. package/styles/v1/components/Table/stories/helpers/table-headers.js +0 -14
  198. package/styles/v1/components/TextButton/TextButton.jsx +0 -78
  199. package/styles/v1/components/TextButton/TextButton.spec.js +0 -95
  200. package/styles/v1/components/TextButton/_TextButton.scss +0 -114
  201. package/styles/v1/components/TextButton/stories/Display.stories.js +0 -46
  202. package/styles/v1/components/index.js +0 -7
  203. package/styles/v1/utils/deprecate.js +0 -45
  204. package/styles/v2/components/Popover/styles/popover-content.js +0 -8
  205. package/styles/v2/components/index.js +0 -70
  206. package/styles/v2/components/styles.js +0 -21
  207. package/styles/v2/theme/global.js +0 -118
  208. package/styles/v2/theme/index.js +0 -27
  209. package/styles/v2/utils/Spaces.js +0 -16
  210. package/v1/assets-manifest.json +0 -5
  211. package/v1/index.html +0 -1
  212. package/v1/index.js +0 -3
  213. package/v1/index.js.LICENSE.txt +0 -23
  214. package/v1/index.js.map +0 -1
  215. /package/styles/{v2/components → components}/Accordion/Accordion.jsx +0 -0
  216. /package/styles/{v2/components → components}/Accordion/index.js +0 -0
  217. /package/styles/{v2/components → components}/Accordion/styles/container.js +0 -0
  218. /package/styles/{v2/components → components}/Accordion/styles/index.js +0 -0
  219. /package/styles/{v2/components → components}/Accordion/styles/panel.js +0 -0
  220. /package/styles/{v2/components → components}/Alert/Alert.stories.js +0 -0
  221. /package/styles/{v2/components → components}/Alert/index.js +0 -0
  222. /package/styles/{v2/components → components}/Alert/styles/index.js +0 -0
  223. /package/styles/{v2/components → components}/AutoSuggestSelect/index.js +0 -0
  224. /package/styles/{v2/components → components}/Badge/Badge.jsx +0 -0
  225. /package/styles/{v2/components → components}/Badge/Badge.stories.js +0 -0
  226. /package/styles/{v2/components → components}/Badge/styles/index.js +0 -0
  227. /package/styles/{v2/components → components}/Button/Button.jsx +0 -0
  228. /package/styles/{v2/components → components}/Button/Button.spec.js +0 -0
  229. /package/styles/{v2/components → components}/Button/Button.styles.js +0 -0
  230. /package/styles/{v2/components → components}/Button/button-props.js +0 -0
  231. /package/styles/{v2/components → components}/Button/index.js +0 -0
  232. /package/styles/{v2/components → components}/Button/stories/index.stories.js +0 -0
  233. /package/styles/{v2/components → components}/Card/Card.jsx +0 -0
  234. /package/styles/{v2/components → components}/Card/Card.stories.js +0 -0
  235. /package/styles/{v2/components → components}/Checkbox/Checkbox.jsx +0 -0
  236. /package/styles/{v2/components → components}/Checkbox/Checkbox.stories.js +0 -0
  237. /package/styles/{v2/components → components}/Checkbox/index.js +0 -0
  238. /package/styles/{v2/components → components}/Checkbox/styles/index.js +0 -0
  239. /package/styles/{v2/components → components}/Container/Container.jsx +0 -0
  240. /package/styles/{v2/components → components}/Container/Container.stories.js +0 -0
  241. /package/styles/{v2/components → components}/Container/Container.styles.js +0 -0
  242. /package/styles/{v2/components → components}/Divider/Divider.jsx +0 -0
  243. /package/styles/{v2/components → components}/Divider/Divider.stories.js +0 -0
  244. /package/styles/{v2/components → components}/Divider/Divider.styles.js +0 -0
  245. /package/styles/{v2/components → components}/Grid/Grid.jsx +0 -0
  246. /package/styles/{v2/components → components}/Grid/Grid.styles.js +0 -0
  247. /package/styles/{v2/components → components}/Grid/GridItem.jsx +0 -0
  248. /package/styles/{v2/components → components}/Grid/GridItem.styles.js +0 -0
  249. /package/styles/{v2/components → components}/Grid/index.js +0 -0
  250. /package/styles/{v2/components → components}/Heading/Heading.jsx +0 -0
  251. /package/styles/{v2/components → components}/Heading/Heading.stories.js +0 -0
  252. /package/styles/{v2/components → components}/Icon/Icon.jsx +0 -0
  253. /package/styles/{v2/components → components}/Icon/Icon.stories.js +0 -0
  254. /package/styles/{v2/components → components}/Image/Image.spec.js +0 -0
  255. /package/styles/{v2/components → components}/Image/Image.stories.js +0 -0
  256. /package/styles/{v2/components → components}/Input/Input.jsx +0 -0
  257. /package/styles/{v2/components → components}/Input/Input.stories.js +0 -0
  258. /package/styles/{v2/components → components}/Input/index.js +0 -0
  259. /package/styles/{v2/components → components}/Input/styles/index.js +0 -0
  260. /package/styles/{v2/components → components}/Link/Link.jsx +0 -0
  261. /package/styles/{v2/components → components}/Link/Link.styles.js +0 -0
  262. /package/styles/{v2/components → components}/List/List.jsx +0 -0
  263. /package/styles/{v2/components → components}/List/index.js +0 -0
  264. /package/styles/{v2/components → components}/List/styles/index.js +0 -0
  265. /package/styles/{v2/components → components}/List/styles/item.styles.js +0 -0
  266. /package/styles/{v2/components → components}/Loader/Loader.jsx +0 -0
  267. /package/styles/{v2/components → components}/Loader/Loader.stories.js +0 -0
  268. /package/styles/{v2/components → components}/Modal/index.js +0 -0
  269. /package/styles/{v2/components → components}/Modal/styles/body.js +0 -0
  270. /package/styles/{v2/components → components}/Modal/styles/closeButton.js +0 -0
  271. /package/styles/{v2/components → components}/Modal/styles/dialog.js +0 -0
  272. /package/styles/{v2/components → components}/Modal/styles/dialogContainer.js +0 -0
  273. /package/styles/{v2/components → components}/Modal/styles/footer.js +0 -0
  274. /package/styles/{v2/components → components}/Modal/styles/header.js +0 -0
  275. /package/styles/{v2/components → components}/Modal/styles/index.js +0 -0
  276. /package/styles/{v2/components → components}/Modal/styles/overlay.js +0 -0
  277. /package/styles/{v2/components → components}/Popover/Popover.jsx +0 -0
  278. /package/styles/{v2/components → components}/Popover/PopoverArrow.jsx +0 -0
  279. /package/styles/{v2/components → components}/Popover/PopoverCloseButton.jsx +0 -0
  280. /package/styles/{v2/components → components}/Popover/PopoverContent.jsx +0 -0
  281. /package/styles/{v2/components → components}/Popover/index.js +0 -0
  282. /package/styles/{v2/components → components}/Popover/styles/popover-arrow.js +0 -0
  283. /package/styles/{v2/components → components}/Popover/styles/popover-body.js +0 -0
  284. /package/styles/{v2/components → components}/Popover/styles/popover-close-button.js +0 -0
  285. /package/styles/{v2/components → components}/Popover/styles/popover-header.js +0 -0
  286. /package/styles/{v2/components → components}/Radio/Radio.jsx +0 -0
  287. /package/styles/{v2/components → components}/Radio/Radio.stories.js +0 -0
  288. /package/styles/{v2/components → components}/Radio/RadioGroup.jsx +0 -0
  289. /package/styles/{v2/components → components}/Radio/index.js +0 -0
  290. /package/styles/{v2/components → components}/Radio/styles/index.js +0 -0
  291. /package/styles/{v2/components → components}/Select/Select.jsx +0 -0
  292. /package/styles/{v2/components → components}/Select/Select.stories.js +0 -0
  293. /package/styles/{v2/components → components}/Select/index.js +0 -0
  294. /package/styles/{v2/components → components}/Select/styles/index.js +0 -0
  295. /package/styles/{v2/components → components}/Skeleton/Skeleton.stories.jsx +0 -0
  296. /package/styles/{v2/components → components}/Skeleton/Skeleton.styles.js +0 -0
  297. /package/styles/{v2/components → components}/Spinner/Spinner.jsx +0 -0
  298. /package/styles/{v2/components → components}/Spinner/Spinner.styles.js +0 -0
  299. /package/styles/{v2/components → components}/Switch/Switch.jsx +0 -0
  300. /package/styles/{v2/components → components}/Switch/Switch.stories.js +0 -0
  301. /package/styles/{v2/components → components}/Switch/index.js +0 -0
  302. /package/styles/{v2/components → components}/Switch/styles/index.js +0 -0
  303. /package/styles/{v2/components → components}/Table/Table.jsx +0 -0
  304. /package/styles/{v2/components → components}/Table/Table.stories.js +0 -0
  305. /package/styles/{v2/components → components}/Table/index.js +0 -0
  306. /package/styles/{v2/components → components}/Tabs/Tabs.stories.js +0 -0
  307. /package/styles/{v2/components → components}/Tabs/index.js +0 -0
  308. /package/styles/{v2/components → components}/Tabs/styles/index.js +0 -0
  309. /package/styles/{v2/components → components}/Text/Text.jsx +0 -0
  310. /package/styles/{v2/components → components}/Text/Text.stories.js +0 -0
  311. /package/styles/{v2/components → components}/Text/options.js +0 -0
  312. /package/styles/{v2/theme → theme}/base/breakpoints.js +0 -0
  313. /package/styles/{v2/theme → theme}/base/colors.js +0 -0
  314. /package/styles/{v2/theme → theme}/base/index.js +0 -0
  315. /package/styles/{v2/theme → theme}/base/sizes.js +0 -0
  316. /package/styles/{v2/theme → theme}/base/typography.js +0 -0
  317. /package/styles/{v2/theme → theme}/base/zindices.js +0 -0
@@ -1,7 +0,0 @@
1
- %disable-scrolling {
2
- overflow: hidden;
3
-
4
- body {
5
- overflow: hidden;
6
- }
7
- }
@@ -1,72 +0,0 @@
1
- %form-element {
2
- .FormElement-control {
3
- position: relative;
4
- }
5
-
6
- .FormElement-item {
7
- @extend %form-element-item;
8
- @extend %control-size;
9
- height: 38px;
10
- line-height: 38px;
11
- }
12
-
13
- .FormElement-help-text {
14
- font-size: 12px;
15
- margin-top: 8px;
16
- color: $color-cement;
17
- }
18
-
19
- &.FormElement-contains-error {
20
- @extend %form-element-error;
21
- }
22
- }
23
-
24
- %form-element-item {
25
- @include font-family;
26
- display: block;
27
- width: 100%;
28
- background-color: $color-white;
29
- background-image: none;
30
- border: 1px solid $color-dashboard;
31
- color: $color-black;
32
- font-weight: $font-weight-normal;
33
- outline: none;
34
- position: relative;
35
- appearance: none;
36
-
37
- &:focus {
38
- border-color: $color-go;
39
- }
40
-
41
- &:disabled {
42
- cursor: not-allowed;
43
- color: $color-cement;
44
- background-color: $color-pavement;
45
- opacity: 1; // Mobile Safari sets opacity to 0.4... Why?
46
- }
47
-
48
- &:invalid {
49
- box-shadow: none;
50
- }
51
-
52
- &::placeholder {
53
- color: $color-dashboard;
54
- }
55
- }
56
-
57
- /* stylelint-disable declaration-no-important */
58
- %form-element-error {
59
- .Label {
60
- color: $color-stop !important;
61
- }
62
-
63
- .FormElement-item {
64
- color: $color-stop !important;
65
- border-color: $color-stop !important;
66
-
67
- &::placeholder {
68
- color: $color-stop !important;
69
- }
70
- }
71
- }
72
- /* stylelint-enable declaration-no-important */
package/styles/index.js DELETED
@@ -1,50 +0,0 @@
1
- export {Radio, RadioGroup} from './Radio';
2
- export {default as Alert} from './Alert/Alert';
3
- export {default as Badge} from './Badge/Badge';
4
- export {default as Chart} from './Chart/Chart';
5
- export {default as Label} from './Label/Label';
6
- export {default as Flyout} from './Flyout/Flyout';
7
- export {default as Portal} from './Portal/Portal';
8
- export {default as Sprite} from './Sprite/Sprite';
9
- export {default as Tooltip} from './Tooltip/Tooltip';
10
- export {Select, SelectItemPropTypes} from './Select';
11
- export {default as Checkbox} from './Checkbox/Checkbox';
12
- export {default as TextArea} from './TextArea/TextArea';
13
- export {TextInput, TextInputPropTypes} from './TextInput';
14
- export {default as PulseLoader} from './PulseLoader/PulseLoader';
15
- export {default as RenderInBody} from './RenderInBody/RenderInBody';
16
- export {Tab, TabContent, TabNavigation, TabPanel, Tabs} from './Tabs';
17
- export {default as ErrorBoundary} from './ErrorBoundary/ErrorBoundary';
18
- export {Form, FormElementError, FormGroup, FormGroupError} from './Form';
19
- export {default as HorizontalRule} from './HorizontalRule/HorizontalRule';
20
- export {NotificationContainer, NotificationPropTypes} from './Notification';
21
- export {default as PasswordControl} from './PasswordControl/PasswordControl';
22
- export {default as AutoSuggestInput} from './AutoSuggestInput/AutoSuggestInput';
23
-
24
- export {
25
- TimePicker,
26
- DatePicker,
27
- DateTimePicker,
28
- DatePickerCalendar,
29
- DateTimeRangePicker,
30
- DatePickerCalendarWithRange,
31
- } from './DateTime';
32
-
33
- export {
34
- PoweredByGoogle,
35
- GooglePlacesSearchInput,
36
- } from './GooglePlacesSearchInput';
37
-
38
- export {
39
- Table,
40
- TableControls,
41
- TableSortType,
42
- TableCellPropTypes,
43
- TableHeadingPropTypes,
44
- } from './v1/components/Table';
45
- export {default as Panel} from './v1/components/Panel/Panel';
46
- export {default as Button} from './v1/components/Button/Button';
47
- export {default as TextButton} from './v1/components/TextButton/TextButton';
48
- export {default as Image} from './v1/components/Image/Image';
49
- export {default as Loader} from './v1/components/Loader/Loader';
50
- export {Modal, ModalContent, ModalFooter} from './v1/components/Modal';
@@ -1,48 +0,0 @@
1
- import React from 'react';
2
- import classNames from 'classnames';
3
- import ButtonProps from './button-props';
4
-
5
- import deprecate from 'v1/utils/deprecate';
6
-
7
- deprecate({
8
- name: 'Button',
9
- changes: [
10
- 'iconPosition has been removed, iconLeft and iconRight have replaced it.',
11
- 'color is now variant and takes in new values.',
12
- 'block was removed, if full width is needed, use isFullWidth',
13
- 'loading was replaced by isLoading',
14
- ],
15
- });
16
-
17
- const Button = ({
18
- className,
19
- color,
20
- iconPosition,
21
- block,
22
- loading,
23
- asAnchor,
24
- type,
25
- ...attrs
26
- }) => {
27
- const classes = classNames(
28
- 'Button',
29
- {[`Button-${color}`]: color},
30
- {'Button-block': block},
31
- {'Button-loading': loading},
32
- {[`Button-with-icon-${iconPosition}`]: iconPosition},
33
- className
34
- );
35
- const {finalType, Element} = asAnchor
36
- ? {Element: 'a'}
37
- : {Element: 'button', finalType: type};
38
-
39
- return <Element className={classes} type={finalType} {...attrs} />;
40
- };
41
-
42
- Button.propTypes = ButtonProps;
43
-
44
- Button.defaultProps = {
45
- type: 'button',
46
- };
47
-
48
- export default Button;
@@ -1,76 +0,0 @@
1
- import React from 'react';
2
- import userEvent from '@testing-library/user-event';
3
- import {render, screen} from '@testing-library/react';
4
- import {build, fake} from '@jackfranklin/test-data-bot';
5
-
6
- import Button from './Button';
7
-
8
- const buttonProps = build('Button', {
9
- fields: {
10
- href: null,
11
- asAnchor: false,
12
- disabled: false,
13
- color: 'primary',
14
- onClick: jest.fn(),
15
- children: fake(f => f.random.words(2)),
16
- },
17
- });
18
-
19
- const setup = props => render(<Button {...props} />);
20
-
21
- describe('<Button />', () => {
22
- it('renders properly', () => {
23
- const props = buttonProps();
24
-
25
- setup(props);
26
-
27
- const {getByRole, getByText} = screen;
28
-
29
- expect(getByRole('button')).toBeInTheDocument();
30
- expect(getByText(props.children)).toBeInTheDocument();
31
- });
32
-
33
- it('can be clicked by default', () => {
34
- const props = buttonProps();
35
-
36
- setup(props);
37
-
38
- const {getByRole} = screen;
39
-
40
- userEvent.click(getByRole('button'));
41
-
42
- expect(props.onClick).toHaveBeenCalled();
43
- });
44
-
45
- it('can be disabled', () => {
46
- const props = buttonProps({
47
- overrides: {
48
- disabled: true,
49
- },
50
- });
51
-
52
- setup(props);
53
-
54
- const {getByRole} = screen;
55
-
56
- userEvent.click(getByRole('button'));
57
-
58
- expect(props.onClick).not.toHaveBeenCalled();
59
- });
60
-
61
- it('can be an anchor tag', () => {
62
- const props = buttonProps({
63
- overrides: {
64
- href: '#',
65
- asAnchor: true,
66
- },
67
- });
68
-
69
- setup(props);
70
-
71
- const {queryByRole, getByRole} = screen;
72
-
73
- expect(queryByRole('button')).toBeNull();
74
- expect(getByRole('link')).toBeInTheDocument();
75
- });
76
- });
@@ -1,178 +0,0 @@
1
- @keyframes Button-loading-rotate {
2
- 0% {
3
- transform: rotate(0deg);
4
- }
5
-
6
- 100% {
7
- transform: rotate(360deg);
8
- }
9
- }
10
-
11
- .Button {
12
- @extend %control-size;
13
- @include font-family;
14
- padding: 10px 30px;
15
- text-align: center;
16
- font-weight: $font-weight-semi-bold;
17
- white-space: nowrap;
18
- cursor: pointer;
19
- display: inline-block;
20
- user-select: none;
21
- appearance: none;
22
- background: none;
23
- border: none;
24
- margin: 0;
25
- position: relative;
26
- outline: none;
27
- transition: background-color $animation, color $animation, border $animation;
28
-
29
- &:focus,
30
- &:active {
31
- outline: none;
32
- }
33
-
34
- &:disabled {
35
- cursor: not-allowed;
36
- }
37
-
38
- &::before {
39
- opacity: 0;
40
- transition: opacity 0.25s;
41
- }
42
-
43
- &::after {
44
- content: "";
45
- display: inline-block;
46
- width: 0;
47
- transition-property: width;
48
- line-height: 1;
49
- }
50
-
51
- .Icon {
52
- position: relative;
53
- margin: -3px 0 0;
54
- width: 12px;
55
- height: 12px;
56
- }
57
- }
58
-
59
- .Button-block {
60
- display: block;
61
- width: 100%;
62
- }
63
-
64
- .Button-with-icon-left {
65
- .Icon {
66
- margin-right: 5px;
67
- }
68
- }
69
-
70
- .Button-with-icon-right {
71
- .Icon {
72
- margin-left: 5px;
73
- }
74
- }
75
-
76
- .Button-primary {
77
- background-color: $color-shift;
78
- color: $color-white;
79
- border: 1px solid $color-shift;
80
-
81
- &:not([disabled]) {
82
- &:hover {
83
- background-color: $color-shift-hover;
84
- border-color: $color-shift-hover;
85
- color: $color-white;
86
- }
87
- }
88
-
89
- &:disabled {
90
- background-color: $color-dashboard;
91
- color: $color-white;
92
- border: 1px solid $color-dashboard;
93
- }
94
- }
95
-
96
- .Button-secondary {
97
- background-color: $color-white;
98
- color: $color-shift;
99
- border: 1px solid $color-dashboard;
100
-
101
- &:not([disabled]) {
102
- &:hover {
103
- border-color: $color-shift;
104
- }
105
- }
106
-
107
- &:disabled {
108
- background-color: $color-pavement;
109
- color: $color-cement;
110
- border: 1px solid $color-dashboard;
111
- }
112
- }
113
-
114
- .Button-tertiary {
115
- background-color: $color-white;
116
- color: $color-cement;
117
- border: 1px solid $color-dashboard;
118
-
119
- &:not([disabled]) {
120
- &:hover {
121
- border-color: $color-shift;
122
- }
123
- }
124
-
125
- &:disabled {
126
- background-color: $color-pavement;
127
- color: $color-cement;
128
- border: 1px solid $color-dashboard;
129
- }
130
- }
131
-
132
- .Button-loading {
133
- position: relative;
134
- pointer-events: none;
135
- cursor: not-allowed;
136
-
137
- &::before {
138
- content: "";
139
- position: absolute;
140
- right: 0.5em;
141
- top: 0;
142
- bottom: 0;
143
- margin: auto;
144
- width: 0.5em;
145
- height: 0.5em;
146
- border: 2px solid;
147
- border-left-color: transparent;
148
- border-radius: 50%;
149
- opacity: 1;
150
- animation-duration: 0.5s;
151
- animation-iteration-count: infinite;
152
- animation-name: Button-loading-rotate;
153
- animation-timing-function: linear;
154
- }
155
-
156
- &:not([disabled]) {
157
- background-color: $color-pavement;
158
- color: $color-cement;
159
- border: 1px solid $color-dashboard;
160
- opacity: 0.8;
161
- }
162
-
163
- &.Button {
164
- &::before {
165
- border: 2px solid;
166
- border-left-color: transparent;
167
- right: 1.5em;
168
- width: 1em;
169
- height: 1em;
170
- opacity: 1;
171
- }
172
-
173
- &::after {
174
- transition-delay: 0;
175
- width: 1em;
176
- }
177
- }
178
- }
@@ -1,30 +0,0 @@
1
- import PropTypes from 'prop-types';
2
-
3
- const props = {
4
- /** Additional class(es) to add to the component. */
5
- className: PropTypes.string,
6
- /** The markup node to insert into the button. */
7
- children: PropTypes.node,
8
- /** The type of button that is rendered. */
9
- type: PropTypes.oneOf(['button', 'submit', 'reset']),
10
- /** The color of the button. */
11
- color: PropTypes.oneOf(['primary', 'secondary', 'tertiary']),
12
- /** If an icon is provided, whether to add the margin to the icon on the left or right side. */
13
- iconPosition: PropTypes.oneOf(['left', 'right']),
14
- /** Whether the button should display as a block level element. */
15
- block: PropTypes.bool,
16
- /** Whether the button is disabled or not. */
17
- disabled: PropTypes.bool,
18
- /** Whether to show a loading animation inside of the button. */
19
- loading: PropTypes.bool,
20
- /**
21
- * The handler to execute when the button is clicked.
22
- *
23
- * @param {SyntheticEvent} evt - The React `SyntheticEvent`.
24
- */
25
- onClick: PropTypes.func,
26
- /** Determines if the underlying HTML element should be an <a> or <button>. */
27
- asAnchor: PropTypes.bool,
28
- };
29
-
30
- export default props;
@@ -1,20 +0,0 @@
1
- import React from 'react';
2
-
3
- import IconCheck from '@spothero/icons/check';
4
-
5
- import Component from '../Button';
6
- import ButtonProps from '../button-props';
7
-
8
- const ButtonTemplate = ({children, iconPosition, ...props}) => {
9
- return (
10
- <Component {...props} iconPosition={iconPosition}>
11
- {iconPosition === 'left' && <IconCheck />}
12
- {children}
13
- {iconPosition === 'right' && <IconCheck />}
14
- </Component>
15
- );
16
- };
17
-
18
- ButtonTemplate.propTypes = ButtonProps;
19
-
20
- export default ButtonTemplate;
@@ -1,92 +0,0 @@
1
- import ButtonTemplate from './button';
2
- import OverviewTemplate from './overview';
3
-
4
- import Button from '../Button';
5
- import disableArgs from 'storybook/utils/disable-args';
6
-
7
- import {createSelectControl} from 'storybook/utils/create-control';
8
-
9
- const iconPositionControl = createSelectControl('iconPosition', [
10
- 'left',
11
- 'right',
12
- ]);
13
-
14
- export default {
15
- title: 'v1/Button',
16
- component: {Button},
17
- parameters: {
18
- importBy: 'Button',
19
- removeBaseHtmlClass: true,
20
- },
21
- argTypes: {
22
- ...createSelectControl('color', ['primary', 'secondary', 'tertiary']),
23
- ...disableArgs(['children']),
24
- },
25
- };
26
-
27
- export const Overview = OverviewTemplate.bind({});
28
- Overview.argTypes = {
29
- ...iconPositionControl,
30
- ...disableArgs(['children', 'color']),
31
- };
32
- Overview.args = {
33
- iconPosition: 'left',
34
- };
35
-
36
- export const Color = ButtonTemplate.bind({});
37
- Color.args = {
38
- children: 'Primary',
39
- color: 'primary',
40
- };
41
-
42
- export const Disabled = ButtonTemplate.bind({});
43
- Disabled.args = {
44
- disabled: true,
45
- children: 'Primary',
46
- color: 'primary',
47
- };
48
-
49
- export const Loading = ButtonTemplate.bind({});
50
- Loading.args = {
51
- loading: true,
52
- children: 'Primary',
53
- color: 'primary',
54
- };
55
-
56
- export const IconPosition = ButtonTemplate.bind({});
57
- IconPosition.argTypes = iconPositionControl;
58
- IconPosition.args = {
59
- iconPosition: 'left',
60
- children: 'Primary',
61
- color: 'primary',
62
- };
63
-
64
- export const Block = ButtonTemplate.bind({});
65
- Block.args = {
66
- block: true,
67
- children: 'Primary',
68
- color: 'primary',
69
- };
70
-
71
- export const AsAnchor = ButtonTemplate.bind({});
72
- AsAnchor.args = {
73
- asAnchor: true,
74
- children: 'Primary',
75
- color: 'primary',
76
- };
77
-
78
- export const Type = ButtonTemplate.bind({});
79
-
80
- Type.argTypes = {
81
- type: {
82
- control: {
83
- type: 'select',
84
- options: ['button', 'reset', 'submit'],
85
- },
86
- },
87
- };
88
- Type.args = {
89
- type: 'button',
90
- children: 'Primary',
91
- color: 'primary',
92
- };
@@ -1,87 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import capitalize from 'lodash/capitalize';
4
- import {Box, ButtonGroup} from '@chakra-ui/react';
5
-
6
- import IconCheck from '@spothero/icons/check';
7
-
8
- import Component from '../Button';
9
- import Text from 'v2/components/Text/Text';
10
- import sharedStyleProps from 'storybook/utils/shared-style-props';
11
-
12
- const variationsArray = ({color, iconPosition}) => [
13
- {
14
- color,
15
- children: color,
16
- },
17
- {
18
- color,
19
- children: `${color} disabled`,
20
- disabled: true,
21
- },
22
- {
23
- color,
24
- children: `${color} loading`,
25
- loading: true,
26
- },
27
- {
28
- color,
29
- iconPosition,
30
- children: (
31
- <>
32
- {iconPosition === 'left' && <IconCheck width="1rem" />}
33
-
34
- {`Icon ${iconPosition}`}
35
-
36
- {iconPosition === 'right' && <IconCheck width="1rem" />}
37
- </>
38
- ),
39
- },
40
- {
41
- color,
42
- children: `${color} asAnchor`,
43
- asAnchor: true,
44
- href: '#',
45
- },
46
- ];
47
-
48
- const styles = {
49
- heading: {
50
- ...sharedStyleProps.headingStyles,
51
- },
52
- stateContainer: {
53
- display: 'flex',
54
- flexDirection: 'column',
55
- marginBottom: 4,
56
- },
57
- buttonGroup: {
58
- display: 'flex',
59
- flexWrap: 'wrap',
60
- alignContent: 'space-between',
61
- },
62
- };
63
-
64
- const OverviewTemplate = ({iconPosition}) => (
65
- <Box>
66
- {['primary', 'secondary', 'tertiary'].map((color, index, arr) => (
67
- <Box key={index} mb={4}>
68
- <Text mb="2">{capitalize(color)}:</Text>
69
- <ButtonGroup {...styles.buttonGroup}>
70
- {variationsArray({
71
- color,
72
- iconPosition,
73
- }).map((props, key) => (
74
- <Component key={key} {...props} />
75
- ))}
76
- </ButtonGroup>
77
- </Box>
78
- ))}
79
- </Box>
80
- );
81
-
82
- OverviewTemplate.propTypes = {
83
- loadingText: PropTypes.string,
84
- iconPosition: PropTypes.string,
85
- };
86
-
87
- export default OverviewTemplate;
@@ -1,31 +0,0 @@
1
- import React from 'react';
2
- import Button from 'v1/components/Button/Button';
3
-
4
- export default {
5
- component: Button,
6
- title: 'v1/Button/Types',
7
- };
8
-
9
- export const Default = () => {
10
- return (
11
- <Button color="primary" type="button">
12
- Type Button
13
- </Button>
14
- );
15
- };
16
-
17
- export const Reset = () => {
18
- return (
19
- <Button color="primary" type="reset">
20
- Type Reset
21
- </Button>
22
- );
23
- };
24
-
25
- export const Submit = () => {
26
- return (
27
- <Button color="primary" type="submit">
28
- Type Submit
29
- </Button>
30
- );
31
- };