@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,90 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
|
|
4
|
-
import Component from './Table';
|
|
5
|
-
import {variants} from './Table.styles';
|
|
6
|
-
import {Thead, Tbody, Tr, Th, Td} from './index';
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
title: 'v2/Table',
|
|
10
|
-
parameters: {
|
|
11
|
-
removeBaseHtmlClass: true,
|
|
12
|
-
},
|
|
13
|
-
argTypes: {
|
|
14
|
-
numberOfColumns: {
|
|
15
|
-
table: {
|
|
16
|
-
disable: true,
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
numberOfRows: {
|
|
20
|
-
table: {
|
|
21
|
-
disable: true,
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
tableData: {
|
|
25
|
-
table: {
|
|
26
|
-
disable: true,
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
tableHeading: {
|
|
30
|
-
table: {
|
|
31
|
-
disable: true,
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
variant: {
|
|
35
|
-
control: {
|
|
36
|
-
type: 'select',
|
|
37
|
-
options: Object.keys(variants),
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const TableTemplate = ({
|
|
44
|
-
numberOfColumns,
|
|
45
|
-
numberOfRows,
|
|
46
|
-
tableData,
|
|
47
|
-
tableHeading,
|
|
48
|
-
variant,
|
|
49
|
-
}) => {
|
|
50
|
-
return (
|
|
51
|
-
<Component variant={variant}>
|
|
52
|
-
<Thead>
|
|
53
|
-
<Tr>
|
|
54
|
-
{Array(numberOfColumns)
|
|
55
|
-
.fill(tableHeading)
|
|
56
|
-
.map((heading, index) => (
|
|
57
|
-
<Th key={index}>{heading}</Th>
|
|
58
|
-
))}
|
|
59
|
-
</Tr>
|
|
60
|
-
</Thead>
|
|
61
|
-
<Tbody>
|
|
62
|
-
{Array(numberOfRows)
|
|
63
|
-
.fill(Array(numberOfColumns).fill(tableData))
|
|
64
|
-
.map((row, i) => (
|
|
65
|
-
<Tr key={i}>
|
|
66
|
-
{row.map((data, index) => (
|
|
67
|
-
<Td key={index}>{data}</Td>
|
|
68
|
-
))}
|
|
69
|
-
</Tr>
|
|
70
|
-
))}
|
|
71
|
-
</Tbody>
|
|
72
|
-
</Component>
|
|
73
|
-
);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
TableTemplate.propTypes = {
|
|
77
|
-
numberOfColumns: PropTypes.number,
|
|
78
|
-
numberOfRows: PropTypes.number,
|
|
79
|
-
tableData: PropTypes.string,
|
|
80
|
-
tableHeading: PropTypes.string,
|
|
81
|
-
variant: PropTypes.string,
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
export const Table = TableTemplate.bind({});
|
|
85
|
-
Table.args = {
|
|
86
|
-
numberOfColumns: 3,
|
|
87
|
-
numberOfRows: 3,
|
|
88
|
-
tableData: 'Table cell data',
|
|
89
|
-
tableHeading: 'Column Heading',
|
|
90
|
-
};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import {variants as headingVariants} from 'v2/components/Heading/Heading.styles';
|
|
2
|
-
|
|
3
|
-
const parts = ['table', 'thead', 'tbody', 'tr', 'th', 'td', 'caption'];
|
|
4
|
-
|
|
5
|
-
const baseStyle = {
|
|
6
|
-
table: {
|
|
7
|
-
borderCollapse: 'collapse',
|
|
8
|
-
color: 'text.primary.light',
|
|
9
|
-
width: '100%',
|
|
10
|
-
},
|
|
11
|
-
thead: {
|
|
12
|
-
borderBottom: '1px',
|
|
13
|
-
borderColor: 'gray.medium',
|
|
14
|
-
},
|
|
15
|
-
th: {
|
|
16
|
-
fontFamily: 'heading',
|
|
17
|
-
fontSize: headingVariants.h4.fontSize,
|
|
18
|
-
fontWeight: 'semibold',
|
|
19
|
-
letterSpacing: 'unset',
|
|
20
|
-
padding: 4,
|
|
21
|
-
textAlign: 'start',
|
|
22
|
-
textTransform: 'none',
|
|
23
|
-
},
|
|
24
|
-
tr: {
|
|
25
|
-
borderBottom: '1px',
|
|
26
|
-
borderColor: 'gray.medium',
|
|
27
|
-
_last: {
|
|
28
|
-
border: 'none',
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
td: {
|
|
32
|
-
padding: 4,
|
|
33
|
-
textAlign: 'start',
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const roundedWhiteVariant = {
|
|
38
|
-
table: {
|
|
39
|
-
backgroundColor: 'background.white',
|
|
40
|
-
borderRadius: 6,
|
|
41
|
-
boxShadow: 'md',
|
|
42
|
-
marginBottom: 1,
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
const roundedGrayVariant = {
|
|
46
|
-
table: {
|
|
47
|
-
...roundedWhiteVariant.table,
|
|
48
|
-
backgroundColor: 'background.gray',
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export const variants = {
|
|
53
|
-
rounded: roundedWhiteVariant,
|
|
54
|
-
roundedGray: roundedGrayVariant,
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
const defaultProps = {
|
|
58
|
-
variant: 'rounded',
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export default {
|
|
62
|
-
parts,
|
|
63
|
-
variants,
|
|
64
|
-
baseStyle,
|
|
65
|
-
defaultProps,
|
|
66
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import {Tabs as ChakraTabs, forwardRef} from '@chakra-ui/react';
|
|
4
|
-
import combineSizeWithVariant from "./combineSizeWithVariant";
|
|
5
|
-
|
|
6
|
-
export const SIZE_SMALL = 'small';
|
|
7
|
-
export const SIZE_BODY = 'body';
|
|
8
|
-
export const SIZE_HEADING = 'heading';
|
|
9
|
-
|
|
10
|
-
const sizeMapping = {
|
|
11
|
-
[SIZE_SMALL]: 'sm',
|
|
12
|
-
[SIZE_BODY]: 'md',
|
|
13
|
-
[SIZE_HEADING]: 'lg'
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const Tabs = forwardRef(({size, ...props}, ref) => {
|
|
17
|
-
return (
|
|
18
|
-
<ChakraTabs
|
|
19
|
-
size={sizeMapping[size]}
|
|
20
|
-
{...props}
|
|
21
|
-
{...combineSizeWithVariant({size})}
|
|
22
|
-
ref={ref}
|
|
23
|
-
/>
|
|
24
|
-
);
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
Tabs.defaultProps = {
|
|
28
|
-
size: SIZE_BODY,
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
Tabs.propTypes = {
|
|
32
|
-
/** The React node that will render inside the element */
|
|
33
|
-
children: PropTypes.node,
|
|
34
|
-
/** Controls the size of Tabs */
|
|
35
|
-
size: PropTypes.oneOf([SIZE_SMALL, SIZE_BODY, SIZE_HEADING]),
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export default Tabs;
|
|
39
|
-
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import Component, {SIZE_BODY, SIZE_HEADING, SIZE_SMALL} from './Tabs';
|
|
4
|
-
import {TabList, TabPanels, Tab, TabPanel} from './index';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'v2/Tabs',
|
|
8
|
-
parameters: {
|
|
9
|
-
removeBaseHtmlClass: true,
|
|
10
|
-
},
|
|
11
|
-
argTypes: {
|
|
12
|
-
size: {
|
|
13
|
-
control: {
|
|
14
|
-
type: 'select',
|
|
15
|
-
options: [SIZE_SMALL, SIZE_BODY, SIZE_HEADING],
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const TabsTemplate = props => {
|
|
22
|
-
return (
|
|
23
|
-
<Component variant="line" {...props}>
|
|
24
|
-
<TabList>
|
|
25
|
-
<Tab>One</Tab>
|
|
26
|
-
<Tab>Two</Tab>
|
|
27
|
-
<Tab>Three</Tab>
|
|
28
|
-
</TabList>
|
|
29
|
-
|
|
30
|
-
<TabPanels>
|
|
31
|
-
<TabPanel>
|
|
32
|
-
<p>one!</p>
|
|
33
|
-
</TabPanel>
|
|
34
|
-
<TabPanel>
|
|
35
|
-
<p>two!</p>
|
|
36
|
-
</TabPanel>
|
|
37
|
-
<TabPanel>
|
|
38
|
-
<p>three!</p>
|
|
39
|
-
</TabPanel>
|
|
40
|
-
</TabPanels>
|
|
41
|
-
</Component>
|
|
42
|
-
);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
TabsTemplate.propTypes = {};
|
|
46
|
-
|
|
47
|
-
export const Tabs = TabsTemplate.bind({});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import styles from './styles/index';
|
|
2
|
-
import {fontSizes} from 'v2/theme/base/typography';
|
|
3
|
-
import {SIZE_BODY, SIZE_HEADING, SIZE_SMALL} from "./Tabs";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* ### `combineSizeWithVariant`
|
|
7
|
-
* A function that takes in the `size` value, and the
|
|
8
|
-
* `variant` value. The default-like styling for the `size` prop is merged with the styling from the
|
|
9
|
-
* `variant` and a combined styleProp object is returned.
|
|
10
|
-
*
|
|
11
|
-
* @function combineSizeWithVariant
|
|
12
|
-
* @param {string} args.size - The size of Tabs component
|
|
13
|
-
* @param {string} args.variant - The style variant for the Text component
|
|
14
|
-
* @returns {Object} An object containing the merged styleProps from the `variant` and the `size` props
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
const combineSizeWithVariant = ({size, variant = 'line'}) => {
|
|
18
|
-
const fontSizeMapping = {
|
|
19
|
-
[SIZE_SMALL]: fontSizes.xs,
|
|
20
|
-
[SIZE_BODY]: fontSizes.base,
|
|
21
|
-
[SIZE_HEADING]: fontSizes.lg
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const styleProps = styles.variants[`${variant}`];
|
|
25
|
-
styleProps.tab.fontSize = fontSizeMapping[size];
|
|
26
|
-
return styleProps;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export default combineSizeWithVariant;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import merge from 'lodash/merge';
|
|
2
|
-
import chakraDefaultTheme from '@chakra-ui/theme';
|
|
3
|
-
|
|
4
|
-
const variants = {
|
|
5
|
-
line: {
|
|
6
|
-
tablist: {
|
|
7
|
-
borderBottom: '2px solid',
|
|
8
|
-
borderColor: 'inherit',
|
|
9
|
-
},
|
|
10
|
-
tab: {
|
|
11
|
-
color: 'gray.600',
|
|
12
|
-
borderBottom: '2px solid',
|
|
13
|
-
borderColor: 'transparent',
|
|
14
|
-
marginBottom: '-2px',
|
|
15
|
-
_selected: {
|
|
16
|
-
color: 'primary.default',
|
|
17
|
-
borderColor: 'primary.default',
|
|
18
|
-
fontWeight: 'semibold',
|
|
19
|
-
},
|
|
20
|
-
_focus: {
|
|
21
|
-
boxShadow: 'none',
|
|
22
|
-
},
|
|
23
|
-
_active: {
|
|
24
|
-
color: 'black',
|
|
25
|
-
bg: 'transparent',
|
|
26
|
-
},
|
|
27
|
-
_disabled: {
|
|
28
|
-
opacity: 0.4,
|
|
29
|
-
cursor: 'not-allowed',
|
|
30
|
-
},
|
|
31
|
-
_hover: {
|
|
32
|
-
color: 'black'
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export default merge(chakraDefaultTheme.components.Tabs, {
|
|
39
|
-
variants,
|
|
40
|
-
});
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import {Text as ChakraText, forwardRef} from '@chakra-ui/react';
|
|
4
|
-
|
|
5
|
-
import asOptions from './options';
|
|
6
|
-
import {variants} from './Text.styles';
|
|
7
|
-
import combineAsWithVariant from './combineAsWithVariant';
|
|
8
|
-
|
|
9
|
-
const Text = forwardRef(({as, variant, ...props}, ref) => {
|
|
10
|
-
return (
|
|
11
|
-
<ChakraText
|
|
12
|
-
variant={variant}
|
|
13
|
-
as={as}
|
|
14
|
-
{...combineAsWithVariant({as, variant})}
|
|
15
|
-
{...props}
|
|
16
|
-
ref={ref}
|
|
17
|
-
/>
|
|
18
|
-
);
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
Text.defaultProps = {
|
|
22
|
-
as: 'p',
|
|
23
|
-
variant: 'body',
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
Text.propTypes = {
|
|
27
|
-
/** The React node that will render inside the element */
|
|
28
|
-
children: PropTypes.node,
|
|
29
|
-
/** Controls the underlying styling of the html heading tag */
|
|
30
|
-
as: PropTypes.oneOf(asOptions),
|
|
31
|
-
/** The styling that will be applied to the component regardless of the underlying html */
|
|
32
|
-
variant: PropTypes.oneOf(Object.keys(variants)),
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export default Text;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
|
|
4
|
-
import Component from './Text';
|
|
5
|
-
|
|
6
|
-
import asOptions from './options';
|
|
7
|
-
import {variants} from './Text.styles';
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
title: 'v2/Text',
|
|
11
|
-
component: Component,
|
|
12
|
-
parameters: {
|
|
13
|
-
removeBaseHtmlClass: true,
|
|
14
|
-
},
|
|
15
|
-
argTypes: {
|
|
16
|
-
variant: {
|
|
17
|
-
control: {
|
|
18
|
-
type: 'select',
|
|
19
|
-
options: Object.keys(variants),
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
as: {
|
|
23
|
-
control: {
|
|
24
|
-
type: 'select',
|
|
25
|
-
options: asOptions,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
children: {
|
|
29
|
-
control: {
|
|
30
|
-
type: 'text',
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const Template = props => <Component {...props} />;
|
|
37
|
-
|
|
38
|
-
Template.propTypes = {
|
|
39
|
-
children: PropTypes.node,
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export const Text = Template.bind({});
|
|
43
|
-
|
|
44
|
-
Text.args = {
|
|
45
|
-
children:
|
|
46
|
-
'Bonbon lollipop tiramisu cupcake bear claw cupcake. Icing candy canes cookie caramels wafer tootsie roll soufflé halvah. Ice cream tart gummies apple pie chocolate bar. Pastry gummies macaroon fruitcake donut sweet caramels candy. Oat cake marshmallow biscuit carrot cake fruitcake brownie pastry liquorice liquorice. Topping sweet gingerbread. Chupa chups caramels brownie. Icing jujubes chupa chups cookie. Carrot cake gummi bears powder apple pie donut pudding macaroon. Icing jelly cupcake powder jelly croissant pastry. Powder jelly fruitcake gummies sweet tootsie roll candy. Icing cheesecake toffee tart pastry lemon drops lemon drops bonbon wafer. Cheesecake ice cream wafer apple pie candy canes croissant. Sweet croissant pudding carrot cake oat cake chupa chups. Gingerbread lemon drops biscuit oat cake carrot cake. Chocolate cake jelly-o cake cake candy lollipop.',
|
|
47
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import merge from 'lodash/merge';
|
|
2
|
-
import chakraDefaultTheme from '@chakra-ui/theme';
|
|
3
|
-
import {fontSizes, fontWeights} from 'v2/theme/base/typography';
|
|
4
|
-
|
|
5
|
-
const baseStyle = {
|
|
6
|
-
lineHeight: 1.5,
|
|
7
|
-
fontWeight: fontWeights.normal,
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const variants = {
|
|
11
|
-
body: {
|
|
12
|
-
...baseStyle,
|
|
13
|
-
fontSize: {base: fontSizes.base, desktop: fontSizes.base},
|
|
14
|
-
},
|
|
15
|
-
body2: {
|
|
16
|
-
...baseStyle,
|
|
17
|
-
fontSize: {base: fontSizes.sm, desktop: fontSizes.sm},
|
|
18
|
-
},
|
|
19
|
-
caption: {
|
|
20
|
-
...baseStyle,
|
|
21
|
-
fontSize: {base: fontSizes.xs, desktop: fontSizes.xs},
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const defaultProps = {
|
|
26
|
-
variant: variants.body,
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export default merge(chakraDefaultTheme.components.Text, {
|
|
30
|
-
variants,
|
|
31
|
-
baseStyle,
|
|
32
|
-
defaultProps,
|
|
33
|
-
});
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import {variants} from './Text.styles';
|
|
2
|
-
import {fontWeights} from 'v2/theme/base/typography';
|
|
3
|
-
|
|
4
|
-
// Create list of commonly used html text elements
|
|
5
|
-
const asOptions = Object.freeze({
|
|
6
|
-
bold: 'b',
|
|
7
|
-
strong: 'strong',
|
|
8
|
-
italic: 'i',
|
|
9
|
-
emphasis: 'em',
|
|
10
|
-
small: 'small',
|
|
11
|
-
strikethrough: 's',
|
|
12
|
-
underline: 'u',
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* ### `combineAsWithVariant`
|
|
17
|
-
* A function that takes in the `as` value (the HTML element to render the Text component as), and the
|
|
18
|
-
* `variant` value. The default-like styling for the `as` prop is merged with the styling from the
|
|
19
|
-
* `variant` and a combined styleProp object is returned.
|
|
20
|
-
*
|
|
21
|
-
* By default the `as` property only effects the underlying semantics of the markup, whereas the
|
|
22
|
-
* `variant` only effects the visual styling of the text. In order for the text component to be built
|
|
23
|
-
* with accessibility and ease-of-use in mind, these two properties _should_ be interconnected. Having
|
|
24
|
-
* the style and markup unified allows an experience that is accessible to those using screen-readers
|
|
25
|
-
* (or any other assistive technology) that matches (or is at least a close approximation) of the
|
|
26
|
-
* "standard" visual experience.
|
|
27
|
-
*
|
|
28
|
-
* @function combineAsWithVariant
|
|
29
|
-
* @param {string} args.as - The HTML element to render the Text component as
|
|
30
|
-
* @param {string} args.variant - The style variant for the Text component
|
|
31
|
-
* @returns {Object} An object containing the merged styleProps from the `variant` and the `as` props
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
const combineAsWithVariant = ({as, variant}) => {
|
|
35
|
-
const variantFontSizeBase = Number(
|
|
36
|
-
variants[`${variant}`].fontSize.base.replace('rem', '')
|
|
37
|
-
);
|
|
38
|
-
const variantFontSizeDesktop = Number(
|
|
39
|
-
variants[`${variant}`].fontSize.desktop.replace('rem', '')
|
|
40
|
-
);
|
|
41
|
-
let styleProps;
|
|
42
|
-
|
|
43
|
-
switch (as) {
|
|
44
|
-
case asOptions.bold:
|
|
45
|
-
styleProps = {
|
|
46
|
-
...variants[`${variant}`],
|
|
47
|
-
fontWeight: fontWeights.semibold,
|
|
48
|
-
};
|
|
49
|
-
break;
|
|
50
|
-
|
|
51
|
-
case asOptions.strong:
|
|
52
|
-
styleProps = {
|
|
53
|
-
...variants[`${variant}`],
|
|
54
|
-
fontWeight: fontWeights.semibold,
|
|
55
|
-
};
|
|
56
|
-
break;
|
|
57
|
-
|
|
58
|
-
case asOptions.italic:
|
|
59
|
-
styleProps = {
|
|
60
|
-
...variants[`${variant}`],
|
|
61
|
-
fontStyle: 'italic',
|
|
62
|
-
};
|
|
63
|
-
break;
|
|
64
|
-
|
|
65
|
-
case asOptions.emphasis:
|
|
66
|
-
styleProps = {
|
|
67
|
-
...variants[`${variant}`],
|
|
68
|
-
fontStyle: 'italic',
|
|
69
|
-
};
|
|
70
|
-
break;
|
|
71
|
-
|
|
72
|
-
case asOptions.underline:
|
|
73
|
-
styleProps = {
|
|
74
|
-
...variants[`${variant}`],
|
|
75
|
-
textDecoration: 'underline',
|
|
76
|
-
};
|
|
77
|
-
break;
|
|
78
|
-
|
|
79
|
-
case asOptions.strikethrough:
|
|
80
|
-
styleProps = {
|
|
81
|
-
...variants[`${variant}`],
|
|
82
|
-
textDecoration: 'line-through',
|
|
83
|
-
};
|
|
84
|
-
break;
|
|
85
|
-
|
|
86
|
-
case asOptions.small:
|
|
87
|
-
styleProps = {
|
|
88
|
-
...variants[`${variant}`],
|
|
89
|
-
fontSize: {
|
|
90
|
-
base: `${variantFontSizeBase * 0.8}rem`,
|
|
91
|
-
desktop: `${variantFontSizeDesktop * 0.8}rem`,
|
|
92
|
-
},
|
|
93
|
-
};
|
|
94
|
-
break;
|
|
95
|
-
|
|
96
|
-
default:
|
|
97
|
-
styleProps = {
|
|
98
|
-
...variants[`${variant}`],
|
|
99
|
-
};
|
|
100
|
-
break;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
return styleProps;
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
export default combineAsWithVariant;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
const options = [
|
|
2
|
-
'a',
|
|
3
|
-
'abbr',
|
|
4
|
-
'address',
|
|
5
|
-
'article',
|
|
6
|
-
'aside',
|
|
7
|
-
'b',
|
|
8
|
-
'bdi',
|
|
9
|
-
'bdo',
|
|
10
|
-
'blockquote',
|
|
11
|
-
'button',
|
|
12
|
-
'caption',
|
|
13
|
-
'cite',
|
|
14
|
-
'code',
|
|
15
|
-
'colgroup',
|
|
16
|
-
'data',
|
|
17
|
-
'datalist',
|
|
18
|
-
'dd',
|
|
19
|
-
'del',
|
|
20
|
-
'details',
|
|
21
|
-
'dfn',
|
|
22
|
-
'dialog',
|
|
23
|
-
'div',
|
|
24
|
-
'dl',
|
|
25
|
-
'dt',
|
|
26
|
-
'em',
|
|
27
|
-
'fieldset',
|
|
28
|
-
'figure',
|
|
29
|
-
'footer',
|
|
30
|
-
'form',
|
|
31
|
-
'header',
|
|
32
|
-
'hgroup',
|
|
33
|
-
'i',
|
|
34
|
-
'input',
|
|
35
|
-
'ins',
|
|
36
|
-
'kbd',
|
|
37
|
-
'label',
|
|
38
|
-
'legend',
|
|
39
|
-
'li',
|
|
40
|
-
'link',
|
|
41
|
-
'main',
|
|
42
|
-
'map',
|
|
43
|
-
'mark',
|
|
44
|
-
'menu',
|
|
45
|
-
'meter',
|
|
46
|
-
'nav',
|
|
47
|
-
'noscript',
|
|
48
|
-
'object',
|
|
49
|
-
'ol',
|
|
50
|
-
'optgroup',
|
|
51
|
-
'option',
|
|
52
|
-
'output',
|
|
53
|
-
'p',
|
|
54
|
-
'pre',
|
|
55
|
-
'progress',
|
|
56
|
-
'q',
|
|
57
|
-
'rb',
|
|
58
|
-
'rp',
|
|
59
|
-
'rt',
|
|
60
|
-
'rtc',
|
|
61
|
-
'ruby',
|
|
62
|
-
's',
|
|
63
|
-
'samp',
|
|
64
|
-
'script',
|
|
65
|
-
'section',
|
|
66
|
-
'select',
|
|
67
|
-
'small',
|
|
68
|
-
'span',
|
|
69
|
-
'strong',
|
|
70
|
-
'style',
|
|
71
|
-
'sub',
|
|
72
|
-
'summary',
|
|
73
|
-
'sup',
|
|
74
|
-
'table',
|
|
75
|
-
'tbody',
|
|
76
|
-
'td',
|
|
77
|
-
'template',
|
|
78
|
-
'textarea',
|
|
79
|
-
'tfoot',
|
|
80
|
-
'th',
|
|
81
|
-
'thead',
|
|
82
|
-
'time',
|
|
83
|
-
'title',
|
|
84
|
-
'tr',
|
|
85
|
-
'track',
|
|
86
|
-
'u',
|
|
87
|
-
'ul',
|
|
88
|
-
'var',
|
|
89
|
-
'video',
|
|
90
|
-
];
|
|
91
|
-
|
|
92
|
-
export default options;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
import React, {forwardRef} from 'react';
|
|
3
|
-
import {ChakraProvider} from '@chakra-ui/react';
|
|
4
|
-
|
|
5
|
-
import THEME from 'v2/theme';
|
|
6
|
-
import {Fonts, LegacyOverrides} from 'v2/theme/global';
|
|
7
|
-
import merge from 'lodash/merge';
|
|
8
|
-
|
|
9
|
-
const ThemeProvider = forwardRef(
|
|
10
|
-
(
|
|
11
|
-
{
|
|
12
|
-
theme,
|
|
13
|
-
useLegacyOverrides,
|
|
14
|
-
disableExternalFonts = false,
|
|
15
|
-
children,
|
|
16
|
-
...props
|
|
17
|
-
},
|
|
18
|
-
ref
|
|
19
|
-
) => (
|
|
20
|
-
<ChakraProvider {...props} ref={ref} theme={merge(THEME, theme)}>
|
|
21
|
-
{disableExternalFonts ? null : <Fonts />}
|
|
22
|
-
<LegacyOverrides useLegacyOverrides={useLegacyOverrides} />
|
|
23
|
-
{children}
|
|
24
|
-
</ChakraProvider>
|
|
25
|
-
)
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
ThemeProvider.propTypes = {
|
|
29
|
-
/** If true, this will use the old `spothero-html` base styles */
|
|
30
|
-
useLegacyOverrides: PropTypes.bool,
|
|
31
|
-
/** If true, this will not load the `Fonts` global styles */
|
|
32
|
-
disableExternalFonts: PropTypes.bool,
|
|
33
|
-
/** The React node (generally your entire App) that will be provided the theme */
|
|
34
|
-
children: PropTypes.node,
|
|
35
|
-
/** Adds additional themeing on top of SpotHero's default configuration */
|
|
36
|
-
theme: PropTypes.object,
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export default ThemeProvider;
|