@portnet/ui 4.0.0 → 4.0.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/dist/components/buttons/PuiButton.js +18 -10
- package/dist/components/common/StyledMuiTextField.js +12 -4
- package/dist/components/inputs/PuiDateField.js +144 -84
- package/dist/components/inputs/PuiDateTimeField.js +302 -24
- package/dist/components/inputs/PuiSelect.js +116 -34
- package/dist/components/others/PuiSection.js +24 -30
- package/dist/components/table/PuiTable.js +22 -17
- package/dist/components/table/PuiTableAction.js +12 -2
- package/dist/components/typography/PuiMainTitle.js +70 -34
- package/dist/components/ui/pages/general/PuiSearchPage.js +3 -3
- package/package.json +105 -105
|
@@ -72,9 +72,13 @@ const getButtonStyles = theme => {
|
|
|
72
72
|
return theme.components.PuiButton;
|
|
73
73
|
}
|
|
74
74
|
return {
|
|
75
|
-
height:
|
|
76
|
-
borderRadius:
|
|
77
|
-
borderWidth:
|
|
75
|
+
height: "25px",
|
|
76
|
+
borderRadius: "4px",
|
|
77
|
+
borderWidth: "2px",
|
|
78
|
+
fontFamily: "inherit",
|
|
79
|
+
fontWeight: "500",
|
|
80
|
+
tertiaryBorderColor: _apperance.palette.gray.dark,
|
|
81
|
+
boxShadow: "0px 2px 1px -1px rgb(0 0 0 / 20%), 0px 1px 1px 0px rgb(0 0 0 / 14%), 0px 1px 3px 0px rgb(0 0 0 / 12%)"
|
|
78
82
|
};
|
|
79
83
|
};
|
|
80
84
|
const BaseMuiButton = (0, _styles.styled)(/*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_StyledMuiButton.default, _objectSpread({
|
|
@@ -83,9 +87,12 @@ const BaseMuiButton = (0, _styles.styled)(/*#__PURE__*/React.forwardRef((props,
|
|
|
83
87
|
const buttonStyles = getButtonStyles(props.theme);
|
|
84
88
|
return {
|
|
85
89
|
"&.MuiButton-root": {
|
|
86
|
-
height: buttonStyles.height ||
|
|
87
|
-
borderRadius: buttonStyles.borderRadius ||
|
|
88
|
-
|
|
90
|
+
height: buttonStyles.height || "37px",
|
|
91
|
+
borderRadius: buttonStyles.borderRadius || "10px",
|
|
92
|
+
fontFamily: buttonStyles.fontFamily || "inherit",
|
|
93
|
+
fontWeight: buttonStyles.fontWeight || "500",
|
|
94
|
+
boxShadow: buttonStyles.boxShadow !== undefined && buttonStyles.boxShadow !== "none" ? buttonStyles.boxShadow : buttonStyles.boxShadow === "none" ? "none" : "0px 2px 1px -1px rgb(0 0 0 / 20%), 0px 1px 1px 0px rgb(0 0 0 / 14%), 0px 1px 3px 0px rgb(0 0 0 / 12%)",
|
|
95
|
+
textTransform: "none"
|
|
89
96
|
}
|
|
90
97
|
};
|
|
91
98
|
});
|
|
@@ -95,7 +102,7 @@ const PrimaryButton = (0, _styles.styled)(/*#__PURE__*/React.forwardRef((props,
|
|
|
95
102
|
}, props))))(props => {
|
|
96
103
|
const themePalette = getPalette(props.theme);
|
|
97
104
|
const buttonStyles = getButtonStyles(props.theme);
|
|
98
|
-
const borderWidth = buttonStyles.borderWidth ||
|
|
105
|
+
const borderWidth = buttonStyles.borderWidth || "2px";
|
|
99
106
|
return {
|
|
100
107
|
"&.MuiButton-root": {
|
|
101
108
|
backgroundColor: themePalette.primary,
|
|
@@ -114,7 +121,7 @@ const SecondaryButton = (0, _styles.styled)(/*#__PURE__*/React.forwardRef((props
|
|
|
114
121
|
}, props))))(props => {
|
|
115
122
|
const themePalette = getPalette(props.theme);
|
|
116
123
|
const buttonStyles = getButtonStyles(props.theme);
|
|
117
|
-
const borderWidth = buttonStyles.borderWidth ||
|
|
124
|
+
const borderWidth = buttonStyles.borderWidth || "2px";
|
|
118
125
|
return {
|
|
119
126
|
"&.MuiButton-root": {
|
|
120
127
|
backgroundColor: themePalette.secondary,
|
|
@@ -133,11 +140,12 @@ const TertiaryButton = (0, _styles.styled)(/*#__PURE__*/React.forwardRef((props,
|
|
|
133
140
|
}, props))))(props => {
|
|
134
141
|
const themePalette = getPalette(props.theme);
|
|
135
142
|
const buttonStyles = getButtonStyles(props.theme);
|
|
136
|
-
const borderWidth = buttonStyles.borderWidth ||
|
|
143
|
+
const borderWidth = buttonStyles.borderWidth || "2px";
|
|
144
|
+
const tertiaryBorderColor = buttonStyles.tertiaryBorderColor || themePalette.primary;
|
|
137
145
|
return {
|
|
138
146
|
"&.MuiButton-root": {
|
|
139
147
|
backgroundColor: themePalette.white,
|
|
140
|
-
border: "".concat(borderWidth, " solid ").concat(
|
|
148
|
+
border: "".concat(borderWidth, " solid ").concat(tertiaryBorderColor),
|
|
141
149
|
color: themePalette.primary,
|
|
142
150
|
"&:hover": {
|
|
143
151
|
backgroundColor: themePalette.white,
|
|
@@ -85,6 +85,12 @@ const getTextFieldStyles = theme => {
|
|
|
85
85
|
color: _apperance.palette.gray.darker,
|
|
86
86
|
marginBottom: "4px",
|
|
87
87
|
fontSize: "0.8rem"
|
|
88
|
+
},
|
|
89
|
+
disabled: {
|
|
90
|
+
backgroundColor: "#f5f5f5",
|
|
91
|
+
// Light grey background for disabled
|
|
92
|
+
border: "1px solid #cecdd3",
|
|
93
|
+
labelColor: "#97969b"
|
|
88
94
|
}
|
|
89
95
|
};
|
|
90
96
|
};
|
|
@@ -117,7 +123,7 @@ const StyledMuiTextField = (0, _styles.styled)(/*#__PURE__*/React.forwardRef((_r
|
|
|
117
123
|
ref: ref
|
|
118
124
|
}, rest));
|
|
119
125
|
}))(props => {
|
|
120
|
-
var _themePalette$backgro, _themePalette$backgro2;
|
|
126
|
+
var _themePalette$backgro, _textFieldStyles$disa, _themePalette$backgro2, _textFieldStyles$disa2, _textFieldStyles$disa3;
|
|
121
127
|
const themePalette = getPalette(props.theme);
|
|
122
128
|
const textFieldStyles = getTextFieldStyles(props.theme);
|
|
123
129
|
return {
|
|
@@ -138,7 +144,7 @@ const StyledMuiTextField = (0, _styles.styled)(/*#__PURE__*/React.forwardRef((_r
|
|
|
138
144
|
color: "".concat(themePalette.primary, " !important")
|
|
139
145
|
},
|
|
140
146
|
"&.Mui-disabled": {
|
|
141
|
-
color: "".concat(
|
|
147
|
+
color: "".concat(((_textFieldStyles$disa = textFieldStyles.disabled) === null || _textFieldStyles$disa === void 0 ? void 0 : _textFieldStyles$disa.labelColor) || "#97969b", " !important")
|
|
142
148
|
},
|
|
143
149
|
"&.Mui-error": {
|
|
144
150
|
color: "".concat(themePalette.error, " !important")
|
|
@@ -161,11 +167,13 @@ const StyledMuiTextField = (0, _styles.styled)(/*#__PURE__*/React.forwardRef((_r
|
|
|
161
167
|
backgroundColor: "".concat(((_themePalette$backgro2 = themePalette.background) === null || _themePalette$backgro2 === void 0 ? void 0 : _themePalette$backgro2.error) || _apperance.palette.background.error, " !important")
|
|
162
168
|
},
|
|
163
169
|
"&.Mui-disabled ": {
|
|
170
|
+
backgroundColor: "".concat(((_textFieldStyles$disa2 = textFieldStyles.disabled) === null || _textFieldStyles$disa2 === void 0 ? void 0 : _textFieldStyles$disa2.backgroundColor) || "#f5f5f5", " !important"),
|
|
171
|
+
border: "".concat(((_textFieldStyles$disa3 = textFieldStyles.disabled) === null || _textFieldStyles$disa3 === void 0 ? void 0 : _textFieldStyles$disa3.border) || "1px solid #cecdd3", " !important"),
|
|
172
|
+
borderRadius: "".concat(textFieldStyles.inputRoot.borderRadius, " !important"),
|
|
164
173
|
"& input": {
|
|
165
174
|
color: "".concat(themePalette.gray.darker),
|
|
166
175
|
WebkitTextFillColor: "".concat(themePalette.gray.darker)
|
|
167
|
-
}
|
|
168
|
-
backgroundColor: "".concat(themePalette.secondary, " !important")
|
|
176
|
+
}
|
|
169
177
|
},
|
|
170
178
|
"& .MuiInputBase-input": {
|
|
171
179
|
lineHeight: "".concat(textFieldStyles.inputRoot.lineHeight, " !important"),
|
|
@@ -16,10 +16,11 @@ var _formik = require("formik");
|
|
|
16
16
|
var _moment = _interopRequireDefault(require("moment"));
|
|
17
17
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
18
18
|
var React = _interopRequireWildcard(require("react"));
|
|
19
|
+
var _apperance = require("../../config/apperance");
|
|
19
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
21
|
const _excluded = ["id", "className", "sx", "label", "name", "required", "value", "minDate", "maxDate", "inputFormat", "format", "disablePast", "disableFuture", "error", "readOnly", "fullWidth", "disabled", "helperText", "onChange", "onBlur"],
|
|
21
22
|
_excluded2 = ["id", "className", "sx", "label", "name", "required", "value", "minDate", "maxDate", "inputFormat", "format", "disablePast", "disableFuture", "error", "readOnly", "fullWidth", "disabled", "helperText", "onChange", "onBlur"],
|
|
22
|
-
_excluded3 = ["formik", "id", "className", "sx", "label", "name", "required", "value", "minDate", "maxDate", "inputFormat", "format", "disablePast", "disableFuture", "error", "readOnly", "fullWidth", "disabled", "helperText", "onChange", "onBlur"];
|
|
23
|
+
_excluded3 = ["formik", "id", "className", "sx", "label", "name", "required", "value", "minDate", "maxDate", "inputFormat", "format", "disablePast", "disableFuture", "error", "readOnly", "fullWidth", "disabled", "helperText", "onChange", "onBlur"]; // Helper function to get palette from theme or fallback to appearance
|
|
23
24
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
24
25
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
25
26
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -29,86 +30,141 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
29
30
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
30
31
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
31
32
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
33
|
+
const getPalette = theme => {
|
|
34
|
+
// Check if theme has our custom palette properties
|
|
35
|
+
if (theme && theme.palette && theme.palette.gray && theme.palette.gray.darker) {
|
|
36
|
+
// Theme has our custom structure, now normalize it
|
|
37
|
+
return {
|
|
38
|
+
primary: theme.palette.primary.main || theme.palette.primary,
|
|
39
|
+
secondary: theme.palette.secondary.main || theme.palette.secondary,
|
|
40
|
+
error: theme.palette.error ? theme.palette.error.main || theme.palette.error : _apperance.palette.error,
|
|
41
|
+
warning: theme.palette.warning ? theme.palette.warning.main || theme.palette.warning : _apperance.palette.warning,
|
|
42
|
+
success: theme.palette.success ? theme.palette.success.main || theme.palette.success : _apperance.palette.success,
|
|
43
|
+
info: theme.palette.info ? theme.palette.info.main || theme.palette.info : _apperance.palette.info,
|
|
44
|
+
white: theme.palette.white || _apperance.palette.white,
|
|
45
|
+
dark: theme.palette.dark || _apperance.palette.dark,
|
|
46
|
+
gray: theme.palette.gray,
|
|
47
|
+
blue: theme.palette.blue || _apperance.palette.blue,
|
|
48
|
+
background: theme.palette.background || _apperance.palette.background,
|
|
49
|
+
border: theme.palette.border || _apperance.palette.border,
|
|
50
|
+
shadow: theme.palette.shadow || _apperance.palette.shadow
|
|
51
|
+
};
|
|
50
52
|
}
|
|
53
|
+
// Check if theme object itself has gray (root level)
|
|
54
|
+
if (theme && theme.gray && theme.gray.darker) {
|
|
55
|
+
return {
|
|
56
|
+
primary: theme.primary,
|
|
57
|
+
secondary: theme.secondary,
|
|
58
|
+
error: theme.error || _apperance.palette.error,
|
|
59
|
+
warning: theme.warning || _apperance.palette.warning,
|
|
60
|
+
success: theme.success || _apperance.palette.success,
|
|
61
|
+
info: theme.info || _apperance.palette.info,
|
|
62
|
+
white: theme.white || _apperance.palette.white,
|
|
63
|
+
dark: theme.dark || _apperance.palette.dark,
|
|
64
|
+
gray: theme.gray,
|
|
65
|
+
blue: theme.blue || _apperance.palette.blue,
|
|
66
|
+
background: theme.background || _apperance.palette.background,
|
|
67
|
+
border: theme.border || _apperance.palette.border,
|
|
68
|
+
shadow: theme.shadow || _apperance.palette.shadow
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
return _apperance.palette;
|
|
51
72
|
};
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
73
|
+
|
|
74
|
+
// Helper function to get DateField styles from theme
|
|
75
|
+
const getDateFieldStyles = theme => {
|
|
76
|
+
if (theme && theme.components && theme.components.PuiDateField) {
|
|
77
|
+
return theme.components.PuiDateField;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
inputRoot: {
|
|
81
|
+
backgroundColor: _apperance.palette.white,
|
|
82
|
+
border: "2px solid ".concat(_apperance.palette.gray.dark),
|
|
83
|
+
borderRadius: "5px",
|
|
84
|
+
height: "auto",
|
|
85
|
+
lineHeight: "1"
|
|
56
86
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
lineSpacing: "-0.03em",
|
|
60
|
-
position: "initial",
|
|
61
|
-
transform: "none",
|
|
62
|
-
fontSize: "0.8rem",
|
|
63
|
-
fontWeight: "600",
|
|
87
|
+
label: {
|
|
88
|
+
color: _apperance.palette.gray.darker,
|
|
64
89
|
marginBottom: "4px",
|
|
65
|
-
|
|
66
|
-
"&.Mui-focused ": {
|
|
67
|
-
color: palette.primary
|
|
68
|
-
},
|
|
69
|
-
"&.Mui-disabled": {
|
|
70
|
-
color: palette.gray.darker
|
|
71
|
-
},
|
|
72
|
-
"&.Mui-error": {
|
|
73
|
-
color: palette.error
|
|
74
|
-
}
|
|
90
|
+
fontSize: "0.8rem"
|
|
75
91
|
},
|
|
76
|
-
|
|
77
|
-
backgroundColor:
|
|
78
|
-
border: "
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
92
|
+
disabled: {
|
|
93
|
+
backgroundColor: "#f5f5f5",
|
|
94
|
+
border: "1px solid #cecdd3",
|
|
95
|
+
labelColor: "#97969b"
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
const getTextFieldStyles = (theme, required) => {
|
|
100
|
+
var _themePalette$backgro, _palette$background, _dateFieldStyles$disa, _themePalette$backgro2, _palette$background2, _dateFieldStyles$disa2, _dateFieldStyles$disa3;
|
|
101
|
+
const themePalette = getPalette(theme);
|
|
102
|
+
const dateFieldStyles = getDateFieldStyles(theme);
|
|
103
|
+
return {
|
|
104
|
+
"&.MuiFormControl-root": {
|
|
105
|
+
"&.required .MuiInputBase-root": {
|
|
106
|
+
backgroundColor: required ? ((_themePalette$backgro = themePalette.background) === null || _themePalette$backgro === void 0 ? void 0 : _themePalette$backgro.required) || ((_palette$background = _apperance.palette.background) === null || _palette$background === void 0 ? void 0 : _palette$background.required) : dateFieldStyles.inputRoot.backgroundColor
|
|
85
107
|
},
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
|
|
108
|
+
"& .MuiFormLabel-root": {
|
|
109
|
+
zIndex: 0,
|
|
110
|
+
lineSpacing: "-0.03em",
|
|
111
|
+
position: "initial",
|
|
112
|
+
transform: "none",
|
|
113
|
+
fontSize: "".concat(dateFieldStyles.label.fontSize, " !important"),
|
|
114
|
+
fontWeight: "600",
|
|
115
|
+
marginBottom: "".concat(dateFieldStyles.label.marginBottom, " !important"),
|
|
116
|
+
color: "".concat(dateFieldStyles.label.color, " !important"),
|
|
117
|
+
"&.Mui-focused ": {
|
|
118
|
+
color: "".concat(themePalette.primary, " !important")
|
|
119
|
+
},
|
|
120
|
+
"&.Mui-disabled": {
|
|
121
|
+
color: "".concat(((_dateFieldStyles$disa = dateFieldStyles.disabled) === null || _dateFieldStyles$disa === void 0 ? void 0 : _dateFieldStyles$disa.labelColor) || "#97969b", " !important")
|
|
122
|
+
},
|
|
123
|
+
"&.Mui-error": {
|
|
124
|
+
color: "".concat(themePalette.error, " !important")
|
|
125
|
+
}
|
|
89
126
|
},
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
|
|
93
|
-
|
|
127
|
+
"& .MuiInputBase-root": {
|
|
128
|
+
backgroundColor: "".concat(dateFieldStyles.inputRoot.backgroundColor, " !important"),
|
|
129
|
+
border: "".concat(dateFieldStyles.inputRoot.border, " !important"),
|
|
130
|
+
borderRadius: "".concat(dateFieldStyles.inputRoot.borderRadius, " !important"),
|
|
131
|
+
height: "".concat(dateFieldStyles.inputRoot.height, " !important"),
|
|
132
|
+
"&.MuiInputBase-multiline": {
|
|
133
|
+
padding: "8px 0",
|
|
134
|
+
height: "auto !important"
|
|
135
|
+
},
|
|
136
|
+
"&.Mui-focused ": {
|
|
137
|
+
border: "2px solid ".concat(themePalette.primary, " !important")
|
|
138
|
+
},
|
|
139
|
+
"&.Mui-error ": {
|
|
140
|
+
border: "2px solid ".concat(themePalette.error, " !important"),
|
|
141
|
+
backgroundColor: "".concat(((_themePalette$backgro2 = themePalette.background) === null || _themePalette$backgro2 === void 0 ? void 0 : _themePalette$backgro2.error) || ((_palette$background2 = _apperance.palette.background) === null || _palette$background2 === void 0 ? void 0 : _palette$background2.error), " !important")
|
|
142
|
+
},
|
|
143
|
+
"&.Mui-disabled ": {
|
|
144
|
+
backgroundColor: "".concat(((_dateFieldStyles$disa2 = dateFieldStyles.disabled) === null || _dateFieldStyles$disa2 === void 0 ? void 0 : _dateFieldStyles$disa2.backgroundColor) || "#f5f5f5", " !important"),
|
|
145
|
+
border: "".concat(((_dateFieldStyles$disa3 = dateFieldStyles.disabled) === null || _dateFieldStyles$disa3 === void 0 ? void 0 : _dateFieldStyles$disa3.border) || "1px solid #cecdd3", " !important"),
|
|
146
|
+
borderRadius: "".concat(dateFieldStyles.inputRoot.borderRadius, " !important"),
|
|
147
|
+
"& input": {
|
|
148
|
+
color: "".concat(themePalette.gray.darker),
|
|
149
|
+
WebkitTextFillColor: "".concat(themePalette.gray.darker)
|
|
150
|
+
}
|
|
94
151
|
},
|
|
95
|
-
|
|
152
|
+
"& .MuiInputBase-input": {
|
|
153
|
+
lineHeight: "".concat(dateFieldStyles.inputRoot.lineHeight, " !important"),
|
|
154
|
+
padding: "1px 6px",
|
|
155
|
+
fontSize: "0.7rem"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"& .MuiFormHelperText-root": {
|
|
159
|
+
fontWeight: "bold",
|
|
160
|
+
fontSize: ".7rem",
|
|
161
|
+
color: "red"
|
|
96
162
|
},
|
|
97
|
-
"&
|
|
98
|
-
|
|
99
|
-
padding: "1px 6px",
|
|
100
|
-
fontSize: "0.7rem"
|
|
163
|
+
"& fieldset": {
|
|
164
|
+
display: "none"
|
|
101
165
|
}
|
|
102
|
-
},
|
|
103
|
-
"& .MuiFormHelperText-root": {
|
|
104
|
-
fontWeight: "bold",
|
|
105
|
-
fontSize: ".7rem",
|
|
106
|
-
color: "red"
|
|
107
|
-
},
|
|
108
|
-
"& fieldset": {
|
|
109
|
-
display: "none"
|
|
110
166
|
}
|
|
111
|
-
}
|
|
167
|
+
};
|
|
112
168
|
};
|
|
113
169
|
const PuiStandardDateField = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
114
170
|
let {
|
|
@@ -160,25 +216,29 @@ const PuiStandardDateField = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
160
216
|
slotProps: {
|
|
161
217
|
textField: {
|
|
162
218
|
name,
|
|
163
|
-
sx:
|
|
219
|
+
sx: theme => getTextFieldStyles(theme, required),
|
|
164
220
|
fullWidth,
|
|
165
221
|
required,
|
|
166
222
|
error,
|
|
167
|
-
helperText
|
|
223
|
+
helperText,
|
|
224
|
+
className: required ? "required" : ""
|
|
168
225
|
},
|
|
169
226
|
popper: {
|
|
170
|
-
sx: {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
227
|
+
sx: theme => {
|
|
228
|
+
const themePalette = getPalette(theme);
|
|
229
|
+
return {
|
|
230
|
+
"& .MuiPaper-root": {
|
|
231
|
+
boxShadow: "none !important",
|
|
232
|
+
border: "1px solid #e0e0e0",
|
|
233
|
+
backgroundColor: "white"
|
|
234
|
+
},
|
|
235
|
+
"& .MuiPickersDay-root.Mui-selected": {
|
|
236
|
+
backgroundColor: "".concat(themePalette.primary, " !important")
|
|
237
|
+
},
|
|
238
|
+
"& .Mui-selected": {
|
|
239
|
+
backgroundColor: "".concat(themePalette.primary, " !important")
|
|
240
|
+
}
|
|
241
|
+
};
|
|
182
242
|
}
|
|
183
243
|
}
|
|
184
244
|
}
|