arengibook 2.4.568 → 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.
Files changed (2) hide show
  1. package/dist/index.js +42 -9
  2. 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),
@@ -35902,27 +35908,54 @@ var Dropdown = function Dropdown(_ref) {
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);
35909
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];
35910
35935
  return /*#__PURE__*/React__default.createElement("div", {
35911
35936
  className: "flex align-items-center"
35912
- }, showImage && option[imageKey] && /*#__PURE__*/React__default.createElement("img", {
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", {
35913
35948
  alt: option.label,
35914
- src: option[imageKey],
35949
+ src: option.value[imageKey],
35915
35950
  style: imageStyle || {
35916
35951
  width: '18px',
35917
35952
  marginRight: '0.5rem'
35918
35953
  },
35919
35954
  className: "mr-2"
35920
- }), showIcon && option[iconKey] && /*#__PURE__*/React__default.createElement("i", {
35921
- className: "mr-2 ".concat(option[iconKey])
35955
+ }), showIcon && icon && /*#__PURE__*/React__default.createElement("i", {
35956
+ className: "mr-2 ".concat(icon)
35922
35957
  }), /*#__PURE__*/React__default.createElement("div", {
35923
- style: {
35924
- fontSize: '11px'
35925
- }
35958
+ style: _objectSpread2({}, labelStyle)
35926
35959
  }, option.label));
35927
35960
  };
35928
35961
  return /*#__PURE__*/React__default.createElement("div", {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "arengibook",
3
3
  "private": false,
4
- "version": "2.4.568",
4
+ "version": "2.4.569",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
7
7
  "exports": {