@hero-design/rn 8.64.9-alpha.0 → 8.65.0
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/.turbo/turbo-build.log +5 -0
- package/CHANGELOG.md +6 -0
- package/es/index.js +237 -234
- package/lib/index.js +237 -234
- package/package.json +2 -3
- package/src/components/BottomNavigation/index.tsx +0 -4
- package/src/components/PinInput/StyledPinInput.tsx +0 -1
- package/src/components/PinInput/index.tsx +9 -20
- package/src/theme/components/pinInput.ts +1 -1
- package/stats/8.65.0/rn-stats.html +4842 -0
package/lib/index.js
CHANGED
|
@@ -643,156 +643,231 @@ var hexRgb = function hexRgb(hex) {
|
|
|
643
643
|
};
|
|
644
644
|
};
|
|
645
645
|
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
"
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
"
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
646
|
+
function hsl2rgb(hsl) {
|
|
647
|
+
var h = hsl[0] / 360,
|
|
648
|
+
s = hsl[1] / 100,
|
|
649
|
+
l = hsl[2] / 100,
|
|
650
|
+
t1,
|
|
651
|
+
t2,
|
|
652
|
+
t3,
|
|
653
|
+
rgb,
|
|
654
|
+
val;
|
|
655
|
+
if (s == 0) {
|
|
656
|
+
val = l * 255;
|
|
657
|
+
return [val, val, val];
|
|
658
|
+
}
|
|
659
|
+
if (l < 0.5) t2 = l * (1 + s);else t2 = l + s - l * s;
|
|
660
|
+
t1 = 2 * l - t2;
|
|
661
|
+
rgb = [0, 0, 0];
|
|
662
|
+
for (var i = 0; i < 3; i++) {
|
|
663
|
+
t3 = h + 1 / 3 * -(i - 1);
|
|
664
|
+
t3 < 0 && t3++;
|
|
665
|
+
t3 > 1 && t3--;
|
|
666
|
+
if (6 * t3 < 1) val = t1 + (t2 - t1) * 6 * t3;else if (2 * t3 < 1) val = t2;else if (3 * t3 < 2) val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;else val = t1;
|
|
667
|
+
rgb[i] = val * 255;
|
|
668
|
+
}
|
|
669
|
+
return rgb;
|
|
670
|
+
}
|
|
671
|
+
var hsl2rgb_1 = hsl2rgb;
|
|
672
|
+
|
|
673
|
+
function clamp$3(val, min, max) {
|
|
674
|
+
return Math.min(Math.max(val, min), max);
|
|
675
|
+
}
|
|
676
|
+
var clamp_1 = clamp$3;
|
|
677
|
+
|
|
678
|
+
var clamp$2 = clamp_1;
|
|
679
|
+
function componentToHex(c) {
|
|
680
|
+
var value = Math.round(clamp$2(c, 0, 255));
|
|
681
|
+
var hex = value.toString(16);
|
|
682
|
+
return hex.length == 1 ? "0" + hex : hex;
|
|
683
|
+
}
|
|
684
|
+
function rgb2hex(rgb) {
|
|
685
|
+
var alpha = rgb.length === 4 ? componentToHex(rgb[3] * 255) : "";
|
|
686
|
+
return "#" + componentToHex(rgb[0]) + componentToHex(rgb[1]) + componentToHex(rgb[2]) + alpha;
|
|
687
|
+
}
|
|
688
|
+
var rgb2hex_1 = rgb2hex;
|
|
689
|
+
|
|
690
|
+
function rgb2hsl(rgb) {
|
|
691
|
+
var r = rgb[0] / 255,
|
|
692
|
+
g = rgb[1] / 255,
|
|
693
|
+
b = rgb[2] / 255,
|
|
694
|
+
min = Math.min(r, g, b),
|
|
695
|
+
max = Math.max(r, g, b),
|
|
696
|
+
delta = max - min,
|
|
697
|
+
h,
|
|
698
|
+
s,
|
|
699
|
+
l;
|
|
700
|
+
if (max == min) h = 0;else if (r == max) h = (g - b) / delta;else if (g == max) h = 2 + (b - r) / delta;else if (b == max) h = 4 + (r - g) / delta;
|
|
701
|
+
h = Math.min(h * 60, 360);
|
|
702
|
+
if (h < 0) h += 360;
|
|
703
|
+
l = (min + max) / 2;
|
|
704
|
+
if (max == min) s = 0;else if (l <= 0.5) s = delta / (max + min);else s = delta / (2 - max - min);
|
|
705
|
+
return [h, s * 100, l * 100];
|
|
706
|
+
}
|
|
707
|
+
var rgb2hsl_1 = rgb2hsl;
|
|
708
|
+
|
|
709
|
+
function getDefaultExportFromCjs$1(x) {
|
|
710
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
711
|
+
}
|
|
712
|
+
var colorName$1;
|
|
713
|
+
var hasRequiredColorName;
|
|
714
|
+
function requireColorName() {
|
|
715
|
+
if (hasRequiredColorName) return colorName$1;
|
|
716
|
+
hasRequiredColorName = 1;
|
|
717
|
+
colorName$1 = {
|
|
718
|
+
"aliceblue": [240, 248, 255],
|
|
719
|
+
"antiquewhite": [250, 235, 215],
|
|
720
|
+
"aqua": [0, 255, 255],
|
|
721
|
+
"aquamarine": [127, 255, 212],
|
|
722
|
+
"azure": [240, 255, 255],
|
|
723
|
+
"beige": [245, 245, 220],
|
|
724
|
+
"bisque": [255, 228, 196],
|
|
725
|
+
"black": [0, 0, 0],
|
|
726
|
+
"blanchedalmond": [255, 235, 205],
|
|
727
|
+
"blue": [0, 0, 255],
|
|
728
|
+
"blueviolet": [138, 43, 226],
|
|
729
|
+
"brown": [165, 42, 42],
|
|
730
|
+
"burlywood": [222, 184, 135],
|
|
731
|
+
"cadetblue": [95, 158, 160],
|
|
732
|
+
"chartreuse": [127, 255, 0],
|
|
733
|
+
"chocolate": [210, 105, 30],
|
|
734
|
+
"coral": [255, 127, 80],
|
|
735
|
+
"cornflowerblue": [100, 149, 237],
|
|
736
|
+
"cornsilk": [255, 248, 220],
|
|
737
|
+
"crimson": [220, 20, 60],
|
|
738
|
+
"cyan": [0, 255, 255],
|
|
739
|
+
"darkblue": [0, 0, 139],
|
|
740
|
+
"darkcyan": [0, 139, 139],
|
|
741
|
+
"darkgoldenrod": [184, 134, 11],
|
|
742
|
+
"darkgray": [169, 169, 169],
|
|
743
|
+
"darkgreen": [0, 100, 0],
|
|
744
|
+
"darkgrey": [169, 169, 169],
|
|
745
|
+
"darkkhaki": [189, 183, 107],
|
|
746
|
+
"darkmagenta": [139, 0, 139],
|
|
747
|
+
"darkolivegreen": [85, 107, 47],
|
|
748
|
+
"darkorange": [255, 140, 0],
|
|
749
|
+
"darkorchid": [153, 50, 204],
|
|
750
|
+
"darkred": [139, 0, 0],
|
|
751
|
+
"darksalmon": [233, 150, 122],
|
|
752
|
+
"darkseagreen": [143, 188, 143],
|
|
753
|
+
"darkslateblue": [72, 61, 139],
|
|
754
|
+
"darkslategray": [47, 79, 79],
|
|
755
|
+
"darkslategrey": [47, 79, 79],
|
|
756
|
+
"darkturquoise": [0, 206, 209],
|
|
757
|
+
"darkviolet": [148, 0, 211],
|
|
758
|
+
"deeppink": [255, 20, 147],
|
|
759
|
+
"deepskyblue": [0, 191, 255],
|
|
760
|
+
"dimgray": [105, 105, 105],
|
|
761
|
+
"dimgrey": [105, 105, 105],
|
|
762
|
+
"dodgerblue": [30, 144, 255],
|
|
763
|
+
"firebrick": [178, 34, 34],
|
|
764
|
+
"floralwhite": [255, 250, 240],
|
|
765
|
+
"forestgreen": [34, 139, 34],
|
|
766
|
+
"fuchsia": [255, 0, 255],
|
|
767
|
+
"gainsboro": [220, 220, 220],
|
|
768
|
+
"ghostwhite": [248, 248, 255],
|
|
769
|
+
"gold": [255, 215, 0],
|
|
770
|
+
"goldenrod": [218, 165, 32],
|
|
771
|
+
"gray": [128, 128, 128],
|
|
772
|
+
"green": [0, 128, 0],
|
|
773
|
+
"greenyellow": [173, 255, 47],
|
|
774
|
+
"grey": [128, 128, 128],
|
|
775
|
+
"honeydew": [240, 255, 240],
|
|
776
|
+
"hotpink": [255, 105, 180],
|
|
777
|
+
"indianred": [205, 92, 92],
|
|
778
|
+
"indigo": [75, 0, 130],
|
|
779
|
+
"ivory": [255, 255, 240],
|
|
780
|
+
"khaki": [240, 230, 140],
|
|
781
|
+
"lavender": [230, 230, 250],
|
|
782
|
+
"lavenderblush": [255, 240, 245],
|
|
783
|
+
"lawngreen": [124, 252, 0],
|
|
784
|
+
"lemonchiffon": [255, 250, 205],
|
|
785
|
+
"lightblue": [173, 216, 230],
|
|
786
|
+
"lightcoral": [240, 128, 128],
|
|
787
|
+
"lightcyan": [224, 255, 255],
|
|
788
|
+
"lightgoldenrodyellow": [250, 250, 210],
|
|
789
|
+
"lightgray": [211, 211, 211],
|
|
790
|
+
"lightgreen": [144, 238, 144],
|
|
791
|
+
"lightgrey": [211, 211, 211],
|
|
792
|
+
"lightpink": [255, 182, 193],
|
|
793
|
+
"lightsalmon": [255, 160, 122],
|
|
794
|
+
"lightseagreen": [32, 178, 170],
|
|
795
|
+
"lightskyblue": [135, 206, 250],
|
|
796
|
+
"lightslategray": [119, 136, 153],
|
|
797
|
+
"lightslategrey": [119, 136, 153],
|
|
798
|
+
"lightsteelblue": [176, 196, 222],
|
|
799
|
+
"lightyellow": [255, 255, 224],
|
|
800
|
+
"lime": [0, 255, 0],
|
|
801
|
+
"limegreen": [50, 205, 50],
|
|
802
|
+
"linen": [250, 240, 230],
|
|
803
|
+
"magenta": [255, 0, 255],
|
|
804
|
+
"maroon": [128, 0, 0],
|
|
805
|
+
"mediumaquamarine": [102, 205, 170],
|
|
806
|
+
"mediumblue": [0, 0, 205],
|
|
807
|
+
"mediumorchid": [186, 85, 211],
|
|
808
|
+
"mediumpurple": [147, 112, 219],
|
|
809
|
+
"mediumseagreen": [60, 179, 113],
|
|
810
|
+
"mediumslateblue": [123, 104, 238],
|
|
811
|
+
"mediumspringgreen": [0, 250, 154],
|
|
812
|
+
"mediumturquoise": [72, 209, 204],
|
|
813
|
+
"mediumvioletred": [199, 21, 133],
|
|
814
|
+
"midnightblue": [25, 25, 112],
|
|
815
|
+
"mintcream": [245, 255, 250],
|
|
816
|
+
"mistyrose": [255, 228, 225],
|
|
817
|
+
"moccasin": [255, 228, 181],
|
|
818
|
+
"navajowhite": [255, 222, 173],
|
|
819
|
+
"navy": [0, 0, 128],
|
|
820
|
+
"oldlace": [253, 245, 230],
|
|
821
|
+
"olive": [128, 128, 0],
|
|
822
|
+
"olivedrab": [107, 142, 35],
|
|
823
|
+
"orange": [255, 165, 0],
|
|
824
|
+
"orangered": [255, 69, 0],
|
|
825
|
+
"orchid": [218, 112, 214],
|
|
826
|
+
"palegoldenrod": [238, 232, 170],
|
|
827
|
+
"palegreen": [152, 251, 152],
|
|
828
|
+
"paleturquoise": [175, 238, 238],
|
|
829
|
+
"palevioletred": [219, 112, 147],
|
|
830
|
+
"papayawhip": [255, 239, 213],
|
|
831
|
+
"peachpuff": [255, 218, 185],
|
|
832
|
+
"peru": [205, 133, 63],
|
|
833
|
+
"pink": [255, 192, 203],
|
|
834
|
+
"plum": [221, 160, 221],
|
|
835
|
+
"powderblue": [176, 224, 230],
|
|
836
|
+
"purple": [128, 0, 128],
|
|
837
|
+
"rebeccapurple": [102, 51, 153],
|
|
838
|
+
"red": [255, 0, 0],
|
|
839
|
+
"rosybrown": [188, 143, 143],
|
|
840
|
+
"royalblue": [65, 105, 225],
|
|
841
|
+
"saddlebrown": [139, 69, 19],
|
|
842
|
+
"salmon": [250, 128, 114],
|
|
843
|
+
"sandybrown": [244, 164, 96],
|
|
844
|
+
"seagreen": [46, 139, 87],
|
|
845
|
+
"seashell": [255, 245, 238],
|
|
846
|
+
"sienna": [160, 82, 45],
|
|
847
|
+
"silver": [192, 192, 192],
|
|
848
|
+
"skyblue": [135, 206, 235],
|
|
849
|
+
"slateblue": [106, 90, 205],
|
|
850
|
+
"slategray": [112, 128, 144],
|
|
851
|
+
"slategrey": [112, 128, 144],
|
|
852
|
+
"snow": [255, 250, 250],
|
|
853
|
+
"springgreen": [0, 255, 127],
|
|
854
|
+
"steelblue": [70, 130, 180],
|
|
855
|
+
"tan": [210, 180, 140],
|
|
856
|
+
"teal": [0, 128, 128],
|
|
857
|
+
"thistle": [216, 191, 216],
|
|
858
|
+
"tomato": [255, 99, 71],
|
|
859
|
+
"turquoise": [64, 224, 208],
|
|
860
|
+
"violet": [238, 130, 238],
|
|
861
|
+
"wheat": [245, 222, 179],
|
|
862
|
+
"white": [255, 255, 255],
|
|
863
|
+
"whitesmoke": [245, 245, 245],
|
|
864
|
+
"yellow": [255, 255, 0],
|
|
865
|
+
"yellowgreen": [154, 205, 50]
|
|
866
|
+
};
|
|
867
|
+
return colorName$1;
|
|
868
|
+
}
|
|
869
|
+
var colorNameExports = requireColorName();
|
|
870
|
+
var colorName = /*@__PURE__*/getDefaultExportFromCjs$1(colorNameExports);
|
|
796
871
|
var pattern$8 = /^#([a-f0-9]{3,4}|[a-f0-9]{4}(?:[a-f0-9]{2}){1,2})\b$/;
|
|
797
872
|
var hexRe$1 = new RegExp(pattern$8, 'i');
|
|
798
873
|
var float$1 = '-?\\d*(?:\\.\\d+)';
|
|
@@ -813,7 +888,7 @@ var pattern$6$1 = "^\n rgba?\\(\n \\s*".concat(percentage$1, "\n \\s+").c
|
|
|
813
888
|
var rgb4PercentageRe$1 = new RegExp(pattern$6$1);
|
|
814
889
|
var pattern$7$1 = /^transparent$/;
|
|
815
890
|
var transparentRe$1 = new RegExp(pattern$7$1, 'i');
|
|
816
|
-
var clamp$
|
|
891
|
+
var clamp$1 = function clamp$1(num, min, max) {
|
|
817
892
|
return Math.min(Math.max(min, num), max);
|
|
818
893
|
};
|
|
819
894
|
|
|
@@ -821,19 +896,19 @@ var clamp$3 = function clamp$3(num, min, max) {
|
|
|
821
896
|
var parseRGB$1 = function parseRGB$1(num) {
|
|
822
897
|
var n = num;
|
|
823
898
|
if (typeof n !== 'number') n = n.endsWith('%') ? parseFloat(n) * 255 / 100 : parseFloat(n);
|
|
824
|
-
return clamp$
|
|
899
|
+
return clamp$1(Math.round(n), 0, 255);
|
|
825
900
|
};
|
|
826
901
|
|
|
827
902
|
/* 200 => 100, -100 => 0, 50 => 50 */
|
|
828
903
|
var parsePercentage$1 = function parsePercentage$1(percentage) {
|
|
829
|
-
return clamp$
|
|
904
|
+
return clamp$1(parseFloat(percentage), 0, 100);
|
|
830
905
|
};
|
|
831
906
|
|
|
832
907
|
/* '50%' => 5.0, 200 => 1, -10 => 0 */
|
|
833
908
|
function parseAlpha$1(alpha) {
|
|
834
909
|
var a = alpha;
|
|
835
910
|
if (typeof a !== 'number') a = a.endsWith('%') ? parseFloat(a) / 100 : parseFloat(a);
|
|
836
|
-
return clamp$
|
|
911
|
+
return clamp$1(a, 0, 1);
|
|
837
912
|
}
|
|
838
913
|
function getHEX$1(hex) {
|
|
839
914
|
var _hex2Rgb = hexRgb(hex, {
|
|
@@ -901,65 +976,6 @@ var parseCSSColor$1 = function parseCSSColor$1(str) {
|
|
|
901
976
|
if (cn) return getRGB$1([null, cn[0], cn[1], cn[2], 1]);
|
|
902
977
|
return null;
|
|
903
978
|
};
|
|
904
|
-
function hsl2rgb(hsl) {
|
|
905
|
-
var h = hsl[0] / 360,
|
|
906
|
-
s = hsl[1] / 100,
|
|
907
|
-
l = hsl[2] / 100,
|
|
908
|
-
t1,
|
|
909
|
-
t2,
|
|
910
|
-
t3,
|
|
911
|
-
rgb,
|
|
912
|
-
val;
|
|
913
|
-
if (s == 0) {
|
|
914
|
-
val = l * 255;
|
|
915
|
-
return [val, val, val];
|
|
916
|
-
}
|
|
917
|
-
if (l < 0.5) t2 = l * (1 + s);else t2 = l + s - l * s;
|
|
918
|
-
t1 = 2 * l - t2;
|
|
919
|
-
rgb = [0, 0, 0];
|
|
920
|
-
for (var i = 0; i < 3; i++) {
|
|
921
|
-
t3 = h + 1 / 3 * -(i - 1);
|
|
922
|
-
t3 < 0 && t3++;
|
|
923
|
-
t3 > 1 && t3--;
|
|
924
|
-
if (6 * t3 < 1) val = t1 + (t2 - t1) * 6 * t3;else if (2 * t3 < 1) val = t2;else if (3 * t3 < 2) val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;else val = t1;
|
|
925
|
-
rgb[i] = val * 255;
|
|
926
|
-
}
|
|
927
|
-
return rgb;
|
|
928
|
-
}
|
|
929
|
-
var hsl2rgb_1 = hsl2rgb;
|
|
930
|
-
function clamp$2(val, min, max) {
|
|
931
|
-
return Math.min(Math.max(val, min), max);
|
|
932
|
-
}
|
|
933
|
-
var clamp_1 = clamp$2;
|
|
934
|
-
var clamp$1 = clamp_1;
|
|
935
|
-
function componentToHex(c) {
|
|
936
|
-
var value = Math.round(clamp$1(c, 0, 255));
|
|
937
|
-
var hex = value.toString(16);
|
|
938
|
-
return hex.length == 1 ? "0" + hex : hex;
|
|
939
|
-
}
|
|
940
|
-
function rgb2hex(rgb) {
|
|
941
|
-
var alpha = rgb.length === 4 ? componentToHex(rgb[3] * 255) : "";
|
|
942
|
-
return "#" + componentToHex(rgb[0]) + componentToHex(rgb[1]) + componentToHex(rgb[2]) + alpha;
|
|
943
|
-
}
|
|
944
|
-
var rgb2hex_1 = rgb2hex;
|
|
945
|
-
function rgb2hsl(rgb) {
|
|
946
|
-
var r = rgb[0] / 255,
|
|
947
|
-
g = rgb[1] / 255,
|
|
948
|
-
b = rgb[2] / 255,
|
|
949
|
-
min = Math.min(r, g, b),
|
|
950
|
-
max = Math.max(r, g, b),
|
|
951
|
-
delta = max - min,
|
|
952
|
-
h,
|
|
953
|
-
s,
|
|
954
|
-
l;
|
|
955
|
-
if (max == min) h = 0;else if (r == max) h = (g - b) / delta;else if (g == max) h = 2 + (b - r) / delta;else if (b == max) h = 4 + (r - g) / delta;
|
|
956
|
-
h = Math.min(h * 60, 360);
|
|
957
|
-
if (h < 0) h += 360;
|
|
958
|
-
l = (min + max) / 2;
|
|
959
|
-
if (max == min) s = 0;else if (l <= 0.5) s = delta / (max + min);else s = delta / (2 - max - min);
|
|
960
|
-
return [h, s * 100, l * 100];
|
|
961
|
-
}
|
|
962
|
-
var rgb2hsl_1 = rgb2hsl;
|
|
963
979
|
|
|
964
980
|
/**
|
|
965
981
|
* mix-css-color
|
|
@@ -1241,9 +1257,8 @@ var Values = /*#__PURE__*/function () {
|
|
|
1241
1257
|
return Values;
|
|
1242
1258
|
}();
|
|
1243
1259
|
Values.VERSION = 'v2.1.1';
|
|
1244
|
-
var Values$1 = Values;
|
|
1245
1260
|
var mixColor = function mixColor(color) {
|
|
1246
|
-
var colorValues = new Values
|
|
1261
|
+
var colorValues = new Values(color);
|
|
1247
1262
|
return {
|
|
1248
1263
|
tint: function tint(step) {
|
|
1249
1264
|
return colorValues.tint(step).hexString();
|
|
@@ -2915,7 +2930,7 @@ var getPinInputTheme = function getPinInputTheme(theme) {
|
|
|
2915
2930
|
var space = {
|
|
2916
2931
|
spacer: theme.space.medium,
|
|
2917
2932
|
errorMessagePadding: theme.space.xsmall,
|
|
2918
|
-
hiddenInputText: theme.space.
|
|
2933
|
+
hiddenInputText: theme.space.xlarge,
|
|
2919
2934
|
hiddenInputHorrizontalPadding: theme.space.small
|
|
2920
2935
|
};
|
|
2921
2936
|
var radii = {
|
|
@@ -8518,7 +8533,6 @@ var BottomNavigation = function BottomNavigation(_ref) {
|
|
|
8518
8533
|
selectedTabKey = _ref.selectedTabKey,
|
|
8519
8534
|
tabs = _ref.tabs,
|
|
8520
8535
|
nativeProps = _objectWithoutProperties(_ref, _excluded$s);
|
|
8521
|
-
useDeprecation('BottomNavigation is deprecated and will be removed in the next major release. Please remove it.');
|
|
8522
8536
|
var insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
8523
8537
|
/**
|
|
8524
8538
|
* List of loaded tabs, tabs will be loaded when navigated to.
|
|
@@ -15556,7 +15570,6 @@ var StyledHiddenInput = index$9(reactNative.TextInput)(function (_ref6) {
|
|
|
15556
15570
|
top: 0,
|
|
15557
15571
|
right: 0,
|
|
15558
15572
|
width: themePinLength * cellWidth + (themePinLength - 1) * spacerWidth,
|
|
15559
|
-
overflow: 'hidden',
|
|
15560
15573
|
height: '100%',
|
|
15561
15574
|
fontSize: theme.__hd__.pinInput.fontSizes.hiddenInputText,
|
|
15562
15575
|
letterSpacing: theme.__hd__.pinInput.space.hiddenInputText,
|
|
@@ -15646,6 +15659,7 @@ var PinInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
15646
15659
|
error: error
|
|
15647
15660
|
});
|
|
15648
15661
|
var trimmedValue = normalizeValue(value, length);
|
|
15662
|
+
var maskedValueWithExtraSpace = reactNative.Platform.OS === 'android' && !trimmedValue ? '*' : trimmedValue;
|
|
15649
15663
|
var focus = React.useCallback(function () {
|
|
15650
15664
|
if (inputRef !== null && inputRef !== void 0 && inputRef.current) {
|
|
15651
15665
|
inputRef.current.focus();
|
|
@@ -15659,20 +15673,13 @@ var PinInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
15659
15673
|
}
|
|
15660
15674
|
}, []);
|
|
15661
15675
|
var changeText = React.useCallback(function (text) {
|
|
15676
|
+
// Prevent user from entering more than the length
|
|
15662
15677
|
var trimmedPin = normalizeValue(text, length);
|
|
15663
|
-
|
|
15664
|
-
if (trimmedValue.length === length && trimmedValue.length <= text.length) {
|
|
15665
|
-
// Slice the text, starting from the length position
|
|
15666
|
-
var slicedText = text.slice(length);
|
|
15667
|
-
onChangeText === null || onChangeText === void 0 || onChangeText(normalizeValue(slicedText, length));
|
|
15668
|
-
} else {
|
|
15669
|
-
// Prevent user from entering more than the length
|
|
15670
|
-
onChangeText === null || onChangeText === void 0 || onChangeText(trimmedPin);
|
|
15671
|
-
}
|
|
15678
|
+
onChangeText === null || onChangeText === void 0 || onChangeText(trimmedPin);
|
|
15672
15679
|
if (trimmedPin.length === length) {
|
|
15673
15680
|
onFulfill === null || onFulfill === void 0 || onFulfill(trimmedPin);
|
|
15674
15681
|
}
|
|
15675
|
-
}, [length, onChangeText, onFulfill
|
|
15682
|
+
}, [length, onChangeText, onFulfill]);
|
|
15676
15683
|
React.useEffect(function () {
|
|
15677
15684
|
// Must run after animations for keyboard to automatically open
|
|
15678
15685
|
if (autoFocus) {
|
|
@@ -15705,7 +15712,7 @@ var PinInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
15705
15712
|
}), /*#__PURE__*/React__default["default"].createElement(StyledErrorMessage, null, error)), /*#__PURE__*/React__default["default"].createElement(StyledHiddenInput, {
|
|
15706
15713
|
themePinLength: length,
|
|
15707
15714
|
ref: inputRef,
|
|
15708
|
-
value:
|
|
15715
|
+
value: maskedValueWithExtraSpace,
|
|
15709
15716
|
onChangeText: changeText,
|
|
15710
15717
|
secureTextEntry: secure,
|
|
15711
15718
|
editable: !disabled,
|
|
@@ -15717,11 +15724,7 @@ var PinInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
15717
15724
|
testID: "pin-hidden-input",
|
|
15718
15725
|
textContentType: textContentType,
|
|
15719
15726
|
autoComplete: autoComplete,
|
|
15720
|
-
selectTextOnFocus: false
|
|
15721
|
-
selection: {
|
|
15722
|
-
start: trimmedValue.length,
|
|
15723
|
-
end: trimmedValue.length + 1
|
|
15724
|
-
}
|
|
15727
|
+
selectTextOnFocus: false
|
|
15725
15728
|
}));
|
|
15726
15729
|
});
|
|
15727
15730
|
PinInput.displayName = 'PinInput';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hero-design/rn",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.65.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -93,6 +93,5 @@
|
|
|
93
93
|
"ts-jest": "^29.1.1",
|
|
94
94
|
"typescript": "4.8.4"
|
|
95
95
|
},
|
|
96
|
-
"prettier": "prettier-config-hd"
|
|
97
|
-
"react-native": "src/index.ts"
|
|
96
|
+
"prettier": "prettier-config-hd"
|
|
98
97
|
}
|
|
@@ -16,7 +16,6 @@ import {
|
|
|
16
16
|
} from './StyledBottomNavigation';
|
|
17
17
|
import { isIOS } from '../../utils/helpers';
|
|
18
18
|
import type { IconName } from '../Icon';
|
|
19
|
-
import { useDeprecation } from '../../utils/hooks';
|
|
20
19
|
|
|
21
20
|
export type BottomNavigationTabType = {
|
|
22
21
|
key: string;
|
|
@@ -72,9 +71,6 @@ const BottomNavigation = ({
|
|
|
72
71
|
tabs,
|
|
73
72
|
...nativeProps
|
|
74
73
|
}: BottomNavigationProps): JSX.Element => {
|
|
75
|
-
useDeprecation(
|
|
76
|
-
'BottomNavigation is deprecated and will be removed in the next major release. Please remove it.'
|
|
77
|
-
);
|
|
78
74
|
const insets = useSafeAreaInsets();
|
|
79
75
|
|
|
80
76
|
/**
|
|
@@ -70,7 +70,6 @@ export const StyledHiddenInput = styled(TextInput)<{ themePinLength: number }>(
|
|
|
70
70
|
top: 0,
|
|
71
71
|
right: 0,
|
|
72
72
|
width: themePinLength * cellWidth + (themePinLength - 1) * spacerWidth,
|
|
73
|
-
overflow: 'hidden',
|
|
74
73
|
height: '100%',
|
|
75
74
|
fontSize: theme.__hd__.pinInput.fontSizes.hiddenInputText,
|
|
76
75
|
letterSpacing: theme.__hd__.pinInput.space.hiddenInputText,
|