@oliasoft-open-source/react-ui-library 4.0.0-beta-10 → 4.0.0-beta-12
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/global.css +343 -344
- package/dist/index.js +152 -155
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11619,32 +11619,32 @@ Badge.propTypes = {
|
|
|
11619
11619
|
margin: propTypes$1.exports.string,
|
|
11620
11620
|
small: propTypes$1.exports.bool
|
|
11621
11621
|
};
|
|
11622
|
-
const inputInTable$b = "
|
|
11623
|
-
const inputHover$b = "
|
|
11624
|
-
const inputFocus$b = "
|
|
11625
|
-
const inputError$b = "
|
|
11626
|
-
const inputWarning$b = "
|
|
11627
|
-
const inputDisabled$b = "
|
|
11628
|
-
const hideScrollbars$b = "
|
|
11629
|
-
const button$3 = "
|
|
11630
|
-
const active$7 = "
|
|
11631
|
-
const green$1 = "
|
|
11632
|
-
const red$1 = "
|
|
11633
|
-
const orange$1 = "
|
|
11634
|
-
const icon$4 = "
|
|
11635
|
-
const iconOnly = "
|
|
11636
|
-
const basic = "
|
|
11637
|
-
const muted$2 = "
|
|
11638
|
-
const disabled$7 = "
|
|
11639
|
-
const small$c = "
|
|
11640
|
-
const pill = "
|
|
11641
|
-
const round = "
|
|
11642
|
-
const error$8 = "
|
|
11643
|
-
const warning$c = "
|
|
11644
|
-
const inverted$1 = "
|
|
11645
|
-
const groupOrderFirst$4 = "
|
|
11646
|
-
const groupOrderMiddle$4 = "
|
|
11647
|
-
const groupOrderLast$4 = "
|
|
11622
|
+
const inputInTable$b = "_inputInTable_1aa9x_1";
|
|
11623
|
+
const inputHover$b = "_inputHover_1aa9x_13";
|
|
11624
|
+
const inputFocus$b = "_inputFocus_1aa9x_18";
|
|
11625
|
+
const inputError$b = "_inputError_1aa9x_25";
|
|
11626
|
+
const inputWarning$b = "_inputWarning_1aa9x_26";
|
|
11627
|
+
const inputDisabled$b = "_inputDisabled_1aa9x_61";
|
|
11628
|
+
const hideScrollbars$b = "_hideScrollbars_1aa9x_67";
|
|
11629
|
+
const button$3 = "_button_1aa9x_103";
|
|
11630
|
+
const active$7 = "_active_1aa9x_140";
|
|
11631
|
+
const green$1 = "_green_1aa9x_140";
|
|
11632
|
+
const red$1 = "_red_1aa9x_140";
|
|
11633
|
+
const orange$1 = "_orange_1aa9x_140";
|
|
11634
|
+
const icon$4 = "_icon_1aa9x_152";
|
|
11635
|
+
const iconOnly = "_iconOnly_1aa9x_157";
|
|
11636
|
+
const basic = "_basic_1aa9x_167";
|
|
11637
|
+
const muted$2 = "_muted_1aa9x_173";
|
|
11638
|
+
const disabled$7 = "_disabled_1aa9x_185";
|
|
11639
|
+
const small$c = "_small_1aa9x_195";
|
|
11640
|
+
const pill = "_pill_1aa9x_200";
|
|
11641
|
+
const round = "_round_1aa9x_201";
|
|
11642
|
+
const error$8 = "_error_1aa9x_268";
|
|
11643
|
+
const warning$c = "_warning_1aa9x_285";
|
|
11644
|
+
const inverted$1 = "_inverted_1aa9x_302";
|
|
11645
|
+
const groupOrderFirst$4 = "_groupOrderFirst_1aa9x_332";
|
|
11646
|
+
const groupOrderMiddle$4 = "_groupOrderMiddle_1aa9x_333";
|
|
11647
|
+
const groupOrderLast$4 = "_groupOrderLast_1aa9x_334";
|
|
11648
11648
|
const buttonStyles = {
|
|
11649
11649
|
inputInTable: inputInTable$b,
|
|
11650
11650
|
inputHover: inputHover$b,
|
|
@@ -27018,27 +27018,27 @@ Loader.propTypes = {
|
|
|
27018
27018
|
testId: propTypes$1.exports.string,
|
|
27019
27019
|
theme: propTypes$1.exports.string
|
|
27020
27020
|
};
|
|
27021
|
-
const inputInTable$7 = "
|
|
27022
|
-
const inputHover$7 = "
|
|
27023
|
-
const inputFocus$7 = "
|
|
27024
|
-
const inputError$7 = "
|
|
27025
|
-
const inputWarning$7 = "
|
|
27026
|
-
const inputDisabled$7 = "
|
|
27027
|
-
const hideScrollbars$7 = "
|
|
27028
|
-
const container$1 = "
|
|
27029
|
-
const block$1 = "
|
|
27030
|
-
const info = "
|
|
27031
|
-
const success = "
|
|
27032
|
-
const warning$6 = "
|
|
27033
|
-
const error$4 = "
|
|
27034
|
-
const content$1 = "
|
|
27035
|
-
const heading$2 = "
|
|
27036
|
-
const icon$3 = "
|
|
27037
|
-
const dismiss$1 = "
|
|
27038
|
-
const absolute = "
|
|
27039
|
-
const legendToggle = "
|
|
27040
|
-
const detailsText = "
|
|
27041
|
-
const footer$1 = "
|
|
27021
|
+
const inputInTable$7 = "_inputInTable_i0gah_1";
|
|
27022
|
+
const inputHover$7 = "_inputHover_i0gah_13";
|
|
27023
|
+
const inputFocus$7 = "_inputFocus_i0gah_18";
|
|
27024
|
+
const inputError$7 = "_inputError_i0gah_25";
|
|
27025
|
+
const inputWarning$7 = "_inputWarning_i0gah_26";
|
|
27026
|
+
const inputDisabled$7 = "_inputDisabled_i0gah_61";
|
|
27027
|
+
const hideScrollbars$7 = "_hideScrollbars_i0gah_67";
|
|
27028
|
+
const container$1 = "_container_i0gah_83";
|
|
27029
|
+
const block$1 = "_block_i0gah_101";
|
|
27030
|
+
const info = "_info_i0gah_104";
|
|
27031
|
+
const success = "_success_i0gah_108";
|
|
27032
|
+
const warning$6 = "_warning_i0gah_112";
|
|
27033
|
+
const error$4 = "_error_i0gah_116";
|
|
27034
|
+
const content$1 = "_content_i0gah_120";
|
|
27035
|
+
const heading$2 = "_heading_i0gah_124";
|
|
27036
|
+
const icon$3 = "_icon_i0gah_131";
|
|
27037
|
+
const dismiss$1 = "_dismiss_i0gah_139";
|
|
27038
|
+
const absolute = "_absolute_i0gah_143";
|
|
27039
|
+
const legendToggle = "_legendToggle_i0gah_154";
|
|
27040
|
+
const detailsText = "_detailsText_i0gah_164";
|
|
27041
|
+
const footer$1 = "_footer_i0gah_168";
|
|
27042
27042
|
const styles$r = {
|
|
27043
27043
|
inputInTable: inputInTable$7,
|
|
27044
27044
|
inputHover: inputHover$7,
|
|
@@ -27106,27 +27106,22 @@ const Details = ({ details: details2, visible, dispatch }) => {
|
|
|
27106
27106
|
});
|
|
27107
27107
|
};
|
|
27108
27108
|
const DialogIcon = ({ type }) => {
|
|
27109
|
-
const size2 = 16;
|
|
27110
27109
|
switch (type) {
|
|
27111
27110
|
case "Success":
|
|
27112
27111
|
return /* @__PURE__ */ jsxRuntime.exports.jsx(Icon, {
|
|
27113
|
-
icon: "success"
|
|
27114
|
-
size: size2
|
|
27112
|
+
icon: "success"
|
|
27115
27113
|
});
|
|
27116
27114
|
case "Warning":
|
|
27117
27115
|
return /* @__PURE__ */ jsxRuntime.exports.jsx(Icon, {
|
|
27118
|
-
icon: "warning"
|
|
27119
|
-
size: size2
|
|
27116
|
+
icon: "warning"
|
|
27120
27117
|
});
|
|
27121
27118
|
case "Error":
|
|
27122
27119
|
return /* @__PURE__ */ jsxRuntime.exports.jsx(Icon, {
|
|
27123
|
-
icon: "error"
|
|
27124
|
-
size: size2
|
|
27120
|
+
icon: "error"
|
|
27125
27121
|
});
|
|
27126
27122
|
default:
|
|
27127
27123
|
return /* @__PURE__ */ jsxRuntime.exports.jsx(Icon, {
|
|
27128
|
-
icon: "info"
|
|
27129
|
-
size: size2
|
|
27124
|
+
icon: "info"
|
|
27130
27125
|
});
|
|
27131
27126
|
}
|
|
27132
27127
|
};
|
|
@@ -27455,23 +27450,23 @@ Page.propTypes = {
|
|
|
27455
27450
|
scroll: propTypes$1.exports.bool,
|
|
27456
27451
|
top: propTypes$1.exports.oneOfType([propTypes$1.exports.number, propTypes$1.exports.string])
|
|
27457
27452
|
};
|
|
27458
|
-
const inputInTable$6 = "
|
|
27459
|
-
const inputHover$6 = "
|
|
27460
|
-
const inputFocus$6 = "
|
|
27461
|
-
const inputError$6 = "
|
|
27462
|
-
const inputWarning$6 = "
|
|
27463
|
-
const inputDisabled$6 = "
|
|
27464
|
-
const hideScrollbars$6 = "
|
|
27465
|
-
const select = "
|
|
27466
|
-
const isInTable$2 = "
|
|
27467
|
-
const unSelected = "
|
|
27468
|
-
const error$3 = "
|
|
27469
|
-
const warning$5 = "
|
|
27470
|
-
const small$6 = "
|
|
27471
|
-
const right$3 = "
|
|
27472
|
-
const groupOrderFirst$1 = "
|
|
27473
|
-
const groupOrderMiddle$1 = "
|
|
27474
|
-
const groupOrderLast$1 = "
|
|
27453
|
+
const inputInTable$6 = "_inputInTable_1cli0_1";
|
|
27454
|
+
const inputHover$6 = "_inputHover_1cli0_13";
|
|
27455
|
+
const inputFocus$6 = "_inputFocus_1cli0_18";
|
|
27456
|
+
const inputError$6 = "_inputError_1cli0_25";
|
|
27457
|
+
const inputWarning$6 = "_inputWarning_1cli0_26";
|
|
27458
|
+
const inputDisabled$6 = "_inputDisabled_1cli0_61";
|
|
27459
|
+
const hideScrollbars$6 = "_hideScrollbars_1cli0_67";
|
|
27460
|
+
const select = "_select_1cli0_77";
|
|
27461
|
+
const isInTable$2 = "_isInTable_1cli0_121";
|
|
27462
|
+
const unSelected = "_unSelected_1cli0_133";
|
|
27463
|
+
const error$3 = "_error_1cli0_140";
|
|
27464
|
+
const warning$5 = "_warning_1cli0_157";
|
|
27465
|
+
const small$6 = "_small_1cli0_174";
|
|
27466
|
+
const right$3 = "_right_1cli0_182";
|
|
27467
|
+
const groupOrderFirst$1 = "_groupOrderFirst_1cli0_193";
|
|
27468
|
+
const groupOrderMiddle$1 = "_groupOrderMiddle_1cli0_194";
|
|
27469
|
+
const groupOrderLast$1 = "_groupOrderLast_1cli0_198";
|
|
27475
27470
|
const styles$n = {
|
|
27476
27471
|
inputInTable: inputInTable$6,
|
|
27477
27472
|
inputHover: inputHover$6,
|
|
@@ -28551,6 +28546,58 @@ const Section = ({
|
|
|
28551
28546
|
});
|
|
28552
28547
|
}
|
|
28553
28548
|
};
|
|
28549
|
+
const getTextWidth = (text2, font) => {
|
|
28550
|
+
const element = document.createElement("canvas");
|
|
28551
|
+
const context2 = element.getContext("2d");
|
|
28552
|
+
context2.font = font;
|
|
28553
|
+
return context2.measureText(text2).width;
|
|
28554
|
+
};
|
|
28555
|
+
const FONT_SIZE = "14px";
|
|
28556
|
+
const FONT_SIZE_SMALL = "12px";
|
|
28557
|
+
const FONT_FAMILY = "Roobert";
|
|
28558
|
+
const FONT_FAMILY_FALLBACK = "sans-serif";
|
|
28559
|
+
const PADDING = 10;
|
|
28560
|
+
const PADDING_SMALL = 7;
|
|
28561
|
+
const TOGGLE_SIZE = 38;
|
|
28562
|
+
const TOGGLE_SIZE_SMALL = 24;
|
|
28563
|
+
const TAG_PADDING = 5;
|
|
28564
|
+
const TAG_PADDING_SMALL = 3;
|
|
28565
|
+
const TAG_BORDER_WIDTH = 1;
|
|
28566
|
+
const TAG_MARGIN = 2;
|
|
28567
|
+
const MAX_OPTIONS_LENGTH = 10;
|
|
28568
|
+
const getFont = (small2 = false, isFontLoaded = false) => {
|
|
28569
|
+
const fontSize = small2 ? FONT_SIZE_SMALL : FONT_SIZE;
|
|
28570
|
+
const fontFamily = isFontLoaded ? FONT_FAMILY : FONT_FAMILY_FALLBACK;
|
|
28571
|
+
return `${fontSize} ${fontFamily}`;
|
|
28572
|
+
};
|
|
28573
|
+
const getExtraOptionWidth = (small2 = false, scrollbar = false) => {
|
|
28574
|
+
const SCROLLBAR_WIDTH = 17;
|
|
28575
|
+
return (small2 ? PADDING_SMALL : PADDING) + (small2 ? TOGGLE_SIZE_SMALL : TOGGLE_SIZE) + (scrollbar ? SCROLLBAR_WIDTH : 0);
|
|
28576
|
+
};
|
|
28577
|
+
const getWidestOptionWidth = (options, small2, isFontLoaded, placeholder3) => {
|
|
28578
|
+
const font = getFont(small2, isFontLoaded);
|
|
28579
|
+
const placeholderWidth = placeholder3 ? getTextWidth(placeholder3, font) : 0;
|
|
28580
|
+
const widestTextWidth = Math.ceil(
|
|
28581
|
+
options.reduce((acc, option2) => {
|
|
28582
|
+
var _a, _b;
|
|
28583
|
+
const optionActionsWidth = ((_b = (_a = option2 == null ? void 0 : option2.actions) == null ? void 0 : _a.length) != null ? _b : 0) * 24;
|
|
28584
|
+
const optionIconWidth = option2.icon ? (small2 ? FONT_SIZE_SMALL : FONT_SIZE) + 7 : 0;
|
|
28585
|
+
const optionsText = `${option2.label} ${option2.details || ""}`;
|
|
28586
|
+
const optionWidth = getTextWidth(optionsText, font) + optionActionsWidth + optionIconWidth;
|
|
28587
|
+
acc = optionWidth > acc ? optionWidth : acc;
|
|
28588
|
+
return acc;
|
|
28589
|
+
}, placeholderWidth)
|
|
28590
|
+
);
|
|
28591
|
+
const hasScrollbar = (options == null ? void 0 : options.length) > MAX_OPTIONS_LENGTH;
|
|
28592
|
+
const extraWidth = getExtraOptionWidth(small2, hasScrollbar);
|
|
28593
|
+
return widestTextWidth + extraWidth;
|
|
28594
|
+
};
|
|
28595
|
+
const getMultiOptionWidth = (option2, small2, isFontLoaded) => {
|
|
28596
|
+
const font = getFont(true, isFontLoaded);
|
|
28597
|
+
const textWidth = getTextWidth(option2.label, font);
|
|
28598
|
+
const extraWidth = (small2 ? TAG_PADDING_SMALL : TAG_PADDING) * 2 + TAG_BORDER_WIDTH * 2 + TAG_MARGIN;
|
|
28599
|
+
return Math.ceil(textWidth + extraWidth);
|
|
28600
|
+
};
|
|
28554
28601
|
const Layer = ({
|
|
28555
28602
|
listRef,
|
|
28556
28603
|
isMulti: isMulti2,
|
|
@@ -28583,7 +28630,7 @@ const Layer = ({
|
|
|
28583
28630
|
})
|
|
28584
28631
|
}) : /* @__PURE__ */ jsxRuntime.exports.jsx(FixedSizeList, {
|
|
28585
28632
|
ref: listRef,
|
|
28586
|
-
height: sections.length <
|
|
28633
|
+
height: sections.length < MAX_OPTIONS_LENGTH ? optionHeight * sections.length : optionHeight * MAX_OPTIONS_LENGTH,
|
|
28587
28634
|
itemCount: sections.length,
|
|
28588
28635
|
itemSize: optionHeight,
|
|
28589
28636
|
width,
|
|
@@ -28604,37 +28651,37 @@ const Layer = ({
|
|
|
28604
28651
|
})
|
|
28605
28652
|
});
|
|
28606
28653
|
};
|
|
28607
|
-
const inputInTable$5 = "
|
|
28608
|
-
const inputHover$5 = "
|
|
28609
|
-
const inputFocus$5 = "
|
|
28610
|
-
const inputError$5 = "
|
|
28611
|
-
const inputWarning$5 = "
|
|
28612
|
-
const inputDisabled$5 = "
|
|
28613
|
-
const hideScrollbars$5 = "
|
|
28614
|
-
const trigger$1 = "
|
|
28615
|
-
const isInTable$1 = "
|
|
28616
|
-
const input = "
|
|
28617
|
-
const isOpen = "
|
|
28618
|
-
const error$2 = "
|
|
28619
|
-
const warning$4 = "
|
|
28620
|
-
const disabled$3 = "
|
|
28621
|
-
const icons = "
|
|
28622
|
-
const clearAll = "
|
|
28623
|
-
const iconOpen = "
|
|
28624
|
-
const small$4 = "
|
|
28625
|
-
const triggerInputContainer = "
|
|
28626
|
-
const right$2 = "
|
|
28627
|
-
const multiOptions = "
|
|
28628
|
-
const multiOption = "
|
|
28629
|
-
const label$4 = "
|
|
28630
|
-
const closeMultiOption = "
|
|
28631
|
-
const focus = "
|
|
28632
|
-
const selectedSingleValue = "
|
|
28633
|
-
const placeHolder = "
|
|
28634
|
-
const groupOrderFirst = "
|
|
28635
|
-
const groupOrderMiddle = "
|
|
28636
|
-
const groupOrderLast = "
|
|
28637
|
-
const detailedLabel = "
|
|
28654
|
+
const inputInTable$5 = "_inputInTable_1nzsx_1";
|
|
28655
|
+
const inputHover$5 = "_inputHover_1nzsx_13";
|
|
28656
|
+
const inputFocus$5 = "_inputFocus_1nzsx_18";
|
|
28657
|
+
const inputError$5 = "_inputError_1nzsx_25";
|
|
28658
|
+
const inputWarning$5 = "_inputWarning_1nzsx_26";
|
|
28659
|
+
const inputDisabled$5 = "_inputDisabled_1nzsx_61";
|
|
28660
|
+
const hideScrollbars$5 = "_hideScrollbars_1nzsx_67";
|
|
28661
|
+
const trigger$1 = "_trigger_1nzsx_77";
|
|
28662
|
+
const isInTable$1 = "_isInTable_1nzsx_93";
|
|
28663
|
+
const input = "_input_1nzsx_1";
|
|
28664
|
+
const isOpen = "_isOpen_1nzsx_114";
|
|
28665
|
+
const error$2 = "_error_1nzsx_122";
|
|
28666
|
+
const warning$4 = "_warning_1nzsx_139";
|
|
28667
|
+
const disabled$3 = "_disabled_1nzsx_156";
|
|
28668
|
+
const icons = "_icons_1nzsx_162";
|
|
28669
|
+
const clearAll = "_clearAll_1nzsx_169";
|
|
28670
|
+
const iconOpen = "_iconOpen_1nzsx_170";
|
|
28671
|
+
const small$4 = "_small_1nzsx_178";
|
|
28672
|
+
const triggerInputContainer = "_triggerInputContainer_1nzsx_186";
|
|
28673
|
+
const right$2 = "_right_1nzsx_195";
|
|
28674
|
+
const multiOptions = "_multiOptions_1nzsx_208";
|
|
28675
|
+
const multiOption = "_multiOption_1nzsx_208";
|
|
28676
|
+
const label$4 = "_label_1nzsx_240";
|
|
28677
|
+
const closeMultiOption = "_closeMultiOption_1nzsx_243";
|
|
28678
|
+
const focus = "_focus_1nzsx_254";
|
|
28679
|
+
const selectedSingleValue = "_selectedSingleValue_1nzsx_258";
|
|
28680
|
+
const placeHolder = "_placeHolder_1nzsx_259";
|
|
28681
|
+
const groupOrderFirst = "_groupOrderFirst_1nzsx_298";
|
|
28682
|
+
const groupOrderMiddle = "_groupOrderMiddle_1nzsx_299";
|
|
28683
|
+
const groupOrderLast = "_groupOrderLast_1nzsx_303";
|
|
28684
|
+
const detailedLabel = "_detailedLabel_1nzsx_308";
|
|
28638
28685
|
const styles$l = {
|
|
28639
28686
|
inputInTable: inputInTable$5,
|
|
28640
28687
|
inputHover: inputHover$5,
|
|
@@ -28668,56 +28715,6 @@ const styles$l = {
|
|
|
28668
28715
|
groupOrderLast,
|
|
28669
28716
|
detailedLabel
|
|
28670
28717
|
};
|
|
28671
|
-
const getTextWidth = (text2, font) => {
|
|
28672
|
-
const element = document.createElement("canvas");
|
|
28673
|
-
const context2 = element.getContext("2d");
|
|
28674
|
-
context2.font = font;
|
|
28675
|
-
return context2.measureText(text2).width;
|
|
28676
|
-
};
|
|
28677
|
-
const FONT_SIZE = "14px";
|
|
28678
|
-
const FONT_SIZE_SMALL = "12px";
|
|
28679
|
-
const FONT_FAMILY = "Roobert";
|
|
28680
|
-
const FONT_FAMILY_FALLBACK = "sans-serif";
|
|
28681
|
-
const PADDING = 14;
|
|
28682
|
-
const PADDING_SMALL = 7;
|
|
28683
|
-
const TOGGLE_SIZE = 38;
|
|
28684
|
-
const TOGGLE_SIZE_SMALL = 24;
|
|
28685
|
-
const TAG_PADDING = 5;
|
|
28686
|
-
const TAG_PADDING_SMALL = 3;
|
|
28687
|
-
const TAG_BORDER_WIDTH = 1;
|
|
28688
|
-
const TAG_MARGIN = 2;
|
|
28689
|
-
const getFont = (small2 = false, isFontLoaded = false) => {
|
|
28690
|
-
const fontSize = small2 ? FONT_SIZE_SMALL : FONT_SIZE;
|
|
28691
|
-
const fontFamily = isFontLoaded ? FONT_FAMILY : FONT_FAMILY_FALLBACK;
|
|
28692
|
-
return `${fontSize} ${fontFamily}`;
|
|
28693
|
-
};
|
|
28694
|
-
const getExtraOptionWidth = (small2 = false, scrollbar = false) => {
|
|
28695
|
-
const SCROLLBAR_WIDTH = 17;
|
|
28696
|
-
return (small2 ? PADDING_SMALL : PADDING) + (small2 ? TOGGLE_SIZE_SMALL : TOGGLE_SIZE) + (scrollbar ? SCROLLBAR_WIDTH : 0);
|
|
28697
|
-
};
|
|
28698
|
-
const getWidestOptionWidth = (options, small2, isFontLoaded, placeholder3) => {
|
|
28699
|
-
const font = getFont(small2, isFontLoaded);
|
|
28700
|
-
const placeholderWidth = placeholder3 ? getTextWidth(placeholder3, font) : 0;
|
|
28701
|
-
const widestTextWidth = Math.ceil(
|
|
28702
|
-
options.reduce((acc, option2) => {
|
|
28703
|
-
var _a, _b;
|
|
28704
|
-
const optionActionsWidth = ((_b = (_a = option2 == null ? void 0 : option2.actions) == null ? void 0 : _a.length) != null ? _b : 0) * 24;
|
|
28705
|
-
const optionIconWidth = option2.icon ? (small2 ? FONT_SIZE_SMALL : FONT_SIZE) + 7 : 0;
|
|
28706
|
-
const optionsText = `${option2.label} ${option2.details || ""}`;
|
|
28707
|
-
const optionWidth = getTextWidth(optionsText, font) + optionActionsWidth + optionIconWidth;
|
|
28708
|
-
acc = optionWidth > acc ? optionWidth : acc;
|
|
28709
|
-
return acc;
|
|
28710
|
-
}, placeholderWidth)
|
|
28711
|
-
);
|
|
28712
|
-
const extraWidth = getExtraOptionWidth(small2, true);
|
|
28713
|
-
return widestTextWidth + extraWidth;
|
|
28714
|
-
};
|
|
28715
|
-
const getMultiOptionWidth = (option2, small2, isFontLoaded) => {
|
|
28716
|
-
const font = getFont(true, isFontLoaded);
|
|
28717
|
-
const textWidth = getTextWidth(option2.label, font);
|
|
28718
|
-
const extraWidth = (small2 ? TAG_PADDING_SMALL : TAG_PADDING) * 2 + TAG_BORDER_WIDTH * 2 + TAG_MARGIN;
|
|
28719
|
-
return Math.ceil(textWidth + extraWidth);
|
|
28720
|
-
};
|
|
28721
28718
|
const MultiSelectedOptions = ({ selectedOptions, small: small2, width }) => {
|
|
28722
28719
|
const isFontLoaded = useFontsReady();
|
|
28723
28720
|
const [displayedOptions, setDisplayedOptions] = useState([]);
|