@oliasoft-open-source/react-ui-library 3.1.20-beta1 → 3.1.20

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 +4 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -27343,6 +27343,7 @@ const CustomSelect = ({
27343
27343
  const fontSize = small2 ? "12px" : "14px";
27344
27344
  const fontFamily = isFontLoaded ? "Lato" : "sans-serif";
27345
27345
  const font = `${fontSize} ${fontFamily}`;
27346
+ const placeholderWidth = placeholder3 ? getTextWidth(placeholder3, font) : 0;
27346
27347
  const widestTextWidth = Math.ceil(options.reduce((acc, option2) => {
27347
27348
  var _a, _b;
27348
27349
  const optionActionsWidth = ((_b = (_a = option2 == null ? void 0 : option2.actions) == null ? void 0 : _a.length) != null ? _b : 0) * 24;
@@ -27351,7 +27352,7 @@ const CustomSelect = ({
27351
27352
  const optionWidth = getTextWidth(optionsText, font) + optionActionsWidth + optionIconWidth;
27352
27353
  acc = optionWidth > acc ? optionWidth : acc;
27353
27354
  return acc;
27354
- }, getTextWidth(placeholder3, font)));
27355
+ }, placeholderWidth));
27355
27356
  const extraWidth = (small2 ? 7 : 14) + (small2 ? 24 : 38) + 17 + (isMulti2 ? 16 : 0);
27356
27357
  return widestTextWidth + extraWidth;
27357
27358
  }, [options, isFontLoaded]);
@@ -27577,6 +27578,7 @@ CustomSelect.defaultProps = {
27577
27578
  onChange: () => {
27578
27579
  },
27579
27580
  onCreate: null,
27581
+ placeholder: "",
27580
27582
  small: false,
27581
27583
  tabIndex: 0,
27582
27584
  width: null,
@@ -27603,6 +27605,7 @@ const CustomSelectShape = {
27603
27605
  selectedOptions: selectedOptionsShape,
27604
27606
  onChange: propTypes$1.exports.func,
27605
27607
  onCreate: propTypes$1.exports.func,
27608
+ placeholder: propTypes$1.exports.string,
27606
27609
  small: propTypes$1.exports.bool,
27607
27610
  tabIndex: propTypes$1.exports.number,
27608
27611
  width: propTypes$1.exports.string,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/react-ui-library",
3
- "version": "3.1.20-beta1",
3
+ "version": "3.1.20",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "module": "./dist/index.js",
6
6
  "main": "./dist/index.js",