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