@astral/ui 0.1.1 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) hide show
  1. package/esm/src/Badge/Badge.d.ts +1 -0
  2. package/esm/src/Badge/styled.d.ts +2 -2
  3. package/esm/src/Button/Button.d.ts +1 -0
  4. package/esm/src/Button/styled.js +4 -1
  5. package/esm/src/ButtonBase/ButtonBase.d.ts +1 -0
  6. package/esm/src/ButtonBase/styled.d.ts +1 -6
  7. package/esm/src/ButtonBase/styled.js +124 -118
  8. package/esm/src/Checkbox/Checkbox.d.ts +3 -0
  9. package/esm/src/Checkbox/Checkbox.js +29 -0
  10. package/esm/src/Checkbox/icons.d.ts +5 -0
  11. package/esm/src/Checkbox/icons.js +36 -0
  12. package/esm/src/Checkbox/index.d.ts +2 -0
  13. package/esm/src/Checkbox/index.js +2 -0
  14. package/esm/src/Checkbox/styled.d.ts +4 -0
  15. package/esm/src/Checkbox/styled.js +32 -0
  16. package/esm/src/Checkbox/types.d.ts +2 -0
  17. package/{cjs/src/theme/__tests__/BaseTheme.test.d.ts → esm/src/Checkbox/types.js} +0 -0
  18. package/esm/src/CircularProgress/CircularProgress.d.ts +1 -0
  19. package/esm/src/CircularProgress/CircularProgress.js +2 -1
  20. package/esm/src/CircularProgress/constants.d.ts +1 -2
  21. package/esm/src/CircularProgress/constants.js +0 -1
  22. package/esm/src/CircularProgress/styled.d.ts +0 -1
  23. package/esm/src/CircularProgress/styled.js +3 -9
  24. package/esm/src/FormControlLabel/FormControlLabel.d.ts +3 -0
  25. package/esm/src/FormControlLabel/FormControlLabel.js +28 -0
  26. package/esm/src/FormControlLabel/index.d.ts +2 -0
  27. package/esm/src/FormControlLabel/index.js +2 -0
  28. package/esm/src/FormControlLabel/styled.d.ts +3 -0
  29. package/esm/src/FormControlLabel/styled.js +11 -0
  30. package/esm/src/FormControlLabel/types.d.ts +2 -0
  31. package/esm/src/FormControlLabel/types.js +1 -0
  32. package/esm/src/FormHelperText/FormHelperText.d.ts +4 -0
  33. package/esm/src/FormHelperText/FormHelperText.js +20 -0
  34. package/esm/src/FormHelperText/index.d.ts +1 -0
  35. package/esm/src/FormHelperText/index.js +1 -0
  36. package/esm/src/FormHelperText/styled.d.ts +41 -0
  37. package/esm/src/FormHelperText/styled.js +11 -0
  38. package/esm/src/FormHelperText/types.d.ts +6 -0
  39. package/esm/src/FormHelperText/types.js +1 -0
  40. package/esm/src/GlobalStyles/GlobalStyles.d.ts +3 -0
  41. package/esm/src/GlobalStyles/GlobalStyles.js +35 -0
  42. package/esm/src/GlobalStyles/index.d.ts +1 -0
  43. package/esm/src/GlobalStyles/index.js +1 -0
  44. package/esm/src/Grid/Grid.d.ts +3 -0
  45. package/esm/src/Grid/Grid.js +28 -0
  46. package/esm/src/Grid/index.d.ts +2 -0
  47. package/esm/src/Grid/index.js +2 -0
  48. package/esm/src/Grid/styled.d.ts +13 -0
  49. package/esm/src/Grid/styled.js +11 -0
  50. package/esm/src/Grid/types.d.ts +30 -0
  51. package/esm/src/Grid/types.js +1 -0
  52. package/esm/src/IconButton/IconButton.d.ts +1 -0
  53. package/esm/src/Menu/Menu.d.ts +3 -0
  54. package/esm/src/Menu/Menu.js +28 -0
  55. package/esm/src/Menu/index.d.ts +1 -0
  56. package/esm/src/Menu/index.js +1 -0
  57. package/esm/src/MenuItem/MenuItem.d.ts +3 -0
  58. package/esm/src/MenuItem/MenuItem.js +28 -0
  59. package/esm/src/MenuItem/index.d.ts +1 -0
  60. package/esm/src/MenuItem/index.js +1 -0
  61. package/esm/src/MenuList/MenuList.d.ts +3 -0
  62. package/esm/src/MenuList/MenuList.js +28 -0
  63. package/esm/src/MenuList/index.d.ts +2 -0
  64. package/esm/src/MenuList/index.js +2 -0
  65. package/esm/src/MenuList/styled.d.ts +20 -0
  66. package/esm/src/MenuList/styled.js +17 -0
  67. package/esm/src/MenuList/types.d.ts +2 -0
  68. package/esm/src/MenuList/types.js +1 -0
  69. package/esm/src/Tag/Tag.d.ts +3 -0
  70. package/esm/src/Tag/Tag.js +28 -0
  71. package/esm/src/Tag/constants.d.ts +21 -0
  72. package/esm/src/Tag/constants.js +25 -0
  73. package/esm/src/Tag/index.d.ts +2 -0
  74. package/esm/src/Tag/index.js +2 -0
  75. package/esm/src/Tag/styled.d.ts +26 -0
  76. package/esm/src/Tag/styled.js +117 -0
  77. package/esm/src/Tag/types.d.ts +12 -0
  78. package/esm/src/Tag/types.js +1 -0
  79. package/esm/src/TextField/TextField.d.ts +4 -0
  80. package/esm/src/TextField/TextField.js +46 -0
  81. package/esm/src/TextField/index.d.ts +2 -0
  82. package/esm/src/TextField/index.js +2 -0
  83. package/esm/src/TextField/types.d.ts +6 -0
  84. package/esm/src/TextField/types.js +1 -0
  85. package/esm/src/ThemeProvider/ThemeProvider.js +3 -2
  86. package/esm/src/Typography/Typography.d.ts +1 -0
  87. package/esm/src/index.d.ts +6 -0
  88. package/esm/src/index.js +6 -0
  89. package/esm/src/theme/__tests__/BaseTheme.test.js +1 -1
  90. package/esm/src/theme/baseTheme.d.ts +4 -3
  91. package/esm/src/theme/baseTheme.js +2 -2
  92. package/esm/src/theme/components/MuiFormHelperText.d.ts +4 -0
  93. package/esm/src/theme/components/MuiFormHelperText.js +15 -0
  94. package/esm/src/theme/components/MuiFormLabel.d.ts +4 -0
  95. package/esm/src/theme/components/MuiFormLabel.js +11 -0
  96. package/esm/src/theme/components/MuiInputBase.d.ts +4 -0
  97. package/esm/src/theme/components/MuiInputBase.js +13 -0
  98. package/esm/src/theme/components/MuiInputLabel.d.ts +4 -0
  99. package/esm/src/theme/components/MuiInputLabel.js +29 -0
  100. package/esm/src/theme/components/MuiOutlinedInput.d.ts +4 -0
  101. package/esm/src/theme/components/MuiOutlinedInput.js +61 -0
  102. package/esm/src/theme/components/MuiTypography.d.ts +21 -0
  103. package/esm/src/theme/components/MuiTypography.js +18 -0
  104. package/esm/src/theme/{components.d.ts → components/components.d.ts} +2 -1
  105. package/esm/src/theme/components/components.js +61 -0
  106. package/esm/src/theme/components/index.d.ts +1 -0
  107. package/esm/src/theme/components/index.js +1 -0
  108. package/esm/src/theme/elevation.js +5 -5
  109. package/esm/src/theme/hooks/index.d.ts +1 -0
  110. package/esm/src/theme/hooks/index.js +1 -0
  111. package/esm/src/theme/hooks/useTheme/index.d.ts +2 -0
  112. package/esm/src/theme/hooks/useTheme/index.js +2 -0
  113. package/esm/src/theme/index.d.ts +1 -0
  114. package/esm/src/theme/index.js +1 -0
  115. package/esm/src/theme/palette/palette.d.ts +1 -1
  116. package/esm/src/theme/typography.js +1 -1
  117. package/{cjs → node}/index.d.ts +0 -0
  118. package/{cjs → node}/index.js +0 -0
  119. package/{cjs → node}/src/Badge/Badge.d.ts +1 -0
  120. package/{cjs → node}/src/Badge/Badge.js +0 -0
  121. package/{cjs → node}/src/Badge/index.d.ts +0 -0
  122. package/{cjs → node}/src/Badge/index.js +0 -0
  123. package/{cjs → node}/src/Badge/styled.d.ts +2 -2
  124. package/{cjs → node}/src/Badge/styled.js +0 -0
  125. package/{cjs → node}/src/Badge/types.d.ts +0 -0
  126. package/{cjs → node}/src/Badge/types.js +0 -0
  127. package/{cjs → node}/src/Button/Button.d.ts +1 -0
  128. package/{cjs → node}/src/Button/Button.js +0 -0
  129. package/{cjs → node}/src/Button/index.d.ts +0 -0
  130. package/{cjs → node}/src/Button/index.js +0 -0
  131. package/{cjs → node}/src/Button/styled.d.ts +0 -0
  132. package/{cjs → node}/src/Button/styled.js +4 -1
  133. package/{cjs → node}/src/Button/types.d.ts +0 -0
  134. package/{cjs → node}/src/Button/types.js +0 -0
  135. package/{cjs → node}/src/ButtonBase/ButtonBase.d.ts +1 -0
  136. package/{cjs → node}/src/ButtonBase/ButtonBase.js +0 -0
  137. package/{cjs → node}/src/ButtonBase/constants.d.ts +0 -0
  138. package/{cjs → node}/src/ButtonBase/constants.js +0 -0
  139. package/{cjs → node}/src/ButtonBase/index.d.ts +0 -0
  140. package/{cjs → node}/src/ButtonBase/index.js +0 -0
  141. package/{cjs → node}/src/ButtonBase/styled.d.ts +1 -6
  142. package/node/src/ButtonBase/styled.js +229 -0
  143. package/{cjs → node}/src/ButtonBase/types.d.ts +0 -0
  144. package/{cjs → node}/src/ButtonBase/types.js +0 -0
  145. package/node/src/Checkbox/Checkbox.d.ts +3 -0
  146. package/node/src/Checkbox/Checkbox.js +33 -0
  147. package/node/src/Checkbox/icons.d.ts +5 -0
  148. package/node/src/Checkbox/icons.js +42 -0
  149. package/node/src/Checkbox/index.d.ts +2 -0
  150. package/node/src/Checkbox/index.js +14 -0
  151. package/node/src/Checkbox/styled.d.ts +4 -0
  152. package/node/src/Checkbox/styled.js +35 -0
  153. package/node/src/Checkbox/types.d.ts +2 -0
  154. package/{cjs/src/CircularProgress → node/src/Checkbox}/types.js +0 -0
  155. package/{cjs → node}/src/CircularProgress/CircularProgress.d.ts +1 -0
  156. package/{cjs → node}/src/CircularProgress/CircularProgress.js +2 -1
  157. package/{cjs → node}/src/CircularProgress/constants.d.ts +1 -2
  158. package/{cjs → node}/src/CircularProgress/constants.js +0 -1
  159. package/{cjs → node}/src/CircularProgress/index.d.ts +0 -0
  160. package/{cjs → node}/src/CircularProgress/index.js +0 -0
  161. package/{cjs → node}/src/CircularProgress/styled.d.ts +0 -1
  162. package/{cjs → node}/src/CircularProgress/styled.js +2 -8
  163. package/{cjs → node}/src/CircularProgress/types.d.ts +0 -0
  164. package/{cjs/src/styles/styled → node/src/CircularProgress}/types.js +0 -0
  165. package/node/src/FormControlLabel/FormControlLabel.d.ts +3 -0
  166. package/node/src/FormControlLabel/FormControlLabel.js +32 -0
  167. package/node/src/FormControlLabel/index.d.ts +2 -0
  168. package/node/src/FormControlLabel/index.js +14 -0
  169. package/node/src/FormControlLabel/styled.d.ts +3 -0
  170. package/node/src/FormControlLabel/styled.js +14 -0
  171. package/node/src/FormControlLabel/types.d.ts +2 -0
  172. package/node/src/FormControlLabel/types.js +2 -0
  173. package/node/src/FormHelperText/FormHelperText.d.ts +4 -0
  174. package/node/src/FormHelperText/FormHelperText.js +24 -0
  175. package/node/src/FormHelperText/index.d.ts +1 -0
  176. package/node/src/FormHelperText/index.js +13 -0
  177. package/node/src/FormHelperText/styled.d.ts +41 -0
  178. package/node/src/FormHelperText/styled.js +14 -0
  179. package/node/src/FormHelperText/types.d.ts +6 -0
  180. package/node/src/FormHelperText/types.js +2 -0
  181. package/node/src/GlobalStyles/GlobalStyles.d.ts +3 -0
  182. package/node/src/GlobalStyles/GlobalStyles.js +39 -0
  183. package/node/src/GlobalStyles/index.d.ts +1 -0
  184. package/node/src/GlobalStyles/index.js +13 -0
  185. package/node/src/Grid/Grid.d.ts +3 -0
  186. package/node/src/Grid/Grid.js +32 -0
  187. package/node/src/Grid/index.d.ts +2 -0
  188. package/node/src/Grid/index.js +14 -0
  189. package/node/src/Grid/styled.d.ts +13 -0
  190. package/node/src/Grid/styled.js +14 -0
  191. package/node/src/Grid/types.d.ts +30 -0
  192. package/node/src/Grid/types.js +2 -0
  193. package/{cjs → node}/src/IconButton/IconButton.d.ts +1 -0
  194. package/{cjs → node}/src/IconButton/IconButton.js +0 -0
  195. package/{cjs → node}/src/IconButton/index.d.ts +0 -0
  196. package/{cjs → node}/src/IconButton/index.js +0 -0
  197. package/{cjs → node}/src/IconButton/styled.d.ts +0 -0
  198. package/{cjs → node}/src/IconButton/styled.js +0 -0
  199. package/node/src/Menu/Menu.d.ts +3 -0
  200. package/node/src/Menu/Menu.js +32 -0
  201. package/node/src/Menu/index.d.ts +1 -0
  202. package/node/src/Menu/index.js +13 -0
  203. package/node/src/MenuItem/MenuItem.d.ts +3 -0
  204. package/node/src/MenuItem/MenuItem.js +32 -0
  205. package/node/src/MenuItem/index.d.ts +1 -0
  206. package/node/src/MenuItem/index.js +13 -0
  207. package/node/src/MenuList/MenuList.d.ts +3 -0
  208. package/node/src/MenuList/MenuList.js +32 -0
  209. package/node/src/MenuList/index.d.ts +2 -0
  210. package/node/src/MenuList/index.js +14 -0
  211. package/node/src/MenuList/styled.d.ts +20 -0
  212. package/node/src/MenuList/styled.js +20 -0
  213. package/node/src/MenuList/types.d.ts +2 -0
  214. package/node/src/MenuList/types.js +2 -0
  215. package/node/src/Tag/Tag.d.ts +3 -0
  216. package/node/src/Tag/Tag.js +32 -0
  217. package/node/src/Tag/constants.d.ts +21 -0
  218. package/node/src/Tag/constants.js +28 -0
  219. package/node/src/Tag/index.d.ts +2 -0
  220. package/node/src/Tag/index.js +14 -0
  221. package/node/src/Tag/styled.d.ts +26 -0
  222. package/node/src/Tag/styled.js +120 -0
  223. package/node/src/Tag/types.d.ts +12 -0
  224. package/node/src/Tag/types.js +2 -0
  225. package/node/src/TextField/TextField.d.ts +4 -0
  226. package/node/src/TextField/TextField.js +53 -0
  227. package/node/src/TextField/index.d.ts +2 -0
  228. package/node/src/TextField/index.js +14 -0
  229. package/node/src/TextField/types.d.ts +6 -0
  230. package/node/src/TextField/types.js +2 -0
  231. package/{cjs → node}/src/ThemeProvider/ThemeProvider.d.ts +0 -0
  232. package/{cjs → node}/src/ThemeProvider/ThemeProvider.js +2 -1
  233. package/{cjs → node}/src/ThemeProvider/index.d.ts +0 -0
  234. package/{cjs → node}/src/ThemeProvider/index.js +0 -0
  235. package/{cjs → node}/src/Typography/Typography.d.ts +1 -0
  236. package/{cjs → node}/src/Typography/Typography.js +0 -0
  237. package/{cjs → node}/src/Typography/index.d.ts +0 -0
  238. package/{cjs → node}/src/Typography/index.js +0 -0
  239. package/{cjs → node}/src/index.d.ts +6 -0
  240. package/{cjs → node}/src/index.js +6 -0
  241. package/{cjs → node}/src/styles/index.d.ts +0 -0
  242. package/{cjs → node}/src/styles/index.js +0 -0
  243. package/{cjs → node}/src/styles/styled/index.d.ts +0 -0
  244. package/{cjs → node}/src/styles/styled/index.js +0 -0
  245. package/{cjs → node}/src/styles/styled/styled.d.ts +0 -0
  246. package/{cjs → node}/src/styles/styled/styled.js +0 -0
  247. package/{cjs → node}/src/styles/styled/types.d.ts +0 -0
  248. package/node/src/styles/styled/types.js +2 -0
  249. package/node/src/theme/__tests__/BaseTheme.test.d.ts +1 -0
  250. package/{cjs → node}/src/theme/__tests__/BaseTheme.test.js +1 -1
  251. package/{cjs → node}/src/theme/baseTheme.d.ts +4 -3
  252. package/{cjs → node}/src/theme/baseTheme.js +2 -2
  253. package/node/src/theme/components/MuiFormHelperText.d.ts +4 -0
  254. package/node/src/theme/components/MuiFormHelperText.js +18 -0
  255. package/node/src/theme/components/MuiFormLabel.d.ts +4 -0
  256. package/node/src/theme/components/MuiFormLabel.js +14 -0
  257. package/node/src/theme/components/MuiInputBase.d.ts +4 -0
  258. package/node/src/theme/components/MuiInputBase.js +16 -0
  259. package/node/src/theme/components/MuiInputLabel.d.ts +4 -0
  260. package/node/src/theme/components/MuiInputLabel.js +32 -0
  261. package/node/src/theme/components/MuiOutlinedInput.d.ts +4 -0
  262. package/node/src/theme/components/MuiOutlinedInput.js +64 -0
  263. package/node/src/theme/components/MuiTypography.d.ts +21 -0
  264. package/node/src/theme/components/MuiTypography.js +21 -0
  265. package/{cjs/src/theme → node/src/theme/components}/components.d.ts +2 -1
  266. package/node/src/theme/components/components.js +65 -0
  267. package/node/src/theme/components/index.d.ts +1 -0
  268. package/node/src/theme/components/index.js +13 -0
  269. package/{cjs → node}/src/theme/constants.d.ts +0 -0
  270. package/{cjs → node}/src/theme/constants.js +0 -0
  271. package/{cjs → node}/src/theme/elevation.d.ts +0 -0
  272. package/node/src/theme/elevation.js +10 -0
  273. package/node/src/theme/hooks/index.d.ts +1 -0
  274. package/node/src/theme/hooks/index.js +13 -0
  275. package/node/src/theme/hooks/useTheme/index.d.ts +2 -0
  276. package/node/src/theme/hooks/useTheme/index.js +6 -0
  277. package/{cjs → node}/src/theme/index.d.ts +1 -0
  278. package/{cjs → node}/src/theme/index.js +1 -0
  279. package/{cjs → node}/src/theme/palette/brandPalette.d.ts +0 -0
  280. package/{cjs → node}/src/theme/palette/brandPalette.js +0 -0
  281. package/{cjs → node}/src/theme/palette/index.d.ts +0 -0
  282. package/{cjs → node}/src/theme/palette/index.js +0 -0
  283. package/{cjs → node}/src/theme/palette/palette.d.ts +1 -1
  284. package/{cjs → node}/src/theme/palette/palette.js +0 -0
  285. package/{cjs → node}/src/theme/shape.d.ts +0 -0
  286. package/{cjs → node}/src/theme/shape.js +0 -0
  287. package/{cjs → node}/src/theme/typography.d.ts +0 -0
  288. package/{cjs → node}/src/theme/typography.js +1 -1
  289. package/package.json +3 -2
  290. package/cjs/src/ButtonBase/styled.js +0 -224
  291. package/cjs/src/theme/components.js +0 -28
  292. package/cjs/src/theme/elevation.js +0 -10
  293. package/esm/src/theme/components.js +0 -24
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MuiInputBase = void 0;
4
+ exports.MuiInputBase = {
5
+ styleOverrides: {
6
+ root: function (_a) {
7
+ var theme = _a.theme;
8
+ return {
9
+ '&.MuiInputBase-colorSuccess + .MuiFormHelperText-root': {
10
+ color: theme.palette.green[800],
11
+ },
12
+ };
13
+ },
14
+ },
15
+ };
16
+ exports.default = exports.MuiInputBase;
@@ -0,0 +1,4 @@
1
+ import { Components } from '@mui/material';
2
+ import type { Theme } from '../baseTheme';
3
+ export declare const MuiInputLabel: Components<Theme>['MuiInputLabel'];
4
+ export default MuiInputLabel;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MuiInputLabel = void 0;
4
+ exports.MuiInputLabel = {
5
+ defaultProps: {
6
+ shrink: true,
7
+ },
8
+ styleOverrides: {
9
+ root: function (_a) {
10
+ var theme = _a.theme;
11
+ return {
12
+ position: 'relative',
13
+ transform: 'none',
14
+ color: theme.palette.grey[700],
15
+ fontWeight: theme.typography.fontWeightMedium,
16
+ fontSize: theme.typography.pxToRem(12),
17
+ lineHeight: theme.typography.pxToRem(16),
18
+ marginBottom: theme.spacing(1),
19
+ '&.Mui-focused': {
20
+ color: theme.palette.grey[700],
21
+ },
22
+ '&.Mui-error': {
23
+ color: theme.palette.grey[700],
24
+ },
25
+ '&.Mui-disabled': {
26
+ color: theme.palette.grey[600],
27
+ },
28
+ };
29
+ },
30
+ },
31
+ };
32
+ exports.default = exports.MuiInputLabel;
@@ -0,0 +1,4 @@
1
+ import { Components } from '@mui/material';
2
+ import type { Theme } from '../baseTheme';
3
+ export declare const MuiOutlinedInput: Components<Theme>['MuiOutlinedInput'];
4
+ export default MuiOutlinedInput;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MuiOutlinedInput = void 0;
4
+ exports.MuiOutlinedInput = {
5
+ defaultProps: {
6
+ notched: false,
7
+ },
8
+ styleOverrides: {
9
+ root: function (_a) {
10
+ var theme = _a.theme;
11
+ return {
12
+ fontSize: theme.typography.pxToRem(14),
13
+ borderRadius: theme.shape.small,
14
+ color: theme.palette.grey[900],
15
+ background: theme.palette.background.element,
16
+ '&:hover': {
17
+ // FIXME: to theme
18
+ background: '#EEF1F4',
19
+ },
20
+ '&:hover .MuiOutlinedInput-notchedOutline': {
21
+ borderColor: theme.palette.grey[300],
22
+ },
23
+ '&.Mui-disabled .MuiOutlinedInput-notchedOutline': {
24
+ borderColor: theme.palette.background.element,
25
+ },
26
+ '&.Mui-error .MuiOutlinedInput-notchedOutline': {
27
+ borderColor: theme.palette.error.dark,
28
+ },
29
+ '&.Mui-focused .MuiOutlinedInput-notchedOutline': {
30
+ borderColor: theme.palette.primary[700],
31
+ },
32
+ };
33
+ },
34
+ input: function (_a) {
35
+ var theme = _a.theme;
36
+ return {
37
+ padding: theme.spacing(2.5, 2),
38
+ borderRadius: theme.shape.small,
39
+ '&:disabled': {
40
+ background: theme.palette.background.element,
41
+ },
42
+ '&::placeholder': {
43
+ opacity: 1,
44
+ color: theme.palette.grey[600],
45
+ },
46
+ };
47
+ },
48
+ inputSizeSmall: function (_a) {
49
+ var theme = _a.theme;
50
+ return {
51
+ paddingBlock: theme.spacing(2),
52
+ paddingInline: theme.spacing(1.5),
53
+ };
54
+ },
55
+ notchedOutline: function (_a) {
56
+ var theme = _a.theme;
57
+ return {
58
+ borderWidth: '2px',
59
+ borderColor: theme.palette.grey[300],
60
+ };
61
+ },
62
+ },
63
+ };
64
+ exports.default = exports.MuiOutlinedInput;
@@ -0,0 +1,21 @@
1
+ import { Components } from '@mui/material';
2
+ export declare type FontsUrls = {
3
+ bold: {
4
+ woff: string;
5
+ woff2: string;
6
+ };
7
+ light: {
8
+ woff: string;
9
+ woff2: string;
10
+ };
11
+ medium: {
12
+ woff: string;
13
+ woff2: string;
14
+ };
15
+ regular: {
16
+ woff: string;
17
+ woff2: string;
18
+ };
19
+ };
20
+ export declare const MuiTypography: Components['MuiTypography'];
21
+ export default MuiTypography;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MuiTypography = void 0;
4
+ exports.MuiTypography = {
5
+ variants: [
6
+ {
7
+ props: { variant: 'button' },
8
+ style: {
9
+ textTransform: 'capitalize',
10
+ },
11
+ },
12
+ ],
13
+ defaultProps: {
14
+ // TODO: необходимо кастомизировать типы Components['MuiTypography']
15
+ variantMapping: {
16
+ link: 'a',
17
+ code: 'code',
18
+ },
19
+ },
20
+ };
21
+ exports.default = exports.MuiTypography;
@@ -1,4 +1,5 @@
1
1
  import { Components } from '@mui/material';
2
+ import type { Theme } from '../baseTheme';
2
3
  export declare type FontsUrls = {
3
4
  bold: {
4
5
  woff: string;
@@ -17,4 +18,4 @@ export declare type FontsUrls = {
17
18
  woff2: string;
18
19
  };
19
20
  };
20
- export declare const getComponents: (fontUrls: FontsUrls) => Components;
21
+ export declare const getComponents: (fontUrls: FontsUrls) => Components<Theme>;
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getComponents = void 0;
4
+ var MuiInputBase_1 = require("./MuiInputBase");
5
+ var MuiFormHelperText_1 = require("./MuiFormHelperText");
6
+ var MuiFormLabel_1 = require("./MuiFormLabel");
7
+ var MuiInputLabel_1 = require("./MuiInputLabel");
8
+ var MuiOutlinedInput_1 = require("./MuiOutlinedInput");
9
+ var MuiTypography_1 = require("./MuiTypography");
10
+ var getMuiCssBaseline = function (fontUrls) { return ({
11
+ styleOverrides: "\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 300;\n font-display: swap;\n src: url(".concat(fontUrls.light.woff2, ") format('woff2'), url(").concat(fontUrls.light.woff, ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 400;\n font-display: swap;\n src: url(").concat(fontUrls.regular.woff2, ") format('woff2'), url(").concat(fontUrls.regular.woff, ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 500;\n font-display: swap;\n src: url(").concat(fontUrls.medium.woff2, ") format('woff2'), url(").concat(fontUrls.medium.woff, ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 700;\n font-display: swap;\n src: url(").concat(fontUrls.bold.woff2, ") format('woff2'), url(").concat(fontUrls.bold.woff, ") format('woff');\n }\n "),
12
+ }); };
13
+ var MuiCheckbox = {
14
+ defaultProps: {
15
+ disableRipple: true,
16
+ },
17
+ };
18
+ var MuiMenu = {
19
+ defaultProps: {
20
+ autoFocus: false,
21
+ },
22
+ styleOverrides: {
23
+ paper: function (_a) {
24
+ var theme = _a.theme;
25
+ return {
26
+ marginTop: theme.spacing(2),
27
+ '&.MuiPaper-root': {
28
+ borderRadius: theme.shape.small,
29
+ boxShadow: theme.elevation[200],
30
+ },
31
+ };
32
+ },
33
+ list: function (_a) {
34
+ var theme = _a.theme;
35
+ return {
36
+ padding: theme.spacing(1, 0),
37
+ };
38
+ },
39
+ },
40
+ };
41
+ var MuiMenuItem = {
42
+ styleOverrides: {
43
+ root: function (_a) {
44
+ var theme = _a.theme;
45
+ return {
46
+ '&:hover': {
47
+ backgroundColor: theme.palette.background.elementHover,
48
+ },
49
+ };
50
+ },
51
+ },
52
+ };
53
+ var getComponents = function (fontUrls) { return ({
54
+ MuiCssBaseline: getMuiCssBaseline(fontUrls),
55
+ MuiTypography: MuiTypography_1.MuiTypography,
56
+ MuiInputBase: MuiInputBase_1.MuiInputBase,
57
+ MuiInputLabel: MuiInputLabel_1.MuiInputLabel,
58
+ MuiOutlinedInput: MuiOutlinedInput_1.MuiOutlinedInput,
59
+ MuiFormLabel: MuiFormLabel_1.MuiFormLabel,
60
+ MuiFormHelperText: MuiFormHelperText_1.MuiFormHelperText,
61
+ MuiCheckbox: MuiCheckbox,
62
+ MuiMenu: MuiMenu,
63
+ MuiMenuItem: MuiMenuItem,
64
+ }); };
65
+ exports.getComponents = getComponents;
@@ -0,0 +1 @@
1
+ export * from './components';
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./components"), exports);
File without changes
File without changes
File without changes
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.elevation = void 0;
4
+ exports.elevation = {
5
+ 100: '0px 0px 1px 0px #072D574F, 0px 1px 1px 0px #072D5740;',
6
+ 200: '0px 0px 1px 0px #072D574F, 0px 3px 5px 0px #072D5733;',
7
+ 300: '0px 0px 1px 0px #072D574F, 0px 8px 12px 0px #072D5726;',
8
+ 400: '0px 0px 1px 0px #072D574F, 0px 10px 18px 0px #072D5726;',
9
+ 500: '0px 0px 1px 0px #072D574F, 0px 18px 28px 0px #072D5726;',
10
+ };
@@ -0,0 +1 @@
1
+ export * from './useTheme';
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./useTheme"), exports);
@@ -0,0 +1,2 @@
1
+ import { Theme } from '../../baseTheme';
2
+ export declare const useTheme: () => Theme;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useTheme = void 0;
4
+ var react_1 = require("@emotion/react");
5
+ var useTheme = function () { return (0, react_1.useTheme)(); };
6
+ exports.useTheme = useTheme;
@@ -3,3 +3,4 @@ export * from './palette';
3
3
  export * from './constants';
4
4
  export * from './elevation';
5
5
  export * from './shape';
6
+ export * from './hooks';
@@ -15,3 +15,4 @@ __exportStar(require("./palette"), exports);
15
15
  __exportStar(require("./constants"), exports);
16
16
  __exportStar(require("./elevation"), exports);
17
17
  __exportStar(require("./shape"), exports);
18
+ __exportStar(require("./hooks"), exports);
File without changes
File without changes
File without changes
@@ -13,7 +13,7 @@ export declare type Color = {
13
13
  100: string;
14
14
  };
15
15
  export declare type PrimaryColorOptions = PaletteColorOptions & Color;
16
- declare type Background = TypeBackground & {
16
+ export declare type Background = TypeBackground & {
17
17
  element: string;
18
18
  elementHover: string;
19
19
  };
File without changes
File without changes
File without changes
File without changes
@@ -5,7 +5,7 @@ var HTML_FONT_SIZE = 14;
5
5
  // Т.к. нет досутпа к теме, написал функцию для конвертации px в rem
6
6
  var pxToRem = function (fontSize, htmlFontSize) {
7
7
  if (htmlFontSize === void 0) { htmlFontSize = HTML_FONT_SIZE; }
8
- return fontSize / htmlFontSize + "rem";
8
+ return "".concat(fontSize / htmlFontSize, "rem");
9
9
  };
10
10
  exports.pxToRem = pxToRem;
11
11
  exports.typography = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "source": "./src/index.ts",
6
6
  "jest": {
@@ -9,6 +9,7 @@
9
9
  }
10
10
  },
11
11
  "dependencies": {
12
+ "@astral/icons": "^1.0.0",
12
13
  "@emotion/react": "11.5.0",
13
14
  "@emotion/styled": "11.3.0",
14
15
  "@mui/base": "5.0.0-alpha.66",
@@ -30,7 +31,7 @@
30
31
  },
31
32
  "keywords": [],
32
33
  "sideEffects": false,
33
- "main": "./cjs/index.js",
34
+ "main": "./node/index.js",
34
35
  "types": "./esm/index.d.ts",
35
36
  "module": "./esm/index.js"
36
37
  }
@@ -1,224 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- var __assign = (this && this.__assign) || function () {
7
- __assign = Object.assign || function(t) {
8
- for (var s, i = 1, n = arguments.length; i < n; i++) {
9
- s = arguments[i];
10
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
- t[p] = s[p];
12
- }
13
- return t;
14
- };
15
- return __assign.apply(this, arguments);
16
- };
17
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
- if (k2 === undefined) k2 = k;
19
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
- Object.defineProperty(o, "default", { enumerable: true, value: v });
26
- }) : function(o, v) {
27
- o["default"] = v;
28
- });
29
- var __importStar = (this && this.__importStar) || function (mod) {
30
- if (mod && mod.__esModule) return mod;
31
- var result = {};
32
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
- __setModuleDefault(result, mod);
34
- return result;
35
- };
36
- Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.StyledButtonBase = exports.getDisabledBgColor = exports.getButtonPadding = exports.getButtonHeight = exports.getBgColor = exports.getBgText = exports.getColor = void 0;
38
- var ButtonUnstyled_1 = __importStar(require("@mui/base/ButtonUnstyled"));
39
- var styles_1 = require("../styles");
40
- var constants_1 = require("./constants");
41
- var BACKGROUND_COLOR_VARIANTS = {
42
- default: {
43
- contained: '800',
44
- light: '100',
45
- text: '100',
46
- },
47
- hover: {
48
- contained: '700',
49
- light: '200',
50
- text: '200',
51
- },
52
- focus: {
53
- contained: '900',
54
- light: '100',
55
- text: '100',
56
- },
57
- };
58
- var getColor = function (_a) {
59
- var theme = _a.theme, customVariant = _a.customVariant, customColor = _a.customColor, buttonState = _a.buttonState;
60
- var palette = theme.palette;
61
- if (buttonState === constants_1.ButtonStates.ACTIVE) {
62
- if (customVariant === constants_1.ButtonVariants.LINK)
63
- return palette.grey['900'];
64
- return palette.primary.contrastText;
65
- }
66
- if (customVariant === constants_1.ButtonVariants.TEXT) {
67
- if (buttonState === constants_1.ButtonStates.FOCUS)
68
- return theme.palette.primary.main;
69
- return palette.grey['900'];
70
- }
71
- if (customVariant === constants_1.ButtonVariants.CONTAINED)
72
- return palette.primary.contrastText;
73
- if (customVariant === constants_1.ButtonVariants.LIGHT) {
74
- if (customColor === constants_1.ButtonColors.PRIMARY) {
75
- if (buttonState === constants_1.ButtonStates.DEFAULT)
76
- return palette.grey['900'];
77
- if (buttonState === constants_1.ButtonStates.HOVER)
78
- return palette.grey['900'];
79
- if (buttonState === constants_1.ButtonStates.FOCUS)
80
- return palette.primary['800'];
81
- }
82
- if (customColor === constants_1.ButtonColors.ERROR)
83
- return palette.red['900'];
84
- if (customColor === constants_1.ButtonColors.SUCCESS)
85
- return palette.green['900'];
86
- if (customColor === constants_1.ButtonColors.WARNING)
87
- return palette.yellow['900'];
88
- return palette.grey['900'];
89
- }
90
- if (customVariant === constants_1.ButtonVariants.LINK) {
91
- if (buttonState === constants_1.ButtonStates.DEFAULT)
92
- return palette.primary['800'];
93
- if (buttonState === constants_1.ButtonStates.HOVER)
94
- return palette.primary['700'];
95
- if (buttonState === constants_1.ButtonStates.FOCUS)
96
- return palette.primary.dark;
97
- return palette.primary.main;
98
- }
99
- return palette.grey['900'];
100
- };
101
- exports.getColor = getColor;
102
- var getBgText = function (_a) {
103
- var palette = _a.palette, buttonState = _a.buttonState, colorVariant = _a.colorVariant;
104
- if (buttonState === constants_1.ButtonStates.HOVER)
105
- return palette.grey[colorVariant];
106
- if (buttonState === constants_1.ButtonStates.FOCUS)
107
- return palette.primary[colorVariant];
108
- return 'transparent';
109
- };
110
- exports.getBgText = getBgText;
111
- var getBgContained = function (_a) {
112
- var palette = _a.palette, colorVariant = _a.colorVariant, customColor = _a.customColor;
113
- if (customColor === constants_1.ButtonColors.ERROR)
114
- return palette.red[colorVariant];
115
- if (customColor === constants_1.ButtonColors.SUCCESS)
116
- return palette.green[colorVariant];
117
- if (customColor === constants_1.ButtonColors.WARNING)
118
- return palette.yellow[colorVariant];
119
- if (customColor === constants_1.ButtonColors.PRIMARY)
120
- return palette.primary[colorVariant];
121
- return 'transparent';
122
- };
123
- var getBgLight = function (_a) {
124
- var palette = _a.palette, colorVariant = _a.colorVariant, buttonState = _a.buttonState, customColor = _a.customColor;
125
- if (customColor === constants_1.ButtonColors.PRIMARY) {
126
- if (buttonState === constants_1.ButtonStates.DEFAULT)
127
- return palette.grey[colorVariant];
128
- if (buttonState === constants_1.ButtonStates.HOVER)
129
- return palette.grey[colorVariant];
130
- if (buttonState === constants_1.ButtonStates.FOCUS)
131
- return palette.primary[colorVariant];
132
- }
133
- if (customColor === constants_1.ButtonColors.ERROR)
134
- return palette.red[colorVariant];
135
- if (customColor === constants_1.ButtonColors.SUCCESS)
136
- return palette.green[colorVariant];
137
- if (customColor === constants_1.ButtonColors.WARNING)
138
- return palette.yellow[colorVariant];
139
- return 'transparent';
140
- };
141
- var getBgColor = function (_a) {
142
- var customColor = _a.customColor, customVariant = _a.customVariant, buttonState = _a.buttonState, theme = _a.theme;
143
- var palette = theme.palette;
144
- if (customVariant === constants_1.ButtonVariants.LINK)
145
- return 'transparent';
146
- if (buttonState === constants_1.ButtonStates.ACTIVE)
147
- return palette.grey['900'];
148
- var containedColor = BACKGROUND_COLOR_VARIANTS[buttonState].contained;
149
- var lightColor = BACKGROUND_COLOR_VARIANTS[buttonState].light;
150
- var textColor = BACKGROUND_COLOR_VARIANTS[buttonState].text;
151
- if (customVariant === constants_1.ButtonVariants.TEXT)
152
- return (0, exports.getBgText)({ buttonState: buttonState, palette: palette, colorVariant: textColor });
153
- if (customVariant === constants_1.ButtonVariants.CONTAINED)
154
- return getBgContained({
155
- palette: palette,
156
- customColor: customColor,
157
- colorVariant: containedColor,
158
- });
159
- if (customVariant === constants_1.ButtonVariants.LIGHT)
160
- return getBgLight({
161
- palette: palette,
162
- buttonState: buttonState,
163
- customColor: customColor,
164
- colorVariant: lightColor,
165
- });
166
- return 'transparent';
167
- };
168
- exports.getBgColor = getBgColor;
169
- var getButtonHeight = function (_a) {
170
- var size = _a.size;
171
- if (size === constants_1.ButtonSizes.LARGE)
172
- return '40px';
173
- return '32px';
174
- };
175
- exports.getButtonHeight = getButtonHeight;
176
- var getButtonPadding = function (_a) {
177
- var size = _a.size, theme = _a.theme;
178
- if (size === constants_1.ButtonSizes.LARGE)
179
- return theme.spacing(2, 4, 2, 4);
180
- return theme.spacing(1, 3, 1, 3);
181
- };
182
- exports.getButtonPadding = getButtonPadding;
183
- var getDisabledBgColor = function (_a) {
184
- var theme = _a.theme, customVariant = _a.customVariant;
185
- if (customVariant === constants_1.ButtonVariants.LINK ||
186
- customVariant === constants_1.ButtonVariants.TEXT)
187
- return 'transparent';
188
- return theme.palette.grey['100'];
189
- };
190
- exports.getDisabledBgColor = getDisabledBgColor;
191
- exports.StyledButtonBase = (0, styles_1.styled)(ButtonUnstyled_1.default, {
192
- shouldForwardProp: function (prop) {
193
- return prop !== 'customColor' && prop !== 'customVariant';
194
- },
195
- })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border: none;\n font-family: Ubuntu, serif;\n padding: ", ";\n height: ", ";\n border-radius: ", ";\n cursor: pointer;\n font-size: ", ";\n font-weight: ", ";\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n\n background-color: ", ";\n color: ", ";\n\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n\n &:focus {\n background-color: ", ";\n color: ", ";\n }\n\n &:active {\n background-color: ", ";\n color: ", ";\n }\n\n &.", " {\n cursor: unset;\n background-color: ", ";\n color: ", ";\n }\n"], ["\n border: none;\n font-family: Ubuntu, serif;\n padding: ", ";\n height: ", ";\n border-radius: ", ";\n cursor: pointer;\n font-size: ", ";\n font-weight: ", ";\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n\n background-color: ", ";\n color: ", ";\n\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n\n &:focus {\n background-color: ", ";\n color: ", ";\n }\n\n &:active {\n background-color: ", ";\n color: ", ";\n }\n\n &.", " {\n cursor: unset;\n background-color: ", ";\n color: ", ";\n }\n"])), exports.getButtonPadding, exports.getButtonHeight, function (_a) {
196
- var theme = _a.theme;
197
- return theme.shape.small;
198
- }, function (_a) {
199
- var theme = _a.theme;
200
- return theme.typography.button.fontSize;
201
- }, function (_a) {
202
- var theme = _a.theme;
203
- return theme.typography.button.fontWeight;
204
- }, function (props) {
205
- return (0, exports.getBgColor)(__assign(__assign({}, props), { buttonState: constants_1.ButtonStates.DEFAULT }));
206
- }, function (props) {
207
- return (0, exports.getColor)(__assign(__assign({}, props), { buttonState: constants_1.ButtonStates.DEFAULT }));
208
- }, function (props) {
209
- return (0, exports.getBgColor)(__assign(__assign({}, props), { buttonState: constants_1.ButtonStates.HOVER }));
210
- }, function (props) {
211
- return (0, exports.getColor)(__assign(__assign({}, props), { buttonState: constants_1.ButtonStates.HOVER }));
212
- }, function (props) {
213
- return (0, exports.getBgColor)(__assign(__assign({}, props), { buttonState: constants_1.ButtonStates.FOCUS }));
214
- }, function (props) {
215
- return (0, exports.getColor)(__assign(__assign({}, props), { buttonState: constants_1.ButtonStates.FOCUS }));
216
- }, function (props) {
217
- return (0, exports.getBgColor)(__assign(__assign({}, props), { buttonState: constants_1.ButtonStates.ACTIVE }));
218
- }, function (props) {
219
- return (0, exports.getColor)(__assign(__assign({}, props), { buttonState: constants_1.ButtonStates.ACTIVE }));
220
- }, ButtonUnstyled_1.buttonUnstyledClasses.disabled, exports.getDisabledBgColor, function (_a) {
221
- var theme = _a.theme;
222
- return theme.palette.grey['500'];
223
- });
224
- var templateObject_1;
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getComponents = void 0;
4
- var getMuiCssBaseline = function (fontUrls) { return ({
5
- styleOverrides: "\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 300;\n font-display: swap;\n src: url(" + fontUrls.light.woff2 + ") format('woff2'), url(" + fontUrls.light.woff + ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 400;\n font-display: swap;\n src: url(" + fontUrls.regular.woff2 + ") format('woff2'), url(" + fontUrls.regular.woff + ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 500;\n font-display: swap;\n src: url(" + fontUrls.medium.woff2 + ") format('woff2'), url(" + fontUrls.medium.woff + ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 700;\n font-display: swap;\n src: url(" + fontUrls.bold.woff2 + ") format('woff2'), url(" + fontUrls.bold.woff + ") format('woff');\n }\n ",
6
- }); };
7
- var getMuiTypography = function () { return ({
8
- variants: [
9
- {
10
- props: { variant: 'button' },
11
- style: {
12
- textTransform: 'capitalize',
13
- },
14
- },
15
- ],
16
- defaultProps: {
17
- // TODO: необходимо кастомизировать типы Components['MuiTypography']
18
- variantMapping: {
19
- link: 'a',
20
- code: 'code',
21
- },
22
- },
23
- }); };
24
- var getComponents = function (fontUrls) { return ({
25
- MuiCssBaseline: getMuiCssBaseline(fontUrls),
26
- MuiTypography: getMuiTypography(),
27
- }); };
28
- exports.getComponents = getComponents;