@consta/uikit 5.30.0 → 5.32.0

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 (510) hide show
  1. package/ColorPicker/index.d.ts +1 -0
  2. package/ColorPicker/index.js +1 -0
  3. package/FileCanary/index.d.ts +1 -0
  4. package/FileCanary/index.js +1 -0
  5. package/__internal__/src/components/Attachment/Attachment.css +1 -1
  6. package/__internal__/src/components/Attachment/types.d.ts +1 -1
  7. package/__internal__/src/components/Attachment/types.js.map +1 -1
  8. package/__internal__/src/components/AttachmentDeprecated/Attachment.css +1 -1
  9. package/__internal__/src/components/AttachmentDeprecated/AttachmentDeprecated.js.map +1 -1
  10. package/__internal__/src/components/AttachmentDeprecated/types.d.ts +1 -1
  11. package/__internal__/src/components/AttachmentDeprecated/types.js.map +1 -1
  12. package/__internal__/src/components/AutoComplete/AutoComplete.js +1 -1
  13. package/__internal__/src/components/AutoComplete/AutoComplete.js.map +1 -1
  14. package/__internal__/src/components/AutoComplete/helpers.d.ts +1 -0
  15. package/__internal__/src/components/AutoComplete/types.d.ts +1 -0
  16. package/__internal__/src/components/AutoComplete/types.js.map +1 -1
  17. package/__internal__/src/components/AutoCompleteCanary/AutoCompleteTypeText/AutoCompleteTypeText.js +1 -1
  18. package/__internal__/src/components/AutoCompleteCanary/AutoCompleteTypeText/AutoCompleteTypeText.js.map +1 -1
  19. package/__internal__/src/components/AutoCompleteCanary/AutoCompleteTypeTextArray/AutoCompleteTypeTextArray.js +1 -1
  20. package/__internal__/src/components/AutoCompleteCanary/AutoCompleteTypeTextArray/AutoCompleteTypeTextArray.js.map +1 -1
  21. package/__internal__/src/components/AutoCompleteCanary/helpers.d.ts +1 -0
  22. package/__internal__/src/components/AutoCompleteCanary/types.d.ts +1 -0
  23. package/__internal__/src/components/AutoCompleteCanary/types.js.map +1 -1
  24. package/__internal__/src/components/Avatar/Avatar.d.ts +2 -2
  25. package/__internal__/src/components/Avatar/Avatar.js.map +1 -1
  26. package/__internal__/src/components/AvatarGroup/types.d.ts +2 -2
  27. package/__internal__/src/components/AvatarGroup/types.js.map +1 -1
  28. package/__internal__/src/components/Badge/Badge.css +2 -2
  29. package/__internal__/src/components/Badge/maps.js.map +1 -1
  30. package/__internal__/src/components/Badge/types.d.ts +4 -4
  31. package/__internal__/src/components/Badge/types.js.map +1 -1
  32. package/__internal__/src/components/Banner/Banner.d.ts +4 -4
  33. package/__internal__/src/components/Banner/Banner.js.map +1 -1
  34. package/__internal__/src/components/BookmarkTabs/BookmarkTabs.js.map +1 -1
  35. package/__internal__/src/components/BookmarkTabs/types.d.ts +3 -3
  36. package/__internal__/src/components/BookmarkTabs/types.js.map +1 -1
  37. package/__internal__/src/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
  38. package/__internal__/src/components/Breadcrumbs/types.d.ts +2 -2
  39. package/__internal__/src/components/Breadcrumbs/types.js.map +1 -1
  40. package/__internal__/src/components/Button/Button.d.ts +4 -4
  41. package/__internal__/src/components/Button/Button.js.map +1 -1
  42. package/__internal__/src/components/Card/Card.d.ts +3 -3
  43. package/__internal__/src/components/Card/Card.js.map +1 -1
  44. package/__internal__/src/components/Checkbox/Checkbox.css +2 -2
  45. package/__internal__/src/components/Checkbox/Checkbox.d.ts +3 -3
  46. package/__internal__/src/components/Checkbox/Checkbox.js.map +1 -1
  47. package/__internal__/src/components/CheckboxDeprecated/Checkbox.css +2 -2
  48. package/__internal__/src/components/CheckboxDeprecated/CheckboxDeprecated.d.ts +3 -3
  49. package/__internal__/src/components/CheckboxDeprecated/CheckboxDeprecated.js.map +1 -1
  50. package/__internal__/src/components/CheckboxGroup/types.d.ts +4 -4
  51. package/__internal__/src/components/CheckboxGroup/types.js.map +1 -1
  52. package/__internal__/src/components/Chips/ChipsItem/ChipsItem.css +2 -2
  53. package/__internal__/src/components/Chips/types.d.ts +2 -2
  54. package/__internal__/src/components/Chips/types.js.map +1 -1
  55. package/__internal__/src/components/ChoiceGroup/ChoiceGroup.js.map +1 -1
  56. package/__internal__/src/components/ChoiceGroup/types.d.ts +4 -4
  57. package/__internal__/src/components/ChoiceGroup/types.js.map +1 -1
  58. package/__internal__/src/components/Collapse/types.d.ts +7 -7
  59. package/__internal__/src/components/Collapse/types.js.map +1 -1
  60. package/__internal__/src/components/ColorPicker/ColorControl/ColorControl.css +7 -0
  61. package/__internal__/src/components/ColorPicker/ColorControl/ColorControl.d.ts +6 -0
  62. package/__internal__/src/components/ColorPicker/ColorControl/ColorControl.js +2 -0
  63. package/__internal__/src/components/ColorPicker/ColorControl/ColorControl.js.map +1 -0
  64. package/__internal__/src/components/ColorPicker/ColorControl/index.d.ts +2 -0
  65. package/__internal__/src/components/ColorPicker/ColorControl/index.js +2 -0
  66. package/__internal__/src/components/ColorPicker/ColorControl/index.js.map +1 -0
  67. package/__internal__/src/components/ColorPicker/ColorControl/types.d.ts +6 -0
  68. package/__internal__/src/components/ColorPicker/ColorControl/types.js +2 -0
  69. package/__internal__/src/components/ColorPicker/ColorControl/types.js.map +1 -0
  70. package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/ColorInputTypeChanger.css +1 -0
  71. package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/ColorInputTypeChanger.d.ts +4 -0
  72. package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/ColorInputTypeChanger.js +2 -0
  73. package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/ColorInputTypeChanger.js.map +1 -0
  74. package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/index.d.ts +1 -0
  75. package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/index.js +2 -0
  76. package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/index.js.map +1 -0
  77. package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/types.d.ts +6 -0
  78. package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/types.js +2 -0
  79. package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/types.js.map +1 -0
  80. package/__internal__/src/components/ColorPicker/ColorMarker/ColorMarker.css +1 -0
  81. package/__internal__/src/components/ColorPicker/ColorMarker/ColorMarker.d.ts +16 -0
  82. package/__internal__/src/components/ColorPicker/ColorMarker/ColorMarker.js +2 -0
  83. package/__internal__/src/components/ColorPicker/ColorMarker/ColorMarker.js.map +1 -0
  84. package/__internal__/src/components/ColorPicker/ColorMarker/index.d.ts +1 -0
  85. package/__internal__/src/components/ColorPicker/ColorMarker/index.js +2 -0
  86. package/__internal__/src/components/ColorPicker/ColorMarker/index.js.map +1 -0
  87. package/__internal__/src/components/ColorPicker/ColorPalette/ColorPalette.d.ts +13 -0
  88. package/__internal__/src/components/ColorPicker/ColorPalette/ColorPalette.js +2 -0
  89. package/__internal__/src/components/ColorPicker/ColorPalette/ColorPalette.js.map +1 -0
  90. package/__internal__/src/components/ColorPicker/ColorPalette/index.d.ts +1 -0
  91. package/__internal__/src/components/ColorPicker/ColorPalette/index.js +2 -0
  92. package/__internal__/src/components/ColorPicker/ColorPalette/index.js.map +1 -0
  93. package/__internal__/src/components/ColorPicker/ColorPicker/ColorPicker.css +1 -0
  94. package/__internal__/src/components/ColorPicker/ColorPicker/ColorPicker.d.ts +3 -0
  95. package/__internal__/src/components/ColorPicker/ColorPicker/ColorPicker.js +2 -0
  96. package/__internal__/src/components/ColorPicker/ColorPicker/ColorPicker.js.map +1 -0
  97. package/__internal__/src/components/ColorPicker/ColorPicker/index.d.ts +2 -0
  98. package/__internal__/src/components/ColorPicker/ColorPicker/index.js +2 -0
  99. package/__internal__/src/components/ColorPicker/ColorPicker/index.js.map +1 -0
  100. package/__internal__/src/components/ColorPicker/ColorPicker/types.d.ts +25 -0
  101. package/__internal__/src/components/ColorPicker/ColorPicker/types.js +2 -0
  102. package/__internal__/src/components/ColorPicker/ColorPicker/types.js.map +1 -0
  103. package/__internal__/src/components/ColorPicker/ColorPickerAlpha/ColorPickerAlpha.css +1 -0
  104. package/__internal__/src/components/ColorPicker/ColorPickerAlpha/ColorPickerAlpha.d.ts +12 -0
  105. package/__internal__/src/components/ColorPicker/ColorPickerAlpha/ColorPickerAlpha.js +2 -0
  106. package/__internal__/src/components/ColorPicker/ColorPickerAlpha/ColorPickerAlpha.js.map +1 -0
  107. package/__internal__/src/components/ColorPicker/ColorPickerAlpha/index.d.ts +1 -0
  108. package/__internal__/src/components/ColorPicker/ColorPickerAlpha/index.js +2 -0
  109. package/__internal__/src/components/ColorPicker/ColorPickerAlpha/index.js.map +1 -0
  110. package/__internal__/src/components/ColorPicker/ColorPickerBase/ColorPickerBase.d.ts +12 -0
  111. package/__internal__/src/components/ColorPicker/ColorPickerBase/ColorPickerBase.js +2 -0
  112. package/__internal__/src/components/ColorPicker/ColorPickerBase/ColorPickerBase.js.map +1 -0
  113. package/__internal__/src/components/ColorPicker/ColorPickerBase/index.d.ts +1 -0
  114. package/__internal__/src/components/ColorPicker/ColorPickerBase/index.js +2 -0
  115. package/__internal__/src/components/ColorPicker/ColorPickerBase/index.js.map +1 -0
  116. package/__internal__/src/components/ColorPicker/ColorPickerHue/ColorPickerHue.css +1 -0
  117. package/__internal__/src/components/ColorPicker/ColorPickerHue/ColorPickerHue.d.ts +12 -0
  118. package/__internal__/src/components/ColorPicker/ColorPickerHue/ColorPickerHue.js +2 -0
  119. package/__internal__/src/components/ColorPicker/ColorPickerHue/ColorPickerHue.js.map +1 -0
  120. package/__internal__/src/components/ColorPicker/ColorPickerHue/index.d.ts +1 -0
  121. package/__internal__/src/components/ColorPicker/ColorPickerHue/index.js +2 -0
  122. package/__internal__/src/components/ColorPicker/ColorPickerHue/index.js.map +1 -0
  123. package/__internal__/src/components/ColorPicker/ColorPickerInput/ColorPickerInput.css +3 -0
  124. package/__internal__/src/components/ColorPicker/ColorPickerInput/ColorPickerInput.d.ts +5 -0
  125. package/__internal__/src/components/ColorPicker/ColorPickerInput/ColorPickerInput.js +2 -0
  126. package/__internal__/src/components/ColorPicker/ColorPickerInput/ColorPickerInput.js.map +1 -0
  127. package/__internal__/src/components/ColorPicker/ColorPickerInput/helpers.d.ts +12 -0
  128. package/__internal__/src/components/ColorPicker/ColorPickerInput/helpers.js +2 -0
  129. package/__internal__/src/components/ColorPicker/ColorPickerInput/helpers.js.map +1 -0
  130. package/__internal__/src/components/ColorPicker/ColorPickerInput/index.d.ts +2 -0
  131. package/__internal__/src/components/ColorPicker/ColorPickerInput/index.js +2 -0
  132. package/__internal__/src/components/ColorPicker/ColorPickerInput/index.js.map +1 -0
  133. package/__internal__/src/components/ColorPicker/ColorPickerInput/types.d.ts +25 -0
  134. package/__internal__/src/components/ColorPicker/ColorPickerInput/types.js +2 -0
  135. package/__internal__/src/components/ColorPicker/ColorPickerInput/types.js.map +1 -0
  136. package/__internal__/src/components/ColorPicker/ColorPickerInteractive/ColorPickerInteractive.css +1 -0
  137. package/__internal__/src/components/ColorPicker/ColorPickerInteractive/ColorPickerInteractive.d.ts +15 -0
  138. package/__internal__/src/components/ColorPicker/ColorPickerInteractive/ColorPickerInteractive.js +2 -0
  139. package/__internal__/src/components/ColorPicker/ColorPickerInteractive/ColorPickerInteractive.js.map +1 -0
  140. package/__internal__/src/components/ColorPicker/ColorPickerInteractive/index.d.ts +1 -0
  141. package/__internal__/src/components/ColorPicker/ColorPickerInteractive/index.js +2 -0
  142. package/__internal__/src/components/ColorPicker/ColorPickerInteractive/index.js.map +1 -0
  143. package/__internal__/src/components/ColorPicker/ColorPickerPoint/ColorPickerPoint.css +1 -0
  144. package/__internal__/src/components/ColorPicker/ColorPickerPoint/ColorPickerPoint.d.ts +8 -0
  145. package/__internal__/src/components/ColorPicker/ColorPickerPoint/ColorPickerPoint.js +2 -0
  146. package/__internal__/src/components/ColorPicker/ColorPickerPoint/ColorPickerPoint.js.map +1 -0
  147. package/__internal__/src/components/ColorPicker/ColorPickerPoint/index.d.ts +1 -0
  148. package/__internal__/src/components/ColorPicker/ColorPickerPoint/index.js +2 -0
  149. package/__internal__/src/components/ColorPicker/ColorPickerPoint/index.js.map +1 -0
  150. package/__internal__/src/components/ColorPicker/ColorPickerRoot/ColorPickerRoot.css +1 -0
  151. package/__internal__/src/components/ColorPicker/ColorPickerRoot/ColorPickerRoot.d.ts +16 -0
  152. package/__internal__/src/components/ColorPicker/ColorPickerRoot/ColorPickerRoot.js +2 -0
  153. package/__internal__/src/components/ColorPicker/ColorPickerRoot/ColorPickerRoot.js.map +1 -0
  154. package/__internal__/src/components/ColorPicker/ColorPickerRoot/index.d.ts +1 -0
  155. package/__internal__/src/components/ColorPicker/ColorPickerRoot/index.js +2 -0
  156. package/__internal__/src/components/ColorPicker/ColorPickerRoot/index.js.map +1 -0
  157. package/__internal__/src/components/ColorPicker/ColorPickerSaturation/ColorPickerSaturation.css +1 -0
  158. package/__internal__/src/components/ColorPicker/ColorPickerSaturation/ColorPickerSaturation.d.ts +13 -0
  159. package/__internal__/src/components/ColorPicker/ColorPickerSaturation/ColorPickerSaturation.js +2 -0
  160. package/__internal__/src/components/ColorPicker/ColorPickerSaturation/ColorPickerSaturation.js.map +1 -0
  161. package/__internal__/src/components/ColorPicker/ColorPickerSaturation/index.d.ts +1 -0
  162. package/__internal__/src/components/ColorPicker/ColorPickerSaturation/index.js +2 -0
  163. package/__internal__/src/components/ColorPicker/ColorPickerSaturation/index.js.map +1 -0
  164. package/__internal__/src/components/ColorPicker/hooks/useColorManipulation.d.ts +2 -0
  165. package/__internal__/src/components/ColorPicker/hooks/useColorManipulation.js +2 -0
  166. package/__internal__/src/components/ColorPicker/hooks/useColorManipulation.js.map +1 -0
  167. package/__internal__/src/components/ColorPicker/hooks/useEventCallback.d.ts +1 -0
  168. package/__internal__/src/components/ColorPicker/hooks/useEventCallback.js +2 -0
  169. package/__internal__/src/components/ColorPicker/hooks/useEventCallback.js.map +1 -0
  170. package/__internal__/src/components/ColorPicker/index.d.ts +10 -0
  171. package/__internal__/src/components/ColorPicker/index.js +2 -0
  172. package/__internal__/src/components/ColorPicker/index.js.map +1 -0
  173. package/__internal__/src/components/ColorPicker/models/hexAlphaModel.d.ts +2 -0
  174. package/__internal__/src/components/ColorPicker/models/hexAlphaModel.js +2 -0
  175. package/__internal__/src/components/ColorPicker/models/hexAlphaModel.js.map +1 -0
  176. package/__internal__/src/components/ColorPicker/models/hexModel.d.ts +2 -0
  177. package/__internal__/src/components/ColorPicker/models/hexModel.js +2 -0
  178. package/__internal__/src/components/ColorPicker/models/hexModel.js.map +1 -0
  179. package/__internal__/src/components/ColorPicker/models/hslModel.d.ts +2 -0
  180. package/__internal__/src/components/ColorPicker/models/hslModel.js +2 -0
  181. package/__internal__/src/components/ColorPicker/models/hslModel.js.map +1 -0
  182. package/__internal__/src/components/ColorPicker/models/hslStringModel.d.ts +2 -0
  183. package/__internal__/src/components/ColorPicker/models/hslStringModel.js +2 -0
  184. package/__internal__/src/components/ColorPicker/models/hslStringModel.js.map +1 -0
  185. package/__internal__/src/components/ColorPicker/models/hslaModel.d.ts +2 -0
  186. package/__internal__/src/components/ColorPicker/models/hslaModel.js +2 -0
  187. package/__internal__/src/components/ColorPicker/models/hslaModel.js.map +1 -0
  188. package/__internal__/src/components/ColorPicker/models/hslaStringModel.d.ts +2 -0
  189. package/__internal__/src/components/ColorPicker/models/hslaStringModel.js +2 -0
  190. package/__internal__/src/components/ColorPicker/models/hslaStringModel.js.map +1 -0
  191. package/__internal__/src/components/ColorPicker/models/hsvModel.d.ts +2 -0
  192. package/__internal__/src/components/ColorPicker/models/hsvModel.js +2 -0
  193. package/__internal__/src/components/ColorPicker/models/hsvModel.js.map +1 -0
  194. package/__internal__/src/components/ColorPicker/models/hsvStringModel.d.ts +2 -0
  195. package/__internal__/src/components/ColorPicker/models/hsvStringModel.js +2 -0
  196. package/__internal__/src/components/ColorPicker/models/hsvStringModel.js.map +1 -0
  197. package/__internal__/src/components/ColorPicker/models/hsvaModel.d.ts +2 -0
  198. package/__internal__/src/components/ColorPicker/models/hsvaModel.js +2 -0
  199. package/__internal__/src/components/ColorPicker/models/hsvaModel.js.map +1 -0
  200. package/__internal__/src/components/ColorPicker/models/hsvaStringModel.d.ts +2 -0
  201. package/__internal__/src/components/ColorPicker/models/hsvaStringModel.js +2 -0
  202. package/__internal__/src/components/ColorPicker/models/hsvaStringModel.js.map +1 -0
  203. package/__internal__/src/components/ColorPicker/models/index.d.ts +14 -0
  204. package/__internal__/src/components/ColorPicker/models/index.js +2 -0
  205. package/__internal__/src/components/ColorPicker/models/index.js.map +1 -0
  206. package/__internal__/src/components/ColorPicker/models/rgbModel.d.ts +2 -0
  207. package/__internal__/src/components/ColorPicker/models/rgbModel.js +2 -0
  208. package/__internal__/src/components/ColorPicker/models/rgbModel.js.map +1 -0
  209. package/__internal__/src/components/ColorPicker/models/rgbStringModel.d.ts +2 -0
  210. package/__internal__/src/components/ColorPicker/models/rgbStringModel.js +2 -0
  211. package/__internal__/src/components/ColorPicker/models/rgbStringModel.js.map +1 -0
  212. package/__internal__/src/components/ColorPicker/models/rgbaModel.d.ts +2 -0
  213. package/__internal__/src/components/ColorPicker/models/rgbaModel.js +2 -0
  214. package/__internal__/src/components/ColorPicker/models/rgbaModel.js.map +1 -0
  215. package/__internal__/src/components/ColorPicker/models/rgbaStringModel.d.ts +2 -0
  216. package/__internal__/src/components/ColorPicker/models/rgbaStringModel.js +2 -0
  217. package/__internal__/src/components/ColorPicker/models/rgbaStringModel.js.map +1 -0
  218. package/__internal__/src/components/ColorPicker/types.d.ts +33 -0
  219. package/__internal__/src/components/ColorPicker/types.js +2 -0
  220. package/__internal__/src/components/ColorPicker/types.js.map +1 -0
  221. package/__internal__/src/components/ColorPicker/utils/clamp.d.ts +1 -0
  222. package/__internal__/src/components/ColorPicker/utils/clamp.js +2 -0
  223. package/__internal__/src/components/ColorPicker/utils/clamp.js.map +1 -0
  224. package/__internal__/src/components/ColorPicker/utils/compare.d.ts +4 -0
  225. package/__internal__/src/components/ColorPicker/utils/compare.js +2 -0
  226. package/__internal__/src/components/ColorPicker/utils/compare.js.map +1 -0
  227. package/__internal__/src/components/ColorPicker/utils/convert.d.ts +32 -0
  228. package/__internal__/src/components/ColorPicker/utils/convert.js +2 -0
  229. package/__internal__/src/components/ColorPicker/utils/convert.js.map +1 -0
  230. package/__internal__/src/components/ColorPicker/utils/format.d.ts +1 -0
  231. package/__internal__/src/components/ColorPicker/utils/format.js +2 -0
  232. package/__internal__/src/components/ColorPicker/utils/format.js.map +1 -0
  233. package/__internal__/src/components/ColorPicker/utils/round.d.ts +1 -0
  234. package/__internal__/src/components/ColorPicker/utils/round.js +2 -0
  235. package/__internal__/src/components/ColorPicker/utils/round.js.map +1 -0
  236. package/__internal__/src/components/ColorPicker/utils/validate.d.ts +1 -0
  237. package/__internal__/src/components/ColorPicker/utils/validate.js +2 -0
  238. package/__internal__/src/components/ColorPicker/utils/validate.js.map +1 -0
  239. package/__internal__/src/components/Combobox/Combobox.js +1 -1
  240. package/__internal__/src/components/Combobox/Combobox.js.map +1 -1
  241. package/__internal__/src/components/Combobox/helpers.d.ts +3 -1
  242. package/__internal__/src/components/Combobox/helpers.js.map +1 -1
  243. package/__internal__/src/components/ContextMenu/ContextMenuLevel/ContextMenuLevel.js.map +1 -1
  244. package/__internal__/src/components/ContextMenu/ContextMenuLevelWrapper/ContextMenuLevelWrapper.js +1 -1
  245. package/__internal__/src/components/ContextMenu/ContextMenuLevelWrapper/ContextMenuLevelWrapper.js.map +1 -1
  246. package/__internal__/src/components/ContextMenu/ContextMenuLevels/ContextMenuLevels.js.map +1 -1
  247. package/__internal__/src/components/ContextMenu/ContextMenuWrapper/ContextMenuWrapper.js +1 -1
  248. package/__internal__/src/components/ContextMenu/ContextMenuWrapper/ContextMenuWrapper.js.map +1 -1
  249. package/__internal__/src/components/ContextMenu/helpers.d.ts +4 -2
  250. package/__internal__/src/components/ContextMenu/types.d.ts +6 -3
  251. package/__internal__/src/components/ContextMenu/types.js.map +1 -1
  252. package/__internal__/src/components/DatePicker/DatePickerDropdown/DatePickerDropdown.d.ts +2 -0
  253. package/__internal__/src/components/DatePicker/DatePickerDropdown/DatePickerDropdown.js +1 -1
  254. package/__internal__/src/components/DatePicker/DatePickerDropdown/DatePickerDropdown.js.map +1 -1
  255. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDate/DatePickerFieldTypeDate.d.ts +1 -1
  256. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTime/DatePickerFieldTypeDateTime.d.ts +1 -1
  257. package/__internal__/src/components/DatePicker/DatePickerFieldTypeMonth/DatePickerFieldTypeMonth.d.ts +1 -1
  258. package/__internal__/src/components/DatePicker/DatePickerFieldTypeTime/DatePickerFieldTypeTime.d.ts +1 -1
  259. package/__internal__/src/components/DatePicker/DatePickerFieldTypeYear/DatePickerFieldTypeYear.d.ts +1 -1
  260. package/__internal__/src/components/DatePicker/DatePickerTypeDate/DatePickerTypeDate.js +1 -1
  261. package/__internal__/src/components/DatePicker/DatePickerTypeDate/DatePickerTypeDate.js.map +1 -1
  262. package/__internal__/src/components/DatePicker/DatePickerTypeDateRange/DatePickerTypeDateRange.js +1 -1
  263. package/__internal__/src/components/DatePicker/DatePickerTypeDateRange/DatePickerTypeDateRange.js.map +1 -1
  264. package/__internal__/src/components/DatePicker/DatePickerTypeDateTime/DatePickerTypeDateTime.js +1 -1
  265. package/__internal__/src/components/DatePicker/DatePickerTypeDateTime/DatePickerTypeDateTime.js.map +1 -1
  266. package/__internal__/src/components/DatePicker/DatePickerTypeDateTimeRange/DatePickerTypeDateTimeRange.js +1 -1
  267. package/__internal__/src/components/DatePicker/DatePickerTypeDateTimeRange/DatePickerTypeDateTimeRange.js.map +1 -1
  268. package/__internal__/src/components/DatePicker/DatePickerTypeMonth/DatePickerTypeMonth.js +1 -1
  269. package/__internal__/src/components/DatePicker/DatePickerTypeMonth/DatePickerTypeMonth.js.map +1 -1
  270. package/__internal__/src/components/DatePicker/DatePickerTypeMonthRange/DatePickerTypeMonthRange.js +1 -1
  271. package/__internal__/src/components/DatePicker/DatePickerTypeMonthRange/DatePickerTypeMonthRange.js.map +1 -1
  272. package/__internal__/src/components/DatePicker/DatePickerTypeTime/DatePickerTypeTime.js +1 -1
  273. package/__internal__/src/components/DatePicker/DatePickerTypeTime/DatePickerTypeTime.js.map +1 -1
  274. package/__internal__/src/components/DatePicker/DatePickerTypeYear/DatePickerTypeYear.js +1 -1
  275. package/__internal__/src/components/DatePicker/DatePickerTypeYear/DatePickerTypeYear.js.map +1 -1
  276. package/__internal__/src/components/DatePicker/DatePickerTypeYearRange/DatePickerTypeYearRange.js +1 -1
  277. package/__internal__/src/components/DatePicker/DatePickerTypeYearRange/DatePickerTypeYearRange.js.map +1 -1
  278. package/__internal__/src/components/DatePicker/getChangeFnRange.js +1 -1
  279. package/__internal__/src/components/DatePicker/getChangeFnRange.js.map +1 -1
  280. package/__internal__/src/components/DatePicker/helpers.js.map +1 -1
  281. package/__internal__/src/components/DatePicker/types.d.ts +7 -6
  282. package/__internal__/src/components/DatePicker/types.js.map +1 -1
  283. package/__internal__/src/components/DateTime/DateTime100YearSlider/DateTime100YearSlider.js +1 -1
  284. package/__internal__/src/components/DateTime/DateTime100YearSlider/DateTime100YearSlider.js.map +1 -1
  285. package/__internal__/src/components/DateTime/DateTime10YearSlider/DateTime10YearSlider.js +1 -1
  286. package/__internal__/src/components/DateTime/DateTime10YearSlider/DateTime10YearSlider.js.map +1 -1
  287. package/__internal__/src/components/DateTime/DateTimeCell/DateTimeCell.d.ts +1 -1
  288. package/__internal__/src/components/DateTime/DateTimeCell/DateTimeCell.js.map +1 -1
  289. package/__internal__/src/components/DateTime/DateTimeGrid/DateTimeGrid.css +1 -1
  290. package/__internal__/src/components/DateTime/DateTimeTypeDate/DateTimeTypeDate.js +1 -1
  291. package/__internal__/src/components/DateTime/DateTimeTypeDate/DateTimeTypeDate.js.map +1 -1
  292. package/__internal__/src/components/DateTime/DateTimeTypeMonth/DateTimeTypeMonth.js +1 -1
  293. package/__internal__/src/components/DateTime/DateTimeTypeMonth/DateTimeTypeMonth.js.map +1 -1
  294. package/__internal__/src/components/DateTime/DateTimeTypeYear/DateTimeTypeYear.js +1 -1
  295. package/__internal__/src/components/DateTime/DateTimeTypeYear/DateTimeTypeYear.js.map +1 -1
  296. package/__internal__/src/components/DateTime/DateTimeYearSlider/DateTimeYearSlider.js +1 -1
  297. package/__internal__/src/components/DateTime/DateTimeYearSlider/DateTimeYearSlider.js.map +1 -1
  298. package/__internal__/src/components/DateTime/helpers/index.js +1 -1
  299. package/__internal__/src/components/DateTime/helpers/index.js.map +1 -1
  300. package/__internal__/src/components/DateTime/helpers/types.d.ts +4 -3
  301. package/__internal__/src/components/DateTime/helpers/types.js.map +1 -1
  302. package/__internal__/src/components/DragNDropField/DragNDropFieldTooltip/DragNDropFieldTooltip.css +1 -1
  303. package/__internal__/src/components/DragNDropFieldCanary/types.d.ts +1 -1
  304. package/__internal__/src/components/DragNDropFieldCanary/types.js.map +1 -1
  305. package/__internal__/src/components/FieldComponents/FieldControlLayout/FieldControlLayout.css +4 -2
  306. package/__internal__/src/components/FieldComponents/FieldControlLayout/FieldControlLayout.js +1 -1
  307. package/__internal__/src/components/FieldComponents/FieldControlLayout/FieldControlLayout.js.map +1 -1
  308. package/__internal__/src/components/FieldComponents/FieldControlLayout/helpers.d.ts +5 -2
  309. package/__internal__/src/components/FieldComponents/FieldControlLayout/helpers.js +1 -1
  310. package/__internal__/src/components/FieldComponents/FieldControlLayout/helpers.js.map +1 -1
  311. package/__internal__/src/components/FieldComponents/FieldControlLayout/maps.d.ts +1 -0
  312. package/__internal__/src/components/FieldComponents/FieldControlLayout/maps.js +1 -1
  313. package/__internal__/src/components/FieldComponents/FieldControlLayout/maps.js.map +1 -1
  314. package/__internal__/src/components/FieldGroup/getForm.js +1 -1
  315. package/__internal__/src/components/FieldGroup/getForm.js.map +1 -1
  316. package/__internal__/src/components/FileCanary/FileCanary.d.ts +1 -0
  317. package/__internal__/src/components/FileCanary/FileCanary.js +2 -0
  318. package/__internal__/src/components/FileCanary/FileCanary.js.map +1 -0
  319. package/__internal__/src/components/FileCanary/FileCanaryBase/FileCanaryBase.css +1 -0
  320. package/__internal__/src/components/FileCanary/FileCanaryBase/FileCanaryBase.d.ts +4 -0
  321. package/__internal__/src/components/FileCanary/FileCanaryBase/FileCanaryBase.js +2 -0
  322. package/__internal__/src/components/FileCanary/FileCanaryBase/FileCanaryBase.js.map +1 -0
  323. package/__internal__/src/components/FileCanary/config.d.ts +2 -0
  324. package/__internal__/src/components/FileCanary/config.js +2 -0
  325. package/__internal__/src/components/FileCanary/config.js.map +1 -0
  326. package/__internal__/src/components/FileCanary/fileCanaryGenerator.d.ts +2 -0
  327. package/__internal__/src/components/FileCanary/fileCanaryGenerator.js +2 -0
  328. package/__internal__/src/components/FileCanary/fileCanaryGenerator.js.map +1 -0
  329. package/__internal__/src/components/FileCanary/index.d.ts +4 -0
  330. package/__internal__/src/components/FileCanary/index.js +2 -0
  331. package/__internal__/src/components/FileCanary/index.js.map +1 -0
  332. package/__internal__/src/components/FileCanary/types.d.ts +25 -0
  333. package/__internal__/src/components/FileCanary/types.js +2 -0
  334. package/__internal__/src/components/FileCanary/types.js.map +1 -0
  335. package/__internal__/src/components/FlatSelect/FlatSelect.css +8 -8
  336. package/__internal__/src/components/FlatSelect/FlatSelect.js +1 -1
  337. package/__internal__/src/components/FlatSelect/FlatSelect.js.map +1 -1
  338. package/__internal__/src/components/FlatSelect/FlatSelectList/FlatSelectList.d.ts +1 -1
  339. package/__internal__/src/components/FlatSelect/FlatSelectList/FlatSelectList.js.map +1 -1
  340. package/__internal__/src/components/FlatSelect/FlatSelectRoot/FlatSelectRoot.d.ts +1 -0
  341. package/__internal__/src/components/FlatSelect/FlatSelectRoot/FlatSelectRoot.js +1 -1
  342. package/__internal__/src/components/FlatSelect/FlatSelectRoot/FlatSelectRoot.js.map +1 -1
  343. package/__internal__/src/components/FlatSelect/types.d.ts +1 -0
  344. package/__internal__/src/components/FlatSelect/types.js.map +1 -1
  345. package/__internal__/src/components/Grid/types.d.ts +4 -4
  346. package/__internal__/src/components/Grid/types.js.map +1 -1
  347. package/__internal__/src/components/GridDeprecated/Grid.css +1 -1
  348. package/__internal__/src/components/GridDeprecated/GridDeprecated.d.ts +4 -4
  349. package/__internal__/src/components/GridDeprecated/GridDeprecated.js.map +1 -1
  350. package/__internal__/src/components/Informer/Informer.d.ts +3 -3
  351. package/__internal__/src/components/Informer/Informer.js.map +1 -1
  352. package/__internal__/src/components/Layout/Layout.d.ts +3 -3
  353. package/__internal__/src/components/Layout/Layout.js.map +1 -1
  354. package/__internal__/src/components/Layout/useFixed.d.ts +2 -2
  355. package/__internal__/src/components/Layout/useFixed.js.map +1 -1
  356. package/__internal__/src/components/ListCanary/ListCanary.js.map +1 -1
  357. package/__internal__/src/components/ListCanary/ListItemGrid/ListItemGrid.css +1 -1
  358. package/__internal__/src/components/ListCanary/types.d.ts +4 -4
  359. package/__internal__/src/components/ListCanary/types.js.map +1 -1
  360. package/__internal__/src/components/LoaderDeprecated/Loader.css +2 -2
  361. package/__internal__/src/components/LoaderDeprecated/LoaderDeprecated.d.ts +1 -1
  362. package/__internal__/src/components/LoaderDeprecated/LoaderDeprecated.js.map +1 -1
  363. package/__internal__/src/components/Modal/ModalLayout/ModalLayout.css +4 -4
  364. package/__internal__/src/components/ModalDeprecated/ModalDeprecated.d.ts +2 -2
  365. package/__internal__/src/components/ModalDeprecated/ModalDeprecated.js.map +1 -1
  366. package/__internal__/src/components/Notification/helpers/defaultDateFormat.js +1 -1
  367. package/__internal__/src/components/Notification/helpers/defaultDateFormat.js.map +1 -1
  368. package/__internal__/src/components/Pagination/types.d.ts +3 -3
  369. package/__internal__/src/components/Pagination/types.js.map +1 -1
  370. package/__internal__/src/components/PaginationDeprecated/PaginationDeprecated.d.ts +4 -4
  371. package/__internal__/src/components/PaginationDeprecated/PaginationDeprecated.js.map +1 -1
  372. package/__internal__/src/components/Popover/Popover.d.ts +2 -2
  373. package/__internal__/src/components/Popover/Popover.js.map +1 -1
  374. package/__internal__/src/components/ProgressLine/ProgressLine.css +1 -1
  375. package/__internal__/src/components/ProgressLine/types.d.ts +1 -1
  376. package/__internal__/src/components/ProgressLine/types.js.map +1 -1
  377. package/__internal__/src/components/ProgressSpin/ProgressSpin.d.ts +1 -1
  378. package/__internal__/src/components/ProgressSpin/ProgressSpin.js.map +1 -1
  379. package/__internal__/src/components/ProgressStepBar/ProgressStepBarItem/ProgressStepBarItem.css +8 -8
  380. package/__internal__/src/components/ProgressStepBar/helpers.d.ts +5 -5
  381. package/__internal__/src/components/ProgressStepBar/helpers.js.map +1 -1
  382. package/__internal__/src/components/Radio/Radio.css +1 -1
  383. package/__internal__/src/components/Radio/Radio.d.ts +3 -3
  384. package/__internal__/src/components/Radio/Radio.js.map +1 -1
  385. package/__internal__/src/components/RadioGroup/types.d.ts +4 -4
  386. package/__internal__/src/components/RadioGroup/types.js.map +1 -1
  387. package/__internal__/src/components/Responses/Responses.d.ts +1 -1
  388. package/__internal__/src/components/Responses/Responses.js.map +1 -1
  389. package/__internal__/src/components/Select/Select.js +1 -1
  390. package/__internal__/src/components/Select/Select.js.map +1 -1
  391. package/__internal__/src/components/Select/helpers.d.ts +3 -1
  392. package/__internal__/src/components/Select/helpers.js.map +1 -1
  393. package/__internal__/src/components/SelectCanary/SelectDropdown/SelectDropdown.d.ts +2 -1
  394. package/__internal__/src/components/SelectCanary/SelectDropdown/SelectDropdown.js +1 -1
  395. package/__internal__/src/components/SelectCanary/SelectDropdown/SelectDropdown.js.map +1 -1
  396. package/__internal__/src/components/SelectCanary/SelectMultiple/SelectMultiple.css +2 -2
  397. package/__internal__/src/components/SelectCanary/SelectMultiple/SelectMultiple.js +1 -1
  398. package/__internal__/src/components/SelectCanary/SelectMultiple/SelectMultiple.js.map +1 -1
  399. package/__internal__/src/components/SelectCanary/SelectMultiple/__test__/SelectMultiple.test.js +1 -1
  400. package/__internal__/src/components/SelectCanary/SelectMultiple/__test__/SelectMultiple.test.js.map +1 -1
  401. package/__internal__/src/components/SelectCanary/SelectPopover/SelectPopover.d.ts +2 -1
  402. package/__internal__/src/components/SelectCanary/SelectPopover/SelectPopover.js +1 -1
  403. package/__internal__/src/components/SelectCanary/SelectPopover/SelectPopover.js.map +1 -1
  404. package/__internal__/src/components/SelectCanary/SelectSingle/SelectSingle.js +1 -1
  405. package/__internal__/src/components/SelectCanary/SelectSingle/SelectSingle.js.map +1 -1
  406. package/__internal__/src/components/SelectCanary/SelectSingle/__test__/SelectSingle.test.js +1 -1
  407. package/__internal__/src/components/SelectCanary/SelectSingle/__test__/SelectSingle.test.js.map +1 -1
  408. package/__internal__/src/components/SelectCanary/helpers.d.ts +2 -1
  409. package/__internal__/src/components/SelectCanary/types.d.ts +1 -0
  410. package/__internal__/src/components/SelectCanary/types.js.map +1 -1
  411. package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.d.ts +2 -1
  412. package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.js +1 -1
  413. package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.js.map +1 -1
  414. package/__internal__/src/components/SelectComponents/SelectValueTag/SelectValueTag.css +1 -1
  415. package/__internal__/src/components/SelectComponents/types.d.ts +4 -4
  416. package/__internal__/src/components/SelectComponents/types.js.map +1 -1
  417. package/__internal__/src/components/SelectComponents/useSelect/useSelect.js +1 -1
  418. package/__internal__/src/components/SelectComponents/useSelect/useSelect.js.map +1 -1
  419. package/__internal__/src/components/SelectComponentsDeprecated/SelectDropdown/SelectDropdown.d.ts +1 -1
  420. package/__internal__/src/components/SelectComponentsDeprecated/SelectDropdown/SelectDropdown.js.map +1 -1
  421. package/__internal__/src/components/SelectComponentsDeprecated/SelectValueTag/SelectValueTag.css +1 -1
  422. package/__internal__/src/components/SelectComponentsDeprecated/types.d.ts +4 -4
  423. package/__internal__/src/components/SelectComponentsDeprecated/types.js.map +1 -1
  424. package/__internal__/src/components/Sidebar/types.d.ts +2 -2
  425. package/__internal__/src/components/Sidebar/types.js.map +1 -1
  426. package/__internal__/src/components/SidebarDeprecated/SidebarDeprecated.d.ts +2 -2
  427. package/__internal__/src/components/SidebarDeprecated/SidebarDeprecated.js.map +1 -1
  428. package/__internal__/src/components/Skeleton/Skeleton.css +1 -1
  429. package/__internal__/src/components/Slider/helper.d.ts +2 -2
  430. package/__internal__/src/components/Slider/helper.js.map +1 -1
  431. package/__internal__/src/components/SnackBar/types.d.ts +4 -4
  432. package/__internal__/src/components/SnackBar/types.js.map +1 -1
  433. package/__internal__/src/components/Spoiler/types.d.ts +2 -2
  434. package/__internal__/src/components/Spoiler/types.js.map +1 -1
  435. package/__internal__/src/components/Steps/StepsStep/StepsStep.css +1 -1
  436. package/__internal__/src/components/Steps/types.d.ts +1 -1
  437. package/__internal__/src/components/Steps/types.js.map +1 -1
  438. package/__internal__/src/components/Switch/Switch.css +1 -1
  439. package/__internal__/src/components/Switch/types.d.ts +3 -3
  440. package/__internal__/src/components/Switch/types.js.map +1 -1
  441. package/__internal__/src/components/SwitchGroup/types.d.ts +1 -1
  442. package/__internal__/src/components/SwitchGroup/types.js.map +1 -1
  443. package/__internal__/src/components/Table/Cell/TableCell.css +1 -1
  444. package/__internal__/src/components/Table/Cell/TableCell.d.ts +2 -2
  445. package/__internal__/src/components/Table/Cell/TableCell.js.map +1 -1
  446. package/__internal__/src/components/Table/Header/TableHeader.d.ts +1 -1
  447. package/__internal__/src/components/Table/Header/TableHeader.js.map +1 -1
  448. package/__internal__/src/components/Table/Table.d.ts +3 -3
  449. package/__internal__/src/components/Table/Table.js.map +1 -1
  450. package/__internal__/src/components/Table/__mock__/data.mock.d.ts +10 -10
  451. package/__internal__/src/components/Table/__mock__/data.mock.js.map +1 -1
  452. package/__internal__/src/components/Table/helpers.d.ts +1 -1
  453. package/__internal__/src/components/Table/helpers.js.map +1 -1
  454. package/__internal__/src/components/Tabs/Tabs.js.map +1 -1
  455. package/__internal__/src/components/Tabs/types.d.ts +4 -4
  456. package/__internal__/src/components/Tabs/types.js.map +1 -1
  457. package/__internal__/src/components/Tag/Tag.d.ts +1 -1
  458. package/__internal__/src/components/Tag/Tag.js.map +1 -1
  459. package/__internal__/src/components/TagBase/TagBase.d.ts +3 -3
  460. package/__internal__/src/components/TagBase/TagBase.js.map +1 -1
  461. package/__internal__/src/components/Text/Text.d.ts +13 -13
  462. package/__internal__/src/components/Text/Text.js.map +1 -1
  463. package/__internal__/src/components/TextAreaAutoSize/TextAreaAutoSize.css +1 -1
  464. package/__internal__/src/components/TextDeprecated/TextDeprecated.d.ts +13 -13
  465. package/__internal__/src/components/TextDeprecated/TextDeprecated.js.map +1 -1
  466. package/__internal__/src/components/TextField/types.d.ts +4 -4
  467. package/__internal__/src/components/TextField/types.js.map +1 -1
  468. package/__internal__/src/components/TextFieldCanary/TextFieldTypeNumber/TextFieldTypeNumber.js +1 -1
  469. package/__internal__/src/components/TextFieldCanary/TextFieldTypeNumber/TextFieldTypeNumber.js.map +1 -1
  470. package/__internal__/src/components/TextFieldCanary/TextFieldTypeTextArea/TextFieldTypeTextArea.css +2 -2
  471. package/__internal__/src/components/TextFieldCanary/useTextField.js.map +1 -1
  472. package/__internal__/src/components/Theme/_font/Silkscreen-Regular.woff +0 -0
  473. package/__internal__/src/components/Theme/_font/Silkscreen-Regular.woff2 +0 -0
  474. package/__internal__/src/components/Theme/_font/Theme_font_gpnDefault.css +1 -1
  475. package/__internal__/src/components/ThemeToggler/ThemeToggler.js.map +1 -1
  476. package/__internal__/src/components/ThemeToggler/types.d.ts +1 -1
  477. package/__internal__/src/components/ThemeToggler/types.js.map +1 -1
  478. package/__internal__/src/components/Timer/Timer.d.ts +1 -1
  479. package/__internal__/src/components/Timer/Timer.js.map +1 -1
  480. package/__internal__/src/components/Tooltip/types.d.ts +2 -2
  481. package/__internal__/src/components/Tooltip/types.js.map +1 -1
  482. package/__internal__/src/components/TooltipDeprecated/TooltipDeprecated.d.ts +2 -2
  483. package/__internal__/src/components/TooltipDeprecated/TooltipDeprecated.js.map +1 -1
  484. package/__internal__/src/components/User/User.css +1 -1
  485. package/__internal__/src/components/User/User.d.ts +4 -4
  486. package/__internal__/src/components/User/User.js.map +1 -1
  487. package/__internal__/src/components/UserSelect/UserSelect.js +1 -1
  488. package/__internal__/src/components/UserSelect/UserSelect.js.map +1 -1
  489. package/__internal__/src/components/UserSelect/UserSelectItem/UserSelectItem.css +1 -1
  490. package/__internal__/src/components/UserSelect/helpers.d.ts +3 -1
  491. package/__internal__/src/components/UserSelect/helpers.js.map +1 -1
  492. package/__internal__/src/fileIcons/FileIcon/FileIcon.d.ts +1 -1
  493. package/__internal__/src/fileIcons/FileIcon/FileIcon.js.map +1 -1
  494. package/__internal__/src/hocs/withTooltip/withTooltip.d.ts +1 -1
  495. package/__internal__/src/hocs/withTooltip/withTooltip.js.map +1 -1
  496. package/__internal__/src/hooks/useBreakpointsDeprecated/useBreakpointsDeprecated.d.ts +1 -1
  497. package/__internal__/src/hooks/useBreakpointsDeprecated/useBreakpointsDeprecated.js.map +1 -1
  498. package/__internal__/src/hooks/useRefs/useRefs.js.map +1 -1
  499. package/__internal__/src/hooks/useStyleProps/types.js.map +1 -1
  500. package/__internal__/src/mixs/MixCard/MixCard.d.ts +2 -2
  501. package/__internal__/src/mixs/MixCard/MixCard.js.map +1 -1
  502. package/__internal__/src/mixs/MixFlex/MixFlex.d.ts +5 -5
  503. package/__internal__/src/mixs/MixFlex/MixFlex.js.map +1 -1
  504. package/__internal__/src/mixs/MixScrollBar/MixScrollBar.d.ts +2 -2
  505. package/__internal__/src/mixs/MixScrollBar/MixScrollBar.js.map +1 -1
  506. package/__internal__/src/mixs/MixVisuallyHidden/MixVisuallyHidden.css +1 -1
  507. package/__internal__/src/utils/array.js.map +1 -1
  508. package/__internal__/src/utils/date/index.js +1 -1
  509. package/__internal__/src/utils/date/index.js.map +1 -1
  510. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.js","names":["React","forwardRef","useRefs","cnMixScrollBar","useChoiceGroup","useResizeObserved","cn","getTabsDirection","getTabsWrapper","withDefaultGetters","TabsBorderLine","TabsRunningLine","TabsTab","tabsDefaultFitMode","tabsDefaultLinePosition","tabsDefaultSize","tabsDefaultView","cnTabs","renderItemDefault","props","item","attributes","as","otherProps","TabsRender","ref","size","className","items","view","value","linePosition","fitMode","withScrollButtons","onlyIcon","getItemIcon","getItemAs","getItemAttributes","getItemRef","getItemLabel","getItemKeyProp","getItemKey","onChange","iconSize","renderItem","renderItemProp","getItemLeftIcon","getItemLeftSide","getItemRightIcon","getItemRightSide","getItemDisabled","disabled","getKey","callBack","multiple","getOnChange","getChecked","tabsDirection","isVertical","tabRefs","length","tabsDimensions","el","gap","parseInt","getComputedStyle","activeTabIdx","findIndex","onClick","renderInDropdown","checked","label","toString","icon","leftIcon","rightIcon","leftSide","rightSide","tabRef","Wrapper","direction","invisible","renderItemsList","withRunningLine","visibleIndexes","getTabClassName","map","idx","Tabs"],"sources":["../../../../../src/components/Tabs/Tabs.tsx"],"sourcesContent":["import './Tabs.css';\n\nimport React, { forwardRef } from 'react';\n\nimport { useRefs } from '##/hooks/useRefs';\nimport { cnMixScrollBar } from '##/mixs/MixScrollBar';\n\nimport { useChoiceGroup } from '../../hooks/useChoiceGroup/useChoiceGroup';\nimport { useResizeObserved } from '../../hooks/useResizeObserved/useResizeObserved';\nimport { cn } from '../../utils/bem';\nimport {\n getTabsDirection,\n getTabsWrapper,\n withDefaultGetters,\n} from './helpers';\nimport { TabsBorderLine, TabsRunningLine } from './TabsLine/TabsLine';\nimport { TabsTab } from './TabsTab/TabsTab';\nimport {\n RenderItemProps,\n RenderItemsListProp,\n TabDimensions,\n TabsComponent,\n tabsDefaultFitMode,\n tabsDefaultLinePosition,\n tabsDefaultSize,\n tabsDefaultView,\n TabsProps,\n} from './types';\n\nexport const cnTabs = cn('Tabs');\n\nfunction renderItemDefault<ITEM>(\n props: RenderItemProps<ITEM>,\n): React.ReactNode {\n const { item, attributes = {}, as, ...otherProps } = props;\n return <TabsTab {...attributes} {...otherProps} as={as} />;\n}\n\nconst TabsRender = (props: TabsProps, ref: React.Ref<HTMLDivElement>) => {\n const {\n size = tabsDefaultSize,\n className,\n items,\n view = tabsDefaultView,\n value,\n linePosition = tabsDefaultLinePosition,\n fitMode = tabsDefaultFitMode,\n withScrollButtons = true,\n onlyIcon,\n getItemIcon,\n getItemAs,\n getItemAttributes,\n getItemRef,\n getItemLabel,\n getItemKey: getItemKeyProp,\n onChange,\n iconSize,\n renderItem: renderItemProp = renderItemDefault,\n getItemLeftIcon,\n getItemLeftSide,\n getItemRightIcon,\n getItemRightSide,\n getItemDisabled,\n disabled,\n ...otherProps\n } = withDefaultGetters(props);\n\n const getItemKey = getItemKeyProp || getItemLabel;\n\n const { getOnChange, getChecked } = useChoiceGroup({\n value: value || null,\n getKey: getItemKey,\n callBack: onChange,\n multiple: false,\n });\n\n const tabsDirection = getTabsDirection(linePosition);\n const isVertical = tabsDirection === 'vertical';\n const tabRefs = useRefs<HTMLDivElement>(items.length, [\n items.length,\n fitMode,\n isVertical,\n ]);\n\n const tabsDimensions = useResizeObserved(\n tabRefs,\n (el): TabDimensions => ({\n size: el?.[isVertical ? 'offsetHeight' : 'offsetWidth'] ?? 0,\n gap: el\n ? parseInt(\n getComputedStyle(el)[isVertical ? 'marginBottom' : 'marginRight'],\n 10,\n )\n : 0,\n }),\n );\n\n const activeTabIdx = items.findIndex(getChecked);\n\n const renderItem = (\n item: typeof items[number],\n onClick?: () => void,\n renderInDropdown?: boolean,\n ) =>\n renderItemProp({\n item,\n onChange: (...args) => {\n onClick?.();\n getOnChange(item)(...args);\n },\n checked: getChecked(item),\n label: getItemLabel(item).toString(),\n icon: getItemIcon(item),\n leftIcon: getItemLeftIcon(item),\n rightIcon: getItemRightIcon(item),\n leftSide: getItemLeftSide(item),\n rightSide: getItemRightSide(item),\n disabled: disabled || getItemDisabled(item),\n onlyIcon,\n size,\n iconSize,\n renderInDropdown,\n as: getItemAs(item) || 'button',\n tabRef: getItemRef(item),\n attributes: getItemAttributes(item),\n });\n\n const renderItemsList: RenderItemsListProp = ({\n withRunningLine = true,\n visibleIndexes,\n getTabClassName,\n }) => (\n <div className={cnTabs('List', { direction: tabsDirection, linePosition })}>\n {items.map((item, idx) => (\n <div\n ref={tabRefs[idx]}\n key={getItemKey(item)}\n className={cnTabs('Tab', { direction: tabsDirection }, [\n getTabClassName?.(idx),\n ])}\n >\n {renderItem(item)}\n </div>\n ))}\n {withRunningLine && !disabled && (\n <TabsRunningLine\n visibleIndexes={visibleIndexes}\n linePosition={linePosition}\n tabsDimensions={tabsDimensions}\n activeTabIdx={activeTabIdx}\n />\n )}\n </div>\n );\n\n const Wrapper = getTabsWrapper(tabsDirection, fitMode);\n\n if (!items.length) {\n return null;\n }\n\n return (\n <div\n className={cnTabs({ size, view, direction: tabsDirection }, [\n className,\n cnMixScrollBar({ invisible: true }),\n ])}\n ref={ref}\n {...otherProps}\n >\n <Wrapper\n tabRefs={tabRefs}\n onChange={onChange}\n tabsDimensions={tabsDimensions}\n renderItem={renderItem}\n renderItemsList={renderItemsList}\n getItemKey={getItemKey}\n getItemChecked={getChecked}\n items={items}\n size={size}\n withScrollButtons={withScrollButtons}\n />\n {view === 'bordered' && <TabsBorderLine linePosition={linePosition} />}\n </div>\n );\n};\n\nexport const Tabs = forwardRef(TabsRender) as TabsComponent;\n\nexport * from './types';\n"],"mappings":"8cAAA,mBAEA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,OAAT,2BACA,OAASC,cAAT,+BAEA,OAASC,cAAT,iDACA,OAASC,iBAAT,uDACA,OAASC,EAAT,uBACA,OACEC,gBADF,CAEEC,cAFF,CAGEC,kBAHF,iBAKA,OAASC,cAAT,CAAyBC,eAAzB,2BACA,OAASC,OAAT,yBACA,OAKEC,kBALF,CAMEC,uBANF,CAOEC,eAPF,CAQEC,eARF,eAYA,MAAO,IAAMC,OAAM,CAAGX,EAAE,CAAC,MAAD,CAAjB,CAEP,QAASY,kBAAT,CACEC,CADF,CAEmB,CACjB,GAAQC,EAAR,CAAqDD,CAArD,CAAQC,IAAR,GAAqDD,CAArD,CAAcE,UAAd,CAAcA,CAAd,YAA2B,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CAAC,MAAD,CAAS,CAAE+D,SAAS,CAAEvB,CAAb,CAA4B1B,YAAY,CAAZA,CAA5B,CAAT,CAAtB,EACGH,CAAK,CAAC0D,GAAN,CAAU,SAAClE,CAAD,CAAOmE,CAAP,QACT,4BACE,GAAG,CAAE5B,CAAO,CAAC4B,CAAD,CADd,CAEE,GAAG,CAAE9C,CAAU,CAACrB,CAAD,CAFjB,CAGE,SAAS,CAAEH,MAAM,CAAC,KAAD,CAAQ,CAAE+D,SAAS,CAAEvB,CAAb,CAAR,CAAsC,QACrD4B,CADqD,WACrDA,CADqD,QACrDA,CAAe,CAAGE,CAAH,CADsC,CAAtC,CAHnB,EAOG3C,CAAU,CAACxB,CAAD,CAPb,CADS,CAAV,CADH,CAYG,oBAAmB,CAAC+B,CAApB,EACC,oBAAC,eAAD,EACE,cAAc,CAAEiC,CADlB,CAEE,YAAY,CAAErD,CAFhB,CAGE,cAAc,CAAE8B,CAHlB,CAIE,YAAY,CAAEK,CAJhB,EAbJ,CAL2C,CA2CzC,CAME,UAAU,CAAEzB,CANd,CAOE,cAAc,CAAEe,CAPlB,CAQE,KAAK,CAAE5B,CART,CASE,IAAI,CAAEF,CATR,CAUE,iBAAiB,iBAVnB,EARF,CAoBY,UAAT,GAAAG,CAAI,EAAmB,oBAAC,cAAD,EAAgB,YAAY,CAAEE,CAA9B,EApB1B,CA5HqE,CAwH9D,IA2BV,CAnJD,CAqJA,MAAO,IAAMyD,KAAI,CAAGvF,UAAU,CAACuB,UAAD,CAAvB,CAEP"}
1
+ {"version":3,"file":"Tabs.js","names":["React","forwardRef","useRefs","cnMixScrollBar","useChoiceGroup","useResizeObserved","cn","getTabsDirection","getTabsWrapper","withDefaultGetters","TabsBorderLine","TabsRunningLine","TabsTab","tabsDefaultFitMode","tabsDefaultLinePosition","tabsDefaultSize","tabsDefaultView","cnTabs","renderItemDefault","props","item","attributes","as","otherProps","TabsRender","ref","size","className","items","view","value","linePosition","fitMode","withScrollButtons","onlyIcon","getItemIcon","getItemAs","getItemAttributes","getItemRef","getItemLabel","getItemKeyProp","getItemKey","onChange","iconSize","renderItem","renderItemProp","getItemLeftIcon","getItemLeftSide","getItemRightIcon","getItemRightSide","getItemDisabled","disabled","getKey","callBack","multiple","getOnChange","getChecked","tabsDirection","isVertical","tabRefs","length","tabsDimensions","el","gap","parseInt","getComputedStyle","activeTabIdx","findIndex","onClick","renderInDropdown","checked","label","toString","icon","leftIcon","rightIcon","leftSide","rightSide","tabRef","Wrapper","direction","invisible","renderItemsList","withRunningLine","visibleIndexes","getTabClassName","map","idx","Tabs"],"sources":["../../../../../src/components/Tabs/Tabs.tsx"],"sourcesContent":["import './Tabs.css';\n\nimport React, { forwardRef } from 'react';\n\nimport { useRefs } from '##/hooks/useRefs';\nimport { cnMixScrollBar } from '##/mixs/MixScrollBar';\n\nimport { useChoiceGroup } from '../../hooks/useChoiceGroup/useChoiceGroup';\nimport { useResizeObserved } from '../../hooks/useResizeObserved/useResizeObserved';\nimport { cn } from '../../utils/bem';\nimport {\n getTabsDirection,\n getTabsWrapper,\n withDefaultGetters,\n} from './helpers';\nimport { TabsBorderLine, TabsRunningLine } from './TabsLine/TabsLine';\nimport { TabsTab } from './TabsTab/TabsTab';\nimport {\n RenderItemProps,\n RenderItemsListProp,\n TabDimensions,\n TabsComponent,\n tabsDefaultFitMode,\n tabsDefaultLinePosition,\n tabsDefaultSize,\n tabsDefaultView,\n TabsProps,\n} from './types';\n\nexport const cnTabs = cn('Tabs');\n\nfunction renderItemDefault<ITEM>(\n props: RenderItemProps<ITEM>,\n): React.ReactNode {\n const { item, attributes = {}, as, ...otherProps } = props;\n return <TabsTab {...attributes} {...otherProps} as={as} />;\n}\n\nconst TabsRender = (props: TabsProps, ref: React.Ref<HTMLDivElement>) => {\n const {\n size = tabsDefaultSize,\n className,\n items,\n view = tabsDefaultView,\n value,\n linePosition = tabsDefaultLinePosition,\n fitMode = tabsDefaultFitMode,\n withScrollButtons = true,\n onlyIcon,\n getItemIcon,\n getItemAs,\n getItemAttributes,\n getItemRef,\n getItemLabel,\n getItemKey: getItemKeyProp,\n onChange,\n iconSize,\n renderItem: renderItemProp = renderItemDefault,\n getItemLeftIcon,\n getItemLeftSide,\n getItemRightIcon,\n getItemRightSide,\n getItemDisabled,\n disabled,\n ...otherProps\n } = withDefaultGetters(props);\n\n const getItemKey = getItemKeyProp || getItemLabel;\n\n const { getOnChange, getChecked } = useChoiceGroup({\n value: value || null,\n getKey: getItemKey,\n callBack: onChange,\n multiple: false,\n });\n\n const tabsDirection = getTabsDirection(linePosition);\n const isVertical = tabsDirection === 'vertical';\n const tabRefs = useRefs<HTMLDivElement>(items.length, [\n items.length,\n fitMode,\n isVertical,\n ]);\n\n const tabsDimensions = useResizeObserved(\n tabRefs,\n (el): TabDimensions => ({\n size: el?.[isVertical ? 'offsetHeight' : 'offsetWidth'] ?? 0,\n gap: el\n ? parseInt(\n getComputedStyle(el)[isVertical ? 'marginBottom' : 'marginRight'],\n 10,\n )\n : 0,\n }),\n );\n\n const activeTabIdx = items.findIndex(getChecked);\n\n const renderItem = (\n item: (typeof items)[number],\n onClick?: () => void,\n renderInDropdown?: boolean,\n ) =>\n renderItemProp({\n item,\n onChange: (...args) => {\n onClick?.();\n getOnChange(item)(...args);\n },\n checked: getChecked(item),\n label: getItemLabel(item).toString(),\n icon: getItemIcon(item),\n leftIcon: getItemLeftIcon(item),\n rightIcon: getItemRightIcon(item),\n leftSide: getItemLeftSide(item),\n rightSide: getItemRightSide(item),\n disabled: disabled || getItemDisabled(item),\n onlyIcon,\n size,\n iconSize,\n renderInDropdown,\n as: getItemAs(item) || 'button',\n tabRef: getItemRef(item),\n attributes: getItemAttributes(item),\n });\n\n const renderItemsList: RenderItemsListProp = ({\n withRunningLine = true,\n visibleIndexes,\n getTabClassName,\n }) => (\n <div className={cnTabs('List', { direction: tabsDirection, linePosition })}>\n {items.map((item, idx) => (\n <div\n ref={tabRefs[idx]}\n key={getItemKey(item)}\n className={cnTabs('Tab', { direction: tabsDirection }, [\n getTabClassName?.(idx),\n ])}\n >\n {renderItem(item)}\n </div>\n ))}\n {withRunningLine && !disabled && (\n <TabsRunningLine\n visibleIndexes={visibleIndexes}\n linePosition={linePosition}\n tabsDimensions={tabsDimensions}\n activeTabIdx={activeTabIdx}\n />\n )}\n </div>\n );\n\n const Wrapper = getTabsWrapper(tabsDirection, fitMode);\n\n if (!items.length) {\n return null;\n }\n\n return (\n <div\n className={cnTabs({ size, view, direction: tabsDirection }, [\n className,\n cnMixScrollBar({ invisible: true }),\n ])}\n ref={ref}\n {...otherProps}\n >\n <Wrapper\n tabRefs={tabRefs}\n onChange={onChange}\n tabsDimensions={tabsDimensions}\n renderItem={renderItem}\n renderItemsList={renderItemsList}\n getItemKey={getItemKey}\n getItemChecked={getChecked}\n items={items}\n size={size}\n withScrollButtons={withScrollButtons}\n />\n {view === 'bordered' && <TabsBorderLine linePosition={linePosition} />}\n </div>\n );\n};\n\nexport const Tabs = forwardRef(TabsRender) as TabsComponent;\n\nexport * from './types';\n"],"mappings":"8cAAA,mBAEA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,OAAT,2BACA,OAASC,cAAT,+BAEA,OAASC,cAAT,iDACA,OAASC,iBAAT,uDACA,OAASC,EAAT,uBACA,OACEC,gBADF,CAEEC,cAFF,CAGEC,kBAHF,iBAKA,OAASC,cAAT,CAAyBC,eAAzB,2BACA,OAASC,OAAT,yBACA,OAKEC,kBALF,CAMEC,uBANF,CAOEC,eAPF,CAQEC,eARF,eAYA,MAAO,IAAMC,OAAM,CAAGX,EAAE,CAAC,MAAD,CAAjB,CAEP,QAASY,kBAAT,CACEC,CADF,CAEmB,CACjB,GAAQC,EAAR,CAAqDD,CAArD,CAAQC,IAAR,GAAqDD,CAArD,CAAcE,UAAd,CAAcA,CAAd,YAA2B,EAA3B,GAA+BC,CAA/B,CAAqDH,CAArD,CAA+BG,EAA/B,CAAsCC,CAAtC,0BAAqDJ,CAArD,YACA,MAAO,qB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AK,CAAC0D,GAAN,CAAU,SAAClE,CAAD,CAAOmE,CAAP,QACT,4BACE,GAAG,CAAE5B,CAAO,CAAC4B,CAAD,CADd,CAEE,GAAG,CAAE9C,CAAU,CAACrB,CAAD,CAFjB,CAGE,SAAS,CAAEH,MAAM,CAAC,KAAD,CAAQ,CAAE+D,SAAS,CAAEvB,CAAb,CAAR,CAAsC,QACrD4B,CADqD,WACrDA,CADqD,QACrDA,CAAe,CAAGE,CAAH,CADsC,CAAtC,CAHnB,EAOG3C,CAAU,CAACxB,CAAD,CAPb,CADS,CAAV,CADH,CAYG,oBAAmB,CAAC+B,CAApB,EACC,oBAAC,eAAD,EACE,cAAc,CAAEiC,CADlB,CAEE,YAAY,CAAErD,CAFhB,CAGE,cAAc,CAAE8B,CAHlB,CAIE,YAAY,CAAEK,CAJhB,EAbJ,CAL2C,CA2CzC,CAME,UAAU,CAAEzB,CANd,CAOE,cAAc,CAAEe,CAPlB,CAQE,KAAK,CAAE5B,CART,CASE,IAAI,CAAEF,CATR,CAUE,iBAAiB,iBAVnB,EARF,CAoBY,UAAT,GAAAG,CAAI,EAAmB,oBAAC,cAAD,EAAgB,YAAY,CAAEE,CAA9B,EApB1B,CA5HqE,CAwH9D,IA2BV,CAnJD,CAqJA,MAAO,IAAMyD,KAAI,CAAGvF,UAAU,CAACuB,UAAD,CAAvB,CAEP"}
@@ -23,16 +23,16 @@ export type TabsItemDefault = {
23
23
  icon?: IconComponent;
24
24
  };
25
25
  export declare const tabsSizes: readonly ["m", "s", "xs"];
26
- export type TabsPropSize = typeof tabsSizes[number];
26
+ export type TabsPropSize = (typeof tabsSizes)[number];
27
27
  export declare const tabsDefaultSize: TabsPropSize;
28
28
  export declare const tabsViews: readonly ["bordered", "clear"];
29
- export type TabsPropView = typeof tabsViews[number];
29
+ export type TabsPropView = (typeof tabsViews)[number];
30
30
  export declare const tabsDefaultView: TabsPropView;
31
31
  export declare const tabsLinePositions: readonly ["bottom", "top", "left", "right"];
32
- export type TabsPropLinePosition = typeof tabsLinePositions[number];
32
+ export type TabsPropLinePosition = (typeof tabsLinePositions)[number];
33
33
  export declare const tabsDefaultLinePosition: TabsPropLinePosition;
34
34
  export declare const tabsFitModes: readonly ["scroll", "dropdown"];
35
- export type TabsPropFitMode = typeof tabsFitModes[number];
35
+ export type TabsPropFitMode = (typeof tabsFitModes)[number];
36
36
  export declare const tabsDefaultFitMode: TabsPropFitMode;
37
37
  export type TabsPropGetItemKey<ITEM> = (item: ITEM) => string | number;
38
38
  export type TabsPropGetItemLabel<ITEM> = (item: ITEM) => string | number;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["tabsSizes","tabsDefaultSize","tabsViews","tabsDefaultView","tabsLinePositions","tabsDefaultLinePosition","tabsFitModes","tabsDefaultFitMode"],"sources":["../../../../../src/components/Tabs/types.ts"],"sourcesContent":["import { IconComponent, IconPropSize } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { AsAttributes, AsTags } from '##/utils/types/AsTags';\nimport { PropsWithAsAttributes } from '##/utils/types/PropsWithAsAttributes';\n\nimport { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\n\nexport type TabDimensions = {\n size: number;\n gap: number;\n};\n\nexport type TabsItemDefault = {\n label: string | number;\n leftIcon?: IconComponent;\n rightIcon?: IconComponent;\n rightSide?: React.ReactNode;\n leftSide?: React.ReactNode;\n disabled?: boolean;\n as?: AsTags;\n ref?: React.RefObject<HTMLElement>;\n attributes?: AsAttributes;\n\n /**\n * @deprecated since version 4.11.0 use leftIcon\n */\n icon?: IconComponent;\n};\n\nexport const tabsSizes = ['m', 's', 'xs'] as const;\nexport type TabsPropSize = typeof tabsSizes[number];\nexport const tabsDefaultSize: TabsPropSize = tabsSizes[0];\n\nexport const tabsViews = ['bordered', 'clear'] as const;\nexport type TabsPropView = typeof tabsViews[number];\nexport const tabsDefaultView: TabsPropView = tabsViews[0];\n\nexport const tabsLinePositions = ['bottom', 'top', 'left', 'right'] as const;\nexport type TabsPropLinePosition = typeof tabsLinePositions[number];\nexport const tabsDefaultLinePosition: TabsPropLinePosition = 'bottom';\n\nexport const tabsFitModes = ['scroll', 'dropdown'] as const;\nexport type TabsPropFitMode = typeof tabsFitModes[number];\nexport const tabsDefaultFitMode: TabsPropFitMode = 'dropdown';\n\nexport type TabsPropGetItemKey<ITEM> = (item: ITEM) => string | number;\nexport type TabsPropGetItemLabel<ITEM> = (item: ITEM) => string | number;\nexport type TabsPropGetItemChecked<ITEM> = (item: ITEM) => boolean | undefined;\nexport type TabsPropGetItemIcon<ITEM> = (\n item: ITEM,\n) => IconComponent | undefined;\nexport type TabsPropGetItemSide<ITEM> = (\n item: ITEM,\n) => React.ReactNode | undefined;\n\nexport type TabsPropGetItemAs<ITEM> = (item: ITEM) => AsTags | undefined;\nexport type TabsPropGetItemAttributes<ITEM> = (\n item: ITEM,\n) => TabsItemDefault['attributes'];\nexport type TabsPropGetItemRef<ITEM> = (\n item: ITEM,\n) => React.RefObject<HTMLElement> | undefined;\n\nexport type TabsPropGetItemDisabled<ITEM> = (item: ITEM) => boolean | undefined;\n\nexport type TabsPropOnChange<ITEM> = (\n value: ITEM,\n props: {\n e: React.MouseEvent | React.KeyboardEvent;\n },\n) => void;\n\nexport type RenderItemProps<ITEM> = {\n item: ITEM;\n onChange: React.MouseEventHandler;\n checked: boolean;\n size: TabsPropSize;\n iconSize?: IconPropSize;\n onlyIcon?: boolean;\n label: string;\n tabRef?: React.RefObject<HTMLElement>;\n renderInDropdown?: boolean;\n} & Omit<TabsItemDefault, 'label' | 'ref'>;\n\nexport type RenderItem<ITEM> = (\n props: RenderItemProps<ITEM>,\n) => React.ReactNode | null;\n\nexport type TabsFitModeWrapperProps<ITEM> = {\n items: ITEM[];\n tabsDimensions: TabDimensions[];\n getItemKey: TabsPropGetItemKey<ITEM>;\n getItemChecked: TabsPropGetItemChecked<ITEM>;\n renderItem: (item: ITEM) => React.ReactNode;\n renderItemsList: RenderItemsListProp;\n onChange: TabsPropOnChange<ITEM>;\n tabRefs: Array<React.RefObject<HTMLElement>>;\n size: TabsPropSize;\n withScrollButtons?: boolean;\n};\n\nexport type TabsProps<ITEM = TabsItemDefault> = PropsWithHTMLAttributesAndRef<\n {\n size?: TabsPropSize;\n onlyIcon?: boolean;\n view?: TabsPropView;\n iconSize?: IconPropSize;\n items: ITEM[];\n value?: ITEM | null;\n getItemKey?: TabsPropGetItemKey<ITEM>;\n getItemLabel?: TabsPropGetItemLabel<ITEM>;\n getItemLeftIcon?: TabsPropGetItemIcon<ITEM>;\n getItemRightIcon?: TabsPropGetItemIcon<ITEM>;\n getItemLeftSide?: TabsPropGetItemSide<ITEM>;\n getItemRightSide?: TabsPropGetItemSide<ITEM>;\n getItemDisabled?: TabsPropGetItemDisabled<ITEM>;\n getItemAs?: TabsPropGetItemAs<ITEM>;\n getItemAttributes?: TabsPropGetItemAttributes<ITEM>;\n getItemRef?: TabsPropGetItemRef<ITEM>;\n children?: never;\n onChange: TabsPropOnChange<ITEM>;\n renderItem?: RenderItem<ITEM>;\n disabled?: boolean;\n\n /**\n * @deprecated since version 4.11.0 use getItemLeftIcon\n */\n getItemIcon?: TabsPropGetItemIcon<ITEM>;\n } & (\n | ({\n linePosition?: Extract<TabsPropLinePosition, 'bottom' | 'top'>;\n } & (\n | {\n fitMode?: 'scroll';\n withScrollButtons?: boolean;\n }\n | {\n fitMode?: 'dropdown';\n withScrollButtons?: never;\n }\n ))\n | {\n linePosition: Extract<TabsPropLinePosition, 'left' | 'right'>;\n fitMode?: never;\n withScrollButtons?: never;\n }\n ),\n HTMLDivElement\n> &\n (ITEM extends { label: TabsItemDefault['label'] }\n ? {}\n : {\n getItemLabel: TabsPropGetItemLabel<ITEM>;\n });\n\nexport type TabsComponent = <ITEM>(\n props: TabsProps<ITEM>,\n) => React.ReactNode | null;\n\nexport type TabsTabProps<AS extends AsTags = 'button'> = PropsWithAsAttributes<\n {\n onChange: React.MouseEventHandler;\n checked: boolean;\n size: TabsPropSize;\n iconSize?: IconPropSize;\n onlyIcon?: boolean;\n className?: string;\n label: string;\n tabRef?: React.RefObject<HTMLElement>;\n renderInDropdown?: boolean;\n } & Omit<TabsItemDefault, 'label' | 'ref' | 'attributes'>,\n AS\n>;\n\nexport type TabsTabComponent = <AS extends AsTags = 'button'>(\n props: TabsTabProps<AS>,\n) => React.ReactNode | null;\n\nexport type TabsMoreItemsProps<ITEM = TabsItemDefault> =\n PropsWithHTMLAttributesAndRef<\n {\n items: ITEM[];\n renderItem: (\n item: ITEM,\n onClick: () => void,\n renderInDropdown?: boolean,\n ) => React.ReactNode;\n getItemKey: TabsPropGetItemKey<ITEM>;\n onChange: TabsPropOnChange<ITEM>;\n height: number;\n size: TabsPropSize;\n } & React.RefAttributes<HTMLDivElement>,\n HTMLDivElement\n >;\n\nexport type TabsMoreItemsComponent = <ITEM>(\n props: TabsMoreItemsProps<ITEM>,\n) => React.ReactNode | null;\n\nexport type RenderItemsListProp = (props: {\n visibleIndexes?: number[];\n withRunningLine?: boolean;\n getTabClassName?: (idx: number) => string | undefined;\n}) => React.ReactNode;\n\nexport type TabsDirection = 'horizontal' | 'vertical';\n"],"mappings":"AA8BA,MAAO,IAAMA,UAAS,CAAG,CAAC,GAAD,CAAM,GAAN,CAAW,IAAX,CAAlB,CAEP,MAAO,IAAMC,gBAA6B,CAAGD,SAAS,CAAC,CAAD,CAA/C,CAEP,MAAO,IAAME,UAAS,CAAG,CAAC,UAAD,CAAa,OAAb,CAAlB,CAEP,MAAO,IAAMC,gBAA6B,CAAGD,SAAS,CAAC,CAAD,CAA/C,CAEP,MAAO,IAAME,kBAAiB,CAAG,CAAC,QAAD,CAAW,KAAX,CAAkB,MAAlB,CAA0B,OAA1B,CAA1B,CAEP,MAAO,IAAMC,wBAA6C,CAAG,QAAtD,CAEP,MAAO,IAAMC,aAAY,CAAG,CAAC,QAAD,CAAW,UAAX,CAArB,CAEP,MAAO,IAAMC,mBAAmC,CAAG,UAA5C"}
1
+ {"version":3,"file":"types.js","names":["tabsSizes","tabsDefaultSize","tabsViews","tabsDefaultView","tabsLinePositions","tabsDefaultLinePosition","tabsFitModes","tabsDefaultFitMode"],"sources":["../../../../../src/components/Tabs/types.ts"],"sourcesContent":["import { IconComponent, IconPropSize } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { AsAttributes, AsTags } from '##/utils/types/AsTags';\nimport { PropsWithAsAttributes } from '##/utils/types/PropsWithAsAttributes';\n\nimport { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\n\nexport type TabDimensions = {\n size: number;\n gap: number;\n};\n\nexport type TabsItemDefault = {\n label: string | number;\n leftIcon?: IconComponent;\n rightIcon?: IconComponent;\n rightSide?: React.ReactNode;\n leftSide?: React.ReactNode;\n disabled?: boolean;\n as?: AsTags;\n ref?: React.RefObject<HTMLElement>;\n attributes?: AsAttributes;\n\n /**\n * @deprecated since version 4.11.0 use leftIcon\n */\n icon?: IconComponent;\n};\n\nexport const tabsSizes = ['m', 's', 'xs'] as const;\nexport type TabsPropSize = (typeof tabsSizes)[number];\nexport const tabsDefaultSize: TabsPropSize = tabsSizes[0];\n\nexport const tabsViews = ['bordered', 'clear'] as const;\nexport type TabsPropView = (typeof tabsViews)[number];\nexport const tabsDefaultView: TabsPropView = tabsViews[0];\n\nexport const tabsLinePositions = ['bottom', 'top', 'left', 'right'] as const;\nexport type TabsPropLinePosition = (typeof tabsLinePositions)[number];\nexport const tabsDefaultLinePosition: TabsPropLinePosition = 'bottom';\n\nexport const tabsFitModes = ['scroll', 'dropdown'] as const;\nexport type TabsPropFitMode = (typeof tabsFitModes)[number];\nexport const tabsDefaultFitMode: TabsPropFitMode = 'dropdown';\n\nexport type TabsPropGetItemKey<ITEM> = (item: ITEM) => string | number;\nexport type TabsPropGetItemLabel<ITEM> = (item: ITEM) => string | number;\nexport type TabsPropGetItemChecked<ITEM> = (item: ITEM) => boolean | undefined;\nexport type TabsPropGetItemIcon<ITEM> = (\n item: ITEM,\n) => IconComponent | undefined;\nexport type TabsPropGetItemSide<ITEM> = (\n item: ITEM,\n) => React.ReactNode | undefined;\n\nexport type TabsPropGetItemAs<ITEM> = (item: ITEM) => AsTags | undefined;\nexport type TabsPropGetItemAttributes<ITEM> = (\n item: ITEM,\n) => TabsItemDefault['attributes'];\nexport type TabsPropGetItemRef<ITEM> = (\n item: ITEM,\n) => React.RefObject<HTMLElement> | undefined;\n\nexport type TabsPropGetItemDisabled<ITEM> = (item: ITEM) => boolean | undefined;\n\nexport type TabsPropOnChange<ITEM> = (\n value: ITEM,\n props: {\n e: React.MouseEvent | React.KeyboardEvent;\n },\n) => void;\n\nexport type RenderItemProps<ITEM> = {\n item: ITEM;\n onChange: React.MouseEventHandler;\n checked: boolean;\n size: TabsPropSize;\n iconSize?: IconPropSize;\n onlyIcon?: boolean;\n label: string;\n tabRef?: React.RefObject<HTMLElement>;\n renderInDropdown?: boolean;\n} & Omit<TabsItemDefault, 'label' | 'ref'>;\n\nexport type RenderItem<ITEM> = (\n props: RenderItemProps<ITEM>,\n) => React.ReactNode | null;\n\nexport type TabsFitModeWrapperProps<ITEM> = {\n items: ITEM[];\n tabsDimensions: TabDimensions[];\n getItemKey: TabsPropGetItemKey<ITEM>;\n getItemChecked: TabsPropGetItemChecked<ITEM>;\n renderItem: (item: ITEM) => React.ReactNode;\n renderItemsList: RenderItemsListProp;\n onChange: TabsPropOnChange<ITEM>;\n tabRefs: Array<React.RefObject<HTMLElement>>;\n size: TabsPropSize;\n withScrollButtons?: boolean;\n};\n\nexport type TabsProps<ITEM = TabsItemDefault> = PropsWithHTMLAttributesAndRef<\n {\n size?: TabsPropSize;\n onlyIcon?: boolean;\n view?: TabsPropView;\n iconSize?: IconPropSize;\n items: ITEM[];\n value?: ITEM | null;\n getItemKey?: TabsPropGetItemKey<ITEM>;\n getItemLabel?: TabsPropGetItemLabel<ITEM>;\n getItemLeftIcon?: TabsPropGetItemIcon<ITEM>;\n getItemRightIcon?: TabsPropGetItemIcon<ITEM>;\n getItemLeftSide?: TabsPropGetItemSide<ITEM>;\n getItemRightSide?: TabsPropGetItemSide<ITEM>;\n getItemDisabled?: TabsPropGetItemDisabled<ITEM>;\n getItemAs?: TabsPropGetItemAs<ITEM>;\n getItemAttributes?: TabsPropGetItemAttributes<ITEM>;\n getItemRef?: TabsPropGetItemRef<ITEM>;\n children?: never;\n onChange: TabsPropOnChange<ITEM>;\n renderItem?: RenderItem<ITEM>;\n disabled?: boolean;\n\n /**\n * @deprecated since version 4.11.0 use getItemLeftIcon\n */\n getItemIcon?: TabsPropGetItemIcon<ITEM>;\n } & (\n | ({\n linePosition?: Extract<TabsPropLinePosition, 'bottom' | 'top'>;\n } & (\n | {\n fitMode?: 'scroll';\n withScrollButtons?: boolean;\n }\n | {\n fitMode?: 'dropdown';\n withScrollButtons?: never;\n }\n ))\n | {\n linePosition: Extract<TabsPropLinePosition, 'left' | 'right'>;\n fitMode?: never;\n withScrollButtons?: never;\n }\n ),\n HTMLDivElement\n> &\n (ITEM extends { label: TabsItemDefault['label'] }\n ? {}\n : {\n getItemLabel: TabsPropGetItemLabel<ITEM>;\n });\n\nexport type TabsComponent = <ITEM>(\n props: TabsProps<ITEM>,\n) => React.ReactNode | null;\n\nexport type TabsTabProps<AS extends AsTags = 'button'> = PropsWithAsAttributes<\n {\n onChange: React.MouseEventHandler;\n checked: boolean;\n size: TabsPropSize;\n iconSize?: IconPropSize;\n onlyIcon?: boolean;\n className?: string;\n label: string;\n tabRef?: React.RefObject<HTMLElement>;\n renderInDropdown?: boolean;\n } & Omit<TabsItemDefault, 'label' | 'ref' | 'attributes'>,\n AS\n>;\n\nexport type TabsTabComponent = <AS extends AsTags = 'button'>(\n props: TabsTabProps<AS>,\n) => React.ReactNode | null;\n\nexport type TabsMoreItemsProps<ITEM = TabsItemDefault> =\n PropsWithHTMLAttributesAndRef<\n {\n items: ITEM[];\n renderItem: (\n item: ITEM,\n onClick: () => void,\n renderInDropdown?: boolean,\n ) => React.ReactNode;\n getItemKey: TabsPropGetItemKey<ITEM>;\n onChange: TabsPropOnChange<ITEM>;\n height: number;\n size: TabsPropSize;\n } & React.RefAttributes<HTMLDivElement>,\n HTMLDivElement\n >;\n\nexport type TabsMoreItemsComponent = <ITEM>(\n props: TabsMoreItemsProps<ITEM>,\n) => React.ReactNode | null;\n\nexport type RenderItemsListProp = (props: {\n visibleIndexes?: number[];\n withRunningLine?: boolean;\n getTabClassName?: (idx: number) => string | undefined;\n}) => React.ReactNode;\n\nexport type TabsDirection = 'horizontal' | 'vertical';\n"],"mappings":"AA8BA,MAAO,IAAMA,UAAS,CAAG,CAAC,GAAD,CAAM,GAAN,CAAW,IAAX,CAAlB,CAEP,MAAO,IAAMC,gBAA6B,CAAGD,SAAS,CAAC,CAAD,CAA/C,CAEP,MAAO,IAAME,UAAS,CAAG,CAAC,UAAD,CAAa,OAAb,CAAlB,CAEP,MAAO,IAAMC,gBAA6B,CAAGD,SAAS,CAAC,CAAD,CAA/C,CAEP,MAAO,IAAME,kBAAiB,CAAG,CAAC,QAAD,CAAW,KAAX,CAAkB,MAAlB,CAA0B,OAA1B,CAA1B,CAEP,MAAO,IAAMC,wBAA6C,CAAG,QAAtD,CAEP,MAAO,IAAMC,aAAY,CAAG,CAAC,QAAD,CAAW,UAAX,CAArB,CAEP,MAAO,IAAMC,mBAAmC,CAAG,UAA5C"}
@@ -5,7 +5,7 @@ import { TagBase } from '../TagBase/TagBase';
5
5
  type TagBaseProps = React.ComponentProps<typeof TagBase>;
6
6
  export declare const tagPropMode: readonly ["button", "check", "cancel", "link", "info"];
7
7
  export declare const tagPropModeDefault: "button";
8
- type TagPropMode = typeof tagPropMode[number];
8
+ type TagPropMode = (typeof tagPropMode)[number];
9
9
  type CommonProps = {
10
10
  size?: TagBaseProps['size'];
11
11
  label: TagBaseProps['label'];
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.js","names":["React","forwardRef","useRef","useForkRef","usePropsHandler","TagBase","tagPropMode","tagPropModeDefault","getParams","mode","checked","onClick","onChange","onCancel","view","as","withAction","e","COMPONENT_NAME","TagRenter","props","ref","tagRef","otherProps","params","Tag"],"sources":["../../../../../src/components/Tag/Tag.tsx"],"sourcesContent":["import { IconComponent, IconProps } from '@consta/icons/Icon';\nimport React, { forwardRef, useRef } from 'react';\n\nimport { AsTagAttribute, AsTags } from '##/utils/types/AsTags';\n\nimport { useForkRef } from '../../hooks/useForkRef/useForkRef';\nimport { usePropsHandler } from '../EventInterceptor/usePropsHandler';\nimport { TagBase } from '../TagBase/TagBase';\n\ntype TagBaseProps = React.ComponentProps<typeof TagBase>;\n\nexport const tagPropMode = [\n 'button',\n 'check',\n 'cancel',\n 'link',\n 'info',\n] as const;\nexport const tagPropModeDefault = tagPropMode[0];\ntype TagPropMode = typeof tagPropMode[number];\n\ntype CommonProps = {\n size?: TagBaseProps['size'];\n label: TagBaseProps['label'];\n group?: TagBaseProps['group'];\n icon?: IconComponent;\n iconSize?: IconProps['size'];\n children?: never;\n disabled?: boolean;\n};\n\ntype PropsWithModeButton = CommonProps & {\n mode?: 'button';\n onClick: React.MouseEventHandler<HTMLButtonElement>;\n checked?: never;\n onChange?: never;\n onCancel?: never;\n cancelButtonTabIndex?: never;\n};\n\ntype PropsWithModeLink = CommonProps & {\n mode: 'link';\n checked?: never;\n onChange?: never;\n onCancel?: never;\n cancelButtonTabIndex?: never;\n};\n\ntype PropsWithModeCheck = CommonProps & {\n mode: 'check';\n onChange: (\n checked: boolean,\n params: { e?: React.MouseEvent; checked: boolean },\n ) => void;\n checked: boolean;\n onClick?: never;\n onCancel?: never;\n cancelButtonTabIndex?: never;\n};\n\ntype PropsWithModeCancel = CommonProps & {\n mode: 'cancel';\n onCancel: React.MouseEventHandler<HTMLButtonElement>;\n cancelButtonTabIndex?: number;\n onClick?: never;\n onChange?: never;\n checked?: never;\n};\n\ntype PropsWithModeInfo = CommonProps & {\n mode: 'info';\n onCancel?: never;\n onClick?: never;\n onChange?: never;\n checked?: never;\n cancelButtonTabIndex?: never;\n};\n\ntype Props<ROLE extends TagPropMode = 'button'> = ROLE extends 'button'\n ? PropsWithModeButton &\n Omit<AsTagAttribute<'button'>, keyof PropsWithModeButton>\n : {} & ROLE extends 'check'\n ? PropsWithModeCheck &\n Omit<AsTagAttribute<'button'>, keyof PropsWithModeCheck>\n : {} & ROLE extends 'cancel'\n ? PropsWithModeCancel &\n Omit<AsTagAttribute<'span'>, keyof PropsWithModeCancel>\n : {} & ROLE extends 'link'\n ? PropsWithModeLink & Omit<AsTagAttribute<'a'>, keyof PropsWithModeLink>\n : {} & ROLE extends 'info'\n ? PropsWithModeInfo & Omit<AsTagAttribute<'span'>, keyof PropsWithModeInfo>\n : {};\n\ntype TagRender = <ROLE extends TagPropMode>(\n props: Props<ROLE>,\n ref: React.Ref<HTMLElement>,\n) => React.ReactNode | null;\n\ntype TagComponent = <ROLE extends TagPropMode>(\n props: Props<ROLE> & React.RefAttributes<HTMLElement>,\n) => React.ReactNode | null;\n\nexport function getParams(\n mode: TagPropMode,\n checked?: PropsWithModeCheck['checked'],\n onClick?: React.MouseEventHandler,\n onChange?: PropsWithModeCheck['onChange'],\n onCancel?: PropsWithModeCancel['onCancel'],\n): {\n view?: TagBaseProps['view'];\n onClick?: TagBaseProps['onClick'];\n onCancel?: TagBaseProps['onCancel'];\n withAction?: TagBaseProps['withAction'];\n as: AsTags;\n} {\n switch (mode) {\n case 'button':\n return {\n view: 'filled',\n onClick,\n as: 'button',\n withAction: true,\n };\n case 'link':\n return {\n view: 'filled',\n onClick,\n as: 'a',\n withAction: true,\n };\n case 'check':\n return {\n view: checked ? 'filled' : 'stroked',\n onClick:\n typeof onChange === 'function'\n ? (e: React.MouseEvent) =>\n onChange(!checked, { e, checked: !checked })\n : undefined,\n as: 'button',\n withAction: true,\n };\n case 'cancel':\n return {\n view: 'filled',\n onCancel,\n as: 'span',\n };\n case 'info':\n return {\n view: 'filled',\n as: 'span',\n };\n }\n}\n\nexport const COMPONENT_NAME = 'Tag' as const;\n\nconst TagRenter: TagRender = (props, ref) => {\n const tagRef = useRef<HTMLDivElement>(null);\n const {\n mode = tagPropModeDefault,\n onChange,\n checked,\n onCancel,\n onClick,\n ...otherProps\n } = usePropsHandler(COMPONENT_NAME, props, tagRef);\n const params = getParams(mode, checked, onClick, onChange, onCancel);\n\n return (\n <TagBase {...otherProps} {...params} ref={useForkRef([ref, tagRef])} />\n );\n};\n\nexport const Tag = forwardRef(TagRenter) as TagComponent;\n"],"mappings":"sJACA,MAAOA,MAAP,EAAgBC,UAAhB,CAA4BC,MAA5B,KAA0C,OAA1C,CAIA,OAASC,UAAT,yCACA,OAASC,eAAT,2CACA,OAASC,OAAT,0BAIA,MAAO,IAAMC,YAAW,CAAG,CACzB,QADyB,CAEzB,OAFyB,CAGzB,QAHyB,CAIzB,MAJyB,CAKzB,MALyB,CAApB,CAOP,MAAO,IAAMC,mBAAkB,CAAGD,WAAW,CAAC,CAAD,CAAtC,CAoFP,MAAO,SAASE,UAAT,CACLC,CADK,CAELC,CAFK,CAGLC,CAHK,CAILC,CAJK,CAKLC,CALK,CAYL,OAEO,QAFP,GACQJ,CADR,CAGW,CACLK,IAAI,CAAE,QADD,CAELH,OAAO,CAAPA,CAFK,CAGLI,EAAE,CAAE,QAHC,CAILC,UAAU,GAJL,CAHX,CASO,MATP,GACQP,CADR,CAUW,CACLK,IAAI,CAAE,QADD,CAELH,OAAO,CAAPA,CAFK,CAGLI,EAAE,CAAE,GAHC,CAILC,UAAU,GAJL,CAVX,CAgBO,OAhBP,GACQP,CADR,CAiBW,CACLK,IAAI,CAAEJ,CAAO,CAAG,QAAH,CAAc,SADtB,CAELC,OAAO,CACe,UAApB,QAAOC,EAAP,CACI,SAACK,CAAD,QACEL,EAAQ,CAAC,CAACF,CAAF,CAAW,CAAEO,CAAC,CAADA,CAAF,CAAKP,OAAO,CAAE,CAACA,CAAf,CAAX,CADV,CADJ,OAHG,CAOLK,EAAE,CAAE,QAPC,CAQLC,UAAU,GARL,CAjBX,CA2BO,QA3BP,GACQP,CADR,CA4BW,CACLK,IAAI,CAAE,QADD,CAELD,QAAQ,CAARA,CAFK,CAGLE,EAAE,CAAE,MAHC,CA5BX,CAiCO,MAjCP,GACQN,CADR,CAkCW,CACLK,IAAI,CAAE,QADD,CAELC,EAAE,CAAE,MAFC,CAlCX,OAuCD,CAED,MAAO,IAAMG,eAAc,CAAG,KAAvB,CAEP,GAAMC,UAAoB,CAAG,SAACC,CAAD,CAAQC,CAAR,CAAgB,IACrCC,EAAM,CAAGpB,MAAM,CAAiB,IAAjB,CADsB,GASvCE,eAAe,CAACc,cAAD,CAAiBE,CAAjB,CAAwBE,CAAxB,CATwB,KAGzCb,IAHyC,CAGzCA,CAHyC,YAGlCF,kBAHkC,GAIzCK,CAJyC,GAIzCA,QAJyC,CAKzCF,CALyC,GAKzCA,OALyC,CAMzCG,CANyC,GAMzCA,QANyC,CAOzCF,CAPyC,GAOzCA,OAPyC,CAQtCY,CARsC,uCAUrCC,CAAM,CAAGhB,SAAS,CAACC,CAAD,CAAOC,CAAP,CAAgBC,CAAhB,CAAyBC,CAAzB,CAAmCC,CAAnC,CAVmB,CAY3C,MACE,qBAAC,OAAD,kBAAaU,CAAb,CAA6BC,CAA7B,EAAqC,GAAG,CAAErB,UAAU,CAAC,CAACkB,CAAD,CAAMC,CAAN,CAAD,CAApD,GAEH,CAfD,CAiBA,MAAO,IAAMG,IAAG,CAAGxB,UAAU,CAACkB,SAAD,CAAtB"}
1
+ {"version":3,"file":"Tag.js","names":["React","forwardRef","useRef","useForkRef","usePropsHandler","TagBase","tagPropMode","tagPropModeDefault","getParams","mode","checked","onClick","onChange","onCancel","view","as","withAction","e","COMPONENT_NAME","TagRenter","props","ref","tagRef","otherProps","params","Tag"],"sources":["../../../../../src/components/Tag/Tag.tsx"],"sourcesContent":["import { IconComponent, IconProps } from '@consta/icons/Icon';\nimport React, { forwardRef, useRef } from 'react';\n\nimport { AsTagAttribute, AsTags } from '##/utils/types/AsTags';\n\nimport { useForkRef } from '../../hooks/useForkRef/useForkRef';\nimport { usePropsHandler } from '../EventInterceptor/usePropsHandler';\nimport { TagBase } from '../TagBase/TagBase';\n\ntype TagBaseProps = React.ComponentProps<typeof TagBase>;\n\nexport const tagPropMode = [\n 'button',\n 'check',\n 'cancel',\n 'link',\n 'info',\n] as const;\nexport const tagPropModeDefault = tagPropMode[0];\ntype TagPropMode = (typeof tagPropMode)[number];\n\ntype CommonProps = {\n size?: TagBaseProps['size'];\n label: TagBaseProps['label'];\n group?: TagBaseProps['group'];\n icon?: IconComponent;\n iconSize?: IconProps['size'];\n children?: never;\n disabled?: boolean;\n};\n\ntype PropsWithModeButton = CommonProps & {\n mode?: 'button';\n onClick: React.MouseEventHandler<HTMLButtonElement>;\n checked?: never;\n onChange?: never;\n onCancel?: never;\n cancelButtonTabIndex?: never;\n};\n\ntype PropsWithModeLink = CommonProps & {\n mode: 'link';\n checked?: never;\n onChange?: never;\n onCancel?: never;\n cancelButtonTabIndex?: never;\n};\n\ntype PropsWithModeCheck = CommonProps & {\n mode: 'check';\n onChange: (\n checked: boolean,\n params: { e?: React.MouseEvent; checked: boolean },\n ) => void;\n checked: boolean;\n onClick?: never;\n onCancel?: never;\n cancelButtonTabIndex?: never;\n};\n\ntype PropsWithModeCancel = CommonProps & {\n mode: 'cancel';\n onCancel: React.MouseEventHandler<HTMLButtonElement>;\n cancelButtonTabIndex?: number;\n onClick?: never;\n onChange?: never;\n checked?: never;\n};\n\ntype PropsWithModeInfo = CommonProps & {\n mode: 'info';\n onCancel?: never;\n onClick?: never;\n onChange?: never;\n checked?: never;\n cancelButtonTabIndex?: never;\n};\n\ntype Props<ROLE extends TagPropMode = 'button'> = ROLE extends 'button'\n ? PropsWithModeButton &\n Omit<AsTagAttribute<'button'>, keyof PropsWithModeButton>\n : {} & ROLE extends 'check'\n ? PropsWithModeCheck &\n Omit<AsTagAttribute<'button'>, keyof PropsWithModeCheck>\n : {} & ROLE extends 'cancel'\n ? PropsWithModeCancel &\n Omit<AsTagAttribute<'span'>, keyof PropsWithModeCancel>\n : {} & ROLE extends 'link'\n ? PropsWithModeLink & Omit<AsTagAttribute<'a'>, keyof PropsWithModeLink>\n : {} & ROLE extends 'info'\n ? PropsWithModeInfo &\n Omit<AsTagAttribute<'span'>, keyof PropsWithModeInfo>\n : {};\n\ntype TagRender = <ROLE extends TagPropMode>(\n props: Props<ROLE>,\n ref: React.Ref<HTMLElement>,\n) => React.ReactNode | null;\n\ntype TagComponent = <ROLE extends TagPropMode>(\n props: Props<ROLE> & React.RefAttributes<HTMLElement>,\n) => React.ReactNode | null;\n\nexport function getParams(\n mode: TagPropMode,\n checked?: PropsWithModeCheck['checked'],\n onClick?: React.MouseEventHandler,\n onChange?: PropsWithModeCheck['onChange'],\n onCancel?: PropsWithModeCancel['onCancel'],\n): {\n view?: TagBaseProps['view'];\n onClick?: TagBaseProps['onClick'];\n onCancel?: TagBaseProps['onCancel'];\n withAction?: TagBaseProps['withAction'];\n as: AsTags;\n} {\n switch (mode) {\n case 'button':\n return {\n view: 'filled',\n onClick,\n as: 'button',\n withAction: true,\n };\n case 'link':\n return {\n view: 'filled',\n onClick,\n as: 'a',\n withAction: true,\n };\n case 'check':\n return {\n view: checked ? 'filled' : 'stroked',\n onClick:\n typeof onChange === 'function'\n ? (e: React.MouseEvent) =>\n onChange(!checked, { e, checked: !checked })\n : undefined,\n as: 'button',\n withAction: true,\n };\n case 'cancel':\n return {\n view: 'filled',\n onCancel,\n as: 'span',\n };\n case 'info':\n return {\n view: 'filled',\n as: 'span',\n };\n }\n}\n\nexport const COMPONENT_NAME = 'Tag' as const;\n\nconst TagRenter: TagRender = (props, ref) => {\n const tagRef = useRef<HTMLDivElement>(null);\n const {\n mode = tagPropModeDefault,\n onChange,\n checked,\n onCancel,\n onClick,\n ...otherProps\n } = usePropsHandler(COMPONENT_NAME, props, tagRef);\n const params = getParams(mode, checked, onClick, onChange, onCancel);\n\n return (\n <TagBase {...otherProps} {...params} ref={useForkRef([ref, tagRef])} />\n );\n};\n\nexport const Tag = forwardRef(TagRen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CAAD,CAAQC,CAAR,CAAgB,IACrCC,EAAM,CAAGpB,MAAM,CAAiB,IAAjB,CADsB,GASvCE,eAAe,CAACc,cAAD,CAAiBE,CAAjB,CAAwBE,CAAxB,CATwB,KAGzCb,IAHyC,CAGzCA,CAHyC,YAGlCF,kBAHkC,GAIzCK,CAJyC,GAIzCA,QAJyC,CAKzCF,CALyC,GAKzCA,OALyC,CAMzCG,CANyC,GAMzCA,QANyC,CAOzCF,CAPyC,GAOzCA,OAPyC,CAQtCY,CARsC,uCAUrCC,CAAM,CAAGhB,SAAS,CAACC,CAAD,CAAOC,CAAP,CAAgBC,CAAhB,CAAyBC,CAAzB,CAAmCC,CAAnC,CAVmB,CAY3C,MACE,qBAAC,OAAD,kBAAaU,CAAb,CAA6BC,CAA7B,EAAqC,GAAG,CAAErB,UAAU,CAAC,CAACkB,CAAD,CAAMC,CAAN,CAAD,CAApD,GAEH,CAfD,CAiBA,MAAO,IAAMG,IAAG,CAAGxB,UAAU,CAACkB,SAAD,CAAtB"}
@@ -3,14 +3,14 @@ import { IconComponent, IconPropSize } from '@consta/icons/Icon';
3
3
  import React from 'react';
4
4
  export declare const tagBasePropSize: readonly ["m", "xs", "s", "l"];
5
5
  export declare const tagBasePropSizeDefault: "m";
6
- export type TagBasePropSize = typeof tagBasePropSize[number];
6
+ export type TagBasePropSize = (typeof tagBasePropSize)[number];
7
7
  export declare const tagBasePropGroupNumberValue: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9];
8
8
  export declare const tagBasePropGroupStringValue: readonly ["1", "2", "3", "4", "5", "6", "7", "8", "9"];
9
9
  export declare const tagBasePropGroup: (1 | 4 | 2 | "1" | 3 | 5 | 9 | "2" | "3" | 7 | 6 | 8 | "4" | "5" | "6" | "7" | "8" | "9")[];
10
- export type TagBasePropGroup = typeof tagBasePropGroup[number];
10
+ export type TagBasePropGroup = (typeof tagBasePropGroup)[number];
11
11
  export declare const tagBasePropView: readonly ["stroked", "filled"];
12
12
  export declare const tagBasePropViewDefault: "stroked";
13
- export type TagBasePropView = typeof tagBasePropView[number];
13
+ export type TagBasePropView = (typeof tagBasePropView)[number];
14
14
  export type Props = {
15
15
  size?: TagBasePropSize;
16
16
  label: string;
@@ -1 +1 @@
1
- {"version":3,"file":"TagBase.js","names":["IconClose","React","cn","getByMap","forwardRefWithAs","tagBasePropSize","tagBasePropSizeDefault","tagBasePropGroupNumberValue","tagBasePropGroupStringValue","tagBasePropGroup","tagBasePropView","tagBasePropViewDefault","cnTagBase","sizeMap","xs","s","m","l","TagBase","props","ref","size","as","label","className","group","view","onCancel","Icon","icon","iconSize","withAction","cancelButtonTabIndex","disabled","href","otherProps","withCancel","IconCloseSize","IconSize","tagLinkHref","withIcon"],"sources":["../../../../../src/components/TagBase/TagBase.tsx"],"sourcesContent":["import './TagBase.css';\n\nimport { IconComponent, IconPropSize } from '@consta/icons/Icon';\nimport { IconClose } from '@consta/icons/IconClose';\nimport React from 'react';\n\nimport { cn } from '../../utils/bem';\nimport { getByMap } from '../../utils/getByMap';\nimport { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';\n\nexport const tagBasePropSize = ['m', 'xs', 's', 'l'] as const;\nexport const tagBasePropSizeDefault = tagBasePropSize[0];\nexport type TagBasePropSize = typeof tagBasePropSize[number];\n\nexport const tagBasePropGroupNumberValue = [1, 2, 3, 4, 5, 6, 7, 8, 9] as const;\nexport const tagBasePropGroupStringValue = [\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n] as const;\nexport const tagBasePropGroup = [\n ...tagBasePropGroupNumberValue,\n ...tagBasePropGroupStringValue,\n];\n\nexport type TagBasePropGroup = typeof tagBasePropGroup[number];\n\nexport const tagBasePropView = ['stroked', 'filled'] as const;\nexport const tagBasePropViewDefault = tagBasePropView[0];\nexport type TagBasePropView = typeof tagBasePropView[number];\n\nexport type Props = {\n size?: TagBasePropSize;\n label: string;\n children?: never;\n view?: TagBasePropView;\n group?: TagBasePropGroup;\n onCancel?: React.MouseEventHandler<HTMLButtonElement>;\n icon?: IconComponent;\n iconSize?: IconPropSize;\n withAction?: boolean;\n cancelButtonTabIndex?: number;\n disabled?: boolean;\n href?: string;\n};\n\nexport const cnTagBase = cn('TagBase');\n\nconst sizeMap: Record<TagBasePropSize, IconPropSize> = {\n xs: 'xs',\n s: 'xs',\n m: 's',\n l: 's',\n};\n\nexport const TagBase = forwardRefWithAs<Props>((props, ref) => {\n const {\n size = tagBasePropSizeDefault,\n as = 'div',\n label,\n className,\n group,\n view = tagBasePropViewDefault,\n onCancel,\n icon: Icon,\n iconSize,\n withAction,\n cancelButtonTabIndex,\n disabled,\n href,\n ...otherProps\n } = props;\n\n const Tag = as as string;\n const withCancel = typeof onCancel === 'function';\n const withIcon = !!Icon;\n const IconCloseSize = getByMap(sizeMap, size);\n const IconSize = getByMap(sizeMap, size, iconSize);\n const tagLinkHref = href && disabled ? undefined : href;\n\n return (\n <Tag\n {...otherProps}\n className={cnTagBase(\n {\n size,\n view,\n withCancel,\n withIcon,\n disabled,\n withAction: !disabled && withAction,\n group: disabled && group ? 'disabled' : group,\n },\n [className],\n )}\n ref={ref}\n disabled={disabled}\n href={tagLinkHref}\n >\n {withCancel || Icon ? (\n <>\n {Icon && (\n <span className={cnTagBase('IconWrapper')}>\n <Icon size={IconSize} className={cnTagBase('Icon')} />\n </span>\n )}\n <span className={cnTagBase('Label')}>{label}</span>\n {withCancel && (\n <button\n className={cnTagBase('CancelButton', { disabled })}\n type=\"button\"\n onClick={onCancel}\n tabIndex={cancelButtonTabIndex}\n disabled={disabled}\n >\n <IconClose\n className={cnTagBase('CancelIcon')}\n size={IconCloseSize}\n />\n </button>\n )}\n </>\n ) : (\n label\n )}\n </Tag>\n );\n});\n"],"mappings":"uOAAA,sBAGA,OAASA,SAAT,KAA0B,yBAA1B,CACA,MAAOC,MAAP,KAAkB,OAAlB,CAEA,OAASC,EAAT,uBACA,OAASC,QAAT,4BACA,OAASC,gBAAT,+CAEA,MAAO,IAAMC,gBA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0B,CAAZ,CAAsB,SAAS,CAAE1B,SAAS,CAAC,MAAD,CAA1C,EADF,CAFJ,CAME,4BAAM,SAAS,CAAEA,SAAS,CAAC,OAAD,CAA1B,EAAsCW,CAAtC,CANF,CAOGa,CAAU,EACT,8BACE,SAAS,CAAExB,SAAS,CAAC,cAAD,CAAiB,CAAEqB,QAAQ,CAARA,CAAF,CAAjB,CADtB,CAEE,IAAI,CAAC,QAFP,CAGE,OAAO,CAAEN,CAHX,CAIE,QAAQ,CAAEK,CAJZ,CAKE,QAAQ,CAAEC,CALZ,EAOE,oBAAC,SAAD,EACE,SAAS,CAAErB,SAAS,CAAC,YAAD,CADtB,CAEE,IAAI,CAAEyB,CAFR,EAPF,CARJ,CADD,CAwBCd,CA1CJ,CA8CH,CAxEsC,CAAhC"}
1
+ {"version":3,"file":"TagBase.js","names":["IconClose","React","cn","getByMap","forwardRefWithAs","tagBasePropSize","tagBasePropSizeDefault","tagBasePropGroupNumberValue","tagBasePropGroupStringValue","tagBasePropGroup","tagBasePropView","tagBasePropViewDefault","cnTagBase","sizeMap","xs","s","m","l","TagBase","props","ref","size","as","label","className","group","view","onCancel","Icon","icon","iconSize","withAction","cancelButtonTabIndex","disabled","href","otherProps","withCancel","IconCloseSize","IconSize","tagLinkHref","withIcon"],"sources":["../../../../../src/components/TagBase/TagBase.tsx"],"sourcesContent":["import './TagBase.css';\n\nimport { IconComponent, IconPropSize } from '@consta/icons/Icon';\nimport { IconClose } from '@consta/icons/IconClose';\nimport React from 'react';\n\nimport { cn } from '../../utils/bem';\nimport { getByMap } from '../../utils/getByMap';\nimport { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';\n\nexport const tagBasePropSize = ['m', 'xs', 's', 'l'] as const;\nexport const tagBasePropSizeDefault = tagBasePropSize[0];\nexport type TagBasePropSize = (typeof tagBasePropSize)[number];\n\nexport const tagBasePropGroupNumberValue = [1, 2, 3, 4, 5, 6, 7, 8, 9] as const;\nexport const tagBasePropGroupStringValue = [\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n] as const;\nexport const tagBasePropGroup = [\n ...tagBasePropGroupNumberValue,\n ...tagBasePropGroupStringValue,\n];\n\nexport type TagBasePropGroup = (typeof tagBasePropGroup)[number];\n\nexport const tagBasePropView = ['stroked', 'filled'] as const;\nexport const tagBasePropViewDefault = tagBasePropView[0];\nexport type TagBasePropView = (typeof tagBasePropView)[number];\n\nexport type Props = {\n size?: TagBasePropSize;\n label: string;\n children?: never;\n view?: TagBasePropView;\n group?: TagBasePropGroup;\n onCancel?: React.MouseEventHandler<HTMLButtonElement>;\n icon?: IconComponent;\n iconSize?: IconPropSize;\n withAction?: boolean;\n cancelButtonTabIndex?: number;\n disabled?: boolean;\n href?: string;\n};\n\nexport const cnTagBase = cn('TagBase');\n\nconst sizeMap: Record<TagBasePropSize, IconPropSize> = {\n xs: 'xs',\n s: 'xs',\n m: 's',\n l: 's',\n};\n\nexport const TagBase = forwardRefWithAs<Props>((props, ref) => {\n const {\n size = tagBasePropSizeDefault,\n as = 'div',\n label,\n className,\n group,\n view = tagBasePropViewDefault,\n onCancel,\n icon: Icon,\n iconSize,\n withAction,\n cancelButtonTabIndex,\n disabled,\n href,\n ...otherProps\n } = props;\n\n const Tag = as as string;\n const withCancel = typeof onCancel === 'function';\n const withIcon = !!Icon;\n const IconCloseSize = getByMap(sizeMap, size);\n const IconSize = getByMap(sizeMap, size, iconSize);\n const tagLinkHref = href && disabled ? undefined : href;\n\n return (\n <Tag\n {...otherProps}\n className={cnTagBase(\n {\n size,\n view,\n withCancel,\n withIcon,\n disabled,\n withAction: !disabled && withAction,\n group: disabled && group ? 'disabled' : group,\n },\n [className],\n )}\n ref={ref}\n disabled={disabled}\n href={tagLinkHref}\n >\n {withCancel || Icon ? (\n <>\n {Icon && (\n <span className={cnTagBase('IconWrapper')}>\n <Icon size={IconSize} className={cnTagBase('Icon')} />\n </span>\n )}\n <span className={cnTagBase('Label')}>{label}</span>\n {withCancel && (\n <button\n className={cnTagBase('CancelButton', { disabled })}\n type=\"button\"\n onClick={onCancel}\n tabIndex={cancelButtonTabIndex}\n disabled={disabled}\n >\n <IconClose\n className={cnTagBase('CancelIcon')}\n size={IconCloseSize}\n />\n </button>\n )}\n </>\n ) : (\n label\n )}\n </Tag>\n );\n});\n"],"mappings":"uOAAA,sBAGA,OAASA,SAAT,KAA0B,yBAA1B,CACA,MAAOC,MAAP,KAAkB,OAAlB,CAEA,OAASC,EAAT,uBACA,OAASC,QAAT,4BACA,OAASC,gBAAT,+CAEA,MAAO,IAAMC,gBAAe,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAAxB,CACP,MAAO,IAAMC,uBAAsB,CAAGD,eAAe,CAAC,CAAD,CAA9C,CAGP,MAAO,IAAME,4BAA2B,CAAG,CAAC,CAAD,CAAI,CAAJ,CAAO,CAAP,CAAU,CAAV,CAAa,CAAb,CAAgB,CAAhB,CAAmB,CAAnB,CAAsB,CAAtB,CAAyB,CAAzB,CAApC,CACP,MAAO,IAAMC,4BAA2B,CAAG,CACzC,GADyC,CAEzC,GAFyC,CAGzC,GAHyC,CAIzC,GAJyC,CAKzC,GALyC,CAMzC,GANyC,CAOzC,GAPyC,CAQzC,GARyC,CASzC,GATyC,CAApC,CAWP,MAAO,IAAMC,iBAAgB,WACxBF,2BADwB,CAExBC,2BAFwB,CAAtB,CAOP,MAAO,IAAME,gBAAe,CAAG,CAAC,SAAD,CAAY,QAAZ,CAAxB,CACP,MAAO,IAAMC,uBAAsB,CAAGD,eAAe,CAAC,CAAD,CAA9C,CAkBP,MAAO,IAAME,UAAS,CAAGV,EAAE,CAAC,SAAD,CAApB,CAEP,GAAMW,QAA8C,CAAG,CACrDC,EAAE,CAAE,IADiD,CAErDC,CAAC,CAAE,IAFkD,CAGrDC,CAAC,CAAE,GAHkD,CAIrDC,CAAC,CAAE,GAJkD,CAAvD,CAOA,MAAO,IAAMC,QAAO,CAAGd,gBAAgB,CA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CAAE,CAACE,CAAD,EAAaF,CAN3B,CAOEN,KAAK,CAAEQ,CAAQ,EAAIR,CAAZ,CAAoB,UAApB,CAAiCA,CAP1C,CADkB,CAUlB,CAACD,CAAD,CAVkB,CAFtB,CAcE,GAAG,CAAEJ,CAdP,CAeE,QAAQ,CAAEa,CAfZ,CAgBE,IAAI,CAAEM,CAhBR,GAkBGH,CAAU,EAAIR,CAAd,CACC,wCACGA,CAAI,EACH,4BAAM,SAAS,CAAEhB,SAAS,CAAC,aAAD,CAA1B,EACE,oBAAC,CAAD,EAAM,IAAI,CAAE0B,CAAZ,CAAsB,SAAS,CAAE1B,SAAS,CAAC,MAAD,CAA1C,EADF,CAFJ,CAME,4BAAM,SAAS,CAAEA,SAAS,CAAC,OAAD,CAA1B,EAAsCW,CAAtC,CANF,CAOGa,CAAU,EACT,8BACE,SAAS,CAAExB,SAAS,CAAC,cAAD,CAAiB,CAAEqB,QAAQ,CAARA,CAAF,CAAjB,CADtB,CAEE,IAAI,CAAC,QAFP,CAGE,OAAO,CAAEN,CAHX,CAIE,QAAQ,CAAEK,CAJZ,CAKE,QAAQ,CAAEC,CALZ,EAOE,oBAAC,SAAD,EACE,SAAS,CAAErB,SAAS,CAAC,YAAD,CADtB,CAEE,IAAI,CAAEyB,CAFR,EAPF,CARJ,CADD,CAwBCd,CA1CJ,CA8CH,CAxEsC,CAAhC"}
@@ -1,33 +1,33 @@
1
1
  import './Text.css';
2
2
  export declare const textPropAlign: readonly ["left", "center", "right"];
3
- export type TextPropAlign = typeof textPropAlign[number];
3
+ export type TextPropAlign = (typeof textPropAlign)[number];
4
4
  export declare const textPropDisplay: readonly ["block", "inlineBlock", "inline"];
5
- export type TextPropDisplay = typeof textPropDisplay[number];
5
+ export type TextPropDisplay = (typeof textPropDisplay)[number];
6
6
  export declare const textPropFont: readonly ["primary", "mono"];
7
- export type TextPropFont = typeof textPropFont[number];
7
+ export type TextPropFont = (typeof textPropFont)[number];
8
8
  export declare const textPropCursor: readonly ["pointer"];
9
- export type TextPropCursor = typeof textPropCursor[number];
9
+ export type TextPropCursor = (typeof textPropCursor)[number];
10
10
  export declare const textPropDecoration: readonly ["underline"];
11
- export type TextPropDecoration = typeof textPropDecoration[number];
11
+ export type TextPropDecoration = (typeof textPropDecoration)[number];
12
12
  export declare const textPropLineHeight: readonly ["2xs", "xs", "s", "m", "l"];
13
- export type TextPropLineHeight = typeof textPropLineHeight[number];
13
+ export type TextPropLineHeight = (typeof textPropLineHeight)[number];
14
14
  export declare const textPropLineHeightDefault: TextPropLineHeight;
15
15
  export declare const textPropSize: readonly ["m", "2xs", "xs", "s", "l", "xl", "2xl", "3xl", "4xl", "5xl", "6xl"];
16
- export type TextPropSize = typeof textPropSize[number];
16
+ export type TextPropSize = (typeof textPropSize)[number];
17
17
  export declare const textPropSizeDefault: TextPropSize;
18
18
  export declare const textPropSpacing: readonly ["xs", "s", "m", "l"];
19
- export type TextPropSpacing = typeof textPropSpacing[number];
19
+ export type TextPropSpacing = (typeof textPropSpacing)[number];
20
20
  export declare const textPropView: readonly ["primary", "secondary", "brand", "ghost", "link", "linkMinor", "system", "normal", "success", "warning", "alert", "caution", "critical"];
21
- export type TextPropView = typeof textPropView[number];
21
+ export type TextPropView = (typeof textPropView)[number];
22
22
  export declare const textPropViewDefault: TextPropView;
23
23
  export declare const textPropWeight: readonly ["thin", "extralight", "light", "regular", "medium", "semibold", "bold", "extrabold", "black"];
24
- export type TextPropWeight = typeof textPropWeight[number];
24
+ export type TextPropWeight = (typeof textPropWeight)[number];
25
25
  export declare const textPropFontStyle: readonly ["italic"];
26
- export type TextPropFontStyle = typeof textPropFontStyle[number];
26
+ export type TextPropFontStyle = (typeof textPropFontStyle)[number];
27
27
  export declare const textPropTransform: readonly ["uppercase"];
28
- export type TextPropTransform = typeof textPropTransform[number];
28
+ export type TextPropTransform = (typeof textPropTransform)[number];
29
29
  export declare const textPropWidth: readonly ["default"];
30
- export type TextPropWidth = typeof textPropWidth[number];
30
+ export type TextPropWidth = (typeof textPropWidth)[number];
31
31
  export type TextProps = {
32
32
  align?: TextPropAlign;
33
33
  cursor?: TextPropCursor;
@@ -1 +1 @@
1
- {"version":3,"file":"Text.js","names":["React","cn","forwardRefWithAs","textPropAlign","textPropDisplay","textPropFont","textPropCursor","textPropDecoration","textPropLineHeight","textPropLineHeightDefault","textPropSize","textPropSizeDefault","textPropSpacing","textPropView","textPropViewDefault","textPropWeight","textPropFontStyle","textPropTransform","textPropWidth","cnText","Text","props","ref","as","align","cursor","decoration","display","font","lineHeight","size","spacing","fontStyle","transform","view","weight","width","className","children","truncate","otherProps"],"sources":["../../../../../src/components/Text/Text.tsx"],"sourcesContent":["import './Text.css';\n\nimport React from 'react';\n\nimport { cn } from '../../utils/bem';\nimport { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';\n\nexport const textPropAlign = ['left', 'center', 'right'] as const;\nexport type TextPropAlign = typeof textPropAlign[number];\n\nexport const textPropDisplay = ['block', 'inlineBlock', 'inline'] as const;\nexport type TextPropDisplay = typeof textPropDisplay[number];\n\nexport const textPropFont = ['primary', 'mono'] as const;\nexport type TextPropFont = typeof textPropFont[number];\n\nexport const textPropCursor = ['pointer'] as const;\nexport type TextPropCursor = typeof textPropCursor[number];\n\nexport const textPropDecoration = ['underline'] as const;\nexport type TextPropDecoration = typeof textPropDecoration[number];\n\nexport const textPropLineHeight = ['2xs', 'xs', 's', 'm', 'l'] as const;\nexport type TextPropLineHeight = typeof textPropLineHeight[number];\nexport const textPropLineHeightDefault: TextPropLineHeight = 'm';\n\nexport const textPropSize = [\n 'm',\n '2xs',\n 'xs',\n 's',\n 'l',\n 'xl',\n '2xl',\n '3xl',\n '4xl',\n '5xl',\n '6xl',\n] as const;\nexport type TextPropSize = typeof textPropSize[number];\nexport const textPropSizeDefault: TextPropSize = textPropSize[0];\n\nexport const textPropSpacing = ['xs', 's', 'm', 'l'] as const;\nexport type TextPropSpacing = typeof textPropSpacing[number];\n\nexport const textPropView = [\n 'primary',\n 'secondary',\n 'brand',\n 'ghost',\n 'link',\n 'linkMinor',\n 'system',\n 'normal',\n 'success',\n 'warning',\n 'alert',\n 'caution',\n 'critical',\n] as const;\nexport type TextPropView = typeof textPropView[number];\nexport const textPropViewDefault: TextPropView = textPropView[0];\n\nexport const textPropWeight = [\n 'thin',\n 'extralight',\n 'light',\n 'regular',\n 'medium',\n 'semibold',\n 'bold',\n 'extrabold',\n 'black',\n] as const;\nexport type TextPropWeight = typeof textPropWeight[number];\n\nexport const textPropFontStyle = ['italic'] as const;\nexport type TextPropFontStyle = typeof textPropFontStyle[number];\n\nexport const textPropTransform = ['uppercase'] as const;\nexport type TextPropTransform = typeof textPropTransform[number];\n\nexport const textPropWidth = ['default'] as const;\nexport type TextPropWidth = typeof textPropWidth[number];\n\nexport type TextProps = {\n align?: TextPropAlign;\n cursor?: TextPropCursor;\n decoration?: TextPropDecoration;\n display?: TextPropDisplay;\n font?: TextPropFont;\n lineHeight?: TextPropLineHeight;\n size?: TextPropSize;\n spacing?: TextPropSpacing;\n fontStyle?: TextPropFontStyle;\n transform?: TextPropTransform;\n view?: TextPropView;\n weight?: TextPropWeight;\n width?: TextPropWidth;\n truncate?: boolean;\n};\n\nexport const cnText = cn('Text');\n\nexport const Text = forwardRefWithAs<TextProps>((props, ref) => {\n const {\n as = 'div',\n align,\n cursor,\n decoration,\n display,\n font,\n lineHeight,\n size,\n spacing,\n fontStyle,\n transform,\n view,\n weight,\n width,\n className,\n children,\n truncate,\n ...otherProps\n } = props;\n\n const Tag = as as string;\n\n return (\n <Tag\n {...otherProps}\n className={cnText(\n {\n align,\n cursor,\n decoration,\n display,\n font,\n lineHeight,\n size,\n spacing,\n fontStyle,\n transform,\n view,\n weight,\n width,\n truncate,\n },\n [className],\n )}\n ref={ref}\n >\n {children}\n </Tag>\n );\n});\n"],"mappings":"yQAAA,mBAEA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,EAAT,uBACA,OAASC,gBAAT,+CAEA,MAAO,IAAMC,cAAa,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ACE,qBAHUE,CAGV,kBACMiB,CADN,EAEE,SAAS,CAAErB,MAAM,CACf,CACEK,KAAK,CAALA,CADF,CAEEC,MAAM,CAANA,CAFF,CAGEC,UAAU,CAAVA,CAHF,CAIEC,OAAO,CAAPA,CAJF,CAKEC,IAAI,CAAJA,CALF,CAMEC,UAAU,CAAVA,CANF,CAOEC,IAAI,CAAJA,CAPF,CAQEC,OAAO,CAAPA,CARF,CASEC,SAAS,CAATA,CATF,CAUEC,SAAS,CAATA,CAVF,CAWEC,IAAI,CAAJA,CAXF,CAYEC,MAAM,CAANA,CAZF,CAaEC,KAAK,CAALA,CAbF,CAcEG,QAAQ,CAARA,CAdF,CADe,CAiBf,CAACF,CAAD,CAjBe,CAFnB,CAqBE,GAAG,CAAEf,CArBP,GAuBGgB,CAvBH,CA0BH,CAnDmC,CAA7B"}
1
+ {"version":3,"file":"Text.js","names":["React","cn","forwardRefWithAs","textPropAlign","textPropDisplay","textPropFont","textPropCursor","textPropDecoration","textPropLineHeight","textPropLineHeightDefault","textPropSize","textPropSizeDefault","textPropSpacing","textPropView","textPropViewDefault","textPropWeight","textPropFontStyle","textPropTransform","textPropWidth","cnText","Text","props","ref","as","align","cursor","decoration","display","font","lineHeight","size","spacing","fontStyle","transform","view","weight","width","className","children","truncate","otherProps"],"sources":["../../../../../src/components/Text/Text.tsx"],"sourcesContent":["import './Text.css';\n\nimport React from 'react';\n\nimport { cn } from '../../utils/bem';\nimport { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';\n\nexport const textPropAlign = ['left', 'center', 'right'] as const;\nexport type TextPropAlign = (typeof textPropAlign)[number];\n\nexport const textPropDisplay = ['block', 'inlineBlock', 'inline'] as const;\nexport type TextPropDisplay = (typeof textPropDisplay)[number];\n\nexport const textPropFont = ['primary', 'mono'] as const;\nexport type TextPropFont = (typeof textPropFont)[number];\n\nexport const textPropCursor = ['pointer'] as const;\nexport type TextPropCursor = (typeof textPropCursor)[number];\n\nexport const textPropDecoration = ['underline'] as const;\nexport type TextPropDecoration = (typeof textPropDecoration)[number];\n\nexport const textPropLineHeight = ['2xs', 'xs', 's', 'm', 'l'] as const;\nexport type TextPropLineHeight = (typeof textPropLineHeight)[number];\nexport const textPropLineHeightDefault: TextPropLineHeight = 'm';\n\nexport const textPropSize = [\n 'm',\n '2xs',\n 'xs',\n 's',\n 'l',\n 'xl',\n '2xl',\n '3xl',\n '4xl',\n '5xl',\n '6xl',\n] as const;\nexport type TextPropSize = (typeof textPropSize)[number];\nexport const textPropSizeDefault: TextPropSize = textPropSize[0];\n\nexport const textPropSpacing = ['xs', 's', 'm', 'l'] as const;\nexport type TextPropSpacing = (typeof textPropSpacing)[number];\n\nexport const textPropView = [\n 'primary',\n 'secondary',\n 'brand',\n 'ghost',\n 'link',\n 'linkMinor',\n 'system',\n 'normal',\n 'success',\n 'warning',\n 'alert',\n 'caution',\n 'critical',\n] as const;\nexport type TextPropView = (typeof textPropView)[number];\nexport const textPropViewDefault: TextPropView = textPropView[0];\n\nexport const textPropWeight = [\n 'thin',\n 'extralight',\n 'light',\n 'regular',\n 'medium',\n 'semibold',\n 'bold',\n 'extrabold',\n 'black',\n] as const;\nexport type TextPropWeight = (typeof textPropWeight)[number];\n\nexport const textPropFontStyle = ['italic'] as const;\nexport type TextPropFontStyle = (typeof textPropFontStyle)[number];\n\nexport const textPropTransform = ['uppercase'] as const;\nexport type TextPropTransform = (typeof textPropTransform)[number];\n\nexport const textPropWidth = ['default'] as const;\nexport type TextPropWidth = (typeof textPropWidth)[number];\n\nexport type TextProps = {\n align?: TextPropAlign;\n cursor?: TextPropCursor;\n decoration?: TextPropDecoration;\n display?: TextPropDisplay;\n font?: TextPropFont;\n lineHeight?: TextPropLineHeight;\n size?: TextPropSize;\n spacing?: TextPropSpacing;\n fontStyle?: TextPropFontStyle;\n transform?: TextPropTransform;\n view?: TextPropView;\n weight?: TextPropWeight;\n width?: TextPropWidth;\n truncate?: boolean;\n};\n\nexport const cnText = cn('Text');\n\nexport const Text = forwardRefWithAs<TextProps>((props, ref) => {\n const {\n as = 'div',\n align,\n cursor,\n decoration,\n display,\n font,\n lineHeight,\n size,\n spacing,\n fontStyle,\n transform,\n view,\n weight,\n width,\n className,\n children,\n truncate,\n ...otherProps\n } = props;\n\n const Tag = as as string;\n\n return (\n <Tag\n {...otherProps}\n className={cnText(\n {\n align,\n cursor,\n decoration,\n display,\n font,\n lineHeight,\n size,\n spacing,\n fontStyle,\n transform,\n view,\n weight,\n width,\n truncate,\n },\n [className],\n )}\n ref={ref}\n >\n {children}\n </Tag>\n );\n});\n"],"mappings":"yQAAA,mBAEA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,EAAT,uBACA,OAASC,gBAAT,+CAEA,MAAO,IAAMC,cAAa,CAAG,CAAC,MAAD,CAAS,QAAT,CAAmB,OAAnB,CAAtB,CAGP,MAAO,IAAMC,gBAAe,CAAG,CAAC,OAAD,CAAU,aAAV,CAAyB,QAAzB,CAAxB,CAGP,MAAO,IAAMC,aAAY,CAAG,CAAC,SAAD,CAAY,MAAZ,CAArB,CAGP,MAAO,IAAMC,eAAc,CAAG,CAAC,SAAD,CAAvB,CAGP,MAAO,IAAMC,mBAAkB,CAAG,CAAC,WAAD,CAA3B,CAGP,MAAO,IAAMC,mBAAkB,CAAG,CAAC,KAAD,CAAQ,IAAR,CAAc,GAAd,CAAmB,GAAnB,CAAwB,GAAxB,CAA3B,CAEP,MAAO,IAAMC,0BAA6C,CAAG,GAAtD,CAEP,MAAO,IAAMC,aAAY,CAAG,CAC1B,GAD0B,CAE1B,KAF0B,CAG1B,IAH0B,CAI1B,GAJ0B,CAK1B,GAL0B,CAM1B,IAN0B,CAO1B,KAP0B,CAQ1B,KAR0B,CAS1B,KAT0B,CAU1B,KAV0B,CAW1B,KAX0B,CAArB,CAcP,MAAO,IAAMC,oBAAiC,CAAGD,YAAY,CAAC,CAAD,CAAtD,CAEP,MAAO,IAAME,gBAAe,CAAG,CAAC,IAAD,CAAO,GAAP,CAAY,GAA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OAV4D,CAW5DC,CAX4D,CAoB1DX,CApB0D,CAW5DW,SAX4D,CAY5DC,CAZ4D,CAoB1DZ,CApB0D,CAY5DY,SAZ4D,CAa5DC,CAb4D,CAoB1Db,CApB0D,CAa5Da,IAb4D,CAc5DC,CAd4D,CAoB1Dd,CApB0D,CAc5Dc,MAd4D,CAe5DC,CAf4D,CAoB1Df,CApB0D,CAe5De,KAf4D,CAgB5DC,CAhB4D,CAoB1DhB,CApB0D,CAgB5DgB,SAhB4D,CAiB5DC,CAjB4D,CAoB1DjB,CApB0D,CAiB5DiB,QAjB4D,CAkB5DC,CAlB4D,CAoB1DlB,CApB0D,CAkB5DkB,QAlB4D,CAmBzDC,CAnByD,0BAoB1DnB,CApB0D,YAwB9D,MACE,qBAHUE,CAGV,kBACMiB,CADN,EAEE,SAAS,CAAErB,MAAM,CACf,CACEK,KAAK,CAALA,CADF,CAEEC,MAAM,CAANA,CAFF,CAGEC,UAAU,CAAVA,CAHF,CAIEC,OAAO,CAAPA,CAJF,CAKEC,IAAI,CAAJA,CALF,CAMEC,UAAU,CAAVA,CANF,CAOEC,IAAI,CAAJA,CAPF,CAQEC,OAAO,CAAPA,CARF,CASEC,SAAS,CAATA,CATF,CAUEC,SAAS,CAATA,CAVF,CAWEC,IAAI,CAAJA,CAXF,CAYEC,MAAM,CAANA,CAZF,CAaEC,KAAK,CAALA,CAbF,CAcEG,QAAQ,CAARA,CAdF,CADe,CAiBf,CAACF,CAAD,CAjBe,CAFnB,CAqBE,GAAG,CAAEf,CArBP,GAuBGgB,CAvBH,CA0BH,CAnDmC,CAA7B"}
@@ -1 +1 @@
1
- .TextAreaAutoSize{line-height:1.5;resize:none}.TextAreaAutoSize-Fake{word-wrap:break-word;height:0;left:-9999px;position:absolute;top:-9999px;visibility:hidden;white-space:pre-wrap}
1
+ .TextAreaAutoSize{line-height:1.5;resize:none}.TextAreaAutoSize-Fake{height:0;left:-9999px;overflow-wrap:break-word;position:absolute;top:-9999px;visibility:hidden;white-space:pre-wrap}
@@ -1,33 +1,33 @@
1
1
  import './Text.css';
2
2
  export declare const textPropAlign: readonly ["left", "center", "right"];
3
- export type TextPropAlign = typeof textPropAlign[number];
3
+ export type TextPropAlign = (typeof textPropAlign)[number];
4
4
  export declare const textPropDisplay: readonly ["block", "inlineBlock", "inline"];
5
- export type TextPropDisplay = typeof textPropDisplay[number];
5
+ export type TextPropDisplay = (typeof textPropDisplay)[number];
6
6
  export declare const textPropFont: readonly ["primary", "mono"];
7
- export type TextPropFont = typeof textPropFont[number];
7
+ export type TextPropFont = (typeof textPropFont)[number];
8
8
  export declare const textPropCursor: readonly ["pointer"];
9
- export type TextPropCursor = typeof textPropCursor[number];
9
+ export type TextPropCursor = (typeof textPropCursor)[number];
10
10
  export declare const textPropDecoration: readonly ["underline"];
11
- export type TextPropDecoration = typeof textPropDecoration[number];
11
+ export type TextPropDecoration = (typeof textPropDecoration)[number];
12
12
  export declare const textPropLineHeight: readonly ["2xs", "xs", "s", "m", "l"];
13
- export type TextPropLineHeight = typeof textPropLineHeight[number];
13
+ export type TextPropLineHeight = (typeof textPropLineHeight)[number];
14
14
  export declare const textPropLineHeightDefault: TextPropLineHeight;
15
15
  export declare const textPropSize: readonly ["m", "2xs", "xs", "s", "l", "xl", "2xl", "3xl", "4xl", "5xl", "6xl"];
16
- export type TextPropSize = typeof textPropSize[number];
16
+ export type TextPropSize = (typeof textPropSize)[number];
17
17
  export declare const textPropSizeDefault: TextPropSize;
18
18
  export declare const textPropSpacing: readonly ["xs", "s", "m", "l"];
19
- export type TextPropSpacing = typeof textPropSpacing[number];
19
+ export type TextPropSpacing = (typeof textPropSpacing)[number];
20
20
  export declare const textPropView: readonly ["primary", "secondary", "brand", "ghost", "link", "linkMinor", "system", "normal", "success", "warning", "alert", "caution", "critical"];
21
- export type TextPropView = typeof textPropView[number];
21
+ export type TextPropView = (typeof textPropView)[number];
22
22
  export declare const textPropViewDefault: TextPropView;
23
23
  export declare const textPropWeight: readonly ["thin", "light", "regular", "medium", "semibold", "bold", "black"];
24
- export type TextPropWeight = typeof textPropWeight[number];
24
+ export type TextPropWeight = (typeof textPropWeight)[number];
25
25
  export declare const textPropFontStyle: readonly ["italic"];
26
- export type TextPropFontStyle = typeof textPropFontStyle[number];
26
+ export type TextPropFontStyle = (typeof textPropFontStyle)[number];
27
27
  export declare const textPropTransform: readonly ["uppercase"];
28
- export type TextPropTransform = typeof textPropTransform[number];
28
+ export type TextPropTransform = (typeof textPropTransform)[number];
29
29
  export declare const textPropWidth: readonly ["default"];
30
- export type TextPropWidth = typeof textPropWidth[number];
30
+ export type TextPropWidth = (typeof textPropWidth)[number];
31
31
  export type TextProps = {
32
32
  align?: TextPropAlign;
33
33
  cursor?: TextPropCursor;
@@ -1 +1 @@
1
- {"version":3,"file":"TextDeprecated.js","names":["React","cnDeprecated","forwardRefWithAs","textPropAlign","textPropDisplay","textPropFont","textPropCursor","textPropDecoration","textPropLineHeight","textPropLineHeightDefault","textPropSize","textPropSizeDefault","textPropSpacing","textPropView","textPropViewDefault","textPropWeight","textPropFontStyle","textPropTransform","textPropWidth","cnText","Text","props","ref","as","align","cursor","decoration","display","font","lineHeight","size","spacing","fontStyle","transform","view","weight","width","className","children","truncate","otherProps"],"sources":["../../../../../src/components/TextDeprecated/TextDeprecated.tsx"],"sourcesContent":["import './Text.css';\n\nimport React from 'react';\n\nimport { cnDeprecated } from '../../utils/bem';\nimport { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';\n\nexport const textPropAlign = ['left', 'center', 'right'] as const;\nexport type TextPropAlign = typeof textPropAlign[number];\n\nexport const textPropDisplay = ['block', 'inlineBlock', 'inline'] as const;\nexport type TextPropDisplay = typeof textPropDisplay[number];\n\nexport const textPropFont = ['primary', 'mono'] as const;\nexport type TextPropFont = typeof textPropFont[number];\n\nexport const textPropCursor = ['pointer'] as const;\nexport type TextPropCursor = typeof textPropCursor[number];\n\nexport const textPropDecoration = ['underline'] as const;\nexport type TextPropDecoration = typeof textPropDecoration[number];\n\nexport const textPropLineHeight = ['2xs', 'xs', 's', 'm', 'l'] as const;\nexport type TextPropLineHeight = typeof textPropLineHeight[number];\nexport const textPropLineHeightDefault: TextPropLineHeight = 'm';\n\nexport const textPropSize = [\n 'm',\n '2xs',\n 'xs',\n 's',\n 'l',\n 'xl',\n '2xl',\n '3xl',\n '4xl',\n '5xl',\n '6xl',\n] as const;\nexport type TextPropSize = typeof textPropSize[number];\nexport const textPropSizeDefault: TextPropSize = textPropSize[0];\n\nexport const textPropSpacing = ['xs', 's', 'm', 'l'] as const;\nexport type TextPropSpacing = typeof textPropSpacing[number];\n\nexport const textPropView = [\n 'primary',\n 'secondary',\n 'brand',\n 'ghost',\n 'link',\n 'linkMinor',\n 'system',\n 'normal',\n 'success',\n 'warning',\n 'alert',\n 'caution',\n 'critical',\n] as const;\nexport type TextPropView = typeof textPropView[number];\nexport const textPropViewDefault: TextPropView = textPropView[0];\n\nexport const textPropWeight = [\n 'thin',\n 'light',\n 'regular',\n 'medium',\n 'semibold',\n 'bold',\n 'black',\n] as const;\nexport type TextPropWeight = typeof textPropWeight[number];\n\nexport const textPropFontStyle = ['italic'] as const;\nexport type TextPropFontStyle = typeof textPropFontStyle[number];\n\nexport const textPropTransform = ['uppercase'] as const;\nexport type TextPropTransform = typeof textPropTransform[number];\n\nexport const textPropWidth = ['default'] as const;\nexport type TextPropWidth = typeof textPropWidth[number];\n\nexport type TextProps = {\n align?: TextPropAlign;\n cursor?: TextPropCursor;\n decoration?: TextPropDecoration;\n display?: TextPropDisplay;\n font?: TextPropFont;\n lineHeight?: TextPropLineHeight;\n size?: TextPropSize;\n spacing?: TextPropSpacing;\n fontStyle?: TextPropFontStyle;\n transform?: TextPropTransform;\n view?: TextPropView;\n weight?: TextPropWeight;\n width?: TextPropWidth;\n truncate?: boolean;\n};\n\nexport const cnText = cnDeprecated('Text');\n\nexport const Text = forwardRefWithAs<TextProps>((props, ref) => {\n const {\n as = 'div',\n align,\n cursor,\n decoration,\n display,\n font,\n lineHeight = textPropLineHeightDefault,\n size = textPropSizeDefault,\n spacing,\n fontStyle,\n transform,\n view = textPropViewDefault,\n weight,\n width,\n className,\n children,\n truncate = false,\n ...otherProps\n } = props;\n\n const Tag = as as string;\n\n return (\n <Tag\n {...otherProps}\n className={cnText(\n {\n align,\n cursor,\n decoration,\n display,\n font,\n lineHeight,\n size,\n spacing,\n fontStyle,\n transform,\n view,\n weight,\n width,\n truncate,\n },\n [className],\n )}\n ref={ref}\n >\n {children}\n </Tag>\n );\n});\n"],"mappings":"yQAAA,mBAEA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,YAAT,uBACA,OAASC,gBAAT,+CAEA,MAAO,IAAMC,cAAa,CAAG,CAAC,MAAD,CAAS,QAAT,CAAmB,OAAnB,CAAtB,CAGP,MAAO,IAAMC,gBAAe,CAAG,CAAC,OAAD,CAAU,aAAV,CAAyB,QAAzB,CAAxB,CAGP,MAAO,IAAMC,aAAY,CAAG,CAAC,SAAD,CAAY,MAAZ,CAArB,CAGP,MAAO,IAAMC,eAAc,CAAG,CAAC,SAAD,CAAvB,CAGP,MAAO,IAAMC,mBAAkB,CAAG,CAAC,WAAD,CAA3B,CAGP,MAAO,IAAMC,mBAAkB,CAAG,CAAC,KAAD,CAAQ,IAAR,CAAc,GAAd,CAAmB,GAAnB,CAAwB,GAAxB,CAA3B,CAEP,MAAO,IAAMC,0BAA6C,CAAG,GAAtD,CAEP,MAAO,IAAMC,aAAY,CAAG,CAC1B,GAD0B,CAE1B,KAF0B,CAG1B,IAH0B,CAI1B,GAJ0B,CAK1B,GAL0B,CAM1B,IAN0B,CAO1B,KAP0B,CAQ1B,KAR0B,CAS1B,KAT0B,CAU1B,KAV0B,CAW1B,KAX0B,CAArB,CAcP,MAAO,IAAMC,oBAAiC,CAAGD,YAAY,CAAC,CAAD,CAAtD,CAEP,MAAO,IAAME,gBAAe,CAAG,CAAC,IAAD,CAAO,GAAP,CAAY,GAAZ,CAAiB,GAAjB,CAAxB,CAGP,MA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1DX,CApB0D,CAW5DW,SAX4D,CAY5DC,CAZ4D,CAoB1DZ,CApB0D,CAY5DY,SAZ4D,GAoB1DZ,CApB0D,CAa5Da,IAb4D,CAa5DA,CAb4D,YAarDpB,mBAbqD,GAc5DqB,CAd4D,CAoB1Dd,CApB0D,CAc5Dc,MAd4D,CAe5DC,CAf4D,CAoB1Df,CApB0D,CAe5De,KAf4D,CAgB5DC,CAhB4D,CAoB1DhB,CApB0D,CAgB5DgB,SAhB4D,CAiB5DC,CAjB4D,CAoB1DjB,CApB0D,CAiB5DiB,QAjB4D,GAoB1DjB,CApB0D,CAkB5DkB,QAlB4D,CAmBzDC,CAnByD,0BAoB1DnB,CApB0D,YAwB9D,MACE,qBAHUE,CAGV,kBACMiB,CADN,EAEE,SAAS,CAAErB,MAAM,CACf,CACEK,KAAK,CAALA,CADF,CAEEC,MAAM,CAANA,CAFF,CAGEC,UAAU,CAAVA,CAHF,CAIEC,OAAO,CAAPA,CAJF,CAKEC,IAAI,CAAJA,CALF,CAMEC,UAAU,CAAVA,CANF,CAOEC,IAAI,CAAJA,CAPF,CAQEC,OAAO,CAAPA,CARF,CASEC,SAAS,CAATA,CATF,CAUEC,SAAS,CAATA,CAVF,CAWEC,IAAI,CAAJA,CAXF,CAYEC,MAAM,CAANA,CAZF,CAaEC,KAAK,CAALA,CAbF,CAcEG,QAAQ,cAdV,CADe,CAiBf,CAACF,CAAD,CAjBe,CAFnB,CAqBE,GAAG,CAAEf,CArBP,GAuBGgB,CAvBH,CA0BH,CAnDmC,CAA7B"}
1
+ {"version":3,"file":"TextDeprecated.js","names":["React","cnDeprecated","forwardRefWithAs","textPropAlign","textPropDisplay","textPropFont","textPropCursor","textPropDecoration","textPropLineHeight","textPropLineHeightDefault","textPropSize","textPropSizeDefault","textPropSpacing","textPropView","textPropViewDefault","textPropWeight","textPropFontStyle","textPropTransform","textPropWidth","cnText","Text","props","ref","as","align","cursor","decoration","display","font","lineHeight","size","spacing","fontStyle","transform","view","weight","width","className","children","truncate","otherProps"],"sources":["../../../../../src/components/TextDeprecated/TextDeprecated.tsx"],"sourcesContent":["import './Text.css';\n\nimport React from 'react';\n\nimport { cnDeprecated } from '../../utils/bem';\nimport { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';\n\nexport const textPropAlign = ['left', 'center', 'right'] as const;\nexport type TextPropAlign = (typeof textPropAlign)[number];\n\nexport const textPropDisplay = ['block', 'inlineBlock', 'inline'] as const;\nexport type TextPropDisplay = (typeof textPropDisplay)[number];\n\nexport const textPropFont = ['primary', 'mono'] as const;\nexport type TextPropFont = (typeof textPropFont)[number];\n\nexport const textPropCursor = ['pointer'] as const;\nexport type TextPropCursor = (typeof textPropCursor)[number];\n\nexport const textPropDecoration = ['underline'] as const;\nexport type TextPropDecoration = (typeof textPropDecoration)[number];\n\nexport const textPropLineHeight = ['2xs', 'xs', 's', 'm', 'l'] as const;\nexport type TextPropLineHeight = (typeof textPropLineHeight)[number];\nexport const textPropLineHeightDefault: TextPropLineHeight = 'm';\n\nexport const textPropSize = [\n 'm',\n '2xs',\n 'xs',\n 's',\n 'l',\n 'xl',\n '2xl',\n '3xl',\n '4xl',\n '5xl',\n '6xl',\n] as const;\nexport type TextPropSize = (typeof textPropSize)[number];\nexport const textPropSizeDefault: TextPropSize = textPropSize[0];\n\nexport const textPropSpacing = ['xs', 's', 'm', 'l'] as const;\nexport type TextPropSpacing = (typeof textPropSpacing)[number];\n\nexport const textPropView = [\n 'primary',\n 'secondary',\n 'brand',\n 'ghost',\n 'link',\n 'linkMinor',\n 'system',\n 'normal',\n 'success',\n 'warning',\n 'alert',\n 'caution',\n 'critical',\n] as const;\nexport type TextPropView = (typeof textPropView)[number];\nexport const textPropViewDefault: TextPropView = textPropView[0];\n\nexport const textPropWeight = [\n 'thin',\n 'light',\n 'regular',\n 'medium',\n 'semibold',\n 'bold',\n 'black',\n] as const;\nexport type TextPropWeight = (typeof textPropWeight)[number];\n\nexport const textPropFontStyle = ['italic'] as const;\nexport type TextPropFontStyle = (typeof textPropFontStyle)[number];\n\nexport const textPropTransform = ['uppercase'] as const;\nexport type TextPropTransform = (typeof textPropTransform)[number];\n\nexport const textPropWidth = ['default'] as const;\nexport type TextPropWidth = (typeof textPropWidth)[number];\n\nexport type TextProps = {\n align?: TextPropAlign;\n cursor?: TextPropCursor;\n decoration?: TextPropDecoration;\n display?: TextPropDisplay;\n font?: TextPropFont;\n lineHeight?: TextPropLineHeight;\n size?: TextPropSize;\n spacing?: TextPropSpacing;\n fontStyle?: TextPropFontStyle;\n transform?: TextPropTransform;\n view?: TextPropView;\n weight?: TextPropWeight;\n width?: TextPropWidth;\n truncate?: boolean;\n};\n\nexport const cnText = cnDeprecated('Text');\n\nexport const Text = forwardRefWithAs<TextProps>((props, ref) => {\n const {\n as = 'div',\n align,\n cursor,\n decoration,\n display,\n font,\n lineHeight = textPropLineHeightDefault,\n size = textPropSizeDefault,\n spacing,\n fontStyle,\n transform,\n view = textPropViewDefault,\n weight,\n width,\n className,\n children,\n truncate = false,\n ...otherProps\n } = props;\n\n const Tag = as as string;\n\n return (\n <Tag\n {...otherProps}\n className={cnText(\n {\n align,\n cursor,\n decoration,\n display,\n font,\n lineHeight,\n size,\n spacing,\n fontStyle,\n transform,\n view,\n weight,\n width,\n truncate,\n },\n [className],\n )}\n ref={ref}\n >\n {children}\n </Tag>\n );\n});\n"],"mappings":"yQAAA,mBAEA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,YAAT,uBACA,OAASC,gBAAT,+CAEA,MAAO,IAAMC,cAAa,CAAG,CAAC,MAAD,CAAS,QAAT,CAAmB,OAAnB,CAAtB,CAGP,MAAO,IAAMC,gBAAe,CAAG,CAAC,OAAD,CAAU,aAAV,CAAyB,QAAzB,CAAxB,CAGP,MAAO,IAAMC,aAAY,CAAG,CAAC,SAAD,CAAY,MAAZ,CAArB,CAGP,MAAO,IAAMC,eAAc,CAAG,CAAC,SAAD,CAAvB,CAGP,MAAO,IAAMC,mBAAkB,CAAG,CAA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AS,CAATA,CATF,CAUEC,SAAS,CAATA,CAVF,CAWEC,IAAI,CAAJA,CAXF,CAYEC,MAAM,CAANA,CAZF,CAaEC,KAAK,CAALA,CAbF,CAcEG,QAAQ,cAdV,CADe,CAiBf,CAACF,CAAD,CAjBe,CAFnB,CAqBE,GAAG,CAAEf,CArBP,GAuBGgB,CAvBH,CA0BH,CAnDmC,CAA7B"}
@@ -6,7 +6,7 @@ export type TextFieldPropValue = string | null;
6
6
  export type TextFieldPropName = string;
7
7
  export type TextFieldPropId = string | number;
8
8
  export declare const textFieldPropSize: readonly ["m", "xs", "s", "l"];
9
- export type TextFieldPropSize = typeof textFieldPropSize[number];
9
+ export type TextFieldPropSize = (typeof textFieldPropSize)[number];
10
10
  export declare const textFieldPropSizeDefault: TextFieldPropSize;
11
11
  export type TextFieldPropOnChange = (value: TextFieldPropValue, params: TextFieldOnChangeArguments) => void;
12
12
  export type TextFieldOnChangeArguments = {
@@ -15,13 +15,13 @@ export type TextFieldOnChangeArguments = {
15
15
  name?: TextFieldPropName;
16
16
  };
17
17
  export declare const textFieldPropView: readonly ["default", "clear"];
18
- export type TextFieldPropView = typeof textFieldPropView[number];
18
+ export type TextFieldPropView = (typeof textFieldPropView)[number];
19
19
  export declare const textFieldPropViewDefault: TextFieldPropView;
20
20
  export declare const textFieldPropForm: readonly ["default", "defaultClear", "defaultBrick", "brick", "brickDefault", "brickClear", "brickRound", "round", "roundClear", "roundBrick", "clearRound", "clearDefault", "clearBrick", "clearClear"];
21
- export type TextFieldPropForm = typeof textFieldPropForm[number];
21
+ export type TextFieldPropForm = (typeof textFieldPropForm)[number];
22
22
  export declare const textFieldPropFormDefault: TextFieldPropForm;
23
23
  export declare const textFieldPropStatus: readonly ["alert", "success", "warning"];
24
- export type TextFieldPropStatus = typeof textFieldPropStatus[number];
24
+ export type TextFieldPropStatus = (typeof textFieldPropStatus)[number];
25
25
  export type TextFieldPropsTextareaType<TYPE> = TYPE extends 'textarea' ? {
26
26
  minRows?: never;
27
27
  maxRows?: never;
@@ -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 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 onClear?: React.MouseEventHandler<HTMLButtonElement>;\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.ReactNode | 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 onClear?: React.MouseEventHandler<HTMLButtonElement>;\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.ReactNode | 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,2 +1,2 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["className","value","defaultValue","onChange","id","name","inputRef","maxLength","minLength","disabled","size","view","form","status","onBlur","onFocus","autoFocus","placeholder","leftSide","rightSide","autoComplete","clearButton","readOnly","type","tabIndex","ariaLabel","iconSize","onClick","incrementButtons","max","min","step","onKeyDown","onKeyDownCapture","onKeyUp","onKeyUpCapture","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onClear","onWheel","iconClear"];import React,{forwardRef,useCallback,useMemo}from"react";import{FieldClearButton,FieldControlLayout,FieldCounter,FieldInput,renderSide}from"../../FieldComponents";import{useForkRef}from"../../../hooks/useForkRef";import{useKeys}from"../../../hooks/useKeys";import{useMutableRef}from"../../../hooks/useMutableRef/useMutableRef";import{useSortSteps}from"../../../hooks/useSortSteps";import{useTextField}from"../useTextField";import{cnTextFieldTypeNumber}from"./cnTextFieldTypeNumber";import{getValueByStep,stepIsActive}from"./helpers";export var TextFieldTypeNumber=forwardRef(function(a,b){var c=a.className,d=a.value,e=a.defaultValue,f=a.onChange,g=a.id,h=a.name,i=a.inputRef,j=a.maxLength,k=a.minLength,l=a.disabled,m=a.size,n=void 0===m?"m":m,o=a.view,p=void 0===o?"default":o,q=a.form,r=a.status,s=a.onBlur,t=a.onFocus,u=a.autoFocus,v=a.placeholder,w=a.leftSide,x=a.rightSide,y=a.autoComplete,z=a.clearButton,A=a.readOnly,B=a.type,C=a.tabIndex,D=a.ariaLabel,E=a.iconSize,F=a.onClick,G=a.incrementButtons,H=a.max,I=a.min,J=a.step,K=a.onKeyDown,L=a.onKeyDownCapture,M=a.onKeyUp,N=a.onKeyUpCapture,O=a.onCopy,P=a.onCopyCapture,Q=a.onCut,R=a.onCutCapture,S=a.onPaste,T=a.onPasteCapture,U=a.onClear,V=a.onWheel,W=a.iconClear,X=_objectWithoutProperties(a,_excluded),Y=useTextField({onClick:F,onChange:f,onBlur:s,onFocus:t,disabled:l,onClear:U}),Z=Y.handleBlur,$=Y.handleChange,_=Y.handleClear,aa=Y.handleFocus,ba=Y.focused,ca=Y.withValue,da=Y.ref,ea=Y.inputRef,fa=Y.handleClick,ga=Y.mutableRefs,ha=Y.setWithValue,ia=useSortSteps({step:J,min:I,max:H}),ja=useMutableRef([ia,I,H,K,stepIsActive(ia,l),V]),ka=useCallback(function(a,b){var c,d;if(ea.current&&!ga.current[4]){var e=getValueByStep(ja.current[0],ea.current.value,b,ja.current[1],ja.current[2]);null===(c=(d=ga.current)[0])||void 0===c?void 0:c.call(d,e,{e:a}),ea.current.value=e,ha.on()}},[]),la=useCallback(function(a){return ka(a,!0)},[]),ma=useCallback(function(a){return ka(a,!1)},[]),na=useKeys(useMemo(function(){return{isActive:!0,keys:{ArrowUp:function ArrowUp(a){a.preventDefault(),ja.current[4]&&ka(a,!0)},ArrowDown:function ArrowDown(a){a.preventDefault(),ja.current[4]&&ka(a,!1)}},onEvent:ja.current[3]}},[])),oa=useCallback(function(a){if(ja.current[5])ja.current[5](a);else{var b;null===(b=ea.current)||void 0===b?void 0:b.blur()}},[]);return React.createElement(FieldControlLayout,Object.assign({},X,{className:cnTextFieldTypeNumber({incrementButtons:G},[c]),form:q,status:r,size:n,leftSide:renderSide(w,n,E),rightSide:[z&&!l&&ca&&!G&&React.createElement(FieldClearButton,{size:n,onClick:_,icon:W}),G&&ja.current[4]&&React.createElement(FieldCounter,{onIncrementClick:la,onIncrementFocus:aa,onDecrementClick:ma,onDecrementFocus:aa})],focused:ba,view:p,ref:useForkRef([b,da]),disabled:l,onClick:fa}),React.createElement(FieldInput,{className:cnTextFieldTypeNumber("Input"),placeholder:v,autoFocus:u,autoComplete:y,onBlur:Z,onChange:$,onFocus:aa,defaultValue:e||void 0,value:null===d?"":d,ref:useForkRef([i,ea]),readOnly:A,tabIndex:C,"aria-label":D,onKeyDown:na,onKeyDownCapture:L,onKeyUp:M,onKeyUpCapture:N,onWheel:oa,maxLength:j,minLength:k,disabled:l,type:B,max:H,min:I,id:g,name:h,onCopy:O,onCopyCapture:P,onCut:Q,onCutCapture:R,onPaste:S,onPasteCapture:T}))});
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["className","value","defaultValue","onChange","id","name","inputRef","maxLength","minLength","disabled","size","view","form","status","onBlur","onFocus","autoFocus","placeholder","leftSide","rightSide","autoComplete","clearButton","readOnly","type","tabIndex","ariaLabel","iconSize","onClick","incrementButtons","max","min","step","onKeyDown","onKeyDownCapture","onKeyUp","onKeyUpCapture","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onClear","onWheel","iconClear"];import React,{forwardRef,useCallback,useMemo}from"react";import{FieldClearButton,FieldControlLayout,FieldCounter,FieldInput,renderSide}from"../../FieldComponents";import{useForkRef}from"../../../hooks/useForkRef";import{useKeys}from"../../../hooks/useKeys";import{useMutableRef}from"../../../hooks/useMutableRef/useMutableRef";import{useSortSteps}from"../../../hooks/useSortSteps";import{useTextField}from"../useTextField";import{cnTextFieldTypeNumber}from"./cnTextFieldTypeNumber";import{getValueByStep,stepIsActive}from"./helpers";export var TextFieldTypeNumber=forwardRef(function(a,b){var c=a.className,d=a.value,e=a.defaultValue,f=a.onChange,g=a.id,h=a.name,i=a.inputRef,j=a.maxLength,k=a.minLength,l=a.disabled,m=a.size,n=void 0===m?"m":m,o=a.view,p=void 0===o?"default":o,q=a.form,r=a.status,s=a.onBlur,t=a.onFocus,u=a.autoFocus,v=a.placeholder,w=a.leftSide,x=a.rightSide,y=a.autoComplete,z=a.clearButton,A=a.readOnly,B=a.type,C=a.tabIndex,D=a.ariaLabel,E=a.iconSize,F=a.onClick,G=a.incrementButtons,H=a.max,I=a.min,J=a.step,K=a.onKeyDown,L=a.onKeyDownCapture,M=a.onKeyUp,N=a.onKeyUpCapture,O=a.onCopy,P=a.onCopyCapture,Q=a.onCut,R=a.onCutCapture,S=a.onPaste,T=a.onPasteCapture,U=a.onClear,V=a.onWheel,W=a.iconClear,X=_objectWithoutProperties(a,_excluded),Y=useTextField({onClick:F,onChange:f,onBlur:s,onFocus:t,disabled:l,onClear:U}),Z=Y.handleBlur,$=Y.handleChange,_=Y.handleClear,aa=Y.handleFocus,ba=Y.focused,ca=Y.withValue,da=Y.ref,ea=Y.inputRef,fa=Y.handleClick,ga=Y.mutableRefs,ha=Y.setWithValue,ia=useSortSteps({step:J,min:I,max:H}),ja=useMutableRef([ia,I,H,K,stepIsActive(ia,l),V]),ka=useCallback(function(a,b){var c,d;if(ea.current&&!ga.current[4]){var e=getValueByStep(ja.current[0],ea.current.value,b,ja.current[1],ja.current[2]);null===(c=(d=ga.current)[0])||void 0===c?void 0:c.call(d,e,{e:a}),ea.current.value=e,ha.on()}},[]),la=useCallback(function(a){return ka(a,!0)},[]),ma=useCallback(function(a){return ka(a,!1)},[]),na=useKeys(useMemo(function(){return{isActive:!0,keys:{ArrowUp:function ArrowUp(a){a.preventDefault(),ja.current[4]&&ka(a,!0)},ArrowDown:function ArrowDown(a){a.preventDefault(),ja.current[4]&&ka(a,!1)}},onEvent:ja.current[3]}},[])),oa=useCallback(function(a){if(ja.current[5])ja.current[5](a);else{var b;null===(b=ea.current)||void 0===b?void 0:b.blur()}},[]);return React.createElement(FieldControlLayout,Object.assign({},X,{className:cnTextFieldTypeNumber({incrementButtons:G},[c]),form:q,status:r,size:n,leftSide:renderSide(w,n,E),rightSide:[z&&!l&&ca&&!G&&React.createElement(FieldClearButton,{size:n,onClick:_,icon:W}),renderSide(x,n,E),G&&ja.current[4]&&React.createElement(FieldCounter,{onIncrementClick:la,onIncrementFocus:aa,onDecrementClick:ma,onDecrementFocus:aa})],focused:ba,view:p,ref:useForkRef([b,da]),disabled:l,onClick:fa}),React.createElement(FieldInput,{className:cnTextFieldTypeNumber("Input"),placeholder:v,autoFocus:u,autoComplete:y,onBlur:Z,onChange:$,onFocus:aa,defaultValue:e||void 0,value:null===d?"":d,ref:useForkRef([i,ea]),readOnly:A,tabIndex:C,"aria-label":D,onKeyDown:na,onKeyDownCapture:L,onKeyUp:M,onKeyUpCapture:N,onWheel:oa,maxLength:j,minLength:k,disabled:l,type:B,max:H,min:I,id:g,name:h,onCopy:O,onCopyCapture:P,onCut:Q,onCutCapture:R,onPaste:S,onPasteCapture:T}))});
2
2
  //# sourceMappingURL=TextFieldTypeNumber.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextFieldTypeNumber.js","names":["React","forwardRef","useCallback","useMemo","FieldClearButton","FieldControlLayout","FieldCounter","FieldInput","renderSide","useForkRef","useKeys","useMutableRef","useSortSteps","useTextField","cnTextFieldTypeNumber","getValueByStep","stepIsActive","TextFieldTypeNumber","props","componentRef","className","value","defaultValue","onChange","id","name","inputRefProp","inputRef","maxLength","minLength","disabled","size","view","form","status","onBlur","onFocus","autoFocus","placeholder","leftSide","rightSide","autoComplete","clearButton","readOnly","type","tabIndex","ariaLabel","iconSize","onClick","incrementButtons","max","min","step","onKeyDown","onKeyDownCapture","onKeyUp","onKeyUpCapture","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onClear","onWheel","iconClear","otherProps","handleBlur","handleChange","handleClear","handleFocus","focused","withValue","ref","handleClick","mutableRefs","setWithValue","sortSteps","refs","changeNumberValue","e","isIncrement","current","newValue","on","handleIncrementButton","handleDecrementButton","handleInputKeyDown","isActive","keys","ArrowUp","preventDefault","ArrowDown","onEvent","handleWheel","blur"],"sources":["../../../../../../src/components/TextFieldCanary/TextFieldTypeNumber/TextFieldTypeNumber.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useMemo } from 'react';\n\nimport {\n FieldClearButton,\n FieldControlLayout,\n FieldCounter,\n FieldInput,\n renderSide,\n} from '##/components/FieldComponents';\nimport { useForkRef } from '##/hooks/useForkRef';\nimport { useKeys } from '##/hooks/useKeys';\nimport { useMutableRef } from '##/hooks/useMutableRef/useMutableRef';\nimport { useSortSteps } from '##/hooks/useSortSteps';\n\nimport { TextFieldTypeComponent } from '../types';\nimport { useTextField } from '../useTextField';\nimport { cnTextFieldTypeNumber } from './cnTextFieldTypeNumber';\nimport { getValueByStep, stepIsActive } from './helpers';\n\nexport const TextFieldTypeNumber: TextFieldTypeComponent<'number'> = forwardRef(\n (props, componentRef) => {\n const {\n className,\n value,\n defaultValue,\n onChange,\n id,\n name,\n inputRef: inputRefProp,\n maxLength,\n minLength,\n disabled,\n size = 'm',\n view = 'default',\n form,\n status,\n onBlur,\n onFocus,\n autoFocus,\n placeholder,\n leftSide,\n rightSide,\n autoComplete,\n clearButton,\n readOnly,\n type,\n tabIndex,\n ariaLabel,\n iconSize,\n onClick,\n incrementButtons,\n max,\n min,\n step,\n // onKey props\n onKeyDown,\n onKeyDownCapture,\n onKeyUp,\n onKeyUpCapture,\n onCopy,\n onCopyCapture,\n onCut,\n onCutCapture,\n onPaste,\n onPasteCapture,\n onClear,\n onWheel,\n iconClear,\n ...otherProps\n } = props;\n\n const {\n handleBlur,\n handleChange,\n handleClear,\n handleFocus,\n focused,\n withValue,\n ref,\n inputRef,\n handleClick,\n mutableRefs,\n setWithValue,\n } = useTextField({\n onClick,\n onChange,\n onBlur,\n onFocus,\n disabled,\n onClear,\n });\n\n const sortSteps = useSortSteps({ step, min, max });\n\n const refs = useMutableRef([\n sortSteps,\n min,\n max,\n onKeyDown,\n stepIsActive(sortSteps, disabled),\n onWheel,\n ] as const);\n\n const changeNumberValue = useCallback(\n <T extends React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent>(\n e: T,\n isIncrement: boolean,\n ) => {\n if (!inputRef.current || mutableRefs.current[4]) {\n return;\n }\n\n const newValue = getValueByStep(\n refs.current[0],\n inputRef.current.value,\n isIncrement,\n refs.current[1],\n refs.current[2],\n );\n\n mutableRefs.current[0]?.(newValue, { e });\n\n inputRef.current.value = newValue;\n setWithValue.on();\n },\n [],\n );\n\n const handleIncrementButton = useCallback(\n (e: React.MouseEvent<HTMLButtonElement>) => changeNumberValue(e, true),\n [],\n );\n\n const handleDecrementButton = useCallback(\n (e: React.MouseEvent<HTMLButtonElement>) => changeNumberValue(e, false),\n [],\n );\n\n const handleInputKeyDown = useKeys<Element>(\n useMemo(\n () => ({\n isActive: true,\n keys: {\n ArrowUp: (e) => {\n e.preventDefault();\n refs.current[4] && changeNumberValue(e, true);\n },\n ArrowDown: (e) => {\n e.preventDefault();\n refs.current[4] && changeNumberValue(e, false);\n },\n },\n onEvent: refs.current[3],\n }),\n [],\n ),\n );\n\n const handleWheel = useCallback((e: React.WheelEvent<HTMLInputElement>) => {\n if (refs.current[5]) {\n refs.current[5](e);\n } else {\n inputRef.current?.blur();\n }\n }, []);\n\n return (\n <FieldControlLayout\n {...otherProps}\n className={cnTextFieldTypeNumber({ incrementButtons }, [className])}\n form={form}\n status={status}\n size={size}\n leftSide={renderSide(leftSide, size, iconSize)}\n rightSide={[\n clearButton && !disabled && withValue && !incrementButtons && (\n <FieldClearButton\n size={size}\n onClick={handleClear}\n icon={iconClear}\n />\n ),\n incrementButtons && refs.current[4] && (\n <FieldCounter\n onIncrementClick={handleIncrementButton}\n onIncrementFocus={handleFocus}\n onDecrementClick={handleDecrementButton}\n onDecrementFocus={handleFocus}\n />\n ),\n ]}\n focused={focused}\n view={view}\n ref={useForkRef([componentRef, ref])}\n disabled={disabled}\n onClick={handleClick}\n >\n <FieldInput\n className={cnTextFieldTypeNumber('Input')}\n placeholder={placeholder}\n autoFocus={autoFocus}\n autoComplete={autoComplete}\n onBlur={handleBlur}\n onChange={handleChange}\n onFocus={handleFocus}\n defaultValue={defaultValue || undefined}\n value={value === null ? '' : value}\n ref={useForkRef([inputRefProp, inputRef])}\n readOnly={readOnly}\n tabIndex={tabIndex}\n aria-label={ariaLabel}\n onKeyDown={handleInputKeyDown}\n onKeyDownCapture={onKeyDownCapture}\n onKeyUp={onKeyUp}\n onKeyUpCapture={onKeyUpCapture}\n onWheel={handleWheel}\n maxLength={maxLength}\n minLength={minLength}\n disabled={disabled}\n type={type}\n max={max}\n min={min}\n id={id}\n name={name}\n onCopy={onCopy}\n onCopyCapture={onCopyCapture}\n onCut={onCut}\n onCutCapture={onCutCapture}\n onPaste={onPaste}\n onPasteCapture={onPasteCapture}\n />\n </FieldControlLayout>\n );\n },\n);\n"],"mappings":"qlBAAA,MAAOA,MAAP,EAAgBC,UAAhB,CAA4BC,WAA5B,CAAyCC,OAAzC,KAAwD,OAAxD,CAEA,OACEC,gBADF,CAEEC,kBAFF,CAGEC,YAHF,CAIEC,UAJF,CAKEC,UALF,6BAOA,OAASC,UAAT,iCACA,OAASC,OAAT,8BACA,OAASC,aAAT,kDACA,OAASC,YAAT,mCAGA,OAASC,YAAT,uBACA,OAASC,qBAAT,+BACA,OAASC,cAAT,CAAyBC,YAAzB,iBAEA,MAAO,IAAMC,oBAAqD,CAAGhB,UAAU,CAC7E,SAACiB,CAAD,CAAQC,CAAR,CAAyB,IAErBC,EAFqB,CAiDnBF,CAjDmB,CAErBE,SAFqB,CAGrBC,CAHqB,CAiDnBH,CAjDmB,CAGrBG,KAHqB,CAIrBC,CAJqB,CAiDnBJ,CAjDmB,CAIrBI,YAJqB,CAKrBC,CALqB,CAiDnBL,CAjDmB,CAKrBK,QALqB,CAMrBC,CANqB,CAiDnBN,CAjDmB,CAMrBM,EANqB,CAOrBC,CAPqB,CAiDnBP,CAjDmB,CAOrBO,IAPqB,CAQXC,CARW,CAiDnBR,CAjDmB,CAQrBS,QARqB,CASrBC,CATqB,CAiDnBV,CAjDmB,CASrBU,SATqB,CAUrBC,CAVqB,CAiDnBX,CAjDmB,CAUrBW,SAVqB,CAWrBC,CAXqB,CAiDnBZ,CAjDmB,CAWrBY,QAXqB,GAiDnBZ,CAjDmB,CAYrBa,IAZqB,CAYrBA,CAZqB,YAYd,GAZc,KAiDnBb,CAjDmB,CAarBc,IAbqB,CAarBA,CAbqB,YAad,SAbc,GAcrBC,CA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CA5BjB,CA6BE,KAAK,CAAEC,CA7BT,CA8BE,YAAY,CAAEC,CA9BhB,CA+BE,OAAO,CAAEC,CA/BX,CAgCE,cAAc,CAAEC,CAhClB,EA9BF,CAkEH,CAtN4E,CAAxE"}
1
+ {"version":3,"file":"TextFieldTypeNumber.js","names":["React","forwardRef","useCallback","useMemo","FieldClearButton","FieldControlLayout","FieldCounter","FieldInput","renderSide","useForkRef","useKeys","useMutableRef","useSortSteps","useTextField","cnTextFieldTypeNumber","getValueByStep","stepIsActive","TextFieldTypeNumber","props","componentRef","className","value","defaultValue","onChange","id","name","inputRefProp","inputRef","maxLength","minLength","disabled","size","view","form","status","onBlur","onFocus","autoFocus","placeholder","leftSide","rightSide","autoComplete","clearButton","readOnly","type","tabIndex","ariaLabel","iconSize","onClick","incrementButtons","max","min","step","onKeyDown","onKeyDownCapture","onKeyUp","onKeyUpCapture","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onClear","onWheel","iconClear","otherProps","handleBlur","handleChange","handleClear","handleFocus","focused","withValue","ref","handleClick","mutableRefs","setWithValue","sortSteps","refs","changeNumberValue","e","isIncrement","current","newValue","on","handleIncrementButton","handleDecrementButton","handleInputKeyDown","isActive","keys","ArrowUp","preventDefault","ArrowDown","onEvent","handleWheel","blur"],"sources":["../../../../../../src/components/TextFieldCanary/TextFieldTypeNumber/TextFieldTypeNumber.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useMemo } from 'react';\n\nimport {\n FieldClearButton,\n FieldControlLayout,\n FieldCounter,\n FieldInput,\n renderSide,\n} from '##/components/FieldComponents';\nimport { useForkRef } from '##/hooks/useForkRef';\nimport { useKeys } from '##/hooks/useKeys';\nimport { useMutableRef } from '##/hooks/useMutableRef/useMutableRef';\nimport { useSortSteps } from '##/hooks/useSortSteps';\n\nimport { TextFieldTypeComponent } from '../types';\nimport { useTextField } from '../useTextField';\nimport { cnTextFieldTypeNumber } from './cnTextFieldTypeNumber';\nimport { getValueByStep, stepIsActive } from './helpers';\n\nexport const TextFieldTypeNumber: TextFieldTypeComponent<'number'> = forwardRef(\n (props, componentRef) => {\n const {\n className,\n value,\n defaultValue,\n onChange,\n id,\n name,\n inputRef: inputRefProp,\n maxLength,\n minLength,\n disabled,\n size = 'm',\n view = 'default',\n form,\n status,\n onBlur,\n onFocus,\n autoFocus,\n placeholder,\n leftSide,\n rightSide,\n autoComplete,\n clearButton,\n readOnly,\n type,\n tabIndex,\n ariaLabel,\n iconSize,\n onClick,\n incrementButtons,\n max,\n min,\n step,\n // onKey props\n onKeyDown,\n onKeyDownCapture,\n onKeyUp,\n onKeyUpCapture,\n onCopy,\n onCopyCapture,\n onCut,\n onCutCapture,\n onPaste,\n onPasteCapture,\n onClear,\n onWheel,\n iconClear,\n ...otherProps\n } = props;\n\n const {\n handleBlur,\n handleChange,\n handleClear,\n handleFocus,\n focused,\n withValue,\n ref,\n inputRef,\n handleClick,\n mutableRefs,\n setWithValue,\n } = useTextField({\n onClick,\n onChange,\n onBlur,\n onFocus,\n disabled,\n onClear,\n });\n\n const sortSteps = useSortSteps({ step, min, max });\n\n const refs = useMutableRef([\n sortSteps,\n min,\n max,\n onKeyDown,\n stepIsActive(sortSteps, disabled),\n onWheel,\n ] as const);\n\n const changeNumberValue = useCallback(\n <T extends React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent>(\n e: T,\n isIncrement: boolean,\n ) => {\n if (!inputRef.current || mutableRefs.current[4]) {\n return;\n }\n\n const newValue = getValueByStep(\n refs.current[0],\n inputRef.current.value,\n isIncrement,\n refs.current[1],\n refs.current[2],\n );\n\n mutableRefs.current[0]?.(newValue, { e });\n\n inputRef.current.value = newValue;\n setWithValue.on();\n },\n [],\n );\n\n const handleIncrementButton = useCallback(\n (e: React.MouseEvent<HTMLButtonElement>) => changeNumberValue(e, true),\n [],\n );\n\n const handleDecrementButton = useCallback(\n (e: React.MouseEvent<HTMLButtonElement>) => changeNumberValue(e, false),\n [],\n );\n\n const handleInputKeyDown = useKeys<Element>(\n useMemo(\n () => ({\n isActive: true,\n keys: {\n ArrowUp: (e) => {\n e.preventDefault();\n refs.current[4] && changeNumberValue(e, true);\n },\n ArrowDown: (e) => {\n e.preventDefault();\n refs.current[4] && changeNumberValue(e, false);\n },\n },\n onEvent: refs.current[3],\n }),\n [],\n ),\n );\n\n const handleWheel = useCallback((e: React.WheelEvent<HTMLInputElement>) => {\n if (refs.current[5]) {\n refs.current[5](e);\n } else {\n inputRef.current?.blur();\n }\n }, []);\n\n return (\n <FieldControlLayout\n {...otherProps}\n className={cnTextFieldTypeNumber({ incrementButtons }, [className])}\n form={form}\n status={status}\n size={size}\n leftSide={renderSide(leftSide, size, iconSize)}\n rightSide={[\n clearButton && !disabled && withValue && !incrementButtons && (\n <FieldClearButton\n size={size}\n onClick={handleClear}\n icon={iconClear}\n />\n ),\n renderSide(rightSide, size, iconSize),\n incrementButtons && refs.current[4] && (\n <FieldCounter\n onIncrementClick={handleIncrementButton}\n onIncrementFocus={handleFocus}\n onDecrementClick={handleDecrementButton}\n onDecrementFocus={handleFocus}\n />\n ),\n ]}\n focused={focused}\n view={view}\n ref={useForkRef([componentRef, ref])}\n disabled={disabled}\n onClick={handleClick}\n >\n <FieldInput\n className={cnTextFieldTypeNumber('Input')}\n placeholder={placeholder}\n autoFocus={autoFocus}\n autoComplete={autoComplete}\n onBlur={handleBlur}\n onChange={handleChange}\n onFocus={handleFocus}\n defaultValue={defaultValue || undefined}\n value={value === null ? '' : value}\n ref={useForkRef([inputRefProp, inputRef])}\n readOnly={readOnly}\n tabIndex={tabIndex}\n aria-label={ariaLabel}\n onKeyDown={handleInputKeyDown}\n onKeyDownCapture={onKeyDownCapture}\n onKeyUp={onKeyUp}\n onKeyUpCapture={onKeyUpCapture}\n onWheel={handleWheel}\n maxLength={maxLength}\n minLength={minLength}\n disabled={disabled}\n type={type}\n max={max}\n min={min}\n id={id}\n name={name}\n onCopy={onCopy}\n onCopyCapture={onCopyCapture}\n onCut={onCut}\n onCutCapture={onCut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CAgCE,cAAc,CAAEC,CAhClB,EA/BF,CAmEH,CAvN4E,CAAxE"}
@@ -1,3 +1,3 @@
1
1
  .TextFieldTypeTextArea{--text-field-textarea-padding-right:calc((var(--field-control-layout-right-slots-length))*var(--field-control-layout-space) + var(--field-control-layout-right-slot-contents-width) + var(--field-control-layout-padding-right));--text-field-textarea-vertical-padding:calc((var(--field-control-layout-slot-height) - var(--field-control-layout-text-line-height))/2);--text-field-textarea-control-height:var(
2
- --text-field-height,var(--field-control-layout-height)
3
- );--text-field-textarea-height-calc:calc(var(--text-field-textarea-control-height) - var(--field-control-layout-border-width)*2);--text-field-textarea-min-height:var(--text-field-textarea-height-calc);overflow:hidden}.TextFieldTypeTextArea_resize{--text-field-textarea-resize:vertical}.TextFieldTypeTextArea-TextArea{height:auto;min-height:var(--text-field-textarea-min-height);padding-bottom:var(--text-field-textarea-vertical-padding);padding-right:var(--text-field-textarea-padding-right,0);padding-top:var(--text-field-textarea-vertical-padding);resize:var(--text-field-textarea-resize,none);width:calc(100% + var(--text-field-textarea-padding-right))}.TextFieldTypeTextArea-TextArea,.TextFieldTypeTextArea-TextArea.TextAreaAutoSize{line-height:var(--field-control-layout-text-line-height)}
2
+ --text-field-height,var(--field-control-layout-height)
3
+ );--text-field-textarea-height-calc:calc(var(--text-field-textarea-control-height) - var(--field-control-layout-border-width)*2);--text-field-textarea-min-height:var(--text-field-textarea-height-calc);overflow:hidden}.TextFieldTypeTextArea_resize{--text-field-textarea-resize:vertical}.TextFieldTypeTextArea-TextArea{height:auto;min-height:var(--text-field-textarea-min-height);padding-bottom:var(--text-field-textarea-vertical-padding);padding-right:var(--text-field-textarea-padding-right,0);padding-top:var(--text-field-textarea-vertical-padding);resize:var(--text-field-textarea-resize,none);width:calc(100% + var(--text-field-textarea-padding-right))}.TextFieldTypeTextArea-TextArea,.TextFieldTypeTextArea-TextArea.TextAreaAutoSize{line-height:var(--field-control-layout-text-line-height)}