@spothero/ui 15.10.9 → 16.0.0-beta.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 (317) hide show
  1. package/.eslintignore +1 -1
  2. package/babel.config.js +1 -0
  3. package/dex.config.js +1 -1
  4. package/jest.config.json +4 -2
  5. package/package.json +11 -26
  6. package/v2/index.js +1 -1
  7. package/v2/index.js.map +1 -1
  8. package/backlog/Alert/Alert.js +0 -37
  9. package/backlog/AutoSuggestInput/AutoSuggestInput.js +0 -474
  10. package/backlog/AutoSuggestInput/AutoSuggestItem.js +0 -99
  11. package/backlog/AutoSuggestInput/AutoSuggestList.js +0 -126
  12. package/backlog/Badge/Badge.js +0 -28
  13. package/backlog/Chart/Chart.js +0 -211
  14. package/backlog/Checkbox/Checkbox.js +0 -167
  15. package/backlog/DateTime/DatePicker.js +0 -279
  16. package/backlog/DateTime/DatePickerCalendar.js +0 -199
  17. package/backlog/DateTime/DatePickerCalendarNavigation.js +0 -102
  18. package/backlog/DateTime/DatePickerCalendarWithRange.js +0 -241
  19. package/backlog/DateTime/DateTimePicker.js +0 -216
  20. package/backlog/DateTime/DateTimeRangePicker.js +0 -530
  21. package/backlog/DateTime/TimePicker.js +0 -180
  22. package/backlog/DateTime/date-time-assertions.js +0 -66
  23. package/backlog/DateTime/index.js +0 -55
  24. package/backlog/ErrorBoundary/ErrorBoundary.js +0 -125
  25. package/backlog/Flyout/Flyout.js +0 -198
  26. package/backlog/Form/Form.js +0 -193
  27. package/backlog/Form/FormElementError.js +0 -24
  28. package/backlog/Form/FormGroup.js +0 -30
  29. package/backlog/Form/FormGroupError.js +0 -28
  30. package/backlog/Form/index.js +0 -39
  31. package/backlog/GooglePlacesSearchInput/GooglePlacesSearchInput.js +0 -253
  32. package/backlog/GooglePlacesSearchInput/PoweredByGoogle.js +0 -38
  33. package/backlog/GooglePlacesSearchInput/index.js +0 -23
  34. package/backlog/HorizontalRule/HorizontalRule.js +0 -30
  35. package/backlog/Label/Label.js +0 -31
  36. package/backlog/Notification/Notification.js +0 -178
  37. package/backlog/Notification/NotificationContainer.js +0 -131
  38. package/backlog/Notification/NotificationPropTypes.js +0 -37
  39. package/backlog/Notification/index.js +0 -23
  40. package/backlog/PasswordControl/PasswordControl.js +0 -201
  41. package/backlog/Portal/Portal.js +0 -110
  42. package/backlog/PulseLoader/PulseLoader.js +0 -62
  43. package/backlog/Radio/Radio.js +0 -135
  44. package/backlog/Radio/RadioGroup.js +0 -123
  45. package/backlog/Radio/index.js +0 -23
  46. package/backlog/RenderInBody/RenderInBody.js +0 -103
  47. package/backlog/Select/Select.js +0 -275
  48. package/backlog/Select/SelectItemPropTypes.js +0 -32
  49. package/backlog/Select/index.js +0 -23
  50. package/backlog/SelectControlled/SelectControlled.js +0 -270
  51. package/backlog/SelectControlled/index.js +0 -15
  52. package/backlog/Sprite/Sprite.js +0 -24
  53. package/backlog/Tabs/Tab.js +0 -94
  54. package/backlog/Tabs/TabContent.js +0 -56
  55. package/backlog/Tabs/TabNavigation.js +0 -108
  56. package/backlog/Tabs/TabPanel.js +0 -29
  57. package/backlog/Tabs/Tabs.js +0 -126
  58. package/backlog/Tabs/index.js +0 -47
  59. package/backlog/TextArea/TextArea.js +0 -155
  60. package/backlog/TextInput/TextInput.js +0 -230
  61. package/backlog/TextInput/TextInputPropTypes.js +0 -114
  62. package/backlog/TextInput/index.js +0 -23
  63. package/backlog/Tooltip/Tooltip.js +0 -249
  64. package/backlog/index.js +0 -393
  65. package/backlog/v1/components/Button/Button.js +0 -64
  66. package/backlog/v1/components/Button/button-props.js +0 -48
  67. package/backlog/v1/components/Image/Image.js +0 -193
  68. package/backlog/v1/components/Loader/Loader.js +0 -51
  69. package/backlog/v1/components/Modal/Modal.js +0 -325
  70. package/backlog/v1/components/Modal/ModalContent.js +0 -154
  71. package/backlog/v1/components/Modal/ModalFooter.js +0 -89
  72. package/backlog/v1/components/Modal/index.js +0 -31
  73. package/backlog/v1/components/Panel/Panel.js +0 -209
  74. package/backlog/v1/components/Table/Table.js +0 -336
  75. package/backlog/v1/components/Table/TableCell.js +0 -28
  76. package/backlog/v1/components/Table/TableCellPropTypes.js +0 -22
  77. package/backlog/v1/components/Table/TableControls.js +0 -56
  78. package/backlog/v1/components/Table/TableFooter.js +0 -63
  79. package/backlog/v1/components/Table/TableHeading.js +0 -126
  80. package/backlog/v1/components/Table/TableHeadingPropTypes.js +0 -35
  81. package/backlog/v1/components/Table/TableSortSelector.js +0 -125
  82. package/backlog/v1/components/Table/TableSortType.js +0 -11
  83. package/backlog/v1/components/Table/index.js +0 -47
  84. package/backlog/v1/components/TextButton/TextButton.js +0 -74
  85. package/backlog/v1/components/index.js +0 -75
  86. package/backlog/v1/utils/deprecate.js +0 -61
  87. package/styles/Alert/_Alert.scss +0 -51
  88. package/styles/AutoSuggestInput/_AutoSuggestInput.scss +0 -116
  89. package/styles/Badge/_Badge.scss +0 -33
  90. package/styles/Chart/_Chart.scss +0 -105
  91. package/styles/Chart/_chartist-settings.scss +0 -131
  92. package/styles/Chart/_chartist.scss +0 -295
  93. package/styles/Checkbox/_Checkbox.scss +0 -173
  94. package/styles/DateTime/_DatePicker.scss +0 -61
  95. package/styles/DateTime/_DatePickerCalendar.scss +0 -159
  96. package/styles/DateTime/_DateTime.scss +0 -4
  97. package/styles/DateTime/_DateTimePicker.scss +0 -46
  98. package/styles/DateTime/_TimePicker.scss +0 -30
  99. package/styles/ErrorBoundary/_ErrorBoundary.scss +0 -18
  100. package/styles/Flyout/_Flyout.scss +0 -73
  101. package/styles/Form/_Form.scss +0 -53
  102. package/styles/GooglePlacesSearchInput/_GooglePlacesSearchInput.scss +0 -3
  103. package/styles/GooglePlacesSearchInput/_PoweredByGoogle.scss +0 -21
  104. package/styles/HorizontalRule/_HorizontalRule.scss +0 -48
  105. package/styles/Label/_Label.scss +0 -6
  106. package/styles/Notification/_Notification.scss +0 -113
  107. package/styles/PasswordControl/_PasswordControl.scss +0 -86
  108. package/styles/PulseLoader/_PulseLoader.scss +0 -60
  109. package/styles/Radio/_Radio.scss +0 -93
  110. package/styles/Select/_Select.scss +0 -94
  111. package/styles/Tabs/_Tabs.scss +0 -57
  112. package/styles/TextArea/_TextArea.scss +0 -26
  113. package/styles/TextInput/_TextInput.scss +0 -43
  114. package/styles/Tooltip/_Tooltip.scss +0 -108
  115. package/styles/_index.scss +0 -34
  116. package/styles/common/sass/_control-sizing.scss +0 -5
  117. package/styles/common/sass/_disable-scrolling.scss +0 -7
  118. package/styles/common/sass/_forms.scss +0 -72
  119. package/styles/index.js +0 -50
  120. package/styles/v1/components/Button/Button.jsx +0 -48
  121. package/styles/v1/components/Button/Button.spec.js +0 -76
  122. package/styles/v1/components/Button/_Button.scss +0 -178
  123. package/styles/v1/components/Button/button-props.js +0 -30
  124. package/styles/v1/components/Button/stories/button.js +0 -20
  125. package/styles/v1/components/Button/stories/index.stories.js +0 -92
  126. package/styles/v1/components/Button/stories/overview.js +0 -87
  127. package/styles/v1/components/Button/stories/types.js +0 -31
  128. package/styles/v1/components/Image/Image.jsx +0 -175
  129. package/styles/v1/components/Image/Image.spec.js +0 -113
  130. package/styles/v1/components/Image/_Image.scss +0 -24
  131. package/styles/v1/components/Image/stories/Cloudinary.stories.js +0 -39
  132. package/styles/v1/components/Image/stories/Display.stories.js +0 -92
  133. package/styles/v1/components/Loader/Loader.jsx +0 -54
  134. package/styles/v1/components/Loader/Loader.spec.js +0 -67
  135. package/styles/v1/components/Loader/_Loader.scss +0 -18
  136. package/styles/v1/components/Loader/stories/Display.stories.js +0 -55
  137. package/styles/v1/components/Modal/Modal.jsx +0 -315
  138. package/styles/v1/components/Modal/Modal.spec.js +0 -293
  139. package/styles/v1/components/Modal/ModalContent.jsx +0 -126
  140. package/styles/v1/components/Modal/ModalFooter.jsx +0 -53
  141. package/styles/v1/components/Modal/_Modal.scss +0 -262
  142. package/styles/v1/components/Modal/index.js +0 -3
  143. package/styles/v1/components/Modal/stories/Content.stories.js +0 -314
  144. package/styles/v1/components/Modal/stories/Display.stories.js +0 -208
  145. package/styles/v1/components/Modal/stories/Methods.stories.js +0 -44
  146. package/styles/v1/components/Modal/stories/Width.stories.js +0 -82
  147. package/styles/v1/components/Modal/stories/helpers/ReduxConsumer.jsx +0 -21
  148. package/styles/v1/components/Panel/Panel.jsx +0 -202
  149. package/styles/v1/components/Panel/Panel.spec.js +0 -196
  150. package/styles/v1/components/Panel/_Panel.scss +0 -55
  151. package/styles/v1/components/Panel/stories/Display.stories.js +0 -82
  152. package/styles/v1/components/Panel/stories/Methods.stories.js +0 -76
  153. package/styles/v1/components/Table/Table.jsx +0 -367
  154. package/styles/v1/components/Table/Table.spec.js +0 -526
  155. package/styles/v1/components/Table/TableCell.jsx +0 -17
  156. package/styles/v1/components/Table/TableCellPropTypes.js +0 -10
  157. package/styles/v1/components/Table/TableControls.jsx +0 -61
  158. package/styles/v1/components/Table/TableFooter.jsx +0 -72
  159. package/styles/v1/components/Table/TableHeading.jsx +0 -58
  160. package/styles/v1/components/Table/TableHeadingPropTypes.js +0 -20
  161. package/styles/v1/components/Table/TableSortSelector.jsx +0 -63
  162. package/styles/v1/components/Table/TableSortType.js +0 -4
  163. package/styles/v1/components/Table/_Table.scss +0 -263
  164. package/styles/v1/components/Table/index.js +0 -5
  165. package/styles/v1/components/Table/stories/Display.stories.js +0 -194
  166. package/styles/v1/components/Table/stories/Methods.stories.js +0 -141
  167. package/styles/v1/components/Table/stories/helpers/TableCellEmail.jsx +0 -25
  168. package/styles/v1/components/Table/stories/helpers/TableCustomRow.jsx +0 -35
  169. package/styles/v1/components/Table/stories/helpers/TableHeadingEmail.jsx +0 -20
  170. package/styles/v1/components/Table/stories/helpers/table-data.js +0 -26
  171. package/styles/v1/components/Table/stories/helpers/table-headers.js +0 -14
  172. package/styles/v1/components/TextButton/TextButton.jsx +0 -78
  173. package/styles/v1/components/TextButton/TextButton.spec.js +0 -95
  174. package/styles/v1/components/TextButton/_TextButton.scss +0 -114
  175. package/styles/v1/components/TextButton/stories/Display.stories.js +0 -46
  176. package/styles/v1/components/index.js +0 -7
  177. package/styles/v1/utils/deprecate.js +0 -45
  178. package/styles/v2/components/Accordion/Accordion.jsx +0 -1
  179. package/styles/v2/components/Accordion/Accordion.stories.js +0 -103
  180. package/styles/v2/components/Accordion/index.js +0 -7
  181. package/styles/v2/components/Accordion/styles/button.js +0 -16
  182. package/styles/v2/components/Accordion/styles/container.js +0 -9
  183. package/styles/v2/components/Accordion/styles/index.js +0 -19
  184. package/styles/v2/components/Accordion/styles/panel.js +0 -7
  185. package/styles/v2/components/Alert/Alert.jsx +0 -121
  186. package/styles/v2/components/Alert/Alert.stories.js +0 -50
  187. package/styles/v2/components/Alert/index.js +0 -1
  188. package/styles/v2/components/Alert/styles/index.js +0 -166
  189. package/styles/v2/components/AutoSuggestSelect/AutoSuggestSelect.jsx +0 -187
  190. package/styles/v2/components/AutoSuggestSelect/index.js +0 -1
  191. package/styles/v2/components/Badge/Badge.jsx +0 -1
  192. package/styles/v2/components/Badge/Badge.stories.js +0 -32
  193. package/styles/v2/components/Badge/styles/index.js +0 -29
  194. package/styles/v2/components/Button/Button.jsx +0 -31
  195. package/styles/v2/components/Button/Button.spec.js +0 -29
  196. package/styles/v2/components/Button/Button.styles.js +0 -156
  197. package/styles/v2/components/Button/button-props.js +0 -66
  198. package/styles/v2/components/Button/index.js +0 -2
  199. package/styles/v2/components/Button/stories/button.js +0 -59
  200. package/styles/v2/components/Button/stories/index.stories.js +0 -82
  201. package/styles/v2/components/Button/stories/overview.js +0 -73
  202. package/styles/v2/components/Card/Card.jsx +0 -16
  203. package/styles/v2/components/Card/Card.stories.js +0 -33
  204. package/styles/v2/components/Checkbox/Checkbox.jsx +0 -1
  205. package/styles/v2/components/Checkbox/Checkbox.stories.js +0 -41
  206. package/styles/v2/components/Checkbox/index.js +0 -1
  207. package/styles/v2/components/Checkbox/styles/index.js +0 -31
  208. package/styles/v2/components/Container/Container.jsx +0 -10
  209. package/styles/v2/components/Container/Container.stories.js +0 -52
  210. package/styles/v2/components/Container/Container.styles.js +0 -11
  211. package/styles/v2/components/Divider/Divider.jsx +0 -31
  212. package/styles/v2/components/Divider/Divider.stories.js +0 -41
  213. package/styles/v2/components/Divider/Divider.styles.js +0 -15
  214. package/styles/v2/components/FormControl/FormControl.jsx +0 -77
  215. package/styles/v2/components/Grid/Grid.jsx +0 -25
  216. package/styles/v2/components/Grid/Grid.stories.js +0 -128
  217. package/styles/v2/components/Grid/Grid.styles.js +0 -12
  218. package/styles/v2/components/Grid/GridItem.jsx +0 -10
  219. package/styles/v2/components/Grid/GridItem.styles.js +0 -8
  220. package/styles/v2/components/Grid/index.js +0 -2
  221. package/styles/v2/components/Heading/Heading.jsx +0 -23
  222. package/styles/v2/components/Heading/Heading.stories.js +0 -40
  223. package/styles/v2/components/Heading/Heading.styles.js +0 -61
  224. package/styles/v2/components/Icon/Icon.jsx +0 -1
  225. package/styles/v2/components/Icon/Icon.stories.js +0 -38
  226. package/styles/v2/components/Image/Image.jsx +0 -97
  227. package/styles/v2/components/Image/Image.spec.js +0 -100
  228. package/styles/v2/components/Image/Image.stories.js +0 -142
  229. package/styles/v2/components/Input/Input.jsx +0 -51
  230. package/styles/v2/components/Input/Input.stories.js +0 -60
  231. package/styles/v2/components/Input/index.js +0 -1
  232. package/styles/v2/components/Input/styles/index.js +0 -49
  233. package/styles/v2/components/Link/Link.jsx +0 -1
  234. package/styles/v2/components/Link/Link.stories.js +0 -82
  235. package/styles/v2/components/Link/Link.styles.js +0 -38
  236. package/styles/v2/components/List/List.jsx +0 -57
  237. package/styles/v2/components/List/List.stories.js +0 -96
  238. package/styles/v2/components/List/index.js +0 -2
  239. package/styles/v2/components/List/styles/index.js +0 -12
  240. package/styles/v2/components/List/styles/item.styles.js +0 -5
  241. package/styles/v2/components/Loader/Loader.jsx +0 -75
  242. package/styles/v2/components/Loader/Loader.stories.js +0 -145
  243. package/styles/v2/components/Modal/Modal.jsx +0 -71
  244. package/styles/v2/components/Modal/Modal.stories.js +0 -278
  245. package/styles/v2/components/Modal/index.js +0 -1
  246. package/styles/v2/components/Modal/styles/body.js +0 -24
  247. package/styles/v2/components/Modal/styles/closeButton.js +0 -17
  248. package/styles/v2/components/Modal/styles/dialog.js +0 -10
  249. package/styles/v2/components/Modal/styles/dialogContainer.js +0 -10
  250. package/styles/v2/components/Modal/styles/footer.js +0 -5
  251. package/styles/v2/components/Modal/styles/header.js +0 -7
  252. package/styles/v2/components/Modal/styles/index.js +0 -47
  253. package/styles/v2/components/Modal/styles/overlay.js +0 -4
  254. package/styles/v2/components/Popover/Popover.jsx +0 -28
  255. package/styles/v2/components/Popover/Popover.stories.js +0 -113
  256. package/styles/v2/components/Popover/PopoverArrow.jsx +0 -10
  257. package/styles/v2/components/Popover/PopoverCloseButton.jsx +0 -10
  258. package/styles/v2/components/Popover/PopoverContent.jsx +0 -41
  259. package/styles/v2/components/Popover/index.js +0 -3
  260. package/styles/v2/components/Popover/styles/index.js +0 -21
  261. package/styles/v2/components/Popover/styles/popover-arrow.js +0 -5
  262. package/styles/v2/components/Popover/styles/popover-body.js +0 -5
  263. package/styles/v2/components/Popover/styles/popover-close-button.js +0 -17
  264. package/styles/v2/components/Popover/styles/popover-content.js +0 -16
  265. package/styles/v2/components/Popover/styles/popover-header.js +0 -6
  266. package/styles/v2/components/Popover/styles/popper.js +0 -5
  267. package/styles/v2/components/Radio/Radio.jsx +0 -50
  268. package/styles/v2/components/Radio/Radio.stories.js +0 -155
  269. package/styles/v2/components/Radio/RadioGroup.jsx +0 -69
  270. package/styles/v2/components/Radio/index.js +0 -2
  271. package/styles/v2/components/Radio/styles/index.js +0 -52
  272. package/styles/v2/components/Select/Select.jsx +0 -62
  273. package/styles/v2/components/Select/Select.stories.js +0 -60
  274. package/styles/v2/components/Select/index.js +0 -1
  275. package/styles/v2/components/Select/styles/index.js +0 -29
  276. package/styles/v2/components/Skeleton/Skeleton.stories.jsx +0 -34
  277. package/styles/v2/components/Skeleton/Skeleton.styles.js +0 -3
  278. package/styles/v2/components/Skeleton/index.js +0 -1
  279. package/styles/v2/components/Spinner/Spinner.jsx +0 -40
  280. package/styles/v2/components/Spinner/Spinner.stories.js +0 -98
  281. package/styles/v2/components/Spinner/Spinner.styles.js +0 -57
  282. package/styles/v2/components/Switch/Switch.jsx +0 -52
  283. package/styles/v2/components/Switch/Switch.stories.js +0 -88
  284. package/styles/v2/components/Switch/index.js +0 -1
  285. package/styles/v2/components/Switch/styles/index.js +0 -17
  286. package/styles/v2/components/Table/Table.jsx +0 -1
  287. package/styles/v2/components/Table/Table.stories.js +0 -90
  288. package/styles/v2/components/Table/Table.styles.js +0 -66
  289. package/styles/v2/components/Table/index.js +0 -2
  290. package/styles/v2/components/Tabs/Tabs.jsx +0 -39
  291. package/styles/v2/components/Tabs/Tabs.stories.js +0 -47
  292. package/styles/v2/components/Tabs/combineSizeWithVariant.js +0 -29
  293. package/styles/v2/components/Tabs/index.js +0 -2
  294. package/styles/v2/components/Tabs/styles/index.js +0 -40
  295. package/styles/v2/components/Text/Text.jsx +0 -35
  296. package/styles/v2/components/Text/Text.stories.js +0 -47
  297. package/styles/v2/components/Text/Text.styles.js +0 -33
  298. package/styles/v2/components/Text/combineAsWithVariant.js +0 -106
  299. package/styles/v2/components/Text/options.js +0 -92
  300. package/styles/v2/components/ThemeProvider/ThemeProvider.jsx +0 -39
  301. package/styles/v2/components/ThemeProvider/ThemeProvider.stories.js +0 -85
  302. package/styles/v2/components/index.js +0 -70
  303. package/styles/v2/components/styles.js +0 -21
  304. package/styles/v2/theme/base/breakpoints.js +0 -16
  305. package/styles/v2/theme/base/colors.js +0 -136
  306. package/styles/v2/theme/base/index.js +0 -5
  307. package/styles/v2/theme/base/sizes.js +0 -48
  308. package/styles/v2/theme/base/typography.js +0 -24
  309. package/styles/v2/theme/base/zindices.js +0 -17
  310. package/styles/v2/theme/global.js +0 -118
  311. package/styles/v2/theme/index.js +0 -27
  312. package/styles/v2/utils/Spaces.js +0 -16
  313. package/v1/assets-manifest.json +0 -5
  314. package/v1/index.html +0 -1
  315. package/v1/index.js +0 -3
  316. package/v1/index.js.LICENSE.txt +0 -23
  317. package/v1/index.js.map +0 -1
@@ -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
- };