@salutejs/plasma-web 1.601.0-canary.2358.19738569895.0 → 1.601.0-canary.2358.19740188284.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.
@@ -1,4 +1,4 @@
1
- export declare const Mask: import("react").ForwardRefExoticComponent<(Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
1
+ export declare const Mask: import("react").ForwardRefExoticComponent<(Omit<Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
2
2
  view: {
3
3
  default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
4
4
  positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
@@ -74,7 +74,7 @@ export declare const Mask: import("react").ForwardRefExoticComponent<(Omit<impor
74
74
  chipType?: never;
75
75
  chipView?: never;
76
76
  chipValidator?: never;
77
- } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & import("react").RefAttributes<HTMLInputElement> & import("@salutejs/plasma-new-hope/types/components/Mask/Mask.types").MaskProps, "ref"> | Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
77
+ } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLElement> & import("@salutejs/plasma-new-hope/types/components/Mask/Mask.types").MaskProps, "ref"> | Omit<Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
78
78
  view: {
79
79
  default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
80
80
  positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
@@ -152,7 +152,7 @@ export declare const Mask: import("react").ForwardRefExoticComponent<(Omit<impor
152
152
  chipValidator?: (value: string) => {
153
153
  view?: string;
154
154
  };
155
- } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & import("react").RefAttributes<HTMLInputElement> & import("@salutejs/plasma-new-hope/types/components/Mask/Mask.types").MaskProps, "ref"> | Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
155
+ } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLElement> & import("@salutejs/plasma-new-hope/types/components/Mask/Mask.types").MaskProps, "ref"> | Omit<Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
156
156
  view: {
157
157
  default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
158
158
  positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
@@ -228,7 +228,7 @@ export declare const Mask: import("react").ForwardRefExoticComponent<(Omit<impor
228
228
  chipType?: never;
229
229
  chipView?: never;
230
230
  chipValidator?: never;
231
- } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & import("react").RefAttributes<HTMLInputElement> & import("@salutejs/plasma-new-hope/types/components/Mask/Mask.types").MaskProps, "ref"> | Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
231
+ } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLElement> & import("@salutejs/plasma-new-hope/types/components/Mask/Mask.types").MaskProps, "ref"> | Omit<Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
232
232
  view: {
233
233
  default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
234
234
  positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
@@ -306,7 +306,7 @@ export declare const Mask: import("react").ForwardRefExoticComponent<(Omit<impor
306
306
  chipValidator?: (value: string) => {
307
307
  view?: string;
308
308
  };
309
- } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & import("react").RefAttributes<HTMLInputElement> & import("@salutejs/plasma-new-hope/types/components/Mask/Mask.types").MaskProps, "ref"> | Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
309
+ } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLElement> & import("@salutejs/plasma-new-hope/types/components/Mask/Mask.types").MaskProps, "ref"> | Omit<Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
310
310
  view: {
311
311
  default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
312
312
  positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
@@ -382,7 +382,7 @@ export declare const Mask: import("react").ForwardRefExoticComponent<(Omit<impor
382
382
  chipType?: never;
383
383
  chipView?: never;
384
384
  chipValidator?: never;
385
- } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & import("react").RefAttributes<HTMLInputElement> & import("@salutejs/plasma-new-hope/types/components/Mask/Mask.types").MaskProps, "ref"> | Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
385
+ } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLElement> & import("@salutejs/plasma-new-hope/types/components/Mask/Mask.types").MaskProps, "ref"> | Omit<Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
386
386
  view: {
387
387
  default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
388
388
  positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
@@ -460,7 +460,7 @@ export declare const Mask: import("react").ForwardRefExoticComponent<(Omit<impor
460
460
  chipValidator?: (value: string) => {
461
461
  view?: string;
462
462
  };
463
- } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & import("react").RefAttributes<HTMLInputElement> & import("@salutejs/plasma-new-hope/types/components/Mask/Mask.types").MaskProps, "ref"> | Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
463
+ } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLElement> & import("@salutejs/plasma-new-hope/types/components/Mask/Mask.types").MaskProps, "ref"> | Omit<Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
464
464
  view: {
465
465
  default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
466
466
  positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
@@ -536,7 +536,7 @@ export declare const Mask: import("react").ForwardRefExoticComponent<(Omit<impor
536
536
  chipType?: never;
537
537
  chipView?: never;
538
538
  chipValidator?: never;
539
- } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & import("react").RefAttributes<HTMLInputElement> & import("@salutejs/plasma-new-hope/types/components/Mask/Mask.types").MaskProps, "ref"> | Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
539
+ } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLElement> & import("@salutejs/plasma-new-hope/types/components/Mask/Mask.types").MaskProps, "ref"> | Omit<Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
540
540
  view: {
541
541
  default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
542
542
  positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
@@ -614,4 +614,4 @@ export declare const Mask: import("react").ForwardRefExoticComponent<(Omit<impor
614
614
  chipValidator?: (value: string) => {
615
615
  view?: string;
616
616
  };
617
- } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & import("react").RefAttributes<HTMLInputElement> & import("@salutejs/plasma-new-hope/types/components/Mask/Mask.types").MaskProps, "ref">) & import("react").RefAttributes<HTMLInputElement>>;
617
+ } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLElement> & import("@salutejs/plasma-new-hope/types/components/Mask/Mask.types").MaskProps, "ref">) & import("react").RefAttributes<HTMLInputElement>>;
@@ -689,7 +689,7 @@ export declare const TextFieldClear: React.FunctionComponent<import("@salutejs/p
689
689
  view?: string;
690
690
  };
691
691
  } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & React.RefAttributes<HTMLInputElement>))>;
692
- export declare const TextFieldComponent: React.FC<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
692
+ export declare const TextFieldComponent: React.ForwardRefExoticComponent<(Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
693
693
  view: {
694
694
  default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
695
695
  positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
@@ -728,7 +728,7 @@ export declare const TextFieldComponent: React.FC<import("@salutejs/plasma-new-h
728
728
  readOnly: {
729
729
  true: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
730
730
  };
731
- }> & (({
731
+ }> & {
732
732
  appearance?: "default" | "clear";
733
733
  size?: string;
734
734
  view?: string;
@@ -765,7 +765,46 @@ export declare const TextFieldComponent: React.FC<import("@salutejs/plasma-new-h
765
765
  chipType?: never;
766
766
  chipView?: never;
767
767
  chipValidator?: never;
768
- } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & React.RefAttributes<HTMLInputElement>) | ({
768
+ } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
769
+ view: {
770
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
771
+ positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
772
+ warning: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
773
+ negative: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
774
+ };
775
+ size: {
776
+ xl: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
777
+ l: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
778
+ m: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
779
+ s: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
780
+ xs: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
781
+ };
782
+ labelPlacement: {
783
+ inner: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
784
+ outer: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
785
+ };
786
+ chipView: {
787
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
788
+ secondary: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
789
+ accent: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
790
+ positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
791
+ warning: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
792
+ negative: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
793
+ };
794
+ hintView: {
795
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
796
+ };
797
+ hintSize: {
798
+ m: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
799
+ s: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
800
+ };
801
+ disabled: {
802
+ true: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
803
+ };
804
+ readOnly: {
805
+ true: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
806
+ };
807
+ }> & {
769
808
  appearance?: "default" | "clear";
770
809
  size?: string;
771
810
  view?: string;
@@ -804,7 +843,46 @@ export declare const TextFieldComponent: React.FC<import("@salutejs/plasma-new-h
804
843
  chipValidator?: (value: string) => {
805
844
  view?: string;
806
845
  };
807
- } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & React.RefAttributes<HTMLInputElement>) | ({
846
+ } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
847
+ view: {
848
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
849
+ positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
850
+ warning: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
851
+ negative: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
852
+ };
853
+ size: {
854
+ xl: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
855
+ l: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
856
+ m: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
857
+ s: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
858
+ xs: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
859
+ };
860
+ labelPlacement: {
861
+ inner: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
862
+ outer: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
863
+ };
864
+ chipView: {
865
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
866
+ secondary: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
867
+ accent: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
868
+ positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
869
+ warning: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
870
+ negative: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
871
+ };
872
+ hintView: {
873
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
874
+ };
875
+ hintSize: {
876
+ m: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
877
+ s: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
878
+ };
879
+ disabled: {
880
+ true: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
881
+ };
882
+ readOnly: {
883
+ true: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
884
+ };
885
+ }> & {
808
886
  appearance?: "default" | "clear";
809
887
  size?: string;
810
888
  view?: string;
@@ -841,7 +919,46 @@ export declare const TextFieldComponent: React.FC<import("@salutejs/plasma-new-h
841
919
  chipType?: never;
842
920
  chipView?: never;
843
921
  chipValidator?: never;
844
- } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & React.RefAttributes<HTMLInputElement>) | ({
922
+ } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
923
+ view: {
924
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
925
+ positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
926
+ warning: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
927
+ negative: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
928
+ };
929
+ size: {
930
+ xl: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
931
+ l: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
932
+ m: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
933
+ s: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
934
+ xs: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
935
+ };
936
+ labelPlacement: {
937
+ inner: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
938
+ outer: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
939
+ };
940
+ chipView: {
941
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
942
+ secondary: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
943
+ accent: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
944
+ positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
945
+ warning: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
946
+ negative: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
947
+ };
948
+ hintView: {
949
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
950
+ };
951
+ hintSize: {
952
+ m: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
953
+ s: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
954
+ };
955
+ disabled: {
956
+ true: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
957
+ };
958
+ readOnly: {
959
+ true: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
960
+ };
961
+ }> & {
845
962
  appearance?: "default" | "clear";
846
963
  size?: string;
847
964
  view?: string;
@@ -880,7 +997,46 @@ export declare const TextFieldComponent: React.FC<import("@salutejs/plasma-new-h
880
997
  chipValidator?: (value: string) => {
881
998
  view?: string;
882
999
  };
883
- } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & React.RefAttributes<HTMLInputElement>) | ({
1000
+ } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
1001
+ view: {
1002
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1003
+ positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1004
+ warning: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1005
+ negative: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1006
+ };
1007
+ size: {
1008
+ xl: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1009
+ l: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1010
+ m: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1011
+ s: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1012
+ xs: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1013
+ };
1014
+ labelPlacement: {
1015
+ inner: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1016
+ outer: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1017
+ };
1018
+ chipView: {
1019
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1020
+ secondary: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1021
+ accent: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1022
+ positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1023
+ warning: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1024
+ negative: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1025
+ };
1026
+ hintView: {
1027
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1028
+ };
1029
+ hintSize: {
1030
+ m: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1031
+ s: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1032
+ };
1033
+ disabled: {
1034
+ true: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1035
+ };
1036
+ readOnly: {
1037
+ true: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1038
+ };
1039
+ }> & {
884
1040
  appearance?: "default" | "clear";
885
1041
  size?: string;
886
1042
  view?: string;
@@ -917,7 +1073,46 @@ export declare const TextFieldComponent: React.FC<import("@salutejs/plasma-new-h
917
1073
  chipType?: never;
918
1074
  chipView?: never;
919
1075
  chipValidator?: never;
920
- } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & React.RefAttributes<HTMLInputElement>) | ({
1076
+ } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
1077
+ view: {
1078
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1079
+ positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1080
+ warning: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1081
+ negative: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1082
+ };
1083
+ size: {
1084
+ xl: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1085
+ l: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1086
+ m: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1087
+ s: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1088
+ xs: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1089
+ };
1090
+ labelPlacement: {
1091
+ inner: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1092
+ outer: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1093
+ };
1094
+ chipView: {
1095
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1096
+ secondary: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1097
+ accent: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1098
+ positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1099
+ warning: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1100
+ negative: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1101
+ };
1102
+ hintView: {
1103
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1104
+ };
1105
+ hintSize: {
1106
+ m: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1107
+ s: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1108
+ };
1109
+ disabled: {
1110
+ true: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1111
+ };
1112
+ readOnly: {
1113
+ true: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1114
+ };
1115
+ }> & {
921
1116
  appearance?: "default" | "clear";
922
1117
  size?: string;
923
1118
  view?: string;
@@ -956,7 +1151,46 @@ export declare const TextFieldComponent: React.FC<import("@salutejs/plasma-new-h
956
1151
  chipValidator?: (value: string) => {
957
1152
  view?: string;
958
1153
  };
959
- } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & React.RefAttributes<HTMLInputElement>) | ({
1154
+ } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
1155
+ view: {
1156
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1157
+ positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1158
+ warning: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1159
+ negative: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1160
+ };
1161
+ size: {
1162
+ xl: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1163
+ l: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1164
+ m: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1165
+ s: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1166
+ xs: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1167
+ };
1168
+ labelPlacement: {
1169
+ inner: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1170
+ outer: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1171
+ };
1172
+ chipView: {
1173
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1174
+ secondary: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1175
+ accent: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1176
+ positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1177
+ warning: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1178
+ negative: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1179
+ };
1180
+ hintView: {
1181
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1182
+ };
1183
+ hintSize: {
1184
+ m: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1185
+ s: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1186
+ };
1187
+ disabled: {
1188
+ true: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1189
+ };
1190
+ readOnly: {
1191
+ true: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1192
+ };
1193
+ }> & {
960
1194
  appearance?: "default" | "clear";
961
1195
  size?: string;
962
1196
  view?: string;
@@ -993,7 +1227,46 @@ export declare const TextFieldComponent: React.FC<import("@salutejs/plasma-new-h
993
1227
  chipType?: never;
994
1228
  chipView?: never;
995
1229
  chipValidator?: never;
996
- } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & React.RefAttributes<HTMLInputElement>) | ({
1230
+ } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
1231
+ view: {
1232
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1233
+ positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1234
+ warning: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1235
+ negative: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1236
+ };
1237
+ size: {
1238
+ xl: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1239
+ l: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1240
+ m: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1241
+ s: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1242
+ xs: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1243
+ };
1244
+ labelPlacement: {
1245
+ inner: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1246
+ outer: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1247
+ };
1248
+ chipView: {
1249
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1250
+ secondary: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1251
+ accent: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1252
+ positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1253
+ warning: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1254
+ negative: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1255
+ };
1256
+ hintView: {
1257
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1258
+ };
1259
+ hintSize: {
1260
+ m: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1261
+ s: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1262
+ };
1263
+ disabled: {
1264
+ true: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1265
+ };
1266
+ readOnly: {
1267
+ true: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
1268
+ };
1269
+ }> & {
997
1270
  appearance?: "default" | "clear";
998
1271
  size?: string;
999
1272
  view?: string;
@@ -1032,7 +1305,7 @@ export declare const TextFieldComponent: React.FC<import("@salutejs/plasma-new-h
1032
1305
  chipValidator?: (value: string) => {
1033
1306
  view?: string;
1034
1307
  };
1035
- } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & React.RefAttributes<HTMLInputElement>))>;
1308
+ } & Omit<import("@salutejs/plasma-new-hope/styled-components").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & React.RefAttributes<HTMLInputElement>, "ref">) & React.RefAttributes<HTMLElement>>;
1036
1309
  type newHopeTextFieldProps = React.ComponentProps<typeof TextFieldComponent>;
1037
1310
  type ClearProps = {
1038
1311
  /**
@@ -1115,7 +1388,7 @@ type TextFieldProps = Omit<TextFieldPropsOld, 'helperText'> & {
1115
1388
  */
1116
1389
  helperText?: ReactNode;
1117
1390
  } & ClearProps & HintProps;
1118
- export type CustomTextFieldProps = TextFieldProps & Pick<newHopeTextFieldProps, 'enumerationType' | 'chips' | 'chipType' | 'onChangeChips' | 'titleCaption' | 'labelPlacement' | 'keepPlaceholder' | 'required' | 'requiredPlacement' | 'optional' | 'chipView' | 'chipValidator' | 'textBefore' | 'textAfter'>;
1391
+ export type CustomTextFieldProps = TextFieldProps & Pick<newHopeTextFieldProps, 'appearance' | 'enumerationType' | 'chips' | 'chipType' | 'onChangeChips' | 'titleCaption' | 'labelPlacement' | 'keepPlaceholder' | 'required' | 'requiredPlacement' | 'optional' | 'chipView' | 'chipValidator' | 'textBefore' | 'textAfter'>;
1119
1392
  /**
1120
1393
  * Поле ввода текста.
1121
1394
  */
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.js","sources":["../../../../src-css/components/TextField/TextField.tsx"],"sourcesContent":["import React, { forwardRef, ReactNode } from 'react';\nimport type { TextFieldProps as TextFieldPropsOld } from '@salutejs/plasma-hope';\nimport {\n textFieldConfig,\n component,\n mergeConfig,\n createConditionalComponent,\n} from '@salutejs/plasma-new-hope';\nimport type { PopoverPlacement, PopoverPlacementBasic } from '@salutejs/plasma-new-hope';\n\nimport { config } from './TextField.config';\nimport { config as clearConfig } from './TextField.clear.config';\n\nconst mergedConfigDefault = mergeConfig(textFieldConfig, config);\nexport const TextFieldDefault = component(mergedConfigDefault);\n\nconst mergedConfigClear = mergeConfig(textFieldConfig, clearConfig);\nexport const TextFieldClear = component(mergedConfigClear);\n\nexport const TextFieldComponent = createConditionalComponent(TextFieldDefault, [\n {\n conditions: { prop: 'appearance', value: 'clear' },\n component: TextFieldClear,\n },\n]);\n\ntype newHopeTextFieldProps = React.ComponentProps<typeof TextFieldComponent>;\n\ntype ClearProps =\n | {\n /**\n * view применяется с clear-токенами\n */\n clear?: boolean;\n /**\n * отобразить ли divider\n */\n hasDivider?: boolean;\n }\n | {\n /**\n * view применяется с clear-токенами\n */\n clear?: false;\n /**\n * отобразить ли divider\n */\n hasDivider?: never;\n };\n\ntype HintProps =\n | {\n /**\n * Текст тултипа\n */\n hintText: string;\n /**\n * Способ открытия тултипа - наведение или клик мышью\n */\n hintTrigger?: 'hover' | 'click';\n /**\n * Вид тултипа\n */\n hintView?: 'default';\n /**\n * Размер тултипа\n */\n hintSize?: 's' | 'm';\n /**\n * Элемент, рядом с которым произойдет вызов всплывающего окна.\n * Если свойство не задано, применится иконка по умолчанию.\n */\n hintTarget?: ReactNode;\n /**\n * Направление раскрытия тултипа.\n */\n hintPlacement?: PopoverPlacement | Array<PopoverPlacementBasic>;\n /**\n * Видимость стрелки (хвоста).\n */\n hintHasArrow?: boolean;\n /**\n * Отступ окна относительно элемента, у которого оно вызвано.\n * @default\n * [0, 8]\n */\n hintOffset?: [number, number];\n /**\n * Ширина окна (в rem).\n */\n hintWidth?: string;\n /**\n * Слот для контента слева, например `Icon`.\n */\n hintContentLeft?: ReactNode;\n }\n | {\n hintTrigger?: never;\n hintText?: never;\n hintView?: never;\n hintSize?: never;\n hintTarget?: never;\n hintPlacement?: never;\n hintHasArrow?: never;\n hintOffset?: never;\n hintWidth?: never;\n hintContentLeft?: never;\n };\n\ntype TextFieldProps = Omit<TextFieldPropsOld, 'helperText'> & {\n /**\n * Подсказка для поля ввода.\n */\n helperText?: ReactNode;\n} & ClearProps &\n HintProps;\n\nexport type CustomTextFieldProps = TextFieldProps &\n Pick<\n newHopeTextFieldProps,\n | 'enumerationType'\n | 'chips'\n | 'chipType'\n | 'onChangeChips'\n | 'titleCaption'\n | 'labelPlacement'\n | 'keepPlaceholder'\n | 'required'\n | 'requiredPlacement'\n | 'optional'\n | 'chipView'\n | 'chipValidator'\n | 'textBefore'\n | 'textAfter'\n >;\n\nconst statusToView: Record<NonNullable<TextFieldProps['status']>, NonNullable<newHopeTextFieldProps['view']>> = {\n success: 'positive',\n warning: 'warning',\n error: 'negative',\n};\nconst animatedHintToLabelPlacement: Record<\n NonNullable<TextFieldProps['animatedHint']>,\n NonNullable<newHopeTextFieldProps['labelPlacement']>\n> = {\n placeholder: 'outer',\n label: 'inner',\n};\n\n/**\n * Поле ввода текста.\n */\nexport const TextField = forwardRef<HTMLInputElement, CustomTextFieldProps>((props, ref) => {\n const {\n status,\n\n label,\n keepPlaceholder,\n placeholder,\n animatedHint,\n helperText,\n hintText,\n\n enumerationType,\n chips,\n chipView,\n chipValidator,\n onSearch,\n onChangeChips,\n chipType,\n\n size = 'l',\n\n ...rest\n } = props;\n\n /** TODO: #1064 Remove In plasma-2.0 */\n /* eslint-disable no-underscore-dangle */\n const _view = status ? statusToView[status] : 'default';\n let _labelPlacement = animatedHint ? animatedHintToLabelPlacement[animatedHint] : 'outer';\n let _label = label ? String(label) : undefined;\n\n if (size !== 'l' && _labelPlacement === 'inner' && !keepPlaceholder) {\n _label = undefined;\n _labelPlacement = 'outer';\n }\n\n if (size === 'l' && animatedHint === 'placeholder' && !label) {\n _label = placeholder;\n _labelPlacement = 'inner';\n }\n\n const labelProps = {\n label: _label,\n labelPlacement: _labelPlacement,\n keepPlaceholder,\n };\n\n if (enumerationType === 'chip') {\n return (\n <TextFieldComponent\n {...rest}\n {...labelProps}\n view={_view}\n size={size}\n placeholder={placeholder}\n leftHelper={helperText}\n ref={ref}\n enumerationType=\"chip\"\n chips={chips}\n chipView={chipView}\n chipValidator={chipValidator}\n hintText={String(hintText || '')}\n onChangeChips={onChangeChips}\n chipType={chipType}\n />\n );\n }\n\n return (\n <TextFieldComponent\n {...rest}\n {...labelProps}\n view={_view}\n label={_label}\n size={size}\n placeholder={placeholder}\n leftHelper={helperText}\n ref={ref}\n enumerationType=\"plain\"\n hintText={String(hintText || '')}\n onSearch={onSearch}\n />\n );\n});\n"],"names":["mergedConfigDefault","mergeConfig","textFieldConfig","config","TextFieldDefault","component","mergedConfigClear","clearConfig","TextFieldClear","TextFieldComponent","createConditionalComponent","conditions","prop","value","statusToView","success","warning","error","animatedHintToLabelPlacement","placeholder","label","TextField","forwardRef","props","ref","status","keepPlaceholder","animatedHint","helperText","hintText","enumerationType","chips","chipView","chipValidator","onSearch","onChangeChips","chipType","_props$size","size","rest","_objectWithoutProperties","_excluded","_view","_labelPlacement","_label","String","undefined","labelProps","labelPlacement","React","createElement","_extends","view","leftHelper"],"mappings":";;;;;;;;;;;;;;;AAaA,IAAMA,mBAAmB,gBAAGC,yBAAW,CAACC,6BAAe,EAAEC,uBAAM,CAAC,CAAA;IACnDC,gBAAgB,gBAAGC,uBAAS,CAACL,mBAAmB,EAAC;AAE9D,IAAMM,iBAAiB,gBAAGL,yBAAW,CAACC,6BAAe,EAAEK,6BAAW,CAAC,CAAA;IACtDC,cAAc,gBAAGH,uBAAS,CAACC,iBAAiB,EAAC;IAE7CG,kBAAkB,gBAAGC,wCAA0B,CAACN,gBAAgB,EAAE,CAC3E;AACIO,EAAAA,UAAU,EAAE;AAAEC,IAAAA,IAAI,EAAE,YAAY;AAAEC,IAAAA,KAAK,EAAE,OAAA;GAAS;AAClDR,EAAAA,SAAS,EAAEG,cAAAA;AACf,CAAC,CACJ,EAAC;AAgHF,IAAMM,YAAuG,GAAG;AAC5GC,EAAAA,OAAO,EAAE,UAAU;AACnBC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,KAAK,EAAE,UAAA;AACX,CAAC,CAAA;AACD,IAAMC,4BAGL,GAAG;AACAC,EAAAA,WAAW,EAAE,OAAO;AACpBC,EAAAA,KAAK,EAAE,OAAA;AACX,CAAC,CAAA;;AAED;AACA;AACA;AACO,IAAMC,SAAS,gBAAGC,gBAAU,CAAyC,UAACC,KAAK,EAAEC,GAAG,EAAK;AACxF,EAAA,IACIC,MAAM,GAoBNF,KAAK,CApBLE,MAAM;IAENL,KAAK,GAkBLG,KAAK,CAlBLH,KAAK;IACLM,eAAe,GAiBfH,KAAK,CAjBLG,eAAe;IACfP,WAAW,GAgBXI,KAAK,CAhBLJ,WAAW;IACXQ,YAAY,GAeZJ,KAAK,CAfLI,YAAY;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Field.js","sources":["../../../../src-css/components/TextField/TextField.tsx"],"sourcesContent":["import React, { forwardRef, ReactNode } from 'react';\nimport type { TextFieldProps as TextFieldPropsOld } from '@salutejs/plasma-hope';\nimport {\n textFieldConfig,\n component,\n mergeConfig,\n createConditionalComponent,\n} from '@salutejs/plasma-new-hope';\nimport type { PopoverPlacement, PopoverPlacementBasic } from '@salutejs/plasma-new-hope';\n\nimport { config } from './TextField.config';\nimport { config as clearConfig } from './TextField.clear.config';\n\nconst mergedConfigDefault = mergeConfig(textFieldConfig, config);\nexport const TextFieldDefault = component(mergedConfigDefault);\n\nconst mergedConfigClear = mergeConfig(textFieldConfig, clearConfig);\nexport const TextFieldClear = component(mergedConfigClear);\n\nexport const TextFieldComponent = createConditionalComponent(TextFieldDefault, [\n {\n conditions: { prop: 'appearance', value: 'clear' },\n component: TextFieldClear,\n },\n]);\n\ntype newHopeTextFieldProps = React.ComponentProps<typeof TextFieldComponent>;\n\ntype ClearProps =\n | {\n /**\n * view применяется с clear-токенами\n */\n clear?: boolean;\n /**\n * отобразить ли divider\n */\n hasDivider?: boolean;\n }\n | {\n /**\n * view применяется с clear-токенами\n */\n clear?: false;\n /**\n * отобразить ли divider\n */\n hasDivider?: never;\n };\n\ntype HintProps =\n | {\n /**\n * Текст тултипа\n */\n hintText: string;\n /**\n * Способ открытия тултипа - наведение или клик мышью\n */\n hintTrigger?: 'hover' | 'click';\n /**\n * Вид тултипа\n */\n hintView?: 'default';\n /**\n * Размер тултипа\n */\n hintSize?: 's' | 'm';\n /**\n * Элемент, рядом с которым произойдет вызов всплывающего окна.\n * Если свойство не задано, применится иконка по умолчанию.\n */\n hintTarget?: ReactNode;\n /**\n * Направление раскрытия тултипа.\n */\n hintPlacement?: PopoverPlacement | Array<PopoverPlacementBasic>;\n /**\n * Видимость стрелки (хвоста).\n */\n hintHasArrow?: boolean;\n /**\n * Отступ окна относительно элемента, у которого оно вызвано.\n * @default\n * [0, 8]\n */\n hintOffset?: [number, number];\n /**\n * Ширина окна (в rem).\n */\n hintWidth?: string;\n /**\n * Слот для контента слева, например `Icon`.\n */\n hintContentLeft?: ReactNode;\n }\n | {\n hintTrigger?: never;\n hintText?: never;\n hintView?: never;\n hintSize?: never;\n hintTarget?: never;\n hintPlacement?: never;\n hintHasArrow?: never;\n hintOffset?: never;\n hintWidth?: never;\n hintContentLeft?: never;\n };\n\ntype TextFieldProps = Omit<TextFieldPropsOld, 'helperText'> & {\n /**\n * Подсказка для поля ввода.\n */\n helperText?: ReactNode;\n} & ClearProps &\n HintProps;\n\nexport type CustomTextFieldProps = TextFieldProps &\n Pick<\n newHopeTextFieldProps,\n | 'appearance'\n | 'enumerationType'\n | 'chips'\n | 'chipType'\n | 'onChangeChips'\n | 'titleCaption'\n | 'labelPlacement'\n | 'keepPlaceholder'\n | 'required'\n | 'requiredPlacement'\n | 'optional'\n | 'chipView'\n | 'chipValidator'\n | 'textBefore'\n | 'textAfter'\n >;\n\nconst statusToView: Record<NonNullable<TextFieldProps['status']>, NonNullable<newHopeTextFieldProps['view']>> = {\n success: 'positive',\n warning: 'warning',\n error: 'negative',\n};\nconst animatedHintToLabelPlacement: Record<\n NonNullable<TextFieldProps['animatedHint']>,\n NonNullable<newHopeTextFieldProps['labelPlacement']>\n> = {\n placeholder: 'outer',\n label: 'inner',\n};\n\n/**\n * Поле ввода текста.\n */\nexport const TextField = forwardRef<HTMLInputElement, CustomTextFieldProps>((props, ref) => {\n const {\n status,\n\n label,\n keepPlaceholder,\n placeholder,\n animatedHint,\n helperText,\n hintText,\n\n enumerationType,\n chips,\n chipView,\n chipValidator,\n onSearch,\n onChangeChips,\n chipType,\n\n size = 'l',\n\n ...rest\n } = props;\n\n /** TODO: #1064 Remove In plasma-2.0 */\n /* eslint-disable no-underscore-dangle */\n const _view = status ? statusToView[status] : 'default';\n let _labelPlacement = animatedHint ? animatedHintToLabelPlacement[animatedHint] : 'outer';\n let _label = label ? String(label) : undefined;\n\n if (size !== 'l' && _labelPlacement === 'inner' && !keepPlaceholder) {\n _label = undefined;\n _labelPlacement = 'outer';\n }\n\n if (size === 'l' && animatedHint === 'placeholder' && !label) {\n _label = placeholder;\n _labelPlacement = 'inner';\n }\n\n const labelProps = {\n label: _label,\n labelPlacement: _labelPlacement,\n keepPlaceholder,\n };\n\n if (enumerationType === 'chip') {\n return (\n <TextFieldComponent\n {...rest}\n {...labelProps}\n view={_view}\n size={size}\n placeholder={placeholder}\n leftHelper={helperText}\n ref={ref}\n enumerationType=\"chip\"\n chips={chips}\n chipView={chipView}\n chipValidator={chipValidator}\n hintText={String(hintText || '')}\n onChangeChips={onChangeChips}\n chipType={chipType}\n />\n );\n }\n\n return (\n <TextFieldComponent\n {...rest}\n {...labelProps}\n view={_view}\n label={_label}\n size={size}\n placeholder={placeholder}\n leftHelper={helperText}\n ref={ref}\n enumerationType=\"plain\"\n hintText={String(hintText || '')}\n onSearch={onSearch}\n />\n );\n});\n"],"names":["mergedConfigDefault","mergeConfig","textFieldConfig","config","TextFieldDefault","component","mergedConfigClear","clearConfig","TextFieldClear","TextFieldComponent","createConditionalComponent","conditions","prop","value","statusToView","success","warning","error","animatedHintToLabelPlacement","placeholder","label","TextField","forwardRef","props","ref","status","keepPlaceholder","animatedHint","helperText","hintText","enumerationType","chips","chipView","chipValidator","onSearch","onChangeChips","chipType","_props$size","size","rest","_objectWithoutProperties","_excluded","_view","_labelPlacement","_label","String","undefined","labelProps","labelPlacement","React","createElement","_extends","view","leftHelper"],"mappings":";;;;;;;;;;;;;;;AAaA,IAAMA,mBAAmB,gBAAGC,yBAAW,CAACC,6BAAe,EAAEC,uBAAM,CAAC,CAAA;IACnDC,gBAAgB,gBAAGC,uBAAS,CAACL,mBAAmB,EAAC;AAE9D,IAAMM,iBAAiB,gBAAGL,yBAAW,CAACC,6BAAe,EAAEK,6BAAW,CAAC,CAAA;IACtDC,cAAc,gBAAGH,uBAAS,CAACC,iBAAiB,EAAC;IAE7CG,kBAAkB,gBAAGC,wCAA0B,CAACN,gBAAgB,EAAE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EA,aAAc;AAC7BJ,MAAAA,QAAQ,EAAEgB,MAAM,CAAChB,QAAQ,IAAI,EAAE,CAAE;AACjCM,MAAAA,aAAa,EAAEA,aAAc;AAC7BC,MAAAA,QAAQ,EAAEA,QAAAA;AAAS,KAAA,CACtB,CAAC,CAAA;AAEV,GAAA;EAEA,oBACIa,sBAAA,CAAAC,aAAA,CAACzC,kBAAkB,EAAA0C,iCAAA,CAAA,EAAA,EACXZ,IAAI,EACJQ,UAAU,EAAA;AACdK,IAAAA,IAAI,EAAEV,KAAM;AACZtB,IAAAA,KAAK,EAAEwB,MAAO;AACdN,IAAAA,IAAI,EAAEA,IAAK;AACXnB,IAAAA,WAAW,EAAEA,WAAY;AACzBkC,IAAAA,UAAU,EAAEzB,UAAW;AACvBJ,IAAAA,GAAG,EAAEA,GAAI;AACTM,IAAAA,eAAe,EAAC,OAAO;AACvBD,IAAAA,QAAQ,EAAEgB,MAAM,CAAChB,QAAQ,IAAI,EAAE,CAAE;AACjCK,IAAAA,QAAQ,EAAEA,QAAAA;AAAS,GAAA,CACtB,CAAC,CAAA;AAEV,CAAC;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.js","sources":["../../../../src-css/components/TextField/TextField.tsx"],"sourcesContent":["import React, { forwardRef, ReactNode } from 'react';\nimport type { TextFieldProps as TextFieldPropsOld } from '@salutejs/plasma-hope';\nimport {\n textFieldConfig,\n component,\n mergeConfig,\n createConditionalComponent,\n} from '@salutejs/plasma-new-hope';\nimport type { PopoverPlacement, PopoverPlacementBasic } from '@salutejs/plasma-new-hope';\n\nimport { config } from './TextField.config';\nimport { config as clearConfig } from './TextField.clear.config';\n\nconst mergedConfigDefault = mergeConfig(textFieldConfig, config);\nexport const TextFieldDefault = component(mergedConfigDefault);\n\nconst mergedConfigClear = mergeConfig(textFieldConfig, clearConfig);\nexport const TextFieldClear = component(mergedConfigClear);\n\nexport const TextFieldComponent = createConditionalComponent(TextFieldDefault, [\n {\n conditions: { prop: 'appearance', value: 'clear' },\n component: TextFieldClear,\n },\n]);\n\ntype newHopeTextFieldProps = React.ComponentProps<typeof TextFieldComponent>;\n\ntype ClearProps =\n | {\n /**\n * view применяется с clear-токенами\n */\n clear?: boolean;\n /**\n * отобразить ли divider\n */\n hasDivider?: boolean;\n }\n | {\n /**\n * view применяется с clear-токенами\n */\n clear?: false;\n /**\n * отобразить ли divider\n */\n hasDivider?: never;\n };\n\ntype HintProps =\n | {\n /**\n * Текст тултипа\n */\n hintText: string;\n /**\n * Способ открытия тултипа - наведение или клик мышью\n */\n hintTrigger?: 'hover' | 'click';\n /**\n * Вид тултипа\n */\n hintView?: 'default';\n /**\n * Размер тултипа\n */\n hintSize?: 's' | 'm';\n /**\n * Элемент, рядом с которым произойдет вызов всплывающего окна.\n * Если свойство не задано, применится иконка по умолчанию.\n */\n hintTarget?: ReactNode;\n /**\n * Направление раскрытия тултипа.\n */\n hintPlacement?: PopoverPlacement | Array<PopoverPlacementBasic>;\n /**\n * Видимость стрелки (хвоста).\n */\n hintHasArrow?: boolean;\n /**\n * Отступ окна относительно элемента, у которого оно вызвано.\n * @default\n * [0, 8]\n */\n hintOffset?: [number, number];\n /**\n * Ширина окна (в rem).\n */\n hintWidth?: string;\n /**\n * Слот для контента слева, например `Icon`.\n */\n hintContentLeft?: ReactNode;\n }\n | {\n hintTrigger?: never;\n hintText?: never;\n hintView?: never;\n hintSize?: never;\n hintTarget?: never;\n hintPlacement?: never;\n hintHasArrow?: never;\n hintOffset?: never;\n hintWidth?: never;\n hintContentLeft?: never;\n };\n\ntype TextFieldProps = Omit<TextFieldPropsOld, 'helperText'> & {\n /**\n * Подсказка для поля ввода.\n */\n helperText?: ReactNode;\n} & ClearProps &\n HintProps;\n\nexport type CustomTextFieldProps = TextFieldProps &\n Pick<\n newHopeTextFieldProps,\n | 'enumerationType'\n | 'chips'\n | 'chipType'\n | 'onChangeChips'\n | 'titleCaption'\n | 'labelPlacement'\n | 'keepPlaceholder'\n | 'required'\n | 'requiredPlacement'\n | 'optional'\n | 'chipView'\n | 'chipValidator'\n | 'textBefore'\n | 'textAfter'\n >;\n\nconst statusToView: Record<NonNullable<TextFieldProps['status']>, NonNullable<newHopeTextFieldProps['view']>> = {\n success: 'positive',\n warning: 'warning',\n error: 'negative',\n};\nconst animatedHintToLabelPlacement: Record<\n NonNullable<TextFieldProps['animatedHint']>,\n NonNullable<newHopeTextFieldProps['labelPlacement']>\n> = {\n placeholder: 'outer',\n label: 'inner',\n};\n\n/**\n * Поле ввода текста.\n */\nexport const TextField = forwardRef<HTMLInputElement, CustomTextFieldProps>((props, ref) => {\n const {\n status,\n\n label,\n keepPlaceholder,\n placeholder,\n animatedHint,\n helperText,\n hintText,\n\n enumerationType,\n chips,\n chipView,\n chipValidator,\n onSearch,\n onChangeChips,\n chipType,\n\n size = 'l',\n\n ...rest\n } = props;\n\n /** TODO: #1064 Remove In plasma-2.0 */\n /* eslint-disable no-underscore-dangle */\n const _view = status ? statusToView[status] : 'default';\n let _labelPlacement = animatedHint ? animatedHintToLabelPlacement[animatedHint] : 'outer';\n let _label = label ? String(label) : undefined;\n\n if (size !== 'l' && _labelPlacement === 'inner' && !keepPlaceholder) {\n _label = undefined;\n _labelPlacement = 'outer';\n }\n\n if (size === 'l' && animatedHint === 'placeholder' && !label) {\n _label = placeholder;\n _labelPlacement = 'inner';\n }\n\n const labelProps = {\n label: _label,\n labelPlacement: _labelPlacement,\n keepPlaceholder,\n };\n\n if (enumerationType === 'chip') {\n return (\n <TextFieldComponent\n {...rest}\n {...labelProps}\n view={_view}\n size={size}\n placeholder={placeholder}\n leftHelper={helperText}\n ref={ref}\n enumerationType=\"chip\"\n chips={chips}\n chipView={chipView}\n chipValidator={chipValidator}\n hintText={String(hintText || '')}\n onChangeChips={onChangeChips}\n chipType={chipType}\n />\n );\n }\n\n return (\n <TextFieldComponent\n {...rest}\n {...labelProps}\n view={_view}\n label={_label}\n size={size}\n placeholder={placeholder}\n leftHelper={helperText}\n ref={ref}\n enumerationType=\"plain\"\n hintText={String(hintText || '')}\n onSearch={onSearch}\n />\n );\n});\n"],"names":["mergedConfigDefault","mergeConfig","textFieldConfig","config","TextFieldDefault","component","mergedConfigClear","clearConfig","TextFieldClear","TextFieldComponent","createConditionalComponent","conditions","prop","value","statusToView","success","warning","error","animatedHintToLabelPlacement","placeholder","label","TextField","forwardRef","props","ref","status","keepPlaceholder","animatedHint","helperText","hintText","enumerationType","chips","chipView","chipValidator","onSearch","onChangeChips","chipType","_props$size","size","rest","_objectWithoutProperties","_excluded","_view","_labelPlacement","_label","String","undefined","labelProps","labelPlacement","React","createElement","_extends","view","leftHelper"],"mappings":";;;;;;;AAaA,IAAMA,mBAAmB,gBAAGC,WAAW,CAACC,eAAe,EAAEC,MAAM,CAAC,CAAA;IACnDC,gBAAgB,gBAAGC,SAAS,CAACL,mBAAmB,EAAC;AAE9D,IAAMM,iBAAiB,gBAAGL,WAAW,CAACC,eAAe,EAAEK,QAAW,CAAC,CAAA;IACtDC,cAAc,gBAAGH,SAAS,CAACC,iBAAiB,EAAC;IAE7CG,kBAAkB,gBAAGC,0BAA0B,CAACN,gBAAgB,EAAE,CAC3E;AACIO,EAAAA,UAAU,EAAE;AAAEC,IAAAA,IAAI,EAAE,YAAY;AAAEC,IAAAA,KAAK,EAAE,OAAA;GAAS;AAClDR,EAAAA,SAAS,EAAEG,cAAAA;AACf,CAAC,CACJ,EAAC;AAgHF,IAAMM,YAAuG,GAAG;AAC5GC,EAAAA,OAAO,EAAE,UAAU;AACnBC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,KAAK,EAAE,UAAA;AACX,CAAC,CAAA;AACD,IAAMC,4BAGL,GAAG;AACAC,EAAAA,WAAW,EAAE,OAAO;AACpBC,EAAAA,KAAK,EAAE,OAAA;AACX,CAAC,CAAA;;AAED;AACA;AACA;AACO,IAAMC,SAAS,gBAAGC,UAAU,CAAyC,UAACC,KAAK,EAAEC,GAAG,EAAK;AACxF,EAAA,IACIC,MAAM,GAoBNF,KA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AACvBD,IAAAA,QAAQ,EAAEgB,MAAM,CAAChB,QAAQ,IAAI,EAAE,CAAE;AACjCK,IAAAA,QAAQ,EAAEA,QAAAA;AAAS,GAAA,CACtB,CAAC,CAAA;AAEV,CAAC;;;;"}
1
+ {"version":3,"file":"TextField.js","sources":["../../../../src-css/components/TextField/TextField.tsx"],"sourcesContent":["import React, { forwardRef, ReactNode } from 'react';\nimport type { TextFieldProps as TextFieldPropsOld } from '@salutejs/plasma-hope';\nimport {\n textFieldConfig,\n component,\n mergeConfig,\n createConditionalComponent,\n} from '@salutejs/plasma-new-hope';\nimport type { PopoverPlacement, PopoverPlacementBasic } from '@salutejs/plasma-new-hope';\n\nimport { config } from './TextField.config';\nimport { config as clearConfig } from './TextField.clear.config';\n\nconst mergedConfigDefault = mergeConfig(textFieldConfig, config);\nexport const TextFieldDefault = component(mergedConfigDefault);\n\nconst mergedConfigClear = mergeConfig(textFieldConfig, clearConfig);\nexport const TextFieldClear = component(mergedConfigClear);\n\nexport const TextFieldComponent = createConditionalComponent(TextFieldDefault, [\n {\n conditions: { prop: 'appearance', value: 'clear' },\n component: TextFieldClear,\n },\n]);\n\ntype newHopeTextFieldProps = React.ComponentProps<typeof TextFieldComponent>;\n\ntype ClearProps =\n | {\n /**\n * view применяется с clear-токенами\n */\n clear?: boolean;\n /**\n * отобразить ли divider\n */\n hasDivider?: boolean;\n }\n | {\n /**\n * view применяется с clear-токенами\n */\n clear?: false;\n /**\n * отобразить ли divider\n */\n hasDivider?: never;\n };\n\ntype HintProps =\n | {\n /**\n * Текст тултипа\n */\n hintText: string;\n /**\n * Способ открытия тултипа - наведение или клик мышью\n */\n hintTrigger?: 'hover' | 'click';\n /**\n * Вид тултипа\n */\n hintView?: 'default';\n /**\n * Размер тултипа\n */\n hintSize?: 's' | 'm';\n /**\n * Элемент, рядом с которым произойдет вызов всплывающего окна.\n * Если свойство не задано, применится иконка по умолчанию.\n */\n hintTarget?: ReactNode;\n /**\n * Направление раскрытия тултипа.\n */\n hintPlacement?: PopoverPlacement | Array<PopoverPlacementBasic>;\n /**\n * Видимость стрелки (хвоста).\n */\n hintHasArrow?: boolean;\n /**\n * Отступ окна относительно элемента, у которого оно вызвано.\n * @default\n * [0, 8]\n */\n hintOffset?: [number, number];\n /**\n * Ширина окна (в rem).\n */\n hintWidth?: string;\n /**\n * Слот для контента слева, например `Icon`.\n */\n hintContentLeft?: ReactNode;\n }\n | {\n hintTrigger?: never;\n hintText?: never;\n hintView?: never;\n hintSize?: never;\n hintTarget?: never;\n hintPlacement?: never;\n hintHasArrow?: never;\n hintOffset?: never;\n hintWidth?: never;\n hintContentLeft?: never;\n };\n\ntype TextFieldProps = Omit<TextFieldPropsOld, 'helperText'> & {\n /**\n * Подсказка для поля ввода.\n */\n helperText?: ReactNode;\n} & ClearProps &\n HintProps;\n\nexport type CustomTextFieldProps = TextFieldProps &\n Pick<\n newHopeTextFieldProps,\n | 'appearance'\n | 'enumerationType'\n | 'chips'\n | 'chipType'\n | 'onChangeChips'\n | 'titleCaption'\n | 'labelPlacement'\n | 'keepPlaceholder'\n | 'required'\n | 'requiredPlacement'\n | 'optional'\n | 'chipView'\n | 'chipValidator'\n | 'textBefore'\n | 'textAfter'\n >;\n\nconst statusToView: Record<NonNullable<TextFieldProps['status']>, NonNullable<newHopeTextFieldProps['view']>> = {\n success: 'positive',\n warning: 'warning',\n error: 'negative',\n};\nconst animatedHintToLabelPlacement: Record<\n NonNullable<TextFieldProps['animatedHint']>,\n NonNullable<newHopeTextFieldProps['labelPlacement']>\n> = {\n placeholder: 'outer',\n label: 'inner',\n};\n\n/**\n * Поле ввода текста.\n */\nexport const TextField = forwardRef<HTMLInputElement, CustomTextFieldProps>((props, ref) => {\n const {\n status,\n\n label,\n keepPlaceholder,\n placeholder,\n animatedHint,\n helperText,\n hintText,\n\n enumerationType,\n chips,\n chipView,\n chipValidator,\n onSearch,\n onChangeChips,\n chipType,\n\n size = 'l',\n\n ...rest\n } = props;\n\n /** TODO: #1064 Remove In plasma-2.0 */\n /* eslint-disable no-underscore-dangle */\n const _view = status ? statusToView[status] : 'default';\n let _labelPlacement = animatedHint ? animatedHintToLabelPlacement[animatedHint] : 'outer';\n let _label = label ? String(label) : undefined;\n\n if (size !== 'l' && _labelPlacement === 'inner' && !keepPlaceholder) {\n _label = undefined;\n _labelPlacement = 'outer';\n }\n\n if (size === 'l' && animatedHint === 'placeholder' && !label) {\n _label = placeholder;\n _labelPlacement = 'inner';\n }\n\n const labelProps = {\n label: _label,\n labelPlacement: _labelPlacement,\n keepPlaceholder,\n };\n\n if (enumerationType === 'chip') {\n return (\n <TextFieldComponent\n {...rest}\n {...labelProps}\n view={_view}\n size={size}\n placeholder={placeholder}\n leftHelper={helperText}\n ref={ref}\n enumerationType=\"chip\"\n chips={chips}\n chipView={chipView}\n chipValidator={chipValidator}\n hintText={String(hintText || '')}\n onChangeChips={onChangeChips}\n chipType={chipType}\n />\n );\n }\n\n return (\n <TextFieldComponent\n {...rest}\n {...labelProps}\n view={_view}\n label={_label}\n size={size}\n placeholder={placeholder}\n leftHelper={helperText}\n ref={ref}\n enumerationType=\"plain\"\n hintText={String(hintText || '')}\n onSearch={onSearch}\n />\n );\n});\n"],"names":["mergedConfigDefault","mergeConfig","textFieldConfig","config","TextFieldDefault","component","mergedConfigClear","clearConfig","TextFieldClear","TextFieldComponent","createConditionalComponent","conditions","prop","value","statusToView","success","warning","error","animatedHintToLabelPlacement","placeholder","label","TextField","forwardRef","props","ref","status","keepPlaceholder","animatedHint","helperText","hintText","enumerationType","chips","chipView","chipValidator","onSearch","onChangeChips","chipType","_props$size","size","rest","_objectWithoutProperties","_excluded","_view","_labelPlacement","_label","String","undefined","labelProps","labelPlacement","React","createElement","_extends","view","leftHelper"],"mappings":";;;;;;;AAaA,IAAMA,mBAAmB,gBAAGC,WAAW,CAACC,eAAe,EAAEC,MAAM,CAAC,CAAA;IACnDC,gBAAgB,gBAAGC,SAAS,CAACL,mBAAmB,EAAC;AAE9D,IAAMM,iBAAiB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,MAAAA,GAAG,EAAEA,GAAI;AACTM,MAAAA,eAAe,EAAC,MAAM;AACtBC,MAAAA,KAAK,EAAEA,KAAM;AACbC,MAAAA,QAAQ,EAAEA,QAAS;AACnBC,MAAAA,aAAa,EAAEA,aAAc;AAC7BJ,MAAAA,QAAQ,EAAEgB,MAAM,CAAChB,QAAQ,IAAI,EAAE,CAAE;AACjCM,MAAAA,aAAa,EAAEA,aAAc;AAC7BC,MAAAA,QAAQ,EAAEA,QAAAA;AAAS,KAAA,CACtB,CAAC,CAAA;AAEV,GAAA;EAEA,oBACIa,KAAA,CAAAC,aAAA,CAACzC,kBAAkB,EAAA0C,QAAA,CAAA,EAAA,EACXZ,IAAI,EACJQ,UAAU,EAAA;AACdK,IAAAA,IAAI,EAAEV,KAAM;AACZtB,IAAAA,KAAK,EAAEwB,MAAO;AACdN,IAAAA,IAAI,EAAEA,IAAK;AACXnB,IAAAA,WAAW,EAAEA,WAAY;AACzBkC,IAAAA,UAAU,EAAEzB,UAAW;AACvBJ,IAAAA,GAAG,EAAEA,GAAI;AACTM,IAAAA,eAAe,EAAC,OAAO;AACvBD,IAAAA,QAAQ,EAAEgB,MAAM,CAAChB,QAAQ,IAAI,EAAE,CAAE;AACjCK,IAAAA,QAAQ,EAAEA,QAAAA;AAAS,GAAA,CACtB,CAAC,CAAA;AAEV,CAAC;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salutejs/plasma-web",
3
- "version": "1.601.0-canary.2358.19738569895.0",
3
+ "version": "1.601.0-canary.2358.19740188284.0",
4
4
  "description": "Salute Design System / React UI kit for web applications",
5
5
  "author": "Salute Frontend Team <salute.developers@gmail.com>",
6
6
  "license": "MIT",
@@ -20,8 +20,8 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@salutejs/plasma-core": "1.210.0",
23
- "@salutejs/plasma-hope": "1.357.0-canary.2358.19738569895.0",
24
- "@salutejs/plasma-new-hope": "0.343.0-canary.2358.19738569895.0",
23
+ "@salutejs/plasma-hope": "1.357.0-canary.2358.19740188284.0",
24
+ "@salutejs/plasma-new-hope": "0.343.0-canary.2358.19740188284.0",
25
25
  "@salutejs/plasma-themes": "0.38.0",
26
26
  "@salutejs/plasma-tokens-b2b": "1.54.0",
27
27
  "@salutejs/plasma-tokens-b2c": "0.65.0",
@@ -51,7 +51,7 @@
51
51
  "@salutejs/plasma-colors": "0.16.0",
52
52
  "@salutejs/plasma-cy-utils": "0.140.0",
53
53
  "@salutejs/plasma-icons": "1.227.0",
54
- "@salutejs/plasma-sb-utils": "0.211.0-canary.2358.19738569895.0",
54
+ "@salutejs/plasma-sb-utils": "0.211.0-canary.2358.19740188284.0",
55
55
  "@storybook/addon-docs": "8.6.14",
56
56
  "@storybook/addon-essentials": "8.6.14",
57
57
  "@storybook/manager-api": "8.6.14",
@@ -111,5 +111,5 @@
111
111
  "Fanil Zubairov"
112
112
  ],
113
113
  "sideEffects": false,
114
- "gitHead": "382f1737d7bb5389fa1be4102a4fb340c87565cb"
114
+ "gitHead": "0c603402f47ef45fc27a94fbd15149cc094c8523"
115
115
  }