@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.
Files changed (114) hide show
  1. package/cjs/components/Drawer/Drawer.js +6 -4
  2. package/cjs/components/Drawer/Drawer.js.map +1 -1
  3. package/cjs/components/Drawer/Drawer.styles.js +11 -14
  4. package/cjs/components/Drawer/Drawer.styles.js.map +1 -1
  5. package/cjs/components/Drawer/Drawer.tokens.js +5 -1
  6. package/cjs/components/Drawer/Drawer.tokens.js.map +1 -1
  7. package/cjs/components/Drawer/hooks/useDrawer.js +10 -5
  8. package/cjs/components/Drawer/hooks/useDrawer.js.map +1 -1
  9. package/cjs/components/TextArea/TextArea.js +15 -21
  10. package/cjs/components/TextArea/TextArea.js.map +1 -1
  11. package/cjs/components/TextArea/TextArea.tokens.js +2 -15
  12. package/cjs/components/TextArea/TextArea.tokens.js.map +1 -1
  13. package/cjs/components/TextArea/variations/_view/base.js +1 -1
  14. package/cjs/components/TextArea/variations/_view/base.js.map +1 -1
  15. package/cjs/components/TextArea/variations/_view/base_8npjyq.css +1 -0
  16. package/cjs/index.css +1 -3
  17. package/emotion/cjs/components/Drawer/Drawer.js +2 -0
  18. package/emotion/cjs/components/Drawer/Drawer.styles.js +11 -14
  19. package/emotion/cjs/components/Drawer/Drawer.tokens.js +5 -1
  20. package/emotion/cjs/components/Drawer/hooks/useDrawer.js +10 -5
  21. package/emotion/cjs/components/TextArea/TextArea.js +16 -22
  22. package/emotion/cjs/components/TextArea/TextArea.template-doc.mdx +0 -29
  23. package/emotion/cjs/components/TextArea/TextArea.tokens.js +2 -15
  24. package/emotion/cjs/components/TextArea/variations/_view/base.js +2 -2
  25. package/emotion/cjs/examples/plasma_b2c/components/TextArea/TextArea.config.js +9 -12
  26. package/emotion/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +11 -18
  27. package/emotion/cjs/examples/plasma_web/components/TextArea/TextArea.config.js +9 -12
  28. package/emotion/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +12 -18
  29. package/emotion/es/components/Drawer/Drawer.js +3 -1
  30. package/emotion/es/components/Drawer/Drawer.styles.js +11 -14
  31. package/emotion/es/components/Drawer/Drawer.tokens.js +5 -1
  32. package/emotion/es/components/Drawer/hooks/useDrawer.js +10 -5
  33. package/emotion/es/components/TextArea/TextArea.js +14 -20
  34. package/emotion/es/components/TextArea/TextArea.template-doc.mdx +0 -29
  35. package/emotion/es/components/TextArea/TextArea.tokens.js +2 -15
  36. package/emotion/es/components/TextArea/variations/_view/base.js +2 -2
  37. package/emotion/es/examples/plasma_b2c/components/TextArea/TextArea.config.js +9 -12
  38. package/emotion/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +11 -18
  39. package/emotion/es/examples/plasma_web/components/TextArea/TextArea.config.js +9 -12
  40. package/emotion/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +12 -18
  41. package/es/components/Drawer/Drawer.js +4 -2
  42. package/es/components/Drawer/Drawer.js.map +1 -1
  43. package/es/components/Drawer/Drawer.styles.js +11 -14
  44. package/es/components/Drawer/Drawer.styles.js.map +1 -1
  45. package/es/components/Drawer/Drawer.tokens.js +5 -1
  46. package/es/components/Drawer/Drawer.tokens.js.map +1 -1
  47. package/es/components/Drawer/hooks/useDrawer.js +10 -5
  48. package/es/components/Drawer/hooks/useDrawer.js.map +1 -1
  49. package/es/components/TextArea/TextArea.js +15 -21
  50. package/es/components/TextArea/TextArea.js.map +1 -1
  51. package/es/components/TextArea/TextArea.tokens.js +2 -15
  52. package/es/components/TextArea/TextArea.tokens.js.map +1 -1
  53. package/es/components/TextArea/variations/_view/base.js +1 -1
  54. package/es/components/TextArea/variations/_view/base.js.map +1 -1
  55. package/es/components/TextArea/variations/_view/base_8npjyq.css +1 -0
  56. package/es/index.css +1 -3
  57. package/package.json +2 -2
  58. package/styled-components/cjs/components/Drawer/Drawer.js +2 -0
  59. package/styled-components/cjs/components/Drawer/Drawer.styles.js +11 -14
  60. package/styled-components/cjs/components/Drawer/Drawer.tokens.js +5 -1
  61. package/styled-components/cjs/components/Drawer/hooks/useDrawer.js +10 -5
  62. package/styled-components/cjs/components/TextArea/TextArea.js +15 -21
  63. package/styled-components/cjs/components/TextArea/TextArea.template-doc.mdx +0 -29
  64. package/styled-components/cjs/components/TextArea/TextArea.tokens.js +2 -15
  65. package/styled-components/cjs/components/TextArea/variations/_view/base.js +1 -1
  66. package/styled-components/cjs/examples/plasma_b2c/components/TextArea/TextArea.config.js +9 -12
  67. package/styled-components/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +11 -18
  68. package/styled-components/cjs/examples/plasma_web/components/TextArea/TextArea.config.js +8 -11
  69. package/styled-components/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +12 -18
  70. package/styled-components/es/components/Drawer/Drawer.js +3 -1
  71. package/styled-components/es/components/Drawer/Drawer.styles.js +11 -14
  72. package/styled-components/es/components/Drawer/Drawer.tokens.js +5 -1
  73. package/styled-components/es/components/Drawer/hooks/useDrawer.js +10 -5
  74. package/styled-components/es/components/TextArea/TextArea.js +13 -19
  75. package/styled-components/es/components/TextArea/TextArea.template-doc.mdx +0 -29
  76. package/styled-components/es/components/TextArea/TextArea.tokens.js +2 -15
  77. package/styled-components/es/components/TextArea/variations/_view/base.js +1 -1
  78. package/styled-components/es/examples/plasma_b2c/components/TextArea/TextArea.config.js +9 -12
  79. package/styled-components/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +11 -18
  80. package/styled-components/es/examples/plasma_web/components/TextArea/TextArea.config.js +8 -11
  81. package/styled-components/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +12 -18
  82. package/types/components/Drawer/Drawer.d.ts.map +1 -1
  83. package/types/components/Drawer/Drawer.styles.d.ts.map +1 -1
  84. package/types/components/Drawer/Drawer.tokens.d.ts +4 -0
  85. package/types/components/Drawer/Drawer.tokens.d.ts.map +1 -1
  86. package/types/components/Drawer/hooks/useDrawer.d.ts.map +1 -1
  87. package/types/components/TextArea/TextArea.d.ts +0 -4
  88. package/types/components/TextArea/TextArea.d.ts.map +1 -1
  89. package/types/components/TextArea/TextArea.tokens.d.ts +0 -13
  90. package/types/components/TextArea/TextArea.tokens.d.ts.map +1 -1
  91. package/types/components/TextArea/TextArea.types.d.ts +3 -15
  92. package/types/components/TextArea/TextArea.types.d.ts.map +1 -1
  93. package/types/examples/plasma_b2c/components/TextArea/TextArea.config.d.ts +0 -3
  94. package/types/examples/plasma_b2c/components/TextArea/TextArea.config.d.ts.map +1 -1
  95. package/types/examples/plasma_b2c/components/TextArea/TextArea.d.ts +0 -81
  96. package/types/examples/plasma_b2c/components/TextArea/TextArea.d.ts.map +1 -1
  97. package/types/examples/plasma_web/components/TextArea/TextArea.config.d.ts +0 -3
  98. package/types/examples/plasma_web/components/TextArea/TextArea.config.d.ts.map +1 -1
  99. package/types/examples/plasma_web/components/TextArea/TextArea.d.ts +0 -81
  100. package/types/examples/plasma_web/components/TextArea/TextArea.d.ts.map +1 -1
  101. package/cjs/components/TextArea/variations/_clear/base.js +0 -9
  102. package/cjs/components/TextArea/variations/_clear/base.js.map +0 -1
  103. package/cjs/components/TextArea/variations/_clear/base_193g3al.css +0 -1
  104. package/cjs/components/TextArea/variations/_view/base_d83rii.css +0 -1
  105. package/emotion/cjs/components/TextArea/variations/_clear/base.js +0 -10
  106. package/emotion/es/components/TextArea/variations/_clear/base.js +0 -4
  107. package/es/components/TextArea/variations/_clear/base.js +0 -5
  108. package/es/components/TextArea/variations/_clear/base.js.map +0 -1
  109. package/es/components/TextArea/variations/_clear/base_193g3al.css +0 -1
  110. package/es/components/TextArea/variations/_view/base_d83rii.css +0 -1
  111. package/styled-components/cjs/components/TextArea/variations/_clear/base.js +0 -10
  112. package/styled-components/es/components/TextArea/variations/_clear/base.js +0 -4
  113. package/types/components/TextArea/variations/_clear/base.d.ts +0 -2
  114. 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 { IconPlaceholder } from '@salutejs/plasma-sb-utils';
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 size={iconSize} /> : undefined}
101
+ contentRight={props.enableContentRight ? <IconPlaceholder /> : undefined}
109
102
  onChange={(e) => {
110
103
  setValue(e.target.value);
111
104
  onChange(e);