@salutejs/plasma-new-hope 0.270.0-canary.1757.13385858717.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.
Files changed (254) hide show
  1. package/cjs/components/Autocomplete/Autocomplete.css +1 -1
  2. package/cjs/components/Calendar/CalendarBase/CalendarBase.js +2 -4
  3. package/cjs/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
  4. package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +2 -4
  5. package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
  6. package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -4
  7. package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
  8. package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +2 -4
  9. package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js.map +1 -1
  10. package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -4
  11. package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
  12. package/cjs/components/Combobox/ComboboxNew/Combobox.css +1 -1
  13. package/cjs/components/DatePicker/RangeDate/RangeDate.css +2 -2
  14. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +2 -2
  15. package/cjs/components/DatePicker/SingleDate/SingleDate.css +1 -1
  16. package/cjs/components/Pagination/Pagination.css +1 -1
  17. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +1 -1
  18. package/cjs/components/Range/Range.css +2 -2
  19. package/cjs/components/Range/Range.styles.js.map +1 -1
  20. package/cjs/components/Range/Range.tokens.js +2 -0
  21. package/cjs/components/Range/Range.tokens.js.map +1 -1
  22. package/cjs/components/Range/variations/_readonly/base.js +1 -1
  23. package/cjs/components/Range/variations/_readonly/base.js.map +1 -1
  24. package/cjs/components/Range/variations/_readonly/{base_8q1gx8.css → base_1jlqwtc.css} +1 -1
  25. package/cjs/components/Select/Select.css +1 -1
  26. package/cjs/components/Select/ui/Target/Target.css +1 -1
  27. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +1 -1
  28. package/cjs/components/Slider/Slider.css +1 -1
  29. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +1 -1
  30. package/cjs/components/TextArea/TextArea.js +9 -7
  31. package/cjs/components/TextArea/TextArea.js.map +1 -1
  32. package/cjs/components/TextArea/TextArea.tokens.js +3 -0
  33. package/cjs/components/TextArea/TextArea.tokens.js.map +1 -1
  34. package/cjs/components/TextArea/variations/_clear/base.js.map +1 -1
  35. package/cjs/components/TextArea/variations/_read-only/base.js +9 -0
  36. package/cjs/components/TextArea/variations/_read-only/base.js.map +1 -0
  37. package/cjs/components/TextArea/variations/_read-only/base_om8eo9.css +1 -0
  38. package/cjs/components/TextField/TextField.tokens.js +1 -0
  39. package/cjs/components/TextField/TextField.tokens.js.map +1 -1
  40. package/cjs/components/TextField/variations/_read-only/base.js +1 -1
  41. package/cjs/components/TextField/variations/_read-only/base.js.map +1 -1
  42. package/cjs/components/TextField/variations/_read-only/base_sr3to2.css +1 -0
  43. package/cjs/index.css +4 -2
  44. package/emotion/cjs/components/Calendar/CalendarBase/CalendarBase.js +2 -4
  45. package/emotion/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +2 -4
  46. package/emotion/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -4
  47. package/emotion/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +2 -4
  48. package/emotion/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -4
  49. package/emotion/cjs/components/Range/Range.styles.js +10 -10
  50. package/emotion/cjs/components/Range/Range.tokens.js +2 -0
  51. package/emotion/cjs/components/Range/variations/_readonly/base.js +1 -1
  52. package/emotion/cjs/components/TextArea/TextArea.js +10 -8
  53. package/emotion/cjs/components/TextArea/TextArea.tokens.js +3 -0
  54. package/emotion/cjs/components/TextArea/variations/_clear/base.js +1 -1
  55. package/emotion/cjs/components/TextArea/variations/_read-only/base.js +10 -0
  56. package/emotion/cjs/components/TextArea/variations/_read-only/tokens.json +1 -0
  57. package/emotion/cjs/components/TextField/TextField.tokens.js +1 -0
  58. package/emotion/cjs/components/TextField/variations/_read-only/base.js +1 -1
  59. package/emotion/cjs/components/_Icon/Icon.assets/Lock.js +26 -0
  60. package/emotion/cjs/components/_Icon/Icons/IconChevronLeft.js +8 -3
  61. package/emotion/cjs/components/_Icon/Icons/IconLock.js +29 -0
  62. package/emotion/cjs/components/_Icon/index.js +7 -0
  63. package/emotion/cjs/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +10 -10
  64. package/emotion/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +1 -13
  65. package/emotion/cjs/examples/plasma_b2c/components/Range/Range.config.js +7 -7
  66. package/emotion/cjs/examples/plasma_b2c/components/Range/Range.stories.tsx +14 -7
  67. package/emotion/cjs/examples/plasma_b2c/components/TextArea/TextArea.config.js +17 -14
  68. package/emotion/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +71 -20
  69. package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +22 -22
  70. package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +92 -26
  71. package/emotion/cjs/examples/plasma_web/components/Calendar/Calendar.stories.tsx +10 -10
  72. package/emotion/cjs/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +0 -12
  73. package/emotion/cjs/examples/plasma_web/components/Range/Range.config.js +7 -7
  74. package/emotion/cjs/examples/plasma_web/components/Range/Range.stories.tsx +14 -7
  75. package/emotion/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +71 -20
  76. package/emotion/cjs/examples/plasma_web/components/TextField/TextField.config.js +22 -22
  77. package/emotion/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +85 -25
  78. package/emotion/es/components/Calendar/CalendarBase/CalendarBase.js +2 -4
  79. package/emotion/es/components/Calendar/CalendarDouble/CalendarDouble.js +2 -4
  80. package/emotion/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -4
  81. package/emotion/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +2 -4
  82. package/emotion/es/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -4
  83. package/emotion/es/components/Range/Range.styles.js +10 -10
  84. package/emotion/es/components/Range/Range.tokens.js +2 -0
  85. package/emotion/es/components/Range/variations/_readonly/base.js +1 -1
  86. package/emotion/es/components/TextArea/TextArea.js +6 -4
  87. package/emotion/es/components/TextArea/TextArea.tokens.js +3 -0
  88. package/emotion/es/components/TextArea/variations/_clear/base.js +1 -1
  89. package/emotion/es/components/TextArea/variations/_read-only/base.js +4 -0
  90. package/emotion/es/components/TextArea/variations/_read-only/tokens.json +1 -0
  91. package/emotion/es/components/TextField/TextField.tokens.js +1 -0
  92. package/emotion/es/components/TextField/variations/_read-only/base.js +2 -2
  93. package/emotion/es/components/_Icon/Icon.assets/Lock.js +19 -0
  94. package/emotion/es/components/_Icon/Icons/IconChevronLeft.js +8 -3
  95. package/emotion/es/components/_Icon/Icons/IconLock.js +22 -0
  96. package/emotion/es/components/_Icon/index.js +1 -0
  97. package/emotion/es/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +10 -10
  98. package/emotion/es/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +1 -13
  99. package/emotion/es/examples/plasma_b2c/components/Range/Range.config.js +7 -7
  100. package/emotion/es/examples/plasma_b2c/components/Range/Range.stories.tsx +14 -7
  101. package/emotion/es/examples/plasma_b2c/components/TextArea/TextArea.config.js +17 -14
  102. package/emotion/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +71 -20
  103. package/emotion/es/examples/plasma_b2c/components/TextField/TextField.config.js +22 -22
  104. package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +92 -26
  105. package/emotion/es/examples/plasma_web/components/Calendar/Calendar.stories.tsx +10 -10
  106. package/emotion/es/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +0 -12
  107. package/emotion/es/examples/plasma_web/components/Range/Range.config.js +7 -7
  108. package/emotion/es/examples/plasma_web/components/Range/Range.stories.tsx +14 -7
  109. package/emotion/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +71 -20
  110. package/emotion/es/examples/plasma_web/components/TextField/TextField.config.js +22 -22
  111. package/emotion/es/examples/plasma_web/components/TextField/TextField.stories.tsx +85 -25
  112. package/es/components/Autocomplete/Autocomplete.css +1 -1
  113. package/es/components/Calendar/CalendarBase/CalendarBase.js +2 -4
  114. package/es/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
  115. package/es/components/Calendar/CalendarDouble/CalendarDouble.js +2 -4
  116. package/es/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
  117. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -4
  118. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
  119. package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +2 -4
  120. package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js.map +1 -1
  121. package/es/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -4
  122. package/es/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
  123. package/es/components/Combobox/ComboboxNew/Combobox.css +1 -1
  124. package/es/components/DatePicker/RangeDate/RangeDate.css +2 -2
  125. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +2 -2
  126. package/es/components/DatePicker/SingleDate/SingleDate.css +1 -1
  127. package/es/components/Pagination/Pagination.css +1 -1
  128. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +1 -1
  129. package/es/components/Range/Range.css +2 -2
  130. package/es/components/Range/Range.styles.js.map +1 -1
  131. package/es/components/Range/Range.tokens.js +2 -0
  132. package/es/components/Range/Range.tokens.js.map +1 -1
  133. package/es/components/Range/variations/_readonly/base.js +1 -1
  134. package/es/components/Range/variations/_readonly/base.js.map +1 -1
  135. package/es/components/Range/variations/_readonly/{base_8q1gx8.css → base_1jlqwtc.css} +1 -1
  136. package/es/components/Select/Select.css +1 -1
  137. package/es/components/Select/ui/Target/Target.css +1 -1
  138. package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +1 -1
  139. package/es/components/Slider/Slider.css +1 -1
  140. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +1 -1
  141. package/es/components/TextArea/TextArea.js +9 -7
  142. package/es/components/TextArea/TextArea.js.map +1 -1
  143. package/es/components/TextArea/TextArea.tokens.js +3 -0
  144. package/es/components/TextArea/TextArea.tokens.js.map +1 -1
  145. package/es/components/TextArea/variations/_clear/base.js.map +1 -1
  146. package/es/components/TextArea/variations/_read-only/base.js +5 -0
  147. package/es/components/TextArea/variations/_read-only/base.js.map +1 -0
  148. package/es/components/TextArea/variations/_read-only/base_om8eo9.css +1 -0
  149. package/es/components/TextField/TextField.tokens.js +1 -0
  150. package/es/components/TextField/TextField.tokens.js.map +1 -1
  151. package/es/components/TextField/variations/_read-only/base.js +1 -1
  152. package/es/components/TextField/variations/_read-only/base.js.map +1 -1
  153. package/es/components/TextField/variations/_read-only/base_sr3to2.css +1 -0
  154. package/es/index.css +4 -2
  155. package/package.json +2 -2
  156. package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.js +2 -4
  157. package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +2 -4
  158. package/styled-components/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -4
  159. package/styled-components/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +2 -4
  160. package/styled-components/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -4
  161. package/styled-components/cjs/components/Range/Range.tokens.js +2 -0
  162. package/styled-components/cjs/components/Range/variations/_readonly/base.js +1 -1
  163. package/styled-components/cjs/components/TextArea/TextArea.js +9 -7
  164. package/styled-components/cjs/components/TextArea/TextArea.tokens.js +3 -0
  165. package/styled-components/cjs/components/TextArea/variations/_read-only/base.js +10 -0
  166. package/styled-components/cjs/components/TextArea/variations/_read-only/tokens.json +1 -0
  167. package/styled-components/cjs/components/TextField/TextField.tokens.js +1 -0
  168. package/styled-components/cjs/components/TextField/variations/_read-only/base.js +1 -1
  169. package/styled-components/cjs/components/_Icon/Icon.assets/Lock.js +26 -0
  170. package/styled-components/cjs/components/_Icon/Icons/IconChevronLeft.js +8 -3
  171. package/styled-components/cjs/components/_Icon/Icons/IconLock.js +29 -0
  172. package/styled-components/cjs/components/_Icon/index.js +7 -0
  173. package/styled-components/cjs/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +10 -10
  174. package/styled-components/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +1 -13
  175. package/styled-components/cjs/examples/plasma_b2c/components/Range/Range.config.js +1 -1
  176. package/styled-components/cjs/examples/plasma_b2c/components/Range/Range.stories.tsx +14 -7
  177. package/styled-components/cjs/examples/plasma_b2c/components/TextArea/TextArea.config.js +3 -0
  178. package/styled-components/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +71 -20
  179. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +7 -7
  180. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +92 -26
  181. package/styled-components/cjs/examples/plasma_web/components/Calendar/Calendar.stories.tsx +10 -10
  182. package/styled-components/cjs/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +0 -12
  183. package/styled-components/cjs/examples/plasma_web/components/Range/Range.config.js +1 -1
  184. package/styled-components/cjs/examples/plasma_web/components/Range/Range.stories.tsx +14 -7
  185. package/styled-components/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +71 -20
  186. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.config.js +7 -7
  187. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +85 -25
  188. package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.js +2 -4
  189. package/styled-components/es/components/Calendar/CalendarDouble/CalendarDouble.js +2 -4
  190. package/styled-components/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -4
  191. package/styled-components/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +2 -4
  192. package/styled-components/es/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -4
  193. package/styled-components/es/components/Range/Range.tokens.js +2 -0
  194. package/styled-components/es/components/Range/variations/_readonly/base.js +1 -1
  195. package/styled-components/es/components/TextArea/TextArea.js +5 -3
  196. package/styled-components/es/components/TextArea/TextArea.tokens.js +3 -0
  197. package/styled-components/es/components/TextArea/variations/_read-only/base.js +4 -0
  198. package/styled-components/es/components/TextArea/variations/_read-only/tokens.json +1 -0
  199. package/styled-components/es/components/TextField/TextField.tokens.js +1 -0
  200. package/styled-components/es/components/TextField/variations/_read-only/base.js +2 -2
  201. package/styled-components/es/components/_Icon/Icon.assets/Lock.js +19 -0
  202. package/styled-components/es/components/_Icon/Icons/IconChevronLeft.js +8 -3
  203. package/styled-components/es/components/_Icon/Icons/IconLock.js +22 -0
  204. package/styled-components/es/components/_Icon/index.js +1 -0
  205. package/styled-components/es/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +10 -10
  206. package/styled-components/es/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +1 -13
  207. package/styled-components/es/examples/plasma_b2c/components/Range/Range.config.js +1 -1
  208. package/styled-components/es/examples/plasma_b2c/components/Range/Range.stories.tsx +14 -7
  209. package/styled-components/es/examples/plasma_b2c/components/TextArea/TextArea.config.js +3 -0
  210. package/styled-components/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +71 -20
  211. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.config.js +7 -7
  212. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +92 -26
  213. package/styled-components/es/examples/plasma_web/components/Calendar/Calendar.stories.tsx +10 -10
  214. package/styled-components/es/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +0 -12
  215. package/styled-components/es/examples/plasma_web/components/Range/Range.config.js +1 -1
  216. package/styled-components/es/examples/plasma_web/components/Range/Range.stories.tsx +14 -7
  217. package/styled-components/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +71 -20
  218. package/styled-components/es/examples/plasma_web/components/TextField/TextField.config.js +7 -7
  219. package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +85 -25
  220. package/types/components/Calendar/CalendarBase/CalendarBase.d.ts.map +1 -1
  221. package/types/components/Calendar/CalendarDouble/CalendarDouble.d.ts.map +1 -1
  222. package/types/components/Calendar/ui/CalendarMonths/CalendarMonths.d.ts.map +1 -1
  223. package/types/components/Calendar/ui/CalendarQuarters/CalendarQuarters.d.ts.map +1 -1
  224. package/types/components/Calendar/ui/CalendarYears/CalendarYears.d.ts.map +1 -1
  225. package/types/components/Range/Range.tokens.d.ts +2 -0
  226. package/types/components/Range/Range.tokens.d.ts.map +1 -1
  227. package/types/components/Range/variations/_readonly/base.d.ts.map +1 -1
  228. package/types/components/TextArea/TextArea.d.ts +3 -2
  229. package/types/components/TextArea/TextArea.d.ts.map +1 -1
  230. package/types/components/TextArea/TextArea.tokens.d.ts +3 -0
  231. package/types/components/TextArea/TextArea.tokens.d.ts.map +1 -1
  232. package/types/components/TextArea/variations/_clear/base.d.ts.map +1 -1
  233. package/types/components/TextArea/variations/_read-only/base.d.ts +2 -0
  234. package/types/components/TextArea/variations/_read-only/base.d.ts.map +1 -0
  235. package/types/components/TextField/TextField.tokens.d.ts +1 -0
  236. package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
  237. package/types/components/TextField/variations/_read-only/base.d.ts.map +1 -1
  238. package/types/components/_Icon/Icon.assets/Lock.d.ts +4 -0
  239. package/types/components/_Icon/Icon.assets/Lock.d.ts.map +1 -0
  240. package/types/components/_Icon/Icons/IconChevronLeft.d.ts.map +1 -1
  241. package/types/components/_Icon/Icons/IconLock.d.ts +4 -0
  242. package/types/components/_Icon/Icons/IconLock.d.ts.map +1 -0
  243. package/types/components/_Icon/index.d.ts +1 -0
  244. package/types/components/_Icon/index.d.ts.map +1 -1
  245. package/types/examples/plasma_b2c/components/Range/Range.config.d.ts.map +1 -1
  246. package/types/examples/plasma_b2c/components/TextArea/TextArea.config.d.ts +3 -0
  247. package/types/examples/plasma_b2c/components/TextArea/TextArea.config.d.ts.map +1 -1
  248. package/types/examples/plasma_b2c/components/TextArea/TextArea.d.ts +3 -0
  249. package/types/examples/plasma_b2c/components/TextArea/TextArea.d.ts.map +1 -1
  250. package/types/examples/plasma_b2c/components/TextField/TextField.config.d.ts.map +1 -1
  251. package/types/examples/plasma_web/components/Range/Range.config.d.ts.map +1 -1
  252. package/types/examples/plasma_web/components/TextField/TextField.config.d.ts.map +1 -1
  253. package/cjs/components/TextField/variations/_read-only/base_oizdmx.css +0 -1
  254. package/es/components/TextField/variations/_read-only/base_oizdmx.css +0 -1
@@ -0,0 +1,4 @@
1
+ import { css } from 'styled-components';
2
+ import { StyledHelpers, StyledTextArea, StyledTextAreaWrapper } from '../../TextArea.styles';
3
+ import { classes, tokens } from '../../TextArea.tokens';
4
+ export var base = /*#__PURE__*/css(["&[readonly]{", "{color:var(", ");}:not(&.", "){", ",", "{background:transparent;position:relative;:before{position:absolute;content:'';top:0;left:0;right:0;bottom:0;background:var(", ");opacity:var(", ");z-index:-1;}:hover{background:transparent;}}", ":before{border-radius:var(", ");}", ":before{border-bottom-left-radius:var(", ");border-bottom-right-radius:var(", ");}}}"], StyledTextArea, tokens.inputColorReadOnly, classes.clear, StyledTextAreaWrapper, StyledHelpers, tokens.backgroundColorReadOnly, tokens.readOnlyOpacity, StyledTextAreaWrapper, tokens.borderRadiusWithHelpers, StyledHelpers, tokens.borderRadius, tokens.borderRadius);
@@ -112,6 +112,7 @@ export var tokens = {
112
112
  textAfterMargin: '--plasma-textfield__after-text-margin',
113
113
  /** Прозрачность для всего компонента в состоянии disabled */
114
114
  disabledOpacity: '--plasma-textfield-disabled-opacity',
115
+ readOnlyOpacity: '--plasma-textfield-readonly-opacity',
115
116
  /** Токены для tooltip */
116
117
  hintMargin: '--plasma-textfield__hint-margin',
117
118
  hintTargetSize: '--plasma-textfield__hint-target-size',
@@ -1,4 +1,4 @@
1
1
  import { css } from 'styled-components';
2
2
  import { classes, tokens } from '../../TextField.tokens';
3
- import { Input, InputPlaceholder, InputWrapper, Label, LeftHelper, TitleCaption } from '../../TextField.styles';
4
- export var base = /*#__PURE__*/css(["&[readonly]{", "{color:var(", ");background-color:var(", ");box-shadow:inset 0 0 0 var(", ") var(", ");}&.", " ", "{&:before{background-color:var(", ");}}", ":hover{background-color:var(", ");}", ":focus-within ", ",", "{color:var(", ");}", "{color:var(", ");cursor:default;min-width:unset;}", "{color:var(", ");}", "{color:var(", ");}&.", " ", "{color:var(", ");}}"], InputWrapper, tokens.colorReadOnly, /*#__PURE__*/String(tokens.backgroundColorReadOnly), /*#__PURE__*/String(tokens.borderWidth), /*#__PURE__*/String(tokens.borderColorReadOnly), classes.hasDivider, InputWrapper, /*#__PURE__*/String(tokens.dividerColorReadOnly), InputWrapper, tokens.backgroundColorReadOnly, InputWrapper, InputPlaceholder, InputPlaceholder, tokens.placeholderColorReadOnly, Input, tokens.colorReadOnly, TitleCaption, tokens.titleCaptionColorReadOnly, LeftHelper, tokens.leftHelperColorReadOnly, classes.outerLabelPlacement, Label, tokens.labelColorReadOnly);
3
+ import { Input, InputPlaceholder, InputWrapper, Label, LeftHelper, StyledContentRight, TitleCaption } from '../../TextField.styles';
4
+ export var base = /*#__PURE__*/css(["&[readonly]{:not(&.", "){", "{position:relative;color:var(", ");background-color:transparent;box-shadow:inset 0 0 0 var(", ") var(", ");:before{position:absolute;content:'';top:0;left:0;right:0;bottom:0;border-radius:var(", ");background-color:var(", ");opacity:var(", ");z-index:-1;}:hover{background-color:transparent;}}}&.", " ", "{&:before{background-color:var(", ");}}", ":focus-within ", ",", "{color:var(", ");}", "{color:var(", ");cursor:default;min-width:unset;}", "{color:var(", ");}", "{color:var(", ");}", ":hover,", ":active{cursor:default;color:var(", ",var(", "));}&.", " ", "{color:var(", ");}}"], classes.clear, InputWrapper, tokens.colorReadOnly, /*#__PURE__*/String(tokens.borderWidth), /*#__PURE__*/String(tokens.borderColorReadOnly), tokens.borderRadius, tokens.backgroundColorReadOnly, tokens.readOnlyOpacity, classes.hasDivider, InputWrapper, /*#__PURE__*/String(tokens.dividerColorReadOnly), InputWrapper, InputPlaceholder, InputPlaceholder, tokens.placeholderColorReadOnly, Input, tokens.colorReadOnly, TitleCaption, tokens.titleCaptionColorReadOnly, LeftHelper, tokens.leftHelperColorReadOnly, StyledContentRight, StyledContentRight, tokens.contentSlotRightColor, tokens.contentSlotColor, classes.outerLabelPlacement, Label, tokens.labelColorReadOnly);
@@ -0,0 +1,19 @@
1
+ var _path, _path2;
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ import React from 'react';
4
+ export var Lock = function Lock(props) {
5
+ return /*#__PURE__*/React.createElement("svg", _extends({
6
+ width: "24",
7
+ height: "24",
8
+ viewBox: "0 0 24 24",
9
+ fill: "none"
10
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
11
+ d: "M12.0001 18C13.1046 18 14.0001 17.1046 14.0001 16C14.0001 14.8954 13.1046 14 12.0001 14C10.8955 14 10.0001 14.8954 10.0001 16C10.0001 17.1046 10.8955 18 12.0001 18Z",
12
+ fill: "currentColor"
13
+ })), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
14
+ fillRule: "evenodd",
15
+ clipRule: "evenodd",
16
+ d: "M16.7501 7V10.0056C17.0393 10.0142 17.2842 10.0359 17.5087 10.0898C18.6971 10.3751 19.625 11.3029 19.9103 12.4913C20.0005 12.8672 20.0003 13.3001 20.0001 13.9028L20.0001 17.2814C20.0001 17.9548 20.0001 18.5055 19.9635 18.9531C19.9257 19.4163 19.8449 19.8347 19.6458 20.2255C19.3342 20.837 18.837 21.3342 18.2255 21.6458C17.8348 21.8449 17.4164 21.9256 16.9531 21.9634C16.5056 22 15.9549 22 15.2815 22H8.71861C8.04524 22 7.49454 22 7.04698 21.9634C6.58372 21.9256 6.16532 21.8449 5.77458 21.6458C5.16306 21.3342 4.66587 20.837 4.35428 20.2255C4.15519 19.8347 4.07445 19.4163 4.0366 18.9531C4.00004 18.5055 4.00004 17.9548 4.00005 17.2814L4.00003 13.9029C3.99978 13.3001 3.9996 12.8672 4.08985 12.4913C4.37515 11.3029 5.30299 10.3751 6.49135 10.0898C6.7159 10.0359 6.96077 10.0142 7.25005 10.0056V7C7.25005 4.37665 9.3767 2.25 12.0001 2.25C14.6234 2.25 16.7501 4.37665 16.7501 7ZM8.75005 7C8.75005 5.20507 10.2051 3.75 12.0001 3.75C13.795 3.75 15.2501 5.20507 15.2501 7V10H8.75005V7ZM6.84152 11.5484C7.02117 11.5052 7.25947 11.5 8.00005 11.5H16.0001C16.7406 11.5 16.9789 11.5052 17.1586 11.5484C17.7985 11.702 18.2981 12.2016 18.4517 12.8415C18.4948 13.0211 18.5001 13.2594 18.5001 14V17.25C18.5001 17.9624 18.4995 18.4517 18.4685 18.8309C18.4382 19.2014 18.3827 19.4004 18.3093 19.5445C18.1415 19.8738 17.8738 20.1415 17.5445 20.3093C17.4005 20.3827 17.2015 20.4382 16.831 20.4684C16.4517 20.4994 15.9625 20.5 15.2501 20.5H8.75005C8.03761 20.5 7.54839 20.4994 7.16913 20.4684C6.79863 20.4382 6.59961 20.3827 6.45557 20.3093C6.12628 20.1415 5.85857 19.8738 5.69079 19.5445C5.6174 19.4004 5.56189 19.2014 5.53162 18.8309C5.50063 18.4517 5.50005 17.9624 5.50005 17.25V14C5.50005 13.2594 5.50527 13.0211 5.5484 12.8415C5.70203 12.2016 6.20164 11.702 6.84152 11.5484Z",
17
+ fill: "currentColor"
18
+ })));
19
+ };
@@ -1,3 +1,7 @@
1
+ var _excluded = ["size", "color", "className", "sizeCustomProperty"];
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ 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; }
4
+ 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; }
1
5
  import React from 'react';
2
6
  import { ChevronLeft } from '../Icon.assets/ChevronLeft';
3
7
  import { IconRoot } from '../IconRoot';
@@ -6,12 +10,13 @@ export var IconChevronLeft = function IconChevronLeft(_ref) {
6
10
  size = _ref$size === void 0 ? 's' : _ref$size,
7
11
  color = _ref.color,
8
12
  className = _ref.className,
9
- sizeCustomProperty = _ref.sizeCustomProperty;
10
- return /*#__PURE__*/React.createElement(IconRoot, {
13
+ sizeCustomProperty = _ref.sizeCustomProperty,
14
+ rest = _objectWithoutProperties(_ref, _excluded);
15
+ return /*#__PURE__*/React.createElement(IconRoot, _extends({
11
16
  className: className,
12
17
  size: size,
13
18
  color: color,
14
19
  icon: ChevronLeft,
15
20
  sizeCustomProperty: sizeCustomProperty
16
- });
21
+ }, rest));
17
22
  };
@@ -0,0 +1,22 @@
1
+ var _excluded = ["size", "color", "className", "sizeCustomValue"];
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ 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; }
4
+ 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; }
5
+ import React from 'react';
6
+ import { Lock } from '../Icon.assets/Lock';
7
+ import { IconRoot } from '../IconRoot';
8
+ export var IconLock = function IconLock(_ref) {
9
+ var _ref$size = _ref.size,
10
+ size = _ref$size === void 0 ? 's' : _ref$size,
11
+ color = _ref.color,
12
+ className = _ref.className,
13
+ sizeCustomValue = _ref.sizeCustomValue,
14
+ rest = _objectWithoutProperties(_ref, _excluded);
15
+ return /*#__PURE__*/React.createElement(IconRoot, _extends({
16
+ className: className,
17
+ sizeCustomValue: sizeCustomValue,
18
+ size: size,
19
+ color: color,
20
+ icon: Lock
21
+ }, rest));
22
+ };
@@ -5,6 +5,7 @@ export { IconDisclosureRightWithOffset } from './Icons/IconDisclosureRightWithOf
5
5
  export { IconDisclosureDownFill } from './Icons/IconDisclosureDownFill';
6
6
  export { IconDisclosureDownWithOffset } from './Icons/IconDisclosureDownWithOffset';
7
7
  export { IconDisclosureUpWithOffset } from './Icons/IconDisclosureUpWithOffset';
8
+ export { IconLock } from './Icons/IconLock';
8
9
  export { IconMic } from './Icons/IconMic';
9
10
  export { IconChevronLeft } from './Icons/IconChevronLeft';
10
11
  export { IconChevronDoubleLeft } from './Icons/IconChevronDoubleLeft';
@@ -100,11 +100,11 @@ const StoryDefault = (args: CalendarProps) => {
100
100
  isDouble={isDouble}
101
101
  date={date}
102
102
  value={(isRange ? valueRange : value) as Date & [Date, Date?]}
103
+ min={min}
104
+ max={max}
103
105
  includeEdgeDates={includeEdgeDates}
104
106
  locale={locale}
105
107
  onChangeValue={(isRange ? handleOnRangeChange : handleOnChange) as (value: Date | [Date, Date?]) => void}
106
- min={min}
107
- max={max}
108
108
  />
109
109
  );
110
110
  };
@@ -146,24 +146,24 @@ const StoryBase = (args: CalendarBaseProps & { displayDouble: boolean }) => {
146
146
  <CalendarDouble
147
147
  size={size}
148
148
  value={value}
149
+ min={min}
150
+ max={max}
149
151
  includeEdgeDates={includeEdgeDates}
150
152
  type={type}
151
153
  locale={locale}
152
154
  onChangeValue={handleOnChange}
153
- min={min}
154
- max={max}
155
155
  {...rest}
156
156
  />
157
157
  ) : (
158
158
  <CalendarBase
159
159
  size={size}
160
160
  value={value}
161
+ min={min}
162
+ max={max}
161
163
  includeEdgeDates={includeEdgeDates}
162
164
  type={type}
163
165
  locale={locale}
164
166
  onChangeValue={handleOnChange}
165
- min={min}
166
- max={max}
167
167
  {...rest}
168
168
  />
169
169
  );
@@ -233,24 +233,24 @@ const StoryRange = (args: CalendarBaseRangeProps & { displayDouble: boolean }) =
233
233
  <CalendarBaseRange
234
234
  size={size}
235
235
  value={values}
236
+ min={min}
237
+ max={max}
236
238
  includeEdgeDates={includeEdgeDates}
237
239
  type={type}
238
240
  onChangeValue={handleOnChange}
239
241
  locale={locale}
240
- min={min}
241
- max={max}
242
242
  {...rest}
243
243
  />
244
244
  ) : (
245
245
  <CalendarDoubleRange
246
246
  size={size}
247
247
  value={values}
248
+ min={min}
249
+ max={max}
248
250
  includeEdgeDates={includeEdgeDates}
249
251
  type={type}
250
252
  onChangeValue={handleOnChange}
251
253
  locale={locale}
252
- min={min}
253
- max={max}
254
254
  {...rest}
255
255
  />
256
256
  );
@@ -1,7 +1,7 @@
1
1
  import React, { ComponentProps, useEffect, useRef, useState } from 'react';
2
2
  import type { StoryObj, Meta } from '@storybook/react';
3
3
  import { action } from '@storybook/addon-actions';
4
- import { IconPlaceholder } from '@salutejs/plasma-sb-utils';
4
+ import { disableProps, IconPlaceholder } from '@salutejs/plasma-sb-utils';
5
5
 
6
6
  import { WithTheme } from '../../../_helpers';
7
7
  import { IconButton } from '../IconButton/IconButton';
@@ -80,8 +80,6 @@ const StoryDefault = ({
80
80
  size,
81
81
  lang,
82
82
  format,
83
- min,
84
- max,
85
83
  ...rest
86
84
  }: StoryPropsDefault) => {
87
85
  const [isOpen, setIsOpen] = useState(false);
@@ -105,8 +103,6 @@ const StoryDefault = ({
105
103
  lang={lang}
106
104
  format={format}
107
105
  onCommitDate={() => setIsOpen(false)}
108
- min={min}
109
- max={max}
110
106
  {...rest}
111
107
  />
112
108
  );
@@ -192,8 +188,6 @@ const StoryRange = ({
192
188
  secondValueSuccess,
193
189
  size,
194
190
  lang,
195
- min,
196
- max,
197
191
  ...rest
198
192
  }: StoryPropsRange) => {
199
193
  const rangeRef = useRef<RangeInputRefs>(null);
@@ -246,8 +240,6 @@ const StoryRange = ({
246
240
  onChangeSecondValue(e, currentValue);
247
241
  }}
248
242
  lang={lang}
249
- min={min}
250
- max={max}
251
243
  {...dividerIconProps}
252
244
  {...rest}
253
245
  />
@@ -314,8 +306,6 @@ const StoryDeferred = ({
314
306
  valueError,
315
307
  valueSuccess,
316
308
  size,
317
- min,
318
- max,
319
309
  ...rest
320
310
  }: StoryPropsDefault) => {
321
311
  const [isOpen, setIsOpen] = useState(false);
@@ -348,8 +338,6 @@ const StoryDeferred = ({
348
338
  onChangeValue(e, currentValue);
349
339
  }}
350
340
  onCommitDate={() => setIsOpen(false)}
351
- min={min}
352
- max={max}
353
341
  {...rest}
354
342
  />
355
343
  </>
@@ -19,7 +19,7 @@ export var config = {
19
19
  "true": /*#__PURE__*/css(["", ":0.4;"], tokens.disabledOpacity)
20
20
  },
21
21
  readOnly: {
22
- "true": /*#__PURE__*/css(["", ":var(--surface-transparent-primary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);", ":transparent;", ":var(--text-secondary);"], tokens.backgroundReadOnly, tokens.labelColorReadOnly, tokens.leftHelperColorReadOnly, tokens.dividerColorReadOnly, tokens.textFieldColorReadOnly, tokens.textFieldBackgroundColorReadOnly, tokens.textFieldPlaceholderColorReadOnly)
22
+ "true": /*#__PURE__*/css(["", ":var(--surface-transparent-primary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);", ":0.4;", ":0.4;", ":var(--text-primary);", ":transparent;", ":var(--text-secondary);"], tokens.backgroundReadOnly, tokens.labelColorReadOnly, tokens.leftHelperColorReadOnly, tokens.dividerColorReadOnly, tokens.dividerOpacityReadOnly, tokens.rightContentOpacityReadOnly, tokens.textFieldColorReadOnly, tokens.textFieldBackgroundColorReadOnly, tokens.textFieldPlaceholderColorReadOnly)
23
23
  }
24
24
  }
25
25
  };
@@ -1,7 +1,7 @@
1
1
  import React, { ChangeEvent, ComponentProps, Dispatch, SetStateAction, useState } from 'react';
2
2
  import type { StoryObj, Meta } from '@storybook/react';
3
3
  import { action } from '@storybook/addon-actions';
4
- import { IconPlaceholder } from '@salutejs/plasma-sb-utils';
4
+ import { disableProps, IconPlaceholder } from '@salutejs/plasma-sb-utils';
5
5
 
6
6
  import { WithTheme } from '../../../_helpers';
7
7
  import { IconChevronLeft } from '../../../../components/_Icon';
@@ -45,7 +45,10 @@ const meta: Meta<typeof Range> = {
45
45
  control: {
46
46
  type: 'select',
47
47
  },
48
- if: { arg: 'required', truthy: true },
48
+ if: {
49
+ arg: 'required',
50
+ truthy: true,
51
+ },
49
52
  },
50
53
  ...disableProps(['view']),
51
54
  },
@@ -76,10 +79,14 @@ const getSizeForIcon = (size) => {
76
79
  return size;
77
80
  };
78
81
 
79
- const ActionButton = ({ size }) => {
82
+ const ActionButton = ({ size, readOnly }) => {
80
83
  return (
81
- <IconButton view="clear" size={size}>
82
- <IconChevronLeft color="inherit" size={getSizeForIcon(size)} />
84
+ <IconButton view="clear" size={size} disabled={readOnly}>
85
+ <IconChevronLeft
86
+ color={readOnly ? 'var(--text-secondary)' : 'inherit'}
87
+ size={getSizeForIcon(size)}
88
+ style={{ transform: 'rotate(180deg)' }}
89
+ />
83
90
  </IconButton>
84
91
  );
85
92
  };
@@ -115,7 +122,7 @@ const StoryDefault = ({
115
122
  firstValue={firstValue}
116
123
  secondValue={secondValue}
117
124
  contentLeft={enableContentLeft ? <IconPlaceholder size={iconSize} /> : undefined}
118
- contentRight={enableContentRight ? <ActionButton size={size} /> : undefined}
125
+ contentRight={enableContentRight ? <ActionButton size={size} readOnly={rest.readOnly} /> : undefined}
119
126
  firstTextfieldContentLeft={
120
127
  enableFirstTextfieldContentLeft ? <IconPlaceholder size={iconSize} /> : undefined
121
128
  }
@@ -266,7 +273,7 @@ const StoryDemo = ({ enableContentLeft, enableContentRight, size, ...rest }: Sto
266
273
  firstValueSuccess={firstValueSuccess}
267
274
  secondValueSuccess={secondValueSuccess}
268
275
  contentLeft={enableContentLeft ? <IconPlaceholder size={iconSize} /> : undefined}
269
- contentRight={enableContentRight ? <ActionButton size={size} /> : undefined}
276
+ contentRight={enableContentRight ? <ActionButton size={size} readOnly={rest.readOnly} /> : undefined}
270
277
  onChangeFirstValue={(e) => {
271
278
  handleChangeValue(
272
279
  e,
@@ -29,6 +29,9 @@ export var config = {
29
29
  clear: {
30
30
  "true": /*#__PURE__*/css([""])
31
31
  },
32
+ readOnly: {
33
+ "true": /*#__PURE__*/css(["", ":0.4;", ":var(--surface-transparent-primary);", ":var(--text-primary);"], textAreaTokens.readOnlyOpacity, textAreaTokens.backgroundColorReadOnly, textAreaTokens.inputColorReadOnly)
34
+ },
32
35
  disabled: {
33
36
  "true": /*#__PURE__*/css(["", ":0.4;", ":var(--text-secondary);", ":var(--surface-transparent-primary);", ":var(--text-secondary);"], textAreaTokens.disabledOpacity, textAreaTokens.inputColorDisabled, textAreaTokens.dividerColorReadOnly, textAreaTokens.titleCaptionColorReadOnly)
34
37
  }
@@ -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: { arg: 'optional', truthy: false },
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: { arg: 'required', truthy: false },
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: 'select',
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: { arg: 'clear', truthy: true },
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: { arg: 'clear', truthy: false },
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: { arg: 'clear', truthy: false },
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: { arg: 'hasHint', truthy: true },
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: { arg: 'hasHint', truthy: true },
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: { arg: 'hasHint', truthy: true },
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: { arg: 'hasHint', truthy: true },
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: { arg: 'hasHint', truthy: true },
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: { arg: 'hasHint', truthy: true },
190
+ if: {
191
+ arg: 'hasHint',
192
+ truthy: true,
193
+ },
150
194
  },
151
195
  hintWidth: {
152
196
  control: { type: 'text' },
153
- if: { arg: 'hasHint', truthy: true },
154
- },
155
- helperText: {
156
- control: { type: 'text' },
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={props.enableContentRight ? <IconPlaceholder size={iconSize} /> : undefined}
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={{ width: '70%', margin: '0 auto' }}
301
+ style={{
302
+ width: '70%',
303
+ margin: '0 auto',
304
+ }}
254
305
  {...props}
255
306
  />
256
307
  );
@@ -27,12 +27,12 @@ export var config = {
27
27
  "true": /*#__PURE__*/css([""])
28
28
  },
29
29
  chipView: {
30
- "default": /*#__PURE__*/css(["", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--surface-solid-default-hover);", ":var(--inverse-text-primary);", ":var(--surface-solid-default-active);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--inverse-text-secondary);", ":0.72;"], tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipCloseIconColor, tokens.chipOpacityReadonly),
31
- secondary: /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--text-secondary);", ":0.72;"], tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipCloseIconColor, tokens.chipOpacityReadonly),
32
- accent: /*#__PURE__*/css(["", ":var(--on-dark-text-primary);", ":var(--surface-accent);", ":var(--on-dark-text-primary);", ":var(--surface-accent-hover);", ":var(--on-dark-text-primary);", ":var(--surface-accent-active);", ":var(--surface-accent);", ":var(--on-dark-text-primary);", ":var(--surface-accent);", ":var(--on-dark-text-primary);", ":var(--on-dark-text-secondary);", ":0.72;"], tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipCloseIconColor, tokens.chipOpacityReadonly),
33
- positive: /*#__PURE__*/css(["", ":var(--on-dark-text-primary);", ":var(--surface-positive);", ":var(--on-dark-text-primary);", ":var(--surface-positive-hover);", ":var(--on-dark-text-primary);", ":var(--surface-positive-active);", ":var(--surface-positive);", ":var(--on-dark-text-primary);", ":var(--surface-positive);", ":var(--on-dark-text-primary);", ":var(--on-dark-text-secondary);", ":0.72;"], tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipCloseIconColor, tokens.chipOpacityReadonly),
34
- warning: /*#__PURE__*/css(["", ":var(--on-dark-text-primary);", ":var(--surface-warning);", ":var(--on-dark-text-primary);", ":var(--surface-warning-hover);", ":var(--on-dark-text-primary);", ":var(--surface-warning-active);", ":var(--surface-warning);", ":var(--on-dark-text-primary);", ":var(--surface-warning);", ":var(--on-dark-text-primary);", ":var(--on-dark-text-secondary);", ":0.72;"], tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipCloseIconColor, tokens.chipOpacityReadonly),
35
- negative: /*#__PURE__*/css(["", ":var(--on-dark-text-primary);", ":var(--surface-negative);", ":var(--on-dark-text-primary);", ":var(--surface-negative-hover);", ":var(--on-dark-text-primary);", ":var(--surface-negative-active);", ":var(--surface-negative);", ":var(--on-dark-text-primary);", ":var(--surface-negative);", ":var(--on-dark-text-primary);", ":var(--on-dark-text-secondary);", ":0.72;"], tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipCloseIconColor, tokens.chipOpacityReadonly)
30
+ "default": /*#__PURE__*/css(["", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--surface-solid-default-hover);", ":var(--inverse-text-primary);", ":var(--surface-solid-default-active);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--inverse-text-secondary);", ":1;"], tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipCloseIconColor, tokens.chipOpacityReadonly),
31
+ secondary: /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--text-secondary);", ":1;"], tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipCloseIconColor, tokens.chipOpacityReadonly),
32
+ accent: /*#__PURE__*/css(["", ":var(--on-dark-text-primary);", ":var(--surface-accent);", ":var(--on-dark-text-primary);", ":var(--surface-accent-hover);", ":var(--on-dark-text-primary);", ":var(--surface-accent-active);", ":var(--surface-accent);", ":var(--on-dark-text-primary);", ":var(--surface-accent);", ":var(--on-dark-text-primary);", ":var(--on-dark-text-secondary);", ":1;"], tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipCloseIconColor, tokens.chipOpacityReadonly),
33
+ positive: /*#__PURE__*/css(["", ":var(--on-dark-text-primary);", ":var(--surface-positive);", ":var(--on-dark-text-primary);", ":var(--surface-positive-hover);", ":var(--on-dark-text-primary);", ":var(--surface-positive-active);", ":var(--surface-positive);", ":var(--on-dark-text-primary);", ":var(--surface-positive);", ":var(--on-dark-text-primary);", ":var(--on-dark-text-secondary);", ":1;"], tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipCloseIconColor, tokens.chipOpacityReadonly),
34
+ warning: /*#__PURE__*/css(["", ":var(--on-dark-text-primary);", ":var(--surface-warning);", ":var(--on-dark-text-primary);", ":var(--surface-warning-hover);", ":var(--on-dark-text-primary);", ":var(--surface-warning-active);", ":var(--surface-warning);", ":var(--on-dark-text-primary);", ":var(--surface-warning);", ":var(--on-dark-text-primary);", ":var(--on-dark-text-secondary);", ":1;"], tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipCloseIconColor, tokens.chipOpacityReadonly),
35
+ negative: /*#__PURE__*/css(["", ":var(--on-dark-text-primary);", ":var(--surface-negative);", ":var(--on-dark-text-primary);", ":var(--surface-negative-hover);", ":var(--on-dark-text-primary);", ":var(--surface-negative-active);", ":var(--surface-negative);", ":var(--on-dark-text-primary);", ":var(--surface-negative);", ":var(--on-dark-text-primary);", ":var(--on-dark-text-secondary);", ":1;"], tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipCloseIconColor, tokens.chipOpacityReadonly)
36
36
  },
37
37
  hintView: {
38
38
  "default": /*#__PURE__*/css(["", ":var(--surface-solid-card-brightness);", ":var(--shadow-down-hard-m,0px 4px 12px 0px rgba(0,0,0,0.16),0px 1px 4px 0px rgba(0,0,0,0.08));", ":var(--text-primary);", ":var(--surface-solid-card);"], tokens.tooltipBackgroundColor, tokens.tooltipBoxShadow, tokens.tooltipColor, tokens.tooltipArrowBackground)
@@ -45,7 +45,7 @@ export var config = {
45
45
  "true": /*#__PURE__*/css(["", ":0.4;"], tokens.disabledOpacity)
46
46
  },
47
47
  readOnly: {
48
- "true": /*#__PURE__*/css(["", ":var(--text-secondary);", ":var(--surface-transparent-primary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--surface-transparent-primary);"], tokens.colorReadOnly, tokens.backgroundColorReadOnly, tokens.placeholderColorReadOnly, tokens.leftHelperColorReadOnly, tokens.titleCaptionColorReadOnly, tokens.labelColorReadOnly, tokens.dividerColorReadOnly)
48
+ "true": /*#__PURE__*/css(["", ":0.4;", ":var(--text-primary);", ":var(--surface-transparent-primary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-primary);"], tokens.readOnlyOpacity, tokens.colorReadOnly, tokens.backgroundColorReadOnly, tokens.placeholderColorReadOnly, tokens.leftHelperColorReadOnly, tokens.titleCaptionColorReadOnly, tokens.labelColorReadOnly, tokens.dividerColorReadOnly)
49
49
  }
50
50
  }
51
51
  };