@foxford/ui 2.76.1-beta-3d975b5-20250715 → 2.77.0-beta-90a741d-20250807

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 (402) hide show
  1. package/LICENSE +27 -0
  2. package/components/Accordion/Accordion.js +1 -1
  3. package/components/Accordion/Accordion.js.map +1 -1
  4. package/components/Accordion/Accordion.mjs +1 -1
  5. package/components/Accordion/Accordion.mjs.map +1 -1
  6. package/components/Accordion/hooks.js +1 -1
  7. package/components/Accordion/hooks.js.map +1 -1
  8. package/components/Accordion/hooks.mjs +1 -1
  9. package/components/Accordion/hooks.mjs.map +1 -1
  10. package/components/AccordionItem/AccordionItem.js +1 -1
  11. package/components/AccordionItem/AccordionItem.js.map +1 -1
  12. package/components/AccordionItem/AccordionItem.mjs +1 -1
  13. package/components/AccordionItem/AccordionItem.mjs.map +1 -1
  14. package/components/ActionBtn/ActionBtn.js +1 -1
  15. package/components/ActionBtn/ActionBtn.js.map +1 -1
  16. package/components/ActionBtn/ActionBtn.mjs +1 -1
  17. package/components/ActionBtn/ActionBtn.mjs.map +1 -1
  18. package/components/ActionBtn/style.js.map +1 -1
  19. package/components/ActionBtn/style.mjs.map +1 -1
  20. package/components/Alert/Alert.js +1 -1
  21. package/components/Alert/Alert.js.map +1 -1
  22. package/components/Alert/Alert.mjs +1 -1
  23. package/components/Alert/Alert.mjs.map +1 -1
  24. package/components/Amount/Amount.js +1 -1
  25. package/components/Amount/Amount.js.map +1 -1
  26. package/components/Amount/Amount.mjs +1 -1
  27. package/components/Amount/Amount.mjs.map +1 -1
  28. package/components/Amount/data/index.js.map +1 -1
  29. package/components/Amount/data/index.mjs.map +1 -1
  30. package/components/Amount/style.js.map +1 -1
  31. package/components/Amount/style.mjs.map +1 -1
  32. package/components/Anchor/Anchor.js +1 -1
  33. package/components/Anchor/Anchor.js.map +1 -1
  34. package/components/Anchor/Anchor.mjs +1 -1
  35. package/components/Anchor/Anchor.mjs.map +1 -1
  36. package/components/Arrow/Arrow.js.map +1 -1
  37. package/components/Arrow/Arrow.mjs.map +1 -1
  38. package/components/ArrowBadge/ArrowBadge.js.map +1 -1
  39. package/components/ArrowBadge/ArrowBadge.mjs.map +1 -1
  40. package/components/AspectRatio/style.js.map +1 -1
  41. package/components/AspectRatio/style.mjs.map +1 -1
  42. package/components/Avatar/Avatar.js +1 -1
  43. package/components/Avatar/Avatar.js.map +1 -1
  44. package/components/Avatar/Avatar.mjs +1 -1
  45. package/components/Avatar/Avatar.mjs.map +1 -1
  46. package/components/Avatar/utils.js.map +1 -1
  47. package/components/Avatar/utils.mjs.map +1 -1
  48. package/components/Badge/Badge.js +1 -1
  49. package/components/Badge/Badge.js.map +1 -1
  50. package/components/Badge/Badge.mjs +1 -1
  51. package/components/Badge/Badge.mjs.map +1 -1
  52. package/components/Button/Button.js +1 -1
  53. package/components/Button/Button.js.map +1 -1
  54. package/components/Button/Button.mjs +1 -1
  55. package/components/Button/Button.mjs.map +1 -1
  56. package/components/Button/hooks.js.map +1 -1
  57. package/components/Button/hooks.mjs.map +1 -1
  58. package/components/Button/style.js.map +1 -1
  59. package/components/Button/style.mjs.map +1 -1
  60. package/components/Checkbox/Checkbox.js +1 -1
  61. package/components/Checkbox/Checkbox.js.map +1 -1
  62. package/components/Checkbox/Checkbox.mjs +1 -1
  63. package/components/Checkbox/Checkbox.mjs.map +1 -1
  64. package/components/Chip/Chip.js +1 -1
  65. package/components/Chip/Chip.js.map +1 -1
  66. package/components/Chip/Chip.mjs +1 -1
  67. package/components/Chip/Chip.mjs.map +1 -1
  68. package/components/Container/Container.js.map +1 -1
  69. package/components/Container/Container.mjs.map +1 -1
  70. package/components/Container/style.js.map +1 -1
  71. package/components/Container/style.mjs.map +1 -1
  72. package/components/ContextMenu/ContextMenu.js +1 -1
  73. package/components/ContextMenu/ContextMenu.js.map +1 -1
  74. package/components/ContextMenu/ContextMenu.mjs +1 -1
  75. package/components/ContextMenu/ContextMenu.mjs.map +1 -1
  76. package/components/ContextMenu/Item.js.map +1 -1
  77. package/components/ContextMenu/Item.mjs.map +1 -1
  78. package/components/ContextMenu/style.js.map +1 -1
  79. package/components/ContextMenu/style.mjs.map +1 -1
  80. package/components/ContextMenu.Multilevel/ContextMenu.Multilevel.js +1 -1
  81. package/components/ContextMenu.Multilevel/ContextMenu.Multilevel.js.map +1 -1
  82. package/components/ContextMenu.Multilevel/ContextMenu.Multilevel.mjs +1 -1
  83. package/components/ContextMenu.Multilevel/ContextMenu.Multilevel.mjs.map +1 -1
  84. package/components/ContextMenu.Multilevel/Controls.js.map +1 -1
  85. package/components/ContextMenu.Multilevel/Controls.mjs.map +1 -1
  86. package/components/Dialog/Dialog.js.map +1 -1
  87. package/components/Dialog/Dialog.mjs.map +1 -1
  88. package/components/DialogComponent/DialogComponent.js +1 -1
  89. package/components/DialogComponent/DialogComponent.js.map +1 -1
  90. package/components/DialogComponent/DialogComponent.mjs +1 -1
  91. package/components/DialogComponent/DialogComponent.mjs.map +1 -1
  92. package/components/DialogComponent/style.js.map +1 -1
  93. package/components/DialogComponent/style.mjs.map +1 -1
  94. package/components/Divider/style.js.map +1 -1
  95. package/components/Divider/style.mjs.map +1 -1
  96. package/components/Dropdown/Dropdown.js +1 -1
  97. package/components/Dropdown/Dropdown.js.map +1 -1
  98. package/components/Dropdown/Dropdown.mjs +1 -1
  99. package/components/Dropdown/Dropdown.mjs.map +1 -1
  100. package/components/Dropdown/DropdownMenuNoOptions.js +1 -1
  101. package/components/Dropdown/DropdownMenuNoOptions.js.map +1 -1
  102. package/components/Dropdown/DropdownMenuNoOptions.mjs +1 -1
  103. package/components/Dropdown/DropdownMenuNoOptions.mjs.map +1 -1
  104. package/components/Dropdown/hooks.js.map +1 -1
  105. package/components/Dropdown/hooks.mjs.map +1 -1
  106. package/components/FormInput/FormInput.js.map +1 -1
  107. package/components/FormInput/FormInput.mjs.map +1 -1
  108. package/components/FormInputLabel/FormInputLabel.js +1 -1
  109. package/components/FormInputLabel/FormInputLabel.js.map +1 -1
  110. package/components/FormInputLabel/FormInputLabel.mjs +1 -1
  111. package/components/FormInputLabel/FormInputLabel.mjs.map +1 -1
  112. package/components/FormLabel/FormLabel.js +1 -1
  113. package/components/FormLabel/FormLabel.js.map +1 -1
  114. package/components/FormLabel/FormLabel.mjs +1 -1
  115. package/components/FormLabel/FormLabel.mjs.map +1 -1
  116. package/components/Icon/Icon.js +1 -1
  117. package/components/Icon/Icon.js.map +1 -1
  118. package/components/Icon/Icon.mjs +1 -1
  119. package/components/Icon/Icon.mjs.map +1 -1
  120. package/components/Icon/bg-worker.js.map +1 -1
  121. package/components/Icon/bg-worker.mjs.map +1 -1
  122. package/components/Icon/list/default.js.map +1 -1
  123. package/components/Icon/list/default.mjs.map +1 -1
  124. package/components/Icon/list/icon-pack.js.map +1 -1
  125. package/components/Icon/list/icon-pack.mjs.map +1 -1
  126. package/components/IconButton/IconButton.js.map +1 -1
  127. package/components/IconButton/IconButton.mjs.map +1 -1
  128. package/components/Indicator/Indicator.js +1 -1
  129. package/components/Indicator/Indicator.js.map +1 -1
  130. package/components/Indicator/Indicator.mjs +1 -1
  131. package/components/Indicator/Indicator.mjs.map +1 -1
  132. package/components/Input/Input.js.map +1 -1
  133. package/components/Input/Input.mjs.map +1 -1
  134. package/components/Input/helpers.js.map +1 -1
  135. package/components/Input/helpers.mjs.map +1 -1
  136. package/components/Input.Phone/Input.Phone.js.map +1 -1
  137. package/components/Input.Phone/Input.Phone.mjs.map +1 -1
  138. package/components/InputCheckbox/InputCheckbox.js.map +1 -1
  139. package/components/InputCheckbox/InputCheckbox.mjs.map +1 -1
  140. package/components/InputRadio/InputRadio.js.map +1 -1
  141. package/components/InputRadio/InputRadio.mjs.map +1 -1
  142. package/components/ListItem/ListItem.js +1 -1
  143. package/components/ListItem/ListItem.js.map +1 -1
  144. package/components/ListItem/ListItem.mjs +1 -1
  145. package/components/ListItem/ListItem.mjs.map +1 -1
  146. package/components/Menu/Menu.js.map +1 -1
  147. package/components/Menu/Menu.mjs.map +1 -1
  148. package/components/MenuComponent/MenuComponent.js.map +1 -1
  149. package/components/MenuComponent/MenuComponent.mjs.map +1 -1
  150. package/components/MenuComponent/style.js +1 -1
  151. package/components/MenuComponent/style.js.map +1 -1
  152. package/components/MenuComponent/style.mjs +1 -1
  153. package/components/MenuComponent/style.mjs.map +1 -1
  154. package/components/MenuContainer/MenuContainer.js +1 -1
  155. package/components/MenuContainer/MenuContainer.js.map +1 -1
  156. package/components/MenuContainer/MenuContainer.mjs +1 -1
  157. package/components/MenuContainer/MenuContainer.mjs.map +1 -1
  158. package/components/MenuDivider/MenuDivider.js +1 -1
  159. package/components/MenuDivider/MenuDivider.js.map +1 -1
  160. package/components/MenuDivider/MenuDivider.mjs +1 -1
  161. package/components/MenuDivider/MenuDivider.mjs.map +1 -1
  162. package/components/MenuList/MenuList.js.map +1 -1
  163. package/components/MenuList/MenuList.mjs.map +1 -1
  164. package/components/Modal/Modal.js.map +1 -1
  165. package/components/Modal/Modal.mjs.map +1 -1
  166. package/components/Modal/adapter.js.map +1 -1
  167. package/components/Modal/adapter.mjs.map +1 -1
  168. package/components/Modal/style.js +1 -1
  169. package/components/Modal/style.js.map +1 -1
  170. package/components/Modal/style.mjs +1 -1
  171. package/components/Modal/style.mjs.map +1 -1
  172. package/components/Notification/Notification.js +1 -1
  173. package/components/Notification/Notification.js.map +1 -1
  174. package/components/Notification/Notification.mjs +1 -1
  175. package/components/Notification/Notification.mjs.map +1 -1
  176. package/components/Paper/Paper.js.map +1 -1
  177. package/components/Paper/Paper.mjs.map +1 -1
  178. package/components/Paper/style.js.map +1 -1
  179. package/components/Paper/style.mjs.map +1 -1
  180. package/components/Popover/Popover.js.map +1 -1
  181. package/components/Popover/Popover.mjs.map +1 -1
  182. package/components/PopoverComponent/PopoverComponent.js +1 -1
  183. package/components/PopoverComponent/PopoverComponent.js.map +1 -1
  184. package/components/PopoverComponent/PopoverComponent.mjs +1 -1
  185. package/components/PopoverComponent/PopoverComponent.mjs.map +1 -1
  186. package/components/Progress/Progress.js.map +1 -1
  187. package/components/Progress/Progress.mjs.map +1 -1
  188. package/components/Progress/style.js +1 -1
  189. package/components/Progress/style.js.map +1 -1
  190. package/components/Progress/style.mjs +1 -1
  191. package/components/Progress/style.mjs.map +1 -1
  192. package/components/Progress.Circle/Progress.Circle.js +1 -1
  193. package/components/Progress.Circle/Progress.Circle.js.map +1 -1
  194. package/components/Progress.Circle/Progress.Circle.mjs +1 -1
  195. package/components/Progress.Circle/Progress.Circle.mjs.map +1 -1
  196. package/components/Progress.Circle/style.js +1 -1
  197. package/components/Progress.Circle/style.js.map +1 -1
  198. package/components/Progress.Circle/style.mjs +1 -1
  199. package/components/Progress.Circle/style.mjs.map +1 -1
  200. package/components/Progress.Segmented/Progress.Segmented.js.map +1 -1
  201. package/components/Progress.Segmented/Progress.Segmented.mjs.map +1 -1
  202. package/components/Progress.Segmented/style.js.map +1 -1
  203. package/components/Progress.Segmented/style.mjs.map +1 -1
  204. package/components/ProgressCircle/ProgressCircle.js +1 -1
  205. package/components/ProgressCircle/ProgressCircle.js.map +1 -1
  206. package/components/ProgressCircle/ProgressCircle.mjs +1 -1
  207. package/components/ProgressCircle/ProgressCircle.mjs.map +1 -1
  208. package/components/ProgressCircle/style.js +1 -1
  209. package/components/ProgressCircle/style.js.map +1 -1
  210. package/components/ProgressCircle/style.mjs +1 -1
  211. package/components/ProgressCircle/style.mjs.map +1 -1
  212. package/components/ProgressLine/ProgressLine.js +1 -1
  213. package/components/ProgressLine/ProgressLine.js.map +1 -1
  214. package/components/ProgressLine/ProgressLine.mjs +1 -1
  215. package/components/ProgressLine/ProgressLine.mjs.map +1 -1
  216. package/components/Radio/Group.js.map +1 -1
  217. package/components/Radio/Group.mjs.map +1 -1
  218. package/components/Radio/Radio.js +1 -1
  219. package/components/Radio/Radio.js.map +1 -1
  220. package/components/Radio/Radio.mjs +1 -1
  221. package/components/Radio/Radio.mjs.map +1 -1
  222. package/components/Radio/style.js.map +1 -1
  223. package/components/Radio/style.mjs.map +1 -1
  224. package/components/Scrollable/Scrollable.js +1 -1
  225. package/components/Scrollable/Scrollable.js.map +1 -1
  226. package/components/Scrollable/Scrollable.mjs +1 -1
  227. package/components/Scrollable/Scrollable.mjs.map +1 -1
  228. package/components/Section/Section.js.map +1 -1
  229. package/components/Section/Section.mjs.map +1 -1
  230. package/components/Section/style.js +1 -1
  231. package/components/Section/style.js.map +1 -1
  232. package/components/Section/style.mjs +1 -1
  233. package/components/Section/style.mjs.map +1 -1
  234. package/components/Select/Select.js.map +1 -1
  235. package/components/Select/Select.mjs.map +1 -1
  236. package/components/Select/style.js +1 -1
  237. package/components/Select/style.js.map +1 -1
  238. package/components/Select/style.mjs +1 -1
  239. package/components/Select/style.mjs.map +1 -1
  240. package/components/Separator/Separator.js.map +1 -1
  241. package/components/Separator/Separator.mjs.map +1 -1
  242. package/components/Separator/SeparatorText.js.map +1 -1
  243. package/components/Separator/SeparatorText.mjs.map +1 -1
  244. package/components/Separator/style.js +1 -1
  245. package/components/Separator/style.js.map +1 -1
  246. package/components/Separator/style.mjs +1 -1
  247. package/components/Separator/style.mjs.map +1 -1
  248. package/components/Spacer/Spacer.js.map +1 -1
  249. package/components/Spacer/Spacer.mjs.map +1 -1
  250. package/components/Spacer/style.js.map +1 -1
  251. package/components/Spacer/style.mjs.map +1 -1
  252. package/components/Spinner/Spinner.js.map +1 -1
  253. package/components/Spinner/Spinner.mjs.map +1 -1
  254. package/components/Spinner/style.js +1 -1
  255. package/components/Spinner/style.js.map +1 -1
  256. package/components/Spinner/style.mjs +1 -1
  257. package/components/Spinner/style.mjs.map +1 -1
  258. package/components/Switch/Switch.js.map +1 -1
  259. package/components/Switch/Switch.mjs.map +1 -1
  260. package/components/Switcher/style.js.map +1 -1
  261. package/components/Switcher/style.mjs.map +1 -1
  262. package/components/Tab/Tab.js +1 -1
  263. package/components/Tab/Tab.js.map +1 -1
  264. package/components/Tab/Tab.mjs +1 -1
  265. package/components/Tab/Tab.mjs.map +1 -1
  266. package/components/TabList/TabList.js +1 -1
  267. package/components/TabList/TabList.js.map +1 -1
  268. package/components/TabList/TabList.mjs +1 -1
  269. package/components/TabList/TabList.mjs.map +1 -1
  270. package/components/TabList/TabListMenuTab.js +1 -1
  271. package/components/TabList/TabListMenuTab.js.map +1 -1
  272. package/components/TabList/TabListMenuTab.mjs +1 -1
  273. package/components/TabList/TabListMenuTab.mjs.map +1 -1
  274. package/components/TabList/TabListPanel.js.map +1 -1
  275. package/components/TabList/TabListPanel.mjs.map +1 -1
  276. package/components/TabList/hooks.js +1 -1
  277. package/components/TabList/hooks.js.map +1 -1
  278. package/components/TabList/hooks.mjs +1 -1
  279. package/components/TabList/hooks.mjs.map +1 -1
  280. package/components/TabList/style.js +1 -1
  281. package/components/TabList/style.js.map +1 -1
  282. package/components/TabList/style.mjs +1 -1
  283. package/components/TabList/style.mjs.map +1 -1
  284. package/components/TabListTab/TabListTab.js.map +1 -1
  285. package/components/TabListTab/TabListTab.mjs.map +1 -1
  286. package/components/TabListTab/style.js +1 -1
  287. package/components/TabListTab/style.js.map +1 -1
  288. package/components/TabListTab/style.mjs +1 -1
  289. package/components/TabListTab/style.mjs.map +1 -1
  290. package/components/Tabs/Tabs.js.map +1 -1
  291. package/components/Tabs/Tabs.mjs.map +1 -1
  292. package/components/Tabs/style.js +1 -1
  293. package/components/Tabs/style.js.map +1 -1
  294. package/components/Tabs/style.mjs +1 -1
  295. package/components/Tabs/style.mjs.map +1 -1
  296. package/components/Tag/Tag.js +1 -1
  297. package/components/Tag/Tag.js.map +1 -1
  298. package/components/Tag/Tag.mjs +1 -1
  299. package/components/Tag/Tag.mjs.map +1 -1
  300. package/components/Tag/style.js +1 -1
  301. package/components/Tag/style.js.map +1 -1
  302. package/components/Tag/style.mjs +1 -1
  303. package/components/Tag/style.mjs.map +1 -1
  304. package/components/Text/Ellipsis.js +1 -1
  305. package/components/Text/Ellipsis.js.map +1 -1
  306. package/components/Text/Ellipsis.mjs +1 -1
  307. package/components/Text/Ellipsis.mjs.map +1 -1
  308. package/components/Text/Text.js.map +1 -1
  309. package/components/Text/Text.mjs.map +1 -1
  310. package/components/Text/style.js.map +1 -1
  311. package/components/Text/style.mjs.map +1 -1
  312. package/components/Text.Ellipse/Text.Ellipse.js +1 -1
  313. package/components/Text.Ellipse/Text.Ellipse.js.map +1 -1
  314. package/components/Text.Ellipse/Text.Ellipse.mjs +1 -1
  315. package/components/Text.Ellipse/Text.Ellipse.mjs.map +1 -1
  316. package/components/Textarea/Textarea.js +1 -1
  317. package/components/Textarea/Textarea.js.map +1 -1
  318. package/components/Textarea/Textarea.mjs +1 -1
  319. package/components/Textarea/Textarea.mjs.map +1 -1
  320. package/components/Tooltip/Tooltip.js.map +1 -1
  321. package/components/Tooltip/Tooltip.mjs.map +1 -1
  322. package/components/Tooltip/TooltipWrapper.js.map +1 -1
  323. package/components/Tooltip/TooltipWrapper.mjs.map +1 -1
  324. package/components/TooltipComponent/TooltipComponent.js +1 -1
  325. package/components/TooltipComponent/TooltipComponent.js.map +1 -1
  326. package/components/TooltipComponent/TooltipComponent.mjs +1 -1
  327. package/components/TooltipComponent/TooltipComponent.mjs.map +1 -1
  328. package/dts/index.d.ts +2630 -2557
  329. package/hocs/withMergedProps.js.map +1 -1
  330. package/hocs/withMergedProps.mjs.map +1 -1
  331. package/hocs/withTranslation.js +1 -1
  332. package/hocs/withTranslation.js.map +1 -1
  333. package/hocs/withTranslation.mjs +1 -1
  334. package/hocs/withTranslation.mjs.map +1 -1
  335. package/hooks/use-config-priority.js.map +1 -1
  336. package/hooks/use-config-priority.mjs +1 -1
  337. package/hooks/use-config-priority.mjs.map +1 -1
  338. package/hooks/useClickOutside.js.map +1 -1
  339. package/hooks/useClickOutside.mjs.map +1 -1
  340. package/hooks/useMergedPalette.js +1 -1
  341. package/hooks/useMergedPalette.js.map +1 -1
  342. package/hooks/useMergedPalette.mjs +1 -1
  343. package/hooks/useMergedPalette.mjs.map +1 -1
  344. package/hooks/useMergedProps.js.map +1 -1
  345. package/hooks/useMergedProps.mjs.map +1 -1
  346. package/hooks/useMergedSizes.js.map +1 -1
  347. package/hooks/useMergedSizes.mjs.map +1 -1
  348. package/hooks/useResizeObserver.js.map +1 -1
  349. package/hooks/useResizeObserver.mjs.map +1 -1
  350. package/hooks/useScrollMonitor.js +1 -1
  351. package/hooks/useScrollMonitor.js.map +1 -1
  352. package/hooks/useScrollMonitor.mjs +1 -1
  353. package/hooks/useScrollMonitor.mjs.map +1 -1
  354. package/hooks/useScrollThresholds.js.map +1 -1
  355. package/hooks/useScrollThresholds.mjs.map +1 -1
  356. package/mixins/color.js.map +1 -1
  357. package/mixins/color.mjs.map +1 -1
  358. package/mixins/create-responsive-props.js.map +1 -1
  359. package/mixins/create-responsive-props.mjs.map +1 -1
  360. package/mixins/display.js.map +1 -1
  361. package/mixins/display.mjs.map +1 -1
  362. package/mixins/responsive-margin.js.map +1 -1
  363. package/mixins/responsive-margin.mjs.map +1 -1
  364. package/mixins/responsive-property.js +1 -1
  365. package/mixins/responsive-property.js.map +1 -1
  366. package/mixins/responsive-property.mjs +1 -1
  367. package/mixins/responsive-property.mjs.map +1 -1
  368. package/mixins/screen.js +1 -1
  369. package/mixins/screen.js.map +1 -1
  370. package/mixins/screen.mjs +1 -1
  371. package/mixins/screen.mjs.map +1 -1
  372. package/mixins/shared.js +4 -4
  373. package/mixins/shared.js.map +1 -1
  374. package/mixins/shared.mjs +4 -4
  375. package/mixins/shared.mjs.map +1 -1
  376. package/mixins/vAlign.js.map +1 -1
  377. package/mixins/vAlign.mjs.map +1 -1
  378. package/package.json +7 -7
  379. package/shared/enums/sizeInput.js.map +1 -1
  380. package/shared/enums/sizeInput.mjs.map +1 -1
  381. package/shared/resize-observer.js.map +1 -1
  382. package/shared/resize-observer.mjs.map +1 -1
  383. package/shared/utils/colors.js.map +1 -1
  384. package/shared/utils/colors.mjs.map +1 -1
  385. package/shared/utils/dom.js.map +1 -1
  386. package/shared/utils/dom.mjs.map +1 -1
  387. package/shared/utils/react.js.map +1 -1
  388. package/shared/utils/react.mjs.map +1 -1
  389. package/shared/utils/rel-builder.js +1 -1
  390. package/shared/utils/rel-builder.js.map +1 -1
  391. package/shared/utils/rel-builder.mjs +1 -1
  392. package/shared/utils/rel-builder.mjs.map +1 -1
  393. package/theme/colors-dark.js.map +1 -1
  394. package/theme/colors-dark.mjs.map +1 -1
  395. package/theme/colors-light.js.map +1 -1
  396. package/theme/colors-light.mjs.map +1 -1
  397. package/theme/colors.js.map +1 -1
  398. package/theme/colors.mjs.map +1 -1
  399. package/theme/global-styled.js.map +1 -1
  400. package/theme/global-styled.mjs.map +1 -1
  401. package/theme/theme-provider.js.map +1 -1
  402. package/theme/theme-provider.mjs.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.mjs","sources":["../../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import { forwardRef, useState } from 'react'\nimport { useTheme } from 'styled-components'\nimport { CheckCircleFill, Close, CloseCirlceFill, NotifFill, WarningTriangleFill } from '@foxford/icon-pack'\nimport type { DefaultTheme } from 'styled-components'\n\nimport { useClassname } from 'hooks/useClassname'\nimport { useConfigPriority } from 'hooks/use-config-priority'\n\nimport { Anchor } from '../Anchor'\nimport { Button } from '../Button'\nimport { Icon } from '../Icon'\n\nimport * as Styled from './style'\n\nimport type { AlertProps } from './types'\nimport { countdownColor } from './utils'\n\nconst getDefaultIcon = ({\n isCompact,\n theme,\n type,\n}: Pick<AlertProps, 'isCompact' | 'type'> & { theme: DefaultTheme }) => {\n const size = isCompact ? 16 : 24\n\n switch (type) {\n case 'error':\n return <CloseCirlceFill color={theme.colors['alert-bg-error-500']} size={size} />\n case 'info':\n return <NotifFill color={theme.colors['content-brand-primary']} size={size} />\n case 'success':\n return <CheckCircleFill color={theme.colors['alert-success']} size={size} />\n case 'warning':\n return <WarningTriangleFill color={theme.colors['alert-warning']} size={size} />\n default:\n return null\n }\n}\n\nconst COMPONENT_NAME = 'Alert'\n\nconst Alert = forwardRef<HTMLDivElement, AlertProps>((props, ref) => {\n const theme = useTheme()\n\n const {\n cancelTimerText = 'Отменить',\n primaryAction,\n primaryActionProps = {},\n secondaryAction,\n secondaryActionProps = {},\n children,\n className,\n clear,\n customIcon,\n image,\n isCompact,\n link,\n linkProps = {},\n noIcon,\n onClickCancelTimer,\n closeToast,\n onTimerFinish,\n size = 's',\n style,\n textProps = {},\n textWrap,\n timer,\n title,\n titleProps = {},\n type,\n width = ['fit-content', 'fit-content', 'fit-content', '351px', '304px', '304px'],\n } = useConfigPriority<AlertProps>(theme.components?.Alert, props)\n const _className = useClassname(COMPONENT_NAME, className)\n const [timerOnPause, setTimerOnPause] = useState(false)\n\n const column = Boolean(size === 'l' || !!title || (isCompact && (title || link || primaryAction || secondaryAction)))\n\n const handleMouseEnter = () => {\n if (timer) {\n setTimerOnPause(true)\n }\n }\n\n const handleMouseLeave = () => {\n if (timer) {\n setTimerOnPause(false)\n }\n }\n\n return (\n <Styled.Root\n className={_className}\n clear={clear}\n column={column}\n isCompact={isCompact}\n noIcon={noIcon}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n ref={ref}\n size={size}\n style={style}\n textWrap={textWrap}\n type={type}\n width={width}\n withAction={!!primaryAction || !!secondaryAction}\n withCloseIcon={!!closeToast}\n withImage={!!image}\n withLink={!!link}\n withTimer={!!timer}\n withTitle={!!title}\n >\n {(!noIcon || customIcon) && (\n <Styled.IconWrapper column={column} isCompact={isCompact} withImage={!!image}>\n {!noIcon && !timer && !customIcon && !image && getDefaultIcon({ isCompact, theme, type })}\n {customIcon && <Icon name={customIcon} size={isCompact ? 16 : 24} />}\n {image}\n {timer && (\n <Styled.Timer\n isCompact={isCompact}\n paused={timerOnPause}\n timer={timer}\n onTimerFinish={onTimerFinish}\n color={countdownColor({ theme, type })}\n />\n )}\n </Styled.IconWrapper>\n )}\n\n <Styled.ContentWrapper column={column} isCompact={isCompact}>\n {title && (\n <Styled.Title\n color={theme.colors['content-onmain-primary']}\n isCompact={isCompact}\n size={isCompact ? 14 : 16}\n lineHeight='m'\n {...titleProps}\n >\n {title}\n </Styled.Title>\n )}\n\n <Styled.Content\n appearance='body'\n color={theme.colors['content-onmain-primary']}\n column={column}\n isCompact={isCompact}\n size={isCompact ? 'xs' : 's'}\n textWrap={textWrap}\n {...textProps}\n >\n {children}\n </Styled.Content>\n\n {link && (\n <Styled.Link clear={clear} column={column} isCompact={isCompact} withTitle={!!title}>\n <Anchor\n color={props.clear ? theme.colors['content-link'] : theme.colors['content-onmain-primary']}\n onClick={link.onClick}\n preset='default'\n pseudo\n size={isCompact ? 's' : 'm'}\n {...linkProps}\n >\n {link.content}\n </Anchor>\n </Styled.Link>\n )}\n\n {(primaryAction || secondaryAction) && (\n <Styled.Actions column={column} isCompact={isCompact} withTitle={!!title}>\n {secondaryAction && (\n <Button\n black\n fontWeight='normal'\n onClick={secondaryAction.onClick}\n outline\n preset='brand'\n size={isCompact ? 'xs' : 's'}\n margin={4}\n {...secondaryActionProps}\n >\n {secondaryAction.content}\n </Button>\n )}\n\n {primaryAction && (\n <Button\n black\n fontWeight='normal'\n onClick={primaryAction.onClick}\n preset='brand'\n size={isCompact ? 'xs' : 's'}\n margin={4}\n {...primaryActionProps}\n >\n {primaryAction.content}\n </Button>\n )}\n </Styled.Actions>\n )}\n </Styled.ContentWrapper>\n\n {onClickCancelTimer && (\n <Styled.CancelTimer\n black\n clear\n fontWeight='normal'\n isCompact={isCompact}\n onClick={onClickCancelTimer}\n preset='brand'\n size={isCompact ? 'xs' : 's'}\n margin={4}\n >\n {cancelTimerText}\n </Styled.CancelTimer>\n )}\n\n {closeToast && (isCompact ? !timer : true) && (\n <Styled.CloseIcon aria-label='close' onClick={closeToast} type='button' withTimer={!!timer}>\n <Close color={theme.colors['content-onmain-primary']} size={isCompact ? 18 : 24} />\n </Styled.CloseIcon>\n )}\n </Styled.Root>\n )\n})\n\nAlert.displayName = COMPONENT_NAME\n\nexport { Alert, COMPONENT_NAME }\n\nexport type { AlertProps }\n"],"names":["getDefaultIcon","isCompact","theme","type","size","_jsx","CloseCirlceFill","color","colors","NotifFill","CheckCircleFill","WarningTriangleFill","COMPONENT_NAME","Alert","forwardRef","props","ref","useTheme","cancelTimerText","primaryAction","primaryActionProps","secondaryAction","secondaryActionProps","children","className","clear","customIcon","image","link","linkProps","noIcon","onClickCancelTimer","closeToast","onTimerFinish","style","textProps","textWrap","timer","title","titleProps","width","useConfigPriority","components","_className","useClassname","timerOnPause","setTimerOnPause","useState","column","Boolean","_jsxs","Styled","onMouseEnter","handleMouseEnter","onMouseLeave","handleMouseLeave","withAction","withCloseIcon","withImage","withLink","withTimer","withTitle","Icon","name","paused","countdownColor","lineHeight","appearance","Anchor","onClick","preset","pseudo","content","Button","black","fontWeight","outline","margin","Close","displayName"],"mappings":"kmBAiBA,MAAMA,eAAiBA,EACrBC,YACAC,QACAC,WAEA,MAAMC,EAAOH,EAAY,GAAK,GAE9B,OAAQE,GACN,IAAK,QACH,OAAOE,IAACC,gBAAe,CAACC,MAAOL,EAAMM,OAAO,sBAAuBJ,KAAMA,IAC3E,IAAK,OACH,OAAOC,IAACI,UAAS,CAACF,MAAOL,EAAMM,OAAO,yBAA0BJ,KAAMA,IACxE,IAAK,UACH,OAAOC,IAACK,gBAAe,CAACH,MAAOL,EAAMM,OAAO,iBAAkBJ,KAAMA,IACtE,IAAK,UACH,OAAOC,IAACM,oBAAmB,CAACJ,MAAOL,EAAMM,OAAO,iBAAkBJ,KAAMA,IAC1E,QACE,OAAO,KACX,EAGIQ,MAAAA,eAAiB,QAEjBC,MAAAA,MAAQC,YAAuC,CAACC,EAAOC,KAC3D,MAAMd,EAAQe,WAEd,MAAMC,gBACJA,EAAkB,WAAUC,cAC5BA,EAAaC,mBACbA,EAAqB,CAAE,EAAAC,gBACvBA,EAAeC,qBACfA,EAAuB,CAAE,EAAAC,SACzBA,EAAQC,UACRA,EAASC,MACTA,EAAKC,WACLA,EAAUC,MACVA,EAAK1B,UACLA,EAAS2B,KACT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,IACzB4E,OAAQ,EAAEtD,SAETL,IAIJc,KAAe/B,IAAaoC,IAC3BhC,IAAC8C,UAAgB,CAAC,aAAW,QAAQkB,QAASrC,EAAY7B,KAAK,SAASyD,YAAavB,EAAMd,SACzFlB,IAACyE,MAAK,CAACvE,MAAOL,EAAMM,OAAO,0BAA2BJ,KAAMH,EAAY,GAAK,SAGrE,IAIlBY,MAAMkE,YA3LiB"}
1
+ {"version":3,"file":"Alert.mjs","sources":["../../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import { forwardRef, useState } from 'react'\nimport { useTheme } from 'styled-components'\nimport { CheckCircleFill, Close, CloseCirlceFill, NotifFill, WarningTriangleFill } from '@foxford/icon-pack'\nimport type { DefaultTheme } from 'styled-components'\n\nimport { useClassname } from 'hooks/useClassname'\nimport { useConfigPriority } from 'hooks/use-config-priority'\n\nimport { Anchor } from '../Anchor'\nimport { Button } from '../Button'\nimport { Icon } from '../Icon'\n\nimport * as Styled from './style'\n\nimport type { AlertProps } from './types'\nimport { countdownColor } from './utils'\n\nconst getDefaultIcon = ({\n isCompact,\n theme,\n type,\n}: Pick<AlertProps, 'isCompact' | 'type'> & { theme: DefaultTheme }) => {\n const size = isCompact ? 16 : 24\n\n switch (type) {\n case 'error':\n return <CloseCirlceFill color={theme.colors['alert-bg-error-500']} size={size} />\n case 'info':\n return <NotifFill color={theme.colors['content-brand-primary']} size={size} />\n case 'success':\n return <CheckCircleFill color={theme.colors['alert-success']} size={size} />\n case 'warning':\n return <WarningTriangleFill color={theme.colors['alert-warning']} size={size} />\n default:\n return null\n }\n}\n\nconst COMPONENT_NAME = 'Alert'\n\nconst Alert = forwardRef<HTMLDivElement, AlertProps>((props, ref) => {\n const theme = useTheme()\n\n const {\n cancelTimerText = 'Отменить',\n primaryAction,\n primaryActionProps = {},\n secondaryAction,\n secondaryActionProps = {},\n children,\n className,\n clear,\n customIcon,\n image,\n isCompact,\n link,\n linkProps = {},\n noIcon,\n onClickCancelTimer,\n closeToast,\n onTimerFinish,\n size = 's',\n style,\n textProps = {},\n textWrap,\n timer,\n title,\n titleProps = {},\n type,\n width = ['fit-content', 'fit-content', 'fit-content', '351px', '304px', '304px'],\n } = useConfigPriority<AlertProps>(theme.components?.Alert, props)\n const _className = useClassname(COMPONENT_NAME, className)\n const [timerOnPause, setTimerOnPause] = useState(false)\n\n const column = Boolean(size === 'l' || !!title || (isCompact && (title || link || primaryAction || secondaryAction)))\n\n const handleMouseEnter = () => {\n if (timer) {\n setTimerOnPause(true)\n }\n }\n\n const handleMouseLeave = () => {\n if (timer) {\n setTimerOnPause(false)\n }\n }\n\n return (\n <Styled.Root\n className={_className}\n clear={clear}\n column={column}\n isCompact={isCompact}\n noIcon={noIcon}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n ref={ref}\n size={size}\n style={style}\n textWrap={textWrap}\n type={type}\n width={width}\n withAction={!!primaryAction || !!secondaryAction}\n withCloseIcon={!!closeToast}\n withImage={!!image}\n withLink={!!link}\n withTimer={!!timer}\n withTitle={!!title}\n >\n {!noIcon || customIcon ? (\n <Styled.IconWrapper column={column} isCompact={isCompact} withImage={!!image}>\n {!noIcon && !timer && !customIcon && !image ? getDefaultIcon({ isCompact, theme, type }) : null}\n {customIcon ? <Icon name={customIcon} size={isCompact ? 16 : 24} /> : null}\n {image}\n {timer ? (\n <Styled.Timer\n isCompact={isCompact}\n paused={timerOnPause}\n timer={timer}\n onTimerFinish={onTimerFinish}\n color={countdownColor({ theme, type })}\n />\n ) : null}\n </Styled.IconWrapper>\n ) : null}\n\n <Styled.ContentWrapper column={column} isCompact={isCompact}>\n {title ? (\n <Styled.Title\n color={theme.colors['content-onmain-primary']}\n isCompact={isCompact}\n size={isCompact ? 14 : 16}\n lineHeight='m'\n {...titleProps}\n >\n {title}\n </Styled.Title>\n ) : null}\n\n <Styled.Content\n appearance='body'\n color={theme.colors['content-onmain-primary']}\n column={column}\n isCompact={isCompact}\n size={isCompact ? 'xs' : 's'}\n textWrap={textWrap}\n {...textProps}\n >\n {children}\n </Styled.Content>\n\n {link ? (\n <Styled.Link clear={clear} column={column} isCompact={isCompact} withTitle={!!title}>\n <Anchor\n color={props.clear ? theme.colors['content-link'] : theme.colors['content-onmain-primary']}\n // eslint-disable-next-line react/jsx-handler-names\n onClick={link.onClick}\n preset='default'\n pseudo\n size={isCompact ? 's' : 'm'}\n {...linkProps}\n >\n {link.content}\n </Anchor>\n </Styled.Link>\n ) : null}\n\n {primaryAction || secondaryAction ? (\n <Styled.Actions column={column} isCompact={isCompact} withTitle={!!title}>\n {secondaryAction ? (\n <Button\n black\n fontWeight='normal'\n // eslint-disable-next-line react/jsx-handler-names\n onClick={secondaryAction.onClick}\n outline\n preset='brand'\n size={isCompact ? 'xs' : 's'}\n margin={4}\n {...secondaryActionProps}\n >\n {secondaryAction.content}\n </Button>\n ) : null}\n\n {primaryAction ? (\n <Button\n black\n fontWeight='normal'\n // eslint-disable-next-line react/jsx-handler-names\n onClick={primaryAction.onClick}\n preset='brand'\n size={isCompact ? 'xs' : 's'}\n margin={4}\n {...primaryActionProps}\n >\n {primaryAction.content}\n </Button>\n ) : null}\n </Styled.Actions>\n ) : null}\n </Styled.ContentWrapper>\n\n {onClickCancelTimer ? (\n <Styled.CancelTimer\n black\n clear\n fontWeight='normal'\n isCompact={isCompact}\n onClick={onClickCancelTimer}\n preset='brand'\n size={isCompact ? 'xs' : 's'}\n margin={4}\n >\n {cancelTimerText}\n </Styled.CancelTimer>\n ) : null}\n\n {closeToast && (isCompact ? !timer : true) ? (\n <Styled.CloseIcon aria-label='close' onClick={closeToast} type='button' withTimer={!!timer}>\n <Close color={theme.colors['content-onmain-primary']} size={isCompact ? 18 : 24} />\n </Styled.CloseIcon>\n ) : null}\n </Styled.Root>\n )\n})\n\nAlert.displayName = COMPONENT_NAME\n\nexport { Alert, COMPONENT_NAME }\n\nexport type { AlertProps }\n"],"names":["getDefaultIcon","isCompact","theme","type","size","_jsx","CloseCirlceFill","color","colors","NotifFill","CheckCircleFill","WarningTriangleFill","COMPONENT_NAME","Alert","forwardRef","props","ref","useTheme","cancelTimerText","primaryAction","primaryActionProps","secondaryAction","secondaryActionProps","children","className","clear","customIcon","image","link","linkProps","noIcon","onClickCancelTimer","closeToast","onTimerFinish","style","textProps","textWrap","timer","title","titleProps","width","useConfigPriority","components","_className","useClassname","timerOnPause","setTimerOnPause","useState","column","Boolean","_jsxs","Styled","onMouseEnter","handleMouseEnter","onMouseLeave","handleMouseLeave","withAction","withCloseIcon","withImage","withLink","withTimer","withTitle","Icon","name","paused","countdownColor","lineHeight","appearance","Anchor","onClick","preset","pseudo","content","Button","black","fontWeight","outline","margin","Close","displayName"],"mappings":"kmBAiBA,MAAMA,eAAiBA,EACrBC,YACAC,QACAC,WAEA,MAAMC,EAAOH,EAAY,GAAK,GAE9B,OAAQE,GACN,IAAK,QACH,OAAOE,IAACC,gBAAe,CAACC,MAAOL,EAAMM,OAAO,sBAAuBJ,KAAMA,IAC3E,IAAK,OACH,OAAOC,IAACI,UAAS,CAACF,MAAOL,EAAMM,OAAO,yBAA0BJ,KAAMA,IACxE,IAAK,UACH,OAAOC,IAACK,gBAAe,CAACH,MAAOL,EAAMM,OAAO,iBAAkBJ,KAAMA,IACtE,IAAK,UACH,OAAOC,IAACM,oBAAmB,CAACJ,MAAOL,EAAMM,OAAO,iBAAkBJ,KAAMA,IAC1E,QACE,OAAO,KACX,EAGIQ,MAAAA,eAAiB,QAEjBC,MAAAA,MAAQC,YAAuC,CAACC,EAAOC,KAC3D,MAAMd,EAAQe,WAEd,MAAMC,gBACJA,EAAkB,WAAUC,cAC5BA,EAAaC,mBACbA,EAAqB,CAAE,EAAAC,gBACvBA,EAAeC,qBACfA,EAAuB,CAAE,EAAAC,SACzBA,EAAQC,UACRA,EAASC,MACTA,EAAKC,WACLA,EAAUC,MACVA,EAAK1B,UACLA,EAAS2B,KACTA,EAAIC,UACJA,EAAY,CAAE,EAAAC,OACdA,EAAMC,mBACNA,EAAkBC,WAClBA,EAAU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EAAEtD,SAETL,IAED,MAEHc,GAAe/B,GAAaoC,EAIzB,KAHFhC,IAAC8C,UAAgB,CAAC,aAAW,QAAQkB,QAASrC,EAAY7B,KAAK,SAASyD,YAAavB,EAAMd,SACzFlB,IAACyE,MAAK,CAACvE,MAAOL,EAAMM,OAAO,0BAA2BJ,KAAMH,EAAY,GAAK,SAGrE,IAIlBY,MAAMkE,YA9LiB"}
@@ -1,2 +1,2 @@
1
- 'use strict';var React=require('react');var dom=require('../../shared/utils/dom.js');var index=require('./data/index.js');var style=require('./style.js');var jsxRuntime=require('react/jsx-runtime');var Text=require('../Text/Text.js');const ZERO_MINOR_PART_REGEXP=/^0+$/;class Amount extends React.PureComponent{static displayName='Amount';static defaultProps={isHeader:!1,showZeroMinorPart:!1,crossedOut:!1,digitsAfterPoint:2,separator:',',onlyCurrency:!1};static getCurrencySymbol(e){return index.CURRENCY_MAP[e]||e}renderMinorPart(e){const{showZeroMinorPart:s,separator:r}=this.props;let t=!1;return e&&(t=!0,!s&&ZERO_MINOR_PART_REGEXP.test(e)&&(t=!1)),t?jsxRuntime.jsxs("span",{className:"minor-container",children:[jsxRuntime.jsx("span",{className:"separator",children:r}),jsxRuntime.jsx("span",{className:"minor",children:e})]}):null}renderCurrencySymbol=e=>jsxRuntime.jsxs("span",{style:{position:'relative'},children:[this.props.currency==='RUR'?jsxRuntime.jsx("span",{style:{position:'absolute',width:0,opacity:0,visibility:'hidden'},children:"руб."}):null,jsxRuntime.jsx("span",{children:` ${e}`})]});render(){const{value:e,digitsAfterPoint:s,currency:r,isHeader:t,className:n,style:i,crossedOut:a,onlyCurrency:o,...c}=this.props;const{majorPart:u,minorPart:l,isNegative:m,currencySymbol:d}=((e=0,s,r)=>{const t=e<0;const n=Math.abs(e).toFixed(s).split('.');const i=n[0];const a=n[1];const o=(()=>{const parts=e=>{const{length:s}=e;if(s<=3)return[e];const r=s-3;return[e.slice(r,s)].concat(parts(e.slice(0,r)))};return parts})()(i).reverse().join(' ');return{majorPart:o,minorPart:a,value:o+(a?`,${a}`:''),isNegative:t,currencySymbol:r?Amount.getCurrencySymbol(r):''}})(e,s,r);const x=dom.concatClassNames('amount',n);const j=jsxRuntime.jsxs(style.Root,{className:x,style:i,crossedOut:a,children:[o?null:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("span",{className:"major",children:[m&&"−",u]}),this.renderMinorPart(l)]}),r&&this.renderCurrencySymbol(d)]});return jsxRuntime.jsx(t?Text.Text.Heading:Text.Text,{...c,as:"span",children:j})}}exports.Amount=Amount;
1
+ 'use strict';var React=require('react');var dom=require('../../shared/utils/dom.js');var index=require('./data/index.js');var style=require('./style.js');var jsxRuntime=require('react/jsx-runtime');var Text=require('../Text/Text.js');const ZERO_MINOR_PART_REGEXP=/^0+$/;function getCurrencySymbol(e){return index.CURRENCY_MAP[e]||e}exports.Amount=class Amount extends React.PureComponent{static displayName='Amount';static defaultProps={isHeader:!1,showZeroMinorPart:!1,crossedOut:!1,digitsAfterPoint:2,separator:',',onlyCurrency:!1};static getCurrencySymbol=getCurrencySymbol;renderMinorPart(e){const{showZeroMinorPart:r,separator:s}=this.props;let t=!1;return e&&(t=!0,!r&&ZERO_MINOR_PART_REGEXP.test(e)&&(t=!1)),t?jsxRuntime.jsxs("span",{className:"minor-container",children:[jsxRuntime.jsx("span",{className:"separator",children:s}),jsxRuntime.jsx("span",{className:"minor",children:e})]}):null}renderCurrencySymbol=e=>jsxRuntime.jsxs("span",{style:{position:'relative'},children:[this.props.currency==='RUR'?jsxRuntime.jsx("span",{style:{position:'absolute',width:0,opacity:0,visibility:'hidden'},children:"руб."}):null,jsxRuntime.jsx("span",{children:` ${e}`})]});render(){const{value:e,digitsAfterPoint:r,currency:s,isHeader:t,className:n,style:i,crossedOut:a,onlyCurrency:o,...c}=this.props;const{majorPart:l,minorPart:u,isNegative:m,currencySymbol:d}=((e,r,s=0)=>{const t=s<0;const n=Math.abs(s).toFixed(e).split('.');const i=n[0];const a=n[1];const o=(()=>{const parts=e=>{const{length:r}=e;if(r<=3)return[e];const s=r-3;return[e.slice(s,r)].concat(parts(e.slice(0,s)))};return parts})()(i).reverse().join(' ');return{majorPart:o,minorPart:a,value:o+(a?`,${a}`:''),isNegative:t,currencySymbol:r?getCurrencySymbol(r):''}})(r,s,e);const x=dom.concatClassNames('amount',n);const y=jsxRuntime.jsxs(style.Root,{className:x,style:i,crossedOut:a,children:[o?null:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("span",{className:"major",children:[m?"−":null,l]}),this.renderMinorPart(u)]}),s?this.renderCurrencySymbol(d):null]});return jsxRuntime.jsx(t?Text.Text.Heading:Text.Text,{...c,as:"span",children:y})}};
2
2
  //# sourceMappingURL=Amount.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Amount.js","sources":["../../../../src/components/Amount/Amount.tsx"],"sourcesContent":["import { PureComponent } from 'react'\nimport { Text } from 'components/Text'\nimport type { TextProps } from 'components/Text'\nimport { concatClassNames } from 'shared/utils/dom'\nimport { CurrencyCodes, CURRENCY_MAP } from './data'\nimport * as Styled from './style'\n\nexport interface AmountProps extends TextProps {\n /**\n * Value for amount\n */\n value?: number\n /**\n * Digits after point\n */\n digitsAfterPoint?: number\n /**\n * Show zero minor part\n */\n showZeroMinorPart?: boolean\n /**\n * Separator of major and minor part of amount\n */\n separator?: string\n /**\n * International code of currency.\n */\n currency?: keyof typeof CurrencyCodes | string\n /**\n * Use Header component for display amount\n */\n isHeader?: boolean\n /**\n * Amount is not valid and will be crossed out with ```text-decoration: line-through```\n */\n crossedOut?: boolean\n /**\n * If need only currency symbol\n */\n onlyCurrency?: boolean\n}\n\nconst AMOUNT_MAJOR_PART_SIZE = 3\nconst ZERO_MINOR_PART_REGEXP = /^0+$/\nconst MINUS_SIGN_HTML_CODE = '\\u2212'\n\nfunction createSplitter(partSize: number): (_s: string) => string[] {\n const parts = (str: string): string[] => {\n const { length } = str\n\n if (length <= partSize) {\n return [str]\n }\n\n const from = length - partSize\n const to = length\n\n return [str.slice(from, to)].concat(parts(str.slice(0, from)))\n }\n\n return parts\n}\n\nfunction formatAmount(\n value: AmountProps['value'] = 0,\n digitsAfterPoint: AmountProps['digitsAfterPoint'],\n currencyCode: AmountProps['currency']\n) {\n const isNegative = value < 0\n\n const valueAbs = Math.abs(value)\n const valueAbsStr = valueAbs.toFixed(digitsAfterPoint)\n\n const numberParts = valueAbsStr.split('.')\n const majorPart = numberParts[0]\n const minorPart = numberParts[1]\n\n const amountSplitter = createSplitter(AMOUNT_MAJOR_PART_SIZE)\n\n const majorPartFormatted = amountSplitter(majorPart).reverse().join(' ')\n\n const formattedValueStr = majorPartFormatted + (minorPart ? `,${minorPart}` : '')\n\n return {\n majorPart: majorPartFormatted,\n minorPart,\n value: formattedValueStr,\n isNegative,\n currencySymbol: currencyCode ? Amount.getCurrencySymbol(currencyCode) : '',\n }\n}\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`ResponsiveNamedProperty<'size'>`](#/Миксины)\n */\nexport class Amount extends PureComponent<AmountProps> {\n static displayName = 'Amount'\n static defaultProps = {\n isHeader: false,\n showZeroMinorPart: false,\n crossedOut: false,\n digitsAfterPoint: 2,\n separator: ',',\n onlyCurrency: false,\n }\n\n static getCurrencySymbol(currencyCode: keyof typeof CurrencyCodes | string) {\n return CURRENCY_MAP[currencyCode] || currencyCode\n }\n\n renderMinorPart(minorPart: string) {\n const { showZeroMinorPart, separator } = this.props\n\n let needMinorPart = false\n\n if (minorPart) {\n needMinorPart = true\n\n if (!showZeroMinorPart && ZERO_MINOR_PART_REGEXP.test(minorPart)) {\n needMinorPart = false\n }\n }\n\n if (needMinorPart) {\n return (\n <span className='minor-container'>\n <span className='separator'>{separator}</span>\n <span className='minor'>{minorPart}</span>\n </span>\n )\n }\n\n return null\n }\n\n renderCurrencySymbol = (currencySymbol: string) => (\n <span style={{ position: 'relative' }}>\n {this.props.currency === 'RUR' ? (\n <span\n style={{\n position: 'absolute',\n width: 0,\n opacity: 0,\n visibility: 'hidden',\n }}\n >\n руб.\n </span>\n ) : null}\n <span>{` ${currencySymbol}`}</span>\n </span>\n )\n\n render() {\n const { value, digitsAfterPoint, currency, isHeader, className, style, crossedOut, onlyCurrency, ...rest } =\n this.props\n\n const { majorPart, minorPart, isNegative, currencySymbol } = formatAmount(value, digitsAfterPoint, currency)\n\n const classNames = concatClassNames('amount', className)\n\n const amountInner = (\n <Styled.Root className={classNames} style={style} crossedOut={crossedOut}>\n {!onlyCurrency ? (\n <>\n <span className='major'>\n {isNegative && MINUS_SIGN_HTML_CODE}\n {majorPart}\n </span>\n {this.renderMinorPart(minorPart)}\n </>\n ) : null}\n {currency && this.renderCurrencySymbol(currencySymbol)}\n </Styled.Root>\n )\n\n const Element = isHeader ? Text.Heading : Text\n\n return (\n <Element {...rest} as='span'>\n {amountInner}\n </Element>\n )\n }\n}\n"],"names":["ZERO_MINOR_PART_REGEXP","Amount","PureComponent","static","isHeader","showZeroMinorPart","crossedOut","digitsAfterPoint","separator","onlyCurrency","getCurrencySymbol","currencyCode","CURRENCY_MAP","renderMinorPart","minorPart","this","props","needMinorPart","test","_jsxs","className","children","_jsx","jsx","renderCurrencySymbol","currencySymbol","jsxs","style","position","currency","width","opacity","visibility","render","value","rest","majorPart","isNegative","numberParts","Math","abs","toFixed","split","majorPartFormatted","parts","str","length","from","slice","concat","createSplitter","amountSplitter","reverse","join","formatAmount","classNames","concatClassNames","amountInner","Styled","_Fragment","Text","Heading","as"],"mappings":"0OA2CA,MAAMA,uBAAyB,OAuDxB,MAAMC,eAAeC,MAAAA,cAC1BC,mBAAqB,SACrBA,oBAAsB,CACpBC,UAAU,EACVC,mBAAmB,EACnBC,YAAY,EACZC,iBAAkB,EAClBC,UAAW,IACXC,cAAc,GAGhB,wBAAOC,CAAkBC,GACvB,OAAOC,MAAYA,aAACD,IAAiBA,CACvC,CAEAE,eAAAA,CAAgBC,GACd,MAAMT,kBAAEA,EAAiBG,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Aef,GAAWgB,UAAUC,KAAK,KAIpE,MAAO,CACLjB,UAAWO,EACX7B,YACAoB,MALwBS,GAAsB7B,EAAY,IAAIA,IAAc,IAM5EuB,aACAZ,eAAgBd,EAAeV,OAAOS,kBAAkBC,GAAgB,GAE5E,EAsEiE2C,CAAapB,EAAO3B,EAAkBsB,GAEnG,MAAM0B,EAAaC,IAAAA,iBAAiB,SAAUpC,GAE9C,MAAMqC,EACJtC,WAAAO,KAACgC,WAAW,CAACtC,UAAWmC,EAAY5B,MAAOA,EAAOrB,WAAYA,EAAWe,UACrEZ,EAQE,KAPFU,WAAAA,KAAAwC,WAAAA,SAAA,CAAAtC,UACEF,WAAAO,KAAA,OAAA,CAAMN,UAAU,QAAOC,SACpBgB,CAAAA,GA7Hc,IA8HdD,KAEFrB,KAAKF,gBAAgBC,MAGzBe,GAAYd,KAAKS,qBAAqBC,MAM3C,OACEH,WAAAA,IAHclB,EAAWwD,UAAKC,QAAUD,KAAAA,KAGhC,IAAKzB,EAAM2B,GAAG,OAAMzC,SACzBoC,GAGP"}
1
+ {"version":3,"file":"Amount.js","sources":["../../../../src/components/Amount/Amount.tsx"],"sourcesContent":["import { PureComponent } from 'react'\nimport { Text } from 'components/Text'\nimport type { TextProps } from 'components/Text'\nimport { concatClassNames } from 'shared/utils/dom'\nimport { CURRENCY_MAP } from './data'\nimport type { CurrencyCodes } from './data'\nimport * as Styled from './style'\n\nexport interface AmountProps extends TextProps {\n /**\n * Value for amount\n */\n value?: number\n /**\n * Digits after point\n */\n digitsAfterPoint?: number\n /**\n * Show zero minor part\n */\n showZeroMinorPart?: boolean\n /**\n * Separator of major and minor part of amount\n */\n separator?: string\n /**\n * International code of currency.\n */\n currency?: keyof typeof CurrencyCodes | string\n /**\n * Use Header component for display amount\n */\n isHeader?: boolean\n /**\n * Amount is not valid and will be crossed out with ```text-decoration: line-through```\n */\n crossedOut?: boolean\n /**\n * If need only currency symbol\n */\n onlyCurrency?: boolean\n}\n\nconst AMOUNT_MAJOR_PART_SIZE = 3\nconst ZERO_MINOR_PART_REGEXP = /^0+$/\nconst MINUS_SIGN_HTML_CODE = '\\u2212'\n\nfunction getCurrencySymbol(currencyCode: keyof typeof CurrencyCodes | string) {\n return CURRENCY_MAP[currencyCode as keyof typeof CurrencyCodes] || currencyCode\n}\n\nfunction createSplitter(partSize: number): (_s: string) => string[] {\n const parts = (str: string): string[] => {\n const { length } = str\n\n if (length <= partSize) {\n return [str]\n }\n\n const from = length - partSize\n const to = length\n\n return [str.slice(from, to)].concat(parts(str.slice(0, from)))\n }\n\n return parts\n}\n\nfunction formatAmount(\n digitsAfterPoint: AmountProps['digitsAfterPoint'],\n currencyCode: AmountProps['currency'],\n value: AmountProps['value'] = 0\n) {\n const isNegative = value < 0\n\n const valueAbs = Math.abs(value)\n const valueAbsStr = valueAbs.toFixed(digitsAfterPoint)\n\n const numberParts = valueAbsStr.split('.')\n const majorPart = numberParts[0]\n const minorPart = numberParts[1]\n\n const amountSplitter = createSplitter(AMOUNT_MAJOR_PART_SIZE)\n\n const majorPartFormatted = amountSplitter(majorPart).reverse().join(' ')\n\n const formattedValueStr = majorPartFormatted + (minorPart ? `,${minorPart}` : '')\n\n return {\n majorPart: majorPartFormatted,\n minorPart,\n value: formattedValueStr,\n isNegative,\n currencySymbol: currencyCode ? getCurrencySymbol(currencyCode) : '',\n }\n}\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`ResponsiveNamedProperty<'size'>`](#/Миксины)\n */\nexport class Amount extends PureComponent<AmountProps> {\n static displayName = 'Amount'\n static defaultProps = {\n isHeader: false,\n showZeroMinorPart: false,\n crossedOut: false,\n digitsAfterPoint: 2,\n separator: ',',\n onlyCurrency: false,\n }\n\n static getCurrencySymbol = getCurrencySymbol\n\n renderMinorPart(minorPart: string) {\n const { showZeroMinorPart, separator } = this.props\n\n let needMinorPart = false\n\n if (minorPart) {\n needMinorPart = true\n\n if (!showZeroMinorPart && ZERO_MINOR_PART_REGEXP.test(minorPart)) {\n needMinorPart = false\n }\n }\n\n if (needMinorPart) {\n return (\n <span className='minor-container'>\n <span className='separator'>{separator}</span>\n <span className='minor'>{minorPart}</span>\n </span>\n )\n }\n\n return null\n }\n\n renderCurrencySymbol = (currencySymbol: string) => (\n <span style={{ position: 'relative' }}>\n {this.props.currency === 'RUR' ? (\n <span\n style={{\n position: 'absolute',\n width: 0,\n opacity: 0,\n visibility: 'hidden',\n }}\n >\n руб.\n </span>\n ) : null}\n <span>{` ${currencySymbol}`}</span>\n </span>\n )\n\n render() {\n const { value, digitsAfterPoint, currency, isHeader, className, style, crossedOut, onlyCurrency, ...rest } =\n this.props\n\n const { majorPart, minorPart, isNegative, currencySymbol } = formatAmount(digitsAfterPoint, currency, value)\n\n const classNames = concatClassNames('amount', className)\n\n const amountInner = (\n <Styled.Root className={classNames} style={style} crossedOut={crossedOut}>\n {!onlyCurrency ? (\n <>\n <span className='major'>\n {isNegative ? MINUS_SIGN_HTML_CODE : null}\n {majorPart}\n </span>\n {this.renderMinorPart(minorPart)}\n </>\n ) : null}\n {currency ? this.renderCurrencySymbol(currencySymbol) : null}\n </Styled.Root>\n )\n\n const Element = isHeader ? Text.Heading : Text\n\n return (\n <Element {...rest} as='span'>\n {amountInner}\n </Element>\n )\n }\n}\n"],"names":["ZERO_MINOR_PART_REGEXP","getCurrencySymbol","currencyCode","CURRENCY_MAP","Amount","PureComponent","static","isHeader","showZeroMinorPart","crossedOut","digitsAfterPoint","separator","onlyCurrency","renderMinorPart","minorPart","this","props","needMinorPart","test","_jsxs","className","children","_jsx","jsx","renderCurrencySymbol","currencySymbol","jsxs","style","position","currency","width","opacity","visibility","render","value","rest","majorPart","isNegative","numberParts","Math","abs","toFixed","split","majorPartFormatted","parts","str","length","from","slice","concat","createSplitter","amountSplitter","reverse","join","formatAmount","classNames","concatClassNames","amountInner","Styled","_Fragment","Text","Heading","as"],"mappings":"0OA4CA,MAAMA,uBAAyB,OAG/B,SAASC,kBAAkBC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B,MAAMK,EAjCR,MACE,MAAMC,MAASC,IACb,MAAMC,OAAEA,GAAWD,EAEnB,GAAIC,GAZuB,EAazB,MAAO,CAACD,GAGV,MAAME,EAAOD,EAhBc,EAmB3B,MAAO,CAACD,EAAIG,MAAMD,EAFPD,IAEkBG,OAAOL,MAAMC,EAAIG,MAAM,EAAGD,IAAO,EAGhE,OAAOH,KACT,EAgByBM,EAEIC,CAAef,GAAWgB,UAAUC,KAAK,KAIpE,MAAO,CACLjB,UAAWO,EACX7B,YACAoB,MALwBS,GAAsB7B,EAAY,IAAIA,IAAc,IAM5EuB,aACAZ,eAAgBvB,EAAeD,kBAAkBC,GAAgB,GAErE,EAoEiEoD,CAAa5C,EAAkBmB,EAAUK,GAEtG,MAAMqB,EAAaC,IAAAA,iBAAiB,SAAUpC,GAE9C,MAAMqC,EACJtC,WAAAO,KAACgC,WAAW,CAACtC,UAAWmC,EAAY5B,MAAOA,EAAOlB,WAAYA,EAAWY,UACrET,EAQE,KAPFO,WAAAA,KAAAwC,WAAAA,SAAA,CAAAtC,UACEF,WAAAO,KAAA,OAAA,CAAMN,UAAU,QAAOC,UACpBgB,EA/Hc,IA+HsB,KACpCD,KAEFrB,KAAKF,gBAAgBC,MAGzBe,EAAWd,KAAKS,qBAAqBC,GAAkB,QAM5D,OACEH,WAAAA,IAHcf,EAAWqD,UAAKC,QAAUD,KAAAA,KAGhC,IAAKzB,EAAM2B,GAAG,OAAMzC,SACzBoC,GAGP"}
@@ -1,2 +1,2 @@
1
- import{PureComponent}from'react';import{concatClassNames}from'../../shared/utils/dom.mjs';import{CURRENCY_MAP}from'./data/index.mjs';import{Root}from'./style.mjs';import{jsxs,jsx,Fragment}from'react/jsx-runtime';import{Text}from'../Text/Text.mjs';const ZERO_MINOR_PART_REGEXP=/^0+$/;class Amount extends PureComponent{static displayName='Amount';static defaultProps={isHeader:!1,showZeroMinorPart:!1,crossedOut:!1,digitsAfterPoint:2,separator:',',onlyCurrency:!1};static getCurrencySymbol(r){return CURRENCY_MAP[r]||r}renderMinorPart(r){const{showZeroMinorPart:s,separator:t}=this.props;let e=!1;return r&&(e=!0,!s&&ZERO_MINOR_PART_REGEXP.test(r)&&(e=!1)),e?jsxs("span",{className:"minor-container",children:[jsx("span",{className:"separator",children:t}),jsx("span",{className:"minor",children:r})]}):null}renderCurrencySymbol=r=>jsxs("span",{style:{position:'relative'},children:[this.props.currency==='RUR'?jsx("span",{style:{position:'absolute',width:0,opacity:0,visibility:'hidden'},children:"руб."}):null,jsx("span",{children:` ${r}`})]});render(){const{value:r,digitsAfterPoint:s,currency:t,isHeader:e,className:n,style:o,crossedOut:a,onlyCurrency:i,...c}=this.props;const{majorPart:l,minorPart:m,isNegative:u,currencySymbol:d}=((r=0,s,t)=>{const e=r<0;const n=Math.abs(r).toFixed(s).split('.');const o=n[0];const a=n[1];const i=(()=>{const parts=r=>{const{length:s}=r;if(s<=3)return[r];const t=s-3;return[r.slice(t,s)].concat(parts(r.slice(0,t)))};return parts})()(o).reverse().join(' ');return{majorPart:i,minorPart:a,value:i+(a?`,${a}`:''),isNegative:e,currencySymbol:t?Amount.getCurrencySymbol(t):''}})(r,s,t);const p=concatClassNames('amount',n);const y=jsxs(Root,{className:p,style:o,crossedOut:a,children:[i?null:jsxs(Fragment,{children:[jsxs("span",{className:"major",children:[u&&"−",l]}),this.renderMinorPart(m)]}),t&&this.renderCurrencySymbol(d)]});return jsx(e?Text.Heading:Text,{...c,as:"span",children:y})}}export{Amount};
1
+ import{PureComponent}from'react';import{concatClassNames}from'../../shared/utils/dom.mjs';import{CURRENCY_MAP}from'./data/index.mjs';import{Root}from'./style.mjs';import{jsxs,jsx,Fragment}from'react/jsx-runtime';import{Text}from'../Text/Text.mjs';const ZERO_MINOR_PART_REGEXP=/^0+$/;function getCurrencySymbol(r){return CURRENCY_MAP[r]||r}class Amount extends PureComponent{static displayName='Amount';static defaultProps={isHeader:!1,showZeroMinorPart:!1,crossedOut:!1,digitsAfterPoint:2,separator:',',onlyCurrency:!1};static getCurrencySymbol=getCurrencySymbol;renderMinorPart(r){const{showZeroMinorPart:s,separator:e}=this.props;let t=!1;return r&&(t=!0,!s&&ZERO_MINOR_PART_REGEXP.test(r)&&(t=!1)),t?jsxs("span",{className:"minor-container",children:[jsx("span",{className:"separator",children:e}),jsx("span",{className:"minor",children:r})]}):null}renderCurrencySymbol=r=>jsxs("span",{style:{position:'relative'},children:[this.props.currency==='RUR'?jsx("span",{style:{position:'absolute',width:0,opacity:0,visibility:'hidden'},children:"руб."}):null,jsx("span",{children:` ${r}`})]});render(){const{value:r,digitsAfterPoint:s,currency:e,isHeader:t,className:n,style:o,crossedOut:a,onlyCurrency:i,...c}=this.props;const{majorPart:l,minorPart:m,isNegative:u,currencySymbol:d}=((r,s,e=0)=>{const t=e<0;const n=Math.abs(e).toFixed(r).split('.');const o=n[0];const a=n[1];const i=(()=>{const parts=r=>{const{length:s}=r;if(s<=3)return[r];const e=s-3;return[r.slice(e,s)].concat(parts(r.slice(0,e)))};return parts})()(o).reverse().join(' ');return{majorPart:i,minorPart:a,value:i+(a?`,${a}`:''),isNegative:t,currencySymbol:s?getCurrencySymbol(s):''}})(s,e,r);const p=concatClassNames('amount',n);const y=jsxs(Root,{className:p,style:o,crossedOut:a,children:[i?null:jsxs(Fragment,{children:[jsxs("span",{className:"major",children:[u?"−":null,l]}),this.renderMinorPart(m)]}),e?this.renderCurrencySymbol(d):null]});return jsx(t?Text.Heading:Text,{...c,as:"span",children:y})}}export{Amount};
2
2
  //# sourceMappingURL=Amount.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Amount.mjs","sources":["../../../../src/components/Amount/Amount.tsx"],"sourcesContent":["import { PureComponent } from 'react'\nimport { Text } from 'components/Text'\nimport type { TextProps } from 'components/Text'\nimport { concatClassNames } from 'shared/utils/dom'\nimport { CurrencyCodes, CURRENCY_MAP } from './data'\nimport * as Styled from './style'\n\nexport interface AmountProps extends TextProps {\n /**\n * Value for amount\n */\n value?: number\n /**\n * Digits after point\n */\n digitsAfterPoint?: number\n /**\n * Show zero minor part\n */\n showZeroMinorPart?: boolean\n /**\n * Separator of major and minor part of amount\n */\n separator?: string\n /**\n * International code of currency.\n */\n currency?: keyof typeof CurrencyCodes | string\n /**\n * Use Header component for display amount\n */\n isHeader?: boolean\n /**\n * Amount is not valid and will be crossed out with ```text-decoration: line-through```\n */\n crossedOut?: boolean\n /**\n * If need only currency symbol\n */\n onlyCurrency?: boolean\n}\n\nconst AMOUNT_MAJOR_PART_SIZE = 3\nconst ZERO_MINOR_PART_REGEXP = /^0+$/\nconst MINUS_SIGN_HTML_CODE = '\\u2212'\n\nfunction createSplitter(partSize: number): (_s: string) => string[] {\n const parts = (str: string): string[] => {\n const { length } = str\n\n if (length <= partSize) {\n return [str]\n }\n\n const from = length - partSize\n const to = length\n\n return [str.slice(from, to)].concat(parts(str.slice(0, from)))\n }\n\n return parts\n}\n\nfunction formatAmount(\n value: AmountProps['value'] = 0,\n digitsAfterPoint: AmountProps['digitsAfterPoint'],\n currencyCode: AmountProps['currency']\n) {\n const isNegative = value < 0\n\n const valueAbs = Math.abs(value)\n const valueAbsStr = valueAbs.toFixed(digitsAfterPoint)\n\n const numberParts = valueAbsStr.split('.')\n const majorPart = numberParts[0]\n const minorPart = numberParts[1]\n\n const amountSplitter = createSplitter(AMOUNT_MAJOR_PART_SIZE)\n\n const majorPartFormatted = amountSplitter(majorPart).reverse().join(' ')\n\n const formattedValueStr = majorPartFormatted + (minorPart ? `,${minorPart}` : '')\n\n return {\n majorPart: majorPartFormatted,\n minorPart,\n value: formattedValueStr,\n isNegative,\n currencySymbol: currencyCode ? Amount.getCurrencySymbol(currencyCode) : '',\n }\n}\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`ResponsiveNamedProperty<'size'>`](#/Миксины)\n */\nexport class Amount extends PureComponent<AmountProps> {\n static displayName = 'Amount'\n static defaultProps = {\n isHeader: false,\n showZeroMinorPart: false,\n crossedOut: false,\n digitsAfterPoint: 2,\n separator: ',',\n onlyCurrency: false,\n }\n\n static getCurrencySymbol(currencyCode: keyof typeof CurrencyCodes | string) {\n return CURRENCY_MAP[currencyCode] || currencyCode\n }\n\n renderMinorPart(minorPart: string) {\n const { showZeroMinorPart, separator } = this.props\n\n let needMinorPart = false\n\n if (minorPart) {\n needMinorPart = true\n\n if (!showZeroMinorPart && ZERO_MINOR_PART_REGEXP.test(minorPart)) {\n needMinorPart = false\n }\n }\n\n if (needMinorPart) {\n return (\n <span className='minor-container'>\n <span className='separator'>{separator}</span>\n <span className='minor'>{minorPart}</span>\n </span>\n )\n }\n\n return null\n }\n\n renderCurrencySymbol = (currencySymbol: string) => (\n <span style={{ position: 'relative' }}>\n {this.props.currency === 'RUR' ? (\n <span\n style={{\n position: 'absolute',\n width: 0,\n opacity: 0,\n visibility: 'hidden',\n }}\n >\n руб.\n </span>\n ) : null}\n <span>{` ${currencySymbol}`}</span>\n </span>\n )\n\n render() {\n const { value, digitsAfterPoint, currency, isHeader, className, style, crossedOut, onlyCurrency, ...rest } =\n this.props\n\n const { majorPart, minorPart, isNegative, currencySymbol } = formatAmount(value, digitsAfterPoint, currency)\n\n const classNames = concatClassNames('amount', className)\n\n const amountInner = (\n <Styled.Root className={classNames} style={style} crossedOut={crossedOut}>\n {!onlyCurrency ? (\n <>\n <span className='major'>\n {isNegative && MINUS_SIGN_HTML_CODE}\n {majorPart}\n </span>\n {this.renderMinorPart(minorPart)}\n </>\n ) : null}\n {currency && this.renderCurrencySymbol(currencySymbol)}\n </Styled.Root>\n )\n\n const Element = isHeader ? Text.Heading : Text\n\n return (\n <Element {...rest} as='span'>\n {amountInner}\n </Element>\n )\n }\n}\n"],"names":["ZERO_MINOR_PART_REGEXP","Amount","PureComponent","static","isHeader","showZeroMinorPart","crossedOut","digitsAfterPoint","separator","onlyCurrency","getCurrencySymbol","currencyCode","CURRENCY_MAP","renderMinorPart","minorPart","this","props","needMinorPart","test","_jsxs","className","children","_jsx","renderCurrencySymbol","currencySymbol","style","position","currency","width","opacity","visibility","render","value","rest","majorPart","isNegative","numberParts","Math","abs","toFixed","split","majorPartFormatted","parts","str","length","from","slice","concat","createSplitter","amountSplitter","reverse","join","formatAmount","classNames","concatClassNames","amountInner","Styled","_Fragment","Text","Heading","as"],"mappings":"uPA2CA,MAAMA,uBAAyB,OAuDxB,MAAMC,eAAeC,cAC1BC,mBAAqB,SACrBA,oBAAsB,CACpBC,UAAU,EACVC,mBAAmB,EACnBC,YAAY,EACZC,iBAAkB,EAClBC,UAAW,IACXC,cAAc,GAGhB,wBAAOC,CAAkBC,GACvB,OAAOC,aAAaD,IAAiBA,CACvC,CAEAE,eAAAA,CAAgBC,GACd,MAAMT,kBAAEA,EAAiBG,UAAEA,GAAcO,KAAKC,MAE9C,IAAIC,GAAgB,EAUpB,OARIH,IACFG,GAAgB,GAEXZ,GAAqBL,uBAAuBkB,KAAKJ,KACpDG,GAAgB,IAIhBA,EAEAE,KAAA,OAAA,CAAMC,UAAU,kBAAiBC,UAC/BC,IAAA,OAAA,CAAMF,UAAU,YAAWC,SAAEb,IAC7Bc,IAAA,OAAA,CAAMF,UAAU,QAAOC,SAAEP,OAKxB,IACT,CAEAS,qBAAwBC,GACtBL,KAAA,OAAA,CAAMM,MAAO,CAAEC,SAAU,YAAaL,SAAA,CACnCN,KAAKC,MAAMW,WAAa,MACvBL,IAAA,OAAA,CACEG,MAAO,CACLC,SAAU,WACVE,MAAO,EACPC,QAAS,EACTC,WAAY,UACZT,SACH,SAGC,KACJC,IAAA,OAAA,CAAAD,SAAO,IAAIG,SAIfO,MAAAA,GACE,MAAMC,MAAEA,EAAKzB,iBAAEA,EAAgBoB,SAAEA,EAAQvB,SAAEA,EAAQgB,UAAEA,EAASK,MAAEA,EAAKnB,WAAEA,EAAUG,aAAEA,KAAiBwB,GAClGlB,KAAKC,MAEP,MAAMkB,UAAEA,EAASpB,UAAEA,EAASqB,WAAEA,EAAUX,eAAEA,GAjG9C,EACEQ,EAA8B,EAC9BzB,EACAI,KAEA,MAAMwB,EAAaH,EAAQ,EAK3B,MAAMI,EAHWC,KAAKC,IAAIN,GACGO,QAAQhC,GAELiC,MAAM,KACtC,MAAMN,EAAYE,EAAY,GAC9B,MAAMtB,EAAYsB,EAAY,GAI9B,MAAMK,EAjCR,MACE,MAAMC,MAASC,IACb,MAAMC,OAAEA,GAAWD,EAEnB,GAAIC,GARuB,EASzB,MAAO,CAACD,GAGV,MAAME,EAAOD,EAZc,EAe3B,MAAO,CAACD,EAAIG,MAAMD,EAFPD,IAEkBG,OAAOL,MAAMC,EAAIG,MAAM,EAAGD,IAAO,EAGhE,OAAOH,KACT,EAgByBM,EAEIC,CAAef,GAAWgB,UAAUC,KAAK,KAIpE,MAAO,CACLjB,UAAWO,EACX3B,YACAkB,MALwBS,GAAsB3B,EAAY,IAAIA,IAAc,IAM5EqB,aACAX,eAAgBb,EAAeV,OAAOS,kBAAkBC,GAAgB,GAE5E,EAsEiEyC,CAAapB,EAAOzB,EAAkBoB,GAEnG,MAAM0B,EAAaC,iBAAiB,SAAUlC,GAE9C,MAAMmC,EACJpC,KAACqC,KAAW,CAACpC,UAAWiC,EAAY5B,MAAOA,EAAOnB,WAAYA,EAAWe,UACrEZ,EAQE,KAPFU,KAAAsC,SAAA,CAAApC,UACEF,KAAA,OAAA,CAAMC,UAAU,QAAOC,SACpBc,CAAAA,GA7Hc,IA8HdD,KAEFnB,KAAKF,gBAAgBC,MAGzBa,GAAYZ,KAAKQ,qBAAqBC,MAM3C,OACEF,IAHclB,EAAWsD,KAAKC,QAAUD,KAGhC,IAAKzB,EAAM2B,GAAG,OAAMvC,SACzBkC,GAGP"}
1
+ {"version":3,"file":"Amount.mjs","sources":["../../../../src/components/Amount/Amount.tsx"],"sourcesContent":["import { PureComponent } from 'react'\nimport { Text } from 'components/Text'\nimport type { TextProps } from 'components/Text'\nimport { concatClassNames } from 'shared/utils/dom'\nimport { CURRENCY_MAP } from './data'\nimport type { CurrencyCodes } from './data'\nimport * as Styled from './style'\n\nexport interface AmountProps extends TextProps {\n /**\n * Value for amount\n */\n value?: number\n /**\n * Digits after point\n */\n digitsAfterPoint?: number\n /**\n * Show zero minor part\n */\n showZeroMinorPart?: boolean\n /**\n * Separator of major and minor part of amount\n */\n separator?: string\n /**\n * International code of currency.\n */\n currency?: keyof typeof CurrencyCodes | string\n /**\n * Use Header component for display amount\n */\n isHeader?: boolean\n /**\n * Amount is not valid and will be crossed out with ```text-decoration: line-through```\n */\n crossedOut?: boolean\n /**\n * If need only currency symbol\n */\n onlyCurrency?: boolean\n}\n\nconst AMOUNT_MAJOR_PART_SIZE = 3\nconst ZERO_MINOR_PART_REGEXP = /^0+$/\nconst MINUS_SIGN_HTML_CODE = '\\u2212'\n\nfunction getCurrencySymbol(currencyCode: keyof typeof CurrencyCodes | string) {\n return CURRENCY_MAP[currencyCode as keyof typeof CurrencyCodes] || currencyCode\n}\n\nfunction createSplitter(partSize: number): (_s: string) => string[] {\n const parts = (str: string): string[] => {\n const { length } = str\n\n if (length <= partSize) {\n return [str]\n }\n\n const from = length - partSize\n const to = length\n\n return [str.slice(from, to)].concat(parts(str.slice(0, from)))\n }\n\n return parts\n}\n\nfunction formatAmount(\n digitsAfterPoint: AmountProps['digitsAfterPoint'],\n currencyCode: AmountProps['currency'],\n value: AmountProps['value'] = 0\n) {\n const isNegative = value < 0\n\n const valueAbs = Math.abs(value)\n const valueAbsStr = valueAbs.toFixed(digitsAfterPoint)\n\n const numberParts = valueAbsStr.split('.')\n const majorPart = numberParts[0]\n const minorPart = numberParts[1]\n\n const amountSplitter = createSplitter(AMOUNT_MAJOR_PART_SIZE)\n\n const majorPartFormatted = amountSplitter(majorPart).reverse().join(' ')\n\n const formattedValueStr = majorPartFormatted + (minorPart ? `,${minorPart}` : '')\n\n return {\n majorPart: majorPartFormatted,\n minorPart,\n value: formattedValueStr,\n isNegative,\n currencySymbol: currencyCode ? getCurrencySymbol(currencyCode) : '',\n }\n}\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`ResponsiveNamedProperty<'size'>`](#/Миксины)\n */\nexport class Amount extends PureComponent<AmountProps> {\n static displayName = 'Amount'\n static defaultProps = {\n isHeader: false,\n showZeroMinorPart: false,\n crossedOut: false,\n digitsAfterPoint: 2,\n separator: ',',\n onlyCurrency: false,\n }\n\n static getCurrencySymbol = getCurrencySymbol\n\n renderMinorPart(minorPart: string) {\n const { showZeroMinorPart, separator } = this.props\n\n let needMinorPart = false\n\n if (minorPart) {\n needMinorPart = true\n\n if (!showZeroMinorPart && ZERO_MINOR_PART_REGEXP.test(minorPart)) {\n needMinorPart = false\n }\n }\n\n if (needMinorPart) {\n return (\n <span className='minor-container'>\n <span className='separator'>{separator}</span>\n <span className='minor'>{minorPart}</span>\n </span>\n )\n }\n\n return null\n }\n\n renderCurrencySymbol = (currencySymbol: string) => (\n <span style={{ position: 'relative' }}>\n {this.props.currency === 'RUR' ? (\n <span\n style={{\n position: 'absolute',\n width: 0,\n opacity: 0,\n visibility: 'hidden',\n }}\n >\n руб.\n </span>\n ) : null}\n <span>{` ${currencySymbol}`}</span>\n </span>\n )\n\n render() {\n const { value, digitsAfterPoint, currency, isHeader, className, style, crossedOut, onlyCurrency, ...rest } =\n this.props\n\n const { majorPart, minorPart, isNegative, currencySymbol } = formatAmount(digitsAfterPoint, currency, value)\n\n const classNames = concatClassNames('amount', className)\n\n const amountInner = (\n <Styled.Root className={classNames} style={style} crossedOut={crossedOut}>\n {!onlyCurrency ? (\n <>\n <span className='major'>\n {isNegative ? MINUS_SIGN_HTML_CODE : null}\n {majorPart}\n </span>\n {this.renderMinorPart(minorPart)}\n </>\n ) : null}\n {currency ? this.renderCurrencySymbol(currencySymbol) : null}\n </Styled.Root>\n )\n\n const Element = isHeader ? Text.Heading : Text\n\n return (\n <Element {...rest} as='span'>\n {amountInner}\n </Element>\n )\n }\n}\n"],"names":["ZERO_MINOR_PART_REGEXP","getCurrencySymbol","currencyCode","CURRENCY_MAP","Amount","PureComponent","static","isHeader","showZeroMinorPart","crossedOut","digitsAfterPoint","separator","onlyCurrency","renderMinorPart","minorPart","this","props","needMinorPart","test","_jsxs","className","children","_jsx","renderCurrencySymbol","currencySymbol","style","position","currency","width","opacity","visibility","render","value","rest","majorPart","isNegative","numberParts","Math","abs","toFixed","split","majorPartFormatted","parts","str","length","from","slice","concat","createSplitter","amountSplitter","reverse","join","formatAmount","classNames","concatClassNames","amountInner","Styled","_Fragment","Text","Heading","as"],"mappings":"uPA4CA,MAAMA,uBAAyB,OAG/B,SAASC,kBAAkBC,GACzB,OAAOC,aAAaD,IAA+CA,CACrE,CAsDO,MAAME,eAAeC,cAC1BC,mBAAqB,SACrBA,oBAAsB,CACpBC,UAAU,EACVC,mBAAmB,EACnBC,YAAY,EACZC,iBAAkB,EAClBC,UAAW,IACXC,cAAc,GAGhBN,yBAA2BL,kBAE3BY,eAAAA,CAAgBC,GACd,MAAMN,kBAAEA,EAAiBG,UAAEA,GAAcI,KAAKC,MAE9C,IAAIC,GAAgB,EAUpB,OARIH,IACFG,GAAgB,GAEXT,GAAqBR,uBAAuBkB,KAAKJ,KACpDG,GAAgB,IAIhBA,EAEAE,KAAA,OAAA,CAAMC,UAAU,kBAAiBC,UAC/BC,IAAA,OAAA,CAAMF,UAAU,YAAWC,SAAEV,IAC7BW,IAAA,OAAA,CAAMF,UAAU,QAAOC,SAAEP,OAKxB,IACT,CAEAS,qBAAwBC,GACtBL,KAAA,OAAA,CAAMM,MAAO,CAAEC,SAAU,YAAaL,SAAA,CACnCN,KAAKC,MAAMW,WAAa,MACvBL,IAAA,OAAA,CACEG,MAAO,CACLC,SAAU,WACVE,MAAO,EACPC,QAAS,EACTC,WAAY,UACZT,SACH,SAGC,KACJC,IAAA,OAAA,CAAAD,SAAO,IAAIG,SAIfO,MAAAA,GACE,MAAMC,MAAEA,EAAKtB,iBAAEA,EAAgBiB,SAAEA,EAAQpB,SAAEA,EAAQa,UAAEA,EAASK,MAAEA,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"],"sourcesContent":["/* eslint-disable no-unused-vars */\nexport enum CurrencyCodes {\n ALL = 'ALL',\n AFN = 'AFN',\n ARS = 'ARS',\n AWG = 'AWG',\n AUD = 'AUD',\n AZN = 'AZN',\n BSD = 'BSD',\n BBD = 'BBD',\n BYR = 'BYR',\n BZD = 'BZD',\n BMD = 'BMD',\n BOB = 'BOB',\n BAM = 'BAM',\n BWP = 'BWP',\n BGN = 'BGN',\n BRL = 'BRL',\n BND = 'BND',\n KHR = 'KHR',\n CAD = 'CAD',\n KYD = 'KYD',\n CLP = 'CLP',\n CNY = 'CNY',\n COP = 'COP',\n CRC = 'CRC',\n HRK = 'HRK',\n CUP = 'CUP',\n CZK = 'CZK',\n DKK = 'DKK',\n DOP = 'DOP',\n XCD = 'XCD',\n EGP = 'EGP',\n SVC = 'SVC',\n EEK = 'EEK',\n EUR = 'EUR',\n FKP = 'FKP',\n FJD = 'FJD',\n FRF = 'FRF',\n GHC = 'GHC',\n GIP = 'GIP',\n GTQ = 'GTQ',\n GGP = 'GGP',\n GYD = 'GYD',\n HNL = 'HNL',\n HKD = 'HKD',\n HUF = 'HUF',\n ISK = 'ISK',\n INR = 'INR',\n IDR = 'IDR',\n IRR = 'IRR',\n IMP = 'IMP',\n ILS = 'ILS',\n JMD = 'JMD',\n JPY = 'JPY',\n JEP = 'JEP',\n KZT = 'KZT',\n KGS = 'KGS',\n LAK = 'LAK',\n LVL = 'LVL',\n LBP = 'LBP',\n LRD = 'LRD',\n LTL = 'LTL',\n MKD = 'MKD',\n MYR = 'MYR',\n MUR = 'MUR',\n MXN = 'MXN',\n MNT = 'MNT',\n MZN = 'MZN',\n NAD = 'NAD',\n NPR = 'NPR',\n ANG = 'ANG',\n NZD = 'NZD',\n NIO = 'NIO',\n NGN = 'NGN',\n KPW = 'KPW',\n NOK = 'NOK',\n OMR = 'OMR',\n PKR = 'PKR',\n PAB = 'PAB',\n PYG = 'PYG',\n PEN = 'PEN',\n PHP = 'PHP',\n PLN = 'PLN',\n QAR = 'QAR',\n RON = 'RON',\n RUR = 'RUR',\n RUB = 'RUB',\n SHP = 'SHP',\n SAR = 'SAR',\n RSD = 'RSD',\n SCR = 'SCR',\n SGD = 'SGD',\n SBD = 'SBD',\n SOS = 'SOS',\n ZAR = 'ZAR',\n KRW = 'KRW',\n LKR = 'LKR',\n SEK = 'SEK',\n CHF = 'CHF',\n SRD = 'SRD',\n SYP = 'SYP',\n TWD = 'TWD',\n THB = 'THB',\n TTD = 'TTD',\n TRY = 'TRY',\n TRL = 'TRL',\n TVD = 'TVD',\n UAH = 'UAH',\n GBP = 'GBP',\n USD = 'USD',\n UYU = 'UYU',\n UZS = 'UZS',\n VEF = 'VEF',\n VND = 'VND',\n YER = 'YER',\n ZWD = 'ZWD',\n}\n\nexport const CURRENCY_MAP: Readonly<Record<CurrencyCodes, string>> = Object.freeze({\n ALL: '\\u004C\\u0065\\u006b',\n AFN: '\\u060B',\n ARS: '\\u0024',\n AWG: '\\u0192',\n AUD: '\\u0024',\n AZN: '\\u20BC',\n BSD: '\\u0024',\n BBD: '\\u0024',\n BYR: '\\u0042\\u0072',\n BZD: '\\u0042\\u005a\\u0024',\n BMD: '\\u0024',\n BOB: '\\u0024\\u0062',\n BAM: '\\u004B\\u004d',\n BWP: '\\u0050',\n BGN: '\\u043B\\u0432',\n BRL: '\\u0052\\u0024',\n BND: '\\u0024',\n KHR: '\\u17DB',\n CAD: '\\u0043\\u0024',\n KYD: '\\u0024',\n CLP: '\\u0024',\n CNY: '\\u00A5',\n COP: '\\u0024',\n CRC: '\\u20A1',\n HRK: '\\u006B\\u006e',\n CUP: '\\u20B1',\n CZK: '\\u004B\\u010d',\n DKK: '\\u006B\\u0072',\n DOP: '\\u0052\\u0044\\u0024',\n XCD: '\\u0024',\n EGP: '\\u00A3',\n SVC: '\\u0024',\n EEK: '\\u006B\\u0072',\n EUR: '\\u20AC',\n FKP: '\\u00A3',\n FJD: '\\u0024',\n FRF: '\\u20A3',\n GHC: '\\u00A2',\n GIP: '\\u00A3',\n GTQ: '\\u0051',\n GGP: '\\u00A3',\n GYD: '\\u0024',\n HNL: '\\u004C',\n HKD: '\\u0024',\n HUF: '\\u0046\\u0074',\n ISK: '\\u006B\\u0072',\n INR: '\\u20A8',\n IDR: '\\u0052\\u0070',\n IRR: '\\uFDFC',\n IMP: '\\u00A3',\n ILS: '\\u20AA',\n JMD: '\\u004A\\u0024',\n JPY: '\\u00A5',\n JEP: '\\u00A3',\n KZT: '\\u20B8',\n KGS: '\\u004B\\u0047\\u0053',\n LAK: '\\u20AD',\n LVL: '\\u004C\\u0073',\n LBP: '\\u00A3',\n LRD: '\\u0024',\n LTL: '\\u004C\\u0074',\n MKD: '\\u0434\\u0435\\u043d',\n MYR: '\\u0052\\u004d',\n MUR: '\\u20A8',\n MXN: '\\u0024',\n MNT: '\\u20AE',\n MZN: '\\u004D\\u0054',\n NAD: '\\u0024',\n NPR: '\\u20A8',\n ANG: '\\u0192',\n NZD: '\\u0024',\n NIO: '\\u0043\\u0024',\n NGN: '\\u20A6',\n KPW: '\\u20A9',\n NOK: '\\u006B\\u0072',\n OMR: '\\uFDFC',\n PKR: '\\u20A8',\n PAB: '\\u0042\\u002f\\u002e',\n PYG: '\\u0047\\u0073',\n PEN: '\\u0053\\u002f\\u002e',\n PHP: '\\u20B1',\n PLN: '\\u007A\\u0142',\n QAR: '\\uFDFC',\n RON: '\\u006C\\u0065\\u0069',\n RUR: '\\u20BD',\n RUB: '\\u20BD',\n SHP: '\\u00A3',\n SAR: '\\uFDFC',\n RSD: '\\u0414\\u0438\\u043d\\u002e',\n SCR: '\\u20A8',\n SGD: '\\u0024',\n SBD: '\\u0024',\n SOS: '\\u0053',\n ZAR: '\\u0052',\n KRW: '\\u20A9',\n LKR: '\\u20A8',\n SEK: '\\u006B\\u0072',\n CHF: '\\u0043\\u0048\\u0046',\n SRD: '\\u0024',\n SYP: '\\u00A3',\n TWD: '\\u004E\\u0054\\u0024',\n THB: '\\u0E3F',\n TTD: '\\u0054\\u0054\\u0024',\n TRY: '\\u20A4',\n TRL: '\\u20A4',\n TVD: '\\u0024',\n UAH: '\\u20B4',\n GBP: '\\u00A3',\n USD: '\\u0024',\n UYU: '\\u0024\\u0055',\n UZS: '\\u043B\\u0432',\n VEF: '\\u0042\\u0073',\n VND: '\\u20AB',\n YER: '\\uFDFC',\n ZWD: '\\u005A\\u0024',\n})\n"],"names":["CurrencyCodes","CURRENCY_MAP","Object","freeze","ALL","AFN","ARS","AWG","AUD","AZN","BSD","BBD","BYR","BZD","BMD","BOB","BAM","BWP","BGN","BRL","BND","KHR","CAD","KYD","CLP","CNY","COP","CRC","HRK","CUP","CZK","DKK","DOP","XCD","EGP","SVC","EEK","EUR","FKP","FJD","FRF","GHC","GIP","GTQ","GGP","GYD","HNL","HKD","HUF","ISK","INR","IDR","IRR","IMP","ILS","JMD","JPY","JEP","KZT","KGS","LAK","LVL","LBP","LRD","LTL","MKD","MYR","MUR","MXN","MNT","MZN","NAD","NPR","ANG","NZD","NIO","NGN","KPW","NOK","OMR","PKR","PAB","PYG","PEN","PHP","PLN","QAR","RON","RUR","RUB","SHP","SAR","RSD","SCR","SGD","SBD","SOS","ZAR","KRW","LKR","SEK","CHF","SRD","SYP","TWD","THB","TTD","TRY","TRL","TVD","UAH","GBP","USD","UYU","UZS","VEF","VND","YER","ZWD"],"mappings":"aACYA,IAAAA,eAAAA,IAAAA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IA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K,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,KACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,MACLC,IAAK,IACLC,IAAK,KACLC,IAAK,IACLC,IAAK,IACLC,IAAK,KACLC,IAAK,MACLC,IAAK,KACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,KACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,KACLC,IAAK,IACLC,IAAK,IACLC,IAAK,KACLC,IAAK,IACLC,IAAK,IACLC,IAAK,MACLC,IAAK,KACLC,IAAK,MACLC,IAAK,IACLC,IAAK,KACLC,IAAK,IACLC,IAAK,MACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,OACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,KACLC,IAAK,MACLC,IAAK,IACLC,IAAK,IACLC,IAAK,MACLC,IAAK,IACLC,IAAK,MACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,KACLC,IAAK,KACLC,IAAK,KACLC,IAAK,IACLC,IAAK,IACLC,IAAK"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/Amount/data/index.ts"],"sourcesContent":["export enum CurrencyCodes {\n ALL = 'ALL',\n AFN = 'AFN',\n ARS = 'ARS',\n AWG = 'AWG',\n AUD = 'AUD',\n AZN = 'AZN',\n BSD = 'BSD',\n BBD = 'BBD',\n BYR = 'BYR',\n BZD = 'BZD',\n BMD = 'BMD',\n BOB = 'BOB',\n BAM = 'BAM',\n BWP = 'BWP',\n BGN = 'BGN',\n BRL = 'BRL',\n BND = 'BND',\n KHR = 'KHR',\n CAD = 'CAD',\n KYD = 'KYD',\n CLP = 'CLP',\n CNY = 'CNY',\n COP = 'COP',\n CRC = 'CRC',\n HRK = 'HRK',\n CUP = 'CUP',\n CZK = 'CZK',\n DKK = 'DKK',\n DOP = 'DOP',\n XCD = 'XCD',\n EGP = 'EGP',\n SVC = 'SVC',\n EEK = 'EEK',\n EUR = 'EUR',\n FKP = 'FKP',\n FJD = 'FJD',\n FRF = 'FRF',\n GHC = 'GHC',\n GIP = 'GIP',\n GTQ = 'GTQ',\n GGP = 'GGP',\n GYD = 'GYD',\n HNL = 'HNL',\n HKD = 'HKD',\n HUF = 'HUF',\n ISK = 'ISK',\n INR = 'INR',\n IDR = 'IDR',\n IRR = 'IRR',\n IMP = 'IMP',\n ILS = 'ILS',\n JMD = 'JMD',\n JPY = 'JPY',\n JEP = 'JEP',\n KZT = 'KZT',\n KGS = 'KGS',\n LAK = 'LAK',\n LVL = 'LVL',\n LBP = 'LBP',\n LRD = 'LRD',\n LTL = 'LTL',\n MKD = 'MKD',\n MYR = 'MYR',\n MUR = 'MUR',\n MXN = 'MXN',\n MNT = 'MNT',\n MZN = 'MZN',\n NAD = 'NAD',\n NPR = 'NPR',\n ANG = 'ANG',\n NZD = 'NZD',\n NIO = 'NIO',\n NGN = 'NGN',\n KPW = 'KPW',\n NOK = 'NOK',\n OMR = 'OMR',\n PKR = 'PKR',\n PAB = 'PAB',\n PYG = 'PYG',\n PEN = 'PEN',\n PHP = 'PHP',\n PLN = 'PLN',\n QAR = 'QAR',\n RON = 'RON',\n RUR = 'RUR',\n RUB = 'RUB',\n SHP = 'SHP',\n SAR = 'SAR',\n RSD = 'RSD',\n SCR = 'SCR',\n SGD = 'SGD',\n SBD = 'SBD',\n SOS = 'SOS',\n ZAR = 'ZAR',\n KRW = 'KRW',\n LKR = 'LKR',\n SEK = 'SEK',\n CHF = 'CHF',\n SRD = 'SRD',\n SYP = 'SYP',\n TWD = 'TWD',\n THB = 'THB',\n TTD = 'TTD',\n TRY = 'TRY',\n TRL = 'TRL',\n TVD = 'TVD',\n UAH = 'UAH',\n GBP = 'GBP',\n USD = 'USD',\n UYU = 'UYU',\n UZS = 'UZS',\n VEF = 'VEF',\n VND = 'VND',\n YER = 'YER',\n ZWD = 'ZWD',\n}\n\nexport const CURRENCY_MAP: Readonly<Record<CurrencyCodes, string>> = Object.freeze({\n ALL: '\\u004C\\u0065\\u006b',\n AFN: '\\u060B',\n ARS: '\\u0024',\n AWG: '\\u0192',\n AUD: '\\u0024',\n AZN: '\\u20BC',\n BSD: '\\u0024',\n BBD: '\\u0024',\n BYR: '\\u0042\\u0072',\n BZD: '\\u0042\\u005a\\u0024',\n BMD: '\\u0024',\n BOB: '\\u0024\\u0062',\n BAM: '\\u004B\\u004d',\n BWP: '\\u0050',\n BGN: '\\u043B\\u0432',\n BRL: '\\u0052\\u0024',\n BND: '\\u0024',\n KHR: '\\u17DB',\n CAD: '\\u0043\\u0024',\n KYD: '\\u0024',\n CLP: '\\u0024',\n CNY: '\\u00A5',\n COP: '\\u0024',\n CRC: '\\u20A1',\n HRK: '\\u006B\\u006e',\n CUP: '\\u20B1',\n CZK: '\\u004B\\u010d',\n DKK: '\\u006B\\u0072',\n DOP: '\\u0052\\u0044\\u0024',\n XCD: '\\u0024',\n EGP: '\\u00A3',\n SVC: '\\u0024',\n EEK: '\\u006B\\u0072',\n EUR: '\\u20AC',\n FKP: '\\u00A3',\n FJD: '\\u0024',\n FRF: '\\u20A3',\n GHC: '\\u00A2',\n GIP: '\\u00A3',\n GTQ: '\\u0051',\n GGP: '\\u00A3',\n GYD: '\\u0024',\n HNL: '\\u004C',\n HKD: '\\u0024',\n HUF: '\\u0046\\u0074',\n ISK: '\\u006B\\u0072',\n INR: '\\u20A8',\n IDR: '\\u0052\\u0070',\n IRR: '\\uFDFC',\n IMP: '\\u00A3',\n ILS: '\\u20AA',\n JMD: '\\u004A\\u0024',\n JPY: '\\u00A5',\n JEP: '\\u00A3',\n KZT: '\\u20B8',\n KGS: '\\u004B\\u0047\\u0053',\n LAK: '\\u20AD',\n LVL: '\\u004C\\u0073',\n LBP: '\\u00A3',\n LRD: '\\u0024',\n LTL: '\\u004C\\u0074',\n MKD: '\\u0434\\u0435\\u043d',\n MYR: '\\u0052\\u004d',\n MUR: '\\u20A8',\n MXN: '\\u0024',\n MNT: '\\u20AE',\n MZN: '\\u004D\\u0054',\n NAD: '\\u0024',\n NPR: '\\u20A8',\n ANG: '\\u0192',\n NZD: '\\u0024',\n NIO: '\\u0043\\u0024',\n NGN: '\\u20A6',\n KPW: '\\u20A9',\n NOK: '\\u006B\\u0072',\n OMR: '\\uFDFC',\n PKR: '\\u20A8',\n PAB: '\\u0042\\u002f\\u002e',\n PYG: '\\u0047\\u0073',\n PEN: '\\u0053\\u002f\\u002e',\n PHP: '\\u20B1',\n PLN: '\\u007A\\u0142',\n QAR: '\\uFDFC',\n RON: '\\u006C\\u0065\\u0069',\n RUR: '\\u20BD',\n RUB: '\\u20BD',\n SHP: '\\u00A3',\n SAR: '\\uFDFC',\n RSD: '\\u0414\\u0438\\u043d\\u002e',\n SCR: '\\u20A8',\n SGD: '\\u0024',\n SBD: '\\u0024',\n SOS: '\\u0053',\n ZAR: '\\u0052',\n KRW: '\\u20A9',\n LKR: '\\u20A8',\n SEK: '\\u006B\\u0072',\n CHF: '\\u0043\\u0048\\u0046',\n SRD: '\\u0024',\n SYP: '\\u00A3',\n TWD: '\\u004E\\u0054\\u0024',\n THB: '\\u0E3F',\n TTD: '\\u0054\\u0054\\u0024',\n TRY: '\\u20A4',\n TRL: '\\u20A4',\n TVD: '\\u0024',\n UAH: '\\u20B4',\n GBP: '\\u00A3',\n USD: '\\u0024',\n UYU: '\\u0024\\u0055',\n UZS: '\\u043B\\u0432',\n VEF: '\\u0042\\u0073',\n VND: '\\u20AB',\n YER: '\\uFDFC',\n ZWD: '\\u005A\\u0024',\n})\n"],"names":["CurrencyCodes","CURRENCY_MAP","Object","freeze","ALL","AFN","ARS","AWG","AUD","AZN","BSD","BBD","BYR","BZD","BMD","BOB","BAM","BWP","BGN","BRL","BND","KHR","CAD","KYD","CLP","CNY","COP","CRC","HRK","CUP","CZK","DKK","DOP","XCD","EGP","SVC","EEK","EUR","FKP","FJD","FRF","GHC","GIP","GTQ","GGP","GYD","HNL","HKD","HUF","ISK","INR","IDR","IRR","IMP","ILS","JMD","JPY","JEP","KZT","KGS","LAK","LVL","LBP","LRD","LTL","MKD","MYR","MUR","MXN","MNT","MZN","NAD","NPR","ANG","NZD","NIO","NGN","KPW","NOK","OMR","PKR","PAB","PYG","PEN","PHP","PLN","QAR","RON","RUR","RUB","SHP","SAR","RSD","SCR","SGD","SBD","SOS","ZAR","KRW","LKR","SEK","CHF","SRD","SYP","TWD","THB","TTD","TRY","TRL","TVD","UAH","GBP","USD","UYU","UZS","VEF","VND","YER","ZWD"],"mappings":"aAAYA,IAAAA,eAAAA,IAAAA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAA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IAAK,IACLC,IAAK,MACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,OACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,KACLC,IAAK,MACLC,IAAK,IACLC,IAAK,IACLC,IAAK,MACLC,IAAK,IACLC,IAAK,MACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,KACLC,IAAK,KACLC,IAAK,KACLC,IAAK,IACLC,IAAK,IACLC,IAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../src/components/Amount/data/index.ts"],"sourcesContent":["/* eslint-disable no-unused-vars */\nexport enum CurrencyCodes {\n ALL = 'ALL',\n AFN = 'AFN',\n ARS = 'ARS',\n AWG = 'AWG',\n AUD = 'AUD',\n AZN = 'AZN',\n BSD = 'BSD',\n BBD = 'BBD',\n BYR = 'BYR',\n BZD = 'BZD',\n BMD = 'BMD',\n BOB = 'BOB',\n BAM = 'BAM',\n BWP = 'BWP',\n BGN = 'BGN',\n BRL = 'BRL',\n BND = 'BND',\n KHR = 'KHR',\n CAD = 'CAD',\n KYD = 'KYD',\n CLP = 'CLP',\n CNY = 'CNY',\n COP = 'COP',\n CRC = 'CRC',\n HRK = 'HRK',\n CUP = 'CUP',\n CZK = 'CZK',\n DKK = 'DKK',\n DOP = 'DOP',\n XCD = 'XCD',\n EGP = 'EGP',\n SVC = 'SVC',\n EEK = 'EEK',\n EUR = 'EUR',\n FKP = 'FKP',\n FJD = 'FJD',\n FRF = 'FRF',\n GHC = 'GHC',\n GIP = 'GIP',\n GTQ = 'GTQ',\n GGP = 'GGP',\n GYD = 'GYD',\n HNL = 'HNL',\n HKD = 'HKD',\n HUF = 'HUF',\n ISK = 'ISK',\n INR = 'INR',\n IDR = 'IDR',\n IRR = 'IRR',\n IMP = 'IMP',\n ILS = 'ILS',\n JMD = 'JMD',\n JPY = 'JPY',\n JEP = 'JEP',\n KZT = 'KZT',\n KGS = 'KGS',\n LAK = 'LAK',\n LVL = 'LVL',\n LBP = 'LBP',\n LRD = 'LRD',\n LTL = 'LTL',\n MKD = 'MKD',\n MYR = 'MYR',\n MUR = 'MUR',\n MXN = 'MXN',\n MNT = 'MNT',\n MZN = 'MZN',\n NAD = 'NAD',\n NPR = 'NPR',\n ANG = 'ANG',\n NZD = 'NZD',\n NIO = 'NIO',\n NGN = 'NGN',\n KPW = 'KPW',\n NOK = 'NOK',\n OMR = 'OMR',\n PKR = 'PKR',\n PAB = 'PAB',\n PYG = 'PYG',\n PEN = 'PEN',\n PHP = 'PHP',\n PLN = 'PLN',\n QAR = 'QAR',\n RON = 'RON',\n RUR = 'RUR',\n RUB = 'RUB',\n SHP = 'SHP',\n SAR = 'SAR',\n RSD = 'RSD',\n SCR = 'SCR',\n SGD = 'SGD',\n SBD = 'SBD',\n SOS = 'SOS',\n ZAR = 'ZAR',\n KRW = 'KRW',\n LKR = 'LKR',\n SEK = 'SEK',\n CHF = 'CHF',\n SRD = 'SRD',\n SYP = 'SYP',\n TWD = 'TWD',\n THB = 'THB',\n TTD = 'TTD',\n TRY = 'TRY',\n TRL = 'TRL',\n TVD = 'TVD',\n UAH = 'UAH',\n GBP = 'GBP',\n USD = 'USD',\n UYU = 'UYU',\n UZS = 'UZS',\n VEF = 'VEF',\n VND = 'VND',\n YER = 'YER',\n ZWD = 'ZWD',\n}\n\nexport const CURRENCY_MAP: Readonly<Record<CurrencyCodes, string>> = Object.freeze({\n ALL: '\\u004C\\u0065\\u006b',\n AFN: '\\u060B',\n ARS: '\\u0024',\n AWG: '\\u0192',\n AUD: '\\u0024',\n AZN: '\\u20BC',\n BSD: '\\u0024',\n BBD: '\\u0024',\n BYR: '\\u0042\\u0072',\n BZD: '\\u0042\\u005a\\u0024',\n BMD: '\\u0024',\n BOB: '\\u0024\\u0062',\n BAM: '\\u004B\\u004d',\n BWP: '\\u0050',\n BGN: '\\u043B\\u0432',\n BRL: '\\u0052\\u0024',\n BND: '\\u0024',\n KHR: '\\u17DB',\n CAD: '\\u0043\\u0024',\n KYD: '\\u0024',\n CLP: '\\u0024',\n CNY: '\\u00A5',\n COP: '\\u0024',\n CRC: '\\u20A1',\n HRK: '\\u006B\\u006e',\n CUP: '\\u20B1',\n CZK: '\\u004B\\u010d',\n DKK: '\\u006B\\u0072',\n DOP: '\\u0052\\u0044\\u0024',\n XCD: '\\u0024',\n EGP: '\\u00A3',\n SVC: '\\u0024',\n EEK: '\\u006B\\u0072',\n EUR: '\\u20AC',\n FKP: '\\u00A3',\n FJD: '\\u0024',\n FRF: '\\u20A3',\n GHC: '\\u00A2',\n GIP: '\\u00A3',\n GTQ: '\\u0051',\n GGP: '\\u00A3',\n GYD: '\\u0024',\n HNL: '\\u004C',\n HKD: '\\u0024',\n HUF: '\\u0046\\u0074',\n ISK: '\\u006B\\u0072',\n INR: '\\u20A8',\n IDR: '\\u0052\\u0070',\n IRR: '\\uFDFC',\n IMP: '\\u00A3',\n ILS: '\\u20AA',\n JMD: '\\u004A\\u0024',\n JPY: '\\u00A5',\n JEP: '\\u00A3',\n KZT: '\\u20B8',\n KGS: '\\u004B\\u0047\\u0053',\n LAK: '\\u20AD',\n LVL: '\\u004C\\u0073',\n LBP: '\\u00A3',\n LRD: '\\u0024',\n LTL: '\\u004C\\u0074',\n MKD: '\\u0434\\u0435\\u043d',\n MYR: '\\u0052\\u004d',\n MUR: '\\u20A8',\n MXN: '\\u0024',\n MNT: '\\u20AE',\n MZN: '\\u004D\\u0054',\n NAD: '\\u0024',\n NPR: '\\u20A8',\n ANG: '\\u0192',\n NZD: '\\u0024',\n NIO: '\\u0043\\u0024',\n NGN: '\\u20A6',\n KPW: '\\u20A9',\n NOK: '\\u006B\\u0072',\n OMR: '\\uFDFC',\n PKR: '\\u20A8',\n PAB: '\\u0042\\u002f\\u002e',\n PYG: '\\u0047\\u0073',\n PEN: '\\u0053\\u002f\\u002e',\n PHP: '\\u20B1',\n PLN: '\\u007A\\u0142',\n QAR: '\\uFDFC',\n RON: '\\u006C\\u0065\\u0069',\n RUR: '\\u20BD',\n RUB: '\\u20BD',\n SHP: '\\u00A3',\n SAR: '\\uFDFC',\n RSD: '\\u0414\\u0438\\u043d\\u002e',\n SCR: '\\u20A8',\n SGD: '\\u0024',\n SBD: '\\u0024',\n SOS: '\\u0053',\n ZAR: '\\u0052',\n KRW: '\\u20A9',\n LKR: '\\u20A8',\n SEK: '\\u006B\\u0072',\n CHF: '\\u0043\\u0048\\u0046',\n SRD: '\\u0024',\n SYP: '\\u00A3',\n TWD: '\\u004E\\u0054\\u0024',\n THB: '\\u0E3F',\n TTD: '\\u0054\\u0054\\u0024',\n TRY: '\\u20A4',\n TRL: '\\u20A4',\n TVD: '\\u0024',\n UAH: '\\u20B4',\n GBP: '\\u00A3',\n USD: '\\u0024',\n UYU: '\\u0024\\u0055',\n UZS: '\\u043B\\u0432',\n VEF: '\\u0042\\u0073',\n VND: '\\u20AB',\n YER: '\\uFDFC',\n ZWD: '\\u005A\\u0024',\n})\n"],"names":["CurrencyCodes","CURRENCY_MAP","Object","freeze","ALL","AFN","ARS","AWG","AUD","AZN","BSD","BBD","BYR","BZD","BMD","BOB","BAM","BWP","BGN","BRL","BND","KHR","CAD","KYD","CLP","CNY","COP","CRC","HRK","CUP","CZK","DKK","DOP","XCD","EGP","SVC","EEK","EUR","FKP","FJD","FRF","GHC","GIP","GTQ","GGP","GYD","HNL","HKD","HUF","ISK","INR","IDR","IRR","IMP","ILS","JMD","JPY","JEP","KZT","KGS","LAK","LVL","LBP","LRD","LTL","MKD","MYR","MUR","MXN","MNT","MZN","NAD","NPR","ANG","NZD","NIO","NGN","KPW","NOK","OMR","PKR","PAB","PYG","PEN","PHP","PLN","QAR","RON","RUR","RUB","SHP","SAR","RSD","SCR","SGD","SBD","SOS","ZAR","KRW","LKR","SEK","CHF","SRD","SYP","TWD","THB","TTD","TRY","TR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ACLC,IAAK,IACLC,IAAK"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../src/components/Amount/data/index.ts"],"sourcesContent":["export enum CurrencyCodes {\n ALL = 'ALL',\n AFN = 'AFN',\n ARS = 'ARS',\n AWG = 'AWG',\n AUD = 'AUD',\n AZN = 'AZN',\n BSD = 'BSD',\n BBD = 'BBD',\n BYR = 'BYR',\n BZD = 'BZD',\n BMD = 'BMD',\n BOB = 'BOB',\n BAM = 'BAM',\n BWP = 'BWP',\n BGN = 'BGN',\n BRL = 'BRL',\n BND = 'BND',\n KHR = 'KHR',\n CAD = 'CAD',\n KYD = 'KYD',\n CLP = 'CLP',\n CNY = 'CNY',\n COP = 'COP',\n CRC = 'CRC',\n HRK = 'HRK',\n CUP = 'CUP',\n CZK = 'CZK',\n DKK = 'DKK',\n DOP = 'DOP',\n XCD = 'XCD',\n EGP = 'EGP',\n SVC = 'SVC',\n EEK = 'EEK',\n EUR = 'EUR',\n FKP = 'FKP',\n FJD = 'FJD',\n FRF = 'FRF',\n GHC = 'GHC',\n GIP = 'GIP',\n GTQ = 'GTQ',\n GGP = 'GGP',\n GYD = 'GYD',\n HNL = 'HNL',\n HKD = 'HKD',\n HUF = 'HUF',\n ISK = 'ISK',\n INR = 'INR',\n IDR = 'IDR',\n IRR = 'IRR',\n IMP = 'IMP',\n ILS = 'ILS',\n JMD = 'JMD',\n JPY = 'JPY',\n JEP = 'JEP',\n KZT = 'KZT',\n KGS = 'KGS',\n LAK = 'LAK',\n LVL = 'LVL',\n LBP = 'LBP',\n LRD = 'LRD',\n LTL = 'LTL',\n MKD = 'MKD',\n MYR = 'MYR',\n MUR = 'MUR',\n MXN = 'MXN',\n MNT = 'MNT',\n MZN = 'MZN',\n NAD = 'NAD',\n NPR = 'NPR',\n ANG = 'ANG',\n NZD = 'NZD',\n NIO = 'NIO',\n NGN = 'NGN',\n KPW = 'KPW',\n NOK = 'NOK',\n OMR = 'OMR',\n PKR = 'PKR',\n PAB = 'PAB',\n PYG = 'PYG',\n PEN = 'PEN',\n PHP = 'PHP',\n PLN = 'PLN',\n QAR = 'QAR',\n RON = 'RON',\n RUR = 'RUR',\n RUB = 'RUB',\n SHP = 'SHP',\n SAR = 'SAR',\n RSD = 'RSD',\n SCR = 'SCR',\n SGD = 'SGD',\n SBD = 'SBD',\n SOS = 'SOS',\n ZAR = 'ZAR',\n KRW = 'KRW',\n LKR = 'LKR',\n SEK = 'SEK',\n CHF = 'CHF',\n SRD = 'SRD',\n SYP = 'SYP',\n TWD = 'TWD',\n THB = 'THB',\n TTD = 'TTD',\n TRY = 'TRY',\n TRL = 'TRL',\n TVD = 'TVD',\n UAH = 'UAH',\n GBP = 'GBP',\n USD = 'USD',\n UYU = 'UYU',\n UZS = 'UZS',\n VEF = 'VEF',\n VND = 'VND',\n YER = 'YER',\n ZWD = 'ZWD',\n}\n\nexport const CURRENCY_MAP: Readonly<Record<CurrencyCodes, string>> = Object.freeze({\n ALL: '\\u004C\\u0065\\u006b',\n AFN: '\\u060B',\n ARS: '\\u0024',\n AWG: '\\u0192',\n AUD: '\\u0024',\n AZN: '\\u20BC',\n BSD: '\\u0024',\n BBD: '\\u0024',\n BYR: '\\u0042\\u0072',\n BZD: '\\u0042\\u005a\\u0024',\n BMD: '\\u0024',\n BOB: '\\u0024\\u0062',\n BAM: '\\u004B\\u004d',\n BWP: '\\u0050',\n BGN: '\\u043B\\u0432',\n BRL: '\\u0052\\u0024',\n BND: '\\u0024',\n KHR: '\\u17DB',\n CAD: '\\u0043\\u0024',\n KYD: '\\u0024',\n CLP: '\\u0024',\n CNY: '\\u00A5',\n COP: '\\u0024',\n CRC: '\\u20A1',\n HRK: '\\u006B\\u006e',\n CUP: '\\u20B1',\n CZK: '\\u004B\\u010d',\n DKK: '\\u006B\\u0072',\n DOP: '\\u0052\\u0044\\u0024',\n XCD: '\\u0024',\n EGP: '\\u00A3',\n SVC: '\\u0024',\n EEK: '\\u006B\\u0072',\n EUR: '\\u20AC',\n FKP: '\\u00A3',\n FJD: '\\u0024',\n FRF: '\\u20A3',\n GHC: '\\u00A2',\n GIP: '\\u00A3',\n GTQ: '\\u0051',\n GGP: '\\u00A3',\n GYD: '\\u0024',\n HNL: '\\u004C',\n HKD: '\\u0024',\n HUF: '\\u0046\\u0074',\n ISK: '\\u006B\\u0072',\n INR: '\\u20A8',\n IDR: '\\u0052\\u0070',\n IRR: '\\uFDFC',\n IMP: '\\u00A3',\n ILS: '\\u20AA',\n JMD: '\\u004A\\u0024',\n JPY: '\\u00A5',\n JEP: '\\u00A3',\n KZT: '\\u20B8',\n KGS: '\\u004B\\u0047\\u0053',\n LAK: '\\u20AD',\n LVL: '\\u004C\\u0073',\n LBP: '\\u00A3',\n LRD: '\\u0024',\n LTL: '\\u004C\\u0074',\n MKD: '\\u0434\\u0435\\u043d',\n MYR: '\\u0052\\u004d',\n MUR: '\\u20A8',\n MXN: '\\u0024',\n MNT: '\\u20AE',\n MZN: '\\u004D\\u0054',\n NAD: '\\u0024',\n NPR: '\\u20A8',\n ANG: '\\u0192',\n NZD: '\\u0024',\n NIO: '\\u0043\\u0024',\n NGN: '\\u20A6',\n KPW: '\\u20A9',\n NOK: '\\u006B\\u0072',\n OMR: '\\uFDFC',\n PKR: '\\u20A8',\n PAB: '\\u0042\\u002f\\u002e',\n PYG: '\\u0047\\u0073',\n PEN: '\\u0053\\u002f\\u002e',\n PHP: '\\u20B1',\n PLN: '\\u007A\\u0142',\n QAR: '\\uFDFC',\n RON: '\\u006C\\u0065\\u0069',\n RUR: '\\u20BD',\n RUB: '\\u20BD',\n SHP: '\\u00A3',\n SAR: '\\uFDFC',\n RSD: '\\u0414\\u0438\\u043d\\u002e',\n SCR: '\\u20A8',\n SGD: '\\u0024',\n SBD: '\\u0024',\n SOS: '\\u0053',\n ZAR: '\\u0052',\n KRW: '\\u20A9',\n LKR: '\\u20A8',\n SEK: '\\u006B\\u0072',\n CHF: '\\u0043\\u0048\\u0046',\n SRD: '\\u0024',\n SYP: '\\u00A3',\n TWD: '\\u004E\\u0054\\u0024',\n THB: '\\u0E3F',\n TTD: '\\u0054\\u0054\\u0024',\n TRY: '\\u20A4',\n TRL: '\\u20A4',\n TVD: '\\u0024',\n UAH: '\\u20B4',\n GBP: '\\u00A3',\n USD: '\\u0024',\n UYU: '\\u0024\\u0055',\n UZS: '\\u043B\\u0432',\n VEF: '\\u0042\\u0073',\n VND: '\\u20AB',\n YER: '\\uFDFC',\n ZWD: '\\u005A\\u0024',\n})\n"],"names":["CurrencyCodes","CURRENCY_MAP","Object","freeze","ALL","AFN","ARS","AWG","AUD","AZN","BSD","BBD","BYR","BZD","BMD","BOB","BAM","BWP","BGN","BRL","BND","KHR","CAD","KYD","CLP","CNY","COP","CRC","HRK","CUP","CZK","DKK","DOP","XCD","EGP","SVC","EEK","EUR","FKP","FJD","FRF","GHC","GIP","GTQ","GGP","GYD","HNL","HKD","HUF","ISK","INR","IDR","IRR","IMP","ILS","JMD","JPY","JEP","KZT","KGS","LAK","LVL","LBP","LRD","LTL","MKD","MYR","MUR","MXN","MNT","MZN","NAD","NPR","ANG","NZD","NIO","NGN","KPW","NOK","OMR","PKR","PAB","PYG","PEN","PHP","PLN","QAR","RON","RUR","RUB","SHP","SAR","RSD","SCR","SGD","SBD","SOS","ZAR","KRW","LKR","SEK","CHF","SRD","SYP","TWD","THB","TTD","TRY","TRL","TVD","UAH","GBP","USD","UYU","UZS","VEF","VND","YER","ZWD"],"mappings":"AAAYA,IAAAA,eAAAA,IAAAA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA,MAAbA,EAAa,IAAA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LC,IAAK,KACLC,IAAK,KACLC,IAAK,IACLC,IAAK,KACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,KACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,MACLC,IAAK,IACLC,IAAK,KACLC,IAAK,IACLC,IAAK,IACLC,IAAK,KACLC,IAAK,MACLC,IAAK,KACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,KACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,KACLC,IAAK,IACLC,IAAK,IACLC,IAAK,KACLC,IAAK,IACLC,IAAK,IACLC,IAAK,MACLC,IAAK,KACLC,IAAK,MACLC,IAAK,IACLC,IAAK,KACLC,IAAK,IACLC,IAAK,MACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,OACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,KACLC,IAAK,MACLC,IAAK,IACLC,IAAK,IACLC,IAAK,MACLC,IAAK,IACLC,IAAK,MACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,IACLC,IAAK,KACLC,IAAK,KACLC,IAAK,KACLC,IAAK,IACLC,IAAK,IACLC,IAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","sources":["../../../../src/components/Amount/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { AmountProps } from './Amount'\n\nconst crossedOut = css`\n text-decoration: line-through;\n`\n\nexport const Root = styled.span.withConfig<AmountProps>({\n shouldForwardProp: (prop) => ['children', 'className', 'style'].includes(prop),\n})`\n color: inherit;\n white-space: nowrap;\n ${(props) => (props.crossedOut ? crossedOut : null)}\n`\n"],"names":["crossedOut","css","Root","styled","span","withConfig","shouldForwardProp","prop","includes","displayName","componentId","props"],"mappings":"kKAGA,MAAMA,WAAaC,OAAGA,IAErB,CAAA,kCAEM,MAAMC,KAAOC,gBAAAA,QAAOC,KAAKC,WAAwB,CACtDC,kBAAoBC,GAAS,CAAC,WAAY,YAAa,SAASC,SAASD,KACzEF,WAAA,CAAAI,YAAA,eAAAC,YAAA,mBAFkBP,CAKfQ,CAAAA,oCAAAA,KAAAA,GAAWA,EAAMX,WAAaA,WAAa"}
1
+ {"version":3,"file":"style.js","sources":["../../../../src/components/Amount/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport type { AmountProps } from './Amount'\n\nconst crossedOut = css`\n text-decoration: line-through;\n`\n\nexport const Root = styled.span.withConfig<AmountProps>({\n shouldForwardProp: (prop) => ['children', 'className', 'style'].includes(prop),\n})`\n color: inherit;\n white-space: nowrap;\n ${(props) => (props.crossedOut ? crossedOut : null)}\n`\n"],"names":["crossedOut","css","Root","styled","span","withConfig","shouldForwardProp","prop","includes","displayName","componentId","props"],"mappings":"kKAGA,MAAMA,WAAaC,OAAGA,IAErB,CAAA,kCAEM,MAAMC,KAAOC,gBAAAA,QAAOC,KAAKC,WAAwB,CACtDC,kBAAoBC,GAAS,CAAC,WAAY,YAAa,SAASC,SAASD,KACzEF,WAAA,CAAAI,YAAA,eAAAC,YAAA,mBAFkBP,CAKfQ,CAAAA,oCAAAA,KAAAA,GAAWA,EAAMX,WAAaA,WAAa"}
@@ -1 +1 @@
1
- {"version":3,"file":"style.mjs","sources":["../../../../src/components/Amount/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { AmountProps } from './Amount'\n\nconst crossedOut = css`\n text-decoration: line-through;\n`\n\nexport const Root = styled.span.withConfig<AmountProps>({\n shouldForwardProp: (prop) => ['children', 'className', 'style'].includes(prop),\n})`\n color: inherit;\n white-space: nowrap;\n ${(props) => (props.crossedOut ? crossedOut : null)}\n`\n"],"names":["crossedOut","css","Root","styled","span","withConfig","shouldForwardProp","prop","includes","displayName","componentId","props"],"mappings":"2CAGA,MAAMA,WAAaC,IAElB,CAAA,kCAEM,MAAMC,KAAOC,OAAOC,KAAKC,WAAwB,CACtDC,kBAAoBC,GAAS,CAAC,WAAY,YAAa,SAASC,SAASD,KACzEF,WAAA,CAAAI,YAAA,eAAAC,YAAA,mBAFkBP,CAKfQ,CAAAA,oCAAAA,KAAAA,GAAWA,EAAMX,WAAaA,WAAa"}
1
+ {"version":3,"file":"style.mjs","sources":["../../../../src/components/Amount/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport type { AmountProps } from './Amount'\n\nconst crossedOut = css`\n text-decoration: line-through;\n`\n\nexport const Root = styled.span.withConfig<AmountProps>({\n shouldForwardProp: (prop) => ['children', 'className', 'style'].includes(prop),\n})`\n color: inherit;\n white-space: nowrap;\n ${(props) => (props.crossedOut ? crossedOut : null)}\n`\n"],"names":["crossedOut","css","Root","styled","span","withConfig","shouldForwardProp","prop","includes","displayName","componentId","props"],"mappings":"2CAGA,MAAMA,WAAaC,IAElB,CAAA,kCAEM,MAAMC,KAAOC,OAAOC,KAAKC,WAAwB,CACtDC,kBAAoBC,GAAS,CAAC,WAAY,YAAa,SAASC,SAASD,KACzEF,WAAA,CAAAI,YAAA,eAAAC,YAAA,mBAFkBP,CAKfQ,CAAAA,oCAAAA,KAAAA,GAAWA,EAAMX,WAAaA,WAAa"}
@@ -1,2 +1,2 @@
1
- 'use strict';var React=require('react');var styled=require('styled-components');var withMergedProps=require('../../hocs/withMergedProps.js');var useClassname=require('../../hooks/useClassname.js');var constants=require('./constants.js');var style=require('./style.js');var jsxRuntime=require('react/jsx-runtime');var Icon=require('../Icon/Icon.js');var Text=require('../Text/Text.js');const Anchor=withMergedProps.withMergedProps(React.forwardRef(((e,s)=>{const{size:r="inherit",autoRel:t=!0,textProps:n={},iconProps:o={},icon:i,children:a,content:c,...d}=e;const l=styled.useTheme();const u=useClassname.useClassname("Anchor",d.className);const m=l.utils?.relBuilder;const x=d.href??d.to;const p=d.rel??(t&&m&&typeof x=='string'?m(x,d.target):void 0);const[h,j]=Array.isArray(i)?i:[i];const v={as:'span',size:'inherit',color:'inherit',underline:d.underline,marginLeft:h?'0.20em':void 0,marginRight:j?'0.20em':void 0};const g={as:'span',color:'inherit'};let y;return d.to&&(y=l.link),d.pseudo&&(y='div'),d.disabled&&(y='span'),d.as&&(y=d.as),jsxRuntime.jsx(style.Root,{...d,ref:s,as:y,className:u,size:r,rel:p,"data-disabled":d.disabled,children:typeof a=='function'?a({baseTextProps:v,textProps:n,iconBaseProps:g,iconProps:o,icon:i}):d.preset==='brand'?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[h&&jsxRuntime.jsx(Icon.Icon,{name:typeof h=='string'?h:void 0,icon:typeof h!='string'?h:void 0,...g,...o}),jsxRuntime.jsx(Text.Text,{...v,...n,children:a||c}),j&&jsxRuntime.jsx(Icon.Icon,{name:typeof j=='string'?j:void 0,icon:typeof j!='string'?j:void 0,...g,...o})]}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:a||c})})})),{displayName:"Anchor",sizes:constants.SIZES});exports.Anchor=Anchor,exports.COMPONENT_NAME="Anchor";
1
+ 'use strict';var React=require('react');var styled=require('styled-components');var withMergedProps=require('../../hocs/withMergedProps.js');var useClassname=require('../../hooks/useClassname.js');var constants=require('./constants.js');var style=require('./style.js');var jsxRuntime=require('react/jsx-runtime');var Icon=require('../Icon/Icon.js');var Text=require('../Text/Text.js');const Anchor=withMergedProps.withMergedProps(React.forwardRef(((e,s)=>{const{size:r="inherit",autoRel:t=!0,textProps:n={},iconProps:o={},icon:i,children:a,content:c,...l}=e;const d=styled.useTheme();const u=useClassname.useClassname("Anchor",l.className);const p=d.utils?.relBuilder;const m=l.href??l.to;const h=l.rel??(t&&p&&typeof m=='string'?p(m,l.target):void 0);const[x,j]=Array.isArray(i)?i:[i];const v={as:'span',size:'inherit',color:'inherit',underline:l.underline,marginLeft:x?'0.20em':void 0,marginRight:j?'0.20em':void 0};const y={as:'span',color:'inherit'};let g;return l.to&&(g=d.link),l.pseudo&&(g='div'),l.disabled&&(g='span'),l.as&&(g=l.as),jsxRuntime.jsx(style.Root,{...l,ref:s,as:g,className:u,size:r,rel:h,"data-disabled":l.disabled,children:typeof a=='function'?a({baseTextProps:v,textProps:n,iconBaseProps:y,iconProps:o,icon:i}):l.preset==='brand'?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[x?jsxRuntime.jsx(Icon.Icon,{name:typeof x=='string'?x:void 0,icon:typeof x!='string'?x:void 0,...y,...o}):null,jsxRuntime.jsx(Text.Text,{...v,...n,children:a||c}),j?jsxRuntime.jsx(Icon.Icon,{name:typeof j=='string'?j:void 0,icon:typeof j!='string'?j:void 0,...y,...o}):null]}):a||c})})),{displayName:"Anchor",sizes:constants.SIZES});exports.Anchor=Anchor,exports.COMPONENT_NAME="Anchor";
2
2
  //# sourceMappingURL=Anchor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Anchor.js","sources":["../../../../src/components/Anchor/Anchor.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { useTheme } from 'styled-components'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { useClassname } from 'hooks/useClassname'\nimport { Icon } from 'components/Icon'\nimport { Text } from 'components/Text'\nimport type { TextProps } from 'components/Text'\nimport type { IconProps } from 'components/Icon'\nimport { SIZES } from './constants'\nimport * as Styled from './style'\nimport type { AnchorProps } from './types'\n\nconst COMPONENT_NAME = 'Anchor'\n\n/**\n *\n * Component accepts all \\<a\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [AnchorProps](https://github.com/foxford/ui/blob/master/src/components/Anchor/types.ts)\n */\nconst Anchor: React.ForwardRefExoticComponent<AnchorProps> = withMergedProps<AnchorProps, HTMLAnchorElement>(\n forwardRef((props, ref) => {\n const {\n size = 'inherit',\n autoRel = true,\n textProps = {},\n iconProps = {},\n icon,\n children,\n content,\n ...restProps\n } = props\n\n const theme = useTheme()\n\n const className = useClassname(COMPONENT_NAME, restProps.className)\n const relBuilder = theme.utils?.relBuilder\n const href = restProps.href ?? restProps.to\n\n const rel =\n restProps.rel ??\n (autoRel && relBuilder && typeof href === 'string' ? relBuilder(href, restProps.target) : undefined)\n\n const [before, after] = Array.isArray(icon) ? icon : [icon]\n\n const baseTextProps: TextProps = {\n as: 'span',\n size: 'inherit',\n color: 'inherit',\n underline: restProps.underline,\n marginLeft: before ? '0.20em' : undefined,\n marginRight: after ? '0.20em' : undefined,\n }\n\n const iconBaseProps: IconProps = { as: 'span', color: 'inherit' }\n\n let rootNode\n if (restProps.to) rootNode = theme.link\n if (restProps.pseudo) rootNode = 'div'\n if (restProps.disabled) rootNode = 'span'\n if (restProps.as) rootNode = restProps.as\n\n return (\n <Styled.Root\n {...restProps}\n ref={ref}\n as={rootNode}\n className={className}\n size={size}\n rel={rel}\n data-disabled={restProps.disabled}\n >\n {typeof children === 'function' ? (\n children({ baseTextProps, textProps, iconBaseProps, iconProps, icon })\n ) : restProps.preset === 'brand' ? (\n <>\n {before && (\n <Icon\n name={typeof before === 'string' ? before : undefined}\n icon={typeof before !== 'string' ? before : undefined}\n {...iconBaseProps}\n {...iconProps}\n />\n )}\n <Text {...baseTextProps} {...textProps}>\n {children || content}\n </Text>\n {after && (\n <Icon\n name={typeof after === 'string' ? after : undefined}\n icon={typeof after !== 'string' ? after : undefined}\n {...iconBaseProps}\n {...iconProps}\n />\n )}\n </>\n ) : (\n <>{children || content}</>\n )}\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: SIZES,\n }\n)\n\nexport { Anchor, COMPONENT_NAME }\n"],"names":["Anchor","withMergedProps","forwardRef","props","ref","size","autoRel","textProps","iconProps","icon","children","content","restProps","theme","useTheme","className","useClassname","relBuilder","utils","href","to","rel","target","undefined","before","after","Array","isArray","baseTextProps","as","color","underline","marginLeft","marginRight","iconBaseProps","rootNode","link","pseudo","disabled","_jsx","Styled","preset","_jsxs","_Fragment","jsx","Icon","name","Text","displayName","sizes","SIZES"],"mappings":"iYAwBM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C5Cd,YAAae,GAAW,SAAWA,OAASD,KACxCW,KACA1B,IAGR+B,WAAAK,IAACG,UAAI,IAAKnB,KAAmBrB,EAASG,SACnCA,GAAYC,IAEdc,GACCc,WAAAK,IAACC,UAAI,CACHC,YAAarB,GAAU,SAAWA,OAAQF,EAC1Cd,YAAagB,GAAU,SAAWA,OAAQF,KACtCW,KACA1B,OAKV+B,WAAAK,IAAAD,oBAAA,CAAAjC,SAAGA,GAAYC,KAEL,IAGlB,CACEqC,YA/FmB,SAgGnBC,MAAOC,UAAAA,qDAhGY"}
1
+ {"version":3,"file":"Anchor.js","sources":["../../../../src/components/Anchor/Anchor.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { useTheme } from 'styled-components'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport type { MergedProps } from 'hocs/withMergedProps'\nimport { useClassname } from 'hooks/useClassname'\nimport { Icon } from 'components/Icon'\nimport { Text } from 'components/Text'\nimport type { TextProps } from 'components/Text'\nimport type { IconProps } from 'components/Icon'\nimport { SIZES } from './constants'\nimport * as Styled from './style'\nimport type { AnchorProps } from './types'\n\nconst COMPONENT_NAME = 'Anchor'\n\n/**\n *\n * Component accepts all \\<a\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [AnchorProps](https://github.com/foxford/ui/blob/master/src/components/Anchor/types.ts)\n */\nconst Anchor: React.ForwardRefExoticComponent<AnchorProps> = withMergedProps<AnchorProps, HTMLAnchorElement>(\n forwardRef<HTMLAnchorElement, MergedProps<AnchorProps>>((props, ref) => {\n const {\n size = 'inherit',\n autoRel = true,\n textProps = {},\n iconProps = {},\n icon,\n children,\n content,\n ...restProps\n } = props\n\n const theme = useTheme()\n\n const className = useClassname(COMPONENT_NAME, restProps.className)\n const relBuilder = theme.utils?.relBuilder\n const href = restProps.href ?? restProps.to\n\n const rel =\n restProps.rel ??\n (autoRel && relBuilder && typeof href === 'string' ? relBuilder(href, restProps.target) : undefined)\n\n const [before, after] = Array.isArray(icon) ? icon : [icon]\n\n const baseTextProps: TextProps = {\n as: 'span',\n size: 'inherit',\n color: 'inherit',\n underline: restProps.underline,\n marginLeft: before ? '0.20em' : undefined,\n marginRight: after ? '0.20em' : undefined,\n }\n\n const iconBaseProps: IconProps = { as: 'span', color: 'inherit' }\n\n let rootNode\n if (restProps.to) rootNode = theme.link\n if (restProps.pseudo) rootNode = 'div'\n if (restProps.disabled) rootNode = 'span'\n if (restProps.as) rootNode = restProps.as\n\n return (\n <Styled.Root\n {...restProps}\n ref={ref}\n as={rootNode}\n className={className}\n size={size}\n rel={rel}\n data-disabled={restProps.disabled}\n >\n {typeof children === 'function' ? (\n children({ baseTextProps, textProps, iconBaseProps, iconProps, icon })\n ) : restProps.preset === 'brand' ? (\n <>\n {before ? (\n <Icon\n name={typeof before === 'string' ? before : undefined}\n icon={typeof before !== 'string' ? before : undefined}\n {...iconBaseProps}\n {...iconProps}\n />\n ) : null}\n <Text {...baseTextProps} {...textProps}>\n {children || content}\n </Text>\n {after ? (\n <Icon\n name={typeof after === 'string' ? after : undefined}\n icon={typeof after !== 'string' ? after : undefined}\n {...iconBaseProps}\n {...iconProps}\n />\n ) : null}\n </>\n ) : (\n children || content\n )}\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: SIZES,\n }\n)\n\nexport { Anchor, COMPONENT_NAME }\n"],"names":["Anchor","withMergedProps","forwardRef","props","ref","size","autoRel","textProps","iconProps","icon","children","content","restProps","theme","useTheme","className","useClassname","relBuilder","utils","href","to","rel","target","undefined","before","after","Array","isArray","baseTextProps","as","color","underline","marginLeft","marginRight","iconBaseProps","rootNode","link","pseudo","disabled","_jsx","Styled","preset","_jsxs","_Fragment","jsx","Icon","name","Text","displayName","sizes","SIZES"],"mappings":"iYAyBMA,MAAAA,OAAuDC,gBAAAA,gBAC3DC,MAAAA,YAAwD,CAACC,EAAOC,KAC9D,MAAMC,KACJA,EAAO,UAASC,QAChBA,G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ASG,SACnCA,GAAYC,IAEdc,EACCc,WAAAK,IAACC,UAAI,CACHC,YAAarB,GAAU,SAAWA,OAAQF,EAC1Cd,YAAagB,GAAU,SAAWA,OAAQF,KACtCW,KACA1B,IAEJ,QAGNE,GAAYC,GAEF,IAGlB,CACEqC,YA/FmB,SAgGnBC,MAAOC,UAAAA,qDAhGY"}
@@ -1,2 +1,2 @@
1
- import{forwardRef}from'react';import{useTheme}from'styled-components';import{withMergedProps}from'../../hocs/withMergedProps.mjs';import{useClassname}from'../../hooks/useClassname.mjs';import{SIZES}from'./constants.mjs';import{Root}from'./style.mjs';import{jsx,jsxs,Fragment}from'react/jsx-runtime';import{Icon}from'../Icon/Icon.mjs';import{Text}from'../Text/Text.mjs';const COMPONENT_NAME='Anchor';const Anchor=withMergedProps(forwardRef(((o,e)=>{const{size:s="inherit",autoRel:r=!0,textProps:t={},iconProps:n={},icon:i,children:a,content:c,...m}=o;const d=useTheme();const p=useClassname("Anchor",m.className);const l=d.utils?.relBuilder;const f=m.href??m.to;const h=m.rel??(r&&l&&typeof f=='string'?l(f,m.target):void 0);const[x,g]=Array.isArray(i)?i:[i];const j={as:'span',size:'inherit',color:'inherit',underline:m.underline,marginLeft:x?'0.20em':void 0,marginRight:g?'0.20em':void 0};const u={as:'span',color:'inherit'};let y;return m.to&&(y=d.link),m.pseudo&&(y='div'),m.disabled&&(y='span'),m.as&&(y=m.as),jsx(Root,{...m,ref:e,as:y,className:p,size:s,rel:h,"data-disabled":m.disabled,children:typeof a=='function'?a({baseTextProps:j,textProps:t,iconBaseProps:u,iconProps:n,icon:i}):m.preset==='brand'?jsxs(Fragment,{children:[x&&jsx(Icon,{name:typeof x=='string'?x:void 0,icon:typeof x!='string'?x:void 0,...u,...n}),jsx(Text,{...j,...t,children:a||c}),g&&jsx(Icon,{name:typeof g=='string'?g:void 0,icon:typeof g!='string'?g:void 0,...u,...n})]}):jsx(Fragment,{children:a||c})})})),{displayName:"Anchor",sizes:SIZES});export{Anchor,COMPONENT_NAME};
1
+ import{forwardRef}from'react';import{useTheme}from'styled-components';import{withMergedProps}from'../../hocs/withMergedProps.mjs';import{useClassname}from'../../hooks/useClassname.mjs';import{SIZES}from'./constants.mjs';import{Root}from'./style.mjs';import{jsx,jsxs,Fragment}from'react/jsx-runtime';import{Icon}from'../Icon/Icon.mjs';import{Text}from'../Text/Text.mjs';const COMPONENT_NAME='Anchor';const Anchor=withMergedProps(forwardRef(((o,s)=>{const{size:e="inherit",autoRel:r=!0,textProps:t={},iconProps:n={},icon:i,children:a,content:c,...m}=o;const p=useTheme();const d=useClassname("Anchor",m.className);const l=p.utils?.relBuilder;const f=m.href??m.to;const h=m.rel??(r&&l&&typeof f=='string'?l(f,m.target):void 0);const[u,x]=Array.isArray(i)?i:[i];const g={as:'span',size:'inherit',color:'inherit',underline:m.underline,marginLeft:u?'0.20em':void 0,marginRight:x?'0.20em':void 0};const j={as:'span',color:'inherit'};let y;return m.to&&(y=p.link),m.pseudo&&(y='div'),m.disabled&&(y='span'),m.as&&(y=m.as),jsx(Root,{...m,ref:s,as:y,className:d,size:e,rel:h,"data-disabled":m.disabled,children:typeof a=='function'?a({baseTextProps:g,textProps:t,iconBaseProps:j,iconProps:n,icon:i}):m.preset==='brand'?jsxs(Fragment,{children:[u?jsx(Icon,{name:typeof u=='string'?u:void 0,icon:typeof u!='string'?u:void 0,...j,...n}):null,jsx(Text,{...g,...t,children:a||c}),x?jsx(Icon,{name:typeof x=='string'?x:void 0,icon:typeof x!='string'?x:void 0,...j,...n}):null]}):a||c})})),{displayName:"Anchor",sizes:SIZES});export{Anchor,COMPONENT_NAME};
2
2
  //# sourceMappingURL=Anchor.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Anchor.mjs","sources":["../../../../src/components/Anchor/Anchor.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { useTheme } from 'styled-components'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { useClassname } from 'hooks/useClassname'\nimport { Icon } from 'components/Icon'\nimport { Text } from 'components/Text'\nimport type { TextProps } from 'components/Text'\nimport type { IconProps } from 'components/Icon'\nimport { SIZES } from './constants'\nimport * as Styled from './style'\nimport type { AnchorProps } from './types'\n\nconst COMPONENT_NAME = 'Anchor'\n\n/**\n *\n * Component accepts all \\<a\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [AnchorProps](https://github.com/foxford/ui/blob/master/src/components/Anchor/types.ts)\n */\nconst Anchor: React.ForwardRefExoticComponent<AnchorProps> = withMergedProps<AnchorProps, HTMLAnchorElement>(\n forwardRef((props, ref) => {\n const {\n size = 'inherit',\n autoRel = true,\n textProps = {},\n iconProps = {},\n icon,\n children,\n content,\n ...restProps\n } = props\n\n const theme = useTheme()\n\n const className = useClassname(COMPONENT_NAME, restProps.className)\n const relBuilder = theme.utils?.relBuilder\n const href = restProps.href ?? restProps.to\n\n const rel =\n restProps.rel ??\n (autoRel && relBuilder && typeof href === 'string' ? relBuilder(href, restProps.target) : undefined)\n\n const [before, after] = Array.isArray(icon) ? icon : [icon]\n\n const baseTextProps: TextProps = {\n as: 'span',\n size: 'inherit',\n color: 'inherit',\n underline: restProps.underline,\n marginLeft: before ? '0.20em' : undefined,\n marginRight: after ? '0.20em' : undefined,\n }\n\n const iconBaseProps: IconProps = { as: 'span', color: 'inherit' }\n\n let rootNode\n if (restProps.to) rootNode = theme.link\n if (restProps.pseudo) rootNode = 'div'\n if (restProps.disabled) rootNode = 'span'\n if (restProps.as) rootNode = restProps.as\n\n return (\n <Styled.Root\n {...restProps}\n ref={ref}\n as={rootNode}\n className={className}\n size={size}\n rel={rel}\n data-disabled={restProps.disabled}\n >\n {typeof children === 'function' ? (\n children({ baseTextProps, textProps, iconBaseProps, iconProps, icon })\n ) : restProps.preset === 'brand' ? (\n <>\n {before && (\n <Icon\n name={typeof before === 'string' ? before : undefined}\n icon={typeof before !== 'string' ? before : undefined}\n {...iconBaseProps}\n {...iconProps}\n />\n )}\n <Text {...baseTextProps} {...textProps}>\n {children || content}\n </Text>\n {after && (\n <Icon\n name={typeof after === 'string' ? after : undefined}\n icon={typeof after !== 'string' ? after : undefined}\n {...iconBaseProps}\n {...iconProps}\n />\n )}\n </>\n ) : (\n <>{children || content}</>\n )}\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: SIZES,\n }\n)\n\nexport { Anchor, COMPONENT_NAME }\n"],"names":["COMPONENT_NAME","Anchor","withMergedProps","forwardRef","props","ref","size","autoRel","textProps","iconProps","icon","children","content","restProps","theme","useTheme","className","useClassname","relBuilder","utils","href","to","rel","target","undefined","before","after","Array","isArray","baseTextProps","as","color","underline","marginLeft","marginRight","iconBaseProps","rootNode","link","pseudo","disabled","_jsx","Styled","preset","_jsxs","_Fragment","Icon","name","Text","displayName","sizes","SIZES"],"mappings":"iXAYMA,MAAAA,eAAiB,SAYjBC,MAAAA,OAAuDC,gBAC3DC,YAAW,CAACC,EAAOC,KACjB,MAAMC,KACJA,EAAO,UAASC,QAChBA,GAAU,EAAIC,UACdA,EAAY,CAAE,EAAAC,UACdA,EAAY,CAAE,EAAAC,KACdA,EAAIC,SACJA,EAAQC,QACRA,KACGC,GACDT,EAEJ,MAAMU,EAAQC,WAEd,MAAMC,EAAYC,aA3BC,SA2B4BJ,EAAUG,WACzD,MAAME,EAAaJ,EAAMK,OAAOD,WAChC,MAAME,EAAOP,EAAUO,MAAQP,EAAUQ,GAEzC,MAAMC,EACJT,EAAUS,MACTf,GAAWW,UAAqBE,GAAS,SAAWF,EAAWE,EAAMP,EAAUU,aAAUC,GAE5F,MAAOC,EAAQC,GAASC,MAAMC,QAAQlB,GAAQA,EAAO,CAACA,GAEtD,MAAMmB,EAA2B,CAC/BC,GAAI,OACJxB,KAAM,UACNyB,MAAO,UACPC,UAAWnB,EAAUmB,UACrBC,WAAYR,EAAS,cAAWD,EAChCU,YAAaR,EAAQ,cAAWF,GAGlC,MAAMW,EAA2B,CAAEL,GAAI,OAAQC,MAAO,WAEtD,IAAIK,EAMJ,OALIvB,EAAUQ,KAAIe,EAAWtB,EAAMuB,MAC/BxB,EAAUyB,SAAQF,EAAW,OAC7BvB,EAAU0B,WAAUH,EAAW,QAC/BvB,EAAUiB,KAAIM,EAAWvB,EAAUiB,IAGrCU,IAACC,KAAW,IACN5B,EACJR,IAAKA,EACLyB,GAAIM,EACJpB,UAAWA,EACXV,KAAMA,EACNgB,IAAKA,EACL,gBAAeT,EAAU0B,SAAS5B,gBAE1BA,GAAa,WACnBA,EAAS,CAAEkB,gBAAerB,YAAW2B,gBAAe1B,YAAWC,SAC7DG,EAAU6B,SAAW,QACvBC,KAAAC,SAAA,CAAAjC,SACGc,CAAAA,GACCe,IAACK,KAAI,CACHC,YAAarB,GAAW,SAAWA,OAASD,EAC5Cd,YAAae,GAAW,SAAWA,OAASD,KACxCW,KACA1B,IAGR+B,IAACO,KAAI,IAAKlB,KAAmBrB,EAASG,SACnCA,GAAYC,IAEdc,GACCc,IAACK,KAAI,CACHC,YAAapB,GAAU,SAAWA,OAAQF,EAC1Cd,YAAagB,GAAU,SAAWA,OAAQF,KACtCW,KACA1B,OAKV+B,IAAAI,SAAA,CAAAjC,SAAGA,GAAYC,KAEL,IAGlB,CACEoC,YA/FmB,SAgGnBC,MAAOC"}
1
+ {"version":3,"file":"Anchor.mjs","sources":["../../../../src/components/Anchor/Anchor.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { useTheme } from 'styled-components'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport type { MergedProps } from 'hocs/withMergedProps'\nimport { useClassname } from 'hooks/useClassname'\nimport { Icon } from 'components/Icon'\nimport { Text } from 'components/Text'\nimport type { TextProps } from 'components/Text'\nimport type { IconProps } from 'components/Icon'\nimport { SIZES } from './constants'\nimport * as Styled from './style'\nimport type { AnchorProps } from './types'\n\nconst COMPONENT_NAME = 'Anchor'\n\n/**\n *\n * Component accepts all \\<a\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [AnchorProps](https://github.com/foxford/ui/blob/master/src/components/Anchor/types.ts)\n */\nconst Anchor: React.ForwardRefExoticComponent<AnchorProps> = withMergedProps<AnchorProps, HTMLAnchorElement>(\n forwardRef<HTMLAnchorElement, MergedProps<AnchorProps>>((props, ref) => {\n const {\n size = 'inherit',\n autoRel = true,\n textProps = {},\n iconProps = {},\n icon,\n children,\n content,\n ...restProps\n } = props\n\n const theme = useTheme()\n\n const className = useClassname(COMPONENT_NAME, restProps.className)\n const relBuilder = theme.utils?.relBuilder\n const href = restProps.href ?? restProps.to\n\n const rel =\n restProps.rel ??\n (autoRel && relBuilder && typeof href === 'string' ? relBuilder(href, restProps.target) : undefined)\n\n const [before, after] = Array.isArray(icon) ? icon : [icon]\n\n const baseTextProps: TextProps = {\n as: 'span',\n size: 'inherit',\n color: 'inherit',\n underline: restProps.underline,\n marginLeft: before ? '0.20em' : undefined,\n marginRight: after ? '0.20em' : undefined,\n }\n\n const iconBaseProps: IconProps = { as: 'span', color: 'inherit' }\n\n let rootNode\n if (restProps.to) rootNode = theme.link\n if (restProps.pseudo) rootNode = 'div'\n if (restProps.disabled) rootNode = 'span'\n if (restProps.as) rootNode = restProps.as\n\n return (\n <Styled.Root\n {...restProps}\n ref={ref}\n as={rootNode}\n className={className}\n size={size}\n rel={rel}\n data-disabled={restProps.disabled}\n >\n {typeof children === 'function' ? (\n children({ baseTextProps, textProps, iconBaseProps, iconProps, icon })\n ) : restProps.preset === 'brand' ? (\n <>\n {before ? (\n <Icon\n name={typeof before === 'string' ? before : undefined}\n icon={typeof before !== 'string' ? before : undefined}\n {...iconBaseProps}\n {...iconProps}\n />\n ) : null}\n <Text {...baseTextProps} {...textProps}>\n {children || content}\n </Text>\n {after ? (\n <Icon\n name={typeof after === 'string' ? after : undefined}\n icon={typeof after !== 'string' ? after : undefined}\n {...iconBaseProps}\n {...iconProps}\n />\n ) : null}\n </>\n ) : (\n children || content\n )}\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: SIZES,\n }\n)\n\nexport { Anchor, COMPONENT_NAME }\n"],"names":["COMPONENT_NAME","Anchor","withMergedProps","forwardRef","props","ref","size","autoRel","textProps","iconProps","icon","children","content","restProps","theme","useTheme","className","useClassname","relBuilder","utils","href","to","rel","target","undefined","before","after","Array","isArray","baseTextProps","as","color","underline","marginLeft","marginRight","iconBaseProps","rootNode","link","pseudo","disabled","_jsx","Styled","preset","_jsxs","_Fragment","Icon","name","Text","displayName","sizes","SIZES"],"mappings":"iXAaMA,MAAAA,eAAiB,SAYjBC,MAAAA,OAAuDC,gBAC3DC,YAAwD,CAACC,EAAOC,KAC9D,MAAMC,KACJA,EAAO,UAASC,QAChBA,GAAU,EAAIC,UACdA,EAAY,CAAE,EAAAC,UACdA,EAAY,CAAE,EAAAC,KACdA,EAAIC,SACJA,EAAQC,QACRA,KACGC,GACDT,EAEJ,MAAMU,EAAQC,WAEd,MAAMC,EAAYC,aA3BC,SA2B4BJ,EAAUG,WACzD,MAAME,EAAaJ,EAAMK,OAAOD,WAChC,MAAME,EAAOP,EAAUO,MAAQP,EAAUQ,GAEzC,MAAMC,EACJT,EAAUS,MACTf,GAAWW,UAAqBE,GAAS,SAAWF,EAAWE,EAAMP,EAAUU,aAAUC,GAE5F,MAAOC,EAAQC,GAASC,MAAMC,QAAQlB,GAAQA,EAAO,CAACA,GAEtD,MAAMmB,EAA2B,CAC/BC,GAAI,OACJxB,KAAM,UACNyB,MAAO,UACPC,UAAWnB,EAAUmB,UACrBC,WAAYR,EAAS,cAAWD,EAChCU,YAAaR,EAAQ,cAAWF,GAGlC,MAAMW,EAA2B,CAAEL,GAAI,OAAQC,MAAO,WAEtD,IAAIK,EAMJ,OALIvB,EAAUQ,KAAIe,EAAWtB,EAAMuB,MAC/BxB,EAAUyB,SAAQF,EAAW,OAC7BvB,EAAU0B,WAAUH,EAAW,QAC/BvB,EAAUiB,KAAIM,EAAWvB,EAAUiB,IAGrCU,IAACC,KAAW,IACN5B,EACJR,IAAKA,EACLyB,GAAIM,EACJpB,UAAWA,EACXV,KAAMA,EACNgB,IAAKA,EACL,gBAAeT,EAAU0B,SAAS5B,gBAE1BA,GAAa,WACnBA,EAAS,CAAEkB,gBAAerB,YAAW2B,gBAAe1B,YAAWC,SAC7DG,EAAU6B,SAAW,QACvBC,KAAAC,SAAA,CAAAjC,SACGc,CAAAA,EACCe,IAACK,KAAI,CACHC,YAAarB,GAAW,SAAWA,OAASD,EAC5Cd,YAAae,GAAW,SAAWA,OAASD,KACxCW,KACA1B,IAEJ,KACJ+B,IAACO,KAAI,IAAKlB,KAAmBrB,EAASG,SACnCA,GAAYC,IAEdc,EACCc,IAACK,KAAI,CACHC,YAAapB,GAAU,SAAWA,OAAQF,EAC1Cd,YAAagB,GAAU,SAAWA,OAAQF,KACtCW,KACA1B,IAEJ,QAGNE,GAAYC,GAEF,IAGlB,CACEoC,YA/FmB,SAgGnBC,MAAOC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Arrow.js","sources":["../../../../src/components/Arrow/Arrow.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Icon } from 'components/Icon'\nimport type { IconProps } from 'components/Icon'\nimport { SIZES } from './constants'\nimport { SIZES_DEFAULT } from './default-constants'\nimport type { ArrowProps } from './types'\n\nimport * as Styled from './style'\n\nconst COMPONENT_NAME = 'Arrow'\n\n/**\n *\n * Component accepts all \\<button\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [ArrowProps](https://github.com/foxford/ui/blob/master/src/components/Arrow/types.ts)\n */\nconst Arrow: React.ForwardRefExoticComponent<ArrowProps> = withMergedProps<ArrowProps, HTMLButtonElement>(\n forwardRef((props, ref) => {\n const { type = 'button', size = 'l', top = true, iconProps = {}, ...restProps } = props\n\n const iconBaseProps: IconProps = { as: 'span', color: 'inherit' }\n\n return (\n <Styled.Root {...restProps} type={type} size={size} top={top} ref={ref}>\n <Icon name={restProps.preset === 'brand' ? 'arrowUp' : 'chevronUp'} {...iconBaseProps} {...iconProps} />\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: (props) => (props.preset === 'brand' ? SIZES : SIZES_DEFAULT),\n }\n)\n\nexport { Arrow, COMPONENT_NAME }\n\nexport type { ArrowProps }\n"],"names":["Arrow","withMergedProps","forwardRef","props","ref","type","size","top","iconProps","restProps","_jsx","Styled","children","jsx","Icon","name","preset","as","color","displayName","sizes","SIZES","SIZES_DEFAULT"],"mappings":"oTAsBMA,MAAAA,MAAqDC,gBAAAA,gBACzDC,MAAAA,YAAW,CAACC,EAAOC,KACjB,MAAMC,KAAEA,EAAO,SAAQC,KAAEA,EAAO,IAAGC,IAAEA,GAAM,EAAIC,UAAEA,EAAY,CAAE,KAAKC,GAAcN,EAIlF,OACEO,WAAAA,IAACC,MAAAA,KAAW,IAAKF,EAAWJ,KAAMA,EAAMC,KAAMA,EAAMC,IAAKA,EAAKH,IAAKA,EAAIQ,SACrEF,WAAAG,IAACC,UAAI,CAACC,KAAMN,EAAUO,SAAW,QAAU,UAAY,YAJxBC,GAAI,OAAQC,MAAO,aAIyCV,KAC/E,IAGlB,CACEW,YAzBmB,QA0BnBC,MAAQjB,GAAWA,EAAMa,SAAW,QAAUK,UAAKA,MAAGC,iBAAAA,2DA1BnC"}
1
+ {"version":3,"file":"Arrow.js","sources":["../../../../src/components/Arrow/Arrow.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport type { MergedProps } from 'hocs/withMergedProps'\nimport { Icon } from 'components/Icon'\nimport type { IconProps } from 'components/Icon'\nimport { SIZES } from './constants'\nimport { SIZES_DEFAULT } from './default-constants'\nimport type { ArrowProps } from './types'\n\nimport * as Styled from './style'\n\nconst COMPONENT_NAME = 'Arrow'\n\n/**\n *\n * Component accepts all \\<button\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [ArrowProps](https://github.com/foxford/ui/blob/master/src/components/Arrow/types.ts)\n */\nconst Arrow: React.ForwardRefExoticComponent<ArrowProps> = withMergedProps<ArrowProps, HTMLButtonElement>(\n forwardRef<HTMLButtonElement, MergedProps<ArrowProps>>((props, ref) => {\n const { type = 'button', size = 'l', top = true, iconProps = {}, ...restProps } = props\n\n const iconBaseProps: IconProps = { as: 'span', color: 'inherit' }\n\n return (\n <Styled.Root {...restProps} type={type} size={size} top={top} ref={ref}>\n <Icon name={restProps.preset === 'brand' ? 'arrowUp' : 'chevronUp'} {...iconBaseProps} {...iconProps} />\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: (props) => (props.preset === 'brand' ? SIZES : SIZES_DEFAULT),\n }\n)\n\nexport { Arrow, COMPONENT_NAME }\n\nexport type { ArrowProps }\n"],"names":["Arrow","withMergedProps","forwardRef","props","ref","type","size","top","iconProps","restProps","_jsx","Styled","children","jsx","Icon","name","preset","as","color","displayName","sizes","SIZES","SIZES_DEFAULT"],"mappings":"oTAuBMA,MAAAA,MAAqDC,gBAAAA,gBACzDC,MAAAA,YAAuD,CAACC,EAAOC,KAC7D,MAAMC,KAAEA,EAAO,SAAQC,KAAEA,EAAO,IAAGC,IAAEA,GAAM,EAAIC,UAAEA,EAAY,CAAE,KAAKC,GAAcN,EAIlF,OACEO,WAAAA,IAACC,MAAAA,KAAW,IAAKF,EAAWJ,KAAMA,EAAMC,KAAMA,EAAMC,IAAKA,EAAKH,IAAKA,EAAIQ,SACrEF,WAAAG,IAACC,UAAI,CAACC,KAAMN,EAAUO,SAAW,QAAU,UAAY,YAJxBC,GAAI,OAAQC,MAAO,aAIyCV,KAC/E,IAGlB,CACEW,YAzBmB,QA0BnBC,MAAQjB,GAAWA,EAAMa,SAAW,QAAUK,UAAKA,MAAGC,iBAAAA,2DA1BnC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Arrow.mjs","sources":["../../../../src/components/Arrow/Arrow.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Icon } from 'components/Icon'\nimport type { IconProps } from 'components/Icon'\nimport { SIZES } from './constants'\nimport { SIZES_DEFAULT } from './default-constants'\nimport type { ArrowProps } from './types'\n\nimport * as Styled from './style'\n\nconst COMPONENT_NAME = 'Arrow'\n\n/**\n *\n * Component accepts all \\<button\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [ArrowProps](https://github.com/foxford/ui/blob/master/src/components/Arrow/types.ts)\n */\nconst Arrow: React.ForwardRefExoticComponent<ArrowProps> = withMergedProps<ArrowProps, HTMLButtonElement>(\n forwardRef((props, ref) => {\n const { type = 'button', size = 'l', top = true, iconProps = {}, ...restProps } = props\n\n const iconBaseProps: IconProps = { as: 'span', color: 'inherit' }\n\n return (\n <Styled.Root {...restProps} type={type} size={size} top={top} ref={ref}>\n <Icon name={restProps.preset === 'brand' ? 'arrowUp' : 'chevronUp'} {...iconBaseProps} {...iconProps} />\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: (props) => (props.preset === 'brand' ? SIZES : SIZES_DEFAULT),\n }\n)\n\nexport { Arrow, COMPONENT_NAME }\n\nexport type { ArrowProps }\n"],"names":["COMPONENT_NAME","Arrow","withMergedProps","forwardRef","props","ref","type","size","top","iconProps","restProps","_jsx","Styled","children","Icon","name","preset","as","color","displayName","sizes","SIZES","SIZES_DEFAULT"],"mappings":"oRAUMA,MAAAA,eAAiB,QAYjBC,MAAAA,MAAqDC,gBACzDC,YAAW,CAACC,EAAOC,KACjB,MAAMC,KAAEA,EAAO,SAAQC,KAAEA,EAAO,IAAGC,IAAEA,GAAM,EAAIC,UAAEA,EAAY,CAAE,KAAKC,GAAcN,EAIlF,OACEO,IAACC,KAAW,IAAKF,EAAWJ,KAAMA,EAAMC,KAAMA,EAAMC,IAAKA,EAAKH,IAAKA,EAAIQ,SACrEF,IAACG,KAAI,CAACC,KAAML,EAAUM,SAAW,QAAU,UAAY,YAJxBC,GAAI,OAAQC,MAAO,aAIyCT,KAC/E,IAGlB,CACEU,YAzBmB,QA0BnBC,MAAQhB,GAAWA,EAAMY,SAAW,QAAUK,MAAQC"}
1
+ {"version":3,"file":"Arrow.mjs","sources":["../../../../src/components/Arrow/Arrow.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport type { MergedProps } from 'hocs/withMergedProps'\nimport { Icon } from 'components/Icon'\nimport type { IconProps } from 'components/Icon'\nimport { SIZES } from './constants'\nimport { SIZES_DEFAULT } from './default-constants'\nimport type { ArrowProps } from './types'\n\nimport * as Styled from './style'\n\nconst COMPONENT_NAME = 'Arrow'\n\n/**\n *\n * Component accepts all \\<button\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [ArrowProps](https://github.com/foxford/ui/blob/master/src/components/Arrow/types.ts)\n */\nconst Arrow: React.ForwardRefExoticComponent<ArrowProps> = withMergedProps<ArrowProps, HTMLButtonElement>(\n forwardRef<HTMLButtonElement, MergedProps<ArrowProps>>((props, ref) => {\n const { type = 'button', size = 'l', top = true, iconProps = {}, ...restProps } = props\n\n const iconBaseProps: IconProps = { as: 'span', color: 'inherit' }\n\n return (\n <Styled.Root {...restProps} type={type} size={size} top={top} ref={ref}>\n <Icon name={restProps.preset === 'brand' ? 'arrowUp' : 'chevronUp'} {...iconBaseProps} {...iconProps} />\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: (props) => (props.preset === 'brand' ? SIZES : SIZES_DEFAULT),\n }\n)\n\nexport { Arrow, COMPONENT_NAME }\n\nexport type { ArrowProps }\n"],"names":["COMPONENT_NAME","Arrow","withMergedProps","forwardRef","props","ref","type","size","top","iconProps","restProps","_jsx","Styled","children","Icon","name","preset","as","color","displayName","sizes","SIZES","SIZES_DEFAULT"],"mappings":"oRAWMA,MAAAA,eAAiB,QAYjBC,MAAAA,MAAqDC,gBACzDC,YAAuD,CAACC,EAAOC,KAC7D,MAAMC,KAAEA,EAAO,SAAQC,KAAEA,EAAO,IAAGC,IAAEA,GAAM,EAAIC,UAAEA,EAAY,CAAE,KAAKC,GAAcN,EAIlF,OACEO,IAACC,KAAW,IAAKF,EAAWJ,KAAMA,EAAMC,KAAMA,EAAMC,IAAKA,EAAKH,IAAKA,EAAIQ,SACrEF,IAACG,KAAI,CAACC,KAAML,EAAUM,SAAW,QAAU,UAAY,YAJxBC,GAAI,OAAQC,MAAO,aAIyCT,KAC/E,IAGlB,CACEU,YAzBmB,QA0BnBC,MAAQhB,GAAWA,EAAMY,SAAW,QAAUK,MAAQC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ArrowBadge.js","sources":["../../../../src/components/ArrowBadge/ArrowBadge.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Text } from 'components/Text'\nimport type { TextProps } from 'components/Text'\nimport * as Styled from './style'\nimport type { ArrowBadgeProps } from './types'\nimport { SIZES } from './constants'\n\nconst COMPONENT_NAME = 'ArrowBadge'\n\n/**\n *\n * Component accepts all \\<div\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [ArrowBadgeProps](https://github.com/foxford/ui/blob/master/src/components/ArrowBadge/types.ts)\n */\nconst ArrowBadge: React.ForwardRefExoticComponent<ArrowBadgeProps> = withMergedProps<ArrowBadgeProps, HTMLDivElement>(\n forwardRef((props, ref) => {\n const { size = 'm', textProps = {}, children, left, right, fancy, ...restProps } = props\n\n const baseTextProps: TextProps = { as: 'div', size: 'inherit', color: 'inherit' }\n\n return (\n <Styled.Root {...restProps} size={size} left={left} right={right} fancy={fancy} ref={ref}>\n <Styled.Edge left={left} fancy={fancy} />\n <Styled.Content>\n {typeof children === 'function' ? (\n children({ baseTextProps, textProps })\n ) : (\n <Text {...baseTextProps} {...textProps}>\n {children}\n </Text>\n )}\n </Styled.Content>\n <Styled.Edge right={right} fancy={fancy} after />\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: SIZES,\n }\n)\n\nexport { ArrowBadge, COMPONENT_NAME }\n"],"names":["ArrowBadge","withMergedProps","forwardRef","props","ref","size","textProps","children","left","right","fancy","restProps","baseTextProps","as","color","_jsxs","Styled","_jsx","jsx","Text","after","displayName","sizes","SIZES"],"mappings":"6PAoBMA,MAAAA,WAA+DC,gBAAAA,gBACnEC,MAAAA,YAAW,CAACC,EAAOC,KACjB,MAAMC,KAAEA,EAAO,IAAGC,UAAEA,EAAY,CAAE,EAAAC,SAAEA,EAAQC,KAAEA,EAAIC,MAAEA,EAAKC,MAAEA,KAAUC,GAAcR,EAEnF,MAAMS,EAA2B,CAAEC,GAAI,MAAOR,KAAM,UAAWS,MAAO,WAEtE,OACEC,WAAAA,KAACC,MAAAA,KAAW,IAAKL,EAAWN,KAAMA,EAAMG,KAAMA,EAAMC,MAAOA,EAAOC,MAAOA,EAAON,IAAKA,EAAIG,SACvFU,CAAAA,WAAAC,IAACF,WAAW,CAACR,KAAMA,EAAME,MAAOA,IAChCO,WAAAC,IAACF,cAAc,CAAAT,gBACLA,GAAa,WACnBA,EAAS,CAAEK,gBAAeN,cAE1BW,WAAAC,IAACC,UAAI,IAAKP,KAAmBN,EAASC,SACnCA,MAIPU,WAAAC,IAACF,WAAW,CAACP,MAAOA,EAAOC,MAAOA,EAAOU,OAAK,MAClC,IAGlB,CACEC,YAnCmB,aAoCnBC,MAAOC,UAAAA,6DApCY"}
1
+ {"version":3,"file":"ArrowBadge.js","sources":["../../../../src/components/ArrowBadge/ArrowBadge.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport type { MergedProps } from 'hocs/withMergedProps'\nimport { Text } from 'components/Text'\nimport type { TextProps } from 'components/Text'\nimport * as Styled from './style'\nimport type { ArrowBadgeProps } from './types'\nimport { SIZES } from './constants'\n\nconst COMPONENT_NAME = 'ArrowBadge'\n\n/**\n *\n * Component accepts all \\<div\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [ArrowBadgeProps](https://github.com/foxford/ui/blob/master/src/components/ArrowBadge/types.ts)\n */\nconst ArrowBadge: React.ForwardRefExoticComponent<ArrowBadgeProps> = withMergedProps<ArrowBadgeProps, HTMLDivElement>(\n forwardRef<HTMLDivElement, MergedProps<ArrowBadgeProps>>((props, ref) => {\n const { size = 'm', textProps = {}, children, left, right, fancy, ...restProps } = props\n\n const baseTextProps: TextProps = { as: 'div', size: 'inherit', color: 'inherit' }\n\n return (\n <Styled.Root {...restProps} size={size} left={left} right={right} fancy={fancy} ref={ref}>\n <Styled.Edge left={left} fancy={fancy} />\n <Styled.Content>\n {typeof children === 'function' ? (\n children({ baseTextProps, textProps })\n ) : (\n <Text {...baseTextProps} {...textProps}>\n {children}\n </Text>\n )}\n </Styled.Content>\n <Styled.Edge right={right} fancy={fancy} after />\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: SIZES,\n }\n)\n\nexport { ArrowBadge, COMPONENT_NAME }\n"],"names":["ArrowBadge","withMergedProps","forwardRef","props","ref","size","textProps","children","left","right","fancy","restProps","baseTextProps","as","color","_jsxs","Styled","_jsx","jsx","Text","after","displayName","sizes","SIZES"],"mappings":"6PAqBMA,MAAAA,WAA+DC,gBAAAA,gBACnEC,MAAAA,YAAyD,CAACC,EAAOC,KAC/D,MAAMC,KAAEA,EAAO,IAAGC,UAAEA,EAAY,CAAE,EAAAC,SAAEA,EAAQC,KAAEA,EAAIC,MAAEA,EAAKC,MAAEA,KAAUC,GAAcR,EAEnF,MAAMS,EAA2B,CAAEC,GAAI,MAAOR,KAAM,UAAWS,MAAO,WAEtE,OACEC,WAAAA,KAACC,MAAAA,KAAW,IAAKL,EAAWN,KAAMA,EAAMG,KAAMA,EAAMC,MAAOA,EAAOC,MAAOA,EAAON,IAAKA,EAAIG,SACvFU,CAAAA,WAAAC,IAACF,WAAW,CAACR,KAAMA,EAAME,MAAOA,IAChCO,WAAAC,IAACF,cAAc,CAAAT,gBACLA,GAAa,WACnBA,EAAS,CAAEK,gBAAeN,cAE1BW,WAAAC,IAACC,UAAI,IAAKP,KAAmBN,EAASC,SACnCA,MAIPU,WAAAC,IAACF,WAAW,CAACP,MAAOA,EAAOC,MAAOA,EAAOU,OAAK,MAClC,IAGlB,CACEC,YAnCmB,aAoCnBC,MAAOC,UAAAA,6DApCY"}
@@ -1 +1 @@
1
- {"version":3,"file":"ArrowBadge.mjs","sources":["../../../../src/components/ArrowBadge/ArrowBadge.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Text } from 'components/Text'\nimport type { TextProps } from 'components/Text'\nimport * as Styled from './style'\nimport type { ArrowBadgeProps } from './types'\nimport { SIZES } from './constants'\n\nconst COMPONENT_NAME = 'ArrowBadge'\n\n/**\n *\n * Component accepts all \\<div\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [ArrowBadgeProps](https://github.com/foxford/ui/blob/master/src/components/ArrowBadge/types.ts)\n */\nconst ArrowBadge: React.ForwardRefExoticComponent<ArrowBadgeProps> = withMergedProps<ArrowBadgeProps, HTMLDivElement>(\n forwardRef((props, ref) => {\n const { size = 'm', textProps = {}, children, left, right, fancy, ...restProps } = props\n\n const baseTextProps: TextProps = { as: 'div', size: 'inherit', color: 'inherit' }\n\n return (\n <Styled.Root {...restProps} size={size} left={left} right={right} fancy={fancy} ref={ref}>\n <Styled.Edge left={left} fancy={fancy} />\n <Styled.Content>\n {typeof children === 'function' ? (\n children({ baseTextProps, textProps })\n ) : (\n <Text {...baseTextProps} {...textProps}>\n {children}\n </Text>\n )}\n </Styled.Content>\n <Styled.Edge right={right} fancy={fancy} after />\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: SIZES,\n }\n)\n\nexport { ArrowBadge, COMPONENT_NAME }\n"],"names":["COMPONENT_NAME","ArrowBadge","withMergedProps","forwardRef","props","ref","size","textProps","children","left","right","fancy","restProps","baseTextProps","as","color","_jsxs","Styled","_jsx","Text","after","displayName","sizes","SIZES"],"mappings":"mPAQMA,MAAAA,eAAiB,aAYjBC,MAAAA,WAA+DC,gBACnEC,YAAW,CAACC,EAAOC,KACjB,MAAMC,KAAEA,EAAO,IAAGC,UAAEA,EAAY,CAAE,EAAAC,SAAEA,EAAQC,KAAEA,EAAIC,MAAEA,EAAKC,MAAEA,KAAUC,GAAcR,EAEnF,MAAMS,EAA2B,CAAEC,GAAI,MAAOR,KAAM,UAAWS,MAAO,WAEtE,OACEC,KAACC,KAAW,IAAKL,EAAWN,KAAMA,EAAMG,KAAMA,EAAMC,MAAOA,EAAOC,MAAOA,EAAON,IAAKA,EAAIG,SACvFU,CAAAA,IAACD,KAAW,CAACR,KAAMA,EAAME,MAAOA,IAChCO,IAACD,QAAc,CAAAT,gBACLA,GAAa,WACnBA,EAAS,CAAEK,gBAAeN,cAE1BW,IAACC,KAAI,IAAKN,KAAmBN,EAASC,SACnCA,MAIPU,IAACD,KAAW,CAACP,MAAOA,EAAOC,MAAOA,EAAOS,OAAK,MAClC,IAGlB,CACEC,YAnCmB,aAoCnBC,MAAOC"}
1
+ {"version":3,"file":"ArrowBadge.mjs","sources":["../../../../src/components/ArrowBadge/ArrowBadge.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport type { MergedProps } from 'hocs/withMergedProps'\nimport { Text } from 'components/Text'\nimport type { TextProps } from 'components/Text'\nimport * as Styled from './style'\nimport type { ArrowBadgeProps } from './types'\nimport { SIZES } from './constants'\n\nconst COMPONENT_NAME = 'ArrowBadge'\n\n/**\n *\n * Component accepts all \\<div\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [ArrowBadgeProps](https://github.com/foxford/ui/blob/master/src/components/ArrowBadge/types.ts)\n */\nconst ArrowBadge: React.ForwardRefExoticComponent<ArrowBadgeProps> = withMergedProps<ArrowBadgeProps, HTMLDivElement>(\n forwardRef<HTMLDivElement, MergedProps<ArrowBadgeProps>>((props, ref) => {\n const { size = 'm', textProps = {}, children, left, right, fancy, ...restProps } = props\n\n const baseTextProps: TextProps = { as: 'div', size: 'inherit', color: 'inherit' }\n\n return (\n <Styled.Root {...restProps} size={size} left={left} right={right} fancy={fancy} ref={ref}>\n <Styled.Edge left={left} fancy={fancy} />\n <Styled.Content>\n {typeof children === 'function' ? (\n children({ baseTextProps, textProps })\n ) : (\n <Text {...baseTextProps} {...textProps}>\n {children}\n </Text>\n )}\n </Styled.Content>\n <Styled.Edge right={right} fancy={fancy} after />\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: SIZES,\n }\n)\n\nexport { ArrowBadge, COMPONENT_NAME }\n"],"names":["COMPONENT_NAME","ArrowBadge","withMergedProps","forwardRef","props","ref","size","textProps","children","left","right","fancy","restProps","baseTextProps","as","color","_jsxs","Styled","_jsx","Text","after","displayName","sizes","SIZES"],"mappings":"mPASMA,MAAAA,eAAiB,aAYjBC,MAAAA,WAA+DC,gBACnEC,YAAyD,CAACC,EAAOC,KAC/D,MAAMC,KAAEA,EAAO,IAAGC,UAAEA,EAAY,CAAE,EAAAC,SAAEA,EAAQC,KAAEA,EAAIC,MAAEA,EAAKC,MAAEA,KAAUC,GAAcR,EAEnF,MAAMS,EAA2B,CAAEC,GAAI,MAAOR,KAAM,UAAWS,MAAO,WAEtE,OACEC,KAACC,KAAW,IAAKL,EAAWN,KAAMA,EAAMG,KAAMA,EAAMC,MAAOA,EAAOC,MAAOA,EAAON,IAAKA,EAAIG,SACvFU,CAAAA,IAACD,KAAW,CAACR,KAAMA,EAAME,MAAOA,IAChCO,IAACD,QAAc,CAAAT,gBACLA,GAAa,WACnBA,EAAS,CAAEK,gBAAeN,cAE1BW,IAACC,KAAI,IAAKN,KAAmBN,EAASC,SACnCA,MAIPU,IAACD,KAAW,CAACP,MAAOA,EAAOC,MAAOA,EAAOS,OAAK,MAClC,IAGlB,CACEC,YAnCmB,aAoCnBC,MAAOC"}
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","sources":["../../../../src/components/AspectRatio/style.ts"],"sourcesContent":["import styled from 'styled-components'\nimport { getViewBoxFromAspectRatio } from './utils'\nimport type { AspectRatioProps, StyledPlaceholderProps } from './types'\n\nexport const Placeholder = styled.svg\n .withConfig<StyledPlaceholderProps>({\n shouldForwardProp: (propKey) => !['ratio'].includes(propKey),\n })\n .attrs<StyledPlaceholderProps>((props) => ({\n xmlns: 'http://www.w3.org/2000/svg',\n viewBox: getViewBoxFromAspectRatio(props.ratio),\n }))`\n box-sizing: border-box;\n display: block;\n`\n\nexport const Root = styled.div.withConfig<Omit<AspectRatioProps, 'ratio'>>({\n shouldForwardProp: (propKey) => !['width', 'height'].includes(propKey),\n})`\n box-sizing: border-box;\n position: relative;\n\n ${(props) => `\n width: ${\n typeof props.width === 'number'\n ? `${props.width}px`\n : typeof props.width === 'string'\n ? props.width\n : 'min-content'\n };\n height: ${\n typeof props.height === 'number'\n ? `${props.height}px`\n : typeof props.height === 'string'\n ? props.height\n : 'min-content'\n };\n\n & > ${Placeholder} {\n width: ${typeof props.width === 'number' || typeof props.width === 'string' ? '100%' : 'auto'};\n height: ${typeof props.height === 'number' || typeof props.height === 'string' ? '100%' : 'auto'}\n }\n `}\n\n & > :not(${Placeholder}) {\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n width: 100% !important;\n height: 100% !important;\n box-sizing: border-box !important;\n }\n`\n"],"names":["Placeholder","styled","svg","withConfig","shouldForwardProp","propKey","includes","attrs","props","xmlns","viewBox","getViewBoxFromAspectRatio","ratio","displayName","componentId","Root","div","width","height"],"mappings":"kMAIO,MAAMA,YAAcC,gBAAAA,QAAOC,IAC/BC,WAAmC,CAClCC,kBAAoBC,IAAa,CAAC,SAASC,SAASD,KAErDE,OAA+BC,IAAW,CACzCC,MAAO,6BACPC,QAASC,MAAAA,0BAA0BH,EAAMI,WACxCT,WAAA,CAAAU,YAAA,2BAAAC,YAAA,oBAPsBb,CAU1B,CAAA,yCAEM,MAAMc,KAAOd,gBAAAA,QAAOe,IAAIb,WAA4C,CACzEC,kBAAoBC,IAAa,CAAC,QAAS,UAAUC,SAASD,KAC9DF,WAAA,CAAAU,YAAA,oBAAAC,YAAA,oBAFkBb,CAElB,CAAA,2CAAA,aAAA,sJAIGO,GAAU,uBAEFA,EAAMS,OAAU,SACnB,GAAGT,EAAMS,iBACFT,EAAMS,OAAU,SACvBT,EAAMS,MACN,sCAGGT,EAAMU,QAAW,SACpB,GAAGV,EAAMU,kBACFV,EAAMU,QAAW,SACxBV,EAAMU,OACN,6BAGAlB,sCACYQ,EAAMS,OAAU,iBAAmBT,EAAMS,OAAU,SAAW,OAAS,iCACtET,EAAMU,QAAW,iBAAmBV,EAAMU,QAAW,SAAW,OAAS,qBAInFlB"}
1
+ {"version":3,"file":"style.js","sources":["../../../../src/components/AspectRatio/style.ts"],"sourcesContent":["import styled from 'styled-components'\nimport { getViewBoxFromAspectRatio } from './utils'\nimport type { AspectRatioProps, StyledPlaceholderProps } from './types'\n\nexport const Placeholder = styled.svg\n .withConfig<StyledPlaceholderProps>({\n shouldForwardProp: (propKey) => !['ratio'].includes(propKey),\n })\n .attrs<StyledPlaceholderProps>((props) => ({\n xmlns: 'http://www.w3.org/2000/svg',\n viewBox: getViewBoxFromAspectRatio(props.ratio),\n }))`\n box-sizing: border-box;\n display: block;\n`\n\nexport const Root = styled.div.withConfig<Omit<AspectRatioProps, 'ratio'>>({\n shouldForwardProp: (propKey) => !['width', 'height'].includes(propKey),\n})`\n box-sizing: border-box;\n position: relative;\n\n ${(props) => `\n width: ${\n typeof props.width === 'number'\n ? `${props.width}px`\n : typeof props.width === 'string'\n ? props.width\n : 'min-content'\n };\n height: ${\n typeof props.height === 'number'\n ? `${props.height}px`\n : typeof props.height === 'string'\n ? props.height\n : 'min-content'\n };\n\n & > ${Placeholder} {\n width: ${typeof props.width === 'number' || typeof props.width === 'string' ? '100%' : 'auto'};\n height: ${typeof props.height === 'number' || typeof props.height === 'string' ? '100%' : 'auto'}\n }\n `}\n\n & > :not(${Placeholder}) {\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n width: 100% !important;\n height: 100% !important;\n box-sizing: border-box !important;\n }\n`\n"],"names":["Placeholder","styled","svg","withConfig","shouldForwardProp","propKey","includes","attrs","props","xmlns","viewBox","getViewBoxFromAspectRatio","ratio","displayName","componentId","Root","div","width","height"],"mappings":"kMAIO,MAAMA,YAAcC,gBAAAA,QAAOC,IAC/BC,WAAmC,CAClCC,kBAAoBC,IAAa,CAAC,SAASC,SAASD,KAErDE,OAA+BC,IAAW,CACzCC,MAAO,6BACPC,QAASC,MAAAA,0BAA0BH,EAAMI,WACxCT,WAAA,CAAAU,YAAA,2BAAAC,YAAA,oBAPsBb,CAU1B,CAAA,yCAEM,MAAMc,KAAOd,gBAAAA,QAAOe,IAAIb,WAA4C,CACzEC,kBAAoBC,IAAa,CAAC,QAAS,UAAUC,SAASD,KAC9DF,WAAA,CAAAU,YAAA,oBAAAC,YAAA,oBAFkBb,CAElB,CAAA,2CAAA,aAAA,sJAIGO,GAAU,uBAEFA,EAAMS,OAAU,SACnB,GAAGT,EAAMS,iBACFT,EAAMS,OAAU,SACrBT,EAAMS,MACN,sCAGCT,EAAMU,QAAW,SACpB,GAAGV,EAAMU,kBACFV,EAAMU,QAAW,SACtBV,EAAMU,OACN,6BAGFlB,sCACYQ,EAAMS,OAAU,iBAAmBT,EAAMS,OAAU,SAAW,OAAS,iCACtET,EAAMU,QAAW,iBAAmBV,EAAMU,QAAW,SAAW,OAAS,qBAInFlB"}
@@ -1 +1 @@
1
- {"version":3,"file":"style.mjs","sources":["../../../../src/components/AspectRatio/style.ts"],"sourcesContent":["import styled from 'styled-components'\nimport { getViewBoxFromAspectRatio } from './utils'\nimport type { AspectRatioProps, StyledPlaceholderProps } from './types'\n\nexport const Placeholder = styled.svg\n .withConfig<StyledPlaceholderProps>({\n shouldForwardProp: (propKey) => !['ratio'].includes(propKey),\n })\n .attrs<StyledPlaceholderProps>((props) => ({\n xmlns: 'http://www.w3.org/2000/svg',\n viewBox: getViewBoxFromAspectRatio(props.ratio),\n }))`\n box-sizing: border-box;\n display: block;\n`\n\nexport const Root = styled.div.withConfig<Omit<AspectRatioProps, 'ratio'>>({\n shouldForwardProp: (propKey) => !['width', 'height'].includes(propKey),\n})`\n box-sizing: border-box;\n position: relative;\n\n ${(props) => `\n width: ${\n typeof props.width === 'number'\n ? `${props.width}px`\n : typeof props.width === 'string'\n ? props.width\n : 'min-content'\n };\n height: ${\n typeof props.height === 'number'\n ? `${props.height}px`\n : typeof props.height === 'string'\n ? props.height\n : 'min-content'\n };\n\n & > ${Placeholder} {\n width: ${typeof props.width === 'number' || typeof props.width === 'string' ? '100%' : 'auto'};\n height: ${typeof props.height === 'number' || typeof props.height === 'string' ? '100%' : 'auto'}\n }\n `}\n\n & > :not(${Placeholder}) {\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n width: 100% !important;\n height: 100% !important;\n box-sizing: border-box !important;\n }\n`\n"],"names":["Placeholder","styled","svg","withConfig","shouldForwardProp","propKey","includes","attrs","props","xmlns","viewBox","getViewBoxFromAspectRatio","ratio","displayName","componentId","Root","div","width","height"],"mappings":"yFAIO,MAAMA,YAAcC,OAAOC,IAC/BC,WAAmC,CAClCC,kBAAoBC,IAAa,CAAC,SAASC,SAASD,KAErDE,OAA+BC,IAAW,CACzCC,MAAO,6BACPC,QAASC,0BAA0BH,EAAMI,WACxCT,WAAA,CAAAU,YAAA,2BAAAC,YAAA,oBAPsBb,CAU1B,CAAA,yCAEM,MAAMc,KAAOd,OAAOe,IAAIb,WAA4C,CACzEC,kBAAoBC,IAAa,CAAC,QAAS,UAAUC,SAASD,KAC9DF,WAAA,CAAAU,YAAA,oBAAAC,YAAA,oBAFkBb,CAElB,CAAA,2CAAA,aAAA,sJAIGO,GAAU,uBAEFA,EAAMS,OAAU,SACnB,GAAGT,EAAMS,iBACFT,EAAMS,OAAU,SACvBT,EAAMS,MACN,sCAGGT,EAAMU,QAAW,SACpB,GAAGV,EAAMU,kBACFV,EAAMU,QAAW,SACxBV,EAAMU,OACN,6BAGAlB,sCACYQ,EAAMS,OAAU,iBAAmBT,EAAMS,OAAU,SAAW,OAAS,iCACtET,EAAMU,QAAW,iBAAmBV,EAAMU,QAAW,SAAW,OAAS,qBAInFlB"}
1
+ {"version":3,"file":"style.mjs","sources":["../../../../src/components/AspectRatio/style.ts"],"sourcesContent":["import styled from 'styled-components'\nimport { getViewBoxFromAspectRatio } from './utils'\nimport type { AspectRatioProps, StyledPlaceholderProps } from './types'\n\nexport const Placeholder = styled.svg\n .withConfig<StyledPlaceholderProps>({\n shouldForwardProp: (propKey) => !['ratio'].includes(propKey),\n })\n .attrs<StyledPlaceholderProps>((props) => ({\n xmlns: 'http://www.w3.org/2000/svg',\n viewBox: getViewBoxFromAspectRatio(props.ratio),\n }))`\n box-sizing: border-box;\n display: block;\n`\n\nexport const Root = styled.div.withConfig<Omit<AspectRatioProps, 'ratio'>>({\n shouldForwardProp: (propKey) => !['width', 'height'].includes(propKey),\n})`\n box-sizing: border-box;\n position: relative;\n\n ${(props) => `\n width: ${\n typeof props.width === 'number'\n ? `${props.width}px`\n : typeof props.width === 'string'\n ? props.width\n : 'min-content'\n };\n height: ${\n typeof props.height === 'number'\n ? `${props.height}px`\n : typeof props.height === 'string'\n ? props.height\n : 'min-content'\n };\n\n & > ${Placeholder} {\n width: ${typeof props.width === 'number' || typeof props.width === 'string' ? '100%' : 'auto'};\n height: ${typeof props.height === 'number' || typeof props.height === 'string' ? '100%' : 'auto'}\n }\n `}\n\n & > :not(${Placeholder}) {\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n width: 100% !important;\n height: 100% !important;\n box-sizing: border-box !important;\n }\n`\n"],"names":["Placeholder","styled","svg","withConfig","shouldForwardProp","propKey","includes","attrs","props","xmlns","viewBox","getViewBoxFromAspectRatio","ratio","displayName","componentId","Root","div","width","height"],"mappings":"yFAIO,MAAMA,YAAcC,OAAOC,IAC/BC,WAAmC,CAClCC,kBAAoBC,IAAa,CAAC,SAASC,SAASD,KAErDE,OAA+BC,IAAW,CACzCC,MAAO,6BACPC,QAASC,0BAA0BH,EAAMI,WACxCT,WAAA,CAAAU,YAAA,2BAAAC,YAAA,oBAPsBb,CAU1B,CAAA,yCAEM,MAAMc,KAAOd,OAAOe,IAAIb,WAA4C,CACzEC,kBAAoBC,IAAa,CAAC,QAAS,UAAUC,SAASD,KAC9DF,WAAA,CAAAU,YAAA,oBAAAC,YAAA,oBAFkBb,CAElB,CAAA,2CAAA,aAAA,sJAIGO,GAAU,uBAEFA,EAAMS,OAAU,SACnB,GAAGT,EAAMS,iBACFT,EAAMS,OAAU,SACrBT,EAAMS,MACN,sCAGCT,EAAMU,QAAW,SACpB,GAAGV,EAAMU,kBACFV,EAAMU,QAAW,SACtBV,EAAMU,OACN,6BAGFlB,sCACYQ,EAAMS,OAAU,iBAAmBT,EAAMS,OAAU,SAAW,OAAS,iCACtET,EAAMU,QAAW,iBAAmBV,EAAMU,QAAW,SAAW,OAAS,qBAInFlB"}
@@ -1,2 +1,2 @@
1
- 'use strict';var React=require('react');var withMergedProps=require('../../hocs/withMergedProps.js');var utils=require('./utils.js');var constants=require('./constants.js');var defaultConstants=require('./default-constants.js');var style=require('./style.js');var jsxRuntime=require('react/jsx-runtime');var Skeleton=require('../Skeleton/Skeleton.js');var Text=require('../Text/Text.js');const Avatar=withMergedProps.withMergedProps(React.forwardRef(((e,t)=>{const{size:s="m",textProps:r={},children:a,text:n,...i}=e;const o=typeof s!='string'||i.preset!=='default'&&s!=='sm'?s:defaultConstants.SIZES_MAPPING_RULES[s]??s;return jsxRuntime.jsx(style.Root,{...i,size:o,ref:t,children:i.loading?jsxRuntime.jsx(Skeleton.Skeleton,{as:"span",width:"100%",height:"100%",borderRadius:"inherit"}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:a??(!i.src&&jsxRuntime.jsx(Text.Text,{as:"span",appearance:"caption",size:"inherit",color:"inherit",lineHeight:1,marginTop:1,transform:"uppercase",...r,children:utils.abbreviateCaption(n||i.title||'')}))})})})),{displayName:'Avatar',sizes:e=>e.preset==='brand'?e.square?constants.SIZES_SQUARE:constants.SIZES:defaultConstants.SIZES_DEFAULT});exports.SIZES=constants.SIZES,exports.SIZES_SQUARE=constants.SIZES_SQUARE,exports.Avatar=Avatar;
1
+ 'use strict';var React=require('react');var withMergedProps=require('../../hocs/withMergedProps.js');var utils=require('./utils.js');var constants=require('./constants.js');var defaultConstants=require('./default-constants.js');var style=require('./style.js');var jsxRuntime=require('react/jsx-runtime');var Skeleton=require('../Skeleton/Skeleton.js');var Text=require('../Text/Text.js');const Avatar=withMergedProps.withMergedProps(React.forwardRef(((e,t)=>{const{size:s="m",textProps:r={},children:a,text:n,...i}=e;const o=typeof s!='string'||i.preset!=='default'&&s!=='sm'?s:defaultConstants.SIZES_MAPPING_RULES[s]??s;return jsxRuntime.jsx(style.Root,{...i,size:o,ref:t,children:i.loading?jsxRuntime.jsx(Skeleton.Skeleton,{as:"span",width:"100%",height:"100%",borderRadius:"inherit"}):a??(!i.src&&jsxRuntime.jsx(Text.Text,{as:"span",appearance:"caption",size:"inherit",color:"inherit",lineHeight:1,marginTop:1,transform:"uppercase",...r,children:utils.abbreviateCaption(n||i.title||'')}))})})),{displayName:'Avatar',sizes:e=>e.preset==='brand'?e.square?constants.SIZES_SQUARE:constants.SIZES:defaultConstants.SIZES_DEFAULT});exports.SIZES=constants.SIZES,exports.SIZES_SQUARE=constants.SIZES_SQUARE,exports.Avatar=Avatar;
2
2
  //# sourceMappingURL=Avatar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.js","sources":["../../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Skeleton } from 'components/Skeleton'\nimport { Text } from 'components/Text'\nimport { abbreviateCaption } from './utils'\nimport { SIZES, SIZES_SQUARE } from './constants'\nimport { SIZES_MAPPING_RULES, SIZES_DEFAULT } from './default-constants'\nimport type { AvatarProps } from './types'\nimport * as Styled from './style'\n\nconst COMPONENT_NAME = 'Avatar'\n\n/**\n *\n * Component accepts all \\<span\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [AvatarProps](https://github.com/foxford/ui/blob/master/src/components/Avatar/types.ts)\n */\nconst Avatar: React.ForwardRefExoticComponent<AvatarProps> = withMergedProps<AvatarProps, HTMLSpanElement>(\n forwardRef((props, ref) => {\n const { size = 'm', textProps = {}, children, text, ...restProps } = props\n\n const sizeMapped =\n typeof size === 'string' && (restProps.preset === 'default' || size === 'sm')\n ? SIZES_MAPPING_RULES[size] ?? size\n : size\n\n return (\n <Styled.Root {...restProps} size={sizeMapped} ref={ref}>\n {restProps.loading ? (\n <Skeleton as='span' width='100%' height='100%' borderRadius='inherit' />\n ) : (\n <>\n {children ??\n (!restProps.src && (\n <Text\n as='span'\n appearance='caption'\n size='inherit'\n color='inherit'\n lineHeight={1}\n marginTop={1}\n transform='uppercase'\n {...textProps}\n >\n {abbreviateCaption(text || restProps.title || '')}\n </Text>\n ))}\n </>\n )}\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: (props) => {\n if (props.preset === 'brand') {\n return props.square ? SIZES_SQUARE : SIZES\n }\n\n return SIZES_DEFAULT\n },\n }\n)\n\nexport { Avatar }\n\nexport { SIZES, SIZES_SQUARE }\n"],"names":["Avatar","withMergedProps","forwardRef","props","ref","size","textProps","children","text","restProps","sizeMapped","preset","SIZES_MAPPING_RULES","_jsx","Styled","loading","Skeleton","as","width","height","borderRadius","jsx","_Fragment","src","Text","appearance","color","lineHeight","marginTop","transform","abbreviateCaption","title","displayName","sizes","square","SIZES_SQUARE","SIZES","SIZES_DEFAULT"],"mappings":"oYAsBMA,MAAAA,OAAuDC,gBAAAA,gBAC3DC,MAAAA,YAAW,CAACC,EAAOC,KACjB,MAAMC,KAAEA,EAAO,IAAGC,UAAEA,EAAY,CAAE,EAAAC,SAAEA,EAAQC,KAAEA,KAASC,GAAcN,EAErE,MAAMO,SACGL,GAAS,UAAaI,EAAUE,SAAW,WAAaN,IAAS,KAEpEA,EADAO,iBAAmBA,oBAACP,IAASA,EAGnC,OACEQ,WAAAA,IAACC,MAAAA,KAAW,IAAKL,EAAWJ,KAAMK,EAAYN,IAAKA,EAAIG,SACpDE,EAAUM,QACTF,WAAAA,IAACG,SAAAA,SAAQ,CAACC,GAAG,OAAOC,MAAM,OAAOC,OAAO,OAAOC,aAAa,YAE5DP,WAAAQ,IAAAC,oBAAA,CAAAf,SACGA,KACGE,EAAUc,KACVV,WAAAA,IAACW,KAAAA,KAAI,CACHP,GAAG,OACHQ,WAAW,UACXpB,KAAK,UACLqB,MAAM,UACNC,WAAY,EACZC,UAAW,EACXC,UAAU,eACNvB,EAASC,SAEZuB,MAAAA,kBAAkBtB,GAAQC,EAAUsB,OAAS,UAK5C,IAGlB,CACEC,YAhDmB,SAiDnBC,MAAQ9B,GACFA,EAAMQ,SAAW,QACZR,EAAM+B,OAASC,UAAYA,aAAGC,gBAGhCC"}
1
+ {"version":3,"file":"Avatar.js","sources":["../../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport type { MergedProps } from 'hocs/withMergedProps'\nimport { Skeleton } from 'components/Skeleton'\nimport { Text } from 'components/Text'\nimport { abbreviateCaption } from './utils'\nimport { SIZES, SIZES_SQUARE } from './constants'\nimport { SIZES_MAPPING_RULES, SIZES_DEFAULT } from './default-constants'\nimport type { AvatarProps } from './types'\nimport * as Styled from './style'\n\nconst COMPONENT_NAME = 'Avatar'\n\n/**\n *\n * Component accepts all \\<span\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [AvatarProps](https://github.com/foxford/ui/blob/master/src/components/Avatar/types.ts)\n */\nconst Avatar: React.ForwardRefExoticComponent<AvatarProps> = withMergedProps<AvatarProps, HTMLSpanElement>(\n forwardRef<HTMLSpanElement, MergedProps<AvatarProps>>((props, ref) => {\n const { size = 'm', textProps = {}, children, text, ...restProps } = props\n\n const sizeMapped =\n typeof size === 'string' && (restProps.preset === 'default' || size === 'sm')\n ? (SIZES_MAPPING_RULES[size] ?? size)\n : size\n\n return (\n <Styled.Root {...restProps} size={sizeMapped} ref={ref}>\n {restProps.loading ? (\n <Skeleton as='span' width='100%' height='100%' borderRadius='inherit' />\n ) : (\n (children ??\n (!restProps.src && (\n <Text\n as='span'\n appearance='caption'\n size='inherit'\n color='inherit'\n lineHeight={1}\n marginTop={1}\n transform='uppercase'\n {...textProps}\n >\n {abbreviateCaption(text || restProps.title || '')}\n </Text>\n )))\n )}\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: (props) => {\n if (props.preset === 'brand') {\n return props.square ? SIZES_SQUARE : SIZES\n }\n\n return SIZES_DEFAULT\n },\n }\n)\n\nexport { Avatar }\n\nexport { SIZES, SIZES_SQUARE }\n"],"names":["Avatar","withMergedProps","forwardRef","props","ref","size","textProps","children","text","restProps","sizeMapped","preset","SIZES_MAPPING_RULES","_jsx","Styled","loading","Skeleton","as","width","height","borderRadius","src","Text","appearance","color","lineHeight","marginTop","transform","abbreviateCaption","title","displayName","sizes","square","SIZES_SQUARE","SIZES","SIZES_DEFAULT"],"mappings":"oYAuBMA,MAAAA,OAAuDC,gBAAAA,gBAC3DC,MAAAA,YAAsD,CAACC,EAAOC,KAC5D,MAAMC,KAAEA,EAAO,IAAGC,UAAEA,EAAY,CAAE,EAAAC,SAAEA,EAAQC,KAAEA,KAASC,GAAcN,EAErE,MAAMO,SACGL,GAAS,UAAaI,EAAUE,SAAW,WAAaN,IAAS,KAEpEA,EADCO,iBAAmBA,oBAACP,IAASA,EAGpC,OACEQ,WAAAA,IAACC,MAAAA,KAAW,IAAKL,EAAWJ,KAAMK,EAAYN,IAAKA,EAAIG,SACpDE,EAAUM,QACTF,WAAAA,IAACG,SAAAA,SAAQ,CAACC,GAAG,OAAOC,MAAM,OAAOC,OAAO,OAAOC,aAAa,YAE3Db,KACCE,EAAUY,KACVR,WAAAA,IAACS,KAAAA,KAAI,CACHL,GAAG,OACHM,WAAW,UACXlB,KAAK,UACLmB,MAAM,UACNC,WAAY,EACZC,UAAW,EACXC,UAAU,eACNrB,EAASC,SAEZqB,MAAAA,kBAAkBpB,GAAQC,EAAUoB,OAAS,QAIxC,IAGlB,CACEC,YA9CmB,SA+CnBC,MAAQ5B,GACFA,EAAMQ,SAAW,QACZR,EAAM6B,OAASC,UAAYA,aAAGC,gBAGhCC"}