@superdispatch/ui 0.21.13 → 0.21.14
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/LICENSE +21 -0
- package/{pkg/dist-node → dist-node}/index.js +62 -14
- package/dist-node/index.js.map +1 -0
- package/{pkg/dist-src → dist-src}/index.js +1 -0
- package/dist-src/info-tooltip/InfoTooltip.js +54 -0
- package/{pkg/dist-types → dist-types}/index.d.ts +14 -2
- package/{pkg/dist-web → dist-web}/index.js +64 -17
- package/dist-web/index.js.map +1 -0
- package/package.json +12 -38
- package/.babelrc.js +0 -5
- package/.turbo/turbo-version.log +0 -28
- package/pkg/README.md +0 -30
- package/pkg/dist-node/index.js.map +0 -1
- package/pkg/dist-web/index.js.map +0 -1
- package/pkg/package.json +0 -39
- package/playroom.ts +0 -31
- package/src/__tests__/index.spec.ts +0 -134
- package/src/adaptive-toolbar/AdaptiveToolbar.stories.tsx +0 -50
- package/src/adaptive-toolbar/AdaptiveToolbar.tsx +0 -199
- package/src/adaptive-toolbar/__tests__/AdaptiveToolbar.spec.tsx +0 -11
- package/src/adaptive-vertical-toolbar/AdaptiveVerticalToolbar.stories.tsx +0 -49
- package/src/adaptive-vertical-toolbar/AdaptiveVerticalToolbar.tsx +0 -171
- package/src/app-bar/AppBar.stories.tsx +0 -62
- package/src/app-bar/AppBarOverrides.ts +0 -9
- package/src/app-bar/__tests__/AppBar.spec.tsx +0 -86
- package/src/autocomplete/Autocomplete.stories.tsx +0 -76
- package/src/autocomplete/AutocompleteOverrides.tsx +0 -58
- package/src/autocomplete/__tests__/Autocomplete.spec.tsx +0 -323
- package/src/avatar/Avatar.stories.tsx +0 -17
- package/src/avatar/AvatarOverrides.ts +0 -24
- package/src/avatar/__tests__/Avatar.spec.tsx +0 -71
- package/src/avatar-button/AvatarButton.stories.tsx +0 -153
- package/src/avatar-button/AvatarButton.tsx +0 -223
- package/src/avatar-button/__tests__/AvatarButton.spec.tsx +0 -126
- package/src/button/Button.tsx +0 -51
- package/src/button/ButtonOverrides.ts +0 -375
- package/src/button/__tests__/Button.spec.tsx +0 -599
- package/src/card/Card.stories.tsx +0 -39
- package/src/card/CardOverrides.ts +0 -9
- package/src/card/__tests__/Card.spec.tsx +0 -68
- package/src/card-button/CardButton.stories.tsx +0 -36
- package/src/card-button/CardButton.tsx +0 -202
- package/src/card-button/__tests__/CardButton.spec.tsx +0 -95
- package/src/checkbox/CheckboxField.stories.tsx +0 -61
- package/src/checkbox/CheckboxField.tsx +0 -56
- package/src/checkbox/CheckboxGroudField.tsx +0 -53
- package/src/checkbox/CheckboxOverrides.tsx +0 -55
- package/src/checkbox/__tests__/Checkbox.spec.tsx +0 -105
- package/src/chip/Chip.stories.tsx +0 -26
- package/src/chip/ChipOverrides.tsx +0 -111
- package/src/chip/__tests__/Chip.spec.tsx +0 -308
- package/src/columns/Column.tsx +0 -124
- package/src/columns/Columns.stories.tsx +0 -426
- package/src/columns/Columns.tsx +0 -76
- package/src/description-list/DescriptionList.spec.tsx +0 -137
- package/src/description-list/DescriptionList.stories.tsx +0 -148
- package/src/description-list/DescriptionList.tsx +0 -170
- package/src/dialog/Dialog.playroom.tsx +0 -24
- package/src/dialog/Dialog.stories.tsx +0 -60
- package/src/dialog/DialogOverrides.ts +0 -39
- package/src/dialog/__tests__/Dialog.spec.tsx +0 -219
- package/src/drawer/Drawer.playroom.tsx +0 -22
- package/src/drawer/Drawer.stories.tsx +0 -194
- package/src/drawer/DrawerActions.tsx +0 -69
- package/src/drawer/DrawerContent.tsx +0 -30
- package/src/drawer/DrawerList.tsx +0 -60
- package/src/drawer/DrawerOverrides.ts +0 -19
- package/src/drawer/DrawerTitle.tsx +0 -143
- package/src/drawer/__tests__/Drawer.spec.tsx +0 -227
- package/src/dropdown-button/DropdownButton.stories.tsx +0 -15
- package/src/dropdown-button/DropdownButton.tsx +0 -131
- package/src/grid/GridStack.tsx +0 -45
- package/src/grid/InlineGrid.tsx +0 -56
- package/src/icon-button/IconButton.stories.tsx +0 -53
- package/src/icon-button/IconButtonOverrides.ts +0 -32
- package/src/icon-button/__tests__/IconButton.spec.tsx +0 -124
- package/src/index.ts +0 -47
- package/src/info-card/InfoCard.stories.tsx +0 -29
- package/src/info-card/InfoCard.tsx +0 -95
- package/src/info-card/__tests__/InfoCard.spec.tsx +0 -22
- package/src/info-tooltip/InfoTooltip.stories.tsx +0 -77
- package/src/info-tooltip/InfoTooltip.tsx +0 -72
- package/src/info-tooltip/__tests__/InfoTooltip.spec.tsx +0 -166
- package/src/inline/Inline.stories.tsx +0 -135
- package/src/inline/Inline.tsx +0 -144
- package/src/link/Link.stories.tsx +0 -41
- package/src/link/LinkOverrides.ts +0 -43
- package/src/link/__tests__/Link.spec.tsx +0 -98
- package/src/list/ListOverrides.ts +0 -11
- package/src/list/__tests__/List.spec.tsx +0 -182
- package/src/menu/Menu.stories.tsx +0 -35
- package/src/menu/MenuOverrides.ts +0 -17
- package/src/menu/__tests__/Menu.spec.tsx +0 -99
- package/src/number-field/NumberField.stories.tsx +0 -123
- package/src/number-field/NumberField.tsx +0 -98
- package/src/overflow-text/OverflowText.stories.tsx +0 -32
- package/src/overflow-text/OverflowText.tsx +0 -114
- package/src/overflow-text/__tests__/OverflowText.spec.tsx +0 -24
- package/src/pagination/Pagination.stories.tsx +0 -36
- package/src/pagination/PaginationOverrides.ts +0 -47
- package/src/pagination/__tests__/Pagination.spec.tsx +0 -228
- package/src/paper/PaperOverrides.ts +0 -10
- package/src/paper/__tests__/Paper.spec.tsx +0 -155
- package/src/props/AlignProps.ts +0 -22
- package/src/props/CollapseProp.ts +0 -13
- package/src/props/ResponsiveProp.ts +0 -65
- package/src/props/SpaceProp.ts +0 -40
- package/src/radio/RadioField.stories.tsx +0 -42
- package/src/radio/RadioField.tsx +0 -55
- package/src/radio/RadioGroupField.tsx +0 -64
- package/src/radio/RadioOverrides.tsx +0 -51
- package/src/radio/__tests__/Radio.spec.tsx +0 -90
- package/src/responsive/CollapseBreakpoint.ts +0 -21
- package/src/responsive/MinBreakpoint.ts +0 -21
- package/src/responsive/ResponsiveContext.tsx +0 -57
- package/src/snackbar/Snackbar.stories.tsx +0 -196
- package/src/snackbar/Snackbar.tsx +0 -83
- package/src/snackbar/SnackbarContent.tsx +0 -147
- package/src/snackbar/SnackbarOverrides.ts +0 -23
- package/src/snackbar/SnackbarStack.tsx +0 -160
- package/src/snackbar/__tests__/Snackbar.spec.tsx +0 -196
- package/src/stack/Stack.stories.tsx +0 -113
- package/src/stack/Stack.tsx +0 -86
- package/src/svg-icon/SvgIcon.stories.tsx +0 -29
- package/src/svg-icon/SvgIconOverrides.ts +0 -32
- package/src/svg-icon/__tests__/SvgIcon.spec.tsx +0 -67
- package/src/switch/Switch.stories.tsx +0 -60
- package/src/switch/SwitchOverrides.ts +0 -88
- package/src/switch/__tests__/Switch.spec.tsx +0 -204
- package/src/tabs/Tabs.stories.tsx +0 -40
- package/src/tabs/TabsOverrides.ts +0 -45
- package/src/tabs/__tests__/Tabs.spec.tsx +0 -226
- package/src/tag/Tag.stories.tsx +0 -53
- package/src/tag/Tag.tsx +0 -130
- package/src/tag/__tests__/Tag.spec.tsx +0 -82
- package/src/text-field/TextField.stories.tsx +0 -50
- package/src/text-field/TextFieldOverrides.tsx +0 -149
- package/src/text-field/__tests__/TextField.spec.tsx +0 -662
- package/src/theme/Color.ts +0 -117
- package/src/theme/SuperDispatchTheme.ts +0 -3
- package/src/theme/ThemeProvider.tsx +0 -179
- package/src/theme/__tests__/CssBaseline.spec.tsx +0 -49
- package/src/theme/__tests__/ThemeProvider.spec.ts +0 -40
- package/src/theme/__tests__/__snapshots__/ThemeProvider.spec.ts.snap +0 -204
- package/src/tiles/Tiles.stories.tsx +0 -69
- package/src/tiles/Tiles.tsx +0 -163
- package/src/tiles/__tests__/Tiles.spec.tsx +0 -221
- package/src/toolbar/ToolbarOverrides.ts +0 -14
- package/src/toolbar/__tests__/Toolbar.spec.tsx +0 -50
- package/src/tooltip/Tooltip.stories.tsx +0 -32
- package/src/tooltip/TooltipOverrides.ts +0 -34
- package/src/tooltip/__tests__/Tooltip.spec.tsx +0 -182
- package/src/typography/Typography.stories.tsx +0 -132
- package/src/typography/TypographyOverrides.ts +0 -125
- package/src/typography/__tests__/Typography.spec.tsx +0 -253
- package/src/utils/ExitTransitionPlaceholder.tsx +0 -22
- package/src/utils/ResizeObserver.tsx +0 -28
- package/src/utils/VisibilityObserver.tsx +0 -75
- package/src/utils/__tests__/ExitTransitionPlaceholder.spec.tsx +0 -34
- package/src/utils/isEmptyReactNode.ts +0 -11
- package/src/utils/mergeRefs.ts +0 -21
- package/src/utils/renderChildren.ts +0 -10
- package/src/utils/useUID.ts +0 -9
- package/tsconfig.json +0 -19
- /package/{pkg/dist-src → dist-src}/adaptive-toolbar/AdaptiveToolbar.js +0 -0
- /package/{pkg/dist-src → dist-src}/adaptive-vertical-toolbar/AdaptiveVerticalToolbar.js +0 -0
- /package/{pkg/dist-src → dist-src}/app-bar/AppBarOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/autocomplete/AutocompleteOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/avatar/AvatarOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/avatar-button/AvatarButton.js +0 -0
- /package/{pkg/dist-src → dist-src}/button/Button.js +0 -0
- /package/{pkg/dist-src → dist-src}/button/ButtonOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/card/CardOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/card-button/CardButton.js +0 -0
- /package/{pkg/dist-src → dist-src}/checkbox/CheckboxField.js +0 -0
- /package/{pkg/dist-src → dist-src}/checkbox/CheckboxGroudField.js +0 -0
- /package/{pkg/dist-src → dist-src}/checkbox/CheckboxOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/chip/ChipOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/columns/Column.js +0 -0
- /package/{pkg/dist-src → dist-src}/columns/Columns.js +0 -0
- /package/{pkg/dist-src → dist-src}/description-list/DescriptionList.js +0 -0
- /package/{pkg/dist-src → dist-src}/dialog/DialogOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/drawer/DrawerActions.js +0 -0
- /package/{pkg/dist-src → dist-src}/drawer/DrawerContent.js +0 -0
- /package/{pkg/dist-src → dist-src}/drawer/DrawerList.js +0 -0
- /package/{pkg/dist-src → dist-src}/drawer/DrawerOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/drawer/DrawerTitle.js +0 -0
- /package/{pkg/dist-src → dist-src}/dropdown-button/DropdownButton.js +0 -0
- /package/{pkg/dist-src → dist-src}/grid/GridStack.js +0 -0
- /package/{pkg/dist-src → dist-src}/grid/InlineGrid.js +0 -0
- /package/{pkg/dist-src → dist-src}/icon-button/IconButtonOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/info-card/InfoCard.js +0 -0
- /package/{pkg/dist-src → dist-src}/inline/Inline.js +0 -0
- /package/{pkg/dist-src → dist-src}/link/LinkOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/list/ListOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/menu/MenuOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/number-field/NumberField.js +0 -0
- /package/{pkg/dist-src → dist-src}/overflow-text/OverflowText.js +0 -0
- /package/{pkg/dist-src → dist-src}/pagination/PaginationOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/paper/PaperOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/props/AlignProps.js +0 -0
- /package/{pkg/dist-src → dist-src}/props/CollapseProp.js +0 -0
- /package/{pkg/dist-src → dist-src}/props/ResponsiveProp.js +0 -0
- /package/{pkg/dist-src → dist-src}/props/SpaceProp.js +0 -0
- /package/{pkg/dist-src → dist-src}/radio/RadioField.js +0 -0
- /package/{pkg/dist-src → dist-src}/radio/RadioGroupField.js +0 -0
- /package/{pkg/dist-src → dist-src}/radio/RadioOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/responsive/CollapseBreakpoint.js +0 -0
- /package/{pkg/dist-src → dist-src}/responsive/MinBreakpoint.js +0 -0
- /package/{pkg/dist-src → dist-src}/responsive/ResponsiveContext.js +0 -0
- /package/{pkg/dist-src → dist-src}/snackbar/Snackbar.js +0 -0
- /package/{pkg/dist-src → dist-src}/snackbar/SnackbarContent.js +0 -0
- /package/{pkg/dist-src → dist-src}/snackbar/SnackbarOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/snackbar/SnackbarStack.js +0 -0
- /package/{pkg/dist-src → dist-src}/stack/Stack.js +0 -0
- /package/{pkg/dist-src → dist-src}/svg-icon/SvgIconOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/switch/SwitchOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/tabs/TabsOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/tag/Tag.js +0 -0
- /package/{pkg/dist-src → dist-src}/text-field/TextFieldOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/theme/Color.js +0 -0
- /package/{pkg/dist-src → dist-src}/theme/SuperDispatchTheme.js +0 -0
- /package/{pkg/dist-src → dist-src}/theme/ThemeProvider.js +0 -0
- /package/{pkg/dist-src → dist-src}/tiles/Tiles.js +0 -0
- /package/{pkg/dist-src → dist-src}/toolbar/ToolbarOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/tooltip/TooltipOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/typography/TypographyOverrides.js +0 -0
- /package/{pkg/dist-src → dist-src}/utils/ExitTransitionPlaceholder.js +0 -0
- /package/{pkg/dist-src → dist-src}/utils/ResizeObserver.js +0 -0
- /package/{pkg/dist-src → dist-src}/utils/VisibilityObserver.js +0 -0
- /package/{pkg/dist-src → dist-src}/utils/isEmptyReactNode.js +0 -0
- /package/{pkg/dist-src → dist-src}/utils/mergeRefs.js +0 -0
- /package/{pkg/dist-src → dist-src}/utils/renderChildren.js +0 -0
- /package/{pkg/dist-src → dist-src}/utils/useUID.js +0 -0
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import { Switch } from '@material-ui/core';
|
|
2
|
-
import { renderCSS, renderTheme } from '@superdispatch/ui-testutils';
|
|
3
|
-
|
|
4
|
-
it('checks default props', () => {
|
|
5
|
-
const { props } = renderTheme();
|
|
6
|
-
|
|
7
|
-
expect(props.MuiSwitch).toMatchInlineSnapshot(`
|
|
8
|
-
Object {
|
|
9
|
-
"color": "primary",
|
|
10
|
-
"disableFocusRipple": true,
|
|
11
|
-
"disableRipple": true,
|
|
12
|
-
}
|
|
13
|
-
`);
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
it('checks component css', () => {
|
|
17
|
-
expect(renderCSS(<Switch />, ['MuiSwitch'])).toMatchInlineSnapshot(`
|
|
18
|
-
.MuiSwitch-root {
|
|
19
|
-
width: 76px;
|
|
20
|
-
height: 44px;
|
|
21
|
-
display: inline-flex;
|
|
22
|
-
padding: 6px 12px;
|
|
23
|
-
z-index: 0;
|
|
24
|
-
overflow: hidden;
|
|
25
|
-
position: relative;
|
|
26
|
-
box-sizing: border-box;
|
|
27
|
-
flex-shrink: 0;
|
|
28
|
-
vertical-align: middle;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@media print {
|
|
32
|
-
.MuiSwitch-root {
|
|
33
|
-
color-adjust: exact;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
@media (min-width: 600px) {
|
|
38
|
-
.MuiSwitch-root {
|
|
39
|
-
width: 64px;
|
|
40
|
-
height: 32px;
|
|
41
|
-
padding: 4px 12px;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.MuiSwitch-edgeStart {
|
|
46
|
-
margin-left: -8px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.MuiSwitch-edgeEnd {
|
|
50
|
-
margin-right: -8px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.MuiSwitch-switchBase {
|
|
54
|
-
top: 0;
|
|
55
|
-
left: 8px;
|
|
56
|
-
color: #fafafa;
|
|
57
|
-
padding: 10px 8px;
|
|
58
|
-
z-index: 1;
|
|
59
|
-
position: absolute;
|
|
60
|
-
transition: left 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
|
|
61
|
-
transform 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.MuiSwitch-switchBase.Mui-checked {
|
|
65
|
-
transform: translateX(20px);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.MuiSwitch-switchBase.Mui-disabled {
|
|
69
|
-
color: #bdbdbd;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
@media (min-width: 600px) {
|
|
73
|
-
.MuiSwitch-switchBase {
|
|
74
|
-
padding: 8px;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
@media (min-width: 600px) {
|
|
79
|
-
.MuiSwitch-switchBase.Mui-checked {
|
|
80
|
-
transform: translateX(16px);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.MuiSwitch-colorPrimary.Mui-disabled {
|
|
85
|
-
color: #bdbdbd;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.MuiSwitch-colorPrimary.Mui-checked + .MuiSwitch-track {
|
|
89
|
-
background-color: Color.Blue300;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.MuiSwitch-colorPrimary.Mui-disabled + .MuiSwitch-track {
|
|
93
|
-
background-color: Color.Silver300;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.MuiSwitch-colorPrimary + .MuiSwitch-track {
|
|
97
|
-
background-color: Color.Silver500;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.MuiSwitch-colorPrimary.Mui-checked.Mui-disabled + .MuiSwitch-track {
|
|
101
|
-
background-color: Color.Blue100;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.MuiSwitch-colorPrimary:hover + .MuiSwitch-track {
|
|
105
|
-
background-color: Color.Dark100;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.MuiSwitch-colorPrimary.Mui-focusVisible + .MuiSwitch-track {
|
|
109
|
-
box-shadow: 0 0 0 3px Color.Blue100;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
@media (hover: none) {
|
|
113
|
-
.MuiSwitch-colorPrimary.Mui-checked:hover {
|
|
114
|
-
background-color: transparent;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.MuiSwitch-colorPrimary.Mui-checked:hover + .MuiSwitch-track {
|
|
119
|
-
background-color: Color.Blue400;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.MuiSwitch-colorSecondary.Mui-checked {
|
|
123
|
-
color: #f50057;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.MuiSwitch-colorSecondary.Mui-disabled {
|
|
127
|
-
color: #bdbdbd;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.MuiSwitch-colorSecondary.Mui-checked + .MuiSwitch-track {
|
|
131
|
-
background-color: #f50057;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.MuiSwitch-colorSecondary.Mui-disabled + .MuiSwitch-track {
|
|
135
|
-
background-color: Color.Black;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.MuiSwitch-colorSecondary.Mui-checked:hover {
|
|
139
|
-
background-color: rgba(245, 0, 87, 0.04);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
@media (hover: none) {
|
|
143
|
-
.MuiSwitch-colorSecondary.Mui-checked:hover {
|
|
144
|
-
background-color: transparent;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.MuiSwitch-sizeSmall {
|
|
149
|
-
width: 40px;
|
|
150
|
-
height: 24px;
|
|
151
|
-
padding: 7px;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.MuiSwitch-sizeSmall .MuiSwitch-thumb {
|
|
155
|
-
width: 16px;
|
|
156
|
-
height: 16px;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.MuiSwitch-sizeSmall .MuiSwitch-switchBase {
|
|
160
|
-
padding: 4px;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.MuiSwitch-sizeSmall .MuiSwitch-switchBase.Mui-checked {
|
|
164
|
-
transform: translateX(16px);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.MuiSwitch-input {
|
|
168
|
-
left: -100%;
|
|
169
|
-
width: 300%;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.MuiSwitch-thumb {
|
|
173
|
-
color: Color.White;
|
|
174
|
-
width: 24px;
|
|
175
|
-
height: 24px;
|
|
176
|
-
border-radius: 50%;
|
|
177
|
-
background-color: currentColor;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
@media (min-width: 600px) {
|
|
181
|
-
.MuiSwitch-thumb {
|
|
182
|
-
width: 16px;
|
|
183
|
-
height: 16px;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.MuiSwitch-track {
|
|
188
|
-
width: 100%;
|
|
189
|
-
height: 100%;
|
|
190
|
-
z-index: -1;
|
|
191
|
-
box-shadow: 0 0 0 0 Color.Transparent;
|
|
192
|
-
transition: box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
|
|
193
|
-
background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
194
|
-
border-radius: 16px;
|
|
195
|
-
background-color: Color.Black;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
@media (min-width: 600px) {
|
|
199
|
-
.MuiSwitch-track {
|
|
200
|
-
border-radius: 13px;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
`);
|
|
204
|
-
});
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Tab, Tabs } from '@material-ui/core';
|
|
2
|
-
import { Meta } from '@storybook/react';
|
|
3
|
-
import { UseState } from '@superdispatch/ui-docs';
|
|
4
|
-
|
|
5
|
-
export default { title: 'Navigation/Tabs' } as Meta;
|
|
6
|
-
|
|
7
|
-
export const basic = () => (
|
|
8
|
-
<UseState initialState={1}>
|
|
9
|
-
{(state, setState) => (
|
|
10
|
-
<Tabs
|
|
11
|
-
value={state}
|
|
12
|
-
onChange={(_, next) => {
|
|
13
|
-
setState(next);
|
|
14
|
-
}}
|
|
15
|
-
>
|
|
16
|
-
<Tab value={1} label="Tab 1" />
|
|
17
|
-
<Tab value={2} label="Tab 2" />
|
|
18
|
-
<Tab value={3} label="Tab 3" />
|
|
19
|
-
</Tabs>
|
|
20
|
-
)}
|
|
21
|
-
</UseState>
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
export const scrollButtons = () => (
|
|
25
|
-
<UseState initialState={1}>
|
|
26
|
-
{(state, setState) => (
|
|
27
|
-
<Tabs
|
|
28
|
-
value={state}
|
|
29
|
-
scrollButtons="on"
|
|
30
|
-
onChange={(_, next) => {
|
|
31
|
-
setState(next);
|
|
32
|
-
}}
|
|
33
|
-
>
|
|
34
|
-
<Tab value={1} label="Tab 1" />
|
|
35
|
-
<Tab value={2} label="Tab 2" />
|
|
36
|
-
<Tab value={3} label="Tab 3" />
|
|
37
|
-
</Tabs>
|
|
38
|
-
)}
|
|
39
|
-
</UseState>
|
|
40
|
-
);
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Color } from '../theme/Color';
|
|
2
|
-
import { SuperDispatchTheme } from '../theme/SuperDispatchTheme';
|
|
3
|
-
|
|
4
|
-
export function overrideTabs(theme: SuperDispatchTheme): void {
|
|
5
|
-
theme.props.MuiTabs = {
|
|
6
|
-
variant: 'scrollable',
|
|
7
|
-
textColor: 'primary',
|
|
8
|
-
indicatorColor: 'primary',
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
theme.overrides.MuiTabs = {
|
|
12
|
-
root: { minHeight: theme.spacing(6) },
|
|
13
|
-
scrollButtons: {
|
|
14
|
-
opacity: 1,
|
|
15
|
-
color: Color.Dark100,
|
|
16
|
-
width: theme.spacing(4),
|
|
17
|
-
transition: theme.transitions.create('opacity', {
|
|
18
|
-
duration: theme.transitions.duration.short,
|
|
19
|
-
}),
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
theme.overrides.MuiTab = {
|
|
24
|
-
root: {
|
|
25
|
-
...theme.typography.body2,
|
|
26
|
-
|
|
27
|
-
minHeight: theme.spacing(6),
|
|
28
|
-
|
|
29
|
-
transition: theme.transitions.create(['color'], {
|
|
30
|
-
duration: theme.transitions.duration.short,
|
|
31
|
-
}),
|
|
32
|
-
|
|
33
|
-
[theme.breakpoints.up('sm')]: {
|
|
34
|
-
minWidth: undefined,
|
|
35
|
-
fontSize: undefined,
|
|
36
|
-
padding: theme.spacing(0.75, 3),
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
textColorPrimary: {
|
|
41
|
-
color: Color.Dark500,
|
|
42
|
-
'&:hover, &:focus': { color: Color.Blue300 },
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
}
|
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
import { Tab, Tabs } from '@material-ui/core';
|
|
2
|
-
import { renderCSS, renderTheme } from '@superdispatch/ui-testutils';
|
|
3
|
-
|
|
4
|
-
it('checks default props', () => {
|
|
5
|
-
const { props } = renderTheme();
|
|
6
|
-
|
|
7
|
-
expect(props.MuiTabs).toMatchInlineSnapshot(`
|
|
8
|
-
Object {
|
|
9
|
-
"indicatorColor": "primary",
|
|
10
|
-
"textColor": "primary",
|
|
11
|
-
"variant": "scrollable",
|
|
12
|
-
}
|
|
13
|
-
`);
|
|
14
|
-
expect(props.MuiTab).toMatchInlineSnapshot(`undefined`);
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
it('checks component css', () => {
|
|
18
|
-
expect(
|
|
19
|
-
renderCSS(
|
|
20
|
-
<Tabs value="tab" scrollButtons="on">
|
|
21
|
-
<Tab value="tab" label="Text" />
|
|
22
|
-
</Tabs>,
|
|
23
|
-
['MuiTab', 'MuiTabs', 'MuiTabScrollButton', 'PrivateTabIndicator'],
|
|
24
|
-
),
|
|
25
|
-
).toMatchInlineSnapshot(`
|
|
26
|
-
.MuiTab-root {
|
|
27
|
-
padding: 6px 12px;
|
|
28
|
-
overflow: hidden;
|
|
29
|
-
position: relative;
|
|
30
|
-
font-size: 14px;
|
|
31
|
-
max-width: 264px;
|
|
32
|
-
min-width: 72px;
|
|
33
|
-
box-sizing: border-box;
|
|
34
|
-
min-height: 48px;
|
|
35
|
-
text-align: center;
|
|
36
|
-
transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
37
|
-
flex-shrink: 0;
|
|
38
|
-
font-family: 'Inter', sans-serif;
|
|
39
|
-
font-weight: 400;
|
|
40
|
-
line-height: 20px;
|
|
41
|
-
white-space: normal;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@media (min-width: 0px) and (max-width: 599.95px) {
|
|
45
|
-
.MuiTab-root {
|
|
46
|
-
font-size: 16px;
|
|
47
|
-
line-height: 24px;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
@media (min-width: 600px) {
|
|
52
|
-
.MuiTab-root {
|
|
53
|
-
padding: 6px 24px;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.MuiTab-labelIcon {
|
|
58
|
-
min-height: 72px;
|
|
59
|
-
padding-top: 9px;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.MuiTab-labelIcon .MuiTab-wrapper > *:first-child {
|
|
63
|
-
margin-bottom: 6px;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.MuiTab-textColorInherit {
|
|
67
|
-
color: inherit;
|
|
68
|
-
opacity: 0.7;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.MuiTab-textColorInherit.Mui-selected {
|
|
72
|
-
opacity: 1;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.MuiTab-textColorInherit.Mui-disabled {
|
|
76
|
-
opacity: 0.5;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.MuiTab-textColorPrimary {
|
|
80
|
-
color: Color.Dark500;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.MuiTab-textColorPrimary.Mui-selected {
|
|
84
|
-
color: Color.Blue300;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.MuiTab-textColorPrimary.Mui-disabled {
|
|
88
|
-
color: Color.Dark100;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.MuiTab-textColorPrimary:hover,
|
|
92
|
-
.MuiTab-textColorPrimary:focus {
|
|
93
|
-
color: Color.Blue300;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.MuiTab-textColorSecondary {
|
|
97
|
-
color: Color.Dark200;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.MuiTab-textColorSecondary.Mui-selected {
|
|
101
|
-
color: #f50057;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.MuiTab-textColorSecondary.Mui-disabled {
|
|
105
|
-
color: Color.Dark100;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.MuiTab-fullWidth {
|
|
109
|
-
flex-grow: 1;
|
|
110
|
-
max-width: none;
|
|
111
|
-
flex-basis: 0;
|
|
112
|
-
flex-shrink: 1;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.MuiTab-wrapped {
|
|
116
|
-
font-size: 0.75rem;
|
|
117
|
-
line-height: 1.5;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.MuiTab-wrapper {
|
|
121
|
-
width: 100%;
|
|
122
|
-
display: inline-flex;
|
|
123
|
-
align-items: center;
|
|
124
|
-
flex-direction: column;
|
|
125
|
-
justify-content: center;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.MuiTabs-root {
|
|
129
|
-
display: flex;
|
|
130
|
-
overflow: hidden;
|
|
131
|
-
min-height: 48px;
|
|
132
|
-
-webkit-overflow-scrolling: touch;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.MuiTabs-vertical {
|
|
136
|
-
flex-direction: column;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.MuiTabs-flexContainer {
|
|
140
|
-
display: flex;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.MuiTabs-flexContainerVertical {
|
|
144
|
-
flex-direction: column;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.MuiTabs-centered {
|
|
148
|
-
justify-content: center;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.MuiTabs-scroller {
|
|
152
|
-
flex: 1 1 auto;
|
|
153
|
-
display: inline-block;
|
|
154
|
-
position: relative;
|
|
155
|
-
white-space: nowrap;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.MuiTabs-fixed {
|
|
159
|
-
width: 100%;
|
|
160
|
-
overflow-x: hidden;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.MuiTabs-scrollable {
|
|
164
|
-
overflow-x: scroll;
|
|
165
|
-
scrollbar-width: none;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.MuiTabs-scrollable::-webkit-scrollbar {
|
|
169
|
-
display: none;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.MuiTabs-scrollButtons {
|
|
173
|
-
color: Color.Dark100;
|
|
174
|
-
width: 32px;
|
|
175
|
-
opacity: 1;
|
|
176
|
-
transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
@media (max-width: 599.95px) {
|
|
180
|
-
.MuiTabs-scrollButtonsDesktop {
|
|
181
|
-
display: none;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.MuiTabScrollButton-root {
|
|
186
|
-
width: 40px;
|
|
187
|
-
opacity: 0.8;
|
|
188
|
-
flex-shrink: 0;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.MuiTabScrollButton-root.Mui-disabled {
|
|
192
|
-
opacity: 0;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.MuiTabScrollButton-vertical {
|
|
196
|
-
width: 100%;
|
|
197
|
-
height: 40px;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.MuiTabScrollButton-vertical svg {
|
|
201
|
-
transform: rotate(90deg);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.PrivateTabIndicator-root-1 {
|
|
205
|
-
width: 100%;
|
|
206
|
-
bottom: 0;
|
|
207
|
-
height: 2px;
|
|
208
|
-
position: absolute;
|
|
209
|
-
transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.PrivateTabIndicator-colorPrimary-2 {
|
|
213
|
-
background-color: Color.Blue300;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
.PrivateTabIndicator-colorSecondary-3 {
|
|
217
|
-
background-color: #f50057;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.PrivateTabIndicator-vertical-4 {
|
|
221
|
-
right: 0;
|
|
222
|
-
width: 2px;
|
|
223
|
-
height: 100%;
|
|
224
|
-
}
|
|
225
|
-
`);
|
|
226
|
-
});
|
package/src/tag/Tag.stories.tsx
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { Inline } from '../inline/Inline';
|
|
2
|
-
import { Tag } from './Tag';
|
|
3
|
-
|
|
4
|
-
export default { title: 'Data Display/Tag', component: Tag };
|
|
5
|
-
|
|
6
|
-
export const subtle = () => (
|
|
7
|
-
<Inline>
|
|
8
|
-
<Tag color="grey" variant="subtle">
|
|
9
|
-
Grey
|
|
10
|
-
</Tag>
|
|
11
|
-
<Tag color="blue" variant="subtle">
|
|
12
|
-
Blue
|
|
13
|
-
</Tag>
|
|
14
|
-
<Tag color="green" variant="subtle">
|
|
15
|
-
Green
|
|
16
|
-
</Tag>
|
|
17
|
-
<Tag color="purple" variant="subtle">
|
|
18
|
-
Purple
|
|
19
|
-
</Tag>
|
|
20
|
-
<Tag color="red" variant="subtle">
|
|
21
|
-
Red
|
|
22
|
-
</Tag>
|
|
23
|
-
<Tag color="teal" variant="subtle">
|
|
24
|
-
Teal
|
|
25
|
-
</Tag>
|
|
26
|
-
</Inline>
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
export const bold = () => (
|
|
30
|
-
<Inline>
|
|
31
|
-
<Tag color="grey" variant="bold">
|
|
32
|
-
Grey
|
|
33
|
-
</Tag>
|
|
34
|
-
<Tag color="blue" variant="bold">
|
|
35
|
-
Blue
|
|
36
|
-
</Tag>
|
|
37
|
-
<Tag color="green" variant="bold">
|
|
38
|
-
Green
|
|
39
|
-
</Tag>
|
|
40
|
-
<Tag color="purple" variant="bold">
|
|
41
|
-
Purple
|
|
42
|
-
</Tag>
|
|
43
|
-
<Tag color="red" variant="bold">
|
|
44
|
-
Red
|
|
45
|
-
</Tag>
|
|
46
|
-
<Tag color="teal" variant="bold">
|
|
47
|
-
Teal
|
|
48
|
-
</Tag>
|
|
49
|
-
<Tag color="yellow" variant="bold">
|
|
50
|
-
Yellow
|
|
51
|
-
</Tag>
|
|
52
|
-
</Inline>
|
|
53
|
-
);
|
package/src/tag/Tag.tsx
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { Theme, Typography, TypographyProps } from '@material-ui/core';
|
|
2
|
-
import { ClassNameMap, makeStyles } from '@material-ui/styles';
|
|
3
|
-
import cx from 'clsx';
|
|
4
|
-
import {
|
|
5
|
-
ElementType,
|
|
6
|
-
forwardRef,
|
|
7
|
-
ForwardRefExoticComponent,
|
|
8
|
-
RefAttributes,
|
|
9
|
-
} from 'react';
|
|
10
|
-
import { Color } from '../theme/Color';
|
|
11
|
-
|
|
12
|
-
export type TagClassKey =
|
|
13
|
-
| 'root'
|
|
14
|
-
| 'colorGrey'
|
|
15
|
-
| 'colorBlue'
|
|
16
|
-
| 'colorGreen'
|
|
17
|
-
| 'colorPurple'
|
|
18
|
-
| 'colorRed'
|
|
19
|
-
| 'colorTeal'
|
|
20
|
-
| 'colorYellow'
|
|
21
|
-
| 'variantSubtle'
|
|
22
|
-
| 'variantBold';
|
|
23
|
-
|
|
24
|
-
const useStyles = makeStyles<
|
|
25
|
-
Theme,
|
|
26
|
-
{ classes?: Partial<ClassNameMap<TagClassKey>> },
|
|
27
|
-
TagClassKey
|
|
28
|
-
>(
|
|
29
|
-
(theme) => ({
|
|
30
|
-
root: {
|
|
31
|
-
maxWidth: '100%',
|
|
32
|
-
alignItems: 'center',
|
|
33
|
-
display: 'inline-flex',
|
|
34
|
-
borderRadius: theme.spacing(0.5),
|
|
35
|
-
padding: theme.spacing(0, 0.5),
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
variantSubtle: {
|
|
39
|
-
'&$colorGrey': { color: Color.Dark300, backgroundColor: Color.Silver200 },
|
|
40
|
-
'&$colorBlue': { color: Color.Blue500, backgroundColor: Color.Blue50 },
|
|
41
|
-
'&$colorGreen': { color: Color.Green500, backgroundColor: Color.Green50 },
|
|
42
|
-
'&$colorPurple': {
|
|
43
|
-
color: Color.Purple500,
|
|
44
|
-
backgroundColor: Color.Purple50,
|
|
45
|
-
},
|
|
46
|
-
'&$colorRed': { color: Color.Red500, backgroundColor: Color.Red50 },
|
|
47
|
-
'&$colorTeal': { color: Color.Teal500, backgroundColor: Color.Teal50 },
|
|
48
|
-
'&$colorYellow': {
|
|
49
|
-
color: Color.Yellow500,
|
|
50
|
-
backgroundColor: Color.Yellow50,
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
variantBold: {
|
|
55
|
-
color: Color.White,
|
|
56
|
-
|
|
57
|
-
'&$colorGrey': { backgroundColor: Color.Dark300 },
|
|
58
|
-
'&$colorBlue': { backgroundColor: Color.Blue500 },
|
|
59
|
-
'&$colorGreen': { backgroundColor: Color.Green500 },
|
|
60
|
-
'&$colorPurple': { backgroundColor: Color.Purple500 },
|
|
61
|
-
'&$colorRed': { backgroundColor: Color.Red500 },
|
|
62
|
-
'&$colorTeal': { backgroundColor: Color.Teal500 },
|
|
63
|
-
'&$colorYellow': { backgroundColor: Color.Yellow500 },
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
colorGrey: {},
|
|
67
|
-
colorBlue: {},
|
|
68
|
-
colorGreen: {},
|
|
69
|
-
colorPurple: {},
|
|
70
|
-
colorRed: {},
|
|
71
|
-
colorTeal: {},
|
|
72
|
-
colorYellow: {},
|
|
73
|
-
}),
|
|
74
|
-
{ name: 'SD-Tag' },
|
|
75
|
-
);
|
|
76
|
-
|
|
77
|
-
export interface TagProps
|
|
78
|
-
extends RefAttributes<unknown>,
|
|
79
|
-
Omit<TypographyProps, 'ref' | 'classes' | 'color' | 'variant'> {
|
|
80
|
-
classes?: Partial<ClassNameMap<TagClassKey>>;
|
|
81
|
-
component?: ElementType;
|
|
82
|
-
|
|
83
|
-
color: 'grey' | 'blue' | 'green' | 'purple' | 'red' | 'teal' | 'yellow';
|
|
84
|
-
variant: 'subtle' | 'bold';
|
|
85
|
-
fontWeight?: 'regular' | 'bold';
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export const Tag: ForwardRefExoticComponent<TagProps> = forwardRef(
|
|
89
|
-
(
|
|
90
|
-
{
|
|
91
|
-
color,
|
|
92
|
-
variant,
|
|
93
|
-
children,
|
|
94
|
-
classes,
|
|
95
|
-
className,
|
|
96
|
-
noWrap = true,
|
|
97
|
-
fontWeight = 'bold',
|
|
98
|
-
component = 'div' as const,
|
|
99
|
-
...props
|
|
100
|
-
},
|
|
101
|
-
ref,
|
|
102
|
-
) => {
|
|
103
|
-
const styles = useStyles({ classes });
|
|
104
|
-
|
|
105
|
-
return (
|
|
106
|
-
<Typography
|
|
107
|
-
{...props}
|
|
108
|
-
ref={ref}
|
|
109
|
-
noWrap={noWrap}
|
|
110
|
-
component={component}
|
|
111
|
-
variant={fontWeight === 'bold' ? 'body1' : 'body2'}
|
|
112
|
-
className={cx(
|
|
113
|
-
styles.root,
|
|
114
|
-
color === 'grey' && styles.colorGrey,
|
|
115
|
-
color === 'blue' && styles.colorBlue,
|
|
116
|
-
color === 'green' && styles.colorGreen,
|
|
117
|
-
color === 'purple' && styles.colorPurple,
|
|
118
|
-
color === 'red' && styles.colorRed,
|
|
119
|
-
color === 'teal' && styles.colorTeal,
|
|
120
|
-
color === 'yellow' && styles.colorYellow,
|
|
121
|
-
variant === 'subtle' && styles.variantSubtle,
|
|
122
|
-
variant === 'bold' && styles.variantBold,
|
|
123
|
-
className,
|
|
124
|
-
)}
|
|
125
|
-
>
|
|
126
|
-
{children}
|
|
127
|
-
</Typography>
|
|
128
|
-
);
|
|
129
|
-
},
|
|
130
|
-
);
|