@portnet/ui 0.1.24 → 0.1.25
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.
|
@@ -7,14 +7,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
9
9
|
require("core-js/modules/es.symbol.description.js");
|
|
10
|
+
var _material = require("@mui/material");
|
|
10
11
|
var _styles = require("@mui/material/styles");
|
|
11
|
-
var
|
|
12
|
+
var _DatePicker = require("@mui/x-date-pickers/DatePicker");
|
|
12
13
|
var _formik = require("formik");
|
|
13
14
|
var _moment = _interopRequireDefault(require("moment"));
|
|
14
15
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
16
|
var React = _interopRequireWildcard(require("react"));
|
|
16
17
|
var _apperance = require("../../config/apperance");
|
|
18
|
+
var _PuiButton = _interopRequireDefault(require("../buttons/PuiButton"));
|
|
17
19
|
var _StyledMuiTextField = _interopRequireDefault(require("../common/StyledMuiTextField"));
|
|
20
|
+
var _PuiDialog = _interopRequireDefault(require("../others/PuiDialog"));
|
|
21
|
+
var _PuiTextField = _interopRequireDefault(require("./PuiTextField"));
|
|
18
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
23
|
const _excluded = ["id", "className", "sx", "label", "name", "required", "value", "minDate", "maxDate", "inputFormat", "format", "disablePast", "disableFuture", "error", "readOnly", "fullWidth", "disabled", "helperText", "onChange", "onBlur"],
|
|
20
24
|
_excluded2 = ["id", "className", "sx", "label", "name", "required", "value", "minDate", "maxDate", "inputFormat", "format", "disablePast", "disableFuture", "error", "readOnly", "fullWidth", "disabled", "helperText", "onChange", "onBlur"],
|
|
@@ -31,22 +35,101 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
31
35
|
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); }
|
|
32
36
|
const StyledDateMuiTextField = (0, _styles.styled)( /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_StyledMuiTextField.default, _objectSpread({
|
|
33
37
|
ref: ref
|
|
34
|
-
}, props))))(() => {
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
height: "16px"
|
|
44
|
-
}
|
|
38
|
+
}, props))))(() => ({
|
|
39
|
+
"&.MuiFormControl-root": {
|
|
40
|
+
display: "block",
|
|
41
|
+
"& .MuiInputAdornment-root .MuiButtonBase-root": {
|
|
42
|
+
padding: "6px",
|
|
43
|
+
marginRight: "-8px",
|
|
44
|
+
"& .MuiSvgIcon-root": {
|
|
45
|
+
width: "16px",
|
|
46
|
+
height: "16px"
|
|
45
47
|
}
|
|
46
48
|
}
|
|
49
|
+
}
|
|
50
|
+
}));
|
|
51
|
+
const TimePickerDialog = _ref => {
|
|
52
|
+
var _ref2, _ref3;
|
|
53
|
+
let {
|
|
54
|
+
open,
|
|
55
|
+
selectedDate,
|
|
56
|
+
onTimeSelected,
|
|
57
|
+
onClose,
|
|
58
|
+
position
|
|
59
|
+
} = _ref;
|
|
60
|
+
const defaultTime = (0, _moment.default)(selectedDate).isValid() ? (0, _moment.default)(selectedDate).format("HH:mm") : (0, _moment.default)().format("HH:mm");
|
|
61
|
+
const [selectedTime, setSelectedTime] = React.useState(defaultTime);
|
|
62
|
+
const handleTimeChange = event => {
|
|
63
|
+
setSelectedTime(event.target.value);
|
|
47
64
|
};
|
|
48
|
-
|
|
49
|
-
|
|
65
|
+
const handleOk = () => {
|
|
66
|
+
onTimeSelected(selectedTime);
|
|
67
|
+
onClose();
|
|
68
|
+
};
|
|
69
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiDialog.default, {
|
|
70
|
+
open: open,
|
|
71
|
+
onClose: onClose,
|
|
72
|
+
slotProps: {
|
|
73
|
+
backdrop: {
|
|
74
|
+
style: {
|
|
75
|
+
backgroundColor: "transparent",
|
|
76
|
+
boxShadow: "none"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
hideBackdrop: true,
|
|
81
|
+
PaperProps: {
|
|
82
|
+
elevation: 5,
|
|
83
|
+
sx: {
|
|
84
|
+
position: "fixed",
|
|
85
|
+
alignContent: "center",
|
|
86
|
+
justifyContent: "center",
|
|
87
|
+
alignItems: "center",
|
|
88
|
+
backgroundColor: "white",
|
|
89
|
+
height: 58,
|
|
90
|
+
width: 340,
|
|
91
|
+
maxWidth: "720px!important",
|
|
92
|
+
left: (_ref2 = (position === null || position === void 0 ? void 0 : position.left) - 420 / 2) !== null && _ref2 !== void 0 ? _ref2 : 0,
|
|
93
|
+
top: (_ref3 = (position === null || position === void 0 ? void 0 : position.top) + 36) !== null && _ref3 !== void 0 ? _ref3 : 36
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
97
|
+
sx: {
|
|
98
|
+
display: "flex",
|
|
99
|
+
gap: 1
|
|
100
|
+
},
|
|
101
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiTextField.default, {
|
|
102
|
+
id: "time",
|
|
103
|
+
type: "time",
|
|
104
|
+
value: selectedTime,
|
|
105
|
+
onChange: handleTimeChange,
|
|
106
|
+
InputLabelProps: {
|
|
107
|
+
shrink: true
|
|
108
|
+
},
|
|
109
|
+
inputProps: {
|
|
110
|
+
step: 60
|
|
111
|
+
},
|
|
112
|
+
formik: false,
|
|
113
|
+
sx: {
|
|
114
|
+
width: 150
|
|
115
|
+
}
|
|
116
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiButton.default, {
|
|
117
|
+
onClick: onClose,
|
|
118
|
+
sx: {
|
|
119
|
+
color: _apperance.palette.primary
|
|
120
|
+
},
|
|
121
|
+
children: "Cancel"
|
|
122
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiButton.default, {
|
|
123
|
+
onClick: handleOk,
|
|
124
|
+
sx: {
|
|
125
|
+
color: _apperance.palette.primary
|
|
126
|
+
},
|
|
127
|
+
children: "OK"
|
|
128
|
+
})]
|
|
129
|
+
})
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
const PuiStandardDateTimeField = /*#__PURE__*/React.forwardRef((_ref4, ref) => {
|
|
50
133
|
let {
|
|
51
134
|
id,
|
|
52
135
|
className,
|
|
@@ -57,8 +140,8 @@ const PuiStandardDateTimeField = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
57
140
|
value,
|
|
58
141
|
minDate,
|
|
59
142
|
maxDate,
|
|
60
|
-
inputFormat,
|
|
61
|
-
format,
|
|
143
|
+
inputFormat = "YYYY-MM-DDTHH:mm:ss.SSSZ",
|
|
144
|
+
format = "YYYY-MM-DDTHH:mm:ss.SSSZ",
|
|
62
145
|
disablePast,
|
|
63
146
|
disableFuture,
|
|
64
147
|
error,
|
|
@@ -68,50 +151,94 @@ const PuiStandardDateTimeField = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
68
151
|
helperText,
|
|
69
152
|
onChange,
|
|
70
153
|
onBlur
|
|
71
|
-
} =
|
|
72
|
-
rest = _objectWithoutProperties(
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
154
|
+
} = _ref4,
|
|
155
|
+
rest = _objectWithoutProperties(_ref4, _excluded);
|
|
156
|
+
const textFieldRef = React.useRef(null);
|
|
157
|
+
const [dateTime, setDateTime] = React.useState(value || null);
|
|
158
|
+
const minDateObj = minDate ? (0, _moment.default)(minDate, format).toDate() : undefined;
|
|
159
|
+
const maxDateObj = maxDate ? (0, _moment.default)(maxDate, format).toDate() : undefined;
|
|
160
|
+
const [displayedDateTime, setDisplayedDateTime] = React.useState(value || null);
|
|
161
|
+
const [openTimePicker, setOpenTimePicker] = React.useState(false);
|
|
162
|
+
const [dialogPosition, setDialogPosition] = React.useState();
|
|
163
|
+
const handleDateChange = date => {
|
|
164
|
+
if (date) {
|
|
165
|
+
setDateTime((0, _moment.default)(date).format(format));
|
|
166
|
+
setOpenTimePicker(true);
|
|
167
|
+
}
|
|
76
168
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
"& .MuiButtonBase-root.Mui-selected, & .MuiButtonBase-root.Mui-selected:focus, & .MuiButtonBase-root.Mui-selected:hover": {
|
|
94
|
-
backgroundColor: _apperance.palette.primary
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
renderInput: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledDateMuiTextField, _objectSpread(_objectSpread({
|
|
99
|
-
id: id,
|
|
100
|
-
className: className,
|
|
101
|
-
name: name,
|
|
102
|
-
required: required,
|
|
103
|
-
fullWidth: fullWidth,
|
|
104
|
-
onBlur: onBlur,
|
|
105
|
-
helperText: helperText
|
|
106
|
-
}, params), {}, {
|
|
107
|
-
error: params.error || error,
|
|
108
|
-
inputProps: {
|
|
109
|
-
name
|
|
169
|
+
const handleTimeSelected = time => {
|
|
170
|
+
const newDateTime = (0, _moment.default)(dateTime).format("YYYY-MM-DD") + "T" + time;
|
|
171
|
+
const updatedDateTime = (0, _moment.default)(newDateTime, "YYYY-MM-DDTHH:mm").format(format);
|
|
172
|
+
setDateTime(updatedDateTime);
|
|
173
|
+
setDisplayedDateTime(updatedDateTime);
|
|
174
|
+
onChange(updatedDateTime);
|
|
175
|
+
};
|
|
176
|
+
React.useEffect(() => {
|
|
177
|
+
const updatePosition = () => {
|
|
178
|
+
if (textFieldRef !== null && textFieldRef !== void 0 && textFieldRef.current) {
|
|
179
|
+
const rect = textFieldRef.current.getBoundingClientRect();
|
|
180
|
+
console.log("rect : ", rect);
|
|
181
|
+
setDialogPosition({
|
|
182
|
+
left: rect.left + rect.width / 2 + window.scrollX,
|
|
183
|
+
top: rect.top > 310 ? rect.top - 80 : rect.top + 80
|
|
184
|
+
});
|
|
110
185
|
}
|
|
111
|
-
}
|
|
112
|
-
|
|
186
|
+
};
|
|
187
|
+
updatePosition();
|
|
188
|
+
window.addEventListener("resize", updatePosition);
|
|
189
|
+
window.addEventListener("scroll", updatePosition);
|
|
190
|
+
return () => {
|
|
191
|
+
window.removeEventListener("resize", updatePosition);
|
|
192
|
+
window.removeEventListener("scroll", updatePosition);
|
|
193
|
+
};
|
|
194
|
+
}, []);
|
|
195
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
196
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_DatePicker.DatePicker, _objectSpread({
|
|
197
|
+
ref: textFieldRef,
|
|
198
|
+
sx: sx,
|
|
199
|
+
ampm: false,
|
|
200
|
+
label: label,
|
|
201
|
+
inputFormat: "DD/MM/yyyy HH:mm",
|
|
202
|
+
value: displayedDateTime,
|
|
203
|
+
onChange: handleDateChange,
|
|
204
|
+
disablePast: disablePast,
|
|
205
|
+
disableFuture: disableFuture,
|
|
206
|
+
disabled: disabled,
|
|
207
|
+
maxDate: maxDateObj,
|
|
208
|
+
minDate: minDateObj,
|
|
209
|
+
readOnly: readOnly,
|
|
210
|
+
PopperProps: {
|
|
211
|
+
sx: {
|
|
212
|
+
"& .MuiButtonBase-root.Mui-selected, & .MuiButtonBase-root.Mui-selected:focus, & .MuiButtonBase-root.Mui-selected:hover": {
|
|
213
|
+
backgroundColor: _apperance.palette.primary
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
renderInput: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledDateMuiTextField, _objectSpread(_objectSpread({}, params), {}, {
|
|
218
|
+
ref: textFieldRef,
|
|
219
|
+
id: id,
|
|
220
|
+
className: className,
|
|
221
|
+
label: label,
|
|
222
|
+
name: name,
|
|
223
|
+
required: required,
|
|
224
|
+
fullWidth: fullWidth,
|
|
225
|
+
onBlur: onBlur,
|
|
226
|
+
helperText: helperText,
|
|
227
|
+
error: error,
|
|
228
|
+
inputProps: _objectSpread(_objectSpread({}, params.inputProps), {}, {
|
|
229
|
+
readOnly: readOnly
|
|
230
|
+
})
|
|
231
|
+
}))
|
|
232
|
+
}, rest)), /*#__PURE__*/(0, _jsxRuntime.jsx)(TimePickerDialog, {
|
|
233
|
+
open: openTimePicker,
|
|
234
|
+
selectedDate: dateTime,
|
|
235
|
+
onTimeSelected: handleTimeSelected,
|
|
236
|
+
onClose: () => setOpenTimePicker(false),
|
|
237
|
+
position: dialogPosition
|
|
238
|
+
})]
|
|
239
|
+
});
|
|
113
240
|
});
|
|
114
|
-
const PuiFormikDateTimeField = /*#__PURE__*/React.forwardRef((
|
|
241
|
+
const PuiFormikDateTimeField = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
115
242
|
let {
|
|
116
243
|
id,
|
|
117
244
|
className,
|
|
@@ -133,11 +260,13 @@ const PuiFormikDateTimeField = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
133
260
|
helperText,
|
|
134
261
|
onChange,
|
|
135
262
|
onBlur
|
|
136
|
-
} =
|
|
137
|
-
rest = _objectWithoutProperties(
|
|
263
|
+
} = _ref5,
|
|
264
|
+
rest = _objectWithoutProperties(_ref5, _excluded2);
|
|
138
265
|
const [field, meta] = (0, _formik.useField)(name);
|
|
139
266
|
const formikContext = (0, _formik.useFormikContext)();
|
|
140
267
|
const [hasError, setHasError] = React.useState(false);
|
|
268
|
+
const minDateObj = minDate ? (0, _moment.default)(minDate, format).toDate() : undefined;
|
|
269
|
+
const maxDateObj = maxDate ? (0, _moment.default)(maxDate, format).toDate() : undefined;
|
|
141
270
|
const handleChange = value => {
|
|
142
271
|
formikContext.setFieldValue(name, value);
|
|
143
272
|
onChange(value);
|
|
@@ -165,7 +294,8 @@ const PuiFormikDateTimeField = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
165
294
|
required: required,
|
|
166
295
|
value: Boolean(field.value) ? format ? _moment.default.utc(field.value, format) : _moment.default.utc(field.value) : null,
|
|
167
296
|
format: format,
|
|
168
|
-
minDate:
|
|
297
|
+
minDate: minDateObj,
|
|
298
|
+
maxDate: maxDateObj,
|
|
169
299
|
inputFormat: inputFormat,
|
|
170
300
|
disableFuture: disableFuture,
|
|
171
301
|
disablePast: disablePast,
|
|
@@ -178,7 +308,7 @@ const PuiFormikDateTimeField = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
178
308
|
onBlur: handleBlur
|
|
179
309
|
}, rest));
|
|
180
310
|
});
|
|
181
|
-
const PuiDateTimeField = /*#__PURE__*/React.forwardRef((
|
|
311
|
+
const PuiDateTimeField = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
|
|
182
312
|
let {
|
|
183
313
|
formik,
|
|
184
314
|
id,
|
|
@@ -201,8 +331,8 @@ const PuiDateTimeField = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
201
331
|
helperText,
|
|
202
332
|
onChange,
|
|
203
333
|
onBlur
|
|
204
|
-
} =
|
|
205
|
-
rest = _objectWithoutProperties(
|
|
334
|
+
} = _ref6,
|
|
335
|
+
rest = _objectWithoutProperties(_ref6, _excluded3);
|
|
206
336
|
return /*#__PURE__*/React.createElement(formik ? PuiFormikDateTimeField : PuiStandardDateTimeField, _objectSpread({
|
|
207
337
|
ref,
|
|
208
338
|
id,
|
|
@@ -15,7 +15,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
15
15
|
var _apperance = require("../../config/apperance");
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
const _excluded = ["baseId", "children", "value", "index"],
|
|
18
|
-
_excluded2 = ["id", "className", "sx", "variant", "centered", "children"];
|
|
18
|
+
_excluded2 = ["id", "className", "sx", "variant", "centered", "children"]; // Define TabPanel component
|
|
19
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
20
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -48,39 +48,47 @@ const TabPanel = _ref => {
|
|
|
48
48
|
})
|
|
49
49
|
}));
|
|
50
50
|
};
|
|
51
|
+
TabPanel.propTypes = {
|
|
52
|
+
baseId: _propTypes.default.string.isRequired,
|
|
53
|
+
children: _propTypes.default.node,
|
|
54
|
+
value: _propTypes.default.number.isRequired,
|
|
55
|
+
index: _propTypes.default.number.isRequired
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
// Define function to get Tab properties
|
|
51
59
|
const getTabProps = (baseId, index) => {
|
|
52
60
|
return {
|
|
53
61
|
id: "".concat(baseId, "-").concat(index),
|
|
54
62
|
"aria-controls": "".concat(baseId, "panel-").concat(index)
|
|
55
63
|
};
|
|
56
64
|
};
|
|
65
|
+
|
|
66
|
+
// Define styled Tabs component
|
|
57
67
|
const StyledTabs = (0, _styles.styled)( /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tabs, _objectSpread({
|
|
58
68
|
ref: ref
|
|
59
|
-
}, props))))(() => {
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
},
|
|
78
|
-
"&.Mui-focusVisible": {
|
|
79
|
-
backgroundColor: "#d1eaff"
|
|
80
|
-
}
|
|
69
|
+
}, props))))(() => ({
|
|
70
|
+
"&.MuiTabs-root": {
|
|
71
|
+
"& .MuiTab-root": {
|
|
72
|
+
fontWeight: "600",
|
|
73
|
+
fontSize: ".8rem",
|
|
74
|
+
borderRadius: "8px",
|
|
75
|
+
// Make tabs rounded
|
|
76
|
+
margin: "0 4px",
|
|
77
|
+
// Add space between tabs
|
|
78
|
+
minHeight: "36px" // Adjust minimum height if necessary
|
|
79
|
+
},
|
|
80
|
+
"& .Mui-selected": {
|
|
81
|
+
color: "#fff",
|
|
82
|
+
// Change this to white for selected tab text
|
|
83
|
+
background: "#1976d2" // Change this to blue for selected tab background
|
|
84
|
+
},
|
|
85
|
+
"& .MuiTabs-indicator": {
|
|
86
|
+
backgroundColor: "transparent" // Make the indicator transparent
|
|
81
87
|
}
|
|
82
|
-
}
|
|
83
|
-
});
|
|
88
|
+
}
|
|
89
|
+
}));
|
|
90
|
+
|
|
91
|
+
// Define PuiTabs component
|
|
84
92
|
const PuiTabs = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
85
93
|
let {
|
|
86
94
|
id,
|
|
@@ -103,7 +111,7 @@ const PuiTabs = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
103
111
|
ref: ref,
|
|
104
112
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
105
113
|
sx: {
|
|
106
|
-
borderBottom: "
|
|
114
|
+
borderBottom: "1px solid ".concat(_apperance.palette.gray.dark) // Adjust border bottom
|
|
107
115
|
},
|
|
108
116
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledTabs, _objectSpread(_objectSpread({
|
|
109
117
|
value: value,
|
|
@@ -136,7 +144,8 @@ PuiTabs.propTypes = {
|
|
|
136
144
|
className: _propTypes.default.string,
|
|
137
145
|
sx: _propTypes.default.object,
|
|
138
146
|
variant: _propTypes.default.oneOf(["fullWidth", "scrollable", "standard"]),
|
|
139
|
-
centered: _propTypes.default.bool
|
|
147
|
+
centered: _propTypes.default.bool,
|
|
148
|
+
children: _propTypes.default.node.isRequired
|
|
140
149
|
};
|
|
141
150
|
PuiTabs.defaultProps = {
|
|
142
151
|
variant: "standard",
|
|
@@ -314,14 +314,14 @@ const PuiTable = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
314
314
|
sx: {
|
|
315
315
|
display: 'flex',
|
|
316
316
|
gap: '8px',
|
|
317
|
-
|
|
318
|
-
|
|
317
|
+
// Adjust the space between icons as needed
|
|
318
|
+
flexWrap: 'wrap',
|
|
319
|
+
// Keep icons on the same line; remove if you want them to wrap
|
|
319
320
|
justifyContent: 'center',
|
|
321
|
+
// Center the icons horizontally
|
|
320
322
|
alignItems: 'center',
|
|
321
|
-
|
|
322
|
-
//
|
|
323
|
-
textOverflow: 'ellipsis',
|
|
324
|
-
whiteSpace: 'nowrap'
|
|
323
|
+
// Align icons vertically
|
|
324
|
+
minWidth: 0 // Prevent the flex container from stretching past its content width
|
|
325
325
|
},
|
|
326
326
|
children: actions.map((action, index) => /*#__PURE__*/React.cloneElement(action, {
|
|
327
327
|
row,
|