@foxford/ui 2.97.0 → 2.97.1-beta-b68128a-20260227

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 (614) hide show
  1. package/components/Accordion/Accordion.js +1 -1
  2. package/components/Accordion/Accordion.js.map +1 -1
  3. package/components/Accordion/Accordion.mjs +1 -1
  4. package/components/Accordion/Accordion.mjs.map +1 -1
  5. package/components/Accordion/hooks.js.map +1 -1
  6. package/components/Accordion/hooks.mjs.map +1 -1
  7. package/components/Accordion/style.js.map +1 -1
  8. package/components/AccordionItem/AccordionItem.js.map +1 -1
  9. package/components/AccordionItem/AccordionItem.mjs +1 -1
  10. package/components/AccordionItem/AccordionItem.mjs.map +1 -1
  11. package/components/AccordionItem/sizes.js.map +1 -1
  12. package/components/AccordionItem/style.js.map +1 -1
  13. package/components/AccordionItem/style.mjs.map +1 -1
  14. package/components/AccordionItem/useAccordionPanel.js.map +1 -1
  15. package/components/AccordionItem/useAccordionPanelProps.js.map +1 -1
  16. package/components/AccordionItem/useAccordionPanelProps.mjs.map +1 -1
  17. package/components/ActionBtn/ActionBtn.js.map +1 -1
  18. package/components/ActionBtn/ActionBtn.mjs.map +1 -1
  19. package/components/ActionBtn/style.js.map +1 -1
  20. package/components/ActionBtn/style.mjs.map +1 -1
  21. package/components/AddElement/AddElement.js +1 -1
  22. package/components/AddElement/AddElement.js.map +1 -1
  23. package/components/AddElement/AddElement.mjs +1 -1
  24. package/components/AddElement/AddElement.mjs.map +1 -1
  25. package/components/AddElement/sizes.js.map +1 -1
  26. package/components/AddElement/sizes.mjs.map +1 -1
  27. package/components/AddElement/style.js.map +1 -1
  28. package/components/AddElement/style.mjs.map +1 -1
  29. package/components/Alert/Alert.js.map +1 -1
  30. package/components/Alert/Alert.mjs.map +1 -1
  31. package/components/Alert/CountdownCircle.js.map +1 -1
  32. package/components/Alert/CountdownCircle.mjs.map +1 -1
  33. package/components/Alert/style.js.map +1 -1
  34. package/components/Amount/Amount.js.map +1 -1
  35. package/components/Amount/data/index.js.map +1 -1
  36. package/components/Amount/data/index.mjs.map +1 -1
  37. package/components/Amount/style.js.map +1 -1
  38. package/components/Amount/style.mjs.map +1 -1
  39. package/components/Anchor/Anchor.js +1 -1
  40. package/components/Anchor/Anchor.js.map +1 -1
  41. package/components/Anchor/Anchor.mjs +1 -1
  42. package/components/Anchor/Anchor.mjs.map +1 -1
  43. package/components/Anchor/style.js.map +1 -1
  44. package/components/Arrow/Arrow.js.map +1 -1
  45. package/components/Arrow/Arrow.mjs.map +1 -1
  46. package/components/Arrow/images/chevronUpDefault.svg.js.map +1 -1
  47. package/components/Arrow/images/chevronUpDefault.svg.mjs.map +1 -1
  48. package/components/Arrow/style.js.map +1 -1
  49. package/components/ArrowBadge/ArrowBadge.js.map +1 -1
  50. package/components/ArrowBadge/ArrowBadge.mjs.map +1 -1
  51. package/components/ArrowBadge/images/arrow.svg.js.map +1 -1
  52. package/components/ArrowBadge/images/arrow.svg.mjs.map +1 -1
  53. package/components/ArrowBadge/images/fancy.svg.js.map +1 -1
  54. package/components/ArrowBadge/images/fancy.svg.mjs.map +1 -1
  55. package/components/ArrowBadge/images/rectangle.svg.js.map +1 -1
  56. package/components/ArrowBadge/images/rectangle.svg.mjs.map +1 -1
  57. package/components/ArrowBadge/style.js.map +1 -1
  58. package/components/ArrowBadge/style.mjs.map +1 -1
  59. package/components/AspectRatio/AspectRatio.js.map +1 -1
  60. package/components/AspectRatio/AspectRatio.mjs.map +1 -1
  61. package/components/AspectRatio/style.js.map +1 -1
  62. package/components/AspectRatio/style.mjs.map +1 -1
  63. package/components/Avatar/Avatar.js.map +1 -1
  64. package/components/Avatar/Avatar.mjs.map +1 -1
  65. package/components/Avatar/style.js.map +1 -1
  66. package/components/Avatar/style.mjs.map +1 -1
  67. package/components/Badge/Badge.js.map +1 -1
  68. package/components/Badge/Badge.mjs.map +1 -1
  69. package/components/Badge/style.js.map +1 -1
  70. package/components/Badge/style.mjs.map +1 -1
  71. package/components/Button/Button.js.map +1 -1
  72. package/components/Button/Button.mjs +1 -1
  73. package/components/Button/Button.mjs.map +1 -1
  74. package/components/Button/style.js.map +1 -1
  75. package/components/Button/style.mjs +1 -1
  76. package/components/Button/style.mjs.map +1 -1
  77. package/components/Checkbox/Checkbox.js.map +1 -1
  78. package/components/Checkbox/Checkbox.mjs.map +1 -1
  79. package/components/Checkbox/Group.mjs.map +1 -1
  80. package/components/Checkbox/images/checkDefault.svg.js.map +1 -1
  81. package/components/Checkbox/images/checkDefault.svg.mjs.map +1 -1
  82. package/components/Checkbox/style.js.map +1 -1
  83. package/components/Checkbox/style.mjs.map +1 -1
  84. package/components/Chip/Chip.js +1 -1
  85. package/components/Chip/Chip.js.map +1 -1
  86. package/components/Chip/Chip.mjs +1 -1
  87. package/components/Chip/Chip.mjs.map +1 -1
  88. package/components/Chip/constants.js.map +1 -1
  89. package/components/Chip/style.js.map +1 -1
  90. package/components/Chip/style.mjs.map +1 -1
  91. package/components/Container/style.js.map +1 -1
  92. package/components/Container/style.mjs.map +1 -1
  93. package/components/ContextMenu/ContextMenu.js.map +1 -1
  94. package/components/ContextMenu/ContextMenu.mjs.map +1 -1
  95. package/components/ContextMenu/Item.js.map +1 -1
  96. package/components/ContextMenu/Item.mjs.map +1 -1
  97. package/components/ContextMenu/style.js.map +1 -1
  98. package/components/ContextMenu/style.mjs.map +1 -1
  99. package/components/ContextMenu/tooltip-styles.js.map +1 -1
  100. package/components/ContextMenu/tooltip-styles.mjs.map +1 -1
  101. package/components/ContextMenu.Multilevel/ContextMenu.Multilevel.js.map +1 -1
  102. package/components/ContextMenu.Multilevel/ContextMenu.Multilevel.mjs.map +1 -1
  103. package/components/ContextMenu.Multilevel/Controls.js.map +1 -1
  104. package/components/ContextMenu.Multilevel/Heading.js.map +1 -1
  105. package/components/ContextMenu.Multilevel/Heading.mjs.map +1 -1
  106. package/components/ContextMenu.Multilevel/SubHeading.js.map +1 -1
  107. package/components/ContextMenu.Multilevel/SubHeading.mjs.map +1 -1
  108. package/components/ContextMenu.Multilevel/style.js.map +1 -1
  109. package/components/ContextMenu.Multilevel/style.mjs.map +1 -1
  110. package/components/Dialog/Dialog.js.map +1 -1
  111. package/components/Dialog/Dialog.mjs.map +1 -1
  112. package/components/Dialog/sizes.js.map +1 -1
  113. package/components/Dialog/sizes.mjs +1 -1
  114. package/components/Dialog/style.js.map +1 -1
  115. package/components/DialogComponent/DialogComponent.js.map +1 -1
  116. package/components/DialogComponent/DialogComponent.mjs +1 -1
  117. package/components/DialogComponent/DialogComponent.mjs.map +1 -1
  118. package/components/DialogComponent/Header.js.map +1 -1
  119. package/components/DialogComponent/Header.mjs.map +1 -1
  120. package/components/DialogComponent/images/dragging.svg.js.map +1 -1
  121. package/components/DialogComponent/images/dragging.svg.mjs.map +1 -1
  122. package/components/DialogComponent/images/mask-rectangle.svg.mjs.map +1 -1
  123. package/components/DialogComponent/images/mask-slope.svg.mjs.map +1 -1
  124. package/components/DialogComponent/layouts.js.map +1 -1
  125. package/components/DialogComponent/layouts.mjs.map +1 -1
  126. package/components/DialogComponent/style.js.map +1 -1
  127. package/components/DialogComponent/style.mjs.map +1 -1
  128. package/components/Divider/Divider.js.map +1 -1
  129. package/components/Divider/Divider.mjs.map +1 -1
  130. package/components/Divider/style.js.map +1 -1
  131. package/components/Dropdown/Dropdown.js +1 -1
  132. package/components/Dropdown/Dropdown.js.map +1 -1
  133. package/components/Dropdown/Dropdown.mjs +1 -1
  134. package/components/Dropdown/Dropdown.mjs.map +1 -1
  135. package/components/Dropdown/DropdownListItem.js.map +1 -1
  136. package/components/Dropdown/DropdownListItem.mjs.map +1 -1
  137. package/components/Dropdown/DropdownMenu.js.map +1 -1
  138. package/components/Dropdown/DropdownMenu.mjs.map +1 -1
  139. package/components/Dropdown/DropdownMenuMultiple.js.map +1 -1
  140. package/components/Dropdown/DropdownMenuMultiple.mjs.map +1 -1
  141. package/components/Dropdown/DropdownMenuNoOptions.js +1 -1
  142. package/components/Dropdown/DropdownMenuNoOptions.js.map +1 -1
  143. package/components/Dropdown/DropdownMenuNoOptions.mjs +1 -1
  144. package/components/Dropdown/DropdownMenuNoOptions.mjs.map +1 -1
  145. package/components/Dropdown/DropdownMenuSingle.js.map +1 -1
  146. package/components/Dropdown/DropdownMenuSingle.mjs.map +1 -1
  147. package/components/Dropdown/hooks.js.map +1 -1
  148. package/components/Dropdown/hooks.mjs.map +1 -1
  149. package/components/Dropdown/renderDropdownOptionsList.js.map +1 -1
  150. package/components/Dropdown/sizes.js.map +1 -1
  151. package/components/Dropdown/style.js.map +1 -1
  152. package/components/Dropdown/style.mjs.map +1 -1
  153. package/components/Dropdown/utils.js.map +1 -1
  154. package/components/Dropdown/utils.mjs.map +1 -1
  155. package/components/FormInput/FormInput.js.map +1 -1
  156. package/components/FormInput/FormInput.mjs.map +1 -1
  157. package/components/FormInput/style.js.map +1 -1
  158. package/components/FormInput/style.mjs.map +1 -1
  159. package/components/FormInputLabel/FormInputLabel.js.map +1 -1
  160. package/components/FormInputLabel/FormInputLabel.mjs.map +1 -1
  161. package/components/FormInputLabel/style.js.map +1 -1
  162. package/components/FormInputLabel/style.mjs.map +1 -1
  163. package/components/FormLabel/FormLabel.js.map +1 -1
  164. package/components/FormLabel/FormLabel.mjs +1 -1
  165. package/components/FormLabel/FormLabel.mjs.map +1 -1
  166. package/components/FormLabel/constants.js.map +1 -1
  167. package/components/FormLabel/constants.mjs +1 -1
  168. package/components/FormLabel/style.js.map +1 -1
  169. package/components/FormLabel/style.mjs.map +1 -1
  170. package/components/Icon/Icon.js.map +1 -1
  171. package/components/Icon/Icon.mjs.map +1 -1
  172. package/components/Icon/iconPack.js.map +1 -1
  173. package/components/Icon/iconPack.mjs.map +1 -1
  174. package/components/Icon/iconsDefault.js.map +1 -1
  175. package/components/Icon/images/blackBoard_default.svg.js.map +1 -1
  176. package/components/Icon/images/blackBoard_default.svg.mjs.map +1 -1
  177. package/components/Icon/images/book_default.svg.js.map +1 -1
  178. package/components/Icon/images/book_default.svg.mjs.map +1 -1
  179. package/components/Icon/images/burger_default.svg.js.map +1 -1
  180. package/components/Icon/images/burger_default.svg.mjs.map +1 -1
  181. package/components/Icon/images/calendar_default.svg.js.map +1 -1
  182. package/components/Icon/images/calendar_default.svg.mjs.map +1 -1
  183. package/components/Icon/images/calendar_simple_default.svg.js.map +1 -1
  184. package/components/Icon/images/calendar_simple_default.svg.mjs.map +1 -1
  185. package/components/Icon/images/camps_default.svg.js.map +1 -1
  186. package/components/Icon/images/camps_default.svg.mjs.map +1 -1
  187. package/components/Icon/images/cancel_default.svg.js.map +1 -1
  188. package/components/Icon/images/cancel_default.svg.mjs.map +1 -1
  189. package/components/Icon/images/cart_default.svg.js.map +1 -1
  190. package/components/Icon/images/cart_default.svg.mjs.map +1 -1
  191. package/components/Icon/images/checkCircle_default.svg.js.map +1 -1
  192. package/components/Icon/images/checkCircle_default.svg.mjs.map +1 -1
  193. package/components/Icon/images/check_default.svg.js.map +1 -1
  194. package/components/Icon/images/check_default.svg.mjs.map +1 -1
  195. package/components/Icon/images/chevronDown_default.svg.js.map +1 -1
  196. package/components/Icon/images/chevronDown_default.svg.mjs.map +1 -1
  197. package/components/Icon/images/chevronLeft_default.svg.js.map +1 -1
  198. package/components/Icon/images/chevronLeft_default.svg.mjs.map +1 -1
  199. package/components/Icon/images/chevronRight_default.svg.js.map +1 -1
  200. package/components/Icon/images/chevronRight_default.svg.mjs.map +1 -1
  201. package/components/Icon/images/chevronUp_default.svg.js.map +1 -1
  202. package/components/Icon/images/chevronUp_default.svg.mjs.map +1 -1
  203. package/components/Icon/images/clockFilled_default.svg.js.map +1 -1
  204. package/components/Icon/images/clockFilled_default.svg.mjs.map +1 -1
  205. package/components/Icon/images/clock_default.svg.js.map +1 -1
  206. package/components/Icon/images/clock_default.svg.mjs.map +1 -1
  207. package/components/Icon/images/coins_default.svg.js.map +1 -1
  208. package/components/Icon/images/coins_default.svg.mjs.map +1 -1
  209. package/components/Icon/images/copy_default.svg.js.map +1 -1
  210. package/components/Icon/images/copy_default.svg.mjs.map +1 -1
  211. package/components/Icon/images/courses_default.svg.js.map +1 -1
  212. package/components/Icon/images/courses_default.svg.mjs.map +1 -1
  213. package/components/Icon/images/cross_default.svg.js.map +1 -1
  214. package/components/Icon/images/cross_default.svg.mjs.map +1 -1
  215. package/components/Icon/images/dialog_default.svg.js.map +1 -1
  216. package/components/Icon/images/dialog_default.svg.mjs.map +1 -1
  217. package/components/Icon/images/diamondFilled_default.svg.js.map +1 -1
  218. package/components/Icon/images/diamondFilled_default.svg.mjs.map +1 -1
  219. package/components/Icon/images/diamond_default.svg.js.map +1 -1
  220. package/components/Icon/images/diamond_default.svg.mjs.map +1 -1
  221. package/components/Icon/images/discount_default.svg.js.map +1 -1
  222. package/components/Icon/images/discount_default.svg.mjs.map +1 -1
  223. package/components/Icon/images/document_default.svg.js.map +1 -1
  224. package/components/Icon/images/document_default.svg.mjs.map +1 -1
  225. package/components/Icon/images/dropDownArrow_default.svg.js.map +1 -1
  226. package/components/Icon/images/dropDownArrow_default.svg.mjs.map +1 -1
  227. package/components/Icon/images/edit_default.svg.js.map +1 -1
  228. package/components/Icon/images/edit_default.svg.mjs.map +1 -1
  229. package/components/Icon/images/email_default.svg.js.map +1 -1
  230. package/components/Icon/images/email_default.svg.mjs.map +1 -1
  231. package/components/Icon/images/externalLink_default.svg.js.map +1 -1
  232. package/components/Icon/images/externalLink_default.svg.mjs.map +1 -1
  233. package/components/Icon/images/externat_default.svg.js.map +1 -1
  234. package/components/Icon/images/externat_default.svg.mjs.map +1 -1
  235. package/components/Icon/images/eye_default.svg.js.map +1 -1
  236. package/components/Icon/images/eye_default.svg.mjs.map +1 -1
  237. package/components/Icon/images/fileBordered_default.svg.js.map +1 -1
  238. package/components/Icon/images/fileBordered_default.svg.mjs.map +1 -1
  239. package/components/Icon/images/file_default.svg.js.map +1 -1
  240. package/components/Icon/images/file_default.svg.mjs.map +1 -1
  241. package/components/Icon/images/fire_default.svg.js.map +1 -1
  242. package/components/Icon/images/fire_default.svg.mjs.map +1 -1
  243. package/components/Icon/images/headphones_default.svg.js.map +1 -1
  244. package/components/Icon/images/headphones_default.svg.mjs.map +1 -1
  245. package/components/Icon/images/home_default.svg.js.map +1 -1
  246. package/components/Icon/images/home_default.svg.mjs.map +1 -1
  247. package/components/Icon/images/infoInverse_default.svg.js.map +1 -1
  248. package/components/Icon/images/infoInverse_default.svg.mjs.map +1 -1
  249. package/components/Icon/images/info_default.svg.js.map +1 -1
  250. package/components/Icon/images/info_default.svg.mjs.map +1 -1
  251. package/components/Icon/images/lessons_default.svg.js.map +1 -1
  252. package/components/Icon/images/lessons_default.svg.mjs.map +1 -1
  253. package/components/Icon/images/list_default.svg.js.map +1 -1
  254. package/components/Icon/images/list_default.svg.mjs.map +1 -1
  255. package/components/Icon/images/login_default.svg.js.map +1 -1
  256. package/components/Icon/images/login_default.svg.mjs.map +1 -1
  257. package/components/Icon/images/logout_default.svg.js.map +1 -1
  258. package/components/Icon/images/logout_default.svg.mjs.map +1 -1
  259. package/components/Icon/images/message_default.svg.js.map +1 -1
  260. package/components/Icon/images/message_default.svg.mjs.map +1 -1
  261. package/components/Icon/images/objective_default.svg.js.map +1 -1
  262. package/components/Icon/images/objective_default.svg.mjs.map +1 -1
  263. package/components/Icon/images/page_default.svg.js.map +1 -1
  264. package/components/Icon/images/page_default.svg.mjs.map +1 -1
  265. package/components/Icon/images/pencil_default.svg.js.map +1 -1
  266. package/components/Icon/images/pencil_default.svg.mjs.map +1 -1
  267. package/components/Icon/images/person_default.svg.js.map +1 -1
  268. package/components/Icon/images/person_default.svg.mjs.map +1 -1
  269. package/components/Icon/images/phoneNoFill_default.svg.js.map +1 -1
  270. package/components/Icon/images/phoneNoFill_default.svg.mjs.map +1 -1
  271. package/components/Icon/images/phone_default.svg.js.map +1 -1
  272. package/components/Icon/images/phone_default.svg.mjs.map +1 -1
  273. package/components/Icon/images/playPause_default.svg.js.map +1 -1
  274. package/components/Icon/images/playPause_default.svg.mjs.map +1 -1
  275. package/components/Icon/images/play_default.svg.js.map +1 -1
  276. package/components/Icon/images/play_default.svg.mjs.map +1 -1
  277. package/components/Icon/images/plusThin_default.svg.js.map +1 -1
  278. package/components/Icon/images/plusThin_default.svg.mjs.map +1 -1
  279. package/components/Icon/images/plus_default.svg.js.map +1 -1
  280. package/components/Icon/images/plus_default.svg.mjs.map +1 -1
  281. package/components/Icon/images/present_default.svg.js.map +1 -1
  282. package/components/Icon/images/present_default.svg.mjs.map +1 -1
  283. package/components/Icon/images/priceTag_default.svg.js.map +1 -1
  284. package/components/Icon/images/priceTag_default.svg.mjs.map +1 -1
  285. package/components/Icon/images/print_default.svg.js.map +1 -1
  286. package/components/Icon/images/print_default.svg.mjs.map +1 -1
  287. package/components/Icon/images/prof_default.svg.js.map +1 -1
  288. package/components/Icon/images/prof_default.svg.mjs.map +1 -1
  289. package/components/Icon/images/questionFilled_default.svg.js.map +1 -1
  290. package/components/Icon/images/questionFilled_default.svg.mjs.map +1 -1
  291. package/components/Icon/images/radioChecked_default.svg.js.map +1 -1
  292. package/components/Icon/images/radioChecked_default.svg.mjs.map +1 -1
  293. package/components/Icon/images/radioNotChecked_default.svg.js.map +1 -1
  294. package/components/Icon/images/radioNotChecked_default.svg.mjs.map +1 -1
  295. package/components/Icon/images/reload_default.svg.js.map +1 -1
  296. package/components/Icon/images/reload_default.svg.mjs.map +1 -1
  297. package/components/Icon/images/search_default.svg.js.map +1 -1
  298. package/components/Icon/images/search_default.svg.mjs.map +1 -1
  299. package/components/Icon/images/settings_default.svg.js.map +1 -1
  300. package/components/Icon/images/settings_default.svg.mjs.map +1 -1
  301. package/components/Icon/images/sharpCross_default.svg.js.map +1 -1
  302. package/components/Icon/images/sharpCross_default.svg.mjs.map +1 -1
  303. package/components/Icon/images/sort_default.svg.js.map +1 -1
  304. package/components/Icon/images/sort_default.svg.mjs.map +1 -1
  305. package/components/Icon/images/star_default.svg.js.map +1 -1
  306. package/components/Icon/images/star_default.svg.mjs.map +1 -1
  307. package/components/Icon/images/student_default.svg.js.map +1 -1
  308. package/components/Icon/images/student_default.svg.mjs.map +1 -1
  309. package/components/Icon/images/target_default.svg.js.map +1 -1
  310. package/components/Icon/images/target_default.svg.mjs.map +1 -1
  311. package/components/Icon/images/tasks_default.svg.js.map +1 -1
  312. package/components/Icon/images/tasks_default.svg.mjs.map +1 -1
  313. package/components/Icon/images/textbook_default.svg.js.map +1 -1
  314. package/components/Icon/images/textbook_default.svg.mjs.map +1 -1
  315. package/components/Icon/images/tinyCross_default.svg.js.map +1 -1
  316. package/components/Icon/images/tinyCross_default.svg.mjs.map +1 -1
  317. package/components/Icon/images/trophy_default.svg.js.map +1 -1
  318. package/components/Icon/images/trophy_default.svg.mjs.map +1 -1
  319. package/components/Icon/images/unsort_default.svg.js.map +1 -1
  320. package/components/Icon/images/unsort_default.svg.mjs.map +1 -1
  321. package/components/Icon/images/video_default.svg.js.map +1 -1
  322. package/components/Icon/images/video_default.svg.mjs.map +1 -1
  323. package/components/Icon/images/wallet_default.svg.js.map +1 -1
  324. package/components/Icon/images/wallet_default.svg.mjs.map +1 -1
  325. package/components/Icon/style.js.map +1 -1
  326. package/components/IconButton/IconButton.js.map +1 -1
  327. package/components/IconButton/IconButton.mjs.map +1 -1
  328. package/components/IconButton/style.js.map +1 -1
  329. package/components/IconButton/style.mjs.map +1 -1
  330. package/components/Indicator/Indicator.js.map +1 -1
  331. package/components/Indicator/Indicator.mjs.map +1 -1
  332. package/components/Indicator/style.js.map +1 -1
  333. package/components/Indicator/style.mjs +1 -1
  334. package/components/Indicator/style.mjs.map +1 -1
  335. package/components/Input/Input.js +1 -1
  336. package/components/Input/Input.js.map +1 -1
  337. package/components/Input/Input.mjs +1 -1
  338. package/components/Input/Input.mjs.map +1 -1
  339. package/components/Input/helpers.mjs.map +1 -1
  340. package/components/Input/sizes.js.map +1 -1
  341. package/components/Input/style.js.map +1 -1
  342. package/components/Input/style.mjs.map +1 -1
  343. package/components/Input.Phone/Input.Phone.js.map +1 -1
  344. package/components/Input.Phone/Input.Phone.mjs +1 -1
  345. package/components/Input.Phone/constants.mjs.map +1 -1
  346. package/components/InputCheckbox/InputCheckbox.js.map +1 -1
  347. package/components/InputCheckbox/InputCheckbox.mjs.map +1 -1
  348. package/components/InputCheckbox/style.js +1 -1
  349. package/components/InputCheckbox/style.js.map +1 -1
  350. package/components/InputCheckbox/style.mjs +1 -1
  351. package/components/InputCheckbox/style.mjs.map +1 -1
  352. package/components/InputLabel/InputLabel.js.map +1 -1
  353. package/components/InputLabel/InputLabel.mjs.map +1 -1
  354. package/components/InputLabel/style.js.map +1 -1
  355. package/components/InputLabel/style.mjs.map +1 -1
  356. package/components/InputRadio/InputRadio.js.map +1 -1
  357. package/components/InputRadio/InputRadio.mjs.map +1 -1
  358. package/components/InputRadio/style.js.map +1 -1
  359. package/components/InputRadio/style.mjs.map +1 -1
  360. package/components/ListItem/ListItem.js.map +1 -1
  361. package/components/ListItem/ListItem.mjs.map +1 -1
  362. package/components/ListItem/style.js.map +1 -1
  363. package/components/ListItem/style.mjs.map +1 -1
  364. package/components/Menu/Menu.js +1 -1
  365. package/components/Menu/Menu.js.map +1 -1
  366. package/components/Menu/Menu.mjs +1 -1
  367. package/components/Menu/Menu.mjs.map +1 -1
  368. package/components/MenuComponent/MenuComponent.js.map +1 -1
  369. package/components/MenuComponent/MenuComponent.mjs.map +1 -1
  370. package/components/MenuComponent/style.js.map +1 -1
  371. package/components/MenuContainer/MenuContainer.js.map +1 -1
  372. package/components/MenuContainer/MenuContainer.mjs.map +1 -1
  373. package/components/MenuContainer/style.js.map +1 -1
  374. package/components/MenuContainer/style.mjs.map +1 -1
  375. package/components/MenuDivider/MenuDivider.js.map +1 -1
  376. package/components/MenuDivider/MenuDivider.mjs +1 -1
  377. package/components/MenuDivider/MenuDivider.mjs.map +1 -1
  378. package/components/MenuDivider/style.js.map +1 -1
  379. package/components/MenuDivider/style.mjs.map +1 -1
  380. package/components/MenuList/MenuList.js.map +1 -1
  381. package/components/MenuList/MenuList.mjs.map +1 -1
  382. package/components/Modal/Close.js.map +1 -1
  383. package/components/Modal/Modal.js.map +1 -1
  384. package/components/Modal/images/tinyCrossDefault.svg.js.map +1 -1
  385. package/components/Modal/images/tinyCrossDefault.svg.mjs.map +1 -1
  386. package/components/Modal/style.js.map +1 -1
  387. package/components/Modal/style.mjs.map +1 -1
  388. package/components/Notification/Notification.js +1 -1
  389. package/components/Notification/Notification.js.map +1 -1
  390. package/components/Notification/Notification.mjs +1 -1
  391. package/components/Notification/Notification.mjs.map +1 -1
  392. package/components/Notification/sizes.js.map +1 -1
  393. package/components/Notification/sizes.mjs.map +1 -1
  394. package/components/Notification/style.js.map +1 -1
  395. package/components/Notification/style.mjs.map +1 -1
  396. package/components/Paper/Paper.js.map +1 -1
  397. package/components/Paper/style.js.map +1 -1
  398. package/components/Paper/style.mjs.map +1 -1
  399. package/components/Popover/Popover.js.map +1 -1
  400. package/components/Popover/Popover.mjs.map +1 -1
  401. package/components/Popover/sizes.js.map +1 -1
  402. package/components/PopoverComponent/PopoverComponent.js.map +1 -1
  403. package/components/PopoverComponent/PopoverComponent.mjs +1 -1
  404. package/components/PopoverComponent/PopoverComponent.mjs.map +1 -1
  405. package/components/PopoverComponent/sizes.js.map +1 -1
  406. package/components/PopoverComponent/style.js.map +1 -1
  407. package/components/PopoverComponent/style.mjs.map +1 -1
  408. package/components/Progress/Progress.js.map +1 -1
  409. package/components/Progress/style.js.map +1 -1
  410. package/components/Progress/style.mjs +1 -1
  411. package/components/Progress/style.mjs.map +1 -1
  412. package/components/Progress.Circle/Progress.Circle.js.map +1 -1
  413. package/components/Progress.Circle/style.js.map +1 -1
  414. package/components/Progress.Circle/style.mjs.map +1 -1
  415. package/components/Progress.Segmented/Progress.Segmented.js.map +1 -1
  416. package/components/Progress.Segmented/Progress.Segmented.mjs.map +1 -1
  417. package/components/Progress.Segmented/style.js.map +1 -1
  418. package/components/Progress.Segmented/style.mjs.map +1 -1
  419. package/components/ProgressCircle/ProgressCircle.js.map +1 -1
  420. package/components/ProgressCircle/ProgressCircle.mjs.map +1 -1
  421. package/components/ProgressCircle/style.js.map +1 -1
  422. package/components/ProgressCircle/style.mjs +1 -1
  423. package/components/ProgressCircle/style.mjs.map +1 -1
  424. package/components/ProgressLine/ProgressLine.js.map +1 -1
  425. package/components/ProgressLine/ProgressLine.mjs.map +1 -1
  426. package/components/ProgressLine/style.js.map +1 -1
  427. package/components/ProgressLine/style.mjs +1 -1
  428. package/components/ProgressLine/style.mjs.map +1 -1
  429. package/components/Radio/Radio.js.map +1 -1
  430. package/components/Radio/style.js.map +1 -1
  431. package/components/Radio/style.mjs.map +1 -1
  432. package/components/Scrollable/Scrollable.js.map +1 -1
  433. package/components/Scrollable/Scrollable.mjs.map +1 -1
  434. package/components/Section/style.js.map +1 -1
  435. package/components/Section/style.mjs.map +1 -1
  436. package/components/Select/Select.js.map +1 -1
  437. package/components/Select/style.js.map +1 -1
  438. package/components/Select/style.mjs.map +1 -1
  439. package/components/Separator/SeparatorText.js.map +1 -1
  440. package/components/Separator/style.js.map +1 -1
  441. package/components/Separator/style.mjs.map +1 -1
  442. package/components/Skeleton/Skeleton.js.map +1 -1
  443. package/components/Skeleton/Skeleton.mjs.map +1 -1
  444. package/components/Skeleton/style.js.map +1 -1
  445. package/components/Skeleton/style.mjs +1 -1
  446. package/components/Skeleton/style.mjs.map +1 -1
  447. package/components/Spacer/style.js.map +1 -1
  448. package/components/Spinner/Spinner.js.map +1 -1
  449. package/components/Spinner/style.js.map +1 -1
  450. package/components/Spinner/style.mjs.map +1 -1
  451. package/components/Switch/Knob.js.map +1 -1
  452. package/components/Switch/Switch.js.map +1 -1
  453. package/components/Switch/Switch.mjs.map +1 -1
  454. package/components/Switch/style.js.map +1 -1
  455. package/components/Switch/style.mjs.map +1 -1
  456. package/components/Switcher/Switcher.js.map +1 -1
  457. package/components/Switcher/Switcher.mjs.map +1 -1
  458. package/components/Switcher/style.js.map +1 -1
  459. package/components/Switcher/style.mjs.map +1 -1
  460. package/components/Tab/Tab.js.map +1 -1
  461. package/components/Tab/Tab.mjs.map +1 -1
  462. package/components/Tab/default-constants.js.map +1 -1
  463. package/components/Tab/default-constants.mjs.map +1 -1
  464. package/components/Tab/images/arrow.svg.js.map +1 -1
  465. package/components/Tab/images/arrow.svg.mjs.map +1 -1
  466. package/components/Tab/style.js.map +1 -1
  467. package/components/Tab/style.mjs.map +1 -1
  468. package/components/TabList/TabList.js +1 -1
  469. package/components/TabList/TabList.js.map +1 -1
  470. package/components/TabList/TabList.mjs +1 -1
  471. package/components/TabList/TabList.mjs.map +1 -1
  472. package/components/TabList/TabListMenuTab.js +1 -1
  473. package/components/TabList/TabListMenuTab.js.map +1 -1
  474. package/components/TabList/TabListMenuTab.mjs +1 -1
  475. package/components/TabList/TabListMenuTab.mjs.map +1 -1
  476. package/components/TabList/TabListPanel.js.map +1 -1
  477. package/components/TabList/TabListPanel.mjs.map +1 -1
  478. package/components/TabList/hooks.js.map +1 -1
  479. package/components/TabList/hooks.mjs +1 -1
  480. package/components/TabList/hooks.mjs.map +1 -1
  481. package/components/TabList/layouts.js.map +1 -1
  482. package/components/TabList/sizes.js.map +1 -1
  483. package/components/TabList/style.js.map +1 -1
  484. package/components/TabList/style.mjs.map +1 -1
  485. package/components/TabListTab/TabListTab.js.map +1 -1
  486. package/components/TabListTab/TabListTab.mjs +1 -1
  487. package/components/TabListTab/TabListTab.mjs.map +1 -1
  488. package/components/TabListTab/hooks.js.map +1 -1
  489. package/components/TabListTab/hooks.mjs.map +1 -1
  490. package/components/TabListTab/sizes.js.map +1 -1
  491. package/components/TabListTab/style.js.map +1 -1
  492. package/components/TabListTab/style.mjs.map +1 -1
  493. package/components/Tabs/Tabs.js.map +1 -1
  494. package/components/Tabs/style.js.map +1 -1
  495. package/components/Tag/Tag.js.map +1 -1
  496. package/components/Tag/Tag.mjs.map +1 -1
  497. package/components/Tag/style.js.map +1 -1
  498. package/components/Tag/style.mjs.map +1 -1
  499. package/components/Text/Ellipsis.js.map +1 -1
  500. package/components/Text/Ellipsis.mjs.map +1 -1
  501. package/components/Text/Text.js +1 -1
  502. package/components/Text/Text.js.map +1 -1
  503. package/components/Text/Text.mjs +1 -1
  504. package/components/Text/Text.mjs.map +1 -1
  505. package/components/Text/style.js.map +1 -1
  506. package/components/Text/style.mjs.map +1 -1
  507. package/components/Text.Ellipse/Text.Ellipse.js.map +1 -1
  508. package/components/Text.Ellipse/Text.Ellipse.mjs.map +1 -1
  509. package/components/Text.Ellipse/style.js.map +1 -1
  510. package/components/Text.Ellipse/style.mjs.map +1 -1
  511. package/components/Text.Heading/Text.Heading.js.map +1 -1
  512. package/components/Text.Heading/Text.Heading.mjs.map +1 -1
  513. package/components/Textarea/Textarea.js +1 -1
  514. package/components/Textarea/Textarea.js.map +1 -1
  515. package/components/Textarea/Textarea.mjs +1 -1
  516. package/components/Textarea/Textarea.mjs.map +1 -1
  517. package/components/Textarea/sizes.js.map +1 -1
  518. package/components/Textarea/style.js.map +1 -1
  519. package/components/Textarea/style.mjs.map +1 -1
  520. package/components/Tooltip/Tooltip.js.map +1 -1
  521. package/components/Tooltip/Tooltip.mjs.map +1 -1
  522. package/components/Tooltip/TooltipWrapper.js.map +1 -1
  523. package/components/Tooltip/TooltipWrapper.mjs.map +1 -1
  524. package/components/Tooltip/default-constants.js.map +1 -1
  525. package/components/Tooltip/default-constants.mjs.map +1 -1
  526. package/components/TooltipComponent/TooltipComponent.js.map +1 -1
  527. package/components/TooltipComponent/TooltipComponent.mjs +1 -1
  528. package/components/TooltipComponent/TooltipComponent.mjs.map +1 -1
  529. package/components/TooltipComponent/style.js.map +1 -1
  530. package/components/TooltipComponent/style.mjs.map +1 -1
  531. package/hocs/withMergedProps.js.map +1 -1
  532. package/hocs/withTranslation.js.map +1 -1
  533. package/hocs/withTranslation.mjs.map +1 -1
  534. package/hooks/use-config-priority.js.map +1 -1
  535. package/hooks/use-config-priority.mjs.map +1 -1
  536. package/hooks/useClassname.js.map +1 -1
  537. package/hooks/useClickOutside.js.map +1 -1
  538. package/hooks/useFloaterPortal.js.map +1 -1
  539. package/hooks/useFloaterPortal.mjs.map +1 -1
  540. package/hooks/useMergedPalette.js.map +1 -1
  541. package/hooks/useMergedPalette.mjs.map +1 -1
  542. package/hooks/useMergedProps.js.map +1 -1
  543. package/hooks/useMergedSizes.js.map +1 -1
  544. package/hooks/useMergedSizes.mjs.map +1 -1
  545. package/hooks/useMountedStatus.js.map +1 -1
  546. package/hooks/useMountedStatus.mjs.map +1 -1
  547. package/hooks/useResizable.js.map +1 -1
  548. package/hooks/useResizable.mjs.map +1 -1
  549. package/hooks/useResizeObserver.js.map +1 -1
  550. package/hooks/useScrollMonitor.js.map +1 -1
  551. package/hooks/useScrollThresholds.js.map +1 -1
  552. package/hooks/useScrollThresholds.mjs.map +1 -1
  553. package/hooks/useThemeMergedProps.js.map +1 -1
  554. package/hooks/useThemeMergedProps.mjs.map +1 -1
  555. package/icon-pack/src/icons/ArrowUp/index.js.map +1 -1
  556. package/icon-pack/src/icons/CheckCircleFill/index.js.map +1 -1
  557. package/icon-pack/src/icons/CheckFill/index.js.map +1 -1
  558. package/icon-pack/src/icons/ChevronDown/index.js.map +1 -1
  559. package/icon-pack/src/icons/ChevronLeft/index.js.map +1 -1
  560. package/icon-pack/src/icons/ChevronRight/index.js.map +1 -1
  561. package/icon-pack/src/icons/Close/index.js.map +1 -1
  562. package/icon-pack/src/icons/CloseCirlceFill/index.js.map +1 -1
  563. package/icon-pack/src/icons/HelpCircle/index.js.map +1 -1
  564. package/icon-pack/src/icons/InfoCircle/index.js.map +1 -1
  565. package/icon-pack/src/icons/LoaderFill/index.js.map +1 -1
  566. package/icon-pack/src/icons/Minus/index.js.map +1 -1
  567. package/icon-pack/src/icons/MinusFill/index.js.map +1 -1
  568. package/icon-pack/src/icons/NotifFill/index.js.map +1 -1
  569. package/icon-pack/src/icons/Plus/index.js.map +1 -1
  570. package/icon-pack/src/icons/PlusLarge/index.js.map +1 -1
  571. package/icon-pack/src/icons/Redo/index.js.map +1 -1
  572. package/icon-pack/src/icons/ResizeHandle/index.js.map +1 -1
  573. package/icon-pack/src/icons/StarFill/index.js.map +1 -1
  574. package/icon-pack/src/icons/WarningTriangleFill/index.js.map +1 -1
  575. package/index.js +1 -1
  576. package/index.mjs +1 -1
  577. package/mixins/color.mjs.map +1 -1
  578. package/mixins/create-responsive-props.js.map +1 -1
  579. package/mixins/display.js.map +1 -1
  580. package/mixins/display.mjs.map +1 -1
  581. package/mixins/hover.mjs.map +1 -1
  582. package/mixins/responsive-layout.js.map +1 -1
  583. package/mixins/responsive-margin.js.map +1 -1
  584. package/mixins/responsive-margin.mjs.map +1 -1
  585. package/mixins/responsive-position.js.map +1 -1
  586. package/mixins/responsive-property.js.map +1 -1
  587. package/mixins/responsive-property.mjs +1 -1
  588. package/mixins/responsive-property.mjs.map +1 -1
  589. package/mixins/responsive-size.js.map +1 -1
  590. package/mixins/responsive-size.mjs.map +1 -1
  591. package/mixins/screen.js.map +1 -1
  592. package/mixins/screen.mjs.map +1 -1
  593. package/mixins/shared.js.map +1 -1
  594. package/mixins/shared.mjs.map +1 -1
  595. package/mixins/vAlign.js.map +1 -1
  596. package/package.json +2 -2
  597. package/shared/context/accordion.js.map +1 -1
  598. package/shared/context/tabList.js.map +1 -1
  599. package/shared/enums/sizeInput.mjs.map +1 -1
  600. package/shared/utils/dom.js.map +1 -1
  601. package/shared/utils/dom.mjs.map +1 -1
  602. package/shared/utils/isNil.mjs.map +1 -1
  603. package/shared/utils/misc.js.map +1 -1
  604. package/shared/utils/misc.mjs.map +1 -1
  605. package/shared/utils/react.js.map +1 -1
  606. package/shared/utils/style.js.map +1 -1
  607. package/theme/colors.js.map +1 -1
  608. package/theme/colors.mjs.map +1 -1
  609. package/theme/global-styled.js.map +1 -1
  610. package/theme/global-styled.mjs +1 -1
  611. package/theme/theme-provider.js.map +1 -1
  612. package/theme/themes.js.map +1 -1
  613. package/theme/themes.mjs +1 -1
  614. package/theme/themes.mjs.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"responsive-position.js","sources":["../../../src/mixins/responsive-position.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { CSSObject } from 'styled-components'\nimport { createResponsivePropsMixin } from 'mixins/create-responsive-props'\nimport type { ResponsiveProps } from 'mixins/create-responsive-props'\nimport type { Nullable } from 'shared/types'\n\ntype ResponsivePositionMixinInterpolationProps = ResponsiveProps<'position', string> & {\n positions: Record<string, CSSProperties>\n}\n\n/**\n *\n * Mixin enables responsive position interface\n */\nconst responsivePosition = createResponsivePropsMixin<\n 'position',\n Nullable<string>,\n ResponsivePositionMixinInterpolationProps\n>(['position'], (_, position, props) => {\n if (position === undefined || position === null) return {} as CSSObject\n\n return (props.positions[position] ?? {}) as CSSObject\n})\n\nexport { responsivePosition }\n"],"names":["responsivePosition","createResponsivePropsMixin","_","position","props","undefined","positions"],"mappings":"aAcA,MAAMA,2DAA+CC,2BAInD,CAAC,aAAa,CAACC,EAAGC,EAAUC,IACxBD,SAAaE,GAAaF,IAAa,KAAa,CAAA,EAEhDC,EAAME,UAAUH,IAAa,CAAA"}
1
+ {"version":3,"file":"responsive-position.js","sources":["../../../src/mixins/responsive-position.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { CSSObject } from 'styled-components'\nimport { createResponsivePropsMixin } from 'mixins/create-responsive-props'\nimport type { ResponsiveProps } from 'mixins/create-responsive-props'\nimport type { Nullable } from 'shared/types'\n\ntype ResponsivePositionMixinInterpolationProps = ResponsiveProps<'position', string> & {\n positions: Record<string, CSSProperties>\n}\n\n/**\n *\n * Mixin enables responsive position interface\n */\nconst responsivePosition = createResponsivePropsMixin<\n 'position',\n Nullable<string>,\n ResponsivePositionMixinInterpolationProps\n>(['position'], (_, position, props) => {\n if (position === undefined || position === null) return {} as CSSObject\n\n return (props.positions[position] ?? {}) as CSSObject\n})\n\nexport { responsivePosition }\n"],"names":["responsivePosition","createResponsivePropsMixin","_","position","props","undefined","positions"],"mappings":"aAcA,MAAMA,2DAAqBC,2BAIzB,CAAC,aAAa,CAACC,EAAGC,EAAUC,IACxBD,SAAaE,GAAaF,IAAa,KAAa,CAAA,EAEhDC,EAAME,UAAUH,IAAa,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"responsive-property.js","sources":["../../../src/mixins/responsive-property.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { FlattenSimpleInterpolation } from 'styled-components'\nimport { screenMaxL, screenMaxM, screenMaxS, screenMaxXs, screenMinL, screenMaxXxs, screenMinM } from 'mixins/screen'\nimport {\n buildMediaQuery,\n getLatinSizeMapByCssProperty,\n desktopFirst,\n getMediaQueryByResponsiveProp,\n} from 'mixins/shared'\nimport type { Size } from 'shared/types'\n\n/**\n * Value for breakpoint\n */\nexport type PossibleValues = number | Size | 'auto' | 'initial' | 'inherit' | boolean\n\ntype PropsProperties =\n | 'size'\n | 'fontSize'\n | 'height'\n | 'width'\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'padding'\n | 'paddingTop'\n | 'paddingRight'\n | 'paddingBottom'\n | 'paddingLeft'\n | 'margin'\n | 'marginTop'\n | 'marginRight'\n | 'marginBottom'\n | 'marginLeft'\n | 'fluid'\n\nexport type CalcProperty = (\n _size: number | 'auto' | 'initial' | 'inherit' | boolean,\n _sizing?: null | string\n) => FlattenSimpleInterpolation | null\ntype CssProperty = string | CalcProperty\ntype ResponsiveKeys = '' | 'XXS' | 'XS' | 'S' | 'M' | 'L' | 'XL'\n\nexport type ResponsiveNamedProperty<T extends PropsProperties, V extends PossibleValues = PossibleValues> = Partial<\n Record<`${T}${ResponsiveKeys}`, V>\n>\n\nexport type ResponsiveProperty<V = number | Size> =\n | V\n | [desktop: V, tablet: V, mobile: V]\n | [xl: V, l: V, m: V, s: V, xs: V, xxs: V]\n\nexport const property =\n (\n value: PossibleValues,\n cssProperty: CssProperty = 'size',\n sizing: null | string = 'px',\n sizes?: Record<Size, number>\n ) =>\n () =>\n () => {\n if (typeof value === 'boolean') {\n return typeof cssProperty === 'function' ? cssProperty(1) : null\n }\n\n const sizeMap = sizes ?? getLatinSizeMapByCssProperty(cssProperty)\n\n if (typeof cssProperty === 'function') {\n return cssProperty(typeof value === 'number' ? value : sizeMap[value as keyof typeof sizeMap])\n }\n\n if (typeof value === 'string' && ['auto', 'initial', 'inherit'].includes(value))\n return css`\n ${cssProperty}: ${value};\n `\n\n return css`\n ${cssProperty}: ${typeof value === 'string' && sizeMap[value as keyof typeof sizeMap]\n ? sizeMap[value as keyof typeof sizeMap]\n : value}${sizing ?? ''};\n `\n }\n\nconst SCREEN_SIZE_MAP: Record<Exclude<ResponsiveKeys, ''>, typeof screenMaxXs> = {\n XXS: screenMaxXxs,\n XS: screenMaxXs,\n S: screenMaxS,\n M: screenMaxM,\n L: screenMaxL,\n XL: screenMinL,\n}\n\nconst SCREEN_SIZE_MAP_BY_DEVICE_ALIAS: Record<'desktop' | 'tablet' | 'mobile', typeof screenMaxXs> = {\n desktop: screenMinM,\n tablet: screenMaxM,\n mobile: screenMaxS,\n}\n\ninterface ResponsiveNamedPropertyPayload<T extends PropsProperties> {\n sizes: ResponsiveNamedProperty<T>\n cssProperty: CssProperty\n sizing?: null | string\n customSizeHandler?: (_value: PossibleValues) => PossibleValues\n sort?: (_a: string, _b: string) => number\n predefinedSizes?: Record<Size, number>\n}\n\n/**\n * Миксин для генерации media запросов\n *\n * @param obj.sizes Объект, в качестве ключей брэйкпоинт, в качестве значений - величина\n * @param obj.cssProperty CSS свойство, может быть функцией, возвращающей css`` из styled-components\n * @param obj.sizing значение величины, по умолчанию `px`\n * @param obj.customSizeHandler функция для вычисления кастомных значений величин\n * @returns строки медиазапросов\n */\nexport const responsiveNamedProperty =\n <T extends PropsProperties>({\n sizes,\n predefinedSizes,\n cssProperty = 'size',\n sizing = 'px',\n customSizeHandler,\n sort = desktopFirst,\n }: ResponsiveNamedPropertyPayload<T>) =>\n () =>\n () => {\n const mediaCssStrArr = Object.keys(sizes)\n .sort(sort)\n .map((size) => {\n const value = sizes[size as keyof Required<typeof sizes>]\n\n if (value !== undefined) {\n const _size: PossibleValues = typeof customSizeHandler === 'function' ? customSizeHandler(value) : value\n\n return buildMediaQuery(_size, cssProperty, getMediaQueryByResponsiveProp(size), sizing, predefinedSizes)\n }\n return null\n })\n .filter(Boolean)\n .map(\n (item) => css`\n ${item}\n `\n )\n\n return mediaCssStrArr\n }\n\n/**\n * Миксин для генерации media запросов\n *\n * @param propName имя пропсы\n * @param cssProperty имя css свойства\n * @param sizing значение величины, по умолчанию `px`\n * @returns строки медиазапросов\n */\nexport const responsiveProperty =\n (propName: string, cssProperty: string | null = null, sizing: null | string = 'px') =>\n () =>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (props: any) => {\n const prop: ResponsiveProperty | null = props[propName] ?? null\n const _cssProperty = cssProperty ?? propName\n if (!prop) return null\n\n if (Array.isArray(prop) && prop.length === 3) {\n const [desktop, tablet, mobile] = prop\n return css`\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.desktop()`\n ${_cssProperty}: ${typeof desktop === 'number' ? `${desktop}${sizing ?? ''}` : desktop};\n `}\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.tablet()`\n ${_cssProperty}: ${typeof tablet === 'number' ? `${tablet}${sizing ?? ''}` : tablet};\n `}\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.mobile()`\n ${_cssProperty}: ${typeof mobile === 'number' ? `${mobile}${sizing ?? ''}` : mobile};\n `}\n `\n }\n\n if (Array.isArray(prop) && prop.length === 6 && typeof _cssProperty === 'string') {\n const [xl, l, m, s, xs, xxs] = prop\n return css`\n ${SCREEN_SIZE_MAP.XL()`\n ${_cssProperty}: ${typeof xl === 'number' ? `${xl}${sizing ?? ''}` : xl};\n `}\n ${SCREEN_SIZE_MAP.L()`\n ${_cssProperty}: ${typeof l === 'number' ? `${l}${sizing ?? ''}` : l};\n `}\n ${SCREEN_SIZE_MAP.M()`\n ${_cssProperty}: ${typeof m === 'number' ? `${m}${sizing ?? ''}` : m};\n `}\n ${SCREEN_SIZE_MAP.S()`\n ${_cssProperty}: ${typeof s === 'number' ? `${s}${sizing ?? ''}` : s};\n `}\n ${SCREEN_SIZE_MAP.XS()`\n ${_cssProperty}: ${typeof xs === 'number' ? `${xs}${sizing ?? ''}` : xs};\n `}\n ${SCREEN_SIZE_MAP.XXS()`\n ${_cssProperty}: ${typeof xxs === 'number' ? `${xxs}${sizing ?? ''}` : xxs};\n `}\n `\n }\n\n if (typeof prop === 'number') {\n return css`\n ${_cssProperty}: ${prop}${sizing ?? null};\n `\n }\n\n if (typeof prop === 'string') {\n return css`\n ${_cssProperty}: ${prop};\n `\n }\n\n return null\n }\n"],"names":["SCREEN_SIZE_MAP","XXS","screenMaxXxs","XS","screenMaxXs","S","screenMaxS","M","screenMaxM","L","screenMaxL","XL","screenMinL","SCREEN_SIZE_MAP_BY_DEVICE_ALIAS","desktop","screenMinM","tablet","mobile","property","value","cssProperty","sizing","sizes","sizeMap","getLatinSizeMapByCssProperty","includes","css","responsiveNamedProperty","predefinedSizes","customSizeHandler","sort","desktopFirst","Object","keys","map","size","undefined","_size","buildMediaQuery","getMediaQueryByResponsiveProp","filter","Boolean","item","responsiveProperty","propName","props","prop","_cssProperty","Array","isArray","length","xl","l","m","s","xs","xxs"],"mappings":"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"}
1
+ {"version":3,"file":"responsive-property.js","sources":["../../../src/mixins/responsive-property.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { FlattenSimpleInterpolation } from 'styled-components'\nimport { screenMaxL, screenMaxM, screenMaxS, screenMaxXs, screenMinL, screenMaxXxs, screenMinM } from 'mixins/screen'\nimport {\n buildMediaQuery,\n getLatinSizeMapByCssProperty,\n desktopFirst,\n getMediaQueryByResponsiveProp,\n} from 'mixins/shared'\nimport type { Size } from 'shared/types'\n\n/**\n * Value for breakpoint\n */\nexport type PossibleValues = number | Size | 'auto' | 'initial' | 'inherit' | boolean\n\ntype PropsProperties =\n | 'size'\n | 'fontSize'\n | 'height'\n | 'width'\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'padding'\n | 'paddingTop'\n | 'paddingRight'\n | 'paddingBottom'\n | 'paddingLeft'\n | 'margin'\n | 'marginTop'\n | 'marginRight'\n | 'marginBottom'\n | 'marginLeft'\n | 'fluid'\n\nexport type CalcProperty = (\n _size: number | 'auto' | 'initial' | 'inherit' | boolean,\n _sizing?: null | string\n) => FlattenSimpleInterpolation | null\ntype CssProperty = string | CalcProperty\ntype ResponsiveKeys = '' | 'XXS' | 'XS' | 'S' | 'M' | 'L' | 'XL'\n\nexport type ResponsiveNamedProperty<T extends PropsProperties, V extends PossibleValues = PossibleValues> = Partial<\n Record<`${T}${ResponsiveKeys}`, V>\n>\n\nexport type ResponsiveProperty<V = number | Size> =\n | V\n | [desktop: V, tablet: V, mobile: V]\n | [xl: V, l: V, m: V, s: V, xs: V, xxs: V]\n\nexport const property =\n (\n value: PossibleValues,\n cssProperty: CssProperty = 'size',\n sizing: null | string = 'px',\n sizes?: Record<Size, number>\n ) =>\n () =>\n () => {\n if (typeof value === 'boolean') {\n return typeof cssProperty === 'function' ? cssProperty(1) : null\n }\n\n const sizeMap = sizes ?? getLatinSizeMapByCssProperty(cssProperty)\n\n if (typeof cssProperty === 'function') {\n return cssProperty(typeof value === 'number' ? value : sizeMap[value as keyof typeof sizeMap])\n }\n\n if (typeof value === 'string' && ['auto', 'initial', 'inherit'].includes(value))\n return css`\n ${cssProperty}: ${value};\n `\n\n return css`\n ${cssProperty}: ${typeof value === 'string' && sizeMap[value as keyof typeof sizeMap]\n ? sizeMap[value as keyof typeof sizeMap]\n : value}${sizing ?? ''};\n `\n }\n\nconst SCREEN_SIZE_MAP: Record<Exclude<ResponsiveKeys, ''>, typeof screenMaxXs> = {\n XXS: screenMaxXxs,\n XS: screenMaxXs,\n S: screenMaxS,\n M: screenMaxM,\n L: screenMaxL,\n XL: screenMinL,\n}\n\nconst SCREEN_SIZE_MAP_BY_DEVICE_ALIAS: Record<'desktop' | 'tablet' | 'mobile', typeof screenMaxXs> = {\n desktop: screenMinM,\n tablet: screenMaxM,\n mobile: screenMaxS,\n}\n\ninterface ResponsiveNamedPropertyPayload<T extends PropsProperties> {\n sizes: ResponsiveNamedProperty<T>\n cssProperty: CssProperty\n sizing?: null | string\n customSizeHandler?: (_value: PossibleValues) => PossibleValues\n sort?: (_a: string, _b: string) => number\n predefinedSizes?: Record<Size, number>\n}\n\n/**\n * Миксин для генерации media запросов\n *\n * @param obj.sizes Объект, в качестве ключей брэйкпоинт, в качестве значений - величина\n * @param obj.cssProperty CSS свойство, может быть функцией, возвращающей css`` из styled-components\n * @param obj.sizing значение величины, по умолчанию `px`\n * @param obj.customSizeHandler функция для вычисления кастомных значений величин\n * @returns строки медиазапросов\n */\nexport const responsiveNamedProperty =\n <T extends PropsProperties>({\n sizes,\n predefinedSizes,\n cssProperty = 'size',\n sizing = 'px',\n customSizeHandler,\n sort = desktopFirst,\n }: ResponsiveNamedPropertyPayload<T>) =>\n () =>\n () => {\n const mediaCssStrArr = Object.keys(sizes)\n .sort(sort)\n .map((size) => {\n const value = sizes[size as keyof Required<typeof sizes>]\n\n if (value !== undefined) {\n const _size: PossibleValues = typeof customSizeHandler === 'function' ? customSizeHandler(value) : value\n\n return buildMediaQuery(_size, cssProperty, getMediaQueryByResponsiveProp(size), sizing, predefinedSizes)\n }\n return null\n })\n .filter(Boolean)\n .map(\n (item) => css`\n ${item}\n `\n )\n\n return mediaCssStrArr\n }\n\n/**\n * Миксин для генерации media запросов\n *\n * @param propName имя пропсы\n * @param cssProperty имя css свойства\n * @param sizing значение величины, по умолчанию `px`\n * @returns строки медиазапросов\n */\nexport const responsiveProperty =\n (propName: string, cssProperty: string | null = null, sizing: null | string = 'px') =>\n () =>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (props: any) => {\n const prop: ResponsiveProperty | null = props[propName] ?? null\n const _cssProperty = cssProperty ?? propName\n if (!prop) return null\n\n if (Array.isArray(prop) && prop.length === 3) {\n const [desktop, tablet, mobile] = prop\n return css`\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.desktop()`\n ${_cssProperty}: ${typeof desktop === 'number' ? `${desktop}${sizing ?? ''}` : desktop};\n `}\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.tablet()`\n ${_cssProperty}: ${typeof tablet === 'number' ? `${tablet}${sizing ?? ''}` : tablet};\n `}\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.mobile()`\n ${_cssProperty}: ${typeof mobile === 'number' ? `${mobile}${sizing ?? ''}` : mobile};\n `}\n `\n }\n\n if (Array.isArray(prop) && prop.length === 6 && typeof _cssProperty === 'string') {\n const [xl, l, m, s, xs, xxs] = prop\n return css`\n ${SCREEN_SIZE_MAP.XL()`\n ${_cssProperty}: ${typeof xl === 'number' ? `${xl}${sizing ?? ''}` : xl};\n `}\n ${SCREEN_SIZE_MAP.L()`\n ${_cssProperty}: ${typeof l === 'number' ? `${l}${sizing ?? ''}` : l};\n `}\n ${SCREEN_SIZE_MAP.M()`\n ${_cssProperty}: ${typeof m === 'number' ? `${m}${sizing ?? ''}` : m};\n `}\n ${SCREEN_SIZE_MAP.S()`\n ${_cssProperty}: ${typeof s === 'number' ? `${s}${sizing ?? ''}` : s};\n `}\n ${SCREEN_SIZE_MAP.XS()`\n ${_cssProperty}: ${typeof xs === 'number' ? `${xs}${sizing ?? ''}` : xs};\n `}\n ${SCREEN_SIZE_MAP.XXS()`\n ${_cssProperty}: ${typeof xxs === 'number' ? `${xxs}${sizing ?? ''}` : xxs};\n `}\n `\n }\n\n if (typeof prop === 'number') {\n return css`\n ${_cssProperty}: ${prop}${sizing ?? null};\n `\n }\n\n if (typeof prop === 'string') {\n return css`\n ${_cssProperty}: ${prop};\n `\n }\n\n return null\n }\n"],"names":["SCREEN_SIZE_MAP","XXS","screenMaxXxs","XS","screenMaxXs","S","screenMaxS","M","screenMaxM","L","screenMaxL","XL","screenMinL","SCREEN_SIZE_MAP_BY_DEVICE_ALIAS","desktop","screenMinM","tablet","mobile","property","value","cssProperty","sizing","sizes","sizeMap","getLatinSizeMapByCssProperty","includes","css","responsiveNamedProperty","predefinedSizes","customSizeHandler","sort","desktopFirst","Object","keys","map","size","undefined","_size","buildMediaQuery","getMediaQueryByResponsiveProp","filter","Boolean","item","responsiveProperty","propName","props","prop","_cssProperty","Array","isArray","length","xl","l","m","s","xs","xxs"],"mappings":"yHAoFA,MAAMA,gBAA2E,CAC/EC,IAAKC,OAAAA,aACLC,GAAIC,OAAAA,YACJC,EAAGC,OAAAA,WACHC,EAAGC,OAAAA,WACHC,EAAGC,OAAAA,WACHC,GAAIC,OAAAA,YAGN,MAAMC,gCAA+F,CACnGC,QAASC,OAAAA,WACTC,OAAQR,OAAAA,WACRS,OAAQX,OAAAA,6BA1CRY,CACEC,EACAC,EAA2B,OAC3BC,EAAwB,KACxBC,IAEF,IACA,KACE,UAAWH,GAAU,UACnB,cAAcC,GAAgB,WAAaA,EAAY,GAAK,KAG9D,MAAMG,EAAUD,GAASE,OAAAA,6BAA6BJ,GAEtD,cAAWA,GAAgB,WAClBA,SAAmBD,GAAU,SAAWA,EAAQI,EAAQJ,WAGtDA,GAAU,UAAY,CAAC,OAAQ,UAAW,WAAWM,SAASN,GAChEO,OAAAA,IAAG,CAAA,GAAA,IAAA,KACNN,EAAgBD,GAGfO,OAAAA,oBACHN,SAAuBD,GAAU,UAAYI,EAAQJ,GACnDI,EAAQJ,GACRA,EAAQE,GAAU,GAAE,kCAsC5BM,EACEL,QACAM,kBACAR,cAAc,OACdC,SAAS,KACTQ,oBACAC,OAAOC,OAAAA,gBAET,IACA,IACyBC,OAAOC,KAAKX,GAChCQ,KAAKA,GACLI,KAAKC,IACJ,MAAMhB,EAAQG,EAAMa,GAEpB,GAAIhB,SAAUiB,EAAW,CACvB,MAAMC,SAA+BR,GAAsB,WAAaA,EAAkBV,GAASA,EAEnG,OAAOmB,OAAAA,gBAAgBD,EAAOjB,EAAamB,OAAAA,8BAA8BJ,GAAOd,EAAQO,EAC1F,CACA,OAAO,IAAI,IAEZY,OAAOC,SACPP,KACEQ,GAAShB,OAAAA,IAAG,CAAA,GAAA,IACTgB,gCAgBVC,CAACC,EAAkBxB,EAA6B,KAAMC,EAAwB,OAC9E,IAECwB,IACC,MAAMC,EAAkCD,EAAMD,IAAa,KAC3D,MAAMG,EAAe3B,GAAewB,EACpC,IAAKE,EAAM,OAAO,KAElB,GAAIE,MAAMC,QAAQH,IAASA,EAAKI,SAAW,EAAG,CAC5C,MAAOpC,EAASE,EAAQC,GAAU6B,EAClC,OAAOpB,OAAAA,IAAG,CAAA,GAAA,IAAA,IAAA,IACNb,gCAAgCC,SAAS;YACvCiC,aAAwBjC,GAAY,SAAW,GAAGA,IAAUO,GAAU,KAAOP;UAE/ED,gCAAgCG,QAAQ;YACtC+B,aAAwB/B,GAAW,SAAW,GAAGA,IAASK,GAAU,KAAOL;UAE7EH,gCAAgCI,QAAQ;YACtC8B,aAAwB9B,GAAW,SAAW,GAAGA,IAASI,GAAU,KAAOJ;UAGnF,CAEA,GAAI+B,MAAMC,QAAQH,IAASA,EAAKI,SAAW,UAAYH,GAAiB,SAAU,CAChF,MAAOI,EAAIC,EAAGC,EAAGC,EAAGC,EAAIC,GAAOV,EAC/B,OAAOpB,WAAG,CAAA,GAAA,IAAA,IAAA,IAAA,IAAA,IAAA,IACN1B,gBAAgBW,IAAI;cAChBoC,aAAwBI,GAAO,SAAW,GAAGA,IAAK9B,GAAU,KAAO8B;YAEvEnD,gBAAgBS,GAAG;cACfsC,aAAwBK,GAAM,SAAW,GAAGA,IAAI/B,GAAU,KAAO+B;YAEnEpD,gBAAgBO,GAAG;cACjBwC,aAAwBM,GAAM,SAAW,GAAGA,IAAIhC,GAAU,KAAOgC;YAEnErD,gBAAgBK,GAAG;cACjB0C,aAAwBO,GAAM,SAAW,GAAGA,IAAIjC,GAAU,KAAOiC;YAEnEtD,gBAAgBG,IAAI;cAClB4C,aAAwBQ,GAAO,SAAW,GAAGA,IAAKlC,GAAU,KAAOkC;YAErEvD,gBAAgBC,KAAK;cACnB8C,aAAwBS,GAAQ,SAAW,GAAGA,IAAMnC,GAAU,KAAOmC;YAG/E,CAEA,cAAWV,GAAS,SACXpB,2BACHqB,EAAiBD,EAAOzB,GAAU,aAI7ByB,GAAS,SACXpB,OAAAA,IAAG,CAAA,GAAA,IAAA,KACNqB,EAAiBD,GAIhB,IAAI"}
@@ -1,4 +1,4 @@
1
- import{css}from'styled-components';import{screenMaxXxs,screenMaxXs,screenMaxS,screenMaxM,screenMaxL,screenMinL,screenMinM}from'./screen.mjs';import{buildMediaQuery,getMediaQueryByResponsiveProp,desktopFirst,getLatinSizeMapByCssProperty}from'./shared.mjs';const property=(e,r="size",s="px",n)=>()=>()=>{if(typeof e=='boolean')return typeof r=='function'?r(1):null;const t=n??getLatinSizeMapByCssProperty(r);return typeof r=='function'?r(typeof e=='number'?e:t[e]):typeof e=='string'&&['auto','initial','inherit'].includes(e)?css(["",":",";"],r,e):css(["",":","",";"],r,typeof e=='string'&&t[e]?t[e]:e,s??'')};const SCREEN_SIZE_MAP={XXS:screenMaxXxs,XS:screenMaxXs,S:screenMaxS,M:screenMaxM,L:screenMaxL,XL:screenMinL};const SCREEN_SIZE_MAP_BY_DEVICE_ALIAS={desktop:screenMinM,tablet:screenMaxM,mobile:screenMaxS};const responsiveNamedProperty=({sizes:e,predefinedSizes:r,cssProperty:s="size",sizing:n="px",customSizeHandler:t,sort:o=desktopFirst})=>()=>()=>Object.keys(e).sort(o).map((o=>{const i=e[o];if(i!==void 0){const e=typeof t=='function'?t(i):i;return buildMediaQuery(e,s,getMediaQueryByResponsiveProp(o),n,r)}return null})).filter(Boolean).map((e=>css(["",""],e)));const responsiveProperty=(e,r=null,s="px")=>()=>n=>{const t=n[e]??null;const o=r??e;if(!t)return null;if(Array.isArray(t)&&t.length===3){const[e,r,n]=t;return css([""," "," ",""],SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.desktop()`
1
+ import{css}from'styled-components';import{screenMinM,screenMaxS,screenMaxM,screenMinL,screenMaxL,screenMaxXs,screenMaxXxs}from'./screen.mjs';import{desktopFirst,buildMediaQuery,getMediaQueryByResponsiveProp,getLatinSizeMapByCssProperty}from'./shared.mjs';const property=(e,r="size",s="px",n)=>()=>()=>{if(typeof e=='boolean')return typeof r=='function'?r(1):null;const t=n??getLatinSizeMapByCssProperty(r);return typeof r=='function'?r(typeof e=='number'?e:t[e]):typeof e=='string'&&['auto','initial','inherit'].includes(e)?css(["",":",";"],r,e):css(["",":","",";"],r,typeof e=='string'&&t[e]?t[e]:e,s??'')};const SCREEN_SIZE_MAP={XXS:screenMaxXxs,XS:screenMaxXs,S:screenMaxS,M:screenMaxM,L:screenMaxL,XL:screenMinL};const SCREEN_SIZE_MAP_BY_DEVICE_ALIAS={desktop:screenMinM,tablet:screenMaxM,mobile:screenMaxS};const responsiveNamedProperty=({sizes:e,predefinedSizes:r,cssProperty:s="size",sizing:n="px",customSizeHandler:t,sort:o=desktopFirst})=>()=>()=>Object.keys(e).sort(o).map((o=>{const i=e[o];if(i!==void 0){const e=typeof t=='function'?t(i):i;return buildMediaQuery(e,s,getMediaQueryByResponsiveProp(o),n,r)}return null})).filter(Boolean).map((e=>css(["",""],e)));const responsiveProperty=(e,r=null,s="px")=>()=>n=>{const t=n[e]??null;const o=r??e;if(!t)return null;if(Array.isArray(t)&&t.length===3){const[e,r,n]=t;return css([""," "," ",""],SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.desktop()`
2
2
  ${o}: ${typeof e=='number'?`${e}${s??''}`:e};
3
3
  `,SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.tablet()`
4
4
  ${o}: ${typeof r=='number'?`${r}${s??''}`:r};
@@ -1 +1 @@
1
- {"version":3,"file":"responsive-property.mjs","sources":["../../../src/mixins/responsive-property.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { FlattenSimpleInterpolation } from 'styled-components'\nimport { screenMaxL, screenMaxM, screenMaxS, screenMaxXs, screenMinL, screenMaxXxs, screenMinM } from 'mixins/screen'\nimport {\n buildMediaQuery,\n getLatinSizeMapByCssProperty,\n desktopFirst,\n getMediaQueryByResponsiveProp,\n} from 'mixins/shared'\nimport type { Size } from 'shared/types'\n\n/**\n * Value for breakpoint\n */\nexport type PossibleValues = number | Size | 'auto' | 'initial' | 'inherit' | boolean\n\ntype PropsProperties =\n | 'size'\n | 'fontSize'\n | 'height'\n | 'width'\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'padding'\n | 'paddingTop'\n | 'paddingRight'\n | 'paddingBottom'\n | 'paddingLeft'\n | 'margin'\n | 'marginTop'\n | 'marginRight'\n | 'marginBottom'\n | 'marginLeft'\n | 'fluid'\n\nexport type CalcProperty = (\n _size: number | 'auto' | 'initial' | 'inherit' | boolean,\n _sizing?: null | string\n) => FlattenSimpleInterpolation | null\ntype CssProperty = string | CalcProperty\ntype ResponsiveKeys = '' | 'XXS' | 'XS' | 'S' | 'M' | 'L' | 'XL'\n\nexport type ResponsiveNamedProperty<T extends PropsProperties, V extends PossibleValues = PossibleValues> = Partial<\n Record<`${T}${ResponsiveKeys}`, V>\n>\n\nexport type ResponsiveProperty<V = number | Size> =\n | V\n | [desktop: V, tablet: V, mobile: V]\n | [xl: V, l: V, m: V, s: V, xs: V, xxs: V]\n\nexport const property =\n (\n value: PossibleValues,\n cssProperty: CssProperty = 'size',\n sizing: null | string = 'px',\n sizes?: Record<Size, number>\n ) =>\n () =>\n () => {\n if (typeof value === 'boolean') {\n return typeof cssProperty === 'function' ? cssProperty(1) : null\n }\n\n const sizeMap = sizes ?? getLatinSizeMapByCssProperty(cssProperty)\n\n if (typeof cssProperty === 'function') {\n return cssProperty(typeof value === 'number' ? value : sizeMap[value as keyof typeof sizeMap])\n }\n\n if (typeof value === 'string' && ['auto', 'initial', 'inherit'].includes(value))\n return css`\n ${cssProperty}: ${value};\n `\n\n return css`\n ${cssProperty}: ${typeof value === 'string' && sizeMap[value as keyof typeof sizeMap]\n ? sizeMap[value as keyof typeof sizeMap]\n : value}${sizing ?? ''};\n `\n }\n\nconst SCREEN_SIZE_MAP: Record<Exclude<ResponsiveKeys, ''>, typeof screenMaxXs> = {\n XXS: screenMaxXxs,\n XS: screenMaxXs,\n S: screenMaxS,\n M: screenMaxM,\n L: screenMaxL,\n XL: screenMinL,\n}\n\nconst SCREEN_SIZE_MAP_BY_DEVICE_ALIAS: Record<'desktop' | 'tablet' | 'mobile', typeof screenMaxXs> = {\n desktop: screenMinM,\n tablet: screenMaxM,\n mobile: screenMaxS,\n}\n\ninterface ResponsiveNamedPropertyPayload<T extends PropsProperties> {\n sizes: ResponsiveNamedProperty<T>\n cssProperty: CssProperty\n sizing?: null | string\n customSizeHandler?: (_value: PossibleValues) => PossibleValues\n sort?: (_a: string, _b: string) => number\n predefinedSizes?: Record<Size, number>\n}\n\n/**\n * Миксин для генерации media запросов\n *\n * @param obj.sizes Объект, в качестве ключей брэйкпоинт, в качестве значений - величина\n * @param obj.cssProperty CSS свойство, может быть функцией, возвращающей css`` из styled-components\n * @param obj.sizing значение величины, по умолчанию `px`\n * @param obj.customSizeHandler функция для вычисления кастомных значений величин\n * @returns строки медиазапросов\n */\nexport const responsiveNamedProperty =\n <T extends PropsProperties>({\n sizes,\n predefinedSizes,\n cssProperty = 'size',\n sizing = 'px',\n customSizeHandler,\n sort = desktopFirst,\n }: ResponsiveNamedPropertyPayload<T>) =>\n () =>\n () => {\n const mediaCssStrArr = Object.keys(sizes)\n .sort(sort)\n .map((size) => {\n const value = sizes[size as keyof Required<typeof sizes>]\n\n if (value !== undefined) {\n const _size: PossibleValues = typeof customSizeHandler === 'function' ? customSizeHandler(value) : value\n\n return buildMediaQuery(_size, cssProperty, getMediaQueryByResponsiveProp(size), sizing, predefinedSizes)\n }\n return null\n })\n .filter(Boolean)\n .map(\n (item) => css`\n ${item}\n `\n )\n\n return mediaCssStrArr\n }\n\n/**\n * Миксин для генерации media запросов\n *\n * @param propName имя пропсы\n * @param cssProperty имя css свойства\n * @param sizing значение величины, по умолчанию `px`\n * @returns строки медиазапросов\n */\nexport const responsiveProperty =\n (propName: string, cssProperty: string | null = null, sizing: null | string = 'px') =>\n () =>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (props: any) => {\n const prop: ResponsiveProperty | null = props[propName] ?? null\n const _cssProperty = cssProperty ?? propName\n if (!prop) return null\n\n if (Array.isArray(prop) && prop.length === 3) {\n const [desktop, tablet, mobile] = prop\n return css`\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.desktop()`\n ${_cssProperty}: ${typeof desktop === 'number' ? `${desktop}${sizing ?? ''}` : desktop};\n `}\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.tablet()`\n ${_cssProperty}: ${typeof tablet === 'number' ? `${tablet}${sizing ?? ''}` : tablet};\n `}\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.mobile()`\n ${_cssProperty}: ${typeof mobile === 'number' ? `${mobile}${sizing ?? ''}` : mobile};\n `}\n `\n }\n\n if (Array.isArray(prop) && prop.length === 6 && typeof _cssProperty === 'string') {\n const [xl, l, m, s, xs, xxs] = prop\n return css`\n ${SCREEN_SIZE_MAP.XL()`\n ${_cssProperty}: ${typeof xl === 'number' ? `${xl}${sizing ?? ''}` : xl};\n `}\n ${SCREEN_SIZE_MAP.L()`\n ${_cssProperty}: ${typeof l === 'number' ? `${l}${sizing ?? ''}` : l};\n `}\n ${SCREEN_SIZE_MAP.M()`\n ${_cssProperty}: ${typeof m === 'number' ? `${m}${sizing ?? ''}` : m};\n `}\n ${SCREEN_SIZE_MAP.S()`\n ${_cssProperty}: ${typeof s === 'number' ? `${s}${sizing ?? ''}` : s};\n `}\n ${SCREEN_SIZE_MAP.XS()`\n ${_cssProperty}: ${typeof xs === 'number' ? `${xs}${sizing ?? ''}` : xs};\n `}\n ${SCREEN_SIZE_MAP.XXS()`\n ${_cssProperty}: ${typeof xxs === 'number' ? `${xxs}${sizing ?? ''}` : xxs};\n `}\n `\n }\n\n if (typeof prop === 'number') {\n return css`\n ${_cssProperty}: ${prop}${sizing ?? null};\n `\n }\n\n if (typeof prop === 'string') {\n return css`\n ${_cssProperty}: ${prop};\n `\n }\n\n return null\n }\n"],"names":["property","value","cssProperty","sizing","sizes","sizeMap","getLatinSizeMapByCssProperty","includes","css","SCREEN_SIZE_MAP","XXS","screenMaxXxs","XS","screenMaxXs","S","screenMaxS","M","screenMaxM","L","screenMaxL","XL","screenMinL","SCREEN_SIZE_MAP_BY_DEVICE_ALIAS","desktop","screenMinM","tablet","mobile","responsiveNamedProperty","predefinedSizes","customSizeHandler","sort","desktopFirst","Object","keys","map","size","undefined","_size","buildMediaQuery","getMediaQueryByResponsiveProp","filter","Boolean","item","responsiveProperty","propName","props","prop","_cssProperty","Array","isArray","length","xl","l","m","s","xs","xxs"],"mappings":"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"}
1
+ {"version":3,"file":"responsive-property.mjs","sources":["../../../src/mixins/responsive-property.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { FlattenSimpleInterpolation } from 'styled-components'\nimport { screenMaxL, screenMaxM, screenMaxS, screenMaxXs, screenMinL, screenMaxXxs, screenMinM } from 'mixins/screen'\nimport {\n buildMediaQuery,\n getLatinSizeMapByCssProperty,\n desktopFirst,\n getMediaQueryByResponsiveProp,\n} from 'mixins/shared'\nimport type { Size } from 'shared/types'\n\n/**\n * Value for breakpoint\n */\nexport type PossibleValues = number | Size | 'auto' | 'initial' | 'inherit' | boolean\n\ntype PropsProperties =\n | 'size'\n | 'fontSize'\n | 'height'\n | 'width'\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'padding'\n | 'paddingTop'\n | 'paddingRight'\n | 'paddingBottom'\n | 'paddingLeft'\n | 'margin'\n | 'marginTop'\n | 'marginRight'\n | 'marginBottom'\n | 'marginLeft'\n | 'fluid'\n\nexport type CalcProperty = (\n _size: number | 'auto' | 'initial' | 'inherit' | boolean,\n _sizing?: null | string\n) => FlattenSimpleInterpolation | null\ntype CssProperty = string | CalcProperty\ntype ResponsiveKeys = '' | 'XXS' | 'XS' | 'S' | 'M' | 'L' | 'XL'\n\nexport type ResponsiveNamedProperty<T extends PropsProperties, V extends PossibleValues = PossibleValues> = Partial<\n Record<`${T}${ResponsiveKeys}`, V>\n>\n\nexport type ResponsiveProperty<V = number | Size> =\n | V\n | [desktop: V, tablet: V, mobile: V]\n | [xl: V, l: V, m: V, s: V, xs: V, xxs: V]\n\nexport const property =\n (\n value: PossibleValues,\n cssProperty: CssProperty = 'size',\n sizing: null | string = 'px',\n sizes?: Record<Size, number>\n ) =>\n () =>\n () => {\n if (typeof value === 'boolean') {\n return typeof cssProperty === 'function' ? cssProperty(1) : null\n }\n\n const sizeMap = sizes ?? getLatinSizeMapByCssProperty(cssProperty)\n\n if (typeof cssProperty === 'function') {\n return cssProperty(typeof value === 'number' ? value : sizeMap[value as keyof typeof sizeMap])\n }\n\n if (typeof value === 'string' && ['auto', 'initial', 'inherit'].includes(value))\n return css`\n ${cssProperty}: ${value};\n `\n\n return css`\n ${cssProperty}: ${typeof value === 'string' && sizeMap[value as keyof typeof sizeMap]\n ? sizeMap[value as keyof typeof sizeMap]\n : value}${sizing ?? ''};\n `\n }\n\nconst SCREEN_SIZE_MAP: Record<Exclude<ResponsiveKeys, ''>, typeof screenMaxXs> = {\n XXS: screenMaxXxs,\n XS: screenMaxXs,\n S: screenMaxS,\n M: screenMaxM,\n L: screenMaxL,\n XL: screenMinL,\n}\n\nconst SCREEN_SIZE_MAP_BY_DEVICE_ALIAS: Record<'desktop' | 'tablet' | 'mobile', typeof screenMaxXs> = {\n desktop: screenMinM,\n tablet: screenMaxM,\n mobile: screenMaxS,\n}\n\ninterface ResponsiveNamedPropertyPayload<T extends PropsProperties> {\n sizes: ResponsiveNamedProperty<T>\n cssProperty: CssProperty\n sizing?: null | string\n customSizeHandler?: (_value: PossibleValues) => PossibleValues\n sort?: (_a: string, _b: string) => number\n predefinedSizes?: Record<Size, number>\n}\n\n/**\n * Миксин для генерации media запросов\n *\n * @param obj.sizes Объект, в качестве ключей брэйкпоинт, в качестве значений - величина\n * @param obj.cssProperty CSS свойство, может быть функцией, возвращающей css`` из styled-components\n * @param obj.sizing значение величины, по умолчанию `px`\n * @param obj.customSizeHandler функция для вычисления кастомных значений величин\n * @returns строки медиазапросов\n */\nexport const responsiveNamedProperty =\n <T extends PropsProperties>({\n sizes,\n predefinedSizes,\n cssProperty = 'size',\n sizing = 'px',\n customSizeHandler,\n sort = desktopFirst,\n }: ResponsiveNamedPropertyPayload<T>) =>\n () =>\n () => {\n const mediaCssStrArr = Object.keys(sizes)\n .sort(sort)\n .map((size) => {\n const value = sizes[size as keyof Required<typeof sizes>]\n\n if (value !== undefined) {\n const _size: PossibleValues = typeof customSizeHandler === 'function' ? customSizeHandler(value) : value\n\n return buildMediaQuery(_size, cssProperty, getMediaQueryByResponsiveProp(size), sizing, predefinedSizes)\n }\n return null\n })\n .filter(Boolean)\n .map(\n (item) => css`\n ${item}\n `\n )\n\n return mediaCssStrArr\n }\n\n/**\n * Миксин для генерации media запросов\n *\n * @param propName имя пропсы\n * @param cssProperty имя css свойства\n * @param sizing значение величины, по умолчанию `px`\n * @returns строки медиазапросов\n */\nexport const responsiveProperty =\n (propName: string, cssProperty: string | null = null, sizing: null | string = 'px') =>\n () =>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (props: any) => {\n const prop: ResponsiveProperty | null = props[propName] ?? null\n const _cssProperty = cssProperty ?? propName\n if (!prop) return null\n\n if (Array.isArray(prop) && prop.length === 3) {\n const [desktop, tablet, mobile] = prop\n return css`\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.desktop()`\n ${_cssProperty}: ${typeof desktop === 'number' ? `${desktop}${sizing ?? ''}` : desktop};\n `}\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.tablet()`\n ${_cssProperty}: ${typeof tablet === 'number' ? `${tablet}${sizing ?? ''}` : tablet};\n `}\n ${SCREEN_SIZE_MAP_BY_DEVICE_ALIAS.mobile()`\n ${_cssProperty}: ${typeof mobile === 'number' ? `${mobile}${sizing ?? ''}` : mobile};\n `}\n `\n }\n\n if (Array.isArray(prop) && prop.length === 6 && typeof _cssProperty === 'string') {\n const [xl, l, m, s, xs, xxs] = prop\n return css`\n ${SCREEN_SIZE_MAP.XL()`\n ${_cssProperty}: ${typeof xl === 'number' ? `${xl}${sizing ?? ''}` : xl};\n `}\n ${SCREEN_SIZE_MAP.L()`\n ${_cssProperty}: ${typeof l === 'number' ? `${l}${sizing ?? ''}` : l};\n `}\n ${SCREEN_SIZE_MAP.M()`\n ${_cssProperty}: ${typeof m === 'number' ? `${m}${sizing ?? ''}` : m};\n `}\n ${SCREEN_SIZE_MAP.S()`\n ${_cssProperty}: ${typeof s === 'number' ? `${s}${sizing ?? ''}` : s};\n `}\n ${SCREEN_SIZE_MAP.XS()`\n ${_cssProperty}: ${typeof xs === 'number' ? `${xs}${sizing ?? ''}` : xs};\n `}\n ${SCREEN_SIZE_MAP.XXS()`\n ${_cssProperty}: ${typeof xxs === 'number' ? `${xxs}${sizing ?? ''}` : xxs};\n `}\n `\n }\n\n if (typeof prop === 'number') {\n return css`\n ${_cssProperty}: ${prop}${sizing ?? null};\n `\n }\n\n if (typeof prop === 'string') {\n return css`\n ${_cssProperty}: ${prop};\n `\n }\n\n return null\n }\n"],"names":["property","value","cssProperty","sizing","sizes","sizeMap","getLatinSizeMapByCssProperty","includes","css","SCREEN_SIZE_MAP","XXS","screenMaxXxs","XS","screenMaxXs","S","screenMaxS","M","screenMaxM","L","screenMaxL","XL","screenMinL","SCREEN_SIZE_MAP_BY_DEVICE_ALIAS","desktop","screenMinM","tablet","mobile","responsiveNamedProperty","predefinedSizes","customSizeHandler","sort","desktopFirst","Object","keys","map","size","undefined","_size","buildMediaQuery","getMediaQueryByResponsiveProp","filter","Boolean","item","responsiveProperty","propName","props","prop","_cssProperty","Array","isArray","length","xl","l","m","s","xs","xxs"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"responsive-size.js","sources":["../../../src/mixins/responsive-size.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { CSSObject } from 'styled-components'\nimport { createResponsivePropsMixin } from 'mixins/create-responsive-props'\nimport { isCSSGlobalValue } from 'shared/utils/style'\nimport type { ResponsiveProps } from 'mixins/create-responsive-props'\nimport type { CSSUnit, CSSGlobalValue } from 'shared/types'\n\ntype ResponsiveSizeMixinInterpolationProps = ResponsiveProps<'size', unknown> & {\n sizeUnits?: CSSUnit\n sizes: Record<string, CSSProperties>\n dynamicSizeDeclaration?: (size: number | CSSGlobalValue, sizeUnits: CSSUnit) => CSSObject\n}\n\n/**\n *\n * Mixin enables responsive size interface\n */\nconst responsiveSize = createResponsivePropsMixin<'size', unknown, ResponsiveSizeMixinInterpolationProps>(\n ['size'],\n (_, sizeValue, props) => {\n if (sizeValue === undefined || sizeValue === null) return {} as CSSObject\n\n if (typeof sizeValue === 'number' || isCSSGlobalValue(sizeValue)) {\n const cssObject =\n typeof props.dynamicSizeDeclaration === 'function'\n ? props.dynamicSizeDeclaration(sizeValue, props.sizeUnits ?? 'px')\n : { fontSize: typeof sizeValue === 'string' ? sizeValue : `${sizeValue}${props.sizeUnits ?? 'px'}` }\n\n return cssObject\n }\n\n if (typeof sizeValue === 'string') {\n return (props.sizes[sizeValue] ?? {}) as CSSObject\n }\n\n return {} as CSSObject\n }\n)\n\nexport { responsiveSize }\n"],"names":["responsiveSize","createResponsivePropsMixin","_","sizeValue","props","undefined","isCSSGlobalValue","dynamicSizeDeclaration","sizeUnits","fontSize","sizes"],"mappings":"6HAiBA,MAAMA,eAAiBC,sBAA0BA,2BAC/C,CAAC,SACD,CAACC,EAAGC,EAAWC,IACTD,SAAcE,GAAaF,IAAc,KAAa,CAAA,SAE/CA,GAAc,UAAYG,MAAgBA,iBAACH,UAE3CC,EAAMG,wBAA2B,WACpCH,EAAMG,uBAAuBJ,EAAWC,EAAMI,WAAa,MAC3D,CAAEC,gBAAiBN,GAAc,SAAWA,EAAY,GAAGA,IAAYC,EAAMI,WAAa,eAKvFL,GAAc,SACfC,EAAMM,MAAMP,IAAc,CAAA,EAG7B"}
1
+ {"version":3,"file":"responsive-size.js","sources":["../../../src/mixins/responsive-size.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { CSSObject } from 'styled-components'\nimport { createResponsivePropsMixin } from 'mixins/create-responsive-props'\nimport { isCSSGlobalValue } from 'shared/utils/style'\nimport type { ResponsiveProps } from 'mixins/create-responsive-props'\nimport type { CSSUnit, CSSGlobalValue } from 'shared/types'\n\ntype ResponsiveSizeMixinInterpolationProps = ResponsiveProps<'size', unknown> & {\n sizeUnits?: CSSUnit\n sizes: Record<string, CSSProperties>\n dynamicSizeDeclaration?: (size: number | CSSGlobalValue, sizeUnits: CSSUnit) => CSSObject\n}\n\n/**\n *\n * Mixin enables responsive size interface\n */\nconst responsiveSize = createResponsivePropsMixin<'size', unknown, ResponsiveSizeMixinInterpolationProps>(\n ['size'],\n (_, sizeValue, props) => {\n if (sizeValue === undefined || sizeValue === null) return {} as CSSObject\n\n if (typeof sizeValue === 'number' || isCSSGlobalValue(sizeValue)) {\n const cssObject =\n typeof props.dynamicSizeDeclaration === 'function'\n ? props.dynamicSizeDeclaration(sizeValue, props.sizeUnits ?? 'px')\n : { fontSize: typeof sizeValue === 'string' ? sizeValue : `${sizeValue}${props.sizeUnits ?? 'px'}` }\n\n return cssObject\n }\n\n if (typeof sizeValue === 'string') {\n return (props.sizes[sizeValue] ?? {}) as CSSObject\n }\n\n return {} as CSSObject\n }\n)\n\nexport { responsiveSize }\n"],"names":["responsiveSize","createResponsivePropsMixin","_","sizeValue","props","undefined","isCSSGlobalValue","dynamicSizeDeclaration","sizeUnits","fontSize","sizes"],"mappings":"6HAiBA,MAAMA,eAAiBC,sBAAAA,2BACrB,CAAC,SACD,CAACC,EAAGC,EAAWC,IACTD,SAAcE,GAAaF,IAAc,KAAa,CAAA,SAE/CA,GAAc,UAAYG,MAAAA,iBAAiBH,UAE3CC,EAAMG,wBAA2B,WACpCH,EAAMG,uBAAuBJ,EAAWC,EAAMI,WAAa,MAC3D,CAAEC,gBAAiBN,GAAc,SAAWA,EAAY,GAAGA,IAAYC,EAAMI,WAAa,eAKvFL,GAAc,SACfC,EAAMM,MAAMP,IAAc,CAAA,EAG7B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"responsive-size.mjs","sources":["../../../src/mixins/responsive-size.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { CSSObject } from 'styled-components'\nimport { createResponsivePropsMixin } from 'mixins/create-responsive-props'\nimport { isCSSGlobalValue } from 'shared/utils/style'\nimport type { ResponsiveProps } from 'mixins/create-responsive-props'\nimport type { CSSUnit, CSSGlobalValue } from 'shared/types'\n\ntype ResponsiveSizeMixinInterpolationProps = ResponsiveProps<'size', unknown> & {\n sizeUnits?: CSSUnit\n sizes: Record<string, CSSProperties>\n dynamicSizeDeclaration?: (size: number | CSSGlobalValue, sizeUnits: CSSUnit) => CSSObject\n}\n\n/**\n *\n * Mixin enables responsive size interface\n */\nconst responsiveSize = createResponsivePropsMixin<'size', unknown, ResponsiveSizeMixinInterpolationProps>(\n ['size'],\n (_, sizeValue, props) => {\n if (sizeValue === undefined || sizeValue === null) return {} as CSSObject\n\n if (typeof sizeValue === 'number' || isCSSGlobalValue(sizeValue)) {\n const cssObject =\n typeof props.dynamicSizeDeclaration === 'function'\n ? props.dynamicSizeDeclaration(sizeValue, props.sizeUnits ?? 'px')\n : { fontSize: typeof sizeValue === 'string' ? sizeValue : `${sizeValue}${props.sizeUnits ?? 'px'}` }\n\n return cssObject\n }\n\n if (typeof sizeValue === 'string') {\n return (props.sizes[sizeValue] ?? {}) as CSSObject\n }\n\n return {} as CSSObject\n }\n)\n\nexport { responsiveSize }\n"],"names":["responsiveSize","createResponsivePropsMixin","_","sizeValue","props","undefined","isCSSGlobalValue","dynamicSizeDeclaration","sizeUnits","fontSize","sizes"],"mappings":"8HAiBA,MAAMA,eAAiBC,2BACrB,CAAC,SACD,CAACC,EAAGC,EAAWC,IACTD,SAAcE,GAAaF,IAAc,KAAa,CAAA,SAE/CA,GAAc,UAAYG,iBAAiBH,UAE3CC,EAAMG,wBAA2B,WACpCH,EAAMG,uBAAuBJ,EAAWC,EAAMI,WAAa,MAC3D,CAAEC,gBAAiBN,GAAc,SAAWA,EAAY,GAAGA,IAAYC,EAAMI,WAAa,eAKvFL,GAAc,SACfC,EAAMM,MAAMP,IAAc,CAAA,EAG7B"}
1
+ {"version":3,"file":"responsive-size.mjs","sources":["../../../src/mixins/responsive-size.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { CSSObject } from 'styled-components'\nimport { createResponsivePropsMixin } from 'mixins/create-responsive-props'\nimport { isCSSGlobalValue } from 'shared/utils/style'\nimport type { ResponsiveProps } from 'mixins/create-responsive-props'\nimport type { CSSUnit, CSSGlobalValue } from 'shared/types'\n\ntype ResponsiveSizeMixinInterpolationProps = ResponsiveProps<'size', unknown> & {\n sizeUnits?: CSSUnit\n sizes: Record<string, CSSProperties>\n dynamicSizeDeclaration?: (size: number | CSSGlobalValue, sizeUnits: CSSUnit) => CSSObject\n}\n\n/**\n *\n * Mixin enables responsive size interface\n */\nconst responsiveSize = createResponsivePropsMixin<'size', unknown, ResponsiveSizeMixinInterpolationProps>(\n ['size'],\n (_, sizeValue, props) => {\n if (sizeValue === undefined || sizeValue === null) return {} as CSSObject\n\n if (typeof sizeValue === 'number' || isCSSGlobalValue(sizeValue)) {\n const cssObject =\n typeof props.dynamicSizeDeclaration === 'function'\n ? props.dynamicSizeDeclaration(sizeValue, props.sizeUnits ?? 'px')\n : { fontSize: typeof sizeValue === 'string' ? sizeValue : `${sizeValue}${props.sizeUnits ?? 'px'}` }\n\n return cssObject\n }\n\n if (typeof sizeValue === 'string') {\n return (props.sizes[sizeValue] ?? {}) as CSSObject\n }\n\n return {} as CSSObject\n }\n)\n\nexport { responsiveSize }\n"],"names":["responsiveSize","createResponsivePropsMixin","_","sizeValue","props","undefined","isCSSGlobalValue","dynamicSizeDeclaration","sizeUnits","fontSize","sizes"],"mappings":"8HAiBA,MAAMA,eAAiBC,2BACrB,CAAC,SACD,CAACC,EAAGC,EAAWC,IACTD,SAAcE,GAAaF,IAAc,KAAa,CAAA,SAE/CA,GAAc,UAAYG,iBAAiBH,UAE3CC,EAAMG,wBAA2B,WACpCH,EAAMG,uBAAuBJ,EAAWC,EAAMI,WAAa,MAC3D,CAAEC,gBAAiBN,GAAc,SAAWA,EAAY,GAAGA,IAAYC,EAAMI,WAAa,eAKvFL,GAAc,SACfC,EAAMM,MAAMP,IAAc,CAAA,EAG7B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"screen.js","sources":["../../../src/mixins/screen.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { CSSObject, ThemeProps, DefaultTheme, SimpleInterpolation, Interpolation } from 'styled-components'\nimport { BREAKPOINTS } from 'shared/constants'\n\ntype MediaQueryParams = {\n and?: string\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n condition?: (_props: any) => boolean\n}\n\ntype ThemeBreakpoints = DefaultTheme['breakpoints']\n\ntype BreakpointKey = keyof ThemeBreakpoints\n\nconst CONDITIONS = (() => {\n const maxWidth = (breakpoints: ThemeBreakpoints, point: BreakpointKey) =>\n `(max-width: ${breakpoints[point] - 0.02}px)`\n const minWidth = (breakpoints: ThemeBreakpoints, point: BreakpointKey) => `(min-width: ${breakpoints[point]}px)`\n\n return {\n MAX: maxWidth,\n MIN: minWidth,\n RANGE: (breakpoints: ThemeBreakpoints, point1: BreakpointKey, point2: BreakpointKey) =>\n `${minWidth(breakpoints, point1)} and ${maxWidth(breakpoints, point2)}`,\n }\n})()\n\nexport const createMediaQuery =\n (condition: (_breakpoints: ThemeBreakpoints, ..._points: BreakpointKey[]) => string, ...points: BreakpointKey[]) =>\n (params?: MediaQueryParams) =>\n <T extends object>(...args: [CSSObject | TemplateStringsArray, ...Interpolation<T & ThemeProps<DefaultTheme>>[]]) =>\n (props: ThemeProps<DefaultTheme>) => {\n const contextBreakpoints = props.theme?.breakpoints ?? {}\n const breakpoints: ThemeBreakpoints = { ...BREAKPOINTS, ...contextBreakpoints }\n\n if (params !== undefined && typeof params.condition === 'function' && params.condition(props) === false) {\n return ''\n }\n\n return css<T>`\n /* stylelint-disable-next-line media-query-no-invalid */\n @media screen and ${condition(breakpoints, ...points)} ${params !== undefined && typeof params.and === 'string'\n ? `and ${params.and}`\n : ``} {\n ${css<T>(...args)}\n }\n `\n }\n\n/**\n * @return `@media screen and (min-width: 320px) and (max-width: 374px) { ...args }`\n */\nexport const screenXs = createMediaQuery(CONDITIONS.RANGE, 'xxs', 'xs')\n\n/**\n * @return `@media screen and (min-width: 375px) and (max-width: 767px) { ...args }`\n */\nexport const screenS = createMediaQuery(CONDITIONS.RANGE, 'xs', 's')\n\n/**\n * @return `@media screen and (min-width: 768) and (max-width: 1023px) { ...args }`\n */\nexport const screenM = createMediaQuery(CONDITIONS.RANGE, 's', 'm')\n\n/**\n * @return `@media screen and (min-width: 1024px) and (max-width: 1279px) { ...args }`\n */\nexport const screenL = createMediaQuery(CONDITIONS.RANGE, 'm', 'l')\n\n/**\n * @return `@media screen and (min-width: 1280px) and (max-width: 1439px) { ...args }`\n */\nexport const screenXl = createMediaQuery(CONDITIONS.RANGE, 'l', 'xl')\n\n/**\n * @return `@media screen and (max-width: 319px) { ...args }`\n */\nexport const screenMaxXxs = createMediaQuery(CONDITIONS.MAX, 'xxs')\n\n/**\n * @return `@media screen and (max-width: 374px) { ...args }`\n */\nexport const screenMaxXs = createMediaQuery(CONDITIONS.MAX, 'xs')\n\n/**\n * @return `@media screen and (min-width: 375px) { ...args }`\n */\nexport const screenMinXs = createMediaQuery(CONDITIONS.MIN, 'xs')\n\n/**\n * @return `@media screen and (max-width: 767px) { ...args }`\n */\nexport const screenMaxS = createMediaQuery(CONDITIONS.MAX, 's')\n\n/**\n * @return `@media screen and (min-width: 768px) { ...args }`\n */\nexport const screenMinS = createMediaQuery(CONDITIONS.MIN, 's')\n\n/**\n * @return `@media screen and (max-width: 1023px) { ...args }`\n */\nexport const screenMaxM = createMediaQuery(CONDITIONS.MAX, 'm')\n\n/**\n * @return `@media screen and (min-width: 1024px) { ...args }`\n */\nexport const screenMinM = createMediaQuery(CONDITIONS.MIN, 'm')\n\n/**\n * @return `@media screen and (max-width: 1279px) { ...args }`\n */\nexport const screenMaxL = createMediaQuery(CONDITIONS.MAX, 'l')\n\n/**\n * @return `@media screen and (min-width: 1280px) { ...args }`\n */\nexport const screenMinL = createMediaQuery(CONDITIONS.MIN, 'l')\n\n/**\n * @return `@media screen and (max-width: 1439px) { ...args }`\n */\nexport const screenMaxXl = createMediaQuery(CONDITIONS.MAX, 'xl')\n\n/**\n * @return `@media screen and (min-width: 1440px) { ...args }`\n */\nexport const screenMinXl = createMediaQuery(CONDITIONS.MIN, 'xl')\n\n/**\n * @return `@media -webkit-min-device-pixel-ratio: 2 and (min-resolution: 192dpi) { ...args }`\n */\nexport const screenRetina = (...args: [CSSObject | TemplateStringsArray, SimpleInterpolation]) => css`\n @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {\n ${css(...args)}\n }\n`\n\nexport type MediaQuery = ReturnType<typeof createMediaQuery>\n"],"names":["CONDITIONS","maxWidth","breakpoints","point","minWidth","MAX","MIN","RANGE","point1","point2","createMediaQuery","condition","points","params","args","props","BREAKPOINTS","theme","undefined","css","and","screenXs","screenS","screenM","screenL","screenXl","screenMaxXxs","screenMaxXs","screenMinXs","screenMaxS","screenMinS","screenMaxM","screenMinM","screenMaxL","screenMinL","screenMaxXl","screenMinXl","screenRetina"],"mappings":"qGAcA,MAAMA,WAAa,MACjB,MAAMC,SAAWA,CAACC,EAA+BC,IAC/C,eAAeD,EAAYC,GAAS,SACtC,MAAMC,SAAWA,CAACF,EAA+BC,IAAyB,eAAeD,EAAYC,QAErG,MAAO,CACLE,IAAKJ,SACLK,IAAKF,SACLG,MAAOA,CAACL,EAA+BM,EAAuBC,IAC5D,GAAGL,SAASF,EAAaM,UAAeP,SAASC,EAAaO,KAEnE,EAXkB,SAaNC,iBACXA,CAACC,KAAuFC,IACvFC,GACD,IAAsBC,IACrBC,IAEC,MAAMb,EAAgC,IAAKc,UAAWA,eAD3BD,EAAME,OAAOf,aAAe,CAAA,GAGvD,OAAIW,SAAWK,UAAoBL,EAAOF,WAAc,YAAcE,EAAOF,UAAUI,MAAW,EACzF,GAGFI,WAAG,CAAA,qBAAA,IAAA,IAAA,KAEYR,EAAUT,KAAgBU,GAAWC,SAAWK,UAAoBL,EAAOO,KAAQ,SACjG,OAAOP,EAAOO,MACd,GACFD,OAAAA,OAAUL,GAAK,EAQZO,MAAAA,SAAWX,iBAAiBV,WAAWO,MAAO,MAAO,MAKrDe,MAAAA,QAAUZ,iBAAiBV,WAAWO,MAAO,KAAM,KAKnDgB,MAAAA,QAAUb,iBAAiBV,WAAWO,MAAO,IAAK,KAKlDiB,MAAAA,QAAUd,iBAAiBV,WAAWO,MAAO,IAAK,KAKlDkB,MAAAA,SAAWf,iBAAiBV,WAAWO,MAAO,IAAK,MAKzD,MAAMmB,aAAehB,iBAAiBV,WAAWK,IAAK,OAKtD,MAAMsB,YAAcjB,iBAAiBV,WAAWK,IAAK,MAKrD,MAAMuB,YAAclB,iBAAiBV,WAAWM,IAAK,MAKrD,MAAMuB,WAAanB,iBAAiBV,WAAWK,IAAK,KAKpD,MAAMyB,WAAapB,iBAAiBV,WAAWM,IAAK,KAKpD,MAAMyB,WAAarB,iBAAiBV,WAAWK,IAAK,KAKpD,MAAM2B,WAAatB,iBAAiBV,WAAWM,IAAK,KAKpD,MAAM2B,WAAavB,iBAAiBV,WAAWK,IAAK,KAKpD,MAAM6B,WAAaxB,iBAAiBV,WAAWM,IAAK,KAKpD,MAAM6B,YAAczB,iBAAiBV,WAAWK,IAAK,MAKrD,MAAM+B,YAAc1B,iBAAiBV,WAAWM,IAAK,2cAKhC+B,IAAIvB,IAAkEK,WAAG,CAAA,qEAAA,KAE/FA,cAAOL"}
1
+ {"version":3,"file":"screen.js","sources":["../../../src/mixins/screen.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { CSSObject, ThemeProps, DefaultTheme, SimpleInterpolation, Interpolation } from 'styled-components'\nimport { BREAKPOINTS } from 'shared/constants'\n\ntype MediaQueryParams = {\n and?: string\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n condition?: (_props: any) => boolean\n}\n\ntype ThemeBreakpoints = DefaultTheme['breakpoints']\n\ntype BreakpointKey = keyof ThemeBreakpoints\n\nconst CONDITIONS = (() => {\n const maxWidth = (breakpoints: ThemeBreakpoints, point: BreakpointKey) =>\n `(max-width: ${breakpoints[point] - 0.02}px)`\n const minWidth = (breakpoints: ThemeBreakpoints, point: BreakpointKey) => `(min-width: ${breakpoints[point]}px)`\n\n return {\n MAX: maxWidth,\n MIN: minWidth,\n RANGE: (breakpoints: ThemeBreakpoints, point1: BreakpointKey, point2: BreakpointKey) =>\n `${minWidth(breakpoints, point1)} and ${maxWidth(breakpoints, point2)}`,\n }\n})()\n\nexport const createMediaQuery =\n (condition: (_breakpoints: ThemeBreakpoints, ..._points: BreakpointKey[]) => string, ...points: BreakpointKey[]) =>\n (params?: MediaQueryParams) =>\n <T extends object>(...args: [CSSObject | TemplateStringsArray, ...Interpolation<T & ThemeProps<DefaultTheme>>[]]) =>\n (props: ThemeProps<DefaultTheme>) => {\n const contextBreakpoints = props.theme?.breakpoints ?? {}\n const breakpoints: ThemeBreakpoints = { ...BREAKPOINTS, ...contextBreakpoints }\n\n if (params !== undefined && typeof params.condition === 'function' && params.condition(props) === false) {\n return ''\n }\n\n return css<T>`\n /* stylelint-disable-next-line media-query-no-invalid */\n @media screen and ${condition(breakpoints, ...points)} ${params !== undefined && typeof params.and === 'string'\n ? `and ${params.and}`\n : ``} {\n ${css<T>(...args)}\n }\n `\n }\n\n/**\n * @return `@media screen and (min-width: 320px) and (max-width: 374px) { ...args }`\n */\nexport const screenXs = createMediaQuery(CONDITIONS.RANGE, 'xxs', 'xs')\n\n/**\n * @return `@media screen and (min-width: 375px) and (max-width: 767px) { ...args }`\n */\nexport const screenS = createMediaQuery(CONDITIONS.RANGE, 'xs', 's')\n\n/**\n * @return `@media screen and (min-width: 768) and (max-width: 1023px) { ...args }`\n */\nexport const screenM = createMediaQuery(CONDITIONS.RANGE, 's', 'm')\n\n/**\n * @return `@media screen and (min-width: 1024px) and (max-width: 1279px) { ...args }`\n */\nexport const screenL = createMediaQuery(CONDITIONS.RANGE, 'm', 'l')\n\n/**\n * @return `@media screen and (min-width: 1280px) and (max-width: 1439px) { ...args }`\n */\nexport const screenXl = createMediaQuery(CONDITIONS.RANGE, 'l', 'xl')\n\n/**\n * @return `@media screen and (max-width: 319px) { ...args }`\n */\nexport const screenMaxXxs = createMediaQuery(CONDITIONS.MAX, 'xxs')\n\n/**\n * @return `@media screen and (max-width: 374px) { ...args }`\n */\nexport const screenMaxXs = createMediaQuery(CONDITIONS.MAX, 'xs')\n\n/**\n * @return `@media screen and (min-width: 375px) { ...args }`\n */\nexport const screenMinXs = createMediaQuery(CONDITIONS.MIN, 'xs')\n\n/**\n * @return `@media screen and (max-width: 767px) { ...args }`\n */\nexport const screenMaxS = createMediaQuery(CONDITIONS.MAX, 's')\n\n/**\n * @return `@media screen and (min-width: 768px) { ...args }`\n */\nexport const screenMinS = createMediaQuery(CONDITIONS.MIN, 's')\n\n/**\n * @return `@media screen and (max-width: 1023px) { ...args }`\n */\nexport const screenMaxM = createMediaQuery(CONDITIONS.MAX, 'm')\n\n/**\n * @return `@media screen and (min-width: 1024px) { ...args }`\n */\nexport const screenMinM = createMediaQuery(CONDITIONS.MIN, 'm')\n\n/**\n * @return `@media screen and (max-width: 1279px) { ...args }`\n */\nexport const screenMaxL = createMediaQuery(CONDITIONS.MAX, 'l')\n\n/**\n * @return `@media screen and (min-width: 1280px) { ...args }`\n */\nexport const screenMinL = createMediaQuery(CONDITIONS.MIN, 'l')\n\n/**\n * @return `@media screen and (max-width: 1439px) { ...args }`\n */\nexport const screenMaxXl = createMediaQuery(CONDITIONS.MAX, 'xl')\n\n/**\n * @return `@media screen and (min-width: 1440px) { ...args }`\n */\nexport const screenMinXl = createMediaQuery(CONDITIONS.MIN, 'xl')\n\n/**\n * @return `@media -webkit-min-device-pixel-ratio: 2 and (min-resolution: 192dpi) { ...args }`\n */\nexport const screenRetina = (...args: [CSSObject | TemplateStringsArray, SimpleInterpolation]) => css`\n @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {\n ${css(...args)}\n }\n`\n\nexport type MediaQuery = ReturnType<typeof createMediaQuery>\n"],"names":["CONDITIONS","maxWidth","breakpoints","point","minWidth","MAX","MIN","RANGE","point1","point2","createMediaQuery","condition","points","params","args","props","BREAKPOINTS","theme","undefined","css","and","screenXs","screenS","screenM","screenL","screenXl","screenMaxXxs","screenMaxXs","screenMinXs","screenMaxS","screenMinS","screenMaxM","screenMinM","screenMaxL","screenMinL","screenMaxXl","screenMinXl","screenRetina"],"mappings":"qGAcA,MAAMA,WAAa,MACjB,MAAMC,SAAWA,CAACC,EAA+BC,IAC/C,eAAeD,EAAYC,GAAS,SACtC,MAAMC,SAAWA,CAACF,EAA+BC,IAAyB,eAAeD,EAAYC,QAErG,MAAO,CACLE,IAAKJ,SACLK,IAAKF,SACLG,MAAOA,CAACL,EAA+BM,EAAuBC,IAC5D,GAAGL,SAASF,EAAaM,UAAeP,SAASC,EAAaO,KAEnE,EAXkB,SAaNC,iBACXA,CAACC,KAAuFC,IACvFC,GACD,IAAsBC,IACrBC,IAEC,MAAMb,EAAgC,IAAKc,UAAAA,eADhBD,EAAME,OAAOf,aAAe,CAAA,GAGvD,OAAIW,SAAWK,UAAoBL,EAAOF,WAAc,YAAcE,EAAOF,UAAUI,MAAW,EACzF,GAGFI,WAAG,CAAA,qBAAA,IAAA,IAAA,KAEYR,EAAUT,KAAgBU,GAAWC,SAAWK,UAAoBL,EAAOO,KAAQ,SACjG,OAAOP,EAAOO,MACd,GACFD,cAAUL,GAAK,EAQlB,MAAMO,SAAWX,iBAAiBV,WAAWO,MAAO,MAAO,MAK3D,MAAMe,QAAUZ,iBAAiBV,WAAWO,MAAO,KAAM,KAKzD,MAAMgB,QAAUb,iBAAiBV,WAAWO,MAAO,IAAK,KAKxD,MAAMiB,QAAUd,iBAAiBV,WAAWO,MAAO,IAAK,KAKxD,MAAMkB,SAAWf,iBAAiBV,WAAWO,MAAO,IAAK,MAKzD,MAAMmB,aAAehB,iBAAiBV,WAAWK,IAAK,OAKtD,MAAMsB,YAAcjB,iBAAiBV,WAAWK,IAAK,MAKrD,MAAMuB,YAAclB,iBAAiBV,WAAWM,IAAK,MAKrD,MAAMuB,WAAanB,iBAAiBV,WAAWK,IAAK,KAKpD,MAAMyB,WAAapB,iBAAiBV,WAAWM,IAAK,KAKpD,MAAMyB,WAAarB,iBAAiBV,WAAWK,IAAK,KAKpD,MAAM2B,WAAatB,iBAAiBV,WAAWM,IAAK,KAKpD,MAAM2B,WAAavB,iBAAiBV,WAAWK,IAAK,KAKpD,MAAM6B,WAAaxB,iBAAiBV,WAAWM,IAAK,KAKpD,MAAM6B,YAAczB,iBAAiBV,WAAWK,IAAK,MAKrD,MAAM+B,YAAc1B,iBAAiBV,WAAWM,IAAK,2cAKhC+B,IAAIvB,IAAkEK,WAAG,CAAA,qEAAA,KAE/FA,cAAOL"}
@@ -1 +1 @@
1
- {"version":3,"file":"screen.mjs","sources":["../../../src/mixins/screen.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { CSSObject, ThemeProps, DefaultTheme, SimpleInterpolation, Interpolation } from 'styled-components'\nimport { BREAKPOINTS } from 'shared/constants'\n\ntype MediaQueryParams = {\n and?: string\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n condition?: (_props: any) => boolean\n}\n\ntype ThemeBreakpoints = DefaultTheme['breakpoints']\n\ntype BreakpointKey = keyof ThemeBreakpoints\n\nconst CONDITIONS = (() => {\n const maxWidth = (breakpoints: ThemeBreakpoints, point: BreakpointKey) =>\n `(max-width: ${breakpoints[point] - 0.02}px)`\n const minWidth = (breakpoints: ThemeBreakpoints, point: BreakpointKey) => `(min-width: ${breakpoints[point]}px)`\n\n return {\n MAX: maxWidth,\n MIN: minWidth,\n RANGE: (breakpoints: ThemeBreakpoints, point1: BreakpointKey, point2: BreakpointKey) =>\n `${minWidth(breakpoints, point1)} and ${maxWidth(breakpoints, point2)}`,\n }\n})()\n\nexport const createMediaQuery =\n (condition: (_breakpoints: ThemeBreakpoints, ..._points: BreakpointKey[]) => string, ...points: BreakpointKey[]) =>\n (params?: MediaQueryParams) =>\n <T extends object>(...args: [CSSObject | TemplateStringsArray, ...Interpolation<T & ThemeProps<DefaultTheme>>[]]) =>\n (props: ThemeProps<DefaultTheme>) => {\n const contextBreakpoints = props.theme?.breakpoints ?? {}\n const breakpoints: ThemeBreakpoints = { ...BREAKPOINTS, ...contextBreakpoints }\n\n if (params !== undefined && typeof params.condition === 'function' && params.condition(props) === false) {\n return ''\n }\n\n return css<T>`\n /* stylelint-disable-next-line media-query-no-invalid */\n @media screen and ${condition(breakpoints, ...points)} ${params !== undefined && typeof params.and === 'string'\n ? `and ${params.and}`\n : ``} {\n ${css<T>(...args)}\n }\n `\n }\n\n/**\n * @return `@media screen and (min-width: 320px) and (max-width: 374px) { ...args }`\n */\nexport const screenXs = createMediaQuery(CONDITIONS.RANGE, 'xxs', 'xs')\n\n/**\n * @return `@media screen and (min-width: 375px) and (max-width: 767px) { ...args }`\n */\nexport const screenS = createMediaQuery(CONDITIONS.RANGE, 'xs', 's')\n\n/**\n * @return `@media screen and (min-width: 768) and (max-width: 1023px) { ...args }`\n */\nexport const screenM = createMediaQuery(CONDITIONS.RANGE, 's', 'm')\n\n/**\n * @return `@media screen and (min-width: 1024px) and (max-width: 1279px) { ...args }`\n */\nexport const screenL = createMediaQuery(CONDITIONS.RANGE, 'm', 'l')\n\n/**\n * @return `@media screen and (min-width: 1280px) and (max-width: 1439px) { ...args }`\n */\nexport const screenXl = createMediaQuery(CONDITIONS.RANGE, 'l', 'xl')\n\n/**\n * @return `@media screen and (max-width: 319px) { ...args }`\n */\nexport const screenMaxXxs = createMediaQuery(CONDITIONS.MAX, 'xxs')\n\n/**\n * @return `@media screen and (max-width: 374px) { ...args }`\n */\nexport const screenMaxXs = createMediaQuery(CONDITIONS.MAX, 'xs')\n\n/**\n * @return `@media screen and (min-width: 375px) { ...args }`\n */\nexport const screenMinXs = createMediaQuery(CONDITIONS.MIN, 'xs')\n\n/**\n * @return `@media screen and (max-width: 767px) { ...args }`\n */\nexport const screenMaxS = createMediaQuery(CONDITIONS.MAX, 's')\n\n/**\n * @return `@media screen and (min-width: 768px) { ...args }`\n */\nexport const screenMinS = createMediaQuery(CONDITIONS.MIN, 's')\n\n/**\n * @return `@media screen and (max-width: 1023px) { ...args }`\n */\nexport const screenMaxM = createMediaQuery(CONDITIONS.MAX, 'm')\n\n/**\n * @return `@media screen and (min-width: 1024px) { ...args }`\n */\nexport const screenMinM = createMediaQuery(CONDITIONS.MIN, 'm')\n\n/**\n * @return `@media screen and (max-width: 1279px) { ...args }`\n */\nexport const screenMaxL = createMediaQuery(CONDITIONS.MAX, 'l')\n\n/**\n * @return `@media screen and (min-width: 1280px) { ...args }`\n */\nexport const screenMinL = createMediaQuery(CONDITIONS.MIN, 'l')\n\n/**\n * @return `@media screen and (max-width: 1439px) { ...args }`\n */\nexport const screenMaxXl = createMediaQuery(CONDITIONS.MAX, 'xl')\n\n/**\n * @return `@media screen and (min-width: 1440px) { ...args }`\n */\nexport const screenMinXl = createMediaQuery(CONDITIONS.MIN, 'xl')\n\n/**\n * @return `@media -webkit-min-device-pixel-ratio: 2 and (min-resolution: 192dpi) { ...args }`\n */\nexport const screenRetina = (...args: [CSSObject | TemplateStringsArray, SimpleInterpolation]) => css`\n @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {\n ${css(...args)}\n }\n`\n\nexport type MediaQuery = ReturnType<typeof createMediaQuery>\n"],"names":["CONDITIONS","maxWidth","breakpoints","point","minWidth","MAX","MIN","RANGE","point1","point2","createMediaQuery","condition","points","params","args","props","BREAKPOINTS","theme","undefined","css","and","screenXs","screenS","screenM","screenL","screenXl","screenMaxXxs","screenMaxXs","screenMinXs","screenMaxS","screenMinS","screenMaxM","screenMinM","screenMaxL","screenMinL","screenMaxXl","screenMinXl","screenRetina"],"mappings":"oFAcA,MAAMA,WAAa,MACjB,MAAMC,SAAWA,CAACC,EAA+BC,IAC/C,eAAeD,EAAYC,GAAS,SACtC,MAAMC,SAAWA,CAACF,EAA+BC,IAAyB,eAAeD,EAAYC,QAErG,MAAO,CACLE,IAAKJ,SACLK,IAAKF,SACLG,MAAOA,CAACL,EAA+BM,EAAuBC,IAC5D,GAAGL,SAASF,EAAaM,UAAeP,SAASC,EAAaO,KAEnE,EAXkB,SAaNC,iBACXA,CAACC,KAAuFC,IACvFC,GACD,IAAsBC,IACrBC,IAEC,MAAMb,EAAgC,IAAKc,eADhBD,EAAME,OAAOf,aAAe,CAAA,GAGvD,OAAIW,SAAWK,UAAoBL,EAAOF,WAAc,YAAcE,EAAOF,UAAUI,MAAW,EACzF,GAGFI,IAAG,CAAA,qBAAA,IAAA,IAAA,KAEYR,EAAUT,KAAgBU,GAAWC,SAAWK,UAAoBL,EAAOO,KAAQ,SACjG,OAAOP,EAAOO,MACd,GACFD,OAAUL,GAAK,EAQZO,MAAAA,SAAWX,iBAAiBV,WAAWO,MAAO,MAAO,MAKrDe,MAAAA,QAAUZ,iBAAiBV,WAAWO,MAAO,KAAM,KAKnDgB,MAAAA,QAAUb,iBAAiBV,WAAWO,MAAO,IAAK,KAKlDiB,MAAAA,QAAUd,iBAAiBV,WAAWO,MAAO,IAAK,KAKlDkB,MAAAA,SAAWf,iBAAiBV,WAAWO,MAAO,IAAK,MAKzD,MAAMmB,aAAehB,iBAAiBV,WAAWK,IAAK,OAKtD,MAAMsB,YAAcjB,iBAAiBV,WAAWK,IAAK,MAKrD,MAAMuB,YAAclB,iBAAiBV,WAAWM,IAAK,MAKrD,MAAMuB,WAAanB,iBAAiBV,WAAWK,IAAK,KAKpD,MAAMyB,WAAapB,iBAAiBV,WAAWM,IAAK,KAKpD,MAAMyB,WAAarB,iBAAiBV,WAAWK,IAAK,KAKpD,MAAM2B,WAAatB,iBAAiBV,WAAWM,IAAK,KAKpD,MAAM2B,WAAavB,iBAAiBV,WAAWK,IAAK,KAKpD,MAAM6B,WAAaxB,iBAAiBV,WAAWM,IAAK,KAKpD,MAAM6B,YAAczB,iBAAiBV,WAAWK,IAAK,MAKrD,MAAM+B,YAAc1B,iBAAiBV,WAAWM,IAAK,MAK/C+B,MAAAA,aAAeA,IAAIvB,IAAkEK,IAAG,CAAA,qEAAA,KAE/FA,OAAOL"}
1
+ {"version":3,"file":"screen.mjs","sources":["../../../src/mixins/screen.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { CSSObject, ThemeProps, DefaultTheme, SimpleInterpolation, Interpolation } from 'styled-components'\nimport { BREAKPOINTS } from 'shared/constants'\n\ntype MediaQueryParams = {\n and?: string\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n condition?: (_props: any) => boolean\n}\n\ntype ThemeBreakpoints = DefaultTheme['breakpoints']\n\ntype BreakpointKey = keyof ThemeBreakpoints\n\nconst CONDITIONS = (() => {\n const maxWidth = (breakpoints: ThemeBreakpoints, point: BreakpointKey) =>\n `(max-width: ${breakpoints[point] - 0.02}px)`\n const minWidth = (breakpoints: ThemeBreakpoints, point: BreakpointKey) => `(min-width: ${breakpoints[point]}px)`\n\n return {\n MAX: maxWidth,\n MIN: minWidth,\n RANGE: (breakpoints: ThemeBreakpoints, point1: BreakpointKey, point2: BreakpointKey) =>\n `${minWidth(breakpoints, point1)} and ${maxWidth(breakpoints, point2)}`,\n }\n})()\n\nexport const createMediaQuery =\n (condition: (_breakpoints: ThemeBreakpoints, ..._points: BreakpointKey[]) => string, ...points: BreakpointKey[]) =>\n (params?: MediaQueryParams) =>\n <T extends object>(...args: [CSSObject | TemplateStringsArray, ...Interpolation<T & ThemeProps<DefaultTheme>>[]]) =>\n (props: ThemeProps<DefaultTheme>) => {\n const contextBreakpoints = props.theme?.breakpoints ?? {}\n const breakpoints: ThemeBreakpoints = { ...BREAKPOINTS, ...contextBreakpoints }\n\n if (params !== undefined && typeof params.condition === 'function' && params.condition(props) === false) {\n return ''\n }\n\n return css<T>`\n /* stylelint-disable-next-line media-query-no-invalid */\n @media screen and ${condition(breakpoints, ...points)} ${params !== undefined && typeof params.and === 'string'\n ? `and ${params.and}`\n : ``} {\n ${css<T>(...args)}\n }\n `\n }\n\n/**\n * @return `@media screen and (min-width: 320px) and (max-width: 374px) { ...args }`\n */\nexport const screenXs = createMediaQuery(CONDITIONS.RANGE, 'xxs', 'xs')\n\n/**\n * @return `@media screen and (min-width: 375px) and (max-width: 767px) { ...args }`\n */\nexport const screenS = createMediaQuery(CONDITIONS.RANGE, 'xs', 's')\n\n/**\n * @return `@media screen and (min-width: 768) and (max-width: 1023px) { ...args }`\n */\nexport const screenM = createMediaQuery(CONDITIONS.RANGE, 's', 'm')\n\n/**\n * @return `@media screen and (min-width: 1024px) and (max-width: 1279px) { ...args }`\n */\nexport const screenL = createMediaQuery(CONDITIONS.RANGE, 'm', 'l')\n\n/**\n * @return `@media screen and (min-width: 1280px) and (max-width: 1439px) { ...args }`\n */\nexport const screenXl = createMediaQuery(CONDITIONS.RANGE, 'l', 'xl')\n\n/**\n * @return `@media screen and (max-width: 319px) { ...args }`\n */\nexport const screenMaxXxs = createMediaQuery(CONDITIONS.MAX, 'xxs')\n\n/**\n * @return `@media screen and (max-width: 374px) { ...args }`\n */\nexport const screenMaxXs = createMediaQuery(CONDITIONS.MAX, 'xs')\n\n/**\n * @return `@media screen and (min-width: 375px) { ...args }`\n */\nexport const screenMinXs = createMediaQuery(CONDITIONS.MIN, 'xs')\n\n/**\n * @return `@media screen and (max-width: 767px) { ...args }`\n */\nexport const screenMaxS = createMediaQuery(CONDITIONS.MAX, 's')\n\n/**\n * @return `@media screen and (min-width: 768px) { ...args }`\n */\nexport const screenMinS = createMediaQuery(CONDITIONS.MIN, 's')\n\n/**\n * @return `@media screen and (max-width: 1023px) { ...args }`\n */\nexport const screenMaxM = createMediaQuery(CONDITIONS.MAX, 'm')\n\n/**\n * @return `@media screen and (min-width: 1024px) { ...args }`\n */\nexport const screenMinM = createMediaQuery(CONDITIONS.MIN, 'm')\n\n/**\n * @return `@media screen and (max-width: 1279px) { ...args }`\n */\nexport const screenMaxL = createMediaQuery(CONDITIONS.MAX, 'l')\n\n/**\n * @return `@media screen and (min-width: 1280px) { ...args }`\n */\nexport const screenMinL = createMediaQuery(CONDITIONS.MIN, 'l')\n\n/**\n * @return `@media screen and (max-width: 1439px) { ...args }`\n */\nexport const screenMaxXl = createMediaQuery(CONDITIONS.MAX, 'xl')\n\n/**\n * @return `@media screen and (min-width: 1440px) { ...args }`\n */\nexport const screenMinXl = createMediaQuery(CONDITIONS.MIN, 'xl')\n\n/**\n * @return `@media -webkit-min-device-pixel-ratio: 2 and (min-resolution: 192dpi) { ...args }`\n */\nexport const screenRetina = (...args: [CSSObject | TemplateStringsArray, SimpleInterpolation]) => css`\n @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {\n ${css(...args)}\n }\n`\n\nexport type MediaQuery = ReturnType<typeof createMediaQuery>\n"],"names":["CONDITIONS","maxWidth","breakpoints","point","minWidth","MAX","MIN","RANGE","point1","point2","createMediaQuery","condition","points","params","args","props","BREAKPOINTS","theme","undefined","css","and","screenXs","screenS","screenM","screenL","screenXl","screenMaxXxs","screenMaxXs","screenMinXs","screenMaxS","screenMinS","screenMaxM","screenMinM","screenMaxL","screenMinL","screenMaxXl","screenMinXl","screenRetina"],"mappings":"oFAcA,MAAMA,WAAa,MACjB,MAAMC,SAAWA,CAACC,EAA+BC,IAC/C,eAAeD,EAAYC,GAAS,SACtC,MAAMC,SAAWA,CAACF,EAA+BC,IAAyB,eAAeD,EAAYC,QAErG,MAAO,CACLE,IAAKJ,SACLK,IAAKF,SACLG,MAAOA,CAACL,EAA+BM,EAAuBC,IAC5D,GAAGL,SAASF,EAAaM,UAAeP,SAASC,EAAaO,KAEnE,EAXkB,SAaNC,iBACXA,CAACC,KAAuFC,IACvFC,GACD,IAAsBC,IACrBC,IAEC,MAAMb,EAAgC,IAAKc,eADhBD,EAAME,OAAOf,aAAe,CAAA,GAGvD,OAAIW,SAAWK,UAAoBL,EAAOF,WAAc,YAAcE,EAAOF,UAAUI,MAAW,EACzF,GAGFI,IAAG,CAAA,qBAAA,IAAA,IAAA,KAEYR,EAAUT,KAAgBU,GAAWC,SAAWK,UAAoBL,EAAOO,KAAQ,SACjG,OAAOP,EAAOO,MACd,GACFD,OAAUL,GAAK,EAQlB,MAAMO,SAAWX,iBAAiBV,WAAWO,MAAO,MAAO,MAK3D,MAAMe,QAAUZ,iBAAiBV,WAAWO,MAAO,KAAM,KAKzD,MAAMgB,QAAUb,iBAAiBV,WAAWO,MAAO,IAAK,KAKxD,MAAMiB,QAAUd,iBAAiBV,WAAWO,MAAO,IAAK,KAKxD,MAAMkB,SAAWf,iBAAiBV,WAAWO,MAAO,IAAK,MAKzD,MAAMmB,aAAehB,iBAAiBV,WAAWK,IAAK,OAKtD,MAAMsB,YAAcjB,iBAAiBV,WAAWK,IAAK,MAKrD,MAAMuB,YAAclB,iBAAiBV,WAAWM,IAAK,MAKrD,MAAMuB,WAAanB,iBAAiBV,WAAWK,IAAK,KAKpD,MAAMyB,WAAapB,iBAAiBV,WAAWM,IAAK,KAKpD,MAAMyB,WAAarB,iBAAiBV,WAAWK,IAAK,KAKpD,MAAM2B,WAAatB,iBAAiBV,WAAWM,IAAK,KAKpD,MAAM2B,WAAavB,iBAAiBV,WAAWK,IAAK,KAKpD,MAAM6B,WAAaxB,iBAAiBV,WAAWM,IAAK,KAKpD,MAAM6B,YAAczB,iBAAiBV,WAAWK,IAAK,MAKrD,MAAM+B,YAAc1B,iBAAiBV,WAAWM,IAAK,MAKrD,MAAM+B,aAAeA,IAAIvB,IAAkEK,IAAG,CAAA,qEAAA,KAE/FA,OAAOL"}
@@ -1 +1 @@
1
- {"version":3,"file":"shared.js","sources":["../../../src/mixins/shared.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { FlattenSimpleInterpolation } from 'styled-components'\nimport type { Size } from 'shared/types'\nimport { screenMaxL, screenMaxM, screenMaxS, screenMaxXs, screenMinL, screenMaxXxs } from './screen'\nimport type { MediaQuery, screenXs } from './screen'\n\nexport const SIZES_LATIN: Readonly<Record<Size, number>> = Object.freeze({\n xxxl: 44,\n xxl: 40,\n xl: 36,\n l: 28,\n m: 24,\n s: 20,\n xs: 16,\n xxs: 8,\n xxxs: 4,\n})\n\nexport const FONT_SIZES_LATIN: Readonly<Record<Size, number>> = Object.freeze({\n xxxl: 24,\n xxl: 22,\n xl: 20,\n l: 18,\n m: 16,\n s: 14,\n xs: 12,\n xxs: 10,\n xxxs: 8,\n})\n\nconst DESKTOP_FIRST_KEYS = ['xl', 'l', 'm', 's', 'xs', 'xxs']\nconst MOBILE_FIRST_KEYS = ['xxs', 'xs', 's', 'm', 'l', 'xl']\n\nexport function getLatinSizeMapByCssProperty<T>(cssProperty: T) {\n if (typeof cssProperty === 'string' && cssProperty === 'font-size') return FONT_SIZES_LATIN\n return SIZES_LATIN\n}\n\nexport function buildMediaQuery(\n value: number | Size | 'auto' | 'initial' | 'inherit' | boolean,\n property:\n | string\n | ((\n _size: number | 'auto' | 'initial' | 'inherit' | boolean,\n _sizing?: null | string\n ) => FlattenSimpleInterpolation | null),\n screenQueryFunction: typeof screenXs,\n sizing: null | string,\n sizes?: Record<Size, number>\n): ReturnType<typeof css> {\n const sizeMap = sizes ?? getLatinSizeMapByCssProperty(property)\n\n const size = typeof value === 'string' ? (sizeMap[value as keyof typeof sizeMap] ?? value) : value\n\n if (typeof property === 'function') {\n return css`\n ${screenQueryFunction()`\n ${property(size, sizing)}\n `}\n `\n }\n\n return css`\n ${screenQueryFunction()`\n ${property}: ${String(size)}${typeof size === 'string' ? '' : (sizing ?? '')};\n `}\n `\n}\n\nconst getKey = (key: string): 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | null => {\n if (key.endsWith('XXS')) return 'xxs'\n if (key.endsWith('XS')) return 'xs'\n if (key.endsWith('S')) return 's'\n if (key.endsWith('M')) return 'm'\n if (key.endsWith('XL')) return 'xl'\n if (key.endsWith('L')) return 'l'\n return null\n}\n\nexport const desktopFirst = (a: string, b: string): number => {\n const aKey = getKey(a)\n const bKey = getKey(b)\n if (!aKey || !bKey) return 0\n\n const aIndex = DESKTOP_FIRST_KEYS.findIndex((el) => el === aKey)\n const bIndex = DESKTOP_FIRST_KEYS.findIndex((el) => el === bKey)\n\n return aIndex < bIndex ? -1 : 1\n}\n\nexport const mobileFirst = (a: string, b: string): number => {\n const aKey = getKey(a)\n const bKey = getKey(b)\n if (!aKey || !bKey) return 0\n\n const aIndex = MOBILE_FIRST_KEYS.findIndex((el) => el === aKey)\n const bIndex = MOBILE_FIRST_KEYS.findIndex((el) => el === bKey)\n\n return aIndex < bIndex ? -1 : 1\n}\n\nexport const getMediaQueryByResponsiveProp = (prop: string): MediaQuery => {\n if (prop.endsWith('XXS')) return screenMaxXxs\n if (prop.endsWith('XS')) return screenMaxXs\n if (prop.endsWith('S')) return screenMaxS\n if (prop.endsWith('M')) return screenMaxM\n if (prop.endsWith('XL')) return screenMinL\n return screenMaxL\n}\n"],"names":["SIZES_LATIN","Object","freeze","xxxl","xxl","xl","l","m","s","xs","xxs","xxxs","FONT_SIZES_LATIN","DESKTOP_FIRST_KEYS","MOBILE_FIRST_KEYS","getLatinSizeMapByCssProperty","cssProperty","getKey","key","endsWith","value","property","screenQueryFunction","sizing","sizes","sizeMap","size","css","String","desktopFirst","a","b","aKey","bKey","findIndex","el","prop","screenMaxXxs","screenMaxXs","screenMaxS","screenMaxM","screenMinL","screenMaxL","mobileFirst"],"mappings":"6FAMaA,YAA8CC,OAAOC,OAAO,CACvEC,KAAM,GACNC,IAAK,GACLC,GAAI,GACJC,EAAG,GACHC,EAAG,GACHC,EAAG,GACHC,GAAI,GACJC,IAAK,EACLC,KAAM,UAGKC,iBAAmDX,OAAOC,OAAO,CAC5EC,KAAM,GACNC,IAAK,GACLC,GAAI,GACJC,EAAG,GACHC,EAAG,GACHC,EAAG,GACHC,GAAI,GACJC,IAAK,GACLC,KAAM,IAGR,MAAME,mBAAqB,CAAC,KAAM,IAAK,IAAK,IAAK,KAAM,OACvD,MAAMC,kBAAoB,CAAC,MAAO,KAAM,IAAK,IAAK,IAAK,MAEhD,SAASC,6BAAgCC,GAC9C,cAAWA,GAAgB,UAAYA,IAAgB,YAAoBJ,iBACpEZ,WACT,CAiCA,MAAMiB,OAAUC,GACVA,EAAIC,SAAS,OAAe,MAC5BD,EAAIC,SAAS,MAAc,KAC3BD,EAAIC,SAAS,KAAa,IAC1BD,EAAIC,SAAS,KAAa,IAC1BD,EAAIC,SAAS,MAAc,KAC3BD,EAAIC,SAAS,KAAa,IACvB,uGAtCF,CACLC,EACAC,EAMAC,EACAC,EACAC,KAEA,MAAMC,EAAUD,GAAST,6BAA6BM,GAEtD,MAAMK,SAAcN,GAAU,SAAYK,EAAQL,IAAkCA,EAASA,EAE7F,OACSO,OAAGA,IAAA,CAAA,GAAA,WADDN,GAAa,WAElBC,GAAqB;UACnBD,EAASK,EAAMH;QAMnBD,GAAqB;QACnBD,MAAaO,OAAOF,YAAeA,GAAS,SAAW,GAAMH,GAAU;MAG/E,uBAY4BM,CAACC,EAAWC,KACtC,MAAMC,EAAOf,OAAOa,GACpB,MAAMG,EAAOhB,OAAOc,GACpB,OAAKC,GAASC,EAECpB,mBAAmBqB,WAAWC,GAAOA,IAAOH,IAC5CnB,mBAAmBqB,WAAWC,GAAOA,IAAOF,KAEjC,EAAI,EALH,CAKI,0GAcaG,GACxCA,EAAKjB,SAAS,OAAekB,OAAAA,aAC7BD,EAAKjB,SAAS,MAAcmB,OAAAA,YAC5BF,EAAKjB,SAAS,KAAaoB,OAAAA,WAC3BH,EAAKjB,SAAS,KAAaqB,OAAAA,WAC3BJ,EAAKjB,SAAS,MAAcsB,OAAAA,WACzBC,sCAjBkBC,CAACb,EAAWC,KACrC,MAAMC,EAAOf,OAAOa,GACpB,MAAMG,EAAOhB,OAAOc,GACpB,OAAKC,GAASC,EAECnB,kBAAkBoB,WAAWC,GAAOA,IAAOH,IAC3ClB,kBAAkBoB,WAAWC,GAAOA,IAAOF,KAEhC,EAAI,EALH,CAKI"}
1
+ {"version":3,"file":"shared.js","sources":["../../../src/mixins/shared.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { FlattenSimpleInterpolation } from 'styled-components'\nimport type { Size } from 'shared/types'\nimport { screenMaxL, screenMaxM, screenMaxS, screenMaxXs, screenMinL, screenMaxXxs } from './screen'\nimport type { MediaQuery, screenXs } from './screen'\n\nexport const SIZES_LATIN: Readonly<Record<Size, number>> = Object.freeze({\n xxxl: 44,\n xxl: 40,\n xl: 36,\n l: 28,\n m: 24,\n s: 20,\n xs: 16,\n xxs: 8,\n xxxs: 4,\n})\n\nexport const FONT_SIZES_LATIN: Readonly<Record<Size, number>> = Object.freeze({\n xxxl: 24,\n xxl: 22,\n xl: 20,\n l: 18,\n m: 16,\n s: 14,\n xs: 12,\n xxs: 10,\n xxxs: 8,\n})\n\nconst DESKTOP_FIRST_KEYS = ['xl', 'l', 'm', 's', 'xs', 'xxs']\nconst MOBILE_FIRST_KEYS = ['xxs', 'xs', 's', 'm', 'l', 'xl']\n\nexport function getLatinSizeMapByCssProperty<T>(cssProperty: T) {\n if (typeof cssProperty === 'string' && cssProperty === 'font-size') return FONT_SIZES_LATIN\n return SIZES_LATIN\n}\n\nexport function buildMediaQuery(\n value: number | Size | 'auto' | 'initial' | 'inherit' | boolean,\n property:\n | string\n | ((\n _size: number | 'auto' | 'initial' | 'inherit' | boolean,\n _sizing?: null | string\n ) => FlattenSimpleInterpolation | null),\n screenQueryFunction: typeof screenXs,\n sizing: null | string,\n sizes?: Record<Size, number>\n): ReturnType<typeof css> {\n const sizeMap = sizes ?? getLatinSizeMapByCssProperty(property)\n\n const size = typeof value === 'string' ? (sizeMap[value as keyof typeof sizeMap] ?? value) : value\n\n if (typeof property === 'function') {\n return css`\n ${screenQueryFunction()`\n ${property(size, sizing)}\n `}\n `\n }\n\n return css`\n ${screenQueryFunction()`\n ${property}: ${String(size)}${typeof size === 'string' ? '' : (sizing ?? '')};\n `}\n `\n}\n\nconst getKey = (key: string): 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | null => {\n if (key.endsWith('XXS')) return 'xxs'\n if (key.endsWith('XS')) return 'xs'\n if (key.endsWith('S')) return 's'\n if (key.endsWith('M')) return 'm'\n if (key.endsWith('XL')) return 'xl'\n if (key.endsWith('L')) return 'l'\n return null\n}\n\nexport const desktopFirst = (a: string, b: string): number => {\n const aKey = getKey(a)\n const bKey = getKey(b)\n if (!aKey || !bKey) return 0\n\n const aIndex = DESKTOP_FIRST_KEYS.findIndex((el) => el === aKey)\n const bIndex = DESKTOP_FIRST_KEYS.findIndex((el) => el === bKey)\n\n return aIndex < bIndex ? -1 : 1\n}\n\nexport const mobileFirst = (a: string, b: string): number => {\n const aKey = getKey(a)\n const bKey = getKey(b)\n if (!aKey || !bKey) return 0\n\n const aIndex = MOBILE_FIRST_KEYS.findIndex((el) => el === aKey)\n const bIndex = MOBILE_FIRST_KEYS.findIndex((el) => el === bKey)\n\n return aIndex < bIndex ? -1 : 1\n}\n\nexport const getMediaQueryByResponsiveProp = (prop: string): MediaQuery => {\n if (prop.endsWith('XXS')) return screenMaxXxs\n if (prop.endsWith('XS')) return screenMaxXs\n if (prop.endsWith('S')) return screenMaxS\n if (prop.endsWith('M')) return screenMaxM\n if (prop.endsWith('XL')) return screenMinL\n return screenMaxL\n}\n"],"names":["SIZES_LATIN","Object","freeze","xxxl","xxl","xl","l","m","s","xs","xxs","xxxs","FONT_SIZES_LATIN","DESKTOP_FIRST_KEYS","MOBILE_FIRST_KEYS","getLatinSizeMapByCssProperty","cssProperty","getKey","key","endsWith","value","property","screenQueryFunction","sizing","sizes","sizeMap","size","css","String","desktopFirst","a","b","aKey","bKey","findIndex","el","prop","screenMaxXxs","screenMaxXs","screenMaxS","screenMaxM","screenMinL","screenMaxL","mobileFirst"],"mappings":"6FAMaA,YAA8CC,OAAOC,OAAO,CACvEC,KAAM,GACNC,IAAK,GACLC,GAAI,GACJC,EAAG,GACHC,EAAG,GACHC,EAAG,GACHC,GAAI,GACJC,IAAK,EACLC,KAAM,UAGKC,iBAAmDX,OAAOC,OAAO,CAC5EC,KAAM,GACNC,IAAK,GACLC,GAAI,GACJC,EAAG,GACHC,EAAG,GACHC,EAAG,GACHC,GAAI,GACJC,IAAK,GACLC,KAAM,IAGR,MAAME,mBAAqB,CAAC,KAAM,IAAK,IAAK,IAAK,KAAM,OACvD,MAAMC,kBAAoB,CAAC,MAAO,KAAM,IAAK,IAAK,IAAK,MAEhD,SAASC,6BAAgCC,GAC9C,cAAWA,GAAgB,UAAYA,IAAgB,YAAoBJ,iBACpEZ,WACT,CAiCA,MAAMiB,OAAUC,GACVA,EAAIC,SAAS,OAAe,MAC5BD,EAAIC,SAAS,MAAc,KAC3BD,EAAIC,SAAS,KAAa,IAC1BD,EAAIC,SAAS,KAAa,IAC1BD,EAAIC,SAAS,MAAc,KAC3BD,EAAIC,SAAS,KAAa,IACvB,uGAtCF,CACLC,EACAC,EAMAC,EACAC,EACAC,KAEA,MAAMC,EAAUD,GAAST,6BAA6BM,GAEtD,MAAMK,SAAcN,GAAU,SAAYK,EAAQL,IAAkCA,EAASA,EAE7F,OACSO,OAAAA,IAAG,CAAA,GAAA,WADDN,GAAa,WAElBC,GAAqB;UACnBD,EAASK,EAAMH;QAMnBD,GAAqB;QACnBD,MAAaO,OAAOF,YAAeA,GAAS,SAAW,GAAMH,GAAU;MAG/E,uBAY4BM,CAACC,EAAWC,KACtC,MAAMC,EAAOf,OAAOa,GACpB,MAAMG,EAAOhB,OAAOc,GACpB,OAAKC,GAASC,EAECpB,mBAAmBqB,WAAWC,GAAOA,IAAOH,IAC5CnB,mBAAmBqB,WAAWC,GAAOA,IAAOF,KAElC,EAAK,EALH,CAKI,0GAcaG,GACxCA,EAAKjB,SAAS,OAAekB,OAAAA,aAC7BD,EAAKjB,SAAS,MAAcmB,OAAAA,YAC5BF,EAAKjB,SAAS,KAAaoB,OAAAA,WAC3BH,EAAKjB,SAAS,KAAaqB,OAAAA,WAC3BJ,EAAKjB,SAAS,MAAcsB,OAAAA,WACzBC,OAAAA,+BAjBkBC,CAACb,EAAWC,KACrC,MAAMC,EAAOf,OAAOa,GACpB,MAAMG,EAAOhB,OAAOc,GACpB,OAAKC,GAASC,EAECnB,kBAAkBoB,WAAWC,GAAOA,IAAOH,IAC3ClB,kBAAkBoB,WAAWC,GAAOA,IAAOF,KAEjC,EAAK,EALH,CAKI"}
@@ -1 +1 @@
1
- {"version":3,"file":"shared.mjs","sources":["../../../src/mixins/shared.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { FlattenSimpleInterpolation } from 'styled-components'\nimport type { Size } from 'shared/types'\nimport { screenMaxL, screenMaxM, screenMaxS, screenMaxXs, screenMinL, screenMaxXxs } from './screen'\nimport type { MediaQuery, screenXs } from './screen'\n\nexport const SIZES_LATIN: Readonly<Record<Size, number>> = Object.freeze({\n xxxl: 44,\n xxl: 40,\n xl: 36,\n l: 28,\n m: 24,\n s: 20,\n xs: 16,\n xxs: 8,\n xxxs: 4,\n})\n\nexport const FONT_SIZES_LATIN: Readonly<Record<Size, number>> = Object.freeze({\n xxxl: 24,\n xxl: 22,\n xl: 20,\n l: 18,\n m: 16,\n s: 14,\n xs: 12,\n xxs: 10,\n xxxs: 8,\n})\n\nconst DESKTOP_FIRST_KEYS = ['xl', 'l', 'm', 's', 'xs', 'xxs']\nconst MOBILE_FIRST_KEYS = ['xxs', 'xs', 's', 'm', 'l', 'xl']\n\nexport function getLatinSizeMapByCssProperty<T>(cssProperty: T) {\n if (typeof cssProperty === 'string' && cssProperty === 'font-size') return FONT_SIZES_LATIN\n return SIZES_LATIN\n}\n\nexport function buildMediaQuery(\n value: number | Size | 'auto' | 'initial' | 'inherit' | boolean,\n property:\n | string\n | ((\n _size: number | 'auto' | 'initial' | 'inherit' | boolean,\n _sizing?: null | string\n ) => FlattenSimpleInterpolation | null),\n screenQueryFunction: typeof screenXs,\n sizing: null | string,\n sizes?: Record<Size, number>\n): ReturnType<typeof css> {\n const sizeMap = sizes ?? getLatinSizeMapByCssProperty(property)\n\n const size = typeof value === 'string' ? (sizeMap[value as keyof typeof sizeMap] ?? value) : value\n\n if (typeof property === 'function') {\n return css`\n ${screenQueryFunction()`\n ${property(size, sizing)}\n `}\n `\n }\n\n return css`\n ${screenQueryFunction()`\n ${property}: ${String(size)}${typeof size === 'string' ? '' : (sizing ?? '')};\n `}\n `\n}\n\nconst getKey = (key: string): 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | null => {\n if (key.endsWith('XXS')) return 'xxs'\n if (key.endsWith('XS')) return 'xs'\n if (key.endsWith('S')) return 's'\n if (key.endsWith('M')) return 'm'\n if (key.endsWith('XL')) return 'xl'\n if (key.endsWith('L')) return 'l'\n return null\n}\n\nexport const desktopFirst = (a: string, b: string): number => {\n const aKey = getKey(a)\n const bKey = getKey(b)\n if (!aKey || !bKey) return 0\n\n const aIndex = DESKTOP_FIRST_KEYS.findIndex((el) => el === aKey)\n const bIndex = DESKTOP_FIRST_KEYS.findIndex((el) => el === bKey)\n\n return aIndex < bIndex ? -1 : 1\n}\n\nexport const mobileFirst = (a: string, b: string): number => {\n const aKey = getKey(a)\n const bKey = getKey(b)\n if (!aKey || !bKey) return 0\n\n const aIndex = MOBILE_FIRST_KEYS.findIndex((el) => el === aKey)\n const bIndex = MOBILE_FIRST_KEYS.findIndex((el) => el === bKey)\n\n return aIndex < bIndex ? -1 : 1\n}\n\nexport const getMediaQueryByResponsiveProp = (prop: string): MediaQuery => {\n if (prop.endsWith('XXS')) return screenMaxXxs\n if (prop.endsWith('XS')) return screenMaxXs\n if (prop.endsWith('S')) return screenMaxS\n if (prop.endsWith('M')) return screenMaxM\n if (prop.endsWith('XL')) return screenMinL\n return screenMaxL\n}\n"],"names":["SIZES_LATIN","Object","freeze","xxxl","xxl","xl","l","m","s","xs","xxs","xxxs","FONT_SIZES_LATIN","DESKTOP_FIRST_KEYS","MOBILE_FIRST_KEYS","getLatinSizeMapByCssProperty","cssProperty","buildMediaQuery","value","property","screenQueryFunction","sizing","sizes","sizeMap","size","css","String","getKey","key","endsWith","desktopFirst","a","b","aKey","bKey","findIndex","el","mobileFirst","getMediaQueryByResponsiveProp","prop","screenMaxXxs","screenMaxXs","screenMaxS","screenMaxM","screenMinL","screenMaxL"],"mappings":"wIAMaA,YAA8CC,OAAOC,OAAO,CACvEC,KAAM,GACNC,IAAK,GACLC,GAAI,GACJC,EAAG,GACHC,EAAG,GACHC,EAAG,GACHC,GAAI,GACJC,IAAK,EACLC,KAAM,UAGKC,iBAAmDX,OAAOC,OAAO,CAC5EC,KAAM,GACNC,IAAK,GACLC,GAAI,GACJC,EAAG,GACHC,EAAG,GACHC,EAAG,GACHC,GAAI,GACJC,IAAK,GACLC,KAAM,IAGR,MAAME,mBAAqB,CAAC,KAAM,IAAK,IAAK,IAAK,KAAM,OACvD,MAAMC,kBAAoB,CAAC,MAAO,KAAM,IAAK,IAAK,IAAK,MAEhD,SAASC,6BAAgCC,GAC9C,cAAWA,GAAgB,UAAYA,IAAgB,YAAoBJ,iBACpEZ,WACT,CAEO,SAASiB,gBACdC,EACAC,EAMAC,EACAC,EACAC,GAEA,MAAMC,EAAUD,GAASP,6BAA6BI,GAEtD,MAAMK,SAAcN,GAAU,SAAYK,EAAQL,IAAkCA,EAASA,EAE7F,OACSO,IAAG,CAAA,GAAA,WADDN,GAAa,WAElBC,GAAqB;UACnBD,EAASK,EAAMH;QAMnBD,GAAqB;QACnBD,MAAaO,OAAOF,YAAeA,GAAS,SAAW,GAAMH,GAAU;MAG/E,CAEA,MAAMM,OAAUC,GACVA,EAAIC,SAAS,OAAe,MAC5BD,EAAIC,SAAS,MAAc,KAC3BD,EAAIC,SAAS,KAAa,IAC1BD,EAAIC,SAAS,KAAa,IAC1BD,EAAIC,SAAS,MAAc,KAC3BD,EAAIC,SAAS,KAAa,IACvB,WAGIC,aAAeA,CAACC,EAAWC,KACtC,MAAMC,EAAON,OAAOI,GACpB,MAAMG,EAAOP,OAAOK,GACpB,OAAKC,GAASC,EAECrB,mBAAmBsB,WAAWC,GAAOA,IAAOH,IAC5CpB,mBAAmBsB,WAAWC,GAAOA,IAAOF,KAEjC,EAAI,EALH,CAKI,QAGpBG,YAAcA,CAACN,EAAWC,KACrC,MAAMC,EAAON,OAAOI,GACpB,MAAMG,EAAOP,OAAOK,GACpB,OAAKC,GAASC,EAECpB,kBAAkBqB,WAAWC,GAAOA,IAAOH,IAC3CnB,kBAAkBqB,WAAWC,GAAOA,IAAOF,KAEhC,EAAI,EALH,CAKI,EAGpBI,MAAAA,8BAAiCC,GACxCA,EAAKV,SAAS,OAAeW,aAC7BD,EAAKV,SAAS,MAAcY,YAC5BF,EAAKV,SAAS,KAAaa,WAC3BH,EAAKV,SAAS,KAAac,WAC3BJ,EAAKV,SAAS,MAAce,WACzBC"}
1
+ {"version":3,"file":"shared.mjs","sources":["../../../src/mixins/shared.ts"],"sourcesContent":["import { css } from 'styled-components'\nimport type { FlattenSimpleInterpolation } from 'styled-components'\nimport type { Size } from 'shared/types'\nimport { screenMaxL, screenMaxM, screenMaxS, screenMaxXs, screenMinL, screenMaxXxs } from './screen'\nimport type { MediaQuery, screenXs } from './screen'\n\nexport const SIZES_LATIN: Readonly<Record<Size, number>> = Object.freeze({\n xxxl: 44,\n xxl: 40,\n xl: 36,\n l: 28,\n m: 24,\n s: 20,\n xs: 16,\n xxs: 8,\n xxxs: 4,\n})\n\nexport const FONT_SIZES_LATIN: Readonly<Record<Size, number>> = Object.freeze({\n xxxl: 24,\n xxl: 22,\n xl: 20,\n l: 18,\n m: 16,\n s: 14,\n xs: 12,\n xxs: 10,\n xxxs: 8,\n})\n\nconst DESKTOP_FIRST_KEYS = ['xl', 'l', 'm', 's', 'xs', 'xxs']\nconst MOBILE_FIRST_KEYS = ['xxs', 'xs', 's', 'm', 'l', 'xl']\n\nexport function getLatinSizeMapByCssProperty<T>(cssProperty: T) {\n if (typeof cssProperty === 'string' && cssProperty === 'font-size') return FONT_SIZES_LATIN\n return SIZES_LATIN\n}\n\nexport function buildMediaQuery(\n value: number | Size | 'auto' | 'initial' | 'inherit' | boolean,\n property:\n | string\n | ((\n _size: number | 'auto' | 'initial' | 'inherit' | boolean,\n _sizing?: null | string\n ) => FlattenSimpleInterpolation | null),\n screenQueryFunction: typeof screenXs,\n sizing: null | string,\n sizes?: Record<Size, number>\n): ReturnType<typeof css> {\n const sizeMap = sizes ?? getLatinSizeMapByCssProperty(property)\n\n const size = typeof value === 'string' ? (sizeMap[value as keyof typeof sizeMap] ?? value) : value\n\n if (typeof property === 'function') {\n return css`\n ${screenQueryFunction()`\n ${property(size, sizing)}\n `}\n `\n }\n\n return css`\n ${screenQueryFunction()`\n ${property}: ${String(size)}${typeof size === 'string' ? '' : (sizing ?? '')};\n `}\n `\n}\n\nconst getKey = (key: string): 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | null => {\n if (key.endsWith('XXS')) return 'xxs'\n if (key.endsWith('XS')) return 'xs'\n if (key.endsWith('S')) return 's'\n if (key.endsWith('M')) return 'm'\n if (key.endsWith('XL')) return 'xl'\n if (key.endsWith('L')) return 'l'\n return null\n}\n\nexport const desktopFirst = (a: string, b: string): number => {\n const aKey = getKey(a)\n const bKey = getKey(b)\n if (!aKey || !bKey) return 0\n\n const aIndex = DESKTOP_FIRST_KEYS.findIndex((el) => el === aKey)\n const bIndex = DESKTOP_FIRST_KEYS.findIndex((el) => el === bKey)\n\n return aIndex < bIndex ? -1 : 1\n}\n\nexport const mobileFirst = (a: string, b: string): number => {\n const aKey = getKey(a)\n const bKey = getKey(b)\n if (!aKey || !bKey) return 0\n\n const aIndex = MOBILE_FIRST_KEYS.findIndex((el) => el === aKey)\n const bIndex = MOBILE_FIRST_KEYS.findIndex((el) => el === bKey)\n\n return aIndex < bIndex ? -1 : 1\n}\n\nexport const getMediaQueryByResponsiveProp = (prop: string): MediaQuery => {\n if (prop.endsWith('XXS')) return screenMaxXxs\n if (prop.endsWith('XS')) return screenMaxXs\n if (prop.endsWith('S')) return screenMaxS\n if (prop.endsWith('M')) return screenMaxM\n if (prop.endsWith('XL')) return screenMinL\n return screenMaxL\n}\n"],"names":["SIZES_LATIN","Object","freeze","xxxl","xxl","xl","l","m","s","xs","xxs","xxxs","FONT_SIZES_LATIN","DESKTOP_FIRST_KEYS","MOBILE_FIRST_KEYS","getLatinSizeMapByCssProperty","cssProperty","buildMediaQuery","value","property","screenQueryFunction","sizing","sizes","sizeMap","size","css","String","getKey","key","endsWith","desktopFirst","a","b","aKey","bKey","findIndex","el","mobileFirst","getMediaQueryByResponsiveProp","prop","screenMaxXxs","screenMaxXs","screenMaxS","screenMaxM","screenMinL","screenMaxL"],"mappings":"wIAMaA,YAA8CC,OAAOC,OAAO,CACvEC,KAAM,GACNC,IAAK,GACLC,GAAI,GACJC,EAAG,GACHC,EAAG,GACHC,EAAG,GACHC,GAAI,GACJC,IAAK,EACLC,KAAM,UAGKC,iBAAmDX,OAAOC,OAAO,CAC5EC,KAAM,GACNC,IAAK,GACLC,GAAI,GACJC,EAAG,GACHC,EAAG,GACHC,EAAG,GACHC,GAAI,GACJC,IAAK,GACLC,KAAM,IAGR,MAAME,mBAAqB,CAAC,KAAM,IAAK,IAAK,IAAK,KAAM,OACvD,MAAMC,kBAAoB,CAAC,MAAO,KAAM,IAAK,IAAK,IAAK,MAEhD,SAASC,6BAAgCC,GAC9C,cAAWA,GAAgB,UAAYA,IAAgB,YAAoBJ,iBACpEZ,WACT,CAEO,SAASiB,gBACdC,EACAC,EAMAC,EACAC,EACAC,GAEA,MAAMC,EAAUD,GAASP,6BAA6BI,GAEtD,MAAMK,SAAcN,GAAU,SAAYK,EAAQL,IAAkCA,EAASA,EAE7F,OACSO,IAAG,CAAA,GAAA,WADDN,GAAa,WAElBC,GAAqB;UACnBD,EAASK,EAAMH;QAMnBD,GAAqB;QACnBD,MAAaO,OAAOF,YAAeA,GAAS,SAAW,GAAMH,GAAU;MAG/E,CAEA,MAAMM,OAAUC,GACVA,EAAIC,SAAS,OAAe,MAC5BD,EAAIC,SAAS,MAAc,KAC3BD,EAAIC,SAAS,KAAa,IAC1BD,EAAIC,SAAS,KAAa,IAC1BD,EAAIC,SAAS,MAAc,KAC3BD,EAAIC,SAAS,KAAa,IACvB,WAGIC,aAAeA,CAACC,EAAWC,KACtC,MAAMC,EAAON,OAAOI,GACpB,MAAMG,EAAOP,OAAOK,GACpB,OAAKC,GAASC,EAECrB,mBAAmBsB,WAAWC,GAAOA,IAAOH,IAC5CpB,mBAAmBsB,WAAWC,GAAOA,IAAOF,KAElC,EAAK,EALH,CAKI,QAGpBG,YAAcA,CAACN,EAAWC,KACrC,MAAMC,EAAON,OAAOI,GACpB,MAAMG,EAAOP,OAAOK,GACpB,OAAKC,GAASC,EAECpB,kBAAkBqB,WAAWC,GAAOA,IAAOH,IAC3CnB,kBAAkBqB,WAAWC,GAAOA,IAAOF,KAEjC,EAAK,EALH,CAKI,EAG1B,MAAMI,8BAAiCC,GACxCA,EAAKV,SAAS,OAAeW,aAC7BD,EAAKV,SAAS,MAAcY,YAC5BF,EAAKV,SAAS,KAAaa,WAC3BH,EAAKV,SAAS,KAAac,WAC3BJ,EAAKV,SAAS,MAAce,WACzBC"}
@@ -1 +1 @@
1
- {"version":3,"file":"vAlign.js","sources":["../../../src/mixins/vAlign.ts"],"sourcesContent":["import { css } from 'styled-components'\n\nexport interface VAlign {\n vAlign?: 'top' | 'middle' | 'bottom' | 'text-top' | 'text-bottom' | 'baseline'\n}\n\nexport const vAlign = (align: 'top' | 'middle' | 'bottom' | 'text-top' | 'text-bottom' | 'baseline') => css`\n vertical-align: ${align};\n`\n"],"names":["align","css"],"mappings":"oEAMuBA,GAAiFC,OAAGA,IAAA,CAAA,kBAAA,KACvFD"}
1
+ {"version":3,"file":"vAlign.js","sources":["../../../src/mixins/vAlign.ts"],"sourcesContent":["import { css } from 'styled-components'\n\nexport interface VAlign {\n vAlign?: 'top' | 'middle' | 'bottom' | 'text-top' | 'text-bottom' | 'baseline'\n}\n\nexport const vAlign = (align: 'top' | 'middle' | 'bottom' | 'text-top' | 'text-bottom' | 'baseline') => css`\n vertical-align: ${align};\n`\n"],"names":["align","css"],"mappings":"oEAMuBA,GAAiFC,OAAAA,IAAG,CAAA,kBAAA,KACvFD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foxford/ui",
3
- "version": "2.97.0",
3
+ "version": "2.97.1-beta-b68128a-20260227",
4
4
  "description": "UI components and utilities",
5
5
  "bugs": {
6
6
  "url": "https://github.com/foxford/ui/issues"
@@ -63,6 +63,6 @@
63
63
  "shared",
64
64
  "theme"
65
65
  ],
66
- "sha": "255a521",
66
+ "sha": "b68128a",
67
67
  "scripts": {}
68
68
  }
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.js","sources":["../../../../src/shared/context/accordion.ts"],"sourcesContent":["import { createContext } from 'react'\nimport type { ResponsiveSizeProps } from 'shared/interfaces'\nimport type { CSSColor } from 'shared/types'\n\ntype AccordionSize = 'l' | 'm' | 's' | 'xs'\n\ntype AccordionPanelsContext = {\n expandedPanels: string[]\n updatePanels: (panelId: string, panelExpanded: boolean) => void\n}\n\ninterface AccordionContextProps extends ResponsiveSizeProps<AccordionSize> {\n loading?: boolean\n disabled?: boolean\n embedded?: boolean\n borderRadius?: number\n primary?: boolean\n secondary?: boolean\n palette?: {\n headerColor?: CSSColor\n headerColorExpanded?: CSSColor\n headerColorDisabled?: CSSColor\n headerBackgroundColor?: CSSColor\n headerBackgroundColorDisabled?: CSSColor\n backgroundColor?: CSSColor\n backgroundColorDisabled?: CSSColor\n }\n}\n\nexport const AccordionPanelsContext = createContext<AccordionPanelsContext | null>(null)\n\nexport const AccordionPropsContext = createContext<AccordionContextProps | null>(null)\n"],"names":["AccordionPanelsContext","createContext","AccordionPropsContext"],"mappings":"8CA6BaA,uBAAyBC,MAAaA,cAAgC,YAEtEC,sBAAwBD,MAAaA,cAA+B"}
1
+ {"version":3,"file":"accordion.js","sources":["../../../../src/shared/context/accordion.ts"],"sourcesContent":["import { createContext } from 'react'\nimport type { ResponsiveSizeProps } from 'shared/interfaces'\nimport type { CSSColor } from 'shared/types'\n\ntype AccordionSize = 'l' | 'm' | 's' | 'xs'\n\ntype AccordionPanelsContext = {\n expandedPanels: string[]\n updatePanels: (panelId: string, panelExpanded: boolean) => void\n}\n\ninterface AccordionContextProps extends ResponsiveSizeProps<AccordionSize> {\n loading?: boolean\n disabled?: boolean\n embedded?: boolean\n borderRadius?: number\n primary?: boolean\n secondary?: boolean\n palette?: {\n headerColor?: CSSColor\n headerColorExpanded?: CSSColor\n headerColorDisabled?: CSSColor\n headerBackgroundColor?: CSSColor\n headerBackgroundColorDisabled?: CSSColor\n backgroundColor?: CSSColor\n backgroundColorDisabled?: CSSColor\n }\n}\n\nexport const AccordionPanelsContext = createContext<AccordionPanelsContext | null>(null)\n\nexport const AccordionPropsContext = createContext<AccordionContextProps | null>(null)\n"],"names":["AccordionPanelsContext","createContext","AccordionPropsContext"],"mappings":"8CA6BaA,uBAAyBC,MAAAA,cAA6C,YAEtEC,sBAAwBD,MAAAA,cAA4C"}
@@ -1 +1 @@
1
- {"version":3,"file":"tabList.js","sources":["../../../../src/shared/context/tabList.ts"],"sourcesContent":["import { createContext } from 'react'\nimport type { ResponsiveSizeProps } from 'shared/interfaces'\nimport type { CSSColor } from 'shared/types'\n\ntype TabListSize = 'l' | 'm' | 's'\n\ntype Variant = 'underlined' | 'filled' | 'clear'\n\ntype TabListTabsContext = {\n activeTab?: string\n activationOnFocus?: boolean\n getTabIndex: (tabId: string) => number\n onActiveTabChange: (tabId: string) => void\n}\n\ninterface TabListContextProps extends ResponsiveSizeProps<TabListSize> {\n role?: React.AriaRole\n variant?: Variant\n disabled?: boolean\n marginRight?: number\n palette?: {\n color?: CSSColor\n colorHover?: CSSColor\n colorActive?: CSSColor\n colorDisabled?: CSSColor\n colorActiveDisabled?: CSSColor\n backgroundColor?: CSSColor\n backgroundColorHover?: CSSColor\n backgroundColorActive?: CSSColor\n backgroundColorDisabled?: CSSColor\n backgroundColorActiveDisabled?: CSSColor\n }\n}\n\nexport const TabListTabsContext = createContext<TabListTabsContext | null>(null)\n\nexport const TabListPropsContext = createContext<TabListContextProps | null>(null)\n"],"names":["TabListTabsContext","createContext"],"mappings":"8CAkCaA,mBAAqBC,MAAaA,cAA4B,kCAExCA,MAAaA,cAA6B"}
1
+ {"version":3,"file":"tabList.js","sources":["../../../../src/shared/context/tabList.ts"],"sourcesContent":["import { createContext } from 'react'\nimport type { ResponsiveSizeProps } from 'shared/interfaces'\nimport type { CSSColor } from 'shared/types'\n\ntype TabListSize = 'l' | 'm' | 's'\n\ntype Variant = 'underlined' | 'filled' | 'clear'\n\ntype TabListTabsContext = {\n activeTab?: string\n activationOnFocus?: boolean\n getTabIndex: (tabId: string) => number\n onActiveTabChange: (tabId: string) => void\n}\n\ninterface TabListContextProps extends ResponsiveSizeProps<TabListSize> {\n role?: React.AriaRole\n variant?: Variant\n disabled?: boolean\n marginRight?: number\n palette?: {\n color?: CSSColor\n colorHover?: CSSColor\n colorActive?: CSSColor\n colorDisabled?: CSSColor\n colorActiveDisabled?: CSSColor\n backgroundColor?: CSSColor\n backgroundColorHover?: CSSColor\n backgroundColorActive?: CSSColor\n backgroundColorDisabled?: CSSColor\n backgroundColorActiveDisabled?: CSSColor\n }\n}\n\nexport const TabListTabsContext = createContext<TabListTabsContext | null>(null)\n\nexport const TabListPropsContext = createContext<TabListContextProps | null>(null)\n"],"names":["TabListTabsContext","createContext"],"mappings":"8CAkCaA,mBAAqBC,MAAAA,cAAyC,kCAExCA,MAAAA,cAA0C"}
@@ -1 +1 @@
1
- {"version":3,"file":"sizeInput.mjs","sources":["../../../../src/shared/enums/sizeInput.ts"],"sourcesContent":["export enum SizeInput {\n l = 380,\n m = 300,\n s = 220,\n xs = 140,\n}\n"],"names":["SizeInput"],"mappings":"AAAYA,IAAAA,WAAAA,IAAAA,EAAAA,EAAS,EAAA,KAAA,IAATA,EAAAA,EAAS,EAAA,KAAA,IAATA,EAAAA,EAAS,EAAA,KAAA,IAATA,EAAAA,EAAS,GAAA,KAAA,KAATA,IAAS,CAAA"}
1
+ {"version":3,"file":"sizeInput.mjs","sources":["../../../../src/shared/enums/sizeInput.ts"],"sourcesContent":["export enum SizeInput {\n l = 380,\n m = 300,\n s = 220,\n xs = 140,\n}\n"],"names":["SizeInput"],"mappings":"AAAA,IAAYA,WAAAA,IAAAA,EAAAA,EAAS,EAAA,KAAA,IAATA,EAAAA,EAAS,EAAA,KAAA,IAATA,EAAAA,EAAS,EAAA,KAAA,IAATA,EAAAA,EAAS,GAAA,KAAA,KAATA,IAAS,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"dom.js","sources":["../../../../src/shared/utils/dom.ts"],"sourcesContent":["import { keyboardKeys } from 'shared/constants'\nimport type { Nullable } from 'shared/types'\n\nexport const SELECTORS_KEYBOARD_FOCUSABLE =\n 'a[href]:not([tabindex^=\"-\"]), button:not(:disabled, [tabindex^=\"-\"]), input:not(:disabled, [type=\"hidden\"], [tabindex^=\"-\"]), select:not(:disabled, [tabindex^=\"-\"]), textarea:not(:disabled, [tabindex^=\"-\"]), area[href]:not([tabindex^=\"-\"]), iframe:not([tabindex^=\"-\"]), object:not([tabindex^=\"-\"]), summary:not([tabindex^=\"-\"]), [tabindex]:not([tabindex^=\"-\"], :disabled), [contenteditable]:not([contenteditable=\"false\"], [tabindex^=\"-\"])'\n\nexport const SELECTORS_FOCUSABLE =\n 'a[href], button:not(:disabled), input:not(:disabled, [type=\"hidden\"]), select:not(:disabled), textarea:not(:disabled), area[href], iframe, object, summary, [tabindex]:not(:disabled), [contenteditable]:not([contenteditable=\"false\"])'\n\nexport const focusFirstFocusable = (element: HTMLElement, selectors = SELECTORS_KEYBOARD_FOCUSABLE): boolean => {\n if (element.matches(selectors) && typeof element.focus === 'function') {\n element.focus()\n\n return true\n }\n\n const descendent = element.querySelector(selectors)\n\n if (descendent instanceof HTMLElement && typeof descendent.focus === 'function') {\n descendent.focus()\n\n return true\n }\n\n return false\n}\n\nexport const focusLastFocusable = (element: HTMLElement, selectors = SELECTORS_KEYBOARD_FOCUSABLE): boolean => {\n const descendants = element.querySelectorAll(selectors)\n const lastDescendant = descendants[descendants.length - 1]\n\n if (lastDescendant instanceof HTMLElement && typeof lastDescendant.focus === 'function') {\n lastDescendant.focus()\n\n return true\n }\n\n return false\n}\n\nexport const concatClassNames = (...classNames: Nullable<unknown>[]): string =>\n classNames.reduce<string>((acc, className) => {\n if (typeof className === 'string') {\n // eslint-disable-next-line no-param-reassign\n acc = acc ? acc + ' ' + className : className\n }\n\n return acc\n }, '')\n\nexport const createKeyboardNavigation = ({\n prevKey,\n nextKey,\n}: {\n prevKey: keyof typeof keyboardKeys\n nextKey: keyof typeof keyboardKeys\n}) => {\n return (\n key: React.KeyboardEvent['key'],\n active: HTMLElement,\n list: HTMLElement[],\n selectorsFocusable = SELECTORS_KEYBOARD_FOCUSABLE\n ) => {\n let idx = list.indexOf(active)\n\n if (idx === -1 || list.length === 0) {\n return\n }\n\n do {\n if (keyboardKeys[prevKey].validate(key)) {\n idx--\n } else if (keyboardKeys[nextKey].validate(key)) {\n idx++\n }\n\n if (idx < 0) {\n idx = list.length - 1\n } else if (idx > list.length - 1) {\n idx = 0\n }\n } while (!focusFirstFocusable(list[idx], selectorsFocusable))\n }\n}\n\nexport const navigateVerticalList = createKeyboardNavigation({\n prevKey: 'ArrowUp',\n nextKey: 'ArrowDown',\n})\n\nexport const navigateHorizontalList = createKeyboardNavigation({\n prevKey: 'ArrowLeft',\n nextKey: 'ArrowRight',\n})\n"],"names":["SELECTORS_KEYBOARD_FOCUSABLE","focusFirstFocusable","element","selectors","matches","focus","descendent","querySelector","HTMLElement","createKeyboardNavigation","prevKey","nextKey","key","active","list","selectorsFocusable","idx","indexOf","length","keyboardKeys","validate","navigateVerticalList","navigateHorizontalList","concatClassNames","classNames","reduce","acc","className","focusLastFocusable","descendants","querySelectorAll","lastDescendant"],"mappings":"sDAGO,MAAMA,6BACX,ybAKK,MAAMC,oBAAsBA,CAACC,EAAsBC,EAAYH,gCACpE,GAAIE,EAAQE,QAAQD,WAAqBD,EAAQG,OAAU,WAGzD,OAFAH,EAAQG,SAED,EAGT,MAAMC,EAAaJ,EAAQK,cAAcJ,GAEzC,OAAIG,aAAsBE,oBAAsBF,EAAWD,OAAU,aACnEC,EAAWD,SAEJ,EAGG,EA0BP,MAAMI,yBAA2BA,EACtCC,UACAC,aAKO,CACLC,EACAC,EACAC,EACAC,EAAqBf,gCAErB,IAAIgB,EAAMF,EAAKG,QAAQJ,GAEvB,GAAIG,KAAS,GAAKF,EAAKI,SAAW,EAIlC,GACMC,UAAYA,aAACT,GAASU,SAASR,GACjCI,IACSG,UAAAA,aAAaR,GAASS,SAASR,IACxCI,IAGEA,EAAM,EACRA,EAAMF,EAAKI,OAAS,EACXF,EAAMF,EAAKI,OAAS,IAC7BF,EAAM,UAEAf,oBAAoBa,EAAKE,GAAMD,GAAmB,EAInDM,MAAAA,qBAAuBZ,yBAAyB,CAC3DC,QAAS,UACTC,QAAS,cAGEW,MAAAA,uBAAyBb,yBAAyB,CAC7DC,QAAS,YACTC,QAAS,2CArFT,qUAiC8BY,IAAIC,IAClCA,EAAWC,QAAe,CAACC,EAAKC,YACnBA,GAAc,WAEvBD,EAAMA,EAAMA,EAAM,IAAMC,EAAYA,GAG/BD,IACN,yIArB6BE,CAAC1B,EAAsBC,EAAYH,gCACnE,MAAM6B,EAAc3B,EAAQ4B,iBAAiB3B,GAC7C,MAAM4B,EAAiBF,EAAYA,EAAYX,OAAS,GAExD,OAAIa,aAA0BvB,oBAAsBuB,EAAe1B,OAAU,aAC3E0B,EAAe1B,SAER,EAGG"}
1
+ {"version":3,"file":"dom.js","sources":["../../../../src/shared/utils/dom.ts"],"sourcesContent":["import { keyboardKeys } from 'shared/constants'\nimport type { Nullable } from 'shared/types'\n\nexport const SELECTORS_KEYBOARD_FOCUSABLE =\n 'a[href]:not([tabindex^=\"-\"]), button:not(:disabled, [tabindex^=\"-\"]), input:not(:disabled, [type=\"hidden\"], [tabindex^=\"-\"]), select:not(:disabled, [tabindex^=\"-\"]), textarea:not(:disabled, [tabindex^=\"-\"]), area[href]:not([tabindex^=\"-\"]), iframe:not([tabindex^=\"-\"]), object:not([tabindex^=\"-\"]), summary:not([tabindex^=\"-\"]), [tabindex]:not([tabindex^=\"-\"], :disabled), [contenteditable]:not([contenteditable=\"false\"], [tabindex^=\"-\"])'\n\nexport const SELECTORS_FOCUSABLE =\n 'a[href], button:not(:disabled), input:not(:disabled, [type=\"hidden\"]), select:not(:disabled), textarea:not(:disabled), area[href], iframe, object, summary, [tabindex]:not(:disabled), [contenteditable]:not([contenteditable=\"false\"])'\n\nexport const focusFirstFocusable = (element: HTMLElement, selectors = SELECTORS_KEYBOARD_FOCUSABLE): boolean => {\n if (element.matches(selectors) && typeof element.focus === 'function') {\n element.focus()\n\n return true\n }\n\n const descendent = element.querySelector(selectors)\n\n if (descendent instanceof HTMLElement && typeof descendent.focus === 'function') {\n descendent.focus()\n\n return true\n }\n\n return false\n}\n\nexport const focusLastFocusable = (element: HTMLElement, selectors = SELECTORS_KEYBOARD_FOCUSABLE): boolean => {\n const descendants = element.querySelectorAll(selectors)\n const lastDescendant = descendants[descendants.length - 1]\n\n if (lastDescendant instanceof HTMLElement && typeof lastDescendant.focus === 'function') {\n lastDescendant.focus()\n\n return true\n }\n\n return false\n}\n\nexport const concatClassNames = (...classNames: Nullable<unknown>[]): string =>\n classNames.reduce<string>((acc, className) => {\n if (typeof className === 'string') {\n // eslint-disable-next-line no-param-reassign\n acc = acc ? acc + ' ' + className : className\n }\n\n return acc\n }, '')\n\nexport const createKeyboardNavigation = ({\n prevKey,\n nextKey,\n}: {\n prevKey: keyof typeof keyboardKeys\n nextKey: keyof typeof keyboardKeys\n}) => {\n return (\n key: React.KeyboardEvent['key'],\n active: HTMLElement,\n list: HTMLElement[],\n selectorsFocusable = SELECTORS_KEYBOARD_FOCUSABLE\n ) => {\n let idx = list.indexOf(active)\n\n if (idx === -1 || list.length === 0) {\n return\n }\n\n do {\n if (keyboardKeys[prevKey].validate(key)) {\n idx--\n } else if (keyboardKeys[nextKey].validate(key)) {\n idx++\n }\n\n if (idx < 0) {\n idx = list.length - 1\n } else if (idx > list.length - 1) {\n idx = 0\n }\n } while (!focusFirstFocusable(list[idx], selectorsFocusable))\n }\n}\n\nexport const navigateVerticalList = createKeyboardNavigation({\n prevKey: 'ArrowUp',\n nextKey: 'ArrowDown',\n})\n\nexport const navigateHorizontalList = createKeyboardNavigation({\n prevKey: 'ArrowLeft',\n nextKey: 'ArrowRight',\n})\n"],"names":["SELECTORS_KEYBOARD_FOCUSABLE","focusFirstFocusable","element","selectors","matches","focus","descendent","querySelector","HTMLElement","createKeyboardNavigation","prevKey","nextKey","key","active","list","selectorsFocusable","idx","indexOf","length","keyboardKeys","validate","navigateVerticalList","navigateHorizontalList","concatClassNames","classNames","reduce","acc","className","focusLastFocusable","descendants","querySelectorAll","lastDescendant"],"mappings":"sDAGO,MAAMA,6BACX,ybAKK,MAAMC,oBAAsBA,CAACC,EAAsBC,EAAYH,gCACpE,GAAIE,EAAQE,QAAQD,WAAqBD,EAAQG,OAAU,WAGzD,OAFAH,EAAQG,SAED,EAGT,MAAMC,EAAaJ,EAAQK,cAAcJ,GAEzC,OAAIG,aAAsBE,oBAAsBF,EAAWD,OAAU,aACnEC,EAAWD,SAEJ,EAGG,EA0BP,MAAMI,yBAA2BA,EACtCC,UACAC,aAKO,CACLC,EACAC,EACAC,EACAC,EAAqBf,gCAErB,IAAIgB,EAAMF,EAAKG,QAAQJ,GAEvB,GAAIG,KAAQ,GAAMF,EAAKI,SAAW,EAIlC,GACMC,UAAAA,aAAaT,GAASU,SAASR,GACjCI,IACSG,UAAAA,aAAaR,GAASS,SAASR,IACxCI,IAGEA,EAAM,EACRA,EAAMF,EAAKI,OAAS,EACXF,EAAMF,EAAKI,OAAS,IAC7BF,EAAM,UAEAf,oBAAoBa,EAAKE,GAAMD,GAAmB,EAIzD,MAAMM,qBAAuBZ,yBAAyB,CAC3DC,QAAS,UACTC,QAAS,cAGJ,MAAMW,uBAAyBb,yBAAyB,CAC7DC,QAAS,YACTC,QAAS,2CArFT,qUAiC8BY,IAAIC,IAClCA,EAAWC,QAAe,CAACC,EAAKC,YACnBA,GAAc,WAEvBD,EAAMA,EAAMA,EAAM,IAAMC,EAAYA,GAG/BD,IACN,yIArB6BE,CAAC1B,EAAsBC,EAAYH,gCACnE,MAAM6B,EAAc3B,EAAQ4B,iBAAiB3B,GAC7C,MAAM4B,EAAiBF,EAAYA,EAAYX,OAAS,GAExD,OAAIa,aAA0BvB,oBAAsBuB,EAAe1B,OAAU,aAC3E0B,EAAe1B,SAER,EAGG"}
@@ -1 +1 @@
1
- {"version":3,"file":"dom.mjs","sources":["../../../../src/shared/utils/dom.ts"],"sourcesContent":["import { keyboardKeys } from 'shared/constants'\nimport type { Nullable } from 'shared/types'\n\nexport const SELECTORS_KEYBOARD_FOCUSABLE =\n 'a[href]:not([tabindex^=\"-\"]), button:not(:disabled, [tabindex^=\"-\"]), input:not(:disabled, [type=\"hidden\"], [tabindex^=\"-\"]), select:not(:disabled, [tabindex^=\"-\"]), textarea:not(:disabled, [tabindex^=\"-\"]), area[href]:not([tabindex^=\"-\"]), iframe:not([tabindex^=\"-\"]), object:not([tabindex^=\"-\"]), summary:not([tabindex^=\"-\"]), [tabindex]:not([tabindex^=\"-\"], :disabled), [contenteditable]:not([contenteditable=\"false\"], [tabindex^=\"-\"])'\n\nexport const SELECTORS_FOCUSABLE =\n 'a[href], button:not(:disabled), input:not(:disabled, [type=\"hidden\"]), select:not(:disabled), textarea:not(:disabled), area[href], iframe, object, summary, [tabindex]:not(:disabled), [contenteditable]:not([contenteditable=\"false\"])'\n\nexport const focusFirstFocusable = (element: HTMLElement, selectors = SELECTORS_KEYBOARD_FOCUSABLE): boolean => {\n if (element.matches(selectors) && typeof element.focus === 'function') {\n element.focus()\n\n return true\n }\n\n const descendent = element.querySelector(selectors)\n\n if (descendent instanceof HTMLElement && typeof descendent.focus === 'function') {\n descendent.focus()\n\n return true\n }\n\n return false\n}\n\nexport const focusLastFocusable = (element: HTMLElement, selectors = SELECTORS_KEYBOARD_FOCUSABLE): boolean => {\n const descendants = element.querySelectorAll(selectors)\n const lastDescendant = descendants[descendants.length - 1]\n\n if (lastDescendant instanceof HTMLElement && typeof lastDescendant.focus === 'function') {\n lastDescendant.focus()\n\n return true\n }\n\n return false\n}\n\nexport const concatClassNames = (...classNames: Nullable<unknown>[]): string =>\n classNames.reduce<string>((acc, className) => {\n if (typeof className === 'string') {\n // eslint-disable-next-line no-param-reassign\n acc = acc ? acc + ' ' + className : className\n }\n\n return acc\n }, '')\n\nexport const createKeyboardNavigation = ({\n prevKey,\n nextKey,\n}: {\n prevKey: keyof typeof keyboardKeys\n nextKey: keyof typeof keyboardKeys\n}) => {\n return (\n key: React.KeyboardEvent['key'],\n active: HTMLElement,\n list: HTMLElement[],\n selectorsFocusable = SELECTORS_KEYBOARD_FOCUSABLE\n ) => {\n let idx = list.indexOf(active)\n\n if (idx === -1 || list.length === 0) {\n return\n }\n\n do {\n if (keyboardKeys[prevKey].validate(key)) {\n idx--\n } else if (keyboardKeys[nextKey].validate(key)) {\n idx++\n }\n\n if (idx < 0) {\n idx = list.length - 1\n } else if (idx > list.length - 1) {\n idx = 0\n }\n } while (!focusFirstFocusable(list[idx], selectorsFocusable))\n }\n}\n\nexport const navigateVerticalList = createKeyboardNavigation({\n prevKey: 'ArrowUp',\n nextKey: 'ArrowDown',\n})\n\nexport const navigateHorizontalList = createKeyboardNavigation({\n prevKey: 'ArrowLeft',\n nextKey: 'ArrowRight',\n})\n"],"names":["SELECTORS_KEYBOARD_FOCUSABLE","SELECTORS_FOCUSABLE","focusFirstFocusable","element","selectors","matches","focus","descendent","querySelector","HTMLElement","focusLastFocusable","descendants","querySelectorAll","lastDescendant","length","concatClassNames","classNames","reduce","acc","className","createKeyboardNavigation","prevKey","nextKey","key","active","list","selectorsFocusable","idx","indexOf","keyboardKeys","validate","navigateVerticalList","navigateHorizontalList"],"mappings":"2CAGO,MAAMA,6BACX,ybAEK,MAAMC,oBACX,0OAEK,MAAMC,oBAAsBA,CAACC,EAAsBC,EAAYJ,gCACpE,GAAIG,EAAQE,QAAQD,WAAqBD,EAAQG,OAAU,WAGzD,OAFAH,EAAQG,SAED,EAGT,MAAMC,EAAaJ,EAAQK,cAAcJ,GAEzC,OAAIG,aAAsBE,oBAAsBF,EAAWD,OAAU,aACnEC,EAAWD,SAEJ,EAGG,EAGP,MAAMI,mBAAqBA,CAACP,EAAsBC,EAAYJ,gCACnE,MAAMW,EAAcR,EAAQS,iBAAiBR,GAC7C,MAAMS,EAAiBF,EAAYA,EAAYG,OAAS,GAExD,OAAID,aAA0BJ,oBAAsBI,EAAeP,OAAU,aAC3EO,EAAeP,SAER,EAGG,EAGDS,MAAAA,iBAAmBA,IAAIC,IAClCA,EAAWC,QAAe,CAACC,EAAKC,YACnBA,GAAc,WAEvBD,EAAMA,EAAMA,EAAM,IAAMC,EAAYA,GAG/BD,IACN,IAEE,MAAME,yBAA2BA,EACtCC,UACAC,aAKO,CACLC,EACAC,EACAC,EACAC,EAAqB1B,gCAErB,IAAI2B,EAAMF,EAAKG,QAAQJ,GAEvB,GAAIG,KAAS,GAAKF,EAAKX,SAAW,EAIlC,GACMe,aAAaR,GAASS,SAASP,GACjCI,IACSE,aAAaP,GAASQ,SAASP,IACxCI,IAGEA,EAAM,EACRA,EAAMF,EAAKX,OAAS,EACXa,EAAMF,EAAKX,OAAS,IAC7Ba,EAAM,UAEAzB,oBAAoBuB,EAAKE,GAAMD,GAAmB,EAInDK,MAAAA,qBAAuBX,yBAAyB,CAC3DC,QAAS,UACTC,QAAS,cAGEU,MAAAA,uBAAyBZ,yBAAyB,CAC7DC,QAAS,YACTC,QAAS"}
1
+ {"version":3,"file":"dom.mjs","sources":["../../../../src/shared/utils/dom.ts"],"sourcesContent":["import { keyboardKeys } from 'shared/constants'\nimport type { Nullable } from 'shared/types'\n\nexport const SELECTORS_KEYBOARD_FOCUSABLE =\n 'a[href]:not([tabindex^=\"-\"]), button:not(:disabled, [tabindex^=\"-\"]), input:not(:disabled, [type=\"hidden\"], [tabindex^=\"-\"]), select:not(:disabled, [tabindex^=\"-\"]), textarea:not(:disabled, [tabindex^=\"-\"]), area[href]:not([tabindex^=\"-\"]), iframe:not([tabindex^=\"-\"]), object:not([tabindex^=\"-\"]), summary:not([tabindex^=\"-\"]), [tabindex]:not([tabindex^=\"-\"], :disabled), [contenteditable]:not([contenteditable=\"false\"], [tabindex^=\"-\"])'\n\nexport const SELECTORS_FOCUSABLE =\n 'a[href], button:not(:disabled), input:not(:disabled, [type=\"hidden\"]), select:not(:disabled), textarea:not(:disabled), area[href], iframe, object, summary, [tabindex]:not(:disabled), [contenteditable]:not([contenteditable=\"false\"])'\n\nexport const focusFirstFocusable = (element: HTMLElement, selectors = SELECTORS_KEYBOARD_FOCUSABLE): boolean => {\n if (element.matches(selectors) && typeof element.focus === 'function') {\n element.focus()\n\n return true\n }\n\n const descendent = element.querySelector(selectors)\n\n if (descendent instanceof HTMLElement && typeof descendent.focus === 'function') {\n descendent.focus()\n\n return true\n }\n\n return false\n}\n\nexport const focusLastFocusable = (element: HTMLElement, selectors = SELECTORS_KEYBOARD_FOCUSABLE): boolean => {\n const descendants = element.querySelectorAll(selectors)\n const lastDescendant = descendants[descendants.length - 1]\n\n if (lastDescendant instanceof HTMLElement && typeof lastDescendant.focus === 'function') {\n lastDescendant.focus()\n\n return true\n }\n\n return false\n}\n\nexport const concatClassNames = (...classNames: Nullable<unknown>[]): string =>\n classNames.reduce<string>((acc, className) => {\n if (typeof className === 'string') {\n // eslint-disable-next-line no-param-reassign\n acc = acc ? acc + ' ' + className : className\n }\n\n return acc\n }, '')\n\nexport const createKeyboardNavigation = ({\n prevKey,\n nextKey,\n}: {\n prevKey: keyof typeof keyboardKeys\n nextKey: keyof typeof keyboardKeys\n}) => {\n return (\n key: React.KeyboardEvent['key'],\n active: HTMLElement,\n list: HTMLElement[],\n selectorsFocusable = SELECTORS_KEYBOARD_FOCUSABLE\n ) => {\n let idx = list.indexOf(active)\n\n if (idx === -1 || list.length === 0) {\n return\n }\n\n do {\n if (keyboardKeys[prevKey].validate(key)) {\n idx--\n } else if (keyboardKeys[nextKey].validate(key)) {\n idx++\n }\n\n if (idx < 0) {\n idx = list.length - 1\n } else if (idx > list.length - 1) {\n idx = 0\n }\n } while (!focusFirstFocusable(list[idx], selectorsFocusable))\n }\n}\n\nexport const navigateVerticalList = createKeyboardNavigation({\n prevKey: 'ArrowUp',\n nextKey: 'ArrowDown',\n})\n\nexport const navigateHorizontalList = createKeyboardNavigation({\n prevKey: 'ArrowLeft',\n nextKey: 'ArrowRight',\n})\n"],"names":["SELECTORS_KEYBOARD_FOCUSABLE","SELECTORS_FOCUSABLE","focusFirstFocusable","element","selectors","matches","focus","descendent","querySelector","HTMLElement","focusLastFocusable","descendants","querySelectorAll","lastDescendant","length","concatClassNames","classNames","reduce","acc","className","createKeyboardNavigation","prevKey","nextKey","key","active","list","selectorsFocusable","idx","indexOf","keyboardKeys","validate","navigateVerticalList","navigateHorizontalList"],"mappings":"2CAGO,MAAMA,6BACX,ybAEK,MAAMC,oBACX,0OAEK,MAAMC,oBAAsBA,CAACC,EAAsBC,EAAYJ,gCACpE,GAAIG,EAAQE,QAAQD,WAAqBD,EAAQG,OAAU,WAGzD,OAFAH,EAAQG,SAED,EAGT,MAAMC,EAAaJ,EAAQK,cAAcJ,GAEzC,OAAIG,aAAsBE,oBAAsBF,EAAWD,OAAU,aACnEC,EAAWD,SAEJ,EAGG,EAGP,MAAMI,mBAAqBA,CAACP,EAAsBC,EAAYJ,gCACnE,MAAMW,EAAcR,EAAQS,iBAAiBR,GAC7C,MAAMS,EAAiBF,EAAYA,EAAYG,OAAS,GAExD,OAAID,aAA0BJ,oBAAsBI,EAAeP,OAAU,aAC3EO,EAAeP,SAER,EAGG,EAGP,MAAMS,iBAAmBA,IAAIC,IAClCA,EAAWC,QAAe,CAACC,EAAKC,YACnBA,GAAc,WAEvBD,EAAMA,EAAMA,EAAM,IAAMC,EAAYA,GAG/BD,IACN,IAEE,MAAME,yBAA2BA,EACtCC,UACAC,aAKO,CACLC,EACAC,EACAC,EACAC,EAAqB1B,gCAErB,IAAI2B,EAAMF,EAAKG,QAAQJ,GAEvB,GAAIG,KAAQ,GAAMF,EAAKX,SAAW,EAIlC,GACMe,aAAaR,GAASS,SAASP,GACjCI,IACSE,aAAaP,GAASQ,SAASP,IACxCI,IAGEA,EAAM,EACRA,EAAMF,EAAKX,OAAS,EACXa,EAAMF,EAAKX,OAAS,IAC7Ba,EAAM,UAEAzB,oBAAoBuB,EAAKE,GAAMD,GAAmB,EAIzD,MAAMK,qBAAuBX,yBAAyB,CAC3DC,QAAS,UACTC,QAAS,cAGJ,MAAMU,uBAAyBZ,yBAAyB,CAC7DC,QAAS,YACTC,QAAS"}
@@ -1 +1 @@
1
- {"version":3,"file":"isNil.mjs","sources":["../../../../src/shared/utils/isNil.ts"],"sourcesContent":["const isNil = (value: unknown): value is null | undefined => value === null || value === undefined\n\nexport { isNil }\n"],"names":["isNil","value","undefined"],"mappings":"AAAMA,MAAAA,MAASC,GAA8CA,IAAU,MAAQA,SAAUC"}
1
+ {"version":3,"file":"isNil.mjs","sources":["../../../../src/shared/utils/isNil.ts"],"sourcesContent":["const isNil = (value: unknown): value is null | undefined => value === null || value === undefined\n\nexport { isNil }\n"],"names":["isNil","value","undefined"],"mappings":"AAAA,MAAMA,MAASC,GAA8CA,IAAU,MAAQA,SAAUC"}
@@ -1 +1 @@
1
- {"version":3,"file":"misc.js","sources":["../../../../src/shared/utils/misc.ts"],"sourcesContent":["import { deepmergeCustom } from 'deepmerge-ts'\nimport type { Nullable } from 'shared/types'\n\nexport const deepmerge = deepmergeCustom({\n mergeArrays: false,\n})\n\nexport const createThrottledCallback = <T>(cb: (params: T) => void, throttleMS = 100): typeof cb => {\n let timerId: Nullable<ReturnType<typeof setTimeout>> = null\n\n return (params: T) => {\n if (timerId) return\n\n timerId = setTimeout(() => {\n timerId = null\n }, throttleMS)\n\n cb(params)\n }\n}\n\nexport const createDebouncedCallback = <T>(cb: (params: T) => void, debounceMS = 100): typeof cb => {\n let timerId: ReturnType<typeof setTimeout> | null = null\n\n return (params: T) => {\n if (timerId) clearTimeout(timerId)\n timerId = setTimeout(() => {\n cb(params)\n timerId = null\n }, debounceMS)\n }\n}\n"],"names":["deepmerge","deepmergeCustom","mergeArrays","createDebouncedCallback","cb","debounceMS","timerId","params","clearTimeout","setTimeout","createThrottledCallback","throttleMS"],"mappings":"aAGaA,MAAAA,kCAAYC,gBAAgB,CACvCC,aAAa,oCAiBwBC,CAAIC,EAAyBC,EAAa,OAC/E,IAAIC,EAAgD,KAEpD,OAAQC,IACFD,GAASE,aAAaF,GAC1BA,EAAUG,YAAW,KACnBL,EAAGG,GACHD,EAAU,IAAI,GACbD,EAAW,CACf,kCAvBoCK,CAAIN,EAAyBO,EAAa,OAC/E,IAAIL,EAAmD,KAEvD,OAAQC,IACFD,IAEJA,EAAUG,YAAW,KACnBH,EAAU,IAAI,GACbK,GAEHP,EAAGG,GAAO,CACX"}
1
+ {"version":3,"file":"misc.js","sources":["../../../../src/shared/utils/misc.ts"],"sourcesContent":["import { deepmergeCustom } from 'deepmerge-ts'\nimport type { Nullable } from 'shared/types'\n\nexport const deepmerge = deepmergeCustom({\n mergeArrays: false,\n})\n\nexport const createThrottledCallback = <T>(cb: (params: T) => void, throttleMS = 100): typeof cb => {\n let timerId: Nullable<ReturnType<typeof setTimeout>> = null\n\n return (params: T) => {\n if (timerId) return\n\n timerId = setTimeout(() => {\n timerId = null\n }, throttleMS)\n\n cb(params)\n }\n}\n\nexport const createDebouncedCallback = <T>(cb: (params: T) => void, debounceMS = 100): typeof cb => {\n let timerId: ReturnType<typeof setTimeout> | null = null\n\n return (params: T) => {\n if (timerId) clearTimeout(timerId)\n timerId = setTimeout(() => {\n cb(params)\n timerId = null\n }, debounceMS)\n }\n}\n"],"names":["deepmerge","deepmergeCustom","mergeArrays","createDebouncedCallback","cb","debounceMS","timerId","params","clearTimeout","setTimeout","createThrottledCallback","throttleMS"],"mappings":"aAGO,MAAMA,kCAAYC,gBAAgB,CACvCC,aAAa,oCAiBwBC,CAAIC,EAAyBC,EAAa,OAC/E,IAAIC,EAAgD,KAEpD,OAAQC,IACFD,GAASE,aAAaF,GAC1BA,EAAUG,YAAW,KACnBL,EAAGG,GACHD,EAAU,IAAI,GACbD,EAAW,CACf,kCAvBoCK,CAAIN,EAAyBO,EAAa,OAC/E,IAAIL,EAAmD,KAEvD,OAAQC,IACFD,IAEJA,EAAUG,YAAW,KACnBH,EAAU,IAAI,GACbK,GAEHP,EAAGG,GAAO,CACX"}
@@ -1 +1 @@
1
- {"version":3,"file":"misc.mjs","sources":["../../../../src/shared/utils/misc.ts"],"sourcesContent":["import { deepmergeCustom } from 'deepmerge-ts'\nimport type { Nullable } from 'shared/types'\n\nexport const deepmerge = deepmergeCustom({\n mergeArrays: false,\n})\n\nexport const createThrottledCallback = <T>(cb: (params: T) => void, throttleMS = 100): typeof cb => {\n let timerId: Nullable<ReturnType<typeof setTimeout>> = null\n\n return (params: T) => {\n if (timerId) return\n\n timerId = setTimeout(() => {\n timerId = null\n }, throttleMS)\n\n cb(params)\n }\n}\n\nexport const createDebouncedCallback = <T>(cb: (params: T) => void, debounceMS = 100): typeof cb => {\n let timerId: ReturnType<typeof setTimeout> | null = null\n\n return (params: T) => {\n if (timerId) clearTimeout(timerId)\n timerId = setTimeout(() => {\n cb(params)\n timerId = null\n }, debounceMS)\n }\n}\n"],"names":["deepmerge","deepmergeCustom","mergeArrays","createThrottledCallback","cb","throttleMS","timerId","params","setTimeout","createDebouncedCallback","debounceMS","clearTimeout"],"mappings":"0CAGaA,MAAAA,UAAYC,gBAAgB,CACvCC,aAAa,IAGR,MAAMC,wBAA0BA,CAAIC,EAAyBC,EAAa,OAC/E,IAAIC,EAAmD,KAEvD,OAAQC,IACFD,IAEJA,EAAUE,YAAW,KACnBF,EAAU,IAAI,GACbD,GAEHD,EAAGG,GAAO,CACX,EAGI,MAAME,wBAA0BA,CAAIL,EAAyBM,EAAa,OAC/E,IAAIJ,EAAgD,KAEpD,OAAQC,IACFD,GAASK,aAAaL,GAC1BA,EAAUE,YAAW,KACnBJ,EAAGG,GACHD,EAAU,IAAI,GACbI,EAAW,CACf"}
1
+ {"version":3,"file":"misc.mjs","sources":["../../../../src/shared/utils/misc.ts"],"sourcesContent":["import { deepmergeCustom } from 'deepmerge-ts'\nimport type { Nullable } from 'shared/types'\n\nexport const deepmerge = deepmergeCustom({\n mergeArrays: false,\n})\n\nexport const createThrottledCallback = <T>(cb: (params: T) => void, throttleMS = 100): typeof cb => {\n let timerId: Nullable<ReturnType<typeof setTimeout>> = null\n\n return (params: T) => {\n if (timerId) return\n\n timerId = setTimeout(() => {\n timerId = null\n }, throttleMS)\n\n cb(params)\n }\n}\n\nexport const createDebouncedCallback = <T>(cb: (params: T) => void, debounceMS = 100): typeof cb => {\n let timerId: ReturnType<typeof setTimeout> | null = null\n\n return (params: T) => {\n if (timerId) clearTimeout(timerId)\n timerId = setTimeout(() => {\n cb(params)\n timerId = null\n }, debounceMS)\n }\n}\n"],"names":["deepmerge","deepmergeCustom","mergeArrays","createThrottledCallback","cb","throttleMS","timerId","params","setTimeout","createDebouncedCallback","debounceMS","clearTimeout"],"mappings":"0CAGO,MAAMA,UAAYC,gBAAgB,CACvCC,aAAa,IAGR,MAAMC,wBAA0BA,CAAIC,EAAyBC,EAAa,OAC/E,IAAIC,EAAmD,KAEvD,OAAQC,IACFD,IAEJA,EAAUE,YAAW,KACnBF,EAAU,IAAI,GACbD,GAEHD,EAAGG,GAAO,CACX,EAGI,MAAME,wBAA0BA,CAAIL,EAAyBM,EAAa,OAC/E,IAAIJ,EAAgD,KAEpD,OAAQC,IACFD,GAASK,aAAaL,GAC1BA,EAAUE,YAAW,KACnBJ,EAAGG,GACHD,EAAU,IAAI,GACbI,EAAW,CACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"react.js","sources":["../../../../src/shared/utils/react.ts"],"sourcesContent":["import { Children, isValidElement, Fragment, cloneElement } from 'react'\n\nexport const removeFragments = (children: React.ReactNode, targetDepth = 1): React.ReactNode[] => {\n if (targetDepth <= 0) {\n return Children.toArray(children)\n }\n\n const func = (input: React.ReactNode, depth: number): React.ReactNode[] => {\n const iterable = Children.toArray(input).map((child, idx) =>\n isValidElement(child) ? cloneElement(child, { key: '.'.repeat(depth) + idx }) : child\n )\n\n if (depth >= targetDepth) {\n return iterable\n }\n\n return iterable.reduce<React.ReactNode[]>((acc, child) => {\n if (isValidElement(child) && child.type === Fragment) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n if (child.props.children) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n acc.push(...func(child.props.children, depth + 1))\n }\n } else {\n acc.push(child)\n }\n\n return acc\n }, [])\n }\n\n return func(children, 0)\n}\n"],"names":["removeFragments","children","targetDepth","Children","toArray","func","input","depth","iterable","map","child","idx","isValidElement","cloneElement","key","repeat","reduce","acc","type","Fragment","props","push"],"mappings":"gEAE+BA,CAACC,EAA2BC,EAAc,KACvE,GAAIA,GAAe,EACjB,OAAOC,MAAQA,SAACC,QAAQH,GAG1B,MAAMI,KAAOA,CAACC,EAAwBC,KACpC,MAAMC,EAAWL,MAAQA,SAACC,QAAQE,GAAOG,KAAI,CAACC,EAAOC,IACnDC,MAAcA,eAACF,GAASG,MAAAA,aAAaH,EAAO,CAAEI,IAAK,IAAIC,OAAOR,GAASI,IAASD,IAGlF,OAAIH,GAASL,EACJM,EAGFA,EAASQ,QAA0B,CAACC,EAAKP,KAC1CE,MAAcA,eAACF,IAAUA,EAAMQ,OAASC,MAAAA,SAGtCT,EAAMU,MAAMnB,UAGdgB,EAAII,QAAQhB,KAAKK,EAAMU,MAAMnB,SAAUM,EAAQ,IAGjDU,EAAII,KAAKX,GAGJO,IACN,GAAG,EAGR,OAAOZ,KAAKJ,EAAU,EAAE"}
1
+ {"version":3,"file":"react.js","sources":["../../../../src/shared/utils/react.ts"],"sourcesContent":["import { Children, isValidElement, Fragment, cloneElement } from 'react'\n\nexport const removeFragments = (children: React.ReactNode, targetDepth = 1): React.ReactNode[] => {\n if (targetDepth <= 0) {\n return Children.toArray(children)\n }\n\n const func = (input: React.ReactNode, depth: number): React.ReactNode[] => {\n const iterable = Children.toArray(input).map((child, idx) =>\n isValidElement(child) ? cloneElement(child, { key: '.'.repeat(depth) + idx }) : child\n )\n\n if (depth >= targetDepth) {\n return iterable\n }\n\n return iterable.reduce<React.ReactNode[]>((acc, child) => {\n if (isValidElement(child) && child.type === Fragment) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n if (child.props.children) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n acc.push(...func(child.props.children, depth + 1))\n }\n } else {\n acc.push(child)\n }\n\n return acc\n }, [])\n }\n\n return func(children, 0)\n}\n"],"names":["removeFragments","children","targetDepth","Children","toArray","func","input","depth","iterable","map","child","idx","isValidElement","cloneElement","key","repeat","reduce","acc","type","Fragment","props","push"],"mappings":"gEAE+BA,CAACC,EAA2BC,EAAc,KACvE,GAAIA,GAAe,EACjB,OAAOC,MAAAA,SAASC,QAAQH,GAG1B,MAAMI,KAAOA,CAACC,EAAwBC,KACpC,MAAMC,EAAWL,MAAAA,SAASC,QAAQE,GAAOG,KAAI,CAACC,EAAOC,IACnDC,MAAAA,eAAeF,GAASG,MAAAA,aAAaH,EAAO,CAAEI,IAAK,IAAIC,OAAOR,GAASI,IAASD,IAGlF,OAAIH,GAASL,EACJM,EAGFA,EAASQ,QAA0B,CAACC,EAAKP,KAC1CE,MAAAA,eAAeF,IAAUA,EAAMQ,OAASC,MAAAA,SAGtCT,EAAMU,MAAMnB,UAGdgB,EAAII,QAAQhB,KAAKK,EAAMU,MAAMnB,SAAUM,EAAQ,IAGjDU,EAAII,KAAKX,GAGJO,IACN,GAAG,EAGR,OAAOZ,KAAKJ,EAAU,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","sources":["../../../../src/shared/utils/style.ts"],"sourcesContent":["import {\n commonPropKeyRegExp,\n colorSchemaPropKeyRegExp,\n responsiveSizePropKeyRegExp,\n marginPropKeyRegExp,\n responsiveMarginPropKeyRegExp,\n} from 'shared/regexp'\nimport type { CSSGlobalValue } from 'shared/types'\n\nexport const createShouldForwardProp = (...predicates: ((propKey: string) => boolean)[]) => {\n const cache: Record<string, boolean> = Object.create(null)\n\n return (propKey: string) => {\n if (cache[propKey] === undefined) {\n cache[propKey] =\n predicates.every((func) => func(propKey)) &&\n [\n commonPropKeyRegExp,\n colorSchemaPropKeyRegExp,\n responsiveSizePropKeyRegExp,\n marginPropKeyRegExp,\n responsiveMarginPropKeyRegExp,\n ].every((regExp) => !regExp.test(propKey))\n }\n\n return cache[propKey]\n }\n}\n\nexport const isCSSGlobalValue = (value: unknown): value is CSSGlobalValue =>\n typeof value === 'string' && ['initial', 'inherit', 'unset', 'revert', 'revert-layer'].includes(value)\n"],"names":["createShouldForwardProp","predicates","cache","Object","create","propKey","undefined","every","func","commonPropKeyRegExp","colorSchemaPropKeyRegExp","responsiveSizePropKeyRegExp","marginPropKeyRegExp","responsiveMarginPropKeyRegExp","regExp","test","value","includes"],"mappings":"gFASuCA,IAAIC,KACzC,MAAMC,EAAiCC,OAAOC,OAAO,MAErD,OAAQC,IACFH,EAAMG,UAAaC,IACrBJ,EAAMG,GACJJ,EAAWM,OAAOC,GAASA,EAAKH,MAChC,CACEI,OAAmBA,oBACnBC,OAAwBA,yBACxBC,mCACAC,OAAAA,oBACAC,OAA6BA,+BAC7BN,OAAOO,IAAYA,EAAOC,KAAKV,MAG9BH,EAAMG,GACd,2BAG8BW,UACxBA,GAAU,UAAY,CAAC,UAAW,UAAW,QAAS,SAAU,gBAAgBC,SAASD"}
1
+ {"version":3,"file":"style.js","sources":["../../../../src/shared/utils/style.ts"],"sourcesContent":["import {\n commonPropKeyRegExp,\n colorSchemaPropKeyRegExp,\n responsiveSizePropKeyRegExp,\n marginPropKeyRegExp,\n responsiveMarginPropKeyRegExp,\n} from 'shared/regexp'\nimport type { CSSGlobalValue } from 'shared/types'\n\nexport const createShouldForwardProp = (...predicates: ((propKey: string) => boolean)[]) => {\n const cache: Record<string, boolean> = Object.create(null)\n\n return (propKey: string) => {\n if (cache[propKey] === undefined) {\n cache[propKey] =\n predicates.every((func) => func(propKey)) &&\n [\n commonPropKeyRegExp,\n colorSchemaPropKeyRegExp,\n responsiveSizePropKeyRegExp,\n marginPropKeyRegExp,\n responsiveMarginPropKeyRegExp,\n ].every((regExp) => !regExp.test(propKey))\n }\n\n return cache[propKey]\n }\n}\n\nexport const isCSSGlobalValue = (value: unknown): value is CSSGlobalValue =>\n typeof value === 'string' && ['initial', 'inherit', 'unset', 'revert', 'revert-layer'].includes(value)\n"],"names":["createShouldForwardProp","predicates","cache","Object","create","propKey","undefined","every","func","commonPropKeyRegExp","colorSchemaPropKeyRegExp","responsiveSizePropKeyRegExp","marginPropKeyRegExp","responsiveMarginPropKeyRegExp","regExp","test","value","includes"],"mappings":"gFASuCA,IAAIC,KACzC,MAAMC,EAAiCC,OAAOC,OAAO,MAErD,OAAQC,IACFH,EAAMG,UAAaC,IACrBJ,EAAMG,GACJJ,EAAWM,OAAOC,GAASA,EAAKH,MAChC,CACEI,OAAAA,oBACAC,OAAAA,yBACAC,mCACAC,OAAAA,oBACAC,OAAAA,+BACAN,OAAOO,IAAYA,EAAOC,KAAKV,MAG9BH,EAAMG,GACd,2BAG8BW,UACxBA,GAAU,UAAY,CAAC,UAAW,UAAW,QAAS,SAAU,gBAAgBC,SAASD"}