@superdispatch/ui 0.21.8 → 0.21.13
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/.babelrc.js +5 -0
- package/.turbo/turbo-version.log +28 -0
- package/package.json +65 -39
- package/pkg/README.md +30 -0
- package/{dist-types → pkg/dist-types}/index.d.ts +364 -364
- package/pkg/package.json +39 -0
- package/playroom.ts +31 -0
- package/src/__tests__/index.spec.ts +134 -0
- package/src/adaptive-toolbar/AdaptiveToolbar.stories.tsx +50 -0
- package/src/adaptive-toolbar/AdaptiveToolbar.tsx +199 -0
- package/src/adaptive-toolbar/__tests__/AdaptiveToolbar.spec.tsx +11 -0
- package/src/adaptive-vertical-toolbar/AdaptiveVerticalToolbar.stories.tsx +49 -0
- package/src/adaptive-vertical-toolbar/AdaptiveVerticalToolbar.tsx +171 -0
- package/src/app-bar/AppBar.stories.tsx +62 -0
- package/src/app-bar/AppBarOverrides.ts +9 -0
- package/src/app-bar/__tests__/AppBar.spec.tsx +86 -0
- package/src/autocomplete/Autocomplete.stories.tsx +76 -0
- package/src/autocomplete/AutocompleteOverrides.tsx +58 -0
- package/src/autocomplete/__tests__/Autocomplete.spec.tsx +323 -0
- package/src/avatar/Avatar.stories.tsx +17 -0
- package/src/avatar/AvatarOverrides.ts +24 -0
- package/src/avatar/__tests__/Avatar.spec.tsx +71 -0
- package/src/avatar-button/AvatarButton.stories.tsx +153 -0
- package/src/avatar-button/AvatarButton.tsx +223 -0
- package/src/avatar-button/__tests__/AvatarButton.spec.tsx +126 -0
- package/src/button/Button.tsx +51 -0
- package/src/button/ButtonOverrides.ts +375 -0
- package/src/button/__tests__/Button.spec.tsx +599 -0
- package/src/card/Card.stories.tsx +39 -0
- package/src/card/CardOverrides.ts +9 -0
- package/src/card/__tests__/Card.spec.tsx +68 -0
- package/src/card-button/CardButton.stories.tsx +36 -0
- package/src/card-button/CardButton.tsx +202 -0
- package/src/card-button/__tests__/CardButton.spec.tsx +95 -0
- package/src/checkbox/CheckboxField.stories.tsx +61 -0
- package/src/checkbox/CheckboxField.tsx +56 -0
- package/src/checkbox/CheckboxGroudField.tsx +53 -0
- package/src/checkbox/CheckboxOverrides.tsx +55 -0
- package/src/checkbox/__tests__/Checkbox.spec.tsx +105 -0
- package/src/chip/Chip.stories.tsx +26 -0
- package/src/chip/ChipOverrides.tsx +111 -0
- package/src/chip/__tests__/Chip.spec.tsx +308 -0
- package/src/columns/Column.tsx +124 -0
- package/src/columns/Columns.stories.tsx +426 -0
- package/src/columns/Columns.tsx +76 -0
- package/src/description-list/DescriptionList.spec.tsx +137 -0
- package/src/description-list/DescriptionList.stories.tsx +148 -0
- package/src/description-list/DescriptionList.tsx +170 -0
- package/src/dialog/Dialog.playroom.tsx +24 -0
- package/src/dialog/Dialog.stories.tsx +60 -0
- package/src/dialog/DialogOverrides.ts +39 -0
- package/src/dialog/__tests__/Dialog.spec.tsx +219 -0
- package/src/drawer/Drawer.playroom.tsx +22 -0
- package/src/drawer/Drawer.stories.tsx +194 -0
- package/src/drawer/DrawerActions.tsx +69 -0
- package/src/drawer/DrawerContent.tsx +30 -0
- package/src/drawer/DrawerList.tsx +60 -0
- package/src/drawer/DrawerOverrides.ts +19 -0
- package/src/drawer/DrawerTitle.tsx +143 -0
- package/src/drawer/__tests__/Drawer.spec.tsx +227 -0
- package/src/dropdown-button/DropdownButton.stories.tsx +15 -0
- package/src/dropdown-button/DropdownButton.tsx +131 -0
- package/src/grid/GridStack.tsx +45 -0
- package/src/grid/InlineGrid.tsx +56 -0
- package/src/icon-button/IconButton.stories.tsx +53 -0
- package/src/icon-button/IconButtonOverrides.ts +32 -0
- package/src/icon-button/__tests__/IconButton.spec.tsx +124 -0
- package/src/index.ts +47 -0
- package/src/info-card/InfoCard.stories.tsx +29 -0
- package/src/info-card/InfoCard.tsx +95 -0
- package/src/info-card/__tests__/InfoCard.spec.tsx +22 -0
- package/src/info-tooltip/InfoTooltip.stories.tsx +77 -0
- package/src/info-tooltip/InfoTooltip.tsx +72 -0
- package/src/info-tooltip/__tests__/InfoTooltip.spec.tsx +166 -0
- package/src/inline/Inline.stories.tsx +135 -0
- package/src/inline/Inline.tsx +144 -0
- package/src/link/Link.stories.tsx +41 -0
- package/src/link/LinkOverrides.ts +43 -0
- package/src/link/__tests__/Link.spec.tsx +98 -0
- package/src/list/ListOverrides.ts +11 -0
- package/src/list/__tests__/List.spec.tsx +182 -0
- package/src/menu/Menu.stories.tsx +35 -0
- package/src/menu/MenuOverrides.ts +17 -0
- package/src/menu/__tests__/Menu.spec.tsx +99 -0
- package/src/number-field/NumberField.stories.tsx +123 -0
- package/src/number-field/NumberField.tsx +98 -0
- package/src/overflow-text/OverflowText.stories.tsx +32 -0
- package/src/overflow-text/OverflowText.tsx +114 -0
- package/src/overflow-text/__tests__/OverflowText.spec.tsx +24 -0
- package/src/pagination/Pagination.stories.tsx +36 -0
- package/src/pagination/PaginationOverrides.ts +47 -0
- package/src/pagination/__tests__/Pagination.spec.tsx +228 -0
- package/src/paper/PaperOverrides.ts +10 -0
- package/src/paper/__tests__/Paper.spec.tsx +155 -0
- package/src/props/AlignProps.ts +22 -0
- package/src/props/CollapseProp.ts +13 -0
- package/src/props/ResponsiveProp.ts +65 -0
- package/src/props/SpaceProp.ts +40 -0
- package/src/radio/RadioField.stories.tsx +42 -0
- package/src/radio/RadioField.tsx +55 -0
- package/src/radio/RadioGroupField.tsx +64 -0
- package/src/radio/RadioOverrides.tsx +51 -0
- package/src/radio/__tests__/Radio.spec.tsx +90 -0
- package/src/responsive/CollapseBreakpoint.ts +21 -0
- package/src/responsive/MinBreakpoint.ts +21 -0
- package/src/responsive/ResponsiveContext.tsx +57 -0
- package/src/snackbar/Snackbar.stories.tsx +196 -0
- package/src/snackbar/Snackbar.tsx +83 -0
- package/src/snackbar/SnackbarContent.tsx +147 -0
- package/src/snackbar/SnackbarOverrides.ts +23 -0
- package/src/snackbar/SnackbarStack.tsx +160 -0
- package/src/snackbar/__tests__/Snackbar.spec.tsx +196 -0
- package/src/stack/Stack.stories.tsx +113 -0
- package/src/stack/Stack.tsx +86 -0
- package/src/svg-icon/SvgIcon.stories.tsx +29 -0
- package/src/svg-icon/SvgIconOverrides.ts +32 -0
- package/src/svg-icon/__tests__/SvgIcon.spec.tsx +67 -0
- package/src/switch/Switch.stories.tsx +60 -0
- package/src/switch/SwitchOverrides.ts +88 -0
- package/src/switch/__tests__/Switch.spec.tsx +204 -0
- package/src/tabs/Tabs.stories.tsx +40 -0
- package/src/tabs/TabsOverrides.ts +45 -0
- package/src/tabs/__tests__/Tabs.spec.tsx +226 -0
- package/src/tag/Tag.stories.tsx +53 -0
- package/src/tag/Tag.tsx +130 -0
- package/src/tag/__tests__/Tag.spec.tsx +82 -0
- package/src/text-field/TextField.stories.tsx +50 -0
- package/src/text-field/TextFieldOverrides.tsx +149 -0
- package/src/text-field/__tests__/TextField.spec.tsx +662 -0
- package/src/theme/Color.ts +117 -0
- package/src/theme/SuperDispatchTheme.ts +3 -0
- package/src/theme/ThemeProvider.tsx +179 -0
- package/src/theme/__tests__/CssBaseline.spec.tsx +49 -0
- package/src/theme/__tests__/ThemeProvider.spec.ts +40 -0
- package/src/theme/__tests__/__snapshots__/ThemeProvider.spec.ts.snap +204 -0
- package/src/tiles/Tiles.stories.tsx +69 -0
- package/src/tiles/Tiles.tsx +163 -0
- package/src/tiles/__tests__/Tiles.spec.tsx +221 -0
- package/src/toolbar/ToolbarOverrides.ts +14 -0
- package/src/toolbar/__tests__/Toolbar.spec.tsx +50 -0
- package/src/tooltip/Tooltip.stories.tsx +32 -0
- package/src/tooltip/TooltipOverrides.ts +34 -0
- package/src/tooltip/__tests__/Tooltip.spec.tsx +182 -0
- package/src/typography/Typography.stories.tsx +132 -0
- package/src/typography/TypographyOverrides.ts +125 -0
- package/src/typography/__tests__/Typography.spec.tsx +253 -0
- package/src/utils/ExitTransitionPlaceholder.tsx +22 -0
- package/src/utils/ResizeObserver.tsx +28 -0
- package/src/utils/VisibilityObserver.tsx +75 -0
- package/src/utils/__tests__/ExitTransitionPlaceholder.spec.tsx +34 -0
- package/src/utils/isEmptyReactNode.ts +11 -0
- package/src/utils/mergeRefs.ts +21 -0
- package/src/utils/renderChildren.ts +10 -0
- package/src/utils/useUID.ts +9 -0
- package/tsconfig.json +19 -0
- package/LICENSE +0 -21
- /package/{dist-node → pkg/dist-node}/index.js +0 -0
- /package/{dist-node → pkg/dist-node}/index.js.map +0 -0
- /package/{dist-src → pkg/dist-src}/adaptive-toolbar/AdaptiveToolbar.js +0 -0
- /package/{dist-src → pkg/dist-src}/adaptive-vertical-toolbar/AdaptiveVerticalToolbar.js +0 -0
- /package/{dist-src → pkg/dist-src}/app-bar/AppBarOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/autocomplete/AutocompleteOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/avatar/AvatarOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/avatar-button/AvatarButton.js +0 -0
- /package/{dist-src → pkg/dist-src}/button/Button.js +0 -0
- /package/{dist-src → pkg/dist-src}/button/ButtonOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/card/CardOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/card-button/CardButton.js +0 -0
- /package/{dist-src → pkg/dist-src}/checkbox/CheckboxField.js +0 -0
- /package/{dist-src → pkg/dist-src}/checkbox/CheckboxGroudField.js +0 -0
- /package/{dist-src → pkg/dist-src}/checkbox/CheckboxOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/chip/ChipOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/columns/Column.js +0 -0
- /package/{dist-src → pkg/dist-src}/columns/Columns.js +0 -0
- /package/{dist-src → pkg/dist-src}/description-list/DescriptionList.js +0 -0
- /package/{dist-src → pkg/dist-src}/dialog/DialogOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/drawer/DrawerActions.js +0 -0
- /package/{dist-src → pkg/dist-src}/drawer/DrawerContent.js +0 -0
- /package/{dist-src → pkg/dist-src}/drawer/DrawerList.js +0 -0
- /package/{dist-src → pkg/dist-src}/drawer/DrawerOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/drawer/DrawerTitle.js +0 -0
- /package/{dist-src → pkg/dist-src}/dropdown-button/DropdownButton.js +0 -0
- /package/{dist-src → pkg/dist-src}/grid/GridStack.js +0 -0
- /package/{dist-src → pkg/dist-src}/grid/InlineGrid.js +0 -0
- /package/{dist-src → pkg/dist-src}/icon-button/IconButtonOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/index.js +0 -0
- /package/{dist-src → pkg/dist-src}/info-card/InfoCard.js +0 -0
- /package/{dist-src → pkg/dist-src}/inline/Inline.js +0 -0
- /package/{dist-src → pkg/dist-src}/link/LinkOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/list/ListOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/menu/MenuOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/number-field/NumberField.js +0 -0
- /package/{dist-src → pkg/dist-src}/overflow-text/OverflowText.js +0 -0
- /package/{dist-src → pkg/dist-src}/pagination/PaginationOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/paper/PaperOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/props/AlignProps.js +0 -0
- /package/{dist-src → pkg/dist-src}/props/CollapseProp.js +0 -0
- /package/{dist-src → pkg/dist-src}/props/ResponsiveProp.js +0 -0
- /package/{dist-src → pkg/dist-src}/props/SpaceProp.js +0 -0
- /package/{dist-src → pkg/dist-src}/radio/RadioField.js +0 -0
- /package/{dist-src → pkg/dist-src}/radio/RadioGroupField.js +0 -0
- /package/{dist-src → pkg/dist-src}/radio/RadioOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/responsive/CollapseBreakpoint.js +0 -0
- /package/{dist-src → pkg/dist-src}/responsive/MinBreakpoint.js +0 -0
- /package/{dist-src → pkg/dist-src}/responsive/ResponsiveContext.js +0 -0
- /package/{dist-src → pkg/dist-src}/snackbar/Snackbar.js +0 -0
- /package/{dist-src → pkg/dist-src}/snackbar/SnackbarContent.js +0 -0
- /package/{dist-src → pkg/dist-src}/snackbar/SnackbarOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/snackbar/SnackbarStack.js +0 -0
- /package/{dist-src → pkg/dist-src}/stack/Stack.js +0 -0
- /package/{dist-src → pkg/dist-src}/svg-icon/SvgIconOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/switch/SwitchOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/tabs/TabsOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/tag/Tag.js +0 -0
- /package/{dist-src → pkg/dist-src}/text-field/TextFieldOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/theme/Color.js +0 -0
- /package/{dist-src → pkg/dist-src}/theme/SuperDispatchTheme.js +0 -0
- /package/{dist-src → pkg/dist-src}/theme/ThemeProvider.js +0 -0
- /package/{dist-src → pkg/dist-src}/tiles/Tiles.js +0 -0
- /package/{dist-src → pkg/dist-src}/toolbar/ToolbarOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/tooltip/TooltipOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/typography/TypographyOverrides.js +0 -0
- /package/{dist-src → pkg/dist-src}/utils/ExitTransitionPlaceholder.js +0 -0
- /package/{dist-src → pkg/dist-src}/utils/ResizeObserver.js +0 -0
- /package/{dist-src → pkg/dist-src}/utils/VisibilityObserver.js +0 -0
- /package/{dist-src → pkg/dist-src}/utils/isEmptyReactNode.js +0 -0
- /package/{dist-src → pkg/dist-src}/utils/mergeRefs.js +0 -0
- /package/{dist-src → pkg/dist-src}/utils/renderChildren.js +0 -0
- /package/{dist-src → pkg/dist-src}/utils/useUID.js +0 -0
- /package/{dist-web → pkg/dist-web}/index.js +0 -0
- /package/{dist-web → pkg/dist-web}/index.js.map +0 -0
|
@@ -0,0 +1,599 @@
|
|
|
1
|
+
import { renderCSS, renderTheme } from '@superdispatch/ui-testutils';
|
|
2
|
+
import { Button } from '../..';
|
|
3
|
+
|
|
4
|
+
it('checks default props', () => {
|
|
5
|
+
const { props } = renderTheme();
|
|
6
|
+
|
|
7
|
+
expect(props.MuiButton).toMatchInlineSnapshot(`
|
|
8
|
+
Object {
|
|
9
|
+
"color": "primary",
|
|
10
|
+
"disableFocusRipple": true,
|
|
11
|
+
"variant": "outlined",
|
|
12
|
+
}
|
|
13
|
+
`);
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('checks component css', () => {
|
|
17
|
+
expect(
|
|
18
|
+
renderCSS(
|
|
19
|
+
<Button variant="text" color="primary">
|
|
20
|
+
Text
|
|
21
|
+
</Button>,
|
|
22
|
+
['MuiButton'],
|
|
23
|
+
),
|
|
24
|
+
).toMatchInlineSnapshot(`
|
|
25
|
+
.MuiButton-root {
|
|
26
|
+
padding: 10px 24px;
|
|
27
|
+
font-size: 14px;
|
|
28
|
+
min-width: 48px;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
transition: color 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
|
|
31
|
+
border 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
|
|
32
|
+
box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
|
|
33
|
+
background-color 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
34
|
+
font-family: 'Inter', sans-serif;
|
|
35
|
+
font-weight: 600;
|
|
36
|
+
line-height: 20px;
|
|
37
|
+
border-radius: 4px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@media (min-width: 0px) and (max-width: 599.95px) {
|
|
41
|
+
.MuiButton-root {
|
|
42
|
+
font-size: 16px;
|
|
43
|
+
line-height: 24px;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.MuiButton-root:hover {
|
|
48
|
+
text-decoration: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@media (min-width: 600px) {
|
|
52
|
+
.MuiButton-root {
|
|
53
|
+
padding: 6px 16px;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.MuiButton-root[aria-busy='true'] .MuiButton-label {
|
|
58
|
+
visibility: hidden;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.MuiButton-root[aria-busy='true'] .MuiButton-label > [role='progressbar'] {
|
|
62
|
+
top: calc(50% - 0.5em);
|
|
63
|
+
left: calc(50% - 0.5em);
|
|
64
|
+
position: absolute;
|
|
65
|
+
font-size: 16px;
|
|
66
|
+
visibility: visible;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.MuiButton-sizeLarge
|
|
70
|
+
.MuiButton-root[aria-busy='true']
|
|
71
|
+
.MuiButton-label
|
|
72
|
+
> [role='progressbar'] {
|
|
73
|
+
font-size: 24px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.MuiButton-label {
|
|
77
|
+
width: 100%;
|
|
78
|
+
display: inherit;
|
|
79
|
+
align-items: inherit;
|
|
80
|
+
justify-content: inherit;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.MuiButton-label > .MuiSvgIcon-root {
|
|
84
|
+
font-size: 24px;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@media (min-width: 600px) {
|
|
88
|
+
.MuiButton-label > .MuiSvgIcon-root {
|
|
89
|
+
font-size: 20px;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.MuiButton-sizeLarge .MuiButton-label > .MuiSvgIcon-root {
|
|
94
|
+
font-size: 28px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@media (min-width: 600px) {
|
|
98
|
+
.MuiButton-sizeLarge .MuiButton-label > .MuiSvgIcon-root {
|
|
99
|
+
font-size: 24px;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.MuiButton-text[data-color='error'] {
|
|
104
|
+
color: Color.Red300;
|
|
105
|
+
box-shadow: 0 0 0 0px Color.Transparent;
|
|
106
|
+
background-color: Color.Transparent;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.MuiButton-text[data-color='success'] {
|
|
110
|
+
color: Color.Green300;
|
|
111
|
+
box-shadow: 0 0 0 0px Color.Transparent;
|
|
112
|
+
background-color: Color.Transparent;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.MuiButton-text[data-color='white'] {
|
|
116
|
+
color: Color.White;
|
|
117
|
+
box-shadow: 0 0 0 0px Color.Transparent;
|
|
118
|
+
background-color: Color.Transparent;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.MuiButton-text[data-color='white']:hover {
|
|
122
|
+
background-color: Color.White10;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.MuiButton-text[data-color='white'][aria-expanded='true'] {
|
|
126
|
+
background-color: Color.White10;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.MuiButton-text[data-color='white']:focus {
|
|
130
|
+
box-shadow: 0 0 0 2px Color.White50;
|
|
131
|
+
background-color: Color.White10;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.MuiButton-text[data-color='white'].Mui-disabled {
|
|
135
|
+
color: Color.White50;
|
|
136
|
+
box-shadow: 0 0 0 0px Color.Transparent;
|
|
137
|
+
background-color: Color.Transparent;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.MuiButton-text[data-color='white'].Mui-disabled[aria-busy='true'] {
|
|
141
|
+
color: Color.White50;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.MuiButton-text[data-color='success']:hover {
|
|
145
|
+
background-color: Color.Green50;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.MuiButton-text[data-color='success'][aria-expanded='true'] {
|
|
149
|
+
background-color: Color.Green50;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.MuiButton-text[data-color='success']:focus {
|
|
153
|
+
box-shadow: 0 0 0 2px Color.Green100;
|
|
154
|
+
background-color: Color.Green50;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.MuiButton-text[data-color='success'].Mui-disabled {
|
|
158
|
+
color: Color.Green100;
|
|
159
|
+
box-shadow: 0 0 0 0px Color.Transparent;
|
|
160
|
+
background-color: Color.Transparent;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.MuiButton-text[data-color='success'].Mui-disabled[aria-busy='true'] {
|
|
164
|
+
color: Color.Green200;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.MuiButton-text[data-color='error']:hover {
|
|
168
|
+
background-color: Color.Red50;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.MuiButton-text[data-color='error'][aria-expanded='true'] {
|
|
172
|
+
background-color: Color.Red50;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.MuiButton-text[data-color='error']:focus {
|
|
176
|
+
box-shadow: 0 0 0 2px Color.Red100;
|
|
177
|
+
background-color: Color.Red50;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.MuiButton-text[data-color='error'].Mui-disabled {
|
|
181
|
+
color: Color.Red100;
|
|
182
|
+
box-shadow: 0 0 0 0px Color.Transparent;
|
|
183
|
+
background-color: Color.Transparent;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.MuiButton-text[data-color='error'].Mui-disabled[aria-busy='true'] {
|
|
187
|
+
color: Color.Red200;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.MuiButton-textPrimary {
|
|
191
|
+
color: Color.Blue300;
|
|
192
|
+
box-shadow: 0 0 0 0px Color.Transparent;
|
|
193
|
+
background-color: Color.Transparent;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.MuiButton-textPrimary:hover {
|
|
197
|
+
background-color: Color.Blue50;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.MuiButton-textPrimary[aria-expanded='true'] {
|
|
201
|
+
background-color: Color.Blue50;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.MuiButton-textPrimary:focus {
|
|
205
|
+
box-shadow: 0 0 0 2px Color.Blue100;
|
|
206
|
+
background-color: Color.Blue50;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.MuiButton-textPrimary.Mui-disabled {
|
|
210
|
+
color: Color.Blue100;
|
|
211
|
+
box-shadow: 0 0 0 0px Color.Transparent;
|
|
212
|
+
background-color: Color.Transparent;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.MuiButton-textPrimary.Mui-disabled[aria-busy='true'] {
|
|
216
|
+
color: Color.Blue200;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
@media (hover: none) {
|
|
220
|
+
.MuiButton-textPrimary:hover {
|
|
221
|
+
background-color: transparent;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.MuiButton-textSecondary {
|
|
226
|
+
color: #f50057;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.MuiButton-textSecondary:hover {
|
|
230
|
+
background-color: rgba(245, 0, 87, 0.04);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
@media (hover: none) {
|
|
234
|
+
.MuiButton-textSecondary:hover {
|
|
235
|
+
background-color: transparent;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.MuiButton-outlined[data-color='error'] {
|
|
240
|
+
color: Color.Red300;
|
|
241
|
+
box-shadow: inset 0 0 0 1px Color.Red300, 0 0 0 2px Color.Transparent;
|
|
242
|
+
background-color: Color.White;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.MuiButton-outlined[data-color='success'] {
|
|
246
|
+
color: Color.Green300;
|
|
247
|
+
box-shadow: inset 0 0 0 1px Color.Green300, 0 0 0 2px Color.Transparent;
|
|
248
|
+
background-color: Color.White;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.MuiButton-outlined[data-color='white'] {
|
|
252
|
+
color: Color.White;
|
|
253
|
+
box-shadow: inset 0 0 0 1px Color.White50, 0 0 0 2px Color.Transparent;
|
|
254
|
+
background-color: Color.Transparent;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.MuiButton-outlined[data-color='white']:hover {
|
|
258
|
+
color: Color.White;
|
|
259
|
+
box-shadow: inset 0 0 0 1px Color.White50, 0 0 0 2px Color.Transparent;
|
|
260
|
+
background-color: Color.White10;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.MuiButton-outlined[data-color='white'][aria-expanded='true'] {
|
|
264
|
+
color: Color.White;
|
|
265
|
+
box-shadow: inset 0 0 0 1px Color.White50, 0 0 0 2px Color.Transparent;
|
|
266
|
+
background-color: Color.White10;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.MuiButton-outlined[data-color='white']:focus {
|
|
270
|
+
box-shadow: inset 0 0 0 1px Color.White50, 0 0 0 2px Color.White40;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.MuiButton-outlined[data-color='white'].Mui-disabled {
|
|
274
|
+
color: Color.White50;
|
|
275
|
+
box-shadow: inset 0 0 0 1px Color.White40, 0 0 0 2px Color.Transparent;
|
|
276
|
+
background-color: Color.Transparent;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.MuiButton-outlined[data-color='white'].Mui-disabled[aria-busy='true'] {
|
|
280
|
+
color: Color.White50;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.MuiButton-outlined[data-color='success']:hover {
|
|
284
|
+
color: Color.Green300;
|
|
285
|
+
box-shadow: inset 0 0 0 1px Color.Green300, 0 0 0 2px Color.Transparent;
|
|
286
|
+
background-color: Color.Green50;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.MuiButton-outlined[data-color='success'][aria-expanded='true'] {
|
|
290
|
+
color: Color.Green300;
|
|
291
|
+
box-shadow: inset 0 0 0 1px Color.Green300, 0 0 0 2px Color.Transparent;
|
|
292
|
+
background-color: Color.Green50;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.MuiButton-outlined[data-color='success']:focus {
|
|
296
|
+
box-shadow: inset 0 0 0 1px Color.Green300, 0 0 0 2px Color.Green100;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.MuiButton-outlined[data-color='success'].Mui-disabled {
|
|
300
|
+
color: Color.Green100;
|
|
301
|
+
box-shadow: inset 0 0 0 1px Color.Green100, 0 0 0 2px Color.Transparent;
|
|
302
|
+
background-color: Color.White;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.MuiButton-outlined[data-color='success'].Mui-disabled[aria-busy='true'] {
|
|
306
|
+
color: Color.Green300;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.MuiButton-outlined[data-color='error']:hover {
|
|
310
|
+
color: Color.Red300;
|
|
311
|
+
box-shadow: inset 0 0 0 1px Color.Red300, 0 0 0 2px Color.Transparent;
|
|
312
|
+
background-color: Color.Red50;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.MuiButton-outlined[data-color='error'][aria-expanded='true'] {
|
|
316
|
+
color: Color.Red300;
|
|
317
|
+
box-shadow: inset 0 0 0 1px Color.Red300, 0 0 0 2px Color.Transparent;
|
|
318
|
+
background-color: Color.Red50;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.MuiButton-outlined[data-color='error']:focus {
|
|
322
|
+
box-shadow: inset 0 0 0 1px Color.Red300, 0 0 0 2px Color.Red100;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.MuiButton-outlined[data-color='error'].Mui-disabled {
|
|
326
|
+
color: Color.Red100;
|
|
327
|
+
box-shadow: inset 0 0 0 1px Color.Red100, 0 0 0 2px Color.Transparent;
|
|
328
|
+
background-color: Color.White;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.MuiButton-outlined[data-color='error'].Mui-disabled[aria-busy='true'] {
|
|
332
|
+
color: Color.Red300;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.MuiButton-outlinedPrimary {
|
|
336
|
+
color: Color.Dark500;
|
|
337
|
+
box-shadow: inset 0 0 0 1px Color.Silver500, 0 0 0 2px Color.Transparent;
|
|
338
|
+
background-color: Color.White;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.MuiButton-outlinedPrimary:hover {
|
|
342
|
+
color: Color.Blue300;
|
|
343
|
+
box-shadow: inset 0 0 0 1px Color.Blue300, 0 0 0 2px Color.Transparent;
|
|
344
|
+
background-color: Color.Blue50;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.MuiButton-outlinedPrimary[aria-expanded='true'] {
|
|
348
|
+
color: Color.Blue300;
|
|
349
|
+
box-shadow: inset 0 0 0 1px Color.Blue300, 0 0 0 2px Color.Transparent;
|
|
350
|
+
background-color: Color.Blue50;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.MuiButton-outlinedPrimary:focus {
|
|
354
|
+
box-shadow: inset 0 0 0 1px Color.Blue300, 0 0 0 2px Color.Blue100;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.MuiButton-outlinedPrimary.Mui-disabled {
|
|
358
|
+
color: Color.Silver500;
|
|
359
|
+
box-shadow: inset 0 0 0 1px Color.Silver400, 0 0 0 2px Color.Transparent;
|
|
360
|
+
background-color: Color.White;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.MuiButton-outlinedPrimary.Mui-disabled[aria-busy='true'] {
|
|
364
|
+
color: Color.Dark200;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
@media (hover: none) {
|
|
368
|
+
.MuiButton-outlinedPrimary:hover {
|
|
369
|
+
background-color: transparent;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.MuiButton-outlinedSecondary {
|
|
374
|
+
color: #f50057;
|
|
375
|
+
border: 1px solid rgba(245, 0, 87, 0.5);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.MuiButton-outlinedSecondary:hover {
|
|
379
|
+
border: 1px solid #f50057;
|
|
380
|
+
background-color: rgba(245, 0, 87, 0.04);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.MuiButton-outlinedSecondary.Mui-disabled {
|
|
384
|
+
border: 1px solid Color.Silver400;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
@media (hover: none) {
|
|
388
|
+
.MuiButton-outlinedSecondary:hover {
|
|
389
|
+
background-color: transparent;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.MuiButton-contained {
|
|
394
|
+
color: rgba(0, 0, 0, 0.87);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.MuiButton-contained[data-color='error'] {
|
|
398
|
+
color: Color.White;
|
|
399
|
+
box-shadow: 0 0 0 0px Color.Transparent;
|
|
400
|
+
background-color: Color.Red300;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.MuiButton-contained[data-color='success'] {
|
|
404
|
+
color: Color.White;
|
|
405
|
+
box-shadow: 0 0 0 0px Color.Transparent;
|
|
406
|
+
background-color: Color.Green300;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.MuiButton-contained[data-color='white'] {
|
|
410
|
+
color: Color.White;
|
|
411
|
+
box-shadow: 0 0 0 0px Color.Transparent;
|
|
412
|
+
background-color: Color.White20;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.MuiButton-contained[data-color='white']:hover {
|
|
416
|
+
background-color: Color.White40;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.MuiButton-contained[data-color='white'][aria-expanded='true'] {
|
|
420
|
+
background-color: Color.White40;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.MuiButton-contained[data-color='white']:focus {
|
|
424
|
+
box-shadow: 0 0 0 3px Color.White40;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.MuiButton-contained[data-color='white'].Mui-disabled {
|
|
428
|
+
color: Color.White50;
|
|
429
|
+
box-shadow: 0 0 0 0px Color.Transparent;
|
|
430
|
+
background-color: Color.White08;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.MuiButton-contained[data-color='success']:hover {
|
|
434
|
+
background-color: Color.Green500;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.MuiButton-contained[data-color='success'][aria-expanded='true'] {
|
|
438
|
+
background-color: Color.Green500;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.MuiButton-contained[data-color='success']:focus {
|
|
442
|
+
box-shadow: 0 0 0 3px Color.Green100;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.MuiButton-contained[data-color='success'].Mui-disabled {
|
|
446
|
+
color: Color.White;
|
|
447
|
+
box-shadow: 0 0 0 0px Color.Transparent;
|
|
448
|
+
background-color: Color.Green100;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.MuiButton-contained[data-color='error']:hover {
|
|
452
|
+
background-color: Color.Red500;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.MuiButton-contained[data-color='error'][aria-expanded='true'] {
|
|
456
|
+
background-color: Color.Red500;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.MuiButton-contained[data-color='error']:focus {
|
|
460
|
+
box-shadow: 0 0 0 3px Color.Red100;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.MuiButton-contained[data-color='error'].Mui-disabled {
|
|
464
|
+
color: Color.White;
|
|
465
|
+
box-shadow: 0 0 0 0px Color.Transparent;
|
|
466
|
+
background-color: Color.Red100;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.MuiButton-containedPrimary {
|
|
470
|
+
color: Color.White;
|
|
471
|
+
box-shadow: 0 0 0 0px Color.Transparent;
|
|
472
|
+
background-color: Color.Blue300;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.MuiButton-containedPrimary:hover {
|
|
476
|
+
background-color: Color.Blue500;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.MuiButton-containedPrimary[aria-expanded='true'] {
|
|
480
|
+
background-color: Color.Blue500;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.MuiButton-containedPrimary:focus {
|
|
484
|
+
box-shadow: 0 0 0 3px Color.Blue100;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.MuiButton-containedPrimary.Mui-disabled {
|
|
488
|
+
color: Color.White;
|
|
489
|
+
box-shadow: 0 0 0 0px Color.Transparent;
|
|
490
|
+
background-color: Color.Blue100;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
@media (hover: none) {
|
|
494
|
+
.MuiButton-containedPrimary:hover {
|
|
495
|
+
background-color: Color.Blue300;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.MuiButton-containedSecondary {
|
|
500
|
+
color: Color.White;
|
|
501
|
+
background-color: #f50057;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
.MuiButton-containedSecondary:hover {
|
|
505
|
+
background-color: #c51162;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
@media (hover: none) {
|
|
509
|
+
.MuiButton-containedSecondary:hover {
|
|
510
|
+
background-color: #f50057;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
.MuiButton-disableElevation {
|
|
515
|
+
box-shadow: none;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
.MuiButton-disableElevation:hover {
|
|
519
|
+
box-shadow: none;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.MuiButton-disableElevation.Mui-focusVisible {
|
|
523
|
+
box-shadow: none;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.MuiButton-disableElevation:active {
|
|
527
|
+
box-shadow: none;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.MuiButton-disableElevation.Mui-disabled {
|
|
531
|
+
box-shadow: none;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.MuiButton-colorInherit {
|
|
535
|
+
color: inherit;
|
|
536
|
+
border-color: currentColor;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.MuiButton-sizeSmall {
|
|
540
|
+
padding: 4px 24px;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
@media (min-width: 600px) {
|
|
544
|
+
.MuiButton-sizeSmall {
|
|
545
|
+
padding: 2px 16px;
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
.MuiButton-sizeLarge {
|
|
550
|
+
padding: 14px 64px;
|
|
551
|
+
font-size: 18px;
|
|
552
|
+
line-height: 28px;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
@media (min-width: 600px) {
|
|
556
|
+
.MuiButton-sizeLarge {
|
|
557
|
+
padding: 8px 32px;
|
|
558
|
+
font-size: 16px;
|
|
559
|
+
line-height: 24px;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.MuiButton-fullWidth {
|
|
564
|
+
width: 100%;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
.MuiButton-startIcon {
|
|
568
|
+
display: inherit;
|
|
569
|
+
margin-left: -4px;
|
|
570
|
+
margin-right: 8px;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
.MuiButton-startIcon.MuiButton-iconSizeSmall {
|
|
574
|
+
margin-left: -2px;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
.MuiButton-endIcon {
|
|
578
|
+
display: inherit;
|
|
579
|
+
margin-left: 8px;
|
|
580
|
+
margin-right: -4px;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
.MuiButton-endIcon.MuiButton-iconSizeSmall {
|
|
584
|
+
margin-right: -2px;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
.MuiButton-iconSizeSmall > *:first-child {
|
|
588
|
+
font-size: 18px;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
.MuiButton-iconSizeMedium > *:first-child {
|
|
592
|
+
font-size: 20px;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
.MuiButton-iconSizeLarge > *:first-child {
|
|
596
|
+
font-size: 22px;
|
|
597
|
+
}
|
|
598
|
+
`);
|
|
599
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Card, CardContent, Typography } from '@material-ui/core';
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
|
+
import { PropsLink } from '@superdispatch/ui-docs';
|
|
4
|
+
import { Box } from '@superdispatch/ui-lab';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Surfaces/Card',
|
|
8
|
+
parameters: {
|
|
9
|
+
componentSubtitle: (
|
|
10
|
+
<PropsLink url="https://material-ui.com/api/card/#props" />
|
|
11
|
+
),
|
|
12
|
+
},
|
|
13
|
+
} as Meta;
|
|
14
|
+
|
|
15
|
+
export const basic = () => (
|
|
16
|
+
<Box maxWidth="280px">
|
|
17
|
+
<Card>
|
|
18
|
+
<CardContent>
|
|
19
|
+
<Typography color="textSecondary" gutterBottom={true}>
|
|
20
|
+
Word of the Day
|
|
21
|
+
</Typography>
|
|
22
|
+
|
|
23
|
+
<Typography variant="h5" component="h2" gutterBottom={true}>
|
|
24
|
+
be•nev•o•lent
|
|
25
|
+
</Typography>
|
|
26
|
+
|
|
27
|
+
<Typography color="textSecondary" gutterBottom={true}>
|
|
28
|
+
adjective
|
|
29
|
+
</Typography>
|
|
30
|
+
|
|
31
|
+
<Typography component="p" gutterBottom={true}>
|
|
32
|
+
well meaning and kindly.
|
|
33
|
+
<br />
|
|
34
|
+
”a benevolent smile”
|
|
35
|
+
</Typography>
|
|
36
|
+
</CardContent>
|
|
37
|
+
</Card>
|
|
38
|
+
</Box>
|
|
39
|
+
);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SuperDispatchTheme } from '../theme/SuperDispatchTheme';
|
|
2
|
+
|
|
3
|
+
export function overrideCard(theme: SuperDispatchTheme): void {
|
|
4
|
+
theme.props.MuiCard = { variant: 'outlined' };
|
|
5
|
+
|
|
6
|
+
theme.overrides.MuiCardContent = {
|
|
7
|
+
root: { '&:last-child': { paddingBottom: undefined } },
|
|
8
|
+
};
|
|
9
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Card, CardActions, CardContent, CardHeader } 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.MuiCard).toMatchInlineSnapshot(`
|
|
8
|
+
Object {
|
|
9
|
+
"variant": "outlined",
|
|
10
|
+
}
|
|
11
|
+
`);
|
|
12
|
+
expect(props.MuiCardHeader).toMatchInlineSnapshot(`undefined`);
|
|
13
|
+
expect(props.MuiCardContent).toMatchInlineSnapshot(`undefined`);
|
|
14
|
+
expect(props.MuiCardActions).toMatchInlineSnapshot(`undefined`);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it('checks component css', () => {
|
|
18
|
+
expect(
|
|
19
|
+
renderCSS(
|
|
20
|
+
<Card>
|
|
21
|
+
<CardHeader />
|
|
22
|
+
<CardContent />
|
|
23
|
+
<CardActions />
|
|
24
|
+
</Card>,
|
|
25
|
+
['MuiCard', 'MuiCardHeader', 'MuiCardContent', 'MuiCardActions'],
|
|
26
|
+
),
|
|
27
|
+
).toMatchInlineSnapshot(`
|
|
28
|
+
.MuiCard-root {
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.MuiCardActions-root {
|
|
33
|
+
display: flex;
|
|
34
|
+
padding: 8px;
|
|
35
|
+
align-items: center;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.MuiCardActions-spacing > :not(:first-child) {
|
|
39
|
+
margin-left: 8px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.MuiCardContent-root {
|
|
43
|
+
padding: 16px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.MuiCardHeader-root {
|
|
47
|
+
display: flex;
|
|
48
|
+
padding: 16px;
|
|
49
|
+
align-items: center;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.MuiCardHeader-avatar {
|
|
53
|
+
flex: 0 0 auto;
|
|
54
|
+
margin-right: 16px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.MuiCardHeader-action {
|
|
58
|
+
flex: 0 0 auto;
|
|
59
|
+
align-self: flex-start;
|
|
60
|
+
margin-top: -8px;
|
|
61
|
+
margin-right: -8px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.MuiCardHeader-content {
|
|
65
|
+
flex: 1 1 auto;
|
|
66
|
+
}
|
|
67
|
+
`);
|
|
68
|
+
});
|