@salutejs/plasma-new-hope 0.270.0-canary.1744.13385332397.0 → 0.270.0-canary.1770.13386075549.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Autocomplete/Autocomplete.css +1 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.css +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDate.css +2 -2
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +2 -2
- package/cjs/components/DatePicker/SingleDate/SingleDate.css +1 -1
- package/cjs/components/Pagination/Pagination.css +1 -1
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +1 -1
- package/cjs/components/Range/Range.css +2 -2
- package/cjs/components/Range/Range.styles.js.map +1 -1
- package/cjs/components/Range/Range.tokens.js +2 -0
- package/cjs/components/Range/Range.tokens.js.map +1 -1
- package/cjs/components/Range/variations/_readonly/base.js +1 -1
- package/cjs/components/Range/variations/_readonly/base.js.map +1 -1
- package/cjs/components/Range/variations/_readonly/{base_8q1gx8.css → base_1jlqwtc.css} +1 -1
- package/cjs/components/Select/Select.css +1 -1
- package/cjs/components/Select/ui/Target/Target.css +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +1 -1
- package/cjs/components/Slider/Slider.css +1 -1
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +1 -1
- package/cjs/components/TextArea/TextArea.js +9 -7
- package/cjs/components/TextArea/TextArea.js.map +1 -1
- package/cjs/components/TextArea/TextArea.tokens.js +3 -0
- package/cjs/components/TextArea/TextArea.tokens.js.map +1 -1
- package/cjs/components/TextArea/variations/_clear/base.js.map +1 -1
- package/cjs/components/TextArea/variations/_read-only/base.js +9 -0
- package/cjs/components/TextArea/variations/_read-only/base.js.map +1 -0
- package/cjs/components/TextArea/variations/_read-only/base_om8eo9.css +1 -0
- package/cjs/components/TextField/TextField.tokens.js +1 -0
- package/cjs/components/TextField/TextField.tokens.js.map +1 -1
- package/cjs/components/TextField/variations/_read-only/base.js +1 -1
- package/cjs/components/TextField/variations/_read-only/base.js.map +1 -1
- package/cjs/components/TextField/variations/_read-only/base_sr3to2.css +1 -0
- package/cjs/index.css +4 -2
- package/emotion/cjs/components/Range/Range.styles.js +10 -10
- package/emotion/cjs/components/Range/Range.tokens.js +2 -0
- package/emotion/cjs/components/Range/variations/_readonly/base.js +1 -1
- package/emotion/cjs/components/TextArea/TextArea.js +10 -8
- package/emotion/cjs/components/TextArea/TextArea.tokens.js +3 -0
- package/emotion/cjs/components/TextArea/variations/_clear/base.js +1 -1
- package/emotion/cjs/components/TextArea/variations/_read-only/base.js +10 -0
- package/emotion/cjs/components/TextArea/variations/_read-only/tokens.json +1 -0
- package/emotion/cjs/components/TextField/TextField.tokens.js +1 -0
- package/emotion/cjs/components/TextField/variations/_read-only/base.js +1 -1
- package/emotion/cjs/components/_Icon/Icon.assets/Lock.js +26 -0
- package/emotion/cjs/components/_Icon/Icons/IconChevronLeft.js +8 -3
- package/emotion/cjs/components/_Icon/Icons/IconLock.js +29 -0
- package/emotion/cjs/components/_Icon/index.js +7 -0
- package/emotion/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +1 -1
- package/emotion/cjs/examples/plasma_b2c/components/Range/Range.config.js +7 -7
- package/emotion/cjs/examples/plasma_b2c/components/Range/Range.stories.tsx +14 -7
- package/emotion/cjs/examples/plasma_b2c/components/TextArea/TextArea.config.js +17 -14
- package/emotion/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +71 -20
- package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +22 -22
- package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +92 -26
- package/emotion/cjs/examples/plasma_b2c/components/Tokens/Tokens.stories.tsx +22 -28
- package/emotion/cjs/examples/plasma_b2c/components/Tokens/Tokens.styles.js +14 -14
- package/emotion/cjs/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +1 -1
- package/emotion/cjs/examples/plasma_web/components/Range/Range.config.js +7 -7
- package/emotion/cjs/examples/plasma_web/components/Range/Range.stories.tsx +14 -7
- package/emotion/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +71 -20
- package/emotion/cjs/examples/plasma_web/components/TextField/TextField.config.js +22 -22
- package/emotion/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +85 -25
- package/emotion/cjs/examples/plasma_web/components/Tokens/Tokens.stories.tsx +22 -28
- package/emotion/cjs/examples/plasma_web/components/Tokens/Tokens.styles.js +14 -14
- package/emotion/es/components/Range/Range.styles.js +10 -10
- package/emotion/es/components/Range/Range.tokens.js +2 -0
- package/emotion/es/components/Range/variations/_readonly/base.js +1 -1
- package/emotion/es/components/TextArea/TextArea.js +6 -4
- package/emotion/es/components/TextArea/TextArea.tokens.js +3 -0
- package/emotion/es/components/TextArea/variations/_clear/base.js +1 -1
- package/emotion/es/components/TextArea/variations/_read-only/base.js +4 -0
- package/emotion/es/components/TextArea/variations/_read-only/tokens.json +1 -0
- package/emotion/es/components/TextField/TextField.tokens.js +1 -0
- package/emotion/es/components/TextField/variations/_read-only/base.js +2 -2
- package/emotion/es/components/_Icon/Icon.assets/Lock.js +19 -0
- package/emotion/es/components/_Icon/Icons/IconChevronLeft.js +8 -3
- package/emotion/es/components/_Icon/Icons/IconLock.js +22 -0
- package/emotion/es/components/_Icon/index.js +1 -0
- package/emotion/es/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +1 -1
- package/emotion/es/examples/plasma_b2c/components/Range/Range.config.js +7 -7
- package/emotion/es/examples/plasma_b2c/components/Range/Range.stories.tsx +14 -7
- package/emotion/es/examples/plasma_b2c/components/TextArea/TextArea.config.js +17 -14
- package/emotion/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +71 -20
- package/emotion/es/examples/plasma_b2c/components/TextField/TextField.config.js +22 -22
- package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +92 -26
- package/emotion/es/examples/plasma_b2c/components/Tokens/Tokens.stories.tsx +22 -28
- package/emotion/es/examples/plasma_b2c/components/Tokens/Tokens.styles.js +14 -14
- package/emotion/es/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +1 -1
- package/emotion/es/examples/plasma_web/components/Range/Range.config.js +7 -7
- package/emotion/es/examples/plasma_web/components/Range/Range.stories.tsx +14 -7
- package/emotion/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +71 -20
- package/emotion/es/examples/plasma_web/components/TextField/TextField.config.js +22 -22
- package/emotion/es/examples/plasma_web/components/TextField/TextField.stories.tsx +85 -25
- package/emotion/es/examples/plasma_web/components/Tokens/Tokens.stories.tsx +22 -28
- package/emotion/es/examples/plasma_web/components/Tokens/Tokens.styles.js +14 -14
- package/es/components/Autocomplete/Autocomplete.css +1 -1
- package/es/components/Combobox/ComboboxNew/Combobox.css +1 -1
- package/es/components/DatePicker/RangeDate/RangeDate.css +2 -2
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +2 -2
- package/es/components/DatePicker/SingleDate/SingleDate.css +1 -1
- package/es/components/Pagination/Pagination.css +1 -1
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +1 -1
- package/es/components/Range/Range.css +2 -2
- package/es/components/Range/Range.styles.js.map +1 -1
- package/es/components/Range/Range.tokens.js +2 -0
- package/es/components/Range/Range.tokens.js.map +1 -1
- package/es/components/Range/variations/_readonly/base.js +1 -1
- package/es/components/Range/variations/_readonly/base.js.map +1 -1
- package/es/components/Range/variations/_readonly/{base_8q1gx8.css → base_1jlqwtc.css} +1 -1
- package/es/components/Select/Select.css +1 -1
- package/es/components/Select/ui/Target/Target.css +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +1 -1
- package/es/components/Slider/Slider.css +1 -1
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +1 -1
- package/es/components/TextArea/TextArea.js +9 -7
- package/es/components/TextArea/TextArea.js.map +1 -1
- package/es/components/TextArea/TextArea.tokens.js +3 -0
- package/es/components/TextArea/TextArea.tokens.js.map +1 -1
- package/es/components/TextArea/variations/_clear/base.js.map +1 -1
- package/es/components/TextArea/variations/_read-only/base.js +5 -0
- package/es/components/TextArea/variations/_read-only/base.js.map +1 -0
- package/es/components/TextArea/variations/_read-only/base_om8eo9.css +1 -0
- package/es/components/TextField/TextField.tokens.js +1 -0
- package/es/components/TextField/TextField.tokens.js.map +1 -1
- package/es/components/TextField/variations/_read-only/base.js +1 -1
- package/es/components/TextField/variations/_read-only/base.js.map +1 -1
- package/es/components/TextField/variations/_read-only/base_sr3to2.css +1 -0
- package/es/index.css +4 -2
- package/package.json +5 -5
- package/styled-components/cjs/components/Range/Range.tokens.js +2 -0
- package/styled-components/cjs/components/Range/variations/_readonly/base.js +1 -1
- package/styled-components/cjs/components/TextArea/TextArea.js +9 -7
- package/styled-components/cjs/components/TextArea/TextArea.tokens.js +3 -0
- package/styled-components/cjs/components/TextArea/variations/_read-only/base.js +10 -0
- package/styled-components/cjs/components/TextArea/variations/_read-only/tokens.json +1 -0
- package/styled-components/cjs/components/TextField/TextField.tokens.js +1 -0
- package/styled-components/cjs/components/TextField/variations/_read-only/base.js +1 -1
- package/styled-components/cjs/components/_Icon/Icon.assets/Lock.js +26 -0
- package/styled-components/cjs/components/_Icon/Icons/IconChevronLeft.js +8 -3
- package/styled-components/cjs/components/_Icon/Icons/IconLock.js +29 -0
- package/styled-components/cjs/components/_Icon/index.js +7 -0
- package/styled-components/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Range/Range.config.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Range/Range.stories.tsx +14 -7
- package/styled-components/cjs/examples/plasma_b2c/components/TextArea/TextArea.config.js +3 -0
- package/styled-components/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +71 -20
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +7 -7
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +92 -26
- package/styled-components/cjs/examples/plasma_b2c/components/Tokens/Tokens.stories.tsx +22 -28
- package/styled-components/cjs/examples/plasma_b2c/components/Tokens/Tokens.styles.js +2 -2
- package/styled-components/cjs/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Range/Range.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Range/Range.stories.tsx +14 -7
- package/styled-components/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +71 -20
- package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.config.js +7 -7
- package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +85 -25
- package/styled-components/cjs/examples/plasma_web/components/Tokens/Tokens.stories.tsx +22 -28
- package/styled-components/cjs/examples/plasma_web/components/Tokens/Tokens.styles.js +2 -2
- package/styled-components/es/components/Range/Range.tokens.js +2 -0
- package/styled-components/es/components/Range/variations/_readonly/base.js +1 -1
- package/styled-components/es/components/TextArea/TextArea.js +5 -3
- package/styled-components/es/components/TextArea/TextArea.tokens.js +3 -0
- package/styled-components/es/components/TextArea/variations/_read-only/base.js +4 -0
- package/styled-components/es/components/TextArea/variations/_read-only/tokens.json +1 -0
- package/styled-components/es/components/TextField/TextField.tokens.js +1 -0
- package/styled-components/es/components/TextField/variations/_read-only/base.js +2 -2
- package/styled-components/es/components/_Icon/Icon.assets/Lock.js +19 -0
- package/styled-components/es/components/_Icon/Icons/IconChevronLeft.js +8 -3
- package/styled-components/es/components/_Icon/Icons/IconLock.js +22 -0
- package/styled-components/es/components/_Icon/index.js +1 -0
- package/styled-components/es/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Range/Range.config.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Range/Range.stories.tsx +14 -7
- package/styled-components/es/examples/plasma_b2c/components/TextArea/TextArea.config.js +3 -0
- package/styled-components/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +71 -20
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.config.js +7 -7
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +92 -26
- package/styled-components/es/examples/plasma_b2c/components/Tokens/Tokens.stories.tsx +22 -28
- package/styled-components/es/examples/plasma_b2c/components/Tokens/Tokens.styles.js +2 -2
- package/styled-components/es/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +1 -1
- package/styled-components/es/examples/plasma_web/components/Range/Range.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/Range/Range.stories.tsx +14 -7
- package/styled-components/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +71 -20
- package/styled-components/es/examples/plasma_web/components/TextField/TextField.config.js +7 -7
- package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +85 -25
- package/styled-components/es/examples/plasma_web/components/Tokens/Tokens.stories.tsx +22 -28
- package/styled-components/es/examples/plasma_web/components/Tokens/Tokens.styles.js +2 -2
- package/types/components/Range/Range.tokens.d.ts +2 -0
- package/types/components/Range/Range.tokens.d.ts.map +1 -1
- package/types/components/Range/variations/_readonly/base.d.ts.map +1 -1
- package/types/components/TextArea/TextArea.d.ts +3 -2
- package/types/components/TextArea/TextArea.d.ts.map +1 -1
- package/types/components/TextArea/TextArea.tokens.d.ts +3 -0
- package/types/components/TextArea/TextArea.tokens.d.ts.map +1 -1
- package/types/components/TextArea/variations/_clear/base.d.ts.map +1 -1
- package/types/components/TextArea/variations/_read-only/base.d.ts +2 -0
- package/types/components/TextArea/variations/_read-only/base.d.ts.map +1 -0
- package/types/components/TextField/TextField.tokens.d.ts +1 -0
- package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
- package/types/components/TextField/variations/_read-only/base.d.ts.map +1 -1
- package/types/components/_Icon/Icon.assets/Lock.d.ts +4 -0
- package/types/components/_Icon/Icon.assets/Lock.d.ts.map +1 -0
- package/types/components/_Icon/Icons/IconChevronLeft.d.ts.map +1 -1
- package/types/components/_Icon/Icons/IconLock.d.ts +4 -0
- package/types/components/_Icon/Icons/IconLock.d.ts.map +1 -0
- package/types/components/_Icon/index.d.ts +1 -0
- package/types/components/_Icon/index.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Range/Range.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/TextArea/TextArea.config.d.ts +3 -0
- package/types/examples/plasma_b2c/components/TextArea/TextArea.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/TextArea/TextArea.d.ts +3 -0
- package/types/examples/plasma_b2c/components/TextArea/TextArea.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/TextField/TextField.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Range/Range.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/TextField/TextField.config.d.ts.map +1 -1
- package/cjs/components/TextField/variations/_read-only/base_oizdmx.css +0 -1
- package/es/components/TextField/variations/_read-only/base_oizdmx.css +0 -1
@@ -8,6 +8,7 @@ import { textAreaConfig } from '../../../../components/TextArea';
|
|
8
8
|
import { mergeConfig } from '../../../../engines';
|
9
9
|
import { WithTheme, argTypesFromConfig } from '../../../_helpers';
|
10
10
|
import type { PopoverPlacement } from '../Popover/Popover';
|
11
|
+
import { IconLock } from '../../../../components/_Icon';
|
11
12
|
|
12
13
|
import { config } from './TextArea.config';
|
13
14
|
import { TextArea } from './TextArea';
|
@@ -38,6 +39,16 @@ const placements: Array<PopoverPlacement> = [
|
|
38
39
|
'auto',
|
39
40
|
];
|
40
41
|
|
42
|
+
const getIcon = (IconComponent: React.ReactElement, size: string, readOnly = false) => {
|
43
|
+
const iconSize = size === 'xs' ? 'xs' : 's';
|
44
|
+
|
45
|
+
if (readOnly) {
|
46
|
+
return <IconLock size={iconSize} color="var(--text-secondary)" style={{ opacity: 0.4 }} />;
|
47
|
+
}
|
48
|
+
|
49
|
+
return <IconComponent size={iconSize} color="inherit" />;
|
50
|
+
};
|
51
|
+
|
41
52
|
type StoryTextAreaPropsCustom = {
|
42
53
|
hasHint?: boolean;
|
43
54
|
enableContentRight?: boolean;
|
@@ -61,19 +72,25 @@ const meta: Meta<StoryTextAreaProps> = {
|
|
61
72
|
control: {
|
62
73
|
type: 'boolean',
|
63
74
|
},
|
64
|
-
if: {
|
75
|
+
if: {
|
76
|
+
arg: 'optional',
|
77
|
+
truthy: false,
|
78
|
+
},
|
65
79
|
},
|
66
80
|
optional: {
|
67
81
|
control: {
|
68
82
|
type: 'boolean',
|
69
83
|
},
|
70
|
-
if: {
|
84
|
+
if: {
|
85
|
+
arg: 'required',
|
86
|
+
truthy: false,
|
87
|
+
},
|
71
88
|
},
|
72
89
|
size: {
|
73
90
|
options: sizes,
|
74
91
|
defaultValue: 'm',
|
75
92
|
control: {
|
76
|
-
type: '
|
93
|
+
type: 'inline-radio',
|
77
94
|
},
|
78
95
|
},
|
79
96
|
view: {
|
@@ -92,19 +109,28 @@ const meta: Meta<StoryTextAreaProps> = {
|
|
92
109
|
control: {
|
93
110
|
type: 'boolean',
|
94
111
|
},
|
95
|
-
if: {
|
112
|
+
if: {
|
113
|
+
arg: 'clear',
|
114
|
+
truthy: true,
|
115
|
+
},
|
96
116
|
},
|
97
117
|
cols: {
|
98
118
|
control: {
|
99
119
|
type: 'number',
|
100
120
|
},
|
101
|
-
if: {
|
121
|
+
if: {
|
122
|
+
arg: 'clear',
|
123
|
+
truthy: false,
|
124
|
+
},
|
102
125
|
},
|
103
126
|
rows: {
|
104
127
|
control: {
|
105
128
|
type: 'number',
|
106
129
|
},
|
107
|
-
if: {
|
130
|
+
if: {
|
131
|
+
arg: 'clear',
|
132
|
+
truthy: false,
|
133
|
+
},
|
108
134
|
},
|
109
135
|
hasHint: {
|
110
136
|
control: {
|
@@ -113,47 +139,65 @@ const meta: Meta<StoryTextAreaProps> = {
|
|
113
139
|
},
|
114
140
|
hintText: {
|
115
141
|
control: { type: 'text' },
|
116
|
-
if: {
|
142
|
+
if: {
|
143
|
+
arg: 'hasHint',
|
144
|
+
truthy: true,
|
145
|
+
},
|
117
146
|
},
|
118
147
|
hintView: {
|
119
148
|
options: hintViews,
|
120
149
|
control: {
|
121
150
|
type: 'select',
|
122
151
|
},
|
123
|
-
if: {
|
152
|
+
if: {
|
153
|
+
arg: 'hasHint',
|
154
|
+
truthy: true,
|
155
|
+
},
|
124
156
|
},
|
125
157
|
hintSize: {
|
126
158
|
options: hintSizes,
|
127
159
|
control: {
|
128
160
|
type: 'select',
|
129
161
|
},
|
130
|
-
if: {
|
162
|
+
if: {
|
163
|
+
arg: 'hasHint',
|
164
|
+
truthy: true,
|
165
|
+
},
|
131
166
|
},
|
132
167
|
hintTrigger: {
|
133
168
|
options: hintTriggers,
|
134
169
|
control: {
|
135
170
|
type: 'inline-radio',
|
136
171
|
},
|
137
|
-
if: {
|
172
|
+
if: {
|
173
|
+
arg: 'hasHint',
|
174
|
+
truthy: true,
|
175
|
+
},
|
138
176
|
},
|
139
177
|
hintPlacement: {
|
140
178
|
options: placements,
|
141
179
|
control: {
|
142
180
|
type: 'select',
|
143
181
|
},
|
144
|
-
if: {
|
182
|
+
if: {
|
183
|
+
arg: 'hasHint',
|
184
|
+
truthy: true,
|
185
|
+
},
|
145
186
|
mappers: placements,
|
146
187
|
},
|
147
188
|
hintHasArrow: {
|
148
189
|
control: { type: 'boolean' },
|
149
|
-
if: {
|
190
|
+
if: {
|
191
|
+
arg: 'hasHint',
|
192
|
+
truthy: true,
|
193
|
+
},
|
150
194
|
},
|
151
195
|
hintWidth: {
|
152
196
|
control: { type: 'text' },
|
153
|
-
if: {
|
154
|
-
|
155
|
-
|
156
|
-
|
197
|
+
if: {
|
198
|
+
arg: 'hasHint',
|
199
|
+
truthy: true,
|
200
|
+
},
|
157
201
|
},
|
158
202
|
width: {
|
159
203
|
control: { type: 'text' },
|
@@ -172,6 +216,7 @@ const meta: Meta<StoryTextAreaProps> = {
|
|
172
216
|
},
|
173
217
|
...disableProps([
|
174
218
|
'helperBlock',
|
219
|
+
'helperText',
|
175
220
|
'$isFocused',
|
176
221
|
'contentRight',
|
177
222
|
'autoComplete',
|
@@ -195,6 +240,7 @@ const meta: Meta<StoryTextAreaProps> = {
|
|
195
240
|
'hintOffset',
|
196
241
|
'hintContentLeft',
|
197
242
|
'hintView',
|
243
|
+
'hintOpened',
|
198
244
|
]),
|
199
245
|
},
|
200
246
|
args: {
|
@@ -238,19 +284,24 @@ const onBlur = action('onBlur');
|
|
238
284
|
const StoryDefault = (props: StoryTextAreaProps) => {
|
239
285
|
const [value, setValue] = useState('Значение поля');
|
240
286
|
|
241
|
-
const iconSize = props.size === 'xs' ? 'xs' : 's';
|
242
|
-
|
243
287
|
return (
|
244
288
|
<TextArea
|
245
289
|
value={value}
|
246
|
-
contentRight={
|
290
|
+
contentRight={
|
291
|
+
props.enableContentRight || props.readOnly
|
292
|
+
? getIcon(IconPlaceholder, props.size, props.readOnly)
|
293
|
+
: undefined
|
294
|
+
}
|
247
295
|
onChange={(e) => {
|
248
296
|
setValue(e.target.value);
|
249
297
|
onChange(e);
|
250
298
|
}}
|
251
299
|
onFocus={onFocus}
|
252
300
|
onBlur={onBlur}
|
253
|
-
style={{
|
301
|
+
style={{
|
302
|
+
width: '70%',
|
303
|
+
margin: '0 auto',
|
304
|
+
}}
|
254
305
|
{...props}
|
255
306
|
/>
|
256
307
|
);
|