@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.
Files changed (234) hide show
  1. package/LICENSE +21 -0
  2. package/{pkg/dist-node → dist-node}/index.js +62 -14
  3. package/dist-node/index.js.map +1 -0
  4. package/{pkg/dist-src → dist-src}/index.js +1 -0
  5. package/dist-src/info-tooltip/InfoTooltip.js +54 -0
  6. package/{pkg/dist-types → dist-types}/index.d.ts +14 -2
  7. package/{pkg/dist-web → dist-web}/index.js +64 -17
  8. package/dist-web/index.js.map +1 -0
  9. package/package.json +12 -38
  10. package/.babelrc.js +0 -5
  11. package/.turbo/turbo-version.log +0 -28
  12. package/pkg/README.md +0 -30
  13. package/pkg/dist-node/index.js.map +0 -1
  14. package/pkg/dist-web/index.js.map +0 -1
  15. package/pkg/package.json +0 -39
  16. package/playroom.ts +0 -31
  17. package/src/__tests__/index.spec.ts +0 -134
  18. package/src/adaptive-toolbar/AdaptiveToolbar.stories.tsx +0 -50
  19. package/src/adaptive-toolbar/AdaptiveToolbar.tsx +0 -199
  20. package/src/adaptive-toolbar/__tests__/AdaptiveToolbar.spec.tsx +0 -11
  21. package/src/adaptive-vertical-toolbar/AdaptiveVerticalToolbar.stories.tsx +0 -49
  22. package/src/adaptive-vertical-toolbar/AdaptiveVerticalToolbar.tsx +0 -171
  23. package/src/app-bar/AppBar.stories.tsx +0 -62
  24. package/src/app-bar/AppBarOverrides.ts +0 -9
  25. package/src/app-bar/__tests__/AppBar.spec.tsx +0 -86
  26. package/src/autocomplete/Autocomplete.stories.tsx +0 -76
  27. package/src/autocomplete/AutocompleteOverrides.tsx +0 -58
  28. package/src/autocomplete/__tests__/Autocomplete.spec.tsx +0 -323
  29. package/src/avatar/Avatar.stories.tsx +0 -17
  30. package/src/avatar/AvatarOverrides.ts +0 -24
  31. package/src/avatar/__tests__/Avatar.spec.tsx +0 -71
  32. package/src/avatar-button/AvatarButton.stories.tsx +0 -153
  33. package/src/avatar-button/AvatarButton.tsx +0 -223
  34. package/src/avatar-button/__tests__/AvatarButton.spec.tsx +0 -126
  35. package/src/button/Button.tsx +0 -51
  36. package/src/button/ButtonOverrides.ts +0 -375
  37. package/src/button/__tests__/Button.spec.tsx +0 -599
  38. package/src/card/Card.stories.tsx +0 -39
  39. package/src/card/CardOverrides.ts +0 -9
  40. package/src/card/__tests__/Card.spec.tsx +0 -68
  41. package/src/card-button/CardButton.stories.tsx +0 -36
  42. package/src/card-button/CardButton.tsx +0 -202
  43. package/src/card-button/__tests__/CardButton.spec.tsx +0 -95
  44. package/src/checkbox/CheckboxField.stories.tsx +0 -61
  45. package/src/checkbox/CheckboxField.tsx +0 -56
  46. package/src/checkbox/CheckboxGroudField.tsx +0 -53
  47. package/src/checkbox/CheckboxOverrides.tsx +0 -55
  48. package/src/checkbox/__tests__/Checkbox.spec.tsx +0 -105
  49. package/src/chip/Chip.stories.tsx +0 -26
  50. package/src/chip/ChipOverrides.tsx +0 -111
  51. package/src/chip/__tests__/Chip.spec.tsx +0 -308
  52. package/src/columns/Column.tsx +0 -124
  53. package/src/columns/Columns.stories.tsx +0 -426
  54. package/src/columns/Columns.tsx +0 -76
  55. package/src/description-list/DescriptionList.spec.tsx +0 -137
  56. package/src/description-list/DescriptionList.stories.tsx +0 -148
  57. package/src/description-list/DescriptionList.tsx +0 -170
  58. package/src/dialog/Dialog.playroom.tsx +0 -24
  59. package/src/dialog/Dialog.stories.tsx +0 -60
  60. package/src/dialog/DialogOverrides.ts +0 -39
  61. package/src/dialog/__tests__/Dialog.spec.tsx +0 -219
  62. package/src/drawer/Drawer.playroom.tsx +0 -22
  63. package/src/drawer/Drawer.stories.tsx +0 -194
  64. package/src/drawer/DrawerActions.tsx +0 -69
  65. package/src/drawer/DrawerContent.tsx +0 -30
  66. package/src/drawer/DrawerList.tsx +0 -60
  67. package/src/drawer/DrawerOverrides.ts +0 -19
  68. package/src/drawer/DrawerTitle.tsx +0 -143
  69. package/src/drawer/__tests__/Drawer.spec.tsx +0 -227
  70. package/src/dropdown-button/DropdownButton.stories.tsx +0 -15
  71. package/src/dropdown-button/DropdownButton.tsx +0 -131
  72. package/src/grid/GridStack.tsx +0 -45
  73. package/src/grid/InlineGrid.tsx +0 -56
  74. package/src/icon-button/IconButton.stories.tsx +0 -53
  75. package/src/icon-button/IconButtonOverrides.ts +0 -32
  76. package/src/icon-button/__tests__/IconButton.spec.tsx +0 -124
  77. package/src/index.ts +0 -47
  78. package/src/info-card/InfoCard.stories.tsx +0 -29
  79. package/src/info-card/InfoCard.tsx +0 -95
  80. package/src/info-card/__tests__/InfoCard.spec.tsx +0 -22
  81. package/src/info-tooltip/InfoTooltip.stories.tsx +0 -77
  82. package/src/info-tooltip/InfoTooltip.tsx +0 -72
  83. package/src/info-tooltip/__tests__/InfoTooltip.spec.tsx +0 -166
  84. package/src/inline/Inline.stories.tsx +0 -135
  85. package/src/inline/Inline.tsx +0 -144
  86. package/src/link/Link.stories.tsx +0 -41
  87. package/src/link/LinkOverrides.ts +0 -43
  88. package/src/link/__tests__/Link.spec.tsx +0 -98
  89. package/src/list/ListOverrides.ts +0 -11
  90. package/src/list/__tests__/List.spec.tsx +0 -182
  91. package/src/menu/Menu.stories.tsx +0 -35
  92. package/src/menu/MenuOverrides.ts +0 -17
  93. package/src/menu/__tests__/Menu.spec.tsx +0 -99
  94. package/src/number-field/NumberField.stories.tsx +0 -123
  95. package/src/number-field/NumberField.tsx +0 -98
  96. package/src/overflow-text/OverflowText.stories.tsx +0 -32
  97. package/src/overflow-text/OverflowText.tsx +0 -114
  98. package/src/overflow-text/__tests__/OverflowText.spec.tsx +0 -24
  99. package/src/pagination/Pagination.stories.tsx +0 -36
  100. package/src/pagination/PaginationOverrides.ts +0 -47
  101. package/src/pagination/__tests__/Pagination.spec.tsx +0 -228
  102. package/src/paper/PaperOverrides.ts +0 -10
  103. package/src/paper/__tests__/Paper.spec.tsx +0 -155
  104. package/src/props/AlignProps.ts +0 -22
  105. package/src/props/CollapseProp.ts +0 -13
  106. package/src/props/ResponsiveProp.ts +0 -65
  107. package/src/props/SpaceProp.ts +0 -40
  108. package/src/radio/RadioField.stories.tsx +0 -42
  109. package/src/radio/RadioField.tsx +0 -55
  110. package/src/radio/RadioGroupField.tsx +0 -64
  111. package/src/radio/RadioOverrides.tsx +0 -51
  112. package/src/radio/__tests__/Radio.spec.tsx +0 -90
  113. package/src/responsive/CollapseBreakpoint.ts +0 -21
  114. package/src/responsive/MinBreakpoint.ts +0 -21
  115. package/src/responsive/ResponsiveContext.tsx +0 -57
  116. package/src/snackbar/Snackbar.stories.tsx +0 -196
  117. package/src/snackbar/Snackbar.tsx +0 -83
  118. package/src/snackbar/SnackbarContent.tsx +0 -147
  119. package/src/snackbar/SnackbarOverrides.ts +0 -23
  120. package/src/snackbar/SnackbarStack.tsx +0 -160
  121. package/src/snackbar/__tests__/Snackbar.spec.tsx +0 -196
  122. package/src/stack/Stack.stories.tsx +0 -113
  123. package/src/stack/Stack.tsx +0 -86
  124. package/src/svg-icon/SvgIcon.stories.tsx +0 -29
  125. package/src/svg-icon/SvgIconOverrides.ts +0 -32
  126. package/src/svg-icon/__tests__/SvgIcon.spec.tsx +0 -67
  127. package/src/switch/Switch.stories.tsx +0 -60
  128. package/src/switch/SwitchOverrides.ts +0 -88
  129. package/src/switch/__tests__/Switch.spec.tsx +0 -204
  130. package/src/tabs/Tabs.stories.tsx +0 -40
  131. package/src/tabs/TabsOverrides.ts +0 -45
  132. package/src/tabs/__tests__/Tabs.spec.tsx +0 -226
  133. package/src/tag/Tag.stories.tsx +0 -53
  134. package/src/tag/Tag.tsx +0 -130
  135. package/src/tag/__tests__/Tag.spec.tsx +0 -82
  136. package/src/text-field/TextField.stories.tsx +0 -50
  137. package/src/text-field/TextFieldOverrides.tsx +0 -149
  138. package/src/text-field/__tests__/TextField.spec.tsx +0 -662
  139. package/src/theme/Color.ts +0 -117
  140. package/src/theme/SuperDispatchTheme.ts +0 -3
  141. package/src/theme/ThemeProvider.tsx +0 -179
  142. package/src/theme/__tests__/CssBaseline.spec.tsx +0 -49
  143. package/src/theme/__tests__/ThemeProvider.spec.ts +0 -40
  144. package/src/theme/__tests__/__snapshots__/ThemeProvider.spec.ts.snap +0 -204
  145. package/src/tiles/Tiles.stories.tsx +0 -69
  146. package/src/tiles/Tiles.tsx +0 -163
  147. package/src/tiles/__tests__/Tiles.spec.tsx +0 -221
  148. package/src/toolbar/ToolbarOverrides.ts +0 -14
  149. package/src/toolbar/__tests__/Toolbar.spec.tsx +0 -50
  150. package/src/tooltip/Tooltip.stories.tsx +0 -32
  151. package/src/tooltip/TooltipOverrides.ts +0 -34
  152. package/src/tooltip/__tests__/Tooltip.spec.tsx +0 -182
  153. package/src/typography/Typography.stories.tsx +0 -132
  154. package/src/typography/TypographyOverrides.ts +0 -125
  155. package/src/typography/__tests__/Typography.spec.tsx +0 -253
  156. package/src/utils/ExitTransitionPlaceholder.tsx +0 -22
  157. package/src/utils/ResizeObserver.tsx +0 -28
  158. package/src/utils/VisibilityObserver.tsx +0 -75
  159. package/src/utils/__tests__/ExitTransitionPlaceholder.spec.tsx +0 -34
  160. package/src/utils/isEmptyReactNode.ts +0 -11
  161. package/src/utils/mergeRefs.ts +0 -21
  162. package/src/utils/renderChildren.ts +0 -10
  163. package/src/utils/useUID.ts +0 -9
  164. package/tsconfig.json +0 -19
  165. /package/{pkg/dist-src → dist-src}/adaptive-toolbar/AdaptiveToolbar.js +0 -0
  166. /package/{pkg/dist-src → dist-src}/adaptive-vertical-toolbar/AdaptiveVerticalToolbar.js +0 -0
  167. /package/{pkg/dist-src → dist-src}/app-bar/AppBarOverrides.js +0 -0
  168. /package/{pkg/dist-src → dist-src}/autocomplete/AutocompleteOverrides.js +0 -0
  169. /package/{pkg/dist-src → dist-src}/avatar/AvatarOverrides.js +0 -0
  170. /package/{pkg/dist-src → dist-src}/avatar-button/AvatarButton.js +0 -0
  171. /package/{pkg/dist-src → dist-src}/button/Button.js +0 -0
  172. /package/{pkg/dist-src → dist-src}/button/ButtonOverrides.js +0 -0
  173. /package/{pkg/dist-src → dist-src}/card/CardOverrides.js +0 -0
  174. /package/{pkg/dist-src → dist-src}/card-button/CardButton.js +0 -0
  175. /package/{pkg/dist-src → dist-src}/checkbox/CheckboxField.js +0 -0
  176. /package/{pkg/dist-src → dist-src}/checkbox/CheckboxGroudField.js +0 -0
  177. /package/{pkg/dist-src → dist-src}/checkbox/CheckboxOverrides.js +0 -0
  178. /package/{pkg/dist-src → dist-src}/chip/ChipOverrides.js +0 -0
  179. /package/{pkg/dist-src → dist-src}/columns/Column.js +0 -0
  180. /package/{pkg/dist-src → dist-src}/columns/Columns.js +0 -0
  181. /package/{pkg/dist-src → dist-src}/description-list/DescriptionList.js +0 -0
  182. /package/{pkg/dist-src → dist-src}/dialog/DialogOverrides.js +0 -0
  183. /package/{pkg/dist-src → dist-src}/drawer/DrawerActions.js +0 -0
  184. /package/{pkg/dist-src → dist-src}/drawer/DrawerContent.js +0 -0
  185. /package/{pkg/dist-src → dist-src}/drawer/DrawerList.js +0 -0
  186. /package/{pkg/dist-src → dist-src}/drawer/DrawerOverrides.js +0 -0
  187. /package/{pkg/dist-src → dist-src}/drawer/DrawerTitle.js +0 -0
  188. /package/{pkg/dist-src → dist-src}/dropdown-button/DropdownButton.js +0 -0
  189. /package/{pkg/dist-src → dist-src}/grid/GridStack.js +0 -0
  190. /package/{pkg/dist-src → dist-src}/grid/InlineGrid.js +0 -0
  191. /package/{pkg/dist-src → dist-src}/icon-button/IconButtonOverrides.js +0 -0
  192. /package/{pkg/dist-src → dist-src}/info-card/InfoCard.js +0 -0
  193. /package/{pkg/dist-src → dist-src}/inline/Inline.js +0 -0
  194. /package/{pkg/dist-src → dist-src}/link/LinkOverrides.js +0 -0
  195. /package/{pkg/dist-src → dist-src}/list/ListOverrides.js +0 -0
  196. /package/{pkg/dist-src → dist-src}/menu/MenuOverrides.js +0 -0
  197. /package/{pkg/dist-src → dist-src}/number-field/NumberField.js +0 -0
  198. /package/{pkg/dist-src → dist-src}/overflow-text/OverflowText.js +0 -0
  199. /package/{pkg/dist-src → dist-src}/pagination/PaginationOverrides.js +0 -0
  200. /package/{pkg/dist-src → dist-src}/paper/PaperOverrides.js +0 -0
  201. /package/{pkg/dist-src → dist-src}/props/AlignProps.js +0 -0
  202. /package/{pkg/dist-src → dist-src}/props/CollapseProp.js +0 -0
  203. /package/{pkg/dist-src → dist-src}/props/ResponsiveProp.js +0 -0
  204. /package/{pkg/dist-src → dist-src}/props/SpaceProp.js +0 -0
  205. /package/{pkg/dist-src → dist-src}/radio/RadioField.js +0 -0
  206. /package/{pkg/dist-src → dist-src}/radio/RadioGroupField.js +0 -0
  207. /package/{pkg/dist-src → dist-src}/radio/RadioOverrides.js +0 -0
  208. /package/{pkg/dist-src → dist-src}/responsive/CollapseBreakpoint.js +0 -0
  209. /package/{pkg/dist-src → dist-src}/responsive/MinBreakpoint.js +0 -0
  210. /package/{pkg/dist-src → dist-src}/responsive/ResponsiveContext.js +0 -0
  211. /package/{pkg/dist-src → dist-src}/snackbar/Snackbar.js +0 -0
  212. /package/{pkg/dist-src → dist-src}/snackbar/SnackbarContent.js +0 -0
  213. /package/{pkg/dist-src → dist-src}/snackbar/SnackbarOverrides.js +0 -0
  214. /package/{pkg/dist-src → dist-src}/snackbar/SnackbarStack.js +0 -0
  215. /package/{pkg/dist-src → dist-src}/stack/Stack.js +0 -0
  216. /package/{pkg/dist-src → dist-src}/svg-icon/SvgIconOverrides.js +0 -0
  217. /package/{pkg/dist-src → dist-src}/switch/SwitchOverrides.js +0 -0
  218. /package/{pkg/dist-src → dist-src}/tabs/TabsOverrides.js +0 -0
  219. /package/{pkg/dist-src → dist-src}/tag/Tag.js +0 -0
  220. /package/{pkg/dist-src → dist-src}/text-field/TextFieldOverrides.js +0 -0
  221. /package/{pkg/dist-src → dist-src}/theme/Color.js +0 -0
  222. /package/{pkg/dist-src → dist-src}/theme/SuperDispatchTheme.js +0 -0
  223. /package/{pkg/dist-src → dist-src}/theme/ThemeProvider.js +0 -0
  224. /package/{pkg/dist-src → dist-src}/tiles/Tiles.js +0 -0
  225. /package/{pkg/dist-src → dist-src}/toolbar/ToolbarOverrides.js +0 -0
  226. /package/{pkg/dist-src → dist-src}/tooltip/TooltipOverrides.js +0 -0
  227. /package/{pkg/dist-src → dist-src}/typography/TypographyOverrides.js +0 -0
  228. /package/{pkg/dist-src → dist-src}/utils/ExitTransitionPlaceholder.js +0 -0
  229. /package/{pkg/dist-src → dist-src}/utils/ResizeObserver.js +0 -0
  230. /package/{pkg/dist-src → dist-src}/utils/VisibilityObserver.js +0 -0
  231. /package/{pkg/dist-src → dist-src}/utils/isEmptyReactNode.js +0 -0
  232. /package/{pkg/dist-src → dist-src}/utils/mergeRefs.js +0 -0
  233. /package/{pkg/dist-src → dist-src}/utils/renderChildren.js +0 -0
  234. /package/{pkg/dist-src → dist-src}/utils/useUID.js +0 -0
@@ -1,599 +0,0 @@
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
- });
@@ -1,39 +0,0 @@
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
- );
@@ -1,9 +0,0 @@
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
- }
@@ -1,68 +0,0 @@
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
- });