@salutejs/plasma-new-hope 0.156.0-canary.1451.11071985286.0 → 0.156.0-canary.1461.11068657609.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Drawer/Drawer.js +6 -4
- package/cjs/components/Drawer/Drawer.js.map +1 -1
- package/cjs/components/Drawer/Drawer.styles.js +11 -14
- package/cjs/components/Drawer/Drawer.styles.js.map +1 -1
- package/cjs/components/Drawer/Drawer.tokens.js +5 -1
- package/cjs/components/Drawer/Drawer.tokens.js.map +1 -1
- package/cjs/components/Drawer/hooks/useDrawer.js +10 -5
- package/cjs/components/Drawer/hooks/useDrawer.js.map +1 -1
- package/cjs/components/TextArea/TextArea.js +15 -21
- package/cjs/components/TextArea/TextArea.js.map +1 -1
- package/cjs/components/TextArea/TextArea.tokens.js +2 -15
- package/cjs/components/TextArea/TextArea.tokens.js.map +1 -1
- package/cjs/components/TextArea/variations/_view/base.js +1 -1
- package/cjs/components/TextArea/variations/_view/base.js.map +1 -1
- package/cjs/components/TextArea/variations/_view/base_8npjyq.css +1 -0
- package/cjs/index.css +1 -3
- package/emotion/cjs/components/Drawer/Drawer.js +2 -0
- package/emotion/cjs/components/Drawer/Drawer.styles.js +11 -14
- package/emotion/cjs/components/Drawer/Drawer.tokens.js +5 -1
- package/emotion/cjs/components/Drawer/hooks/useDrawer.js +10 -5
- package/emotion/cjs/components/TextArea/TextArea.js +16 -22
- package/emotion/cjs/components/TextArea/TextArea.template-doc.mdx +0 -29
- package/emotion/cjs/components/TextArea/TextArea.tokens.js +2 -15
- package/emotion/cjs/components/TextArea/variations/_view/base.js +2 -2
- package/emotion/cjs/examples/plasma_b2c/components/TextArea/TextArea.config.js +9 -12
- package/emotion/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +11 -18
- package/emotion/cjs/examples/plasma_web/components/TextArea/TextArea.config.js +9 -12
- package/emotion/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +12 -18
- package/emotion/es/components/Drawer/Drawer.js +3 -1
- package/emotion/es/components/Drawer/Drawer.styles.js +11 -14
- package/emotion/es/components/Drawer/Drawer.tokens.js +5 -1
- package/emotion/es/components/Drawer/hooks/useDrawer.js +10 -5
- package/emotion/es/components/TextArea/TextArea.js +14 -20
- package/emotion/es/components/TextArea/TextArea.template-doc.mdx +0 -29
- package/emotion/es/components/TextArea/TextArea.tokens.js +2 -15
- package/emotion/es/components/TextArea/variations/_view/base.js +2 -2
- package/emotion/es/examples/plasma_b2c/components/TextArea/TextArea.config.js +9 -12
- package/emotion/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +11 -18
- package/emotion/es/examples/plasma_web/components/TextArea/TextArea.config.js +9 -12
- package/emotion/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +12 -18
- package/es/components/Drawer/Drawer.js +4 -2
- package/es/components/Drawer/Drawer.js.map +1 -1
- package/es/components/Drawer/Drawer.styles.js +11 -14
- package/es/components/Drawer/Drawer.styles.js.map +1 -1
- package/es/components/Drawer/Drawer.tokens.js +5 -1
- package/es/components/Drawer/Drawer.tokens.js.map +1 -1
- package/es/components/Drawer/hooks/useDrawer.js +10 -5
- package/es/components/Drawer/hooks/useDrawer.js.map +1 -1
- package/es/components/TextArea/TextArea.js +15 -21
- package/es/components/TextArea/TextArea.js.map +1 -1
- package/es/components/TextArea/TextArea.tokens.js +2 -15
- package/es/components/TextArea/TextArea.tokens.js.map +1 -1
- package/es/components/TextArea/variations/_view/base.js +1 -1
- package/es/components/TextArea/variations/_view/base.js.map +1 -1
- package/es/components/TextArea/variations/_view/base_8npjyq.css +1 -0
- package/es/index.css +1 -3
- package/package.json +2 -2
- package/styled-components/cjs/components/Drawer/Drawer.js +2 -0
- package/styled-components/cjs/components/Drawer/Drawer.styles.js +11 -14
- package/styled-components/cjs/components/Drawer/Drawer.tokens.js +5 -1
- package/styled-components/cjs/components/Drawer/hooks/useDrawer.js +10 -5
- package/styled-components/cjs/components/TextArea/TextArea.js +15 -21
- package/styled-components/cjs/components/TextArea/TextArea.template-doc.mdx +0 -29
- package/styled-components/cjs/components/TextArea/TextArea.tokens.js +2 -15
- package/styled-components/cjs/components/TextArea/variations/_view/base.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/TextArea/TextArea.config.js +9 -12
- package/styled-components/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +11 -18
- package/styled-components/cjs/examples/plasma_web/components/TextArea/TextArea.config.js +8 -11
- package/styled-components/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +12 -18
- package/styled-components/es/components/Drawer/Drawer.js +3 -1
- package/styled-components/es/components/Drawer/Drawer.styles.js +11 -14
- package/styled-components/es/components/Drawer/Drawer.tokens.js +5 -1
- package/styled-components/es/components/Drawer/hooks/useDrawer.js +10 -5
- package/styled-components/es/components/TextArea/TextArea.js +13 -19
- package/styled-components/es/components/TextArea/TextArea.template-doc.mdx +0 -29
- package/styled-components/es/components/TextArea/TextArea.tokens.js +2 -15
- package/styled-components/es/components/TextArea/variations/_view/base.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/TextArea/TextArea.config.js +9 -12
- package/styled-components/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +11 -18
- package/styled-components/es/examples/plasma_web/components/TextArea/TextArea.config.js +8 -11
- package/styled-components/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +12 -18
- package/types/components/Drawer/Drawer.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.styles.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.tokens.d.ts +4 -0
- package/types/components/Drawer/Drawer.tokens.d.ts.map +1 -1
- package/types/components/Drawer/hooks/useDrawer.d.ts.map +1 -1
- package/types/components/TextArea/TextArea.d.ts +0 -4
- package/types/components/TextArea/TextArea.d.ts.map +1 -1
- package/types/components/TextArea/TextArea.tokens.d.ts +0 -13
- package/types/components/TextArea/TextArea.tokens.d.ts.map +1 -1
- package/types/components/TextArea/TextArea.types.d.ts +3 -15
- package/types/components/TextArea/TextArea.types.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/TextArea/TextArea.config.d.ts +0 -3
- package/types/examples/plasma_b2c/components/TextArea/TextArea.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/TextArea/TextArea.d.ts +0 -81
- package/types/examples/plasma_b2c/components/TextArea/TextArea.d.ts.map +1 -1
- package/types/examples/plasma_web/components/TextArea/TextArea.config.d.ts +0 -3
- package/types/examples/plasma_web/components/TextArea/TextArea.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/TextArea/TextArea.d.ts +0 -81
- package/types/examples/plasma_web/components/TextArea/TextArea.d.ts.map +1 -1
- package/cjs/components/TextArea/variations/_clear/base.js +0 -9
- package/cjs/components/TextArea/variations/_clear/base.js.map +0 -1
- package/cjs/components/TextArea/variations/_clear/base_193g3al.css +0 -1
- package/cjs/components/TextArea/variations/_view/base_d83rii.css +0 -1
- package/emotion/cjs/components/TextArea/variations/_clear/base.js +0 -10
- package/emotion/es/components/TextArea/variations/_clear/base.js +0 -4
- package/es/components/TextArea/variations/_clear/base.js +0 -5
- package/es/components/TextArea/variations/_clear/base.js.map +0 -1
- package/es/components/TextArea/variations/_clear/base_193g3al.css +0 -1
- package/es/components/TextArea/variations/_view/base_d83rii.css +0 -1
- package/styled-components/cjs/components/TextArea/variations/_clear/base.js +0 -10
- package/styled-components/es/components/TextArea/variations/_clear/base.js +0 -4
- package/types/components/TextArea/variations/_clear/base.d.ts +0 -2
- package/types/components/TextArea/variations/_clear/base.d.ts.map +0 -1
@@ -2,7 +2,8 @@ import React, { useState } from 'react';
|
|
2
2
|
import type { ComponentProps } from 'react';
|
3
3
|
import type { Meta, StoryObj } from '@storybook/react';
|
4
4
|
import { action } from '@storybook/addon-actions';
|
5
|
-
import {
|
5
|
+
import { tertiary } from '@salutejs/plasma-core';
|
6
|
+
import styled from '@emotion/styled';
|
6
7
|
|
7
8
|
import { textAreaConfig } from '../../../../components/TextArea';
|
8
9
|
import { mergeConfig } from '../../../../engines';
|
@@ -47,13 +48,11 @@ const meta: Meta<StoryTextAreaProps> = {
|
|
47
48
|
control: {
|
48
49
|
type: 'number',
|
49
50
|
},
|
50
|
-
if: { arg: 'clear', truthy: false },
|
51
51
|
},
|
52
52
|
cols: {
|
53
53
|
control: {
|
54
54
|
type: 'number',
|
55
55
|
},
|
56
|
-
if: { arg: 'clear', truthy: false },
|
57
56
|
},
|
58
57
|
labelPlacement: {
|
59
58
|
options: labelPlacements,
|
@@ -61,20 +60,11 @@ const meta: Meta<StoryTextAreaProps> = {
|
|
61
60
|
type: 'select',
|
62
61
|
},
|
63
62
|
},
|
64
|
-
hasDivider: {
|
65
|
-
control: {
|
66
|
-
type: 'boolean',
|
67
|
-
},
|
68
|
-
if: { arg: 'clear', truthy: true },
|
69
|
-
},
|
70
63
|
},
|
71
64
|
args: {
|
72
65
|
id: 'example-textarea',
|
73
|
-
view: 'default',
|
74
|
-
size: 's',
|
75
66
|
enableContentRight: true,
|
76
|
-
label: '
|
77
|
-
labelPlacement: 'outer',
|
67
|
+
label: 'Подсказка',
|
78
68
|
placeholder: 'Заполните многострочное поле',
|
79
69
|
leftHelper: 'Подсказка к полю слева',
|
80
70
|
rightHelper: 'Подсказка к полю справа',
|
@@ -86,8 +76,6 @@ const meta: Meta<StoryTextAreaProps> = {
|
|
86
76
|
optional: false,
|
87
77
|
required: false,
|
88
78
|
requiredPlacement: 'right',
|
89
|
-
clear: false,
|
90
|
-
hasDivider: false,
|
91
79
|
},
|
92
80
|
};
|
93
81
|
|
@@ -97,15 +85,20 @@ const onChange = action('onChange');
|
|
97
85
|
const onFocus = action('onFocus');
|
98
86
|
const onBlur = action('onBlur');
|
99
87
|
|
88
|
+
const IconPlaceholder = styled.div`
|
89
|
+
width: 1.5rem;
|
90
|
+
height: 1.5rem;
|
91
|
+
border-radius: 50%;
|
92
|
+
background: ${tertiary};
|
93
|
+
`;
|
94
|
+
|
100
95
|
const StoryDefault = (props: StoryTextAreaProps) => {
|
101
96
|
const [value, setValue] = useState('Значение поля');
|
102
97
|
|
103
|
-
const iconSize = props.size === 'xs' ? 'xs' : 's';
|
104
|
-
|
105
98
|
return (
|
106
99
|
<TextArea
|
107
100
|
value={value}
|
108
|
-
contentRight={props.enableContentRight ? <IconPlaceholder
|
101
|
+
contentRight={props.enableContentRight ? <IconPlaceholder /> : undefined}
|
109
102
|
onChange={(e) => {
|
110
103
|
setValue(e.target.value);
|
111
104
|
onChange(e);
|