@astral/ui 0.40.1 → 0.41.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.
package/Button/Button.js CHANGED
@@ -30,13 +30,13 @@ var ButtonBase_1 = require("../ButtonBase");
30
30
  var CircularProgress_1 = require("../CircularProgress");
31
31
  var constants_1 = require("../CircularProgress/constants");
32
32
  exports.Button = (0, react_1.forwardRef)(function (props, ref) {
33
- var _a = props.variant, variant = _a === void 0 ? ButtonBase_1.ButtonVariants.CONTAINED : _a, restProps = __rest(props, ["variant"]);
33
+ var _a = props.variant, variant = _a === void 0 ? ButtonBase_1.ButtonVariants.CONTAINED : _a, _b = props.color, color = _b === void 0 ? ButtonBase_1.ButtonColors.PRIMARY : _b, restProps = __rest(props, ["variant", "color"]);
34
34
  var loadingIndicatorColor = (0, react_1.useMemo)(function () {
35
35
  if (variant !== ButtonBase_1.ButtonVariants.CONTAINED) {
36
36
  return constants_1.CircularProgressColors.PRIMARY;
37
37
  }
38
38
  return constants_1.CircularProgressColors.INVERTED;
39
39
  }, [variant]);
40
- return ((0, jsx_runtime_1.jsx)(lab_1.LoadingButton, __assign({ ref: ref }, restProps, { variant: variant, loadingIndicator: (0, jsx_runtime_1.jsx)(CircularProgress_1.CircularProgress, { color: loadingIndicatorColor, size: "small" }) })));
40
+ return ((0, jsx_runtime_1.jsx)(lab_1.LoadingButton, __assign({ ref: ref }, restProps, { variant: variant, color: color, loadingIndicator: (0, jsx_runtime_1.jsx)(CircularProgress_1.CircularProgress, { color: loadingIndicatorColor, size: "small" }) })));
41
41
  });
42
42
  exports.default = exports.Button;
@@ -23,17 +23,17 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
24
  import { LoadingButton } from '@mui/lab';
25
25
  import { forwardRef, useMemo } from 'react';
26
- import { ButtonVariants } from '../ButtonBase';
26
+ import { ButtonColors, ButtonVariants } from '../ButtonBase';
27
27
  import { CircularProgress } from '../CircularProgress';
28
28
  import { CircularProgressColors } from '../CircularProgress/constants';
29
29
  export var Button = forwardRef(function (props, ref) {
30
- var _a = props.variant, variant = _a === void 0 ? ButtonVariants.CONTAINED : _a, restProps = __rest(props, ["variant"]);
30
+ var _a = props.variant, variant = _a === void 0 ? ButtonVariants.CONTAINED : _a, _b = props.color, color = _b === void 0 ? ButtonColors.PRIMARY : _b, restProps = __rest(props, ["variant", "color"]);
31
31
  var loadingIndicatorColor = useMemo(function () {
32
32
  if (variant !== ButtonVariants.CONTAINED) {
33
33
  return CircularProgressColors.PRIMARY;
34
34
  }
35
35
  return CircularProgressColors.INVERTED;
36
36
  }, [variant]);
37
- return (_jsx(LoadingButton, __assign({ ref: ref }, restProps, { variant: variant, loadingIndicator: _jsx(CircularProgress, { color: loadingIndicatorColor, size: "small" }) })));
37
+ return (_jsx(LoadingButton, __assign({ ref: ref }, restProps, { variant: variant, color: color, loadingIndicator: _jsx(CircularProgress, { color: loadingIndicatorColor, size: "small" }) })));
38
38
  });
39
39
  export default Button;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "0.40.1",
3
+ "version": "0.41.0",
4
4
  "browser": "./src/index.ts",
5
5
  "jest": {
6
6
  "moduleNameMapper": {
@@ -8,7 +8,7 @@
8
8
  }
9
9
  },
10
10
  "dependencies": {
11
- "@astral/icons": "^0.40.1",
11
+ "@astral/icons": "^0.41.0",
12
12
  "@emotion/cache": "11.7.1",
13
13
  "@emotion/react": "11.9.0",
14
14
  "@emotion/server": "11.4.0",