@itcase/ui 1.1.5 → 1.1.7

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 (448) hide show
  1. package/dist/Accordion-JS45IVx7.js +204 -0
  2. package/dist/Breadcrumbs-KOoMbWmP.js +619 -0
  3. package/dist/ContextMenuItem-CF5L8xev.js +204 -0
  4. package/dist/DropdownItem-C0gYXEq6.js +644 -0
  5. package/dist/FlexItem-DHynUt6v.js +118 -0
  6. package/dist/GridRow-Buc4dsHd.js +1691 -0
  7. package/dist/Group-DhYXDvAJ.js +119 -0
  8. package/dist/ListItem-DYbK4_8c.js +479 -0
  9. package/dist/ModalLoader-DJVKhIZR.js +374 -0
  10. package/dist/NotificationList-KbxjrO3o.js +245 -0
  11. package/dist/SearchResult-DNPmzvp8.js +530 -0
  12. package/dist/SelectField-uEsQcoxF.js +571 -0
  13. package/dist/SiteMenuButton-DE_hCJUV.js +181 -0
  14. package/dist/TabGroup-CCR5jORT.js +1071 -0
  15. package/dist/Text-DffpwlYq.js +81 -0
  16. package/dist/cjs/Accordion-BDTE-Lkj.js +213 -0
  17. package/dist/cjs/Breadcrumbs-BV5q8aPJ.js +629 -0
  18. package/dist/cjs/ContextMenuItem-C8eg828K.js +213 -0
  19. package/dist/cjs/DropdownItem-DT8iQfVh.js +653 -0
  20. package/dist/cjs/FlexItem-CYXxJtYX.js +125 -0
  21. package/dist/cjs/GridRow-6wilpUeo.js +1701 -0
  22. package/dist/cjs/Group-DbzIk8kt.js +126 -0
  23. package/dist/cjs/ListItem-CTDoiG0C.js +488 -0
  24. package/dist/cjs/ModalLoader-4mmV5G4E.js +384 -0
  25. package/dist/cjs/NotificationList-B6QbYA9H.js +255 -0
  26. package/dist/cjs/SearchResult-CdsV7oDb.js +540 -0
  27. package/dist/cjs/SelectField-DVCsVz6q.js +583 -0
  28. package/dist/cjs/SiteMenuButton-CVdX1ouh.js +190 -0
  29. package/dist/cjs/TabGroup-B1LUF9Hg.js +1081 -0
  30. package/dist/cjs/Text-CfBPhwqK.js +88 -0
  31. package/dist/cjs/components/Accordion/Accordion.d.ts +8 -0
  32. package/dist/cjs/components/Accordion/Accordion.interface.d.ts +68 -0
  33. package/dist/cjs/components/Accordion/AccordionItem.d.ts +8 -0
  34. package/dist/cjs/components/Accordion/index.d.ts +3 -0
  35. package/dist/cjs/components/Accordion.js +45 -0
  36. package/dist/cjs/components/Avatar.js +270 -0
  37. package/dist/cjs/components/Badge.js +206 -0
  38. package/dist/cjs/components/Breadcrumbs.js +48 -0
  39. package/dist/cjs/components/Button.js +563 -0
  40. package/dist/cjs/components/Caption.js +197 -0
  41. package/dist/cjs/components/Card.js +279 -0
  42. package/dist/cjs/components/Cell.js +426 -0
  43. package/dist/cjs/components/Checkbox.js +166 -0
  44. package/dist/cjs/components/Chips.js +393 -0
  45. package/dist/cjs/components/Choice.js +351 -0
  46. package/dist/cjs/components/Code.js +437 -0
  47. package/dist/cjs/components/ContextMenu.js +48 -0
  48. package/dist/cjs/components/CookiesWarning.js +186 -0
  49. package/dist/cjs/components/DadataHintField.js +1193 -0
  50. package/dist/cjs/components/DatePicker.js +14102 -0
  51. package/dist/{components/Background.js → cjs/components/Divider.js} +75 -83
  52. package/dist/cjs/components/Dot.js +226 -0
  53. package/dist/cjs/components/Drawer.js +274 -0
  54. package/dist/cjs/components/Dropdown.js +36 -0
  55. package/dist/cjs/components/Flex/Flex.d.ts +8 -0
  56. package/dist/cjs/components/Flex/Flex.interface.d.ts +116 -0
  57. package/dist/cjs/components/Flex/FlexItem.d.ts +8 -0
  58. package/dist/cjs/components/Flex/index.d.ts +3 -0
  59. package/dist/cjs/components/Flex.js +22 -0
  60. package/dist/cjs/components/FormField.js +59 -0
  61. package/dist/cjs/components/Grid.js +30 -0
  62. package/dist/cjs/components/Group/Group.d.ts +9 -0
  63. package/dist/cjs/components/Group/Group.interface.d.ts +49 -0
  64. package/dist/cjs/components/Group/index.d.ts +1 -0
  65. package/dist/cjs/components/Group.js +22 -0
  66. package/dist/cjs/components/Icon.js +641 -0
  67. package/dist/cjs/components/Image.js +480 -0
  68. package/dist/cjs/components/Input.js +233 -0
  69. package/dist/cjs/components/InputMask.js +233 -0
  70. package/dist/cjs/components/InputPassword.js +260 -0
  71. package/dist/cjs/components/Label.js +643 -0
  72. package/dist/cjs/components/LanguageSelector.js +130 -0
  73. package/dist/cjs/components/Link.js +505 -0
  74. package/dist/cjs/components/List.js +31 -0
  75. package/dist/cjs/components/Loader.js +156 -0
  76. package/dist/cjs/components/Logo.js +182 -0
  77. package/dist/cjs/components/Menu.js +192 -0
  78. package/dist/cjs/components/MenuItem.js +680 -0
  79. package/dist/cjs/components/Modal.js +28 -0
  80. package/dist/cjs/components/Notification.js +37 -0
  81. package/dist/cjs/components/Overlay.js +197 -0
  82. package/dist/cjs/components/Page.js +422 -0
  83. package/dist/cjs/components/Pagination.js +372 -0
  84. package/dist/cjs/components/Radio.js +267 -0
  85. package/dist/cjs/components/RangeSlider.js +296 -0
  86. package/dist/cjs/components/Response.js +248 -0
  87. package/dist/cjs/components/ScrollOnDrag.js +214 -0
  88. package/dist/cjs/components/Scrollbar.js +71 -0
  89. package/dist/cjs/components/Search.js +48 -0
  90. package/dist/cjs/components/Segmented.js +235 -0
  91. package/dist/cjs/components/Select.js +8538 -0
  92. package/dist/cjs/components/SiteMenu.js +45 -0
  93. package/dist/cjs/components/Swiper.js +5655 -0
  94. package/dist/cjs/components/Switch.js +105 -0
  95. package/dist/cjs/components/Tab.js +42 -0
  96. package/dist/cjs/components/Text/Text.d.ts +9 -0
  97. package/dist/cjs/components/Text/Text.interface.d.ts +51 -0
  98. package/dist/cjs/components/Text/index.d.ts +1 -0
  99. package/dist/cjs/components/Text.js +22 -0
  100. package/dist/cjs/components/Textarea.js +212 -0
  101. package/dist/cjs/components/Tile.js +571 -0
  102. package/dist/cjs/components/Title.js +400 -0
  103. package/dist/cjs/components/Tooltip.js +451 -0
  104. package/dist/cjs/components/Video.js +175 -0
  105. package/dist/cjs/components/Wrapper.js +438 -0
  106. package/dist/cjs/components/index.d.ts +58 -0
  107. package/dist/cjs/components.js +241 -0
  108. package/dist/cjs/constants/componentProps/align.js +7 -0
  109. package/dist/cjs/constants/componentProps/alignDirection.js +7 -0
  110. package/dist/cjs/constants/componentProps/alignment.js +7 -0
  111. package/dist/cjs/constants/componentProps/borderColor.js +7 -0
  112. package/dist/cjs/constants/componentProps/borderColorHover.js +7 -0
  113. package/dist/cjs/constants/componentProps/borderType.js +7 -0
  114. package/dist/cjs/constants/componentProps/borderWidth.js +9 -0
  115. package/dist/cjs/constants/componentProps/captionPosition.js +7 -0
  116. package/dist/cjs/constants/componentProps/direction.js +7 -0
  117. package/dist/cjs/constants/componentProps/emojiSize.js +9 -0
  118. package/dist/cjs/constants/componentProps/fill.js +7 -0
  119. package/dist/cjs/constants/componentProps/fillGradient.js +7 -0
  120. package/dist/cjs/constants/componentProps/fillHover.js +7 -0
  121. package/dist/cjs/constants/componentProps/fillType.js +7 -0
  122. package/dist/cjs/constants/componentProps/flexAlign.js +7 -0
  123. package/dist/cjs/constants/componentProps/flexJustifyContent.js +7 -0
  124. package/dist/cjs/constants/componentProps/flexWrap.js +7 -0
  125. package/dist/cjs/constants/componentProps/gridAlign.js +7 -0
  126. package/dist/cjs/constants/componentProps/gridAlignSelf.js +7 -0
  127. package/dist/cjs/constants/componentProps/gridJustifyItems.js +7 -0
  128. package/dist/cjs/constants/componentProps/gridJustifySelf.js +7 -0
  129. package/dist/cjs/constants/componentProps/height.js +7 -0
  130. package/dist/cjs/constants/componentProps/horizontalContentAlign.js +7 -0
  131. package/dist/cjs/constants/componentProps/horizontalResizeMode.js +7 -0
  132. package/dist/cjs/constants/componentProps/iconFillSize.js +9 -0
  133. package/dist/cjs/constants/componentProps/iconSize.js +9 -0
  134. package/dist/cjs/constants/componentProps/itemColor.js +7 -0
  135. package/dist/cjs/constants/componentProps/position.js +7 -0
  136. package/dist/cjs/constants/componentProps/resizeMode.js +7 -0
  137. package/dist/cjs/constants/componentProps/shape.js +7 -0
  138. package/dist/cjs/constants/componentProps/size.js +7 -0
  139. package/dist/cjs/constants/componentProps/sizeInterface.js +7 -0
  140. package/dist/cjs/constants/componentProps/sizePX.js +9 -0
  141. package/dist/cjs/constants/componentProps/stacking.js +7 -0
  142. package/dist/cjs/constants/componentProps/state.js +7 -0
  143. package/dist/cjs/constants/componentProps/strokeColor.js +7 -0
  144. package/dist/cjs/constants/componentProps/textAlign.js +7 -0
  145. package/dist/cjs/constants/componentProps/textColor.js +7 -0
  146. package/dist/cjs/constants/componentProps/textColorActive.js +7 -0
  147. package/dist/cjs/constants/componentProps/textColorHover.js +7 -0
  148. package/dist/cjs/constants/componentProps/textGradient.js +7 -0
  149. package/dist/cjs/constants/componentProps/textSize.js +7 -0
  150. package/dist/cjs/constants/componentProps/textStyle.js +7 -0
  151. package/dist/cjs/constants/componentProps/textTag.js +7 -0
  152. package/dist/cjs/constants/componentProps/textWeight.js +9 -0
  153. package/dist/cjs/constants/componentProps/textWrap.js +7 -0
  154. package/dist/cjs/constants/componentProps/titleSize.js +7 -0
  155. package/dist/cjs/constants/componentProps/type.js +7 -0
  156. package/dist/cjs/constants/componentProps/underline.js +7 -0
  157. package/dist/cjs/constants/componentProps/verticalContentAlign.js +7 -0
  158. package/dist/cjs/constants/componentProps/verticalResizeMode.js +7 -0
  159. package/dist/cjs/constants/componentProps/width.js +7 -0
  160. package/dist/cjs/constants/componentProps/wrap.js +7 -0
  161. package/dist/cjs/constants-ts/componentProps/align.d.ts +1 -0
  162. package/dist/cjs/constants-ts/componentProps/alignDirection.d.ts +1 -0
  163. package/dist/cjs/constants-ts/componentProps/alignment.d.ts +1 -0
  164. package/dist/cjs/constants-ts/componentProps/borderColor.d.ts +1 -0
  165. package/dist/cjs/constants-ts/componentProps/borderColorHover.d.ts +1 -0
  166. package/dist/cjs/constants-ts/componentProps/borderType.d.ts +1 -0
  167. package/dist/cjs/constants-ts/componentProps/borderWidth.d.ts +1 -0
  168. package/dist/cjs/constants-ts/componentProps/captionPosition.d.ts +1 -0
  169. package/dist/cjs/constants-ts/componentProps/direction.d.ts +1 -0
  170. package/dist/cjs/constants-ts/componentProps/elevation.d.ts +1 -0
  171. package/dist/cjs/constants-ts/componentProps/emojiSize.d.ts +1 -0
  172. package/dist/cjs/constants-ts/componentProps/fill.d.ts +1 -0
  173. package/dist/cjs/constants-ts/componentProps/fillGradient.d.ts +1 -0
  174. package/dist/cjs/constants-ts/componentProps/fillHover.d.ts +1 -0
  175. package/dist/cjs/constants-ts/componentProps/fillType.d.ts +1 -0
  176. package/dist/cjs/constants-ts/componentProps/flexAlign.d.ts +1 -0
  177. package/dist/cjs/constants-ts/componentProps/flexGrow.d.ts +1 -0
  178. package/dist/cjs/constants-ts/componentProps/flexJustifyContent.d.ts +1 -0
  179. package/dist/cjs/constants-ts/componentProps/flexWrap.d.ts +1 -0
  180. package/dist/cjs/constants-ts/componentProps/gridAlign.d.ts +1 -0
  181. package/dist/cjs/constants-ts/componentProps/gridAlignSelf.d.ts +1 -0
  182. package/dist/cjs/constants-ts/componentProps/gridJustifyItems.d.ts +1 -0
  183. package/dist/cjs/constants-ts/componentProps/gridJustifySelf.d.ts +1 -0
  184. package/dist/cjs/constants-ts/componentProps/height.d.ts +1 -0
  185. package/dist/cjs/constants-ts/componentProps/horizontalContentAlign.d.ts +1 -0
  186. package/dist/cjs/constants-ts/componentProps/horizontalResizeMode.d.ts +1 -0
  187. package/dist/cjs/constants-ts/componentProps/iconFillSize.d.ts +1 -0
  188. package/dist/cjs/constants-ts/componentProps/iconSize.d.ts +1 -0
  189. package/dist/cjs/constants-ts/componentProps/itemColor.d.ts +1 -0
  190. package/dist/cjs/constants-ts/componentProps/justifyContent.d.ts +1 -0
  191. package/dist/cjs/constants-ts/componentProps/position.d.ts +1 -0
  192. package/dist/cjs/constants-ts/componentProps/resizeMode.d.ts +1 -0
  193. package/dist/cjs/constants-ts/componentProps/shape.d.ts +1 -0
  194. package/dist/cjs/constants-ts/componentProps/size.d.ts +1 -0
  195. package/dist/cjs/constants-ts/componentProps/sizeInterface.d.ts +1 -0
  196. package/dist/cjs/constants-ts/componentProps/sizePX.d.ts +1 -0
  197. package/dist/cjs/constants-ts/componentProps/stacking.d.ts +1 -0
  198. package/dist/cjs/constants-ts/componentProps/state.d.ts +1 -0
  199. package/dist/cjs/constants-ts/componentProps/strokeColor.d.ts +1 -0
  200. package/dist/cjs/constants-ts/componentProps/textAlign.d.ts +1 -0
  201. package/dist/cjs/constants-ts/componentProps/textColor.d.ts +1 -0
  202. package/dist/cjs/constants-ts/componentProps/textColorActive.d.ts +1 -0
  203. package/dist/cjs/constants-ts/componentProps/textColorHover.d.ts +1 -0
  204. package/dist/cjs/constants-ts/componentProps/textGradient.d.ts +1 -0
  205. package/dist/cjs/constants-ts/componentProps/textSize.d.ts +1 -0
  206. package/dist/cjs/constants-ts/componentProps/textStyle.d.ts +1 -0
  207. package/dist/cjs/constants-ts/componentProps/textTag.d.ts +1 -0
  208. package/dist/cjs/constants-ts/componentProps/textWeight.d.ts +1 -0
  209. package/dist/cjs/constants-ts/componentProps/textWrap.d.ts +1 -0
  210. package/dist/cjs/constants-ts/componentProps/titleSize.d.ts +1 -0
  211. package/dist/cjs/constants-ts/componentProps/type.d.ts +1 -0
  212. package/dist/cjs/constants-ts/componentProps/underline.d.ts +1 -0
  213. package/dist/cjs/constants-ts/componentProps/verticalContentAlign.d.ts +1 -0
  214. package/dist/cjs/constants-ts/componentProps/verticalResizeMode.d.ts +1 -0
  215. package/dist/cjs/constants-ts/componentProps/width.d.ts +1 -0
  216. package/dist/cjs/constants-ts/componentProps/wrap.d.ts +1 -0
  217. package/dist/cjs/constants-ts/index.d.ts +56 -0
  218. package/dist/cjs/constants.js +111 -0
  219. package/dist/cjs/context/Notifications.js +122 -0
  220. package/dist/cjs/context/UIContext.js +56 -0
  221. package/dist/cjs/context/index.d.ts +2 -0
  222. package/dist/cjs/hooks/index.d.ts +3 -0
  223. package/dist/cjs/hooks/styleAttributes.interface.d.ts +145 -0
  224. package/dist/cjs/hooks/styleAttributes.js +39 -0
  225. package/dist/cjs/hooks/useDeviceTargetClass.js +61 -0
  226. package/dist/cjs/hooks/useMediaQueries.js +139 -0
  227. package/dist/cjs/hooks/useStyles.js +135 -0
  228. package/dist/cjs/index.d.ts +4 -0
  229. package/dist/cjs/jsx-runtime-BCmQOGxJ.js +1363 -0
  230. package/dist/components/Accordion/Accordion.d.ts +8 -0
  231. package/dist/components/Accordion/Accordion.interface.d.ts +68 -0
  232. package/dist/components/Accordion/AccordionItem.d.ts +8 -0
  233. package/dist/components/Accordion/index.d.ts +3 -0
  234. package/dist/components/Accordion.js +38 -697
  235. package/dist/components/Avatar.js +75 -70
  236. package/dist/components/Badge.js +41 -56
  237. package/dist/components/Breadcrumbs.js +41 -656
  238. package/dist/components/Button.js +115 -107
  239. package/dist/components/Caption.js +37 -45
  240. package/dist/components/Card.js +47 -60
  241. package/dist/components/Cell.js +87 -96
  242. package/dist/components/Checkbox.js +41 -56
  243. package/dist/components/Chips.js +64 -78
  244. package/dist/components/Choice.js +81 -91
  245. package/dist/components/Code.js +40 -48
  246. package/dist/components/ContextMenu.js +41 -246
  247. package/dist/components/CookiesWarning.js +61 -73
  248. package/dist/components/DadataHintField.js +59 -65
  249. package/dist/components/DatePicker.js +5255 -425
  250. package/dist/components/Divider.js +47 -55
  251. package/dist/components/Dot.js +37 -45
  252. package/dist/components/Drawer.js +26 -34
  253. package/dist/components/Dropdown.js +29 -657
  254. package/dist/components/Flex/Flex.d.ts +8 -0
  255. package/dist/components/Flex/Flex.interface.d.ts +116 -0
  256. package/dist/components/Flex/FlexItem.d.ts +8 -0
  257. package/dist/components/Flex/index.d.ts +3 -0
  258. package/dist/components/Flex.js +15 -1185
  259. package/dist/components/FormField.js +49 -617
  260. package/dist/components/Grid.js +22 -1705
  261. package/dist/components/Group/Group.d.ts +9 -0
  262. package/dist/components/Group/Group.interface.d.ts +49 -0
  263. package/dist/components/Group/index.d.ts +1 -0
  264. package/dist/components/Group.js +15 -315
  265. package/dist/components/Icon.js +113 -124
  266. package/dist/components/Image.js +78 -94
  267. package/dist/components/Input.js +40 -49
  268. package/dist/components/InputMask.js +39 -48
  269. package/dist/components/InputPassword.js +66 -76
  270. package/dist/components/Label.js +104 -114
  271. package/dist/components/LanguageSelector.js +53 -62
  272. package/dist/components/Link.js +74 -84
  273. package/dist/components/List.js +24 -498
  274. package/dist/components/Loader.js +41 -56
  275. package/dist/components/Logo.js +47 -55
  276. package/dist/components/Menu.js +51 -58
  277. package/dist/components/MenuItem.js +103 -111
  278. package/dist/components/Modal.js +21 -402
  279. package/dist/components/Notification.js +29 -281
  280. package/dist/components/Overlay.js +37 -45
  281. package/dist/components/Page.js +66 -74
  282. package/dist/components/Pagination.js +223 -54
  283. package/dist/components/Radio.js +55 -70
  284. package/dist/components/RangeSlider.js +53 -62
  285. package/dist/components/Response.js +109 -122
  286. package/dist/components/ScrollOnDrag.js +80 -164
  287. package/dist/components/Scrollbar.js +15 -18
  288. package/dist/components/Search.js +40 -571
  289. package/dist/components/Segmented.js +54 -69
  290. package/dist/components/Select.js +281 -324
  291. package/dist/components/SiteMenu.js +38 -221
  292. package/dist/components/Swiper.js +183 -186
  293. package/dist/components/Switch.js +17 -25
  294. package/dist/components/Tab.js +34 -1089
  295. package/dist/components/Text/Text.d.ts +9 -0
  296. package/dist/components/Text/Text.interface.d.ts +51 -0
  297. package/dist/components/Text/index.d.ts +1 -0
  298. package/dist/components/Text.js +15 -362
  299. package/dist/components/Textarea.js +37 -46
  300. package/dist/components/Tile.js +103 -112
  301. package/dist/components/Title.js +66 -75
  302. package/dist/components/Tooltip.js +83 -93
  303. package/dist/components/Video.js +32 -40
  304. package/dist/components/Wrapper.js +67 -75
  305. package/dist/components/index.d.ts +58 -0
  306. package/dist/components.js +124 -0
  307. package/dist/constants/componentProps/align.js +1 -3
  308. package/dist/constants/componentProps/alignDirection.js +1 -3
  309. package/dist/constants/componentProps/alignment.js +1 -3
  310. package/dist/constants/componentProps/borderColor.js +1 -3
  311. package/dist/constants/componentProps/borderColorHover.js +1 -3
  312. package/dist/constants/componentProps/borderType.js +1 -3
  313. package/dist/constants/componentProps/borderWidth.js +1 -3
  314. package/dist/constants/componentProps/captionPosition.js +1 -3
  315. package/dist/constants/componentProps/direction.js +1 -3
  316. package/dist/constants/componentProps/emojiSize.js +1 -3
  317. package/dist/constants/componentProps/fill.js +1 -3
  318. package/dist/constants/componentProps/fillGradient.js +1 -3
  319. package/dist/constants/componentProps/fillHover.js +1 -3
  320. package/dist/constants/componentProps/fillType.js +1 -3
  321. package/dist/constants/componentProps/flexAlign.js +1 -3
  322. package/dist/constants/componentProps/flexJustifyContent.js +1 -3
  323. package/dist/constants/componentProps/flexWrap.js +1 -3
  324. package/dist/constants/componentProps/gridAlign.js +1 -3
  325. package/dist/constants/componentProps/gridAlignSelf.js +1 -3
  326. package/dist/constants/componentProps/gridJustifyItems.js +1 -3
  327. package/dist/constants/componentProps/gridJustifySelf.js +1 -3
  328. package/dist/constants/componentProps/height.js +1 -3
  329. package/dist/constants/componentProps/horizontalContentAlign.js +1 -3
  330. package/dist/constants/componentProps/horizontalResizeMode.js +1 -3
  331. package/dist/constants/componentProps/iconFillSize.js +1 -3
  332. package/dist/constants/componentProps/iconSize.js +1 -3
  333. package/dist/constants/componentProps/itemColor.js +1 -3
  334. package/dist/constants/componentProps/position.js +1 -3
  335. package/dist/constants/componentProps/resizeMode.js +1 -3
  336. package/dist/constants/componentProps/shape.js +1 -3
  337. package/dist/constants/componentProps/size.js +1 -3
  338. package/dist/constants/componentProps/sizeInterface.js +1 -3
  339. package/dist/constants/componentProps/sizePX.js +1 -3
  340. package/dist/constants/componentProps/stacking.js +1 -3
  341. package/dist/constants/componentProps/state.js +1 -3
  342. package/dist/constants/componentProps/strokeColor.js +1 -3
  343. package/dist/constants/componentProps/textAlign.js +1 -3
  344. package/dist/constants/componentProps/textColor.js +1 -3
  345. package/dist/constants/componentProps/textColorActive.js +1 -3
  346. package/dist/constants/componentProps/textColorHover.js +1 -3
  347. package/dist/constants/componentProps/textGradient.js +1 -3
  348. package/dist/constants/componentProps/textSize.js +1 -3
  349. package/dist/constants/componentProps/textStyle.js +1 -3
  350. package/dist/constants/componentProps/textTag.js +1 -3
  351. package/dist/constants/componentProps/textWeight.js +1 -3
  352. package/dist/constants/componentProps/textWrap.js +1 -3
  353. package/dist/constants/componentProps/titleSize.js +1 -3
  354. package/dist/constants/componentProps/type.js +1 -3
  355. package/dist/constants/componentProps/underline.js +1 -3
  356. package/dist/constants/componentProps/verticalContentAlign.js +1 -3
  357. package/dist/constants/componentProps/verticalResizeMode.js +1 -3
  358. package/dist/constants/componentProps/width.js +1 -3
  359. package/dist/constants/componentProps/wrap.js +1 -3
  360. package/dist/constants-ts/componentProps/align.d.ts +1 -0
  361. package/dist/constants-ts/componentProps/alignDirection.d.ts +1 -0
  362. package/dist/constants-ts/componentProps/alignment.d.ts +1 -0
  363. package/dist/constants-ts/componentProps/borderColor.d.ts +1 -0
  364. package/dist/constants-ts/componentProps/borderColorHover.d.ts +1 -0
  365. package/dist/constants-ts/componentProps/borderType.d.ts +1 -0
  366. package/dist/constants-ts/componentProps/borderWidth.d.ts +1 -0
  367. package/dist/constants-ts/componentProps/captionPosition.d.ts +1 -0
  368. package/dist/constants-ts/componentProps/direction.d.ts +1 -0
  369. package/dist/constants-ts/componentProps/elevation.d.ts +1 -0
  370. package/dist/constants-ts/componentProps/emojiSize.d.ts +1 -0
  371. package/dist/constants-ts/componentProps/fill.d.ts +1 -0
  372. package/dist/constants-ts/componentProps/fillGradient.d.ts +1 -0
  373. package/dist/constants-ts/componentProps/fillHover.d.ts +1 -0
  374. package/dist/constants-ts/componentProps/fillType.d.ts +1 -0
  375. package/dist/constants-ts/componentProps/flexAlign.d.ts +1 -0
  376. package/dist/constants-ts/componentProps/flexGrow.d.ts +1 -0
  377. package/dist/constants-ts/componentProps/flexJustifyContent.d.ts +1 -0
  378. package/dist/constants-ts/componentProps/flexWrap.d.ts +1 -0
  379. package/dist/constants-ts/componentProps/gridAlign.d.ts +1 -0
  380. package/dist/constants-ts/componentProps/gridAlignSelf.d.ts +1 -0
  381. package/dist/constants-ts/componentProps/gridJustifyItems.d.ts +1 -0
  382. package/dist/constants-ts/componentProps/gridJustifySelf.d.ts +1 -0
  383. package/dist/constants-ts/componentProps/height.d.ts +1 -0
  384. package/dist/constants-ts/componentProps/horizontalContentAlign.d.ts +1 -0
  385. package/dist/constants-ts/componentProps/horizontalResizeMode.d.ts +1 -0
  386. package/dist/constants-ts/componentProps/iconFillSize.d.ts +1 -0
  387. package/dist/constants-ts/componentProps/iconSize.d.ts +1 -0
  388. package/dist/constants-ts/componentProps/itemColor.d.ts +1 -0
  389. package/dist/constants-ts/componentProps/justifyContent.d.ts +1 -0
  390. package/dist/constants-ts/componentProps/position.d.ts +1 -0
  391. package/dist/constants-ts/componentProps/resizeMode.d.ts +1 -0
  392. package/dist/constants-ts/componentProps/shape.d.ts +1 -0
  393. package/dist/constants-ts/componentProps/size.d.ts +1 -0
  394. package/dist/constants-ts/componentProps/sizeInterface.d.ts +1 -0
  395. package/dist/constants-ts/componentProps/sizePX.d.ts +1 -0
  396. package/dist/constants-ts/componentProps/stacking.d.ts +1 -0
  397. package/dist/constants-ts/componentProps/state.d.ts +1 -0
  398. package/dist/constants-ts/componentProps/strokeColor.d.ts +1 -0
  399. package/dist/constants-ts/componentProps/textAlign.d.ts +1 -0
  400. package/dist/constants-ts/componentProps/textColor.d.ts +1 -0
  401. package/dist/constants-ts/componentProps/textColorActive.d.ts +1 -0
  402. package/dist/constants-ts/componentProps/textColorHover.d.ts +1 -0
  403. package/dist/constants-ts/componentProps/textGradient.d.ts +1 -0
  404. package/dist/constants-ts/componentProps/textSize.d.ts +1 -0
  405. package/dist/constants-ts/componentProps/textStyle.d.ts +1 -0
  406. package/dist/constants-ts/componentProps/textTag.d.ts +1 -0
  407. package/dist/constants-ts/componentProps/textWeight.d.ts +1 -0
  408. package/dist/constants-ts/componentProps/textWrap.d.ts +1 -0
  409. package/dist/constants-ts/componentProps/titleSize.d.ts +1 -0
  410. package/dist/constants-ts/componentProps/type.d.ts +1 -0
  411. package/dist/constants-ts/componentProps/underline.d.ts +1 -0
  412. package/dist/constants-ts/componentProps/verticalContentAlign.d.ts +1 -0
  413. package/dist/constants-ts/componentProps/verticalResizeMode.d.ts +1 -0
  414. package/dist/constants-ts/componentProps/width.d.ts +1 -0
  415. package/dist/constants-ts/componentProps/wrap.d.ts +1 -0
  416. package/dist/constants-ts/index.d.ts +56 -0
  417. package/dist/constants.js +53 -111
  418. package/dist/context/Notifications.js +16 -25
  419. package/dist/context/UIContext.js +20 -29
  420. package/dist/context/index.d.ts +2 -0
  421. package/dist/css/components/Avatar/Avatar.css +10 -0
  422. package/dist/css/components/Button/Button.css +1 -1
  423. package/dist/css/components/DatePicker/DatePicker.css +11 -10
  424. package/dist/css/components/Dropdown/Dropdown.css +41 -15
  425. package/dist/css/components/Grid/Grid.css +9 -17
  426. package/dist/css/components/MenuItem/MenuItem.css +5 -5
  427. package/dist/css/components/Modal/Modal.css +1 -0
  428. package/dist/css/components/Pagination/Pagination.css +55 -32
  429. package/dist/css/components/Pagination/css/__item/pagination__item.css +27 -25
  430. package/dist/css/components/ScrollOnDrag/ScrollOnDrag.css +30 -5
  431. package/dist/css/components/Scrollbar/Scrollbar.css +56 -0
  432. package/dist/css/components/Select/Select.css +9 -1
  433. package/dist/css/components/Select/css/__single-value/select__single-value.css +1 -1
  434. package/dist/css/components/Swiper/Swiper.css +2 -2
  435. package/dist/css/styles/text-color/text-color_active.css +4 -2
  436. package/dist/floating-ui.dom-BQ7wiYTi.js +1374 -0
  437. package/dist/hooks/index.d.ts +3 -0
  438. package/dist/hooks/styleAttributes.interface.d.ts +145 -0
  439. package/dist/hooks/styleAttributes.js +5 -7
  440. package/dist/hooks/useDeviceTargetClass.js +13 -20
  441. package/dist/hooks/useMediaQueries.js +16 -10
  442. package/dist/hooks/useStyles.js +22 -30
  443. package/dist/index.d.ts +4 -0
  444. package/dist/jsx-runtime-ClDdVO4Q.js +1357 -0
  445. package/package.json +91 -40
  446. package/dist/_commonjsHelpers-CFO10eej.js +0 -7
  447. package/dist/css/components/Background/Background.css +0 -11
  448. /package/dist/{floating-ui.dom-C34fOuI9.js → cjs/floating-ui.dom-C34fOuI9.js} +0 -0
@@ -0,0 +1,56 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var PropTypes = require('prop-types');
5
+ var useMediaQueries = require('../hooks/useMediaQueries.js');
6
+ require('react-responsive');
7
+
8
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
+
10
+ var React__default = /*#__PURE__*/_interopDefault(React);
11
+ var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
12
+
13
+ const UserDeviceContext = /*#__PURE__*/React.createContext({
14
+ isMobile: false,
15
+ isTablet: false,
16
+ isDesktop: false
17
+ });
18
+ const SiteMenuContext = /*#__PURE__*/React.createContext({
19
+ isSiteMenuOpen: false,
20
+ setIsSiteMenuOpen: () => {}
21
+ });
22
+ function useUserDeviceContext() {
23
+ return React.useContext(UserDeviceContext);
24
+ }
25
+ function useSiteMenuContext() {
26
+ return React.useContext(SiteMenuContext);
27
+ }
28
+ const UIProvider = /*#__PURE__*/React.memo(function UIProvider(props) {
29
+ const {
30
+ children,
31
+ userDeviceState = {}
32
+ } = props;
33
+ const [isSiteMenuOpen, setIsSiteMenuOpen] = React.useState(false);
34
+ const siteMenuContextState = React.useMemo(() => ({
35
+ isSiteMenuOpen,
36
+ setIsSiteMenuOpen
37
+ }), [isSiteMenuOpen]);
38
+ const mediaQueriesDevices = useMediaQueries.useMediaQueries(userDeviceState);
39
+ return /*#__PURE__*/React__default.default.createElement(UserDeviceContext.Provider, {
40
+ value: mediaQueriesDevices
41
+ }, /*#__PURE__*/React__default.default.createElement(SiteMenuContext.Provider, {
42
+ value: siteMenuContextState
43
+ }, children));
44
+ });
45
+ UIProvider.propTypes = {
46
+ children: PropTypes__default.default.any,
47
+ userDeviceState: PropTypes__default.default.shape({
48
+ isMobile: PropTypes__default.default.bool,
49
+ isTablet: PropTypes__default.default.bool,
50
+ isDesktop: PropTypes__default.default.bool
51
+ })
52
+ };
53
+
54
+ exports.UIProvider = UIProvider;
55
+ exports.useSiteMenuContext = useSiteMenuContext;
56
+ exports.useUserDeviceContext = useUserDeviceContext;
@@ -0,0 +1,2 @@
1
+ export { NotificationsProvider, useNotifications, useNotificationsAPI } from './Notifications';
2
+ export { UIProvider, useSiteMenuContext, useUserDeviceContext } from './UIContext';
@@ -0,0 +1,3 @@
1
+ export { useDeviceTargetClass } from './useDeviceTargetClass';
2
+ export { useMediaQueries } from './useMediaQueries';
3
+ export { useStyles } from './useStyles';
@@ -0,0 +1,145 @@
1
+ export interface TypeStyleAttributes {
2
+ /**
3
+ * Layout
4
+ */
5
+ alignContent?: string;
6
+ alignItems?: string;
7
+ alignSelf?: string;
8
+ aspectRatio?: string;
9
+ border?: string;
10
+ borderBottomWidth?: string;
11
+ borderEndWidth?: string;
12
+ borderLeftWidth?: string;
13
+ borderRightWidth?: string;
14
+ borderStartWidth?: string;
15
+ borderTopWidth?: string;
16
+ borderWidth?: string;
17
+ bottom?: string;
18
+ display?: string;
19
+ end?: string;
20
+ flex?: string;
21
+ flexBasis?: string;
22
+ flexDirection?: string;
23
+ flexShrink?: string;
24
+ flexWrap?: string;
25
+ gap?: string;
26
+ rowGap?: string;
27
+ columnGap?: string;
28
+ columnWidth?: string;
29
+ height?: string;
30
+ left?: string;
31
+ margin?: string;
32
+ marginBottom?: string;
33
+ marginEnd?: string;
34
+ marginHorizontal?: string;
35
+ marginLeft?: string;
36
+ marginRight?: string;
37
+ marginStart?: string;
38
+ marginTop?: string;
39
+ marginVertical?: string;
40
+ maxHeight?: string;
41
+ maxWidth?: string;
42
+ minHeight?: string;
43
+ minWidth?: string;
44
+ overflow?: string;
45
+ padding?: string;
46
+ paddingBottom?: string;
47
+ paddingEnd?: string;
48
+ paddingHorizontal?: string;
49
+ paddingLeft?: string;
50
+ paddingRight?: string;
51
+ paddingStart?: string;
52
+ paddingTop?: string;
53
+ paddingVertical?: string;
54
+ position?: string;
55
+ right?: string;
56
+ start?: string;
57
+ top?: string;
58
+ width?: string;
59
+ zIndex?: string;
60
+ order?: string;
61
+ /**
62
+ * Shadow
63
+ */
64
+ shadowColor?: string;
65
+ shadowOffset?: string;
66
+ shadowOpacity?: string;
67
+ shadowRadius?: string;
68
+ /**
69
+ * Transform
70
+ */
71
+ transform?: string;
72
+ /**
73
+ * View
74
+ */
75
+ background?: string;
76
+ backgroundColor?: string;
77
+ borderBottomColor?: string;
78
+ borderBottomEndRadius?: string;
79
+ borderBottomLeftRadius?: string;
80
+ borderBottomRightRadius?: string;
81
+ borderBottomStartRadius?: string;
82
+ borderColor?: string;
83
+ borderCurve?: string;
84
+ borderEndColor?: string;
85
+ borderLeftColor?: string;
86
+ borderRadius?: string;
87
+ borderRightColor?: string;
88
+ borderStartColor?: string;
89
+ borderStyle?: string;
90
+ borderTopColor?: string;
91
+ borderTopEndRadius?: string;
92
+ borderTopLeftRadius?: string;
93
+ borderTopRightRadius?: string;
94
+ borderTopStartRadius?: string;
95
+ opacity?: string;
96
+ cursor?: string;
97
+ /**
98
+ * Text
99
+ */
100
+ color?: string;
101
+ fontFamily?: string;
102
+ fontSize?: string;
103
+ fontStyle?: string;
104
+ fontVariant?: string;
105
+ fontWeight?: string;
106
+ letterSpacing?: string;
107
+ lineHeight?: string;
108
+ textAlign?: string;
109
+ textDecorationColor?: string;
110
+ textDecorationLine?: string;
111
+ textDecorationStyle?: string;
112
+ textShadowColor?: string;
113
+ textShadowOffset?: string;
114
+ textShadowRadius?: string;
115
+ textTransform?: string;
116
+ verticalAlign?: string;
117
+ writingMode?: string;
118
+ whiteSpace?: string;
119
+ /**
120
+ * Image
121
+ */
122
+ overlayColor?: string;
123
+ resizeMode?: string;
124
+ tintColor?: string;
125
+ objectFit?: string;
126
+ /**
127
+ * Grid
128
+ */
129
+ gridTemplateColumns?: string;
130
+ gridArea?: string;
131
+ gridAutoColumns?: string;
132
+ gridAutoFlow?: string;
133
+ gridAutoRows?: string;
134
+ gridTemplate?: string;
135
+ gridTemplateAreas?: string;
136
+ gridTemplateRows?: string;
137
+ gridColumn?: string;
138
+ gridColumnGap?: string;
139
+ gridRow?: string;
140
+ gridRowGap?: string;
141
+ /**
142
+ * Filter
143
+ */
144
+ backdropFilter?: string;
145
+ }
@@ -0,0 +1,39 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var styleAttributes = [
6
+ /**
7
+ * Layout
8
+ */
9
+ 'alignContent', 'alignItems', 'alignSelf', 'aspectRatio', 'border', 'borderBottomWidth', 'borderEndWidth', 'borderLeftWidth', 'borderRightWidth', 'borderStartWidth', 'borderTopWidth', 'borderWidth', 'bottom', 'display', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'gap', 'rowGap', 'columnGap', 'columnWidth', 'height', 'justifyContent', 'left', 'margin', 'marginBottom', 'marginEnd', 'marginHorizontal', 'marginLeft', 'marginRight', 'marginStart', 'marginTop', 'marginVertical', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'overflow', 'padding', 'paddingBottom', 'paddingEnd', 'paddingHorizontal', 'paddingLeft', 'paddingRight', 'paddingStart', 'paddingTop', 'paddingVertical', 'position', 'right', 'top', 'width', 'zIndex', 'order',
10
+ /**
11
+ * Shadow
12
+ */
13
+ 'elevation', 'shadowColor', 'shadowOffset', 'shadowOpacity', 'shadowRadius',
14
+ /**
15
+ * Transform
16
+ */
17
+ 'transform',
18
+ /**
19
+ * View
20
+ */
21
+ 'background', 'backgroundColor', 'borderBottomColor', 'borderBottomEndRadius', 'borderBottomLeftRadius', 'borderBottomRightRadius', 'borderBottomStartRadius', 'borderColor', 'borderCurve', 'borderEndColor', 'borderLeftColor', 'borderRadius', 'borderRightColor', 'borderStartColor', 'borderStyle', 'borderTopColor', 'borderTopEndRadius', 'borderTopLeftRadius', 'borderTopRightRadius', 'borderTopStartRadius', 'opacity', 'cursor',
22
+ /**
23
+ * Text
24
+ */
25
+ 'color', 'fontFamily', 'fontSize', 'fontStyle', 'fontVariant', 'fontWeight', 'letterSpacing', 'lineHeight', 'textAlign', 'textDecorationColor', 'textDecorationLine', 'textDecorationStyle', 'textShadowColor', 'textShadowOffset', 'textShadowRadius', 'textTransform', 'verticalAlign', 'writingMode', 'whiteSpace',
26
+ /**
27
+ * Image
28
+ */
29
+ 'overlayColor', 'resizeMode', 'tintColor', 'objectFit',
30
+ /**
31
+ * Grid
32
+ */
33
+ 'gridTemplateColumns', 'gridArea', 'gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplate', 'gridTemplateAreas', 'gridTemplateRows', 'gridColumn', 'gridColumnGap', 'gridRow', 'gridRowGap',
34
+ /**
35
+ * Filter
36
+ */
37
+ 'backdropFilter'];
38
+
39
+ exports.default = styleAttributes;
@@ -0,0 +1,61 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var castArray = require('lodash/castArray');
5
+ var camelCase = require('lodash/camelCase');
6
+ var UIContext = require('../context/UIContext.js');
7
+ require('prop-types');
8
+ require('./useMediaQueries.js');
9
+ require('react-responsive');
10
+
11
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
12
+
13
+ var castArray__default = /*#__PURE__*/_interopDefault(castArray);
14
+ var camelCase__default = /*#__PURE__*/_interopDefault(camelCase);
15
+
16
+ function useDeviceTargetClass(componentProps, hookProps) {
17
+ /** Generate a class depending on the user's device.
18
+ *
19
+ * Usage:
20
+ * const sizeClass = useDeviceTargetClass(props, {
21
+ * prefix: 'some-item_size_',
22
+ * propsKey: 'size',
23
+ * })
24
+ * Return: "some-item_size_m" (or "s", or "l", or something else)
25
+ *
26
+ * "componentProps" - "props" from component
27
+ * "hookProps" - special props for generating class
28
+ **/
29
+
30
+ const {
31
+ prefix = '',
32
+ propsKey,
33
+ replace = [/([A-Z])/g, '-$1']
34
+ } = hookProps;
35
+ const {
36
+ isMobile,
37
+ isTablet,
38
+ isDesktop
39
+ } = UIContext.useUserDeviceContext();
40
+ const targetClassValue = React.useMemo(() => {
41
+ // prettier-ignore
42
+ const deviceBasePart = isMobile && 'Mobile' || isTablet && 'Tablet' || isDesktop && 'Desktop' || '';
43
+ const valueForDevice = componentProps[`${propsKey}${deviceBasePart}`];
44
+ const valueDefault = componentProps[propsKey];
45
+ return valueForDevice || valueDefault;
46
+ }, [isMobile, isTablet, isDesktop, componentProps[propsKey], componentProps[`${propsKey}Mobile`], componentProps[`${propsKey}Tablet`], componentProps[`${propsKey}Desktop`]]);
47
+ const targetClass = React.useMemo(() => {
48
+ if (targetClassValue) {
49
+ let cleanClassValue = camelCase__default.default(String(targetClassValue));
50
+ if (replace) {
51
+ const replaceList = castArray__default.default(replace);
52
+ cleanClassValue = cleanClassValue.replace(replaceList[0], replaceList[1] || '');
53
+ }
54
+ return `${prefix}${cleanClassValue}`.toLowerCase();
55
+ }
56
+ return null;
57
+ }, [targetClassValue, prefix, replace]);
58
+ return targetClass;
59
+ }
60
+
61
+ exports.useDeviceTargetClass = useDeviceTargetClass;
@@ -0,0 +1,139 @@
1
+ 'use strict';
2
+
3
+ var reactResponsive = require('react-responsive');
4
+
5
+ var tablet = "48em";
6
+ var mediaQueries = {
7
+ "mobile-tiny": "15em",
8
+ "mobile-small": "20em",
9
+ "mobile-medium": "23.435em",
10
+ "mobile-normal": "24.375em",
11
+ "mobile-large": "26.75em",
12
+ "mobile-extra-large": "30em",
13
+ "mobile-super-extra-large": "40em",
14
+ tablet: tablet,
15
+ "tablet-small": "40em",
16
+ "tablet-large": "60em",
17
+ "desktop-small": "60em",
18
+ "desktop-medium": "64em",
19
+ "desktop-normal": "72.5em",
20
+ "desktop-large": "80em",
21
+ "desktop-extra-large": "90em",
22
+ "desktop-super-extra-large": "120em",
23
+ "desktop-huge": "160em"
24
+ };
25
+
26
+ const isSSR = typeof window === 'undefined';
27
+ function useMediaQueries(userDevice = {}) {
28
+ // const isWarning = useMediaQuery({ maxWidth: mediaQueries['mobile-tiny'] })
29
+
30
+ // prettier-ignore
31
+ const isMobile = reactResponsive.useMediaQuery({
32
+ minWidth: mediaQueries['mobile-tiny'],
33
+ maxWidth: mediaQueries['tablet']
34
+ }) || isSSR && Boolean(userDevice.isMobile);
35
+
36
+ // const isMobileTiny = useMediaQuery({
37
+ // minWidth: mediaQueries['mobile-tiny'],
38
+ // maxWidth: mediaQueries['mobile-small'],
39
+ // })
40
+ // const isMobileSmall = useMediaQuery({
41
+ // minWidth: mediaQueries['mobile-small'],
42
+ // maxWidth: mediaQueries['mobile-medium'],
43
+ // })
44
+ // const isMobileMedium = useMediaQuery({
45
+ // minWidth: mediaQueries['mobile-medium'],
46
+ // maxWidth: mediaQueries['mobile-normal'],
47
+ // })
48
+ // const isMobileNormal = useMediaQuery({
49
+ // minWidth: mediaQueries['mobile-normal'],
50
+ // maxWidth: mediaQueries['mobile-large'],
51
+ // })
52
+ // const isMobileStandart = useMediaQuery({
53
+ // minWidth: mediaQueries['mobile-large'],
54
+ // maxWidth: mediaQueries['mobile-extra-large'],
55
+ // })
56
+ // const isMobileLarge = useMediaQuery({
57
+ // minWidth: mediaQueries['mobile-extra-large'],
58
+ // maxWidth: mediaQueries['mobile-super-extra-large'],
59
+ // })
60
+
61
+ reactResponsive.useMediaQuery({
62
+ minWidth: mediaQueries['mobile-super-extra-large'],
63
+ maxWidth: mediaQueries['tablet']
64
+ });
65
+
66
+ // prettier-ignore
67
+ const isTablet = reactResponsive.useMediaQuery({
68
+ minWidth: mediaQueries['tablet'],
69
+ maxWidth: mediaQueries['desktop-small']
70
+ }) || isSSR && Boolean(userDevice.isTablet);
71
+
72
+ // const isTabletSmall = useMediaQuery({
73
+ // minWidth: mediaQueries['tablet-small'],
74
+ // maxWidth: mediaQueries['tablet'],
75
+ // })
76
+ // const isTabletLarge = useMediaQuery({
77
+ // minWidth: mediaQueries['tablet'],
78
+ // maxWidth: mediaQueries['tablet-large'],
79
+ // })
80
+
81
+ // prettier-ignore
82
+ const isDesktop = reactResponsive.useMediaQuery({
83
+ minWidth: mediaQueries['desktop-small'],
84
+ maxWidth: mediaQueries['desktop-super-huge']
85
+ }) || isSSR && Boolean(userDevice.isDesktop);
86
+
87
+ // const isDesktopSmall = useMediaQuery({
88
+ // minWidth: mediaQueries['desktop-small'],
89
+ // maxWidth: mediaQueries['desktop-medium'],
90
+ // })
91
+ // const isDesktopMedium = useMediaQuery({
92
+ // minWidth: mediaQueries['desktop-medium'],
93
+ // maxWidth: mediaQueries['desktop-normal'],
94
+ // })
95
+ // const isDesktopNormal = useMediaQuery({
96
+ // minWidth: mediaQueries['desktop-normal'],
97
+ // maxWidth: mediaQueries['desktop-large'],
98
+ // })
99
+ // const isDesktopStandart = useMediaQuery({
100
+ // minWidth: mediaQueries['desktop-large'],
101
+ // maxWidth: mediaQueries['desktop-extra-large'],
102
+ // })
103
+ // const isDesktopLarge = useMediaQuery({
104
+ // minWidth: mediaQueries['desktop-extra-large'],
105
+ // maxWidth: mediaQueries['desktop-super-extra-large'],
106
+ // })
107
+ // const isDesktopHuge = useMediaQuery({
108
+ // minWidth: mediaQueries['desktop-super-extra-large'],
109
+ // maxWidth: mediaQueries['desktop-huge'],
110
+ // })
111
+
112
+ const isDesktopMega = reactResponsive.useMediaQuery({
113
+ minWidth: mediaQueries['desktop-huge']
114
+ });
115
+ return {
116
+ // isWarning,
117
+ isMobile: isMobile,
118
+ // isMobileTiny,
119
+ // isMobileSmall,
120
+ // isMobileMedium,
121
+ // isMobileNormal,
122
+ // isMobileStandart,
123
+ // isMobileLarge,
124
+ isMobileHuge: isMobile,
125
+ isTablet: isTablet,
126
+ // isTabletSmall,
127
+ // isTabletLarge,
128
+ isDesktop: isDesktop,
129
+ // isDesktopSmall,
130
+ // isDesktopMedium,
131
+ // isDesktopNormal,
132
+ // isDesktopStandart,
133
+ // isDesktopLarge,
134
+ // isDesktopHuge,
135
+ isDesktopMega: isDesktopMega
136
+ };
137
+ }
138
+
139
+ exports.useMediaQueries = useMediaQueries;
@@ -0,0 +1,135 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var camelCase = require('lodash/camelCase');
5
+ var maxBy = require('lodash/maxBy');
6
+ var upperFirst = require('lodash/upperFirst');
7
+ var styleAttributes = require('./styleAttributes.js');
8
+ var UIContext = require('../context/UIContext.js');
9
+ require('prop-types');
10
+ require('./useMediaQueries.js');
11
+ require('react-responsive');
12
+
13
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
14
+
15
+ var camelCase__default = /*#__PURE__*/_interopDefault(camelCase);
16
+ var maxBy__default = /*#__PURE__*/_interopDefault(maxBy);
17
+ var upperFirst__default = /*#__PURE__*/_interopDefault(upperFirst);
18
+
19
+ let DEVICE_TYPES = [];
20
+ const removeDeviceType = originalKey => {
21
+ // Remove "mobile"/"tablet"/"desktop"
22
+ const withOutDeviceType = DEVICE_TYPES.reduce((cleanKey, deviceType) => {
23
+ if (cleanKey.endsWith(upperFirst__default.default(deviceType))) {
24
+ return cleanKey.replace(upperFirst__default.default(deviceType), '');
25
+ }
26
+ return cleanKey;
27
+ }, originalKey);
28
+ return withOutDeviceType;
29
+ };
30
+ function useStyles(props) {
31
+ const allDevicesTypes = UIContext.useUserDeviceContext();
32
+ const {
33
+ isMobile,
34
+ isTablet,
35
+ isDesktop,
36
+ ...fullNamedDeviceTypes
37
+ } = allDevicesTypes;
38
+
39
+ // prettier-ignore
40
+ const deviceBasePart = React.useMemo(() => isMobile && 'Mobile' || isTablet && 'Tablet' || isDesktop && 'Desktop' || '', [isMobile, isTablet, isDesktop]);
41
+ /*
42
+ * rule of prop key:
43
+ *
44
+ * first is style second is div target third is device
45
+ * paddingHorizontal GridInnerWrapper MobileNormal
46
+ *
47
+ * paddingHorizontalGridInnerWrapperMobileNormal: "10px"
48
+ */
49
+
50
+ const currentDevice = React.useMemo(() => {
51
+ const deviceTypes = Object.keys(allDevicesTypes).map(key => camelCase__default.default(key.replace('is', '')));
52
+
53
+ // if "fullNamedDeviceTypes.isMobileLarge": true - that our device
54
+ let currentDevice = Object.keys(fullNamedDeviceTypes).find(key => fullNamedDeviceTypes[key]);
55
+ if (!currentDevice) {
56
+ currentDevice = deviceBasePart;
57
+ }
58
+ currentDevice = upperFirst__default.default(camelCase__default.default(currentDevice.replace('is', '')));
59
+ DEVICE_TYPES = deviceTypes;
60
+
61
+ // Set non-existent "currentDevice" value, to collect default styles later
62
+ return currentDevice || '__DEVICE_IS_NOT_FOUND__';
63
+ }, [allDevicesTypes, deviceBasePart]);
64
+ const collectedStyles = React.useMemo(() => {
65
+ const resultStyles = {};
66
+
67
+ // For every component props
68
+ Object.entries(props).forEach(([propKey, propValue]) => {
69
+ // Collect list of possible styles for propKey. e.g:
70
+ // "borderLeftWidthWrapperInnerMobileNormal" to ["border", "borderLeftWidth"]
71
+ const possibleStyleAttributes = styleAttributes.default.filter(styleAttribute => {
72
+ return propKey.startsWith(styleAttribute);
73
+ });
74
+
75
+ // Get longest style key (e.g. "borderLeftWidth")
76
+ const currentStyleAttribute = maxBy__default.default(possibleStyleAttributes, 'length');
77
+ if (currentStyleAttribute) {
78
+ const isStyleForCurrentDevice = propKey.toLowerCase().endsWith(currentDevice.toLowerCase());
79
+ let value = null;
80
+
81
+ // e.g. "GridWrapperInner"
82
+ const targetElementKey = removeDeviceType(propKey.replace(currentStyleAttribute, ''));
83
+ const targetElementResultKey = camelCase__default.default(targetElementKey) || 'styles';
84
+ if (!resultStyles[targetElementResultKey]) {
85
+ resultStyles[targetElementResultKey] = {};
86
+ }
87
+ if (isStyleForCurrentDevice) {
88
+ value = propValue;
89
+ } else {
90
+ const propKeyWithOutDeviceType = `${currentStyleAttribute}${targetElementKey}`;
91
+ const propKeyWithBaseDeviceType = `${propKeyWithOutDeviceType}${deviceBasePart}`;
92
+ const defaultValue = props[propKeyWithBaseDeviceType] || props[propKeyWithOutDeviceType];
93
+ let currentValue = resultStyles[targetElementResultKey][currentStyleAttribute];
94
+ if (propKeyWithOutDeviceType.includes('Horizontal')) {
95
+ const keyLeft = currentStyleAttribute.replace('Horizontal', 'Left');
96
+ currentValue = resultStyles[targetElementResultKey][keyLeft];
97
+ } else if (propKeyWithOutDeviceType.includes('Vertical')) {
98
+ const keyTop = currentStyleAttribute.replace('Vertical', 'Top');
99
+ currentValue = resultStyles[targetElementResultKey][keyTop];
100
+ }
101
+ if (!currentValue) {
102
+ value = defaultValue;
103
+ }
104
+ }
105
+ if (value) {
106
+ // TODO: handle 16px/9px propValues for Horizontal(Left/Right) and Vertical(Top/Bottom)
107
+ const HAS_UNIT = /\D/;
108
+ // prettier-ignore
109
+ const ignorePX = currentStyleAttribute.includes('zIndex') || currentStyleAttribute.includes('order');
110
+ if (!HAS_UNIT.test(value) && !ignorePX) {
111
+ value = `${value}px`;
112
+ }
113
+ if (currentStyleAttribute.includes('Horizontal')) {
114
+ const keyLeft = currentStyleAttribute.replace('Horizontal', 'Left');
115
+ const keyRight = currentStyleAttribute.replace('Horizontal', 'Right');
116
+ resultStyles[targetElementResultKey][keyLeft] = value;
117
+ resultStyles[targetElementResultKey][keyRight] = value;
118
+ } else if (currentStyleAttribute.includes('Vertical')) {
119
+ const keyTop = currentStyleAttribute.replace('Vertical', 'Top');
120
+ const keyBottom = currentStyleAttribute.replace('Vertical', 'Bottom');
121
+ resultStyles[targetElementResultKey][keyTop] = value;
122
+ resultStyles[targetElementResultKey][keyBottom] = value;
123
+ } else {
124
+ resultStyles[targetElementResultKey][currentStyleAttribute] = value;
125
+ }
126
+ }
127
+ }
128
+ });
129
+ return resultStyles;
130
+ }, [currentDevice, props.display]); // "props" object maybe big and frequently changing
131
+
132
+ return collectedStyles;
133
+ }
134
+
135
+ exports.useStyles = useStyles;
@@ -0,0 +1,4 @@
1
+ export * from './components';
2
+ export * from './context';
3
+ export * from './hooks';
4
+ export * from './constants';