@astral/ui 0.2.5 → 0.2.6-beta.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.
- package/esm/src/Radio/Icon.js +32 -0
- package/esm/src/Radio/Radio.js +31 -0
- package/esm/src/Radio/index.js +2 -0
- package/esm/src/Radio/styled.js +32 -0
- package/esm/src/{theme/__tests__/BaseTheme.test.d.ts → Radio/types.js} +0 -0
- package/esm/src/RadioGroup/RadioGroup.js +2 -0
- package/esm/src/Tag/styled.js +5 -1
- package/esm/src/theme/components/components.js +6 -0
- package/esm/src/theme/palette/brandPalette.js +1 -1
- package/node/src/Radio/Icon.js +37 -0
- package/node/src/Radio/Radio.js +37 -0
- package/node/src/Radio/index.js +14 -0
- package/node/src/Radio/styled.js +35 -0
- package/node/src/Radio/types.js +2 -0
- package/node/src/RadioGroup/RadioGroup.js +4 -0
- package/node/src/Tag/styled.js +5 -1
- package/node/src/theme/components/components.js +6 -0
- package/node/src/theme/palette/brandPalette.js +1 -1
- package/package.json +11 -4
- package/{esm → types}/index.d.ts +0 -0
- package/{esm → types}/src/Badge/Badge.d.ts +0 -0
- package/{esm → types}/src/Badge/index.d.ts +0 -0
- package/{esm → types}/src/Badge/styled.d.ts +0 -0
- package/{esm → types}/src/Badge/types.d.ts +0 -0
- package/{esm → types}/src/Button/Button.d.ts +0 -0
- package/{esm → types}/src/Button/index.d.ts +0 -0
- package/{esm → types}/src/Button/styled.d.ts +0 -0
- package/{esm → types}/src/Button/types.d.ts +0 -0
- package/{esm → types}/src/ButtonBase/ButtonBase.d.ts +0 -0
- package/{esm → types}/src/ButtonBase/constants.d.ts +0 -0
- package/{esm → types}/src/ButtonBase/index.d.ts +0 -0
- package/{esm → types}/src/ButtonBase/styled.d.ts +0 -0
- package/{esm → types}/src/ButtonBase/types.d.ts +0 -0
- package/{esm → types}/src/Checkbox/Checkbox.d.ts +0 -0
- package/{esm → types}/src/Checkbox/icons.d.ts +0 -0
- package/{esm → types}/src/Checkbox/index.d.ts +0 -0
- package/{esm → types}/src/Checkbox/styled.d.ts +0 -0
- package/{esm → types}/src/Checkbox/types.d.ts +0 -0
- package/{esm → types}/src/CircularProgress/CircularProgress.d.ts +0 -0
- package/{esm → types}/src/CircularProgress/constants.d.ts +0 -0
- package/{esm → types}/src/CircularProgress/index.d.ts +0 -0
- package/{esm → types}/src/CircularProgress/styled.d.ts +0 -0
- package/{esm → types}/src/CircularProgress/types.d.ts +0 -0
- package/{esm → types}/src/FormControlLabel/FormControlLabel.d.ts +0 -0
- package/{esm → types}/src/FormControlLabel/index.d.ts +0 -0
- package/{esm → types}/src/FormControlLabel/styled.d.ts +0 -0
- package/{esm → types}/src/FormControlLabel/types.d.ts +0 -0
- package/{esm → types}/src/FormHelperText/FormHelperText.d.ts +0 -0
- package/{esm → types}/src/FormHelperText/index.d.ts +0 -0
- package/{esm → types}/src/FormHelperText/styled.d.ts +0 -0
- package/{esm → types}/src/FormHelperText/types.d.ts +0 -0
- package/{esm → types}/src/GlobalStyles/GlobalStyles.d.ts +0 -0
- package/{esm → types}/src/GlobalStyles/index.d.ts +0 -0
- package/{esm → types}/src/Grid/Grid.d.ts +0 -0
- package/{esm → types}/src/Grid/index.d.ts +0 -0
- package/{esm → types}/src/Grid/styled.d.ts +0 -0
- package/{esm → types}/src/Grid/types.d.ts +0 -0
- package/{esm → types}/src/IconButton/IconButton.d.ts +0 -0
- package/{esm → types}/src/IconButton/index.d.ts +0 -0
- package/{esm → types}/src/IconButton/styled.d.ts +0 -0
- package/{esm → types}/src/Menu/Menu.d.ts +0 -0
- package/{esm → types}/src/Menu/index.d.ts +0 -0
- package/{esm → types}/src/MenuItem/MenuItem.d.ts +0 -0
- package/{esm → types}/src/MenuItem/index.d.ts +0 -0
- package/{esm → types}/src/MenuList/MenuList.d.ts +0 -0
- package/{esm → types}/src/MenuList/index.d.ts +0 -0
- package/{esm → types}/src/MenuList/styled.d.ts +0 -0
- package/{esm → types}/src/MenuList/types.d.ts +0 -0
- package/types/src/Radio/Icon.d.ts +3 -0
- package/types/src/Radio/Radio.d.ts +4 -0
- package/{node/src/Badge → types/src/Radio}/index.d.ts +1 -1
- package/types/src/Radio/styled.d.ts +4 -0
- package/types/src/Radio/types.d.ts +2 -0
- package/types/src/RadioGroup/RadioGroup.d.ts +2 -0
- package/{esm → types}/src/Tag/Tag.d.ts +0 -0
- package/{esm → types}/src/Tag/constants.d.ts +0 -0
- package/{esm → types}/src/Tag/index.d.ts +0 -0
- package/{esm → types}/src/Tag/styled.d.ts +0 -0
- package/{esm → types}/src/Tag/types.d.ts +0 -0
- package/{esm → types}/src/TextField/TextField.d.ts +0 -0
- package/{esm → types}/src/TextField/index.d.ts +0 -0
- package/{esm → types}/src/TextField/types.d.ts +0 -0
- package/{esm → types}/src/ThemeProvider/ThemeProvider.d.ts +0 -0
- package/{esm → types}/src/ThemeProvider/index.d.ts +0 -0
- package/{esm → types}/src/Typography/Typography.d.ts +0 -0
- package/{esm → types}/src/Typography/index.d.ts +0 -0
- package/{esm → types}/src/index.d.ts +0 -0
- package/{esm → types}/src/styles/index.d.ts +0 -0
- package/{esm → types}/src/styles/styled/index.d.ts +0 -0
- package/{esm → types}/src/styles/styled/styled.d.ts +0 -0
- package/{esm → types}/src/styles/styled/types.d.ts +0 -0
- package/{node → types}/src/theme/__tests__/BaseTheme.test.d.ts +0 -0
- package/{esm → types}/src/theme/baseTheme.d.ts +0 -0
- package/{esm → types}/src/theme/components/MuiFormHelperText.d.ts +0 -0
- package/{esm → types}/src/theme/components/MuiFormLabel.d.ts +0 -0
- package/{esm → types}/src/theme/components/MuiInputBase.d.ts +0 -0
- package/{esm → types}/src/theme/components/MuiInputLabel.d.ts +0 -0
- package/{esm → types}/src/theme/components/MuiOutlinedInput.d.ts +0 -0
- package/{esm → types}/src/theme/components/MuiTypography.d.ts +0 -0
- package/{esm → types}/src/theme/components/components.d.ts +0 -0
- package/{esm → types}/src/theme/components/index.d.ts +0 -0
- package/{esm → types}/src/theme/constants.d.ts +0 -0
- package/{esm → types}/src/theme/elevation.d.ts +0 -0
- package/{esm → types}/src/theme/hooks/index.d.ts +0 -0
- package/{esm → types}/src/theme/hooks/useTheme/index.d.ts +0 -0
- package/{esm → types}/src/theme/index.d.ts +0 -0
- package/{esm → types}/src/theme/palette/brandPalette.d.ts +0 -0
- package/{esm → types}/src/theme/palette/index.d.ts +0 -0
- package/{esm → types}/src/theme/palette/palette.d.ts +0 -0
- package/{esm → types}/src/theme/shape.d.ts +0 -0
- package/{esm → types}/src/theme/typography.d.ts +0 -0
- package/node/index.d.ts +0 -1
- package/node/src/Badge/Badge.d.ts +0 -4
- package/node/src/Badge/styled.d.ts +0 -50
- package/node/src/Badge/types.d.ts +0 -5
- package/node/src/Button/Button.d.ts +0 -3
- package/node/src/Button/index.d.ts +0 -2
- package/node/src/Button/styled.d.ts +0 -13
- package/node/src/Button/types.d.ts +0 -7
- package/node/src/ButtonBase/ButtonBase.d.ts +0 -3
- package/node/src/ButtonBase/constants.d.ts +0 -22
- package/node/src/ButtonBase/index.d.ts +0 -3
- package/node/src/ButtonBase/styled.d.ts +0 -27
- package/node/src/ButtonBase/types.d.ts +0 -11
- package/node/src/Checkbox/Checkbox.d.ts +0 -3
- package/node/src/Checkbox/icons.d.ts +0 -5
- package/node/src/Checkbox/index.d.ts +0 -2
- package/node/src/Checkbox/styled.d.ts +0 -4
- package/node/src/Checkbox/types.d.ts +0 -2
- package/node/src/CircularProgress/CircularProgress.d.ts +0 -4
- package/node/src/CircularProgress/constants.d.ts +0 -8
- package/node/src/CircularProgress/index.d.ts +0 -2
- package/node/src/CircularProgress/styled.d.ts +0 -7
- package/node/src/CircularProgress/types.d.ts +0 -8
- package/node/src/FormControlLabel/FormControlLabel.d.ts +0 -3
- package/node/src/FormControlLabel/index.d.ts +0 -2
- package/node/src/FormControlLabel/styled.d.ts +0 -3
- package/node/src/FormControlLabel/types.d.ts +0 -2
- package/node/src/FormHelperText/FormHelperText.d.ts +0 -4
- package/node/src/FormHelperText/index.d.ts +0 -1
- package/node/src/FormHelperText/styled.d.ts +0 -41
- package/node/src/FormHelperText/types.d.ts +0 -6
- package/node/src/GlobalStyles/GlobalStyles.d.ts +0 -3
- package/node/src/GlobalStyles/index.d.ts +0 -1
- package/node/src/Grid/Grid.d.ts +0 -3
- package/node/src/Grid/index.d.ts +0 -2
- package/node/src/Grid/styled.d.ts +0 -13
- package/node/src/Grid/types.d.ts +0 -30
- package/node/src/IconButton/IconButton.d.ts +0 -3
- package/node/src/IconButton/index.d.ts +0 -1
- package/node/src/IconButton/styled.d.ts +0 -19
- package/node/src/Menu/Menu.d.ts +0 -3
- package/node/src/Menu/index.d.ts +0 -1
- package/node/src/MenuItem/MenuItem.d.ts +0 -3
- package/node/src/MenuItem/index.d.ts +0 -1
- package/node/src/MenuList/MenuList.d.ts +0 -3
- package/node/src/MenuList/index.d.ts +0 -2
- package/node/src/MenuList/styled.d.ts +0 -20
- package/node/src/MenuList/types.d.ts +0 -2
- package/node/src/Tag/Tag.d.ts +0 -3
- package/node/src/Tag/constants.d.ts +0 -21
- package/node/src/Tag/index.d.ts +0 -2
- package/node/src/Tag/styled.d.ts +0 -26
- package/node/src/Tag/types.d.ts +0 -12
- package/node/src/TextField/TextField.d.ts +0 -4
- package/node/src/TextField/index.d.ts +0 -2
- package/node/src/TextField/types.d.ts +0 -6
- package/node/src/ThemeProvider/ThemeProvider.d.ts +0 -7
- package/node/src/ThemeProvider/index.d.ts +0 -1
- package/node/src/Typography/Typography.d.ts +0 -8
- package/node/src/Typography/index.d.ts +0 -1
- package/node/src/index.d.ts +0 -18
- package/node/src/styles/index.d.ts +0 -1
- package/node/src/styles/styled/index.d.ts +0 -1
- package/node/src/styles/styled/styled.d.ts +0 -2
- package/node/src/styles/styled/types.d.ts +0 -48
- package/node/src/theme/baseTheme.d.ts +0 -28
- package/node/src/theme/components/MuiFormHelperText.d.ts +0 -4
- package/node/src/theme/components/MuiFormLabel.d.ts +0 -4
- package/node/src/theme/components/MuiInputBase.d.ts +0 -4
- package/node/src/theme/components/MuiInputLabel.d.ts +0 -4
- package/node/src/theme/components/MuiOutlinedInput.d.ts +0 -4
- package/node/src/theme/components/MuiTypography.d.ts +0 -21
- package/node/src/theme/components/components.d.ts +0 -21
- package/node/src/theme/components/index.d.ts +0 -1
- package/node/src/theme/constants.d.ts +0 -9
- package/node/src/theme/elevation.d.ts +0 -8
- package/node/src/theme/hooks/index.d.ts +0 -1
- package/node/src/theme/hooks/useTheme/index.d.ts +0 -2
- package/node/src/theme/index.d.ts +0 -6
- package/node/src/theme/palette/brandPalette.d.ts +0 -15
- package/node/src/theme/palette/index.d.ts +0 -2
- package/node/src/theme/palette/palette.d.ts +0 -29
- package/node/src/theme/shape.d.ts +0 -6
- package/node/src/theme/typography.d.ts +0 -19
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
import { SvgIcon } from '@mui/material';
|
|
25
|
+
export var DefaultIcon = function (_a) {
|
|
26
|
+
var props = __rest(_a, []);
|
|
27
|
+
return (_jsxs(SvgIcon, __assign({ viewBox: "0 0 24 24" }, props, { children: [_jsx("circle", { cx: "12", cy: "12", r: "7", fill: "#DDE2E8" }, void 0), _jsx("circle", { cx: "12", cy: "12", r: "5" }, void 0)] }), void 0));
|
|
28
|
+
};
|
|
29
|
+
export var CheckedCircleIcon = function (_a) {
|
|
30
|
+
var props = __rest(_a, []);
|
|
31
|
+
return (_jsxs(SvgIcon, __assign({ viewBox: "0 0 24 24" }, props, { children: [_jsx("circle", { cx: "12", cy: "12", r: "7" }, void 0), _jsx("circle", { cx: "12", cy: "12", r: "2", fill: "#FAFBFC" }, void 0), _jsx("path", { d: "M0 0V-1H-1V0H0ZM24 0H25V-1H24V0ZM24 24V25H25V24H24ZM0 24H-1V25H0V24ZM0 1H24V-1H0V1ZM23 0V24H25V0H23ZM24 23H0V25H24V23ZM1 24V0H-1V24H1Z", fill: "#E64343" }, void 0)] }), void 0));
|
|
32
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import React from 'react';
|
|
25
|
+
import { StyledRadio } from './styled';
|
|
26
|
+
import { CheckedCircleIcon, DefaultIcon } from './Icon';
|
|
27
|
+
export var Radio = React.forwardRef(function (_a, ref) {
|
|
28
|
+
var _b = _a.icon, icon = _b === void 0 ? _jsx(DefaultIcon, {}, void 0) : _b, _c = _a.checkedIcon, checkedIcon = _c === void 0 ? _jsx(CheckedCircleIcon, {}, void 0) : _c, props = __rest(_a, ["icon", "checkedIcon"]);
|
|
29
|
+
return (_jsx(StyledRadio, __assign({ icon: icon, checkedIcon: checkedIcon, ref: ref }, props), void 0));
|
|
30
|
+
});
|
|
31
|
+
export default Radio;
|
|
@@ -0,0 +1,32 @@
|
|
|
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 { Radio } from '@mui/material';
|
|
6
|
+
import { styled } from '../styles';
|
|
7
|
+
export var StyledRadio = styled(Radio)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 5px;\n border-radius: unset;\n color: ", ";\n\n &:hover {\n background: none;\n & > svg {\n color: ", ";\n }\n }\n\n &.Mui-disabled:not(.Mui-checked) {\n color: ", ";\n & > svg {\n color: ", ";\n }\n }\n\n &.Mui-checked {\n color: ", ";\n &:hover {\n & > svg {\n color: ", ";\n }\n }\n &.Mui-disabled {\n color: ", ";\n }\n & > svg > path {\n fill: ", ";\n }\n }\n"], ["\n padding: 5px;\n border-radius: unset;\n color: ", ";\n\n &:hover {\n background: none;\n & > svg {\n color: ", ";\n }\n }\n\n &.Mui-disabled:not(.Mui-checked) {\n color: ", ";\n & > svg {\n color: ", ";\n }\n }\n\n &.Mui-checked {\n color: ", ";\n &:hover {\n & > svg {\n color: ", ";\n }\n }\n &.Mui-disabled {\n color: ", ";\n }\n & > svg > path {\n fill: ", ";\n }\n }\n"])), function (_a) {
|
|
8
|
+
var theme = _a.theme;
|
|
9
|
+
return theme.palette.background.default;
|
|
10
|
+
}, function (_a) {
|
|
11
|
+
var theme = _a.theme;
|
|
12
|
+
return theme.palette.grey[200];
|
|
13
|
+
}, function (_a) {
|
|
14
|
+
var theme = _a.theme;
|
|
15
|
+
return theme.palette.grey[200];
|
|
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.primary.main;
|
|
22
|
+
}, function (_a) {
|
|
23
|
+
var theme = _a.theme;
|
|
24
|
+
return theme.palette.primary[700];
|
|
25
|
+
}, function (_a) {
|
|
26
|
+
var theme = _a.theme;
|
|
27
|
+
return theme.palette.grey[500];
|
|
28
|
+
}, function (_a) {
|
|
29
|
+
var theme = _a.theme;
|
|
30
|
+
return theme.palette.common.white;
|
|
31
|
+
});
|
|
32
|
+
var templateObject_1;
|
|
File without changes
|
package/esm/src/Tag/styled.js
CHANGED
|
@@ -101,7 +101,11 @@ var getDeleteIconBgColor = function (_a) {
|
|
|
101
101
|
}
|
|
102
102
|
return 'transparent';
|
|
103
103
|
};
|
|
104
|
-
export var StyledTag = styled(Chip
|
|
104
|
+
export var StyledTag = styled(Chip, {
|
|
105
|
+
shouldForwardProp: function (prop) {
|
|
106
|
+
return prop !== 'customColor' && prop !== 'customVariant' && prop !== 'rounded';
|
|
107
|
+
},
|
|
108
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n user-select: none;\n font-size: 14px;\n height: 20px;\n border-radius: ", ";\n background-color: ", ";\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n &:active {\n background-color: ", ";\n color: ", ";\n }\n\n .MuiChip-label {\n padding: ", ";\n\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n &:active {\n color: ", ";\n }\n }\n .MuiChip-deleteIcon {\n margin: 0;\n width: 20px;\n height: 20px;\n border-radius: ", ";\n\n background: ", ";\n\n &:hover {\n background: ", ";\n }\n &:active {\n background: ", ";\n }\n }\n .MuiChip-avatar {\n margin: 2px;\n width: 16px;\n height: 16px;\n }\n .MuiChip-icon {\n width: 16px;\n height: 16px;\n }\n"], ["\n user-select: none;\n font-size: 14px;\n height: 20px;\n border-radius: ", ";\n background-color: ", ";\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n &:active {\n background-color: ", ";\n color: ", ";\n }\n\n .MuiChip-label {\n padding: ", ";\n\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n &:active {\n color: ", ";\n }\n }\n .MuiChip-deleteIcon {\n margin: 0;\n width: 20px;\n height: 20px;\n border-radius: ", ";\n\n background: ", ";\n\n &:hover {\n background: ", ";\n }\n &:active {\n background: ", ";\n }\n }\n .MuiChip-avatar {\n margin: 2px;\n width: 16px;\n height: 16px;\n }\n .MuiChip-icon {\n width: 16px;\n height: 16px;\n }\n"])), function (props) { return getShape(__assign({}, props)); }, function (props) {
|
|
105
109
|
return getBgColor(__assign(__assign({}, props), { tagState: TagStates.DEFAULT }));
|
|
106
110
|
}, function (props) {
|
|
107
111
|
return getBgColor(__assign(__assign({}, props), { tagState: TagStates.HOVER }));
|
|
@@ -12,6 +12,11 @@ var MuiCheckbox = {
|
|
|
12
12
|
disableRipple: true,
|
|
13
13
|
},
|
|
14
14
|
};
|
|
15
|
+
var MuiRadio = {
|
|
16
|
+
defaultProps: {
|
|
17
|
+
disableRipple: true,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
15
20
|
var MuiMenu = {
|
|
16
21
|
defaultProps: {
|
|
17
22
|
autoFocus: false,
|
|
@@ -58,4 +63,5 @@ export var getComponents = function (fontUrls) { return ({
|
|
|
58
63
|
MuiCheckbox: MuiCheckbox,
|
|
59
64
|
MuiMenu: MuiMenu,
|
|
60
65
|
MuiMenuItem: MuiMenuItem,
|
|
66
|
+
MuiRadio: MuiRadio,
|
|
61
67
|
}); };
|
|
@@ -0,0 +1,37 @@
|
|
|
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.CheckedCircleIcon = 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 24 24" }, props, { children: [(0, jsx_runtime_1.jsx)("circle", { cx: "12", cy: "12", r: "7", fill: "#DDE2E8" }, void 0), (0, jsx_runtime_1.jsx)("circle", { cx: "12", cy: "12", r: "5" }, void 0)] }), void 0));
|
|
31
|
+
};
|
|
32
|
+
exports.DefaultIcon = DefaultIcon;
|
|
33
|
+
var CheckedCircleIcon = function (_a) {
|
|
34
|
+
var props = __rest(_a, []);
|
|
35
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.SvgIcon, __assign({ viewBox: "0 0 24 24" }, props, { children: [(0, jsx_runtime_1.jsx)("circle", { cx: "12", cy: "12", r: "7" }, void 0), (0, jsx_runtime_1.jsx)("circle", { cx: "12", cy: "12", r: "2", fill: "#FAFBFC" }, void 0), (0, jsx_runtime_1.jsx)("path", { d: "M0 0V-1H-1V0H0ZM24 0H25V-1H24V0ZM24 24V25H25V24H24ZM0 24H-1V25H0V24ZM0 1H24V-1H0V1ZM23 0V24H25V0H23ZM24 23H0V25H24V23ZM1 24V0H-1V24H1Z", fill: "#E64343" }, void 0)] }), void 0));
|
|
36
|
+
};
|
|
37
|
+
exports.CheckedCircleIcon = CheckedCircleIcon;
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.Radio = void 0;
|
|
29
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
30
|
+
var react_1 = __importDefault(require("react"));
|
|
31
|
+
var styled_1 = require("./styled");
|
|
32
|
+
var Icon_1 = require("./Icon");
|
|
33
|
+
exports.Radio = react_1.default.forwardRef(function (_a, ref) {
|
|
34
|
+
var _b = _a.icon, icon = _b === void 0 ? (0, jsx_runtime_1.jsx)(Icon_1.DefaultIcon, {}, void 0) : _b, _c = _a.checkedIcon, checkedIcon = _c === void 0 ? (0, jsx_runtime_1.jsx)(Icon_1.CheckedCircleIcon, {}, void 0) : _c, props = __rest(_a, ["icon", "checkedIcon"]);
|
|
35
|
+
return ((0, jsx_runtime_1.jsx)(styled_1.StyledRadio, __assign({ icon: icon, checkedIcon: checkedIcon, ref: ref }, props), void 0));
|
|
36
|
+
});
|
|
37
|
+
exports.default = exports.Radio;
|
|
@@ -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("./Radio"), exports);
|
|
14
|
+
__exportStar(require("./types"), exports);
|
|
@@ -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.StyledRadio = void 0;
|
|
8
|
+
var material_1 = require("@mui/material");
|
|
9
|
+
var styles_1 = require("../styles");
|
|
10
|
+
exports.StyledRadio = (0, styles_1.styled)(material_1.Radio)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 5px;\n border-radius: unset;\n color: ", ";\n\n &:hover {\n background: none;\n & > svg {\n color: ", ";\n }\n }\n\n &.Mui-disabled:not(.Mui-checked) {\n color: ", ";\n & > svg {\n color: ", ";\n }\n }\n\n &.Mui-checked {\n color: ", ";\n &:hover {\n & > svg {\n color: ", ";\n }\n }\n &.Mui-disabled {\n color: ", ";\n }\n & > svg > path {\n fill: ", ";\n }\n }\n"], ["\n padding: 5px;\n border-radius: unset;\n color: ", ";\n\n &:hover {\n background: none;\n & > svg {\n color: ", ";\n }\n }\n\n &.Mui-disabled:not(.Mui-checked) {\n color: ", ";\n & > svg {\n color: ", ";\n }\n }\n\n &.Mui-checked {\n color: ", ";\n &:hover {\n & > svg {\n color: ", ";\n }\n }\n &.Mui-disabled {\n color: ", ";\n }\n & > svg > path {\n fill: ", ";\n }\n }\n"])), function (_a) {
|
|
11
|
+
var theme = _a.theme;
|
|
12
|
+
return theme.palette.background.default;
|
|
13
|
+
}, function (_a) {
|
|
14
|
+
var theme = _a.theme;
|
|
15
|
+
return theme.palette.grey[200];
|
|
16
|
+
}, function (_a) {
|
|
17
|
+
var theme = _a.theme;
|
|
18
|
+
return theme.palette.grey[200];
|
|
19
|
+
}, function (_a) {
|
|
20
|
+
var theme = _a.theme;
|
|
21
|
+
return theme.palette.grey[300];
|
|
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;
|
package/node/src/Tag/styled.js
CHANGED
|
@@ -104,7 +104,11 @@ var getDeleteIconBgColor = function (_a) {
|
|
|
104
104
|
}
|
|
105
105
|
return 'transparent';
|
|
106
106
|
};
|
|
107
|
-
exports.StyledTag = (0, styles_1.styled)(material_1.Chip
|
|
107
|
+
exports.StyledTag = (0, styles_1.styled)(material_1.Chip, {
|
|
108
|
+
shouldForwardProp: function (prop) {
|
|
109
|
+
return prop !== 'customColor' && prop !== 'customVariant' && prop !== 'rounded';
|
|
110
|
+
},
|
|
111
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n user-select: none;\n font-size: 14px;\n height: 20px;\n border-radius: ", ";\n background-color: ", ";\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n &:active {\n background-color: ", ";\n color: ", ";\n }\n\n .MuiChip-label {\n padding: ", ";\n\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n &:active {\n color: ", ";\n }\n }\n .MuiChip-deleteIcon {\n margin: 0;\n width: 20px;\n height: 20px;\n border-radius: ", ";\n\n background: ", ";\n\n &:hover {\n background: ", ";\n }\n &:active {\n background: ", ";\n }\n }\n .MuiChip-avatar {\n margin: 2px;\n width: 16px;\n height: 16px;\n }\n .MuiChip-icon {\n width: 16px;\n height: 16px;\n }\n"], ["\n user-select: none;\n font-size: 14px;\n height: 20px;\n border-radius: ", ";\n background-color: ", ";\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n &:active {\n background-color: ", ";\n color: ", ";\n }\n\n .MuiChip-label {\n padding: ", ";\n\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n &:active {\n color: ", ";\n }\n }\n .MuiChip-deleteIcon {\n margin: 0;\n width: 20px;\n height: 20px;\n border-radius: ", ";\n\n background: ", ";\n\n &:hover {\n background: ", ";\n }\n &:active {\n background: ", ";\n }\n }\n .MuiChip-avatar {\n margin: 2px;\n width: 16px;\n height: 16px;\n }\n .MuiChip-icon {\n width: 16px;\n height: 16px;\n }\n"])), function (props) { return getShape(__assign({}, props)); }, function (props) {
|
|
108
112
|
return getBgColor(__assign(__assign({}, props), { tagState: constants_1.TagStates.DEFAULT }));
|
|
109
113
|
}, function (props) {
|
|
110
114
|
return getBgColor(__assign(__assign({}, props), { tagState: constants_1.TagStates.HOVER }));
|
|
@@ -15,6 +15,11 @@ var MuiCheckbox = {
|
|
|
15
15
|
disableRipple: true,
|
|
16
16
|
},
|
|
17
17
|
};
|
|
18
|
+
var MuiRadio = {
|
|
19
|
+
defaultProps: {
|
|
20
|
+
disableRipple: true,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
18
23
|
var MuiMenu = {
|
|
19
24
|
defaultProps: {
|
|
20
25
|
autoFocus: false,
|
|
@@ -61,5 +66,6 @@ var getComponents = function (fontUrls) { return ({
|
|
|
61
66
|
MuiCheckbox: MuiCheckbox,
|
|
62
67
|
MuiMenu: MuiMenu,
|
|
63
68
|
MuiMenuItem: MuiMenuItem,
|
|
69
|
+
MuiRadio: MuiRadio,
|
|
64
70
|
}); };
|
|
65
71
|
exports.getComponents = getComponents;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astral/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6-beta.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"jest": {
|
|
@@ -31,7 +31,14 @@
|
|
|
31
31
|
},
|
|
32
32
|
"keywords": [],
|
|
33
33
|
"sideEffects": false,
|
|
34
|
-
"main": "./
|
|
35
|
-
"types": "./
|
|
36
|
-
"module": "./esm/index.js"
|
|
34
|
+
"main": "./cjs/index.js",
|
|
35
|
+
"types": "./types/index.d.ts",
|
|
36
|
+
"module": "./esm/index.js",
|
|
37
|
+
"exports": {
|
|
38
|
+
".": {
|
|
39
|
+
"import": "./esm/index.js",
|
|
40
|
+
"require": "./cjs/index.js",
|
|
41
|
+
"types": "./types/index.d.ts"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
37
44
|
}
|
package/{esm → types}/index.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { RadioProps } from './types';
|
|
3
|
+
export declare const Radio: React.ForwardRefExoticComponent<Pick<RadioProps, "disabled" | "translate" | "action" | "required" | "classes" | "className" | "style" | "form" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "title" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "key" | "autoFocus" | "inputProps" | "inputRef" | "name" | "readOnly" | "value" | "checkedIcon" | "icon" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "checked" | "disableFocusRipple" | "edge"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export default Radio;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './Radio';
|
|
2
2
|
export * from './types';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|