@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
@@ -2,7 +2,7 @@ var HTML_FONT_SIZE = 14;
2
2
  // Т.к. нет досутпа к теме, написал функцию для конвертации px в rem
3
3
  export var pxToRem = function (fontSize, htmlFontSize) {
4
4
  if (htmlFontSize === void 0) { htmlFontSize = HTML_FONT_SIZE; }
5
- return fontSize / htmlFontSize + "rem";
5
+ return "".concat(fontSize / htmlFontSize, "rem");
6
6
  };
7
7
  export var typography = {
8
8
  fontSize: 14,
File without changes
File without changes
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { BadgeProps } from './types';
2
3
  declare const Badge: ({ children, color, ...props }: BadgeProps) => JSX.Element;
3
4
  export default Badge;
File without changes
File without changes
File without changes
@@ -23,7 +23,7 @@ export declare const StyledBadge: import("@emotion/styled").StyledComponent<{
23
23
  color?: "primary" | "secondary" | "default" | "error" | "warning" | "info" | "success" | undefined;
24
24
  overlap?: "circular" | "rectangular" | undefined;
25
25
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
26
- variant?: "dot" | "standard" | undefined;
26
+ variant?: "standard" | "dot" | undefined;
27
27
  } & {
28
28
  anchorOrigin?: import("@mui/material").BadgeOrigin | undefined;
29
29
  components?: {
@@ -43,7 +43,7 @@ export declare const StyledBadge: import("@emotion/styled").StyledComponent<{
43
43
  variant?: string | undefined;
44
44
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof import("react").HTMLAttributes<HTMLSpanElement>> & {
45
45
  ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
46
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "children" | "sx" | "variant" | "components" | "componentsProps" | "invisible" | "overlap" | "anchorOrigin" | "badgeContent" | "max" | "showZero"> & {
46
+ }, "components" | "color" | keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "componentsProps" | "invisible" | "anchorOrigin" | "overlap" | "badgeContent" | "max" | "showZero"> & {
47
47
  theme?: Theme | undefined;
48
48
  } & Omit<BadgeProps, "color"> & {
49
49
  customColor: BadgeColor;
File without changes
File without changes
File without changes
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import { ButtonProps } from './types';
2
3
  export declare const Button: ({ children, startIcon, endIcon, loading, ...props }: ButtonProps) => JSX.Element;
File without changes
File without changes
File without changes
File without changes
@@ -17,12 +17,15 @@ exports.StyledButton = (0, styles_1.styled)(ButtonBase_1.ButtonBase, {
17
17
  shouldForwardProp: function (prop) {
18
18
  return prop !== 'startIcon' && prop !== 'endIcon' && prop !== 'loading';
19
19
  },
20
- })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n pointer-events: ", ";\n color: ", ";\n\n > span:first-of-type {\n display: inherit;\n margin-right: ", ";\n }\n\n > span:last-of-type {\n display: inherit;\n margin-left: ", ";\n }\n\n .MuiCircularProgress-root {\n width: 16px !important;\n height: 16px !important;\n transform: translate(-50%, -50%);\n position: absolute;\n\n color: ", ";\n }\n"], ["\n pointer-events: ", ";\n color: ", ";\n\n > span:first-of-type {\n display: inherit;\n margin-right: ", ";\n }\n\n > span:last-of-type {\n display: inherit;\n margin-left: ", ";\n }\n\n .MuiCircularProgress-root {\n width: 16px !important;\n height: 16px !important;\n transform: translate(-50%, -50%);\n position: absolute;\n\n color: ", ";\n }\n"])), function (_a) {
20
+ })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n pointer-events: ", ";\n color: ", ";\n\n &:focus {\n color: ", ";\n }\n\n > span:first-of-type {\n display: inherit;\n margin-right: ", ";\n }\n\n > span:last-of-type {\n display: inherit;\n margin-left: ", ";\n }\n\n .MuiCircularProgress-root {\n width: 16px !important;\n height: 16px !important;\n transform: translate(-50%, -50%);\n position: absolute;\n\n color: ", ";\n }\n"], ["\n pointer-events: ", ";\n color: ", ";\n\n &:focus {\n color: ", ";\n }\n\n > span:first-of-type {\n display: inherit;\n margin-right: ", ";\n }\n\n > span:last-of-type {\n display: inherit;\n margin-left: ", ";\n }\n\n .MuiCircularProgress-root {\n width: 16px !important;\n height: 16px !important;\n transform: translate(-50%, -50%);\n position: absolute;\n\n color: ", ";\n }\n"])), function (_a) {
21
21
  var loading = _a.loading;
22
22
  return (loading ? 'none' : 'inherit');
23
23
  }, function (_a) {
24
24
  var loading = _a.loading;
25
25
  return loading && 'transparent';
26
+ }, function (_a) {
27
+ var loading = _a.loading;
28
+ return loading && 'transparent';
26
29
  }, function (_a) {
27
30
  var theme = _a.theme;
28
31
  return theme.spacing(2);
File without changes
File without changes
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import { BaseButtonProps } from './types';
2
3
  export declare const ButtonBase: ({ children, variant, color, ...props }: BaseButtonProps) => JSX.Element;
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { Palette, Theme } from '../theme';
2
+ import { Theme } from '../theme';
3
3
  import { BaseButtonProps, ButtonColor, ButtonSize, ButtonState, ButtonVariant } from './types';
4
4
  declare type StyledButtonBaseThemeProps = {
5
5
  customColor?: ButtonColor;
@@ -10,11 +10,6 @@ declare type StyledButtonBaseThemeProps = {
10
10
  export declare const getColor: ({ theme, customVariant, customColor, buttonState, }: StyledButtonBaseThemeProps & {
11
11
  buttonState: ButtonState;
12
12
  }) => string;
13
- export declare const getBgText: ({ palette, buttonState, colorVariant, }: {
14
- palette: Palette;
15
- buttonState: ButtonState;
16
- colorVariant: string;
17
- }) => string;
18
13
  export declare const getBgColor: ({ customColor, customVariant, buttonState, theme, }: StyledButtonBaseThemeProps & {
19
14
  buttonState: ButtonState;
20
15
  }) => string;
@@ -0,0 +1,229 @@
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.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 getColor = function (_a) {
42
+ var theme = _a.theme, customVariant = _a.customVariant, customColor = _a.customColor, buttonState = _a.buttonState;
43
+ var textColorVariants = {
44
+ light: {
45
+ error: {
46
+ default: theme.palette.red['900'],
47
+ hover: theme.palette.red['900'],
48
+ active: theme.palette.red['900'],
49
+ focus: theme.palette.red['900'],
50
+ },
51
+ success: {
52
+ default: theme.palette.green['900'],
53
+ hover: theme.palette.green['900'],
54
+ active: theme.palette.green['900'],
55
+ focus: theme.palette.green['900'],
56
+ },
57
+ primary: {
58
+ default: theme.palette.grey['900'],
59
+ hover: theme.palette.grey['900'],
60
+ active: theme.palette.primary['800'],
61
+ focus: theme.palette.grey['900'],
62
+ },
63
+ warning: {
64
+ default: theme.palette.yellow['900'],
65
+ hover: theme.palette.yellow['900'],
66
+ active: theme.palette.yellow['900'],
67
+ focus: theme.palette.yellow['900'],
68
+ },
69
+ },
70
+ contained: theme.palette.primary.contrastText,
71
+ text: {
72
+ default: theme.palette.grey['900'],
73
+ hover: theme.palette.grey['900'],
74
+ active: theme.palette.primary['800'],
75
+ focus: theme.palette.grey['900'],
76
+ },
77
+ link: {
78
+ default: theme.palette.primary['800'],
79
+ hover: theme.palette.primary['700'],
80
+ active: theme.palette.primary['900'],
81
+ focus: theme.palette.primary['800'],
82
+ },
83
+ };
84
+ if (customVariant === constants_1.ButtonVariants.CONTAINED) {
85
+ return textColorVariants.contained;
86
+ }
87
+ if (customVariant === constants_1.ButtonVariants.LIGHT && customColor) {
88
+ return textColorVariants.light[customColor][buttonState];
89
+ }
90
+ if (customVariant === constants_1.ButtonVariants.TEXT) {
91
+ return textColorVariants.text[buttonState];
92
+ }
93
+ return textColorVariants.link[buttonState];
94
+ };
95
+ exports.getColor = getColor;
96
+ var getBgColor = function (_a) {
97
+ var customColor = _a.customColor, customVariant = _a.customVariant, buttonState = _a.buttonState, theme = _a.theme;
98
+ var bgColorVariants = {
99
+ light: {
100
+ error: {
101
+ default: theme.palette.red['100'],
102
+ hover: theme.palette.red['200'],
103
+ active: theme.palette.red['100'],
104
+ focus: theme.palette.red['100'],
105
+ },
106
+ success: {
107
+ default: theme.palette.green['100'],
108
+ hover: theme.palette.green['200'],
109
+ active: theme.palette.green['100'],
110
+ focus: theme.palette.green['100'],
111
+ },
112
+ primary: {
113
+ default: theme.palette.grey['100'],
114
+ hover: theme.palette.grey['200'],
115
+ active: theme.palette.primary['100'],
116
+ focus: theme.palette.grey['100'],
117
+ },
118
+ warning: {
119
+ default: theme.palette.yellow['100'],
120
+ hover: theme.palette.yellow['200'],
121
+ active: theme.palette.yellow['100'],
122
+ focus: theme.palette.yellow['100'],
123
+ },
124
+ },
125
+ contained: {
126
+ error: {
127
+ default: theme.palette.red['800'],
128
+ hover: theme.palette.red['700'],
129
+ active: theme.palette.red['900'],
130
+ focus: theme.palette.red['800'],
131
+ },
132
+ success: {
133
+ default: theme.palette.green['800'],
134
+ hover: theme.palette.green['700'],
135
+ active: theme.palette.green['900'],
136
+ focus: theme.palette.green['800'],
137
+ },
138
+ primary: {
139
+ default: theme.palette.primary['800'],
140
+ hover: theme.palette.primary['700'],
141
+ active: theme.palette.primary['900'],
142
+ focus: theme.palette.primary['800'],
143
+ },
144
+ warning: {
145
+ default: theme.palette.yellow['800'],
146
+ hover: theme.palette.yellow['700'],
147
+ active: theme.palette.yellow['900'],
148
+ focus: theme.palette.yellow['800'],
149
+ },
150
+ },
151
+ text: {
152
+ default: 'transparent',
153
+ hover: theme.palette.grey['200'],
154
+ active: theme.palette.primary['100'],
155
+ focus: 'transparent',
156
+ },
157
+ link: 'transparent',
158
+ };
159
+ if (customVariant === constants_1.ButtonVariants.LIGHT && customColor) {
160
+ return bgColorVariants.light[customColor][buttonState];
161
+ }
162
+ if (customVariant === constants_1.ButtonVariants.CONTAINED && customColor) {
163
+ return bgColorVariants.contained[customColor][buttonState];
164
+ }
165
+ if (customVariant === constants_1.ButtonVariants.TEXT) {
166
+ return bgColorVariants.text[buttonState];
167
+ }
168
+ return bgColorVariants.link;
169
+ };
170
+ exports.getBgColor = getBgColor;
171
+ var getButtonHeight = function (_a) {
172
+ var size = _a.size;
173
+ if (size === constants_1.ButtonSizes.LARGE)
174
+ return '40px';
175
+ return '32px';
176
+ };
177
+ exports.getButtonHeight = getButtonHeight;
178
+ var getButtonPadding = function (_a) {
179
+ var size = _a.size, theme = _a.theme;
180
+ if (size === constants_1.ButtonSizes.LARGE)
181
+ return theme.spacing(2, 4, 2, 4);
182
+ return theme.spacing(1, 3, 1, 3);
183
+ };
184
+ exports.getButtonPadding = getButtonPadding;
185
+ var getDisabledBgColor = function (_a) {
186
+ var theme = _a.theme, customVariant = _a.customVariant;
187
+ if (customVariant === constants_1.ButtonVariants.LINK ||
188
+ customVariant === constants_1.ButtonVariants.TEXT)
189
+ return 'transparent';
190
+ return theme.palette.grey['100'];
191
+ };
192
+ exports.getDisabledBgColor = getDisabledBgColor;
193
+ exports.StyledButtonBase = (0, styles_1.styled)(ButtonUnstyled_1.default, {
194
+ shouldForwardProp: function (prop) {
195
+ return prop !== 'customColor' && prop !== 'customVariant';
196
+ },
197
+ })(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 outline: 2px solid ", ";\n }\n\n &:active {\n background-color: ", ";\n color: ", ";\n outline: none;\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 outline: 2px solid ", ";\n }\n\n &:active {\n background-color: ", ";\n color: ", ";\n outline: none;\n }\n\n &.", " {\n cursor: unset;\n background-color: ", ";\n color: ", ";\n }\n"])), exports.getButtonPadding, exports.getButtonHeight, function (_a) {
198
+ var theme = _a.theme;
199
+ return theme.shape.small;
200
+ }, function (_a) {
201
+ var theme = _a.theme;
202
+ return theme.typography.button.fontSize;
203
+ }, function (_a) {
204
+ var theme = _a.theme;
205
+ return theme.typography.button.fontWeight;
206
+ }, function (props) {
207
+ return (0, exports.getBgColor)(__assign(__assign({}, props), { buttonState: constants_1.ButtonStates.DEFAULT }));
208
+ }, function (props) {
209
+ return (0, exports.getColor)(__assign(__assign({}, props), { buttonState: constants_1.ButtonStates.DEFAULT }));
210
+ }, function (props) {
211
+ return (0, exports.getBgColor)(__assign(__assign({}, props), { buttonState: constants_1.ButtonStates.HOVER }));
212
+ }, function (props) {
213
+ return (0, exports.getColor)(__assign(__assign({}, props), { buttonState: constants_1.ButtonStates.HOVER }));
214
+ }, function (props) {
215
+ return (0, exports.getBgColor)(__assign(__assign({}, props), { buttonState: constants_1.ButtonStates.FOCUS }));
216
+ }, function (props) {
217
+ return (0, exports.getColor)(__assign(__assign({}, props), { buttonState: constants_1.ButtonStates.FOCUS }));
218
+ }, function (_a) {
219
+ var theme = _a.theme;
220
+ return theme.palette.primary['400'];
221
+ }, function (props) {
222
+ return (0, exports.getBgColor)(__assign(__assign({}, props), { buttonState: constants_1.ButtonStates.ACTIVE }));
223
+ }, function (props) {
224
+ return (0, exports.getColor)(__assign(__assign({}, props), { buttonState: constants_1.ButtonStates.ACTIVE }));
225
+ }, ButtonUnstyled_1.buttonUnstyledClasses.disabled, exports.getDisabledBgColor, function (_a) {
226
+ var theme = _a.theme;
227
+ return theme.palette.grey['500'];
228
+ });
229
+ var templateObject_1;
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { CheckboxProps } from './types';
3
+ export declare const Checkbox: ({ icon, checkedIcon, indeterminateIcon, ...props }: CheckboxProps) => JSX.Element;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __rest = (this && this.__rest) || function (s, e) {
14
+ var t = {};
15
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
+ t[p] = s[p];
17
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
+ t[p[i]] = s[p[i]];
21
+ }
22
+ return t;
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.Checkbox = void 0;
26
+ var jsx_runtime_1 = require("react/jsx-runtime");
27
+ var styled_1 = require("./styled");
28
+ var icons_1 = require("./icons");
29
+ var Checkbox = function (_a) {
30
+ var _b = _a.icon, icon = _b === void 0 ? (0, jsx_runtime_1.jsx)(icons_1.DefaultIcon, {}, void 0) : _b, _c = _a.checkedIcon, checkedIcon = _c === void 0 ? (0, jsx_runtime_1.jsx)(icons_1.CheckedIcon, {}, void 0) : _c, _d = _a.indeterminateIcon, indeterminateIcon = _d === void 0 ? (0, jsx_runtime_1.jsx)(icons_1.IndeterminateIcon, {}, void 0) : _d, props = __rest(_a, ["icon", "checkedIcon", "indeterminateIcon"]);
31
+ return ((0, jsx_runtime_1.jsx)(styled_1.StyledCheckbox, __assign({ icon: icon, checkedIcon: checkedIcon, indeterminateIcon: indeterminateIcon }, props), void 0));
32
+ };
33
+ exports.Checkbox = Checkbox;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { SvgIconProps } from '@mui/material';
3
+ export declare const DefaultIcon: React.FunctionComponent<SvgIconProps>;
4
+ export declare const CheckedIcon: React.FunctionComponent<SvgIconProps>;
5
+ export declare const IndeterminateIcon: React.FunctionComponent<SvgIconProps>;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __rest = (this && this.__rest) || function (s, e) {
14
+ var t = {};
15
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
+ t[p] = s[p];
17
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
+ t[p[i]] = s[p[i]];
21
+ }
22
+ return t;
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.IndeterminateIcon = exports.CheckedIcon = exports.DefaultIcon = void 0;
26
+ var jsx_runtime_1 = require("react/jsx-runtime");
27
+ var material_1 = require("@mui/material");
28
+ var DefaultIcon = function (_a) {
29
+ var props = __rest(_a, []);
30
+ return ((0, jsx_runtime_1.jsxs)(material_1.SvgIcon, __assign({ viewBox: "0 0 14 14" }, props, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M0 3C0 1.34315 1.34315 0 3 0H11C12.6569 0 14 1.34315 14 3V11C14 12.6569 12.6569 14 11 14H3C1.34315 14 0 12.6569 0 11V3Z" }, void 0), (0, jsx_runtime_1.jsx)("path", { className: "MuiSvgIcon-border", fillRule: "evenodd", clipRule: "evenodd", d: "M11 2H3C2.44772 2 2 2.44772 2 3V11C2 11.5523 2.44772 12 3 12H11C11.5523 12 12 11.5523 12 11V3C12 2.44772 11.5523 2 11 2ZM3 0C1.34315 0 0 1.34315 0 3V11C0 12.6569 1.34315 14 3 14H11C12.6569 14 14 12.6569 14 11V3C14 1.34315 12.6569 0 11 0H3Z" }, void 0)] }), void 0));
31
+ };
32
+ exports.DefaultIcon = DefaultIcon;
33
+ var CheckedIcon = function (_a) {
34
+ var props = __rest(_a, []);
35
+ return ((0, jsx_runtime_1.jsxs)(material_1.SvgIcon, __assign({ viewBox: "0 0 14 14" }, props, { children: [(0, jsx_runtime_1.jsx)("rect", { width: "14", height: "14", rx: "3" }, void 0), (0, jsx_runtime_1.jsx)("path", { className: "MuiSvgIcon-mark", fillRule: "evenodd", clipRule: "evenodd", d: "M4.71402 6.30066C4.62206 6.20534 4.51205 6.12931 4.39042 6.07701C4.26879 6.0247 4.13797 5.99717 4.0056 5.99602C3.87323 5.99487 3.74195 6.02012 3.61943 6.0703C3.49691 6.12048 3.3856 6.19458 3.292 6.28829C3.19839 6.38199 3.12437 6.49342 3.07424 6.61607C3.02411 6.73872 2.99889 6.87013 3.00004 7.00265C3.00119 7.13516 3.02869 7.26612 3.08094 7.38787C3.13319 7.50963 3.20914 7.61976 3.30435 7.71182L5.29823 9.7078C5.48518 9.8949 5.73871 10 6.00306 10C6.26741 10 6.52094 9.8949 6.7079 9.7078L10.6956 5.71584C10.7909 5.62377 10.8668 5.51365 10.9191 5.39189C10.9713 5.27013 10.9988 5.13918 11 5.00666C11.0011 4.87415 10.9759 4.74274 10.9258 4.62009C10.8756 4.49744 10.8016 4.38601 10.708 4.29231C10.6144 4.1986 10.5031 4.1245 10.3806 4.07432C10.258 4.02414 10.1268 3.99889 9.9944 4.00004C9.86203 4.00119 9.73121 4.02872 9.60958 4.08102C9.48795 4.13333 9.37794 4.20936 9.28598 4.30468L6.00306 7.59106L4.71402 6.30066V6.30066Z" }, void 0)] }), void 0));
36
+ };
37
+ exports.CheckedIcon = CheckedIcon;
38
+ var IndeterminateIcon = function (_a) {
39
+ var props = __rest(_a, []);
40
+ return ((0, jsx_runtime_1.jsxs)(material_1.SvgIcon, __assign({ viewBox: "0 0 14 14" }, props, { children: [(0, jsx_runtime_1.jsx)("rect", { width: "14", height: "14", rx: "3" }, void 0), (0, jsx_runtime_1.jsx)("path", { className: "MuiSvgIcon-mark", d: "M10 6H4C3.44772 6 3 6.44772 3 7C3 7.55228 3.44772 8 4 8H10C10.5523 8 11 7.55228 11 7C11 6.44772 10.5523 6 10 6Z" }, void 0)] }), void 0));
41
+ };
42
+ exports.IndeterminateIcon = IndeterminateIcon;
@@ -0,0 +1,2 @@
1
+ export * from './Checkbox';
2
+ export * from './types';
@@ -0,0 +1,14 @@
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("./Checkbox"), exports);
14
+ __exportStar(require("./types"), exports);
@@ -0,0 +1,4 @@
1
+ import { CheckboxProps } from './types';
2
+ export declare const StyledCheckbox: import("@emotion/styled").StyledComponent<import("@mui/material").CheckboxProps & {
3
+ theme?: import("..").Theme | undefined;
4
+ } & CheckboxProps, {}, {}>;
@@ -0,0 +1,35 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.StyledCheckbox = void 0;
8
+ var material_1 = require("@mui/material");
9
+ var styles_1 = require("../styles");
10
+ exports.StyledCheckbox = (0, styles_1.styled)(material_1.Checkbox)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 5px;\n border-radius: unset;\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n\n & .MuiSvgIcon-border {\n color: ", ";\n }\n\n & > svg {\n width: 1rem;\n height: 1rem;\n }\n\n &.Mui-disabled {\n color: ", ";\n & .MuiSvgIcon-border {\n color: currentColor;\n }\n }\n\n &.Mui-checked,\n &.MuiCheckbox-indeterminate {\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n\n &.Mui-disabled {\n color: ", ";\n }\n\n & .MuiSvgIcon-mark {\n color: ", ";\n }\n }\n"], ["\n padding: 5px;\n border-radius: unset;\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n\n & .MuiSvgIcon-border {\n color: ", ";\n }\n\n & > svg {\n width: 1rem;\n height: 1rem;\n }\n\n &.Mui-disabled {\n color: ", ";\n & .MuiSvgIcon-border {\n color: currentColor;\n }\n }\n\n &.Mui-checked,\n &.MuiCheckbox-indeterminate {\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n\n &.Mui-disabled {\n color: ", ";\n }\n\n & .MuiSvgIcon-mark {\n color: ", ";\n }\n }\n"])), function (_a) {
11
+ var theme = _a.theme;
12
+ return theme.palette.background.element;
13
+ }, function (_a) {
14
+ var theme = _a.theme;
15
+ return theme.palette.grey[100];
16
+ }, function (_a) {
17
+ var theme = _a.theme;
18
+ return theme.palette.grey[300];
19
+ }, function (_a) {
20
+ var theme = _a.theme;
21
+ return theme.palette.grey[200];
22
+ }, function (_a) {
23
+ var theme = _a.theme;
24
+ return theme.palette.primary.main;
25
+ }, function (_a) {
26
+ var theme = _a.theme;
27
+ return theme.palette.primary[700];
28
+ }, function (_a) {
29
+ var theme = _a.theme;
30
+ return theme.palette.grey[500];
31
+ }, function (_a) {
32
+ var theme = _a.theme;
33
+ return theme.palette.common.white;
34
+ });
35
+ var templateObject_1;
@@ -0,0 +1,2 @@
1
+ import { CheckboxProps as MuiCheckboxProps } from '@mui/material';
2
+ export declare type CheckboxProps = Omit<MuiCheckboxProps, 'size' | 'color'>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CircularProgressProps } from './types';
2
3
  export declare const CircularProgress: ({ color, size, ...props }: CircularProgressProps) => JSX.Element;
3
4
  export default CircularProgress;
@@ -24,10 +24,11 @@ var __rest = (this && this.__rest) || function (s, e) {
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
25
  exports.CircularProgress = void 0;
26
26
  var jsx_runtime_1 = require("react/jsx-runtime");
27
+ var constants_1 = require("./constants");
27
28
  var styled_1 = require("./styled");
28
29
  var CircularProgress = function (_a) {
29
30
  var color = _a.color, size = _a.size, props = __rest(_a, ["color", "size"]);
30
- return ((0, jsx_runtime_1.jsx)(styled_1.StyledCircularProgress, __assign({}, props, { customSize: size, customColor: color }), void 0));
31
+ return ((0, jsx_runtime_1.jsx)(styled_1.StyledCircularProgress, __assign({}, props, { size: size === constants_1.CircularProgressSizes.SMALL ? 16 : 24, customColor: color }), void 0));
31
32
  };
32
33
  exports.CircularProgress = CircularProgress;
33
34
  exports.default = exports.CircularProgress;
@@ -4,6 +4,5 @@ export declare enum CircularProgressColors {
4
4
  }
5
5
  export declare enum CircularProgressSizes {
6
6
  SMALL = "small",
7
- MEDIUM = "medium",
8
- NUMBER = "number"
7
+ MEDIUM = "medium"
9
8
  }
@@ -10,5 +10,4 @@ var CircularProgressSizes;
10
10
  (function (CircularProgressSizes) {
11
11
  CircularProgressSizes["SMALL"] = "small";
12
12
  CircularProgressSizes["MEDIUM"] = "medium";
13
- CircularProgressSizes["NUMBER"] = "number";
14
13
  })(CircularProgressSizes = exports.CircularProgressSizes || (exports.CircularProgressSizes = {}));
File without changes
File without changes
@@ -4,5 +4,4 @@ export declare const StyledCircularProgress: import("@emotion/styled").StyledCom
4
4
  theme?: Theme | undefined;
5
5
  } & Omit<CircularProgressProps, "color" | "size"> & {
6
6
  customColor?: "primary" | "inverted" | undefined;
7
- customSize?: "number" | "medium" | "small" | undefined;
8
7
  }, {}, {}>;
@@ -14,13 +14,7 @@ var getColor = function (_a) {
14
14
  return theme.palette.primary.dark;
15
15
  return theme.palette.primary.contrastText;
16
16
  };
17
- var getCircularProgressSize = function (_a) {
18
- var customSize = _a.customSize;
19
- if (customSize === constants_1.CircularProgressSizes.SMALL)
20
- return '16px';
21
- return '24px';
22
- };
23
17
  exports.StyledCircularProgress = (0, styles_1.styled)(material_1.CircularProgress, {
24
- shouldForwardProp: function (prop) { return prop !== 'customColor' && prop !== 'customSize'; },
25
- })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n color: ", ";\n"], ["\n width: ", ";\n height: ", ";\n color: ", ";\n"])), getCircularProgressSize, getCircularProgressSize, function (props) { return getColor(props); });
18
+ shouldForwardProp: function (prop) { return prop !== 'customColor'; },
19
+ })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (props) { return getColor(props); });
26
20
  var templateObject_1;
File without changes
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { FormControlLabelProps } from './types';
3
+ export declare const FormControlLabel: ({ ...props }: FormControlLabelProps) => JSX.Element;