@consta/uikit 5.0.1 → 5.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (298) hide show
  1. package/__internal__/src/components/Badge/Badge.js +1 -1
  2. package/__internal__/src/components/Badge/Badge.js.map +1 -1
  3. package/__internal__/src/components/Checkbox/Checkbox.js +1 -1
  4. package/__internal__/src/components/Checkbox/Checkbox.js.map +1 -1
  5. package/__internal__/src/components/EventInterceptor/propsHandlers/useCheckboxEventsHandler.js +1 -1
  6. package/__internal__/src/components/EventInterceptor/propsHandlers/useCheckboxEventsHandler.js.map +1 -1
  7. package/__internal__/src/components/Radio/Radio.js +1 -1
  8. package/__internal__/src/components/Radio/Radio.js.map +1 -1
  9. package/__internal__/src/components/SelectComponents/Select.css +1 -1
  10. package/__internal__/src/components/SelectComponents/SelectItem/SelectItem.js +1 -1
  11. package/__internal__/src/components/SelectComponents/SelectItem/SelectItem.js.map +1 -1
  12. package/__internal__/src/components/SelectComponentsDeprecated/SelectCreateButton/SelectCreateButton.js +1 -1
  13. package/__internal__/src/components/SelectComponentsDeprecated/SelectCreateButton/SelectCreateButton.js.map +1 -1
  14. package/__internal__/src/components/SelectComponentsDeprecated/SelectDropdown/SelectDropdown.js +1 -1
  15. package/__internal__/src/components/SelectComponentsDeprecated/SelectDropdown/SelectDropdown.js.map +1 -1
  16. package/__internal__/src/components/SelectComponentsDeprecated/SelectItem/SelectItem.js +1 -1
  17. package/__internal__/src/components/SelectComponentsDeprecated/SelectItem/SelectItem.js.map +1 -1
  18. package/__internal__/src/components/SelectComponentsDeprecated/SelectItemAll/SelectSelectAll.js +1 -1
  19. package/__internal__/src/components/SelectComponentsDeprecated/SelectItemAll/SelectSelectAll.js.map +1 -1
  20. package/__internal__/src/components/SelectComponentsDeprecated/SelectLoader/SelectLoader.js +1 -1
  21. package/__internal__/src/components/SelectComponentsDeprecated/SelectLoader/SelectLoader.js.map +1 -1
  22. package/__internal__/src/components/SelectComponentsDeprecated/SelectValueTag/SelectValueTag.js +1 -1
  23. package/__internal__/src/components/SelectComponentsDeprecated/SelectValueTag/SelectValueTag.js.map +1 -1
  24. package/__internal__/src/components/Switch/Switch.js +1 -1
  25. package/__internal__/src/components/Switch/Switch.js.map +1 -1
  26. package/__internal__/src/components/Switch/types.d.ts +1 -0
  27. package/__internal__/src/components/Switch/types.js +1 -1
  28. package/__internal__/src/components/Switch/types.js.map +1 -1
  29. package/__internal__/src/components/TextField/TextField.css +1 -1
  30. package/__internal__/src/components/TextField/TextField.js +1 -1
  31. package/__internal__/src/components/TextField/TextField.js.map +1 -1
  32. package/__internal__/src/components/TextField/helpers.d.ts +2 -1
  33. package/__internal__/src/components/TextField/helpers.js +1 -1
  34. package/__internal__/src/components/TextField/helpers.js.map +1 -1
  35. package/__internal__/src/components/TextField/types.d.ts +1 -6
  36. package/__internal__/src/components/TextField/types.js.map +1 -1
  37. package/__internal__/src/uiKit/components/ColorPreview/ColorPreview.css +1 -1
  38. package/__internal__/src/uiKit/components/ColorPreview/ColorPreview.js +1 -1
  39. package/__internal__/src/uiKit/components/ColorPreview/ColorPreview.js.map +1 -1
  40. package/__internal__/src/uiKit/components/ThemePreview/ThemePreview.css +1 -1
  41. package/__internal__/src/uiKit/components/ThemePreview/ThemePreview.js +1 -1
  42. package/__internal__/src/uiKit/components/ThemePreview/ThemePreview.js.map +1 -1
  43. package/package.json +2 -2
  44. package/__internal__/src/uiKit/components/ComponentsGrid/ComponentsGrid.css +0 -1
  45. package/__internal__/src/uiKit/components/ComponentsGrid/ComponentsGrid.d.ts +0 -16
  46. package/__internal__/src/uiKit/components/ComponentsGrid/ComponentsGrid.js +0 -2
  47. package/__internal__/src/uiKit/components/ComponentsGrid/ComponentsGrid.js.map +0 -1
  48. package/__internal__/src/uiKit/components/ComponentsGrid/ComponentsGridItem/ComponentsGridItem.css +0 -1
  49. package/__internal__/src/uiKit/components/ComponentsGrid/ComponentsGridItem/ComponentsGridItem.d.ts +0 -11
  50. package/__internal__/src/uiKit/components/ComponentsGrid/ComponentsGridItem/ComponentsGridItem.js +0 -2
  51. package/__internal__/src/uiKit/components/ComponentsGrid/ComponentsGridItem/ComponentsGridItem.js.map +0 -1
  52. package/__internal__/src/uiKit/components/ComponentsGridWithData/ComponentsGridWithData.d.ts +0 -1
  53. package/__internal__/src/uiKit/components/ComponentsGridWithData/ComponentsGridWithData.js +0 -2
  54. package/__internal__/src/uiKit/components/ComponentsGridWithData/ComponentsGridWithData.js.map +0 -1
  55. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/additionalData.d.ts +0 -2
  56. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/additionalData.js +0 -2
  57. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/additionalData.js.map +0 -1
  58. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/data.d.ts +0 -4
  59. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/data.js +0 -2
  60. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/data.js.map +0 -1
  61. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/AttachmentImage.d.ts +0 -3
  62. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/AttachmentImage.js +0 -2
  63. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/AttachmentImage.js.map +0 -1
  64. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/AvatarGroupImage.d.ts +0 -3
  65. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/AvatarGroupImage.js +0 -2
  66. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/AvatarGroupImage.js.map +0 -1
  67. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/AvatarImage.d.ts +0 -3
  68. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/AvatarImage.js +0 -2
  69. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/AvatarImage.js.map +0 -1
  70. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/BadgeImage.d.ts +0 -3
  71. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/BadgeImage.js +0 -2
  72. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/BadgeImage.js.map +0 -1
  73. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/BreadcrumbsImage.d.ts +0 -3
  74. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/BreadcrumbsImage.js +0 -2
  75. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/BreadcrumbsImage.js.map +0 -1
  76. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ButtonImage.d.ts +0 -3
  77. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ButtonImage.js +0 -2
  78. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ButtonImage.js.map +0 -1
  79. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/CardImage.d.ts +0 -3
  80. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/CardImage.js +0 -2
  81. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/CardImage.js.map +0 -1
  82. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/CheckboxGroupImage.d.ts +0 -3
  83. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/CheckboxGroupImage.js +0 -2
  84. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/CheckboxGroupImage.js.map +0 -1
  85. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/CheckboxImage.d.ts +0 -3
  86. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/CheckboxImage.js +0 -2
  87. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/CheckboxImage.js.map +0 -1
  88. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ChoiceGroupImage.d.ts +0 -3
  89. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ChoiceGroupImage.js +0 -2
  90. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ChoiceGroupImage.js.map +0 -1
  91. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/CollapseGroupImage.d.ts +0 -3
  92. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/CollapseGroupImage.js +0 -2
  93. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/CollapseGroupImage.js.map +0 -1
  94. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/CollapseImage.d.ts +0 -3
  95. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/CollapseImage.js +0 -2
  96. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/CollapseImage.js.map +0 -1
  97. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ComboboxImage.d.ts +0 -3
  98. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ComboboxImage.js +0 -2
  99. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ComboboxImage.js.map +0 -1
  100. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ContextMenuImage.d.ts +0 -3
  101. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ContextMenuImage.js +0 -2
  102. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ContextMenuImage.js.map +0 -1
  103. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/DatePickerImage.d.ts +0 -3
  104. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/DatePickerImage.js +0 -2
  105. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/DatePickerImage.js.map +0 -1
  106. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/DateTimeCanaryImage.d.ts +0 -3
  107. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/DateTimeCanaryImage.js +0 -2
  108. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/DateTimeCanaryImage.js.map +0 -1
  109. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/DateTimeImage.d.ts +0 -3
  110. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/DateTimeImage.js +0 -2
  111. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/DateTimeImage.js.map +0 -1
  112. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/DragNDropFieldImage.d.ts +0 -3
  113. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/DragNDropFieldImage.js +0 -2
  114. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/DragNDropFieldImage.js.map +0 -1
  115. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/FieldGroupImage.d.ts +0 -3
  116. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/FieldGroupImage.js +0 -2
  117. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/FieldGroupImage.js.map +0 -1
  118. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/FileFieldImage.d.ts +0 -3
  119. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/FileFieldImage.js +0 -2
  120. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/FileFieldImage.js.map +0 -1
  121. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/FileImage.d.ts +0 -3
  122. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/FileImage.js +0 -2
  123. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/FileImage.js.map +0 -1
  124. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/GridImage.d.ts +0 -3
  125. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/GridImage.js +0 -2
  126. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/GridImage.js.map +0 -1
  127. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/HeaderImage.d.ts +0 -3
  128. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/HeaderImage.js +0 -2
  129. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/HeaderImage.js.map +0 -1
  130. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/InformerImage.d.ts +0 -3
  131. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/InformerImage.js +0 -2
  132. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/InformerImage.js.map +0 -1
  133. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/LayoutImage.d.ts +0 -3
  134. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/LayoutImage.js +0 -2
  135. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/LayoutImage.js.map +0 -1
  136. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/LoaderImage.d.ts +0 -3
  137. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/LoaderImage.js +0 -2
  138. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/LoaderImage.js.map +0 -1
  139. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ModalImage.d.ts +0 -3
  140. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ModalImage.js +0 -2
  141. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ModalImage.js.map +0 -1
  142. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/NoImage.d.ts +0 -3
  143. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/NoImage.js +0 -2
  144. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/NoImage.js.map +0 -1
  145. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/PaginationImage.d.ts +0 -3
  146. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/PaginationImage.js +0 -2
  147. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/PaginationImage.js.map +0 -1
  148. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/PopoverImage.d.ts +0 -3
  149. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/PopoverImage.js +0 -2
  150. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/PopoverImage.js.map +0 -1
  151. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ProgressLineImage.d.ts +0 -3
  152. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ProgressLineImage.js +0 -2
  153. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ProgressLineImage.js.map +0 -1
  154. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ProgressSpinImage.d.ts +0 -3
  155. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ProgressSpinImage.js +0 -2
  156. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ProgressSpinImage.js.map +0 -1
  157. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ProgressStepBarImage.d.ts +0 -3
  158. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ProgressStepBarImage.js +0 -2
  159. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ProgressStepBarImage.js.map +0 -1
  160. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/RadioGroupImage.d.ts +0 -3
  161. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/RadioGroupImage.js +0 -2
  162. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/RadioGroupImage.js.map +0 -1
  163. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/RadioImage.d.ts +0 -3
  164. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/RadioImage.js +0 -2
  165. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/RadioImage.js.map +0 -1
  166. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ResponsesImage.d.ts +0 -3
  167. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ResponsesImage.js +0 -2
  168. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ResponsesImage.js.map +0 -1
  169. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/SelectImage.d.ts +0 -3
  170. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/SelectImage.js +0 -2
  171. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/SelectImage.js.map +0 -1
  172. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/SidebarImage.d.ts +0 -3
  173. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/SidebarImage.js +0 -2
  174. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/SidebarImage.js.map +0 -1
  175. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/SkeletonImage.d.ts +0 -3
  176. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/SkeletonImage.js +0 -2
  177. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/SkeletonImage.js.map +0 -1
  178. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/SliderImage.d.ts +0 -3
  179. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/SliderImage.js +0 -2
  180. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/SliderImage.js.map +0 -1
  181. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/SnackBarImage.d.ts +0 -3
  182. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/SnackBarImage.js +0 -2
  183. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/SnackBarImage.js.map +0 -1
  184. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/StepsImage.d.ts +0 -3
  185. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/StepsImage.js +0 -2
  186. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/StepsImage.js.map +0 -1
  187. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/SwitchGroupImage.d.ts +0 -3
  188. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/SwitchGroupImage.js +0 -2
  189. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/SwitchGroupImage.js.map +0 -1
  190. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/SwitchImage.d.ts +0 -3
  191. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/SwitchImage.js +0 -2
  192. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/SwitchImage.js.map +0 -1
  193. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/TableImage.d.ts +0 -3
  194. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/TableImage.js +0 -2
  195. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/TableImage.js.map +0 -1
  196. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/TabsImage.d.ts +0 -3
  197. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/TabsImage.js +0 -2
  198. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/TabsImage.js.map +0 -1
  199. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/TagImage.d.ts +0 -3
  200. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/TagImage.js +0 -2
  201. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/TagImage.js.map +0 -1
  202. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/TextFieldImage.d.ts +0 -3
  203. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/TextFieldImage.js +0 -2
  204. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/TextFieldImage.js.map +0 -1
  205. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/TextImage.d.ts +0 -3
  206. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/TextImage.js +0 -2
  207. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/TextImage.js.map +0 -1
  208. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ThemeImage.d.ts +0 -3
  209. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ThemeImage.js +0 -2
  210. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ThemeImage.js.map +0 -1
  211. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ThemeTogglerImage.d.ts +0 -3
  212. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ThemeTogglerImage.js +0 -2
  213. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/ThemeTogglerImage.js.map +0 -1
  214. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/TimerImage.d.ts +0 -3
  215. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/TimerImage.js +0 -2
  216. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/TimerImage.js.map +0 -1
  217. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/TooltipImage.d.ts +0 -3
  218. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/TooltipImage.js +0 -2
  219. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/TooltipImage.js.map +0 -1
  220. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/UserImage.d.ts +0 -3
  221. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/UserImage.js +0 -2
  222. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/UserImage.js.map +0 -1
  223. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/UserSelectImage.d.ts +0 -3
  224. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/UserSelectImage.js +0 -2
  225. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/images/UserSelectImage.js.map +0 -1
  226. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/AreaImage.d.ts +0 -3
  227. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/AreaImage.js +0 -2
  228. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/AreaImage.js.map +0 -1
  229. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/BarImage.d.ts +0 -3
  230. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/BarImage.js +0 -2
  231. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/BarImage.js.map +0 -1
  232. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/BulletImage.d.ts +0 -3
  233. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/BulletImage.js +0 -2
  234. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/BulletImage.js.map +0 -1
  235. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/ColumnImage.d.ts +0 -3
  236. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/ColumnImage.js +0 -2
  237. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/ColumnImage.js.map +0 -1
  238. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/DualAxesImage.d.ts +0 -3
  239. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/DualAxesImage.js +0 -2
  240. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/DualAxesImage.js.map +0 -1
  241. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/FeedbackFormImage.d.ts +0 -3
  242. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/FeedbackFormImage.js +0 -2
  243. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/FeedbackFormImage.js.map +0 -1
  244. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/GanttImage.d.ts +0 -3
  245. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/GanttImage.js +0 -2
  246. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/GanttImage.js.map +0 -1
  247. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/GaugeImage.d.ts +0 -3
  248. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/GaugeImage.js +0 -2
  249. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/GaugeImage.js.map +0 -1
  250. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/GpnResponsesImage.d.ts +0 -3
  251. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/GpnResponsesImage.js +0 -2
  252. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/GpnResponsesImage.js.map +0 -1
  253. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/HeaderUmdImage.d.ts +0 -3
  254. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/HeaderUmdImage.js +0 -2
  255. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/HeaderUmdImage.js.map +0 -1
  256. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/HistogramImage.d.ts +0 -3
  257. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/HistogramImage.js +0 -2
  258. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/HistogramImage.js.map +0 -1
  259. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/LineImage.d.ts +0 -3
  260. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/LineImage.js +0 -2
  261. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/LineImage.js.map +0 -1
  262. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/MixPlotImage.d.ts +0 -3
  263. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/MixPlotImage.js +0 -2
  264. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/MixPlotImage.js.map +0 -1
  265. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/PieImage.d.ts +0 -3
  266. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/PieImage.js +0 -2
  267. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/PieImage.js.map +0 -1
  268. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/RadarImage.d.ts +0 -3
  269. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/RadarImage.js +0 -2
  270. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/RadarImage.js.map +0 -1
  271. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/RcTableAdapterImage.d.ts +0 -3
  272. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/RcTableAdapterImage.js +0 -2
  273. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/RcTableAdapterImage.js.map +0 -1
  274. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/RcTreeAdapterImage.d.ts +0 -3
  275. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/RcTreeAdapterImage.js +0 -2
  276. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/RcTreeAdapterImage.js.map +0 -1
  277. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/ReactBigCalendarImage.d.ts +0 -3
  278. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/ReactBigCalendarImage.js +0 -2
  279. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/ReactBigCalendarImage.js.map +0 -1
  280. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/ScatterImage.d.ts +0 -3
  281. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/ScatterImage.js +0 -2
  282. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/ScatterImage.js.map +0 -1
  283. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/StatsImage.d.ts +0 -3
  284. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/StatsImage.js +0 -2
  285. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/StatsImage.js.map +0 -1
  286. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/WaterfallImage.d.ts +0 -3
  287. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/WaterfallImage.js +0 -2
  288. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/imagesForAdditionalData/WaterfallImage.js.map +0 -1
  289. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/index.d.ts +0 -2
  290. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/index.js +0 -2
  291. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/index.js.map +0 -1
  292. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/types.d.ts +0 -13
  293. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/types.js +0 -2
  294. package/__internal__/src/uiKit/components/ComponentsGridWithData/data/types.js.map +0 -1
  295. package/__internal__/src/uiKit/whitepaper/whitepaper.css +0 -1
  296. package/__internal__/src/uiKit/whitepaper/whitepaper.d.ts +0 -7
  297. package/__internal__/src/uiKit/whitepaper/whitepaper.js +0 -2
  298. package/__internal__/src/uiKit/whitepaper/whitepaper.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["switchPropSize","switchPropSizeDefault","switchPropView","switchPropViewDefault","switchPropAlign","switchPropAlignDefault"],"sources":["../../../../../src/components/Switch/types.ts"],"sourcesContent":["import { PropsWithHTMLAttributes } from '##/utils/types/PropsWithHTMLAttributes';\n\nexport const switchPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type SwitchPropSize = typeof switchPropSize[number];\nexport const switchPropSizeDefault: SwitchPropSize = switchPropSize[0];\n\nexport const switchPropView = ['primary', 'ghost'] as const;\nexport type SwitchPropView = typeof switchPropView[number];\nexport const switchPropViewDefault: SwitchPropView = switchPropView[0];\n\nexport const switchPropAlign = ['center', 'top'] as const;\nexport type SwitchPropAlign = typeof switchPropAlign[number];\nexport const switchPropAlignDefault: SwitchPropAlign = switchPropAlign[0];\n\nexport type SwitchPropOnChange = (\n checked: boolean,\n params: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\nexport type SwitchProps = PropsWithHTMLAttributes<\n {\n checked: boolean | undefined;\n size?: SwitchPropSize;\n view?: SwitchPropView;\n align?: SwitchPropAlign;\n disabled?: boolean;\n className?: string;\n label?: string;\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n name?: string;\n onFocus?: React.FocusEventHandler<HTMLInputElement>;\n onBlur?: React.FocusEventHandler<HTMLInputElement>;\n autoFocus?: boolean;\n readOnly?: boolean;\n required?: boolean;\n step?: number | string;\n tabIndex?: number;\n inputRef?: React.Ref<HTMLInputElement>;\n children?: never;\n },\n HTMLLabelElement\n>;\n"],"mappings":"AAEA,MAAO,IAAMA,eAAc,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAAvB,CAEP,MAAO,IAAMC,sBAAqC,CAAGD,cAAc,CAAC,CAAD,CAA5D,CAEP,MAAO,IAAME,eAAc,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAvB,CAEP,MAAO,IAAMC,sBAAqC,CAAGD,cAAc,CAAC,CAAD,CAA5D,CAEP,MAAO,IAAME,gBAAe,CAAG,CAAC,QAAD,CAAW,KAAX,CAAxB,CAEP,MAAO,IAAMC,uBAAuC,CAAGD,eAAe,CAAC,CAAD,CAA/D"}
1
+ {"version":3,"file":"types.js","names":["switchPropSize","switchPropSizeDefault","switchPropView","switchPropViewDefault","switchPropAlign","switchPropAlignDefault","switchPropOnChangeDefault"],"sources":["../../../../../src/components/Switch/types.ts"],"sourcesContent":["import { PropsWithHTMLAttributes } from '##/utils/types/PropsWithHTMLAttributes';\n\nexport const switchPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type SwitchPropSize = typeof switchPropSize[number];\nexport const switchPropSizeDefault: SwitchPropSize = switchPropSize[0];\n\nexport const switchPropView = ['primary', 'ghost'] as const;\nexport type SwitchPropView = typeof switchPropView[number];\nexport const switchPropViewDefault: SwitchPropView = switchPropView[0];\n\nexport const switchPropAlign = ['center', 'top'] as const;\nexport type SwitchPropAlign = typeof switchPropAlign[number];\nexport const switchPropAlignDefault: SwitchPropAlign = switchPropAlign[0];\n\nexport const switchPropOnChangeDefault = () => {};\n\nexport type SwitchPropOnChange = (\n checked: boolean,\n params: {\n e: React.ChangeEvent<HTMLInputElement>;\n },\n) => void;\n\nexport type SwitchProps = PropsWithHTMLAttributes<\n {\n checked: boolean | undefined;\n size?: SwitchPropSize;\n view?: SwitchPropView;\n align?: SwitchPropAlign;\n disabled?: boolean;\n className?: string;\n label?: string;\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n name?: string;\n onFocus?: React.FocusEventHandler<HTMLInputElement>;\n onBlur?: React.FocusEventHandler<HTMLInputElement>;\n autoFocus?: boolean;\n readOnly?: boolean;\n required?: boolean;\n step?: number | string;\n tabIndex?: number;\n inputRef?: React.Ref<HTMLInputElement>;\n children?: never;\n },\n HTMLLabelElement\n>;\n"],"mappings":"AAEA,MAAO,IAAMA,eAAc,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAAvB,CAEP,MAAO,IAAMC,sBAAqC,CAAGD,cAAc,CAAC,CAAD,CAA5D,CAEP,MAAO,IAAME,eAAc,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAvB,CAEP,MAAO,IAAMC,sBAAqC,CAAGD,cAAc,CAAC,CAAD,CAA5D,CAEP,MAAO,IAAME,gBAAe,CAAG,CAAC,QAAD,CAAW,KAAX,CAAxB,CAEP,MAAO,IAAMC,uBAAuC,CAAGD,eAAe,CAAC,CAAD,CAA/D,CAEP,MAAO,IAAME,0BAAyB,CAAG,UAAM,CAAE,CAA1C"}
@@ -1 +1 @@
1
- .TextField{--caption-margin-left:calc(var(--input-space) + var(--control-border-width));--counter-button-icon-color:var(--color-control-typo-ghost);--counter-button-background:transparent;--counter-offset:0;--clear-button-color:var(--color-control-typo-clear);display:inline-flex;position:relative;width:100%}.TextField_size_xs{--label-offset:var(--space-2xs);--caption-offset:var(--space-2xs);--input-height:var(--control-height-xs);--input-font-size:var(--control-text-size-xs);--input-space:calc(var(--control-space-xs)*0.5)}.TextField_size_xs .TextField-InputContainer_form_brickRound,.TextField_size_xs .TextField-InputContainer_form_clearRound,.TextField_size_xs .TextField-InputContainer_form_round{--counter-offset:calc(var(--space-xs) - var(--space-3xs))}.TextField_size_s{--label-offset:var(--space-2xs);--caption-offset:var(--space-2xs);--input-height:var(--control-height-s);--input-font-size:var(--control-text-size-s);--input-space:calc(var(--control-space-s)*0.5)}.TextField_size_s .TextField-InputContainer_form_brickRound,.TextField_size_s .TextField-InputContainer_form_clearRound,.TextField_size_s .TextField-InputContainer_form_round{--counter-offset:var(--space-xs)}.TextField_size_m{--label-offset:var(--space-xs);--caption-offset:var(--space-xs);--input-height:var(--control-height-m);--input-font-size:var(--control-text-size-m);--input-space:calc(var(--control-space-m)*0.5)}.TextField_size_m .TextField-InputContainer_form_brickRound,.TextField_size_m .TextField-InputContainer_form_clearRound,.TextField_size_m .TextField-InputContainer_form_round{--counter-offset:calc(var(--space-s) - var(--space-3xs))}.TextField_size_l{--label-offset:var(--space-xs);--caption-offset:var(--space-xs);--input-height:var(--control-height-l);--input-font-size:var(--control-text-size-l);--input-space:calc(var(--control-space-l)*0.5)}.TextField_size_l .TextField-InputContainer_form_brickRound,.TextField_size_l .TextField-InputContainer_form_clearRound,.TextField_size_l .TextField-InputContainer_form_round{--counter-offset:var(--space-s)}.TextField_labelPosition_top{flex-direction:column}.TextField_labelPosition_top>:not(:last-child){margin-bottom:var(--label-offset)}.TextField_labelPosition_left{flex-direction:row}.TextField_labelPosition_left .TextField-Label{align-items:center;display:inline-flex;height:var(--input-height)}.TextField_labelPosition_left>:not(:last-child){margin-right:var(--space-s)}.TextField-Body{display:inline-flex;flex-direction:column;width:100%}.TextField-Body .TextField-Caption{margin-left:var(--caption-margin-left);margin-top:var(--caption-offset)}.TextField_view_clear .TextField-Caption{--caption-margin-left:0}.TextField-InputContainer{box-sizing:border-box;display:inline-flex;font-family:var(--font-primary);font-weight:var(--font-weight-text-regular);max-width:100%;min-height:var(--input-height);position:relative;transition:border-color .15s,box-shadow .15s,background-color .15s}.TextField-InputContainer_disabled{--counter-button-background:var(--color-control-bg-disable);--counter-button-icon-color:var(--color-control-typo-disable)}.TextField-InputContainer_view_clear,.TextField-InputContainer_view_clear:focus,.TextField-InputContainer_view_clear:hover{color:var(--color-control-typo-default);padding:0}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input{color:var(--color-control-typo-disable);pointer-events:all}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill,.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:focus,.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:hover,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:focus,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:hover,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:focus,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:hover{-webkit-text-fill-color:var(--color-control-typo-disable)}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input::-moz-placeholder,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input::-moz-placeholder,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input::-moz-placeholder{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input::placeholder,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input::placeholder,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input::placeholder{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Side_type_string,.TextField-InputContainer_view_clear.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Side_type_string,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Side_type_string,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Side_type_string,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Side_type_string,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Side_type_string{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled.TextField-InputContainer .TextField-Icon,.TextField-InputContainer_view_clear.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Icon,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled.TextField-InputContainer .TextField-Icon,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Icon,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled.TextField-InputContainer .TextField-Icon,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Icon{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_default{--container-border-color:var(--color-control-bg-border-default);background:var(--color-control-bg-default);border:var(--control-border-width) solid var(--container-border-color);border-radius:var(--control-radius);color:var(--color-control-typo-default);overflow-x:hidden;padding:0 var(--input-space)}.TextField-InputContainer_view_default:hover{border-color:var(--color-control-bg-border-default-hover)}.TextField-InputContainer_view_default.TextField-InputContainer_status_alert{--container-border-color:var(--color-bg-alert)}.TextField-InputContainer_view_default.TextField-InputContainer_status_success{--container-border-color:var(--color-bg-success)}.TextField-InputContainer_view_default.TextField-InputContainer_status_warning{--container-border-color:var(--color-bg-warning)}.TextField-InputContainer_view_default .TextField-Input{color:var(--color-control-typo-default)}.TextField-InputContainer_view_default .TextField-Input::-moz-placeholder{color:var(--color-control-typo-placeholder)}.TextField-InputContainer_view_default .TextField-Input::placeholder{color:var(--color-control-typo-placeholder)}.TextField-InputContainer_view_default .TextField-Input:-webkit-autofill,.TextField-InputContainer_view_default .TextField-Input:-webkit-autofill:focus,.TextField-InputContainer_view_default .TextField-Input:-webkit-autofill:hover{-webkit-text-fill-color:var(--color-control-typo-default)}.TextField-InputContainer_view_default .TextField-Side_type_string{color:var(--color-control-typo-placeholder)}.TextField-InputContainer_view_default.TextField-InputContainer_focus{border-color:var(--color-control-bg-border-focus);outline:none;z-index:1}.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_clearClear{box-shadow:var(--control-border-width) 0 var(--color-control-bg-border-focus),calc(var(--control-border-width)*-1) 0 var(--color-control-bg-border-focus)}.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_brickClear,.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_defaultClear,.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_roundClear{box-shadow:var(--control-border-width) 0 var(--color-control-bg-border-focus)}.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_clearBrick,.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_clearDefault,.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_clearRound{box-shadow:calc(var(--control-border-width)*-1) 0 var(--color-control-bg-border-focus)}.TextField-InputContainer_view_default.TextField-InputContainer_disabled{--clear-button-color:var(--color-control-typo-disable);background:var(--color-control-bg-disable);border-color:var(--color-control-bg-border-disable)}.TextField-InputContainer_view_default.TextField-InputContainer_disabled .TextField-Input{color:var(--color-control-typo-disable);pointer-events:all}.TextField-InputContainer_view_default.TextField-InputContainer_disabled .TextField-Input::-moz-placeholder{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_default.TextField-InputContainer_disabled .TextField-Input::placeholder{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_default.TextField-InputContainer_disabled .TextField-Side_type_string,.TextField-InputContainer_view_default.TextField-InputContainer_disabled.TextField-InputContainer .TextField-Icon,.TextField-InputContainer_view_default.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Icon,.TextField-InputContainer_view_default.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Side_type_string{color:var(--color-control-typo-disable)}.TextField-InputContainer_form_defaultClear{border-right-width:0}.TextField-InputContainer_form_defaultBrick,.TextField-InputContainer_form_defaultClear{border-radius:var(--control-radius) 0 0 var(--control-radius)}.TextField-InputContainer_form_round{border-radius:calc(var(--input-height)/2);padding-left:calc(var(--input-space)*1.6);padding-right:calc(var(--input-space)*1.6)}.TextField-InputContainer_form_roundBrick{border-radius:calc(var(--input-height)/2) 0 0 calc(var(--input-height)/2);padding-left:calc(var(--input-space)*1.6)}.TextField-InputContainer_form_roundClear{border-radius:calc(var(--input-height)/2) 0 0 calc(var(--input-height)/2);border-right-width:0;padding-left:calc(var(--input-space)*1.6)}.TextField-InputContainer_form_brick{border-radius:0}.TextField-InputContainer_form_brickDefault{border-radius:0 var(--control-radius) var(--control-radius) 0}.TextField-InputContainer_form_brickRound{border-radius:0 calc(var(--input-height)/2) calc(var(--input-height)/2) 0;padding-right:calc(var(--input-space)*1.6)}.TextField-InputContainer_form_brickClear{border-radius:0;border-right-width:0}.TextField-InputContainer_form_clearDefault{border-left-width:0;border-radius:0 var(--control-radius) var(--control-radius) 0}.TextField-InputContainer_form_clearBrick{border-left-width:0;border-radius:0}.TextField-InputContainer_form_clearRound{border-left-width:0;border-radius:0 calc(var(--input-height)/2) calc(var(--input-height)/2) 0;padding-right:calc(var(--input-space)*1.6)}.TextField-InputContainer_form_clearClear{border-width:0;border-bottom-width:var(--control-border-width);border-radius:0;border-top-width:var(--control-border-width)}.TextField-InputContainer_withValue .TextField-Side.TextField-Side_type_string{color:var(--color-control-typo-default)}.TextField-InputContainer_withValue .TextField-Icon{color:var(--color-typo-secondary)}.TextField-InputContainer_type_number{padding-right:0}.TextField-InputContainer_type_textarea .TextField-Input{display:block;line-height:var(--line-height-text-m);min-width:0;padding-bottom:calc((var(--input-height) - (var(--control-border-width)*2) - var(--line-height-text-m))/2);padding-top:calc((var(--input-height) - (var(--control-border-width)*2) - var(--line-height-text-m))/2);resize:none}.TextField-Counter{display:inline-flex;flex-direction:column;height:calc(var(--input-height) - var(--control-border-width)*2);margin-right:var(--counter-offset);width:var(--space-xl)}.TextField-CounterButton{align-items:center;background-color:var(--counter-button-background);border:none;color:var(--counter-button-icon-color);cursor:pointer;display:inline-flex;flex:1;flex-direction:column;justify-content:center;margin:0;overflow-y:hidden;padding:0;transition:background-color .15s;width:var(--space-xl)}.TextField-ClearButton,.TextField-EyeButton{background-color:transparent;border:none;cursor:pointer;display:flex;flex-direction:column;height:calc(var(--input-height) - var(--control-border-width)*2);justify-content:center;margin:0;margin-left:var(--input-space);padding:0}.TextField-ClearButton{color:var(--clear-button-color)}.TextField-ClearButton:hover{--clear-button-color:var(--color-control-typo-clear-hover)}.TextField-EyeButton{color:var(--color-control-typo-placeholder)}.TextField-EyeButton:hover{color:var(--color-control-typo-clear-hover)}.TextField-ClearButtonIcon{color:var(--color-control-typo-placeholder);position:relative;top:1px}.TextField-Input{background:transparent;border:none;color:currentColor;flex:1;font-family:var(--font-primary);font-size:var(--input-font-size);height:calc(var(--input-height) - var(--control-border-width)*2);min-width:80px;outline:none;padding:0;width:100%}.TextField-Input::-webkit-inner-spin-button,.TextField-Input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.TextField-Input[type=password]::-ms-reveal{display:none}.TextField-Input[type=number]{-moz-appearance:textfield}.TextField-Input:focus{outline:none}.TextField-Input:-webkit-autofill,.TextField-Input:-webkit-autofill:focus,.TextField-Input:-webkit-autofill:hover{border:none;-webkit-box-shadow:inset 0 0 0 1000px transparent;-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s}.TextField-Side{align-items:center;display:flex;height:calc(var(--input-height) - var(--control-border-width)*2);overflow:hidden}.TextField-Side_position_left{margin-right:var(--input-space)}.TextField-Side_position_right{margin-left:var(--input-space)}.TextField-Side_type_string{font-size:var(--input-font-size);white-space:nowrap}.TextField-Icon{color:var(--color-control-typo-placeholder)}blockquote,body,code,dd,div,dl,dt,fieldset,form,h1,h2,h3,h4,h5,h6,input,li,p,pre,td,textarea,th,ul{margin:0;padding:0}table{border-collapse:collapse;border-spacing:0}abbr,fieldset,img{border:0}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:400}ul li{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}sup{vertical-align:text-top}sub{vertical-align:text-bottom}input,select,textarea{font-family:inherit;font-size:inherit;font-weight:inherit}legend{color:#000}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section{display:block}img{height:auto;max-width:100%}*{box-sizing:border-box;outline:none}html.Theme.stand--AppTheme{background:var(--color-bg-default);color:var(--color-typo-primary)}@supports (scrollbar-gutter:auto){html.Theme.stand--AppTheme{overflow-y:overlay}html.Theme.stand--AppTheme::-webkit-scrollbar{height:4;width:4}html.Theme.stand--AppTheme::-webkit-scrollbar-thumb{background-color:var(--color-scroll-thumb);border-radius:4px;width:4}html.Theme.stand--AppTheme::-webkit-scrollbar-thumb:hover{background-color:var(--color-scroll-thumb-hover)}}html.Theme.stand--AppTheme_noScroll{overflow:hidden}
1
+ .TextField{--caption-margin-left:calc(var(--input-space) + var(--control-border-width));--counter-button-icon-color:var(--color-control-typo-ghost);--counter-button-background:transparent;--counter-offset:0;--clear-button-color:var(--color-control-typo-clear);display:inline-flex;position:relative;width:100%}.TextField_size_xs{--label-offset:var(--space-2xs);--caption-offset:var(--space-2xs);--input-height:var(--control-height-xs);--input-font-size:var(--control-text-size-xs);--input-space:calc(var(--control-space-xs)*0.5)}.TextField_size_xs .TextField-InputContainer_form_brickRound,.TextField_size_xs .TextField-InputContainer_form_clearRound,.TextField_size_xs .TextField-InputContainer_form_round{--counter-offset:calc(var(--space-xs) - var(--space-3xs))}.TextField_size_s{--label-offset:var(--space-2xs);--caption-offset:var(--space-2xs);--input-height:var(--control-height-s);--input-font-size:var(--control-text-size-s);--input-space:calc(var(--control-space-s)*0.5)}.TextField_size_s .TextField-InputContainer_form_brickRound,.TextField_size_s .TextField-InputContainer_form_clearRound,.TextField_size_s .TextField-InputContainer_form_round{--counter-offset:var(--space-xs)}.TextField_size_m{--label-offset:var(--space-xs);--caption-offset:var(--space-xs);--input-height:var(--control-height-m);--input-font-size:var(--control-text-size-m);--input-space:calc(var(--control-space-m)*0.5)}.TextField_size_m .TextField-InputContainer_form_brickRound,.TextField_size_m .TextField-InputContainer_form_clearRound,.TextField_size_m .TextField-InputContainer_form_round{--counter-offset:calc(var(--space-s) - var(--space-3xs))}.TextField_size_l{--label-offset:var(--space-xs);--caption-offset:var(--space-xs);--input-height:var(--control-height-l);--input-font-size:var(--control-text-size-l);--input-space:calc(var(--control-space-l)*0.5)}.TextField_size_l .TextField-InputContainer_form_brickRound,.TextField_size_l .TextField-InputContainer_form_clearRound,.TextField_size_l .TextField-InputContainer_form_round{--counter-offset:var(--space-s)}.TextField_labelPosition_top{flex-direction:column}.TextField_labelPosition_top>:not(:last-child){margin-bottom:var(--label-offset)}.TextField_labelPosition_left{flex-direction:row}.TextField_labelPosition_left .TextField-Label{align-items:center;display:inline-flex;height:var(--input-height)}.TextField_labelPosition_left>:not(:last-child){margin-right:var(--space-s)}.TextField-Body{display:inline-flex;flex-direction:column;width:100%}.TextField-Body .TextField-Caption{margin-left:var(--caption-margin-left);margin-top:var(--caption-offset)}.TextField_view_clear .TextField-Caption{--caption-margin-left:0}.TextField-InputContainer{box-sizing:border-box;display:inline-flex;font-family:var(--font-primary);font-weight:var(--font-weight-text-regular);max-width:100%;min-height:var(--input-height);position:relative;transition:border-color .15s,box-shadow .15s,background-color .15s}.TextField-InputContainer_disabled{--counter-button-background:var(--color-control-bg-disable);--counter-button-icon-color:var(--color-control-typo-disable)}.TextField-InputContainer_view_clear,.TextField-InputContainer_view_clear:focus,.TextField-InputContainer_view_clear:hover{color:var(--color-control-typo-default);padding:0}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input{color:var(--color-control-typo-disable);pointer-events:all}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill,.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:focus,.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:hover,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:focus,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:hover,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:focus,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:hover{-webkit-text-fill-color:var(--color-control-typo-disable)}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input::-moz-placeholder,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input::-moz-placeholder,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input::-moz-placeholder{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input::placeholder,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input::placeholder,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input::placeholder{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Side_type_string,.TextField-InputContainer_view_clear.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Side_type_string,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Side_type_string,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Side_type_string,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Side_type_string,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Side_type_string{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled.TextField-InputContainer .TextField-Icon,.TextField-InputContainer_view_clear.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Icon,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled.TextField-InputContainer .TextField-Icon,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Icon,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled.TextField-InputContainer .TextField-Icon,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Icon{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_default{--container-border-color:var(--color-control-bg-border-default);background:var(--color-control-bg-default);border:var(--control-border-width) solid var(--container-border-color);border-radius:var(--control-radius);color:var(--color-control-typo-default);overflow-x:hidden;padding:0 var(--input-space)}.TextField-InputContainer_view_default:hover{border-color:var(--color-control-bg-border-default-hover)}.TextField-InputContainer_view_default.TextField-InputContainer_status_alert{--container-border-color:var(--color-bg-alert)}.TextField-InputContainer_view_default.TextField-InputContainer_status_success{--container-border-color:var(--color-bg-success)}.TextField-InputContainer_view_default.TextField-InputContainer_status_warning{--container-border-color:var(--color-bg-warning)}.TextField-InputContainer_view_default .TextField-Input{color:var(--color-control-typo-default)}.TextField-InputContainer_view_default .TextField-Input::-moz-placeholder{color:var(--color-control-typo-placeholder)}.TextField-InputContainer_view_default .TextField-Input::placeholder{color:var(--color-control-typo-placeholder)}.TextField-InputContainer_view_default .TextField-Input:-webkit-autofill,.TextField-InputContainer_view_default .TextField-Input:-webkit-autofill:focus,.TextField-InputContainer_view_default .TextField-Input:-webkit-autofill:hover{-webkit-text-fill-color:var(--color-control-typo-default)}.TextField-InputContainer_view_default .TextField-Side_type_string{color:var(--color-control-typo-placeholder)}.TextField-InputContainer_view_default.TextField-InputContainer_focus{border-color:var(--color-control-bg-border-focus);outline:none;z-index:1}.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_clearClear{box-shadow:var(--control-border-width) 0 var(--color-control-bg-border-focus),calc(var(--control-border-width)*-1) 0 var(--color-control-bg-border-focus)}.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_brickClear,.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_defaultClear,.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_roundClear{box-shadow:var(--control-border-width) 0 var(--color-control-bg-border-focus)}.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_clearBrick,.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_clearDefault,.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_clearRound{box-shadow:calc(var(--control-border-width)*-1) 0 var(--color-control-bg-border-focus)}.TextField-InputContainer_view_default.TextField-InputContainer_disabled{--clear-button-color:var(--color-control-typo-disable);background:var(--color-control-bg-disable);border-color:var(--color-control-bg-border-disable)}.TextField-InputContainer_view_default.TextField-InputContainer_disabled .TextField-Input{color:var(--color-control-typo-disable);pointer-events:all}.TextField-InputContainer_view_default.TextField-InputContainer_disabled .TextField-Input::-moz-placeholder{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_default.TextField-InputContainer_disabled .TextField-Input::placeholder{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_default.TextField-InputContainer_disabled .TextField-Side_type_string,.TextField-InputContainer_view_default.TextField-InputContainer_disabled.TextField-InputContainer .TextField-Icon,.TextField-InputContainer_view_default.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Icon,.TextField-InputContainer_view_default.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Side_type_string{color:var(--color-control-typo-disable)}.TextField-InputContainer_form_defaultClear{border-right-width:0}.TextField-InputContainer_form_defaultBrick,.TextField-InputContainer_form_defaultClear{border-radius:var(--control-radius) 0 0 var(--control-radius)}.TextField-InputContainer_form_round{border-radius:calc(var(--input-height)/2);padding-left:calc(var(--input-space)*1.6);padding-right:calc(var(--input-space)*1.6)}.TextField-InputContainer_form_roundBrick{border-radius:calc(var(--input-height)/2) 0 0 calc(var(--input-height)/2);padding-left:calc(var(--input-space)*1.6)}.TextField-InputContainer_form_roundClear{border-radius:calc(var(--input-height)/2) 0 0 calc(var(--input-height)/2);border-right-width:0;padding-left:calc(var(--input-space)*1.6)}.TextField-InputContainer_form_brick{border-radius:0}.TextField-InputContainer_form_brickDefault{border-radius:0 var(--control-radius) var(--control-radius) 0}.TextField-InputContainer_form_brickRound{border-radius:0 calc(var(--input-height)/2) calc(var(--input-height)/2) 0;padding-right:calc(var(--input-space)*1.6)}.TextField-InputContainer_form_brickClear{border-radius:0;border-right-width:0}.TextField-InputContainer_form_clearDefault{border-left-width:0;border-radius:0 var(--control-radius) var(--control-radius) 0}.TextField-InputContainer_form_clearBrick{border-left-width:0;border-radius:0}.TextField-InputContainer_form_clearRound{border-left-width:0;border-radius:0 calc(var(--input-height)/2) calc(var(--input-height)/2) 0;padding-right:calc(var(--input-space)*1.6)}.TextField-InputContainer_form_clearClear{border-width:0;border-bottom-width:var(--control-border-width);border-radius:0;border-top-width:var(--control-border-width)}.TextField-InputContainer_withValue .TextField-Side.TextField-Side_type_icon,.TextField-InputContainer_withValue .TextField-Side.TextField-Side_type_string{color:var(--color-typo-secondary)}.TextField-InputContainer_incrementButtons{padding-right:0}.TextField-InputContainer_type_textarea .TextField-Input{display:block;line-height:var(--line-height-text-m);min-width:0;padding-bottom:calc((var(--input-height) - (var(--control-border-width)*2) - var(--line-height-text-m))/2);padding-top:calc((var(--input-height) - (var(--control-border-width)*2) - var(--line-height-text-m))/2);resize:none}.TextField-Counter{height:calc(var(--input-height) - var(--control-border-width)*2);margin-right:var(--counter-offset)}.TextField-Counter,.TextField-CounterButton{display:inline-flex;flex-direction:column;width:var(--space-xl)}.TextField-CounterButton{align-items:center;background-color:var(--counter-button-background);border:none;color:var(--counter-button-icon-color);cursor:pointer;flex:1;justify-content:center;margin:0;overflow-y:hidden;padding:0;transition:background-color .15s}.TextField-CounterButton_fn_increment{transform:rotate(180deg)}.TextField-ClearButton,.TextField-EyeButton{align-items:center;background-color:transparent;border:none;cursor:pointer;display:flex;flex-direction:row;height:calc(var(--input-height) - var(--control-border-width)*2);justify-content:center;margin:0;margin-left:var(--input-space);padding:0}.TextField-ClearButton{color:var(--clear-button-color)}.TextField-ClearButton:hover{--clear-button-color:var(--color-control-typo-clear-hover)}.TextField-EyeButton{color:var(--color-control-typo-placeholder)}.TextField-EyeButton:hover{color:var(--color-control-typo-clear-hover)}.TextField-ClearButtonIcon{color:var(--color-control-typo-placeholder)}.TextField-Input{background:transparent;border:none;color:currentColor;flex:1;font-family:var(--font-primary);font-size:var(--input-font-size);height:calc(var(--input-height) - var(--control-border-width)*2);min-width:80px;outline:none;padding:0;width:100%}.TextField-Input::-webkit-inner-spin-button,.TextField-Input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.TextField-Input[type=password]::-ms-reveal{display:none}.TextField-Input[type=number]{-moz-appearance:textfield}.TextField-Input:focus{outline:none}.TextField-Input:-webkit-autofill,.TextField-Input:-webkit-autofill:focus,.TextField-Input:-webkit-autofill:hover{border:none;-webkit-box-shadow:inset 0 0 0 1000px transparent;-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s}.TextField-Side{align-items:center;display:flex;height:calc(var(--input-height) - var(--control-border-width)*2);overflow:hidden}.TextField-Side_position_left{margin-right:var(--input-space)}.TextField-Side_position_right{margin-left:var(--input-space)}.TextField-Side_type_string{font-size:var(--input-font-size);white-space:nowrap}.TextField-Icon{color:var(--color-control-typo-placeholder)}blockquote,body,code,dd,div,dl,dt,fieldset,form,h1,h2,h3,h4,h5,h6,input,li,p,pre,td,textarea,th,ul{margin:0;padding:0}table{border-collapse:collapse;border-spacing:0}abbr,fieldset,img{border:0}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:400}ul li{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}sup{vertical-align:text-top}sub{vertical-align:text-bottom}input,select,textarea{font-family:inherit;font-size:inherit;font-weight:inherit}legend{color:#000}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section{display:block}img{height:auto;max-width:100%}*{box-sizing:border-box;outline:none}html.Theme.stand--AppTheme{background:var(--color-bg-default);color:var(--color-typo-primary)}@supports (scrollbar-gutter:auto){html.Theme.stand--AppTheme{overflow-y:overlay}html.Theme.stand--AppTheme::-webkit-scrollbar{height:4;width:4}html.Theme.stand--AppTheme::-webkit-scrollbar-thumb{background-color:var(--color-scroll-thumb);border-radius:4px;width:4}html.Theme.stand--AppTheme::-webkit-scrollbar-thumb:hover{background-color:var(--color-scroll-thumb-hover)}}html.Theme.stand--AppTheme_noScroll{overflow:hidden}
@@ -1,2 +1,2 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["className","type","value","defaultValue","onChange","id","name","rows","cols","minRows","maxRows","inputRef","maxLength","disabled","size","view","form","state","status","onBlur","onFocus","autoFocus","placeholder","leftSide","rightSide","autoComplete","withClearButton","incrementButtons","max","min","readOnly","required","step","tabIndex","ariaLabel","label","labelIcon","inputContainerRef","labelPosition","caption","iconSize","focused","onClick","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture"];import"./TextField.css";import{IconClear}from"@consta/icons/IconClear";import{IconEye}from"@consta/icons/IconEye";import{IconEyeClose}from"@consta/icons/IconEyeClose";import{IconSelect}from"@consta/icons/IconSelect";import{IconSelectOpen}from"@consta/icons/IconSelectOpen";import React,{forwardRef,useCallback,useEffect}from"react";import TextAreaAutoSize from"react-textarea-autosize";import{usePropsHandler}from"../EventInterceptor/usePropsHandler";import{FieldCaption}from"../FieldCaption/FieldCaption";import{FieldLabel}from"../FieldLabel/FieldLabel";import{useFlag}from"../../hooks/useFlag/useFlag";import{useForkRef}from"../../hooks/useForkRef/useForkRef";import{useMutableRef}from"../../hooks/useMutableRef/useMutableRef";import{useSortSteps}from"../../hooks/useSortSteps/useSortSteps";import{cn}from"../../utils/bem";import{getByMap}from"../../utils/getByMap";import{isString}from"../../utils/type-guards";import{getIncrementFlag,getTypeForRender,getValueByStep,sizeMap}from"./helpers";import{textFieldPropFormDefault,textFieldPropSizeDefault,textFieldPropViewDefault}from"./types";export var COMPONENT_NAME="TextField";export var cnTextField=cn("TextField");export var TextFieldRender=function(a,b){var c=React.useRef(null),d=React.useRef(null),e=usePropsHandler(COMPONENT_NAME,a,c),f=e.className,g=e.type,h=void 0===g?"text":g,i=e.value,j=e.defaultValue,k=e.onChange,l=e.id,m=e.name,n=e.rows,o=e.cols,p=e.minRows,q=e.maxRows,r=e.inputRef,s=e.maxLength,t=e.disabled,u=e.size,v=void 0===u?textFieldPropSizeDefault:u,w=e.view,x=void 0===w?textFieldPropViewDefault:w,y=e.form,z=void 0===y?textFieldPropFormDefault:y,A=e.state,B=e.status,C=e.onBlur,D=e.onFocus,E=e.autoFocus,F=void 0!==E&&E,G=e.placeholder,H=e.leftSide,I=e.rightSide,J=e.autoComplete,K=e.withClearButton,L=e.incrementButtons,M=e.max,N=e.min,O=e.readOnly,P=e.required,Q=e.step,R=void 0===Q?1:Q,S=e.tabIndex,T=e.ariaLabel,U=e.label,V=e.labelIcon,W=e.inputContainerRef,X=e.labelPosition,Y=void 0===X?"top":X,Z=e.caption,$=e.iconSize,_=e.focused,aa=e.onClick,ba=e.onKeyDown,ca=e.onKeyDownCapture,da=e.onKeyPress,ea=e.onKeyPressCapture,fa=e.onKeyUp,ga=e.onKeyUpCapture,ha=_objectWithoutProperties(e,_excluded),ia=useFlag(F),ja=_slicedToArray(ia,2),ka=ja[0],la=ja[1],ma=useFlag(!1),na=_slicedToArray(ma,2),oa=na[0],pa=na[1],qa=useMutableRef(i),ra=useMutableRef(aa),sa=useMutableRef(k),ta=useCallback(function(a){var b;a.stopPropagation(),pa.toggle(),null===(b=d.current)||void 0===b?void 0:b.focus()},[]),ua=H,va=I,wa=isString(H),xa=isString(I),ya=getByMap(sizeMap,v,$),za=useSortSteps({step:R,min:+N,max:+M}),Aa=useCallback(function(a){var b;t||(null===(b=sa.current)||void 0===b?void 0:b.call(sa,a.target.value||null,{e:a,id:l,name:m}))},[l,m,t]),Ba=function(a){la.on(),null===D||void 0===D?void 0:D(a)},Ca={className:cnTextField("Input"),value:null!==i&&void 0!==i?i:void 0,defaultValue:null!==j&&void 0!==j?j:void 0,onChange:Aa,maxLength:s,disabled:t,onBlur:function handleBlur(a){la.off(),null===C||void 0===C?void 0:C(a)},onFocus:Ba,autoFocus:F,placeholder:G,autoComplete:J,readOnly:O,tabIndex:S,name:m,onKeyDownCapture:ca,onKeyPress:da,onKeyPressCapture:ea,onKeyUp:fa,onKeyUpCapture:ga,id:l?l.toString():void 0,"aria-label":T},Da=oa?IconEyeClose:IconEye,Ea={rows:n,cols:o,minRows:p||n,maxRows:q||n,ref:useForkRef([d,r])},Fa={type:getTypeForRender(h,oa),max:M,min:N,step:Array.isArray(za)?0:za,onKeyDown:function onKeyDown(a){var b=getIncrementFlag(a);if(null===ba||void 0===ba?void 0:ba(a),"number"===h&&"boolean"==typeof b&&!t){var c;a.preventDefault();var d=getValueByStep(za,i,b,N,M);null===(c=sa.current)||void 0===c?void 0:c.call(sa,d,{e:a,id:l,name:m})}},ref:useForkRef([d,r])},Ga=useCallback(function(a){var b;null===(b=sa.current)||void 0===b?void 0:b.call(sa,null,{e:a,id:l,name:m})},[]),Ha=function(a){var b,c=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],d=getValueByStep(za,i,c,N,M);null===(b=sa.current)||void 0===b?void 0:b.call(sa,d,{e:a,id:l,name:m})},Ia={onClick:useCallback(function(a){var b,c;null===(b=d.current)||void 0===b?void 0:b.focus(),null===(c=ra.current)||void 0===c?void 0:c.call(ra,a)},[])};return useEffect(function(){if("password"===h&&d.current){var a;d.current.selectionStart=(null===(a=qa.current)||void 0===a?void 0:a.length)||0}},[oa]),React.createElement("div",Object.assign({className:cnTextField({labelPosition:Y,size:v,view:x},[f]),ref:useForkRef([b,c])},Ia,ha),U&&React.createElement(FieldLabel,{as:"label",htmlFor:null===l||void 0===l?void 0:l.toString(),icon:V,required:P,className:cnTextField("Label",{labelPosition:Y}),size:v},U),React.createElement("div",{className:cnTextField("Body")},React.createElement("div",{ref:W,className:cnTextField("InputContainer",{view:x,form:z,status:B||A,disabled:t,type:h,focus:ka||_,withValue:!!i})},ua&&React.createElement("div",{className:cnTextField("Side",{position:"left",type:wa?"string":"icon"}),title:"string"==typeof H?H:void 0},wa?H:React.createElement(ua,{className:cnTextField("Icon"),size:ya})),"textarea"===h?React.createElement(TextAreaAutoSize,Object.assign({},Ca,Ea)):React.createElement("input",Object.assign({},Ca,Fa)),"number"===h&&(void 0===L||L)&&React.createElement("div",{className:cnTextField("Counter")},React.createElement("button",{onFocus:Ba,onClick:function(a){return Ha(a,!0)},type:"button",className:cnTextField("CounterButton")},React.createElement(IconSelectOpen,{size:"xs"})),React.createElement("button",{onFocus:Ba,onClick:function(a){return Ha(a,!1)},type:"button",className:cnTextField("CounterButton")},React.createElement(IconSelect,{size:"xs"}))),!!i&&K&&"number"!==h&&React.createElement("button",{type:"button",disabled:t,tabIndex:-1,onClick:Ga,className:cnTextField("ClearButton")},React.createElement(IconClear,{size:sizeMap[v],className:cnTextField("ClearButtonIcon")})),"password"===h&&!!i&&React.createElement("button",{className:cnTextField("ClearButton"),type:"button",onClick:ta},React.createElement(Da,{className:cnTextField("Icon"),size:ya})),va&&"number"!==h&&"password"!==h&&React.createElement("div",{className:cnTextField("Side",{position:"right",type:xa?"string":"icon"}),title:"string"==typeof I?I:void 0},xa?I:React.createElement(va,{className:cnTextField("Icon"),size:ya}))),Z&&React.createElement(FieldCaption,{className:cnTextField("Caption"),status:B||A},Z)))};export var TextField=forwardRef(TextFieldRender);export*from"./types";
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["className","type","value","defaultValue","onChange","id","name","rows","cols","minRows","maxRows","inputRef","maxLength","disabled","size","view","form","state","status","onBlur","onFocus","autoFocus","placeholder","leftSide","rightSide","autoComplete","withClearButton","incrementButtons","max","min","readOnly","required","step","tabIndex","ariaLabel","label","labelIcon","inputContainerRef","labelPosition","caption","iconSize","focused","onClick","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture"];import"./TextField.css";import{IconClear}from"@consta/icons/IconClear";import{IconEye}from"@consta/icons/IconEye";import{IconEyeClose}from"@consta/icons/IconEyeClose";import{IconSelect}from"@consta/icons/IconSelect";import React,{forwardRef,useCallback,useEffect}from"react";import TextAreaAutoSize from"react-textarea-autosize";import{usePropsHandler}from"../EventInterceptor/usePropsHandler";import{FieldCaption}from"../FieldCaption/FieldCaption";import{FieldLabel}from"../FieldLabel/FieldLabel";import{useFlag}from"../../hooks/useFlag/useFlag";import{useForkRef}from"../../hooks/useForkRef/useForkRef";import{useMutableRef}from"../../hooks/useMutableRef/useMutableRef";import{useSortSteps}from"../../hooks/useSortSteps/useSortSteps";import{cn}from"../../utils/bem";import{getByMap}from"../../utils/getByMap";import{isString}from"../../utils/type-guards";import{getIncrementFlag,getTypeForRender,getValueByStep,inputValue,sizeMap}from"./helpers";import{textFieldPropFormDefault,textFieldPropSizeDefault,textFieldPropViewDefault}from"./types";export var COMPONENT_NAME="TextField";export var cnTextField=cn("TextField");export var TextFieldRender=function(a,b){var c,d=React.useRef(null),f=React.useRef(null),g=usePropsHandler(COMPONENT_NAME,a,d),h=g.className,i=g.type,j=void 0===i?"text":i,k=g.value,l=g.defaultValue,m=g.onChange,n=g.id,o=g.name,p=g.rows,q=g.cols,r=g.minRows,s=g.maxRows,t=g.inputRef,u=g.maxLength,v=g.disabled,w=g.size,x=void 0===w?textFieldPropSizeDefault:w,y=g.view,z=void 0===y?textFieldPropViewDefault:y,A=g.form,B=void 0===A?textFieldPropFormDefault:A,C=g.state,D=g.status,E=g.onBlur,F=g.onFocus,G=g.autoFocus,H=void 0!==G&&G,I=g.placeholder,J=g.leftSide,K=g.rightSide,L=g.autoComplete,M=g.withClearButton,N=g.incrementButtons,O=g.max,P=g.min,Q=g.readOnly,R=g.required,S=g.step,T=void 0===S?1:S,U=g.tabIndex,V=g.ariaLabel,W=g.label,X=g.labelIcon,Y=g.inputContainerRef,Z=g.labelPosition,$=void 0===Z?"top":Z,_=g.caption,aa=g.iconSize,ba=g.focused,ca=g.onClick,da=g.onKeyDown,ea=g.onKeyDownCapture,fa=g.onKeyPress,ga=g.onKeyPressCapture,ha=g.onKeyUp,ia=g.onKeyUpCapture,ja=_objectWithoutProperties(g,_excluded),ka="number"===j&&(void 0===N||N),la=useFlag(H),ma=_slicedToArray(la,2),na=ma[0],oa=ma[1],pa=useFlag(),qa=_slicedToArray(pa,2),ra=qa[0],sa=qa[1],ta=useFlag(),ua=_slicedToArray(ta,2),va=ua[0],wa=ua[1],xa=useMutableRef(ca),ya=useMutableRef(m),za=useCallback(function(a){var b;a.stopPropagation(),sa.toggle(),null===(b=f.current)||void 0===b?void 0:b.focus()},[]),Aa=J,Ba=K,Ca=isString(J),Da=isString(K),Ea=getByMap(sizeMap,x,aa),Fa=useSortSteps({step:T,min:+P,max:+O}),Ga=useCallback(function(a){var b;v||(null===(b=ya.current)||void 0===b?void 0:b.call(ya,a.target.value||null,{e:a,id:n,name:o})),a.target.value?wa.on():wa.off()},[n,o,v]),Ha=function(a){oa.on(),null===F||void 0===F?void 0:F(a)},Ia={className:cnTextField("Input"),value:inputValue(k),defaultValue:inputValue(l),onChange:Ga,maxLength:u,disabled:v,onBlur:function handleBlur(a){oa.off(),null===E||void 0===E?void 0:E(a)},onFocus:Ha,autoFocus:H,placeholder:I,autoComplete:L,readOnly:Q,tabIndex:U,name:o,onKeyDownCapture:ea,onKeyPress:fa,onKeyPressCapture:ga,onKeyUp:ha,onKeyUpCapture:ia,id:n?n.toString():void 0,"aria-label":V},Ja=ra?IconEyeClose:IconEye,Ka={rows:p,cols:q,minRows:r||p,maxRows:s||p,ref:useForkRef([f,t])},La={type:getTypeForRender(j,ra),max:O,min:P,step:Array.isArray(Fa)?0:Fa,onKeyDown:function onKeyDown(a){var b=getIncrementFlag(a);if(null===da||void 0===da?void 0:da(a),"number"===j&&"boolean"==typeof b&&!v){var c,d;a.preventDefault();var e=getValueByStep(Fa,null===(c=f.current)||void 0===c?void 0:c.value,b,P,O);null===(d=ya.current)||void 0===d?void 0:d.call(ya,e,{e:a,id:n,name:o}),f.current&&(f.current.value=e,wa.on())}},ref:useForkRef([f,t])},Ma=useCallback(function(a){var b;null===(b=ya.current)||void 0===b?void 0:b.call(ya,null,{e:a,id:n,name:o}),f.current&&(f.current.value="",wa.off())},[]),Na=function(a){var b,c,d=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],e=getValueByStep(Fa,null===(b=f.current)||void 0===b?void 0:b.value,d,P,O);null===(c=ya.current)||void 0===c?void 0:c.call(ya,e,{e:a,id:n,name:o}),f.current&&(f.current.value=e,wa.on())},Oa={onClick:useCallback(function(a){var b,c;null===(b=f.current)||void 0===b?void 0:b.focus(),null===(c=xa.current)||void 0===c?void 0:c.call(xa,a)},[])};return useEffect(function(){if(f.current&&"number"!==j&&M){var a;null!==(a=f.current)&&void 0!==a&&a.value?wa.on():wa.off()}},[f.current,M,j]),React.createElement("div",Object.assign({className:cnTextField({labelPosition:$,size:x,view:z},[h]),ref:useForkRef([b,d])},Oa,ja),W&&React.createElement(FieldLabel,{as:"label",htmlFor:null===n||void 0===n?void 0:n.toString(),icon:X,required:R,className:cnTextField("Label",{labelPosition:$}),size:x},W),React.createElement("div",{className:cnTextField("Body")},React.createElement("div",{ref:Y,className:cnTextField("InputContainer",{view:z,form:B,status:D||C,disabled:v,type:j,focus:na||ba,withValue:va,incrementButtons:"number"===j&&ka})},Aa&&React.createElement("div",{className:cnTextField("Side",{position:"left",type:Ca?"string":"icon"}),title:"string"==typeof J?J:void 0},Ca?J:React.createElement(Aa,{className:cnTextField("Icon"),size:Ea})),"textarea"===j?React.createElement(TextAreaAutoSize,Object.assign({},Ia,Ka)):React.createElement("input",Object.assign({},Ia,La)),"number"===j&&ka&&!v&&React.createElement("div",{className:cnTextField("Counter")},React.createElement("button",{onFocus:Ha,onClick:function(a){return Na(a,!0)},type:"button",className:cnTextField("CounterButton",{fn:"increment"})},React.createElement(IconSelect,{size:"xs"})),React.createElement("button",{onFocus:Ha,onClick:function(a){return Na(a,!1)},type:"button",className:cnTextField("CounterButton")},React.createElement(IconSelect,{size:"xs"}))),!ka&&va&&M&&!v&&React.createElement("button",{type:"button",disabled:v,tabIndex:-1,onClick:Ma,className:cnTextField("ClearButton")},React.createElement(IconClear,{size:sizeMap[x],className:cnTextField("ClearButtonIcon")})),"password"===j&&(null===(c=f.current)||void 0===c?void 0:c.value)&&React.createElement("button",{className:cnTextField("ClearButton"),type:"button",onClick:za},React.createElement(Ja,{className:cnTextField("Icon"),size:Ea})),Ba&&!ka&&"password"!==j&&React.createElement("div",{className:cnTextField("Side",{position:"right",type:Da?"string":"icon"}),title:"string"==typeof K?K:void 0},Da?K:React.createElement(Ba,{className:cnTextField("Icon"),size:Ea}))),_&&React.createElement(FieldCaption,{className:cnTextField("Caption"),status:D||C},_)))};export var TextField=forwardRef(TextFieldRender);export*from"./types";
2
2
  //# sourceMappingURL=TextField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.js","names":["IconClear","IconEye","IconEyeClose","IconSelect","IconSelectOpen","React","forwardRef","useCallback","useEffect","TextAreaAutoSize","usePropsHandler","FieldCaption","FieldLabel","useFlag","useForkRef","useMutableRef","useSortSteps","cn","getByMap","isString","getIncrementFlag","getTypeForRender","getValueByStep","sizeMap","textFieldPropFormDefault","textFieldPropSizeDefault","textFieldPropViewDefault","COMPONENT_NAME","cnTextField","TextFieldRender","props","ref","textFieldRef","useRef","inputRef","className","type","value","defaultValue","onChange","id","name","rows","cols","minRows","maxRows","inputRefProp","maxLength","disabled","size","view","form","state","status","onBlur","onFocus","autoFocus","placeholder","leftSide","rightSide","autoComplete","withClearButton","incrementButtons","max","min","readOnly","required","step","tabIndex","ariaLabel","label","labelIcon","inputContainerRef","labelPosition","caption","iconSizeProp","iconSize","focused","onClick","onKeyDownProp","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","otherProps","focus","setFocus","passwordVisible","setPasswordVisuble","valueRef","onClickRef","onChangeRef","handleEyeClick","e","stopPropagation","toggle","current","LeftIcon","RightIcon","leftSideIsString","rightSideIsString","sortedSteps","handleChange","target","handleFocus","on","commonProps","handleBlur","off","toString","Eye","textareaProps","inputProps","Array","isArray","flag","preventDefault","newValue","handleClear","changeNumberValue","isIncrement","rootProps","selectionStart","length","withValue","position","TextField"],"sources":["../../../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import './TextField.css';\n\nimport { IconClear } from '@consta/icons/IconClear';\nimport { IconEye } from '@consta/icons/IconEye';\nimport { IconEyeClose } from '@consta/icons/IconEyeClose';\nimport { IconSelect } from '@consta/icons/IconSelect';\nimport { IconSelectOpen } from '@consta/icons/IconSelectOpen';\nimport React, { forwardRef, useCallback, useEffect } from 'react';\nimport TextAreaAutoSize from 'react-textarea-autosize';\n\nimport { usePropsHandler } from '##/components/EventInterceptor/usePropsHandler';\nimport { FieldCaption } from '##/components/FieldCaption/FieldCaption';\nimport { FieldLabel } from '##/components/FieldLabel/FieldLabel';\nimport { useFlag } from '##/hooks/useFlag/useFlag';\nimport { useForkRef } from '##/hooks/useForkRef/useForkRef';\nimport { useMutableRef } from '##/hooks/useMutableRef/useMutableRef';\nimport { useSortSteps } from '##/hooks/useSortSteps/useSortSteps';\nimport { cn } from '##/utils/bem';\nimport { getByMap } from '##/utils/getByMap';\nimport { isString } from '##/utils/type-guards';\n\nimport {\n getIncrementFlag,\n getTypeForRender,\n getValueByStep,\n sizeMap,\n} from './helpers';\nimport {\n TextFieldComponent,\n textFieldPropFormDefault,\n TextFieldProps,\n textFieldPropSizeDefault,\n textFieldPropViewDefault,\n} from './types';\n\nexport const COMPONENT_NAME = 'TextField' as const;\nexport const cnTextField = cn(COMPONENT_NAME);\n\nexport const TextFieldRender = <TYPE extends string>(\n props: TextFieldProps<TYPE>,\n ref: React.Ref<HTMLDivElement>,\n) => {\n const textFieldRef = React.useRef<HTMLDivElement>(null);\n const inputRef = React.useRef<HTMLInputElement | HTMLTextAreaElement>(null);\n\n const {\n className,\n type = 'text',\n value,\n defaultValue,\n onChange,\n id,\n name,\n rows,\n cols,\n minRows,\n maxRows,\n inputRef: inputRefProp,\n maxLength,\n disabled,\n size = textFieldPropSizeDefault,\n view = textFieldPropViewDefault,\n form = textFieldPropFormDefault,\n state,\n status,\n onBlur,\n onFocus,\n autoFocus = false,\n placeholder,\n leftSide,\n rightSide,\n autoComplete,\n withClearButton,\n incrementButtons = true,\n max,\n min,\n readOnly,\n required,\n step = 1,\n tabIndex,\n ariaLabel,\n label,\n labelIcon,\n inputContainerRef,\n labelPosition = 'top',\n caption,\n iconSize: iconSizeProp,\n focused,\n onClick,\n // onkey props\n onKeyDown: onKeyDownProp,\n onKeyDownCapture,\n onKeyPress,\n onKeyPressCapture,\n onKeyUp,\n onKeyUpCapture,\n ...otherProps\n } = usePropsHandler(COMPONENT_NAME, props, textFieldRef);\n const [focus, setFocus] = useFlag(autoFocus);\n const [passwordVisible, setPasswordVisuble] = useFlag(false);\n\n const valueRef = useMutableRef(value);\n const onClickRef = useMutableRef(onClick);\n const onChangeRef = useMutableRef(onChange);\n\n const handleEyeClick = useCallback(\n (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\n e.stopPropagation();\n setPasswordVisuble.toggle();\n inputRef.current?.focus();\n },\n [],\n );\n\n const textarea = type === 'textarea';\n const LeftIcon = leftSide;\n const RightIcon = rightSide;\n const leftSideIsString = isString(leftSide);\n const rightSideIsString = isString(rightSide);\n const iconSize = getByMap(sizeMap, size, iconSizeProp);\n\n const sortedSteps = useSortSteps({\n step,\n min: Number(min),\n max: Number(max),\n });\n\n const handleChange: React.ChangeEventHandler<\n HTMLInputElement | HTMLTextAreaElement\n > = useCallback(\n (e) => {\n !disabled &&\n onChangeRef.current?.(e.target.value || null, {\n e,\n id,\n name,\n });\n },\n [id, name, disabled],\n );\n\n const handleBlur: React.FocusEventHandler<HTMLElement> = (e) => {\n setFocus.off();\n onBlur?.(e);\n };\n\n const handleFocus: React.FocusEventHandler<HTMLElement> = (e) => {\n setFocus.on();\n onFocus?.(e);\n };\n\n const commonProps = {\n 'className': cnTextField('Input'),\n 'value': value ?? undefined,\n 'defaultValue': defaultValue ?? undefined,\n 'onChange': handleChange,\n maxLength,\n disabled,\n 'onBlur': handleBlur,\n 'onFocus': handleFocus,\n autoFocus,\n placeholder,\n autoComplete,\n readOnly,\n tabIndex,\n name,\n onKeyDownCapture,\n onKeyPress,\n onKeyPressCapture,\n onKeyUp,\n onKeyUpCapture,\n 'id': id ? id.toString() : undefined,\n 'aria-label': ariaLabel,\n };\n\n const Eye = passwordVisible ? IconEyeClose : IconEye;\n\n const onKeyDown = (e: React.KeyboardEvent) => {\n const flag = getIncrementFlag(e);\n onKeyDownProp?.(e);\n if (type === 'number' && typeof flag === 'boolean' && !disabled) {\n e.preventDefault();\n const newValue = getValueByStep(sortedSteps, value, flag, min, max);\n onChangeRef.current?.(newValue, {\n e,\n id,\n name,\n });\n }\n };\n\n const textareaProps = {\n rows,\n cols,\n minRows: minRows || rows,\n maxRows: maxRows || rows,\n ref: useForkRef([inputRef, inputRefProp]) as (\n node: HTMLTextAreaElement,\n ) => void,\n };\n\n const inputProps = {\n type: getTypeForRender(type, passwordVisible),\n max,\n min,\n step: !Array.isArray(sortedSteps) ? sortedSteps : 0,\n onKeyDown,\n ref: useForkRef([\n inputRef,\n inputRefProp,\n ]) as React.RefCallback<HTMLInputElement>,\n };\n\n const handleClear = useCallback((e: React.MouseEvent<HTMLButtonElement>) => {\n onChangeRef.current?.(null, {\n e,\n id,\n name,\n });\n }, []);\n\n const changeNumberValue = (\n e: React.MouseEvent<HTMLButtonElement>,\n isIncrement = true,\n ) => {\n const newValue = getValueByStep(sortedSteps, value, isIncrement, min, max);\n onChangeRef.current?.(newValue, {\n e,\n id,\n name,\n });\n };\n\n const rootProps = {\n onClick: useCallback((e: React.MouseEvent<HTMLDivElement, MouseEvent>) => {\n inputRef.current?.focus();\n onClickRef.current?.(e);\n }, []),\n };\n\n // при смене passwordVible, перемещаем курсор в конец строки\n useEffect(() => {\n if (type === 'password' && inputRef.current) {\n inputRef.current.selectionStart = valueRef.current?.length || 0;\n }\n }, [passwordVisible]);\n\n return (\n <div\n className={cnTextField({ labelPosition, size, view }, [className])}\n ref={useForkRef([ref, textFieldRef])}\n {...rootProps}\n {...otherProps}\n >\n {label && (\n <FieldLabel\n as=\"label\"\n htmlFor={id?.toString()}\n icon={labelIcon}\n required={required}\n className={cnTextField('Label', { labelPosition })}\n size={size}\n >\n {label}\n </FieldLabel>\n )}\n <div className={cnTextField('Body')}>\n <div\n ref={inputContainerRef}\n className={cnTextField('InputContainer', {\n view,\n form,\n status: status || state,\n disabled,\n type,\n focus: focus || focused,\n withValue: !!value,\n })}\n >\n {LeftIcon && (\n <div\n className={cnTextField('Side', {\n position: 'left',\n type: leftSideIsString ? 'string' : 'icon',\n })}\n title={typeof leftSide === 'string' ? leftSide : undefined}\n >\n {leftSideIsString ? (\n leftSide\n ) : (\n <LeftIcon className={cnTextField('Icon')} size={iconSize} />\n )}\n </div>\n )}\n {textarea ? (\n <TextAreaAutoSize {...commonProps} {...textareaProps} />\n ) : (\n <input {...commonProps} {...inputProps} />\n )}\n\n {type === 'number' && incrementButtons && (\n <div className={cnTextField('Counter')}>\n <button\n onFocus={handleFocus}\n onClick={(e) => changeNumberValue(e, true)}\n type=\"button\"\n className={cnTextField('CounterButton')}\n >\n <IconSelectOpen size=\"xs\" />\n </button>\n <button\n onFocus={handleFocus}\n onClick={(e) => changeNumberValue(e, false)}\n type=\"button\"\n className={cnTextField('CounterButton')}\n >\n <IconSelect size=\"xs\" />\n </button>\n </div>\n )}\n\n {!!value && withClearButton && type !== 'number' && (\n <button\n type=\"button\"\n disabled={disabled}\n tabIndex={-1}\n onClick={handleClear}\n className={cnTextField('ClearButton')}\n >\n <IconClear\n size={sizeMap[size]}\n className={cnTextField('ClearButtonIcon')}\n />\n </button>\n )}\n\n {type === 'password' && !!value && (\n <button\n className={cnTextField('ClearButton')}\n type=\"button\"\n onClick={handleEyeClick}\n >\n <Eye className={cnTextField('Icon')} size={iconSize} />\n </button>\n )}\n\n {RightIcon && type !== 'number' && type !== 'password' && (\n <div\n className={cnTextField('Side', {\n position: 'right',\n type: rightSideIsString ? 'string' : 'icon',\n })}\n title={typeof rightSide === 'string' ? rightSide : undefined}\n >\n {rightSideIsString ? (\n rightSide\n ) : (\n <RightIcon className={cnTextField('Icon')} size={iconSize} />\n )}\n </div>\n )}\n </div>\n {caption && (\n <FieldCaption\n className={cnTextField('Caption')}\n status={status || state}\n >\n {caption}\n </FieldCaption>\n )}\n </div>\n </div>\n );\n};\n\nexport const TextField = forwardRef(TextFieldRender) as TextFieldComponent;\nexport * from './types';\n"],"mappings":"qsBAAA,wBAEA,OAASA,SAAT,KAA0B,yBAA1B,CACA,OAASC,OAAT,KAAwB,uBAAxB,CACA,OAASC,YAAT,KAA6B,4BAA7B,CACA,OAASC,UAAT,KAA2B,0BAA3B,CACA,OAASC,cAAT,KAA+B,8BAA/B,CACA,MAAOC,MAAP,EAAgBC,UAAhB,CAA4BC,WAA5B,CAAyCC,SAAzC,KAA0D,OAA1D,CACA,MAAOC,iBAAP,KAA6B,yBAA7B,CAEA,OAASC,eAAT,2CACA,OAASC,YAAT,oCACA,OAASC,UAAT,gCACA,OAASC,OAAT,mCACA,OAASC,UAAT,yCACA,OAASC,aAAT,+CACA,OAASC,YAAT,6CACA,OAASC,EAAT,uBACA,OAASC,QAAT,4BACA,OAASC,QAAT,+BAEA,OACEC,gBADF,CAEEC,gBAFF,CAGEC,cAHF,CAIEC,OAJF,iBAMA,OAEEC,wBAFF,CAIEC,wBAJF,CAKEC,wBALF,eAQA,MAAO,IAAMC,eAAc,CAAG,WAAvB,CACP,MAAO,IAAMC,YAAW,CAAGX,EAAE,aAAtB,CAEP,MAAO,IAAMY,gBAAe,CAAG,SAC7BC,CAD6B,CAE7BC,CAF6B,CAG1B,IACGC,EAAY,CAAG3B,KAAK,CAAC4B,MAAN,CAA6B,IAA7B,CADlB,CAEGC,CAAQ,CAAG7B,KAAK,CAAC4B,MAAN,CAAqD,IAArD,CAFd,GAwDCvB,eAAe,CAACiB,cAAD,CAAiBG,CAAjB,CAAwBE,CAAxB,CAxDhB,CAKDG,CALC,GAKDA,SALC,KAMDC,IANC,CAMDA,CANC,YAMM,MANN,GAODC,CAPC,GAODA,KAPC,CAQDC,CARC,GAQDA,YAR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a,QAAT,GAAAhE,CAAb,EAA2C,UAAT,GAAAA,CAAlC,EACC,2BACE,SAAS,CAAER,WAAW,CAAC,MAAD,CAAS,CAC7BmG,QAAQ,CAAE,OADmB,CAE7B3F,IAAI,CAAEkE,EAAiB,CAAG,QAAH,CAAc,MAFR,CAAT,CADxB,CAKE,KAAK,CAAuB,QAArB,QAAO3C,EAAP,CAAgCA,CAAhC,OALT,EAOG2C,EAAiB,CAChB3C,CADgB,CAGhB,oBAAC,EAAD,EAAW,SAAS,CAAE/B,WAAW,CAAC,MAAD,CAAjC,CAA2C,IAAI,CAAEgD,EAAjD,EAVJ,CAhFJ,CADF,CAgGGF,CAAO,EACN,oBAAC,YAAD,EACE,SAAS,CAAE9C,WAAW,CAAC,SAAD,CADxB,CAEE,MAAM,CAAEyB,CAAM,EAAID,CAFpB,EAIGsB,CAJH,CAjGJ,CAlBF,CA6HH,CA/UM,CAiVP,MAAO,IAAMsD,UAAS,CAAG1H,UAAU,CAACuB,eAAD,CAA5B,CACP"}
1
+ {"version":3,"file":"TextField.js","names":["IconClear","IconEye","IconEyeClose","IconSelect","React","forwardRef","useCallback","useEffect","TextAreaAutoSize","usePropsHandler","FieldCaption","FieldLabel","useFlag","useForkRef","useMutableRef","useSortSteps","cn","getByMap","isString","getIncrementFlag","getTypeForRender","getValueByStep","inputValue","sizeMap","textFieldPropFormDefault","textFieldPropSizeDefault","textFieldPropViewDefault","COMPONENT_NAME","cnTextField","TextFieldRender","props","ref","textFieldRef","useRef","inputRef","className","type","value","defaultValue","onChange","id","name","rows","cols","minRows","maxRows","inputRefProp","maxLength","disabled","size","view","form","state","status","onBlur","onFocus","autoFocus","placeholder","leftSide","rightSide","autoComplete","withClearButton","incrementButtons","max","min","readOnly","required","step","tabIndex","ariaLabel","label","labelIcon","inputContainerRef","labelPosition","caption","iconSizeProp","iconSize","focused","onClick","onKeyDownProp","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","otherProps","focus","setFocus","passwordVisible","setPasswordVisuble","withValue","setWithValue","onClickRef","onChangeRef","handleEyeClick","e","stopPropagation","toggle","current","LeftIcon","RightIcon","leftSideIsString","rightSideIsString","sortedSteps","handleChange","target","on","off","handleFocus","commonProps","handleBlur","toString","Eye","textareaProps","inputProps","Array","isArray","flag","preventDefault","newValue","handleClear","changeNumberValue","isIncrement","rootProps","position","fn","TextField"],"sources":["../../../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import './TextField.css';\n\nimport { IconClear } from '@consta/icons/IconClear';\nimport { IconEye } from '@consta/icons/IconEye';\nimport { IconEyeClose } from '@consta/icons/IconEyeClose';\nimport { IconSelect } from '@consta/icons/IconSelect';\nimport React, { forwardRef, useCallback, useEffect } from 'react';\nimport TextAreaAutoSize from 'react-textarea-autosize';\n\nimport { usePropsHandler } from '##/components/EventInterceptor/usePropsHandler';\nimport { FieldCaption } from '##/components/FieldCaption/FieldCaption';\nimport { FieldLabel } from '##/components/FieldLabel/FieldLabel';\nimport { useFlag } from '##/hooks/useFlag/useFlag';\nimport { useForkRef } from '##/hooks/useForkRef/useForkRef';\nimport { useMutableRef } from '##/hooks/useMutableRef/useMutableRef';\nimport { useSortSteps } from '##/hooks/useSortSteps/useSortSteps';\nimport { cn } from '##/utils/bem';\nimport { getByMap } from '##/utils/getByMap';\nimport { isString } from '##/utils/type-guards';\n\nimport {\n getIncrementFlag,\n getTypeForRender,\n getValueByStep,\n inputValue,\n sizeMap,\n} from './helpers';\nimport {\n TextFieldComponent,\n textFieldPropFormDefault,\n TextFieldProps,\n textFieldPropSizeDefault,\n textFieldPropViewDefault,\n} from './types';\n\nexport const COMPONENT_NAME = 'TextField' as const;\nexport const cnTextField = cn(COMPONENT_NAME);\n\nexport const TextFieldRender = <TYPE extends string>(\n props: TextFieldProps<TYPE>,\n ref: React.Ref<HTMLDivElement>,\n) => {\n const textFieldRef = React.useRef<HTMLDivElement>(null);\n const inputRef = React.useRef<HTMLInputElement | HTMLTextAreaElement>(null);\n\n const {\n className,\n type = 'text',\n value,\n defaultValue,\n onChange,\n id,\n name,\n rows,\n cols,\n minRows,\n maxRows,\n inputRef: inputRefProp,\n maxLength,\n disabled,\n size = textFieldPropSizeDefault,\n view = textFieldPropViewDefault,\n form = textFieldPropFormDefault,\n state,\n status,\n onBlur,\n onFocus,\n autoFocus = false,\n placeholder,\n leftSide,\n rightSide,\n autoComplete,\n withClearButton,\n incrementButtons: incrementButtonsProp = true,\n max,\n min,\n readOnly,\n required,\n step = 1,\n tabIndex,\n ariaLabel,\n label,\n labelIcon,\n inputContainerRef,\n labelPosition = 'top',\n caption,\n iconSize: iconSizeProp,\n focused,\n onClick,\n // onkey props\n onKeyDown: onKeyDownProp,\n onKeyDownCapture,\n onKeyPress,\n onKeyPressCapture,\n onKeyUp,\n onKeyUpCapture,\n\n ...otherProps\n } = usePropsHandler(COMPONENT_NAME, props, textFieldRef);\n\n const incrementButtons = type === 'number' ? incrementButtonsProp : false;\n\n const [focus, setFocus] = useFlag(autoFocus);\n const [passwordVisible, setPasswordVisuble] = useFlag();\n const [withValue, setWithValue] = useFlag();\n\n const onClickRef = useMutableRef(onClick);\n const onChangeRef = useMutableRef(onChange);\n\n const handleEyeClick = useCallback(\n (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {\n e.stopPropagation();\n setPasswordVisuble.toggle();\n inputRef.current?.focus();\n },\n [],\n );\n\n const textarea = type === 'textarea';\n const LeftIcon = leftSide;\n const RightIcon = rightSide;\n const leftSideIsString = isString(leftSide);\n const rightSideIsString = isString(rightSide);\n const iconSize = getByMap(sizeMap, size, iconSizeProp);\n\n const sortedSteps = useSortSteps({\n step,\n min: Number(min),\n max: Number(max),\n });\n\n const handleChange: React.ChangeEventHandler<\n HTMLInputElement | HTMLTextAreaElement\n > = useCallback(\n (e) => {\n !disabled &&\n onChangeRef.current?.(e.target.value || null, {\n e,\n id,\n name,\n });\n\n if (e.target.value) {\n setWithValue.on();\n } else {\n setWithValue.off();\n }\n },\n [id, name, disabled],\n );\n\n const handleBlur: React.FocusEventHandler<HTMLElement> = (e) => {\n setFocus.off();\n onBlur?.(e);\n };\n\n const handleFocus: React.FocusEventHandler<HTMLElement> = (e) => {\n setFocus.on();\n onFocus?.(e);\n };\n\n const commonProps = {\n 'className': cnTextField('Input'),\n 'value': inputValue(value),\n 'defaultValue': inputValue(defaultValue),\n 'onChange': handleChange,\n maxLength,\n disabled,\n 'onBlur': handleBlur,\n 'onFocus': handleFocus,\n autoFocus,\n placeholder,\n autoComplete,\n readOnly,\n tabIndex,\n name,\n onKeyDownCapture,\n onKeyPress,\n onKeyPressCapture,\n onKeyUp,\n onKeyUpCapture,\n 'id': id ? id.toString() : undefined,\n 'aria-label': ariaLabel,\n };\n\n const Eye = passwordVisible ? IconEyeClose : IconEye;\n\n const onKeyDown = (e: React.KeyboardEvent) => {\n const flag = getIncrementFlag(e);\n onKeyDownProp?.(e);\n if (type === 'number' && typeof flag === 'boolean' && !disabled) {\n e.preventDefault();\n\n const newValue = getValueByStep(\n sortedSteps,\n inputRef.current?.value,\n flag,\n min,\n max,\n );\n\n onChangeRef.current?.(newValue, {\n e,\n id,\n name,\n });\n\n if (inputRef.current) {\n inputRef.current.value = newValue;\n setWithValue.on();\n }\n }\n };\n\n const textareaProps = {\n rows,\n cols,\n minRows: minRows || rows,\n maxRows: maxRows || rows,\n ref: useForkRef([inputRef, inputRefProp]) as (\n node: HTMLTextAreaElement,\n ) => void,\n };\n\n const inputProps = {\n type: getTypeForRender(type, passwordVisible),\n max,\n min,\n step: !Array.isArray(sortedSteps) ? sortedSteps : 0,\n onKeyDown,\n ref: useForkRef([\n inputRef,\n inputRefProp,\n ]) as React.RefCallback<HTMLInputElement>,\n };\n\n const handleClear = useCallback((e: React.MouseEvent<HTMLButtonElement>) => {\n onChangeRef.current?.(null, {\n e,\n id,\n name,\n });\n\n if (inputRef.current) {\n inputRef.current.value = '';\n setWithValue.off();\n }\n }, []);\n\n const changeNumberValue = (\n e: React.MouseEvent<HTMLButtonElement>,\n isIncrement = true,\n ) => {\n const newValue = getValueByStep(\n sortedSteps,\n inputRef.current?.value,\n isIncrement,\n min,\n max,\n );\n onChangeRef.current?.(newValue, {\n e,\n id,\n name,\n });\n if (inputRef.current) {\n inputRef.current.value = newValue;\n setWithValue.on();\n }\n };\n\n const rootProps = {\n onClick: useCallback((e: React.MouseEvent<HTMLDivElement, MouseEvent>) => {\n inputRef.current?.focus();\n onClickRef.current?.(e);\n }, []),\n };\n\n useEffect(() => {\n if (inputRef.current && type !== 'number' && withClearButton) {\n if (inputRef.current?.value) {\n setWithValue.on();\n } else {\n setWithValue.off();\n }\n }\n }, [inputRef.current, withClearButton, type]);\n\n return (\n <div\n className={cnTextField({ labelPosition, size, view }, [className])}\n ref={useForkRef([ref, textFieldRef])}\n {...rootProps}\n {...otherProps}\n >\n {label && (\n <FieldLabel\n as=\"label\"\n htmlFor={id?.toString()}\n icon={labelIcon}\n required={required}\n className={cnTextField('Label', { labelPosition })}\n size={size}\n >\n {label}\n </FieldLabel>\n )}\n <div className={cnTextField('Body')}>\n <div\n ref={inputContainerRef}\n className={cnTextField('InputContainer', {\n view,\n form,\n status: status || state,\n disabled,\n type,\n focus: focus || focused,\n withValue,\n incrementButtons: type === 'number' && incrementButtons,\n })}\n >\n {LeftIcon && (\n <div\n className={cnTextField('Side', {\n position: 'left',\n type: leftSideIsString ? 'string' : 'icon',\n })}\n title={typeof leftSide === 'string' ? leftSide : undefined}\n >\n {leftSideIsString ? (\n leftSide\n ) : (\n <LeftIcon className={cnTextField('Icon')} size={iconSize} />\n )}\n </div>\n )}\n {textarea ? (\n <TextAreaAutoSize {...commonProps} {...textareaProps} />\n ) : (\n <input {...commonProps} {...inputProps} />\n )}\n\n {type === 'number' && incrementButtons && !disabled && (\n <div className={cnTextField('Counter')}>\n <button\n onFocus={handleFocus}\n onClick={(e) => changeNumberValue(e, true)}\n type=\"button\"\n className={cnTextField('CounterButton', { fn: 'increment' })}\n >\n <IconSelect size=\"xs\" />\n </button>\n <button\n onFocus={handleFocus}\n onClick={(e) => changeNumberValue(e, false)}\n type=\"button\"\n className={cnTextField('CounterButton')}\n >\n <IconSelect size=\"xs\" />\n </button>\n </div>\n )}\n\n {!incrementButtons && withValue && withClearButton && !disabled && (\n <button\n type=\"button\"\n disabled={disabled}\n tabIndex={-1}\n onClick={handleClear}\n className={cnTextField('ClearButton')}\n >\n <IconClear\n size={sizeMap[size]}\n className={cnTextField('ClearButtonIcon')}\n />\n </button>\n )}\n\n {type === 'password' && inputRef.current?.value && (\n <button\n className={cnTextField('ClearButton')}\n type=\"button\"\n onClick={handleEyeClick}\n >\n <Eye className={cnTextField('Icon')} size={iconSize} />\n </button>\n )}\n\n {RightIcon && !incrementButtons && type !== 'password' && (\n <div\n className={cnTextField('Side', {\n position: 'right',\n type: rightSideIsString ? 'string' : 'icon',\n })}\n title={typeof rightSide === 'string' ? rightSide : undefined}\n >\n {rightSideIsString ? (\n rightSide\n ) : (\n <RightIcon className={cnTextField('Icon')} size={iconSize} />\n )}\n </div>\n )}\n </div>\n {caption && (\n <FieldCaption\n className={cnTextField('Caption')}\n status={status || state}\n >\n {caption}\n </FieldCaption>\n )}\n </div>\n </div>\n );\n};\n\nexport const TextField = forwardRef(TextFieldRender) as TextFieldComponent;\nexport * from './types';\n"],"mappings":"qsBAAA,wBAEA,OAASA,SAAT,KAA0B,yBAA1B,CACA,OAASC,OAAT,KAAwB,uBAAxB,CACA,OAASC,YAAT,KAA6B,4BAA7B,CACA,OAASC,UAAT,KAA2B,0BAA3B,CACA,MAAOC,MAAP,EAAgBC,UAAhB,CAA4BC,WAA5B,CAAyCC,SAAzC,KAA0D,OAA1D,CACA,MAAOC,iBAAP,KAA6B,yBAA7B,CAEA,OAASC,eAAT,2CACA,OAASC,YAAT,oCACA,OAASC,UAAT,gCACA,OAASC,OAAT,mCACA,OAASC,UAAT,yCACA,OAASC,aAAT,+CACA,OAASC,YAAT,6CACA,OAASC,EAAT,uBACA,OAASC,QAAT,4BACA,OAAS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SAAS,CAAET,WAAW,CAAC,aAAD,CADxB,CAEE,IAAI,CAAC,QAFP,CAGE,OAAO,CAAEmE,EAHX,EAKE,oBAAC,EAAD,EAAK,SAAS,CAAEnE,WAAW,CAAC,MAAD,CAA3B,CAAqC,IAAI,CAAEgD,EAA3C,EALF,CAvEJ,CAgFGyB,EAAS,EAAI,CAACvC,EAAd,EAA2C,UAAT,GAAA1B,CAAlC,EACC,2BACE,SAAS,CAAER,WAAW,CAAC,MAAD,CAAS,CAC7BiG,QAAQ,CAAE,OADmB,CAE7BzF,IAAI,CAAEmE,EAAiB,CAAG,QAAH,CAAc,MAFR,CAAT,CADxB,CAKE,KAAK,CAAuB,QAArB,QAAO5C,EAAP,CAAgCA,CAAhC,OALT,EAOG4C,EAAiB,CAChB5C,CADgB,CAGhB,oBAAC,EAAD,EAAW,SAAS,CAAE/B,WAAW,CAAC,MAAD,CAAjC,CAA2C,IAAI,CAAEgD,EAAjD,EAVJ,CAjFJ,CADF,CAiGGF,CAAO,EACN,oBAAC,YAAD,EACE,SAAS,CAAE9C,WAAW,CAAC,SAAD,CADxB,CAEE,MAAM,CAAEyB,CAAM,EAAID,CAFpB,EAIGsB,CAJH,CAlGJ,CAlBF,CA8HH,CAzXM,CA2XP,MAAO,IAAMqD,UAAS,CAAG1H,UAAU,CAACwB,eAAD,CAA5B,CACP"}
@@ -1,9 +1,10 @@
1
1
  import { IconPropSize } from '@consta/icons/Icon';
2
2
  import React from 'react';
3
- import { TextFieldPropSize } from './types';
3
+ import { TextFieldPropSize, TextFieldPropValue } from './types';
4
4
  export declare const sizeMap: Record<TextFieldPropSize, IconPropSize>;
5
5
  export declare const getValueByStepArray: (steps: number[], value: string | null | undefined, min: number | string | undefined, max: number | string | undefined, isIncrement: boolean) => number;
6
6
  export declare const getValueByStepNumber: (step: number | string, value: string | null | undefined, min: number | string | undefined, max: number | string | undefined, isIncrement: boolean) => number;
7
7
  export declare const getIncrementFlag: (event: React.KeyboardEvent) => boolean | null;
8
8
  export declare const getTypeForRender: (type: string, passwordVible: boolean) => string;
9
9
  export declare const getValueByStep: (steps: number | number[], value: string | null | undefined, isIncrement: boolean, min?: number | string, max?: number | string) => string;
10
+ export declare const inputValue: (value?: TextFieldPropValue) => string | undefined;
@@ -1,2 +1,2 @@
1
- export var sizeMap={xs:"xs",s:"s",m:"s",l:"m"};export var getValueByStepArray=function(a,b,c,d,e){var f=+(null!==b&&void 0!==b?b:c);if("string"!=typeof b)return"undefined"==typeof c?0:+c;if(f<a[0])return a[0];if(f>a[a.length-1])return a[a.length-1];if(!e&&f===a[0]||e&&f===a[a.length-1])return f;for(var g=0;g<a.length;g++)if(f===a[g]||a[g]<f&&a[g+1]>f)return a[g+(e?1:-1)];return 0};export var getValueByStepNumber=function(a,b,c,d,e){var f,g=+c,h=+d,i=("string"==typeof b?+b:0)+ +a*(e?1:-1);return!Number.isNaN(g)&&i<=g?g:!Number.isNaN(h)&&i>=h?h:+i.toFixed(+(null===(f=(+a).toString().split(".")[1])||void 0===f?void 0:f.length)||0)};export var getIncrementFlag=function(a){return"ArrowUp"!==(null===a||void 0===a?void 0:a.key)&&"ArrowDown"!==(null===a||void 0===a?void 0:a.key)?null:"ArrowUp"===(null===a||void 0===a?void 0:a.key)};export var getTypeForRender=function(a,b){return"password"===a?b?"text":"password":a};export var getValueByStep=function(a,b,c,d,e){return(Array.isArray(a)?getValueByStepArray(a,b,d,e,c):getValueByStepNumber(a,b,d,e,c)).toString()};
1
+ export var sizeMap={xs:"xs",s:"s",m:"s",l:"m"};export var getValueByStepArray=function(a,b,c,d,e){var f=+(null!==b&&void 0!==b?b:c);if("string"!=typeof b)return"undefined"==typeof c?0:+c;if(f<a[0])return a[0];if(f>a[a.length-1])return a[a.length-1];if(!e&&f===a[0]||e&&f===a[a.length-1])return f;for(var g=0;g<a.length;g++)if(f===a[g]||a[g]<f&&a[g+1]>f)return a[g+(e?1:-1)];return 0};export var getValueByStepNumber=function(a,b,c,d,e){var f,g=+c,h=+d,i=("string"==typeof b?+b:0)+ +a*(e?1:-1);return!Number.isNaN(g)&&i<=g?g:!Number.isNaN(h)&&i>=h?h:+i.toFixed(+(null===(f=(+a).toString().split(".")[1])||void 0===f?void 0:f.length)||0)};export var getIncrementFlag=function(a){return"ArrowUp"!==(null===a||void 0===a?void 0:a.key)&&"ArrowDown"!==(null===a||void 0===a?void 0:a.key)?null:"ArrowUp"===(null===a||void 0===a?void 0:a.key)};export var getTypeForRender=function(a,b){return"password"===a?b?"text":"password":a};export var getValueByStep=function(a,b,c,d,e){return(Array.isArray(a)?getValueByStepArray(a,b,d,e,c):getValueByStepNumber(a,b,d,e,c)).toString()};export var inputValue=function(a){return null===a?"":a};
2
2
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","names":["sizeMap","xs","s","m","l","getValueByStepArray","steps","value","min","max","isIncrement","currentValue","length","i","getValueByStepNumber","step","minValue","maxValue","Number","isNaN","toFixed","toString","split","getIncrementFlag","event","key","getTypeForRender","type","passwordVible","getValueByStep","Array","isArray"],"sources":["../../../../../src/components/TextField/helpers.ts"],"sourcesContent":["import { IconPropSize } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { TextFieldPropSize } from './types';\n\nexport const sizeMap: Record<TextFieldPropSize, IconPropSize> = {\n xs: 'xs',\n s: 's',\n m: 's',\n l: 'm',\n};\n\nexport const getValueByStepArray = (\n steps: number[],\n value: string | null | undefined,\n min: number | string | undefined,\n max: number | string | undefined,\n isIncrement: boolean,\n): number => {\n const currentValue = Number(value ?? min);\n const minValue = Number(min);\n if (typeof value !== 'string') {\n return typeof min !== 'undefined' ? minValue : 0;\n }\n if (currentValue < steps[0]) {\n return steps[0];\n }\n if (currentValue > steps[steps.length - 1]) {\n return steps[steps.length - 1];\n }\n if (\n (!isIncrement && currentValue === steps[0]) ||\n (isIncrement && currentValue === steps[steps.length - 1])\n ) {\n return currentValue;\n }\n for (let i = 0; i < steps.length; i++) {\n if (\n currentValue === steps[i] ||\n (steps[i] < currentValue && steps[i + 1] > currentValue)\n ) {\n return steps[i + (isIncrement ? 1 : -1)];\n }\n }\n return 0;\n};\n\nexport const getValueByStepNumber = (\n step: number | string,\n value: string | null | undefined,\n min: number | string | undefined,\n max: number | string | undefined,\n isIncrement: boolean,\n): number => {\n const minValue = Number(min);\n const maxValue = Number(max);\n const currentValue: number =\n (typeof value === 'string' ? Number(value) : 0) +\n Number(step) * (isIncrement ? 1 : -1);\n if (!Number.isNaN(minValue) && currentValue <= minValue) {\n return minValue;\n }\n if (!Number.isNaN(maxValue) && currentValue >= maxValue) {\n return maxValue;\n }\n return Number(\n currentValue.toFixed(\n Number(\n /* Необходимо для того, чтобы избежать ситуации, когда по нажатию\nна кнопку прибавляется число с погрешностью.\nЗдесь мы берем разрядность дробной части шага и ограничиваем\nрезультирующее число этой разрядностью */\n Number(step).toString().split('.')[1]?.length,\n ) || 0,\n ),\n );\n};\n\nexport const getIncrementFlag = (\n event: React.KeyboardEvent,\n): boolean | null => {\n if (event?.key !== 'ArrowUp' && event?.key !== 'ArrowDown') {\n return null;\n }\n return event?.key === 'ArrowUp';\n};\n\nexport const getTypeForRender = (type: string, passwordVible: boolean) => {\n if (type !== 'password') {\n return type;\n }\n if (passwordVible) {\n return 'text';\n }\n return 'password';\n};\n\nexport const getValueByStep = (\n steps: number | number[],\n value: string | null | undefined,\n isIncrement: boolean,\n min?: number | string,\n max?: number | string,\n) => {\n return (\n Array.isArray(steps)\n ? getValueByStepArray(steps, value, min, max, isIncrement)\n : getValueByStepNumber(steps, value, min, max, isIncrement)\n ).toString();\n};\n"],"mappings":"AAKA,MAAO,IAAMA,QAAgD,CAAG,CAC9DC,EAAE,CAAE,IAD0D,CAE9DC,CAAC,CAAE,GAF2D,CAG9DC,CAAC,CAAE,GAH2D,CAI9DC,CAAC,CAAE,GAJ2D,CAAzD,CAOP,MAAO,IAAMC,oBAAmB,CAAG,SACjCC,CADiC,CAEjCC,CAFiC,CAGjCC,CAHiC,CAIjCC,CAJi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ByStepArray","steps","value","min","max","isIncrement","currentValue","length","i","getValueByStepNumber","step","minValue","maxValue","Number","isNaN","toFixed","toString","split","getIncrementFlag","event","key","getTypeForRender","type","passwordVible","getValueByStep","Array","isArray","inputValue"],"sources":["../../../../../src/components/TextField/helpers.ts"],"sourcesContent":["import { IconPropSize } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { TextFieldPropSize, TextFieldPropValue } from './types';\n\nexport const sizeMap: Record<TextFieldPropSize, IconPropSize> = {\n xs: 'xs',\n s: 's',\n m: 's',\n l: 'm',\n};\n\nexport const getValueByStepArray = (\n steps: number[],\n value: string | null | undefined,\n min: number | string | undefined,\n max: number | string | undefined,\n isIncrement: boolean,\n): number => {\n const currentValue = Number(value ?? min);\n const minValue = Number(min);\n if (typeof value !== 'string') {\n return typeof min !== 'undefined' ? minValue : 0;\n }\n if (currentValue < steps[0]) {\n return steps[0];\n }\n if (currentValue > steps[steps.length - 1]) {\n return steps[steps.length - 1];\n }\n if (\n (!isIncrement && currentValue === steps[0]) ||\n (isIncrement && currentValue === steps[steps.length - 1])\n ) {\n return currentValue;\n }\n for (let i = 0; i < steps.length; i++) {\n if (\n currentValue === steps[i] ||\n (steps[i] < currentValue && steps[i + 1] > currentValue)\n ) {\n return steps[i + (isIncrement ? 1 : -1)];\n }\n }\n return 0;\n};\n\nexport const getValueByStepNumber = (\n step: number | string,\n value: string | null | undefined,\n min: number | string | undefined,\n max: number | string | undefined,\n isIncrement: boolean,\n): number => {\n const minValue = Number(min);\n const maxValue = Number(max);\n const currentValue: number =\n (typeof value === 'string' ? Number(value) : 0) +\n Number(step) * (isIncrement ? 1 : -1);\n if (!Number.isNaN(minValue) && currentValue <= minValue) {\n return minValue;\n }\n if (!Number.isNaN(maxValue) && currentValue >= maxValue) {\n return maxValue;\n }\n return Number(\n currentValue.toFixed(\n Number(\n /* Необходимо для того, чтобы избежать ситуации, когда по нажатию\nна кнопку прибавляется число с погрешностью.\nЗдесь мы берем разрядность дробной части шага и ограничиваем\nрезультирующее число этой разрядностью */\n Number(step).toString().split('.')[1]?.length,\n ) || 0,\n ),\n );\n};\n\nexport const getIncrementFlag = (\n event: React.KeyboardEvent,\n): boolean | null => {\n if (event?.key !== 'ArrowUp' && event?.key !== 'ArrowDown') {\n return null;\n }\n return event?.key === 'ArrowUp';\n};\n\nexport const getTypeForRender = (type: string, passwordVible: boolean) => {\n if (type !== 'password') {\n return type;\n }\n if (passwordVible) {\n return 'text';\n }\n return 'password';\n};\n\nexport const getValueByStep = (\n steps: number | number[],\n value: string | null | undefined,\n isIncrement: boolean,\n min?: number | string,\n max?: number | string,\n) => {\n return (\n Array.isArray(steps)\n ? getValueByStepArray(steps, value, min, max, isIncrement)\n : getValueByStepNumber(steps, value, min, max, isIncrement)\n ).toString();\n};\n\nexport const inputValue = (value?: TextFieldPropValue) =>\n value === null ? '' : value;\n"],"mappings":"AAKA,MAAO,IAAMA,QAAgD,CAAG,CAC9DC,EAAE,CAAE,IAD0D,CAE9DC,CAAC,CAAE,GAF2D,CAG9DC,CAAC,CAAE,GAH2D,CAI9DC,CAAC,CAAE,GAJ2D,CAAzD,CAOP,MAAO,IAAMC,oBAAmB,CAAG,SACjCC,CADiC,CAEjCC,CAFiC,CAGjCC,CAHiC,CAIjCC,CAJiC,CAKjCC,CALiC,CAMtB,IACLC,EAAY,UAAUJ,CAAV,WAAUA,CAAV,CAAUA,CAAV,CAAmBC,CAAnB,CADP,CAGX,GAAqB,QAAjB,QAAOD,EAAX,CACE,MAAsB,WAAf,QAAOC,EAAP,CAAwC,CAAxC,EAFeA,CAEtB,CAEF,GAAIG,CAAY,CAAGL,CAAK,CAAC,CAAD,CAAxB,CACE,MAAOA,EAAK,CAAC,CAAD,CAAZ,CAEF,GAAIK,CAAY,CAAGL,CAAK,CAACA,CAAK,CAACM,MAAN,CAAe,CAAhB,CAAxB,CACE,MAAON,EAAK,CAACA,CAAK,CAACM,MAAN,CAAe,CAAhB,CAAZ,CAEF,GACG,CAACF,CAAD,EAAg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,WAAAA,CAAK,WAALA,CAAA,QAAAA,CAAK,CAAEC,GAAP,GAA2C,WAAf,WAAAD,CAAK,WAALA,CAAA,QAAAA,CAAK,CAAEC,GAAP,CADb,CAEV,IAFU,CAIG,SAAf,WAAAD,CAAK,WAALA,CAAA,QAAAA,CAAK,CAAEC,GAAP,CACR,CAPM,CASP,MAAO,IAAMC,iBAAgB,CAAG,SAACC,CAAD,CAAeC,CAAf,CAA0C,OAC3D,UAAT,GAAAD,CADoE,CAIpEC,CAJoE,CAK/D,MAL+D,CAOjE,UAPiE,CAE/DD,CAMV,CARM,CAUP,MAAO,IAAME,eAAc,CAAG,SAC5BvB,CAD4B,CAE5BC,CAF4B,CAG5BG,CAH4B,CAI5BF,CAJ4B,CAK5BC,CAL4B,CAMzB,CACH,MAAO,CACLqB,KAAK,CAACC,OAAN,CAAczB,CAAd,EACID,mBAAmB,CAACC,CAAD,CAAQC,CAAR,CAAeC,CAAf,CAAoBC,CAApB,CAAyBC,CAAzB,CADvB,CAEII,oBAAoB,CAACR,CAAD,CAAQC,CAAR,CAAeC,CAAf,CAAoBC,CAApB,CAAyBC,CAAzB,CAHnB,EAILW,QAJK,EAKR,CAZM,CAcP,MAAO,IAAMW,WAAU,CAAG,SAACzB,CAAD,QACd,KAAV,GAAAA,CAAK,CAAY,EAAZ,CAAiBA,CADE,CAAnB"}
@@ -40,11 +40,6 @@ declare type InputRef<TYPE> = TYPE extends 'textarea' ? {
40
40
  } : {
41
41
  inputRef?: React.Ref<HTMLInputElement>;
42
42
  };
43
- export declare type TextFieldPropRightSide<TYPE extends string> = TYPE extends 'number' | 'password' ? {
44
- rightSide?: never;
45
- } : {
46
- rightSide?: string | IconComponent;
47
- };
48
43
  export declare type TextFieldProps<TYPE extends string> = PropsWithHTMLAttributes<{
49
44
  className?: string;
50
45
  value?: TextFieldPropValue;
@@ -91,6 +86,6 @@ export declare type TextFieldProps<TYPE extends string> = PropsWithHTMLAttribute
91
86
  onKeyUp?: React.KeyboardEventHandler;
92
87
  onKeyUpCapture?: React.KeyboardEventHandler;
93
88
  onKeyDown?: React.KeyboardEventHandler;
94
- }, HTMLDivElement> & InputRef<TYPE> & TextFieldPropsTextareaType<TYPE> & TextFieldPropRightSide<TYPE> & React.RefAttributes<HTMLDivElement>;
89
+ }, HTMLDivElement> & InputRef<TYPE> & TextFieldPropsTextareaType<TYPE> & React.RefAttributes<HTMLDivElement>;
95
90
  export declare type TextFieldComponent = <TYPE extends string>(props: TextFieldProps<TYPE>) => React.ReactElement | null;
96
91
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["textFieldPropSize","textFieldPropSizeDefault","textFieldPropView","textFieldPropViewDefault","textFieldPropForm","textFieldPropFormDefault","textFieldPropStatus"],"sources":["../../../../../src/components/TextField/types.ts"],"sourcesContent":["import { IconComponent, IconPropSize } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { AutoCompete } from '../../utils/types/AutoComplete';\nimport { PropsWithHTMLAttributes } from '../../utils/types/PropsWithHTMLAttributes';\n\nexport type TextFieldPropValue = string | null;\nexport type TextFieldPropName = string;\nexport type TextFieldPropId = string | number;\n\nexport const textFieldPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type TextFieldPropSize = typeof textFieldPropSize[number];\nexport const textFieldPropSizeDefault: TextFieldPropSize = textFieldPropSize[0];\n\nexport type TextFieldPropOnChange = (\n value: TextFieldPropValue,\n params: TextFieldOnChangeArguments,\n) => void;\nexport type TextFieldOnChangeArguments = {\n e: React.ChangeEvent | React.MouseEvent | React.KeyboardEvent;\n id?: TextFieldPropId;\n name?: TextFieldPropName;\n};\n\nexport const textFieldPropView = ['default', 'clear'] as const;\nexport type TextFieldPropView = typeof textFieldPropView[number];\nexport const textFieldPropViewDefault: TextFieldPropView = textFieldPropView[0];\n\nexport const textFieldPropForm = [\n 'default',\n 'defaultClear',\n 'defaultBrick',\n 'brick',\n 'brickDefault',\n 'brickClear',\n 'brickRound',\n 'round',\n 'roundClear',\n 'roundBrick',\n 'clearRound',\n 'clearDefault',\n 'clearBrick',\n 'clearClear',\n] as const;\nexport type TextFieldPropForm = typeof textFieldPropForm[number];\nexport const textFieldPropFormDefault: TextFieldPropForm = textFieldPropForm[0];\n\nexport const textFieldPropStatus = ['alert', 'success', 'warning'] as const;\nexport type TextFieldPropStatus = typeof textFieldPropStatus[number];\n\nexport type TextFieldPropsTextareaType<TYPE> = TYPE extends 'textarea'\n ?\n | {\n minRows?: never;\n maxRows?: never;\n rows?: number;\n }\n | {\n rows?: never;\n minRows?: number;\n maxRows?: number;\n }\n : {\n rows?: never;\n minRows?: never;\n maxRows?: never;\n };\n\ntype InputRef<TYPE> = TYPE extends 'textarea'\n ? { inputRef?: React.Ref<HTMLTextAreaElement> }\n : { inputRef?: React.Ref<HTMLInputElement> };\n\nexport type TextFieldPropRightSide<TYPE extends string> = TYPE extends\n | 'number'\n | 'password'\n ? {\n rightSide?: never;\n }\n : {\n rightSide?: string | IconComponent;\n };\n\nexport type TextFieldProps<TYPE extends string> = PropsWithHTMLAttributes<\n {\n className?: string;\n value?: TextFieldPropValue;\n defaultValue?: TextFieldPropValue;\n cols?: number;\n onChange?: TextFieldPropOnChange;\n id?: TextFieldPropId;\n name?: TextFieldPropName;\n type?: TYPE;\n disabled?: boolean;\n maxLength?: number;\n size?: TextFieldPropSize;\n view?: TextFieldPropView;\n form?: TextFieldPropForm;\n state?: TextFieldPropStatus;\n status?: TextFieldPropStatus;\n onFocus?: React.FocusEventHandler<HTMLElement>;\n onBlur?: React.FocusEventHandler<HTMLElement>;\n incrementButtons?: boolean;\n autoFocus?: boolean;\n placeholder?: string;\n leftSide?: string | IconComponent;\n rightSide?: string | IconComponent;\n withClearButton?: boolean;\n autoComplete?: AutoCompete;\n max?: number | string;\n min?: number | string;\n readOnly?: boolean;\n required?: boolean;\n step?: number | string | number[];\n tabIndex?: number;\n inputContainerRef?: React.Ref<HTMLDivElement>;\n ariaLabel?: string;\n iconSize?: IconPropSize;\n children?: never;\n label?: string;\n labelIcon?: IconComponent;\n caption?: string;\n labelPosition?: 'top' | 'left';\n focused?: boolean;\n onKeyDownCapture?: React.KeyboardEventHandler;\n onKeyPress?: React.KeyboardEventHandler;\n onKeyPressCapture?: React.KeyboardEventHandler;\n onKeyUp?: React.KeyboardEventHandler;\n onKeyUpCapture?: React.KeyboardEventHandler;\n onKeyDown?: React.KeyboardEventHandler;\n },\n HTMLDivElement\n> &\n InputRef<TYPE> &\n TextFieldPropsTextareaType<TYPE> &\n TextFieldPropRightSide<TYPE> &\n React.RefAttributes<HTMLDivElement>;\n\nexport type TextFieldComponent = <TYPE extends string>(\n props: TextFieldProps<TYPE>,\n) => React.ReactElement | null;\n"],"mappings":"AAUA,MAAO,IAAMA,kBAAiB,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAA1B,CAEP,MAAO,IAAMC,yBAA2C,CAAGD,iBAAiB,CAAC,CAAD,CAArE,CAYP,MAAO,IAAME,kBAAiB,CAAG,CAAC,SAAD,CAAY,OAAZ,CAA1B,CAEP,MAAO,IAAMC,yBAA2C,CAAGD,iBAAiB,CAAC,CAAD,CAArE,CAEP,MAAO,IAAME,kBAAiB,CAAG,CAC/B,SAD+B,CAE/B,cAF+B,CAG/B,cAH+B,CAI/B,OAJ+B,CAK/B,cAL+B,CAM/B,YAN+B,CAO/B,YAP+B,CAQ/B,OAR+B,CAS/B,YAT+B,CAU/B,YAV+B,CAW/B,YAX+B,CAY/B,cAZ+B,CAa/B,YAb+B,CAc/B,YAd+B,CAA1B,CAiBP,MAAO,IAAMC,yBAA2C,CAAGD,iBAAiB,CAAC,CAAD,CAArE,CAEP,MAAO,IAAME,oBAAmB,CAAG,CAAC,OAAD,CAAU,SAAV,CAAqB,SAArB,CAA5B"}
1
+ {"version":3,"file":"types.js","names":["textFieldPropSize","textFieldPropSizeDefault","textFieldPropView","textFieldPropViewDefault","textFieldPropForm","textFieldPropFormDefault","textFieldPropStatus"],"sources":["../../../../../src/components/TextField/types.ts"],"sourcesContent":["import { IconComponent, IconPropSize } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { AutoCompete } from '../../utils/types/AutoComplete';\nimport { PropsWithHTMLAttributes } from '../../utils/types/PropsWithHTMLAttributes';\n\nexport type TextFieldPropValue = string | null;\nexport type TextFieldPropName = string;\nexport type TextFieldPropId = string | number;\n\nexport const textFieldPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type TextFieldPropSize = typeof textFieldPropSize[number];\nexport const textFieldPropSizeDefault: TextFieldPropSize = textFieldPropSize[0];\n\nexport type TextFieldPropOnChange = (\n value: TextFieldPropValue,\n params: TextFieldOnChangeArguments,\n) => void;\nexport type TextFieldOnChangeArguments = {\n e: React.ChangeEvent | React.MouseEvent | React.KeyboardEvent;\n id?: TextFieldPropId;\n name?: TextFieldPropName;\n};\n\nexport const textFieldPropView = ['default', 'clear'] as const;\nexport type TextFieldPropView = typeof textFieldPropView[number];\nexport const textFieldPropViewDefault: TextFieldPropView = textFieldPropView[0];\n\nexport const textFieldPropForm = [\n 'default',\n 'defaultClear',\n 'defaultBrick',\n 'brick',\n 'brickDefault',\n 'brickClear',\n 'brickRound',\n 'round',\n 'roundClear',\n 'roundBrick',\n 'clearRound',\n 'clearDefault',\n 'clearBrick',\n 'clearClear',\n] as const;\nexport type TextFieldPropForm = typeof textFieldPropForm[number];\nexport const textFieldPropFormDefault: TextFieldPropForm = textFieldPropForm[0];\n\nexport const textFieldPropStatus = ['alert', 'success', 'warning'] as const;\nexport type TextFieldPropStatus = typeof textFieldPropStatus[number];\n\nexport type TextFieldPropsTextareaType<TYPE> = TYPE extends 'textarea'\n ?\n | {\n minRows?: never;\n maxRows?: never;\n rows?: number;\n }\n | {\n rows?: never;\n minRows?: number;\n maxRows?: number;\n }\n : {\n rows?: never;\n minRows?: never;\n maxRows?: never;\n };\n\ntype InputRef<TYPE> = TYPE extends 'textarea'\n ? { inputRef?: React.Ref<HTMLTextAreaElement> }\n : { inputRef?: React.Ref<HTMLInputElement> };\n\nexport type TextFieldProps<TYPE extends string> = PropsWithHTMLAttributes<\n {\n className?: string;\n value?: TextFieldPropValue;\n defaultValue?: TextFieldPropValue;\n cols?: number;\n onChange?: TextFieldPropOnChange;\n id?: TextFieldPropId;\n name?: TextFieldPropName;\n type?: TYPE;\n disabled?: boolean;\n maxLength?: number;\n size?: TextFieldPropSize;\n view?: TextFieldPropView;\n form?: TextFieldPropForm;\n state?: TextFieldPropStatus;\n status?: TextFieldPropStatus;\n onFocus?: React.FocusEventHandler<HTMLElement>;\n onBlur?: React.FocusEventHandler<HTMLElement>;\n incrementButtons?: boolean;\n autoFocus?: boolean;\n placeholder?: string;\n leftSide?: string | IconComponent;\n rightSide?: string | IconComponent;\n withClearButton?: boolean;\n autoComplete?: AutoCompete;\n max?: number | string;\n min?: number | string;\n readOnly?: boolean;\n required?: boolean;\n step?: number | string | number[];\n tabIndex?: number;\n inputContainerRef?: React.Ref<HTMLDivElement>;\n ariaLabel?: string;\n iconSize?: IconPropSize;\n children?: never;\n label?: string;\n labelIcon?: IconComponent;\n caption?: string;\n labelPosition?: 'top' | 'left';\n focused?: boolean;\n onKeyDownCapture?: React.KeyboardEventHandler;\n onKeyPress?: React.KeyboardEventHandler;\n onKeyPressCapture?: React.KeyboardEventHandler;\n onKeyUp?: React.KeyboardEventHandler;\n onKeyUpCapture?: React.KeyboardEventHandler;\n onKeyDown?: React.KeyboardEventHandler;\n },\n HTMLDivElement\n> &\n InputRef<TYPE> &\n TextFieldPropsTextareaType<TYPE> &\n React.RefAttributes<HTMLDivElement>;\n\nexport type TextFieldComponent = <TYPE extends string>(\n props: TextFieldProps<TYPE>,\n) => React.ReactElement | null;\n"],"mappings":"AAUA,MAAO,IAAMA,kBAAiB,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAA1B,CAEP,MAAO,IAAMC,yBAA2C,CAAGD,iBAAiB,CAAC,CAAD,CAArE,CAYP,MAAO,IAAME,kBAAiB,CAAG,CAAC,SAAD,CAAY,OAAZ,CAA1B,CAEP,MAAO,IAAMC,yBAA2C,CAAGD,iBAAiB,CAAC,CAAD,CAArE,CAEP,MAAO,IAAME,kBAAiB,CAAG,CAC/B,SAD+B,CAE/B,cAF+B,CAG/B,cAH+B,CAI/B,OAJ+B,CAK/B,cAL+B,CAM/B,YAN+B,CAO/B,YAP+B,CAQ/B,OAR+B,CAS/B,YAT+B,CAU/B,YAV+B,CAW/B,YAX+B,CAY/B,cAZ+B,CAa/B,YAb+B,CAc/B,YAd+B,CAA1B,CAiBP,MAAO,IAAMC,yBAA2C,CAAGD,iBAAiB,CAAC,CAAD,CAArE,CAEP,MAAO,IAAME,oBAAmB,CAAG,CAAC,OAAD,CAAU,SAAV,CAAqB,SAArB,CAA5B"}
@@ -1 +1 @@
1
- .UiKit--ColorPreview-Circle{border-radius:50%;box-shadow:var(--shadow-group);height:60px;overflow:hidden;position:relative;width:60px;z-index:0}.UiKit--ColorPreview-Circle:before{background-color:currentColor;border-radius:50%;bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:1}.UiKit--ColorPreview-Circle:after{background-image:linear-gradient(45deg,rgba(0,0,0,.5) 25%,transparent 0,transparent 75%,rgba(0,0,0,.5) 0,rgba(0,0,0,.5)),linear-gradient(45deg,rgba(0,0,0,.5) 25%,transparent 0,transparent 75%,rgba(0,0,0,.5) 0,rgba(0,0,0,.5));background-position:0 0,5px 5px;background-size:10px 10px;border-radius:0 99em 99em 0;content:"";height:100%;left:50%;position:absolute;top:0;transform:rotate(45deg);transform-origin:left center;width:50%;z-index:-1}.UiKit--ColorPreview-ColorCode{align-items:center;border-radius:var(--control-radius);cursor:pointer;display:flex;width:-moz-fit-content;width:fit-content}.UiKit--ColorPreview-ColorCode>.Icon{color:var(--color-typo-secondary);margin-right:var(--space-xs)}.UiKit--ColorPreview-ColorCode:hover{background-color:var(--color-bg-stripe);color:var(--color-typo-primary)}
1
+ .UiKit--ColorPreview-Circle{border-radius:50%;box-shadow:var(--shadow-group);flex:none;height:60px;overflow:hidden;position:relative;width:60px;z-index:0}.UiKit--ColorPreview-Circle:before{background-color:currentColor;border-radius:50%;bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:1}.UiKit--ColorPreview-Circle:after{background-image:linear-gradient(45deg,rgba(0,0,0,.5) 25%,transparent 0,transparent 75%,rgba(0,0,0,.5) 0,rgba(0,0,0,.5)),linear-gradient(45deg,rgba(0,0,0,.5) 25%,transparent 0,transparent 75%,rgba(0,0,0,.5) 0,rgba(0,0,0,.5));background-position:0 0,5px 5px;background-size:10px 10px;border-radius:0 99em 99em 0;content:"";height:100%;left:50%;position:absolute;top:0;transform:rotate(45deg);transform-origin:left center;width:50%;z-index:-1}.UiKit--ColorPreview-ColorCode{border-radius:var(--control-radius);cursor:pointer;width:-moz-fit-content;width:fit-content}.UiKit--ColorPreview-ColorCode>.Icon{color:var(--color-typo-secondary);margin-right:var(--space-xs)}.UiKit--ColorPreview-ColorCode:hover{background-color:var(--color-bg-stripe);color:var(--color-typo-primary)}
@@ -1,2 +1,2 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["color","value","clickHandler","opacity","description","className","rgba"];import"./ColorPreview.css";import{IconCopy}from"@consta/icons/IconCopy";import React from"react";import{Text}from"../../../components/Text/Text";import{cn}from"../../cn";import*as wp from"../../whitepaper/whitepaper";var cnColorPreview=cn("ColorPreview");export var ColorPreview=function(a){var b=a.color,c=a.value,d=a.clickHandler,e=a.opacity,f=a.description,g=a.className,h=a.rgba,i=_objectWithoutProperties(a,_excluded);return React.createElement("div",Object.assign({},i,{className:cnColorPreview("",[wp.ptIconPlus(),g])}),React.createElement("div",{className:cnColorPreview("Circle",[wp.ptIconPlus("icon",{"vertical-align":"top","indent-r":"m"}),wp.decorator({"indent-b":"l"})]),style:h?{color:"rgba(var(".concat(b,"), 0.5)")}:{color:"var(".concat(b,")")}}),React.createElement("div",{className:wp.ptIconPlus("block")},React.createElement(Text,{as:"h3",size:"m",font:"mono",view:"primary",lineHeight:"m",className:cnColorPreview("Name",[wp.decorator({"indent-b":"2xs","indent-l":"2xs"})])},b),React.createElement("div",{className:cnColorPreview("ColorCode",[wp.decorator({"indent-t":"none","space-h":"2xs"})]),onClick:function onClick(){navigator.clipboard.writeText(c),d()}},React.createElement(IconCopy,{size:"xs"}),React.createElement(Text,{size:"s",font:"mono",view:"primary",lineHeight:"m"},c)),React.createElement(Text,{as:"p",size:"s",view:"primary",lineHeight:"m",className:cnColorPreview("Description",[wp.decorator({"indent-t":"none","indent-l":"2xs"})])},f)))};export default ColorPreview;
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["color","value","clickHandler","opacity","description","className","rgba"];import"./ColorPreview.css";import{classnames}from"@bem-react/classnames";import{IconCopy}from"@consta/icons/IconCopy";import React from"react";import{Text}from"../../../components/Text";import{cnMixFlex}from"../../../mixs/MixFlex";import{cnMixSpace}from"../../../mixs/MixSpace";import{cn}from"../../cn";var cnColorPreview=cn("ColorPreview");export var ColorPreview=function(a){var b=a.color,c=a.value,d=a.clickHandler,e=a.opacity,f=a.description,g=a.className,h=a.rgba,i=_objectWithoutProperties(a,_excluded),j=(null===c||void 0===c?void 0:c.replace(/\s/g,""))||"";return React.createElement("div",Object.assign({},i,{className:classnames(cnMixFlex({gap:"m"}),g)}),React.createElement("div",{className:cnColorPreview("Circle"),style:h?{color:"rgba(var(".concat(b,"), 0.5)")}:{color:"var(".concat(b,")")}}),React.createElement("div",null,React.createElement(Text,{as:"h3",size:"m",font:"mono",view:"primary",lineHeight:"m",className:cnColorPreview("Name",[cnMixSpace({mB:"2xs"})])},b),React.createElement("div",{className:cnColorPreview("ColorCode",[cnMixFlex({gap:"2xs",align:"center"}),cnMixSpace({mB:"2xs"})]),onClick:function onClick(){navigator.clipboard.writeText(j),d()}},React.createElement(IconCopy,{size:"xs"}),React.createElement(Text,{size:"s",font:"mono",view:"primary",lineHeight:"m"},j)),React.createElement(Text,{as:"p",size:"s",view:"primary",lineHeight:"m",className:cnColorPreview("Description")},f)))};export default ColorPreview;
2
2
  //# sourceMappingURL=ColorPreview.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ColorPreview.js","names":["IconCopy","React","Text","cn","wp","cnColorPreview","ColorPreview","color","value","clickHandler","opacity","description","className","rgba","restProps","ptIconPlus","decorator","navigator","clipboard","writeText"],"sources":["../../../../../../src/uiKit/components/ColorPreview/ColorPreview.tsx"],"sourcesContent":["/* eslint-disable jsx-a11y/no-static-element-interactions */\n/* eslint-disable jsx-a11y/click-events-have-key-events */\nimport './ColorPreview.css';\n\nimport { IconCopy } from '@consta/icons/IconCopy';\nimport React from 'react';\n\nimport { Text } from '../../../components/Text/Text';\nimport { cn } from '../../cn';\nimport * as wp from '../../whitepaper/whitepaper';\n\nconst cnColorPreview = cn('ColorPreview');\n\ntype Props = {\n color: string;\n value: string;\n clickHandler: () => void;\n opacity?: boolean;\n description?: string;\n rgba?: boolean;\n className?: string;\n children?: never;\n};\n\nexport const ColorPreview: React.FC<Props> = ({\n color,\n value,\n clickHandler,\n opacity,\n description,\n className,\n rgba,\n ...restProps\n}) => {\n return (\n <div\n {...restProps}\n className={cnColorPreview('', [wp.ptIconPlus(), className])}\n >\n <div\n className={cnColorPreview('Circle', [\n wp.ptIconPlus('icon', { 'vertical-align': 'top', 'indent-r': 'm' }),\n wp.decorator({ 'indent-b': 'l' }),\n ])}\n style={\n !rgba\n ? { color: `var(${color})` }\n : { color: `rgba(var(${color}), 0.5)` }\n }\n />\n <div className={wp.ptIconPlus('block')}>\n <Text\n as=\"h3\"\n size=\"m\"\n font=\"mono\"\n view=\"primary\"\n lineHeight=\"m\"\n className={cnColorPreview('Name', [\n wp.decorator({ 'indent-b': '2xs', 'indent-l': '2xs' }),\n ])}\n >\n {color}\n </Text>\n <div\n className={cnColorPreview('ColorCode', [\n wp.decorator({ 'indent-t': 'none', 'space-h': '2xs' }),\n ])}\n onClick={() => {\n navigator.clipboard.writeText(value);\n clickHandler();\n }}\n >\n <IconCopy size=\"xs\" />\n <Text size=\"s\" font=\"mono\" view=\"primary\" lineHeight=\"m\">\n {value}\n </Text>\n </div>\n <Text\n as=\"p\"\n size=\"s\"\n view=\"primary\"\n lineHeight=\"m\"\n className={cnColorPreview('Description', [\n wp.decorator({ 'indent-t': 'none', 'indent-l': '2xs' }),\n ])}\n >\n {description}\n </Text>\n </div>\n </div>\n );\n};\n\nexport default ColorPreview;\n"],"mappings":"+KAEA,2BAEA,OAASA,QAAT,KAAyB,wBAAzB,CACA,MAAOC,MAAP,KAAkB,OAAlB,CAEA,OAASC,IAAT,qCACA,OAASC,EAAT,gBACA,MAAO,GAAKC,GAAZ,mCAEA,GAAMC,eAAc,CAAGF,EAAE,CAAC,cAAD,CAAzB,CAaA,MAAO,IAAMG,aAA6B,CAAG,WASvC,IARJC,EAQI,GARJA,KAQI,CAPJC,CAOI,GAPJA,KAOI,CANJC,CAMI,GANJA,YAMI,CALJC,CAKI,GALJA,OAKI,CAJJC,CAII,GAJJA,WAII,CAHJC,CAGI,GAHJA,SAGI,CAFJC,CAEI,GAFJA,IAEI,CADDC,CACC,uCACJ,MACE,4CACMA,CADN,EAEE,SAAS,CAAET,cAAc,CAAC,EAAD,CAAK,CAACD,EAAE,CAACW,UAAH,EAAD,CAAkBH,CAAlB,CAAL,CAF3B,GAIE,2BACE,SAAS,CAAEP,cAAc,CAAC,QAAD,CAAW,CAClCD,EAAE,CAACW,UAAH,CAAc,MAAd,CAAsB,CAAE,iBAAkB,KAApB,CAA2B,WAAY,GAAvC,CAAtB,CADkC,CAElCX,EAAE,CAACY,SAAH,CAAa,CAAE,WAAY,GAAd,CAAb,CAFkC,CAAX,CAD3B,CAKE,KAAK,CACFH,CAAD,CAEI,CAAEN,KAAK,oBAAcA,CAAd,WAAP,CAFJ,CACI,CAAEA,KAAK,eAASA,CAAT,KAAP,CAPR,EAJF,CAeE,2BAAK,SAAS,CAAEH,EAAE,CAACW,UAAH,CAAc,OAAd,CAAhB,EACE,oBAAC,IAAD,EACE,EAAE,CAAC,IADL,CAEE,IAAI,CAAC,GAFP,CAGE,IAAI,CAAC,MAHP,CAIE,IAAI,CAAC,SAJP,CAKE,UAAU,CAAC,GALb,CAME,SAAS,CAAEV,cAAc,CAAC,MAAD,CAAS,CAChCD,EAAE,CAACY,SAAH,CAAa,CAAE,WAAY,KAAd,CAAqB,WAAY,KAAjC,CAAb,CADgC,CAAT,CAN3B,EAUGT,CAVH,CADF,CAaE,2BACE,SAAS,CAAEF,cAAc,CAAC,WAAD,CAAc,CACrCD,EAAE,CAACY,SAAH,CAAa,CAAE,WAAY,MAAd,CAAsB,UAAW,KAAjC,CAAb,CADqC,CAAd,CAD3B,CAIE,OAAO,CAAE,kBAAM,CACbC,SAAS,CAACC,SAAV,CAAoBC,SAApB,CAA8BX,CAA9B,CADa,CAEbC,CAAY,EACb,CAPH,EASE,oBAAC,QAAD,EAAU,IAAI,CAAC,IAAf,EATF,CAUE,oBAAC,IAAD,EAAM,IAAI,CAAC,GAAX,CAAe,IAAI,CAAC,MAApB,CAA2B,IAAI,CAAC,SAAhC,CAA0C,UAAU,CAAC,GAArD,EACGD,CADH,CAVF,CAbF,CA2BE,oBAAC,IAAD,EACE,EAAE,CAAC,GADL,CAEE,IAAI,CAAC,GAFP,CAGE,IAAI,CAAC,SAHP,CAIE,UAAU,CAAC,GAJb,CAKE,SAAS,CAAEH,cAAc,CAAC,aAAD,CAAgB,CACvCD,EAAE,CAACY,SAAH,CAAa,CAAE,WAAY,MAAd,CAAsB,WAAY,KAAlC,CAAb,CADuC,CAAhB,CAL3B,EASGL,CATH,CA3BF,CAfF,CAwDH,CAnEM,CAqEP,cAAeL,aAAf"}
1
+ {"version":3,"file":"ColorPreview.js","names":["classnames","IconCopy","React","Text","cnMixFlex","cnMixSpace","cn","cnColorPreview","ColorPreview","color","valueProp","value","clickHandler","opacity","description","className","rgba","restProps","replace","gap","mB","align","navigator","clipboard","writeText"],"sources":["../../../../../../src/uiKit/components/ColorPreview/ColorPreview.tsx"],"sourcesContent":["/* eslint-disable jsx-a11y/no-static-element-interactions */\n/* eslint-disable jsx-a11y/click-events-have-key-events */\nimport './ColorPreview.css';\n\nimport { classnames } from '@bem-react/classnames';\nimport { IconCopy } from '@consta/icons/IconCopy';\nimport React from 'react';\n\nimport { Text } from '##/components/Text';\nimport { cnMixFlex } from '##/mixs/MixFlex';\nimport { cnMixSpace } from '##/mixs/MixSpace';\n\nimport { cn } from '../../cn';\n\nconst cnColorPreview = cn('ColorPreview');\n\ntype Props = {\n color: string;\n value: string;\n clickHandler: () => void;\n opacity?: boolean;\n description?: string;\n rgba?: boolean;\n className?: string;\n children?: never;\n};\n\nexport const ColorPreview: React.FC<Props> = ({\n color,\n value: valueProp,\n clickHandler,\n opacity,\n description,\n className,\n rgba,\n ...restProps\n}) => {\n const value = valueProp?.replace(/\\s/g, '') || '';\n\n return (\n <div\n {...restProps}\n className={classnames(cnMixFlex({ gap: 'm' }), className)}\n >\n <div\n className={cnColorPreview('Circle')}\n style={\n !rgba\n ? { color: `var(${color})` }\n : { color: `rgba(var(${color}), 0.5)` }\n }\n />\n <div>\n <Text\n as=\"h3\"\n size=\"m\"\n font=\"mono\"\n view=\"primary\"\n lineHeight=\"m\"\n className={cnColorPreview('Name', [cnMixSpace({ mB: '2xs' })])}\n >\n {color}\n </Text>\n <div\n className={cnColorPreview('ColorCode', [\n cnMixFlex({ gap: '2xs', align: 'center' }),\n cnMixSpace({ mB: '2xs' }),\n ])}\n onClick={() => {\n navigator.clipboard.writeText(value);\n clickHandler();\n }}\n >\n <IconCopy size=\"xs\" />\n <Text size=\"s\" font=\"mono\" view=\"primary\" lineHeight=\"m\">\n {value}\n </Text>\n </div>\n <Text\n as=\"p\"\n size=\"s\"\n view=\"primary\"\n lineHeight=\"m\"\n className={cnColorPreview('Description')}\n >\n {description}\n </Text>\n </div>\n </div>\n );\n};\n\nexport default ColorPreview;\n"],"mappings":"+KAEA,2BAEA,OAASA,UAAT,KA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AAD,CAD4B,CAErChB,UAAU,CAAC,CAAEe,EAAE,CAAE,KAAN,CAAD,CAF2B,CAAd,CAD3B,CAKE,OAAO,CAAE,kBAAM,CACbE,SAAS,CAACC,SAAV,CAAoBC,SAApB,CAA8Bb,CAA9B,CADa,CAEbC,CAAY,EACb,CARH,EAUE,oBAAC,QAAD,EAAU,IAAI,CAAC,IAAf,EAVF,CAWE,oBAAC,IAAD,EAAM,IAAI,CAAC,GAAX,CAAe,IAAI,CAAC,MAApB,CAA2B,IAAI,CAAC,SAAhC,CAA0C,UAAU,CAAC,GAArD,EACGD,CADH,CAXF,CAXF,CA0BE,oBAAC,IAAD,EACE,EAAE,CAAC,GADL,CAEE,IAAI,CAAC,GAFP,CAGE,IAAI,CAAC,SAHP,CAIE,UAAU,CAAC,GAJb,CAKE,SAAS,CAAEJ,cAAc,CAAC,aAAD,CAL3B,EAOGO,CAPH,CA1BF,CAZF,CAkDH,CA/DM,CAiEP,cAAeN,aAAf"}
@@ -1 +1 @@
1
- .UiKit--ThemePreview-Snackbar{bottom:0;position:fixed;right:var(--space-m);z-index:9999}
1
+ .UiKit--ThemePreview-Snackbar{bottom:var(--space-m);position:fixed;right:var(--space-m);z-index:9999}
@@ -1,2 +1,2 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import"./ThemePreview.css";import React,{useReducer}from"react";import{useStyleProps}from"../../../hooks/useStyleProps";import{cnMixSpace}from"../../../mixs/MixSpace/MixSpace";import{SnackBar}from"../../../components/SnackBar/SnackBar";import{Text}from"../../../components/Text/Text";import{cn}from"../../cn";import*as wp from"../../whitepaper/whitepaper";import{ColorPreview}from"../ColorPreview/ColorPreview";import{bgColors,clearControls,defaultControls,disableControls,ghostControls,primaryControls,scrollbarColors,secondaryControls,typoColors}from"./helpers";var cnThemePreview=cn("ThemePreview"),cssColorVars=["--color-bg-default","--color-bg-secondary","--color-bg-brand","--color-bg-link","--color-bg-border","--color-bg-stripe","--color-bg-ghost","--color-bg-tone","--color-bg-soft","--color-bg-system","--color-bg-normal","--color-bg-success","--color-bg-caution","--color-bg-warning","--color-bg-alert","--color-bg-critical","--color-typo-primary","--color-typo-secondary","--color-typo-ghost","--color-typo-brand","--color-typo-system","--color-typo-normal","--color-typo-success","--color-typo-caution","--color-typo-warning","--color-typo-alert","--color-typo-critical","--color-typo-link","--color-typo-link-minor","--color-typo-link-hover","--color-scroll-bg","--color-scroll-thumb","--color-scroll-thumb-hover","--color-control-bg-default","--color-control-typo-default","--color-control-typo-placeholder","--color-control-bg-border-default","--color-control-bg-border-default-hover","--color-control-bg-border-focus","--color-control-bg-focus","--color-control-bg-active","--color-control-bg-primary","--color-control-bg-primary-hover","--color-control-typo-primary","--color-control-typo-primary-hover","--color-control-bg-secondary","--color-control-bg-border-secondary","--color-control-bg-border-secondary-hover","--color-control-typo-secondary","--color-control-typo-secondary-hover","--color-control-bg-ghost","--color-control-bg-ghost-hover","--color-control-typo-ghost","--color-control-typo-ghost-hover","--color-control-bg-clear","--color-control-bg-clear-hover","--color-control-typo-clear","--color-control-typo-clear-hover","--color-control-bg-disable","--color-control-bg-border-disable","--color-control-typo-disable"];function reducer(a,b){switch(b.type){case"add":return[].concat(_toConsumableArray(a),[b.item]);case"remove":return a.filter(function(a){return a.key!==b.key});}}export var ThemePreview=function(){var a=useReducer(reducer,[]),b=_slicedToArray(a,2),c=b[0],d=b[1],e=function(a){return function(){d({type:"add",item:{key:"".concat(a.color,"-").concat(c.length+1),message:"\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E \u0432 \u0431\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0435\u043D\u0430",status:"system",autoClose:3,onClose:function onClose(a){d({type:"remove",key:a.key})}}})}},f=useStyleProps(cssColorVars),g=_slicedToArray(f,2),h=g[0],i=g[1];return React.createElement("div",{ref:h,className:wp.layout()},React.createElement(SnackBar,{className:cnThemePreview("Snackbar"),items:c}),React.createElement("div",{className:wp.layout("content")},React.createElement("div",{className:wp.layout("container",{size:"m"})},React.createElement("section",null,React.createElement(Text,{as:"h2",size:"xl",view:"primary",weight:"bold",className:cnMixSpace({mB:"xl",mT:"3xl"}),lineHeight:"m"},"\u0426\u0432\u0435\u0442\u0430 \u0444\u043E\u043D\u043E\u0432"),React.createElement("div",{className:wp.tplGrid({"s-ratio":"1-1-1","col-gap":"full","row-gap":"full"})},bgColors.map(function(a,b){var c=a.color,d=a.description;return React.createElement(ColorPreview,{value:i[c],color:c,description:d,key:b,clickHandler:e(a)})}))),React.createElement("section",null,React.createElement(Text,{as:"h2",size:"xl",view:"primary",weight:"bold",className:cnMixSpace({mB:"xl",mT:"3xl"}),lineHeight:"m"},"\u0426\u0432\u0435\u0442\u0430 \u0442\u0438\u043F\u043E\u0433\u0440\u0430\u0444\u0438\u043A\u0438"),React.createElement("div",{className:wp.tplGrid({"s-ratio":"1-1-1","col-gap":"full","row-gap":"full"})},typoColors.map(function(a,b){return React.createElement(ColorPreview,{value:i[a.color],color:a.color,description:a.description,key:b,clickHandler:e(a)})}))),React.createElement("section",null,React.createElement(Text,{as:"h2",size:"xl",view:"primary",weight:"bold",className:cnMixSpace({mB:"xl",mT:"3xl"}),lineHeight:"m"},"\u0426\u0432\u0435\u0442\u0430 \u0441\u043A\u0440\u043E\u043B\u043B\u0431\u0430\u0440\u0430"),React.createElement("div",{className:wp.tplGrid({"s-ratio":"1-1-1","col-gap":"full","row-gap":"full"})},scrollbarColors.map(function(a,b){return React.createElement(ColorPreview,{value:i[a.color],color:a.color,description:a.description,key:b,clickHandler:e(a)})}))),React.createElement("section",null,React.createElement(Text,{as:"h2",size:"xl",view:"primary",weight:"bold",className:cnMixSpace({mB:"xl",mT:"3xl"}),lineHeight:"m"},"\u0426\u0432\u0435\u0442\u0430 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u043E\u0432"),React.createElement("div",{className:wp.tplGrid({"s-ratio":"1-1-1","col-gap":"full","row-gap":"full"})},React.createElement("section",null,React.createElement("h3",{className:"text text_size_l text_view_secondary text_transform_uppercase text_weight-semibold text_spacing_xs decorator decorator_indent-b_xs"},"Default"),React.createElement("p",{className:"text text_size_m text_view_secondary decorator decorator_indent-b_3xl decorator_space-b_m decorator_border_b"},"\u0426\u0432\u0435\u0442\u0430 \u0434\u043B\u044F \u0431\u043E\u043B\u044C\u0448\u0438\u043D\u0441\u0442\u0432\u0430 \u043D\u0435\u0439\u0442\u0440\u0430\u043B\u044C\u043D\u044B\u0445 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u043E\u0432"),React.createElement("div",{className:"tpl-grid tpl-grid_col-gap_full tpl-grid_row-gap_full"},defaultControls.map(function(a,b){return React.createElement(ColorPreview,{value:i[a.color],color:a.color,description:a.description,key:b,clickHandler:e(a)})}))),React.createElement("section",null,React.createElement("h3",{className:"text text_size_l text_view_secondary text_transform_uppercase text_weight-semibold text_spacing_xs decorator decorator_indent-b_xs"},"Primary"),React.createElement("p",{className:"text text_size_m text_view_secondary decorator decorator_indent-b_3xl decorator_space-b_m decorator_border_b"},"\u0426\u0432\u0435\u0442\u0430 \u0434\u043B\u044F \u0430\u043A\u0446\u0435\u043D\u0442\u043D\u044B\u0445 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u043E\u0432 \u0438 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0439"),React.createElement("div",{className:"tpl-grid tpl-grid_col-gap_full tpl-grid_row-gap_full"},primaryControls.map(function(a,b){return React.createElement(ColorPreview,{value:i[a.color],color:a.color,description:a.description,key:b,clickHandler:e(a)})}))),React.createElement("section",null,React.createElement("h3",{className:"text text_size_l text_view_secondary text_transform_uppercase text_weight-semibold text_spacing_xs decorator decorator_indent-b_xs"},"Secondary"),React.createElement("p",{className:"text text_size_m text_view_secondary decorator decorator_indent-b_3xl decorator_space-b_m decorator_border_b"},"\u0426\u0432\u0435\u0442\u0430 \u0434\u043B\u044F \u0432\u0442\u043E\u0440\u043E\u0441\u0442\u0435\u043F\u0435\u043D\u043D\u044B\u0445 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u043E\u0432 (\u043F\u0440\u0435\u0438\u043C\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043D\u043D\u043E \u043A\u043D\u043E\u043F\u043A\u0438)"),React.createElement("div",{className:"tpl-grid tpl-grid_col-gap_full tpl-grid_row-gap_full"},secondaryControls.map(function(a,b){return React.createElement(ColorPreview,{value:i[a.color],color:a.color,description:a.description,key:b,clickHandler:e(a)})}))),React.createElement("section",{className:cnMixSpace({mB:"xl",mT:"3xl"})},React.createElement("h3",{className:"text text_size_l text_view_secondary text_transform_uppercase text_weight-semibold text_spacing_xs decorator decorator_indent-b_xs"},"Ghost"),React.createElement("p",{className:"text text_size_m text_view_secondary decorator decorator_indent-b_3xl decorator_space-b_m decorator_border_b"},"\u0426\u0432\u0435\u0442\u0430 \u0434\u043B\u044F \u0442\u0440\u0435\u0442\u044C\u0435\u0441\u0442\u0435\u043F\u0435\u043D\u043D\u044B\u0445 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u043E\u0432, \u0447\u0430\u0441\u0442\u043E \u0438\u0434\u0443\u0449\u0438\u0445 \u0432 \u043F\u0430\u0440\u0435 \u0441 Primary"),React.createElement("div",{className:"tpl-grid tpl-grid_col-gap_full tpl-grid_row-gap_full"},ghostControls.map(function(a,b){return React.createElement(ColorPreview,{value:i[a.color],color:a.color,description:a.description,key:b,clickHandler:e(a)})}))),React.createElement("section",{className:cnMixSpace({mB:"xl",mT:"3xl"})},React.createElement("h3",{className:"text text_size_l text_view_secondary text_transform_uppercase text_weight-semibold text_spacing_xs decorator decorator_indent-b_xs"},"Clear"),React.createElement("p",{className:"text text_size_m text_view_secondary decorator decorator_indent-b_3xl decorator_space-b_m decorator_border_b"},"\u0426\u0432\u0435\u0442\u0430 \u0434\u043B\u044F \xAB\u043D\u0435\u0432\u0438\u0434\u0438\u043C\u044B\u0445\xBB \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u043E\u0432 (\u043F\u0440\u0438\u043C\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043D\u043D\u043E \u043A\u043D\u043E\u043F\u043A\u0438 \u0431\u0435\u0437 \u044F\u0432\u043D\u043E\u0439 \u0433\u0440\u0430\u043D\u0438\u0446\u044B)"),React.createElement("div",{className:"tpl-grid tpl-grid_col-gap_full tpl-grid_row-gap_full"},clearControls.map(function(a,b){return React.createElement(ColorPreview,{value:i[a.color],color:a.color,description:a.description,key:b,clickHandler:e(a)})}))),React.createElement("section",{className:cnMixSpace({mB:"xl",mT:"3xl"})},React.createElement("h3",{className:"text text_size_l text_view_secondary text_transform_uppercase text_weight-semibold text_spacing_xs decorator decorator_indent-b_xs"},"Disable"),React.createElement("p",{className:"text text_size_m text_view_secondary decorator decorator_indent-b_3xl decorator_space-b_m decorator_border_b"},"\u0426\u0432\u0435\u0442\u0430 \u0434\u043B\u044F \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u043E\u0432"),React.createElement("div",{className:"tpl-grid tpl-grid_col-gap_full tpl-grid_row-gap_full"},disableControls.map(function(a,b){return React.createElement(ColorPreview,{value:i[a.color],color:a.color,description:a.description,key:b,clickHandler:e(a)})}))))))))};export default ColorPreview;
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import"./ThemePreview.css";import React,{useReducer}from"react";import{Grid}from"../../../components/Grid";import{Text}from"../../../components/Text";import{useStyleProps}from"../../../hooks/useStyleProps";import{cnMixSpace}from"../../../mixs/MixSpace/MixSpace";import{SnackBar}from"../../../components/SnackBar/SnackBar";import{cn}from"../../cn";import{ColorPreview}from"../ColorPreview/ColorPreview";import{bgColors,clearControls,defaultControls,disableControls,ghostControls,primaryControls,scrollbarColors,secondaryControls,typoColors}from"./helpers";var cnThemePreview=cn("ThemePreview"),cssColorVars=["--color-bg-default","--color-bg-secondary","--color-bg-brand","--color-bg-link","--color-bg-border","--color-bg-stripe","--color-bg-ghost","--color-bg-tone","--color-bg-soft","--color-bg-system","--color-bg-normal","--color-bg-success","--color-bg-caution","--color-bg-warning","--color-bg-alert","--color-bg-critical","--color-typo-primary","--color-typo-secondary","--color-typo-ghost","--color-typo-brand","--color-typo-system","--color-typo-normal","--color-typo-success","--color-typo-caution","--color-typo-warning","--color-typo-alert","--color-typo-critical","--color-typo-link","--color-typo-link-minor","--color-typo-link-hover","--color-scroll-bg","--color-scroll-thumb","--color-scroll-thumb-hover","--color-control-bg-default","--color-control-typo-default","--color-control-typo-placeholder","--color-control-bg-border-default","--color-control-bg-border-default-hover","--color-control-bg-border-focus","--color-control-bg-focus","--color-control-bg-active","--color-control-bg-primary","--color-control-bg-primary-hover","--color-control-typo-primary","--color-control-typo-primary-hover","--color-control-bg-secondary","--color-control-bg-border-secondary","--color-control-bg-border-secondary-hover","--color-control-typo-secondary","--color-control-typo-secondary-hover","--color-control-bg-ghost","--color-control-bg-ghost-hover","--color-control-typo-ghost","--color-control-typo-ghost-hover","--color-control-bg-clear","--color-control-bg-clear-hover","--color-control-typo-clear","--color-control-typo-clear-hover","--color-control-bg-disable","--color-control-bg-border-disable","--color-control-typo-disable"];function reducer(a,b){switch(b.type){case"add":return[].concat(_toConsumableArray(a),[b.item]);case"remove":return a.filter(function(a){return a.key!==b.key});}}export var ThemePreview=function(){var a=useReducer(reducer,[]),b=_slicedToArray(a,2),c=b[0],d=b[1],e=function(a){return function(){d({type:"add",item:{key:"".concat(a.color,"-").concat(c.length+1),message:"\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E \u0432 \u0431\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0435\u043D\u0430",status:"system",autoClose:3,onClose:function onClose(a){d({type:"remove",key:a.key})}}})}},f=useStyleProps(cssColorVars),g=_slicedToArray(f,2),h=g[0],i=g[1],j={breakpointsForRef:h,breakpoints:{620:{cols:2},760:{cols:3}},colGap:"m",rowGap:"l",cols:1,className:cnMixSpace({mB:"3xl"})};return React.createElement("div",{ref:h},React.createElement(SnackBar,{className:cnThemePreview("Snackbar"),items:c}),React.createElement("section",null,React.createElement(Text,{as:"h2",size:"xl",view:"primary",weight:"bold",className:cnMixSpace({mB:"xl",mT:"3xl"}),lineHeight:"m"},"\u0426\u0432\u0435\u0442\u0430 \u0444\u043E\u043D\u043E\u0432"),React.createElement(Grid,j,bgColors.map(function(a,b){var c=a.color,d=a.description;return React.createElement(ColorPreview,{value:i[c],color:c,description:d,key:b,clickHandler:e(a)})}))),React.createElement("section",null,React.createElement(Text,{as:"h2",size:"xl",view:"primary",weight:"bold",className:cnMixSpace({mB:"xl"}),lineHeight:"m"},"\u0426\u0432\u0435\u0442\u0430 \u0442\u0438\u043F\u043E\u0433\u0440\u0430\u0444\u0438\u043A\u0438"),React.createElement(Grid,j,typoColors.map(function(a,b){return React.createElement(ColorPreview,{value:i[a.color],color:a.color,description:a.description,key:b,clickHandler:e(a)})}))),React.createElement("section",null,React.createElement(Text,{as:"h2",size:"xl",view:"primary",weight:"bold",className:cnMixSpace({mB:"xl"}),lineHeight:"m"},"\u0426\u0432\u0435\u0442\u0430 \u0441\u043A\u0440\u043E\u043B\u043B\u0431\u0430\u0440\u0430"),React.createElement(Grid,j,scrollbarColors.map(function(a,b){return React.createElement(ColorPreview,{value:i[a.color],color:a.color,description:a.description,key:b,clickHandler:e(a)})}))),React.createElement("section",null,React.createElement(Text,{as:"h2",size:"xl",view:"primary",weight:"bold",className:cnMixSpace({mB:"xl"}),lineHeight:"m"},"\u0426\u0432\u0435\u0442\u0430 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u043E\u0432"),React.createElement("div",null,React.createElement("section",null,React.createElement(Text,{as:"h3",size:"l",view:"secondary",transform:"uppercase",weight:"semibold",spacing:"xs",className:cnMixSpace({mB:"xs"})},"Default"),React.createElement(Text,{as:"p",size:"m",view:"secondary",className:cnMixSpace({mB:"xl"})},"\u0426\u0432\u0435\u0442\u0430 \u0434\u043B\u044F \u0431\u043E\u043B\u044C\u0448\u0438\u043D\u0441\u0442\u0432\u0430 \u043D\u0435\u0439\u0442\u0440\u0430\u043B\u044C\u043D\u044B\u0445 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u043E\u0432"),React.createElement(Grid,j,defaultControls.map(function(a,b){return React.createElement(ColorPreview,{value:i[a.color],color:a.color,description:a.description,key:b,clickHandler:e(a)})}))),React.createElement("section",null,React.createElement(Text,{as:"h3",size:"l",view:"secondary",transform:"uppercase",weight:"semibold",spacing:"xs",className:cnMixSpace({mB:"xs"})},"Primary"),React.createElement(Text,{as:"p",size:"m",view:"secondary",className:cnMixSpace({mB:"xl"})},"\u0426\u0432\u0435\u0442\u0430 \u0434\u043B\u044F \u0430\u043A\u0446\u0435\u043D\u0442\u043D\u044B\u0445 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u043E\u0432 \u0438 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0439"),React.createElement(Grid,j,primaryControls.map(function(a,b){return React.createElement(ColorPreview,{value:i[a.color],color:a.color,description:a.description,key:b,clickHandler:e(a)})}))),React.createElement("section",null,React.createElement(Text,{as:"h3",size:"l",view:"secondary",transform:"uppercase",weight:"semibold",spacing:"xs",className:cnMixSpace({mB:"xs"})},"Secondary"),React.createElement(Text,{as:"p",size:"m",view:"secondary",className:cnMixSpace({mB:"xl"})},"\u0426\u0432\u0435\u0442\u0430 \u0434\u043B\u044F \u0432\u0442\u043E\u0440\u043E\u0441\u0442\u0435\u043F\u0435\u043D\u043D\u044B\u0445 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u043E\u0432 (\u043F\u0440\u0435\u0438\u043C\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043D\u043D\u043E \u043A\u043D\u043E\u043F\u043A\u0438)"),React.createElement(Grid,j,secondaryControls.map(function(a,b){return React.createElement(ColorPreview,{value:i[a.color],color:a.color,description:a.description,key:b,clickHandler:e(a)})}))),React.createElement("section",{className:cnMixSpace({mB:"xl"})},React.createElement(Text,{as:"h3",size:"l",view:"secondary",transform:"uppercase",weight:"semibold",spacing:"xs",className:cnMixSpace({mB:"xs"})},"Ghost"),React.createElement(Text,{as:"p",size:"m",view:"secondary",className:cnMixSpace({mB:"xl"})},"\u0426\u0432\u0435\u0442\u0430 \u0434\u043B\u044F \u0442\u0440\u0435\u0442\u044C\u0435\u0441\u0442\u0435\u043F\u0435\u043D\u043D\u044B\u0445 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u043E\u0432, \u0447\u0430\u0441\u0442\u043E \u0438\u0434\u0443\u0449\u0438\u0445 \u0432 \u043F\u0430\u0440\u0435 \u0441 Primary"),React.createElement(Grid,j,ghostControls.map(function(a,b){return React.createElement(ColorPreview,{value:i[a.color],color:a.color,description:a.description,key:b,clickHandler:e(a)})}))),React.createElement("section",{className:cnMixSpace({mB:"xl"})},React.createElement(Text,{as:"h3",size:"l",view:"secondary",transform:"uppercase",weight:"semibold",spacing:"xs",className:cnMixSpace({mB:"xs"})},"Clear"),React.createElement(Text,{as:"p",size:"m",view:"secondary",className:cnMixSpace({mB:"xl"})},"\u0426\u0432\u0435\u0442\u0430 \u0434\u043B\u044F \xAB\u043D\u0435\u0432\u0438\u0434\u0438\u043C\u044B\u0445\xBB \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u043E\u0432 (\u043F\u0440\u0438\u043C\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043D\u043D\u043E \u043A\u043D\u043E\u043F\u043A\u0438 \u0431\u0435\u0437 \u044F\u0432\u043D\u043E\u0439 \u0433\u0440\u0430\u043D\u0438\u0446\u044B)"),React.createElement(Grid,j,clearControls.map(function(a,b){return React.createElement(ColorPreview,{value:i[a.color],color:a.color,description:a.description,key:b,clickHandler:e(a)})}))),React.createElement("section",{className:cnMixSpace({mB:"xl"})},React.createElement(Text,{as:"h3",size:"l",view:"secondary",transform:"uppercase",weight:"semibold",spacing:"xs",className:cnMixSpace({mB:"xs"})},"Disable"),React.createElement(Text,{as:"p",size:"m",view:"secondary",className:cnMixSpace({mB:"xl"})},"\u0426\u0432\u0435\u0442\u0430 \u0434\u043B\u044F \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u043E\u0432"),React.createElement(Grid,j,disableControls.map(function(a,b){return React.createElement(ColorPreview,{value:i[a.color],color:a.color,description:a.description,key:b,clickHandler:e(a)})}))))))};export default ColorPreview;
2
2
  //# sourceMappingURL=ThemePreview.js.map