@oliasoft-open-source/react-ui-library 3.1.19 → 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.
- package/dist/index.js +7 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10718,14 +10718,9 @@ const Actions = (props) => {
|
|
|
10718
10718
|
const hidden2 = (action2 == null ? void 0 : action2.hidden) || !action2 || !Object.keys(action2).length;
|
|
10719
10719
|
if (!hidden2) {
|
|
10720
10720
|
if (action2.childComponent && React__default.isValidElement(action2.childComponent)) {
|
|
10721
|
-
return /* @__PURE__ */ jsx(
|
|
10722
|
-
|
|
10723
|
-
|
|
10724
|
-
basic: true,
|
|
10725
|
-
small: true,
|
|
10726
|
-
icon: action2.childComponent,
|
|
10727
|
-
testId: action2.testId,
|
|
10728
|
-
width: "auto"
|
|
10721
|
+
return /* @__PURE__ */ jsx("div", {
|
|
10722
|
+
"data-testid": action2.testId,
|
|
10723
|
+
children: action2.childComponent
|
|
10729
10724
|
}, index2);
|
|
10730
10725
|
} else if (action2.subActions) {
|
|
10731
10726
|
return /* @__PURE__ */ jsx(SubmenuActions, {
|
|
@@ -27348,6 +27343,7 @@ const CustomSelect = ({
|
|
|
27348
27343
|
const fontSize = small2 ? "12px" : "14px";
|
|
27349
27344
|
const fontFamily = isFontLoaded ? "Lato" : "sans-serif";
|
|
27350
27345
|
const font = `${fontSize} ${fontFamily}`;
|
|
27346
|
+
const placeholderWidth = placeholder3 ? getTextWidth(placeholder3, font) : 0;
|
|
27351
27347
|
const widestTextWidth = Math.ceil(options.reduce((acc, option2) => {
|
|
27352
27348
|
var _a, _b;
|
|
27353
27349
|
const optionActionsWidth = ((_b = (_a = option2 == null ? void 0 : option2.actions) == null ? void 0 : _a.length) != null ? _b : 0) * 24;
|
|
@@ -27356,7 +27352,7 @@ const CustomSelect = ({
|
|
|
27356
27352
|
const optionWidth = getTextWidth(optionsText, font) + optionActionsWidth + optionIconWidth;
|
|
27357
27353
|
acc = optionWidth > acc ? optionWidth : acc;
|
|
27358
27354
|
return acc;
|
|
27359
|
-
},
|
|
27355
|
+
}, placeholderWidth));
|
|
27360
27356
|
const extraWidth = (small2 ? 7 : 14) + (small2 ? 24 : 38) + 17 + (isMulti2 ? 16 : 0);
|
|
27361
27357
|
return widestTextWidth + extraWidth;
|
|
27362
27358
|
}, [options, isFontLoaded]);
|
|
@@ -27582,6 +27578,7 @@ CustomSelect.defaultProps = {
|
|
|
27582
27578
|
onChange: () => {
|
|
27583
27579
|
},
|
|
27584
27580
|
onCreate: null,
|
|
27581
|
+
placeholder: "",
|
|
27585
27582
|
small: false,
|
|
27586
27583
|
tabIndex: 0,
|
|
27587
27584
|
width: null,
|
|
@@ -27608,6 +27605,7 @@ const CustomSelectShape = {
|
|
|
27608
27605
|
selectedOptions: selectedOptionsShape,
|
|
27609
27606
|
onChange: propTypes$1.exports.func,
|
|
27610
27607
|
onCreate: propTypes$1.exports.func,
|
|
27608
|
+
placeholder: propTypes$1.exports.string,
|
|
27611
27609
|
small: propTypes$1.exports.bool,
|
|
27612
27610
|
tabIndex: propTypes$1.exports.number,
|
|
27613
27611
|
width: propTypes$1.exports.string,
|