hplx-react-elements-dev 1.1.23 → 1.1.25

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/esm/index.js +104 -92
  2. package/package.json +1 -1
package/dist/esm/index.js CHANGED
@@ -2674,13 +2674,77 @@ var InputFieldSplit = function InputFieldSplit(_a) {
2674
2674
  }));
2675
2675
  };
2676
2676
 
2677
+ // a string of all valid unicode whitespaces
2678
+ var whitespaces$3 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
2679
+ '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
2680
+
2677
2681
  var uncurryThis$8 = functionUncurryThis;
2682
+ var requireObjectCoercible$2 = requireObjectCoercible$9;
2683
+ var toString$5 = toString$b;
2684
+ var whitespaces$2 = whitespaces$3;
2685
+
2686
+ var replace$3 = uncurryThis$8(''.replace);
2687
+ var whitespace = '[' + whitespaces$2 + ']';
2688
+ var ltrim = RegExp('^' + whitespace + whitespace + '*');
2689
+ var rtrim = RegExp(whitespace + whitespace + '*$');
2690
+
2691
+ // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
2692
+ var createMethod = function (TYPE) {
2693
+ return function ($this) {
2694
+ var string = toString$5(requireObjectCoercible$2($this));
2695
+ if (TYPE & 1) string = replace$3(string, ltrim, '');
2696
+ if (TYPE & 2) string = replace$3(string, rtrim, '');
2697
+ return string;
2698
+ };
2699
+ };
2700
+
2701
+ var stringTrim = {
2702
+ // `String.prototype.{ trimLeft, trimStart }` methods
2703
+ // https://tc39.es/ecma262/#sec-string.prototype.trimstart
2704
+ start: createMethod(1),
2705
+ // `String.prototype.{ trimRight, trimEnd }` methods
2706
+ // https://tc39.es/ecma262/#sec-string.prototype.trimend
2707
+ end: createMethod(2),
2708
+ // `String.prototype.trim` method
2709
+ // https://tc39.es/ecma262/#sec-string.prototype.trim
2710
+ trim: createMethod(3)
2711
+ };
2712
+
2713
+ var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
2714
+ var fails$6 = fails$m;
2715
+ var whitespaces$1 = whitespaces$3;
2716
+
2717
+ var non = '\u200B\u0085\u180E';
2718
+
2719
+ // check that a method works with the correct list
2720
+ // of whitespaces and has a correct name
2721
+ var stringTrimForced = function (METHOD_NAME) {
2722
+ return fails$6(function () {
2723
+ return !!whitespaces$1[METHOD_NAME]()
2724
+ || non[METHOD_NAME]() !== non
2725
+ || (PROPER_FUNCTION_NAME$1 && whitespaces$1[METHOD_NAME].name !== METHOD_NAME);
2726
+ });
2727
+ };
2728
+
2729
+ var $$5 = _export;
2730
+ var $trim = stringTrim.trim;
2731
+ var forcedStringTrimMethod = stringTrimForced;
2732
+
2733
+ // `String.prototype.trim` method
2734
+ // https://tc39.es/ecma262/#sec-string.prototype.trim
2735
+ $$5({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
2736
+ trim: function trim() {
2737
+ return $trim(this);
2738
+ }
2739
+ });
2740
+
2741
+ var uncurryThis$7 = functionUncurryThis;
2678
2742
  var toObject$1 = toObject$3;
2679
2743
 
2680
2744
  var floor$1 = Math.floor;
2681
- var charAt$1 = uncurryThis$8(''.charAt);
2682
- var replace$3 = uncurryThis$8(''.replace);
2683
- var stringSlice$3 = uncurryThis$8(''.slice);
2745
+ var charAt$1 = uncurryThis$7(''.charAt);
2746
+ var replace$2 = uncurryThis$7(''.replace);
2747
+ var stringSlice$3 = uncurryThis$7(''.slice);
2684
2748
  var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
2685
2749
  var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
2686
2750
 
@@ -2694,7 +2758,7 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
2694
2758
  namedCaptures = toObject$1(namedCaptures);
2695
2759
  symbols = SUBSTITUTION_SYMBOLS;
2696
2760
  }
2697
- return replace$3(replacement, symbols, function (match, ch) {
2761
+ return replace$2(replacement, symbols, function (match, ch) {
2698
2762
  var capture;
2699
2763
  switch (charAt$1(ch, 0)) {
2700
2764
  case '$': return '$';
@@ -2721,15 +2785,15 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
2721
2785
 
2722
2786
  var apply$1 = functionApply;
2723
2787
  var call$2 = functionCall;
2724
- var uncurryThis$7 = functionUncurryThis;
2788
+ var uncurryThis$6 = functionUncurryThis;
2725
2789
  var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
2726
- var fails$6 = fails$m;
2790
+ var fails$5 = fails$m;
2727
2791
  var anObject$1 = anObject$a;
2728
2792
  var isCallable$2 = isCallable$g;
2729
2793
  var toIntegerOrInfinity = toIntegerOrInfinity$4;
2730
2794
  var toLength$1 = toLength$5;
2731
- var toString$5 = toString$b;
2732
- var requireObjectCoercible$2 = requireObjectCoercible$9;
2795
+ var toString$4 = toString$b;
2796
+ var requireObjectCoercible$1 = requireObjectCoercible$9;
2733
2797
  var advanceStringIndex = advanceStringIndex$2;
2734
2798
  var getMethod = getMethod$3;
2735
2799
  var getSubstitution = getSubstitution$1;
@@ -2739,10 +2803,10 @@ var wellKnownSymbol = wellKnownSymbol$9;
2739
2803
  var REPLACE = wellKnownSymbol('replace');
2740
2804
  var max$2 = Math.max;
2741
2805
  var min$3 = Math.min;
2742
- var concat = uncurryThis$7([].concat);
2743
- var push$1 = uncurryThis$7([].push);
2744
- var stringIndexOf = uncurryThis$7(''.indexOf);
2745
- var stringSlice$2 = uncurryThis$7(''.slice);
2806
+ var concat = uncurryThis$6([].concat);
2807
+ var push$1 = uncurryThis$6([].push);
2808
+ var stringIndexOf = uncurryThis$6(''.indexOf);
2809
+ var stringSlice$2 = uncurryThis$6(''.slice);
2746
2810
 
2747
2811
  var maybeToString = function (it) {
2748
2812
  return it === undefined ? it : String(it);
@@ -2763,7 +2827,7 @@ var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
2763
2827
  return false;
2764
2828
  })();
2765
2829
 
2766
- var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$6(function () {
2830
+ var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$5(function () {
2767
2831
  var re = /./;
2768
2832
  re.exec = function () {
2769
2833
  var result = [];
@@ -2782,17 +2846,17 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2782
2846
  // `String.prototype.replace` method
2783
2847
  // https://tc39.es/ecma262/#sec-string.prototype.replace
2784
2848
  function replace(searchValue, replaceValue) {
2785
- var O = requireObjectCoercible$2(this);
2849
+ var O = requireObjectCoercible$1(this);
2786
2850
  var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);
2787
2851
  return replacer
2788
2852
  ? call$2(replacer, searchValue, O, replaceValue)
2789
- : call$2(nativeReplace, toString$5(O), searchValue, replaceValue);
2853
+ : call$2(nativeReplace, toString$4(O), searchValue, replaceValue);
2790
2854
  },
2791
2855
  // `RegExp.prototype[@@replace]` method
2792
2856
  // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
2793
2857
  function (string, replaceValue) {
2794
2858
  var rx = anObject$1(this);
2795
- var S = toString$5(string);
2859
+ var S = toString$4(string);
2796
2860
 
2797
2861
  if (
2798
2862
  typeof replaceValue == 'string' &&
@@ -2804,7 +2868,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2804
2868
  }
2805
2869
 
2806
2870
  var functionalReplace = isCallable$2(replaceValue);
2807
- if (!functionalReplace) replaceValue = toString$5(replaceValue);
2871
+ if (!functionalReplace) replaceValue = toString$4(replaceValue);
2808
2872
 
2809
2873
  var global = rx.global;
2810
2874
  if (global) {
@@ -2819,7 +2883,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2819
2883
  push$1(results, result);
2820
2884
  if (!global) break;
2821
2885
 
2822
- var matchStr = toString$5(result[0]);
2886
+ var matchStr = toString$4(result[0]);
2823
2887
  if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength$1(rx.lastIndex), fullUnicode);
2824
2888
  }
2825
2889
 
@@ -2828,7 +2892,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2828
2892
  for (var i = 0; i < results.length; i++) {
2829
2893
  result = results[i];
2830
2894
 
2831
- var matched = toString$5(result[0]);
2895
+ var matched = toString$4(result[0]);
2832
2896
  var position = max$2(min$3(toIntegerOrInfinity(result.index), S.length), 0);
2833
2897
  var captures = [];
2834
2898
  // NOTE: This is equivalent to
@@ -2841,7 +2905,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2841
2905
  if (functionalReplace) {
2842
2906
  var replacerArgs = concat([matched], captures, position, S);
2843
2907
  if (namedCaptures !== undefined) push$1(replacerArgs, namedCaptures);
2844
- var replacement = toString$5(apply$1(replaceValue, undefined, replacerArgs));
2908
+ var replacement = toString$4(apply$1(replaceValue, undefined, replacerArgs));
2845
2909
  } else {
2846
2910
  replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
2847
2911
  }
@@ -2898,6 +2962,12 @@ var TextAreaField = function TextAreaField(_a) {
2898
2962
  setActive(true);
2899
2963
  onFocus && onFocus(event);
2900
2964
  isDynamicHeight && handleHeight();
2965
+ setTimeout(function () {
2966
+ var textarea = ref.current;
2967
+ textarea.focus();
2968
+ textarea.value += ' ';
2969
+ textarea.value = textarea.value.trim();
2970
+ }, 0);
2901
2971
  };
2902
2972
 
2903
2973
  var handleBlur = function handleBlur(event) {
@@ -3581,20 +3651,20 @@ var regexpGetFlags = function (R) {
3581
3651
  ? call$1(regExpFlags, R) : flags;
3582
3652
  };
3583
3653
 
3584
- var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
3654
+ var PROPER_FUNCTION_NAME = functionName.PROPER;
3585
3655
  var defineBuiltIn = defineBuiltIn$3;
3586
3656
  var anObject = anObject$a;
3587
3657
  var $toString = toString$b;
3588
- var fails$5 = fails$m;
3658
+ var fails$4 = fails$m;
3589
3659
  var getRegExpFlags = regexpGetFlags;
3590
3660
 
3591
3661
  var TO_STRING = 'toString';
3592
3662
  var RegExpPrototype = RegExp.prototype;
3593
3663
  var n$ToString = RegExpPrototype[TO_STRING];
3594
3664
 
3595
- var NOT_GENERIC = fails$5(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
3665
+ var NOT_GENERIC = fails$4(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
3596
3666
  // FF44- RegExp#toString has a wrong name
3597
- var INCORRECT_NAME = PROPER_FUNCTION_NAME$1 && n$ToString.name != TO_STRING;
3667
+ var INCORRECT_NAME = PROPER_FUNCTION_NAME && n$ToString.name != TO_STRING;
3598
3668
 
3599
3669
  // `RegExp.prototype.toString` method
3600
3670
  // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
@@ -4821,7 +4891,7 @@ var getLabelStyle$1 = function getLabelStyle(disabled) {
4821
4891
  var getIconTypeClassName = function getIconTypeClassName(iconfile, size, disabled) {
4822
4892
  switch (iconfile) {
4823
4893
  case "dot":
4824
- return size === "sm" ? disabled ? "hplxt-ring-4 hplxt-p-1 hplxt-ring-Gray-50 hplxt-bg-Gray-300 -hplxt-ml-[13px] hplxt-mt-[4.95px] hplxt-w-[8px] hplxt-h-[8px] hplxt-rounded-full peer-checked:hplxt-block" : "hplxt-hidden hplxt-ring-4 hplxt-p-1 hplxt-ring-Primary-50 -hplxt-ml-[13px] hplxt-mt-[4.95px] hplxt-w-[8px] hplxt-h-[8px] hplxt-rounded-full peer-checked:hplxt-block" : disabled ? "hplxt-ring-4 hplxt-p-1 hplxt-ring-Gray-50 hplxt-bg-Gray-300 -hplxt-ml-[14px] hplxt-mt-[6px] hplxt-w-[8px] hplxt-h-[8px] hplxt-rounded-full peer-checked:hplxt-block" : "hplxt-hidden hplxt-ring-4 hplxt-p-1 hplxt-ring-Primary-50 -hplxt-ml-[14px] hplxt-mt-[6px] hplxt-w-[8px] hplxt-h-[8px] hplxt-rounded-full peer-checked:hplxt-block";
4894
+ return size === "sm" ? disabled ? "hplxt-ring-4 hplxt-p-1 hplxt-ring-Gray-50 hplxt-bg-Gray-300 -hplxt-ml-[13px] hplxt-mt-[4.95px] hplxt-w-[8px] hplxt-h-[8px] hplxt-rounded-full peer-checked:hplxt-block" : " hplxt-hidden hplxt-ring-[3px] hplxt-p-1 hplxt-ring-Primary-50 -hplxt-ml-[12.85px] hplxt-mt-[4.85px] hplxt-w-[8px] hplxt-h-[8px] hplxt-rounded-full peer-checked:hplxt-block" : disabled ? "hplxt-ring-4 hplxt-p-1 hplxt-ring-Gray-50 hplxt-bg-Gray-300 -hplxt-ml-[14px] hplxt-mt-[6px] hplxt-w-[8px] hplxt-h-[8px] hplxt-rounded-full peer-checked:hplxt-block" : "hplxt-hidden hplxt-ring-4 hplxt-p-1 hplxt-ring-Primary-50 -hplxt-ml-[14px] hplxt-mt-[6px] hplxt-w-[8px] hplxt-h-[8px] hplxt-rounded-full peer-checked:hplxt-block";
4825
4895
 
4826
4896
  case "checkmark":
4827
4897
  return size === "sm" ? disabled ? "hx_checkmark hplxt-text-[12px] -hplxt-ml-[17px] hplxt-mt-[3px] hplxt-text-White peer-checked:hplxt-block " : "hplxt-hidden hx_checkmark hplxt-text-[12px] -hplxt-ml-[17px] hplxt-mt-[3px] hplxt-text-White peer-checked:hplxt-block" : disabled ? "hx_checkmark -hplxt-ml-[21px] hplxt-mt-[2px] hplxt-text-White peer-checked:hplxt-block " : "hplxt-hidden hx_checkmark -hplxt-ml-[21px] hplxt-mt-[2px] hplxt-text-White peer-checked:hplxt-block";
@@ -4849,7 +4919,7 @@ var RadioBtn = function RadioBtn(_a) {
4849
4919
  className: "hplxt-flex hplxt-flex-row hplxt-flex-1 ".concat(className)
4850
4920
  }, {
4851
4921
  children: [jsxRuntime.exports.jsx("input", {
4852
- className: "hplxt-sr-only hplxt-peer hplxt-border-0 focus:hplxt-border-0",
4922
+ className: " hplxt-sr-only hplxt-peer hplxt-border-0 focus:hplxt-border-0",
4853
4923
  type: "radio",
4854
4924
  value: value,
4855
4925
  name: "radioBtn",
@@ -4859,12 +4929,12 @@ var RadioBtn = function RadioBtn(_a) {
4859
4929
  onChange: onChange,
4860
4930
  checked: checked
4861
4931
  }), jsxRuntime.exports.jsx("label", {
4862
- className: "".concat(getPaddingClassName(size, disabled)),
4932
+ className: " ".concat(getPaddingClassName(size, disabled)),
4863
4933
  htmlFor: id
4864
4934
  }), jsxRuntime.exports.jsx("div", {
4865
4935
  className: "".concat(getIconTypeClassName(iconfile, size, disabled))
4866
4936
  }), jsxRuntime.exports.jsxs("label", __assign({
4867
- className: " hplxt-mx-4 ".concat(getLabelStyle$1(disabled), " "),
4937
+ className: " ".concat(size === "sm" ? "peer-checked:hplxt-mx-[20.85px]" : "peer-checked:hplxt-mx-[22px]", " hplxt-mx-4 ").concat(getLabelStyle$1(disabled), " "),
4868
4938
  htmlFor: id
4869
4939
  }, {
4870
4940
  children: [jsxRuntime.exports.jsx(Typography, __assign({
@@ -5566,70 +5636,6 @@ var BadgeGroup = function BadgeGroup(_a) {
5566
5636
  });
5567
5637
  };
5568
5638
 
5569
- // a string of all valid unicode whitespaces
5570
- var whitespaces$3 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
5571
- '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
5572
-
5573
- var uncurryThis$6 = functionUncurryThis;
5574
- var requireObjectCoercible$1 = requireObjectCoercible$9;
5575
- var toString$4 = toString$b;
5576
- var whitespaces$2 = whitespaces$3;
5577
-
5578
- var replace$2 = uncurryThis$6(''.replace);
5579
- var whitespace = '[' + whitespaces$2 + ']';
5580
- var ltrim = RegExp('^' + whitespace + whitespace + '*');
5581
- var rtrim = RegExp(whitespace + whitespace + '*$');
5582
-
5583
- // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
5584
- var createMethod = function (TYPE) {
5585
- return function ($this) {
5586
- var string = toString$4(requireObjectCoercible$1($this));
5587
- if (TYPE & 1) string = replace$2(string, ltrim, '');
5588
- if (TYPE & 2) string = replace$2(string, rtrim, '');
5589
- return string;
5590
- };
5591
- };
5592
-
5593
- var stringTrim = {
5594
- // `String.prototype.{ trimLeft, trimStart }` methods
5595
- // https://tc39.es/ecma262/#sec-string.prototype.trimstart
5596
- start: createMethod(1),
5597
- // `String.prototype.{ trimRight, trimEnd }` methods
5598
- // https://tc39.es/ecma262/#sec-string.prototype.trimend
5599
- end: createMethod(2),
5600
- // `String.prototype.trim` method
5601
- // https://tc39.es/ecma262/#sec-string.prototype.trim
5602
- trim: createMethod(3)
5603
- };
5604
-
5605
- var PROPER_FUNCTION_NAME = functionName.PROPER;
5606
- var fails$4 = fails$m;
5607
- var whitespaces$1 = whitespaces$3;
5608
-
5609
- var non = '\u200B\u0085\u180E';
5610
-
5611
- // check that a method works with the correct list
5612
- // of whitespaces and has a correct name
5613
- var stringTrimForced = function (METHOD_NAME) {
5614
- return fails$4(function () {
5615
- return !!whitespaces$1[METHOD_NAME]()
5616
- || non[METHOD_NAME]() !== non
5617
- || (PROPER_FUNCTION_NAME && whitespaces$1[METHOD_NAME].name !== METHOD_NAME);
5618
- });
5619
- };
5620
-
5621
- var $$5 = _export;
5622
- var $trim = stringTrim.trim;
5623
- var forcedStringTrimMethod = stringTrimForced;
5624
-
5625
- // `String.prototype.trim` method
5626
- // https://tc39.es/ecma262/#sec-string.prototype.trim
5627
- $$5({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
5628
- trim: function trim() {
5629
- return $trim(this);
5630
- }
5631
- });
5632
-
5633
5639
  var AddSuggestion = function AddSuggestion(_a) {
5634
5640
  var label = _a.label,
5635
5641
  _b = _a.handleSuggestionValChange,
@@ -18536,6 +18542,10 @@ var InputTag = function InputTag(_a) {
18536
18542
  } else if (e.keyCode === 13 && tagInputValue.trim().length <= 1) {
18537
18543
  setTagInputValue("");
18538
18544
  setFocusIndex(-1);
18545
+
18546
+ if (wrapperRef && wrapperRef.current) {
18547
+ wrapperRef.current.scrollTop = 0;
18548
+ }
18539
18549
  } //on backspace
18540
18550
 
18541
18551
 
@@ -18582,6 +18592,8 @@ var InputTag = function InputTag(_a) {
18582
18592
 
18583
18593
  if (e.keyCode === 13 || e.keyCode === 9) {
18584
18594
  if (focusIndex >= 0) {
18595
+ e.preventDefault();
18596
+
18585
18597
  var res = __spreadArray(__spreadArray([], tags, true), [dropdownArr[focusIndex].value.trim()], false);
18586
18598
 
18587
18599
  setTags(res);
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "frontend",
10
10
  "healthplix"
11
11
  ],
12
- "version": "1.1.23",
12
+ "version": "1.1.25",
13
13
  "main": "dist/esm/index.js",
14
14
  "module": "dist/esm/index.js",
15
15
  "types": "dist/esm/index.d.ts",