@astral/ui 0.23.0-alpha.4 → 0.25.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 (115) hide show
  1. package/Autocomplete/Autocomplete.d.ts +1 -1
  2. package/Autocomplete/Autocomplete.js +15 -11
  3. package/Badge/styled.d.ts +3 -3
  4. package/Button/Button.d.ts +2 -1
  5. package/Button/Button.js +6 -17
  6. package/Button/types.d.ts +20 -6
  7. package/ButtonBase/styled.d.ts +8 -5
  8. package/ButtonBase/styled.js +2 -1
  9. package/CircularProgress/CircularProgress.d.ts +1 -1
  10. package/CircularProgress/CircularProgress.js +12 -7
  11. package/CircularProgress/CircularProgressStory.d.ts +5 -0
  12. package/CircularProgress/CircularProgressStory.js +11 -0
  13. package/CircularProgress/CircularProgressStoryTemplate.d.ts +4 -0
  14. package/CircularProgress/CircularProgressStoryTemplate.js +21 -0
  15. package/CircularProgress/types.d.ts +8 -5
  16. package/DataGrid/DataGridBody/styled.d.ts +2 -2
  17. package/DataGrid/DataGridHeadColumn/styled.d.ts +2 -2
  18. package/DataGrid/DataGridLoader/styled.d.ts +4 -4
  19. package/DataGrid/styled.d.ts +2 -2
  20. package/DataGridPagination/styled.d.ts +5 -5
  21. package/FormHelperText/styled.d.ts +8 -8
  22. package/FormHelperText/styled.js +13 -5
  23. package/Grid/styled.d.ts +2 -2
  24. package/IconButton/styled.d.ts +7 -7
  25. package/List/styled.d.ts +2 -2
  26. package/ListItem/styled.d.ts +6 -6
  27. package/ListItemButton/styled.d.ts +2 -2
  28. package/MenuList/styled.d.ts +2 -2
  29. package/Placeholder/styled.d.ts +10 -10
  30. package/Product/Product.d.ts +4 -0
  31. package/Product/Product.js +33 -0
  32. package/Product/index.d.ts +2 -0
  33. package/Product/index.js +14 -0
  34. package/Product/types.d.ts +6 -0
  35. package/Product/types.js +2 -0
  36. package/Radio/Radio.d.ts +1 -1
  37. package/Select/styled.d.ts +2 -2
  38. package/Tag/styled.d.ts +5 -5
  39. package/TextArea/TextArea.d.ts +1 -1
  40. package/TextField/TextField.d.ts +1 -1
  41. package/TextField/TextField.js +3 -1
  42. package/Tooltip/Tooltip.d.ts +1 -1
  43. package/Tooltip/styled.d.ts +1 -1
  44. package/esm/Autocomplete/Autocomplete.d.ts +1 -1
  45. package/esm/Autocomplete/Autocomplete.js +15 -11
  46. package/esm/Badge/styled.d.ts +3 -3
  47. package/esm/Button/Button.d.ts +2 -1
  48. package/esm/Button/Button.js +7 -17
  49. package/esm/Button/types.d.ts +20 -6
  50. package/esm/ButtonBase/styled.d.ts +8 -5
  51. package/esm/ButtonBase/styled.js +2 -1
  52. package/esm/CircularProgress/CircularProgress.d.ts +1 -1
  53. package/esm/CircularProgress/CircularProgress.js +9 -6
  54. package/esm/CircularProgress/CircularProgressStory.d.ts +5 -0
  55. package/esm/CircularProgress/CircularProgressStory.js +7 -0
  56. package/esm/CircularProgress/CircularProgressStoryTemplate.d.ts +4 -0
  57. package/esm/CircularProgress/CircularProgressStoryTemplate.js +17 -0
  58. package/esm/CircularProgress/types.d.ts +8 -5
  59. package/esm/DataGrid/DataGridBody/styled.d.ts +2 -2
  60. package/esm/DataGrid/DataGridHeadColumn/styled.d.ts +2 -2
  61. package/esm/DataGrid/DataGridLoader/styled.d.ts +4 -4
  62. package/esm/DataGrid/styled.d.ts +2 -2
  63. package/esm/DataGridPagination/styled.d.ts +5 -5
  64. package/esm/FormHelperText/styled.d.ts +8 -8
  65. package/esm/FormHelperText/styled.js +13 -5
  66. package/esm/Grid/styled.d.ts +2 -2
  67. package/esm/IconButton/styled.d.ts +7 -7
  68. package/esm/List/styled.d.ts +2 -2
  69. package/esm/ListItem/styled.d.ts +6 -6
  70. package/esm/ListItemButton/styled.d.ts +2 -2
  71. package/esm/MenuList/styled.d.ts +2 -2
  72. package/esm/Placeholder/styled.d.ts +10 -10
  73. package/esm/Product/Product.d.ts +4 -0
  74. package/esm/Product/Product.js +30 -0
  75. package/esm/Product/index.d.ts +2 -0
  76. package/esm/Product/index.js +2 -0
  77. package/esm/Product/types.d.ts +6 -0
  78. package/esm/Product/types.js +1 -0
  79. package/esm/Radio/Radio.d.ts +1 -1
  80. package/esm/Select/styled.d.ts +2 -2
  81. package/esm/Tag/styled.d.ts +5 -5
  82. package/esm/TextArea/TextArea.d.ts +1 -1
  83. package/esm/TextField/TextField.d.ts +1 -1
  84. package/esm/TextField/TextField.js +4 -2
  85. package/esm/Tooltip/Tooltip.d.ts +1 -1
  86. package/esm/Tooltip/styled.d.ts +1 -1
  87. package/esm/index.d.ts +2 -0
  88. package/esm/index.js +2 -0
  89. package/esm/theme/components/MuiButton.d.ts +3 -0
  90. package/esm/theme/components/MuiButton.js +96 -0
  91. package/esm/theme/components/MuiCircularProgress.d.ts +4 -0
  92. package/esm/theme/components/MuiCircularProgress.js +16 -0
  93. package/esm/theme/components/MuiFormHelperText.js +4 -1
  94. package/esm/theme/components/MuiLoadingButton.d.ts +4 -0
  95. package/esm/theme/components/MuiLoadingButton.js +45 -0
  96. package/esm/theme/components/components.js +6 -0
  97. package/index.d.ts +2 -0
  98. package/index.js +2 -0
  99. package/package.json +2 -2
  100. package/theme/components/MuiButton.d.ts +3 -0
  101. package/theme/components/MuiButton.js +99 -0
  102. package/theme/components/MuiCircularProgress.d.ts +4 -0
  103. package/theme/components/MuiCircularProgress.js +19 -0
  104. package/theme/components/MuiFormHelperText.js +4 -1
  105. package/theme/components/MuiLoadingButton.d.ts +4 -0
  106. package/theme/components/MuiLoadingButton.js +48 -0
  107. package/theme/components/components.js +6 -0
  108. package/Button/styled.d.ts +0 -12
  109. package/Button/styled.js +0 -36
  110. package/CircularProgress/styled.d.ts +0 -6
  111. package/CircularProgress/styled.js +0 -20
  112. package/esm/Button/styled.d.ts +0 -12
  113. package/esm/Button/styled.js +0 -33
  114. package/esm/CircularProgress/styled.d.ts +0 -6
  115. package/esm/CircularProgress/styled.js +0 -17
package/Button/styled.js DELETED
@@ -1,36 +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
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.StyledButton = void 0;
8
- var styles_1 = require("../styles");
9
- var ButtonBase_1 = require("../ButtonBase");
10
- var getProgressColor = function (_a) {
11
- var theme = _a.theme, variant = _a.variant;
12
- if (variant === ButtonBase_1.ButtonVariants.CONTAINED)
13
- return theme.palette.primary.contrastText;
14
- return theme.palette.grey['900'];
15
- };
16
- exports.StyledButton = (0, styles_1.styled)(ButtonBase_1.ButtonBase, {
17
- shouldForwardProp: function (prop) {
18
- return prop !== 'startIcon' && prop !== 'endIcon' && prop !== 'loading';
19
- },
20
- })(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) {
21
- var loading = _a.loading;
22
- return loading && 'transparent';
23
- }, function (_a) {
24
- var loading = _a.loading;
25
- return (loading ? 'none' : 'inherit');
26
- }, function (_a) {
27
- var loading = _a.loading;
28
- return loading && 'transparent';
29
- }, function (_a) {
30
- var theme = _a.theme;
31
- return theme.spacing(2);
32
- }, function (_a) {
33
- var theme = _a.theme;
34
- return theme.spacing(2);
35
- }, getProgressColor);
36
- 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,20 +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
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.StyledCircularProgress = void 0;
8
- var material_1 = require("@mui/material");
9
- var styles_1 = require("../styles");
10
- var constants_1 = require("./constants");
11
- var getColor = function (_a) {
12
- var theme = _a.theme, customColor = _a.customColor;
13
- if (customColor === constants_1.CircularProgressColors.PRIMARY)
14
- return theme.palette.primary.dark;
15
- return theme.palette.primary.contrastText;
16
- };
17
- exports.StyledCircularProgress = (0, styles_1.styled)(material_1.CircularProgress, {
18
- shouldForwardProp: function (prop) { return prop !== 'customColor'; },
19
- })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (props) { return getColor(props); });
20
- var templateObject_1;
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const StyledButton: import("@emotion/styled").StyledComponent<Omit<import("@mui/base/ButtonUnstyled/ButtonUnstyledProps").default<"button", {}>, "variant" | "color" | "size"> & {
3
- color?: "error" | "primary" | "success" | "warning" | undefined;
4
- variant?: "link" | "text" | "light" | "contained" | undefined;
5
- size?: "large" | "medium" | undefined;
6
- } & {
7
- theme?: import("@emotion/react").Theme | undefined;
8
- } & {
9
- loading?: boolean | undefined;
10
- startIcon?: import("react").ReactNode;
11
- endIcon?: import("react").ReactNode;
12
- }, {}, {}>;
@@ -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;