@astral/ui 0.23.0-alpha.4 → 0.23.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/Autocomplete/Autocomplete.d.ts +1 -1
- package/Autocomplete/Autocomplete.js +15 -11
- package/Badge/styled.d.ts +3 -3
- package/Button/Button.d.ts +2 -1
- package/Button/Button.js +6 -17
- package/Button/types.d.ts +18 -6
- package/ButtonBase/styled.d.ts +8 -5
- package/ButtonBase/styled.js +2 -1
- package/CircularProgress/CircularProgress.d.ts +1 -1
- package/CircularProgress/CircularProgress.js +12 -7
- package/CircularProgress/CircularProgressStory.d.ts +5 -0
- package/CircularProgress/CircularProgressStory.js +11 -0
- package/CircularProgress/CircularProgressStoryTemplate.d.ts +4 -0
- package/CircularProgress/CircularProgressStoryTemplate.js +21 -0
- package/CircularProgress/types.d.ts +8 -5
- package/DataGrid/DataGridBody/styled.d.ts +2 -2
- package/DataGrid/DataGridHeadColumn/styled.d.ts +2 -2
- package/DataGrid/DataGridLoader/styled.d.ts +4 -4
- package/DataGrid/styled.d.ts +2 -2
- package/DataGridPagination/styled.d.ts +5 -5
- package/FormHelperText/styled.d.ts +8 -8
- package/Grid/styled.d.ts +2 -2
- package/IconButton/styled.d.ts +6 -8
- package/List/styled.d.ts +2 -2
- package/ListItem/styled.d.ts +6 -6
- package/ListItemButton/styled.d.ts +2 -2
- package/MenuList/styled.d.ts +2 -2
- package/Placeholder/styled.d.ts +10 -10
- package/Radio/Radio.d.ts +1 -1
- package/Select/styled.d.ts +2 -2
- package/Tag/styled.d.ts +5 -5
- package/TextArea/TextArea.d.ts +1 -1
- package/TextField/TextField.d.ts +1 -1
- package/Tooltip/Tooltip.d.ts +1 -1
- package/Tooltip/styled.d.ts +1 -1
- package/esm/Autocomplete/Autocomplete.d.ts +1 -1
- package/esm/Autocomplete/Autocomplete.js +15 -11
- package/esm/Badge/styled.d.ts +3 -3
- package/esm/Button/Button.d.ts +2 -1
- package/esm/Button/Button.js +7 -17
- package/esm/Button/types.d.ts +18 -6
- package/esm/ButtonBase/styled.d.ts +8 -5
- package/esm/ButtonBase/styled.js +2 -1
- package/esm/CircularProgress/CircularProgress.d.ts +1 -1
- package/esm/CircularProgress/CircularProgress.js +9 -6
- package/esm/CircularProgress/CircularProgressStory.d.ts +5 -0
- package/esm/CircularProgress/CircularProgressStory.js +7 -0
- package/esm/CircularProgress/CircularProgressStoryTemplate.d.ts +4 -0
- package/esm/CircularProgress/CircularProgressStoryTemplate.js +17 -0
- package/esm/CircularProgress/types.d.ts +8 -5
- package/esm/DataGrid/DataGridBody/styled.d.ts +2 -2
- package/esm/DataGrid/DataGridHeadColumn/styled.d.ts +2 -2
- package/esm/DataGrid/DataGridLoader/styled.d.ts +4 -4
- package/esm/DataGrid/styled.d.ts +2 -2
- package/esm/DataGridPagination/styled.d.ts +5 -5
- package/esm/FormHelperText/styled.d.ts +8 -8
- package/esm/Grid/styled.d.ts +2 -2
- package/esm/IconButton/styled.d.ts +6 -8
- package/esm/List/styled.d.ts +2 -2
- package/esm/ListItem/styled.d.ts +6 -6
- package/esm/ListItemButton/styled.d.ts +2 -2
- package/esm/MenuList/styled.d.ts +2 -2
- package/esm/Placeholder/styled.d.ts +10 -10
- package/esm/Radio/Radio.d.ts +1 -1
- package/esm/Select/styled.d.ts +2 -2
- package/esm/Tag/styled.d.ts +5 -5
- package/esm/TextArea/TextArea.d.ts +1 -1
- package/esm/TextField/TextField.d.ts +1 -1
- package/esm/Tooltip/Tooltip.d.ts +1 -1
- package/esm/Tooltip/styled.d.ts +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/theme/components/MuiButton.d.ts +3 -0
- package/esm/theme/components/MuiButton.js +96 -0
- package/esm/theme/components/MuiCircularProgress.d.ts +4 -0
- package/esm/theme/components/MuiCircularProgress.js +16 -0
- package/esm/theme/components/MuiLoadingButton.d.ts +4 -0
- package/esm/theme/components/MuiLoadingButton.js +45 -0
- package/esm/theme/components/components.js +6 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +2 -2
- package/theme/components/MuiButton.d.ts +3 -0
- package/theme/components/MuiButton.js +99 -0
- package/theme/components/MuiCircularProgress.d.ts +4 -0
- package/theme/components/MuiCircularProgress.js +19 -0
- package/theme/components/MuiLoadingButton.d.ts +4 -0
- package/theme/components/MuiLoadingButton.js +48 -0
- package/theme/components/components.js +6 -0
- package/Button/styled.d.ts +0 -12
- package/Button/styled.js +0 -36
- package/CircularProgress/styled.d.ts +0 -6
- package/CircularProgress/styled.js +0 -20
- package/esm/Button/styled.d.ts +0 -12
- package/esm/Button/styled.js +0 -33
- package/esm/CircularProgress/styled.d.ts +0 -6
- package/esm/CircularProgress/styled.js +0 -17
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
import { loadingButtonClasses } from '@mui/lab';
|
|
13
|
+
import { ButtonStates } from '../../ButtonBase/constants';
|
|
14
|
+
import { getBgColor } from '../../ButtonBase/styled';
|
|
15
|
+
export var MuiLoadingButton = {
|
|
16
|
+
defaultProps: {
|
|
17
|
+
disableRipple: true,
|
|
18
|
+
},
|
|
19
|
+
styleOverrides: {
|
|
20
|
+
root: function (_a) {
|
|
21
|
+
var _b;
|
|
22
|
+
var ownerState = _a.ownerState, theme = _a.theme;
|
|
23
|
+
var customVariant = ownerState.variant;
|
|
24
|
+
var customColor = ownerState.color;
|
|
25
|
+
return _b = {},
|
|
26
|
+
_b["&.".concat(loadingButtonClasses.loading)] = {
|
|
27
|
+
backgroundColor: getBgColor({
|
|
28
|
+
customColor: customColor,
|
|
29
|
+
customVariant: customVariant,
|
|
30
|
+
theme: theme,
|
|
31
|
+
buttonState: ButtonStates.DEFAULT,
|
|
32
|
+
}),
|
|
33
|
+
},
|
|
34
|
+
_b;
|
|
35
|
+
},
|
|
36
|
+
loadingIndicator: function (_a) {
|
|
37
|
+
var ownerState = _a.ownerState, theme = _a.theme;
|
|
38
|
+
var customVariant = ownerState.variant;
|
|
39
|
+
return __assign({}, (customVariant === 'contained' && {
|
|
40
|
+
color: theme.palette.primary.contrastText,
|
|
41
|
+
}));
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
export default MuiLoadingButton;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { MuiButton } from './MuiButton';
|
|
1
2
|
import { MuiButtonBase } from './MuiButtonBase';
|
|
3
|
+
import { MuiLoadingButton } from './MuiLoadingButton';
|
|
2
4
|
import { MuiInputBase } from './MuiInputBase';
|
|
3
5
|
import { MuiFormHelperText } from './MuiFormHelperText';
|
|
4
6
|
import { MuiFormLabel } from './MuiFormLabel';
|
|
@@ -16,6 +18,7 @@ import { MuiTableHead } from './MuiTableHead';
|
|
|
16
18
|
import { MuiPickersDay } from './MuiPickersDay';
|
|
17
19
|
import { MuiCalendarPicker } from './MuiCalendarPicker';
|
|
18
20
|
import { MuiYearPicker } from './MuiYearPicker';
|
|
21
|
+
import { MuiCircularProgress } from './MuiCircularProgress';
|
|
19
22
|
var getMuiCssBaseline = function (fontUrls) { return ({
|
|
20
23
|
styleOverrides: "\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 300;\n font-display: swap;\n src: url(".concat(fontUrls.light.woff2, ") format('woff2'), url(").concat(fontUrls.light.woff, ") format('woff');\n }\n @font-face { \n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 400;\n font-display: swap;\n src: url(").concat(fontUrls.regular.woff2, ") format('woff2'), url(").concat(fontUrls.regular.woff, ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 500;\n font-display: swap;\n src: url(").concat(fontUrls.medium.woff2, ") format('woff2'), url(").concat(fontUrls.medium.woff, ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 700;\n font-display: swap;\n src: url(").concat(fontUrls.bold.woff2, ") format('woff2'), url(").concat(fontUrls.bold.woff, ") format('woff');\n }\n "),
|
|
21
24
|
}); };
|
|
@@ -66,7 +69,9 @@ var MuiMenuItem = {
|
|
|
66
69
|
};
|
|
67
70
|
export var getComponents = function (fontUrls) { return ({
|
|
68
71
|
MuiCssBaseline: getMuiCssBaseline(fontUrls),
|
|
72
|
+
MuiButton: MuiButton,
|
|
69
73
|
MuiButtonBase: MuiButtonBase,
|
|
74
|
+
MuiLoadingButton: MuiLoadingButton,
|
|
70
75
|
MuiTypography: MuiTypography,
|
|
71
76
|
MuiInputBase: MuiInputBase,
|
|
72
77
|
MuiInputLabel: MuiInputLabel,
|
|
@@ -88,4 +93,5 @@ export var getComponents = function (fontUrls) { return ({
|
|
|
88
93
|
MuiPickersDay: MuiPickersDay,
|
|
89
94
|
MuiCalendarPicker: MuiCalendarPicker,
|
|
90
95
|
MuiYearPicker: MuiYearPicker,
|
|
96
|
+
MuiCircularProgress: MuiCircularProgress,
|
|
91
97
|
}); };
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -15,6 +15,7 @@ __exportStar(require("./Badge"), exports);
|
|
|
15
15
|
__exportStar(require("./Button"), exports);
|
|
16
16
|
__exportStar(require("./ButtonBase"), exports);
|
|
17
17
|
__exportStar(require("./Checkbox"), exports);
|
|
18
|
+
__exportStar(require("./CircularProgress"), exports);
|
|
18
19
|
__exportStar(require("./DashboardLayout"), exports);
|
|
19
20
|
__exportStar(require("./DataGrid"), exports);
|
|
20
21
|
__exportStar(require("./DataGridPagination"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astral/ui",
|
|
3
|
-
"version": "0.23.0
|
|
3
|
+
"version": "0.23.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.23.0
|
|
11
|
+
"@astral/icons": "^0.23.0",
|
|
12
12
|
"@emotion/cache": "11.7.1",
|
|
13
13
|
"@emotion/react": "11.8.1",
|
|
14
14
|
"@emotion/server": "11.4.0",
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MuiButton = void 0;
|
|
4
|
+
var constants_1 = require("../../ButtonBase/constants");
|
|
5
|
+
var styled_1 = require("../../ButtonBase/styled");
|
|
6
|
+
exports.MuiButton = {
|
|
7
|
+
defaultProps: {
|
|
8
|
+
disableRipple: true,
|
|
9
|
+
},
|
|
10
|
+
styleOverrides: {
|
|
11
|
+
root: function (_a) {
|
|
12
|
+
var ownerState = _a.ownerState, theme = _a.theme;
|
|
13
|
+
var customVariant = ownerState.variant;
|
|
14
|
+
var customColor = ownerState.color;
|
|
15
|
+
return {
|
|
16
|
+
display: 'inline-flex',
|
|
17
|
+
color: (0, styled_1.getColor)({
|
|
18
|
+
theme: theme,
|
|
19
|
+
customVariant: customVariant,
|
|
20
|
+
customColor: customColor,
|
|
21
|
+
buttonState: constants_1.ButtonStates.DEFAULT,
|
|
22
|
+
}),
|
|
23
|
+
backgroundColor: (0, styled_1.getBgColor)({
|
|
24
|
+
customColor: customColor,
|
|
25
|
+
customVariant: customVariant,
|
|
26
|
+
buttonState: constants_1.ButtonStates.DEFAULT,
|
|
27
|
+
theme: theme,
|
|
28
|
+
}),
|
|
29
|
+
height: (0, styled_1.getButtonHeight)({
|
|
30
|
+
theme: theme,
|
|
31
|
+
size: ownerState.size,
|
|
32
|
+
}),
|
|
33
|
+
padding: (0, styled_1.getButtonPadding)({
|
|
34
|
+
theme: theme,
|
|
35
|
+
size: ownerState.size,
|
|
36
|
+
}),
|
|
37
|
+
fontWeight: theme.typography.button.fontWeight,
|
|
38
|
+
fontSize: theme.typography.button.fontSize,
|
|
39
|
+
border: 'none',
|
|
40
|
+
borderRadius: theme.shape.small,
|
|
41
|
+
textTransform: 'none',
|
|
42
|
+
boxShadow: 'none',
|
|
43
|
+
'&:hover': {
|
|
44
|
+
color: (0, styled_1.getColor)({
|
|
45
|
+
theme: theme,
|
|
46
|
+
customVariant: customVariant,
|
|
47
|
+
customColor: customColor,
|
|
48
|
+
buttonState: constants_1.ButtonStates.HOVER,
|
|
49
|
+
}),
|
|
50
|
+
backgroundColor: (0, styled_1.getBgColor)({
|
|
51
|
+
customColor: customColor,
|
|
52
|
+
customVariant: customVariant,
|
|
53
|
+
theme: theme,
|
|
54
|
+
buttonState: constants_1.ButtonStates.HOVER,
|
|
55
|
+
}),
|
|
56
|
+
boxShadow: 'none',
|
|
57
|
+
},
|
|
58
|
+
'&:active': {
|
|
59
|
+
color: (0, styled_1.getColor)({
|
|
60
|
+
customColor: customColor,
|
|
61
|
+
customVariant: customVariant,
|
|
62
|
+
theme: theme,
|
|
63
|
+
buttonState: constants_1.ButtonStates.ACTIVE,
|
|
64
|
+
}),
|
|
65
|
+
backgroundColor: (0, styled_1.getBgColor)({
|
|
66
|
+
customColor: customColor,
|
|
67
|
+
customVariant: customVariant,
|
|
68
|
+
theme: theme,
|
|
69
|
+
buttonState: constants_1.ButtonStates.ACTIVE,
|
|
70
|
+
}),
|
|
71
|
+
outline: 'none',
|
|
72
|
+
},
|
|
73
|
+
'&.Mui-disabled': {
|
|
74
|
+
color: theme.palette.grey['500'],
|
|
75
|
+
backgroundColor: (0, styled_1.getDisabledBgColor)({
|
|
76
|
+
theme: theme,
|
|
77
|
+
customVariant: customVariant,
|
|
78
|
+
}),
|
|
79
|
+
},
|
|
80
|
+
'&.Mui-focusVisible': {
|
|
81
|
+
color: (0, styled_1.getColor)({
|
|
82
|
+
theme: theme,
|
|
83
|
+
customVariant: customVariant,
|
|
84
|
+
customColor: customColor,
|
|
85
|
+
buttonState: constants_1.ButtonStates.FOCUS,
|
|
86
|
+
}),
|
|
87
|
+
backgroundColor: (0, styled_1.getBgColor)({
|
|
88
|
+
customColor: customColor,
|
|
89
|
+
customVariant: customVariant,
|
|
90
|
+
theme: theme,
|
|
91
|
+
buttonState: constants_1.ButtonStates.FOCUS,
|
|
92
|
+
}),
|
|
93
|
+
outline: "2px solid ".concat(theme.palette.primary['400']),
|
|
94
|
+
boxShadow: 'none',
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MuiCircularProgress = void 0;
|
|
4
|
+
exports.MuiCircularProgress = {
|
|
5
|
+
styleOverrides: {
|
|
6
|
+
root: function (_a) {
|
|
7
|
+
var ownerState = _a.ownerState, theme = _a.theme;
|
|
8
|
+
// В данном случае появилась необходимость использования data- атрибута
|
|
9
|
+
// Подробнее: https://github.com/kaluga-astral/frontend/pull/199/files/5b42598b80e5b199e1b1a1298844a51b489e9c5a#r857514116
|
|
10
|
+
var color = ownerState["data-color"];
|
|
11
|
+
return {
|
|
12
|
+
color: color === 'primary'
|
|
13
|
+
? theme.palette.grey[900]
|
|
14
|
+
: theme.palette.primary.contrastText,
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
exports.default = exports.MuiCircularProgress;
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.MuiLoadingButton = void 0;
|
|
15
|
+
var lab_1 = require("@mui/lab");
|
|
16
|
+
var constants_1 = require("../../ButtonBase/constants");
|
|
17
|
+
var styled_1 = require("../../ButtonBase/styled");
|
|
18
|
+
exports.MuiLoadingButton = {
|
|
19
|
+
defaultProps: {
|
|
20
|
+
disableRipple: true,
|
|
21
|
+
},
|
|
22
|
+
styleOverrides: {
|
|
23
|
+
root: function (_a) {
|
|
24
|
+
var _b;
|
|
25
|
+
var ownerState = _a.ownerState, theme = _a.theme;
|
|
26
|
+
var customVariant = ownerState.variant;
|
|
27
|
+
var customColor = ownerState.color;
|
|
28
|
+
return _b = {},
|
|
29
|
+
_b["&.".concat(lab_1.loadingButtonClasses.loading)] = {
|
|
30
|
+
backgroundColor: (0, styled_1.getBgColor)({
|
|
31
|
+
customColor: customColor,
|
|
32
|
+
customVariant: customVariant,
|
|
33
|
+
theme: theme,
|
|
34
|
+
buttonState: constants_1.ButtonStates.DEFAULT,
|
|
35
|
+
}),
|
|
36
|
+
},
|
|
37
|
+
_b;
|
|
38
|
+
},
|
|
39
|
+
loadingIndicator: function (_a) {
|
|
40
|
+
var ownerState = _a.ownerState, theme = _a.theme;
|
|
41
|
+
var customVariant = ownerState.variant;
|
|
42
|
+
return __assign({}, (customVariant === 'contained' && {
|
|
43
|
+
color: theme.palette.primary.contrastText,
|
|
44
|
+
}));
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
exports.default = exports.MuiLoadingButton;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getComponents = void 0;
|
|
4
|
+
var MuiButton_1 = require("./MuiButton");
|
|
4
5
|
var MuiButtonBase_1 = require("./MuiButtonBase");
|
|
6
|
+
var MuiLoadingButton_1 = require("./MuiLoadingButton");
|
|
5
7
|
var MuiInputBase_1 = require("./MuiInputBase");
|
|
6
8
|
var MuiFormHelperText_1 = require("./MuiFormHelperText");
|
|
7
9
|
var MuiFormLabel_1 = require("./MuiFormLabel");
|
|
@@ -19,6 +21,7 @@ var MuiTableHead_1 = require("./MuiTableHead");
|
|
|
19
21
|
var MuiPickersDay_1 = require("./MuiPickersDay");
|
|
20
22
|
var MuiCalendarPicker_1 = require("./MuiCalendarPicker");
|
|
21
23
|
var MuiYearPicker_1 = require("./MuiYearPicker");
|
|
24
|
+
var MuiCircularProgress_1 = require("./MuiCircularProgress");
|
|
22
25
|
var getMuiCssBaseline = function (fontUrls) { return ({
|
|
23
26
|
styleOverrides: "\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 300;\n font-display: swap;\n src: url(".concat(fontUrls.light.woff2, ") format('woff2'), url(").concat(fontUrls.light.woff, ") format('woff');\n }\n @font-face { \n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 400;\n font-display: swap;\n src: url(").concat(fontUrls.regular.woff2, ") format('woff2'), url(").concat(fontUrls.regular.woff, ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 500;\n font-display: swap;\n src: url(").concat(fontUrls.medium.woff2, ") format('woff2'), url(").concat(fontUrls.medium.woff, ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 700;\n font-display: swap;\n src: url(").concat(fontUrls.bold.woff2, ") format('woff2'), url(").concat(fontUrls.bold.woff, ") format('woff');\n }\n "),
|
|
24
27
|
}); };
|
|
@@ -69,7 +72,9 @@ var MuiMenuItem = {
|
|
|
69
72
|
};
|
|
70
73
|
var getComponents = function (fontUrls) { return ({
|
|
71
74
|
MuiCssBaseline: getMuiCssBaseline(fontUrls),
|
|
75
|
+
MuiButton: MuiButton_1.MuiButton,
|
|
72
76
|
MuiButtonBase: MuiButtonBase_1.MuiButtonBase,
|
|
77
|
+
MuiLoadingButton: MuiLoadingButton_1.MuiLoadingButton,
|
|
73
78
|
MuiTypography: MuiTypography_1.MuiTypography,
|
|
74
79
|
MuiInputBase: MuiInputBase_1.MuiInputBase,
|
|
75
80
|
MuiInputLabel: MuiInputLabel_1.MuiInputLabel,
|
|
@@ -91,5 +96,6 @@ var getComponents = function (fontUrls) { return ({
|
|
|
91
96
|
MuiPickersDay: MuiPickersDay_1.MuiPickersDay,
|
|
92
97
|
MuiCalendarPicker: MuiCalendarPicker_1.MuiCalendarPicker,
|
|
93
98
|
MuiYearPicker: MuiYearPicker_1.MuiYearPicker,
|
|
99
|
+
MuiCircularProgress: MuiCircularProgress_1.MuiCircularProgress,
|
|
94
100
|
}); };
|
|
95
101
|
exports.getComponents = getComponents;
|
package/Button/styled.d.ts
DELETED
|
@@ -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
|
-
}, {}, {}>;
|
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;
|
package/esm/Button/styled.d.ts
DELETED
|
@@ -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
|
-
}, {}, {}>;
|
package/esm/Button/styled.js
DELETED
|
@@ -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;
|