@salutejs/plasma-web 1.400.0-canary.1443.10923396048.0 → 1.401.0-canary.1418.10940499394.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,161 @@
1
+ # v1.400.0 (Thu Sep 19 2024)
2
+
3
+ ### Release Notes
4
+
5
+ #### Release by 18.09.2024 ([#1442](https://github.com/salute-developers/plasma/pull/1442))
6
+
7
+ ## Components
8
+
9
+ ### Badge
10
+
11
+ - добавлено свойство `clear`, которое меняет отображение `view`
12
+ - обновлена документация и storybook
13
+
14
+ **After**:
15
+
16
+ <img width="328" src="https://github.com/user-attachments/assets/d44c10e8-ffe3-4137-a833-4351b7b82bdc" />
17
+
18
+
19
+ feat(plasma-*): Badge add prop clear (https://github.com/salute-developers/plasma/pull/1424)
20
+
21
+ ### TextField
22
+
23
+ - используется корректный `color token` для содержимого `contentLeft\Right` slots
24
+ - добавлен `hover` для `contentRight` slot
25
+
26
+ **Before(incorrect color token):**
27
+
28
+ <img width="928" src="https://github.com/user-attachments/assets/42aa0845-54f4-45ed-8fb0-b71edac4ebf7" />
29
+
30
+ **After(correct color token):**
31
+
32
+ <img width="922" src="https://github.com/user-attachments/assets/e6c05099-b9fb-4959-b815-7f2307690263" />
33
+
34
+ **Hover:**
35
+
36
+ <img width="940" src="https://github.com/user-attachments/assets/508db157-deff-44e2-9dd9-4893184eb59a" />
37
+
38
+
39
+
40
+ [PLASMA-3412]: TextField contentRight\Left fix UI (https://github.com/salute-developers/plasma/pull/1429)
41
+
42
+ ### Combobox
43
+
44
+ - добавлено новое свойство `alwaysOpened`
45
+ - обновлены токены в конфигурации компонента для `plasma-web`
46
+ - обновлена документация
47
+
48
+
49
+ feat(plasma-*): combobox always opened (https://github.com/salute-developers/plasma/pull/1422)
50
+
51
+ ### Grid
52
+
53
+ - исправили `view` по-умолчанию для `sdds` вертикалей
54
+
55
+ **Before:**
56
+ <img width="1920" src="https://github.com/user-attachments/assets/6476ef70-294d-492b-b462-2e42cdb341d4" />
57
+
58
+ **After:**
59
+ <img width="1920" src="https://github.com/user-attachments/assets/aa004cf2-9e43-4691-84f3-fb33f94b3e5f" />
60
+
61
+ fix(sdds-*): Use correct default view for Grid (https://github.com/salute-developers/plasma/pull/1431)
62
+
63
+ ### Editable
64
+
65
+ - переведен на новую архитектуру и добавлен в поставки `plasma-{b2c, web}`
66
+ - исправлена работа свойства `placeholder`
67
+
68
+ <img width="276" src="https://github.com/user-attachments/assets/bdd67ba7-62f1-48f1-8f04-78a13fbb8045" />
69
+
70
+ plasma-{web, b2c}: Editable component refactor (https://github.com/salute-developers/plasma/pull/1430)
71
+
72
+ ### Combobox
73
+
74
+ - исправлена ошибка, когда изначальное значение в `single combobox` не отображалось
75
+
76
+
77
+ plasma-*: Fixed issue with predefined value in single Combobox (https://github.com/salute-developers/plasma/pull/1436)
78
+
79
+
80
+ ## Icons
81
+
82
+ ### Add new icons
83
+
84
+ **pcMouse**
85
+ <img width="71" src="https://github.com/user-attachments/assets/f2097d88-d354-404a-91af-d59af0a61c3f" />
86
+
87
+ **Blank JPG/PNG**
88
+ <img width="140" src="https://github.com/user-attachments/assets/0d3a251a-ec39-4e0d-943b-e37c8d96c22f" />
89
+
90
+
91
+ [PLASMA-3502]: Add icons: Mouse, Blank JPG/PNG (https://github.com/salute-developers/plasma/pull/1435)
92
+
93
+
94
+ ## Tokens
95
+
96
+ - исправлены формулы генерации `brightness` токенов
97
+ - обновлены / добавлены `active`, `hover`, `brightness` токены для `plasma-{b2c, web}` themes
98
+
99
+ fix(plasma-tokens): Update active, hover and brightness tokens in themes (https://github.com/salute-developers/plasma/pull/1441)
100
+
101
+
102
+ ## Misc
103
+
104
+ ### QA Auto test
105
+
106
+ - изменены тесты `plasma-b2c` компонентов `Slider`, `Tabs`, `DatePicker` и `Card`
107
+
108
+ ---
109
+
110
+ #### 🚀 Enhancement
111
+
112
+ - Release by 18.09.2024 [#1442](https://github.com/salute-developers/plasma/pull/1442) ([@TitanKuzmich](https://github.com/TitanKuzmich) [@Salute-Eva](https://github.com/Salute-Eva) [@IgorYar](https://github.com/IgorYar) [@Yakutoc](https://github.com/Yakutoc) [@shuga2704](https://github.com/shuga2704) [@neretin-trike](https://github.com/neretin-trike))
113
+ - feat(plasma-web/b2c): update Editable with tests [#1430](https://github.com/salute-developers/plasma/pull/1430) ([@TitanKuzmich](https://github.com/TitanKuzmich))
114
+ - feat(plasma-*): update Combobox configs & stories [#1422](https://github.com/salute-developers/plasma/pull/1422) ([@TitanKuzmich](https://github.com/TitanKuzmich))
115
+ - feat(plasma-web/b2c): update Badge stories & configs ([@TitanKuzmich](https://github.com/TitanKuzmich))
116
+ - feat(plasma-*/sdds-*): update TextField stories [#1426](https://github.com/salute-developers/plasma/pull/1426) ([@TitanKuzmich](https://github.com/TitanKuzmich))
117
+ - feat(plasma-web/b2c): add defultValue TextField test ([@TitanKuzmich](https://github.com/TitanKuzmich))
118
+
119
+ #### 🐛 Bug Fix
120
+
121
+ - Merge remote-tracking branch 'origin/dev' into release_2024-09-18 ([@Yakutoc](https://github.com/Yakutoc))
122
+ - Update package-lock.json files ([@Salute-Eva](https://github.com/Salute-Eva))
123
+ - Update versions ([@Salute-Eva](https://github.com/Salute-Eva))
124
+ - docs: generate new api reports ([@TitanKuzmich](https://github.com/TitanKuzmich))
125
+ - feat(plasma-*,sdds-*): update Combobox stories props ([@TitanKuzmich](https://github.com/TitanKuzmich))
126
+ - fix(plasma-*): fix `content{Left\Right}Slot` UI ([@Yakutoc](https://github.com/Yakutoc))
127
+ - chore: Update package-lock.json files \[skip ci\] ([@Salute-Eva](https://github.com/Salute-Eva))
128
+
129
+ #### Authors: 6
130
+
131
+ - [@Salute-Eva](https://github.com/Salute-Eva)
132
+ - Alexander Lobyntsev ([@Yakutoc](https://github.com/Yakutoc))
133
+ - Dima Shugaev ([@shuga2704](https://github.com/shuga2704))
134
+ - Igor Yaroslavtsev ([@IgorYar](https://github.com/IgorYar))
135
+ - Krivonos Aleksandr ([@TitanKuzmich](https://github.com/TitanKuzmich))
136
+ - neretinaa ([@neretin-trike](https://github.com/neretin-trike))
137
+
138
+ ---
139
+
140
+ # v1.392.0 (Tue Sep 10 2024)
141
+
142
+ #### 🚀 Enhancement
143
+
144
+ - plasma-*: Fix `TextField` placeholder logic [HOTFIX] [#1425](https://github.com/salute-developers/plasma/pull/1425) ([@TitanKuzmich](https://github.com/TitanKuzmich))
145
+ - feat(plasma-*/sdds-*): update TextField stories ([@TitanKuzmich](https://github.com/TitanKuzmich))
146
+ - feat(plasma-web/b2c): add defultValue TextField test ([@TitanKuzmich](https://github.com/TitanKuzmich))
147
+
148
+ #### 🐛 Bug Fix
149
+
150
+ - chore: Update package-lock.json files \[skip ci\] ([@Salute-Eva](https://github.com/Salute-Eva))
151
+
152
+ #### Authors: 2
153
+
154
+ - [@Salute-Eva](https://github.com/Salute-Eva)
155
+ - Krivonos Aleksandr ([@TitanKuzmich](https://github.com/TitanKuzmich))
156
+
157
+ ---
158
+
1
159
  # v1.391.0 (Thu Sep 05 2024)
2
160
 
3
161
  ### Release Notes
@@ -151,10 +151,12 @@ import { InputHTMLAttributes } from '@salutejs/plasma-core';
151
151
  import { InputHTMLAttributes as InputHTMLAttributes_2 } from '@salutejs/plasma-new-hope/types/types';
152
152
  import { InputHTMLAttributes as InputHTMLAttributes_3 } from 'react';
153
153
  import { JSXElementConstructor } from 'react';
154
+ import { KeyboardEvent as KeyboardEvent_2 } from 'react';
154
155
  import { LineSkeletonProps } from '@salutejs/plasma-new-hope/styled-components';
155
156
  import { LinkCustomProps } from '@salutejs/plasma-new-hope/types/components/Link/Link';
156
157
  import { List } from '@salutejs/plasma-hope';
157
158
  import { ListItem } from '@salutejs/plasma-hope';
159
+ import { MaskProps } from '@salutejs/plasma-new-hope/types/components/Mask/Mask.types';
158
160
  import { MaxLinesProps } from '@salutejs/plasma-core';
159
161
  import { mediaQuery } from '@salutejs/plasma-hope';
160
162
  import { MediaQueryFunction } from '@salutejs/plasma-hope';
@@ -1843,6 +1845,197 @@ export { List }
1843
1845
 
1844
1846
  export { ListItem }
1845
1847
 
1848
+ // @public (undocumented)
1849
+ export const Mask: ForwardRefExoticComponent<(Omit<PropsType< {
1850
+ view: {
1851
+ default: PolymorphicClassName;
1852
+ positive: PolymorphicClassName;
1853
+ warning: PolymorphicClassName;
1854
+ negative: PolymorphicClassName;
1855
+ };
1856
+ size: {
1857
+ l: PolymorphicClassName;
1858
+ m: PolymorphicClassName;
1859
+ s: PolymorphicClassName;
1860
+ xs: PolymorphicClassName;
1861
+ };
1862
+ labelPlacement: {
1863
+ inner: PolymorphicClassName;
1864
+ outer: PolymorphicClassName;
1865
+ };
1866
+ disabled: {
1867
+ true: PolymorphicClassName;
1868
+ };
1869
+ readOnly: {
1870
+ true: PolymorphicClassName;
1871
+ };
1872
+ }> & {
1873
+ size?: string | undefined;
1874
+ view?: string | undefined;
1875
+ readOnly?: boolean | undefined;
1876
+ disabled?: boolean | undefined;
1877
+ } & {
1878
+ label?: string | undefined;
1879
+ labelPlacement?: "outer" | "inner" | undefined;
1880
+ leftHelper?: string | undefined;
1881
+ contentLeft?: ReactElement<any, string | JSXElementConstructor<any>> | undefined;
1882
+ contentRight?: ReactElement<any, string | JSXElementConstructor<any>> | undefined;
1883
+ textBefore?: string | undefined;
1884
+ textAfter?: string | undefined;
1885
+ onSearch?: ((value: string, event?: KeyboardEvent_2<HTMLInputElement> | undefined) => void) | undefined;
1886
+ } & {
1887
+ requiredPlacement?: "right" | "left" | undefined;
1888
+ } & {
1889
+ required: true;
1890
+ optional?: false | undefined;
1891
+ } & {
1892
+ chips?: undefined;
1893
+ onChangeChips?: undefined;
1894
+ enumerationType?: "plain" | undefined;
1895
+ onSearch?: ((value: string, event?: KeyboardEvent_2<HTMLInputElement> | undefined) => void) | undefined;
1896
+ } & Omit<InputHTMLAttributes_2<HTMLInputElement>, "size" | "required"> & RefAttributes<HTMLInputElement> & MaskProps, "ref"> | Omit<PropsType< {
1897
+ view: {
1898
+ default: PolymorphicClassName;
1899
+ positive: PolymorphicClassName;
1900
+ warning: PolymorphicClassName;
1901
+ negative: PolymorphicClassName;
1902
+ };
1903
+ size: {
1904
+ l: PolymorphicClassName;
1905
+ m: PolymorphicClassName;
1906
+ s: PolymorphicClassName;
1907
+ xs: PolymorphicClassName;
1908
+ };
1909
+ labelPlacement: {
1910
+ inner: PolymorphicClassName;
1911
+ outer: PolymorphicClassName;
1912
+ };
1913
+ disabled: {
1914
+ true: PolymorphicClassName;
1915
+ };
1916
+ readOnly: {
1917
+ true: PolymorphicClassName;
1918
+ };
1919
+ }> & {
1920
+ size?: string | undefined;
1921
+ view?: string | undefined;
1922
+ readOnly?: boolean | undefined;
1923
+ disabled?: boolean | undefined;
1924
+ } & {
1925
+ label?: string | undefined;
1926
+ labelPlacement?: "outer" | "inner" | undefined;
1927
+ leftHelper?: string | undefined;
1928
+ contentLeft?: ReactElement<any, string | JSXElementConstructor<any>> | undefined;
1929
+ contentRight?: ReactElement<any, string | JSXElementConstructor<any>> | undefined;
1930
+ textBefore?: string | undefined;
1931
+ textAfter?: string | undefined;
1932
+ onSearch?: ((value: string, event?: KeyboardEvent_2<HTMLInputElement> | undefined) => void) | undefined;
1933
+ } & {
1934
+ requiredPlacement?: "right" | "left" | undefined;
1935
+ } & {
1936
+ required: true;
1937
+ optional?: false | undefined;
1938
+ } & {
1939
+ enumerationType: "chip";
1940
+ onSearch?: undefined;
1941
+ chips?: TextFieldPrimitiveValue[] | undefined;
1942
+ onChangeChips?: ((value: TextFieldPrimitiveValue[]) => void) | undefined;
1943
+ } & Omit<InputHTMLAttributes_2<HTMLInputElement>, "size" | "required"> & RefAttributes<HTMLInputElement> & MaskProps, "ref"> | Omit<PropsType< {
1944
+ view: {
1945
+ default: PolymorphicClassName;
1946
+ positive: PolymorphicClassName;
1947
+ warning: PolymorphicClassName;
1948
+ negative: PolymorphicClassName;
1949
+ };
1950
+ size: {
1951
+ l: PolymorphicClassName;
1952
+ m: PolymorphicClassName;
1953
+ s: PolymorphicClassName;
1954
+ xs: PolymorphicClassName;
1955
+ };
1956
+ labelPlacement: {
1957
+ inner: PolymorphicClassName;
1958
+ outer: PolymorphicClassName;
1959
+ };
1960
+ disabled: {
1961
+ true: PolymorphicClassName;
1962
+ };
1963
+ readOnly: {
1964
+ true: PolymorphicClassName;
1965
+ };
1966
+ }> & {
1967
+ size?: string | undefined;
1968
+ view?: string | undefined;
1969
+ readOnly?: boolean | undefined;
1970
+ disabled?: boolean | undefined;
1971
+ } & {
1972
+ label?: string | undefined;
1973
+ labelPlacement?: "outer" | "inner" | undefined;
1974
+ leftHelper?: string | undefined;
1975
+ contentLeft?: ReactElement<any, string | JSXElementConstructor<any>> | undefined;
1976
+ contentRight?: ReactElement<any, string | JSXElementConstructor<any>> | undefined;
1977
+ textBefore?: string | undefined;
1978
+ textAfter?: string | undefined;
1979
+ onSearch?: ((value: string, event?: KeyboardEvent_2<HTMLInputElement> | undefined) => void) | undefined;
1980
+ } & {
1981
+ requiredPlacement?: "right" | "left" | undefined;
1982
+ } & {
1983
+ optional?: true | undefined;
1984
+ required?: false | undefined;
1985
+ } & {
1986
+ chips?: undefined;
1987
+ onChangeChips?: undefined;
1988
+ enumerationType?: "plain" | undefined;
1989
+ onSearch?: ((value: string, event?: KeyboardEvent_2<HTMLInputElement> | undefined) => void) | undefined;
1990
+ } & Omit<InputHTMLAttributes_2<HTMLInputElement>, "size" | "required"> & RefAttributes<HTMLInputElement> & MaskProps, "ref"> | Omit<PropsType< {
1991
+ view: {
1992
+ default: PolymorphicClassName;
1993
+ positive: PolymorphicClassName;
1994
+ warning: PolymorphicClassName;
1995
+ negative: PolymorphicClassName;
1996
+ };
1997
+ size: {
1998
+ l: PolymorphicClassName;
1999
+ m: PolymorphicClassName;
2000
+ s: PolymorphicClassName;
2001
+ xs: PolymorphicClassName;
2002
+ };
2003
+ labelPlacement: {
2004
+ inner: PolymorphicClassName;
2005
+ outer: PolymorphicClassName;
2006
+ };
2007
+ disabled: {
2008
+ true: PolymorphicClassName;
2009
+ };
2010
+ readOnly: {
2011
+ true: PolymorphicClassName;
2012
+ };
2013
+ }> & {
2014
+ size?: string | undefined;
2015
+ view?: string | undefined;
2016
+ readOnly?: boolean | undefined;
2017
+ disabled?: boolean | undefined;
2018
+ } & {
2019
+ label?: string | undefined;
2020
+ labelPlacement?: "outer" | "inner" | undefined;
2021
+ leftHelper?: string | undefined;
2022
+ contentLeft?: ReactElement<any, string | JSXElementConstructor<any>> | undefined;
2023
+ contentRight?: ReactElement<any, string | JSXElementConstructor<any>> | undefined;
2024
+ textBefore?: string | undefined;
2025
+ textAfter?: string | undefined;
2026
+ onSearch?: ((value: string, event?: KeyboardEvent_2<HTMLInputElement> | undefined) => void) | undefined;
2027
+ } & {
2028
+ requiredPlacement?: "right" | "left" | undefined;
2029
+ } & {
2030
+ optional?: true | undefined;
2031
+ required?: false | undefined;
2032
+ } & {
2033
+ enumerationType: "chip";
2034
+ onSearch?: undefined;
2035
+ chips?: TextFieldPrimitiveValue[] | undefined;
2036
+ onChangeChips?: ((value: TextFieldPrimitiveValue[]) => void) | undefined;
2037
+ } & Omit<InputHTMLAttributes_2<HTMLInputElement>, "size" | "required"> & RefAttributes<HTMLInputElement> & MaskProps, "ref">) & RefAttributes<HTMLInputElement>>;
2038
+
1846
2039
  export { MaxLinesProps }
1847
2040
 
1848
2041
  export { mediaQuery }
@@ -0,0 +1,190 @@
1
+ /// <reference types="react" />
2
+ export declare const Mask: import("react").ForwardRefExoticComponent<(Omit<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
3
+ view: {
4
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
5
+ positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
6
+ warning: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
7
+ negative: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
8
+ };
9
+ size: {
10
+ l: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
11
+ m: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
12
+ s: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
13
+ xs: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
14
+ };
15
+ labelPlacement: {
16
+ inner: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
17
+ outer: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
18
+ };
19
+ disabled: {
20
+ true: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
21
+ };
22
+ readOnly: {
23
+ true: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
24
+ };
25
+ }> & {
26
+ size?: string | undefined;
27
+ view?: string | undefined;
28
+ readOnly?: boolean | undefined;
29
+ disabled?: boolean | undefined;
30
+ } & {
31
+ label?: string | undefined;
32
+ labelPlacement?: "outer" | "inner" | undefined;
33
+ leftHelper?: string | undefined;
34
+ contentLeft?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
35
+ contentRight?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
36
+ textBefore?: string | undefined;
37
+ textAfter?: string | undefined;
38
+ onSearch?: ((value: string, event?: import("react").KeyboardEvent<HTMLInputElement> | undefined) => void) | undefined;
39
+ } & {
40
+ requiredPlacement?: "right" | "left" | undefined;
41
+ } & {
42
+ required: true;
43
+ optional?: false | undefined;
44
+ } & {
45
+ chips?: undefined;
46
+ onChangeChips?: undefined;
47
+ enumerationType?: "plain" | undefined;
48
+ onSearch?: ((value: string, event?: import("react").KeyboardEvent<HTMLInputElement> | undefined) => void) | undefined;
49
+ } & Omit<import("@salutejs/plasma-new-hope/types/types").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<{
50
+ view: {
51
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
52
+ positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
53
+ warning: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
54
+ negative: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
55
+ };
56
+ size: {
57
+ l: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
58
+ m: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
59
+ s: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
60
+ xs: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
61
+ };
62
+ labelPlacement: {
63
+ inner: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
64
+ outer: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
65
+ };
66
+ disabled: {
67
+ true: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
68
+ };
69
+ readOnly: {
70
+ true: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
71
+ };
72
+ }> & {
73
+ size?: string | undefined;
74
+ view?: string | undefined;
75
+ readOnly?: boolean | undefined;
76
+ disabled?: boolean | undefined;
77
+ } & {
78
+ label?: string | undefined;
79
+ labelPlacement?: "outer" | "inner" | undefined;
80
+ leftHelper?: string | undefined;
81
+ contentLeft?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
82
+ contentRight?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
83
+ textBefore?: string | undefined;
84
+ textAfter?: string | undefined;
85
+ onSearch?: ((value: string, event?: import("react").KeyboardEvent<HTMLInputElement> | undefined) => void) | undefined;
86
+ } & {
87
+ requiredPlacement?: "right" | "left" | undefined;
88
+ } & {
89
+ required: true;
90
+ optional?: false | undefined;
91
+ } & {
92
+ enumerationType: "chip";
93
+ onSearch?: undefined;
94
+ chips?: import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").TextFieldPrimitiveValue[] | undefined;
95
+ onChangeChips?: ((value: import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").TextFieldPrimitiveValue[]) => void) | undefined;
96
+ } & Omit<import("@salutejs/plasma-new-hope/types/types").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<{
97
+ view: {
98
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
99
+ positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
100
+ warning: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
101
+ negative: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
102
+ };
103
+ size: {
104
+ l: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
105
+ m: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
106
+ s: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
107
+ xs: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
108
+ };
109
+ labelPlacement: {
110
+ inner: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
111
+ outer: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
112
+ };
113
+ disabled: {
114
+ true: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
115
+ };
116
+ readOnly: {
117
+ true: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
118
+ };
119
+ }> & {
120
+ size?: string | undefined;
121
+ view?: string | undefined;
122
+ readOnly?: boolean | undefined;
123
+ disabled?: boolean | undefined;
124
+ } & {
125
+ label?: string | undefined;
126
+ labelPlacement?: "outer" | "inner" | undefined;
127
+ leftHelper?: string | undefined;
128
+ contentLeft?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
129
+ contentRight?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
130
+ textBefore?: string | undefined;
131
+ textAfter?: string | undefined;
132
+ onSearch?: ((value: string, event?: import("react").KeyboardEvent<HTMLInputElement> | undefined) => void) | undefined;
133
+ } & {
134
+ requiredPlacement?: "right" | "left" | undefined;
135
+ } & {
136
+ optional?: true | undefined;
137
+ required?: false | undefined;
138
+ } & {
139
+ chips?: undefined;
140
+ onChangeChips?: undefined;
141
+ enumerationType?: "plain" | undefined;
142
+ onSearch?: ((value: string, event?: import("react").KeyboardEvent<HTMLInputElement> | undefined) => void) | undefined;
143
+ } & Omit<import("@salutejs/plasma-new-hope/types/types").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<{
144
+ view: {
145
+ default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
146
+ positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
147
+ warning: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
148
+ negative: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
149
+ };
150
+ size: {
151
+ l: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
152
+ m: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
153
+ s: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
154
+ xs: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
155
+ };
156
+ labelPlacement: {
157
+ inner: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
158
+ outer: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
159
+ };
160
+ disabled: {
161
+ true: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
162
+ };
163
+ readOnly: {
164
+ true: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
165
+ };
166
+ }> & {
167
+ size?: string | undefined;
168
+ view?: string | undefined;
169
+ readOnly?: boolean | undefined;
170
+ disabled?: boolean | undefined;
171
+ } & {
172
+ label?: string | undefined;
173
+ labelPlacement?: "outer" | "inner" | undefined;
174
+ leftHelper?: string | undefined;
175
+ contentLeft?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
176
+ contentRight?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
177
+ textBefore?: string | undefined;
178
+ textAfter?: string | undefined;
179
+ onSearch?: ((value: string, event?: import("react").KeyboardEvent<HTMLInputElement> | undefined) => void) | undefined;
180
+ } & {
181
+ requiredPlacement?: "right" | "left" | undefined;
182
+ } & {
183
+ optional?: true | undefined;
184
+ required?: false | undefined;
185
+ } & {
186
+ enumerationType: "chip";
187
+ onSearch?: undefined;
188
+ chips?: import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").TextFieldPrimitiveValue[] | undefined;
189
+ onChangeChips?: ((value: import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").TextFieldPrimitiveValue[]) => void) | undefined;
190
+ } & Omit<import("@salutejs/plasma-new-hope/types/types").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & import("react").RefAttributes<HTMLInputElement> & import("@salutejs/plasma-new-hope/types/components/Mask/Mask.types").MaskProps, "ref">) & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Mask = void 0;
7
+ var _styledComponents = /*#__PURE__*/require("@salutejs/plasma-new-hope/styled-components");
8
+ var _TextField = /*#__PURE__*/require("../TextField/TextField");
9
+ var Mask = exports.Mask = /*#__PURE__*/(0, _styledComponents.composeMask)(_TextField.TextFieldComponent);
@@ -0,0 +1 @@
1
+ export { Mask } from './Mask';
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "Mask", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _Mask.Mask;
10
+ }
11
+ });
12
+ var _Mask = /*#__PURE__*/require("./Mask");
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { TextFieldProps as TextFieldPropsOld } from '@salutejs/plasma-hope';
3
- declare const TextFieldComponent: React.FunctionComponent<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
3
+ export declare const TextFieldComponent: React.FunctionComponent<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
4
4
  view: {
5
5
  default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
6
6
  positive: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
@@ -45,7 +45,8 @@ declare const TextFieldComponent: React.FunctionComponent<import("@salutejs/plas
45
45
  } & {
46
46
  chips?: undefined;
47
47
  onChangeChips?: undefined;
48
- enumerationType?: "plain" | undefined; /**
48
+ enumerationType?: "plain" | undefined;
49
+ /**
49
50
  * Флаг обязательности поля
50
51
  */
51
52
  onSearch?: ((value: string, event?: React.KeyboardEvent<HTMLInputElement> | undefined) => void) | undefined;
@@ -70,7 +71,9 @@ declare const TextFieldComponent: React.FunctionComponent<import("@salutejs/plas
70
71
  optional?: false | undefined;
71
72
  } & {
72
73
  enumerationType: "chip";
73
- onSearch?: undefined;
74
+ onSearch?: undefined; /**
75
+ * Флаг обязательности поля
76
+ */
74
77
  chips?: import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").TextFieldPrimitiveValue[] | undefined;
75
78
  onChangeChips?: ((value: import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").TextFieldPrimitiveValue[]) => void) | undefined;
76
79
  } & Omit<import("@salutejs/plasma-new-hope/types/types").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & React.RefAttributes<HTMLInputElement>) | ({
@@ -95,7 +98,8 @@ declare const TextFieldComponent: React.FunctionComponent<import("@salutejs/plas
95
98
  } & {
96
99
  chips?: undefined;
97
100
  onChangeChips?: undefined;
98
- enumerationType?: "plain" | undefined; /**
101
+ enumerationType?: "plain" | undefined;
102
+ /**
99
103
  * Флаг обязательности поля
100
104
  */
101
105
  onSearch?: ((value: string, event?: React.KeyboardEvent<HTMLInputElement> | undefined) => void) | undefined;
@@ -120,7 +124,9 @@ declare const TextFieldComponent: React.FunctionComponent<import("@salutejs/plas
120
124
  required?: false | undefined;
121
125
  } & {
122
126
  enumerationType: "chip";
123
- onSearch?: undefined;
127
+ onSearch?: undefined; /**
128
+ * Флаг обязательности поля
129
+ */
124
130
  chips?: import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").TextFieldPrimitiveValue[] | undefined;
125
131
  onChangeChips?: ((value: import("@salutejs/plasma-new-hope/types/components/TextField/TextField.types").TextFieldPrimitiveValue[]) => void) | undefined;
126
132
  } & Omit<import("@salutejs/plasma-new-hope/types/types").InputHTMLAttributes<HTMLInputElement>, "size" | "required"> & React.RefAttributes<HTMLInputElement>))>;
@@ -4,7 +4,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.TextField = void 0;
7
+ exports.TextFieldComponent = exports.TextField = void 0;
8
8
  var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
9
9
  var _styledComponents = /*#__PURE__*/require("@salutejs/plasma-new-hope/styled-components");
10
10
  var _TextField = /*#__PURE__*/require("./TextField.config");
@@ -15,7 +15,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
15
15
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
16
16
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
17
17
  var mergedConfig = /*#__PURE__*/(0, _styledComponents.mergeConfig)(_styledComponents.textFieldConfig, _TextField.config);
18
- var TextFieldComponent = /*#__PURE__*/(0, _styledComponents.component)(mergedConfig);
18
+ var TextFieldComponent = exports.TextFieldComponent = /*#__PURE__*/(0, _styledComponents.component)(mergedConfig);
19
19
  var statusToView = {
20
20
  success: 'positive',
21
21
  warning: 'warning',
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var plasmaNewHope = require('@salutejs/plasma-new-hope');
6
+ var TextField = require('../TextField/TextField.js');
7
+
8
+ var Mask = /*#__PURE__*/plasmaNewHope.composeMask(TextField.TextFieldComponent);
9
+
10
+ exports.Mask = Mask;
11
+ //# sourceMappingURL=Mask.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Mask.js","sources":["../../../../src-css/components/Mask/Mask.ts"],"sourcesContent":["import { composeMask } from '@salutejs/plasma-new-hope';\n\nimport { TextFieldComponent } from '../TextField/TextField';\n\nexport const Mask = composeMask(TextFieldComponent);\n"],"names":["Mask","composeMask","TextFieldComponent"],"mappings":";;;;;;;IAIaA,IAAI,gBAAGC,yBAAW,CAACC,4BAAkB;;;;"}
@@ -78,4 +78,5 @@ var TextField = /*#__PURE__*/React.forwardRef(function (props, ref) {
78
78
  });
79
79
 
80
80
  exports.TextField = TextField;
81
+ exports.TextFieldComponent = TextFieldComponent;
81
82
  //# sourceMappingURL=TextField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.js","sources":["../../../../src-css/components/TextField/TextField.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport type { TextFieldProps as TextFieldPropsOld } from '@salutejs/plasma-hope';\nimport { textFieldConfig, component, mergeConfig } from '@salutejs/plasma-new-hope';\n\nimport { config } from './TextField.config';\n\nconst mergedConfig = mergeConfig(textFieldConfig, config);\nconst TextFieldComponent = component(mergedConfig);\n\ntype newHopeTextFieldProps = React.ComponentProps<typeof TextFieldComponent>;\n\ntype RequiredProps = {\n /**\n * Задает выравнивание индикатора обязательности поля\n * @default right\n */\n requiredPlacement?: 'left' | 'right';\n} & (\n | {\n /**\n * Флаг обязательности поля\n */\n required: true;\n /**\n * Флаг необязательности поля\n */\n optional?: never | false;\n }\n | {\n /**\n * Флаг необязательности поля\n */\n optional?: true;\n /**\n * Флаг обязательности поля\n */\n required?: never | false;\n }\n);\n\ntype TextFieldProps = TextFieldPropsOld & RequiredProps;\n\nexport type CustomTextFieldProps = TextFieldProps &\n Pick<newHopeTextFieldProps, 'enumerationType' | 'chips' | 'onChangeChips'>;\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 placeholder,\n animatedHint,\n helperText,\n\n enumerationType,\n chips,\n onSearch,\n onChangeChips,\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 if (size !== 'l' && _labelPlacement === 'inner') {\n _label = undefined;\n _labelPlacement = 'outer';\n }\n if (size === 'l' && animatedHint === 'placeholder' && !label) {\n _label = placeholder;\n _labelPlacement = 'inner';\n }\n\n if (enumerationType === 'chip') {\n return (\n <TextFieldComponent\n {...rest}\n view={_view}\n labelPlacement={_labelPlacement}\n label={_label}\n size={size}\n placeholder={placeholder}\n leftHelper={helperText}\n ref={ref}\n enumerationType=\"chip\"\n chips={chips}\n onChangeChips={onChangeChips}\n />\n );\n }\n\n return (\n <TextFieldComponent\n {...rest}\n view={_view}\n labelPlacement={_labelPlacement}\n label={_label}\n size={size}\n placeholder={placeholder}\n leftHelper={helperText}\n ref={ref}\n enumerationType=\"plain\"\n onSearch={onSearch}\n />\n );\n});\n"],"names":["mergedConfig","mergeConfig","textFieldConfig","config","TextFieldComponent","component","statusToView","success","warning","error","animatedHintToLabelPlacement","placeholder","label","TextField","forwardRef","props","ref","status","animatedHint","helperText","enumerationType","chips","onSearch","onChangeChips","_props$size","size","rest","_objectWithoutProperties","_excluded","_view","_labelPlacement","_label","String","undefined","React","createElement","_extends","view","labelPlacement","leftHelper"],"mappings":";;;;;;;;;;AAMA,IAAMA,YAAY,gBAAGC,yBAAW,CAACC,6BAAe,EAAEC,uBAAM,CAAC,CAAA;AACzD,IAAMC,kBAAkB,gBAAGC,uBAAS,CAACL,YAAY,CAAC,CAAA;AAsClD,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,GAeNF,KAAK,CAfLE,MAAM;IAENL,KAAK,GAaLG,KAAK,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M;AACZS,MAAAA,cAAc,EAAER,eAAgB;AAChClB,MAAAA,KAAK,EAAEmB,MAAO;AACdN,MAAAA,IAAI,EAAEA,IAAK;AACXd,MAAAA,WAAW,EAAEA,WAAY;AACzB4B,MAAAA,UAAU,EAAEpB,UAAW;AACvBH,MAAAA,GAAG,EAAEA,GAAI;AACTI,MAAAA,eAAe,EAAC,MAAM;AACtBC,MAAAA,KAAK,EAAEA,KAAM;AACbE,MAAAA,aAAa,EAAEA,aAAAA;AAAc,KAAA,CAChC,CAAC,CAAA;AAEV,GAAA;EAEA,oBACIW,KAAA,CAAAC,aAAA,CAAC/B,kBAAkB,EAAAgC,iCAAA,KACXV,IAAI,EAAA;AACRW,IAAAA,IAAI,EAAER,KAAM;AACZS,IAAAA,cAAc,EAAER,eAAgB;AAChClB,IAAAA,KAAK,EAAEmB,MAAO;AACdN,IAAAA,IAAI,EAAEA,IAAK;AACXd,IAAAA,WAAW,EAAEA,WAAY;AACzB4B,IAAAA,UAAU,EAAEpB,UAAW;AACvBH,IAAAA,GAAG,EAAEA,GAAI;AACTI,IAAAA,eAAe,EAAC,OAAO;AACvBE,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 } from 'react';\nimport type { TextFieldProps as TextFieldPropsOld } from '@salutejs/plasma-hope';\nimport { textFieldConfig, component, mergeConfig } from '@salutejs/plasma-new-hope';\n\nimport { config } from './TextField.config';\n\nconst mergedConfig = mergeConfig(textFieldConfig, config);\nexport const TextFieldComponent = component(mergedConfig);\n\ntype newHopeTextFieldProps = React.ComponentProps<typeof TextFieldComponent>;\n\ntype RequiredProps = {\n /**\n * Задает выравнивание индикатора обязательности поля\n * @default right\n */\n requiredPlacement?: 'left' | 'right';\n} & (\n | {\n /**\n * Флаг обязательности поля\n */\n required: true;\n /**\n * Флаг необязательности поля\n */\n optional?: never | false;\n }\n | {\n /**\n * Флаг необязательности поля\n */\n optional?: true;\n /**\n * Флаг обязательности поля\n */\n required?: never | false;\n }\n);\n\ntype TextFieldProps = TextFieldPropsOld & RequiredProps;\n\nexport type CustomTextFieldProps = TextFieldProps &\n Pick<newHopeTextFieldProps, 'enumerationType' | 'chips' | 'onChangeChips'>;\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 placeholder,\n animatedHint,\n helperText,\n\n enumerationType,\n chips,\n onSearch,\n onChangeChips,\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 if (size !== 'l' && _labelPlacement === 'inner') {\n _label = undefined;\n _labelPlacement = 'outer';\n }\n if (size === 'l' && animatedHint === 'placeholder' && !label) {\n _label = placeholder;\n _labelPlacement = 'inner';\n }\n\n if (enumerationType === 'chip') {\n return (\n <TextFieldComponent\n {...rest}\n view={_view}\n labelPlacement={_labelPlacement}\n label={_label}\n size={size}\n placeholder={placeholder}\n leftHelper={helperText}\n ref={ref}\n enumerationType=\"chip\"\n chips={chips}\n onChangeChips={onChangeChips}\n />\n );\n }\n\n return (\n <TextFieldComponent\n {...rest}\n view={_view}\n labelPlacement={_labelPlacement}\n label={_label}\n size={size}\n placeholder={placeholder}\n leftHelper={helperText}\n ref={ref}\n enumerationType=\"plain\"\n onSearch={onSearch}\n />\n );\n});\n"],"names":["mergedConfig","mergeConfig","textFieldConfig","config","TextFieldComponent","component","statusToView","success","warning","error","animatedHintToLabelPlacement","placeholder","label","TextField","forwardRef","props","ref","status","animatedHint","helperText","enumerationType","chips","onSearch","onChangeChips","_props$size","size","rest","_objectWithoutProperties","_excluded","_view","_labelPlacement","_label","String","undefined","React","createElement","_extends","view","labelPlacement","leftHelper"],"mappings":";;;;;;;;;;AAMA,IAAMA,YAAY,gBAAGC,yBAAW,CAACC,6BAAe,EAAEC,uBAAM,CAAC,CAAA;IAC5CC,kBAAkB,gBAAGC,uBAAS,CAACL,YAAY,EAAC;AAsCzD,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,GAeNF,KAAK,CAfLE,MAAM;IAENL,KAAK,GAaLG,KAAK,CAbLH,KAAK;IACLD,WAAW,GAYXI,KAAK,CAZLJ,WAAW;IACXO,YAAY,GAWZH,KAAK,CAXLG,YAAY;IACZC,UAAU,GAUVJ,KAAK,CAVLI,UAAU;IAEVC,eAAe,GAQfL,KAAK,CARLK,eAAe;IACfC,KAAK,GAOLN,KAAK,CAPLM,KAAK;IACLC,QAAQ,GAMRP,KAAK,CANLO,QAAQ;IACRC,aAAa,GAKbR,KAAK,CALLQ,aAAa;IAAAC,WAAA,GAKbT,KAAK,CAHLU,IAAI;AAAJA,IAAAA,IAAI,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,GAAG,GAAAA,WAAA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,iCAAA,KACXV,IAAI,EAAA;AACRW,IAAAA,IAAI,EAAER,KAAM;AACZS,IAAAA,cAAc,EAAER,eAAgB;AAChClB,IAAAA,KAAK,EAAEmB,MAAO;AACdN,IAAAA,IAAI,EAAEA,IAAK;AACXd,IAAAA,WAAW,EAAEA,WAAY;AACzB4B,IAAAA,UAAU,EAAEpB,UAAW;AACvBH,IAAAA,GAAG,EAAEA,GAAI;AACTI,IAAAA,eAAe,EAAC,OAAO;AACvBE,IAAAA,QAAQ,EAAEA,QAAAA;AAAS,GAAA,CACtB,CAAC,CAAA;AAEV,CAAC;;;;;"}
package/css/cjs/index.js CHANGED
@@ -33,6 +33,7 @@ var IconButton = require('./components/IconButton/IconButton.js');
33
33
  var Image = require('./components/Image/Image.js');
34
34
  var Indicator = require('./components/Indicator/Indicator.js');
35
35
  var Link = require('./components/Link/Link.js');
36
+ var Mask = require('./components/Mask/Mask.js');
36
37
  var ModalBase = require('./components/ModalBase/ModalBase.js');
37
38
  var Notification = require('./components/Notification/Notification.js');
38
39
  var Pagination = require('./components/Pagination/Pagination.js');
@@ -243,6 +244,7 @@ exports.IconButton = IconButton.IconButton;
243
244
  exports.Image = Image.Image;
244
245
  exports.Indicator = Indicator.Indicator;
245
246
  exports.Link = Link.Link;
247
+ exports.Mask = Mask.Mask;
246
248
  exports.ModalBase = ModalBase.ModalBase;
247
249
  exports.Notification = Notification.Notification;
248
250
  exports.NotificationsProvider = Notification.NotificationsProvider;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,7 @@
1
+ import { composeMask } from '@salutejs/plasma-new-hope';
2
+ import { TextFieldComponent } from '../TextField/TextField.js';
3
+
4
+ var Mask = /*#__PURE__*/composeMask(TextFieldComponent);
5
+
6
+ export { Mask };
7
+ //# sourceMappingURL=Mask.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Mask.js","sources":["../../../../src-css/components/Mask/Mask.ts"],"sourcesContent":["import { composeMask } from '@salutejs/plasma-new-hope';\n\nimport { TextFieldComponent } from '../TextField/TextField';\n\nexport const Mask = composeMask(TextFieldComponent);\n"],"names":["Mask","composeMask","TextFieldComponent"],"mappings":";;;IAIaA,IAAI,gBAAGC,WAAW,CAACC,kBAAkB;;;;"}
@@ -73,5 +73,5 @@ var TextField = /*#__PURE__*/forwardRef(function (props, ref) {
73
73
  }));
74
74
  });
75
75
 
76
- export { TextField };
76
+ export { TextField, TextFieldComponent };
77
77
  //# sourceMappingURL=TextField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.js","sources":["../../../../src-css/components/TextField/TextField.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport type { TextFieldProps as TextFieldPropsOld } from '@salutejs/plasma-hope';\nimport { textFieldConfig, component, mergeConfig } from '@salutejs/plasma-new-hope';\n\nimport { config } from './TextField.config';\n\nconst mergedConfig = mergeConfig(textFieldConfig, config);\nconst TextFieldComponent = component(mergedConfig);\n\ntype newHopeTextFieldProps = React.ComponentProps<typeof TextFieldComponent>;\n\ntype RequiredProps = {\n /**\n * Задает выравнивание индикатора обязательности поля\n * @default right\n */\n requiredPlacement?: 'left' | 'right';\n} & (\n | {\n /**\n * Флаг обязательности поля\n */\n required: true;\n /**\n * Флаг необязательности поля\n */\n optional?: never | false;\n }\n | {\n /**\n * Флаг необязательности поля\n */\n optional?: true;\n /**\n * Флаг обязательности поля\n */\n required?: never | false;\n }\n);\n\ntype TextFieldProps = TextFieldPropsOld & RequiredProps;\n\nexport type CustomTextFieldProps = TextFieldProps &\n Pick<newHopeTextFieldProps, 'enumerationType' | 'chips' | 'onChangeChips'>;\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 placeholder,\n animatedHint,\n helperText,\n\n enumerationType,\n chips,\n onSearch,\n onChangeChips,\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 if (size !== 'l' && _labelPlacement === 'inner') {\n _label = undefined;\n _labelPlacement = 'outer';\n }\n if (size === 'l' && animatedHint === 'placeholder' && !label) {\n _label = placeholder;\n _labelPlacement = 'inner';\n }\n\n if (enumerationType === 'chip') {\n return (\n <TextFieldComponent\n {...rest}\n view={_view}\n labelPlacement={_labelPlacement}\n label={_label}\n size={size}\n placeholder={placeholder}\n leftHelper={helperText}\n ref={ref}\n enumerationType=\"chip\"\n chips={chips}\n onChangeChips={onChangeChips}\n />\n );\n }\n\n return (\n <TextFieldComponent\n {...rest}\n view={_view}\n labelPlacement={_labelPlacement}\n label={_label}\n size={size}\n placeholder={placeholder}\n leftHelper={helperText}\n ref={ref}\n enumerationType=\"plain\"\n onSearch={onSearch}\n />\n );\n});\n"],"names":["mergedConfig","mergeConfig","textFieldConfig","config","TextFieldComponent","component","statusToView","success","warning","error","animatedHintToLabelPlacement","placeholder","label","TextField","forwardRef","props","ref","status","animatedHint","helperText","enumerationType","chips","onSearch","onChangeChips","_props$size","size","rest","_objectWithoutProperties","_excluded","_view","_labelPlacement","_label","String","undefined","React","createElement","_extends","view","labelPlacement","leftHelper"],"mappings":";;;;;;AAMA,IAAMA,YAAY,gBAAGC,WAAW,CAACC,eAAe,EAAEC,MAAM,CAAC,CAAA;AACzD,IAAMC,kBAAkB,gBAAGC,SAAS,CAACL,YAAY,CAAC,CAAA;AAsClD,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,GAeNF,KAAK,CAfLE,MAAM;IAENL,KAAK,GAaLG,KAAK,CAbLH,KAAK;IACLD,WAAW,GAYXI,KAAK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ClB,MAAAA,KAAK,EAAEmB,MAAO;AACdN,MAAAA,IAAI,EAAEA,IAAK;AACXd,MAAAA,WAAW,EAAEA,WAAY;AACzB4B,MAAAA,UAAU,EAAEpB,UAAW;AACvBH,MAAAA,GAAG,EAAEA,GAAI;AACTI,MAAAA,eAAe,EAAC,MAAM;AACtBC,MAAAA,KAAK,EAAEA,KAAM;AACbE,MAAAA,aAAa,EAAEA,aAAAA;AAAc,KAAA,CAChC,CAAC,CAAA;AAEV,GAAA;EAEA,oBACIW,KAAA,CAAAC,aAAA,CAAC/B,kBAAkB,EAAAgC,QAAA,KACXV,IAAI,EAAA;AACRW,IAAAA,IAAI,EAAER,KAAM;AACZS,IAAAA,cAAc,EAAER,eAAgB;AAChClB,IAAAA,KAAK,EAAEmB,MAAO;AACdN,IAAAA,IAAI,EAAEA,IAAK;AACXd,IAAAA,WAAW,EAAEA,WAAY;AACzB4B,IAAAA,UAAU,EAAEpB,UAAW;AACvBH,IAAAA,GAAG,EAAEA,GAAI;AACTI,IAAAA,eAAe,EAAC,OAAO;AACvBE,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 } from 'react';\nimport type { TextFieldProps as TextFieldPropsOld } from '@salutejs/plasma-hope';\nimport { textFieldConfig, component, mergeConfig } from '@salutejs/plasma-new-hope';\n\nimport { config } from './TextField.config';\n\nconst mergedConfig = mergeConfig(textFieldConfig, config);\nexport const TextFieldComponent = component(mergedConfig);\n\ntype newHopeTextFieldProps = React.ComponentProps<typeof TextFieldComponent>;\n\ntype RequiredProps = {\n /**\n * Задает выравнивание индикатора обязательности поля\n * @default right\n */\n requiredPlacement?: 'left' | 'right';\n} & (\n | {\n /**\n * Флаг обязательности поля\n */\n required: true;\n /**\n * Флаг необязательности поля\n */\n optional?: never | false;\n }\n | {\n /**\n * Флаг необязательности поля\n */\n optional?: true;\n /**\n * Флаг обязательности поля\n */\n required?: never | false;\n }\n);\n\ntype TextFieldProps = TextFieldPropsOld & RequiredProps;\n\nexport type CustomTextFieldProps = TextFieldProps &\n Pick<newHopeTextFieldProps, 'enumerationType' | 'chips' | 'onChangeChips'>;\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 placeholder,\n animatedHint,\n helperText,\n\n enumerationType,\n chips,\n onSearch,\n onChangeChips,\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 if (size !== 'l' && _labelPlacement === 'inner') {\n _label = undefined;\n _labelPlacement = 'outer';\n }\n if (size === 'l' && animatedHint === 'placeholder' && !label) {\n _label = placeholder;\n _labelPlacement = 'inner';\n }\n\n if (enumerationType === 'chip') {\n return (\n <TextFieldComponent\n {...rest}\n view={_view}\n labelPlacement={_labelPlacement}\n label={_label}\n size={size}\n placeholder={placeholder}\n leftHelper={helperText}\n ref={ref}\n enumerationType=\"chip\"\n chips={chips}\n onChangeChips={onChangeChips}\n />\n );\n }\n\n return (\n <TextFieldComponent\n {...rest}\n view={_view}\n labelPlacement={_labelPlacement}\n label={_label}\n size={size}\n placeholder={placeholder}\n leftHelper={helperText}\n ref={ref}\n enumerationType=\"plain\"\n onSearch={onSearch}\n />\n );\n});\n"],"names":["mergedConfig","mergeConfig","textFieldConfig","config","TextFieldComponent","component","statusToView","success","warning","error","animatedHintToLabelPlacement","placeholder","label","TextField","forwardRef","props","ref","status","animatedHint","helperText","enumerationType","chips","onSearch","onChangeChips","_props$size","size","rest","_objectWithoutProperties","_excluded","_view","_labelPlacement","_label","String","undefined","React","createElement","_extends","view","labelPlacement","leftHelper"],"mappings":";;;;;;AAMA,IAAMA,YAAY,gBAAGC,WAAW,CAACC,eAAe,EAAEC,MAAM,CAAC,CAAA;IAC5CC,kBAAkB,gBAAGC,SAAS,CAACL,YAAY,EAAC;AAsCzD,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,GAeNF,KAAK,CAfLE,MAAM;IAENL,KAAK,GAaLG,KAAK,CAbLH,KAAK;IACLD,WAAW,GAYXI,KAAK,CAZLJ,WAAW;IACXO,YAAY,GAWZH,KAAK,CAXLG,YAAY;IACZC,UAAU,GAUVJ,KAAK,CAVLI,UAAU;IAEVC,eAAe,GAQfL,KAAK,CARLK,eAAe;IACfC,KAAK,GAOLN,KAAK,CAPLM,KAAK;IACLC,QAAQ,GAMRP,KAAK,CANLO,QAAQ;IACRC,aAAa,GAKbR,KAAK,CALLQ,aAAa;IAAAC,WAAA,GAKbT,KAAK,CAHLU,IAAI;AAAJA,IAAAA,IAAI,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,GAAG,GAAAA,WAAA;AAEPE,IAAAA,IAAI,GAAAC,wBAAA,CACPZ,KAAK,E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AAM;AACZS,IAAAA,cAAc,EAAER,eAAgB;AAChClB,IAAAA,KAAK,EAAEmB,MAAO;AACdN,IAAAA,IAAI,EAAEA,IAAK;AACXd,IAAAA,WAAW,EAAEA,WAAY;AACzB4B,IAAAA,UAAU,EAAEpB,UAAW;AACvBH,IAAAA,GAAG,EAAEA,GAAI;AACTI,IAAAA,eAAe,EAAC,OAAO;AACvBE,IAAAA,QAAQ,EAAEA,QAAAA;AAAS,GAAA,CACtB,CAAC,CAAA;AAEV,CAAC;;;;"}
package/css/es/index.js CHANGED
@@ -29,6 +29,7 @@ export { IconButton } from './components/IconButton/IconButton.js';
29
29
  export { Image } from './components/Image/Image.js';
30
30
  export { Indicator } from './components/Indicator/Indicator.js';
31
31
  export { Link } from './components/Link/Link.js';
32
+ export { Mask } from './components/Mask/Mask.js';
32
33
  export { ModalBase } from './components/ModalBase/ModalBase.js';
33
34
  export { Notification, NotificationsProvider } from './components/Notification/Notification.js';
34
35
  export { Pagination } from './components/Pagination/Pagination.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/css/index.d.ts CHANGED
@@ -24,6 +24,7 @@ export * from '../components/IconButton';
24
24
  export * from '../components/Image';
25
25
  export * from '../components/Indicator';
26
26
  export * from '../components/Link';
27
+ export * from '../components/Mask';
27
28
  export * from '../components/ModalBase';
28
29
  export * from '../components/Notification';
29
30
  export * from '../components/Overlay';
@@ -76,6 +77,7 @@ export * from '../components/IconButton';
76
77
  export * from '../components/Image';
77
78
  export * from '../components/Indicator';
78
79
  export * from '../components/Link';
80
+ export * from '../components/Mask';
79
81
  export * from '../components/ModalBase';
80
82
  export * from '../components/Notification';
81
83
  export * from '../components/Overlay';
@@ -0,0 +1,3 @@
1
+ import { composeMask } from '@salutejs/plasma-new-hope/styled-components';
2
+ import { TextFieldComponent } from '../TextField/TextField';
3
+ export var Mask = /*#__PURE__*/composeMask(TextFieldComponent);
@@ -0,0 +1 @@
1
+ export { Mask } from './Mask';
@@ -6,7 +6,7 @@ import React, { forwardRef } from 'react';
6
6
  import { textFieldConfig, component, mergeConfig } from '@salutejs/plasma-new-hope/styled-components';
7
7
  import { config } from './TextField.config';
8
8
  var mergedConfig = /*#__PURE__*/mergeConfig(textFieldConfig, config);
9
- var TextFieldComponent = /*#__PURE__*/component(mergedConfig);
9
+ export var TextFieldComponent = /*#__PURE__*/component(mergedConfig);
10
10
  var statusToView = {
11
11
  success: 'positive',
12
12
  warning: 'warning',
package/es/index.js CHANGED
@@ -67,4 +67,5 @@ export * from './components/Toolbar';
67
67
  export * from './components/DatePicker';
68
68
  export * from './components/Autocomplete';
69
69
  export * from './components/EmptyState';
70
- export * from './components/TextFieldGroup';
70
+ export * from './components/TextFieldGroup';
71
+ export * from './components/Mask';
package/index.d.ts CHANGED
@@ -68,3 +68,4 @@ export * from './components/DatePicker';
68
68
  export * from './components/Autocomplete';
69
69
  export * from './components/EmptyState';
70
70
  export * from './components/TextFieldGroup';
71
+ export * from './components/Mask';
package/index.js CHANGED
@@ -772,4 +772,15 @@ Object.keys(_TextFieldGroup).forEach(function (key) {
772
772
  return _TextFieldGroup[key];
773
773
  }
774
774
  });
775
+ });
776
+ var _Mask = /*#__PURE__*/require("./components/Mask");
777
+ Object.keys(_Mask).forEach(function (key) {
778
+ if (key === "default" || key === "__esModule") return;
779
+ if (key in exports && exports[key] === _Mask[key]) return;
780
+ Object.defineProperty(exports, key, {
781
+ enumerable: true,
782
+ get: function get() {
783
+ return _Mask[key];
784
+ }
785
+ });
775
786
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salutejs/plasma-web",
3
- "version": "1.400.0-canary.1443.10923396048.0",
3
+ "version": "1.401.0-canary.1418.10940499394.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",
@@ -19,10 +19,10 @@
19
19
  "directory": "packages/plasma-web"
20
20
  },
21
21
  "dependencies": {
22
- "@salutejs/plasma-core": "1.179.1-dev.0",
23
- "@salutejs/plasma-hope": "1.311.1-dev.0",
24
- "@salutejs/plasma-new-hope": "0.148.0-canary.1443.10923396048.0",
25
- "@salutejs/plasma-themes": "0.17.1-dev.0",
22
+ "@salutejs/plasma-core": "1.180.0",
23
+ "@salutejs/plasma-hope": "1.312.0",
24
+ "@salutejs/plasma-new-hope": "0.149.0-canary.1418.10940499394.0",
25
+ "@salutejs/plasma-themes": "0.18.0",
26
26
  "@salutejs/plasma-tokens-b2b": "1.42.0",
27
27
  "@salutejs/plasma-tokens-b2c": "0.52.0",
28
28
  "@salutejs/plasma-tokens-web": "1.57.0",
@@ -49,9 +49,9 @@
49
49
  "@rollup/plugin-commonjs": "25.0.7",
50
50
  "@rollup/plugin-node-resolve": "15.2.3",
51
51
  "@salutejs/plasma-colors": "0.13.0",
52
- "@salutejs/plasma-cy-utils": "0.110.1-dev.0",
53
- "@salutejs/plasma-icons": "1.205.0-dev.0",
54
- "@salutejs/plasma-sb-utils": "0.177.1-dev.0",
52
+ "@salutejs/plasma-cy-utils": "0.111.0",
53
+ "@salutejs/plasma-icons": "1.205.0",
54
+ "@salutejs/plasma-sb-utils": "0.178.0",
55
55
  "@storybook/addon-docs": "7.6.17",
56
56
  "@storybook/addon-essentials": "7.6.17",
57
57
  "@storybook/addons": "7.6.17",
@@ -112,5 +112,5 @@
112
112
  "Fanil Zubairov"
113
113
  ],
114
114
  "sideEffects": false,
115
- "gitHead": "44cf5bcea7512e001d54feeb9cc39e7e8742a2aa"
115
+ "gitHead": "51978f541f3e42875e26012e3ef0f49e651ec78c"
116
116
  }
@@ -151,10 +151,12 @@ import { InputHTMLAttributes } from '@salutejs/plasma-core';
151
151
  import { InputHTMLAttributes as InputHTMLAttributes_2 } from '@salutejs/plasma-new-hope/types/types';
152
152
  import { InputHTMLAttributes as InputHTMLAttributes_3 } from 'react';
153
153
  import { JSXElementConstructor } from 'react';
154
+ import { KeyboardEvent as KeyboardEvent_2 } from 'react';
154
155
  import { LineSkeletonProps } from '@salutejs/plasma-new-hope/styled-components';
155
156
  import { LinkCustomProps } from '@salutejs/plasma-new-hope/types/components/Link/Link';
156
157
  import { List } from '@salutejs/plasma-hope';
157
158
  import { ListItem } from '@salutejs/plasma-hope';
159
+ import { MaskProps } from '@salutejs/plasma-new-hope/types/components/Mask/Mask.types';
158
160
  import { MaxLinesProps } from '@salutejs/plasma-core';
159
161
  import { mediaQuery } from '@salutejs/plasma-hope';
160
162
  import { MediaQueryFunction } from '@salutejs/plasma-hope';
@@ -1843,6 +1845,197 @@ export { List }
1843
1845
 
1844
1846
  export { ListItem }
1845
1847
 
1848
+ // @public (undocumented)
1849
+ export const Mask: ForwardRefExoticComponent<(Omit<PropsType< {
1850
+ view: {
1851
+ default: PolymorphicClassName;
1852
+ positive: PolymorphicClassName;
1853
+ warning: PolymorphicClassName;
1854
+ negative: PolymorphicClassName;
1855
+ };
1856
+ size: {
1857
+ l: PolymorphicClassName;
1858
+ m: PolymorphicClassName;
1859
+ s: PolymorphicClassName;
1860
+ xs: PolymorphicClassName;
1861
+ };
1862
+ labelPlacement: {
1863
+ inner: PolymorphicClassName;
1864
+ outer: PolymorphicClassName;
1865
+ };
1866
+ disabled: {
1867
+ true: PolymorphicClassName;
1868
+ };
1869
+ readOnly: {
1870
+ true: PolymorphicClassName;
1871
+ };
1872
+ }> & {
1873
+ size?: string | undefined;
1874
+ view?: string | undefined;
1875
+ readOnly?: boolean | undefined;
1876
+ disabled?: boolean | undefined;
1877
+ } & {
1878
+ label?: string | undefined;
1879
+ labelPlacement?: "outer" | "inner" | undefined;
1880
+ leftHelper?: string | undefined;
1881
+ contentLeft?: ReactElement<any, string | JSXElementConstructor<any>> | undefined;
1882
+ contentRight?: ReactElement<any, string | JSXElementConstructor<any>> | undefined;
1883
+ textBefore?: string | undefined;
1884
+ textAfter?: string | undefined;
1885
+ onSearch?: ((value: string, event?: KeyboardEvent_2<HTMLInputElement> | undefined) => void) | undefined;
1886
+ } & {
1887
+ requiredPlacement?: "right" | "left" | undefined;
1888
+ } & {
1889
+ required: true;
1890
+ optional?: false | undefined;
1891
+ } & {
1892
+ chips?: undefined;
1893
+ onChangeChips?: undefined;
1894
+ enumerationType?: "plain" | undefined;
1895
+ onSearch?: ((value: string, event?: KeyboardEvent_2<HTMLInputElement> | undefined) => void) | undefined;
1896
+ } & Omit<InputHTMLAttributes_2<HTMLInputElement>, "size" | "required"> & RefAttributes<HTMLInputElement> & MaskProps, "ref"> | Omit<PropsType< {
1897
+ view: {
1898
+ default: PolymorphicClassName;
1899
+ positive: PolymorphicClassName;
1900
+ warning: PolymorphicClassName;
1901
+ negative: PolymorphicClassName;
1902
+ };
1903
+ size: {
1904
+ l: PolymorphicClassName;
1905
+ m: PolymorphicClassName;
1906
+ s: PolymorphicClassName;
1907
+ xs: PolymorphicClassName;
1908
+ };
1909
+ labelPlacement: {
1910
+ inner: PolymorphicClassName;
1911
+ outer: PolymorphicClassName;
1912
+ };
1913
+ disabled: {
1914
+ true: PolymorphicClassName;
1915
+ };
1916
+ readOnly: {
1917
+ true: PolymorphicClassName;
1918
+ };
1919
+ }> & {
1920
+ size?: string | undefined;
1921
+ view?: string | undefined;
1922
+ readOnly?: boolean | undefined;
1923
+ disabled?: boolean | undefined;
1924
+ } & {
1925
+ label?: string | undefined;
1926
+ labelPlacement?: "outer" | "inner" | undefined;
1927
+ leftHelper?: string | undefined;
1928
+ contentLeft?: ReactElement<any, string | JSXElementConstructor<any>> | undefined;
1929
+ contentRight?: ReactElement<any, string | JSXElementConstructor<any>> | undefined;
1930
+ textBefore?: string | undefined;
1931
+ textAfter?: string | undefined;
1932
+ onSearch?: ((value: string, event?: KeyboardEvent_2<HTMLInputElement> | undefined) => void) | undefined;
1933
+ } & {
1934
+ requiredPlacement?: "right" | "left" | undefined;
1935
+ } & {
1936
+ required: true;
1937
+ optional?: false | undefined;
1938
+ } & {
1939
+ enumerationType: "chip";
1940
+ onSearch?: undefined;
1941
+ chips?: TextFieldPrimitiveValue[] | undefined;
1942
+ onChangeChips?: ((value: TextFieldPrimitiveValue[]) => void) | undefined;
1943
+ } & Omit<InputHTMLAttributes_2<HTMLInputElement>, "size" | "required"> & RefAttributes<HTMLInputElement> & MaskProps, "ref"> | Omit<PropsType< {
1944
+ view: {
1945
+ default: PolymorphicClassName;
1946
+ positive: PolymorphicClassName;
1947
+ warning: PolymorphicClassName;
1948
+ negative: PolymorphicClassName;
1949
+ };
1950
+ size: {
1951
+ l: PolymorphicClassName;
1952
+ m: PolymorphicClassName;
1953
+ s: PolymorphicClassName;
1954
+ xs: PolymorphicClassName;
1955
+ };
1956
+ labelPlacement: {
1957
+ inner: PolymorphicClassName;
1958
+ outer: PolymorphicClassName;
1959
+ };
1960
+ disabled: {
1961
+ true: PolymorphicClassName;
1962
+ };
1963
+ readOnly: {
1964
+ true: PolymorphicClassName;
1965
+ };
1966
+ }> & {
1967
+ size?: string | undefined;
1968
+ view?: string | undefined;
1969
+ readOnly?: boolean | undefined;
1970
+ disabled?: boolean | undefined;
1971
+ } & {
1972
+ label?: string | undefined;
1973
+ labelPlacement?: "outer" | "inner" | undefined;
1974
+ leftHelper?: string | undefined;
1975
+ contentLeft?: ReactElement<any, string | JSXElementConstructor<any>> | undefined;
1976
+ contentRight?: ReactElement<any, string | JSXElementConstructor<any>> | undefined;
1977
+ textBefore?: string | undefined;
1978
+ textAfter?: string | undefined;
1979
+ onSearch?: ((value: string, event?: KeyboardEvent_2<HTMLInputElement> | undefined) => void) | undefined;
1980
+ } & {
1981
+ requiredPlacement?: "right" | "left" | undefined;
1982
+ } & {
1983
+ optional?: true | undefined;
1984
+ required?: false | undefined;
1985
+ } & {
1986
+ chips?: undefined;
1987
+ onChangeChips?: undefined;
1988
+ enumerationType?: "plain" | undefined;
1989
+ onSearch?: ((value: string, event?: KeyboardEvent_2<HTMLInputElement> | undefined) => void) | undefined;
1990
+ } & Omit<InputHTMLAttributes_2<HTMLInputElement>, "size" | "required"> & RefAttributes<HTMLInputElement> & MaskProps, "ref"> | Omit<PropsType< {
1991
+ view: {
1992
+ default: PolymorphicClassName;
1993
+ positive: PolymorphicClassName;
1994
+ warning: PolymorphicClassName;
1995
+ negative: PolymorphicClassName;
1996
+ };
1997
+ size: {
1998
+ l: PolymorphicClassName;
1999
+ m: PolymorphicClassName;
2000
+ s: PolymorphicClassName;
2001
+ xs: PolymorphicClassName;
2002
+ };
2003
+ labelPlacement: {
2004
+ inner: PolymorphicClassName;
2005
+ outer: PolymorphicClassName;
2006
+ };
2007
+ disabled: {
2008
+ true: PolymorphicClassName;
2009
+ };
2010
+ readOnly: {
2011
+ true: PolymorphicClassName;
2012
+ };
2013
+ }> & {
2014
+ size?: string | undefined;
2015
+ view?: string | undefined;
2016
+ readOnly?: boolean | undefined;
2017
+ disabled?: boolean | undefined;
2018
+ } & {
2019
+ label?: string | undefined;
2020
+ labelPlacement?: "outer" | "inner" | undefined;
2021
+ leftHelper?: string | undefined;
2022
+ contentLeft?: ReactElement<any, string | JSXElementConstructor<any>> | undefined;
2023
+ contentRight?: ReactElement<any, string | JSXElementConstructor<any>> | undefined;
2024
+ textBefore?: string | undefined;
2025
+ textAfter?: string | undefined;
2026
+ onSearch?: ((value: string, event?: KeyboardEvent_2<HTMLInputElement> | undefined) => void) | undefined;
2027
+ } & {
2028
+ requiredPlacement?: "right" | "left" | undefined;
2029
+ } & {
2030
+ optional?: true | undefined;
2031
+ required?: false | undefined;
2032
+ } & {
2033
+ enumerationType: "chip";
2034
+ onSearch?: undefined;
2035
+ chips?: TextFieldPrimitiveValue[] | undefined;
2036
+ onChangeChips?: ((value: TextFieldPrimitiveValue[]) => void) | undefined;
2037
+ } & Omit<InputHTMLAttributes_2<HTMLInputElement>, "size" | "required"> & RefAttributes<HTMLInputElement> & MaskProps, "ref">) & RefAttributes<HTMLInputElement>>;
2038
+
1846
2039
  export { MaxLinesProps }
1847
2040
 
1848
2041
  export { mediaQuery }