@astral/ui 0.22.1 → 0.23.0-alpha.0

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 (67) hide show
  1. package/Button/Button.d.ts +2 -1
  2. package/Button/Button.js +6 -17
  3. package/Button/types.d.ts +18 -6
  4. package/ButtonBase/styled.d.ts +5 -2
  5. package/ButtonBase/styled.js +5 -4
  6. package/CircularProgress/CircularProgress.d.ts +1 -1
  7. package/CircularProgress/CircularProgress.js +12 -7
  8. package/CircularProgress/CircularProgressStory.d.ts +5 -0
  9. package/CircularProgress/CircularProgressStory.js +11 -0
  10. package/CircularProgress/CircularProgressStoryTemplate.d.ts +4 -0
  11. package/CircularProgress/CircularProgressStoryTemplate.js +21 -0
  12. package/CircularProgress/types.d.ts +8 -5
  13. package/DataGrid/DataGridHeadColumn/styled.d.ts +1 -1
  14. package/FormHelperText/styled.d.ts +2 -2
  15. package/Grid/styled.d.ts +1 -1
  16. package/IconButton/styled.d.ts +3 -5
  17. package/ListItemButton/styled.d.ts +1 -1
  18. package/Radio/Radio.d.ts +1 -1
  19. package/Select/styled.d.ts +1 -1
  20. package/TextArea/TextArea.d.ts +1 -1
  21. package/TextField/TextField.d.ts +1 -1
  22. package/Tooltip/Tooltip.d.ts +1 -1
  23. package/esm/Button/Button.d.ts +2 -1
  24. package/esm/Button/Button.js +7 -17
  25. package/esm/Button/types.d.ts +18 -6
  26. package/esm/ButtonBase/styled.d.ts +5 -2
  27. package/esm/ButtonBase/styled.js +5 -4
  28. package/esm/CircularProgress/CircularProgress.d.ts +1 -1
  29. package/esm/CircularProgress/CircularProgress.js +9 -6
  30. package/esm/CircularProgress/CircularProgressStory.d.ts +5 -0
  31. package/esm/CircularProgress/CircularProgressStory.js +7 -0
  32. package/esm/CircularProgress/CircularProgressStoryTemplate.d.ts +4 -0
  33. package/esm/CircularProgress/CircularProgressStoryTemplate.js +17 -0
  34. package/esm/CircularProgress/types.d.ts +8 -5
  35. package/esm/DataGrid/DataGridHeadColumn/styled.d.ts +1 -1
  36. package/esm/FormHelperText/styled.d.ts +2 -2
  37. package/esm/Grid/styled.d.ts +1 -1
  38. package/esm/IconButton/styled.d.ts +3 -5
  39. package/esm/ListItemButton/styled.d.ts +1 -1
  40. package/esm/Radio/Radio.d.ts +1 -1
  41. package/esm/Select/styled.d.ts +1 -1
  42. package/esm/TextArea/TextArea.d.ts +1 -1
  43. package/esm/TextField/TextField.d.ts +1 -1
  44. package/esm/Tooltip/Tooltip.d.ts +1 -1
  45. package/esm/theme/components/MuiButton.d.ts +3 -0
  46. package/esm/theme/components/MuiButton.js +96 -0
  47. package/esm/theme/components/MuiCircularProgress.d.ts +4 -0
  48. package/esm/theme/components/MuiCircularProgress.js +14 -0
  49. package/esm/theme/components/MuiLoadingButton.d.ts +4 -0
  50. package/esm/theme/components/MuiLoadingButton.js +45 -0
  51. package/esm/theme/components/components.js +6 -0
  52. package/package.json +2 -2
  53. package/theme/components/MuiButton.d.ts +3 -0
  54. package/theme/components/MuiButton.js +99 -0
  55. package/theme/components/MuiCircularProgress.d.ts +4 -0
  56. package/theme/components/MuiCircularProgress.js +17 -0
  57. package/theme/components/MuiLoadingButton.d.ts +4 -0
  58. package/theme/components/MuiLoadingButton.js +48 -0
  59. package/theme/components/components.js +6 -0
  60. package/Button/styled.d.ts +0 -12
  61. package/Button/styled.js +0 -36
  62. package/CircularProgress/styled.d.ts +0 -6
  63. package/CircularProgress/styled.js +0 -20
  64. package/esm/Button/styled.d.ts +0 -12
  65. package/esm/Button/styled.js +0 -33
  66. package/esm/CircularProgress/styled.d.ts +0 -6
  67. package/esm/CircularProgress/styled.js +0 -17
@@ -1,33 +0,0 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
- import { styled } from '../styles';
6
- import { ButtonBase, ButtonVariants } from '../ButtonBase';
7
- var getProgressColor = function (_a) {
8
- var theme = _a.theme, variant = _a.variant;
9
- if (variant === ButtonVariants.CONTAINED)
10
- return theme.palette.primary.contrastText;
11
- return theme.palette.grey['900'];
12
- };
13
- export var StyledButton = styled(ButtonBase, {
14
- shouldForwardProp: function (prop) {
15
- return prop !== 'startIcon' && prop !== 'endIcon' && prop !== 'loading';
16
- },
17
- })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n\n pointer-events: ", ";\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 position: absolute;\n\n width: 16px !important;\n height: 16px !important;\n\n color: ", ";\n\n transform: translate(-50%, -50%);\n }\n"], ["\n color: ", ";\n\n pointer-events: ", ";\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 position: absolute;\n\n width: 16px !important;\n height: 16px !important;\n\n color: ", ";\n\n transform: translate(-50%, -50%);\n }\n"])), function (_a) {
18
- var loading = _a.loading;
19
- return loading && 'transparent';
20
- }, function (_a) {
21
- var loading = _a.loading;
22
- return (loading ? 'none' : 'inherit');
23
- }, function (_a) {
24
- var loading = _a.loading;
25
- return loading && 'transparent';
26
- }, function (_a) {
27
- var theme = _a.theme;
28
- return theme.spacing(2);
29
- }, function (_a) {
30
- var theme = _a.theme;
31
- return theme.spacing(2);
32
- }, getProgressColor);
33
- var templateObject_1;
@@ -1,6 +0,0 @@
1
- import { CircularProgressProps } from './types';
2
- export declare const StyledCircularProgress: import("@emotion/styled").StyledComponent<import("@mui/material").CircularProgressProps & {
3
- theme?: import("@emotion/react").Theme | undefined;
4
- } & Omit<CircularProgressProps, "color" | "size"> & {
5
- customColor?: "primary" | "inverted" | undefined;
6
- }, {}, {}>;
@@ -1,17 +0,0 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
- import { CircularProgress } from '@mui/material';
6
- import { styled } from '../styles';
7
- import { CircularProgressColors } from './constants';
8
- var getColor = function (_a) {
9
- var theme = _a.theme, customColor = _a.customColor;
10
- if (customColor === CircularProgressColors.PRIMARY)
11
- return theme.palette.primary.dark;
12
- return theme.palette.primary.contrastText;
13
- };
14
- export var StyledCircularProgress = styled(CircularProgress, {
15
- shouldForwardProp: function (prop) { return prop !== 'customColor'; },
16
- })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (props) { return getColor(props); });
17
- var templateObject_1;