arengibook 2.4.567 → 2.4.569
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/index.js +44 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -35834,7 +35834,13 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
35834
35834
|
imageStyle: {
|
|
35835
35835
|
width: '18px',
|
|
35836
35836
|
marginRight: '0.5rem'
|
|
35837
|
-
}
|
|
35837
|
+
},
|
|
35838
|
+
labelStyle: {
|
|
35839
|
+
color: '#374151',
|
|
35840
|
+
fontSize: '14px'
|
|
35841
|
+
},
|
|
35842
|
+
generalIcon: null,
|
|
35843
|
+
generalImage: null
|
|
35838
35844
|
} : _ref$groupedItemTempl;
|
|
35839
35845
|
var _useState = useState(value !== null && value !== void 0 ? value : null),
|
|
35840
35846
|
_useState2 = _slicedToArray$8(_useState, 2),
|
|
@@ -35897,31 +35903,59 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
35897
35903
|
};
|
|
35898
35904
|
var finalOptions = isGroupedOption ? formatGroupedOptions(options) : options;
|
|
35899
35905
|
var groupedItemTemplate = function groupedItemTemplate(option) {
|
|
35900
|
-
var _ref6 = groupedItemTemplateConfig
|
|
35906
|
+
var _ref6 = groupedItemTemplateConfig || {},
|
|
35901
35907
|
showImage = _ref6.showImage,
|
|
35902
35908
|
imageKey = _ref6.imageKey,
|
|
35903
35909
|
imageStyle = _ref6.imageStyle,
|
|
35904
35910
|
showIcon = _ref6.showIcon,
|
|
35905
|
-
iconKey = _ref6.iconKey
|
|
35911
|
+
iconKey = _ref6.iconKey,
|
|
35912
|
+
labelStyle = _ref6.labelStyle,
|
|
35913
|
+
generalIcon = _ref6.generalIcon,
|
|
35914
|
+
generalImage = _ref6.generalImage;
|
|
35906
35915
|
console.log(option);
|
|
35907
35916
|
console.log(groupedItemTemplateConfig);
|
|
35908
35917
|
console.log(showIcon);
|
|
35918
|
+
console.log(option[imageKey]);
|
|
35919
|
+
console.log(option.value[iconKey]);
|
|
35920
|
+
|
|
35921
|
+
// Vérifiez si l'option est un groupe
|
|
35922
|
+
if (option.group) {
|
|
35923
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
35924
|
+
className: "flex align-items-center"
|
|
35925
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
35926
|
+
style: _objectSpread2({
|
|
35927
|
+
fontSize: '11px',
|
|
35928
|
+
fontWeight: 'bold'
|
|
35929
|
+
}, labelStyle)
|
|
35930
|
+
}, option.label));
|
|
35931
|
+
}
|
|
35932
|
+
|
|
35933
|
+
// Accédez à l'icône via l'objet value de chaque item
|
|
35934
|
+
var icon = option.value[iconKey];
|
|
35909
35935
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
35910
35936
|
className: "flex align-items-center"
|
|
35911
|
-
},
|
|
35937
|
+
}, generalImage && /*#__PURE__*/React__default.createElement("img", {
|
|
35938
|
+
alt: "General",
|
|
35939
|
+
src: generalImage,
|
|
35940
|
+
style: imageStyle || {
|
|
35941
|
+
width: '18px',
|
|
35942
|
+
marginRight: '0.5rem'
|
|
35943
|
+
},
|
|
35944
|
+
className: "mr-2"
|
|
35945
|
+
}), generalIcon && /*#__PURE__*/React__default.createElement("i", {
|
|
35946
|
+
className: "mr-2 ".concat(generalIcon)
|
|
35947
|
+
}), showImage && option.value[imageKey] && /*#__PURE__*/React__default.createElement("img", {
|
|
35912
35948
|
alt: option.label,
|
|
35913
|
-
src: option[imageKey],
|
|
35949
|
+
src: option.value[imageKey],
|
|
35914
35950
|
style: imageStyle || {
|
|
35915
35951
|
width: '18px',
|
|
35916
35952
|
marginRight: '0.5rem'
|
|
35917
35953
|
},
|
|
35918
35954
|
className: "mr-2"
|
|
35919
|
-
}), showIcon &&
|
|
35920
|
-
className: "mr-2 ".concat(
|
|
35955
|
+
}), showIcon && icon && /*#__PURE__*/React__default.createElement("i", {
|
|
35956
|
+
className: "mr-2 ".concat(icon)
|
|
35921
35957
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
35922
|
-
style: {
|
|
35923
|
-
fontSize: '11px'
|
|
35924
|
-
}
|
|
35958
|
+
style: _objectSpread2({}, labelStyle)
|
|
35925
35959
|
}, option.label));
|
|
35926
35960
|
};
|
|
35927
35961
|
return /*#__PURE__*/React__default.createElement("div", {
|