@portnet/ui 0.1.38 → 0.1.41
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 +15 -11
- package/dist/components/buttons/PuiIconButton.js +11 -7
- package/dist/components/common/PuiAlertContext.js +1 -1
- package/dist/components/common/StyledMuiButton.js +11 -7
- package/dist/components/common/StyledMuiTextField.js +12 -8
- package/dist/components/inputs/PuiAutocomplete.js +13 -8
- package/dist/components/inputs/PuiCheckbox.js +13 -10
- package/dist/components/inputs/PuiCheckboxGroup.js +8 -6
- package/dist/components/inputs/PuiCheckboxItem.js +11 -7
- package/dist/components/inputs/PuiDateField.js +12 -8
- package/dist/components/inputs/PuiDateTimeField.js +65 -263
- package/dist/components/inputs/PuiFileField.js +13 -9
- package/dist/components/inputs/PuiRadioGroup.js +11 -7
- package/dist/components/inputs/PuiRadioItem.js +8 -6
- package/dist/components/inputs/PuiSelect.js +14 -9
- package/dist/components/inputs/PuiTextField.js +11 -7
- package/dist/components/others/DateTimePickerField.js +381 -0
- package/dist/components/others/PuiBadge.js +6 -4
- package/dist/components/others/PuiChip.js +22 -43
- package/dist/components/others/PuiDialog.js +11 -7
- package/dist/components/others/PuiFormikForm.js +1 -1
- package/dist/components/others/PuiGrid.js +5 -3
- package/dist/components/others/PuiIcon.js +11 -7
- package/dist/components/others/PuiLoadingBackdrop.js +1 -1
- package/dist/components/others/PuiMainContainer.js +10 -6
- package/dist/components/others/PuiNavigation.js +7 -5
- package/dist/components/others/PuiSection.js +8 -6
- package/dist/components/others/PuiTooltip.js +12 -8
- package/dist/components/others/custom-datepicker.css +227 -0
- package/dist/components/providers/PuiAlertProvider.js +10 -7
- package/dist/components/providers/PuiLocalizationProvider.js +9 -5
- package/dist/components/referentiel/common/ReferetielContext.js +1 -1
- package/dist/components/referentiel/common/constants/specificReferentielsBaseFilters.js +1 -1
- package/dist/components/referentiel/common/constants/specificReferentielsValidationSchemas.js +1 -1
- package/dist/components/referentiel/components/PuiBasePopupReferentielField.js +7 -5
- package/dist/components/referentiel/components/PuiCustomPopupReferentielField.js +7 -5
- package/dist/components/referentiel/components/PuiSimplePopupReferentielField.js +8 -5
- package/dist/components/referentiel/components/PuiSimpleReferentielField.js +13 -8
- package/dist/components/referentiel/components/PuiSpecificReferentielField.js +10 -7
- package/dist/components/referentiel/providers/PuiReferentielProvider.js +7 -5
- package/dist/components/tab/PuiTab.js +1 -1
- package/dist/components/tab/PuiTabs.js +15 -9
- package/dist/components/table/ActionPopover.js +2 -1
- package/dist/components/table/PuiTable.js +265 -148
- package/dist/components/table/PuiTableAction.js +6 -4
- package/dist/components/typography/PuiDefinition.js +1 -1
- package/dist/components/typography/PuiIndication.js +7 -5
- package/dist/components/typography/PuiMainTitle.js +8 -5
- package/dist/components/ui/dialogs/PuiSearchDialog.js +11 -7
- package/dist/components/ui/pages/errors/PuiErrorBasePage.js +1 -1
- package/dist/components/ui/pages/errors/PuiForbiddenErrorPage.js +1 -1
- package/dist/components/ui/pages/errors/PuiNetworkErrorPage.js +1 -1
- package/dist/components/ui/pages/errors/PuiNotFoundErrorPage.js +1 -1
- package/dist/components/ui/pages/errors/PuiServerErrorPage.js +1 -1
- package/dist/components/ui/pages/general/PuiDefaultPage.js +1 -1
- package/dist/components/ui/pages/general/PuiSearchPage.js +94 -129
- package/dist/config/mapping.js +1 -1
- package/dist/hooks/useAlert.js +2 -2
- package/dist/hooks/useAxios.js +1 -1
- package/dist/hooks/useQuery.js +4 -2
- package/dist/index.js +1 -1
- package/package.json +4 -1
- package/dist/components/referentiel/components/PuiGenericReferentielField.js +0 -331
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.
|
|
3
|
+
require("core-js/modules/es.array.includes.js");
|
|
4
|
+
require("core-js/modules/es.string.includes.js");
|
|
4
5
|
require("core-js/modules/es.weak-map.js");
|
|
6
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
7
|
+
require("core-js/modules/esnext.iterator.filter.js");
|
|
8
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
|
5
9
|
Object.defineProperty(exports, "__esModule", {
|
|
6
10
|
value: true
|
|
7
11
|
});
|
|
@@ -17,15 +21,15 @@ const _excluded = ["id", "className", "label", "name", "type", "value", "disable
|
|
|
17
21
|
_excluded2 = ["id", "className", "label", "name", "type", "value", "disabled", "required", "helperText", "error", "focused", "consultation", "readOnly", "fullWidth", "sx", "multiline", "rows", "maxRows", "minRows", "onChange", "onClick", "onBlur", "InputProps"],
|
|
18
22
|
_excluded3 = ["formik", "id", "className", "sx", "label", "name", "type", "value", "disabled", "required", "helperText", "error", "focused", "consultation", "readOnly", "fullWidth", "multiline", "rows", "maxRows", "minRows", "InputProps", "onChange", "onClick", "onBlur"];
|
|
19
23
|
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
|
-
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 &&
|
|
21
|
-
function _interopRequireDefault(
|
|
24
|
+
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 && {}.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; }
|
|
25
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22
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; }
|
|
23
27
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
|
-
function _defineProperty(
|
|
25
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i :
|
|
28
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
29
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
26
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); }
|
|
27
|
-
function _objectWithoutProperties(
|
|
28
|
-
function _objectWithoutPropertiesLoose(
|
|
31
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
32
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
29
33
|
const PuiStandardTextField = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
30
34
|
let {
|
|
31
35
|
id,
|
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.weak-map.js");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
require("core-js/modules/es.parse-int.js");
|
|
9
|
+
require("core-js/modules/es.regexp.exec.js");
|
|
10
|
+
require("core-js/modules/es.regexp.test.js");
|
|
11
|
+
require("core-js/modules/es.regexp.to-string.js");
|
|
12
|
+
require("core-js/modules/esnext.iterator.map.js");
|
|
13
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
14
|
+
var _AccessTime = _interopRequireDefault(require("@mui/icons-material/AccessTime"));
|
|
15
|
+
var _CalendarMonth = _interopRequireDefault(require("@mui/icons-material/CalendarMonth"));
|
|
16
|
+
var _material = require("@mui/material");
|
|
17
|
+
var _InputAdornment = _interopRequireDefault(require("@mui/material/InputAdornment"));
|
|
18
|
+
var _reactDatepicker = _interopRequireWildcard(require("@trendmicro/react-datepicker"));
|
|
19
|
+
var _formik = require("formik");
|
|
20
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
21
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
22
|
+
var _PuiButton = _interopRequireDefault(require("../buttons/PuiButton"));
|
|
23
|
+
var _PuiTextField = _interopRequireDefault(require("../inputs/PuiTextField"));
|
|
24
|
+
require("./custom-datepicker.css");
|
|
25
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
26
|
+
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); }
|
|
27
|
+
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 && {}.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; }
|
|
28
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
29
|
+
const DateTimePickerField = _ref => {
|
|
30
|
+
let {
|
|
31
|
+
label,
|
|
32
|
+
name,
|
|
33
|
+
format = "DD/MM/YYYY HH:mm:ss",
|
|
34
|
+
onChange,
|
|
35
|
+
minDate,
|
|
36
|
+
maxDate,
|
|
37
|
+
value,
|
|
38
|
+
required = false,
|
|
39
|
+
error = false,
|
|
40
|
+
helperText = null
|
|
41
|
+
} = _ref;
|
|
42
|
+
const [anchorEl, setAnchorEl] = (0, _react.useState)(null);
|
|
43
|
+
const [timeAnchorEl, setTimeAnchorEl] = (0, _react.useState)(null);
|
|
44
|
+
const [renderedValue, setRenderedValue] = (0, _react.useState)(null);
|
|
45
|
+
const [field] = (0, _formik.useField)(name);
|
|
46
|
+
const [selectedDate, setSelectedDate] = (0, _react.useState)(value ? (0, _moment.default)(value, format === "DD/MM/YYYY HH:mm" ? "YYYY-MM-DD HH:mm" : "YYYY-MM-DD HH:mm:ss", true).isValid() ? (0, _moment.default)(value).format("YYYY-MM-DD") : (0, _moment.default)().format("YYYY-MM-DD") : (0, _moment.default)().format("YYYY-MM-DD"));
|
|
47
|
+
const [selectedTime, setSelectedTime] = (0, _react.useState)(value ? (0, _moment.default)(value, format === "DD/MM/YYYY HH:mm" ? "YYYY-MM-DD HH:mm" : "YYYY-MM-DD HH:mm:ss", true).isValid() ? format === "DD/MM/YYYY HH:mm" ? (0, _moment.default)(value).format("HH:mm") : (0, _moment.default)(value).format("HH:mm:ss") : format === "DD/MM/YYYY HH:mm" ? (0, _moment.default)(value).format("HH:mm") : (0, _moment.default)(value).format("HH:mm:ss") : format === "DD/MM/YYYY HH:mm" ? (0, _moment.default)(value).format("HH:mm") : (0, _moment.default)(value).format("HH:mm:ss"));
|
|
48
|
+
const [selectedHour, setSelectedHour] = (0, _react.useState)((0, _moment.default)(selectedTime, format === "DD/MM/YYYY HH:mm" ? "HH:mm" : "HH:mm:ss").format("HH"));
|
|
49
|
+
const [selectedMinute, setSelectedMinute] = (0, _react.useState)((0, _moment.default)(selectedTime, format === "DD/MM/YYYY HH:mm" ? "HH:mm" : "HH:mm:ss").format("mm"));
|
|
50
|
+
const [selectedSecond, setSelectedSecond] = (0, _react.useState)((0, _moment.default)(selectedTime, format === "DD/MM/YYYY HH:mm" ? "HH:mm" : "HH:mm:ss").format("ss"));
|
|
51
|
+
const openDatePopover = Boolean(anchorEl);
|
|
52
|
+
const openTimePopover = Boolean(timeAnchorEl);
|
|
53
|
+
(0, _react.useEffect)(() => {
|
|
54
|
+
const parsedDate = (0, _moment.default)(value);
|
|
55
|
+
const datePart = parsedDate.format(format.split(" ")[0]);
|
|
56
|
+
const timePart = parsedDate.format(format === "DD/MM/YYYY HH:mm:ss" ? "HH:mm:ss" : "HH:mm");
|
|
57
|
+
const valueToRender = "".concat(datePart, " ").concat(timePart);
|
|
58
|
+
setRenderedValue(valueToRender);
|
|
59
|
+
}, [value, format]);
|
|
60
|
+
const handleDateTimeClick = event => setAnchorEl(event.currentTarget);
|
|
61
|
+
const handleTimeClick = event => {
|
|
62
|
+
setTimeAnchorEl(event.currentTarget);
|
|
63
|
+
};
|
|
64
|
+
const handleDateClose = () => setAnchorEl(null);
|
|
65
|
+
const handleTimeClose = () => setTimeAnchorEl(null);
|
|
66
|
+
const updateCombinedDateTime = (newDate, newTime) => {
|
|
67
|
+
const combinedDateTime = (0, _moment.default)("".concat(newDate, " ").concat(newTime), format === "DD/MM/YYYY HH:mm:ss" ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD HH:mm", true).toISOString();
|
|
68
|
+
if ((0, _moment.default)(combinedDateTime).isValid()) {
|
|
69
|
+
onChange(combinedDateTime);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const handleDateChange = date => {
|
|
73
|
+
setSelectedDate(date);
|
|
74
|
+
updateCombinedDateTime(date, selectedTime);
|
|
75
|
+
};
|
|
76
|
+
const handleHourChange = event => {
|
|
77
|
+
const newHour = event.target.value;
|
|
78
|
+
setSelectedHour(newHour);
|
|
79
|
+
let newTime = "".concat(newHour, ":").concat(selectedMinute);
|
|
80
|
+
if (format === "DD/MM/YYYY HH:mm:ss") {
|
|
81
|
+
newTime = "".concat(newHour, ":").concat(selectedMinute, ":").concat(selectedSecond);
|
|
82
|
+
}
|
|
83
|
+
setSelectedTime(newTime);
|
|
84
|
+
updateCombinedDateTime(selectedDate, newTime);
|
|
85
|
+
};
|
|
86
|
+
const handleMinuteChange = event => {
|
|
87
|
+
const newMinute = event.target.value;
|
|
88
|
+
setSelectedMinute(newMinute);
|
|
89
|
+
let newTime = "".concat(selectedHour, ":").concat(newMinute);
|
|
90
|
+
if (format === "DD/MM/YYYY HH:mm:ss") {
|
|
91
|
+
newTime = "".concat(selectedHour, ":").concat(newMinute, ":").concat(selectedSecond);
|
|
92
|
+
}
|
|
93
|
+
setSelectedTime(newTime);
|
|
94
|
+
updateCombinedDateTime(selectedDate, newTime);
|
|
95
|
+
};
|
|
96
|
+
const handleSecondChange = event => {
|
|
97
|
+
const newSecond = event.target.value;
|
|
98
|
+
setSelectedSecond(newSecond);
|
|
99
|
+
let newTime = "".concat(selectedHour, ":").concat(selectedMinute, ":").concat(newSecond);
|
|
100
|
+
setSelectedTime(newTime);
|
|
101
|
+
updateCombinedDateTime(selectedDate, newTime);
|
|
102
|
+
};
|
|
103
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
104
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiTextField.default, {
|
|
105
|
+
name: name,
|
|
106
|
+
label: label,
|
|
107
|
+
value: renderedValue,
|
|
108
|
+
onClick: handleDateTimeClick,
|
|
109
|
+
readOnly: true,
|
|
110
|
+
error: error,
|
|
111
|
+
helperText: helperText,
|
|
112
|
+
required: required,
|
|
113
|
+
InputProps: {
|
|
114
|
+
endAdornment: /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputAdornment.default, {
|
|
115
|
+
position: "end",
|
|
116
|
+
style: {
|
|
117
|
+
marginLeft: -10,
|
|
118
|
+
marginTop: "-0.1px"
|
|
119
|
+
},
|
|
120
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CalendarMonth.default, {
|
|
121
|
+
fontSize: "small"
|
|
122
|
+
})
|
|
123
|
+
})
|
|
124
|
+
}
|
|
125
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Popover, {
|
|
126
|
+
open: openDatePopover,
|
|
127
|
+
anchorEl: anchorEl,
|
|
128
|
+
onClose: handleDateClose,
|
|
129
|
+
anchorOrigin: {
|
|
130
|
+
vertical: "bottom",
|
|
131
|
+
horizontal: "left"
|
|
132
|
+
},
|
|
133
|
+
style: {
|
|
134
|
+
width: "310px"
|
|
135
|
+
},
|
|
136
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
137
|
+
style: {
|
|
138
|
+
padding: 16
|
|
139
|
+
},
|
|
140
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
141
|
+
sx: {
|
|
142
|
+
display: "flex",
|
|
143
|
+
alignItems: "center",
|
|
144
|
+
justifyContent: "space-around"
|
|
145
|
+
},
|
|
146
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactDatepicker.DateInput, {
|
|
147
|
+
value: selectedDate,
|
|
148
|
+
onChange: date => handleDateChange(date)
|
|
149
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TextField, {
|
|
150
|
+
value: selectedTime,
|
|
151
|
+
onChange: event => {
|
|
152
|
+
const inputValue = event.target.value;
|
|
153
|
+
const allowedChars = format === "DD/MM/YYYY HH:mm" ? /^[0-9:]{0,5}$/ : /^[0-9:]{0,8}$/;
|
|
154
|
+
if (allowedChars.test(inputValue)) {
|
|
155
|
+
setSelectedTime(inputValue);
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
onBlur: () => {
|
|
159
|
+
const timeParts = selectedTime.split(":");
|
|
160
|
+
const isFullFormat = format === "DD/MM/YYYY HH:mm:ss";
|
|
161
|
+
let [validatedHour, validatedMinute, validatedSecond] = ["00", "00", isFullFormat ? "00" : undefined];
|
|
162
|
+
if (timeParts.length > 0) {
|
|
163
|
+
validatedHour = Math.min(23, parseInt(timeParts[0] || "0", 10)).toString().padStart(2, "0");
|
|
164
|
+
}
|
|
165
|
+
if (timeParts.length > 1) {
|
|
166
|
+
validatedMinute = Math.min(59, parseInt(timeParts[1] || "0", 10)).toString().padStart(2, "0");
|
|
167
|
+
}
|
|
168
|
+
if (isFullFormat && timeParts.length > 2) {
|
|
169
|
+
validatedSecond = Math.min(59, parseInt(timeParts[2] || "0", 10)).toString().padStart(2, "0");
|
|
170
|
+
}
|
|
171
|
+
const updatedTime = isFullFormat ? "".concat(validatedHour, ":").concat(validatedMinute, ":").concat(validatedSecond) : "".concat(validatedHour, ":").concat(validatedMinute);
|
|
172
|
+
setSelectedTime(updatedTime);
|
|
173
|
+
updateCombinedDateTime(selectedDate, updatedTime);
|
|
174
|
+
},
|
|
175
|
+
sx: {
|
|
176
|
+
"& .MuiInputBase-root": {
|
|
177
|
+
width: "100%",
|
|
178
|
+
fontSize: 12.5
|
|
179
|
+
},
|
|
180
|
+
"& .MuiOutlinedInput-input": {
|
|
181
|
+
padding: "4px",
|
|
182
|
+
height: "23.5px"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
InputProps: {
|
|
186
|
+
startAdornment: /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputAdornment.default, {
|
|
187
|
+
onClick: handleTimeClick,
|
|
188
|
+
position: "start",
|
|
189
|
+
style: {
|
|
190
|
+
marginLeft: -10,
|
|
191
|
+
cursor: "pointer"
|
|
192
|
+
},
|
|
193
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_AccessTime.default, {
|
|
194
|
+
fontSize: "small"
|
|
195
|
+
})
|
|
196
|
+
})
|
|
197
|
+
}
|
|
198
|
+
})]
|
|
199
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactDatepicker.default, {
|
|
200
|
+
date: selectedDate,
|
|
201
|
+
onSelect: date => handleDateChange(date),
|
|
202
|
+
minDate: minDate,
|
|
203
|
+
maxDate: maxDate
|
|
204
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
205
|
+
sx: {
|
|
206
|
+
textAlign: "right",
|
|
207
|
+
padding: 1
|
|
208
|
+
},
|
|
209
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiButton.default, {
|
|
210
|
+
onClick: handleDateClose,
|
|
211
|
+
children: "Choisir"
|
|
212
|
+
})
|
|
213
|
+
})]
|
|
214
|
+
})
|
|
215
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Popover, {
|
|
216
|
+
open: openTimePopover,
|
|
217
|
+
anchorEl: timeAnchorEl,
|
|
218
|
+
onClose: handleTimeClose,
|
|
219
|
+
anchorOrigin: {
|
|
220
|
+
vertical: "bottom",
|
|
221
|
+
horizontal: "left"
|
|
222
|
+
},
|
|
223
|
+
style: {
|
|
224
|
+
marginTop: 16,
|
|
225
|
+
marginLeft: -4
|
|
226
|
+
},
|
|
227
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
228
|
+
style: {
|
|
229
|
+
padding: 4,
|
|
230
|
+
display: "flex",
|
|
231
|
+
justifyContent: "center",
|
|
232
|
+
width: "120px",
|
|
233
|
+
height: "25px"
|
|
234
|
+
},
|
|
235
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Select, {
|
|
236
|
+
value: selectedHour,
|
|
237
|
+
onChange: handleHourChange,
|
|
238
|
+
sx: {
|
|
239
|
+
padding: 0,
|
|
240
|
+
width: 40,
|
|
241
|
+
"& .MuiSelect-select": {
|
|
242
|
+
padding: "4px",
|
|
243
|
+
fontSize: 12.5
|
|
244
|
+
},
|
|
245
|
+
"& .MuiSvgIcon-root": {
|
|
246
|
+
width: "14px"
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
MenuProps: {
|
|
250
|
+
PaperProps: {
|
|
251
|
+
sx: {
|
|
252
|
+
maxHeight: "200px",
|
|
253
|
+
width: "20px",
|
|
254
|
+
"& ul": {
|
|
255
|
+
overflowY: "auto",
|
|
256
|
+
scrollbarWidth: "thin",
|
|
257
|
+
"&::-webkit-scrollbar": {
|
|
258
|
+
width: "6px",
|
|
259
|
+
backgroundColor: "#f0f0f0"
|
|
260
|
+
},
|
|
261
|
+
"&::-webkit-scrollbar-thumb": {
|
|
262
|
+
backgroundColor: "#888",
|
|
263
|
+
borderRadius: "4px"
|
|
264
|
+
},
|
|
265
|
+
"&::-webkit-scrollbar-thumb:hover": {
|
|
266
|
+
backgroundColor: "#555"
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
children: [...Array(24).keys()].map(hour => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
|
|
273
|
+
value: hour.toString().padStart(2, "0"),
|
|
274
|
+
style: {
|
|
275
|
+
fontSize: 12.5,
|
|
276
|
+
right: 12
|
|
277
|
+
},
|
|
278
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
279
|
+
children: hour.toString().padStart(2, "0")
|
|
280
|
+
})
|
|
281
|
+
}, hour))
|
|
282
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Select, {
|
|
283
|
+
value: selectedMinute,
|
|
284
|
+
onChange: handleMinuteChange,
|
|
285
|
+
sx: {
|
|
286
|
+
padding: 0,
|
|
287
|
+
width: 40,
|
|
288
|
+
"& .MuiSelect-select": {
|
|
289
|
+
padding: "4px",
|
|
290
|
+
fontSize: 12.5
|
|
291
|
+
},
|
|
292
|
+
"& .MuiSvgIcon-root": {
|
|
293
|
+
width: "14px"
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
MenuProps: {
|
|
297
|
+
PaperProps: {
|
|
298
|
+
sx: {
|
|
299
|
+
maxHeight: "200px",
|
|
300
|
+
width: "20px",
|
|
301
|
+
"& ul": {
|
|
302
|
+
overflowY: "auto",
|
|
303
|
+
scrollbarWidth: "thin",
|
|
304
|
+
"&::-webkit-scrollbar": {
|
|
305
|
+
width: "6px",
|
|
306
|
+
backgroundColor: "#f0f0f0"
|
|
307
|
+
},
|
|
308
|
+
"&::-webkit-scrollbar-thumb": {
|
|
309
|
+
backgroundColor: "#888",
|
|
310
|
+
borderRadius: "4px"
|
|
311
|
+
},
|
|
312
|
+
"&::-webkit-scrollbar-thumb:hover": {
|
|
313
|
+
backgroundColor: "#555"
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
children: [...Array(60).keys()].map(minute => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
|
|
320
|
+
value: minute.toString().padStart(2, "0"),
|
|
321
|
+
style: {
|
|
322
|
+
fontSize: 12.5,
|
|
323
|
+
right: 12
|
|
324
|
+
},
|
|
325
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
326
|
+
children: minute.toString().padStart(2, "0")
|
|
327
|
+
})
|
|
328
|
+
}, minute))
|
|
329
|
+
}), format === "DD/MM/YYYY HH:mm:ss" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Select, {
|
|
330
|
+
value: selectedSecond,
|
|
331
|
+
onChange: handleSecondChange,
|
|
332
|
+
sx: {
|
|
333
|
+
padding: 0,
|
|
334
|
+
width: 40,
|
|
335
|
+
"& .MuiSelect-select": {
|
|
336
|
+
padding: "4px",
|
|
337
|
+
fontSize: 12.5
|
|
338
|
+
},
|
|
339
|
+
"& .MuiSvgIcon-root": {
|
|
340
|
+
width: "14px"
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
MenuProps: {
|
|
344
|
+
PaperProps: {
|
|
345
|
+
sx: {
|
|
346
|
+
maxHeight: "200px",
|
|
347
|
+
width: "20px",
|
|
348
|
+
"& ul": {
|
|
349
|
+
overflowY: "auto",
|
|
350
|
+
scrollbarWidth: "thin",
|
|
351
|
+
"&::-webkit-scrollbar": {
|
|
352
|
+
width: "6px",
|
|
353
|
+
backgroundColor: "#f0f0f0"
|
|
354
|
+
},
|
|
355
|
+
"&::-webkit-scrollbar-thumb": {
|
|
356
|
+
backgroundColor: "#888",
|
|
357
|
+
borderRadius: "4px"
|
|
358
|
+
},
|
|
359
|
+
"&::-webkit-scrollbar-thumb:hover": {
|
|
360
|
+
backgroundColor: "#555"
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
children: [...Array(60).keys()].map(minute => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.MenuItem, {
|
|
367
|
+
value: minute.toString().padStart(2, "0"),
|
|
368
|
+
style: {
|
|
369
|
+
fontSize: 12.5,
|
|
370
|
+
right: 12
|
|
371
|
+
},
|
|
372
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
373
|
+
children: minute.toString().padStart(2, "0")
|
|
374
|
+
})
|
|
375
|
+
}, minute))
|
|
376
|
+
})]
|
|
377
|
+
})
|
|
378
|
+
})]
|
|
379
|
+
});
|
|
380
|
+
};
|
|
381
|
+
var _default = exports.default = DateTimePickerField;
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
4
|
+
require("core-js/modules/esnext.iterator.filter.js");
|
|
5
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
|
3
6
|
Object.defineProperty(exports, "__esModule", {
|
|
4
7
|
value: true
|
|
5
8
|
});
|
|
6
9
|
exports.default = void 0;
|
|
7
|
-
require("core-js/modules/es.symbol.description.js");
|
|
8
10
|
var _material = require("@mui/material");
|
|
9
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
12
|
var _apperance = require("../../config/apperance");
|
|
11
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
function _interopRequireDefault(
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
15
|
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; }
|
|
14
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
|
-
function _defineProperty(
|
|
16
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i :
|
|
17
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
17
19
|
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); }
|
|
18
20
|
const PuiBadge = _ref => {
|
|
19
21
|
let {
|
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/es.array.includes.js");
|
|
4
|
+
require("core-js/modules/es.string.includes.js");
|
|
3
5
|
require("core-js/modules/es.weak-map.js");
|
|
6
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
7
|
+
require("core-js/modules/esnext.iterator.filter.js");
|
|
8
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
|
4
9
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
5
10
|
Object.defineProperty(exports, "__esModule", {
|
|
6
11
|
value: true
|
|
7
12
|
});
|
|
8
13
|
exports.default = void 0;
|
|
9
|
-
require("core-js/modules/es.symbol.description.js");
|
|
10
14
|
var _material = require("@mui/material");
|
|
11
15
|
var _styles = require("@mui/material/styles");
|
|
12
16
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
17
|
var React = _interopRequireWildcard(require("react"));
|
|
14
18
|
var _apperance = require("../../config/apperance");
|
|
15
19
|
var _PuiTooltip = _interopRequireDefault(require("./PuiTooltip"));
|
|
16
|
-
var _CheckCircle = _interopRequireDefault(require("@mui/icons-material/CheckCircle"));
|
|
17
|
-
var _Error = _interopRequireDefault(require("@mui/icons-material/Error"));
|
|
18
|
-
var _HourglassEmpty = _interopRequireDefault(require("@mui/icons-material/HourglassEmpty"));
|
|
19
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
const _excluded = ["id", "className", "sx", "color", "fullWidth", "children"
|
|
21
|
+
const _excluded = ["id", "className", "sx", "color", "fullWidth", "children"];
|
|
21
22
|
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); }
|
|
22
|
-
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 &&
|
|
23
|
-
function _interopRequireDefault(
|
|
24
|
-
function _objectWithoutProperties(
|
|
25
|
-
function _objectWithoutPropertiesLoose(
|
|
23
|
+
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 && {}.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; }
|
|
24
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
25
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
26
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
26
27
|
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; }
|
|
27
28
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28
|
-
function _defineProperty(
|
|
29
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i :
|
|
29
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
30
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
30
31
|
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); }
|
|
31
|
-
const StyledChip = (0, _styles.styled)(
|
|
32
|
+
const StyledChip = (0, _styles.styled)(/*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Chip, _objectSpread({
|
|
32
33
|
ref: ref
|
|
33
34
|
}, props))))(() => {
|
|
34
35
|
return {
|
|
@@ -40,7 +41,7 @@ const StyledChip = (0, _styles.styled)( /*#__PURE__*/React.forwardRef((props, re
|
|
|
40
41
|
}
|
|
41
42
|
};
|
|
42
43
|
});
|
|
43
|
-
const PrimaryChip = (0, _styles.styled)(
|
|
44
|
+
const PrimaryChip = (0, _styles.styled)(/*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledChip, _objectSpread({
|
|
44
45
|
ref: ref
|
|
45
46
|
}, props))))(() => {
|
|
46
47
|
return {
|
|
@@ -49,24 +50,7 @@ const PrimaryChip = (0, _styles.styled)( /*#__PURE__*/React.forwardRef((props, r
|
|
|
49
50
|
}
|
|
50
51
|
};
|
|
51
52
|
});
|
|
52
|
-
const
|
|
53
|
-
success: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CheckCircle.default, {
|
|
54
|
-
style: {
|
|
55
|
-
color: 'white'
|
|
56
|
-
}
|
|
57
|
-
}),
|
|
58
|
-
error: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Error.default, {
|
|
59
|
-
style: {
|
|
60
|
-
color: 'white'
|
|
61
|
-
}
|
|
62
|
-
}),
|
|
63
|
-
info: /*#__PURE__*/(0, _jsxRuntime.jsx)(_HourglassEmpty.default, {
|
|
64
|
-
style: {
|
|
65
|
-
color: 'white'
|
|
66
|
-
}
|
|
67
|
-
})
|
|
68
|
-
};
|
|
69
|
-
const SecondaryChip = (0, _styles.styled)( /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledChip, _objectSpread({
|
|
53
|
+
const SecondaryChip = (0, _styles.styled)(/*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledChip, _objectSpread({
|
|
70
54
|
ref: ref
|
|
71
55
|
}, props))))(() => {
|
|
72
56
|
return {
|
|
@@ -77,7 +61,7 @@ const SecondaryChip = (0, _styles.styled)( /*#__PURE__*/React.forwardRef((props,
|
|
|
77
61
|
}
|
|
78
62
|
};
|
|
79
63
|
});
|
|
80
|
-
const InfoChip = (0, _styles.styled)(
|
|
64
|
+
const InfoChip = (0, _styles.styled)(/*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledChip, _objectSpread({
|
|
81
65
|
ref: ref
|
|
82
66
|
}, props))))(() => {
|
|
83
67
|
return {
|
|
@@ -86,7 +70,7 @@ const InfoChip = (0, _styles.styled)( /*#__PURE__*/React.forwardRef((props, ref)
|
|
|
86
70
|
}
|
|
87
71
|
};
|
|
88
72
|
});
|
|
89
|
-
const SuccessChip = (0, _styles.styled)(
|
|
73
|
+
const SuccessChip = (0, _styles.styled)(/*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledChip, _objectSpread({
|
|
90
74
|
ref: ref
|
|
91
75
|
}, props))))(() => {
|
|
92
76
|
return {
|
|
@@ -95,7 +79,7 @@ const SuccessChip = (0, _styles.styled)( /*#__PURE__*/React.forwardRef((props, r
|
|
|
95
79
|
}
|
|
96
80
|
};
|
|
97
81
|
});
|
|
98
|
-
const ErrorChip = (0, _styles.styled)(
|
|
82
|
+
const ErrorChip = (0, _styles.styled)(/*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledChip, _objectSpread({
|
|
99
83
|
ref: ref
|
|
100
84
|
}, props))))(() => {
|
|
101
85
|
return {
|
|
@@ -104,7 +88,7 @@ const ErrorChip = (0, _styles.styled)( /*#__PURE__*/React.forwardRef((props, ref
|
|
|
104
88
|
}
|
|
105
89
|
};
|
|
106
90
|
});
|
|
107
|
-
const WarningChip = (0, _styles.styled)(
|
|
91
|
+
const WarningChip = (0, _styles.styled)(/*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledChip, _objectSpread({
|
|
108
92
|
ref: ref
|
|
109
93
|
}, props))))(() => {
|
|
110
94
|
return {
|
|
@@ -137,8 +121,7 @@ const PuiChip = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
137
121
|
sx,
|
|
138
122
|
color,
|
|
139
123
|
fullWidth,
|
|
140
|
-
children
|
|
141
|
-
icon
|
|
124
|
+
children
|
|
142
125
|
} = _ref,
|
|
143
126
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
144
127
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PuiTooltip.default, {
|
|
@@ -153,10 +136,7 @@ const PuiChip = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
153
136
|
width: fullWidth ? "100%" : "fit-content"
|
|
154
137
|
}),
|
|
155
138
|
className,
|
|
156
|
-
label: children
|
|
157
|
-
icon: icon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Avatar, {
|
|
158
|
-
children: iconMapping[icon]
|
|
159
|
-
}) : null
|
|
139
|
+
label: children
|
|
160
140
|
}, rest))
|
|
161
141
|
});
|
|
162
142
|
});
|
|
@@ -165,8 +145,7 @@ PuiChip.propTypes = {
|
|
|
165
145
|
className: _propTypes.default.string,
|
|
166
146
|
sx: _propTypes.default.object,
|
|
167
147
|
fullWidth: _propTypes.default.bool,
|
|
168
|
-
color: _propTypes.default.oneOf(["primary", "secondary", "info", "success", "warning", "error"])
|
|
169
|
-
icon: _propTypes.default.oneOf(["success", "error", "info"]) // Prop icon pour spécifier l'icône
|
|
148
|
+
color: _propTypes.default.oneOf(["primary", "secondary", "info", "success", "warning", "error"])
|
|
170
149
|
};
|
|
171
150
|
PuiChip.defaultProps = {
|
|
172
151
|
color: "primary"
|