@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/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 = "_inputInTable_4glow_1";
11623
- const inputHover$b = "_inputHover_4glow_13";
11624
- const inputFocus$b = "_inputFocus_4glow_18";
11625
- const inputError$b = "_inputError_4glow_25";
11626
- const inputWarning$b = "_inputWarning_4glow_26";
11627
- const inputDisabled$b = "_inputDisabled_4glow_61";
11628
- const hideScrollbars$b = "_hideScrollbars_4glow_67";
11629
- const button$3 = "_button_4glow_100";
11630
- const active$7 = "_active_4glow_137";
11631
- const green$1 = "_green_4glow_137";
11632
- const red$1 = "_red_4glow_137";
11633
- const orange$1 = "_orange_4glow_137";
11634
- const icon$4 = "_icon_4glow_149";
11635
- const iconOnly = "_iconOnly_4glow_154";
11636
- const basic = "_basic_4glow_164";
11637
- const muted$2 = "_muted_4glow_170";
11638
- const disabled$7 = "_disabled_4glow_182";
11639
- const small$c = "_small_4glow_192";
11640
- const pill = "_pill_4glow_197";
11641
- const round = "_round_4glow_198";
11642
- const error$8 = "_error_4glow_265";
11643
- const warning$c = "_warning_4glow_282";
11644
- const inverted$1 = "_inverted_4glow_299";
11645
- const groupOrderFirst$4 = "_groupOrderFirst_4glow_329";
11646
- const groupOrderMiddle$4 = "_groupOrderMiddle_4glow_330";
11647
- const groupOrderLast$4 = "_groupOrderLast_4glow_331";
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 = "_inputInTable_17o1r_1";
27022
- const inputHover$7 = "_inputHover_17o1r_13";
27023
- const inputFocus$7 = "_inputFocus_17o1r_18";
27024
- const inputError$7 = "_inputError_17o1r_25";
27025
- const inputWarning$7 = "_inputWarning_17o1r_26";
27026
- const inputDisabled$7 = "_inputDisabled_17o1r_61";
27027
- const hideScrollbars$7 = "_hideScrollbars_17o1r_67";
27028
- const container$1 = "_container_17o1r_83";
27029
- const block$1 = "_block_17o1r_101";
27030
- const info = "_info_17o1r_104";
27031
- const success = "_success_17o1r_108";
27032
- const warning$6 = "_warning_17o1r_112";
27033
- const error$4 = "_error_17o1r_116";
27034
- const content$1 = "_content_17o1r_120";
27035
- const heading$2 = "_heading_17o1r_124";
27036
- const icon$3 = "_icon_17o1r_131";
27037
- const dismiss$1 = "_dismiss_17o1r_139";
27038
- const absolute = "_absolute_17o1r_143";
27039
- const legendToggle = "_legendToggle_17o1r_152";
27040
- const detailsText = "_detailsText_17o1r_162";
27041
- const footer$1 = "_footer_17o1r_166";
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 = "_inputInTable_brru0_1";
27459
- const inputHover$6 = "_inputHover_brru0_13";
27460
- const inputFocus$6 = "_inputFocus_brru0_18";
27461
- const inputError$6 = "_inputError_brru0_25";
27462
- const inputWarning$6 = "_inputWarning_brru0_26";
27463
- const inputDisabled$6 = "_inputDisabled_brru0_61";
27464
- const hideScrollbars$6 = "_hideScrollbars_brru0_67";
27465
- const select = "_select_brru0_77";
27466
- const isInTable$2 = "_isInTable_brru0_121";
27467
- const unSelected = "_unSelected_brru0_133";
27468
- const error$3 = "_error_brru0_140";
27469
- const warning$5 = "_warning_brru0_157";
27470
- const small$6 = "_small_brru0_174";
27471
- const right$3 = "_right_brru0_182";
27472
- const groupOrderFirst$1 = "_groupOrderFirst_brru0_193";
27473
- const groupOrderMiddle$1 = "_groupOrderMiddle_brru0_194";
27474
- const groupOrderLast$1 = "_groupOrderLast_brru0_198";
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 < 10 ? optionHeight * sections.length : optionHeight * 10,
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 = "_inputInTable_1dpp2_1";
28608
- const inputHover$5 = "_inputHover_1dpp2_13";
28609
- const inputFocus$5 = "_inputFocus_1dpp2_18";
28610
- const inputError$5 = "_inputError_1dpp2_25";
28611
- const inputWarning$5 = "_inputWarning_1dpp2_26";
28612
- const inputDisabled$5 = "_inputDisabled_1dpp2_61";
28613
- const hideScrollbars$5 = "_hideScrollbars_1dpp2_67";
28614
- const trigger$1 = "_trigger_1dpp2_81";
28615
- const isInTable$1 = "_isInTable_1dpp2_97";
28616
- const input = "_input_1dpp2_1";
28617
- const isOpen = "_isOpen_1dpp2_118";
28618
- const error$2 = "_error_1dpp2_126";
28619
- const warning$4 = "_warning_1dpp2_143";
28620
- const disabled$3 = "_disabled_1dpp2_160";
28621
- const icons = "_icons_1dpp2_166";
28622
- const clearAll = "_clearAll_1dpp2_173";
28623
- const iconOpen = "_iconOpen_1dpp2_174";
28624
- const small$4 = "_small_1dpp2_183";
28625
- const triggerInputContainer = "_triggerInputContainer_1dpp2_192";
28626
- const right$2 = "_right_1dpp2_201";
28627
- const multiOptions = "_multiOptions_1dpp2_214";
28628
- const multiOption = "_multiOption_1dpp2_214";
28629
- const label$4 = "_label_1dpp2_246";
28630
- const closeMultiOption = "_closeMultiOption_1dpp2_249";
28631
- const focus = "_focus_1dpp2_260";
28632
- const selectedSingleValue = "_selectedSingleValue_1dpp2_264";
28633
- const placeHolder = "_placeHolder_1dpp2_265";
28634
- const groupOrderFirst = "_groupOrderFirst_1dpp2_304";
28635
- const groupOrderMiddle = "_groupOrderMiddle_1dpp2_305";
28636
- const groupOrderLast = "_groupOrderLast_1dpp2_309";
28637
- const detailedLabel = "_detailedLabel_1dpp2_314";
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([]);