@salutejs/plasma-new-hope 0.230.0-canary.1670.12462995068.0 → 0.230.0-dev.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (210) hide show
  1. package/cjs/components/Breadcrumbs/Breadcrumbs.js +2 -1
  2. package/cjs/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
  3. package/cjs/components/Breadcrumbs/ui/BreadcrumbShorter/BreadcrumbShorter.css +3 -0
  4. package/cjs/components/Breadcrumbs/utils/getShortItems.js +44 -0
  5. package/cjs/components/Breadcrumbs/utils/getShortItems.js.map +1 -0
  6. package/cjs/components/Breadcrumbs/utils/index.js +0 -38
  7. package/cjs/components/Breadcrumbs/utils/index.js.map +1 -1
  8. package/cjs/components/Calendar/utils/getDateWithModification.js.map +1 -1
  9. package/cjs/components/Combobox/ComboboxNew/Combobox.context.js +10 -0
  10. package/cjs/components/Combobox/ComboboxNew/Combobox.context.js.map +1 -0
  11. package/cjs/components/Combobox/ComboboxNew/Combobox.js +2 -3
  12. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  13. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +0 -75
  14. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +0 -112
  15. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -2
  16. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  17. package/cjs/components/Dropdown/Dropdown.context.js +10 -0
  18. package/cjs/components/Dropdown/Dropdown.context.js.map +1 -0
  19. package/cjs/components/Dropdown/Dropdown.js +2 -3
  20. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  21. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.css +27 -0
  22. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -1
  23. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  24. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +0 -25
  25. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +2 -2
  26. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  27. package/cjs/components/Select/Select.context.js +10 -0
  28. package/cjs/components/Select/Select.context.js.map +1 -0
  29. package/cjs/components/Select/Select.js +2 -3
  30. package/cjs/components/Select/Select.js.map +1 -1
  31. package/cjs/components/Select/ui/Inner/Inner.css +0 -109
  32. package/cjs/components/Select/ui/Inner/Inner.js +1 -1
  33. package/cjs/components/Select/ui/Inner/Inner.js.map +1 -1
  34. package/cjs/components/Select/ui/Inner/ui/Item/Item.css +0 -112
  35. package/cjs/components/Select/ui/Inner/ui/Item/Item.js +2 -2
  36. package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  37. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +0 -7
  38. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
  39. package/cjs/components/TextArea/TextArea.js +0 -1
  40. package/cjs/components/TextArea/TextArea.js.map +1 -1
  41. package/cjs/components/TextField/TextField.js +0 -1
  42. package/cjs/components/TextField/TextField.js.map +1 -1
  43. package/cjs/engines/common.js +0 -36
  44. package/cjs/engines/common.js.map +1 -1
  45. package/cjs/engines/linaria.js +3 -3
  46. package/cjs/engines/linaria.js.map +1 -1
  47. package/cjs/engines/utils.js +40 -0
  48. package/cjs/engines/utils.js.map +1 -0
  49. package/emotion/cjs/components/Breadcrumbs/Breadcrumbs.js +2 -1
  50. package/emotion/cjs/components/Breadcrumbs/utils/getShortItems.js +42 -0
  51. package/emotion/cjs/components/Breadcrumbs/utils/index.js +1 -37
  52. package/emotion/cjs/components/Calendar/utils/getDateWithModification.js +3 -3
  53. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.context.js +8 -0
  54. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +3 -4
  55. package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
  56. package/emotion/cjs/components/Dropdown/Dropdown.context.js +8 -0
  57. package/emotion/cjs/components/Dropdown/Dropdown.js +3 -4
  58. package/emotion/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +3 -3
  59. package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
  60. package/emotion/cjs/components/Select/Select.context.js +8 -0
  61. package/emotion/cjs/components/Select/Select.js +3 -4
  62. package/emotion/cjs/components/Select/ui/Inner/Inner.js +3 -3
  63. package/emotion/cjs/components/Select/ui/Inner/ui/Item/Item.js +1 -1
  64. package/emotion/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +3 -3
  65. package/emotion/cjs/components/TextArea/TextArea.js +1 -2
  66. package/emotion/cjs/components/TextField/TextField.js +1 -2
  67. package/emotion/cjs/engines/common.js +2 -42
  68. package/emotion/cjs/engines/emotion.js +4 -4
  69. package/emotion/cjs/engines/utils.js +42 -0
  70. package/emotion/es/components/Breadcrumbs/Breadcrumbs.js +2 -1
  71. package/emotion/es/components/Breadcrumbs/utils/getShortItems.js +35 -0
  72. package/emotion/es/components/Breadcrumbs/utils/index.js +0 -35
  73. package/emotion/es/components/Calendar/utils/getDateWithModification.js +1 -1
  74. package/emotion/es/components/Combobox/ComboboxNew/Combobox.context.js +2 -0
  75. package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +2 -2
  76. package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
  77. package/emotion/es/components/Dropdown/Dropdown.context.js +2 -0
  78. package/emotion/es/components/Dropdown/Dropdown.js +2 -2
  79. package/emotion/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -1
  80. package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
  81. package/emotion/es/components/Select/Select.context.js +2 -0
  82. package/emotion/es/components/Select/Select.js +2 -2
  83. package/emotion/es/components/Select/ui/Inner/Inner.js +1 -1
  84. package/emotion/es/components/Select/ui/Inner/ui/Item/Item.js +1 -1
  85. package/emotion/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +1 -1
  86. package/emotion/es/components/TextArea/TextArea.js +1 -2
  87. package/emotion/es/components/TextField/TextField.js +1 -2
  88. package/emotion/es/engines/common.js +0 -40
  89. package/emotion/es/engines/emotion.js +2 -2
  90. package/emotion/es/engines/utils.js +36 -0
  91. package/es/components/Breadcrumbs/Breadcrumbs.js +2 -1
  92. package/es/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
  93. package/es/components/Breadcrumbs/ui/BreadcrumbShorter/BreadcrumbShorter.css +3 -0
  94. package/es/components/Breadcrumbs/utils/getShortItems.js +39 -0
  95. package/es/components/Breadcrumbs/utils/getShortItems.js.map +1 -0
  96. package/es/components/Breadcrumbs/utils/index.js +1 -37
  97. package/es/components/Breadcrumbs/utils/index.js.map +1 -1
  98. package/es/components/Calendar/utils/getDateWithModification.js.map +1 -1
  99. package/es/components/Combobox/ComboboxNew/Combobox.context.js +6 -0
  100. package/es/components/Combobox/ComboboxNew/Combobox.context.js.map +1 -0
  101. package/es/components/Combobox/ComboboxNew/Combobox.js +3 -3
  102. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  103. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +0 -75
  104. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +0 -112
  105. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
  106. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  107. package/es/components/Dropdown/Dropdown.context.js +6 -0
  108. package/es/components/Dropdown/Dropdown.context.js.map +1 -0
  109. package/es/components/Dropdown/Dropdown.js +3 -3
  110. package/es/components/Dropdown/Dropdown.js.map +1 -1
  111. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.css +27 -0
  112. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -1
  113. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  114. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +0 -25
  115. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
  116. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  117. package/es/components/Select/Select.context.js +6 -0
  118. package/es/components/Select/Select.context.js.map +1 -0
  119. package/es/components/Select/Select.js +3 -3
  120. package/es/components/Select/Select.js.map +1 -1
  121. package/es/components/Select/ui/Inner/Inner.css +0 -109
  122. package/es/components/Select/ui/Inner/Inner.js +1 -1
  123. package/es/components/Select/ui/Inner/Inner.js.map +1 -1
  124. package/es/components/Select/ui/Inner/ui/Item/Item.css +0 -112
  125. package/es/components/Select/ui/Inner/ui/Item/Item.js +1 -1
  126. package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  127. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +0 -7
  128. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
  129. package/es/components/TextArea/TextArea.js +0 -1
  130. package/es/components/TextArea/TextArea.js.map +1 -1
  131. package/es/components/TextField/TextField.js +0 -1
  132. package/es/components/TextField/TextField.js.map +1 -1
  133. package/es/engines/common.js +2 -36
  134. package/es/engines/common.js.map +1 -1
  135. package/es/engines/linaria.js +1 -1
  136. package/es/engines/linaria.js.map +1 -1
  137. package/es/engines/utils.js +35 -0
  138. package/es/engines/utils.js.map +1 -0
  139. package/package.json +22 -5
  140. package/styled-components/cjs/components/Breadcrumbs/Breadcrumbs.js +2 -1
  141. package/styled-components/cjs/components/Breadcrumbs/utils/getShortItems.js +42 -0
  142. package/styled-components/cjs/components/Breadcrumbs/utils/index.js +1 -37
  143. package/styled-components/cjs/components/Calendar/utils/getDateWithModification.js +3 -3
  144. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.context.js +8 -0
  145. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +3 -4
  146. package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
  147. package/styled-components/cjs/components/Dropdown/Dropdown.context.js +8 -0
  148. package/styled-components/cjs/components/Dropdown/Dropdown.js +3 -4
  149. package/styled-components/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +3 -3
  150. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
  151. package/styled-components/cjs/components/Select/Select.context.js +8 -0
  152. package/styled-components/cjs/components/Select/Select.js +3 -4
  153. package/styled-components/cjs/components/Select/ui/Inner/Inner.js +3 -3
  154. package/styled-components/cjs/components/Select/ui/Inner/ui/Item/Item.js +1 -1
  155. package/styled-components/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +3 -3
  156. package/styled-components/cjs/components/TextArea/TextArea.js +0 -1
  157. package/styled-components/cjs/components/TextField/TextField.js +0 -1
  158. package/styled-components/cjs/engines/common.js +2 -42
  159. package/styled-components/cjs/engines/styled-components.js +3 -3
  160. package/styled-components/cjs/engines/utils.js +42 -0
  161. package/styled-components/es/components/Breadcrumbs/Breadcrumbs.js +2 -1
  162. package/styled-components/es/components/Breadcrumbs/utils/getShortItems.js +35 -0
  163. package/styled-components/es/components/Breadcrumbs/utils/index.js +0 -35
  164. package/styled-components/es/components/Calendar/utils/getDateWithModification.js +1 -1
  165. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.context.js +2 -0
  166. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +2 -2
  167. package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
  168. package/styled-components/es/components/Dropdown/Dropdown.context.js +2 -0
  169. package/styled-components/es/components/Dropdown/Dropdown.js +2 -2
  170. package/styled-components/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -1
  171. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
  172. package/styled-components/es/components/Select/Select.context.js +2 -0
  173. package/styled-components/es/components/Select/Select.js +2 -2
  174. package/styled-components/es/components/Select/ui/Inner/Inner.js +1 -1
  175. package/styled-components/es/components/Select/ui/Inner/ui/Item/Item.js +1 -1
  176. package/styled-components/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +1 -1
  177. package/styled-components/es/components/TextArea/TextArea.js +0 -1
  178. package/styled-components/es/components/TextField/TextField.js +0 -1
  179. package/styled-components/es/engines/common.js +0 -40
  180. package/styled-components/es/engines/styled-components.js +1 -1
  181. package/styled-components/es/engines/utils.js +36 -0
  182. package/types/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  183. package/types/components/Breadcrumbs/utils/getShortItems.d.ts +6 -0
  184. package/types/components/Breadcrumbs/utils/getShortItems.d.ts.map +1 -0
  185. package/types/components/Breadcrumbs/utils/index.d.ts +2 -5
  186. package/types/components/Breadcrumbs/utils/index.d.ts.map +1 -1
  187. package/types/components/Calendar/utils/getDateWithModification.d.ts +1 -1
  188. package/types/components/Calendar/utils/getDateWithModification.d.ts.map +1 -1
  189. package/types/components/Combobox/ComboboxNew/Combobox.context.d.ts +4 -0
  190. package/types/components/Combobox/ComboboxNew/Combobox.context.d.ts.map +1 -0
  191. package/types/components/Combobox/ComboboxNew/Combobox.d.ts +1 -2
  192. package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
  193. package/types/components/Dropdown/Dropdown.context.d.ts +4 -0
  194. package/types/components/Dropdown/Dropdown.context.d.ts.map +1 -0
  195. package/types/components/Dropdown/Dropdown.d.ts +1 -2
  196. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  197. package/types/components/Select/Select.context.d.ts +4 -0
  198. package/types/components/Select/Select.context.d.ts.map +1 -0
  199. package/types/components/Select/Select.d.ts +1 -2
  200. package/types/components/Select/Select.d.ts.map +1 -1
  201. package/types/components/TextArea/TextArea.d.ts.map +1 -1
  202. package/types/components/TextField/TextField.d.ts.map +1 -1
  203. package/types/engines/common.d.ts +1 -3
  204. package/types/engines/common.d.ts.map +1 -1
  205. package/types/engines/utils.d.ts +4 -0
  206. package/types/engines/utils.d.ts.map +1 -0
  207. package/cjs/components/Slider/components/Double/Double.css +0 -91
  208. package/es/components/Slider/components/Double/Double.css +0 -91
  209. /package/cjs/components/Breadcrumbs/utils/{index.css → getShortItems.css} +0 -0
  210. /package/es/components/Breadcrumbs/utils/{index.css → getShortItems.css} +0 -0
@@ -9,13 +9,6 @@
9
9
  .SliderBase_styles_wld555_fdg7yhg__d313173d{position:absolute;width:0;height:100%;top:0;left:0;border-radius:var(--plasma-slider-rail-border-radius);background:var(--plasma-slider-fill-color);}
10
10
  .SliderBase_styles_wld555_i17ya4q3__d313173d{visibility:hidden;width:0;height:0;opacity:0;margin:0;padding:0;border:none;}
11
11
 
12
- .Single_styles_1h7n2s2_l1p4kc08__5fe9b6cf{color:var(--plasma-slider-label-color);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-slider-label-wrapper-gap);}
13
- .Single_styles_1h7n2s2_ly2gexi__5fe9b6cf{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
14
- .Single_styles_1h7n2s2_lozb535__5fe9b6cf{font-family:var(--plasma-slider-label-font-family);font-size:var(--plasma-slider-label-font-size);font-style:var(--plasma-slider-label-font-style);font-weight:var(--plasma-slider-label-font-weight);-webkit-letter-spacing:var(--plasma-slider-label-letter-spacing);-moz-letter-spacing:var(--plasma-slider-label-letter-spacing);-ms-letter-spacing:var(--plasma-slider-label-letter-spacing);letter-spacing:var(--plasma-slider-label-letter-spacing);line-height:var(--plasma-slider-label-line-height);}
15
- .Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf{color:var(--plasma-slider-range-value-color);font-family:var(--plasma-slider-value-font-family);font-size:var(--plasma-slider-value-font-size);font-style:var(--plasma-slider-value-font-style);font-weight:var(--plasma-slider-value-font-weight);-webkit-letter-spacing:var(--plasma-slider-value-letter-spacing);-moz-letter-spacing:var(--plasma-slider-value-letter-spacing);-ms-letter-spacing:var(--plasma-slider-value-letter-spacing);letter-spacing:var(--plasma-slider-value-letter-spacing);line-height:var(--plasma-slider-value-line-height);-webkit-transition:opacity 0.1s ease-in-out;transition:opacity 0.1s ease-in-out;}.Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf.Single_styles_1h7n2s2_sliderHideMinValue__5fe9b6cf,.Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf.Single_styles_1h7n2s2_sliderHideMaxValue__5fe9b6cf{opacity:0;}.Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf.Single_styles_1h7n2s2_sliderActiveRangeValue__5fe9b6cf{color:var(--plasma-slider-label-color);}
16
- .Single_styles_1h7n2s2_s1d2sfgl__5fe9b6cf{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1;-ms-flex:1;flex:1;}.Single_styles_1h7n2s2_s1d2sfgl__5fe9b6cf.Single_styles_1h7n2s2_sliderRangeValuesPlacementOuter__5fe9b6cf .Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf{position:absolute;bottom:calc(var(--plasma-slider-rail-thickness) * -1.5 - var(--plasma-slider-range-value-bottom-offset));left:0;}.Single_styles_1h7n2s2_s1d2sfgl__5fe9b6cf.Single_styles_1h7n2s2_sliderRangeValuesPlacementOuter__5fe9b6cf .Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf.Single_styles_1h7n2s2_sliderMaxRangeValue__5fe9b6cf{left:unset;right:0;}.Single_styles_1h7n2s2_s1d2sfgl__5fe9b6cf.Single_styles_1h7n2s2_sliderRangeValuesPlacementInner__5fe9b6cf{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.Single_styles_1h7n2s2_s1d2sfgl__5fe9b6cf.Single_styles_1h7n2s2_sliderRangeValuesPlacementInner__5fe9b6cf .Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf{margin-right:var(--plasma-slider-range-value-horizontal-margin);}.Single_styles_1h7n2s2_s1d2sfgl__5fe9b6cf.Single_styles_1h7n2s2_sliderRangeValuesPlacementInner__5fe9b6cf .Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf.Single_styles_1h7n2s2_sliderMaxRangeValue__5fe9b6cf{margin-right:0;margin-left:var(--plasma-slider-range-value-horizontal-margin);}
17
- .Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;opacity:var(--plasma-slider-disabled-opacity);}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelPlacementOuter__5fe9b6cf{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelPlacementOuter__5fe9b6cf .Single_styles_1h7n2s2_l1p4kc08__5fe9b6cf{margin-bottom:var(--plasma-slider-label-wrapper-margin-bottom);}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelPlacementInner__5fe9b6cf .Single_styles_1h7n2s2_l1p4kc08__5fe9b6cf{margin-right:var(--plasma-slider-label-wrapper-margin-right);}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignCenter__5fe9b6cf .Single_styles_1h7n2s2_l1p4kc08__5fe9b6cf{-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignCenter__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelPlacementBottom__5fe9b6cf .Single_styles_1h7n2s2_l1p4kc08__5fe9b6cf{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignCenter__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelPlacementBottom__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelContentReversed__5fe9b6cf .Single_styles_1h7n2s2_l1p4kc08__5fe9b6cf{-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignCenter__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelContentReversed__5fe9b6cf .Single_styles_1h7n2s2_l1p4kc08__5fe9b6cf{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf .Single_styles_1h7n2s2_l1p4kc08__5fe9b6cf{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf .Single_styles_1h7n2s2_s1d2sfgl__5fe9b6cf{width:var(--plasma-slider-size);}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelPlacementInner__5fe9b6cf .Single_styles_1h7n2s2_l1p4kc08__5fe9b6cf{margin-right:0;margin-bottom:var(--plasma-slider-label-wrapper-vertical-margin);}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignLeft__5fe9b6cf{-webkit-align-items:flex-end;-webkit-box-align:flex-end;-ms-flex-align:flex-end;align-items:flex-end;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignLeft__5fe9b6cf .Single_styles_1h7n2s2_l1p4kc08__5fe9b6cf{-webkit-flex-direction:row-reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignRight__5fe9b6cf{-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelPlacementBottom__5fe9b6cf{-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelPlacementBottom__5fe9b6cf .Single_styles_1h7n2s2_l1p4kc08__5fe9b6cf{margin-top:var(--plasma-slider-label-wrapper-vertical-margin);margin-right:0;margin-bottom:0;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf .Single_styles_1h7n2s2_s1d2sfgl__5fe9b6cf{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignCenter__5fe9b6cf .Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf{position:static;bottom:0;left:0;margin-bottom:var(--plasma-slider-range-value-vertical-margin);}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignCenter__5fe9b6cf .Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf.Single_styles_1h7n2s2_sliderMaxRangeValue__5fe9b6cf{left:0;right:0;bottom:0;margin-top:var(--plasma-slider-range-value-vertical-margin);margin-bottom:0;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignLeft__5fe9b6cf .Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf,.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignRight__5fe9b6cf .Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf{margin-right:0;margin-bottom:0;position:absolute;top:0;right:calc( var(--plasma-slider-rail-thickness) / 2 + var(--plasma-slider-size) / 2 + var(--plasma-slider-range-value-horizontal-offset) );}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignLeft__5fe9b6cf .Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf.Single_styles_1h7n2s2_sliderMaxRangeValue__5fe9b6cf,.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignRight__5fe9b6cf .Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf.Single_styles_1h7n2s2_sliderMaxRangeValue__5fe9b6cf{margin-right:0;margin-left:0;top:auto;bottom:0;}.Single_styles_1h7n2s2_ss3ujqx__5fe9b6cf.Single_styles_1h7n2s2_sliderVerticalOrientation__5fe9b6cf.Single_styles_1h7n2s2_sliderLabelAlignRight__5fe9b6cf .Single_styles_1h7n2s2_s1w9icbd__5fe9b6cf{left:calc(var(--plasma-slider-size) + var(--plasma-slider-rail-thickness));}
18
-
19
12
  .base_1tei47x_b13ve66i__79b65751 .base_1tei47x_i13qvwoy__79b65751{width:100%;font:inherit;-webkit-letter-spacing:inherit;-moz-letter-spacing:inherit;-ms-letter-spacing:inherit;letter-spacing:inherit;line-height:inherit;}.base_1tei47x_b13ve66i__79b65751 .base_1tei47x_i19ry60d__79b65751{width:100%;font-family:var(--plasma-textfield-font-family);font-size:var(--plasma-textfield-font-size);font-style:var(--plasma-textfield-font-style);font-weight:var(--plasma-textfield-font-weight);-webkit-letter-spacing:var(--plasma-textfield-letter-spacing);-moz-letter-spacing:var(--plasma-textfield-letter-spacing);-ms-letter-spacing:var(--plasma-textfield-letter-spacing);letter-spacing:var(--plasma-textfield-letter-spacing);line-height:var(--plasma-textfield-line-height);}.base_1tei47x_b13ve66i__79b65751 .base_1tei47x_i1j28rg8__79b65751{height:var(--plasma-textfield-height);border-radius:var(--plasma-textfield-border-radius);padding:var(--plasma-textfield-padding);}.base_1tei47x_b13ve66i__79b65751 .base_1tei47x_i1j28rg8__79b65751.base_1tei47x_hasChips__79b65751{padding-top:var(--plasma-textfield-padding-with-chips);padding-bottom:var(--plasma-textfield-padding-with-chips);}.base_1tei47x_b13ve66i__79b65751 .base_1tei47x_i1j28rg8__79b65751.base_1tei47x_hasEmptyContentLeft__79b65751{padding-left:var(--plasma-textfield-padding-with-chips);}.base_1tei47x_b13ve66i__79b65751 .base_1tei47x_i1j28rg8__79b65751.base_1tei47x_hasEmptyContentRight__79b65751{padding-right:var(--plasma-textfield-padding-with-chips);}.base_1tei47x_b13ve66i__79b65751 .base_1tei47x_l1gjsnfi__79b65751,.base_1tei47x_b13ve66i__79b65751:not(.base_1tei47x_labelPlacementInner__79b65751) .base_1tei47x_s14qvple__79b65751{font-family:var(--plasma-textfield__label-font-family);font-size:var(--plasma-textfield__label-font-size);font-style:var(--plasma-textfield__label-font-style);font-weight:var(--plasma-textfield__label-font-weight);-webkit-letter-spacing:var(--plasma-textfield__label-letter-spacing);-moz-letter-spacing:var(--plasma-textfield__label-letter-spacing);-ms-letter-spacing:var(--plasma-textfield__label-letter-spacing);letter-spacing:var(--plasma-textfield__label-letter-spacing);line-height:var(--plasma-textfield__label-line-height);}.base_1tei47x_b13ve66i__79b65751 .base_1tei47x_s16itze4__79b65751{margin:var(--plasma-textfield__hint-margin);width:var(--plasma-textfield__hint-target-size);height:var(--plasma-textfield__hint-target-size);}.base_1tei47x_b13ve66i__79b65751 .base_1tei47x_h1skqnhr__79b65751{width:var(--plasma-textfield__hint-target-size);height:var(--plasma-textfield__hint-target-size);}.base_1tei47x_b13ve66i__79b65751 .base_1tei47x_t600610__79b65751{font-family:var(--plasma-textfield__title-caption-font-family);font-size:var(--plasma-textfield__title-caption-font-size);font-style:var(--plasma-textfield__title-caption-font-style);font-weight:var(--plasma-textfield__title-caption-font-weight);-webkit-letter-spacing:var(--plasma-textfield__title-caption-letter-spacing);-moz-letter-spacing:var(--plasma-textfield__title-caption-letter-spacing);-ms-letter-spacing:var(--plasma-textfield__title-caption-letter-spacing);letter-spacing:var(--plasma-textfield__title-caption-letter-spacing);line-height:var(--plasma-textfield__title-caption-line-height);}.base_1tei47x_b13ve66i__79b65751 .base_1tei47x_lb3k3v1__79b65751{margin-top:var(--plasma-textfield__left-helper-offset);font-family:var(--plasma-textfield__left-helper-font-family);font-size:var(--plasma-textfield__left-helper-font-size);font-style:var(--plasma-textfield__left-helper-font-style);font-weight:var(--plasma-textfield__left-helper-font-weight);-webkit-letter-spacing:var(--plasma-textfield__left-helper-letter-spacing);-moz-letter-spacing:var(--plasma-textfield__left-helper-letter-spacing);-ms-letter-spacing:var(--plasma-textfield__left-helper-letter-spacing);letter-spacing:var(--plasma-textfield__left-helper-letter-spacing);line-height:var(--plasma-textfield__left-helper-line-height);}.base_1tei47x_b13ve66i__79b65751 .base_1tei47x_s7hnwwb__79b65751,.base_1tei47x_b13ve66i__79b65751 .base_1tei47x_smqgwd8__79b65751{font-family:var(--plasma-textfield-font-family);font-size:var(--plasma-textfield-font-size);font-style:var(--plasma-textfield-font-style);font-weight:var(--plasma-textfield-font-weight);-webkit-letter-spacing:var(--plasma-textfield-letter-spacing);-moz-letter-spacing:var(--plasma-textfield-letter-spacing);-ms-letter-spacing:var(--plasma-textfield-letter-spacing);letter-spacing:var(--plasma-textfield-letter-spacing);line-height:var(--plasma-textfield-line-height);}.base_1tei47x_b13ve66i__79b65751 .base_1tei47x_s7hnwwb__79b65751{margin:var(--plasma-textfield__before-text-margin);}.base_1tei47x_b13ve66i__79b65751 .base_1tei47x_smqgwd8__79b65751{margin:var(--plasma-textfield__after-text-margin);}
20
13
 
21
14
  .base_1elov6h_bptx5xt__267ef823 .base_1elov6h_i1j28rg8__267ef823{--plasma_private-textfield-border-color:var(--plasma-textfield-border-color);--plasma_private-textfield-bg-color:var(--plasma-textfield-bg-color);color:var(--plasma-textfield-color);background-color:var(--plasma_private-textfield-bg-color);box-shadow:inset 0 0 0 var(--plasma-textfield-border-width) var(--plasma_private-textfield-border-color), var(--plasma-textfield-box-shadow,inset 0 0 0 0 transparent);caret-color:var(--plasma-textfield__caret-color);-webkit-transition:background-color 0.1s ease-in,color 0.1s ease-in,box-shadow 0.1s ease-in;transition:background-color 0.1s ease-in,color 0.1s ease-in,box-shadow 0.1s ease-in;}.base_1elov6h_bptx5xt__267ef823 .base_1elov6h_i1j28rg8__267ef823:hover{--plasma_private-textfield-border-color:var(--plasma-textfield-border-color-hover,var(--plasma-textfield-border-color));--plasma_private-textfield-bg-color:var( --plasma-textfield-bg-color-hover, var(--plasma-textfield-bg-color) );}.base_1elov6h_bptx5xt__267ef823 .base_1elov6h_i13qvwoy__267ef823{color:var(--plasma-textfield-color);}.base_1elov6h_bptx5xt__267ef823 .base_1elov6h_ibt1ohz__267ef823{color:var(--plasma-textfield__placeholder-color);}.base_1elov6h_bptx5xt__267ef823 .base_1elov6h_i1j28rg8__267ef823:focus-within{--plasma_private-textfield-border-color:var(--plasma-textfield-border-color-focus,var(--plasma-textfield-border-color));--plasma_private-textfield-bg-color:var( --plasma-textfield-bg-color-focus, var(--plasma-textfield-bg-color) );}.base_1elov6h_bptx5xt__267ef823 .base_1elov6h_i1j28rg8__267ef823:focus-within .base_1elov6h_ibt1ohz__267ef823{color:var(--plasma-textfield__placeholder-color-focus);}.base_1elov6h_bptx5xt__267ef823 .base_1elov6h_t600610__267ef823{color:var(--plasma-textfield__title-caption-color);}.base_1elov6h_bptx5xt__267ef823 .base_1elov6h_lb3k3v1__267ef823{color:var(--plasma-textfield__left-helper-color);}.base_1elov6h_bptx5xt__267ef823 .base_1elov6h_s7hnwwb__267ef823{color:var(--plasma-textfield__before-text-color);}.base_1elov6h_bptx5xt__267ef823 .base_1elov6h_smqgwd8__267ef823{color:var(--plasma-textfield__after-text-color);}
@@ -1 +1 @@
1
- {"version":3,"file":"DoubleUncontrolled.js","sources":["../../../../../src/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.tsx"],"sourcesContent":["import React, { KeyboardEvent, FC, useState, useCallback } from 'react';\n\nimport { DoubleSlider } from '../index';\nimport { FormTypeString } from '../../../../types/FormType';\n\nimport { DoubleUncontrolledProps } from './DoubleUncontrolled.types';\n\nexport const DoubleUncontrolled: FC<DoubleUncontrolledProps> = (props) => {\n const { defaultValue, min, max, value, name, onChange } = props;\n const [sliderValue, setSliderValue] = useState<number[]>(defaultValue ?? [min, max]);\n\n const sortValues = (values: number[]) => {\n return values\n .map((val) => {\n if (val < props.min) {\n return props.min;\n }\n if (val > props.max) {\n return props.max;\n }\n return val;\n })\n .sort((a, b) => a - b);\n };\n\n const onChangeHandle = useCallback(\n (values: number[]) => {\n const sortValue = sortValues(values);\n\n if (onChange && !value && name) {\n (onChange as (event: FormTypeString) => void)({\n target: {\n value: sortValue.join(' - '),\n name,\n },\n });\n }\n\n setSliderValue(sortValue);\n },\n [name, value, onChange, sortValues],\n );\n\n const onChangeCommittedHandle = useCallback(\n (values: number[]) => {\n const sortValue = sortValues(values);\n\n if (onChange && !value && name) {\n (onChange as (event: FormTypeString) => void)({\n target: {\n value: sortValue.join(' - '),\n name,\n },\n });\n }\n\n setSliderValue(sortValue);\n },\n [name, value, onChange, sortValues],\n );\n\n const onBlurTextField = useCallback(\n (values: number[]) => {\n const sortValue = sortValues(values);\n\n if (onChange && !value && name) {\n (onChange as (event: FormTypeString) => void)({\n target: {\n value: sortValue.join(' - '),\n name,\n },\n });\n }\n\n setSliderValue(sortValue);\n },\n [name, value, onChange, sortValues],\n );\n\n const onKeyDownTextField = useCallback(\n (values: number[], e: KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter') {\n const sortValue = sortValues(values);\n\n if (onChange && !value && name) {\n (onChange as (event: FormTypeString) => void)({\n target: {\n value: sortValue.join(' - '),\n name,\n },\n });\n }\n\n setSliderValue(sortValue);\n }\n },\n [name, value, onChange, sortValues],\n );\n\n return value ? (\n <DoubleSlider {...props} value={value} onChange={onChange as (values: number[]) => void} />\n ) : (\n <DoubleSlider\n value={sliderValue}\n onKeyDownTextField={onKeyDownTextField}\n onBlurTextField={onBlurTextField}\n onChangeCommitted={onChangeCommittedHandle}\n {...props}\n onChange={onChangeHandle}\n />\n );\n};\n"],"names":["DoubleUncontrolled","props","defaultValue","min","max","value","name","onChange","_useState","useState","_useState2","_slicedToArray","sliderValue","setSliderValue","sortValues","values","map","val","sort","a","b","onChangeHandle","useCallback","sortValue","target","join","onChangeCommittedHandle","onBlurTextField","onKeyDownTextField","e","key","React","createElement","DoubleSlider","_extends","onChangeCommitted"],"mappings":";;;;;;;;IAOaA,kBAA+C,GAAG,SAAlDA,kBAA+CA,CAAIC,KAAK,EAAK;AACtE,EAAA,IAAQC,YAAY,GAAsCD,KAAK,CAAvDC,YAAY;IAAEC,GAAG,GAAiCF,KAAK,CAAzCE,GAAG;IAAEC,GAAG,GAA4BH,KAAK,CAApCG,GAAG;IAAEC,KAAK,GAAqBJ,KAAK,CAA/BI,KAAK;IAAEC,IAAI,GAAeL,KAAK,CAAxBK,IAAI;IAAEC,QAAQ,GAAKN,KAAK,CAAlBM,QAAQ,CAAA;AACrD,EAAA,IAAAC,SAAA,GAAsCC,cAAQ,CAAWP,YAAY,KAAZA,IAAAA,IAAAA,YAAY,KAAZA,KAAAA,CAAAA,GAAAA,YAAY,GAAI,CAACC,GAAG,EAAEC,GAAG,CAAC,CAAC;IAAAM,UAAA,GAAAC,uCAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAA7EI,IAAAA,WAAW,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,cAAc,GAAAH,UAAA,CAAA,CAAA,CAAA,CAAA;AAElC,EAAA,IAAMI,UAAU,GAAG,SAAbA,UAAUA,CAAIC,MAAgB,EAAK;AACrC,IAAA,OAAOA,MAAM,CACRC,GAAG,CAAC,UAACC,GAAG,EAAK;AACV,MAAA,IAAIA,GAAG,GAAGhB,KAAK,CAACE,GAAG,EAAE;QACjB,OAAOF,KAAK,CAACE,GAAG,CAAA;AACpB,OAAA;AACA,MAAA,IAAIc,GAAG,GAAGhB,KAAK,CAACG,GAAG,EAAE;QACjB,OAAOH,KAAK,CAACG,GAAG,CAAA;AACpB,OAAA;AACA,MAAA,OAAOa,GAAG,CAAA;AACd,KAAC,CAAC,CAC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CAAA,CAAC,gBAE3FwB,KAAA,CAAAC,aAAA,CAACC,mBAAY,EAAAC,iCAAA,CAAA;AACT7B,IAAAA,KAAK,EAAEO,WAAY;AACnBgB,IAAAA,kBAAkB,EAAEA,kBAAmB;AACvCD,IAAAA,eAAe,EAAEA,eAAgB;AACjCQ,IAAAA,iBAAiB,EAAET,uBAAAA;AAAwB,GAAA,EACvCzB,KAAK,EAAA;AACTM,IAAAA,QAAQ,EAAEc,cAAAA;AAAe,GAAA,CAC5B,CACJ,CAAA;AACL;;;;"}
1
+ {"version":3,"file":"DoubleUncontrolled.js","sources":["../../../../../src/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.tsx"],"sourcesContent":["import React, { KeyboardEvent, FC, useState, useCallback } from 'react';\n\nimport { DoubleSlider } from '../Double/Double';\nimport { FormTypeString } from '../../../../types/FormType';\n\nimport { DoubleUncontrolledProps } from './DoubleUncontrolled.types';\n\nexport const DoubleUncontrolled: FC<DoubleUncontrolledProps> = (props) => {\n const { defaultValue, min, max, value, name, onChange } = props;\n const [sliderValue, setSliderValue] = useState<number[]>(defaultValue ?? [min, max]);\n\n const sortValues = (values: number[]) => {\n return values\n .map((val) => {\n if (val < props.min) {\n return props.min;\n }\n if (val > props.max) {\n return props.max;\n }\n return val;\n })\n .sort((a, b) => a - b);\n };\n\n const onChangeHandle = useCallback(\n (values: number[]) => {\n const sortValue = sortValues(values);\n\n if (onChange && !value && name) {\n (onChange as (event: FormTypeString) => void)({\n target: {\n value: sortValue.join(' - '),\n name,\n },\n });\n }\n\n setSliderValue(sortValue);\n },\n [name, value, onChange, sortValues],\n );\n\n const onChangeCommittedHandle = useCallback(\n (values: number[]) => {\n const sortValue = sortValues(values);\n\n if (onChange && !value && name) {\n (onChange as (event: FormTypeString) => void)({\n target: {\n value: sortValue.join(' - '),\n name,\n },\n });\n }\n\n setSliderValue(sortValue);\n },\n [name, value, onChange, sortValues],\n );\n\n const onBlurTextField = useCallback(\n (values: number[]) => {\n const sortValue = sortValues(values);\n\n if (onChange && !value && name) {\n (onChange as (event: FormTypeString) => void)({\n target: {\n value: sortValue.join(' - '),\n name,\n },\n });\n }\n\n setSliderValue(sortValue);\n },\n [name, value, onChange, sortValues],\n );\n\n const onKeyDownTextField = useCallback(\n (values: number[], e: KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter') {\n const sortValue = sortValues(values);\n\n if (onChange && !value && name) {\n (onChange as (event: FormTypeString) => void)({\n target: {\n value: sortValue.join(' - '),\n name,\n },\n });\n }\n\n setSliderValue(sortValue);\n }\n },\n [name, value, onChange, sortValues],\n );\n\n return value ? (\n <DoubleSlider {...props} value={value} onChange={onChange as (values: number[]) => void} />\n ) : (\n <DoubleSlider\n value={sliderValue}\n onKeyDownTextField={onKeyDownTextField}\n onBlurTextField={onBlurTextField}\n onChangeCommitted={onChangeCommittedHandle}\n {...props}\n onChange={onChangeHandle}\n />\n );\n};\n"],"names":["DoubleUncontrolled","props","defaultValue","min","max","value","name","onChange","_useState","useState","_useState2","_slicedToArray","sliderValue","setSliderValue","sortValues","values","map","val","sort","a","b","onChangeHandle","useCallback","sortValue","target","join","onChangeCommittedHandle","onBlurTextField","onKeyDownTextField","e","key","React","createElement","DoubleSlider","_extends","onChangeCommitted"],"mappings":";;;;;;;;IAOaA,kBAA+C,GAAG,SAAlDA,kBAA+CA,CAAIC,KAAK,EAAK;AACtE,EAAA,IAAQC,YAAY,GAAsCD,KAAK,CAAvDC,YAAY;IAAEC,GAAG,GAAiCF,KAAK,CAAzCE,GAAG;IAAEC,GAAG,GAA4BH,KAAK,CAApCG,GAAG;IAAEC,KAAK,GAAqBJ,KAAK,CAA/BI,KAAK;IAAEC,IAAI,GAAeL,KAAK,CAAxBK,IAAI;IAAEC,QAAQ,GAAKN,KAAK,CAAlBM,QAAQ,CAAA;AACrD,EAAA,IAAAC,SAAA,GAAsCC,cAAQ,CAAWP,YAAY,KAAZA,IAAAA,IAAAA,YAAY,KAAZA,KAAAA,CAAAA,GAAAA,YA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,MAAM,CAAC,CAAA;AAEpC,MAAA,IAAIR,QAAQ,IAAI,CAACF,KAAK,IAAIC,IAAI,EAAE;AAC3BC,QAAAA,QAAQ,CAAqC;AAC1CiB,UAAAA,MAAM,EAAE;AACJnB,YAAAA,KAAK,EAAEkB,SAAS,CAACE,IAAI,CAAC,KAAK,CAAC;AAC5BnB,YAAAA,IAAI,EAAJA,IAAAA;AACJ,WAAA;AACJ,SAAC,CAAC,CAAA;AACN,OAAA;MAEAO,cAAc,CAACU,SAAS,CAAC,CAAA;AAC7B,KAAA;GACH,EACD,CAACjB,IAAI,EAAED,KAAK,EAAEE,QAAQ,EAAEO,UAAU,CACtC,CAAC,CAAA;EAED,OAAOT,KAAK,gBACR0B,KAAA,CAAAC,aAAA,CAACC,mBAAY,EAAAC,iCAAA,CAAA,EAAA,EAAKjC,KAAK,EAAA;AAAEI,IAAAA,KAAK,EAAEA,KAAM;AAACE,IAAAA,QAAQ,EAAEA,QAAAA;GAAyC,CAAA,CAAC,gBAE3FwB,KAAA,CAAAC,aAAA,CAACC,mBAAY,EAAAC,iCAAA,CAAA;AACT7B,IAAAA,KAAK,EAAEO,WAAY;AACnBgB,IAAAA,kBAAkB,EAAEA,kBAAmB;AACvCD,IAAAA,eAAe,EAAEA,eAAgB;AACjCQ,IAAAA,iBAAiB,EAAET,uBAAAA;AAAwB,GAAA,EACvCzB,KAAK,EAAA;AACTM,IAAAA,QAAQ,EAAEc,cAAAA;AAAe,GAAA,CAC5B,CACJ,CAAA;AACL;;;;"}
@@ -289,7 +289,6 @@ var textAreaRoot = function textAreaRoot(Root) {
289
289
  applyCustomWidth: applyCustomWidth,
290
290
  ref: setRefList.mergeRefs(outerRef, innerRef),
291
291
  disabled: disabled,
292
- required: required,
293
292
  height: applyAutoResize ? minAuto : height,
294
293
  width: width,
295
294
  placeholder: placeholderLabel,
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.js","sources":["../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import React, { forwardRef, useState, createRef, useCallback, useRef, MouseEventHandler, useLayoutEffect } from 'react';\nimport { css } from '@linaria/core';\nimport { useForkRef, useResizeObserver } from '@salutejs/plasma-core';\n\nimport { cx, mergeRefs } from '../../utils';\nimport type { RootProps } from '../../engines/types';\nimport { useOutsideClick } from '../../hooks';\n\nimport { applyDynamicLabel } from './mixins';\nimport { useAutoResize, ROOT_FONT_SIZE } from './hooks';\nimport {\n StyledContent,\n StyledHelpers,\n StyledLeftHelper,\n StyledRightHelper,\n StyledLabel,\n StyledPlaceholder,\n StyledTextArea,\n StyledTextAreaWrapper,\n StyledContainer,\n StyledIndicator,\n StyledOptionalText,\n OuterLabelWrapper,\n StyledIndicatorWrapper,\n StyledHintWrapper,\n TitleCaption,\n StyledOutsideHelpersWrapper,\n StyledHiddenTextArea,\n} from './TextArea.styles';\nimport { classes } from './TextArea.tokens';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as clearCSS } from './variations/_clear/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as hintViewCSS } from './variations/_hint-view/base';\nimport { base as hintSizeCSS } from './variations/_hint-size/base';\nimport type { TextAreaProps, TextAreaRootProps } from './TextArea.types';\nimport { HintComponent } from './ui/Hint/Hint';\n\nconst {\n innerPlaceholderUp,\n focusedOuterPlaceholderColor,\n hidePlaceHolder,\n styledContainer,\n styledTextArea,\n styledTextAreaWrapper,\n styledPlaceholder,\n styledHelpers,\n} = classes;\n\nconst optionalText = 'optional';\n\nconst base = css`\n ${applyDynamicLabel};\n\n position: relative;\n box-sizing: border-box;\n`;\n\n// TODO: Удалить после отказа от старых библиотек plasma-web / plasma-b2c\nconst fallbackStatusMap = {\n '': 'primary',\n success: 'positive',\n warning: 'warning',\n error: 'negative',\n};\n\nconst HINT_DEFAULT_OFFSET: [number, number] = [0, 0];\n\n// TODO: Перенести этот метод в файл applyDynamicLabel.ts\nexport const getDynamicLabelClasses = (props: TextAreaProps, focused: boolean) => {\n const { readOnly, label, labelPlacement, rows, value, size } = props;\n\n // Добавить класс отвечающий за изменение цвета плейсхолдера при фокусе\n const withFocusedOuterUpPlaceholder =\n !readOnly && focused && (!label || labelPlacement === 'outer') ? focusedOuterPlaceholderColor : undefined;\n\n // Добавить класс отвечающий за поднятие и уменьшение плейсхолдера\n const withInnerPlaceholderUp =\n labelPlacement === 'inner' &&\n label &&\n !rows &&\n size !== 'xs' &&\n ((!readOnly && (value || focused)) || (readOnly && value))\n ? innerPlaceholderUp\n : undefined;\n\n // Добавить класс отвечающий за скрытие плейсхолдера\n const withHidePlaceholder =\n (value && !label) ||\n (labelPlacement === 'inner' && ((focused && !readOnly) || value) && label && rows) ||\n (labelPlacement === 'outer' && value) ||\n (labelPlacement === 'inner' && size === 'xs' && value)\n ? hidePlaceHolder\n : undefined;\n\n return [withFocusedOuterUpPlaceholder, withInnerPlaceholderUp, withHidePlaceholder];\n};\n\nexport const textAreaRoot = (Root: RootProps<HTMLTextAreaElement, TextAreaRootProps>) =>\n forwardRef<HTMLTextAreaElement, TextAreaProps>((props, innerRef) => {\n const {\n helperText,\n status,\n resize,\n rightHelper,\n leftHelper,\n leftHelperPlacement = 'inner',\n contentRight,\n autoResize = false,\n minAuto = 0,\n maxAuto,\n label,\n labelPlacement = 'inner',\n titleCaption,\n placeholder,\n defaultValue,\n height,\n width,\n value,\n disabled,\n required = false,\n requiredPlacement = 'right',\n optional = false,\n clear,\n hasDivider,\n size,\n view,\n id,\n style,\n className,\n readOnly,\n rows,\n cols,\n hintTrigger = 'hover',\n hintText,\n hintView = 'default',\n hintSize = 'm',\n hintTargetIcon,\n hintPlacement = 'auto',\n hintHasArrow,\n hintOffset = HINT_DEFAULT_OFFSET,\n hintWidth,\n hintContentLeft,\n onChange,\n ...rest\n } = props;\n\n const [isHintVisible, setIsHintVisible] = useState(false);\n const [helperWidth, setHelperWidth] = useState<string>(width ? `${width}rem` : '100%');\n const [focused, setFocused] = useState(false);\n // TODO: перенести в общую переменную для value снаружи и внутри\n const [uncontrolledValue, setUncontrolledValue] = useState<string | undefined>();\n\n const outerRef = createRef<HTMLTextAreaElement>();\n const hiddenRef = useRef<HTMLTextAreaElement | null>(null);\n\n const hintRef = useOutsideClick<HTMLDivElement>(() => {\n setIsHintVisible(false);\n });\n const hintInnerRef = useRef<HTMLDivElement>(null);\n const hintForkRef = useForkRef(hintRef, hintInnerRef);\n\n const isInnerLeftHelperPlacement = leftHelperPlacement === 'inner';\n const leftHelperText = leftHelper || helperText;\n const innerOptional = required ? false : optional;\n const hasLeftHelper = Boolean(leftHelper || helperText);\n const hasRightHelper = Boolean(rightHelper);\n const hasHelper = !isInnerLeftHelperPlacement ? hasRightHelper : hasLeftHelper || hasRightHelper;\n const hasOuterLabel = Boolean(label && labelPlacement === 'outer');\n const hasInnerLabel = Boolean(label && labelPlacement === 'inner' && size !== 'xs');\n const hasPlaceholderOptional = innerOptional && !hasOuterLabel;\n\n const overriddenView = status !== undefined ? fallbackStatusMap[status] : view;\n const textareaHelperId = id ? `${id}-helper` : undefined;\n const applyCustomWidth = resize !== 'horizontal' && resize !== 'both' && !cols;\n const placeholderLabel = hasInnerLabel ? label : placeholder;\n const applyAutoResize = autoResize || Boolean(clear);\n\n const clearClass = clear ? classes.clear : undefined;\n const hasHintClass = hintText ? classes.hasHint : undefined;\n const hasRightContentClass = contentRight ? classes.hasRightContent : undefined;\n const hasDividerClass = hasDivider ? classes.hasDivider : undefined;\n const requiredPlacementClass = requiredPlacement === 'right' ? classes.requiredAlignRight : undefined;\n\n const handleHintShow = () => setIsHintVisible(true);\n const handleHintHide = () => setIsHintVisible(false);\n const handleHintClick: MouseEventHandler = (event) => {\n if (!hintText || hintTrigger !== 'click') {\n return;\n }\n\n event.stopPropagation();\n const targetIsPopover = event.target === hintInnerRef.current;\n const rootHasTarget = hintInnerRef.current?.contains(event.target as Element);\n\n if (!targetIsPopover && !rootHasTarget) {\n setIsHintVisible(true);\n }\n };\n\n useLayoutEffect(() => {\n if (outerRef.current) {\n setUncontrolledValue(outerRef.current.value);\n }\n }, [outerRef]);\n\n useResizeObserver(outerRef, (currentElement) => {\n const { width: inlineWidth } = currentElement.style;\n\n if (inlineWidth || cols) {\n const { width: elementWidth } = currentElement.getBoundingClientRect();\n setHelperWidth(`${elementWidth / ROOT_FONT_SIZE}rem`);\n }\n });\n\n useAutoResize(applyAutoResize, outerRef, value || uncontrolledValue, minAuto, maxAuto, resize, hiddenRef);\n\n const onFocusHandler = useCallback(() => {\n setFocused(true);\n }, []);\n\n const onBlurHandler = useCallback(() => {\n setFocused(false);\n }, []);\n\n const onChangeHandler = useCallback(\n (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n // INFO: Для крайне редких кейсов, когда value снаружи не контролируется\n if (value === undefined) {\n setUncontrolledValue(event?.target.value);\n }\n\n onChange?.(event);\n },\n [value, onChange],\n );\n\n const handleTextAreaFocus = () => {\n if (readOnly || disabled || !outerRef?.current) {\n return;\n }\n\n outerRef.current.focus();\n };\n\n const dynamicLabelClasses = getDynamicLabelClasses(\n {\n size,\n readOnly,\n label,\n labelPlacement,\n value: value || uncontrolledValue || defaultValue,\n rows,\n },\n focused,\n );\n\n const optionalTextNode = innerOptional ? (\n <StyledOptionalText inheritFont={!hasOuterLabel}>\n {Boolean(hasPlaceholderOptional ? placeholderLabel : label) && '\\xa0'}\n {optionalText}\n </StyledOptionalText>\n ) : null;\n\n return (\n <Root\n view={overriddenView}\n size={size}\n disabled={disabled}\n readOnly={readOnly}\n clear={clear}\n style={{ width: helperWidth, ...style }}\n className={cx(clearClass, hasDividerClass, hasHintClass, className)}\n onClick={handleTextAreaFocus}\n {...(hintText && { hintView, hintSize })}\n >\n {(hasOuterLabel || titleCaption) && (\n <OuterLabelWrapper isInnerLabel={labelPlacement === 'inner'}>\n {hasOuterLabel && (\n <StyledIndicatorWrapper>\n <StyledLabel>{label}</StyledLabel>\n\n {hintText && (\n <StyledHintWrapper>\n <HintComponent\n ref={hintForkRef}\n hintText={hintText}\n hintTrigger={hintTrigger}\n isHintVisible={isHintVisible}\n hintTargetIcon={hintTargetIcon}\n hintPlacement={hintPlacement}\n hintHasArrow={hintHasArrow}\n hintOffset={hintOffset}\n hintWidth={hintWidth}\n hintContentLeft={hintContentLeft}\n handleHintShow={handleHintShow}\n handleHintHide={handleHintHide}\n handleHintClick={handleHintClick}\n />\n </StyledHintWrapper>\n )}\n {required && (\n <StyledIndicator\n className={cx(\n classes.outerLabelPlacement,\n requiredPlacementClass,\n hasHintClass,\n )}\n />\n )}\n {optionalTextNode}\n </StyledIndicatorWrapper>\n )}\n {titleCaption && <TitleCaption>{titleCaption}</TitleCaption>}\n </OuterLabelWrapper>\n )}\n <StyledContainer\n className={cx(styledContainer, ...dynamicLabelClasses)}\n width={helperWidth}\n onFocus={onFocusHandler}\n onBlur={onBlurHandler}\n >\n {!hasOuterLabel && (\n <>\n {required && (\n <StyledIndicator className={cx(classes.innerLabelPlacement, requiredPlacementClass)} />\n )}\n {hintText && (\n <StyledHintWrapper className={classes.innerLabelPlacement}>\n <HintComponent\n ref={hintForkRef}\n hintText={hintText}\n hintTrigger={hintTrigger}\n isHintVisible={isHintVisible}\n hintTargetIcon={hintTargetIcon}\n hintPlacement={hintPlacement}\n hintHasArrow={hintHasArrow}\n hintOffset={hintOffset}\n hintWidth={hintWidth}\n hintContentLeft={hintContentLeft}\n handleHintShow={handleHintShow}\n handleHintHide={handleHintHide}\n handleHintClick={handleHintClick}\n />\n </StyledHintWrapper>\n )}\n </>\n )}\n {contentRight && <StyledContent>{contentRight}</StyledContent>}\n <StyledTextAreaWrapper className={cx(styledTextAreaWrapper)} hasHelper={hasHelper}>\n <StyledTextArea\n className={cx(styledTextArea, hasRightContentClass)}\n id={id}\n hasContentRight={Boolean(contentRight)}\n hasHelper={hasHelper}\n applyCustomWidth={applyCustomWidth}\n ref={mergeRefs(outerRef, innerRef)}\n disabled={disabled}\n required={required}\n height={applyAutoResize ? minAuto : height}\n width={width}\n placeholder={placeholderLabel}\n aria-describedby={textareaHelperId}\n value={value}\n readOnly={readOnly}\n rows={rows}\n cols={cols}\n resize={resize}\n defaultValue={defaultValue}\n onChange={onChangeHandler}\n {...rest}\n />\n {applyAutoResize && (\n <StyledHiddenTextArea\n aria-hidden\n ref={hiddenRef}\n hasContentRight={Boolean(contentRight)}\n value={value || uncontrolledValue || ' '}\n defaultValue={defaultValue}\n />\n )}\n </StyledTextAreaWrapper>\n {hasHelper && (\n <StyledHelpers className={styledHelpers} id={textareaHelperId}>\n {isInnerLeftHelperPlacement && (leftHelper || helperText) && (\n <StyledLeftHelper>{leftHelper || helperText}</StyledLeftHelper>\n )}\n {rightHelper && <StyledRightHelper>{rightHelper}</StyledRightHelper>}\n </StyledHelpers>\n )}\n {placeholderLabel && (\n <StyledPlaceholder\n hasContentRight={Boolean(contentRight)}\n className={styledPlaceholder}\n htmlFor={id}\n >\n {placeholderLabel}\n {!hasOuterLabel && optionalTextNode}\n </StyledPlaceholder>\n )}\n </StyledContainer>\n {hasLeftHelper && !isInnerLeftHelperPlacement && (\n <StyledOutsideHelpersWrapper id={textareaHelperId}>\n <StyledLeftHelper>{leftHelperText}</StyledLeftHelper>\n </StyledOutsideHelpersWrapper>\n )}\n </Root>\n );\n });\n\nexport const textAreaConfig = {\n name: 'TextArea',\n tag: 'div',\n layout: textAreaRoot,\n base,\n variations: {\n size: {\n css: sizeCSS,\n },\n view: {\n css: viewCSS,\n },\n clear: {\n css: clearCSS,\n attrs: true,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n readOnly: {\n attrs: true,\n },\n hintView: {\n css: hintViewCSS,\n },\n hintSize: {\n css: hintSizeCSS,\n },\n },\n defaults: {\n size: 'm',\n view: 'primary',\n },\n};\n"],"names":["innerPlaceholderUp","classes","focusedOuterPlaceholderColor","hidePlaceHolder","styledContainer","styledTextArea","styledTextAreaWrapper","styledPlaceholder","styledHelpers","optionalText","base","fallbackStatusMap","success","warning","error","HINT_DEFAULT_OFFSET","getDynamicLabelClasses","props","focused","readOnly","label","labelPlacement","rows","value","size","withFocusedOuterUpPlaceholder","undefined","withInnerPlaceholderUp","withHidePlaceholder","textAreaRoot","Root","forwardRef","innerRef","helperText","status","resize","rightHelper","leftHelper","_props$leftHelperPlac","leftHelperPlacement","contentRight","_props$autoResize","autoResize","_props$minAuto","minAuto","maxAuto","_props$labelPlacement","titleCaption","placeholder","defaultValue","height","width","disabled","_props$required","required","_props$requiredPlacem","requiredPlacement","_props$optional","optional","clear","hasDivider","view","id","style","className","cols","_props$hintTrigger","hintTrigger","hintText","_props$hintView","hintView","_props$hintSize","hintSize","hintTargetIcon","_props$hintPlacement","hintPlacement","hintHasArrow","_props$hintOffset","hintOffset","hintWidth","hintContentLeft","onChange","rest","_excluded","_useState","useState","_useState2","_slicedToArray","isHintVisible","setIsHintVisible","_useState3","concat","_useState4","helperWidth","setHelperWidth","_useState5","_useState6","setFocused","_useState7","_useState8","uncontrolledValue","setUncontrolledValue","outerRef","createRef","hiddenRef","useRef","hintRef","useOutsideClick","hintInnerRef","hintForkRef","useForkRef","isInnerLeftHelperPlacement","leftHelperText","innerOptional","hasLeftHelper","Boolean","hasRightHelper","hasHelper","hasOuterLabel","hasInnerLabel","hasPlaceholderOptional","overriddenView","textareaHelperId","applyCustomWidth","placeholderLabel","applyAutoResize","clearClass","hasHintClass","hasHint","hasRightContentClass","hasRightContent","hasDividerClass","requiredPlacementClass","requiredAlignRight","handleHintShow","handleHintHide","handleHintClick","event","_hintInnerRef$current","stopPropagation","targetIsPopover","target","current","rootHasTarget","contains","useLayoutEffect","useResizeObserver","currentElement","inlineWidth","_currentElement$getBo","getBoundingClientRect","elementWidth","ROOT_FONT_SIZE","useAutoResize","onFocusHandler","useCallback","onBlurHandler","onChangeHandler","handleTextAreaFocus","focus","dynamicLabelClasses","optionalTextNode","React","createElement","StyledOptionalText","inheritFont","_extends","_objectSpread","cx","onClick","OuterLabelWrapper","isInnerLabel","StyledIndicatorWrapper","StyledLabel","StyledHintWrapper","HintComponent","ref","StyledIndicator","outerLabelPlacement","TitleCaption","StyledContainer","apply","_toConsumableArray","onFocus","onBlur","Fragment","innerLabelPlacement","StyledContent","StyledTextAreaWrapper","StyledTextArea","hasContentRight","mergeRefs","StyledHiddenTextArea","StyledHelpers","StyledLeftHelper","StyledRightHelper","StyledPlaceholder","htmlFor","StyledOutsideHelpersWrapper","textAreaConfig","name","tag","layout","variations","css","sizeCSS","viewCSS","clearCSS","attrs","disabledCSS","hintViewCSS","hintSizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuCA,IACIA,kBAAkB,GAQlBC,uBAAO,CARPD,kBAAkB;EAClBE,4BAA4B,GAO5BD,uBAAO,CAPPC,4BAA4B;EAC5BC,eAAe,GAMfF,uBAAO,CANPE,eAAe;EACfC,eAAe,GAKfH,uBAAO,CALPG,eAAe;EACfC,cAAc,GAIdJ,uBAAO,CAJPI,cAAc;EACdC,qBAAqB,GAGrBL,uBAAO,CAHPK,qBAAqB;EACrBC,iBAAiB,GAEjBN,uBAAO,CAFPM,iBAAiB;EACjBC,aAAAA,GACAP,uBAAO,CADPO,aAAAA,CAAAA;AAGJ,IAAMC,YAAY,GAAG,UAAU,CAAA;AAE/B,IAAMC,IAAI,GAKT,SAAA,CAAA;;AAED;AACA,IAAMC,iBAAiB,GAAG;AACtB,EAAA,EAAE,EAAE,SAAS;AACbC,EAAAA,OAAO,EAAE,UAAU;AACnBC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,KAAK,EAAE,UAAA;AACX,CAAC,CAAA;AAED,IAAMC,mBAAqC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;;AAEpD;AACO,IAAMC,sBAAsB,GAAGA,SAAzBA,sBAAsBA,CAAIC,KAAoB,EAAEC,OAAgB,EAAK;AAC9E,EAAA,IAAQC,QAAQ,GAA+CF,KAAK,CAA5DE,QAAQ;IAAEC,KAAK,GAAwCH,KAAK,CAAlDG,KAAK;IAAEC,cAAc,GAAwBJ,KAAK,CAA3CI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IAAA;KACV;AACD7L,IAAAA,QAAQ,EAAE;AACN6L,MAAAA,KAAK,EAAE,IAAA;KACV;AACD1I,IAAAA,QAAQ,EAAE;AACNsI,MAAAA,GAAG,EAAEM,WAAAA;KACR;AACD1I,IAAAA,QAAQ,EAAE;AACNoI,MAAAA,GAAG,EAAEO,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN5L,IAAAA,IAAI,EAAE,GAAG;AACTqC,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;;;"}
1
+ {"version":3,"file":"TextArea.js","sources":["../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import React, { forwardRef, useState, createRef, useCallback, useRef, MouseEventHandler, useLayoutEffect } from 'react';\nimport { css } from '@linaria/core';\nimport { useForkRef, useResizeObserver } from '@salutejs/plasma-core';\n\nimport { cx, mergeRefs } from '../../utils';\nimport type { RootProps } from '../../engines/types';\nimport { useOutsideClick } from '../../hooks';\n\nimport { applyDynamicLabel } from './mixins';\nimport { useAutoResize, ROOT_FONT_SIZE } from './hooks';\nimport {\n StyledContent,\n StyledHelpers,\n StyledLeftHelper,\n StyledRightHelper,\n StyledLabel,\n StyledPlaceholder,\n StyledTextArea,\n StyledTextAreaWrapper,\n StyledContainer,\n StyledIndicator,\n StyledOptionalText,\n OuterLabelWrapper,\n StyledIndicatorWrapper,\n StyledHintWrapper,\n TitleCaption,\n StyledOutsideHelpersWrapper,\n StyledHiddenTextArea,\n} from './TextArea.styles';\nimport { classes } from './TextArea.tokens';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as clearCSS } from './variations/_clear/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as hintViewCSS } from './variations/_hint-view/base';\nimport { base as hintSizeCSS } from './variations/_hint-size/base';\nimport type { TextAreaProps, TextAreaRootProps } from './TextArea.types';\nimport { HintComponent } from './ui/Hint/Hint';\n\nconst {\n innerPlaceholderUp,\n focusedOuterPlaceholderColor,\n hidePlaceHolder,\n styledContainer,\n styledTextArea,\n styledTextAreaWrapper,\n styledPlaceholder,\n styledHelpers,\n} = classes;\n\nconst optionalText = 'optional';\n\nconst base = css`\n ${applyDynamicLabel};\n\n position: relative;\n box-sizing: border-box;\n`;\n\n// TODO: Удалить после отказа от старых библиотек plasma-web / plasma-b2c\nconst fallbackStatusMap = {\n '': 'primary',\n success: 'positive',\n warning: 'warning',\n error: 'negative',\n};\n\nconst HINT_DEFAULT_OFFSET: [number, number] = [0, 0];\n\n// TODO: Перенести этот метод в файл applyDynamicLabel.ts\nexport const getDynamicLabelClasses = (props: TextAreaProps, focused: boolean) => {\n const { readOnly, label, labelPlacement, rows, value, size } = props;\n\n // Добавить класс отвечающий за изменение цвета плейсхолдера при фокусе\n const withFocusedOuterUpPlaceholder =\n !readOnly && focused && (!label || labelPlacement === 'outer') ? focusedOuterPlaceholderColor : undefined;\n\n // Добавить класс отвечающий за поднятие и уменьшение плейсхолдера\n const withInnerPlaceholderUp =\n labelPlacement === 'inner' &&\n label &&\n !rows &&\n size !== 'xs' &&\n ((!readOnly && (value || focused)) || (readOnly && value))\n ? innerPlaceholderUp\n : undefined;\n\n // Добавить класс отвечающий за скрытие плейсхолдера\n const withHidePlaceholder =\n (value && !label) ||\n (labelPlacement === 'inner' && ((focused && !readOnly) || value) && label && rows) ||\n (labelPlacement === 'outer' && value) ||\n (labelPlacement === 'inner' && size === 'xs' && value)\n ? hidePlaceHolder\n : undefined;\n\n return [withFocusedOuterUpPlaceholder, withInnerPlaceholderUp, withHidePlaceholder];\n};\n\nexport const textAreaRoot = (Root: RootProps<HTMLTextAreaElement, TextAreaRootProps>) =>\n forwardRef<HTMLTextAreaElement, TextAreaProps>((props, innerRef) => {\n const {\n helperText,\n status,\n resize,\n rightHelper,\n leftHelper,\n leftHelperPlacement = 'inner',\n contentRight,\n autoResize = false,\n minAuto = 0,\n maxAuto,\n label,\n labelPlacement = 'inner',\n titleCaption,\n placeholder,\n defaultValue,\n height,\n width,\n value,\n disabled,\n required = false,\n requiredPlacement = 'right',\n optional = false,\n clear,\n hasDivider,\n size,\n view,\n id,\n style,\n className,\n readOnly,\n rows,\n cols,\n hintTrigger = 'hover',\n hintText,\n hintView = 'default',\n hintSize = 'm',\n hintTargetIcon,\n hintPlacement = 'auto',\n hintHasArrow,\n hintOffset = HINT_DEFAULT_OFFSET,\n hintWidth,\n hintContentLeft,\n onChange,\n ...rest\n } = props;\n\n const [isHintVisible, setIsHintVisible] = useState(false);\n const [helperWidth, setHelperWidth] = useState<string>(width ? `${width}rem` : '100%');\n const [focused, setFocused] = useState(false);\n // TODO: перенести в общую переменную для value снаружи и внутри\n const [uncontrolledValue, setUncontrolledValue] = useState<string | undefined>();\n\n const outerRef = createRef<HTMLTextAreaElement>();\n const hiddenRef = useRef<HTMLTextAreaElement | null>(null);\n\n const hintRef = useOutsideClick<HTMLDivElement>(() => {\n setIsHintVisible(false);\n });\n const hintInnerRef = useRef<HTMLDivElement>(null);\n const hintForkRef = useForkRef(hintRef, hintInnerRef);\n\n const isInnerLeftHelperPlacement = leftHelperPlacement === 'inner';\n const leftHelperText = leftHelper || helperText;\n const innerOptional = required ? false : optional;\n const hasLeftHelper = Boolean(leftHelper || helperText);\n const hasRightHelper = Boolean(rightHelper);\n const hasHelper = !isInnerLeftHelperPlacement ? hasRightHelper : hasLeftHelper || hasRightHelper;\n const hasOuterLabel = Boolean(label && labelPlacement === 'outer');\n const hasInnerLabel = Boolean(label && labelPlacement === 'inner' && size !== 'xs');\n const hasPlaceholderOptional = innerOptional && !hasOuterLabel;\n\n const overriddenView = status !== undefined ? fallbackStatusMap[status] : view;\n const textareaHelperId = id ? `${id}-helper` : undefined;\n const applyCustomWidth = resize !== 'horizontal' && resize !== 'both' && !cols;\n const placeholderLabel = hasInnerLabel ? label : placeholder;\n const applyAutoResize = autoResize || Boolean(clear);\n\n const clearClass = clear ? classes.clear : undefined;\n const hasHintClass = hintText ? classes.hasHint : undefined;\n const hasRightContentClass = contentRight ? classes.hasRightContent : undefined;\n const hasDividerClass = hasDivider ? classes.hasDivider : undefined;\n const requiredPlacementClass = requiredPlacement === 'right' ? classes.requiredAlignRight : undefined;\n\n const handleHintShow = () => setIsHintVisible(true);\n const handleHintHide = () => setIsHintVisible(false);\n const handleHintClick: MouseEventHandler = (event) => {\n if (!hintText || hintTrigger !== 'click') {\n return;\n }\n\n event.stopPropagation();\n const targetIsPopover = event.target === hintInnerRef.current;\n const rootHasTarget = hintInnerRef.current?.contains(event.target as Element);\n\n if (!targetIsPopover && !rootHasTarget) {\n setIsHintVisible(true);\n }\n };\n\n useLayoutEffect(() => {\n if (outerRef.current) {\n setUncontrolledValue(outerRef.current.value);\n }\n }, [outerRef]);\n\n useResizeObserver(outerRef, (currentElement) => {\n const { width: inlineWidth } = currentElement.style;\n\n if (inlineWidth || cols) {\n const { width: elementWidth } = currentElement.getBoundingClientRect();\n setHelperWidth(`${elementWidth / ROOT_FONT_SIZE}rem`);\n }\n });\n\n useAutoResize(applyAutoResize, outerRef, value || uncontrolledValue, minAuto, maxAuto, resize, hiddenRef);\n\n const onFocusHandler = useCallback(() => {\n setFocused(true);\n }, []);\n\n const onBlurHandler = useCallback(() => {\n setFocused(false);\n }, []);\n\n const onChangeHandler = useCallback(\n (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n // INFO: Для крайне редких кейсов, когда value снаружи не контролируется\n if (value === undefined) {\n setUncontrolledValue(event?.target.value);\n }\n\n onChange?.(event);\n },\n [value, onChange],\n );\n\n const handleTextAreaFocus = () => {\n if (readOnly || disabled || !outerRef?.current) {\n return;\n }\n\n outerRef.current.focus();\n };\n\n const dynamicLabelClasses = getDynamicLabelClasses(\n {\n size,\n readOnly,\n label,\n labelPlacement,\n value: value || uncontrolledValue || defaultValue,\n rows,\n },\n focused,\n );\n\n const optionalTextNode = innerOptional ? (\n <StyledOptionalText inheritFont={!hasOuterLabel}>\n {Boolean(hasPlaceholderOptional ? placeholderLabel : label) && '\\xa0'}\n {optionalText}\n </StyledOptionalText>\n ) : null;\n\n return (\n <Root\n view={overriddenView}\n size={size}\n disabled={disabled}\n readOnly={readOnly}\n clear={clear}\n style={{ width: helperWidth, ...style }}\n className={cx(clearClass, hasDividerClass, hasHintClass, className)}\n onClick={handleTextAreaFocus}\n {...(hintText && { hintView, hintSize })}\n >\n {(hasOuterLabel || titleCaption) && (\n <OuterLabelWrapper isInnerLabel={labelPlacement === 'inner'}>\n {hasOuterLabel && (\n <StyledIndicatorWrapper>\n <StyledLabel>{label}</StyledLabel>\n\n {hintText && (\n <StyledHintWrapper>\n <HintComponent\n ref={hintForkRef}\n hintText={hintText}\n hintTrigger={hintTrigger}\n isHintVisible={isHintVisible}\n hintTargetIcon={hintTargetIcon}\n hintPlacement={hintPlacement}\n hintHasArrow={hintHasArrow}\n hintOffset={hintOffset}\n hintWidth={hintWidth}\n hintContentLeft={hintContentLeft}\n handleHintShow={handleHintShow}\n handleHintHide={handleHintHide}\n handleHintClick={handleHintClick}\n />\n </StyledHintWrapper>\n )}\n {required && (\n <StyledIndicator\n className={cx(\n classes.outerLabelPlacement,\n requiredPlacementClass,\n hasHintClass,\n )}\n />\n )}\n {optionalTextNode}\n </StyledIndicatorWrapper>\n )}\n {titleCaption && <TitleCaption>{titleCaption}</TitleCaption>}\n </OuterLabelWrapper>\n )}\n <StyledContainer\n className={cx(styledContainer, ...dynamicLabelClasses)}\n width={helperWidth}\n onFocus={onFocusHandler}\n onBlur={onBlurHandler}\n >\n {!hasOuterLabel && (\n <>\n {required && (\n <StyledIndicator className={cx(classes.innerLabelPlacement, requiredPlacementClass)} />\n )}\n {hintText && (\n <StyledHintWrapper className={classes.innerLabelPlacement}>\n <HintComponent\n ref={hintForkRef}\n hintText={hintText}\n hintTrigger={hintTrigger}\n isHintVisible={isHintVisible}\n hintTargetIcon={hintTargetIcon}\n hintPlacement={hintPlacement}\n hintHasArrow={hintHasArrow}\n hintOffset={hintOffset}\n hintWidth={hintWidth}\n hintContentLeft={hintContentLeft}\n handleHintShow={handleHintShow}\n handleHintHide={handleHintHide}\n handleHintClick={handleHintClick}\n />\n </StyledHintWrapper>\n )}\n </>\n )}\n {contentRight && <StyledContent>{contentRight}</StyledContent>}\n <StyledTextAreaWrapper className={cx(styledTextAreaWrapper)} hasHelper={hasHelper}>\n <StyledTextArea\n className={cx(styledTextArea, hasRightContentClass)}\n id={id}\n hasContentRight={Boolean(contentRight)}\n hasHelper={hasHelper}\n applyCustomWidth={applyCustomWidth}\n ref={mergeRefs(outerRef, innerRef)}\n disabled={disabled}\n height={applyAutoResize ? minAuto : height}\n width={width}\n placeholder={placeholderLabel}\n aria-describedby={textareaHelperId}\n value={value}\n readOnly={readOnly}\n rows={rows}\n cols={cols}\n resize={resize}\n defaultValue={defaultValue}\n onChange={onChangeHandler}\n {...rest}\n />\n {applyAutoResize && (\n <StyledHiddenTextArea\n aria-hidden\n ref={hiddenRef}\n hasContentRight={Boolean(contentRight)}\n value={value || uncontrolledValue || ' '}\n defaultValue={defaultValue}\n />\n )}\n </StyledTextAreaWrapper>\n {hasHelper && (\n <StyledHelpers className={styledHelpers} id={textareaHelperId}>\n {isInnerLeftHelperPlacement && (leftHelper || helperText) && (\n <StyledLeftHelper>{leftHelper || helperText}</StyledLeftHelper>\n )}\n {rightHelper && <StyledRightHelper>{rightHelper}</StyledRightHelper>}\n </StyledHelpers>\n )}\n {placeholderLabel && (\n <StyledPlaceholder\n hasContentRight={Boolean(contentRight)}\n className={styledPlaceholder}\n htmlFor={id}\n >\n {placeholderLabel}\n {!hasOuterLabel && optionalTextNode}\n </StyledPlaceholder>\n )}\n </StyledContainer>\n {hasLeftHelper && !isInnerLeftHelperPlacement && (\n <StyledOutsideHelpersWrapper id={textareaHelperId}>\n <StyledLeftHelper>{leftHelperText}</StyledLeftHelper>\n </StyledOutsideHelpersWrapper>\n )}\n </Root>\n );\n });\n\nexport const textAreaConfig = {\n name: 'TextArea',\n tag: 'div',\n layout: textAreaRoot,\n base,\n variations: {\n size: {\n css: sizeCSS,\n },\n view: {\n css: viewCSS,\n },\n clear: {\n css: clearCSS,\n attrs: true,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n readOnly: {\n attrs: true,\n },\n hintView: {\n css: hintViewCSS,\n },\n hintSize: {\n css: hintSizeCSS,\n },\n },\n defaults: {\n size: 'm',\n view: 'primary',\n },\n};\n"],"names":["innerPlaceholderUp","classes","focusedOuterPlaceholderColor","hidePlaceHolder","styledContainer","styledTextArea","styledTextAreaWrapper","styledPlaceholder","styledHelpers","optionalText","base","fallbackStatusMap","success","warning","error","HINT_DEFAULT_OFFSET","getDynamicLabelClasses","props","focused","readOnly","label","labelPlacement","rows","value","size","withFocusedOuterUpPlaceholder","undefined","withInnerPlaceholderUp","withHidePlaceholder","textAreaRoot","Root","forwardRef","innerRef","helperText","status","resize","rightHelper","leftHelper","_props$leftHelperPlac","leftHelperPlacement","contentRight","_props$autoResize","autoResize","_props$minAuto","minAuto","maxAuto","_props$labelPlacement","titleCaption","placeholder","defaultValue","height","width","disabled","_props$required","required","_props$requiredPlacem","requiredPlacement","_props$optional","optional","clear","hasDivider","view","id","style","className","cols","_props$hintTrigger","hintTrigger","hintText","_props$hintView","hintView","_props$hintSize","hintSize","hintTargetIcon","_props$hintPlacement","hintPlacement","hintHasArrow","_props$hintOffset","hintOffset","hintWidth","hintContentLeft","onChange","rest","_excluded","_useState","useState","_useState2","_slicedToArray","isHintVisible","setIsHintVisible","_useState3","concat","_useState4","helperWidth","setHelperWidth","_useState5","_useState6","setFocused","_useState7","_useState8","uncontrolledValue","setUncontrolledValue","outerRef","createRef","hiddenRef","useRef","hintRef","useOutsideClick","hintInnerRef","hintForkRef","useForkRef","isInnerLeftHelperPlacement","leftHelperText","innerOptional","hasLeftHelper","Boolean","hasRightHelper","hasHelper","hasOuterLabel","hasInnerLabel","hasPlaceholderOptional","overriddenView","textareaHelperId","applyCustomWidth","placeholderLabel","applyAutoResize","clearClass","hasHintClass","hasHint","hasRightContentClass","hasRightContent","hasDividerClass","requiredPlacementClass","requiredAlignRight","handleHintShow","handleHintHide","handleHintClick","event","_hintInnerRef$current","stopPropagation","targetIsPopover","target","current","rootHasTarget","contains","useLayoutEffect","useResizeObserver","currentElement","inlineWidth","_currentElement$getBo","getBoundingClientRect","elementWidth","ROOT_FONT_SIZE","useAutoResize","onFocusHandler","useCallback","onBlurHandler","onChangeHandler","handleTextAreaFocus","focus","dynamicLabelClasses","optionalTextNode","React","createElement","StyledOptionalText","inheritFont","_extends","_objectSpread","cx","onClick","OuterLabelWrapper","isInnerLabel","StyledIndicatorWrapper","StyledLabel","StyledHintWrapper","HintComponent","ref","StyledIndicator","outerLabelPlacement","TitleCaption","StyledContainer","apply","_toConsumableArray","onFocus","onBlur","Fragment","innerLabelPlacement","StyledContent","StyledTextAreaWrapper","StyledTextArea","hasContentRight","mergeRefs","StyledHiddenTextArea","StyledHelpers","StyledLeftHelper","StyledRightHelper","StyledPlaceholder","htmlFor","StyledOutsideHelpersWrapper","textAreaConfig","name","tag","layout","variations","css","sizeCSS","viewCSS","clearCSS","attrs","disabledCSS","hintViewCSS","hintSizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuCA,IACIA,kBAAkB,GAQlBC,uBAAO,CARPD,kBAAkB;EAClBE,4BAA4B,GAO5BD,uBAAO,CAPPC,4BAA4B;EAC5BC,eAAe,GAMfF,uBAAO,CANPE,eAAe;EACfC,eAAe,GAKfH,uBAAO,CALPG,eAAe;EACfC,cAAc,GAIdJ,uBAAO,CAJPI,cAAc;EACdC,qBAAqB,GAGrBL,uBAAO,CAHPK,qBAAqB;EACrBC,iBAAiB,GAEjBN,uBAAO,CAFPM,iBAAiB;EACjBC,aAAAA,GACAP,uBAAO,CADPO,aAAAA,CAAAA;AAGJ,IAAMC,YAAY,GAAG,UAAU,CAAA;AAE/B,IAAMC,IAAI,GAKT,SAAA,CAAA;;AAED;AACA,IAAMC,iBAAiB,GAAG;AACtB,EAAA,EAAE,EAAE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AA,IAAI,EAAJA,IAAI;AACJiM,EAAAA,UAAU,EAAE;AACRnL,IAAAA,IAAI,EAAE;AACFoL,MAAAA,GAAG,EAAEC,WAAAA;KACR;AACDhJ,IAAAA,IAAI,EAAE;AACF+I,MAAAA,GAAG,EAAEE,WAAAA;KACR;AACDnJ,IAAAA,KAAK,EAAE;AACHiJ,MAAAA,GAAG,EAAEG,WAAQ;AACbC,MAAAA,KAAK,EAAE,IAAA;KACV;AACD5J,IAAAA,QAAQ,EAAE;AACNwJ,MAAAA,GAAG,EAAEK,WAAW;AAChBD,MAAAA,KAAK,EAAE,IAAA;KACV;AACD7L,IAAAA,QAAQ,EAAE;AACN6L,MAAAA,KAAK,EAAE,IAAA;KACV;AACD1I,IAAAA,QAAQ,EAAE;AACNsI,MAAAA,GAAG,EAAEM,WAAAA;KACR;AACD1I,IAAAA,QAAQ,EAAE;AACNoI,MAAAA,GAAG,EAAEO,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN5L,IAAAA,IAAI,EAAE,GAAG;AACTqC,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;;;"}
@@ -386,7 +386,6 @@ var textFieldRoot = function textFieldRoot(Root) {
386
386
  ref: inputForkRef,
387
387
  id: innerId,
388
388
  value: outerValue,
389
- required: required,
390
389
  "aria-labelledby": labelId,
391
390
  "aria-describedby": helperTextId,
392
391
  placeholder: innerPlaceholderValue,
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.js","sources":["../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import React, { forwardRef, useEffect, useRef, useState } from 'react';\nimport type { FormEventHandler, ChangeEventHandler, KeyboardEvent, ChangeEvent, MouseEventHandler } from 'react';\nimport { safeUseId, useForkRef } from '@salutejs/plasma-core';\nimport { css } from '@linaria/core';\n\nimport type { RootProps } from '../../engines';\nimport { cx } from '../../utils';\nimport { useOutsideClick } from '../../hooks';\n\nimport type { ChipValues, TextFieldPrimitiveValue, TextFieldProps, TextFieldRootProps } from './TextField.types';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as clearCSS } from './variations/_clear/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as readOnlyCSS } from './variations/_read-only/base';\nimport { base as labelPlacementCSS } from './variations/_label-placement/base';\nimport { base as hintViewCSS } from './variations/_hint-view/base';\nimport { base as hintSizeCSS } from './variations/_hint-size/base';\nimport {\n Input,\n InputContainer,\n LeftHelper,\n Label,\n InputWrapper,\n InputLabelWrapper,\n StyledContentLeft,\n StyledContentRight,\n StyledChips,\n StyledTextBefore,\n StyledTextAfter,\n StyledIndicator,\n StyledOptionalText,\n InputPlaceholder,\n OuterLabelWrapper,\n TitleCaption,\n StyledHintWrapper,\n StyledIndicatorWrapper,\n} from './TextField.styles';\nimport { classes } from './TextField.tokens';\nimport { TextFieldChip } from './ui';\nimport { useKeyNavigation } from './hooks';\nimport { HintComponent } from './ui/Hint/Hint';\nimport { getInputWidth } from './getInputWidth';\n\nconst optionalText = 'optional';\n\nexport const base = css`\n /* NOTE: Webkit не применяет opacity к inline тегам */\n display: block;\n`;\n\nconst HINT_DEFAULT_OFFSET: [number, number] = [0, 0];\n\nexport const textFieldRoot = (Root: RootProps<HTMLDivElement, TextFieldRootProps>) =>\n forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n id,\n className,\n style,\n\n // layout\n contentLeft,\n contentRight,\n label,\n labelPlacement,\n keepPlaceholder,\n textBefore,\n textAfter,\n placeholder,\n leftHelper,\n enumerationType = 'plain',\n requiredPlacement = 'right',\n titleCaption,\n chipView = 'default',\n chipValidator,\n\n // hint\n hintTrigger = 'hover',\n hintText,\n hintView = 'default',\n hintSize = 'm',\n hintTargetIcon,\n hintPlacement = 'auto',\n hintHasArrow,\n hintOffset = HINT_DEFAULT_OFFSET,\n hintWidth,\n hintContentLeft,\n\n // variations\n view,\n size,\n readOnly = false,\n disabled = false,\n required = false,\n clear = false,\n optional,\n hasDivider,\n\n // controlled\n value: outerValue,\n chips: values,\n chipType = 'default',\n\n // events\n onChange,\n onChangeChips,\n onSearch,\n onKeyDown,\n onFocus,\n onBlur,\n\n ...rest\n },\n ref,\n ) => {\n const contentRef = useRef<HTMLDivElement>(null);\n const inputContainerRef = useRef<HTMLDivElement>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n const inputForkRef = useForkRef(inputRef, ref);\n const chipsRefs = useRef<Array<HTMLButtonElement>>([]);\n\n const controlledRefs = { contentRef, inputRef, chipsRefs };\n\n const [hasValue, setHasValue] = useState(\n Boolean(outerValue) || Boolean(inputRef?.current?.value) || Boolean(rest?.defaultValue),\n );\n const [hasFocus, setHasFocus] = useState(false);\n\n const [chips, setChips] = useState<Array<ChipValues>>([]);\n const [isHintVisible, setIsHintVisible] = useState(false);\n\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n const labelId = safeUseId();\n const helperTextId = safeUseId();\n\n const isDefaultView = view === 'default' || readOnly || disabled;\n\n const isChipEnumeration = enumerationType === 'chip';\n const isChipsVisible = isChipEnumeration && Boolean(chips?.length);\n const withHasChips = isChipsVisible ? classes.hasChips : undefined;\n\n const hasLabelValue = Boolean(label);\n const hasInnerLabel = size !== 'xs' && labelPlacement === 'inner' && !isChipsVisible && hasLabelValue;\n const hasOuterLabel = labelPlacement === 'outer' && hasLabelValue;\n const innerKeepPlaceholder = keepPlaceholder && labelPlacement === 'inner';\n const hasPlaceholder = Boolean(placeholder) && (innerKeepPlaceholder || !hasInnerLabel);\n let hasTextAfter = Boolean(textAfter);\n let hasTextBefore = textBefore && !isChipEnumeration;\n if (labelPlacement === 'inner') {\n if (!hasValue && !hasPlaceholder && !hasFocus) {\n hasTextAfter = false;\n hasTextBefore = false;\n }\n }\n\n const hasPlaceholderPadding = hasInnerLabel && keepPlaceholder && size !== 'xs';\n\n const innerLabelValue = hasInnerLabel || hasOuterLabel ? label : undefined;\n const innerLabelPlacementValue = labelPlacement === 'inner' && !hasInnerLabel ? undefined : labelPlacement;\n\n const innerPlaceholderValue = hasPlaceholder ? placeholder : undefined;\n const placeholderShown = Boolean(innerPlaceholderValue) && !hasValue;\n\n const clearClass = clear ? classes.clear : undefined;\n const hasDividerClass = hasDivider ? classes.hasDivider : undefined;\n const hasHintClass = hintText ? classes.hasHint : undefined;\n const requiredPlacementClass = requiredPlacement === 'right' ? classes.requiredAlignRight : undefined;\n const labelPlacementClass = innerLabelPlacementValue\n ? classes[`${innerLabelPlacementValue}LabelPlacement` as keyof typeof classes]\n : undefined;\n const hasValueClass = hasValue ? classes.hasValue : undefined;\n const keepPlaceholderClass = hasPlaceholder && placeholderShown && classes.keepPlaceholder;\n\n const wrapperWithoutLeftContent =\n !contentLeft && isChipsVisible && chipType === 'default' ? classes.hasEmptyContentLeft : undefined;\n const wrapperWithoutRightContent =\n !contentRight && isChipsVisible && chipType === 'default' ? classes.hasEmptyContentRight : undefined;\n\n const hintRef = useOutsideClick<HTMLDivElement>(() => {\n setIsHintVisible(false);\n });\n const hintInnerRef = useRef<HTMLDivElement>(null);\n const hintForkRef = useForkRef(hintRef, hintInnerRef);\n\n const handleInput: FormEventHandler<HTMLInputElement> = (event) => {\n const { value } = event.target as HTMLInputElement;\n if (hasTextAfter) {\n const textWidth = getInputWidth(event.currentTarget, inputContainerRef.current);\n event.currentTarget.style.width = `${textWidth}px`;\n }\n setHasValue(Boolean(value));\n };\n\n useEffect(() => {\n if (hasTextAfter && inputRef.current) {\n const textWidth = getInputWidth(inputRef.current, inputContainerRef.current);\n inputRef.current.style.width = `${textWidth}px`;\n } else {\n inputRef.current?.style.removeProperty('width');\n }\n }, [hasTextAfter]);\n\n const handleFocus = (event: React.FocusEvent<HTMLInputElement>) => {\n setHasFocus(true);\n onFocus?.(event);\n };\n\n const handleBlur = (event: React.FocusEvent<HTMLInputElement>) => {\n setHasFocus(false);\n onBlur?.(event);\n };\n\n const handleHintShow = () => setIsHintVisible(true);\n const handleHintHide = () => setIsHintVisible(false);\n const handleHintClick: MouseEventHandler = (event) => {\n if (!hintText || hintTrigger !== 'click') {\n return;\n }\n\n event.stopPropagation();\n const targetIsPopover = event.target === hintInnerRef.current;\n const rootHasTarget = hintInnerRef.current?.contains(event.target as Element);\n\n if (!targetIsPopover && !rootHasTarget) {\n setIsHintVisible(true);\n }\n };\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (event) => {\n if (disabled || readOnly) {\n return;\n }\n\n const { maxLength, value } = event.target;\n\n if (maxLength !== -1 && value.length > maxLength) {\n return;\n }\n\n onChange?.(event);\n };\n\n const updateChips = (newChips: Array<ChipValues>, newValues: Array<TextFieldPrimitiveValue>) => {\n setChips(newChips);\n onChangeChips?.(newValues);\n };\n\n const { handleInputKeydown, handleChipKeyDown, onChipClear, handleContentKeyDown } = useKeyNavigation({\n controlledRefs,\n disabled,\n readOnly,\n chips,\n enumerationType,\n updateChips,\n onSearch,\n onChange,\n onEnterDisabled: (rest as any).onEnterDisabled,\n });\n\n const onChipClick = (event: React.MouseEvent<HTMLButtonElement>) => event.stopPropagation();\n\n const handleInputFocus = () => {\n if (readOnly || disabled || !inputRef?.current) {\n return;\n }\n\n inputRef.current.scrollTo({\n top: 0,\n left: inputRef.current.offsetLeft,\n behavior: 'smooth',\n });\n\n inputRef.current.focus();\n };\n\n const getRef = (element: HTMLButtonElement | null, index: number) => {\n if (element && chipsRefs?.current) {\n chipsRefs.current[index] = element;\n }\n };\n\n const handleOnKeyDown = (event: ChangeEvent<HTMLInputElement> & KeyboardEvent<HTMLInputElement>) => {\n handleInputKeydown(event);\n\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n\n useEffect(() => {\n if (!isChipEnumeration && !values?.length) {\n return;\n }\n\n const newChips =\n values?.map((value, index) => ({\n id: `${index}_${value}`,\n text: value,\n })) || [];\n\n setChips(newChips);\n }, [isChipEnumeration, values]);\n\n useEffect(() => {\n setHasValue(Boolean(rest?.defaultValue));\n }, [rest.defaultValue]);\n\n useEffect(() => {\n setHasValue(Boolean(outerValue) || Boolean(inputRef?.current?.value));\n }, [outerValue, inputRef?.current?.value]);\n\n const innerOptional = Boolean(required ? false : optional);\n const hasPlaceholderOptional = innerOptional && !innerLabelValue && !hasOuterLabel;\n const optionalTextNode = innerOptional ? (\n <StyledOptionalText>\n {Boolean(hasPlaceholderOptional ? innerPlaceholderValue : innerLabelValue) && '\\xa0'}\n {optionalText}\n </StyledOptionalText>\n ) : null;\n\n return (\n <Root\n view={view}\n size={size}\n disabled={disabled}\n readOnly={!disabled && readOnly}\n clear={clear}\n labelPlacement={innerLabelPlacementValue}\n chipView={chipView}\n onClick={handleInputFocus}\n className={cx(\n labelPlacementClass,\n clearClass,\n hasDividerClass,\n hasHintClass,\n classes.textFieldGroupItem,\n className,\n )}\n style={style}\n {...(hintText && { hintView, hintSize })}\n >\n {(hasOuterLabel || titleCaption) && (\n <OuterLabelWrapper isInnerLabel={labelPlacement === 'inner'}>\n {hasOuterLabel && (\n <StyledIndicatorWrapper>\n <Label id={labelId} htmlFor={id}>\n {innerLabelValue}\n </Label>\n\n {hintText && (\n <StyledHintWrapper>\n <HintComponent\n ref={hintForkRef}\n hintText={hintText}\n hintTrigger={hintTrigger}\n isHintVisible={isHintVisible}\n hintTargetIcon={hintTargetIcon}\n hintPlacement={hintPlacement}\n hintHasArrow={hintHasArrow}\n hintOffset={hintOffset}\n hintWidth={hintWidth}\n hintContentLeft={hintContentLeft}\n handleHintShow={handleHintShow}\n handleHintHide={handleHintHide}\n handleHintClick={handleHintClick}\n />\n </StyledHintWrapper>\n )}\n {required && (\n <StyledIndicator\n className={cx(\n classes.outerLabelPlacement,\n requiredPlacementClass,\n hasHintClass,\n )}\n />\n )}\n {optionalTextNode}\n </StyledIndicatorWrapper>\n )}\n {titleCaption && <TitleCaption>{titleCaption}</TitleCaption>}\n </OuterLabelWrapper>\n )}\n <InputWrapper\n // Ref для внутреннего использования. Не отдается наружу.\n ref={(rest as any).inputWrapperRef}\n // TODO: #1544, и после убрать classes.inputWrapper\n className={cx(\n withHasChips,\n wrapperWithoutLeftContent,\n wrapperWithoutRightContent,\n classes.inputWrapper,\n )}\n >\n {!hasOuterLabel && (\n <>\n {required && (\n <StyledIndicator\n className={cx(classes.innerLabelPlacement, requiredPlacementClass)}\n />\n )}\n {hintText && (\n <StyledHintWrapper className={classes.innerLabelPlacement}>\n <HintComponent\n ref={hintForkRef}\n hintText={hintText}\n hintTrigger={hintTrigger}\n isHintVisible={isHintVisible}\n hintTargetIcon={hintTargetIcon}\n hintPlacement={hintPlacement}\n hintHasArrow={hintHasArrow}\n hintOffset={hintOffset}\n hintWidth={hintWidth}\n hintContentLeft={hintContentLeft}\n handleHintShow={handleHintShow}\n handleHintHide={handleHintHide}\n handleHintClick={handleHintClick}\n />\n </StyledHintWrapper>\n )}\n </>\n )}\n {contentLeft && (\n <StyledContentLeft isClear={clear} isDefaultView={isDefaultView}>\n {contentLeft}\n </StyledContentLeft>\n )}\n <InputLabelWrapper\n tabIndex={-1}\n ref={contentRef}\n onKeyDown={handleContentKeyDown}\n className={withHasChips}\n >\n {Boolean(textBefore && isChipEnumeration) && (\n <StyledTextBefore>{textBefore}</StyledTextBefore>\n )}\n {isChipEnumeration && Boolean(chips?.length) && (\n <StyledChips className={classes.chipsWrapper}>\n {chips?.map(({ id: chipId, text }, index) => {\n const validationView = chipValidator?.(String(text));\n const resView = validationView?.view || chipView;\n\n return (\n <TextFieldChip\n id={chipId}\n ref={(element) => getRef(element, index)}\n key={`${chipId}_${index}`}\n disabled={disabled}\n readOnly={readOnly}\n value={text}\n text={text}\n onKeyDown={(event) => handleChipKeyDown(event, chipId, index)}\n onClear={() => onChipClear(chipId, index)}\n onClick={onChipClick}\n chipType={chipType}\n view={resView}\n rootWrapper={Root}\n // TODO: #1547\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n _forceChipManipulationWithReadonly={\n // eslint-disable-next-line no-underscore-dangle\n (rest as any)._forceChipManipulationWithReadonly\n }\n />\n );\n })}\n </StyledChips>\n )}\n <InputContainer ref={inputContainerRef} hasDynamicWidth={hasTextAfter}>\n {hasTextBefore && <StyledTextBefore>{textBefore}</StyledTextBefore>}\n <Input\n ref={inputForkRef}\n id={innerId}\n value={outerValue}\n required={required}\n aria-labelledby={labelId}\n aria-describedby={helperTextId}\n placeholder={innerPlaceholderValue}\n className={cx(hasValueClass, keepPlaceholderClass)}\n disabled={disabled}\n readOnly={!disabled && readOnly}\n onInput={handleInput}\n onChange={handleChange}\n onKeyDown={handleOnKeyDown}\n onFocus={handleFocus}\n onBlur={handleBlur}\n {...rest}\n />\n {hasInnerLabel && (\n <Label id={labelId} htmlFor={innerId}>\n {innerLabelValue}\n {optionalTextNode}\n </Label>\n )}\n {placeholderShown && !hasValue && (\n <InputPlaceholder hasPadding={hasPlaceholderPadding}>\n {hasTextBefore && <StyledTextBefore isHidden>{textBefore}</StyledTextBefore>}\n {innerPlaceholderValue}\n {hasPlaceholderOptional && optionalTextNode}\n </InputPlaceholder>\n )}\n {hasTextAfter && <StyledTextAfter>{textAfter}</StyledTextAfter>}\n </InputContainer>\n </InputLabelWrapper>\n {contentRight && <StyledContentRight>{contentRight}</StyledContentRight>}\n </InputWrapper>\n {leftHelper && <LeftHelper id={helperTextId}>{leftHelper}</LeftHelper>}\n </Root>\n );\n },\n );\n\nexport const textFieldConfig = {\n name: 'TextField',\n tag: 'div',\n layout: textFieldRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n clear: {\n css: clearCSS,\n attrs: true,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n readOnly: {\n css: readOnlyCSS,\n attrs: true,\n },\n labelPlacement: {\n css: labelPlacementCSS,\n },\n hintView: {\n css: hintViewCSS,\n },\n hintSize: {\n css: hintSizeCSS,\n },\n },\n defaults: {\n size: 'm',\n view: 'default',\n },\n};\n"],"names":["optionalText","base","HINT_DEFAULT_OFFSET","textFieldRoot","Root","forwardRef","_ref","ref","_inputRef$current","_inputRef$current4","id","className","style","contentLeft","contentRight","label","labelPlacement","keepPlaceholder","textBefore","textAfter","placeholder","leftHelper","_ref$enumerationType","enumerationType","_ref$requiredPlacemen","requiredPlacement","titleCaption","_ref$chipView","chipView","chipValidator","_ref$hintTrigger","hintTrigger","hintText","_ref$hintView","hintView","_ref$hintSize","hintSize","hintTargetIcon","_ref$hintPlacement","hintPlacement","hintHasArrow","_ref$hintOffset","hintOffset","hintWidth","hintContentLeft","view","size","_ref$readOnly","readOnly","_ref$disabled","disabled","_ref$required","required","_ref$clear","clear","optional","hasDivider","outerValue","value","values","chips","_ref$chipType","chipType","onChange","onChangeChips","onSearch","onKeyDown","onFocus","onBlur","rest","contentRef","useRef","inputContainerRef","inputRef","inputForkRef","useForkRef","chipsRefs","controlledRefs","_useState","useState","Boolean","current","defaultValue","_useState2","_slicedToArray","hasValue","setHasValue","_useState3","_useState4","hasFocus","setHasFocus","_useState5","_useState6","setChips","_useState7","_useState8","isHintVisible","setIsHintVisible","uniqId","safeUseId","innerId","labelId","helperTextId","isDefaultView","isChipEnumeration","isChipsVisible","length","withHasChips","classes","hasChips","undefined","hasLabelValue","hasInnerLabel","hasOuterLabel","innerKeepPlaceholder","hasPlaceholder","hasTextAfter","hasTextBefore","hasPlaceholderPadding","innerLabelValue","innerLabelPlacementValue","innerPlaceholderValue","placeholderShown","clearClass","hasDividerClass","hasHintClass","hasHint","requiredPlacementClass","requiredAlignRight","labelPlacementClass","concat","hasValueClass","keepPlaceholderClass","wrapperWithoutLeftContent","hasEmptyContentLeft","wrapperWithoutRightContent","hasEmptyContentRight","hintRef","useOutsideClick","hintInnerRef","hintForkRef","handleInput","event","_ref2","target","textWidth","getInputWidth","currentTarget","width","useEffect","_inputRef$current2","removeProperty","handleFocus","handleBlur","handleHintShow","handleHintHide","handleHintClick","_hintInnerRef$current","stopPropagation","targetIsPopover","rootHasTarget","contains","handleChange","_event$target","maxLength","updateChips","newChips","newValues","_useKeyNavigation","useKeyNavigation","onEnterDisabled","handleInputKeydown","handleChipKeyDown","onChipClear","handleContentKeyDown","onChipClick","handleInputFocus","scrollTo","top","left","offsetLeft","behavior","focus","getRef","element","index","handleOnKeyDown","map","text","_inputRef$current3","innerOptional","hasPlaceholderOptional","optionalTextNode","React","createElement","StyledOptionalText","_extends","onClick","cx","textFieldGroupItem","OuterLabelWrapper","isInnerLabel","StyledIndicatorWrapper","Label","htmlFor","StyledHintWrapper","HintComponent","StyledIndicator","outerLabelPlacement","TitleCaption","InputWrapper","inputWrapperRef","inputWrapper","Fragment","innerLabelPlacement","StyledContentLeft","isClear","InputLabelWrapper","tabIndex","StyledTextBefore","StyledChips","chipsWrapper","_ref3","chipId","validationView","String","resView","TextFieldChip","key","onClear","rootWrapper","_forceChipManipulationWithReadonly","InputContainer","hasDynamicWidth","Input","onInput","InputPlaceholder","hasPadding","isHidden","StyledTextAfter","StyledContentRight","LeftHelper","textFieldConfig","name","tag","layout","variations","css","viewCSS","sizeCSS","clearCSS","attrs","disabledCSS","readOnlyCSS","labelPlacementCSS","hintViewCSS","hintSizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,IAAMA,YAAY,GAAG,UAAU,CAAA;AAExB,IAAMC,IAAI,GAGhB,UAAA;AAED,IAAMC,mBAAqC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAEvCC,aAAa,GAAGA,SAAhBA,aAAaA,CAAIC,IAAmD,EAAA;AAAA,EAAA,oBAC7EC,gBAAU,CACN,UAAAC,IAAA,EA2DIC,GAAG,EACF;IAAA,IAAAC,iBAAA,EAAAC,kBAAA,CAAA;AAAA,IAAA,IA1DGC,EAAE,GAAAJ,IAAA,CAAFI,EAAE;MACFC,SAAS,GAAAL,IAAA,CAATK,SAAS;MACTC,KAAK,GAAAN,IAAA,CAALM,KAAK;MAGLC,WAAW,GAAAP,IAAA,CAAXO,WAAW;MACXC,YAAY,GAAAR,IAAA,CAAZQ,YAAY;MACZC,KAAK,GAAAT,IAAA,CAALS,KAAK;MACLC,c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A,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;;;"}
1
+ {"version":3,"file":"TextField.js","sources":["../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import React, { forwardRef, useEffect, useRef, useState } from 'react';\nimport type { FormEventHandler, ChangeEventHandler, KeyboardEvent, ChangeEvent, MouseEventHandler } from 'react';\nimport { safeUseId, useForkRef } from '@salutejs/plasma-core';\nimport { css } from '@linaria/core';\n\nimport type { RootProps } from '../../engines';\nimport { cx } from '../../utils';\nimport { useOutsideClick } from '../../hooks';\n\nimport type { ChipValues, TextFieldPrimitiveValue, TextFieldProps, TextFieldRootProps } from './TextField.types';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as clearCSS } from './variations/_clear/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as readOnlyCSS } from './variations/_read-only/base';\nimport { base as labelPlacementCSS } from './variations/_label-placement/base';\nimport { base as hintViewCSS } from './variations/_hint-view/base';\nimport { base as hintSizeCSS } from './variations/_hint-size/base';\nimport {\n Input,\n InputContainer,\n LeftHelper,\n Label,\n InputWrapper,\n InputLabelWrapper,\n StyledContentLeft,\n StyledContentRight,\n StyledChips,\n StyledTextBefore,\n StyledTextAfter,\n StyledIndicator,\n StyledOptionalText,\n InputPlaceholder,\n OuterLabelWrapper,\n TitleCaption,\n StyledHintWrapper,\n StyledIndicatorWrapper,\n} from './TextField.styles';\nimport { classes } from './TextField.tokens';\nimport { TextFieldChip } from './ui';\nimport { useKeyNavigation } from './hooks';\nimport { HintComponent } from './ui/Hint/Hint';\nimport { getInputWidth } from './getInputWidth';\n\nconst optionalText = 'optional';\n\nexport const base = css`\n /* NOTE: Webkit не применяет opacity к inline тегам */\n display: block;\n`;\n\nconst HINT_DEFAULT_OFFSET: [number, number] = [0, 0];\n\nexport const textFieldRoot = (Root: RootProps<HTMLDivElement, TextFieldRootProps>) =>\n forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n id,\n className,\n style,\n\n // layout\n contentLeft,\n contentRight,\n label,\n labelPlacement,\n keepPlaceholder,\n textBefore,\n textAfter,\n placeholder,\n leftHelper,\n enumerationType = 'plain',\n requiredPlacement = 'right',\n titleCaption,\n chipView = 'default',\n chipValidator,\n\n // hint\n hintTrigger = 'hover',\n hintText,\n hintView = 'default',\n hintSize = 'm',\n hintTargetIcon,\n hintPlacement = 'auto',\n hintHasArrow,\n hintOffset = HINT_DEFAULT_OFFSET,\n hintWidth,\n hintContentLeft,\n\n // variations\n view,\n size,\n readOnly = false,\n disabled = false,\n required = false,\n clear = false,\n optional,\n hasDivider,\n\n // controlled\n value: outerValue,\n chips: values,\n chipType = 'default',\n\n // events\n onChange,\n onChangeChips,\n onSearch,\n onKeyDown,\n onFocus,\n onBlur,\n\n ...rest\n },\n ref,\n ) => {\n const contentRef = useRef<HTMLDivElement>(null);\n const inputContainerRef = useRef<HTMLDivElement>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n const inputForkRef = useForkRef(inputRef, ref);\n const chipsRefs = useRef<Array<HTMLButtonElement>>([]);\n\n const controlledRefs = { contentRef, inputRef, chipsRefs };\n\n const [hasValue, setHasValue] = useState(\n Boolean(outerValue) || Boolean(inputRef?.current?.value) || Boolean(rest?.defaultValue),\n );\n const [hasFocus, setHasFocus] = useState(false);\n\n const [chips, setChips] = useState<Array<ChipValues>>([]);\n const [isHintVisible, setIsHintVisible] = useState(false);\n\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n const labelId = safeUseId();\n const helperTextId = safeUseId();\n\n const isDefaultView = view === 'default' || readOnly || disabled;\n\n const isChipEnumeration = enumerationType === 'chip';\n const isChipsVisible = isChipEnumeration && Boolean(chips?.length);\n const withHasChips = isChipsVisible ? classes.hasChips : undefined;\n\n const hasLabelValue = Boolean(label);\n const hasInnerLabel = size !== 'xs' && labelPlacement === 'inner' && !isChipsVisible && hasLabelValue;\n const hasOuterLabel = labelPlacement === 'outer' && hasLabelValue;\n const innerKeepPlaceholder = keepPlaceholder && labelPlacement === 'inner';\n const hasPlaceholder = Boolean(placeholder) && (innerKeepPlaceholder || !hasInnerLabel);\n let hasTextAfter = Boolean(textAfter);\n let hasTextBefore = textBefore && !isChipEnumeration;\n if (labelPlacement === 'inner') {\n if (!hasValue && !hasPlaceholder && !hasFocus) {\n hasTextAfter = false;\n hasTextBefore = false;\n }\n }\n\n const hasPlaceholderPadding = hasInnerLabel && keepPlaceholder && size !== 'xs';\n\n const innerLabelValue = hasInnerLabel || hasOuterLabel ? label : undefined;\n const innerLabelPlacementValue = labelPlacement === 'inner' && !hasInnerLabel ? undefined : labelPlacement;\n\n const innerPlaceholderValue = hasPlaceholder ? placeholder : undefined;\n const placeholderShown = Boolean(innerPlaceholderValue) && !hasValue;\n\n const clearClass = clear ? classes.clear : undefined;\n const hasDividerClass = hasDivider ? classes.hasDivider : undefined;\n const hasHintClass = hintText ? classes.hasHint : undefined;\n const requiredPlacementClass = requiredPlacement === 'right' ? classes.requiredAlignRight : undefined;\n const labelPlacementClass = innerLabelPlacementValue\n ? classes[`${innerLabelPlacementValue}LabelPlacement` as keyof typeof classes]\n : undefined;\n const hasValueClass = hasValue ? classes.hasValue : undefined;\n const keepPlaceholderClass = hasPlaceholder && placeholderShown && classes.keepPlaceholder;\n\n const wrapperWithoutLeftContent =\n !contentLeft && isChipsVisible && chipType === 'default' ? classes.hasEmptyContentLeft : undefined;\n const wrapperWithoutRightContent =\n !contentRight && isChipsVisible && chipType === 'default' ? classes.hasEmptyContentRight : undefined;\n\n const hintRef = useOutsideClick<HTMLDivElement>(() => {\n setIsHintVisible(false);\n });\n const hintInnerRef = useRef<HTMLDivElement>(null);\n const hintForkRef = useForkRef(hintRef, hintInnerRef);\n\n const handleInput: FormEventHandler<HTMLInputElement> = (event) => {\n const { value } = event.target as HTMLInputElement;\n if (hasTextAfter) {\n const textWidth = getInputWidth(event.currentTarget, inputContainerRef.current);\n event.currentTarget.style.width = `${textWidth}px`;\n }\n setHasValue(Boolean(value));\n };\n\n useEffect(() => {\n if (hasTextAfter && inputRef.current) {\n const textWidth = getInputWidth(inputRef.current, inputContainerRef.current);\n inputRef.current.style.width = `${textWidth}px`;\n } else {\n inputRef.current?.style.removeProperty('width');\n }\n }, [hasTextAfter]);\n\n const handleFocus = (event: React.FocusEvent<HTMLInputElement>) => {\n setHasFocus(true);\n onFocus?.(event);\n };\n\n const handleBlur = (event: React.FocusEvent<HTMLInputElement>) => {\n setHasFocus(false);\n onBlur?.(event);\n };\n\n const handleHintShow = () => setIsHintVisible(true);\n const handleHintHide = () => setIsHintVisible(false);\n const handleHintClick: MouseEventHandler = (event) => {\n if (!hintText || hintTrigger !== 'click') {\n return;\n }\n\n event.stopPropagation();\n const targetIsPopover = event.target === hintInnerRef.current;\n const rootHasTarget = hintInnerRef.current?.contains(event.target as Element);\n\n if (!targetIsPopover && !rootHasTarget) {\n setIsHintVisible(true);\n }\n };\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (event) => {\n if (disabled || readOnly) {\n return;\n }\n\n const { maxLength, value } = event.target;\n\n if (maxLength !== -1 && value.length > maxLength) {\n return;\n }\n\n onChange?.(event);\n };\n\n const updateChips = (newChips: Array<ChipValues>, newValues: Array<TextFieldPrimitiveValue>) => {\n setChips(newChips);\n onChangeChips?.(newValues);\n };\n\n const { handleInputKeydown, handleChipKeyDown, onChipClear, handleContentKeyDown } = useKeyNavigation({\n controlledRefs,\n disabled,\n readOnly,\n chips,\n enumerationType,\n updateChips,\n onSearch,\n onChange,\n onEnterDisabled: (rest as any).onEnterDisabled,\n });\n\n const onChipClick = (event: React.MouseEvent<HTMLButtonElement>) => event.stopPropagation();\n\n const handleInputFocus = () => {\n if (readOnly || disabled || !inputRef?.current) {\n return;\n }\n\n inputRef.current.scrollTo({\n top: 0,\n left: inputRef.current.offsetLeft,\n behavior: 'smooth',\n });\n\n inputRef.current.focus();\n };\n\n const getRef = (element: HTMLButtonElement | null, index: number) => {\n if (element && chipsRefs?.current) {\n chipsRefs.current[index] = element;\n }\n };\n\n const handleOnKeyDown = (event: ChangeEvent<HTMLInputElement> & KeyboardEvent<HTMLInputElement>) => {\n handleInputKeydown(event);\n\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n\n useEffect(() => {\n if (!isChipEnumeration && !values?.length) {\n return;\n }\n\n const newChips =\n values?.map((value, index) => ({\n id: `${index}_${value}`,\n text: value,\n })) || [];\n\n setChips(newChips);\n }, [isChipEnumeration, values]);\n\n useEffect(() => {\n setHasValue(Boolean(rest?.defaultValue));\n }, [rest.defaultValue]);\n\n useEffect(() => {\n setHasValue(Boolean(outerValue) || Boolean(inputRef?.current?.value));\n }, [outerValue, inputRef?.current?.value]);\n\n const innerOptional = Boolean(required ? false : optional);\n const hasPlaceholderOptional = innerOptional && !innerLabelValue && !hasOuterLabel;\n const optionalTextNode = innerOptional ? (\n <StyledOptionalText>\n {Boolean(hasPlaceholderOptional ? innerPlaceholderValue : innerLabelValue) && '\\xa0'}\n {optionalText}\n </StyledOptionalText>\n ) : null;\n\n return (\n <Root\n view={view}\n size={size}\n disabled={disabled}\n readOnly={!disabled && readOnly}\n clear={clear}\n labelPlacement={innerLabelPlacementValue}\n chipView={chipView}\n onClick={handleInputFocus}\n className={cx(\n labelPlacementClass,\n clearClass,\n hasDividerClass,\n hasHintClass,\n classes.textFieldGroupItem,\n className,\n )}\n style={style}\n {...(hintText && { hintView, hintSize })}\n >\n {(hasOuterLabel || titleCaption) && (\n <OuterLabelWrapper isInnerLabel={labelPlacement === 'inner'}>\n {hasOuterLabel && (\n <StyledIndicatorWrapper>\n <Label id={labelId} htmlFor={id}>\n {innerLabelValue}\n </Label>\n\n {hintText && (\n <StyledHintWrapper>\n <HintComponent\n ref={hintForkRef}\n hintText={hintText}\n hintTrigger={hintTrigger}\n isHintVisible={isHintVisible}\n hintTargetIcon={hintTargetIcon}\n hintPlacement={hintPlacement}\n hintHasArrow={hintHasArrow}\n hintOffset={hintOffset}\n hintWidth={hintWidth}\n hintContentLeft={hintContentLeft}\n handleHintShow={handleHintShow}\n handleHintHide={handleHintHide}\n handleHintClick={handleHintClick}\n />\n </StyledHintWrapper>\n )}\n {required && (\n <StyledIndicator\n className={cx(\n classes.outerLabelPlacement,\n requiredPlacementClass,\n hasHintClass,\n )}\n />\n )}\n {optionalTextNode}\n </StyledIndicatorWrapper>\n )}\n {titleCaption && <TitleCaption>{titleCaption}</TitleCaption>}\n </OuterLabelWrapper>\n )}\n <InputWrapper\n // Ref для внутреннего использования. Не отдается наружу.\n ref={(rest as any).inputWrapperRef}\n // TODO: #1544, и после убрать classes.inputWrapper\n className={cx(\n withHasChips,\n wrapperWithoutLeftContent,\n wrapperWithoutRightContent,\n classes.inputWrapper,\n )}\n >\n {!hasOuterLabel && (\n <>\n {required && (\n <StyledIndicator\n className={cx(classes.innerLabelPlacement, requiredPlacementClass)}\n />\n )}\n {hintText && (\n <StyledHintWrapper className={classes.innerLabelPlacement}>\n <HintComponent\n ref={hintForkRef}\n hintText={hintText}\n hintTrigger={hintTrigger}\n isHintVisible={isHintVisible}\n hintTargetIcon={hintTargetIcon}\n hintPlacement={hintPlacement}\n hintHasArrow={hintHasArrow}\n hintOffset={hintOffset}\n hintWidth={hintWidth}\n hintContentLeft={hintContentLeft}\n handleHintShow={handleHintShow}\n handleHintHide={handleHintHide}\n handleHintClick={handleHintClick}\n />\n </StyledHintWrapper>\n )}\n </>\n )}\n {contentLeft && (\n <StyledContentLeft isClear={clear} isDefaultView={isDefaultView}>\n {contentLeft}\n </StyledContentLeft>\n )}\n <InputLabelWrapper\n tabIndex={-1}\n ref={contentRef}\n onKeyDown={handleContentKeyDown}\n className={withHasChips}\n >\n {Boolean(textBefore && isChipEnumeration) && (\n <StyledTextBefore>{textBefore}</StyledTextBefore>\n )}\n {isChipEnumeration && Boolean(chips?.length) && (\n <StyledChips className={classes.chipsWrapper}>\n {chips?.map(({ id: chipId, text }, index) => {\n const validationView = chipValidator?.(String(text));\n const resView = validationView?.view || chipView;\n\n return (\n <TextFieldChip\n id={chipId}\n ref={(element) => getRef(element, index)}\n key={`${chipId}_${index}`}\n disabled={disabled}\n readOnly={readOnly}\n value={text}\n text={text}\n onKeyDown={(event) => handleChipKeyDown(event, chipId, index)}\n onClear={() => onChipClear(chipId, index)}\n onClick={onChipClick}\n chipType={chipType}\n view={resView}\n rootWrapper={Root}\n // TODO: #1547\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n _forceChipManipulationWithReadonly={\n // eslint-disable-next-line no-underscore-dangle\n (rest as any)._forceChipManipulationWithReadonly\n }\n />\n );\n })}\n </StyledChips>\n )}\n <InputContainer ref={inputContainerRef} hasDynamicWidth={hasTextAfter}>\n {hasTextBefore && <StyledTextBefore>{textBefore}</StyledTextBefore>}\n <Input\n ref={inputForkRef}\n id={innerId}\n value={outerValue}\n aria-labelledby={labelId}\n aria-describedby={helperTextId}\n placeholder={innerPlaceholderValue}\n className={cx(hasValueClass, keepPlaceholderClass)}\n disabled={disabled}\n readOnly={!disabled && readOnly}\n onInput={handleInput}\n onChange={handleChange}\n onKeyDown={handleOnKeyDown}\n onFocus={handleFocus}\n onBlur={handleBlur}\n {...rest}\n />\n {hasInnerLabel && (\n <Label id={labelId} htmlFor={innerId}>\n {innerLabelValue}\n {optionalTextNode}\n </Label>\n )}\n {placeholderShown && !hasValue && (\n <InputPlaceholder hasPadding={hasPlaceholderPadding}>\n {hasTextBefore && <StyledTextBefore isHidden>{textBefore}</StyledTextBefore>}\n {innerPlaceholderValue}\n {hasPlaceholderOptional && optionalTextNode}\n </InputPlaceholder>\n )}\n {hasTextAfter && <StyledTextAfter>{textAfter}</StyledTextAfter>}\n </InputContainer>\n </InputLabelWrapper>\n {contentRight && <StyledContentRight>{contentRight}</StyledContentRight>}\n </InputWrapper>\n {leftHelper && <LeftHelper id={helperTextId}>{leftHelper}</LeftHelper>}\n </Root>\n );\n },\n );\n\nexport const textFieldConfig = {\n name: 'TextField',\n tag: 'div',\n layout: textFieldRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n clear: {\n css: clearCSS,\n attrs: true,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n readOnly: {\n css: readOnlyCSS,\n attrs: true,\n },\n labelPlacement: {\n css: labelPlacementCSS,\n },\n hintView: {\n css: hintViewCSS,\n },\n hintSize: {\n css: hintSizeCSS,\n },\n },\n defaults: {\n size: 'm',\n view: 'default',\n },\n};\n"],"names":["optionalText","base","HINT_DEFAULT_OFFSET","textFieldRoot","Root","forwardRef","_ref","ref","_inputRef$current","_inputRef$current4","id","className","style","contentLeft","contentRight","label","labelPlacement","keepPlaceholder","textBefore","textAfter","placeholder","leftHelper","_ref$enumerationType","enumerationType","_ref$requiredPlacemen","requiredPlacement","titleCaption","_ref$chipView","chipView","chipValidator","_ref$hintTrigger","hintTrigger","hintText","_ref$hintView","hintView","_ref$hintSize","hintSize","hintTargetIcon","_ref$hintPlacement","hintPlacement","hintHasArrow","_ref$hintOffset","hintOffset","hintWidth","hintContentLeft","view","size","_ref$readOnly","readOnly","_ref$disabled","disabled","_ref$required","required","_ref$clear","clear","optional","hasDivider","outerValue","value","values","chips","_ref$chipType","chipType","onChange","onChangeChips","onSearch","onKeyDown","onFocus","onBlur","rest","contentRef","useRef","inputContainerRef","inputRef","inputForkRef","useForkRef","chipsRefs","controlledRefs","_useState","useState","Boolean","current","defaultValue","_useState2","_slicedToArray","hasValue","setHasValue","_useState3","_useState4","hasFocus","setHasFocus","_useState5","_useState6","setChips","_useState7","_useState8","isHintVisible","setIsHintVisible","uniqId","safeUseId","innerId","labelId","helperTextId","isDefaultView","isChipEnumeration","isChipsVisible","length","withHasChips","classes","hasChips","undefined","hasLabelValue","hasInnerLabel","hasOuterLabel","innerKeepPlaceholder","hasPlaceholder","hasTextAfter","hasTextBefore","hasPlaceholderPadding","innerLabelValue","innerLabelPlacementValue","innerPlaceholderValue","placeholderShown","clearClass","hasDividerClass","hasHintClass","hasHint","requiredPlacementClass","requiredAlignRight","labelPlacementClass","concat","hasValueClass","keepPlaceholderClass","wrapperWithoutLeftContent","hasEmptyContentLeft","wrapperWithoutRightContent","hasEmptyContentRight","hintRef","useOutsideClick","hintInnerRef","hintForkRef","handleInput","event","_ref2","target","textWidth","getInputWidth","currentTarget","width","useEffect","_inputRef$current2","removeProperty","handleFocus","handleBlur","handleHintShow","handleHintHide","handleHintClick","_hintInnerRef$current","stopPropagation","targetIsPopover","rootHasTarget","contains","handleChange","_event$target","maxLength","updateChips","newChips","newValues","_useKeyNavigation","useKeyNavigation","onEnterDisabled","handleInputKeydown","handleChipKeyDown","onChipClear","handleContentKeyDown","onChipClick","handleInputFocus","scrollTo","top","left","offsetLeft","behavior","focus","getRef","element","index","handleOnKeyDown","map","text","_inputRef$current3","innerOptional","hasPlaceholderOptional","optionalTextNode","React","createElement","StyledOptionalText","_extends","onClick","cx","textFieldGroupItem","OuterLabelWrapper","isInnerLabel","StyledIndicatorWrapper","Label","htmlFor","StyledHintWrapper","HintComponent","StyledIndicator","outerLabelPlacement","TitleCaption","InputWrapper","inputWrapperRef","inputWrapper","Fragment","innerLabelPlacement","StyledContentLeft","isClear","InputLabelWrapper","tabIndex","StyledTextBefore","StyledChips","chipsWrapper","_ref3","chipId","validationView","String","resView","TextFieldChip","key","onClear","rootWrapper","_forceChipManipulationWithReadonly","InputContainer","hasDynamicWidth","Input","onInput","InputPlaceholder","hasPadding","isHidden","StyledTextAfter","StyledContentRight","LeftHelper","textFieldConfig","name","tag","layout","variations","css","viewCSS","sizeCSS","clearCSS","attrs","disabledCSS","readOnlyCSS","labelPlacementCSS","hintViewCSS","hintSizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,IAAMA,YAAY,GAAG,UAAU,CAAA;AAExB,IAAMC,IAAI,GAGhB,UAAA;AAED,IAAMC,mBAAqC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAEvCC,aAAa,GAAGA,SAAhBA,aAAaA,CAAIC,IAAm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,EAAEM,WAAW;AAChBF,MAAAA,KAAK,EAAE,IAAA;KACV;AACD3O,IAAAA,cAAc,EAAE;AACZuO,MAAAA,GAAG,EAAEO,WAAAA;KACR;AACD5N,IAAAA,QAAQ,EAAE;AACNqN,MAAAA,GAAG,EAAEQ,WAAAA;KACR;AACD3N,IAAAA,QAAQ,EAAE;AACNmN,MAAAA,GAAG,EAAES,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNnN,IAAAA,IAAI,EAAE,GAAG;AACTD,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;;;"}
@@ -6,40 +6,6 @@ var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.j
6
6
  var React = require('react');
7
7
  var linaria = require('./linaria.js');
8
8
 
9
- //
10
- // Тип HTMLAttributesOmitOnChange требуется чтобы использовать компонент с кастомным пропсом onChange
11
- //
12
-
13
- var getStaticVariants = function getStaticVariants(config) {
14
- if (!config.variations) {
15
- return [];
16
- }
17
- var res = [];
18
- var variations = config.variations;
19
-
20
- // eslint-disable-next-line guard-for-in
21
- for (var key in variations) {
22
- var css = variations[key].css;
23
- css && res.push(css);
24
- }
25
- return res;
26
- };
27
- var getDynamicVariants = function getDynamicVariants(config) {
28
- return function (props) {
29
- var res = [];
30
-
31
- // eslint-disable-next-line guard-for-in
32
- for (var key in config.variations) {
33
- if (key in props) {
34
- var variant = config.variations[key];
35
- var css = variant[props[key]];
36
- // no css for { modifier: true }
37
- css && Array.isArray(css) ? res.push.apply(res, _rollupPluginBabelHelpers.toConsumableArray(css)) : res.push(css);
38
- }
39
- }
40
- return res;
41
- };
42
- };
43
9
  var mergeConfig = function mergeConfig(baseConfig, userConfig) {
44
10
  var res = _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, baseConfig), userConfig);
45
11
  if (res.variations) {
@@ -77,7 +43,5 @@ function component(config) {
77
43
  }
78
44
 
79
45
  exports.component = component;
80
- exports.getDynamicVariants = getDynamicVariants;
81
- exports.getStaticVariants = getStaticVariants;
82
46
  exports.mergeConfig = mergeConfig;
83
47
  //# sourceMappingURL=common.js.map