@consta/uikit 5.31.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 (432) hide show
  1. package/ColorPicker/index.d.ts +1 -0
  2. package/ColorPicker/index.js +1 -0
  3. package/__internal__/src/components/Attachment/Attachment.css +1 -1
  4. package/__internal__/src/components/Attachment/types.d.ts +1 -1
  5. package/__internal__/src/components/Attachment/types.js.map +1 -1
  6. package/__internal__/src/components/AttachmentDeprecated/Attachment.css +1 -1
  7. package/__internal__/src/components/AttachmentDeprecated/AttachmentDeprecated.js.map +1 -1
  8. package/__internal__/src/components/AttachmentDeprecated/types.d.ts +1 -1
  9. package/__internal__/src/components/AttachmentDeprecated/types.js.map +1 -1
  10. package/__internal__/src/components/Avatar/Avatar.d.ts +2 -2
  11. package/__internal__/src/components/Avatar/Avatar.js.map +1 -1
  12. package/__internal__/src/components/AvatarGroup/types.d.ts +2 -2
  13. package/__internal__/src/components/AvatarGroup/types.js.map +1 -1
  14. package/__internal__/src/components/Badge/Badge.css +2 -2
  15. package/__internal__/src/components/Badge/maps.js.map +1 -1
  16. package/__internal__/src/components/Badge/types.d.ts +4 -4
  17. package/__internal__/src/components/Badge/types.js.map +1 -1
  18. package/__internal__/src/components/Banner/Banner.d.ts +4 -4
  19. package/__internal__/src/components/Banner/Banner.js.map +1 -1
  20. package/__internal__/src/components/BookmarkTabs/BookmarkTabs.js.map +1 -1
  21. package/__internal__/src/components/BookmarkTabs/types.d.ts +3 -3
  22. package/__internal__/src/components/BookmarkTabs/types.js.map +1 -1
  23. package/__internal__/src/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
  24. package/__internal__/src/components/Breadcrumbs/types.d.ts +2 -2
  25. package/__internal__/src/components/Breadcrumbs/types.js.map +1 -1
  26. package/__internal__/src/components/Button/Button.d.ts +4 -4
  27. package/__internal__/src/components/Button/Button.js.map +1 -1
  28. package/__internal__/src/components/Card/Card.d.ts +3 -3
  29. package/__internal__/src/components/Card/Card.js.map +1 -1
  30. package/__internal__/src/components/Checkbox/Checkbox.css +2 -2
  31. package/__internal__/src/components/Checkbox/Checkbox.d.ts +3 -3
  32. package/__internal__/src/components/Checkbox/Checkbox.js.map +1 -1
  33. package/__internal__/src/components/CheckboxDeprecated/Checkbox.css +2 -2
  34. package/__internal__/src/components/CheckboxDeprecated/CheckboxDeprecated.d.ts +3 -3
  35. package/__internal__/src/components/CheckboxDeprecated/CheckboxDeprecated.js.map +1 -1
  36. package/__internal__/src/components/CheckboxGroup/types.d.ts +4 -4
  37. package/__internal__/src/components/CheckboxGroup/types.js.map +1 -1
  38. package/__internal__/src/components/Chips/ChipsItem/ChipsItem.css +2 -2
  39. package/__internal__/src/components/Chips/types.d.ts +2 -2
  40. package/__internal__/src/components/Chips/types.js.map +1 -1
  41. package/__internal__/src/components/ChoiceGroup/ChoiceGroup.js.map +1 -1
  42. package/__internal__/src/components/ChoiceGroup/types.d.ts +4 -4
  43. package/__internal__/src/components/ChoiceGroup/types.js.map +1 -1
  44. package/__internal__/src/components/Collapse/types.d.ts +7 -7
  45. package/__internal__/src/components/Collapse/types.js.map +1 -1
  46. package/__internal__/src/components/ColorPicker/ColorControl/ColorControl.css +7 -0
  47. package/__internal__/src/components/ColorPicker/ColorControl/ColorControl.d.ts +6 -0
  48. package/__internal__/src/components/ColorPicker/ColorControl/ColorControl.js +2 -0
  49. package/__internal__/src/components/ColorPicker/ColorControl/ColorControl.js.map +1 -0
  50. package/__internal__/src/components/ColorPicker/ColorControl/index.d.ts +2 -0
  51. package/__internal__/src/components/ColorPicker/ColorControl/index.js +2 -0
  52. package/__internal__/src/components/ColorPicker/ColorControl/index.js.map +1 -0
  53. package/__internal__/src/components/ColorPicker/ColorControl/types.d.ts +6 -0
  54. package/__internal__/src/components/ColorPicker/ColorControl/types.js +2 -0
  55. package/__internal__/src/components/ColorPicker/ColorControl/types.js.map +1 -0
  56. package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/ColorInputTypeChanger.css +1 -0
  57. package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/ColorInputTypeChanger.d.ts +4 -0
  58. package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/ColorInputTypeChanger.js +2 -0
  59. package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/ColorInputTypeChanger.js.map +1 -0
  60. package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/index.d.ts +1 -0
  61. package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/index.js +2 -0
  62. package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/index.js.map +1 -0
  63. package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/types.d.ts +6 -0
  64. package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/types.js +2 -0
  65. package/__internal__/src/components/ColorPicker/ColorInputTypeChanger/types.js.map +1 -0
  66. package/__internal__/src/components/ColorPicker/ColorMarker/ColorMarker.css +1 -0
  67. package/__internal__/src/components/ColorPicker/ColorMarker/ColorMarker.d.ts +16 -0
  68. package/__internal__/src/components/ColorPicker/ColorMarker/ColorMarker.js +2 -0
  69. package/__internal__/src/components/ColorPicker/ColorMarker/ColorMarker.js.map +1 -0
  70. package/__internal__/src/components/ColorPicker/ColorMarker/index.d.ts +1 -0
  71. package/__internal__/src/components/ColorPicker/ColorMarker/index.js +2 -0
  72. package/__internal__/src/components/ColorPicker/ColorMarker/index.js.map +1 -0
  73. package/__internal__/src/components/ColorPicker/ColorPalette/ColorPalette.d.ts +13 -0
  74. package/__internal__/src/components/ColorPicker/ColorPalette/ColorPalette.js +2 -0
  75. package/__internal__/src/components/ColorPicker/ColorPalette/ColorPalette.js.map +1 -0
  76. package/__internal__/src/components/ColorPicker/ColorPalette/index.d.ts +1 -0
  77. package/__internal__/src/components/ColorPicker/ColorPalette/index.js +2 -0
  78. package/__internal__/src/components/ColorPicker/ColorPalette/index.js.map +1 -0
  79. package/__internal__/src/components/ColorPicker/ColorPicker/ColorPicker.css +1 -0
  80. package/__internal__/src/components/ColorPicker/ColorPicker/ColorPicker.d.ts +3 -0
  81. package/__internal__/src/components/ColorPicker/ColorPicker/ColorPicker.js +2 -0
  82. package/__internal__/src/components/ColorPicker/ColorPicker/ColorPicker.js.map +1 -0
  83. package/__internal__/src/components/ColorPicker/ColorPicker/index.d.ts +2 -0
  84. package/__internal__/src/components/ColorPicker/ColorPicker/index.js +2 -0
  85. package/__internal__/src/components/ColorPicker/ColorPicker/index.js.map +1 -0
  86. package/__internal__/src/components/ColorPicker/ColorPicker/types.d.ts +25 -0
  87. package/__internal__/src/components/ColorPicker/ColorPicker/types.js +2 -0
  88. package/__internal__/src/components/ColorPicker/ColorPicker/types.js.map +1 -0
  89. package/__internal__/src/components/ColorPicker/ColorPickerAlpha/ColorPickerAlpha.css +1 -0
  90. package/__internal__/src/components/ColorPicker/ColorPickerAlpha/ColorPickerAlpha.d.ts +12 -0
  91. package/__internal__/src/components/ColorPicker/ColorPickerAlpha/ColorPickerAlpha.js +2 -0
  92. package/__internal__/src/components/ColorPicker/ColorPickerAlpha/ColorPickerAlpha.js.map +1 -0
  93. package/__internal__/src/components/ColorPicker/ColorPickerAlpha/index.d.ts +1 -0
  94. package/__internal__/src/components/ColorPicker/ColorPickerAlpha/index.js +2 -0
  95. package/__internal__/src/components/ColorPicker/ColorPickerAlpha/index.js.map +1 -0
  96. package/__internal__/src/components/ColorPicker/ColorPickerBase/ColorPickerBase.d.ts +12 -0
  97. package/__internal__/src/components/ColorPicker/ColorPickerBase/ColorPickerBase.js +2 -0
  98. package/__internal__/src/components/ColorPicker/ColorPickerBase/ColorPickerBase.js.map +1 -0
  99. package/__internal__/src/components/ColorPicker/ColorPickerBase/index.d.ts +1 -0
  100. package/__internal__/src/components/ColorPicker/ColorPickerBase/index.js +2 -0
  101. package/__internal__/src/components/ColorPicker/ColorPickerBase/index.js.map +1 -0
  102. package/__internal__/src/components/ColorPicker/ColorPickerHue/ColorPickerHue.css +1 -0
  103. package/__internal__/src/components/ColorPicker/ColorPickerHue/ColorPickerHue.d.ts +12 -0
  104. package/__internal__/src/components/ColorPicker/ColorPickerHue/ColorPickerHue.js +2 -0
  105. package/__internal__/src/components/ColorPicker/ColorPickerHue/ColorPickerHue.js.map +1 -0
  106. package/__internal__/src/components/ColorPicker/ColorPickerHue/index.d.ts +1 -0
  107. package/__internal__/src/components/ColorPicker/ColorPickerHue/index.js +2 -0
  108. package/__internal__/src/components/ColorPicker/ColorPickerHue/index.js.map +1 -0
  109. package/__internal__/src/components/ColorPicker/ColorPickerInput/ColorPickerInput.css +3 -0
  110. package/__internal__/src/components/ColorPicker/ColorPickerInput/ColorPickerInput.d.ts +5 -0
  111. package/__internal__/src/components/ColorPicker/ColorPickerInput/ColorPickerInput.js +2 -0
  112. package/__internal__/src/components/ColorPicker/ColorPickerInput/ColorPickerInput.js.map +1 -0
  113. package/__internal__/src/components/ColorPicker/ColorPickerInput/helpers.d.ts +12 -0
  114. package/__internal__/src/components/ColorPicker/ColorPickerInput/helpers.js +2 -0
  115. package/__internal__/src/components/ColorPicker/ColorPickerInput/helpers.js.map +1 -0
  116. package/__internal__/src/components/ColorPicker/ColorPickerInput/index.d.ts +2 -0
  117. package/__internal__/src/components/ColorPicker/ColorPickerInput/index.js +2 -0
  118. package/__internal__/src/components/ColorPicker/ColorPickerInput/index.js.map +1 -0
  119. package/__internal__/src/components/ColorPicker/ColorPickerInput/types.d.ts +25 -0
  120. package/__internal__/src/components/ColorPicker/ColorPickerInput/types.js +2 -0
  121. package/__internal__/src/components/ColorPicker/ColorPickerInput/types.js.map +1 -0
  122. package/__internal__/src/components/ColorPicker/ColorPickerInteractive/ColorPickerInteractive.css +1 -0
  123. package/__internal__/src/components/ColorPicker/ColorPickerInteractive/ColorPickerInteractive.d.ts +15 -0
  124. package/__internal__/src/components/ColorPicker/ColorPickerInteractive/ColorPickerInteractive.js +2 -0
  125. package/__internal__/src/components/ColorPicker/ColorPickerInteractive/ColorPickerInteractive.js.map +1 -0
  126. package/__internal__/src/components/ColorPicker/ColorPickerInteractive/index.d.ts +1 -0
  127. package/__internal__/src/components/ColorPicker/ColorPickerInteractive/index.js +2 -0
  128. package/__internal__/src/components/ColorPicker/ColorPickerInteractive/index.js.map +1 -0
  129. package/__internal__/src/components/ColorPicker/ColorPickerPoint/ColorPickerPoint.css +1 -0
  130. package/__internal__/src/components/ColorPicker/ColorPickerPoint/ColorPickerPoint.d.ts +8 -0
  131. package/__internal__/src/components/ColorPicker/ColorPickerPoint/ColorPickerPoint.js +2 -0
  132. package/__internal__/src/components/ColorPicker/ColorPickerPoint/ColorPickerPoint.js.map +1 -0
  133. package/__internal__/src/components/ColorPicker/ColorPickerPoint/index.d.ts +1 -0
  134. package/__internal__/src/components/ColorPicker/ColorPickerPoint/index.js +2 -0
  135. package/__internal__/src/components/ColorPicker/ColorPickerPoint/index.js.map +1 -0
  136. package/__internal__/src/components/ColorPicker/ColorPickerRoot/ColorPickerRoot.css +1 -0
  137. package/__internal__/src/components/ColorPicker/ColorPickerRoot/ColorPickerRoot.d.ts +16 -0
  138. package/__internal__/src/components/ColorPicker/ColorPickerRoot/ColorPickerRoot.js +2 -0
  139. package/__internal__/src/components/ColorPicker/ColorPickerRoot/ColorPickerRoot.js.map +1 -0
  140. package/__internal__/src/components/ColorPicker/ColorPickerRoot/index.d.ts +1 -0
  141. package/__internal__/src/components/ColorPicker/ColorPickerRoot/index.js +2 -0
  142. package/__internal__/src/components/ColorPicker/ColorPickerRoot/index.js.map +1 -0
  143. package/__internal__/src/components/ColorPicker/ColorPickerSaturation/ColorPickerSaturation.css +1 -0
  144. package/__internal__/src/components/ColorPicker/ColorPickerSaturation/ColorPickerSaturation.d.ts +13 -0
  145. package/__internal__/src/components/ColorPicker/ColorPickerSaturation/ColorPickerSaturation.js +2 -0
  146. package/__internal__/src/components/ColorPicker/ColorPickerSaturation/ColorPickerSaturation.js.map +1 -0
  147. package/__internal__/src/components/ColorPicker/ColorPickerSaturation/index.d.ts +1 -0
  148. package/__internal__/src/components/ColorPicker/ColorPickerSaturation/index.js +2 -0
  149. package/__internal__/src/components/ColorPicker/ColorPickerSaturation/index.js.map +1 -0
  150. package/__internal__/src/components/ColorPicker/hooks/useColorManipulation.d.ts +2 -0
  151. package/__internal__/src/components/ColorPicker/hooks/useColorManipulation.js +2 -0
  152. package/__internal__/src/components/ColorPicker/hooks/useColorManipulation.js.map +1 -0
  153. package/__internal__/src/components/ColorPicker/hooks/useEventCallback.d.ts +1 -0
  154. package/__internal__/src/components/ColorPicker/hooks/useEventCallback.js +2 -0
  155. package/__internal__/src/components/ColorPicker/hooks/useEventCallback.js.map +1 -0
  156. package/__internal__/src/components/ColorPicker/index.d.ts +10 -0
  157. package/__internal__/src/components/ColorPicker/index.js +2 -0
  158. package/__internal__/src/components/ColorPicker/index.js.map +1 -0
  159. package/__internal__/src/components/ColorPicker/models/hexAlphaModel.d.ts +2 -0
  160. package/__internal__/src/components/ColorPicker/models/hexAlphaModel.js +2 -0
  161. package/__internal__/src/components/ColorPicker/models/hexAlphaModel.js.map +1 -0
  162. package/__internal__/src/components/ColorPicker/models/hexModel.d.ts +2 -0
  163. package/__internal__/src/components/ColorPicker/models/hexModel.js +2 -0
  164. package/__internal__/src/components/ColorPicker/models/hexModel.js.map +1 -0
  165. package/__internal__/src/components/ColorPicker/models/hslModel.d.ts +2 -0
  166. package/__internal__/src/components/ColorPicker/models/hslModel.js +2 -0
  167. package/__internal__/src/components/ColorPicker/models/hslModel.js.map +1 -0
  168. package/__internal__/src/components/ColorPicker/models/hslStringModel.d.ts +2 -0
  169. package/__internal__/src/components/ColorPicker/models/hslStringModel.js +2 -0
  170. package/__internal__/src/components/ColorPicker/models/hslStringModel.js.map +1 -0
  171. package/__internal__/src/components/ColorPicker/models/hslaModel.d.ts +2 -0
  172. package/__internal__/src/components/ColorPicker/models/hslaModel.js +2 -0
  173. package/__internal__/src/components/ColorPicker/models/hslaModel.js.map +1 -0
  174. package/__internal__/src/components/ColorPicker/models/hslaStringModel.d.ts +2 -0
  175. package/__internal__/src/components/ColorPicker/models/hslaStringModel.js +2 -0
  176. package/__internal__/src/components/ColorPicker/models/hslaStringModel.js.map +1 -0
  177. package/__internal__/src/components/ColorPicker/models/hsvModel.d.ts +2 -0
  178. package/__internal__/src/components/ColorPicker/models/hsvModel.js +2 -0
  179. package/__internal__/src/components/ColorPicker/models/hsvModel.js.map +1 -0
  180. package/__internal__/src/components/ColorPicker/models/hsvStringModel.d.ts +2 -0
  181. package/__internal__/src/components/ColorPicker/models/hsvStringModel.js +2 -0
  182. package/__internal__/src/components/ColorPicker/models/hsvStringModel.js.map +1 -0
  183. package/__internal__/src/components/ColorPicker/models/hsvaModel.d.ts +2 -0
  184. package/__internal__/src/components/ColorPicker/models/hsvaModel.js +2 -0
  185. package/__internal__/src/components/ColorPicker/models/hsvaModel.js.map +1 -0
  186. package/__internal__/src/components/ColorPicker/models/hsvaStringModel.d.ts +2 -0
  187. package/__internal__/src/components/ColorPicker/models/hsvaStringModel.js +2 -0
  188. package/__internal__/src/components/ColorPicker/models/hsvaStringModel.js.map +1 -0
  189. package/__internal__/src/components/ColorPicker/models/index.d.ts +14 -0
  190. package/__internal__/src/components/ColorPicker/models/index.js +2 -0
  191. package/__internal__/src/components/ColorPicker/models/index.js.map +1 -0
  192. package/__internal__/src/components/ColorPicker/models/rgbModel.d.ts +2 -0
  193. package/__internal__/src/components/ColorPicker/models/rgbModel.js +2 -0
  194. package/__internal__/src/components/ColorPicker/models/rgbModel.js.map +1 -0
  195. package/__internal__/src/components/ColorPicker/models/rgbStringModel.d.ts +2 -0
  196. package/__internal__/src/components/ColorPicker/models/rgbStringModel.js +2 -0
  197. package/__internal__/src/components/ColorPicker/models/rgbStringModel.js.map +1 -0
  198. package/__internal__/src/components/ColorPicker/models/rgbaModel.d.ts +2 -0
  199. package/__internal__/src/components/ColorPicker/models/rgbaModel.js +2 -0
  200. package/__internal__/src/components/ColorPicker/models/rgbaModel.js.map +1 -0
  201. package/__internal__/src/components/ColorPicker/models/rgbaStringModel.d.ts +2 -0
  202. package/__internal__/src/components/ColorPicker/models/rgbaStringModel.js +2 -0
  203. package/__internal__/src/components/ColorPicker/models/rgbaStringModel.js.map +1 -0
  204. package/__internal__/src/components/ColorPicker/types.d.ts +33 -0
  205. package/__internal__/src/components/ColorPicker/types.js +2 -0
  206. package/__internal__/src/components/ColorPicker/types.js.map +1 -0
  207. package/__internal__/src/components/ColorPicker/utils/clamp.d.ts +1 -0
  208. package/__internal__/src/components/ColorPicker/utils/clamp.js +2 -0
  209. package/__internal__/src/components/ColorPicker/utils/clamp.js.map +1 -0
  210. package/__internal__/src/components/ColorPicker/utils/compare.d.ts +4 -0
  211. package/__internal__/src/components/ColorPicker/utils/compare.js +2 -0
  212. package/__internal__/src/components/ColorPicker/utils/compare.js.map +1 -0
  213. package/__internal__/src/components/ColorPicker/utils/convert.d.ts +32 -0
  214. package/__internal__/src/components/ColorPicker/utils/convert.js +2 -0
  215. package/__internal__/src/components/ColorPicker/utils/convert.js.map +1 -0
  216. package/__internal__/src/components/ColorPicker/utils/format.d.ts +1 -0
  217. package/__internal__/src/components/ColorPicker/utils/format.js +2 -0
  218. package/__internal__/src/components/ColorPicker/utils/format.js.map +1 -0
  219. package/__internal__/src/components/ColorPicker/utils/round.d.ts +1 -0
  220. package/__internal__/src/components/ColorPicker/utils/round.js +2 -0
  221. package/__internal__/src/components/ColorPicker/utils/round.js.map +1 -0
  222. package/__internal__/src/components/ColorPicker/utils/validate.d.ts +1 -0
  223. package/__internal__/src/components/ColorPicker/utils/validate.js +2 -0
  224. package/__internal__/src/components/ColorPicker/utils/validate.js.map +1 -0
  225. package/__internal__/src/components/ContextMenu/ContextMenuLevel/ContextMenuLevel.js.map +1 -1
  226. package/__internal__/src/components/ContextMenu/ContextMenuLevels/ContextMenuLevels.js.map +1 -1
  227. package/__internal__/src/components/ContextMenu/types.d.ts +3 -3
  228. package/__internal__/src/components/ContextMenu/types.js.map +1 -1
  229. package/__internal__/src/components/DatePicker/DatePickerDropdown/DatePickerDropdown.d.ts +1 -0
  230. package/__internal__/src/components/DatePicker/DatePickerDropdown/DatePickerDropdown.js.map +1 -1
  231. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDate/DatePickerFieldTypeDate.d.ts +1 -1
  232. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTime/DatePickerFieldTypeDateTime.d.ts +1 -1
  233. package/__internal__/src/components/DatePicker/DatePickerFieldTypeMonth/DatePickerFieldTypeMonth.d.ts +1 -1
  234. package/__internal__/src/components/DatePicker/DatePickerFieldTypeTime/DatePickerFieldTypeTime.d.ts +1 -1
  235. package/__internal__/src/components/DatePicker/DatePickerFieldTypeYear/DatePickerFieldTypeYear.d.ts +1 -1
  236. package/__internal__/src/components/DatePicker/DatePickerTypeDate/DatePickerTypeDate.js +1 -1
  237. package/__internal__/src/components/DatePicker/DatePickerTypeDate/DatePickerTypeDate.js.map +1 -1
  238. package/__internal__/src/components/DatePicker/DatePickerTypeDateRange/DatePickerTypeDateRange.js +1 -1
  239. package/__internal__/src/components/DatePicker/DatePickerTypeDateRange/DatePickerTypeDateRange.js.map +1 -1
  240. package/__internal__/src/components/DatePicker/DatePickerTypeDateTime/DatePickerTypeDateTime.js +1 -1
  241. package/__internal__/src/components/DatePicker/DatePickerTypeDateTime/DatePickerTypeDateTime.js.map +1 -1
  242. package/__internal__/src/components/DatePicker/DatePickerTypeDateTimeRange/DatePickerTypeDateTimeRange.js +1 -1
  243. package/__internal__/src/components/DatePicker/DatePickerTypeDateTimeRange/DatePickerTypeDateTimeRange.js.map +1 -1
  244. package/__internal__/src/components/DatePicker/DatePickerTypeMonth/DatePickerTypeMonth.js +1 -1
  245. package/__internal__/src/components/DatePicker/DatePickerTypeMonth/DatePickerTypeMonth.js.map +1 -1
  246. package/__internal__/src/components/DatePicker/DatePickerTypeMonthRange/DatePickerTypeMonthRange.js +1 -1
  247. package/__internal__/src/components/DatePicker/DatePickerTypeMonthRange/DatePickerTypeMonthRange.js.map +1 -1
  248. package/__internal__/src/components/DatePicker/getChangeFnRange.js +1 -1
  249. package/__internal__/src/components/DatePicker/getChangeFnRange.js.map +1 -1
  250. package/__internal__/src/components/DatePicker/helpers.js.map +1 -1
  251. package/__internal__/src/components/DatePicker/types.d.ts +6 -6
  252. package/__internal__/src/components/DatePicker/types.js.map +1 -1
  253. package/__internal__/src/components/DateTime/DateTime100YearSlider/DateTime100YearSlider.js +1 -1
  254. package/__internal__/src/components/DateTime/DateTime100YearSlider/DateTime100YearSlider.js.map +1 -1
  255. package/__internal__/src/components/DateTime/DateTime10YearSlider/DateTime10YearSlider.js +1 -1
  256. package/__internal__/src/components/DateTime/DateTime10YearSlider/DateTime10YearSlider.js.map +1 -1
  257. package/__internal__/src/components/DateTime/DateTimeCell/DateTimeCell.d.ts +1 -1
  258. package/__internal__/src/components/DateTime/DateTimeCell/DateTimeCell.js.map +1 -1
  259. package/__internal__/src/components/DateTime/DateTimeGrid/DateTimeGrid.css +1 -1
  260. package/__internal__/src/components/DateTime/DateTimeTypeDate/DateTimeTypeDate.js +1 -1
  261. package/__internal__/src/components/DateTime/DateTimeTypeDate/DateTimeTypeDate.js.map +1 -1
  262. package/__internal__/src/components/DateTime/DateTimeTypeMonth/DateTimeTypeMonth.js +1 -1
  263. package/__internal__/src/components/DateTime/DateTimeTypeMonth/DateTimeTypeMonth.js.map +1 -1
  264. package/__internal__/src/components/DateTime/DateTimeTypeYear/DateTimeTypeYear.js +1 -1
  265. package/__internal__/src/components/DateTime/DateTimeTypeYear/DateTimeTypeYear.js.map +1 -1
  266. package/__internal__/src/components/DateTime/DateTimeYearSlider/DateTimeYearSlider.js +1 -1
  267. package/__internal__/src/components/DateTime/DateTimeYearSlider/DateTimeYearSlider.js.map +1 -1
  268. package/__internal__/src/components/DateTime/helpers/index.js +1 -1
  269. package/__internal__/src/components/DateTime/helpers/index.js.map +1 -1
  270. package/__internal__/src/components/DateTime/helpers/types.d.ts +4 -3
  271. package/__internal__/src/components/DateTime/helpers/types.js.map +1 -1
  272. package/__internal__/src/components/DragNDropField/DragNDropFieldTooltip/DragNDropFieldTooltip.css +1 -1
  273. package/__internal__/src/components/DragNDropFieldCanary/types.d.ts +1 -1
  274. package/__internal__/src/components/DragNDropFieldCanary/types.js.map +1 -1
  275. package/__internal__/src/components/FieldComponents/FieldControlLayout/FieldControlLayout.css +4 -2
  276. package/__internal__/src/components/FieldComponents/FieldControlLayout/FieldControlLayout.js +1 -1
  277. package/__internal__/src/components/FieldComponents/FieldControlLayout/FieldControlLayout.js.map +1 -1
  278. package/__internal__/src/components/FieldComponents/FieldControlLayout/helpers.d.ts +5 -2
  279. package/__internal__/src/components/FieldComponents/FieldControlLayout/helpers.js +1 -1
  280. package/__internal__/src/components/FieldComponents/FieldControlLayout/helpers.js.map +1 -1
  281. package/__internal__/src/components/FieldComponents/FieldControlLayout/maps.d.ts +1 -0
  282. package/__internal__/src/components/FieldComponents/FieldControlLayout/maps.js +1 -1
  283. package/__internal__/src/components/FieldComponents/FieldControlLayout/maps.js.map +1 -1
  284. package/__internal__/src/components/FieldGroup/getForm.js +1 -1
  285. package/__internal__/src/components/FieldGroup/getForm.js.map +1 -1
  286. package/__internal__/src/components/FileCanary/types.d.ts +1 -1
  287. package/__internal__/src/components/FileCanary/types.js.map +1 -1
  288. package/__internal__/src/components/FlatSelect/FlatSelect.css +8 -8
  289. package/__internal__/src/components/FlatSelect/FlatSelectList/FlatSelectList.d.ts +1 -1
  290. package/__internal__/src/components/FlatSelect/FlatSelectList/FlatSelectList.js.map +1 -1
  291. package/__internal__/src/components/Grid/types.d.ts +4 -4
  292. package/__internal__/src/components/Grid/types.js.map +1 -1
  293. package/__internal__/src/components/GridDeprecated/Grid.css +1 -1
  294. package/__internal__/src/components/GridDeprecated/GridDeprecated.d.ts +4 -4
  295. package/__internal__/src/components/GridDeprecated/GridDeprecated.js.map +1 -1
  296. package/__internal__/src/components/Informer/Informer.d.ts +3 -3
  297. package/__internal__/src/components/Informer/Informer.js.map +1 -1
  298. package/__internal__/src/components/Layout/Layout.d.ts +3 -3
  299. package/__internal__/src/components/Layout/Layout.js.map +1 -1
  300. package/__internal__/src/components/Layout/useFixed.d.ts +2 -2
  301. package/__internal__/src/components/Layout/useFixed.js.map +1 -1
  302. package/__internal__/src/components/ListCanary/ListCanary.js.map +1 -1
  303. package/__internal__/src/components/ListCanary/ListItemGrid/ListItemGrid.css +1 -1
  304. package/__internal__/src/components/ListCanary/types.d.ts +4 -4
  305. package/__internal__/src/components/ListCanary/types.js.map +1 -1
  306. package/__internal__/src/components/LoaderDeprecated/Loader.css +2 -2
  307. package/__internal__/src/components/LoaderDeprecated/LoaderDeprecated.d.ts +1 -1
  308. package/__internal__/src/components/LoaderDeprecated/LoaderDeprecated.js.map +1 -1
  309. package/__internal__/src/components/Modal/ModalLayout/ModalLayout.css +4 -4
  310. package/__internal__/src/components/ModalDeprecated/ModalDeprecated.d.ts +2 -2
  311. package/__internal__/src/components/ModalDeprecated/ModalDeprecated.js.map +1 -1
  312. package/__internal__/src/components/Notification/helpers/defaultDateFormat.js +1 -1
  313. package/__internal__/src/components/Notification/helpers/defaultDateFormat.js.map +1 -1
  314. package/__internal__/src/components/Pagination/types.d.ts +3 -3
  315. package/__internal__/src/components/Pagination/types.js.map +1 -1
  316. package/__internal__/src/components/PaginationDeprecated/PaginationDeprecated.d.ts +4 -4
  317. package/__internal__/src/components/PaginationDeprecated/PaginationDeprecated.js.map +1 -1
  318. package/__internal__/src/components/Popover/Popover.d.ts +2 -2
  319. package/__internal__/src/components/Popover/Popover.js.map +1 -1
  320. package/__internal__/src/components/ProgressLine/ProgressLine.css +1 -1
  321. package/__internal__/src/components/ProgressLine/types.d.ts +1 -1
  322. package/__internal__/src/components/ProgressLine/types.js.map +1 -1
  323. package/__internal__/src/components/ProgressSpin/ProgressSpin.d.ts +1 -1
  324. package/__internal__/src/components/ProgressSpin/ProgressSpin.js.map +1 -1
  325. package/__internal__/src/components/ProgressStepBar/ProgressStepBarItem/ProgressStepBarItem.css +8 -8
  326. package/__internal__/src/components/ProgressStepBar/helpers.d.ts +5 -5
  327. package/__internal__/src/components/ProgressStepBar/helpers.js.map +1 -1
  328. package/__internal__/src/components/Radio/Radio.css +1 -1
  329. package/__internal__/src/components/Radio/Radio.d.ts +3 -3
  330. package/__internal__/src/components/Radio/Radio.js.map +1 -1
  331. package/__internal__/src/components/RadioGroup/types.d.ts +4 -4
  332. package/__internal__/src/components/RadioGroup/types.js.map +1 -1
  333. package/__internal__/src/components/Responses/Responses.d.ts +1 -1
  334. package/__internal__/src/components/Responses/Responses.js.map +1 -1
  335. package/__internal__/src/components/SelectCanary/SelectDropdown/SelectDropdown.d.ts +1 -1
  336. package/__internal__/src/components/SelectCanary/SelectDropdown/SelectDropdown.js.map +1 -1
  337. package/__internal__/src/components/SelectCanary/SelectMultiple/SelectMultiple.css +2 -2
  338. package/__internal__/src/components/SelectCanary/SelectPopover/SelectPopover.d.ts +1 -1
  339. package/__internal__/src/components/SelectCanary/SelectPopover/SelectPopover.js.map +1 -1
  340. package/__internal__/src/components/SelectCanary/helpers.d.ts +1 -1
  341. package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.d.ts +1 -1
  342. package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.js.map +1 -1
  343. package/__internal__/src/components/SelectComponents/SelectValueTag/SelectValueTag.css +1 -1
  344. package/__internal__/src/components/SelectComponents/types.d.ts +4 -4
  345. package/__internal__/src/components/SelectComponents/types.js.map +1 -1
  346. package/__internal__/src/components/SelectComponents/useSelect/useSelect.js +1 -1
  347. package/__internal__/src/components/SelectComponents/useSelect/useSelect.js.map +1 -1
  348. package/__internal__/src/components/SelectComponentsDeprecated/SelectDropdown/SelectDropdown.d.ts +1 -1
  349. package/__internal__/src/components/SelectComponentsDeprecated/SelectDropdown/SelectDropdown.js.map +1 -1
  350. package/__internal__/src/components/SelectComponentsDeprecated/SelectValueTag/SelectValueTag.css +1 -1
  351. package/__internal__/src/components/SelectComponentsDeprecated/types.d.ts +4 -4
  352. package/__internal__/src/components/SelectComponentsDeprecated/types.js.map +1 -1
  353. package/__internal__/src/components/Sidebar/types.d.ts +2 -2
  354. package/__internal__/src/components/Sidebar/types.js.map +1 -1
  355. package/__internal__/src/components/SidebarDeprecated/SidebarDeprecated.d.ts +2 -2
  356. package/__internal__/src/components/SidebarDeprecated/SidebarDeprecated.js.map +1 -1
  357. package/__internal__/src/components/Skeleton/Skeleton.css +1 -1
  358. package/__internal__/src/components/Slider/helper.d.ts +2 -2
  359. package/__internal__/src/components/Slider/helper.js.map +1 -1
  360. package/__internal__/src/components/SnackBar/types.d.ts +4 -4
  361. package/__internal__/src/components/SnackBar/types.js.map +1 -1
  362. package/__internal__/src/components/Spoiler/types.d.ts +2 -2
  363. package/__internal__/src/components/Spoiler/types.js.map +1 -1
  364. package/__internal__/src/components/Steps/StepsStep/StepsStep.css +1 -1
  365. package/__internal__/src/components/Steps/types.d.ts +1 -1
  366. package/__internal__/src/components/Steps/types.js.map +1 -1
  367. package/__internal__/src/components/Switch/Switch.css +1 -1
  368. package/__internal__/src/components/Switch/types.d.ts +3 -3
  369. package/__internal__/src/components/Switch/types.js.map +1 -1
  370. package/__internal__/src/components/SwitchGroup/types.d.ts +1 -1
  371. package/__internal__/src/components/SwitchGroup/types.js.map +1 -1
  372. package/__internal__/src/components/Table/Cell/TableCell.css +1 -1
  373. package/__internal__/src/components/Table/Cell/TableCell.d.ts +2 -2
  374. package/__internal__/src/components/Table/Cell/TableCell.js.map +1 -1
  375. package/__internal__/src/components/Table/Header/TableHeader.d.ts +1 -1
  376. package/__internal__/src/components/Table/Header/TableHeader.js.map +1 -1
  377. package/__internal__/src/components/Table/Table.d.ts +3 -3
  378. package/__internal__/src/components/Table/Table.js.map +1 -1
  379. package/__internal__/src/components/Table/__mock__/data.mock.d.ts +10 -10
  380. package/__internal__/src/components/Table/__mock__/data.mock.js.map +1 -1
  381. package/__internal__/src/components/Table/helpers.d.ts +1 -1
  382. package/__internal__/src/components/Table/helpers.js.map +1 -1
  383. package/__internal__/src/components/Tabs/Tabs.js.map +1 -1
  384. package/__internal__/src/components/Tabs/types.d.ts +4 -4
  385. package/__internal__/src/components/Tabs/types.js.map +1 -1
  386. package/__internal__/src/components/Tag/Tag.d.ts +1 -1
  387. package/__internal__/src/components/Tag/Tag.js.map +1 -1
  388. package/__internal__/src/components/TagBase/TagBase.d.ts +3 -3
  389. package/__internal__/src/components/TagBase/TagBase.js.map +1 -1
  390. package/__internal__/src/components/Text/Text.d.ts +13 -13
  391. package/__internal__/src/components/Text/Text.js.map +1 -1
  392. package/__internal__/src/components/TextAreaAutoSize/TextAreaAutoSize.css +1 -1
  393. package/__internal__/src/components/TextDeprecated/TextDeprecated.d.ts +13 -13
  394. package/__internal__/src/components/TextDeprecated/TextDeprecated.js.map +1 -1
  395. package/__internal__/src/components/TextField/types.d.ts +4 -4
  396. package/__internal__/src/components/TextField/types.js.map +1 -1
  397. package/__internal__/src/components/TextFieldCanary/TextFieldTypeNumber/TextFieldTypeNumber.js +1 -1
  398. package/__internal__/src/components/TextFieldCanary/TextFieldTypeNumber/TextFieldTypeNumber.js.map +1 -1
  399. package/__internal__/src/components/TextFieldCanary/TextFieldTypeTextArea/TextFieldTypeTextArea.css +2 -2
  400. package/__internal__/src/components/TextFieldCanary/useTextField.js.map +1 -1
  401. package/__internal__/src/components/ThemeToggler/ThemeToggler.js.map +1 -1
  402. package/__internal__/src/components/ThemeToggler/types.d.ts +1 -1
  403. package/__internal__/src/components/ThemeToggler/types.js.map +1 -1
  404. package/__internal__/src/components/Timer/Timer.d.ts +1 -1
  405. package/__internal__/src/components/Timer/Timer.js.map +1 -1
  406. package/__internal__/src/components/Tooltip/types.d.ts +2 -2
  407. package/__internal__/src/components/Tooltip/types.js.map +1 -1
  408. package/__internal__/src/components/TooltipDeprecated/TooltipDeprecated.d.ts +2 -2
  409. package/__internal__/src/components/TooltipDeprecated/TooltipDeprecated.js.map +1 -1
  410. package/__internal__/src/components/User/User.css +1 -1
  411. package/__internal__/src/components/User/User.d.ts +4 -4
  412. package/__internal__/src/components/User/User.js.map +1 -1
  413. package/__internal__/src/components/UserSelect/UserSelectItem/UserSelectItem.css +1 -1
  414. package/__internal__/src/fileIcons/FileIcon/FileIcon.d.ts +1 -1
  415. package/__internal__/src/fileIcons/FileIcon/FileIcon.js.map +1 -1
  416. package/__internal__/src/hocs/withTooltip/withTooltip.d.ts +1 -1
  417. package/__internal__/src/hocs/withTooltip/withTooltip.js.map +1 -1
  418. package/__internal__/src/hooks/useBreakpointsDeprecated/useBreakpointsDeprecated.d.ts +1 -1
  419. package/__internal__/src/hooks/useBreakpointsDeprecated/useBreakpointsDeprecated.js.map +1 -1
  420. package/__internal__/src/hooks/useRefs/useRefs.js.map +1 -1
  421. package/__internal__/src/hooks/useStyleProps/types.js.map +1 -1
  422. package/__internal__/src/mixs/MixCard/MixCard.d.ts +2 -2
  423. package/__internal__/src/mixs/MixCard/MixCard.js.map +1 -1
  424. package/__internal__/src/mixs/MixFlex/MixFlex.d.ts +5 -5
  425. package/__internal__/src/mixs/MixFlex/MixFlex.js.map +1 -1
  426. package/__internal__/src/mixs/MixScrollBar/MixScrollBar.d.ts +2 -2
  427. package/__internal__/src/mixs/MixScrollBar/MixScrollBar.js.map +1 -1
  428. package/__internal__/src/mixs/MixVisuallyHidden/MixVisuallyHidden.css +1 -1
  429. package/__internal__/src/utils/array.js.map +1 -1
  430. package/__internal__/src/utils/date/index.js +1 -1
  431. package/__internal__/src/utils/date/index.js.map +1 -1
  432. package/package.json +2 -2
@@ -0,0 +1 @@
1
+ export * from "../__internal__/src/components/ColorPicker";
@@ -0,0 +1 @@
1
+ export * from "../__internal__/src/components/ColorPicker";
@@ -1 +1 @@
1
- .Attachment{--attachment-file-opacity:1;--attachment-actions-opacity:0;background:var(--color-control-bg-clear);border-radius:var(--control-radius);box-sizing:border-box;padding:var(--space-xs);text-decoration:none;transition:background-color .2s ease;width:100%}.Attachment_hoverEffect:hover{--attachment-actions-opacity:1;background:var(--color-control-bg-clear-hover)}.Attachment_cursor_pointer{cursor:pointer}.Attachment_error{--attachment-file-opacity:0.4}.Attachment-Actions,.Attachment-File{flex:none;transition:opacity .2s ease}.Attachment-File{opacity:var(--attachment-file-opacity)}.Attachment-Actions{opacity:var(--attachment-actions-opacity)}.Attachment-Content{flex:1;overflow:hidden}.Attachment-ErrorText,.Attachment-FileDescription,.Attachment-FileName,.Attachment-LoadingText{word-wrap:break-word;width:100%}
1
+ .Attachment{--attachment-file-opacity:1;--attachment-actions-opacity:0;background:var(--color-control-bg-clear);border-radius:var(--control-radius);box-sizing:border-box;padding:var(--space-xs);text-decoration:none;transition:background-color .2s ease;width:100%}.Attachment_hoverEffect:hover{--attachment-actions-opacity:1;background:var(--color-control-bg-clear-hover)}.Attachment_cursor_pointer{cursor:pointer}.Attachment_error{--attachment-file-opacity:0.4}.Attachment-Actions,.Attachment-File{flex:none;transition:opacity .2s ease}.Attachment-File{opacity:var(--attachment-file-opacity)}.Attachment-Actions{opacity:var(--attachment-actions-opacity)}.Attachment-Content{flex:1;overflow:hidden}.Attachment-ErrorText,.Attachment-FileDescription,.Attachment-FileName,.Attachment-LoadingText{overflow-wrap:break-word;width:100%}
@@ -1,7 +1,7 @@
1
1
  import { IconComponent } from '@consta/icons/Icon';
2
2
  import React from 'react';
3
3
  export declare const attachmentPropSize: readonly ["s", "xs", "m"];
4
- export type AttachmentPropSize = typeof attachmentPropSize[number];
4
+ export type AttachmentPropSize = (typeof attachmentPropSize)[number];
5
5
  export declare const attachmentPropSizeDefault: AttachmentPropSize;
6
6
  export type AttachmentActions = {
7
7
  onClick: React.MouseEventHandler<HTMLButtonElement>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["attachmentPropSize","attachmentPropSizeDefault"],"sources":["../../../../../src/components/Attachment/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\nimport React from 'react';\n\nexport const attachmentPropSize = ['s', 'xs', 'm'] as const;\nexport type AttachmentPropSize = typeof attachmentPropSize[number];\nexport const attachmentPropSizeDefault: AttachmentPropSize =\n attachmentPropSize[0];\n\nexport type AttachmentActions = {\n onClick: React.MouseEventHandler<HTMLButtonElement>;\n icon: IconComponent;\n title?: string;\n ref?: React.Ref<HTMLButtonElement>;\n};\n\nexport type AttachmentProps = {\n fileExtension?: string;\n withPictogram?: boolean;\n loading?: boolean;\n fileName?: string;\n fileDescription?: string;\n loadingProgress?: number;\n errorText?: string;\n size?: AttachmentPropSize;\n loadingText?: string;\n className?: string;\n children?: never;\n actions?: AttachmentActions[];\n /**\n * @deprecated use actions or onClick\n */\n withAction?: boolean;\n /**\n * @deprecated use actions\n */\n onButtonClick?: React.EventHandler<React.MouseEvent>;\n /**\n * @deprecated use actions\n */\n buttonIcon?: IconComponent;\n /**\n * @deprecated use actions\n */\n buttonTitle?: string;\n};\n"],"mappings":"AAGA,MAAO,IAAMA,mBAAkB,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAA3B,CAEP,MAAO,IAAMC,0BAA6C,CACxDD,kBAAkB,CAAC,CAAD,CADb"}
1
+ {"version":3,"file":"types.js","names":["attachmentPropSize","attachmentPropSizeDefault"],"sources":["../../../../../src/components/Attachment/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\nimport React from 'react';\n\nexport const attachmentPropSize = ['s', 'xs', 'm'] as const;\nexport type AttachmentPropSize = (typeof attachmentPropSize)[number];\nexport const attachmentPropSizeDefault: AttachmentPropSize =\n attachmentPropSize[0];\n\nexport type AttachmentActions = {\n onClick: React.MouseEventHandler<HTMLButtonElement>;\n icon: IconComponent;\n title?: string;\n ref?: React.Ref<HTMLButtonElement>;\n};\n\nexport type AttachmentProps = {\n fileExtension?: string;\n withPictogram?: boolean;\n loading?: boolean;\n fileName?: string;\n fileDescription?: string;\n loadingProgress?: number;\n errorText?: string;\n size?: AttachmentPropSize;\n loadingText?: string;\n className?: string;\n children?: never;\n actions?: AttachmentActions[];\n /**\n * @deprecated use actions or onClick\n */\n withAction?: boolean;\n /**\n * @deprecated use actions\n */\n onButtonClick?: React.EventHandler<React.MouseEvent>;\n /**\n * @deprecated use actions\n */\n buttonIcon?: IconComponent;\n /**\n * @deprecated use actions\n */\n buttonTitle?: string;\n};\n"],"mappings":"AAGA,MAAO,IAAMA,mBAAkB,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAA3B,CAEP,MAAO,IAAMC,0BAA6C,CACxDD,kBAAkB,CAAC,CAAD,CADb"}
@@ -1 +1 @@
1
- .deprecated--Attachment{background:var(--color-control-bg-clear);border-radius:var(--control-radius);box-sizing:border-box;display:flex;flex-direction:row;padding:var(--space-xs);text-decoration:none;transition:background-color .2s ease;width:100%}.deprecated--Attachment-File{flex:none;margin-right:var(--space-xs);transition:opacity .2s}.deprecated--Attachment-File_error{opacity:.4}.deprecated--Attachment-Button{flex:none;opacity:0;transition:opacity .2s ease}.deprecated--Attachment-Content{word-wrap:break-word;flex:1;overflow:hidden}.deprecated--Attachment-Content>.Text:not(:first-child){margin-top:var(--space-2xs)}.deprecated--Attachment-Content:not(:last-child){margin-right:var(--space-xs)}.deprecated--Attachment_withAction{cursor:pointer}.deprecated--Attachment_withAction:hover{background:var(--color-control-bg-clear-hover)}.deprecated--Attachment_withOnButtonAction:hover .deprecated--Attachment_withOnButtonAction-Button{opacity:1}.deprecated--Attachment_withOnButtonAction:hover{background:var(--color-control-bg-clear-hover)}.deprecated--Attachment_withOnButtonAction:hover .deprecated--Attachment-Button{opacity:1}
1
+ .deprecated--Attachment{background:var(--color-control-bg-clear);border-radius:var(--control-radius);box-sizing:border-box;display:flex;flex-direction:row;padding:var(--space-xs);text-decoration:none;transition:background-color .2s ease;width:100%}.deprecated--Attachment-File{flex:none;margin-right:var(--space-xs);transition:opacity .2s}.deprecated--Attachment-File_error{opacity:.4}.deprecated--Attachment-Button{flex:none;opacity:0;transition:opacity .2s ease}.deprecated--Attachment-Content{flex:1;overflow:hidden;overflow-wrap:break-word}.deprecated--Attachment-Content>.Text:not(:first-child){margin-top:var(--space-2xs)}.deprecated--Attachment-Content:not(:last-child){margin-right:var(--space-xs)}.deprecated--Attachment_withAction{cursor:pointer}.deprecated--Attachment_withAction:hover{background:var(--color-control-bg-clear-hover)}.deprecated--Attachment_withOnButtonAction:hover .deprecated--Attachment_withOnButtonAction-Button{opacity:1}.deprecated--Attachment_withOnButtonAction:hover{background:var(--color-control-bg-clear-hover)}.deprecated--Attachment_withOnButtonAction:hover .deprecated--Attachment-Button{opacity:1}
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentDeprecated.js","names":["React","cnDeprecated","forwardRefWithAs","Button","File","Text","attachmentPropSizeDefault","cnAttachment","fileSizeMap","xs","s","m","textSizeMap","descriptionSizeMap","Attachment","props","ref","className","as","fileExtension","loading","fileName","buttonIcon","onButtonClick","errorText","loadingText","loadingProgress","fileDescription","size","onClick","withActionProp","withAction","buttonTitle","otherProps","withOnButtonAction","error"],"sources":["../../../../../src/components/AttachmentDeprecated/AttachmentDeprecated.tsx"],"sourcesContent":["import './Attachment.css';\n\nimport React from 'react';\n\nimport { FileIconPropSize } from '##/fileIcons/FileIcon/FileIcon';\n\nimport { cnDeprecated } from '../../utils/bem';\nimport { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';\nimport { Button } from '../Button/Button';\nimport { File } from '../File/File';\nimport { Text, TextPropSize } from '../Text/Text';\nimport {\n AttachmentProps,\n AttachmentPropSize,\n attachmentPropSizeDefault,\n} from './types';\n\nconst cnAttachment = cnDeprecated('Attachment');\n\nconst fileSizeMap: Record<AttachmentPropSize, FileIconPropSize> = {\n xs: 's',\n s: 's',\n m: 'm',\n};\n\nconst textSizeMap: Record<AttachmentPropSize, TextPropSize> = {\n xs: 'xs',\n s: 's',\n m: 's',\n};\n\nconst descriptionSizeMap: Record<AttachmentPropSize, TextPropSize> = {\n xs: 'xs',\n s: 'xs',\n m: 's',\n};\nconst Attachment = forwardRefWithAs<AttachmentProps>((props, ref) => {\n const {\n className,\n as = 'div',\n fileExtension,\n loading,\n fileName,\n buttonIcon,\n onButtonClick,\n errorText,\n loadingText = 'Loading',\n loadingProgress,\n fileDescription,\n size = attachmentPropSizeDefault,\n onClick,\n withAction: withActionProp,\n buttonTitle,\n ...otherProps\n } = props;\n const Tag = as as string;\n const withAction = withActionProp || Boolean(onClick);\n const withOnButtonAction = Boolean(onButtonClick);\n\n return (\n <Tag\n {...otherProps}\n onClick={onClick}\n className={cnAttachment({ withAction, withOnButtonAction, size }, [\n className,\n ])}\n ref={ref}\n >\n <File\n className={cnAttachment('File', { error: Boolean(errorText) })}\n extension={fileExtension}\n loading={loading}\n loadingWithProgressSpin\n loadingProgress={loadingProgress}\n size={fileSizeMap[size]}\n />\n <div className={cnAttachment('Content')}>\n {fileName && (\n <Text\n className={cnAttachment('FileName')}\n size={textSizeMap[size]}\n view=\"primary\"\n lineHeight=\"xs\"\n >\n {fileName}\n </Text>\n )}\n {fileDescription && !loading && (\n <Text\n className={cnAttachment('FileDescription')}\n size={descriptionSizeMap[size]}\n lineHeight=\"xs\"\n view=\"ghost\"\n >\n {fileDescription}\n </Text>\n )}\n {loadingText && loading && (\n <Text\n className={cnAttachment('LoadingText')}\n size={descriptionSizeMap[size]}\n lineHeight=\"xs\"\n view=\"ghost\"\n >\n {loadingProgress\n ? `${loadingText} ${loadingProgress}%`\n : `${loadingText}...`}\n </Text>\n )}\n {errorText && (\n <Text\n className={cnAttachment('ErrorText')}\n size={descriptionSizeMap[size]}\n lineHeight=\"xs\"\n view=\"alert\"\n >\n {errorText}\n </Text>\n )}\n </div>\n {withOnButtonAction && (\n <Button\n className={cnAttachment('Button')}\n as=\"span\"\n onlyIcon\n iconLeft={buttonIcon}\n onClick={onButtonClick}\n title={buttonTitle}\n size=\"xs\"\n view=\"clear\"\n />\n )}\n </Tag>\n );\n});\n\nexport { Attachment, cnAttachment };\n"],"mappings":"kSAAA,yBAEA,MAAOA,MAAP,KAAkB,OAAlB,CAIA,OAASC,YAAT,uBACA,OAASC,gBAAT,+CACA,OAAS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b,CAIE,IAAI,CAAC,OAJP,EAMGF,CAAe,WACTD,CADS,aACMC,CADN,gBAETD,CAFS,OANlB,CAtBJ,CAiCGD,CAAS,EACR,oBAAC,IAAD,EACE,SAAS,CAAEjB,YAAY,CAAC,WAAD,CADzB,CAEE,IAAI,CAAEM,kBAAkB,CAACe,CAAD,CAF1B,CAGE,UAAU,CAAC,IAHb,CAIE,IAAI,CAAC,OAJP,EAMGJ,CANH,CAlCJ,CAhBF,CA4DGU,CAAkB,EACjB,oBAAC,MAAD,EACE,SAAS,CAAE3B,YAAY,CAAC,QAAD,CADzB,CAEE,EAAE,CAAC,MAFL,CAGE,QAAQ,GAHV,CAIE,QAAQ,CAAEe,CAJZ,CAKE,OAAO,CAAEC,CALX,CAME,KAAK,CAAES,CANT,CAOE,IAAI,CAAC,IAPP,CAQE,IAAI,CAAC,OARP,EA7DJ,CA0EH,CAlGkC,C,CAoGnC,OAASlB,UAAT,CAAqBP,YAArB"}
1
+ {"version":3,"file":"AttachmentDeprecated.js","names":["React","cnDeprecated","forwardRefWithAs","Button","File","Text","attachmentPropSizeDefault","cnAttachment","fileSizeMap","xs","s","m","textSizeMap","descriptionSizeMap","Attachment","props","ref","className","as","fileExtension","loading","fileName","buttonIcon","onButtonClick","errorText","loadingText","loadingProgress","fileDescription","size","onClick","withActionProp","withAction","buttonTitle","otherProps","withOnButtonAction","error"],"sources":["../../../../../src/components/AttachmentDeprecated/AttachmentDeprecated.tsx"],"sourcesContent":["import './Attachment.css';\n\nimport React from 'react';\n\nimport { FileIconPropSize } from '##/fileIcons/FileIcon/FileIcon';\n\nimport { cnDeprecated } from '../../utils/bem';\nimport { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';\nimport { Button } from '../Button/Button';\nimport { File } from '../File/File';\nimport { Text, TextPropSize } from '../Text/Text';\nimport {\n AttachmentProps,\n AttachmentPropSize,\n attachmentPropSizeDefault,\n} from './types';\n\nconst cnAttachment = cnDeprecated('Attachment');\n\nconst fileSizeMap: Record<AttachmentPropSize, FileIconPropSize> = {\n xs: 's',\n s: 's',\n m: 'm',\n};\n\nconst textSizeMap: Record<AttachmentPropSize, TextPropSize> = {\n xs: 'xs',\n s: 's',\n m: 's',\n};\n\nconst descriptionSizeMap: Record<AttachmentPropSize, TextPropSize> = {\n xs: 'xs',\n s: 'xs',\n m: 's',\n};\n\nconst Attachment = forwardRefWithAs<AttachmentProps>((props, ref) => {\n const {\n className,\n as = 'div',\n fileExtension,\n loading,\n fileName,\n buttonIcon,\n onButtonClick,\n errorText,\n loadingText = 'Loading',\n loadingProgress,\n fileDescription,\n size = attachmentPropSizeDefault,\n onClick,\n withAction: withActionProp,\n buttonTitle,\n ...otherProps\n } = props;\n const Tag = as as string;\n const withAction = withActionProp || Boolean(onClick);\n const withOnButtonAction = Boolean(onButtonClick);\n\n return (\n <Tag\n {...otherProps}\n onClick={onClick}\n className={cnAttachment({ withAction, withOnButtonAction, size }, [\n className,\n ])}\n ref={ref}\n >\n <File\n className={cnAttachment('File', { error: Boolean(errorText) })}\n extension={fileExtension}\n loading={loading}\n loadingWithProgressSpin\n loadingProgress={loadingProgress}\n size={fileSizeMap[size]}\n />\n <div className={cnAttachment('Content')}>\n {fileName && (\n <Text\n className={cnAttachment('FileName')}\n size={textSizeMap[size]}\n view=\"primary\"\n lineHeight=\"xs\"\n >\n {fileName}\n </Text>\n )}\n {fileDescription && !loading && (\n <Text\n className={cnAttachment('FileDescription')}\n size={descriptionSizeMap[size]}\n lineHeight=\"xs\"\n view=\"ghost\"\n >\n {fileDescription}\n </Text>\n )}\n {loadingText && loading && (\n <Text\n className={cnAttachment('LoadingText')}\n size={descriptionSizeMap[size]}\n lineHeight=\"xs\"\n view=\"ghost\"\n >\n {loadingProgress\n ? `${loadingText} ${loadingProgress}%`\n : `${loadingText}...`}\n </Text>\n )}\n {errorText && (\n <Text\n className={cnAttachment('ErrorText')}\n size={descriptionSizeMap[size]}\n lineHeight=\"xs\"\n view=\"alert\"\n >\n {errorText}\n </Text>\n )}\n </div>\n {withOnButtonAction && (\n <Button\n className={cnAttachment('Button')}\n as=\"span\"\n onlyIcon\n iconLeft={buttonIcon}\n onClick={onButtonClick}\n title={buttonTitle}\n size=\"xs\"\n view=\"clear\"\n />\n )}\n </Tag>\n );\n});\n\nexport { Attachment, cnAttachment };\n"],"mappings":"kSAAA,yBAEA,MAAOA,MAAP,KAAkB,OAAlB,CAIA,OAASC,YAAT,uBACA,OAASC,gBAAT,+CACA,OAASC,MAAT,wBACA,OAASC,IAAT,oBACA,OAASC,IAAT,oBACA,OAGEC,yBAHF,e,GAMMC,aAAY,CAAGN,YAAY,CAAC,YAAD,C,CAE3BO,WAAyD,CAAG,CAChEC,EAAE,CAAE,GAD4D,CAEhEC,CAAC,CAAE,GAF6D,CAGhEC,CAAC,CAAE,GAH6D,C,CAM5DC,WAAqD,CAAG,CAC5DH,EAAE,CAAE,IADwD,CAE5DC,CAAC,CAAE,GAFyD,CAG5DC,CAAC,CAAE,GAHyD,C,CAMxDE,kBAA4D,CAAG,CACnEJ,EAAE,CAAE,IAD+D,CAEnEC,CAAC,CAAE,IAFgE,CAGnEC,CAAC,CAAE,GAHgE,C,CAM/DG,UAAU,CAAGZ,gBAAgB,CAAkB,SAACa,CAAD,CAAQC,CAAR,CAAgB,IAEjEC,EAFiE,CAkB/DF,CAlB+D,CAEjEE,SAFiE,GAkB/DF,CAlB+D,CAGjEG,EAHiE,CAGjEA,CAHiE,YAG5D,KAH4D,GAIjEC,CAJiE,CAkB/DJ,CAlB+D,CAIjEI,aAJiE,CAKjEC,CALiE,CAkB/DL,CAlB+D,CAKjEK,OALiE,CAMjEC,CANiE,CAkB/DN,CAlB+D,CAMjEM,QANiE,CAOjEC,CAPiE,CAkB/DP,CAlB+D,CAOjEO,UAPiE,CAQjEC,CARiE,CAkB/DR,CAlB+D,CAQjEQ,aARiE,CASjEC,CATiE,CAkB/DT,CAlB+D,CASjES,SATiE,GAkB/DT,CAlB+D,CAUjEU,WAViE,CAUjEA,CAViE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AAC,iBAAD,CADzB,CAEE,IAAI,CAAEM,kBAAkB,CAACe,CAAD,CAF1B,CAGE,UAAU,CAAC,IAHb,CAIE,IAAI,CAAC,OAJP,EAMGD,CANH,CAZJ,CAqBGF,CAAW,EAAIL,CAAf,EACC,oBAAC,IAAD,EACE,SAAS,CAAEb,YAAY,CAAC,aAAD,CADzB,CAEE,IAAI,CAAEM,kBAAkB,CAACe,CAAD,CAF1B,CAGE,UAAU,CAAC,IAHb,CAIE,IAAI,CAAC,OAJP,EAMGF,CAAe,WACTD,CADS,aACMC,CADN,gBAETD,CAFS,OANlB,CAtBJ,CAiCGD,CAAS,EACR,oBAAC,IAAD,EACE,SAAS,CAAEjB,YAAY,CAAC,WAAD,CADzB,CAEE,IAAI,CAAEM,kBAAkB,CAACe,CAAD,CAF1B,CAGE,UAAU,CAAC,IAHb,CAIE,IAAI,CAAC,OAJP,EAMGJ,CANH,CAlCJ,CAhBF,CA4DGU,CAAkB,EACjB,oBAAC,MAAD,EACE,SAAS,CAAE3B,YAAY,CAAC,QAAD,CADzB,CAEE,EAAE,CAAC,MAFL,CAGE,QAAQ,GAHV,CAIE,QAAQ,CAAEe,CAJZ,CAKE,OAAO,CAAEC,CALX,CAME,KAAK,CAAES,CANT,CAOE,IAAI,CAAC,IAPP,CAQE,IAAI,CAAC,OARP,EA7DJ,CA0EH,CAlGkC,C,CAoGnC,OAASlB,UAAT,CAAqBP,YAArB"}
@@ -1,6 +1,6 @@
1
1
  import { IconComponent } from '@consta/icons/Icon';
2
2
  export declare const attachmentPropSize: readonly ["s", "xs", "m"];
3
- export type AttachmentPropSize = typeof attachmentPropSize[number];
3
+ export type AttachmentPropSize = (typeof attachmentPropSize)[number];
4
4
  export declare const attachmentPropSizeDefault: AttachmentPropSize;
5
5
  export type AttachmentProps = {
6
6
  fileExtension?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["attachmentPropSize","attachmentPropSizeDefault"],"sources":["../../../../../src/components/AttachmentDeprecated/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\n\nexport const attachmentPropSize = ['s', 'xs', 'm'] as const;\nexport type AttachmentPropSize = typeof attachmentPropSize[number];\nexport const attachmentPropSizeDefault: AttachmentPropSize =\n attachmentPropSize[0];\n\nexport type AttachmentProps = {\n fileExtension?: string;\n loading?: boolean;\n fileName?: string;\n fileDescription?: string;\n loadingProgress?: number;\n errorText?: string;\n size?: AttachmentPropSize;\n loadingText?: string;\n onButtonClick?: React.EventHandler<React.MouseEvent>;\n buttonIcon?: IconComponent;\n buttonTitle?: string;\n withAction?: boolean;\n className?: string;\n children?: never;\n};\n"],"mappings":"AAEA,MAAO,IAAMA,mBAAkB,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAA3B,CAEP,MAAO,IAAMC,0BAA6C,CACxDD,kBAAkB,CAAC,CAAD,CADb"}
1
+ {"version":3,"file":"types.js","names":["attachmentPropSize","attachmentPropSizeDefault"],"sources":["../../../../../src/components/AttachmentDeprecated/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\n\nexport const attachmentPropSize = ['s', 'xs', 'm'] as const;\nexport type AttachmentPropSize = (typeof attachmentPropSize)[number];\nexport const attachmentPropSizeDefault: AttachmentPropSize =\n attachmentPropSize[0];\n\nexport type AttachmentProps = {\n fileExtension?: string;\n loading?: boolean;\n fileName?: string;\n fileDescription?: string;\n loadingProgress?: number;\n errorText?: string;\n size?: AttachmentPropSize;\n loadingText?: string;\n onButtonClick?: React.EventHandler<React.MouseEvent>;\n buttonIcon?: IconComponent;\n buttonTitle?: string;\n withAction?: boolean;\n className?: string;\n children?: never;\n};\n"],"mappings":"AAEA,MAAO,IAAMA,mBAAkB,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAA3B,CAEP,MAAO,IAAMC,0BAA6C,CACxDD,kBAAkB,CAAC,CAAD,CADb"}
@@ -1,9 +1,9 @@
1
1
  import './Avatar.css';
2
2
  export declare const avatarPropSize: readonly ["m", "s", "xs", "l"];
3
- export type AvatarPropSize = typeof avatarPropSize[number];
3
+ export type AvatarPropSize = (typeof avatarPropSize)[number];
4
4
  export declare const avatarPropSizeDefault: AvatarPropSize;
5
5
  export declare const avatarPropForm: readonly ["round", "brick", "default"];
6
- export type AvatarPropForm = typeof avatarPropForm[number];
6
+ export type AvatarPropForm = (typeof avatarPropForm)[number];
7
7
  export declare const avatarPropFormDefault: AvatarPropForm;
8
8
  type Props = {
9
9
  url?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.js","names":["React","useMemo","cn","forwardRefWithAs","getColorIndexForName","getInitialsForName","MAX_COLOR_INDEX","avatarPropSize","avatarPropSizeDefault","avatarPropForm","avatarPropFormDefault","cnAvatar","Avatar","props","ref","as","className","size","form","url","name","monochrome","style","otherProps","initials","colorIndex"],"sources":["../../../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import './Avatar.css';\n\nimport React, { useMemo } from 'react';\n\nimport { cn } from '../../utils/bem';\nimport { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';\nimport {\n getColorIndexForName,\n getInitialsForName,\n MAX_COLOR_INDEX,\n} from './helpers';\n\nexport const avatarPropSize = ['m', 's', 'xs', 'l'] as const;\nexport type AvatarPropSize = typeof avatarPropSize[number];\nexport const avatarPropSizeDefault: AvatarPropSize = avatarPropSize[0];\n\nexport const avatarPropForm = ['round', 'brick', 'default'] as const;\nexport type AvatarPropForm = typeof avatarPropForm[number];\nexport const avatarPropFormDefault: AvatarPropForm = avatarPropForm[0];\n\ntype Props = {\n url?: string;\n name?: string;\n size?: AvatarPropSize;\n form?: AvatarPropForm;\n children?: never;\n monochrome?: boolean;\n};\n\nexport const cnAvatar = cn('Avatar');\n\nexport const Avatar = forwardRefWithAs<Props>((props, ref) => {\n const {\n as = 'div',\n className,\n size = avatarPropSizeDefault,\n form = avatarPropFormDefault,\n url,\n name,\n monochrome,\n style,\n ...otherProps\n } = props;\n const Tag = as as string;\n const initials = useMemo(() => getInitialsForName(name), [name]);\n const colorIndex = useMemo(\n () => getColorIndexForName(name, MAX_COLOR_INDEX, monochrome),\n [name, monochrome],\n );\n\n return (\n <Tag\n {...otherProps}\n style={\n !url\n ? { ...style, '--avatar-color': `var(--avatar-color-${colorIndex})` }\n : style\n }\n className={cnAvatar(\n { size, form, monochrome: url ? monochrome : undefined },\n [className],\n )}\n ref={ref}\n >\n {url && <img className={cnAvatar('Image')} src={url} alt={name} />}\n {!url && initials}\n </Tag>\n );\n});\n"],"mappings":"20BAAA,qBAEA,MAAOA,MAAP,EAAgBC,OAAhB,KAA+B,OAA/B,CAEA,OAASC,EAAT,uBACA,OAASC,gBAAT,+CACA,OACEC,oBADF,CAEEC,kBAFF,CAGEC,eAHF,iBAMA,MAAO,IAAMC,eAAc,CAAG,CAAC,GAAD,CAAM,GAAN,CAAW,IAAX,CAAiB,GAAjB,CAAvB,CAEP,MAAO,IAAMC,sBAAqC,CAAGD,cAAc,CAAC,CAAD,CAA5D,CAEP,MAAO,IAAME,eAAc,CAAG,CAAC,OAAD,CAAU,OAAV,CAAmB,SAAnB,CAAvB,CAEP,MAAO,IAAMC,sBAAqC,CAAGD,cAAc,CAAC,CAAD,CAA5D,CAWP,MAAO,IAAME,SAAQ,CAAGT,EAAE,CAAC,QAAD,CAAnB,CAEP,MAAO,IAAMU,OAAM,CAAGT,gBAAgB,CAAQ,SAACU,CAAD,CAAQC,CAAR,CAAgB,OAWxDD,CAXwD,CAE1DE,EAF0D,CAE1DA,CAF0D,YAErD,KAFqD,GAG1DC,CAH0D,CAWxDH,CAXwD,CAG1DG,SAH0D,GAWxDH,CAXwD,CAI1DI,IAJ0D,CAI1DA,CAJ0D,YAInDT,qBAJmD,KAWxDK,CAXwD,CAK1DK,IAL0D,CAK1DA,CAL0D,YAKnDR,qBALmD,GAM1DS,CAN0D,CAWxDN,CAXwD,CAM1DM,GAN0D,CAO1DC,CAP0D,CAWxDP,CAXwD,CAO1DO,IAP0D,CAQ1DC,CAR0D,CAWxDR,CAXwD,CAQ1DQ,UAR0D,CAS1DC,CAT0D,CAWxDT,CAXwD,CAS1DS,KAT0D,CAUvDC,CAVuD,0BAWxDV,CAXwD,YAatDW,CAAQ,CAAGvB,OAAO,CAAC,iBAAMI,mBAAkB,CAACe,CAAD,CAAxB,CAAD,CAAiC,CAACA,CAAD,CAAjC,CAboC,CActDK,CAAU,CAAGxB,OAAO,CACxB,iBAAMG,qBAAoB,CAACgB,CAAD,CAAOd,eAAP,CAAwBe,CAAxB,CAA1B,CADwB,CAExB,CAACD,CAAD,CAAOC,CAAP,CAFwB,CAdkC,CAmB5D,MACE,qBARUN,CAQV,kBACMQ,CADN,EAEE,KAAK,CACFJ,CAAD,CAEIG,CAFJ,gCACSA,CADT,MACgB,8CAAwCG,CAAxC,KADhB,EAHJ,CAOE,SAAS,CAAEd,QAAQ,CACjB,CAAEM,IAAI,CAAJA,CAAF,CAAQC,IAAI,CAAJA,CAAR,CAAcG,UAAU,CAAEF,CAAG,CAAGE,CAAH,OAA7B,CADiB,CAEjB,CAACL,CAAD,CAFiB,CAPrB,CAWE,GAAG,CAAEF,CAXP,GAaGK,CAAG,EAAI,2BAAK,SAAS,CAAER,QAAQ,CAAC,OAAD,CAAxB,CAAmC,GAAG,CAAEQ,CAAxC,CAA6C,GAAG,CAAEC,CAAlD,EAbV,CAcG,CAACD,CAAD,EAAQK,CAdX,CAiBH,CArCqC,CAA/B"}
1
+ {"version":3,"file":"Avatar.js","names":["React","useMemo","cn","forwardRefWithAs","getColorIndexForName","getInitialsForName","MAX_COLOR_INDEX","avatarPropSize","avatarPropSizeDefault","avatarPropForm","avatarPropFormDefault","cnAvatar","Avatar","props","ref","as","className","size","form","url","name","monochrome","style","otherProps","initials","colorIndex"],"sources":["../../../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import './Avatar.css';\n\nimport React, { useMemo } from 'react';\n\nimport { cn } from '../../utils/bem';\nimport { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';\nimport {\n getColorIndexForName,\n getInitialsForName,\n MAX_COLOR_INDEX,\n} from './helpers';\n\nexport const avatarPropSize = ['m', 's', 'xs', 'l'] as const;\nexport type AvatarPropSize = (typeof avatarPropSize)[number];\nexport const avatarPropSizeDefault: AvatarPropSize = avatarPropSize[0];\n\nexport const avatarPropForm = ['round', 'brick', 'default'] as const;\nexport type AvatarPropForm = (typeof avatarPropForm)[number];\nexport const avatarPropFormDefault: AvatarPropForm = avatarPropForm[0];\n\ntype Props = {\n url?: string;\n name?: string;\n size?: AvatarPropSize;\n form?: AvatarPropForm;\n children?: never;\n monochrome?: boolean;\n};\n\nexport const cnAvatar = cn('Avatar');\n\nexport const Avatar = forwardRefWithAs<Props>((props, ref) => {\n const {\n as = 'div',\n className,\n size = avatarPropSizeDefault,\n form = avatarPropFormDefault,\n url,\n name,\n monochrome,\n style,\n ...otherProps\n } = props;\n const Tag = as as string;\n const initials = useMemo(() => getInitialsForName(name), [name]);\n const colorIndex = useMemo(\n () => getColorIndexForName(name, MAX_COLOR_INDEX, monochrome),\n [name, monochrome],\n );\n\n return (\n <Tag\n {...otherProps}\n style={\n !url\n ? { ...style, '--avatar-color': `var(--avatar-color-${colorIndex})` }\n : style\n }\n className={cnAvatar(\n { size, form, monochrome: url ? monochrome : undefined },\n [className],\n )}\n ref={ref}\n >\n {url && <img className={cnAvatar('Image')} src={url} alt={name} />}\n {!url && initials}\n </Tag>\n );\n});\n"],"mappings":"20BAAA,qBAEA,MAAOA,MAAP,EAAgBC,OAAhB,KAA+B,OAA/B,CAEA,OAASC,EAAT,uBACA,OAASC,gBAAT,+CACA,OACEC,oBADF,CAEEC,kBAFF,CAGEC,eAHF,iBAMA,MAAO,IAAMC,eAAc,CAAG,CAAC,GAAD,CAAM,GAAN,CAAW,IAAX,CAAiB,GAAjB,CAAvB,CAEP,MAAO,IAAMC,sBAAqC,CAAGD,cAAc,CAAC,CAAD,CAA5D,CAEP,MAAO,IAAME,eAAc,CAAG,CAAC,OAAD,CAAU,OAAV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CAPrB,CAWE,GAAG,CAAEF,CAXP,GAaGK,CAAG,EAAI,2BAAK,SAAS,CAAER,QAAQ,CAAC,OAAD,CAAxB,CAAmC,GAAG,CAAEQ,CAAxC,CAA6C,GAAG,CAAEC,CAAlD,EAbV,CAcG,CAACD,CAAD,EAAQK,CAdX,CAiBH,CArCqC,CAA/B"}
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
2
  import { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';
3
3
  export declare const avatarGroupPropSize: readonly ["m", "s", "xs", "l"];
4
- export type AvatarGroupPropSize = typeof avatarGroupPropSize[number];
4
+ export type AvatarGroupPropSize = (typeof avatarGroupPropSize)[number];
5
5
  export declare const avatarGroupPropSizeDefault: AvatarGroupPropSize;
6
6
  export declare const avatarGroupPropForm: readonly ["round", "brick", "default"];
7
- export type AvatarGroupPropForm = typeof avatarGroupPropForm[number];
7
+ export type AvatarGroupPropForm = (typeof avatarGroupPropForm)[number];
8
8
  export declare const avatarGroupPropFormDefault: AvatarGroupPropForm;
9
9
  export type AvatarGroupDefaultItem = {
10
10
  url?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["avatarGroupPropSize","avatarGroupPropSizeDefault","avatarGroupPropForm","avatarGroupPropFormDefault"],"sources":["../../../../../src/components/AvatarGroup/types.ts"],"sourcesContent":["import React from 'react';\n\nimport { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\n\nexport const avatarGroupPropSize = ['m', 's', 'xs', 'l'] as const;\nexport type AvatarGroupPropSize = typeof avatarGroupPropSize[number];\nexport const avatarGroupPropSizeDefault: AvatarGroupPropSize =\n avatarGroupPropSize[0];\n\nexport const avatarGroupPropForm = ['round', 'brick', 'default'] as const;\nexport type AvatarGroupPropForm = typeof avatarGroupPropForm[number];\nexport const avatarGroupPropFormDefault: AvatarGroupPropForm =\n avatarGroupPropForm[0];\n\nexport type AvatarGroupDefaultItem = {\n url?: string;\n name?: string;\n};\n\nexport type AvatarGroupPropGetItemUrl<ITEM> = (\n item: ITEM,\n) => string | undefined;\nexport type AvatarGroupPropGetItemName<ITEM> = (\n item: ITEM,\n) => string | undefined;\n\nexport type AvatarGroupProps<ITEM = AvatarGroupDefaultItem> =\n PropsWithHTMLAttributesAndRef<\n {\n children?: never;\n items?: ITEM[];\n visibleCount?: number | 'auto';\n getItemUrl?: AvatarGroupPropGetItemUrl<ITEM>;\n getItemName?: AvatarGroupPropGetItemName<ITEM>;\n size?: AvatarGroupPropSize;\n form?: AvatarGroupPropForm;\n monochrome?: boolean;\n },\n HTMLDivElement\n >;\n\nexport type AvatarGroupComponent = <ITEM = AvatarGroupDefaultItem>(\n props: AvatarGroupProps<ITEM>,\n) => React.ReactNode | null;\n"],"mappings":"AAIA,MAAO,IAAMA,oBAAmB,CAAG,CAAC,GAAD,CAAM,GAAN,CAAW,IAAX,CAAiB,GAAjB,CAA5B,CAEP,MAAO,IAAMC,2BAA+C,CAC1DD,mBAAmB,CAAC,CAAD,CADd,CAGP,MAAO,IAAME,oBAAmB,CAAG,CAAC,OAAD,CAAU,OAAV,CAAmB,SAAnB,CAA5B,CAEP,MAAO,IAAMC,2BAA+C,CAC1DD,mBAAmB,CAAC,CAAD,CADd"}
1
+ {"version":3,"file":"types.js","names":["avatarGroupPropSize","avatarGroupPropSizeDefault","avatarGroupPropForm","avatarGroupPropFormDefault"],"sources":["../../../../../src/components/AvatarGroup/types.ts"],"sourcesContent":["import React from 'react';\n\nimport { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\n\nexport const avatarGroupPropSize = ['m', 's', 'xs', 'l'] as const;\nexport type AvatarGroupPropSize = (typeof avatarGroupPropSize)[number];\nexport const avatarGroupPropSizeDefault: AvatarGroupPropSize =\n avatarGroupPropSize[0];\n\nexport const avatarGroupPropForm = ['round', 'brick', 'default'] as const;\nexport type AvatarGroupPropForm = (typeof avatarGroupPropForm)[number];\nexport const avatarGroupPropFormDefault: AvatarGroupPropForm =\n avatarGroupPropForm[0];\n\nexport type AvatarGroupDefaultItem = {\n url?: string;\n name?: string;\n};\n\nexport type AvatarGroupPropGetItemUrl<ITEM> = (\n item: ITEM,\n) => string | undefined;\nexport type AvatarGroupPropGetItemName<ITEM> = (\n item: ITEM,\n) => string | undefined;\n\nexport type AvatarGroupProps<ITEM = AvatarGroupDefaultItem> =\n PropsWithHTMLAttributesAndRef<\n {\n children?: never;\n items?: ITEM[];\n visibleCount?: number | 'auto';\n getItemUrl?: AvatarGroupPropGetItemUrl<ITEM>;\n getItemName?: AvatarGroupPropGetItemName<ITEM>;\n size?: AvatarGroupPropSize;\n form?: AvatarGroupPropForm;\n monochrome?: boolean;\n },\n HTMLDivElement\n >;\n\nexport type AvatarGroupComponent = <ITEM = AvatarGroupDefaultItem>(\n props: AvatarGroupProps<ITEM>,\n) => React.ReactNode | null;\n"],"mappings":"AAIA,MAAO,IAAMA,oBAAmB,CAAG,CAAC,GAAD,CAAM,GAAN,CAAW,IAAX,CAAiB,GAAjB,CAA5B,CAEP,MAAO,IAAMC,2BAA+C,CAC1DD,mBAAmB,CAAC,CAAD,CADd,CAGP,MAAO,IAAME,oBAAmB,CAAG,CAAC,OAAD,CAAU,OAAV,CAAmB,SAAnB,CAA5B,CAEP,MAAO,IAAMC,2BAA+C,CAC1DD,mBAAmB,CAAC,CAAD,CADd"}
@@ -1,3 +1,3 @@
1
1
  .Badge{--badge-bg-color-var:var(--badge-bg-color-prop,var(--badge-bg-color));--badge-text-color-var:var(--badge-text-color-prop,var(--badge-text-color));--badge-border-color-var:var(
2
- --badge-border-color-prop,var(--badge-border-color)
3
- );align-items:center;box-sizing:border-box;color:var(--badge-text-color-var);display:inline-flex;flex-wrap:nowrap;font-size:var(--badge-text-size);font-weight:var(--font-weight-text-semibold);gap:var(--space-2xs);height:var(--badge-size);letter-spacing:.05em;line-height:var(--badge-size);padding:0 var(--badge-horizontal-padding);text-decoration:none;text-transform:uppercase;white-space:nowrap}.Badge_form_default{border-radius:var(--control-radius)}.Badge_form_round{border-radius:99em}.Badge_view_filled{background:var(--badge-bg-color-var)}.Badge_view_stroked{box-shadow:inset 0 0 0 1px var(--badge-border-color-var)}.Badge_view_tinted{background:color-mix(in srgb,var(--badge-bg-color-var) var(--badge-degree-mixing),var(--color-bg-default))}.Badge_counter{justify-content:center;padding:0;text-align:center;width:var(--badge-size)}.Badge_minified{background:transparent;border:var(--badge-minified-border-size) solid transparent;border-radius:99em;box-shadow:inset 0 0 0 var(--badge-size) var(--badge-bg-color-var);width:var(--badge-size)}.Badge-Icon{flex:1}
2
+ --badge-border-color-prop,var(--badge-border-color)
3
+ );align-items:center;box-sizing:border-box;color:var(--badge-text-color-var);display:inline-flex;flex-wrap:nowrap;font-size:var(--badge-text-size);font-weight:var(--font-weight-text-semibold);gap:var(--space-2xs);height:var(--badge-size);letter-spacing:.05em;line-height:var(--badge-size);padding:0 var(--badge-horizontal-padding);text-decoration:none;text-transform:uppercase;white-space:nowrap}.Badge_form_default{border-radius:var(--control-radius)}.Badge_form_round{border-radius:99em}.Badge_view_filled{background:var(--badge-bg-color-var)}.Badge_view_stroked{box-shadow:inset 0 0 0 1px var(--badge-border-color-var)}.Badge_view_tinted{background:color-mix(in srgb,var(--badge-bg-color-var) var(--badge-degree-mixing),var(--color-bg-default))}.Badge_counter{justify-content:center;padding:0;text-align:center;width:var(--badge-size)}.Badge_minified{background:transparent;border:var(--badge-minified-border-size) solid transparent;border-radius:99em;box-shadow:inset 0 0 0 var(--badge-size) var(--badge-bg-color-var);width:var(--badge-size)}.Badge-Icon{flex:1}
@@ -1 +1 @@
1
- {"version":3,"file":"maps.js","names":["horizontalPaddingRoundMap","xs","s","m","l","horizontalPaddingDefaultMap","getHorizontalPadding","size","form","minified","sizeMap","sizeMinifiedMap","getSize","textSizeMap","getTextSize","minifiedBorderSizeMap","getMinifiedBorderSize","getBgColor","status","getTextColor","view","getBorderColor","getDegreeMixing"],"sources":["../../../../../src/components/Badge/maps.ts"],"sourcesContent":["import { Space } from '##/mixs/MixSpace';\n\nimport {\n BadgePropForm,\n BadgePropSize,\n BadgePropStatus,\n BadgePropView,\n} from './types';\n\nconst horizontalPaddingRoundMap: Record<BadgePropSize, Space> = {\n xs: 'xs',\n s: 'xs',\n m: 's',\n l: 's',\n};\n\nconst horizontalPaddingDefaultMap: Record<BadgePropSize, Space> = {\n xs: '2xs',\n s: '2xs',\n m: 'xs',\n l: 'xs',\n};\n\nexport const getHorizontalPadding = (\n size: BadgePropSize,\n form: BadgePropForm,\n minified: boolean,\n) => {\n if (minified) {\n return undefined;\n }\n if (form === 'default') {\n return `var(--space-${horizontalPaddingDefaultMap[size]})`;\n }\n return `var(--space-${horizontalPaddingRoundMap[size]})`;\n};\n\nconst sizeMap: Record<BadgePropSize, Space> = {\n xs: 'm',\n s: 'l',\n m: 'xl',\n l: '2xl',\n};\n\nconst sizeMinifiedMap: Record<BadgePropSize, number> = {\n xs: 10,\n s: 16,\n m: 24,\n l: 32,\n};\n\nexport const getSize = (size: BadgePropSize, minified: boolean) => {\n if (minified) {\n return `${sizeMinifiedMap[size]}px`;\n }\n\n return `var(--space-${sizeMap[size]})`;\n};\n\nconst textSizeMap: Record<BadgePropSize, string> = {\n xs: 'calc(var(--size-text-m) / 2)',\n s: 'var(--size-text-2xs)',\n m: 'var(--size-text-xs)',\n l: 'var(--badge-text-size)',\n};\n\nexport const getTextSize = (size: BadgePropSize) => textSizeMap[size];\n\nconst minifiedBorderSizeMap: Record<BadgePropSize, number> = {\n xs: 2,\n s: 3,\n m: 4,\n l: 5,\n};\n\nexport const getMinifiedBorderSize = (size: BadgePropSize, minified: boolean) =>\n minified ? `${minifiedBorderSizeMap[size]}px` : undefined;\n\nexport const getBgColor = (status: BadgePropStatus) =>\n status === 'disabled'\n ? 'var(--color-control-bg-disable)'\n : `var(--color-bg-${status})`;\n\nexport const getTextColor = (status: BadgePropStatus, view: BadgePropView) => {\n if (status === 'disabled') {\n return 'var(--color-control-typo-disable)';\n }\n if (status === 'system') {\n return 'var(--color-typo-secondary)';\n }\n if (view === 'filled') {\n return 'var(--color-typo-primary)';\n }\n return `var(--color-typo-${status})`;\n};\n\nexport const getBorderColor = (\n status: BadgePropStatus,\n view: BadgePropView,\n) => {\n if (view === 'stroked' && status === 'disabled') {\n return 'var(--color-control-bg-border-disable)';\n }\n if (view === 'stroked') {\n return `var(--color-bg-${status})`;\n }\n return undefined;\n};\n\nexport const getDegreeMixing = (\n status: BadgePropStatus,\n view: BadgePropView,\n) => {\n if (view === 'tinted' && status === 'system') {\n return '30%';\n }\n if (view === 'tinted' && status === 'disabled') {\n return '100%';\n }\n if (view === 'tinted') {\n return '10%';\n }\n return undefined;\n};\n"],"mappings":"GASMA,0BAAuD,CAAG,CAC9DC,EAAE,CAAE,IAD0D,CAE9DC,CAAC,CAAE,IAF2D,CAG9DC,CAAC,CAAE,GAH2D,CAI9DC,CAAC,CAAE,GAJ2D,C,CAO1DC,2BAAyD,CAAG,CAChEJ,EAAE,CAAE,KAD4D,CAEhEC,CAAC,CAAE,KAF6D,CAGhEC,CAAC,CAAE,IAH6D,CAIhEC,CAAC,CAAE,IAJ6D,C,CAOlE,MAAO,IAAME,qBAAoB,CAAG,SAClCC,CADkC,CAElCC,CAFkC,CAGlCC,CAHkC,CAI/B,OACCA,EADD,QAIU,SAAT,GAAAD,CAJD,uBAKqBH,2BAA2B,CAACE,CAAD,CALhD,4BAOmBP,yBAAyB,CAACO,CAAD,CAP5C,KAQJ,CAZM,C,GAcDG,QAAqC,CAAG,CAC5CT,EAAE,CAAE,GADwC,CAE5CC,CAAC,CAAE,GAFyC,CAG5CC,CAAC,CAAE,IAHyC,CAI5CC,CAAC,CAAE,KAJyC,C,CAOxCO,eAA8C,CAAG,CACrDV,EAAE,CAAE,EADiD,CAErDC,CAAC,CAAE,EAFkD,CAGrDC,CAAC,CAAE,EAHkD,CAIrDC,CAAC,CAAE,EAJkD,C,CAOvD,MAAO,IAAMQ,QAAO,CAAG,SAACL,CAAD,CAA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EAA4B,QAAX,GAAAF,CADtB,CAEM,KAFN,CAIU,QAAT,GAAAE,CAAI,EAA4B,UAAX,GAAAF,CAJtB,CAKM,MALN,CAOU,QAAT,GAAAE,CAPD,CAQM,KARN,OAWJ,CAdM"}
1
+ {"version":3,"file":"maps.js","names":["horizontalPaddingRoundMap","xs","s","m","l","horizontalPaddingDefaultMap","getHorizontalPadding","size","form","minified","sizeMap","sizeMinifiedMap","getSize","textSizeMap","getTextSize","minifiedBorderSizeMap","getMinifiedBorderSize","getBgColor","status","getTextColor","view","getBorderColor","getDegreeMixing"],"sources":["../../../../../src/components/Badge/maps.ts"],"sourcesContent":["import { Space } from '##/mixs/MixSpace';\n\nimport {\n BadgePropForm,\n BadgePropSize,\n BadgePropStatus,\n BadgePropView,\n} from './types';\n\nconst horizontalPaddingRoundMap: Record<BadgePropSize, Space> = {\n xs: 'xs',\n s: 'xs',\n m: 's',\n l: 's',\n};\n\nconst horizontalPaddingDefaultMap: Record<BadgePropSize, Space> = {\n xs: '2xs',\n s: '2xs',\n m: 'xs',\n l: 'xs',\n};\n\nexport const getHorizontalPadding = (\n size: BadgePropSize,\n form: BadgePropForm,\n minified: boolean,\n) => {\n if (minified) {\n return undefined;\n }\n if (form === 'default') {\n return `var(--space-${horizontalPaddingDefaultMap[size]})`;\n }\n return `var(--space-${horizontalPaddingRoundMap[size]})`;\n};\n\nconst sizeMap: Record<BadgePropSize, Space> = {\n xs: 'm',\n s: 'l',\n m: 'xl',\n l: '2xl',\n};\n\nconst sizeMinifiedMap: Record<BadgePropSize, number> = {\n xs: 10,\n s: 16,\n m: 24,\n l: 32,\n};\n\nexport const getSize = (size: BadgePropSize, minified: boolean) => {\n if (minified) {\n return `${sizeMinifiedMap[size]}px`;\n }\n\n return `var(--space-${sizeMap[size]})`;\n};\n\nconst textSizeMap: Record<BadgePropSize, string> = {\n xs: 'calc(var(--size-text-m) / 2)',\n s: 'var(--size-text-2xs)',\n m: 'var(--size-text-xs)',\n l: 'var(--badge-text-size)',\n};\n\nexport const getTextSize = (size: BadgePropSize) => textSizeMap[size];\n\nconst minifiedBorderSizeMap: Record<BadgePropSize, number> = {\n xs: 2,\n s: 3,\n m: 4,\n l: 5,\n};\n\nexport const getMinifiedBorderSize = (\n size: BadgePropSize,\n minified: boolean,\n) => (minified ? `${minifiedBorderSizeMap[size]}px` : undefined);\n\nexport const getBgColor = (status: BadgePropStatus) =>\n status === 'disabled'\n ? 'var(--color-control-bg-disable)'\n : `var(--color-bg-${status})`;\n\nexport const getTextColor = (status: BadgePropStatus, view: BadgePropView) => {\n if (status === 'disabled') {\n return 'var(--color-control-typo-disable)';\n }\n if (status === 'system') {\n return 'var(--color-typo-secondary)';\n }\n if (view === 'filled') {\n return 'var(--color-typo-primary)';\n }\n return `var(--color-typo-${status})`;\n};\n\nexport const getBorderColor = (\n status: BadgePropStatus,\n view: BadgePropView,\n) => {\n if (view === 'stroked' && status === 'disabled') {\n return 'var(--color-control-bg-border-disable)';\n }\n if (view === 'stroked') {\n return `var(--color-bg-${status})`;\n }\n return undefined;\n};\n\nexport const getDegreeMixing = (\n status: BadgePropStatus,\n view: BadgePropView,\n) => {\n if (view === 'tinted' && status === 'system') {\n return '30%';\n }\n if (view === 'tinted' && status === 'disabled') {\n return '100%';\n }\n if (view === 'tinted') {\n return '10%';\n }\n return undefined;\n};\n"],"mappings":"GASMA,0BAAuD,CAAG,CAC9DC,EAAE,CAAE,IAD0D,CAE9DC,CAAC,CAAE,IAF2D,CAG9DC,CAAC,CAAE,GAH2D,CAI9DC,CAAC,CAAE,GAJ2D,C,CAO1DC,2BAAyD,CAAG,CAChEJ,EAAE,CAAE,KAD4D,CAEhEC,CAAC,CAAE,KAF6D,CAGhEC,CAAC,CAAE,IAH6D,CAIhEC,CAAC,CAAE,IAJ6D,C,CAOlE,MAAO,IAAME,qBAAoB,CAAG,SAClCC,CADkC,CAElCC,CAFkC,CAGlCC,CAHkC,CAI/B,OACCA,EADD,QAIU,SAAT,GAAAD,CAJD,uBAK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E,CAI7D,QAAX,GAAAA,CAJwE,CAKnE,6BALmE,CAO/D,QAAT,GAAAE,CAPwE,CAQnE,2BARmE,4BAUjDF,CAViD,KAW7E,CAXM,CAaP,MAAO,IAAMG,eAAc,CAAG,SAC5BH,CAD4B,CAE5BE,CAF4B,CAGzB,OACU,SAAT,GAAAA,CAAI,EAA6B,UAAX,GAAAF,CADvB,CAEM,wCAFN,CAIU,SAAT,GAAAE,CAJD,0BAKwBF,CALxB,YAQJ,CAXM,CAaP,MAAO,IAAMI,gBAAe,CAAG,SAC7BJ,CAD6B,CAE7BE,CAF6B,CAG1B,OACU,QAAT,GAAAA,CAAI,EAA4B,QAAX,GAAAF,CADtB,CAEM,KAFN,CAIU,QAAT,GAAAE,CAAI,EAA4B,UAAX,GAAAF,CAJtB,CAKM,MALN,CAOU,QAAT,GAAAE,CAPD,CAQM,KARN,OAWJ,CAdM"}
@@ -1,15 +1,15 @@
1
1
  import { IconComponent } from '@consta/icons/Icon';
2
2
  export declare const badgePropSize: readonly ["xs", "s", "m", "l"];
3
- export type BadgePropSize = typeof badgePropSize[number];
3
+ export type BadgePropSize = (typeof badgePropSize)[number];
4
4
  export declare const badgePropSizeDefault: BadgePropSize;
5
5
  export declare const badgePropView: readonly ["filled", "stroked", "tinted"];
6
- export type BadgePropView = typeof badgePropView[number];
6
+ export type BadgePropView = (typeof badgePropView)[number];
7
7
  export declare const badgePropViewDefault: BadgePropView;
8
8
  export declare const badgePropStatus: readonly ["normal", "success", "warning", "alert", "system", "disabled"];
9
- export type BadgePropStatus = typeof badgePropStatus[number] | 'error';
9
+ export type BadgePropStatus = (typeof badgePropStatus)[number] | 'error';
10
10
  export declare const badgePropStatusDefault: BadgePropStatus;
11
11
  export declare const badgePropForm: readonly ["default", "round"];
12
- export type BadgePropForm = typeof badgePropForm[number];
12
+ export type BadgePropForm = (typeof badgePropForm)[number];
13
13
  export declare const badgePropFormDefault: BadgePropForm;
14
14
  export type BadgeProps = {
15
15
  size?: BadgePropSize;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["badgePropSize","badgePropSizeDefault","badgePropView","badgePropViewDefault","badgePropStatus","badgePropStatusDefault","badgePropForm","badgePropFormDefault"],"sources":["../../../../../src/components/Badge/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\n\nexport const badgePropSize = ['xs', 's', 'm', 'l'] as const;\nexport type BadgePropSize = typeof badgePropSize[number];\nexport const badgePropSizeDefault: BadgePropSize = 'm';\n\nexport const badgePropView = ['filled', 'stroked', 'tinted'] as const;\nexport type BadgePropView = typeof badgePropView[number];\nexport const badgePropViewDefault: BadgePropView = badgePropView[0];\n\nexport const badgePropStatus = [\n 'normal',\n 'success',\n 'warning',\n 'alert',\n 'system',\n 'disabled',\n] as const;\nexport type BadgePropStatus = typeof badgePropStatus[number] | 'error';\nexport const badgePropStatusDefault: BadgePropStatus = badgePropStatus[0];\n\nexport const badgePropForm = ['default', 'round'] as const;\nexport type BadgePropForm = typeof badgePropForm[number];\nexport const badgePropFormDefault: BadgePropForm = badgePropForm[0];\n\nexport type BadgeProps = {\n size?: BadgePropSize;\n view?: BadgePropView;\n /**\n * \"error\" deprecated since version 5.13.0 use \"alert\"\n */\n status?: BadgePropStatus;\n form?: BadgePropForm;\n minified?: boolean;\n /**\n * @deprecated since version 4.17.2 use iconLeft\n */\n icon?: IconComponent;\n iconLeft?: IconComponent;\n iconRight?: IconComponent;\n label?: string;\n children?: never;\n};\n"],"mappings":"AAEA,MAAO,IAAMA,cAAa,CAAG,CAAC,IAAD,CAAO,GAAP,CAAY,GAAZ,CAAiB,GAAjB,CAAtB,CAEP,MAAO,IAAMC,qBAAmC,CAAG,GAA5C,CAEP,MAAO,IAAMC,cAAa,CAAG,CAAC,QAAD,CAAW,SAAX,CAAsB,QAAtB,CAAtB,CAEP,MAAO,IAAMC,qBAAmC,CAAGD,aAAa,CAAC,CAAD,CAAzD,CAEP,MAAO,IAAME,gBAAe,CAAG,CAC7B,QAD6B,CAE7B,SAF6B,CAG7B,SAH6B,CAI7B,OAJ6B,CAK7B,QAL6B,CAM7B,UAN6B,CAAxB,CASP,MAAO,IAAMC,uBAAuC,CAAGD,eAAe,CAAC,CAAD,CAA/D,CAEP,MAAO,IAAME,cAAa,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAtB,CAEP,MAAO,IAAMC,qBAAmC,CAAGD,aAAa,CAAC,CAAD,CAAzD"}
1
+ {"version":3,"file":"types.js","names":["badgePropSize","badgePropSizeDefault","badgePropView","badgePropViewDefault","badgePropStatus","badgePropStatusDefault","badgePropForm","badgePropFormDefault"],"sources":["../../../../../src/components/Badge/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\n\nexport const badgePropSize = ['xs', 's', 'm', 'l'] as const;\nexport type BadgePropSize = (typeof badgePropSize)[number];\nexport const badgePropSizeDefault: BadgePropSize = 'm';\n\nexport const badgePropView = ['filled', 'stroked', 'tinted'] as const;\nexport type BadgePropView = (typeof badgePropView)[number];\nexport const badgePropViewDefault: BadgePropView = badgePropView[0];\n\nexport const badgePropStatus = [\n 'normal',\n 'success',\n 'warning',\n 'alert',\n 'system',\n 'disabled',\n] as const;\nexport type BadgePropStatus = (typeof badgePropStatus)[number] | 'error';\nexport const badgePropStatusDefault: BadgePropStatus = badgePropStatus[0];\n\nexport const badgePropForm = ['default', 'round'] as const;\nexport type BadgePropForm = (typeof badgePropForm)[number];\nexport const badgePropFormDefault: BadgePropForm = badgePropForm[0];\n\nexport type BadgeProps = {\n size?: BadgePropSize;\n view?: BadgePropView;\n /**\n * \"error\" deprecated since version 5.13.0 use \"alert\"\n */\n status?: BadgePropStatus;\n form?: BadgePropForm;\n minified?: boolean;\n /**\n * @deprecated since version 4.17.2 use iconLeft\n */\n icon?: IconComponent;\n iconLeft?: IconComponent;\n iconRight?: IconComponent;\n label?: string;\n children?: never;\n};\n"],"mappings":"AAEA,MAAO,IAAMA,cAAa,CAAG,CAAC,IAAD,CAAO,GAAP,CAAY,GAAZ,CAAiB,GAAjB,CAAtB,CAEP,MAAO,IAAMC,qBAAmC,CAAG,GAA5C,CAEP,MAAO,IAAMC,cAAa,CAAG,CAAC,QAAD,CAAW,SAAX,CAAsB,QAAtB,CAAtB,CAEP,MAAO,IAAMC,qBAAmC,CAAGD,aAAa,CAAC,CAAD,CAAzD,CAEP,MAAO,IAAME,gBAAe,CAAG,CAC7B,QAD6B,CAE7B,SAF6B,CAG7B,SAH6B,CAI7B,OAJ6B,CAK7B,QAL6B,CAM7B,UAN6B,CAAxB,CASP,MAAO,IAAMC,uBAAuC,CAAGD,eAAe,CAAC,CAAD,CAA/D,CAEP,MAAO,IAAME,cAAa,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAtB,CAEP,MAAO,IAAMC,qBAAmC,CAAGD,aAAa,CAAC,CAAD,CAAzD"}
@@ -4,16 +4,16 @@ import React from 'react';
4
4
  import { MixSpaceProps, Space } from '../../mixs/MixSpace';
5
5
  import { PropsWithJsxAttributes } from '../../utils/types/PropsWithJsxAttributes';
6
6
  export declare const bannerPropSize: readonly ["xs", "s", "m", "l"];
7
- export type BannerPropSize = typeof bannerPropSize[number];
7
+ export type BannerPropSize = (typeof bannerPropSize)[number];
8
8
  export declare const bannerPropSizeDefault: BannerPropSize;
9
9
  export declare const bannerPropView: readonly ["filled", "ghost", "transparent"];
10
- export type BannerPropView = typeof bannerPropView[number];
10
+ export type BannerPropView = (typeof bannerPropView)[number];
11
11
  export declare const bannerPropViewDefault: BannerPropView;
12
12
  export declare const bannerPropStatus: readonly ["normal", "warning", "alert", "success", "system"];
13
- export type BannerPropStatus = typeof bannerPropStatus[number];
13
+ export type BannerPropStatus = (typeof bannerPropStatus)[number];
14
14
  export declare const bannerPropStatusDefault: BannerPropStatus;
15
15
  export declare const bannerPropForm: readonly ["default", "round", "brick"];
16
- export type BannerPropForm = typeof bannerPropForm[number];
16
+ export type BannerPropForm = (typeof bannerPropForm)[number];
17
17
  export declare const bannerPropFormDefault: BannerPropForm;
18
18
  export type BannerProps = PropsWithJsxAttributes<{
19
19
  leftSide?: React.ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.js","names":["React","forwardRef","cnText","Text","useTheme","cnMixFlex","cnMixSpace","cn","isNotNil","isString","bannerPropSize","bannerPropSizeDefault","bannerPropView","bannerPropViewDefault","bannerPropStatus","bannerPropStatusDefault","bannerPropForm","bannerPropFormDefault","cnBanner","SlotWrapper","children","renderSlot","slot","index","position","renderSlots","Array","isArray","filter","map","item","getGap","gap","textSizeMap","xs","s","m","l","controlSizeMap","Banner","props","ref","leftSide","rightSide","Icon","icon","size","view","className","space","itemsGap","status","style","form","otherProps","themeClassNames","leftSlots","rightSlots","justify","length","align","pH","pV","color","accent"],"sources":["../../../../../src/components/Banner/Banner.tsx"],"sourcesContent":["import './Banner.css';\n\nimport { IconComponent } from '@consta/icons/Icon';\nimport React, { forwardRef } from 'react';\n\nimport { cnText, Text } from '##/components/Text';\nimport { useTheme } from '##/components/Theme/Theme';\nimport { cnMixFlex } from '##/mixs/MixFlex';\nimport { cnMixSpace, MixSpaceProps, Space } from '##/mixs/MixSpace';\nimport { cn } from '##/utils/bem';\nimport { isNotNil, isString } from '##/utils/type-guards';\nimport { PropsWithJsxAttributes } from '##/utils/types/PropsWithJsxAttributes';\n\nexport const bannerPropSize = ['xs', 's', 'm', 'l'] as const;\nexport type BannerPropSize = typeof bannerPropSize[number];\nexport const bannerPropSizeDefault: BannerPropSize = bannerPropSize[2]; // 'm'\n\nexport const bannerPropView = ['filled', 'ghost', 'transparent'] as const;\nexport type BannerPropView = typeof bannerPropView[number];\nexport const bannerPropViewDefault: BannerPropView = bannerPropView[0]; // 'filled'\n\nexport const bannerPropStatus = [\n 'normal',\n 'warning',\n 'alert',\n 'success',\n 'system',\n] as const;\nexport type BannerPropStatus = typeof bannerPropStatus[number];\nexport const bannerPropStatusDefault: BannerPropStatus = bannerPropStatus[0]; // 'normal'\n\nexport const bannerPropForm = ['default', 'round', 'brick'] as const;\nexport type BannerPropForm = typeof bannerPropForm[number];\nexport const bannerPropFormDefault: BannerPropForm = bannerPropForm[0]; // 'default'\n\nexport type BannerProps = PropsWithJsxAttributes<{\n leftSide?: React.ReactNode;\n rightSide?: React.ReactNode;\n icon?: IconComponent;\n size?: BannerPropSize;\n view?: BannerPropView;\n space?: MixSpaceProps;\n itemsGap?: Space | [Space, Space];\n status?: BannerPropStatus;\n form?: BannerPropForm;\n}>;\n\nexport const cnBanner = cn('Banner');\n\nconst SlotWrapper: React.FC<{ children: React.ReactNode }> = ({ children }) => (\n <div className={cnBanner('Slot')}>{children}</div>\n);\n\nconst renderSlot = (slot: React.ReactNode, index: number, position: number) => {\n if (isString(slot)) {\n return (\n <SlotWrapper key={cnBanner('Slot', { index, position })}>\n <Text\n className={cnBanner('Text')}\n view=\"primary\"\n weight={index === 0 && position === 0 ? 'bold' : undefined}\n lineHeight=\"m\"\n >\n {slot}\n </Text>\n </SlotWrapper>\n );\n }\n\n return (\n <SlotWrapper key={cnBanner('Slot', { index, position })}>\n {slot}\n </SlotWrapper>\n );\n};\n\nconst renderSlots = (slot: React.ReactNode, position: number) => {\n if (Array.isArray(slot)) {\n return slot\n .filter(isNotNil)\n .map((item, index) => renderSlot(item, index, position));\n }\n return renderSlots([slot], position);\n};\n\nconst getGap = (gap: Space | [Space, Space], index: number) => {\n if (Array.isArray(gap)) {\n return gap[index];\n }\n return gap;\n};\n\nconst textSizeMap: Record<BannerPropSize, 'xs' | 's' | 'm' | 'l'> = {\n xs: 's',\n s: 's',\n m: 'm',\n l: 'l',\n};\n\nconst controlSizeMap: Record<BannerPropSize, 'xs' | 's' | 'm'> = {\n xs: 'xs',\n s: 's',\n m: 's',\n l: 'm',\n};\n\n/**\n * Компонент Banner, отображающий содержимое слева и справа.\n * Поддерживает иконки, размеры, виды, статусы и формы.\n *\n * @property {React.ReactNode} [leftSide] - Содержимое на левой стороне.\n * @property {React.ReactNode} [rightSide] - Содержимое на правой стороне.\n * @property {IconComponent} [icon] - Иконка.\n * @property {BannerPropSize} [size] - Размер компонента.\n * @property {BannerPropView} [view] - Визуальный стиль.\n * @property {MixSpaceProps} [space] - Параметры отступов.\n * @property {Space | [Space, Space]} [itemsGap] - Отступы между элементами.\n * @property {BannerPropStatus} [status] - Статус (цветовая схема).\n * @property {BannerPropForm} [form] - Форма компонента.\n */\n\nexport const Banner = forwardRef<HTMLDivElement, BannerProps>((props, ref) => {\n const {\n leftSide,\n rightSide,\n icon: Icon,\n size = bannerPropSizeDefault,\n view = bannerPropViewDefault,\n className,\n space,\n itemsGap = 's',\n status = bannerPropStatusDefault,\n style,\n form = bannerPropFormDefault,\n ...otherProps\n } = props;\n\n const { themeClassNames } = useTheme();\n\n const leftSlots = renderSlots(\n [\n Icon ? <Icon className={cnBanner('Icon')} /> : null,\n ...(Array.isArray(leftSide) ? leftSide : [leftSide]),\n ],\n 0,\n );\n\n const rightSlots = renderSlots(rightSide, 1);\n\n return (\n <div\n {...otherProps}\n className={cnBanner({ view, form, size }, [\n cnMixFlex({\n justify:\n rightSlots.length && !leftSlots.length\n ? 'flex-end'\n : 'space-between',\n align: 'center',\n gap: 'm',\n }),\n cnMixSpace(space || { pH: size, pV: 'xs' }),\n cnText({ size: textSizeMap[size] }),\n status !== 'system' && view === 'filled'\n ? themeClassNames.color.accent\n : undefined,\n className,\n ])}\n style={{\n ...style,\n ['--banner-bg-color' as string]: `var(--color-bg-${status})`,\n ['--banner-inner-height' as string]: `var(--control-height-${controlSizeMap[size]})`,\n }}\n ref={ref}\n >\n {leftSlots.length ? (\n <div\n className={cnMixFlex({ gap: getGap(itemsGap, 0), align: 'center' })}\n >\n {leftSlots}\n </div>\n ) : undefined}\n {rightSlots.length ? (\n <div\n className={cnMixFlex({ gap: getGap(itemsGap, 1), align: 'center' })}\n >\n {rightSlots}\n </div>\n ) : undefined}\n </div>\n );\n});\n"],"mappings":"s7BAAA,qBAGA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,MAAT,CAAiBC,IA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CAAEf,CAAN,CAAYgB,EAAE,CAAE,IAAhB,CAAV,CAT8B,CAUxC5D,MAAM,CAAC,CAAE4C,IAAI,CAAEb,WAAW,CAACa,CAAD,CAAnB,CAAD,CAVkC,CAW7B,QAAX,GAAAK,CAAM,EAA0B,QAAT,GAAAJ,CAAvB,CACIQ,CAAe,CAACQ,KAAhB,CAAsBC,MAD1B,OAXwC,CAcxChB,CAdwC,CAAvB,CAFrB,CAkBE,KAAK,gCACAI,CADA,6BAEF,mBAFE,0BAEgDD,CAFhD,yBAGF,uBAHE,gCAG0Db,cAAc,CAACQ,CAAD,CAHxE,UAlBP,CAuBE,GAAG,CAAEL,CAvBP,GAyBGe,CAAS,CAACG,MAAV,CACC,2BACE,SAAS,CAAEtD,SAAS,CAAC,CAAE2B,GAAG,CAAED,MAAM,CAACmB,CAAD,CAAW,CAAX,CAAb,CAA4BU,KAAK,CAAE,QAAnC,CAAD,CADtB,EAGGJ,CAHH,CADD,OAzBH,CAgCGC,CAAU,CAACE,MAAX,CACC,2BACE,SAAS,CAAEtD,SAAS,CAAC,CAAE2B,GAAG,CAAED,MAAM,CAACmB,CAAD,CAAW,CAAX,CAAb,CAA4BU,KAAK,CAAE,QAAnC,CAAD,CADtB,EAGGH,CAHH,CADD,OAhCH,CAyCH,CAtE+B,CAAzB"}
1
+ {"version":3,"file":"Banner.js","names":["React","forwardRef","cnText","Text","useTheme","cnMixFlex","cnMixSpace","cn","isNotNil","isString","bannerPropSize","bannerPropSizeDefault","bannerPropView","bannerPropViewDefault","bannerPropStatus","bannerPropStatusDefault","bannerPropForm","bannerPropFormDefault","cnBanner","SlotWrapper","children","renderSlot","slot","index","position","renderSlots","Array","isArray","filter","map","item","getGap","gap","textSizeMap","xs","s","m","l","controlSizeMap","Banner","props","ref","leftSide","rightSide","Icon","icon","size","view","className","space","itemsGap","status","style","form","otherProps","themeClassNames","leftSlots","rightSlots","justify","length","align","pH","pV","color","accent"],"sources":["../../../../../src/components/Banner/Banner.tsx"],"sourcesContent":["import './Banner.css';\n\nimport { IconComponent } from '@consta/icons/Icon';\nimport React, { forwardRef } from 'react';\n\nimport { cnText, Text } from '##/components/Text';\nimport { useTheme } from '##/components/Theme/Theme';\nimport { cnMixFlex } from '##/mixs/MixFlex';\nimport { cnMixSpace, MixSpaceProps, Space } from '##/mixs/MixSpace';\nimport { cn } from '##/utils/bem';\nimport { isNotNil, isString } from '##/utils/type-guards';\nimport { PropsWithJsxAttributes } from '##/utils/types/PropsWithJsxAttributes';\n\nexport const bannerPropSize = ['xs', 's', 'm', 'l'] as const;\nexport type BannerPropSize = (typeof bannerPropSize)[number];\nexport const bannerPropSizeDefault: BannerPropSize = bannerPropSize[2]; // 'm'\n\nexport const bannerPropView = ['filled', 'ghost', 'transparent'] as const;\nexport type BannerPropView = (typeof bannerPropView)[number];\nexport const bannerPropViewDefault: BannerPropView = bannerPropView[0]; // 'filled'\n\nexport const bannerPropStatus = [\n 'normal',\n 'warning',\n 'alert',\n 'success',\n 'system',\n] as const;\nexport type BannerPropStatus = (typeof bannerPropStatus)[number];\nexport const bannerPropStatusDefault: BannerPropStatus = bannerPropStatus[0]; // 'normal'\n\nexport const bannerPropForm = ['default', 'round', 'brick'] as const;\nexport type BannerPropForm = (typeof bannerPropForm)[number];\nexport const bannerPropFormDefault: BannerPropForm = bannerPropForm[0]; // 'default'\n\nexport type BannerProps = PropsWithJsxAttributes<{\n leftSide?: React.ReactNode;\n rightSide?: React.ReactNode;\n icon?: IconComponent;\n size?: BannerPropSize;\n view?: BannerPropView;\n space?: MixSpaceProps;\n itemsGap?: Space | [Space, Space];\n status?: BannerPropStatus;\n form?: BannerPropForm;\n}>;\n\nexport const cnBanner = cn('Banner');\n\nconst SlotWrapper: React.FC<{ children: React.ReactNode }> = ({ children }) => (\n <div className={cnBanner('Slot')}>{children}</div>\n);\n\nconst renderSlot = (slot: React.ReactNode, index: number, position: number) => {\n if (isString(slot)) {\n return (\n <SlotWrapper key={cnBanner('Slot', { index, position })}>\n <Text\n className={cnBanner('Text')}\n view=\"primary\"\n weight={index === 0 && position === 0 ? 'bold' : undefined}\n lineHeight=\"m\"\n >\n {slot}\n </Text>\n </SlotWrapper>\n );\n }\n\n return (\n <SlotWrapper key={cnBanner('Slot', { index, position })}>\n {slot}\n </SlotWrapper>\n );\n};\n\nconst renderSlots = (slot: React.ReactNode, position: number) => {\n if (Array.isArray(slot)) {\n return slot\n .filter(isNotNil)\n .map((item, index) => renderSlot(item, index, position));\n }\n return renderSlots([slot], position);\n};\n\nconst getGap = (gap: Space | [Space, Space], index: number) => {\n if (Array.isArray(gap)) {\n return gap[index];\n }\n return gap;\n};\n\nconst textSizeMap: Record<BannerPropSize, 'xs' | 's' | 'm' | 'l'> = {\n xs: 's',\n s: 's',\n m: 'm',\n l: 'l',\n};\n\nconst controlSizeMap: Record<BannerPropSize, 'xs' | 's' | 'm'> = {\n xs: 'xs',\n s: 's',\n m: 's',\n l: 'm',\n};\n\n/**\n * Компонент Banner, отображающий содержимое слева и справа.\n * Поддерживает иконки, размеры, виды, статусы и формы.\n *\n * @property {React.ReactNode} [leftSide] - Содержимое на левой стороне.\n * @property {React.ReactNode} [rightSide] - Содержимое на правой стороне.\n * @property {IconComponent} [icon] - Иконка.\n * @property {BannerPropSize} [size] - Размер компонента.\n * @property {BannerPropView} [view] - Визуальный стиль.\n * @property {MixSpaceProps} [space] - Параметры отступов.\n * @property {Space | [Space, Space]} [itemsGap] - Отступы между элементами.\n * @property {BannerPropStatus} [status] - Статус (цветовая схема).\n * @property {BannerPropForm} [form] - Форма компонента.\n */\n\nexport const Banner = forwardRef<HTMLDivElement, BannerProps>((props, ref) => {\n const {\n leftSide,\n rightSide,\n icon: Icon,\n size = bannerPropSizeDefault,\n view = bannerPropViewDefault,\n className,\n space,\n itemsGap = 's',\n status = bannerPropStatusDefault,\n style,\n form = bannerPropFormDefault,\n ...otherProps\n } = props;\n\n const { themeClassNames } = useTheme();\n\n const leftSlots = renderSlots(\n [\n Icon ? <Icon className={cnBanner('Icon')} /> : null,\n ...(Array.isArray(leftSide) ? leftSide : [leftSide]),\n ],\n 0,\n );\n\n const rightSlots = renderSlots(rightSide, 1);\n\n return (\n <div\n {...otherProps}\n className={cnBanner({ view, form, size }, [\n cnMixFlex({\n justify:\n rightSlots.length && !leftSlots.length\n ? 'flex-end'\n : 'space-between',\n align: 'center',\n gap: 'm',\n }),\n cnMixSpace(space || { pH: size, pV: 'xs' }),\n cnText({ size: textSizeMap[size] }),\n status !== 'system' && view === 'filled'\n ? themeClassNames.color.accent\n : undefined,\n className,\n ])}\n style={{\n ...style,\n ['--banner-bg-color' as string]: `var(--color-bg-${status})`,\n ['--banner-inner-height' as string]: `var(--control-height-${controlSizeMap[size]})`,\n }}\n ref={ref}\n >\n {leftSlots.length ? (\n <div\n className={cnMixFlex({ gap: getGap(itemsGap, 0), align: 'center' })}\n >\n {leftSlots}\n </div>\n ) : undefined}\n {rightSlots.length ? (\n <div\n className={cnMixFlex({ gap: getGap(itemsGap, 1), align: 'center' })}\n >\n {rightSlots}\n </div>\n ) : undefined}\n </div>\n );\n});\n"],"mappings":"s7BAAA,qBAGA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,MAAT,CAAiBC,IAAjB,eACA,OAASC,QAAT,sBACA,OAASC,SAAT,0BACA,OAASC,UAAT,2BACA,OAASC,EAAT,uBACA,OAASC,QAAT,CAAmBC,QAAnB,+BAGA,MAAO,IAAMC,eAAc,CAAG,CAAC,IAAD,CAAO,GAAP,CAAY,GAAZ,CAAiB,GAAjB,CAAvB,CAEP,MAAO,IAAMC,sBAAqC,CAAGD,cAAc,CAAC,CAAD,CAA5D,CAEP,MAAO,IAAME,eAAc,CAAG,CAAC,QAAD,CAAW,OAAX,CAAoB,aAApB,CAAvB,CAEP,MAAO,IAAMC,sBAAqC,CAAGD,cAAc,CAAC,CAAD,CAA5D,CAEP,MAAO,IAAME,iBAAgB,CAAG,CAC9B,QAD8B,CAE9B,SAF8B,CAG9B,OA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AAS,CAAC,CAAE2B,GAAG,CAAED,MAAM,CAACmB,CAAD,CAAW,CAAX,CAAb,CAA4BU,KAAK,CAAE,QAAnC,CAAD,CADtB,EAGGJ,CAHH,CADD,OAzBH,CAgCGC,CAAU,CAACE,MAAX,CACC,2BACE,SAAS,CAAEtD,SAAS,CAAC,CAAE2B,GAAG,CAAED,MAAM,CAACmB,CAAD,CAAW,CAAX,CAAb,CAA4BU,KAAK,CAAE,QAAnC,CAAD,CADtB,EAGGH,CAHH,CADD,OAhCH,CAyCH,CAtE+B,CAAzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"BookmarkTabs.js","names":["IconAdd","IconArrowLeft","IconArrowRight","React","forwardRef","useMemo","useState","useComponentSize","useForkRef","cnMixScrollBar","cn","Button","BookmarkTabsTab","withDefaultGetters","bookmarkTabsPropFormDefault","bookmarkTabsPropSizeDefault","bookmarkTabsPropViewDefault","useBookmarkTabs","cnBookmarkTabs","renderItemDefault","props","_item","item","attributes","as","otherProps","BookmarkTabsRender","ref","items","value","onCreate","getItemKey","getItemLabel","getItemLeftIcon","getItemRightIcon","getItemAs","getItemRef","getItemAttributes","getItemFixed","onChange","onRemove","renderItem","renderItemProp","size","form","view","withNavigationButtons","onMouseLeaveProp","onMouseLeave","className","id","highlightedIndex","setHighlightedIndex","getItemActive","withAddButton","refs","fixedTabs","fixedTabsRef","otherTabs","otherTabsRef","showControls","wrapperRef","containerRef","controlsRef","addButtonRef","navigate","sizes","fixedWidth","width","fixed","controlRef","bordered","index","tabWidth","onClick","e","active","label","leftIcon","rightIcon","tabRef","onClose","hovered","borderedIndexes","arr","activeIndex","indexOf","Array","from","length","keys","slice","filter","el","invisible","map","includes","type","BookmarkTabs"],"sources":["../../../../../src/components/BookmarkTabs/BookmarkTabs.tsx"],"sourcesContent":["import './BookmarkTabs.css';\n\nimport { IconAdd } from '@consta/icons/IconAdd';\nimport { IconArrowLeft } from '@consta/icons/IconArrowLeft';\nimport { IconArrowRight } from '@consta/icons/IconArrowRight';\nimport React, { forwardRef, useMemo, useState } from 'react';\n\nimport { useComponentSize } from '##/hooks/useComponentSize';\nimport { useForkRef } from '##/hooks/useForkRef';\nimport { cnMixScrollBar } from '##/mixs/MixScrollBar';\nimport { cn } from '##/utils/bem';\n\nimport { Button } from '../Button';\nimport { BookmarkTabsTab } from './BookmarkTabsTab';\nimport { withDefaultGetters } from './helper';\nimport {\n BookmarkTabsComponent,\n bookmarkTabsPropFormDefault,\n BookmarkTabsProps,\n bookmarkTabsPropSizeDefault,\n bookmarkTabsPropViewDefault,\n BookmarkTabsRenderItemProps,\n} from './types';\nimport { useBookmarkTabs } from './useBookmarkTabs';\n\nexport const cnBookmarkTabs = cn('BookmarkTabs');\n\nconst renderItemDefault = <ITEM,>(\n props: BookmarkTabsRenderItemProps<ITEM>,\n): React.ReactNode => {\n const { item: _item, attributes = {}, as, ...otherProps } = props;\n return <BookmarkTabsTab {...attributes} {...otherProps} as={as} />;\n};\n\nconst BookmarkTabsRender = (\n props: BookmarkTabsProps,\n ref: React.Ref<HTMLDivElement>,\n) => {\n const {\n items = [],\n value,\n onCreate,\n getItemKey,\n getItemLabel,\n getItemLeftIcon,\n getItemRightIcon,\n getItemAs,\n getItemRef,\n getItemAttributes,\n getItemFixed,\n onChange,\n onRemove,\n renderItem: renderItemProp = renderItemDefault,\n size = bookmarkTabsPropSizeDefault,\n form = bookmarkTabsPropFormDefault,\n view = bookmarkTabsPropViewDefault,\n withNavigationButtons,\n onMouseLeave: onMouseLeaveProp,\n className,\n id,\n ...otherProps\n } = withDefaultGetters(props);\n\n const [highlightedIndex, setHighlightedIndex] = useState<number | null>(null);\n\n type Item = typeof items[number];\n\n const getItemActive = (item: Item) => {\n return value ? getItemKey(item) === getItemKey(value) : false;\n };\n\n const {\n refs,\n fixedTabs,\n fixedTabsRef,\n otherTabs,\n otherTabsRef,\n showControls,\n wrapperRef,\n containerRef,\n controlsRef,\n addButtonRef,\n navigate,\n sizes,\n } = useBookmarkTabs({\n items,\n getItemFixed,\n size,\n withNavigationButtons,\n withAddButton: !!onCreate,\n });\n\n const { width: fixedWidth } = useComponentSize(fixedTabsRef);\n\n const renderItem = (\n item: Item,\n fixed: boolean,\n controlRef: React.RefObject<HTMLDivElement>,\n bordered: boolean,\n index: number,\n tabWidth?: string,\n ) => (\n <div\n className={cnBookmarkTabs('Tab')}\n onMouseEnter={() => setHighlightedIndex(index)}\n onFocus={() => setHighlightedIndex(index)}\n ref={controlRef}\n >\n {renderItemProp({\n item,\n onClick: (e) => onChange?.(item, { e }),\n active: getItemActive(item),\n label: getItemLabel(item),\n leftIcon: getItemLeftIcon(item),\n rightIcon: getItemRightIcon(item),\n as: getItemAs(item) ?? 'div',\n attributes: getItemAttributes(item),\n tabRef: getItemRef(item),\n fixed,\n bordered,\n onClose: onRemove ? (e) => onRemove(item, { e }) : undefined,\n size,\n view,\n hovered: highlightedIndex === index,\n form,\n tabWidth,\n })}\n </div>\n );\n\n const onMouseLeave: React.MouseEventHandler<HTMLDivElement> = (e) => {\n onMouseLeaveProp?.(e);\n setHighlightedIndex(null);\n };\n\n const borderedIndexes = useMemo(() => {\n const arr = [...fixedTabs, ...otherTabs];\n const activeIndex = value ? arr.indexOf(value) : -1;\n return Array.from(Array(arr.length).keys())\n .slice(undefined, -1)\n .filter((el) =>\n form === 'round' ? el !== activeIndex && el !== activeIndex - 1 : true,\n );\n }, [fixedTabs, otherTabs, value, form]);\n\n return (\n <div\n className={cnBookmarkTabs({ size, view, form }, [className])}\n ref={useForkRef([ref, containerRef])}\n id={id}\n onMouseLeave={onMouseLeave}\n {...otherProps}\n >\n {showControls && (\n <div ref={controlsRef} className={cnBookmarkTabs('ScrollControls')}>\n <div className={cnBookmarkTabs('Button')}>\n <Button\n view=\"clear\"\n size=\"xs\"\n type=\"button\"\n onClick={() => navigate('prev')}\n iconLeft={IconArrowLeft}\n onlyIcon\n />\n </div>\n <div className={cnBookmarkTabs('Button')}>\n <Button\n view=\"clear\"\n size=\"xs\"\n type=\"button\"\n onClick={() => navigate('next')}\n iconLeft={IconArrowRight}\n onlyIcon\n />\n </div>\n </div>\n )}\n <div\n ref={wrapperRef}\n className={cnBookmarkTabs(\n 'Wrapper',\n cnMixScrollBar({ invisible: true }),\n )}\n >\n <div\n style={{\n ['--bookmarks-list-width' as string]: `max-content`,\n }}\n ref={fixedTabsRef}\n className={cnBookmarkTabs('List')}\n >\n {fixedTabs.map((item, index) => (\n <React.Fragment key={getItemKey(item)}>\n {renderItem(\n item,\n true,\n refs[index],\n borderedIndexes.includes(index),\n index,\n )}\n </React.Fragment>\n ))}\n </div>\n <div\n style={{\n ['--bookmarks-list-width' as string]: `calc(100% - ${fixedWidth}px)`,\n }}\n className={cnBookmarkTabs('List')}\n ref={otherTabsRef}\n >\n {otherTabs.map((item, index) => {\n const { length } = fixedTabs;\n return (\n <React.Fragment key={getItemKey(item)}>\n {renderItem(\n item,\n false,\n refs[length + index],\n borderedIndexes.includes(length + index),\n length + index,\n sizes[index],\n )}\n </React.Fragment>\n );\n })}\n </div>\n </div>\n {onCreate && (\n <div\n ref={addButtonRef}\n className={cnBookmarkTabs('Button', { type: 'add' })}\n >\n <Button\n view=\"clear\"\n size=\"xs\"\n type=\"button\"\n onClick={onCreate}\n iconLeft={IconAdd}\n onlyIcon\n />\n </div>\n )}\n <div className={cnBookmarkTabs('Empty')} />\n </div>\n );\n};\n\nexport const BookmarkTabs = forwardRef(\n BookmarkTabsRender,\n) as BookmarkTabsComponent;\n"],"mappings":"gmBAAA,2BAEA,OAASA,OAAT,KAAwB,uBAAxB,CACA,OAASC,aAAT,KAA8B,6BAA9B,CACA,OAASC,cAAT,KAA+B,8BAA/B,CACA,MAAOC,MAAP,EAAgBC,UAAhB,CAA4BC,OAA5B,CAAqCC,QAArC,KAAqD,OAArD,CAEA,OAASC,gBAAT,oCACA,OAASC,UAAT,8BACA,OAASC,cAAT,+BACA,OAASC,EAAT,uBAEA,OAASC,MAAT,iBACA,OAASC,eAAT,yBACA,OAASC,kBAAT,gBACA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CAIE,OAAO,CAAEnE,CAJX,CAKE,QAAQ,CAAE9B,OALZ,CAME,QAAQ,GANV,EAJF,CAlFJ,CAgGE,2BAAK,SAAS,CAAEkB,cAAc,CAAC,OAAD,CAA9B,EAhGF,CAmGH,C,CAED,MAAO,IAAMgF,aAAY,CAAG9F,UAAU,CACpCsB,kBADoC,CAA/B"}
1
+ {"version":3,"file":"BookmarkTabs.js","names":["IconAdd","IconArrowLeft","IconArrowRight","React","forwardRef","useMemo","useState","useComponentSize","useForkRef","cnMixScrollBar","cn","Button","BookmarkTabsTab","withDefaultGetters","bookmarkTabsPropFormDefault","bookmarkTabsPropSizeDefault","bookmarkTabsPropViewDefault","useBookmarkTabs","cnBookmarkTabs","renderItemDefault","props","_item","item","attributes","as","otherProps","BookmarkTabsRender","ref","items","value","onCreate","getItemKey","getItemLabel","getItemLeftIcon","getItemRightIcon","getItemAs","getItemRef","getItemAttributes","getItemFixed","onChange","onRemove","renderItem","renderItemProp","size","form","view","withNavigationButtons","onMouseLeaveProp","onMouseLeave","className","id","highlightedIndex","setHighlightedIndex","getItemActive","withAddButton","refs","fixedTabs","fixedTabsRef","otherTabs","otherTabsRef","showControls","wrapperRef","containerRef","controlsRef","addButtonRef","navigate","sizes","fixedWidth","width","fixed","controlRef","bordered","index","tabWidth","onClick","e","active","label","leftIcon","rightIcon","tabRef","onClose","hovered","borderedIndexes","arr","activeIndex","indexOf","Array","from","length","keys","slice","filter","el","invisible","map","includes","type","BookmarkTabs"],"sources":["../../../../../src/components/BookmarkTabs/BookmarkTabs.tsx"],"sourcesContent":["import './BookmarkTabs.css';\n\nimport { IconAdd } from '@consta/icons/IconAdd';\nimport { IconArrowLeft } from '@consta/icons/IconArrowLeft';\nimport { IconArrowRight } from '@consta/icons/IconArrowRight';\nimport React, { forwardRef, useMemo, useState } from 'react';\n\nimport { useComponentSize } from '##/hooks/useComponentSize';\nimport { useForkRef } from '##/hooks/useForkRef';\nimport { cnMixScrollBar } from '##/mixs/MixScrollBar';\nimport { cn } from '##/utils/bem';\n\nimport { Button } from '../Button';\nimport { BookmarkTabsTab } from './BookmarkTabsTab';\nimport { withDefaultGetters } from './helper';\nimport {\n BookmarkTabsComponent,\n bookmarkTabsPropFormDefault,\n BookmarkTabsProps,\n bookmarkTabsPropSizeDefault,\n bookmarkTabsPropViewDefault,\n BookmarkTabsRenderItemProps,\n} from './types';\nimport { useBookmarkTabs } from './useBookmarkTabs';\n\nexport const cnBookmarkTabs = cn('BookmarkTabs');\n\nconst renderItemDefault = <ITEM,>(\n props: BookmarkTabsRenderItemProps<ITEM>,\n): React.ReactNode => {\n const { item: _item, attributes = {}, as, ...otherProps } = props;\n return <BookmarkTabsTab {...attributes} {...otherProps} as={as} />;\n};\n\nconst BookmarkTabsRender = (\n props: BookmarkTabsProps,\n ref: React.Ref<HTMLDivElement>,\n) => {\n const {\n items = [],\n value,\n onCreate,\n getItemKey,\n getItemLabel,\n getItemLeftIcon,\n getItemRightIcon,\n getItemAs,\n getItemRef,\n getItemAttributes,\n getItemFixed,\n onChange,\n onRemove,\n renderItem: renderItemProp = renderItemDefault,\n size = bookmarkTabsPropSizeDefault,\n form = bookmarkTabsPropFormDefault,\n view = bookmarkTabsPropViewDefault,\n withNavigationButtons,\n onMouseLeave: onMouseLeaveProp,\n className,\n id,\n ...otherProps\n } = withDefaultGetters(props);\n\n const [highlightedIndex, setHighlightedIndex] = useState<number | null>(null);\n\n type Item = (typeof items)[number];\n\n const getItemActive = (item: Item) => {\n return value ? getItemKey(item) === getItemKey(value) : false;\n };\n\n const {\n refs,\n fixedTabs,\n fixedTabsRef,\n otherTabs,\n otherTabsRef,\n showControls,\n wrapperRef,\n containerRef,\n controlsRef,\n addButtonRef,\n navigate,\n sizes,\n } = useBookmarkTabs({\n items,\n getItemFixed,\n size,\n withNavigationButtons,\n withAddButton: !!onCreate,\n });\n\n const { width: fixedWidth } = useComponentSize(fixedTabsRef);\n\n const renderItem = (\n item: Item,\n fixed: boolean,\n controlRef: React.RefObject<HTMLDivElement>,\n bordered: boolean,\n index: number,\n tabWidth?: string,\n ) => (\n <div\n className={cnBookmarkTabs('Tab')}\n onMouseEnter={() => setHighlightedIndex(index)}\n onFocus={() => setHighlightedIndex(index)}\n ref={controlRef}\n >\n {renderItemProp({\n item,\n onClick: (e) => onChange?.(item, { e }),\n active: getItemActive(item),\n label: getItemLabel(item),\n leftIcon: getItemLeftIcon(item),\n rightIcon: getItemRightIcon(item),\n as: getItemAs(item) ?? 'div',\n attributes: getItemAttributes(item),\n tabRef: getItemRef(item),\n fixed,\n bordered,\n onClose: onRemove ? (e) => onRemove(item, { e }) : undefined,\n size,\n view,\n hovered: highlightedIndex === index,\n form,\n tabWidth,\n })}\n </div>\n );\n\n const onMouseLeave: React.MouseEventHandler<HTMLDivElement> = (e) => {\n onMouseLeaveProp?.(e);\n setHighlightedIndex(null);\n };\n\n const borderedIndexes = useMemo(() => {\n const arr = [...fixedTabs, ...otherTabs];\n const activeIndex = value ? arr.indexOf(value) : -1;\n return Array.from(Array(arr.length).keys())\n .slice(undefined, -1)\n .filter((el) =>\n form === 'round' ? el !== activeIndex && el !== activeIndex - 1 : true,\n );\n }, [fixedTabs, otherTabs, value, form]);\n\n return (\n <div\n className={cnBookmarkTabs({ size, view, form }, [className])}\n ref={useForkRef([ref, containerRef])}\n id={id}\n onMouseLeave={onMouseLeave}\n {...otherProps}\n >\n {showControls && (\n <div ref={controlsRef} className={cnBookmarkTabs('ScrollControls')}>\n <div className={cnBookmarkTabs('Button')}>\n <Button\n view=\"clear\"\n size=\"xs\"\n type=\"button\"\n onClick={() => navigate('prev')}\n iconLeft={IconArrowLeft}\n onlyIcon\n />\n </div>\n <div className={cnBookmarkTabs('Button')}>\n <Button\n view=\"clear\"\n size=\"xs\"\n type=\"button\"\n onClick={() => navigate('next')}\n iconLeft={IconArrowRight}\n onlyIcon\n />\n </div>\n </div>\n )}\n <div\n ref={wrapperRef}\n className={cnBookmarkTabs(\n 'Wrapper',\n cnMixScrollBar({ invisible: true }),\n )}\n >\n <div\n style={{\n ['--bookmarks-list-width' as string]: `max-content`,\n }}\n ref={fixedTabsRef}\n className={cnBookmarkTabs('List')}\n >\n {fixedTabs.map((item, index) => (\n <React.Fragment key={getItemKey(item)}>\n {renderItem(\n item,\n true,\n refs[index],\n borderedIndexes.includes(index),\n index,\n )}\n </React.Fragment>\n ))}\n </div>\n <div\n style={{\n ['--bookmarks-list-width' as string]: `calc(100% - ${fixedWidth}px)`,\n }}\n className={cnBookmarkTabs('List')}\n ref={otherTabsRef}\n >\n {otherTabs.map((item, index) => {\n const { length } = fixedTabs;\n return (\n <React.Fragment key={getItemKey(item)}>\n {renderItem(\n item,\n false,\n refs[length + index],\n borderedIndexes.includes(length + index),\n length + index,\n sizes[index],\n )}\n </React.Fragment>\n );\n })}\n </div>\n </div>\n {onCreate && (\n <div\n ref={addButtonRef}\n className={cnBookmarkTabs('Button', { type: 'add' })}\n >\n <Button\n view=\"clear\"\n size=\"xs\"\n type=\"button\"\n onClick={onCreate}\n iconLeft={IconAdd}\n onlyIcon\n />\n </div>\n )}\n <div className={cnBookmarkTabs('Empty')} />\n </div>\n );\n};\n\nexport const BookmarkTabs = forwardRef(\n BookmarkTabsRender,\n) as BookmarkTabsComponent;\n"],"mappings":"gmBAAA,2BAEA,OAASA,OAAT,KAAwB,uBAAxB,CACA,OAASC,aAAT,KAA8B,6BAA9B,CACA,OAASC,cAAT,KAA+B,8BAA/B,CACA,MAAOC,MAAP,EAAgBC,UAAhB,CAA4BC,OAA5B,CAAqCC,QAArC,KAAqD,OAArD,CAEA,OAASC,gBAAT,oCACA,OAASC,UAAT,8BACA,OAASC,cAAT,+BACA,OAASC,EAAT,uBAEA,OAASC,MAAT,iBACA,OAASC,eAAT,yBACA,OAASC,kBAAT,gBACA,OAEEC,2BAFF,CAIEC,2BAJF,CAKEC,2BALF,eAQA,OAASC,eAAT,yBAEA,MAAO,IAAMC,eAAc,CAAGR,EAAE,CAAC,cAAD,CAAzB,C,GAEDS,kBAAi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9B,EAhGF,CAmGH,C,CAED,MAAO,IAAMgF,aAAY,CAAG9F,UAAU,CACpCsB,kBADoC,CAA/B"}
@@ -4,13 +4,13 @@ import { AsAttributes, AsTags } from '../../utils/types/AsTags';
4
4
  import { PropsWithAsAttributes } from '../../utils/types/PropsWithAsAttributes';
5
5
  import { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';
6
6
  export declare const bookmarkTabsPropSize: readonly ["m", "s"];
7
- export type BookmarkTabsPropSize = typeof bookmarkTabsPropSize[number];
7
+ export type BookmarkTabsPropSize = (typeof bookmarkTabsPropSize)[number];
8
8
  export declare const bookmarkTabsPropSizeDefault: BookmarkTabsPropSize;
9
9
  export declare const bookmarkTabsPropForm: readonly ["brick", "round"];
10
- export type BookmarkTabsPropForm = typeof bookmarkTabsPropForm[number];
10
+ export type BookmarkTabsPropForm = (typeof bookmarkTabsPropForm)[number];
11
11
  export declare const bookmarkTabsPropFormDefault: BookmarkTabsPropForm;
12
12
  export declare const bookmarkTabsPropView: readonly ["ghost", "clear"];
13
- export type BookmarkTabsPropView = typeof bookmarkTabsPropView[number];
13
+ export type BookmarkTabsPropView = (typeof bookmarkTabsPropView)[number];
14
14
  export declare const bookmarkTabsPropViewDefault: BookmarkTabsPropView;
15
15
  export type BookmarkTabsItemDefault = {
16
16
  key: string | number;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["bookmarkTabsPropSize","bookmarkTabsPropSizeDefault","bookmarkTabsPropForm","bookmarkTabsPropFormDefault","bookmarkTabsPropView","bookmarkTabsPropViewDefault"],"sources":["../../../../../src/components/BookmarkTabs/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { AsAttributes, AsTags } from '##/utils/types/AsTags';\nimport { PropsWithAsAttributes } from '##/utils/types/PropsWithAsAttributes';\nimport { PropsWithHTMLAttributesAndRef } from '##/utils/types/PropsWithHTMLAttributes';\n\nexport const bookmarkTabsPropSize = ['m', 's'] as const;\nexport type BookmarkTabsPropSize = typeof bookmarkTabsPropSize[number];\nexport const bookmarkTabsPropSizeDefault: BookmarkTabsPropSize =\n bookmarkTabsPropSize[0];\n\nexport const bookmarkTabsPropForm = ['brick', 'round'] as const;\nexport type BookmarkTabsPropForm = typeof bookmarkTabsPropForm[number];\nexport const bookmarkTabsPropFormDefault: BookmarkTabsPropForm =\n bookmarkTabsPropForm[0];\n\nexport const bookmarkTabsPropView = ['ghost', 'clear'] as const;\nexport type BookmarkTabsPropView = typeof bookmarkTabsPropView[number];\nexport const bookmarkTabsPropViewDefault: BookmarkTabsPropView =\n bookmarkTabsPropView[0];\n\nexport type BookmarkTabsItemDefault = {\n key: string | number;\n label?: string | number;\n leftIcon?: IconComponent;\n rightIcon?: IconComponent;\n fixed?: boolean;\n as?: AsTags;\n ref?: React.RefObject<HTMLElement>;\n attributes?: AsAttributes;\n};\n\nexport type BookmarkTabsPropGetItemKey<ITEM> = (item: ITEM) => string | number;\nexport type BookmarkTabsPropGetItemLabel<ITEM> = (\n item: ITEM,\n) => string | number | undefined;\nexport type BookmarkTabsPropGetItemLeftIcon<ITEM> = (\n item: ITEM,\n) => IconComponent | undefined;\nexport type BookmarkTabsPropGetItemRightIcon<ITEM> = (\n item: ITEM,\n) => IconComponent | undefined;\nexport type BookmarkTabsPropGetItemFixed<ITEM> = (\n item: ITEM,\n) => boolean | undefined;\nexport type BookmarkTabsPropGetItemAs<ITEM> = (\n item: ITEM,\n) => AsTags | undefined;\nexport type BookmarkTabsPropGetItemRef<ITEM> = (\n item: ITEM,\n) => React.RefObject<HTMLElement> | undefined;\nexport type BookmarkTabsPropGetItemAttributes<ITEM> = (\n item: ITEM,\n) => AsAttributes | undefined;\n\nexport type BookmarkTabsPropOnChange<ITEM> = (\n value: ITEM,\n params: {\n e: React.MouseEvent;\n },\n) => void;\n\nexport type BookmarkTabsRenderItemProps<ITEM> = {\n item: ITEM;\n hovered?: boolean;\n onClick: React.MouseEventHandler;\n active?: boolean;\n onClose?: React.MouseEventHandler;\n size: BookmarkTabsPropSize;\n form: BookmarkTabsPropForm;\n view: BookmarkTabsPropView;\n bordered?: boolean;\n tabWidth?: string;\n tabRef?: React.RefObject<HTMLElement>;\n} & Omit<BookmarkTabsItemDefault, 'key' | 'ref'>;\n\nexport type BookmarkTabsPropRenderItem<ITEM> = (\n props: BookmarkTabsRenderItemProps<ITEM>,\n) => React.ReactNode | null;\n\nexport type BookmarkTabsPropOnRemove<ITEM> = (\n item: ITEM,\n params: { e: React.MouseEvent },\n) => void;\n\nexport type BookmarkTabsProps<ITEM = BookmarkTabsItemDefault> =\n PropsWithHTMLAttributesAndRef<\n {\n size?: BookmarkTabsPropSize;\n form?: BookmarkTabsPropForm;\n view?: BookmarkTabsPropView;\n items: ITEM[];\n value?: ITEM | null;\n getItemKey?: BookmarkTabsPropGetItemKey<ITEM>;\n getItemLabel?: BookmarkTabsPropGetItemLabel<ITEM>;\n getItemLeftIcon?: BookmarkTabsPropGetItemLeftIcon<ITEM>;\n getItemRightIcon?: BookmarkTabsPropGetItemRightIcon<ITEM>;\n getItemFixed?: BookmarkTabsPropGetItemFixed<ITEM>;\n getItemAs?: BookmarkTabsPropGetItemAs<ITEM>;\n getItemRef?: BookmarkTabsPropGetItemRef<ITEM>;\n getItemAttributes?: BookmarkTabsPropGetItemAttributes<ITEM>;\n children?: never;\n withNavigationButtons?: boolean;\n onCreate?: React.MouseEventHandler;\n onRemove?: BookmarkTabsPropOnRemove<ITEM>;\n onChange?: BookmarkTabsPropOnChange<ITEM>;\n renderItem?: BookmarkTabsPropRenderItem<ITEM>;\n },\n HTMLDivElement\n > &\n (ITEM extends { key: string | number }\n ? {}\n : {\n getItemKey: BookmarkTabsPropGetItemKey<ITEM>;\n });\n\nexport type BookmarkTabsComponent = <ITEM>(\n props: BookmarkTabsProps<ITEM>,\n) => React.ReactNode | null;\n\nexport type BookmarkTabsTabProps<AS extends AsTags = 'div'> =\n PropsWithAsAttributes<\n {\n hovered?: boolean;\n size: BookmarkTabsPropSize;\n form: BookmarkTabsPropForm;\n view: BookmarkTabsPropView;\n active?: boolean;\n tabWidth?: string;\n bordered?: boolean;\n tabRef?: React.RefObject<HTMLElement>;\n fixed?: boolean;\n onClose?: React.ReactEventHandler;\n },\n AS\n > &\n Omit<BookmarkTabsItemDefault, 'key' | 'attributes' | 'ref'>;\n\nexport type BookmarkTabsTabComponent = <AS extends AsTags = 'div'>(\n props: BookmarkTabsTabProps<AS>,\n) => React.ReactNode | null;\n"],"mappings":"AAOA,MAAO,IAAMA,qBAAoB,CAAG,CAAC,GAAD,CAAM,GAAN,CAA7B,CAEP,MAAO,IAAMC,4BAAiD,CAC5DD,oBAAoB,CAAC,CAAD,CADf,CAGP,MAAO,IAAME,qBAAoB,CAAG,CAAC,OAAD,CAAU,OAAV,CAA7B,CAEP,MAAO,IAAMC,4BAAiD,CAC5DD,oBAAoB,CAAC,CAAD,CADf,CAGP,MAAO,IAAME,qBAAoB,CAAG,CAAC,OAAD,CAAU,OAAV,CAA7B,CAEP,MAAO,IAAMC,4BAAiD,CAC5DD,oBAAoB,CAAC,CAAD,CADf"}
1
+ {"version":3,"file":"types.js","names":["bookmarkTabsPropSize","bookmarkTabsPropSizeDefault","bookmarkTabsPropForm","bookmarkTabsPropFormDefault","bookmarkTabsPropView","bookmarkTabsPropViewDefault"],"sources":["../../../../../src/components/BookmarkTabs/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { AsAttributes, AsTags } from '##/utils/types/AsTags';\nimport { PropsWithAsAttributes } from '##/utils/types/PropsWithAsAttributes';\nimport { PropsWithHTMLAttributesAndRef } from '##/utils/types/PropsWithHTMLAttributes';\n\nexport const bookmarkTabsPropSize = ['m', 's'] as const;\nexport type BookmarkTabsPropSize = (typeof bookmarkTabsPropSize)[number];\nexport const bookmarkTabsPropSizeDefault: BookmarkTabsPropSize =\n bookmarkTabsPropSize[0];\n\nexport const bookmarkTabsPropForm = ['brick', 'round'] as const;\nexport type BookmarkTabsPropForm = (typeof bookmarkTabsPropForm)[number];\nexport const bookmarkTabsPropFormDefault: BookmarkTabsPropForm =\n bookmarkTabsPropForm[0];\n\nexport const bookmarkTabsPropView = ['ghost', 'clear'] as const;\nexport type BookmarkTabsPropView = (typeof bookmarkTabsPropView)[number];\nexport const bookmarkTabsPropViewDefault: BookmarkTabsPropView =\n bookmarkTabsPropView[0];\n\nexport type BookmarkTabsItemDefault = {\n key: string | number;\n label?: string | number;\n leftIcon?: IconComponent;\n rightIcon?: IconComponent;\n fixed?: boolean;\n as?: AsTags;\n ref?: React.RefObject<HTMLElement>;\n attributes?: AsAttributes;\n};\n\nexport type BookmarkTabsPropGetItemKey<ITEM> = (item: ITEM) => string | number;\nexport type BookmarkTabsPropGetItemLabel<ITEM> = (\n item: ITEM,\n) => string | number | undefined;\nexport type BookmarkTabsPropGetItemLeftIcon<ITEM> = (\n item: ITEM,\n) => IconComponent | undefined;\nexport type BookmarkTabsPropGetItemRightIcon<ITEM> = (\n item: ITEM,\n) => IconComponent | undefined;\nexport type BookmarkTabsPropGetItemFixed<ITEM> = (\n item: ITEM,\n) => boolean | undefined;\nexport type BookmarkTabsPropGetItemAs<ITEM> = (\n item: ITEM,\n) => AsTags | undefined;\nexport type BookmarkTabsPropGetItemRef<ITEM> = (\n item: ITEM,\n) => React.RefObject<HTMLElement> | undefined;\nexport type BookmarkTabsPropGetItemAttributes<ITEM> = (\n item: ITEM,\n) => AsAttributes | undefined;\n\nexport type BookmarkTabsPropOnChange<ITEM> = (\n value: ITEM,\n params: {\n e: React.MouseEvent;\n },\n) => void;\n\nexport type BookmarkTabsRenderItemProps<ITEM> = {\n item: ITEM;\n hovered?: boolean;\n onClick: React.MouseEventHandler;\n active?: boolean;\n onClose?: React.MouseEventHandler;\n size: BookmarkTabsPropSize;\n form: BookmarkTabsPropForm;\n view: BookmarkTabsPropView;\n bordered?: boolean;\n tabWidth?: string;\n tabRef?: React.RefObject<HTMLElement>;\n} & Omit<BookmarkTabsItemDefault, 'key' | 'ref'>;\n\nexport type BookmarkTabsPropRenderItem<ITEM> = (\n props: BookmarkTabsRenderItemProps<ITEM>,\n) => React.ReactNode | null;\n\nexport type BookmarkTabsPropOnRemove<ITEM> = (\n item: ITEM,\n params: { e: React.MouseEvent },\n) => void;\n\nexport type BookmarkTabsProps<ITEM = BookmarkTabsItemDefault> =\n PropsWithHTMLAttributesAndRef<\n {\n size?: BookmarkTabsPropSize;\n form?: BookmarkTabsPropForm;\n view?: BookmarkTabsPropView;\n items: ITEM[];\n value?: ITEM | null;\n getItemKey?: BookmarkTabsPropGetItemKey<ITEM>;\n getItemLabel?: BookmarkTabsPropGetItemLabel<ITEM>;\n getItemLeftIcon?: BookmarkTabsPropGetItemLeftIcon<ITEM>;\n getItemRightIcon?: BookmarkTabsPropGetItemRightIcon<ITEM>;\n getItemFixed?: BookmarkTabsPropGetItemFixed<ITEM>;\n getItemAs?: BookmarkTabsPropGetItemAs<ITEM>;\n getItemRef?: BookmarkTabsPropGetItemRef<ITEM>;\n getItemAttributes?: BookmarkTabsPropGetItemAttributes<ITEM>;\n children?: never;\n withNavigationButtons?: boolean;\n onCreate?: React.MouseEventHandler;\n onRemove?: BookmarkTabsPropOnRemove<ITEM>;\n onChange?: BookmarkTabsPropOnChange<ITEM>;\n renderItem?: BookmarkTabsPropRenderItem<ITEM>;\n },\n HTMLDivElement\n > &\n (ITEM extends { key: string | number }\n ? {}\n : {\n getItemKey: BookmarkTabsPropGetItemKey<ITEM>;\n });\n\nexport type BookmarkTabsComponent = <ITEM>(\n props: BookmarkTabsProps<ITEM>,\n) => React.ReactNode | null;\n\nexport type BookmarkTabsTabProps<AS extends AsTags = 'div'> =\n PropsWithAsAttributes<\n {\n hovered?: boolean;\n size: BookmarkTabsPropSize;\n form: BookmarkTabsPropForm;\n view: BookmarkTabsPropView;\n active?: boolean;\n tabWidth?: string;\n bordered?: boolean;\n tabRef?: React.RefObject<HTMLElement>;\n fixed?: boolean;\n onClose?: React.ReactEventHandler;\n },\n AS\n > &\n Omit<BookmarkTabsItemDefault, 'key' | 'attributes' | 'ref'>;\n\nexport type BookmarkTabsTabComponent = <AS extends AsTags = 'div'>(\n props: BookmarkTabsTabProps<AS>,\n) => React.ReactNode | null;\n"],"mappings":"AAOA,MAAO,IAAMA,qBAAoB,CAAG,CAAC,GAAD,CAAM,GAAN,CAA7B,CAEP,MAAO,IAAMC,4BAAiD,CAC5DD,oBAAoB,CAAC,CAAD,CADf,CAGP,MAAO,IAAME,qBAAoB,CAAG,CAAC,OAAD,CAAU,OAAV,CAA7B,CAEP,MAAO,IAAMC,4BAAiD,CAC5DD,oBAAoB,CAAC,CAAD,CADf,CAGP,MAAO,IAAME,qBAAoB,CAAG,CAAC,OAAD,CAAU,OAAV,CAA7B,CAEP,MAAO,IAAMC,4BAAiD,CAC5DD,oBAAoB,CAAC,CAAD,CADf"}
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumbs.js","names":["React","forwardRef","cn","BreadcrumbsFitModeDropdown","BreadcrumbsFitModeScroll","BreadcrumbsItem","withDefaultGetters","breadcrumbPropFitModeDefault","breadcrumbPropSizeDefault","cnBreadcrumbs","BreadcrumbsRender","props","ref","items","getItemHref","getItemLabel","getItemIcon","getItemOnClick","getItemSubMenu","onItemClick","size","onlyIconRoot","className","fitMode","lastItemIsLink","otherProps","shortList","length","renderItem","item","index","isFirst","isLast","hidden","handleClick","e","map","Breadcrumbs"],"sources":["../../../../../src/components/Breadcrumbs/Breadcrumbs.tsx"],"sourcesContent":["import './Breadcrumbs.css';\n\nimport React, { forwardRef } from 'react';\n\nimport { cn } from '../../utils/bem';\nimport { BreadcrumbsFitModeDropdown } from './BreadcrumbsFitModeDropdown/BreadcrumbsFitModeDropdown';\nimport { BreadcrumbsFitModeScroll } from './BreadcrumbsFitModeScroll/BreadcrumbsFitModeScroll';\nimport { BreadcrumbsItem } from './BreadcrumbsItem/BreadcrumbsItem';\nimport { withDefaultGetters } from './helpers';\nimport {\n breadcrumbPropFitModeDefault,\n breadcrumbPropSizeDefault,\n BreadcrumbsComponent,\n BreadcrumbsPropOnItemClick,\n BreadcrumbsProps,\n RenderItem,\n} from './types';\n\nexport const cnBreadcrumbs = cn('Breadcrumbs');\n\nconst BreadcrumbsRender = (\n props: BreadcrumbsProps,\n ref: React.Ref<HTMLUListElement>,\n) => {\n const {\n items,\n getItemHref,\n getItemLabel,\n getItemIcon,\n getItemOnClick,\n getItemSubMenu,\n onItemClick,\n size = breadcrumbPropSizeDefault,\n onlyIconRoot = false,\n className,\n fitMode = breadcrumbPropFitModeDefault,\n lastItemIsLink,\n ...otherProps\n } = withDefaultGetters(props);\n\n type Item = typeof items[number];\n\n const shortList = items.length <= 2;\n\n const renderItem: RenderItem<Item> = (\n item,\n index,\n isFirst,\n isLast,\n ref,\n hidden,\n ) => {\n if (item === undefined) {\n return;\n }\n\n const handleClick: BreadcrumbsPropOnItemClick<Item> = (item, { e }) => {\n getItemOnClick?.(item)?.(e);\n onItemClick?.(item, { e });\n };\n\n return (\n <BreadcrumbsItem\n className={cnBreadcrumbs('Item', { hidden })}\n item={item}\n getItemHref={getItemHref}\n getItemIcon={getItemIcon}\n getItemLabel={getItemLabel}\n getItemSubMenu={getItemSubMenu}\n onItemClick={handleClick}\n active={lastItemIsLink ? false : isLast}\n delimiter={!isFirst}\n onlyIcon={onlyIconRoot && isFirst}\n key={cnBreadcrumbs('Item', { index })}\n size={size}\n ref={ref}\n />\n );\n };\n\n if (items.length <= 2) {\n return (\n <ul\n {...otherProps}\n className={cnBreadcrumbs({ shortList }, [className])}\n ref={ref}\n >\n {items.map((item, index) =>\n renderItem(item, index, index === 0, index === items.length - 1),\n )}\n </ul>\n );\n }\n\n if (fitMode === 'scroll') {\n return (\n <BreadcrumbsFitModeScroll\n {...otherProps}\n className={cnBreadcrumbs(null, [className])}\n items={items}\n renderItem={renderItem}\n ref={ref}\n />\n );\n }\n\n return (\n <BreadcrumbsFitModeDropdown\n {...otherProps}\n size={size}\n className={cnBreadcrumbs(null, [className])}\n items={items}\n getItemHref={getItemHref}\n getItemIcon={getItemIcon}\n getItemLabel={getItemLabel}\n getItemOnClick={getItemOnClick}\n getItemSubMenu={getItemSubMenu}\n onItemClick={onItemClick}\n ref={ref}\n renderItem={renderItem}\n />\n );\n};\n\nexport const Breadcrumbs = forwardRef(\n BreadcrumbsRender,\n) as BreadcrumbsComponent;\n\nexport * from './types';\n"],"mappings":"qQAAA,0BAEA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,EAAT,uBACA,OAASC,0BAAT,+DACA,OAASC,wBAAT,2DACA,OAASC,eAAT,yCACA,OAASC,kBAAT,iBACA,OACEC,4BADF,CAEEC,yBAFF,eASA,MAAO,IAAMC,cAAa,CAAGP,EAAE,CAAC,aAAD,CAAxB,CAEP,GAAMQ,kBAAiB,CAAG,SACxBC,CADwB,CAExBC,CAFwB,CAGrB,OAeCN,kBAAkB,CAACK,CAAD,CAfnB,CAEDE,CAFC,GAEDA,KAFC,CAGDC,CAHC,GAGDA,WAHC,CAIDC,CAJC,GAIDA,YAJC,CAKDC,CALC,GAKDA,WALC,CAMDC,CANC,GAMDA,cANC,CAODC,CAPC,GAODA,cAPC,CAQDC,CARC,GAQDA,WARC,KASDC,IATC,CASDA,CATC,YASMZ,yBATN,OAUDa,YAVC,CAWDC,CAXC,GAWDA,SAXC,KAYDC,OAZC,CAYDA,CAZC,YAYShB,4BAZT,GAaDiB,CAbC,GAaDA,cAbC,CAcEC,CAdF,uCAmBGC,CAAS,CAAmB,CAAhB,EAAAb,CAAK,CAACc,MAnBrB,CAqBGC,CAA4B,CAAG,SACnCC,CADmC,CAEnCC,CAFmC,CAGnCC,CAHmC,CAInCC,CAJmC,CAKnCpB,CALmC,CAMnCqB,CANmC,CAOhC,CACH,GAAI,SAAAJ,CAAJ,EAIA,GAAMK,EAA6C,CAAG,SAACL,CAAD,GAAiB,OAARM,CAAQ,GAARA,CAAQ,QACrElB,CADqE,WACrEA,C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,UAAU,CAAEe,CAJd,CAKE,GAAG,CAAEhB,CALP,GAzED,CAoFD,oBAAC,0BAAD,kBACMa,CADN,EAEE,IAAI,CAAEL,CAFR,CAGE,SAAS,CAAEX,aAAa,CAAC,IAAD,CAAO,CAACa,CAAD,CAAP,CAH1B,CAIE,KAAK,CAAET,CAJT,CAKE,WAAW,CAAEC,CALf,CAME,WAAW,CAAEE,CANf,CAOE,YAAY,CAAED,CAPhB,CAQE,cAAc,CAAEE,CARlB,CASE,cAAc,CAAEC,CATlB,CAUE,WAAW,CAAEC,CAVf,CAWE,GAAG,CAAEP,CAXP,CAYE,UAAU,CAAEgB,CAZd,GAeH,CAtGD,CAwGA,MAAO,IAAMS,YAAW,CAAGpC,UAAU,CACnCS,iBADmC,CAA9B,CAIP"}
1
+ {"version":3,"file":"Breadcrumbs.js","names":["React","forwardRef","cn","BreadcrumbsFitModeDropdown","BreadcrumbsFitModeScroll","BreadcrumbsItem","withDefaultGetters","breadcrumbPropFitModeDefault","breadcrumbPropSizeDefault","cnBreadcrumbs","BreadcrumbsRender","props","ref","items","getItemHref","getItemLabel","getItemIcon","getItemOnClick","getItemSubMenu","onItemClick","size","onlyIconRoot","className","fitMode","lastItemIsLink","otherProps","shortList","length","renderItem","item","index","isFirst","isLast","hidden","handleClick","e","map","Breadcrumbs"],"sources":["../../../../../src/components/Breadcrumbs/Breadcrumbs.tsx"],"sourcesContent":["import './Breadcrumbs.css';\n\nimport React, { forwardRef } from 'react';\n\nimport { cn } from '../../utils/bem';\nimport { BreadcrumbsFitModeDropdown } from './BreadcrumbsFitModeDropdown/BreadcrumbsFitModeDropdown';\nimport { BreadcrumbsFitModeScroll } from './BreadcrumbsFitModeScroll/BreadcrumbsFitModeScroll';\nimport { BreadcrumbsItem } from './BreadcrumbsItem/BreadcrumbsItem';\nimport { withDefaultGetters } from './helpers';\nimport {\n breadcrumbPropFitModeDefault,\n breadcrumbPropSizeDefault,\n BreadcrumbsComponent,\n BreadcrumbsPropOnItemClick,\n BreadcrumbsProps,\n RenderItem,\n} from './types';\n\nexport const cnBreadcrumbs = cn('Breadcrumbs');\n\nconst BreadcrumbsRender = (\n props: BreadcrumbsProps,\n ref: React.Ref<HTMLUListElement>,\n) => {\n const {\n items,\n getItemHref,\n getItemLabel,\n getItemIcon,\n getItemOnClick,\n getItemSubMenu,\n onItemClick,\n size = breadcrumbPropSizeDefault,\n onlyIconRoot = false,\n className,\n fitMode = breadcrumbPropFitModeDefault,\n lastItemIsLink,\n ...otherProps\n } = withDefaultGetters(props);\n\n type Item = (typeof items)[number];\n\n const shortList = items.length <= 2;\n\n const renderItem: RenderItem<Item> = (\n item,\n index,\n isFirst,\n isLast,\n ref,\n hidden,\n ) => {\n if (item === undefined) {\n return;\n }\n\n const handleClick: BreadcrumbsPropOnItemClick<Item> = (item, { e }) => {\n getItemOnClick?.(item)?.(e);\n onItemClick?.(item, { e });\n };\n\n return (\n <BreadcrumbsItem\n className={cnBreadcrumbs('Item', { hidden })}\n item={item}\n getItemHref={getItemHref}\n getItemIcon={getItemIcon}\n getItemLabel={getItemLabel}\n getItemSubMenu={getItemSubMenu}\n onItemClick={handleClick}\n active={lastItemIsLink ? false : isLast}\n delimiter={!isFirst}\n onlyIcon={onlyIconRoot && isFirst}\n key={cnBreadcrumbs('Item', { index })}\n size={size}\n ref={ref}\n />\n );\n };\n\n if (items.length <= 2) {\n return (\n <ul\n {...otherProps}\n className={cnBreadcrumbs({ shortList }, [className])}\n ref={ref}\n >\n {items.map((item, index) =>\n renderItem(item, index, index === 0, index === items.length - 1),\n )}\n </ul>\n );\n }\n\n if (fitMode === 'scroll') {\n return (\n <BreadcrumbsFitModeScroll\n {...otherProps}\n className={cnBreadcrumbs(null, [className])}\n items={items}\n renderItem={renderItem}\n ref={ref}\n />\n );\n }\n\n return (\n <BreadcrumbsFitModeDropdown\n {...otherProps}\n size={size}\n className={cnBreadcrumbs(null, [className])}\n items={items}\n getItemHref={getItemHref}\n getItemIcon={getItemIcon}\n getItemLabel={getItemLabel}\n getItemOnClick={getItemOnClick}\n getItemSubMenu={getItemSubMenu}\n onItemClick={onItemClick}\n ref={ref}\n renderItem={renderItem}\n />\n );\n};\n\nexport const Breadcrumbs = forwardRef(\n BreadcrumbsRender,\n) as BreadcrumbsComponent;\n\nexport * from './types';\n"],"mappings":"qQAAA,0BAEA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,EAAT,uBACA,OAASC,0BAAT,+DACA,OAASC,wBAAT,2DACA,OAASC,eAAT,yCACA,OAASC,kBAAT,iBACA,OACEC,4BADF,CAEEC,yBAFF,eASA,MAAO,IAAMC,cAAa,CAAGP,EAAE,CAAC,aAAD,CAAxB,CAEP,GAAMQ,kBAAiB,CAAG,SACxBC,CADwB,CAExBC,CAFwB,CAGrB,OAeCN,kBAAkB,CAACK,CAAD,CAfnB,CAEDE,CAFC,GAEDA,KAFC,CAGDC,CAHC,GAGDA,WAHC,CAIDC,CAJC,GAIDA,YAJC,CAKDC,CALC,GAKDA,WALC,CAMDC,CANC,GAMDA,cANC,CAODC,CAPC,GAODA,cAPC,CAQDC,CARC,GAQDA,WARC,KASDC,IATC,CASDA,CATC,YASMZ,yBATN,OAUDa,YAVC,CAWDC,CAXC,GAWDA,SAXC,KAYDC,OAZC,CAYDA,CAZC,YAYShB,4BAZT,GAaDiB,CAbC,GAaDA,cAbC,CAcEC,CAdF,uCAmBGC,CAAS,CAAmB,CAAhB,EAAAb,CAAK,CAACc,MAnBrB,CAqBGC,CAA4B,CAAG,SACnCC,CADmC,CAEnCC,CAFmC,CAGnCC,CAHmC,CAInCC,CAJmC,CAKnCpB,CALmC,CAMnCqB,CANmC,CAOhC,CACH,GAAI,SAAAJ,CAAJ,EAIA,GAAMK,EAA6C,CAAG,SAACL,CAAD,GAAiB,OAARM,CAAQ,GAARA,CAAQ,QACrElB,CADqE,WACrEA,CADqE,YACrEA,CAAc,CAAGY,CAAH,CADuD,qBACrE,EAAyBM,CAAzB,CADqE,QAErEh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,kBACMa,CADN,EAEE,IAAI,CAAEL,CAFR,CAGE,SAAS,CAAEX,aAAa,CAAC,IAAD,CAAO,CAACa,CAAD,CAAP,CAH1B,CAIE,KAAK,CAAET,CAJT,CAKE,WAAW,CAAEC,CALf,CAME,WAAW,CAAEE,CANf,CAOE,YAAY,CAAED,CAPhB,CAQE,cAAc,CAAEE,CARlB,CASE,cAAc,CAAEC,CATlB,CAUE,WAAW,CAAEC,CAVf,CAWE,GAAG,CAAEP,CAXP,CAYE,UAAU,CAAEgB,CAZd,GAeH,CAtGD,CAwGA,MAAO,IAAMS,YAAW,CAAGpC,UAAU,CACnCS,iBADmC,CAA9B,CAIP"}
@@ -1,10 +1,10 @@
1
1
  import { IconComponent } from '@consta/icons/Icon';
2
2
  import { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';
3
3
  export declare const breadcrumbPropSize: readonly ["m", "xs", "s", "l"];
4
- export type BreadcrumbPropSize = typeof breadcrumbPropSize[number];
4
+ export type BreadcrumbPropSize = (typeof breadcrumbPropSize)[number];
5
5
  export declare const breadcrumbPropSizeDefault: "m";
6
6
  export declare const breadcrumbPropFitMode: readonly ["dropdown", "scroll"];
7
- export type BreadcrumbPropFitMode = typeof breadcrumbPropFitMode[number];
7
+ export type BreadcrumbPropFitMode = (typeof breadcrumbPropFitMode)[number];
8
8
  export declare const breadcrumbPropFitModeDefault: "dropdown";
9
9
  export type BreadcrumbsPropGetItemLabel<ITEM> = (item: ITEM) => string;
10
10
  export type BreadcrumbsPropGetItemHref<ITEM> = (item: ITEM) => string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["breadcrumbPropSize","breadcrumbPropSizeDefault","breadcrumbPropFitMode","breadcrumbPropFitModeDefault"],"sources":["../../../../../src/components/Breadcrumbs/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\n\nimport { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\n\nexport const breadcrumbPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type BreadcrumbPropSize = typeof breadcrumbPropSize[number];\nexport const breadcrumbPropSizeDefault = breadcrumbPropSize[0];\n\nexport const breadcrumbPropFitMode = ['dropdown', 'scroll'] as const;\nexport type BreadcrumbPropFitMode = typeof breadcrumbPropFitMode[number];\nexport const breadcrumbPropFitModeDefault = breadcrumbPropFitMode[0];\n\nexport type BreadcrumbsPropGetItemLabel<ITEM> = (item: ITEM) => string;\nexport type BreadcrumbsPropGetItemHref<ITEM> = (\n item: ITEM,\n) => string | undefined;\nexport type BreadcrumbsPropGetItemIcon<ITEM> = (\n item: ITEM,\n) => IconComponent | undefined;\nexport type BreadcrumbsPropGetItemSubMenu<ITEM> = (\n item: ITEM,\n) => ITEM[] | undefined;\nexport type BreadcrumbsPropGetItemOnClick<ITEM> = (\n item: ITEM,\n) => React.MouseEventHandler | undefined;\nexport type BreadcrumbsPropOnItemClick<ITEM> = (\n item: ITEM,\n props: {\n e: React.MouseEvent;\n },\n) => void;\n\nexport type BreadcrumbsDefaultItem = {\n label: string;\n icon?: IconComponent;\n href?: string;\n onClick?: React.MouseEventHandler<HTMLAnchorElement>;\n subMenu?: BreadcrumbsDefaultItem[];\n};\n\nexport type DefaultItem = BreadcrumbsDefaultItem;\n\nexport type RenderItem<ITEM> = (\n item: ITEM | undefined,\n index: number | string,\n isFirst?: boolean,\n isLast?: boolean,\n ref?: React.Ref<HTMLLIElement>,\n hidden?: boolean,\n) => React.ReactNode | undefined;\n\nexport type BreadcrumbsProps<ITEM = BreadcrumbsDefaultItem> =\n PropsWithHTMLAttributesAndRef<\n {\n items: ITEM[];\n getItemLabel?: BreadcrumbsPropGetItemLabel<ITEM>;\n getItemHref?: BreadcrumbsPropGetItemHref<ITEM>;\n getItemIcon?: BreadcrumbsPropGetItemIcon<ITEM>;\n getItemOnClick?: BreadcrumbsPropGetItemOnClick<ITEM>;\n getItemSubMenu?: BreadcrumbsPropGetItemSubMenu<ITEM>;\n onItemClick?: BreadcrumbsPropOnItemClick<ITEM>;\n size?: BreadcrumbPropSize;\n onlyIconRoot?: boolean;\n fitMode?: BreadcrumbPropFitMode;\n lastItemIsLink?: boolean;\n },\n HTMLUListElement\n > &\n (ITEM extends { label: BreadcrumbsDefaultItem['label'] }\n ? {}\n : { getItemLabel: BreadcrumbsPropGetItemLabel<ITEM> });\n\nexport type BreadcrumbsComponent = <ITEM>(\n props: BreadcrumbsProps<ITEM>,\n) => React.ReactNode | null;\n\nexport type BreadcrumbsMoreProps<ITEM> = PropsWithHTMLAttributesAndRef<\n {\n size: BreadcrumbPropSize;\n items: ITEM[];\n getItemLabel: BreadcrumbsPropGetItemLabel<ITEM>;\n getItemHref: BreadcrumbsPropGetItemHref<ITEM>;\n getItemIcon: BreadcrumbsPropGetItemIcon<ITEM>;\n getItemSubMenu: BreadcrumbsPropGetItemSubMenu<ITEM>;\n getItemOnClick: BreadcrumbsPropGetItemOnClick<ITEM>;\n onItemClick?: BreadcrumbsPropOnItemClick<ITEM>;\n },\n HTMLLIElement\n>;\n\nexport type BreadcrumbsMoreComponent = <ITEM>(\n props: BreadcrumbsMoreProps<ITEM>,\n) => React.ReactNode | null;\n\nexport type BreadcrumbsItemProps<ITEM> = PropsWithHTMLAttributesAndRef<\n {\n size: 'm' | 'xs' | 's' | 'l';\n item?: ITEM;\n getItemLabel?: BreadcrumbsPropGetItemLabel<ITEM>;\n getItemHref?: BreadcrumbsPropGetItemHref<ITEM>;\n getItemIcon?: BreadcrumbsPropGetItemIcon<ITEM>;\n getItemSubMenu?: BreadcrumbsPropGetItemSubMenu<ITEM>;\n active?: boolean;\n onlyIcon?: boolean;\n delimiter?: boolean;\n onItemClick?: BreadcrumbsPropOnItemClick<ITEM>;\n },\n HTMLLIElement\n>;\n\nexport type BreadcrumbsItemComponent = <ITEM>(\n props: BreadcrumbsItemProps<ITEM>,\n) => React.ReactNode | null;\n\nexport type BreadcrumbsFitModeDropdownProps<ITEM> =\n PropsWithHTMLAttributesAndRef<\n {\n items: ITEM[];\n getItemLabel: BreadcrumbsPropGetItemLabel<ITEM>;\n getItemHref: BreadcrumbsPropGetItemHref<ITEM>;\n getItemIcon: BreadcrumbsPropGetItemIcon<ITEM>;\n getItemOnClick: BreadcrumbsPropGetItemOnClick<ITEM>;\n getItemSubMenu: BreadcrumbsPropGetItemSubMenu<ITEM>;\n onItemClick?: BreadcrumbsPropOnItemClick<ITEM>;\n renderItem: RenderItem<ITEM>;\n size: BreadcrumbPropSize;\n },\n HTMLUListElement\n >;\n\nexport type BreadcrumbsFitModeDropdownComponent = <ITEM>(\n props: BreadcrumbsFitModeDropdownProps<ITEM>,\n) => React.ReactNode | null;\n\nexport type BreadcrumbsFitModeScrollProps<ITEM> = PropsWithHTMLAttributesAndRef<\n {\n items: ITEM[];\n renderItem: RenderItem<ITEM>;\n },\n HTMLUListElement\n>;\n\nexport type BreadcrumbsFitModeScrollComponent = <ITEM>(\n props: BreadcrumbsFitModeScrollProps<ITEM>,\n) => React.ReactNode | null;\n\nexport type BreadcrumbsShortListComponent = <ITEM>(\n props: BreadcrumbsFitModeScrollProps<ITEM>,\n) => React.ReactNode | null;\n"],"mappings":"AAIA,MAAO,IAAMA,mBAAkB,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAA3B,CAEP,MAAO,IAAMC,0BAAyB,CAAGD,kBAAkB,CAAC,CAAD,CAApD,CAEP,MAAO,IAAME,sBAAqB,CAAG,CAAC,UAAD,CAAa,QAAb,CAA9B,CAEP,MAAO,IAAMC,6BAA4B,CAAGD,qBAAqB,CAAC,CAAD,CAA1D"}
1
+ {"version":3,"file":"types.js","names":["breadcrumbPropSize","breadcrumbPropSizeDefault","breadcrumbPropFitMode","breadcrumbPropFitModeDefault"],"sources":["../../../../../src/components/Breadcrumbs/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\n\nimport { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\n\nexport const breadcrumbPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type BreadcrumbPropSize = (typeof breadcrumbPropSize)[number];\nexport const breadcrumbPropSizeDefault = breadcrumbPropSize[0];\n\nexport const breadcrumbPropFitMode = ['dropdown', 'scroll'] as const;\nexport type BreadcrumbPropFitMode = (typeof breadcrumbPropFitMode)[number];\nexport const breadcrumbPropFitModeDefault = breadcrumbPropFitMode[0];\n\nexport type BreadcrumbsPropGetItemLabel<ITEM> = (item: ITEM) => string;\nexport type BreadcrumbsPropGetItemHref<ITEM> = (\n item: ITEM,\n) => string | undefined;\nexport type BreadcrumbsPropGetItemIcon<ITEM> = (\n item: ITEM,\n) => IconComponent | undefined;\nexport type BreadcrumbsPropGetItemSubMenu<ITEM> = (\n item: ITEM,\n) => ITEM[] | undefined;\nexport type BreadcrumbsPropGetItemOnClick<ITEM> = (\n item: ITEM,\n) => React.MouseEventHandler | undefined;\nexport type BreadcrumbsPropOnItemClick<ITEM> = (\n item: ITEM,\n props: {\n e: React.MouseEvent;\n },\n) => void;\n\nexport type BreadcrumbsDefaultItem = {\n label: string;\n icon?: IconComponent;\n href?: string;\n onClick?: React.MouseEventHandler<HTMLAnchorElement>;\n subMenu?: BreadcrumbsDefaultItem[];\n};\n\nexport type DefaultItem = BreadcrumbsDefaultItem;\n\nexport type RenderItem<ITEM> = (\n item: ITEM | undefined,\n index: number | string,\n isFirst?: boolean,\n isLast?: boolean,\n ref?: React.Ref<HTMLLIElement>,\n hidden?: boolean,\n) => React.ReactNode | undefined;\n\nexport type BreadcrumbsProps<ITEM = BreadcrumbsDefaultItem> =\n PropsWithHTMLAttributesAndRef<\n {\n items: ITEM[];\n getItemLabel?: BreadcrumbsPropGetItemLabel<ITEM>;\n getItemHref?: BreadcrumbsPropGetItemHref<ITEM>;\n getItemIcon?: BreadcrumbsPropGetItemIcon<ITEM>;\n getItemOnClick?: BreadcrumbsPropGetItemOnClick<ITEM>;\n getItemSubMenu?: BreadcrumbsPropGetItemSubMenu<ITEM>;\n onItemClick?: BreadcrumbsPropOnItemClick<ITEM>;\n size?: BreadcrumbPropSize;\n onlyIconRoot?: boolean;\n fitMode?: BreadcrumbPropFitMode;\n lastItemIsLink?: boolean;\n },\n HTMLUListElement\n > &\n (ITEM extends { label: BreadcrumbsDefaultItem['label'] }\n ? {}\n : { getItemLabel: BreadcrumbsPropGetItemLabel<ITEM> });\n\nexport type BreadcrumbsComponent = <ITEM>(\n props: BreadcrumbsProps<ITEM>,\n) => React.ReactNode | null;\n\nexport type BreadcrumbsMoreProps<ITEM> = PropsWithHTMLAttributesAndRef<\n {\n size: BreadcrumbPropSize;\n items: ITEM[];\n getItemLabel: BreadcrumbsPropGetItemLabel<ITEM>;\n getItemHref: BreadcrumbsPropGetItemHref<ITEM>;\n getItemIcon: BreadcrumbsPropGetItemIcon<ITEM>;\n getItemSubMenu: BreadcrumbsPropGetItemSubMenu<ITEM>;\n getItemOnClick: BreadcrumbsPropGetItemOnClick<ITEM>;\n onItemClick?: BreadcrumbsPropOnItemClick<ITEM>;\n },\n HTMLLIElement\n>;\n\nexport type BreadcrumbsMoreComponent = <ITEM>(\n props: BreadcrumbsMoreProps<ITEM>,\n) => React.ReactNode | null;\n\nexport type BreadcrumbsItemProps<ITEM> = PropsWithHTMLAttributesAndRef<\n {\n size: 'm' | 'xs' | 's' | 'l';\n item?: ITEM;\n getItemLabel?: BreadcrumbsPropGetItemLabel<ITEM>;\n getItemHref?: BreadcrumbsPropGetItemHref<ITEM>;\n getItemIcon?: BreadcrumbsPropGetItemIcon<ITEM>;\n getItemSubMenu?: BreadcrumbsPropGetItemSubMenu<ITEM>;\n active?: boolean;\n onlyIcon?: boolean;\n delimiter?: boolean;\n onItemClick?: BreadcrumbsPropOnItemClick<ITEM>;\n },\n HTMLLIElement\n>;\n\nexport type BreadcrumbsItemComponent = <ITEM>(\n props: BreadcrumbsItemProps<ITEM>,\n) => React.ReactNode | null;\n\nexport type BreadcrumbsFitModeDropdownProps<ITEM> =\n PropsWithHTMLAttributesAndRef<\n {\n items: ITEM[];\n getItemLabel: BreadcrumbsPropGetItemLabel<ITEM>;\n getItemHref: BreadcrumbsPropGetItemHref<ITEM>;\n getItemIcon: BreadcrumbsPropGetItemIcon<ITEM>;\n getItemOnClick: BreadcrumbsPropGetItemOnClick<ITEM>;\n getItemSubMenu: BreadcrumbsPropGetItemSubMenu<ITEM>;\n onItemClick?: BreadcrumbsPropOnItemClick<ITEM>;\n renderItem: RenderItem<ITEM>;\n size: BreadcrumbPropSize;\n },\n HTMLUListElement\n >;\n\nexport type BreadcrumbsFitModeDropdownComponent = <ITEM>(\n props: BreadcrumbsFitModeDropdownProps<ITEM>,\n) => React.ReactNode | null;\n\nexport type BreadcrumbsFitModeScrollProps<ITEM> = PropsWithHTMLAttributesAndRef<\n {\n items: ITEM[];\n renderItem: RenderItem<ITEM>;\n },\n HTMLUListElement\n>;\n\nexport type BreadcrumbsFitModeScrollComponent = <ITEM>(\n props: BreadcrumbsFitModeScrollProps<ITEM>,\n) => React.ReactNode | null;\n\nexport type BreadcrumbsShortListComponent = <ITEM>(\n props: BreadcrumbsFitModeScrollProps<ITEM>,\n) => React.ReactNode | null;\n"],"mappings":"AAIA,MAAO,IAAMA,mBAAkB,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAA3B,CAEP,MAAO,IAAMC,0BAAyB,CAAGD,kBAAkB,CAAC,CAAD,CAApD,CAEP,MAAO,IAAME,sBAAqB,CAAG,CAAC,UAAD,CAAa,QAAb,CAA9B,CAEP,MAAO,IAAMC,6BAA4B,CAAGD,qBAAqB,CAAC,CAAD,CAA1D"}
@@ -2,16 +2,16 @@ import './Button.css';
2
2
  import { IconComponent, IconPropSize } from '@consta/icons/Icon';
3
3
  import React, { HTMLProps } from 'react';
4
4
  export declare const buttonPropSize: readonly ["m", "xs", "s", "l"];
5
- export type ButtonPropSize = typeof buttonPropSize[number];
5
+ export type ButtonPropSize = (typeof buttonPropSize)[number];
6
6
  export declare const buttonPropSizeDefault: ButtonPropSize;
7
7
  export declare const buttonPropView: readonly ["primary", "clear", "ghost", "secondary"];
8
- export type ButtonPropView = typeof buttonPropView[number];
8
+ export type ButtonPropView = (typeof buttonPropView)[number];
9
9
  export declare const buttonPropViewDefault: ButtonPropView;
10
10
  export declare const buttonPropWidth: readonly ["default", "full"];
11
- export type ButtonPropWidth = typeof buttonPropWidth[number];
11
+ export type ButtonPropWidth = (typeof buttonPropWidth)[number];
12
12
  export declare const buttonPropWidthDefault: ButtonPropWidth;
13
13
  export declare const buttonPropForm: readonly ["default", "brick", "round", "brickRound", "roundBrick", "brickDefault", "defaultBrick"];
14
- export type ButtonPropForm = typeof buttonPropForm[number];
14
+ export type ButtonPropForm = (typeof buttonPropForm)[number];
15
15
  export declare const buttonPropFormDefault: "default";
16
16
  export type Props = {
17
17
  size?: ButtonPropSize;