@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.
- package/.eslintignore +1 -1
- package/babel.config.js +1 -0
- package/dex.config.js +1 -1
- package/jest.config.json +4 -2
- package/package.json +11 -26
- package/v2/index.js +1 -1
- package/v2/index.js.map +1 -1
- package/backlog/Alert/Alert.js +0 -37
- package/backlog/AutoSuggestInput/AutoSuggestInput.js +0 -474
- package/backlog/AutoSuggestInput/AutoSuggestItem.js +0 -99
- package/backlog/AutoSuggestInput/AutoSuggestList.js +0 -126
- package/backlog/Badge/Badge.js +0 -28
- package/backlog/Chart/Chart.js +0 -211
- package/backlog/Checkbox/Checkbox.js +0 -167
- package/backlog/DateTime/DatePicker.js +0 -279
- package/backlog/DateTime/DatePickerCalendar.js +0 -199
- package/backlog/DateTime/DatePickerCalendarNavigation.js +0 -102
- package/backlog/DateTime/DatePickerCalendarWithRange.js +0 -241
- package/backlog/DateTime/DateTimePicker.js +0 -216
- package/backlog/DateTime/DateTimeRangePicker.js +0 -530
- package/backlog/DateTime/TimePicker.js +0 -180
- package/backlog/DateTime/date-time-assertions.js +0 -66
- package/backlog/DateTime/index.js +0 -55
- package/backlog/ErrorBoundary/ErrorBoundary.js +0 -125
- package/backlog/Flyout/Flyout.js +0 -198
- package/backlog/Form/Form.js +0 -193
- package/backlog/Form/FormElementError.js +0 -24
- package/backlog/Form/FormGroup.js +0 -30
- package/backlog/Form/FormGroupError.js +0 -28
- package/backlog/Form/index.js +0 -39
- package/backlog/GooglePlacesSearchInput/GooglePlacesSearchInput.js +0 -253
- package/backlog/GooglePlacesSearchInput/PoweredByGoogle.js +0 -38
- package/backlog/GooglePlacesSearchInput/index.js +0 -23
- package/backlog/HorizontalRule/HorizontalRule.js +0 -30
- package/backlog/Label/Label.js +0 -31
- package/backlog/Notification/Notification.js +0 -178
- package/backlog/Notification/NotificationContainer.js +0 -131
- package/backlog/Notification/NotificationPropTypes.js +0 -37
- package/backlog/Notification/index.js +0 -23
- package/backlog/PasswordControl/PasswordControl.js +0 -201
- package/backlog/Portal/Portal.js +0 -110
- package/backlog/PulseLoader/PulseLoader.js +0 -62
- package/backlog/Radio/Radio.js +0 -135
- package/backlog/Radio/RadioGroup.js +0 -123
- package/backlog/Radio/index.js +0 -23
- package/backlog/RenderInBody/RenderInBody.js +0 -103
- package/backlog/Select/Select.js +0 -275
- package/backlog/Select/SelectItemPropTypes.js +0 -32
- package/backlog/Select/index.js +0 -23
- package/backlog/SelectControlled/SelectControlled.js +0 -270
- package/backlog/SelectControlled/index.js +0 -15
- package/backlog/Sprite/Sprite.js +0 -24
- package/backlog/Tabs/Tab.js +0 -94
- package/backlog/Tabs/TabContent.js +0 -56
- package/backlog/Tabs/TabNavigation.js +0 -108
- package/backlog/Tabs/TabPanel.js +0 -29
- package/backlog/Tabs/Tabs.js +0 -126
- package/backlog/Tabs/index.js +0 -47
- package/backlog/TextArea/TextArea.js +0 -155
- package/backlog/TextInput/TextInput.js +0 -230
- package/backlog/TextInput/TextInputPropTypes.js +0 -114
- package/backlog/TextInput/index.js +0 -23
- package/backlog/Tooltip/Tooltip.js +0 -249
- package/backlog/index.js +0 -393
- package/backlog/v1/components/Button/Button.js +0 -64
- package/backlog/v1/components/Button/button-props.js +0 -48
- package/backlog/v1/components/Image/Image.js +0 -193
- package/backlog/v1/components/Loader/Loader.js +0 -51
- package/backlog/v1/components/Modal/Modal.js +0 -325
- package/backlog/v1/components/Modal/ModalContent.js +0 -154
- package/backlog/v1/components/Modal/ModalFooter.js +0 -89
- package/backlog/v1/components/Modal/index.js +0 -31
- package/backlog/v1/components/Panel/Panel.js +0 -209
- package/backlog/v1/components/Table/Table.js +0 -336
- package/backlog/v1/components/Table/TableCell.js +0 -28
- package/backlog/v1/components/Table/TableCellPropTypes.js +0 -22
- package/backlog/v1/components/Table/TableControls.js +0 -56
- package/backlog/v1/components/Table/TableFooter.js +0 -63
- package/backlog/v1/components/Table/TableHeading.js +0 -126
- package/backlog/v1/components/Table/TableHeadingPropTypes.js +0 -35
- package/backlog/v1/components/Table/TableSortSelector.js +0 -125
- package/backlog/v1/components/Table/TableSortType.js +0 -11
- package/backlog/v1/components/Table/index.js +0 -47
- package/backlog/v1/components/TextButton/TextButton.js +0 -74
- package/backlog/v1/components/index.js +0 -75
- package/backlog/v1/utils/deprecate.js +0 -61
- package/styles/Alert/_Alert.scss +0 -51
- package/styles/AutoSuggestInput/_AutoSuggestInput.scss +0 -116
- package/styles/Badge/_Badge.scss +0 -33
- package/styles/Chart/_Chart.scss +0 -105
- package/styles/Chart/_chartist-settings.scss +0 -131
- package/styles/Chart/_chartist.scss +0 -295
- package/styles/Checkbox/_Checkbox.scss +0 -173
- package/styles/DateTime/_DatePicker.scss +0 -61
- package/styles/DateTime/_DatePickerCalendar.scss +0 -159
- package/styles/DateTime/_DateTime.scss +0 -4
- package/styles/DateTime/_DateTimePicker.scss +0 -46
- package/styles/DateTime/_TimePicker.scss +0 -30
- package/styles/ErrorBoundary/_ErrorBoundary.scss +0 -18
- package/styles/Flyout/_Flyout.scss +0 -73
- package/styles/Form/_Form.scss +0 -53
- package/styles/GooglePlacesSearchInput/_GooglePlacesSearchInput.scss +0 -3
- package/styles/GooglePlacesSearchInput/_PoweredByGoogle.scss +0 -21
- package/styles/HorizontalRule/_HorizontalRule.scss +0 -48
- package/styles/Label/_Label.scss +0 -6
- package/styles/Notification/_Notification.scss +0 -113
- package/styles/PasswordControl/_PasswordControl.scss +0 -86
- package/styles/PulseLoader/_PulseLoader.scss +0 -60
- package/styles/Radio/_Radio.scss +0 -93
- package/styles/Select/_Select.scss +0 -94
- package/styles/Tabs/_Tabs.scss +0 -57
- package/styles/TextArea/_TextArea.scss +0 -26
- package/styles/TextInput/_TextInput.scss +0 -43
- package/styles/Tooltip/_Tooltip.scss +0 -108
- package/styles/_index.scss +0 -34
- package/styles/common/sass/_control-sizing.scss +0 -5
- package/styles/common/sass/_disable-scrolling.scss +0 -7
- package/styles/common/sass/_forms.scss +0 -72
- package/styles/index.js +0 -50
- package/styles/v1/components/Button/Button.jsx +0 -48
- package/styles/v1/components/Button/Button.spec.js +0 -76
- package/styles/v1/components/Button/_Button.scss +0 -178
- package/styles/v1/components/Button/button-props.js +0 -30
- package/styles/v1/components/Button/stories/button.js +0 -20
- package/styles/v1/components/Button/stories/index.stories.js +0 -92
- package/styles/v1/components/Button/stories/overview.js +0 -87
- package/styles/v1/components/Button/stories/types.js +0 -31
- package/styles/v1/components/Image/Image.jsx +0 -175
- package/styles/v1/components/Image/Image.spec.js +0 -113
- package/styles/v1/components/Image/_Image.scss +0 -24
- package/styles/v1/components/Image/stories/Cloudinary.stories.js +0 -39
- package/styles/v1/components/Image/stories/Display.stories.js +0 -92
- package/styles/v1/components/Loader/Loader.jsx +0 -54
- package/styles/v1/components/Loader/Loader.spec.js +0 -67
- package/styles/v1/components/Loader/_Loader.scss +0 -18
- package/styles/v1/components/Loader/stories/Display.stories.js +0 -55
- package/styles/v1/components/Modal/Modal.jsx +0 -315
- package/styles/v1/components/Modal/Modal.spec.js +0 -293
- package/styles/v1/components/Modal/ModalContent.jsx +0 -126
- package/styles/v1/components/Modal/ModalFooter.jsx +0 -53
- package/styles/v1/components/Modal/_Modal.scss +0 -262
- package/styles/v1/components/Modal/index.js +0 -3
- package/styles/v1/components/Modal/stories/Content.stories.js +0 -314
- package/styles/v1/components/Modal/stories/Display.stories.js +0 -208
- package/styles/v1/components/Modal/stories/Methods.stories.js +0 -44
- package/styles/v1/components/Modal/stories/Width.stories.js +0 -82
- package/styles/v1/components/Modal/stories/helpers/ReduxConsumer.jsx +0 -21
- package/styles/v1/components/Panel/Panel.jsx +0 -202
- package/styles/v1/components/Panel/Panel.spec.js +0 -196
- package/styles/v1/components/Panel/_Panel.scss +0 -55
- package/styles/v1/components/Panel/stories/Display.stories.js +0 -82
- package/styles/v1/components/Panel/stories/Methods.stories.js +0 -76
- package/styles/v1/components/Table/Table.jsx +0 -367
- package/styles/v1/components/Table/Table.spec.js +0 -526
- package/styles/v1/components/Table/TableCell.jsx +0 -17
- package/styles/v1/components/Table/TableCellPropTypes.js +0 -10
- package/styles/v1/components/Table/TableControls.jsx +0 -61
- package/styles/v1/components/Table/TableFooter.jsx +0 -72
- package/styles/v1/components/Table/TableHeading.jsx +0 -58
- package/styles/v1/components/Table/TableHeadingPropTypes.js +0 -20
- package/styles/v1/components/Table/TableSortSelector.jsx +0 -63
- package/styles/v1/components/Table/TableSortType.js +0 -4
- package/styles/v1/components/Table/_Table.scss +0 -263
- package/styles/v1/components/Table/index.js +0 -5
- package/styles/v1/components/Table/stories/Display.stories.js +0 -194
- package/styles/v1/components/Table/stories/Methods.stories.js +0 -141
- package/styles/v1/components/Table/stories/helpers/TableCellEmail.jsx +0 -25
- package/styles/v1/components/Table/stories/helpers/TableCustomRow.jsx +0 -35
- package/styles/v1/components/Table/stories/helpers/TableHeadingEmail.jsx +0 -20
- package/styles/v1/components/Table/stories/helpers/table-data.js +0 -26
- package/styles/v1/components/Table/stories/helpers/table-headers.js +0 -14
- package/styles/v1/components/TextButton/TextButton.jsx +0 -78
- package/styles/v1/components/TextButton/TextButton.spec.js +0 -95
- package/styles/v1/components/TextButton/_TextButton.scss +0 -114
- package/styles/v1/components/TextButton/stories/Display.stories.js +0 -46
- package/styles/v1/components/index.js +0 -7
- package/styles/v1/utils/deprecate.js +0 -45
- package/styles/v2/components/Accordion/Accordion.jsx +0 -1
- package/styles/v2/components/Accordion/Accordion.stories.js +0 -103
- package/styles/v2/components/Accordion/index.js +0 -7
- package/styles/v2/components/Accordion/styles/button.js +0 -16
- package/styles/v2/components/Accordion/styles/container.js +0 -9
- package/styles/v2/components/Accordion/styles/index.js +0 -19
- package/styles/v2/components/Accordion/styles/panel.js +0 -7
- package/styles/v2/components/Alert/Alert.jsx +0 -121
- package/styles/v2/components/Alert/Alert.stories.js +0 -50
- package/styles/v2/components/Alert/index.js +0 -1
- package/styles/v2/components/Alert/styles/index.js +0 -166
- package/styles/v2/components/AutoSuggestSelect/AutoSuggestSelect.jsx +0 -187
- package/styles/v2/components/AutoSuggestSelect/index.js +0 -1
- package/styles/v2/components/Badge/Badge.jsx +0 -1
- package/styles/v2/components/Badge/Badge.stories.js +0 -32
- package/styles/v2/components/Badge/styles/index.js +0 -29
- package/styles/v2/components/Button/Button.jsx +0 -31
- package/styles/v2/components/Button/Button.spec.js +0 -29
- package/styles/v2/components/Button/Button.styles.js +0 -156
- package/styles/v2/components/Button/button-props.js +0 -66
- package/styles/v2/components/Button/index.js +0 -2
- package/styles/v2/components/Button/stories/button.js +0 -59
- package/styles/v2/components/Button/stories/index.stories.js +0 -82
- package/styles/v2/components/Button/stories/overview.js +0 -73
- package/styles/v2/components/Card/Card.jsx +0 -16
- package/styles/v2/components/Card/Card.stories.js +0 -33
- package/styles/v2/components/Checkbox/Checkbox.jsx +0 -1
- package/styles/v2/components/Checkbox/Checkbox.stories.js +0 -41
- package/styles/v2/components/Checkbox/index.js +0 -1
- package/styles/v2/components/Checkbox/styles/index.js +0 -31
- package/styles/v2/components/Container/Container.jsx +0 -10
- package/styles/v2/components/Container/Container.stories.js +0 -52
- package/styles/v2/components/Container/Container.styles.js +0 -11
- package/styles/v2/components/Divider/Divider.jsx +0 -31
- package/styles/v2/components/Divider/Divider.stories.js +0 -41
- package/styles/v2/components/Divider/Divider.styles.js +0 -15
- package/styles/v2/components/FormControl/FormControl.jsx +0 -77
- package/styles/v2/components/Grid/Grid.jsx +0 -25
- package/styles/v2/components/Grid/Grid.stories.js +0 -128
- package/styles/v2/components/Grid/Grid.styles.js +0 -12
- package/styles/v2/components/Grid/GridItem.jsx +0 -10
- package/styles/v2/components/Grid/GridItem.styles.js +0 -8
- package/styles/v2/components/Grid/index.js +0 -2
- package/styles/v2/components/Heading/Heading.jsx +0 -23
- package/styles/v2/components/Heading/Heading.stories.js +0 -40
- package/styles/v2/components/Heading/Heading.styles.js +0 -61
- package/styles/v2/components/Icon/Icon.jsx +0 -1
- package/styles/v2/components/Icon/Icon.stories.js +0 -38
- package/styles/v2/components/Image/Image.jsx +0 -97
- package/styles/v2/components/Image/Image.spec.js +0 -100
- package/styles/v2/components/Image/Image.stories.js +0 -142
- package/styles/v2/components/Input/Input.jsx +0 -51
- package/styles/v2/components/Input/Input.stories.js +0 -60
- package/styles/v2/components/Input/index.js +0 -1
- package/styles/v2/components/Input/styles/index.js +0 -49
- package/styles/v2/components/Link/Link.jsx +0 -1
- package/styles/v2/components/Link/Link.stories.js +0 -82
- package/styles/v2/components/Link/Link.styles.js +0 -38
- package/styles/v2/components/List/List.jsx +0 -57
- package/styles/v2/components/List/List.stories.js +0 -96
- package/styles/v2/components/List/index.js +0 -2
- package/styles/v2/components/List/styles/index.js +0 -12
- package/styles/v2/components/List/styles/item.styles.js +0 -5
- package/styles/v2/components/Loader/Loader.jsx +0 -75
- package/styles/v2/components/Loader/Loader.stories.js +0 -145
- package/styles/v2/components/Modal/Modal.jsx +0 -71
- package/styles/v2/components/Modal/Modal.stories.js +0 -278
- package/styles/v2/components/Modal/index.js +0 -1
- package/styles/v2/components/Modal/styles/body.js +0 -24
- package/styles/v2/components/Modal/styles/closeButton.js +0 -17
- package/styles/v2/components/Modal/styles/dialog.js +0 -10
- package/styles/v2/components/Modal/styles/dialogContainer.js +0 -10
- package/styles/v2/components/Modal/styles/footer.js +0 -5
- package/styles/v2/components/Modal/styles/header.js +0 -7
- package/styles/v2/components/Modal/styles/index.js +0 -47
- package/styles/v2/components/Modal/styles/overlay.js +0 -4
- package/styles/v2/components/Popover/Popover.jsx +0 -28
- package/styles/v2/components/Popover/Popover.stories.js +0 -113
- package/styles/v2/components/Popover/PopoverArrow.jsx +0 -10
- package/styles/v2/components/Popover/PopoverCloseButton.jsx +0 -10
- package/styles/v2/components/Popover/PopoverContent.jsx +0 -41
- package/styles/v2/components/Popover/index.js +0 -3
- package/styles/v2/components/Popover/styles/index.js +0 -21
- package/styles/v2/components/Popover/styles/popover-arrow.js +0 -5
- package/styles/v2/components/Popover/styles/popover-body.js +0 -5
- package/styles/v2/components/Popover/styles/popover-close-button.js +0 -17
- package/styles/v2/components/Popover/styles/popover-content.js +0 -16
- package/styles/v2/components/Popover/styles/popover-header.js +0 -6
- package/styles/v2/components/Popover/styles/popper.js +0 -5
- package/styles/v2/components/Radio/Radio.jsx +0 -50
- package/styles/v2/components/Radio/Radio.stories.js +0 -155
- package/styles/v2/components/Radio/RadioGroup.jsx +0 -69
- package/styles/v2/components/Radio/index.js +0 -2
- package/styles/v2/components/Radio/styles/index.js +0 -52
- package/styles/v2/components/Select/Select.jsx +0 -62
- package/styles/v2/components/Select/Select.stories.js +0 -60
- package/styles/v2/components/Select/index.js +0 -1
- package/styles/v2/components/Select/styles/index.js +0 -29
- package/styles/v2/components/Skeleton/Skeleton.stories.jsx +0 -34
- package/styles/v2/components/Skeleton/Skeleton.styles.js +0 -3
- package/styles/v2/components/Skeleton/index.js +0 -1
- package/styles/v2/components/Spinner/Spinner.jsx +0 -40
- package/styles/v2/components/Spinner/Spinner.stories.js +0 -98
- package/styles/v2/components/Spinner/Spinner.styles.js +0 -57
- package/styles/v2/components/Switch/Switch.jsx +0 -52
- package/styles/v2/components/Switch/Switch.stories.js +0 -88
- package/styles/v2/components/Switch/index.js +0 -1
- package/styles/v2/components/Switch/styles/index.js +0 -17
- package/styles/v2/components/Table/Table.jsx +0 -1
- package/styles/v2/components/Table/Table.stories.js +0 -90
- package/styles/v2/components/Table/Table.styles.js +0 -66
- package/styles/v2/components/Table/index.js +0 -2
- package/styles/v2/components/Tabs/Tabs.jsx +0 -39
- package/styles/v2/components/Tabs/Tabs.stories.js +0 -47
- package/styles/v2/components/Tabs/combineSizeWithVariant.js +0 -29
- package/styles/v2/components/Tabs/index.js +0 -2
- package/styles/v2/components/Tabs/styles/index.js +0 -40
- package/styles/v2/components/Text/Text.jsx +0 -35
- package/styles/v2/components/Text/Text.stories.js +0 -47
- package/styles/v2/components/Text/Text.styles.js +0 -33
- package/styles/v2/components/Text/combineAsWithVariant.js +0 -106
- package/styles/v2/components/Text/options.js +0 -92
- package/styles/v2/components/ThemeProvider/ThemeProvider.jsx +0 -39
- package/styles/v2/components/ThemeProvider/ThemeProvider.stories.js +0 -85
- package/styles/v2/components/index.js +0 -70
- package/styles/v2/components/styles.js +0 -21
- package/styles/v2/theme/base/breakpoints.js +0 -16
- package/styles/v2/theme/base/colors.js +0 -136
- package/styles/v2/theme/base/index.js +0 -5
- package/styles/v2/theme/base/sizes.js +0 -48
- package/styles/v2/theme/base/typography.js +0 -24
- package/styles/v2/theme/base/zindices.js +0 -17
- package/styles/v2/theme/global.js +0 -118
- package/styles/v2/theme/index.js +0 -27
- package/styles/v2/utils/Spaces.js +0 -16
- package/v1/assets-manifest.json +0 -5
- package/v1/index.html +0 -1
- package/v1/index.js +0 -3
- package/v1/index.js.LICENSE.txt +0 -23
- package/v1/index.js.map +0 -1
|
@@ -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
|
-
};
|